{
  "version": 3,
  "sources": ["../../../../../../../node_modules/.pnpm/snabbdom-signature@0.0.3/node_modules/snabbdom-signature/dist/index.js", "../../../../../../../node_modules/.pnpm/path-to-regexp@3.3.0/node_modules/path-to-regexp/index.js", "../../../../../../../node_modules/.pnpm/mustache@3.0.0/node_modules/mustache/mustache.js", "../../../../../../../node_modules/.pnpm/string-template@1.0.0/node_modules/string-template/index.js", "../../../../../../../node_modules/.pnpm/object-assign@4.1.1/node_modules/object-assign/index.js", "../../../../../../../node_modules/.pnpm/react@16.14.0/node_modules/react/cjs/react.production.min.js", "../../../../../../../node_modules/.pnpm/react@16.14.0/node_modules/react/index.js", "../../../../../../../node_modules/.pnpm/sn-custom-create-element@25.0.0/node_modules/sn-custom-create-element/lib/camelCase.js", "../../../../../../../node_modules/.pnpm/sn-custom-create-element@25.0.0/node_modules/sn-custom-create-element/lib/constants.js", "../../../../../../../node_modules/.pnpm/sn-custom-create-element@25.0.0/node_modules/sn-custom-create-element/lib/ariaRefHelpers.js", "../../../../../../../node_modules/.pnpm/sn-custom-create-element@25.0.0/node_modules/sn-custom-create-element/lib/index.js", "../../../../../../../mega-bundle-entry.js", "../../../../../../../packages/behaviors/behavior-local-storage/src/global-shim.js", "../../../../../../../packages/behaviors/behavior-local-storage/src/index.js", "../../../../../../../packages/behaviors/behavior-local-storage/src/createLocalStorageBehavior.js", "../../../../../../../packages/behaviors/behavior-post-message/src/global-shim.js", "../../../../../../../packages/behaviors/behavior-post-message/src/index.js", "../../../../../../../packages/behaviors/behavior-post-message/src/constants.js", "../../../../../../../packages/behaviors/behavior-post-message/src/createPostMessageBehavior.js", "../../../../../../../packages/internal/src/index.js", "../../../../../../../packages/internal/src/callAsync.js", "../../../../../../../packages/internal/src/symbols.js", "../../../../../../../packages/internal/src/constants.js", "../../../../../../../packages/internal/src/createLogger.js", "../../../../../../../packages/internal/src/logHandler/index.js", "../../../../../../../packages/internal/src/logHandler/constants.js", "../../../../../../../packages/internal/src/logHandler/createLogContext.js", "../../../../../../../packages/internal/src/logHandler/shouldLog.js", "../../../../../../../packages/config/src/index.js", "../../../../../../../packages/config/src/config.js", "../../../../../../../packages/utils/src/index.js", "../../../../../../../packages/utils/src/kebabCase.js", "../../../../../../../packages/utils/src/camelCase.js", "../../../../../../../packages/utils/src/toString.js", "../../../../../../../packages/utils/src/toLower.js", "../../../../../../../packages/utils/src/toUpper.js", "../../../../../../../packages/utils/src/memoize.js", "../../../../../../../packages/utils/src/findKey.js", "../../../../../../../packages/utils/src/get.js", "../../../../../../../packages/utils/src/splitPath.js", "../../../../../../../packages/utils/src/set.js", "../../../../../../../packages/utils/src/pick.js", "../../../../../../../packages/utils/src/omit.js", "../../../../../../../packages/utils/src/values.js", "../../../../../../../packages/utils/src/noop.js", "../../../../../../../packages/utils/src/isEqual.js", "../../../../../../../packages/utils/src/isSelectiveEqual.js", "../../../../../../../packages/utils/src/isPlainObject.js", "../../../../../../../packages/utils/src/isEmpty.js", "../../../../../../../packages/utils/src/defer.js", "../../../../../../../packages/utils/src/isThrottled.js", "../../../../../../../packages/utils/src/nextTick.js", "../../../../../../../packages/utils/src/deferMetrics.js", "../../../../../../../packages/utils/src/whenIdle.js", "../../../../../../../packages/utils/src/requestIdleCallback.js", "../../../../../../../packages/utils/src/raf.js", "../../../../../../../packages/utils/src/createSnHttp.js", "../../../../../../../packages/config/src/constants.js", "../../../../../../../packages/config/src/emitNowUiEvent.js", "../../../../../../../packages/config/src/configs/index.js", "../../../../../../../packages/config/src/configs/dev.js", "../../../../../../../packages/config/src/configs/prod.js", "../../../../../../../packages/config/src/configs/test.js", "../../../../../../../packages/config/src/config-embeddable/index.js", "../../../../../../../packages/config/src/config-embeddable/baseUrl.js", "../../../../../../../packages/internal/src/logHandler/observe.js", "../../../../../../../packages/internal/src/logHandler/logObservers.js", "../../../../../../../packages/internal/src/logHandler/notifyLogObservers.js", "../../../../../../../packages/internal/src/getHostInfo.js", "../../../../../../../packages/internal/src/memoizeProfiler.js", "../../../../../../../packages/internal/src/sandbox.js", "../../../../../../../packages/metrics/src/index.js", "../../../../../../../packages/metrics/src/constants.js", "../../../../../../../packages/metrics/src/applyInteractionId.js", "../../../../../../../packages/metrics/src/symbols.js", "../../../../../../../packages/metrics/src/createInteractionId.js", "../../../../../../../packages/metrics/src/getInteractionId.js", "../../../../../../../packages/metrics/src/validateMeta.js", "../../../../../../../packages/metrics/src/isObject.js", "../../../../../../../packages/metrics/src/setInteractionId.js", "../../../../../../../packages/metrics/src/validateSetInteractionIdArguments.js", "../../../../../../../packages/metrics/src/createTraceId.js", "../../../../../../../packages/metrics/src/defineMetric.js", "../../../../../../../packages/metrics/src/levels.js", "../../../../../../../packages/metrics/src/mark.js", "../../../../../../../packages/metrics/src/resolveContext.js", "../../../../../../../packages/metrics/src/augment.js", "../../../../../../../packages/metrics/src/augmenters.js", "../../../../../../../packages/metrics/src/marks.js", "../../../../../../../packages/metrics/src/counters.js", "../../../../../../../packages/metrics/src/shouldMark.js", "../../../../../../../packages/metrics/src/observers.js", "../../../../../../../packages/metrics/src/validateMarkArguments.js", "../../../../../../../packages/metrics/src/isElement.js", "../../../../../../../packages/metrics/src/getMarks.js", "../../../../../../../packages/metrics/src/clearMarks.js", "../../../../../../../packages/metrics/src/observe.js", "../../../../../../../packages/metrics/src/getMetricTypes.js", "../../../../../../../packages/metrics/src/addMarkAugmenter.js", "../../../../../../../packages/metrics/src/metrics.js", "../../../../../../../packages/metrics/src/timingMetrics.js", "../../../../../../../packages/internal/src/guid.js", "../../../../../../../packages/internal/src/createAriaRef.js", "../../../../../../../packages/internal/src/refs/index.js", "../../../../../../../packages/internal/src/refs/isRef.js", "../../../../../../../packages/internal/src/refs/createRef.js", "../../../../../../../packages/internal/src/refs/subscribeToRef.js", "../../../../../../../packages/internal/src/pendingNetworkActionsRegistry.js", "../../../../../../../packages/internal/src/getSpanOptions.js", "../../../../../../../packages/behaviors/behavior-post-message/src/log.js", "../../../../../../../packages/config/src/global-shim.js", "../../../../../../../packages/core/src/global-shim.js", "../../../../../../../packages/core/src/index.js", "../../../../../../../packages/core/src/stats.js", "../../../../../../../packages/core/src/constants.js", "../../../../../../../packages/core/src/whenComponentIsIdle.js", "../../../../../../../packages/core/src/scheduler/index.js", "../../../../../../../packages/core/src/scheduler/queue.js", "../../../../../../../packages/core/src/scheduler/metrics.js", "../../../../../../../packages/core/src/log.js", "../../../../../../../packages/core/src/createCustomElementFactory.js", "../../../../../../../packages/core/src/createElementClass.js", "../../../../../../../packages/core/src/utils/schema/index.js", "../../../../../../../packages/core/src/utils/schema/build/noop.js", "../../../../../../../packages/core/src/utils/config/index.js", "../../../../../../../packages/core/src/utils/config/createInterceptors.js", "../../../../../../../packages/core/src/utils/getHostVariables.js", "../../../../../../../packages/core/src/symbols.js", "../../../../../../../packages/core/src/utils/config/lifeCycleFnsToHandlers.js", "../../../../../../../packages/core/src/utils/config/normalizeActionHandler.js", "../../../../../../../packages/core/src/utils/config/normalizeModifiers.js", "../../../../../../../packages/core/src/actions/utils/index.js", "../../../../../../../packages/core/src/actions/utils/appendToPayload.js", "../../../../../../../packages/core/src/actions/utils/createMetaData.js", "../../../../../../../packages/core/src/actions/utils/getComponentName.js", "../../../../../../../packages/core/src/utils/index.js", "../../../../../../../packages/core/src/utils/assertValidPropertyNames.js", "../../../../../../../packages/core/src/utils/resolveProperties.js", "../../../../../../../packages/core/src/utils/resolveRenderer.js", "../../../../../../../packages/core/src/defaults.js", "../../../../../../../packages/renderers/snabbdom/src/index.js", "../../../../../../../packages/renderers/snabbdom/src/onStateChange.js", "../../../../../../../packages/renderers/snabbdom/src/utils/index.js", "../../../../../../../packages/renderers/snabbdom/src/utils/formatProps.js", "../../../../../../../packages/renderers/snabbdom/src/constants/index.js", "../../../../../../../packages/renderers/snabbdom/src/log.js", "../../../../../../../packages/renderers/snabbdom/src/symbols.js", "../../../../../../../packages/renderers/snabbdom/src/utils/formatChildren.js", "../../../../../../../packages/renderers/snabbdom/src/utils/flat.js", "../../../../../../../packages/renderers/snabbdom/src/utils/patch.js", "../../../../../../../node_modules/.pnpm/snabbdom@2.1.0/node_modules/snabbdom/src/package/init.ts", "../../../../../../../node_modules/.pnpm/snabbdom@2.1.0/node_modules/snabbdom/src/package/vnode.ts", "../../../../../../../node_modules/.pnpm/snabbdom@2.1.0/node_modules/snabbdom/src/package/is.ts", "../../../../../../../node_modules/.pnpm/snabbdom@2.1.0/node_modules/snabbdom/src/package/htmldomapi.ts", "../../../../../../../node_modules/.pnpm/snabbdom@2.1.0/node_modules/snabbdom/src/package/modules/class.ts", "../../../../../../../node_modules/.pnpm/snabbdom@2.1.0/node_modules/snabbdom/src/package/modules/style.ts", "../../../../../../../node_modules/.pnpm/snabbdom@2.1.0/node_modules/snabbdom/src/package/modules/eventlisteners.ts", "../../../../../../../node_modules/.pnpm/snabbdom@2.1.0/node_modules/snabbdom/src/package/modules/dataset.ts", "../../../../../../../packages/renderers/snabbdom/src/modules/index.js", "../../../../../../../packages/renderers/snabbdom/src/modules/ref.js", "../../../../../../../packages/renderers/snabbdom/src/modules/props.js", "../../../../../../../packages/renderers/snabbdom/src/modules/attributes.js", "../../../../../../../packages/renderers/snabbdom/src/utils/validateProps.js", "../../../../../../../packages/renderers/snabbdom/src/utils/hydrate.js", "../../../../../../../packages/renderers/snabbdom/src/createElementFromNode.js", "../../../../../../../node_modules/.pnpm/snabbdom@2.1.0/node_modules/snabbdom/src/package/tovnode.ts", "../../../../../../../packages/renderers/snabbdom/src/utils/toVNodeFromServerSideRenderedNode.js", "../../../../../../../packages/renderers/snabbdom/src/onDisconnect.js", "../../../../../../../packages/renderers/snabbdom/src/createAriaRef.js", "../../../../../../../packages/renderers/snabbdom/src/createSlot.js", "../../../../../../../packages/renderers/snabbdom/src/createElement.js", "../../../../../../../node_modules/.pnpm/snabbdom@2.1.0/node_modules/snabbdom/src/package/h.ts", "../../../../../../../packages/renderers/snabbdom/src/createElementFromString.js", "../../../../../../../packages/renderers/snabbdom/src/dangerouslyCreateElementFromString.js", "../../../../../../../packages/renderers/snabbdom/src/fragment.js", "../../../../../../../packages/renderers/default/src/index.js", "../../../../../../../packages/core/src/utils/getInitialPropertyValue.js", "../../../../../../../packages/core/src/utils/toAttributeName.js", "../../../../../../../packages/core/src/property-selectors/index.js", "../../../../../../../packages/core/src/property-selectors/createAddMapping.js", "../../../../../../../packages/core/src/property-selectors/createRemoveMappings.js", "../../../../../../../packages/core/src/property-selectors/createGetAffected.js", "../../../../../../../packages/core/src/property-selectors/isSelectableProperty.js", "../../../../../../../packages/core/src/property-selectors/createGetComponentAffected.js", "../../../../../../../packages/core/src/property-selectors/createAddResolvedPropertyMapping.js", "../../../../../../../packages/core/src/property-selectors/createAddSelectablePropertyMapping.js", "../../../../../../../packages/core/src/property-selectors/resolvedMappingHasKey.js", "../../../../../../../packages/core/src/property-selectors/getResolvedPropertyValue.js", "../../../../../../../packages/core/src/property-selectors/createRemoveResolvedPropertyMapping.js", "../../../../../../../packages/core/src/property-selectors/createAddResolvedPropertyMappingWithKey.js", "../../../../../../../packages/core/src/property-selectors/resolveSelectedProperty.js", "../../../../../../../packages/core/src/property-selectors/resolveSelectedProperties.js", "../../../../../../../packages/core/src/property-selectors/resolveProviderSelectedProperty.js", "../../../../../../../packages/core/src/utils/getResolvedValue.js", "../../../../../../../packages/core/src/utils/shouldAddToResolvedPropertyMapping.js", "../../../../../../../packages/core/src/property-selectors/getSelectorParts.js", "../../../../../../../packages/core/src/property-selectors/isSelector.js", "../../../../../../../packages/core/src/property-selectors/updatePropertiesWithSelector.js", "../../../../../../../packages/core/src/property-selectors/getPartsForNestedSelectableProps.js", "../../../../../../../packages/core/src/property-selectors/applyUpdatesForSelectableProps.js", "../../../../../../../packages/core/src/property-selectors/createUnstableResolvePropertySelectorValue.js", "../../../../../../../packages/core/src/property-selectors/unstableAddRenderOnPropertySelectorValueChange.js", "../../../../../../../packages/core/src/property-selectors/unstableRemoveRenderOnPropertySelectorValueChange.js", "../../../../../../../packages/core/src/utils/filterPropertyDefinitions.js", "../../../../../../../packages/core/src/utils/createStyleFragment.js", "../../../../../../../packages/core/src/utils/reflectQueue.js", "../../../../../../../packages/core/src/utils/isReflecting.js", "../../../../../../../packages/core/src/utils/clearReflection.js", "../../../../../../../packages/core/src/utils/isComputedProperty.js", "../../../../../../../packages/core/src/utils/toPropertyName.js", "../../../../../../../packages/core/src/utils/isReadOnlyProperty.js", "../../../../../../../packages/core/src/utils/shouldSetAttribute.js", "../../../../../../../packages/core/src/utils/shouldSetProperty.js", "../../../../../../../packages/core/src/utils/beforeNextTick.js", "../../../../../../../packages/core/src/utils/measure.js", "../../../../../../../packages/core/src/utils/selectablePropertyResolver.js", "../../../../../../../packages/core/src/utils/triggerComponentUpdates.js", "../../../../../../../packages/core/src/utils/triggerPropertyChangeAction.js", "../../../../../../../packages/core/src/utils/isPropToSkipRender.js", "../../../../../../../packages/core/src/utils/updateSelectedPropertyMappings.js", "../../../../../../../packages/core/src/utils/updateResolvedSelectedPropertyMappings.js", "../../../../../../../packages/core/src/utils/helpers/quickEquals.js", "../../../../../../../packages/core/src/utils/updateResolvedValue.js", "../../../../../../../packages/core/src/utils/createLifecycleFunctions.js", "../../../../../../../packages/core/src/utils/emitNowUiEvent.js", "../../../../../../../packages/core/src/utils/camelCaseProperties.js", "../../../../../../../packages/core/src/utils/unescapeReservedCharacters.js", "../../../../../../../packages/core/src/utils/isHoisted.js", "../../../../../../../packages/core/src/utils/getHoistTarget.js", "../../../../../../../packages/core/src/utils/getRootNode.js", "../../../../../../../packages/core/src/utils/applyMetrics.js", "../../../../../../../packages/core/src/utils/normalizeActionMeta.js", "../../../../../../../packages/core/src/utils/helpers/createComponentLogger.js", "../../../../../../../packages/core/src/utils/helpers/deferHelperExecution.js", "../../../../../../../packages/core/src/utils/resolveComputedProperties.js", "../../../../../../../packages/core/src/utils/filterComputedProperties.js", "../../../../../../../packages/core/src/utils/computeProperty.js", "../../../../../../../packages/core/src/utils/computeProperties.js", "../../../../../../../packages/core/src/utils/intersectionObserver.js", "../../../../../../../packages/core/src/utils/applyIntersectStyles.js", "../../../../../../../packages/core/src/utils/operators/index.js", "../../../../../../../packages/core/src/utils/operators/assign.js", "../../../../../../../packages/core/src/utils/operators/merge.js", "../../../../../../../packages/core/src/utils/operators/operations.js", "../../../../../../../packages/core/src/utils/shouldOptOutOfDeepCompareForPage.js", "../../../../../../../packages/core/src/utils/styleSheetsContentCache.js", "../../../../../../../packages/core/src/utils/resolveStylesheetsContent.js", "../../../../../../../packages/core/src/utils/styleSheetsRequestCache.js", "../../../../../../../packages/core/src/utils/markComponentInteractive.js", "../../../../../../../packages/core/src/utils/createOnStateChangeArgs.js", "../../../../../../../packages/core/src/utils/getAncestorNode.js", "../../../../../../../packages/core/src/utils/updateCustomElement.js", "../../../../../../../packages/core/src/utils/getSpanOptions.js", "../../../../../../../packages/core/src/utils/resolveParentTraceId.js", "../../../../../../../packages/core/src/utils/getSpanPayload.js", "../../../../../../../packages/core/src/actions/utils/isPropertyUpdate.js", "../../../../../../../packages/core/src/actions/utils/validateActionPayload.js", "../../../../../../../packages/core/src/actions/utils/isInternalActionType.js", "../../../../../../../packages/core/src/actions/utils/getInternalActionName.js", "../../../../../../../packages/core/src/actions/utils/createEventActionDetails.js", "../../../../../../../packages/core/src/actions/utils/wrapDispatch.js", "../../../../../../../packages/core/src/actions/utils/isStoreUpdate.js", "../../../../../../../packages/core/src/actions/utils/hasActionHandlerForType.js", "../../../../../../../packages/core/src/actions/utils/wasActionDispatchedByDescendant.js", "../../../../../../../packages/core/src/actions/utils/applyRuntimeActionHandlers.js", "../../../../../../../packages/core/src/actions/customEventActionHandler.js", "../../../../../../../packages/core/src/actions/onAction.js", "../../../../../../../packages/core/src/actions/createContext.js", "../../../../../../../packages/core/src/context/createContextProxy.js", "../../../../../../../packages/core/src/context/consumers.js", "../../../../../../../packages/core/src/context/createContext.js", "../../../../../../../packages/core/src/context/contexts.js", "../../../../../../../packages/core/src/actions/sandboxEffect.js", "../../../../../../../packages/core/src/effects/index.js", "../../../../../../../packages/core/src/effects/effectRunner.js", "../../../../../../../packages/core/src/effects/modifiers/index.js", "../../../../../../../packages/core/src/effects/modifiers/debounce.js", "../../../../../../../packages/core/src/effects/modifiers/hostMap.js", "../../../../../../../packages/core/src/effects/modifiers/takeLatest.js", "../../../../../../../packages/core/src/effects/modifiers/throttle.js", "../../../../../../../packages/core/src/effects/modifiers/getTargetElement.js", "../../../../../../../packages/core/src/effects/modifiers/types.js", "../../../../../../../packages/core/src/effects/runEffect.js", "../../../../../../../packages/core/src/actions/onActionHoisted.js", "../../../../../../../packages/core/src/actions/utils/skipForDetachedComponent.js", "../../../../../../../packages/core/src/utils/config/mergeBehaviorActionHandlers.js", "../../../../../../../packages/core/src/utils/config/mergeBehaviorInitialState.js", "../../../../../../../packages/core/src/utils/config/mergeBehaviorProperties.js", "../../../../../../../packages/core/src/utils/config/mergeLifeCycleActionHandlers.js", "../../../../../../../packages/core/src/utils/config/normalizeActionHandlers.js", "../../../../../../../packages/core/src/utils/config/normalizeBehaviors.js", "../../../../../../../packages/core/src/utils/config/getStopPropagation.js", "../../../../../../../packages/core/src/utils/config/mergeActions.js", "../../../../../../../packages/core/src/utils/config/mergeEventActionHandlers.js", "../../../../../../../packages/core/src/utils/config/applyPayloadValidators.js", "../../../../../../../packages/core/src/utils/config/mergeBehaviorActions.js", "../../../../../../../packages/core/src/utils/config/getActionsToDispatch.js", "../../../../../../../packages/core/src/utils/config/normalizeBehaviorEventHandlers.js", "../../../../../../../packages/core/src/accessibility/ariaLiveRegion.js", "../../../../../../../packages/core/src/context/validateContext.js", "../../../../../../../packages/core/src/utils/schema/getComponentName.js", "../../../../../../../packages/core/src/utils/schema/validate/validateSchema.js", "../../../../../../../packages/core/src/utils/schema/logValidationError.js", "../../../../../../../packages/core/src/utils/parse/index.js", "../../../../../../../packages/core/src/utils/parse/property.js", "../../../../../../../packages/core/src/utils/parse/isValuePropertySelector.js", "../../../../../../../packages/core/src/utils/parse/refProperty.js", "../../../../../../../packages/core/src/utils/parse/types.js", "../../../../../../../packages/core/src/utils/parse/parse.js", "../../../../../../../packages/core/src/utils/parse/properties.js", "../../../../../../../packages/core/src/actions/index.js", "../../../../../../../packages/core/src/actions/createDispatcher.js", "../../../../../../../packages/core/src/actions/customEventDispatcher.js", "../../../../../../../packages/core/src/actions/addActionHandlerForUnknownType.js", "../../../../../../../packages/core/src/actions/createConditionalDispatch.js", "../../../../../../../packages/core/src/actions/addActionHandlers.js", "../../../../../../../packages/core/src/actions/removeActionHandlers.js", "../../../../../../../packages/core/src/utils/helpers/index.js", "../../../../../../../packages/core/src/utils/helpers/createUpdateState.js", "../../../../../../../node_modules/.pnpm/immer@3.1.2/node_modules/immer/src/common.js", "../../../../../../../node_modules/.pnpm/immer@3.1.2/node_modules/immer/src/scope.js", "../../../../../../../node_modules/.pnpm/immer@3.1.2/node_modules/immer/src/es5.js", "../../../../../../../node_modules/.pnpm/immer@3.1.2/node_modules/immer/src/proxy.js", "../../../../../../../node_modules/.pnpm/immer@3.1.2/node_modules/immer/src/patches.js", "../../../../../../../node_modules/.pnpm/immer@3.1.2/node_modules/immer/src/immer.js", "../../../../../../../node_modules/.pnpm/immer@3.1.2/node_modules/immer/src/index.js", "../../../../../../../packages/core/src/utils/helpers/utils.js", "../../../../../../../packages/core/src/utils/helpers/getStatePropsContext.js", "../../../../../../../packages/core/src/utils/helpers/createUpdateContext.js", "../../../../../../../packages/core/src/context/renderContextConsumers.js", "../../../../../../../packages/core/src/utils/helpers/createUpdateProperties.js", "../../../../../../../packages/core/src/utils/helpers/createDispatch.js", "../../../../../../../packages/core/src/hoist.js", "../../../../../../../packages/core/src/applyStyles.js", "../../../../../../../packages/core/src/removeStyles.js", "../../../../../../../packages/core/src/shape-render-data/index.js", "../../../../../../../packages/core/src/shape-render-data/reflectProperties.js", "../../../../../../../packages/core/src/utils/addResolvedSelectedPropertyMappingWithResolvedValue.js", "../../../../../../../packages/core/src/utils/nowResolvedPropsHandler.js", "../../../../../../../packages/core/src/validateConfig.js", "../../../../../../../packages/effects/effect-amb/src/global-shim.js", "../../../../../../../packages/effects/effect-amb/src/index.js", "../../../../../../../packages/effects/effect-amb/src/ambSubscriptionEffect.js", "../../../../../../../packages/effects/effect-amb/src/getAMBClient.js", "../../../../../../../packages/effects/effect-amb/src/utils/index.js", "../../../../../../../packages/effects/effect-amb/src/utils/createSubscriptionId.js", "../../../../../../../packages/effects/effect-amb/src/utils/createRegistryId.js", "../../../../../../../packages/effects/effect-amb/src/utils/replaceChannelParameters.js", "../../../../../../../packages/effects/effect-amb/src/createGarbageCollectorMap.js", "../../../../../../../packages/effects/effect-amb/src/utils/setInterval.js", "../../../../../../../packages/effects/effect-amb/src/ambPublishEffect.js", "../../../../../../../packages/effects/effect-amb/src/ambEventEffect.js", "../../../../../../../packages/effects/effect-graphql/src/global-shim.js", "../../../../../../../packages/effects/effect-graphql/src/index.js", "../../../../../../../packages/effects/effect-graphql/src/gqlEffect.js", "../../../../../../../packages/effects/effect-helpers/src/index.js", "../../../../../../../packages/effects/effect-helpers/src/createHttpErrorAction.js", "../../../../../../../packages/effects/effect-helpers/src/postTxnStatus.js", "../../../../../../../packages/effects/effect-helpers/src/resolveDomainContext.js", "../../../../../../../packages/effects/effect-helpers/src/cache/getUserSysId.js", "../../../../../../../packages/effects/effect-helpers/src/cache/hash.js", "../../../../../../../packages/effects/effect-helpers/src/cache/cachePolicies/lruCachePolicy.js", "../../../../../../../packages/effects/effect-helpers/src/cache/cache.js", "../../../../../../../packages/effects/effect-helpers/src/cache/store.js", "../../../../../../../packages/effects/effect-helpers/src/cache/murmur-hash3.js", "../../../../../../../packages/effects/effect-graphql/src/http/index.js", "../../../../../../../packages/effects/effect-graphql/src/http/sendRequest.js", "../../../../../../../packages/effects/effect-graphql/src/http/createQueryBatcher.js", "../../../../../../../packages/effects/effect-graphql/src/http/snHttp.js", "../../../../../../../packages/effects/effect-graphql/src/utils/index.js", "../../../../../../../packages/effects/effect-graphql/src/utils/addDomainContextToGraphQLDocument.js", "../../../../../../../packages/effects/effect-graphql/src/utils/addQueryNameToGraphQLDocument.js", "../../../../../../../packages/effects/effect-graphql/src/utils/getGlobalObject.js", "../../../../../../../packages/effects/effect-graphql/src/utils/isSubscription.js", "../../../../../../../packages/effects/effect-graphql/src/utils/isSubscriptionResult.js", "../../../../../../../packages/effects/effect-graphql/src/utils/replaceQueryTemplateVariables.js", "../../../../../../../packages/effects/effect-graphql/src/utils/graphQLDocument.js", "../../../../../../../node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs", "../../../../../../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/index.mjs", "../../../../../../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/jsutils/devAssert.mjs", "../../../../../../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/parser.mjs", "../../../../../../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/error/syntaxError.mjs", "../../../../../../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/error/GraphQLError.mjs", "../../../../../../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/jsutils/isObjectLike.mjs", "../../../../../../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/location.mjs", "../../../../../../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/jsutils/invariant.mjs", "../../../../../../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/printLocation.mjs", "../../../../../../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/ast.mjs", "../../../../../../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/directiveLocation.mjs", "../../../../../../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/kinds.mjs", "../../../../../../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/lexer.mjs", "../../../../../../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/blockString.mjs", "../../../../../../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/characterClasses.mjs", "../../../../../../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/tokenKind.mjs", "../../../../../../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/source.mjs", "../../../../../../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/jsutils/inspect.mjs", "../../../../../../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/jsutils/instanceOf.mjs", "../../../../../../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/printer.mjs", "../../../../../../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/printString.mjs", "../../../../../../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/visitor.mjs", "../../../../../../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/language/index.mjs", "../../../../../../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/utilities/index.mjs", "../../../../../../../node_modules/.pnpm/graphql@16.8.1/node_modules/graphql/utilities/stripIgnoredCharacters.mjs", "../../../../../../../node_modules/.pnpm/graphql-tag@2.12.6_graphql@16.8.1/node_modules/graphql-tag/src/index.ts", "../../../../../../../packages/effects/effect-graphql/src/utils/getOperationName.js", "../../../../../../../packages/effects/effect-graphql/src/utils/getSpanOptions.js", "../../../../../../../packages/effects/effect-graphql/src/constants.js", "../../../../../../../packages/effects/effect-graphql/src/http/documentToQueryString.js", "../../../../../../../packages/effects/effect-graphql/src/http/resultsCache.js", "../../../../../../../packages/effects/effect-graphql/src/http/shouldCache.js", "../../../../../../../packages/effects/effect-graphql/src/utils/traceHelper.js", "../../../../../../../packages/effects/effect-graphql/src/subscriptions/index.js", "../../../../../../../packages/effects/effect-graphql/src/subscriptions/createSubscriptionId.js", "../../../../../../../packages/effects/effect-graphql/src/subscriptions/createRegistryId.js", "../../../../../../../packages/effects/effect-graphql/src/subscriptions/getAMBClient.js", "../../../../../../../packages/effects/effect-graphql/src/subscriptions/handleGraphQLSubscription.js", "../../../../../../../packages/effects/effect-graphql/src/subscriptions/getChannelsFromSubscriptionQuery.js", "../../../../../../../packages/effects/effect-graphql/src/subscriptions/handleAMBSubscription.js", "../../../../../../../packages/effects/effect-graphql/src/queryContext.js", "../../../../../../../packages/effects/effect-helpers/src/global-shim.js", "../../../../../../../packages/effects/effect-http/src/global-shim.js", "../../../../../../../packages/effects/effect-http/src/index.js", "../../../../../../../packages/effects/effect-http/src/httpEffect.js", "../../../../../../../packages/effects/effect-http/src/sendRequest.js", "../../../../../../../packages/effects/effect-http/src/snHttp.js", "../../../../../../../packages/effects/effect-http/src/getGlobalObject.js", "../../../../../../../packages/effects/effect-http/src/isBatchingEnabled.js", "../../../../../../../packages/effects/effect-http/src/filterHeaders.js", "../../../../../../../packages/effects/effect-http/src/log.js", "../../../../../../../packages/effects/effect-http/src/replacePathParams.js", "../../../../../../../packages/effects/effect-http/src/constants.js", "../../../../../../../packages/effects/effect-update-state/src/global-shim.js", "../../../../../../../packages/effects/effect-update-state/src/index.js", "../../../../../../../packages/effects/effect-update-state/src/updateStateEffect.js", "../../../../../../../packages/internal/src/global-shim.js", "../../../../../../../packages/metrics/src/global-shim.js", "../../../../../../../packages/renderers/default/src/global-shim.js", "../../../../../../../packages/renderers/default/src/index.js", "../../../../../../../packages/renderers/snabbdom/src/global-shim.js", "../../../../../../../packages/types/src/global-shim.js", "../../../../../../../packages/types/src/index.js", "../../../../../../../packages/types/src/primitives.js", "../../../../../../../packages/types/src/sets.js", "../../../../../../../packages/utils/src/global-shim.js", "../../../../../../../sn-seismic-post-message.js", "../../../../../../../node_modules/.pnpm/sn-seismic-post-message@1.0.0/node_modules/sn-seismic-post-message/src/index.js", "../../../../../../../sn-translate.js", "../../../../../../../node_modules/.pnpm/sn-translate@20.0.0/node_modules/sn-translate/src/index.js", "../../../../../../../sn-custom-create-element.js"],
  "sourcesContent": ["\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.sign = exports.removeSignature = exports.denyUnlessSigned = exports.signingH = exports.signedData = void 0;\n\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar signatureKey = 'snabbdom_signature';\nvar signature = Symbol.for(signatureKey);\n\nvar signedData = _defineProperty({}, signatureKey, signature);\n\nexports.signedData = signedData;\n\nvar signData = function signData(data) {\n  return Object.assign({}, data, signedData);\n};\n\nvar isPlainTextNode = function isPlainTextNode(vnode) {\n  return vnode.children === undefined && vnode.data === undefined && vnode.key === undefined;\n};\n\nvar isSigned = function isSigned(vnode) {\n  return vnode.data ? vnode.data[signatureKey] === signature : isPlainTextNode(vnode);\n};\n\nvar removeSignatureFromData = function removeSignatureFromData(data) {\n  return Object.assign({}, data, _defineProperty({}, signatureKey, undefined));\n};\n\nvar isPrimitive = function isPrimitive(a) {\n  return ['string', 'number'].includes(_typeof(a));\n};\n\nvar signingH = function signingH(defaultH) {\n  return function (sel, b, c) {\n    if (c !== undefined) {\n      // a - sel, b - data, c - primitive/child/children\n      return defaultH(sel, signData(b), c);\n    } else if (b === undefined) {\n      // a - sel\n      return defaultH(sel, signedData);\n    } else if (Array.isArray(b) || b.sel || isPrimitive(b)) {\n      // a - sel, b - primitive/child/children\n      return defaultH(sel, signedData, b);\n    } else {\n      // a - sel, b - data\n      return defaultH(sel, signData(b));\n    }\n  };\n};\n\nexports.signingH = signingH;\n\nvar denyUnlessSignedHook = function denyUnlessSignedHook(oldVnode, vnode) {\n  if (!isSigned(vnode)) {\n    throw new Error('Patching with a vnode which is not correctly signed!');\n  }\n};\n\nvar denyUnlessSigned = {\n  create: denyUnlessSignedHook,\n  update: denyUnlessSignedHook\n};\nexports.denyUnlessSigned = denyUnlessSigned;\n\nvar processDataRecursively = function processDataRecursively(checkIfValidVnode, dataProcessFn) {\n  var fn = function fn(tree) {\n    checkIfValidVnode(tree);\n    var data = dataProcessFn(tree.data);\n    var children = tree.children ? tree.children.map(fn) : undefined;\n    return Object.assign({}, tree, {\n      data: data,\n      children: children\n    });\n  };\n\n  return fn;\n};\n\nvar removeSignature = processDataRecursively(function (vnode) {\n  if (!isSigned(vnode)) {\n    throw new Error('Unable to remove the signature, because the vnode is not signed.');\n  }\n}, removeSignatureFromData);\nexports.removeSignature = removeSignature;\nvar sign = processDataRecursively(function () {}, signData);\nexports.sign = sign;", "/**\n * Expose `pathToRegexp`.\n */\nmodule.exports = pathToRegexp\nmodule.exports.match = match\nmodule.exports.regexpToFunction = regexpToFunction\nmodule.exports.parse = parse\nmodule.exports.compile = compile\nmodule.exports.tokensToFunction = tokensToFunction\nmodule.exports.tokensToRegExp = tokensToRegExp\n\n/**\n * Default configs.\n */\nvar DEFAULT_DELIMITER = '/'\n\n/**\n * The main path matching regexp utility.\n *\n * @type {RegExp}\n */\nvar PATH_REGEXP = new RegExp([\n  // Match escaped characters that would otherwise appear in future matches.\n  // This allows the user to escape special characters that won't transform.\n  '(\\\\\\\\.)',\n  // Match Express-style parameters and un-named parameters with a prefix\n  // and optional suffixes. Matches appear as:\n  //\n  // \":test(\\\\d+)?\" => [\"test\", \"\\d+\", undefined, \"?\"]\n  // \"(\\\\d+)\"  => [undefined, undefined, \"\\d+\", undefined]\n  '(?:\\\\:(\\\\w+)(?:\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))?|\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))([+*?])?'\n].join('|'), 'g')\n\n/**\n * Parse a string for the raw tokens.\n *\n * @param  {string}  str\n * @param  {Object=} options\n * @return {!Array}\n */\nfunction parse (str, options) {\n  var tokens = []\n  var key = 0\n  var index = 0\n  var path = ''\n  var defaultDelimiter = (options && options.delimiter) || DEFAULT_DELIMITER\n  var whitelist = (options && options.whitelist) || undefined\n  var pathEscaped = false\n  var res\n\n  while ((res = PATH_REGEXP.exec(str)) !== null) {\n    var m = res[0]\n    var escaped = res[1]\n    var offset = res.index\n    path += str.slice(index, offset)\n    index = offset + m.length\n\n    // Ignore already escaped sequences.\n    if (escaped) {\n      path += escaped[1]\n      pathEscaped = true\n      continue\n    }\n\n    var prev = ''\n    var name = res[2]\n    var capture = res[3]\n    var group = res[4]\n    var modifier = res[5]\n\n    if (!pathEscaped && path.length) {\n      var k = path.length - 1\n      var c = path[k]\n      var matches = whitelist ? whitelist.indexOf(c) > -1 : true\n\n      if (matches) {\n        prev = c\n        path = path.slice(0, k)\n      }\n    }\n\n    // Push the current path onto the tokens.\n    if (path) {\n      tokens.push(path)\n      path = ''\n      pathEscaped = false\n    }\n\n    var repeat = modifier === '+' || modifier === '*'\n    var optional = modifier === '?' || modifier === '*'\n    var pattern = capture || group\n    var delimiter = prev || defaultDelimiter\n    var prevText = prev || (typeof tokens[tokens.length - 1] === 'string' ? tokens[tokens.length - 1] : '')\n\n    tokens.push({\n      name: name || key++,\n      prefix: prev,\n      delimiter: delimiter,\n      optional: optional,\n      repeat: repeat,\n      pattern: pattern\n        ? escapeGroup(pattern)\n        : restrictBacktrack(delimiter, defaultDelimiter, prevText)\n    })\n  }\n\n  // Push any remaining characters.\n  if (path || index < str.length) {\n    tokens.push(path + str.substr(index))\n  }\n\n  return tokens\n}\n\nfunction restrictBacktrack (delimiter, defaultDelimiter, prevText) {\n  var charGroup = '[^' + escapeString(delimiter === defaultDelimiter ? delimiter : (delimiter + defaultDelimiter)) + ']'\n\n  if (!prevText || prevText.indexOf(delimiter) > -1 || prevText.indexOf(defaultDelimiter) > -1) {\n    return charGroup + '+?'\n  }\n\n  return escapeString(prevText) + '|(?:(?!' + escapeString(prevText) + ')' + charGroup + ')+?'\n}\n\n/**\n * Compile a string to a template function for the path.\n *\n * @param  {string}             str\n * @param  {Object=}            options\n * @return {!function(Object=, Object=)}\n */\nfunction compile (str, options) {\n  return tokensToFunction(parse(str, options), options)\n}\n\n/**\n * Create path match function from `path-to-regexp` spec.\n */\nfunction match (str, options) {\n  var keys = []\n  var re = pathToRegexp(str, keys, options)\n  return regexpToFunction(re, keys)\n}\n\n/**\n * Create a path match function from `path-to-regexp` output.\n */\nfunction regexpToFunction (re, keys) {\n  return function (pathname, options) {\n    var m = re.exec(pathname)\n    if (!m) return false\n\n    var path = m[0]\n    var index = m.index\n    var params = {}\n    var decode = (options && options.decode) || decodeURIComponent\n\n    for (var i = 1; i < m.length; i++) {\n      if (m[i] === undefined) continue\n\n      var key = keys[i - 1]\n\n      if (key.repeat) {\n        params[key.name] = m[i].split(key.delimiter).map(function (value) {\n          return decode(value, key)\n        })\n      } else {\n        params[key.name] = decode(m[i], key)\n      }\n    }\n\n    return { path: path, index: index, params: params }\n  }\n}\n\n/**\n * Expose a method for transforming tokens into the path function.\n */\nfunction tokensToFunction (tokens, options) {\n  // Compile all the tokens into regexps.\n  var matches = new Array(tokens.length)\n\n  // Compile all the patterns before compilation.\n  for (var i = 0; i < tokens.length; i++) {\n    if (typeof tokens[i] === 'object') {\n      matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$', flags(options))\n    }\n  }\n\n  return function (data, options) {\n    var path = ''\n    var encode = (options && options.encode) || encodeURIComponent\n    var validate = options ? options.validate !== false : true\n\n    for (var i = 0; i < tokens.length; i++) {\n      var token = tokens[i]\n\n      if (typeof token === 'string') {\n        path += token\n        continue\n      }\n\n      var value = data ? data[token.name] : undefined\n      var segment\n\n      if (Array.isArray(value)) {\n        if (!token.repeat) {\n          throw new TypeError('Expected \"' + token.name + '\" to not repeat, but got array')\n        }\n\n        if (value.length === 0) {\n          if (token.optional) continue\n\n          throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n        }\n\n        for (var j = 0; j < value.length; j++) {\n          segment = encode(value[j], token)\n\n          if (validate && !matches[i].test(segment)) {\n            throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\"')\n          }\n\n          path += (j === 0 ? token.prefix : token.delimiter) + segment\n        }\n\n        continue\n      }\n\n      if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n        segment = encode(String(value), token)\n\n        if (validate && !matches[i].test(segment)) {\n          throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but got \"' + segment + '\"')\n        }\n\n        path += token.prefix + segment\n        continue\n      }\n\n      if (token.optional) continue\n\n      throw new TypeError('Expected \"' + token.name + '\" to be ' + (token.repeat ? 'an array' : 'a string'))\n    }\n\n    return path\n  }\n}\n\n/**\n * Escape a regular expression string.\n *\n * @param  {string} str\n * @return {string}\n */\nfunction escapeString (str) {\n  return str.replace(/([.+*?=^!:${}()[\\]|/\\\\])/g, '\\\\$1')\n}\n\n/**\n * Escape the capturing group by escaping special characters and meaning.\n *\n * @param  {string} group\n * @return {string}\n */\nfunction escapeGroup (group) {\n  return group.replace(/([=!:$/()])/g, '\\\\$1')\n}\n\n/**\n * Get the flags for a regexp from the options.\n *\n * @param  {Object} options\n * @return {string}\n */\nfunction flags (options) {\n  return options && options.sensitive ? '' : 'i'\n}\n\n/**\n * Pull out keys from a regexp.\n *\n * @param  {!RegExp} path\n * @param  {Array=}  keys\n * @return {!RegExp}\n */\nfunction regexpToRegexp (path, keys) {\n  if (!keys) return path\n\n  // Use a negative lookahead to match only capturing groups.\n  var groups = path.source.match(/\\((?!\\?)/g)\n\n  if (groups) {\n    for (var i = 0; i < groups.length; i++) {\n      keys.push({\n        name: i,\n        prefix: null,\n        delimiter: null,\n        optional: false,\n        repeat: false,\n        pattern: null\n      })\n    }\n  }\n\n  return path\n}\n\n/**\n * Transform an array into a regexp.\n *\n * @param  {!Array}  path\n * @param  {Array=}  keys\n * @param  {Object=} options\n * @return {!RegExp}\n */\nfunction arrayToRegexp (path, keys, options) {\n  var parts = []\n\n  for (var i = 0; i < path.length; i++) {\n    parts.push(pathToRegexp(path[i], keys, options).source)\n  }\n\n  return new RegExp('(?:' + parts.join('|') + ')', flags(options))\n}\n\n/**\n * Create a path regexp from string input.\n *\n * @param  {string}  path\n * @param  {Array=}  keys\n * @param  {Object=} options\n * @return {!RegExp}\n */\nfunction stringToRegexp (path, keys, options) {\n  return tokensToRegExp(parse(path, options), keys, options)\n}\n\n/**\n * Expose a function for taking tokens and returning a RegExp.\n *\n * @param  {!Array}  tokens\n * @param  {Array=}  keys\n * @param  {Object=} options\n * @return {!RegExp}\n */\nfunction tokensToRegExp (tokens, keys, options) {\n  options = options || {}\n\n  var strict = options.strict\n  var start = options.start !== false\n  var end = options.end !== false\n  var delimiter = options.delimiter || DEFAULT_DELIMITER\n  var endsWith = [].concat(options.endsWith || []).map(escapeString).concat('$').join('|')\n  var route = start ? '^' : ''\n\n  // Iterate over the tokens and create our regexp string.\n  for (var i = 0; i < tokens.length; i++) {\n    var token = tokens[i]\n\n    if (typeof token === 'string') {\n      route += escapeString(token)\n    } else {\n      var capture = token.repeat\n        ? '(?:' + token.pattern + ')(?:' + escapeString(token.delimiter) + '(?:' + token.pattern + '))*'\n        : token.pattern\n\n      if (keys) keys.push(token)\n\n      if (token.optional) {\n        if (!token.prefix) {\n          route += '(' + capture + ')?'\n        } else {\n          route += '(?:' + escapeString(token.prefix) + '(' + capture + '))?'\n        }\n      } else {\n        route += escapeString(token.prefix) + '(' + capture + ')'\n      }\n    }\n  }\n\n  if (end) {\n    if (!strict) route += '(?:' + escapeString(delimiter) + ')?'\n\n    route += endsWith === '$' ? '$' : '(?=' + endsWith + ')'\n  } else {\n    var endToken = tokens[tokens.length - 1]\n    var isEndDelimited = typeof endToken === 'string'\n      ? endToken[endToken.length - 1] === delimiter\n      : endToken === undefined\n\n    if (!strict) route += '(?:' + escapeString(delimiter) + '(?=' + endsWith + '))?'\n    if (!isEndDelimited) route += '(?=' + escapeString(delimiter) + '|' + endsWith + ')'\n  }\n\n  return new RegExp(route, flags(options))\n}\n\n/**\n * Normalize the given path string, returning a regular expression.\n *\n * An empty array can be passed in for the keys, which will hold the\n * placeholder key descriptions. For example, using `/user/:id`, `keys` will\n * contain `[{ name: 'id', delimiter: '/', optional: false, repeat: false }]`.\n *\n * @param  {(string|RegExp|Array)} path\n * @param  {Array=}                keys\n * @param  {Object=}               options\n * @return {!RegExp}\n */\nfunction pathToRegexp (path, keys, options) {\n  if (path instanceof RegExp) {\n    return regexpToRegexp(path, keys)\n  }\n\n  if (Array.isArray(path)) {\n    return arrayToRegexp(/** @type {!Array} */ (path), keys, options)\n  }\n\n  return stringToRegexp(/** @type {string} */ (path), keys, options)\n}\n", "/*!\n * mustache.js - Logic-less {{mustache}} templates with JavaScript\n * http://github.com/janl/mustache.js\n */\n\n/*global define: false Mustache: true*/\n\n(function defineMustache (global, factory) {\n  if (typeof exports === 'object' && exports && typeof exports.nodeName !== 'string') {\n    factory(exports); // CommonJS\n  } else if (typeof define === 'function' && define.amd) {\n    define(['exports'], factory); // AMD\n  } else {\n    global.Mustache = {};\n    factory(global.Mustache); // script, wsh, asp\n  }\n}(this, function mustacheFactory (mustache) {\n\n  var objectToString = Object.prototype.toString;\n  var isArray = Array.isArray || function isArrayPolyfill (object) {\n    return objectToString.call(object) === '[object Array]';\n  };\n\n  function isFunction (object) {\n    return typeof object === 'function';\n  }\n\n  /**\n   * More correct typeof string handling array\n   * which normally returns typeof 'object'\n   */\n  function typeStr (obj) {\n    return isArray(obj) ? 'array' : typeof obj;\n  }\n\n  function escapeRegExp (string) {\n    return string.replace(/[\\-\\[\\]{}()*+?.,\\\\\\^$|#\\s]/g, '\\\\$&');\n  }\n\n  /**\n   * Null safe way of checking whether or not an object,\n   * including its prototype, has a given property\n   */\n  function hasProperty (obj, propName) {\n    return obj != null && typeof obj === 'object' && (propName in obj);\n  }\n\n  /**\n   * Safe way of detecting whether or not the given thing is a primitive and\n   * whether it has the given property\n   */\n  function primitiveHasOwnProperty (primitive, propName) {  \n    return (\n      primitive != null\n      && typeof primitive !== 'object'\n      && primitive.hasOwnProperty\n      && primitive.hasOwnProperty(propName)\n    );\n  }\n\n  // Workaround for https://issues.apache.org/jira/browse/COUCHDB-577\n  // See https://github.com/janl/mustache.js/issues/189\n  var regExpTest = RegExp.prototype.test;\n  function testRegExp (re, string) {\n    return regExpTest.call(re, string);\n  }\n\n  var nonSpaceRe = /\\S/;\n  function isWhitespace (string) {\n    return !testRegExp(nonSpaceRe, string);\n  }\n\n  var entityMap = {\n    '&': '&amp;',\n    '<': '&lt;',\n    '>': '&gt;',\n    '\"': '&quot;',\n    \"'\": '&#39;',\n    '/': '&#x2F;',\n    '`': '&#x60;',\n    '=': '&#x3D;'\n  };\n\n  function escapeHtml (string) {\n    return String(string).replace(/[&<>\"'`=\\/]/g, function fromEntityMap (s) {\n      return entityMap[s];\n    });\n  }\n\n  var whiteRe = /\\s*/;\n  var spaceRe = /\\s+/;\n  var equalsRe = /\\s*=/;\n  var curlyRe = /\\s*\\}/;\n  var tagRe = /#|\\^|\\/|>|\\{|&|=|!/;\n\n  /**\n   * Breaks up the given `template` string into a tree of tokens. If the `tags`\n   * argument is given here it must be an array with two string values: the\n   * opening and closing tags used in the template (e.g. [ \"<%\", \"%>\" ]). Of\n   * course, the default is to use mustaches (i.e. mustache.tags).\n   *\n   * A token is an array with at least 4 elements. The first element is the\n   * mustache symbol that was used inside the tag, e.g. \"#\" or \"&\". If the tag\n   * did not contain a symbol (i.e. {{myValue}}) this element is \"name\". For\n   * all text that appears outside a symbol this element is \"text\".\n   *\n   * The second element of a token is its \"value\". For mustache tags this is\n   * whatever else was inside the tag besides the opening symbol. For text tokens\n   * this is the text itself.\n   *\n   * The third and fourth elements of the token are the start and end indices,\n   * respectively, of the token in the original template.\n   *\n   * Tokens that are the root node of a subtree contain two more elements: 1) an\n   * array of tokens in the subtree and 2) the index in the original template at\n   * which the closing tag for that section begins.\n   */\n  function parseTemplate (template, tags) {\n    if (!template)\n      return [];\n\n    var sections = [];     // Stack to hold section tokens\n    var tokens = [];       // Buffer to hold the tokens\n    var spaces = [];       // Indices of whitespace tokens on the current line\n    var hasTag = false;    // Is there a {{tag}} on the current line?\n    var nonSpace = false;  // Is there a non-space char on the current line?\n\n    // Strips all whitespace tokens array for the current line\n    // if there was a {{#tag}} on it and otherwise only space.\n    function stripSpace () {\n      if (hasTag && !nonSpace) {\n        while (spaces.length)\n          delete tokens[spaces.pop()];\n      } else {\n        spaces = [];\n      }\n\n      hasTag = false;\n      nonSpace = false;\n    }\n\n    var openingTagRe, closingTagRe, closingCurlyRe;\n    function compileTags (tagsToCompile) {\n      if (typeof tagsToCompile === 'string')\n        tagsToCompile = tagsToCompile.split(spaceRe, 2);\n\n      if (!isArray(tagsToCompile) || tagsToCompile.length !== 2)\n        throw new Error('Invalid tags: ' + tagsToCompile);\n\n      openingTagRe = new RegExp(escapeRegExp(tagsToCompile[0]) + '\\\\s*');\n      closingTagRe = new RegExp('\\\\s*' + escapeRegExp(tagsToCompile[1]));\n      closingCurlyRe = new RegExp('\\\\s*' + escapeRegExp('}' + tagsToCompile[1]));\n    }\n\n    compileTags(tags || mustache.tags);\n\n    var scanner = new Scanner(template);\n\n    var start, type, value, chr, token, openSection;\n    while (!scanner.eos()) {\n      start = scanner.pos;\n\n      // Match any text between tags.\n      value = scanner.scanUntil(openingTagRe);\n\n      if (value) {\n        for (var i = 0, valueLength = value.length; i < valueLength; ++i) {\n          chr = value.charAt(i);\n\n          if (isWhitespace(chr)) {\n            spaces.push(tokens.length);\n          } else {\n            nonSpace = true;\n          }\n\n          tokens.push([ 'text', chr, start, start + 1 ]);\n          start += 1;\n\n          // Check for whitespace on the current line.\n          if (chr === '\\n')\n            stripSpace();\n        }\n      }\n\n      // Match the opening tag.\n      if (!scanner.scan(openingTagRe))\n        break;\n\n      hasTag = true;\n\n      // Get the tag type.\n      type = scanner.scan(tagRe) || 'name';\n      scanner.scan(whiteRe);\n\n      // Get the tag value.\n      if (type === '=') {\n        value = scanner.scanUntil(equalsRe);\n        scanner.scan(equalsRe);\n        scanner.scanUntil(closingTagRe);\n      } else if (type === '{') {\n        value = scanner.scanUntil(closingCurlyRe);\n        scanner.scan(curlyRe);\n        scanner.scanUntil(closingTagRe);\n        type = '&';\n      } else {\n        value = scanner.scanUntil(closingTagRe);\n      }\n\n      // Match the closing tag.\n      if (!scanner.scan(closingTagRe))\n        throw new Error('Unclosed tag at ' + scanner.pos);\n\n      token = [ type, value, start, scanner.pos ];\n      tokens.push(token);\n\n      if (type === '#' || type === '^') {\n        sections.push(token);\n      } else if (type === '/') {\n        // Check section nesting.\n        openSection = sections.pop();\n\n        if (!openSection)\n          throw new Error('Unopened section \"' + value + '\" at ' + start);\n\n        if (openSection[1] !== value)\n          throw new Error('Unclosed section \"' + openSection[1] + '\" at ' + start);\n      } else if (type === 'name' || type === '{' || type === '&') {\n        nonSpace = true;\n      } else if (type === '=') {\n        // Set the tags for the next time around.\n        compileTags(value);\n      }\n    }\n\n    // Make sure there are no open sections when we're done.\n    openSection = sections.pop();\n\n    if (openSection)\n      throw new Error('Unclosed section \"' + openSection[1] + '\" at ' + scanner.pos);\n\n    return nestTokens(squashTokens(tokens));\n  }\n\n  /**\n   * Combines the values of consecutive text tokens in the given `tokens` array\n   * to a single token.\n   */\n  function squashTokens (tokens) {\n    var squashedTokens = [];\n\n    var token, lastToken;\n    for (var i = 0, numTokens = tokens.length; i < numTokens; ++i) {\n      token = tokens[i];\n\n      if (token) {\n        if (token[0] === 'text' && lastToken && lastToken[0] === 'text') {\n          lastToken[1] += token[1];\n          lastToken[3] = token[3];\n        } else {\n          squashedTokens.push(token);\n          lastToken = token;\n        }\n      }\n    }\n\n    return squashedTokens;\n  }\n\n  /**\n   * Forms the given array of `tokens` into a nested tree structure where\n   * tokens that represent a section have two additional items: 1) an array of\n   * all tokens that appear in that section and 2) the index in the original\n   * template that represents the end of that section.\n   */\n  function nestTokens (tokens) {\n    var nestedTokens = [];\n    var collector = nestedTokens;\n    var sections = [];\n\n    var token, section;\n    for (var i = 0, numTokens = tokens.length; i < numTokens; ++i) {\n      token = tokens[i];\n\n      switch (token[0]) {\n        case '#':\n        case '^':\n          collector.push(token);\n          sections.push(token);\n          collector = token[4] = [];\n          break;\n        case '/':\n          section = sections.pop();\n          section[5] = token[2];\n          collector = sections.length > 0 ? sections[sections.length - 1][4] : nestedTokens;\n          break;\n        default:\n          collector.push(token);\n      }\n    }\n\n    return nestedTokens;\n  }\n\n  /**\n   * A simple string scanner that is used by the template parser to find\n   * tokens in template strings.\n   */\n  function Scanner (string) {\n    this.string = string;\n    this.tail = string;\n    this.pos = 0;\n  }\n\n  /**\n   * Returns `true` if the tail is empty (end of string).\n   */\n  Scanner.prototype.eos = function eos () {\n    return this.tail === '';\n  };\n\n  /**\n   * Tries to match the given regular expression at the current position.\n   * Returns the matched text if it can match, the empty string otherwise.\n   */\n  Scanner.prototype.scan = function scan (re) {\n    var match = this.tail.match(re);\n\n    if (!match || match.index !== 0)\n      return '';\n\n    var string = match[0];\n\n    this.tail = this.tail.substring(string.length);\n    this.pos += string.length;\n\n    return string;\n  };\n\n  /**\n   * Skips all text until the given regular expression can be matched. Returns\n   * the skipped string, which is the entire tail if no match can be made.\n   */\n  Scanner.prototype.scanUntil = function scanUntil (re) {\n    var index = this.tail.search(re), match;\n\n    switch (index) {\n      case -1:\n        match = this.tail;\n        this.tail = '';\n        break;\n      case 0:\n        match = '';\n        break;\n      default:\n        match = this.tail.substring(0, index);\n        this.tail = this.tail.substring(index);\n    }\n\n    this.pos += match.length;\n\n    return match;\n  };\n\n  /**\n   * Represents a rendering context by wrapping a view object and\n   * maintaining a reference to the parent context.\n   */\n  function Context (view, parentContext) {\n    this.view = view;\n    this.cache = { '.': this.view };\n    this.parent = parentContext;\n  }\n\n  /**\n   * Creates a new context using the given view with this context\n   * as the parent.\n   */\n  Context.prototype.push = function push (view) {\n    return new Context(view, this);\n  };\n\n  /**\n   * Returns the value of the given name in this context, traversing\n   * up the context hierarchy if the value is absent in this context's view.\n   */\n  Context.prototype.lookup = function lookup (name) {\n    var cache = this.cache;\n\n    var value;\n    if (cache.hasOwnProperty(name)) {\n      value = cache[name];\n    } else {\n      var context = this, intermediateValue, names, index, lookupHit = false;\n\n      while (context) {\n        if (name.indexOf('.') > 0) {\n          intermediateValue = context.view;\n          names = name.split('.');\n          index = 0;\n\n          /**\n           * Using the dot notion path in `name`, we descend through the\n           * nested objects.\n           *\n           * To be certain that the lookup has been successful, we have to\n           * check if the last object in the path actually has the property\n           * we are looking for. We store the result in `lookupHit`.\n           *\n           * This is specially necessary for when the value has been set to\n           * `undefined` and we want to avoid looking up parent contexts.\n           *\n           * In the case where dot notation is used, we consider the lookup\n           * to be successful even if the last \"object\" in the path is\n           * not actually an object but a primitive (e.g., a string, or an\n           * integer), because it is sometimes useful to access a property\n           * of an autoboxed primitive, such as the length of a string.\n           **/\n          while (intermediateValue != null && index < names.length) {\n            if (index === names.length - 1)\n              lookupHit = (\n                hasProperty(intermediateValue, names[index]) \n                || primitiveHasOwnProperty(intermediateValue, names[index])\n              );\n\n            intermediateValue = intermediateValue[names[index++]];\n          }\n        } else {\n          intermediateValue = context.view[name];\n\n          /**\n           * Only checking against `hasProperty`, which always returns `false` if\n           * `context.view` is not an object. Deliberately omitting the check\n           * against `primitiveHasOwnProperty` if dot notation is not used.\n           *\n           * Consider this example:\n           * ```\n           * Mustache.render(\"The length of a football field is {{#length}}{{length}}{{/length}}.\", {length: \"100 yards\"})\n           * ```\n           *\n           * If we were to check also against `primitiveHasOwnProperty`, as we do\n           * in the dot notation case, then render call would return:\n           *\n           * \"The length of a football field is 9.\"\n           *\n           * rather than the expected:\n           *\n           * \"The length of a football field is 100 yards.\"\n           **/\n          lookupHit = hasProperty(context.view, name);\n        }\n\n        if (lookupHit) {\n          value = intermediateValue;\n          break;\n        }\n\n        context = context.parent;\n      }\n\n      cache[name] = value;\n    }\n\n    if (isFunction(value))\n      value = value.call(this.view);\n\n    return value;\n  };\n\n  /**\n   * A Writer knows how to take a stream of tokens and render them to a\n   * string, given a context. It also maintains a cache of templates to\n   * avoid the need to parse the same template twice.\n   */\n  function Writer () {\n    this.cache = {};\n  }\n\n  /**\n   * Clears all cached templates in this writer.\n   */\n  Writer.prototype.clearCache = function clearCache () {\n    this.cache = {};\n  };\n\n  /**\n   * Parses and caches the given `template` according to the given `tags` or\n   * `mustache.tags` if `tags` is omitted,  and returns the array of tokens\n   * that is generated from the parse.\n   */\n  Writer.prototype.parse = function parse (template, tags) {\n    var cache = this.cache;\n    var cacheKey = template + ':' + (tags || mustache.tags).join(':');\n    var tokens = cache[cacheKey];\n\n    if (tokens == null)\n      tokens = cache[cacheKey] = parseTemplate(template, tags);\n\n    return tokens;\n  };\n\n  /**\n   * High-level method that is used to render the given `template` with\n   * the given `view`.\n   *\n   * The optional `partials` argument may be an object that contains the\n   * names and templates of partials that are used in the template. It may\n   * also be a function that is used to load partial templates on the fly\n   * that takes a single argument: the name of the partial.\n   *\n   * If the optional `tags` argument is given here it must be an array with two\n   * string values: the opening and closing tags used in the template (e.g.\n   * [ \"<%\", \"%>\" ]). The default is to mustache.tags.\n   */\n  Writer.prototype.render = function render (template, view, partials, tags) {\n    var tokens = this.parse(template, tags);\n    var context = (view instanceof Context) ? view : new Context(view);\n    return this.renderTokens(tokens, context, partials, template);\n  };\n\n  /**\n   * Low-level method that renders the given array of `tokens` using\n   * the given `context` and `partials`.\n   *\n   * Note: The `originalTemplate` is only ever used to extract the portion\n   * of the original template that was contained in a higher-order section.\n   * If the template doesn't use higher-order sections, this argument may\n   * be omitted.\n   */\n  Writer.prototype.renderTokens = function renderTokens (tokens, context, partials, originalTemplate) {\n    var buffer = '';\n\n    var token, symbol, value;\n    for (var i = 0, numTokens = tokens.length; i < numTokens; ++i) {\n      value = undefined;\n      token = tokens[i];\n      symbol = token[0];\n\n      if (symbol === '#') value = this.renderSection(token, context, partials, originalTemplate);\n      else if (symbol === '^') value = this.renderInverted(token, context, partials, originalTemplate);\n      else if (symbol === '>') value = this.renderPartial(token, context, partials, originalTemplate);\n      else if (symbol === '&') value = this.unescapedValue(token, context);\n      else if (symbol === 'name') value = this.escapedValue(token, context);\n      else if (symbol === 'text') value = this.rawValue(token);\n\n      if (value !== undefined)\n        buffer += value;\n    }\n\n    return buffer;\n  };\n\n  Writer.prototype.renderSection = function renderSection (token, context, partials, originalTemplate) {\n    var self = this;\n    var buffer = '';\n    var value = context.lookup(token[1]);\n\n    // This function is used to render an arbitrary template\n    // in the current context by higher-order sections.\n    function subRender (template) {\n      return self.render(template, context, partials);\n    }\n\n    if (!value) return;\n\n    if (isArray(value)) {\n      for (var j = 0, valueLength = value.length; j < valueLength; ++j) {\n        buffer += this.renderTokens(token[4], context.push(value[j]), partials, originalTemplate);\n      }\n    } else if (typeof value === 'object' || typeof value === 'string' || typeof value === 'number') {\n      buffer += this.renderTokens(token[4], context.push(value), partials, originalTemplate);\n    } else if (isFunction(value)) {\n      if (typeof originalTemplate !== 'string')\n        throw new Error('Cannot use higher-order sections without the original template');\n\n      // Extract the portion of the original template that the section contains.\n      value = value.call(context.view, originalTemplate.slice(token[3], token[5]), subRender);\n\n      if (value != null)\n        buffer += value;\n    } else {\n      buffer += this.renderTokens(token[4], context, partials, originalTemplate);\n    }\n    return buffer;\n  };\n\n  Writer.prototype.renderInverted = function renderInverted (token, context, partials, originalTemplate) {\n    var value = context.lookup(token[1]);\n\n    // Use JavaScript's definition of falsy. Include empty arrays.\n    // See https://github.com/janl/mustache.js/issues/186\n    if (!value || (isArray(value) && value.length === 0))\n      return this.renderTokens(token[4], context, partials, originalTemplate);\n  };\n\n  Writer.prototype.renderPartial = function renderPartial (token, context, partials) {\n    if (!partials) return;\n\n    var value = isFunction(partials) ? partials(token[1]) : partials[token[1]];\n    if (value != null)\n      return this.renderTokens(this.parse(value), context, partials, value);\n  };\n\n  Writer.prototype.unescapedValue = function unescapedValue (token, context) {\n    var value = context.lookup(token[1]);\n    if (value != null)\n      return value;\n  };\n\n  Writer.prototype.escapedValue = function escapedValue (token, context) {\n    var value = context.lookup(token[1]);\n    if (value != null)\n      return mustache.escape(value);\n  };\n\n  Writer.prototype.rawValue = function rawValue (token) {\n    return token[1];\n  };\n\n  mustache.name = 'mustache.js';\n  mustache.version = '3.0.0';\n  mustache.tags = [ '{{', '}}' ];\n\n  // All high-level mustache.* functions use this writer.\n  var defaultWriter = new Writer();\n\n  /**\n   * Clears all cached templates in the default writer.\n   */\n  mustache.clearCache = function clearCache () {\n    return defaultWriter.clearCache();\n  };\n\n  /**\n   * Parses and caches the given template in the default writer and returns the\n   * array of tokens it contains. Doing this ahead of time avoids the need to\n   * parse templates on the fly as they are rendered.\n   */\n  mustache.parse = function parse (template, tags) {\n    return defaultWriter.parse(template, tags);\n  };\n\n  /**\n   * Renders the `template` with the given `view` and `partials` using the\n   * default writer. If the optional `tags` argument is given here it must be an\n   * array with two string values: the opening and closing tags used in the\n   * template (e.g. [ \"<%\", \"%>\" ]). The default is to mustache.tags.\n   */\n  mustache.render = function render (template, view, partials, tags) {\n    if (typeof template !== 'string') {\n      throw new TypeError('Invalid template! Template should be a \"string\" ' +\n                          'but \"' + typeStr(template) + '\" was given as the first ' +\n                          'argument for mustache#render(template, view, partials)');\n    }\n\n    return defaultWriter.render(template, view, partials, tags);\n  };\n\n  // This is here for backwards compatibility with 0.4.x.,\n  /*eslint-disable */ // eslint wants camel cased function name\n  mustache.to_html = function to_html (template, view, partials, send) {\n    /*eslint-enable*/\n\n    var result = mustache.render(template, view, partials);\n\n    if (isFunction(send)) {\n      send(result);\n    } else {\n      return result;\n    }\n  };\n\n  // Export the escaping function so that the user may override it.\n  // See https://github.com/janl/mustache.js/issues/244\n  mustache.escape = escapeHtml;\n\n  // Export these mainly for testing, but also for advanced usage.\n  mustache.Scanner = Scanner;\n  mustache.Context = Context;\n  mustache.Writer = Writer;\n\n  return mustache;\n}));\n", "var nargs = /\\{([0-9a-zA-Z_]+)\\}/g\n\nmodule.exports = template\n\nfunction template(string) {\n    var args\n\n    if (arguments.length === 2 && typeof arguments[1] === \"object\") {\n        args = arguments[1]\n    } else {\n        args = new Array(arguments.length - 1)\n        for (var i = 1; i < arguments.length; ++i) {\n            args[i - 1] = arguments[i]\n        }\n    }\n\n    if (!args || !args.hasOwnProperty) {\n        args = {}\n    }\n\n    return string.replace(nargs, function replaceArg(match, i, index) {\n        var result\n\n        if (string[index - 1] === \"{\" &&\n            string[index + match.length] === \"}\") {\n            return i\n        } else {\n            result = args.hasOwnProperty(i) ? args[i] : null\n            if (result === null || result === undefined) {\n                return \"\"\n            }\n\n            return result\n        }\n    })\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", "/** @license React v16.14.0\n * react.production.min.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';var l=require(\"object-assign\"),n=\"function\"===typeof Symbol&&Symbol.for,p=n?Symbol.for(\"react.element\"):60103,q=n?Symbol.for(\"react.portal\"):60106,r=n?Symbol.for(\"react.fragment\"):60107,t=n?Symbol.for(\"react.strict_mode\"):60108,u=n?Symbol.for(\"react.profiler\"):60114,v=n?Symbol.for(\"react.provider\"):60109,w=n?Symbol.for(\"react.context\"):60110,x=n?Symbol.for(\"react.forward_ref\"):60112,y=n?Symbol.for(\"react.suspense\"):60113,z=n?Symbol.for(\"react.memo\"):60115,A=n?Symbol.for(\"react.lazy\"):\n60116,B=\"function\"===typeof Symbol&&Symbol.iterator;function C(a){for(var b=\"https://reactjs.org/docs/error-decoder.html?invariant=\"+a,c=1;c<arguments.length;c++)b+=\"&args[]=\"+encodeURIComponent(arguments[c]);return\"Minified React error #\"+a+\"; visit \"+b+\" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.\"}\nvar D={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E={};function F(a,b,c){this.props=a;this.context=b;this.refs=E;this.updater=c||D}F.prototype.isReactComponent={};F.prototype.setState=function(a,b){if(\"object\"!==typeof a&&\"function\"!==typeof a&&null!=a)throw Error(C(85));this.updater.enqueueSetState(this,a,b,\"setState\")};F.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,\"forceUpdate\")};\nfunction G(){}G.prototype=F.prototype;function H(a,b,c){this.props=a;this.context=b;this.refs=E;this.updater=c||D}var I=H.prototype=new G;I.constructor=H;l(I,F.prototype);I.isPureReactComponent=!0;var J={current:null},K=Object.prototype.hasOwnProperty,L={key:!0,ref:!0,__self:!0,__source:!0};\nfunction M(a,b,c){var e,d={},g=null,k=null;if(null!=b)for(e in void 0!==b.ref&&(k=b.ref),void 0!==b.key&&(g=\"\"+b.key),b)K.call(b,e)&&!L.hasOwnProperty(e)&&(d[e]=b[e]);var f=arguments.length-2;if(1===f)d.children=c;else if(1<f){for(var h=Array(f),m=0;m<f;m++)h[m]=arguments[m+2];d.children=h}if(a&&a.defaultProps)for(e in f=a.defaultProps,f)void 0===d[e]&&(d[e]=f[e]);return{$$typeof:p,type:a,key:g,ref:k,props:d,_owner:J.current}}\nfunction N(a,b){return{$$typeof:p,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}}function O(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===p}function escape(a){var b={\"=\":\"=0\",\":\":\"=2\"};return\"$\"+(\"\"+a).replace(/[=:]/g,function(a){return b[a]})}var P=/\\/+/g,Q=[];function R(a,b,c,e){if(Q.length){var d=Q.pop();d.result=a;d.keyPrefix=b;d.func=c;d.context=e;d.count=0;return d}return{result:a,keyPrefix:b,func:c,context:e,count:0}}\nfunction S(a){a.result=null;a.keyPrefix=null;a.func=null;a.context=null;a.count=0;10>Q.length&&Q.push(a)}\nfunction T(a,b,c,e){var d=typeof a;if(\"undefined\"===d||\"boolean\"===d)a=null;var g=!1;if(null===a)g=!0;else switch(d){case \"string\":case \"number\":g=!0;break;case \"object\":switch(a.$$typeof){case p:case q:g=!0}}if(g)return c(e,a,\"\"===b?\".\"+U(a,0):b),1;g=0;b=\"\"===b?\".\":b+\":\";if(Array.isArray(a))for(var k=0;k<a.length;k++){d=a[k];var f=b+U(d,k);g+=T(d,f,c,e)}else if(null===a||\"object\"!==typeof a?f=null:(f=B&&a[B]||a[\"@@iterator\"],f=\"function\"===typeof f?f:null),\"function\"===typeof f)for(a=f.call(a),k=\n0;!(d=a.next()).done;)d=d.value,f=b+U(d,k++),g+=T(d,f,c,e);else if(\"object\"===d)throw c=\"\"+a,Error(C(31,\"[object Object]\"===c?\"object with keys {\"+Object.keys(a).join(\", \")+\"}\":c,\"\"));return g}function V(a,b,c){return null==a?0:T(a,\"\",b,c)}function U(a,b){return\"object\"===typeof a&&null!==a&&null!=a.key?escape(a.key):b.toString(36)}function W(a,b){a.func.call(a.context,b,a.count++)}\nfunction aa(a,b,c){var e=a.result,d=a.keyPrefix;a=a.func.call(a.context,b,a.count++);Array.isArray(a)?X(a,e,c,function(a){return a}):null!=a&&(O(a)&&(a=N(a,d+(!a.key||b&&b.key===a.key?\"\":(\"\"+a.key).replace(P,\"$&/\")+\"/\")+c)),e.push(a))}function X(a,b,c,e,d){var g=\"\";null!=c&&(g=(\"\"+c).replace(P,\"$&/\")+\"/\");b=R(b,g,e,d);V(a,aa,b);S(b)}var Y={current:null};function Z(){var a=Y.current;if(null===a)throw Error(C(321));return a}\nvar ba={ReactCurrentDispatcher:Y,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:J,IsSomeRendererActing:{current:!1},assign:l};exports.Children={map:function(a,b,c){if(null==a)return a;var e=[];X(a,e,null,b,c);return e},forEach:function(a,b,c){if(null==a)return a;b=R(null,null,b,c);V(a,W,b);S(b)},count:function(a){return V(a,function(){return null},null)},toArray:function(a){var b=[];X(a,b,null,function(a){return a});return b},only:function(a){if(!O(a))throw Error(C(143));return a}};\nexports.Component=F;exports.Fragment=r;exports.Profiler=u;exports.PureComponent=H;exports.StrictMode=t;exports.Suspense=y;exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ba;\nexports.cloneElement=function(a,b,c){if(null===a||void 0===a)throw Error(C(267,a));var e=l({},a.props),d=a.key,g=a.ref,k=a._owner;if(null!=b){void 0!==b.ref&&(g=b.ref,k=J.current);void 0!==b.key&&(d=\"\"+b.key);if(a.type&&a.type.defaultProps)var f=a.type.defaultProps;for(h in b)K.call(b,h)&&!L.hasOwnProperty(h)&&(e[h]=void 0===b[h]&&void 0!==f?f[h]:b[h])}var h=arguments.length-2;if(1===h)e.children=c;else if(1<h){f=Array(h);for(var m=0;m<h;m++)f[m]=arguments[m+2];e.children=f}return{$$typeof:p,type:a.type,\nkey:d,ref:g,props:e,_owner:k}};exports.createContext=function(a,b){void 0===b&&(b=null);a={$$typeof:w,_calculateChangedBits:b,_currentValue:a,_currentValue2:a,_threadCount:0,Provider:null,Consumer:null};a.Provider={$$typeof:v,_context:a};return a.Consumer=a};exports.createElement=M;exports.createFactory=function(a){var b=M.bind(null,a);b.type=a;return b};exports.createRef=function(){return{current:null}};exports.forwardRef=function(a){return{$$typeof:x,render:a}};exports.isValidElement=O;\nexports.lazy=function(a){return{$$typeof:A,_ctor:a,_status:-1,_result:null}};exports.memo=function(a,b){return{$$typeof:z,type:a,compare:void 0===b?null:b}};exports.useCallback=function(a,b){return Z().useCallback(a,b)};exports.useContext=function(a,b){return Z().useContext(a,b)};exports.useDebugValue=function(){};exports.useEffect=function(a,b){return Z().useEffect(a,b)};exports.useImperativeHandle=function(a,b,c){return Z().useImperativeHandle(a,b,c)};\nexports.useLayoutEffect=function(a,b){return Z().useLayoutEffect(a,b)};exports.useMemo=function(a,b){return Z().useMemo(a,b)};exports.useReducer=function(a,b,c){return Z().useReducer(a,b,c)};exports.useRef=function(a){return Z().useRef(a)};exports.useState=function(a){return Z().useState(a)};exports.version=\"16.14.0\";\n", "'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n  module.exports = require('./cjs/react.production.min.js');\n} else {\n  module.exports = require('./cjs/react.development.js');\n}\n", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = camelCase;\nfunction camelCase(str) {\n  return str.replace(/[-_]+/g, ' ').replace(/[^\\w\\s]/g, '').replace(/ (.)/g, function ($1) {\n    return $1.toUpperCase();\n  }).replace(/ /g, '').replace(/^./g, function ($1) {\n    return $1.toLowerCase();\n  });\n}", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.MAPPED_TO_PROPS = exports.ATTRIBUTES = void 0;\nvar ATTRIBUTES = exports.ATTRIBUTES = ['component-id', 'listen-to', 'path', 'context', 'context-modifier', 'key', 'dangerouslySetInnerHTML', 'suppressContentEditableWarning', 'suppressHydrationWarning', 'alt', 'async', 'autocomplete', 'autofocus', 'autoplay', 'capture', 'checked', 'default', 'defer', 'disabled', 'draggable', 'dropzone', 'hidden', 'href', 'hreflang', 'http-equiv', 'icon', 'id', 'is', 'maxlength', 'minlength', 'media', 'method', 'multiple', 'name', 'placeholder', 'readonly', 'rel', 'required', 'reversed', 'role', 'rows', 'rowspan', 'selected', 'slot', 'src', 'tabindex', 'target', 'title', 'type', 'value'];\nvar MAPPED_TO_PROPS = exports.MAPPED_TO_PROPS = ['value'];", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = ariaRefHelpers;\nfunction _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _iterableToArray(r) { if (\"undefined\" != typeof Symbol && null != r[Symbol.iterator] || null != r[\"@@iterator\"]) return Array.from(r); }\nfunction _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }\nfunction _createForOfIteratorHelper(r, e) { var t = \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && \"number\" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }\nfunction _unsupportedIterableToArray(r, a) { if (r) { if (\"string\" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }\nfunction _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }\nvar x = 2147483648;\nvar baseId = Math.floor(Math.random() * x).toString(36) + Math.abs(Math.floor(Math.random() * x) ^ Date.now()).toString(36);\nvar count = 0;\nfunction guid() {\n  count = count + 1;\n  return \"\".concat(baseId, \"-\").concat(count);\n}\nvar callAsync = Promise.resolve().then.bind(Promise.resolve());\nvar shadowRootToSharedAccessibilityTargets = new Map();\nvar shadowRootToAccessibilityTargetsItemsQueue = new Map();\nvar shadowRootToAriaRefs = new Map();\nvar shadowRootToAriaRefsQueue = new Map();\nfunction ariaRefHelpers(name, props) {\n  if (typeof name !== 'string') {\n    return {\n      handleAriaAccessibility: function handleAriaAccessibility() {},\n      ariaSetVnode: function ariaSetVnode() {},\n      requiresRef: false\n    };\n  }\n  /**\n   * Array<{\n   *   targetRef: AriaRef,\n   *   id: string,\n   *   ariaAttribute: string,\n   *   callback?: (targetRef: AriaRef) => {},\n   *   currentClone?: Element,\n   *   element?: Element\n   * }>\n   */\n  var accessibilityTargets = [];\n  if (typeof name === 'string') {\n    for (var propName in props) {\n      if (propName.startsWith('aria-') && props[propName] && typeof props[propName].subscribe === 'function') {\n        var id = \"a\".concat(guid());\n        var targetRef = props[propName];\n        props[propName] = id;\n        accessibilityTargets.push({\n          targetRef: targetRef,\n          id: id,\n          ariaAttribute: propName\n        });\n      }\n    }\n  }\n  var ariaRef;\n  if (props && props['now-aria-ref']) {\n    ariaRef = props['now-aria-ref'];\n    delete props['now-aria-ref'];\n  }\n  function createAriaRefHierarchy(node) {\n    if (!node) {\n      ariaRef.setCurrent(node);\n      return;\n    }\n    var ariaRefShadowRoot = node.getRootNode();\n    var ariaRefAssignments = shadowRootToAriaRefs.get(ariaRefShadowRoot);\n    if (!ariaRefAssignments) {\n      ariaRefAssignments = [];\n      shadowRootToAriaRefs.set(ariaRefShadowRoot, ariaRefAssignments);\n    }\n    ariaRefAssignments.push({\n      ariaRef: ariaRef,\n      element: node\n    });\n    callAsync(function () {\n      var ariaRefsQueue = shadowRootToAriaRefsQueue.get(ariaRefShadowRoot);\n      if (!ariaRefsQueue) {\n        ariaRefsQueue = [];\n        shadowRootToAriaRefsQueue.set(ariaRefShadowRoot, ariaRefsQueue);\n      }\n      ariaRefsQueue.push(ariaRef);\n      if (ariaRefsQueue.length === ariaRefAssignments.length) {\n        shadowRootToAriaRefs.delete(ariaRefShadowRoot);\n        shadowRootToAriaRefsQueue.delete(ariaRefShadowRoot);\n        var assignments = ariaRefAssignments.reverse(); // Reverse so that children always come after parents\n        var ariaRefToAssignment = new Map();\n        for (var i = 0; i < assignments.length; i++) {\n          var ariaRefAssignment = assignments[i];\n          ariaRefToAssignment.set(ariaRefAssignment.ariaRef, ariaRefAssignment);\n          // We know that a parent of an ariaRef will always be before\n          // it in the refs array. We can use this knowledge to efficiently figure out\n          // each ariaRef's parent ariaRef\n          if (i > 0) {\n            var possibleParentAriaRef = assignments[i - 1].ariaRef;\n            while (possibleParentAriaRef) {\n              if (possibleParentAriaRef.contains(ariaRefAssignment.element)) {\n                possibleParentAriaRef.setChildQuerySelector(ariaRefAssignment.ariaRef, buildQuerySelector(ariaRefToAssignment.get(possibleParentAriaRef).element, ariaRefAssignment.element));\n                ariaRefAssignment.ariaRef.setParentAriaRef(possibleParentAriaRef);\n                break;\n              }\n              possibleParentAriaRef = possibleParentAriaRef.getParentAriaRef();\n            }\n          }\n          ariaRefAssignment.ariaRef.setCurrent(ariaRefAssignment.element);\n        }\n      }\n    });\n  }\n  function handleAriaAccessibility(node) {\n    if (ariaRef) {\n      createAriaRefHierarchy(node);\n    }\n    var _iterator = _createForOfIteratorHelper(accessibilityTargets),\n      _step;\n    try {\n      var _loop = function _loop() {\n        var item = _step.value;\n        item.element = node;\n        if (!node) {\n          if (item.currentClone && item.currentClone.parentNode) {\n            item.currentClone.parentNode.removeChild(item.currentClone);\n            item.currentClone = null;\n          }\n          if (item.callback) {\n            item.targetRef.unsubscribe({\n              element: node,\n              attribute: item.ariaAttribute\n            });\n            item.callback = null;\n          }\n          return 1; // continue\n        }\n        function callback(targetRef) {\n          if (!targetRef || !targetRef.isSet()) {\n            if (item.currentClone && item.currentClone.parentNode) {\n              item.currentClone.parentNode.removeChild(item.currentClone);\n              item.currentClone = null;\n            }\n            node.removeAttribute(item.ariaAttribute);\n            return;\n          } else {\n            node.setAttribute(item.ariaAttribute, item.id);\n          }\n\n          // If the element and target are in the same shadowRoot, don't clone the target\n          // but instead just add the id to the target\n          if (node.getRootNode() === targetRef.getRootNode()) {\n            var _id = targetRef.getAttribute('id');\n            if (_id) {\n              node.setAttribute(item.ariaAttribute, _id);\n            } else {\n              targetRef.setId(item.id);\n            }\n            return;\n          }\n          var sourceShadowRoot = node.getRootNode();\n          var sharedAccessibilityTargets = shadowRootToSharedAccessibilityTargets.get(sourceShadowRoot);\n          if (!sharedAccessibilityTargets) {\n            sharedAccessibilityTargets = new Set();\n            shadowRootToSharedAccessibilityTargets.set(sourceShadowRoot, sharedAccessibilityTargets);\n          }\n          sharedAccessibilityTargets.add(item);\n          callAsync(function () {\n            var targetShadowRoot = targetRef.getRootNode();\n            var targetItemsWithSharedShadow = Array.from(sharedAccessibilityTargets).filter(function (t) {\n              return t.targetRef.isSet() && t.targetRef.getRootNode() === targetShadowRoot;\n            });\n            var targetItemsSharedShadowQueue = shadowRootToAccessibilityTargetsItemsQueue.get(targetShadowRoot);\n            if (!targetItemsSharedShadowQueue) {\n              targetItemsSharedShadowQueue = new Set();\n              shadowRootToAccessibilityTargetsItemsQueue.set(targetShadowRoot, targetItemsSharedShadowQueue);\n            }\n            targetItemsSharedShadowQueue.add(item);\n            if (targetItemsSharedShadowQueue.size === targetItemsWithSharedShadow.length) {\n              handleAccessibilityTargets(targetItemsSharedShadowQueue);\n              shadowRootToSharedAccessibilityTargets.delete(sourceShadowRoot);\n              shadowRootToAccessibilityTargetsItemsQueue.delete(targetShadowRoot);\n            }\n          });\n        }\n        ;\n\n        // Subscribe for any changes to the aria ref so we can replace the cloned node\n        item.callback = callback;\n        item.targetRef.subscribe({\n          element: node,\n          attribute: item.ariaAttribute\n        }, callback);\n      };\n      for (_iterator.s(); !(_step = _iterator.n()).done;) {\n        if (_loop()) continue;\n      }\n    } catch (err) {\n      _iterator.e(err);\n    } finally {\n      _iterator.f();\n    }\n  }\n  function ariaSetVnode(vnode) {\n    for (var i = 0; i < accessibilityTargets.length; i++) {\n      var item = accessibilityTargets[i];\n      item.vnode = vnode;\n    }\n  }\n  return {\n    handleAriaAccessibility: handleAriaAccessibility,\n    ariaSetVnode: ariaSetVnode,\n    requiresRef: !!(ariaRef || accessibilityTargets.length)\n  };\n}\nfunction handleAccessibilityTargets(targetItemsShadowQueue) {\n  // Separate ariaRefs that do and do not have a parent.\n  // Those without a parent are the refs that should be cloned\n  var targetRefToTreeNode = new Map();\n  var targetItemRoots = [];\n  var targetItems = Array.from(targetItemsShadowQueue);\n  var _loop2 = function _loop2() {\n    var targetItem = targetItems[i];\n    var treeNode = targetRefToTreeNode.get(targetItem.targetRef);\n    if (!treeNode) {\n      treeNode = {\n        targetItems: [],\n        children: [],\n        targetRef: targetItem.targetRef,\n        parentTargetRef: null\n      };\n      targetRefToTreeNode.set(targetItem.targetRef, treeNode);\n    }\n    treeNode.targetItems.push(targetItem);\n    var parentAriaRef = targetItem.targetRef.getParentAriaRef();\n    while (parentAriaRef) {\n      if (targetItems.find(function (item) {\n        return item.targetRef === parentAriaRef;\n      })) {\n        var parentNode = targetRefToTreeNode.get(parentAriaRef);\n        if (!parentNode) {\n          parentNode = {\n            targetItems: [],\n            children: [],\n            targetRef: parentAriaRef,\n            parentTargetRef: null\n          };\n          targetRefToTreeNode.set(parentAriaRef, parentNode);\n        }\n        treeNode.parentTargetRef = parentAriaRef;\n        parentNode.children.push(targetItem);\n        break;\n      }\n      parentAriaRef = parentAriaRef.getParentAriaRef();\n    }\n    if (!parentAriaRef) targetItemRoots.push(targetItem);\n  };\n  for (var i = 0; i < targetItems.length; i++) {\n    _loop2();\n  }\n\n  // Loop over targetItemRoots:\n  // For each one, if it hasn't been cloned yet, clone into DOM and then for each child:\n  // If it hasn't been handled yet, create the query selector from the child targetRef to the\n  // parent targetRef, then use that selector on the cloned item, then edit the returned element\n  // to have the correct id\n  var cloned = new Map();\n  var targetRefToQuerySelector = new Map();\n  for (var _i = 0; _i < targetItemRoots.length; _i++) {\n    var rootTargetItem = targetItemRoots[_i];\n    var firstItemWithTargetRef = cloned.get(rootTargetItem.targetRef);\n    rootTargetItem.element.setAttribute(rootTargetItem.ariaAttribute, firstItemWithTargetRef ? firstItemWithTargetRef.id : rootTargetItem.id);\n    if (!firstItemWithTargetRef) {\n      cloned.set(rootTargetItem.targetRef, rootTargetItem);\n      var clone = rootTargetItem.targetRef.cloneNode(true);\n      clone.id = rootTargetItem.id;\n      clone.setAttribute('aria-hidden', true);\n      var container = document.createElement('div');\n      container.style = 'position: absolute; overflow: hidden; width: 1px; height: 1px; margin: 0; border: none; padding: 0; white-space: nowrap; clip: rect(0 0 0 0); clip-path: inset(50%);';\n      container.appendChild(clone);\n      if (rootTargetItem.currentClone && rootTargetItem.currentClone.parentNode) rootTargetItem.currentClone.parentNode.removeChild(rootTargetItem.currentClone);\n      rootTargetItem.element.getRootNode().appendChild(container);\n      rootTargetItem.currentClone = container;\n    }\n    var children = _toConsumableArray(targetRefToTreeNode.get(rootTargetItem.targetRef).children);\n    targetRefToQuerySelector.set(rootTargetItem.targetRef, '');\n    while (children.length) {\n      var childItem = children.shift();\n      var _firstItemWithTargetRef = cloned.get(childItem.targetRef);\n      var itemId = _firstItemWithTargetRef ? _firstItemWithTargetRef.id : childItem.id;\n      childItem.element.setAttribute(childItem.ariaAttribute, itemId);\n      if (!_firstItemWithTargetRef) {\n        cloned.set(childItem.targetRef, childItem);\n        var treeNode = targetRefToTreeNode.get(childItem.targetRef);\n        var selections = [];\n        var currentParent = void 0;\n        var currentChild = childItem.targetRef;\n        do {\n          currentParent = currentChild.getParentAriaRef();\n          var partialSelector = currentParent.getChildQuerySelector(currentChild);\n          selections.push(partialSelector);\n          currentChild = currentParent;\n        } while (currentParent !== rootTargetItem.targetRef);\n        var selector = selections.reverse().join(' > ');\n        var node = rootTargetItem.currentClone.querySelector(selector);\n        node.id = itemId;\n        children = children.concat(treeNode.children);\n      }\n    }\n  }\n}\nfunction buildQuerySelector(parent, child) {\n  var path = [];\n  var el = child;\n  while (el !== parent) {\n    var position = 0;\n    var current = el;\n    while (current) {\n      if (current.tagName === el.tagName) position += 1;\n      current = current.previousElementSibling;\n    }\n    path.push(\"\".concat(el.tagName.toLowerCase(), \":nth-of-type(\").concat(position, \")\"));\n    el = el.parentNode;\n  }\n  return path.reverse().join(' > ');\n}", "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = createElement;\nvar _react = _interopRequireDefault(require(\"react\"));\nvar _camelCase = _interopRequireDefault(require(\"./camelCase\"));\nvar _constants = require(\"./constants\");\nvar _ariaRefHelpers2 = _interopRequireDefault(require(\"./ariaRefHelpers\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? Object(arguments[r]) : {}, o = Object.keys(t); \"function\" == typeof Object.getOwnPropertySymbols && o.push.apply(o, Object.getOwnPropertySymbols(t).filter(function (e) { return Object.getOwnPropertyDescriptor(t, e).enumerable; })), o.forEach(function (r) { _defineProperty(e, r, t[r]); }); } return e; }\nfunction _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nfunction createElement(name) {\n  var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  function isSeismicComponent(name) {\n    return typeof name === 'string' && name.indexOf('-') !== -1;\n  }\n  function isAttribute(name) {\n    return _constants.ATTRIBUTES.indexOf(name) !== -1 || name.startsWith('aria-') || name.startsWith('data-');\n  }\n  function isMappedToProps(name) {\n    return _constants.MAPPED_TO_PROPS.indexOf(name) !== -1;\n  }\n  var _ariaRefHelpers = (0, _ariaRefHelpers2.default)(name, props),\n    handleAriaAccessibility = _ariaRefHelpers.handleAriaAccessibility,\n    ariaSetVnode = _ariaRefHelpers.ariaSetVnode,\n    requiresRef = _ariaRefHelpers.requiresRef;\n  for (var _len = arguments.length, children = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n    children[_key - 2] = arguments[_key];\n  }\n  if (props && !!Object.keys(props).length && isSeismicComponent(name)) {\n    var existingRef = props.ref && typeof props.ref === 'function' && props.ref;\n    var attributes = {};\n    var properties = {};\n    for (var _name in props) {\n      if (isAttribute(_name)) attributes[_name] = props[_name];else properties[(0, _camelCase.default)(_name)] = props[_name];\n      if (isMappedToProps(_name)) properties[_name] = props[_name];\n    }\n    if (!!Object.keys(properties).length) {\n      var vnode = _react.default.createElement.apply(_react.default, [name, Object.assign({}, attributes, {\n        ref: function ref(node) {\n          handleAriaAccessibility(node);\n          if (!node) return;\n          existingRef && existingRef(node);\n          Object.assign(node, properties);\n        }\n      })].concat(children));\n      ariaSetVnode(vnode);\n      return vnode;\n    }\n  }\n  if (requiresRef) {\n    var _vnode = _react.default.createElement.apply(_react.default, [name, _objectSpread({}, props, {\n      ref: function ref(node) {\n        handleAriaAccessibility(node);\n        if (props && props.ref) {\n          props.ref(node);\n        }\n      }\n    })].concat(children));\n    ariaSetVnode(_vnode);\n    return _vnode;\n  } else {\n    return _react.default.createElement.apply(_react.default, [name, props].concat(children));\n  }\n}", "export * as servicenowUiBehaviorLocalStorage from '/home/jenkins/agent/workspace/groups_seismic_sn-seismic_master/target/checkout/packages/behaviors/behavior-local-storage/src/global-shim.js';\nexport * as servicenowUiBehaviorPostMessage from '/home/jenkins/agent/workspace/groups_seismic_sn-seismic_master/target/checkout/packages/behaviors/behavior-post-message/src/global-shim.js';\nexport * as servicenowUiConfig from '/home/jenkins/agent/workspace/groups_seismic_sn-seismic_master/target/checkout/packages/config/src/global-shim.js';\nexport * as servicenowUiCore from '/home/jenkins/agent/workspace/groups_seismic_sn-seismic_master/target/checkout/packages/core/src/global-shim.js';\nexport * as servicenowUiEffectAmb from '/home/jenkins/agent/workspace/groups_seismic_sn-seismic_master/target/checkout/packages/effects/effect-amb/src/global-shim.js';\nexport * as servicenowUiEffectGraphql from '/home/jenkins/agent/workspace/groups_seismic_sn-seismic_master/target/checkout/packages/effects/effect-graphql/src/global-shim.js';\nexport * as servicenowUiEffectHelpers from '/home/jenkins/agent/workspace/groups_seismic_sn-seismic_master/target/checkout/packages/effects/effect-helpers/src/global-shim.js';\nexport * as servicenowUiEffectHttp from '/home/jenkins/agent/workspace/groups_seismic_sn-seismic_master/target/checkout/packages/effects/effect-http/src/global-shim.js';\nexport * as servicenowUiEffectUpdateState from '/home/jenkins/agent/workspace/groups_seismic_sn-seismic_master/target/checkout/packages/effects/effect-update-state/src/global-shim.js';\nexport * as servicenowUiInternal from '/home/jenkins/agent/workspace/groups_seismic_sn-seismic_master/target/checkout/packages/internal/src/global-shim.js';\nexport * as servicenowUiMetrics from '/home/jenkins/agent/workspace/groups_seismic_sn-seismic_master/target/checkout/packages/metrics/src/global-shim.js';\nexport * as servicenowUiRendererDefault from '/home/jenkins/agent/workspace/groups_seismic_sn-seismic_master/target/checkout/packages/renderers/default/src/global-shim.js';\nexport * as servicenowUiRendererSnabbdom from '/home/jenkins/agent/workspace/groups_seismic_sn-seismic_master/target/checkout/packages/renderers/snabbdom/src/global-shim.js';\nexport * as servicenowUiTypes from '/home/jenkins/agent/workspace/groups_seismic_sn-seismic_master/target/checkout/packages/types/src/global-shim.js';\nexport * as servicenowUiUtils from '/home/jenkins/agent/workspace/groups_seismic_sn-seismic_master/target/checkout/packages/utils/src/global-shim.js';\nexport * as snSeismicPostMessage from './sn-seismic-post-message';\nexport * as snTranslate from './sn-translate';\nexport * as snCustomCreateElement from './sn-custom-create-element';", "/**\n * This is a temporary workaround to expose legacy global variables\n * to keep the Seismic Test Plugin (component drivers) working correctly.\n * Please rip this out (and fix the esbuild.config.js to use the correct\n * entry point) once we get a real fix for that\n */\n\nimport * as exports from './index.js';\n\nif (typeof window !== 'undefined')\n\twindow.__TECTONIC__$servicenow_ui_behavior_local_storage = exports;\n\nexport * from './index.js';\n", "export {\n\tdefault as createLocalStorageBehavior,\n\tLOCAL_STORAGE_SET\n} from './createLocalStorageBehavior';\n", "export const LOCAL_STORAGE_SET = 'LOCAL_STORAGE_SET';\n\nfunction getValue({localStorageKey, parse}) {\n\tlet value = localStorage.getItem(localStorageKey);\n\tif (parse && typeof value === 'string') value = JSON.parse(value);\n\n\treturn value;\n}\n\nfunction defaultSetKeyName({host, key}) {\n\treturn `${host.tagName}_${key}`;\n}\n\nexport default function createLocalStorageBehavior({\n\tkey,\n\tstateKey,\n\tbehaviorKey,\n\tparse,\n\tsetKeyName\n}) {\n\tlet localStorageKey;\n\tconst stateName = stateKey || key;\n\tconst behaviorName = behaviorKey || 'localStorage';\n\tconst statePath = `behaviors.${behaviorName}.${stateName}`;\n\n\treturn {\n\t\tname: behaviorName,\n\t\tsetInitialState({host, properties}) {\n\t\t\tlocalStorageKey = (setKeyName || defaultSetKeyName)({key, host, properties});\n\n\t\t\treturn {\n\t\t\t\t[stateName]: getValue({localStorageKey, parse})\n\t\t\t};\n\t\t},\n\t\tactionHandlers: {\n\t\t\t[LOCAL_STORAGE_SET]({\n\t\t\t\taction: {\n\t\t\t\t\tpayload: {value}\n\t\t\t\t},\n\t\t\t\tupdateState\n\t\t\t}) {\n\t\t\t\tlet localStorageValue = value;\n\t\t\t\tif (parse && typeof value !== 'string') localStorageValue = JSON.stringify(value);\n\n\t\t\t\tlocalStorage.setItem(localStorageKey, localStorageValue);\n\t\t\t\tupdateState({path: statePath, value, operation: 'set'});\n\t\t\t}\n\t\t}\n\t};\n}\n", "/**\n * This is a temporary workaround to expose legacy global variables\n * to keep the Seismic Test Plugin (component drivers) working correctly.\n * Please rip this out (and fix the esbuild.config.js to use the correct\n * entry point) once we get a real fix for that\n */\n\nimport * as exports from './index.js';\n\nif (typeof window !== 'undefined')\n\twindow.__TECTONIC__$servicenow_ui_behavior_post_message = exports;\n\nexport * from './index.js';\n", "import {POST_MESSAGE, MESSAGE_RECEIVED, SET_TARGET_WINDOW} from './constants';\n\nexport const postMessageActions = {POST_MESSAGE, MESSAGE_RECEIVED, SET_TARGET_WINDOW};\nexport {default as createPostMessageBehavior} from './createPostMessageBehavior';\n", "export const POST_MESSAGE = 'POST_MESSAGE_BEHAVIOR#POST_MESSAGE';\nexport const MESSAGE_RECEIVED = 'POST_MESSAGE_BEHAVIOR#MESSAGE_RECEIVED';\nexport const SET_TARGET_WINDOW = 'POST_MESSAGE_BEHAVIOR#SET_TARGET_WINDOW';\n", "import {getHostInfo, actionTypes, allLogTypes as logTypes} from '@servicenow/ui-internal';\nimport log from './log';\nimport {POST_MESSAGE, MESSAGE_RECEIVED, SET_TARGET_WINDOW} from './constants';\n\nconst targetWindows = new WeakMap();\nwindow.addEventListener('message', receiveMessage, false);\n\nfunction getComponentIdToCallback(targetWindow, targetOrigin) {\n\tconst targetOriginToComponentIdMap = targetWindows.get(targetWindow);\n\tif (!targetOriginToComponentIdMap) return;\n\n\treturn {\n\t\t...targetOriginToComponentIdMap[targetOrigin],\n\t\t...targetOriginToComponentIdMap['*']\n\t};\n}\n\nfunction receiveMessage({data, origin, source}) {\n\tconst componentIdToCallback = getComponentIdToCallback(source, origin);\n\tif (!componentIdToCallback) return;\n\n\tconst callbacks = Object.values(componentIdToCallback);\n\tfor (const callback of callbacks) callback(data);\n}\n\nfunction addPostMessageListener({componentId, targetWindow, targetOrigin}, callback) {\n\tlet targetOriginToComponentIdMap = targetWindows.get(targetWindow);\n\tif (!targetOriginToComponentIdMap) {\n\t\ttargetOriginToComponentIdMap = {};\n\t\ttargetWindows.set(targetWindow, targetOriginToComponentIdMap);\n\t}\n\n\tlet componentIdToCallback = targetOriginToComponentIdMap[targetOrigin];\n\tif (!componentIdToCallback) {\n\t\tcomponentIdToCallback = {};\n\t\ttargetOriginToComponentIdMap[targetOrigin] = componentIdToCallback;\n\t}\n\n\tcomponentIdToCallback[componentId] = callback;\n}\n\nfunction removePostMessageListener({componentId, targetWindow, targetOrigin}) {\n\tconst componentIdToCallback = getComponentIdToCallback(targetWindow, targetOrigin);\n\n\tif (componentIdToCallback && componentId in componentIdToCallback)\n\t\tdelete componentIdToCallback[componentId];\n}\n\nexport default function createPostMessageBehavior({\n\tpostMessageAction = POST_MESSAGE,\n\tmessageReceivedAction = MESSAGE_RECEIVED,\n\tsetTargetWindowAction = SET_TARGET_WINDOW,\n\ttargetOrigin\n}) {\n\tif (!targetOrigin)\n\t\tlog('targetOrigin must be set', {level: logTypes.ERROR, origin: 'createPostMessageBehavior'});\n\n\treturn {\n\t\tname: 'postMessageBehavior',\n\t\tinitialState: {\n\t\t\ttargetWindow: null\n\t\t},\n\t\tactionHandlers: {\n\t\t\t[setTargetWindowAction]({updateState, action, properties, dispatch}) {\n\t\t\t\tconst {targetWindow} = action.payload;\n\t\t\t\tconst componentId = properties.nowId;\n\n\t\t\t\tupdateState(\n\t\t\t\t\t{\n\t\t\t\t\t\tpath: 'targetWindow',\n\t\t\t\t\t\tvalue: targetWindow,\n\t\t\t\t\t\toperation: 'set',\n\t\t\t\t\t\tshouldRender: false\n\t\t\t\t\t},\n\t\t\t\t\t{SCHEDULE_IMMEDIATELY_DO_NOT_USE_OR_YOU_WILL_BE_IMMEDIATELY_FIRED: true}\n\t\t\t\t);\n\n\t\t\t\tif (targetWindow && componentId) {\n\t\t\t\t\taddPostMessageListener({componentId, targetWindow, targetOrigin}, data => {\n\t\t\t\t\t\tdispatch(messageReceivedAction, data);\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tremovePostMessageListener({componentId, targetWindow, targetOrigin});\n\t\t\t\t}\n\t\t\t},\n\t\t\t[postMessageAction]({state, action, host}) {\n\t\t\t\tconst {targetWindow} = state;\n\t\t\t\tif (targetWindow) {\n\t\t\t\t\ttargetWindow.postMessage(action.payload, targetOrigin);\n\t\t\t\t} else {\n\t\t\t\t\tconst {tagName, componentId} = getHostInfo(host);\n\t\t\t\t\tlog(\n\t\t\t\t\t\t`${postMessageAction} could not post message to targetWindow because targetWindow is not defined.`,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttagName,\n\t\t\t\t\t\t\tcomponentId,\n\t\t\t\t\t\t\thost,\n\t\t\t\t\t\t\torigin: `${postMessageAction}`\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t},\n\t\t\t[actionTypes.COMPONENT_DISCONNECTED]({properties, state: {targetWindow}}) {\n\t\t\t\tconst componentId = properties.nowId;\n\t\t\t\tif (targetWindow && componentId)\n\t\t\t\t\tremovePostMessageListener({componentId, targetWindow, targetOrigin});\n\t\t\t}\n\t\t}\n\t};\n}\n", "export {default as callAsync} from './callAsync';\nexport * from './symbols';\n\nexport {\n\terrorTypes,\n\tactionTypes,\n\tlocations,\n\tdomainSeparationProperties,\n\tDISCONNECTED_TIME,\n\tACTIVE_SPAN,\n\tNOW_ID_ATTRIBUTE,\n\tCOMPONENT_ID_ATTRIBUTE,\n\tNOW_SKIP_RENDER_UNTIL_PRESENT_ATTR,\n\tNOW_SKIP_RENDER_UNTIL_PRESENT,\n\tRESOLVED_PROPS_ATTRIBUTE,\n\tNOW_EXCLUDED_FROM_HYDRATION_ATTR,\n\tNOW_DEFER_HYDRATION_ATTR,\n\tNOW_DEFER_HYDRATION\n} from './constants';\nexport {default as createLogger} from './createLogger';\nexport {default as getHostInfo} from './getHostInfo';\nexport {default as memoize} from './memoizeProfiler';\nexport {default as sandbox} from './sandbox';\nexport {notify as dispatchError} from './sandbox';\nexport {default as guid} from './guid';\nexport {default as createAriaRef} from './createAriaRef';\nexport {createRef, isRef, subscribeToRef} from './refs';\n\nexport {\n\tkebabCase,\n\tcamelCase,\n\ttoString,\n\ttoLower,\n\ttoUpper,\n\tfindKey,\n\tsplitPath,\n\tget,\n\tset,\n\tpick,\n\tomit,\n\tvalues,\n\tnoop,\n\tisEqual,\n\tisSelectiveEqual,\n\tisPlainObject,\n\tisEmpty,\n\tdefer,\n\traf,\n\twhenIdle,\n\trequestIdleCallback,\n\trequestIdleCallbackPollyfill,\n\tisThrottled\n} from '@servicenow/ui-utils';\nexport * from './logHandler';\nexport * from './pendingNetworkActionsRegistry';\nexport {default as getSpanOptions} from './getSpanOptions';\n", "const callAsync = Promise.resolve().then.bind(Promise.resolve());\nexport default callAsync;\n", "export const VARIABLES = Symbol('__variables__');\nexport const INTERNAL_HOST_DISPATCH = Symbol('__internal_host_dispatch__');\nexport const EXISTING_SHADOW_ROOT_ON_CREATE = Symbol('__existing_shadow_root_on_create__');\n", "export const errorTypes = {\n\tCOMPONENT_ERROR_THROWN: 'SEISMIC_COMPONENT_ERROR_THROWN'\n};\n\n// Public action types\nexport const actionTypes = {\n\tCOMPONENT_CONNECTED: 'SEISMIC_COMPONENT_CONNECTED',\n\tCOMPONENT_DISCONNECTED: 'SEISMIC_COMPONENT_DISCONNECTED',\n\tCOMPONENT_BOOTSTRAPPED: 'SEISMIC_COMPONENT_BOOTSTRAPPED',\n\tCOMPONENT_PROPERTY_CHANGED: 'SEISMIC_COMPONENT_PROPERTY_CHANGED',\n\tCOMPONENT_RENDERED: 'SEISMIC_COMPONENT_RENDERED',\n\tCOMPONENT_DOM_READY: 'SEISMIC_COMPONENT_DOM_READY',\n\tCOMPONENT_PROPERTY_UPDATE_REQUESTED: 'SEISMIC_COMPONENT_PROPERTY_UPDATE_REQUESTED',\n\tCOMPONENT_RENDER_REQUESTED: 'SEISMIC_COMPONENT_RENDER_REQUESTED',\n\tCOMPONENT_DOM_TREE_READY: 'SEISMIC_COMPONENT_DOM_TREE_READY',\n\tCOMPONENT_TREE_RENDERED: 'SEISMIC_COMPONENT_TREE_RENDERED',\n\tCOMPONENT_ACTION_DISPATCHED: 'SEISMIC_COMPONENT_ACTION_DISPATCHED',\n\tCOMPONENT_ERROR_THROWN: errorTypes.COMPONENT_ERROR_THROWN,\n\tCOMPONENT_INTERACTIVE: 'SEISMIC_COMPONENT_INTERACTIVE'\n};\n\nexport const locations = {\n\tEFFECT: 'SEISMIC_LOCATION_EFFECT',\n\tEVENT: 'SEISMIC_LOCATION_EVENT',\n\tINITIAL_STATE: 'SEISMIC_LOCATION_INITIAL_STATE',\n\tINTERCEPTOR: 'SEISMIC_LOCATION_INTERCEPTOR',\n\tLIFECYCLE: 'SEISMIC_LOCATION_LIFECYCLE',\n\tPROPERTY: 'SEISMIC_LOCATION_PROPERTY',\n\tRENDERER: 'SEISMIC_LOCATION_RENDERER',\n\tTRANSFORM_STATE: 'SEISMIC_LOCATION_TRANSFORM_STATE',\n\tVIEW: 'SEISMIC_LOCATION_VIEW'\n};\n\nexport const COMPONENT_ID_ATTRIBUTE = 'component-id';\nexport const NOW_ID_ATTRIBUTE = 'now-id';\nexport const NOW_ID_PROP = 'nowId';\nexport const DISCONNECTED_TIME = Symbol('SEISMIC_COMPONENT_DISCONNECTED_TIME');\n\nexport const domainSeparationProperties = {\n\tNOW_DS_RECORD_TABLE: 'nowDsRecordTable',\n\tNOW_DS_RECORD_ID: 'nowDsRecordId',\n\tNOW_DS_DOMAIN_ID: 'nowDsDomainId',\n\tNOW_DS_DOMAIN_SCOPE: 'nowDsDomainScope'\n};\n\nexport const CREATE_REF_SYMBOL = Symbol('__CREATE_REF_SYMBOL__');\nexport const CREATE_REF_SUBSCRIBE_SYMBOL = Symbol('__CREATE_REF_SUBSCRIBE_SYMBOL__');\nexport const CREATE_REF_COMP_PROPS_SUBSCRIPTIONS_SYMBOL = Symbol(\n\t'__CREATE_REF_COMP_PROPS_SUBSCRIPTIONS_SYMBOL__'\n);\n\n//tracing\nexport const ACTIVE_SPAN = Symbol('__ACTIVE_SPAN__');\nexport const SPAN_KIND_CLIENT = 3;\nexport const SPAN_FOR_DISPATCH = 'ACTION_DISPATCH';\nexport const SPAN_ATTR_DISPATCH_ACTION_TYPE = 'actionType';\nexport const SPAN_LEVEL_FINE = 100;\n\n// server-side rendering\n/**\n * NOW_SKIP_RENDER_UNTIL_PRESENT_ATTR defines a comma-separated list of property names\n * whose values should be present before the component is rendered. The reason for this\n * attribute is that the server rendered markup presents the settled state of the component,\n * while the client-side rendering may take a few renders before getting to the same state.\n * If we don't skip the intermediate renders, the hydration/patch process will trash the\n * server-rendered markups.\n */\nexport const NOW_SKIP_RENDER_UNTIL_PRESENT_ATTR = 'now-skip-render-until-present';\nexport const NOW_SKIP_RENDER_UNTIL_PRESENT = 'nowSkipRenderUntilPresent';\nexport const NOW_DEFER_HYDRATION_ATTR = 'defer-hydration';\nexport const NOW_DEFER_HYDRATION = 'deferHydration';\n/**\n * NOW_EXCLUDED_FROM_HYDRATION_ATTR is a boolean to indicate if an element should be excluded\n * from the hydration. The reason is that some components (like some UXR components) directly\n * manipulate the DOM without going through the seismic renderer. In such case, the client-side\n * rendering will not be able to generate the same DOM structure as the server-side rendering,\n * which causes the server markups to be trashed during the hydration process.\n */\nexport const NOW_EXCLUDED_FROM_HYDRATION_ATTR = 'now-excluded-from-hydration';\nexport const RESOLVED_PROPS_ATTRIBUTE = 'now-resolved-props';\n", "import {\n\tcreateLogContext,\n\tshouldLog,\n\tnotifyLogObservers,\n\tallLogTypes as logTypes\n} from './logHandler';\nconst tagNameCache = {};\n\nconst defaults = {\n\tsupport: 'https://developer.servicenow.com/now-experience-ui-framework/support',\n\tmodule: '@servicenow/ui-core'\n};\n\nconst logOptionDefaults = {\n\tlevel: logTypes.WARN,\n\terror: null,\n\talways: false,\n\tdocs: null,\n\ttagName: null,\n\tcomponentId: null\n};\n\n/**\n * Creates a logger.\n * @function createLogger\n * @private\n * @param {Object} config - The logger configuration.\n * @param {string} [config.support] - Link to NX UI Documentation & Support\n * @param {string} [config.module] - Module name.\n */\nexport default function createLogger(options = {}) {\n\tconst loggerOptions = {...defaults, ...options};\n\tconst {module, support} = loggerOptions;\n\tconst postfix = `Visit ${support} for more information about UI Framework on Next Experience.`;\n\treturn async function log(message, options = {}) {\n\t\tconst logOptions = {...logOptionDefaults, message, module, postfix, ...options};\n\t\tconst resolvedLogContext = createLogContext(logOptions);\n\t\tif (shouldLog(resolvedLogContext, logOptions)) {\n\t\t\tconst {level} = logOptions;\n\t\t\tconst logger = console[level] || console.log; // eslint-disable-line no-console\n\t\t\tconst {componentName, logMessage} = resolvedLogContext;\n\t\t\tif (componentName) {\n\t\t\t\tif (componentName in tagNameCache && message in tagNameCache[componentName]) return;\n\n\t\t\t\ttagNameCache[componentName] = tagNameCache[componentName] || {};\n\t\t\t\ttagNameCache[componentName][message] = true;\n\t\t\t}\n\t\t\tlogger(logMessage);\n\t\t\tnotifyLogObservers(resolvedLogContext);\n\t\t}\n\t};\n}\n", "import {logTypes, allLogTypes} from './constants';\nimport {default as createLogContext} from './createLogContext';\nimport {default as shouldLog} from './shouldLog';\nimport {default as observe} from './observe';\nimport {default as notifyLogObservers} from './notifyLogObservers';\n\nglobalThis.nowUiFrameworkLogs = {\n\tobserve,\n\tlogTypes\n};\n\nexport {shouldLog, observe, createLogContext, notifyLogObservers, allLogTypes};\n", "const ERROR = 'error';\nconst WARN = 'warn';\nconst INFO = 'info';\nconst DEBUG = 'debug';\nconst TRACE = 'trace';\nconst EMIT = 'emit';\n\nexport const logTypes = [ERROR, WARN, INFO, DEBUG, TRACE, EMIT];\nexport const allLogTypes = {\n\tERROR,\n\tWARN,\n\tINFO,\n\tDEBUG,\n\tTRACE,\n\tEMIT\n};\n", "export default function createLogContext({\n\thost,\n\ttagName: componentName,\n\tcomponentId,\n\tlevel,\n\terror,\n\tdocs,\n\torigin,\n\tmodule,\n\tmessage,\n\tpostfix\n}) {\n\tconst tempHost = host ? host : {};\n\tconst {\n\t\ttagName = null,\n\t\tnowId = null,\n\t\t__DO_NOT_USE_OR_YOU_WILL_BE_FIRED_BY_YOUR_PARENT__ = null,\n\t\tnowLoggingLevels = null\n\t} = tempHost;\n\n\tconst logContext = {\n\t\tcomponentName: tagName ? tagName : componentName,\n\t\tcomponentId: nowId ? nowId : componentId,\n\t\tparentComponentId: __DO_NOT_USE_OR_YOU_WILL_BE_FIRED_BY_YOUR_PARENT__,\n\t\tlevel,\n\t\terror,\n\t\tdocs,\n\t\torigin,\n\t\tmodule,\n\t\tpostfix,\n\t\tnowLoggingLevels\n\t};\n\n\tlogContext.logMessage = getLogMessage(logContext, message);\n\treturn logContext;\n}\n\nconst getLogMessage = (logContext, message) => {\n\tconst {componentName, componentId, docs, error, postfix, module, origin} = logContext;\n\tconst componentMsg = componentName\n\t\t? `<${componentName.toLowerCase()} ${componentId ? `component-id=\"${componentId}\"` : ''}/>`\n\t\t: '';\n\n\tlet startMessage = '';\n\tif (componentMsg && origin)\n\t\tstartMessage = `For component ${componentMsg} with origin '${origin}': `;\n\telse if (componentMsg) startMessage = `For component ${componentMsg}: `;\n\telse if (origin) startMessage = `At origin '${origin}': `;\n\n\treturn `${module} ${startMessage}${message}${error ? `\\n${error.stack}` : ''}${\n\t\tdocs ? `\\nDocumentation: ${docs}` : `\\n${postfix}`\n\t}`;\n};\n", "import {logTypes} from './constants';\nimport {getConfigItem, configConstants, observeConfigItem} from '@servicenow/ui-config';\nconst {LOGGING_ENABLED, LOGGING_LEVELS} = configConstants;\n\nlet globalLoggingEnabled = getConfigItem(LOGGING_ENABLED);\nlet globalLoggingLevels = getConfigItem(LOGGING_LEVELS);\n\nconst observer = (path, value) => {\n\tswitch (path) {\n\t\tcase LOGGING_ENABLED:\n\t\t\tglobalLoggingEnabled = value;\n\t\t\tbreak;\n\t\tcase LOGGING_LEVELS:\n\t\t\tglobalLoggingLevels = value;\n\t\t\tbreak;\n\t}\n};\n\nobserveConfigItem(LOGGING_ENABLED, observer);\nobserveConfigItem(LOGGING_LEVELS, observer);\n\nexport default function shouldLog(logContext, options) {\n\tconst {always, level: logType} = options;\n\tif (always) return true;\n\n\tif (!logTypes.includes(logType)) return false;\n\n\tconst {nowLoggingLevels} = logContext;\n\n\tif (nowLoggingLevels === true || nowLoggingLevels === false) return nowLoggingLevels;\n\n\tif (Array.isArray(nowLoggingLevels)) return nowLoggingLevels.includes(logType);\n\n\tif (globalLoggingLevels === true || globalLoggingLevels === false) return globalLoggingLevels;\n\n\tif (Array.isArray(globalLoggingLevels)) return globalLoggingLevels.includes(logType);\n\n\treturn !!globalLoggingEnabled;\n}\n", "import {getConfig, getConfigItem, setConfigItem, observeConfigItem} from './config';\nimport {getEmbeddableBaseUrl, setEmbeddableBaseUrl} from './config-embeddable';\nimport * as configConstants from './constants';\n\nglobalThis.nowUiFramework = globalThis.nowUiFramework || {};\nglobalThis.nowUiFramework.getConfig = getConfig;\nglobalThis.nowUiFramework.getConfigItem = getConfigItem;\nglobalThis.nowUiFramework.setConfigItem = setConfigItem;\nglobalThis.nowUiFramework.observeConfigItem = observeConfigItem;\nglobalThis.nowUiFramework.getEmbeddableBaseUrl = getEmbeddableBaseUrl;\nglobalThis.nowUiFramework.setEmbeddableBaseUrl = setEmbeddableBaseUrl;\n\nexport {\n\tconfigConstants,\n\tgetConfig,\n\tgetConfigItem,\n\tsetConfigItem,\n\tobserveConfigItem,\n\tgetEmbeddableBaseUrl,\n\tsetEmbeddableBaseUrl\n};\n", "import {get, set} from '@servicenow/ui-utils';\nimport {\n\tNOW_UI_CONFIG,\n\tNOW_UI_FRAMEWORK,\n\tNOW_UI_FRAMEWORK_CONFIG_KEYS,\n\tNXUI_SYS_PROPS\n} from './constants';\nimport {default as emitNowUiEvent} from './emitNowUiEvent';\nimport {getConfigForEnv} from './configs/index';\n\nconst configInstance = {};\n\n/***\n * Private\n */\n\n/***\n * @function getConfigFromGlobal\n * @description checks the globalThis object for configs\n */\nconst getConfigFromGlobal = () => {\n\tconst globalConfig = {};\n\n\tif (!globalThis[NOW_UI_FRAMEWORK]) return globalConfig;\n\n\tNOW_UI_FRAMEWORK_CONFIG_KEYS.forEach(key => {\n\t\tif (globalThis[NOW_UI_FRAMEWORK][key] !== undefined)\n\t\t\tglobalConfig[key] = globalThis[NOW_UI_FRAMEWORK][key];\n\t});\n\n\treturn globalConfig;\n};\n\nconst getConfigFromSysProps = () => {\n\tconst nxuiConfig = {};\n\n\tif (!globalThis.ux_globals?.nxui?.sysprops) return nxuiConfig;\n\n\tconst sysPropKeys = Object.keys(NXUI_SYS_PROPS);\n\tfor (const sysProp in globalThis.ux_globals.nxui.sysprops) {\n\t\tif (sysPropKeys.indexOf(sysProp) > -1) {\n\t\t\tconst configKey = NXUI_SYS_PROPS[sysProp];\n\t\t\tconst sysPropValue = globalThis.ux_globals.nxui.sysprops[sysProp];\n\t\t\tif (sysPropValue === 'true') nxuiConfig[configKey] = true;\n\t\t\telse if (sysPropValue === 'false') nxuiConfig[configKey] = false;\n\t\t\telse nxuiConfig[configKey] = sysPropValue;\n\t\t}\n\t}\n\n\treturn nxuiConfig;\n};\n\nconst observeredProperties = {};\n\n/***\n * Public\n */\n\n/**\n * getConfig\n * @description returns the config instance\n * @function getConfig\n */\nexport const getConfig = () => {\n\t// Need to whitelist keys\n\tconst globalConfig = getConfigFromGlobal();\n\tconst sysPropConfig = getConfigFromSysProps();\n\tconst envConfig = getConfigForEnv();\n\n\t// Build Config Object -> Env Defaults -> Sys Props -> Global Config -> Overrides\n\tconst configObj = {...envConfig, ...sysPropConfig, ...globalConfig, ...configInstance};\n\treturn configObj;\n};\n\n/**\n * observeConfigItem\n * @description returns a function to remove the observer\n * @param {String} path\n * @param {Function} fn\n * @function observeConfigItem\n */\nexport const observeConfigItem = (path, fn) => {\n\tconst observers = observeredProperties[path] || (observeredProperties[path] = new Set());\n\tobservers.add(fn);\n\treturn () => observers.delete(fn);\n};\n\n/**\n * Getter for Config\n * @param {String} path\n * @returns {Object} Returns the key and value for the config item\n */\nexport const getConfigItem = path => {\n\tconst overridden = get(configInstance, path);\n\tif (overridden !== undefined) return overridden;\n\n\tconst globalVar = get(getConfigFromGlobal(), path);\n\tif (globalVar !== undefined) return globalVar;\n\n\tconst sysPropVar = get(getConfigFromSysProps(), path);\n\tif (sysPropVar !== undefined) return sysPropVar;\n\n\treturn get(getConfigForEnv(), path, undefined);\n};\n\n/**\n * Setter for Config\n * @function setConfigItem\n * @description Setter for the Seismic config\n * @param {String} path\n * @param {*} value\n * @returns {Object} Returns the key and value for the config item that was set\n *\n * Is it a junk drawer or do we want to whitelist keys?\n */\nexport const setConfigItem = (path, value) => {\n\tif (getConfigItem(path) === value) return;\n\n\temitNowUiEvent(NOW_UI_CONFIG, {path, value, previousValue: getConfigItem(path)});\n\tconst retVal = set(configInstance, path, value);\n\tconst observers = observeredProperties[path];\n\tif (observers) observers.forEach(fn => fn(path, value));\n\n\treturn retVal;\n};\n", "export {default as kebabCase} from './kebabCase';\nexport {default as camelCase} from './camelCase';\nexport {default as toString} from './toString';\nexport {default as toLower} from './toLower';\nexport {default as toUpper} from './toUpper';\nexport {default as memoize} from './memoize';\nexport {default as findKey} from './findKey';\nexport {default as get} from './get';\nexport {default as set} from './set';\nexport {splitPath} from './splitPath';\nexport {default as pick} from './pick';\nexport {default as omit} from './omit';\nexport {default as values} from './values';\nexport {default as noop} from './noop';\nexport {default as isEqual} from './isEqual';\nexport {default as isSelectiveEqual} from './isSelectiveEqual';\nexport {default as isPlainObject} from './isPlainObject';\nexport {default as isEmpty} from './isEmpty';\nexport {default as defer} from './defer';\nexport {default as whenIdle} from './whenIdle';\nexport {default as raf} from './raf';\nexport {default as requestIdleCallback, requestIdleCallbackPollyfill} from './requestIdleCallback';\nexport {default as isThrottled} from './isThrottled';\nexport {default as createSnHttp} from './createSnHttp';\nexport * from './deferMetrics';\n", "/**\n * Converts a string to [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).\n *\n * @example\n * kebabCase('Foo Bar');\n * // => 'foo-bar'\n *\n * @function kebabCase\n * @param {string} str The string to convert.\n * @return {string} Returns the kebab cased string.\n */\nexport default function kebabCase(str) {\n\tif (typeof str !== 'string') return '';\n\n\treturn str\n\t\t.trim()\n\t\t.replace(/(\\B[A-Z]|\\B[0-9])/g, '-$1')\n\t\t.replace(/[\\s_]+/g, '-')\n\t\t.toLowerCase();\n}\n", "import kebabCase from './kebabCase';\n\n/**\n * Converts a string to [camel case](https://en.wikipedia.org/wiki/Camel_case).\n *\n * @example\n * camelCase('Foo Bar');\n * // => 'fooBar'\n *\n * @function camelCase\n * @param {string} str The string to convert.\n * @return {string} Returns the camel cased string.\n */\nexport default function camelCase(str) {\n\treturn kebabCase(str)\n\t\t.replace(/[-_]+/g, ' ')\n\t\t.replace(/[^\\w\\s]/g, '')\n\t\t.replace(/ (.)/g, $1 => $1.toUpperCase())\n\t\t.replace(/ /g, '');\n}\n", "/**\n * Converts a value to string.  If given `null` or `undefined`, an empty string is returned.\n * @function toString\n * @param value The value to convert.\n * @return {string} Returns converted string value.\n */\nexport default function toString(value) {\n\tif (value === null || value === undefined) return '';\n\n\treturn value.toString();\n}\n", "/**\n * Converts a string to lower case similar to [String#toLowerCase](https://mdn.io/toLowerCase).\n *\n * @example\n * toLower('FOO BAR');\n * // => 'foo bar'\n *\n * @function toLower\n * @param {string} str The string to convert.\n * @return {string} Returns the lower cased string.\n */\nexport default function toLower(str) {\n\tif (typeof str !== 'string') return '';\n\n\treturn str.toLowerCase();\n}\n", "/**\n * Converts a string to upper case similar to [String#toUpperCase](https://mdn.io/toUpperCase).\n *\n * @example\n * toUpper('foo bar');\n * // => 'FOO BAR'\n *\n * @function toUpper\n * @param {string} str The string to convert.\n * @return {string} Returns the upper cased string.\n */\nexport default function toUpper(str) {\n\tif (typeof str !== 'string') return '';\n\n\treturn str.toUpperCase();\n}\n", "let trackStats = false;\nlet stats = {};\nfunction recordStat(profileName, hit) {\n\tlet stat = stats[profileName];\n\n\tif (!stat) {\n\t\tstat = {calls: 0, hits: 0, size: 0};\n\t\tstats[profileName] = stat;\n\t}\n\n\tstat.calls += 1;\n\tif (hit) stat.hits += 1;\n\telse stat.size += 1;\n}\n/**\n * Creates a new function that memoizes the result of the provided `func` function.  When the\n * `resolver` function is specified, its returned value is used as the cache key of the memoized\n * function. By default, the first argument of the memoized function is used as the cache key.\n *\n * The cache is exposed as the `cache` property on the returned memoized function. It can be\n * customized by replacing the `memoize.Cache` constructor with one whose instances implement the\n * same [instance methods](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map#Instance_methods)\n * of `Map`.\n *\n * @function memoize\n * @param {Function} func The function to have its output memoized.\n * @param {Object} options Additional memoize options.\n * @param {Function} options.createCacheKey The function to resolve the cache key. Must return a string.\n * @param {string} options.profileName A unique name to use to track this function and its performance. Optional but highly encouraged to set it\n * @param {string} options.snabbdom Set to true if the function is returning JSX and is using snabbdom-renderer\n * @return {Function} Returns a new memoized function.\n */\nexport default function memoize(func, createCacheKey, options) {\n\tlet cck = createCacheKey;\n\tlet profileName;\n\tlet snabbdom = false;\n\tif (options === undefined && typeof createCacheKey === 'object') {\n\t\tcck = createCacheKey.createCacheKey;\n\t\tprofileName = createCacheKey.profileName;\n\t\tsnabbdom = createCacheKey.snabbdom;\n\t} else if (typeof options === 'object') {\n\t\tcck = createCacheKey || options.createCacheKey;\n\t\tprofileName = options.profileName;\n\t\tsnabbdom = options.snabbdom;\n\t}\n\n\tconst memoized = function (...args) {\n\t\tconst key = cck ? cck.apply(this, args) : args[0];\n\t\tconst {cache} = memoized;\n\n\t\tif (cache.has(key)) {\n\t\t\tif (trackStats) recordStat(profileName, true);\n\n\t\t\tconst result = cache.get(key);\n\t\t\treturn snabbdom ? cloneVnode(result) : result;\n\t\t}\n\n\t\tif (trackStats) recordStat(profileName, false);\n\n\t\tconst result = func.apply(this, args);\n\t\tconst cacheValue = snabbdom ? cloneVnode(result) : result;\n\t\tmemoized.cache = cache.set(key, cacheValue) || cache;\n\n\t\treturn cacheValue;\n\t};\n\tmemoized.cache = new (memoize.Cache || Map)();\n\treturn memoized;\n}\n\nmemoize.Cache = Map;\n\nmemoize.collectStats = function collectStats(value = true) {\n\ttrackStats = value;\n};\n\nmemoize.clearStats = function clearStats() {\n\tstats = {};\n};\n\nmemoize.getStats = function getStats() {\n\treturn Object.keys(stats).reduce((obj, current) => {\n\t\tconst {hits, calls} = stats[current];\n\t\tconst stat = {\n\t\t\t...stats[current],\n\t\t\tusage: calls ? `${((hits / calls) * 100).toFixed(4)}%` : '0.0000%'\n\t\t};\n\t\treturn {\n\t\t\t...obj,\n\t\t\t[current]: stat\n\t\t};\n\t}, {});\n};\n\nfunction cloneVnode(vnode) {\n\tif (!vnode) return vnode;\n\treturn {\n\t\tchildren:\n\t\t\tvnode.children !== undefined ? vnode.children.map(child => cloneVnode(child)) : undefined,\n\t\tdata: vnode.data,\n\t\telm: undefined,\n\t\tkey: vnode.key,\n\t\tsel: vnode.sel,\n\t\ttext: vnode.text\n\t};\n}\n", "/**\n * Finds the key of the first element predicate that returns truthy.\n *\n * @example\n * findKey({foo: 0, bar: 1}, value => value === 1);\n * // => 'bar'\n *\n * @function findKey\n * @param {Object} object The object to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @return {*} Returns the key of the first matched element, otherwise `undefined`.\n */\nexport default function findKey(object, predicate) {\n\tif (!object) return;\n\n\tconst result = Object.entries(object).find(([key, value]) => predicate(value, key));\n\tif (result) {\n\t\tconst [key] = result;\n\t\treturn key;\n\t}\n}\n", "import {splitPath} from './splitPath';\n\n/**\n * Gets the property value at `path` from `object`.  If the value cannot\n * resolved or is `undefined`, the `defaultValue` is returned.\n *\n * @example\n * const object = { 'foo': [{ 'bar': { 'baz': 1 } }] }\n * get(object, 'foo[0].bar.baz');\n * // => 1\n *\n * @function get\n * @param {Object} object The object to query.\n * @param {string} path The path of the property to get.\n * @param {*} [defaultValue] The returned value for unresolved properties.\n * @return {*} Returns the value from the specified `path`.\n */\nexport default function get(object, path, defaultValue) {\n\tif (!object || !path) return defaultValue;\n\n\tconst parts = splitPath(path);\n\tlet here = object;\n\tconst {length: partsCount} = parts;\n\tfor (let i = 0; i < partsCount; i++) {\n\t\tif (!here || !Object.prototype.hasOwnProperty.call(here, parts[i])) return defaultValue;\n\t\there = here[parts[i]];\n\t}\n\n\treturn here !== undefined ? here : defaultValue;\n}\n", "import memoize from './memoize';\n\n/**\n * Splits a property path into parts.\n * @function splitPath\n * @private\n * @param {string} path String path to split into parts.\n * @return {Array<(string)>} An array of path parts.\n */\nconst splitPathMemoized = memoize(\n\tfunction splitPath(path) {\n\t\t// Added support using Symbol as keys\n\t\tif (typeof path === 'symbol') return [path];\n\n\t\tif (typeof path !== 'string' && !Array.isArray(path)) return [];\n\n\t\tif (Array.isArray(path)) return path;\n\n\t\tconst keys = path.split('.');\n\n\t\tfor (let i = 0; i < keys.length; i++) {\n\t\t\tconst part = keys[i];\n\t\t\tconst {length: partLength} = part;\n\t\t\tif (part.charAt(partLength - 1) === ']') {\n\t\t\t\tconst index = [];\n\t\t\t\tlet char = '[';\n\t\t\t\tlet indexStartPosition = part.indexOf(char);\n\t\t\t\tconst key = part.substring(0, indexStartPosition);\n\n\t\t\t\tif (key)\n\t\t\t\t\t// key will be empty for `[0].bar`\n\t\t\t\t\tindex.push(key);\n\n\t\t\t\twhile (indexStartPosition < partLength) {\n\t\t\t\t\tif (char !== '[' && char !== ']') {\n\t\t\t\t\t\tconst indexEndPosition = part.indexOf(']', indexStartPosition);\n\t\t\t\t\t\tlet arrayPart = part.substring(indexStartPosition, indexEndPosition);\n\n\t\t\t\t\t\t// If the part inside the array access is wrapped in quotes, remove them\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tarrayPart.charAt(0) === arrayPart.charAt(arrayPart.length - 1) &&\n\t\t\t\t\t\t\t[\"'\", '\"'].includes(arrayPart.charAt(0))\n\t\t\t\t\t\t)\n\t\t\t\t\t\t\tarrayPart = arrayPart.slice(1, -1);\n\n\t\t\t\t\t\tindex.push(arrayPart); // this could be [0] or [foo]\n\t\t\t\t\t\tindexStartPosition = indexEndPosition;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tindexStartPosition += 1;\n\t\t\t\t\t}\n\n\t\t\t\t\tchar = part.charAt(indexStartPosition);\n\t\t\t\t}\n\n\t\t\t\tconst {length: indexLength} = index;\n\t\t\t\tif (indexLength) {\n\t\t\t\t\tkeys.splice(i, 1, ...index);\n\t\t\t\t\ti += indexLength - 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn keys;\n\t},\n\tnull,\n\t{profileName: 'splitPath'}\n);\n\nexport {splitPathMemoized as splitPath};\n", "import {splitPath} from './splitPath';\n\n/**\n * Sets the property value at `path` on `object`.  If a portion of the `path` does not exist, it\n * will be created.\n *\n * Note: This method mutates the object.\n *\n * @example\n * const object = { foo: [{ bar: { baz: 3 } }] };\n * set(object, 'foo[0].bar.baz', 4);\n *\n * @function set\n * @param {Object} object The object to modify.\n * @param {string} path The path of the property to set.\n * @param {*} value The value to set.\n */\nexport default function set(object, path, value) {\n\tif (!object || !path) return;\n\n\tconst parts = splitPath(path);\n\n\tlet here = object;\n\tlet next;\n\tconst {length: partsCount} = parts;\n\tfor (let i = 0; i < partsCount; i++) {\n\t\tconst shouldSet = i + 1 === partsCount;\n\t\tconst part = parts[i];\n\t\tnext = here[part];\n\t\tif (!next) {\n\t\t\tconst nextNext = parts[i + 1];\n\t\t\tconst index = Number.parseInt(nextNext);\n\t\t\tnext = here[part] = index == nextNext && !Number.isNaN(index) ? [] : {}; // eslint-disable-line eqeqeq, no-multi-assign\n\t\t}\n\t\tif (shouldSet) here[part] = value;\n\n\t\there = next;\n\t}\n}\n", "/**\n * Creates an object composed of the picked properties from the `source` object.\n * @example\n * const object = { foo: 0, bar: 1, baz: 2 };\n * pick(object, ['bar', 'baz']);\n * // => { bar: 1, baz: 2 }\n *\n * @function pick\n * @param {Object} source The object to pick from.\n * @param {(string[]|string)} path The property path(s) to pick.\n * @return {Object} Returns an object with the picked properties.\n */\nexport default function pick(source, path) {\n\tconst values = {};\n\tif (!path || !path.length || !source) return {};\n\n\tconst paths = typeof path === 'string' ? [path] : path;\n\tconst {length: pathLength} = paths;\n\tfor (let i = 0; i < pathLength; i++) {\n\t\tconst key = paths[i];\n\t\tif (source.hasOwnProperty(key)) values[key] = source[key];\n\t}\n\n\treturn values;\n}\n", "/**\n * Creates an object composed of all but the omitted properties from the `source` object.\n * @example\n * const object = { foo: 0, bar: 1, baz: 2 };\n * omit(object, ['bar', 'baz']);\n * // => { foo: 0 }\n *\n * @function omit\n * @param {Object} source The object to omit from.\n * @param {(string[]|string)} path The property path(s) to omit.\n * @return {Object} Returns an object without the omitted properties.\n */\nexport default function omit(source, path) {\n\tif (!path || !path.length || !source) return source;\n\n\tconst values = {};\n\tconst paths = typeof path === 'string' ? [path] : path;\n\tconst {length: pathLength} = paths;\n\tfor (const key in source) {\n\t\tlet shouldOmit = false;\n\t\tfor (let i = 0; i < pathLength; i++) {\n\t\t\tif (key === paths[i]) shouldOmit = true;\n\t\t}\n\n\t\tif (!shouldOmit) values[key] = source[key];\n\t}\n\n\treturn values;\n}\n", "/**\n * Creates an array of the own enumerable string-keyed property values from the `source` object.\n * @example\n * function Foo() {\n *   this.bar = 0;\n *   this.baz = 1;\n * }\n * Foo.prototype.qux = 2\n *\n * values(new Foo);\n * // => [0, 1]\n *\n * @function values\n * @param {Object} source The object to query.\n * @return {Array<*>} Returns an array of property values.\n */\nexport default function values(source) {\n\tconst values = [];\n\tif (!source) return values;\n\n\tconst entries = Object.entries(source);\n\tconst {length: entriesLength} = entries;\n\tfor (let i = 0; i < entriesLength; i++) values.push(entries[i][1]);\n\n\treturn values;\n}\n", "/**\n * This method does nothing and returns undefined.\n *\n * @example\n * noop()\n * // => undefined\n *\n * @function noop\n */\nexport default function noop() {\n\t// No operation performed.\n}\n", "function isArrayEqual(source, target, options) {\n\tconst {length: sourceLength} = source;\n\tconst {length: targetLength} = target;\n\n\tif (sourceLength !== targetLength) return false;\n\n\tfor (let i = 0; i < sourceLength; i++) {\n\t\tif (!isEqual(source[i], target[i], options)) return false;\n\t}\n\n\treturn true;\n}\n\nfunction isObjectEqual(source, target, options) {\n\tif ((!source && target) || (source && !target)) return false;\n\n\tconst sourceKeys = Object.keys(source);\n\tconst targetKeys = Object.keys(target);\n\tconst {length: sourceKeyLength} = sourceKeys;\n\tconst {length: targetKeyLength} = targetKeys;\n\n\tif (sourceKeyLength !== targetKeyLength) return false;\n\n\treturn sourceKeys.every(key => isEqual(source[key], target[key], options));\n}\n\nfunction isObjectTagEqual(source, target, options) {\n\tconst {classes = true} = options;\n\tconst sourceTag = Object.prototype.toString.call(source);\n\tconst targetTag = Object.prototype.toString.call(target);\n\n\tif (sourceTag !== targetTag) return false;\n\n\tswitch (sourceTag) {\n\t\tcase '[object Boolean]':\n\t\tcase '[object Number]':\n\t\tcase '[object Date]':\n\t\t\treturn eq(+source, +target);\n\n\t\tcase '[object Set]':\n\t\t\treturn isArrayEqual([...source], [...target], options);\n\n\t\tcase '[object Map]':\n\t\t\treturn isObjectEqual(Object.fromEntries(source), Object.fromEntries(target), options);\n\n\t\tcase '[object String]':\n\t\t\treturn `${source}` === `${target}`;\n\n\t\tcase '[object Object]':\n\t\t\tif (!classes && source.constructor !== Object) return source === target;\n\t\t\treturn isObjectEqual(source, target, options);\n\t}\n}\n\nexport const eq = function (source, target) {\n\t// Given:\n\t// const source = { 'a': 1 };\n\t// const target = { 'a': 1 };\n\t//\n\t// Results:\n\t// eq(source, source)  => true\n\t// eq(source, target) => false\n\t// eq('a', 'a') => true\n\t// eq('a', Object('a')) => false\n\t// eq(NaN, NaN) => true\n\treturn source === target || (source !== source && target !== target);\n};\n\n/**\n * Performs a deep equality check between two values.\n *\n * @example\n * const foo = { a: 1 };\n * const bar = { a: 1 };\n *\n * isEqual(foo, bar);\n * // => true\n *\n * foo === bar\n * // => false\n *\n * @function isEqual\n * @param {*} source The value to compare.\n * @param {*} target The value to compare `source` against.\n * @return {boolean} Returns `true` if the values are equal, otherwise `false`.\n */\nexport default function isEqual(source, target, options = {}) {\n\tif (source === target) return true;\n\n\tif (Array.isArray(source) && Array.isArray(target)) return isArrayEqual(source, target, options);\n\n\tconst result = isObjectTagEqual(source, target, options);\n\tif (result !== undefined) return result;\n\n\tif (typeof source === 'object' && typeof target === 'object')\n\t\treturn isObjectEqual(source, target, options);\n\n\treturn typeof source === 'function' && typeof target === 'function' && source === target;\n}\n", "import {eq} from './isEqual';\n/**\n * Performs a deep equality check between two object values selectively.\n *\n * @example\n * const source = { a: 1, b:1 };\n * const target = { a: 1 };\n *\n * isObjectMatches(foo, bar);\n * // => true\n * const source = { a: 1, b:1 };\n * const target = { a: 2 };\n *\n * foo === bar\n * // => false\n *\n * @function isObjectMatches\n * @param {*} source The value to compare.\n * @param {*} target The value to compare `source` against selectively.\n * @return {boolean} Returns `true` if the target values are selectively equal, otherwise `false`.\n */\n\nfunction isObjectMatches(source, target, options = {}) {\n\tif (!source || !target) return false;\n\tif (typeof target !== 'object' && typeof source !== 'object') return false;\n\tfor (var key in target) {\n\t\tif (target.hasOwnProperty(key) && !source.hasOwnProperty(key)) return false;\n\t\tif (source.hasOwnProperty(key) && !isSelectiveEqual(source[key], target[key], options))\n\t\t\treturn false;\n\t}\n\treturn true;\n}\n\n/**\n * Performs a deep equality check between two values of array.\n *\n * @example\n * const source = [{ a: 1 }, { b:1 }];\n * const target = [{ a: 1 }, { b:1 }];\n *\n * isArrayMatches(foo, bar);\n * // => true\n *\n * foo === bar\n * // => false\n *\n * @function isArrayMatches\n * @param {*} source The value to compare.\n * @param {*} target The value to compare `source` against selectively.\n * @return {boolean} Returns `true` if the target values are selectively equal, otherwise `false`.\n */\n\nfunction isArrayMatches(source, target, options) {\n\tconst {length: sourceLength} = source;\n\tconst {length: targetLength} = target;\n\n\tif (sourceLength !== targetLength) return false;\n\n\tfor (let i = 0; i < sourceLength; i++) {\n\t\tif (!isSelectiveEqual(source[i], target[i], options)) return false;\n\t}\n\n\treturn true;\n}\n\n/**\n * Performs a deep equality check between two values selectively.\n *\n * @example\n * const source = { a: 1, b:1 };\n * const target = { a: 1 };\n *\n * isSelectiveEqual(foo, bar);\n * // => true\n *\n * foo === bar\n * // => false\n *\n * @function isSelectiveEqual\n * @param {*} source The value to compare.\n * @param {*} target The value to compare `source` against selectively.\n * @return {boolean} Returns `true` if the target values are selectively equal, otherwise `false`.\n */\n\nexport default function isSelectiveEqual(source, target, options = {}) {\n\tif (source === target) return true;\n\tif (Array.isArray(source) && Array.isArray(target))\n\t\treturn isArrayMatches(source, target, options);\n\tconst result = isObjectTagMatches(source, target, options);\n\tif (result !== undefined) return result;\n\n\tif (typeof source === 'object' && typeof target === 'object')\n\t\treturn isObjectMatches(source, target, options);\n\n\treturn typeof source === 'function' && typeof target === 'function' && source === target;\n}\n\n/**\n * Performs a object type comparision based on different data types of object and delegates the comparision to respective functions\n *\n * @example\n * const source = { a: 1, b:1 };\n * const target = { a: 1 };\n *\n * isObjectTagMatches(foo, bar);\n * // => true\n *\n * const source = { a: 1, b:1 };\n * const target = { a: 2 };\n * // => false\n *\n * @function isObjectTagMatches\n * @param {*} source The value to compare.\n * @param {*} target The value to compare `source` against selectively.\n * @return {boolean} Returns `true` if the target values are selectively equal, otherwise `false`.\n */\n\nfunction isObjectTagMatches(source, target, options) {\n\tconst {classes = true} = options;\n\tconst sourceTag = Object.prototype.toString.call(source);\n\tconst targetTag = Object.prototype.toString.call(target);\n\n\tif (sourceTag !== targetTag) return false;\n\n\tswitch (sourceTag) {\n\t\tcase '[object Boolean]':\n\t\tcase '[object Number]':\n\t\tcase '[object Date]':\n\t\t\treturn eq(+source, +target);\n\n\t\tcase '[object Set]':\n\t\t\treturn isArrayMatches([...source], [...target], options);\n\n\t\tcase '[object Map]':\n\t\t\treturn isObjectMatches(Object.fromEntries(source), Object.fromEntries(target), options);\n\n\t\tcase '[object String]':\n\t\t\treturn `${source}` === `${target}`;\n\n\t\tcase '[object Object]':\n\t\t\tif (!classes && source.constructor !== Object) return source === target;\n\t\t\treturn isObjectMatches(source, target, options);\n\t}\n}\n", "/**\n * Checks whether a value is a plain object, an object with a prototype of `Object`.\n *\n * @example\n * isPlainObject(new Date());\n * // => false\n *\n * isPlainObject({ foo: 1, bar: 2 });\n * // => true\n *\n * @function isPlainObject\n * @param {*} value The value to check.\n * @return {boolean} Returns `true` if `value` is a plain object, else `false`.\n */\nexport default function isPlainObject(value) {\n\treturn (\n\t\t!!value &&\n\t\ttypeof value === 'object' &&\n\t\tObject.prototype.toString.call(value) === '[object Object]'\n\t);\n}\n", "/**\n * The isEmpty function determines if a given value is empty or not.\n * @param {any} value The value to check\n * @returns {boolean} True if the value is empty, false otherwise\n */\nexport default function isEmpty(value) {\n\tif (value == null) return true;\n\tif (typeof value === 'string' || Array.isArray(value)) return value.length === 0;\n\n\tif (value instanceof Map || value instanceof Set) return value.size === 0;\n\n\tif (typeof value === 'object') return Object.keys(value).length === 0;\n\n\treturn false;\n}\n", "import isThrottled from './isThrottled';\nimport nextTick from './nextTick';\nimport {logDeferTiming} from './deferMetrics';\n\nexport default function defer(fn, duration = 0) {\n\tlogDeferTiming(duration);\n\treturn isThrottled() ? nextTick(fn) : setTimeout(fn, duration);\n}\n", "const globalValueToBoolean = value => value === true || value === 'true';\n\nexport default () =>\n\tdocument.hidden &&\n\t!globalValueToBoolean(\n\t\twindow?.ux_globals?.sysprops?.['sn_nxui_framework.scheduler.unchained.defer.off']\n\t) &&\n\t!globalValueToBoolean(\n\t\twindow?.ux_globals?.nxui?.sysprops?.['sn_nxui_framework.scheduler.unchained.defer.off']\n\t);\n", "const nextTick = fn => {\n\tconst channel = new MessageChannel();\n\tchannel.port1.onmessage = () => fn();\n\tchannel.port2.postMessage(null);\n};\nexport default nextTick;\n", "//Have to have the following logic within utils package to avoid circular dependency\nlet deferMetrics = {};\nconst UNKNOWN_COMPONENT_NAME = 'UNKNOWN';\n\nexport function clearDeferMetrics() {\n\tdeferMetrics = {};\n}\n\nexport function logDuration(metrics, duration = 0, incomingComponentName) {\n\tconst componentName = incomingComponentName ? incomingComponentName : UNKNOWN_COMPONENT_NAME;\n\tif (!metrics[componentName]) metrics[componentName] = [];\n\n\tmetrics[componentName].push(duration);\n}\n\nexport function getDeferMetrics() {\n\treturn deferMetrics;\n}\n\nexport function logDeferTiming(duration) {\n\tlogDuration(deferMetrics, duration);\n}\n", "import isThrottled from './isThrottled';\nimport {default as requestIdleCallback, requestIdleCallbackPollyfill} from './requestIdleCallback';\n\nexport default function whenIdle(fn) {\n\treturn isThrottled() ? requestIdleCallbackPollyfill(fn) : requestIdleCallback(fn);\n}\n", "import defer from './defer';\n\nexport function requestIdleCallbackPollyfill(callback) {\n\tdefer(function requestIdleCallbackPollyfillTimeout() {\n\t\tconst start = Date.now();\n\t\tconst maxBusy = 100;\n\t\tcallback({\n\t\t\tdidTimeout: false,\n\t\t\ttimeRemaining() {\n\t\t\t\treturn Math.max(0, maxBusy - (Date.now() - start));\n\t\t\t}\n\t\t});\n\t});\n}\n\n/**\n * This method queues a function to be called during a browser's idle periods\n * @example\n * requestIdleCallback(() => {})\n *\n * @function requestIdleCallback\n * @param {Function} callback The callback function to execute\n * @return {Object} undefined\n */\nconst requestIdleCallback = window.requestIdleCallback || requestIdleCallbackPollyfill;\n\n/*\nChromium based browsers have a bug in which Iframes and rIC do not work well together.\n\nSee -\n\nhttps://bugs.chromium.org/p/chromium/issues/detail?id=1240307\nhttps://bugs.chromium.org/p/chromium/issues/detail?id=1240317\n\nso when we see an Iframe on Chromium, we force rIC to be called every X milliseconds to\nensure the tasks are run.\n\nDO NOT MOVE THIS TO A UTILS FILE, we want to get rid of this logic ASAP rather than reuse it\nelsewhere\n*/\nconst isChromium = window?.navigator?.userAgentData?.brands?.some(b => b.brand === 'Chromium');\nconst isIframe = window?.location !== window?.parent?.location;\n// eslint-disable-next-line no-undef\nconst isWebWorker = typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope;\n\nconst rIC =\n\tisWebWorker || (isChromium && isIframe) ? requestIdleCallbackPollyfill : requestIdleCallback;\n\nexport default rIC;\n", "import isThrottled from './isThrottled';\nimport nextTick from './nextTick';\n\nexport default function raf(fn) {\n\treturn isThrottled() ? nextTick(fn) : requestAnimationFrame(fn);\n}\n", "/**\n *\n * @param {*} snHttpFactoryConfig\n * @returns A function, that when called, will create an instance of sn-http-request\n */\nconst createSnHttp = snHttpFactoryConfig => async () => {\n\tconst snHttpRequest = await import('sn-http-request');\n\tconst {snHttpFactory} = snHttpRequest;\n\tconst snHttp = snHttpFactory(snHttpFactoryConfig);\n\n\treturn snHttp;\n};\n\nexport default createSnHttp;\n", "export const DEFAULT = 'DEFAULT';\nexport const TEST = 'test';\nexport const DEV = 'development';\nexport const PROD = 'production';\nexport const NOW_UI_FRAMEWORK = 'nowUiFramework';\nexport const NOW_UI_CONFIG = 'NOW_UI_CONFIG';\nexport const NOW_UI_EVENT = 'NOW_UI_EVENT';\n\n/**\n * Config Values\n */\nexport const AMB_GC = 'ambGC';\nexport const GQL_CACHE_CAPACITY = 'graphQLCacheCapacity';\nexport const GQL_CACHING_ENABLED = 'graphQLCachingEnabled';\nexport const GQL_CACHING_REFRESH_DELAY = 'graphQLCacheDelay';\nexport const GQL_CACHE_MAX_PERSIST = 'gqlCacheMaxPersist';\nexport const HTTP_CACHE_CAPACITY = 'httpCacheCapacity';\nexport const HTTP_CACHING_ENABLED = 'httpCachingEnabled';\nexport const HTTP_CACHING_REFRESH_DELAY = 'httpCacheDelay';\nexport const HTTP_CACHE_MAX_PERSIST = 'httpCacheMaxPersist';\nexport const TELEMETRY_MARKING_ENABLED = 'telemetryMarkingEnabled';\nexport const CHECK_FOR_POSSIBLE_PRESENTATIONAL_COMPONENTS =\n\t'checkForPossiblePresentationalComponents';\nexport const DISABLE_GQL_BATCHING = 'disableGraphQLBatching';\nexport const DISABLE_REST_BATCHING = 'disableRestBatching';\nexport const ENABLE_ACTION_DISPATCHED_HANDLING = 'enableActionDispatchedHandling';\nexport const GARBAGE_COLLECTOR_INTERVAL = 'GARBAGE_COLLECTOR_INTERVAL';\nexport const INTERSECT_ROOT_MARGIN = 'intersectRootMargin';\nexport const LOGGING_ENABLED = 'loggingEnabled';\nexport const LOGGING_LEVELS = 'loggingLevels';\nexport const LOGS_OBSERVER_INTERVAL = 'logsObserverInterval';\nexport const LOGS_CLEANUP_INTERVAL = 'logsCleanupInterval';\nexport const MEMOIZE = 'memoize';\nexport const METRICS_LEVEL = 'metricsLevel';\nexport const METRICS_OBSERVER_INTERVAL = 'metricsObserverInterval';\nexport const METRICS_TYPES = 'metricTypes';\nexport const POSSIBLE_PRESENTATIONAL_COMPONENTS = 'possiblePresentationalComponents';\nexport const QUEUE_FLUSH_ENABLED = 'queueFlushEnabled';\nexport const TIME_TO_WAIT_AFTER_DISCONNECT = 'TIME_TO_WAIT_AFTER_DISCONNECT';\nexport const VALIDATE_SCHEMAS = 'validateSchemas';\nexport const ENABLE_SCHEDULER_STATS = 'enableSchedulerStats';\nexport const METRICS_USE_WINDOW_PERFORMANCE = 'metricsUseWindowPerformance';\nexport const ENABLE_PROPERTY_DEEP_COMPARE = 'enablePropertyDeepCompare';\nexport const ENABLE_DECLARATIVE_STATE_UPDATE_DEEP_COMPARE =\n\t'enableDeclarativeStateUpdateDeepCompare';\nexport const PAGE_OPT_OUT_PROPERTY_DEEP_COMPARE = 'pageOptOutOfPropertyDeepCompare';\nexport const PAGE_OPT_OUT_STATE_DEEP_COMPARE = 'pageOptOutOfStateDeepCompare';\nexport const MEMOIZE_SNABBDOM_PROP_PARTS = 'memoizeSnabbdomPropParts';\nexport const ENABLE_SCHEDULER_QUEUE_COUNTS = 'enableSchedulerQueueCounts';\nexport const METRICS_ELEMENT_CONFIG_ENABLED = 'metricsElementConfigEnabled';\nexport const METRICS_COMPONENT_INTERACTIVE_ENABLED = 'metricsComponentInteractiveEnabled';\nexport const ARIA_LIVE_ASSERTIVE_TIMEOUT = 'ariaLiveAssertiveTimeout';\nexport const ARIA_LIVE_POLITE_TIMEOUT = 'ariaLivePoliteTimeout';\nexport const WHEN_COMPONENT_IS_IDLE_TIMEOUT = 'whenComponentIsIdleTimeout';\nexport const WHEN_COMPONENT_IS_IDLE_THROTTLE = 'whenComponentIsIdleThrottle';\nexport const WHEN_COMPONENT_IS_IDLE_MIN_INTERVAL = 'whenComponentIsIdleMinInterval';\nexport const SCHEDULER_RAF_TIMEOUT = 'schedulerRafTimeout';\nexport const METRICS_MARK_PRUNING_INTERVAL = 'metricsMarkPruningInterval';\nexport const METRICS_MARK_EXPIRATION = 'metricsMarkExpiration';\nexport const METRICS_PRUNE_MARKS = 'metricsPruneMarks';\n\nexport const EMBEDDABLE_BASE_URL = Symbol('EMBEDDABLE_BASE_URL');\n\nexport const NOW_UI_FRAMEWORK_CONFIG_KEYS = [\n\tAMB_GC,\n\tGQL_CACHE_CAPACITY,\n\tGQL_CACHING_ENABLED,\n\tGQL_CACHE_MAX_PERSIST,\n\tGQL_CACHING_REFRESH_DELAY,\n\tHTTP_CACHE_CAPACITY,\n\tHTTP_CACHING_ENABLED,\n\tTELEMETRY_MARKING_ENABLED,\n\tCHECK_FOR_POSSIBLE_PRESENTATIONAL_COMPONENTS,\n\tDISABLE_GQL_BATCHING,\n\tDISABLE_REST_BATCHING,\n\tENABLE_ACTION_DISPATCHED_HANDLING,\n\tINTERSECT_ROOT_MARGIN,\n\tLOGGING_ENABLED,\n\tLOGGING_LEVELS,\n\tLOGS_OBSERVER_INTERVAL,\n\tLOGS_CLEANUP_INTERVAL,\n\tMETRICS_LEVEL,\n\tMETRICS_OBSERVER_INTERVAL,\n\tMETRICS_TYPES,\n\tPOSSIBLE_PRESENTATIONAL_COMPONENTS,\n\tQUEUE_FLUSH_ENABLED,\n\tVALIDATE_SCHEMAS,\n\tENABLE_SCHEDULER_STATS,\n\tMETRICS_USE_WINDOW_PERFORMANCE,\n\tPAGE_OPT_OUT_PROPERTY_DEEP_COMPARE,\n\tPAGE_OPT_OUT_STATE_DEEP_COMPARE,\n\tMEMOIZE_SNABBDOM_PROP_PARTS,\n\tENABLE_SCHEDULER_QUEUE_COUNTS,\n\tENABLE_PROPERTY_DEEP_COMPARE,\n\tENABLE_DECLARATIVE_STATE_UPDATE_DEEP_COMPARE,\n\tMETRICS_ELEMENT_CONFIG_ENABLED,\n\tMETRICS_COMPONENT_INTERACTIVE_ENABLED,\n\tARIA_LIVE_ASSERTIVE_TIMEOUT,\n\tARIA_LIVE_POLITE_TIMEOUT,\n\tWHEN_COMPONENT_IS_IDLE_TIMEOUT,\n\tWHEN_COMPONENT_IS_IDLE_THROTTLE,\n\tWHEN_COMPONENT_IS_IDLE_MIN_INTERVAL,\n\tSCHEDULER_RAF_TIMEOUT,\n\tMETRICS_MARK_PRUNING_INTERVAL,\n\tMETRICS_MARK_EXPIRATION,\n\tMETRICS_PRUNE_MARKS,\n\tEMBEDDABLE_BASE_URL\n];\n\nexport const NXUI_SYS_PROPS = {\n\t'sn_nxui_framework.performance.cache.graphql.capacity': GQL_CACHE_CAPACITY,\n\t'sn_nxui_framework.performance.cache.graphql.enabled': GQL_CACHING_ENABLED,\n\t'sn_nxui_framework.performance.cache.graphql.max_persist': GQL_CACHE_MAX_PERSIST,\n\t'sn_nxui_framework.performance.cache.graphql.delay': GQL_CACHING_REFRESH_DELAY,\n\t'sn_nxui_framework.performance.cache.http.capacity': HTTP_CACHE_CAPACITY,\n\t'sn_nxui_framework.performance.cache.http.enabled': HTTP_CACHING_ENABLED,\n\t'sn_nxui_framework.performance.cache.http.max_persist': HTTP_CACHE_MAX_PERSIST,\n\t'sn_nxui_framework.performance.cache.http.delay': HTTP_CACHING_REFRESH_DELAY,\n\t'sn_nxui_framework.performance.telemetry.marking.enabled': TELEMETRY_MARKING_ENABLED,\n\t'sn_nxui_framework.performance.telemetry.window.top.enabled': METRICS_USE_WINDOW_PERFORMANCE,\n\t'sn_nxui_framework.performance.property.deep.compare.enabled': ENABLE_PROPERTY_DEEP_COMPARE,\n\t'sn_nxui_framework.performance.declarative.state.update.deep.compare.enabled':\n\t\tENABLE_DECLARATIVE_STATE_UPDATE_DEEP_COMPARE,\n\t'sn_nxui_framework.performance.page.opt.out.property.deep.compare':\n\t\tPAGE_OPT_OUT_PROPERTY_DEEP_COMPARE,\n\t'sn_nxui_framework.performance.page.opt.out.state.deep.compare': PAGE_OPT_OUT_STATE_DEEP_COMPARE,\n\t'sn_nxui_framework.performance.memoize.snabbdom.prop.parts': MEMOIZE_SNABBDOM_PROP_PARTS,\n\t'sn_nxui_framework.performance.scheduler.queue.counts.enabled': ENABLE_SCHEDULER_QUEUE_COUNTS,\n\t'sn_nxui_framework.performance.scheduler.stats.enabled': ENABLE_SCHEDULER_STATS,\n\t'sn_nxui_framework.performance.metrics.element.config.enabled': METRICS_ELEMENT_CONFIG_ENABLED,\n\t'sn_nxui_framework.interactive_mark': METRICS_COMPONENT_INTERACTIVE_ENABLED,\n\t'sn_nxui_framework.disableGraphQLBatching': DISABLE_GQL_BATCHING,\n\t'sn_nxui_framework.whenComponentIsIdleTimeout': WHEN_COMPONENT_IS_IDLE_TIMEOUT,\n\t'sn_nxui_framework.whenComponentIsIdleThrottle': WHEN_COMPONENT_IS_IDLE_THROTTLE,\n\t'sn_nxui_framework.whenComponentIsIdleMinInterval': WHEN_COMPONENT_IS_IDLE_MIN_INTERVAL,\n\t'sn_nxui_framework.metricsObserverInterval': METRICS_OBSERVER_INTERVAL,\n\t'sn_nxui_framework.schedulerRafTimeout': SCHEDULER_RAF_TIMEOUT,\n\t'sn_nxui_framework.metricsMarkPruningInterval': METRICS_MARK_PRUNING_INTERVAL,\n\t'sn_nxui_framework.metricsMarkExpiration': METRICS_MARK_EXPIRATION,\n\t'sn_nxui_framework.metricsPruneMarks': METRICS_PRUNE_MARKS,\n\t'sn_nxui_framework.metricsLevel': METRICS_LEVEL,\n\t'sn_nxui_framework.logging.enabled': LOGGING_ENABLED,\n\t'sn_nxui_framework.logging.level': LOGGING_LEVELS\n};\n", "import {NOW_UI_EVENT} from './constants';\n\nconst emitNowUiEvent = (type, detail) => {\n\tif (!window.__ENABLE_NOW_UI_EVENT__) return;\n\tconst event = new CustomEvent(NOW_UI_EVENT, {\n\t\tcomposed: true,\n\t\tbubbles: true,\n\t\tdetail: {\n\t\t\ttype,\n\t\t\t...detail\n\t\t}\n\t});\n\tdocument.dispatchEvent(event);\n};\n\nexport default emitNowUiEvent;\n", "import {devConfig} from './dev';\nimport {prodConfig} from './prod';\nimport {testConfig} from './test';\n\nimport {DEV, PROD, TEST} from '../constants';\n\n/***\n * @function getConfigForEnv\n * @description gets the default config values for the process.env\n */\nexport const getConfigForEnv = () => {\n\tconst configEnv = process.env.NODE_ENV ? process.env.NODE_ENV : PROD;\n\tif (configEnv === PROD) return prodConfig;\n\n\tif (configEnv === DEV) return {...prodConfig, ...devConfig};\n\n\tif (configEnv === TEST) return {...prodConfig, ...testConfig};\n\n\treturn {};\n};\n", "import {\n\tAMB_GC,\n\tGARBAGE_COLLECTOR_INTERVAL,\n\tTIME_TO_WAIT_AFTER_DISCONNECT,\n\tGQL_CACHE_CAPACITY,\n\tGQL_CACHING_ENABLED,\n\tGQL_CACHING_REFRESH_DELAY,\n\tHTTP_CACHING_REFRESH_DELAY,\n\tHTTP_CACHE_CAPACITY,\n\tHTTP_CACHING_ENABLED,\n\tCHECK_FOR_POSSIBLE_PRESENTATIONAL_COMPONENTS,\n\tLOGGING_ENABLED,\n\tLOGGING_LEVELS,\n\tLOGS_OBSERVER_INTERVAL,\n\tLOGS_CLEANUP_INTERVAL,\n\tVALIDATE_SCHEMAS,\n\tENABLE_SCHEDULER_STATS,\n\tMETRICS_COMPONENT_INTERACTIVE_ENABLED,\n\tARIA_LIVE_ASSERTIVE_TIMEOUT,\n\tARIA_LIVE_POLITE_TIMEOUT,\n\tWHEN_COMPONENT_IS_IDLE_TIMEOUT,\n\tWHEN_COMPONENT_IS_IDLE_THROTTLE,\n\tWHEN_COMPONENT_IS_IDLE_MIN_INTERVAL,\n\tMETRICS_OBSERVER_INTERVAL,\n\tSCHEDULER_RAF_TIMEOUT,\n\tMETRICS_MARK_PRUNING_INTERVAL,\n\tMETRICS_MARK_EXPIRATION,\n\tMETRICS_PRUNE_MARKS\n} from '../constants';\n\nexport const devConfig = {};\n\n// AMB GC\ndevConfig[AMB_GC] = {};\ndevConfig[AMB_GC][GARBAGE_COLLECTOR_INTERVAL] = 20000;\ndevConfig[AMB_GC][TIME_TO_WAIT_AFTER_DISCONNECT] = 5000;\n\n// Caching\ndevConfig[GQL_CACHING_ENABLED] = true;\ndevConfig[GQL_CACHING_REFRESH_DELAY] = 500;\ndevConfig[GQL_CACHE_CAPACITY] = 3;\ndevConfig[HTTP_CACHING_ENABLED] = true;\ndevConfig[HTTP_CACHE_CAPACITY] = 3;\ndevConfig[HTTP_CACHING_REFRESH_DELAY] = 500;\n\n// Logging\ndevConfig[LOGGING_ENABLED] = true;\ndevConfig[LOGGING_LEVELS] = true;\ndevConfig[LOGS_OBSERVER_INTERVAL] = 1000;\ndevConfig[LOGS_CLEANUP_INTERVAL] = 60000;\n\n// Validation\ndevConfig[VALIDATE_SCHEMAS] = true;\ndevConfig[CHECK_FOR_POSSIBLE_PRESENTATIONAL_COMPONENTS] = true;\n\ndevConfig[ENABLE_SCHEDULER_STATS] = true;\n\ndevConfig[METRICS_COMPONENT_INTERACTIVE_ENABLED] = true;\n\ndevConfig[ARIA_LIVE_ASSERTIVE_TIMEOUT] = 500;\ndevConfig[ARIA_LIVE_POLITE_TIMEOUT] = 5000;\n\ndevConfig[WHEN_COMPONENT_IS_IDLE_TIMEOUT] = 5000;\ndevConfig[WHEN_COMPONENT_IS_IDLE_THROTTLE] = 50;\ndevConfig[WHEN_COMPONENT_IS_IDLE_MIN_INTERVAL] = 25;\n\ndevConfig[METRICS_OBSERVER_INTERVAL] = 3000;\ndevConfig[SCHEDULER_RAF_TIMEOUT] = 0;\n\ndevConfig[METRICS_MARK_PRUNING_INTERVAL] = 300000;\ndevConfig[METRICS_MARK_EXPIRATION] = 300000;\ndevConfig[METRICS_PRUNE_MARKS] = true;\n", "import {memoize} from '@servicenow/ui-utils';\nimport {\n\tAMB_GC,\n\tGQL_CACHE_CAPACITY,\n\tGQL_CACHING_ENABLED,\n\tHTTP_CACHE_CAPACITY,\n\tHTTP_CACHING_ENABLED,\n\tDISABLE_GQL_BATCHING,\n\tDISABLE_REST_BATCHING,\n\tENABLE_ACTION_DISPATCHED_HANDLING,\n\tGARBAGE_COLLECTOR_INTERVAL,\n\tINTERSECT_ROOT_MARGIN,\n\tVALIDATE_SCHEMAS,\n\tCHECK_FOR_POSSIBLE_PRESENTATIONAL_COMPONENTS,\n\tPOSSIBLE_PRESENTATIONAL_COMPONENTS,\n\tLOGGING_ENABLED,\n\tLOGGING_LEVELS,\n\tLOGS_OBSERVER_INTERVAL,\n\tLOGS_CLEANUP_INTERVAL,\n\tMEMOIZE,\n\tMETRICS_LEVEL,\n\tMETRICS_OBSERVER_INTERVAL,\n\tMETRICS_TYPES,\n\tQUEUE_FLUSH_ENABLED,\n\tTELEMETRY_MARKING_ENABLED,\n\tTIME_TO_WAIT_AFTER_DISCONNECT,\n\tENABLE_SCHEDULER_STATS,\n\tMETRICS_COMPONENT_INTERACTIVE_ENABLED,\n\tARIA_LIVE_ASSERTIVE_TIMEOUT,\n\tARIA_LIVE_POLITE_TIMEOUT,\n\tWHEN_COMPONENT_IS_IDLE_TIMEOUT,\n\tWHEN_COMPONENT_IS_IDLE_THROTTLE,\n\tWHEN_COMPONENT_IS_IDLE_MIN_INTERVAL,\n\tSCHEDULER_RAF_TIMEOUT,\n\tMETRICS_MARK_PRUNING_INTERVAL,\n\tMETRICS_MARK_EXPIRATION,\n\tMETRICS_PRUNE_MARKS\n} from '../constants';\n\nexport const prodConfig = {};\n\n// AMB GC\nprodConfig[AMB_GC] = {};\nprodConfig[AMB_GC][GARBAGE_COLLECTOR_INTERVAL] = 5000;\nprodConfig[AMB_GC][TIME_TO_WAIT_AFTER_DISCONNECT] = 1000;\n\n// Caching\nprodConfig[GQL_CACHING_ENABLED] = false;\nprodConfig[GQL_CACHE_CAPACITY] = 200;\nprodConfig[HTTP_CACHING_ENABLED] = false;\nprodConfig[HTTP_CACHE_CAPACITY] = 200;\n\n// Request Batching\nprodConfig[DISABLE_GQL_BATCHING] = false;\nprodConfig[DISABLE_REST_BATCHING] = false;\n\n// Memoize\nprodConfig[MEMOIZE] = memoize;\n\n// Validation\nprodConfig[VALIDATE_SCHEMAS] = false;\nprodConfig[CHECK_FOR_POSSIBLE_PRESENTATIONAL_COMPONENTS] = false;\nprodConfig[POSSIBLE_PRESENTATIONAL_COMPONENTS] = [];\n\n// Metrics\n//\n// Heads up that these following 2 config values are a little tricky when\n// unset:\n// - When `metricTypes` is not defined, then fall back to checking `metricsLevel`\n// - When `metricsLevel` is not defined, then nothing is marked\nprodConfig[METRICS_TYPES] = null;\nprodConfig[METRICS_LEVEL] = null;\nprodConfig[METRICS_OBSERVER_INTERVAL] = 3000;\nprodConfig[ENABLE_SCHEDULER_STATS] = false;\nprodConfig[TELEMETRY_MARKING_ENABLED] = true;\n\n// Custom Event Dispatching\nprodConfig[ENABLE_ACTION_DISPATCHED_HANDLING] = false;\n\n// Intersection Observer\nprodConfig[INTERSECT_ROOT_MARGIN] = '500px';\n\n// Queue Flush Enabled\nprodConfig[QUEUE_FLUSH_ENABLED] = false;\n\n// Logging\nprodConfig[LOGGING_ENABLED] = false;\nprodConfig[LOGGING_LEVELS] = null;\nprodConfig[LOGS_OBSERVER_INTERVAL] = 1000;\nprodConfig[LOGS_CLEANUP_INTERVAL] = 60000;\n\nprodConfig[METRICS_COMPONENT_INTERACTIVE_ENABLED] = false;\n\nprodConfig[ARIA_LIVE_ASSERTIVE_TIMEOUT] = 500;\nprodConfig[ARIA_LIVE_POLITE_TIMEOUT] = 5000;\n\nprodConfig[WHEN_COMPONENT_IS_IDLE_TIMEOUT] = 5000;\nprodConfig[WHEN_COMPONENT_IS_IDLE_THROTTLE] = 50;\nprodConfig[WHEN_COMPONENT_IS_IDLE_MIN_INTERVAL] = 25;\n\nprodConfig[SCHEDULER_RAF_TIMEOUT] = 0;\n\nprodConfig[METRICS_MARK_PRUNING_INTERVAL] = 300000;\nprodConfig[METRICS_MARK_EXPIRATION] = 300000;\nprodConfig[METRICS_PRUNE_MARKS] = true;\n", "import {\n\tENABLE_SCHEDULER_STATS,\n\tGQL_CACHING_REFRESH_DELAY,\n\tHTTP_CACHING_REFRESH_DELAY,\n\tINTERSECT_ROOT_MARGIN,\n\tLOGGING_ENABLED,\n\tMETRICS_COMPONENT_INTERACTIVE_ENABLED,\n\tMETRICS_TYPES,\n\tVALIDATE_SCHEMAS,\n\tARIA_LIVE_ASSERTIVE_TIMEOUT,\n\tARIA_LIVE_POLITE_TIMEOUT,\n\tWHEN_COMPONENT_IS_IDLE_TIMEOUT,\n\tWHEN_COMPONENT_IS_IDLE_THROTTLE,\n\tWHEN_COMPONENT_IS_IDLE_MIN_INTERVAL,\n\tMETRICS_OBSERVER_INTERVAL,\n\tSCHEDULER_RAF_TIMEOUT,\n\tMETRICS_MARK_PRUNING_INTERVAL,\n\tMETRICS_MARK_EXPIRATION,\n\tMETRICS_PRUNE_MARKS\n} from '../constants';\n\nexport const testConfig = {};\n// caching\ntestConfig[GQL_CACHING_REFRESH_DELAY] = 500;\ntestConfig[HTTP_CACHING_REFRESH_DELAY] = 500;\n\n// Metrics\ntestConfig[METRICS_TYPES] = ['TEST'];\ntestConfig[ENABLE_SCHEDULER_STATS] = false;\n\n// Intersection Observer\ntestConfig[INTERSECT_ROOT_MARGIN] = '400px';\n\n// Logging\ntestConfig[LOGGING_ENABLED] = true;\n\n// Validation\ntestConfig[VALIDATE_SCHEMAS] = true;\n\ntestConfig[METRICS_COMPONENT_INTERACTIVE_ENABLED] = true;\n\ntestConfig[ARIA_LIVE_ASSERTIVE_TIMEOUT] = 500;\ntestConfig[ARIA_LIVE_POLITE_TIMEOUT] = 5000;\n\ntestConfig[WHEN_COMPONENT_IS_IDLE_TIMEOUT] = 600;\ntestConfig[WHEN_COMPONENT_IS_IDLE_THROTTLE] = 50;\ntestConfig[WHEN_COMPONENT_IS_IDLE_MIN_INTERVAL] = 25;\n\ntestConfig[METRICS_OBSERVER_INTERVAL] = 3000;\n\ntestConfig[SCHEDULER_RAF_TIMEOUT] = 0;\n\ntestConfig[METRICS_MARK_PRUNING_INTERVAL] = 300000;\ntestConfig[METRICS_MARK_EXPIRATION] = 300000;\ntestConfig[METRICS_PRUNE_MARKS] = true;\n", "export * from './baseUrl';\n", "import {getConfigItem, setConfigItem} from '../config';\nimport {EMBEDDABLE_BASE_URL} from '../constants';\n\n/**\n * Description: Setter for `baseUrl` for Embeddable environment\n * @param {string} url - value to be used as baseurl\n * @returns {void}\n */\nexport const setEmbeddableBaseUrl = url => setConfigItem(EMBEDDABLE_BASE_URL, url);\n/**\n * Description: Getter for `baseUrl` , used by HttpEffect, GraphQLEffect for preparing request `url`\n * @returns {string}\n */\nexport const getEmbeddableBaseUrl = () => getConfigItem(EMBEDDABLE_BASE_URL) || '';\n", "import logObservers from './logObservers';\n\nexport default function observe(observer) {\n\tif (typeof observer === 'function') {\n\t\tconst observerObj = {observer, logsToSend: []};\n\t\tlogObservers.add(observerObj);\n\t\treturn () => logObservers.delete(observerObj);\n\t}\n}\n", "export default new Set();\n", "import {getConfigItem, configConstants, observeConfigItem} from '@servicenow/ui-config';\nimport logObservers from './logObservers';\nimport {defer, whenIdle} from '@servicenow/ui-utils';\n\nconst {LOGS_OBSERVER_INTERVAL} = configConstants;\nlet timeoutId;\nlet logsObserverInterval = getConfigItem(LOGS_OBSERVER_INTERVAL);\n\nconst observer = (path, value) => {\n\tif (path === LOGS_OBSERVER_INTERVAL) {\n\t\tlogsObserverInterval = value;\n\t}\n};\n\nobserveConfigItem(LOGS_OBSERVER_INTERVAL, observer);\n\nconst addLog = logContext => {\n\tfor (const observer of logObservers) observer.logsToSend.push(logContext);\n};\n\nconst notifyLogObserver = observer => {\n\tconst {logsToSend} = observer;\n\tobserver.observer(logsToSend.splice(0, logsToSend.length));\n};\n\nexport default function notifyLogObservers(logContext) {\n\tif (logObservers.size) {\n\t\tlet timeExpired = false;\n\t\tif (logContext) addLog(logContext);\n\t\tclearTimeout(timeoutId);\n\t\ttimeoutId = defer(() => {\n\t\t\twhenIdle(deadLine => {\n\t\t\t\tfor (const observer of logObservers) {\n\t\t\t\t\tif (deadLine.timeRemaining() > 0) {\n\t\t\t\t\t\tif (observer.logsToSend.length) notifyLogObserver(observer);\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttimeExpired = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (timeExpired) notifyLogObservers();\n\t\t\t});\n\t\t}, logsObserverInterval || 1000);\n\t}\n}\n", "import {toLower} from '@servicenow/ui-utils';\n\nexport default function getHostInfo(host) {\n\treturn {\n\t\ttagName: toLower(host.tagName),\n\t\tcomponentId: host.getAttribute('component-id')\n\t};\n}\n", "import {memoize} from '@servicenow/ui-utils';\n\nexport default function memoizeProfiler(func, options = {}) {\n\tconst {createCacheKey, profileName} = options;\n\treturn memoize(func, createCacheKey || (arg1 => arg1), {profileName});\n}\n", "import {applyInteractionId, mark, types as metrics, getInteractionId} from '@servicenow/ui-metrics';\nimport {errorTypes, locations, NOW_ID_PROP} from './constants';\nimport {allLogTypes as logTypes} from './logHandler';\nimport {findKey} from '@servicenow/ui-utils';\nconst notifiedHosts = new Set();\n\n/**\n * Wrap the execution of code with a try catch and dispatch the error\n * @function sandbox\n * @private\n * @example\n * import {sandbox, errorTypes, locations} from '@servicenow/ui-internal'\n *\n * sandbox(\n *   onChange,\n *   {\n *     args: [value, previousValue, dispatch],\n *     dispatch,\n *     host,\n *     location: locations.LIFECYCLE,\n *     details: {name: 'onChange', propertyName},\n *     errorType: errorTypes.COMPONENT_ERROR_THROWN\n *   }\n * )\n *\n * @param {Function} fn - arbitrary function to execute\n * @param {Object} options - The sandbox options\n * @param {Array} [options.args] - Arguments to pass into the fn.\n * @param {Object} [options.dispatch] - Dispatch function, required.\n * @param {string} [options.location] - Enum of acceptable locations, import {locations} from '@servicenow/ui-internal', required.\n * @param {Object} [options.host] - The host most closely related to the executing code.\n * @param {Object} [options.details] - Object to store arbitrary data\n * @param {string} [options.errorType] - Type of action to dispatch on error caught. Default is COMPONENT_ERROR_THROWN\n * @param {Object} [options.metadata] - Metadata to be passed to the dispatch function\n * @param {function} [options.log] - Logger to log the error\n * @returns {any} Value returned from the function\n */\nfunction sandbox(fn, options = {}) {\n\tconst {args = []} = options;\n\ttry {\n\t\tconst value = fn(...args);\n\t\treturn value;\n\t} catch (error) {\n\t\tnotify(error, options);\n\t}\n}\n\nexport function notify(\n\terror,\n\t{\n\t\tdispatch,\n\t\thost,\n\t\tlocation,\n\t\tdetails = {},\n\t\terrorType = errorTypes.COMPONENT_ERROR_THROWN,\n\t\tmetadata = {},\n\t\tlog\n\t}\n) {\n\tconst tagName = host.tagName && host.tagName.toLowerCase();\n\tconst componentId = host[NOW_ID_PROP];\n\tconst errorActionType = findKey(errorTypes, val => val === errorType);\n\tapplyInteractionId(metadata);\n\tconst interactionId = getInteractionId(metadata);\n\tmark(host, interactionId, metrics.ERROR, {location});\n\n\t// This if statement prevents a recursive loop when an error is thrown within the COMPONENT_ERROR_THROWN effect\n\tif (!isRecursive({location, details})) {\n\t\tconst hostIdentifier = [\n\t\t\ttagName,\n\t\t\tcomponentId,\n\t\t\terrorType,\n\t\t\tlocation,\n\t\t\tObject.keys(details).length > 10\n\t\t\t\t? Object.keys(details).length\n\t\t\t\t: Object.entries(details).flat()\n\t\t]\n\t\t\t.filter(Boolean)\n\t\t\t.join('-');\n\t\tif (!notifiedHosts.has(hostIdentifier)) {\n\t\t\tnotifiedHosts.add(hostIdentifier);\n\t\t\tdispatch(errorType, {host, location, details, error}, {internal: true, ...metadata}, true);\n\t\t\tsetTimeout(() => notifiedHosts.delete(hostIdentifier), 0); // Clean notifiedHosts after the next tick\n\t\t}\n\t}\n\n\tif (log) {\n\t\tlog(\n\t\t\t`An Error occured in <${tagName} component-id=\"${componentId}\"/>. ${errorActionType} action type is dispatched with error details.`,\n\t\t\t{error, level: logTypes.ERROR, host, origin: 'sandbox'}\n\t\t);\n\t}\n}\n\n// Note: Ideally we would want to remove this as we already have more generic check\n// using hostIdentifier & notifiedHosts to prevent recursive calls.\n//TODO: Revisit this function and remove if not needed\nfunction isRecursive({location, details}) {\n\tif (location === locations.EFFECT && details.actionType === errorTypes.COMPONENT_ERROR_THROWN)\n\t\treturn true;\n\n\treturn false;\n}\n\nexport default sandbox;\n", "import * as uiAnalyticsConsumer from '@servicenow/ui-analytics-consumer';\nimport {types, timingMetricTypes} from './constants';\nimport applyInteractionId from './applyInteractionId';\nimport getInteractionId from './getInteractionId';\nimport setInteractionId from './setInteractionId';\nimport createInteractionId from './createInteractionId';\nimport createTraceId from './createTraceId';\nimport defineMetric from './defineMetric';\nimport mark from './mark';\nimport getMarks from './getMarks';\nimport {\n\tgetCounters as getPerformanceCounters,\n\tclearCounters as clearPerfomanceCounters\n} from './counters';\nimport clearMarks from './clearMarks';\nimport observe from './observe';\nimport getMetricTypes from './getMetricTypes';\nimport addMarkAugmenter from './addMarkAugmenter';\nimport {collectMetrics, enable as enableMetrics, isPerfMetricsEnabled} from './metrics';\nimport {logTimingMetrics} from './timingMetrics';\n\nconst {setConfigValue} = uiAnalyticsConsumer;\nsetConfigValue('enableCounter', true);\nsetConfigValue('enableHistogram', true);\nsetConfigValue('enableTrack', true);\n\nglobalThis.nowUiFrameworkMetrics = {\n\tapplyInteractionId,\n\tgetInteractionId,\n\tsetInteractionId,\n\tcreateInteractionId,\n\tcreateTraceId,\n\tdefineMetric,\n\tmark,\n\tclearMarks,\n\tgetMarks,\n\tobserve,\n\ttypes,\n\tgetMetricTypes,\n\taddMarkAugmenter,\n\tgetPerformanceCounters,\n\tclearPerfomanceCounters,\n\tcollectMetrics,\n\tlogTimingMetrics,\n\tisPerfMetricsEnabled,\n\tenableMetrics\n};\n\nexport {\n\tapplyInteractionId,\n\tgetInteractionId,\n\tsetInteractionId,\n\tcreateInteractionId,\n\tcreateTraceId,\n\tdefineMetric,\n\tmark,\n\tclearMarks,\n\tgetMarks,\n\tobserve,\n\ttypes,\n\ttimingMetricTypes,\n\tgetMetricTypes,\n\taddMarkAugmenter,\n\tgetPerformanceCounters,\n\tclearPerfomanceCounters,\n\tcollectMetrics,\n\tlogTimingMetrics,\n\tisPerfMetricsEnabled,\n\tenableMetrics\n};\n", "const METRIC_DISPATCH = 'DISPATCH';\nconst METRIC_ERROR = 'ERROR';\nconst METRIC_GQL = 'GQL';\nconst METRIC_HTTP = 'HTTP';\nconst METRIC_CONNECTION = 'CONNECTION';\nconst METRIC_UPDATE_PROPERTIES = 'UPDATE_PROPERTIES';\nconst METRIC_UPDATE_STATE = 'UPDATE_STATE';\nconst METRIC_RENDER_START = 'RENDER_START';\nconst METRIC_RENDER_END = 'RENDER_END';\nconst METRIC_RENDER_TREE = 'RENDER_TREE';\nconst METRIC_INTERSECTION = 'INTERSECTION';\nconst METRIC_SCHEDULE = 'SCHEDULE';\nconst METRIC_EXECUTE = 'EXECUTE';\nconst METRIC_DEFER = 'DEFER';\nconst METRIC_PROPERTY_REFLECTION = 'PROPERTY_REFLECTION';\nconst METRIC_EFFECT_START = 'EFFECT_START';\nconst METRIC_EFFECT_END = 'EFFECT_END';\nconst METRIC_PATCH_START = 'PATCH_START';\nconst METRIC_PATCH_END = 'PATCH_END';\nconst METRIC_HOOK_START = 'HOOK_START';\nconst METRIC_HOOK_END = 'HOOK_END';\nconst METRIC_INTERACTIVE = 'INTERACTIVE';\nconst METRIC_HERO_INTERACTIVE = 'HERO_INTERACTIVE';\nconst METRIC_UPDATE_CONTEXT = 'UPDATE_CONTEXT';\nexport const LIB_NAME = '@servicenow/ui-metrics';\n\nexport const types = {\n\tDISPATCH: METRIC_DISPATCH,\n\tERROR: METRIC_ERROR,\n\tGQL: METRIC_GQL,\n\tHTTP: METRIC_HTTP,\n\tCONNECTION: METRIC_CONNECTION,\n\tUPDATE_PROPERTIES: METRIC_UPDATE_PROPERTIES,\n\tUPDATE_STATE: METRIC_UPDATE_STATE,\n\tRENDER_START: METRIC_RENDER_START,\n\tRENDER_END: METRIC_RENDER_END,\n\tRENDER_TREE: METRIC_RENDER_TREE,\n\tINTERSECTION: METRIC_INTERSECTION,\n\tSCHEDULE: METRIC_SCHEDULE,\n\tEXECUTE: METRIC_EXECUTE,\n\tDEFER: METRIC_DEFER,\n\tPROPERTY_REFLECTION: METRIC_PROPERTY_REFLECTION,\n\tEFFECT_START: METRIC_EFFECT_START,\n\tEFFECT_END: METRIC_EFFECT_END,\n\tPATCH_START: METRIC_PATCH_START,\n\tPATCH_END: METRIC_PATCH_END,\n\tHOOK_START: METRIC_HOOK_START,\n\tHOOK_END: METRIC_HOOK_END,\n\tINTERACTIVE: METRIC_INTERACTIVE,\n\tHERO_INTERACTIVE: METRIC_HERO_INTERACTIVE,\n\tUPDATE_CONTEXT: METRIC_UPDATE_CONTEXT\n};\n\nexport const levels = {\n\t[METRIC_HERO_INTERACTIVE]: 5,\n\t[METRIC_INTERACTIVE]: 5,\n\t[METRIC_ERROR]: 5,\n\t[METRIC_GQL]: 4,\n\t[METRIC_HTTP]: 4,\n\t[METRIC_DISPATCH]: 3,\n\t[METRIC_RENDER_START]: 2,\n\t[METRIC_RENDER_END]: 2,\n\t[METRIC_RENDER_TREE]: 2,\n\t[METRIC_INTERSECTION]: 1,\n\t[METRIC_CONNECTION]: 1,\n\t[METRIC_UPDATE_PROPERTIES]: 1,\n\t[METRIC_UPDATE_STATE]: 1,\n\t[METRIC_SCHEDULE]: 1,\n\t[METRIC_EXECUTE]: 1,\n\t[METRIC_DEFER]: 1,\n\t[METRIC_PROPERTY_REFLECTION]: 1,\n\t[METRIC_EFFECT_START]: 0,\n\t[METRIC_EFFECT_END]: 0,\n\t[METRIC_PATCH_START]: 0,\n\t[METRIC_PATCH_END]: 0,\n\t[METRIC_HOOK_START]: 0,\n\t[METRIC_HOOK_END]: 0,\n\t[METRIC_UPDATE_CONTEXT]: 1\n};\n\n// Copied from @servicenow/ui-core. This should be in @servicenow/ui-internals, however that package\n// depends on this package, which would create a circular dependency\nexport const SEISMIC_HOIST_TAG_NAME = 'SEISMIC-HOIST';\n\nexport const timings = {\n\tLOWER_BOUNDARY: '0-50ms',\n\tMIDDLE: '51-100ms',\n\tUPPER_BOUNDARY: '100+ms'\n};\nexport const timingMetricTypes = {\n\tDEFER: 'defer',\n\tDEBOUNCE: 'debounce'\n};\n\nexport const UNKNOWN_COMPONENT_NAME = 'UNKNOWN';\n", "import {INTERACTION_ID} from './symbols';\nimport createInteractionId from './createInteractionId';\n\nexport default function applyInteractionId(meta) {\n\tif (!meta[INTERACTION_ID]) meta[INTERACTION_ID] = createInteractionId(); // eslint-disable-line no-param-reassign\n\n\treturn meta;\n}\n", "export const INTERACTION_ID = Symbol('__INTERACTION_ID__');\n", "const x = 2147483648;\nconst baseId =\n\tMath.floor(Math.random() * x).toString(36) +\n\tMath.abs(Math.floor(Math.random() * x) ^ Date.now()).toString(36);\n\nlet count = 0;\n\nconst getBaseId = () => globalThis?.nowUiFramework?.metrics?.uxfInteractionIdBase || baseId;\n\nexport default function createTransactionId() {\n\tcount = count + 1;\n\treturn `${getBaseId()}-${count}`;\n}\n", "import {INTERACTION_ID} from './symbols';\nimport validateMeta from './validateMeta';\n\n/**\n * Retrieves the interactionId from an action\n * @function getInteractionId\n * @example\n * import {getInteractionId} from '@servicenow/ui-metrics';\n *\n * const captureClickEvent = (coeffects, target) => {\n * \t const {action, host} = coeffects;\n *\n *   mark(host, getInteractionId(action.meta), 'CLICK_EVENT', {eventTarget: target});\n * }\n *\n * @param {Object} meta - The meta data from the action object\n */\nexport default function getInteractionId(meta) {\n\tvalidateMeta(meta, 'getInteractionId');\n\treturn meta[INTERACTION_ID];\n}\n", "import {LIB_NAME} from './constants';\nimport isObject from './isObject';\n\nexport default function validateMeta(meta, callerName) {\n\tif (process.env.NODE_ENV === 'development') {\n\t\tif (!isObject(meta))\n\t\t\tconsole.warn(`${LIB_NAME} ${callerName}() arguments[0] meta must be an object.`); // eslint-disable-line no-console\n\t}\n}\n", "export default function isObject(obj) {\n\treturn (\n\t\t!!obj && typeof obj === 'object' && Object.prototype.toString.call(obj) === '[object Object]'\n\t);\n}\n", "import {INTERACTION_ID} from './symbols';\nimport validateSetInteractionIdArguments from './validateSetInteractionIdArguments';\n\nexport default function setInteractionId(meta, id) {\n\tvalidateSetInteractionIdArguments(meta, 'setInteractionId', id);\n\tmeta[INTERACTION_ID] = id; // eslint-disable-line no-param-reassign\n\treturn meta;\n}\n", "import validateMeta from './validateMeta';\nimport {LIB_NAME} from './constants';\n\nexport default function validateSetInteractionIdArguments(meta, fnName, id) {\n\tvalidateMeta(meta, fnName);\n\tif (process.env.NODE_ENV === 'development') {\n\t\tif (typeof id !== 'string')\n\t\t\tconsole.warn(`${LIB_NAME} ${fnName}() arguments[1] interactionId must be a string.`); // eslint-disable-line no-console\n\t}\n}\n", "import * as uiAnalyticsConsumer from '@servicenow/ui-analytics-consumer';\nconst {createTraceId, getConfigValue} = uiAnalyticsConsumer;\n\nfunction isTracingEnabled() {\n\treturn getConfigValue('enableTrace') === true;\n}\n\nexport default function createTransactionId() {\n\tif (!isTracingEnabled()) {\n\t\treturn null;\n\t}\n\treturn createTraceId();\n}\n", "import levels from './levels';\nimport * as uiAnalyticsConsumer from '@servicenow/ui-analytics-consumer';\nconst {createHistogram} = uiAnalyticsConsumer;\n\n/**\n * Defines a custom metric\n * @function defineMetric\n * @example\n * import {defineMetric} from '@servicenow/ui-metrics';\n *\n * export const initCustomMetrics = () => {\n *\t\tif (shouldPersistMetrics) {\n *\t\t\tsetInteractionId();\n *\t\t\twindow.addEventListener('unload', () => {\n *\t\t\t\tpersistMetrics();\n *\t\t\t});\n *\n *\t\t\tdefineMetric('NAVIGATE', 4);\n *\t\t\tpersistAtInterval(intervalDuration);\n *\t\t}\n * };\n *\n * @param {String} name\n * @param {Number} level\n */\nexport default function defineMetric(name, level = 0) {\n\tif (levels[name]) throw new Error(`@servicenow/ui-metrics ${name} is already a defined metric.`);\n\tif (!Number.isInteger(level) || level > 5 || level < 0)\n\t\tthrow new Error(`@servicenow/ui-metrics ${level} is not valid metric level.`);\n\n\tlevels[name] = {level, histogram: createHistogram(name)};\n}\n", "import * as uiAnalyticsConsumer from '@servicenow/ui-analytics-consumer';\nimport {levels} from './constants';\nconst {createHistogram} = uiAnalyticsConsumer;\nconst types = {};\nfor (const k in levels) {\n\ttypes[k] = {\n\t\tlevel: levels[k],\n\t\thistogram: createHistogram(k)\n\t};\n}\n\nexport default types;\n", "import levels from './levels';\nimport resolveContext from './resolveContext';\nimport * as uiAnalyticsConsumer from '@servicenow/ui-analytics-consumer';\nimport augment from './augment';\nimport {getConfigItem, configConstants} from '@servicenow/ui-config';\nimport {defer, whenIdle} from '@servicenow/ui-utils';\nimport marks from './marks';\nimport {increment as incrementCount} from './counters';\nimport shouldMark from './shouldMark';\nimport {types} from './constants';\nimport observers from './observers';\nimport validateMarkArguments from './validateMarkArguments';\n\nconst {track} = uiAnalyticsConsumer;\nconst {\n\tMETRICS_OBSERVER_INTERVAL,\n\tMETRICS_USE_WINDOW_PERFORMANCE,\n\tMETRICS_MARK_PRUNING_INTERVAL,\n\tMETRICS_MARK_EXPIRATION,\n\tMETRICS_PRUNE_MARKS\n} = configConstants;\nlet timeoutId;\nconst latest = [];\nconst MARK_PRUNING_INTERVAL = getConfigItem(METRICS_MARK_PRUNING_INTERVAL);\nconst MARK_EXPIRATION = getConfigItem(METRICS_MARK_EXPIRATION);\nconst PRUNE_MARKS = getConfigItem(METRICS_PRUNE_MARKS);\n\nlet {performance} = window;\nif (!getConfigItem(METRICS_USE_WINDOW_PERFORMANCE)) {\n\ttry {\n\t\tperformance = window.top.performance; // eslint-disable-line prefer-destructuring\n\t} catch (e) {\n\t\t/* catch if !window.top */\n\t}\n}\n\nconst callObservers = () => {\n\tif (observers.size) {\n\t\tclearTimeout(timeoutId);\n\t\ttimeoutId = defer(() => {\n\t\t\twhenIdle(() => {\n\t\t\t\tconst latestSlice = latest.splice(0);\n\t\t\t\tif (latestSlice.length) observers.forEach(observer => observer([...latestSlice]));\n\t\t\t});\n\t\t}, getConfigItem(METRICS_OBSERVER_INTERVAL));\n\t}\n};\n\nconst unresolvedResourceMarks = [];\n\nconst isMatch = (mark, resource) => {\n\tif (isMarkBatchedRequest(mark) && isResourceBatchApi(resource)) return true;\n\n\tif (resource.name.includes(mark?.options?.path)) return true;\n\n\treturn false;\n};\n\nconst isResourceBatchApi = resource => resource.name.includes('/api/now/v1/batch');\nconst isMarkBatchedRequest = mark => mark?.options?.batch;\n\n// not currently supported in component unit testing environment\nif (window.PerformanceObserver) {\n\tconst observer = new PerformanceObserver(list => {\n\t\tconst resources = list.getEntries().sort((a, b) => {\n\t\t\tif (a.startTime < b.startTime) return -1;\n\t\t\tif (a.startTime > b.startTime) return 1;\n\n\t\t\treturn 0;\n\t\t});\n\n\t\tfor (let m = 0; m < unresolvedResourceMarks.length; m++) {\n\t\t\tconst mark = unresolvedResourceMarks[m];\n\n\t\t\tfor (let e = 0; e < resources.length; e++) {\n\t\t\t\tconst resource = resources[e];\n\n\t\t\t\tif (resource.startTime > mark.markTime && isMatch(mark, resource)) {\n\t\t\t\t\tmark.options.resource = resource.toJSON();\n\t\t\t\t\tunresolvedResourceMarks.splice(m, 1);\n\t\t\t\t\tm -= 1;\n\t\t\t\t\tlatest.push(mark);\n\t\t\t\t\tcallObservers();\n\t\t\t\t\tif (!isMarkBatchedRequest(mark)) resources.splice(e, 1);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n\tobserver.observe({\n\t\tentryTypes: ['resource']\n\t});\n}\n\nif (PRUNE_MARKS && MARK_PRUNING_INTERVAL > 0) {\n\tsetInterval(() => {\n\t\tconst now = performance.now();\n\n\t\tfor (let i = 0; i < unresolvedResourceMarks.length; i++) {\n\t\t\tif (now - unresolvedResourceMarks[i].markTime >= MARK_EXPIRATION) {\n\t\t\t\tif (process.env.NODE_ENV !== 'production') {\n\t\t\t\t\tconst count = unresolvedResourceMarks.length - i;\n\t\t\t\t\tconsole.warn(\n\t\t\t\t\t\t`@servicenow/ui-metrics Pruning ${count} unresolved resource mark${\n\t\t\t\t\t\t\tcount > 1 ? 's' : ''\n\t\t\t\t\t\t}.`\n\t\t\t\t\t); // eslint-disable-line no-console\n\t\t\t\t}\n\t\t\t\tunresolvedResourceMarks.splice(i);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tfor (let i = 0; i < marks.length; i++) {\n\t\t\tif (now - marks[i].markTime >= MARK_EXPIRATION) {\n\t\t\t\tif (process.env.NODE_ENV !== 'production') {\n\t\t\t\t\tconst count = marks.length - i;\n\t\t\t\t\tconsole.info(\n\t\t\t\t\t\t`@servicenow/ui-metrics Pruning ${marks.length - i} expired mark${\n\t\t\t\t\t\t\tcount > 1 ? 's' : ''\n\t\t\t\t\t\t}.`\n\t\t\t\t\t); // eslint-disable-line no-console\n\t\t\t\t}\n\t\t\t\tmarks.splice(i);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}, MARK_PRUNING_INTERVAL);\n}\n\n/**\n * Marks a Seismic friendly performance marker\n * @function mark\n * @example\n * import {mark} from '@servicenow/ui-metrics';\n *\n * actionHandlers: {\n * \t\t[COMPONENT_TREE_RENDERED]({host, action: {meta}}) {\n *\t\t\tif (hasFetched && !loading && !interactive) {\n *\n * \t\t\t\t// Mark a custom defined metric and flip interactive\n * \t\t\t\t// Initial interactive state is false\n *\t\t\t\tmark(host, getInteractionId(meta), metrics.HERO_INTERACTIVE);\n *\t\t\t\tupdateState({\n *\t\t\t\t\tshouldRender: false,\n *\t\t\t\t\tpath: 'interactive',\n *\t\t\t\t\tvalue: true,\n *\t\t\t\t\toperation: 'set'\n *\t\t\t\t});\n *\t\t\t}\n *\t\t}\n * }\n *\n * @param {Object} context - (Optional) Context object to attach mark to\n * @param {String} interactionId - The id of the action that trigger the mark. Helps track client transactions during the interaction\n * @param {String} event - The metric type you are marking (custom metrics must be defined first).\n * @param {Object} options - (Optional) Typically this is the label or type of the mark.  Labels should be `:` delimited.\n * @param {String} type - (Optional) The category of metric.  Defaults to `performance`.  Other common options are `usage` || `both`.\n */\nexport default function mark(\n\tcontext = {},\n\tinteractionId,\n\tevent,\n\toptions = {},\n\ttype = 'performance'\n) {\n\tconst resolvedContext = resolveContext(context);\n\tconst {componentName, componentId, parentComponentId} = resolvedContext;\n\tincrementCount(event, {componentName, componentId, parentComponentId});\n\tif (!shouldMark(resolvedContext, event)) return;\n\n\tvalidateMarkArguments(resolvedContext, interactionId, event, options, type);\n\tconst mark = {\n\t\tcomponentName,\n\t\tcomponentId,\n\t\tparentComponentId,\n\t\tmarkTime: performance.now(),\n\t\tinteractionId,\n\t\tevent,\n\t\toptions,\n\t\ttype\n\t};\n\tconst augmentedMark = augment(mark);\n\n\tif (event === types.HTTP || event === types.GQL) {\n\t\tunresolvedResourceMarks.push(augmentedMark);\n\t\taugmentedMark.options.resource = {\n\t\t\tunresolved: true\n\t\t};\n\t}\n\n\tif (type === 'performance' || type === 'all') {\n\t\tconst {histogram} = levels[event];\n\t\thistogram(event?.value || event, augmentedMark);\n\t}\n\tif (type === 'usage' || type === 'all') {\n\t\ttrack(event, {attributes: augmentedMark});\n\t}\n\n\tmarks.push(augmentedMark);\n\n\tif (observers.size && !augmentedMark?.options?.resource?.unresolved) {\n\t\tlatest.push(augmentedMark);\n\t\tcallObservers();\n\t}\n}\n", "import {SEISMIC_HOIST_TAG_NAME} from './constants';\n\nexport default function resolveContext(context) {\n\tconst isSeismicElement = context.nowId;\n\tif (!isSeismicElement) return context;\n\n\tconst resolvedHost = context.tagName === SEISMIC_HOIST_TAG_NAME ? context.sourceElement : context;\n\n\treturn {\n\t\tcomponentName: resolvedHost.tagName,\n\t\tcomponentId: resolvedHost.nowId,\n\t\tparentComponentId: resolvedHost.__DO_NOT_USE_OR_YOU_WILL_BE_FIRED_BY_YOUR_PARENT__,\n\t\tmetricTypes: resolvedHost.metricTypes,\n\t\tmetricsLevel: resolvedHost.metricsLevel,\n\t\tready: resolvedHost.__DO_NOT_USE_BOOTSTRAPPED__\n\t};\n}\n", "import augmenters from './augmenters';\n\nexport default function augment(obj) {\n\tif (!augmenters.size) return obj;\n\n\treturn [...augmenters].reduceRight((acc, val) => val(acc), obj);\n}\n", "export default new Set();\n", "export default [];\n", "import {types} from './constants';\n\nconst {GQL, HTTP, RENDER_START, UPDATE_PROPERTIES, DISPATCH, UPDATE_STATE} = types;\n\nlet totalGQL = 0;\nlet totalHTTP = 0;\nlet totalRenders = 0;\nlet totalPropChange = 0;\nlet totalDispatch = 0;\nlet totalStateUpdates = 0;\n\nexport const getCounters = () => ({\n\ttotalGQL,\n\ttotalHTTP,\n\ttotalRenders,\n\ttotalPropChange,\n\ttotalDispatch,\n\ttotalStateUpdates\n});\n\nexport const clearCounters = () => {\n\ttotalGQL = 0;\n\ttotalHTTP = 0;\n\ttotalRenders = 0;\n\ttotalPropChange = 0;\n\ttotalDispatch = 0;\n\ttotalStateUpdates = 0;\n};\n\nexport const increment = type => {\n\tswitch (type) {\n\t\tcase GQL:\n\t\t\ttotalGQL++;\n\t\t\tbreak;\n\t\tcase HTTP:\n\t\t\ttotalHTTP++;\n\t\t\tbreak;\n\t\tcase RENDER_START:\n\t\t\ttotalRenders++;\n\t\t\tbreak;\n\t\tcase UPDATE_PROPERTIES:\n\t\t\ttotalPropChange++;\n\t\t\tbreak;\n\t\tcase DISPATCH:\n\t\t\ttotalDispatch++;\n\t\t\tbreak;\n\t\tcase UPDATE_STATE:\n\t\t\ttotalStateUpdates++;\n\t\t\tbreak;\n\t}\n};\n", "import levels from './levels';\nimport {getConfigItem, configConstants, observeConfigItem} from '@servicenow/ui-config';\n\nconst {METRICS_LEVEL, METRICS_TYPES, TELEMETRY_MARKING_ENABLED, METRICS_ELEMENT_CONFIG_ENABLED} =\n\tconfigConstants;\n\nlet globalMetricsLevel = parseInt(getConfigItem(METRICS_LEVEL));\nlet globalMetricsLevelIsInteger = Number.isInteger(globalMetricsLevel);\nlet globalMetricTypes = getConfigItem(METRICS_TYPES);\nlet globalIsTelemetryEnabled = getConfigItem(TELEMETRY_MARKING_ENABLED);\nlet globalElementMetricsConfigEnabled = getConfigItem(METRICS_ELEMENT_CONFIG_ENABLED);\n\nlet resolvedLevels = {};\nconst isMetricTypeValid = level => {\n\tif (resolvedLevels[level]) return true;\n\n\tconst isValid = Number.isInteger(level) && level >= 0 && level <= 5;\n\n\tif (isValid) resolvedLevels[level] = true;\n\n\treturn isValid;\n};\n\nconst observer = (path, value) => {\n\tresolvedLevels = {};\n\n\tswitch (path) {\n\t\tcase METRICS_LEVEL:\n\t\t\tglobalMetricsLevel = value;\n\t\t\tglobalMetricsLevelIsInteger = Number.isInteger(globalMetricsLevel);\n\t\t\tbreak;\n\t\tcase METRICS_TYPES:\n\t\t\tglobalMetricTypes = value;\n\t\t\tbreak;\n\t\tcase TELEMETRY_MARKING_ENABLED:\n\t\t\tglobalIsTelemetryEnabled = value;\n\t\t\tbreak;\n\t\tcase METRICS_ELEMENT_CONFIG_ENABLED:\n\t\t\tglobalElementMetricsConfigEnabled = value;\n\t\t\tbreak;\n\t}\n};\n\nobserveConfigItem(METRICS_LEVEL, observer);\nobserveConfigItem(METRICS_TYPES, observer);\nobserveConfigItem(TELEMETRY_MARKING_ENABLED, observer);\nobserveConfigItem(METRICS_ELEMENT_CONFIG_ENABLED, observer);\n\nexport default function shouldMark(context, metricType) {\n\tif (globalIsTelemetryEnabled === false) return false;\n\n\t// non-bootstrapped components don't have enough\n\t// data to send a valid mark\n\tif (!context.ready) return false;\n\n\tif (globalElementMetricsConfigEnabled && Array.isArray(context.nowMetricTypes))\n\t\treturn context.nowMetricTypes.includes(metricType);\n\n\tif (Array.isArray(globalMetricTypes)) return globalMetricTypes.includes(metricType);\n\n\tconst {level = -1} = levels[metricType] || {};\n\n\tif (!isMetricTypeValid(level)) return false;\n\n\tif (globalElementMetricsConfigEnabled && Number.isInteger(context.nowMetricsLevel))\n\t\treturn level >= context.nowMetricsLevel;\n\n\treturn globalMetricsLevelIsInteger && level >= globalMetricsLevel;\n}\n", "export default new Set();\n", "import isObject from './isObject';\nimport isElement from './isElement';\nimport {LIB_NAME} from './constants';\n\nexport default function validateMarkArguments(context, interactionId, event, options, type) {\n\tif (process.env.NODE_ENV === 'development') {\n\t\tif (!isObject(context) && !isElement(context))\n\t\t\tconsole.error(`${LIB_NAME} mark() arguments[0] context must be an object.`); // eslint-disable-line no-console\n\t\tif (typeof interactionId !== 'string')\n\t\t\tconsole.error(`${LIB_NAME} mark() arguments[1] interactionId must be a string.`); // eslint-disable-line no-console\n\t\tif (typeof event !== 'string')\n\t\t\tconsole.error(`${LIB_NAME} mark() arguments[2] event must be a string.`); // eslint-disable-line no-console\n\t\tif (!isObject(options))\n\t\t\tconsole.error(`${LIB_NAME} mark() arguments[3] options must be an object.`); // eslint-disable-line no-console\n\t\tif (typeof type !== 'string')\n\t\t\tconsole.error(`${LIB_NAME} mark() arguments[4] type must be a string.`); // eslint-disable-line no-console\n\t}\n}\n", "export default function isElement(obj) {\n\treturn Object.prototype.toString.call(obj).startsWith('[object HTML');\n}\n", "import marks from './marks';\n\nexport default function getMarks() {\n\treturn [...marks];\n}\n", "import marks from './marks';\n\nexport default function clearMarks() {\n\tmarks.length = 0;\n}\n", "import observers from './observers';\n\nexport default function observe(observer) {\n\tobservers.add(observer);\n\treturn () => observers.delete(observer);\n}\n", "import levels from './levels';\n\nconst getMetricTypes = () => ({...levels});\n\nexport default getMetricTypes;\n", "import augmenters from './augmenters';\n\nexport default function addMarkAugmenter(augmenter) {\n\tif (typeof augmenter !== 'function') return () => {};\n\n\taugmenters.add(augmenter);\n\treturn () => augmenters.delete(augmenter);\n}\n", "import {getCountersHistogram, clearTimingMetrics} from './timingMetrics';\n\nlet perfMetricsEnabled = false;\n\nexport const collectMetrics = (options = {}) => {\n\tconst {shouldClear = false, shouldDisable = false} = options;\n\n\t// Disable metric collection if needed\n\tif (shouldDisable) perfMetricsEnabled = false;\n\n\t// Collect metrics\n\tconst counters = getCounters();\n\n\t// Clear metric collection objects if needed\n\tif (shouldClear) clearPerfMetrics();\n\treturn {counters};\n};\n\nconst getCounters = () => {\n\treturn getCountersHistogram();\n};\n\nexport const enable = () => {\n\tperfMetricsEnabled = true;\n};\n\nexport const isPerfMetricsEnabled = () => {\n\treturn perfMetricsEnabled;\n};\n\nexport const clearPerfMetrics = () => {\n\tclearTimingMetrics();\n};\n", "import {timingMetricTypes, timings} from './constants';\nimport {clearDeferMetrics, getDeferMetrics, logDuration} from '@servicenow/ui-utils';\nimport {isPerfMetricsEnabled} from './metrics';\n\nlet debounceMetrics = {};\n//Have to do this to avoid circular dependency between utils and metrics packages\nlet deferMetrics = getDeferMetrics();\n\nexport const clearTimingMetrics = () => {\n\tdebounceMetrics = {};\n\tclearDeferMetrics();\n\tdeferMetrics = getDeferMetrics();\n};\n\nexport const logTimingMetrics = (type, duration = 0, componentName) => {\n\tif (!isPerfMetricsEnabled()) return;\n\tswitch (type) {\n\t\tcase timingMetricTypes.DEFER:\n\t\t\tlogDuration(deferMetrics, duration, componentName);\n\t\t\tbreak;\n\t\tcase timingMetricTypes.DEBOUNCE:\n\t\t\tlogDuration(debounceMetrics, duration, componentName);\n\t\t\tbreak;\n\t}\n};\n\nexport function getCountersHistogram() {\n\treturn {\n\t\t[timingMetricTypes.DEFER]: getHistogram(deferMetrics),\n\t\t[timingMetricTypes.DEBOUNCE]: getHistogram(debounceMetrics)\n\t};\n}\n\nfunction getHistogram(metrics) {\n\tconst histogram = {\n\t\t[timings.LOWER_BOUNDARY]: {},\n\t\t[timings.MIDDLE]: {},\n\t\t[timings.UPPER_BOUNDARY]: {}\n\t};\n\tObject.keys(metrics).forEach(componentName => {\n\t\tconst delayTimeArray = metrics[componentName] || [];\n\t\tdelayTimeArray.forEach(delayTime => {\n\t\t\tif (delayTime <= 50) {\n\t\t\t\thistogram[timings.LOWER_BOUNDARY][componentName] =\n\t\t\t\t\t(histogram[timings.LOWER_BOUNDARY][componentName]\n\t\t\t\t\t\t? histogram[timings.LOWER_BOUNDARY][componentName]\n\t\t\t\t\t\t: 0) + 1;\n\t\t\t} else if (delayTime > 100) {\n\t\t\t\thistogram[timings.UPPER_BOUNDARY][componentName] =\n\t\t\t\t\t(histogram[timings.UPPER_BOUNDARY][componentName]\n\t\t\t\t\t\t? histogram[timings.UPPER_BOUNDARY][componentName]\n\t\t\t\t\t\t: 0) + 1;\n\t\t\t} else {\n\t\t\t\thistogram[timings.MIDDLE][componentName] =\n\t\t\t\t\t(histogram[timings.MIDDLE][componentName]\n\t\t\t\t\t\t? histogram[timings.MIDDLE][componentName]\n\t\t\t\t\t\t: 0) + 1;\n\t\t\t}\n\t\t});\n\t});\n\treturn histogram;\n}\n", "const x = 2147483648;\nconst baseId =\n\tMath.floor(Math.random() * x).toString(36) +\n\tMath.abs(Math.floor(Math.random() * x) ^ Date.now()).toString(36);\n\nlet count = 0;\nexport default function guid() {\n\tcount = count + 1;\n\treturn `${baseId}-${count}`;\n}\n", "import callAsync from './callAsync';\n\n/**\n * Creates a react-like ref that prohibits access to the actual element.\n */\nexport default function createAriaRef() {\n\tconst subscriptionMap = new Map();\n\tconst childAriaRefToPath = new WeakMap();\n\tlet __current;\n\tlet __parent;\n\n\tconst ref = {\n\t\tisAriaRef: true,\n\t\tsetCurrent(value) {\n\t\t\t__current = value;\n\t\t\tcallAsync(() => {\n\t\t\t\tsubscriptionMap.forEach(attributeToCallback => {\n\t\t\t\t\tfor (const attribute in attributeToCallback) attributeToCallback[attribute](this);\n\t\t\t\t});\n\t\t\t});\n\t\t},\n\t\tsetParentAriaRef(parentAriaRef) {\n\t\t\t__parent = parentAriaRef;\n\t\t},\n\t\tgetParentAriaRef() {\n\t\t\treturn __parent;\n\t\t},\n\t\tisSet() {\n\t\t\treturn !!__current;\n\t\t},\n\t\tsetId(id) {\n\t\t\t__current.id = id;\n\t\t},\n\t\tgetAttribute(name) {\n\t\t\treturn __current.getAttribute(name);\n\t\t},\n\t\tgetRootNode() {\n\t\t\treturn __current.getRootNode();\n\t\t},\n\t\tcloneNode(deep) {\n\t\t\treturn __current.cloneNode(deep);\n\t\t},\n\t\tsetChildQuerySelector(childAriaRef, path) {\n\t\t\tchildAriaRefToPath.set(childAriaRef, path);\n\t\t},\n\t\tgetChildQuerySelector(childAriaRef) {\n\t\t\treturn childAriaRefToPath.get(childAriaRef);\n\t\t},\n\t\tcontains(node) {\n\t\t\tif (__current) return __current.contains(node);\n\n\t\t\treturn false;\n\t\t},\n\t\tsubscribe({element, attribute}, cb) {\n\t\t\tlet attributeToCallback = subscriptionMap.get(element);\n\t\t\tif (attributeToCallback) {\n\t\t\t\tconst oldCb = attributeToCallback[attribute];\n\t\t\t\tif (oldCb) oldCb(null);\n\t\t\t} else {\n\t\t\t\tattributeToCallback = {};\n\t\t\t\tsubscriptionMap.set(element, attributeToCallback);\n\t\t\t}\n\n\t\t\tattributeToCallback[attribute] = cb;\n\t\t\tcb(this);\n\t\t},\n\t\tunsubscribe({element, attribute}) {\n\t\t\tconst attributeToCallback = subscriptionMap.get(element);\n\t\t\tif (attributeToCallback) {\n\t\t\t\tconst cb = attributeToCallback[attribute];\n\n\t\t\t\tif (cb) cb(null);\n\n\t\t\t\tdelete attributeToCallback[attribute];\n\t\t\t\tif (Object.keys(attributeToCallback).length === 0) subscriptionMap.delete(element);\n\t\t\t}\n\t\t}\n\t};\n\n\tObject.seal(ref);\n\n\treturn ref;\n}\n", "export {default as isRef} from './isRef';\nexport {default as createRef} from './createRef';\nexport {default as subscribeToRef} from './subscribeToRef';\n", "import {CREATE_REF_SYMBOL} from '../constants';\n\nexport default function isRef(ref) {\n\treturn ref && ref[CREATE_REF_SYMBOL] ? true : false;\n}\n", "import {\n\tCREATE_REF_SYMBOL,\n\tCREATE_REF_SUBSCRIBE_SYMBOL,\n\tCREATE_REF_COMP_PROPS_SUBSCRIPTIONS_SYMBOL\n} from '../constants';\n/**\n * Creates a react-like ref.\n * @method createRef\n * @returns {{current: null}}\n */\nexport default function createRef() {\n\tlet current = null;\n\tconst subscriptions = new Map();\n\tconst ref = {\n\t\t[CREATE_REF_SYMBOL]: true,\n\t\tset current(val) {\n\t\t\tif (current !== val) {\n\t\t\t\tcurrent = val;\n\t\t\t\tfor (const [component, props] of subscriptions) {\n\t\t\t\t\tfor (const name of props) component[name] = val;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tget current() {\n\t\t\treturn current;\n\t\t},\n\t\t[CREATE_REF_SUBSCRIBE_SYMBOL](component, propertyName) {\n\t\t\tsubscriptions.set(component, (subscriptions.get(component) || new Set()).add(propertyName));\n\t\t\treturn () => {\n\t\t\t\tconst propList = subscriptions.get(component);\n\t\t\t\tpropList?.delete(propertyName);\n\t\t\t\tpropList?.size === 0 && subscriptions.delete(component);\n\t\t\t};\n\t\t},\n\t\t[CREATE_REF_COMP_PROPS_SUBSCRIPTIONS_SYMBOL](component) {\n\t\t\tconst compSubscriptions = subscriptions.get(component);\n\t\t\treturn compSubscriptions ? [...compSubscriptions] : [];\n\t\t}\n\t};\n\tObject.seal(ref);\n\treturn ref;\n}\n", "import {CREATE_REF_SUBSCRIBE_SYMBOL} from '../constants';\n\nexport default function subscribeToRef(ref, component, propertyName) {\n\treturn ref && ref[CREATE_REF_SUBSCRIBE_SYMBOL](component, propertyName);\n}\n", "const registry = new WeakMap();\nconst networkActionsEmptyForElCallbacks = [];\nlet globalCount = 0;\n\nexport function getPendingNetworkActionCount() {\n\treturn globalCount;\n}\n\nexport function pendingNetworkActionCountForHost(host) {\n\treturn registry.has(host) ? registry.get(host).size : 0;\n}\n\nexport function addPendingNetworkActionForHost(pendingNetworkAction, host) {\n\tif (!registry.has(host)) registry.set(host, new Set());\n\tregistry.get(host).add(pendingNetworkAction);\n\tglobalCount++;\n}\n\nexport function removePendingNetworkActionForHost(pendingNetworkAction, host) {\n\tif (!registry.has(host)) return;\n\tif (!registry.get(host).delete(pendingNetworkAction)) return;\n\tglobalCount--;\n\tconst len = networkActionsEmptyForElCallbacks.length;\n\tfor (let i = 0; i < len; i++) networkActionsEmptyForElCallbacks[i](host);\n}\n\nexport function clearPendingNetworkActionsForHost(host) {\n\tif (!registry.has(host)) return;\n\tconst networkActions = registry.get(host);\n\tglobalCount -= networkActions.size;\n\tnetworkActions.clear();\n}\n\nexport function addPendingNetworkActionForHostCb(fn) {\n\tnetworkActionsEmptyForElCallbacks.push(fn);\n}\n\nexport function getHostPendingNetworkActionCount(host) {\n\treturn (registry.has(host) && registry.get(host).size) || 0;\n}\n", "import {SPAN_KIND_CLIENT, SPAN_LEVEL_FINE} from './constants';\n\nexport default function getSpanOptions(host, level = SPAN_LEVEL_FINE) {\n\treturn {\n\t\tattributes: {\n\t\t\ttagName: host.tagName?.toLowerCase(),\n\t\t\tcomponentId: host.nowId,\n\t\t\t'seismic.level': level,\n\t\t\tkind: SPAN_KIND_CLIENT\n\t\t}\n\t};\n}\n", "import {createLogger} from '@servicenow/ui-internal';\n\nexport default createLogger({\n\tmodule: '@servicenow/ui-behavior-post-message'\n});\n", "/**\n * This is a temporary workaround to expose legacy global variables\n * to keep the Seismic Test Plugin (component drivers) working correctly.\n * Please rip this out (and fix the esbuild.config.js to use the correct\n * entry point) once we get a real fix for that\n */\n\nimport * as exports from './index.js';\n\nif (typeof window !== 'undefined') window.__TECTONIC__$servicenow_ui_config = exports;\n\nexport * from './index.js';\n", "/**\n * This is a temporary workaround to expose legacy global variables\n * to keep the Seismic Test Plugin (component drivers) working correctly.\n * Please rip this out (and fix the esbuild.config.js to use the correct\n * entry point) once we get a real fix for that\n */\n\nimport * as exports from './index.js';\n\nif (typeof window !== 'undefined') window.__TECTONIC__$servicenow_ui_core = exports;\n\nexport * from './index.js';\n", "import {defineRegistry, get as getStats} from './stats';\nimport whenComponentIsIdle, {whenAllComponentsIdle} from './whenComponentIsIdle';\nimport createCustomElementFactory from './createCustomElementFactory';\nimport {\n\tregisterNowResolvedPropsHandler,\n\tclearNowResolvedPropsHandler\n} from './utils/nowResolvedPropsHandler';\nimport {\n\tactionTypes as componentActionTypes,\n\tlocations,\n\tallLogTypes as logTypes\n} from '@servicenow/ui-internal';\nimport {\n\tCOMPONENT_MODE_SUSPEND as SUSPEND,\n\tCOMPONENT_MODE_ACTIVE as ACTIVE,\n\tCOMPONENT_MODE_DETACH as DETACH,\n\tSHADOW_ROOT_MODE_OPEN as OPEN,\n\tSHADOW_ROOT_MODE_CLOSED as CLOSED,\n\tPRIORITY_LEVEL_LOW as LOW,\n\tPRIORITY_LEVEL_MEDIUM as MEDIUM,\n\tARIA_LIVE_REGION_UPDATE_REQUESTED,\n\tARIA_LIVE_TRIGGER_ADDITIONS,\n\tARIA_LIVE_TRIGGER_ALL,\n\tARIA_LIVE_TRIGGER_REMOVALS,\n\tARIA_LIVE_TRIGGER_TEXT\n} from './constants';\nimport {\n\tcreateUnstableResolvePropertySelectorValue,\n\tunstableAddRenderOnPropertySelectorValueChange,\n\tunstableRemoveRenderOnPropertySelectorValueChange\n} from './property-selectors';\nimport {modifierTypes} from './effects';\nimport {declarativeOperations, getAncestorNode, unstableUpdateCustomElement} from './utils';\nimport createContext from './context/createContext';\nimport {politeId, assertiveId} from './accessibility/ariaLiveRegion';\nimport {CONTEXT_VIEW_KEY, HYDRATED, VNODE, INTERACTION_ID} from './symbols';\n\nconst componentModes = {\n\tSUSPEND,\n\tACTIVE,\n\tDETACH\n};\n\nconst shadowRootModes = {\n\tOPEN,\n\tCLOSED\n};\n\nconst nowPriorityLevels = {\n\tLOW,\n\tMEDIUM\n};\n\nconst componentRegistry = {};\n\nconst unstableResolvePropertySelectorValue =\n\tcreateUnstableResolvePropertySelectorValue(componentRegistry);\n\nconst createCustomElement = createCustomElementFactory({\n\tcomponentRegistry\n});\nconst createPresentationalCustomElement = createCustomElementFactory({\n\tcomponentRegistry,\n\tpresentational: true\n});\n\nconst actionTypes = {...componentActionTypes, ARIA_LIVE_REGION_UPDATE_REQUESTED};\nconst ariaLiveRegionIds = {polite: politeId, assertive: assertiveId};\nconst contextViewKey = CONTEXT_VIEW_KEY;\n\nconst getComponentById = id => componentRegistry[id];\nconst getComponentInstances = () => ({...componentRegistry});\nconst ariaLiveRegionTriggers = {\n\tARIA_LIVE_TRIGGER_ADDITIONS,\n\tARIA_LIVE_TRIGGER_ALL,\n\tARIA_LIVE_TRIGGER_REMOVALS,\n\tARIA_LIVE_TRIGGER_TEXT\n};\n\ndefineRegistry(componentRegistry);\n\nwindow.nowUiFramework = window.nowUiFramework || {};\nwindow.nowUiFramework.core = {getStats};\n\nexport {\n\tregisterNowResolvedPropsHandler,\n\tclearNowResolvedPropsHandler,\n\tcreateCustomElement,\n\tcreatePresentationalCustomElement,\n\tactionTypes,\n\tariaLiveRegionTriggers,\n\tlogTypes,\n\tmodifierTypes,\n\tshadowRootModes,\n\tnowPriorityLevels,\n\tdeclarativeOperations,\n\tlocations as errorLocations,\n\tcomponentModes,\n\tariaLiveRegionIds,\n\tcreateContext,\n\twhenComponentIsIdle,\n\twhenAllComponentsIdle,\n\tcontextViewKey,\n\tHYDRATED,\n\tVNODE,\n\tINTERACTION_ID,\n\tgetAncestorNode,\n\tgetComponentById,\n\tgetComponentInstances,\n\tgetStats,\n\t// Unstable APIs - Subject to change\n\tunstableResolvePropertySelectorValue,\n\tunstableAddRenderOnPropertySelectorValueChange,\n\tunstableRemoveRenderOnPropertySelectorValueChange,\n\tunstableUpdateCustomElement\n};\n", "import {PACKAGE_JSON_VERSION} from './constants';\n\nlet componentRegistry = {};\nconst stats = {\n\tconstructedByTagName: {},\n\tdefinedTagNames: [],\n\tdeferredByTagName: {}\n};\n\nexport const defineRegistry = registry => {\n\tcomponentRegistry = registry;\n\tstats.constructedByTagName = {};\n\tstats.definedTagNames = [];\n\tstats.deferredByTagName = {};\n};\n\nexport const get = () => {\n\tconst countByTagName = {};\n\tfor (const k in componentRegistry) {\n\t\tconst tagName = componentRegistry[k].tagName.toLowerCase();\n\t\tif (!countByTagName[tagName]) countByTagName[tagName] = 0;\n\n\t\tcountByTagName[tagName]++; // eslint-disable-line no-plusplus\n\t}\n\n\tlet totalConstructed = 0;\n\tfor (const k in stats.constructedByTagName) {\n\t\ttotalConstructed += stats.constructedByTagName[k];\n\t}\n\n\tconst unusedTagNames = [];\n\tfor (let i = 0; i < stats.definedTagNames.length; i++) {\n\t\tconst tagName = stats.definedTagNames[i];\n\t\tif (!stats.constructedByTagName[tagName]) {\n\t\t\tunusedTagNames.push(tagName);\n\t\t}\n\t}\n\n\treturn {\n\t\tversion: PACKAGE_JSON_VERSION,\n\t\tdefinitions: {\n\t\t\ttotal: stats.definedTagNames.length,\n\t\t\tunusedTagNames,\n\t\t\ttagNames: [...stats.definedTagNames]\n\t\t},\n\t\tconstructed: {\n\t\t\ttotal: totalConstructed,\n\t\t\tcountByTagName: stats.constructedByTagName\n\t\t},\n\t\tconnected: {\n\t\t\ttotal: Object.keys(componentRegistry).length,\n\t\t\tcountByTagName,\n\t\t\tdeferredByTagName: stats.deferredByTagName,\n\t\t\tnodes: {...componentRegistry}\n\t\t}\n\t};\n};\n\nexport const set = (statName, tagName) => {\n\tswitch (statName) {\n\t\tcase 'constructed':\n\t\t\tstats.constructedByTagName[tagName] = stats.constructedByTagName[tagName] || 0;\n\t\t\tstats.constructedByTagName[tagName]++; // eslint-disable-line no-plusplus\n\t\t\tbreak;\n\t\tcase 'defined':\n\t\t\tstats.definedTagNames.push(tagName);\n\t\t\tbreak;\n\t\tcase 'defer':\n\t\t\tstats.deferredByTagName[tagName] = stats.deferredByTagName[tagName] || 0;\n\t\t\tstats.deferredByTagName[tagName]++; // eslint-disable-line no-plusplus\n\t\t\tbreak;\n\t\tcase 'undefer':\n\t\t\tstats.deferredByTagName[tagName] = stats.deferredByTagName[tagName] || 0;\n\t\t\tif (stats.deferredByTagName[tagName]) stats.deferredByTagName[tagName]--; // eslint-disable-line no-plusplus\n\t\t\tbreak;\n\t}\n};\n", "import {actionTypes} from '@servicenow/ui-internal';\nimport pkgJsonContent from '../package.json';\n\nexport const DISPATCH_EVENT = 'DISPATCH_CUSTOM_EVENT';\nexport const COMPONENT_ID_ATTRIBUTE = 'component-id';\nexport const RESOLVED_PROPS_ATTRIBUTE = 'now-resolved-props';\nexport const ATTRIBUTE_SET = 'ATTRIBUTE_SET';\nexport const STORE_UPDATED = 'STORE_UPDATED';\nexport const HANDLE_ACTIONS = 'handle-actions';\nexport const PROPERTIES_SET = 'PROPERTIES_SET';\nexport const SHOULD_NOT_PROPAGATE = [PROPERTIES_SET, STORE_UPDATED];\nexport const PARSE_PROP_CONF_KEY = 'unstableParse';\nexport const SET_INITIAL_STATE = 'SET_INITIAL_STATE';\nexport const COMPONENT_NAME_ATTR = 'component-name';\nexport const COMPONENT_NAME_PROP = 'componentName';\nexport const HOIST_APPEND_TO_PROP = 'hoistAppendTo';\nexport const HOIST_APPEND_TO_ATTR = 'hoist-append-to';\nexport const HOIST_ATTR = 'hoist';\nexport const SEISMIC_HOIST_TAG_NAME = 'SEISMIC-HOIST';\nexport const HOIST_FIRST_SCROLL_PARENT = 'now-unstable-first-scroll-parent';\nexport const DEFER_ATTRIBUTE = 'defer';\nexport const APPEND_TO_PAYLOAD_PROP_NAME = 'appendToPayload';\nexport const APPEND_TO_META_PROP_NAME = 'appendToMeta';\nexport const PROPERTY_SELECTOR_SIGIL = '@';\nexport const PROPERTIES_SET_LIFECYCLE = 'onPropertiesSet';\n\n// legacy life cycle functions\nexport const ON_CONNECT_LIFECYCLE = 'onConnect';\nexport const ON_DISCONNECT_LIFECYCLE = 'onDisconnect';\nexport const ON_BOOTSTRAP_LIFECYCLE = 'onBootstrap';\n\n// public action types\nexport const {COMPONENT_CONNECTED} = actionTypes;\nexport const {COMPONENT_DISCONNECTED} = actionTypes;\nexport const {COMPONENT_BOOTSTRAPPED} = actionTypes;\nexport const {COMPONENT_PROPERTY_CHANGED} = actionTypes;\nexport const {COMPONENT_RENDERED} = actionTypes;\nexport const {COMPONENT_DOM_READY} = actionTypes;\nexport const {COMPONENT_PROPERTY_UPDATE_REQUESTED} = actionTypes;\nexport const {COMPONENT_RENDER_REQUESTED} = actionTypes;\nexport const {COMPONENT_DOM_TREE_READY} = actionTypes;\nexport const {COMPONENT_TREE_RENDERED} = actionTypes;\nexport const {COMPONENT_ACTION_DISPATCHED} = actionTypes;\nexport const {COMPONENT_INTERACTIVE} = actionTypes;\n\n// now namespace\nexport const NOW_HOIST_ATTR = 'now-hoist';\nexport const NOW_HOIST_PROP = 'nowHoist';\nexport const NOW_HOIST_APPEND_TO_ATTR = 'now-hoist-append-to';\nexport const NOW_HOIST_PREPEND_TO_ATTR = 'now-hoist-prepend-to';\nexport const NOW_HOIST_APPEND_TO_PROP = 'nowHoistAppendTo';\nexport const NOW_HOIST_PREPEND_TO_PROP = 'nowHoistPrependTo';\nexport const NOW_ID_ATTR = 'now-id';\nexport const NOW_ID_PROP = 'nowId';\nexport const NOW_COMPONENT_NAME_ATTR = 'now-name';\nexport const NOW_COMPONENT_NAME_PROP = 'nowName';\nexport const NOW_ENABLE_PROPERTY_SETTING_PREVENTION_ATTR = 'now-enable-property-setting-prevention';\nexport const NOW_ENABLE_PROPERTY_SETTING_PREVENTION_PROP = 'nowEnablePropertySettingPrevention';\nexport const NOW_LOGGING_LEVELS_PROP = 'nowLoggingLevels';\nexport const NOW_PLACEHOLDER_HEIGHT_PROP = 'nowPlaceholderHeight';\nexport const NOW_PLACEHOLDER_WIDTH_PROP = 'nowPlaceholderWidth';\nexport const NOW_NESTED_SELECTABLE_PROPS = 'nowNestedSelectableProps';\n\n// priorities\nexport const NOW_PRIORITY_ATTR = 'now-priority';\nexport const NOW_PRIORITY_PROP = 'nowPriority';\nexport const PRIORITY_LEVEL_LOW = 'low';\nexport const PRIORITY_LEVEL_MEDIUM = 'medium';\n\n// modes\nexport const NOW_MODE_ATTR = 'now-mode';\nexport const NOW_MODE_PROP = 'nowMode';\nexport const COMPONENT_MODE_ACTIVE = 'active';\nexport const COMPONENT_MODE_SUSPEND = 'suspend';\nexport const COMPONENT_MODE_DETACH = 'detach';\n\n// metrics\nexport const NOW_METRIC_TYPES_PROP = 'nowMetricTypes';\nexport const NOW_METRICS_LEVEL_PROP = 'nowMetricsLevel';\n\nexport const NOW_UI_EVENT = 'NOW_UI_EVENT';\n// now event types\nexport const STATE_UPDATED = 'STATE_UPDATED';\nexport const ACTION_DISPATCHED = 'ACTION_DISPATCHED';\nexport const ACTION_HANDLED = 'ACTION_HANDLED';\nexport const PROPAGATION_STOPPED = 'PROPAGATION_STOPPED';\nexport const DEFAULT_PREVENTED = 'DEFAULT_PREVENTED';\n\nexport const SCHEDULE_IMMEDIATELY_DO_NOT_USE_OR_YOU_WILL_BE_IMMEDIATELY_FIRED =\n\t'SCHEDULE_IMMEDIATELY_DO_NOT_USE_OR_YOU_WILL_BE_IMMEDIATELY_FIRED';\nexport const COMPONENT_INTERNAL_ACTION = 'NOW_COMPONENT_INTERNAL_ACTION';\n\nexport const HELPERS_IMMEDIATE = 'HELPERS_IMMEDIATE';\nexport const HELPERS_DEFER = 'HELPERS_DEFER';\nexport const HELPERS_SCHEDULED = 'HELPERS_SCHEDULED';\nexport const PACKAGE_NAME = '@servivcenow/ui-core';\n\nexport const SHADOW_ROOT_MODE_CLOSED = 'closed';\nexport const SHADOW_ROOT_MODE_OPEN = 'open';\n\nexport const COMPONENT_STATE_UPDATED = 'SEISMIC_COMPONENT_STATE_UPDATED';\n\n// Avoid re-render prop used to avoid component re-render if new & old states are same\nexport const NOW_AVOID_RENDER_PROP = 'nowAvoidRender';\n\nexport const ARIA_LIVE_REGION_UPDATE_REQUESTED = 'SEISMIC_ARIA_LIVE_REGION_UPDATE_REQUESTED';\nexport const ARIA_LIVE_POLITE = 'polite';\nexport const ARIA_LIVE_ASSERTIVE = 'assertive';\nexport const ARIA_LIVE_RELEVANT = 'aria-relevant';\nexport const ARIA_LIVE_TRIGGER_ADDITIONS = 'additions';\nexport const ARIA_LIVE_TRIGGER_REMOVALS = 'removals';\nexport const ARIA_LIVE_TRIGGER_TEXT = 'text';\nexport const ARIA_LIVE_TRIGGER_ALL = 'all';\n\nexport const SPAN_KIND_CLIENT = 3;\nexport const SPAN_FOR_RENDER = 'RENDER';\nexport const SPAN_FOR_ACTION_HANDLED = 'ACTION_HANDLE';\nexport const SPAN_FOR_DISPATCH = 'ACTION_DISPATCH';\nexport const SPAN_FOR_UPDATE_PROPERTIES = 'UPDATE_PROPERTIES';\nexport const SPAN_FOR_SET_PROPERTY = 'SET_PROPERTY';\nexport const SPAN_FOR_NOW_RESOLVE_PROPS_SET = 'NRP_SET_PROPERTY';\n\nexport const SPAN_FOR_UPDATE_STATE = 'UPDATE_STATE';\nexport const SPAN_FOR_UPDATE_CONTEXT = 'UPDATE_CONTEXT';\n\nexport const SPAN_FOR_COMPONENT_CONNECTED = 'CONNECTED';\nexport const SPAN_FOR_COMPONENT_CONSTRUCTED = 'CONSTRUCTED';\nexport const SPAN_FOR_COMPONENT_DISCONNECTED = 'DISCONNECTED';\nexport const SPAN_ATTR_IS_PRESENTATIONAL = 'component.is.presentational';\n\nexport const SPAN_ATTR_COMPONENT_QUICK_EQUAL = 'component.setProperty.isEqual';\nexport const SPAN_ATTR_COMPONENT_EQUAL = 'component.setProperty.isQuickEqual';\nexport const SPAN_ATTR_COMPONENT_RENDER_SKIPPED = 'component.render.skipped';\nexport const SPAN_ATTR_COMPONENT_EVENT_DEFAULT_PREVENTED = 'component.action.defaultPrevented';\nexport const SPAN_ATTR_COMPONENT_EVENT_PROPAGATION_STOPPED = 'component.action.propagationStopped';\nexport const SPAN_ATTR_DISPATCH_ACTION_TYPE = 'dispatch.action.type';\nexport const SPAN_ATTR_DISPATCH_PAYLOAD = 'dispatch.payload';\nexport const SPAN_ATTR_DISPATCH_SKIP_FOR_DETACHED = 'dispatch.skip.for.detached';\nexport const SPAN_ATTR_DISPATCH_STORE_UPDATE = 'dispatch.store.update';\nexport const SPAN_ATTR_DISPATCH_ACTION_INTERNAL_TYPE = 'dispatch.action.internal.type';\nexport const SPAN_ATTR_DISPATCH_SELF_END_TIME = 'dispatch.selfEndTime';\nexport const SPAN_ATTR_UPDATE_PROPERTIES_PROPNAME = 'update_properties.property.name';\nexport const SPAN_ATTR_UPDATE_PROPERTIES_PROPVALUE = 'update_properties.property.value';\nexport const SPAN_ATTR_UPDATE_PROPERTIES_PROP = 'update_properties.property';\nexport const SPAN_ATTR_UPDATE_PROPERTIES_IS_DECLARTIVE = 'update_properties.isDeclartive';\nexport const SPAN_ATTR_UPDATE_PROPERTIES_OPERATION = 'update_properties.operation';\nexport const SPAN_ATTR_UPDATE_PROPERTIES_SHOULD_UPDATE = 'update_properties.shouldUpdate';\n\nexport const SPAN_ATTR_SHOULD_BATCH = 'should.batch';\n\nexport const SPAN_ATTR_RENDER_CAUSE = 'render.cause';\nexport const SPAN_ATTR_UPDATE_PAYLOAD = 'update_state.payload';\nexport const SPAN_ATTR_DID_UPDATE = 'update_state.didUpdate';\nexport const SPAN_ATTR_SHOULD_RENDER = 'update_state.shouldRender';\n\nexport const SPAN_ATTR_TASK_SCHEDULED = 'taskScheduled';\nexport const SPAN_ATTR_TASK_STARTED = 'taskStarted';\nexport const SPAN_ATTR_TASK_DEDUPED = 'taskDeduped';\nexport const SPAN_ATTR_TASK_COMPLETED = 'taskCompleted';\n\nexport const SPAN_ATTR_SKIPPED_FOR_DISCONNECTED = 'render.skipped.for.disconnected';\nexport const SPAN_ATTR_SKIP_FOR_DETACHED = 'skip.for.detached';\nexport const SPAN_ATTR_SKIP_FOR_SUSPEND = 'render.skip.for.suspend';\nexport const SPAN_ATTR_SKIP_FOR_INTERSECTION = 'render.skip.for.intersection';\nexport const SPAN_ATTR_SKIP_FOR_EMPTY_PROPS = 'render.skip.for.empty.props';\n\nexport const SPAN_ATTR_KIND = 'kind';\nexport const SPAN_ATTR_LEVEL = 'seismic.level';\nexport const SPAN_ATTR_EXECUTION_TIMING = 'execution.timing';\n\nexport const SPAN_ATTR_ATTR_NAME = 'attribute.name';\nexport const SPAN_ATTR_ATTR_VALUE = 'attribute.value';\nexport const SPAN_ATTR_DO_NOT_USE_BOOTSTRAPPED = '__do_not_use_bootstrapped__';\nexport const SPAN_ATTR_SKIPPED_FOR_READ_ONLY_OR_COMPUTED_PROPERTY =\n\t'skipped.for.read-only-or-computed.property';\nexport const SPAN_ATTR_SKIPPED_FOR_DEFAULT_PREVENTED = 'skipped.for.default-prevented';\nexport const SPAN_ATTR_COMPONENT_ID = 'component.id';\nexport const SPAN_ATTR_OBSERVING_INTERSECTION = 'component.is.observing.intersection';\nexport const SPAN_ATTR_INTERACTION_ID = 'interactionId';\nexport const OTEL_STATUS_CODE_ERROR = 2;\n\nexport const SPAN_LEVEL_FINE = 100;\nexport const SPAN_LEVEL_FINER = 50;\nexport const SPAN_LEVEL_FINEST = 10;\n\nexport const PACKAGE_JSON_VERSION = pkgJsonContent.version;\nexport const COMPONENT_ID_NOT_YET_SET = 'new-or-not-yet-set';\n", "import {\n\tschedule,\n\ttypes,\n\tcountHighPriorityTasks,\n\tcountMediumPriorityTasks,\n\tcountAllHighPriorityTasks,\n\tcountAllMediumPriorityTasks\n} from './scheduler';\nimport log from './log';\nimport {\n\tgetHostPendingNetworkActionCount,\n\tgetPendingNetworkActionCount\n} from '@servicenow/ui-internal';\nimport {getConfigItem, configConstants} from '@servicenow/ui-config';\n\nconst {\n\tWHEN_COMPONENT_IS_IDLE_TIMEOUT,\n\tWHEN_COMPONENT_IS_IDLE_THROTTLE,\n\tWHEN_COMPONENT_IS_IDLE_MIN_INTERVAL\n} = configConstants;\nconst timeout = getConfigItem(WHEN_COMPONENT_IS_IDLE_TIMEOUT);\nconst throttle = getConfigItem(WHEN_COMPONENT_IS_IDLE_THROTTLE);\nconst interval = getConfigItem(WHEN_COMPONENT_IS_IDLE_MIN_INTERVAL);\nconst {WHEN_COMPONENT_IS_IDLE, WHEN_ALL_COMPONENTS_IDLE} = types;\n\nconst check = el => {\n\treturn new Promise(resolve => {\n\t\tschedule({\n\t\t\tfn() {\n\t\t\t\tresolve(\n\t\t\t\t\tgetHostPendingNetworkActionCount(el) +\n\t\t\t\t\t\tcountHighPriorityTasks(el) +\n\t\t\t\t\t\tcountMediumPriorityTasks(el)\n\t\t\t\t);\n\t\t\t},\n\t\t\ttype: WHEN_COMPONENT_IS_IDLE,\n\t\t\tmeta: {el, interactionId: 'componentIdleCheck'}\n\t\t});\n\t});\n};\n\nconst pause = () =>\n\tnew Promise(resolve => {\n\t\tsetTimeout(() => resolve(), throttle);\n\t});\n\nconst checkAll = () => {\n\treturn new Promise(resolve => {\n\t\tschedule({\n\t\t\tfn() {\n\t\t\t\tresolve(\n\t\t\t\t\tgetPendingNetworkActionCount() +\n\t\t\t\t\t\tcountAllMediumPriorityTasks() +\n\t\t\t\t\t\tcountAllHighPriorityTasks()\n\t\t\t\t);\n\t\t\t},\n\t\t\ttype: WHEN_ALL_COMPONENTS_IDLE,\n\t\t\tmeta: {el: {}, interactionId: 'allComponentsIdleCheck'}\n\t\t});\n\t});\n};\n\nexport function whenAllComponentsIdle(payload = {}) {\n\treturn new Promise(resolve => {\n\t\tschedule({\n\t\t\tasync fn() {\n\t\t\t\tlet busy = true;\n\t\t\t\tlet didPause = false;\n\t\t\t\tconst {withTimeOutInfo = false} = payload;\n\t\t\t\tconst timeoutId = setTimeout(() => {\n\t\t\t\t\tbusy = false;\n\t\t\t\t\tresolve(withTimeOutInfo ? {didPause, timedOut: true} : didPause);\n\t\t\t\t}, timeout);\n\n\t\t\t\twhile (busy) {\n\t\t\t\t\tbusy = await checkAll();\n\t\t\t\t\tif (busy) {\n\t\t\t\t\t\tdidPause = true;\n\t\t\t\t\t\tawait pause();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tclearTimeout(timeoutId);\n\t\t\t\tresolve(withTimeOutInfo ? {didPause, timedOut: false} : didPause);\n\t\t\t},\n\t\t\ttype: WHEN_ALL_COMPONENTS_IDLE,\n\t\t\tmeta: {el: {}, interactionId: 'whenAllComponentsIdle'}\n\t\t});\n\t});\n}\n\nexport default function whenComponentIsIdle(el) {\n\treturn new Promise(resolve => {\n\t\tschedule({\n\t\t\tasync fn() {\n\t\t\t\tlet busy = true;\n\t\t\t\tconst timeoutId = setTimeout(() => {\n\t\t\t\t\tlog('whenComponentIsIdle timed out.', {\n\t\t\t\t\t\thost: el,\n\t\t\t\t\t\torigin: 'whenComponentIsIdle'\n\t\t\t\t\t});\n\t\t\t\t\tbusy = false;\n\t\t\t\t\tresolve(el);\n\t\t\t\t}, timeout);\n\n\t\t\t\twhile (busy) {\n\t\t\t\t\tconst start = Date.now();\n\t\t\t\t\tbusy = await check(el);\n\t\t\t\t\tconst end = Date.now();\n\t\t\t\t\t// throttle in case of network activity, i.e. something is pending, but component is otherwise idle\n\t\t\t\t\t// if not there will be numerous unnecessary checks while waiting for network request to complete\n\t\t\t\t\tif (busy && end - start < interval) await pause();\n\t\t\t\t}\n\n\t\t\t\tclearTimeout(timeoutId);\n\t\t\t\tresolve(el);\n\t\t\t},\n\t\t\ttype: WHEN_COMPONENT_IS_IDLE,\n\t\t\tmeta: {el, interactionId: 'whenComponentIsIdle'}\n\t\t});\n\t});\n}\n", "import * as uiAnalyticsConsumer from '@servicenow/ui-analytics-consumer';\nimport {defer, requestIdleCallbackPollyfill, raf, isThrottled} from '@servicenow/ui-internal';\nimport {getConfigItem, configConstants} from '@servicenow/ui-config';\nimport {types as schedulerTypes} from '@servicenow/ui-metrics';\nimport Queue from './queue';\nimport metrics from './metrics';\nimport {\n\tSPAN_ATTR_TASK_COMPLETED,\n\tSPAN_ATTR_TASK_SCHEDULED,\n\tSPAN_ATTR_TASK_STARTED\n} from '../constants';\n\nconst {context} = uiAnalyticsConsumer;\nconst {ENABLE_SCHEDULER_STATS, SCHEDULER_RAF_TIMEOUT} = configConstants;\nconst enableSchedulerStats = getConfigItem(ENABLE_SCHEDULER_STATS);\nconst COMPONENT_RENDER = 'COMPONENT_RENDER';\nconst STATE_SET = 'STATE_SET';\nconst ACTION_HANDLER = 'ACTION_HANDLER';\nconst LEGACY_LIFECYCLE_FN = 'LEGACY_LIFECYCLE_FN';\nconst IMMEDIATE = 'IMMEDIATE';\nconst DEFER_IDLE = 'DEFER_IDLE';\nconst REFLECT_PROPERTIES = 'REFLECT_PROPERTIES';\nconst DISPATCH = 'DISPATCH';\nconst CLEANUP = 'CLEANUP';\nconst PROPERTY_SET = 'PROPERTY_SET';\nconst DEFER_HELPER_EXECUTION = 'DEFER_HELPER_EXECUTION';\nconst WHEN_COMPONENT_IS_IDLE = 'WHEN_COMPONENT_IS_IDLE';\nconst WHEN_ALL_COMPONENTS_IDLE = 'WHEN_ALL_COMPONENTS_IDLE';\nconst constants = {\n\tCOMPONENT_RENDER,\n\tSTATE_SET,\n\tACTION_HANDLER,\n\tLEGACY_LIFECYCLE_FN,\n\tIMMEDIATE,\n\tDEFER_IDLE,\n\tREFLECT_PROPERTIES,\n\tDISPATCH,\n\tCLEANUP,\n\tPROPERTY_SET,\n\tDEFER_HELPER_EXECUTION,\n\tWHEN_COMPONENT_IS_IDLE,\n\tWHEN_ALL_COMPONENTS_IDLE\n};\n\nconst P0 = 'PRIORITY_0';\nconst P0_5 = 'PRIORITY_0_5';\nconst P1 = 'PRIORITY_1';\nconst P2 = 'PRIORITY_2';\nconst P3 = 'PRIORITY_3';\nconst p0_5Queue = new Queue(false, []);\nconst p1Queue = new Queue(true, [], whenQueueIsEmptyForElement);\nconst p2Queue = new Queue(false, [], whenQueueIsEmptyForElement);\nconst p3Queue = new Queue(true, [WHEN_COMPONENT_IS_IDLE, WHEN_ALL_COMPONENTS_IDLE]);\nconst queueEmptyForElCallbacks = [];\nlet stats = {};\n\nconst types = {\n\t[IMMEDIATE]: {priority: P0},\n\t[DEFER_HELPER_EXECUTION]: {priority: P0_5},\n\t[COMPONENT_RENDER]: {priority: P1},\n\t[STATE_SET]: {priority: P2},\n\t[PROPERTY_SET]: {priority: P2},\n\t[ACTION_HANDLER]: {priority: P2},\n\t[LEGACY_LIFECYCLE_FN]: {priority: P2},\n\t[DISPATCH]: {priority: P2},\n\t[DEFER_IDLE]: {priority: P3},\n\t[REFLECT_PROPERTIES]: {priority: P3},\n\t[WHEN_COMPONENT_IS_IDLE]: {priority: P3},\n\t[WHEN_ALL_COMPONENTS_IDLE]: {priority: P3}\n};\n\nconst idleTimeout = process.env.UNSAFE_SEISMIC_TASK_TIMEOUT ? 100 : -1;\n\nlet highPriorityPending = false;\nlet mediumPriorityPending = false;\nlet lowPriorityPending = false;\n\nconst getSchedulerStats = () =>\n\tObject.entries(stats)\n\t\t.sort(([priority1], [priority2]) => priority1.localeCompare(priority2))\n\t\t.map(\n\t\t\t([\n\t\t\t\tpriority,\n\t\t\t\t{\n\t\t\t\t\tmaxQueueDepth,\n\t\t\t\t\ttotalQueued,\n\t\t\t\t\ttotalQueueTime,\n\t\t\t\t\tmaxQueueTime,\n\t\t\t\t\ttotalExecutions,\n\t\t\t\t\ttotalExecutionTime,\n\t\t\t\t\tmaxExecutionTime\n\t\t\t\t}\n\t\t\t]) => ({\n\t\t\t\tpriority,\n\t\t\t\tinQueue: {\n\t\t\t\t\t[P0]: 0,\n\t\t\t\t\t[P0_5]: p0_5Queue.length,\n\t\t\t\t\t[P1]: p1Queue.length,\n\t\t\t\t\t[P2]: p2Queue.length,\n\t\t\t\t\t[P3]: p3Queue.length\n\t\t\t\t}[priority],\n\t\t\t\tmaxQueueDepth,\n\t\t\t\ttotalQueued,\n\t\t\t\taverageQueueTime: totalQueueTime / totalQueued,\n\t\t\t\tmaxQueueTime,\n\t\t\t\ttotalExecutions,\n\t\t\t\taverageExecutionTime: totalExecutionTime / totalExecutions,\n\t\t\t\tmaxExecutionTime\n\t\t\t})\n\t\t);\nconst resetSchedulerStats = () => {\n\tstats = {};\n};\nglobalThis.nowUiFramework = globalThis.nowUiFramework || {};\nglobalThis.nowUiFramework.__getSchedulerStats = getSchedulerStats;\nglobalThis.nowUiFramework.__resetSchedulerStats = resetSchedulerStats;\n\nconst getDefaultStats = () => ({\n\tmaxQueueDepth: 0,\n\ttotalQueued: 0,\n\ttotalQueueTime: 0,\n\tmaxQueueTime: 0,\n\ttotalExecutions: 0,\n\ttotalExecutionTime: 0,\n\tmaxExecutionTime: 0\n});\n\nconst endSpan = span => {\n\tif (span) span.endSpan();\n};\n\nconst trackTaskScheduled = (task, priority, queue) => {\n\tif (task.meta && task.meta.span) {\n\t\ttask.meta.span.addEvent(SPAN_ATTR_TASK_SCHEDULED, {\n\t\t\tpriority,\n\t\t\tqueueSize: queue ? queue.length : 0\n\t\t});\n\t}\n\tif (!enableSchedulerStats) return;\n\tstats[priority] = stats[priority] || getDefaultStats();\n\ttask.scheduled = performance.now();\n\tstats[priority].totalQueued++;\n\tconst queueSize = queue ? queue.length : 0;\n\tif (queueSize > stats[priority].maxQueueDepth) stats[priority].maxQueueDepth = queueSize;\n};\n\nconst trackTaskStart = (task, priority) => {\n\tif (task.meta && task.meta.span) {\n\t\ttask.started = performance.now();\n\t\ttask.meta.span.addEvent(SPAN_ATTR_TASK_STARTED, {\n\t\t\tpriority\n\t\t});\n\t}\n\tif (!enableSchedulerStats) return;\n\tstats[priority] = stats[priority] || getDefaultStats();\n\tif (!task.started) task.started = performance.now();\n\tconst queueTime = task.started - task.scheduled;\n\tstats[priority].totalQueueTime += queueTime;\n\tif (queueTime > stats[priority].maxQueueTime) stats[priority].maxQueueTime = queueTime;\n};\n\nconst trackTaskCompleted = (task, priority) => {\n\tif (task.meta && task.meta.span) {\n\t\ttask.meta.span.addEvent(SPAN_ATTR_TASK_COMPLETED, {\n\t\t\tpriority,\n\t\t\texecutionTime: Number((performance.now() - task.started).toFixed(2))\n\t\t});\n\t\ttask.meta.span.endSpan();\n\t}\n\tif (!enableSchedulerStats) return;\n\tstats[priority] = stats[priority] || getDefaultStats();\n\tconst executionTime = performance.now() - task.started;\n\tstats[priority].totalExecutionTime += executionTime;\n\tstats[priority].totalExecutions++;\n\tif (executionTime > stats[priority].maxExecutionTime)\n\t\tstats[priority].maxExecutionTime = executionTime;\n};\n\nfunction schedule(task) {\n\tconst {type, fn, meta = {}} = task;\n\tif (!fn) {\n\t\tconst error = new Error('a fn is required for scheduling a task');\n\t\tthrow error;\n\t}\n\tif (!type) {\n\t\tconst error = new Error('a type is required for scheduling a task');\n\t\tthrow error;\n\t}\n\n\tconst boundFn = context && typeof context.bind === 'function' ? context.bind(fn) : fn;\n\n\tconst {\n\t\t[type]: {priority = P2}\n\t} = types;\n\n\tswitch (priority) {\n\t\tcase P0:\n\t\t\tmetrics(meta, schedulerTypes.SCHEDULE, type, 'P0', []);\n\t\t\ttrackTaskScheduled(task, P0);\n\t\t\ttrackTaskStart(task, priority);\n\t\t\tboundFn(meta);\n\t\t\ttrackTaskCompleted(task, priority);\n\t\t\tbreak;\n\t\tcase P0_5:\n\t\t\tmetrics(meta, schedulerTypes.SCHEDULE, type, 'P0_5', p0_5Queue);\n\t\t\tp0_5Queue.push({...task, fn: boundFn});\n\t\t\ttrackTaskScheduled(task, priority, p0_5Queue);\n\t\t\trunDeferredTask();\n\t\t\tbreak;\n\t\tcase P1:\n\t\t\tmetrics(meta, schedulerTypes.SCHEDULE, type, 'P1', p1Queue);\n\t\t\tp1Queue.push({...task, fn: boundFn, timestamp: performance.now()});\n\t\t\ttrackTaskScheduled(task, priority, p1Queue);\n\t\t\trunHighPriorityTasks();\n\t\t\tbreak;\n\t\tcase P2:\n\t\t\tmetrics(meta, schedulerTypes.SCHEDULE, type, 'P2', p2Queue);\n\t\t\tp2Queue.push({...task, fn: boundFn});\n\t\t\ttrackTaskScheduled(task, priority, p2Queue);\n\t\t\trunMediumPriorityTasks();\n\t\t\tbreak;\n\t\tcase P3:\n\t\t\tmetrics(meta, schedulerTypes.SCHEDULE, type, 'P3', p3Queue);\n\t\t\tp3Queue.push({...task, fn: boundFn});\n\t\t\ttrackTaskScheduled(task, priority, p3Queue);\n\t\t\trunLowPriorityTasks();\n\t\t\tbreak;\n\t}\n}\n\nlet isRendering = false;\nconst requestAnimationFrameTimeout = getConfigItem(SCHEDULER_RAF_TIMEOUT);\n\nfunction runDeferredTask() {\n\tdefer(() => {\n\t\tconst task = p0_5Queue.shift();\n\t\tif (task) {\n\t\t\tmetrics(task.meta, schedulerTypes.EXECUTE, task.type, 'P0_5', p0_5Queue);\n\t\t\ttrackTaskStart(task, P0_5);\n\t\t\ttask.fn(task.meta);\n\t\t\ttrackTaskCompleted(task, P0_5);\n\t\t}\n\t}, 0);\n}\n\nfunction runHighPriorityTasks() {\n\tif (highPriorityPending) return;\n\n\thighPriorityPending = true;\n\tisRendering = true;\n\tconst requestAnimationFrameTimeoutId = defer(() => {\n\t\tflushIdleQueues();\n\t\tisRendering = false;\n\t}, requestAnimationFrameTimeout);\n\traf(() => {\n\t\tclearTimeout(requestAnimationFrameTimeoutId);\n\t\tlet task;\n\t\tconst start = Date.now();\n\t\twhile ((task = p1Queue.shift())) {\n\t\t\tmetrics(task.meta, schedulerTypes.EXECUTE, task.type, 'P1', p1Queue);\n\t\t\ttrackTaskStart(task, P1);\n\t\t\ttask.fn(task.meta);\n\t\t\ttrackTaskCompleted(task, P1);\n\t\t\tif (Date.now() - start >= 100) break;\n\t\t}\n\n\t\tisRendering = false;\n\t\thighPriorityPending = false;\n\t\tif (p1Queue.length) runHighPriorityTasks();\n\n\t\tif (p2Queue.length) runMediumPriorityTasks();\n\n\t\tif (p3Queue.length) runLowPriorityTasks();\n\t});\n}\n\nfunction runMediumPriorityTasks() {\n\tif (mediumPriorityPending) return;\n\tif (isRendering) return;\n\n\tmediumPriorityPending = true;\n\trequestIdleCallbackPollyfill(\n\t\tdeadline => {\n\t\t\tmediumPriorityPending = false;\n\t\t\tlet task;\n\n\t\t\twhile (deadline.timeRemaining() > 1 && (task = p2Queue.shift())) {\n\t\t\t\tmetrics(task.meta, schedulerTypes.EXECUTE, task.type, 'P2', p2Queue);\n\t\t\t\ttrackTaskStart(task, P2);\n\t\t\t\ttask.fn(task.meta);\n\t\t\t\ttrackTaskCompleted(task, P2);\n\t\t\t}\n\n\t\t\tif (p2Queue.length) runMediumPriorityTasks();\n\n\t\t\tif (p3Queue.length) runLowPriorityTasks();\n\t\t},\n\t\t{timeout: idleTimeout}\n\t);\n}\n\nfunction runLowPriorityTasks() {\n\tif (mediumPriorityPending) return;\n\n\tif (lowPriorityPending) return;\n\n\tif (isRendering) return;\n\n\tlowPriorityPending = true;\n\trequestIdleCallbackPollyfill(\n\t\tdeadline => {\n\t\t\tlet task;\n\t\t\twhile (deadline.timeRemaining() > 1 && (task = p3Queue.shift())) {\n\t\t\t\tmetrics(task.meta, schedulerTypes.EXECUTE, task.type, 'P3', p3Queue);\n\t\t\t\ttrackTaskStart(task, P3);\n\t\t\t\ttask.fn(task.meta);\n\t\t\t\ttrackTaskCompleted(task, P3);\n\t\t\t}\n\n\t\t\tlowPriorityPending = false;\n\t\t\tif (p3Queue.length) runLowPriorityTasks();\n\t\t},\n\t\t{timeout: idleTimeout}\n\t);\n}\n\nfunction flushIdleQueues() {\n\tlet task;\n\twhile ((task = p0_5Queue.shift())) {\n\t\ttask.fn(task.meta);\n\t\tendSpan(task.meta.span);\n\t}\n\twhile ((task = p1Queue.shift())) {\n\t\ttask.fn(task.meta);\n\t\tendSpan(task.meta.span);\n\t}\n\thighPriorityPending = false;\n\twhile ((task = p2Queue.shift())) {\n\t\ttask.fn(task.meta);\n\t\tendSpan(task.meta.span);\n\t}\n\twhile ((task = p3Queue.shift())) {\n\t\ttask.fn(task.meta);\n\t\tendSpan(task.meta.span);\n\t}\n}\n\nfunction isQueueFlushEnabled() {\n\treturn (\n\t\tprocess.env.UNSAFE_SEISMIC_EMIT_CUSTOM_EVENT || window.nowUiFramework.queueFlushEnabled === true\n\t);\n}\n\nlet flushing = false;\n// eslint-disable-next-line no-inner-declarations\nfunction flushQueues() {\n\tflushing = true;\n\tlet task;\n\n\twhile ((task = p0_5Queue.shift())) {\n\t\ttask.fn(task.meta);\n\t\tendSpan(task.meta.span);\n\t}\n\twhile ((task = p1Queue.shift())) {\n\t\ttask.fn(task.meta);\n\t\tendSpan(task.meta.span);\n\t}\n\twhile ((task = p2Queue.shift())) {\n\t\ttask.fn(task.meta);\n\t\tendSpan(task.meta.span);\n\t}\n\twhile ((task = p3Queue.shift())) {\n\t\ttask.fn(task.meta);\n\t\tendSpan(task.meta.span);\n\t}\n\n\tdefer(() => {\n\t\tif (p0_5Queue.length || p1Queue.length || p2Queue.length || p3Queue.length)\n\t\t\treturn flushQueues();\n\n\t\tflushing = false;\n\t\tconst event = new CustomEvent('SEISMIC_QUEUE_FLUSHED', {composed: true, bubbles: true});\n\t\treturn document.dispatchEvent(event);\n\t}, 0);\n}\n\ndocument.addEventListener('FLUSH_SEISMIC_QUEUE', () => {\n\tif (!flushing && isQueueFlushEnabled()) flushQueues();\n});\n\ndocument.addEventListener(\n\t'visibilitychange',\n\t() => {\n\t\tif (isThrottled()) flushIdleQueues();\n\t},\n\tfalse\n);\n\nfunction countHighPriorityTasks(element) {\n\treturn p1Queue.sizeForElement(element);\n}\n\nfunction countAllHighPriorityTasks() {\n\treturn p1Queue.length;\n}\n\nfunction countAllMediumPriorityTasks() {\n\treturn p2Queue.length;\n}\n\nfunction countMediumPriorityTasks(element) {\n\treturn p2Queue.sizeForElement(element);\n}\n\nfunction addQueueEmptyForElCb(fn) {\n\tqueueEmptyForElCallbacks.push(fn);\n}\n\nfunction whenQueueIsEmptyForElement(el) {\n\tconst len = queueEmptyForElCallbacks.length;\n\tfor (let i = 0; i < len; i++) queueEmptyForElCallbacks[i](el);\n}\n\nexport {\n\tschedule,\n\tconstants as types,\n\tcountHighPriorityTasks,\n\tcountMediumPriorityTasks,\n\taddQueueEmptyForElCb,\n\tcountAllHighPriorityTasks,\n\tcountAllMediumPriorityTasks,\n\tgetSchedulerStats,\n\tresetSchedulerStats\n};\n", "import {SPAN_ATTR_TASK_DEDUPED} from '../constants';\n\n/**\n * Maintains task insert order but (when dedupe==true) will skip earlier tasks\n * if there's another task for the same element enqueued later\n */\nexport default class Queue {\n\tconstructor(dedupe, doNotDedup = [], whenQueueIsEmptyForElementCb) {\n\t\tthis._els = new WeakMap();\n\t\tthis._tasks = [];\n\t\tthis._dedupe = dedupe;\n\t\tthis._doNotDedup = doNotDedup;\n\t\tthis._whenQueueIsEmptyForElementCb = whenQueueIsEmptyForElementCb;\n\t}\n\n\tpush(task) {\n\t\tconst {el} = task.meta;\n\t\tthis._els.set(el, this.sizeForElement(el) + 1);\n\t\tthis._tasks.push(task);\n\t}\n\n\t// this value may be a little misleading because it doesn't account for\n\t// possible task duplicates\n\tget length() {\n\t\treturn this._tasks.length;\n\t}\n\n\tsizeForElement(el) {\n\t\treturn this._els.get(el) || 0;\n\t}\n\n\tshift() {\n\t\twhile (this._tasks.length) {\n\t\t\tconst task = this._tasks.shift();\n\t\t\tconst {el} = task.meta;\n\t\t\tconst existingCount = this._els.get(el);\n\t\t\tif (existingCount === 1) {\n\t\t\t\tthis._els.delete(el);\n\t\t\t\tif (this._whenQueueIsEmptyForElementCb) this._whenQueueIsEmptyForElementCb(el);\n\t\t\t} else {\n\t\t\t\tthis._els.set(el, existingCount - 1);\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\texistingCount === 1 ||\n\t\t\t\t!this._dedupe ||\n\t\t\t\tthis._doNotDedup.indexOf(task.type) !== -1 ||\n\t\t\t\t!el.isConnected\n\t\t\t)\n\t\t\t\treturn task;\n\t\t\telse {\n\t\t\t\tif (task.meta?.span) {\n\t\t\t\t\ttask.meta.span.addEvent(SPAN_ATTR_TASK_DEDUPED, {\n\t\t\t\t\t\ttype: task.type,\n\t\t\t\t\t\tqueueSize: this._tasks.length\n\t\t\t\t\t});\n\t\t\t\t\ttask.meta.span.endSpan();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n", "import {mark} from '@servicenow/ui-metrics';\n\nexport default function metrics(meta, type, taskType, priority, queue) {\n\tconst {interactionId, el} = meta;\n\tmark(el, interactionId, type, {type: taskType, priority, queueLength: queue.length});\n}\n", "import {createLogger} from '@servicenow/ui-internal';\n\nexport default createLogger({\n\tmodule: '@servicenow/ui-core'\n});\n", "import {set as setStat} from './stats';\nimport {getConfigItem, configConstants} from '@servicenow/ui-config';\nimport createElementClass from './createElementClass';\nimport log from './log';\nimport validateConfig, {validatePresentationalConfig} from './validateConfig';\nconst {CHECK_FOR_POSSIBLE_PRESENTATIONAL_COMPONENTS, POSSIBLE_PRESENTATIONAL_COMPONENTS} =\n\tconfigConstants;\nconst checkForPossiblePresentationalComponents = getConfigItem(\n\tCHECK_FOR_POSSIBLE_PRESENTATIONAL_COMPONENTS\n);\nconst possiblePresentationalComponents = getConfigItem(POSSIBLE_PRESENTATIONAL_COMPONENTS);\n\n/**\n * Define a custom element.\n * @function createCustomElement\n * @example\n * import {createCustomElement} from '@servicenow/ui-core';\n *\n * createCustomElement('sn-hello-world', {\n *   properties: {\n *     name: {\n *       default: 'Fred'\n *     }\n *   },\n *   transformState: ({properties}) => properties,\n *   view: ({name}) => <p>Hello {name}!</p>\n * });\n * @param {string} elementName - The tag name of the custom element.\n * @param {Object} config - The custom element configuration.\n * @param {function} [config.setInitialState] - Function that returns the initial state for a component.\n * @param {Object} [config.properties] - The properties used by a custom element.\n * @param {*} [config.properties.&lt;name&gt;.default] - The default value of the property.\n * @param {function} [config.properties.&lt;name&gt;.computed] - A function that computes the property value.\n * @param {boolean} [config.properties.&lt;name&gt;.reflect] - Reflect property change to corresponding attribute. This value is `false` by default, but for a limited, finite subset of keys that overlap with HTML Attribute keys, it is `true` and cannot be set to `false`.\n * @param {boolean} [config.properties.&lt;name&gt;.unstableParse] - Deprecated, use Type Schemas instead. Parse attribute values when corresponding properties are set. This value is `false` by default.\n * @param {boolean} [config.properties.&lt;name&gt;.unstablePreserveEmptyStr] - Deprecated, use Type Schemas instead. Preserve an empty string when attribute, property is present instead of converting the value to a boolean.\n * @param {boolean} [config.properties.&lt;name&gt;.readOnly] - Property cannot be externally set. This value is `false` by default.\n * @param {boolean} [config.properties.&lt;name&gt;.schema] - Schema that will validate the passed in value of the property during development. This value is `null` by default.\n * @param {boolean} [config.properties.&lt;name&gt;.selectable] - A selectable property can be selected or pointed by other component and map to its local property.\n * @param {boolean} [config.properties.&lt;name&gt;.shouldRenderWhenSet] - Property value change should trigger component render. This value is `true` by default.\n * @param {Object} [config.actions] - The actions the custom element dispatches.\n * @param {boolean} [config.actions.&lt;type&gt;.schema] - Schema that will validate if the payload of the action dispatched from this element is correct.\n * @param {Object} [config.actionHandlers] - Handlers to run when the action type is dispatched.\n * @param {function} [config.actionHandlers.&lt;type&gt;] - The action handler as an effect function or config object.\n * @param {function} [config.view] - A function that renders transformed component state and properties to virtual DOM.\n * @param {function} [config.transformState] - A function that executes before a component's state is passed to the view.\n * @param {Array} [config.behaviors] - Behaviors applied to the custom element.\n * @param {Object} [config.shadowRootOptions] - Options applied to the shadowRoot of a custom element.\n * @param {String} [config.shadowRootOptions.mode] - Mode of the shadowRoot.  Allowed values are `open` and `closed`.  When `closed` access is denied to `shadowRoot` from the element.  This value is `open` by default.\n */\nexport default function createCustomElementFactory(options) {\n\tconst {componentRegistry, presentational = false} = options;\n\n\treturn function createCustomElement(name, config = {}) {\n\t\tif (customElements.get(name))\n\t\t\treturn log(`The custom element, ${name}, has already been defined.`);\n\n\t\tif (presentational) {\n\t\t\tvalidatePresentationalConfig(name, config);\n\t\t} else {\n\t\t\tif (\n\t\t\t\tcheckForPossiblePresentationalComponents &&\n\t\t\t\tvalidatePresentationalConfig(name, config, {shouldLog: false})\n\t\t\t)\n\t\t\t\tpossiblePresentationalComponents.push(name);\n\n\t\t\tvalidateConfig(name, config);\n\t\t}\n\n\t\tcustomElements.define(\n\t\t\tname,\n\t\t\tcreateElementClass({\n\t\t\t\tpresentational,\n\t\t\t\t...config,\n\t\t\t\tname,\n\t\t\t\tcomponentRegistry\n\t\t\t})\n\t\t);\n\n\t\tsetStat('defined', name.toLowerCase());\n\t};\n}\n", "import * as uiAnalyticsConsumer from '@servicenow/ui-analytics-consumer';\nimport {set as setStat} from './stats';\nimport {\n\tcreateInteractionId,\n\tmark,\n\ttypes as metrics,\n\tsetInteractionId\n} from '@servicenow/ui-metrics';\nimport {buildPropertiesValidator} from './utils/schema';\nimport {\n\tsandbox,\n\tlocations,\n\tguid,\n\tpendingNetworkActionCountForHost,\n\tclearPendingNetworkActionsForHost,\n\taddPendingNetworkActionForHostCb,\n\tisEqual,\n\tisEmpty,\n\tNOW_SKIP_RENDER_UNTIL_PRESENT,\n\tRESOLVED_PROPS_ATTRIBUTE,\n\tget,\n\tNOW_DEFER_HYDRATION_ATTR\n} from '@servicenow/ui-internal';\nimport {normalizeConfig} from './utils/config';\nimport {\n\tCOMPONENT_ID_ATTRIBUTE,\n\tDEFER_ATTRIBUTE,\n\tCOMPONENT_CONNECTED,\n\tCOMPONENT_DISCONNECTED,\n\tCOMPONENT_BOOTSTRAPPED,\n\tCOMPONENT_RENDERED as COMPONENT_RENDERED_ACTION_TYPE,\n\tNOW_MODE_PROP,\n\tNOW_ENABLE_PROPERTY_SETTING_PREVENTION_PROP,\n\tCOMPONENT_MODE_SUSPEND,\n\tCOMPONENT_MODE_DETACH,\n\tNOW_ID_ATTR,\n\tCOMPONENT_DOM_READY,\n\tSCHEDULE_IMMEDIATELY_DO_NOT_USE_OR_YOU_WILL_BE_IMMEDIATELY_FIRED,\n\tHELPERS_SCHEDULED as HELPERS_SCHEDULED_CONST,\n\tHELPERS_DEFER as HELPERS_DEFER_CONST,\n\tHELPERS_IMMEDIATE as HELPERS_IMMEDIATE_CONST,\n\tSTATE_UPDATED,\n\tCOMPONENT_INTERNAL_ACTION,\n\tCOMPONENT_PROPERTY_UPDATE_REQUESTED,\n\tCOMPONENT_RENDER_REQUESTED,\n\tCOMPONENT_DOM_TREE_READY,\n\tCOMPONENT_TREE_RENDERED,\n\tSHADOW_ROOT_MODE_CLOSED,\n\tNOW_PLACEHOLDER_HEIGHT_PROP,\n\tNOW_PLACEHOLDER_WIDTH_PROP,\n\tNOW_HOIST_PROP,\n\tHOIST_ATTR,\n\tNOW_PRIORITY_PROP,\n\tNOW_PRIORITY_ATTR,\n\tPRIORITY_LEVEL_LOW,\n\tSPAN_FOR_RENDER,\n\tSPAN_FOR_SET_PROPERTY,\n\tSPAN_KIND_CLIENT,\n\tSPAN_ATTR_COMPONENT_RENDER_SKIPPED,\n\tSPAN_ATTR_RENDER_CAUSE,\n\tPACKAGE_JSON_VERSION,\n\tSPAN_ATTR_COMPONENT_QUICK_EQUAL,\n\tNOW_NESTED_SELECTABLE_PROPS,\n\tSPAN_FOR_NOW_RESOLVE_PROPS_SET,\n\tSPAN_ATTR_ATTR_NAME,\n\tSPAN_ATTR_ATTR_VALUE,\n\tSPAN_ATTR_DO_NOT_USE_BOOTSTRAPPED,\n\tSPAN_ATTR_SKIPPED_FOR_READ_ONLY_OR_COMPUTED_PROPERTY,\n\tSPAN_ATTR_SKIPPED_FOR_DEFAULT_PREVENTED,\n\tSPAN_ATTR_COMPONENT_ID,\n\tSPAN_ATTR_INTERACTION_ID,\n\tSPAN_ATTR_SKIPPED_FOR_DISCONNECTED,\n\tSPAN_ATTR_SKIP_FOR_SUSPEND,\n\tSPAN_ATTR_SKIP_FOR_DETACHED,\n\tSPAN_ATTR_SKIP_FOR_INTERSECTION,\n\tSPAN_ATTR_OBSERVING_INTERSECTION,\n\tSPAN_ATTR_SKIP_FOR_EMPTY_PROPS,\n\tSPAN_FOR_COMPONENT_CONNECTED,\n\tSPAN_FOR_COMPONENT_CONSTRUCTED,\n\tSPAN_FOR_COMPONENT_DISCONNECTED,\n\tCOMPONENT_ID_NOT_YET_SET,\n\tSPAN_ATTR_IS_PRESENTATIONAL\n} from './constants';\nimport {\n\tPRESENTATIONAL,\n\tVARIABLES,\n\tCOMPONENT_ID,\n\tCONNECTED,\n\tPROPERTY_DEFS,\n\tSTATE,\n\tPROPS,\n\tDISPATCH,\n\tCONDITIONAL_DISPATCH,\n\tBOOTSTRAPPED_HANDLED,\n\tCONNECTED_HANDLED,\n\tUNHOIST,\n\tHOIST_CHANGED,\n\tHOIST_PARENT_CHANGED,\n\tGET_RESOLVED_PROPERTY,\n\tROOT_NODE,\n\tVERSION,\n\tATTACHED_ROOT_NODE,\n\tDEFERRED,\n\tCONFIG,\n\tACTION_HANDLERS,\n\tTARGETED_ACTION_TYPES,\n\tRENDERED_ONCE,\n\tTREE_RENDERED_ONCE,\n\tHELPERS_SCHEDULED,\n\tHELPERS_DEFER,\n\tHELPERS_IMMEDIATE,\n\tRENDER,\n\tSTYLE_PROXY,\n\tSET_PROPERTY,\n\tPREVIOUS_RENDER_STATE,\n\tPREVIOUS_RENDER_PROPERTIES,\n\tPREVIOUS_TREE_RENDER_STATE,\n\tPREVIOUS_TREE_RENDER_PROPERTIES,\n\tCHECK_IF_TREE_RENDERED,\n\tCHILD_IS_RENDERING,\n\tCHILDREN_TO_BE_RENDERED,\n\tCHILD_HAS_RENDERED,\n\tNOTIFY_PARENT_THAT_CHILD_IS_RENDERING,\n\tNOTIFY_PARENT_THAT_CHILD_TREE_HAS_RENDERED,\n\tNEEDS_TO_KNOW_ABOUT_TREE_RENDERS,\n\tANCESTOR_ROOT_NODE,\n\tANCESTOR_PATH,\n\tUPDATE_AFFECTED_COMPONENTS,\n\tRUNTIME_ACTION_HANDLERS,\n\tINTERSECTED,\n\tUSING_INTERSECTION_OBSERVER,\n\tINTERSECTION_TRIGGERED,\n\tREMOVE_INTERSECTED_STYLES,\n\tDETACHED_SHADOW_ROOT_CHILDREN_FRAGMENT,\n\tDETACHED_COMPONENT_PROPERTY_MAP,\n\tLOW_PRIORITY_PENDING,\n\tCONNECTED_TIMESTAMP,\n\tCHILDREN_TO_BE_INTERACTIVE,\n\tSELECTABLE_PROPERTIES,\n\tTREE_RENDERED_ONCE_TIMESTAMP,\n\tRENDERED_ONCE_TIMESTAMP,\n\tCONNECTED_DEFERRED_TIMESTAMP,\n\tCONTEXT,\n\tPROPERTIES_WITH_SELECTOR,\n\tREMOVE_UPDATE_CUSTOM_ELEMENT_OBSERVER,\n\tEXISTING_SHADOW_ROOT_ON_CREATE,\n\tPROPERTIES_WITH_NESTED_SELECTOR,\n\tHAS_NOW_RESOLVED_PROPS\n} from './symbols';\nimport {\n\tresolveRenderer,\n\tassertValidPropertyNames,\n\tresolveProperties,\n\tgetInitialPropertyValue,\n\tisReflecting,\n\tclearReflection,\n\tfilterPropertyDefinitions,\n\tshouldSetAttribute,\n\tshouldSetProperty,\n\ttoPropertyName,\n\ttoAttributeName,\n\tcreateLifecycleFunctions,\n\tmeasure,\n\tselectablePropertyResolver,\n\ttriggerComponentUpdates,\n\tupdateSelectedPropertyMappings,\n\tcamelCaseProperties,\n\tunescapeReservedCharacters,\n\tisHoisted,\n\tgetHoistTarget,\n\temitNowUiEvent,\n\tgetHostVariables,\n\tgetRootNode,\n\tapplyMetrics,\n\tresolveComputedProperties,\n\tcomputeProperties,\n\tintersectionObserver,\n\tapplyIntersectStyles,\n\tshouldOptOutOfDeepCompareForPage,\n\tmarkComponentInteractive,\n\tcreateOnStateChangeArgs,\n\tremoveStyleFragmentFromCache,\n\tsetUpdateConfigResolver,\n\taddUpdateCustomElementObserver,\n\tgetSpanOptions,\n\tparseForSpan\n} from './utils';\n\nimport createContextProxy from './context/createContextProxy';\nimport {removeConsumer as removeContextConsumer} from './context/consumers';\nimport validateContext from './context/validateContext';\nimport {property as parseProperty, properties as parseProperties, parse} from './utils/parse';\nimport log from './log';\nimport {\n\tcreateDispatcher,\n\tcreateConditionalDispatch,\n\taddActionHandlers,\n\tremoveActionHandlers\n} from './actions';\nimport createHelpers from './utils/helpers';\nimport {shouldHoistAttribute, hoistAttribute, unhoistAttribute, default as hoist} from './hoist';\nimport applyStyles from './applyStyles';\nimport removeStyles from './removeStyles';\nimport {\n\tschedule,\n\ttypes,\n\tcountHighPriorityTasks,\n\tcountMediumPriorityTasks,\n\taddQueueEmptyForElCb\n} from './scheduler';\nimport {default as shapeRenderData, reflectProperty} from './shape-render-data';\nimport {\n\tgetAffected,\n\tresolveSelectedProperty,\n\tresolveSelectedProperties,\n\tremoveMappings,\n\tgetComponentAffected,\n\tremoveResolvedMapping,\n\tgetPartsForNestedSelectableProps,\n\tupdatePropertiesWithSelector,\n\tapplyUpdatesForSelectableProps,\n\tisSelector\n} from './property-selectors';\nimport {mergeBehaviorProperties} from './utils/config/mergeBehaviorProperties';\nimport {normalizeBehaviors} from './utils/config/normalizeBehaviors';\nimport {getConfigItem, configConstants} from '@servicenow/ui-config';\nimport quickEquals from './utils/helpers/quickEquals';\nimport addResolvedSelectedPropertyMappingWithResolvedValue from './utils/addResolvedSelectedPropertyMappingWithResolvedValue';\n\nimport {\n\tconnectNowResolvedPropsCallbacks,\n\tdisconnectNowResolvedPropsCallbacks,\n\tprocessNowResolvedProps\n} from './utils/nowResolvedPropsHandler';\n\nconst {tracer, isValidTraceId} = uiAnalyticsConsumer;\nconst {ENABLE_SCHEDULER_QUEUE_COUNTS, METRICS_COMPONENT_INTERACTIVE_ENABLED} = configConstants;\nconst enableSchedulerQueueCounts = getConfigItem(ENABLE_SCHEDULER_QUEUE_COUNTS);\nconst {COMPONENT_RENDER, DEFER_IDLE} = types;\nconst {ENABLE_PROPERTY_DEEP_COMPARE} = configConstants;\n\nconst enableDeepPropertyCompare = getConfigItem(ENABLE_PROPERTY_DEEP_COMPARE);\nlet optOutDeepCompare = shouldOptOutOfDeepCompareForPage('property');\nwindow.addEventListener(\n\t'popstate',\n\t() => (optOutDeepCompare = shouldOptOutOfDeepCompareForPage('property'))\n);\n\nconst shouldMarkInteractive = getConfigItem(METRICS_COMPONENT_INTERACTIVE_ENABLED);\nconst idleCallback = shouldMarkInteractive\n\t? el => markComponentInteractive(el, componentRegistryForInteractive)\n\t: () => null;\nlet componentRegistryForInteractive;\naddPendingNetworkActionForHostCb(idleCallback);\naddQueueEmptyForElCb(idleCallback);\n\nfunction clearRootNode(host, rootNode, onStateChange) {\n\tsandbox(onStateChange, {\n\t\targs: [rootNode, () => null, {}, host[HELPERS_DEFER]],\n\t\thost,\n\t\tdetails: {\n\t\t\ttype: 'onStateChange'\n\t\t},\n\t\tlocation: locations.RENDERER,\n\t\tdispatch: host[DISPATCH],\n\t\tlog\n\t});\n}\n\nfunction getResolvedState(hostVariables, componentRegistry) {\n\treturn {\n\t\t...hostVariables[STATE],\n\t\tproperties: resolveSelectedProperties(\n\t\t\tcomponentRegistry,\n\t\t\tselectablePropertyResolver,\n\t\t\t{...hostVariables[PROPS]},\n\t\t\thostVariables[PROPERTY_DEFS],\n\t\t\thostVariables[PROPERTIES_WITH_SELECTOR]\n\t\t)\n\t};\n}\n\nexport default function createElementClass(config) {\n\tconst {componentRegistry, presentational, state: initialState, name: tagName} = config;\n\tconst renderer = resolveRenderer(config);\n\tconst {\n\t\ttype: {\n\t\t\tonStateChange,\n\t\t\tonConnect: rendererOnConnect,\n\t\t\tonDisconnect: rendererOnDisconnect,\n\t\t\tdeprioritizeStyles = false // eslint-disable-line no-unused-vars\n\t\t},\n\t\ttransformState = props => props,\n\t\tcoeffects: useCoeffectsLikeObjectInView,\n\t\tview\n\t} = renderer;\n\n\tlet initialized = false;\n\tlet normalizedConfig;\n\tlet onConnect;\n\tlet onDisconnect;\n\tlet combinedPropertyDefs;\n\tlet shadowRootOptions;\n\tlet validateProperties;\n\tlet propertyKeys;\n\tlet rendererView;\n\tconst selectabledProperties = [];\n\tcomponentRegistryForInteractive = componentRegistryForInteractive || componentRegistry;\n\n\tfunction initialize() {\n\t\tif (initialized) return;\n\n\t\tinitialized = true;\n\t\tnormalizedConfig = normalizeConfig(config);\n\t\tconst lifecycleFns = createLifecycleFunctions(\n\t\t\trendererOnConnect,\n\t\t\trendererOnDisconnect,\n\t\t\tdeprioritizeStyles\n\t\t);\n\t\tonConnect = lifecycleFns.onConnect;\n\t\tonDisconnect = lifecycleFns.onDisconnect;\n\n\t\tcombinedPropertyDefs = normalizedConfig.properties;\n\t\tshadowRootOptions = normalizedConfig.shadowRootOptions;\n\n\t\tvalidateProperties = buildPropertiesValidator(combinedPropertyDefs);\n\t\tpropertyKeys = Object.keys(combinedPropertyDefs);\n\n\t\trendererView = view;\n\n\t\tfor (const k in combinedPropertyDefs) {\n\t\t\tif (combinedPropertyDefs[k].selectable) selectabledProperties.push(k);\n\t\t}\n\n\t\tconst {length: propertyKeysCount} = propertyKeys;\n\t\tfor (let i = 0; i < propertyKeysCount; i++) {\n\t\t\tconst name = propertyKeys[i];\n\t\t\taccessors[name] = {\n\t\t\t\tget() {\n\t\t\t\t\treturn this.getProperty(name);\n\t\t\t\t},\n\t\t\t\tset(value) {\n\t\t\t\t\tthis[SET_PROPERTY](name, value);\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\n\t\tObject.defineProperties(SeismicElement.prototype, accessors);\n\n\t\tassertValidPropertyNames(propertyKeys);\n\t}\n\n\tsetUpdateConfigResolver(tagName, (update, updateMeta) => {\n\t\tconst {comparison = {}} = updateMeta;\n\t\tconst modifiedConfig = {};\n\t\tfor (const configKey in update) {\n\t\t\tif (configKey in comparison) {\n\t\t\t\tif (comparison[configKey]) {\n\t\t\t\t\tmodifiedConfig[configKey] = update[configKey];\n\t\t\t\t}\n\t\t\t} else if (update[configKey] !== config[configKey]) {\n\t\t\t\tmodifiedConfig[configKey] = update[configKey];\n\t\t\t}\n\t\t}\n\t\treturn {\n\t\t\tsupportedConfigKeys: presentational\n\t\t\t\t? ['styles', 'view']\n\t\t\t\t: ['styles', 'view', 'actionHandlers'],\n\t\t\tmodifiedConfig\n\t\t};\n\t});\n\taddUpdateCustomElementObserver(tagName, update => {\n\t\tif (update.styles) {\n\t\t\tconfig.styles = update.styles;\n\t\t\tremoveStyleFragmentFromCache(tagName);\n\t\t}\n\t\tif (update.actionHandlers) {\n\t\t\tconfig.actionHandlers = update.actionHandlers;\n\t\t\tnormalizedConfig = normalizeConfig(config);\n\t\t}\n\t\tif (update.view) {\n\t\t\tconfig.view = update.view;\n\t\t\trendererView = update.view;\n\t\t}\n\t});\n\n\tclass SeismicElement extends HTMLElement {\n\t\tconstructor() {\n\t\t\tsuper();\n\t\t\tinitialize();\n\t\t\tconst constructedSpan = tracer.startSpan(SPAN_FOR_COMPONENT_CONSTRUCTED, {\n\t\t\t\tattributes: {\n\t\t\t\t\ttagName: this.tagName.toLowerCase(),\n\t\t\t\t\tcomponentId: COMPONENT_ID_NOT_YET_SET,\n\t\t\t\t\t[SPAN_ATTR_IS_PRESENTATIONAL]: !!presentational\n\t\t\t\t},\n\t\t\t\tkind: SPAN_KIND_CLIENT\n\t\t\t});\n\t\t\tconst variables = {};\n\t\t\tthis[VARIABLES] = variables;\n\n\t\t\tvariables[SELECTABLE_PROPERTIES] = selectabledProperties;\n\t\t\tvariables[PROPERTIES_WITH_SELECTOR] = {};\n\t\t\tvariables[PROPERTIES_WITH_NESTED_SELECTOR] = {};\n\t\t\tvariables[PRESENTATIONAL] = presentational;\n\t\t\tvariables[PROPS] = {};\n\t\t\tvariables[CHILDREN_TO_BE_INTERACTIVE] = {};\n\t\t\tvariables[INTERSECTED] = true;\n\t\t\tvariables[CONFIG] = normalizedConfig;\n\t\t\tvariables[PROPERTY_DEFS] = combinedPropertyDefs;\n\t\t\tvariables[ANCESTOR_PATH] = [];\n\t\t\tif (!presentational) {\n\t\t\t\tvariables[TARGETED_ACTION_TYPES] = [];\n\t\t\t\tvariables[PREVIOUS_RENDER_STATE] = {};\n\t\t\t\tvariables[PREVIOUS_RENDER_PROPERTIES] = {};\n\t\t\t\tvariables[PREVIOUS_TREE_RENDER_STATE] = {};\n\t\t\t\tvariables[PREVIOUS_TREE_RENDER_PROPERTIES] = {};\n\t\t\t\tvariables[RENDERED_ONCE] = false;\n\t\t\t\tvariables[TREE_RENDERED_ONCE] = false;\n\t\t\t\tvariables[ACTION_HANDLERS] = [];\n\t\t\t\tvariables[RUNTIME_ACTION_HANDLERS] = [];\n\t\t\t}\n\n\t\t\tvariables[VERSION] = PACKAGE_JSON_VERSION; // For CSS externalization. TODO Revisit this logic\n\t\t\t// variables[EXISTING_SHADOW_ROOT_ON_CREATE] === true means the component has been server-side rendered\n\t\t\tvariables[EXISTING_SHADOW_ROOT_ON_CREATE] = this.shadowRoot !== null;\n\t\t\t// reuse the declared shadow root instead of creating a new shadow root if the component has been server-side rendered\n\t\t\tconst shadowRoot = this.shadowRoot || this.attachShadow(shadowRootOptions);\n\t\t\tvariables[ROOT_NODE] = shadowRoot;\n\t\t\tvariables[ATTACHED_ROOT_NODE] = shadowRoot;\n\t\t\ttracer.withSpan(constructedSpan, () => this.upgradeProperties());\n\n\t\t\t// ui-metrics checks this to know if marks for this component are valid.\n\t\t\t// Components that are not bootstrapped don't have enough data to emit\n\t\t\t// a valid mark\n\t\t\tthis.__DO_NOT_USE_BOOTSTRAPPED__ = false;\n\n\t\t\tvariables[STYLE_PROXY] = new Proxy(super.style, {\n\t\t\t\tset: (style, key, value) => {\n\t\t\t\t\tstyle[key] = value; // eslint-disable-line no-param-reassign\n\t\t\t\t\tif (this.__DO_NOT_USE_BOOTSTRAPPED__ && isHoisted(this))\n\t\t\t\t\t\tgetHoistTarget(variables).style[key] = value;\n\n\t\t\t\t\treturn true;\n\t\t\t\t},\n\t\t\t\tget(style, key) {\n\t\t\t\t\tif (typeof style[key] === 'function') return style[key].bind(style);\n\n\t\t\t\t\treturn style[key];\n\t\t\t\t}\n\t\t\t});\n\t\t\tconstructedSpan.endSpan();\n\t\t\tsetStat('constructed', this.tagName.toLowerCase());\n\t\t}\n\n\t\tget [CONFIG]() {\n\t\t\treturn normalizedConfig;\n\t\t}\n\n\t\tget [PROPERTY_DEFS]() {\n\t\t\treturn combinedPropertyDefs;\n\t\t}\n\n\t\tget version() {\n\t\t\treturn PACKAGE_JSON_VERSION;\n\t\t}\n\n\t\tstatic get observedAttributes() {\n\t\t\tconst pKeys = Object.keys(\n\t\t\t\tmergeBehaviorProperties(\n\t\t\t\t\tnormalizeBehaviors(config.behaviors || [], tagName),\n\t\t\t\t\tconfig.properties || {},\n\t\t\t\t\ttagName\n\t\t\t\t)\n\t\t\t);\n\t\t\treturn pKeys.map(toAttributeName);\n\t\t}\n\n\t\tupgradeProperties() {\n\t\t\tconst rawResolvedProps = sandbox(parse, {\n\t\t\t\targs: [\n\t\t\t\t\tthis.getAttribute(RESOLVED_PROPS_ATTRIBUTE),\n\t\t\t\t\t'object',\n\t\t\t\t\tRESOLVED_PROPS_ATTRIBUTE,\n\t\t\t\t\tthis.tagName\n\t\t\t\t],\n\t\t\t\thost: this,\n\t\t\t\tdispatch() {},\n\t\t\t\tlocation: locations.PROPERTY,\n\t\t\t\tdetails: {parse: true, name: RESOLVED_PROPS_ATTRIBUTE},\n\t\t\t\tlog\n\t\t\t});\n\n\t\t\tconst shouldProcess = rawResolvedProps && typeof rawResolvedProps === 'object';\n\t\t\tthis[VARIABLES][HAS_NOW_RESOLVED_PROPS] = shouldProcess;\n\t\t\tconst processedResolvedProps = shouldProcess\n\t\t\t\t? sandbox(processNowResolvedProps, {\n\t\t\t\t\t\targs: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\thost: this,\n\t\t\t\t\t\t\t\trawResolvedProps,\n\t\t\t\t\t\t\t\tpropertyKeys,\n\t\t\t\t\t\t\t\tlog\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t],\n\t\t\t\t\t\thost: this,\n\t\t\t\t\t\tdispatch() {},\n\t\t\t\t\t\tlocation: locations.PROPERTY,\n\t\t\t\t\t\tdetails: {parse: true, name: RESOLVED_PROPS_ATTRIBUTE},\n\t\t\t\t\t\tlog\n\t\t\t\t  })\n\t\t\t\t: {};\n\n\t\t\tconst {length: propertyKeysCount} = propertyKeys;\n\t\t\tfor (let i = 0; i < propertyKeysCount; i++) {\n\t\t\t\tconst name = propertyKeys[i];\n\t\t\t\tif (this.hasOwnProperty(name)) {\n\t\t\t\t\tconst value = this[name];\n\t\t\t\t\tdelete this[name];\n\t\t\t\t\tthis[name] = value;\n\t\t\t\t} else if (processedResolvedProps && name in processedResolvedProps) {\n\t\t\t\t\tthis[name] = processedResolvedProps[name];\n\t\t\t\t} else if (rawResolvedProps && name in rawResolvedProps) {\n\t\t\t\t\tthis[name] = rawResolvedProps[name];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tgetComponentId() {\n\t\t\tconst variables = getHostVariables(this);\n\t\t\treturn variables[COMPONENT_ID];\n\t\t}\n\n\t\tsetComponentId() {\n\t\t\tconst variables = getHostVariables(this);\n\t\t\tvariables[COMPONENT_ID] = this.getAttribute(COMPONENT_ID_ATTRIBUTE) || guid();\n\t\t\tthis.setAttribute(NOW_ID_ATTR, variables[COMPONENT_ID], false);\n\t\t\tthis.setAttribute(COMPONENT_ID_ATTRIBUTE, variables[COMPONENT_ID], false);\n\t\t}\n\n\t\tgetProperty(name) {\n\t\t\tconst variables = getHostVariables(this);\n\t\t\treturn variables[PROPS][name];\n\t\t}\n\n\t\t[SET_PROPERTY](name, value, updateProperties = false, options = {}) {\n\t\t\tconst {interactionId = createInteractionId()} = options;\n\t\t\tconst variables = getHostVariables(this);\n\t\t\ttracer.startActiveSpan(\n\t\t\t\tSPAN_FOR_SET_PROPERTY,\n\t\t\t\t{\n\t\t\t\t\t...getSpanOptions(this),\n\t\t\t\t\tkind: SPAN_KIND_CLIENT\n\t\t\t\t},\n\t\t\t\tsetPropSpan => {\n\t\t\t\t\tsetPropSpan.setAttribute(SPAN_ATTR_ATTR_NAME, name);\n\t\t\t\t\tsetPropSpan.setAttribute(SPAN_ATTR_ATTR_VALUE, parseForSpan(value));\n\t\t\t\t\tif (variables[PROPS][NOW_MODE_PROP] === COMPONENT_MODE_DETACH) {\n\t\t\t\t\t\tif (name !== NOW_MODE_PROP) {\n\t\t\t\t\t\t\tif (!this[DETACHED_COMPONENT_PROPERTY_MAP])\n\t\t\t\t\t\t\t\tthis[DETACHED_COMPONENT_PROPERTY_MAP] = new Map();\n\n\t\t\t\t\t\t\tthis[DETACHED_COMPONENT_PROPERTY_MAP].set(name, {\n\t\t\t\t\t\t\t\tname,\n\t\t\t\t\t\t\t\tvalue,\n\t\t\t\t\t\t\t\tupdateProperties,\n\t\t\t\t\t\t\t\tinteractionId\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tsetPropSpan.setAttribute(SPAN_ATTR_SKIP_FOR_DETACHED, true);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tconst valueOrDefault = parseProperty(\n\t\t\t\t\t\tname,\n\t\t\t\t\t\tvalue === undefined ? combinedPropertyDefs[name].default : value,\n\t\t\t\t\t\tcombinedPropertyDefs[name],\n\t\t\t\t\t\tthis,\n\t\t\t\t\t\tvariables[DISPATCH] || createDispatcher(this)\n\t\t\t\t\t);\n\n\t\t\t\t\tif (quickEquals(valueOrDefault, variables[PROPS][name])) {\n\t\t\t\t\t\tsetPropSpan.setAttribute(SPAN_ATTR_COMPONENT_QUICK_EQUAL, true);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// we might want to consider doing some of this in createUpdateProperties like we\n\t\t\t\t\t// do for createUpdateState, so that we never even get this far if the property\n\t\t\t\t\t// update is declarative\n\t\t\t\t\tif (\n\t\t\t\t\t\t(enableDeepPropertyCompare && !optOutDeepCompare) ||\n\t\t\t\t\t\tcombinedPropertyDefs[name].deepCompare\n\t\t\t\t\t\t\t? isEqual(variables[PROPS][name], valueOrDefault)\n\t\t\t\t\t\t\t: variables[PROPS][name] === valueOrDefault\n\t\t\t\t\t) {\n\t\t\t\t\t\tsetPropSpan.setAttribute(SPAN_ATTR_COMPONENT_QUICK_EQUAL, true);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (this.__DO_NOT_USE_BOOTSTRAPPED__ !== true) {\n\t\t\t\t\t\tvariables[PROPS][name] = valueOrDefault;\n\t\t\t\t\t\tsetPropSpan.setAttribute(\n\t\t\t\t\t\t\tSPAN_ATTR_DO_NOT_USE_BOOTSTRAPPED,\n\t\t\t\t\t\t\tBoolean(this.__DO_NOT_USE_BOOTSTRAPPED__)\n\t\t\t\t\t\t);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!shouldSetProperty(tagName, name, combinedPropertyDefs, updateProperties)) {\n\t\t\t\t\t\tlog(`Cannot set read only or computed property ${name}.`, {\n\t\t\t\t\t\t\thost: this,\n\t\t\t\t\t\t\torigin: String(SET_PROPERTY)\n\t\t\t\t\t\t});\n\t\t\t\t\t\tsetPropSpan.setAttribute(SPAN_ATTR_SKIPPED_FOR_READ_ONLY_OR_COMPUTED_PROPERTY, true);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (variables[PROPS][NOW_ENABLE_PROPERTY_SETTING_PREVENTION_PROP]) {\n\t\t\t\t\t\tconst event = variables[DISPATCH](\n\t\t\t\t\t\t\tCOMPONENT_PROPERTY_UPDATE_REQUESTED,\n\t\t\t\t\t\t\t{name, value: variables[PROPS][name], nextValue: valueOrDefault, host: this},\n\t\t\t\t\t\t\tsetInteractionId(\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t[SCHEDULE_IMMEDIATELY_DO_NOT_USE_OR_YOU_WILL_BE_IMMEDIATELY_FIRED]: true,\n\t\t\t\t\t\t\t\t\t[COMPONENT_INTERNAL_ACTION]: true,\n\t\t\t\t\t\t\t\t\tinternal: true,\n\t\t\t\t\t\t\t\t\tinternalPropertyUpdateRequested: updateProperties\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tinteractionId\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tif (event.defaultPrevented) {\n\t\t\t\t\t\t\tsetPropSpan.setAttribute(SPAN_ATTR_SKIPPED_FOR_DEFAULT_PREVENTED, true);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tconst previousValue = variables[PROPS][name];\n\t\t\t\t\tconst previousResolvedValue = isSelector(previousValue)\n\t\t\t\t\t\t? this[GET_RESOLVED_PROPERTY](name)\n\t\t\t\t\t\t: previousValue;\n\t\t\t\t\tvariables[PROPS][name] = valueOrDefault;\n\n\t\t\t\t\t// If nowPlaceholderHeight or Width changes, we want to replace the previous intersect styles so long as:\n\t\t\t\t\t// We are currently observing for an intersection (because otherwise we don't want to apply these styles)\n\t\t\t\t\t// We have not intersected yet (these styles should only be applied when the component has not intersected yet)\n\t\t\t\t\tif (\n\t\t\t\t\t\tvariables[USING_INTERSECTION_OBSERVER] &&\n\t\t\t\t\t\t[NOW_PLACEHOLDER_HEIGHT_PROP, NOW_PLACEHOLDER_WIDTH_PROP].includes(name) &&\n\t\t\t\t\t\t!variables[INTERSECTED] &&\n\t\t\t\t\t\tpreviousValue !== valueOrDefault\n\t\t\t\t\t) {\n\t\t\t\t\t\tconst removeIntersectedStyles = applyIntersectStyles(this, config, {\n\t\t\t\t\t\t\theight: variables[PROPS][NOW_PLACEHOLDER_HEIGHT_PROP],\n\t\t\t\t\t\t\twidth: variables[PROPS][NOW_PLACEHOLDER_WIDTH_PROP]\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tif (variables[REMOVE_INTERSECTED_STYLES]) variables[REMOVE_INTERSECTED_STYLES]();\n\n\t\t\t\t\t\tvariables[REMOVE_INTERSECTED_STYLES] = removeIntersectedStyles;\n\t\t\t\t\t}\n\n\t\t\t\t\tlet propertyDetails = {\n\t\t\t\t\t\tpreviousValue,\n\t\t\t\t\t\tvalue: valueOrDefault\n\t\t\t\t\t};\n\n\t\t\t\t\tif (name === NOW_NESTED_SELECTABLE_PROPS && Array.isArray(valueOrDefault)) {\n\t\t\t\t\t\tpreviousValue.forEach(nestedSelectablePropName => {\n\t\t\t\t\t\t\tif (!valueOrDefault.includes(nestedSelectablePropName)) {\n\t\t\t\t\t\t\t\tconst [propName, path] = getPartsForNestedSelectableProps(nestedSelectablePropName);\n\t\t\t\t\t\t\t\tdelete variables[PROPERTIES_WITH_SELECTOR][nestedSelectablePropName];\n\t\t\t\t\t\t\t\tvariables[PROPERTIES_WITH_NESTED_SELECTOR][propName]?.delete(path);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tvalueOrDefault.forEach(nestedSelectablePropName => {\n\t\t\t\t\t\t\tconst [propName, path] = getPartsForNestedSelectableProps(nestedSelectablePropName);\n\n\t\t\t\t\t\t\tconst propValue = get(variables[PROPS][propName], path);\n\n\t\t\t\t\t\t\tvariables[PROPERTIES_WITH_NESTED_SELECTOR][propName] = (\n\t\t\t\t\t\t\t\tvariables[PROPERTIES_WITH_NESTED_SELECTOR][propName] || new Set()\n\t\t\t\t\t\t\t).add(path);\n\t\t\t\t\t\t\tapplyUpdatesForSelectableProps({\n\t\t\t\t\t\t\t\tname: nestedSelectablePropName,\n\t\t\t\t\t\t\t\tvalue: propValue,\n\t\t\t\t\t\t\t\tpropertiesWithSelector: variables[PROPERTIES_WITH_SELECTOR],\n\t\t\t\t\t\t\t\tcomponentId: variables[COMPONENT_ID],\n\t\t\t\t\t\t\t\tpropertyDetails,\n\t\t\t\t\t\t\t\tcomponentRegistry,\n\t\t\t\t\t\t\t\tnormalizedConfigForProp: normalizedConfig.properties[name]\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t});\n\t\t\t\t\t} else if (variables[PROPERTIES_WITH_NESTED_SELECTOR][name]?.size > 0) {\n\t\t\t\t\t\tvariables[PROPERTIES_WITH_NESTED_SELECTOR][name].forEach(path => {\n\t\t\t\t\t\t\tconst nestedSelectablePropName = `${name}.${path}`;\n\t\t\t\t\t\t\tconst propValue = get(valueOrDefault, path);\n\t\t\t\t\t\t\tapplyUpdatesForSelectableProps({\n\t\t\t\t\t\t\t\tname: nestedSelectablePropName,\n\t\t\t\t\t\t\t\tvalue: propValue,\n\t\t\t\t\t\t\t\tpropertiesWithSelector: variables[PROPERTIES_WITH_SELECTOR],\n\t\t\t\t\t\t\t\tcomponentId: variables[COMPONENT_ID],\n\t\t\t\t\t\t\t\tpropertyDetails,\n\t\t\t\t\t\t\t\tcomponentRegistry,\n\t\t\t\t\t\t\t\tnormalizedConfigForProp: normalizedConfig.properties[name]\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\tapplyUpdatesForSelectableProps({\n\t\t\t\t\t\t\tname,\n\t\t\t\t\t\t\tvalue: valueOrDefault,\n\t\t\t\t\t\t\tpropertiesWithSelector: variables[PROPERTIES_WITH_SELECTOR],\n\t\t\t\t\t\t\tcomponentId: variables[COMPONENT_ID],\n\t\t\t\t\t\t\tpropertyDetails,\n\t\t\t\t\t\t\tcomponentRegistry,\n\t\t\t\t\t\t\tnormalizedConfigForProp: normalizedConfig.properties[name]\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\n\t\t\t\t\tpropertyDetails = {\n\t\t\t\t\t\tpreviousValue: previousResolvedValue,\n\t\t\t\t\t\tvalue: isSelector(valueOrDefault) ? this[GET_RESOLVED_PROPERTY](name) : valueOrDefault\n\t\t\t\t\t};\n\n\t\t\t\t\tthis[UPDATE_AFFECTED_COMPONENTS]({\n\t\t\t\t\t\tname,\n\t\t\t\t\t\tpropertyDetails,\n\t\t\t\t\t\tinteractionId,\n\t\t\t\t\t\tincludeSource: true\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\n\t\t[UPDATE_AFFECTED_COMPONENTS]({name, propertyDetails, interactionId, includeSource}) {\n\t\t\tconst variables = getHostVariables(this);\n\n\t\t\tconst allAffectedComponents = getAffected(\n\t\t\t\tname,\n\t\t\t\tvariables[COMPONENT_ID],\n\t\t\t\tcomponentRegistry,\n\t\t\t\tincludeSource\n\t\t\t);\n\t\t\ttriggerComponentUpdates(\n\t\t\t\tcomponentRegistry,\n\t\t\t\tallAffectedComponents,\n\t\t\t\tpropertyDetails,\n\t\t\t\tinteractionId,\n\t\t\t\t'PROPERTY_SET'\n\t\t\t);\n\t\t}\n\n\t\t[HOIST_CHANGED](value) {\n\t\t\tconst variables = getHostVariables(this);\n\n\t\t\tif ((value && variables[UNHOIST]) || (!value && !variables[UNHOIST])) return;\n\n\t\t\tif (!presentational) {\n\t\t\t\tvariables[ACTION_HANDLERS] = removeActionHandlers(variables[ACTION_HANDLERS]);\n\t\t\t\tvariables[TARGETED_ACTION_TYPES] = [];\n\t\t\t}\n\n\t\t\tif (value) {\n\t\t\t\t// render null to host's shadowRoot to ensure cleanup\n\t\t\t\tclearRootNode(this, variables[ATTACHED_ROOT_NODE], onStateChange);\n\t\t\t\tvariables[UNHOIST] = hoist(this, deprioritizeStyles, onStateChange);\n\t\t\t} else {\n\t\t\t\ttypeof variables[UNHOIST] === 'function' && variables[UNHOIST]();\n\t\t\t\tdelete variables[UNHOIST];\n\t\t\t}\n\n\t\t\tif (!presentational)\n\t\t\t\tvariables[ACTION_HANDLERS] = addActionHandlers(this, normalizedConfig.interceptors);\n\t\t}\n\n\t\t[HOIST_PARENT_CHANGED](propName) {\n\t\t\tconst variables = getHostVariables(this);\n\n\t\t\tconst resolvedState = getResolvedState(variables, componentRegistry, this);\n\t\t\t// reflect hoist targeting properties immediately, these attributes are used when hoisting\n\t\t\t[HOIST_ATTR, NOW_HOIST_PROP, propName].forEach(p => {\n\t\t\t\treflectProperty(p, combinedPropertyDefs[p], resolvedState, this, {});\n\t\t\t});\n\t\t\tif (!presentational) {\n\t\t\t\tvariables[ACTION_HANDLERS] = removeActionHandlers(variables[ACTION_HANDLERS]);\n\t\t\t\tvariables[TARGETED_ACTION_TYPES] = [];\n\t\t\t}\n\n\t\t\ttypeof variables[UNHOIST] === 'function' && variables[UNHOIST]();\n\t\t\tvariables[UNHOIST] = hoist(this, deprioritizeStyles, onStateChange);\n\n\t\t\tif (!presentational)\n\t\t\t\tvariables[ACTION_HANDLERS] = addActionHandlers(this, normalizedConfig.interceptors);\n\t\t}\n\n\t\t[GET_RESOLVED_PROPERTY](propName) {\n\t\t\tconst variables = getHostVariables(this);\n\n\t\t\treturn resolveSelectedProperty(\n\t\t\t\tcomponentRegistry,\n\t\t\t\tselectablePropertyResolver,\n\t\t\t\tvariables[PROPS][propName],\n\t\t\t\tnormalizedConfig.properties[propName]\n\t\t\t);\n\t\t}\n\n\t\tsetAttribute(name, value, isReflecting = false) {\n\t\t\tif (!shouldSetAttribute(tagName, isReflecting, name, combinedPropertyDefs)) {\n\t\t\t\treturn log(`Cannot set read only or computed property ${name}`, {\n\t\t\t\t\thost: this,\n\t\t\t\t\torigin: 'setAttribute'\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (shouldHoistAttribute(this, name)) hoistAttribute(this, name, value);\n\n\t\t\treturn HTMLElement.prototype.setAttribute.call(this, name, value);\n\t\t}\n\n\t\tremoveAttribute(name) {\n\t\t\tif (shouldHoistAttribute(this, name)) unhoistAttribute(this, name);\n\n\t\t\tHTMLElement.prototype.removeAttribute.call(this, name);\n\t\t}\n\n\t\tgenerateDeferGetterAndSetter() {\n\t\t\tconst variables = getHostVariables(this);\n\n\t\t\tvariables[DEFERRED] = true;\n\t\t\tObject.defineProperty(this, DEFER_ATTRIBUTE, {\n\t\t\t\tget: () => variables[DEFERRED],\n\t\t\t\tset: value => {\n\t\t\t\t\tif (variables[DEFERRED] === value) return;\n\n\t\t\t\t\tvariables[DEFERRED] = value;\n\t\t\t\t\tif (!variables[CONNECTED]) {\n\t\t\t\t\t\tsetStat('undefer', this.tagName.toLowerCase());\n\t\t\t\t\t\tthis.connectedCallback();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlog(\n\t\t\t\t\t\t\t`${this.tagName.toLowerCase()}[component-id=\"${\n\t\t\t\t\t\t\t\tvariables[COMPONENT_ID]\n\t\t\t\t\t\t\t}\"] cannot be deferred. It is already connected.`,\n\t\t\t\t\t\t\t{host: this, origin: 'generateDeferGetterAndSetter'}\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tconfigurable: true\n\t\t\t});\n\t\t}\n\n\t\tshouldLegacyDefer() {\n\t\t\treturn this.hasAttribute(DEFER_ATTRIBUTE) && !this.__DO_NOT_USE_BOOTSTRAPPED__;\n\t\t}\n\n\t\tsetInitialProperties() {\n\t\t\tconst variables = getHostVariables(this);\n\n\t\t\tconst defaults = {};\n\t\t\tconst {length: propertyKeysCount} = propertyKeys;\n\t\t\tfor (let i = 0; i < propertyKeysCount; i++) {\n\t\t\t\tconst name = propertyKeys[i];\n\t\t\t\tdefaults[name] = getInitialPropertyValue(this, name, combinedPropertyDefs);\n\t\t\t}\n\n\t\t\tconst propertyDefs = combinedPropertyDefs;\n\t\t\tvariables[PROPS] = parseProperties(\n\t\t\t\tresolveProperties(\n\t\t\t\t\tinitialState,\n\t\t\t\t\tfilterPropertyDefinitions(propertyDefs, def => !def.computed),\n\t\t\t\t\tdefaults\n\t\t\t\t),\n\t\t\t\tpropertyDefs,\n\t\t\t\t{host: this, dispatch: variables[DISPATCH]}\n\t\t\t);\n\n\t\t\tconst properties = variables[PROPS];\n\t\t\tfor (const k in properties) {\n\t\t\t\tif (k === NOW_NESTED_SELECTABLE_PROPS && Array.isArray(properties[k])) {\n\t\t\t\t\tproperties[k].forEach(name => {\n\t\t\t\t\t\tconst [propName, path] = getPartsForNestedSelectableProps(name);\n\t\t\t\t\t\tconst propValue = get(properties[propName], path);\n\n\t\t\t\t\t\tvariables[PROPERTIES_WITH_NESTED_SELECTOR][propName] = (\n\t\t\t\t\t\t\tvariables[PROPERTIES_WITH_NESTED_SELECTOR][propName] || new Set()\n\t\t\t\t\t\t).add(path);\n\t\t\t\t\t\tupdatePropertiesWithSelector(name, propValue, variables[PROPERTIES_WITH_SELECTOR]);\n\t\t\t\t\t\tupdateSelectedPropertyMappings(\n\t\t\t\t\t\t\tpropValue,\n\t\t\t\t\t\t\tname,\n\t\t\t\t\t\t\tvariables[COMPONENT_ID],\n\t\t\t\t\t\t\tthis.__DO_NOT_USE_BOOTSTRAPPED__\n\t\t\t\t\t\t);\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tupdatePropertiesWithSelector(k, properties[k], variables[PROPERTIES_WITH_SELECTOR]);\n\t\t\t\t\tupdateSelectedPropertyMappings(\n\t\t\t\t\t\tproperties[k],\n\t\t\t\t\t\tk,\n\t\t\t\t\t\tvariables[COMPONENT_ID],\n\t\t\t\t\t\tthis.__DO_NOT_USE_BOOTSTRAPPED__\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tif (combinedPropertyDefs[k] && combinedPropertyDefs[k].selectable) {\n\t\t\t\t\taddResolvedSelectedPropertyMappingWithResolvedValue(\n\t\t\t\t\t\tproperties[k],\n\t\t\t\t\t\tk,\n\t\t\t\t\t\tvariables[COMPONENT_ID]\n\t\t\t\t\t);\n\t\t\t\t\ttriggerComponentUpdates(\n\t\t\t\t\t\tcomponentRegistry,\n\t\t\t\t\t\tgetComponentAffected(k, variables[COMPONENT_ID]),\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvalue: variables[PROPS][k]\n\t\t\t\t\t\t},\n\t\t\t\t\t\tundefined,\n\t\t\t\t\t\t'INITIAL_PROPERTY_SET'\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tgetResolvedProperties(interactionId) {\n\t\t\tconst variables = getHostVariables(this);\n\t\t\tconst state = getResolvedState(variables, componentRegistry, this);\n\t\t\tconst resolvedProperties = resolveComputedProperties(state, this, variables, interactionId);\n\t\t\treturn unescapeReservedCharacters(resolvedProperties).properties;\n\t\t}\n\n\t\tgetProperties() {\n\t\t\tconst variables = getHostVariables(this);\n\n\t\t\treturn {...variables[PROPS]};\n\t\t}\n\n\t\tattributeChangedCallback(name, oldValue, newValue) {\n\t\t\tconst variables = getHostVariables(this);\n\t\t\tif (name === DEFER_ATTRIBUTE) return (this[DEFER_ATTRIBUTE] = newValue);\n\n\t\t\tif (!variables[CONNECTED]) return;\n\n\t\t\tconst propName = toPropertyName(name);\n\t\t\tconst propValue = this[propName];\n\t\t\tif (isReflecting(name)) return clearReflection(name);\n\n\t\t\t// vdom renderers set prop, then attribute values on nodes; this check prevents a double render\n\t\t\t// while allowing for direct attribute setting and removal, e.g., el.setAttribute, el.removeAttribute\n\t\t\t// 1. if newValue is null and propValue is falsey then the property was set already and removeAttribute was called\n\t\t\t// 2. if propValue is truthy and newValue is a string and values are equal then the property was set\n\t\t\t//    already and setAttribute was called\n\t\t\t// 3. if propValue is truthy and newValue is empty string setAttribute was called after setting property to true\n\t\t\t// 4. if propValue is falsey and newValue is null removeAttribute was called after setting property to false\n\t\t\tif (newValue === null && !propValue) return;\n\n\t\t\tif (propValue && typeof newValue === 'string' && propValue === newValue) return;\n\n\t\t\tif (typeof propValue === 'boolean') {\n\t\t\t\tif (\n\t\t\t\t\tpropValue &&\n\t\t\t\t\tnewValue === '' &&\n\t\t\t\t\t!combinedPropertyDefs[propName].unstablePreserveEmptyStr\n\t\t\t\t)\n\t\t\t\t\treturn;\n\n\t\t\t\tif (!propValue && newValue === null) return;\n\t\t\t}\n\n\t\t\t// if newValue is null then removeAttribute was called, We should set the property to undefined, which will\n\t\t\t// be set to default in the setter if necessary\n\t\t\tif (variables[CONNECTED] && oldValue !== newValue)\n\t\t\t\tthis[propName] = newValue === null ? undefined : newValue;\n\t\t}\n\n\t\tconnectedCallback() {\n\t\t\tconst variables = getHostVariables(this);\n\n\t\t\t// if a node is quickly connected and disconnected then by the time\n\t\t\t// connectedCallback is called it can actually be disconnected\n\t\t\tif (!this.isConnected) return;\n\t\t\tif (this.shouldLegacyDefer()) {\n\t\t\t\tvariables[CONNECTED_DEFERRED_TIMESTAMP] = performance.now();\n\t\t\t\tsetStat('defer', this.tagName.toLowerCase());\n\t\t\t\treturn this.generateDeferGetterAndSetter();\n\t\t\t}\n\n\t\t\tvariables[REMOVE_UPDATE_CUSTOM_ELEMENT_OBSERVER] = addUpdateCustomElementObserver(\n\t\t\t\ttagName,\n\t\t\t\tupdate => {\n\t\t\t\t\tvariables[CONFIG] = normalizedConfig;\n\t\t\t\t\tif (update.styles) {\n\t\t\t\t\t\tremoveStyles(this);\n\t\t\t\t\t\tapplyStyles(this, config);\n\t\t\t\t\t}\n\t\t\t\t\tif (update.actionHandlers && !presentational) {\n\t\t\t\t\t\tvariables[ACTION_HANDLERS] = removeActionHandlers(variables[ACTION_HANDLERS]);\n\t\t\t\t\t\tvariables[ACTION_HANDLERS] = addActionHandlers(this, normalizedConfig.interceptors);\n\t\t\t\t\t}\n\t\t\t\t\tif (update.view) {\n\t\t\t\t\t\tthis[RENDER]();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\n\t\t\t// We haven't called `setInitialProperties()` yet until later in the\n\t\t\t// connect, so `this[NOW_PRIORITY_PROP]` may not have the default value\n\t\t\t// from the property config.\n\t\t\tconst priorityLevel =\n\t\t\t\tthis[NOW_PRIORITY_PROP] === undefined\n\t\t\t\t\t? combinedPropertyDefs[NOW_PRIORITY_PROP]\n\t\t\t\t\t\t? combinedPropertyDefs[NOW_PRIORITY_PROP].default\n\t\t\t\t\t\t: undefined\n\t\t\t\t\t: this[NOW_PRIORITY_PROP];\n\t\t\tif (priorityLevel === PRIORITY_LEVEL_LOW && !variables[LOW_PRIORITY_PENDING]) {\n\t\t\t\tthis.setAttribute(NOW_PRIORITY_ATTR, priorityLevel);\n\t\t\t\tvariables[LOW_PRIORITY_PENDING] = true;\n\t\t\t\tschedule({\n\t\t\t\t\tfn: () => {\n\t\t\t\t\t\tif (!variables[CONNECTED]) this.connectedCallback();\n\t\t\t\t\t\tthis.removeAttribute(NOW_PRIORITY_ATTR);\n\t\t\t\t\t\tdelete variables[LOW_PRIORITY_PENDING];\n\t\t\t\t\t},\n\t\t\t\t\ttype: DEFER_IDLE,\n\t\t\t\t\tmeta: {el: this, interactionId: createInteractionId()}\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvariables[CONNECTED] = true;\n\t\t\tvariables[CONNECTED_TIMESTAMP] = performance.now();\n\t\t\ttracer.startActiveSpan(\n\t\t\t\tSPAN_FOR_COMPONENT_CONNECTED,\n\t\t\t\t{\n\t\t\t\t\t...getSpanOptions(this),\n\t\t\t\t\tkind: SPAN_KIND_CLIENT\n\t\t\t\t},\n\t\t\t\tconnectSpan => {\n\t\t\t\t\tthis.setComponentId();\n\t\t\t\t\tconnectSpan.setAttribute(SPAN_ATTR_COMPONENT_ID, this.getComponentId());\n\n\t\t\t\t\tthis.dispatch = createDispatcher(this);\n\t\t\t\t\tvariables[HELPERS_SCHEDULED] = createHelpers(\n\t\t\t\t\t\tthis,\n\t\t\t\t\t\tcombinedPropertyDefs,\n\t\t\t\t\t\tHELPERS_SCHEDULED_CONST,\n\t\t\t\t\t\t{presentational}\n\t\t\t\t\t);\n\n\t\t\t\t\tvariables[HELPERS_IMMEDIATE] = createHelpers(\n\t\t\t\t\t\tthis,\n\t\t\t\t\t\tcombinedPropertyDefs,\n\t\t\t\t\t\tHELPERS_IMMEDIATE_CONST,\n\t\t\t\t\t\t{presentational}\n\t\t\t\t\t);\n\t\t\t\t\tvariables[HELPERS_DEFER] = createHelpers(\n\t\t\t\t\t\tthis,\n\t\t\t\t\t\tcombinedPropertyDefs,\n\t\t\t\t\t\tHELPERS_DEFER_CONST,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpresentational\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t\tthis.helpers = variables[HELPERS_SCHEDULED]; // @servicenow/ui-internal relies on this\n\t\t\t\t\tvariables[DISPATCH] = this.dispatch;\n\t\t\t\t\tvariables[CONDITIONAL_DISPATCH] = createConditionalDispatch(this);\n\t\t\t\t\tvariables[UNHOIST] = hoist(this, deprioritizeStyles, onStateChange);\n\t\t\t\t\tconst rootNode = getRootNode(this);\n\t\t\t\t\tvariables[ANCESTOR_ROOT_NODE] = rootNode && rootNode.nowId ? rootNode : null;\n\t\t\t\t\tif (variables[ANCESTOR_ROOT_NODE]) {\n\t\t\t\t\t\tvariables[ANCESTOR_ROOT_NODE][VARIABLES][CHILDREN_TO_BE_INTERACTIVE][\n\t\t\t\t\t\t\tvariables[COMPONENT_ID]\n\t\t\t\t\t\t] = true;\n\t\t\t\t\t\tvariables[ANCESTOR_PATH] = [\n\t\t\t\t\t\t\tvariables[ANCESTOR_ROOT_NODE],\n\t\t\t\t\t\t\t...(variables[ANCESTOR_ROOT_NODE]?.[VARIABLES]?.[ANCESTOR_PATH] || [])\n\t\t\t\t\t\t];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvariables[ANCESTOR_PATH] = [];\n\t\t\t\t\t}\n\t\t\t\t\tthis.__DO_NOT_USE_OR_YOU_WILL_BE_FIRED_BY_YOUR_PARENT__ =\n\t\t\t\t\t\t(variables[ANCESTOR_ROOT_NODE] && variables[ANCESTOR_ROOT_NODE].nowId) || null;\n\t\t\t\t\tvariables[CHILDREN_TO_BE_RENDERED] = {};\n\t\t\t\t\tvariables[NEEDS_TO_KNOW_ABOUT_TREE_RENDERS] =\n\t\t\t\t\t\tnormalizedConfig.shouldDispatch[COMPONENT_DOM_TREE_READY] ||\n\t\t\t\t\t\tnormalizedConfig.shouldDispatch[COMPONENT_TREE_RENDERED] ||\n\t\t\t\t\t\t(variables[ANCESTOR_ROOT_NODE] &&\n\t\t\t\t\t\t\tvariables[ANCESTOR_ROOT_NODE][VARIABLES][NEEDS_TO_KNOW_ABOUT_TREE_RENDERS]);\n\n\t\t\t\t\tif (!presentational)\n\t\t\t\t\t\tvariables[ACTION_HANDLERS] = addActionHandlers(this, normalizedConfig.interceptors);\n\n\t\t\t\t\tif (componentRegistry[this.getComponentId()] !== undefined)\n\t\t\t\t\t\tlog(\n\t\t\t\t\t\t\t`The componentId- ${this.getComponentId()} already exists. Component identifiers must be unique.`\n\t\t\t\t\t\t);\n\n\t\t\t\t\tcomponentRegistry[this.getComponentId()] = this;\n\n\t\t\t\t\t// This must be called here syncronously instead of in the callback of onConnect\n\t\t\t\t\t// just below. If any code gets added that could prevent this[RENDER] being called\n\t\t\t\t\t// between here and inside the onConnect callback just below, it will break the\n\t\t\t\t\t// TREE_RENDERED and TREE_READY lifecycles\n\t\t\t\t\tthis[NOTIFY_PARENT_THAT_CHILD_IS_RENDERING]();\n\n\t\t\t\t\tif (variables[HAS_NOW_RESOLVED_PROPS]) {\n\t\t\t\t\t\tsandbox(connectNowResolvedPropsCallbacks, {\n\t\t\t\t\t\t\targs: [\n\t\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\t\tpropertyUpdates => {\n\t\t\t\t\t\t\t\t\tconst span = tracer.startSpan(SPAN_FOR_NOW_RESOLVE_PROPS_SET, {\n\t\t\t\t\t\t\t\t\t\t...getSpanOptions(this),\n\t\t\t\t\t\t\t\t\t\tkind: SPAN_KIND_CLIENT\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\tconst options = {\n\t\t\t\t\t\t\t\t\t\tinteractionId: createInteractionId(),\n\t\t\t\t\t\t\t\t\t\tspan\n\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t\tthis.helpers.updateProperties(propertyUpdates, options);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\thost: this,\n\t\t\t\t\t\t\tdetails: {\n\t\t\t\t\t\t\t\ttype: 'connectNowResolvedPropsCallbacks'\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tlocation: locations.RENDERER,\n\t\t\t\t\t\t\tdispatch: variables[DISPATCH],\n\t\t\t\t\t\t\tlog\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\n\t\t\t\t\tsandbox(onConnect, {\n\t\t\t\t\t\targs: [\n\t\t\t\t\t\t\tvariables[ROOT_NODE],\n\t\t\t\t\t\t\tthis.dispatch,\n\t\t\t\t\t\t\t() => {\n\t\t\t\t\t\t\t\ttracer.withSpan(connectSpan, () => {\n\t\t\t\t\t\t\t\t\tthis.setInitialProperties();\n\t\t\t\t\t\t\t\t\tif (!presentational && !variables[STATE]) {\n\t\t\t\t\t\t\t\t\t\t// Set variables[STATE] to just initialState and not include setInitialState\n\t\t\t\t\t\t\t\t\t\t// for backwards compatibility: so that initialState is still available\n\t\t\t\t\t\t\t\t\t\t// within a computed property's computed() method\n\t\t\t\t\t\t\t\t\t\tvariables[STATE] = {...normalizedConfig.initialState};\n\n\t\t\t\t\t\t\t\t\t\tconst initialState = {\n\t\t\t\t\t\t\t\t\t\t\t...variables[STATE],\n\t\t\t\t\t\t\t\t\t\t\t...normalizedConfig.setInitialState({\n\t\t\t\t\t\t\t\t\t\t\t\thost: this,\n\t\t\t\t\t\t\t\t\t\t\t\tproperties: unescapeReservedCharacters(\n\t\t\t\t\t\t\t\t\t\t\t\t\tcomputeProperties(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcamelCaseProperties(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgetResolvedState(variables, componentRegistry, this)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tthis\n\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t).properties,\n\t\t\t\t\t\t\t\t\t\t\t\tcontext: createContextProxy(this)\n\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t};\n\n\t\t\t\t\t\t\t\t\t\temitNowUiEvent(STATE_UPDATED, {\n\t\t\t\t\t\t\t\t\t\t\tcomponentId: variables[COMPONENT_ID],\n\t\t\t\t\t\t\t\t\t\t\tpreviousState: undefined,\n\t\t\t\t\t\t\t\t\t\t\tnextState: initialState\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\tvariables[STATE] = initialState;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tthis[RENDER](null, metrics.CONNECTION);\n\n\t\t\t\t\t\t\t\t\t// this is to handle the case in which a renderer has not already set the properties on the host because it is async.\n\t\t\t\t\t\t\t\t\t// i do not want to unconditionally move hoisting initialization here without a design and supporting tests.\n\t\t\t\t\t\t\t\t\t// this change is backwards compatible with existing hoist use cases and renderers.\n\t\t\t\t\t\t\t\t\tif (typeof variables[UNHOIST] !== 'function' && isHoisted(this)) {\n\t\t\t\t\t\t\t\t\t\tif (presentational) {\n\t\t\t\t\t\t\t\t\t\t\tvariables[UNHOIST] = hoist(this, deprioritizeStyles, onStateChange);\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tremoveActionHandlers(variables[ACTION_HANDLERS]);\n\t\t\t\t\t\t\t\t\t\t\tvariables[TARGETED_ACTION_TYPES] = [];\n\t\t\t\t\t\t\t\t\t\t\tvariables[UNHOIST] = hoist(this, deprioritizeStyles, onStateChange);\n\t\t\t\t\t\t\t\t\t\t\tvariables[ACTION_HANDLERS] = addActionHandlers(\n\t\t\t\t\t\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\t\t\t\t\t\tnormalizedConfig.interceptors\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tapplyStyles(this, config);\n\n\t\t\t\t\t\t\t\t\tvariables[USING_INTERSECTION_OBSERVER] =\n\t\t\t\t\t\t\t\t\t\tvariables[PROPS][NOW_PLACEHOLDER_HEIGHT_PROP] ||\n\t\t\t\t\t\t\t\t\t\tvariables[PROPS][NOW_PLACEHOLDER_WIDTH_PROP];\n\t\t\t\t\t\t\t\t\tif (variables[USING_INTERSECTION_OBSERVER]) {\n\t\t\t\t\t\t\t\t\t\tvariables[INTERSECTED] = false;\n\t\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\t\tvariables[PROPS][NOW_PLACEHOLDER_HEIGHT_PROP] ||\n\t\t\t\t\t\t\t\t\t\t\tvariables[PROPS][NOW_PLACEHOLDER_WIDTH_PROP]\n\t\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\t\tif (variables[REMOVE_INTERSECTED_STYLES])\n\t\t\t\t\t\t\t\t\t\t\t\tvariables[REMOVE_INTERSECTED_STYLES]();\n\t\t\t\t\t\t\t\t\t\t\tvariables[REMOVE_INTERSECTED_STYLES] = applyIntersectStyles(this, config, {\n\t\t\t\t\t\t\t\t\t\t\t\theight: variables[PROPS][NOW_PLACEHOLDER_HEIGHT_PROP],\n\t\t\t\t\t\t\t\t\t\t\t\twidth: variables[PROPS][NOW_PLACEHOLDER_WIDTH_PROP]\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\tintersectionObserver.observe(this);\n\t\t\t\t\t\t\t\t\t\t\tconnectSpan.setAttribute(SPAN_ATTR_OBSERVING_INTERSECTION, true);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tif (!this.__DO_NOT_USE_BOOTSTRAPPED__) {\n\t\t\t\t\t\t\t\t\t\tthis.__DO_NOT_USE_BOOTSTRAPPED__ = true;\n\n\t\t\t\t\t\t\t\t\t\tvariables[CONDITIONAL_DISPATCH](\n\t\t\t\t\t\t\t\t\t\t\tCOMPONENT_BOOTSTRAPPED,\n\t\t\t\t\t\t\t\t\t\t\t{host: this},\n\t\t\t\t\t\t\t\t\t\t\t{internal: true}\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tvariables[CONDITIONAL_DISPATCH](\n\t\t\t\t\t\t\t\t\t\tCOMPONENT_CONNECTED,\n\t\t\t\t\t\t\t\t\t\t{host: this},\n\t\t\t\t\t\t\t\t\t\t{internal: true}\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t],\n\t\t\t\t\t\thost: this,\n\t\t\t\t\t\tdetails: {\n\t\t\t\t\t\t\ttype: 'onConnect'\n\t\t\t\t\t\t},\n\t\t\t\t\t\tlocation: locations.RENDERER,\n\t\t\t\t\t\tdispatch: variables[DISPATCH],\n\t\t\t\t\t\tlog\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\n\t\tdisconnectedCallback() {\n\t\t\tconst variables = getHostVariables(this);\n\n\t\t\tif (!variables[CONNECTED]) return;\n\t\t\tconst disconnectedSpan = tracer.startSpan(SPAN_FOR_COMPONENT_DISCONNECTED, {\n\t\t\t\t...getSpanOptions(this),\n\t\t\t\tkind: SPAN_KIND_CLIENT\n\t\t\t});\n\t\t\tvariables[CONNECTED] = false;\n\t\t\t// render null to ensure that view specific clean up hooks are called\n\t\t\tclearRootNode(this, variables[ROOT_NODE], onStateChange);\n\n\t\t\tremoveStyles(this);\n\t\t\tif (variables[USING_INTERSECTION_OBSERVER] && !variables[INTERSECTED])\n\t\t\t\tintersectionObserver.unobserve(this);\n\n\t\t\tif (\n\t\t\t\t(!normalizedConfig.shouldDispatch[COMPONENT_BOOTSTRAPPED] &&\n\t\t\t\t\t!normalizedConfig.shouldDispatch[COMPONENT_CONNECTED]) ||\n\t\t\t\t(normalizedConfig.shouldDispatch[COMPONENT_BOOTSTRAPPED] &&\n\t\t\t\t\tvariables[BOOTSTRAPPED_HANDLED]) ||\n\t\t\t\t(normalizedConfig.shouldDispatch[COMPONENT_CONNECTED] && variables[CONNECTED_HANDLED])\n\t\t\t) {\n\t\t\t\tvariables[CONDITIONAL_DISPATCH](\n\t\t\t\t\tCOMPONENT_DISCONNECTED,\n\t\t\t\t\t{host: this},\n\t\t\t\t\t{\n\t\t\t\t\t\tinternal: true,\n\t\t\t\t\t\t[SCHEDULE_IMMEDIATELY_DO_NOT_USE_OR_YOU_WILL_BE_IMMEDIATELY_FIRED]: true\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tsandbox(onDisconnect, {\n\t\t\t\targs: [\n\t\t\t\t\tvariables[ROOT_NODE],\n\t\t\t\t\tthis.dispatch,\n\t\t\t\t\t() => {\n\t\t\t\t\t\ttypeof variables[UNHOIST] === 'function' && variables[UNHOIST]();\n\t\t\t\t\t\tdisconnectedSpan.endSpan();\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\thost: this,\n\t\t\t\tdetails: {\n\t\t\t\t\ttype: 'onDisconnect'\n\t\t\t\t},\n\t\t\t\tlocation: locations.RENDERER,\n\t\t\t\tdispatch: variables[DISPATCH],\n\t\t\t\tlog\n\t\t\t});\n\n\t\t\tremoveResolvedMapping(variables[COMPONENT_ID]);\n\n\t\t\tif (presentational) {\n\t\t\t\tremoveMappings(variables[COMPONENT_ID]);\n\t\t\t} else {\n\t\t\t\tvariables[CONNECTED_HANDLED] = false;\n\t\t\t\tvariables[ACTION_HANDLERS] = removeActionHandlers(variables[ACTION_HANDLERS]);\n\t\t\t\tvariables[TARGETED_ACTION_TYPES] = [];\n\t\t\t\tremoveMappings(variables[COMPONENT_ID]);\n\t\t\t\tvariables[RENDERED_ONCE] = false;\n\t\t\t\tvariables[TREE_RENDERED_ONCE] = false;\n\t\t\t\tclearPendingNetworkActionsForHost(this);\n\t\t\t}\n\n\t\t\tremoveContextConsumer(this);\n\n\t\t\t// there are cases where connectedCallback has not executed, but disconnectedCallback does\n\t\t\tthis.getComponentId() && delete componentRegistry[this.getComponentId()];\n\n\t\t\tif (typeof variables[REMOVE_UPDATE_CUSTOM_ELEMENT_OBSERVER] === 'function') {\n\t\t\t\tvariables[REMOVE_UPDATE_CUSTOM_ELEMENT_OBSERVER]();\n\t\t\t}\n\n\t\t\tif (variables[HAS_NOW_RESOLVED_PROPS]) {\n\t\t\t\tsandbox(disconnectNowResolvedPropsCallbacks, {\n\t\t\t\t\targs: [this],\n\t\t\t\t\thost: this,\n\t\t\t\t\tdetails: {\n\t\t\t\t\t\ttype: 'disconnectNowResolvedPropsCallbacks'\n\t\t\t\t\t},\n\t\t\t\t\tlocation: locations.RENDERER,\n\t\t\t\t\tdispatch: variables[DISPATCH],\n\t\t\t\t\tlog\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\t[RENDER](interactionId, source = metrics.CONNECTION, options = {}) {\n\t\t\tconst variables = getHostVariables(this);\n\t\t\toptions.cause = source; // eslint-disable-line no-param-reassign\n\t\t\tconst renderSpan = tracer.startSpan(SPAN_FOR_RENDER, {\n\t\t\t\t...getSpanOptions(this),\n\t\t\t\tkind: SPAN_KIND_CLIENT\n\t\t\t});\n\t\t\trenderSpan.setAttribute(SPAN_ATTR_INTERACTION_ID, interactionId);\n\t\t\tif (typeof source === 'string') {\n\t\t\t\trenderSpan.setAttribute(SPAN_ATTR_RENDER_CAUSE, source);\n\t\t\t}\n\t\t\tif (enableSchedulerQueueCounts) {\n\t\t\t\t// eslint-disable-next-line no-param-reassign\n\t\t\t\toptions.highPriorityTaskCount = countHighPriorityTasks(this);\n\t\t\t\t// eslint-disable-next-line no-param-reassign\n\t\t\t\toptions.mediumPriorityTaskCount = countMediumPriorityTasks(this);\n\t\t\t\t// eslint-disable-next-line no-param-reassign\n\t\t\t\toptions.pendingNetworkActionCount = pendingNetworkActionCountForHost(this);\n\t\t\t}\n\n\t\t\t// tell parent that a child is rendering. Once this is called,\n\t\t\t// this[NOTIFY_PARENT_THAT_CHILD_TREE_HAS_RENDERED]() must be called at some point,\n\t\t\t// either directly or via this[CHECK_IF_TREE_RENDERED]()\n\t\t\tthis[NOTIFY_PARENT_THAT_CHILD_IS_RENDERING]({interactionId});\n\n\t\t\tif (!this.isConnected) {\n\t\t\t\tthis[NOTIFY_PARENT_THAT_CHILD_TREE_HAS_RENDERED]({interactionId});\n\t\t\t\trenderSpan.setAttribute(SPAN_ATTR_SKIPPED_FOR_DISCONNECTED, true);\n\t\t\t\trenderSpan.endSpan();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tschedule({\n\t\t\t\tfn: () => {\n\t\t\t\t\ttracer.withSpan(renderSpan, () => {\n\t\t\t\t\t\tif (!this.isConnected) {\n\t\t\t\t\t\t\tthis[NOTIFY_PARENT_THAT_CHILD_TREE_HAS_RENDERED]({interactionId});\n\t\t\t\t\t\t\trenderSpan.setAttribute(SPAN_ATTR_SKIPPED_FOR_DISCONNECTED, true);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (variables[PROPS][NOW_MODE_PROP] === COMPONENT_MODE_SUSPEND) {\n\t\t\t\t\t\t\tthis[NOTIFY_PARENT_THAT_CHILD_TREE_HAS_RENDERED]({interactionId});\n\t\t\t\t\t\t\trenderSpan.setAttribute(SPAN_ATTR_SKIP_FOR_SUSPEND, true);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (variables[PROPS][NOW_MODE_PROP] === COMPONENT_MODE_DETACH) {\n\t\t\t\t\t\t\tconst fragment = document.createDocumentFragment();\n\n\t\t\t\t\t\t\tif (!this[DETACHED_SHADOW_ROOT_CHILDREN_FRAGMENT]) {\n\t\t\t\t\t\t\t\twhile (variables[ROOT_NODE].firstChild) {\n\t\t\t\t\t\t\t\t\tfragment.appendChild(\n\t\t\t\t\t\t\t\t\t\tvariables[ROOT_NODE].removeChild(variables[ROOT_NODE].firstChild)\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tthis[DETACHED_SHADOW_ROOT_CHILDREN_FRAGMENT] = fragment;\n\t\t\t\t\t\t\t\tthis[NOTIFY_PARENT_THAT_CHILD_TREE_HAS_RENDERED]({interactionId});\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\trenderSpan.setAttribute(SPAN_ATTR_SKIP_FOR_DETACHED, true);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// If we are observing for an intersection, and it has not happened yet, then cancel the render\n\t\t\t\t\t\tif (variables[USING_INTERSECTION_OBSERVER] && !variables[INTERSECTED]) {\n\t\t\t\t\t\t\tthis[NOTIFY_PARENT_THAT_CHILD_TREE_HAS_RENDERED]({interactionId});\n\t\t\t\t\t\t\trenderSpan.setAttribute(SPAN_ATTR_SKIP_FOR_INTERSECTION, true);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * A component may take a few intemediate renders before settling on the final view that matches the SSR view.\n\t\t\t\t\t\t * If we do hydration on the first render, we will end up trashing the SSR view due to the view mismatch.\n\t\t\t\t\t\t * NOW_SKIP_RENDER_UNTIL_PRESENT is an array of properties that are needed to render the final view. We will\n\t\t\t\t\t\t * wait until all those properties are present before rendering the component, which also helps with the performance\n\t\t\t\t\t\t * since we skip the intermediate unnecessary renders.\n\t\t\t\t\t\t */\n\t\t\t\t\t\tconst shouldSkipRenderDueToEmptyProps =\n\t\t\t\t\t\t\t!variables[RENDERED_ONCE] &&\n\t\t\t\t\t\t\tArray.isArray(variables[PROPS][NOW_SKIP_RENDER_UNTIL_PRESENT])\n\t\t\t\t\t\t\t\t? variables[PROPS][NOW_SKIP_RENDER_UNTIL_PRESENT].some(prop =>\n\t\t\t\t\t\t\t\t\t\tisEmpty(this.getResolvedProperties()[prop])\n\t\t\t\t\t\t\t\t  )\n\t\t\t\t\t\t\t\t: false;\n\n\t\t\t\t\t\tconst shouldSkipRenderDueToDeferHydration = this.getAttribute(NOW_DEFER_HYDRATION_ATTR);\n\t\t\t\t\t\tif (shouldSkipRenderDueToEmptyProps || shouldSkipRenderDueToDeferHydration) {\n\t\t\t\t\t\t\tthis[NOTIFY_PARENT_THAT_CHILD_TREE_HAS_RENDERED]({interactionId});\n\t\t\t\t\t\t\tif (shouldSkipRenderDueToEmptyProps) {\n\t\t\t\t\t\t\t\trenderSpan.setAttribute(SPAN_ATTR_SKIP_FOR_EMPTY_PROPS, true);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst state = getResolvedState(variables, componentRegistry);\n\t\t\t\t\t\tvalidateProperties(state.properties, this);\n\t\t\t\t\t\tvalidateContext(variables[CONTEXT], this);\n\n\t\t\t\t\t\tconst updatedState = shapeRenderData(\n\t\t\t\t\t\t\tstate,\n\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\tvariables,\n\t\t\t\t\t\t\ttransformState,\n\t\t\t\t\t\t\tvariables[DISPATCH],\n\t\t\t\t\t\t\tinteractionId\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tconst event = variables[CONDITIONAL_DISPATCH](\n\t\t\t\t\t\t\tCOMPONENT_RENDER_REQUESTED,\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tpreviousRenderState: variables[PREVIOUS_RENDER_STATE],\n\t\t\t\t\t\t\t\tpreviousRenderProperties: variables[PREVIOUS_RENDER_PROPERTIES],\n\t\t\t\t\t\t\t\thost: this\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tfirstRenderOnConnect: !variables[RENDERED_ONCE],\n\t\t\t\t\t\t\t\t[COMPONENT_INTERNAL_ACTION]: true,\n\t\t\t\t\t\t\t\tinternal: true,\n\t\t\t\t\t\t\t\t[SCHEDULE_IMMEDIATELY_DO_NOT_USE_OR_YOU_WILL_BE_IMMEDIATELY_FIRED]: true,\n\t\t\t\t\t\t\t\trenderCause: options.cause\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tif (event && event.defaultPrevented) {\n\t\t\t\t\t\t\tthis[NOTIFY_PARENT_THAT_CHILD_TREE_HAS_RENDERED]({interactionId});\n\t\t\t\t\t\t\trenderSpan.setAttribute(SPAN_ATTR_SKIPPED_FOR_DEFAULT_PREVENTED, true);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlet shouldSkipRender = false;\n\t\t\t\t\t\tif (this[DETACHED_SHADOW_ROOT_CHILDREN_FRAGMENT]) {\n\t\t\t\t\t\t\tif (this[DETACHED_COMPONENT_PROPERTY_MAP]) {\n\t\t\t\t\t\t\t\tthis[DETACHED_COMPONENT_PROPERTY_MAP].forEach(\n\t\t\t\t\t\t\t\t\t({name, value, updateProperties, interactionId}) => {\n\t\t\t\t\t\t\t\t\t\tshouldSkipRender = shouldSkipRender || this[VARIABLES][PROPS][name] !== value;\n\t\t\t\t\t\t\t\t\t\tthis[SET_PROPERTY](name, value, updateProperties, {interactionId});\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tvariables[ROOT_NODE].appendChild(this[DETACHED_SHADOW_ROOT_CHILDREN_FRAGMENT]);\n\t\t\t\t\t\t\tdelete this[DETACHED_SHADOW_ROOT_CHILDREN_FRAGMENT];\n\t\t\t\t\t\t\tdelete this[DETACHED_COMPONENT_PROPERTY_MAP];\n\t\t\t\t\t\t\tif (shouldSkipRender) {\n\t\t\t\t\t\t\t\trenderSpan.setAttribute(SPAN_ATTR_COMPONENT_RENDER_SKIPPED, true);\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tmeasure(\n\t\t\t\t\t\t\t() => {\n\t\t\t\t\t\t\t\tconst [state, helpers] = createOnStateChangeArgs(\n\t\t\t\t\t\t\t\t\tuseCoeffectsLikeObjectInView,\n\t\t\t\t\t\t\t\t\tvariables[COMPONENT_ID],\n\t\t\t\t\t\t\t\t\tupdatedState,\n\t\t\t\t\t\t\t\t\tcreateContextProxy(this),\n\t\t\t\t\t\t\t\t\tapplyMetrics(\n\t\t\t\t\t\t\t\t\t\tvariables[HELPERS_DEFER],\n\t\t\t\t\t\t\t\t\t\trenderSpan.id,\n\t\t\t\t\t\t\t\t\t\tisValidTraceId(renderSpan.traceId) ? renderSpan.traceId : null\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\tthis\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tsandbox(onStateChange, {\n\t\t\t\t\t\t\t\t\targs: [variables[ROOT_NODE], rendererView, state, helpers, interactionId],\n\t\t\t\t\t\t\t\t\thost: this,\n\t\t\t\t\t\t\t\t\tdetails: {\n\t\t\t\t\t\t\t\t\t\ttype: 'onStateChange'\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tlocation: locations.RENDERER,\n\t\t\t\t\t\t\t\t\tdispatch: variables[DISPATCH],\n\t\t\t\t\t\t\t\t\tlog\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\t`render-${tagName}#${variables[COMPONENT_ID]}`,\n\t\t\t\t\t\t\tinteractionId,\n\t\t\t\t\t\t\toptions\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tif (!variables[RENDERED_ONCE]) {\n\t\t\t\t\t\t\tvariables[CONDITIONAL_DISPATCH](\n\t\t\t\t\t\t\t\tCOMPONENT_DOM_READY,\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tpreviousRenderState: variables[PREVIOUS_RENDER_STATE],\n\t\t\t\t\t\t\t\t\tpreviousRenderProperties: variables[PREVIOUS_RENDER_PROPERTIES],\n\t\t\t\t\t\t\t\t\thost: this\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tinternal: true,\n\t\t\t\t\t\t\t\t\tfirstRenderOnConnect: true,\n\t\t\t\t\t\t\t\t\t[SCHEDULE_IMMEDIATELY_DO_NOT_USE_OR_YOU_WILL_BE_IMMEDIATELY_FIRED]: true\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvariables[CONDITIONAL_DISPATCH](\n\t\t\t\t\t\t\tCOMPONENT_RENDERED_ACTION_TYPE,\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tpreviousRenderState: variables[PREVIOUS_RENDER_STATE],\n\t\t\t\t\t\t\t\tpreviousRenderProperties: variables[PREVIOUS_RENDER_PROPERTIES],\n\t\t\t\t\t\t\t\thost: this\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tinternal: true,\n\t\t\t\t\t\t\t\tfirstRenderOnConnect: !variables[RENDERED_ONCE],\n\t\t\t\t\t\t\t\t[SCHEDULE_IMMEDIATELY_DO_NOT_USE_OR_YOU_WILL_BE_IMMEDIATELY_FIRED]: true\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tvariables[RENDERED_ONCE] = true;\n\t\t\t\t\t\tvariables[RENDERED_ONCE_TIMESTAMP] =\n\t\t\t\t\t\t\tvariables[RENDERED_ONCE_TIMESTAMP] || performance.now();\n\t\t\t\t\t\tvariables[PREVIOUS_RENDER_STATE] = updatedState;\n\t\t\t\t\t\tvariables[PREVIOUS_RENDER_PROPERTIES] = state.properties;\n\n\t\t\t\t\t\tthis[CHECK_IF_TREE_RENDERED](interactionId, options);\n\t\t\t\t\t});\n\t\t\t\t},\n\t\t\t\ttype: COMPONENT_RENDER,\n\t\t\t\tmeta: {\n\t\t\t\t\tel: this,\n\t\t\t\t\tinteractionId,\n\t\t\t\t\tspan: renderSpan\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\t[INTERSECTION_TRIGGERED]() {\n\t\t\tconst variables = getHostVariables(this);\n\n\t\t\tvariables[INTERSECTED] = true;\n\t\t\tif (variables[REMOVE_INTERSECTED_STYLES]) {\n\t\t\t\tvariables[REMOVE_INTERSECTED_STYLES]();\n\t\t\t\tvariables[REMOVE_INTERSECTED_STYLES] = null;\n\t\t\t}\n\n\t\t\tthis[RENDER](createInteractionId(), metrics.INTERSECTION);\n\t\t}\n\n\t\t[CHECK_IF_TREE_RENDERED](interactionId, options = {}) {\n\t\t\tconst variables = getHostVariables(this);\n\t\t\tif (enableSchedulerQueueCounts) {\n\t\t\t\toptions.highPriorityTaskCount = countHighPriorityTasks(this);\n\t\t\t\toptions.mediumPriorityTaskCount = countMediumPriorityTasks(this);\n\t\t\t\toptions.pendingNetworkActionCount = pendingNetworkActionCountForHost(this);\n\t\t\t}\n\n\t\t\t// Check if all children are complete. if so, dispatch that this component is also complete\n\t\t\tif (Object.keys(variables[CHILDREN_TO_BE_RENDERED]).length) return;\n\n\t\t\tif (!variables[TREE_RENDERED_ONCE]) {\n\t\t\t\tvariables[CONDITIONAL_DISPATCH](\n\t\t\t\t\tCOMPONENT_DOM_TREE_READY,\n\t\t\t\t\t{\n\t\t\t\t\t\tpreviousRenderState: variables[PREVIOUS_TREE_RENDER_STATE],\n\t\t\t\t\t\tpreviousRenderProperties: variables[PREVIOUS_TREE_RENDER_PROPERTIES],\n\t\t\t\t\t\thost: this\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tinternal: true,\n\t\t\t\t\t\tfirstRenderOnConnect: true,\n\t\t\t\t\t\t[SCHEDULE_IMMEDIATELY_DO_NOT_USE_OR_YOU_WILL_BE_IMMEDIATELY_FIRED]: true\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tmark(this, interactionId, metrics.RENDER_TREE, options);\n\t\t\tvariables[CONDITIONAL_DISPATCH](\n\t\t\t\tCOMPONENT_TREE_RENDERED,\n\t\t\t\t{\n\t\t\t\t\tpreviousRenderState: variables[PREVIOUS_TREE_RENDER_STATE],\n\t\t\t\t\tpreviousRenderProperties: variables[PREVIOUS_TREE_RENDER_PROPERTIES],\n\t\t\t\t\thost: this\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tinternal: true,\n\t\t\t\t\tfirstRenderOnConnect: !variables[TREE_RENDERED_ONCE],\n\t\t\t\t\t[SCHEDULE_IMMEDIATELY_DO_NOT_USE_OR_YOU_WILL_BE_IMMEDIATELY_FIRED]: true\n\t\t\t\t}\n\t\t\t);\n\n\t\t\tvariables[TREE_RENDERED_ONCE] = true;\n\t\t\tvariables[TREE_RENDERED_ONCE_TIMESTAMP] =\n\t\t\t\tvariables[TREE_RENDERED_ONCE_TIMESTAMP] || performance.now();\n\t\t\tvariables[PREVIOUS_TREE_RENDER_STATE] = variables[PREVIOUS_RENDER_STATE];\n\t\t\tvariables[PREVIOUS_TREE_RENDER_PROPERTIES] = variables[PREVIOUS_RENDER_PROPERTIES];\n\n\t\t\tthis[NOTIFY_PARENT_THAT_CHILD_TREE_HAS_RENDERED]({\n\t\t\t\tinteractionId\n\t\t\t});\n\t\t}\n\n\t\t[CHILD_IS_RENDERING](child) {\n\t\t\tconst variables = getHostVariables(this);\n\t\t\tconst childVariables = getHostVariables(child);\n\t\t\tvariables[CHILDREN_TO_BE_RENDERED][childVariables[COMPONENT_ID]] = true;\n\t\t}\n\n\t\t[CHILD_HAS_RENDERED]({child, interactionId}) {\n\t\t\tconst variables = getHostVariables(this);\n\t\t\tconst childVariables = getHostVariables(child);\n\t\t\tdelete variables[CHILDREN_TO_BE_RENDERED][childVariables[COMPONENT_ID]];\n\n\t\t\tthis[CHECK_IF_TREE_RENDERED](interactionId, {});\n\t\t}\n\n\t\t[NOTIFY_PARENT_THAT_CHILD_IS_RENDERING]() {\n\t\t\tconst variables = getHostVariables(this);\n\t\t\tconst parentHost = variables[ANCESTOR_ROOT_NODE];\n\t\t\tif (parentHost && getHostVariables(parentHost)[NEEDS_TO_KNOW_ABOUT_TREE_RENDERS])\n\t\t\t\tparentHost[CHILD_IS_RENDERING](this);\n\t\t}\n\n\t\t[NOTIFY_PARENT_THAT_CHILD_TREE_HAS_RENDERED]({interactionId}) {\n\t\t\tconst variables = getHostVariables(this);\n\t\t\tconst parentHost = variables[ANCESTOR_ROOT_NODE];\n\t\t\tif (parentHost && getHostVariables(parentHost)[NEEDS_TO_KNOW_ABOUT_TREE_RENDERS])\n\t\t\t\tparentHost[CHILD_HAS_RENDERED]({child: this, interactionId});\n\t\t}\n\t}\n\n\tconst accessors = {\n\t\tnowElementConfig: {\n\t\t\tget() {\n\t\t\t\tinitialize();\n\t\t\t\treturn normalizedConfig;\n\t\t\t}\n\t\t},\n\t\tnowRootNode: {\n\t\t\tget() {\n\t\t\t\tif (!initialized || shadowRootOptions.mode === SHADOW_ROOT_MODE_CLOSED) return null;\n\n\t\t\t\treturn getHostVariables(this)[ROOT_NODE];\n\t\t\t}\n\t\t},\n\t\tstyle: {\n\t\t\tget() {\n\t\t\t\treturn getHostVariables(this)[STYLE_PROXY];\n\t\t\t},\n\t\t\tset() {\n\t\t\t\tlog('setting style property directly is not supported');\n\t\t\t}\n\t\t}\n\t};\n\treturn SeismicElement;\n}\n", "export {default as buildActionPayloadValidator} from './build/buildActionPayloadValidator';\nexport {default as buildPropertiesValidator} from './build/buildPropertiesValidator';\n", "/**\n * Noop validation in production\n * @private\n */\nfunction noop() {\n\treturn () => true;\n}\n\nexport default noop;\n", "import {createInterceptors} from './createInterceptors';\nimport {lifeCycleFnsToHandlers} from './lifeCycleFnsToHandlers';\nimport {mergeBehaviorActionHandlers} from './mergeBehaviorActionHandlers';\nimport {mergeBehaviorInitialState} from './mergeBehaviorInitialState';\nimport {mergeBehaviorProperties} from './mergeBehaviorProperties';\nimport {mergeLifeCycleActionHandlers} from './mergeLifeCycleActionHandlers';\nimport {normalizeActionHandlers} from './normalizeActionHandlers';\nimport {normalizeActionHandler} from './normalizeActionHandler';\nimport {normalizeBehaviors} from './normalizeBehaviors';\nimport {getStopPropagation} from './getStopPropagation';\nimport {mergeActions} from './mergeActions';\nimport {mergeEventActionHandlers} from './mergeEventActionHandlers';\nimport {applyPayloadValidators} from './applyPayloadValidators';\nimport {mergeBehaviorActions} from './mergeBehaviorActions';\nimport {getActionsToDispatch} from './getActionsToDispatch';\nimport {normalizeBehaviorEventHandlers} from './normalizeBehaviorEventHandlers';\nimport {SHADOW_ROOT_MODE_OPEN, ARIA_LIVE_REGION_UPDATE_REQUESTED} from '../../constants';\nimport {actionHandler as ariaLiveRegionActionHandler} from '../../accessibility/ariaLiveRegion';\n\nexport function normalizeConfig(config) {\n\tconst {\n\t\teventHandlers: componentEventHandlers = [],\n\t\tactionHandlers = {},\n\t\tbehaviors = [],\n\t\tproperties = {},\n\t\tname,\n\t\tinitialState,\n\t\tsetInitialState,\n\t\tactions = {},\n\t\tshadowRootOptions: {mode: shadowRootMode = SHADOW_ROOT_MODE_OPEN} = {}\n\t} = config;\n\n\tconst normalizedBehaviors = normalizeBehaviors(behaviors, name);\n\tconst eventHandlers = [\n\t\t...componentEventHandlers,\n\t\t...normalizeBehaviorEventHandlers(normalizedBehaviors)\n\t];\n\tconst mergedActionHandlers = mergeEventActionHandlers(\n\t\tmergeBehaviorActionHandlers(\n\t\t\tnormalizedBehaviors,\n\t\t\tmergeActions(\n\t\t\t\tmergeLifeCycleActionHandlers(\n\t\t\t\t\tlifeCycleFnsToHandlers(\n\t\t\t\t\t\t[config, ...normalizedBehaviors.map(({behavior}) => behavior)],\n\t\t\t\t\t\tname\n\t\t\t\t\t),\n\t\t\t\t\tnormalizeActionHandlers(actionHandlers, name)\n\t\t\t\t),\n\t\t\t\tactions,\n\t\t\t\tname\n\t\t\t)\n\t\t),\n\t\teventHandlers,\n\t\tname\n\t);\n\n\tmergedActionHandlers[ARIA_LIVE_REGION_UPDATE_REQUESTED] = [\n\t\tnormalizeActionHandler(ariaLiveRegionActionHandler)\n\t];\n\n\tconst interceptors = createInterceptors(mergedActionHandlers);\n\tconst mergedInitialStates = mergeBehaviorInitialState(\n\t\tnormalizedBehaviors,\n\t\tinitialState,\n\t\tsetInitialState,\n\t\tname\n\t);\n\n\treturn {\n\t\tshouldDispatch: getActionsToDispatch(interceptors),\n\t\teventHandlers,\n\t\tshouldStopPropagation: getStopPropagation(mergedActionHandlers),\n\t\tactions: applyPayloadValidators(mergeBehaviorActions(actions, normalizedBehaviors, name)),\n\t\tactionTypes: {}, // TODO: add action data types for validation\n\t\tinitialState: mergedInitialStates.initialState,\n\t\tsetInitialState: mergedInitialStates.setInitialState,\n\t\tproperties: mergeBehaviorProperties(normalizedBehaviors, properties, name),\n\t\tinterceptors,\n\t\tbehaviors: normalizedBehaviors,\n\t\tshadowRootOptions: {\n\t\t\tmode: shadowRootMode\n\t\t}\n\t};\n}\n", "import {sandbox, locations} from '@servicenow/ui-internal';\nimport getHostVariables from '../getHostVariables';\nimport {DISPATCH} from '../../symbols';\nimport log from '../../log';\n\nconst {INTERCEPTOR} = locations;\n\nfunction sandboxInterceptor(effectInterceptor) {\n\tconst {fn, type, position} = effectInterceptor;\n\treturn {\n\t\t...effectInterceptor,\n\t\tfn: function sandboxedInterceptor(context) {\n\t\t\tconst {\n\t\t\t\tcoeffects: {host}\n\t\t\t} = context;\n\t\t\tif (type === 'effect')\n\t\t\t\t// don't need to wrap seismic defined interceptors\n\t\t\t\treturn fn(context);\n\n\t\t\tconst hostVariables = getHostVariables(host);\n\t\t\treturn sandbox(fn, {\n\t\t\t\targs: [context],\n\t\t\t\tlocation: INTERCEPTOR,\n\t\t\t\thost,\n\t\t\t\tdetails: {\n\t\t\t\t\ttype,\n\t\t\t\t\tposition\n\t\t\t\t},\n\t\t\t\tdispatch: hostVariables[DISPATCH],\n\t\t\t\tlog\n\t\t\t});\n\t\t}\n\t};\n}\n\nfunction forEachInterceptor(interceptors, target, map) {\n\tmap.set(target, interceptors.map(sandboxInterceptor));\n}\n\nexport function createInterceptors(actionHandlers) {\n\tconst actionHandlerInterceptors = {};\n\n\tfor (const k in actionHandlers) {\n\t\tactionHandlerInterceptors[k] = new Map();\n\t\tconst {length: handlerCount} = actionHandlers[k];\n\t\tfor (let i = 0; i < handlerCount; i++) {\n\t\t\tconst {\n\t\t\t\tinterceptors: {before, after},\n\t\t\t\targs,\n\t\t\t\teffect,\n\t\t\t\thandlers = [],\n\t\t\t\ttarget = 'host',\n\t\t\t\tbehaviorOptions,\n\t\t\t\tcapture,\n\t\t\t\teventHandler,\n\t\t\t\tmodifier,\n\t\t\t\tdescendantOnly\n\t\t\t} = actionHandlers[k][i];\n\t\t\tlet combinedInterceptors = actionHandlerInterceptors[k].has(target)\n\t\t\t\t? actionHandlerInterceptors[k].get(target)\n\t\t\t\t: [];\n\n\t\t\tconst effectInterceptor = effect\n\t\t\t\t? {\n\t\t\t\t\t\tfn: function createEffectHandlerInterceptor(context) {\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t...context,\n\t\t\t\t\t\t\t\teffects: [\n\t\t\t\t\t\t\t\t\t...context.effects,\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\teffect,\n\t\t\t\t\t\t\t\t\t\targs: [...args, context.coeffects],\n\t\t\t\t\t\t\t\t\t\tmodifier,\n\t\t\t\t\t\t\t\t\t\toptions: behaviorOptions,\n\t\t\t\t\t\t\t\t\t\tdescendantOnly\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t},\n\t\t\t\t\t\ttype: 'effect',\n\t\t\t\t\t\tcapture,\n\t\t\t\t\t\teventHandler\n\t\t\t\t  }\n\t\t\t\t: null;\n\n\t\t\tconst handlerInterceptors = handlers.map(handler => ({\n\t\t\t\tfn: function createHandlersInterceptor(context) {\n\t\t\t\t\tconst {effect, args = []} = handler;\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...context,\n\t\t\t\t\t\teffects: [\n\t\t\t\t\t\t\t...context.effects,\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\teffect,\n\t\t\t\t\t\t\t\targs: [...args, context.coeffects],\n\t\t\t\t\t\t\t\tmodifier,\n\t\t\t\t\t\t\t\toptions: behaviorOptions,\n\t\t\t\t\t\t\t\tdescendantOnly\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t]\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\ttype: 'effect',\n\t\t\t\tcapture,\n\t\t\t\teventHandler\n\t\t\t}));\n\n\t\t\tcombinedInterceptors = [\n\t\t\t\t...combinedInterceptors,\n\t\t\t\t...before,\n\t\t\t\t...(effectInterceptor ? [effectInterceptor] : []),\n\t\t\t\t...handlerInterceptors,\n\t\t\t\t...after\n\t\t\t];\n\t\t\tactionHandlerInterceptors[k].set(target, combinedInterceptors);\n\t\t}\n\n\t\tactionHandlerInterceptors[k].forEach(forEachInterceptor);\n\t}\n\n\treturn actionHandlerInterceptors;\n}\n", "import {VARIABLES} from '../symbols';\n\nexport default function getHostVariables(host) {\n\tif (!host) return null;\n\n\treturn host[VARIABLES];\n}\n", "export const PRESENTATIONAL = Symbol('__presentational__');\nexport const COMPONENT_ID = Symbol('__componentId__');\nexport const CONNECTED = Symbol('__connected__');\nexport const PROPERTY_DEFS = Symbol('__propertyDefs__');\nexport const STATE = Symbol('__state__');\nexport const PROPS = Symbol('__props__');\nexport const ACTIONS = Symbol('__actions__');\nexport const ACTION_HANDLERS = Symbol('__actionHandlers__');\nexport const DISPATCH = Symbol('__dispatch__');\nexport const CONDITIONAL_DISPATCH = Symbol('__conditional_dispatch__');\nexport const ROOT_NODE = Symbol('__rootNode__');\nexport const VERSION = Symbol('__version__');\nexport const ATTACHED_ROOT_NODE = Symbol('__attached_root_node__');\nexport const UNHOIST = '__unHoist__';\nexport const DEFERRED = '__deferred__';\nexport const RENDER = Symbol('__render__');\nexport const LAST_HANDLE_STATE_CHANGE = Symbol('__last_handle_state_change__');\nexport const RENDER_SCHEDULED = Symbol('__render_scheduled__');\nexport const LAST_STATE_RENDERED = Symbol('__last_state_rendered__');\nexport const LAST_STATE_CHANGE = Symbol('__last_state_change__');\nexport const EVENT_HANDLERS = Symbol('__event_handlers__');\nexport const LIFE_CYCLE_COEFFECTS = Symbol('__life_cycle_coeffects__');\nexport const BOOTSTRAP_LIFECYCLE_RAN = Symbol('__bootstrap_lifecycle_ran__');\nexport const CONFIG = Symbol('__config__');\nexport const REMOVE_ACTION_HANDLERS = Symbol('__remove_action_handlers__');\nexport const RENDERED_ONCE = Symbol('__renders__');\nexport const TREE_RENDERED_ONCE = Symbol('__tree_renders__');\nexport const HELPERS_IMMEDIATE = Symbol('__helpers_immediate__');\nexport const HELPERS_DEFER = Symbol('__helpers_defer__');\nexport const HELPERS_SCHEDULED = Symbol('__helpers_scheduled__');\nexport const RETARGETED_ACTION_TYPES = Symbol('__retargeted_action_types__');\nexport const TARGETED_ACTION_TYPES = Symbol('__targeted_action_types__');\nexport const STYLE_PROXY = Symbol('__style_proxy__');\nexport const GET_RESOLVED_PROPERTY = Symbol('__get_resolved_property__');\nexport const HOIST_CHANGED = Symbol('__hoist_changed__');\nexport const HOIST_PARENT_CHANGED = Symbol('__hoist_parent_changed__');\nexport const SET_PROPERTY = Symbol('__set_property__');\nexport const HOIST_COMPOSED_PATH = Symbol('__hoist_composed_path__');\nexport const BOOTSTRAPPED_HANDLED = Symbol('__bootstrapped_handled__');\nexport const CONNECTED_HANDLED = Symbol('__connected_handled__');\nexport const PREVIOUS_RENDER_STATE = Symbol('__previous_render_state__');\nexport const PREVIOUS_RENDER_PROPERTIES = Symbol('__previous_render_properties__');\nexport const PREVIOUS_TREE_RENDER_STATE = Symbol('__previous_tree_render_state__');\nexport const PREVIOUS_TREE_RENDER_PROPERTIES = Symbol('__previous_tree_render_properties__');\nexport const CHILDREN_TO_BE_RENDERED = Symbol('__children_to_be_rendered__');\nexport const CHECK_IF_TREE_RENDERED = Symbol('__check_if_tree_rendered__');\nexport const CHILD_IS_RENDERING = Symbol('__child_is_rendering__');\nexport const CHILD_HAS_RENDERED = Symbol('__child_has_rendered__');\nexport const NOTIFY_PARENT_THAT_CHILD_IS_RENDERING = Symbol(\n\t'__notify_parent_that_child_is_rendering__'\n);\nexport const NOTIFY_PARENT_THAT_CHILD_TREE_HAS_RENDERED = Symbol(\n\t'__notify_parent_that_child_tree_has_rendered__'\n);\nexport const NEEDS_TO_KNOW_ABOUT_TREE_RENDERS = Symbol('__needs_to_know_about_tree_renders__');\nexport const ANCESTOR_ROOT_NODE = Symbol('__ancestor_root_node__');\nexport const ANCESTOR_PATH = Symbol('__ancestor_path__');\nexport const UPDATE_AFFECTED_COMPONENTS = Symbol('__update_affected_components__');\nexport const RUNTIME_ACTION_HANDLERS = Symbol('__runtime_action_handlers__');\nexport const USING_INTERSECTION_OBSERVER = Symbol('__using_intersection_observer__');\nexport const INTERSECTED = Symbol('__intersected__');\nexport const INTERSECTION_TRIGGERED = Symbol('__intersection_triggered__');\nexport const REMOVE_INTERSECTED_STYLES = Symbol('__remove_intersected_styles__');\nexport const DETACHED_SHADOW_ROOT_CHILDREN_FRAGMENT = Symbol(\n\t'__detached_shadow_root_children_fragment__'\n);\nexport const DETACHED_COMPONENT_PROPERTY_MAP = Symbol('__detached_component_property_map__');\nexport const LOW_PRIORITY_PENDING = Symbol('__low_priority_pending__');\nexport const INTERACTIVE_TIMESTAMP = Symbol('__interactive_timestamp__');\nexport const CONNECTED_TIMESTAMP = Symbol('__connected_timestamp__');\nexport const CHILDREN_TO_BE_INTERACTIVE = Symbol('__children_to_be_interactive__');\nexport const SELECTABLE_PROPERTIES = Symbol('__SELECTABLE_PROPERTIES__');\nexport const PROPERTIES_WITH_SELECTOR = Symbol('__properties_with_selector__');\nexport const PROPERTIES_WITH_NESTED_SELECTOR = Symbol('__properties_with_nested_selector__');\nexport const TREE_RENDERED_ONCE_TIMESTAMP = Symbol('__tree_rendered_once_timestamp__');\nexport const RENDERED_ONCE_TIMESTAMP = Symbol('__rendered_once_timestamp__');\nexport const CONNECTED_DEFERRED_TIMESTAMP = Symbol('__connected_deferred_timestamp__');\nexport const CONTEXT = Symbol('__context__');\nexport const CONTEXT_VIEW_KEY = Symbol('__context_view_key__');\nexport const CONTEXT_RESOLVED_VALUE = Symbol('__context_resolved_value__');\nexport const REMOVE_UPDATE_CUSTOM_ELEMENT_OBSERVER = Symbol(\n\t'__remove_update_custom_element_observer__'\n);\nexport const PREVIOUS_INTERACTION_ID = Symbol('__previous_interaction_id__');\nexport const PREVIOUS_TRACE_ID = Symbol('__previous_trace_id__');\nexport const HAS_NOW_RESOLVED_PROPS = Symbol('__has_now_resolved_props__');\nexport const HYDRATED = Symbol('__hydrated__');\nexport const VNODE = Symbol('__vnode__');\nexport const INTERACTION_ID = Symbol('__interaction_id__');\n\nexport {\n\tVARIABLES,\n\tINTERNAL_HOST_DISPATCH,\n\tEXISTING_SHADOW_ROOT_ON_CREATE\n} from '@servicenow/ui-internal';\n", "import {normalizeActionHandler} from './normalizeActionHandler';\nimport {sandbox, locations} from '@servicenow/ui-internal';\nimport log from '../../log';\n\nconst {LIFECYCLE} = locations;\nimport {\n\tCOMPONENT_CONNECTED,\n\tCOMPONENT_DISCONNECTED,\n\tCOMPONENT_BOOTSTRAPPED,\n\tCOMPONENT_PROPERTY_CHANGED,\n\tPROPERTIES_SET_LIFECYCLE,\n\tON_CONNECT_LIFECYCLE,\n\tON_DISCONNECT_LIFECYCLE,\n\tON_BOOTSTRAP_LIFECYCLE\n} from '../../constants';\nimport getHostVariables from '../getHostVariables';\nimport {HELPERS_SCHEDULED} from '../../symbols';\nimport {wrapDispatch} from '../../actions/utils';\n\nconst lifeCycleFnsToHandlerMap = {\n\t[COMPONENT_CONNECTED]: {lifecycle: ON_CONNECT_LIFECYCLE, display: 'COMPONENT_CONNECTED'},\n\t[COMPONENT_DISCONNECTED]: {lifecycle: ON_DISCONNECT_LIFECYCLE, display: 'COMPONENT_DISCONNECTED'},\n\t[COMPONENT_BOOTSTRAPPED]: {lifecycle: ON_BOOTSTRAP_LIFECYCLE, display: 'COMPONENT_BOOTSTRAPPED'},\n\t[COMPONENT_PROPERTY_CHANGED]: {\n\t\tlifecycle: PROPERTIES_SET_LIFECYCLE,\n\t\tdisplay: 'COMPONENT_PROPERTY_CHANGED'\n\t}\n};\n\nfunction createOnPropertyChangeHandler(config, def) {\n\tconst {properties} = config;\n\tconst onPropertiesSet = config[def.lifecycle];\n\tconst fns = {};\n\tfor (const k in properties) {\n\t\tconst {onChange} = properties[k];\n\t\tif (typeof onChange === 'function') fns[k] = onChange;\n\t}\n\n\tif (!Object.keys(fns).length && !onPropertiesSet) return;\n\n\treturn function onPropertyChange({\n\t\tdispatch,\n\t\taction: {\n\t\t\tpayload: {host, name, previousValue, value}\n\t\t}\n\t}) {\n\t\tconst hostVariables = getHostVariables(host);\n\n\t\tif (onPropertiesSet) {\n\t\t\tsandbox(onPropertiesSet, {\n\t\t\t\targs: [host, hostVariables[HELPERS_SCHEDULED]],\n\t\t\t\tdispatch,\n\t\t\t\thost,\n\t\t\t\tlocation: LIFECYCLE,\n\t\t\t\tdetails: {name: def.lifecycle},\n\t\t\t\tlog\n\t\t\t});\n\t\t}\n\n\t\tconst fn = fns[name];\n\t\tif (fn) {\n\t\t\tsandbox(fn, {\n\t\t\t\targs: [value, previousValue, hostVariables[HELPERS_SCHEDULED]],\n\t\t\t\tdispatch,\n\t\t\t\thost,\n\t\t\t\tlocation: LIFECYCLE,\n\t\t\t\tdetails: {name: def.lifecycle},\n\t\t\t\tlog\n\t\t\t});\n\t\t}\n\t};\n}\n\nexport function lifeCycleFnsToHandlers(configs, tagName) {\n\tconst actionHandlers = {};\n\tfor (const k in lifeCycleFnsToHandlerMap) {\n\t\tconst def = lifeCycleFnsToHandlerMap[k];\n\t\tconst {length: configsCount} = configs;\n\t\tconst actionType = k;\n\t\tactionHandlers[actionType] = [];\n\n\t\tfor (let i = 0; i < configsCount; i++) {\n\t\t\tconst config = configs[i];\n\t\t\tif (actionType === COMPONENT_PROPERTY_CHANGED) {\n\t\t\t\tconst onPropertyChangeEffect = createOnPropertyChangeHandler(config, def);\n\t\t\t\tif (onPropertyChangeEffect) {\n\t\t\t\t\tactionHandlers[actionType].push(\n\t\t\t\t\t\tnormalizeActionHandler(\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\teffect: onPropertyChangeEffect,\n\t\t\t\t\t\t\t\ttype: 'effect'\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\ttagName\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst fn = config[def.lifecycle];\n\t\t\t\tif (typeof fn === 'function') {\n\t\t\t\t\tactionHandlers[actionType].push(\n\t\t\t\t\t\tnormalizeActionHandler(\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\teffect({\n\t\t\t\t\t\t\t\t\tdispatch,\n\t\t\t\t\t\t\t\t\taction,\n\t\t\t\t\t\t\t\t\taction: {\n\t\t\t\t\t\t\t\t\t\tpayload: {host}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}) {\n\t\t\t\t\t\t\t\t\tconst wrappedDispatch = wrapDispatch(host, action);\n\t\t\t\t\t\t\t\t\tconst helpers = wrappedDispatch.dispatch;\n\t\t\t\t\t\t\t\t\tObject.assign(helpers, wrappedDispatch);\n\n\t\t\t\t\t\t\t\t\tsandbox(fn, {\n\t\t\t\t\t\t\t\t\t\targs: config.options ? [host, helpers, config.options] : [host, helpers],\n\t\t\t\t\t\t\t\t\t\tdispatch,\n\t\t\t\t\t\t\t\t\t\thost,\n\t\t\t\t\t\t\t\t\t\tlocation: LIFECYCLE,\n\t\t\t\t\t\t\t\t\t\tdetails: {name: def.lifecycle},\n\t\t\t\t\t\t\t\t\t\tlog\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\ttype: 'effect'\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\ttagName\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn actionHandlers;\n}\n", "import normalizeModifiers from './normalizeModifiers';\nimport log from '../../log';\n\nfunction typeInterceptor(fn, type, position) {\n\treturn {fn, type, position};\n}\n\nfunction mapInterceptors(interceptors) {\n\tconst mapped = {before: [], after: []};\n\tconst {length: interceptorCount} = interceptors;\n\tfor (let i = 0; i < interceptorCount; i++) {\n\t\tconst interceptor = interceptors[i];\n\t\tconst {before, after} = interceptor;\n\t\tif (!before && !after) {\n\t\t\tmapped.before.push(typeInterceptor(interceptor));\n\t\t\tcontinue;\n\t\t}\n\t\tif (before) mapped.before.push(typeInterceptor(before, 'before', mapped.before.length));\n\t\tif (after) mapped.after.unshift(typeInterceptor(after, 'after', mapped.after.length));\n\t}\n\n\treturn mapped;\n}\n\nfunction normalizeHandlers(handlers, tagName) {\n\tif (handlers.length) {\n\t\tlog(`Please update action handler definition in <${tagName}>`, {\n\t\t\ttagName,\n\t\t\torigin: 'normalizeHandlers',\n\t\t\tdocs: 'https://developer.servicenow.com/dev.do#!/guide/orlando/now-experience/ui-framework/now-experience-ui-framework-101/action-handlers'\n\t\t});\n\t}\n\n\treturn handlers.map(handler =>\n\t\ttypeof handler === 'function'\n\t\t\t? {\n\t\t\t\t\teffect: handler,\n\t\t\t\t\targs: []\n\t\t\t  }\n\t\t\t: {\n\t\t\t\t\t...handler,\n\t\t\t\t\teffect: handler.effect || handler.fn,\n\t\t\t\t\targs: handler.args || []\n\t\t\t  }\n\t);\n}\n\nexport function normalizeActionHandler(actionHandler, tagName) {\n\tconst {\n\t\thandlers = [],\n\t\targs = [],\n\t\tinterceptors = [],\n\t\tstopPropagation,\n\t\tprivate: isPrivate,\n\t\ttarget,\n\t\tmodifiers = [],\n\t\tmodifier = {},\n\t\tcapture = false,\n\t\teventHandler = false,\n\t\tdescendantOnly = false\n\t} = actionHandler;\n\n\tif (typeof actionHandler === 'function') {\n\t\treturn {\n\t\t\tstopPropagation,\n\t\t\teffect: actionHandler,\n\t\t\thandlers: [],\n\t\t\targs,\n\t\t\tinterceptors: mapInterceptors(interceptors),\n\t\t\ttarget,\n\t\t\tmodifier: normalizeModifiers(modifiers, modifier),\n\t\t\tcapture,\n\t\t\teventHandler,\n\t\t\tdescendantOnly\n\t\t};\n\t}\n\n\tfunction effectDelegate(...args) {\n\t\t// Effect delegate function to enable stubbing in tests\n\t\treturn actionHandler.effect(...args);\n\t}\n\n\treturn {\n\t\tstopPropagation: stopPropagation || isPrivate,\n\t\teffect: typeof actionHandler.effect === 'function' ? effectDelegate : actionHandler.effect,\n\t\thandlers: normalizeHandlers(handlers, tagName),\n\t\targs,\n\t\tinterceptors: mapInterceptors(interceptors),\n\t\ttarget,\n\t\tmodifier: normalizeModifiers(modifiers, modifier),\n\t\tcapture,\n\t\teventHandler,\n\t\tdescendantOnly\n\t};\n}\n", "const TAKE_LATEST = 'takeLatest';\n\nexport default function normalizeModifiers(modifiers, modifier) {\n\treturn Object.keys(modifier).length ? modifier : modifiers.length ? {name: TAKE_LATEST} : {};\n}\n", "export {appendToPayload} from './appendToPayload';\nexport {createMetaData} from './createMetaData';\nexport {isPropertyUpdate} from './isPropertyUpdate';\nexport {validateActionPayload} from './validateActionPayload';\nexport {getComponentName} from './getComponentName';\nexport {isHoisted, getHoistTarget} from '../../utils';\nexport {isInternalActionType} from './isInternalActionType';\nexport {getInternalActionName} from './getInternalActionName';\nexport {createEventActionDetails} from './createEventActionDetails';\nexport {wrapDispatch} from './wrapDispatch';\nexport {default as isStoreUpdate} from './isStoreUpdate';\nexport {hasActionHandlerForType} from './hasActionHandlerForType';\nexport {wasActionDispatchedByDescendant} from './wasActionDispatchedByDescendant';\nexport {applyRuntimeActionHandlers} from './applyRuntimeActionHandlers';\nexport {normalizeActionMeta} from '../../utils/';\nexport {skipForDetachedComponent} from './skipForDetachedComponent';\n", "import {APPEND_TO_PAYLOAD_PROP_NAME} from '../../constants';\n\nexport function appendToPayload(el, payload) {\n\tconst appendToPayload = el[APPEND_TO_PAYLOAD_PROP_NAME];\n\tif (!appendToPayload) return payload;\n\n\treturn {...payload, ...appendToPayload};\n}\n", "import {guid} from '@servicenow/ui-internal';\nimport {getComponentName} from './getComponentName';\nimport {COMPONENT_ID, ROOT_NODE} from '../../symbols';\nimport {SEISMIC_HOIST_TAG_NAME, APPEND_TO_META_PROP_NAME} from '../../constants';\n\nexport function createMetaData(host, actionMeta, hostVariables) {\n\tconst componentName = getComponentName(host) || actionMeta.componentName;\n\tconst id = hostVariables[COMPONENT_ID];\n\tconst appendToMeta = actionMeta.retargeted ? actionMeta.appended : host[APPEND_TO_META_PROP_NAME];\n\n\treturn {\n\t\t...actionMeta,\n\t\t...(appendToMeta !== undefined ? {appended: appendToMeta} : {}),\n\t\thoistHost:\n\t\t\thostVariables[ROOT_NODE].host.tagName === SEISMIC_HOIST_TAG_NAME\n\t\t\t\t? hostVariables[ROOT_NODE].host\n\t\t\t\t: undefined,\n\t\tcomponentName,\n\t\tid,\n\t\tactionId: guid()\n\t};\n}\n", "import {getHostVariables} from '../../utils';\nimport {COMPONENT_NAME_PROP, COMPONENT_NAME_ATTR} from '../../constants';\nimport {PROPS} from '../../symbols';\n\nexport function getComponentName(el) {\n\tconst hostVariables = getHostVariables(el);\n\treturn hostVariables[PROPS] && hostVariables[PROPS].hasOwnProperty(COMPONENT_NAME_PROP)\n\t\t? hostVariables[PROPS][COMPONENT_NAME_PROP]\n\t\t: el[COMPONENT_NAME_PROP] || el.getAttribute(COMPONENT_NAME_ATTR);\n}\n", "export {default as assertValidPropertyNames} from './assertValidPropertyNames';\nexport {default as getHostVariables} from './getHostVariables';\nexport {default as resolveProperties} from './resolveProperties';\nexport {default as resolveRenderer} from './resolveRenderer';\nexport {default as getInitialPropertyValue} from './getInitialPropertyValue';\nexport {default as filterPropertyDefinitions} from './filterPropertyDefinitions';\nexport {default as createStyleFragment, removeStyleFragmentFromCache} from './createStyleFragment';\nexport {default as relfectQueue} from './reflectQueue';\nexport {default as isReflecting} from './isReflecting';\nexport {default as clearReflection} from './clearReflection';\nexport {default as isComputedProperty} from './isComputedProperty';\nexport {default as toAttributeName} from './toAttributeName';\nexport {default as toPropertyName} from './toPropertyName';\nexport {default as isReadOnlyProperty} from './isReadOnlyProperty';\nexport {default as shouldSetAttribute} from './shouldSetAttribute';\nexport {default as shouldSetProperty} from './shouldSetProperty';\nexport {default as beforeNextTick} from './beforeNextTick';\nexport {default as measure} from './measure';\nexport {default as selectablePropertyResolver} from './selectablePropertyResolver';\nexport {default as triggerComponentUpdates} from './triggerComponentUpdates';\nexport {default as triggerPropertyChangeAction} from './triggerPropertyChangeAction';\nexport {default as updateSelectedPropertyMappings} from './updateSelectedPropertyMappings';\nexport {default as updateResolvedSelectedPropertyMappings} from './updateResolvedSelectedPropertyMappings';\nexport {default as createLifecycleFunctions} from './createLifecycleFunctions';\nexport {emitNowUiEvent} from './emitNowUiEvent';\nexport {default as camelCaseProperties} from './camelCaseProperties';\nexport {default as unescapeReservedCharacters} from './unescapeReservedCharacters';\nexport {default as isHoisted} from './isHoisted';\nexport {getHoistTarget} from './getHoistTarget';\nexport {default as getRootNode} from './getRootNode';\nexport {default as applyMetrics} from './applyMetrics';\nexport {default as resolveComputedProperties} from './resolveComputedProperties';\nexport {default as computeProperties} from './computeProperties';\nexport {normalizeActionMeta} from './normalizeActionMeta';\nexport {default as intersectionObserver} from './intersectionObserver';\nexport {default as applyIntersectStyles} from './applyIntersectStyles';\nexport {declarativeOperations} from './operators';\nexport {default as shouldOptOutOfDeepCompareForPage} from './shouldOptOutOfDeepCompareForPage';\nexport {default as styleSheetsContentCache} from './styleSheetsContentCache';\nexport {default as resolveStylesheetsContent} from './resolveStylesheetsContent';\nexport {default as markComponentInteractive} from './markComponentInteractive';\nexport {default as createOnStateChangeArgs} from './createOnStateChangeArgs';\nexport {default as getAncestorNode} from './getAncestorNode';\nexport {\n\tsetUpdateConfigResolver,\n\taddUpdateCustomElementObserver,\n\tunstableUpdateCustomElement\n} from './updateCustomElement';\nexport {default as getSpanOptions} from './getSpanOptions';\nexport {default as resolveParentTraceId} from './resolveParentTraceId';\nexport {default as styleSheetsRequestCache} from './styleSheetsRequestCache';\nexport {default as parseForSpan} from './getSpanPayload';\n", "import log from '../log';\nimport {allLogTypes as logTypes} from '@servicenow/ui-internal';\n\nfunction isAlphaNumeric(str) {\n\treturn /^[a-z]+[a-z0-9]*$/i.test(str);\n}\n\nfunction assertValidPropertyNames(properties) {\n\tif (process.env.NODE_ENV === 'development') {\n\t\tconst {length: propertiesCount} = properties;\n\t\tfor (let i = 0; i < propertiesCount; i++) {\n\t\t\tconst property = properties[i];\n\t\t\tif (isAlphaNumeric(property) === false) {\n\t\t\t\tlog(`Invalid property name ${property}`, {\n\t\t\t\t\tlevel: logTypes.ERROR,\n\t\t\t\t\torigin: 'assertValidPropertyNames'\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\treturn true;\n}\n\nexport default assertValidPropertyNames;\n", "const shouldReturnEmptyString = (schema = {}) =>\n\tschema.type === 'string' ||\n\t(Array.isArray(schema.type) && schema.type.indexOf('string') !== -1) ||\n\t(schema.oneOf && schema.oneOf.find(({type}) => type === 'string'));\n\n/**\n * @private\n * @param {*} value\n * @param {*} defaultValue\n * @returns resolved safe string value\n */\nconst fetchSafeStringValue = (value, defaultValue) => {\n\tif (value || defaultValue === undefined) return value;\n\n\treturn defaultValue;\n};\n\n/**\n * @private\n * @param {*} propertyDefinition\n * @param {*} values\n * @param {*} defaultValue\n * @returns resolved value\n **/\nconst resolveValue = (propertyDefinition, values, defaultValue) => {\n\tconst {length: valueCount} = values;\n\tvar hasSchema = propertyDefinition?.schema;\n\n\tfor (let i = 0; i < valueCount; i++) {\n\t\tconst value = values[i];\n\t\tif (typeof value === 'string') {\n\t\t\tif (!hasSchema) return fetchSafeStringValue(value, defaultValue);\n\t\t\telse if (\n\t\t\t\tvalue.length ||\n\t\t\t\t(propertyDefinition.schema && shouldReturnEmptyString(propertyDefinition.schema))\n\t\t\t)\n\t\t\t\treturn value;\n\t\t} else {\n\t\t\tif (value !== undefined && !propertyDefinition.readOnly) return value;\n\t\t}\n\t}\n\n\treturn defaultValue;\n};\n\nexport default function resolveProperties(\n\tstate = {properties: {}},\n\tpropertyDefinitions,\n\tinstanceProperties = {}\n) {\n\tconst resolvedProperties = {};\n\n\tfor (const k in propertyDefinitions) {\n\t\tresolvedProperties[k] = resolveValue(\n\t\t\tpropertyDefinitions[k],\n\t\t\t[instanceProperties[k], state.properties[k]],\n\t\t\tpropertyDefinitions[k].default\n\t\t);\n\t}\n\n\treturn resolvedProperties;\n}\n", "import {DEFAULT_RENDERER} from '../defaults';\nimport {get} from '@servicenow/ui-internal';\n\nexport default function resolveRenderer(config = {}) {\n\tconst type = get(config, 'renderer.type', config.type || DEFAULT_RENDERER.type);\n\tconst coeffects = get(config, 'renderer.coeffects', null);\n\tconst transformProps = get(\n\t\tconfig,\n\t\t'renderer.transformProps',\n\t\tconfig.transformProps || DEFAULT_RENDERER.transformState\n\t);\n\tconst transformState = get(\n\t\tconfig,\n\t\t'renderer.transformState',\n\t\tconfig.transformState || transformProps\n\t);\n\tconst view = get(config, 'renderer.view', config.view || DEFAULT_RENDERER.view);\n\n\treturn {\n\t\ttype,\n\t\ttransformState,\n\t\tview,\n\t\tcoeffects\n\t};\n}\n", "import renderer from '@servicenow/ui-renderer-default';\n\nexport const DEFAULT_RENDERER = {\n\ttype: renderer,\n\ttransformState: state => state,\n\tview: () => null\n};\n", "import {createRef} from '@servicenow/ui-internal';\nimport onStateChange from './onStateChange';\nimport onDisconnect from './onDisconnect';\nimport createAriaRef from './createAriaRef';\nimport createSlot from './createSlot';\nimport createElement from './createElement';\nimport createElementFromNode from './createElementFromNode';\nimport createElementFromString from './createElementFromString';\nimport dangerouslyCreateElementFromString from './dangerouslyCreateElementFromString';\nimport Fragment from './fragment';\n\nexport default {\n\tcreateSlot,\n\tcreateElement,\n\tcreateElementFromNode,\n\tcreateElementFromString,\n\tdangerouslyCreateElementFromString,\n\tcreateRef,\n\tonDisconnect,\n\tonStateChange,\n\tFragment\n};\n\nexport {\n\tcreateAriaRef,\n\tcreateSlot,\n\tcreateElement,\n\tcreateElementFromNode,\n\tcreateElementFromString,\n\tdangerouslyCreateElementFromString,\n\tcreateRef,\n\tFragment\n};\n", "import * as uiAnalyticsConsumer from '@servicenow/ui-analytics-consumer';\nimport {\n\tcreateInteractionId,\n\tsetInteractionId,\n\tmark,\n\ttypes as metrics\n} from '@servicenow/ui-metrics';\nimport {\n\terrorTypes,\n\tlocations,\n\ttoLower,\n\tallLogTypes as logTypes,\n\tVARIABLES,\n\tEXISTING_SHADOW_ROOT_ON_CREATE,\n\tgetSpanOptions\n} from '@servicenow/ui-internal';\nimport {patch, hydrate} from './utils';\nimport {VNODE, INTERACTION_ID} from './symbols';\nimport createElementFromNode, {\n\tcreateElementFromServerSideRenderedNode\n} from './createElementFromNode';\nimport log from './log';\n\nconst SPAN_ATTR_INTERACTION_ID = 'interactionId';\nconst SPAN_ATTR_RENDERER_TYPE = 'renderer.type';\nconst RENDERER_SNABBDOM = 'snabbdom';\n\nconst {tracer} = uiAnalyticsConsumer;\nconst noop = () => null;\n\nconst helperNoop = Object.assign(noop, {\n\tdispatch: noop,\n\tupdateState: noop,\n\tupdateProperties: noop\n});\n\n/**\n * Renders a view using Snabbdom\n * @method render\n * @param {HTMLElement} element Element to append rendered view to\n * @param {Function} handler Render function\n * @param {Object} [props = {}] Optional properties object\n * @param {Object } [helpers] Optional object containing helpful functions, such as dispatch, updateState, and updateProperties\n * @param {Function} [helpers.dispatch] Optional function for dispatching actions\n * @param {Function} [helpers.updateState] Optional function for updating component state\n * @param {Function} [helpers.updateProperties] Optional function for updating component properties\n * @param {String} [interactionId] Optional identifier used by ui-metrics for instrumentation\n * @returns {VNode}\n */\nexport default function onStateChange(\n\telement,\n\thandler,\n\tprops = {},\n\thelpers = helperNoop,\n\tinteractionId = createInteractionId()\n) {\n\t// The renderer is sometimes used to render DOM to native elements, typically in test fixtures\n\t// or example code.  Since we're not in a shadowRoot, we're not in a framework element, we\n\t// shouldn't mark as context is not complete, e.g. componentId, componentName, etc are missing\n\t// from `element.host`.\n\tconst isShadowRoot = element instanceof ShadowRoot;\n\tconst getHostVariables = () => element?.host?.[VARIABLES];\n\n\ttry {\n\t\tconst result = handler(props, helpers);\n\t\tconst serverSideRendered = getHostVariables()?.[EXISTING_SHADOW_ROOT_ON_CREATE];\n\t\tconst prev =\n\t\t\telement[VNODE] ||\n\t\t\t(serverSideRendered\n\t\t\t\t? createElementFromServerSideRenderedNode(element)\n\t\t\t\t: createElementFromNode(element));\n\t\tconst styles = [];\n\t\tconst {children} = prev;\n\t\tconst {length: childrenCount} = children;\n\t\tfor (let i = 0; i < childrenCount; i++) {\n\t\t\tconst child = children[i];\n\t\t\tif (\n\t\t\t\tchild &&\n\t\t\t\ttypeof child.sel === 'string' &&\n\t\t\t\t(child.sel.startsWith('style') || child.sel.startsWith('link'))\n\t\t\t)\n\t\t\t\tstyles.push(child);\n\t\t}\n\n\t\tconst next = {\n\t\t\t...prev,\n\t\t\tchildren: [].concat(result, styles)\n\t\t};\n\n\t\tconst {host = {}} = element;\n\t\thost[INTERACTION_ID] = interactionId; // eslint-disable-line no-param-reassign\n\t\tif (isShadowRoot) mark(host, interactionId, metrics.PATCH_START, {location: locations.VIEW});\n\n\t\tif (isShadowRoot) mark(host, interactionId, metrics.PATCH_END, {location: locations.VIEW});\n\n\t\tlet resultVnode = element[VNODE];\n\t\tif (!element[VNODE] && result && serverSideRendered) {\n\t\t\tconst {error} = hydrate(prev, next);\n\t\t\tif (!error) {\n\t\t\t\tresultVnode = next;\n\t\t\t} else {\n\t\t\t\tconst tagName = toLower(host.tagName);\n\t\t\t\tconst componentId = host.getAttribute('component-id');\n\n\t\t\t\tlog(\n\t\t\t\t\t`Error occurred while hydrating <${tagName} component-id=\"${componentId}\"/>. Mismatch between server rendered: ${error.server} and client rendered: ${error.client}. Falling back to patching the DOM.`,\n\t\t\t\t\t{origin: 'hydrate'}\n\t\t\t\t);\n\t\t\t\tresultVnode = patch(prev, {\n\t\t\t\t\t...prev,\n\t\t\t\t\tchildren: []\n\t\t\t\t});\n\t\t\t\tresultVnode = patch(resultVnode, next);\n\t\t\t}\n\t\t} else {\n\t\t\ttracer.startActiveSpan(\n\t\t\t\t'PATCH',\n\t\t\t\t{\n\t\t\t\t\t...getSpanOptions(host),\n\t\t\t\t\tkind: 3\n\t\t\t\t},\n\t\t\t\tactiveSpan => {\n\t\t\t\t\tactiveSpan.setAttribute(SPAN_ATTR_RENDERER_TYPE, RENDERER_SNABBDOM);\n\t\t\t\t\tactiveSpan.setAttribute(SPAN_ATTR_INTERACTION_ID, interactionId);\n\t\t\t\t\tresultVnode = patch(prev, next);\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\n\t\telement[VNODE] = resultVnode; // eslint-disable-line no-param-reassign\n\t\tdelete host[INTERACTION_ID]; // eslint-disable-line no-param-reassign\n\n\t\treturn resultVnode;\n\t} catch (e) {\n\t\tconst {host = {}} = element;\n\t\tconst metadata = setInteractionId({internal: true}, interactionId);\n\n\t\tif (isShadowRoot) mark(host, interactionId, metrics.ERROR, {location: locations.VIEW});\n\n\t\thelpers.dispatch(\n\t\t\terrorTypes.COMPONENT_ERROR_THROWN,\n\t\t\t{\n\t\t\t\thost,\n\t\t\t\tlocation: locations.VIEW,\n\t\t\t\terror: e,\n\t\t\t\tdetails: {boundaryError: true}\n\t\t\t},\n\t\t\tmetadata,\n\t\t\ttrue\n\t\t);\n\n\t\tconst tagName = toLower(host.tagName);\n\t\tconst componentId = host.getAttribute('component-id');\n\n\t\tlog(\n\t\t\t`An Error occurred in <${tagName} component-id=\"${componentId}\"/>. COMPONENT_ERROR_THROWN action type is dispatched with error details.`,\n\t\t\t{error: e, level: logTypes.ERROR, host, origin: 'onStateChange'}\n\t\t);\n\n\t\treturn createElementFromNode(element);\n\t}\n}\n", "export {default as formatProps} from './formatProps';\nexport {default as formatChildren} from './formatChildren';\nexport {default as flat} from './flat';\nexport {default as patch} from './patch';\nexport {default as validateProps} from './validateProps';\nexport {hydrate} from './hydrate';\n", "import {getConfigItem, configConstants} from '@servicenow/ui-config';\nimport {createInteractionId, mark, types as metrics} from '@servicenow/ui-metrics';\nimport {\n\tsandbox,\n\tlocations,\n\tcamelCase,\n\tmemoize,\n\tallLogTypes as logTypes\n} from '@servicenow/ui-internal';\nimport {\n\tMODULES,\n\tARIA_PREFIX,\n\tATTR_PREFIX,\n\tDATA_PREFIX,\n\tHOOK_PREFIX,\n\tEVENT_PREFIX,\n\tCUSTOM_ELEMENT_ATTRIBUTES,\n\tNON_CUSTOM_ELEMENT_ATTRIBUTES,\n\tACRONYM_PROPS,\n\tDEPRECATED_HTML_ACRONYM_PROPS,\n\tDANGEROUS_HTML_ACRONYM_PROPS_MAP,\n\tDEPRECATED_HTML_ACRONYM_PROPS_MAP\n} from '../constants';\nimport log from '../log';\nimport {INTERACTION_ID} from '../symbols';\n\nconst {MEMOIZE_SNABBDOM_PROP_PARTS} = configConstants;\nconst shouldMemoizePropParts = getConfigItem(MEMOIZE_SNABBDOM_PROP_PARTS);\n\nconst isNil = value => value === null || value === undefined;\n\n// TODO: investigate the benifit and drawbacks of memoizing this.  This does make it faster but at the cost of memory.\nconst memoizedCamelCase = memoize(camelCase, {profileName: 'snabbdom-camelCase'});\nconst isCustomElement = tag => tag.indexOf('-') > 0;\nconst memoizedIsCustomElement = memoize(isCustomElement, {profileName: 'snabbdom-isCustomElement'});\n\nfunction convertToLoadedEvent(value) {\n\tconst [fn, ...args] = value;\n\treturn (event, vnode) => {\n\t\tfn.apply(vnode, [...args, event, vnode]);\n\t};\n}\n\nconst getPropKeyParts = key => {\n\tconst index = key.indexOf('-');\n\tconst prefix = index > 0 ? key.substring(0, index) : null;\n\tconst name =\n\t\tprefix === ATTR_PREFIX || DATA_PREFIX || HOOK_PREFIX || EVENT_PREFIX\n\t\t\t? key.slice(index + 1)\n\t\t\t: key;\n\n\treturn {index, prefix, name};\n};\n\nconst memoizedGetPropKeyParts = shouldMemoizePropParts\n\t? memoize(getPropKeyParts, {profileName: 'snabbdom-getPropKeyParts'})\n\t: getPropKeyParts;\n\n/**\n * Move props into the proper module fields so they can properly be handled by modules registered with snabbdom.\n * @private\n * @method formatProps\n * @param tagName element name\n * @param {object} props Properties to format by prefixes\n * @returns {{hook: {}, ref: {}, now-aria-ref: {}, on: {}, style: {}, class: {}, attrs: {}, props: {}, dataset: {}}}\n */\nexport default function formatProps(tagName, props) {\n\tconst result = {\n\t\thook: {},\n\t\tref: null,\n\t\t'now-aria-ref': null,\n\t\ton: {},\n\t\tstyle: {},\n\t\tclass: {},\n\t\tattrs: {},\n\t\tprops: {}\n\t};\n\n\tconst isCustomTag = memoizedIsCustomElement(tagName);\n\n\t// this is the fastest way to iterate over an object's keys:\n\t// https://jsperf.com/object-keys-vs-for-in-with-closure/3\n\tconst keys = Object.keys(props);\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tconst key = keys[i];\n\t\tconst value = props[key];\n\t\tif (key === 'key') {\n\t\t\tresult.key = value;\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst {index: keyIndex, prefix, name: keyName} = memoizedGetPropKeyParts(key);\n\t\tif (keyIndex > 0) {\n\t\t\tif (prefix === ATTR_PREFIX) {\n\t\t\t\tresult.attrs[keyName] = isNil(value) ? false : value;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (prefix === ARIA_PREFIX) {\n\t\t\t\tresult.attrs[key] = isNil(value) ? false : value;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (prefix === DATA_PREFIX) {\n\t\t\t\t// Perf: Defer defining dataset on the resulting vnode as snabbdom will\n\t\t\t\t// otherwise do un-necessary reading from the DOM in the dataset module.\n\t\t\t\tif (!result.dataset) result.dataset = {};\n\n\t\t\t\tresult.dataset[keyName] = value;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (prefix === HOOK_PREFIX && typeof value === 'function') {\n\t\t\t\tconst name = keyName;\n\n\t\t\t\tresult.hook[name] = (vnode, ...rest) => {\n\t\t\t\t\tconst host = vnode.elm && vnode.elm.getRootNode().host;\n\n\t\t\t\t\tif (!host) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\treturn value(vnode, ...rest);\n\t\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\t\tlog(`An Error occured while executing hook-${name}`, {\n\t\t\t\t\t\t\t\terror: e,\n\t\t\t\t\t\t\t\tlevel: logTypes.ERROR,\n\t\t\t\t\t\t\t\torigin: 'formatProps'\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn sandbox(\n\t\t\t\t\t\t(host, vnode, ...rest) => {\n\t\t\t\t\t\t\tconst interactionId = host[INTERACTION_ID] || createInteractionId();\n\t\t\t\t\t\t\tmark(host, interactionId, metrics.HOOK_START, {name, tagName: vnode.elm.tagName});\n\t\t\t\t\t\t\tvalue(vnode, ...rest);\n\t\t\t\t\t\t\tmark(host, interactionId, metrics.HOOK_END, {name, tagName: vnode.elm.tagName});\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\targs: [host, vnode, ...rest],\n\t\t\t\t\t\t\tdispatch: host.helpers,\n\t\t\t\t\t\t\thost,\n\t\t\t\t\t\t\tlocation: locations.VIEW,\n\t\t\t\t\t\t\tdetails: {name},\n\t\t\t\t\t\t\tlog\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t};\n\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Backwards compatibility for snabbdom's `loaded event` feature:\n\t\t\t//\n\t\t\t//   on-click={[function handler() {}, a, b]}\n\t\t\t//\n\t\t\t// would automatically bind `a` and `b` as the first args to the handler:\n\t\t\t//\n\t\t\t//   handler(a, b, event, vnode);\n\t\t\t//\n\t\t\t// This was supported in snabbdom@0.7 but removed in snabbdom@2.0\n\t\t\t// https://github.com/snabbdom/snabbdom/pull/804\n\t\t\tif (\n\t\t\t\tprefix === EVENT_PREFIX &&\n\t\t\t\tArray.isArray(value) &&\n\t\t\t\ttypeof value[0] === 'function' &&\n\t\t\t\tvalue.length > 1\n\t\t\t) {\n\t\t\t\tresult.on[keyName] = convertToLoadedEvent(value);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (MODULES.includes(prefix)) {\n\t\t\t\tresult[prefix][keyName] = value;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\tif (MODULES.includes(key)) {\n\t\t\tresult[key] = value;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (isCustomTag) {\n\t\t\tif (CUSTOM_ELEMENT_ATTRIBUTES.includes(key)) {\n\t\t\t\tresult.attrs[key] = isNil(value) ? false : value;\n\t\t\t\tif (!result.key && key === 'component-id') result.key = value;\n\t\t\t}\n\t\t\tif (process.env.NODE_ENV !== 'production') {\n\t\t\t\tconst lowerKey = memoizedCamelCase(key).toLowerCase();\n\t\t\t\tif (\n\t\t\t\t\tNON_CUSTOM_ELEMENT_ATTRIBUTES.includes(lowerKey) &&\n\t\t\t\t\t!NON_CUSTOM_ELEMENT_ATTRIBUTES.includes(key)\n\t\t\t\t) {\n\t\t\t\t\tlog(\n\t\t\t\t\t\t`For tag <${tagName}>: the property '${key}' matches the standard HTML5 attribute '${lowerKey}'. Please use standard HTML attributes & avoid props matching standard HTML attributes`,\n\t\t\t\t\t\t{level: logTypes.WARN, tagName}\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tif (NON_CUSTOM_ELEMENT_ATTRIBUTES.includes(key))\n\t\t\t\tresult.attrs[key] = isNil(value) ? false : value;\n\t\t}\n\n\t\tif (ACRONYM_PROPS.includes(key)) {\n\t\t\tif (DEPRECATED_HTML_ACRONYM_PROPS.includes(key)) {\n\t\t\t\tlog(`${key} deprecated, replace with ${DEPRECATED_HTML_ACRONYM_PROPS_MAP[key]}.`, {\n\t\t\t\t\tlevel: logTypes.WARN,\n\t\t\t\t\torigin: 'formatProps'\n\t\t\t\t});\n\t\t\t}\n\t\t\tresult.props[key] = value;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (\n\t\t\tDANGEROUS_HTML_ACRONYM_PROPS_MAP[key] &&\n\t\t\ttypeof value === 'object' &&\n\t\t\tvalue.__html !== undefined\n\t\t) {\n\t\t\tresult.props[DANGEROUS_HTML_ACRONYM_PROPS_MAP[key]] = value.__html;\n\t\t\tdelete result.attrs[key];\n\t\t\tcontinue;\n\t\t}\n\n\t\tresult.props[memoizedCamelCase(key)] = value;\n\t}\n\n\treturn result;\n}\n", "export const ARIA_PREFIX = 'aria';\nexport const ATTR_PREFIX = 'attr';\nexport const DATA_PREFIX = 'data';\nexport const HOOK_PREFIX = 'hook';\nexport const EVENT_PREFIX = 'on';\n\nexport const MODULES = [\n\t'hook',\n\t'ref',\n\t'now-aria-ref',\n\t'on',\n\t'style',\n\t'class',\n\t'attrs',\n\t'props',\n\t'dataset'\n];\n\nexport const ACRONYM_PROPS = ['innerHTML', 'outerHTML'];\nexport const DEPRECATED_HTML_ACRONYM_PROPS = ['innerHTML', 'outerHTML'];\nexport const DEPRECATED_HTML_ACRONYM_PROPS_MAP = {\n\tinnerHTML: 'dangerouslySetInnerHTML',\n\touterHTML: 'dangerouslySetOuterHTML'\n};\nexport const DANGEROUS_HTML_ACRONYM_PROPS_MAP = {\n\tdangerouslySetInnerHTML: 'innerHTML',\n\tdangerouslySetOuterHTML: 'outerHTML'\n};\n\nexport const APPEND_TO_PAYLOAD = 'append-to-payload';\nexport const APPEND_TO_META = 'append-to-meta';\n\nexport const BASE_ATTRIBUTES = [\n\t'path',\n\t'context',\n\t'context-modifier',\n\t'key',\n\t'alt',\n\t'async',\n\t'autocomplete',\n\t'autofocus',\n\t'autoplay',\n\t'capture',\n\t'checked',\n\t'default',\n\t'defer',\n\t'disabled',\n\t'draggable',\n\t'dropzone',\n\t'hidden',\n\t'href',\n\t'hreflang',\n\t'http-equiv',\n\t'icon',\n\t'id',\n\t'is',\n\t'maxlength',\n\t'minlength',\n\t'media',\n\t'method',\n\t'multiple',\n\t'name',\n\t'placeholder',\n\t'readonly',\n\t'rel',\n\t'required',\n\t'reversed',\n\t'role',\n\t'rows',\n\t'rowspan',\n\t'selected',\n\t'slot',\n\t'src',\n\t'tabindex',\n\t'target',\n\t'title',\n\t'type',\n\t'value'\n];\n\nexport const CUSTOM_ELEMENT_ATTRIBUTES = [\n\t...BASE_ATTRIBUTES,\n\t'component-id',\n\t'listen-to',\n\t'dangerouslySetInnerHTML',\n\t'dangerouslySetOuterHTML',\n\t'suppressContentEditableWarning',\n\t'suppressHydrationWarning'\n];\n\nexport const NON_CUSTOM_ELEMENT_ATTRIBUTES = [\n\t...BASE_ATTRIBUTES,\n\t'accept',\n\t'accept-charset',\n\t'accesskey',\n\t'action',\n\t'align',\n\t'allow',\n\t'autocapitalize',\n\t'background',\n\t'bgcolor',\n\t'border',\n\t'buffered',\n\t'challenge',\n\t'charset',\n\t'cite',\n\t'code',\n\t'codebase',\n\t'color',\n\t'cols',\n\t'colspan',\n\t'content',\n\t'contenteditable',\n\t'contextmenu',\n\t'controls',\n\t'coords',\n\t'crossorigin',\n\t'datetime',\n\t'decoding',\n\t'dir',\n\t'dirname',\n\t'download',\n\t'enctype',\n\t'for',\n\t'form',\n\t'formaction',\n\t'formenctype',\n\t'formmethod',\n\t'formnovalidate',\n\t'formtarget',\n\t'headers',\n\t'height',\n\t'high',\n\t'integrity',\n\t'intrinsicsize',\n\t'inputmode',\n\t'ismap',\n\t'itemprop',\n\t'keytype',\n\t'kind',\n\t'label',\n\t'lang',\n\t'language',\n\t'list',\n\t'loop',\n\t'low',\n\t'manifest',\n\t'max',\n\t'min',\n\t'muted',\n\t'novalidate',\n\t'open',\n\t'optimum',\n\t'pattern',\n\t'ping',\n\t'poster',\n\t'preload',\n\t'radiogroup',\n\t'referrerpolicy',\n\t'sandbox',\n\t'scope',\n\t'scoped',\n\t'shape',\n\t'size',\n\t'sizes',\n\t'span',\n\t'spellcheck',\n\t'srcdoc',\n\t'srclang',\n\t'srcset',\n\t'start',\n\t'step',\n\t'summary',\n\t'translate',\n\t'usemap',\n\t'width',\n\t'wrap'\n];\n", "import {createLogger} from '@servicenow/ui-internal';\n\nexport default createLogger({\n\tmodule: '@servicenow/ui-renderer-snabbdom'\n});\n", "export const VNODE = Symbol('__vnode__');\nexport const INTERACTION_ID = Symbol('__interaction_id__');\n", "/**\n * Formats children to be rendered by snabbdom\n * - recursively flatten + compact arrays\n * - filter out boolean/Symbol values (snabbdom throws on these)\n */\n\nfunction recurse(arr, result) {\n\tconst {length} = arr;\n\tfor (let i = 0; i < length; i++) {\n\t\tconst item = arr[i];\n\t\tif (Array.isArray(item)) recurse(item, result);\n\t\telse if (\n\t\t\ttypeof item !== 'boolean' &&\n\t\t\ttypeof item !== 'symbol' &&\n\t\t\titem !== null &&\n\t\t\titem !== undefined\n\t\t)\n\t\t\tresult.push(item);\n\t}\n\n\treturn result;\n}\n\nexport default function formatChildren(arr) {\n\treturn recurse(arr, []);\n}\n", "// this is required for envs that don't support arr.flat, i.e., JSDOM\n// babel polyfill doesn't package flat polyfill\nexport default function flat(arr) {\n\tif (arr.flat) return arr.flat(Infinity);\n\n\treturn arr.reduce(function reducer(acc, val) {\n\t\tif (Array.isArray(val)) val.reduce(reducer, acc);\n\t\telse acc.push(val);\n\t\treturn acc;\n\t}, []);\n}\n", "import {init} from 'snabbdom/init';\nimport {classModule} from 'snabbdom/modules/class';\nimport {styleModule} from 'snabbdom/modules/style';\nimport {eventListenersModule} from 'snabbdom/modules/eventlisteners';\nimport {datasetModule} from 'snabbdom/modules/dataset';\nimport {denyUnlessSigned} from 'snabbdom-signature';\nimport {ref, props, attributes} from '../modules';\n\nconst patch = init([\n\tprops,\n\tclassModule,\n\tstyleModule,\n\teventListenersModule,\n\tattributes,\n\tdatasetModule,\n\tref,\n\tdenyUnlessSigned\n]);\n\nexport default patch;\n", null, null, null, null, null, null, null, null, "export {default as ref} from './ref';\nexport {default as props} from './props';\nexport {default as attributes} from './attributes';\n", "/**\n * Assigns or executes a ref.\n * @private\n * @param vnode\n */\nconst getRef = vnode => {\n\tconst ref = vnode.data.ref; // eslint-disable-line prefer-destructuring\n\n\tif (ref && typeof ref === 'function') ref(vnode.elm);\n\telse if (ref && typeof ref === 'object') ref.current = vnode.elm;\n};\n\nexport default {\n\tcreate: (oldVnode, vnode) => getRef(vnode),\n\tupdate: (oldVnode, vnode) => getRef(vnode),\n\tdestroy: vnode => getRef(vnode)\n};\n", "// This is a modified version of the snabbdom props module. Unlike the upstream\n// module, this implementation does set removed properties to `undefined`\nconst updateProps = (oldVnode, vnode) => {\n\tlet {\n\t\tdata: {props: oldProps}\n\t} = oldVnode;\n\tlet {\n\t\tdata: {props},\n\t\t// eslint-disable-next-line prefer-const\n\t\telm\n\t} = vnode;\n\n\tif (!oldProps && !props) return;\n\n\tif (oldProps === props) return;\n\n\toldProps = oldProps || {};\n\tprops = props || {};\n\n\tfor (const key in oldProps) {\n\t\tif (!props.hasOwnProperty(key)) elm[key] = key === 'className' ? '' : undefined;\n\t}\n\n\tfor (const key in props) {\n\t\tconst cur = props[key];\n\t\tconst old = oldProps[key];\n\t\tif (old !== cur && (key !== 'value' || elm[key] !== cur)) elm[key] = cur;\n\t}\n};\n\nexport default {\n\tcreate: updateProps,\n\tupdate: updateProps\n};\n", "import {\n\tNOW_SKIP_RENDER_UNTIL_PRESENT_ATTR,\n\tNOW_ID_ATTRIBUTE,\n\tCOMPONENT_ID_ATTRIBUTE,\n\tRESOLVED_PROPS_ATTRIBUTE\n} from '@servicenow/ui-internal';\n\nconst xlinkNS = 'http://www.w3.org/1999/xlink';\nconst xmlNS = 'http://www.w3.org/XML/1998/namespace';\nconst colonChar = 58;\nconst xChar = 120;\n\nconst ATTRIBUTES_TO_PERSIST = [\n\tNOW_SKIP_RENDER_UNTIL_PRESENT_ATTR,\n\tNOW_ID_ATTRIBUTE,\n\tCOMPONENT_ID_ATTRIBUTE,\n\tRESOLVED_PROPS_ATTRIBUTE\n];\n\n// This is a modified version of the snabbdom attributes module, which never removes\n// NOW_SKIP_RENDER_UNTIL_PRESENT_ATTR attribute during the patch.\nfunction updateAttrs(oldVnode, vnode) {\n\tlet {\n\t\tdata: {attrs: oldAttrs}\n\t} = oldVnode;\n\tlet {\n\t\tdata: {attrs},\n\t\t// eslint-disable-next-line prefer-const\n\t\telm\n\t} = vnode;\n\n\tif (!oldAttrs && !attrs) {\n\t\treturn;\n\t}\n\n\tif (oldAttrs === attrs) {\n\t\treturn;\n\t}\n\n\toldAttrs = oldAttrs || {};\n\tattrs = attrs || {};\n\n\tfor (const key in attrs) {\n\t\tconst cur = attrs[key];\n\t\tconst old = oldAttrs[key];\n\t\tif (old !== cur) {\n\t\t\tif (cur === true) {\n\t\t\t\telm.setAttribute(key, '');\n\t\t\t} else if (cur === false) {\n\t\t\t\telm.removeAttribute(key);\n\t\t\t} else {\n\t\t\t\tif (key.charCodeAt(0) !== xChar) {\n\t\t\t\t\telm.setAttribute(key, cur);\n\t\t\t\t} else if (key.charCodeAt(3) === colonChar) {\n\t\t\t\t\t// Assume xml namespace\n\t\t\t\t\telm.setAttributeNS(xmlNS, key, cur);\n\t\t\t\t} else if (key.charCodeAt(5) === colonChar) {\n\t\t\t\t\t// Assume xlink namespace\n\t\t\t\t\telm.setAttributeNS(xlinkNS, key, cur);\n\t\t\t\t} else {\n\t\t\t\t\telm.setAttribute(key, cur);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tfor (const key in oldAttrs) {\n\t\t/**\n\t\t * Avoid removing NOW_SKIP_RENDER_UNTIL_PRESENT_ATTR during vdom patch/hydration,\n\t\t * because it could be removed before it is consumed by the component. For example:\n\t\t * <component-a>\n\t\t *  #shadow-root\n\t\t *  <component-b now-skip-render-until-present=\"foo,bar\">\n\t\t *  </component-b>\n\t\t * </component-a>\n\t\t * If we don't persist this attribute, when component-a is hydrated, it will be removed\n\t\t * before component-b consumes it.\n\t\t *\n\t\t * Avoid removing now-id and component-id during vdom patch/hydration.\n\t\t * Take the above example again, when we hydrate component-a, the component-b already has\n\t\t * component-id and now-id set on it by component-b's setComponentId(). So the initial\n\t\t * component-b's vnode in component-a's vdom tree will have these attributes. But the\n\t\t * component-a's vdom tree generated by the seismic view function doesn't have these attributes,\n\t\t * causing the trash of those two attributes during the patch process.\n\t\t */\n\t\tif (ATTRIBUTES_TO_PERSIST.includes(key)) {\n\t\t\tcontinue;\n\t\t}\n\t\tif (!(key in attrs)) {\n\t\t\telm.removeAttribute(key);\n\t\t}\n\t}\n}\nexport default {create: updateAttrs, update: updateAttrs};\n", "import {APPEND_TO_PAYLOAD} from '../constants';\nimport log from '../log';\n\nexport default function validateProps(props) {\n\tif (!props[APPEND_TO_PAYLOAD]) return props;\n\n\tconst {[APPEND_TO_PAYLOAD]: appendToPayload, ...nonAppendProps} = props;\n\tif (appendToPayload && typeof appendToPayload !== 'object') {\n\t\tlog(`Expected ${APPEND_TO_PAYLOAD} property to be an Object. Found ${appendToPayload}`, {\n\t\t\torigin: 'validateProps'\n\t\t});\n\t\treturn nonAppendProps;\n\t}\n\n\treturn props;\n}\n", "import {vnode} from 'snabbdom/vnode';\nimport {eventListenersModule} from 'snabbdom/modules/eventlisteners';\nimport {styleModule} from 'snabbdom/modules/style';\nimport {classModule} from 'snabbdom/modules/class';\nimport {datasetModule} from 'snabbdom/modules/dataset';\nimport {props, ref, attributes} from '../modules';\nimport patch from './patch';\n\nconst TAG_PLACEHOLDER = 'sn-ssr-placeholder';\n\nconst emptyNode = vnode('', {}, [], undefined, undefined);\nconst modules = [\n\tprops,\n\tattributes,\n\tclassModule,\n\tstyleModule,\n\teventListenersModule,\n\tdatasetModule,\n\tref\n];\n\nexport function hydrate(oldVnode, vnode) {\n\t// placeholder is temporary element,\n\t// eventually updated with intended content when available\n\tif (oldVnode?.sel === TAG_PLACEHOLDER) {\n\t\tpatch(oldVnode, vnode);\n\t\treturn {error: null};\n\t}\n\n\tif (vnode.sel && oldVnode.sel !== vnode.sel) {\n\t\treturn {error: {server: oldVnode.sel, client: vnode.sel}};\n\t}\n\tif (vnode.text && oldVnode.text !== vnode.text) {\n\t\treturn {error: {server: `\"${oldVnode.text}\"`, client: `\"${vnode.text}\"`}};\n\t}\n\tif (vnode.children) {\n\t\tif (oldVnode.children.length !== vnode.children.length) {\n\t\t\treturn {\n\t\t\t\terror: {\n\t\t\t\t\tserver: `${oldVnode.children.length} children`,\n\t\t\t\t\tclient: `${vnode.children.length} children`\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\tfor (let i = 0; i < oldVnode.children.length; i++) {\n\t\t\tconst {error} = hydrate(oldVnode.children[i], vnode.children[i]);\n\t\t\tif (error) {\n\t\t\t\treturn {error};\n\t\t\t}\n\t\t}\n\t}\n\n\tvnode.elm = oldVnode.elm;\n\tif (vnode.data?.hook?.init) {\n\t\tvnode.data.hook.init(vnode);\n\t}\n\tif (vnode.data?.hook?.create) {\n\t\tvnode.data.hook.create(emptyNode, vnode);\n\t}\n\tif (vnode.data?.hook?.insert) {\n\t\tvnode.data.hook.insert(vnode);\n\t}\n\t// Ensure vnode.data and vnode.data.attrs exist so modules can clean up old attributes\n\t// even when the new vnode has no data (e.g., <div></div>)\n\tif (!vnode.data) {\n\t\tvnode.data = {attrs: {}};\n\t} else if (!vnode.data.attrs) {\n\t\tvnode.data.attrs = {};\n\t}\n\tmodules.forEach(module => {\n\t\tmodule.create(oldVnode, vnode);\n\t});\n\n\treturn {error: null};\n}\n", "import {toVNode} from 'snabbdom/tovnode';\nimport {toVNodeFromServerSideRenderedNode} from './utils/toVNodeFromServerSideRenderedNode';\nimport {sign} from 'snabbdom-signature';\n\n/**\n * Creates an element for the virtual DOM from an existing DOM node\n * @method createElementFromNode\n * @param {Node} node DOM node to convert\n * @returns {VNode} The vnode to use in the virtual DOM\n */\nexport default function createElementFromNode(node) {\n\tconst vnode = sign(toVNode(node));\n\tfixNamespace(vnode); // fixes issue with missing namespace for svgs: https://github.com/snabbdom/snabbdom/issues/388\n\treturn vnode;\n}\n\n/**\n * Create a vdom tree from an existing DOM node which has been server-side rendered\n * @method createElementFromServerSideRenderedNode\n * @param {Node} node DOM node to convert\n * @returns {VNode} The vnode to use in the virtual DOM\n */\nexport function createElementFromServerSideRenderedNode(node) {\n\tconst vnode = toVNodeFromServerSideRenderedNode(node);\n\tif (\n\t\tnode instanceof DocumentFragment &&\n\t\tvnode.children.length === 0 &&\n\t\tnode.childNodes.length > 0\n\t) {\n\t\t// snabbdom still doesn't handle DocumentFragment correctly\n\t\t// so we need to manually add the children\n\t\tconst {length: childrenCount} = node.childNodes;\n\t\tfor (let i = 0; i < childrenCount; i++) {\n\t\t\tconst childVNode = toVNodeFromServerSideRenderedNode(node.childNodes[i]);\n\t\t\t// skip the nullified child node if it has non-falsy NOW_EXCLUDED_FROM_HYDRATION_ATTR attribute\n\t\t\tif (childVNode) {\n\t\t\t\tvnode.children.push(childVNode);\n\t\t\t}\n\t\t}\n\t}\n\tconst signedVnode = sign(vnode);\n\tfixNamespace(signedVnode); // fixes issue with missing namespace for svgs: https://github.com/snabbdom/snabbdom/issues/388\n\treturn signedVnode;\n}\n\nconst fixNamespace = (vnode, xmlns = vnode.data && vnode.data.attrs && vnode.data.attrs.xmlns) => {\n\tconst {children, data} = vnode;\n\n\tif (data && !data.ns && xmlns) data.ns = xmlns;\n\n\tif (children) {\n\t\tconst {length: childrenCount} = children;\n\t\tfor (let i = 0; i < childrenCount; i++) fixNamespace(children[i], xmlns);\n\t}\n};\n", null, "import {vnode} from 'snabbdom/vnode';\nimport {htmlDomApi} from 'snabbdom/htmldomapi';\nimport {NOW_EXCLUDED_FROM_HYDRATION_ATTR} from '@servicenow/ui-internal';\n\n/**\n * This is a modified version of the snabbdom toVNode() to convert server-side rendered nodes to vnodes.\n * - it builds \"sel\" field only from the tagName of the element node,\n *   rather than a combination of selector, id, and class\n * - it assigns the class attribute value to the \"className\" property\n * - it skips the node if it has the NOW_EXCLUDED_FROM_HYDRATION_ATTR attribute\n */\n\nexport function toVNodeFromServerSideRenderedNode(node, domApi) {\n\tconst api = domApi !== undefined ? domApi : htmlDomApi;\n\tlet text;\n\tif (api.isElement(node)) {\n\t\tconst sel = api.tagName(node).toLowerCase();\n\t\tconst attrs = {};\n\t\tconst children = [];\n\t\tlet name;\n\t\tconst elmAttrs = node.attributes;\n\t\tconst elmChildren = node.childNodes;\n\t\tconst props = {};\n\t\tfor (let i = 0, n = elmAttrs.length; i < n; i++) {\n\t\t\tname = elmAttrs[i].nodeName;\n\t\t\tif (name === 'class') {\n\t\t\t\tprops.className = elmAttrs[i].nodeValue;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t/**\n\t\t\t * exclude the node from the vdom tree during hydration if it has non-falsy NOW_EXCLUDED_FROM_HYDRATION_ATTR attribute\n\t\t\t * SSR may render nodes which are not managed by the virtual DOM, for example:\n\t\t\t * <sn-canvas-screen>\n\t\t\t *   #shadow-root\n\t\t\t *   <screen-action-transformer-12345>\n\t\t\t *       <macroponent-abcdef>\n\t\t\t *       </macroponent-abcdef>\n\t\t\t *   </screen-action-transformer-12345>\n\t\t\t * </sn-canvas-screen>\n\t\t\t * The screen action transformer and macroponent are not rendered by the view function of sn-canvas-screen.\n\t\t\t * Instead, they are manually inserted with DOM manipulation. If we convert them into vnodes during hydration,\n\t\t\t * they will be trashed in the snabbdom patch process because the new vdom tree does not contain them.\n\t\t\t * To solve this issue, we add NOW_EXCLUDED_FROM_HYDRATION_ATTR attribute to the nodes that will\n\t\t\t * be excluded from the vdom tree so snabbdom has no visibility of them and thus won't trash them.\n\t\t\t */\n\t\t\tif (name === NOW_EXCLUDED_FROM_HYDRATION_ATTR && elmAttrs[i].nodeValue !== 'false') {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tattrs[name] = elmAttrs[i].nodeValue;\n\t\t}\n\t\tfor (let i = 0, n = elmChildren.length; i < n; i++) {\n\t\t\tconst childVNode = toVNodeFromServerSideRenderedNode(elmChildren[i], domApi);\n\t\t\t// skip the nullified child node if it has non-falsy NOW_EXCLUDED_FROM_HYDRATION_ATTR attribute\n\t\t\tif (childVNode) {\n\t\t\t\tchildren.push(childVNode);\n\t\t\t}\n\t\t}\n\t\treturn vnode(sel, {attrs, props}, children, undefined, node);\n\t} else if (api.isText(node)) {\n\t\ttext = api.getTextContent(node);\n\t\treturn vnode(undefined, undefined, undefined, text, node);\n\t} else if (api.isComment(node)) {\n\t\ttext = api.getTextContent(node);\n\t\treturn vnode('!', {}, [], text, node);\n\t}\n\treturn vnode('', {}, [], undefined, node);\n}\n", "import {patch} from './utils';\nimport {VNODE} from './symbols';\n\n/**\n * Patches an empty tree to a container so we run hooks and cleanup\n * @param {HTMLElement} element Element being disconnected\n * @param {Function} [dispatch] function contextualized to the element\n * @param {Function} [next] function to call after disconnect\n */\nexport default function onDisconnect(element, dispatch, next = () => null) {\n\tconst prev = element[VNODE];\n\n\tconst styles = [];\n\tconst {children} = prev;\n\tconst {length: childrenCount} = children;\n\tfor (let i = 0; i < childrenCount; i++) {\n\t\tconst child = children[i];\n\t\tif (\n\t\t\tchild &&\n\t\t\ttypeof child.sel === 'string' &&\n\t\t\t(child.sel.startsWith('style') || child.sel.startsWith('link'))\n\t\t)\n\t\t\tstyles.push(child);\n\t}\n\n\tconst nextEl = {\n\t\t...prev,\n\t\tchildren: styles\n\t};\n\n\tpatch(prev, nextEl, {disconnect: true});\n\n\tdelete element[VNODE]; // eslint-disable-line no-param-reassign\n\tnext();\n}\n", "export default function createAriaRef() {\n\t// noop since we've removed the rest of the implementation\n\treturn {};\n}\n", "// @jsx createElement\nimport createElement from './createElement'; // eslint-disable-line no-unused-vars\n\nfunction insertChildern(children, name) {\n\tif (!children) return null;\n\n\tif (children && !name) return children;\n\n\tconst slotted = [];\n\tconst {length: childrenCount} = children;\n\tfor (let i = 0; i < childrenCount; i++) {\n\t\tconst child = children[i];\n\t\tif (name === (child.data && child.data.props && child.data.props.slot)) slotted.push(child);\n\t}\n\n\treturn slotted;\n}\n\n/**\n * Creates a slot using snabbdom\n * @method createSlot\n * @param children\n * @param name\n * @returns {*}\n */\nexport default function createSlot(children, name) {\n\treturn <slot name={name}>{insertChildern(children, name)}</slot>;\n}\n", "// TODO (webpack v5): drop the `build/package/` part of these import paths.\n// Snabbdom>=1 uses the package.json#exports field that webpack v4 doesn't know\n// about\n//\n// https://github.com/webpack/webpack/issues/9509\n// https://webpack.js.org/guides/package-exports/\nimport {signingH} from 'snabbdom-signature';\nimport {h as unsignedH} from 'snabbdom/h';\nimport {formatProps, validateProps, flat, formatChildren} from './utils';\n\nconst signedH = signingH(unsignedH);\n\n/**\n * Creates an element for the virtual DOM\n * @method createElement\n * @param {(string|function)} tag Name of the tag or a functional component\n * @param {object} [props] Properties\n * @param {object} [children] Child nodes\n * @returns {*}\n */\nexport default function createElement(tag, props, ...children) {\n\tif (typeof tag === 'function') return tag(props || {}, flat(children));\n\n\treturn signedH(\n\t\ttag,\n\t\tprops ? formatProps(tag, validateProps(props)) : {},\n\t\tformatChildren(children)\n\t);\n}\n", null, "import createElementFromNode from './createElementFromNode';\nimport {allLogTypes as logTypes} from '@servicenow/ui-internal';\nimport log from './log';\n\n/**\n * Creates an element for the virtual DOM from a string of HTML. WARNING: This method does not\n * sanitize the HTML string passed to it. If you use this method you may be vulnerable to\n * XSS attacks if you do not take the right precautions.\n *\n * @method createElementFromString\n * @param {String} html String of html to parse and convert to a vnode\n * @returns {VNode} The vnode to use in the virtual DOM\n */\nexport default function createElementFromString(html) {\n\tlog(\n\t\t'createElementFromString has been deprecated. Please use dangerouslyCreateElementFromString and make sure you are taking the necessary precautions to prevent XSS attacks',\n\t\t{level: logTypes.ERROR, origin: 'createElementFromString'}\n\t);\n\n\tif (!document || !document.createElement) return;\n\n\tconst element = document.createElement('div');\n\telement.innerHTML = html;\n\treturn createElementFromNode(element.firstChild);\n}\n", "import createElementFromNode from './createElementFromNode';\n\n/**\n * Creates an element for the virtual DOM from a string of HTML. WARNING: This method does not\n * sanitize the HTML string passed to it. If you use this method you may be vulnerable to\n * XSS attacks if you do not take the right precautions.\n *\n * @method dangerouslyCreateElementFromString\n * @param {String} html String of html to parse and convert to a vnode\n * @returns {VNode} The vnode to use in the virtual DOM\n */\nexport default function dangerouslyCreateElementFromString(html) {\n\tif (!document || !document.createElement) return;\n\n\tconst element = document.createElement('div');\n\telement.innerHTML = html;\n\treturn createElementFromNode(element.firstChild);\n}\n", "/**\n * Helper component for returning an array of vnodes from a view function\n *\n * @example\n * import {Fragment} from '@servicenow/ui-renderer-snabbdom';\n *\n * function view(state, dispatch) {\n *     return (\n *         <Fragment>\n *             <div>Foo</div>\n *             <div>Bar</div>\n *             <div>Baz</div>\n *         </Fragment>\n *     );\n * }\n *\n * @method Fragment\n * @param props\n * @param children\n * @returns {*}\n */\nexport default function Fragment(props, children) {\n\treturn children;\n}\n", "import snabbdom from '@servicenow/ui-renderer-snabbdom';\n\nexport default snabbdom;\n", "import {toString, get} from '@servicenow/ui-internal';\nimport toAttributeName from './toAttributeName';\nimport {isSelector} from '../property-selectors';\n\nexport default function getInitialPropertyValue(el, key, propertyDefs = {}) {\n\tif (propertyDefs[key] && propertyDefs[key].readOnly) return propertyDefs[key].default;\n\n\tconst property = el[key];\n\tconst attr = toAttributeName(key);\n\tconst unstablePreserveEmptyStr =\n\t\t(propertyDefs[key] && propertyDefs[key].unstablePreserveEmptyStr) || false;\n\n\tif (key !== 'style' && el.hasAttribute(attr) && !isSelector(property)) {\n\t\tlet value = el.getAttribute(attr);\n\t\t// instead of directly using the attribute value as the property intial value,\n\t\t// attrToInitPropTransformer allows transforming the attribute value to the property initial value\n\t\t// so property value can adopt a better data structure rather than just the string literal.\n\t\tif (propertyDefs[key] && propertyDefs[key].attrToInitPropTransformer) {\n\t\t\tvalue = propertyDefs[key].attrToInitPropTransformer({attributeValue: value});\n\t\t}\n\t\tconst preserve =\n\t\t\tunstablePreserveEmptyStr || get(propertyDefs, `[${key}].schema.type`) === 'string';\n\n\t\treturn value || (preserve ? value : true);\n\t}\n\n\t// property.toString() will return [object CSSStyleDeclaration] if the style property is a true style property\n\t// vs. a style object (key, value) that is passed via JSX in the view layer\n\treturn key === 'style'\n\t\t? toString(property) === '[object Object]'\n\t\t\t? property\n\t\t\t: undefined\n\t\t: property;\n}\n", "import {memoize, kebabCase} from '@servicenow/ui-internal';\n\nexport default memoize(\n\tfunction toAttributeName(propName) {\n\t\treturn kebabCase(propName);\n\t},\n\t{profileName: 'toAttributeName'}\n);\n", "import createAddMapping from './createAddMapping';\nimport createRemoveMappings from './createRemoveMappings';\nimport createGetAffected from './createGetAffected';\nimport createGetComponentAffected from './createGetComponentAffected';\nimport createAddResolvedPropertyMapping from './createAddResolvedPropertyMapping';\nimport createAddSelectablePropertyMapping from './createAddSelectablePropertyMapping';\nimport resolvedMappingHasKey from './resolvedMappingHasKey';\nimport getResolvedPropertyValue from './getResolvedPropertyValue';\nimport createRemoveResolvedPropertyMapping from './createRemoveResolvedPropertyMapping';\nimport createAddResolvedPropertyMappingWithKey from './createAddResolvedPropertyMappingWithKey';\n\nconst mappings = {};\nconst resolvedPropertyMappings = new Map();\n\nexport const addMapping = createAddMapping(mappings);\nexport const removeMappings = createRemoveMappings(mappings);\nexport const getAffected = createGetAffected(mappings);\nexport const getComponentAffected = createGetComponentAffected(mappings);\nexport const addResolvedPropertyMapping =\n\tcreateAddResolvedPropertyMapping(resolvedPropertyMappings);\nexport const removeResolvedMapping = createRemoveResolvedPropertyMapping(\n\tresolvedPropertyMappings,\n\tmappings\n);\nexport const addResolvedPropertyMappingWithKey =\n\tcreateAddResolvedPropertyMappingWithKey(resolvedPropertyMappings);\nexport const addSelectableResolvedPropertyMapping =\n\tcreateAddSelectablePropertyMapping(resolvedPropertyMappings);\nexport const resolveMappingHasKey = resolvedMappingHasKey(resolvedPropertyMappings);\nexport const getResolvedProperty = getResolvedPropertyValue(resolvedPropertyMappings);\nexport {default as resolveSelectedProperty} from './resolveSelectedProperty';\nexport {default as resolveSelectedProperties} from './resolveSelectedProperties';\nexport {default as getSelectorParts} from './getSelectorParts';\nexport {default as isSelectableProperty} from './isSelectableProperty';\nexport {default as isSelector} from './isSelector';\nexport {default as updatePropertiesWithSelector} from './updatePropertiesWithSelector';\nexport {default as getPartsForNestedSelectableProps} from './getPartsForNestedSelectableProps';\nexport {default as applyUpdatesForSelectableProps} from './applyUpdatesForSelectableProps';\n\n// Unstable APIs\nexport {default as createUnstableResolvePropertySelectorValue} from './createUnstableResolvePropertySelectorValue';\nexport {default as unstableAddRenderOnPropertySelectorValueChange} from './unstableAddRenderOnPropertySelectorValueChange';\nexport {default as unstableRemoveRenderOnPropertySelectorValueChange} from './unstableRemoveRenderOnPropertySelectorValueChange';\n", "import {PROPERTY_SELECTOR_SIGIL} from '../constants';\n\n/**\n * Create a function for mapping a provider compoent id, property selector, to a consumer component id, property name and path\n * Sample mapping Obj\n * mappings: {\n * \tproviderComponent@providerProp: {\n * \t\tselectorId@selectorProp: 'pathValue'\n * \t}\n * }\n * @function createAddMapping\n * @private\n * @param {Object} mappings\n * @returns {function} - A function for adding a mapping\n */\nexport default function createAddMapping(mappings) {\n\t/**\n\t * @function addMapping\n\t * @private\n\t * @param {Object} providerDetail - A object that will contain providerId, providerPropName, providerPropPath\n\t * @param {Object} consumerDetail - A object that will contain consumerId, consumerPropName\n\t */\n\treturn function addMapping(providerDetail, consumerDetail) {\n\t\tconst {providerId, providerPropName, providerPropPath} = providerDetail;\n\t\tconst {consumerId, consumerPropName} = consumerDetail;\n\t\tconst providerKey = `${providerId}${PROPERTY_SELECTOR_SIGIL}${providerPropName}`;\n\t\tconst consumerKey = `${consumerId}${PROPERTY_SELECTOR_SIGIL}${consumerPropName}`;\n\n\t\tif (!mappings[providerKey]) mappings[providerKey] = {}; // eslint-disable-line no-param-reassign\n\n\t\t// eslint-disable-next-line no-param-reassign\n\t\tmappings[providerKey][consumerKey] = providerPropPath;\n\t};\n}\n", "import {PROPERTY_SELECTOR_SIGIL} from '../constants';\n/**\n * Create a function removing mapped components by component id and optionally property name\n * @function createRemoveMappings\n * @private\n *\n * @param {Object} mappings - A object that will contain mappings\n * @returns {function} - A function for removing mapped components by component id and optionally property name\n */\nexport default mappings =>\n\tfunction removeMappings(elementId, propertyName) {\n\t\tif (elementId && propertyName) {\n\t\t\tfor (const key in mappings) {\n\t\t\t\tconst selectorKey = mappings[key][`${elementId}${PROPERTY_SELECTOR_SIGIL}${propertyName}`];\n\t\t\t\tif (selectorKey === '' || selectorKey)\n\t\t\t\t\tdelete mappings[key][`${elementId}${PROPERTY_SELECTOR_SIGIL}${propertyName}`]; // eslint-disable-line no-param-reassign\n\n\t\t\t\tif (Object.keys(mappings[key]).length === 0) delete mappings[key]; // eslint-disable-line no-param-reassign\n\t\t\t}\n\t\t}\n\n\t\tif (elementId && !propertyName) {\n\t\t\tfor (const key in mappings) {\n\t\t\t\tfor (const subKey in mappings[key]) {\n\t\t\t\t\tconst componentId = subKey.split(PROPERTY_SELECTOR_SIGIL)[0];\n\t\t\t\t\tif (componentId === elementId) delete mappings[key][subKey]; // eslint-disable-line no-param-reassign\n\t\t\t\t}\n\n\t\t\t\tif (Object.keys(mappings[key]).length === 0) delete mappings[key]; // eslint-disable-line no-param-reassign\n\t\t\t}\n\t\t}\n\t};\n", "/* eslint-disable no-param-reassign */\nimport {PROPERTY_SELECTOR_SIGIL} from '../constants';\nimport isSelectableProperty from './isSelectableProperty';\n/**\n * Create a function for getting components affected by a property name and source component id\n * @function createGetAffected\n * @private\n *\n * @param {Object} mappings - A object that will contain mappings\n * @returns {function} - A function for getting components affected by a property name and source component id\n */\nexport default mappings =>\n\tfunction getAffected(propertyName, providerId, componentRegistry, includeSource = true) {\n\t\tconst sourceAffected = includeSource\n\t\t\t? {[`${providerId}${PROPERTY_SELECTOR_SIGIL}${propertyName}`]: ''}\n\t\t\t: {};\n\t\tlet componentsAffected = {\n\t\t\t...mappings[`${providerId}${PROPERTY_SELECTOR_SIGIL}${propertyName}`]\n\t\t};\n\n\t\tif (!Object.keys(componentsAffected).length) return sourceAffected;\n\n\t\tif (!isSelectableProperty(componentRegistry, providerId, propertyName)) return sourceAffected;\n\n\t\t(function getAffectedSelectorChain(componentMap, path = []) {\n\t\t\tfor (const selectorMap in componentMap) {\n\t\t\t\tlet consumerPath = path;\n\t\t\t\tif (mappings[selectorMap]) {\n\t\t\t\t\tif (componentMap[selectorMap]) {\n\t\t\t\t\t\tconsumerPath = consumerPath.concat(componentMap[selectorMap]);\n\t\t\t\t\t}\n\n\t\t\t\t\tconst affected = Object.keys(mappings[selectorMap]).reduce((acc, key) => {\n\t\t\t\t\t\tacc[key] = consumerPath.join('.');\n\n\t\t\t\t\t\tif (mappings[selectorMap][key]) {\n\t\t\t\t\t\t\tif (acc[key] !== '') acc[key] += '.';\n\t\t\t\t\t\t\tacc[key] += mappings[selectorMap][key];\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn acc;\n\t\t\t\t\t}, {});\n\t\t\t\t\tcomponentsAffected = {\n\t\t\t\t\t\t...componentsAffected,\n\t\t\t\t\t\t...affected\n\t\t\t\t\t};\n\t\t\t\t\tgetAffectedSelectorChain(mappings[selectorMap], consumerPath);\n\t\t\t\t}\n\t\t\t}\n\t\t})(componentsAffected);\n\n\t\treturn {\n\t\t\t...sourceAffected,\n\t\t\t...componentsAffected\n\t\t};\n\t};\n", "import getHostVariables from '../utils/getHostVariables';\nimport {PROPERTY_DEFS} from '../symbols';\n\nexport default function isSelectableProperty(componentRegistry, id, name) {\n\tconst el = componentRegistry[id];\n\tconst hostVariables = getHostVariables(el);\n\tif (el) {\n\t\tconst propertyDefs = hostVariables[PROPERTY_DEFS];\n\n\t\treturn (propertyDefs[name] && propertyDefs[name].selectable) || false;\n\t}\n\n\treturn false;\n}\n", "import {PROPERTY_SELECTOR_SIGIL} from '../constants';\n\n// TODO: this should be refactored to remove some redundancy with creatGetAffected\nexport default mappings =>\n\tfunction getComponentAffected(propertyName, providerId) {\n\t\tlet componentsAffected = {\n\t\t\t...mappings[`${providerId}${PROPERTY_SELECTOR_SIGIL}${propertyName}`]\n\t\t};\n\n\t\tif (!Object.keys(componentsAffected).length) return componentsAffected;\n\n\t\t(function getAffectedSelectorChain(componentMap) {\n\t\t\tfor (const selectorMap in componentMap) {\n\t\t\t\tif (mappings[selectorMap]) {\n\t\t\t\t\tcomponentsAffected = {\n\t\t\t\t\t\t...componentsAffected,\n\t\t\t\t\t\t...mappings[selectorMap]\n\t\t\t\t\t};\n\t\t\t\t\tgetAffectedSelectorChain(mappings[selectorMap]);\n\t\t\t\t}\n\t\t\t}\n\t\t})(componentsAffected);\n\n\t\treturn componentsAffected;\n\t};\n", "/**\n * Create a function to update the existing map with a providerDetail key and its resolved value\n * Sample mapping Obj\n * mappings: {\n * \tproviderComponent{\n * \t\tproviderProp: resolvedValue\n * \t\t}\n * }\n * @param resolvedMappings\n * @returns {(function(*, *): void)}\n */\nexport default function createAddResolvedPropertyMapping(resolvedMappings) {\n\treturn function addResolvedPropertyMapping(providerDetail, resolvedValue) {\n\t\tconst {providerId, providerPropName} = providerDetail;\n\t\tif (!resolvedMappings.has(providerId)) resolvedMappings.set(providerId, new Map());\n\t\tresolvedMappings.get(providerId).set(providerPropName, resolvedValue);\n\t};\n}\n", "export default function createAddSelectablePropertyMapping(resolvedMappings) {\n\treturn function (consumerDetail, resolvedValue) {\n\t\tconst {consumerId, consumerPropName} = consumerDetail;\n\t\tif (!resolvedMappings.has(consumerId)) resolvedMappings.set(consumerId, new Map());\n\t\tresolvedMappings.get(consumerId).set(consumerPropName, resolvedValue);\n\t};\n}\n", "import {PROPERTY_SELECTOR_SIGIL} from '../constants';\n\nexport default resolvedMappings =>\n\tfunction resolvedMappingHasKey(key) {\n\t\tconst [componentId, componentPropName] = key.split(PROPERTY_SELECTOR_SIGIL);\n\t\tif (!resolvedMappings.has(componentId)) return false;\n\n\t\treturn resolvedMappings.get(componentId).has(componentPropName);\n\t};\n", "import {PROPERTY_SELECTOR_SIGIL} from '../constants';\n\nexport default resolvedMappings =>\n\tfunction getResolvedPropertyValue(key) {\n\t\tconst [componentId, componentPropName] = key.split(PROPERTY_SELECTOR_SIGIL);\n\t\tif (!resolvedMappings.has(componentId)) return;\n\t\treturn resolvedMappings.get(componentId).get(componentPropName);\n\t};\n", "import {PROPERTY_SELECTOR_SIGIL} from '../constants';\nimport {isEqual} from '@servicenow/ui-utils';\n\n/**\n * function to remove the entry from the resolvedSelectedPropertyMapping\n * 1. remove the entry if found\n * 2. If the entry to be deleted has impacted consumer components, those impacted ones will be cleared too\n * @param resolvedMappings\n * @param selectedMappings\n * @returns {(function(*, *, *): void)}\n */\nexport default (resolvedMappings, selectedMappings) =>\n\tfunction removeResolvedPropertyMapping(providerId, providerPropName, newValue) {\n\t\tif (!providerId) return;\n\t\tif (!resolvedMappings.has(providerId)) return;\n\n\t\tif (providerPropName) {\n\t\t\tconst existingResolvedProviderMapping = resolvedMappings.get(providerId);\n\t\t\tif (!existingResolvedProviderMapping.has(providerPropName)) return;\n\t\t\tif (!isEqual(newValue, existingResolvedProviderMapping.get(providerPropName))) {\n\t\t\t\texistingResolvedProviderMapping.delete(providerPropName);\n\t\t\t\tif (existingResolvedProviderMapping.size === 0) resolvedMappings.delete(providerId);\n\t\t\t\tdeleteImpactedMapping(selectedMappings, providerId, providerPropName, resolvedMappings);\n\t\t\t}\n\t\t} else {\n\t\t\tresolvedMappings.get(providerId).forEach((value, propName) => {\n\t\t\t\tdeleteImpactedMapping(selectedMappings, providerId, propName, resolvedMappings);\n\t\t\t});\n\t\t\tresolvedMappings.delete(providerId);\n\t\t}\n\t};\n\n// need to clear cached values for selectable consumer values down the chain\nfunction deleteImpactedMapping(selectedMappings, providerId, providerPropName, resolvedMappings) {\n\tconst selectorKey = `${providerId}${PROPERTY_SELECTOR_SIGIL}${providerPropName}`;\n\tconst impactedMappings = selectedMappings[selectorKey];\n\tif (!impactedMappings) return;\n\n\tfor (const impactedMappingKey in impactedMappings) {\n\t\tconst [componentId, componentPropName] = impactedMappingKey.split(PROPERTY_SELECTOR_SIGIL);\n\t\tconst existingResolvedEntry = resolvedMappings.get(componentId);\n\t\tif (existingResolvedEntry && existingResolvedEntry.has(componentPropName)) {\n\t\t\texistingResolvedEntry.delete(componentPropName);\n\t\t\tif (existingResolvedEntry.size === 0) resolvedMappings.delete(componentId);\n\n\t\t\tdeleteImpactedMapping(selectedMappings, componentId, componentPropName, resolvedMappings);\n\t\t}\n\t}\n}\n", "import {PROPERTY_SELECTOR_SIGIL} from '../constants';\n\n/**\n * Create a function to add to resolvedPropertyMappings with a key and its resolved value\n * The key should look like this: providerComponent@providerProp\n * @param resolvedMappings\n * @returns {(function(*, *): void)}\n */\nexport default function createAddResolvedPropertyMappingWithKey(resolvedMappings) {\n\treturn function (key, resolvedValue) {\n\t\tconst [componentId, componentPropName] = key.split(PROPERTY_SELECTOR_SIGIL);\n\t\tif (!resolvedMappings.has(componentId)) resolvedMappings.set(componentId, new Map());\n\t\tresolvedMappings.get(componentId).set(componentPropName, resolvedValue);\n\t};\n}\n", "import {getSelectorParts, isSelectableProperty, isSelector} from './';\n\nfunction resolveSelectorChain(id, name, path, propertyResolver, componentRegistry) {\n\tconst property = propertyResolver(componentRegistry, id, name, path);\n\tif (property && property[0] === '@') {\n\t\tconst [id, name, path] = getSelectorParts(property);\n\t\treturn resolveSelectorChain(id, name, path, propertyResolver, componentRegistry);\n\t}\n\n\treturn property;\n}\n\n/**\n * Returns property selector parts for a single property\n * @function resolveSelectedProperty\n * @private\n *\n * @param {Object} componentRegistry - Component registry\n * @param {function} propertyResolver - Returns the value for a property\n * @param {Object} property - property to be resolved\n * @param {Object} propertyDef - property definition from the config\n * @returns {Object} - The  resolved property\n */\nexport default function resolveSelectedProperty(\n\tcomponentRegistry,\n\tpropertyResolver,\n\tproperty,\n\tpropertyDef\n) {\n\tconst [id, name, path] = getSelectorParts(property);\n\n\tif (!id || !name) return property;\n\n\tconst defaultValue = propertyDef && propertyDef.default;\n\tif (!isSelectableProperty(componentRegistry, id, name))\n\t\treturn !isSelector(defaultValue) ? defaultValue : undefined;\n\n\tconst resolvedValue = resolveSelectorChain(id, name, path, propertyResolver, componentRegistry);\n\tif (resolvedValue !== undefined) return resolvedValue;\n\n\treturn !isSelector(defaultValue) ? defaultValue : undefined;\n}\n", "import {\n\taddResolvedPropertyMappingWithKey,\n\tgetResolvedProperty,\n\tresolveMappingHasKey\n} from './index';\nimport resolveProviderSelectedProperty from './resolveProviderSelectedProperty';\nimport getResolvedValue from '../utils/getResolvedValue';\nimport shouldAddToResolvedPropertyMapping from '../utils/shouldAddToResolvedPropertyMapping';\nimport {set, get} from '@servicenow/ui-internal';\n\n/**\n * Returns property selector parts for a set of properties\n * @function resolveSelectedProperties\n * @private\n *\n * @param {Object} componentRegistry - Component registry\n * @param {function} propertyResolver - Returns the value for a property\n * @param {Object} properties - A set of properties to be resolved\n * @param {Object} propertiesDef - property definition from the config\n * @param {Object} propWithSelector - A variable from the component\n * @returns {Object} - A set of resolved properties\n */\nexport default function resolveSelectedProperties(\n\tcomponentRegistry,\n\tpropertyResolver,\n\tproperties,\n\tpropertiesDef = {},\n\tpropWithSelector\n) {\n\tif (Object.entries(propWithSelector).length === 0) {\n\t\treturn properties;\n\t}\n\n\tconst resolved = {...properties};\n\tfor (const propName in propWithSelector) {\n\t\tconst [id, path] = propWithSelector[propName];\n\t\tconst hasBeenResolved = resolveMappingHasKey(id);\n\n\t\tif (hasBeenResolved) {\n\t\t\tconst resolvedValueObj = getResolvedProperty(id);\n\t\t\tset(resolved, propName, getResolvedValue(resolvedValueObj, path, propertiesDef[propName]));\n\t\t} else {\n\t\t\tconst propDef = propertiesDef[propName];\n\t\t\tconst propertyValue = get(properties, propName);\n\t\t\tconst resolvedValue = resolveProviderSelectedProperty(\n\t\t\t\tpropertyValue,\n\t\t\t\tpath,\n\t\t\t\tcomponentRegistry,\n\t\t\t\tpropDef\n\t\t\t);\n\t\t\tset(resolved, propName, getResolvedValue(resolvedValue, path, propertiesDef[propName]));\n\t\t\tif (shouldAddToResolvedPropertyMapping(propertyValue, componentRegistry))\n\t\t\t\taddResolvedPropertyMappingWithKey(id, resolvedValue);\n\t\t}\n\t}\n\n\treturn resolved;\n}\n", "import {resolveSelectedProperty} from './index';\nimport {selectablePropertyResolver} from '../utils';\n\nexport default function resolveProviderSelectedProperty(\n\tpropertyValue,\n\tproviderPropPath,\n\tcomponentRegistry,\n\tpropertyDef\n) {\n\tif (providerPropPath) {\n\t\treturn resolveSelectedProperty(\n\t\t\tcomponentRegistry,\n\t\t\tselectablePropertyResolver,\n\t\t\tpropertyValue.substring(0, propertyValue.length - providerPropPath.length),\n\t\t\tpropertyDef\n\t\t);\n\t}\n\treturn resolveSelectedProperty(\n\t\tcomponentRegistry,\n\t\tselectablePropertyResolver,\n\t\tpropertyValue,\n\t\tpropertyDef\n\t);\n}\n", "import {get} from '@servicenow/ui-internal';\nimport {isSelector} from '../property-selectors';\n\n/**\n * Utility function to get resolved value with a path\n * @param resolvedValue\n * @param path\n * @returns {*}\n */\nexport default function getResolvedValue(resolvedValue, path, propertyDef) {\n\tif (resolvedValue && path) {\n\t\t// eslint-disable-next-line no-param-reassign\n\t\tresolvedValue = get(resolvedValue, path);\n\t}\n\n\tif (\n\t\tresolvedValue === undefined &&\n\t\tpropertyDef?.default !== undefined &&\n\t\t!isSelector(propertyDef?.default)\n\t) {\n\t\treturn propertyDef.default;\n\t}\n\n\treturn resolvedValue;\n}\n", "import {getSelectorParts} from '../property-selectors';\nimport {getHostVariables, isComputedProperty} from './index';\nimport {PROPERTY_DEFS} from '../symbols';\n\n/**\n * Util function to determine if a resolved selected property should be added to the mapping\n * If provider's property is computed, it always needs to be recalculated at runtime\n * So returns false\n * @param propValue\n * @param componentRegistry\n * @returns {boolean}\n */\nexport default function shouldAddToResolvedPropertyMapping(propValue, componentRegistry) {\n\tconst [id, name] = getSelectorParts(propValue);\n\tconst component = componentRegistry[id];\n\tif (!component) return false;\n\n\treturn !isComputedProperty(name, getHostVariables(component)?.[PROPERTY_DEFS]);\n}\n", "import {memoize} from '@servicenow/ui-internal';\n\nconst getParts = memoize(\n\tvalue => {\n\t\tconst slashIndex = value.indexOf('/');\n\n\t\tif (slashIndex === -1) return [];\n\n\t\tconst [delimeter, pathSplitIndex] = getDelimeterDetail(value);\n\n\t\treturn [\n\t\t\tvalue.substring(1, slashIndex),\n\t\t\tvalue.substring(\n\t\t\t\tslashIndex + 1,\n\t\t\t\tpathSplitIndex === -1\n\t\t\t\t\t? value.length\n\t\t\t\t\t: delimeter === '.'\n\t\t\t\t\t? pathSplitIndex\n\t\t\t\t\t: pathSplitIndex + 1\n\t\t\t),\n\t\t\tpathSplitIndex !== -1 ? value.substring(pathSplitIndex + 1) : ''\n\t\t];\n\t},\n\t{profileName: 'getParts'}\n);\n\nconst getDelimeterDetail = selector => {\n\tconst {length: selectorLength} = selector;\n\tfor (let i = 0; i < selectorLength; i++) {\n\t\tconst value = selector.charAt(i);\n\t\tif (value === '.') return [value, i];\n\t\tif (value === '[') return [value, i - 1];\n\t}\n\n\treturn ['', -1];\n};\n\n/**\n * Returns property selector parts, id and property name\n * @function getSelectorParts\n * @private\n *\n * @param {Object} mappings - A object that will contain mappings\n * @returns {Array} - Property selector parts, id, property name and path\n */\nexport default function getSelectorParts(value) {\n\tif (typeof value !== 'string') return [];\n\tif (value[0] !== '@') return [];\n\n\treturn getParts(value);\n}\n", "import {memoize} from '@servicenow/ui-internal';\n\nconst hasSeperator = memoize(value => value.indexOf('/') > 0, {profileName: 'hasSeperator'});\n\nexport default function isSelector(value) {\n\treturn typeof value === 'string' && value[0] === '@' && hasSeperator(value);\n}\n", "import isSelector from './isSelector';\nimport {getSelectorParts} from './index';\nimport {PROPERTY_SELECTOR_SIGIL} from '../constants';\n\n/**\n * function to update an object of selectedProperties\n * example obj:\n * resolvedSelectedPropertyMapKey = providerComponentId@PropName\n * {\n *     propertyName: [resolvedSelectedPropertyMapKey, pathValue]\n * }\n * @param {string} propertyName\n * @param {string} propertyValue\n * @param {object} selectedProperties\n */\nexport default function updatePropertiesWithSelector(\n\tpropertyName,\n\tpropertyValue,\n\tselectedProperties\n) {\n\tif (!isSelector(propertyValue)) return;\n\n\tconst [id, name, path] = getSelectorParts(propertyValue);\n\tconst key = `${id}${PROPERTY_SELECTOR_SIGIL}${name}`;\n\tselectedProperties[propertyName] = [key, path];\n}\n", "import {memoize} from '@servicenow/ui-internal';\nimport log from '../log';\n\n/**\n * Returns parts for nested selectable properties\n * @function getPartsForNestedSelectableProps\n * @private\n *\n * @param {string} value - The value to be split\n * @returns {Array} - The parts of the value, first element is the root prop name,\n * the second element is path within the object that has the selectable prop\n */\nexport default memoize(\n\tvalue => {\n\t\tconst dotIndex = value.indexOf('.');\n\n\t\tif (dotIndex === -1) {\n\t\t\tlog(`Invalid nested selectable property name: ${value}`, {\n\t\t\t\torigin: 'get_parts_for_nested_selectable_props'\n\t\t\t});\n\t\t\treturn [];\n\t\t}\n\n\t\tconst path = value.substring(dotIndex + 1);\n\n\t\tif (!path) {\n\t\t\tlog(`Invalid nested selectable property name: ${value}`, {\n\t\t\t\torigin: 'get_parts_for_nested_selectable_props'\n\t\t\t});\n\t\t\treturn [];\n\t\t}\n\n\t\treturn [value.substring(0, dotIndex), path];\n\t},\n\t{profileName: 'getPartsForNestedSelectableProps'}\n);\n", "import updatePropertiesWithSelector from './updatePropertiesWithSelector';\nimport {updateSelectedPropertyMappings, updateResolvedSelectedPropertyMappings} from '../utils';\n\nexport default function applyUpdatesForSelectableProps({\n\tname,\n\tvalue,\n\tpropertiesWithSelector,\n\tcomponentId,\n\tpropertyDetails,\n\tcomponentRegistry,\n\tnormalizedConfigForProp\n}) {\n\tupdatePropertiesWithSelector(name, value, propertiesWithSelector);\n\tupdateSelectedPropertyMappings(value, name, componentId);\n\tupdateResolvedSelectedPropertyMappings(\n\t\tpropertyDetails,\n\t\tname,\n\t\tcomponentId,\n\t\tcomponentRegistry,\n\t\tnormalizedConfigForProp,\n\t\tpropertiesWithSelector\n\t);\n}\n", "import {selectablePropertyResolver} from '../utils';\nimport resolveSelectedProperty from './resolveSelectedProperty';\n\nexport default function createUnstableResolvePropertySelectorValue(componentRegistry) {\n\treturn function unstableResolvePropertySelectorValue(propertySelector) {\n\t\treturn resolveSelectedProperty(\n\t\t\tcomponentRegistry,\n\t\t\tselectablePropertyResolver,\n\t\t\tpropertySelector,\n\t\t\t{}\n\t\t);\n\t};\n}\n", "import {COMPONENT_ID} from '../symbols';\nimport {updateSelectedPropertyMappings, getHostVariables} from '../utils';\n\nexport default function unstableAddRenderOnPropertySelectorValueChange(host, propertySelector) {\n\tconst hostVariables = getHostVariables(host);\n\tupdateSelectedPropertyMappings(propertySelector, propertySelector, hostVariables[COMPONENT_ID]);\n}\n", "import {getHostVariables} from '../utils';\nimport {COMPONENT_ID} from '../symbols';\nimport {removeMappings} from '../property-selectors';\n\nexport default function unstableRemoveRenderOnPropertySelectorValueChange(host, propertySelector) {\n\tconst hostVariables = getHostVariables(host);\n\tremoveMappings(hostVariables[COMPONENT_ID], propertySelector);\n}\n", "export default function filterPropertyDefinitions(properties, fn) {\n\tconst filteredPropertyDefs = {};\n\tif (!properties) return filteredPropertyDefs;\n\n\tconst keys = Object.keys(properties);\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tconst k = keys[i];\n\t\tconst value = properties[k];\n\t\tif (fn(value)) filteredPropertyDefs[k] = value;\n\t}\n\n\treturn filteredPropertyDefs;\n}\n", "import {toLower} from '@servicenow/ui-internal';\nimport {SEISMIC_HOIST_TAG_NAME} from '../constants';\n\nconst doc = window.document;\nconst styleFragments = {};\n\nexport function removeStyleFragmentFromCache(tagName) {\n\tdelete styleFragments[tagName.toUpperCase()];\n}\n\n/**\n * @function\n * @param {String} [style]\n * @param {Array.<String>} [stylesheetsContent]\n * @param {String} [tagName]\n * @returns {HTMLElement}\n */\nexport default function createStyleFragment(style, stylesheetsContent, tagName) {\n\tconst cachedStyleFragment = styleFragments[tagName];\n\tif (cachedStyleFragment) return cachedStyleFragment.content.cloneNode(true);\n\n\tlet styleFragment;\n\tconst externalStylesFragment = document.head.querySelector(`#now-${toLower(tagName)}-styles`);\n\tif (externalStylesFragment) {\n\t\tstyleFragment = mergeStylesheets(externalStylesFragment, stylesheetsContent);\n\t} else {\n\t\tlet styles = '';\n\t\tstyleFragment = doc.createElement('template');\n\n\t\tif (style) styles += style;\n\n\t\tif (stylesheetsContent) styles += stylesheetsContent;\n\n\t\tstyleFragment.innerHTML = `<style type=\"text/css\">${styles}</style>`;\n\t}\n\n\tif (tagName !== SEISMIC_HOIST_TAG_NAME) styleFragments[tagName] = styleFragment;\n\n\treturn styleFragment.content.cloneNode(true);\n}\n\nfunction mergeStylesheets(externalStylesFragment, stylesheetsContent) {\n\tif (!stylesheetsContent) return externalStylesFragment;\n\n\t// this case should be rare, if ever; ideally we should deprecate support for config.stylesheets\n\tconst externalStylesEl = externalStylesFragment.content.cloneNode(true).children[0];\n\texternalStylesEl.textContent = `${stylesheetsContent}\\n${externalStylesEl.textContent}`;\n\tconst mergedStyleFragment = doc.createElement('template');\n\tmergedStyleFragment.content.appendChild(externalStylesEl);\n\n\treturn mergedStyleFragment;\n}\n", "export default [];\n", "import reflectQueue from './reflectQueue';\nexport default function isReflecting(name) {\n\tconst {length: reflectCount} = reflectQueue;\n\tfor (let i = 0; i < reflectCount; i++) {\n\t\tif (name === reflectQueue[i]) return name;\n\t}\n}\n", "import reflectQueue from './reflectQueue';\n\nexport default function clearReflection(name) {\n\tlet index = reflectQueue.indexOf(name);\n\twhile (index !== -1) {\n\t\treflectQueue.splice(index, 1);\n\t\tindex = reflectQueue.indexOf(name);\n\t}\n\n\treturn reflectQueue;\n}\n", "export default function isComputedProperty(name, definitions) {\n\treturn definitions[name] && definitions[name].computed;\n}\n", "import {memoize, camelCase} from '@servicenow/ui-internal';\n\nexport default memoize(\n\tfunction toPropertyName(attrName) {\n\t\treturn camelCase(attrName);\n\t},\n\t{profileName: 'toPropertyName'}\n);\n", "export default function isReadOnlyProperty(name, definitions) {\n\treturn definitions[name] && definitions[name].readOnly;\n}\n", "import isReadOnlyProperty from './isReadOnlyProperty';\nimport toPropertyName from './toPropertyName';\nimport isComputedProperty from './isComputedProperty';\nimport {memoize} from '@servicenow/ui-internal';\n\nconst shouldSetMemoized = memoize(\n\tfunction shouldSetAttribute(tagName, name, defs) {\n\t\tconst readOnly = isReadOnlyProperty(toPropertyName(name), defs);\n\t\tconst computedProperty = isComputedProperty(toPropertyName(name), defs);\n\n\t\treturn !readOnly && !computedProperty;\n\t},\n\t{profileName: 'shouldSetAttribute'}\n);\n\nexport default function shouldSetAttribute(tagName, isReflecting, name, defs = {}) {\n\treturn isReflecting || shouldSetMemoized(tagName, name, defs);\n}\n", "import isReadOnlyProperty from './isReadOnlyProperty';\nimport toPropertyName from './toPropertyName';\nimport isComputedProperty from './isComputedProperty';\nimport {memoize} from '@servicenow/ui-internal';\n\nexport default memoize(\n\tfunction shouldSetProperty(tagName, name, defs = {}, setReadOnly = false) {\n\t\tconst propertyName = toPropertyName(name);\n\t\tconst readOnly = isReadOnlyProperty(propertyName, defs);\n\t\tconst computedProperty = isComputedProperty(propertyName, defs);\n\n\t\treturn (!readOnly || (readOnly && setReadOnly)) && !computedProperty;\n\t},\n\t{\n\t\tcreateCacheKey: (tagName, name, defs, setReadOnly) => `${tagName}|${name}|${setReadOnly}`,\n\t\tprofileName: 'shouldSetProperty'\n\t}\n);\n", "const beforeNextTick = Promise.resolve().then.bind(Promise.resolve());\nexport default beforeNextTick;\n", "import {mark, types as metrics} from '@servicenow/ui-metrics';\n\nconst performanceApiExists =\n\tperformance &&\n\ttypeof performance.mark === 'function' &&\n\ttypeof performance.measure === 'function';\nlet {__ENABLE_NOW_UI_PERFORMANCE__} = window;\nlet uiPerfEnabled =\n\tprocess.env.NODE_ENV === 'performance' ||\n\tprocess.env.NODE_ENV === 'test' ||\n\t__ENABLE_NOW_UI_PERFORMANCE__;\n\ntry {\n\tdelete window.__ENABLE_NOW_UI_PERFORMANCE__;\n\n\tObject.defineProperty(window, '__ENABLE_NOW_UI_PERFORMANCE__', {\n\t\tconfigurable: true,\n\t\tget() {\n\t\t\treturn __ENABLE_NOW_UI_PERFORMANCE__;\n\t\t},\n\t\tset(value) {\n\t\t\t__ENABLE_NOW_UI_PERFORMANCE__ = value;\n\t\t\tuiPerfEnabled =\n\t\t\t\tprocess.env.NODE_ENV === 'performance' || process.env.NODE_ENV === 'test' || value;\n\t\t}\n\t});\n} catch (e) {\n\t// fail silently\n}\n\nexport default function measure(fn, host, marker, interactionId, options) {\n\tif (!performanceApiExists) return fn();\n\n\tmark(host, interactionId, metrics.RENDER_START, options);\n\n\tlet startMarker;\n\tif (uiPerfEnabled) {\n\t\tstartMarker = `${marker}-start`;\n\t\tperformance.mark(startMarker);\n\t}\n\tfn();\n\tmark(host, interactionId, metrics.RENDER_END, options);\n\tif (uiPerfEnabled) performance.measure(marker, startMarker);\n}\n", "import getHostVariables from './getHostVariables';\nimport {PROPS} from '../symbols';\nimport {get} from '@servicenow/ui-internal';\n\nexport default function selectablePropertyResolver(componentRegistry, id, name, path) {\n\tconst el = componentRegistry[id];\n\tif (el) {\n\t\tconst hostVariables = getHostVariables(el);\n\t\tconst property = hostVariables[PROPS][name];\n\t\tif (path) {\n\t\t\treturn property && property[0] === '@'\n\t\t\t\t? path[0] === '['\n\t\t\t\t\t? `${property}${path}`\n\t\t\t\t\t: `${property}.${path}`\n\t\t\t\t: get(property, path);\n\t\t}\n\n\t\treturn property;\n\t}\n\n\treturn undefined;\n}\n", "import triggerPropertyChangeAction from './triggerPropertyChangeAction';\nimport {\n\tHOIST_APPEND_TO_PROP,\n\tHOIST_ATTR,\n\tNOW_HOIST_APPEND_TO_PROP,\n\tNOW_HOIST_PREPEND_TO_PROP,\n\tNOW_HOIST_PROP,\n\tPROPERTY_SELECTOR_SIGIL\n} from '../constants';\nimport {HOIST_CHANGED, HOIST_PARENT_CHANGED, PROPERTY_DEFS, RENDER, VARIABLES} from '../symbols';\nimport log from '../log';\nimport {isPropToSkipRender} from './isPropToSkipRender';\n\nexport default function triggerComponentUpdates(\n\tcomponentRegistry,\n\taffected,\n\tpropertyDetails,\n\tinteractionId,\n\tlabel\n) {\n\tconst {value} = propertyDetails;\n\tconst renderList = [];\n\tfor (const id in affected) {\n\t\tconst [elementId, propName] = id.split(PROPERTY_SELECTOR_SIGIL);\n\t\tconst el = componentRegistry[elementId];\n\t\trenderList.push({\n\t\t\telementId,\n\t\t\ttagName: el?.tagName,\n\t\t\tpropName,\n\t\t\tpropDef: el?.[VARIABLES]?.[PROPERTY_DEFS]?.[propName]\n\t\t});\n\n\t\tif (el && propName) {\n\t\t\ttriggerPropertyChangeAction(\n\t\t\t\tel,\n\t\t\t\tpropertyDetails,\n\t\t\t\t{propName, path: affected[id]},\n\t\t\t\tinteractionId\n\t\t\t);\n\n\t\t\tif (propName === NOW_HOIST_PROP || propName === HOIST_ATTR) el[HOIST_CHANGED](value);\n\n\t\t\tif (\n\t\t\t\tpropName === HOIST_APPEND_TO_PROP ||\n\t\t\t\tpropName === NOW_HOIST_APPEND_TO_PROP ||\n\t\t\t\tpropName === NOW_HOIST_PREPEND_TO_PROP\n\t\t\t)\n\t\t\t\tel[HOIST_PARENT_CHANGED](propName);\n\t\t}\n\t}\n\n\tfor (let i = 0; i < renderList.length; i++) {\n\t\tconst {elementId, tagName, propName, propDef} = renderList[i];\n\t\tif (componentRegistry[elementId]) {\n\t\t\tif (!isPropToSkipRender(tagName, propName, propDef))\n\t\t\t\tcomponentRegistry[elementId][RENDER](interactionId, label, {\n\t\t\t\t\tpropName,\n\t\t\t\t\tvalue\n\t\t\t\t});\n\t\t} else {\n\t\t\tlog(\n\t\t\t\t`Component with id \"${elementId}\" could not be re-rendered from a change in property \"${propName}\" because the component is disconnected or not known.`,\n\t\t\t\t{\n\t\t\t\t\tcomponentId: elementId,\n\t\t\t\t\torigin: 'triggerComponentUpdates'\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t}\n}\n", "import {setInteractionId} from '@servicenow/ui-metrics';\nimport {CONDITIONAL_DISPATCH} from '../symbols';\nimport {COMPONENT_PROPERTY_CHANGED} from '../constants';\nimport {get} from '@servicenow/ui-internal';\nimport getHostVariables from './getHostVariables';\n\nexport default function triggerPropertyChangeAction(\n\tel,\n\tpropertyDetail,\n\taffectedPropDetail,\n\tinteractionId\n) {\n\tconst {propName: name, path} = affectedPropDetail;\n\tlet {previousValue, value} = propertyDetail;\n\tif (path) {\n\t\tpreviousValue = get(previousValue, path);\n\t\tvalue = get(value, path);\n\t}\n\tconst hostVariables = getHostVariables(el);\n\thostVariables[CONDITIONAL_DISPATCH](\n\t\tCOMPONENT_PROPERTY_CHANGED,\n\t\t{\n\t\t\tname,\n\t\t\tpreviousValue,\n\t\t\tvalue,\n\t\t\thost: el\n\t\t},\n\t\tsetInteractionId(\n\t\t\t{\n\t\t\t\tinternal: true\n\t\t\t},\n\t\t\tinteractionId\n\t\t)\n\t);\n}\n", "import {memoize} from '@servicenow/ui-internal';\nimport {NOW_METRIC_TYPES_PROP, NOW_METRICS_LEVEL_PROP, NOW_LOGGING_LEVELS_PROP} from '../constants';\n\nconst skipRenderPropsList = [\n\tNOW_METRIC_TYPES_PROP,\n\tNOW_METRICS_LEVEL_PROP,\n\tNOW_LOGGING_LEVELS_PROP\n];\n\nexport const isPropToSkipRender = memoize(\n\t(_tagName, propName, propDef) =>\n\t\tskipRenderPropsList.includes(propName) || propDef?.shouldRenderWhenSet === false,\n\t{\n\t\tcreateCacheKey: (tagName, propName) => `${tagName}|${propName}`,\n\t\tprofileName: `isPropToSkipRender`\n\t}\n);\n", "import {addMapping, getSelectorParts, removeMappings} from '../property-selectors';\n\nexport default function updateSelectedPropertyMappings(\n\tpropertyValue,\n\tconsumerPropName,\n\tconsumerId,\n\tshouldRemove = true\n) {\n\tconst [providerId, providerPropName, providerPropPath] = getSelectorParts(propertyValue);\n\n\tif (shouldRemove) removeMappings(consumerId, consumerPropName);\n\n\tif (providerId && providerPropName)\n\t\taddMapping({providerId, providerPropName, providerPropPath}, {consumerId, consumerPropName});\n}\n", "import {\n\taddResolvedPropertyMapping,\n\taddSelectableResolvedPropertyMapping,\n\tgetResolvedProperty,\n\tgetSelectorParts,\n\tremoveResolvedMapping\n} from '../property-selectors';\nimport {getHostVariables} from './index';\nimport {PROPERTY_DEFS} from '../symbols';\nimport resolveProviderSelectedProperty from '../property-selectors/resolveProviderSelectedProperty';\nimport shouldAddToResolvedPropertyMapping from './shouldAddToResolvedPropertyMapping';\nimport quickEquals from './helpers/quickEquals';\nimport {get} from '@servicenow/ui-utils';\nimport getResolvedValue from './getResolvedValue';\nimport updateResolvedValue from './updateResolvedValue';\n\n/**\n * function to update resolvedSelectedPropertyMapping so that we don't need to re-resolve the same property if found\n\n * @param propertyDetails\n * @param consumerPropName\n * @param consumerId\n * @param componentRegistry\n * @param propertyDef\n * @param propertiesWithSelector\n */\nexport default function updateResolvedSelectedPropertyMappings(\n\tpropertyDetails,\n\tconsumerPropName,\n\tconsumerId,\n\tcomponentRegistry = {},\n\tpropertyDef = {},\n\tpropertiesWithSelector = {}\n) {\n\tconst {previousValue, value} = propertyDetails;\n\tconst [previousProviderId, previousProviderPropName, previousProviderPath] =\n\t\tgetSelectorParts(previousValue);\n\tconst [providerId, providerPropName, providerPropPath] = getSelectorParts(value);\n\tif (previousProviderId && previousProviderPropName) {\n\t\tif (!shouldAddToResolvedPropertyMapping(previousValue, componentRegistry)) return;\n\t\t//when the property value has been resolved and added to the mapping\n\t\t//if the new value is different, need to update the mapping accordingly\n\t\tconst [id] = propertiesWithSelector[consumerPropName];\n\t\tconst alreadyResolvedValue = getResolvedProperty(id);\n\t\tif (\n\t\t\talreadyResolvedValue &&\n\t\t\t!quickEquals(getResolvedValue(alreadyResolvedValue, previousProviderPath, propertyDef), value)\n\t\t) {\n\t\t\tconst newValue = updateResolvedValue(alreadyResolvedValue, previousProviderPath, value);\n\t\t\tremoveResolvedMapping(previousProviderId, previousProviderPropName, newValue);\n\t\t\taddResolvedPropertyMapping(\n\t\t\t\t{providerId: previousProviderId, providerPropName: previousProviderPropName},\n\t\t\t\tnewValue\n\t\t\t);\n\t\t}\n\t} else if (providerId && providerPropName) {\n\t\tif (!shouldAddToResolvedPropertyMapping(value, componentRegistry)) return;\n\n\t\tconst resolvedValue = resolveProviderSelectedProperty(\n\t\t\tvalue,\n\t\t\tproviderPropPath,\n\t\t\tcomponentRegistry,\n\t\t\tpropertyDef\n\t\t);\n\t\tremoveResolvedMapping(providerId, providerPropName, resolvedValue);\n\t\taddResolvedPropertyMapping({providerId, providerPropName}, resolvedValue);\n\n\t\tif (consumerId && consumerPropName) {\n\t\t\tconst consumerComponent = componentRegistry[consumerId];\n\t\t\tif (!consumerComponent) return;\n\n\t\t\tconst consumerPropDef = getHostVariables(consumerComponent)[PROPERTY_DEFS];\n\t\t\tif (consumerPropDef[consumerPropName]?.selectable) {\n\t\t\t\tconst resolvedDotWalkedValue = get(resolvedValue, providerPropPath, resolvedValue);\n\t\t\t\tremoveResolvedMapping(consumerId, consumerPropName, resolvedDotWalkedValue);\n\t\t\t\taddResolvedPropertyMapping(\n\t\t\t\t\t{providerId: consumerId, providerPropName: consumerPropName},\n\t\t\t\t\tresolvedDotWalkedValue\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t} else if (consumerId && consumerPropName) {\n\t\t// when providerId & providerPropName is empty, it means that consumer itself is a provider when it's selectable\n\t\tconst consumerComponent = componentRegistry[consumerId];\n\t\tif (!consumerComponent) return;\n\n\t\tconst consumerPropDef = getHostVariables(consumerComponent)[PROPERTY_DEFS];\n\t\tif (consumerPropDef[consumerPropName]?.selectable) {\n\t\t\tremoveResolvedMapping(consumerId, consumerPropName, value);\n\t\t\taddSelectableResolvedPropertyMapping({consumerId, consumerPropName}, value);\n\t\t}\n\t}\n}\n", "export default function quickEquals(newValue, oldValue) {\n\tif (newValue === oldValue) {\n\t\treturn true;\n\t}\n\n\t// If its a primitive and doesnt match we should bail out before going further\n\tif (isPrimitiveOrNull(newValue) || isPrimitiveOrNull(oldValue)) return false;\n\n\t// Trying to rule out anything that might cause false positive for typeof === object later on\n\tif (!supportedType(newValue)) return false;\n\tif (!supportedType(oldValue)) return false;\n\n\tif (!quickEqualsType(newValue, oldValue)) return false;\n\tif (quickEqualsEmptyValue(oldValue, newValue)) return true;\n\n\tif (Array.isArray(newValue)) {\n\t\tconst {length: newValueLength} = newValue;\n\t\tconst {length: oldValueLength} = oldValue;\n\t\tif (newValueLength !== oldValueLength) return false;\n\t\tif (newValueLength > 10) return false;\n\t\tif (newValueLength < 1) return false;\n\n\t\tfor (let i = 0; i < newValueLength; i++) {\n\t\t\tif (!isPrimitiveOrNull(newValue[i]) || !isPrimitiveOrNull(oldValue[i])) {\n\t\t\t\treturn false;\n\t\t\t} else if (newValue[i] !== oldValue[i]) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t} else if (typeof newValue === 'object') {\n\t\tconst keys = Object.keys(newValue);\n\t\tconst {length: newKeyLength} = keys;\n\t\tconst {length: oldKeyLength} = Object.keys(oldValue);\n\n\t\tif (newKeyLength !== oldKeyLength) return false;\n\t\tif (newKeyLength > 6) return false;\n\t\tfor (let key in keys) {\n\t\t\tkey = keys[key];\n\t\t\tif (isPrimitive(newValue[key]) && isPrimitive(oldValue[key])) {\n\t\t\t\tif (newValue[key] !== oldValue[key]) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tcontinue;\n\t\t\t} else if (isUndefinedOrNull(newValue[key]) || isUndefinedOrNull(oldValue[key])) {\n\t\t\t\treturn false;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\n\treturn false;\n}\n\nexport function supportedType(value) {\n\tif (value instanceof Set) {\n\t\treturn false;\n\t} else if (value instanceof Map) {\n\t\treturn false;\n\t} else if (typeof value === 'function') {\n\t\treturn false;\n\t} else if (Object.getOwnPropertySymbols(value).length > 0) {\n\t\treturn false;\n\t} else if (value instanceof HTMLElement) {\n\t\treturn false;\n\t} else if (value instanceof DOMRect) {\n\t\treturn false;\n\t}\n\n\treturn true;\n}\n\nfunction isPrimitiveOrNull(value) {\n\treturn isPrimitive(value) || isUndefinedOrNull(value);\n}\n\nfunction isPrimitive(value) {\n\tconst type = typeof value;\n\tif (type === 'object' || type === 'function') return false;\n\n\tif (type === 'string') return true;\n\tif (type === 'bigint') return true;\n\tif (type === 'boolean') return true;\n\tif (type === 'number') return true;\n\tif (type === 'symbol') return true;\n\treturn false;\n}\n\nfunction isUndefinedOrNull(value) {\n\treturn value === null || value === undefined;\n}\n\nconst quickEqualsType = (newValue, oldValue) => {\n\tif (typeof newValue !== typeof oldValue) return false;\n\telse if (Array.isArray(newValue) !== Array.isArray(oldValue)) return false;\n\treturn true;\n};\n\nconst quickEqualsEmptyValue = (newValue, oldValue) => {\n\tif (Object.keys(newValue).length == 0 && Object.keys(oldValue).length == 0) return true;\n\treturn false;\n};\n", "import {set} from '@servicenow/ui-utils';\n\n/**\n * Utility function to update resolved value with a path\n */\nexport default function updateResolvedValue(alreadyResolvedValue, path, newValue) {\n\tif (!path) return newValue;\n\t//deals with scenario when selected property has a path, e.g. arrayProp[1], objProp.foo\n\tconst updatedValue = alreadyResolvedValue;\n\tset(updatedValue, path, newValue);\n\treturn updatedValue;\n}\n", "import beforeNextTick from './beforeNextTick';\n\nconst defaultLifecycleFn = (node, dispatch, next) => next();\nconst defaultAsyncLifecycleFn = (node, dispatch, next) =>\n\tbeforeNextTick(() => defaultLifecycleFn(node, dispatch, next));\n\nexport default function createLifecycleFunctions(\n\trendererOnConnect,\n\trendererOnDisconnect,\n\tshouldRunAsync\n) {\n\tif (shouldRunAsync && !rendererOnConnect) {\n\t\t// only the legacy react renderer should match this case\n\t\treturn {\n\t\t\tonConnect: defaultAsyncLifecycleFn,\n\t\t\tonDisconnect: rendererOnDisconnect || defaultLifecycleFn\n\t\t};\n\t}\n\n\treturn {\n\t\tonConnect: rendererOnConnect || defaultAsyncLifecycleFn,\n\t\tonDisconnect: rendererOnDisconnect || defaultLifecycleFn\n\t};\n}\n", "import {NOW_UI_EVENT} from '../constants';\n\nexport function emitNowUiEvent(type, detail) {\n\tif (!window.__ENABLE_NOW_UI_EVENT__) return;\n\tconst event = new CustomEvent(NOW_UI_EVENT, {\n\t\tcomposed: true,\n\t\tbubbles: true,\n\t\tdetail: {\n\t\t\ttype,\n\t\t\t...detail\n\t\t}\n\t});\n\tdocument.dispatchEvent(event);\n}\n", "import {toPropertyName} from '../utils';\n\nexport default function camelCaseProperties(state) {\n\tfor (const k in state.properties) {\n\t\tconst newKey = toPropertyName(k);\n\t\tif (newKey !== k) {\n\t\t\tstate.properties[newKey] = state.properties[k];\n\t\t\tdelete state.properties[k];\n\t\t}\n\t}\n\treturn state;\n}\n", "/**\n * Unescape reserved characters and seismic\n * Currently, only @ is reserved, we can expand this later if needed\n *\n * @private\n * @param state\n * @param container\n * @returns Object - State\n */\nexport default function unescapeReservedCharacters(state) {\n\tfor (const k in state.properties) {\n\t\tconst value = state.properties[k];\n\t\tif (typeof value === 'string' && (value.startsWith('\\\\@') || value.startsWith('\\\\\\\\@'))) {\n\t\t\tstate.properties[k] = value.slice(1);\n\t\t}\n\t}\n\treturn state;\n}\n", "import {GET_RESOLVED_PROPERTY} from '../symbols';\nimport {HOIST_ATTR, NOW_HOIST_PROP, NOW_HOIST_ATTR} from '../constants';\n\nexport default function isHoisted(host) {\n\treturn (\n\t\thost[GET_RESOLVED_PROPERTY](HOIST_ATTR) ||\n\t\thost[GET_RESOLVED_PROPERTY](NOW_HOIST_PROP) ||\n\t\thost.hasAttribute(NOW_HOIST_ATTR) ||\n\t\thost.hasAttribute(HOIST_ATTR)\n\t);\n}\n", "import {ROOT_NODE} from '../symbols';\n\nexport function getHoistTarget(hostVariables) {\n\treturn hostVariables[ROOT_NODE].host;\n}\n", "import getHostVariables from './getHostVariables';\nimport {COMPONENT_ID} from '../symbols';\nimport {SEISMIC_HOIST_TAG_NAME} from '../constants';\n\nexport default function getRootNode(node) {\n\tconst rootNode = node.getRootNode();\n\n\tif (rootNode.host && rootNode.host.tagName === SEISMIC_HOIST_TAG_NAME)\n\t\treturn rootNode.host.sourceElement;\n\n\tif (rootNode !== document) return rootNode.host;\n\n\tif (node.assignedSlot) return getRootNode(node.assignedSlot);\n\n\tlet {parentNode} = node;\n\twhile (parentNode !== document.body) {\n\t\tconst parentVariables = getHostVariables(parentNode);\n\n\t\tif (parentVariables && parentVariables[COMPONENT_ID]) return parentNode;\n\n\t\tparentNode = parentNode.parentNode; // eslint-disable-line prefer-destructuring\n\t}\n\n\treturn null;\n}\n", "import {createInteractionId, applyInteractionId} from '@servicenow/ui-metrics';\nimport {normalizeActionMeta} from './normalizeActionMeta';\nimport {setLogContext} from './helpers/createComponentLogger';\n\nfunction applyMetricsToDispatch(dispatch) {\n\treturn (type, payload, meta = {}, error) => {\n\t\t// eslint-disable-next-line no-param-reassign\n\t\tmeta = normalizeActionMeta(meta, {});\n\t\tapplyInteractionId(meta);\n\t\treturn dispatch(type, payload, meta, error);\n\t};\n}\n\nfunction applyMetricsToLogger(logger, traceId, spanId) {\n\tsetLogContext({traceId, spanId});\n\treturn logger;\n}\n\nexport default function applyMetrics(helpers, spanId, interactionId = createInteractionId()) {\n\tconst withMetrics = typeof helpers === 'function' ? applyMetricsToDispatch(helpers) : {};\n\n\tif (helpers.updateState)\n\t\twithMetrics.updateState = (...args) => helpers.updateState(...args, {interactionId});\n\n\tif (helpers.updateContext)\n\t\twithMetrics.updateContext = (...args) => helpers.updateContext(...args, {interactionId});\n\n\tif (helpers.updateProperties)\n\t\twithMetrics.updateProperties = (...args) => helpers.updateProperties(...args, {interactionId});\n\n\tif (helpers.dispatch) withMetrics.dispatch = applyMetricsToDispatch(helpers.dispatch);\n\n\tif (helpers.logger)\n\t\twithMetrics.logger = applyMetricsToLogger(helpers.logger, interactionId, spanId);\n\n\treturn withMetrics;\n}\n", "import {isPlainObject} from '@servicenow/ui-internal';\nimport log from '../log';\n\nexport function normalizeActionMeta(meta, {host}) {\n\tlet normalizedMeta = meta;\n\tif (!isPlainObject(meta)) {\n\t\tnormalizedMeta = {...meta};\n\t\tif (process.env.NODE_ENV !== 'production') {\n\t\t\tlog(\n\t\t\t\t`While dispatching an action, Expected meta to be an Object but found ${meta}. This will result in inconsistent behavior when passing meta to an action handler`,\n\t\t\t\t{\n\t\t\t\t\thost,\n\t\t\t\t\torigin: 'normalizeActionMeta'\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t}\n\n\treturn normalizedMeta;\n}\n", "import {getConfigItem, configConstants, observeConfigItem} from '@servicenow/ui-config';\nimport {createInteractionId} from '@servicenow/ui-metrics';\nimport deferHelperExecution from './deferHelperExecution';\nimport {LoggerProvider} from '@devsnc/sn-ui-logger';\n\nglobalThis.nowUiFramework = globalThis.nowUiFramework || {};\nconst {LOGGING_ENABLED, LOGGING_LEVELS} = configConstants;\nconst globalLoggerProvider = getLoggerProvider();\nif (!getConfigItem(LOGGING_ENABLED)) globalLoggerProvider.disableLogging();\n\nconst loggerFunctions = globalThis.nowUiFrameworkLogs.logTypes;\nconst observer = (path, value) => {\n\tswitch (path) {\n\t\tcase LOGGING_ENABLED:\n\t\t\tif (value) globalLoggerProvider.enableLogging();\n\t\t\telse globalLoggerProvider.disableLogging();\n\t\t\tbreak;\n\t\tcase LOGGING_LEVELS:\n\t\t\tglobalLoggerProvider.logLevel = value;\n\t\t\tbreak;\n\t}\n};\n\nobserveConfigItem(LOGGING_ENABLED, observer);\nobserveConfigItem(LOGGING_LEVELS, observer);\n\nexport function getLoggerProvider() {\n\tconst globalLoggerProvider = globalThis.nowUiFramework.snUiLoggerProvider;\n\tif (globalLoggerProvider) {\n\t\treturn globalLoggerProvider;\n\t}\n\n\tconst {LOGGING_LEVELS, LOGS_OBSERVER_INTERVAL, LOGS_CLEANUP_INTERVAL, LOG_EXPORTER} =\n\t\tconfigConstants;\n\n\tglobalThis.nowUiFramework.snUiLoggerProvider = new LoggerProvider({\n\t\tcollectTimeInterval: getConfigItem(LOGS_OBSERVER_INTERVAL),\n\t\tcleanupTimeInterval: getConfigItem(LOGS_CLEANUP_INTERVAL),\n\t\tlogLevel: getConfigItem(LOGGING_LEVELS),\n\t\texporter: getConfigItem(LOG_EXPORTER)\n\t});\n\treturn globalThis.nowUiFramework.snUiLoggerProvider;\n}\n\nexport function getComponentLogger(host) {\n\tconst logger = {};\n\n\tconst globalLoggerProvider = globalThis.nowUiFramework.snUiLoggerProvider;\n\tif (!globalLoggerProvider) return logger;\n\n\treturn globalLoggerProvider.getLogger(host.tagName.toLowerCase());\n}\n\nexport function setLogContext({traceId = createInteractionId(), spanId}) {\n\tconst globalLoggerProvider = globalThis.nowUiFramework.snUiLoggerProvider;\n\tif (globalLoggerProvider) globalLoggerProvider.context = {traceId, spanId};\n}\n\nexport default function createComponentLogger(host, executionTiming) {\n\tconst logger = {};\n\tloggerFunctions.forEach(loggerFn => {\n\t\tlogger[loggerFn] = function logFn(...args) {\n\t\t\tdeferHelperExecution(\n\t\t\t\texecutionTiming,\n\t\t\t\t() => {\n\t\t\t\t\tconst loggerClass = getComponentLogger(host);\n\t\t\t\t\tif (loggerClass[loggerFn] && typeof loggerClass[loggerFn] === 'function')\n\t\t\t\t\t\tloggerClass[loggerFn](...args);\n\t\t\t\t\telse if (loggerClass?.info) loggerClass.info(...args);\n\t\t\t\t},\n\t\t\t\t{el: host}\n\t\t\t);\n\t\t};\n\t});\n\treturn logger;\n}\n", "import {HELPERS_DEFER} from '../../constants';\nimport {schedule, types} from '../../scheduler';\nconst {DEFER_HELPER_EXECUTION} = types;\n\n// the origin event handler for an action is ran as a microtask because it has to wait to see if\n// preventDefault has been called by an ancestor. because of this back-to-back dispatches\n// triggered from a user event such as a click can cause stale state or properties in helper\n// callbacks (or just event handlers) in the view. so far this is only replicable programmtically\n// doing something like btn.click(); btn.click(); where these clicks dispatch an action that then updates\n// state or properties in an effect hander and the dispatch callback in the view relies on state\n// or properties. eventually this use case needs to be accounted for in the scheduler design.\nexport default function deferHelperExecution(executionTiming, fn, meta) {\n\treturn executionTiming === HELPERS_DEFER\n\t\t? schedule({fn, type: DEFER_HELPER_EXECUTION, meta})\n\t\t: fn();\n}\n", "// TODO: account for p2.computed relying on p1.computed; use getters???\nimport {UPDATE_AFFECTED_COMPONENTS, PROPS} from '../symbols';\nimport filterComputedProperties from './filterComputedProperties';\nimport computeProperty from './computeProperty';\nimport quickEquals from './helpers/quickEquals';\n\nexport default function resolveComputedProperties(state, host, hostVariables, interactionId) {\n\tconst computed = filterComputedProperties(host);\n\tstate.properties = state.properties || {};\n\n\tfor (const k in computed) {\n\t\tconst previousValue = hostVariables[PROPS][k];\n\n\t\tstate.properties[k] = computeProperty(k, computed[k], {state, host});\n\t\thostVariables[PROPS][k] = state.properties[k]; // eslint-disable-line no-param-reassign\n\n\t\tif (!quickEquals(state.properties[k], previousValue)) {\n\t\t\thost[UPDATE_AFFECTED_COMPONENTS]({\n\t\t\t\tname: k,\n\t\t\t\tpropertyDetails: {\n\t\t\t\t\tpreviousValue,\n\t\t\t\t\tvalue: state.properties[k]\n\t\t\t\t},\n\t\t\t\tinteractionId,\n\t\t\t\tincludeSource: false\n\t\t\t});\n\t\t}\n\t}\n\n\treturn state;\n}\n", "import {memoize} from '@servicenow/ui-internal';\nimport {PROPERTY_DEFS} from '../symbols';\nimport filterPropertyDefinitions from './filterPropertyDefinitions';\nimport getHostVariables from './getHostVariables';\n\nconst filterComputedProperties = memoize(\n\thost => {\n\t\tconst hostVariables = getHostVariables(host);\n\t\treturn filterPropertyDefinitions(hostVariables[PROPERTY_DEFS], d => d.computed);\n\t},\n\t{createCacheKey: host => host.tagName, profileName: 'filterComputedProperties'}\n);\n\nexport default filterComputedProperties;\n", "import {sandbox, locations} from '@servicenow/ui-internal';\nimport log from '../log';\n\nexport default function computeProperty(name, propertyDefinition, {state, host}) {\n\treturn sandbox(propertyDefinition.computed, {\n\t\targs: [state],\n\t\tdispatch: host.helpers,\n\t\thost,\n\t\tlocation: locations.PROPERTY,\n\t\tdetails: {compute: true, name},\n\t\tlog\n\t});\n}\n", "import filterComputedProperties from './filterComputedProperties';\nimport computeProperty from './computeProperty';\n\nexport default function computeProperties(state, host) {\n\tconst computed = filterComputedProperties(host);\n\n\tfor (const k in computed) state.properties[k] = computeProperty(k, computed[k], {state, host});\n\n\treturn state;\n}\n", "import {getConfigItem, configConstants} from '@servicenow/ui-config';\nimport {INTERSECTION_TRIGGERED} from '../symbols';\nconst {INTERSECT_ROOT_MARGIN} = configConstants;\nfunction intersection(entries) {\n\tentries.forEach(entry => {\n\t\tif (entry.isIntersecting) {\n\t\t\tentry.target[INTERSECTION_TRIGGERED]();\n\t\t\tobserver.unobserve(entry.target);\n\t\t}\n\t});\n}\n\n// The distance away from the viewport when a component should render\nconst VIEWPORT_INTERSECTION_MARGIN = getConfigItem(INTERSECT_ROOT_MARGIN);\nconst options = {rootMargin: VIEWPORT_INTERSECTION_MARGIN};\n\nlet observer;\nif (!window.IntersectionObserver) observer = {observe() {}, unobserve() {}};\nelse observer = new IntersectionObserver(intersection, options);\n\nexport default observer;\n", "import getHostVariables from './getHostVariables';\nimport {ROOT_NODE} from '../symbols';\n\nexport default function applyIntersectStyles(el, config, options) {\n\tconst {width, height} = options;\n\n\tif (!width && !height) return;\n\n\tconst hostVariables = getHostVariables(el);\n\tconst rootNode = hostVariables[ROOT_NODE];\n\n\t/**\n\t * Fix for inline elements with intersection observer:\n\t *\n\t * Problem: Custom elements default to display:inline in browsers. Inline elements\n\t * don't respect width/height CSS properties - they derive dimensions from content.\n\t * This causes getBoundingClientRect() to return {width: 0, height: 0}, making the\n\t * Intersection Observer report isIntersecting:false even when the element is in view.\n\t *\n\t * Solution: Apply display:inline-block to elements that:\n\t * 1. Have computed display:inline (browser default for custom elements)\n\t * 2. Haven't explicitly set an inline style for display (respects component intent)\n\t *\n\t * This fix is temporary - the cleanup function returned by applyWithTag removes\n\t * all placeholder styles (including this display fix) when INTERSECTION_TRIGGERED\n\t * is called after the element enters the viewport.\n\t *\n\t * Note: We only check el.style.display (inline styles), not :host styles (stylesheet).\n\t * If a component defines :host { display: inline; } in CSS while using intersection\n\t * observer, they likely need this fix too.\n\t */\n\n\tconst styleFragments = [\n\t\tgetInlineBlockFixIfNeeded(el),\n\t\twidth ? `width: ${width};` : '',\n\t\theight ? `height: ${height};` : ''\n\t].filter(Boolean);\n\n\tconst styles = `:host {${styleFragments.join('')}}`;\n\treturn applyWithTag(rootNode, styles);\n}\n\nfunction getInlineBlockFixIfNeeded(el) {\n\ttry {\n\t\tconst computedStyle = window.getComputedStyle(el);\n\t\tif (!computedStyle || !el.style) {\n\t\t\treturn '';\n\t\t}\n\n\t\tconst isInlineDisplay = computedStyle.display === 'inline';\n\t\tconst hasExplicitInlineStyle = el.style.display !== '';\n\t\tconst needsFix = isInlineDisplay && !hasExplicitInlineStyle;\n\n\t\treturn needsFix ? 'display: inline-block;' : '';\n\t} catch (e) {\n\t\t// Fail silently if we can't determine display\n\t\treturn '';\n\t}\n}\n\nfunction applyWithTag(rootNode, styles) {\n\tconst styleElement = window.document.createElement('style');\n\tstyleElement.type = 'text/css';\n\tstyleElement.innerHTML = styles;\n\trootNode.appendChild(styleElement);\n\n\treturn () => {\n\t\tif (styleElement.parentNode === rootNode) {\n\t\t\trootNode.removeChild(styleElement);\n\t\t}\n\t};\n}\n", "export {assign} from './assign';\nexport {merge} from './merge';\nexport {declarativeOperations} from './operations';\n", "export function assign(target, source) {\n\tif (target && typeof target === 'object') Object.assign(target, source);\n}\n", "export function merge(target, source) {\n\tfor (const k in source) {\n\t\tif (target[k] === undefined) target[k] = source[k]; // eslint-disable-line no-param-reassign\n\t\tif (typeof target[k] === 'object' && typeof source[k] === 'object') merge(target[k], source[k]);\n\t\telse target[k] = source[k]; // eslint-disable-line no-param-reassign\n\t}\n}\n", "import {get as _get, set as _set} from '@servicenow/ui-internal';\nimport {assign as _assign} from './assign';\nimport {merge as _merge} from './merge';\n\nfunction operateAtPath(operationFn, obj, path, value) {\n\tif (!path) return operationFn(obj, value);\n\n\tconst location = _get(obj, path);\n\tif (location === undefined || typeof location !== 'object') return _set(obj, path, value);\n\n\treturn operationFn(location, value);\n}\n\n// Object\nexport const set = (obj, {path, value}) => _set(obj, path, value);\nexport const assign = (obj, {path, value}) => operateAtPath(_assign, obj, path, value);\nexport const merge = (obj, {path, value}) => operateAtPath(_merge, obj, path, value);\n\n// Array\nexport const pop = (obj, {path}) => _get(obj, path).pop();\nexport const push = (obj, {path, value}) => _get(obj, path).push(value);\nexport const shift = (obj, {path}) => _get(obj, path).shift();\nexport const unshift = (obj, {path, value}) => _get(obj, path).unshift(value);\nexport const splice = (obj, {path, start = 0, deleteCount = 0, addItems = []}) =>\n\t_get(obj, path).splice(start, deleteCount, ...addItems);\nexport const concat = (obj, {path, value}) => {\n\tconst arr = _get(obj, path);\n\treturn arr.push.apply(arr, value); // eslint-disable-line prefer-spread\n};\n\nexport const declarativeOperations = {\n\tSET: 'set',\n\tASSIGN: 'assign',\n\tMERGE: 'merge',\n\tPOP: 'pop',\n\tPUSH: 'push',\n\tSHIFT: 'shift',\n\tUNSHIFT: 'unshift',\n\tSPLICE: 'splice',\n\tCONCAT: 'concat'\n};\n\n// TODO: Map / Set / Date\n", "import {getConfigItem, configConstants} from '@servicenow/ui-config';\n\nconst {PAGE_OPT_OUT_PROPERTY_DEEP_COMPARE, PAGE_OPT_OUT_STATE_DEEP_COMPARE} = configConstants;\nconst propertyOptOutPages = (getConfigItem(PAGE_OPT_OUT_PROPERTY_DEEP_COMPARE) || '').split(',');\nconst stateOptOutPages = (getConfigItem(PAGE_OPT_OUT_STATE_DEEP_COMPARE) || '').split(',');\n\nexport default function shouldOptOutOfDeepCompareForPage(type) {\n\tconst pages = type === 'property' ? propertyOptOutPages : stateOptOutPages;\n\treturn pages.find(page => window.location.href.includes(page));\n}\n", "import {requestIdleCallback} from '@servicenow/ui-utils';\nimport log from '../log';\n\nconst styleSheetsContent = {};\nconst PREFIX = 'SEISMIC_STYLES';\n\nconst get = (version, tagName) => {\n\tlet contents = styleSheetsContent[tagName];\n\tif (contents) return contents;\n\n\ttry {\n\t\tconst errorText = `<title>Error</title>`;\n\t\tcontents = localStorage.getItem(`${PREFIX}_${tagName}${version}`);\n\t\tif (contents.includes(errorText)) contents = '';\n\t} catch (e) {\n\t\tlog(`The stylesheets content for the tag, ${tagName}, could not be retrieved.`);\n\t}\n\n\treturn contents;\n};\n\nconst set = (version, tagName, contents) => {\n\ttry {\n\t\tstyleSheetsContent[tagName] = contents;\n\t\trequestIdleCallback(() => {\n\t\t\tlocalStorage.setItem(`${PREFIX}_${tagName}${version}`, contents);\n\t\t});\n\t} catch (e) {\n\t\tlog(`The stylesheets content for the custom element, ${name}, could not be cached.`);\n\t}\n};\n\nexport default {set, get};\n", "import styleSheetsRequestCache from './styleSheetsRequestCache';\n\nexport default async function resolveStylesheetsContent(stylesheets) {\n\ttry {\n\t\tconst errorText = `<title>Error</title>`;\n\t\tconst responses = await Promise.all(\n\t\t\tstylesheets.map(stylesheet => {\n\t\t\t\tif (styleSheetsRequestCache.has(stylesheet)) {\n\t\t\t\t\treturn styleSheetsRequestCache.get(stylesheet);\n\t\t\t\t}\n\t\t\t\tconst request = fetch(stylesheet);\n\t\t\t\tstyleSheetsRequestCache.set(stylesheet, request);\n\t\t\t\treturn request;\n\t\t\t})\n\t\t);\n\t\tlet text = await Promise.all(\n\t\t\tresponses.map(response => (response.clone ? response.clone() : response).text())\n\t\t);\n\t\ttext = text.filter(t => !t.includes(errorText));\n\t\treturn text.join(' ');\n\t} catch (e) {\n\t\treturn '';\n\t}\n}\n", "const styleSheetsRequestCache = new Map();\n\nexport default {\n\thas: key => styleSheetsRequestCache.has(key),\n\tget: key => styleSheetsRequestCache.get(key),\n\tset: (key, value) => styleSheetsRequestCache.set(key, value),\n\tclear: () => styleSheetsRequestCache.clear()\n};\n", "import {memoize, pendingNetworkActionCountForHost} from '@servicenow/ui-internal';\nimport {createInteractionId, mark, types as metrics} from '@servicenow/ui-metrics';\nimport {getSelectorParts, getAffected} from '../property-selectors';\nimport {PROPERTY_SELECTOR_SIGIL, COMPONENT_INTERACTIVE} from '../constants';\nimport {\n\tCHILDREN_TO_BE_INTERACTIVE,\n\tANCESTOR_ROOT_NODE,\n\tCOMPONENT_ID,\n\tPROPS,\n\tINTERACTIVE_TIMESTAMP,\n\tSELECTABLE_PROPERTIES,\n\tCONDITIONAL_DISPATCH\n} from '../symbols';\nimport getHostVariables from './getHostVariables';\nimport {countHighPriorityTasks, countMediumPriorityTasks} from '../scheduler';\n\nconst isProvider = memoize(\n\tel => {\n\t\tconst variables = getHostVariables(el);\n\t\treturn variables[SELECTABLE_PROPERTIES] && variables[SELECTABLE_PROPERTIES].length;\n\t},\n\t{createCacheKey: el => el.tagName, profileName: 'isProvider'}\n);\n\nconst areProvidersInteractive = (el, componentRegistry) => {\n\tconst variables = getHostVariables(el);\n\tconst properties = variables[PROPS];\n\n\tfor (const k in properties) {\n\t\tconst value = properties[k];\n\t\tconst [id] = getSelectorParts(value);\n\t\tif (id) {\n\t\t\tconst providerEl = componentRegistry[id];\n\t\t\tif (providerEl) {\n\t\t\t\tconst providerVariables = getHostVariables(providerEl);\n\t\t\t\tif (providerVariables && !providerVariables[INTERACTIVE_TIMESTAMP]) return false;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn true;\n};\n\nconst notifySubscribers = (el, componentRegistry) => {\n\tconst variables = getHostVariables(el);\n\tconst selectabledProperties = variables[SELECTABLE_PROPERTIES];\n\tconst selectabledPropertiesLength = (selectabledProperties && selectabledProperties.length) || 0;\n\n\tfor (let i = 0; i < selectabledPropertiesLength; i++) {\n\t\tconst propertyName = selectabledProperties[i];\n\t\tconst affectedComponents = getAffected(\n\t\t\tpropertyName,\n\t\t\tvariables[COMPONENT_ID],\n\t\t\tcomponentRegistry,\n\t\t\tfalse\n\t\t);\n\n\t\tfor (const id in affectedComponents) {\n\t\t\tconst [componentId] = id.split(PROPERTY_SELECTOR_SIGIL);\n\t\t\tconst subscriberEl = componentRegistry[componentId];\n\t\t\tif (subscriberEl) markComponentInteractive(subscriberEl, componentRegistry);\n\t\t}\n\t}\n};\n\nexport default function markComponentInteractive(el, componentRegistry) {\n\tconst variables = getHostVariables(el);\n\tif (!variables || variables[INTERACTIVE_TIMESTAMP]) return;\n\n\tif (countHighPriorityTasks(el)) return false;\n\tif (countMediumPriorityTasks(el)) return false;\n\tif (pendingNetworkActionCountForHost(el)) return false;\n\n\tconst childrenToBeInteractive = variables[CHILDREN_TO_BE_INTERACTIVE];\n\tif (!childrenToBeInteractive) return false;\n\n\tfor (const k in childrenToBeInteractive) return false;\n\n\tconst providersInteractive = areProvidersInteractive(el, componentRegistry);\n\tif (!providersInteractive) return false;\n\n\tconst interactiveTimestamp = performance.now();\n\tvariables[INTERACTIVE_TIMESTAMP] = interactiveTimestamp;\n\tmark(el, createInteractionId(), metrics.INTERACTIVE, {});\n\tvariables[CONDITIONAL_DISPATCH](\n\t\tCOMPONENT_INTERACTIVE,\n\t\t{host: el, interactiveTimestamp},\n\t\t{internal: true}\n\t);\n\n\tconst parentEl = variables[ANCESTOR_ROOT_NODE];\n\tif (parentEl) {\n\t\tconst parentVariables = getHostVariables(parentEl);\n\t\tdelete parentVariables[CHILDREN_TO_BE_INTERACTIVE][variables[COMPONENT_ID]];\n\t\tmarkComponentInteractive(parentEl, componentRegistry);\n\t}\n\n\tif (isProvider(el)) notifySubscribers(el, componentRegistry);\n}\n", "import log from '../log';\nimport {CONTEXT_VIEW_KEY} from '../symbols';\n\nexport default function createOnStateChangeArgs(\n\tuseCoeffectsLikeObjectInView,\n\tcomponentId,\n\tstate,\n\tcontext,\n\thelpers,\n\thost\n) {\n\tif (useCoeffectsLikeObjectInView) {\n\t\tconst {properties} = state;\n\t\tconst stateSansProperties = {...state};\n\t\tdelete stateSansProperties.properties;\n\n\t\treturn [{state: stateSansProperties, properties, context, ...helpers, host}, undefined];\n\t}\n\n\tlet contextKey = 'context';\n\tif (state.context) {\n\t\tcontextKey = CONTEXT_VIEW_KEY;\n\t\tconst message =\n\t\t\t'A \"context\" property key already exists in the view derived state object. The context value was assigned to a symbol.' +\n\t\t\t' The symbol constant, \"contextViewKey\", can imported from @servicenow/ui-core.';\n\t\tlog(message, {host, origin: 'createOnStateChangeArgs'});\n\t}\n\n\treturn [{componentId, ...state, [contextKey]: context}, helpers];\n}\n", "import getHostVariables from './getHostVariables';\nimport {ANCESTOR_ROOT_NODE} from '../symbols';\n\nexport default function getAncestorNode(host) {\n\treturn getHostVariables(host)[ANCESTOR_ROOT_NODE];\n}\n", "const updateCustomElementResolvers = {};\nconst updateCustomElementObservers = {};\n// eslint-disable-next-line prefer-destructuring\nconst HMR_ENABLED = process.env.HMR_ENABLED;\n\nexport function addUpdateCustomElementObserver(tagName, observer) {\n\tif (HMR_ENABLED) {\n\t\tconst observers = (updateCustomElementObservers[tagName] =\n\t\t\tupdateCustomElementObservers[tagName] || new Set());\n\t\tobservers.add(observer);\n\t\treturn () => observers.delete(observer);\n\t}\n}\n\nexport function setUpdateConfigResolver(tagName, resolver) {\n\tif (HMR_ENABLED) {\n\t\tupdateCustomElementResolvers[tagName] = resolver;\n\t}\n}\n\nlet unstableUpdateCustomElement;\nif (HMR_ENABLED) {\n\tunstableUpdateCustomElement = (tagName, config = {}, meta = {}) => {\n\t\tif (!updateCustomElementResolvers[tagName]) {\n\t\t\treturn {\n\t\t\t\taccept: false,\n\t\t\t\treason: `unknown tag \"${tagName}\"`\n\t\t\t};\n\t\t}\n\t\tconst {supportedConfigKeys, modifiedConfig} = updateCustomElementResolvers[tagName](\n\t\t\tconfig,\n\t\t\tmeta\n\t\t);\n\t\tconst modifiedConfigKeys = Object.keys(modifiedConfig);\n\t\tif (modifiedConfigKeys.length === 0) {\n\t\t\treturn {\n\t\t\t\taccept: true,\n\t\t\t\treason: 'nothing updated'\n\t\t\t};\n\t\t}\n\t\tconst unsupportedConfigKeys = modifiedConfigKeys.filter(\n\t\t\tkey => !supportedConfigKeys.includes(key)\n\t\t);\n\t\tif (unsupportedConfigKeys.length > 0) {\n\t\t\treturn {\n\t\t\t\taccept: false,\n\t\t\t\treason: `unsupported config: [${unsupportedConfigKeys.join(', ')}]`\n\t\t\t};\n\t\t}\n\t\tfor (const observer of updateCustomElementObservers[tagName]) {\n\t\t\tobserver(modifiedConfig);\n\t\t}\n\t\treturn {\n\t\t\taccept: true,\n\t\t\treason: `updated config: [${modifiedConfigKeys.join(', ')}]`\n\t\t};\n\t};\n}\n\nlet unstableRemoveUpdateForTag;\nif (process.env.NODE_ENV === 'test') {\n\tunstableRemoveUpdateForTag = tagName => {\n\t\tdelete updateCustomElementResolvers[tagName];\n\t\tdelete updateCustomElementObservers[tagName];\n\t};\n}\n\nexport {unstableUpdateCustomElement, unstableRemoveUpdateForTag};\n", "import {SPAN_KIND_CLIENT, SPAN_LEVEL_FINE} from '../constants';\n\nexport default function getSpanOptions(host, level = SPAN_LEVEL_FINE) {\n\treturn {\n\t\tattributes: {\n\t\t\ttagName: host.tagName?.toLowerCase(),\n\t\t\tcomponentId: host.nowId,\n\t\t\t'seismic.level': level,\n\t\t\tkind: SPAN_KIND_CLIENT\n\t\t}\n\t};\n}\n", "import {createTraceId} from '@servicenow/ui-metrics';\nimport getHostVariables from './getHostVariables';\nimport {ANCESTOR_ROOT_NODE, PREVIOUS_TRACE_ID} from '../symbols';\n\nexport default function resolveParentTraceId(host) {\n\tconst variables = getHostVariables(host);\n\n\tif (variables[ANCESTOR_ROOT_NODE]) {\n\t\tconst parentVariables = getHostVariables(variables[ANCESTOR_ROOT_NODE]);\n\t\tconst traceId = parentVariables[PREVIOUS_TRACE_ID];\n\t\tif (traceId) {\n\t\t\tvariables[PREVIOUS_TRACE_ID] = traceId;\n\t\t\treturn traceId;\n\t\t}\n\t}\n\n\tconst traceId = createTraceId();\n\tif (traceId) {\n\t\tvariables[PREVIOUS_TRACE_ID] = traceId;\n\t}\n\treturn traceId;\n}\n", "const maxDepth = 6;\nconst maxArrayLength = 20;\nconst maxStringLength = 50;\nconst maxObjectSize = 10;\n\nconst isPrimitive = v => {\n\tconst t = typeof v;\n\treturn t === 'string' || t === 'number' || t === 'boolean';\n};\n\nconst transformToOtel = (data, depth = 0, seen = new WeakMap()) => {\n\ttry {\n\t\tif (typeof data === 'function') {\n\t\t\treturn 'FUNC';\n\t\t}\n\t\tif (typeof data !== 'object' || data === null) {\n\t\t\treturn data;\n\t\t}\n\n\t\t// Check for circular references\n\t\tif (seen.has(data)) {\n\t\t\treturn '[CIRCULAR]';\n\t\t}\n\n\t\t// Add current object to seen map\n\t\tseen.set(data, true);\n\n\t\t// Safely check for HTMLElement\n\t\tlet isHTMLElement = false;\n\t\tif (typeof HTMLElement !== 'undefined') {\n\t\t\ttry {\n\t\t\t\tisHTMLElement = data instanceof HTMLElement;\n\t\t\t} catch (e) {\n\t\t\t\t// Silent catch - instanceof might throw in some environments\n\t\t\t}\n\t\t}\n\n\t\tif (isHTMLElement) {\n\t\t\treturn `DOM: ${data.tagName?.toLowerCase() || 'unknown'}`;\n\t\t}\n\n\t\t// Safely check for Event\n\t\tlet isEvent = false;\n\t\tif (typeof Event !== 'undefined') {\n\t\t\ttry {\n\t\t\t\tisEvent = data instanceof Event;\n\t\t\t} catch (e) {\n\t\t\t\t// Silent catch\n\t\t\t}\n\t\t}\n\n\t\tif (isEvent) {\n\t\t\treturn `Evt: ${data.type || 'unknown'}`;\n\t\t}\n\n\t\t// Alternative detection for DOM-like objects if instanceof fails\n\t\tif (!isHTMLElement && data.nodeType === 1 && typeof data.tagName === 'string') {\n\t\t\treturn `DOM-like: ${data.tagName.toLowerCase()}`;\n\t\t}\n\n\t\tif (Array.isArray(data)) {\n\t\t\tif (data.length > maxArrayLength) return 'ARR_TOO_LG';\n\t\t\tconst len = data.length;\n\t\t\tconst out = new Array(len);\n\t\t\tfor (let i = 0; i < len; i++) {\n\t\t\t\tout[i] = transformToOtel(data[i], depth + 1, seen);\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\n\t\tconst result = {};\n\t\tlet count = 0;\n\t\tfor (const key in data) {\n\t\t\tif (Object.prototype.hasOwnProperty.call(data, key)) {\n\t\t\t\tif (count >= maxObjectSize) {\n\t\t\t\t\tresult['EXTRA_FIELDS'] = 'OBJ_TOO_LG';\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tlet value;\n\t\t\t\ttry {\n\t\t\t\t\tvalue = data[key];\n\t\t\t\t} catch (e) {\n\t\t\t\t\t// Handle properties that throw when accessed\n\t\t\t\t\tresult[key] = '[ACCESS_ERROR]';\n\t\t\t\t\tcount++;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tconst valueType = typeof value;\n\t\t\t\tif (valueType === 'string') {\n\t\t\t\t\tconst len = value.length;\n\t\t\t\t\tresult[key] = len > maxStringLength ? value.substring(0, maxStringLength) + '...' : value;\n\t\t\t\t} else if (\n\t\t\t\t\tvalueType === 'number' ||\n\t\t\t\t\tvalueType === 'boolean' ||\n\t\t\t\t\t(Array.isArray(value) &&\n\t\t\t\t\t\t(() => {\n\t\t\t\t\t\t\tfor (let i = 0; i < value.length; i++) {\n\t\t\t\t\t\t\t\tif (!isPrimitive(value[i])) return false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t})())\n\t\t\t\t) {\n\t\t\t\t\tresult[key] = value;\n\t\t\t\t} else {\n\t\t\t\t\t// Safely check for HTMLElement in object values\n\t\t\t\t\tlet isValueHTMLElement = false;\n\t\t\t\t\tif (typeof HTMLElement !== 'undefined') {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tisValueHTMLElement = value instanceof HTMLElement;\n\t\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\t\t// Silent catch\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (isValueHTMLElement) {\n\t\t\t\t\t\tresult[key] = `${value.tagName?.toLowerCase() || 'element'}`;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Safely check for Event in object values\n\t\t\t\t\t\tlet isValueEvent = false;\n\t\t\t\t\t\tif (typeof Event !== 'undefined') {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tisValueEvent = value instanceof Event;\n\t\t\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\t\t\t// Silent catch\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (isValueEvent) {\n\t\t\t\t\t\t\tresult[key] = `Evt: ${value.type || 'unknown'}`;\n\t\t\t\t\t\t} else if (typeof value === 'object' && value !== null && depth < maxDepth) {\n\t\t\t\t\t\t\tresult[key] = transformToOtel(value, depth + 1, seen);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tresult[key] = 'VAL_TOO_LG';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t} catch (error) {\n\t\treturn '[ERROR PROCESSING DATA]';\n\t}\n};\n\n/**\n * Process the data to be sent to the span as span attribute\n * @param {*} data\n * @returns string representation of the processed data\n */\nexport default function getSpanPayload(data) {\n\ttry {\n\t\tconst result = transformToOtel(data);\n\t\treturn JSON.stringify(result);\n\t} catch (error) {\n\t\treturn JSON.stringify({error: 'Failed to process span payload'});\n\t}\n}\n", "import {PROPERTIES_SET} from '../../constants';\n\nexport function isPropertyUpdate(type) {\n\treturn type === PROPERTIES_SET;\n}\n", "import {CONFIG} from '../../symbols';\nimport log from '../../log';\n\nexport function validateActionPayload(host, type, payload, hostVariables) {\n\tconst {[type]: {validate} = {}} = hostVariables[CONFIG].actions;\n\n\tif (\n\t\t(process.env.NODE_ENV !== 'production' && payload && typeof payload !== 'object') ||\n\t\tArray.isArray(payload)\n\t) {\n\t\tlog(\n\t\t\t`Expected payload of ${type} to be an Object but found ${payload}. This will result in inconsistent behavior when combined with behavior options or appendToPayload.`,\n\t\t\t{host, origin: 'validateActionPayload'}\n\t\t);\n\t}\n\n\tif (typeof validate === 'function') validate(payload, host);\n}\n", "import {\n\tSTORE_UPDATED,\n\tCOMPONENT_CONNECTED,\n\tCOMPONENT_DISCONNECTED,\n\tCOMPONENT_BOOTSTRAPPED,\n\tCOMPONENT_PROPERTY_CHANGED,\n\tCOMPONENT_RENDERED,\n\tCOMPONENT_DOM_READY,\n\tSET_INITIAL_STATE,\n\tNOW_UI_EVENT,\n\tPROPERTIES_SET,\n\tDISPATCH_EVENT,\n\tCOMPONENT_PROPERTY_UPDATE_REQUESTED,\n\tCOMPONENT_RENDER_REQUESTED\n} from '../../constants';\n\nconst internalActionTypes = [\n\tPROPERTIES_SET,\n\tDISPATCH_EVENT,\n\tSTORE_UPDATED,\n\tCOMPONENT_CONNECTED,\n\tCOMPONENT_DISCONNECTED,\n\tCOMPONENT_BOOTSTRAPPED,\n\tCOMPONENT_PROPERTY_CHANGED,\n\tCOMPONENT_RENDERED,\n\tCOMPONENT_DOM_READY,\n\tSET_INITIAL_STATE,\n\tNOW_UI_EVENT,\n\t'SEISMIC_COMPONENT_ERROR_THROWN',\n\tCOMPONENT_PROPERTY_UPDATE_REQUESTED,\n\tCOMPONENT_RENDER_REQUESTED\n];\n\n// TODO: memoize\nexport function isInternalActionType(type, internal = false) {\n\treturn internalActionTypes.includes(type) && !internal;\n}\n", "// TODO: move to const internalActionTypes.NAME\nimport {\n\tSTORE_UPDATED,\n\tCOMPONENT_CONNECTED,\n\tCOMPONENT_DISCONNECTED,\n\tCOMPONENT_BOOTSTRAPPED,\n\tCOMPONENT_PROPERTY_CHANGED,\n\tCOMPONENT_RENDERED,\n\tCOMPONENT_DOM_READY,\n\tSET_INITIAL_STATE,\n\tNOW_UI_EVENT,\n\tPROPERTIES_SET,\n\tDISPATCH_EVENT,\n\tCOMPONENT_PROPERTY_UPDATE_REQUESTED,\n\tCOMPONENT_RENDER_REQUESTED\n} from '../../constants';\n\nconst internalActionTypes = {\n\tPROPERTIES_SET,\n\tDISPATCH_EVENT,\n\tSTORE_UPDATED,\n\tCOMPONENT_CONNECTED,\n\tCOMPONENT_DISCONNECTED,\n\tCOMPONENT_BOOTSTRAPPED,\n\tCOMPONENT_PROPERTY_CHANGED,\n\tCOMPONENT_RENDERED,\n\tCOMPONENT_DOM_READY,\n\tSET_INITIAL_STATE,\n\tNOW_UI_EVENT,\n\tCOMPONENT_ERROR_THROWN: 'SEISMIC_COMPONENT_ERROR_THROWN',\n\tCOMPONENT_PROPERTY_UPDATE_REQUESTED,\n\tCOMPONENT_RENDER_REQUESTED\n};\n\n// TODO: memoize\nexport function getInternalActionName(type) {\n\tfor (const k in internalActionTypes) {\n\t\tif (internalActionTypes[k] === type) return k;\n\t}\n}\n", "import {locations} from '@servicenow/ui-internal';\nimport {getHostVariables} from '../../utils';\nimport {createMetaData} from './createMetaData';\nimport {appendToPayload} from './appendToPayload';\nimport {COMPONENT_ID} from '../../symbols';\n\nexport function createEventActionDetails(actionType, host, event, capture, eventHandler) {\n\tconst {detail = {}} = event;\n\tconst {\n\t\ttype = actionType,\n\t\tpayload = eventHandler ? appendToPayload(host, {event, host}) : undefined,\n\t\terror = null,\n\t\tmeta = createMetaData(\n\t\t\thost,\n\t\t\t{\n\t\t\t\teventHandler,\n\t\t\t\tcapture,\n\t\t\t\teffectType: locations.EVENT,\n\t\t\t\tevent,\n\t\t\t\thost,\n\t\t\t\tget path() {\n\t\t\t\t\treturn event\n\t\t\t\t\t\t.composedPath()\n\t\t\t\t\t\t.map(el => {\n\t\t\t\t\t\t\tconst hostVariables = getHostVariables(el);\n\t\t\t\t\t\t\treturn hostVariables && hostVariables[COMPONENT_ID];\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.filter(componentId => componentId);\n\t\t\t\t}\n\t\t\t},\n\t\t\tgetHostVariables(host)\n\t\t)\n\t} = detail;\n\n\treturn {type, payload, error, meta};\n}\n", "import {getInteractionId, setInteractionId} from '@servicenow/ui-metrics';\nimport {\n\tCOMPONENT_DISCONNECTED,\n\tSCHEDULE_IMMEDIATELY_DO_NOT_USE_OR_YOU_WILL_BE_IMMEDIATELY_FIRED\n} from '../../constants';\nimport {HELPERS_SCHEDULED, HELPERS_IMMEDIATE} from '../../symbols';\nimport {normalizeActionMeta, getHostVariables} from '../../utils';\n\n// this is done so that we don't break anyone dispatching from a disconnect\n// function or action handler; people are relying on this to unsubscribe from\n// AMB and other types of clean up. the AMB effect should be changed into a\n// behavior that has a COMPONENT_DISCONNECTED handler, so that people don't\n// have to manually clean up or rely on this broken functionality.\nexport function wrapDispatch(host, action) {\n\tconst hostVariables = getHostVariables(host);\n\tconst interactionId = getInteractionId(action.meta);\n\tconst helpers = action.meta[SCHEDULE_IMMEDIATELY_DO_NOT_USE_OR_YOU_WILL_BE_IMMEDIATELY_FIRED]\n\t\t? hostVariables[HELPERS_IMMEDIATE]\n\t\t: hostVariables[HELPERS_SCHEDULED];\n\tconst {\n\t\tupdateState: originalUpdateState,\n\t\tupdateProperties: originalUpdateProperties,\n\t\tupdateContext: originalUpdateContext,\n\t\tdispatch: originalDispatch,\n\t\tlogger\n\t} = helpers;\n\tconst updateState = (...args) => originalUpdateState(...args, {interactionId});\n\tconst updateProperties = (...args) => originalUpdateProperties(...args, {interactionId});\n\tconst updateContext = (...args) => originalUpdateContext(...args, {interactionId});\n\tlet dispatch;\n\n\tif (\n\t\taction.type !== COMPONENT_DISCONNECTED &&\n\t\t!action.meta[SCHEDULE_IMMEDIATELY_DO_NOT_USE_OR_YOU_WILL_BE_IMMEDIATELY_FIRED]\n\t) {\n\t\tdispatch = (type, payload, meta = {}, error) => {\n\t\t\t// eslint-disable-next-line no-param-reassign\n\t\t\tmeta = normalizeActionMeta(meta, {host});\n\t\t\tmeta.parentActionId = action.meta.actionId;\n\t\t\tsetInteractionId(meta, interactionId);\n\t\t\treturn originalDispatch(type, payload, meta, error);\n\t\t};\n\t} else {\n\t\tdispatch = (type, payload, meta = {}, error) => {\n\t\t\t// eslint-disable-next-line no-param-reassign\n\t\t\tmeta = normalizeActionMeta(meta, {host});\n\t\t\tsetInteractionId(meta, interactionId);\n\t\t\tmeta.parentActionId = action.meta.actionId;\n\t\t\tmeta[SCHEDULE_IMMEDIATELY_DO_NOT_USE_OR_YOU_WILL_BE_IMMEDIATELY_FIRED] = true; // eslint-disable-line no-param-reassign\n\t\t\treturn originalDispatch(type, payload, meta, error);\n\t\t};\n\t}\n\n\tdispatch.updateState = updateState;\n\tdispatch.updateProperties = updateProperties;\n\tdispatch.updateContext = updateContext;\n\tdispatch.logger = logger;\n\n\treturn {\n\t\tupdateState,\n\t\tupdateProperties,\n\t\tupdateContext,\n\t\tdispatch,\n\t\tlogger\n\t};\n}\n", "export default function isStoreUpdate(actionType) {\n\treturn actionType === 'STORE_UPDATED';\n}\n", "import {TARGETED_ACTION_TYPES} from '../../symbols';\n\nexport function hasActionHandlerForType(hostVariables, type) {\n\treturn hostVariables[TARGETED_ACTION_TYPES].some(actionType => actionType === type);\n}\n", "import {SEISMIC_HOIST_TAG_NAME} from '../../constants';\n\nexport function wasActionDispatchedByDescendant(composedPath, host) {\n\t/*\n\t\taction was dispatched from within hook or event handlers in view\n\n\t\tview(state, {dispatch}) {\n\t\t\treturn (\n\t\t\t\t<div>\n\t\t\t\t\t<p on-click={() => dispatch('SN-BUTTON#BUTTON_CLICKED', {})}>I am a paragraph. Click me.</p>\n\t\t\t\t</div>\n\t\t\t);\n\t\t}\n\t */\n\tif (!composedPath.length) return true;\n\n\tlet slotted = false;\n\tfor (let i = 0; i < composedPath.length; i++) {\n\t\tconst el = composedPath[i];\n\t\tif (el.tagName === 'SLOT') slotted = true;\n\n\t\tif (el.host) {\n\t\t\t/*\n\t\t\t\tif the first shadowRoot encountered belongs to the host and a slot is not in the path\n\t\t\t\te.g., button dispatches and component that owns view should handle\n\n\t\t\t\tview() {\n\t\t\t\t\treturn <p><sn-button></sn-button></p>;\n\t\t\t\t}\n\t\t\t */\n\t\t\tif (el.host === host || el.host.tagName === SEISMIC_HOIST_TAG_NAME)\n\t\t\t\treturn slotted ? false : true;\n\n\t\t\t/*\n\t\t\t\tif content is slotted and first shadowRoot encountered does not belong to the host\n\t\t\t\te.g., button dispatches and component that owns view should handle\n\n\t\t\t\tview() {\n\t\t\t\t\treturn <slotted-child><sn-button></sn-button></slotted-child>;\n\t\t\t\t},\n\t\t\t */\n\t\t\treturn slotted ? true : false;\n\t\t}\n\t}\n}\n", "import {getHostVariables} from '../../utils';\nimport {addActionHandler} from '../customEventActionHandler';\nimport {onAction} from '../onAction';\nimport {COMPONENT_ACTION_DISPATCHED} from '../../constants';\nimport {\n\tRUNTIME_ACTION_HANDLERS,\n\tTARGETED_ACTION_TYPES,\n\tANCESTOR_ROOT_NODE,\n\tCONFIG,\n\tACTION_HANDLERS,\n\tPRESENTATIONAL\n} from '../../symbols';\n\nconst shouldApplyActionHandler = (hostVariables, type) =>\n\t!hostVariables[PRESENTATIONAL] &&\n\t!hostVariables[RUNTIME_ACTION_HANDLERS].includes(type) &&\n\thostVariables[TARGETED_ACTION_TYPES].includes(COMPONENT_ACTION_DISPATCHED);\n\nconst createActionHandler = (host, hostVariables, type) => {\n\thostVariables[RUNTIME_ACTION_HANDLERS].push(type);\n\n\tif (\n\t\thostVariables[CONFIG].interceptors[type] &&\n\t\thostVariables[CONFIG].interceptors[type].has('host')\n\t) {\n\t\tconst interceptors = [\n\t\t\t...hostVariables[CONFIG].interceptors[type].get('host'),\n\t\t\t...hostVariables[CONFIG].interceptors[COMPONENT_ACTION_DISPATCHED].get('host')\n\t\t];\n\t\thostVariables[CONFIG].interceptors[type].set('host', interceptors);\n\t\treturn;\n\t}\n\n\thostVariables[CONFIG].interceptors[type] =\n\t\thostVariables[CONFIG].interceptors[COMPONENT_ACTION_DISPATCHED]; // eslint-disable-line no-param-reassign\n\tconst removeActionHandler = addActionHandler(host, 'host', host, type, false, false, onAction);\n\thostVariables[ACTION_HANDLERS].push(removeActionHandler);\n\thostVariables[TARGETED_ACTION_TYPES] = [...hostVariables[TARGETED_ACTION_TYPES], type]; // eslint-disable-line no-param-reassign\n};\n\nexport function applyRuntimeActionHandlers(host, type) {\n\tlet parent = host;\n\tlet parentVariables = getHostVariables(parent);\n\n\twhile (parent) {\n\t\tif (shouldApplyActionHandler(parentVariables, type))\n\t\t\tcreateActionHandler(parent, parentVariables, type);\n\n\t\tparent = parentVariables[ANCESTOR_ROOT_NODE];\n\t\tparentVariables = getHostVariables(parent);\n\t}\n}\n", "import {createEventActionDetails} from './utils';\nimport {CONFIG, HOIST_COMPOSED_PATH} from '../symbols';\nimport {SEISMIC_HOIST_TAG_NAME, PROPAGATION_STOPPED, DEFAULT_PREVENTED} from '../constants';\nimport {getHostVariables, emitNowUiEvent} from '../utils';\n\nconst allowedPropertyUpdates = ['payload', 'error', 'meta'];\n\nexport function getPath(meta, host) {\n\tif (meta.event.path) return meta.event.path;\n\n\tconst path = [];\n\tlet el = host;\n\tlet parentNode = el.parentNode || el.host;\n\twhile (parentNode) {\n\t\tpath.push(el);\n\t\tel = parentNode;\n\t\tparentNode = el.parentNode || el.host;\n\t}\n\n\treturn [...path, document, window];\n}\n\nexport function getComposedPath(meta, host) {\n\tconst hoistComposedPath = meta[HOIST_COMPOSED_PATH];\n\n\tif (!hoistComposedPath) return meta.event.composedPath();\n\n\tconst composedPath = [];\n\tfor (let i = 0; i < hoistComposedPath.length; i++) {\n\t\tconst el = hoistComposedPath[i];\n\t\tif (el.tagName === SEISMIC_HOIST_TAG_NAME) break;\n\n\t\tcomposedPath.push(el);\n\t}\n\n\treturn [...composedPath, ...getPath(meta, host)];\n}\n\nexport function addActionHandler(\n\ttargetEl,\n\ttargetSelector,\n\thost,\n\ttype,\n\tcapture,\n\teventHandler,\n\thandler\n) {\n\tconst hostVariables = getHostVariables(host);\n\tconst listener = event => {\n\t\tconst config = hostVariables[CONFIG];\n\t\tconst detail = createEventActionDetails(type, host, event, capture, eventHandler);\n\t\tconst emitPropagationStopped = () => {\n\t\t\temitNowUiEvent(PROPAGATION_STOPPED, {host, action: detail});\n\t\t};\n\t\thandler(\n\t\t\ttargetEl,\n\t\t\ttargetSelector,\n\t\t\thost,\n\t\t\ttype,\n\t\t\tnew Proxy(\n\t\t\t\t{\n\t\t\t\t\t...detail,\n\t\t\t\t\tstopPropagation() {\n\t\t\t\t\t\temitPropagationStopped();\n\t\t\t\t\t\treturn event.stopPropagation();\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tget(action, key) {\n\t\t\t\t\t\tconst {payload, meta} = action;\n\t\t\t\t\t\tif (key === 'defaultPrevented') {\n\t\t\t\t\t\t\treturn payload && payload.event\n\t\t\t\t\t\t\t\t? payload.event.defaultPrevented\n\t\t\t\t\t\t\t\t: event.defaultPrevented;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (key === 'preventDefault') {\n\t\t\t\t\t\t\treturn function preventDefault() {\n\t\t\t\t\t\t\t\temitNowUiEvent(DEFAULT_PREVENTED, {host, action});\n\t\t\t\t\t\t\t\treturn payload && payload.event\n\t\t\t\t\t\t\t\t\t? payload.event.preventDefault()\n\t\t\t\t\t\t\t\t\t: event.preventDefault();\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (key === 'composedPath') return () => getComposedPath(meta, host);\n\n\t\t\t\t\t\treturn action[key];\n\t\t\t\t\t},\n\t\t\t\t\tset(action, key, value) {\n\t\t\t\t\t\tif (allowedPropertyUpdates.includes(key)) {\n\t\t\t\t\t\t\taction[key] = value; // eslint-disable-line no-param-reassign\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t)\n\t\t);\n\n\t\tif (config && config.shouldStopPropagation[type]) {\n\t\t\temitPropagationStopped();\n\t\t\tevent.stopPropagation();\n\t\t}\n\t};\n\n\ttargetEl.addEventListener(type, listener, capture);\n\n\treturn function removeActionHandler() {\n\t\ttargetEl.removeEventListener(type, listener, capture);\n\t};\n}\n", "import * as uiAnalyticsConsumer from '@servicenow/ui-analytics-consumer';\nimport {applyInteractionId} from '@servicenow/ui-metrics';\nimport {beforeNextTick, emitNowUiEvent, getSpanOptions} from '../utils';\nimport {createContext} from './createContext';\nimport {\n\tCOMPONENT_ID,\n\tCONFIG,\n\tDISPATCH,\n\tRETARGETED_ACTION_TYPES,\n\tBOOTSTRAPPED_HANDLED,\n\tCONNECTED_HANDLED\n} from '../symbols';\nimport {sandboxEffect} from './sandboxEffect';\nimport {\n\tACTION_HANDLED,\n\tCOMPONENT_BOOTSTRAPPED,\n\tCOMPONENT_CONNECTED,\n\tCOMPONENT_DISCONNECTED,\n\tSEISMIC_HOIST_TAG_NAME,\n\tCOMPONENT_PROPERTY_UPDATE_REQUESTED,\n\tCOMPONENT_RENDER_REQUESTED,\n\tCOMPONENT_TREE_RENDERED,\n\tCOMPONENT_RENDERED,\n\tCOMPONENT_DOM_READY,\n\tCOMPONENT_DOM_TREE_READY,\n\tSPAN_KIND_CLIENT,\n\tSPAN_FOR_ACTION_HANDLED,\n\tSPAN_ATTR_DISPATCH_ACTION_TYPE,\n\tSPAN_ATTR_COMPONENT_EVENT_DEFAULT_PREVENTED,\n\tSPAN_ATTR_COMPONENT_EVENT_PROPAGATION_STOPPED\n} from '../constants';\nimport {normalizeActionHandler} from '../utils/config/normalizeActionHandler';\nimport getHostVariables from '../utils/getHostVariables';\nimport {addActionHandler} from './customEventActionHandler';\nimport {onActionHoisted} from './onActionHoisted';\nimport {wasActionDispatchedByDescendant} from './utils';\nconst {tracer, context} = uiAnalyticsConsumer;\n\n// defer the execution of the origin handler to support preventDefault\nfunction runEffects(fn, isOrigin) {\n\treturn isOrigin ? beforeNextTick(context.bind(() => fn())) : fn();\n}\n\nexport function onAction(targetEl, targetSelector, host, actionType, action = {}) {\n\tconst hostVariables = getHostVariables(host);\n\tconst {type = actionType, meta = {path: [], eventHandler: false}} = action;\n\tconst {path, eventHandler, event, capture} = meta;\n\tconst [origin] = path;\n\tconst isOrigin = hostVariables[COMPONENT_ID] === origin;\n\n\tif (eventHandler)\n\t\t// interaction ids aren't applied to native events dispacthed by the browser\n\t\tapplyInteractionId(meta);\n\n\tconst isImmediate = [\n\t\tCOMPONENT_DISCONNECTED,\n\t\tCOMPONENT_DOM_READY,\n\t\tCOMPONENT_DOM_TREE_READY,\n\t\tCOMPONENT_TREE_RENDERED,\n\t\tCOMPONENT_RENDERED,\n\t\tCOMPONENT_RENDER_REQUESTED,\n\t\tCOMPONENT_PROPERTY_UPDATE_REQUESTED\n\t].includes(actionType);\n\n\tif (event && !eventHandler) {\n\t\tconst hoistElm = event.composedPath().find(elem => elem.tagName === SEISMIC_HOIST_TAG_NAME);\n\t\tconst hoistElmVariables = getHostVariables(hoistElm);\n\t\tif (\n\t\t\thoistElm &&\n\t\t\thoistElmVariables &&\n\t\t\t!hoistElmVariables[RETARGETED_ACTION_TYPES].some(actionType => actionType === type)\n\t\t) {\n\t\t\taddActionHandler(\n\t\t\t\thoistElm,\n\t\t\t\ttargetSelector,\n\t\t\t\thoistElm.sourceElement,\n\t\t\t\ttype,\n\t\t\t\tcapture,\n\t\t\t\teventHandler,\n\t\t\t\tonActionHoisted\n\t\t\t);\n\t\t\thoistElmVariables[RETARGETED_ACTION_TYPES] = [\n\t\t\t\t...hoistElmVariables[RETARGETED_ACTION_TYPES],\n\t\t\t\ttype\n\t\t\t];\n\t\t}\n\t}\n\trunEffects(() => {\n\t\tconst startTime = performance.now();\n\t\tconst interceptors =\n\t\t\thostVariables[CONFIG].interceptors[type] &&\n\t\t\thostVariables[CONFIG].interceptors[type].has(targetSelector)\n\t\t\t\t? hostVariables[CONFIG].interceptors[type].get(targetSelector)\n\t\t\t\t: null;\n\n\t\tif (!interceptors || !interceptors.length) {\n\t\t\treturn;\n\t\t}\n\n\t\ttracer.startActiveSpan(\n\t\t\tSPAN_FOR_ACTION_HANDLED,\n\t\t\t{\n\t\t\t\t...getSpanOptions(host),\n\t\t\t\tkind: SPAN_KIND_CLIENT\n\t\t\t},\n\t\t\tactiveSpan => {\n\t\t\t\tactiveSpan.setAttribute(SPAN_ATTR_DISPATCH_ACTION_TYPE, type);\n\t\t\t\tconst {length: interceptorCount} = interceptors;\n\t\t\t\tif ((isOrigin && action.defaultPrevented) || (!isOrigin && action.propagationStopped)) {\n\t\t\t\t\tif (isOrigin) {\n\t\t\t\t\t\tactiveSpan.setAttribute(SPAN_ATTR_COMPONENT_EVENT_DEFAULT_PREVENTED, true);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tactiveSpan.setAttribute(SPAN_ATTR_COMPONENT_EVENT_PROPAGATION_STOPPED, true);\n\t\t\t\t\t}\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (actionType === COMPONENT_BOOTSTRAPPED) hostVariables[BOOTSTRAPPED_HANDLED] = true; // eslint-disable-line no-param-reassign\n\t\t\t\tif (actionType === COMPONENT_CONNECTED) hostVariables[CONNECTED_HANDLED] = true; // eslint-disable-line no-param-reassign\n\n\t\t\t\tconst context = createContext(host, action);\n\t\t\t\tlet ctx = context;\n\t\t\t\tfor (let i = 0; i < interceptorCount; i++) {\n\t\t\t\t\tconst interceptor = interceptors[i];\n\t\t\t\t\tctx = interceptor.fn(ctx) || ctx;\n\t\t\t\t}\n\n\t\t\t\tconst {effects} = ctx;\n\t\t\t\tconst {length: effectCount} = effects;\n\t\t\t\tfor (let i = 0; i < effectCount; i++) {\n\t\t\t\t\tconst effect = effects[i];\n\t\t\t\t\tif (typeof effect === 'function') {\n\t\t\t\t\t\tconst normalizedEffect = normalizeActionHandler(effect, host.tagName.toLowerCase());\n\t\t\t\t\t\tsandboxEffect(\n\t\t\t\t\t\t\tnormalizedEffect,\n\t\t\t\t\t\t\thostVariables[DISPATCH],\n\t\t\t\t\t\t\taction,\n\t\t\t\t\t\t\thost\n\t\t\t\t\t\t)(...normalizedEffect.args);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (\n\t\t\t\t\t\t!effect.descendantOnly ||\n\t\t\t\t\t\twasActionDispatchedByDescendant(action.composedPath(), host)\n\t\t\t\t\t) {\n\t\t\t\t\t\tsandboxEffect(effect, hostVariables[DISPATCH], action, host)(...effect.args);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tconst endTime = performance.now();\n\t\t\t\temitNowUiEvent(ACTION_HANDLED, {\n\t\t\t\t\thost,\n\t\t\t\t\taction,\n\t\t\t\t\ttargetSelector,\n\t\t\t\t\tinterceptors,\n\t\t\t\t\tcontext: ctx,\n\t\t\t\t\tduration: endTime - startTime\n\t\t\t\t});\n\t\t\t}\n\t\t);\n\t}, isOrigin && !eventHandler && !isImmediate);\n}\n", "import {STATE} from '../symbols';\nimport {getHostVariables} from '../utils';\nimport {wrapDispatch} from './utils';\nimport createContextProxy from '../context/createContextProxy';\n\nexport function createContext(host, action) {\n\tconst properties = host.getResolvedProperties();\n\tconst hostVariables = getHostVariables(host);\n\n\treturn {\n\t\tcoeffects: {\n\t\t\tstate: {...hostVariables[STATE], properties: host.getProperties()},\n\t\t\tcontext: createContextProxy(host),\n\t\t\tproperties,\n\t\t\thost,\n\t\t\taction,\n\t\t\t...wrapDispatch(host, action)\n\t\t},\n\t\teffects: []\n\t};\n}\n", "import {memoize} from '@servicenow/ui-internal';\nimport log from '../log';\nimport {addConsumer} from './consumers';\nimport {prefix} from './createContext';\nimport {getContext} from './contexts';\n\nconst shouldNotResolveContext = memoize(key => !key.toString().includes(prefix), {\n\tprofileName: 'shouldNotResolveContext'\n});\n\nexport default function createContextProxy(host) {\n\treturn new Proxy(\n\t\t{},\n\t\t{\n\t\t\tget(target, prop) {\n\t\t\t\tif (shouldNotResolveContext(prop)) {\n\t\t\t\t\tif (process.env.NODE_ENV !== 'production') {\n\t\t\t\t\t\tlog(\n\t\t\t\t\t\t\t`The context ${prop.toString()} could not be accessed. Context must be defined using the \"createContext\" function. \"createContext\" can imported from @servicenow/ui-core.`,\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\thost: this,\n\t\t\t\t\t\t\t\torigin: 'createContextProxy'\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn target[prop];\n\t\t\t\t}\n\n\t\t\t\taddConsumer(prop, host);\n\t\t\t\treturn getContext(prop);\n\t\t\t},\n\t\t\tset(target, prop) {\n\t\t\t\tif (process.env.NODE_ENV !== 'production') {\n\t\t\t\t\tlog(`Cannot set context value ${prop.toString()}. updateContext must be used.`, {\n\t\t\t\t\t\thost: this,\n\t\t\t\t\t\torigin: 'createContextProxy'\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t);\n}\n", "const consumerCache = {};\n\nexport const addConsumer = (key, host) => {\n\tif (!consumerCache[key]) {\n\t\tconsumerCache[key] = new Set();\n\t\treturn consumerCache[key].add(host);\n\t} else if (consumerCache[key].has(host)) {\n\t\treturn;\n\t}\n\n\tconsumerCache[key].add(host);\n};\n\nexport const removeConsumer = host => {\n\tReflect.ownKeys(consumerCache).forEach(k => {\n\t\tif (consumerCache[k].has(host)) {\n\t\t\tconsumerCache[k].delete(host);\n\t\t}\n\t});\n};\n\nexport const getConsumers = key => {\n\treturn (consumerCache[key] && consumerCache[key].values()) || new Set().values();\n};\n\nexport const removeConsumersForContextKey = key => {\n\tif (consumerCache[key]) consumerCache[key].clear();\n};\n\nexport const removeAllConsumers = () => {\n\tReflect.ownKeys(consumerCache).forEach(k => {\n\t\tdelete consumerCache[k];\n\t});\n};\n", "import contexts from './contexts';\nimport buildContextValidator from '../utils/schema/build/buildContextValidator';\nimport {guid} from '@servicenow/ui-internal';\n\nexport const prefix = guid();\n\nexport default function createContext(name, definition = {}) {\n\tconst key = Symbol(`${prefix}_${name}`);\n\tcontexts.set(key, {...definition, validate: buildContextValidator(definition.schema)});\n\treturn key;\n}\n", "import {CONTEXT_RESOLVED_VALUE} from '../symbols';\nimport log from '../log';\n\nconst contexts = new Map();\nconst getContext = contextKey => {\n\tif (contexts.has(contextKey)) {\n\t\tconst context = contexts.get(contextKey) || {};\n\t\tconst resolvedValue = context[CONTEXT_RESOLVED_VALUE];\n\t\tif (resolvedValue !== undefined) {\n\t\t\treturn resolvedValue;\n\t\t} else if (context.default !== undefined) {\n\t\t\treturn context.default;\n\t\t}\n\t}\n\treturn undefined;\n};\n\nconst setContext = (contextKey, value) => {\n\tif (contexts.has(contextKey)) {\n\t\tcontexts.get(contextKey)[CONTEXT_RESOLVED_VALUE] = value;\n\t} else {\n\t\tif (process.env.NODE_ENV !== 'production') {\n\t\t\tlog(\n\t\t\t\t`The context \"${contextKey?.toString()}\" could not be accessed. Context must be defined using the \"createContext\" function. \"createContext\" can imported from @servicenow/ui-core.`,\n\t\t\t\t{\n\t\t\t\t\torigin: 'context'\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t}\n};\n\nexport default contexts;\nexport {getContext, setContext};\n", "import {getInteractionId} from '@servicenow/ui-metrics';\nimport {dispatchError, locations} from '@servicenow/ui-internal';\nimport log from '../log';\nimport {effectRunner} from '../effects';\n\nfunction sandboxEffect(effect, dispatch, action, host) {\n\tconst {\n\t\ttype: actionType,\n\t\tmeta: {effectType = ''},\n\t\tpayload = {}\n\t} = action;\n\tlet location = '';\n\tlet details = {};\n\n\tif (effectType === locations.EVENT) {\n\t\tconst {event} = payload;\n\t\tconst {type} = event;\n\t\tlocation = locations.EVENT;\n\t\tdetails = {type, event};\n\t} else {\n\t\tlocation = locations.EFFECT;\n\t\tdetails = {actionType};\n\t}\n\n\treturn function sandboxedEffect(...args) {\n\t\ttry {\n\t\t\t// there can be multiple handlers for a given action type defined\n\t\t\t// by multiple behaviors; we only want to apply the options specific\n\t\t\t// to the effects for a single behavior, type, and effect combination\n\t\t\tconst {options} = effect;\n\t\t\tif (options) {\n\t\t\t\tconst {payload, meta} = args[args.length - 1].action;\n\n\t\t\t\tif (meta.options === null || meta.options === undefined) meta.options = options;\n\n\t\t\t\tif (payload === null || payload === undefined) {\n\t\t\t\t\targs[args.length - 1].action.payload = {options}; // eslint-disable-line no-param-reassign\n\t\t\t\t} else if (typeof payload === 'object') {\n\t\t\t\t\t// TODO: payload.options could have be applied from a previous behavior\n\t\t\t\t\t// or it could be part of the payload dispatched; not sure what to log\n\t\t\t\t\t// or how to properly handle this scenario. if options were part of the metadata\n\t\t\t\t\t// instead it would solved the problem.\n\t\t\t\t\t// if (typeof payload.options === 'object')\n\t\t\t\t\tpayload.options = options;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst transactionCtx = {\n\t\t\t\tinteractionId: getInteractionId(action.meta),\n\t\t\t\thost,\n\t\t\t\ttype: action.type,\n\t\t\t\tspan: action.meta.span\n\t\t\t};\n\t\t\teffectRunner(effect, transactionCtx, ...args);\n\t\t} catch (error) {\n\t\t\tdispatchError(error, {\n\t\t\t\tdispatch,\n\t\t\t\thost,\n\t\t\t\tlocation,\n\t\t\t\tdetails,\n\t\t\t\tmetadata: {internal: true},\n\t\t\t\tlog\n\t\t\t});\n\t\t}\n\t};\n}\n\nexport {sandboxEffect};\n", "import effectRunner from './effectRunner';\nimport {modifierTypes} from './modifiers';\n\nexport {effectRunner, modifierTypes};\n", "import {\n\tdebounce,\n\ttakeLatest,\n\tthrottle,\n\tgetTargetElement,\n\thostMap,\n\tmodifierTypes\n} from './modifiers';\nimport runEffect from './runEffect';\n\nexport default function effectRunner(effect, ctx, ...args) {\n\tconst {effect: effectFn, modifier = {}} = effect;\n\tconst coeffects = args[args.length - 1];\n\tif (!coeffects) return runEffect(effectFn, args, ctx);\n\n\tconst targetElement = getTargetElement(coeffects);\n\tswitch (modifier.name) {\n\t\tcase modifierTypes.DEBOUNCE:\n\t\t\treturn debounce(\n\t\t\t\ttargetElement,\n\t\t\t\tcoeffects.action.type,\n\t\t\t\teffectFn,\n\t\t\t\tmodifier,\n\t\t\t\tctx,\n\t\t\t\trunEffect\n\t\t\t)(...args);\n\t\tcase modifierTypes.TAKE_LATEST:\n\t\t\treturn runEffect(takeLatest(targetElement, coeffects.action.type, effectFn), args, ctx).then(\n\t\t\t\t() => {\n\t\t\t\t\tdelete hostMap.get(targetElement).get(effectFn)[coeffects.action.type];\n\t\t\t\t}\n\t\t\t);\n\t\tcase modifierTypes.THROTTLE:\n\t\t\treturn throttle(\n\t\t\t\ttargetElement,\n\t\t\t\tcoeffects.action.type,\n\t\t\t\teffectFn,\n\t\t\t\tmodifier,\n\t\t\t\tctx,\n\t\t\t\trunEffect\n\t\t\t)(...args);\n\t\tdefault:\n\t\t\treturn runEffect(effectFn, args, ctx);\n\t}\n}\n", "import debounce from './debounce';\nimport takeLatest from './takeLatest';\nimport throttle from './throttle';\nimport getTargetElement from './getTargetElement';\nimport hostMap from './hostMap';\nimport * as modifierTypes from './types';\n\nexport {debounce, takeLatest, throttle, getTargetElement, hostMap, modifierTypes};\n", "import {allLogTypes as logTypes, defer} from '@servicenow/ui-internal';\nimport hostMap from './hostMap';\nimport log from '../../log';\nimport {timingMetricTypes, logTimingMetrics} from '@servicenow/ui-metrics';\n\nfunction createDebounce(fn, {delay = 0, maxWait, collate = false}, host, ctx, runEffectFn) {\n\tlet debounceVariables = getDebounceVariables();\n\tconst validMaxWait = Number.isInteger(maxWait);\n\tconst shouldCollate = collate === true;\n\tconst tDelay = !Number.isInteger(delay) ? 0 : delay;\n\tconst tMaxWait = validMaxWait ? maxWait : 0;\n\n\tconst componentName = host?.tagName;\n\tlogTimingMetrics(timingMetricTypes.DEBOUNCE, tDelay, componentName);\n\n\tif (validMaxWait && tMaxWait < tDelay) {\n\t\tlog(\n\t\t\t'For the debounce modifier configurations, the property maxWait should be greater than the property delay.',\n\t\t\t{level: logTypes.WARN, host, origin: 'debounce'}\n\t\t);\n\t}\n\n\tconst finishDebounce = fn => {\n\t\tinvokeFn(shouldCollate, debounceVariables, runEffectFn, fn, ctx);\n\t\tdebounceVariables = getDebounceVariables();\n\t};\n\n\tconst collateData = coeffects => {\n\t\tconst {\n\t\t\taction: {payload = {}}\n\t\t} = coeffects;\n\t\tdebounceVariables.collated.push({action: {payload}});\n\t};\n\n\treturn function debouncedEffect(...args) {\n\t\tclearTimeout(debounceVariables.delayId);\n\t\tdebounceVariables.lastArgs = args;\n\t\tdebounceVariables.saveEventProps();\n\t\tif (shouldCollate) collateData(args[args.length - 1]);\n\t\tdebounceVariables.delayId = defer(() => finishDebounce(fn), tDelay);\n\t\tif (validMaxWait && tMaxWait && !debounceVariables.maxWaitId)\n\t\t\tdebounceVariables.maxWaitId = defer(() => finishDebounce(fn), tMaxWait);\n\t};\n}\n\nconst invokeFn = (accumulate, debounceVariables, runEffectFn, fn, ctx) => {\n\tdebounceVariables.retrieveEventProps();\n\tconst {collated, lastArgs} = debounceVariables;\n\tclearTimers(debounceVariables);\n\tif (accumulate && lastArgs && lastArgs.length > 0) {\n\t\tconst coeffects = lastArgs[lastArgs.length - 1];\n\t\tcoeffects.collated = collated;\n\t}\n\n\t// defensive check for defer when throttled\n\t// nextTick not cancellable so lastArgs can be null from previous invocation\n\tif (lastArgs) runEffectFn(fn, lastArgs, ctx);\n};\n\nconst clearTimers = ({delayId, maxWaitId}) => {\n\tclearTimeout(delayId);\n\tclearTimeout(maxWaitId);\n};\n\nconst getDebounceVariables = () => ({\n\tdelayId: null,\n\tmaxWaitId: null,\n\tlastArgs: null,\n\tcollated: [],\n\tevent: {\n\t\teventPath: [],\n\t\tcurrentTarget: null\n\t},\n\tsaveEventProps() {\n\t\tif (!this.lastArgs || this.lastArgs.length === 0) return;\n\t\tconst coeffects = this.lastArgs[this.lastArgs.length - 1];\n\t\tconst event = coeffects.action?.payload.event;\n\t\tthis.event.eventPath = event?.composedPath();\n\t\tthis.event.currentTarget = event?.currentTarget;\n\t},\n\tretrieveEventProps() {\n\t\tif (!this.lastArgs || this.lastArgs.length === 0) return;\n\t\tconst coeffects = this.lastArgs[this.lastArgs.length - 1];\n\t\tconst event = coeffects.action?.payload.event;\n\t\tif (typeof event === 'undefined') return;\n\t\tevent.composedPath = () => this.event.eventPath;\n\t\tObject.defineProperty(event, 'currentTarget', {\n\t\t\tvalue: this.event.currentTarget,\n\t\t\twritable: false\n\t\t});\n\t}\n});\n\n/**\n * Debounce modifier for effect functions\n *\n * @param host\n * @param actionType\n * @param effectFn\n * @param modifier\n */\nexport default function debounce(host, actionType, effectFn, modifier, ctx, runEffectFn) {\n\tif (!hostMap.has(host)) hostMap.set(host, new WeakMap());\n\n\tconst effectMap = hostMap.get(host);\n\n\tif (!effectMap.has(effectFn)) effectMap.set(effectFn, {});\n\n\tconst actionMappings = effectMap.get(effectFn);\n\tif (!actionMappings[actionType])\n\t\tactionMappings[actionType] = createDebounce(effectFn, modifier, host, ctx, runEffectFn);\n\n\treturn actionMappings[actionType];\n}\n", "// WeakMap: host -> WeakMap: effectFn -> {actionType: value}\nexport default new WeakMap();\n", "import hostMap from './hostMap';\n\nfunction createCancelable(fn) {\n\treturn function cancelableEffect(...args) {\n\t\treturn fn(...args);\n\t};\n}\n\n/**\n * Take the latest effect and cancel any previously started effect fns\n *\n * Currently only supports generator fns\n *\n * @param host\n * @param actionType\n * @param effectFn\n * @returns {R|*}\n */\nexport default function takeLatest(host, actionType, effectFn) {\n\tif (!hostMap.has(host)) hostMap.set(host, new WeakMap());\n\n\tconst effectMap = hostMap.get(host);\n\n\tif (!effectMap.has(effectFn)) effectMap.set(effectFn, {});\n\n\tconst actionMappings = effectMap.get(effectFn);\n\tif (actionMappings[actionType]) actionMappings[actionType].cancelled = true;\n\n\tactionMappings[actionType] = createCancelable(effectFn);\n\n\treturn actionMappings[actionType];\n}\n", "import hostMap from './hostMap';\nimport {defer} from '@servicenow/ui-internal';\n\nfunction createThrottle(fn, {limit = 0}, ctx, runEffectFn) {\n\tlet free = true;\n\treturn function throttledEffect(...args) {\n\t\tif (!free) return;\n\n\t\tfree = false;\n\t\trunEffectFn(fn, args, ctx);\n\t\tdefer(() => {\n\t\t\tfree = true;\n\t\t}, limit);\n\t};\n}\n\n/**\n * Throttle modifier for effect functions\n *\n * @param host\n * @param actionType\n * @param effectFn\n * @param modifier\n */\nexport default function throttle(host, actionType, effectFn, modifier, ctx, runEffectFn) {\n\tif (!hostMap.has(host)) hostMap.set(host, new WeakMap());\n\n\tconst effectMap = hostMap.get(host);\n\n\tif (!effectMap.has(effectFn)) effectMap.set(effectFn, {});\n\n\tconst actionMappings = effectMap.get(effectFn);\n\tif (!actionMappings[actionType])\n\t\tactionMappings[actionType] = createThrottle(effectFn, modifier, ctx, runEffectFn);\n\n\treturn actionMappings[actionType];\n}\n", "/**\n * Parse target element from coeffects\n *\n * @param coeffects\n */\nexport default function getTargetElement(coeffects) {\n\tif (\n\t\tcoeffects &&\n\t\tcoeffects.action &&\n\t\tcoeffects.action.payload &&\n\t\tcoeffects.action.payload.event &&\n\t\tcoeffects.action.payload.event.target\n\t)\n\t\treturn coeffects.action.payload.event.target;\n\n\treturn coeffects.host;\n}\n", "export const DEBOUNCE = 'debounce';\nexport const TAKE_LATEST = 'takeLatest';\nexport const THROTTLE = 'throttle';\n", "import {mark, types as metrics} from '@servicenow/ui-metrics';\n\n/**\n * Runs effect function (includes async and generator functions)\n *\n * @param fn\n * @param args\n * @returns {Promise}\n */\nexport default function runEffect(fn, args, {host, interactionId, type}) {\n\tmark(host, interactionId, metrics.EFFECT_START, {type});\n\tconst generator = fn(...args);\n\n\tif (!generator || !generator.next) {\n\t\tmark(host, interactionId, metrics.EFFECT_END, {type});\n\t\treturn Promise.resolve(generator);\n\t}\n\n\tfunction runner(verb, arg) {\n\t\tif (fn.cancelled) {\n\t\t\tmark(host, interactionId, metrics.EFFECT_END, {type});\n\t\t\treturn Promise.resolve(generator.return());\n\t\t}\n\n\t\tlet result;\n\t\ttry {\n\t\t\tresult = generator[verb](arg);\n\t\t} catch (err) {\n\t\t\tmark(host, interactionId, metrics.EFFECT_END, {type});\n\t\t\treturn Promise.reject(err);\n\t\t}\n\n\t\tif (result.done) {\n\t\t\tmark(host, interactionId, metrics.EFFECT_END, {type});\n\t\t\treturn Promise.resolve(result.value);\n\t\t}\n\n\t\tmark(host, interactionId, metrics.EFFECT_END, {type});\n\t\treturn Promise.resolve(result.value).then(onResolved, onRejected);\n\t}\n\n\tconst onResolved = runner.bind(runner, 'next');\n\tconst onRejected = runner.bind(runner, 'throw');\n\treturn onResolved();\n}\n", "import {getHostVariables} from '../utils';\nimport {HELPERS_IMMEDIATE, HOIST_COMPOSED_PATH, INTERNAL_HOST_DISPATCH} from '../symbols';\n\nexport function onActionHoisted(targetEl, targetSelector, host, actionType, action = {}) {\n\tconst {type, payload, meta, error} = action;\n\tconst hostVariables = getHostVariables(host);\n\n\t// stop this event from propagating, since we'll turn around and redispatch\n\t// from the original host\n\tif (meta.event) meta.event.stopPropagation();\n\n\thostVariables[HELPERS_IMMEDIATE].dispatch(\n\t\ttype,\n\t\tpayload,\n\t\t{\n\t\t\t...meta,\n\t\t\tretargeted: true,\n\t\t\t[HOIST_COMPOSED_PATH]: meta.event.composedPath(),\n\t\t\t[INTERNAL_HOST_DISPATCH]: true\n\t\t},\n\t\terror\n\t);\n}\n", "import {\n\tCOMPONENT_BOOTSTRAPPED,\n\tCOMPONENT_CONNECTED,\n\tCOMPONENT_DISCONNECTED,\n\tCOMPONENT_MODE_DETACH,\n\tCOMPONENT_PROPERTY_CHANGED,\n\tNOW_MODE_PROP\n} from '../../constants';\n\nexport function skipForDetachedComponent(host, type, payload) {\n\tif (host[NOW_MODE_PROP] !== COMPONENT_MODE_DETACH) return false;\n\tconst allowedLifeCycleActions = [\n\t\tCOMPONENT_CONNECTED,\n\t\tCOMPONENT_BOOTSTRAPPED,\n\t\tCOMPONENT_DISCONNECTED\n\t];\n\tif (allowedLifeCycleActions.includes(type)) return false;\n\tif (type !== COMPONENT_PROPERTY_CHANGED) return true;\n\treturn payload.name !== NOW_MODE_PROP;\n}\n", "export function mergeBehaviorActionHandlers(behaviors, actionHandlers) {\n\tconst mergedActionHandlers = {...actionHandlers};\n\tconst {length: behaviorsCount} = behaviors;\n\tfor (let i = 0; i < behaviorsCount; i++) {\n\t\tconst {\n\t\t\tbehavior: {actionHandlers: behaviorActionHandlers, options}\n\t\t} = behaviors[i];\n\t\tfor (const k in behaviorActionHandlers) {\n\t\t\tconst behaviorActionHandler = {...behaviorActionHandlers[k], behaviorOptions: options};\n\t\t\tif (mergedActionHandlers[k]) mergedActionHandlers[k].push(behaviorActionHandler);\n\t\t\telse mergedActionHandlers[k] = [behaviorActionHandler];\n\t\t}\n\t}\n\n\treturn mergedActionHandlers;\n}\n", "import log from '../../log';\n\n// this code executes before an instance is created. @servicenow/ui-internal/sandbox currently relies on host and dispatch.\n// refactoring @servicenow/ui-internal/sandbox to support this single use case - all other user code is executed after an\n// instance is created - didn't seem worth it. Even if we move to a lazy configuration initialization in the constructor\n// dispatch won't be created until connectedCallback is executed.\nfunction sandbox(fn, options, message) {\n\ttry {\n\t\treturn fn(options);\n\t} catch (error) {\n\t\tlog(message, {origin: 'sandbox', host: options ? options.host : null});\n\t\treturn {};\n\t}\n}\n\nexport function mergeBehaviorInitialState(\n\tbehaviors,\n\tcomponentInitialState,\n\tcomponentSetInitialState,\n\ttagName\n) {\n\tconst behaviorState = {};\n\tconst {length: behaviorsCount} = behaviors;\n\n\tfor (let i = 0; i < behaviorsCount; i++) {\n\t\tconst {\n\t\t\tname,\n\t\t\toptions,\n\t\t\tbehavior: {initialState: behaviorInitialState, options: behaviorOptions}\n\t\t} = behaviors[i];\n\t\tbehaviorState[name] =\n\t\t\ttypeof behaviorInitialState === 'function'\n\t\t\t\t? sandbox(\n\t\t\t\t\t\tbehaviorInitialState,\n\t\t\t\t\t\toptions || behaviorOptions,\n\t\t\t\t\t\t`The initialState function for the ${name} behavior threw an error when defining <${tagName} />`\n\t\t\t\t  )\n\t\t\t\t: behaviorInitialState;\n\t}\n\n\tfunction setInitialState({host, properties, context}) {\n\t\tconst behaviorStateDynamic = behaviorState;\n\t\tfor (let i = 0; i < behaviorsCount; i++) {\n\t\t\tconst {\n\t\t\t\tname,\n\t\t\t\toptions,\n\t\t\t\tbehavior: {setInitialState: behaviorSetInitialState, options: behaviorOptions}\n\t\t\t} = behaviors[i];\n\n\t\t\tif (typeof behaviorSetInitialState === 'function') {\n\t\t\t\tbehaviorStateDynamic[name] = {\n\t\t\t\t\t...behaviorState[name],\n\t\t\t\t\t...sandbox(\n\t\t\t\t\t\tbehaviorSetInitialState,\n\t\t\t\t\t\t{host, properties, context, options: options || behaviorOptions},\n\t\t\t\t\t\t`The setInitialState function for the ${name} behavior threw an error when defining <${tagName} />`\n\t\t\t\t\t)\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\t...(Object.keys(behaviorStateDynamic).length ? {behaviors: behaviorStateDynamic} : {}),\n\t\t\t...(typeof componentSetInitialState === 'function' &&\n\t\t\t\tsandbox(\n\t\t\t\t\tcomponentSetInitialState,\n\t\t\t\t\t{host, properties, context},\n\t\t\t\t\t`The setInitialState function for ${tagName} threw an error`\n\t\t\t\t))\n\t\t};\n\t}\n\n\tconst initialState = {\n\t\t...(Object.keys(behaviorState).length ? {behaviors: behaviorState} : {}),\n\t\t...componentInitialState\n\t};\n\n\treturn {\n\t\tinitialState,\n\t\tsetInitialState\n\t};\n}\n", "import {memoize, NOW_SKIP_RENDER_UNTIL_PRESENT, NOW_DEFER_HYDRATION} from '@servicenow/ui-internal';\nimport toPropertyName from '../toPropertyName';\nimport {\n\tCOMPONENT_NAME_ATTR,\n\tHOIST_ATTR,\n\tHOIST_APPEND_TO_ATTR,\n\tDEFER_ATTRIBUTE,\n\tNOW_HOIST_PROP,\n\tNOW_HOIST_APPEND_TO_PROP,\n\tNOW_HOIST_PREPEND_TO_PROP,\n\tNOW_ID_PROP,\n\tNOW_MODE_PROP,\n\tNOW_COMPONENT_NAME_PROP,\n\tNOW_ENABLE_PROPERTY_SETTING_PREVENTION_PROP,\n\tNOW_METRIC_TYPES_PROP,\n\tNOW_METRICS_LEVEL_PROP,\n\tNOW_LOGGING_LEVELS_PROP,\n\tNOW_PLACEHOLDER_HEIGHT_PROP,\n\tNOW_PLACEHOLDER_WIDTH_PROP,\n\tNOW_PRIORITY_PROP,\n\tPRIORITY_LEVEL_LOW,\n\tPRIORITY_LEVEL_MEDIUM,\n\tNOW_AVOID_RENDER_PROP,\n\tNOW_NESTED_SELECTABLE_PROPS\n} from '../../constants';\nimport log from '../../log';\n\nexport const mergeBehaviorProperties = memoize(mergeBehaviorPropertiesInner, {\n\tprofileName: 'mergeBehaviorProperties',\n\tcreateCacheKey: (b, p, t) => t\n});\n\nfunction mergeBehaviorPropertiesInner(behaviors, properties, tagName) {\n\tconst mergedProperties = {};\n\tconst {length: behaviorsCount} = behaviors;\n\tconst behaviorNames = {};\n\n\tfor (const k in properties) mergedProperties[k] = properties[k];\n\n\tfor (let i = 0; i < behaviorsCount; i++) {\n\t\tconst {\n\t\t\tname,\n\t\t\tbehavior: {properties: behaviorProperties}\n\t\t} = behaviors[i];\n\t\tfor (const k in behaviorProperties) {\n\t\t\tif (mergedProperties[k]) {\n\t\t\t\tlog(`Behavior ${name} overwrote property ${k} for ${tagName}.`, {\n\t\t\t\t\ttagName,\n\t\t\t\t\torigin: 'mergeBehaviorProperties'\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tmergedProperties[k] = behaviorProperties[k];\n\t\t\tbehaviorNames[k] = name;\n\t\t}\n\t}\n\n\treturn {\n\t\t...mergedProperties,\n\t\t[toPropertyName(DEFER_ATTRIBUTE)]: {},\n\t\t[toPropertyName(HOIST_ATTR)]: {\n\t\t\t...(mergedProperties[toPropertyName(HOIST_ATTR)] || {}),\n\t\t\treflect: true\n\t\t},\n\t\t[toPropertyName(HOIST_APPEND_TO_ATTR)]: {\n\t\t\t...(mergedProperties[toPropertyName(HOIST_APPEND_TO_ATTR)] || {}),\n\t\t\treflect: true\n\t\t},\n\t\t[toPropertyName(COMPONENT_NAME_ATTR)]: {reflect: true}, // @temporary add component-name\n\t\t[NOW_HOIST_PROP]: {...(mergedProperties[NOW_HOIST_PROP] || {}), reflect: true},\n\t\t[NOW_HOIST_APPEND_TO_PROP]: {\n\t\t\t...(mergedProperties[NOW_HOIST_APPEND_TO_PROP] || {}),\n\t\t\treflect: true\n\t\t},\n\t\t[NOW_HOIST_PREPEND_TO_PROP]: {\n\t\t\t...(mergedProperties[NOW_HOIST_PREPEND_TO_PROP] || {}),\n\t\t\treflect: true\n\t\t},\n\t\t[NOW_PLACEHOLDER_HEIGHT_PROP]: {\n\t\t\t...(mergedProperties[NOW_PLACEHOLDER_HEIGHT_PROP] || {}),\n\t\t\tschema: {type: 'string'}\n\t\t},\n\t\t[NOW_PLACEHOLDER_WIDTH_PROP]: {\n\t\t\t...(mergedProperties[NOW_PLACEHOLDER_WIDTH_PROP] || {}),\n\t\t\tschema: {type: 'string'}\n\t\t},\n\t\t[NOW_ID_PROP]: {},\n\t\t[NOW_MODE_PROP]: {},\n\t\t[NOW_COMPONENT_NAME_PROP]: {},\n\t\t[NOW_ENABLE_PROPERTY_SETTING_PREVENTION_PROP]: {},\n\t\t[NOW_LOGGING_LEVELS_PROP]: {\n\t\t\t...(mergedProperties[NOW_LOGGING_LEVELS_PROP] || []),\n\t\t\tschema: {type: ['array', 'boolean'], items: {type: 'string'}}\n\t\t},\n\t\t[NOW_METRIC_TYPES_PROP]: {\n\t\t\t...(mergedProperties[NOW_METRIC_TYPES_PROP] || {}),\n\t\t\tschema: {type: 'array', items: {type: 'string'}}\n\t\t},\n\t\t[NOW_METRICS_LEVEL_PROP]: {\n\t\t\t...(mergedProperties[NOW_METRICS_LEVEL_PROP] || {}),\n\t\t\tschema: {type: 'integer', minimum: 0, maximum: 5}\n\t\t},\n\t\t[NOW_PRIORITY_PROP]: {\n\t\t\t...(mergedProperties[NOW_PRIORITY_PROP] || {}),\n\t\t\tschema: {type: 'string', enum: [PRIORITY_LEVEL_LOW, PRIORITY_LEVEL_MEDIUM]}\n\t\t},\n\t\t[NOW_AVOID_RENDER_PROP]: {\n\t\t\t...(mergedProperties[NOW_AVOID_RENDER_PROP] || {default: false}),\n\t\t\tschema: {type: 'boolean'}\n\t\t},\n\t\t[NOW_SKIP_RENDER_UNTIL_PRESENT]: {\n\t\t\tattrToInitPropTransformer({attributeValue}) {\n\t\t\t\tif (attributeValue && typeof attributeValue === 'string') {\n\t\t\t\t\treturn attributeValue.split(',') || [];\n\t\t\t\t}\n\t\t\t\treturn [];\n\t\t\t},\n\t\t\tschema: {type: ['array'], items: {type: 'string'}}\n\t\t},\n\t\t[NOW_NESTED_SELECTABLE_PROPS]: {\n\t\t\t...(mergedProperties[NOW_NESTED_SELECTABLE_PROPS] || {}),\n\t\t\tschema: {\n\t\t\t\ttype: 'array',\n\t\t\t\titems: {type: 'string'}\n\t\t\t}\n\t\t},\n\t\t[NOW_DEFER_HYDRATION]: {}\n\t};\n}\n", "export function mergeLifeCycleActionHandlers(lifecycleActionHandlers, componentActionHandlers) {\n\tconst mergedActionHandlers = {};\n\n\tfor (const k in componentActionHandlers) {\n\t\tmergedActionHandlers[k] = mergedActionHandlers[k] || [];\n\t\tmergedActionHandlers[k].push(componentActionHandlers[k]);\n\t}\n\n\tfor (const k in lifecycleActionHandlers) {\n\t\tconst actionHandlers = lifecycleActionHandlers[k] || [];\n\t\tmergedActionHandlers[k] = mergedActionHandlers[k] || [];\n\t\tmergedActionHandlers[k] = [...mergedActionHandlers[k], ...actionHandlers];\n\t}\n\n\treturn mergedActionHandlers;\n}\n", "import {normalizeActionHandler} from './normalizeActionHandler';\n\nexport function normalizeActionHandlers(actionHandlers, tagName) {\n\tconst normalizedActionHandlers = {};\n\n\tfor (const k in actionHandlers)\n\t\tnormalizedActionHandlers[k] = normalizeActionHandler(actionHandlers[k], tagName);\n\n\treturn normalizedActionHandlers;\n}\n", "import {normalizeActionHandlers} from './normalizeActionHandlers';\nimport {memoize} from '@servicenow/ui-internal';\n\nexport const normalizeBehaviors = memoize(normalizeBehaviorsInner, {\n\tprofileName: 'normalizeBehaviors',\n\tcreateCacheKey: (b, t) => t\n});\n\nfunction normalizeBehaviorsInner(behaviors = [], tagName) {\n\tconst {length: behaviorsCount} = behaviors;\n\tconst normalizedBehaviors = [];\n\tfor (let i = 0; i < behaviorsCount; i++) {\n\t\tconst {behavior, options = {}} = behaviors[i] || {};\n\t\tconst resolvedBehavior = behavior || behaviors[i] || {};\n\t\tconst {name} = resolvedBehavior;\n\t\tconst {initialState = {}, actionHandlers, eventHandlers = [], actions} = resolvedBehavior;\n\n\t\tnormalizedBehaviors[i] = {\n\t\t\tbehavior: {\n\t\t\t\t...resolvedBehavior,\n\t\t\t\tactionHandlers: normalizeActionHandlers(actionHandlers, tagName),\n\t\t\t\tinitialState,\n\t\t\t\teventHandlers,\n\t\t\t\tactions,\n\t\t\t\toptions\n\t\t\t},\n\t\t\tname\n\t\t};\n\t}\n\n\treturn normalizedBehaviors;\n}\n", "export function getStopPropagation(actionHandlers) {\n\tconst stopPropagation = {};\n\tfor (const k in actionHandlers) {\n\t\tif (actionHandlers[k].some(v => v.stopPropagation)) stopPropagation[k] = true;\n\t}\n\n\treturn stopPropagation;\n}\n", "import {normalizeActionHandler} from './normalizeActionHandler';\n\n// TODO: this format should be deprecated in paris\nexport function mergeActions(actionHandlers, actions, tagName) {\n\tfor (const k in actions) {\n\t\tconst {\n\t\t\thandlers = [],\n\t\t\teffect: actionEffect,\n\t\t\targs: actionArgs,\n\t\t\tinterceptors: actionInterceptors,\n\t\t\tprivate: isPrivate\n\t\t} = actions[k];\n\t\tconst {length: handlersCount} = handlers;\n\n\t\tactionHandlers[k] = actionHandlers[k] || []; // eslint-disable-line no-param-reassign\n\t\tfor (let i = 0; i < handlersCount; i++) {\n\t\t\tconst handler = handlers[i];\n\t\t\tconst {effect} = handler;\n\t\t\tconst {fn, args = []} = effect || handler;\n\t\t\tif (typeof fn === 'function') {\n\t\t\t\tconst {interceptors} = handler;\n\t\t\t\tactionHandlers[k].push(\n\t\t\t\t\tnormalizeActionHandler({effect: fn, args, interceptors, private: isPrivate}, tagName)\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tactionHandlers[k].push(normalizeActionHandler({...handler, private: isPrivate}, tagName));\n\t\t\t}\n\t\t}\n\n\t\tif ((handlersCount === 0 && isPrivate) || actionEffect || actionInterceptors) {\n\t\t\tactionHandlers[k].push(\n\t\t\t\tnormalizeActionHandler(\n\t\t\t\t\t{\n\t\t\t\t\t\teffect: actionEffect || (() => ({})),\n\t\t\t\t\t\tinterceptors: actionInterceptors,\n\t\t\t\t\t\targs: actionArgs,\n\t\t\t\t\t\tprivate: isPrivate\n\t\t\t\t\t},\n\t\t\t\t\ttagName\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t}\n\n\treturn actionHandlers;\n}\n", "import {normalizeActionHandler} from './normalizeActionHandler';\n\nexport function mergeEventActionHandlers(actionHandlers, eventHandlers, tagName) {\n\tconst {length: eventHandlerCount} = eventHandlers;\n\tfor (let i = 0; i < eventHandlerCount; i++) {\n\t\tconst {\n\t\t\tevents = [],\n\t\t\teffect,\n\t\t\tmodifiers = [],\n\t\t\tmodifier = {},\n\t\t\tinterceptors = [],\n\t\t\ttarget,\n\t\t\tcapture,\n\t\t\tbehaviorOptions\n\t\t} = eventHandlers[i];\n\t\tconst {length: eventsCount} = events;\n\t\tfor (let j = 0; j < eventsCount; j++) {\n\t\t\tconst eventName = events[j];\n\t\t\tactionHandlers[eventName] = actionHandlers[eventName] || []; // eslint-disable-line no-param-reassign\n\t\t\tconst normalizedActionHandler = {\n\t\t\t\t...normalizeActionHandler(\n\t\t\t\t\t{effect, modifiers, modifier, interceptors, target, capture, eventHandler: true},\n\t\t\t\t\ttagName\n\t\t\t\t),\n\t\t\t\t...(behaviorOptions && {behaviorOptions})\n\t\t\t};\n\t\t\tactionHandlers[eventName].push(normalizedActionHandler);\n\t\t}\n\t}\n\n\treturn actionHandlers;\n}\n", "import {buildActionPayloadValidator} from '../schema';\n\nexport function applyPayloadValidators(actions) {\n\tfor (const k in actions) {\n\t\tconst action = actions[k];\n\t\tconst {schema} = action;\n\t\tif (schema) action.validate = buildActionPayloadValidator(schema);\n\t}\n\n\treturn actions;\n}\n", "import log from '../../log';\n\nexport function mergeBehaviorActions(actions, behaviors, tagName) {\n\tconst mergedActions = {};\n\tconst {length: behaviorsCount} = behaviors;\n\tconst behaviorNames = {};\n\n\tfor (let i = 0; i < behaviorsCount; i++) {\n\t\tconst {\n\t\t\tname,\n\t\t\tbehavior: {actions: behaviorActions = {}}\n\t\t} = behaviors[i];\n\n\t\tfor (const k in behaviorActions) {\n\t\t\tif (mergedActions[k]) {\n\t\t\t\tlog(`Behavior ${name} overwrote action ${k} for ${tagName}.`, {\n\t\t\t\t\ttagName,\n\t\t\t\t\torigin: 'mergeBehaviorActions'\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tmergedActions[k] = behaviorActions[k];\n\t\t\tbehaviorNames[k] = name;\n\t\t}\n\t}\n\n\tfor (const k in actions) {\n\t\tif (mergedActions[k]) {\n\t\t\tlog(\n\t\t\t\t`The component definition for ${tagName} overwrote action ${k} defined by the ${behaviorNames[k]} behavior.`,\n\t\t\t\t{tagName, origin: 'mergeBehaviorActions'}\n\t\t\t);\n\t\t}\n\n\t\tmergedActions[k] = actions[k];\n\t}\n\n\treturn mergedActions;\n}\n", "import {\n\tCOMPONENT_CONNECTED,\n\tCOMPONENT_DISCONNECTED,\n\tCOMPONENT_BOOTSTRAPPED,\n\tCOMPONENT_RENDERED,\n\tCOMPONENT_DOM_READY,\n\tCOMPONENT_PROPERTY_CHANGED,\n\tCOMPONENT_PROPERTY_UPDATE_REQUESTED,\n\tCOMPONENT_RENDER_REQUESTED,\n\tCOMPONENT_DOM_TREE_READY,\n\tCOMPONENT_TREE_RENDERED,\n\tCOMPONENT_STATE_UPDATED,\n\tCOMPONENT_INTERACTIVE\n} from '../../constants';\n\nconst actions = {\n\tCOMPONENT_CONNECTED,\n\tCOMPONENT_DISCONNECTED,\n\tCOMPONENT_BOOTSTRAPPED,\n\tCOMPONENT_RENDERED,\n\tCOMPONENT_DOM_READY,\n\tCOMPONENT_PROPERTY_CHANGED,\n\tCOMPONENT_PROPERTY_UPDATE_REQUESTED,\n\tCOMPONENT_RENDER_REQUESTED,\n\tCOMPONENT_DOM_TREE_READY,\n\tCOMPONENT_TREE_RENDERED,\n\tCOMPONENT_STATE_UPDATED,\n\tCOMPONENT_INTERACTIVE\n};\n\nexport function getActionsToDispatch(interceptors) {\n\tconst shouldDispatch = {};\n\n\tfor (const k in actions) {\n\t\tconst type = actions[k];\n\t\tconst intercpetorsByType = interceptors[type];\n\t\tif (intercpetorsByType && intercpetorsByType.has('host')) shouldDispatch[type] = true;\n\t}\n\n\treturn shouldDispatch;\n}\n", "export function normalizeBehaviorEventHandlers(normalizedBehaviors) {\n\tconst normalizedBehaviorEventHandlers = [];\n\tconst {length: numberOfBehaviors} = normalizedBehaviors;\n\tfor (let i = 0; i < numberOfBehaviors; i++) {\n\t\tconst {\n\t\t\tbehavior: {eventHandlers = [], options = {}}\n\t\t} = normalizedBehaviors[i];\n\t\tconst {length: numberOfEvents} = eventHandlers;\n\t\tfor (let k = 0; k < numberOfEvents; k++)\n\t\t\tnormalizedBehaviorEventHandlers.push({...eventHandlers[k], behaviorOptions: {...options}});\n\t}\n\n\treturn normalizedBehaviorEventHandlers;\n}\n", "import {\n\tARIA_LIVE_ASSERTIVE,\n\tARIA_LIVE_POLITE,\n\tARIA_LIVE_RELEVANT,\n\tARIA_LIVE_TRIGGER_ADDITIONS,\n\tARIA_LIVE_TRIGGER_ALL,\n\tARIA_LIVE_TRIGGER_REMOVALS,\n\tARIA_LIVE_TRIGGER_TEXT\n} from '../constants';\nimport {getConfigItem, configConstants} from '@servicenow/ui-config';\nimport log from '../log';\nimport {allLogTypes as logTypes} from '@servicenow/ui-internal';\n\nexport const politeId = 'SEISMIC_ARIA_LIVE_REGION_POLITE';\nexport const assertiveId = 'SEISMIC_ARIA_LIVE_REGION_ASSERTIVE';\n\nconst validateTriggerTypes = triggers => {\n\t// triggers is a space-separated string of trigger types\n\t// check that the trigger type is one of the allowed values\n\tconst validTriggers = [\n\t\tARIA_LIVE_TRIGGER_ADDITIONS,\n\t\tARIA_LIVE_TRIGGER_REMOVALS,\n\t\tARIA_LIVE_TRIGGER_TEXT,\n\t\tARIA_LIVE_TRIGGER_ALL\n\t];\n\tconst triggerTypes = triggers.split(' ');\n\n\tlet validTriggerTypes = [];\n\tlet hasInvalidTrigger = false;\n\n\tfor (const trigger of triggerTypes) {\n\t\tif (validTriggers.includes(trigger)) {\n\t\t\tvalidTriggerTypes.push(trigger);\n\t\t} else {\n\t\t\thasInvalidTrigger = true;\n\t\t}\n\t}\n\n\tif (!validTriggerTypes.length || hasInvalidTrigger) {\n\t\treturn undefined;\n\t}\n\n\tif (\n\t\tvalidTriggerTypes.includes(ARIA_LIVE_TRIGGER_ALL) ||\n\t\t(validTriggerTypes.includes(ARIA_LIVE_TRIGGER_ADDITIONS) &&\n\t\t\tvalidTriggerTypes.includes(ARIA_LIVE_TRIGGER_REMOVALS) &&\n\t\t\tvalidTriggerTypes.includes(ARIA_LIVE_TRIGGER_TEXT))\n\t) {\n\t\treturn ARIA_LIVE_TRIGGER_ALL;\n\t}\n\treturn validTriggerTypes.join(' ');\n};\n\nconst applyAriaLiveRegionAttributes = (el, type, id, triggers) => {\n\tconst live = type === ARIA_LIVE_ASSERTIVE || type === ARIA_LIVE_POLITE ? type : ARIA_LIVE_POLITE;\n\tel.setAttribute('id', id || (type === ARIA_LIVE_ASSERTIVE ? assertiveId : politeId));\n\tel.setAttribute('aria-live', live);\n\tel.setAttribute('aria-atomic', true);\n\tif (triggers) {\n\t\tconst triggerTypes = validateTriggerTypes(triggers);\n\t\tif (triggerTypes) {\n\t\t\tel.setAttribute(ARIA_LIVE_RELEVANT, triggerTypes);\n\t\t}\n\t}\n\tapplyStyles(el);\n};\n\nconst applyStyles = el => {\n\tel.style.position = 'absolute';\n\tel.style.overflow = 'hidden';\n\tel.style.width = '1px';\n\tel.style.height = '0px';\n\tel.style.margin = 0;\n\tel.style.border = 'none';\n\tel.style.padding = 0;\n\tel.style.whiteSpace = 'nowrap';\n\tel.style.clip = 'rect(0 0 0 0)';\n\tel.style.clipPath = 'inset(50%)';\n};\n\nconst politeTimeout = getConfigItem(configConstants.ARIA_LIVE_POLITE_TIMEOUT);\nconst assertiveTimeout = getConfigItem(configConstants.ARIA_LIVE_ASSERTIVE_TIMEOUT);\n\nconst createAriaLiveRegionEl = (id, type, triggers) => {\n\tconst el = document.createElement('SPAN');\n\tapplyAriaLiveRegionAttributes(el, type, id, triggers);\n\tdocument.body.appendChild(el);\n\treturn el;\n};\n\nconst getAriaLiveRegionEl = (type, triggers) => {\n\tconst id = type === ARIA_LIVE_ASSERTIVE ? assertiveId : politeId;\n\treturn document.querySelector(`#${id}`) || createAriaLiveRegionEl(id, type, triggers);\n};\n\nconst upsertComponentLiveContentNode = ({\n\tariaLiveRegionEl,\n\thost,\n\ttextNode,\n\treplaceContent = false\n}) => {\n\tconst id = `${host.tagName}_${host.getAttribute('now-id')}`;\n\tconst curNode = ariaLiveRegionEl.querySelector(`#${id}`);\n\tif (curNode) {\n\t\tif (replaceContent) {\n\t\t\tcurNode.innerHTML = '';\n\t\t}\n\t\tcurNode.appendChild(textNode);\n\t\treturn curNode;\n\t} else {\n\t\tconst newNode = document.createElement('SPAN');\n\t\tnewNode.setAttribute('id', id);\n\t\tnewNode.appendChild(textNode);\n\t\tariaLiveRegionEl.appendChild(newNode);\n\t\treturn newNode;\n\t}\n};\nexport const actionHandler = {\n\tstopPropagation: true,\n\teffect({\n\t\thost,\n\t\taction: {\n\t\t\tpayload: {message, type = ARIA_LIVE_POLITE, replaceContent = false, triggers}\n\t\t}\n\t}) {\n\t\tif (type !== ARIA_LIVE_ASSERTIVE && type !== ARIA_LIVE_POLITE) {\n\t\t\tprocess.env.NODE_ENV !== 'production' &&\n\t\t\t\tlog(\n\t\t\t\t\t`\"ARIA_LIVE_REGION_UPDATE_REQUESTED\" was dispatched with action.type: ${type}. Only action.type of \"assertive\" or \"polite\" is allowed.`,\n\t\t\t\t\t{level: logTypes.WARN, host, origin: 'dispatch'}\n\t\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\tconst ariaLiveRegionEl = getAriaLiveRegionEl(type, triggers);\n\t\tconst textNode = document.createTextNode(message);\n\t\tconst ariaLiveRegionCompNode = upsertComponentLiveContentNode({\n\t\t\tariaLiveRegionEl,\n\t\t\thost,\n\t\t\ttextNode,\n\t\t\treplaceContent\n\t\t});\n\t\tsetTimeout(\n\t\t\t() => {\n\t\t\t\tif (textNode.parentNode === ariaLiveRegionCompNode)\n\t\t\t\t\tariaLiveRegionCompNode.removeChild(textNode);\n\t\t\t},\n\t\t\ttype === ARIA_LIVE_ASSERTIVE ? assertiveTimeout : politeTimeout\n\t\t);\n\t}\n};\n", "import getComponentName from '../utils/schema/getComponentName';\nimport validateSchema from '../utils/schema/validate/validateSchema';\nimport contexts from './contexts';\nimport {isPlainObject} from '@servicenow/ui-utils';\n\nexport default function validateContext(context, host) {\n\tif (isPlainObject(context)) {\n\t\tconst contextKeys = Reflect.ownKeys(context);\n\t\tfor (let i = 0; i < contextKeys.length; i++) {\n\t\t\tconst k = contextKeys[i];\n\t\t\tif (contexts.has(k)) {\n\t\t\t\tconst {validate} = contexts.get(k);\n\t\t\t\tvalidateSchema(validate, context[k], {\n\t\t\t\t\terrorPrefix: `Context property for ${getComponentName(host)}: `\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n}\n", "import {toLower} from '@servicenow/ui-internal';\n\n/**\n * Returns a string representing the host element, i.e. `<sn-component component-id=\"123\" />`\n * @private\n * @param {host} host\n * @returns {string}\n */\nfunction getComponentName(host) {\n\treturn `<${toLower(host.tagName)} component-id=\"${host.getAttribute('component-id')}\" />`;\n}\n\nexport default getComponentName;\n", "import log from '../logValidationError';\n\nfunction getPath(pathPrefix, dataPath) {\n\tif (!pathPrefix && !dataPath) return '';\n\n\tif (!pathPrefix && dataPath.startsWith('.')) return `${dataPath.substr(1)} `;\n\n\treturn `${pathPrefix}${dataPath} `;\n}\n\n/**\n * Run a validator against a value to determine its validity. If it is not valid, log an error.\n * @private\n * @param {Function} validator The validator built from one of the methods in ./build\n * @param {any} value The value to run the schema validation against\n * @param {Object} options\n * @param {string} options.pathPrefix Name of the value being validated. Optional\n * @param {string} options.errorPrefix Prefix for the error message\n * @returns {boolean} Whether the value passed validation\n */\nfunction validateSchema(\n\tvalidator,\n\tvalue,\n\t{pathPrefix = '', errorPrefix = '', shouldLog = true} = {}\n) {\n\tconst isValid = validator(value);\n\tif (!isValid) {\n\t\t// If there are errors, only report the first one\n\t\tconst [{dataPath, message, params: {level = 'error'} = {}}] = validator.errors;\n\n\t\tconst path = getPath(pathPrefix, dataPath);\n\t\tconst errorMessage = `${path}${message}`;\n\n\t\tif (shouldLog) log(`${errorPrefix}${errorMessage}`, {level, origin: 'validateSchema'});\n\t}\n\treturn isValid;\n}\n\nexport default validateSchema;\n", "import {createLogger, memoize} from '@servicenow/ui-internal';\n\nconst logger = createLogger({\n\tmodule: '@servicenow/ui-core'\n});\n\n// Prevent the same validation error message from being printed more than once\nexport default memoize(logger, {profileName: 'ui-core logger'});\n", "export {default as property} from './property';\nexport {default as properties} from './properties';\nexport {default as parse} from './parse';\n", "import {PARSE_PROP_CONF_KEY, PACKAGE_NAME} from '../../constants';\nimport isValuePropertySelector from './isValuePropertySelector';\nimport {\n\tsandbox,\n\tlocations,\n\ttoLower,\n\tkebabCase,\n\tallLogTypes as logTypes\n} from '@servicenow/ui-internal';\nimport log from '../../log';\nimport {parseRefProperty} from './refProperty';\nimport {default as validParseTypes} from './types';\nimport parse from './parse';\n\nexport default function parseProperty(name, value, def = {}, host, dispatch) {\n\tconst unstableParse = def[PARSE_PROP_CONF_KEY];\n\tconst schemaType = def.schema && def.schema.type;\n\tconst isValidParseType = validParseTypes.includes(schemaType);\n\tconst resolvedValue = def.resolveRef ? parseRefProperty(host, name, value) : value;\n\tconst shouldUnstableParse =\n\t\t(unstableParse || validParseTypes.includes(schemaType)) &&\n\t\t!isValuePropertySelector(resolvedValue) &&\n\t\ttypeof resolvedValue === 'string';\n\n\tif (shouldUnstableParse && isValidParseType && !host.hasAttribute(kebabCase(name))) {\n\t\tconst component = `<${toLower(host.tagName)} />`;\n\t\tlog(\n\t\t\t`For property ${name} on component ${component}: expected to be type ${schemaType} but received string. ${PACKAGE_NAME} will attempt to parse this value, but you should set this to the correct type.`,\n\t\t\t{level: logTypes.WARN, host, origin: 'parseProperty'}\n\t\t);\n\t}\n\n\treturn shouldUnstableParse\n\t\t? sandbox(parse, {\n\t\t\t\targs: [resolvedValue, schemaType, name, host.tagName],\n\t\t\t\thost,\n\t\t\t\tdispatch,\n\t\t\t\tlocation: locations.PROPERTY,\n\t\t\t\tdetails: {parse: true, name},\n\t\t\t\tlog\n\t\t  })\n\t\t: resolvedValue;\n}\n", "import {PROPERTY_SELECTOR_SIGIL} from '../../constants';\n\nexport default function isValuePropertySelector(value) {\n\tif (typeof value !== 'string') return false;\n\n\treturn value.startsWith(PROPERTY_SELECTOR_SIGIL);\n}\n", "import {isRef, subscribeToRef} from '@servicenow/ui-internal';\n\nconst refUnsubs = new Map();\nexport function parseRefProperty(host, name, value) {\n\tconst isReference = isRef(value);\n\tlet unsubs = refUnsubs.get(host);\n\tconst ref = unsubs?.get(name)?.ref;\n\n\tif (ref && (ref.current !== value || isReference)) {\n\t\tif (unsubs) {\n\t\t\tunsubs.get(name)?.fn();\n\t\t\tunsubs.delete(name);\n\t\t\tif (unsubs.size === 0) {\n\t\t\t\trefUnsubs.delete(host);\n\t\t\t\tunsubs = null;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (isReference) {\n\t\trefUnsubs.set(\n\t\t\thost,\n\t\t\t(unsubs || new Map()).set(name, {fn: subscribeToRef(value, host, name), ref: value})\n\t\t);\n\t\treturn value.current;\n\t}\n\treturn value;\n}\n\nexport function getUnsubscribe(host, propName) {\n\treturn refUnsubs.get(host)?.get(propName);\n}\n\nexport function getHostUnsubs(host) {\n\treturn refUnsubs.get(host);\n}\n", "const types = ['number', 'integer', 'boolean', 'array', 'object', 'null'];\n\nexport default types;\n", "import {toLower} from '@servicenow/ui-internal';\n\n/**\n * Parse the property value\n * @private\n *\n * @param {*} value The value of the property\n * @param {*} schemaType The type of the property defined in its schema\n */\nexport default function parse(value, schemaType, name, tagName) {\n\tif (schemaType === 'boolean' && value === '') return true;\n\n\ttry {\n\t\treturn JSON.parse(value);\n\t} catch (e) {\n\t\t// throw to take advantage of sandbox logging and dispatching\n\t\tthrow new Error(\n\t\t\t`Parsing failed for property ${name} on component ${toLower(\n\t\t\t\ttagName\n\t\t\t)}: expected to be type ${schemaType} but received string.`\n\t\t);\n\t}\n}\n", "import {PARSE_PROP_CONF_KEY, PACKAGE_NAME} from '../../constants';\nimport isValuePropertySelector from './isValuePropertySelector';\nimport {\n\tsandbox,\n\tlocations,\n\ttoLower,\n\tkebabCase,\n\tallLogTypes as logTypes\n} from '@servicenow/ui-internal';\nimport log from '../../log';\nimport {default as validParseTypes} from './types';\nimport {parseRefProperty} from './refProperty';\nimport parse from './parse';\n\n/**\n * Parse any property that is configured with `unstableParse: true`, or any property that has a\n * defined schema with a parseable type\n */\nexport default function parseProperties(properties, defs = {}, {host, dispatch}) {\n\tconst parsedProperties = {};\n\tfor (const k in properties) {\n\t\tconst value = properties[k];\n\t\tconst unstableParse = defs[k] && defs[k][PARSE_PROP_CONF_KEY];\n\n\t\tconst schemaType = defs[k] && defs[k].schema && defs[k].schema.type;\n\t\tconst isValidParseType = validParseTypes.includes(schemaType);\n\t\tconst resolvedValue = defs[k] && defs[k].resolveRef ? parseRefProperty(host, k, value) : value;\n\t\tconst shouldUnstableParse =\n\t\t\t(unstableParse || validParseTypes.includes(schemaType)) &&\n\t\t\t!isValuePropertySelector(resolvedValue) &&\n\t\t\ttypeof resolvedValue === 'string';\n\n\t\tif (shouldUnstableParse && isValidParseType && !host.hasAttribute(kebabCase(k))) {\n\t\t\tconst component = `<${toLower(host.tagName)} />`;\n\t\t\tlog(\n\t\t\t\t`For property ${k} on component ${component}: expected to be type ${schemaType} but received string. ${PACKAGE_NAME} will attempt to parse this value, but you should set this to the correct type.`,\n\t\t\t\t{level: logTypes.WARN, host, origin: 'parseProperties'}\n\t\t\t);\n\t\t}\n\n\t\tparsedProperties[k] = shouldUnstableParse\n\t\t\t? sandbox(parse, {\n\t\t\t\t\targs: [resolvedValue, schemaType, k, host.tagName],\n\t\t\t\t\thost,\n\t\t\t\t\tdispatch,\n\t\t\t\t\tlocation: locations.PROPERTY,\n\t\t\t\t\tdetails: {parse: true, name: k},\n\t\t\t\t\tlog\n\t\t\t  })\n\t\t\t: resolvedValue;\n\t}\n\n\treturn parsedProperties;\n}\n", "export {createDispatcher} from './createDispatcher';\nexport {createConditionalDispatch} from './createConditionalDispatch';\nexport {addActionHandlers} from './addActionHandlers';\nexport {addActionHandlerForUnknownType} from './addActionHandlerForUnknownType';\nexport {removeActionHandlers} from './removeActionHandlers';\nexport {hasActionHandlerForType} from './utils';\n", "import * as uiAnalyticsConsumer from '@servicenow/ui-analytics-consumer';\nimport {mark, getInteractionId, types as metrics} from '@servicenow/ui-metrics';\nimport {getHostInfo, allLogTypes as logTypes} from '@servicenow/ui-internal';\nimport {customEventDispatcher} from './customEventDispatcher';\nimport {\n\tcreateMetaData,\n\tappendToPayload,\n\tisPropertyUpdate,\n\tnormalizeActionMeta,\n\tvalidateActionPayload,\n\tisInternalActionType,\n\tgetInternalActionName,\n\tisStoreUpdate,\n\thasActionHandlerForType,\n\tskipForDetachedComponent\n} from './utils';\nimport {HELPERS_SCHEDULED, HELPERS_IMMEDIATE, PRESENTATIONAL, ANCESTOR_PATH} from '../symbols';\nimport {emitNowUiEvent, getHostVariables, getSpanOptions, parseForSpan} from '../utils';\nimport log from '../log';\nimport {\n\tACTION_DISPATCHED,\n\tSCHEDULE_IMMEDIATELY_DO_NOT_USE_OR_YOU_WILL_BE_IMMEDIATELY_FIRED,\n\tPROPERTIES_SET,\n\tDISPATCH_EVENT,\n\tSPAN_KIND_CLIENT,\n\tSPAN_FOR_DISPATCH,\n\tSPAN_ATTR_DISPATCH_ACTION_TYPE,\n\tSPAN_ATTR_DISPATCH_PAYLOAD,\n\tSPAN_ATTR_SKIP_FOR_DETACHED,\n\tSPAN_ATTR_INTERACTION_ID,\n\tSPAN_ATTR_DISPATCH_STORE_UPDATE,\n\tSPAN_ATTR_LEVEL,\n\tSPAN_LEVEL_FINEST,\n\tSPAN_ATTR_DISPATCH_ACTION_INTERNAL_TYPE\n} from '../constants';\nimport {addActionHandlerForUnknownType} from './addActionHandlerForUnknownType';\n\nconst {tracer} = uiAnalyticsConsumer;\n\nexport function createDispatcher(host, dispatcher = customEventDispatcher) {\n\tconst hostVariables = getHostVariables(host);\n\n\treturn function dispatch(type, payload = {}, meta = {}, error = null) {\n\t\tlet dispatchSpan = meta.span;\n\t\tif (!dispatchSpan)\n\t\t\tdispatchSpan = tracer.startSpan(SPAN_FOR_DISPATCH, {\n\t\t\t\t...getSpanOptions(host),\n\t\t\t\tkind: SPAN_KIND_CLIENT\n\t\t\t});\n\t\tif (type === undefined) {\n\t\t\tlog(\n\t\t\t\t`You are dispatching an action that is type: ${type}.  We will send undefined actions to the upside down place in the next release.`,\n\t\t\t\t{level: logTypes.WARN, host, origin: 'dispatch'}\n\t\t\t);\n\t\t\tdispatchSpan.setAttribute(SPAN_ATTR_DISPATCH_ACTION_TYPE, 'undefined');\n\t\t}\n\t\tdispatchSpan.setAttribute(SPAN_ATTR_DISPATCH_ACTION_TYPE, type);\n\t\tdispatchSpan.setAttribute(SPAN_ATTR_DISPATCH_PAYLOAD, parseForSpan(payload));\n\t\tdispatchSpan.setAttribute(SPAN_ATTR_INTERACTION_ID, getInteractionId(meta));\n\n\t\tif (skipForDetachedComponent(host, type, payload)) {\n\t\t\tdispatchSpan.setAttribute(SPAN_ATTR_SKIP_FOR_DETACHED, true);\n\t\t\treturn;\n\t\t}\n\n\t\tif (isStoreUpdate(type)) {\n\t\t\thostVariables[HELPERS_SCHEDULED].updateState(payload, {\n\t\t\t\t[SCHEDULE_IMMEDIATELY_DO_NOT_USE_OR_YOU_WILL_BE_IMMEDIATELY_FIRED]: true,\n\t\t\t\tinteractionId: getInteractionId(meta)\n\t\t\t});\n\t\t\tdispatchSpan.setAttribute(SPAN_ATTR_DISPATCH_STORE_UPDATE, true);\n\t\t\treturn log(\n\t\t\t\t`${type} is a private action type and has been deprecated. Please use updateState.`,\n\t\t\t\t{host, origin: 'dispatch'}\n\t\t\t);\n\t\t}\n\n\t\tif (isInternalActionType(type, meta.internal)) {\n\t\t\tconst {tagName, componentId} = getHostInfo(host);\n\t\t\tlog(`${getInternalActionName(type)} cannot be dispatched as it is an internal action type`, {\n\t\t\t\ttagName,\n\t\t\t\tcomponentId,\n\t\t\t\thost,\n\t\t\t\torigin: 'dispatch'\n\t\t\t});\n\n\t\t\t// Only return if the type is not one of the following, in order to maintain backwards compatibility\n\t\t\tif (![PROPERTIES_SET, DISPATCH_EVENT].includes(type)) {\n\t\t\t\tdispatchSpan.setAttribute(SPAN_ATTR_DISPATCH_ACTION_INTERNAL_TYPE, true);\n\t\t\t\tdispatchSpan.setAttribute(SPAN_ATTR_LEVEL, SPAN_LEVEL_FINEST);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tif (isPropertyUpdate(type)) {\n\t\t\treturn hostVariables[HELPERS_IMMEDIATE].updateProperties(payload, {\n\t\t\t\tinteractionId: getInteractionId(meta)\n\t\t\t});\n\t\t}\n\n\t\tvalidateActionPayload(host, type, payload, hostVariables); // TODO: fix\n\n\t\t// eslint-disable-next-line no-param-reassign\n\t\tmeta = normalizeActionMeta(meta, {host});\n\n\t\tconst action = {\n\t\t\ttype,\n\t\t\tpayload: meta.retargeted ? payload : appendToPayload(host, payload),\n\t\t\tmeta: {...createMetaData(host, meta, hostVariables), span: dispatchSpan},\n\t\t\terror\n\t\t};\n\n\t\temitNowUiEvent(ACTION_DISPATCHED, {\n\t\t\thost,\n\t\t\taction,\n\t\t\tancestorPath: hostVariables?.[ANCESTOR_PATH]?.map(ancestorElement => {\n\t\t\t\treturn {componentId: ancestorElement.nowId, componentName: ancestorElement.tagName};\n\t\t\t})\n\t\t});\n\n\t\tif (\n\t\t\t!hostVariables[PRESENTATIONAL] &&\n\t\t\t!meta.internal &&\n\t\t\t!hasActionHandlerForType(hostVariables, type)\n\t\t)\n\t\t\taddActionHandlerForUnknownType(host, type, hostVariables);\n\n\t\tmark(host, getInteractionId(action.meta), metrics.DISPATCH, {type});\n\t\treturn dispatcher(host, action);\n\t};\n}\n", "import {getConfigItem, configConstants} from '@servicenow/ui-config';\nimport {memoize} from '@servicenow/ui-internal';\nimport {getInteractionId} from '@servicenow/ui-metrics';\nimport {\n\tDISPATCH_EVENT,\n\tSCHEDULE_IMMEDIATELY_DO_NOT_USE_OR_YOU_WILL_BE_IMMEDIATELY_FIRED,\n\tCOMPONENT_PROPERTY_UPDATE_REQUESTED,\n\tSPAN_ATTR_DISPATCH_SELF_END_TIME\n} from '../constants';\nimport {COMPONENT_ID, PRESENTATIONAL} from '../symbols';\nimport {getHostVariables} from '../utils';\nimport {schedule, types} from '../scheduler';\nimport {applyRuntimeActionHandlers} from './utils';\n\nconst {ENABLE_ACTION_DISPATCHED_HANDLING} = configConstants;\nconst shouldApplyRuntimeActionHandlers = memoize(\n\t() => getConfigItem(ENABLE_ACTION_DISPATCHED_HANDLING) === true,\n\t{profileName: 'shouldApplyRuntimeActionHandlers'}\n);\n\nconst {DISPATCH, IMMEDIATE} = types;\n\nfunction addEventGetters(event) {\n\tObject.defineProperty(event, 'path', {\n\t\tget() {\n\t\t\treturn event.composedPath();\n\t\t}\n\t});\n\t// FIXME: is there a better, faster way than this?\n\tObject.defineProperties(event.detail.meta, {\n\t\tevent: {\n\t\t\tvalue: event,\n\t\t\tenumerable: true\n\t\t},\n\t\tpath: {\n\t\t\tget() {\n\t\t\t\treturn event\n\t\t\t\t\t.composedPath()\n\t\t\t\t\t.map(el => {\n\t\t\t\t\t\tconst variables = getHostVariables(el);\n\t\t\t\t\t\treturn variables && variables[COMPONENT_ID];\n\t\t\t\t\t})\n\t\t\t\t\t.filter(componentId => componentId);\n\t\t\t}\n\t\t}\n\t});\n\n\treturn event;\n}\n\nfunction dispatchLegacyEvent(host, detail) {\n\tconst event = new CustomEvent(DISPATCH_EVENT, {composed: true, bubbles: true, detail});\n\thost.dispatchEvent(addEventGetters(event));\n}\n\nexport function customEventDispatcher(host, {type, payload, meta, error}) {\n\tconst hostVariables = getHostVariables(host);\n\tconst presentational = hostVariables[PRESENTATIONAL];\n\n\tconst shouldBubble = meta.internal && type !== COMPONENT_PROPERTY_UPDATE_REQUESTED ? false : true;\n\tconst event = new CustomEvent(type, {\n\t\tcomposed: shouldBubble,\n\t\tbubbles: shouldBubble,\n\t\tcancelable: true,\n\t\tdetail: {\n\t\t\ttype,\n\t\t\tpayload,\n\t\t\terror,\n\t\t\tmeta\n\t\t}\n\t});\n\tconst dispatchSpan = meta.span;\n\tschedule({\n\t\tfn() {\n\t\t\tif (process.env.UNSAFE_SEISMIC_EMIT_CUSTOM_EVENT) {\n\t\t\t\tdispatchLegacyEvent(host, {\n\t\t\t\t\ttype,\n\t\t\t\t\tpayload,\n\t\t\t\t\terror,\n\t\t\t\t\t// spread or Object.defineProperties fails because the meta reference is the same\n\t\t\t\t\tmeta: {...meta}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (!presentational && shouldApplyRuntimeActionHandlers())\n\t\t\t\tapplyRuntimeActionHandlers(host, type);\n\t\t\tif (dispatchSpan) {\n\t\t\t\tdispatchSpan.setAttribute(SPAN_ATTR_DISPATCH_SELF_END_TIME, Date.now());\n\t\t\t}\n\t\t\treturn host.dispatchEvent(addEventGetters(event));\n\t\t},\n\t\tmeta: {el: host, interactionId: getInteractionId(meta), span: dispatchSpan},\n\t\ttype: meta[SCHEDULE_IMMEDIATELY_DO_NOT_USE_OR_YOU_WILL_BE_IMMEDIATELY_FIRED]\n\t\t\t? IMMEDIATE\n\t\t\t: DISPATCH\n\t});\n\n\treturn event;\n}\n", "import {normalizeActionHandler} from '../utils/config/normalizeActionHandler';\nimport {createInterceptors} from '../utils/config/createInterceptors';\nimport {ACTION_HANDLERS, TARGETED_ACTION_TYPES, CONFIG} from '../symbols';\nimport {addActionHandler} from './customEventActionHandler';\nimport {onAction} from './onAction';\n\nexport function addActionHandlerForUnknownType(host, type, hostVariables) {\n\tif (!(type in hostVariables[CONFIG].interceptors)) {\n\t\tconst actionHandler = normalizeActionHandler(() => {}, host.tagName);\n\n\t\tconst interceptors = createInterceptors({\n\t\t\t[type]: actionHandler\n\t\t});\n\n\t\thostVariables[CONFIG].interceptors = {...hostVariables[CONFIG].interceptors, ...interceptors}; // eslint-disable-line no-param-reassign\n\t}\n\n\tconst removeActionHandler = addActionHandler(host, null, host, type, false, false, onAction);\n\thostVariables[ACTION_HANDLERS].push(removeActionHandler);\n\thostVariables[TARGETED_ACTION_TYPES] = [...hostVariables[TARGETED_ACTION_TYPES], type]; // eslint-disable-line no-param-reassign\n}\n", "import {applyInteractionId} from '@servicenow/ui-metrics';\nimport {CONFIG, DISPATCH, INTERNAL_HOST_DISPATCH, PRESENTATIONAL} from '../symbols';\nimport {emitNowUiEvent, getHostVariables} from '../utils';\nimport {ACTION_DISPATCHED} from '../constants';\n\nexport function createConditionalDispatch(host) {\n\treturn function conditionalDispatch(type, payload, meta, error) {\n\t\tapplyInteractionId(meta);\n\t\tconst hostVariables = getHostVariables(host);\n\t\tconst shouldDispatch =\n\t\t\t!hostVariables[PRESENTATIONAL] && hostVariables[CONFIG].shouldDispatch[type];\n\t\tif (shouldDispatch) {\n\t\t\treturn dispatchWithLifecycleSpan({type, payload, meta, error, host});\n\t\t}\n\n\t\temitNowUiEvent(ACTION_DISPATCHED, {host, action: {type, payload, meta, error}});\n\t};\n}\n\nfunction dispatchWithLifecycleSpan(options) {\n\tconst {type, payload, meta, error, host} = options;\n\tconst hostVariables = getHostVariables(host);\n\n\tmeta[INTERNAL_HOST_DISPATCH] = meta.internal === true;\n\tconst result = hostVariables[DISPATCH](type, payload, meta, error);\n\treturn result;\n}\n", "import {getHostVariables} from '../utils';\nimport {allLogTypes as logTypes} from '@servicenow/ui-internal';\n\nimport {onAction} from './onAction';\nimport {onActionHoisted} from './onActionHoisted';\nimport {addActionHandler} from './customEventActionHandler';\nimport {isHoisted, getHoistTarget} from './utils';\nimport {RETARGETED_ACTION_TYPES, TARGETED_ACTION_TYPES} from '../symbols';\nimport {SEISMIC_HOIST_TAG_NAME} from '../constants';\nimport log from '../log';\n\nfunction resolveCaptureHandlerMetaData(interceptors) {\n\tconst {length: interceptorCount} = interceptors;\n\tfor (let i = 0; i < interceptorCount; i++) {\n\t\tconst {capture, eventHandler} = interceptors[i];\n\t\tif (capture !== undefined && eventHandler !== undefined) return {capture, eventHandler};\n\t}\n\treturn {capture: false, eventHandler: false};\n}\n\nexport function addActionHandlers(host, actions) {\n\tconst handlers = [];\n\tconst hoisted = isHoisted(host);\n\tconst hostVariables = getHostVariables(host);\n\n\tif (actions[undefined]) {\n\t\tlog(\n\t\t\t'You are registering an action handler for a type that is: undefined.  We will send undefined actions to the upside down place in the next release.',\n\t\t\t{level: logTypes.WARN, host, origin: 'addActionHandlers'}\n\t\t);\n\t}\n\n\tfor (const k in actions) {\n\t\tactions[k].forEach(function forEachTarget(interceptors, targetSelector) {\n\t\t\tconst {capture, eventHandler} = resolveCaptureHandlerMetaData(interceptors);\n\t\t\tconst resolvedTarget =\n\t\t\t\ttargetSelector === 'host'\n\t\t\t\t\t? host\n\t\t\t\t\t: typeof targetSelector === 'string'\n\t\t\t\t\t? document.querySelector(targetSelector)\n\t\t\t\t\t: targetSelector;\n\n\t\t\tif (hoisted) {\n\t\t\t\tconst hoistElem = getHoistTarget(hostVariables);\n\t\t\t\tif (hoistElem.tagName === SEISMIC_HOIST_TAG_NAME) {\n\t\t\t\t\tconst hoistElemVariables = getHostVariables(hoistElem);\n\t\t\t\t\thandlers.push(\n\t\t\t\t\t\taddActionHandler(\n\t\t\t\t\t\t\thoistElem,\n\t\t\t\t\t\t\ttargetSelector,\n\t\t\t\t\t\t\thost,\n\t\t\t\t\t\t\tk,\n\t\t\t\t\t\t\tcapture,\n\t\t\t\t\t\t\teventHandler,\n\t\t\t\t\t\t\tonActionHoisted\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t\thoistElemVariables[RETARGETED_ACTION_TYPES] = [\n\t\t\t\t\t\t...hoistElemVariables[RETARGETED_ACTION_TYPES],\n\t\t\t\t\t\tk\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\t}\n\t\t\thandlers.push(\n\t\t\t\taddActionHandler(resolvedTarget, targetSelector, host, k, capture, eventHandler, onAction)\n\t\t\t);\n\t\t\thostVariables[TARGETED_ACTION_TYPES] = [...hostVariables[TARGETED_ACTION_TYPES], k]; // eslint-disable-line no-param-reassign\n\t\t});\n\t}\n\n\treturn handlers;\n}\n", "export function removeActionHandlers(handlers) {\n\tconst {length: actionsHandlersCount} = handlers;\n\n\tfor (let i = 0; i < actionsHandlersCount; i++) handlers[i]();\n\n\treturn [];\n}\n", "import log from '../../log';\nimport createUpdateState from './createUpdateState';\nimport createUpdateContext from './createUpdateContext';\nimport createUpdateProperties from './createUpdateProperties';\nimport createDispatch from './createDispatch';\nimport createComponentLogger from './createComponentLogger';\n\nexport default function createHelpers(host, propertyDefs, executionTiming = null, options = {}) {\n\tconst wrappedDispatch = createDispatch(host, executionTiming);\n\tconst dispatch = (...args) => {\n\t\tlog(\n\t\t\t`Please update the view for ${host.tagName.toLowerCase()} from using dispatch as the second argument to an object with dispatch, updateState, and updateProperties`,\n\t\t\t{host, origin: 'createHelpers'}\n\t\t);\n\t\twrappedDispatch(...args);\n\t};\n\tconst logger = createComponentLogger(host, executionTiming);\n\tif (options.presentational) return {dispatch: wrappedDispatch, logger};\n\n\tdispatch.dispatch = wrappedDispatch;\n\tdispatch.updateState = createUpdateState(host, executionTiming);\n\tdispatch.updateProperties = createUpdateProperties(host, propertyDefs, executionTiming);\n\tdispatch.updateContext = createUpdateContext(host, executionTiming);\n\tdispatch.logger = logger;\n\treturn dispatch;\n}\n", "import * as uiAnalyticsConsumer from '@servicenow/ui-analytics-consumer';\nimport {createInteractionId, mark, types as metrics} from '@servicenow/ui-metrics';\nimport {produce} from 'immer';\nimport {\n\tisDeclarativeUpdate,\n\tisValidOperation,\n\tisBatch,\n\tresolveUpdate,\n\tisValidOptimisationOperation,\n\tshouldUpdateState\n} from './utils';\nimport * as operations from '../operators/operations';\nimport getHostVariables from '../getHostVariables';\nimport {schedule, types} from '../../scheduler';\nimport deferHelperExecution from './deferHelperExecution';\nimport {STATE, RENDER, COMPONENT_ID, CONDITIONAL_DISPATCH, PROPS} from '../../symbols';\nimport {\n\tHELPERS_SCHEDULED,\n\tSCHEDULE_IMMEDIATELY_DO_NOT_USE_OR_YOU_WILL_BE_IMMEDIATELY_FIRED,\n\tSTATE_UPDATED,\n\tHELPERS_DEFER,\n\tCOMPONENT_STATE_UPDATED,\n\tNOW_AVOID_RENDER_PROP,\n\tSPAN_FOR_UPDATE_STATE,\n\tSPAN_KIND_CLIENT,\n\tSPAN_ATTR_EXECUTION_TIMING,\n\tSPAN_ATTR_SHOULD_BATCH,\n\tSPAN_ATTR_DID_UPDATE,\n\tSPAN_ATTR_SHOULD_RENDER,\n\tSPAN_ATTR_UPDATE_PAYLOAD,\n\tSPAN_ATTR_INTERACTION_ID\n} from '../../constants';\nimport log from '../../log';\nimport {emitNowUiEvent, getSpanOptions, parseForSpan, shouldOptOutOfDeepCompareForPage} from '../';\nimport {get, isSelectiveEqual} from '@servicenow/ui-internal';\nimport {getConfigItem, configConstants} from '@servicenow/ui-config';\nconst {tracer} = uiAnalyticsConsumer;\nconst {ENABLE_DECLARATIVE_STATE_UPDATE_DEEP_COMPARE} = configConstants;\nlet optOutDeepCompare = shouldOptOutOfDeepCompareForPage('state');\nconst shouldDeepCompareValues = getConfigItem(ENABLE_DECLARATIVE_STATE_UPDATE_DEEP_COMPARE);\nconst {IMMEDIATE, STATE_SET} = types;\nconst {\n\tdeclarativeOperations: {ASSIGN}\n} = operations;\n\nwindow.addEventListener(\n\t'popstate',\n\t() => (optOutDeepCompare = shouldOptOutOfDeepCompareForPage('state'))\n);\n\nfunction handleStateUpdate(host, hostVariables, update, interactionId) {\n\tconst resolvedUpdate = resolveUpdate(host, hostVariables, update, interactionId);\n\tconst {\n\t\tshouldUpdate = true,\n\t\toperation = ASSIGN,\n\t\tpath = '',\n\t\tstart,\n\t\tdeleteCount,\n\t\taddItems,\n\t\tshouldRender = true,\n\t\tvalue\n\t} = resolvedUpdate;\n\n\tif (!shouldUpdate || !shouldUpdateState(hostVariables[STATE], resolvedUpdate))\n\t\treturn {didUpdate: false, shouldRender: false};\n\n\t// this an extremly naive implementation. it doesn't account\n\t// for operations like push or pop that you'd want to perform\n\t// before diffing the values\n\tif (shouldDeepCompareValues && !optOutDeepCompare && path && operation && value) {\n\t\tconst nextValue = value;\n\t\tconst currentValue = get(hostVariables[STATE], path);\n\t\tif (isSelectiveEqual(currentValue, nextValue)) return {didUpdate: false, shouldRender: false};\n\t}\n\n\tconst previousState = hostVariables[STATE];\n\tconst props = hostVariables[PROPS];\n\tconst avoidRender = props && props[NOW_AVOID_RENDER_PROP];\n\tif (avoidRender && isValidOptimisationOperation(operation)) {\n\t\ttry {\n\t\t\tconst target = isDeclarativeUpdate(resolvedUpdate) ? value : resolvedUpdate;\n\t\t\tconst source = path ? get(previousState, path) : previousState;\n\t\t\tif (isSelectiveEqual(source, target)) return {didUpdate: false, shouldRender: false};\n\t\t} catch (error) {\n\t\t\tlog('Error while performing same state re-render optimisation pre-validation', {\n\t\t\t\terror,\n\t\t\t\thost,\n\t\t\t\torigin: 'handleStateUpdate'\n\t\t\t});\n\t\t}\n\t}\n\n\tconst nextState = produce(hostVariables[STATE] || {}, draftState => {\n\t\tif (operation === 'replace') return value;\n\n\t\tif (!isValidOperation(operation)) {\n\t\t\tlog(`Invalid update state operation: ${operation}`, {host, origin: 'handleStateUpdate'});\n\t\t\treturn;\n\t\t}\n\t\ttry {\n\t\t\toperations[operation](draftState, {\n\t\t\t\tpath,\n\t\t\t\tvalue: isDeclarativeUpdate(resolvedUpdate) ? value : resolvedUpdate,\n\t\t\t\tstart,\n\t\t\t\tdeleteCount,\n\t\t\t\taddItems: Array.isArray(addItems) ? addItems : []\n\t\t\t});\n\t\t} catch (error) {\n\t\t\tlog('Error while performing state update', {error, host, origin: 'handleStateUpdate'});\n\t\t}\n\t});\n\n\tif (nextState === previousState) return {didUpdate: false, shouldRender: false};\n\n\thostVariables[STATE] = nextState; // eslint-disable-line no-param-reassign\n\treturn {didUpdate: true, shouldRender};\n}\n\nfunction handleStateUpdateBatch(host, hostVariables, batch, interactionId) {\n\treturn batch.reduce(\n\t\t(acc, update) => {\n\t\t\tconst {shouldRender, didUpdate} = handleStateUpdate(\n\t\t\t\thost,\n\t\t\t\thostVariables,\n\t\t\t\tupdate,\n\t\t\t\tinteractionId\n\t\t\t);\n\n\t\t\tconst result = {...acc};\n\t\t\tif (didUpdate) result.didUpdate = true;\n\n\t\t\tif (shouldRender) result.shouldRender = true;\n\n\t\t\treturn result;\n\t\t},\n\t\t{didUpdate: false, shouldRender: false}\n\t);\n}\n\nconst resolveUpdateForMark = update => (typeof update === 'function' ? 'FUNCTION' : update);\nconst transformUpdateForMark = (update, isBatch) => {\n\tif (isBatch) return update.map(resolveUpdateForMark);\n\n\treturn resolveUpdateForMark(update);\n};\n\nexport default function createUpdateState(host, executionTiming) {\n\tconst hostVariables = getHostVariables(host);\n\n\treturn function updateState(update, options = {}) {\n\t\tconst updateStateSpan = tracer.startSpan(SPAN_FOR_UPDATE_STATE, {\n\t\t\t...getSpanOptions(host),\n\t\t\tkind: SPAN_KIND_CLIENT\n\t\t});\n\t\tconst interactionId = options.interactionId || createInteractionId();\n\t\tupdateStateSpan.setAttribute(SPAN_ATTR_EXECUTION_TIMING, executionTiming);\n\t\tupdateStateSpan.setAttribute(SPAN_ATTR_INTERACTION_ID, interactionId);\n\t\tif (executionTiming === HELPERS_DEFER)\n\t\t\tmark(host, interactionId, metrics.DEFER, {deferred: metrics.UPDATE_STATE});\n\t\tconst meta = {el: host, interactionId};\n\t\tdeferHelperExecution(\n\t\t\texecutionTiming,\n\t\t\t() =>\n\t\t\t\ttracer.withSpan(updateStateSpan, () => {\n\t\t\t\t\t// TODO: Remove this immediate option for a better scheduling alternative\n\t\t\t\t\t// https://code.devsnc.com/gist/dylan-mozlowski/07bf0ab13b2c8a12f0cc6e59bf4cf911\n\t\t\t\t\tconst {\n\t\t\t\t\t\t[SCHEDULE_IMMEDIATELY_DO_NOT_USE_OR_YOU_WILL_BE_IMMEDIATELY_FIRED]:\n\t\t\t\t\t\t\toptionallyImmediate = false\n\t\t\t\t\t} = options;\n\n\t\t\t\t\tschedule({\n\t\t\t\t\t\tfn() {\n\t\t\t\t\t\t\tconst resolvedUpdate = resolveUpdate(host, hostVariables, update, interactionId);\n\t\t\t\t\t\t\tconst shouldBatch = isBatch(resolvedUpdate);\n\t\t\t\t\t\t\tupdateStateSpan.setAttribute(SPAN_ATTR_SHOULD_BATCH, shouldBatch);\n\t\t\t\t\t\t\tmark(host, interactionId, metrics.UPDATE_STATE, {\n\t\t\t\t\t\t\t\tupdate: transformUpdateForMark(resolvedUpdate, shouldBatch)\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\tconst previousState = hostVariables[STATE];\n\t\t\t\t\t\t\tconst updateHandler = shouldBatch ? handleStateUpdateBatch : handleStateUpdate;\n\t\t\t\t\t\t\tconst {didUpdate, shouldRender} = updateHandler(\n\t\t\t\t\t\t\t\thost,\n\t\t\t\t\t\t\t\thostVariables,\n\t\t\t\t\t\t\t\tresolvedUpdate,\n\t\t\t\t\t\t\t\tinteractionId\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tupdateStateSpan.setAttribute(SPAN_ATTR_UPDATE_PAYLOAD, parseForSpan(resolvedUpdate));\n\t\t\t\t\t\t\tif (!didUpdate) {\n\t\t\t\t\t\t\t\tupdateStateSpan.setAttribute(SPAN_ATTR_DID_UPDATE, false);\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\temitNowUiEvent(STATE_UPDATED, {\n\t\t\t\t\t\t\t\tcomponentId: hostVariables[COMPONENT_ID],\n\t\t\t\t\t\t\t\tpreviousState,\n\t\t\t\t\t\t\t\tnextState: hostVariables[STATE]\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\tif (shouldRender) {\n\t\t\t\t\t\t\t\tupdateStateSpan.setAttribute(SPAN_ATTR_SHOULD_RENDER, true);\n\t\t\t\t\t\t\t\thost[RENDER](interactionId, metrics.UPDATE_STATE, {\n\t\t\t\t\t\t\t\t\tupdate: transformUpdateForMark(resolvedUpdate, shouldBatch)\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tupdateStateSpan.setAttribute(SPAN_ATTR_SHOULD_RENDER, false);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\thostVariables[CONDITIONAL_DISPATCH](\n\t\t\t\t\t\t\t\tCOMPONENT_STATE_UPDATED,\n\t\t\t\t\t\t\t\t{previousState, update},\n\t\t\t\t\t\t\t\t{internal: true}\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t},\n\t\t\t\t\t\tmeta: {...meta, span: updateStateSpan},\n\t\t\t\t\t\ttype:\n\t\t\t\t\t\t\texecutionTiming !== HELPERS_SCHEDULED || optionallyImmediate ? IMMEDIATE : STATE_SET\n\t\t\t\t\t});\n\t\t\t\t}),\n\t\t\t{...meta, span: updateStateSpan}\n\t\t);\n\t};\n}\n", null, null, null, null, null, null, null, "const {\n\tdeclarativeOperations: {SET, ASSIGN, MERGE}\n} = operations;\nimport * as operations from '../operators/operations';\nimport getStatePropsContext from './getStatePropsContext';\nimport {get, isPlainObject} from '@servicenow/ui-internal';\n\nconst isEmptyStateUpdate = value => {\n\treturn (\n\t\t// (value instanceof Map && value.size === 0) ||\n\t\tisPlainObject(value) && Object.keys(value).length === 0\n\t);\n};\n\nfunction isPrimitive(value) {\n\tconst type = typeof value;\n\tif (type === 'object' || type === 'function') return false;\n\n\tif (type === 'string') return true;\n\tif (type === 'bigint') return true;\n\tif (type === 'boolean') return true;\n\tif (type === 'number') return true;\n\n\treturn false;\n}\n\nconst isPrimitiveOrNull = value => isPrimitive(value) || value === null;\n\nexport function isDeclarativeUpdate(update = {}) {\n\tconst {operation, path, value} = update;\n\treturn operation && (path || value);\n}\n\nexport function isValidOperation(operation) {\n\treturn operations[operation] !== undefined;\n}\n\nexport function isBatch(update) {\n\treturn Array.isArray(update) && update.every(u => isDeclarativeUpdate(u) || isUpdater(u));\n}\n\nexport function isUpdater(update) {\n\treturn typeof update === 'function';\n}\n\nexport function resolveUpdate(host, hostVariables, update, interactionId) {\n\tif (!isUpdater(update)) return update;\n\n\tconst statePropsContext = getStatePropsContext(host, interactionId);\n\treturn update(statePropsContext) || statePropsContext;\n}\n\nexport function isValidOptimisationOperation(operation) {\n\treturn operation && [SET, ASSIGN, MERGE].includes(operation);\n}\n\nexport function shouldUpdateState(currentState, update) {\n\tconst declarativeUpdate = !!isDeclarativeUpdate(update);\n\tconst {path = '', value, operation} = update;\n\tif (declarativeUpdate && operation !== SET && operation !== ASSIGN && operation !== MERGE)\n\t\treturn true;\n\n\tconst updateKeys = declarativeUpdate ? null : Object.keys(update);\n\tif (updateKeys === null || updateKeys.length === 1) {\n\t\tconst currentValue = declarativeUpdate ? get(currentState, path) : currentState[updateKeys[0]];\n\t\tconst nextValue = declarativeUpdate ? value : update[updateKeys[0]];\n\t\tif (\n\t\t\tisPrimitiveOrNull(nextValue) &&\n\t\t\tisPrimitiveOrNull(currentValue) &&\n\t\t\tnextValue === currentValue\n\t\t) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (isEmptyStateUpdate(nextValue) && isEmptyStateUpdate(currentValue)) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (isPlainObject(currentValue) && isPlainObject(nextValue)) {\n\t\t\tconst nextValueKeys = Object.keys(nextValue);\n\t\t\tconst currentValueKeys = Object.keys(currentValue);\n\n\t\t\tif (nextValueKeys.length <= 2 && nextValueKeys.length === currentValueKeys.length) {\n\t\t\t\tconst currentValue1 = currentValue[nextValueKeys[0]];\n\t\t\t\tconst currentValue2 = currentValue[nextValueKeys[1]];\n\t\t\t\tconst nextValue1 = nextValue[nextValueKeys[0]];\n\t\t\t\tconst nextValue2 = nextValue[nextValueKeys[1]];\n\n\t\t\t\tif (\n\t\t\t\t\tdeclarativeUpdate &&\n\t\t\t\t\toperation === SET &&\n\t\t\t\t\t(nextValueKeys[0] !== currentValueKeys[0] || nextValueKeys[1] !== currentValueKeys[1])\n\t\t\t\t)\n\t\t\t\t\treturn true;\n\n\t\t\t\tif (\n\t\t\t\t\tisPrimitiveOrNull(nextValue1) &&\n\t\t\t\t\tisPrimitiveOrNull(currentValue1) &&\n\t\t\t\t\tnextValue1 === currentValue1 &&\n\t\t\t\t\tisPrimitiveOrNull(nextValue2) &&\n\t\t\t\t\tisPrimitiveOrNull(currentValue2) &&\n\t\t\t\t\tnextValue2 === currentValue2\n\t\t\t\t) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn true;\n}\n", "import getHostVariables from '../getHostVariables';\nimport {STATE, CONTEXT} from '../../symbols';\n\nexport default function getStatePropsContext(host, interactionId) {\n\tconst hostVariables = getHostVariables(host);\n\tconst properties = host.getResolvedProperties(interactionId);\n\tconst state = hostVariables[STATE] || {};\n\tconst context = hostVariables[CONTEXT];\n\n\treturn {properties, state, context};\n}\n", "import * as uiAnalyticsConsumer from '@servicenow/ui-analytics-consumer';\nimport getStatePropsContext from './getStatePropsContext';\nimport {createInteractionId, mark, types as metrics} from '@servicenow/ui-metrics';\nimport {produce} from 'immer';\nimport {isValidOperation, isBatch, isUpdater} from './utils';\nimport * as operations from '../operators/operations';\nimport getHostVariables from '../getHostVariables';\nimport {schedule, types} from '../../scheduler';\nimport deferHelperExecution from './deferHelperExecution';\nimport {\n\tHELPERS_SCHEDULED,\n\tSCHEDULE_IMMEDIATELY_DO_NOT_USE_OR_YOU_WILL_BE_IMMEDIATELY_FIRED,\n\tHELPERS_DEFER,\n\tSPAN_KIND_CLIENT,\n\tSPAN_FOR_UPDATE_CONTEXT,\n\tSPAN_ATTR_EXECUTION_TIMING,\n\tSPAN_ATTR_INTERACTION_ID\n} from '../../constants';\nimport log from '../../log';\nimport renderContextConsumers from '../../context/renderContextConsumers';\nimport {getContext, setContext} from '../../context/contexts';\nimport getSpanOptions from '../getSpanOptions';\nconst {tracer} = uiAnalyticsConsumer;\nconst {IMMEDIATE, STATE_SET} = types;\nconst {\n\tdeclarativeOperations: {ASSIGN}\n} = operations;\n\nconst resolveUpdate = (host, hostVariables, update, interactionId) => {\n\tif (!isUpdater(update)) return update;\n\n\tconst statePropsContext = getStatePropsContext(host, interactionId);\n\treturn update(statePropsContext);\n};\n\nfunction handleContextUpdate(host, hostVariables, update, interactionId) {\n\tconst resolvedUpdate = resolveUpdate(host, hostVariables, update, interactionId);\n\n\tif (!resolvedUpdate) return {didUpdate: false, shouldRender: false};\n\n\tconst {context: contextKey} = resolvedUpdate;\n\tconst previousContext = getContext(contextKey);\n\tconst {\n\t\tshouldUpdate = true,\n\t\toperation = previousContext !== null && typeof previousContext === 'object' ? ASSIGN : '',\n\t\tpath = '',\n\t\tstart,\n\t\tdeleteCount,\n\t\taddItems,\n\t\tshouldRender = true,\n\t\tvalue\n\t} = resolvedUpdate;\n\n\tif (!shouldUpdate) return {didUpdate: false, shouldRender: false};\n\n\tconst nextContext = produce(getContext(contextKey) || {}, draftState => {\n\t\tif (!operation) return value;\n\n\t\tif (!isValidOperation(operation)) {\n\t\t\tlog(`Invalid update context operation: ${operation}`, {host, origin: 'handleContextUpdate'});\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\toperations[operation](draftState, {\n\t\t\t\tpath,\n\t\t\t\tvalue,\n\t\t\t\tstart,\n\t\t\t\tdeleteCount,\n\t\t\t\taddItems: Array.isArray(addItems) ? addItems : []\n\t\t\t});\n\t\t} catch (error) {\n\t\t\tlog('Error while performing context update', {error, host, origin: 'handleContextUpdate'});\n\t\t}\n\t});\n\n\tif (nextContext === previousContext) return {didUpdate: false, shouldRender: false};\n\n\tsetContext(contextKey, nextContext);\n\treturn {didUpdate: true, shouldRender};\n}\n\nfunction handleContextUpdateBatch(host, hostVariables, batch, interactionId) {\n\treturn batch.reduce(\n\t\t(acc, update) => {\n\t\t\tconst {shouldRender, didUpdate} = handleContextUpdate(\n\t\t\t\thost,\n\t\t\t\thostVariables,\n\t\t\t\tupdate,\n\t\t\t\tinteractionId\n\t\t\t);\n\n\t\t\tconst result = {...acc};\n\t\t\tif (didUpdate) result.didUpdate = true;\n\n\t\t\tif (shouldRender) result.shouldRender = true;\n\n\t\t\treturn result;\n\t\t},\n\t\t{didUpdate: false, shouldRender: false}\n\t);\n}\n\nconst resolveUpdateForMark = update => (update === 'function' ? 'FUNCTION' : update);\nconst transformUpdateForMark = (update, isBatch) => {\n\tif (isBatch) return update.map(resolveUpdateForMark);\n\n\treturn resolveUpdateForMark(update);\n};\n\nexport default function createUpdateContext(host, executionTiming) {\n\tconst hostVariables = getHostVariables(host);\n\n\treturn function updateContext(update, options = {}) {\n\t\tconst updateContextSpan = tracer.startSpan(SPAN_FOR_UPDATE_CONTEXT, {\n\t\t\t...getSpanOptions(host),\n\t\t\tkind: SPAN_KIND_CLIENT\n\t\t});\n\t\tupdateContextSpan.setAttribute(SPAN_ATTR_EXECUTION_TIMING, executionTiming);\n\n\t\tconst interactionId = options.interactionId || createInteractionId();\n\t\tupdateContextSpan.setAttribute(SPAN_ATTR_INTERACTION_ID, interactionId);\n\t\tif (executionTiming === HELPERS_DEFER)\n\t\t\tmark(host, interactionId, metrics.DEFER, {deferred: metrics.UPDATE_CONTEXT});\n\t\tconst meta = {el: host, interactionId};\n\t\tdeferHelperExecution(\n\t\t\texecutionTiming,\n\t\t\t() =>\n\t\t\t\ttracer.withSpan(updateContextSpan, () => {\n\t\t\t\t\t// TODO: Remove this immediate option for a better scheduling alternative\n\t\t\t\t\t// https://code.devsnc.com/gist/dylan-mozlowski/07bf0ab13b2c8a12f0cc6e59bf4cf911\n\t\t\t\t\tconst {\n\t\t\t\t\t\t[SCHEDULE_IMMEDIATELY_DO_NOT_USE_OR_YOU_WILL_BE_IMMEDIATELY_FIRED]:\n\t\t\t\t\t\t\toptionallyImmediate = false\n\t\t\t\t\t} = options;\n\n\t\t\t\t\tschedule({\n\t\t\t\t\t\tfn() {\n\t\t\t\t\t\t\tconst shouldBatch = isBatch(update);\n\t\t\t\t\t\t\tconst transformedUpdate = transformUpdateForMark(update, shouldBatch);\n\t\t\t\t\t\t\tmark(host, interactionId, metrics.UPDATE_CONTEXT, {\n\t\t\t\t\t\t\t\tupdate: transformedUpdate\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tconst updateHandler = shouldBatch ? handleContextUpdateBatch : handleContextUpdate;\n\t\t\t\t\t\t\tconst {didUpdate, shouldRender} = updateHandler(\n\t\t\t\t\t\t\t\thost,\n\t\t\t\t\t\t\t\thostVariables,\n\t\t\t\t\t\t\t\tupdate,\n\t\t\t\t\t\t\t\tinteractionId\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tif (!didUpdate) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (shouldRender) {\n\t\t\t\t\t\t\t\tconst contexts = shouldBatch\n\t\t\t\t\t\t\t\t\t? update.map(({context}) => context)\n\t\t\t\t\t\t\t\t\t: [update.context];\n\t\t\t\t\t\t\t\tfor (let i = 0; i < contexts.length; i++) {\n\t\t\t\t\t\t\t\t\trenderContextConsumers(contexts[i], interactionId, {\n\t\t\t\t\t\t\t\t\t\tupdate: transformUpdateForMark(update, shouldBatch)\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\tmeta: {...meta, span: updateContextSpan},\n\t\t\t\t\t\ttype:\n\t\t\t\t\t\t\texecutionTiming !== HELPERS_SCHEDULED || optionallyImmediate ? IMMEDIATE : STATE_SET\n\t\t\t\t\t});\n\t\t\t\t}),\n\t\t\t{...meta, span: updateContextSpan}\n\t\t);\n\t};\n}\n", "import {getConsumers} from './consumers';\nimport {RENDER} from '../symbols';\nimport {types as metrics} from '@servicenow/ui-metrics';\n\nexport default function renderContextConsumers(ctxKey, interactionId, details) {\n\tconst consumers = getConsumers(ctxKey);\n\n\tfor (const consumer of consumers) {\n\t\tconsumer[RENDER](interactionId, metrics.UPDATE_CONTEXT, details);\n\t}\n}\n", "import * as uiAnalyticsConsumer from '@servicenow/ui-analytics-consumer';\nimport {mark, types as metrics} from '@servicenow/ui-metrics';\nimport log from '../../log';\nimport * as operations from '../operators/operations';\nimport {splitPath} from '@servicenow/ui-internal';\nimport {schedule, types} from '../../scheduler';\nimport {properties as parseProperties} from '../parse';\nimport getHostVariables from '../getHostVariables';\nimport getStatePropsContext from './getStatePropsContext';\nimport deferHelperExecution from './deferHelperExecution';\nimport {\n\tHELPERS_SCHEDULED as HELPERS_SCHEDULED_CONST,\n\tHELPERS_DEFER,\n\tSPAN_FOR_UPDATE_PROPERTIES,\n\tSPAN_KIND_CLIENT,\n\tSPAN_ATTR_EXECUTION_TIMING,\n\tSPAN_ATTR_INTERACTION_ID,\n\tSPAN_ATTR_UPDATE_PROPERTIES_IS_DECLARTIVE,\n\tSPAN_ATTR_UPDATE_PROPERTIES_SHOULD_UPDATE,\n\tSPAN_ATTR_UPDATE_PROPERTIES_OPERATION,\n\tSPAN_ATTR_UPDATE_PROPERTIES_PROPNAME,\n\tSPAN_ATTR_UPDATE_PROPERTIES_PROPVALUE,\n\tSPAN_ATTR_UPDATE_PROPERTIES_PROP\n} from '../../constants';\nimport {HELPERS_SCHEDULED, SET_PROPERTY, PROPS} from '../../symbols';\nimport quickEquals from './quickEquals';\nimport getSpanOptions from '../getSpanOptions';\nimport {parseForSpan} from '..';\n\nconst {tracer} = uiAnalyticsConsumer;\nconst {IMMEDIATE, PROPERTY_SET} = types;\nconst {\n\tdeclarativeOperations: {ASSIGN}\n} = operations;\n\nconst setProperties = (host, properties, propertyDefs, options) => {\n\tconst {interactionId} = options;\n\tconst hostVariables = getHostVariables(host);\n\tconst {dispatch} = hostVariables[HELPERS_SCHEDULED];\n\tconst parsedProperties = parseProperties(properties, propertyDefs, {host, dispatch});\n\tfor (const k in parsedProperties) {\n\t\t// for backwards compatibility an undefined must still be set on the instance\n\t\tif (!propertyDefs.hasOwnProperty(k)) {\n\t\t\thost[k] = parsedProperties[k]; // eslint-disable-line no-param-reassign\n\t\t\tif (process.env.NODE_ENV === 'development') {\n\t\t\t\tlog(\n\t\t\t\t\t`${host.tagName.toLowerCase()} is missing a property definition for \"${k}\".  Properties set with missing definitions will not be available to the view or action handlers.`,\n\t\t\t\t\t{host, origin: 'setProperties'}\n\t\t\t\t);\n\t\t\t}\n\t\t} else {\n\t\t\t// FIXME: Not handling cases where component starts with no old props\n\t\t\tconst old = hostVariables[PROPS][k];\n\t\t\tconst current = parsedProperties[k];\n\t\t\tif (quickEquals(old, current)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// eslint-disable-line no-param-reassign\n\t\t\telse {\n\t\t\t\thost[SET_PROPERTY](k, parsedProperties[k], true, {interactionId}); // eslint-disable-line no-param-reassign\n\t\t\t}\n\t\t}\n\t}\n};\n\nexport default function createUpdateProperties(host, propertyDefs, executionTiming) {\n\treturn function updateProperties(update, options = {}) {\n\t\tconst updatePropSpan = tracer.startSpan(SPAN_FOR_UPDATE_PROPERTIES, {\n\t\t\t...getSpanOptions(host),\n\t\t\tkind: SPAN_KIND_CLIENT\n\t\t});\n\t\tconst {interactionId} = options;\n\t\tupdatePropSpan.setAttribute(SPAN_ATTR_EXECUTION_TIMING, executionTiming);\n\t\tupdatePropSpan.setAttribute(SPAN_ATTR_INTERACTION_ID, interactionId);\n\t\tif (executionTiming === HELPERS_DEFER) {\n\t\t\tmark(host, interactionId, metrics.DEFER, {deferred: metrics.UPDATE_PROPERTIES});\n\t\t}\n\n\t\tconst meta = {el: host, interactionId};\n\n\t\tdeferHelperExecution(\n\t\t\texecutionTiming,\n\t\t\t() =>\n\t\t\t\ttracer.withSpan(updatePropSpan, () => {\n\t\t\t\t\tschedule({\n\t\t\t\t\t\tfn() {\n\t\t\t\t\t\t\tmark(host, interactionId, metrics.UPDATE_PROPERTIES, {\n\t\t\t\t\t\t\t\tupdate: typeof update === 'function' ? 'DECLARATIVE' : 'OBJECT'\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tif (typeof update === 'function') {\n\t\t\t\t\t\t\t\tconst stateProps = getStatePropsContext(host, interactionId);\n\t\t\t\t\t\t\t\tconst {\n\t\t\t\t\t\t\t\t\tshouldUpdate = true,\n\t\t\t\t\t\t\t\t\toperation = ASSIGN,\n\t\t\t\t\t\t\t\t\tpath,\n\t\t\t\t\t\t\t\t\tvalue,\n\t\t\t\t\t\t\t\t\tstart,\n\t\t\t\t\t\t\t\t\tdeleteCount,\n\t\t\t\t\t\t\t\t\taddItems\n\t\t\t\t\t\t\t\t} = update(stateProps);\n\t\t\t\t\t\t\t\tupdatePropSpan.setAttribute(SPAN_ATTR_UPDATE_PROPERTIES_IS_DECLARTIVE, true);\n\t\t\t\t\t\t\t\tupdatePropSpan.setAttribute(SPAN_ATTR_UPDATE_PROPERTIES_OPERATION, operation);\n\t\t\t\t\t\t\t\tupdatePropSpan.setAttribute(\n\t\t\t\t\t\t\t\t\tSPAN_ATTR_UPDATE_PROPERTIES_SHOULD_UPDATE,\n\t\t\t\t\t\t\t\t\tshouldUpdate\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tif (shouldUpdate) {\n\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\tconst propertyPath = splitPath(path);\n\t\t\t\t\t\t\t\t\t\tconst propertyLen = propertyPath.length;\n\t\t\t\t\t\t\t\t\t\tconst [name] = propertyPath;\n\t\t\t\t\t\t\t\t\t\tconst propertyValue = host[name];\n\t\t\t\t\t\t\t\t\t\tif (propertyValue === null || typeof propertyValue !== 'object') {\n\t\t\t\t\t\t\t\t\t\t\tsetProperties(host, {[name]: value}, propertyDefs, {\n\t\t\t\t\t\t\t\t\t\t\t\tinteractionId\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\tupdatePropSpan.setAttribute(SPAN_ATTR_UPDATE_PROPERTIES_PROPNAME, name);\n\t\t\t\t\t\t\t\t\t\t\tupdatePropSpan.setAttribute(SPAN_ATTR_UPDATE_PROPERTIES_PROPVALUE, value);\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tconst propertyValue = {};\n\t\t\t\t\t\t\t\t\t\t\tlet pvRef = propertyValue;\n\t\t\t\t\t\t\t\t\t\t\tlet hostRef = host;\n\t\t\t\t\t\t\t\t\t\t\tfor (let i = 0; i < propertyLen; i++) {\n\t\t\t\t\t\t\t\t\t\t\t\tconst name = propertyPath[i];\n\t\t\t\t\t\t\t\t\t\t\t\tconst value = hostRef[name];\n\t\t\t\t\t\t\t\t\t\t\t\tif (value === null || typeof value !== 'object') break;\n\t\t\t\t\t\t\t\t\t\t\t\tif (Array.isArray(value)) pvRef[name] = value.slice();\n\t\t\t\t\t\t\t\t\t\t\t\telse pvRef[name] = {...value};\n\n\t\t\t\t\t\t\t\t\t\t\t\tpvRef = pvRef[name];\n\t\t\t\t\t\t\t\t\t\t\t\thostRef = hostRef[name];\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\toperations[operation](propertyValue, {\n\t\t\t\t\t\t\t\t\t\t\t\tpath: propertyLen ? propertyPath : [],\n\t\t\t\t\t\t\t\t\t\t\t\tvalue,\n\t\t\t\t\t\t\t\t\t\t\t\tstart,\n\t\t\t\t\t\t\t\t\t\t\t\tdeleteCount,\n\t\t\t\t\t\t\t\t\t\t\t\taddItems: Array.isArray(addItems) ? addItems : []\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\tsetProperties(host, propertyValue, propertyDefs, {\n\t\t\t\t\t\t\t\t\t\t\t\tinteractionId\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\t\t\t\t\tlog('Error while performing properties update', {\n\t\t\t\t\t\t\t\t\t\t\terror,\n\t\t\t\t\t\t\t\t\t\t\thost,\n\t\t\t\t\t\t\t\t\t\t\torigin: 'updateProperties'\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tupdatePropSpan.setAttribute(SPAN_ATTR_UPDATE_PROPERTIES_IS_DECLARTIVE, false);\n\t\t\t\t\t\t\t\tif (update && typeof update === 'object') {\n\t\t\t\t\t\t\t\t\tupdatePropSpan.setAttribute(\n\t\t\t\t\t\t\t\t\t\tSPAN_ATTR_UPDATE_PROPERTIES_PROP,\n\t\t\t\t\t\t\t\t\t\tparseForSpan(Object.keys(update))\n\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\tupdatePropSpan.setAttribute(\n\t\t\t\t\t\t\t\t\t\tSPAN_ATTR_UPDATE_PROPERTIES_PROPVALUE,\n\t\t\t\t\t\t\t\t\t\tparseForSpan(Object.values(update))\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tsetProperties(host, update, propertyDefs, {\n\t\t\t\t\t\t\t\t\tinteractionId\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\ttype: executionTiming !== HELPERS_SCHEDULED_CONST ? IMMEDIATE : PROPERTY_SET,\n\t\t\t\t\t\tmeta: {...meta, span: updatePropSpan}\n\t\t\t\t\t});\n\t\t\t\t}),\n\t\t\t{...meta, span: updatePropSpan}\n\t\t);\n\t};\n}\n", "import {applyInteractionId, mark, getInteractionId, types as metrics} from '@servicenow/ui-metrics';\nimport * as uiAnalyticsConsumer from '@servicenow/ui-analytics-consumer';\nimport getStatePropsContext from './getStatePropsContext';\nimport deferHelperExecution from './deferHelperExecution';\nimport {\n\tSCHEDULE_IMMEDIATELY_DO_NOT_USE_OR_YOU_WILL_BE_IMMEDIATELY_FIRED,\n\tHELPERS_SCHEDULED,\n\tHELPERS_DEFER,\n\tSPAN_KIND_CLIENT,\n\tSPAN_FOR_DISPATCH,\n\tSPAN_ATTR_EXECUTION_TIMING,\n\tSPAN_ATTR_INTERACTION_ID\n} from '../../constants';\nimport {normalizeActionMeta} from '../normalizeActionMeta';\nimport {INTERNAL_HOST_DISPATCH} from '../../symbols';\n\nimport getSpanOptions from '../getSpanOptions';\nconst {tracer, context} = uiAnalyticsConsumer;\nconst wrapDispatch = (host, shouldWrap) => {\n\tif (shouldWrap === HELPERS_SCHEDULED) return host.dispatch;\n\n\treturn function dispatch(type, payload, meta = {}, error) {\n\t\tmeta[SCHEDULE_IMMEDIATELY_DO_NOT_USE_OR_YOU_WILL_BE_IMMEDIATELY_FIRED] = true; // eslint-disable-line no-param-reassign\n\t\tmeta[INTERNAL_HOST_DISPATCH] = true; // eslint-disable-line no-param-reassign\n\t\treturn host.dispatch(type, payload, meta, error);\n\t};\n};\n\nexport default function createDispatch(host, executionTiming) {\n\treturn function dispatch(typeOrFn, payload, meta = {}, error) {\n\t\tconst dispatchSpan = tracer.startSpan(SPAN_FOR_DISPATCH, {\n\t\t\t...getSpanOptions(host),\n\t\t\tkind: SPAN_KIND_CLIENT,\n\t\t\tparentSpan: meta.span\n\t\t});\n\t\tdispatchSpan.setAttribute(SPAN_ATTR_EXECUTION_TIMING, executionTiming);\n\n\t\t// eslint-disable-next-line no-param-reassign\n\t\tmeta = normalizeActionMeta(meta, {host});\n\t\tconst interactionId = getInteractionId(meta);\n\t\tdispatchSpan.setAttribute(SPAN_ATTR_INTERACTION_ID, interactionId);\n\t\tif (executionTiming === HELPERS_DEFER)\n\t\t\tmark(host, interactionId, metrics.DEFER, {deferred: metrics.DISPATCH, type: typeOrFn});\n\n\t\ttracer.withSpan(dispatchSpan, () => {\n\t\t\tdeferHelperExecution(\n\t\t\t\texecutionTiming,\n\t\t\t\tcontext.bind(() => {\n\t\t\t\t\tconst wrappedDispatch = wrapDispatch(host, executionTiming);\n\t\t\t\t\tif (typeof typeOrFn === 'function') {\n\t\t\t\t\t\tconst statePropsContext = getStatePropsContext(host, interactionId);\n\t\t\t\t\t\tconst {\n\t\t\t\t\t\t\ttype,\n\t\t\t\t\t\t\tpayload,\n\t\t\t\t\t\t\tmeta = {},\n\t\t\t\t\t\t\terror,\n\t\t\t\t\t\t\tshouldDispatch = true\n\t\t\t\t\t\t} = typeOrFn(statePropsContext);\n\n\t\t\t\t\t\tif (shouldDispatch) {\n\t\t\t\t\t\t\tapplyInteractionId(meta);\n\t\t\t\t\t\t\twrappedDispatch(type, payload, {...meta, span: dispatchSpan}, error);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tapplyInteractionId(meta);\n\t\t\t\t\t\twrappedDispatch(typeOrFn, payload, {...meta, span: dispatchSpan}, error);\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\t{...meta, el: host, interactionId, span: dispatchSpan}\n\t\t\t);\n\t\t});\n\t};\n}\n", "import {toLower} from '@servicenow/ui-internal';\nimport {\n\tSEISMIC_HOIST_TAG_NAME,\n\tHOIST_ATTR,\n\tNOW_HOIST_ATTR,\n\tCOMPONENT_ID_ATTRIBUTE,\n\tHOIST_APPEND_TO_ATTR,\n\tHOIST_APPEND_TO_PROP,\n\tNOW_HOIST_APPEND_TO_ATTR,\n\tNOW_HOIST_APPEND_TO_PROP,\n\tCOMPONENT_NAME_ATTR,\n\tHOIST_FIRST_SCROLL_PARENT,\n\tNOW_HOIST_PREPEND_TO_PROP,\n\tNOW_HOIST_PREPEND_TO_ATTR,\n\tNOW_HOIST_PROP,\n\tNOW_MODE_ATTR,\n\tNOW_COMPONENT_NAME_ATTR\n} from './constants';\nimport {\n\tROOT_NODE,\n\tATTACHED_ROOT_NODE,\n\tCONFIG,\n\tVARIABLES,\n\tCOMPONENT_ID,\n\tPROPERTY_DEFS,\n\tPROPS,\n\tRETARGETED_ACTION_TYPES,\n\tGET_RESOLVED_PROPERTY\n} from './symbols';\nimport {isHoisted, getHoistTarget, getHostVariables} from './utils';\n\nclass SeismicHoistElement extends HTMLElement {\n\tconstructor() {\n\t\tsuper();\n\n\t\tconst variables = {};\n\t\tthis[VARIABLES] = variables;\n\n\t\tvariables[RETARGETED_ACTION_TYPES] = [];\n\t}\n}\n\nconst hoistTagName = SEISMIC_HOIST_TAG_NAME.toLowerCase();\nwindow.customElements &&\n\t!window.customElements.get(hoistTagName) &&\n\twindow.customElements.define(hoistTagName, SeismicHoistElement);\n\nconst cast = (sourceEl, name, value) =>\n\tsourceEl[VARIABLES][PROPERTY_DEFS][name] && sourceEl[VARIABLES][PROPERTY_DEFS][name].unstableParse\n\t\t? JSON.stringify(sourceEl[VARIABLES][PROPS][name])\n\t\t: value;\n\nexport function createTargetAttr(tagName, componentId) {\n\treturn `${toLower(tagName)}[component-id=\"${componentId}\"]`;\n}\n\nexport function createTarget(sourceEl) {\n\tconst targetEl = document.createElement(hoistTagName);\n\tconst sourceVariables = getHostVariables(sourceEl);\n\tconst targetVariables = getHostVariables(targetEl);\n\tconst {\n\t\t[CONFIG]: {shadowRootOptions}\n\t} = sourceVariables;\n\ttargetVariables[ATTACHED_ROOT_NODE] = targetEl.attachShadow(shadowRootOptions);\n\ttargetEl.setAttribute(\n\t\t'target-for',\n\t\tcreateTargetAttr(sourceEl.tagName, sourceVariables[COMPONENT_ID])\n\t);\n\tconst {attributes} = sourceEl;\n\tconst {length: attributeCount} = sourceEl.attributes;\n\tfor (let i = 0; i < attributeCount; i++) {\n\t\tconst {name, value} = attributes[i];\n\t\tif (!omitAttrs.includes(name)) targetEl.setAttribute(name, cast(sourceEl, name, value));\n\t}\n\n\ttargetEl.sourceElement = sourceEl;\n\treturn targetEl;\n}\n\nexport const omitAttrs = [\n\tNOW_MODE_ATTR,\n\tNOW_COMPONENT_NAME_ATTR,\n\tNOW_HOIST_ATTR,\n\tNOW_HOIST_APPEND_TO_ATTR,\n\tNOW_HOIST_PREPEND_TO_ATTR,\n\tHOIST_ATTR,\n\tHOIST_APPEND_TO_ATTR,\n\tCOMPONENT_ID_ATTRIBUTE,\n\tCOMPONENT_NAME_ATTR\n];\n\nconst getParent = element => {\n\tconst parent = element.parentNode;\n\tif (parent && parent.host) return parent.host;\n\n\treturn parent;\n};\n\nconst overflowRegex = /(auto|scroll)/;\nconst getFirstScrollParent = sourceEl => {\n\tlet style = getComputedStyle(sourceEl);\n\tconst excludeStaticParent = style.position === 'absolute';\n\tlet parent = sourceEl;\n\n\tif (style.position === 'fixed') return document.body;\n\n\twhile ((parent = getParent(parent)) !== null) {\n\t\tif (parent === document.body) break;\n\n\t\tstyle = getComputedStyle(parent);\n\t\tif (excludeStaticParent && style.position === 'static') continue;\n\n\t\tif (overflowRegex.test(style.overflow + style.overflowY + style.overflowX)) return parent;\n\t}\n\n\treturn document.body;\n};\n\nconst shouldPrepend = sourceEl =>\n\tsourceEl[GET_RESOLVED_PROPERTY](NOW_HOIST_PREPEND_TO_PROP) ||\n\tsourceEl.getAttribute(NOW_HOIST_PREPEND_TO_ATTR);\n\nconst shouldAppend = sourceEl =>\n\tsourceEl[GET_RESOLVED_PROPERTY](HOIST_APPEND_TO_PROP) ||\n\tsourceEl.getAttribute(HOIST_APPEND_TO_ATTR) ||\n\tsourceEl[GET_RESOLVED_PROPERTY](NOW_HOIST_APPEND_TO_PROP) ||\n\tsourceEl.getAttribute(NOW_HOIST_APPEND_TO_ATTR);\n\nconst getAppendToEl = sourceEl => {\n\t// TODO: log and warn about legacy attributes, props\n\tconst hoistAppendToSelector = shouldAppend(sourceEl);\n\tconst hoistPrependToSelector = shouldPrepend(sourceEl);\n\n\tif (\n\t\thoistAppendToSelector === HOIST_FIRST_SCROLL_PARENT ||\n\t\thoistPrependToSelector === HOIST_FIRST_SCROLL_PARENT\n\t)\n\t\treturn getFirstScrollParent(sourceEl);\n\n\tconst selectorOrNode = hoistPrependToSelector || hoistAppendToSelector;\n\tif (!selectorOrNode) return document.body;\n\n\tconst node =\n\t\ttypeof selectorOrNode === 'string'\n\t\t\t? document.querySelector(selectorOrNode)\n\t\t\t: selectorOrNode instanceof HTMLElement\n\t\t\t? selectorOrNode\n\t\t\t: undefined;\n\n\treturn node || document.body;\n};\n\nexport function shouldHoistAttribute(host, name) {\n\treturn isHoisted(host) && !omitAttrs.includes(name);\n}\n\nexport function hoistAttribute(host, name, value) {\n\tconst hostVariables = getHostVariables(host);\n\tconst target = getHoistTarget(hostVariables);\n\tif (target.tagName === SEISMIC_HOIST_TAG_NAME) target.setAttribute(name, value);\n}\n\nexport function unhoistAttribute(host, name) {\n\tconst hostVariables = getHostVariables(host);\n\tconst target = getHoistTarget(hostVariables);\n\tif (target.tagName === SEISMIC_HOIST_TAG_NAME) target.removeAttribute(name);\n}\n\nexport function moveStyles(sourceEl, targetEl, deprioritizeStyles, onStateChange) {\n\tconst sourceVariables = getHostVariables(sourceEl);\n\tconst targetVariables = getHostVariables(targetEl);\n\tif (deprioritizeStyles) onStateChange(targetVariables[ATTACHED_ROOT_NODE], () => null);\n\n\tif (\n\t\tsourceVariables[ATTACHED_ROOT_NODE].adoptedStyleSheets &&\n\t\tsourceVariables[ATTACHED_ROOT_NODE].adoptedStyleSheets.length &&\n\t\t!targetVariables[ATTACHED_ROOT_NODE].adoptedStyleSheets.length\n\t) {\n\t\ttargetVariables[ATTACHED_ROOT_NODE].adoptedStyleSheets = [\n\t\t\t...sourceVariables[ATTACHED_ROOT_NODE].adoptedStyleSheets\n\t\t]; // eslint-disable-line no-param-reassign\n\t} else {\n\t\tconst sourceElRootNode = sourceVariables[ATTACHED_ROOT_NODE];\n\t\tconst {length: sourceElRootNodeChildCount} = sourceElRootNode.children;\n\t\tif (\n\t\t\tsourceElRootNodeChildCount &&\n\t\t\tsourceElRootNode.firstChild.tagName === 'STYLE' &&\n\t\t\t!targetVariables[ATTACHED_ROOT_NODE].length\n\t\t) {\n\t\t\ttargetVariables[ATTACHED_ROOT_NODE].appendChild(\n\t\t\t\tsourceElRootNode.removeChild(sourceElRootNode.firstChild)\n\t\t\t);\n\t\t\twhile (sourceElRootNode.firstChild) sourceElRootNode.removeChild(sourceElRootNode.firstChild);\n\t\t}\n\t}\n}\n\nexport function moveChildren(sourceEl, targetEl) {\n\tif (sourceEl.children.length) {\n\t\tconst fragment = document.createDocumentFragment();\n\n\t\twhile (sourceEl.firstChild) fragment.appendChild(sourceEl.removeChild(sourceEl.firstChild));\n\n\t\ttargetEl.appendChild(fragment);\n\t}\n}\n\nfunction connectTarget(sourceEl, targetEl) {\n\tconst hoistAppendToEl = getAppendToEl(sourceEl);\n\tif (shouldPrepend(sourceEl)) hoistAppendToEl.prepend(targetEl);\n\telse hoistAppendToEl.appendChild(targetEl);\n}\n\nfunction disconnectTarget(targetEl) {\n\ttargetEl.parentNode.removeChild(targetEl);\n}\n\nexport default function hoist(sourceEl, deprioritizeStyles, onStateChange) {\n\tif (\n\t\t!sourceEl[GET_RESOLVED_PROPERTY](HOIST_ATTR) &&\n\t\t!sourceEl.hasAttribute(HOIST_ATTR) &&\n\t\t!sourceEl[GET_RESOLVED_PROPERTY](NOW_HOIST_PROP) &&\n\t\t!sourceEl.hasAttribute(NOW_HOIST_ATTR)\n\t)\n\t\treturn;\n\n\tconst targetEl = createTarget(sourceEl);\n\n\tconst sourceVariables = getHostVariables(sourceEl);\n\tconst targetVariables = getHostVariables(targetEl);\n\n\t// these blocks cover the case when the hoist property is set to true after the source has already been connected and\n\t// possibly rendered. this appends the styles to the target shadowRoot then clears out the remaining child nodes\n\t// that were rendered in the source shadowRoot. it would be more efficient to never render the source shadowRoot,\n\t// but there isn't a way to know if a node will be hoisted in the future.\n\tmoveStyles(sourceEl, targetEl, deprioritizeStyles, onStateChange);\n\tmoveChildren(sourceEl, targetEl);\n\n\tconnectTarget(sourceEl, targetEl);\n\tsourceVariables[ROOT_NODE] = targetVariables[ATTACHED_ROOT_NODE]; // eslint-disable-line no-param-reassign\n\n\treturn function unhoist() {\n\t\tsourceVariables[ROOT_NODE] = sourceVariables[ATTACHED_ROOT_NODE]; // eslint-disable-line no-param-reassign\n\t\tmoveStyles(targetEl, sourceEl, deprioritizeStyles, onStateChange);\n\t\tmoveChildren(targetEl, sourceEl);\n\t\tdisconnectTarget(targetEl);\n\t};\n}\n", "import {toLower} from '@servicenow/ui-internal';\nimport {\n\tcreateStyleFragment,\n\tgetHostVariables,\n\tstyleSheetsContentCache,\n\tresolveStylesheetsContent\n} from './utils';\nimport {VERSION, ROOT_NODE} from './symbols';\n\nconst view = () => null;\nconst stylesMap = new Map();\n\nexport default async function applyStyles(el, config) {\n\tconst {\n\t\tstyles = '',\n\t\tstylesheets = [],\n\t\trenderer: {type: {onStateChange = () => null, deprioritizeStyles = false} = {}} = {}\n\t} = config;\n\n\t// eslint-disable-next-line nonblock-statement-body-position\n\tif (!styles && !stylesheets.length) return;\n\n\tconst hostVariables = getHostVariables(el);\n\tconst rootNode = hostVariables[ROOT_NODE];\n\tconst {tagName} = el;\n\n\tif (\n\t\tDocument &&\n\t\t'adoptedStyleSheets' in Document.prototype &&\n\t\t(process.env.NODE_ENV === 'production' || process.env.NODE_ENV === 'test')\n\t)\n\t\treturn applyWithAdoptedStylesSheets(el, tagName, rootNode, styles, stylesheets);\n\n\tapplyWithTag(el, tagName, rootNode, styles, stylesheets, deprioritizeStyles, onStateChange);\n}\n\nasync function applyWithAdoptedStylesSheets(el, tagName, rootNode, styles = '', stylesheets) {\n\tif (!stylesMap.has(tagName)) {\n\t\tconst externalStyles = document.head.querySelector(`#now-${toLower(tagName)}-styles`);\n\t\tif (externalStyles) {\n\t\t\tconst styleEl = externalStyles.content.cloneNode(true).querySelector('style');\n\t\t\tstyles = styleEl ? styleEl.textContent : styles; // eslint-disable-line no-param-reassign\n\t\t}\n\n\t\tlet stylesheetsContent = '';\n\n\t\tif (stylesheets && stylesheets.length) {\n\t\t\tstylesheetsContent = styleSheetsContentCache.get(el, tagName);\n\t\t\tif (!stylesheetsContent) {\n\t\t\t\tconst previousDisplaValue = el.style.display;\n\t\t\t\tel.style.setProperty('display', 'none', 'important');\n\t\t\t\tstylesheetsContent = await resolveStylesheetsContent(stylesheets);\n\t\t\t\tel.style.setProperty('display', previousDisplaValue);\n\t\t\t}\n\t\t}\n\n\t\tconst sheet = new CSSStyleSheet();\n\t\tsheet.replace(`${styles} ${stylesheetsContent}`);\n\t\tstylesMap.set(tagName, [sheet]);\n\t}\n\n\trootNode.adoptedStyleSheets = stylesMap.get(tagName); // eslint-disable-line no-param-reassign\n}\n\nasync function applyWithTag(\n\tel,\n\ttagName,\n\trootNode,\n\tstyles,\n\tstylesheets,\n\tdeprioritizeStyles,\n\tonStateChange\n) {\n\tlet stylesheetsContent = '';\n\n\t// eslint-disable-next-line nonblock-statement-body-position\n\tif (deprioritizeStyles) onStateChange(rootNode, view);\n\n\tif (stylesheets && stylesheets.length) {\n\t\tconst version = getHostVariables(VERSION) || '';\n\t\tstylesheetsContent = styleSheetsContentCache.get(version, tagName);\n\t\tif (!stylesheetsContent) {\n\t\t\tconst previousDisplaValue = el.style.display;\n\t\t\tel.style.setProperty('display', 'none', 'important');\n\t\t\tstylesheetsContent = await resolveStylesheetsContent(stylesheets);\n\t\t\tel.style.setProperty('display', previousDisplaValue);\n\t\t\tif (stylesheetsContent) styleSheetsContentCache.set(version, tagName, stylesheetsContent);\n\t\t}\n\t}\n\n\tconst styleFragment = createStyleFragment(styles, stylesheetsContent, tagName);\n\trootNode.appendChild(styleFragment);\n}\n", "import {getHostVariables} from './utils';\nimport {ROOT_NODE} from './symbols';\n\nexport default function removeStyles(el) {\n\tconst hostVariables = getHostVariables(el);\n\tconst nodes = [...hostVariables[ROOT_NODE].childNodes];\n\tconst {length: nodeCount} = nodes;\n\n\tfor (let i = 0; i < nodeCount; i++) {\n\t\tconst node = nodes[i];\n\t\tif (node && (node.tagName === 'STYLE' || node.tagName === 'SCRIPT'))\n\t\t\thostVariables[ROOT_NODE].removeChild(node);\n\t}\n}\n", "import {sandbox, locations} from '@servicenow/ui-internal';\nimport {camelCaseProperties, unescapeReservedCharacters, resolveComputedProperties} from '../utils';\nimport reflectProperties from './reflectProperties';\nimport log from '../log';\n\nexport {reflectProperty} from './reflectProperties';\n\nexport default function shapeRenderData(\n\tstate,\n\thost,\n\thostVariables,\n\ttransform,\n\tdispatch,\n\tinteractionId\n) {\n\tconst transformedState = reflectProperties(\n\t\tunescapeReservedCharacters(\n\t\t\tresolveComputedProperties(camelCaseProperties(state), host, hostVariables, interactionId)\n\t\t),\n\t\thost,\n\t\tinteractionId\n\t);\n\n\treturn (\n\t\tsandbox(transform, {\n\t\t\targs: [transformedState],\n\t\t\thost,\n\t\t\tlocation: locations.TRANSFORM_STATE,\n\t\t\tdispatch,\n\t\t\tlog\n\t\t}) || transformedState\n\t);\n}\n", "import {mark, types as metrics} from '@servicenow/ui-metrics';\nimport {memoize, toString} from '@servicenow/ui-internal';\nimport {filterPropertyDefinitions, toAttributeName, getHostVariables} from '../utils';\nimport reflectQueue from '../utils/reflectQueue'; // TODO: why is this required?\nimport {schedule, types} from '../scheduler';\nimport {PROPERTY_DEFS} from '../symbols';\n\nconst {REFLECT_PROPERTIES} = types;\n\nconst isAria = memoize(name => name.indexOf('aria') === 0, {profileName: 'isAria'});\n\nconst shouldRemoveAttribute = (name, value) => {\n\tif (isAria(name)) return !toString(value);\n\n\treturn !value;\n};\n\nconst getAttributeValue = (name, value) => {\n\tif (isAria(name)) return toString(value);\n\n\treturn value === true ? '' : value;\n};\n\nconst filterRelectedProperties = memoize(\n\thost => {\n\t\tconst hostVariables = getHostVariables(host);\n\t\tconst properties = filterPropertyDefinitions(hostVariables[PROPERTY_DEFS], d => d.reflect);\n\t\tconst keys = Object.keys(properties);\n\t\treturn {\n\t\t\tproperties,\n\t\t\tkeys\n\t\t};\n\t},\n\t{createCacheKey: host => host.tagName, profileName: 'filterRelectedProperties'}\n);\nconst filterUnstableParseProperties = memoize(\n\thost => {\n\t\tconst hostVariables = getHostVariables(host);\n\t\treturn filterPropertyDefinitions(hostVariables[PROPERTY_DEFS], d => d.unstableParse);\n\t},\n\t{createCacheKey: host => host.tagName, profileName: 'filterUnstableParseProperties'}\n);\nconst resolveValue = (propName, propDef, state) => {\n\tif (propDef.computed) {\n\t\tconst computedValue = propDef.computed(state);\n\t\tif (computedValue !== undefined) return computedValue;\n\t}\n\tconst stateValue = state.properties[propName];\n\tif (stateValue !== undefined) return stateValue;\n\n\treturn propDef.default || null;\n};\n\nexport function reflectProperty(propName, propDef, state, host, usingUnstableParse) {\n\tconst value = resolveValue(propName, propDef, state);\n\tconst attributeName = toAttributeName(propName);\n\tconst attributeValue = getAttributeValue(attributeName, value);\n\n\tif (shouldRemoveAttribute(attributeName, value) && host.hasAttribute(attributeName)) {\n\t\treflectQueue.push(attributeName);\n\n\t\thost.removeAttribute(attributeName);\n\t} else {\n\t\tif (\n\t\t\thost.getAttribute(attributeName) !== attributeValue &&\n\t\t\t((value !== null && value !== undefined && value !== false) ||\n\t\t\t\t(isAria(attributeName) && attributeValue))\n\t\t) {\n\t\t\treflectQueue.push(attributeName);\n\n\t\t\tif (usingUnstableParse[propName])\n\t\t\t\thost.setAttribute(attributeName, JSON.stringify(attributeValue), true);\n\t\t\telse host.setAttribute(attributeName, attributeValue, true);\n\t\t}\n\t}\n}\n\nexport default function reflectProperties(state, host, interactionId) {\n\tconst {properties: reflected, keys} = filterRelectedProperties(host);\n\tconst usingUnstableParse = filterUnstableParseProperties(host);\n\n\tschedule({\n\t\tfn() {\n\t\t\tmark(host, interactionId, metrics.PROPERTY_REFLECTION, {properties: keys});\n\t\t\tfor (const propName in reflected)\n\t\t\t\treflectProperty(propName, reflected[propName], state, host, usingUnstableParse);\n\t\t},\n\t\ttype: REFLECT_PROPERTIES,\n\t\tmeta: {el: host, interactionId}\n\t});\n\n\treturn state;\n}\n", "import {addResolvedPropertyMapping, isSelector} from '../property-selectors';\n\n/**\n * function to update resolvedSelectedPropertyMapping when the property value does not contain selector\n * but itself is selectable, it could become a provider property for other consumer components\n * @param {string} propertyValue\n * @param {string} providerPropName\n * @param {string} providerId\n */\nexport default function addResolvedSelectedPropertyMappingWithResolvedValue(\n\tpropertyValue,\n\tproviderPropName,\n\tproviderId\n) {\n\tif (isSelector(propertyValue)) return;\n\n\taddResolvedPropertyMapping({providerId, providerPropName}, propertyValue);\n}\n", "/**\n * Function called to allow handler to process the  now-resolved-props before they are assigned to the component/host\n * @name ProcessNowResolvedPropsFn\n * @function\n * @param {{host:SeismicElement, rawResolvedProps:obj, propertyKeys}} opts\n */\n\n/**\n * Function called to cleanup any subscriptions or listeners when the host is disconnected\n * @name DisconnectNowResolvedPropsCallbacksFn\n * @function\n * @param {SeismicElement} host\n */\n\n/**\n * Function provided by component that will initiate the property changes\n * @name ChangeCallbackFn\n * @function\n * @param {object} propertiesToUpdate\n */\n\n/**\n * Function called to create any subscriptions or listeners when the host is connected\n * @name ConnectNowResolvedPropsCallbacksFn\n * @function\n * @param {SeismicElement} host\n * @param {ChangeCallbackFn} changeCallback\n */\n\n/**\n * @typedef NowResolvedPropsHandler\n * @type {object}\n * @property {ProcessNowResolvedPropsFn} processNowResolvedProps\n * @property {DisconnectNowResolvedPropsCallbacksFn} disconnectNowResolvedPropsCallbacks\n * @property {ConnectNowResolvedPropsCallbacksFn} connectNowResolvedPropsCallbacks\n */\n\n/** @type {NowResolvedPropsHandler|null} */\nlet nowResolvedPropsHandler = null;\n\nexport function processNowResolvedProps({host, rawResolvedProps, propertyKeys}) {\n\tif (!nowResolvedPropsHandler) return {};\n\n\tif (\n\t\tnowResolvedPropsHandler.processNowResolvedProps === undefined ||\n\t\ttypeof nowResolvedPropsHandler.processNowResolvedProps !== 'function'\n\t) {\n\t\treturn {};\n\t}\n\treturn nowResolvedPropsHandler.processNowResolvedProps({host, rawResolvedProps, propertyKeys});\n}\n\nexport function disconnectNowResolvedPropsCallbacks(host) {\n\tif (!nowResolvedPropsHandler) return;\n\n\tif (\n\t\tnowResolvedPropsHandler.disconnectNowResolvedPropsCallbacks === undefined ||\n\t\ttypeof nowResolvedPropsHandler.disconnectNowResolvedPropsCallbacks !== 'function'\n\t) {\n\t\treturn;\n\t}\n\tnowResolvedPropsHandler.disconnectNowResolvedPropsCallbacks(host);\n}\n\nexport function connectNowResolvedPropsCallbacks(host, changeCallback) {\n\tif (!nowResolvedPropsHandler) return;\n\n\tif (\n\t\tnowResolvedPropsHandler.connectNowResolvedPropsCallbacks === undefined ||\n\t\ttypeof nowResolvedPropsHandler.connectNowResolvedPropsCallbacks !== 'function'\n\t) {\n\t\treturn;\n\t}\n\tnowResolvedPropsHandler.connectNowResolvedPropsCallbacks(host, changeCallback);\n}\n\nexport function clearNowResolvedPropsHandler() {\n\tnowResolvedPropsHandler = null;\n}\n\n/**\n * Registers a nowResolvedPropsHandler for resolving dynamic properties.\n * @param {NowResolvedPropsHandler} handler\n */\nexport function registerNowResolvedPropsHandler(handler) {\n\tnowResolvedPropsHandler = handler;\n}\n", "import buildConfigValidator from './utils/schema/build/buildConfigValidator';\nimport {SHADOW_ROOT_MODE_CLOSED, SHADOW_ROOT_MODE_OPEN} from './constants';\nimport {modifierTypes} from './effects';\n\nconst TYPE_ARRAY = {type: 'array'};\nconst TYPE_BOOLEAN = {type: 'boolean'};\nconst TYPE_FN = {fn: true};\nconst TYPE_NUMBER = {type: 'number'};\nconst TYPE_OBJECT = {type: 'object'};\nconst TYPE_STRING = {type: 'string'};\n\nconst properties = {\n\t...TYPE_OBJECT,\n\tadditionalProperties: {\n\t\t...TYPE_OBJECT,\n\t\tproperties: {\n\t\t\tdefault: {},\n\t\t\tcomputed: TYPE_FN,\n\t\t\trequired: TYPE_BOOLEAN,\n\t\t\tselectable: TYPE_BOOLEAN,\n\t\t\treflect: TYPE_BOOLEAN,\n\t\t\tdeepCompare: TYPE_BOOLEAN,\n\t\t\tresolveRef: TYPE_BOOLEAN,\n\t\t\tshouldRenderWhenSet: TYPE_BOOLEAN,\n\t\t\tschema: TYPE_OBJECT,\n\t\t\tunstableParse: {\n\t\t\t\t...TYPE_BOOLEAN,\n\t\t\t\tdeprecated: 'has been deprecated, use Type Schemas instead'\n\t\t\t},\n\t\t\tunstablePreserveEmptyStr: {\n\t\t\t\t...TYPE_BOOLEAN,\n\t\t\t\tdeprecated: 'has been deprecated, use Type Schemas instead'\n\t\t\t},\n\t\t\tdependencies: {\n\t\t\t\t...TYPE_ARRAY,\n\t\t\t\titems: TYPE_STRING\n\t\t\t},\n\t\t\tonChange: TYPE_FN\n\t\t},\n\t\tadditionalProperties: false\n\t}\n};\n\nconst interceptors = {\n\t...TYPE_ARRAY,\n\titems: {\n\t\tanyOf: [\n\t\t\t{\n\t\t\t\t...TYPE_OBJECT,\n\t\t\t\tproperties: {\n\t\t\t\t\tbefore: TYPE_FN,\n\t\t\t\t\tafter: TYPE_FN\n\t\t\t\t},\n\t\t\t\tadditionalProperties: false\n\t\t\t},\n\t\t\tTYPE_FN\n\t\t]\n\t}\n};\n\nconst actions = {\n\t...TYPE_OBJECT,\n\tadditionalProperties: {\n\t\t...TYPE_OBJECT,\n\t\tproperties: {\n\t\t\thandlers: {\n\t\t\t\t...TYPE_ARRAY,\n\t\t\t\tdeprecated: 'has been deprecated, use actions handlers instead',\n\t\t\t\titems: {\n\t\t\t\t\tanyOf: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t...TYPE_OBJECT,\n\t\t\t\t\t\t\tproperties: {\n\t\t\t\t\t\t\t\teffect: TYPE_FN,\n\t\t\t\t\t\t\t\tfn: TYPE_FN,\n\t\t\t\t\t\t\t\targs: TYPE_ARRAY\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tadditionalProperties: false\n\t\t\t\t\t\t},\n\t\t\t\t\t\tTYPE_FN\n\t\t\t\t\t]\n\t\t\t\t}\n\t\t\t},\n\t\t\tinterceptors: {\n\t\t\t\t...interceptors,\n\t\t\t\tdeprecated: 'has been deprecated, use actions handler `interceptors` instead'\n\t\t\t},\n\t\t\teffect: {\n\t\t\t\t...TYPE_FN,\n\t\t\t\tdeprecated: 'has been deprecated, use actions handlers instead'\n\t\t\t},\n\t\t\tprivate: {\n\t\t\t\ttype: 'boolean',\n\t\t\t\tdeprecated: 'has been deprecated, use actions handlers `stopPropagation` instead'\n\t\t\t},\n\t\t\tschema: TYPE_OBJECT\n\t\t},\n\t\tadditionalProperties: false\n\t}\n};\n\nconst actionHandlers = {\n\t...TYPE_OBJECT,\n\tadditionalProperties: {\n\t\tanyOf: [\n\t\t\t{\n\t\t\t\t...TYPE_OBJECT,\n\t\t\t\tproperties: {\n\t\t\t\t\teffect: TYPE_FN,\n\t\t\t\t\targs: TYPE_ARRAY,\n\t\t\t\t\tdescendantOnly: TYPE_BOOLEAN,\n\t\t\t\t\tstopPropagation: TYPE_BOOLEAN,\n\t\t\t\t\tinterceptors,\n\t\t\t\t\tmodifier: {\n\t\t\t\t\t\tanyOf: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t...TYPE_OBJECT,\n\t\t\t\t\t\t\t\tproperties: {\n\t\t\t\t\t\t\t\t\tname: {\n\t\t\t\t\t\t\t\t\t\t...TYPE_STRING,\n\t\t\t\t\t\t\t\t\t\tenum: [modifierTypes.DEBOUNCE]\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tdelay: TYPE_NUMBER,\n\t\t\t\t\t\t\t\t\tmaxWait: TYPE_NUMBER,\n\t\t\t\t\t\t\t\t\tcollate: TYPE_BOOLEAN\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tadditionalProperties: false\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t...TYPE_OBJECT,\n\t\t\t\t\t\t\t\tproperties: {\n\t\t\t\t\t\t\t\t\tname: {\n\t\t\t\t\t\t\t\t\t\t...TYPE_STRING,\n\t\t\t\t\t\t\t\t\t\tenum: [modifierTypes.THROTTLE]\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tlimit: TYPE_NUMBER\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tadditionalProperties: false\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t...TYPE_OBJECT,\n\t\t\t\t\t\t\t\tproperties: {\n\t\t\t\t\t\t\t\t\tname: {\n\t\t\t\t\t\t\t\t\t\t...TYPE_STRING,\n\t\t\t\t\t\t\t\t\t\tenum: [modifierTypes.TAKE_LATEST]\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tadditionalProperties: false\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t]\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tadditionalProperties: false\n\t\t\t},\n\t\t\tTYPE_FN\n\t\t]\n\t}\n};\n\nconst eventHandlers = {\n\t...TYPE_ARRAY,\n\titems: {\n\t\t...TYPE_OBJECT,\n\t\tproperties: {\n\t\t\tevents: {\n\t\t\t\t...TYPE_ARRAY,\n\t\t\t\tminItems: 1,\n\t\t\t\titems: TYPE_STRING\n\t\t\t},\n\t\t\teffect: TYPE_FN,\n\t\t\ttarget: {\n\t\t\t\tanyOf: [TYPE_OBJECT, TYPE_STRING]\n\t\t\t},\n\t\t\tcapture: TYPE_BOOLEAN,\n\t\t\tmodifier: {\n\t\t\t\tanyOf: [\n\t\t\t\t\t{\n\t\t\t\t\t\t...TYPE_OBJECT,\n\t\t\t\t\t\tproperties: {\n\t\t\t\t\t\t\tname: {\n\t\t\t\t\t\t\t\t...TYPE_STRING,\n\t\t\t\t\t\t\t\tenum: [modifierTypes.DEBOUNCE]\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tdelay: TYPE_NUMBER,\n\t\t\t\t\t\t\tmaxWait: TYPE_NUMBER,\n\t\t\t\t\t\t\tcollate: TYPE_BOOLEAN\n\t\t\t\t\t\t},\n\t\t\t\t\t\tadditionalProperties: false\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t...TYPE_OBJECT,\n\t\t\t\t\t\tproperties: {\n\t\t\t\t\t\t\tname: {\n\t\t\t\t\t\t\t\t...TYPE_STRING,\n\t\t\t\t\t\t\t\tenum: [modifierTypes.THROTTLE]\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tlimit: TYPE_NUMBER\n\t\t\t\t\t\t},\n\t\t\t\t\t\tadditionalProperties: false\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t...TYPE_OBJECT,\n\t\t\t\t\t\tproperties: {\n\t\t\t\t\t\t\tname: {\n\t\t\t\t\t\t\t\t...TYPE_STRING,\n\t\t\t\t\t\t\t\tenum: [modifierTypes.TAKE_LATEST]\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\tadditionalProperties: false\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t},\n\t\trequired: ['events', 'effect'],\n\t\tadditionalProperties: false\n\t}\n};\n\nconst initialState = {};\n\nconst setInitialState = {\n\t...TYPE_FN\n};\n\nconst onBootstrap = {\n\t...TYPE_FN,\n\tdeprecated: 'life cycle has been deprecated, use `COMPONENT_BOOTSTRAPPED` action handler instead'\n};\nconst onConnect = {\n\t...TYPE_FN,\n\tdeprecated: 'life cycle has been deprecated, use `COMPONENT_CONNECTED` action handler instead'\n};\n\nconst onDisconnect = {\n\t...TYPE_FN,\n\tdeprecated: 'life cycle has been deprecated, use `COMPONENT_DISCONNECTED` action handler instead'\n};\n\nconst onPropertiesSet = {\n\t...TYPE_FN,\n\tdeprecated: true\n};\n\nconst behavior = {\n\t...TYPE_OBJECT,\n\tproperties: {\n\t\tname: TYPE_STRING,\n\t\tproperties,\n\t\tactions,\n\t\tactionHandlers,\n\t\tdispatches: TYPE_OBJECT,\n\t\teventHandlers,\n\t\tinitialState,\n\t\tsetInitialState,\n\t\tonBootstrap,\n\t\tonConnect,\n\t\tonDisconnect,\n\t\tonPropertiesSet\n\t},\n\tadditionalProperties: false\n};\n\nconst presentationalBehavior = {\n\t...TYPE_OBJECT,\n\tproperties: {\n\t\tname: TYPE_STRING,\n\t\tproperties\n\t},\n\tadditionalProperties: false\n};\n\nconst validator = buildConfigValidator({\n\t...TYPE_OBJECT,\n\tproperties: {\n\t\tbehaviors: {\n\t\t\t...TYPE_ARRAY,\n\t\t\titems: {\n\t\t\t\tanyOf: [\n\t\t\t\t\tbehavior,\n\t\t\t\t\t{\n\t\t\t\t\t\t...TYPE_OBJECT,\n\t\t\t\t\t\tproperties: {\n\t\t\t\t\t\t\tbehavior,\n\t\t\t\t\t\t\toptions: TYPE_OBJECT\n\t\t\t\t\t\t},\n\t\t\t\t\t\tadditionalProperties: false\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\tuniqueItems: true\n\t\t},\n\t\tactions,\n\t\tactionHandlers,\n\t\teventHandlers,\n\t\tinitialState,\n\t\tsetInitialState,\n\t\tproperties,\n\t\trenderer: {\n\t\t\t...TYPE_OBJECT,\n\t\t\tproperties: {\n\t\t\t\tview: TYPE_FN,\n\t\t\t\ttransformState: TYPE_FN,\n\t\t\t\ttransformProps: TYPE_FN,\n\t\t\t\ttype: TYPE_OBJECT\n\t\t\t},\n\t\t\tadditionalProperties: false\n\t\t},\n\t\tview: TYPE_FN,\n\t\ttransformState: TYPE_FN,\n\t\ttransformProps: TYPE_FN,\n\t\ttype: TYPE_OBJECT,\n\t\tresources: {\n\t\t\t...TYPE_OBJECT,\n\t\t\tdeprecated: 'has been deprecated, use effects instead'\n\t\t},\n\t\tactionTypes: {\n\t\t\t...TYPE_ARRAY,\n\t\t\tdeprecated: true\n\t\t},\n\t\tactionTypesToProps: {\n\t\t\t...TYPE_OBJECT,\n\t\t\tdeprecated: true\n\t\t},\n\t\tonBootstrap,\n\t\tonConnect,\n\t\tonDisconnect,\n\t\tonPropertiesSet,\n\t\tdispatches: TYPE_OBJECT,\n\t\tslots: TYPE_OBJECT,\n\t\tstyles: TYPE_STRING,\n\t\tstylesheets: {\n\t\t\t...TYPE_ARRAY,\n\t\t\titems: TYPE_STRING\n\t\t},\n\t\tshadowRootOptions: {\n\t\t\t...TYPE_OBJECT,\n\t\t\tproperties: {\n\t\t\t\tmode: {\n\t\t\t\t\t...TYPE_STRING,\n\t\t\t\t\tenum: [SHADOW_ROOT_MODE_OPEN, SHADOW_ROOT_MODE_CLOSED]\n\t\t\t\t}\n\t\t\t},\n\t\t\tadditionalProperties: false\n\t\t}\n\t},\n\tadditionalProperties: false\n});\n\nconst presentationalValidator = buildConfigValidator({\n\t...TYPE_OBJECT,\n\tproperties: {\n\t\tbehaviors: {\n\t\t\t...TYPE_ARRAY,\n\t\t\titems: {\n\t\t\t\tanyOf: [\n\t\t\t\t\tpresentationalBehavior,\n\t\t\t\t\t{\n\t\t\t\t\t\t...TYPE_OBJECT,\n\t\t\t\t\t\tproperties: {\n\t\t\t\t\t\t\tbehavior: presentationalBehavior,\n\t\t\t\t\t\t\toptions: TYPE_OBJECT\n\t\t\t\t\t\t},\n\t\t\t\t\t\tadditionalProperties: false\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\tuniqueItems: true\n\t\t},\n\t\tproperties,\n\t\trenderer: {\n\t\t\t...TYPE_OBJECT,\n\t\t\tproperties: {\n\t\t\t\ttype: TYPE_OBJECT\n\t\t\t},\n\t\t\tadditionalProperties: false\n\t\t},\n\t\tview: TYPE_FN,\n\t\ttransformProps: TYPE_FN,\n\t\tstyles: TYPE_STRING,\n\t\tshadowRootOptions: {\n\t\t\t...TYPE_OBJECT,\n\t\t\tproperties: {\n\t\t\t\tmode: {\n\t\t\t\t\t...TYPE_STRING,\n\t\t\t\t\tenum: [SHADOW_ROOT_MODE_OPEN, SHADOW_ROOT_MODE_CLOSED]\n\t\t\t\t}\n\t\t\t},\n\t\t\tadditionalProperties: false\n\t\t}\n\t},\n\tadditionalProperties: false\n});\n\nexport function validatePresentationalConfig(name, config, options) {\n\treturn presentationalValidator(config, `Config for ${name}: `, options);\n}\n\nexport default function validateConfig(name, config, options) {\n\treturn validator(config, `Config for ${name}: `, options);\n}\n", "/**\n * This is a temporary workaround to expose legacy global variables\n * to keep the Seismic Test Plugin (component drivers) working correctly.\n * Please rip this out (and fix the esbuild.config.js to use the correct\n * entry point) once we get a real fix for that\n */\n\nimport * as exports from './index.js';\n\nif (typeof window !== 'undefined') window.__TECTONIC__$servicenow_ui_effect_amb = exports;\n\nexport * from './index.js';\n", "export {default as createAmbSubscriptionEffect} from './ambSubscriptionEffect';\nexport {default as createAmbPublishEffect} from './ambPublishEffect';\nexport {default as createAmbEventEffect} from './ambEventEffect';\n", "import getAMBClient from './getAMBClient';\nimport {createSubscriptionId, createRegistryId, replaceChannelParameters} from './utils';\nimport {get, defer} from '@servicenow/ui-internal';\nimport createGarbageCollectorMap from './createGarbageCollectorMap';\n\nconst ambChannelRegistry = createGarbageCollectorMap((registryId, channelListener) => {\n\tchannelListener.unsubscribe(channelListener.getCallback());\n});\n\nfunction createSubscriptionCallback(dispatch, successActionType, errorActionType, actionMetaData) {\n\t// use setTimeout (defer) because of an AMB client subscription timing issue\n\treturn response =>\n\t\tdefer(() => {\n\t\t\tif (response.successful) {\n\t\t\t\tdispatch(successActionType, {response}, actionMetaData);\n\t\t\t} else {\n\t\t\t\tconst {error} = response;\n\t\t\t\tdispatch(errorActionType, error, actionMetaData, true);\n\t\t\t}\n\t\t});\n}\n\nfunction createSubscriptionOptionsCallback(options) {\n\treturn () => options || {};\n}\n\nexport const AMB_CHANNEL_SUBSCRIBE_STARTED = 'AMB_CHANNEL_SUBSCRIBE_STARTED';\nexport const AMB_CHANNEL_SUBSCRIBE_SUCCEEDED = 'AMB_CHANNEL_SUBSCRIBE_SUCCEEDED';\nexport const AMB_CHANNEL_SUBSCRIBE_FAILED = 'AMB_CHANNEL_SUBSCRIBE_FAILED';\nexport const AMB_CHANNEL_UNSUBSCRIBE_SUCCEEDED = 'AMB_CHANNEL_UNSUBSCRIBE_SUCCEEDED';\nexport const AMB_MESSAGE_RECEIVED = 'AMB_MESSAGE_RECEIVED';\n\nexport function ambSubscriptionEffect(\n\tambClient,\n\tsubscriptionId,\n\tambChannelRegistry,\n\tchannelId,\n\toptions = {},\n\tcoeffects\n) {\n\tconst {\n\t\tsubscribeStartedActionType = AMB_CHANNEL_SUBSCRIBE_STARTED,\n\t\tsubscribeSucceededActionType = AMB_CHANNEL_SUBSCRIBE_SUCCEEDED,\n\t\tsubscribeFailedActionType = AMB_CHANNEL_SUBSCRIBE_FAILED,\n\t\tunsubscribeSucceededActionType = AMB_CHANNEL_UNSUBSCRIBE_SUCCEEDED,\n\t\tmessageReceivedActionType = AMB_MESSAGE_RECEIVED,\n\t\tencodeURIComponentForChannelId = true,\n\t\tsubscriptionOptions = {}\n\t} = options;\n\tconst {\n\t\taction,\n\t\taction: {\n\t\t\tmeta: {id: containerId}\n\t\t},\n\t\tdispatch,\n\t\thost\n\t} = coeffects;\n\tconst registryId = createRegistryId(containerId, subscriptionId);\n\tconst resolvedChannel = replaceChannelParameters(\n\t\tchannelId,\n\t\taction.payload,\n\t\tencodeURIComponentForChannelId\n\t);\n\tconst metaData = {...action.meta, channelId: resolvedChannel};\n\tconst shouldSubscribe = get(action, 'payload.subscribe', false);\n\tconst subscriptionCallback = createSubscriptionCallback(\n\t\tdispatch,\n\t\tsubscribeSucceededActionType,\n\t\tsubscribeFailedActionType,\n\t\tmetaData\n\t);\n\tconst subscribeOptionsCallback = createSubscriptionOptionsCallback(subscriptionOptions);\n\n\tif (!ambChannelRegistry.has(registryId)) {\n\t\tambChannelRegistry.set(\n\t\t\tregistryId,\n\t\t\tambClient.getChannel(resolvedChannel, {\n\t\t\t\tsubscriptionCallback,\n\t\t\t\tsubscribeOptionsCallback\n\t\t\t}),\n\t\t\thost\n\t\t);\n\t}\n\n\tlet channelListener = ambChannelRegistry.get(registryId);\n\tconst channelIdChanged = resolvedChannel !== channelListener.getName();\n\tif (channelIdChanged) {\n\t\tambChannelRegistry.set(\n\t\t\tregistryId,\n\t\t\tambClient.getChannel(resolvedChannel, {\n\t\t\t\tsubscriptionCallback,\n\t\t\t\tsubscribeOptionsCallback\n\t\t\t}),\n\t\t\thost\n\t\t);\n\t\tchannelListener = ambChannelRegistry.get(registryId);\n\t}\n\n\tconst isSubscribed = channelListener.getCallback() !== undefined;\n\tconst listenerFn = message => {\n\t\tdispatch(messageReceivedActionType, message, metaData);\n\t};\n\tif (!isSubscribed && shouldSubscribe) {\n\t\tdispatch(subscribeStartedActionType, {}, metaData);\n\t\tchannelListener.subscribe(listenerFn);\n\t} else if (isSubscribed && !shouldSubscribe) {\n\t\tambChannelRegistry.delete(registryId);\n\t\tchannelListener.unsubscribe(channelListener.getCallback());\n\t\tdispatch(unsubscribeSucceededActionType, {}, metaData);\n\t}\n}\n\n/**\n * Effect to manage an an amb channel subscription.\n *\n * @function createAmbSubscriptionEffect\n * @example\n * import {createAmbSubscriptionEffect} from '@servicenow/ui-effect-amb';\n *\n * const recordWatcherHandler = createAmbSubscriptionEffect('/rw/default/:table/:filter', {\n *      subscribeStartedActionType: 'RECORD_WATCHER_SUBSCRIBE_STARTED',\n *      subscribeSucceededActionType: 'RECORD_WATCHER_SUBSCRIBED',\n *      subscribeFailedActionType: 'RECORD_WATCHER_SUBSCRIBE_FAILED',\n *      unsubscribeSucceededActionType: 'RECORD_WATCHER_UNSUBSCRIBED',\n *      messageReceivedActionType: 'RECORD_WATCHER_ITEM_CHANGED',\n *      subscriptionOptions: {foo: 'bar'}\n * });\n *\n * const recordItemComponent = createCustomElement('sn-record-item', {\n *      renderer: {\n *          view: (state, dispatch) => {\n *              const {table, filter} = state.properties;\n *              function subscribe() {\n *                  dispatch('RECORD_WATCHER_SUBSCRIPTION_CHANGED', {\n *                      table,\n *                      filter,\n *                      subscribe: true\n *                  });\n *              }\n *\n *              function unsubscribe() {\n *                  dispatch('RECORD_WATCHER_SUBSCRIPTION_CHANGED', {\n *                      table,\n *                      filter,\n *                      subscribe: false\n *                  });\n *              }\n *\n *              return (\n *                  <div>\n *                      <button on-click='subscribe'>Subscribe</button>\n *                      <button on-click='unsubscribe'>Unsubscribe</button>\n *                  </div>\n *              );\n *          }\n *      },\n *\t    properties: {\n *          table: {},\n *          filter: {}\n *\t    },\n *      actionHandlers: {\n *\t\t    'RECORD_WATCHER_SUBSCRIPTION_CHANGED': recordWatcherHandler\n *\t\t}\n * });\n *\n * @param {String} channelId - AMB Channel ID\n * @param {Object} options\n * @param {String} options.subscribeStartedActionType - Action dispatched when an amb subscription is started\n * @param {String} options.subscribeSucceededActionType - Action dispatched if an amb subscription succeeds\n * @param {String} options.subscribeFailedActionType - Action dispatched if an amb subscription fails\n * @param {String} options.unsubscribeSucceededActionType - Action dispatched when an amb unsubscribe is successful\n * @param {String} options.messageReceivedActionType - Action dispatched when a message is received on a channel\n * @param {Boolean} options.encodeURIComponentForChannelId - Encode channel id URL (default: true)\n * @param {Object} options.subscriptionOptions - Arbitary key/value pass through object (default: {})\n *\n * @return {Object} AMB Subscription Effect Descriptor\n */\nexport default function createAmbSubscriptionEffect(channelId, options) {\n\treturn {\n\t\teffect: ambSubscriptionEffect,\n\t\targs: [getAMBClient(), createSubscriptionId(), ambChannelRegistry, channelId, options]\n\t};\n}\n", "import amb from 'amb-client-js';\n\nlet ambClient;\nlet clientUrl;\nexport default function getAMBClient(url = null) {\n\tif (!ambClient) {\n\t\tclientUrl = url;\n\t\tambClient = amb.getClient(clientUrl);\n\t}\n\tif (clientUrl !== url) throw new Error('Subsequent amb client request has different url');\n\treturn ambClient;\n}\n", "export {default as createSubscriptionId} from './createSubscriptionId';\nexport {default as createRegistryId} from './createRegistryId';\nexport {default as replaceChannelParameters} from './replaceChannelParameters';\n", "import {guid} from '@servicenow/ui-internal';\n\nexport default function createSubscriptionId() {\n\treturn guid();\n}\n", "export default function createRegistryId(containerId, subscriptionId) {\n\treturn `${containerId}-${subscriptionId}`;\n}\n", "import pathToRegexp from 'path-to-regexp';\n\nexport default function replaceChannelParameters(\n\tchannelId,\n\tchannelParams = {},\n\tencodeURIComponentForChannelId = true\n) {\n\tconst toPath = pathToRegexp.compile(channelId, {sensitive: true, whitelist: './'});\n\tconst toPathOptions = encodeURIComponentForChannelId === false ? {encode: str => str} : {};\n\treturn toPath(channelParams, toPathOptions);\n}\n", "import {getConfigItem} from '@servicenow/ui-config';\nimport {DISCONNECTED_TIME} from '@servicenow/ui-internal';\nimport setInterval from './utils/setInterval';\n\nconst garbageCollectors = [];\nexport const GARBAGE_COLLECTOR_INTERVAL = getConfigItem('ambGC.GARBAGE_COLLECTOR_INTERVAL') || 5000;\nexport const TIME_TO_WAIT_AFTER_DISCONNECT =\n\tgetConfigItem('ambGC.TIME_TO_WAIT_AFTER_DISCONNECT') || 1000;\n\nsetInterval(() => {\n\tgarbageCollectors.forEach(garbageCollector => {\n\t\tgarbageCollector.__map.forEach((value, key) => {\n\t\t\tif (!value.host.isConnected) {\n\t\t\t\t// Component has disconnected. To avoid unsubscribing a component that may\n\t\t\t\t// immediately reconnect, flag the component for removal in the next interval if\n\t\t\t\t// the component has not already been flagged. If it is already flagged and enough time\n\t\t\t\t// has passed, remove it.\n\t\t\t\tif (!value.host[DISCONNECTED_TIME]) value.host[DISCONNECTED_TIME] = Date.now();\n\t\t\t\telse if (Date.now() - value.host[DISCONNECTED_TIME] > TIME_TO_WAIT_AFTER_DISCONNECT)\n\t\t\t\t\tgarbageCollector.delete(key);\n\t\t\t}\n\t\t});\n\t});\n}, GARBAGE_COLLECTOR_INTERVAL);\n\nexport default function createGarbageCollectorMap(cleanup) {\n\tconst map = new Map();\n\n\tfunction remove(key) {\n\t\tif (map.has(key)) {\n\t\t\tcleanup(key, map.get(key).value);\n\t\t\tmap.delete(key);\n\t\t}\n\t}\n\n\tconst garbageCollectorMap = {\n\t\tset(key, value, host) {\n\t\t\tremove(key);\n\t\t\tmap.set(key, {value, host});\n\t\t},\n\t\thas(key) {\n\t\t\treturn map.has(key);\n\t\t},\n\t\tget(key) {\n\t\t\tconst mapValue = map.get(key);\n\n\t\t\treturn mapValue && mapValue.value;\n\t\t},\n\t\tdelete(key) {\n\t\t\tremove(key);\n\t\t},\n\t\tforEach(callback, thisArg) {\n\t\t\tmap.forEach((entry, key) => callback(entry.value, key), thisArg);\n\t\t},\n\t\t__map: map\n\t};\n\n\tgarbageCollectors.push(garbageCollectorMap);\n\n\treturn garbageCollectorMap;\n}\n", "/**\n * Module that just exports window.setInterval to make it easier to mock and test\n */\n\nexport default setInterval;\n", "import getAMBClient from './getAMBClient';\nimport {replaceChannelParameters} from './utils';\n\nexport const AMB_MESSAGE_PUBLISHED = 'AMB_MESSAGE_PUBLISHED';\n\nexport function ambPublishEffect(ambClient, channelId, options = {}, coeffects) {\n\tconst {\n\t\tmessagePublishedActionType = AMB_MESSAGE_PUBLISHED,\n\t\tencodeURIComponentForChannelId = true\n\t} = options;\n\tconst {action, dispatch} = coeffects;\n\tconst resolvedChannel = replaceChannelParameters(\n\t\tchannelId,\n\t\taction.payload,\n\t\tencodeURIComponentForChannelId\n\t);\n\n\t// Should be able to publish messages even if not subscribed to channel\n\tconst channelListener = ambClient.getChannel(resolvedChannel);\n\n\tif (channelListener) {\n\t\tconst {payload: message = {}} = action;\n\t\tchannelListener.publish(message);\n\t\tdispatch(messagePublishedActionType, message, {...action.meta, channelId: resolvedChannel});\n\t}\n}\n\n/**\n * Effect to publish messages over an amb channel.\n *\n * @function createAmbPublishEffect\n * @example\n * import {createAmbPublishEffect} from '@servicenow/ui-effect-amb';\n *\n * const chatMessagePublishedEffect = createAmbPublishEffect('/chat/messages', {\n *     messagePublishedActionType: 'CHAT_MESSAGE_PUBLISH_COMPLETED'\n * });\n *\n * const chatComponent = createCustomElement('sn-chat', {\n *      renderer: {\n *          view: (state, dispatch) => {\n *              function sendMessage() {\n *                  dispatch('CHAT_MESSAGE_PUBLISHED', {\n *                     text: 'Hello World'\n *                  });\n *              }\n *\n *              return <button on-click=\"sendMessage\">Send Message</button>\n *          }\n *      },\n *      actionHandlers: {\n *\t\t    'CHAT_MESSAGE_PUBLISHED': chatMessagePublishedEffect\n *\t\t}\n * });\n *\n * @param {String} channelId - AMB Channel ID\n * @param {Object} options\n * @param {Object} options.messagePublishedActionType = Action dispatched when an amb message publish completes\n * @param {Boolean} options.encodeURIComponentForChannelId - Encode channel id URL (default: true)\n * @return {Object} AMB Publish Effect Descriptor\n */\nexport default function createAmbPublishEffect(channelId, options) {\n\treturn {\n\t\teffect: ambPublishEffect,\n\t\targs: [getAMBClient(), channelId, options]\n\t};\n}\n", "import getAMBClient from './getAMBClient';\nimport {createSubscriptionId} from './utils';\nimport {get, toUpper} from '@servicenow/ui-internal';\nimport createGarbageCollectorMap from './createGarbageCollectorMap';\n\nconst eventSubscriptionRegistry = createGarbageCollectorMap((subscriptionId, eventIds) => {\n\teventIds.forEach(id => getAMBClient().unsubscribeFromEvent(id));\n});\n\nexport function ambEventEffect(subscriptionId, ambClient, eventSubscriptionRegistry, coeffects) {\n\tconst {action, dispatch, host} = coeffects;\n\tconst shouldSubscribe = get(action, 'payload.subscribe', false);\n\tif (!eventSubscriptionRegistry.has(subscriptionId) && shouldSubscribe) {\n\t\tconst eventMap = ambClient.getEvents();\n\t\tconst eventIds = [];\n\t\tfor (const key in eventMap) {\n\t\t\teventIds.push(\n\t\t\t\tambClient.subscribeToEvent(eventMap[key], () => dispatch(toUpper(`AMB_EVENT_${key}`)))\n\t\t\t);\n\t\t}\n\n\t\teventSubscriptionRegistry.set(subscriptionId, eventIds, host);\n\t} else if (eventSubscriptionRegistry.has(subscriptionId) && !shouldSubscribe) {\n\t\teventSubscriptionRegistry.delete(subscriptionId);\n\t}\n}\n\n/**\n * Effect to subscribe to AMB events.\n *\n * Dispatches the following actions when the corresponding AMB event occurs:\n *  * AMB_EVENT_CONNECTION_INITIALIZED\n *  * AMB_EVENT_CONNECTION_OPENED\n *  * AMB_EVENT_CONNECTION_CLOSED\n *  * AMB_EVENT_CONNECTION_BROKEN\n *  * AMB_EVENT_SESSION_LOGGED_IN\n *  * AMB_EVENT_SESSION_LOGGED_OUT\n *  * AMB_EVENT_SESSION_INVALIDATED\n *\n * @function createAmbEventEffect\n * @example\n * import {createCustomElement} from '@servicenow/ui-core';\n * import {createAmbEventEffect} from '@servicenow/ui-effect-amb';\n *\n * import {\n *  AMB_EVENT_SUBSCRIPTION_CHANGED,\n *  AMB_EVENT_SESSION_LOGGED_IN,\n *  AMB_EVENT_SESSION_LOGGED_OUT\n * } from './actions';\n *\n * createCustomElement('user-status', {\n *  renderer: {\n *      view(state) {\n *          if(state.loggedIn)\n *              return <h1>Logged In</h1>\n *          else\n *              return <h1>Logged Out</h1>\n *      }\n *  },\n *  actionHandlers: {\n *      [COMPONENT_CONNECTED]: () => {\n *          dispatch(AMB_EVENT_SUBSCRIPTION_CHANGED, {subscribe: true});\n *      },\n *      [COMPONENT_DISCONNECTED]: () => {\n *          dispatch(AMB_EVENT_SUBSCRIPTION_CHANGED, {subscribe: false});\n *      },\n *      [AMB_EVENT_SUBSCRIPTION_CHANGED]: createAmbEventEffect(),\n *      [AMB_EVENT_SESSION_LOGGED_IN]: ({updateState}) => updateState({loggedIn: true}),\n *      [AMB_EVENT_SESSION_LOGGED_OUT]: ({updateState}) => updateState({loggedIn: false})\n *  }\n * });\n *\n * @return {Object} AMB Event Effect Descriptor\n */\nexport default function createAmbEventEffect() {\n\treturn {\n\t\teffect: ambEventEffect,\n\t\targs: [createSubscriptionId(), getAMBClient(), eventSubscriptionRegistry]\n\t};\n}\n", "/**\n * This is a temporary workaround to expose legacy global variables\n * to keep the Seismic Test Plugin (component drivers) working correctly.\n * Please rip this out (and fix the esbuild.config.js to use the correct\n * entry point) once we get a real fix for that\n */\n\nimport * as exports from './index.js';\n\nif (typeof window !== 'undefined') window.__TECTONIC__$servicenow_ui_effect_graphql = exports;\n\nexport * from './index.js';\n", "export {default as createGraphQLEffect} from './gqlEffect';\nexport {hashQuery} from './gqlEffect';\n", "import * as uiAnalyticsConsumer from '@servicenow/ui-analytics-consumer';\nimport {getInteractionId} from '@servicenow/ui-metrics';\nimport {\n\tcreateHttpErrorAction,\n\tresolveDomainContext,\n\tpostTxnStatus\n} from '@servicenow/ui-effect-helpers';\nimport {sendRequest} from './http';\nimport {configConstants, getConfigItem} from '@servicenow/ui-config';\n\nimport {\n\tcreateSubscriptionId,\n\tcreateRegistryId,\n\tgetAMBClient,\n\thandleGraphQLSubscription\n} from './subscriptions';\n\nimport {createGraphQLDocument, getOperationName, getSpanOptions} from './utils';\n\nimport {\n\tdefer,\n\tpick,\n\taddPendingNetworkActionForHost,\n\tisEqual,\n\tremovePendingNetworkActionForHost\n} from '@servicenow/ui-internal';\n\nimport documentToQueryString from './http/documentToQueryString';\nimport QueryContext from './queryContext';\nimport {\n\tSPAN_ATTR_GQL_ERROR,\n\tSPAN_ATTR_GQL_ERROR_STATUS,\n\tSPAN_ATTR_GQL_ERROR_STATUS_TEXT,\n\tSPAN_ATTR_GQL_OPERATION_NAME,\n\tSPAN_ATTR_INTERACTION_ID,\n\tSPAN_FOR_GRAPHQL,\n\tSPAN_KIND_CLIENT\n} from './constants';\n\nconst {tracer} = uiAnalyticsConsumer;\nconst ambChannelRegistry = new Map();\nconst DEFAULT_GQL_ENDPOINT = '/api/now/graphql';\n\nexport const GRAPHQL_REQUEST_STARTED = 'GRAPHQL_REQUEST_STARTED';\nexport const GRAPHQL_REQUEST_SUCCEEDED = 'GRAPHQL_REQUEST_SUCCEEDED';\nexport const GRAPHQL_REQUEST_FAILED = 'GRAPHQL_REQUEST_FAILED';\nexport const GRAPHQL_CACHE_UPDATED = 'GRAPHQL_CACHE_UPDATED';\n\nconst {GQL_CACHING_REFRESH_DELAY} = configConstants;\n\nconst cacheDelay = getConfigItem(GQL_CACHING_REFRESH_DELAY) || 10000;\n\nexport async function hashQuery(rawQuery) {\n\tconst gqlDoc = createGraphQLDocument(rawQuery);\n\tconst queryString = documentToQueryString(gqlDoc);\n\tconst msgUint8 = new TextEncoder().encode(queryString);\n\tconst hashBuffer = await crypto.subtle.digest('SHA-256', msgUint8);\n\tconst hashArray = Array.from(new Uint8Array(hashBuffer));\n\tconst hashHex = hashArray.map(b => b.toString(16).padStart(2, '0')).join('');\n\treturn hashHex;\n}\n\nexport function* gqlEffect(\n\tquery,\n\toptions = {},\n\tsubscriptionId,\n\tgetAMBClient,\n\tambChannelRegistry,\n\tcoeffects\n) {\n\tconst {\n\t\tvariableList = [],\n\t\ttemplateVarList = [],\n\t\theaderList = [],\n\t\tcacheable = false,\n\t\t__unstableQueryHash = null,\n\t\tstartActionType = GRAPHQL_REQUEST_STARTED,\n\t\tstreaming = null,\n\t\tsuccessActionType = GRAPHQL_REQUEST_SUCCEEDED,\n\t\terrorActionType = GRAPHQL_REQUEST_FAILED,\n\t\tcacheUpdateActionType = GRAPHQL_CACHE_UPDATED,\n\t\tqueryParams = []\n\t} = options;\n\n\tconst containerId = coeffects.action.meta.id;\n\tconst registryId = createRegistryId(containerId, subscriptionId);\n\n\tconst {action, dispatch, host} = coeffects;\n\tconst {payload = {}} = action;\n\tconst variables = pick(payload, variableList);\n\tconst templateVars = pick(payload, templateVarList);\n\tconst headers = pick(payload, headerList);\n\tconst params = pick(payload, queryParams);\n\tconst gqlSpan = tracer.startSpan(SPAN_FOR_GRAPHQL, {\n\t\t...getSpanOptions(host),\n\t\tkind: SPAN_KIND_CLIENT\n\t});\n\n\tconst actionMetaData = {\n\t\t...action.meta,\n\t\t...(gqlSpan.isRecording() && {span: gqlSpan}),\n\t\toptions: {\n\t\t\tquery,\n\t\t\tvariables,\n\t\t\ttemplateVars,\n\t\t\theaders\n\t\t}\n\t};\n\tconst showUxfTxnStatus =\n\t\t(options?.showUxfTxnStatus ?? actionMetaData?.showUxfTxnStatus ?? payload?.showUxfTxnStatus) !==\n\t\tfalse;\n\tlet requestId, interactionId, requestData, error, success;\n\taddPendingNetworkActionForHost(action, host);\n\ttry {\n\t\tconst queryContext = new QueryContext({\n\t\t\tinitialPayloadActionType: streaming?.initialPayloadActionType,\n\t\t\tadditionalDataActionType: streaming?.additionalDataActionType,\n\t\t\tsuccessActionType,\n\t\t\tdispatch,\n\t\t\tactionMetaData\n\t\t});\n\t\tconst operationName = getOperationName(host.tagName);\n\t\tconst domainContext = resolveDomainContext(host);\n\n\t\tif (domainContext) actionMetaData.domainContext = domainContext;\n\n\t\tdispatch(startActionType, {}, actionMetaData);\n\t\tinteractionId = getInteractionId(action.meta);\n\t\tgqlSpan.setAttribute(SPAN_ATTR_INTERACTION_ID, interactionId);\n\t\tgqlSpan.setAttribute(SPAN_ATTR_GQL_OPERATION_NAME, operationName);\n\t\trequestData = {query, variables, operationName};\n\t\trequestId = postTxnStatus({\n\t\t\tshowUxfTxnStatus,\n\t\t\thost,\n\t\t\trequestType: action?.type ?? SPAN_FOR_GRAPHQL,\n\t\t\trequestUrl: DEFAULT_GQL_ENDPOINT,\n\t\t\trequestMethod: 'POST',\n\t\t\trequestData,\n\t\t\tstatus: 'started',\n\t\t\tinteractionId,\n\t\t\tspanId: gqlSpan?.isRecording() ? gqlSpan?.id : undefined,\n\t\t\tstreaming: !!streaming\n\t\t});\n\t\tconst result = yield sendRequest(\n\t\t\toperationName,\n\t\t\tvariables,\n\t\t\ttemplateVars,\n\t\t\tdomainContext,\n\t\t\theaders,\n\t\t\t{\n\t\t\t\thost,\n\t\t\t\tinteractionId,\n\t\t\t\tactionType: action.type,\n\t\t\t\tcacheable,\n\t\t\t\t__unstableDisableBatching: payload.__unstableDisableBatching,\n\t\t\t\t__unstableQueryHash,\n\t\t\t\tquery,\n\t\t\t\tparams\n\t\t\t},\n\t\t\tqueryContext\n\t\t);\n\t\tconst {\n\t\t\theaders: responseHeaders,\n\t\t\tisCachedResult = false,\n\t\t\trefetchPromise = null,\n\t\t\t...successPayload\n\t\t} = result;\n\t\tsuccess = successPayload;\n\t\tqueryContext.successPayloadReceived(successPayload, responseHeaders);\n\t\tif (isCachedResult && refetchPromise) {\n\t\t\tdefer(() => {\n\t\t\t\trefetchPromise().then(refetchResult => {\n\t\t\t\t\t// compare cachedResult and refetchResult, refetch result will not be streamed\n\t\t\t\t\t// so can use refetchResult directly for comparison\n\t\t\t\t\tif (!isEqual(queryContext.finalPayload.data, refetchResult[0].data)) {\n\t\t\t\t\t\tdispatch(cacheUpdateActionType, refetchResult[0], {\n\t\t\t\t\t\t\t...actionMetaData,\n\t\t\t\t\t\t\tresponseHeaders\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}, cacheDelay);\n\t\t}\n\n\t\t// isSubscription() searches for path 'definitions[0].operation' in the original document\n\t\t// for better performance, shortcut subscription detection without using createGraphQLDocument\n\t\tif (query?.trimStart().startsWith('subscription')) {\n\t\t\tconst {data} = result;\n\t\t\tconst ambClient = getAMBClient();\n\t\t\thandleGraphQLSubscription(\n\t\t\t\taction,\n\t\t\t\toptions,\n\t\t\t\tdata,\n\t\t\t\tactionMetaData,\n\t\t\t\tdispatch,\n\t\t\t\tregistryId,\n\t\t\t\tambClient,\n\t\t\t\tambChannelRegistry\n\t\t\t);\n\t\t}\n\t} catch (err) {\n\t\terror = err;\n\t\tconst {response = {}, result} = error;\n\t\tconst {status, statusText} = response;\n\t\tconst responseHeaders = response?.headers;\n\t\tgqlSpan.setAttribute(SPAN_ATTR_GQL_ERROR, true);\n\t\tgqlSpan.setAttribute(SPAN_ATTR_GQL_ERROR_STATUS, status);\n\t\tgqlSpan.setAttribute(SPAN_ATTR_GQL_ERROR_STATUS_TEXT, statusText);\n\t\tdispatch(\n\t\t\terrorActionType,\n\t\t\terror,\n\t\t\t{\n\t\t\t\t...actionMetaData,\n\t\t\t\tresponseHeaders\n\t\t\t},\n\t\t\ttrue\n\t\t);\n\n\t\t// Standard action dispatched on HTTP errors from the server\n\t\tconst {\n\t\t\ttype,\n\t\t\tpayload,\n\t\t\tmeta,\n\t\t\terror: httpError\n\t\t} = createHttpErrorAction(status, statusText, '', result, actionMetaData);\n\t\tdispatch(type, payload, meta, httpError);\n\t} finally {\n\t\tremovePendingNetworkActionForHost(action, host);\n\t\tgqlSpan.endSpan();\n\n\t\tpostTxnStatus({\n\t\t\tshowUxfTxnStatus,\n\t\t\thost,\n\t\t\trequestId,\n\t\t\trequestType: action?.type ?? SPAN_FOR_GRAPHQL,\n\t\t\trequestUrl: DEFAULT_GQL_ENDPOINT,\n\t\t\trequestMethod: 'POST',\n\t\t\trequestData,\n\t\t\tstatus: error ? 'failure' : 'success',\n\t\t\tresponseStatus: error ? error?.response?.status : 200,\n\t\t\tresponse: error ? error : success,\n\t\t\tinteractionId,\n\t\t\tstreaming: !!streaming\n\t\t});\n\t}\n}\n\n/**\n * Effect that makes a GraphQL request and dispatches actions at relevant parts of the life cycle:\n *  - Before the request is sent\n *  - After the request has returned (success or error)\n *\n * The Success and Action Types that are returned also contain a `meta` property with helpful information\n * useful for debugging purposes including the response headers.\n *\n * @function createGraphQLEffect\n * @example\n * import {createGraphQLEffect} from '@servicenow/ui-effect-graphql';\n *\n * const incidentQuery = `query ($sys_id: String!) {\n *                          GlideRecord_Query (sys_id: $sys_id) {\n *                            incident {\n *                              _results {\n *                                sys_id {\n *                                  displayValue\n *                                }\n *                              }\n *                            }\n *                          }\n *                        }`;\n *\n * const fetchIncidentEffect = createGraphQLEffect(incidentQuery, {\n *     variableList: ['sys_id']\n * });\n *\n * // Register with component action handlers:\n * {\n *     actionHandlers:{\n *         'INCIDENT_FETCHED': fetchIncidentEffect\n *     }\n * }\n *\n * @param {String} query - GraphQL query\n * @param {Object} options\n * @param {Array<String>} options.variableList - GraphQL variables to use from action payload\n * @param {Array<String>} options.templateVarList - Template variables to use from action payload\n * @param {Object<String>} options.headerList - GraphQL request headers\n * @param {String} options.startActionType - Action to be dispatched when the GraphQL request has been issued\n * @param {Object} options.streaming - A JSON object to describe how to handle data when a streaming GraphQL response is expected\n * @param {String} options.&lt;streaming&gt;.initialPayloadActionType - The action to be dispatched when the initial part of the GraphQL payload is received\n * @param {String} options.&lt;streaming&gt;.additionalDataActionType - The action to be dispatched when a streaming update for the GraphQL response is received, this action (assuming the GraphQL Endpoint & schema support it) will be called multiple times until the whole payload is received. The updates will be received in the following format https://github.com/graphql/graphql-wg/blob/main/rfcs/DeferStream.md#payload-format\n * @param {String} options.successActionType - Action to be dispatched when the GraphQL request has either successfully completed or failed with an error not related to network issue\n * @param {String} options.cacheUpdateActionType - Action to be dispatched when the GraphQL cache has been updated with a new value\n * @param {String} options.errorActionType - Action to be dispatched only when the GraphQL request has failed due to network errors, not due to errors thrown in Glide\n * @param {String} options.subscriptionStartedActionType - Action to be dispatched when GraphQL subscription starts\n * @param {String} options.subscriptionSuccessActionType - Action to be dispatched when GraphQL subscription succeeds\n * @param {String} options.subscriptionFailedActionType - Action to be dispatched when GraphQL subscription fails\n * @param {String} options.unsubscribeSuccessActionType - Action to be dispatched when unsubscribing from GraphQL subscription\n * @param {String} options.itemEnteredActionType - Action to be dispatched when an item enters the GraphQL subscription query\n * @param {String} options.itemChangedActionType - Action to be dispatched when an item has changed in the GraphQL subscription query\n * @param {String} options.itemExitedActionType - Action to be dispatched when an item exits the GraphQL subscription query\n * @param {Array<String>} options.queryParams - Array of properties in dispatched action to map values to URL query string variables (\"api/users?id=abc123)\n * @param {Boolean} options.showUxfTxnStatus - Whether to consider this request for showing UXF Long running transaction status (default: true)\n * @return {Object} GraphQL Effect Descriptor\n */\n\nexport default function createGraphQLEffect(query, options) {\n\treturn {\n\t\teffect: gqlEffect,\n\t\targs: [query, options, createSubscriptionId(), getAMBClient, ambChannelRegistry]\n\t};\n}\n", "export {default as createHttpErrorAction} from './createHttpErrorAction';\nexport {default as postTxnStatus} from './postTxnStatus';\n\nexport {domainSeparationProperties} from '@servicenow/ui-internal';\nexport {default as resolveDomainContext} from './resolveDomainContext';\n\n// Caching\nexport {getUserSysId} from './cache/getUserSysId';\nexport {hashString} from './cache/hash';\nexport {makeLRUCachePolicy} from './cache/cachePolicies/lruCachePolicy';\nexport {makePersistentCache} from './cache/cache';\nexport {murmurhash3} from './cache/murmur-hash3';\nexport {openStore} from './cache/store';\n", "/**\n * @private\n * @param status\n * @param statusText\n * @param message\n * @param data\n * @param meta\n * @returns {{payload: {data: *, statusText: *, message: *, status: *}, meta: *, type: string, error: boolean}}\n */\nexport default function createHttpErrorAction(status, statusText, message, data, meta) {\n\treturn {\n\t\ttype: 'HTTP_ERROR_OCCURRED',\n\t\tpayload: {\n\t\t\tstatus,\n\t\t\tstatusText,\n\t\t\tmessage,\n\t\t\tdata\n\t\t},\n\t\tmeta: {\n\t\t\t...meta,\n\t\t\tstopPropagation: false,\n\t\t\tstatus,\n\t\t\tstatusText\n\t\t},\n\t\terror: true\n\t};\n}\n", "const getRandomId = () => (Math.random() * 10001) | 0;\n\n/**\n * Generates a unique request ID using spanId, interactionId, or timestamp.\n * Priority: spanId > interactionId > timestamp\n * @param {string} [spanId] - Unique span ID from tracing (highest priority)\n * @param {string} [interactionId] - UI interaction ID (fallback if spanId not available)\n * @returns {string} - Unique ID in format: `${id}_${timestamp}` or just `${timestamp}`\n */\nconst createRequestId = (spanId, interactionId) => {\n\tconst timestamp =\n\t\ttypeof performance !== 'undefined' && performance.now ? performance.now() : Date.now();\n\n\tif (spanId) {\n\t\treturn `${spanId}_${timestamp}`;\n\t} else if (interactionId) {\n\t\treturn `${interactionId}_${getRandomId()}_${timestamp}`;\n\t}\n\treturn `${getRandomId()}_${timestamp}`;\n};\n\n/**\n * Posts a transaction status update to the UXF framework.\n * Safely handles cases where the framework isn't initialized.\n *\n * @param {Object} params\n * @param {Boolean} params.showUxfTxnStatus - Whether to post the status\n * @param {Object} params.host - The host element\n * @param {String} [params.requestId] - Unique request identifier (if not provided, falls back to spanId > interactionId > auto-generated)\n * @param {String} [params.spanId] - Span ID used to generate requestId (highest priority for auto-generation)\n * @param {String} [params.interactionId] - UI Interaction ID (used for auto-generation if spanId not available, also included in payload)\n * @param {String} params.status - Transaction status: \"started\", \"success\", or \"failure\"\n * @param {String} [params.requestUrl] - The request URL\n * @param {String} [params.requestType] - The request type (e.g., 'GQL', 'HTTP')\n * @param {String} [params.requestMethod] - The HTTP request method (e.g., 'GET', 'POST')\n * @param {*} [params.requestData] - The request data or body object\n * @param {Number|String} [params.responseStatus] - HTTP status code or error status\n * @param {*} [params.response] - The response data or error object\n * @param {Boolean} [params.streaming] - Whether this is a streaming request\n * @returns {String} The finalRequestId used for this transaction (for consistency across lifecycle)\n */\nexport default function postTxnStatus({\n\tshowUxfTxnStatus,\n\thost,\n\trequestId,\n\trequestUrl,\n\trequestType,\n\trequestMethod,\n\trequestData,\n\tstatus,\n\tresponseStatus,\n\tresponse,\n\tstreaming,\n\tinteractionId,\n\tspanId\n}) {\n\tif (\n\t\t!showUxfTxnStatus ||\n\t\tglobalThis.ux_globals?.libuxf?.sysprops?.['glide.uxf.lib.long_running_txn_enabled'] === 'false'\n\t) {\n\t\treturn requestId ?? interactionId;\n\t}\n\n\tlet finalRequestId = requestId;\n\n\ttry {\n\t\tif (!finalRequestId) {\n\t\t\tfinalRequestId = createRequestId(spanId, interactionId);\n\t\t}\n\n\t\tconst payload = {\n\t\t\tstatus,\n\t\t\trequestId: finalRequestId,\n\t\t\trequestType,\n\t\t\trequestUrl,\n\t\t\trequestMethod,\n\t\t\trequestData,\n\t\t\tresponseStatus,\n\t\t\tresponse,\n\t\t\tinteractionId,\n\t\t\tstreaming\n\t\t};\n\n\t\tglobalThis?.nowUiFramework?.postStatus?.(host, payload);\n\t} catch (e) {\n\t\t/* prevent errors from breaking effect lifecycle */\n\t\tconsole.error('Error in postTxnStatus:', e);\n\t}\n\n\treturn finalRequestId;\n}\n", "import {domainSeparationProperties, memoize, kebabCase} from '@servicenow/ui-internal';\n\nconst toAttributeName = memoize(\n\tfunction toAttributeName(propName) {\n\t\treturn kebabCase(propName);\n\t},\n\t{profileName: 'effect-helpers-toAttributeName'}\n);\n\nconst {NOW_DS_DOMAIN_ID, NOW_DS_DOMAIN_SCOPE, NOW_DS_RECORD_ID, NOW_DS_RECORD_TABLE} =\n\tdomainSeparationProperties;\n\nfunction isValidRecordArgument(table, id) {\n\treturn table && id;\n}\n\nfunction getDomainProp(el, name) {\n\treturn el[name] || (el.getAttribute && el.getAttribute(toAttributeName(name)));\n}\n\nfunction createDomainContextProperty(el) {\n\tconst table = getDomainProp(el, NOW_DS_RECORD_TABLE);\n\tconst sysId = getDomainProp(el, NOW_DS_RECORD_ID);\n\tconst domain = getDomainProp(el, NOW_DS_DOMAIN_ID);\n\tconst scope = getDomainProp(el, NOW_DS_DOMAIN_SCOPE);\n\tconst domainContext = {\n\t\t...(isValidRecordArgument(table, sysId) && {\n\t\t\t[NOW_DS_RECORD_TABLE]: table,\n\t\t\t[NOW_DS_RECORD_ID]: sysId\n\t\t}),\n\t\t...(domain && {\n\t\t\t[NOW_DS_DOMAIN_ID]: domain\n\t\t}),\n\t\t...(scope && {\n\t\t\t[NOW_DS_DOMAIN_SCOPE]: scope\n\t\t})\n\t};\n\treturn hasDomainProps(domainContext) ? domainContext : undefined;\n}\n\nexport function getSeismicHoistTargetFor(seismicHoistElement) {\n\treturn seismicHoistElement.sourceElement;\n}\n\nfunction isSeismicHoistElement(el) {\n\treturn el.tagName === 'SEISMIC-HOIST';\n}\n\n/**\n * Element contains a reserved domain separation property\n *\n * @param el\n * @return boolean\n */\nfunction hasDomainProps(el) {\n\treturn !!(\n\t\t(getDomainProp(el, NOW_DS_RECORD_TABLE) && getDomainProp(el, NOW_DS_RECORD_ID)) ||\n\t\tgetDomainProp(el, NOW_DS_DOMAIN_ID) ||\n\t\tgetDomainProp(el, NOW_DS_DOMAIN_SCOPE)\n\t);\n}\n\n/**\n *\n * @param element\n * @returns Object|undefined\n */\nexport default function resolveDomainContext(element) {\n\tlet el = element;\n\twhile (el) {\n\t\tif (!isSeismicHoistElement(el) && hasDomainProps(el)) return createDomainContextProperty(el);\n\t\tel = isSeismicHoistElement(el) ? getSeismicHoistTargetFor(el) : el.parentNode || el.host;\n\t}\n\treturn undefined;\n}\n", "/**\n * Find any existing user info that may exist on the window\n * @param {*} windowObj\n */\nexport const getUserSysId = windowObj => {\n\t// we should only get this default user in a dev scenario or there is a bug with UXF\n\tconst userSysId = 'defaultSeismicUser';\n\n\tif (!windowObj) {\n\t\tsetUserSysId(userSysId);\n\t\treturn userSysId;\n\t}\n\n\t// Check for tempUserSysId\n\tif (windowObj.nowUiFramework && windowObj.nowUiFramework.tempUserSysId)\n\t\treturn windowObj.nowUiFramework.tempUserSysId;\n\n\t// Jelly && UXF based pages\n\tif (windowObj.NOW && windowObj.NOW.user && windowObj.NOW.user.userID)\n\t\treturn windowObj.NOW.user.userID;\n\n\t// Fall back on window token\n\tif (windowObj.g_ck) return windowObj.g_ck;\n\n\t//Is there a better way I'm missing?\n\tsetUserSysId(userSysId);\n\treturn userSysId;\n};\n\nexport const setUserSysId = userSysId => {\n\tglobalThis.nowUiFramework = globalThis.nowUiFramework || {};\n\tglobalThis.nowUiFramework.tempUserSysId = userSysId;\n};\n", "export const hashString = string => {\n\tlet hash = 0;\n\tfor (let i = 0; i < string.length; i++) hash = (Math.imul(31, hash) + string.charCodeAt(i)) | 0;\n\n\treturn hash;\n};\n", "// Simple LRU cache policy for use with the persistent IndexedDB cache\n\n// const {log} = console;\n\nexport const makeLRUCachePolicy = capacity => {\n\tlet lruArray = [];\n\n\tconst initLRU = all => {\n\t\tconst entries = Object.values(all);\n\t\t// log(`entries=${JSON.stringify(entries, null, 2)}`);\n\n\t\t// Sort all by timestamp in newest first order\n\t\tentries.sort((a, b) => {\n\t\t\tconst dateA = a.cachePolicyState.lastAccessed;\n\t\t\tconst dateB = b.cachePolicyState.lastAccessed;\n\t\t\t// log(`dateB=${dateB}`);\n\t\t\t// log(`dateA=${dateA}`);\n\t\t\tconst result = dateB - dateA;\n\t\t\t// log(`result=${result}`);\n\n\t\t\treturn result;\n\t\t});\n\t\t// log(`sorted=${JSON.stringify(all, null, 2)}`);\n\n\t\tfor (const entry of entries) lruArray.push(entry.key);\n\n\t\t// log(`lruArray=${JSON.stringify(lruArray, null, 2)}`);\n\t};\n\n\tconst evict = capacity => {\n\t\tconst len = lruArray.length;\n\t\tif (len > capacity) {\n\t\t\t// Even if this is over by more than one, we trim it to capacity\n\t\t\tconst keysToDelete = lruArray.splice(capacity, len - capacity);\n\t\t\t// log(`evict(): keysToDelete=${JSON.stringify(keysToDelete, null, 2)}`);\n\t\t\treturn keysToDelete;\n\t\t}\n\n\t\treturn [];\n\t};\n\n\t// Bump key to the front and evict if we are over capacity\n\tconst updateLRU = key => {\n\t\tconst index = lruArray.findIndex(k => k === key);\n\t\tlet keysToDelete;\n\t\tif (index === -1) {\n\t\t\t// Not found, so first evict to make space, then prepend the new key\n\t\t\tkeysToDelete = evict(capacity - 1);\n\t\t} else {\n\t\t\tkeysToDelete = evict(capacity);\n\t\t\tlruArray.splice(index, 1);\n\t\t}\n\t\tlruArray = [key, ...lruArray];\n\t\t// log(`updateLRU(): lruArray=${JSON.stringify(lruArray, null, 2)}`);\n\n\t\tconst result = {keysToDelete, state: {lastAccessed: new Date()}};\n\t\t// log(`updateLRU(): result=${JSON.stringify(result, null, 2)}`);\n\t\treturn result;\n\t};\n\n\tconst deleteFromLRU = key => {\n\t\tconst index = lruArray.findIndex(k => k === key);\n\t\tif (index === -1) return;\n\n\t\tlruArray.splice(index, 1);\n\t};\n\n\tconst clearLRU = () => {\n\t\tlruArray = [];\n\t};\n\n\treturn {\n\t\tcapacity,\n\t\tonInit: initLRU,\n\t\tonHit: updateLRU,\n\t\tonSet: updateLRU,\n\t\tonDelete: deleteFromLRU,\n\t\tonClear: clearLRU\n\t};\n};\n", "import {openStore} from './store';\n\nconst cachePromises = {};\n\n// A persistent cache backed by IndexedDB\nexport const makePersistentCache = async ({dbName, storeName, schemaVersion, options}) => {\n\t// In case multiple clients want caches for the same store, we use the previously created promise to ensure\n\t// they all end up with the same one.  They will all get back the same resolved promise.\n\tconst dbKey = `${dbName}_${storeName}_${schemaVersion}`;\n\tif (cachePromises[dbKey]) return cachePromises[dbKey];\n\n\tconst creationPromise = new Promise((resolve, reject) => {\n\t\tconst map = new Map();\n\n\t\t// Persistent cache\n\t\topenStore({dbName, storeName, schemaVersion, options})\n\t\t\t.then(store => {\n\t\t\t\tlet inMemoryCacheHits = 0;\n\t\t\t\tlet persistentCacheHits = 0;\n\n\t\t\t\t// Return an object with the interface methods we expose\n\t\t\t\tconst self = {\n\t\t\t\t\tname() {\n\t\t\t\t\t\treturn dbName;\n\t\t\t\t\t},\n\n\t\t\t\t\tversion() {\n\t\t\t\t\t\treturn schemaVersion;\n\t\t\t\t\t},\n\n\t\t\t\t\tasync has(key) {\n\t\t\t\t\t\treturn map.has(key) || (await store.has(key));\n\t\t\t\t\t},\n\n\t\t\t\t\tasync set(key, value) {\n\t\t\t\t\t\t// log(`cache.set('${key}', '${value}')`);\n\t\t\t\t\t\t// NOTE: We always set directly into the in-memory Map, never into the underlying IndexedDB\n\t\t\t\t\t\tmap.set(key, value);\n\t\t\t\t\t},\n\n\t\t\t\t\tasync get(key, defaultValue = undefined) {\n\t\t\t\t\t\t// log(`cache.get(${key},${defaultValue})`);\n\t\t\t\t\t\tlet value = map.get(key);\n\t\t\t\t\t\tif (value !== undefined) {\n\t\t\t\t\t\t\tinMemoryCacheHits += 1;\n\t\t\t\t\t\t\t// log(`inMemoryCacheHits: ${inMemoryCacheHits}`);\n\t\t\t\t\t\t\treturn value;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Check the persistent cache\n\t\t\t\t\t\tvalue = await store.get(key, defaultValue);\n\t\t\t\t\t\tif (value !== undefined) {\n\t\t\t\t\t\t\tpersistentCacheHits += 1;\n\t\t\t\t\t\t\t// log(`persistentCacheHits: ${persistentCacheHits}`);\n\t\t\t\t\t\t\treturn value;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn defaultValue;\n\t\t\t\t\t},\n\n\t\t\t\t\tasync getAll(includeMetadata = false) {\n\t\t\t\t\t\t// Get the persistent entries first\n\t\t\t\t\t\tconst result = await store.getAll(includeMetadata);\n\n\t\t\t\t\t\t// In-memory cache entries will overwrite persistent entries\n\t\t\t\t\t\tfor (const [key, value] of map.entries()) result[key] = value;\n\n\t\t\t\t\t\treturn result;\n\t\t\t\t\t},\n\n\t\t\t\t\t// Delete from both the in-memory and persistent caches\n\t\t\t\t\tasync delete(key) {\n\t\t\t\t\t\tawait store.delete(key);\n\t\t\t\t\t\tmap.delete(key);\n\t\t\t\t\t},\n\n\t\t\t\t\tasync clear() {\n\t\t\t\t\t\tmap.clear();\n\t\t\t\t\t\tawait store.clear();\n\t\t\t\t\t\tinMemoryCacheHits = 0;\n\t\t\t\t\t\tpersistentCacheHits = 0;\n\t\t\t\t\t},\n\n\t\t\t\t\tclose() {\n\t\t\t\t\t\tself.clear();\n\t\t\t\t\t\tstore.close();\n\t\t\t\t\t},\n\n\t\t\t\t\t// Force all locally cached values into the database\n\t\t\t\t\tasync persist() {\n\t\t\t\t\t\tconst entries = map.entries();\n\t\t\t\t\t\tawait store.setMultiple(entries);\n\t\t\t\t\t\tmap.clear();\n\t\t\t\t\t},\n\n\t\t\t\t\tinMemorySize() {\n\t\t\t\t\t\treturn map.size;\n\t\t\t\t\t},\n\n\t\t\t\t\tasync persistedSize() {\n\t\t\t\t\t\treturn await store.size();\n\t\t\t\t\t},\n\n\t\t\t\t\tinMemoryCacheHits() {\n\t\t\t\t\t\treturn inMemoryCacheHits;\n\t\t\t\t\t},\n\n\t\t\t\t\tpersistentCacheHits() {\n\t\t\t\t\t\treturn persistentCacheHits;\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\tresolve(self);\n\t\t\t})\n\t\t\t.catch(e => {\n\t\t\t\treject(e);\n\t\t\t});\n\t});\n\n\t// Remember this promise so we can return it again if another caller asks for the same cache\n\tcachePromises[dbKey] = creationPromise;\n\treturn creationPromise;\n};\n", "import {configConstants, getConfigItem} from '@servicenow/ui-config';\n\n// Persistent database key/value cache implemented over IndexedDB with an async interface\n\nconst {GQL_CACHE_CAPACITY} = configConstants;\n\nconst cacheCapacity = getConfigItem(GQL_CACHE_CAPACITY);\n\nexport const openStore = async params => {\n\tconst {dbName, storeName, schemaVersion, options = {}} = params;\n\n\tlet db = undefined;\n\tconst cachePolicy = {\n\t\tcapacity: cacheCapacity,\n\t\tonInit: () => [],\n\t\tonHit: () => ({keysToDelete: [], state: []}),\n\t\tonSet: () => ({keysToDelete: [], state: []}),\n\t\tonDelete: () => [],\n\t\tonClear: () => undefined,\n\t\t...options.cachePolicy // Caller-provided options override the defaults above\n\t};\n\n\tconst getStore = mode => db.transaction(storeName, mode).objectStore(storeName);\n\n\tconst self = {\n\t\tasync get(key, defaultValue = undefined) {\n\t\t\treturn new Promise(resolve => {\n\t\t\t\tconst store = getStore('readwrite');\n\t\t\t\tconst getRequest = store.get(key);\n\n\t\t\t\tgetRequest.onerror = event => {\n\t\t\t\t\tconst {name} = event.target?.error || {};\n\t\t\t\t\tconsole.error(`Error retrieving item in getter for '${key}': ${name}`);\n\t\t\t\t\tresolve(defaultValue);\n\t\t\t\t};\n\n\t\t\t\tgetRequest.onsuccess = event => {\n\t\t\t\t\t// log(`Item for ${key} is ${event.target.result}`);\n\t\t\t\t\tconst entry = event.target.result;\n\n\t\t\t\t\t// Create a set request and save the metadata for this key/value (don't resolve this request until the set is complete)\n\t\t\t\t\tconst {keysToDelete} = cachePolicy.onHit(key);\n\n\t\t\t\t\t// TODO: Delete all keys the cachePolicy asked us to\n\t\t\t\t\tfor (const key of keysToDelete) store.delete(key);\n\t\t\t\t\t// TODO: Probably don't really need to wait for these to delete, so let's not for now\n\n\t\t\t\t\tself\n\t\t\t\t\t\t.set(key, entry.value)\n\t\t\t\t\t\t.then(() => resolve(entry.value))\n\t\t\t\t\t\t.catch(() => resolve(defaultValue));\n\t\t\t\t};\n\t\t\t});\n\t\t},\n\n\t\tasync getAll(includeMetaData = false) {\n\t\t\treturn new Promise(resolve => {\n\t\t\t\t// log(`getAll(): dbName=${dbName}, storeName=${storeName}`);\n\t\t\t\tconst store = getStore('readonly');\n\t\t\t\tconst getAllKeysRequest = store.getAllKeys();\n\t\t\t\tconst all = {};\n\n\t\t\t\tgetAllKeysRequest.onerror = event => {\n\t\t\t\t\tconst {name} = event.target?.error || {};\n\t\t\t\t\tconsole.error(`Error in getAll(): ${name}`);\n\t\t\t\t\tresolve({});\n\t\t\t\t};\n\n\t\t\t\tgetAllKeysRequest.onsuccess = event => {\n\t\t\t\t\t// log(`Result for getAll() is ${JSON.stringify(event.target.result)}`);\n\n\t\t\t\t\t// Get all the entries\n\t\t\t\t\tconst keys = event.target.result;\n\t\t\t\t\tlet numRemaining = keys.length;\n\t\t\t\t\tif (numRemaining === 0) resolve({});\n\n\t\t\t\t\tfor (const key of keys) {\n\t\t\t\t\t\tconst getRequest = store.get(key);\n\n\t\t\t\t\t\tgetRequest.onerror = event => {\n\t\t\t\t\t\t\tconst {name} = event.target?.error || {};\n\t\t\t\t\t\t\tconsole.error(`Error in getAll(): ${name}`);\n\t\t\t\t\t\t\tresolve({});\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tgetRequest.onsuccess = event => {\n\t\t\t\t\t\t\tconst entry = event.target.result;\n\t\t\t\t\t\t\tall[key] = includeMetaData ? entry : entry.value;\n\t\t\t\t\t\t\tnumRemaining -= 1;\n\t\t\t\t\t\t\tif (numRemaining === 0) resolve(all);\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t});\n\t\t},\n\n\t\tasync set(key, value) {\n\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\tconst store = getStore('readwrite');\n\n\t\t\t\tconst {keysToDelete, state} = cachePolicy.onSet(key);\n\n\t\t\t\tconst putRequest = store.put({key, value, cachePolicyState: state}, key);\n\n\t\t\t\t// TODO: Delete all keys the cachePolicy asked us to\n\t\t\t\tfor (const key of keysToDelete) store.delete(key);\n\t\t\t\t// TODO: Probably don't really need to wait for these to delete, so let's not for now\n\n\t\t\t\tputRequest.onerror = event => {\n\t\t\t\t\tconst {name} = event.target?.error || {};\n\t\t\t\t\tconsole.error(`Error setting item in set() for '${key}': ${name}`);\n\t\t\t\t\treject(event.target?.error);\n\t\t\t\t};\n\n\t\t\t\tputRequest.onsuccess = event => {\n\t\t\t\t\t// log(`Item for ${key} is ${event.target.result}`);\n\t\t\t\t\tresolve(event.target.value);\n\t\t\t\t};\n\t\t\t});\n\t\t},\n\n\t\tasync setMultiple(obj) {\n\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\tconst store = getStore('readwrite');\n\n\t\t\t\tlet numRequestsMade = 0;\n\t\t\t\tlet numRequestsComplete = 0;\n\n\t\t\t\tfor (const [key, value] of obj) {\n\t\t\t\t\tconst {keysToDelete, state} = cachePolicy.onSet(key);\n\n\t\t\t\t\t// TODO: Delete all keys the cachePolicy asked us to\n\t\t\t\t\tfor (const key of keysToDelete) store.delete(key);\n\t\t\t\t\t// TODO: Probably don't really need to wait for these to delete, so let's not for now\n\n\t\t\t\t\tconst putRequest = store.put({key, value, cachePolicyState: state}, key);\n\n\t\t\t\t\t// TODO: Should abort() if any failures and ideally abort the txn\n\t\t\t\t\tputRequest.onerror = event => {\n\t\t\t\t\t\tconst {name} = event.target?.error || {};\n\t\t\t\t\t\tconsole.error(`Error setting item in setMultiple: ${name}`);\n\t\t\t\t\t\tnumRequestsComplete += 1;\n\t\t\t\t\t\tif (numRequestsComplete === numRequestsMade) reject(event.target?.error);\n\t\t\t\t\t};\n\n\t\t\t\t\tputRequest.onsuccess = () => {\n\t\t\t\t\t\tnumRequestsComplete += 1;\n\t\t\t\t\t\tif (numRequestsComplete === numRequestsMade) resolve();\n\t\t\t\t\t};\n\n\t\t\t\t\tnumRequestsMade += 1;\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\t\tasync has(key) {\n\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\tconst store = getStore('readonly');\n\t\t\t\tconst countRequest = store.count(key);\n\n\t\t\t\tcountRequest.onerror = event => {\n\t\t\t\t\tconst {name} = event.target?.error || {};\n\t\t\t\t\tconsole.error(`Error getting count for '${key}': ${name}`);\n\t\t\t\t\treject(event.target?.error);\n\t\t\t\t};\n\n\t\t\t\tcountRequest.onsuccess = () => {\n\t\t\t\t\tresolve(countRequest.result > 0);\n\t\t\t\t};\n\t\t\t});\n\t\t},\n\n\t\tasync clear() {\n\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\tconst store = getStore('readwrite');\n\t\t\t\tconst clearRequest = store.clear();\n\n\t\t\t\tclearRequest.onerror = event => {\n\t\t\t\t\tconst {name} = event.target?.error || {};\n\t\t\t\t\tconsole.error(`IndexedDB clear failed. ${name}`);\n\t\t\t\t\treject(event.target?.error);\n\t\t\t\t};\n\n\t\t\t\tclearRequest.onsuccess = () => {\n\t\t\t\t\t// options.onClear();\n\t\t\t\t\tresolve();\n\t\t\t\t\t// log('Store Cleared');\n\t\t\t\t};\n\t\t\t});\n\t\t},\n\n\t\tasync delete(key) {\n\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\tconst store = getStore('readwrite');\n\t\t\t\tconst deleteRequest = store.delete(key);\n\n\t\t\t\tdeleteRequest.onerror = event => {\n\t\t\t\t\tconst {name} = event.target?.error || {};\n\t\t\t\t\tconsole.error(`IndexedDB delete failed. ${name}`);\n\t\t\t\t\treject(event.target?.error);\n\t\t\t\t};\n\n\t\t\t\tdeleteRequest.onsuccess = () => {\n\t\t\t\t\tresolve();\n\t\t\t\t};\n\t\t\t});\n\t\t},\n\n\t\tasync size() {\n\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\tconst store = getStore('readonly');\n\t\t\t\tconst countRequest = store.count();\n\n\t\t\t\tcountRequest.onerror = event => {\n\t\t\t\t\tconst {name} = event.target?.error || {};\n\t\t\t\t\tconsole.error(`Error getting total record count for ${storeName}: ${name}`);\n\t\t\t\t\treject(event.target?.error);\n\t\t\t\t};\n\n\t\t\t\tcountRequest.onsuccess = () => {\n\t\t\t\t\tresolve(countRequest.result);\n\t\t\t\t};\n\t\t\t});\n\t\t},\n\n\t\tclose() {\n\t\t\tdb.close();\n\t\t}\n\t};\n\n\t// Open the database and return an object that can reference the db via closure\n\treturn new Promise((resolve, reject) => {\n\t\tif (!globalThis.indexedDB) {\n\t\t\treject(\n\t\t\t\t'Browser does not seem to support IndexedDB, which is required for this feature to work.'\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\tconst dbRequest = globalThis.indexedDB.open(dbName, schemaVersion);\n\n\t\tdbRequest.onsuccess = event => {\n\t\t\tdb = event.target.result;\n\t\t\t// log('openStore.onsuccess');\n\n\t\t\t// Give the policy a chance to update its internal state\n\t\t\tself.getAll(true).then(allEntries => {\n\t\t\t\tcachePolicy.onInit(allEntries);\n\t\t\t\tresolve(self);\n\t\t\t});\n\t\t};\n\n\t\tdbRequest.onerror = event => {\n\t\t\tconst {name} = event.target?.error || {};\n\t\t\tconsole.error(\n\t\t\t\t`openStore: IndexedDB error: ${name}.\\nBrowser possibly does not support IndexedDB.`\n\t\t\t);\n\t\t\treject(event.target?.error);\n\t\t};\n\n\t\tdbRequest.onupgradeneeded = event => {\n\t\t\t// log('openStore.onupgradeneeded');\n\n\t\t\tdb = event.target.result;\n\n\t\t\ttry {\n\t\t\t\tdb.createObjectStore(storeName, {\n\t\t\t\t\tautoIncrement: true\n\t\t\t\t});\n\t\t\t} catch (e) {\n\t\t\t\tconsole.error(`EXCEPTION: ${e}`);\n\t\t\t}\n\t\t};\n\t});\n};\n\nasync function dropDatabaseImpl(dbName) {\n\treturn new Promise((resolve, reject) => {\n\t\tif (!globalThis.indexedDB) {\n\t\t\treject(\n\t\t\t\t'Browser does not seem to support IndexedDB, which is required for this feature to work.'\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\tconst deleteRequest = globalThis.indexedDB.deleteDatabase(dbName);\n\n\t\tdeleteRequest.onsuccess = () => {\n\t\t\t// log('Deleted database successfully');\n\t\t\tresolve();\n\t\t};\n\n\t\tdeleteRequest.onerror = event => {\n\t\t\tconst {name} = event.target?.error || {};\n\t\t\tconsole.error(`Error deleting database for name '${dbName}': ${name}`);\n\t\t\treject(event.target?.error);\n\t\t};\n\n\t\tdeleteRequest.onblocked = () => {\n\t\t\t// log('Database is busy.  Please try again later.  Goodbye.');\n\t\t\treject('Database is busy.');\n\t\t};\n\t});\n}\n\n// Drop an entire database\nexport async function dropDatabase(dbName) {\n\tlet result;\n\t// This needs to run at least twice if the database was recently closed\n\tdo {\n\t\ttry {\n\t\t\tresult = await dropDatabaseImpl(dbName);\n\t\t} catch (e) {\n\t\t\t// Database was busy and could not be deleted\n\t\t}\n\t} while (result);\n}\n\n// // Drop a single, named store within a given database\n// async function dropStoreImpl(storeName, dbName, version) {\n// \tlog('dropStore 1');\n// \t// Open the database and return an object that can reference the db via closure\n// \treturn new Promise((resolve, reject) => {\n// \t\tif (!globalThis.indexedDB) {\n// \t\t\treject(\n// \t\t\t\t'Browser does not seem to support IndexedDB, which is required for this feature to work.'\n// \t\t\t);\n// \t\t\treturn;\n// \t\t}\n\n// \t\tlog('dropStore 2');\n// \t\tconst dbRequest = globalThis.indexedDB.open(dbName, version);\n// \t\tlog('dropStore 3');\n\n// \t\tdbRequest.onsuccess = () => {\n// \t\t\tlog('opened!');\n// \t\t\tresolve();\n// \t\t};\n\n// \t\tdbRequest.onerror = err => {\n// \t\t\tlog(`err=${JSON.stringify(err)}`);\n// \t\t\terror(`dropStore: IndexedDB error: ${err.target.errorCode}`);\n// \t\t\treject(err.target.error);\n// \t\t};\n\n// \t\tlog('dropStore 4');\n\n// \t\tdbRequest.onupgradeneeded = event => {\n// \t\t\tlog('dbRequest.onupgradeneeded');\n// \t\t\tconst db = event.target.result;\n// \t\t\tlog(`db=${db} storeName=${storeName}`);\n\n// \t\t\tdb.deleteObjectStore(storeName);\n// \t\t\tresolve();\n// \t\t};\n\n// \t\tlog('dropStore 6');\n// \t});\n// }\n\n// export async function dropStore(storeName, dbName, version) {\n// \ttry {\n// \t\tawait dropStoreImpl(storeName, dbName, version);\n// \t} catch (e) {\n// \t\tlog(`dropStore Exception: ${e}`);\n// \t}\n// }\n", "/* eslint-disable no-fallthrough */\nexport function murmurhash3(key, seed) {\n\tconst remainder = key.length & 3; // key.length % 4\n\tconst bytes = key.length - remainder;\n\tlet h1 = seed;\n\tlet k1;\n\tlet h1b;\n\tconst c1 = 0xcc9e2d51;\n\tconst c2 = 0x1b873593;\n\tlet i = 0;\n\n\twhile (i < bytes) {\n\t\tk1 =\n\t\t\t(key.charCodeAt(i) & 0xff) |\n\t\t\t((key.charCodeAt(i + 1) & 0xff) << 8) |\n\t\t\t((key.charCodeAt(i + 2) & 0xff) << 16) |\n\t\t\t((key.charCodeAt(i + 3) & 0xff) << 24);\n\t\ti += 4;\n\n\t\tk1 = ((k1 & 0xffff) * c1 + ((((k1 >>> 16) * c1) & 0xffff) << 16)) & 0xffffffff;\n\t\tk1 = (k1 << 15) | (k1 >>> 17);\n\t\tk1 = ((k1 & 0xffff) * c2 + ((((k1 >>> 16) * c2) & 0xffff) << 16)) & 0xffffffff;\n\n\t\th1 ^= k1;\n\t\th1 = (h1 << 13) | (h1 >>> 19);\n\t\th1b = ((h1 & 0xffff) * 5 + ((((h1 >>> 16) * 5) & 0xffff) << 16)) & 0xffffffff;\n\t\th1 = (h1b & 0xffff) + 0x6b64 + ((((h1b >>> 16) + 0xe654) & 0xffff) << 16);\n\t}\n\n\tk1 = 0;\n\n\t// Intentional fallthoughs below\n\tswitch (remainder) {\n\t\tcase 3:\n\t\t\tk1 ^= (key.charCodeAt(i + 2) & 0xff) << 16;\n\t\tcase 2:\n\t\t\tk1 ^= (key.charCodeAt(i + 1) & 0xff) << 8;\n\t\tcase 1:\n\t\t\tk1 ^= key.charCodeAt(i) & 0xff;\n\n\t\t\tk1 = ((k1 & 0xffff) * c1 + ((((k1 >>> 16) * c1) & 0xffff) << 16)) & 0xffffffff;\n\t\t\tk1 = (k1 << 15) | (k1 >>> 17);\n\t\t\tk1 = ((k1 & 0xffff) * c2 + ((((k1 >>> 16) * c2) & 0xffff) << 16)) & 0xffffffff;\n\t\t\th1 ^= k1;\n\t}\n\n\th1 ^= key.length;\n\n\th1 ^= h1 >>> 16;\n\th1 = ((h1 & 0xffff) * 0x85ebca6b + ((((h1 >>> 16) * 0x85ebca6b) & 0xffff) << 16)) & 0xffffffff;\n\th1 ^= h1 >>> 13;\n\th1 = ((h1 & 0xffff) * 0xc2b2ae35 + ((((h1 >>> 16) * 0xc2b2ae35) & 0xffff) << 16)) & 0xffffffff;\n\th1 ^= h1 >>> 16;\n\n\treturn h1 >>> 0;\n}\n", "export {default as sendRequest} from './sendRequest';\n", "import {getConfigItem, configConstants} from '@servicenow/ui-config';\nimport createQueryBatcher from './createQueryBatcher';\n\nconst {DISABLE_GQL_BATCHING} = configConstants;\nconst batchingEnabled = !getConfigItem(DISABLE_GQL_BATCHING);\n\nconst batcher = createQueryBatcher({\n\tbatchingEnabled\n});\n\nexport default function sendRequest(\n\toperationName = '',\n\tvariables = {},\n\ttemplateVars = {},\n\tdomainContext = {},\n\theaders = {},\n\ttransactionMetaData,\n\tqueryContext\n) {\n\tconst operation = {\n\t\tvariables,\n\t\ttemplateVars,\n\t\tdomainContext,\n\t\theaders,\n\t\toperationName,\n\t\ttransactionMetaData,\n\t\tqueryContext\n\t};\n\n\treturn batcher.enqueue(operation);\n}\n", "import {mark, types as metrics} from '@servicenow/ui-metrics';\nimport createSnHttp from './snHttp';\nimport documentToQueryString from './documentToQueryString';\nimport {defer, isEmpty} from '@servicenow/ui-internal';\nimport {checkCacheForResult, shouldDoResultCaching, storeResultInCache} from './resultsCache';\nimport {getGraphQLDocument} from '../utils/graphQLDocument';\nimport {\n\tstartBatchTracing,\n\tcompleteBatchTracking,\n\tupdateHeadersWithSpan,\n\taddEventToBatchSpan,\n\tcrossLinkBatchSpan\n} from '../utils/traceHelper';\n\nimport * as uiAnalyticsConsumer from '@servicenow/ui-analytics-consumer';\nimport {\n\tSPAN_ATTR_GQL_BATCH,\n\tSPAN_DOCUMENT_TRACE_PARENT,\n\tSPAN_TRACE_PARENT,\n\tSPAN_ATTR_GQL_QUERY_LENGTH\n} from '../constants';\nconst {createTraceParentHeader} = uiAnalyticsConsumer;\nconst DEFAULT_GQL_ENDPOINT = '/api/now/graphql';\nconst DEFAULT_BATCH_INTERVAL = 50;\nconst DEFAULT_MAX_BATCH_SIZE = 10;\nconst DEFAULT_BATCHING_ENABLED = true;\n\n//The instance does not support streaming GraphQL requests with 'batched' GraphQL requests,\n//so double check here again we only get one operation\nexport function createMultipartConfiguration(operations) {\n\tif (operations?.length !== 1) return null;\n\n\tconst {queryContext} = operations[0];\n\tif (!queryContext?.isStreamingRequest()) return null;\n\n\treturn {\n\t\tmultipartConsumer: ({body, headers} = {}) => queryContext.dataReceived(body, headers),\n\t\tparsePartsAsJson: true,\n\t\temitCompletedResponse: false\n\t};\n}\n\n//For now we do not allow streaming within streaming when batching, when this is resolved, we can\n//remove the 'operation.queryContext.isStreamingRequest()' check\nexport function canDoSnHttpLevelBatching(operations) {\n\tif (!Array.isArray(operations)) return;\n\n\tlet canDoBatching;\n\tfor (var operation of operations) {\n\t\tif (operation.__unstableDisableBatching || operation?.queryContext?.isStreamingRequest()) {\n\t\t\tcanDoBatching = false;\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn canDoBatching;\n}\n\nexport default function createQueryBatcher({\n\tbatchInterval = DEFAULT_BATCH_INTERVAL,\n\tmaxBatchSize = DEFAULT_MAX_BATCH_SIZE,\n\tbatchingEnabled = DEFAULT_BATCHING_ENABLED\n} = {}) {\n\tlet queue = [];\n\tlet gqlBatchSpan;\n\n\tasync function enqueue(operation) {\n\t\tgqlBatchSpan = startBatchTracing({operation, maxBatchSize, batchInterval, gqlBatchSpan});\n\t\tlet deferredResolve, deferredReject;\n\t\tconst promise = new Promise((resolve, reject) => {\n\t\t\tdeferredResolve = resolve;\n\t\t\tdeferredReject = reject;\n\t\t});\n\t\tconst batchItem = {\n\t\t\toperation,\n\t\t\tdeferredResolve,\n\t\t\tdeferredReject\n\t\t};\n\t\tif (shouldDoResultCaching(operation)) {\n\t\t\tconst cacheResult = await checkCacheForResult(operation, batchItem, makeRequest);\n\t\t\tif (cacheResult) return cacheResult;\n\t\t}\n\t\tif (shouldNotDoGraphQLLevelBatching(operation)) {\n\t\t\tmakeRequest([batchItem]);\n\t\t\treturn promise;\n\t\t}\n\t\tqueue.push(batchItem);\n\t\taddEventToBatchSpan(operation, gqlBatchSpan, queue);\n\t\tif (queue.length === 1) {\n\t\t\tscheduleFlush();\n\t\t}\n\n\t\tif (queue.length === maxBatchSize) flushQueue();\n\t\treturn promise;\n\t}\n\n\t/**\n\t * This function determines if this graphQL operation should be batched.\n\t * If it defines any custom headers, or batching is not enabled globally,\n\t * or the query is known to be unstable, or it is a streaming graphql request,\n\t * or it has query params, we do not batch\n\t * @param {*} operation\n\t * @returns {boolean}\n\t */\n\tfunction shouldNotDoGraphQLLevelBatching(operation) {\n\t\tconst {transactionMetaData = {}, headers = [], queryContext} = operation;\n\t\treturn (\n\t\t\tObject.keys(headers).length ||\n\t\t\t!batchingEnabled ||\n\t\t\ttransactionMetaData?.__unstableDisableBatching ||\n\t\t\tqueryContext?.isStreamingRequest() ||\n\t\t\tObject.keys(transactionMetaData?.params || {}).length\n\t\t);\n\t}\n\n\tfunction scheduleFlush() {\n\t\tdefer(() => {\n\t\t\tif (queue.length) flushQueue();\n\t\t\telse gqlBatchSpan = null;\n\t\t}, batchInterval);\n\t}\n\n\tfunction flushQueue() {\n\t\tif (!queue.length) {\n\t\t\tgqlBatchSpan = null;\n\t\t\treturn;\n\t\t}\n\n\t\tconst batchItems = queue;\n\t\tqueue = [];\n\t\tif (gqlBatchSpan)\n\t\t\tgqlBatchSpan.addEvent(\n\t\t\t\t'items.queue.flush',\n\t\t\t\t{\n\t\t\t\t\tqueueSize: batchItems.length\n\t\t\t\t},\n\t\t\t\tDate.now()\n\t\t\t);\n\t\tmakeRequest(batchItems);\n\t}\n\n\tfunction makeRequest(batchItems = []) {\n\t\treturn sendRequestWithCanOmitQuery(batchItems, true);\n\t}\n\n\tasync function sendRequestWithCanOmitQuery(batchItems, canOmitQuery) {\n\t\tconst operations = await Promise.all(\n\t\t\tbatchItems.map(async ({operation}) => {\n\t\t\t\tconst {\n\t\t\t\t\toperationName,\n\t\t\t\t\tvariables,\n\t\t\t\t\ttemplateVars,\n\t\t\t\t\tdomainContext,\n\t\t\t\t\ttransactionMetaData: {\n\t\t\t\t\t\tcacheable,\n\t\t\t\t\t\tinteractionId,\n\t\t\t\t\t\t__unstableDisableBatching,\n\t\t\t\t\t\t__unstableQueryHash,\n\t\t\t\t\t\tquery,\n\t\t\t\t\t\thost\n\t\t\t\t\t},\n\t\t\t\t\tqueryContext\n\t\t\t\t} = operation;\n\t\t\t\tlet shouldOmitQuery = __unstableQueryHash && canOmitQuery && isEmpty(domainContext);\n\t\t\t\treturn {\n\t\t\t\t\toperationName,\n\t\t\t\t\tquery: shouldOmitQuery\n\t\t\t\t\t\t? ''\n\t\t\t\t\t\t: documentToQueryString(\n\t\t\t\t\t\t\t\tgetGraphQLDocument(query, templateVars, domainContext, operationName)\n\t\t\t\t\t\t  ),\n\t\t\t\t\tvariables,\n\t\t\t\t\tnowUxInteraction:\n\t\t\t\t\t\t(window.nowUiFramework &&\n\t\t\t\t\t\t\t(window.nowUiFramework.getUxrInteractionIdByHost?.(host) ||\n\t\t\t\t\t\t\t\twindow.nowUiFramework.uxrInteractionId)) ||\n\t\t\t\t\t\tnull,\n\t\t\t\t\tnowUiInteraction: interactionId,\n\t\t\t\t\tcacheable,\n\t\t\t\t\t__unstableDisableBatching,\n\t\t\t\t\textensions: {\n\t\t\t\t\t\t...(__unstableQueryHash &&\n\t\t\t\t\t\t\tisEmpty(domainContext) && {\n\t\t\t\t\t\t\t\tpersistedQuery: {version: 1, sha256Hash: __unstableQueryHash}\n\t\t\t\t\t\t\t})\n\t\t\t\t\t},\n\t\t\t\t\tqueryContext\n\t\t\t\t};\n\t\t\t})\n\t\t);\n\n\t\tconst resolvers = batchItems.map(({deferredResolve, deferredReject}) => ({\n\t\t\tdeferredResolve,\n\t\t\tdeferredReject\n\t\t}));\n\n\t\tconst headers = batchItems[0].operation.headers || {};\n\t\tif (window.nowUiFramework && window.nowUiFramework.uxrInteractionId)\n\t\t\theaders['NOW-UX-INTERACTION'] = operations[0].nowUxInteraction;\n\n\t\tconst mergedParams = {};\n\t\tconst isBatched = operations.length !== 1 || !shouldNotDoGraphQLLevelBatching(operations[0]);\n\t\tfor (let i = 0; i < batchItems.length; i++) {\n\t\t\tconst {\n\t\t\t\ttransactionMetaData: {host, interactionId, actionType, params},\n\t\t\t\tquery,\n\t\t\t\tvariables,\n\t\t\t\tqueryContext\n\t\t\t} = batchItems[i].operation;\n\t\t\tmark(host, interactionId, metrics.GQL, {\n\t\t\t\ttype: actionType,\n\t\t\t\tquery,\n\t\t\t\tvariables,\n\t\t\t\tpath: DEFAULT_GQL_ENDPOINT,\n\t\t\t\tbatch: isBatched\n\t\t\t});\n\t\t\tupdateHeadersWithSpan({\n\t\t\t\tqueryContext,\n\t\t\t\tquery,\n\t\t\t\tbatch: isBatched,\n\t\t\t\theaders,\n\t\t\t\tgqlBatchSpan,\n\t\t\t\toperations,\n\t\t\t\tindex: i\n\t\t\t});\n\t\t\tcrossLinkBatchSpan(gqlBatchSpan, queryContext?.getActiveSpan());\n\t\t\tconst activeSpan = queryContext?.getActiveSpan();\n\t\t\tif (activeSpan && activeSpan.isRecording()) {\n\t\t\t\tactiveSpan.setAttribute(SPAN_ATTR_GQL_BATCH, isBatched);\n\t\t\t\tactiveSpan.setAttribute(SPAN_ATTR_GQL_QUERY_LENGTH, query?.length);\n\t\t\t\tconst traceParent = createTraceParentHeader(activeSpan.id, activeSpan.traceId);\n\t\t\t\tactiveSpan.setAttribute(SPAN_TRACE_PARENT, traceParent);\n\t\t\t\tif (isBatched) {\n\t\t\t\t\toperations[i][SPAN_TRACE_PARENT] = traceParent;\n\t\t\t\t\toperations[i][SPAN_DOCUMENT_TRACE_PARENT] = activeSpan.documentTraceParent;\n\t\t\t\t} else {\n\t\t\t\t\tif (headers[SPAN_TRACE_PARENT] === undefined) {\n\t\t\t\t\t\theaders[SPAN_TRACE_PARENT] = traceParent;\n\t\t\t\t\t\theaders[SPAN_DOCUMENT_TRACE_PARENT] = activeSpan.documentTraceParent;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tObject.assign(mergedParams, params);\n\t\t}\n\t\tconst snHttpRef =\n\t\t\t(window?.nowUiFramework?.batchGQLEffectRequests && window?.nowUiFramework?.snHttp) ||\n\t\t\t(await createSnHttp());\n\t\treturn snHttpRef\n\t\t\t.request(DEFAULT_GQL_ENDPOINT, 'POST', {\n\t\t\t\t//Only send the request in a batch format (in array) if we have more than one operation\n\t\t\t\tdata: operations.length === 1 ? operations[0] : operations,\n\t\t\t\theaders,\n\t\t\t\tbatch: canDoSnHttpLevelBatching(operations),\n\t\t\t\tmultipartConfig: createMultipartConfiguration(operations),\n\t\t\t\tparams: mergedParams,\n\t\t\t\tspan: gqlBatchSpan\n\t\t\t})\n\t\t\t.then(async result => {\n\t\t\t\treturn processResult(result, operations, resolvers, batchItems);\n\t\t\t})\n\t\t\t.catch(error => {\n\t\t\t\tfor (let i = 0; i < resolvers.length; i++) {\n\t\t\t\t\tconst {deferredReject} = resolvers[i];\n\t\t\t\t\tdeferredReject(error);\n\t\t\t\t}\n\t\t\t})\n\t\t\t.finally(() => {\n\t\t\t\tgqlBatchSpan = completeBatchTracking(gqlBatchSpan, isBatched, operations);\n\t\t\t});\n\t}\n\n\tfunction checkResultForErrors(result, operations) {\n\t\tconst {data: results, headers = {}} = result;\n\n\t\tif (operations.length > 1 && results.length !== operations.length) {\n\t\t\tconst error = new Error();\n\t\t\terror.response = {\n\t\t\t\theaders\n\t\t\t};\n\t\t\tthrow error;\n\t\t}\n\t}\n\n\tfunction processResult(result, operations, resolvers, batchItems) {\n\t\tcheckResultForErrors(result, operations);\n\t\tconst {data, headers = {}} = result;\n\t\tlet results = data;\n\n\t\t//If we didn't batch our request, convert it back to an array\n\t\tif (!Array.isArray(results)) {\n\t\t\tresults = [results];\n\t\t}\n\n\t\tconst returnResult = [];\n\t\tfor (let i = 0; i < results.length; i++) {\n\t\t\tconst currOperation = operations[i];\n\t\t\tconst queryContext = currOperation?.queryContext;\n\t\t\tconst {deferredResolve} = resolvers[i];\n\n\t\t\tlet currResults = results[i];\n\t\t\t//For streaming queries get the final result from the QueryContext\n\t\t\tif (queryContext?.wasStreamingResponse(headers)) currResults = queryContext?.response;\n\n\t\t\tconst {data = null, errors = []} = currResults || {};\n\n\t\t\t// need to re-run the entire query because a persisted query wasn't found, run without persisted\n\t\t\tif (errors.some(({message}) => message === 'PersistedQueryNotFound')) {\n\t\t\t\tqueryContext?.resetContext();\n\t\t\t\treturn sendRequestWithCanOmitQuery(batchItems, false);\n\t\t\t}\n\n\t\t\tif (!errors.length) storeResultInCache(currOperation, currResults, headers);\n\n\t\t\treturnResult.push({data, errors, headers});\n\t\t\tdeferredResolve({data, errors, headers});\n\t\t}\n\n\t\treturn returnResult;\n\t}\n\n\treturn {\n\t\tenqueue\n\t};\n}\n", "import {getGlobalObject} from '../utils';\nimport {createSnHttp} from '@servicenow/ui-utils';\n\nconst root = getGlobalObject();\nlet localSnHttp = null;\n\nconst createSnHttpForGql = async () => {\n\tif (!localSnHttp) {\n\t\tconst snHttpConfig = {\n\t\t\txsrfToken: root.g_ck,\n\t\t\txTransactionSource: root.transaction_source,\n\t\t\tbatching: false\n\t\t};\n\t\tconst snHttpFactory = createSnHttp(snHttpConfig);\n\t\tlocalSnHttp = await snHttpFactory();\n\t}\n\treturn localSnHttp;\n};\n\nexport default createSnHttpForGql;\n", "export {default as addDomainContextToGraphQLDocument} from './addDomainContextToGraphQLDocument';\nexport {default as addQueryNameToGraphQLDocument} from './addQueryNameToGraphQLDocument';\nexport {default as getGlobalObject} from './getGlobalObject';\nexport {default as isSubscription} from './isSubscription';\nexport {default as isSubscriptionResult} from './isSubscriptionResult';\nexport {default as replaceQueryTemplateVariables} from './replaceQueryTemplateVariables';\nexport {createGraphQLDocument, getGraphQLDocument} from './graphQLDocument';\nexport {default as getOperationName} from './getOperationName';\nexport {default as getSpanOptions} from './getSpanOptions';\n", "import {domainSeparationProperties} from '@servicenow/ui-effect-helpers';\n\nconst SUPPORTED_KINDS = ['OperationDefinition'];\n\nfunction canAddDomainSeparationDirective(definition) {\n\treturn (\n\t\t(SUPPORTED_KINDS.includes(definition.kind) && definition.operation === 'query') ||\n\t\tdefinition.operation === 'mutation'\n\t);\n}\n\n/**\n *\n * @param document\n * @param domainContext\n * @returns {*}\n */\nexport default function addDomainContextToGraphQLDocument(document, domainContext) {\n\tif (domainContext) {\n\t\tconst domainDirective = createDomainDirective(\n\t\t\tdomainContext[domainSeparationProperties.NOW_DS_RECORD_TABLE],\n\t\t\tdomainContext[domainSeparationProperties.NOW_DS_RECORD_ID],\n\t\t\tdomainContext[domainSeparationProperties.NOW_DS_DOMAIN_ID],\n\t\t\tdomainContext[domainSeparationProperties.NOW_DS_DOMAIN_SCOPE]\n\t\t);\n\t\tif (domainDirective) {\n\t\t\treturn {\n\t\t\t\t...document,\n\t\t\t\tdefinitions: document.definitions.map(def => ({\n\t\t\t\t\t...def,\n\t\t\t\t\tdirectives: [\n\t\t\t\t\t\t...def.directives,\n\t\t\t\t\t\t...insertIf(canAddDomainSeparationDirective(def), domainDirective)\n\t\t\t\t\t]\n\t\t\t\t}))\n\t\t\t};\n\t\t}\n\t}\n\treturn document;\n}\n\nexport function createDomainDirective(recordTable, recordId, domainId, domainScope) {\n\tconst recordArgument = createRecordArgument(recordTable, recordId);\n\tconst domainArgument = createDomainArgument(domainId, domainScope);\n\tconst args = [\n\t\t...insertIf(recordArgument !== undefined, recordArgument),\n\t\t...insertIf(domainArgument !== undefined, domainArgument)\n\t];\n\n\tif (!args.length) return undefined;\n\n\treturn {\n\t\tkind: 'Directive',\n\t\tname: {kind: 'Name', value: 'domain'},\n\t\targuments: args\n\t};\n}\n\nexport function createRecordArgument(table, id) {\n\tif (!isValidRecordArgument(table, id)) return undefined;\n\n\treturn {\n\t\tkind: 'Argument',\n\t\tname: {kind: 'Name', value: 'record'},\n\t\tvalue: {\n\t\t\tkind: 'ObjectValue',\n\t\t\tfields: [\n\t\t\t\t{\n\t\t\t\t\tkind: 'ObjectField',\n\t\t\t\t\tname: {kind: 'Name', value: 'tableName'},\n\t\t\t\t\tvalue: {kind: 'StringValue', value: table}\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tkind: 'ObjectField',\n\t\t\t\t\tname: {kind: 'Name', value: 'id'},\n\t\t\t\t\tvalue: {kind: 'StringValue', value: id}\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t};\n}\n\nexport function createDomainArgument(id, scope) {\n\tif (!isValidDomainArgument(id, scope)) return undefined;\n\n\treturn {\n\t\tkind: 'Argument',\n\t\tname: {kind: 'Name', value: 'domain'},\n\t\tvalue: {\n\t\t\tkind: 'ObjectValue',\n\t\t\tfields: [\n\t\t\t\t...insertIf(id !== undefined, {\n\t\t\t\t\tkind: 'ObjectField',\n\t\t\t\t\tname: {kind: 'Name', value: 'id'},\n\t\t\t\t\tvalue: {kind: 'StringValue', value: id}\n\t\t\t\t}),\n\t\t\t\t...insertIf(scope !== undefined, {\n\t\t\t\t\tkind: 'ObjectField',\n\t\t\t\t\tname: {kind: 'Name', value: 'scope'},\n\t\t\t\t\tvalue: {kind: 'EnumValue', value: scope}\n\t\t\t\t})\n\t\t\t]\n\t\t}\n\t};\n}\n\nexport function isValidRecordArgument(table, id) {\n\treturn table !== undefined && id !== undefined;\n}\n\nexport function isValidDomainArgument(id, scope) {\n\treturn id !== undefined || scope !== undefined;\n}\n\nexport function insertIf(condition, value) {\n\treturn condition ? [value] : [];\n}\n", "/**\n * addQueryNameToGraphQLDocument\n * Add name to query document\n *\n * @param document\n * @param queryName\n * @returns {*}\n */\nexport default function addQueryNameToGraphQLDocument(document, queryName) {\n\treturn {\n\t\t...document,\n\t\tdefinitions: document.definitions.map(def => ({\n\t\t\t...def,\n\t\t\t...addIf(isQueryOrMutationOperation(def), {name: {kind: 'Name', value: queryName}})\n\t\t}))\n\t};\n}\n\nfunction isQueryOrMutationOperation(definition) {\n\treturn (\n\t\t(definition.kind === 'OperationDefinition' && definition.operation === 'query') ||\n\t\tdefinition.operation === 'mutation'\n\t);\n}\n\nfunction addIf(condition, value) {\n\treturn condition ? value : {};\n}\n", "export default function getGlobalObject() {\n\tif (typeof self !== 'undefined') return self;\n\n\tif (typeof window !== 'undefined') return window;\n\n\tif (typeof global !== 'undefined') return global;\n\n\tthrow new Error('Unable to locate global object');\n}\n", "import {get} from '@servicenow/ui-internal';\n\nexport default function isSubscription(document = {}) {\n\tconst operation = get(document, 'definitions[0].operation');\n\treturn operation && operation === 'subscription';\n}\n", "export default function isSubscriptionResult(result) {\n\tconst {data} = result;\n\treturn data?.GlideRecord_Subscription;\n}\n", "import Mustache from 'mustache';\nimport {memoize} from '@servicenow/ui-internal';\n\nconst mustacheTokens = ['#', '^', '>', '&', 'name'];\n\nfunction TemplateVarsMissingException(query, expectedTemplateVars) {\n\tthis.name = 'TemplateVarsMissingException';\n\tthis.message = 'template_vars missing for GraphQL query';\n\tthis.query = query;\n\tthis.expectedTemplateVars = expectedTemplateVars;\n\tthis.stack = new Error(this.message).stack;\n}\n\nTemplateVarsMissingException.prototype = new Error();\n\n/**\n * Match template vars up with query template, throw if missing any vars\n *\n * @private\n * @param queryStr\n * @param templateParts\n * @param templateVars\n * @throws TemplateVarsMissingException\n * @return {void}\n */\nfunction assertValidTemplateVars(queryStr, templateParts, templateVars) {\n\tconst {length: templatePartsLength} = templateParts;\n\tfor (let i = 0; i < templatePartsLength; i++) {\n\t\tif (!templateVars[templateParts[i]])\n\t\t\tthrow new TemplateVarsMissingException(queryStr, templateParts);\n\t}\n}\n\n/**\n * Parse template variable tokens from query\n *\n * @private\n * @param queryStr\n * @return [Array<String>] tokens\n */\nfunction getTokens(queryStr) {\n\tconst parts = Mustache.parse(queryStr);\n\tconst tokens = [];\n\tconst {length: partsLength} = parts;\n\n\tfor (let i = 0; i < partsLength; i++) {\n\t\tconst part = parts[i];\n\t\tif (mustacheTokens.includes(part[0])) tokens.push(part[1]);\n\t}\n\n\treturn tokens;\n}\n\nconst memGetTokens = memoize(getTokens, {profileName: 'getTokens'});\n\nexport default function replaceQueryTemplateVariables(queryStr = '', templateVars = {}) {\n\tconst tokens = memGetTokens(queryStr);\n\tassertValidTemplateVars(queryStr, tokens, templateVars);\n\treturn Mustache.render(queryStr, templateVars);\n}\n", "import gql from 'graphql-tag';\nimport replaceQueryTemplateVariables from './replaceQueryTemplateVariables';\nimport addQueryNameToGraphQLDocument from './addQueryNameToGraphQLDocument';\nimport addDomainContextToGraphQLDocument from './addDomainContextToGraphQLDocument';\n\nexport function createGraphQLDocument(query = '') {\n\treturn gql(query);\n}\n\nexport function getGraphQLDocument(query, templateVars, domainContext, operationName) {\n\tconst updatedQuery = replaceQueryTemplateVariables(query, templateVars);\n\treturn addQueryNameToGraphQLDocument(\n\t\taddDomainContextToGraphQLDocument(createGraphQLDocument(updatedQuery), domainContext),\n\t\toperationName\n\t);\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***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\n\nvar extendStatics = function(d, b) {\n  extendStatics = Object.setPrototypeOf ||\n      ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n      function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n  return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n  if (typeof b !== \"function\" && b !== null)\n      throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n  extendStatics(d, b);\n  function __() { this.constructor = d; }\n  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n  __assign = Object.assign || function __assign(t) {\n      for (var s, i = 1, n = arguments.length; i < n; i++) {\n          s = arguments[i];\n          for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n      }\n      return t;\n  }\n  return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n  var t = {};\n  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n      t[p] = s[p];\n  if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n      for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n          if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n              t[p[i]] = s[p[i]];\n      }\n  return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n  if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n  return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n  return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n  function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n  var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n  var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n  var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n  var _, done = false;\n  for (var i = decorators.length - 1; i >= 0; i--) {\n      var context = {};\n      for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n      for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n      context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n      var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n      if (kind === \"accessor\") {\n          if (result === void 0) continue;\n          if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n          if (_ = accept(result.get)) descriptor.get = _;\n          if (_ = accept(result.set)) descriptor.set = _;\n          if (_ = accept(result.init)) initializers.unshift(_);\n      }\n      else if (_ = accept(result)) {\n          if (kind === \"field\") initializers.unshift(_);\n          else descriptor[key] = _;\n      }\n  }\n  if (target) Object.defineProperty(target, contextIn.name, descriptor);\n  done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n  var useValue = arguments.length > 2;\n  for (var i = 0; i < initializers.length; i++) {\n      value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n  }\n  return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n  return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n  if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n  return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n  if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n  return new (P || (P = Promise))(function (resolve, reject) {\n      function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n      function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n      function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n      step((generator = generator.apply(thisArg, _arguments || [])).next());\n  });\n}\n\nexport function __generator(thisArg, body) {\n  var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n  return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n  function verb(n) { return function (v) { return step([n, v]); }; }\n  function step(op) {\n      if (f) throw new TypeError(\"Generator is already executing.\");\n      while (g && (g = 0, op[0] && (_ = 0)), _) try {\n          if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n          if (y = 0, t) op = [op[0] & 2, t.value];\n          switch (op[0]) {\n              case 0: case 1: t = op; break;\n              case 4: _.label++; return { value: op[1], done: false };\n              case 5: _.label++; y = op[1]; op = [0]; continue;\n              case 7: op = _.ops.pop(); _.trys.pop(); continue;\n              default:\n                  if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n                  if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n                  if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n                  if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n                  if (t[2]) _.ops.pop();\n                  _.trys.pop(); continue;\n          }\n          op = body.call(thisArg, _);\n      } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n      if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n  }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n  if (k2 === undefined) k2 = k;\n  var desc = Object.getOwnPropertyDescriptor(m, k);\n  if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n      desc = { enumerable: true, get: function() { return m[k]; } };\n  }\n  Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n  if (k2 === undefined) k2 = k;\n  o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n  for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n  var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n  if (m) return m.call(o);\n  if (o && typeof o.length === \"number\") return {\n      next: function () {\n          if (o && i >= o.length) o = void 0;\n          return { value: o && o[i++], done: !o };\n      }\n  };\n  throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n  var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n  if (!m) return o;\n  var i = m.call(o), r, ar = [], e;\n  try {\n      while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n  }\n  catch (error) { e = { error: error }; }\n  finally {\n      try {\n          if (r && !r.done && (m = i[\"return\"])) m.call(i);\n      }\n      finally { if (e) throw e.error; }\n  }\n  return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n  for (var ar = [], i = 0; i < arguments.length; i++)\n      ar = ar.concat(__read(arguments[i]));\n  return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n  for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n  for (var r = Array(s), k = 0, i = 0; i < il; i++)\n      for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n          r[k] = a[j];\n  return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n  if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n      if (ar || !(i in from)) {\n          if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n          ar[i] = from[i];\n      }\n  }\n  return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n  return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n  if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n  var g = generator.apply(thisArg, _arguments || []), i, q = [];\n  return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n  function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n  function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n  function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n  function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n  function fulfill(value) { resume(\"next\", value); }\n  function reject(value) { resume(\"throw\", value); }\n  function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n  var i, p;\n  return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n  function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n  if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n  var m = o[Symbol.asyncIterator], i;\n  return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n  function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n  function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n  if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n  return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n  Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n  o[\"default\"] = v;\n};\n\nvar ownKeys = function(o) {\n  ownKeys = Object.getOwnPropertyNames || function (o) {\n    var ar = [];\n    for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n    return ar;\n  };\n  return ownKeys(o);\n};\n\nexport function __importStar(mod) {\n  if (mod && mod.__esModule) return mod;\n  var result = {};\n  if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n  __setModuleDefault(result, mod);\n  return result;\n}\n\nexport function __importDefault(mod) {\n  return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n  if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n  if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n  return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n  if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n  if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n  if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n  return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n  if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n  return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n  if (value !== null && value !== void 0) {\n    if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n    var dispose, inner;\n    if (async) {\n      if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n      dispose = value[Symbol.asyncDispose];\n    }\n    if (dispose === void 0) {\n      if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n      dispose = value[Symbol.dispose];\n      if (async) inner = dispose;\n    }\n    if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n    if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n    env.stack.push({ value: value, dispose: dispose, async: async });\n  }\n  else if (async) {\n    env.stack.push({ async: true });\n  }\n  return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n  var e = new Error(message);\n  return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n  function fail(e) {\n    env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n    env.hasError = true;\n  }\n  var r, s = 0;\n  function next() {\n    while (r = env.stack.pop()) {\n      try {\n        if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\n        if (r.dispose) {\n          var result = r.dispose.call(r.value);\n          if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n        }\n        else s |= 1;\n      }\n      catch (e) {\n        fail(e);\n      }\n    }\n    if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\n    if (env.hasError) throw env.error;\n  }\n  return next();\n}\n\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\n  if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\n      return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\n          return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\n      });\n  }\n  return path;\n}\n\nexport default {\n  __extends,\n  __assign,\n  __rest,\n  __decorate,\n  __param,\n  __esDecorate,\n  __runInitializers,\n  __propKey,\n  __setFunctionName,\n  __metadata,\n  __awaiter,\n  __generator,\n  __createBinding,\n  __exportStar,\n  __values,\n  __read,\n  __spread,\n  __spreadArrays,\n  __spreadArray,\n  __await,\n  __asyncGenerator,\n  __asyncDelegator,\n  __asyncValues,\n  __makeTemplateObject,\n  __importStar,\n  __importDefault,\n  __classPrivateFieldGet,\n  __classPrivateFieldSet,\n  __classPrivateFieldIn,\n  __addDisposableResource,\n  __disposeResources,\n  __rewriteRelativeImportExtension,\n};\n", "/**\n * GraphQL.js provides a reference implementation for the GraphQL specification\n * but is also a useful utility for operating on GraphQL files and building\n * sophisticated tools.\n *\n * This primary module exports a general purpose function for fulfilling all\n * steps of the GraphQL specification in a single operation, but also includes\n * utilities for every part of the GraphQL specification:\n *\n *   - Parsing the GraphQL language.\n *   - Building a GraphQL type schema.\n *   - Validating a GraphQL request against a type schema.\n *   - Executing a GraphQL request against a type schema.\n *\n * This also includes utility functions for operating on GraphQL types and\n * GraphQL documents to facilitate building tools.\n *\n * You may also import from each sub-directory directly. For example, the\n * following two import statements are equivalent:\n *\n * ```ts\n * import { parse } from 'graphql';\n * import { parse } from 'graphql/language';\n * ```\n *\n * @packageDocumentation\n */\n// The GraphQL.js version info.\nexport { version, versionInfo } from './version.mjs'; // The primary entry point into fulfilling a GraphQL request.\n\nexport { graphql, graphqlSync } from './graphql.mjs'; // Create and operate on GraphQL type definitions and schema.\n\nexport {\n  resolveObjMapThunk,\n  resolveReadonlyArrayThunk, // Definitions\n  GraphQLSchema,\n  GraphQLDirective,\n  GraphQLScalarType,\n  GraphQLObjectType,\n  GraphQLInterfaceType,\n  GraphQLUnionType,\n  GraphQLEnumType,\n  GraphQLInputObjectType,\n  GraphQLList,\n  GraphQLNonNull, // Standard GraphQL Scalars\n  specifiedScalarTypes,\n  GraphQLInt,\n  GraphQLFloat,\n  GraphQLString,\n  GraphQLBoolean,\n  GraphQLID, // Int boundaries constants\n  GRAPHQL_MAX_INT,\n  GRAPHQL_MIN_INT, // Built-in Directives defined by the Spec\n  specifiedDirectives,\n  GraphQLIncludeDirective,\n  GraphQLSkipDirective,\n  GraphQLDeprecatedDirective,\n  GraphQLSpecifiedByDirective, // \"Enum\" of Type Kinds\n  TypeKind, // Constant Deprecation Reason\n  DEFAULT_DEPRECATION_REASON, // GraphQL Types for introspection.\n  introspectionTypes,\n  __Schema,\n  __Directive,\n  __DirectiveLocation,\n  __Type,\n  __Field,\n  __InputValue,\n  __EnumValue,\n  __TypeKind, // Meta-field definitions.\n  SchemaMetaFieldDef,\n  TypeMetaFieldDef,\n  TypeNameMetaFieldDef, // Predicates\n  isSchema,\n  isDirective,\n  isType,\n  isScalarType,\n  isObjectType,\n  isInterfaceType,\n  isUnionType,\n  isEnumType,\n  isInputObjectType,\n  isListType,\n  isNonNullType,\n  isInputType,\n  isOutputType,\n  isLeafType,\n  isCompositeType,\n  isAbstractType,\n  isWrappingType,\n  isNullableType,\n  isNamedType,\n  isRequiredArgument,\n  isRequiredInputField,\n  isSpecifiedScalarType,\n  isIntrospectionType,\n  isSpecifiedDirective, // Assertions\n  assertSchema,\n  assertDirective,\n  assertType,\n  assertScalarType,\n  assertObjectType,\n  assertInterfaceType,\n  assertUnionType,\n  assertEnumType,\n  assertInputObjectType,\n  assertListType,\n  assertNonNullType,\n  assertInputType,\n  assertOutputType,\n  assertLeafType,\n  assertCompositeType,\n  assertAbstractType,\n  assertWrappingType,\n  assertNullableType,\n  assertNamedType, // Un-modifiers\n  getNullableType,\n  getNamedType, // Validate GraphQL schema.\n  validateSchema,\n  assertValidSchema, // Upholds the spec rules about naming.\n  assertName,\n  assertEnumValueName,\n} from './type/index.mjs';\n// Parse and operate on GraphQL language source files.\nexport {\n  Token,\n  Source,\n  Location,\n  OperationTypeNode,\n  getLocation, // Print source location.\n  printLocation,\n  printSourceLocation, // Lex\n  Lexer,\n  TokenKind, // Parse\n  parse,\n  parseValue,\n  parseConstValue,\n  parseType, // Print\n  print, // Visit\n  visit,\n  visitInParallel,\n  getVisitFn,\n  getEnterLeaveForKind,\n  BREAK,\n  Kind,\n  DirectiveLocation, // Predicates\n  isDefinitionNode,\n  isExecutableDefinitionNode,\n  isSelectionNode,\n  isValueNode,\n  isConstValueNode,\n  isTypeNode,\n  isTypeSystemDefinitionNode,\n  isTypeDefinitionNode,\n  isTypeSystemExtensionNode,\n  isTypeExtensionNode,\n} from './language/index.mjs';\n// Execute GraphQL queries.\nexport {\n  execute,\n  executeSync,\n  defaultFieldResolver,\n  defaultTypeResolver,\n  responsePathAsArray,\n  getArgumentValues,\n  getVariableValues,\n  getDirectiveValues,\n  subscribe,\n  createSourceEventStream,\n} from './execution/index.mjs';\n// Validate GraphQL documents.\nexport {\n  validate,\n  ValidationContext, // All validation rules in the GraphQL Specification.\n  specifiedRules, // Individual validation rules.\n  ExecutableDefinitionsRule,\n  FieldsOnCorrectTypeRule,\n  FragmentsOnCompositeTypesRule,\n  KnownArgumentNamesRule,\n  KnownDirectivesRule,\n  KnownFragmentNamesRule,\n  KnownTypeNamesRule,\n  LoneAnonymousOperationRule,\n  NoFragmentCyclesRule,\n  NoUndefinedVariablesRule,\n  NoUnusedFragmentsRule,\n  NoUnusedVariablesRule,\n  OverlappingFieldsCanBeMergedRule,\n  PossibleFragmentSpreadsRule,\n  ProvidedRequiredArgumentsRule,\n  ScalarLeafsRule,\n  SingleFieldSubscriptionsRule,\n  UniqueArgumentNamesRule,\n  UniqueDirectivesPerLocationRule,\n  UniqueFragmentNamesRule,\n  UniqueInputFieldNamesRule,\n  UniqueOperationNamesRule,\n  UniqueVariableNamesRule,\n  ValuesOfCorrectTypeRule,\n  VariablesAreInputTypesRule,\n  VariablesInAllowedPositionRule, // SDL-specific validation rules\n  LoneSchemaDefinitionRule,\n  UniqueOperationTypesRule,\n  UniqueTypeNamesRule,\n  UniqueEnumValueNamesRule,\n  UniqueFieldDefinitionNamesRule,\n  UniqueArgumentDefinitionNamesRule,\n  UniqueDirectiveNamesRule,\n  PossibleTypeExtensionsRule, // Custom validation rules\n  NoDeprecatedCustomRule,\n  NoSchemaIntrospectionCustomRule,\n} from './validation/index.mjs';\n// Create, format, and print GraphQL errors.\nexport {\n  GraphQLError,\n  syntaxError,\n  locatedError,\n  printError,\n  formatError,\n} from './error/index.mjs';\n// Utilities for operating on GraphQL type schema and parsed sources.\nexport {\n  // Produce the GraphQL query recommended for a full schema introspection.\n  // Accepts optional IntrospectionOptions.\n  getIntrospectionQuery, // Gets the target Operation from a Document.\n  getOperationAST, // Gets the Type for the target Operation AST.\n  getOperationRootType, // Convert a GraphQLSchema to an IntrospectionQuery.\n  introspectionFromSchema, // Build a GraphQLSchema from an introspection result.\n  buildClientSchema, // Build a GraphQLSchema from a parsed GraphQL Schema language AST.\n  buildASTSchema, // Build a GraphQLSchema from a GraphQL schema language document.\n  buildSchema, // Extends an existing GraphQLSchema from a parsed GraphQL Schema language AST.\n  extendSchema, // Sort a GraphQLSchema.\n  lexicographicSortSchema, // Print a GraphQLSchema to GraphQL Schema language.\n  printSchema, // Print a GraphQLType to GraphQL Schema language.\n  printType, // Prints the built-in introspection schema in the Schema Language format.\n  printIntrospectionSchema, // Create a GraphQLType from a GraphQL language AST.\n  typeFromAST, // Create a JavaScript value from a GraphQL language AST with a Type.\n  valueFromAST, // Create a JavaScript value from a GraphQL language AST without a Type.\n  valueFromASTUntyped, // Create a GraphQL language AST from a JavaScript value.\n  astFromValue, // A helper to use within recursive-descent visitors which need to be aware of the GraphQL type system.\n  TypeInfo,\n  visitWithTypeInfo, // Coerces a JavaScript value to a GraphQL type, or produces errors.\n  coerceInputValue, // Concatenates multiple AST together.\n  concatAST, // Separates an AST into an AST per Operation.\n  separateOperations, // Strips characters that are not significant to the validity or execution of a GraphQL document.\n  stripIgnoredCharacters, // Comparators for types\n  isEqualType,\n  isTypeSubTypeOf,\n  doTypesOverlap, // Asserts a string is a valid GraphQL name.\n  assertValidName, // Determine if a string is a valid GraphQL name.\n  isValidNameError, // Compares two GraphQLSchemas and detects breaking changes.\n  BreakingChangeType,\n  DangerousChangeType,\n  findBreakingChanges,\n  findDangerousChanges,\n} from './utilities/index.mjs';\n", "export function devAssert(condition, message) {\n  const booleanCondition = Boolean(condition);\n\n  if (!booleanCondition) {\n    throw new Error(message);\n  }\n}\n", "import { syntaxError } from '../error/syntaxError.mjs';\nimport { Location, OperationTypeNode } from './ast.mjs';\nimport { DirectiveLocation } from './directiveLocation.mjs';\nimport { Kind } from './kinds.mjs';\nimport { isPunctuatorTokenKind, Lexer } from './lexer.mjs';\nimport { isSource, Source } from './source.mjs';\nimport { TokenKind } from './tokenKind.mjs';\n/**\n * Configuration options to control parser behavior\n */\n\n/**\n * Given a GraphQL source, parses it into a Document.\n * Throws GraphQLError if a syntax error is encountered.\n */\nexport function parse(source, options) {\n  const parser = new Parser(source, options);\n  return parser.parseDocument();\n}\n/**\n * Given a string containing a GraphQL value (ex. `[42]`), parse the AST for\n * that value.\n * Throws GraphQLError if a syntax error is encountered.\n *\n * This is useful within tools that operate upon GraphQL Values directly and\n * in isolation of complete GraphQL documents.\n *\n * Consider providing the results to the utility function: valueFromAST().\n */\n\nexport function parseValue(source, options) {\n  const parser = new Parser(source, options);\n  parser.expectToken(TokenKind.SOF);\n  const value = parser.parseValueLiteral(false);\n  parser.expectToken(TokenKind.EOF);\n  return value;\n}\n/**\n * Similar to parseValue(), but raises a parse error if it encounters a\n * variable. The return type will be a constant value.\n */\n\nexport function parseConstValue(source, options) {\n  const parser = new Parser(source, options);\n  parser.expectToken(TokenKind.SOF);\n  const value = parser.parseConstValueLiteral();\n  parser.expectToken(TokenKind.EOF);\n  return value;\n}\n/**\n * Given a string containing a GraphQL Type (ex. `[Int!]`), parse the AST for\n * that type.\n * Throws GraphQLError if a syntax error is encountered.\n *\n * This is useful within tools that operate upon GraphQL Types directly and\n * in isolation of complete GraphQL documents.\n *\n * Consider providing the results to the utility function: typeFromAST().\n */\n\nexport function parseType(source, options) {\n  const parser = new Parser(source, options);\n  parser.expectToken(TokenKind.SOF);\n  const type = parser.parseTypeReference();\n  parser.expectToken(TokenKind.EOF);\n  return type;\n}\n/**\n * This class is exported only to assist people in implementing their own parsers\n * without duplicating too much code and should be used only as last resort for cases\n * such as experimental syntax or if certain features could not be contributed upstream.\n *\n * It is still part of the internal API and is versioned, so any changes to it are never\n * considered breaking changes. If you still need to support multiple versions of the\n * library, please use the `versionInfo` variable for version detection.\n *\n * @internal\n */\n\nexport class Parser {\n  constructor(source, options = {}) {\n    const sourceObj = isSource(source) ? source : new Source(source);\n    this._lexer = new Lexer(sourceObj);\n    this._options = options;\n    this._tokenCounter = 0;\n  }\n  /**\n   * Converts a name lex token into a name parse node.\n   */\n\n  parseName() {\n    const token = this.expectToken(TokenKind.NAME);\n    return this.node(token, {\n      kind: Kind.NAME,\n      value: token.value,\n    });\n  } // Implements the parsing rules in the Document section.\n\n  /**\n   * Document : Definition+\n   */\n\n  parseDocument() {\n    return this.node(this._lexer.token, {\n      kind: Kind.DOCUMENT,\n      definitions: this.many(\n        TokenKind.SOF,\n        this.parseDefinition,\n        TokenKind.EOF,\n      ),\n    });\n  }\n  /**\n   * Definition :\n   *   - ExecutableDefinition\n   *   - TypeSystemDefinition\n   *   - TypeSystemExtension\n   *\n   * ExecutableDefinition :\n   *   - OperationDefinition\n   *   - FragmentDefinition\n   *\n   * TypeSystemDefinition :\n   *   - SchemaDefinition\n   *   - TypeDefinition\n   *   - DirectiveDefinition\n   *\n   * TypeDefinition :\n   *   - ScalarTypeDefinition\n   *   - ObjectTypeDefinition\n   *   - InterfaceTypeDefinition\n   *   - UnionTypeDefinition\n   *   - EnumTypeDefinition\n   *   - InputObjectTypeDefinition\n   */\n\n  parseDefinition() {\n    if (this.peek(TokenKind.BRACE_L)) {\n      return this.parseOperationDefinition();\n    } // Many definitions begin with a description and require a lookahead.\n\n    const hasDescription = this.peekDescription();\n    const keywordToken = hasDescription\n      ? this._lexer.lookahead()\n      : this._lexer.token;\n\n    if (keywordToken.kind === TokenKind.NAME) {\n      switch (keywordToken.value) {\n        case 'schema':\n          return this.parseSchemaDefinition();\n\n        case 'scalar':\n          return this.parseScalarTypeDefinition();\n\n        case 'type':\n          return this.parseObjectTypeDefinition();\n\n        case 'interface':\n          return this.parseInterfaceTypeDefinition();\n\n        case 'union':\n          return this.parseUnionTypeDefinition();\n\n        case 'enum':\n          return this.parseEnumTypeDefinition();\n\n        case 'input':\n          return this.parseInputObjectTypeDefinition();\n\n        case 'directive':\n          return this.parseDirectiveDefinition();\n      }\n\n      if (hasDescription) {\n        throw syntaxError(\n          this._lexer.source,\n          this._lexer.token.start,\n          'Unexpected description, descriptions are supported only on type definitions.',\n        );\n      }\n\n      switch (keywordToken.value) {\n        case 'query':\n        case 'mutation':\n        case 'subscription':\n          return this.parseOperationDefinition();\n\n        case 'fragment':\n          return this.parseFragmentDefinition();\n\n        case 'extend':\n          return this.parseTypeSystemExtension();\n      }\n    }\n\n    throw this.unexpected(keywordToken);\n  } // Implements the parsing rules in the Operations section.\n\n  /**\n   * OperationDefinition :\n   *  - SelectionSet\n   *  - OperationType Name? VariableDefinitions? Directives? SelectionSet\n   */\n\n  parseOperationDefinition() {\n    const start = this._lexer.token;\n\n    if (this.peek(TokenKind.BRACE_L)) {\n      return this.node(start, {\n        kind: Kind.OPERATION_DEFINITION,\n        operation: OperationTypeNode.QUERY,\n        name: undefined,\n        variableDefinitions: [],\n        directives: [],\n        selectionSet: this.parseSelectionSet(),\n      });\n    }\n\n    const operation = this.parseOperationType();\n    let name;\n\n    if (this.peek(TokenKind.NAME)) {\n      name = this.parseName();\n    }\n\n    return this.node(start, {\n      kind: Kind.OPERATION_DEFINITION,\n      operation,\n      name,\n      variableDefinitions: this.parseVariableDefinitions(),\n      directives: this.parseDirectives(false),\n      selectionSet: this.parseSelectionSet(),\n    });\n  }\n  /**\n   * OperationType : one of query mutation subscription\n   */\n\n  parseOperationType() {\n    const operationToken = this.expectToken(TokenKind.NAME);\n\n    switch (operationToken.value) {\n      case 'query':\n        return OperationTypeNode.QUERY;\n\n      case 'mutation':\n        return OperationTypeNode.MUTATION;\n\n      case 'subscription':\n        return OperationTypeNode.SUBSCRIPTION;\n    }\n\n    throw this.unexpected(operationToken);\n  }\n  /**\n   * VariableDefinitions : ( VariableDefinition+ )\n   */\n\n  parseVariableDefinitions() {\n    return this.optionalMany(\n      TokenKind.PAREN_L,\n      this.parseVariableDefinition,\n      TokenKind.PAREN_R,\n    );\n  }\n  /**\n   * VariableDefinition : Variable : Type DefaultValue? Directives[Const]?\n   */\n\n  parseVariableDefinition() {\n    return this.node(this._lexer.token, {\n      kind: Kind.VARIABLE_DEFINITION,\n      variable: this.parseVariable(),\n      type: (this.expectToken(TokenKind.COLON), this.parseTypeReference()),\n      defaultValue: this.expectOptionalToken(TokenKind.EQUALS)\n        ? this.parseConstValueLiteral()\n        : undefined,\n      directives: this.parseConstDirectives(),\n    });\n  }\n  /**\n   * Variable : $ Name\n   */\n\n  parseVariable() {\n    const start = this._lexer.token;\n    this.expectToken(TokenKind.DOLLAR);\n    return this.node(start, {\n      kind: Kind.VARIABLE,\n      name: this.parseName(),\n    });\n  }\n  /**\n   * ```\n   * SelectionSet : { Selection+ }\n   * ```\n   */\n\n  parseSelectionSet() {\n    return this.node(this._lexer.token, {\n      kind: Kind.SELECTION_SET,\n      selections: this.many(\n        TokenKind.BRACE_L,\n        this.parseSelection,\n        TokenKind.BRACE_R,\n      ),\n    });\n  }\n  /**\n   * Selection :\n   *   - Field\n   *   - FragmentSpread\n   *   - InlineFragment\n   */\n\n  parseSelection() {\n    return this.peek(TokenKind.SPREAD)\n      ? this.parseFragment()\n      : this.parseField();\n  }\n  /**\n   * Field : Alias? Name Arguments? Directives? SelectionSet?\n   *\n   * Alias : Name :\n   */\n\n  parseField() {\n    const start = this._lexer.token;\n    const nameOrAlias = this.parseName();\n    let alias;\n    let name;\n\n    if (this.expectOptionalToken(TokenKind.COLON)) {\n      alias = nameOrAlias;\n      name = this.parseName();\n    } else {\n      name = nameOrAlias;\n    }\n\n    return this.node(start, {\n      kind: Kind.FIELD,\n      alias,\n      name,\n      arguments: this.parseArguments(false),\n      directives: this.parseDirectives(false),\n      selectionSet: this.peek(TokenKind.BRACE_L)\n        ? this.parseSelectionSet()\n        : undefined,\n    });\n  }\n  /**\n   * Arguments[Const] : ( Argument[?Const]+ )\n   */\n\n  parseArguments(isConst) {\n    const item = isConst ? this.parseConstArgument : this.parseArgument;\n    return this.optionalMany(TokenKind.PAREN_L, item, TokenKind.PAREN_R);\n  }\n  /**\n   * Argument[Const] : Name : Value[?Const]\n   */\n\n  parseArgument(isConst = false) {\n    const start = this._lexer.token;\n    const name = this.parseName();\n    this.expectToken(TokenKind.COLON);\n    return this.node(start, {\n      kind: Kind.ARGUMENT,\n      name,\n      value: this.parseValueLiteral(isConst),\n    });\n  }\n\n  parseConstArgument() {\n    return this.parseArgument(true);\n  } // Implements the parsing rules in the Fragments section.\n\n  /**\n   * Corresponds to both FragmentSpread and InlineFragment in the spec.\n   *\n   * FragmentSpread : ... FragmentName Directives?\n   *\n   * InlineFragment : ... TypeCondition? Directives? SelectionSet\n   */\n\n  parseFragment() {\n    const start = this._lexer.token;\n    this.expectToken(TokenKind.SPREAD);\n    const hasTypeCondition = this.expectOptionalKeyword('on');\n\n    if (!hasTypeCondition && this.peek(TokenKind.NAME)) {\n      return this.node(start, {\n        kind: Kind.FRAGMENT_SPREAD,\n        name: this.parseFragmentName(),\n        directives: this.parseDirectives(false),\n      });\n    }\n\n    return this.node(start, {\n      kind: Kind.INLINE_FRAGMENT,\n      typeCondition: hasTypeCondition ? this.parseNamedType() : undefined,\n      directives: this.parseDirectives(false),\n      selectionSet: this.parseSelectionSet(),\n    });\n  }\n  /**\n   * FragmentDefinition :\n   *   - fragment FragmentName on TypeCondition Directives? SelectionSet\n   *\n   * TypeCondition : NamedType\n   */\n\n  parseFragmentDefinition() {\n    const start = this._lexer.token;\n    this.expectKeyword('fragment'); // Legacy support for defining variables within fragments changes\n    // the grammar of FragmentDefinition:\n    //   - fragment FragmentName VariableDefinitions? on TypeCondition Directives? SelectionSet\n\n    if (this._options.allowLegacyFragmentVariables === true) {\n      return this.node(start, {\n        kind: Kind.FRAGMENT_DEFINITION,\n        name: this.parseFragmentName(),\n        variableDefinitions: this.parseVariableDefinitions(),\n        typeCondition: (this.expectKeyword('on'), this.parseNamedType()),\n        directives: this.parseDirectives(false),\n        selectionSet: this.parseSelectionSet(),\n      });\n    }\n\n    return this.node(start, {\n      kind: Kind.FRAGMENT_DEFINITION,\n      name: this.parseFragmentName(),\n      typeCondition: (this.expectKeyword('on'), this.parseNamedType()),\n      directives: this.parseDirectives(false),\n      selectionSet: this.parseSelectionSet(),\n    });\n  }\n  /**\n   * FragmentName : Name but not `on`\n   */\n\n  parseFragmentName() {\n    if (this._lexer.token.value === 'on') {\n      throw this.unexpected();\n    }\n\n    return this.parseName();\n  } // Implements the parsing rules in the Values section.\n\n  /**\n   * Value[Const] :\n   *   - [~Const] Variable\n   *   - IntValue\n   *   - FloatValue\n   *   - StringValue\n   *   - BooleanValue\n   *   - NullValue\n   *   - EnumValue\n   *   - ListValue[?Const]\n   *   - ObjectValue[?Const]\n   *\n   * BooleanValue : one of `true` `false`\n   *\n   * NullValue : `null`\n   *\n   * EnumValue : Name but not `true`, `false` or `null`\n   */\n\n  parseValueLiteral(isConst) {\n    const token = this._lexer.token;\n\n    switch (token.kind) {\n      case TokenKind.BRACKET_L:\n        return this.parseList(isConst);\n\n      case TokenKind.BRACE_L:\n        return this.parseObject(isConst);\n\n      case TokenKind.INT:\n        this.advanceLexer();\n        return this.node(token, {\n          kind: Kind.INT,\n          value: token.value,\n        });\n\n      case TokenKind.FLOAT:\n        this.advanceLexer();\n        return this.node(token, {\n          kind: Kind.FLOAT,\n          value: token.value,\n        });\n\n      case TokenKind.STRING:\n      case TokenKind.BLOCK_STRING:\n        return this.parseStringLiteral();\n\n      case TokenKind.NAME:\n        this.advanceLexer();\n\n        switch (token.value) {\n          case 'true':\n            return this.node(token, {\n              kind: Kind.BOOLEAN,\n              value: true,\n            });\n\n          case 'false':\n            return this.node(token, {\n              kind: Kind.BOOLEAN,\n              value: false,\n            });\n\n          case 'null':\n            return this.node(token, {\n              kind: Kind.NULL,\n            });\n\n          default:\n            return this.node(token, {\n              kind: Kind.ENUM,\n              value: token.value,\n            });\n        }\n\n      case TokenKind.DOLLAR:\n        if (isConst) {\n          this.expectToken(TokenKind.DOLLAR);\n\n          if (this._lexer.token.kind === TokenKind.NAME) {\n            const varName = this._lexer.token.value;\n            throw syntaxError(\n              this._lexer.source,\n              token.start,\n              `Unexpected variable \"$${varName}\" in constant value.`,\n            );\n          } else {\n            throw this.unexpected(token);\n          }\n        }\n\n        return this.parseVariable();\n\n      default:\n        throw this.unexpected();\n    }\n  }\n\n  parseConstValueLiteral() {\n    return this.parseValueLiteral(true);\n  }\n\n  parseStringLiteral() {\n    const token = this._lexer.token;\n    this.advanceLexer();\n    return this.node(token, {\n      kind: Kind.STRING,\n      value: token.value,\n      block: token.kind === TokenKind.BLOCK_STRING,\n    });\n  }\n  /**\n   * ListValue[Const] :\n   *   - [ ]\n   *   - [ Value[?Const]+ ]\n   */\n\n  parseList(isConst) {\n    const item = () => this.parseValueLiteral(isConst);\n\n    return this.node(this._lexer.token, {\n      kind: Kind.LIST,\n      values: this.any(TokenKind.BRACKET_L, item, TokenKind.BRACKET_R),\n    });\n  }\n  /**\n   * ```\n   * ObjectValue[Const] :\n   *   - { }\n   *   - { ObjectField[?Const]+ }\n   * ```\n   */\n\n  parseObject(isConst) {\n    const item = () => this.parseObjectField(isConst);\n\n    return this.node(this._lexer.token, {\n      kind: Kind.OBJECT,\n      fields: this.any(TokenKind.BRACE_L, item, TokenKind.BRACE_R),\n    });\n  }\n  /**\n   * ObjectField[Const] : Name : Value[?Const]\n   */\n\n  parseObjectField(isConst) {\n    const start = this._lexer.token;\n    const name = this.parseName();\n    this.expectToken(TokenKind.COLON);\n    return this.node(start, {\n      kind: Kind.OBJECT_FIELD,\n      name,\n      value: this.parseValueLiteral(isConst),\n    });\n  } // Implements the parsing rules in the Directives section.\n\n  /**\n   * Directives[Const] : Directive[?Const]+\n   */\n\n  parseDirectives(isConst) {\n    const directives = [];\n\n    while (this.peek(TokenKind.AT)) {\n      directives.push(this.parseDirective(isConst));\n    }\n\n    return directives;\n  }\n\n  parseConstDirectives() {\n    return this.parseDirectives(true);\n  }\n  /**\n   * ```\n   * Directive[Const] : @ Name Arguments[?Const]?\n   * ```\n   */\n\n  parseDirective(isConst) {\n    const start = this._lexer.token;\n    this.expectToken(TokenKind.AT);\n    return this.node(start, {\n      kind: Kind.DIRECTIVE,\n      name: this.parseName(),\n      arguments: this.parseArguments(isConst),\n    });\n  } // Implements the parsing rules in the Types section.\n\n  /**\n   * Type :\n   *   - NamedType\n   *   - ListType\n   *   - NonNullType\n   */\n\n  parseTypeReference() {\n    const start = this._lexer.token;\n    let type;\n\n    if (this.expectOptionalToken(TokenKind.BRACKET_L)) {\n      const innerType = this.parseTypeReference();\n      this.expectToken(TokenKind.BRACKET_R);\n      type = this.node(start, {\n        kind: Kind.LIST_TYPE,\n        type: innerType,\n      });\n    } else {\n      type = this.parseNamedType();\n    }\n\n    if (this.expectOptionalToken(TokenKind.BANG)) {\n      return this.node(start, {\n        kind: Kind.NON_NULL_TYPE,\n        type,\n      });\n    }\n\n    return type;\n  }\n  /**\n   * NamedType : Name\n   */\n\n  parseNamedType() {\n    return this.node(this._lexer.token, {\n      kind: Kind.NAMED_TYPE,\n      name: this.parseName(),\n    });\n  } // Implements the parsing rules in the Type Definition section.\n\n  peekDescription() {\n    return this.peek(TokenKind.STRING) || this.peek(TokenKind.BLOCK_STRING);\n  }\n  /**\n   * Description : StringValue\n   */\n\n  parseDescription() {\n    if (this.peekDescription()) {\n      return this.parseStringLiteral();\n    }\n  }\n  /**\n   * ```\n   * SchemaDefinition : Description? schema Directives[Const]? { OperationTypeDefinition+ }\n   * ```\n   */\n\n  parseSchemaDefinition() {\n    const start = this._lexer.token;\n    const description = this.parseDescription();\n    this.expectKeyword('schema');\n    const directives = this.parseConstDirectives();\n    const operationTypes = this.many(\n      TokenKind.BRACE_L,\n      this.parseOperationTypeDefinition,\n      TokenKind.BRACE_R,\n    );\n    return this.node(start, {\n      kind: Kind.SCHEMA_DEFINITION,\n      description,\n      directives,\n      operationTypes,\n    });\n  }\n  /**\n   * OperationTypeDefinition : OperationType : NamedType\n   */\n\n  parseOperationTypeDefinition() {\n    const start = this._lexer.token;\n    const operation = this.parseOperationType();\n    this.expectToken(TokenKind.COLON);\n    const type = this.parseNamedType();\n    return this.node(start, {\n      kind: Kind.OPERATION_TYPE_DEFINITION,\n      operation,\n      type,\n    });\n  }\n  /**\n   * ScalarTypeDefinition : Description? scalar Name Directives[Const]?\n   */\n\n  parseScalarTypeDefinition() {\n    const start = this._lexer.token;\n    const description = this.parseDescription();\n    this.expectKeyword('scalar');\n    const name = this.parseName();\n    const directives = this.parseConstDirectives();\n    return this.node(start, {\n      kind: Kind.SCALAR_TYPE_DEFINITION,\n      description,\n      name,\n      directives,\n    });\n  }\n  /**\n   * ObjectTypeDefinition :\n   *   Description?\n   *   type Name ImplementsInterfaces? Directives[Const]? FieldsDefinition?\n   */\n\n  parseObjectTypeDefinition() {\n    const start = this._lexer.token;\n    const description = this.parseDescription();\n    this.expectKeyword('type');\n    const name = this.parseName();\n    const interfaces = this.parseImplementsInterfaces();\n    const directives = this.parseConstDirectives();\n    const fields = this.parseFieldsDefinition();\n    return this.node(start, {\n      kind: Kind.OBJECT_TYPE_DEFINITION,\n      description,\n      name,\n      interfaces,\n      directives,\n      fields,\n    });\n  }\n  /**\n   * ImplementsInterfaces :\n   *   - implements `&`? NamedType\n   *   - ImplementsInterfaces & NamedType\n   */\n\n  parseImplementsInterfaces() {\n    return this.expectOptionalKeyword('implements')\n      ? this.delimitedMany(TokenKind.AMP, this.parseNamedType)\n      : [];\n  }\n  /**\n   * ```\n   * FieldsDefinition : { FieldDefinition+ }\n   * ```\n   */\n\n  parseFieldsDefinition() {\n    return this.optionalMany(\n      TokenKind.BRACE_L,\n      this.parseFieldDefinition,\n      TokenKind.BRACE_R,\n    );\n  }\n  /**\n   * FieldDefinition :\n   *   - Description? Name ArgumentsDefinition? : Type Directives[Const]?\n   */\n\n  parseFieldDefinition() {\n    const start = this._lexer.token;\n    const description = this.parseDescription();\n    const name = this.parseName();\n    const args = this.parseArgumentDefs();\n    this.expectToken(TokenKind.COLON);\n    const type = this.parseTypeReference();\n    const directives = this.parseConstDirectives();\n    return this.node(start, {\n      kind: Kind.FIELD_DEFINITION,\n      description,\n      name,\n      arguments: args,\n      type,\n      directives,\n    });\n  }\n  /**\n   * ArgumentsDefinition : ( InputValueDefinition+ )\n   */\n\n  parseArgumentDefs() {\n    return this.optionalMany(\n      TokenKind.PAREN_L,\n      this.parseInputValueDef,\n      TokenKind.PAREN_R,\n    );\n  }\n  /**\n   * InputValueDefinition :\n   *   - Description? Name : Type DefaultValue? Directives[Const]?\n   */\n\n  parseInputValueDef() {\n    const start = this._lexer.token;\n    const description = this.parseDescription();\n    const name = this.parseName();\n    this.expectToken(TokenKind.COLON);\n    const type = this.parseTypeReference();\n    let defaultValue;\n\n    if (this.expectOptionalToken(TokenKind.EQUALS)) {\n      defaultValue = this.parseConstValueLiteral();\n    }\n\n    const directives = this.parseConstDirectives();\n    return this.node(start, {\n      kind: Kind.INPUT_VALUE_DEFINITION,\n      description,\n      name,\n      type,\n      defaultValue,\n      directives,\n    });\n  }\n  /**\n   * InterfaceTypeDefinition :\n   *   - Description? interface Name Directives[Const]? FieldsDefinition?\n   */\n\n  parseInterfaceTypeDefinition() {\n    const start = this._lexer.token;\n    const description = this.parseDescription();\n    this.expectKeyword('interface');\n    const name = this.parseName();\n    const interfaces = this.parseImplementsInterfaces();\n    const directives = this.parseConstDirectives();\n    const fields = this.parseFieldsDefinition();\n    return this.node(start, {\n      kind: Kind.INTERFACE_TYPE_DEFINITION,\n      description,\n      name,\n      interfaces,\n      directives,\n      fields,\n    });\n  }\n  /**\n   * UnionTypeDefinition :\n   *   - Description? union Name Directives[Const]? UnionMemberTypes?\n   */\n\n  parseUnionTypeDefinition() {\n    const start = this._lexer.token;\n    const description = this.parseDescription();\n    this.expectKeyword('union');\n    const name = this.parseName();\n    const directives = this.parseConstDirectives();\n    const types = this.parseUnionMemberTypes();\n    return this.node(start, {\n      kind: Kind.UNION_TYPE_DEFINITION,\n      description,\n      name,\n      directives,\n      types,\n    });\n  }\n  /**\n   * UnionMemberTypes :\n   *   - = `|`? NamedType\n   *   - UnionMemberTypes | NamedType\n   */\n\n  parseUnionMemberTypes() {\n    return this.expectOptionalToken(TokenKind.EQUALS)\n      ? this.delimitedMany(TokenKind.PIPE, this.parseNamedType)\n      : [];\n  }\n  /**\n   * EnumTypeDefinition :\n   *   - Description? enum Name Directives[Const]? EnumValuesDefinition?\n   */\n\n  parseEnumTypeDefinition() {\n    const start = this._lexer.token;\n    const description = this.parseDescription();\n    this.expectKeyword('enum');\n    const name = this.parseName();\n    const directives = this.parseConstDirectives();\n    const values = this.parseEnumValuesDefinition();\n    return this.node(start, {\n      kind: Kind.ENUM_TYPE_DEFINITION,\n      description,\n      name,\n      directives,\n      values,\n    });\n  }\n  /**\n   * ```\n   * EnumValuesDefinition : { EnumValueDefinition+ }\n   * ```\n   */\n\n  parseEnumValuesDefinition() {\n    return this.optionalMany(\n      TokenKind.BRACE_L,\n      this.parseEnumValueDefinition,\n      TokenKind.BRACE_R,\n    );\n  }\n  /**\n   * EnumValueDefinition : Description? EnumValue Directives[Const]?\n   */\n\n  parseEnumValueDefinition() {\n    const start = this._lexer.token;\n    const description = this.parseDescription();\n    const name = this.parseEnumValueName();\n    const directives = this.parseConstDirectives();\n    return this.node(start, {\n      kind: Kind.ENUM_VALUE_DEFINITION,\n      description,\n      name,\n      directives,\n    });\n  }\n  /**\n   * EnumValue : Name but not `true`, `false` or `null`\n   */\n\n  parseEnumValueName() {\n    if (\n      this._lexer.token.value === 'true' ||\n      this._lexer.token.value === 'false' ||\n      this._lexer.token.value === 'null'\n    ) {\n      throw syntaxError(\n        this._lexer.source,\n        this._lexer.token.start,\n        `${getTokenDesc(\n          this._lexer.token,\n        )} is reserved and cannot be used for an enum value.`,\n      );\n    }\n\n    return this.parseName();\n  }\n  /**\n   * InputObjectTypeDefinition :\n   *   - Description? input Name Directives[Const]? InputFieldsDefinition?\n   */\n\n  parseInputObjectTypeDefinition() {\n    const start = this._lexer.token;\n    const description = this.parseDescription();\n    this.expectKeyword('input');\n    const name = this.parseName();\n    const directives = this.parseConstDirectives();\n    const fields = this.parseInputFieldsDefinition();\n    return this.node(start, {\n      kind: Kind.INPUT_OBJECT_TYPE_DEFINITION,\n      description,\n      name,\n      directives,\n      fields,\n    });\n  }\n  /**\n   * ```\n   * InputFieldsDefinition : { InputValueDefinition+ }\n   * ```\n   */\n\n  parseInputFieldsDefinition() {\n    return this.optionalMany(\n      TokenKind.BRACE_L,\n      this.parseInputValueDef,\n      TokenKind.BRACE_R,\n    );\n  }\n  /**\n   * TypeSystemExtension :\n   *   - SchemaExtension\n   *   - TypeExtension\n   *\n   * TypeExtension :\n   *   - ScalarTypeExtension\n   *   - ObjectTypeExtension\n   *   - InterfaceTypeExtension\n   *   - UnionTypeExtension\n   *   - EnumTypeExtension\n   *   - InputObjectTypeDefinition\n   */\n\n  parseTypeSystemExtension() {\n    const keywordToken = this._lexer.lookahead();\n\n    if (keywordToken.kind === TokenKind.NAME) {\n      switch (keywordToken.value) {\n        case 'schema':\n          return this.parseSchemaExtension();\n\n        case 'scalar':\n          return this.parseScalarTypeExtension();\n\n        case 'type':\n          return this.parseObjectTypeExtension();\n\n        case 'interface':\n          return this.parseInterfaceTypeExtension();\n\n        case 'union':\n          return this.parseUnionTypeExtension();\n\n        case 'enum':\n          return this.parseEnumTypeExtension();\n\n        case 'input':\n          return this.parseInputObjectTypeExtension();\n      }\n    }\n\n    throw this.unexpected(keywordToken);\n  }\n  /**\n   * ```\n   * SchemaExtension :\n   *  - extend schema Directives[Const]? { OperationTypeDefinition+ }\n   *  - extend schema Directives[Const]\n   * ```\n   */\n\n  parseSchemaExtension() {\n    const start = this._lexer.token;\n    this.expectKeyword('extend');\n    this.expectKeyword('schema');\n    const directives = this.parseConstDirectives();\n    const operationTypes = this.optionalMany(\n      TokenKind.BRACE_L,\n      this.parseOperationTypeDefinition,\n      TokenKind.BRACE_R,\n    );\n\n    if (directives.length === 0 && operationTypes.length === 0) {\n      throw this.unexpected();\n    }\n\n    return this.node(start, {\n      kind: Kind.SCHEMA_EXTENSION,\n      directives,\n      operationTypes,\n    });\n  }\n  /**\n   * ScalarTypeExtension :\n   *   - extend scalar Name Directives[Const]\n   */\n\n  parseScalarTypeExtension() {\n    const start = this._lexer.token;\n    this.expectKeyword('extend');\n    this.expectKeyword('scalar');\n    const name = this.parseName();\n    const directives = this.parseConstDirectives();\n\n    if (directives.length === 0) {\n      throw this.unexpected();\n    }\n\n    return this.node(start, {\n      kind: Kind.SCALAR_TYPE_EXTENSION,\n      name,\n      directives,\n    });\n  }\n  /**\n   * ObjectTypeExtension :\n   *  - extend type Name ImplementsInterfaces? Directives[Const]? FieldsDefinition\n   *  - extend type Name ImplementsInterfaces? Directives[Const]\n   *  - extend type Name ImplementsInterfaces\n   */\n\n  parseObjectTypeExtension() {\n    const start = this._lexer.token;\n    this.expectKeyword('extend');\n    this.expectKeyword('type');\n    const name = this.parseName();\n    const interfaces = this.parseImplementsInterfaces();\n    const directives = this.parseConstDirectives();\n    const fields = this.parseFieldsDefinition();\n\n    if (\n      interfaces.length === 0 &&\n      directives.length === 0 &&\n      fields.length === 0\n    ) {\n      throw this.unexpected();\n    }\n\n    return this.node(start, {\n      kind: Kind.OBJECT_TYPE_EXTENSION,\n      name,\n      interfaces,\n      directives,\n      fields,\n    });\n  }\n  /**\n   * InterfaceTypeExtension :\n   *  - extend interface Name ImplementsInterfaces? Directives[Const]? FieldsDefinition\n   *  - extend interface Name ImplementsInterfaces? Directives[Const]\n   *  - extend interface Name ImplementsInterfaces\n   */\n\n  parseInterfaceTypeExtension() {\n    const start = this._lexer.token;\n    this.expectKeyword('extend');\n    this.expectKeyword('interface');\n    const name = this.parseName();\n    const interfaces = this.parseImplementsInterfaces();\n    const directives = this.parseConstDirectives();\n    const fields = this.parseFieldsDefinition();\n\n    if (\n      interfaces.length === 0 &&\n      directives.length === 0 &&\n      fields.length === 0\n    ) {\n      throw this.unexpected();\n    }\n\n    return this.node(start, {\n      kind: Kind.INTERFACE_TYPE_EXTENSION,\n      name,\n      interfaces,\n      directives,\n      fields,\n    });\n  }\n  /**\n   * UnionTypeExtension :\n   *   - extend union Name Directives[Const]? UnionMemberTypes\n   *   - extend union Name Directives[Const]\n   */\n\n  parseUnionTypeExtension() {\n    const start = this._lexer.token;\n    this.expectKeyword('extend');\n    this.expectKeyword('union');\n    const name = this.parseName();\n    const directives = this.parseConstDirectives();\n    const types = this.parseUnionMemberTypes();\n\n    if (directives.length === 0 && types.length === 0) {\n      throw this.unexpected();\n    }\n\n    return this.node(start, {\n      kind: Kind.UNION_TYPE_EXTENSION,\n      name,\n      directives,\n      types,\n    });\n  }\n  /**\n   * EnumTypeExtension :\n   *   - extend enum Name Directives[Const]? EnumValuesDefinition\n   *   - extend enum Name Directives[Const]\n   */\n\n  parseEnumTypeExtension() {\n    const start = this._lexer.token;\n    this.expectKeyword('extend');\n    this.expectKeyword('enum');\n    const name = this.parseName();\n    const directives = this.parseConstDirectives();\n    const values = this.parseEnumValuesDefinition();\n\n    if (directives.length === 0 && values.length === 0) {\n      throw this.unexpected();\n    }\n\n    return this.node(start, {\n      kind: Kind.ENUM_TYPE_EXTENSION,\n      name,\n      directives,\n      values,\n    });\n  }\n  /**\n   * InputObjectTypeExtension :\n   *   - extend input Name Directives[Const]? InputFieldsDefinition\n   *   - extend input Name Directives[Const]\n   */\n\n  parseInputObjectTypeExtension() {\n    const start = this._lexer.token;\n    this.expectKeyword('extend');\n    this.expectKeyword('input');\n    const name = this.parseName();\n    const directives = this.parseConstDirectives();\n    const fields = this.parseInputFieldsDefinition();\n\n    if (directives.length === 0 && fields.length === 0) {\n      throw this.unexpected();\n    }\n\n    return this.node(start, {\n      kind: Kind.INPUT_OBJECT_TYPE_EXTENSION,\n      name,\n      directives,\n      fields,\n    });\n  }\n  /**\n   * ```\n   * DirectiveDefinition :\n   *   - Description? directive @ Name ArgumentsDefinition? `repeatable`? on DirectiveLocations\n   * ```\n   */\n\n  parseDirectiveDefinition() {\n    const start = this._lexer.token;\n    const description = this.parseDescription();\n    this.expectKeyword('directive');\n    this.expectToken(TokenKind.AT);\n    const name = this.parseName();\n    const args = this.parseArgumentDefs();\n    const repeatable = this.expectOptionalKeyword('repeatable');\n    this.expectKeyword('on');\n    const locations = this.parseDirectiveLocations();\n    return this.node(start, {\n      kind: Kind.DIRECTIVE_DEFINITION,\n      description,\n      name,\n      arguments: args,\n      repeatable,\n      locations,\n    });\n  }\n  /**\n   * DirectiveLocations :\n   *   - `|`? DirectiveLocation\n   *   - DirectiveLocations | DirectiveLocation\n   */\n\n  parseDirectiveLocations() {\n    return this.delimitedMany(TokenKind.PIPE, this.parseDirectiveLocation);\n  }\n  /*\n   * DirectiveLocation :\n   *   - ExecutableDirectiveLocation\n   *   - TypeSystemDirectiveLocation\n   *\n   * ExecutableDirectiveLocation : one of\n   *   `QUERY`\n   *   `MUTATION`\n   *   `SUBSCRIPTION`\n   *   `FIELD`\n   *   `FRAGMENT_DEFINITION`\n   *   `FRAGMENT_SPREAD`\n   *   `INLINE_FRAGMENT`\n   *\n   * TypeSystemDirectiveLocation : one of\n   *   `SCHEMA`\n   *   `SCALAR`\n   *   `OBJECT`\n   *   `FIELD_DEFINITION`\n   *   `ARGUMENT_DEFINITION`\n   *   `INTERFACE`\n   *   `UNION`\n   *   `ENUM`\n   *   `ENUM_VALUE`\n   *   `INPUT_OBJECT`\n   *   `INPUT_FIELD_DEFINITION`\n   */\n\n  parseDirectiveLocation() {\n    const start = this._lexer.token;\n    const name = this.parseName();\n\n    if (Object.prototype.hasOwnProperty.call(DirectiveLocation, name.value)) {\n      return name;\n    }\n\n    throw this.unexpected(start);\n  } // Core parsing utility functions\n\n  /**\n   * Returns a node that, if configured to do so, sets a \"loc\" field as a\n   * location object, used to identify the place in the source that created a\n   * given parsed object.\n   */\n\n  node(startToken, node) {\n    if (this._options.noLocation !== true) {\n      node.loc = new Location(\n        startToken,\n        this._lexer.lastToken,\n        this._lexer.source,\n      );\n    }\n\n    return node;\n  }\n  /**\n   * Determines if the next token is of a given kind\n   */\n\n  peek(kind) {\n    return this._lexer.token.kind === kind;\n  }\n  /**\n   * If the next token is of the given kind, return that token after advancing the lexer.\n   * Otherwise, do not change the parser state and throw an error.\n   */\n\n  expectToken(kind) {\n    const token = this._lexer.token;\n\n    if (token.kind === kind) {\n      this.advanceLexer();\n      return token;\n    }\n\n    throw syntaxError(\n      this._lexer.source,\n      token.start,\n      `Expected ${getTokenKindDesc(kind)}, found ${getTokenDesc(token)}.`,\n    );\n  }\n  /**\n   * If the next token is of the given kind, return \"true\" after advancing the lexer.\n   * Otherwise, do not change the parser state and return \"false\".\n   */\n\n  expectOptionalToken(kind) {\n    const token = this._lexer.token;\n\n    if (token.kind === kind) {\n      this.advanceLexer();\n      return true;\n    }\n\n    return false;\n  }\n  /**\n   * If the next token is a given keyword, advance the lexer.\n   * Otherwise, do not change the parser state and throw an error.\n   */\n\n  expectKeyword(value) {\n    const token = this._lexer.token;\n\n    if (token.kind === TokenKind.NAME && token.value === value) {\n      this.advanceLexer();\n    } else {\n      throw syntaxError(\n        this._lexer.source,\n        token.start,\n        `Expected \"${value}\", found ${getTokenDesc(token)}.`,\n      );\n    }\n  }\n  /**\n   * If the next token is a given keyword, return \"true\" after advancing the lexer.\n   * Otherwise, do not change the parser state and return \"false\".\n   */\n\n  expectOptionalKeyword(value) {\n    const token = this._lexer.token;\n\n    if (token.kind === TokenKind.NAME && token.value === value) {\n      this.advanceLexer();\n      return true;\n    }\n\n    return false;\n  }\n  /**\n   * Helper function for creating an error when an unexpected lexed token is encountered.\n   */\n\n  unexpected(atToken) {\n    const token =\n      atToken !== null && atToken !== void 0 ? atToken : this._lexer.token;\n    return syntaxError(\n      this._lexer.source,\n      token.start,\n      `Unexpected ${getTokenDesc(token)}.`,\n    );\n  }\n  /**\n   * Returns a possibly empty list of parse nodes, determined by the parseFn.\n   * This list begins with a lex token of openKind and ends with a lex token of closeKind.\n   * Advances the parser to the next lex token after the closing token.\n   */\n\n  any(openKind, parseFn, closeKind) {\n    this.expectToken(openKind);\n    const nodes = [];\n\n    while (!this.expectOptionalToken(closeKind)) {\n      nodes.push(parseFn.call(this));\n    }\n\n    return nodes;\n  }\n  /**\n   * Returns a list of parse nodes, determined by the parseFn.\n   * It can be empty only if open token is missing otherwise it will always return non-empty list\n   * that begins with a lex token of openKind and ends with a lex token of closeKind.\n   * Advances the parser to the next lex token after the closing token.\n   */\n\n  optionalMany(openKind, parseFn, closeKind) {\n    if (this.expectOptionalToken(openKind)) {\n      const nodes = [];\n\n      do {\n        nodes.push(parseFn.call(this));\n      } while (!this.expectOptionalToken(closeKind));\n\n      return nodes;\n    }\n\n    return [];\n  }\n  /**\n   * Returns a non-empty list of parse nodes, determined by the parseFn.\n   * This list begins with a lex token of openKind and ends with a lex token of closeKind.\n   * Advances the parser to the next lex token after the closing token.\n   */\n\n  many(openKind, parseFn, closeKind) {\n    this.expectToken(openKind);\n    const nodes = [];\n\n    do {\n      nodes.push(parseFn.call(this));\n    } while (!this.expectOptionalToken(closeKind));\n\n    return nodes;\n  }\n  /**\n   * Returns a non-empty list of parse nodes, determined by the parseFn.\n   * This list may begin with a lex token of delimiterKind followed by items separated by lex tokens of tokenKind.\n   * Advances the parser to the next lex token after last item in the list.\n   */\n\n  delimitedMany(delimiterKind, parseFn) {\n    this.expectOptionalToken(delimiterKind);\n    const nodes = [];\n\n    do {\n      nodes.push(parseFn.call(this));\n    } while (this.expectOptionalToken(delimiterKind));\n\n    return nodes;\n  }\n\n  advanceLexer() {\n    const { maxTokens } = this._options;\n\n    const token = this._lexer.advance();\n\n    if (maxTokens !== undefined && token.kind !== TokenKind.EOF) {\n      ++this._tokenCounter;\n\n      if (this._tokenCounter > maxTokens) {\n        throw syntaxError(\n          this._lexer.source,\n          token.start,\n          `Document contains more that ${maxTokens} tokens. Parsing aborted.`,\n        );\n      }\n    }\n  }\n}\n/**\n * A helper function to describe a token as a string for debugging.\n */\n\nfunction getTokenDesc(token) {\n  const value = token.value;\n  return getTokenKindDesc(token.kind) + (value != null ? ` \"${value}\"` : '');\n}\n/**\n * A helper function to describe a token kind as a string for debugging.\n */\n\nfunction getTokenKindDesc(kind) {\n  return isPunctuatorTokenKind(kind) ? `\"${kind}\"` : kind;\n}\n", "import { GraphQLError } from './GraphQLError.mjs';\n/**\n * Produces a GraphQLError representing a syntax error, containing useful\n * descriptive information about the syntax error's position in the source.\n */\n\nexport function syntaxError(source, position, description) {\n  return new GraphQLError(`Syntax Error: ${description}`, {\n    source,\n    positions: [position],\n  });\n}\n", "import { isObjectLike } from '../jsutils/isObjectLike.mjs';\nimport { getLocation } from '../language/location.mjs';\nimport {\n  printLocation,\n  printSourceLocation,\n} from '../language/printLocation.mjs';\n\nfunction toNormalizedOptions(args) {\n  const firstArg = args[0];\n\n  if (firstArg == null || 'kind' in firstArg || 'length' in firstArg) {\n    return {\n      nodes: firstArg,\n      source: args[1],\n      positions: args[2],\n      path: args[3],\n      originalError: args[4],\n      extensions: args[5],\n    };\n  }\n\n  return firstArg;\n}\n/**\n * A GraphQLError describes an Error found during the parse, validate, or\n * execute phases of performing a GraphQL operation. In addition to a message\n * and stack trace, it also includes information about the locations in a\n * GraphQL document and/or execution result that correspond to the Error.\n */\n\nexport class GraphQLError extends Error {\n  /**\n   * An array of `{ line, column }` locations within the source GraphQL document\n   * which correspond to this error.\n   *\n   * Errors during validation often contain multiple locations, for example to\n   * point out two things with the same name. Errors during execution include a\n   * single location, the field which produced the error.\n   *\n   * Enumerable, and appears in the result of JSON.stringify().\n   */\n\n  /**\n   * An array describing the JSON-path into the execution response which\n   * corresponds to this error. Only included for errors during execution.\n   *\n   * Enumerable, and appears in the result of JSON.stringify().\n   */\n\n  /**\n   * An array of GraphQL AST Nodes corresponding to this error.\n   */\n\n  /**\n   * The source GraphQL document for the first location of this error.\n   *\n   * Note that if this Error represents more than one node, the source may not\n   * represent nodes after the first node.\n   */\n\n  /**\n   * An array of character offsets within the source GraphQL document\n   * which correspond to this error.\n   */\n\n  /**\n   * The original error thrown from a field resolver during execution.\n   */\n\n  /**\n   * Extension fields to add to the formatted error.\n   */\n\n  /**\n   * @deprecated Please use the `GraphQLErrorOptions` constructor overload instead.\n   */\n  constructor(message, ...rawArgs) {\n    var _this$nodes, _nodeLocations$, _ref;\n\n    const { nodes, source, positions, path, originalError, extensions } =\n      toNormalizedOptions(rawArgs);\n    super(message);\n    this.name = 'GraphQLError';\n    this.path = path !== null && path !== void 0 ? path : undefined;\n    this.originalError =\n      originalError !== null && originalError !== void 0\n        ? originalError\n        : undefined; // Compute list of blame nodes.\n\n    this.nodes = undefinedIfEmpty(\n      Array.isArray(nodes) ? nodes : nodes ? [nodes] : undefined,\n    );\n    const nodeLocations = undefinedIfEmpty(\n      (_this$nodes = this.nodes) === null || _this$nodes === void 0\n        ? void 0\n        : _this$nodes.map((node) => node.loc).filter((loc) => loc != null),\n    ); // Compute locations in the source for the given nodes/positions.\n\n    this.source =\n      source !== null && source !== void 0\n        ? source\n        : nodeLocations === null || nodeLocations === void 0\n        ? void 0\n        : (_nodeLocations$ = nodeLocations[0]) === null ||\n          _nodeLocations$ === void 0\n        ? void 0\n        : _nodeLocations$.source;\n    this.positions =\n      positions !== null && positions !== void 0\n        ? positions\n        : nodeLocations === null || nodeLocations === void 0\n        ? void 0\n        : nodeLocations.map((loc) => loc.start);\n    this.locations =\n      positions && source\n        ? positions.map((pos) => getLocation(source, pos))\n        : nodeLocations === null || nodeLocations === void 0\n        ? void 0\n        : nodeLocations.map((loc) => getLocation(loc.source, loc.start));\n    const originalExtensions = isObjectLike(\n      originalError === null || originalError === void 0\n        ? void 0\n        : originalError.extensions,\n    )\n      ? originalError === null || originalError === void 0\n        ? void 0\n        : originalError.extensions\n      : undefined;\n    this.extensions =\n      (_ref =\n        extensions !== null && extensions !== void 0\n          ? extensions\n          : originalExtensions) !== null && _ref !== void 0\n        ? _ref\n        : Object.create(null); // Only properties prescribed by the spec should be enumerable.\n    // Keep the rest as non-enumerable.\n\n    Object.defineProperties(this, {\n      message: {\n        writable: true,\n        enumerable: true,\n      },\n      name: {\n        enumerable: false,\n      },\n      nodes: {\n        enumerable: false,\n      },\n      source: {\n        enumerable: false,\n      },\n      positions: {\n        enumerable: false,\n      },\n      originalError: {\n        enumerable: false,\n      },\n    }); // Include (non-enumerable) stack trace.\n\n    /* c8 ignore start */\n    // FIXME: https://github.com/graphql/graphql-js/issues/2317\n\n    if (\n      originalError !== null &&\n      originalError !== void 0 &&\n      originalError.stack\n    ) {\n      Object.defineProperty(this, 'stack', {\n        value: originalError.stack,\n        writable: true,\n        configurable: true,\n      });\n    } else if (Error.captureStackTrace) {\n      Error.captureStackTrace(this, GraphQLError);\n    } else {\n      Object.defineProperty(this, 'stack', {\n        value: Error().stack,\n        writable: true,\n        configurable: true,\n      });\n    }\n    /* c8 ignore stop */\n  }\n\n  get [Symbol.toStringTag]() {\n    return 'GraphQLError';\n  }\n\n  toString() {\n    let output = this.message;\n\n    if (this.nodes) {\n      for (const node of this.nodes) {\n        if (node.loc) {\n          output += '\\n\\n' + printLocation(node.loc);\n        }\n      }\n    } else if (this.source && this.locations) {\n      for (const location of this.locations) {\n        output += '\\n\\n' + printSourceLocation(this.source, location);\n      }\n    }\n\n    return output;\n  }\n\n  toJSON() {\n    const formattedError = {\n      message: this.message,\n    };\n\n    if (this.locations != null) {\n      formattedError.locations = this.locations;\n    }\n\n    if (this.path != null) {\n      formattedError.path = this.path;\n    }\n\n    if (this.extensions != null && Object.keys(this.extensions).length > 0) {\n      formattedError.extensions = this.extensions;\n    }\n\n    return formattedError;\n  }\n}\n\nfunction undefinedIfEmpty(array) {\n  return array === undefined || array.length === 0 ? undefined : array;\n}\n/**\n * See: https://spec.graphql.org/draft/#sec-Errors\n */\n\n/**\n * Prints a GraphQLError to a string, representing useful location information\n * about the error's position in the source.\n *\n * @deprecated Please use `error.toString` instead. Will be removed in v17\n */\nexport function printError(error) {\n  return error.toString();\n}\n/**\n * Given a GraphQLError, format it according to the rules described by the\n * Response Format, Errors section of the GraphQL Specification.\n *\n * @deprecated Please use `error.toJSON` instead. Will be removed in v17\n */\n\nexport function formatError(error) {\n  return error.toJSON();\n}\n", "/**\n * Return true if `value` is object-like. A value is object-like if it's not\n * `null` and has a `typeof` result of \"object\".\n */\nexport function isObjectLike(value) {\n  return typeof value == 'object' && value !== null;\n}\n", "import { invariant } from '../jsutils/invariant.mjs';\nconst LineRegExp = /\\r\\n|[\\n\\r]/g;\n/**\n * Represents a location in a Source.\n */\n\n/**\n * Takes a Source and a UTF-8 character offset, and returns the corresponding\n * line and column as a SourceLocation.\n */\nexport function getLocation(source, position) {\n  let lastLineStart = 0;\n  let line = 1;\n\n  for (const match of source.body.matchAll(LineRegExp)) {\n    typeof match.index === 'number' || invariant(false);\n\n    if (match.index >= position) {\n      break;\n    }\n\n    lastLineStart = match.index + match[0].length;\n    line += 1;\n  }\n\n  return {\n    line,\n    column: position + 1 - lastLineStart,\n  };\n}\n", "export function invariant(condition, message) {\n  const booleanCondition = Boolean(condition);\n\n  if (!booleanCondition) {\n    throw new Error(\n      message != null ? message : 'Unexpected invariant triggered.',\n    );\n  }\n}\n", "import { getLocation } from './location.mjs';\n\n/**\n * Render a helpful description of the location in the GraphQL Source document.\n */\nexport function printLocation(location) {\n  return printSourceLocation(\n    location.source,\n    getLocation(location.source, location.start),\n  );\n}\n/**\n * Render a helpful description of the location in the GraphQL Source document.\n */\n\nexport function printSourceLocation(source, sourceLocation) {\n  const firstLineColumnOffset = source.locationOffset.column - 1;\n  const body = ''.padStart(firstLineColumnOffset) + source.body;\n  const lineIndex = sourceLocation.line - 1;\n  const lineOffset = source.locationOffset.line - 1;\n  const lineNum = sourceLocation.line + lineOffset;\n  const columnOffset = sourceLocation.line === 1 ? firstLineColumnOffset : 0;\n  const columnNum = sourceLocation.column + columnOffset;\n  const locationStr = `${source.name}:${lineNum}:${columnNum}\\n`;\n  const lines = body.split(/\\r\\n|[\\n\\r]/g);\n  const locationLine = lines[lineIndex]; // Special case for minified documents\n\n  if (locationLine.length > 120) {\n    const subLineIndex = Math.floor(columnNum / 80);\n    const subLineColumnNum = columnNum % 80;\n    const subLines = [];\n\n    for (let i = 0; i < locationLine.length; i += 80) {\n      subLines.push(locationLine.slice(i, i + 80));\n    }\n\n    return (\n      locationStr +\n      printPrefixedLines([\n        [`${lineNum} |`, subLines[0]],\n        ...subLines.slice(1, subLineIndex + 1).map((subLine) => ['|', subLine]),\n        ['|', '^'.padStart(subLineColumnNum)],\n        ['|', subLines[subLineIndex + 1]],\n      ])\n    );\n  }\n\n  return (\n    locationStr +\n    printPrefixedLines([\n      // Lines specified like this: [\"prefix\", \"string\"],\n      [`${lineNum - 1} |`, lines[lineIndex - 1]],\n      [`${lineNum} |`, locationLine],\n      ['|', '^'.padStart(columnNum)],\n      [`${lineNum + 1} |`, lines[lineIndex + 1]],\n    ])\n  );\n}\n\nfunction printPrefixedLines(lines) {\n  const existingLines = lines.filter(([_, line]) => line !== undefined);\n  const padLen = Math.max(...existingLines.map(([prefix]) => prefix.length));\n  return existingLines\n    .map(([prefix, line]) => prefix.padStart(padLen) + (line ? ' ' + line : ''))\n    .join('\\n');\n}\n", "/**\n * Contains a range of UTF-8 character offsets and token references that\n * identify the region of the source from which the AST derived.\n */\nexport class Location {\n  /**\n   * The character offset at which this Node begins.\n   */\n\n  /**\n   * The character offset at which this Node ends.\n   */\n\n  /**\n   * The Token at which this Node begins.\n   */\n\n  /**\n   * The Token at which this Node ends.\n   */\n\n  /**\n   * The Source document the AST represents.\n   */\n  constructor(startToken, endToken, source) {\n    this.start = startToken.start;\n    this.end = endToken.end;\n    this.startToken = startToken;\n    this.endToken = endToken;\n    this.source = source;\n  }\n\n  get [Symbol.toStringTag]() {\n    return 'Location';\n  }\n\n  toJSON() {\n    return {\n      start: this.start,\n      end: this.end,\n    };\n  }\n}\n/**\n * Represents a range of characters represented by a lexical token\n * within a Source.\n */\n\nexport class Token {\n  /**\n   * The kind of Token.\n   */\n\n  /**\n   * The character offset at which this Node begins.\n   */\n\n  /**\n   * The character offset at which this Node ends.\n   */\n\n  /**\n   * The 1-indexed line number on which this Token appears.\n   */\n\n  /**\n   * The 1-indexed column number at which this Token begins.\n   */\n\n  /**\n   * For non-punctuation tokens, represents the interpreted value of the token.\n   *\n   * Note: is undefined for punctuation tokens, but typed as string for\n   * convenience in the parser.\n   */\n\n  /**\n   * Tokens exist as nodes in a double-linked-list amongst all tokens\n   * including ignored tokens. <SOF> is always the first node and <EOF>\n   * the last.\n   */\n  constructor(kind, start, end, line, column, value) {\n    this.kind = kind;\n    this.start = start;\n    this.end = end;\n    this.line = line;\n    this.column = column; // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\n    this.value = value;\n    this.prev = null;\n    this.next = null;\n  }\n\n  get [Symbol.toStringTag]() {\n    return 'Token';\n  }\n\n  toJSON() {\n    return {\n      kind: this.kind,\n      value: this.value,\n      line: this.line,\n      column: this.column,\n    };\n  }\n}\n/**\n * The list of all possible AST node types.\n */\n\n/**\n * @internal\n */\nexport const QueryDocumentKeys = {\n  Name: [],\n  Document: ['definitions'],\n  OperationDefinition: [\n    'name',\n    'variableDefinitions',\n    'directives',\n    'selectionSet',\n  ],\n  VariableDefinition: ['variable', 'type', 'defaultValue', 'directives'],\n  Variable: ['name'],\n  SelectionSet: ['selections'],\n  Field: ['alias', 'name', 'arguments', 'directives', 'selectionSet'],\n  Argument: ['name', 'value'],\n  FragmentSpread: ['name', 'directives'],\n  InlineFragment: ['typeCondition', 'directives', 'selectionSet'],\n  FragmentDefinition: [\n    'name', // Note: fragment variable definitions are deprecated and will removed in v17.0.0\n    'variableDefinitions',\n    'typeCondition',\n    'directives',\n    'selectionSet',\n  ],\n  IntValue: [],\n  FloatValue: [],\n  StringValue: [],\n  BooleanValue: [],\n  NullValue: [],\n  EnumValue: [],\n  ListValue: ['values'],\n  ObjectValue: ['fields'],\n  ObjectField: ['name', 'value'],\n  Directive: ['name', 'arguments'],\n  NamedType: ['name'],\n  ListType: ['type'],\n  NonNullType: ['type'],\n  SchemaDefinition: ['description', 'directives', 'operationTypes'],\n  OperationTypeDefinition: ['type'],\n  ScalarTypeDefinition: ['description', 'name', 'directives'],\n  ObjectTypeDefinition: [\n    'description',\n    'name',\n    'interfaces',\n    'directives',\n    'fields',\n  ],\n  FieldDefinition: ['description', 'name', 'arguments', 'type', 'directives'],\n  InputValueDefinition: [\n    'description',\n    'name',\n    'type',\n    'defaultValue',\n    'directives',\n  ],\n  InterfaceTypeDefinition: [\n    'description',\n    'name',\n    'interfaces',\n    'directives',\n    'fields',\n  ],\n  UnionTypeDefinition: ['description', 'name', 'directives', 'types'],\n  EnumTypeDefinition: ['description', 'name', 'directives', 'values'],\n  EnumValueDefinition: ['description', 'name', 'directives'],\n  InputObjectTypeDefinition: ['description', 'name', 'directives', 'fields'],\n  DirectiveDefinition: ['description', 'name', 'arguments', 'locations'],\n  SchemaExtension: ['directives', 'operationTypes'],\n  ScalarTypeExtension: ['name', 'directives'],\n  ObjectTypeExtension: ['name', 'interfaces', 'directives', 'fields'],\n  InterfaceTypeExtension: ['name', 'interfaces', 'directives', 'fields'],\n  UnionTypeExtension: ['name', 'directives', 'types'],\n  EnumTypeExtension: ['name', 'directives', 'values'],\n  InputObjectTypeExtension: ['name', 'directives', 'fields'],\n};\nconst kindValues = new Set(Object.keys(QueryDocumentKeys));\n/**\n * @internal\n */\n\nexport function isNode(maybeNode) {\n  const maybeKind =\n    maybeNode === null || maybeNode === void 0 ? void 0 : maybeNode.kind;\n  return typeof maybeKind === 'string' && kindValues.has(maybeKind);\n}\n/** Name */\n\nvar OperationTypeNode;\n\n(function (OperationTypeNode) {\n  OperationTypeNode['QUERY'] = 'query';\n  OperationTypeNode['MUTATION'] = 'mutation';\n  OperationTypeNode['SUBSCRIPTION'] = 'subscription';\n})(OperationTypeNode || (OperationTypeNode = {}));\n\nexport { OperationTypeNode };\n", "/**\n * The set of allowed directive location values.\n */\nvar DirectiveLocation;\n\n(function (DirectiveLocation) {\n  DirectiveLocation['QUERY'] = 'QUERY';\n  DirectiveLocation['MUTATION'] = 'MUTATION';\n  DirectiveLocation['SUBSCRIPTION'] = 'SUBSCRIPTION';\n  DirectiveLocation['FIELD'] = 'FIELD';\n  DirectiveLocation['FRAGMENT_DEFINITION'] = 'FRAGMENT_DEFINITION';\n  DirectiveLocation['FRAGMENT_SPREAD'] = 'FRAGMENT_SPREAD';\n  DirectiveLocation['INLINE_FRAGMENT'] = 'INLINE_FRAGMENT';\n  DirectiveLocation['VARIABLE_DEFINITION'] = 'VARIABLE_DEFINITION';\n  DirectiveLocation['SCHEMA'] = 'SCHEMA';\n  DirectiveLocation['SCALAR'] = 'SCALAR';\n  DirectiveLocation['OBJECT'] = 'OBJECT';\n  DirectiveLocation['FIELD_DEFINITION'] = 'FIELD_DEFINITION';\n  DirectiveLocation['ARGUMENT_DEFINITION'] = 'ARGUMENT_DEFINITION';\n  DirectiveLocation['INTERFACE'] = 'INTERFACE';\n  DirectiveLocation['UNION'] = 'UNION';\n  DirectiveLocation['ENUM'] = 'ENUM';\n  DirectiveLocation['ENUM_VALUE'] = 'ENUM_VALUE';\n  DirectiveLocation['INPUT_OBJECT'] = 'INPUT_OBJECT';\n  DirectiveLocation['INPUT_FIELD_DEFINITION'] = 'INPUT_FIELD_DEFINITION';\n})(DirectiveLocation || (DirectiveLocation = {}));\n\nexport { DirectiveLocation };\n/**\n * The enum type representing the directive location values.\n *\n * @deprecated Please use `DirectiveLocation`. Will be remove in v17.\n */\n", "/**\n * The set of allowed kind values for AST nodes.\n */\nvar Kind;\n\n(function (Kind) {\n  Kind['NAME'] = 'Name';\n  Kind['DOCUMENT'] = 'Document';\n  Kind['OPERATION_DEFINITION'] = 'OperationDefinition';\n  Kind['VARIABLE_DEFINITION'] = 'VariableDefinition';\n  Kind['SELECTION_SET'] = 'SelectionSet';\n  Kind['FIELD'] = 'Field';\n  Kind['ARGUMENT'] = 'Argument';\n  Kind['FRAGMENT_SPREAD'] = 'FragmentSpread';\n  Kind['INLINE_FRAGMENT'] = 'InlineFragment';\n  Kind['FRAGMENT_DEFINITION'] = 'FragmentDefinition';\n  Kind['VARIABLE'] = 'Variable';\n  Kind['INT'] = 'IntValue';\n  Kind['FLOAT'] = 'FloatValue';\n  Kind['STRING'] = 'StringValue';\n  Kind['BOOLEAN'] = 'BooleanValue';\n  Kind['NULL'] = 'NullValue';\n  Kind['ENUM'] = 'EnumValue';\n  Kind['LIST'] = 'ListValue';\n  Kind['OBJECT'] = 'ObjectValue';\n  Kind['OBJECT_FIELD'] = 'ObjectField';\n  Kind['DIRECTIVE'] = 'Directive';\n  Kind['NAMED_TYPE'] = 'NamedType';\n  Kind['LIST_TYPE'] = 'ListType';\n  Kind['NON_NULL_TYPE'] = 'NonNullType';\n  Kind['SCHEMA_DEFINITION'] = 'SchemaDefinition';\n  Kind['OPERATION_TYPE_DEFINITION'] = 'OperationTypeDefinition';\n  Kind['SCALAR_TYPE_DEFINITION'] = 'ScalarTypeDefinition';\n  Kind['OBJECT_TYPE_DEFINITION'] = 'ObjectTypeDefinition';\n  Kind['FIELD_DEFINITION'] = 'FieldDefinition';\n  Kind['INPUT_VALUE_DEFINITION'] = 'InputValueDefinition';\n  Kind['INTERFACE_TYPE_DEFINITION'] = 'InterfaceTypeDefinition';\n  Kind['UNION_TYPE_DEFINITION'] = 'UnionTypeDefinition';\n  Kind['ENUM_TYPE_DEFINITION'] = 'EnumTypeDefinition';\n  Kind['ENUM_VALUE_DEFINITION'] = 'EnumValueDefinition';\n  Kind['INPUT_OBJECT_TYPE_DEFINITION'] = 'InputObjectTypeDefinition';\n  Kind['DIRECTIVE_DEFINITION'] = 'DirectiveDefinition';\n  Kind['SCHEMA_EXTENSION'] = 'SchemaExtension';\n  Kind['SCALAR_TYPE_EXTENSION'] = 'ScalarTypeExtension';\n  Kind['OBJECT_TYPE_EXTENSION'] = 'ObjectTypeExtension';\n  Kind['INTERFACE_TYPE_EXTENSION'] = 'InterfaceTypeExtension';\n  Kind['UNION_TYPE_EXTENSION'] = 'UnionTypeExtension';\n  Kind['ENUM_TYPE_EXTENSION'] = 'EnumTypeExtension';\n  Kind['INPUT_OBJECT_TYPE_EXTENSION'] = 'InputObjectTypeExtension';\n})(Kind || (Kind = {}));\n\nexport { Kind };\n/**\n * The enum type representing the possible kind values of AST nodes.\n *\n * @deprecated Please use `Kind`. Will be remove in v17.\n */\n", "import { syntaxError } from '../error/syntaxError.mjs';\nimport { Token } from './ast.mjs';\nimport { dedentBlockStringLines } from './blockString.mjs';\nimport { isDigit, isNameContinue, isNameStart } from './characterClasses.mjs';\nimport { TokenKind } from './tokenKind.mjs';\n/**\n * Given a Source object, creates a Lexer for that source.\n * A Lexer is a stateful stream generator in that every time\n * it is advanced, it returns the next token in the Source. Assuming the\n * source lexes, the final Token emitted by the lexer will be of kind\n * EOF, after which the lexer will repeatedly return the same EOF token\n * whenever called.\n */\n\nexport class Lexer {\n  /**\n   * The previously focused non-ignored token.\n   */\n\n  /**\n   * The currently focused non-ignored token.\n   */\n\n  /**\n   * The (1-indexed) line containing the current token.\n   */\n\n  /**\n   * The character offset at which the current line begins.\n   */\n  constructor(source) {\n    const startOfFileToken = new Token(TokenKind.SOF, 0, 0, 0, 0);\n    this.source = source;\n    this.lastToken = startOfFileToken;\n    this.token = startOfFileToken;\n    this.line = 1;\n    this.lineStart = 0;\n  }\n\n  get [Symbol.toStringTag]() {\n    return 'Lexer';\n  }\n  /**\n   * Advances the token stream to the next non-ignored token.\n   */\n\n  advance() {\n    this.lastToken = this.token;\n    const token = (this.token = this.lookahead());\n    return token;\n  }\n  /**\n   * Looks ahead and returns the next non-ignored token, but does not change\n   * the state of Lexer.\n   */\n\n  lookahead() {\n    let token = this.token;\n\n    if (token.kind !== TokenKind.EOF) {\n      do {\n        if (token.next) {\n          token = token.next;\n        } else {\n          // Read the next token and form a link in the token linked-list.\n          const nextToken = readNextToken(this, token.end); // @ts-expect-error next is only mutable during parsing.\n\n          token.next = nextToken; // @ts-expect-error prev is only mutable during parsing.\n\n          nextToken.prev = token;\n          token = nextToken;\n        }\n      } while (token.kind === TokenKind.COMMENT);\n    }\n\n    return token;\n  }\n}\n/**\n * @internal\n */\n\nexport function isPunctuatorTokenKind(kind) {\n  return (\n    kind === TokenKind.BANG ||\n    kind === TokenKind.DOLLAR ||\n    kind === TokenKind.AMP ||\n    kind === TokenKind.PAREN_L ||\n    kind === TokenKind.PAREN_R ||\n    kind === TokenKind.SPREAD ||\n    kind === TokenKind.COLON ||\n    kind === TokenKind.EQUALS ||\n    kind === TokenKind.AT ||\n    kind === TokenKind.BRACKET_L ||\n    kind === TokenKind.BRACKET_R ||\n    kind === TokenKind.BRACE_L ||\n    kind === TokenKind.PIPE ||\n    kind === TokenKind.BRACE_R\n  );\n}\n/**\n * A Unicode scalar value is any Unicode code point except surrogate code\n * points. In other words, the inclusive ranges of values 0x0000 to 0xD7FF and\n * 0xE000 to 0x10FFFF.\n *\n * SourceCharacter ::\n *   - \"Any Unicode scalar value\"\n */\n\nfunction isUnicodeScalarValue(code) {\n  return (\n    (code >= 0x0000 && code <= 0xd7ff) || (code >= 0xe000 && code <= 0x10ffff)\n  );\n}\n/**\n * The GraphQL specification defines source text as a sequence of unicode scalar\n * values (which Unicode defines to exclude surrogate code points). However\n * JavaScript defines strings as a sequence of UTF-16 code units which may\n * include surrogates. A surrogate pair is a valid source character as it\n * encodes a supplementary code point (above U+FFFF), but unpaired surrogate\n * code points are not valid source characters.\n */\n\nfunction isSupplementaryCodePoint(body, location) {\n  return (\n    isLeadingSurrogate(body.charCodeAt(location)) &&\n    isTrailingSurrogate(body.charCodeAt(location + 1))\n  );\n}\n\nfunction isLeadingSurrogate(code) {\n  return code >= 0xd800 && code <= 0xdbff;\n}\n\nfunction isTrailingSurrogate(code) {\n  return code >= 0xdc00 && code <= 0xdfff;\n}\n/**\n * Prints the code point (or end of file reference) at a given location in a\n * source for use in error messages.\n *\n * Printable ASCII is printed quoted, while other points are printed in Unicode\n * code point form (ie. U+1234).\n */\n\nfunction printCodePointAt(lexer, location) {\n  const code = lexer.source.body.codePointAt(location);\n\n  if (code === undefined) {\n    return TokenKind.EOF;\n  } else if (code >= 0x0020 && code <= 0x007e) {\n    // Printable ASCII\n    const char = String.fromCodePoint(code);\n    return char === '\"' ? \"'\\\"'\" : `\"${char}\"`;\n  } // Unicode code point\n\n  return 'U+' + code.toString(16).toUpperCase().padStart(4, '0');\n}\n/**\n * Create a token with line and column location information.\n */\n\nfunction createToken(lexer, kind, start, end, value) {\n  const line = lexer.line;\n  const col = 1 + start - lexer.lineStart;\n  return new Token(kind, start, end, line, col, value);\n}\n/**\n * Gets the next token from the source starting at the given position.\n *\n * This skips over whitespace until it finds the next lexable token, then lexes\n * punctuators immediately or calls the appropriate helper function for more\n * complicated tokens.\n */\n\nfunction readNextToken(lexer, start) {\n  const body = lexer.source.body;\n  const bodyLength = body.length;\n  let position = start;\n\n  while (position < bodyLength) {\n    const code = body.charCodeAt(position); // SourceCharacter\n\n    switch (code) {\n      // Ignored ::\n      //   - UnicodeBOM\n      //   - WhiteSpace\n      //   - LineTerminator\n      //   - Comment\n      //   - Comma\n      //\n      // UnicodeBOM :: \"Byte Order Mark (U+FEFF)\"\n      //\n      // WhiteSpace ::\n      //   - \"Horizontal Tab (U+0009)\"\n      //   - \"Space (U+0020)\"\n      //\n      // Comma :: ,\n      case 0xfeff: // <BOM>\n\n      case 0x0009: // \\t\n\n      case 0x0020: // <space>\n\n      case 0x002c:\n        // ,\n        ++position;\n        continue;\n      // LineTerminator ::\n      //   - \"New Line (U+000A)\"\n      //   - \"Carriage Return (U+000D)\" [lookahead != \"New Line (U+000A)\"]\n      //   - \"Carriage Return (U+000D)\" \"New Line (U+000A)\"\n\n      case 0x000a:\n        // \\n\n        ++position;\n        ++lexer.line;\n        lexer.lineStart = position;\n        continue;\n\n      case 0x000d:\n        // \\r\n        if (body.charCodeAt(position + 1) === 0x000a) {\n          position += 2;\n        } else {\n          ++position;\n        }\n\n        ++lexer.line;\n        lexer.lineStart = position;\n        continue;\n      // Comment\n\n      case 0x0023:\n        // #\n        return readComment(lexer, position);\n      // Token ::\n      //   - Punctuator\n      //   - Name\n      //   - IntValue\n      //   - FloatValue\n      //   - StringValue\n      //\n      // Punctuator :: one of ! $ & ( ) ... : = @ [ ] { | }\n\n      case 0x0021:\n        // !\n        return createToken(lexer, TokenKind.BANG, position, position + 1);\n\n      case 0x0024:\n        // $\n        return createToken(lexer, TokenKind.DOLLAR, position, position + 1);\n\n      case 0x0026:\n        // &\n        return createToken(lexer, TokenKind.AMP, position, position + 1);\n\n      case 0x0028:\n        // (\n        return createToken(lexer, TokenKind.PAREN_L, position, position + 1);\n\n      case 0x0029:\n        // )\n        return createToken(lexer, TokenKind.PAREN_R, position, position + 1);\n\n      case 0x002e:\n        // .\n        if (\n          body.charCodeAt(position + 1) === 0x002e &&\n          body.charCodeAt(position + 2) === 0x002e\n        ) {\n          return createToken(lexer, TokenKind.SPREAD, position, position + 3);\n        }\n\n        break;\n\n      case 0x003a:\n        // :\n        return createToken(lexer, TokenKind.COLON, position, position + 1);\n\n      case 0x003d:\n        // =\n        return createToken(lexer, TokenKind.EQUALS, position, position + 1);\n\n      case 0x0040:\n        // @\n        return createToken(lexer, TokenKind.AT, position, position + 1);\n\n      case 0x005b:\n        // [\n        return createToken(lexer, TokenKind.BRACKET_L, position, position + 1);\n\n      case 0x005d:\n        // ]\n        return createToken(lexer, TokenKind.BRACKET_R, position, position + 1);\n\n      case 0x007b:\n        // {\n        return createToken(lexer, TokenKind.BRACE_L, position, position + 1);\n\n      case 0x007c:\n        // |\n        return createToken(lexer, TokenKind.PIPE, position, position + 1);\n\n      case 0x007d:\n        // }\n        return createToken(lexer, TokenKind.BRACE_R, position, position + 1);\n      // StringValue\n\n      case 0x0022:\n        // \"\n        if (\n          body.charCodeAt(position + 1) === 0x0022 &&\n          body.charCodeAt(position + 2) === 0x0022\n        ) {\n          return readBlockString(lexer, position);\n        }\n\n        return readString(lexer, position);\n    } // IntValue | FloatValue (Digit | -)\n\n    if (isDigit(code) || code === 0x002d) {\n      return readNumber(lexer, position, code);\n    } // Name\n\n    if (isNameStart(code)) {\n      return readName(lexer, position);\n    }\n\n    throw syntaxError(\n      lexer.source,\n      position,\n      code === 0x0027\n        ? 'Unexpected single quote character (\\'), did you mean to use a double quote (\")?'\n        : isUnicodeScalarValue(code) || isSupplementaryCodePoint(body, position)\n        ? `Unexpected character: ${printCodePointAt(lexer, position)}.`\n        : `Invalid character: ${printCodePointAt(lexer, position)}.`,\n    );\n  }\n\n  return createToken(lexer, TokenKind.EOF, bodyLength, bodyLength);\n}\n/**\n * Reads a comment token from the source file.\n *\n * ```\n * Comment :: # CommentChar* [lookahead != CommentChar]\n *\n * CommentChar :: SourceCharacter but not LineTerminator\n * ```\n */\n\nfunction readComment(lexer, start) {\n  const body = lexer.source.body;\n  const bodyLength = body.length;\n  let position = start + 1;\n\n  while (position < bodyLength) {\n    const code = body.charCodeAt(position); // LineTerminator (\\n | \\r)\n\n    if (code === 0x000a || code === 0x000d) {\n      break;\n    } // SourceCharacter\n\n    if (isUnicodeScalarValue(code)) {\n      ++position;\n    } else if (isSupplementaryCodePoint(body, position)) {\n      position += 2;\n    } else {\n      break;\n    }\n  }\n\n  return createToken(\n    lexer,\n    TokenKind.COMMENT,\n    start,\n    position,\n    body.slice(start + 1, position),\n  );\n}\n/**\n * Reads a number token from the source file, either a FloatValue or an IntValue\n * depending on whether a FractionalPart or ExponentPart is encountered.\n *\n * ```\n * IntValue :: IntegerPart [lookahead != {Digit, `.`, NameStart}]\n *\n * IntegerPart ::\n *   - NegativeSign? 0\n *   - NegativeSign? NonZeroDigit Digit*\n *\n * NegativeSign :: -\n *\n * NonZeroDigit :: Digit but not `0`\n *\n * FloatValue ::\n *   - IntegerPart FractionalPart ExponentPart [lookahead != {Digit, `.`, NameStart}]\n *   - IntegerPart FractionalPart [lookahead != {Digit, `.`, NameStart}]\n *   - IntegerPart ExponentPart [lookahead != {Digit, `.`, NameStart}]\n *\n * FractionalPart :: . Digit+\n *\n * ExponentPart :: ExponentIndicator Sign? Digit+\n *\n * ExponentIndicator :: one of `e` `E`\n *\n * Sign :: one of + -\n * ```\n */\n\nfunction readNumber(lexer, start, firstCode) {\n  const body = lexer.source.body;\n  let position = start;\n  let code = firstCode;\n  let isFloat = false; // NegativeSign (-)\n\n  if (code === 0x002d) {\n    code = body.charCodeAt(++position);\n  } // Zero (0)\n\n  if (code === 0x0030) {\n    code = body.charCodeAt(++position);\n\n    if (isDigit(code)) {\n      throw syntaxError(\n        lexer.source,\n        position,\n        `Invalid number, unexpected digit after 0: ${printCodePointAt(\n          lexer,\n          position,\n        )}.`,\n      );\n    }\n  } else {\n    position = readDigits(lexer, position, code);\n    code = body.charCodeAt(position);\n  } // Full stop (.)\n\n  if (code === 0x002e) {\n    isFloat = true;\n    code = body.charCodeAt(++position);\n    position = readDigits(lexer, position, code);\n    code = body.charCodeAt(position);\n  } // E e\n\n  if (code === 0x0045 || code === 0x0065) {\n    isFloat = true;\n    code = body.charCodeAt(++position); // + -\n\n    if (code === 0x002b || code === 0x002d) {\n      code = body.charCodeAt(++position);\n    }\n\n    position = readDigits(lexer, position, code);\n    code = body.charCodeAt(position);\n  } // Numbers cannot be followed by . or NameStart\n\n  if (code === 0x002e || isNameStart(code)) {\n    throw syntaxError(\n      lexer.source,\n      position,\n      `Invalid number, expected digit but got: ${printCodePointAt(\n        lexer,\n        position,\n      )}.`,\n    );\n  }\n\n  return createToken(\n    lexer,\n    isFloat ? TokenKind.FLOAT : TokenKind.INT,\n    start,\n    position,\n    body.slice(start, position),\n  );\n}\n/**\n * Returns the new position in the source after reading one or more digits.\n */\n\nfunction readDigits(lexer, start, firstCode) {\n  if (!isDigit(firstCode)) {\n    throw syntaxError(\n      lexer.source,\n      start,\n      `Invalid number, expected digit but got: ${printCodePointAt(\n        lexer,\n        start,\n      )}.`,\n    );\n  }\n\n  const body = lexer.source.body;\n  let position = start + 1; // +1 to skip first firstCode\n\n  while (isDigit(body.charCodeAt(position))) {\n    ++position;\n  }\n\n  return position;\n}\n/**\n * Reads a single-quote string token from the source file.\n *\n * ```\n * StringValue ::\n *   - `\"\"` [lookahead != `\"`]\n *   - `\"` StringCharacter+ `\"`\n *\n * StringCharacter ::\n *   - SourceCharacter but not `\"` or `\\` or LineTerminator\n *   - `\\u` EscapedUnicode\n *   - `\\` EscapedCharacter\n *\n * EscapedUnicode ::\n *   - `{` HexDigit+ `}`\n *   - HexDigit HexDigit HexDigit HexDigit\n *\n * EscapedCharacter :: one of `\"` `\\` `/` `b` `f` `n` `r` `t`\n * ```\n */\n\nfunction readString(lexer, start) {\n  const body = lexer.source.body;\n  const bodyLength = body.length;\n  let position = start + 1;\n  let chunkStart = position;\n  let value = '';\n\n  while (position < bodyLength) {\n    const code = body.charCodeAt(position); // Closing Quote (\")\n\n    if (code === 0x0022) {\n      value += body.slice(chunkStart, position);\n      return createToken(lexer, TokenKind.STRING, start, position + 1, value);\n    } // Escape Sequence (\\)\n\n    if (code === 0x005c) {\n      value += body.slice(chunkStart, position);\n      const escape =\n        body.charCodeAt(position + 1) === 0x0075 // u\n          ? body.charCodeAt(position + 2) === 0x007b // {\n            ? readEscapedUnicodeVariableWidth(lexer, position)\n            : readEscapedUnicodeFixedWidth(lexer, position)\n          : readEscapedCharacter(lexer, position);\n      value += escape.value;\n      position += escape.size;\n      chunkStart = position;\n      continue;\n    } // LineTerminator (\\n | \\r)\n\n    if (code === 0x000a || code === 0x000d) {\n      break;\n    } // SourceCharacter\n\n    if (isUnicodeScalarValue(code)) {\n      ++position;\n    } else if (isSupplementaryCodePoint(body, position)) {\n      position += 2;\n    } else {\n      throw syntaxError(\n        lexer.source,\n        position,\n        `Invalid character within String: ${printCodePointAt(\n          lexer,\n          position,\n        )}.`,\n      );\n    }\n  }\n\n  throw syntaxError(lexer.source, position, 'Unterminated string.');\n} // The string value and lexed size of an escape sequence.\n\nfunction readEscapedUnicodeVariableWidth(lexer, position) {\n  const body = lexer.source.body;\n  let point = 0;\n  let size = 3; // Cannot be larger than 12 chars (\\u{00000000}).\n\n  while (size < 12) {\n    const code = body.charCodeAt(position + size++); // Closing Brace (})\n\n    if (code === 0x007d) {\n      // Must be at least 5 chars (\\u{0}) and encode a Unicode scalar value.\n      if (size < 5 || !isUnicodeScalarValue(point)) {\n        break;\n      }\n\n      return {\n        value: String.fromCodePoint(point),\n        size,\n      };\n    } // Append this hex digit to the code point.\n\n    point = (point << 4) | readHexDigit(code);\n\n    if (point < 0) {\n      break;\n    }\n  }\n\n  throw syntaxError(\n    lexer.source,\n    position,\n    `Invalid Unicode escape sequence: \"${body.slice(\n      position,\n      position + size,\n    )}\".`,\n  );\n}\n\nfunction readEscapedUnicodeFixedWidth(lexer, position) {\n  const body = lexer.source.body;\n  const code = read16BitHexCode(body, position + 2);\n\n  if (isUnicodeScalarValue(code)) {\n    return {\n      value: String.fromCodePoint(code),\n      size: 6,\n    };\n  } // GraphQL allows JSON-style surrogate pair escape sequences, but only when\n  // a valid pair is formed.\n\n  if (isLeadingSurrogate(code)) {\n    // \\u\n    if (\n      body.charCodeAt(position + 6) === 0x005c &&\n      body.charCodeAt(position + 7) === 0x0075\n    ) {\n      const trailingCode = read16BitHexCode(body, position + 8);\n\n      if (isTrailingSurrogate(trailingCode)) {\n        // JavaScript defines strings as a sequence of UTF-16 code units and\n        // encodes Unicode code points above U+FFFF using a surrogate pair of\n        // code units. Since this is a surrogate pair escape sequence, just\n        // include both codes into the JavaScript string value. Had JavaScript\n        // not been internally based on UTF-16, then this surrogate pair would\n        // be decoded to retrieve the supplementary code point.\n        return {\n          value: String.fromCodePoint(code, trailingCode),\n          size: 12,\n        };\n      }\n    }\n  }\n\n  throw syntaxError(\n    lexer.source,\n    position,\n    `Invalid Unicode escape sequence: \"${body.slice(position, position + 6)}\".`,\n  );\n}\n/**\n * Reads four hexadecimal characters and returns the positive integer that 16bit\n * hexadecimal string represents. For example, \"000f\" will return 15, and \"dead\"\n * will return 57005.\n *\n * Returns a negative number if any char was not a valid hexadecimal digit.\n */\n\nfunction read16BitHexCode(body, position) {\n  // readHexDigit() returns -1 on error. ORing a negative value with any other\n  // value always produces a negative value.\n  return (\n    (readHexDigit(body.charCodeAt(position)) << 12) |\n    (readHexDigit(body.charCodeAt(position + 1)) << 8) |\n    (readHexDigit(body.charCodeAt(position + 2)) << 4) |\n    readHexDigit(body.charCodeAt(position + 3))\n  );\n}\n/**\n * Reads a hexadecimal character and returns its positive integer value (0-15).\n *\n * '0' becomes 0, '9' becomes 9\n * 'A' becomes 10, 'F' becomes 15\n * 'a' becomes 10, 'f' becomes 15\n *\n * Returns -1 if the provided character code was not a valid hexadecimal digit.\n *\n * HexDigit :: one of\n *   - `0` `1` `2` `3` `4` `5` `6` `7` `8` `9`\n *   - `A` `B` `C` `D` `E` `F`\n *   - `a` `b` `c` `d` `e` `f`\n */\n\nfunction readHexDigit(code) {\n  return code >= 0x0030 && code <= 0x0039 // 0-9\n    ? code - 0x0030\n    : code >= 0x0041 && code <= 0x0046 // A-F\n    ? code - 0x0037\n    : code >= 0x0061 && code <= 0x0066 // a-f\n    ? code - 0x0057\n    : -1;\n}\n/**\n * | Escaped Character | Code Point | Character Name               |\n * | ----------------- | ---------- | ---------------------------- |\n * | `\"`               | U+0022     | double quote                 |\n * | `\\`               | U+005C     | reverse solidus (back slash) |\n * | `/`               | U+002F     | solidus (forward slash)      |\n * | `b`               | U+0008     | backspace                    |\n * | `f`               | U+000C     | form feed                    |\n * | `n`               | U+000A     | line feed (new line)         |\n * | `r`               | U+000D     | carriage return              |\n * | `t`               | U+0009     | horizontal tab               |\n */\n\nfunction readEscapedCharacter(lexer, position) {\n  const body = lexer.source.body;\n  const code = body.charCodeAt(position + 1);\n\n  switch (code) {\n    case 0x0022:\n      // \"\n      return {\n        value: '\\u0022',\n        size: 2,\n      };\n\n    case 0x005c:\n      // \\\n      return {\n        value: '\\u005c',\n        size: 2,\n      };\n\n    case 0x002f:\n      // /\n      return {\n        value: '\\u002f',\n        size: 2,\n      };\n\n    case 0x0062:\n      // b\n      return {\n        value: '\\u0008',\n        size: 2,\n      };\n\n    case 0x0066:\n      // f\n      return {\n        value: '\\u000c',\n        size: 2,\n      };\n\n    case 0x006e:\n      // n\n      return {\n        value: '\\u000a',\n        size: 2,\n      };\n\n    case 0x0072:\n      // r\n      return {\n        value: '\\u000d',\n        size: 2,\n      };\n\n    case 0x0074:\n      // t\n      return {\n        value: '\\u0009',\n        size: 2,\n      };\n  }\n\n  throw syntaxError(\n    lexer.source,\n    position,\n    `Invalid character escape sequence: \"${body.slice(\n      position,\n      position + 2,\n    )}\".`,\n  );\n}\n/**\n * Reads a block string token from the source file.\n *\n * ```\n * StringValue ::\n *   - `\"\"\"` BlockStringCharacter* `\"\"\"`\n *\n * BlockStringCharacter ::\n *   - SourceCharacter but not `\"\"\"` or `\\\"\"\"`\n *   - `\\\"\"\"`\n * ```\n */\n\nfunction readBlockString(lexer, start) {\n  const body = lexer.source.body;\n  const bodyLength = body.length;\n  let lineStart = lexer.lineStart;\n  let position = start + 3;\n  let chunkStart = position;\n  let currentLine = '';\n  const blockLines = [];\n\n  while (position < bodyLength) {\n    const code = body.charCodeAt(position); // Closing Triple-Quote (\"\"\")\n\n    if (\n      code === 0x0022 &&\n      body.charCodeAt(position + 1) === 0x0022 &&\n      body.charCodeAt(position + 2) === 0x0022\n    ) {\n      currentLine += body.slice(chunkStart, position);\n      blockLines.push(currentLine);\n      const token = createToken(\n        lexer,\n        TokenKind.BLOCK_STRING,\n        start,\n        position + 3, // Return a string of the lines joined with U+000A.\n        dedentBlockStringLines(blockLines).join('\\n'),\n      );\n      lexer.line += blockLines.length - 1;\n      lexer.lineStart = lineStart;\n      return token;\n    } // Escaped Triple-Quote (\\\"\"\")\n\n    if (\n      code === 0x005c &&\n      body.charCodeAt(position + 1) === 0x0022 &&\n      body.charCodeAt(position + 2) === 0x0022 &&\n      body.charCodeAt(position + 3) === 0x0022\n    ) {\n      currentLine += body.slice(chunkStart, position);\n      chunkStart = position + 1; // skip only slash\n\n      position += 4;\n      continue;\n    } // LineTerminator\n\n    if (code === 0x000a || code === 0x000d) {\n      currentLine += body.slice(chunkStart, position);\n      blockLines.push(currentLine);\n\n      if (code === 0x000d && body.charCodeAt(position + 1) === 0x000a) {\n        position += 2;\n      } else {\n        ++position;\n      }\n\n      currentLine = '';\n      chunkStart = position;\n      lineStart = position;\n      continue;\n    } // SourceCharacter\n\n    if (isUnicodeScalarValue(code)) {\n      ++position;\n    } else if (isSupplementaryCodePoint(body, position)) {\n      position += 2;\n    } else {\n      throw syntaxError(\n        lexer.source,\n        position,\n        `Invalid character within String: ${printCodePointAt(\n          lexer,\n          position,\n        )}.`,\n      );\n    }\n  }\n\n  throw syntaxError(lexer.source, position, 'Unterminated string.');\n}\n/**\n * Reads an alphanumeric + underscore name from the source.\n *\n * ```\n * Name ::\n *   - NameStart NameContinue* [lookahead != NameContinue]\n * ```\n */\n\nfunction readName(lexer, start) {\n  const body = lexer.source.body;\n  const bodyLength = body.length;\n  let position = start + 1;\n\n  while (position < bodyLength) {\n    const code = body.charCodeAt(position);\n\n    if (isNameContinue(code)) {\n      ++position;\n    } else {\n      break;\n    }\n  }\n\n  return createToken(\n    lexer,\n    TokenKind.NAME,\n    start,\n    position,\n    body.slice(start, position),\n  );\n}\n", "import { isWhiteSpace } from './characterClasses.mjs';\n/**\n * Produces the value of a block string from its parsed raw value, similar to\n * CoffeeScript's block string, Python's docstring trim or Ruby's strip_heredoc.\n *\n * This implements the GraphQL spec's BlockStringValue() static algorithm.\n *\n * @internal\n */\n\nexport function dedentBlockStringLines(lines) {\n  var _firstNonEmptyLine2;\n\n  let commonIndent = Number.MAX_SAFE_INTEGER;\n  let firstNonEmptyLine = null;\n  let lastNonEmptyLine = -1;\n\n  for (let i = 0; i < lines.length; ++i) {\n    var _firstNonEmptyLine;\n\n    const line = lines[i];\n    const indent = leadingWhitespace(line);\n\n    if (indent === line.length) {\n      continue; // skip empty lines\n    }\n\n    firstNonEmptyLine =\n      (_firstNonEmptyLine = firstNonEmptyLine) !== null &&\n      _firstNonEmptyLine !== void 0\n        ? _firstNonEmptyLine\n        : i;\n    lastNonEmptyLine = i;\n\n    if (i !== 0 && indent < commonIndent) {\n      commonIndent = indent;\n    }\n  }\n\n  return lines // Remove common indentation from all lines but first.\n    .map((line, i) => (i === 0 ? line : line.slice(commonIndent))) // Remove leading and trailing blank lines.\n    .slice(\n      (_firstNonEmptyLine2 = firstNonEmptyLine) !== null &&\n        _firstNonEmptyLine2 !== void 0\n        ? _firstNonEmptyLine2\n        : 0,\n      lastNonEmptyLine + 1,\n    );\n}\n\nfunction leadingWhitespace(str) {\n  let i = 0;\n\n  while (i < str.length && isWhiteSpace(str.charCodeAt(i))) {\n    ++i;\n  }\n\n  return i;\n}\n/**\n * @internal\n */\n\nexport function isPrintableAsBlockString(value) {\n  if (value === '') {\n    return true; // empty string is printable\n  }\n\n  let isEmptyLine = true;\n  let hasIndent = false;\n  let hasCommonIndent = true;\n  let seenNonEmptyLine = false;\n\n  for (let i = 0; i < value.length; ++i) {\n    switch (value.codePointAt(i)) {\n      case 0x0000:\n      case 0x0001:\n      case 0x0002:\n      case 0x0003:\n      case 0x0004:\n      case 0x0005:\n      case 0x0006:\n      case 0x0007:\n      case 0x0008:\n      case 0x000b:\n      case 0x000c:\n      case 0x000e:\n      case 0x000f:\n        return false;\n      // Has non-printable characters\n\n      case 0x000d:\n        //  \\r\n        return false;\n      // Has \\r or \\r\\n which will be replaced as \\n\n\n      case 10:\n        //  \\n\n        if (isEmptyLine && !seenNonEmptyLine) {\n          return false; // Has leading new line\n        }\n\n        seenNonEmptyLine = true;\n        isEmptyLine = true;\n        hasIndent = false;\n        break;\n\n      case 9: //   \\t\n\n      case 32:\n        //  <space>\n        hasIndent || (hasIndent = isEmptyLine);\n        break;\n\n      default:\n        hasCommonIndent && (hasCommonIndent = hasIndent);\n        isEmptyLine = false;\n    }\n  }\n\n  if (isEmptyLine) {\n    return false; // Has trailing empty lines\n  }\n\n  if (hasCommonIndent && seenNonEmptyLine) {\n    return false; // Has internal indent\n  }\n\n  return true;\n}\n/**\n * Print a block string in the indented block form by adding a leading and\n * trailing blank line. However, if a block string starts with whitespace and is\n * a single-line, adding a leading blank line would strip that whitespace.\n *\n * @internal\n */\n\nexport function printBlockString(value, options) {\n  const escapedValue = value.replace(/\"\"\"/g, '\\\\\"\"\"'); // Expand a block string's raw value into independent lines.\n\n  const lines = escapedValue.split(/\\r\\n|[\\n\\r]/g);\n  const isSingleLine = lines.length === 1; // If common indentation is found we can fix some of those cases by adding leading new line\n\n  const forceLeadingNewLine =\n    lines.length > 1 &&\n    lines\n      .slice(1)\n      .every((line) => line.length === 0 || isWhiteSpace(line.charCodeAt(0))); // Trailing triple quotes just looks confusing but doesn't force trailing new line\n\n  const hasTrailingTripleQuotes = escapedValue.endsWith('\\\\\"\"\"'); // Trailing quote (single or double) or slash forces trailing new line\n\n  const hasTrailingQuote = value.endsWith('\"') && !hasTrailingTripleQuotes;\n  const hasTrailingSlash = value.endsWith('\\\\');\n  const forceTrailingNewline = hasTrailingQuote || hasTrailingSlash;\n  const printAsMultipleLines =\n    !(options !== null && options !== void 0 && options.minimize) && // add leading and trailing new lines only if it improves readability\n    (!isSingleLine ||\n      value.length > 70 ||\n      forceTrailingNewline ||\n      forceLeadingNewLine ||\n      hasTrailingTripleQuotes);\n  let result = ''; // Format a multi-line block quote to account for leading space.\n\n  const skipLeadingNewLine = isSingleLine && isWhiteSpace(value.charCodeAt(0));\n\n  if ((printAsMultipleLines && !skipLeadingNewLine) || forceLeadingNewLine) {\n    result += '\\n';\n  }\n\n  result += escapedValue;\n\n  if (printAsMultipleLines || forceTrailingNewline) {\n    result += '\\n';\n  }\n\n  return '\"\"\"' + result + '\"\"\"';\n}\n", "/**\n * ```\n * WhiteSpace ::\n *   - \"Horizontal Tab (U+0009)\"\n *   - \"Space (U+0020)\"\n * ```\n * @internal\n */\nexport function isWhiteSpace(code) {\n  return code === 0x0009 || code === 0x0020;\n}\n/**\n * ```\n * Digit :: one of\n *   - `0` `1` `2` `3` `4` `5` `6` `7` `8` `9`\n * ```\n * @internal\n */\n\nexport function isDigit(code) {\n  return code >= 0x0030 && code <= 0x0039;\n}\n/**\n * ```\n * Letter :: one of\n *   - `A` `B` `C` `D` `E` `F` `G` `H` `I` `J` `K` `L` `M`\n *   - `N` `O` `P` `Q` `R` `S` `T` `U` `V` `W` `X` `Y` `Z`\n *   - `a` `b` `c` `d` `e` `f` `g` `h` `i` `j` `k` `l` `m`\n *   - `n` `o` `p` `q` `r` `s` `t` `u` `v` `w` `x` `y` `z`\n * ```\n * @internal\n */\n\nexport function isLetter(code) {\n  return (\n    (code >= 0x0061 && code <= 0x007a) || // A-Z\n    (code >= 0x0041 && code <= 0x005a) // a-z\n  );\n}\n/**\n * ```\n * NameStart ::\n *   - Letter\n *   - `_`\n * ```\n * @internal\n */\n\nexport function isNameStart(code) {\n  return isLetter(code) || code === 0x005f;\n}\n/**\n * ```\n * NameContinue ::\n *   - Letter\n *   - Digit\n *   - `_`\n * ```\n * @internal\n */\n\nexport function isNameContinue(code) {\n  return isLetter(code) || isDigit(code) || code === 0x005f;\n}\n", "/**\n * An exported enum describing the different kinds of tokens that the\n * lexer emits.\n */\nvar TokenKind;\n\n(function (TokenKind) {\n  TokenKind['SOF'] = '<SOF>';\n  TokenKind['EOF'] = '<EOF>';\n  TokenKind['BANG'] = '!';\n  TokenKind['DOLLAR'] = '$';\n  TokenKind['AMP'] = '&';\n  TokenKind['PAREN_L'] = '(';\n  TokenKind['PAREN_R'] = ')';\n  TokenKind['SPREAD'] = '...';\n  TokenKind['COLON'] = ':';\n  TokenKind['EQUALS'] = '=';\n  TokenKind['AT'] = '@';\n  TokenKind['BRACKET_L'] = '[';\n  TokenKind['BRACKET_R'] = ']';\n  TokenKind['BRACE_L'] = '{';\n  TokenKind['PIPE'] = '|';\n  TokenKind['BRACE_R'] = '}';\n  TokenKind['NAME'] = 'Name';\n  TokenKind['INT'] = 'Int';\n  TokenKind['FLOAT'] = 'Float';\n  TokenKind['STRING'] = 'String';\n  TokenKind['BLOCK_STRING'] = 'BlockString';\n  TokenKind['COMMENT'] = 'Comment';\n})(TokenKind || (TokenKind = {}));\n\nexport { TokenKind };\n/**\n * The enum type representing the token kinds values.\n *\n * @deprecated Please use `TokenKind`. Will be remove in v17.\n */\n", "import { devAssert } from '../jsutils/devAssert.mjs';\nimport { inspect } from '../jsutils/inspect.mjs';\nimport { instanceOf } from '../jsutils/instanceOf.mjs';\n\n/**\n * A representation of source input to GraphQL. The `name` and `locationOffset` parameters are\n * optional, but they are useful for clients who store GraphQL documents in source files.\n * For example, if the GraphQL input starts at line 40 in a file named `Foo.graphql`, it might\n * be useful for `name` to be `\"Foo.graphql\"` and location to be `{ line: 40, column: 1 }`.\n * The `line` and `column` properties in `locationOffset` are 1-indexed.\n */\nexport class Source {\n  constructor(\n    body,\n    name = 'GraphQL request',\n    locationOffset = {\n      line: 1,\n      column: 1,\n    },\n  ) {\n    typeof body === 'string' ||\n      devAssert(false, `Body must be a string. Received: ${inspect(body)}.`);\n    this.body = body;\n    this.name = name;\n    this.locationOffset = locationOffset;\n    this.locationOffset.line > 0 ||\n      devAssert(\n        false,\n        'line in locationOffset is 1-indexed and must be positive.',\n      );\n    this.locationOffset.column > 0 ||\n      devAssert(\n        false,\n        'column in locationOffset is 1-indexed and must be positive.',\n      );\n  }\n\n  get [Symbol.toStringTag]() {\n    return 'Source';\n  }\n}\n/**\n * Test if the given value is a Source object.\n *\n * @internal\n */\n\nexport function isSource(source) {\n  return instanceOf(source, Source);\n}\n", "const MAX_ARRAY_LENGTH = 10;\nconst MAX_RECURSIVE_DEPTH = 2;\n/**\n * Used to print values in error messages.\n */\n\nexport function inspect(value) {\n  return formatValue(value, []);\n}\n\nfunction formatValue(value, seenValues) {\n  switch (typeof value) {\n    case 'string':\n      return JSON.stringify(value);\n\n    case 'function':\n      return value.name ? `[function ${value.name}]` : '[function]';\n\n    case 'object':\n      return formatObjectValue(value, seenValues);\n\n    default:\n      return String(value);\n  }\n}\n\nfunction formatObjectValue(value, previouslySeenValues) {\n  if (value === null) {\n    return 'null';\n  }\n\n  if (previouslySeenValues.includes(value)) {\n    return '[Circular]';\n  }\n\n  const seenValues = [...previouslySeenValues, value];\n\n  if (isJSONable(value)) {\n    const jsonValue = value.toJSON(); // check for infinite recursion\n\n    if (jsonValue !== value) {\n      return typeof jsonValue === 'string'\n        ? jsonValue\n        : formatValue(jsonValue, seenValues);\n    }\n  } else if (Array.isArray(value)) {\n    return formatArray(value, seenValues);\n  }\n\n  return formatObject(value, seenValues);\n}\n\nfunction isJSONable(value) {\n  return typeof value.toJSON === 'function';\n}\n\nfunction formatObject(object, seenValues) {\n  const entries = Object.entries(object);\n\n  if (entries.length === 0) {\n    return '{}';\n  }\n\n  if (seenValues.length > MAX_RECURSIVE_DEPTH) {\n    return '[' + getObjectTag(object) + ']';\n  }\n\n  const properties = entries.map(\n    ([key, value]) => key + ': ' + formatValue(value, seenValues),\n  );\n  return '{ ' + properties.join(', ') + ' }';\n}\n\nfunction formatArray(array, seenValues) {\n  if (array.length === 0) {\n    return '[]';\n  }\n\n  if (seenValues.length > MAX_RECURSIVE_DEPTH) {\n    return '[Array]';\n  }\n\n  const len = Math.min(MAX_ARRAY_LENGTH, array.length);\n  const remaining = array.length - len;\n  const items = [];\n\n  for (let i = 0; i < len; ++i) {\n    items.push(formatValue(array[i], seenValues));\n  }\n\n  if (remaining === 1) {\n    items.push('... 1 more item');\n  } else if (remaining > 1) {\n    items.push(`... ${remaining} more items`);\n  }\n\n  return '[' + items.join(', ') + ']';\n}\n\nfunction getObjectTag(object) {\n  const tag = Object.prototype.toString\n    .call(object)\n    .replace(/^\\[object /, '')\n    .replace(/]$/, '');\n\n  if (tag === 'Object' && typeof object.constructor === 'function') {\n    const name = object.constructor.name;\n\n    if (typeof name === 'string' && name !== '') {\n      return name;\n    }\n  }\n\n  return tag;\n}\n", "import { inspect } from './inspect.mjs';\n/**\n * A replacement for instanceof which includes an error warning when multi-realm\n * constructors are detected.\n * See: https://expressjs.com/en/advanced/best-practice-performance.html#set-node_env-to-production\n * See: https://webpack.js.org/guides/production/\n */\n\nexport const instanceOf =\n  /* c8 ignore next 6 */\n  // FIXME: https://github.com/graphql/graphql-js/issues/2317\n  globalThis.process && globalThis.process.env.NODE_ENV === 'production'\n    ? function instanceOf(value, constructor) {\n        return value instanceof constructor;\n      }\n    : function instanceOf(value, constructor) {\n        if (value instanceof constructor) {\n          return true;\n        }\n\n        if (typeof value === 'object' && value !== null) {\n          var _value$constructor;\n\n          // Prefer Symbol.toStringTag since it is immune to minification.\n          const className = constructor.prototype[Symbol.toStringTag];\n          const valueClassName = // We still need to support constructor's name to detect conflicts with older versions of this library.\n            Symbol.toStringTag in value // @ts-expect-error TS bug see, https://github.com/microsoft/TypeScript/issues/38009\n              ? value[Symbol.toStringTag]\n              : (_value$constructor = value.constructor) === null ||\n                _value$constructor === void 0\n              ? void 0\n              : _value$constructor.name;\n\n          if (className === valueClassName) {\n            const stringifiedValue = inspect(value);\n            throw new Error(`Cannot use ${className} \"${stringifiedValue}\" from another module or realm.\n\nEnsure that there is only one instance of \"graphql\" in the node_modules\ndirectory. If different versions of \"graphql\" are the dependencies of other\nrelied on modules, use \"resolutions\" to ensure only one version is installed.\n\nhttps://yarnpkg.com/en/docs/selective-version-resolutions\n\nDuplicate \"graphql\" modules cannot be used at the same time since different\nversions may have different capabilities and behavior. The data from one\nversion used in the function from another could produce confusing and\nspurious results.`);\n          }\n        }\n\n        return false;\n      };\n", "import { printBlockString } from './blockString.mjs';\nimport { printString } from './printString.mjs';\nimport { visit } from './visitor.mjs';\n/**\n * Converts an AST into a string, using one set of reasonable\n * formatting rules.\n */\n\nexport function print(ast) {\n  return visit(ast, printDocASTReducer);\n}\nconst MAX_LINE_LENGTH = 80;\nconst printDocASTReducer = {\n  Name: {\n    leave: (node) => node.value,\n  },\n  Variable: {\n    leave: (node) => '$' + node.name,\n  },\n  // Document\n  Document: {\n    leave: (node) => join(node.definitions, '\\n\\n'),\n  },\n  OperationDefinition: {\n    leave(node) {\n      const varDefs = wrap('(', join(node.variableDefinitions, ', '), ')');\n      const prefix = join(\n        [\n          node.operation,\n          join([node.name, varDefs]),\n          join(node.directives, ' '),\n        ],\n        ' ',\n      ); // Anonymous queries with no directives or variable definitions can use\n      // the query short form.\n\n      return (prefix === 'query' ? '' : prefix + ' ') + node.selectionSet;\n    },\n  },\n  VariableDefinition: {\n    leave: ({ variable, type, defaultValue, directives }) =>\n      variable +\n      ': ' +\n      type +\n      wrap(' = ', defaultValue) +\n      wrap(' ', join(directives, ' ')),\n  },\n  SelectionSet: {\n    leave: ({ selections }) => block(selections),\n  },\n  Field: {\n    leave({ alias, name, arguments: args, directives, selectionSet }) {\n      const prefix = wrap('', alias, ': ') + name;\n      let argsLine = prefix + wrap('(', join(args, ', '), ')');\n\n      if (argsLine.length > MAX_LINE_LENGTH) {\n        argsLine = prefix + wrap('(\\n', indent(join(args, '\\n')), '\\n)');\n      }\n\n      return join([argsLine, join(directives, ' '), selectionSet], ' ');\n    },\n  },\n  Argument: {\n    leave: ({ name, value }) => name + ': ' + value,\n  },\n  // Fragments\n  FragmentSpread: {\n    leave: ({ name, directives }) =>\n      '...' + name + wrap(' ', join(directives, ' ')),\n  },\n  InlineFragment: {\n    leave: ({ typeCondition, directives, selectionSet }) =>\n      join(\n        [\n          '...',\n          wrap('on ', typeCondition),\n          join(directives, ' '),\n          selectionSet,\n        ],\n        ' ',\n      ),\n  },\n  FragmentDefinition: {\n    leave: (\n      { name, typeCondition, variableDefinitions, directives, selectionSet }, // Note: fragment variable definitions are experimental and may be changed\n    ) =>\n      // or removed in the future.\n      `fragment ${name}${wrap('(', join(variableDefinitions, ', '), ')')} ` +\n      `on ${typeCondition} ${wrap('', join(directives, ' '), ' ')}` +\n      selectionSet,\n  },\n  // Value\n  IntValue: {\n    leave: ({ value }) => value,\n  },\n  FloatValue: {\n    leave: ({ value }) => value,\n  },\n  StringValue: {\n    leave: ({ value, block: isBlockString }) =>\n      isBlockString ? printBlockString(value) : printString(value),\n  },\n  BooleanValue: {\n    leave: ({ value }) => (value ? 'true' : 'false'),\n  },\n  NullValue: {\n    leave: () => 'null',\n  },\n  EnumValue: {\n    leave: ({ value }) => value,\n  },\n  ListValue: {\n    leave: ({ values }) => '[' + join(values, ', ') + ']',\n  },\n  ObjectValue: {\n    leave: ({ fields }) => '{' + join(fields, ', ') + '}',\n  },\n  ObjectField: {\n    leave: ({ name, value }) => name + ': ' + value,\n  },\n  // Directive\n  Directive: {\n    leave: ({ name, arguments: args }) =>\n      '@' + name + wrap('(', join(args, ', '), ')'),\n  },\n  // Type\n  NamedType: {\n    leave: ({ name }) => name,\n  },\n  ListType: {\n    leave: ({ type }) => '[' + type + ']',\n  },\n  NonNullType: {\n    leave: ({ type }) => type + '!',\n  },\n  // Type System Definitions\n  SchemaDefinition: {\n    leave: ({ description, directives, operationTypes }) =>\n      wrap('', description, '\\n') +\n      join(['schema', join(directives, ' '), block(operationTypes)], ' '),\n  },\n  OperationTypeDefinition: {\n    leave: ({ operation, type }) => operation + ': ' + type,\n  },\n  ScalarTypeDefinition: {\n    leave: ({ description, name, directives }) =>\n      wrap('', description, '\\n') +\n      join(['scalar', name, join(directives, ' ')], ' '),\n  },\n  ObjectTypeDefinition: {\n    leave: ({ description, name, interfaces, directives, fields }) =>\n      wrap('', description, '\\n') +\n      join(\n        [\n          'type',\n          name,\n          wrap('implements ', join(interfaces, ' & ')),\n          join(directives, ' '),\n          block(fields),\n        ],\n        ' ',\n      ),\n  },\n  FieldDefinition: {\n    leave: ({ description, name, arguments: args, type, directives }) =>\n      wrap('', description, '\\n') +\n      name +\n      (hasMultilineItems(args)\n        ? wrap('(\\n', indent(join(args, '\\n')), '\\n)')\n        : wrap('(', join(args, ', '), ')')) +\n      ': ' +\n      type +\n      wrap(' ', join(directives, ' ')),\n  },\n  InputValueDefinition: {\n    leave: ({ description, name, type, defaultValue, directives }) =>\n      wrap('', description, '\\n') +\n      join(\n        [name + ': ' + type, wrap('= ', defaultValue), join(directives, ' ')],\n        ' ',\n      ),\n  },\n  InterfaceTypeDefinition: {\n    leave: ({ description, name, interfaces, directives, fields }) =>\n      wrap('', description, '\\n') +\n      join(\n        [\n          'interface',\n          name,\n          wrap('implements ', join(interfaces, ' & ')),\n          join(directives, ' '),\n          block(fields),\n        ],\n        ' ',\n      ),\n  },\n  UnionTypeDefinition: {\n    leave: ({ description, name, directives, types }) =>\n      wrap('', description, '\\n') +\n      join(\n        ['union', name, join(directives, ' '), wrap('= ', join(types, ' | '))],\n        ' ',\n      ),\n  },\n  EnumTypeDefinition: {\n    leave: ({ description, name, directives, values }) =>\n      wrap('', description, '\\n') +\n      join(['enum', name, join(directives, ' '), block(values)], ' '),\n  },\n  EnumValueDefinition: {\n    leave: ({ description, name, directives }) =>\n      wrap('', description, '\\n') + join([name, join(directives, ' ')], ' '),\n  },\n  InputObjectTypeDefinition: {\n    leave: ({ description, name, directives, fields }) =>\n      wrap('', description, '\\n') +\n      join(['input', name, join(directives, ' '), block(fields)], ' '),\n  },\n  DirectiveDefinition: {\n    leave: ({ description, name, arguments: args, repeatable, locations }) =>\n      wrap('', description, '\\n') +\n      'directive @' +\n      name +\n      (hasMultilineItems(args)\n        ? wrap('(\\n', indent(join(args, '\\n')), '\\n)')\n        : wrap('(', join(args, ', '), ')')) +\n      (repeatable ? ' repeatable' : '') +\n      ' on ' +\n      join(locations, ' | '),\n  },\n  SchemaExtension: {\n    leave: ({ directives, operationTypes }) =>\n      join(\n        ['extend schema', join(directives, ' '), block(operationTypes)],\n        ' ',\n      ),\n  },\n  ScalarTypeExtension: {\n    leave: ({ name, directives }) =>\n      join(['extend scalar', name, join(directives, ' ')], ' '),\n  },\n  ObjectTypeExtension: {\n    leave: ({ name, interfaces, directives, fields }) =>\n      join(\n        [\n          'extend type',\n          name,\n          wrap('implements ', join(interfaces, ' & ')),\n          join(directives, ' '),\n          block(fields),\n        ],\n        ' ',\n      ),\n  },\n  InterfaceTypeExtension: {\n    leave: ({ name, interfaces, directives, fields }) =>\n      join(\n        [\n          'extend interface',\n          name,\n          wrap('implements ', join(interfaces, ' & ')),\n          join(directives, ' '),\n          block(fields),\n        ],\n        ' ',\n      ),\n  },\n  UnionTypeExtension: {\n    leave: ({ name, directives, types }) =>\n      join(\n        [\n          'extend union',\n          name,\n          join(directives, ' '),\n          wrap('= ', join(types, ' | ')),\n        ],\n        ' ',\n      ),\n  },\n  EnumTypeExtension: {\n    leave: ({ name, directives, values }) =>\n      join(['extend enum', name, join(directives, ' '), block(values)], ' '),\n  },\n  InputObjectTypeExtension: {\n    leave: ({ name, directives, fields }) =>\n      join(['extend input', name, join(directives, ' '), block(fields)], ' '),\n  },\n};\n/**\n * Given maybeArray, print an empty string if it is null or empty, otherwise\n * print all items together separated by separator if provided\n */\n\nfunction join(maybeArray, separator = '') {\n  var _maybeArray$filter$jo;\n\n  return (_maybeArray$filter$jo =\n    maybeArray === null || maybeArray === void 0\n      ? void 0\n      : maybeArray.filter((x) => x).join(separator)) !== null &&\n    _maybeArray$filter$jo !== void 0\n    ? _maybeArray$filter$jo\n    : '';\n}\n/**\n * Given array, print each item on its own line, wrapped in an indented `{ }` block.\n */\n\nfunction block(array) {\n  return wrap('{\\n', indent(join(array, '\\n')), '\\n}');\n}\n/**\n * If maybeString is not null or empty, then wrap with start and end, otherwise print an empty string.\n */\n\nfunction wrap(start, maybeString, end = '') {\n  return maybeString != null && maybeString !== ''\n    ? start + maybeString + end\n    : '';\n}\n\nfunction indent(str) {\n  return wrap('  ', str.replace(/\\n/g, '\\n  '));\n}\n\nfunction hasMultilineItems(maybeArray) {\n  var _maybeArray$some;\n\n  // FIXME: https://github.com/graphql/graphql-js/issues/2203\n\n  /* c8 ignore next */\n  return (_maybeArray$some =\n    maybeArray === null || maybeArray === void 0\n      ? void 0\n      : maybeArray.some((str) => str.includes('\\n'))) !== null &&\n    _maybeArray$some !== void 0\n    ? _maybeArray$some\n    : false;\n}\n", "/**\n * Prints a string as a GraphQL StringValue literal. Replaces control characters\n * and excluded characters (\" U+0022 and \\\\ U+005C) with escape sequences.\n */\nexport function printString(str) {\n  return `\"${str.replace(escapedRegExp, escapedReplacer)}\"`;\n} // eslint-disable-next-line no-control-regex\n\nconst escapedRegExp = /[\\x00-\\x1f\\x22\\x5c\\x7f-\\x9f]/g;\n\nfunction escapedReplacer(str) {\n  return escapeSequences[str.charCodeAt(0)];\n} // prettier-ignore\n\nconst escapeSequences = [\n  '\\\\u0000',\n  '\\\\u0001',\n  '\\\\u0002',\n  '\\\\u0003',\n  '\\\\u0004',\n  '\\\\u0005',\n  '\\\\u0006',\n  '\\\\u0007',\n  '\\\\b',\n  '\\\\t',\n  '\\\\n',\n  '\\\\u000B',\n  '\\\\f',\n  '\\\\r',\n  '\\\\u000E',\n  '\\\\u000F',\n  '\\\\u0010',\n  '\\\\u0011',\n  '\\\\u0012',\n  '\\\\u0013',\n  '\\\\u0014',\n  '\\\\u0015',\n  '\\\\u0016',\n  '\\\\u0017',\n  '\\\\u0018',\n  '\\\\u0019',\n  '\\\\u001A',\n  '\\\\u001B',\n  '\\\\u001C',\n  '\\\\u001D',\n  '\\\\u001E',\n  '\\\\u001F',\n  '',\n  '',\n  '\\\\\"',\n  '',\n  '',\n  '',\n  '',\n  '',\n  '',\n  '',\n  '',\n  '',\n  '',\n  '',\n  '',\n  '', // 2F\n  '',\n  '',\n  '',\n  '',\n  '',\n  '',\n  '',\n  '',\n  '',\n  '',\n  '',\n  '',\n  '',\n  '',\n  '',\n  '', // 3F\n  '',\n  '',\n  '',\n  '',\n  '',\n  '',\n  '',\n  '',\n  '',\n  '',\n  '',\n  '',\n  '',\n  '',\n  '',\n  '', // 4F\n  '',\n  '',\n  '',\n  '',\n  '',\n  '',\n  '',\n  '',\n  '',\n  '',\n  '',\n  '',\n  '\\\\\\\\',\n  '',\n  '',\n  '', // 5F\n  '',\n  '',\n  '',\n  '',\n  '',\n  '',\n  '',\n  '',\n  '',\n  '',\n  '',\n  '',\n  '',\n  '',\n  '',\n  '', // 6F\n  '',\n  '',\n  '',\n  '',\n  '',\n  '',\n  '',\n  '',\n  '',\n  '',\n  '',\n  '',\n  '',\n  '',\n  '',\n  '\\\\u007F',\n  '\\\\u0080',\n  '\\\\u0081',\n  '\\\\u0082',\n  '\\\\u0083',\n  '\\\\u0084',\n  '\\\\u0085',\n  '\\\\u0086',\n  '\\\\u0087',\n  '\\\\u0088',\n  '\\\\u0089',\n  '\\\\u008A',\n  '\\\\u008B',\n  '\\\\u008C',\n  '\\\\u008D',\n  '\\\\u008E',\n  '\\\\u008F',\n  '\\\\u0090',\n  '\\\\u0091',\n  '\\\\u0092',\n  '\\\\u0093',\n  '\\\\u0094',\n  '\\\\u0095',\n  '\\\\u0096',\n  '\\\\u0097',\n  '\\\\u0098',\n  '\\\\u0099',\n  '\\\\u009A',\n  '\\\\u009B',\n  '\\\\u009C',\n  '\\\\u009D',\n  '\\\\u009E',\n  '\\\\u009F',\n];\n", "import { devAssert } from '../jsutils/devAssert.mjs';\nimport { inspect } from '../jsutils/inspect.mjs';\nimport { isNode, QueryDocumentKeys } from './ast.mjs';\nimport { Kind } from './kinds.mjs';\n/**\n * A visitor is provided to visit, it contains the collection of\n * relevant functions to be called during the visitor's traversal.\n */\n\nexport const BREAK = Object.freeze({});\n/**\n * visit() will walk through an AST using a depth-first traversal, calling\n * the visitor's enter function at each node in the traversal, and calling the\n * leave function after visiting that node and all of its child nodes.\n *\n * By returning different values from the enter and leave functions, the\n * behavior of the visitor can be altered, including skipping over a sub-tree of\n * the AST (by returning false), editing the AST by returning a value or null\n * to remove the value, or to stop the whole traversal by returning BREAK.\n *\n * When using visit() to edit an AST, the original AST will not be modified, and\n * a new version of the AST with the changes applied will be returned from the\n * visit function.\n *\n * ```ts\n * const editedAST = visit(ast, {\n *   enter(node, key, parent, path, ancestors) {\n *     // @return\n *     //   undefined: no action\n *     //   false: skip visiting this node\n *     //   visitor.BREAK: stop visiting altogether\n *     //   null: delete this node\n *     //   any value: replace this node with the returned value\n *   },\n *   leave(node, key, parent, path, ancestors) {\n *     // @return\n *     //   undefined: no action\n *     //   false: no action\n *     //   visitor.BREAK: stop visiting altogether\n *     //   null: delete this node\n *     //   any value: replace this node with the returned value\n *   }\n * });\n * ```\n *\n * Alternatively to providing enter() and leave() functions, a visitor can\n * instead provide functions named the same as the kinds of AST nodes, or\n * enter/leave visitors at a named key, leading to three permutations of the\n * visitor API:\n *\n * 1) Named visitors triggered when entering a node of a specific kind.\n *\n * ```ts\n * visit(ast, {\n *   Kind(node) {\n *     // enter the \"Kind\" node\n *   }\n * })\n * ```\n *\n * 2) Named visitors that trigger upon entering and leaving a node of a specific kind.\n *\n * ```ts\n * visit(ast, {\n *   Kind: {\n *     enter(node) {\n *       // enter the \"Kind\" node\n *     }\n *     leave(node) {\n *       // leave the \"Kind\" node\n *     }\n *   }\n * })\n * ```\n *\n * 3) Generic visitors that trigger upon entering and leaving any node.\n *\n * ```ts\n * visit(ast, {\n *   enter(node) {\n *     // enter any node\n *   },\n *   leave(node) {\n *     // leave any node\n *   }\n * })\n * ```\n */\n\nexport function visit(root, visitor, visitorKeys = QueryDocumentKeys) {\n  const enterLeaveMap = new Map();\n\n  for (const kind of Object.values(Kind)) {\n    enterLeaveMap.set(kind, getEnterLeaveForKind(visitor, kind));\n  }\n  /* eslint-disable no-undef-init */\n\n  let stack = undefined;\n  let inArray = Array.isArray(root);\n  let keys = [root];\n  let index = -1;\n  let edits = [];\n  let node = root;\n  let key = undefined;\n  let parent = undefined;\n  const path = [];\n  const ancestors = [];\n  /* eslint-enable no-undef-init */\n\n  do {\n    index++;\n    const isLeaving = index === keys.length;\n    const isEdited = isLeaving && edits.length !== 0;\n\n    if (isLeaving) {\n      key = ancestors.length === 0 ? undefined : path[path.length - 1];\n      node = parent;\n      parent = ancestors.pop();\n\n      if (isEdited) {\n        if (inArray) {\n          node = node.slice();\n          let editOffset = 0;\n\n          for (const [editKey, editValue] of edits) {\n            const arrayKey = editKey - editOffset;\n\n            if (editValue === null) {\n              node.splice(arrayKey, 1);\n              editOffset++;\n            } else {\n              node[arrayKey] = editValue;\n            }\n          }\n        } else {\n          node = Object.defineProperties(\n            {},\n            Object.getOwnPropertyDescriptors(node),\n          );\n\n          for (const [editKey, editValue] of edits) {\n            node[editKey] = editValue;\n          }\n        }\n      }\n\n      index = stack.index;\n      keys = stack.keys;\n      edits = stack.edits;\n      inArray = stack.inArray;\n      stack = stack.prev;\n    } else if (parent) {\n      key = inArray ? index : keys[index];\n      node = parent[key];\n\n      if (node === null || node === undefined) {\n        continue;\n      }\n\n      path.push(key);\n    }\n\n    let result;\n\n    if (!Array.isArray(node)) {\n      var _enterLeaveMap$get, _enterLeaveMap$get2;\n\n      isNode(node) || devAssert(false, `Invalid AST Node: ${inspect(node)}.`);\n      const visitFn = isLeaving\n        ? (_enterLeaveMap$get = enterLeaveMap.get(node.kind)) === null ||\n          _enterLeaveMap$get === void 0\n          ? void 0\n          : _enterLeaveMap$get.leave\n        : (_enterLeaveMap$get2 = enterLeaveMap.get(node.kind)) === null ||\n          _enterLeaveMap$get2 === void 0\n        ? void 0\n        : _enterLeaveMap$get2.enter;\n      result =\n        visitFn === null || visitFn === void 0\n          ? void 0\n          : visitFn.call(visitor, node, key, parent, path, ancestors);\n\n      if (result === BREAK) {\n        break;\n      }\n\n      if (result === false) {\n        if (!isLeaving) {\n          path.pop();\n          continue;\n        }\n      } else if (result !== undefined) {\n        edits.push([key, result]);\n\n        if (!isLeaving) {\n          if (isNode(result)) {\n            node = result;\n          } else {\n            path.pop();\n            continue;\n          }\n        }\n      }\n    }\n\n    if (result === undefined && isEdited) {\n      edits.push([key, node]);\n    }\n\n    if (isLeaving) {\n      path.pop();\n    } else {\n      var _node$kind;\n\n      stack = {\n        inArray,\n        index,\n        keys,\n        edits,\n        prev: stack,\n      };\n      inArray = Array.isArray(node);\n      keys = inArray\n        ? node\n        : (_node$kind = visitorKeys[node.kind]) !== null &&\n          _node$kind !== void 0\n        ? _node$kind\n        : [];\n      index = -1;\n      edits = [];\n\n      if (parent) {\n        ancestors.push(parent);\n      }\n\n      parent = node;\n    }\n  } while (stack !== undefined);\n\n  if (edits.length !== 0) {\n    // New root\n    return edits[edits.length - 1][1];\n  }\n\n  return root;\n}\n/**\n * Creates a new visitor instance which delegates to many visitors to run in\n * parallel. Each visitor will be visited for each node before moving on.\n *\n * If a prior visitor edits a node, no following visitors will see that node.\n */\n\nexport function visitInParallel(visitors) {\n  const skipping = new Array(visitors.length).fill(null);\n  const mergedVisitor = Object.create(null);\n\n  for (const kind of Object.values(Kind)) {\n    let hasVisitor = false;\n    const enterList = new Array(visitors.length).fill(undefined);\n    const leaveList = new Array(visitors.length).fill(undefined);\n\n    for (let i = 0; i < visitors.length; ++i) {\n      const { enter, leave } = getEnterLeaveForKind(visitors[i], kind);\n      hasVisitor || (hasVisitor = enter != null || leave != null);\n      enterList[i] = enter;\n      leaveList[i] = leave;\n    }\n\n    if (!hasVisitor) {\n      continue;\n    }\n\n    const mergedEnterLeave = {\n      enter(...args) {\n        const node = args[0];\n\n        for (let i = 0; i < visitors.length; i++) {\n          if (skipping[i] === null) {\n            var _enterList$i;\n\n            const result =\n              (_enterList$i = enterList[i]) === null || _enterList$i === void 0\n                ? void 0\n                : _enterList$i.apply(visitors[i], args);\n\n            if (result === false) {\n              skipping[i] = node;\n            } else if (result === BREAK) {\n              skipping[i] = BREAK;\n            } else if (result !== undefined) {\n              return result;\n            }\n          }\n        }\n      },\n\n      leave(...args) {\n        const node = args[0];\n\n        for (let i = 0; i < visitors.length; i++) {\n          if (skipping[i] === null) {\n            var _leaveList$i;\n\n            const result =\n              (_leaveList$i = leaveList[i]) === null || _leaveList$i === void 0\n                ? void 0\n                : _leaveList$i.apply(visitors[i], args);\n\n            if (result === BREAK) {\n              skipping[i] = BREAK;\n            } else if (result !== undefined && result !== false) {\n              return result;\n            }\n          } else if (skipping[i] === node) {\n            skipping[i] = null;\n          }\n        }\n      },\n    };\n    mergedVisitor[kind] = mergedEnterLeave;\n  }\n\n  return mergedVisitor;\n}\n/**\n * Given a visitor instance and a node kind, return EnterLeaveVisitor for that kind.\n */\n\nexport function getEnterLeaveForKind(visitor, kind) {\n  const kindVisitor = visitor[kind];\n\n  if (typeof kindVisitor === 'object') {\n    // { Kind: { enter() {}, leave() {} } }\n    return kindVisitor;\n  } else if (typeof kindVisitor === 'function') {\n    // { Kind() {} }\n    return {\n      enter: kindVisitor,\n      leave: undefined,\n    };\n  } // { enter() {}, leave() {} }\n\n  return {\n    enter: visitor.enter,\n    leave: visitor.leave,\n  };\n}\n/**\n * Given a visitor instance, if it is leaving or not, and a node kind, return\n * the function the visitor runtime should call.\n *\n * @deprecated Please use `getEnterLeaveForKind` instead. Will be removed in v17\n */\n\n/* c8 ignore next 8 */\n\nexport function getVisitFn(visitor, kind, isLeaving) {\n  const { enter, leave } = getEnterLeaveForKind(visitor, kind);\n  return isLeaving ? leave : enter;\n}\n", "export { Source } from './source.mjs';\nexport { getLocation } from './location.mjs';\nexport { printLocation, printSourceLocation } from './printLocation.mjs';\nexport { Kind } from './kinds.mjs';\nexport { TokenKind } from './tokenKind.mjs';\nexport { Lexer } from './lexer.mjs';\nexport { parse, parseValue, parseConstValue, parseType } from './parser.mjs';\nexport { print } from './printer.mjs';\nexport {\n  visit,\n  visitInParallel,\n  getVisitFn,\n  getEnterLeaveForKind,\n  BREAK,\n} from './visitor.mjs';\nexport { Location, Token, OperationTypeNode } from './ast.mjs';\nexport {\n  isDefinitionNode,\n  isExecutableDefinitionNode,\n  isSelectionNode,\n  isValueNode,\n  isConstValueNode,\n  isTypeNode,\n  isTypeSystemDefinitionNode,\n  isTypeDefinitionNode,\n  isTypeSystemExtensionNode,\n  isTypeExtensionNode,\n} from './predicates.mjs';\nexport { DirectiveLocation } from './directiveLocation.mjs';\n", "// Produce the GraphQL query recommended for a full schema introspection.\nexport { getIntrospectionQuery } from './getIntrospectionQuery.mjs';\n// Gets the target Operation from a Document.\nexport { getOperationAST } from './getOperationAST.mjs'; // Gets the Type for the target Operation AST.\n\nexport { getOperationRootType } from './getOperationRootType.mjs'; // Convert a GraphQLSchema to an IntrospectionQuery.\n\nexport { introspectionFromSchema } from './introspectionFromSchema.mjs'; // Build a GraphQLSchema from an introspection result.\n\nexport { buildClientSchema } from './buildClientSchema.mjs'; // Build a GraphQLSchema from GraphQL Schema language.\n\nexport { buildASTSchema, buildSchema } from './buildASTSchema.mjs';\n// Extends an existing GraphQLSchema from a parsed GraphQL Schema language AST.\nexport { extendSchema } from './extendSchema.mjs'; // Sort a GraphQLSchema.\n\nexport { lexicographicSortSchema } from './lexicographicSortSchema.mjs'; // Print a GraphQLSchema to GraphQL Schema language.\n\nexport {\n  printSchema,\n  printType,\n  printIntrospectionSchema,\n} from './printSchema.mjs'; // Create a GraphQLType from a GraphQL language AST.\n\nexport { typeFromAST } from './typeFromAST.mjs'; // Create a JavaScript value from a GraphQL language AST with a type.\n\nexport { valueFromAST } from './valueFromAST.mjs'; // Create a JavaScript value from a GraphQL language AST without a type.\n\nexport { valueFromASTUntyped } from './valueFromASTUntyped.mjs'; // Create a GraphQL language AST from a JavaScript value.\n\nexport { astFromValue } from './astFromValue.mjs'; // A helper to use within recursive-descent visitors which need to be aware of the GraphQL type system.\n\nexport { TypeInfo, visitWithTypeInfo } from './TypeInfo.mjs'; // Coerces a JavaScript value to a GraphQL type, or produces errors.\n\nexport { coerceInputValue } from './coerceInputValue.mjs'; // Concatenates multiple AST together.\n\nexport { concatAST } from './concatAST.mjs'; // Separates an AST into an AST per Operation.\n\nexport { separateOperations } from './separateOperations.mjs'; // Strips characters that are not significant to the validity or execution of a GraphQL document.\n\nexport { stripIgnoredCharacters } from './stripIgnoredCharacters.mjs'; // Comparators for types\n\nexport {\n  isEqualType,\n  isTypeSubTypeOf,\n  doTypesOverlap,\n} from './typeComparators.mjs'; // Asserts that a string is a valid GraphQL name\n\nexport { assertValidName, isValidNameError } from './assertValidName.mjs'; // Compares two GraphQLSchemas and detects breaking changes.\n\nexport {\n  BreakingChangeType,\n  DangerousChangeType,\n  findBreakingChanges,\n  findDangerousChanges,\n} from './findBreakingChanges.mjs';\n", "import { printBlockString } from '../language/blockString.mjs';\nimport { isPunctuatorTokenKind, Lexer } from '../language/lexer.mjs';\nimport { isSource, Source } from '../language/source.mjs';\nimport { TokenKind } from '../language/tokenKind.mjs';\n/**\n * Strips characters that are not significant to the validity or execution\n * of a GraphQL document:\n *   - UnicodeBOM\n *   - WhiteSpace\n *   - LineTerminator\n *   - Comment\n *   - Comma\n *   - BlockString indentation\n *\n * Note: It is required to have a delimiter character between neighboring\n * non-punctuator tokens and this function always uses single space as delimiter.\n *\n * It is guaranteed that both input and output documents if parsed would result\n * in the exact same AST except for nodes location.\n *\n * Warning: It is guaranteed that this function will always produce stable results.\n * However, it's not guaranteed that it will stay the same between different\n * releases due to bugfixes or changes in the GraphQL specification.\n *\n * Query example:\n *\n * ```graphql\n * query SomeQuery($foo: String!, $bar: String) {\n *   someField(foo: $foo, bar: $bar) {\n *     a\n *     b {\n *       c\n *       d\n *     }\n *   }\n * }\n * ```\n *\n * Becomes:\n *\n * ```graphql\n * query SomeQuery($foo:String!$bar:String){someField(foo:$foo bar:$bar){a b{c d}}}\n * ```\n *\n * SDL example:\n *\n * ```graphql\n * \"\"\"\n * Type description\n * \"\"\"\n * type Foo {\n *   \"\"\"\n *   Field description\n *   \"\"\"\n *   bar: String\n * }\n * ```\n *\n * Becomes:\n *\n * ```graphql\n * \"\"\"Type description\"\"\" type Foo{\"\"\"Field description\"\"\" bar:String}\n * ```\n */\n\nexport function stripIgnoredCharacters(source) {\n  const sourceObj = isSource(source) ? source : new Source(source);\n  const body = sourceObj.body;\n  const lexer = new Lexer(sourceObj);\n  let strippedBody = '';\n  let wasLastAddedTokenNonPunctuator = false;\n\n  while (lexer.advance().kind !== TokenKind.EOF) {\n    const currentToken = lexer.token;\n    const tokenKind = currentToken.kind;\n    /**\n     * Every two non-punctuator tokens should have space between them.\n     * Also prevent case of non-punctuator token following by spread resulting\n     * in invalid token (e.g. `1...` is invalid Float token).\n     */\n\n    const isNonPunctuator = !isPunctuatorTokenKind(currentToken.kind);\n\n    if (wasLastAddedTokenNonPunctuator) {\n      if (isNonPunctuator || currentToken.kind === TokenKind.SPREAD) {\n        strippedBody += ' ';\n      }\n    }\n\n    const tokenBody = body.slice(currentToken.start, currentToken.end);\n\n    if (tokenKind === TokenKind.BLOCK_STRING) {\n      strippedBody += printBlockString(currentToken.value, {\n        minimize: true,\n      });\n    } else {\n      strippedBody += tokenBody;\n    }\n\n    wasLastAddedTokenNonPunctuator = isNonPunctuator;\n  }\n\n  return strippedBody;\n}\n", null, "import {camelCase} from '@servicenow/ui-internal';\n\nexport default function getOperationName(tagName) {\n\treturn camelCase(tagName.toLowerCase());\n}\n", "//This should be removed , it's a dup now for unit test :-(\n//Import from ui-internal can't be resolved for unit test\nimport {SPAN_KIND_CLIENT, SPAN_LEVEL_FINE} from '../constants';\nexport default function getSpanOptions(host, level = SPAN_LEVEL_FINE) {\n\treturn {\n\t\tattributes: {\n\t\t\ttagName: host.tagName?.toLowerCase(),\n\t\t\tcomponentId: host.nowId,\n\t\t\tkind: SPAN_KIND_CLIENT,\n\t\t\t'seismic.level': level\n\t\t}\n\t};\n}\n", "export const SPAN_FOR_GRAPHQL = 'GQL';\nexport const SPAN_KIND_CLIENT = 3;\nexport const SPAN_ATTR_GQL_QUERY = 'gql.query';\nexport const SPAN_ATTR_GQL_VARIABLES = 'gql.variables';\nexport const SPAN_ATTR_GQL_BATCH = 'gql.isBatch';\nexport const SPAN_ATTR_GQL_OPERATION_NAME = 'gql.operation.name';\nexport const SPAN_ATTR_INTERACTION_ID = 'interactionId';\nexport const SPAN_ATTR_GQL_QUERY_LENGTH = 'gql.query.length';\nexport const SPAN_ATTR_ITEMS_QUEUE_SEND = 'items.queue.send';\nexport const SPAN_ATTR_ITEMS_QUEUE_SIZE = 'items.queue.size';\nexport const SPAN_ATTR_GQL_BATCH_QUEUING_DELAY = 'gql.batch.queuing.delay';\nexport const SPAN_LEVEL_FINE = 100;\n\nexport const SPAN_TRACE_PARENT = 'traceparent';\nexport const SPAN_DOCUMENT_TRACE_PARENT = 'X-DocumentTraceParent';\n\nexport const GQL_QUEUE_ADD_EVENT = 'gql.batch.queue.add';\nexport const GQL_QUEUE_ENQUEUE_EVENT = 'gql.batch.enqueue';\nexport const GQL_BATCH_SPAN_NAME = 'seismic.gql.batch';\nexport const GQL_GENERIC_COMPONENT_ID = 'gql.generic';\nexport const SPAN_ATTR_GQL_LINK_TYPE = 'link.type';\nexport const SPAN_ATTR_GQL_LINK_TYPE_VALUE = 'gql.batch';\nexport const SPAN_ATTR_GQL_LINK_TYPE_VALUE_ITEM = 'gql.batch.item';\n\nexport const SPAN_ATTR_GQL_ERROR = 'gql.error';\nexport const SPAN_ATTR_GQL_ERROR_STATUS = 'gql.error.status';\nexport const SPAN_ATTR_GQL_ERROR_STATUS_TEXT = 'gql.error.statusText';\n", "import {print, stripIgnoredCharacters} from 'graphql';\n\nexport default function documentToQueryString(document) {\n\ttry {\n\t\treturn stripIgnoredCharacters(print(document));\n\t} catch (e) {\n\t\tthrow new Error(`Failed to convert GraphQL document to query string: ${e.message}`);\n\t}\n}\n", "import {configConstants, getConfigItem} from '@servicenow/ui-config';\nimport {shouldCache} from './shouldCache';\nimport {getUserSysId, makeLRUCachePolicy, makePersistentCache} from '@servicenow/ui-effect-helpers';\nimport {getGraphQLDocument, isSubscriptionResult} from '../utils';\nimport documentToQueryString from './documentToQueryString';\n\nconst {GQL_CACHE_MAX_PERSIST, GQL_CACHE_CAPACITY, GQL_CACHING_ENABLED} = configConstants;\n\nlet persistantCache;\n\nconst getCache = async function () {\n\tif (persistantCache) {\n\t\treturn persistantCache;\n\t}\n\ttry {\n\t\tpersistantCache = await makePersistentCache({\n\t\t\tdbName: 'Seismic',\n\t\t\tstoreName: 'gqlQueries',\n\t\t\tschemaVersion: 1,\n\t\t\toptions: {cachePolicy: makeLRUCachePolicy(getConfigItem(GQL_CACHE_CAPACITY))}\n\t\t});\n\t} catch (e) {\n\t\treturn null;\n\t}\n\treturn persistantCache;\n};\n\nexport async function clearGraphQLResultsCache() {\n\tawait (await getCache())?.clear();\n}\n\nexport function shouldDoResultCaching(operation) {\n\tconst {transactionMetaData} = operation;\n\treturn (\n\t\tgetConfigItem(GQL_CACHING_ENABLED) &&\n\t\ttransactionMetaData?.cacheable &&\n\t\tshouldCache(transactionMetaData?.query, globalThis)\n\t);\n}\n\n// @TODO: add Domain info to cacheQueryKey\nconst getCacheQueryKey = ({query, variables, params = {}}) => {\n\tlet resolvedQuery = query,\n\t\tresolvedVariables = variables,\n\t\tresolvedParams = params;\n\tif (typeof resolvedQuery !== 'string') resolvedQuery = JSON.stringify(resolvedQuery);\n\n\tif (typeof resolvedVariables !== 'string') resolvedVariables = JSON.stringify(resolvedVariables);\n\n\tif (typeof resolvedParams !== 'string') resolvedParams = JSON.stringify(resolvedParams);\n\n\tconst userToken = getUserSysId(globalThis);\n\treturn `${resolvedQuery}:${resolvedVariables}:${resolvedParams}:${userToken}`;\n};\n\nexport async function checkCacheForResult(operation, batchItem, fetchFunc) {\n\tconst {\n\t\toperationName,\n\t\tvariables,\n\t\ttemplateVars,\n\t\tdomainContext,\n\t\ttransactionMetaData: {query, params} = {}\n\t} = operation;\n\tconst gqlDocument = getGraphQLDocument(query, templateVars, domainContext, operationName);\n\tconst queryString = documentToQueryString(gqlDocument);\n\tconst cacheQueryKey = getCacheQueryKey({query: queryString, variables, params});\n\n\tconst cache = await getCache();\n\tconst isCached = cache ? await cache.has(cacheQueryKey) : false;\n\n\tif (isCached) {\n\t\tconst refetchPromise = () => {\n\t\t\treturn makeRefetchRequest([batchItem], fetchFunc);\n\t\t};\n\t\tconst cachedResult = await cache.get(cacheQueryKey);\n\t\tconst {headers} = cachedResult;\n\t\tconst cachedDate = new Date(headers?.date);\n\n\t\tif (cachedDate) {\n\t\t\tconst minutesSinceCached = (Date.now() - cachedDate) / 1000 / 60;\n\n\t\t\tif (minutesSinceCached < (getConfigItem(GQL_CACHE_MAX_PERSIST) || 2880)) {\n\t\t\t\treturn {\n\t\t\t\t\tisCachedResult: true,\n\t\t\t\t\trefetchPromise,\n\t\t\t\t\t...cachedResult\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t}\n}\n\n//For refetch requests clear out any streaming since it is not needed as the request will happen in the background\n//after the main request\nfunction makeRefetchRequest(batchItems = [], fetchFunc) {\n\tbatchItems.forEach(currItem => currItem?.operation?.queryContext?.clearStreaming());\n\treturn fetchFunc(batchItems);\n}\n\nexport async function storeResultInCache(operation, result, headers) {\n\tconst {query, variables, cacheable, transactionMetaData: {params} = {}} = operation;\n\tconst {data = null, errors = []} = result;\n\tconst payload = {data, errors, headers};\n\n\t// Check equality ?\n\tif (\n\t\tgetConfigItem(GQL_CACHING_ENABLED) &&\n\t\t!query.startsWith('mutation') &&\n\t\tcacheable &&\n\t\t!isSubscriptionResult(result)\n\t) {\n\t\tconst cache = await getCache();\n\t\tif (cache) {\n\t\t\tconst cacheQueryKey = getCacheQueryKey({query, variables, params});\n\t\t\tawait cache.set(cacheQueryKey, payload);\n\t\t\trequestIdleCallback(() => cache.persist());\n\t\t}\n\t}\n}\n", "/**\n * shouldCache\n * @description Checks the current env and query to see if we should cache.\n * Safeguards against users that are impersonating other users as well as mutation or\n * subscription GQL requests\n * @param {*} query - The API query to check\n * @param {*} windowObj - globalThis to check for keys\n * @returns Boolean\n */\nexport const shouldCache = (query, windowObj) => {\n\tif (!query || !windowObj) return false;\n\n\tif (windowObj.NOW?.user?.isImpersonating === true) return false;\n\n\tif (query.definitions) {\n\t\tif (\n\t\t\tquery.definitions.every(d => d.operation === 'mutation') ||\n\t\t\tquery.definitions.every(d => d.operation === 'subscription')\n\t\t)\n\t\t\treturn false;\n\t}\n\n\treturn true;\n};\n", "import * as uiAnalyticsConsumer from '@servicenow/ui-analytics-consumer';\nimport {\n\tGQL_BATCH_SPAN_NAME,\n\tGQL_GENERIC_COMPONENT_ID,\n\tGQL_QUEUE_ADD_EVENT,\n\tGQL_QUEUE_ENQUEUE_EVENT,\n\tSPAN_ATTR_GQL_BATCH,\n\tSPAN_ATTR_GQL_BATCH_QUEUING_DELAY,\n\tSPAN_ATTR_GQL_LINK_TYPE,\n\tSPAN_ATTR_GQL_LINK_TYPE_VALUE,\n\tSPAN_ATTR_GQL_LINK_TYPE_VALUE_ITEM,\n\tSPAN_ATTR_ITEMS_QUEUE_SEND,\n\tSPAN_ATTR_ITEMS_QUEUE_SIZE,\n\tSPAN_DOCUMENT_TRACE_PARENT,\n\tSPAN_FOR_GRAPHQL,\n\tSPAN_KIND_CLIENT,\n\tSPAN_TRACE_PARENT,\n\tSPAN_ATTR_GQL_QUERY\n} from '../constants';\n\nconst {createTraceParentHeader, tracer} = uiAnalyticsConsumer;\n\n/**\n * Adds a key value pair to the span attributes.\n * @param {Span} span The span to add the attribute to.\n * @param {string} key The key of the attribute.\n * @param {string} value The value of the attribute.\n */\nfunction appendSpanAttribute(span, key, value) {\n\tif (!span) return;\n\tconst current = span.attributes[key] || [];\n\tcurrent.push(value);\n\tspan.setAttribute(key, current);\n}\n\n/**\n * Starts batch tracing for GraphQL operations.\n * @param {Object} params The parameters for batch tracing.\n * @returns {Span} The GraphQL batch span.\n */\nfunction startBatchTracing(params) {\n\tconst {operation, maxBatchSize, batchInterval, gqlBatchSpan: existingGqlBatchSpan} = params;\n\tif (existingGqlBatchSpan) return existingGqlBatchSpan;\n\n\tconst activeSpan = operation?.queryContext?.getActiveSpan();\n\tif (!activeSpan) return null;\n\n\tconst spanAttributes = {\n\t\t'config.maxSize': maxBatchSize,\n\t\t'config.interval': `${batchInterval}ms`\n\t};\n\n\tconst gqlBatchSpan = tracer.startSpan(GQL_BATCH_SPAN_NAME, {\n\t\tkind: SPAN_KIND_CLIENT,\n\t\troot: true,\n\t\tattributes: {\n\t\t\t...spanAttributes,\n\t\t\ttagName: SPAN_FOR_GRAPHQL,\n\t\t\tcomponentId: GQL_GENERIC_COMPONENT_ID\n\t\t}\n\t});\n\treturn gqlBatchSpan;\n}\n\n/**\n * Updates headers with span information.\n * @param {Object} params The parameters for updating headers.\n */\nfunction updateHeadersWithSpan(params) {\n\tconst {query, batch, headers = {}, operations, index, gqlBatchSpan, queryContext} = params;\n\tconst activeSpan = queryContext?.getActiveSpan();\n\tif (!activeSpan || !activeSpan.isRecording()) return;\n\n\tsetSpanAttributes(activeSpan, query, batch);\n\theaders[SPAN_DOCUMENT_TRACE_PARENT] = activeSpan.documentTraceParent;\n\n\tconst activeTraceParent = createTraceParentHeader(activeSpan.id, activeSpan.traceId);\n\tif (batch) {\n\t\tupdateBatchHeaders(headers, operations, index, gqlBatchSpan, activeSpan, activeTraceParent);\n\t} else {\n\t\theaders[SPAN_TRACE_PARENT] = activeTraceParent;\n\t}\n}\n\nfunction setSpanAttributes(activeSpan, query, batch) {\n\tif (query && typeof query === 'string') {\n\t\tactiveSpan.setAttribute(SPAN_ATTR_GQL_QUERY, query.substring(0, 50));\n\t}\n\tactiveSpan.setAttribute(SPAN_ATTR_GQL_BATCH, batch);\n}\n\nfunction updateBatchHeaders(\n\theaders,\n\toperations,\n\tindex,\n\tgqlBatchSpan,\n\tactiveSpan,\n\tactiveTraceParent\n) {\n\toperations[index][SPAN_TRACE_PARENT] = activeTraceParent;\n\toperations[index][SPAN_DOCUMENT_TRACE_PARENT] = activeSpan.documentTraceParent;\n\tif (gqlBatchSpan) {\n\t\theaders[SPAN_TRACE_PARENT] = createTraceParentHeader(gqlBatchSpan.id, gqlBatchSpan.traceId);\n\t}\n}\n\nfunction crossLinkBatchSpan(gqlBatchSpan, activeSpan) {\n\tif (gqlBatchSpan && activeSpan) {\n\t\tactiveSpan.addLink({\n\t\t\tcontext: {\n\t\t\t\tspanId: gqlBatchSpan.id,\n\t\t\t\ttraceId: gqlBatchSpan.traceId\n\t\t\t},\n\t\t\tattributes: {\n\t\t\t\t[SPAN_ATTR_GQL_LINK_TYPE]: SPAN_ATTR_GQL_LINK_TYPE_VALUE\n\t\t\t}\n\t\t});\n\t\tgqlBatchSpan.addLink({\n\t\t\tcontext: {\n\t\t\t\tspanId: activeSpan.id,\n\t\t\t\ttraceId: activeSpan.traceId\n\t\t\t},\n\t\t\tattributes: {\n\t\t\t\t[SPAN_ATTR_GQL_LINK_TYPE]: SPAN_ATTR_GQL_LINK_TYPE_VALUE_ITEM\n\t\t\t}\n\t\t});\n\t}\n}\n\n/*\n * Tracks the batch event for the GraphQL operations.\n * @param {Object} operation The operation object.\n * @param {Span} gqlBatchSpan The GraphQL batch span.\n * @param {Array} queue The queue of operations.\n */\n\nfunction addEventToBatchSpan(operation, gqlBatchSpan, queue) {\n\tif (!operation || !gqlBatchSpan || !queue) return;\n\n\tconst ts = Date.now();\n\tconst eventDetails = {\n\t\toperationName: operation.operationName,\n\t\tqueueSize: queue.length\n\t};\n\n\tgqlBatchSpan.addEvent(GQL_QUEUE_ADD_EVENT, eventDetails, ts);\n\tconst activeSpan = operation.queryContext?.getActiveSpan();\n\tif (activeSpan) {\n\t\tactiveSpan.addEvent(GQL_QUEUE_ENQUEUE_EVENT, eventDetails, ts);\n\t}\n}\n\n/**\n * Completes batch tracking for GraphQL operations.\n * @param {Span} gqlBatchSpan The GraphQL batch span.\n * @param {boolean} isBatched Indicates if the operations are batched.\n * @param {Array} operations The list of operations.\n * @returns {Span|null} The updated GraphQL batch span or null.\n */\nfunction completeBatchTracking(gqlBatchSpan, isBatched, operations) {\n\tif (gqlBatchSpan && isBatched) {\n\t\tconst batchEnd = Date.now();\n\t\tconst queueSize = operations.length;\n\t\tconst batchStart = (gqlBatchSpan.events || []).find(event => event.name === 'items.queue.add');\n\t\tconst batchProcessingTime = batchStart ? batchEnd - batchStart.time : 0;\n\n\t\tgqlBatchSpan.addEvent(SPAN_ATTR_ITEMS_QUEUE_SEND, {queueSize}, batchEnd);\n\t\tgqlBatchSpan.setAttribute(SPAN_ATTR_ITEMS_QUEUE_SIZE, queueSize);\n\n\t\tif (batchProcessingTime > 0) {\n\t\t\tgqlBatchSpan.setAttribute(SPAN_ATTR_GQL_BATCH_QUEUING_DELAY, batchProcessingTime);\n\t\t\toperations.forEach(({queryContext}) => {\n\t\t\t\tconst operationSpan = queryContext?.getActiveSpan();\n\t\t\t\tconst gqlBatchQueueEvent = operationSpan?.events.find(\n\t\t\t\t\tevent => event.name === GQL_QUEUE_ENQUEUE_EVENT\n\t\t\t\t);\n\t\t\t\tif (gqlBatchQueueEvent) {\n\t\t\t\t\toperationSpan.setAttribute(\n\t\t\t\t\t\tSPAN_ATTR_GQL_BATCH_QUEUING_DELAY,\n\t\t\t\t\t\tbatchEnd - gqlBatchQueueEvent.time\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\tgqlBatchSpan.endSpan();\n\t}\n\treturn null;\n}\n\nexport {\n\tappendSpanAttribute,\n\tstartBatchTracing,\n\tupdateHeadersWithSpan,\n\tcompleteBatchTracking,\n\taddEventToBatchSpan,\n\tcrossLinkBatchSpan\n};\n", "export {default as createSubscriptionId} from './createSubscriptionId';\nexport {default as createRegistryId} from './createRegistryId';\nexport {default as getAMBClient} from './getAMBClient';\nexport {default as handleGraphQLSubscription} from './handleGraphQLSubscription';\n", "import {guid} from '@servicenow/ui-internal';\n\nexport default function createSubscriptionId() {\n\treturn guid();\n}\n", "export default function createRegistryId(containerId, subscriptionId) {\n\treturn `${containerId}-${subscriptionId}`;\n}\n", "import amb from 'amb-client-js';\n\nlet ambClient;\nlet clientUrl;\nexport default function getAMBClient(url = null) {\n\tif (!ambClient) {\n\t\tclientUrl = url;\n\t\tambClient = amb.getClient(clientUrl);\n\t}\n\tif (clientUrl !== url) throw new Error('Subsequent amb client request has different url');\n\treturn ambClient;\n}\n", "import getChannelsFromSubscriptionQuery from './getChannelsFromSubscriptionQuery';\nimport handleAMBSubscription from './handleAMBSubscription';\n\n/**\n * Sets up handlers for each gql amb subscription\n *\n * @private\n * @param action\n * @param options\n * @param resultData\n * @param actionMetaData\n * @param dispatch\n * @param registryId\n * @param ambClient\n * @param ambChannelRegistry\n */\nexport default function handleGraphQLSubscription(\n\taction,\n\toptions,\n\tresultData,\n\tactionMetaData,\n\tdispatch,\n\tregistryId,\n\tambClient,\n\tambChannelRegistry\n) {\n\tconst {payload} = action;\n\tconst {subscribe: shouldSubscribe = false} = payload;\n\tconst channels = getChannelsFromSubscriptionQuery(resultData);\n\tconst {length: channelsLength} = channels;\n\tfor (let i = 0; i < channelsLength; i++) {\n\t\thandleAMBSubscription({\n\t\t\tshouldSubscribe,\n\t\t\tregistryId,\n\t\t\t...channels[i],\n\t\t\tambClient,\n\t\t\tambChannelRegistry,\n\t\t\toptions,\n\t\t\tactionMetaData,\n\t\t\tdispatch\n\t\t});\n\t}\n}\n", "import {get, values} from '@servicenow/ui-internal';\n\n/**\n * Gets a list of channel ids and serialized graphql subscriptions from a given subscription query result.\n *\n * @private\n * @method getChannelsFromSubscriptionQuery\n * @param {Object} data Subscription query results.\n * @returns {Array} Object containing channel id and serialized graphql subscription for AMB.\n */\nexport default function getChannelsFromSubscriptionQuery(data) {\n\tconst items = values(get(data, 'GlideRecord_Subscription'));\n\tconst channels = [];\n\tconst {length: itemsLength} = items;\n\n\tfor (let i = 0; i < itemsLength; i++) {\n\t\tconst item = items[i];\n\t\tconst channelId = get(item, '_subscription.subscription_channel');\n\t\tconst serializedSubscription = get(item, '_subscription.serialized_subscription');\n\n\t\tif (channelId && serializedSubscription) channels.push({channelId, serializedSubscription});\n\t}\n\n\treturn channels;\n}\n", "import {get, defer} from '@servicenow/ui-internal';\n\nconst ENTER = 'enter';\nconst CHANGE = 'change';\nconst EXIT = 'exit';\nconst ABANDONED = 'abandoned';\n\nexport const GRAPHQL_SUBSCRIPTION_STARTED = 'GRAPHQL_SUBSCRIPTION_STARTED';\nexport const GRAPHQL_SUBSCRIPTION_SUCCEEDED = 'GRAPHQL_SUBSCRIPTION_SUCCEEDED';\nexport const GRAPHQL_SUBSCRIPTION_FAILED = 'GRAPHQL_SUBSCRIPTION_FAILED';\nexport const GRAPHQL_UNSUBSCRIBE_SUCCEEDED = 'GRAPHQL_UNSUBSCRIBE_SUCCEEDED';\nexport const GRAPHQL_SUBSCRIPTION_ITEM_ENTERED = 'GRAPHQL_SUBSCRIPTION_ITEM_ENTERED';\nexport const GRAPHQL_SUBSCRIPTION_ITEM_CHANGED = 'GRAPHQL_SUBSCRIPTION_ITEM_CHANGED';\nexport const GRAPHQL_SUBSCRIPTION_ITEM_EXITED = 'GRAPHQL_SUBSCRIPTION_ITEM_EXITED';\nexport const GRAPHQL_SUBSCRIPTION_CONDITION_ABANDONED = 'GRAPHQL_SUBSCRIPTION_CONDITION_ABANDONED';\n\nfunction createSubscriptionCallback(dispatch, successActionType, errorActionType, actionMetaData) {\n\t// use setTimeout because of an AMB client subscription timing issue\n\treturn response =>\n\t\tdefer(() => {\n\t\t\tif (response.successful) {\n\t\t\t\tdispatch(successActionType, {response}, actionMetaData);\n\t\t\t} else {\n\t\t\t\tconst {error} = response;\n\t\t\t\tdispatch(errorActionType, error, actionMetaData, true);\n\t\t\t}\n\t\t});\n}\n\n/**\n * Manges AMB subscription\n *\n * State should follow:\n * channelId has changed, always unsubscribe first\n * isSubscribed: true, shouldSubscribe: true    = Do nothing\n * isSubscribed: true, shouldSubscribe: false   = unsubscribe\n * isSubscribed: false, shouldSubscribe: true   = subscribe\n * isSubscribed: false, shouldSubscribe: false  = Do nothing\n *\n * @private\n * @param config\n */\nexport default function handleAMBSubscription(config) {\n\tconst {\n\t\tshouldSubscribe,\n\t\tambClient,\n\t\tambChannelRegistry,\n\t\toptions,\n\t\tactionMetaData,\n\t\tregistryId,\n\t\tchannelId,\n\t\tserializedSubscription: serializedGraphQLSubscription,\n\t\tdispatch\n\t} = config;\n\n\tconst {\n\t\tsubscriptionStartedActionType = GRAPHQL_SUBSCRIPTION_STARTED,\n\t\tsubscriptionSuccessActionType = GRAPHQL_SUBSCRIPTION_SUCCEEDED,\n\t\tsubscriptionFailedActionType = GRAPHQL_SUBSCRIPTION_FAILED,\n\t\tunsubscribeSuccessActionType = GRAPHQL_UNSUBSCRIBE_SUCCEEDED,\n\t\titemEnteredActionType = GRAPHQL_SUBSCRIPTION_ITEM_ENTERED,\n\t\titemChangedActionType = GRAPHQL_SUBSCRIPTION_ITEM_CHANGED,\n\t\titemExitedActionType = GRAPHQL_SUBSCRIPTION_ITEM_EXITED,\n\t\tconditionAbandonedActionType = GRAPHQL_SUBSCRIPTION_CONDITION_ABANDONED\n\t} = options;\n\n\tconst subscriptionCallback = createSubscriptionCallback(\n\t\tdispatch,\n\t\tsubscriptionSuccessActionType,\n\t\tsubscriptionFailedActionType,\n\t\tactionMetaData\n\t);\n\n\tif (!ambChannelRegistry.has(registryId)) {\n\t\tambChannelRegistry.set(\n\t\t\tregistryId,\n\t\t\tambClient.getChannel(channelId, {\n\t\t\t\tsubscriptionCallback,\n\t\t\t\tserializedGraphQLSubscription\n\t\t\t})\n\t\t);\n\t}\n\n\tlet channelListener = ambChannelRegistry.get(registryId);\n\tconst channelIdChanged = channelId !== channelListener.getName();\n\n\tif (channelIdChanged) {\n\t\tchannelListener.unsubscribe();\n\t\tambChannelRegistry.set(\n\t\t\tregistryId,\n\t\t\tambClient.getChannel(channelId, {\n\t\t\t\tsubscriptionCallback,\n\t\t\t\tserializedGraphQLSubscription\n\t\t\t})\n\t\t);\n\t\tchannelListener = ambChannelRegistry.get(registryId);\n\t}\n\n\tconst isSubscribed = channelListener.getCallback() !== undefined;\n\tif (!isSubscribed && shouldSubscribe) {\n\t\tdispatch(subscriptionStartedActionType, {}, actionMetaData);\n\t\tchannelListener.subscribe(message => {\n\t\t\tconst fields = get(message, 'data.data.GlideRecord_Subscription', {});\n\t\t\tfor (const key in fields) {\n\t\t\t\tif (key === '__typename') return;\n\n\t\t\t\tconst state = get(fields[key], '_subscription.subscription_state');\n\t\t\t\tswitch (state) {\n\t\t\t\t\tcase CHANGE:\n\t\t\t\t\t\tdispatch(itemChangedActionType, message.data.data, actionMetaData);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase ENTER:\n\t\t\t\t\t\tdispatch(itemEnteredActionType, message.data.data, actionMetaData);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase EXIT:\n\t\t\t\t\t\tdispatch(itemExitedActionType, message.data.data, actionMetaData);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase ABANDONED:\n\t\t\t\t\t\tdispatch(conditionAbandonedActionType, message.data.data, actionMetaData);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t} else if (isSubscribed && !shouldSubscribe) {\n\t\tchannelListener.unsubscribe();\n\t\tambChannelRegistry.delete(registryId);\n\t\tdispatch(unsubscribeSuccessActionType, {}, actionMetaData);\n\t}\n}\n", "import {set} from '@servicenow/ui-utils';\n\nexport default class QueryContext {\n\tconstructor(contextArguments) {\n\t\tconst {\n\t\t\tinitialPayloadActionType,\n\t\t\tadditionalDataActionType,\n\t\t\tsuccessActionType,\n\t\t\tdispatch,\n\t\t\tactionMetaData = {}\n\t\t} = contextArguments;\n\t\tthis.initialPayloadActionType = initialPayloadActionType;\n\t\tthis.additionalDataActionType = additionalDataActionType;\n\t\tthis.successActionType = successActionType;\n\t\tthis.dispatchFunction = dispatch;\n\t\tthis.actionMetadata = actionMetaData;\n\t\tthis.resetContext();\n\t}\n\n\tdataReceived(dataReceived, responseHeaders = null) {\n\t\tif (dataReceived === null || dataReceived === undefined || dataReceived.data === undefined) {\n\t\t\tif (this.initialPayloadEmpty) this.setFirstDataReceived({data: {}});\n\t\t\treturn;\n\t\t}\n\n\t\t//Set initial payload data\n\t\tif (this.initialPayloadEmpty) {\n\t\t\tthis.setFirstDataReceived(dataReceived);\n\t\t\tthis.dispatchInitialPayloadAction(responseHeaders);\n\t\t} else {\n\t\t\tthis.updateDataReceived(dataReceived);\n\t\t\tthis.dispatchAdditionalDataAction(dataReceived, responseHeaders);\n\t\t}\n\t}\n\n\tsetFirstDataReceived(data) {\n\t\tthis.initialPayloadEmpty = false;\n\t\tthis.finalPayload = data;\n\t}\n\n\tupdateDataReceived(updatePayload) {\n\t\t//Merge new data\n\t\tif (Array.isArray(updatePayload.path))\n\t\t\tset(this.finalPayload.data, updatePayload.path, updatePayload.data);\n\n\t\t//Merge any new errors\n\t\tconst receivedErrors = updatePayload.errors;\n\t\tif (Array.isArray(receivedErrors) && receivedErrors.length) {\n\t\t\tif (!Array.isArray(this.finalPayload.errors)) this.finalPayload.errors = [];\n\n\t\t\tthis.finalPayload.errors = this.finalPayload.errors.concat(receivedErrors);\n\t\t}\n\t}\n\n\tsuccessPayloadReceived(payload, responseHeaders = null) {\n\t\t//If we've already received data then we can ignore this payload and just dispatch the\n\t\t//success action, otherwise we set the payload, and if they have designated a dataReceivedActionType\n\t\t//we dispatch that also\n\t\tif (this.initialPayloadEmpty) {\n\t\t\tthis.setFirstDataReceived(payload);\n\t\t\tthis.dispatchInitialPayloadAction(responseHeaders, false);\n\t\t}\n\n\t\tthis.dispatchSuccessAction(responseHeaders);\n\t}\n\n\tdispatchInitialPayloadAction(responseHeaders, shouldClone = true) {\n\t\t//Don't dispatch if we have a PersistedQueryException! Seems kind of arbitrary here, not sure where\n\t\t//else to put this check\n\t\tconst {errors = []} = this.finalPayload;\n\t\tif (errors.some(({errorType}) => errorType === 'PersistedQueryNotFound')) return;\n\n\t\tif (this.dispatchFunction && this.initialPayloadActionType) {\n\t\t\tthis.dispatchFunction(\n\t\t\t\tthis.initialPayloadActionType,\n\t\t\t\t//Since this is just JSON from the graphql response, we can do a stringify/parse to clone it\n\t\t\t\tshouldClone ? JSON.parse(JSON.stringify(this.finalPayload)) : this.finalPayload,\n\t\t\t\t{\n\t\t\t\t\t...this.actionMetadata,\n\t\t\t\t\tresponseHeaders\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t}\n\n\tdispatchAdditionalDataAction(dataReceived, responseHeaders) {\n\t\tif (this.dispatchFunction && this.additionalDataActionType) {\n\t\t\tthis.dispatchFunction(this.additionalDataActionType, dataReceived, {\n\t\t\t\t...this.actionMetadata,\n\t\t\t\tresponseHeaders\n\t\t\t});\n\t\t}\n\t}\n\n\tdispatchSuccessAction(responseHeaders) {\n\t\tif (this.dispatchFunction && this.successActionType) {\n\t\t\tthis.dispatchFunction(this.successActionType, this.finalPayload, {\n\t\t\t\t...this.actionMetadata,\n\t\t\t\tresponseHeaders\n\t\t\t});\n\t\t}\n\t}\n\n\tget response() {\n\t\treturn this.finalPayload;\n\t}\n\n\tisStreamingRequest() {\n\t\treturn Boolean(this.initialPayloadActionType || this.additionalDataActionType);\n\t}\n\n\twasStreamingResponse(headers) {\n\t\treturn Boolean(\n\t\t\theaders?.['content-type']?.includes('multipart/mixed') && this.isStreamingRequest()\n\t\t);\n\t}\n\n\tclearStreaming() {\n\t\tthis.initialPayloadActionType = undefined;\n\t\tthis.additionalDataActionType = undefined;\n\t}\n\n\tresetContext() {\n\t\tthis.finalPayload = {data: {}};\n\t\tthis.initialPayloadEmpty = true;\n\t}\n\n\tgetActiveSpan() {\n\t\treturn this.actionMetadata?.span;\n\t}\n\n\t//We dont want this to serialize to anything in case it is included in requests\n\ttoJSON() {\n\t\treturn null;\n\t}\n}\n", "/**\n * This is a temporary workaround to expose legacy global variables\n * to keep the Seismic Test Plugin (component drivers) working correctly.\n * Please rip this out (and fix the esbuild.config.js to use the correct\n * entry point) once we get a real fix for that\n */\n\nimport * as exports from './index.js';\n\nif (typeof window !== 'undefined') window.__TECTONIC__$servicenow_ui_effect_helpers = exports;\n\nexport * from './index.js';\n", "/**\n * This is a temporary workaround to expose legacy global variables\n * to keep the Seismic Test Plugin (component drivers) working correctly.\n * Please rip this out (and fix the esbuild.config.js to use the correct\n * entry point) once we get a real fix for that\n */\n\nimport * as exports from './index.js';\n\nif (typeof window !== 'undefined') window.__TECTONIC__$servicenow_ui_effect_http = exports;\n\nexport * from './index.js';\n", "export {default as createHttpEffect} from './httpEffect';\n", "import * as uiAnalyticsConsumer from '@servicenow/ui-analytics-consumer';\nimport {mark, types as metrics, getInteractionId} from '@servicenow/ui-metrics';\nimport {createHttpErrorAction, postTxnStatus} from '@servicenow/ui-effect-helpers';\nimport sendRequest from './sendRequest';\nimport replacePathParameters from './replacePathParams';\nimport {\n\tget,\n\tpick,\n\tisEqual,\n\taddPendingNetworkActionForHost,\n\tremovePendingNetworkActionForHost,\n\tdefer,\n\tgetSpanOptions\n} from '@servicenow/ui-internal';\n\nimport {configConstants, getConfigItem} from '@servicenow/ui-config';\n\nimport log from './log';\nimport {\n\tSPAN_ATTR_HTTP_BATCH,\n\tSPAN_ATTR_HTTP_CACHEABLE,\n\tSPAN_ATTR_HTTP_ERR,\n\tSPAN_ATTR_HTTP_METHOD,\n\tSPAN_ATTR_HTTP_STATUS,\n\tSPAN_ATTR_HTTP_URL,\n\tSPAN_FOR_HTTP,\n\tSPAN_KIND_CLIENT,\n\tSPAN_TRACE_PARENT,\n\tSPAN_ATTR_INTERACTION_ID,\n\tSPAN_DOCUMENT_TRACE_PARENT\n} from './constants';\n\nexport const HTTP_REQUEST_STARTED = 'HTTP_REQUEST_STARTED';\nexport const HTTP_REQUEST_PROGRESS_UPDATED = 'HTTP_REQUEST_PROGRESS_UPDATED';\nexport const HTTP_REQUEST_SUCCEEDED = 'HTTP_REQUEST_SUCCEEDED';\nexport const HTTP_REQUEST_FAILED = 'HTTP_REQUEST_FAILED';\nexport const HTTP_CACHE_UPDATED = 'HTTP_CACHE_UPDATED';\nexport const HTTP_EFFECT_SESSION_NOTIFICATIONS_RECEIVED =\n\t'HTTP_EFFECT_SESSION_NOTIFICATIONS_RECEIVED';\n\nexport const HEADER_X_WANT_AUTH_SESSION_NOTIFICATION_MESSAGES = 'X-WantAuthSessionNotifications';\n\nconst {HTTP_CACHING_REFRESH_DELAY} = configConstants;\n\nconst cacheDelay = getConfigItem(HTTP_CACHING_REFRESH_DELAY) || 10000;\nconst {tracer, createTraceParentHeader} = uiAnalyticsConsumer;\n\nexport const createMultipartConfig = (\n\t{partReceivedActionType, parsePartsAsJson, emitCompletedResponse},\n\tdispatch,\n\tmetaData\n) => {\n\tlet multipartConfig;\n\tif (partReceivedActionType) {\n\t\tmultipartConfig = {\n\t\t\tmultipartConsumer: partRecvd =>\n\t\t\t\tdispatch(partReceivedActionType, partRecvd?.body, {\n\t\t\t\t\t...metaData,\n\t\t\t\t\tresponseHeaders: partRecvd?.headers\n\t\t\t\t})\n\t\t};\n\n\t\tmultipartConfig.parsePartsAsJson =\n\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\tparsePartsAsJson != undefined ? Boolean(parsePartsAsJson) : true;\n\t\tmultipartConfig.emitCompletedResponse =\n\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\temitCompletedResponse != undefined ? Boolean(emitCompletedResponse) : true;\n\t}\n\n\treturn multipartConfig;\n};\n\nexport function* httpEffect(url, options = {}, coeffects) {\n\tconst {\n\t\tmethod = 'GET',\n\t\theaders = {},\n\t\theaderList = [],\n\t\tpathParams = [],\n\t\tqueryParams = [],\n\t\tdataParam = 'data',\n\t\tbatch = true,\n\t\tcacheable = false,\n\t\tencodeURIComponent = true,\n\t\tcancelPromiseSymbol,\n\t\tstartActionType = HTTP_REQUEST_STARTED,\n\t\tprogressActionType = HTTP_REQUEST_PROGRESS_UPDATED,\n\t\tsuccessActionType = HTTP_REQUEST_SUCCEEDED,\n\t\terrorActionType = HTTP_REQUEST_FAILED,\n\t\tcacheUpdateActionType = HTTP_CACHE_UPDATED,\n\t\tstreaming = {}\n\t} = options;\n\n\tconst {action, dispatch, host} = coeffects;\n\tconst {payload} = action;\n\tconst updatedUrl = replacePathParameters(url, pick(payload, pathParams), {\n\t\tencodeURIComponent\n\t});\n\tconst params = pick(payload, queryParams);\n\tconst data = get(payload, dataParam, undefined);\n\n\tconst httpSpan = tracer.startSpan(SPAN_FOR_HTTP, {\n\t\t...getSpanOptions(host),\n\t\tkind: SPAN_KIND_CLIENT\n\t});\n\thttpSpan.setAttribute(SPAN_ATTR_HTTP_METHOD, method);\n\thttpSpan.setAttribute(SPAN_ATTR_HTTP_URL, updatedUrl);\n\tconst metaData = {\n\t\t...action.meta,\n\t\t...(httpSpan.isRecording() && {span: httpSpan}),\n\t\trequest: {\n\t\t\turl,\n\t\t\tupdatedUrl,\n\t\t\tparams,\n\t\t\tdata,\n\t\t\t...options\n\t\t}\n\t};\n\tconst showUxfTxnStatus =\n\t\t(options?.showUxfTxnStatus ?? metaData?.showUxfTxnStatus ?? payload?.showUxfTxnStatus) !==\n\t\tfalse;\n\tconst multipartConfig = createMultipartConfig(streaming, dispatch, metaData);\n\n\tfunction onUploadProgress(progressEvent) {\n\t\tdispatch(progressActionType, {progressEvent}, metaData);\n\t}\n\tlet requestId, interactionId, error, success;\n\taddPendingNetworkActionForHost(action, host);\n\ttry {\n\t\tdispatch(startActionType, {}, metaData);\n\t\tinteractionId = getInteractionId(action.meta);\n\t\tif (updatedUrl.indexOf('/null') !== -1 || updatedUrl.indexOf('/undefined') !== -1) {\n\t\t\tconst {tagName, nowId} = host;\n\t\t\tlog(\n\t\t\t\t`An HTTP request with the url of ${updatedUrl} was made. Please verify that ${updatedUrl} is a valid URL.`,\n\t\t\t\t{\n\t\t\t\t\ttagName,\n\t\t\t\t\tcomponentId: nowId,\n\t\t\t\t\thost,\n\t\t\t\t\torigin: 'httpEffect'\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\n\t\t/* Required by WebAPI team to send `session.notifications` as part of the responses */\n\t\tif (headers[HEADER_X_WANT_AUTH_SESSION_NOTIFICATION_MESSAGES] == null) {\n\t\t\theaders[HEADER_X_WANT_AUTH_SESSION_NOTIFICATION_MESSAGES] = true;\n\t\t}\n\t\theaders['NOW-UI-INTERACTION'] = interactionId;\n\t\tif (window.nowUiFramework && window.nowUiFramework.uxrInteractionId) {\n\t\t\theaders['NOW-UX-INTERACTION'] =\n\t\t\t\twindow.nowUiFramework.getUxrInteractionIdByHost?.(host) ||\n\t\t\t\twindow.nowUiFramework.uxrInteractionId;\n\t\t}\n\n\t\tmark(host, interactionId, metrics.HTTP, {\n\t\t\tpath: updatedUrl,\n\t\t\ttype: action.type,\n\t\t\tbatch\n\t\t});\n\t\thttpSpan.setAttribute(SPAN_ATTR_HTTP_BATCH, batch);\n\t\thttpSpan.setAttribute(SPAN_ATTR_HTTP_CACHEABLE, cacheable);\n\t\thttpSpan.setAttribute(SPAN_ATTR_INTERACTION_ID, interactionId);\n\t\tconst traceparent = createTraceParentHeader(httpSpan.id, httpSpan.traceId);\n\t\thttpSpan.setAttribute(SPAN_TRACE_PARENT, traceparent);\n\t\thttpSpan.setAttribute(SPAN_DOCUMENT_TRACE_PARENT, httpSpan.documentTraceParent);\n\n\t\tconst requestHeaders = {\n\t\t\t...pick(payload, headerList),\n\t\t\t...headers,\n\t\t\t...(httpSpan.isRecording() && {traceparent})\n\t\t};\n\t\trequestId = postTxnStatus({\n\t\t\tshowUxfTxnStatus,\n\t\t\thost,\n\t\t\trequestType: action?.type ?? SPAN_FOR_HTTP,\n\t\t\trequestUrl: updatedUrl,\n\t\t\trequestMethod: method,\n\t\t\trequestData: data,\n\t\t\tstatus: 'started',\n\t\t\tinteractionId,\n\t\t\tspanId: httpSpan?.isRecording() ? httpSpan?.id : undefined,\n\t\t\tstreaming: !!multipartConfig\n\t\t});\n\t\tconst request = sendRequest(updatedUrl, method, {\n\t\t\theaders: requestHeaders,\n\t\t\tparams,\n\t\t\t...(data && {data}),\n\t\t\tonUploadProgress,\n\t\t\tbatch,\n\t\t\tcacheable,\n\t\t\tcancelPromiseSymbol,\n\t\t\tmultipartConfig,\n\t\t\t...(httpSpan.isRecording() && {span: httpSpan})\n\t\t});\n\n\t\tlet result = yield request;\n\t\tconst {isCachedResult = false, requestPromise = async () => {}} = result;\n\t\tif (!isCachedResult) {\n\t\t\tresult = yield requestPromise();\n\t\t}\n\n\t\tconst {\n\t\t\theaders: responseHeaders,\n\t\t\tdata: successData,\n\t\t\trefetchPromise = null,\n\t\t\tstatus,\n\t\t\tstatusText\n\t\t} = result;\n\t\tsuccess = {\n\t\t\tdata: successData,\n\t\t\tstatus\n\t\t};\n\n\t\tif (isCachedResult && refetchPromise) {\n\t\t\tdispatch(successActionType, successData, {...metaData, responseHeaders, status, statusText});\n\t\t\tdefer(() => {\n\t\t\t\trefetchPromise().then(refetchResult => {\n\t\t\t\t\t// compare cachedResult and refetchResult\n\t\t\t\t\tif (!isEqual(successData, refetchResult.data)) {\n\t\t\t\t\t\tdispatch(cacheUpdateActionType, refetchResult.data, {\n\t\t\t\t\t\t\t...metaData,\n\t\t\t\t\t\t\tresponseHeaders: refetchResult.headers,\n\t\t\t\t\t\t\tstatus: refetchResult.status,\n\t\t\t\t\t\t\tstatusText: refetchResult.statusText\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}, cacheDelay);\n\t\t} else {\n\t\t\thttpSpan.setAttribute(SPAN_ATTR_HTTP_STATUS, status);\n\n\t\t\tdispatch(successActionType, successData, {...metaData, responseHeaders, status, statusText});\n\t\t\tsuccessData?.session &&\n\t\t\t\tdispatch(HTTP_EFFECT_SESSION_NOTIFICATIONS_RECEIVED, successData.session, {\n\t\t\t\t\t...metaData,\n\t\t\t\t\tresponseHeaders,\n\t\t\t\t\tstatus,\n\t\t\t\t\tstatusText\n\t\t\t\t});\n\t\t}\n\t} catch (err) {\n\t\terror = err;\n\t\t// @FIXME: IndexedDB/cache error type DomException from effect-helpers/src/cache/store.js\n\t\t// Ends up in this catch, but this is only designed to catch http error, need to handle in sendRequest()\n\t\tmetaData.responseHeaders = get(error, 'options.responseHeaders', null);\n\t\tmetaData.status = error.status;\n\t\tmetaData.statusText = error.statusText;\n\t\tif (error.name) metaData.name = error.name;\n\t\thttpSpan.setAttribute(SPAN_ATTR_HTTP_ERR, error.message);\n\t\thttpSpan.setAttribute(SPAN_ATTR_HTTP_STATUS, error.status);\n\t\tdispatch(errorActionType, error, metaData, true);\n\n\t\t// Standard action dispatched on HTTP errors from the server\n\t\tconst {status, statusText, message, data: errorData} = error;\n\t\tconst {\n\t\t\ttype,\n\t\t\tpayload,\n\t\t\tmeta,\n\t\t\terror: httpError\n\t\t} = createHttpErrorAction(status, statusText, message, errorData, metaData);\n\t\tdispatch(type, payload, meta, httpError);\n\t} finally {\n\t\tremovePendingNetworkActionForHost(action, host);\n\t\thttpSpan.endSpan();\n\n\t\tpostTxnStatus({\n\t\t\tshowUxfTxnStatus,\n\t\t\thost,\n\t\t\trequestId,\n\t\t\trequestType: action?.type ?? SPAN_FOR_HTTP,\n\t\t\trequestUrl: updatedUrl,\n\t\t\trequestMethod: method,\n\t\t\trequestData: data,\n\t\t\tstatus: error ? 'failure' : 'success',\n\t\t\tresponseStatus: error ? error?.status : success?.status,\n\t\t\tresponse: error ? error : success?.data,\n\t\t\tinteractionId,\n\t\t\tstreaming: !!multipartConfig\n\t\t});\n\t}\n}\n\n/**\n * Effect that makes an HTTP request and dispatches actions at relevant parts of the life cycle:\n *  - Before the request is sent\n *  - After the request has returned (success or error)\n *  - Upload of progress updates\n *\n * The Success and Action Types that are returned also contain a `meta` property with helpful information\n * useful for debugging purposes including the response headers.\n *\n * @function createHttpEffect\n * @example\n * import {createHttpEffect} from '@servicenow/ui-effect-http';\n *\n * const USER_FETCH_SUCCESS = 'USER_FETCH_SUCCESS'\n *\n * const fetchUserEffect = createHttpEffect('api/users/:id', {\n *      method: 'POST'\n *      headers: {},\n *      pathParams: ['id']\n *      dataParam: 'data',\n *      successActionType: USER_FETCH_SUCCESS\n * });\n *\n * // Register with component action handlers:\n * {\n *     actionHandlers: {\n *         'USER_FETCHED': fetchUserEffect,\n *         [USER_FETCH_SUCCESS]: ({action, updateState}) => {...}\n *     }\n * }\n *\n * @param {String} url - URL to endpoint\n * @param {Object} options\n * @param {String} options.method - Request method: GET, POST, PUT, PATCH, DELETE (default: GET)\n * @param {Object} options.headers - Request headers\n * @param {Object<String>} options.headerList - dynamic HTTP request headers\n * @param {Boolean} options.batch - Enable or disable batching for requests made by this effect (default: true)\n * @param {Boolean} options.encodeURIComponent - Encode URL (default: true)\n * @param {String} options.dataParam - Property in dispatched action to map to the data property of the HTTP request\n * @param {Array<String>} options.pathParams - Array of properties in dispatched action to map values to dynamic path variables (\"api/users/:id\")\n * @param {Array<String>} options.queryParams - Array of properties in dispatched action to map values to URL query string variables (\"api/users?id=abc123)\n * @param {String} options.startActionType - Action to be dispatched when the HTTP request has been issued\n * @param {Object} options.streaming -  JSON object to describe how to handle data when a streaming (multipart/mixed) response is expected\n * @param options.&lt;streaming&gt;.partReceivedActionType {String} - The action to be dispatched when a streaming data part has been received\n * @param options.&lt;streaming&gt;.parsePartsAsJson {Boolean} - Parse each received data part as JSON (default: true)\n * @param options.&lt;streaming&gt;.emitCompletedResponse {Boolean} - Also emit the full response payload via the successActionType (default: true)\n * @param {String} options.progressActionType - Action to be dispatched when onprogress is triggered during the HTTP request\n * @param {String} options.successActionType - Action to be dispatched when the HTTP request has successfully completed. The response data will be available as payload which will be of type object for application/json content-type and String for others\n * @param {String} options.errorActionType - Action to be dispatched when the HTTP request has failed\n * @param {Boolean} options.showUxfTxnStatus - Whether to consider this request for showing UXF Long running transaction status (default: true)\n *\n * @return {Object} Http Effect Descriptor\n */\nexport default function createHttpEffect(url, options) {\n\treturn {\n\t\teffect: httpEffect,\n\t\targs: [url, options]\n\t};\n}\n", "import {omit, pick, whenIdle} from '@servicenow/ui-internal';\nimport {configConstants, getConfigItem} from '@servicenow/ui-config';\nimport {getUserSysId, makePersistentCache, makeLRUCachePolicy} from '@servicenow/ui-effect-helpers';\nimport createSnHttp from './snHttp';\nimport filterHeaders from './filterHeaders';\nimport log from './log';\n\nconst IGNORED_HEADERS = ['NOW-UI-INTERACTION', 'NOW-UX-INTERACTION'];\nconst {HTTP_CACHING_ENABLED, HTTP_CACHE_CAPACITY, HTTP_CACHE_MAX_PERSIST} = configConstants;\nconst isCacheEnabled = getConfigItem(HTTP_CACHING_ENABLED);\nconst cacheCapacity = getConfigItem(HTTP_CACHE_CAPACITY);\nconst cacheMaxPersist = getConfigItem(HTTP_CACHE_MAX_PERSIST) || 2880;\n\nlet persistantCache;\n\nconst getCache = async function () {\n\tif (persistantCache) {\n\t\treturn persistantCache;\n\t}\n\ttry {\n\t\tpersistantCache = await makePersistentCache({\n\t\t\tdbName: 'Seismic',\n\t\t\tstoreName: 'gqlQueries',\n\t\t\tschemaVersion: 1,\n\t\t\toptions: {cachePolicy: makeLRUCachePolicy(cacheCapacity)}\n\t\t});\n\t} catch (e) {\n\t\treturn null;\n\t}\n\treturn persistantCache;\n};\n\nconst getCacheKey = ({url, headers, params}) => {\n\tconst stringifiedHeaders = JSON.stringify(omit(headers, IGNORED_HEADERS));\n\tconst stringifiedParams = JSON.stringify(params);\n\n\t// @FIXME: This is more fragile than a faberge egg.  Find or create a public API to get a user sys_id\n\tconst userToken = getUserSysId(globalThis);\n\n\treturn `${url}:${stringifiedHeaders}:${stringifiedParams}:${userToken}`;\n};\n\nexport default async function sendRequest(url, method, options) {\n\tconst snHttp = window?.nowUiFramework?.snHttp || (await createSnHttp());\n\tconst {\n\t\theaders = {},\n\t\tparams,\n\t\tdata,\n\t\tonUploadProgress = () => {},\n\t\tbatch = true,\n\t\tcacheable = false,\n\t\tcancelPromiseSymbol,\n\t\tmultipartConfig,\n\t\tspan: httpSpan\n\t} = options;\n\n\tconst abortController = new AbortController();\n\tconst updatedHeaders = filterHeaders(headers);\n\tconst cacheKey = getCacheKey({url, headers: updatedHeaders, params});\n\t// Disable caching for multipart requests\n\t// eslint-disable-next-line eqeqeq\n\tconst cacheRequested = cacheable && multipartConfig == null;\n\tconst shouldCache = cacheRequested && method === 'GET';\n\tconst isImpersonating = window.NOW?.user?.isImpersonating;\n\thttpSpan?.setAttribute('is.impersonating', isImpersonating);\n\thttpSpan?.addEvent('sendRequest');\n\tconst promise = () => {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tsnHttp\n\t\t\t\t.request(url, method, {\n\t\t\t\t\theaders: updatedHeaders,\n\t\t\t\t\tparams,\n\t\t\t\t\tdata,\n\t\t\t\t\tonUploadProgress,\n\t\t\t\t\tbatch,\n\t\t\t\t\tsignal: abortController.signal,\n\t\t\t\t\tmultipartConfig,\n\t\t\t\t\tspan: httpSpan\n\t\t\t\t})\n\t\t\t\t.then(async results => {\n\t\t\t\t\tif (isCacheEnabled && shouldCache && !isImpersonating) {\n\t\t\t\t\t\tconst cache = await getCache();\n\t\t\t\t\t\tif (cache) {\n\t\t\t\t\t\t\tconst dataToCache = pick(results, ['data', 'headers', 'status', 'statusText']);\n\t\t\t\t\t\t\t// add now as the cached date if its not on the header\n\t\t\t\t\t\t\tif (!dataToCache?.headers?.date) {\n\t\t\t\t\t\t\t\tif (dataToCache?.headers) {\n\t\t\t\t\t\t\t\t\tdataToCache.headers.date = Date.now();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tawait cache.set(cacheKey, dataToCache);\n\n\t\t\t\t\t\t\twhenIdle(() => cache.persist());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\thttpSpan?.setStatus(results.status);\n\t\t\t\t\tresolve(results);\n\t\t\t\t})\n\t\t\t\t.catch(error => {\n\t\t\t\t\tconst {response: {data, status, statusText, headers} = {}, message} = error;\n\t\t\t\t\thttpSpan?.setStatus(status);\n\t\t\t\t\thttpSpan?.recordException(error);\n\n\t\t\t\t\treject({\n\t\t\t\t\t\tdata,\n\t\t\t\t\t\tstatus,\n\t\t\t\t\t\tstatusText,\n\t\t\t\t\t\toptions: {\n\t\t\t\t\t\t\t...(updatedHeaders && {headers: updatedHeaders}),\n\t\t\t\t\t\t\t...(headers && {responseHeaders: headers}),\n\t\t\t\t\t\t\t...(params && {params}),\n\t\t\t\t\t\t\t...(data && {data})\n\t\t\t\t\t\t},\n\t\t\t\t\t\t...(message && {message})\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t});\n\t};\n\n\tif (cancelPromiseSymbol) {\n\t\tpromise[cancelPromiseSymbol] = () => {\n\t\t\tabortController.abort();\n\t\t};\n\t}\n\tconst cache = await getCache();\n\tconst isCached = cache ? await cache.has(cacheKey) : false;\n\tif (shouldCache && isCached) {\n\t\tconst cachedResult = await cache.get(cacheKey);\n\n\t\tconst {headers} = cachedResult;\n\t\tconst cachedDate = new Date(headers?.date);\n\t\tif (headers?.date && cachedDate) {\n\t\t\tconst minutesSinceCached = (Date.now() - cachedDate) / 1000 / 60;\n\t\t\tif (minutesSinceCached < cacheMaxPersist) {\n\t\t\t\treturn {\n\t\t\t\t\tisCachedResult: true,\n\t\t\t\t\trefetchPromise: promise,\n\t\t\t\t\t...cachedResult\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t} else if (cacheRequested && !shouldCache) {\n\t\tlog(`HTTP caching not available for ${method} method requests`);\n\t}\n\n\treturn {\n\t\tisCachedResult: false,\n\t\trequestPromise: promise\n\t};\n}\n", "import getGlobalObject from './getGlobalObject';\nimport isBatchingEnabled from './isBatchingEnabled';\nimport {createSnHttp} from '@servicenow/ui-utils';\n\nconst root = getGlobalObject();\nconst {navigator} = root;\n\nconst createSnHttpForRest = createSnHttp({\n\txsrfToken: root.g_ck,\n\txTransactionSource: root.transaction_source,\n\tmaxConcurrent: navigator && navigator.userAgent.indexOf('Trident/7.0') !== -1 ? 1 : 4,\n\tbatching: isBatchingEnabled(root)\n});\n\nexport default createSnHttpForRest;\n", "export default function getGlobalObject() {\n\tif (typeof self !== 'undefined') return self;\n\n\tif (typeof window !== 'undefined') return window;\n\n\tif (typeof global !== 'undefined') return global;\n\n\tthrow new Error('Unable to locate global object');\n}\n", "import {getConfigItem, configConstants} from '@servicenow/ui-config';\n\nconst {DISABLE_REST_BATCHING} = configConstants;\nexport default function isBatchingEnabled() {\n\tif (typeof getConfigItem(DISABLE_REST_BATCHING) === 'boolean')\n\t\treturn !getConfigItem(DISABLE_REST_BATCHING);\n\n\treturn true;\n}\n", "import {memoize} from '@servicenow/ui-internal';\n\nfunction containsNonAsciiChars(str = '') {\n\treturn typeof str !== 'string' ? false : [...str].some(char => char.charCodeAt(0) > 127);\n}\n\nconst memoizedContainsNonAsciiChars = memoize(containsNonAsciiChars, {\n\tprofileName: 'containsNonAsciiChars'\n});\n\n/**\n * Removes headers with non ascii values\n * @private\n * @param headers\n */\nexport default function filterHeaders(headers) {\n\tconst nonAsciiHeader = {};\n\tfor (const key in headers) {\n\t\tif (!memoizedContainsNonAsciiChars(headers[key])) nonAsciiHeader[key] = headers[key];\n\t}\n\n\treturn nonAsciiHeader;\n}\n", "import {createLogger} from '@servicenow/ui-internal';\n\nexport default createLogger({\n\tmodule: '@servicenow/ui-effect-http'\n});\n", "import pathToRegexp from 'path-to-regexp';\n\nexport default function replacePathParameters(\n\turl = '',\n\tpathParams = {},\n\t{encodeURIComponent} = {}\n) {\n\tconst toPath = pathToRegexp.compile(url, {sensitive: true, whitelist: './'});\n\tconst toPathOptions = encodeURIComponent === false ? {encode: str => str} : {};\n\treturn toPath(pathParams, toPathOptions);\n}\n", "export const SPAN_FOR_HTTP = 'HTTP';\nexport const SPAN_KIND_CLIENT = 3;\nexport const SPAN_ATTR_HTTP_URL = 'http.request.url';\nexport const SPAN_ATTR_HTTP_METHOD = 'http.request.method';\nexport const SPAN_ATTR_HTTP_HEADERS = 'http.request.headers';\nexport const SPAN_ATTR_HTTP_PARAMS = 'http.request.params';\nexport const SPAN_ATTR_HTTP_DATA = 'http.request.data';\nexport const SPAN_ATTR_HTTP_BATCH = 'http.request.batch';\nexport const SPAN_ATTR_HTTP_CACHEABLE = 'http.effect.isCacheable';\nexport const SPAN_ATTR_HTTP_STATUS = 'http.response.status';\nexport const SPAN_ATTR_INTERACTION_ID = 'interactionId';\n\nexport const SPAN_ATTR_HTTP_ERR = 'http.request.error';\n\nexport const SPAN_TRACE_PARENT = 'traceparent';\nexport const SPAN_ATTR_KIND = 'kind';\nexport const SPAN_ATTR_LEVEL = 'level';\nexport const SPAN_LEVEL_FINE = 100;\nexport const SPAN_DOCUMENT_TRACE_PARENT = 'X-DocumentTraceParent';\n", "/**\n * This is a temporary workaround to expose legacy global variables\n * to keep the Seismic Test Plugin (component drivers) working correctly.\n * Please rip this out (and fix the esbuild.config.js to use the correct\n * entry point) once we get a real fix for that\n */\n\nimport * as exports from './index.js';\n\nif (typeof window !== 'undefined') window.__TECTONIC__$servicenow_ui_effect_update_state = exports;\n\nexport * from './index.js';\n", "export {default as createUpdateStateEffect} from './updateStateEffect';\n", "import {createLogger, isEqual, getHostInfo} from '@servicenow/ui-internal';\n\nconst log = createLogger();\n\nexport function updateStateEffect(reducerFn = s => s, coeffects) {\n\tconst {state, action, updateProperties, updateState, host} = coeffects;\n\tconst updatedState = reducerFn(state, action);\n\n\tconst {tagName, componentId} = getHostInfo(host);\n\tlog('createUpdateStateEffect has been deprecated. Please use updateState helper instead.', {\n\t\ttagName,\n\t\tcomponentId,\n\t\thost,\n\t\torigin: 'updateStateEffect'\n\t});\n\n\t// LEGACY: support legacy components that are spreading properties across state\n\tif (!isEqual(updatedState.properties, state.properties)) {\n\t\tupdateProperties(updatedState.properties);\n\t\tlog(\n\t\t\t'Spreading properties across state in a createUpdateStateEffect is no longer supported. Please use the updateProperties helper.',\n\t\t\t{host, origin: 'updateStateEffect'}\n\t\t);\n\t}\n\n\tupdateState(updatedState, {\n\t\tSCHEDULE_IMMEDIATELY_DO_NOT_USE_OR_YOU_WILL_BE_IMMEDIATELY_FIRED: true\n\t});\n}\n\n/**\n * **This package is deprecated. Please read about the new helper `updateState` in the state and helpers pages under Main Concepts**\n *\n * Effect that updates the UI Framework data store. Data is stored under the context of the dispatching action that triggered the effect.\n *\n * **Note**: If possible, use the updateState helper function that supports declarative state updates instead.\n *\n * @function createUpdateStateEffect\n * @example\n * import {createUpdateStateEffect} from '@servicenow/ui-effect-update-state';\n *\n * const addActionPayloadToStateEffect = createUpdateStateEffect(\n *   (state, action) => ({...state, ...action.payload})\n * );\n *\n * // Register with component action handlers:\n * {\n *   actionHandlers: {\n *     'SOMETHING_HAPPENED': addActionPayloadToStateEffect\n *   }\n * }\n *\n * @param {Function} reducerFn - Function that reduces current state to new state: (currentState, action) => newState\n * @return {Object} Update State Effect Descriptor\n */\nexport default function createUpdateStateEffect(reducerFn) {\n\treturn {\n\t\teffect: updateStateEffect,\n\t\targs: [reducerFn]\n\t};\n}\n", "/**\n * This is a temporary workaround to expose legacy global variables\n * to keep the Seismic Test Plugin (component drivers) working correctly.\n * Please rip this out (and fix the esbuild.config.js to use the correct\n * entry point) once we get a real fix for that\n */\n\nimport * as exports from './index.js';\n\nif (typeof window !== 'undefined') window.__TECTONIC__$servicenow_ui_internal = exports;\n\nexport * from './index.js';\n", "/**\n * This is a temporary workaround to expose legacy global variables\n * to keep the Seismic Test Plugin (component drivers) working correctly.\n * Please rip this out (and fix the esbuild.config.js to use the correct\n * entry point) once we get a real fix for that\n */\n\nimport * as exports from './index.js';\n\nif (typeof window !== 'undefined') window.__TECTONIC__$servicenow_ui_metrics = exports;\n\nexport * from './index.js';\n", "/**\n * This is a temporary workaround to expose legacy global variables\n * to keep the Seismic Test Plugin (component drivers) working correctly.\n * Please rip this out (and fix the esbuild.config.js to use the correct\n * entry point) once we get a real fix for that\n */\n\nimport * as exports from './index.js';\n\nif (typeof window !== 'undefined') window.__TECTONIC__$servicenow_ui_renderer_default = exports;\n\nexport * from './index.js';\nexport {default} from './index.js';\n", "import snabbdom from '@servicenow/ui-renderer-snabbdom';\n\nexport default snabbdom;\n", "/**\n * This is a temporary workaround to expose legacy global variables\n * to keep the Seismic Test Plugin (component drivers) working correctly.\n * Please rip this out (and fix the esbuild.config.js to use the correct\n * entry point) once we get a real fix for that\n */\n\nimport * as exports from './index.js';\n\nif (typeof window !== 'undefined') window.__TECTONIC__$servicenow_ui_renderer_snabbdom = exports;\n\nexport * from './index.js';\nexport {default} from './index.js';\n", "/**\n * This is a temporary workaround to expose legacy global variables\n * to keep the Seismic Test Plugin (component drivers) working correctly.\n * Please rip this out (and fix the esbuild.config.js to use the correct\n * entry point) once we get a real fix for that\n */\n\nimport * as exports from './index.js';\n\nif (typeof window !== 'undefined') window.__TECTONIC__$servicenow_ui_types = exports;\n\nexport * from './index.js';\n", "export * from './primitives';\nexport * from './sets';\n", "/***\n * A primitive is JSON Schema with a few extra ServiceNow specific fields, it\n * has the following structure:\n *\n * interface Schema extends JSONSchema {\n *   nowName: string,\n *   nowLabel: string,\n *   nowDescription: string\n * }\n */\n\nexport const table = {\n\tnowName: 'table',\n\tnowLabel: 'Table Name',\n\tnowDescription: 'The name of the table',\n\ttype: 'string'\n};\n\nexport const sysId = {\n\tnowName: 'sys-id',\n\tnowLabel: 'Sys ID',\n\tnowDescription: 'The unique record identifier',\n\ttype: 'string',\n\tpattern: '^[a-f0-9]{32}$'\n};\n\nexport const query = {\n\tnowName: 'query',\n\tnowLabel: 'Query',\n\tnowDescription: 'The query to filter the result set',\n\ttype: 'string'\n};\n", "/***\n * A set has the following structure:\n *\n * interface Set {\n *   nowName: string,\n *   nowLabel: string,\n *   nowDescription: string,\n *   [propertyName: string]: Schema\n * }\n *\n * Set primitives.js for how Schema is defined\n *\n * TODO: Do we need a way to mark which properties in a set are required (must be defined in the properties config)\n * and which are optional? In addition, do we need to if properties must be set as required (non-null)\n * in the schema or not?\n */\nimport * as primitives from './primitives';\n\nexport const record = {\n\tnowName: 'record',\n\tnowLabel: 'Record',\n\tnowDescription: null,\n\tsysId: primitives.sysId,\n\ttable: primitives.table,\n\tview: {\n\t\tnowLabel: 'View',\n\t\ttype: 'string'\n\t}\n};\n\nexport const list = {\n\tnowName: 'list',\n\tnowLabel: 'List',\n\tnowDescription: null,\n\ttable: primitives.table,\n\tquery: primitives.query,\n\tpage: {\n\t\tnowLabel: 'Page number',\n\t\tnowDescription: null,\n\t\ttype: 'integer'\n\t},\n\trecordsPerPage: {\n\t\tnowLabel: 'Records per Page',\n\t\tnowDescription: null,\n\t\ttype: 'integer'\n\t}\n};\n", "/**\n * This is a temporary workaround to expose legacy global variables\n * to keep the Seismic Test Plugin (component drivers) working correctly.\n * Please rip this out (and fix the esbuild.config.js to use the correct\n * entry point) once we get a real fix for that\n */\n\nimport * as exports from './index.js';\n\nif (typeof window !== 'undefined') window.__TECTONIC__$servicenow_ui_utils = exports;\n\nexport * from './index.js';\n", "/**\n * This is a temporary workaround to expose legacy global variables\n * to keep the Seismic Test Plugin (component drivers) working correctly.\n * Please rip this out (and fix the esbuild.config.js to use the correct\n * entry point) once we get a real fix for that\n */\n\nimport * as exports from 'sn-seismic-post-message/src/index.js';\n\nif (typeof window !== 'undefined') window.__TECTONIC__sn_seismic_post_message = exports;\n\nexport * from 'sn-seismic-post-message/src/index.js';\n", "window.addEventListener('message', (e) => {\n\tconst lookup = origins[e.origin];\n\tif (!lookup) {\n\t\treturn;\n\t}\n\n\tconst { event, message } = lookup.deconstructMessage(e.data);\n\n\tif (event && lookup && lookup.events.has(event)) {\n\t\tconst { components, transform } = lookup;\n\t\tfor (let component of components) {\n\t\t\tconst { dispatch } = component.props;\n\t\t\tdispatch(event, Object.assign({ meta: createMetaData(e.origin) }, transform(component.props, event, formatMessage(message))));\n\t\t}\n\t}\n\n}, false);\n\nconst formatMessage = (message) => {\n\tif (typeof message === 'object' && !Array.isArray(message)) {\n\t\treturn message;\n\t}\n\n\treturn { message };\n};\n\nconst origins = {\n\t'*': {\n\t\tevents: new Set(),\n\t\tcomponents: new Set()\n\t}\n};\nconst add = (set, events) => {\n\tevents.forEach((event) => {\n\t\tset.add(event);\n\t});\n\treturn set;\n};\n\nconst createMetaData = (origin) => {\n\treturn {\n\t\torigin,\n\t\ttimestamp: (new Date()).getTime()\n\t};\n};\n\nconst create = (events = [], component, config = {}) => {\n\tconst configuration = Object.assign({ origin: '*', target: null }, config);\n\tconst { dispatch } = component.props;\n\tconst { origin } = configuration;\n\tconst lookup = origins[origin] || (origins[origin] = {});\n\tlookup.events = !lookup.events ? new Set(events) : add(lookup.events, events);\n\tlookup.components = !lookup.components ? new Set([component]) : lookup.components.add(component);\n\tlookup.constructMessage = config.constructMessage || ((data) => data);\n\tlookup.deconstructMessage = config.deconstructMessage || ((data) => data);\n\tlookup.transform = config.transform || ((props, event, message) => message);\n\n\treturn {\n\t\tpost: (event, message) => {\n\t\t\tconst { target, origin } = configuration;\n\t\t\tif (!target && process.env.NODE_ENV !== 'production') { // eslint-disable-line no-undef\n\t\t\t\tconsole.warn('[sn-seismic-post-message] target is not defined.'); // eslint-disable-line no-console\n\t\t\t}\n\n\t\t\tdispatch(event, Object.assign({ meta: createMetaData(window.location.origin) }, formatMessage(message)));\n\t\t\ttarget.postMessage(lookup.constructMessage(event, message), origin);\n\t\t},\n\t\tunbind() {\n\t\t\tconst lookup = origins[origin];\n\t\t\treturn lookup && lookup.components.delete(component);\n\t\t},\n\t\ttarget: (target = window) => {\n\t\t\tconfiguration.target = target;\n\t\t}\n\t};\n};\n\nexport { create };\n", "/**\n * This is a temporary workaround to expose legacy global variables\n * to keep the Seismic Test Plugin (component drivers) working correctly.\n * Please rip this out (and fix the esbuild.config.js to use the correct\n * entry point) once we get a real fix for that\n */\n\nimport * as exports from 'sn-translate/src/index.js';\n\nif (typeof window !== 'undefined') window.__TECTONIC__sn_translate = exports;\n\nexport * from 'sn-translate/src/index.js';\n", "\"use strict\";\n\nimport format from 'string-template';\n\nconst SN_TRANSLATE = 'sn-translate';\nconst TRANSLATIONS = '__TRANSLATIONS__';\nconst TRANSLATIONS_PREFIX = '__TECTONIC_TRANSLATIONS_PREFIX__';\nconst TRANSLATIONS_STORE = '__TECTONIC_TRANSLATIONS__';\nconst STATIC_TRANSLATIONS = window && window[TRANSLATIONS] || (window[TRANSLATIONS] = {});\nconst DEFAULT_TRANSLATIONS = Object.assign({}, STATIC_TRANSLATIONS);\n\nif (!window[TRANSLATIONS_STORE])\n\twindow[TRANSLATIONS_STORE] = DEFAULT_TRANSLATIONS;\n\nfunction attachToWindow ({ compat = false } = {}) {\n\tconst translationProperties = Reflect.getOwnPropertyDescriptor(window, TRANSLATIONS);\n\tif (translationProperties.configurable) {\n\t\tObject.defineProperty(window, TRANSLATIONS, {\n\t\t\tconfigurable: compat,\n\t\t\tget() {\n\t\t\t\treturn Object.assign({}, window[TRANSLATIONS_STORE]);\n\t\t\t},\n\t\t\tset(value) {\n\t\t\t\tif (!window[TRANSLATIONS_STORE])\n\t\t\t\t\twindow[TRANSLATIONS_STORE] = Object.assign({}, STATIC_TRANSLATIONS);\n\n\t\t\t\tappendTranslations(value);\n\t\t\t}\n\t\t})\n\t} else {\n\t\tconsole.warn(`[${SN_TRANSLATE}] If you're seeing this message, it probably means that you've loaded two copies of ${SN_TRANSLATE} on the page. At this time, only a single copy of ${SN_TRANSLATE} can be loaded at a time.`);\n\t}\n}\n\nfunction getPrefix() {\n\tif (!window)\n\t\treturn '';\n\n\tif (window[TRANSLATIONS_PREFIX])\n\t\treturn window[TRANSLATIONS_PREFIX];\n\n\tconst enabled = window.__TRANSLATIONS_PREFIX_ENABLED__;\n\tconst prefixName = window.__TRANSLATIONS_PREFIX__ || 'SNT';\n\twindow.__TRANSLATIONS_PREFIX_ENABLED__ = void 0;\n\twindow.__TRANSLATIONS_PREFIX__ = void 0;\n\twindow[TRANSLATIONS_PREFIX] = enabled ? `${prefixName}:` : '';\n\n\treturn window[TRANSLATIONS_PREFIX];\n}\n\nexport function appendTranslations(translations) {\n\tfor (const k in translations)\n\t\twindow[TRANSLATIONS_STORE][k] = translations[k];\n}\n\n\n/**\n * the first parameter of t can be a string or an object of the format:\n * {code: 'code', message: 'Hello!', comment: 'used by translators, ignored by t'}\n * t can transform ordered parameters or named parameters: 'User Status: {0} or 'User Status: {firstName}'\n * @param {*} val \n * @param  {...any} rest \n */\nexport function t(val, ...rest) {\n\tif (!window[TRANSLATIONS_STORE])\n\t\twindow[TRANSLATIONS_STORE] = DEFAULT_TRANSLATIONS;\n \n\tconst translations = window[TRANSLATIONS_STORE];\n\tconst prefix = getPrefix();    \n\n\tlet key = val;\n\tlet codeKey;\n\n\t//check for possible new format of translations\n\tif(val && typeof val === 'object' && val.message) {\n\t\tkey = val.message;\n\t\tif(val.code)\n\t\t\tcodeKey = `${val.code}:${val.message}`;\n\t}\n\n\tconst translation = translations[codeKey] || translations[key] || key; \t//requirements order of precedence\n\treturn format(`${prefix}${translation}`, ...rest);\n}\n\nexport function hasTranslation(str) {\n\treturn window[TRANSLATIONS_STORE].hasOwnProperty(str)\n}\n\nif (process && process.env && parseInt(process.env.SN_TRANSLATE_COMPAT)) \n\tattachToWindow({ compat: true });\nelse\n\tattachToWindow();\n", "/**\n * This is a workaround to expose sn-custom-create-element in a similar fashion as\n * the other legacy global variables exposed (sn-seismic-addons.js, sn-seismic-post-message.js, etc)\n * in order to allow the server-side UMD bundle creation logic to serve ui-mega within a larger\n * bundle.\n * Please rip this out when there is a solution in place to remove the other referenced shims.\n */\nimport customCreateElement from 'sn-custom-create-element';\n\nif (typeof window !== 'undefined')\n\twindow.__TECTONIC__sn_custom_create_element = customCreateElement;\n\nexport default {\n\tdefault: customCreateElement,\n\t__esModule: true\n};\n"],
  "mappings": "mpBAAA,gCAEA,OAAO,eAAe,GAAS,aAAc,CAC3C,MAAO,EACT,CAAC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,OAAO,IAAqB,EAAO,CAAY,UAO3D,IAAU,QAAa,CAAC,EAAmB,SAAU,MAAO,EAElE,CAEA,MAAO,EACR,EAEe,YACd,EAAQ,CAAC,WAAY,CAAC,CAAC,EACvB,EACA,EAAqB,CAAC,EACrB,CACD,GAAM,GAAqB,CAAC,EAE5B,OAAW,KAAK,GACf,EAAmB,GAAK,GACvB,EAAoB,GACpB,CAAC,EAAmB,GAAI,EAAM,WAAW,EAAE,EAC3C,EAAoB,GAAG,OACxB,EAGD,MAAO,EACR,CC7DA,ICAA,QCAA,yOCAA,wFCAA,ICAA,ICAA,IAAO,GAAM,IAAc,OACd,GAAc,OACd,GAAc,OACd,GAAc,OACd,GAAe,KAEf,GAAU,CACtB,OACA,MACA,eACA,KACA,QACA,QACA,QACA,QACA,SACD,EAEa,GAAgB,CAAC,YAAa,WAAW,EACzC,GAAgC,CAAC,YAAa,WAAW,EACzD,GAAoC,CAChD,UAAW,0BACX,UAAW,yBACZ,EACa,GAAmC,CAC/C,wBAAyB,YACzB,wBAAyB,WAC1B,EAEa,GAAoB,oBAG1B,GAAM,IAAkB,CAC9B,OACA,UACA,mBACA,MACA,MACA,QACA,eACA,YACA,WACA,UACA,UACA,UACA,QACA,WACA,YACA,WACA,SACA,OACA,WACA,aACA,OACA,KACA,KACA,YACA,YACA,QACA,SACA,WACA,OACA,cACA,WACA,MACA,WACA,WACA,OACA,OACA,UACA,WACA,OACA,MACA,WACA,SACA,QACA,OACA,OACD,EAEa,GAA4B,CACxC,GAAG,GACH,eACA,YACA,0BACA,0BACA,iCACA,0BACD,EAEa,GAAgC,CAC5C,GAAG,GACH,SACA,iBACA,YACA,SACA,QACA,QACA,iBACA,aACA,UACA,SACA,WACA,YACA,UACA,OACA,OACA,WACA,QACA,OACA,UACA,UACA,kBACA,cACA,WACA,SACA,cACA,WACA,WACA,MACA,UACA,WACA,UACA,MACA,OACA,aACA,cACA,aACA,iBACA,aACA,UACA,SACA,OACA,YACA,gBACA,YACA,QACA,WAC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ACb,WAAY,GACZ,oBAAqB,GACrB,OAAQ,GACR,cAAe,CACd,GAAG,GACH,WAAY,+CACb,EACA,yBAA0B,CACzB,GAAG,GACH,WAAY,+CACb,EACA,aAAc,CACb,GAAG,GACH,MAAO,EACR,EACA,SAAU,EACX,EACA,qBAAsB,EACvB,CACD,EAEM,GAAe,CACpB,GAAG,GACH,MAAO,CACN,MAAO,CACN,CACC,GAAG,GACH,WAAY,CACX,OAAQ,GACR,MAAO,EACR,EACA,qBAAsB,EACvB,EACA,EACD,CACD,CACD,EAEM,GAAU,CACf,GAAG,GACH,qBAAsB,CACrB,GAAG,GACH,WAAY,CACX,SAAU,CACT,GAAG,GACH,WAAY,oDACZ,MAAO,CACN,MAAO,CACN,CACC,GAAG,GACH,WAAY,CACX,OAAQ,GACR,GAAI,GACJ,KAAM,EACP,EACA,qBAAsB,EACvB,EACA,EACD,CACD,CACD,EACA,aAAc,CACb,GAAG,GACH,WAAY,iEACb,EACA,OAAQ,CACP,GAAG,GACH,WAAY,mDACb,EACA,QAAS,CACR,KAAM,UACN,WAAY,qEACb,EACA,OAAQ,EACT,EACA,qBAAsB,EACvB,CACD,EAEM,GAAiB,CACtB,GAAG,GACH,qBAAsB,CACrB,MAAO,CACN,CACC,GAAG,GACH,WAAY,CACX,OAAQ,GACR,KAAM,GACN,eAAgB,GAChB,gBAAiB,GACjB,gBACA,SAAU,CACT,MAAO,CACN,CACC,GAAG,GACH,WAAY,CACX,KAAM,CACL,GAAG,GACH,KAAM,CAAC,GAAc,QAAQ,CAC9B,EACA,MAAO,GACP,QAAS,GACT,QAAS,EACV,EACA,qBAAsB,EACvB,EACA,CACC,GAAG,GACH,WAAY,CACX,KAAM,CACL,GAAG,GACH,KAAM,CAAC,GAAc,QAAQ,CAC9B,EACA,MAAO,EACR,EACA,qBAAsB,EACvB,EACA,CACC,GAAG,GACH,WAAY,CACX,KAAM,CACL,GAAG,GACH,KAAM,CAAC,GAAc,WAAW,CACjC,CACD,EACA,qBAAsB,EACvB,CACD,CACD,CACD,EACA,qBAAsB,EACvB,EACA,EACD,CACD,CACD,EAEM,GAAgB,CACrB,GAAG,GACH,MAAO,CACN,GAAG,GACH,WAAY,CACX,OAAQ,CACP,GAAG,GACH,SAAU,EACV,MAAO,EACR,EACA,OAAQ,GACR,OAAQ,CACP,MAAO,CAAC,GAAa,EAAW,CACjC,EACA,QAAS,GACT,SAAU,CACT,MAAO,CACN,CACC,GAAG,GACH,WAAY,CACX,KAAM,CACL,GAAG,GACH,KAAM,CAAC,GAAc,QAAQ,CAC9B,EACA,MAAO,GACP,QAAS,GACT,QAAS,EACV,EACA,qBAAsB,EACvB,EACA,CACC,GAAG,GACH,WAAY,CACX,KAAM,CACL,GAAG,GACH,KAAM,CAAC,GAAc,QAAQ,CAC9B,EACA,MAAO,EACR,EACA,qBAAsB,EACvB,EACA,CACC,GAAG,GACH,WAAY,CACX,KAAM,CACL,GAAG,GACH,KAAM,CAAC,GAAc,WAAW,CACjC,CACD,EACA,qBAAsB,EACvB,CACD,CACD,CACD,EACA,SAAU,CAAC,SAAU,QAAQ,EAC7B,qBAAsB,EACvB,CACD,EAEM,GAAe,CAAC,EAEhB,GAAkB,CACvB,GAAG,EACJ,EAEM,GAAc,CACnB,GAAG,GACH,WAAY,qFACb,EACM,GAAY,CACjB,GAAG,GACH,WAAY,kFACb,EAEM,GAAe,CACpB,GAAG,GACH,WAAY,qFACb,EAEM,GAAkB,CACvB,GAAG,GACH,WAAY,EACb,EAEM,GAAW,CAChB,GAAG,GACH,WAAY,CACX,KAAM,GACN,cACA,WACA,kBACA,WAAY,GACZ,iBACA,gBACA,mBACA,eACA,aACA,gBACA,kBACD,EACA,qBAAsB,EACvB,EAEM,GAAyB,CAC9B,GAAG,GACH,WAAY,CACX,KAAM,GACN,aACD,EACA,qBAAsB,EACvB,EAEM,GAAY,GAAqB,CACtC,GAAG,GACH,WAAY,CACX,UAAW,CACV,GAAG,GACH,MAAO,CACN,MAAO,CACN,GACA,CACC,GAAG,GACH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ACtB,KAAK,oBAAoB,CAAa,GAE/C,MAAO,EACT,CAEA,cAAe,CACb,GAAM,CAAE,aAAc,KAAK,SAErB,EAAQ,KAAK,OAAO,QAAQ,EAElC,GAAI,IAAc,QAAa,EAAM,OAAS,EAAU,KACtD,GAAE,KAAK,cAEH,KAAK,cAAgB,GACvB,KAAM,IACJ,KAAK,OAAO,OACZ,EAAM,MACN,+BAA+B,4BACjC,CAGN,CACF,EAKA,YAAsB,EAAO,CAC3B,GAAM,GAAQ,EAAM,MACpB,MAAO,IAAiB,EAAM,IAAI,EAAK,IAAS,KAAO,KAAK,KAAW,GACzE,CAKA,YAA0B,EAAM,CAC9B,MAAO,IAAsB,CAAI,EAAI,IAAI,KAAU,CACrD,CiBn/CA,ICAA,IAIO,YAAqB,EAAK,CAC/B,MAAO,IAAI,EAAI,QAAQ,GAAe,EAAe,IACvD,CAEA,GAAM,IAAgB,gCAEtB,YAAyB,EAAK,CAC5B,MAAO,IAAgB,EAAI,WAAW,CAAC,EACzC,CAEA,GAAM,IAAkB,CACtB,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,MACA,MACA,MACA,UACA,MACA,MACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,GACA,GACA,MACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,OACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,G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