@mhmo91/schmancy 0.9.18 → 0.9.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/dist/agent/{flow-CaPi2G8y.js.map → flow-3RrZM-e7.js.map} +1 -1
  2. package/dist/agent/index.es-Dymj8REP.js +489 -0
  3. package/dist/agent/index.es-Dymj8REP.js.map +1 -0
  4. package/dist/agent/{rolldown-runtime-DsMetpgY.js → rolldown-runtime-BIIoCavz.js} +9 -2
  5. package/dist/agent/schmancy.agent.js +3330 -3805
  6. package/dist/agent/schmancy.agent.js.map +1 -1
  7. package/dist/agent/{vendor-highlight-CHJZQQB7.js → vendor-highlight-BmnMldIa.js} +90 -85
  8. package/dist/agent/{vendor-highlight-CHJZQQB7.js.map → vendor-highlight-BmnMldIa.js.map} +1 -1
  9. package/dist/agent/{vendor-jsqr-r7GNh4P3.js → vendor-jsqr-1wQ5xc49.js} +1 -1
  10. package/dist/agent/{vendor-jsqr-r7GNh4P3.js.map → vendor-jsqr-1wQ5xc49.js.map} +1 -1
  11. package/dist/agent/{vendor-material-color-Be96dpGE.js.map → vendor-material-color-33Mj762T.js.map} +1 -1
  12. package/dist/badge.cjs +1 -1
  13. package/dist/badge.js +1 -1
  14. package/dist/{code-highlight-zSYcSfCz.cjs → code-highlight-B_l8vDzn.cjs} +11 -11
  15. package/dist/code-highlight-B_l8vDzn.cjs.map +1 -0
  16. package/dist/{code-highlight-BgExKEto.js → code-highlight-CI_gqXYX.js} +30 -22
  17. package/dist/code-highlight-CI_gqXYX.js.map +1 -0
  18. package/dist/code-highlight.cjs +1 -1
  19. package/dist/code-highlight.js +1 -1
  20. package/dist/content-drawer.cjs +1 -1
  21. package/dist/content-drawer.js +1 -1
  22. package/dist/{flow-BGkHnOnd.js.map → flow-BPDtbhLe.js.map} +1 -1
  23. package/dist/{flow-ClAJ6Qby.cjs.map → flow-Dn9AZktE.cjs.map} +1 -1
  24. package/dist/handover/agent-runtime-followups.md +1 -1
  25. package/dist/handover/agent-runtime-v1.md +3 -3
  26. package/dist/index.cjs +1 -1
  27. package/dist/index.es-BgmFX1JM.cjs +1 -0
  28. package/dist/index.es-BgmFX1JM.cjs.map +1 -0
  29. package/dist/index.es-CLyb_o3Y.js +489 -0
  30. package/dist/index.es-CLyb_o3Y.js.map +1 -0
  31. package/dist/index.js +5 -5
  32. package/dist/nav-drawer.cjs +1 -1
  33. package/dist/nav-drawer.js +1 -1
  34. package/dist/navigation-bar.cjs +1 -1
  35. package/dist/navigation-bar.js +1 -1
  36. package/dist/{splash-screen-COg3Z6n8.js.map → splash-screen-BHgb3c3Q.js.map} +1 -1
  37. package/dist/{splash-screen-C9HqX2nR.cjs.map → splash-screen-DteUfSV3.cjs.map} +1 -1
  38. package/dist/splash-screen.cjs +1 -1
  39. package/dist/splash-screen.js +1 -1
  40. package/dist/{src-C7niWYur.js → src-Dw-PjtMH.js} +5 -5
  41. package/dist/{src-C7niWYur.js.map → src-Dw-PjtMH.js.map} +1 -1
  42. package/dist/{src-I4M33WK2.cjs → src-sG7Ihf0e.cjs} +1 -1
  43. package/dist/{src-I4M33WK2.cjs.map → src-sG7Ihf0e.cjs.map} +1 -1
  44. package/dist/{table-B-DsOqzT.cjs → table-DFlJhG5E.cjs} +1 -1
  45. package/dist/{table-B-DsOqzT.cjs.map → table-DFlJhG5E.cjs.map} +1 -1
  46. package/dist/{table-hBEZRxM_.js → table-Dwt66SR6.js} +1 -1
  47. package/dist/{table-hBEZRxM_.js.map → table-Dwt66SR6.js.map} +1 -1
  48. package/dist/table.cjs +1 -1
  49. package/dist/table.js +1 -1
  50. package/dist/teleport.cjs +1 -1
  51. package/dist/teleport.js +1 -1
  52. package/dist/typewriter.cjs +123 -1
  53. package/dist/typewriter.cjs.map +1 -0
  54. package/dist/typewriter.js +214 -2
  55. package/dist/typewriter.js.map +1 -0
  56. package/dist/{utils-xBXLvebz.js.map → utils-Bp2jhyZc.js.map} +1 -1
  57. package/dist/{utils-2qrmPb78.cjs.map → utils-CBPQvxNW.cjs.map} +1 -1
  58. package/dist/utils.cjs +1 -1
  59. package/dist/utils.js +1 -1
  60. package/package.json +1 -1
  61. package/src/code-highlight/code-highlight.ts +56 -24
  62. package/src/typewriter/typewriter.ts +26 -4
  63. package/types/src/code-highlight/code-highlight.d.ts +8 -1
  64. package/types/src/typewriter/typewriter.d.ts +4 -1
  65. package/dist/code-highlight-BgExKEto.js.map +0 -1
  66. package/dist/code-highlight-zSYcSfCz.cjs.map +0 -1
  67. package/dist/typewriter-DyN7xa0n.js +0 -701
  68. package/dist/typewriter-DyN7xa0n.js.map +0 -1
  69. package/dist/typewriter-LK0S4NEr.cjs +0 -123
  70. package/dist/typewriter-LK0S4NEr.cjs.map +0 -1
  71. /package/dist/agent/{flow-CaPi2G8y.js → flow-3RrZM-e7.js} +0 -0
  72. /package/dist/agent/{vendor-material-color-Be96dpGE.js → vendor-material-color-33Mj762T.js} +0 -0
  73. /package/dist/{flow-BGkHnOnd.js → flow-BPDtbhLe.js} +0 -0
  74. /package/dist/{flow-ClAJ6Qby.cjs → flow-Dn9AZktE.cjs} +0 -0
  75. /package/dist/{splash-screen-COg3Z6n8.js → splash-screen-BHgb3c3Q.js} +0 -0
  76. /package/dist/{splash-screen-C9HqX2nR.cjs → splash-screen-DteUfSV3.cjs} +0 -0
  77. /package/dist/{utils-xBXLvebz.js → utils-Bp2jhyZc.js} +0 -0
  78. /package/dist/{utils-2qrmPb78.cjs → utils-CBPQvxNW.cjs} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"flow-ClAJ6Qby.cjs","names":[],"sources":["../node_modules/@lit-labs/virtualizer/layouts/shared/SizeCache.js","../node_modules/@lit-labs/virtualizer/layouts/shared/BaseLayout.js","../node_modules/@lit-labs/virtualizer/layouts/flow.js"],"sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nexport class SizeCache {\n constructor(config) {\n this._map = new Map();\n this._roundAverageSize = false;\n this.totalSize = 0;\n if (config?.roundAverageSize === true) {\n this._roundAverageSize = true;\n }\n }\n set(index, value) {\n const prev = this._map.get(index) || 0;\n this._map.set(index, value);\n this.totalSize += value - prev;\n }\n get averageSize() {\n if (this._map.size > 0) {\n const average = this.totalSize / this._map.size;\n return this._roundAverageSize ? Math.round(average) : average;\n }\n return 0;\n }\n getSize(index) {\n return this._map.get(index);\n }\n clear() {\n this._map.clear();\n this.totalSize = 0;\n }\n}\n//# sourceMappingURL=SizeCache.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nexport function dim1(direction) {\n return direction === 'horizontal' ? 'width' : 'height';\n}\nexport function dim2(direction) {\n return direction === 'horizontal' ? 'height' : 'width';\n}\nexport function pos1(direction) {\n return direction === 'horizontal' ? 'left' : 'top';\n}\nexport function pos2(direction) {\n return direction === 'horizontal' ? 'top' : 'left';\n}\nexport class BaseLayout {\n _getDefaultConfig() {\n return {\n direction: 'vertical',\n };\n }\n constructor(hostSink, config) {\n /**\n * The last set viewport scroll position.\n */\n this._latestCoords = { left: 0, top: 0 };\n /**\n * Scrolling direction.\n */\n this._direction = null;\n /**\n * Dimensions of the viewport.\n */\n this._viewportSize = { width: 0, height: 0 };\n this.totalScrollSize = { width: 0, height: 0 };\n this.offsetWithinScroller = { left: 0, top: 0 };\n /**\n * Flag for debouncing asynchronous reflow requests.\n */\n this._pendingReflow = false;\n this._pendingLayoutUpdate = false;\n this._pin = null;\n /**\n * The index of the first item intersecting the viewport.\n */\n this._firstVisible = 0;\n /**\n * The index of the last item intersecting the viewport.\n */\n this._lastVisible = 0;\n /**\n * Pixel offset in the scroll direction of the first child.\n */\n this._physicalMin = 0;\n /**\n * Pixel offset in the scroll direction of the last child.\n */\n this._physicalMax = 0;\n /**\n * Index of the first child.\n */\n this._first = -1;\n /**\n * Index of the last child.\n */\n this._last = -1;\n /**\n * Length in the scrolling direction.\n */\n this._sizeDim = 'height';\n /**\n * Length in the non-scrolling direction.\n */\n this._secondarySizeDim = 'width';\n /**\n * Position in the scrolling direction.\n */\n this._positionDim = 'top';\n /**\n * Position in the non-scrolling direction.\n */\n this._secondaryPositionDim = 'left';\n /**\n * Current scroll offset in pixels.\n */\n this._scrollPosition = 0;\n /**\n * Difference between current scroll offset and scroll offset calculated due\n * to a reflow.\n */\n this._scrollError = 0;\n /**\n * Total number of items that could possibly be displayed. Used to help\n * calculate the scroll size.\n */\n this._items = [];\n /**\n * The total (estimated) length of all items in the scrolling direction.\n */\n this._scrollSize = 1;\n /**\n * Number of pixels beyond the viewport to still include\n * in the active range of items.\n */\n // TODO (graynorton): Probably want to make this something we calculate based\n // on viewport size, item size, other factors, possibly still with a dial of some kind\n this._overhang = 1000;\n this._hostSink = hostSink;\n // Delay setting config so that subclasses do setup work first\n Promise.resolve().then(() => (this.config = config || this._getDefaultConfig()));\n }\n set config(config) {\n Object.assign(this, Object.assign({}, this._getDefaultConfig(), config));\n }\n get config() {\n return {\n direction: this.direction,\n };\n }\n /**\n * Maximum index of children + 1, to help estimate total height of the scroll\n * space.\n */\n get items() {\n return this._items;\n }\n set items(items) {\n this._setItems(items);\n }\n _setItems(items) {\n if (items !== this._items) {\n this._items = items;\n this._scheduleReflow();\n }\n }\n /**\n * Primary scrolling direction.\n */\n get direction() {\n return this._direction;\n }\n set direction(dir) {\n // Force it to be either horizontal or vertical.\n dir = dir === 'horizontal' ? dir : 'vertical';\n if (dir !== this._direction) {\n this._direction = dir;\n this._sizeDim = dir === 'horizontal' ? 'width' : 'height';\n this._secondarySizeDim = dir === 'horizontal' ? 'height' : 'width';\n this._positionDim = dir === 'horizontal' ? 'left' : 'top';\n this._secondaryPositionDim = dir === 'horizontal' ? 'top' : 'left';\n this._triggerReflow();\n }\n }\n /**\n * Height and width of the viewport.\n */\n get viewportSize() {\n return this._viewportSize;\n }\n set viewportSize(dims) {\n const { _viewDim1, _viewDim2 } = this;\n Object.assign(this._viewportSize, dims);\n if (_viewDim2 !== this._viewDim2) {\n // this._viewDim2Changed();\n this._scheduleLayoutUpdate();\n }\n else if (_viewDim1 !== this._viewDim1) {\n this._checkThresholds();\n }\n }\n /**\n * Scroll offset of the viewport.\n */\n get viewportScroll() {\n return this._latestCoords;\n }\n set viewportScroll(coords) {\n Object.assign(this._latestCoords, coords);\n const oldPos = this._scrollPosition;\n this._scrollPosition = this._latestCoords[this._positionDim];\n const change = Math.abs(oldPos - this._scrollPosition);\n if (change >= 1) {\n this._checkThresholds();\n }\n }\n /**\n * Perform a reflow if one has been scheduled.\n */\n reflowIfNeeded(force = false) {\n if (force || this._pendingReflow) {\n this._pendingReflow = false;\n this._reflow();\n }\n }\n set pin(options) {\n this._pin = options;\n this._triggerReflow();\n }\n get pin() {\n if (this._pin !== null) {\n const { index, block } = this._pin;\n return {\n index: Math.max(0, Math.min(index, this.items.length - 1)),\n block,\n };\n }\n return null;\n }\n _clampScrollPosition(val) {\n return Math.max(-this.offsetWithinScroller[this._positionDim], Math.min(val, this.totalScrollSize[dim1(this.direction)] - this._viewDim1));\n }\n unpin() {\n if (this._pin !== null) {\n this._sendUnpinnedMessage();\n this._pin = null;\n }\n }\n _updateLayout() {\n // Override\n }\n // protected _viewDim2Changed(): void {\n // this._scheduleLayoutUpdate();\n // }\n /**\n * The height or width of the viewport, whichever corresponds to the scrolling direction.\n */\n get _viewDim1() {\n return this._viewportSize[this._sizeDim];\n }\n /**\n * The height or width of the viewport, whichever does NOT correspond to the scrolling direction.\n */\n get _viewDim2() {\n return this._viewportSize[this._secondarySizeDim];\n }\n _scheduleReflow() {\n this._pendingReflow = true;\n }\n _scheduleLayoutUpdate() {\n this._pendingLayoutUpdate = true;\n this._scheduleReflow();\n }\n // For triggering a reflow based on incoming changes to\n // the layout config.\n _triggerReflow() {\n this._scheduleLayoutUpdate();\n // TODO graynorton@: reflowIfNeeded() isn't really supposed\n // to be called internally. Address in larger cleanup\n // of virtualizer / layout interaction pattern.\n // this.reflowIfNeeded(true);\n Promise.resolve().then(() => this.reflowIfNeeded());\n }\n _reflow() {\n if (this._pendingLayoutUpdate) {\n this._updateLayout();\n this._pendingLayoutUpdate = false;\n }\n this._updateScrollSize();\n this._setPositionFromPin();\n this._getActiveItems();\n this._updateVisibleIndices();\n this._sendStateChangedMessage();\n }\n /**\n * If we are supposed to be pinned to a particular\n * item or set of coordinates, we set `_scrollPosition`\n * accordingly and adjust `_scrollError` as needed\n * so that the virtualizer can keep the scroll\n * position in the DOM in sync\n */\n _setPositionFromPin() {\n if (this.pin !== null) {\n const lastScrollPosition = this._scrollPosition;\n const { index, block } = this.pin;\n this._scrollPosition =\n this._calculateScrollIntoViewPosition({\n index,\n block: block || 'start',\n }) - this.offsetWithinScroller[this._positionDim];\n this._scrollError = lastScrollPosition - this._scrollPosition;\n }\n }\n /**\n * Calculate the coordinates to scroll to, given\n * a request to scroll to the element at a specific\n * index.\n *\n * Supports the same positioning options (`start`,\n * `center`, `end`, `nearest`) as the standard\n * `Element.scrollIntoView()` method, but currently\n * only considers the provided value in the `block`\n * dimension, since we don't yet have any layouts\n * that support virtualization in two dimensions.\n */\n _calculateScrollIntoViewPosition(options) {\n const { block } = options;\n const index = Math.min(this.items.length, Math.max(0, options.index));\n const itemStartPosition = this._getItemPosition(index)[this._positionDim];\n let scrollPosition = itemStartPosition;\n if (block !== 'start') {\n const itemSize = this._getItemSize(index)[this._sizeDim];\n if (block === 'center') {\n scrollPosition =\n itemStartPosition - 0.5 * this._viewDim1 + 0.5 * itemSize;\n }\n else {\n const itemEndPosition = itemStartPosition - this._viewDim1 + itemSize;\n if (block === 'end') {\n scrollPosition = itemEndPosition;\n }\n else {\n // block === 'nearest'\n const currentScrollPosition = this._scrollPosition;\n scrollPosition =\n Math.abs(currentScrollPosition - itemStartPosition) <\n Math.abs(currentScrollPosition - itemEndPosition)\n ? itemStartPosition\n : itemEndPosition;\n }\n }\n }\n scrollPosition += this.offsetWithinScroller[this._positionDim];\n return this._clampScrollPosition(scrollPosition);\n }\n getScrollIntoViewCoordinates(options) {\n return {\n [this._positionDim]: this._calculateScrollIntoViewPosition(options),\n };\n }\n _sendUnpinnedMessage() {\n this._hostSink({\n type: 'unpinned',\n });\n }\n _sendVisibilityChangedMessage() {\n this._hostSink({\n type: 'visibilityChanged',\n firstVisible: this._firstVisible,\n lastVisible: this._lastVisible,\n });\n }\n _sendStateChangedMessage() {\n const childPositions = new Map();\n if (this._first !== -1 && this._last !== -1) {\n for (let idx = this._first; idx <= this._last; idx++) {\n childPositions.set(idx, this._getItemPosition(idx));\n }\n }\n const message = {\n type: 'stateChanged',\n scrollSize: {\n [this._sizeDim]: this._scrollSize,\n [this._secondarySizeDim]: null,\n },\n range: {\n first: this._first,\n last: this._last,\n firstVisible: this._firstVisible,\n lastVisible: this._lastVisible,\n },\n childPositions,\n };\n if (this._scrollError) {\n message.scrollError = {\n [this._positionDim]: this._scrollError,\n [this._secondaryPositionDim]: 0,\n };\n this._scrollError = 0;\n }\n this._hostSink(message);\n }\n /**\n * Number of items to display.\n */\n get _num() {\n if (this._first === -1 || this._last === -1) {\n return 0;\n }\n return this._last - this._first + 1;\n }\n _checkThresholds() {\n if ((this._viewDim1 === 0 && this._num > 0) || this._pin !== null) {\n this._scheduleReflow();\n }\n else {\n const min = Math.max(0, this._scrollPosition - this._overhang);\n const max = Math.min(this._scrollSize, this._scrollPosition + this._viewDim1 + this._overhang);\n if (this._physicalMin > min || this._physicalMax < max) {\n this._scheduleReflow();\n }\n else {\n this._updateVisibleIndices({ emit: true });\n }\n }\n }\n /**\n * Find the indices of the first and last items to intersect the viewport.\n * Emit a visibleindiceschange event when either index changes.\n */\n _updateVisibleIndices(options) {\n if (this._first === -1 || this._last === -1)\n return;\n let firstVisible = this._first;\n while (firstVisible < this._last &&\n Math.round(this._getItemPosition(firstVisible)[this._positionDim] +\n this._getItemSize(firstVisible)[this._sizeDim]) <= Math.round(this._scrollPosition)) {\n firstVisible++;\n }\n let lastVisible = this._last;\n while (lastVisible > this._first &&\n Math.round(this._getItemPosition(lastVisible)[this._positionDim]) >=\n Math.round(this._scrollPosition + this._viewDim1)) {\n lastVisible--;\n }\n if (firstVisible !== this._firstVisible ||\n lastVisible !== this._lastVisible) {\n this._firstVisible = firstVisible;\n this._lastVisible = lastVisible;\n if (options && options.emit) {\n this._sendVisibilityChangedMessage();\n }\n }\n }\n}\n//# sourceMappingURL=BaseLayout.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nimport { SizeCache } from './shared/SizeCache.js';\nimport { BaseLayout, dim1 } from './shared/BaseLayout.js';\nexport const flow = (config) => Object.assign({\n type: FlowLayout,\n}, config);\nfunction leadingMargin(direction) {\n return direction === 'horizontal' ? 'marginLeft' : 'marginTop';\n}\nfunction trailingMargin(direction) {\n return direction === 'horizontal' ? 'marginRight' : 'marginBottom';\n}\nfunction offset(direction) {\n return direction === 'horizontal' ? 'xOffset' : 'yOffset';\n}\nfunction collapseMargins(a, b) {\n const m = [a, b].sort();\n return m[1] <= 0 ? Math.min(...m) : m[0] >= 0 ? Math.max(...m) : m[0] + m[1];\n}\nclass MetricsCache {\n constructor() {\n this._childSizeCache = new SizeCache();\n this._marginSizeCache = new SizeCache();\n this._metricsCache = new Map();\n }\n update(metrics, direction) {\n const marginsToUpdate = new Set();\n Object.keys(metrics).forEach((key) => {\n const k = Number(key);\n this._metricsCache.set(k, metrics[k]);\n this._childSizeCache.set(k, metrics[k][dim1(direction)]);\n marginsToUpdate.add(k);\n marginsToUpdate.add(k + 1);\n });\n for (const k of marginsToUpdate) {\n const a = this._metricsCache.get(k)?.[leadingMargin(direction)] || 0;\n const b = this._metricsCache.get(k - 1)?.[trailingMargin(direction)] || 0;\n this._marginSizeCache.set(k, collapseMargins(a, b));\n }\n }\n get averageChildSize() {\n return this._childSizeCache.averageSize;\n }\n get totalChildSize() {\n return this._childSizeCache.totalSize;\n }\n get averageMarginSize() {\n return this._marginSizeCache.averageSize;\n }\n get totalMarginSize() {\n return this._marginSizeCache.totalSize;\n }\n getLeadingMarginValue(index, direction) {\n return this._metricsCache.get(index)?.[leadingMargin(direction)] || 0;\n }\n getChildSize(index) {\n return this._childSizeCache.getSize(index);\n }\n getMarginSize(index) {\n return this._marginSizeCache.getSize(index);\n }\n clear() {\n this._childSizeCache.clear();\n this._marginSizeCache.clear();\n this._metricsCache.clear();\n }\n}\nexport class FlowLayout extends BaseLayout {\n constructor() {\n super(...arguments);\n /**\n * Initial estimate of item size\n */\n this._itemSize = { width: 100, height: 100 };\n /**\n * Indices of children mapped to their (position and length) in the scrolling\n * direction. Used to keep track of children that are in range.\n */\n this._physicalItems = new Map();\n /**\n * Used in tandem with _physicalItems to track children in range across\n * reflows.\n */\n this._newPhysicalItems = new Map();\n /**\n * Width and height of children by their index.\n */\n this._metricsCache = new MetricsCache();\n /**\n * anchorIdx is the anchor around which we reflow. It is designed to allow\n * jumping to any point of the scroll size. We choose it once and stick with\n * it until stable. _first and _last are deduced around it.\n */\n this._anchorIdx = null;\n /**\n * Position in the scrolling direction of the anchor child.\n */\n this._anchorPos = null;\n /**\n * Whether all children in range were in range during the previous reflow.\n */\n this._stable = true;\n this._measureChildren = true;\n this._estimate = true;\n }\n // protected _defaultConfig: BaseLayoutConfig = Object.assign({}, super._defaultConfig, {\n // })\n // constructor(config: Layout1dConfig) {\n // super(config);\n // }\n get measureChildren() {\n return this._measureChildren;\n }\n /**\n * Determine the average size of all children represented in the sizes\n * argument.\n */\n updateItemSizes(sizes) {\n this._metricsCache.update(sizes, this.direction);\n // if (this._nMeasured) {\n // this._updateItemSize();\n this._scheduleReflow();\n // }\n }\n /**\n * Set the average item size based on the total length and number of children\n * in range.\n */\n // _updateItemSize() {\n // // Keep integer values.\n // this._itemSize[this._sizeDim] = this._metricsCache.averageChildSize;\n // }\n _getPhysicalItem(idx) {\n return this._newPhysicalItems.get(idx) ?? this._physicalItems.get(idx);\n }\n _getSize(idx) {\n const item = this._getPhysicalItem(idx);\n return item && this._metricsCache.getChildSize(idx);\n }\n _getAverageSize() {\n return this._metricsCache.averageChildSize || this._itemSize[this._sizeDim];\n }\n _estimatePosition(idx) {\n const c = this._metricsCache;\n if (this._first === -1 || this._last === -1) {\n return (c.averageMarginSize +\n idx * (c.averageMarginSize + this._getAverageSize()));\n }\n else {\n if (idx < this._first) {\n const delta = this._first - idx;\n const refItem = this._getPhysicalItem(this._first);\n return (refItem.pos -\n (c.getMarginSize(this._first - 1) || c.averageMarginSize) -\n (delta * c.averageChildSize + (delta - 1) * c.averageMarginSize));\n }\n else {\n const delta = idx - this._last;\n const refItem = this._getPhysicalItem(this._last);\n return (refItem.pos +\n (c.getChildSize(this._last) || c.averageChildSize) +\n (c.getMarginSize(this._last) || c.averageMarginSize) +\n delta * (c.averageChildSize + c.averageMarginSize));\n }\n }\n }\n /**\n * Returns the position in the scrolling direction of the item at idx.\n * Estimates it if the item at idx is not in the DOM.\n */\n _getPosition(idx) {\n const item = this._getPhysicalItem(idx);\n const { averageMarginSize } = this._metricsCache;\n return idx === 0\n ? this._metricsCache.getMarginSize(0) ?? averageMarginSize\n : item\n ? item.pos\n : this._estimatePosition(idx);\n }\n _calculateAnchor(lower, upper) {\n if (lower <= 0) {\n return 0;\n }\n if (upper > this._scrollSize - this._viewDim1) {\n return this.items.length - 1;\n }\n return Math.max(0, Math.min(this.items.length - 1, Math.floor((lower + upper) / 2 / this._delta)));\n }\n _getAnchor(lower, upper) {\n if (this._physicalItems.size === 0) {\n return this._calculateAnchor(lower, upper);\n }\n if (this._first < 0) {\n return this._calculateAnchor(lower, upper);\n }\n if (this._last < 0) {\n return this._calculateAnchor(lower, upper);\n }\n const firstItem = this._getPhysicalItem(this._first), lastItem = this._getPhysicalItem(this._last), firstMin = firstItem.pos, lastMin = lastItem.pos, lastMax = lastMin + this._metricsCache.getChildSize(this._last);\n if (lastMax < lower) {\n // Window is entirely past physical items, calculate new anchor\n return this._calculateAnchor(lower, upper);\n }\n if (firstMin > upper) {\n // Window is entirely before physical items, calculate new anchor\n return this._calculateAnchor(lower, upper);\n }\n // Window contains a physical item\n // Find one, starting with the one that was previously first visible\n let candidateIdx = this._firstVisible - 1;\n let cMax = -Infinity;\n while (cMax < lower) {\n const candidate = this._getPhysicalItem(++candidateIdx);\n cMax = candidate.pos + this._metricsCache.getChildSize(candidateIdx);\n }\n return candidateIdx;\n }\n /**\n * Updates _first and _last based on items that should be in the current\n * viewed range.\n */\n _getActiveItems() {\n if (this._viewDim1 === 0 || this.items.length === 0) {\n this._clearItems();\n }\n else {\n this._getItems();\n }\n }\n /**\n * Sets the range to empty.\n */\n _clearItems() {\n this._first = -1;\n this._last = -1;\n this._physicalMin = 0;\n this._physicalMax = 0;\n const items = this._newPhysicalItems;\n this._newPhysicalItems = this._physicalItems;\n this._newPhysicalItems.clear();\n this._physicalItems = items;\n this._stable = true;\n }\n /*\n * Updates _first and _last based on items that should be in the given range.\n */\n _getItems() {\n const items = this._newPhysicalItems;\n this._stable = true;\n let lower, upper;\n // The anchorIdx is the anchor around which we reflow. It is designed to\n // allow jumping to any point of the scroll size. We choose it once and\n // stick with it until stable. first and last are deduced around it.\n // If we have a pinned item, we anchor on it\n if (this.pin !== null) {\n const { index } = this.pin;\n this._anchorIdx = index;\n this._anchorPos = this._getPosition(index);\n }\n // Determine the lower and upper bounds of the region to be\n // rendered, relative to the viewport\n lower = this._scrollPosition - this._overhang; //leadingOverhang;\n upper = this._scrollPosition + this._viewDim1 + this._overhang; // trailingOverhang;\n if (upper < 0 || lower > this._scrollSize) {\n this._clearItems();\n return;\n }\n // If we are scrolling to a specific index or if we are doing another\n // pass to stabilize a previously started reflow, we will already\n // have an anchor. If not, establish an anchor now.\n if (this._anchorIdx === null || this._anchorPos === null) {\n this._anchorIdx = this._getAnchor(lower, upper);\n this._anchorPos = this._getPosition(this._anchorIdx);\n }\n let anchorSize = this._getSize(this._anchorIdx);\n if (anchorSize === undefined) {\n this._stable = false;\n anchorSize = this._getAverageSize();\n }\n const anchorLeadingMargin = this._metricsCache.getMarginSize(this._anchorIdx) ??\n this._metricsCache.averageMarginSize;\n const anchorTrailingMargin = this._metricsCache.getMarginSize(this._anchorIdx + 1) ??\n this._metricsCache.averageMarginSize;\n if (this._anchorIdx === 0) {\n this._anchorPos = anchorLeadingMargin;\n }\n if (this._anchorIdx === this.items.length - 1) {\n this._anchorPos = this._scrollSize - anchorTrailingMargin - anchorSize;\n }\n // Anchor might be outside bounds, so prefer correcting the error and keep\n // that anchorIdx.\n let anchorErr = 0;\n if (this._anchorPos + anchorSize + anchorTrailingMargin < lower) {\n anchorErr = lower - (this._anchorPos + anchorSize + anchorTrailingMargin);\n }\n if (this._anchorPos - anchorLeadingMargin > upper) {\n anchorErr = upper - (this._anchorPos - anchorLeadingMargin);\n }\n if (anchorErr) {\n this._scrollPosition -= anchorErr;\n lower -= anchorErr;\n upper -= anchorErr;\n this._scrollError += anchorErr;\n }\n items.set(this._anchorIdx, { pos: this._anchorPos, size: anchorSize });\n this._first = this._last = this._anchorIdx;\n this._physicalMin = this._anchorPos - anchorLeadingMargin;\n this._physicalMax = this._anchorPos + anchorSize + anchorTrailingMargin;\n while (this._physicalMin > lower && this._first > 0) {\n let size = this._getSize(--this._first);\n if (size === undefined) {\n this._stable = false;\n size = this._getAverageSize();\n }\n let margin = this._metricsCache.getMarginSize(this._first);\n if (margin === undefined) {\n this._stable = false;\n margin = this._metricsCache.averageMarginSize;\n }\n this._physicalMin -= size;\n const pos = this._physicalMin;\n items.set(this._first, { pos, size });\n this._physicalMin -= margin;\n if (this._stable === false && this._estimate === false) {\n break;\n }\n }\n while (this._physicalMax < upper && this._last < this.items.length - 1) {\n let size = this._getSize(++this._last);\n if (size === undefined) {\n this._stable = false;\n size = this._getAverageSize();\n }\n let margin = this._metricsCache.getMarginSize(this._last);\n if (margin === undefined) {\n this._stable = false;\n margin = this._metricsCache.averageMarginSize;\n }\n const pos = this._physicalMax;\n items.set(this._last, { pos, size });\n this._physicalMax += size + margin;\n if (!this._stable && !this._estimate) {\n break;\n }\n }\n // This handles the cases where we were relying on estimated sizes.\n const extentErr = this._calculateError();\n if (extentErr) {\n this._physicalMin -= extentErr;\n this._physicalMax -= extentErr;\n this._anchorPos -= extentErr;\n this._scrollPosition -= extentErr;\n items.forEach((item) => (item.pos -= extentErr));\n this._scrollError += extentErr;\n }\n if (this._stable) {\n this._newPhysicalItems = this._physicalItems;\n this._newPhysicalItems.clear();\n this._physicalItems = items;\n }\n }\n _calculateError() {\n if (this._first === 0) {\n return this._physicalMin;\n }\n else if (this._physicalMin <= 0) {\n return this._physicalMin - this._first * this._delta;\n }\n else if (this._last === this.items.length - 1) {\n return this._physicalMax - this._scrollSize;\n }\n else if (this._physicalMax >= this._scrollSize) {\n return (this._physicalMax -\n this._scrollSize +\n (this.items.length - 1 - this._last) * this._delta);\n }\n return 0;\n }\n _reflow() {\n const { _first, _last } = this;\n super._reflow();\n if ((this._first === -1 && this._last == -1) ||\n (this._first === _first && this._last === _last)) {\n this._resetReflowState();\n }\n }\n _resetReflowState() {\n this._anchorIdx = null;\n this._anchorPos = null;\n this._stable = true;\n }\n _updateScrollSize() {\n const { averageMarginSize } = this._metricsCache;\n this._scrollSize = Math.max(1, this.items.length * (averageMarginSize + this._getAverageSize()) +\n averageMarginSize);\n }\n /**\n * Returns the average size (precise or estimated) of an item in the scrolling direction,\n * including any surrounding space.\n */\n get _delta() {\n const { averageMarginSize } = this._metricsCache;\n return this._getAverageSize() + averageMarginSize;\n }\n /**\n * Returns the top and left positioning of the item at idx.\n */\n _getItemPosition(idx) {\n return {\n [this._positionDim]: this._getPosition(idx),\n [this._secondaryPositionDim]: 0,\n [offset(this.direction)]: -(this._metricsCache.getLeadingMarginValue(idx, this.direction) ??\n this._metricsCache.averageMarginSize),\n };\n }\n /**\n * Returns the height and width of the item at idx.\n */\n _getItemSize(idx) {\n return {\n [this._sizeDim]: this._getSize(idx) || this._getAverageSize(),\n [this._secondarySizeDim]: this._itemSize[this._secondarySizeDim],\n };\n }\n _viewDim2Changed() {\n this._metricsCache.clear();\n this._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ules/@lit-labs/virtualizer/layouts/shared/SizeCache.js","../node_modules/@lit-labs/virtualizer/layouts/shared/BaseLayout.js","../node_modules/@lit-labs/virtualizer/layouts/flow.js"],"sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nexport class SizeCache {\n constructor(config) {\n this._map = new Map();\n this._roundAverageSize = false;\n this.totalSize = 0;\n if (config?.roundAverageSize === true) {\n this._roundAverageSize = true;\n }\n }\n set(index, value) {\n const prev = this._map.get(index) || 0;\n this._map.set(index, value);\n this.totalSize += value - prev;\n }\n get averageSize() {\n if (this._map.size > 0) {\n const average = this.totalSize / this._map.size;\n return this._roundAverageSize ? Math.round(average) : average;\n }\n return 0;\n }\n getSize(index) {\n return this._map.get(index);\n }\n clear() {\n this._map.clear();\n this.totalSize = 0;\n }\n}\n//# sourceMappingURL=SizeCache.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nexport function dim1(direction) {\n return direction === 'horizontal' ? 'width' : 'height';\n}\nexport function dim2(direction) {\n return direction === 'horizontal' ? 'height' : 'width';\n}\nexport function pos1(direction) {\n return direction === 'horizontal' ? 'left' : 'top';\n}\nexport function pos2(direction) {\n return direction === 'horizontal' ? 'top' : 'left';\n}\nexport class BaseLayout {\n _getDefaultConfig() {\n return {\n direction: 'vertical',\n };\n }\n constructor(hostSink, config) {\n /**\n * The last set viewport scroll position.\n */\n this._latestCoords = { left: 0, top: 0 };\n /**\n * Scrolling direction.\n */\n this._direction = null;\n /**\n * Dimensions of the viewport.\n */\n this._viewportSize = { width: 0, height: 0 };\n this.totalScrollSize = { width: 0, height: 0 };\n this.offsetWithinScroller = { left: 0, top: 0 };\n /**\n * Flag for debouncing asynchronous reflow requests.\n */\n this._pendingReflow = false;\n this._pendingLayoutUpdate = false;\n this._pin = null;\n /**\n * The index of the first item intersecting the viewport.\n */\n this._firstVisible = 0;\n /**\n * The index of the last item intersecting the viewport.\n */\n this._lastVisible = 0;\n /**\n * Pixel offset in the scroll direction of the first child.\n */\n this._physicalMin = 0;\n /**\n * Pixel offset in the scroll direction of the last child.\n */\n this._physicalMax = 0;\n /**\n * Index of the first child.\n */\n this._first = -1;\n /**\n * Index of the last child.\n */\n this._last = -1;\n /**\n * Length in the scrolling direction.\n */\n this._sizeDim = 'height';\n /**\n * Length in the non-scrolling direction.\n */\n this._secondarySizeDim = 'width';\n /**\n * Position in the scrolling direction.\n */\n this._positionDim = 'top';\n /**\n * Position in the non-scrolling direction.\n */\n this._secondaryPositionDim = 'left';\n /**\n * Current scroll offset in pixels.\n */\n this._scrollPosition = 0;\n /**\n * Difference between current scroll offset and scroll offset calculated due\n * to a reflow.\n */\n this._scrollError = 0;\n /**\n * Total number of items that could possibly be displayed. Used to help\n * calculate the scroll size.\n */\n this._items = [];\n /**\n * The total (estimated) length of all items in the scrolling direction.\n */\n this._scrollSize = 1;\n /**\n * Number of pixels beyond the viewport to still include\n * in the active range of items.\n */\n // TODO (graynorton): Probably want to make this something we calculate based\n // on viewport size, item size, other factors, possibly still with a dial of some kind\n this._overhang = 1000;\n this._hostSink = hostSink;\n // Delay setting config so that subclasses do setup work first\n Promise.resolve().then(() => (this.config = config || this._getDefaultConfig()));\n }\n set config(config) {\n Object.assign(this, Object.assign({}, this._getDefaultConfig(), config));\n }\n get config() {\n return {\n direction: this.direction,\n };\n }\n /**\n * Maximum index of children + 1, to help estimate total height of the scroll\n * space.\n */\n get items() {\n return this._items;\n }\n set items(items) {\n this._setItems(items);\n }\n _setItems(items) {\n if (items !== this._items) {\n this._items = items;\n this._scheduleReflow();\n }\n }\n /**\n * Primary scrolling direction.\n */\n get direction() {\n return this._direction;\n }\n set direction(dir) {\n // Force it to be either horizontal or vertical.\n dir = dir === 'horizontal' ? dir : 'vertical';\n if (dir !== this._direction) {\n this._direction = dir;\n this._sizeDim = dir === 'horizontal' ? 'width' : 'height';\n this._secondarySizeDim = dir === 'horizontal' ? 'height' : 'width';\n this._positionDim = dir === 'horizontal' ? 'left' : 'top';\n this._secondaryPositionDim = dir === 'horizontal' ? 'top' : 'left';\n this._triggerReflow();\n }\n }\n /**\n * Height and width of the viewport.\n */\n get viewportSize() {\n return this._viewportSize;\n }\n set viewportSize(dims) {\n const { _viewDim1, _viewDim2 } = this;\n Object.assign(this._viewportSize, dims);\n if (_viewDim2 !== this._viewDim2) {\n // this._viewDim2Changed();\n this._scheduleLayoutUpdate();\n }\n else if (_viewDim1 !== this._viewDim1) {\n this._checkThresholds();\n }\n }\n /**\n * Scroll offset of the viewport.\n */\n get viewportScroll() {\n return this._latestCoords;\n }\n set viewportScroll(coords) {\n Object.assign(this._latestCoords, coords);\n const oldPos = this._scrollPosition;\n this._scrollPosition = this._latestCoords[this._positionDim];\n const change = Math.abs(oldPos - this._scrollPosition);\n if (change >= 1) {\n this._checkThresholds();\n }\n }\n /**\n * Perform a reflow if one has been scheduled.\n */\n reflowIfNeeded(force = false) {\n if (force || this._pendingReflow) {\n this._pendingReflow = false;\n this._reflow();\n }\n }\n set pin(options) {\n this._pin = options;\n this._triggerReflow();\n }\n get pin() {\n if (this._pin !== null) {\n const { index, block } = this._pin;\n return {\n index: Math.max(0, Math.min(index, this.items.length - 1)),\n block,\n };\n }\n return null;\n }\n _clampScrollPosition(val) {\n return Math.max(-this.offsetWithinScroller[this._positionDim], Math.min(val, this.totalScrollSize[dim1(this.direction)] - this._viewDim1));\n }\n unpin() {\n if (this._pin !== null) {\n this._sendUnpinnedMessage();\n this._pin = null;\n }\n }\n _updateLayout() {\n // Override\n }\n // protected _viewDim2Changed(): void {\n // this._scheduleLayoutUpdate();\n // }\n /**\n * The height or width of the viewport, whichever corresponds to the scrolling direction.\n */\n get _viewDim1() {\n return this._viewportSize[this._sizeDim];\n }\n /**\n * The height or width of the viewport, whichever does NOT correspond to the scrolling direction.\n */\n get _viewDim2() {\n return this._viewportSize[this._secondarySizeDim];\n }\n _scheduleReflow() {\n this._pendingReflow = true;\n }\n _scheduleLayoutUpdate() {\n this._pendingLayoutUpdate = true;\n this._scheduleReflow();\n }\n // For triggering a reflow based on incoming changes to\n // the layout config.\n _triggerReflow() {\n this._scheduleLayoutUpdate();\n // TODO graynorton@: reflowIfNeeded() isn't really supposed\n // to be called internally. Address in larger cleanup\n // of virtualizer / layout interaction pattern.\n // this.reflowIfNeeded(true);\n Promise.resolve().then(() => this.reflowIfNeeded());\n }\n _reflow() {\n if (this._pendingLayoutUpdate) {\n this._updateLayout();\n this._pendingLayoutUpdate = false;\n }\n this._updateScrollSize();\n this._setPositionFromPin();\n this._getActiveItems();\n this._updateVisibleIndices();\n this._sendStateChangedMessage();\n }\n /**\n * If we are supposed to be pinned to a particular\n * item or set of coordinates, we set `_scrollPosition`\n * accordingly and adjust `_scrollError` as needed\n * so that the virtualizer can keep the scroll\n * position in the DOM in sync\n */\n _setPositionFromPin() {\n if (this.pin !== null) {\n const lastScrollPosition = this._scrollPosition;\n const { index, block } = this.pin;\n this._scrollPosition =\n this._calculateScrollIntoViewPosition({\n index,\n block: block || 'start',\n }) - this.offsetWithinScroller[this._positionDim];\n this._scrollError = lastScrollPosition - this._scrollPosition;\n }\n }\n /**\n * Calculate the coordinates to scroll to, given\n * a request to scroll to the element at a specific\n * index.\n *\n * Supports the same positioning options (`start`,\n * `center`, `end`, `nearest`) as the standard\n * `Element.scrollIntoView()` method, but currently\n * only considers the provided value in the `block`\n * dimension, since we don't yet have any layouts\n * that support virtualization in two dimensions.\n */\n _calculateScrollIntoViewPosition(options) {\n const { block } = options;\n const index = Math.min(this.items.length, Math.max(0, options.index));\n const itemStartPosition = this._getItemPosition(index)[this._positionDim];\n let scrollPosition = itemStartPosition;\n if (block !== 'start') {\n const itemSize = this._getItemSize(index)[this._sizeDim];\n if (block === 'center') {\n scrollPosition =\n itemStartPosition - 0.5 * this._viewDim1 + 0.5 * itemSize;\n }\n else {\n const itemEndPosition = itemStartPosition - this._viewDim1 + itemSize;\n if (block === 'end') {\n scrollPosition = itemEndPosition;\n }\n else {\n // block === 'nearest'\n const currentScrollPosition = this._scrollPosition;\n scrollPosition =\n Math.abs(currentScrollPosition - itemStartPosition) <\n Math.abs(currentScrollPosition - itemEndPosition)\n ? itemStartPosition\n : itemEndPosition;\n }\n }\n }\n scrollPosition += this.offsetWithinScroller[this._positionDim];\n return this._clampScrollPosition(scrollPosition);\n }\n getScrollIntoViewCoordinates(options) {\n return {\n [this._positionDim]: this._calculateScrollIntoViewPosition(options),\n };\n }\n _sendUnpinnedMessage() {\n this._hostSink({\n type: 'unpinned',\n });\n }\n _sendVisibilityChangedMessage() {\n this._hostSink({\n type: 'visibilityChanged',\n firstVisible: this._firstVisible,\n lastVisible: this._lastVisible,\n });\n }\n _sendStateChangedMessage() {\n const childPositions = new Map();\n if (this._first !== -1 && this._last !== -1) {\n for (let idx = this._first; idx <= this._last; idx++) {\n childPositions.set(idx, this._getItemPosition(idx));\n }\n }\n const message = {\n type: 'stateChanged',\n scrollSize: {\n [this._sizeDim]: this._scrollSize,\n [this._secondarySizeDim]: null,\n },\n range: {\n first: this._first,\n last: this._last,\n firstVisible: this._firstVisible,\n lastVisible: this._lastVisible,\n },\n childPositions,\n };\n if (this._scrollError) {\n message.scrollError = {\n [this._positionDim]: this._scrollError,\n [this._secondaryPositionDim]: 0,\n };\n this._scrollError = 0;\n }\n this._hostSink(message);\n }\n /**\n * Number of items to display.\n */\n get _num() {\n if (this._first === -1 || this._last === -1) {\n return 0;\n }\n return this._last - this._first + 1;\n }\n _checkThresholds() {\n if ((this._viewDim1 === 0 && this._num > 0) || this._pin !== null) {\n this._scheduleReflow();\n }\n else {\n const min = Math.max(0, this._scrollPosition - this._overhang);\n const max = Math.min(this._scrollSize, this._scrollPosition + this._viewDim1 + this._overhang);\n if (this._physicalMin > min || this._physicalMax < max) {\n this._scheduleReflow();\n }\n else {\n this._updateVisibleIndices({ emit: true });\n }\n }\n }\n /**\n * Find the indices of the first and last items to intersect the viewport.\n * Emit a visibleindiceschange event when either index changes.\n */\n _updateVisibleIndices(options) {\n if (this._first === -1 || this._last === -1)\n return;\n let firstVisible = this._first;\n while (firstVisible < this._last &&\n Math.round(this._getItemPosition(firstVisible)[this._positionDim] +\n this._getItemSize(firstVisible)[this._sizeDim]) <= Math.round(this._scrollPosition)) {\n firstVisible++;\n }\n let lastVisible = this._last;\n while (lastVisible > this._first &&\n Math.round(this._getItemPosition(lastVisible)[this._positionDim]) >=\n Math.round(this._scrollPosition + this._viewDim1)) {\n lastVisible--;\n }\n if (firstVisible !== this._firstVisible ||\n lastVisible !== this._lastVisible) {\n this._firstVisible = firstVisible;\n this._lastVisible = lastVisible;\n if (options && options.emit) {\n this._sendVisibilityChangedMessage();\n }\n }\n }\n}\n//# sourceMappingURL=BaseLayout.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nimport { SizeCache } from './shared/SizeCache.js';\nimport { BaseLayout, dim1 } from './shared/BaseLayout.js';\nexport const flow = (config) => Object.assign({\n type: FlowLayout,\n}, config);\nfunction leadingMargin(direction) {\n return direction === 'horizontal' ? 'marginLeft' : 'marginTop';\n}\nfunction trailingMargin(direction) {\n return direction === 'horizontal' ? 'marginRight' : 'marginBottom';\n}\nfunction offset(direction) {\n return direction === 'horizontal' ? 'xOffset' : 'yOffset';\n}\nfunction collapseMargins(a, b) {\n const m = [a, b].sort();\n return m[1] <= 0 ? Math.min(...m) : m[0] >= 0 ? Math.max(...m) : m[0] + m[1];\n}\nclass MetricsCache {\n constructor() {\n this._childSizeCache = new SizeCache();\n this._marginSizeCache = new SizeCache();\n this._metricsCache = new Map();\n }\n update(metrics, direction) {\n const marginsToUpdate = new Set();\n Object.keys(metrics).forEach((key) => {\n const k = Number(key);\n this._metricsCache.set(k, metrics[k]);\n this._childSizeCache.set(k, metrics[k][dim1(direction)]);\n marginsToUpdate.add(k);\n marginsToUpdate.add(k + 1);\n });\n for (const k of marginsToUpdate) {\n const a = this._metricsCache.get(k)?.[leadingMargin(direction)] || 0;\n const b = this._metricsCache.get(k - 1)?.[trailingMargin(direction)] || 0;\n this._marginSizeCache.set(k, collapseMargins(a, b));\n }\n }\n get averageChildSize() {\n return this._childSizeCache.averageSize;\n }\n get totalChildSize() {\n return this._childSizeCache.totalSize;\n }\n get averageMarginSize() {\n return this._marginSizeCache.averageSize;\n }\n get totalMarginSize() {\n return this._marginSizeCache.totalSize;\n }\n getLeadingMarginValue(index, direction) {\n return this._metricsCache.get(index)?.[leadingMargin(direction)] || 0;\n }\n getChildSize(index) {\n return this._childSizeCache.getSize(index);\n }\n getMarginSize(index) {\n return this._marginSizeCache.getSize(index);\n }\n clear() {\n this._childSizeCache.clear();\n this._marginSizeCache.clear();\n this._metricsCache.clear();\n }\n}\nexport class FlowLayout extends BaseLayout {\n constructor() {\n super(...arguments);\n /**\n * Initial estimate of item size\n */\n this._itemSize = { width: 100, height: 100 };\n /**\n * Indices of children mapped to their (position and length) in the scrolling\n * direction. Used to keep track of children that are in range.\n */\n this._physicalItems = new Map();\n /**\n * Used in tandem with _physicalItems to track children in range across\n * reflows.\n */\n this._newPhysicalItems = new Map();\n /**\n * Width and height of children by their index.\n */\n this._metricsCache = new MetricsCache();\n /**\n * anchorIdx is the anchor around which we reflow. It is designed to allow\n * jumping to any point of the scroll size. We choose it once and stick with\n * it until stable. _first and _last are deduced around it.\n */\n this._anchorIdx = null;\n /**\n * Position in the scrolling direction of the anchor child.\n */\n this._anchorPos = null;\n /**\n * Whether all children in range were in range during the previous reflow.\n */\n this._stable = true;\n this._measureChildren = true;\n this._estimate = true;\n }\n // protected _defaultConfig: BaseLayoutConfig = Object.assign({}, super._defaultConfig, {\n // })\n // constructor(config: Layout1dConfig) {\n // super(config);\n // }\n get measureChildren() {\n return this._measureChildren;\n }\n /**\n * Determine the average size of all children represented in the sizes\n * argument.\n */\n updateItemSizes(sizes) {\n this._metricsCache.update(sizes, this.direction);\n // if (this._nMeasured) {\n // this._updateItemSize();\n this._scheduleReflow();\n // }\n }\n /**\n * Set the average item size based on the total length and number of children\n * in range.\n */\n // _updateItemSize() {\n // // Keep integer values.\n // this._itemSize[this._sizeDim] = this._metricsCache.averageChildSize;\n // }\n _getPhysicalItem(idx) {\n return this._newPhysicalItems.get(idx) ?? this._physicalItems.get(idx);\n }\n _getSize(idx) {\n const item = this._getPhysicalItem(idx);\n return item && this._metricsCache.getChildSize(idx);\n }\n _getAverageSize() {\n return this._metricsCache.averageChildSize || this._itemSize[this._sizeDim];\n }\n _estimatePosition(idx) {\n const c = this._metricsCache;\n if (this._first === -1 || this._last === -1) {\n return (c.averageMarginSize +\n idx * (c.averageMarginSize + this._getAverageSize()));\n }\n else {\n if (idx < this._first) {\n const delta = this._first - idx;\n const refItem = this._getPhysicalItem(this._first);\n return (refItem.pos -\n (c.getMarginSize(this._first - 1) || c.averageMarginSize) -\n (delta * c.averageChildSize + (delta - 1) * c.averageMarginSize));\n }\n else {\n const delta = idx - this._last;\n const refItem = this._getPhysicalItem(this._last);\n return (refItem.pos +\n (c.getChildSize(this._last) || c.averageChildSize) +\n (c.getMarginSize(this._last) || c.averageMarginSize) +\n delta * (c.averageChildSize + c.averageMarginSize));\n }\n }\n }\n /**\n * Returns the position in the scrolling direction of the item at idx.\n * Estimates it if the item at idx is not in the DOM.\n */\n _getPosition(idx) {\n const item = this._getPhysicalItem(idx);\n const { averageMarginSize } = this._metricsCache;\n return idx === 0\n ? this._metricsCache.getMarginSize(0) ?? averageMarginSize\n : item\n ? item.pos\n : this._estimatePosition(idx);\n }\n _calculateAnchor(lower, upper) {\n if (lower <= 0) {\n return 0;\n }\n if (upper > this._scrollSize - this._viewDim1) {\n return this.items.length - 1;\n }\n return Math.max(0, Math.min(this.items.length - 1, Math.floor((lower + upper) / 2 / this._delta)));\n }\n _getAnchor(lower, upper) {\n if (this._physicalItems.size === 0) {\n return this._calculateAnchor(lower, upper);\n }\n if (this._first < 0) {\n return this._calculateAnchor(lower, upper);\n }\n if (this._last < 0) {\n return this._calculateAnchor(lower, upper);\n }\n const firstItem = this._getPhysicalItem(this._first), lastItem = this._getPhysicalItem(this._last), firstMin = firstItem.pos, lastMin = lastItem.pos, lastMax = lastMin + this._metricsCache.getChildSize(this._last);\n if (lastMax < lower) {\n // Window is entirely past physical items, calculate new anchor\n return this._calculateAnchor(lower, upper);\n }\n if (firstMin > upper) {\n // Window is entirely before physical items, calculate new anchor\n return this._calculateAnchor(lower, upper);\n }\n // Window contains a physical item\n // Find one, starting with the one that was previously first visible\n let candidateIdx = this._firstVisible - 1;\n let cMax = -Infinity;\n while (cMax < lower) {\n const candidate = this._getPhysicalItem(++candidateIdx);\n cMax = candidate.pos + this._metricsCache.getChildSize(candidateIdx);\n }\n return candidateIdx;\n }\n /**\n * Updates _first and _last based on items that should be in the current\n * viewed range.\n */\n _getActiveItems() {\n if (this._viewDim1 === 0 || this.items.length === 0) {\n this._clearItems();\n }\n else {\n this._getItems();\n }\n }\n /**\n * Sets the range to empty.\n */\n _clearItems() {\n this._first = -1;\n this._last = -1;\n this._physicalMin = 0;\n this._physicalMax = 0;\n const items = this._newPhysicalItems;\n this._newPhysicalItems = this._physicalItems;\n this._newPhysicalItems.clear();\n this._physicalItems = items;\n this._stable = true;\n }\n /*\n * Updates _first and _last based on items that should be in the given range.\n */\n _getItems() {\n const items = this._newPhysicalItems;\n this._stable = true;\n let lower, upper;\n // The anchorIdx is the anchor around which we reflow. It is designed to\n // allow jumping to any point of the scroll size. We choose it once and\n // stick with it until stable. first and last are deduced around it.\n // If we have a pinned item, we anchor on it\n if (this.pin !== null) {\n const { index } = this.pin;\n this._anchorIdx = index;\n this._anchorPos = this._getPosition(index);\n }\n // Determine the lower and upper bounds of the region to be\n // rendered, relative to the viewport\n lower = this._scrollPosition - this._overhang; //leadingOverhang;\n upper = this._scrollPosition + this._viewDim1 + this._overhang; // trailingOverhang;\n if (upper < 0 || lower > this._scrollSize) {\n this._clearItems();\n return;\n }\n // If we are scrolling to a specific index or if we are doing another\n // pass to stabilize a previously started reflow, we will already\n // have an anchor. If not, establish an anchor now.\n if (this._anchorIdx === null || this._anchorPos === null) {\n this._anchorIdx = this._getAnchor(lower, upper);\n this._anchorPos = this._getPosition(this._anchorIdx);\n }\n let anchorSize = this._getSize(this._anchorIdx);\n if (anchorSize === undefined) {\n this._stable = false;\n anchorSize = this._getAverageSize();\n }\n const anchorLeadingMargin = this._metricsCache.getMarginSize(this._anchorIdx) ??\n this._metricsCache.averageMarginSize;\n const anchorTrailingMargin = this._metricsCache.getMarginSize(this._anchorIdx + 1) ??\n this._metricsCache.averageMarginSize;\n if (this._anchorIdx === 0) {\n this._anchorPos = anchorLeadingMargin;\n }\n if (this._anchorIdx === this.items.length - 1) {\n this._anchorPos = this._scrollSize - anchorTrailingMargin - anchorSize;\n }\n // Anchor might be outside bounds, so prefer correcting the error and keep\n // that anchorIdx.\n let anchorErr = 0;\n if (this._anchorPos + anchorSize + anchorTrailingMargin < lower) {\n anchorErr = lower - (this._anchorPos + anchorSize + anchorTrailingMargin);\n }\n if (this._anchorPos - anchorLeadingMargin > upper) {\n anchorErr = upper - (this._anchorPos - anchorLeadingMargin);\n }\n if (anchorErr) {\n this._scrollPosition -= anchorErr;\n lower -= anchorErr;\n upper -= anchorErr;\n this._scrollError += anchorErr;\n }\n items.set(this._anchorIdx, { pos: this._anchorPos, size: anchorSize });\n this._first = this._last = this._anchorIdx;\n this._physicalMin = this._anchorPos - anchorLeadingMargin;\n this._physicalMax = this._anchorPos + anchorSize + anchorTrailingMargin;\n while (this._physicalMin > lower && this._first > 0) {\n let size = this._getSize(--this._first);\n if (size === undefined) {\n this._stable = false;\n size = this._getAverageSize();\n }\n let margin = this._metricsCache.getMarginSize(this._first);\n if (margin === undefined) {\n this._stable = false;\n margin = this._metricsCache.averageMarginSize;\n }\n this._physicalMin -= size;\n const pos = this._physicalMin;\n items.set(this._first, { pos, size });\n this._physicalMin -= margin;\n if (this._stable === false && this._estimate === false) {\n break;\n }\n }\n while (this._physicalMax < upper && this._last < this.items.length - 1) {\n let size = this._getSize(++this._last);\n if (size === undefined) {\n this._stable = false;\n size = this._getAverageSize();\n }\n let margin = this._metricsCache.getMarginSize(this._last);\n if (margin === undefined) {\n this._stable = false;\n margin = this._metricsCache.averageMarginSize;\n }\n const pos = this._physicalMax;\n items.set(this._last, { pos, size });\n this._physicalMax += size + margin;\n if (!this._stable && !this._estimate) {\n break;\n }\n }\n // This handles the cases where we were relying on estimated sizes.\n const extentErr = this._calculateError();\n if (extentErr) {\n this._physicalMin -= extentErr;\n this._physicalMax -= extentErr;\n this._anchorPos -= extentErr;\n this._scrollPosition -= extentErr;\n items.forEach((item) => (item.pos -= extentErr));\n this._scrollError += extentErr;\n }\n if (this._stable) {\n this._newPhysicalItems = this._physicalItems;\n this._newPhysicalItems.clear();\n this._physicalItems = items;\n }\n }\n _calculateError() {\n if (this._first === 0) {\n return this._physicalMin;\n }\n else if (this._physicalMin <= 0) {\n return this._physicalMin - this._first * this._delta;\n }\n else if (this._last === this.items.length - 1) {\n return this._physicalMax - this._scrollSize;\n }\n else if (this._physicalMax >= this._scrollSize) {\n return (this._physicalMax -\n this._scrollSize +\n (this.items.length - 1 - this._last) * this._delta);\n }\n return 0;\n }\n _reflow() {\n const { _first, _last } = this;\n super._reflow();\n if ((this._first === -1 && this._last == -1) ||\n (this._first === _first && this._last === _last)) {\n this._resetReflowState();\n }\n }\n _resetReflowState() {\n this._anchorIdx = null;\n this._anchorPos = null;\n this._stable = true;\n }\n _updateScrollSize() {\n const { averageMarginSize } = this._metricsCache;\n this._scrollSize = Math.max(1, this.items.length * (averageMarginSize + this._getAverageSize()) +\n averageMarginSize);\n }\n /**\n * Returns the average size (precise or estimated) of an item in the scrolling direction,\n * including any surrounding space.\n */\n get _delta() {\n const { averageMarginSize } = this._metricsCache;\n return this._getAverageSize() + averageMarginSize;\n }\n /**\n * Returns the top and left positioning of the item at idx.\n */\n _getItemPosition(idx) {\n return {\n [this._positionDim]: this._getPosition(idx),\n [this._secondaryPositionDim]: 0,\n [offset(this.direction)]: -(this._metricsCache.getLeadingMarginValue(idx, this.direction) ??\n this._metricsCache.averageMarginSize),\n };\n }\n /**\n * Returns the height and width of the item at idx.\n */\n _getItemSize(idx) {\n return {\n [this._sizeDim]: this._getSize(idx) || this._getAverageSize(),\n [this._secondarySizeDim]: this._itemSize[this._secondarySizeDim],\n };\n }\n _viewDim2Changed() {\n this._metricsCache.clear();\n this._scheduleReflow();\n }\n}\n//# sourceMappingURL=flow.js.map"],"x_google_ignoreList":[0,1,2],"mappings":"AAKA,IAAa,EAAb,KAAA,CACI,YAAY,EAAA,CACR,KAAK,KAAO,IAAI,IAChB,KAAK,kBAAA,CAAoB,EACzB,KAAK,UAAY,EAAA,CACgB,IAA7B,GAAQ,mBACR,KAAK,kBAAA,CAAoB,GAGjC,IAAI,EAAO,EAAA,CACP,IAAM,EAAO,KAAK,KAAK,IAAI,EAAA,EAAU,EACrC,KAAK,KAAK,IAAI,EAAO,EAAA,CACrB,KAAK,WAAa,EAAQ,EAE9B,IAAA,aAAI,CACA,GAAI,KAAK,KAAK,KAAO,EAAG,CACpB,IAAM,EAAU,KAAK,UAAY,KAAK,KAAK,KAC3C,OAAO,KAAK,kBAAoB,KAAK,MAAM,EAAA,CAAW,EAE1D,MAAO,GAEX,QAAQ,EAAA,CACJ,OAAO,KAAK,KAAK,IAAI,EAAA,CAEzB,OAAA,CACI,KAAK,KAAK,OAAA,CACV,KAAK,UAAY,IC1BzB,SAAgB,EAAK,EAAA,CACjB,OAAO,IAAc,aAAe,QAAU,SAWlD,IAAa,EAAb,KAAA,CACI,mBAAA,CACI,MAAO,CACH,UAAW,WAAA,CAGnB,YAAY,EAAU,EAAA,CAIlB,KAAK,cAAgB,CAAE,KAAM,EAAG,IAAK,EAAA,CAIrC,KAAK,WAAa,KAIlB,KAAK,cAAgB,CAAE,MAAO,EAAG,OAAQ,EAAA,CACzC,KAAK,gBAAkB,CAAE,MAAO,EAAG,OAAQ,EAAA,CAC3C,KAAK,qBAAuB,CAAE,KAAM,EAAG,IAAK,EAAA,C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ACT,MAAO,EACF,KAAK,UAAW,KAAK,SAAS,EAAA,EAAQ,KAAK,iBAAA,EAC3C,KAAK,mBAAoB,KAAK,UAAU,KAAK,mBAAA,CAGtD,kBAAA,CACI,KAAK,cAAc,OAAA,CACnB,KAAK,iBAAA"}
