index.js.map 109 KB

1
  1. {"version":3,"sources":["../src/index.tsx","../src/literals/index.ts","../src/components/index.tsx","../src/modules/dom.ts","../src/modules/helpers.ts","../src/modules/step.ts","../src/defaults.ts","../src/styles.ts","../src/modules/store.ts","../src/components/Step.tsx","../src/modules/scope.ts","../src/components/Beacon.tsx","../src/components/Overlay.tsx","../src/components/Spotlight.tsx","../src/components/Portal.tsx","../src/components/Tooltip/index.tsx","../src/components/Tooltip/Container.tsx","../src/components/Tooltip/CloseButton.tsx"],"sourcesContent":["export * from './literals';\n\n// eslint-disable-next-line no-restricted-exports\nexport { default } from './components';\nexport * from './types';\n","export const ACTIONS = {\n INIT: 'init',\n START: 'start',\n STOP: 'stop',\n RESET: 'reset',\n PREV: 'prev',\n NEXT: 'next',\n GO: 'go',\n CLOSE: 'close',\n SKIP: 'skip',\n UPDATE: 'update',\n} as const;\n\nexport const EVENTS = {\n TOUR_START: 'tour:start',\n STEP_BEFORE: 'step:before',\n BEACON: 'beacon',\n TOOLTIP: 'tooltip',\n STEP_AFTER: 'step:after',\n TOUR_END: 'tour:end',\n TOUR_STATUS: 'tour:status',\n TARGET_NOT_FOUND: 'error:target_not_found',\n ERROR: 'error',\n} as const;\n\nexport const LIFECYCLE = {\n INIT: 'init',\n READY: 'ready',\n BEACON: 'beacon',\n TOOLTIP: 'tooltip',\n COMPLETE: 'complete',\n ERROR: 'error',\n} as const;\n\nexport const STATUS = {\n IDLE: 'idle',\n READY: 'ready',\n WAITING: 'waiting',\n RUNNING: 'running',\n PAUSED: 'paused',\n SKIPPED: 'skipped',\n FINISHED: 'finished',\n ERROR: 'error',\n} as const;\n","import * as React from 'react';\nimport isEqual from '@gilbarbara/deep-equal';\nimport is from 'is-lite';\nimport treeChanges from 'tree-changes';\n\nimport {\n canUseDOM,\n getElement,\n getScrollParent,\n getScrollTo,\n hasCustomScrollParent,\n scrollTo,\n} from '~/modules/dom';\nimport { log, shouldScroll } from '~/modules/helpers';\nimport { getMergedStep, validateSteps } from '~/modules/step';\nimport createStore from '~/modules/store';\n\nimport { ACTIONS, EVENTS, LIFECYCLE, STATUS } from '~/literals';\n\nimport { defaultProps } from '~/defaults';\nimport { Actions, CallBackProps, Props, State, Status, StoreHelpers } from '~/types';\n\nimport Step from './Step';\n\nclass Joyride extends React.Component<Props, State> {\n private readonly helpers: StoreHelpers;\n private readonly store: ReturnType<typeof createStore>;\n\n static defaultProps = defaultProps;\n\n constructor(props: Props) {\n super(props);\n\n const { debug, getHelpers, run, stepIndex } = props;\n\n this.store = createStore({\n ...props,\n controlled: run && is.number(stepIndex),\n });\n this.helpers = this.store.getHelpers();\n\n const { addListener } = this.store;\n\n log({\n title: 'init',\n data: [\n { key: 'props', value: this.props },\n { key: 'state', value: this.state },\n ],\n debug,\n });\n\n // Sync the store to this component's state.\n addListener(this.syncState);\n\n if (getHelpers) {\n getHelpers(this.helpers);\n }\n\n this.state = this.store.getState();\n }\n\n componentDidMount() {\n if (!canUseDOM()) {\n return;\n }\n\n const { debug, disableCloseOnEsc, run, steps } = this.props;\n const { start } = this.store;\n\n if (validateSteps(steps, debug) && run) {\n start();\n }\n\n /* istanbul ignore else */\n if (!disableCloseOnEsc) {\n document.body.addEventListener('keydown', this.handleKeyboard, { passive: true });\n }\n }\n\n componentDidUpdate(previousProps: Props, previousState: State) {\n if (!canUseDOM()) {\n return;\n }\n\n const { action, controlled, index, lifecycle, status } = this.state;\n const { debug, run, stepIndex, steps } = this.props;\n const { stepIndex: previousStepIndex, steps: previousSteps } = previousProps;\n const { reset, setSteps, start, stop, update } = this.store;\n const { changed: changedProps } = treeChanges(previousProps, this.props);\n const { changed, changedFrom } = treeChanges(previousState, this.state);\n const step = getMergedStep(steps[index], this.props);\n\n const stepsChanged = !isEqual(previousSteps, steps);\n const stepIndexChanged = is.number(stepIndex) && changedProps('stepIndex');\n const target = getElement(step.target);\n\n if (stepsChanged) {\n if (validateSteps(steps, debug)) {\n setSteps(steps);\n } else {\n // eslint-disable-next-line no-console\n console.warn('Steps are not valid', steps);\n }\n }\n\n /* istanbul ignore else */\n if (changedProps('run')) {\n if (run) {\n start(stepIndex);\n } else {\n stop();\n }\n }\n\n /* istanbul ignore else */\n if (stepIndexChanged) {\n let nextAction: Actions =\n is.number(previousStepIndex) && previousStepIndex < stepIndex ? ACTIONS.NEXT : ACTIONS.PREV;\n\n if (action === ACTIONS.STOP) {\n nextAction = ACTIONS.START;\n }\n\n if (!([STATUS.FINISHED, STATUS.SKIPPED] as Array<Status>).includes(status)) {\n update({\n action: action === ACTIONS.CLOSE ? ACTIONS.CLOSE : nextAction,\n index: stepIndex,\n lifecycle: LIFECYCLE.INIT,\n });\n }\n }\n\n // Update the index if the first step is not found\n if (!controlled && status === STATUS.RUNNING && index === 0 && !target) {\n this.store.update({ index: index + 1 });\n this.callback({\n ...this.state,\n type: EVENTS.TARGET_NOT_FOUND,\n step,\n });\n }\n\n const callbackData = {\n ...this.state,\n index,\n step,\n };\n const isAfterAction = changed('action', [\n ACTIONS.NEXT,\n ACTIONS.PREV,\n ACTIONS.SKIP,\n ACTIONS.CLOSE,\n ]);\n\n if (isAfterAction && changed('status', STATUS.PAUSED)) {\n const previousStep = getMergedStep(steps[previousState.index], this.props);\n\n this.callback({\n ...callbackData,\n index: previousState.index,\n lifecycle: LIFECYCLE.COMPLETE,\n step: previousStep,\n type: EVENTS.STEP_AFTER,\n });\n }\n\n if (changed('status', [STATUS.FINISHED, STATUS.SKIPPED])) {\n const previousStep = getMergedStep(steps[previousState.index], this.props);\n\n if (!controlled) {\n this.callback({\n ...callbackData,\n index: previousState.index,\n lifecycle: LIFECYCLE.COMPLETE,\n step: previousStep,\n type: EVENTS.STEP_AFTER,\n });\n }\n\n this.callback({\n ...callbackData,\n type: EVENTS.TOUR_END,\n // Return the last step when the tour is finished\n step: previousStep,\n index: previousState.index,\n });\n reset();\n } else if (changedFrom('status', [STATUS.IDLE, STATUS.READY], STATUS.RUNNING)) {\n this.callback({\n ...callbackData,\n type: EVENTS.TOUR_START,\n });\n } else if (changed('status') || changed('action', ACTIONS.RESET)) {\n this.callback({\n ...callbackData,\n type: EVENTS.TOUR_STATUS,\n });\n }\n\n this.scrollToStep(previousState);\n\n if (step.placement === 'center' && status === STATUS.RUNNING && lifecycle === LIFECYCLE.INIT) {\n this.store.update({ lifecycle: LIFECYCLE.READY });\n }\n }\n\n componentWillUnmount() {\n const { disableCloseOnEsc } = this.props;\n\n /* istanbul ignore else */\n if (!disableCloseOnEsc) {\n document.body.removeEventListener('keydown', this.handleKeyboard);\n }\n }\n\n /**\n * Trigger the callback.\n */\n callback = (data: CallBackProps) => {\n const { callback } = this.props;\n\n /* istanbul ignore else */\n if (is.function(callback)) {\n callback(data);\n }\n };\n\n /**\n * Keydown event listener\n */\n handleKeyboard = (event: KeyboardEvent) => {\n const { index, lifecycle } = this.state;\n const { steps } = this.props;\n const step = steps[index];\n\n if (lifecycle === LIFECYCLE.TOOLTIP) {\n if (event.code === 'Escape' && step && !step.disableCloseOnEsc) {\n this.store.close();\n }\n }\n };\n\n /**\n * Sync the store with the component's state\n */\n syncState = (state: State) => {\n this.setState(state);\n };\n\n scrollToStep(previousState: State) {\n const { index, lifecycle, status } = this.state;\n const {\n debug,\n disableScrollParentFix = false,\n scrollDuration,\n scrollOffset = 20,\n scrollToFirstStep = false,\n steps,\n } = this.props;\n const step = getMergedStep(steps[index], this.props);\n\n const target = getElement(step.target);\n const shouldScrollToStep = shouldScroll({\n isFirstStep: index === 0,\n lifecycle,\n previousLifecycle: previousState.lifecycle,\n scrollToFirstStep,\n step,\n target,\n });\n\n if (status === STATUS.RUNNING && shouldScrollToStep) {\n const hasCustomScroll = hasCustomScrollParent(target, disableScrollParentFix);\n const scrollParent = getScrollParent(target, disableScrollParentFix);\n let scrollY = Math.floor(getScrollTo(target, scrollOffset, disableScrollParentFix)) || 0;\n\n log({\n title: 'scrollToStep',\n data: [\n { key: 'index', value: index },\n { key: 'lifecycle', value: lifecycle },\n { key: 'status', value: status },\n ],\n debug,\n });\n\n const beaconPopper = this.store.getPopper('beacon');\n const tooltipPopper = this.store.getPopper('tooltip');\n\n /* istanbul ignore else */\n if (lifecycle === LIFECYCLE.BEACON && beaconPopper) {\n const { offsets, placement } = beaconPopper;\n\n /* istanbul ignore else */\n if (!['bottom'].includes(placement) && !hasCustomScroll) {\n scrollY = Math.floor(offsets.popper.top - scrollOffset);\n }\n } else if (lifecycle === LIFECYCLE.TOOLTIP && tooltipPopper) {\n const { flipped, offsets, placement } = tooltipPopper;\n\n if (['top', 'right', 'left'].includes(placement) && !flipped && !hasCustomScroll) {\n scrollY = Math.floor(offsets.popper.top - scrollOffset);\n } else {\n scrollY -= step.spotlightPadding;\n }\n }\n\n scrollY = scrollY >= 0 ? scrollY : 0;\n\n /* istanbul ignore else */\n if (status === STATUS.RUNNING) {\n scrollTo(scrollY, { element: scrollParent as Element, duration: scrollDuration }).then(\n () => {\n setTimeout(() => {\n this.store.getPopper('tooltip')?.instance.update();\n }, 10);\n },\n );\n }\n }\n }\n\n render() {\n if (!canUseDOM()) {\n return null;\n }\n\n const { index, status } = this.state;\n const {\n continuous = false,\n debug = false,\n nonce,\n scrollToFirstStep = false,\n steps,\n } = this.props;\n let output;\n\n if (status === STATUS.RUNNING && steps[index]) {\n const step = getMergedStep(steps[index], this.props);\n\n output = (\n <Step\n {...this.state}\n callback={this.callback}\n continuous={continuous}\n debug={debug}\n helpers={this.helpers}\n nonce={nonce}\n shouldScroll={!step.disableScrolling && (index !== 0 || scrollToFirstStep)}\n step={step}\n store={this.store}\n />\n );\n }\n\n return <div className=\"react-joyride\">{output}</div>;\n }\n}\n\nexport default Joyride;\n","import scroll from 'scroll';\nimport scrollParent from 'scrollparent';\n\nexport function canUseDOM() {\n return !!(typeof window !== 'undefined' && window.document && window.document.createElement);\n}\n\n/**\n * Find the bounding client rect\n */\nexport function getClientRect(element: HTMLElement | null) {\n if (!element) {\n return null;\n }\n\n return element.getBoundingClientRect();\n}\n\n/**\n * Helper function to get the browser-normalized \"document height\"\n */\nexport function getDocumentHeight(): number {\n const { body, documentElement } = document;\n\n if (!body || !documentElement) {\n return 0;\n }\n\n return Math.max(\n body.scrollHeight,\n body.offsetHeight,\n documentElement.clientHeight,\n documentElement.scrollHeight,\n documentElement.offsetHeight,\n );\n}\n\n/**\n * Find and return the target DOM element based on a step's 'target'.\n */\nexport function getElement(element: string | HTMLElement): HTMLElement | null {\n /* istanbul ignore else */\n if (typeof element === 'string') {\n return document.querySelector(element);\n }\n\n return element;\n}\n\n/**\n * Get computed style property\n */\nexport function getStyleComputedProperty(el: HTMLElement): CSSStyleDeclaration | null {\n if (!el || el.nodeType !== 1) {\n return null;\n }\n\n return getComputedStyle(el);\n}\n\n/**\n * Get scroll parent with fix\n */\nexport function getScrollParent(\n element: HTMLElement | null,\n skipFix: boolean,\n forListener?: boolean,\n) {\n if (!element) {\n return scrollDocument();\n }\n\n const parent = scrollParent(element) as HTMLElement;\n\n if (parent) {\n if (parent.isSameNode(scrollDocument())) {\n if (forListener) {\n return document;\n }\n\n return scrollDocument();\n }\n\n const hasScrolling = parent.scrollHeight > parent.offsetHeight;\n\n /* istanbul ignore else */\n if (!hasScrolling && !skipFix) {\n parent.style.overflow = 'initial';\n\n return scrollDocument();\n }\n }\n\n return parent;\n}\n\n/**\n * Check if the element has custom scroll parent\n */\nexport function hasCustomScrollParent(element: HTMLElement | null, skipFix: boolean): boolean {\n if (!element) {\n return false;\n }\n\n const parent = getScrollParent(element, skipFix);\n\n return parent ? !parent.isSameNode(scrollDocument()) : false;\n}\n\n/**\n * Check if the element has custom offset parent\n */\nexport function hasCustomOffsetParent(element: HTMLElement): boolean {\n return element.offsetParent !== document.body;\n}\n\n/**\n * Check if an element has fixed/sticky position\n */\nexport function hasPosition(el: HTMLElement | Node | null, type: string = 'fixed'): boolean {\n if (!el || !(el instanceof HTMLElement)) {\n return false;\n }\n\n const { nodeName } = el;\n const styles = getStyleComputedProperty(el);\n\n if (nodeName === 'BODY' || nodeName === 'HTML') {\n return false;\n }\n\n if (styles && styles.position === type) {\n return true;\n }\n\n if (!el.parentNode) {\n return false;\n }\n\n return hasPosition(el.parentNode, type);\n}\n\n/**\n * Check if the element is visible\n */\nexport function isElementVisible(element: HTMLElement): element is HTMLElement {\n if (!element) {\n return false;\n }\n\n let parentElement: HTMLElement | null = element;\n\n while (parentElement) {\n if (parentElement === document.body) {\n break;\n }\n\n /* istanbul ignore else */\n if (parentElement instanceof HTMLElement) {\n const { display, visibility } = getComputedStyle(parentElement);\n\n if (display === 'none' || visibility === 'hidden') {\n return false;\n }\n }\n\n parentElement = parentElement.parentElement ?? null;\n }\n\n return true;\n}\n\n/**\n * Find and return the target DOM element based on a step's 'target'.\n */\nexport function getElementPosition(\n element: HTMLElement | null,\n offset: number,\n skipFix: boolean,\n): number {\n const elementRect = getClientRect(element);\n const parent = getScrollParent(element, skipFix);\n const hasScrollParent = hasCustomScrollParent(element, skipFix);\n let parentTop = 0;\n let top = elementRect?.top ?? 0;\n\n /* istanbul ignore else */\n if (parent instanceof HTMLElement) {\n parentTop = parent.scrollTop;\n\n if (!hasScrollParent && !hasPosition(element)) {\n top += parentTop;\n }\n\n if (!parent.isSameNode(scrollDocument())) {\n top += scrollDocument().scrollTop;\n }\n }\n\n return Math.floor(top - offset);\n}\n\n/**\n * Get the scrollTop position\n */\nexport function getScrollTo(element: HTMLElement | null, offset: number, skipFix: boolean): number {\n if (!element) {\n return 0;\n }\n\n const { offsetTop = 0, scrollTop = 0 } = scrollParent(element) ?? {};\n let top = element.getBoundingClientRect().top + scrollTop;\n\n if (!!offsetTop && (hasCustomScrollParent(element, skipFix) || hasCustomOffsetParent(element))) {\n top -= offsetTop;\n }\n\n const output = Math.floor(top - offset);\n\n return output < 0 ? 0 : output;\n}\n\nexport function scrollDocument(): Element | HTMLElement {\n return document.scrollingElement ?? document.documentElement;\n}\n\n/**\n * Scroll to position\n */\nexport function scrollTo(\n value: number,\n options: { duration?: number; element: Element | HTMLElement },\n): Promise<void> {\n const { duration, element } = options;\n\n return new Promise((resolve, reject) => {\n const { scrollTop } = element;\n\n const limit = value > scrollTop ? value - scrollTop : scrollTop - value;\n\n scroll.top(element as HTMLElement, value, { duration: limit < 100 ? 50 : duration }, error => {\n if (error && error.message !== 'Element already at target scroll position') {\n return reject(error);\n }\n\n return resolve();\n });\n });\n}\n","import { isValidElement, ReactNode } from 'react';\nimport { createPortal } from 'react-dom';\nimport is from 'is-lite';\n\nimport { LIFECYCLE } from '~/literals';\n\nimport { Lifecycle, Step } from '~/types';\n\nimport { hasPosition } from './dom';\n\ninterface LogOptions {\n /** The data to be logged */\n data: any;\n /** display the log */\n debug?: boolean;\n /** The title the logger was called from */\n title: string;\n /** If true, the message will be a warning */\n warn?: boolean;\n}\n\ninterface ShouldScrollOptions {\n isFirstStep: boolean;\n lifecycle: Lifecycle;\n previousLifecycle: Lifecycle;\n scrollToFirstStep: boolean;\n step: Step;\n target: HTMLElement | null;\n}\n\nexport const isReact16 = createPortal !== undefined;\n\n/**\n * Get the current browser\n */\nexport function getBrowser(userAgent: string = navigator.userAgent): string {\n let browser = userAgent;\n\n if (typeof window === 'undefined') {\n browser = 'node';\n }\n // @ts-expect-error IE support\n else if (document.documentMode) {\n browser = 'ie';\n } else if (/Edge/.test(userAgent)) {\n browser = 'edge';\n }\n // @ts-expect-error Opera 8.0+\n else if (Boolean(window.opera) || userAgent.includes(' OPR/')) {\n browser = 'opera';\n }\n // @ts-expect-error Firefox 1.0+\n else if (typeof window.InstallTrigger !== 'undefined') {\n browser = 'firefox';\n }\n // @ts-expect-error Chrome 1+\n else if (window.chrome) {\n browser = 'chrome';\n }\n // Safari (and Chrome iOS, Firefox iOS)\n else if (/(Version\\/([\\d._]+).*Safari|CriOS|FxiOS| Mobile\\/)/.test(userAgent)) {\n browser = 'safari';\n }\n\n return browser;\n}\n\n/**\n * Get Object type\n */\nexport function getObjectType(value: unknown): string {\n return Object.prototype.toString.call(value).slice(8, -1).toLowerCase();\n}\n\n/**\n * Get text from React components\n */\nexport function getText(root: ReactNode): string {\n const content: Array<string | number> = [];\n\n const recurse = (child: ReactNode) => {\n /* istanbul ignore else */\n if (typeof child === 'string' || typeof child === 'number') {\n content.push(child);\n } else if (Array.isArray(child)) {\n child.forEach(c => recurse(c));\n } else if (isValidElement(child)) {\n const { children } = child.props;\n\n if (Array.isArray(children)) {\n children.forEach(c => recurse(c));\n } else {\n recurse(children);\n }\n }\n };\n\n recurse(root);\n\n return content.join(' ').trim();\n}\n\nexport function hasValidKeys(object: Record<string, unknown>, keys?: Array<string>): boolean {\n if (!is.plainObject(object) || !is.array(keys)) {\n return false;\n }\n\n return Object.keys(object).every(d => keys.includes(d));\n}\n\n/**\n * Convert hex to RGB\n */\nexport function hexToRGB(hex: string): Array<number> {\n const shorthandRegex = /^#?([\\da-f])([\\da-f])([\\da-f])$/i;\n const properHex = hex.replace(shorthandRegex, (_m, r, g, b) => r + r + g + g + b + b);\n\n const result = /^#?([\\da-f]{2})([\\da-f]{2})([\\da-f]{2})$/i.exec(properHex);\n\n return result ? [parseInt(result[1], 16), parseInt(result[2], 16), parseInt(result[3], 16)] : [];\n}\n\n/**\n * Decide if the step shouldn't skip the beacon\n * @param {Object} step\n *\n * @returns {boolean}\n */\nexport function hideBeacon(step: Step): boolean {\n return step.disableBeacon || step.placement === 'center';\n}\n\n/**\n * Detect legacy browsers\n *\n * @returns {boolean}\n */\nexport function isLegacy(): boolean {\n return !['chrome', 'safari', 'firefox', 'opera'].includes(getBrowser());\n}\n\n/**\n * Log method calls if debug is enabled\n */\nexport function log({ data, debug = false, title, warn = false }: LogOptions) {\n /* eslint-disable no-console */\n const logFn = warn ? console.warn || console.error : console.log;\n\n if (debug) {\n if (title && data) {\n console.groupCollapsed(\n `%creact-joyride: ${title}`,\n 'color: #ff0044; font-weight: bold; font-size: 12px;',\n );\n\n if (Array.isArray(data)) {\n data.forEach(d => {\n if (is.plainObject(d) && d.key) {\n logFn.apply(console, [d.key, d.value]);\n } else {\n logFn.apply(console, [d]);\n }\n });\n } else {\n logFn.apply(console, [data]);\n }\n\n console.groupEnd();\n } else {\n console.error('Missing title or data props');\n }\n }\n /* eslint-enable */\n}\n\nexport function shouldScroll(options: ShouldScrollOptions): boolean {\n const { isFirstStep, lifecycle, previousLifecycle, scrollToFirstStep, step, target } = options;\n\n return (\n !step.disableScrolling &&\n (!isFirstStep || scrollToFirstStep || lifecycle === LIFECYCLE.TOOLTIP) &&\n step.placement !== 'center' &&\n (!step.isFixed || !hasPosition(target)) && // fixed steps don't need to scroll\n previousLifecycle !== lifecycle &&\n ([LIFECYCLE.BEACON, LIFECYCLE.TOOLTIP] as Array<Lifecycle>).includes(lifecycle)\n );\n}\n","import { Props as FloaterProps } from 'react-floater';\nimport { omit, pick } from '@gilbarbara/helpers';\nimport deepmerge from 'deepmerge';\nimport is from 'is-lite';\nimport { SetRequired } from 'type-fest';\n\nimport { defaultFloaterProps, defaultLocale, defaultStep } from '~/defaults';\nimport getStyles from '~/styles';\nimport { Props, Step, StepMerged } from '~/types';\n\nimport { getElement, hasCustomScrollParent } from './dom';\nimport { log } from './helpers';\n\nfunction getTourProps(props: Props) {\n return pick(\n props,\n 'beaconComponent',\n 'disableCloseOnEsc',\n 'disableOverlay',\n 'disableOverlayClose',\n 'disableScrolling',\n 'disableScrollParentFix',\n 'floaterProps',\n 'hideBackButton',\n 'hideCloseButton',\n 'locale',\n 'showProgress',\n 'showSkipButton',\n 'spotlightClicks',\n 'spotlightPadding',\n 'styles',\n 'tooltipComponent',\n );\n}\n\nexport function getMergedStep(currentStep: Step | undefined, props: Props): StepMerged {\n const step = currentStep ?? {};\n const mergedStep = deepmerge.all([defaultStep, getTourProps(props), step], {\n isMergeableObject: is.plainObject,\n }) as StepMerged;\n\n const mergedStyles = getStyles(props.styles, mergedStep.styles);\n const scrollParent = hasCustomScrollParent(\n getElement(mergedStep.target),\n mergedStep.disableScrollParentFix,\n );\n const floaterProps = deepmerge.all([\n defaultFloaterProps,\n props.floaterProps ?? {},\n mergedStep.floaterProps ?? {},\n ]) as SetRequired<FloaterProps, 'options' | 'wrapperOptions'>;\n\n // Set react-floater props\n floaterProps.offset = mergedStep.offset;\n floaterProps.styles = deepmerge(floaterProps.styles ?? {}, mergedStyles.floaterStyles);\n\n floaterProps.offset += props.spotlightPadding ?? mergedStep.spotlightPadding ?? 0;\n\n if (mergedStep.placementBeacon && floaterProps.wrapperOptions) {\n floaterProps.wrapperOptions.placement = mergedStep.placementBeacon;\n }\n\n if (scrollParent && floaterProps.options.preventOverflow) {\n floaterProps.options.preventOverflow.boundariesElement = 'window';\n }\n\n return {\n ...mergedStep,\n locale: deepmerge.all([defaultLocale, props.locale ?? {}, mergedStep.locale || {}]),\n floaterProps,\n styles: omit(mergedStyles, 'floaterStyles'),\n };\n}\n\n/**\n * Validate if a step is valid\n */\nexport function validateStep(step: Step, debug: boolean = false): boolean {\n if (!is.plainObject(step)) {\n log({\n title: 'validateStep',\n data: 'step must be an object',\n warn: true,\n debug,\n });\n\n return false;\n }\n\n if (!step.target) {\n log({\n title: 'validateStep',\n data: 'target is missing from the step',\n warn: true,\n debug,\n });\n\n return false;\n }\n\n return true;\n}\n\n/**\n * Validate if steps are valid\n */\nexport function validateSteps(steps: Array<Step>, debug: boolean = false): boolean {\n if (!is.array(steps)) {\n log({\n title: 'validateSteps',\n data: 'steps must be an array',\n warn: true,\n debug,\n });\n\n return false;\n }\n\n return steps.every(d => validateStep(d, debug));\n}\n","import { noop } from '@gilbarbara/helpers';\n\nexport const defaultFloaterProps = {\n options: {\n preventOverflow: {\n boundariesElement: 'scrollParent',\n },\n },\n wrapperOptions: {\n offset: -18,\n position: true,\n },\n};\n\nexport const defaultLocale = {\n back: 'Back',\n close: 'Close',\n last: 'Last',\n next: 'Next',\n open: 'Open the dialog',\n skip: 'Skip',\n};\n\nexport const defaultStep = {\n event: 'click',\n placement: 'bottom',\n offset: 10,\n disableBeacon: false,\n disableCloseOnEsc: false,\n disableOverlay: false,\n disableOverlayClose: false,\n disableScrollParentFix: false,\n disableScrolling: false,\n hideBackButton: false,\n hideCloseButton: false,\n hideFooter: false,\n isFixed: false,\n locale: defaultLocale,\n showProgress: false,\n showSkipButton: false,\n spotlightClicks: false,\n spotlightPadding: 10,\n};\n\nexport const defaultProps = {\n continuous: false,\n debug: false,\n disableCloseOnEsc: false,\n disableOverlay: false,\n disableOverlayClose: false,\n disableScrolling: false,\n disableScrollParentFix: false,\n getHelpers: noop(),\n hideBackButton: false,\n run: true,\n scrollOffset: 20,\n scrollDuration: 300,\n scrollToFirstStep: false,\n showSkipButton: false,\n showProgress: false,\n spotlightClicks: false,\n spotlightPadding: 10,\n steps: [],\n};\n","import deepmerge from 'deepmerge';\nimport { PartialDeep } from 'type-fest';\n\nimport { hexToRGB } from './modules/helpers';\nimport { Styles, StylesOptions } from './types';\n\nconst defaultOptions = {\n arrowColor: '#fff',\n backgroundColor: '#fff',\n beaconSize: 36,\n overlayColor: 'rgba(0, 0, 0, 0.5)',\n primaryColor: '#f04',\n spotlightShadow: '0 0 15px rgba(0, 0, 0, 0.5)',\n textColor: '#333',\n width: 380,\n zIndex: 100,\n} satisfies StylesOptions;\n\nconst buttonBase = {\n backgroundColor: 'transparent',\n border: 0,\n borderRadius: 0,\n color: '#555',\n cursor: 'pointer',\n fontSize: 16,\n lineHeight: 1,\n padding: 8,\n WebkitAppearance: 'none' as const,\n};\n\nconst spotlight = {\n borderRadius: 4,\n position: 'absolute' as const,\n};\n\nexport default function getStyles(\n propsStyles?: PartialDeep<Styles>,\n stepStyles?: PartialDeep<Styles>,\n) {\n const mergedStyles = deepmerge(propsStyles ?? {}, stepStyles ?? {});\n const options = deepmerge(defaultOptions, mergedStyles.options || {}) satisfies StylesOptions;\n let { width } = options;\n\n if (window.innerWidth > 480) {\n width = 380;\n }\n\n if ('width' in options) {\n width =\n typeof options.width === 'number' && window.innerWidth < options.width\n ? window.innerWidth - 30\n : options.width;\n }\n\n const overlay = {\n bottom: 0,\n left: 0,\n overflow: 'hidden',\n position: 'absolute' as const,\n right: 0,\n top: 0,\n zIndex: options.zIndex,\n };\n\n const defaultStyles = {\n beacon: {\n ...buttonBase,\n display: 'inline-block',\n height: options.beaconSize,\n position: 'relative' as const,\n width: options.beaconSize,\n zIndex: options.zIndex,\n },\n beaconInner: {\n animation: 'joyride-beacon-inner 1.2s infinite ease-in-out',\n backgroundColor: options.primaryColor,\n borderRadius: '50%',\n display: 'block',\n height: '50%',\n left: '50%',\n opacity: 0.7,\n position: 'absolute' as const,\n top: '50%',\n transform: 'translate(-50%, -50%)',\n width: '50%',\n },\n beaconOuter: {\n animation: 'joyride-beacon-outer 1.2s infinite ease-in-out',\n backgroundColor: `rgba(${hexToRGB(options.primaryColor).join(',')}, 0.2)`,\n border: `2px solid ${options.primaryColor}`,\n borderRadius: '50%',\n boxSizing: 'border-box' as const,\n display: 'block',\n height: '100%',\n left: 0,\n opacity: 0.9,\n position: 'absolute' as const,\n top: 0,\n transformOrigin: 'center',\n width: '100%',\n },\n tooltip: {\n backgroundColor: options.backgroundColor,\n borderRadius: 5,\n boxSizing: 'border-box' as const,\n color: options.textColor,\n fontSize: 16,\n maxWidth: '100%',\n padding: 15,\n position: 'relative' as const,\n width,\n },\n tooltipContainer: {\n lineHeight: 1.4,\n textAlign: 'center' as const,\n },\n tooltipTitle: {\n fontSize: 18,\n margin: 0,\n },\n tooltipContent: {\n padding: '20px 10px',\n },\n tooltipFooter: {\n alignItems: 'center',\n display: 'flex',\n justifyContent: 'flex-end',\n marginTop: 15,\n },\n tooltipFooterSpacer: {\n flex: 1,\n },\n buttonNext: {\n ...buttonBase,\n backgroundColor: options.primaryColor,\n borderRadius: 4,\n color: '#fff',\n },\n buttonBack: {\n ...buttonBase,\n color: options.primaryColor,\n marginLeft: 'auto',\n marginRight: 5,\n },\n buttonClose: {\n ...buttonBase,\n color: options.textColor,\n height: 14,\n padding: 15,\n position: 'absolute' as const,\n right: 0,\n top: 0,\n width: 14,\n },\n buttonSkip: {\n ...buttonBase,\n color: options.textColor,\n fontSize: 14,\n },\n overlay: {\n ...overlay,\n backgroundColor: options.overlayColor,\n mixBlendMode: 'hard-light' as const,\n },\n overlayLegacy: {\n ...overlay,\n },\n overlayLegacyCenter: {\n ...overlay,\n backgroundColor: options.overlayColor,\n },\n spotlight: {\n ...spotlight,\n backgroundColor: 'gray',\n },\n spotlightLegacy: {\n ...spotlight,\n boxShadow: `0 0 0 9999px ${options.overlayColor}, ${options.spotlightShadow}`,\n },\n floaterStyles: {\n arrow: {\n color: options.arrowColor,\n },\n options: {\n zIndex: options.zIndex + 100,\n },\n },\n options,\n };\n\n return deepmerge(defaultStyles, mergedStyles);\n}\n","import { Props as FloaterProps } from 'react-floater';\nimport is from 'is-lite';\n\nimport { ACTIONS, LIFECYCLE, STATUS } from '~/literals';\n\nimport { AnyObject, State, Status, Step, StoreHelpers, StoreOptions } from '~/types';\n\nimport { hasValidKeys } from './helpers';\n\ntype StateWithContinuous = State & { continuous: boolean };\ntype Listener = (state: State) => void;\ntype PopperData = Parameters<NonNullable<FloaterProps['getPopper']>>[0];\n\nconst defaultState: State = {\n action: 'init',\n controlled: false,\n index: 0,\n lifecycle: LIFECYCLE.INIT,\n size: 0,\n status: STATUS.IDLE,\n};\nconst validKeys = ['action', 'index', 'lifecycle', 'status'];\n\nclass Store {\n private beaconPopper: PopperData | null;\n private tooltipPopper: PopperData | null;\n private data: Map<string, any> = new Map();\n private listener: Listener | null;\n private store: Map<string, any> = new Map();\n\n constructor(options?: StoreOptions) {\n const { continuous = false, stepIndex, steps = [] } = options ?? {};\n\n this.setState(\n {\n action: ACTIONS.INIT,\n controlled: is.number(stepIndex),\n continuous,\n index: is.number(stepIndex) ? stepIndex : 0,\n lifecycle: LIFECYCLE.INIT,\n status: steps.length ? STATUS.READY : STATUS.IDLE,\n },\n true,\n );\n\n this.beaconPopper = null;\n this.tooltipPopper = null;\n this.listener = null;\n this.setSteps(steps);\n }\n\n public getState(): State {\n if (!this.store.size) {\n return { ...defaultState };\n }\n\n return {\n action: this.store.get('action') || '',\n controlled: this.store.get('controlled') || false,\n index: parseInt(this.store.get('index'), 10),\n lifecycle: this.store.get('lifecycle') || '',\n size: this.store.get('size') || 0,\n status: (this.store.get('status') as Status) || '',\n };\n }\n\n private getNextState(state: Partial<State>, force: boolean = false): State {\n const { action, controlled, index, size, status } = this.getState();\n const newIndex = is.number(state.index) ? state.index : index;\n const nextIndex = controlled && !force ? index : Math.min(Math.max(newIndex, 0), size);\n\n return {\n action: state.action ?? action,\n controlled,\n index: nextIndex,\n lifecycle: state.lifecycle ?? LIFECYCLE.INIT,\n size: state.size ?? size,\n status: nextIndex === size ? STATUS.FINISHED : state.status ?? status,\n };\n }\n\n private getSteps(): Array<Step> {\n const steps = this.data.get('steps');\n\n return Array.isArray(steps) ? steps : [];\n }\n\n private hasUpdatedState(oldState: State): boolean {\n const before = JSON.stringify(oldState);\n const after = JSON.stringify(this.getState());\n\n return before !== after;\n }\n\n private setState(nextState: Partial<StateWithContinuous>, initial: boolean = false) {\n const state = this.getState();\n\n const { action, index, lifecycle, size, status } = {\n ...state,\n ...nextState,\n };\n\n this.store.set('action', action);\n this.store.set('index', index);\n this.store.set('lifecycle', lifecycle);\n this.store.set('size', size);\n this.store.set('status', status);\n\n if (initial) {\n this.store.set('controlled', nextState.controlled);\n this.store.set('continuous', nextState.continuous);\n }\n\n /* istanbul ignore else */\n if (this.listener && this.hasUpdatedState(state)) {\n this.listener(this.getState());\n }\n }\n\n public addListener = (listener: Listener) => {\n this.listener = listener;\n };\n\n public setSteps = (steps: Array<AnyObject>) => {\n const { size, status } = this.getState();\n const state = {\n size: steps.length,\n status,\n };\n\n this.data.set('steps', steps);\n\n if (status === STATUS.WAITING && !size && steps.length) {\n state.status = STATUS.RUNNING;\n }\n\n this.setState(state);\n };\n\n public getHelpers(): StoreHelpers {\n return {\n close: this.close,\n go: this.go,\n info: this.info,\n next: this.next,\n open: this.open,\n prev: this.prev,\n reset: this.reset,\n skip: this.skip,\n };\n }\n\n public getPopper = (name: 'beacon' | 'tooltip') => {\n if (name === 'beacon') {\n return this.beaconPopper;\n }\n\n return this.tooltipPopper;\n };\n\n public setPopper = (name: 'beacon' | 'tooltip', popper: PopperData) => {\n if (name === 'beacon') {\n this.beaconPopper = popper;\n } else {\n this.tooltipPopper = popper;\n }\n };\n\n public cleanupPoppers = () => {\n this.beaconPopper = null;\n this.tooltipPopper = null;\n };\n\n public close = () => {\n const { index, status } = this.getState();\n\n if (status !== STATUS.RUNNING) {\n return;\n }\n\n this.setState({\n ...this.getNextState({ action: ACTIONS.CLOSE, index: index + 1 }),\n });\n };\n\n public go = (nextIndex: number) => {\n const { controlled, status } = this.getState();\n\n if (controlled || status !== STATUS.RUNNING) {\n return;\n }\n\n const step = this.getSteps()[nextIndex];\n\n this.setState({\n ...this.getNextState({ action: ACTIONS.GO, index: nextIndex }),\n status: step ? status : STATUS.FINISHED,\n });\n };\n\n public info = (): AnyObject => this.getState();\n\n public next = () => {\n const { index, status } = this.getState();\n\n if (status !== STATUS.RUNNING) {\n return;\n }\n\n this.setState(this.getNextState({ action: ACTIONS.NEXT, index: index + 1 }));\n };\n\n public open = () => {\n const { status } = this.getState();\n\n if (status !== STATUS.RUNNING) {\n return;\n }\n\n this.setState({\n ...this.getNextState({ action: ACTIONS.UPDATE, lifecycle: LIFECYCLE.TOOLTIP }),\n });\n };\n\n public prev = () => {\n const { index, status } = this.getState();\n\n if (status !== STATUS.RUNNING) {\n return;\n }\n\n this.setState({\n ...this.getNextState({ action: ACTIONS.PREV, index: index - 1 }),\n });\n };\n\n public reset = (restart = false) => {\n const { controlled } = this.getState();\n\n if (controlled) {\n return;\n }\n\n this.setState({\n ...this.getNextState({ action: ACTIONS.RESET, index: 0 }),\n status: restart ? STATUS.RUNNING : STATUS.READY,\n });\n };\n\n public skip = () => {\n const { status } = this.getState();\n\n if (status !== STATUS.RUNNING) {\n return;\n }\n\n this.setState({\n action: ACTIONS.SKIP,\n lifecycle: LIFECYCLE.INIT,\n status: STATUS.SKIPPED,\n });\n };\n\n public start = (nextIndex?: number) => {\n const { index, size } = this.getState();\n\n this.setState({\n ...this.getNextState(\n {\n action: ACTIONS.START,\n index: is.number(nextIndex) ? nextIndex : index,\n },\n true,\n ),\n status: size ? STATUS.RUNNING : STATUS.WAITING,\n });\n };\n\n public stop = (advance = false) => {\n const { index, status } = this.getState();\n\n if (([STATUS.FINISHED, STATUS.SKIPPED] as Array<Status>).includes(status)) {\n return;\n }\n\n this.setState({\n ...this.getNextState({ action: ACTIONS.STOP, index: index + (advance ? 1 : 0) }),\n status: STATUS.PAUSED,\n });\n };\n\n public update = (state: Partial<State>) => {\n if (!hasValidKeys(state, validKeys)) {\n throw new Error(`State is not valid. Valid keys: ${validKeys.join(', ')}`);\n }\n\n this.setState({\n ...this.getNextState(\n {\n ...this.getState(),\n ...state,\n action: state.action ?? ACTIONS.UPDATE,\n },\n true,\n ),\n });\n };\n}\n\nexport type StoreInstance = ReturnType<typeof createStore>;\n\nexport default function createStore(options?: StoreOptions) {\n return new Store(options);\n}\n","import * as React from 'react';\nimport Floater, { Props as FloaterProps, RenderProps } from 'react-floater';\nimport is from 'is-lite';\nimport treeChanges from 'tree-changes';\n\nimport { getElement, isElementVisible } from '~/modules/dom';\nimport { hideBeacon, log } from '~/modules/helpers';\nimport Scope from '~/modules/scope';\nimport { validateStep } from '~/modules/step';\n\nimport { ACTIONS, EVENTS, LIFECYCLE, STATUS } from '~/literals';\n\nimport { StepProps } from '~/types';\n\nimport Beacon from './Beacon';\nimport Overlay from './Overlay';\nimport Portal from './Portal';\nimport Tooltip from './Tooltip/index';\n\nexport default class JoyrideStep extends React.Component<StepProps> {\n scope: Scope | null = null;\n tooltip: HTMLElement | null = null;\n\n componentDidMount() {\n const { debug, index } = this.props;\n\n log({\n title: `step:${index}`,\n data: [{ key: 'props', value: this.props }],\n debug,\n });\n }\n\n componentDidUpdate(previousProps: StepProps) {\n const {\n action,\n callback,\n continuous,\n controlled,\n debug,\n index,\n lifecycle,\n size,\n status,\n step,\n store,\n } = this.props;\n const { changed, changedFrom } = treeChanges(previousProps, this.props);\n const state = { action, controlled, index, lifecycle, size, status };\n\n const skipBeacon =\n continuous && action !== ACTIONS.CLOSE && (index > 0 || action === ACTIONS.PREV);\n const hasStoreChanged =\n changed('action') || changed('index') || changed('lifecycle') || changed('status');\n const isInitial = changedFrom('lifecycle', [LIFECYCLE.TOOLTIP, LIFECYCLE.INIT], LIFECYCLE.INIT);\n const isAfterAction = changed('action', [\n ACTIONS.NEXT,\n ACTIONS.PREV,\n ACTIONS.SKIP,\n ACTIONS.CLOSE,\n ]);\n const isControlled = controlled && index === previousProps.index;\n\n if (isAfterAction && (isInitial || isControlled)) {\n callback({\n ...state,\n index: previousProps.index,\n lifecycle: LIFECYCLE.COMPLETE,\n step: previousProps.step,\n type: EVENTS.STEP_AFTER,\n });\n }\n\n if (\n step.placement === 'center' &&\n status === STATUS.RUNNING &&\n changed('index') &&\n action !== ACTIONS.START &&\n lifecycle === LIFECYCLE.INIT\n ) {\n store.update({ lifecycle: LIFECYCLE.READY });\n }\n\n if (hasStoreChanged) {\n const element = getElement(step.target);\n const elementExists = !!element;\n const hasRenderedTarget = elementExists && isElementVisible(element);\n\n if (hasRenderedTarget) {\n if (\n changedFrom('status', STATUS.READY, STATUS.RUNNING) ||\n changedFrom('lifecycle', LIFECYCLE.INIT, LIFECYCLE.READY)\n ) {\n callback({\n ...state,\n step,\n type: EVENTS.STEP_BEFORE,\n });\n }\n } else {\n // eslint-disable-next-line no-console\n console.warn(elementExists ? 'Target not visible' : 'Target not mounted', step);\n callback({\n ...state,\n type: EVENTS.TARGET_NOT_FOUND,\n step,\n });\n\n if (!controlled) {\n store.update({ index: index + (action === ACTIONS.PREV ? -1 : 1) });\n }\n }\n }\n\n if (changedFrom('lifecycle', LIFECYCLE.INIT, LIFECYCLE.READY)) {\n store.update({\n lifecycle: hideBeacon(step) || skipBeacon ? LIFECYCLE.TOOLTIP : LIFECYCLE.BEACON,\n });\n }\n\n if (changed('index')) {\n log({\n title: `step:${lifecycle}`,\n data: [{ key: 'props', value: this.props }],\n debug,\n });\n }\n\n /* istanbul ignore else */\n if (changed('lifecycle', LIFECYCLE.BEACON)) {\n callback({\n ...state,\n step,\n type: EVENTS.BEACON,\n });\n }\n\n if (changed('lifecycle', LIFECYCLE.TOOLTIP)) {\n callback({\n ...state,\n step,\n type: EVENTS.TOOLTIP,\n });\n\n if (this.tooltip) {\n this.scope = new Scope(this.tooltip, { selector: '[data-action=primary]' });\n this.scope.setFocus();\n }\n }\n\n if (changedFrom('lifecycle', [LIFECYCLE.TOOLTIP, LIFECYCLE.INIT], LIFECYCLE.INIT)) {\n this.scope?.removeScope();\n store.cleanupPoppers();\n }\n }\n\n componentWillUnmount() {\n this.scope?.removeScope();\n }\n\n /**\n * Beacon click/hover event listener\n */\n handleClickHoverBeacon = (event: React.MouseEvent<HTMLElement>) => {\n const { step, store } = this.props;\n\n if (event.type === 'mouseenter' && step.event !== 'hover') {\n return;\n }\n\n store.update({ lifecycle: LIFECYCLE.TOOLTIP });\n };\n\n handleClickOverlay = () => {\n const { helpers, step } = this.props;\n\n if (!step.disableOverlayClose) {\n helpers.close();\n }\n };\n\n setTooltipRef = (element: HTMLElement) => {\n this.tooltip = element;\n };\n\n setPopper: FloaterProps['getPopper'] = (popper, type) => {\n const { action, step, store } = this.props;\n\n if (type === 'wrapper') {\n store.setPopper('beacon', popper);\n } else {\n store.setPopper('tooltip', popper);\n }\n\n if (store.getPopper('beacon') && store.getPopper('tooltip')) {\n store.update({\n action,\n lifecycle: LIFECYCLE.READY,\n });\n }\n\n if (step.floaterProps?.getPopper) {\n step.floaterProps.getPopper(popper, type);\n }\n };\n\n get open() {\n const { lifecycle, step } = this.props;\n\n return hideBeacon(step) || lifecycle === LIFECYCLE.TOOLTIP;\n }\n\n renderTooltip = (renderProps: RenderProps) => {\n const { continuous, helpers, index, size, step } = this.props;\n\n return (\n <Tooltip\n continuous={continuous}\n helpers={helpers}\n index={index}\n isLastStep={index + 1 === size}\n setTooltipRef={this.setTooltipRef}\n size={size}\n step={step}\n {...renderProps}\n />\n );\n };\n\n render() {\n const { continuous, debug, index, lifecycle, nonce, shouldScroll, size, step } = this.props;\n const target = getElement(step.target);\n\n if (!validateStep(step) || !is.domElement(target)) {\n return null;\n }\n\n return (\n <div key={`JoyrideStep-${index}`} className=\"react-joyride__step\">\n <Portal id=\"react-joyride-portal\">\n <Overlay\n {...step}\n debug={debug}\n lifecycle={lifecycle}\n onClickOverlay={this.handleClickOverlay}\n />\n </Portal>\n <Floater\n {...step.floaterProps}\n component={this.renderTooltip}\n debug={debug}\n getPopper={this.setPopper}\n id={`react-joyride-step-${index}`}\n open={this.open}\n placement={step.placement}\n target={step.target}\n >\n <Beacon\n beaconComponent={step.beaconComponent}\n continuous={continuous}\n index={index}\n isLastStep={index + 1 === size}\n locale={step.locale}\n nonce={nonce}\n onClickOrHover={this.handleClickHoverBeacon}\n shouldFocus={shouldScroll}\n size={size}\n step={step}\n styles={step.styles}\n />\n </Floater>\n </div>\n );\n }\n}\n","interface ScopeOptions {\n code?: string;\n selector: string | null;\n}\n\nexport default class Scope {\n element: HTMLElement;\n options: ScopeOptions;\n\n constructor(element: HTMLElement, options: ScopeOptions) {\n if (!(element instanceof HTMLElement)) {\n throw new TypeError('Invalid parameter: element must be an HTMLElement');\n }\n\n this.element = element;\n this.options = options;\n\n window.addEventListener('keydown', this.handleKeyDown, false);\n\n this.setFocus();\n }\n\n canBeTabbed = (element: HTMLElement): boolean => {\n const { tabIndex } = element;\n\n if (tabIndex === null || tabIndex < 0) {\n return false;\n }\n\n return this.canHaveFocus(element);\n };\n\n canHaveFocus = (element: HTMLElement): boolean => {\n const validTabNodes = /input|select|textarea|button|object/;\n const nodeName = element.nodeName.toLowerCase();\n\n const isValid =\n (validTabNodes.test(nodeName) && !element.getAttribute('disabled')) ||\n (nodeName === 'a' && !!element.getAttribute('href'));\n\n return isValid && this.isVisible(element);\n };\n\n findValidTabElements = (): Array<HTMLElement> =>\n [].slice.call(this.element.querySelectorAll('*'), 0).filter(this.canBeTabbed);\n\n handleKeyDown = (event: KeyboardEvent) => {\n const { code = 'Tab' } = this.options;\n\n /* istanbul ignore else */\n if (event.code === code) {\n this.interceptTab(event);\n }\n };\n\n interceptTab = (event: KeyboardEvent) => {\n event.preventDefault();\n const elements = this.findValidTabElements();\n const { shiftKey } = event;\n\n if (!elements.length) {\n return;\n }\n\n let x = document.activeElement ? elements.indexOf(document.activeElement as HTMLElement) : 0;\n\n if (x === -1 || (!shiftKey && x + 1 === elements.length)) {\n x = 0;\n } else if (shiftKey && x === 0) {\n x = elements.length - 1;\n } else {\n x += shiftKey ? -1 : 1;\n }\n\n elements[x].focus();\n };\n\n // eslint-disable-next-line class-methods-use-this\n isHidden = (element: HTMLElement) => {\n const noSize = element.offsetWidth <= 0 && element.offsetHeight <= 0;\n const style = window.getComputedStyle(element);\n\n if (noSize && !element.innerHTML) {\n return true;\n }\n\n return (\n (noSize && style.getPropertyValue('overflow') !== 'visible') ||\n style.getPropertyValue('display') === 'none'\n );\n };\n\n isVisible = (element: HTMLElement): boolean => {\n let parentElement = element;\n\n while (parentElement) {\n /* istanbul ignore else */\n if (parentElement instanceof HTMLElement) {\n if (parentElement === document.body) {\n break;\n }\n\n /* istanbul ignore else */\n if (this.isHidden(parentElement)) {\n return false;\n }\n\n // @ts-ignore\n parentElement = parentElement.parentNode;\n }\n }\n\n return true;\n };\n\n removeScope = () => {\n window.removeEventListener('keydown', this.handleKeyDown);\n };\n\n checkFocus = (target: HTMLElement) => {\n if (document.activeElement !== target) {\n target.focus();\n window.requestAnimationFrame(() => this.checkFocus(target));\n }\n };\n\n setFocus = () => {\n const { selector } = this.options;\n\n if (!selector) {\n return;\n }\n\n const target = this.element.querySelector(selector);\n\n /* istanbul ignore else */\n if (target) {\n window.requestAnimationFrame(() => this.checkFocus(target as HTMLElement));\n }\n };\n}\n","import * as React from 'react';\nimport innerText from 'react-innertext';\nimport is from 'is-lite';\n\nimport { BeaconProps } from '~/types';\n\nexport default class JoyrideBeacon extends React.Component<BeaconProps> {\n private beacon: HTMLElement | null = null;\n\n constructor(props: BeaconProps) {\n super(props);\n\n if (props.beaconComponent) {\n return;\n }\n\n const head = document.head || document.getElementsByTagName('head')[0];\n const style = document.createElement('style');\n\n style.id = 'joyride-beacon-animation';\n\n if (props.nonce) {\n style.setAttribute('nonce', props.nonce);\n }\n\n const css = `\n @keyframes joyride-beacon-inner {\n 20% {\n opacity: 0.9;\n }\n \n 90% {\n opacity: 0.7;\n }\n }\n \n @keyframes joyride-beacon-outer {\n 0% {\n transform: scale(1);\n }\n \n 45% {\n opacity: 0.7;\n transform: scale(0.75);\n }\n \n 100% {\n opacity: 0.9;\n transform: scale(1);\n }\n }\n `;\n\n style.appendChild(document.createTextNode(css));\n\n head.appendChild(style);\n }\n\n componentDidMount() {\n const { shouldFocus } = this.props;\n\n if (process.env.NODE_ENV !== 'production') {\n if (!is.domElement(this.beacon)) {\n console.warn('beacon is not a valid DOM element'); // eslint-disable-line no-console\n }\n }\n\n setTimeout(() => {\n if (is.domElement(this.beacon) && shouldFocus) {\n this.beacon.focus();\n }\n }, 0);\n }\n\n componentWillUnmount() {\n const style = document.getElementById('joyride-beacon-animation');\n\n if (style?.parentNode) {\n style.parentNode.removeChild(style);\n }\n }\n\n setBeaconRef = (c: HTMLElement | null) => {\n this.beacon = c;\n };\n\n render() {\n const {\n beaconComponent,\n continuous,\n index,\n isLastStep,\n locale,\n onClickOrHover,\n size,\n step,\n styles,\n } = this.props;\n const title = is.string(locale.open) ? locale.open : innerText(locale.open);\n const sharedProps = {\n 'aria-label': title,\n onClick: onClickOrHover,\n onMouseEnter: onClickOrHover,\n ref: this.setBeaconRef,\n title,\n };\n let component;\n\n if (beaconComponent) {\n const BeaconComponent = beaconComponent;\n\n component = (\n <BeaconComponent\n continuous={continuous}\n index={index}\n isLastStep={isLastStep}\n size={size}\n step={step}\n {...sharedProps}\n />\n );\n } else {\n component = (\n <button\n key=\"JoyrideBeacon\"\n className=\"react-joyride__beacon\"\n data-test-id=\"button-beacon\"\n style={styles.beacon}\n type=\"button\"\n {...sharedProps}\n >\n <span style={styles.beaconInner} />\n <span style={styles.beaconOuter} />\n </button>\n );\n }\n\n return component;\n }\n}\n","import * as React from 'react';\nimport treeChanges from 'tree-changes';\n\nimport {\n getClientRect,\n getDocumentHeight,\n getElement,\n getElementPosition,\n getScrollParent,\n hasCustomScrollParent,\n hasPosition,\n} from '~/modules/dom';\nimport { getBrowser, isLegacy, log } from '~/modules/helpers';\n\nimport { LIFECYCLE } from '~/literals';\n\nimport { OverlayProps } from '~/types';\n\nimport Spotlight from './Spotlight';\n\ninterface State {\n isScrolling: boolean;\n mouseOverSpotlight: boolean;\n showSpotlight: boolean;\n}\n\nexport default class JoyrideOverlay extends React.Component<OverlayProps, State> {\n isActive = false;\n resizeTimeout?: number;\n scrollTimeout?: number;\n scrollParent?: Document | Element;\n state = {\n isScrolling: false,\n mouseOverSpotlight: false,\n showSpotlight: true,\n };\n\n componentDidMount() {\n const { debug, disableScrolling, disableScrollParentFix = false, target } = this.props;\n const element = getElement(target);\n\n this.scrollParent = getScrollParent(element ?? document.body, disableScrollParentFix, true);\n this.isActive = true;\n\n /* istanbul ignore else */\n if (process.env.NODE_ENV !== 'production') {\n /* istanbul ignore else */\n if (!disableScrolling && hasCustomScrollParent(element, true)) {\n log({\n title: 'step has a custom scroll parent and can cause trouble with scrolling',\n data: [{ key: 'parent', value: this.scrollParent }],\n debug,\n });\n }\n }\n\n window.addEventListener('resize', this.handleResize);\n }\n\n componentDidUpdate(previousProps: OverlayProps) {\n const { lifecycle, spotlightClicks } = this.props;\n const { changed } = treeChanges(previousProps, this.props);\n\n /* istanbul ignore else */\n if (changed('lifecycle', LIFECYCLE.TOOLTIP)) {\n this.scrollParent?.addEventListener('scroll', this.handleScroll, { passive: true });\n\n setTimeout(() => {\n const { isScrolling } = this.state;\n\n if (!isScrolling) {\n this.updateState({ showSpotlight: true });\n }\n }, 100);\n }\n\n if (changed('spotlightClicks') || changed('disableOverlay') || changed('lifecycle')) {\n if (spotlightClicks && lifecycle === LIFECYCLE.TOOLTIP) {\n window.addEventListener('mousemove', this.handleMouseMove, false);\n } else if (lifecycle !== LIFECYCLE.TOOLTIP) {\n window.removeEventListener('mousemove', this.handleMouseMove);\n }\n }\n }\n\n componentWillUnmount() {\n this.isActive = false;\n\n window.removeEventListener('mousemove', this.handleMouseMove);\n window.removeEventListener('resize', this.handleResize);\n\n clearTimeout(this.resizeTimeout);\n clearTimeout(this.scrollTimeout);\n this.scrollParent?.removeEventListener('scroll', this.handleScroll);\n }\n\n get spotlightStyles() {\n const { showSpotlight } = this.state;\n const {\n disableScrollParentFix = false,\n spotlightClicks,\n spotlightPadding = 0,\n styles,\n target,\n } = this.props;\n const element = getElement(target);\n const elementRect = getClientRect(element);\n const isFixedTarget = hasPosition(element);\n const top = getElementPosition(element, spotlightPadding, disableScrollParentFix);\n\n return {\n ...(isLegacy() ? styles.spotlightLegacy : styles.spotlight),\n height: Math.round((elementRect?.height ?? 0) + spotlightPadding * 2),\n left: Math.round((elementRect?.left ?? 0) - spotlightPadding),\n opacity: showSpotlight ? 1 : 0,\n pointerEvents: spotlightClicks ? 'none' : 'auto',\n position: isFixedTarget ? 'fixed' : 'absolute',\n top,\n transition: 'opacity 0.2s',\n width: Math.round((elementRect?.width ?? 0) + spotlightPadding * 2),\n } satisfies React.CSSProperties;\n }\n\n handleMouseMove = (event: MouseEvent) => {\n const { mouseOverSpotlight } = this.state;\n const { height, left, position, top, width } = this.spotlightStyles;\n\n const offsetY = position === 'fixed' ? event.clientY : event.pageY;\n const offsetX = position === 'fixed' ? event.clientX : event.pageX;\n const inSpotlightHeight = offsetY >= top && offsetY <= top + height;\n const inSpotlightWidth = offsetX >= left && offsetX <= left + width;\n const inSpotlight = inSpotlightWidth && inSpotlightHeight;\n\n if (inSpotlight !== mouseOverSpotlight) {\n this.updateState({ mouseOverSpotlight: inSpotlight });\n }\n };\n\n handleScroll = () => {\n const { target } = this.props;\n const element = getElement(target);\n\n if (this.scrollParent !== document) {\n const { isScrolling } = this.state;\n\n if (!isScrolling) {\n this.updateState({ isScrolling: true, showSpotlight: false });\n }\n\n clearTimeout(this.scrollTimeout);\n\n this.scrollTimeout = window.setTimeout(() => {\n this.updateState({ isScrolling: false, showSpotlight: true });\n }, 50);\n } else if (hasPosition(element, 'sticky')) {\n this.updateState({});\n }\n };\n\n handleResize = () => {\n clearTimeout(this.resizeTimeout);\n\n this.resizeTimeout = window.setTimeout(() => {\n if (!this.isActive) {\n return;\n }\n\n this.forceUpdate();\n }, 100);\n };\n\n updateState(state: Partial<State>) {\n if (!this.isActive) {\n return;\n }\n\n this.setState(previousState => ({ ...previousState, ...state }));\n }\n\n render() {\n const { mouseOverSpotlight, showSpotlight } = this.state;\n const { disableOverlay, disableOverlayClose, lifecycle, onClickOverlay, placement, styles } =\n this.props;\n\n if (disableOverlay || lifecycle !== LIFECYCLE.TOOLTIP) {\n return null;\n }\n\n let baseStyles = styles.overlay;\n\n /* istanbul ignore else */\n if (isLegacy()) {\n baseStyles = placement === 'center' ? styles.overlayLegacyCenter : styles.overlayLegacy;\n }\n\n const stylesOverlay: React.CSSProperties = {\n cursor: disableOverlayClose ? 'default' : 'pointer',\n height: getDocumentHeight(),\n pointerEvents: mouseOverSpotlight ? 'none' : 'auto',\n ...baseStyles,\n };\n\n let spotlight = placement !== 'center' && showSpotlight && (\n <Spotlight styles={this.spotlightStyles} />\n );\n\n // Hack for Safari bug with mix-blend-mode with z-index\n if (getBrowser() === 'safari') {\n const { mixBlendMode, zIndex, ...safarOverlay } = stylesOverlay;\n\n spotlight = <div style={{ ...safarOverlay }}>{spotlight}</div>;\n delete stylesOverlay.backgroundColor;\n }\n\n return (\n <div\n className=\"react-joyride__overlay\"\n data-test-id=\"overlay\"\n onClick={onClickOverlay}\n role=\"presentation\"\n style={stylesOverlay}\n >\n {spotlight}\n </div>\n );\n }\n}\n","import * as React from 'react';\n\ninterface Props {\n styles: React.CSSProperties;\n}\n\nfunction JoyrideSpotlight({ styles }: Props) {\n return (\n <div\n key=\"JoyrideSpotlight\"\n className=\"react-joyride__spotlight\"\n data-test-id=\"spotlight\"\n style={styles}\n />\n );\n}\n\nexport default JoyrideSpotlight;\n","import * as React from 'react';\nimport * as ReactDOM from 'react-dom';\n\nimport { canUseDOM } from '~/modules/dom';\nimport { isReact16 } from '~/modules/helpers';\n\ninterface Props {\n children: React.ReactElement;\n id: string;\n}\n\nexport default class JoyridePortal extends React.Component<Props> {\n node: HTMLElement | null = null;\n\n componentDidMount() {\n const { id } = this.props;\n\n if (!canUseDOM()) {\n return;\n }\n\n this.node = document.createElement('div');\n this.node.id = id;\n\n document.body.appendChild(this.node);\n\n if (!isReact16) {\n this.renderReact15();\n }\n }\n\n componentDidUpdate() {\n if (!canUseDOM()) {\n return;\n }\n\n if (!isReact16) {\n this.renderReact15();\n }\n }\n\n componentWillUnmount() {\n if (!canUseDOM() || !this.node) {\n return;\n }\n\n if (!isReact16) {\n // eslint-disable-next-line react/no-deprecated\n ReactDOM.unmountComponentAtNode(this.node);\n }\n\n if (this.node.parentNode === document.body) {\n document.body.removeChild(this.node);\n this.node = null;\n }\n }\n\n renderReact15() {\n if (!canUseDOM()) {\n return;\n }\n\n const { children } = this.props;\n\n if (this.node) {\n ReactDOM.unstable_renderSubtreeIntoContainer(this, children, this.node);\n }\n }\n\n renderReact16() {\n if (!canUseDOM() || !isReact16) {\n return null;\n }\n\n const { children } = this.props;\n\n if (!this.node) {\n return null;\n }\n\n return ReactDOM.createPortal(children, this.node);\n }\n\n render() {\n if (!isReact16) {\n return null;\n }\n\n return this.renderReact16();\n }\n}\n","import * as React from 'react';\n\nimport { getText } from '~/modules/helpers';\n\nimport { TooltipProps } from '~/types';\n\nimport Container from './Container';\n\nexport default class JoyrideTooltip extends React.Component<TooltipProps> {\n handleClickBack = (event: React.MouseEvent<HTMLElement>) => {\n event.preventDefault();\n const { helpers } = this.props;\n\n helpers.prev();\n };\n\n handleClickClose = (event: React.MouseEvent<HTMLElement>) => {\n event.preventDefault();\n const { helpers } = this.props;\n\n helpers.close();\n };\n\n handleClickPrimary = (event: React.MouseEvent<HTMLElement>) => {\n event.preventDefault();\n const { continuous, helpers } = this.props;\n\n if (!continuous) {\n helpers.close();\n\n return;\n }\n\n helpers.next();\n };\n\n handleClickSkip = (event: React.MouseEvent<HTMLElement>) => {\n event.preventDefault();\n const { helpers } = this.props;\n\n helpers.skip();\n };\n\n getElementsProps = () => {\n const { continuous, isLastStep, setTooltipRef, step } = this.props;\n\n const back = getText(step.locale.back);\n const close = getText(step.locale.close);\n const last = getText(step.locale.last);\n const next = getText(step.locale.next);\n const skip = getText(step.locale.skip);\n\n let primaryText = continuous ? next : close;\n\n if (isLastStep) {\n primaryText = last;\n }\n\n return {\n backProps: {\n 'aria-label': back,\n 'data-action': 'back',\n onClick: this.handleClickBack,\n role: 'button',\n title: back,\n },\n closeProps: {\n 'aria-label': close,\n 'data-action': 'close',\n onClick: this.handleClickClose,\n role: 'button',\n title: close,\n },\n primaryProps: {\n 'aria-label': primaryText,\n 'data-action': 'primary',\n onClick: this.handleClickPrimary,\n role: 'button',\n title: primaryText,\n },\n skipProps: {\n 'aria-label': skip,\n 'data-action': 'skip',\n onClick: this.handleClickSkip,\n role: 'button',\n title: skip,\n },\n tooltipProps: {\n 'aria-modal': true,\n ref: setTooltipRef,\n role: 'alertdialog',\n },\n };\n };\n\n render() {\n const { continuous, index, isLastStep, setTooltipRef, size, step } = this.props;\n const { beaconComponent, tooltipComponent, ...cleanStep } = step;\n let component;\n\n if (tooltipComponent) {\n const renderProps = {\n ...this.getElementsProps(),\n continuous,\n index,\n isLastStep,\n size,\n step: cleanStep,\n setTooltipRef,\n };\n\n const TooltipComponent = tooltipComponent;\n\n component = <TooltipComponent {...renderProps} />;\n } else {\n component = (\n <Container\n {...this.getElementsProps()}\n continuous={continuous}\n index={index}\n isLastStep={isLastStep}\n size={size}\n step={step}\n />\n );\n }\n\n return component;\n }\n}\n","import * as React from 'react';\n\nimport { getText } from '~/modules/helpers';\n\nimport { TooltipRenderProps } from '~/types';\n\nimport CloseButton from './CloseButton';\n\nfunction JoyrideTooltipContainer(props: TooltipRenderProps) {\n const {\n backProps,\n closeProps,\n continuous,\n index,\n isLastStep,\n primaryProps,\n size,\n skipProps,\n step,\n tooltipProps,\n } = props;\n const {\n content,\n hideBackButton,\n hideCloseButton,\n hideFooter,\n locale,\n showProgress,\n showSkipButton,\n styles,\n title,\n } = step;\n const { back, close, last, next, skip } = locale;\n const output: Record<string, React.ReactNode> = {\n primary: close,\n };\n\n if (continuous) {\n output.primary = isLastStep ? last : next;\n\n if (showProgress) {\n output.primary = (\n <span>\n {output.primary} ({index + 1}/{size})\n </span>\n );\n }\n }\n\n if (showSkipButton && !isLastStep) {\n output.skip = (\n <button\n aria-live=\"off\"\n data-test-id=\"button-skip\"\n style={styles.buttonSkip}\n type=\"button\"\n {...skipProps}\n >\n {skip}\n </button>\n );\n }\n\n if (!hideBackButton && index > 0) {\n output.back = (\n <button data-test-id=\"button-back\" style={styles.buttonBack} type=\"button\" {...backProps}>\n {back}\n </button>\n );\n }\n\n output.close = !hideCloseButton && (\n <CloseButton data-test-id=\"button-close\" styles={styles.buttonClose} {...closeProps} />\n );\n\n return (\n <div\n key=\"JoyrideTooltip\"\n aria-label={getText(title) || getText(content)}\n className=\"react-joyride__tooltip\"\n style={styles.tooltip}\n {...tooltipProps}\n >\n <div style={styles.tooltipContainer}>\n {title && (\n <h1 aria-label={getText(title)} style={styles.tooltipTitle}>\n {title}\n </h1>\n )}\n <div style={styles.tooltipContent}>{content}</div>\n </div>\n {!hideFooter && (\n <div style={styles.tooltipFooter}>\n <div style={styles.tooltipFooterSpacer}>{output.skip}</div>\n {output.back}\n <button\n data-test-id=\"button-primary\"\n style={styles.buttonNext}\n type=\"button\"\n {...primaryProps}\n >\n {output.primary}\n </button>\n </div>\n )}\n {output.close}\n </div>\n );\n}\n\nexport default JoyrideTooltipContainer;\n","import React, { CSSProperties } from 'react';\n\ninterface Props {\n styles: CSSProperties;\n}\n\nfunction JoyrideTooltipCloseButton({ styles, ...props }: Props) {\n const { color, height, width, ...style } = styles;\n\n return (\n <button style={style} type=\"button\" {...props}>\n <svg\n height={typeof height === 'number' ? `${height}px` : height}\n preserveAspectRatio=\"xMidYMid\"\n version=\"1.1\"\n viewBox=\"0 0 18 18\"\n width={typeof width === 'number' ? `${width}px` : width}\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <g>\n <path\n d=\"M8.13911129,9.00268191 L0.171521827,17.0258467 C-0.0498027049,17.248715 -0.0498027049,17.6098394 0.171521827,17.8327545 C0.28204354,17.9443526 0.427188206,17.9998706 0.572051765,17.9998706 C0.71714958,17.9998706 0.862013139,17.9443526 0.972581703,17.8327545 L9.0000937,9.74924618 L17.0276057,17.8327545 C17.1384085,17.9443526 17.2832721,17.9998706 17.4281356,17.9998706 C17.5729992,17.9998706 17.718097,17.9443526 17.8286656,17.8327545 C18.0499901,17.6098862 18.0499901,17.2487618 17.8286656,17.0258467 L9.86135722,9.00268191 L17.8340066,0.973848225 C18.0553311,0.750979934 18.0553311,0.389855532 17.8340066,0.16694039 C17.6126821,-0.0556467968 17.254037,-0.0556467968 17.0329467,0.16694039 L9.00042166,8.25611765 L0.967006424,0.167268345 C0.745681892,-0.0553188426 0.387317931,-0.0553188426 0.165993399,0.167268345 C-0.0553311331,0.390136635 -0.0553311331,0.751261038 0.165993399,0.974176179 L8.13920499,9.00268191 L8.13911129,9.00268191 Z\"\n fill={color}\n />\n </g>\n </svg>\n </button>\n );\n}\n\nexport default JoyrideTooltipCloseButton;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAO,IAAM,UAAU;AAAA,EACrB,MAAM;AAAA,EACN,OAAO;AAAA,EACP,MAAM;AAAA,EACN,OAAO;AAAA,EACP,MAAM;AAAA,EACN,MAAM;AAAA,EACN,IAAI;A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;AAAA,UACA,OAAO,KAAK;AAAA;AAAA,MACd;AAAA,IAEJ;AAEA,WAAO,qCAAC,SAAI,WAAU,mBAAiB,MAAO;AAAA,EAChD;AACF;AA1UE,cAJI,SAIG,gBAAe;AA4UxB,IAAO,qBAAQ;","names":["React","import_is_lite","import_tree_changes","scrollParent","scroll","is","import_helpers","import_deepmerge","import_is_lite","deepmerge","deepmerge","is","scrollParent","import_is_lite","is","React","import_is_lite","import_tree_changes","import_is_lite","is","innerText","React","React","treeChanges","spotlight","React","React","React","import_react","React","treeChanges","shouldScroll","is","Floater","is","treeChanges","isEqual","scrollParent"]}