@@ -203,7 +203,7 @@ The manifest already has everything needed; the package is just the JSON-RPC wra
203
203
 
204
204
  **Problem.** `handover/agent-runtime-v1.md` had `<PENDING>` placeholders that we manually replaced with `0.9.13` after the first publish. Future handover docs will have the same issue.
205
205
 
206
- **Fix.** A build step that substitutes `0.9.18` in `handover/**/*.md` against `package.json`'s `version` field on every build. `dist/handover/**/*.md` gets the rendered version; the source stays templated.
206
+ **Fix.** A build step that substitutes `0.9.20` in `handover/**/*.md` against `package.json`'s `version` field on every build. `dist/handover/**/*.md` gets the rendered version; the source stays templated.
207
207
 
208
208
  **Effort:** ~30 min (one sed step or a tiny script).
209
209
 
@@ -7,8 +7,8 @@
7
7
  ## The URLs you asked for
8
8
 
9
9
  ```
10
- https://esm.sh/@mhmo91/schmancy/agent@0.9.18
11
- https://esm.sh/@mhmo91/schmancy/agent/manifest@0.9.18
10
+ https://esm.sh/@mhmo91/schmancy/agent@0.9.20
11
+ https://esm.sh/@mhmo91/schmancy/agent/manifest@0.9.20
12
12
  ```
13
13
 
14
14
  `0.9.13` is the first release containing `/agent`; every subsequent publish serves the same subpath. `npm view @mhmo91/schmancy version` always returns the current pin if you want to float forward.
@@ -20,7 +20,7 @@ One script tag. No bundler, no bare specifiers, no npm install.
20
20
  ```html
21
21
  <!doctype html>
22
22
  <script type="module">
23
- import { $dialog, theme } from 'https://esm.sh/@mhmo91/schmancy/agent@0.9.18';
23
+ import { $dialog, theme } from 'https://esm.sh/@mhmo91/schmancy/agent@0.9.20';
24
24
  </script>
25
25
  <schmancy-theme root scheme="dark">
26
26
  <schmancy-surface type="solid" fill="all">
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const ee=require(`./tailwind.mixin-Bh58QnlW.cjs`),e=require(`./area-DBjAhgjP.cjs`),te=require(`./lazy-BDNnH_r7.cjs`),t=require(`./store-CjFHCSDb.cjs`),n=require(`./sound.service-BEN6Xjy_.cjs`),r=require(`./audio-Dvr-RBzE.cjs`),i=require(`./search-CwMav5QB.cjs`),a=require(`./input-chip-p24lkYtY.cjs`),o=require(`./animation-CQRdLgzX.cjs`),ne=require(`./reduced-motion-9RjNnhIg.cjs`),s=require(`./cursor-glow-Duw9jHmh.cjs`),c=require(`./theme.events-DakXxZeP.cjs`),l=require(`./theme.service-DxJPUGlu.cjs`),u=require(`./layout-CTfRXQoz.cjs`),re=require(`./magnetic-CVXEkYTA.cjs`),d=require(`./directives.cjs`),f=require(`./src-I4M33WK2.cjs`),p=require(`./boat-BjYJI1HS.cjs`),m=require(`./button.cjs`),h=require(`./charts.cjs`),g=require(`./checkbox-DtcFMgZL.cjs`),_=require(`./chips-DoCu5YQb.cjs`),v=require(`./code-highlight-zSYcSfCz.cjs`),ie=require(`./components-TJT8-tva.cjs`),ae=require(`./connectivity.cjs`),y=require(`./date-range-CIWYm3eS.cjs`),b=require(`./overlay-stack-7bs4ZNnh.cjs`),x=require(`./dialog-service-CzDO08Gy.cjs`),S=require(`./sheet.service-BfNDB0K0.cjs`),C=require(`./date-range-inline-B9Dp2z6C.cjs`),w=require(`./delay-Bu4WMQlV.cjs`),T=require(`./details-B8p62xmR.cjs`),E=require(`./dialog.cjs`),D=require(`./discovery.cjs`),O=require(`./dropdown.cjs`),k=require(`./surface-B6DA01kL.cjs`),A=require(`./expand-BmwIPNjq.cjs`),j=require(`./window-Cjv2GqSN.cjs`),oe=require(`./float-BQwhfibw.cjs`),M=require(`./extra-BUgyMgjl.cjs`),N=require(`./form-wI58M85H.cjs`),P=require(`./iframe-C7sHg7RC.cjs`),F=require(`./input-BGNZlfL8.cjs`),I=require(`./notification-DPUkuifB.cjs`),L=require(`./json.cjs`),R=require(`./layout-B0_IXfov.cjs`),z=require(`./scroll-V1rAZ9fK.cjs`),B=require(`./lightbox-BWKTzA03.cjs`),V=require(`./list-CMWHu6cV.cjs`),H=require(`./mailbox-Tg1CROVz.cjs`),U=require(`./map-Z_dsu-dv.cjs`),W=require(`./navigation-rail.cjs`),G=require(`./page.cjs`),K=require(`./qr-scanner.cjs`),q=require(`./radio-group-B7DuNxUq.cjs`),se=require(`./range.cjs`),ce=require(`./rxjs-utils-DJbZRjp3.cjs`),le=require(`./theme.interface-DTwkuAKJ.cjs`),ue=require(`./select-DFxoBgEf.cjs`),J=require(`./slider.cjs`),Y=require(`./steps.cjs`),X=require(`./table-B-DsOqzT.cjs`),Z=require(`./theme-DU5yXaV-.cjs`),de=require(`./tooltip.cjs`),fe=require(`./tree.cjs`),pe=require(`./types.cjs`),me=require(`./intersection-DqBqnpgh.cjs`),Q=require(`./typewriter-LK0S4NEr.cjs`),he=require(`./typography.cjs`),ge=require(`./utils-2qrmPb78.cjs`),$=require(`./breadcrumb.cjs`),_e=require(`./kbd.cjs`),ve=require(`./skeleton.cjs`),ye=require(`./switch.cjs`),be=require(`./visually-hidden.cjs`);exports.$dialog=x.t,exports.$drawer=f.m,exports.$notify=I.r,exports.$sounds=r.t,exports.ANIMATION_CSS_VARS=o.t,exports.BLACKBIRD_EASING=o.n,exports.BaseStore=t.I,Object.defineProperty(exports,`ConfirmDialog`,{enumerable:!0,get:function(){return E.ConfirmDialog}}),Object.defineProperty(exports,`SchmancyDialog`,{enumerable:!0,get:function(){return E.ConfirmDialog}}),exports.DISCOVER_EVENT=D.DISCOVER_EVENT,exports.DISCOVER_RESPONSE_EVENT=D.DISCOVER_RESPONSE_EVENT,exports.DURATION_BACKDROP=o.r,exports.DURATION_ENTER=o.i,exports.DURATION_EXIT=o.a,exports.DialogBase=E.DialogBase,exports.DialogService=x.n,exports.DragDirective=d.DragDirective,exports.DropDirective=d.DropDirective,exports.EASE_IN=o.o,exports.EASE_OUT=o.s,exports.EmotionalSoundGenerator=r.n,exports.FINDING_MORTIES=e.b,exports.GRID_ANIMATION_CSS=o.c,exports.HERE_RICKY=e.x,exports.HISTORY_STRATEGY=e.v,exports.HereMorty=f.r,exports.IndexedDBStorageManager=t.L,Object.defineProperty(exports,`List`,{enumerable:!0,get:function(){return V.t}}),exports.LocalStorageManager=t.R,exports.MemoryStorageManager=t.z,exports.Numbers=ge.t,Object.defineProperty(exports,`RadioButton`,{enumerable:!0,get:function(){return q.t}}),Object.defineProperty(exports,`RadioGroup`,{enumerable:!0,get:function(){return q.n}}),exports.SCHMANCY_EXPAND_REQUEST_CLOSE=A.t,exports.SPRING_BOUNCY=o.l,exports.SPRING_GENTLE=o.u,exports.SPRING_SMOOTH=o.d,exports.SPRING_SNAPPY=o.f,Object.defineProperty(exports,`ScBadgeV2`,{enumerable:!0,get:function(){return f.T}}),Object.defineProperty(exports,`SchmancyArea`,{enumerable:!0,get:function(){return e._}}),Object.defineProperty(exports,`SchmancyAreaChart`,{enumerable:!0,get:function(){return h.SchmancyAreaChart}}),exports.SchmancyArrayStore=t.F,Object.defineProperty(exports,`SchmancyAssistChip`,{enumerable:!0,get:function(){return _.r}}),Object.defineProperty(exports,`SchmancyAvatar`,{enumerable:!0,get:function(){return f.t}}),Object.defineProperty(exports,`SchmancyBadgeV2`,{enumerable:!0,get:function(){return f.E}}),exports.SchmancyBoat=p.t,Object.defineProperty(exports,`SchmancyBreadcrumb`,{enumerable:!0,get:function(){return $.SchmancyBreadcrumb}}),Object.defineProperty(exports,`SchmancyBreadcrumbItem`,{enumerable:!0,get:function(){return $.SchmancyBreadcrumbItem}}),Object.defineProperty(exports,`SchmancyButton`,{enumerable:!0,get:function(){return m.SchmancyButton}}),Object.defineProperty(exports,`SchmancyCheckbox`,{enumerable:!0,get:function(){return g.t}}),exports.SchmancyChip=_.n,exports.SchmancyFilterChip=_.n,Object.defineProperty(exports,`SchmancyCode`,{enumerable:!0,get:function(){return v.n}}),Object.defineProperty(exports,`SchmancyCodeHighlight`,{enumerable:!0,get:function(){return v.n}}),Object.defineProperty(exports,`SchmancyCodePreview`,{enumerable:!0,get:function(){return v.t}}),Object.defineProperty(exports,`SchmancyConnectivityStatus`,{enumerable:!0,get:function(){return ae.SchmancyConnectivityStatus}}),Object.defineProperty(exports,`SchmancyContentDrawer`,{enumerable:!0,get:function(){return f.v}}),exports.SchmancyContentDrawerID=f.y,Object.defineProperty(exports,`SchmancyContentDrawerMain`,{enumerable:!0,get:function(){return f._}}),exports.SchmancyContentDrawerMaxHeight=f.b,exports.SchmancyContentDrawerMinWidth=f.x,Object.defineProperty(exports,`SchmancyContentDrawerSheet`,{enumerable:!0,get:function(){return f.g}}),exports.SchmancyContentDrawerSheetMode=f.S,exports.SchmancyContentDrawerSheetState=f.C,Object.defineProperty(exports,`SchmancyCountriesSelect`,{enumerable:!0,get:function(){return M.n}}),Object.defineProperty(exports,`SchmancyDataTable`,{enumerable:!0,get:function(){return X.t}}),Object.defineProperty(exports,`SchmancyDateRange`,{enumerable:!0,get:function(){return y.t}}),exports.SchmancyDateRangeInline=C.t,Object.defineProperty(exports,`SchmancyDelay`,{enumerable:!0,get:function(){return w.t}}),exports.SchmancyDetails=T.t,Object.defineProperty(exports,`SchmancyDrawerAppbar`,{enumerable:!0,get:function(){return f.p}}),exports.SchmancyDrawerNavbarMode=f.u,exports.SchmancyDrawerNavbarState=f.d,Object.defineProperty(exports,`SchmancyDropdown`,{enumerable:!0,get:function(){return O.SchmancyDropdown}}),Object.defineProperty(exports,`SchmancyDropdownContent`,{enumerable:!0,get:function(){return O.SchmancyDropdownContent}}),Object.defineProperty(exports,`SchmancyEmailEditor`,{enumerable:!0,get:function(){return H.r}}),Object.defineProperty(exports,`SchmancyEmailLayoutSelector`,{enumerable:!0,get:function(){return H.i}}),Object.defineProperty(exports,`SchmancyEmailRecipients`,{enumerable:!0,get:function(){return H.t}}),Object.defineProperty(exports,`SchmancyEmailViewer`,{enumerable:!0,get:function(){return H.n}}),exports.SchmancyEvents=pe.SchmancyEvents,Object.defineProperty(exports,`SchmancyExpandRoot`,{enumerable:!0,get:function(){return A.n}}),Object.defineProperty(exports,`SchmancyFlex`,{enumerable:!0,get:function(){return R.r}}),Object.defineProperty(exports,`SchmancyFlexV2`,{enumerable:!0,get:function(){return R.t}}),exports.SchmancyFloat=oe.t,exports.SchmancyForm=N.t,exports.SchmancyGenerateMoodAudioEvent=Z.n,Object.defineProperty(exports,`SchmancyGrid`,{enumerable:!0,get:function(){return R.n}}),exports.SchmancyIframe=P.t,exports.SchmancyInput=F.n,Object.defineProperty(exports,`SchmancyInputChip`,{enumerable:!0,get:function(){return a.t}}),Object.defineProperty(exports,`SchmancyInputCompat`,{enumerable:!0,get:function(){return F.t}}),Object.defineProperty(exports,`SchmancyJson`,{enumerable:!0,get:function(){return L.SchmancyJson}}),Object.defineProperty(exports,`SchmancyKbd`,{enumerable:!0,get:function(){return _e.SchmancyKbd}}),Object.defineProperty(exports,`SchmancyLightbox`,{enumerable:!0,get:function(){return B.i}}),Object.defineProperty(exports,`SchmancyListItem`,{enumerable:!0,get:function(){return V.n}}),exports.SchmancyListTypeContext=V.r,Object.defineProperty(exports,`SchmancyMailbox`,{enumerable:!0,get:function(){return H.a}}),exports.SchmancyMap=U.t,Object.defineProperty(exports,`SchmancyNavigationBar`,{enumerable:!0,get:function(){return f.o}}),Object.defineProperty(exports,`SchmancyNavigationBarItem`,{enumerable:!0,get:function(){return f.s}}),Object.defineProperty(exports,`SchmancyNavigationDrawer`,{enumerable:!0,get:function(){return f.l}}),Object.defineProperty(exports,`SchmancyNavigationDrawerContent`,{enumerable:!0,get:function(){return f.f}}),Object.defineProperty(exports,`SchmancyNavigationDrawerSidebar`,{enumerable:!0,get:function(){return f.c}}),Object.defineProperty(exports,`SchmancyNavigationRail`,{enumerable:!0,get:function(){return W.SchmancyNavigationRail}}),Object.defineProperty(exports,`SchmancyNavigationRailItem`,{enumerable:!0,get:function(){return W.SchmancyNavigationRailItem}}),exports.SchmancyNotification=I.i,Object.defineProperty(exports,`SchmancyPage`,{enumerable:!0,get:function(){return G.SchmancyPage}}),Object.defineProperty(exports,`SchmancyPaymentCardForm`,{enumerable:!0,get:function(){return ie.t}}),Object.defineProperty(exports,`SchmancyPills`,{enumerable:!0,get:function(){return h.SchmancyPills}}),Object.defineProperty(exports,`SchmancyQRScanner`,{enumerable:!0,get:function(){return K.SchmancyQRScanner}}),Object.defineProperty(exports,`SchmancyRange`,{enumerable:!0,get:function(){return se.SchmancyRange}}),Object.defineProperty(exports,`SchmancyRoute`,{enumerable:!0,get:function(){return e.y}}),Object.defineProperty(exports,`SchmancyScroll`,{enumerable:!0,get:function(){return z.t}}),Object.defineProperty(exports,`SchmancySelect`,{enumerable:!0,get:function(){return ue.t}}),exports.SchmancySheetPosition=S.t,Object.defineProperty(exports,`SchmancySkeleton`,{enumerable:!0,get:function(){return ve.SchmancySkeleton}}),Object.defineProperty(exports,`SchmancySlide`,{enumerable:!0,get:function(){return J.SchmancySlide}}),Object.defineProperty(exports,`SchmancySlider`,{enumerable:!0,get:function(){return J.SchmancySlider}}),Object.defineProperty(exports,`SchmancyStep`,{enumerable:!0,get:function(){return Y.SchmancyStep}}),Object.defineProperty(exports,`SchmancyStepsContainer`,{enumerable:!0,get:function(){return Y.SchmancyStepsContainer}}),exports.SchmancyStoreObject=t.P,Object.defineProperty(exports,`SchmancySuggestionChip`,{enumerable:!0,get:function(){return _.t}}),Object.defineProperty(exports,`SchmancySurface`,{enumerable:!0,get:function(){return k.t}}),exports.SchmancySurfaceTypeContext=k.n,Object.defineProperty(exports,`SchmancySwitch`,{enumerable:!0,get:function(){return ye.SchmancySwitch}}),Object.defineProperty(exports,`SchmancyTableRow`,{enumerable:!0,get:function(){return X.n}}),Object.defineProperty(exports,`SchmancyTeleportation`,{enumerable:!0,get:function(){return f.n}}),exports.SchmancyTheme=le.t,Object.defineProperty(exports,`SchmancyThemeAudioPlayer`,{enumerable:!0,get:function(){return Z.r}}),Object.defineProperty(exports,`SchmancyThemeComponent`,{enumerable:!0,get:function(){return Z.a}}),Object.defineProperty(exports,`SchmancyThemeController`,{enumerable:!0,get:function(){return Z.i}}),Object.defineProperty(exports,`SchmancyThemeControllerBoat`,{enumerable:!0,get:function(){return Z.t}}),Object.defineProperty(exports,`SchmancyTimezonesSelect`,{enumerable:!0,get:function(){return M.t}}),Object.defineProperty(exports,`SchmancyTree`,{enumerable:!0,get:function(){return fe.SchmancyTree}}),Object.defineProperty(exports,`SchmancyTypography`,{enumerable:!0,get:function(){return he.SchmancyTypography}}),Object.defineProperty(exports,`SchmancyVisuallyHidden`,{enumerable:!0,get:function(){return be.SchmancyVisuallyHidden}}),exports.SchmancyWindow=j.t,Object.defineProperty(exports,`SchmnacyIconButton`,{enumerable:!0,get:function(){return m.SchmnacyIconButton}}),exports.SessionStorageManager=t.B,exports.StepsController=Y.StepsController,exports.StoreError=t.H,exports.ThemeHereIAm=c.t,exports.ThemeWhereAreYou=c.n,Object.defineProperty(exports,`TypewriterElement`,{enumerable:!0,get:function(){return Q.t}}),exports.WhereAreYouRicky=f.i,exports.animateText=d.animateText,exports.area=e.S,exports.buildQueryString=e.t,exports.catmullRomSpline=h.catmullRomSpline,exports.color=d.color,exports.compareActiveRoutes=e.n,exports.compareCustomElementConstructors=e.r,exports.compareRouteActions=e.i,exports.compareValues=t.g,exports.confirmClick=d.confirmClick,exports.createAnimation=o.p,exports.createArrayContext=t.j,exports.createCollectionSelector=t.r,exports.createCompoundSelector=t.i,exports.createContext=t.M,exports.createCountSelector=t.a,exports.createDarkTonalPaletteFromBaseColor=Z.s,exports.createDismissAnimation=o.m,exports.createEntriesSelector=t.o,exports.createFilterSelector=t.s,exports.createFindSelector=t.c,exports.createItemSelector=t.l,exports.createItemsSelector=t.u,exports.createKeysSelector=t.d,exports.createLightTonalPaletteFromBaseColor=Z.c,exports.createMapSelector=t.f,exports.createOptimizedSelector=t.p,exports.createRevealAnimation=o.h,exports.createRouteCacheKey=e.a,exports.createScaleAnimation=o.g,exports.createSelector=t.m,exports.createSortSelector=t.h,exports.createStorageManager=t.V,exports.createTestArrayContext=t.N,exports.cursorGlow=s.t,exports.cycleText=d.cycleText,exports.debounce=e.o,exports.decodeData=e.h,exports.decodeRouteState=e.s,exports.deepMerge=e.c,exports.delayContext=w.n,exports.depthOfField=d.depthOfField,exports.discover=D.discover,exports.discoverAllElements=D.discoverAllElements,exports.discoverAnyComponent=D.discoverAnyComponent,exports.discoverComponent=D.discoverComponent,exports.discoverElement=D.discoverElement,exports.drag=d.drag,exports.drop=d.drop,exports.easeOutCubic=h.easeOutCubic,exports.encodeData=e.g,exports.encodeRouteState=e.l,exports.extractQueryParams=e.u,exports.filterArray=t._,exports.filterArrayItems=t.v,exports.filterMap=t.y,exports.filterMapItems=t.b,exports.flip=B.r,exports.formatTheme=Z.l,exports.fromResizeObserver=u.t,exports.fullHeight=u.n,exports.fullWidth=u.r,exports.getEasing=o._,exports.getFieldValue=t.x,exports.getTagName=e.d,exports.gravity=d.gravity,exports.hexToRgba=h.hexToRgba,exports.intersect=d.intersect,exports.intersection$=me.t,exports.isArray=t.S,exports.isDate=t.C,exports.isIterable=t.w,exports.isMap=t.T,exports.isNil=t.E,exports.isNumber=t.D,exports.isObject=e.f,exports.isPlainObject=t.O,exports.isSet=t.k,exports.isString=t.A,exports.lazy=te.t,exports.lightbox=B.t,exports.lightboxDirective=B.n,exports.liquid=d.liquid,exports.livingBorder=d.livingBorder,exports.longPress=d.longPress,exports.magnetic=re.t,exports.mutationObserver=ce.t,exports.nebula=d.nebula,exports.normalizeTagName=e.p,exports.notify=I.t,exports.notifyProgress=I.n,exports.overlayStack=b.t,exports.prefersReducedMotion=o.v,exports.reducedMotion$=ne.t,exports.reveal=d.reveal,exports.ripple=d.ripple,exports.routerHistory=e.C,exports.sanitizeRouteState=e.m,exports.schmancyContentDrawer=f.w,exports.schmancyNavDrawer=f.h,exports.schmancySound=n.t,exports.schmancyTheme=l.t,exports.select=t.t,exports.selectItem=t.n,exports.sheet=S.n,exports.similarity=i.t,exports.sound=n.n,exports.stepsContext=Y.stepsContext,exports.tailwindAnimations=o.y,exports.tailwindStyles=Z.o,exports.teleport=f.a,exports.theme=l.n,exports.themeContext=ee.i,exports.tooltip=de.tooltip,exports.typewriter=d.typewriter,exports.validateInitialDateRange=y.n,exports.windowManager=j.n;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const ee=require(`./tailwind.mixin-Bh58QnlW.cjs`),e=require(`./area-DBjAhgjP.cjs`),te=require(`./lazy-BDNnH_r7.cjs`),t=require(`./store-CjFHCSDb.cjs`),n=require(`./sound.service-BEN6Xjy_.cjs`),r=require(`./audio-Dvr-RBzE.cjs`),i=require(`./search-CwMav5QB.cjs`),a=require(`./input-chip-p24lkYtY.cjs`),o=require(`./animation-CQRdLgzX.cjs`),ne=require(`./reduced-motion-9RjNnhIg.cjs`),s=require(`./cursor-glow-Duw9jHmh.cjs`),c=require(`./theme.events-DakXxZeP.cjs`),l=require(`./theme.service-DxJPUGlu.cjs`),u=require(`./layout-CTfRXQoz.cjs`),re=require(`./magnetic-CVXEkYTA.cjs`),d=require(`./directives.cjs`),f=require(`./src-sG7Ihf0e.cjs`),p=require(`./boat-BjYJI1HS.cjs`),m=require(`./button.cjs`),h=require(`./charts.cjs`),g=require(`./checkbox-DtcFMgZL.cjs`),_=require(`./chips-DoCu5YQb.cjs`),v=require(`./code-highlight-B_l8vDzn.cjs`),ie=require(`./components-TJT8-tva.cjs`),ae=require(`./connectivity.cjs`),y=require(`./date-range-CIWYm3eS.cjs`),b=require(`./overlay-stack-7bs4ZNnh.cjs`),x=require(`./dialog-service-CzDO08Gy.cjs`),S=require(`./sheet.service-BfNDB0K0.cjs`),C=require(`./date-range-inline-B9Dp2z6C.cjs`),w=require(`./delay-Bu4WMQlV.cjs`),T=require(`./details-B8p62xmR.cjs`),E=require(`./dialog.cjs`),D=require(`./discovery.cjs`),O=require(`./dropdown.cjs`),k=require(`./surface-B6DA01kL.cjs`),A=require(`./expand-BmwIPNjq.cjs`),j=require(`./window-Cjv2GqSN.cjs`),oe=require(`./float-BQwhfibw.cjs`),M=require(`./extra-BUgyMgjl.cjs`),N=require(`./form-wI58M85H.cjs`),P=require(`./iframe-C7sHg7RC.cjs`),F=require(`./input-BGNZlfL8.cjs`),I=require(`./notification-DPUkuifB.cjs`),L=require(`./json.cjs`),R=require(`./layout-B0_IXfov.cjs`),z=require(`./scroll-V1rAZ9fK.cjs`),B=require(`./lightbox-BWKTzA03.cjs`),V=require(`./list-CMWHu6cV.cjs`),H=require(`./mailbox-Tg1CROVz.cjs`),U=require(`./map-Z_dsu-dv.cjs`),W=require(`./navigation-rail.cjs`),G=require(`./page.cjs`),K=require(`./qr-scanner.cjs`),q=require(`./radio-group-B7DuNxUq.cjs`),se=require(`./range.cjs`),ce=require(`./rxjs-utils-DJbZRjp3.cjs`),le=require(`./theme.interface-DTwkuAKJ.cjs`),ue=require(`./select-DFxoBgEf.cjs`),J=require(`./slider.cjs`),Y=require(`./steps.cjs`),X=require(`./table-DFlJhG5E.cjs`),Z=require(`./theme-DU5yXaV-.cjs`),de=require(`./tooltip.cjs`),fe=require(`./tree.cjs`),pe=require(`./types.cjs`),me=require(`./intersection-DqBqnpgh.cjs`),Q=require(`./typewriter.cjs`),he=require(`./typography.cjs`),ge=require(`./utils-CBPQvxNW.cjs`),$=require(`./breadcrumb.cjs`),_e=require(`./kbd.cjs`),ve=require(`./skeleton.cjs`),ye=require(`./switch.cjs`),be=require(`./visually-hidden.cjs`);exports.$dialog=x.t,exports.$drawer=f.m,exports.$notify=I.r,exports.$sounds=r.t,exports.ANIMATION_CSS_VARS=o.t,exports.BLACKBIRD_EASING=o.n,exports.BaseStore=t.I,Object.defineProperty(exports,`ConfirmDialog`,{enumerable:!0,get:function(){return E.ConfirmDialog}}),Object.defineProperty(exports,`SchmancyDialog`,{enumerable:!0,get:function(){return E.ConfirmDialog}}),exports.DISCOVER_EVENT=D.DISCOVER_EVENT,exports.DISCOVER_RESPONSE_EVENT=D.DISCOVER_RESPONSE_EVENT,exports.DURATION_BACKDROP=o.r,exports.DURATION_ENTER=o.i,exports.DURATION_EXIT=o.a,exports.DialogBase=E.DialogBase,exports.DialogService=x.n,exports.DragDirective=d.DragDirective,exports.DropDirective=d.DropDirective,exports.EASE_IN=o.o,exports.EASE_OUT=o.s,exports.EmotionalSoundGenerator=r.n,exports.FINDING_MORTIES=e.b,exports.GRID_ANIMATION_CSS=o.c,exports.HERE_RICKY=e.x,exports.HISTORY_STRATEGY=e.v,exports.HereMorty=f.r,exports.IndexedDBStorageManager=t.L,Object.defineProperty(exports,`List`,{enumerable:!0,get:function(){return V.t}}),exports.LocalStorageManager=t.R,exports.MemoryStorageManager=t.z,exports.Numbers=ge.t,Object.defineProperty(exports,`RadioButton`,{enumerable:!0,get:function(){return q.t}}),Object.defineProperty(exports,`RadioGroup`,{enumerable:!0,get:function(){return q.n}}),exports.SCHMANCY_EXPAND_REQUEST_CLOSE=A.t,exports.SPRING_BOUNCY=o.l,exports.SPRING_GENTLE=o.u,exports.SPRING_SMOOTH=o.d,exports.SPRING_SNAPPY=o.f,Object.defineProperty(exports,`ScBadgeV2`,{enumerable:!0,get:function(){return f.T}}),Object.defineProperty(exports,`SchmancyArea`,{enumerable:!0,get:function(){return e._}}),Object.defineProperty(exports,`SchmancyAreaChart`,{enumerable:!0,get:function(){return h.SchmancyAreaChart}}),exports.SchmancyArrayStore=t.F,Object.defineProperty(exports,`SchmancyAssistChip`,{enumerable:!0,get:function(){return _.r}}),Object.defineProperty(exports,`SchmancyAvatar`,{enumerable:!0,get:function(){return f.t}}),Object.defineProperty(exports,`SchmancyBadgeV2`,{enumerable:!0,get:function(){return f.E}}),exports.SchmancyBoat=p.t,Object.defineProperty(exports,`SchmancyBreadcrumb`,{enumerable:!0,get:function(){return $.SchmancyBreadcrumb}}),Object.defineProperty(exports,`SchmancyBreadcrumbItem`,{enumerable:!0,get:function(){return $.SchmancyBreadcrumbItem}}),Object.defineProperty(exports,`SchmancyButton`,{enumerable:!0,get:function(){return m.SchmancyButton}}),Object.defineProperty(exports,`SchmancyCheckbox`,{enumerable:!0,get:function(){return g.t}}),exports.SchmancyChip=_.n,exports.SchmancyFilterChip=_.n,Object.defineProperty(exports,`SchmancyCode`,{enumerable:!0,get:function(){return v.n}}),Object.defineProperty(exports,`SchmancyCodeHighlight`,{enumerable:!0,get:function(){return v.n}}),Object.defineProperty(exports,`SchmancyCodePreview`,{enumerable:!0,get:function(){return v.t}}),Object.defineProperty(exports,`SchmancyConnectivityStatus`,{enumerable:!0,get:function(){return ae.SchmancyConnectivityStatus}}),Object.defineProperty(exports,`SchmancyContentDrawer`,{enumerable:!0,get:function(){return f.v}}),exports.SchmancyContentDrawerID=f.y,Object.defineProperty(exports,`SchmancyContentDrawerMain`,{enumerable:!0,get:function(){return f._}}),exports.SchmancyContentDrawerMaxHeight=f.b,exports.SchmancyContentDrawerMinWidth=f.x,Object.defineProperty(exports,`SchmancyContentDrawerSheet`,{enumerable:!0,get:function(){return f.g}}),exports.SchmancyContentDrawerSheetMode=f.S,exports.SchmancyContentDrawerSheetState=f.C,Object.defineProperty(exports,`SchmancyCountriesSelect`,{enumerable:!0,get:function(){return M.n}}),Object.defineProperty(exports,`SchmancyDataTable`,{enumerable:!0,get:function(){return X.t}}),Object.defineProperty(exports,`SchmancyDateRange`,{enumerable:!0,get:function(){return y.t}}),exports.SchmancyDateRangeInline=C.t,Object.defineProperty(exports,`SchmancyDelay`,{enumerable:!0,get:function(){return w.t}}),exports.SchmancyDetails=T.t,Object.defineProperty(exports,`SchmancyDrawerAppbar`,{enumerable:!0,get:function(){return f.p}}),exports.SchmancyDrawerNavbarMode=f.u,exports.SchmancyDrawerNavbarState=f.d,Object.defineProperty(exports,`SchmancyDropdown`,{enumerable:!0,get:function(){return O.SchmancyDropdown}}),Object.defineProperty(exports,`SchmancyDropdownContent`,{enumerable:!0,get:function(){return O.SchmancyDropdownContent}}),Object.defineProperty(exports,`SchmancyEmailEditor`,{enumerable:!0,get:function(){return H.r}}),Object.defineProperty(exports,`SchmancyEmailLayoutSelector`,{enumerable:!0,get:function(){return H.i}}),Object.defineProperty(exports,`SchmancyEmailRecipients`,{enumerable:!0,get:function(){return H.t}}),Object.defineProperty(exports,`SchmancyEmailViewer`,{enumerable:!0,get:function(){return H.n}}),exports.SchmancyEvents=pe.SchmancyEvents,Object.defineProperty(exports,`SchmancyExpandRoot`,{enumerable:!0,get:function(){return A.n}}),Object.defineProperty(exports,`SchmancyFlex`,{enumerable:!0,get:function(){return R.r}}),Object.defineProperty(exports,`SchmancyFlexV2`,{enumerable:!0,get:function(){return R.t}}),exports.SchmancyFloat=oe.t,exports.SchmancyForm=N.t,exports.SchmancyGenerateMoodAudioEvent=Z.n,Object.defineProperty(exports,`SchmancyGrid`,{enumerable:!0,get:function(){return R.n}}),exports.SchmancyIframe=P.t,exports.SchmancyInput=F.n,Object.defineProperty(exports,`SchmancyInputChip`,{enumerable:!0,get:function(){return a.t}}),Object.defineProperty(exports,`SchmancyInputCompat`,{enumerable:!0,get:function(){return F.t}}),Object.defineProperty(exports,`SchmancyJson`,{enumerable:!0,get:function(){return L.SchmancyJson}}),Object.defineProperty(exports,`SchmancyKbd`,{enumerable:!0,get:function(){return _e.SchmancyKbd}}),Object.defineProperty(exports,`SchmancyLightbox`,{enumerable:!0,get:function(){return B.i}}),Object.defineProperty(exports,`SchmancyListItem`,{enumerable:!0,get:function(){return V.n}}),exports.SchmancyListTypeContext=V.r,Object.defineProperty(exports,`SchmancyMailbox`,{enumerable:!0,get:function(){return H.a}}),exports.SchmancyMap=U.t,Object.defineProperty(exports,`SchmancyNavigationBar`,{enumerable:!0,get:function(){return f.o}}),Object.defineProperty(exports,`SchmancyNavigationBarItem`,{enumerable:!0,get:function(){return f.s}}),Object.defineProperty(exports,`SchmancyNavigationDrawer`,{enumerable:!0,get:function(){return f.l}}),Object.defineProperty(exports,`SchmancyNavigationDrawerContent`,{enumerable:!0,get:function(){return f.f}}),Object.defineProperty(exports,`SchmancyNavigationDrawerSidebar`,{enumerable:!0,get:function(){return f.c}}),Object.defineProperty(exports,`SchmancyNavigationRail`,{enumerable:!0,get:function(){return W.SchmancyNavigationRail}}),Object.defineProperty(exports,`SchmancyNavigationRailItem`,{enumerable:!0,get:function(){return W.SchmancyNavigationRailItem}}),exports.SchmancyNotification=I.i,Object.defineProperty(exports,`SchmancyPage`,{enumerable:!0,get:function(){return G.SchmancyPage}}),Object.defineProperty(exports,`SchmancyPaymentCardForm`,{enumerable:!0,get:function(){return ie.t}}),Object.defineProperty(exports,`SchmancyPills`,{enumerable:!0,get:function(){return h.SchmancyPills}}),Object.defineProperty(exports,`SchmancyQRScanner`,{enumerable:!0,get:function(){return K.SchmancyQRScanner}}),Object.defineProperty(exports,`SchmancyRange`,{enumerable:!0,get:function(){return se.SchmancyRange}}),Object.defineProperty(exports,`SchmancyRoute`,{enumerable:!0,get:function(){return e.y}}),Object.defineProperty(exports,`SchmancyScroll`,{enumerable:!0,get:function(){return z.t}}),Object.defineProperty(exports,`SchmancySelect`,{enumerable:!0,get:function(){return ue.t}}),exports.SchmancySheetPosition=S.t,Object.defineProperty(exports,`SchmancySkeleton`,{enumerable:!0,get:function(){return ve.SchmancySkeleton}}),Object.defineProperty(exports,`SchmancySlide`,{enumerable:!0,get:function(){return J.SchmancySlide}}),Object.defineProperty(exports,`SchmancySlider`,{enumerable:!0,get:function(){return J.SchmancySlider}}),Object.defineProperty(exports,`SchmancyStep`,{enumerable:!0,get:function(){return Y.SchmancyStep}}),Object.defineProperty(exports,`SchmancyStepsContainer`,{enumerable:!0,get:function(){return Y.SchmancyStepsContainer}}),exports.SchmancyStoreObject=t.P,Object.defineProperty(exports,`SchmancySuggestionChip`,{enumerable:!0,get:function(){return _.t}}),Object.defineProperty(exports,`SchmancySurface`,{enumerable:!0,get:function(){return k.t}}),exports.SchmancySurfaceTypeContext=k.n,Object.defineProperty(exports,`SchmancySwitch`,{enumerable:!0,get:function(){return ye.SchmancySwitch}}),Object.defineProperty(exports,`SchmancyTableRow`,{enumerable:!0,get:function(){return X.n}}),Object.defineProperty(exports,`SchmancyTeleportation`,{enumerable:!0,get:function(){return f.n}}),exports.SchmancyTheme=le.t,Object.defineProperty(exports,`SchmancyThemeAudioPlayer`,{enumerable:!0,get:function(){return Z.r}}),Object.defineProperty(exports,`SchmancyThemeComponent`,{enumerable:!0,get:function(){return Z.a}}),Object.defineProperty(exports,`SchmancyThemeController`,{enumerable:!0,get:function(){return Z.i}}),Object.defineProperty(exports,`SchmancyThemeControllerBoat`,{enumerable:!0,get:function(){return Z.t}}),Object.defineProperty(exports,`SchmancyTimezonesSelect`,{enumerable:!0,get:function(){return M.t}}),Object.defineProperty(exports,`SchmancyTree`,{enumerable:!0,get:function(){return fe.SchmancyTree}}),Object.defineProperty(exports,`SchmancyTypography`,{enumerable:!0,get:function(){return he.SchmancyTypography}}),Object.defineProperty(exports,`SchmancyVisuallyHidden`,{enumerable:!0,get:function(){return be.SchmancyVisuallyHidden}}),exports.SchmancyWindow=j.t,Object.defineProperty(exports,`SchmnacyIconButton`,{enumerable:!0,get:function(){return m.SchmnacyIconButton}}),exports.SessionStorageManager=t.B,exports.StepsController=Y.StepsController,exports.StoreError=t.H,exports.ThemeHereIAm=c.t,exports.ThemeWhereAreYou=c.n,Object.defineProperty(exports,`TypewriterElement`,{enumerable:!0,get:function(){return Q.TypewriterElement}}),exports.WhereAreYouRicky=f.i,exports.animateText=d.animateText,exports.area=e.S,exports.buildQueryString=e.t,exports.catmullRomSpline=h.catmullRomSpline,exports.color=d.color,exports.compareActiveRoutes=e.n,exports.compareCustomElementConstructors=e.r,exports.compareRouteActions=e.i,exports.compareValues=t.g,exports.confirmClick=d.confirmClick,exports.createAnimation=o.p,exports.createArrayContext=t.j,exports.createCollectionSelector=t.r,exports.createCompoundSelector=t.i,exports.createContext=t.M,exports.createCountSelector=t.a,exports.createDarkTonalPaletteFromBaseColor=Z.s,exports.createDismissAnimation=o.m,exports.createEntriesSelector=t.o,exports.createFilterSelector=t.s,exports.createFindSelector=t.c,exports.createItemSelector=t.l,exports.createItemsSelector=t.u,exports.createKeysSelector=t.d,exports.createLightTonalPaletteFromBaseColor=Z.c,exports.createMapSelector=t.f,exports.createOptimizedSelector=t.p,exports.createRevealAnimation=o.h,exports.createRouteCacheKey=e.a,exports.createScaleAnimation=o.g,exports.createSelector=t.m,exports.createSortSelector=t.h,exports.createStorageManager=t.V,exports.createTestArrayContext=t.N,exports.cursorGlow=s.t,exports.cycleText=d.cycleText,exports.debounce=e.o,exports.decodeData=e.h,exports.decodeRouteState=e.s,exports.deepMerge=e.c,exports.delayContext=w.n,exports.depthOfField=d.depthOfField,exports.discover=D.discover,exports.discoverAllElements=D.discoverAllElements,exports.discoverAnyComponent=D.discoverAnyComponent,exports.discoverComponent=D.discoverComponent,exports.discoverElement=D.discoverElement,exports.drag=d.drag,exports.drop=d.drop,exports.easeOutCubic=h.easeOutCubic,exports.encodeData=e.g,exports.encodeRouteState=e.l,exports.extractQueryParams=e.u,exports.filterArray=t._,exports.filterArrayItems=t.v,exports.filterMap=t.y,exports.filterMapItems=t.b,exports.flip=B.r,exports.formatTheme=Z.l,exports.fromResizeObserver=u.t,exports.fullHeight=u.n,exports.fullWidth=u.r,exports.getEasing=o._,exports.getFieldValue=t.x,exports.getTagName=e.d,exports.gravity=d.gravity,exports.hexToRgba=h.hexToRgba,exports.intersect=d.intersect,exports.intersection$=me.t,exports.isArray=t.S,exports.isDate=t.C,exports.isIterable=t.w,exports.isMap=t.T,exports.isNil=t.E,exports.isNumber=t.D,exports.isObject=e.f,exports.isPlainObject=t.O,exports.isSet=t.k,exports.isString=t.A,exports.lazy=te.t,exports.lightbox=B.t,exports.lightboxDirective=B.n,exports.liquid=d.liquid,exports.livingBorder=d.livingBorder,exports.longPress=d.longPress,exports.magnetic=re.t,exports.mutationObserver=ce.t,exports.nebula=d.nebula,exports.normalizeTagName=e.p,exports.notify=I.t,exports.notifyProgress=I.n,exports.overlayStack=b.t,exports.prefersReducedMotion=o.v,exports.reducedMotion$=ne.t,exports.reveal=d.reveal,exports.ripple=d.ripple,exports.routerHistory=e.C,exports.sanitizeRouteState=e.m,exports.schmancyContentDrawer=f.w,exports.schmancyNavDrawer=f.h,exports.schmancySound=n.t,exports.schmancyTheme=l.t,exports.select=t.t,exports.selectItem=t.n,exports.sheet=S.n,exports.similarity=i.t,exports.sound=n.n,exports.stepsContext=Y.stepsContext,exports.tailwindAnimations=o.y,exports.tailwindStyles=Z.o,exports.teleport=f.a,exports.theme=l.n,exports.themeContext=ee.i,exports.tooltip=de.tooltip,exports.typewriter=d.typewriter,exports.validateInitialDateRange=y.n,exports.windowManager=j.n;
@@ -0,0 +1 @@
1
+ var e=e=>Array.isArray(e),t=t=>e(t)?t:[t],n=`data-typeit-id`,r=`ti-cursor`,i={started:!1,completed:!1,frozen:!1,destroyed:!1},a={breakLines:!0,cursor:{autoPause:!0,autoPauseDelay:500,animation:{frames:[0,0,1].map(e=>({opacity:e})),options:{iterations:1/0,easing:`steps(2, start)`,fill:`forwards`}}},cursorChar:`|`,cursorSpeed:1e3,deleteSpeed:null,html:!0,lifeLike:!0,loop:!1,loopDelay:750,nextStringDelay:750,speed:100,startDelay:250,startDelete:!1,strings:[],waitUntilVisible:!1,beforeString:()=>{},afterString:()=>{},beforeStep:()=>{},afterStep:()=>{},afterComplete:()=>{}},o=`[${n}]:before {content: '.'; display: inline-block; width: 0; visibility: hidden;}`,s=e=>document.createElement(e),c=e=>document.createTextNode(e),l=(e,t=``)=>{let n=s(`style`);n.id=t,n.appendChild(c(e)),document.head.appendChild(n)},u=t=>(e(t)||(t=[t/2,t/2]),t),d=(e,t)=>Math.abs(Math.random()*(e+t-(e-t))+(e-t)),f=e=>e/2,p=e=>Array.from(e),m=e=>([...e.childNodes].forEach(e=>{if(e.nodeValue)return[...e.nodeValue].forEach(t=>{e.parentNode.insertBefore(c(t),e)}),void e.remove();m(e)}),e),h=e=>{let t=document.implementation.createHTMLDocument();return t.body.innerHTML=e,m(t.body)};function g(e,t=!1,n=!1){let i,a=e.querySelector(`.${r}`),o=document.createTreeWalker(e,NodeFilter.SHOW_ALL,{acceptNode:e=>{if(a&&n){if(e.classList?.contains(r))return NodeFilter.FILTER_ACCEPT;if(a.contains(e))return NodeFilter.FILTER_REJECT}return e.classList?.contains(r)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),s=[];for(;i=o.nextNode();)i.originalParent||=i.parentNode,s.push(i);return t?s.reverse():s}function _(e,t=!0){return t?g(h(e)):p(e).map(c)}var v=({index:e,newIndex:t,queueItems:n,cleanUp:r})=>{for(let i=e+1;i<t+1;i++)r(n[i][0])},y=e=>Number.isInteger(e),b=({queueItems:e,selector:t,cursorPosition:n,to:r})=>{if(y(t))return-1*t;let i=RegExp(`END`,`i`).test(r),a=t?[...e].reverse().findIndex(({char:e})=>{let n=e.parentElement,r=n.matches(t);return!(!i||!r)||r&&n.firstChild.isSameNode(e)}):-1;return a<0&&(a=i?0:e.length-1),a-n+ +!i},x=(e,t)=>Array(t).fill(e),S=e=>new Promise(t=>{requestAnimationFrame(async()=>{t(await e())})}),C=e=>e?.getAnimations().find(t=>t.id===e.dataset.tiAnimationId),w=({cursor:e,frames:t,options:n})=>{let r=e.animate(t,n);return r.pause(),r.id=e.dataset.tiAnimationId,S(()=>{S(()=>{r.play()})}),r},T=e=>e.func?.call(null),E=async({index:e,queueItems:t,wait:n,cursor:r,cursorOptions:i})=>{let a=t[e][1],o=[],s=e,c=a,l=()=>c&&!c.delay,u=a.shouldPauseCursor()&&i.autoPause;for(;l();)o.push(c),l()&&s++,c=t[s]?t[s][1]:null;if(o.length)return await S(async()=>{for(let e of o)await T(e)}),s-1;let d,f=C(r);return f&&(d={...f.effect.getComputedTiming(),delay:u?i.autoPauseDelay:0}),await n(async()=>{f&&u&&f.cancel(),await S(()=>{T(a)})},a.delay),await(({cursor:e,options:t,cursorOptions:n})=>{if(!e||!n)return;let r,i=C(e);i&&(t.delay=i.effect.getComputedTiming().delay,r=i.currentTime,i.cancel());let a=w({cursor:e,frames:n.animation.frames,options:t});return r&&(a.currentTime=r),a})({cursor:r,options:d,cursorOptions:i}),e},D=e=>`value`in e,O=e=>typeof e==`function`?e():e,k=(e,t=document,n=!1)=>t[`querySelector`+(n?`All`:``)](e),A=(e,t)=>Object.assign({},e,t),j={"font-family":``,"font-weight":``,"font-size":``,"font-style":``,"line-height":``,color:``,transform:`translateX(-.125em)`};exports.default=class{element;timeouts;cursorPosition;predictedCursorPosition;statuses={started:!1,completed:!1,frozen:!1,destroyed:!1,firing:!1};opts;id;queue;cursor;flushCallback=null;unfreeze=()=>{};constructor(e,n={}){var r;this.opts=A(a,n),this.element=typeof(r=e)==`string`?k(r):r,this.timeouts=[],this.cursorPosition=0,this.unfreeze=()=>{},this.predictedCursorPosition=null,this.statuses=A({},i),this.id=Math.random().toString().substring(2,9),this.queue=function(e){let n=function(e){return t(e).forEach(e=>o.set(Symbol(e.char?.innerText),r({...e}))),this},r=e=>(e.shouldPauseCursor=function(){return!!(this.typeable||this.cursorable||this.deletable)},e),i=()=>o,a=()=>Array.from(o.values()),o=new Map;return n(e),{add:n,set:function(e,t){let n=[...o.keys()];o.set(n[e],r(t))},wipe:function(){o=new Map,n(e)},done:(e,t=!1)=>t?o.delete(e):o.get(e).done=!0,reset:function(){o.forEach(e=>delete e.done)},destroy:e=>o.delete(e),getItems:(e=!1)=>e?a():a().filter(e=>!e.done),getQueue:i,getTypeable:()=>a().filter(e=>e.typeable),getPendingQueueItems:()=>{let e=[];for(let[,t]of i())t.done||e.push(t);return e}}}([{delay:this.opts.startDelay}]),this.#p(n),this.cursor=this.#h(),this.element.dataset.typeitId=this.id,l(o),this.opts.strings.length&&this.#f()}go(){return this.statuses.started?this:(this.#o(),this.opts.waitUntilVisible?(e=this.element,t=this.#t.bind(this),new IntersectionObserver((n,r)=>{n.forEach(n=>{n.isIntersecting&&(t(),r.unobserve(e))})},{threshold:1}).observe(e),this):(this.#t(),this));var e,t}destroy(e=!0){this.timeouts=(this.timeouts.forEach(clearTimeout),[]),O(e)&&this.cursor&&this.#y(this.cursor),this.statuses.destroyed=!0}reset(e){!this.is(`destroyed`)&&this.destroy(),e?(this.queue.wipe(),e(this)):this.queue.reset(),this.cursorPosition=0;for(let e in this.statuses)this.statuses[e]=!1;return this.element[this.#s()?`value`:`innerHTML`]=``,this}is=function(e){return this.statuses[e]};type(e,t={}){e=O(e);let{instant:n}=t,r=this.#u(t),i=_(e,this.opts.html).map(e=>{return{func:()=>this.#_(e),char:e,delay:n||(t=e,/<(.+)>(.*?)<\/(.+)>/.test(t.outerHTML))?0:this.#b(),typeable:e.nodeType===Node.TEXT_NODE};var t}),a=[r[0],{func:async()=>await this.opts.beforeString(e,this)},...i,{func:async()=>await this.opts.afterString(e,this)},r[1]];return this.#c(a,t)}break(e={}){return this.#c({func:()=>this.#_(s(`BR`)),typeable:!0},e)}move(e,t={}){e=O(e);let n=this.#u(t),{instant:r,to:i}=t,a=b({queueItems:this.queue.getTypeable(),selector:e===null?``:e,to:i,cursorPosition:this.#x}),o=a<0?-1:1;return this.predictedCursorPosition=this.#x+a,this.#c([n[0],...x({func:()=>this.#n(o),delay:r?0:this.#b(),cursorable:!0},Math.abs(a)),n[1]],t)}exec(e,t={}){let n=this.#u(t);return this.#c([n[0],{func:()=>e(this)},n[1]],t)}options(e,t={}){return e=O(e),this.#d(e),this.#c({},t)}pause(e,t={}){return this.#c({delay:O(e)},t)}delete(e=null,t={}){e=O(e);let n=this.#u(t),r=e,{instant:i,to:a}=t,o=this.queue.getTypeable(),s=r===null?o.length:y(r)?r:b({queueItems:o,selector:r,cursorPosition:this.#x,to:a});return this.#c([n[0],...x({func:this.#v.bind(this),delay:i?0:this.#b(1),deletable:!0},s),n[1]],t)}freeze(){this.statuses.frozen=!0}flush(e=null){return this.flushCallback=e||this.flushCallback,this.statuses.firing||(this.#o(),this.#t(!1).then(()=>{if(this.queue.getPendingQueueItems().length>0)return this.flush();this.flushCallback(),this.flushCallback=null})),this}getQueue(){return this.queue}getOptions(){return this.opts}updateOptions(e){return this.#d(e)}getElement(){return this.element}empty(e={}){return this.#c({func:this.#e.bind(this)},e)}async#e(){this.#s()?this.element.value=``:this.#w.forEach(this.#y.bind(this))}async#t(e=!0){this.statuses.started=!0,this.statuses.firing=!0;let t=t=>{this.queue.done(t,!e)};try{let n=[...this.queue.getQueue()];for(let e=0;e<n.length;e++){let[r,i]=n[e];if(!i.done){if(!i.deletable||i.deletable&&this.#w.length){let r=await this.#i(e,n);v({index:e,newIndex:r,queueItems:n,cleanUp:t}),e=r}t(r)}}if(!e)return this.statuses.firing=!1,this;if(this.statuses.completed=!0,this.statuses.firing=!1,await this.opts.afterComplete(this),!this.opts.loop)throw``;let r=this.opts.loopDelay;this.#a(async()=>{await this.#r(r[0]),this.#t()},r[1])}catch{}return this.statuses.firing=!1,this}async#n(e){var t,n,i;this.cursorPosition=(t=e,n=this.cursorPosition,i=this.#w,Math.min(Math.max(n+t,0),i.length)),((e,t,n)=>{let i=t[n-1],a=k(`.${r}`,e);(e=i?.parentNode||e).insertBefore(a,i||null)})(this.element,this.#w,this.cursorPosition)}async#r(e){let t=this.#x;t&&await this.#n({value:t});let n=this.#w.map(e=>[Symbol(),{func:this.#v.bind(this),delay:this.#b(1),deletable:!0,shouldPauseCursor:()=>!0}]);for(let e=0;e<n.length;e++)await this.#i(e,n);this.queue.reset(),this.queue.set(0,{delay:e})}#i(e,t){return E({index:e,queueItems:t,wait:this.#a.bind(this),cursor:this.cursor,cursorOptions:this.opts.cursor})}async#a(e,t,n=!1){this.statuses.frozen&&await new Promise(e=>{this.unfreeze=()=>{this.statuses.frozen=!1,e()}}),n||await this.opts.beforeStep(this),await((e,t,n)=>new Promise(r=>{n.push(setTimeout(async()=>{await e(),r()},t||0))}))(e,t,this.timeouts),n||await this.opts.afterStep(this)}async#o(){if(!this.#s()&&this.cursor&&this.element.appendChild(this.cursor),this.#C){((e,t)=>{let i=`[${n}='${e}'] .${r}`,a=getComputedStyle(t);l(`${i} { display: inline-block; width: 0; ${Object.entries(j).reduce((e,[t,n])=>`${e} ${t}: var(--ti-cursor-${t}, ${n||a[t]});`,``)} }`,e)})(this.id,this.element),this.cursor.dataset.tiAnimationId=this.id;let{animation:e}=this.opts.cursor,{frames:t,options:i}=e;w({frames:t,cursor:this.cursor,options:{duration:this.opts.cursorSpeed,...i}})}}#s(){return D(this.element)}#c(e,t){return this.queue.add(e),this.#l(t),this}#l(e={}){let t=e.delay;t&&this.queue.add({delay:t})}#u(e={}){return[{func:()=>this.#d(e)},{func:()=>this.#d(this.opts)}]}async#d(e){this.opts=A(this.opts,e)}#f(){let e=this.opts.strings.filter(e=>!!e);e.forEach((t,n)=>{if(this.type(t),n+1===e.length)return;let r=this.opts.breakLines?[{func:()=>this.#_(s(`BR`)),typeable:!0}]:x({func:this.#v.bind(this),delay:this.#b(1)},this.queue.getTypeable().length);this.#g(r)})}#p=e=>{this.opts.cursor=(e=>{if(typeof e==`object`){let t={},{frames:n,options:r}=a.cursor.animation;return t.animation=e.animation||{},t.animation.frames=e.animation?.frames||n,t.animation.options=A(r,e.animation?.options||{}),t.autoPause=e.autoPause??a.cursor.autoPause,t.autoPauseDelay=e.autoPauseDelay||a.cursor.autoPauseDelay,t}return!0===e?a.cursor:e})(e.cursor??a.cursor),this.opts.strings=this.#m(t(this.opts.strings)),this.opts=A(this.opts,{html:!this.#S&&this.opts.html,nextStringDelay:u(this.opts.nextStringDelay),loopDelay:u(this.opts.loopDelay)})};#m(e){let t=this.element.innerHTML;return t?(this.element.innerHTML=``,this.opts.startDelete?(this.element.innerHTML=t,m(this.element),this.#g(x({func:this.#v.bind(this),delay:this.#b(1),deletable:!0},this.#w.length)),e):(n=t,n.replace(/<!--(.+?)-->/g,``).trim().split(/<br(?:\s*?)(?:\/)?>/)).concat(e)):e;var n}#h(){if(this.#S)return null;let e=s(`span`);return e.className=r,this.#C?(e.innerHTML=h(this.opts.cursorChar).innerHTML,e):(e.style.visibility=`hidden`,e)}#g(e){let t=this.opts.nextStringDelay;this.queue.add([{delay:t[0]},...e,{delay:t[1]}])}#_(e){((e,t)=>{if(D(e))return void(e.value=`${e.value}${t.textContent}`);t.innerHTML=``;let n=(i=t.originalParent,/body/i.test(i?.tagName)?e:t.originalParent||e);var i;let a=k(`.`+r,n)||null;a&&a.parentElement!==n&&(n=a.parentElement),n.insertBefore(t,a)})(this.element,e)}#v(){this.#w.length&&(this.#S?this.element.value=this.element.value.slice(0,-1):this.#y(this.#w[this.cursorPosition]))}#y(e){((e,t)=>{if(!e)return;let n=e.parentNode;(n.childNodes.length>1||n.isSameNode(t)?e:n).remove()})(e,this.element)}#b(e=0){return function(e){let{speed:t,deleteSpeed:n,lifeLike:r}=e;return n=n===null?t/3:n,r?[d(t,f(t)),d(n,f(n))]:[t,n]}(this.opts)[e]}get#x(){return this.predictedCursorPosition??this.cursorPosition}get#S(){return D(this.element)}get#C(){return!!this.opts.cursor&&!this.#S}get#w(){return e=this.element,D(e)?p(e.value):g(e,!0).filter(e=>!(e.childNodes.length>0));var e}};
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.es-BgmFX1JM.cjs","names":["#buildOptions","#setUpCursor","#generateQueue","#attachCursor","#fire","#removeNode","#elementIsInput","#generateTemporaryOptionQueueItems","#type","#getPace","#queueAndReturn","#derivedCursorPosition","#move","#updateOptions","#delete","#empty","#allChars","#fireItemWithContext","#wait","#prepLoop","#shouldRenderCursor","#maybeAppendPause","#addSplitPause","#prependHardcodedStrings","#isInput"],"sources":["../node_modules/typeit/dist/index.es.js"],"sourcesContent":["// TypeIt by Alex MacArthur - https://typeitjs.com\nconst isArray = (thing) => Array.isArray(thing);\n\nconst asArray = (value) => isArray(value) ? value : [value];\n\nlet Queue = function(initialItems) {\n let add = function(steps) {\n asArray(steps).forEach((step) => {\n return _q.set(Symbol(step.char?.innerText), buildQueueItem({ ...step }));\n });\n return this;\n };\n let getTypeable = () => rawValues().filter((value) => value.typeable);\n let set = function(index, item) {\n let keys = [..._q.keys()];\n _q.set(keys[index], buildQueueItem(item));\n };\n let buildQueueItem = (queueItem) => {\n queueItem.shouldPauseCursor = function() {\n return Boolean(this.typeable || this.cursorable || this.deletable);\n };\n return queueItem;\n };\n let reset = function() {\n _q.forEach((item) => delete item.done);\n };\n let wipe = function() {\n _q = /* @__PURE__ */ new Map();\n add(initialItems);\n };\n let getQueue = () => _q;\n let rawValues = () => Array.from(_q.values());\n let destroy = (key) => _q.delete(key);\n let getPendingQueueItems = () => {\n const pending = [];\n for (let [, value] of getQueue()) {\n if (!value.done) {\n pending.push(value);\n }\n }\n return pending;\n };\n let getItems = (all = false) => all ? rawValues() : rawValues().filter((i) => !i.done);\n let done = (key, shouldDestroy = false) => shouldDestroy ? _q.delete(key) : _q.get(key).done = true;\n let _q = /* @__PURE__ */ new Map();\n add(initialItems);\n return {\n add,\n set,\n wipe,\n done,\n reset,\n destroy,\n getItems,\n getQueue,\n getTypeable,\n getPendingQueueItems\n };\n};\n\nconst DATA_ATTRIBUTE = \"data-typeit-id\";\nconst CURSOR_CLASS = \"ti-cursor\";\nconst END = \"END\";\nconst DEFAULT_STATUSES = {\n started: false,\n completed: false,\n frozen: false,\n destroyed: false\n};\nconst DEFAULT_OPTIONS = {\n breakLines: true,\n cursor: {\n autoPause: true,\n autoPauseDelay: 500,\n animation: {\n frames: [0, 0, 1].map((n) => {\n return { opacity: n };\n }),\n options: {\n iterations: Infinity,\n easing: \"steps(2, start)\",\n fill: \"forwards\"\n }\n }\n },\n cursorChar: \"|\",\n cursorSpeed: 1e3,\n deleteSpeed: null,\n html: true,\n lifeLike: true,\n loop: false,\n loopDelay: 750,\n nextStringDelay: 750,\n speed: 100,\n startDelay: 250,\n startDelete: false,\n strings: [],\n waitUntilVisible: false,\n beforeString: () => {\n },\n afterString: () => {\n },\n beforeStep: () => {\n },\n afterStep: () => {\n },\n afterComplete: () => {\n }\n};\nconst PLACEHOLDER_CSS = `[${DATA_ATTRIBUTE}]:before {content: '.'; display: inline-block; width: 0; visibility: hidden;}`;\n\nconst createElement = (el) => document.createElement(el);\n\nconst createTextNode = (content) => document.createTextNode(content);\n\nconst appendStyleBlock = (styles, id = \"\") => {\n let styleBlock = createElement(\"style\");\n styleBlock.id = id;\n styleBlock.appendChild(createTextNode(styles));\n document.head.appendChild(styleBlock);\n};\n\nconst calculateDelay = (delayArg) => {\n if (!isArray(delayArg)) {\n delayArg = [delayArg / 2, delayArg / 2];\n }\n return delayArg;\n};\n\nconst randomInRange = (value, range) => {\n return Math.abs(\n Math.random() * (value + range - (value - range)) + (value - range)\n );\n};\n\nlet range = (val) => val / 2;\nfunction calculatePace(options) {\n let { speed, deleteSpeed, lifeLike } = options;\n deleteSpeed = deleteSpeed !== null ? deleteSpeed : speed / 3;\n return lifeLike ? [\n randomInRange(speed, range(speed)),\n randomInRange(deleteSpeed, range(deleteSpeed))\n ] : [speed, deleteSpeed];\n}\n\nconst toArray = (val) => Array.from(val);\n\nlet expandTextNodes = (element) => {\n [...element.childNodes].forEach((child) => {\n if (child.nodeValue) {\n [...child.nodeValue].forEach((c) => {\n child.parentNode.insertBefore(createTextNode(c), child);\n });\n child.remove();\n return;\n }\n expandTextNodes(child);\n });\n return element;\n};\n\nconst getParsedBody = (content) => {\n let doc = document.implementation.createHTMLDocument();\n doc.body.innerHTML = content;\n return expandTextNodes(doc.body);\n};\n\nfunction walkElementNodes(element, shouldReverse = false, shouldIncludeCursor = false) {\n let cursor = element.querySelector(`.${CURSOR_CLASS}`);\n let walker = document.createTreeWalker(element, NodeFilter.SHOW_ALL, {\n acceptNode: (node) => {\n if (cursor && shouldIncludeCursor) {\n if (node.classList?.contains(CURSOR_CLASS)) {\n return NodeFilter.FILTER_ACCEPT;\n }\n if (cursor.contains(node)) {\n return NodeFilter.FILTER_REJECT;\n }\n }\n return node.classList?.contains(CURSOR_CLASS) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT;\n }\n });\n let nextNode;\n let nodes = [];\n while (nextNode = walker.nextNode()) {\n if (!nextNode.originalParent) {\n nextNode.originalParent = nextNode.parentNode;\n }\n nodes.push(nextNode);\n }\n return shouldReverse ? nodes.reverse() : nodes;\n}\nfunction chunkStringAsHtml(string) {\n return walkElementNodes(getParsedBody(string));\n}\nfunction maybeChunkStringAsHtml(str, asHtml = true) {\n return asHtml ? chunkStringAsHtml(str) : toArray(str).map(createTextNode);\n}\n\nconst cleanUpSkipped = ({\n index,\n newIndex,\n queueItems,\n cleanUp\n}) => {\n for (let i = index + 1; i < newIndex + 1; i++) {\n cleanUp(queueItems[i][0]);\n }\n};\n\nconst isNumber = (value) => Number.isInteger(value);\n\nconst countStepsToSelector = ({\n queueItems,\n selector,\n cursorPosition,\n to\n}) => {\n if (isNumber(selector)) {\n return selector * -1;\n }\n let isMovingToEnd = new RegExp(END, \"i\").test(to);\n let selectorIndex = selector ? [...queueItems].reverse().findIndex(({ char }) => {\n let parentElement = char.parentElement;\n let parentMatches = parentElement.matches(selector);\n if (isMovingToEnd && parentMatches) {\n return true;\n }\n return parentMatches && parentElement.firstChild.isSameNode(char);\n }) : -1;\n if (selectorIndex < 0) {\n selectorIndex = isMovingToEnd ? 0 : queueItems.length - 1;\n }\n let offset = isMovingToEnd ? 0 : 1;\n return selectorIndex - cursorPosition + offset;\n};\n\nconst destroyTimeouts = (timeouts) => {\n timeouts.forEach(clearTimeout);\n return [];\n};\n\nconst duplicate = (value, times) => new Array(times).fill(value);\n\nlet beforePaint = (cb) => {\n return new Promise((resolve) => {\n requestAnimationFrame(async () => {\n resolve(await cb());\n });\n });\n};\n\nlet getAnimationFromElement = (element) => {\n return element?.getAnimations().find((animation) => {\n return animation.id === element.dataset.tiAnimationId;\n });\n};\n\nlet setCursorAnimation = ({\n cursor,\n frames,\n options\n}) => {\n let animation = cursor.animate(frames, options);\n animation.pause();\n animation.id = cursor.dataset.tiAnimationId;\n beforePaint(() => {\n beforePaint(() => {\n animation.play();\n });\n });\n return animation;\n};\n\nlet rebuildCursorAnimation = ({\n cursor,\n options,\n cursorOptions\n}) => {\n if (!cursor || !cursorOptions) return;\n let animation = getAnimationFromElement(cursor);\n let oldCurrentTime;\n if (animation) {\n options.delay = animation.effect.getComputedTiming().delay;\n oldCurrentTime = animation.currentTime;\n animation.cancel();\n }\n let newAnimation = setCursorAnimation({\n cursor,\n frames: cursorOptions.animation.frames,\n options\n });\n if (oldCurrentTime) {\n newAnimation.currentTime = oldCurrentTime;\n }\n return newAnimation;\n};\n\nlet execute = (queueItem) => queueItem.func?.call(null);\nlet fireItem = async ({\n index,\n queueItems,\n wait,\n cursor,\n cursorOptions\n}) => {\n let queueItem = queueItems[index][1];\n let instantQueue = [];\n let tempIndex = index;\n let futureItem = queueItem;\n let shouldBeGrouped = () => futureItem && !futureItem.delay;\n let shouldPauseCursor = queueItem.shouldPauseCursor() && cursorOptions.autoPause;\n while (shouldBeGrouped()) {\n instantQueue.push(futureItem);\n shouldBeGrouped() && tempIndex++;\n futureItem = queueItems[tempIndex] ? queueItems[tempIndex][1] : null;\n }\n if (instantQueue.length) {\n await beforePaint(async () => {\n for (let q of instantQueue) {\n await execute(q);\n }\n });\n return tempIndex - 1;\n }\n let animation = getAnimationFromElement(cursor);\n let options;\n if (animation) {\n options = {\n ...animation.effect.getComputedTiming(),\n delay: shouldPauseCursor ? cursorOptions.autoPauseDelay : 0\n };\n }\n await wait(async () => {\n if (animation && shouldPauseCursor) {\n animation.cancel();\n }\n await beforePaint(() => {\n execute(queueItem);\n });\n }, queueItem.delay);\n await rebuildCursorAnimation({\n cursor,\n options,\n cursorOptions\n });\n return index;\n};\n\nconst fireWhenVisible = (element, func) => {\n let observer = new IntersectionObserver(\n (entries, observer2) => {\n entries.forEach((entry) => {\n if (entry.isIntersecting) {\n func();\n observer2.unobserve(element);\n }\n });\n },\n { threshold: 1 }\n );\n observer.observe(element);\n};\n\nconst generateHash = () => Math.random().toString().substring(2, 9);\n\nconst isInput = (el) => {\n return \"value\" in el;\n};\n\nlet getAllChars = (element) => {\n if (isInput(element)) {\n return toArray(element.value);\n }\n return walkElementNodes(element, true).filter(\n (c) => !(c.childNodes.length > 0)\n );\n};\n\nlet handleFunctionalArg = (arg) => {\n return typeof arg === \"function\" ? arg() : arg;\n};\n\nlet select = (selector, element = document, all = false) => {\n return element[`querySelector${all ? \"All\" : \"\"}`](selector);\n};\n\nlet isBodyElement = (node) => /body/i.test(node?.tagName);\n\nlet insertIntoElement = (originalTarget, character) => {\n if (isInput(originalTarget)) {\n originalTarget.value = `${originalTarget.value}${character.textContent}`;\n return;\n }\n character.innerHTML = \"\";\n let target = isBodyElement(character.originalParent) ? originalTarget : (\n // If we add one-off fresh elements, there will be no\n // \"originalParent\", so always fall back to the default target.\n character.originalParent || originalTarget\n );\n let cursorNode = select(\".\" + CURSOR_CLASS, target) || null;\n if (cursorNode && cursorNode.parentElement !== target) {\n target = cursorNode.parentElement;\n }\n target.insertBefore(character, cursorNode);\n};\n\nconst isNonVoidElement = (el) => /<(.+)>(.*?)<\\/(.+)>/.test(el.outerHTML);\n\nconst merge = (originalObj, newObj) => Object.assign({}, originalObj, newObj);\n\nlet processCursorOptions = (cursorOptions) => {\n if (typeof cursorOptions === \"object\") {\n let newOptions = {};\n let { frames: defaultFrames, options: defaultOptions } = DEFAULT_OPTIONS.cursor.animation;\n newOptions.animation = cursorOptions.animation || {};\n newOptions.animation.frames = cursorOptions.animation?.frames || defaultFrames;\n newOptions.animation.options = merge(\n defaultOptions,\n cursorOptions.animation?.options || {}\n );\n newOptions.autoPause = cursorOptions.autoPause ?? DEFAULT_OPTIONS.cursor.autoPause;\n newOptions.autoPauseDelay = cursorOptions.autoPauseDelay || DEFAULT_OPTIONS.cursor.autoPauseDelay;\n return newOptions;\n }\n if (cursorOptions === true) {\n return DEFAULT_OPTIONS.cursor;\n }\n return cursorOptions;\n};\n\nconst removeNode = (node, rootElement) => {\n if (!node) return;\n let nodeParent = node.parentNode;\n let nodeToRemove = nodeParent.childNodes.length > 1 || nodeParent.isSameNode(rootElement) ? (\n // This parent still needs to exist.\n node\n ) : (\n // There's nothing else in there, so just delete the entire thing.\n // By doing this, we clean up markup as we go along.\n nodeParent\n );\n nodeToRemove.remove();\n};\n\nconst repositionCursor = (element, allChars, newCursorPosition) => {\n let nodeToInsertBefore = allChars[newCursorPosition - 1];\n let cursor = select(`.${CURSOR_CLASS}`, element);\n element = nodeToInsertBefore?.parentNode || element;\n element.insertBefore(cursor, nodeToInsertBefore || null);\n};\n\nfunction selectorToElement(thing) {\n return typeof thing === \"string\" ? select(thing) : thing;\n}\n\nlet cursorFontStyles = {\n \"font-family\": \"\",\n \"font-weight\": \"\",\n \"font-size\": \"\",\n \"font-style\": \"\",\n \"line-height\": \"\",\n color: \"\",\n transform: \"translateX(-.125em)\"\n};\nlet setCursorStyles = (id, element) => {\n let rootSelector = `[${DATA_ATTRIBUTE}='${id}']`;\n let cursorSelector = `${rootSelector} .${CURSOR_CLASS}`;\n let computedStyles = getComputedStyle(element);\n let customProperties = Object.entries(cursorFontStyles).reduce(\n (accumulator, [item, value]) => {\n return `${accumulator} ${item}: var(--ti-cursor-${item}, ${value || computedStyles[item]});`;\n },\n \"\"\n );\n appendStyleBlock(\n `${cursorSelector} { display: inline-block; width: 0; ${customProperties} }`,\n id\n );\n};\n\nfunction splitOnBreak(str) {\n return str.replace(/<!--(.+?)-->/g, \"\").trim().split(/<br(?:\\s*?)(?:\\/)?>/);\n}\n\nlet updateCursorPosition = (steps, cursorPosition, printedCharacters) => {\n return Math.min(\n Math.max(cursorPosition + steps, 0),\n printedCharacters.length\n );\n};\n\nlet wait = (callback, delay, timeouts) => {\n return new Promise((resolve) => {\n let cb = async () => {\n await callback();\n resolve();\n };\n timeouts.push(setTimeout(cb, delay || 0));\n });\n};\n\nclass TypeIt {\n element;\n timeouts;\n cursorPosition;\n predictedCursorPosition;\n statuses = {\n started: false,\n completed: false,\n frozen: false,\n destroyed: false,\n firing: false\n };\n opts;\n id;\n queue;\n cursor;\n flushCallback = null;\n unfreeze = () => {\n };\n constructor(element, options = {}) {\n this.opts = merge(DEFAULT_OPTIONS, options);\n this.element = selectorToElement(element);\n this.timeouts = [];\n this.cursorPosition = 0;\n this.unfreeze = () => {\n };\n this.predictedCursorPosition = null;\n this.statuses = merge({}, DEFAULT_STATUSES);\n this.id = generateHash();\n this.queue = Queue([{ delay: this.opts.startDelay }]);\n this.#buildOptions(options);\n this.cursor = this.#setUpCursor();\n this.element.dataset.typeitId = this.id;\n appendStyleBlock(PLACEHOLDER_CSS);\n if (this.opts.strings.length) {\n this.#generateQueue();\n }\n }\n /**\n * Can only be called once.\n */\n go() {\n if (this.statuses.started) {\n return this;\n }\n this.#attachCursor();\n if (!this.opts.waitUntilVisible) {\n this.#fire();\n return this;\n }\n fireWhenVisible(this.element, this.#fire.bind(this));\n return this;\n }\n destroy(shouldRemoveCursor = true) {\n this.timeouts = destroyTimeouts(this.timeouts);\n handleFunctionalArg(shouldRemoveCursor) && this.cursor && this.#removeNode(this.cursor);\n this.statuses.destroyed = true;\n }\n reset(rebuild) {\n !this.is(\"destroyed\") && this.destroy();\n if (rebuild) {\n this.queue.wipe();\n rebuild(this);\n } else {\n this.queue.reset();\n }\n this.cursorPosition = 0;\n for (let property in this.statuses) {\n this.statuses[property] = false;\n }\n this.element[this.#elementIsInput() ? \"value\" : \"innerHTML\"] = \"\";\n return this;\n }\n is = function(key) {\n return this.statuses[key];\n };\n type(string, actionOpts = {}) {\n string = handleFunctionalArg(string);\n let { instant } = actionOpts;\n let bookEndQueueItems = this.#generateTemporaryOptionQueueItems(actionOpts);\n let chars = maybeChunkStringAsHtml(string, this.opts.html);\n let charsAsQueueItems = chars.map((char) => {\n return {\n func: () => this.#type(char),\n char,\n delay: instant || isNonVoidElement(char) ? 0 : this.#getPace(),\n typeable: char.nodeType === Node.TEXT_NODE\n };\n });\n let itemsToQueue = [\n bookEndQueueItems[0],\n { func: async () => await this.opts.beforeString(string, this) },\n ...charsAsQueueItems,\n { func: async () => await this.opts.afterString(string, this) },\n bookEndQueueItems[1]\n ];\n return this.#queueAndReturn(itemsToQueue, actionOpts);\n }\n break(actionOpts = {}) {\n return this.#queueAndReturn(\n {\n func: () => this.#type(createElement(\"BR\")),\n typeable: true\n },\n actionOpts\n );\n }\n move(movementArg, actionOpts = {}) {\n movementArg = handleFunctionalArg(movementArg);\n let bookEndQueueItems = this.#generateTemporaryOptionQueueItems(actionOpts);\n let { instant, to } = actionOpts;\n let numberOfSteps = countStepsToSelector({\n queueItems: this.queue.getTypeable(),\n selector: movementArg === null ? \"\" : movementArg,\n to,\n cursorPosition: this.#derivedCursorPosition\n });\n let directionalStep = numberOfSteps < 0 ? -1 : 1;\n this.predictedCursorPosition = this.#derivedCursorPosition + numberOfSteps;\n return this.#queueAndReturn(\n [\n bookEndQueueItems[0],\n ...duplicate(\n {\n func: () => this.#move(directionalStep),\n delay: instant ? 0 : this.#getPace(),\n cursorable: true\n },\n Math.abs(numberOfSteps)\n ),\n bookEndQueueItems[1]\n ],\n actionOpts\n );\n }\n exec(func, actionOpts = {}) {\n let bookEndQueueItems = this.#generateTemporaryOptionQueueItems(actionOpts);\n return this.#queueAndReturn(\n [bookEndQueueItems[0], { func: () => func(this) }, bookEndQueueItems[1]],\n actionOpts\n );\n }\n options(opts, actionOpts = {}) {\n opts = handleFunctionalArg(opts);\n this.#updateOptions(opts);\n return this.#queueAndReturn({}, actionOpts);\n }\n pause(milliseconds, actionOpts = {}) {\n return this.#queueAndReturn(\n { delay: handleFunctionalArg(milliseconds) },\n actionOpts\n );\n }\n delete(numCharacters = null, actionOpts = {}) {\n numCharacters = handleFunctionalArg(numCharacters);\n let bookEndQueueItems = this.#generateTemporaryOptionQueueItems(actionOpts);\n let num = numCharacters;\n let { instant, to } = actionOpts;\n let typeableQueueItems = this.queue.getTypeable();\n let rounds = (() => {\n if (num === null) {\n return typeableQueueItems.length;\n }\n if (isNumber(num)) {\n return num;\n }\n return countStepsToSelector({\n queueItems: typeableQueueItems,\n selector: num,\n cursorPosition: this.#derivedCursorPosition,\n to\n });\n })();\n return this.#queueAndReturn(\n [\n bookEndQueueItems[0],\n ...duplicate(\n {\n func: this.#delete.bind(this),\n delay: instant ? 0 : this.#getPace(1),\n deletable: true\n },\n rounds\n ),\n bookEndQueueItems[1]\n ],\n actionOpts\n );\n }\n freeze() {\n this.statuses.frozen = true;\n }\n /**\n * Like `.go()`, but more... \"off the grid.\"\n *\n * - won't trigger `afterComplete` callback\n * - items won't be replayed after `.reset()`\n *\n * When called, all non-done items will be \"flushed\" --\n * that is, executed, but not remembered.\n */\n flush(cb = null) {\n this.flushCallback = cb || this.flushCallback;\n if (this.statuses.firing) {\n return this;\n }\n this.#attachCursor();\n this.#fire(false).then(() => {\n if (this.queue.getPendingQueueItems().length > 0) {\n return this.flush();\n }\n this.flushCallback();\n this.flushCallback = null;\n });\n return this;\n }\n getQueue() {\n return this.queue;\n }\n getOptions() {\n return this.opts;\n }\n updateOptions(options) {\n return this.#updateOptions(options);\n }\n getElement() {\n return this.element;\n }\n empty(actionOpts = {}) {\n return this.#queueAndReturn({ func: this.#empty.bind(this) }, actionOpts);\n }\n async #empty() {\n if (this.#elementIsInput()) {\n this.element.value = \"\";\n return;\n }\n this.#allChars.forEach(this.#removeNode.bind(this));\n return;\n }\n /**\n * Execute items in the queue.\n *\n * @param remember If false, each queue item will be destroyed once executed.\n * @returns\n */\n async #fire(remember = true) {\n this.statuses.started = true;\n this.statuses.firing = true;\n let cleanUp = (qKey) => {\n this.queue.done(qKey, !remember);\n };\n try {\n let queueItems = [...this.queue.getQueue()];\n for (let index = 0; index < queueItems.length; index++) {\n let [queueKey, queueItem] = queueItems[index];\n if (queueItem.done) continue;\n if (!queueItem.deletable || queueItem.deletable && this.#allChars.length) {\n let newIndex = await this.#fireItemWithContext(index, queueItems);\n cleanUpSkipped({\n index,\n newIndex,\n queueItems,\n cleanUp\n });\n index = newIndex;\n }\n cleanUp(queueKey);\n }\n if (!remember) {\n this.statuses.firing = false;\n return this;\n }\n this.statuses.completed = true;\n this.statuses.firing = false;\n await this.opts.afterComplete(this);\n if (!this.opts.loop) {\n throw \"\";\n }\n let delay = this.opts.loopDelay;\n this.#wait(async () => {\n await this.#prepLoop(delay[0]);\n this.#fire();\n }, delay[1]);\n } catch (e) {\n }\n this.statuses.firing = false;\n return this;\n }\n async #move(step) {\n this.cursorPosition = updateCursorPosition(\n step,\n this.cursorPosition,\n this.#allChars\n );\n repositionCursor(this.element, this.#allChars, this.cursorPosition);\n }\n /**\n * 1. Reset queue.\n * 2. Reset initial pause.\n */\n async #prepLoop(delay) {\n let derivedCursorPosition = this.#derivedCursorPosition;\n derivedCursorPosition && await this.#move({ value: derivedCursorPosition });\n let queueItems = this.#allChars.map((c) => {\n return [\n Symbol(),\n {\n func: this.#delete.bind(this),\n delay: this.#getPace(1),\n deletable: true,\n shouldPauseCursor: () => true\n }\n ];\n });\n for (let index = 0; index < queueItems.length; index++) {\n await this.#fireItemWithContext(index, queueItems);\n }\n this.queue.reset();\n this.queue.set(0, { delay });\n }\n #fireItemWithContext(index, queueItems) {\n return fireItem({\n index,\n queueItems,\n wait: this.#wait.bind(this),\n cursor: this.cursor,\n cursorOptions: this.opts.cursor\n });\n }\n async #wait(callback, delay, silent = false) {\n if (this.statuses.frozen) {\n await new Promise((resolve) => {\n this.unfreeze = () => {\n this.statuses.frozen = false;\n resolve();\n };\n });\n }\n silent || await this.opts.beforeStep(this);\n await wait(callback, delay, this.timeouts);\n silent || await this.opts.afterStep(this);\n }\n /**\n * Attach it to the DOM so, along with the required CSS transition.\n */\n async #attachCursor() {\n !this.#elementIsInput() && this.cursor && this.element.appendChild(this.cursor);\n if (this.#shouldRenderCursor) {\n setCursorStyles(this.id, this.element);\n this.cursor.dataset.tiAnimationId = this.id;\n let { animation } = this.opts.cursor;\n let { frames, options } = animation;\n setCursorAnimation({\n frames,\n cursor: this.cursor,\n options: {\n duration: this.opts.cursorSpeed,\n ...options\n }\n });\n }\n }\n #elementIsInput() {\n return isInput(this.element);\n }\n #queueAndReturn(steps, opts) {\n this.queue.add(steps);\n this.#maybeAppendPause(opts);\n return this;\n }\n #maybeAppendPause(opts = {}) {\n let delay = opts.delay;\n delay && this.queue.add({ delay });\n }\n #generateTemporaryOptionQueueItems(newOptions = {}) {\n return [\n { func: () => this.#updateOptions(newOptions) },\n { func: () => this.#updateOptions(this.opts) }\n ];\n }\n async #updateOptions(opts) {\n this.opts = merge(this.opts, opts);\n }\n /**\n * Based on provided strings, generate a TypeIt queue\n * to be fired for each character in the string.\n */\n #generateQueue() {\n let strings = this.opts.strings.filter((string) => !!string);\n strings.forEach((string, index) => {\n this.type(string);\n if (index + 1 === strings.length) {\n return;\n }\n let splitItems = this.opts.breakLines ? [{ func: () => this.#type(createElement(\"BR\")), typeable: true }] : duplicate(\n {\n func: this.#delete.bind(this),\n delay: this.#getPace(1)\n },\n this.queue.getTypeable().length\n );\n this.#addSplitPause(splitItems);\n });\n }\n #buildOptions = (options) => {\n this.opts.cursor = processCursorOptions(\n options.cursor ?? DEFAULT_OPTIONS.cursor\n );\n this.opts.strings = this.#prependHardcodedStrings(\n asArray(this.opts.strings)\n );\n this.opts = merge(this.opts, {\n html: !this.#isInput && this.opts.html,\n nextStringDelay: calculateDelay(this.opts.nextStringDelay),\n loopDelay: calculateDelay(this.opts.loopDelay)\n });\n };\n #prependHardcodedStrings(strings) {\n let existingMarkup = this.element.innerHTML;\n if (!existingMarkup) {\n return strings;\n }\n this.element.innerHTML = \"\";\n if (this.opts.startDelete) {\n this.element.innerHTML = existingMarkup;\n expandTextNodes(this.element);\n this.#addSplitPause(\n duplicate(\n {\n func: this.#delete.bind(this),\n delay: this.#getPace(1),\n deletable: true\n },\n this.#allChars.length\n )\n );\n return strings;\n }\n return splitOnBreak(existingMarkup).concat(strings);\n }\n /**\n * Provided it's a non-form element and the options is provided,\n * set up the cursor element for the animation.\n */\n #setUpCursor() {\n if (this.#isInput) {\n return null;\n }\n let cursor = createElement(\"span\");\n cursor.className = CURSOR_CLASS;\n if (!this.#shouldRenderCursor) {\n cursor.style.visibility = \"hidden\";\n return cursor;\n }\n cursor.innerHTML = getParsedBody(this.opts.cursorChar).innerHTML;\n return cursor;\n }\n #addSplitPause(items) {\n let delay = this.opts.nextStringDelay;\n this.queue.add([{ delay: delay[0] }, ...items, { delay: delay[1] }]);\n }\n #type(char) {\n insertIntoElement(this.element, char);\n }\n #delete() {\n if (!this.#allChars.length) return;\n if (this.#isInput) {\n this.element.value = this.element.value.slice(0, -1);\n } else {\n this.#removeNode(this.#allChars[this.cursorPosition]);\n }\n }\n #removeNode(node) {\n removeNode(node, this.element);\n }\n #getPace(index = 0) {\n return calculatePace(this.opts)[index];\n }\n get #derivedCursorPosition() {\n return this.predictedCursorPosition ?? this.cursorPosition;\n }\n get #isInput() {\n return isInput(this.element);\n }\n get #shouldRenderCursor() {\n return !!this.opts.cursor && !this.#isInput;\n }\n get #allChars() {\n return getAllChars(this.element);\n }\n}\n\nexport { TypeIt as default };\n"],"x_google_ignoreList":[0],"mappings":"AACA,IAAM,EAAW,GAAU,MAAM,QAAQ,EAAA,CAEnC,EAAW,GAAU,EAAQ,EAAA,CAAS,EAAQ,CAAC,EAAA,CAyD/C,EAAiB,iBACjB,EAAe,YAEf,EAAmB,CACvB,QAAA,CAAS,EACT,UAAA,CAAW,EACX,OAAA,CAAQ,EACR,UAAA,CAAW,EAAA,CAEP,EAAkB,CACtB,WAAA,CAAY,EACZ,OAAQ,CACN,UAAA,CAAW,EACX,eAAgB,IAChB,UAAW,CACT,OAAQ,CAAC,EAAG,EAAG,EAAA,CAAG,IAAK,IACd,CAAE,QAAS,EAAA,EAAA,CAEpB,QAAS,CACP,WAAY,IACZ,OAAQ,kBACR,KAAM,WAAA,CAAA,CAAA,CAIZ,WAAY,IACZ,YAAa,IACb,YAAa,KACb,KAAA,CAAM,EACN,SAAA,CAAU,EACV,KAAA,CAAM,EACN,UAAW,IACX,gBAAiB,IACjB,MAAO,IACP,WAAY,IACZ,YAAA,CAAa,EACb,QAAS,EAAA,CACT,iBAAA,CAAkB,EAClB,iBAAA,GAEA,gBAAA,GAE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