{"version":3,"file":"index.cjs","sources":["../node_modules/lucide-react/dist/esm/shared/src/utils.js","../node_modules/lucide-react/dist/esm/defaultAttributes.js","../node_modules/lucide-react/dist/esm/Icon.js","../node_modules/lucide-react/dist/esm/createLucideIcon.js","../node_modules/lucide-react/dist/esm/icons/chevron-down.js","../node_modules/lucide-react/dist/esm/icons/chevron-up.js","../node_modules/lucide-react/dist/esm/icons/grip-vertical.js","../node_modules/lucide-react/dist/esm/icons/minus.js","../node_modules/lucide-react/dist/esm/icons/plus.js","../node_modules/lucide-react/dist/esm/icons/text-align-center.js","../node_modules/lucide-react/dist/esm/icons/text-align-end.js","../node_modules/lucide-react/dist/esm/icons/text-align-start.js","../node_modules/bezier-easing/src/index.js","../node_modules/parallax-controller/dist/parallax-controller.esm.js","../node_modules/react-scroll-parallax/dist/index.mjs","../src/components/annotations/ArrowAnnotation.tsx","../src/components/annotations/TextBalloonAnnotation.tsx","../src/components/annotations/HighlightAnnotation.tsx","../src/components/annotations/NumberedBadgeAnnotation.tsx","../src/components/annotations/RectAnnotation.tsx","../src/components/annotations/CircleAnnotation.tsx","../src/components/annotations/ImageAnnotation.tsx","../node_modules/clsx/dist/clsx.mjs","../node_modules/@radix-ui/react-compose-refs/dist/index.mjs","../node_modules/@radix-ui/react-slot/dist/index.mjs","../node_modules/class-variance-authority/dist/index.mjs","../node_modules/tailwind-merge/dist/bundle-mjs.mjs","../src/utils/cn.ts","../src/components/ui/button.tsx","../src/components/editor/FloatingRichTextToolbar.tsx","../src/components/editor/RichTextEditor.tsx","../src/components/annotations/RichTextAnnotation.tsx","../src/NestedProgressIndicator.tsx","../src/utils/imageReferences.ts","../src/TutorialPlayerCore.tsx","../src/utils/imageLoaders.ts","../src/TutorialPlayer.tsx"],"sourcesContent":["/**\n * @license lucide-react v0.548.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nconst toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, \"$1-$2\").toLowerCase();\nconst toCamelCase = (string) => string.replace(\n  /^([A-Z])|[\\s-_]+(\\w)/g,\n  (match, p1, p2) => p2 ? p2.toUpperCase() : p1.toLowerCase()\n);\nconst toPascalCase = (string) => {\n  const camelCase = toCamelCase(string);\n  return camelCase.charAt(0).toUpperCase() + camelCase.slice(1);\n};\nconst mergeClasses = (...classes) => classes.filter((className, index, array) => {\n  return Boolean(className) && className.trim() !== \"\" && array.indexOf(className) === index;\n}).join(\" \").trim();\nconst hasA11yProp = (props) => {\n  for (const prop in props) {\n    if (prop.startsWith(\"aria-\") || prop === \"role\" || prop === \"title\") {\n      return true;\n    }\n  }\n};\n\nexport { hasA11yProp, mergeClasses, toCamelCase, toKebabCase, toPascalCase };\n//# sourceMappingURL=utils.js.map\n","/**\n * @license lucide-react v0.548.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nvar defaultAttributes = {\n  xmlns: \"http://www.w3.org/2000/svg\",\n  width: 24,\n  height: 24,\n  viewBox: \"0 0 24 24\",\n  fill: \"none\",\n  stroke: \"currentColor\",\n  strokeWidth: 2,\n  strokeLinecap: \"round\",\n  strokeLinejoin: \"round\"\n};\n\nexport { defaultAttributes as default };\n//# sourceMappingURL=defaultAttributes.js.map\n","/**\n * @license lucide-react v0.548.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport { forwardRef, createElement } from 'react';\nimport defaultAttributes from './defaultAttributes.js';\nimport { mergeClasses, hasA11yProp } from './shared/src/utils.js';\n\nconst Icon = forwardRef(\n  ({\n    color = \"currentColor\",\n    size = 24,\n    strokeWidth = 2,\n    absoluteStrokeWidth,\n    className = \"\",\n    children,\n    iconNode,\n    ...rest\n  }, ref) => createElement(\n    \"svg\",\n    {\n      ref,\n      ...defaultAttributes,\n      width: size,\n      height: size,\n      stroke: color,\n      strokeWidth: absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(size) : strokeWidth,\n      className: mergeClasses(\"lucide\", className),\n      ...!children && !hasA11yProp(rest) && { \"aria-hidden\": \"true\" },\n      ...rest\n    },\n    [\n      ...iconNode.map(([tag, attrs]) => createElement(tag, attrs)),\n      ...Array.isArray(children) ? children : [children]\n    ]\n  )\n);\n\nexport { Icon as default };\n//# sourceMappingURL=Icon.js.map\n","/**\n * @license lucide-react v0.548.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport { forwardRef, createElement } from 'react';\nimport { mergeClasses, toKebabCase, toPascalCase } from './shared/src/utils.js';\nimport Icon from './Icon.js';\n\nconst createLucideIcon = (iconName, iconNode) => {\n  const Component = forwardRef(\n    ({ className, ...props }, ref) => createElement(Icon, {\n      ref,\n      iconNode,\n      className: mergeClasses(\n        `lucide-${toKebabCase(toPascalCase(iconName))}`,\n        `lucide-${iconName}`,\n        className\n      ),\n      ...props\n    })\n  );\n  Component.displayName = toPascalCase(iconName);\n  return Component;\n};\n\nexport { createLucideIcon as default };\n//# sourceMappingURL=createLucideIcon.js.map\n","/**\n * @license lucide-react v0.548.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [[\"path\", { d: \"m6 9 6 6 6-6\", key: \"qrunsl\" }]];\nconst ChevronDown = createLucideIcon(\"chevron-down\", __iconNode);\n\nexport { __iconNode, ChevronDown as default };\n//# sourceMappingURL=chevron-down.js.map\n","/**\n * @license lucide-react v0.548.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [[\"path\", { d: \"m18 15-6-6-6 6\", key: \"153udz\" }]];\nconst ChevronUp = createLucideIcon(\"chevron-up\", __iconNode);\n\nexport { __iconNode, ChevronUp as default };\n//# sourceMappingURL=chevron-up.js.map\n","/**\n * @license lucide-react v0.548.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n  [\"circle\", { cx: \"9\", cy: \"12\", r: \"1\", key: \"1vctgf\" }],\n  [\"circle\", { cx: \"9\", cy: \"5\", r: \"1\", key: \"hp0tcf\" }],\n  [\"circle\", { cx: \"9\", cy: \"19\", r: \"1\", key: \"fkjjf6\" }],\n  [\"circle\", { cx: \"15\", cy: \"12\", r: \"1\", key: \"1tmaij\" }],\n  [\"circle\", { cx: \"15\", cy: \"5\", r: \"1\", key: \"19l28e\" }],\n  [\"circle\", { cx: \"15\", cy: \"19\", r: \"1\", key: \"f4zoj3\" }]\n];\nconst GripVertical = createLucideIcon(\"grip-vertical\", __iconNode);\n\nexport { __iconNode, GripVertical as default };\n//# sourceMappingURL=grip-vertical.js.map\n","/**\n * @license lucide-react v0.548.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [[\"path\", { d: \"M5 12h14\", key: \"1ays0h\" }]];\nconst Minus = createLucideIcon(\"minus\", __iconNode);\n\nexport { __iconNode, Minus as default };\n//# sourceMappingURL=minus.js.map\n","/**\n * @license lucide-react v0.548.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n  [\"path\", { d: \"M5 12h14\", key: \"1ays0h\" }],\n  [\"path\", { d: \"M12 5v14\", key: \"s699le\" }]\n];\nconst Plus = createLucideIcon(\"plus\", __iconNode);\n\nexport { __iconNode, Plus as default };\n//# sourceMappingURL=plus.js.map\n","/**\n * @license lucide-react v0.548.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n  [\"path\", { d: \"M21 5H3\", key: \"1fi0y6\" }],\n  [\"path\", { d: \"M17 12H7\", key: \"16if0g\" }],\n  [\"path\", { d: \"M19 19H5\", key: \"vjpgq2\" }]\n];\nconst TextAlignCenter = createLucideIcon(\"text-align-center\", __iconNode);\n\nexport { __iconNode, TextAlignCenter as default };\n//# sourceMappingURL=text-align-center.js.map\n","/**\n * @license lucide-react v0.548.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n  [\"path\", { d: \"M21 5H3\", key: \"1fi0y6\" }],\n  [\"path\", { d: \"M21 12H9\", key: \"dn1m92\" }],\n  [\"path\", { d: \"M21 19H7\", key: \"4cu937\" }]\n];\nconst TextAlignEnd = createLucideIcon(\"text-align-end\", __iconNode);\n\nexport { __iconNode, TextAlignEnd as default };\n//# sourceMappingURL=text-align-end.js.map\n","/**\n * @license lucide-react v0.548.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n  [\"path\", { d: \"M21 5H3\", key: \"1fi0y6\" }],\n  [\"path\", { d: \"M15 12H3\", key: \"6jk70r\" }],\n  [\"path\", { d: \"M17 19H3\", key: \"z6ezky\" }]\n];\nconst TextAlignStart = createLucideIcon(\"text-align-start\", __iconNode);\n\nexport { __iconNode, TextAlignStart as default };\n//# sourceMappingURL=text-align-start.js.map\n","/**\n * https://github.com/gre/bezier-easing\n * BezierEasing - use bezier curve for transition easing function\n * by Gaëtan Renaudeau 2014 - 2015 – MIT License\n */\n\n// These values are established by empiricism with tests (tradeoff: performance VS precision)\nvar NEWTON_ITERATIONS = 4;\nvar NEWTON_MIN_SLOPE = 0.001;\nvar SUBDIVISION_PRECISION = 0.0000001;\nvar SUBDIVISION_MAX_ITERATIONS = 10;\n\nvar kSplineTableSize = 11;\nvar kSampleStepSize = 1.0 / (kSplineTableSize - 1.0);\n\nvar float32ArraySupported = typeof Float32Array === 'function';\n\nfunction A (aA1, aA2) { return 1.0 - 3.0 * aA2 + 3.0 * aA1; }\nfunction B (aA1, aA2) { return 3.0 * aA2 - 6.0 * aA1; }\nfunction C (aA1)      { return 3.0 * aA1; }\n\n// Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.\nfunction calcBezier (aT, aA1, aA2) { return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT; }\n\n// Returns dx/dt given t, x1, and x2, or dy/dt given t, y1, and y2.\nfunction getSlope (aT, aA1, aA2) { return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1); }\n\nfunction binarySubdivide (aX, aA, aB, mX1, mX2) {\n  var currentX, currentT, i = 0;\n  do {\n    currentT = aA + (aB - aA) / 2.0;\n    currentX = calcBezier(currentT, mX1, mX2) - aX;\n    if (currentX > 0.0) {\n      aB = currentT;\n    } else {\n      aA = currentT;\n    }\n  } while (Math.abs(currentX) > SUBDIVISION_PRECISION && ++i < SUBDIVISION_MAX_ITERATIONS);\n  return currentT;\n}\n\nfunction newtonRaphsonIterate (aX, aGuessT, mX1, mX2) {\n for (var i = 0; i < NEWTON_ITERATIONS; ++i) {\n   var currentSlope = getSlope(aGuessT, mX1, mX2);\n   if (currentSlope === 0.0) {\n     return aGuessT;\n   }\n   var currentX = calcBezier(aGuessT, mX1, mX2) - aX;\n   aGuessT -= currentX / currentSlope;\n }\n return aGuessT;\n}\n\nfunction LinearEasing (x) {\n  return x;\n}\n\nmodule.exports = function bezier (mX1, mY1, mX2, mY2) {\n  if (!(0 <= mX1 && mX1 <= 1 && 0 <= mX2 && mX2 <= 1)) {\n    throw new Error('bezier x values must be in [0, 1] range');\n  }\n\n  if (mX1 === mY1 && mX2 === mY2) {\n    return LinearEasing;\n  }\n\n  // Precompute samples table\n  var sampleValues = float32ArraySupported ? new Float32Array(kSplineTableSize) : new Array(kSplineTableSize);\n  for (var i = 0; i < kSplineTableSize; ++i) {\n    sampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2);\n  }\n\n  function getTForX (aX) {\n    var intervalStart = 0.0;\n    var currentSample = 1;\n    var lastSample = kSplineTableSize - 1;\n\n    for (; currentSample !== lastSample && sampleValues[currentSample] <= aX; ++currentSample) {\n      intervalStart += kSampleStepSize;\n    }\n    --currentSample;\n\n    // Interpolate to provide an initial guess for t\n    var dist = (aX - sampleValues[currentSample]) / (sampleValues[currentSample + 1] - sampleValues[currentSample]);\n    var guessForT = intervalStart + dist * kSampleStepSize;\n\n    var initialSlope = getSlope(guessForT, mX1, mX2);\n    if (initialSlope >= NEWTON_MIN_SLOPE) {\n      return newtonRaphsonIterate(aX, guessForT, mX1, mX2);\n    } else if (initialSlope === 0.0) {\n      return guessForT;\n    } else {\n      return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize, mX1, mX2);\n    }\n  }\n\n  return function BezierEasing (x) {\n    // Because JavaScript number are imprecise, we should guarantee the extremes are right.\n    if (x === 0) {\n      return 0;\n    }\n    if (x === 1) {\n      return 1;\n    }\n    return calcBezier(getTForX(x), mY1, mY2);\n  };\n};\n","import bezier from 'bezier-easing';\n\nvar Limits = function Limits(properties) {\n  this.startX = properties.startX;\n  this.startY = properties.startY;\n  this.endX = properties.endX;\n  this.endY = properties.endY; // Used to calculate the progress of the element\n\n  this.totalX = this.endX - this.startX;\n  this.totalY = this.endY - this.startY; // Used to scale translate effects\n\n  this.startMultiplierX = properties.startMultiplierX || 1;\n  this.endMultiplierX = properties.endMultiplierX || 1;\n  this.startMultiplierY = properties.startMultiplierY || 1;\n  this.endMultiplierY = properties.endMultiplierY || 1;\n};\n\nfunction _extends() {\n  _extends = Object.assign || function (target) {\n    for (var i = 1; i < arguments.length; i++) {\n      var source = arguments[i];\n\n      for (var key in source) {\n        if (Object.prototype.hasOwnProperty.call(source, key)) {\n          target[key] = source[key];\n        }\n      }\n    }\n\n    return target;\n  };\n\n  return _extends.apply(this, arguments);\n}\n\nvar ValidCSSEffects;\n\n(function (ValidCSSEffects) {\n  ValidCSSEffects[\"speed\"] = \"speed\";\n  ValidCSSEffects[\"translateX\"] = \"translateX\";\n  ValidCSSEffects[\"translateY\"] = \"translateY\";\n  ValidCSSEffects[\"rotate\"] = \"rotate\";\n  ValidCSSEffects[\"rotateX\"] = \"rotateX\";\n  ValidCSSEffects[\"rotateY\"] = \"rotateY\";\n  ValidCSSEffects[\"rotateZ\"] = \"rotateZ\";\n  ValidCSSEffects[\"scale\"] = \"scale\";\n  ValidCSSEffects[\"scaleX\"] = \"scaleX\";\n  ValidCSSEffects[\"scaleY\"] = \"scaleY\";\n  ValidCSSEffects[\"scaleZ\"] = \"scaleZ\";\n  ValidCSSEffects[\"opacity\"] = \"opacity\";\n})(ValidCSSEffects || (ValidCSSEffects = {}));\n\nvar Units;\n\n(function (Units) {\n  Units[\"px\"] = \"px\";\n  Units[\"%\"] = \"%\";\n  Units[\"vh\"] = \"vh\";\n  Units[\"vw\"] = \"vw\";\n})(Units || (Units = {}));\n\nvar RotationUnits;\n\n(function (RotationUnits) {\n  RotationUnits[\"deg\"] = \"deg\";\n  RotationUnits[\"turn\"] = \"turn\";\n  RotationUnits[\"rad\"] = \"rad\";\n})(RotationUnits || (RotationUnits = {}));\n\nvar ScaleUnits;\n\n(function (ScaleUnits) {\n  ScaleUnits[\"\"] = \"\";\n})(ScaleUnits || (ScaleUnits = {}));\n\nvar ScrollAxis;\n\n(function (ScrollAxis) {\n  ScrollAxis[\"vertical\"] = \"vertical\";\n  ScrollAxis[\"horizontal\"] = \"horizontal\";\n})(ScrollAxis || (ScrollAxis = {}));\n\nvar EasingPreset;\n\n(function (EasingPreset) {\n  EasingPreset[\"ease\"] = \"ease\";\n  EasingPreset[\"easeIn\"] = \"easeIn\";\n  EasingPreset[\"easeOut\"] = \"easeOut\";\n  EasingPreset[\"easeInOut\"] = \"easeInOut\";\n  EasingPreset[\"easeInQuad\"] = \"easeInQuad\";\n  EasingPreset[\"easeInCubic\"] = \"easeInCubic\";\n  EasingPreset[\"easeInQuart\"] = \"easeInQuart\";\n  EasingPreset[\"easeInQuint\"] = \"easeInQuint\";\n  EasingPreset[\"easeInSine\"] = \"easeInSine\";\n  EasingPreset[\"easeInExpo\"] = \"easeInExpo\";\n  EasingPreset[\"easeInCirc\"] = \"easeInCirc\";\n  EasingPreset[\"easeOutQuad\"] = \"easeOutQuad\";\n  EasingPreset[\"easeOutCubic\"] = \"easeOutCubic\";\n  EasingPreset[\"easeOutQuart\"] = \"easeOutQuart\";\n  EasingPreset[\"easeOutQuint\"] = \"easeOutQuint\";\n  EasingPreset[\"easeOutSine\"] = \"easeOutSine\";\n  EasingPreset[\"easeOutExpo\"] = \"easeOutExpo\";\n  EasingPreset[\"easeOutCirc\"] = \"easeOutCirc\";\n  EasingPreset[\"easeInOutQuad\"] = \"easeInOutQuad\";\n  EasingPreset[\"easeInOutCubic\"] = \"easeInOutCubic\";\n  EasingPreset[\"easeInOutQuart\"] = \"easeInOutQuart\";\n  EasingPreset[\"easeInOutQuint\"] = \"easeInOutQuint\";\n  EasingPreset[\"easeInOutSine\"] = \"easeInOutSine\";\n  EasingPreset[\"easeInOutExpo\"] = \"easeInOutExpo\";\n  EasingPreset[\"easeInOutCirc\"] = \"easeInOutCirc\";\n  EasingPreset[\"easeInBack\"] = \"easeInBack\";\n  EasingPreset[\"easeOutBack\"] = \"easeOutBack\";\n  EasingPreset[\"easeInOutBack\"] = \"easeInOutBack\";\n})(EasingPreset || (EasingPreset = {}));\n\n/**\r\n * Creates a unique id to distinguish parallax elements.\r\n */\nvar id = 0;\nfunction createId() {\n  ++id;\n  return id;\n}\n\nvar Rect = /*#__PURE__*/function () {\n  function Rect(options) {\n    var rect = options.el.getBoundingClientRect(); // rect is based on viewport -- must adjust for relative scroll container\n\n    if (options.view.scrollContainer) {\n      var scrollRect = options.view.scrollContainer.getBoundingClientRect();\n      rect = _extends({}, rect, {\n        top: rect.top - scrollRect.top,\n        right: rect.right - scrollRect.left,\n        bottom: rect.bottom - scrollRect.top,\n        left: rect.left - scrollRect.left\n      });\n    }\n\n    this.height = options.el.offsetHeight;\n    this.width = options.el.offsetWidth;\n    this.left = rect.left;\n    this.right = rect.right;\n    this.top = rect.top;\n    this.bottom = rect.bottom;\n\n    if (options.rootMargin) {\n      this._setRectWithRootMargin(options.rootMargin);\n    }\n  }\n  /**\r\n   * Apply root margin to all properties\r\n   */\n\n\n  var _proto = Rect.prototype;\n\n  _proto._setRectWithRootMargin = function _setRectWithRootMargin(rootMargin) {\n    var totalRootY = rootMargin.top + rootMargin.bottom;\n    var totalRootX = rootMargin.left + rootMargin.right;\n    this.top -= rootMargin.top;\n    this.right += rootMargin.right;\n    this.bottom += rootMargin.bottom;\n    this.left -= rootMargin.left;\n    this.height += totalRootY;\n    this.width += totalRootX;\n  };\n\n  return Rect;\n}();\n\nvar VALID_UNITS = [ScaleUnits[''], Units.px, Units['%'], Units['vh'], Units['vw'], RotationUnits.deg, RotationUnits.turn, RotationUnits.rad];\n/**\r\n * Determines the unit of a string and parses the value\r\n */\n\nfunction parseValueAndUnit(str, defaultUnit) {\n  if (defaultUnit === void 0) {\n    defaultUnit = Units['%'];\n  }\n\n  var out = {\n    value: 0,\n    unit: defaultUnit\n  };\n  if (typeof str === 'undefined') return out;\n  var isValid = typeof str === 'number' || typeof str === 'string';\n\n  if (!isValid) {\n    throw new Error('Invalid value provided. Must provide a value as a string or number');\n  }\n\n  str = String(str);\n  out.value = parseFloat(str); // @ts-ignore\n\n  out.unit = str.match(/[\\d.\\-+]*\\s*(.*)/)[1] || defaultUnit; // @ts-expect-error\n\n  var isValidUnit = VALID_UNITS.includes(out.unit);\n\n  if (!isValidUnit) {\n    throw new Error('Invalid unit provided.');\n  }\n\n  return out;\n}\n\nvar easingPresets = {\n  ease: [0.25, 0.1, 0.25, 1.0],\n  easeIn: [0.42, 0.0, 1.0, 1.0],\n  easeOut: [0.0, 0.0, 0.58, 1.0],\n  easeInOut: [0.42, 0.0, 0.58, 1.0],\n\n  /* Ease IN curves */\n  easeInQuad: [0.55, 0.085, 0.68, 0.53],\n  easeInCubic: [0.55, 0.055, 0.675, 0.19],\n  easeInQuart: [0.895, 0.03, 0.685, 0.22],\n  easeInQuint: [0.755, 0.05, 0.855, 0.06],\n  easeInSine: [0.47, 0.0, 0.745, 0.715],\n  easeInExpo: [0.95, 0.05, 0.795, 0.035],\n  easeInCirc: [0.6, 0.04, 0.98, 0.335],\n\n  /* Ease Out Curves */\n  easeOutQuad: [0.25, 0.46, 0.45, 0.94],\n  easeOutCubic: [0.215, 0.61, 0.355, 1.0],\n  easeOutQuart: [0.165, 0.84, 0.44, 1.0],\n  easeOutQuint: [0.23, 1.0, 0.32, 1.0],\n  easeOutSine: [0.39, 0.575, 0.565, 1.0],\n  easeOutExpo: [0.19, 1.0, 0.22, 1.0],\n  easeOutCirc: [0.075, 0.82, 0.165, 1.0],\n\n  /* Ease IN Out Curves */\n  easeInOutQuad: [0.455, 0.03, 0.515, 0.955],\n  easeInOutCubic: [0.645, 0.045, 0.355, 1.0],\n  easeInOutQuart: [0.77, 0.0, 0.175, 1.0],\n  easeInOutQuint: [0.86, 0.0, 0.07, 1.0],\n  easeInOutSine: [0.445, 0.05, 0.55, 0.95],\n  easeInOutExpo: [1.0, 0.0, 0.0, 1.0],\n  easeInOutCirc: [0.785, 0.135, 0.15, 0.86],\n\n  /* Ease Bounce Curves */\n  easeInBack: [0.6, -0.28, 0.735, 0.045],\n  easeOutBack: [0.175, 0.885, 0.32, 1.275],\n  easeInOutBack: [0.68, -0.55, 0.265, 1.55]\n};\n\nfunction createEasingFunction(easing) {\n  if (Array.isArray(easing)) {\n    return bezier(easing[0], easing[1], easing[2], easing[3]);\n  }\n\n  if (typeof easing === 'string' && typeof easingPresets[easing] !== 'undefined') {\n    var params = easingPresets[easing];\n    return bezier(params[0], params[1], params[2], params[3]);\n  }\n\n  return;\n}\n\nvar PARALLAX_EFFECTS = /*#__PURE__*/Object.values(ValidCSSEffects);\nvar MAP_EFFECT_TO_DEFAULT_UNIT = {\n  speed: 'px',\n  translateX: '%',\n  translateY: '%',\n  rotate: 'deg',\n  rotateX: 'deg',\n  rotateY: 'deg',\n  rotateZ: 'deg',\n  scale: '',\n  scaleX: '',\n  scaleY: '',\n  scaleZ: '',\n  opacity: ''\n};\n/**\r\n * Takes a parallax element effects and parses the properties to get the start and end values and units.\r\n */\n\nfunction parseElementTransitionEffects(props, scrollAxis) {\n  var parsedEffects = {};\n  PARALLAX_EFFECTS.forEach(function (key) {\n    var defaultValue = MAP_EFFECT_TO_DEFAULT_UNIT[key]; // If the provided type is a number, this must be the speed prop\n    // in which case we need to construct the proper translate config\n\n    if (typeof (props == null ? void 0 : props[key]) === 'number') {\n      var value = props == null ? void 0 : props[key];\n      var startSpeed = (value || 0) * 10 + \"px\";\n      var endSpeed = (value || 0) * -10 + \"px\";\n      var startParsed = parseValueAndUnit(startSpeed);\n      var endParsed = parseValueAndUnit(endSpeed);\n      var speedConfig = {\n        start: startParsed.value,\n        end: endParsed.value,\n        unit: startParsed.unit\n      }; // Manually set translate y value\n\n      if (scrollAxis === ScrollAxis.vertical) {\n        parsedEffects.translateY = speedConfig;\n      } // Manually set translate y value\n\n\n      if (scrollAxis === ScrollAxis.horizontal) {\n        parsedEffects.translateX = speedConfig;\n      }\n    } // The rest are standard effect being parsed\n\n\n    if (Array.isArray(props == null ? void 0 : props[key])) {\n      var _value = props == null ? void 0 : props[key];\n\n      if (typeof _value[0] !== 'undefined' && typeof _value[1] !== 'undefined') {\n        var _startParsed = parseValueAndUnit(_value == null ? void 0 : _value[0], defaultValue);\n\n        var _endParsed = parseValueAndUnit(_value == null ? void 0 : _value[1], defaultValue);\n\n        var easing = createEasingFunction(_value == null ? void 0 : _value[2]);\n        parsedEffects[key] = {\n          start: _startParsed.value,\n          end: _endParsed.value,\n          unit: _startParsed.unit,\n          easing: easing\n        };\n\n        if (_startParsed.unit !== _endParsed.unit) {\n          throw new Error('Must provide matching units for the min and max offset values of each axis.');\n        }\n      }\n    }\n  });\n  return parsedEffects;\n}\n\n/**\r\n * Returns the percent (0 - 100) moved based on position in the viewport\r\n */\nfunction getProgressAmount(\n/*\r\n * The start value from cache\r\n */\nstart,\n/*\r\n * total dist the element has to move to be 100% complete (view width/height + element width/height)\r\n */\ntotalDist,\n/*\r\n * Current scroll value\r\n */\ncurrentScroll,\n/*\r\n * an optional easing function to apply\r\n */\neasing) {\n  // adjust cached value\n  var startAdjustedScroll = currentScroll - start; // Amount the element has moved based on current and total distance to move\n\n  var amount = startAdjustedScroll / totalDist; // Apply bezier easing if provided\n\n  if (easing) {\n    amount = easing(amount);\n  }\n\n  return amount;\n}\n\n/**\r\n * Takes two values (start, end) and returns whether the current scroll is within range\r\n * @param {number} start - start of scroll (x/y)\r\n * @param {number} end - end of scroll (x/y)\r\n * @param {number} scroll - current scroll (x/y)\r\n * @return {boolean} isInView\r\n */\nfunction isElementInView(start, end, scroll) {\n  var isInView = scroll >= start && scroll <= end;\n  return isInView;\n}\n\n// Scale between AKA normalize\nfunction scaleBetween(value, newMin, newMax, oldMin, oldMax) {\n  return (newMax - newMin) * (value - oldMin) / (oldMax - oldMin) + newMin;\n}\n\n/**\r\n * Scales a start and end value of an effect based on percent moved and easing function\r\n */\n\nfunction scaleEffectByProgress(effect, progress) {\n  var value = scaleBetween(typeof effect.easing === 'function' ? effect.easing(progress) : progress, (effect == null ? void 0 : effect.start) || 0, (effect == null ? void 0 : effect.end) || 0, 0, 1);\n  return {\n    value: value,\n    unit: effect == null ? void 0 : effect.unit\n  };\n}\n\nvar TRANSFORM_EFFECTS = /*#__PURE__*/Object.values(ValidCSSEffects).filter(function (v) {\n  return v !== 'opacity';\n});\nfunction setWillChangeStyles(el, effects) {\n  var keys = Object.keys(effects);\n  var hasOpacity = keys.includes('opacity');\n  var willChange = \"transform\" + (hasOpacity ? ',opacity' : '');\n  el.style.willChange = willChange;\n}\nfunction setElementStyles(effects, progress, el) {\n  if (!el) return;\n  var transform = getTransformStyles(effects, progress);\n  var opacity = getOpacityStyles(effects, progress);\n  el.style.transform = transform;\n  el.style.opacity = opacity;\n}\nfunction getOpacityStyles(effects, progress) {\n  var scaledOpacity = effects['opacity'] && scaleEffectByProgress(effects['opacity'], progress);\n\n  if (typeof scaledOpacity === 'undefined' || typeof scaledOpacity.value === 'undefined' || typeof scaledOpacity.unit === 'undefined') {\n    return '';\n  }\n\n  var styleStr = \"\" + scaledOpacity.value;\n  return styleStr;\n}\nfunction getTransformStyles(effects, progress) {\n  var transform = TRANSFORM_EFFECTS.reduce(function (acc, key) {\n    var scaledEffect = // @ts-expect-error\n    effects[key] && scaleEffectByProgress(effects[key], progress);\n\n    if (typeof scaledEffect === 'undefined' || typeof scaledEffect.value === 'undefined' || typeof scaledEffect.unit === 'undefined') {\n      return acc;\n    }\n\n    var styleStr = key + \"(\" + scaledEffect.value + scaledEffect.unit + \")\";\n    return acc + styleStr;\n  }, '');\n  return transform;\n}\n/**\r\n * Takes a parallax element and removes parallax offset styles.\r\n * @param {object} element\r\n */\n\nfunction resetStyles(element) {\n  var el = element.el;\n  if (!el) return;\n  el.style.transform = '';\n  el.style.opacity = '';\n}\n\nfunction createLimitsForRelativeElements(rect, view, scroll, shouldAlwaysCompleteAnimation) {\n  var startY = rect.top - view.height;\n  var startX = rect.left - view.width;\n  var endY = rect.bottom;\n  var endX = rect.right; // add scroll\n\n  startX += scroll.x;\n  endX += scroll.x;\n  startY += scroll.y;\n  endY += scroll.y;\n\n  if (shouldAlwaysCompleteAnimation) {\n    if (scroll.y + rect.top < view.height) {\n      startY = 0;\n    }\n\n    if (scroll.x + rect.left < view.width) {\n      startX = 0;\n    }\n\n    if (endY > view.scrollHeight - view.height) {\n      endY = view.scrollHeight - view.height;\n    }\n\n    if (endX > view.scrollWidth - view.width) {\n      endX = view.scrollWidth - view.width;\n    }\n  }\n\n  var limits = new Limits({\n    startX: startX,\n    startY: startY,\n    endX: endX,\n    endY: endY\n  });\n  return limits;\n}\n\nfunction getTranslateScalar(startTranslatePx, endTranslatePx, totalDist) {\n  var slow = endTranslatePx > startTranslatePx; // calculating necessary scale to increase translations\n\n  var totalAbsOff = (Math.abs(startTranslatePx) + Math.abs(endTranslatePx)) * (slow ? -1 : 1);\n  var totalDistTrue = totalDist + totalAbsOff; // Determine multiple to scale by, only values greater than 1\n\n  var scale = Math.max(totalDist / totalDistTrue, 1);\n  return scale;\n}\n\n/**\r\n * Return the start and end pixel values for an elements translations\r\n */\nfunction getStartEndValueInPx(translate, elementSize) {\n  var start = translate.start,\n      end = translate.end,\n      unit = translate.unit;\n\n  if (unit === '%') {\n    var scale = elementSize / 100;\n    start = start * scale;\n    end = end * scale;\n  }\n\n  if (unit === 'vw') {\n    var startScale = start / 100;\n    var endScale = end / 100;\n    start = window.innerWidth * startScale;\n    end = window.innerWidth * endScale;\n  }\n\n  if (unit === 'vh') {\n    var _startScale = start / 100;\n\n    var _endScale = end / 100;\n\n    start = window.innerHeight * _startScale;\n    end = window.innerHeight * _endScale;\n  }\n\n  return {\n    start: start,\n    end: end\n  };\n}\n\nvar DEFAULT_VALUE = {\n  start: 0,\n  end: 0,\n  unit: ''\n};\nfunction createLimitsWithTranslationsForRelativeElements(rect, view, effects, scroll, scrollAxis, shouldAlwaysCompleteAnimation) {\n  // get start and end accounting for percent effects\n  var translateX = effects.translateX || DEFAULT_VALUE;\n  var translateY = effects.translateY || DEFAULT_VALUE;\n\n  var _getStartEndValueInPx = getStartEndValueInPx(translateX, rect.width),\n      startTranslateXPx = _getStartEndValueInPx.start,\n      endTranslateXPx = _getStartEndValueInPx.end;\n\n  var _getStartEndValueInPx2 = getStartEndValueInPx(translateY, rect.height),\n      startTranslateYPx = _getStartEndValueInPx2.start,\n      endTranslateYPx = _getStartEndValueInPx2.end; // default starting values\n\n\n  var startY = rect.top - view.height;\n  var startX = rect.left - view.width;\n  var endY = rect.bottom;\n  var endX = rect.right;\n  var startMultiplierY = 1;\n  var endMultiplierY = 1;\n\n  if (scrollAxis === ScrollAxis.vertical) {\n    startMultiplierY = getTranslateScalar(startTranslateYPx, endTranslateYPx, view.height + rect.height);\n    endMultiplierY = startMultiplierY;\n  }\n\n  var startMultiplierX = 1;\n  var endMultiplierX = 1;\n\n  if (scrollAxis === ScrollAxis.horizontal) {\n    startMultiplierX = getTranslateScalar(startTranslateXPx, endTranslateXPx, view.width + rect.width);\n    endMultiplierX = startMultiplierX;\n  } // Apply the scale to initial values\n\n\n  if (startTranslateYPx < 0) {\n    startY = startY + startTranslateYPx * startMultiplierY;\n  }\n\n  if (endTranslateYPx > 0) {\n    endY = endY + endTranslateYPx * endMultiplierY;\n  }\n\n  if (startTranslateXPx < 0) {\n    startX = startX + startTranslateXPx * startMultiplierX;\n  }\n\n  if (endTranslateXPx > 0) {\n    endX = endX + endTranslateXPx * endMultiplierX;\n  } // add scroll\n\n\n  startX += scroll.x;\n  endX += scroll.x;\n  startY += scroll.y;\n  endY += scroll.y; // NOTE: please refactor and isolate this :(\n\n  if (shouldAlwaysCompleteAnimation) {\n    var topBeginsInView = scroll.y + rect.top < view.height;\n    var leftBeginsInView = scroll.x + rect.left < view.width;\n    var bottomEndsInView = scroll.y + rect.bottom > view.scrollHeight - view.height;\n    var rightEndsInView = scroll.x + rect.right > view.scrollWidth - view.height;\n\n    if (topBeginsInView && bottomEndsInView) {\n      startMultiplierY = 1;\n      endMultiplierY = 1;\n      startY = 0;\n      endY = view.scrollHeight - view.height;\n    }\n\n    if (leftBeginsInView && rightEndsInView) {\n      startMultiplierX = 1;\n      endMultiplierX = 1;\n      startX = 0;\n      endX = view.scrollWidth - view.width;\n    }\n\n    if (!topBeginsInView && bottomEndsInView) {\n      startY = rect.top - view.height + scroll.y;\n      endY = view.scrollHeight - view.height;\n      var totalDist = endY - startY;\n      startMultiplierY = getTranslateScalar(startTranslateYPx, endTranslateYPx, totalDist);\n      endMultiplierY = 1;\n\n      if (startTranslateYPx < 0) {\n        startY = startY + startTranslateYPx * startMultiplierY;\n      }\n    }\n\n    if (!leftBeginsInView && rightEndsInView) {\n      startX = rect.left - view.width + scroll.x;\n      endX = view.scrollWidth - view.width;\n\n      var _totalDist = endX - startX;\n\n      startMultiplierX = getTranslateScalar(startTranslateXPx, endTranslateXPx, _totalDist);\n      endMultiplierX = 1;\n\n      if (startTranslateXPx < 0) {\n        startX = startX + startTranslateXPx * startMultiplierX;\n      }\n    }\n\n    if (topBeginsInView && !bottomEndsInView) {\n      startY = 0;\n      endY = rect.bottom + scroll.y;\n\n      var _totalDist2 = endY - startY;\n\n      startMultiplierY = 1;\n      endMultiplierY = getTranslateScalar(startTranslateYPx, endTranslateYPx, _totalDist2);\n\n      if (endTranslateYPx > 0) {\n        endY = endY + endTranslateYPx * endMultiplierY;\n      }\n    }\n\n    if (leftBeginsInView && !rightEndsInView) {\n      startX = 0;\n      endX = rect.right + scroll.x;\n\n      var _totalDist3 = endX - startX;\n\n      startMultiplierX = 1;\n      endMultiplierX = getTranslateScalar(startTranslateXPx, endTranslateXPx, _totalDist3);\n\n      if (endTranslateXPx > 0) {\n        endX = endX + endTranslateXPx * endMultiplierX;\n      }\n    }\n  }\n\n  var limits = new Limits({\n    startX: startX,\n    startY: startY,\n    endX: endX,\n    endY: endY,\n    startMultiplierX: startMultiplierX,\n    endMultiplierX: endMultiplierX,\n    startMultiplierY: startMultiplierY,\n    endMultiplierY: endMultiplierY\n  });\n  return limits;\n}\n\nfunction scaleTranslateEffectsForSlowerScroll(effects, limits) {\n  var effectsCopy = _extends({}, effects);\n\n  if (effectsCopy.translateX) {\n    effectsCopy.translateX = _extends({}, effects.translateX, {\n      start: effectsCopy.translateX.start * limits.startMultiplierX,\n      end: effectsCopy.translateX.end * limits.endMultiplierX\n    });\n  }\n\n  if (effectsCopy.translateY) {\n    effectsCopy.translateY = _extends({}, effects.translateY, {\n      start: effectsCopy.translateY.start * limits.startMultiplierY,\n      end: effectsCopy.translateY.end * limits.endMultiplierY\n    });\n  }\n\n  return effectsCopy;\n}\n\nfunction getShouldScaleTranslateEffects(props, effects, scrollAxis) {\n  if (props.rootMargin || props.targetElement || props.shouldDisableScalingTranslations) {\n    return false;\n  }\n\n  if (!!effects.translateX && scrollAxis === ScrollAxis.horizontal || !!effects.translateY && scrollAxis === ScrollAxis.vertical) {\n    return true;\n  }\n\n  return false;\n}\n\nvar clamp = function clamp(num, min, max) {\n  return Math.min(Math.max(num, min), max);\n};\n\nvar Element = /*#__PURE__*/function () {\n  function Element(options) {\n    this.el = options.el;\n    this.props = options.props;\n    this.scrollAxis = options.scrollAxis;\n    this.disabledParallaxController = options.disabledParallaxController || false;\n    this.id = createId();\n    this.effects = parseElementTransitionEffects(this.props, this.scrollAxis);\n    this.isInView = null;\n    this.progress = 0;\n\n    this._setElementEasing(options.props.easing);\n\n    setWillChangeStyles(options.el, this.effects);\n  }\n\n  var _proto = Element.prototype;\n\n  _proto.updateProps = function updateProps(nextProps) {\n    this.props = _extends({}, this.props, nextProps);\n    this.effects = parseElementTransitionEffects(nextProps, this.scrollAxis);\n\n    this._setElementEasing(nextProps.easing);\n\n    return this;\n  };\n\n  _proto.setCachedAttributes = function setCachedAttributes(view, scroll) {\n    // NOTE: Must reset styles before getting the rect, as it might impact the natural position\n    resetStyles(this);\n    this.rect = new Rect({\n      el: this.props.targetElement || this.el,\n      rootMargin: this.props.rootMargin,\n      view: view\n    });\n    var shouldScaleTranslateEffects = getShouldScaleTranslateEffects(this.props, this.effects, this.scrollAxis);\n\n    if (typeof this.props.startScroll === 'number' && typeof this.props.endScroll === 'number') {\n      this.limits = new Limits({\n        startX: this.props.startScroll,\n        startY: this.props.startScroll,\n        endX: this.props.endScroll,\n        endY: this.props.endScroll\n      }); // Undo the reset -- place it back at current position with styles\n\n      this._setElementStyles();\n\n      return this;\n    }\n\n    if (shouldScaleTranslateEffects) {\n      this.limits = createLimitsWithTranslationsForRelativeElements(this.rect, view, this.effects, scroll, this.scrollAxis, this.props.shouldAlwaysCompleteAnimation);\n      this.scaledEffects = scaleTranslateEffectsForSlowerScroll(this.effects, this.limits);\n    } else {\n      this.limits = createLimitsForRelativeElements(this.rect, view, scroll, this.props.shouldAlwaysCompleteAnimation);\n    } // Undo the reset -- place it back at current position with styles\n\n\n    this._setElementStyles();\n\n    return this;\n  };\n\n  _proto._updateElementIsInView = function _updateElementIsInView(nextIsInView) {\n    // NOTE: Check if this is the first change to make sure onExit isn't called\n    var isFirstChange = this.isInView === null;\n\n    if (nextIsInView !== this.isInView) {\n      if (nextIsInView) {\n        this.props.onEnter && this.props.onEnter(this);\n      } else if (!isFirstChange) {\n        this._setFinalProgress();\n\n        this._setElementStyles();\n\n        this.props.onExit && this.props.onExit(this);\n      }\n    }\n\n    this.isInView = nextIsInView;\n  };\n\n  _proto._setFinalProgress = function _setFinalProgress() {\n    var finalProgress = clamp(Math.round(this.progress), 0, 1);\n\n    this._updateElementProgress(finalProgress);\n  };\n\n  _proto._setElementStyles = function _setElementStyles() {\n    if (this.props.disabled || this.disabledParallaxController) return;\n    var effects = this.scaledEffects || this.effects;\n    setElementStyles(effects, this.progress, this.el);\n  };\n\n  _proto._updateElementProgress = function _updateElementProgress(nextProgress) {\n    this.progress = nextProgress;\n    this.props.onProgressChange && this.props.onProgressChange(this.progress);\n    this.props.onChange && this.props.onChange(this);\n  };\n\n  _proto._setElementEasing = function _setElementEasing(easing) {\n    this.easing = createEasingFunction(easing);\n  };\n\n  _proto.updateElementOptions = function updateElementOptions(options) {\n    this.scrollAxis = options.scrollAxis;\n    this.disabledParallaxController = options.disabledParallaxController || false;\n  };\n\n  _proto.updatePosition = function updatePosition(scroll) {\n    if (!this.limits) return this;\n    var isVertical = this.scrollAxis === ScrollAxis.vertical;\n    var isFirstChange = this.isInView === null; // based on scroll axis\n\n    var start = isVertical ? this.limits.startY : this.limits.startX;\n    var end = isVertical ? this.limits.endY : this.limits.endX;\n    var total = isVertical ? this.limits.totalY : this.limits.totalX;\n    var s = isVertical ? scroll.y : scroll.x; // check if in view\n\n    var nextIsInView = isElementInView(start, end, s);\n\n    this._updateElementIsInView(nextIsInView); // set the progress if in view or this is the first change\n\n\n    if (nextIsInView) {\n      var nextProgress = getProgressAmount(start, total, s, this.easing);\n\n      this._updateElementProgress(nextProgress);\n\n      this._setElementStyles();\n    } else if (isFirstChange) {\n      // NOTE: this._updateElementProgress -- dont use this because it will trigger onChange\n      this.progress = clamp(Math.round(getProgressAmount(start, total, s, this.easing)), 0, 1);\n\n      this._setElementStyles();\n    }\n\n    return this;\n  };\n\n  return Element;\n}();\n\nvar View = /*#__PURE__*/function () {\n  function View(config) {\n    this.scrollContainer = config.scrollContainer;\n    this.width = config.width;\n    this.height = config.height;\n    this.scrollHeight = config.scrollHeight;\n    this.scrollWidth = config.scrollWidth;\n  }\n\n  var _proto = View.prototype;\n\n  _proto.hasChanged = function hasChanged(params) {\n    if (params.width !== this.width || params.height !== this.height || params.scrollWidth !== this.scrollWidth || params.scrollHeight !== this.scrollHeight) {\n      return true;\n    }\n\n    return false;\n  };\n\n  _proto.setSize = function setSize(params) {\n    this.width = params.width;\n    this.height = params.height;\n    this.scrollHeight = params.scrollHeight;\n    this.scrollWidth = params.scrollWidth;\n    return this;\n  };\n\n  return View;\n}();\n\nvar Scroll = /*#__PURE__*/function () {\n  function Scroll(x, y) {\n    this.x = x;\n    this.y = y;\n    this.dx = 0;\n    this.dy = 0;\n  }\n\n  var _proto = Scroll.prototype;\n\n  _proto.setScroll = function setScroll(x, y) {\n    this.dx = x - this.x;\n    this.dy = y - this.y;\n    this.x = x;\n    this.y = y;\n    return this;\n  };\n\n  return Scroll;\n}();\n\nfunction testForPassiveScroll() {\n  var supportsPassiveOption = false;\n\n  try {\n    var opts = Object.defineProperty({}, 'passive', {\n      get: function get() {\n        supportsPassiveOption = true;\n        return true;\n      }\n    }); // @ts-expect-error\n\n    window.addEventListener('test', null, opts); // @ts-expect-error\n\n    window.removeEventListener('test', null, opts);\n  } catch (e) {}\n\n  return supportsPassiveOption;\n}\n\n/**\r\n * -------------------------------------------------------\r\n * Parallax Controller\r\n * -------------------------------------------------------\r\n *\r\n * The global controller for setting up and managing a scroll view of elements.\r\n *\r\n */\n\nvar ParallaxController = /*#__PURE__*/function () {\n  function ParallaxController(_ref) {\n    var _ref$scrollAxis = _ref.scrollAxis,\n        scrollAxis = _ref$scrollAxis === void 0 ? ScrollAxis.vertical : _ref$scrollAxis,\n        scrollContainer = _ref.scrollContainer,\n        _ref$disabled = _ref.disabled,\n        disabled = _ref$disabled === void 0 ? false : _ref$disabled;\n    this.disabled = disabled;\n    this.scrollAxis = scrollAxis; // All parallax elements to be updated\n\n    this.elements = [];\n    this._hasScrollContainer = !!scrollContainer;\n    this.viewEl = scrollContainer != null ? scrollContainer : window; // Scroll and View\n\n    var _this$_getScrollPosit = this._getScrollPosition(),\n        x = _this$_getScrollPosit[0],\n        y = _this$_getScrollPosit[1];\n\n    this.scroll = new Scroll(x, y);\n    this.view = new View({\n      width: 0,\n      height: 0,\n      scrollWidth: 0,\n      scrollHeight: 0,\n      scrollContainer: this._hasScrollContainer ? scrollContainer : undefined\n    }); // Ticking\n\n    this._ticking = false; // Passive support\n\n    this._supportsPassive = testForPassiveScroll(); // Bind methods to class\n\n    this._bindAllMethods(); // If this is initialized disabled, don't do anything below.\n\n\n    if (this.disabled) return;\n\n    this._addListeners(this.viewEl);\n\n    this._addResizeObserver();\n\n    this._setViewSize();\n  }\n  /**\r\n   * Static method to instantiate the ParallaxController.\r\n   * @returns {Class} ParallaxController\r\n   */\n\n\n  ParallaxController.init = function init(options) {\n    var hasWindow = typeof window !== 'undefined';\n\n    if (!hasWindow) {\n      throw new Error('Looks like ParallaxController.init() was called on the server. This method must be called on the client.');\n    }\n\n    return new ParallaxController(options);\n  };\n\n  var _proto = ParallaxController.prototype;\n\n  _proto._bindAllMethods = function _bindAllMethods() {\n    var _this = this;\n\n    ['_addListeners', '_removeListeners', '_getScrollPosition', '_handleScroll', '_handleUpdateCache', '_updateAllElements', '_updateElementPosition', '_setViewSize', '_addResizeObserver', '_checkIfViewHasChanged', '_getViewParams', 'getElements', 'createElement', 'removeElementById', 'resetElementStyles', 'updateElementPropsById', 'update', 'updateScrollContainer', 'destroy'].forEach(function (method) {\n      // @ts-expect-error\n      _this[method] = _this[method].bind(_this);\n    });\n  };\n\n  _proto._addListeners = function _addListeners(el) {\n    el.addEventListener('scroll', this._handleScroll, this._supportsPassive ? {\n      passive: true\n    } : false);\n    window.addEventListener('resize', this._handleUpdateCache, false);\n    window.addEventListener('blur', this._handleUpdateCache, false);\n    window.addEventListener('focus', this._handleUpdateCache, false);\n    window.addEventListener('load', this._handleUpdateCache, false);\n  };\n\n  _proto._removeListeners = function _removeListeners(el) {\n    var _this$_resizeObserver;\n\n    el.removeEventListener('scroll', this._handleScroll, false);\n    window.removeEventListener('resize', this._handleUpdateCache, false);\n    window.removeEventListener('blur', this._handleUpdateCache, false);\n    window.removeEventListener('focus', this._handleUpdateCache, false);\n    window.removeEventListener('load', this._handleUpdateCache, false);\n    (_this$_resizeObserver = this._resizeObserver) == null ? void 0 : _this$_resizeObserver.disconnect();\n  };\n\n  _proto._addResizeObserver = function _addResizeObserver() {\n    var _this2 = this;\n\n    try {\n      var observedEl = this._hasScrollContainer ? this.viewEl : document.documentElement;\n      this._resizeObserver = new ResizeObserver(function () {\n        return _this2.update();\n      });\n\n      this._resizeObserver.observe(observedEl);\n    } catch (e) {\n      console.warn('Failed to create the resize observer in the ParallaxContoller');\n    }\n  };\n\n  _proto._getScrollPosition = function _getScrollPosition() {\n    // Save current scroll\n    // Supports IE 9 and up.\n    var nx = this._hasScrollContainer ? // @ts-expect-error\n    this.viewEl.scrollLeft : window.pageXOffset;\n    var ny = this._hasScrollContainer ? // @ts-expect-error\n    this.viewEl.scrollTop : window.pageYOffset;\n    return [nx, ny];\n  }\n  /**\r\n   * Window scroll handler sets scroll position\r\n   * and then calls '_updateAllElements()'.\r\n   */\n  ;\n\n  _proto._handleScroll = function _handleScroll() {\n    var _this$elements;\n\n    var _this$_getScrollPosit2 = this._getScrollPosition(),\n        nx = _this$_getScrollPosit2[0],\n        ny = _this$_getScrollPosit2[1];\n\n    this.scroll.setScroll(nx, ny); // Only called if the last animation request has been\n    // completed and there are parallax elements to update\n\n    if (!this._ticking && ((_this$elements = this.elements) == null ? void 0 : _this$elements.length) > 0) {\n      this._ticking = true; // @ts-ignore\n\n      window.requestAnimationFrame(this._updateAllElements);\n    }\n  }\n  /**\r\n   * Window resize handler. Sets the new window inner height\r\n   * then updates parallax element attributes and positions.\r\n   */\n  ;\n\n  _proto._handleUpdateCache = function _handleUpdateCache() {\n    this._setViewSize();\n\n    this._updateAllElements({\n      updateCache: true\n    });\n  }\n  /**\r\n   * Update element positions.\r\n   * Determines if the element is in view based on the cached\r\n   * attributes, if so set the elements parallax styles.\r\n   */\n  ;\n\n  _proto._updateAllElements = function _updateAllElements(_temp) {\n    var _this3 = this;\n\n    var _ref2 = _temp === void 0 ? {} : _temp,\n        updateCache = _ref2.updateCache;\n\n    if (this.elements) {\n      this.elements.forEach(function (element) {\n        if (updateCache) {\n          element.setCachedAttributes(_this3.view, _this3.scroll);\n        }\n\n        _this3._updateElementPosition(element);\n      });\n    } // reset ticking so more animations can be called\n\n\n    this._ticking = false;\n  }\n  /**\r\n   * Update element positions.\r\n   * Determines if the element is in view based on the cached\r\n   * attributes, if so set the elements parallax styles.\r\n   */\n  ;\n\n  _proto._updateElementPosition = function _updateElementPosition(element) {\n    if (element.props.disabled || this.disabled) return;\n    element.updatePosition(this.scroll);\n  }\n  /**\r\n   * Gets the params to set in the View from the scroll container or the window\r\n   */\n  ;\n\n  _proto._getViewParams = function _getViewParams() {\n    if (this._hasScrollContainer) {\n      // @ts-expect-error\n      var _width = this.viewEl.offsetWidth; // @ts-expect-error\n\n      var _height = this.viewEl.offsetHeight; // @ts-expect-error\n\n      var _scrollHeight = this.viewEl.scrollHeight; // @ts-expect-error\n\n      var _scrollWidth = this.viewEl.scrollWidth;\n      return this.view.setSize({\n        width: _width,\n        height: _height,\n        scrollHeight: _scrollHeight,\n        scrollWidth: _scrollWidth\n      });\n    }\n\n    var html = document.documentElement;\n    var width = window.innerWidth || html.clientWidth;\n    var height = window.innerHeight || html.clientHeight;\n    var scrollHeight = html.scrollHeight;\n    var scrollWidth = html.scrollWidth;\n    return {\n      width: width,\n      height: height,\n      scrollHeight: scrollHeight,\n      scrollWidth: scrollWidth\n    };\n  }\n  /**\r\n   * Cache the view attributes\r\n   */\n  ;\n\n  _proto._setViewSize = function _setViewSize() {\n    return this.view.setSize(this._getViewParams());\n  }\n  /**\r\n   * Checks if any of the cached attributes of the view have changed.\r\n   * @returns boolean\r\n   */\n  ;\n\n  _proto._checkIfViewHasChanged = function _checkIfViewHasChanged() {\n    return this.view.hasChanged(this._getViewParams());\n  }\n  /**\r\n   * -------------------------------------------------------\r\n   * Public methods\r\n   * -------------------------------------------------------\r\n   */\n\n  /**\r\n   * Returns all the parallax elements in the controller\r\n   */\n  ;\n\n  _proto.getElements = function getElements() {\n    return this.elements;\n  }\n  /**\r\n   * Creates and returns new parallax element with provided options to be managed by the controller.\r\n   */\n  ;\n\n  _proto.createElement = function createElement(options) {\n    var newElement = new Element(_extends({}, options, {\n      scrollAxis: this.scrollAxis,\n      disabledParallaxController: this.disabled\n    }));\n    newElement.setCachedAttributes(this.view, this.scroll);\n    this.elements = this.elements ? [].concat(this.elements, [newElement]) : [newElement];\n\n    this._updateElementPosition(newElement); // NOTE: This checks if the view has changed then update the controller and all elements if it has\n    // This shouldn't always be necessary with a resize observer watching the view element\n    // but there seems to be cases where the resize observer does not catch and update.\n\n\n    if (this._checkIfViewHasChanged()) {\n      this.update();\n    }\n\n    return newElement;\n  }\n  /**\r\n   * Remove an element by id\r\n   */\n  ;\n\n  _proto.removeElementById = function removeElementById(id) {\n    if (!this.elements) return;\n    this.elements = this.elements.filter(function (el) {\n      return el.id !== id;\n    });\n  }\n  /**\r\n   * Updates an existing parallax element object with new options.\r\n   */\n  ;\n\n  _proto.updateElementPropsById = function updateElementPropsById(id, props) {\n    if (this.elements) {\n      this.elements = this.elements.map(function (el) {\n        if (el.id === id) {\n          return el.updateProps(props);\n        }\n\n        return el;\n      });\n    }\n\n    this.update();\n  }\n  /**\r\n   * Remove a target elements parallax styles\r\n   */\n  ;\n\n  _proto.resetElementStyles = function resetElementStyles(element) {\n    resetStyles(element);\n  }\n  /**\r\n   * Updates all cached attributes on parallax elements.\r\n   */\n  ;\n\n  _proto.update = function update() {\n    // Save the latest scroll position because window.scroll\n    // may be called and the handle scroll event may not be called.\n    var _this$_getScrollPosit3 = this._getScrollPosition(),\n        nx = _this$_getScrollPosit3[0],\n        ny = _this$_getScrollPosit3[1];\n\n    this.scroll.setScroll(nx, ny);\n\n    this._setViewSize();\n\n    this._updateAllElements({\n      updateCache: true\n    });\n  }\n  /**\r\n   * Updates the scroll container of the parallax controller\r\n   */\n  ;\n\n  _proto.updateScrollContainer = function updateScrollContainer(el) {\n    // remove existing listeners with current el first\n    this._removeListeners(this.viewEl);\n\n    this.viewEl = el;\n    this._hasScrollContainer = !!el;\n    this.view = new View({\n      width: 0,\n      height: 0,\n      scrollWidth: 0,\n      scrollHeight: 0,\n      scrollContainer: el\n    });\n\n    this._setViewSize();\n\n    this._addListeners(this.viewEl);\n\n    this._updateAllElements({\n      updateCache: true\n    });\n  };\n\n  _proto.disableParallaxController = function disableParallaxController() {\n    this.disabled = true; // remove listeners\n\n    this._removeListeners(this.viewEl); // reset all styles\n\n\n    if (this.elements) {\n      this.elements.forEach(function (element) {\n        return resetStyles(element);\n      });\n    }\n  };\n\n  _proto.enableParallaxController = function enableParallaxController() {\n    var _this4 = this;\n\n    this.disabled = false;\n\n    if (this.elements) {\n      this.elements.forEach(function (element) {\n        return element.updateElementOptions({\n          disabledParallaxController: false,\n          scrollAxis: _this4.scrollAxis\n        });\n      });\n    } // add back listeners\n\n\n    this._addListeners(this.viewEl);\n\n    this._addResizeObserver();\n\n    this._setViewSize();\n  }\n  /**\r\n   * Disable all parallax elements\r\n   */\n  ;\n\n  _proto.disableAllElements = function disableAllElements() {\n    console.warn('deprecated: use disableParallaxController() instead');\n\n    if (this.elements) {\n      this.elements = this.elements.map(function (el) {\n        return el.updateProps({\n          disabled: true\n        });\n      });\n    }\n\n    this.update();\n  }\n  /**\r\n   * Enable all parallax elements\r\n   */\n  ;\n\n  _proto.enableAllElements = function enableAllElements() {\n    console.warn('deprecated: use enableParallaxController() instead');\n\n    if (this.elements) {\n      this.elements = this.elements.map(function (el) {\n        return el.updateProps({\n          disabled: false\n        });\n      });\n    }\n\n    this.update();\n  }\n  /**\r\n   * Removes all listeners and resets all styles on managed elements.\r\n   */\n  ;\n\n  _proto.destroy = function destroy() {\n    this._removeListeners(this.viewEl);\n\n    if (this.elements) {\n      this.elements.forEach(function (element) {\n        return resetStyles(element);\n      });\n    } // @ts-expect-error\n\n\n    this.elements = undefined;\n  };\n\n  return ParallaxController;\n}();\n\nexport { EasingPreset, Element, Limits, ParallaxController, Rect, RotationUnits, ScaleUnits, Scroll, ScrollAxis, Units, ValidCSSEffects, View, createId, getProgressAmount, isElementInView, parseElementTransitionEffects, parseValueAndUnit, resetStyles, scaleBetween, scaleEffectByProgress, setElementStyles, testForPassiveScroll };\n//# sourceMappingURL=parallax-controller.esm.js.map\n","import { EasingPreset, ParallaxController, ScrollAxis, parseValueAndUnit } from \"parallax-controller\";\nimport React, { useContext, useEffect, useRef, useState } from \"react\";\n\n//#region src/utils/removeUndefinedObjectKeys.ts\nfunction removeUndefinedObjectKeys(obj) {\n\tObject.keys(obj).forEach((key) => obj[key] === void 0 && delete obj[key]);\n\treturn obj;\n}\n\n//#endregion\n//#region src/helpers/getIsolatedParallaxProps.ts\nfunction getIsolatedParallaxProps(props) {\n\tconst { disabled, easing, endScroll, onChange, onEnter, onExit, onProgressChange, opacity, rootMargin, rotate, rotateX, rotateY, rotateZ, scale, scaleX, scaleY, scaleZ, shouldAlwaysCompleteAnimation, shouldDisableScalingTranslations, speed, startScroll, targetElement, translateX, translateY,...rest } = props;\n\treturn {\n\t\tparallaxProps: removeUndefinedObjectKeys({\n\t\t\tdisabled,\n\t\t\teasing,\n\t\t\tendScroll,\n\t\t\tonChange,\n\t\t\tonEnter,\n\t\t\tonExit,\n\t\t\tonProgressChange,\n\t\t\topacity,\n\t\t\trootMargin,\n\t\t\trotate,\n\t\t\trotateX,\n\t\t\trotateY,\n\t\t\trotateZ,\n\t\t\tscale,\n\t\t\tscaleX,\n\t\t\tscaleY,\n\t\t\tscaleZ,\n\t\t\tshouldAlwaysCompleteAnimation,\n\t\t\tshouldDisableScalingTranslations,\n\t\t\tspeed,\n\t\t\tstartScroll,\n\t\t\ttargetElement,\n\t\t\ttranslateX,\n\t\t\ttranslateY\n\t\t}),\n\t\trest\n\t};\n}\n\n//#endregion\n//#region src/components/Parallax/hooks.ts\nfunction useVerifyController(controller) {\n\tuseEffect(() => {\n\t\tconst isServer = typeof window === \"undefined\";\n\t\tconst isInstance = controller instanceof ParallaxController;\n\t\tif (!isServer && !controller && !isInstance) throw new Error(\"Must wrap your application's <Parallax /> components in a <ParallaxProvider />.\");\n\t}, [controller]);\n}\n\n//#endregion\n//#region src/context/ParallaxContext.ts\nconst ParallaxContext = React.createContext(null);\n\n//#endregion\n//#region src/hooks/useParallaxController.ts\nfunction useParallaxController() {\n\tconst parallaxController = useContext(ParallaxContext);\n\tif (typeof window === \"undefined\") return null;\n\tif (!parallaxController) throw new Error(\"Could not find `react-scroll-parallax` context value. Please ensure the component is wrapped in a <ParallaxProvider>\");\n\treturn parallaxController;\n}\n\n//#endregion\n//#region src/hooks/useParallax.ts\nfunction useParallax(props) {\n\tconst controller = useParallaxController();\n\tconst ref = useRef(null);\n\tconst { parallaxProps } = getIsolatedParallaxProps(props);\n\tuseVerifyController(controller);\n\tconst [element, setElement] = useState();\n\tuseEffect(() => {\n\t\tlet newElement;\n\t\tif (ref.current instanceof HTMLElement) {\n\t\t\tconst options = {\n\t\t\t\tel: ref.current,\n\t\t\t\tprops: parallaxProps\n\t\t\t};\n\t\t\tnewElement = controller === null || controller === void 0 ? void 0 : controller.createElement(options);\n\t\t\tsetElement(newElement);\n\t\t} else throw new Error(\"You must assign the ref returned by the useParallax() hook to an HTML Element.\");\n\t\treturn () => {\n\t\t\tif (newElement) controller === null || controller === void 0 || controller.removeElementById(newElement.id);\n\t\t};\n\t}, []);\n\tuseEffect(() => {\n\t\tif (element) if (props.disabled) {\n\t\t\tcontroller === null || controller === void 0 || controller.resetElementStyles(element);\n\t\t\tcontroller === null || controller === void 0 || controller.updateElementPropsById(element.id, parallaxProps);\n\t\t} else controller === null || controller === void 0 || controller.updateElementPropsById(element.id, parallaxProps);\n\t}, [\n\t\tprops.disabled,\n\t\tprops.easing,\n\t\tprops.endScroll,\n\t\tprops.onChange,\n\t\tprops.onEnter,\n\t\tprops.onExit,\n\t\tprops.onProgressChange,\n\t\tprops.opacity,\n\t\tprops.rootMargin,\n\t\tprops.rotate,\n\t\tprops.rotateX,\n\t\tprops.rotateY,\n\t\tprops.rotateZ,\n\t\tprops.scale,\n\t\tprops.scaleX,\n\t\tprops.scaleY,\n\t\tprops.scaleZ,\n\t\tprops.shouldAlwaysCompleteAnimation,\n\t\tprops.shouldDisableScalingTranslations,\n\t\tprops.speed,\n\t\tprops.startScroll,\n\t\tprops.targetElement,\n\t\tprops.translateX,\n\t\tprops.translateY\n\t]);\n\treturn {\n\t\tref,\n\t\tcontroller,\n\t\telement\n\t};\n}\n\n//#endregion\n//#region src/components/Parallax/Parallax.tsx\nfunction Parallax(props) {\n\tconst { parallaxProps, rest } = getIsolatedParallaxProps(props);\n\tconst { ref } = useParallax(parallaxProps);\n\treturn /* @__PURE__ */ React.createElement(\"div\", {\n\t\tref,\n\t\t...rest\n\t}, props.children);\n}\n\n//#endregion\n//#region src/components/ParallaxBanner/helpers/getExpandedStyle.ts\nconst FALLBACK_RECT = { height: 0 };\nfunction getExpandedStyle(layer) {\n\tif (Array.isArray(layer.translateY)) {\n\t\tconst translateYStart = parseValueAndUnit(layer.translateY[0]);\n\t\tconst translateYEnd = parseValueAndUnit(layer.translateY[1]);\n\t\tif (translateYStart.unit === \"px\" && translateYEnd.unit === \"px\") return {\n\t\t\ttop: `${Math.abs(translateYEnd.value) * -1}px`,\n\t\t\tbottom: `${Math.abs(translateYStart.value) * -1}px`\n\t\t};\n\t\tif (translateYStart.unit === \"%\" && translateYEnd.unit === \"%\") {\n\t\t\tvar _layer$targetElement$, _layer$targetElement;\n\t\t\tconst clientRect = (_layer$targetElement$ = (_layer$targetElement = layer.targetElement) === null || _layer$targetElement === void 0 ? void 0 : _layer$targetElement.getBoundingClientRect()) !== null && _layer$targetElement$ !== void 0 ? _layer$targetElement$ : FALLBACK_RECT;\n\t\t\tconst top = Math.abs(clientRect.height * .01 * translateYEnd.value) * -1;\n\t\t\tconst bottom = Math.abs(clientRect.height * .01 * translateYStart.value) * -1;\n\t\t\treturn {\n\t\t\t\ttop: `${top}px`,\n\t\t\t\tbottom: `${bottom}px`\n\t\t\t};\n\t\t}\n\t}\n\tif (layer.speed) {\n\t\tconst speed = layer.speed || 0;\n\t\tconst absSpeed = Math.abs(speed) * 10 * -1;\n\t\treturn {\n\t\t\ttop: `${absSpeed}px`,\n\t\t\tbottom: `${absSpeed}px`\n\t\t};\n\t}\n\treturn {};\n}\n\n//#endregion\n//#region src/components/ParallaxBanner/helpers/getImageStyle.ts\nfunction getImageStyle(layer) {\n\treturn layer.image ? {\n\t\tbackgroundImage: `url(${layer.image})`,\n\t\tbackgroundPosition: \"center\",\n\t\tbackgroundSize: \"cover\"\n\t} : {};\n}\n\n//#endregion\n//#region src/components/ParallaxBanner/components/ParallaxBannerLayer.tsx\nconst absoluteStyle = {\n\tposition: \"absolute\",\n\ttop: 0,\n\tleft: 0,\n\tright: 0,\n\tbottom: 0\n};\nconst ParallaxBannerLayer = (props) => {\n\tconst { parallaxProps, rest } = getIsolatedParallaxProps(props);\n\tconst { children, disabled, style, expanded = true, image, testId,...divProps } = rest;\n\tconst imageStyle = getImageStyle(props);\n\tconst expandedStyle = expanded ? getExpandedStyle(props) : {};\n\tconst parallax = useParallax({\n\t\ttargetElement: props.targetElement,\n\t\tshouldDisableScalingTranslations: true,\n\t\t...parallaxProps\n\t});\n\treturn /* @__PURE__ */ React.createElement(\"div\", {\n\t\t\"data-testid\": testId,\n\t\tref: parallax.ref,\n\t\tstyle: {\n\t\t\t...imageStyle,\n\t\t\t...absoluteStyle,\n\t\t\t...expandedStyle,\n\t\t\t...style\n\t\t},\n\t\t...divProps\n\t}, rest.children);\n};\n\n//#endregion\n//#region src/components/ParallaxBanner/ParallaxBanner.tsx\nconst containerStyle = {\n\tposition: \"relative\",\n\toverflow: \"hidden\",\n\twidth: \"100%\"\n};\nconst ParallaxBanner = (props) => {\n\tconst [targetElement, setTargetElement] = useState(null);\n\tconst containerRef = useRef(null);\n\tuseEffect(() => {\n\t\tsetTargetElement(containerRef.current);\n\t}, []);\n\tconst { disabled: disableAllLayers, style: rootStyle, layers = [],...rootRest } = props;\n\tfunction renderLayers() {\n\t\tif (targetElement) {\n\t\t\tif (layers && layers.length > 0) return layers.map((layer, i) => /* @__PURE__ */ React.createElement(ParallaxBannerLayer, {\n\t\t\t\t...layer,\n\t\t\t\ttargetElement,\n\t\t\t\tkey: `layer-${i}`,\n\t\t\t\ttestId: `layer-${i}`\n\t\t\t}));\n\t\t}\n\t\treturn null;\n\t}\n\tfunction renderChildren() {\n\t\tif (targetElement) return React.Children.map(props.children, (child) => {\n\t\t\tconst item = child;\n\t\t\tif ((item === null || item === void 0 ? void 0 : item.type) === ParallaxBannerLayer) return React.cloneElement(item, { targetElement });\n\t\t\treturn child;\n\t\t});\n\t\treturn null;\n\t}\n\treturn /* @__PURE__ */ React.createElement(\"div\", {\n\t\tref: containerRef,\n\t\tstyle: {\n\t\t\t...containerStyle,\n\t\t\t...rootStyle\n\t\t},\n\t\t...rootRest\n\t}, renderLayers(), renderChildren());\n};\n\n//#endregion\n//#region src/components/ParallaxProvider/helpers.ts\nconst createController = (options) => {\n\tif (!(typeof window === \"undefined\")) return ParallaxController.init(options);\n\treturn null;\n};\n\n//#endregion\n//#region src/components/ParallaxProvider/ParallaxProvider.tsx\nfunction ParallaxProvider(props) {\n\tconst controller = useRef(null);\n\tif (!controller.current) controller.current = createController({\n\t\tscrollAxis: props.scrollAxis || ScrollAxis.vertical,\n\t\tscrollContainer: props.scrollContainer,\n\t\tdisabled: props.isDisabled\n\t});\n\tuseEffect(() => {\n\t\tif (props.scrollContainer && controller.current) controller.current.updateScrollContainer(props.scrollContainer);\n\t}, [props.scrollContainer]);\n\tuseEffect(() => {\n\t\tif (props.isDisabled && controller.current) controller.current.disableParallaxController();\n\t\tif (!props.isDisabled && controller.current) controller.current.enableParallaxController();\n\t}, [props.isDisabled]);\n\tuseEffect(() => {\n\t\treturn () => {\n\t\t\tvar _controller$current;\n\t\t\tcontroller === null || controller === void 0 || (_controller$current = controller.current) === null || _controller$current === void 0 || _controller$current.destroy();\n\t\t};\n\t}, []);\n\treturn /* @__PURE__ */ React.createElement(ParallaxContext.Provider, { value: controller.current }, props.children);\n}\n\n//#endregion\nexport { EasingPreset, Parallax, ParallaxBanner, ParallaxBannerLayer, ParallaxContext, ParallaxProvider, useParallax, useParallaxController };\n//# sourceMappingURL=index.mjs.map","import React, { useState, useRef } from 'react';\nimport { ArrowAnnotation as ArrowType, Position, ArrowPointsSnapshot } from '../../types';\n\ninterface ArrowAnnotationProps {\n  annotation: ArrowType;\n  isSelected: boolean;\n  isCurrentSubstep: boolean;\n  onSelect: () => void;\n  onUpdate: (updates: Partial<ArrowType>) => void;\n  onContextMenu: (e: React.MouseEvent) => void;\n  scale: { scaleX: number; scaleY: number };\n  editable?: boolean;\n}\n\nconst clonePosition = (pos: Position): Position => ({ x: pos.x, y: pos.y });\nconst cloneOptionalPosition = (pos?: Position): Position | undefined =>\n  pos ? { x: pos.x, y: pos.y } : undefined;\nconst positionsEqual = (a?: Position, b?: Position) => {\n  if (!a && !b) return true;\n  if (!a || !b) return false;\n  return a.x === b.x && a.y === b.y;\n};\ntype Snapshot = ArrowPointsSnapshot;\nconst snapshotsEqual = (a: Snapshot, b: Snapshot) =>\n  positionsEqual(a.startPosition, b.startPosition) &&\n  positionsEqual(a.endPosition, b.endPosition) &&\n  positionsEqual(a.controlPoint, b.controlPoint);\nconst createSnapshot = (start: Position, end: Position, control?: Position): Snapshot => ({\n  startPosition: clonePosition(start),\n  endPosition: clonePosition(end),\n  controlPoint: cloneOptionalPosition(control),\n});\n\nconst ArrowAnnotation: React.FC<ArrowAnnotationProps> = ({\n  annotation,\n  isSelected,\n  isCurrentSubstep,\n  onSelect,\n  onUpdate,\n  onContextMenu,\n  scale,\n  editable = true,\n}) => {\n  const [isDragging, setIsDragging] = useState<'start' | 'end' | 'line' | 'control' | null>(null);\n  const startPosRef = useRef({ x: 0, y: 0 });\n\n  // Local state for smooth dragging - initialized from props, updated only on mouseUp\n  const [tempStartPosition, setTempStartPosition] = useState<Position>(() => clonePosition(annotation.startPosition));\n  const [tempEndPosition, setTempEndPosition] = useState<Position>(() => clonePosition(annotation.endPosition));\n  const [tempControlPoint, setTempControlPoint] = useState<Position | undefined>(() =>\n    cloneOptionalPosition(annotation.controlPoint)\n  );\n\n  const latestStartRef = useRef<Position>(clonePosition(annotation.startPosition));\n  const latestEndRef = useRef<Position>(clonePosition(annotation.endPosition));\n  const latestControlRef = useRef<Position | undefined>(cloneOptionalPosition(annotation.controlPoint));\n\n  // Track the last update snapshot we sent to avoid premature resets\n  const lastSentUpdateRef = useRef<Snapshot | null>(null);\n\n  // Reset state when annotation ID changes (React reused the component for a different annotation)\n  const prevAnnotationIdRef = useRef(annotation.id);\n  React.useEffect(() => {\n    if (prevAnnotationIdRef.current !== annotation.id) {\n      const start = clonePosition(annotation.startPosition);\n      const end = clonePosition(annotation.endPosition);\n      const control = cloneOptionalPosition(annotation.controlPoint);\n      latestStartRef.current = start;\n      latestEndRef.current = end;\n      latestControlRef.current = control;\n      setTempStartPosition(start);\n      setTempEndPosition(end);\n      setTempControlPoint(control);\n      prevAnnotationIdRef.current = annotation.id;\n      lastSentUpdateRef.current = null;\n    }\n  }, [annotation.id, annotation.startPosition, annotation.endPosition, annotation.controlPoint]);\n\n  // Sync temp state from props when not dragging (e.g., after undo/redo or external updates)\n  // Only sync when props represent a different snapshot than our current temp state\n  React.useEffect(() => {\n    if (isDragging) return;\n\n    const annotationSnapshot =\n      annotation.pointsSnapshot ||\n      createSnapshot(annotation.startPosition, annotation.endPosition, annotation.controlPoint);\n\n    const tempSnapshot = {\n      startPosition: tempStartPosition,\n      endPosition: tempEndPosition,\n      controlPoint: tempControlPoint,\n    };\n\n    const pendingSnapshot = lastSentUpdateRef.current;\n    if (pendingSnapshot) {\n      if (snapshotsEqual(annotationSnapshot, pendingSnapshot)) {\n        lastSentUpdateRef.current = null;\n      } else {\n        // Still waiting for parent to commit this snapshot; keep local temp state\n        return;\n      }\n    }\n\n    if (!snapshotsEqual(annotationSnapshot, tempSnapshot)) {\n      const start = clonePosition(annotationSnapshot.startPosition);\n      const end = clonePosition(annotationSnapshot.endPosition);\n      const control = cloneOptionalPosition(annotationSnapshot.controlPoint);\n      latestStartRef.current = start;\n      latestEndRef.current = end;\n      latestControlRef.current = control;\n      setTempStartPosition(start);\n      setTempEndPosition(end);\n      setTempControlPoint(control);\n    }\n  }, [\n    annotation.pointsSnapshot,\n    annotation.startPosition.x,\n    annotation.startPosition.y,\n    annotation.endPosition.x,\n    annotation.endPosition.y,\n    annotation.controlPoint?.x,\n    annotation.controlPoint?.y,\n    isDragging,\n    tempStartPosition,\n    tempEndPosition,\n    tempControlPoint,\n  ]);\n\n  // Use temp values for rendering during editing\n  const currentStartPosition = tempStartPosition;\n  const currentEndPosition = tempEndPosition;\n  const currentControlPoint = tempControlPoint;\n\n  const displayColor = isCurrentSubstep ? annotation.color : '#b0b0b0';\n  const displayOpacity = isCurrentSubstep ? 1 : 0.6;\n\n  // Apply scale to positions for display\n  const scaledStartX = currentStartPosition.x * scale.scaleX;\n  const scaledStartY = currentStartPosition.y * scale.scaleY;\n  const scaledEndX = currentEndPosition.x * scale.scaleX;\n  const scaledEndY = currentEndPosition.y * scale.scaleY;\n  const scaledControlX = currentControlPoint ? currentControlPoint.x * scale.scaleX : undefined;\n  const scaledControlY = currentControlPoint ? currentControlPoint.y * scale.scaleY : undefined;\n\n  const handleMouseDown = (e: React.MouseEvent, type: 'start' | 'end' | 'line' | 'control') => {\n    if (!editable) return;\n    // Only start dragging on left click (button 0), not right click (button 2)\n    if (e.button !== 0) return;\n    e.stopPropagation();\n    e.preventDefault();\n    onSelect();\n\n    setIsDragging(type);\n    startPosRef.current = { x: e.clientX, y: e.clientY };\n  };\n\n  const handleMouseMove = (e: MouseEvent) => {\n    if (!isDragging) return;\n\n    const dx = e.clientX - startPosRef.current.x;\n    const dy = e.clientY - startPosRef.current.y;\n    if (dx === 0 && dy === 0) {\n      return;\n    }\n    startPosRef.current = { x: e.clientX, y: e.clientY };\n\n    // Apply inverse scale to store in original coordinate space\n    const dxScaled = dx / scale.scaleX;\n    const dyScaled = dy / scale.scaleY;\n\n    if (isDragging === 'line') {\n      const nextStart = {\n        x: latestStartRef.current.x + dxScaled,\n        y: latestStartRef.current.y + dyScaled,\n      };\n      const nextEnd = {\n        x: latestEndRef.current.x + dxScaled,\n        y: latestEndRef.current.y + dyScaled,\n      };\n      const nextControl = latestControlRef.current\n        ? {\n            x: latestControlRef.current.x + dxScaled,\n            y: latestControlRef.current.y + dyScaled,\n          }\n        : undefined;\n\n      latestStartRef.current = nextStart;\n      latestEndRef.current = nextEnd;\n      latestControlRef.current = nextControl;\n\n      setTempStartPosition(nextStart);\n      setTempEndPosition(nextEnd);\n      setTempControlPoint(nextControl);\n\n    } else if (isDragging === 'start') {\n      const nextStart = {\n        x: latestStartRef.current.x + dxScaled,\n        y: latestStartRef.current.y + dyScaled,\n      };\n      latestStartRef.current = nextStart;\n      setTempStartPosition(nextStart);\n    } else if (isDragging === 'end') {\n      const nextEnd = {\n        x: latestEndRef.current.x + dxScaled,\n        y: latestEndRef.current.y + dyScaled,\n      };\n      latestEndRef.current = nextEnd;\n      setTempEndPosition(nextEnd);\n    } else if (isDragging === 'control') {\n      if (!latestControlRef.current) {\n        return;\n      }\n      const nextControl = {\n        x: latestControlRef.current.x + dxScaled,\n        y: latestControlRef.current.y + dyScaled,\n      };\n      latestControlRef.current = nextControl;\n      setTempControlPoint(nextControl);\n    }\n  };\n\n  const handleMouseUp = () => {\n    // Commit the final values on action complete\n    // Store ONLY what we're actually sending in lastSentUpdateRef\n    if (isDragging === 'line') {\n      const snapshot = createSnapshot(latestStartRef.current, latestEndRef.current, latestControlRef.current);\n      lastSentUpdateRef.current = snapshot;\n      onUpdate({\n        startPosition: snapshot.startPosition,\n        endPosition: snapshot.endPosition,\n        controlPoint: snapshot.controlPoint,\n        position: { x: snapshot.startPosition.x, y: snapshot.startPosition.y },\n        pointsSnapshot: snapshot,\n      });\n    } else if (isDragging === 'start') {\n      const snapshot = createSnapshot(latestStartRef.current, annotation.endPosition, annotation.controlPoint);\n      lastSentUpdateRef.current = snapshot;\n      onUpdate({\n        startPosition: snapshot.startPosition,\n        position: { x: snapshot.startPosition.x, y: snapshot.startPosition.y },\n        pointsSnapshot: snapshot,\n      });\n    } else if (isDragging === 'end') {\n      const snapshot = createSnapshot(annotation.startPosition, latestEndRef.current, annotation.controlPoint);\n      lastSentUpdateRef.current = snapshot;\n      onUpdate({\n        endPosition: snapshot.endPosition,\n        position: { x: annotation.startPosition.x, y: annotation.startPosition.y },\n        pointsSnapshot: snapshot,\n      });\n    } else if (isDragging === 'control') {\n      const snapshot = createSnapshot(annotation.startPosition, annotation.endPosition, latestControlRef.current);\n      lastSentUpdateRef.current = snapshot;\n      onUpdate({\n        controlPoint: cloneOptionalPosition(latestControlRef.current),\n        position: { x: annotation.startPosition.x, y: annotation.startPosition.y },\n        pointsSnapshot: snapshot,\n      });\n    }\n\n    setIsDragging(null);\n  };\n\n  React.useEffect(() => {\n    if (isDragging) {\n      document.addEventListener('mousemove', handleMouseMove);\n      document.addEventListener('mouseup', handleMouseUp);\n      return () => {\n        document.removeEventListener('mousemove', handleMouseMove);\n        document.removeEventListener('mouseup', handleMouseUp);\n      };\n    }\n  }, [isDragging]);\n\n  // Handle double-click to add/remove control point\n  const handleDoubleClick = (e: React.MouseEvent) => {\n    if (!editable) return;\n    e.stopPropagation();\n    e.preventDefault();\n\n    if (currentControlPoint) {\n      // Remove control point\n      setTempControlPoint(undefined);\n      latestControlRef.current = undefined;\n      const snapshot = createSnapshot(currentStartPosition, currentEndPosition, undefined);\n      lastSentUpdateRef.current = snapshot;\n      onUpdate({\n        controlPoint: undefined,\n        position: { x: snapshot.startPosition.x, y: snapshot.startPosition.y },\n        pointsSnapshot: snapshot,\n      });\n    } else {\n      // Add control point at the midpoint using current temp positions\n      const midX = (tempStartPosition.x + tempEndPosition.x) / 2;\n      const midY = (tempStartPosition.y + tempEndPosition.y) / 2;\n\n      // Calculate perpendicular offset\n      const dx = tempEndPosition.x - tempStartPosition.x;\n      const dy = tempEndPosition.y - tempStartPosition.y;\n      const length = Math.sqrt(dx * dx + dy * dy);\n      const perpX = -dy / length;\n      const perpY = dx / length;\n      const offset = length * 0.2; // 20% of line length\n\n      const newControlPoint = {\n        x: midX + perpX * offset,\n        y: midY + perpY * offset,\n      };\n\n      setTempControlPoint(newControlPoint);\n      latestControlRef.current = newControlPoint;\n      const snapshot = createSnapshot(currentStartPosition, currentEndPosition, newControlPoint);\n      lastSentUpdateRef.current = snapshot;\n      onUpdate({\n        controlPoint: newControlPoint,\n        position: { x: snapshot.startPosition.x, y: snapshot.startPosition.y },\n        pointsSnapshot: snapshot,\n      });\n    }\n  };\n\n  const arrowHeadSize = 20 * scale.scaleX;\n  const arrowHeadWidth = 12 * scale.scaleX;\n\n  // Calculate angle for the end arrowhead\n  // For curved arrows, calculate tangent at the end point\n  let endAngle: number;\n  if (currentControlPoint && scaledControlX !== undefined && scaledControlY !== undefined) {\n    // Tangent of quadratic bezier at t=1 is from control point to end point\n    const dx = scaledEndX - scaledControlX;\n    const dy = scaledEndY - scaledControlY;\n    endAngle = Math.atan2(dy, dx) * (180 / Math.PI);\n  } else {\n    // Straight line\n    const dx = scaledEndX - scaledStartX;\n    const dy = scaledEndY - scaledStartY;\n    endAngle = Math.atan2(dy, dx) * (180 / Math.PI);\n  }\n\n  // Calculate angle for the start arrowhead (if double-headed)\n  let startAngle: number = 0;\n  if (annotation.doubleHeaded) {\n    if (currentControlPoint && scaledControlX !== undefined && scaledControlY !== undefined) {\n      // Tangent of quadratic bezier at t=0 is from start point to control point\n      const dx = scaledControlX - scaledStartX;\n      const dy = scaledControlY - scaledStartY;\n      startAngle = Math.atan2(dy, dx) * (180 / Math.PI) + 180; // Add 180 to reverse direction\n    } else {\n      // Straight line - opposite direction of end angle\n      startAngle = endAngle + 180;\n    }\n  }\n\n  return (\n    <svg\n      style={{\n        position: 'absolute',\n        left: 0,\n        top: 0,\n        width: '100%',\n        height: '100%',\n        pointerEvents: 'none',\n      }}\n    >\n      <defs>\n        <filter id={`shadow-${annotation.id}`} x=\"-50%\" y=\"-50%\" width=\"200%\" height=\"200%\">\n          <feDropShadow dx=\"0\" dy=\"2\" stdDeviation=\"3\" floodOpacity=\"0.3\" />\n        </filter>\n      </defs>\n\n      {/* Main arrow line/curve */}\n      <path\n        d={\n          currentControlPoint && scaledControlX !== undefined && scaledControlY !== undefined\n            ? `M ${scaledStartX} ${scaledStartY} Q ${scaledControlX} ${scaledControlY} ${scaledEndX} ${scaledEndY}`\n            : `M ${scaledStartX} ${scaledStartY} L ${scaledEndX} ${scaledEndY}`\n        }\n        stroke={displayColor}\n        strokeWidth={annotation.thickness * scale.scaleX}\n        strokeLinecap=\"round\"\n        fill=\"none\"\n        filter={`url(#shadow-${annotation.id})`}\n        opacity={displayOpacity}\n        style={{\n          pointerEvents: editable ? 'auto' : 'none',\n          cursor: editable ? (isDragging === 'line' ? 'grabbing' : 'grab') : 'default',\n        }}\n        onMouseDown={(e) => handleMouseDown(e, 'line')}\n        onDoubleClick={handleDoubleClick}\n        onContextMenu={editable ? onContextMenu : undefined}\n      />\n\n      {/* End arrowhead */}\n      <g transform={`translate(${scaledEndX}, ${scaledEndY}) rotate(${endAngle})`}>\n        <path\n          d={`M 0 0 L -${arrowHeadSize} -${arrowHeadWidth} L -${arrowHeadSize * 0.7} 0 L -${arrowHeadSize} ${arrowHeadWidth} Z`}\n          fill={displayColor}\n          stroke={displayColor}\n          strokeWidth={1}\n          strokeLinejoin=\"round\"\n          filter={`url(#shadow-${annotation.id})`}\n          opacity={displayOpacity}\n          style={{ pointerEvents: 'none' }}\n        />\n      </g>\n\n      {/* Start arrowhead (if double-headed) */}\n      {annotation.doubleHeaded && (\n        <g transform={`translate(${scaledStartX}, ${scaledStartY}) rotate(${startAngle})`}>\n          <path\n            d={`M 0 0 L -${arrowHeadSize} -${arrowHeadWidth} L -${arrowHeadSize * 0.7} 0 L -${arrowHeadSize} ${arrowHeadWidth} Z`}\n            fill={displayColor}\n            stroke={displayColor}\n            strokeWidth={1}\n            strokeLinejoin=\"round\"\n            filter={`url(#shadow-${annotation.id})`}\n            opacity={displayOpacity}\n            style={{ pointerEvents: 'none' }}\n          />\n        </g>\n      )}\n\n      {/* Start and end handles */}\n      {editable && isSelected && (\n        <>\n          <circle\n            cx={scaledStartX}\n            cy={scaledStartY}\n            r={6}\n            fill=\"white\"\n            stroke={displayColor}\n            strokeWidth={2}\n            opacity={displayOpacity}\n            style={{\n              pointerEvents: 'auto',\n              cursor: isDragging === 'start' ? 'grabbing' : 'grab',\n            }}\n            onMouseDown={(e) => handleMouseDown(e, 'start')}\n          />\n          <circle\n            cx={scaledEndX}\n            cy={scaledEndY}\n            r={6}\n            fill=\"white\"\n            stroke={displayColor}\n            strokeWidth={2}\n            opacity={displayOpacity}\n            style={{\n              pointerEvents: 'auto',\n              cursor: isDragging === 'end' ? 'grabbing' : 'grab',\n            }}\n            onMouseDown={(e) => handleMouseDown(e, 'end')}\n          />\n\n          {/* Control point handle */}\n          {currentControlPoint && scaledControlX !== undefined && scaledControlY !== undefined && (\n            <>\n              {/* Dashed lines showing control point connections */}\n              <line\n                x1={scaledStartX}\n                y1={scaledStartY}\n                x2={scaledControlX}\n                y2={scaledControlY}\n                stroke={displayColor}\n                strokeWidth={1}\n                strokeDasharray=\"4 4\"\n                opacity={0.4 * displayOpacity}\n                style={{ pointerEvents: 'none' }}\n              />\n              <line\n                x1={scaledControlX}\n                y1={scaledControlY}\n                x2={scaledEndX}\n                y2={scaledEndY}\n                stroke={displayColor}\n                strokeWidth={1}\n                strokeDasharray=\"4 4\"\n                opacity={0.4 * displayOpacity}\n                style={{ pointerEvents: 'none' }}\n              />\n              {/* Control point handle */}\n              <circle\n                cx={scaledControlX}\n                cy={scaledControlY}\n                r={7}\n                fill={displayColor}\n                stroke=\"white\"\n                strokeWidth={2}\n                opacity={displayOpacity}\n                style={{\n                  pointerEvents: 'auto',\n                  cursor: isDragging === 'control' ? 'grabbing' : 'grab',\n                }}\n                onMouseDown={(e) => handleMouseDown(e, 'control')}\n              />\n            </>\n          )}\n        </>\n      )}\n    </svg>\n  );\n};\n\nexport default ArrowAnnotation;\n","import React, { useState, useRef, useEffect } from 'react';\nimport { TextBalloonAnnotation as TextBalloonType } from '../../types';\n\ninterface TextBalloonAnnotationProps {\n  annotation: TextBalloonType;\n  isSelected: boolean;\n  onSelect: () => void;\n  onUpdate: (updates: Partial<TextBalloonType>) => void;\n  onContextMenu: (e: React.MouseEvent) => void;\n  scale: { scaleX: number; scaleY: number };\n  editable?: boolean;\n}\n\nconst TextBalloonAnnotation: React.FC<TextBalloonAnnotationProps> = ({\n  annotation,\n  isSelected,\n  onSelect,\n  onUpdate,\n  onContextMenu,\n  scale,\n  editable = true,\n}) => {\n  const [isEditing, setIsEditing] = useState(false);\n  const [isDragging, setIsDragging] = useState(false);\n  const [isResizing, setIsResizing] = useState(false);\n  const inputRef = useRef<HTMLTextAreaElement>(null);\n  const startPosRef = useRef({ x: 0, y: 0 });\n\n  // Local state for smooth dragging\n  const [tempPosition, setTempPosition] = useState(annotation.position);\n  const [tempSize, setTempSize] = useState(annotation.size);\n\n  // Apply scale to position and size for display\n  const scaledX = tempPosition.x * scale.scaleX;\n  const scaledY = tempPosition.y * scale.scaleY;\n  const scaledWidth = tempSize.width * scale.scaleX;\n  const scaledHeight = tempSize.height * scale.scaleY;\n\n  const handleDoubleClick = () => {\n    if (!editable) return;\n    setIsEditing(true);\n    setTimeout(() => inputRef.current?.focus(), 0);\n  };\n\n  const handleTextChange = (e: React.ChangeEvent<HTMLTextAreaElement>) => {\n    onUpdate({ text: e.target.value });\n  };\n\n  const handleBlur = () => {\n    setIsEditing(false);\n  };\n\n  const handleKeyDown = (e: React.KeyboardEvent<HTMLTextAreaElement>) => {\n    if (e.key === 'Escape') {\n      e.preventDefault();\n      setIsEditing(false);\n      inputRef.current?.blur();\n    }\n  };\n\n  const tailPosition = annotation.tailPosition || 'bottom';\n\n  const handleMouseDown = (e: React.MouseEvent) => {\n    if (!editable) return;\n    if (isEditing) return;\n    // Only start dragging on left click (button 0), not right click (button 2)\n    if (e.button !== 0) return;\n    e.stopPropagation();\n    onSelect();\n    setIsDragging(true);\n    startPosRef.current = { x: e.clientX, y: e.clientY };\n  };\n\n  const handleMouseMove = (e: MouseEvent) => {\n    if (!isDragging && !isResizing) return;\n\n    const dx = e.clientX - startPosRef.current.x;\n    const dy = e.clientY - startPosRef.current.y;\n    startPosRef.current = { x: e.clientX, y: e.clientY };\n\n    const dxScaled = dx / scale.scaleX;\n    const dyScaled = dy / scale.scaleY;\n\n    if (isDragging) {\n      setTempPosition(prev => ({\n        x: prev.x + dxScaled,\n        y: prev.y + dyScaled,\n      }));\n    } else if (isResizing) {\n      setTempSize(prev => ({\n        width: Math.max(60, prev.width + dxScaled),\n        height: Math.max(40, prev.height + dyScaled),\n      }));\n    }\n  };\n\n  const handleMouseUp = () => {\n    if (isDragging) {\n      onUpdate({ position: tempPosition });\n      setIsDragging(false);\n    } else if (isResizing) {\n      onUpdate({ size: tempSize });\n      setIsResizing(false);\n    }\n  };\n\n  const handleResizeMouseDown = (e: React.MouseEvent) => {\n    if (!editable) return;\n    e.stopPropagation();\n    e.preventDefault();\n    setIsResizing(true);\n    startPosRef.current = { x: e.clientX, y: e.clientY };\n  };\n\n  useEffect(() => {\n    if (isDragging || isResizing) {\n      document.addEventListener('mousemove', handleMouseMove);\n      document.addEventListener('mouseup', handleMouseUp);\n      return () => {\n        document.removeEventListener('mousemove', handleMouseMove);\n        document.removeEventListener('mouseup', handleMouseUp);\n      };\n    }\n  }, [isDragging, isResizing, tempPosition, tempSize]);\n\n  const getTailStyle = (): React.CSSProperties => {\n    const tailSize = 10 * scale.scaleX;\n    const overlap = 2 * scale.scaleX;\n\n    const baseStyle: React.CSSProperties = {\n      position: 'absolute',\n      width: 0,\n      height: 0,\n    };\n\n    switch (tailPosition) {\n      case 'bottom':\n        return {\n          ...baseStyle,\n          bottom: -(tailSize - overlap),\n          left: '50%',\n          transform: 'translateX(-50%)',\n          borderLeft: `${tailSize}px solid transparent`,\n          borderRight: `${tailSize}px solid transparent`,\n          borderTop: `${tailSize}px solid ${annotation.backgroundColor}`,\n        };\n      case 'bottom-left':\n        return {\n          ...baseStyle,\n          bottom: -(tailSize - overlap),\n          left: '20%',\n          borderLeft: `${tailSize}px solid transparent`,\n          borderRight: `${tailSize}px solid transparent`,\n          borderTop: `${tailSize}px solid ${annotation.backgroundColor}`,\n        };\n      case 'bottom-right':\n        return {\n          ...baseStyle,\n          bottom: -(tailSize - overlap),\n          right: '20%',\n          borderLeft: `${tailSize}px solid transparent`,\n          borderRight: `${tailSize}px solid transparent`,\n          borderTop: `${tailSize}px solid ${annotation.backgroundColor}`,\n        };\n      case 'top':\n        return {\n          ...baseStyle,\n          top: -(tailSize - overlap),\n          left: '50%',\n          transform: 'translateX(-50%)',\n          borderLeft: `${tailSize}px solid transparent`,\n          borderRight: `${tailSize}px solid transparent`,\n          borderBottom: `${tailSize}px solid ${annotation.backgroundColor}`,\n        };\n      case 'top-left':\n        return {\n          ...baseStyle,\n          top: -(tailSize - overlap),\n          left: '20%',\n          borderLeft: `${tailSize}px solid transparent`,\n          borderRight: `${tailSize}px solid transparent`,\n          borderBottom: `${tailSize}px solid ${annotation.backgroundColor}`,\n        };\n      case 'top-right':\n        return {\n          ...baseStyle,\n          top: -(tailSize - overlap),\n          right: '20%',\n          borderLeft: `${tailSize}px solid transparent`,\n          borderRight: `${tailSize}px solid transparent`,\n          borderBottom: `${tailSize}px solid ${annotation.backgroundColor}`,\n        };\n      case 'left':\n        return {\n          ...baseStyle,\n          left: -(tailSize - overlap),\n          top: '50%',\n          transform: 'translateY(-50%)',\n          borderTop: `${tailSize}px solid transparent`,\n          borderBottom: `${tailSize}px solid transparent`,\n          borderRight: `${tailSize}px solid ${annotation.backgroundColor}`,\n        };\n      case 'right':\n        return {\n          ...baseStyle,\n          right: -(tailSize - overlap),\n          top: '50%',\n          transform: 'translateY(-50%)',\n          borderTop: `${tailSize}px solid transparent`,\n          borderBottom: `${tailSize}px solid transparent`,\n          borderLeft: `${tailSize}px solid ${annotation.backgroundColor}`,\n        };\n      default:\n        return baseStyle;\n    }\n  };\n\n  return (\n    <div\n      style={{\n        position: 'absolute',\n        left: scaledX,\n        top: scaledY,\n        width: scaledWidth,\n        height: scaledHeight,\n        backgroundColor: annotation.backgroundColor,\n        color: annotation.textColor,\n        borderRadius: `${12 * scale.scaleX}px`,\n        padding: `${8 * scale.scaleY}px ${12 * scale.scaleX}px`,\n        cursor: editable ? (isEditing ? 'text' : isDragging ? 'grabbing' : 'grab') : 'default',\n        pointerEvents: editable ? 'auto' : 'none',\n        userSelect: isEditing ? 'text' : 'none',\n        WebkitUserSelect: isEditing ? 'text' : 'none',\n        MozUserSelect: isEditing ? 'text' : 'none',\n        msUserSelect: isEditing ? 'text' : 'none',\n        boxShadow: '0 4px 12px rgba(0, 0, 0, 0.3)',\n        border: isSelected ? `2px solid ${annotation.textColor}` : 'none',\n        fontSize: `${14 * scale.scaleX}px`,\n        fontWeight: '500',\n        display: 'flex',\n        alignItems: 'center',\n        justifyContent: 'center',\n        textAlign: 'center',\n        boxSizing: 'border-box',\n      }}\n      onMouseDown={handleMouseDown}\n      onContextMenu={onContextMenu}\n    >\n      <div\n        style={{\n          width: '100%',\n          height: '100%',\n          display: 'flex',\n          alignItems: 'center',\n          justifyContent: 'center',\n        }}\n        onDoubleClick={handleDoubleClick}\n      >\n        {isEditing ? (\n          <textarea\n            ref={inputRef}\n            value={annotation.text}\n            onChange={handleTextChange}\n            onBlur={handleBlur}\n            onKeyDown={handleKeyDown}\n            style={{\n              width: '100%',\n              height: '100%',\n              backgroundColor: 'transparent',\n              color: annotation.textColor,\n              border: 'none',\n              outline: 'none',\n              resize: 'none',\n              fontFamily: 'inherit',\n              fontSize: 'inherit',\n              textAlign: 'center',\n            }}\n            onClick={(e) => e.stopPropagation()}\n            onMouseDown={(e) => e.stopPropagation()}\n          />\n        ) : (\n          <span\n            style={{\n              userSelect: 'none',\n              WebkitUserSelect: 'none',\n              MozUserSelect: 'none',\n              msUserSelect: 'none',\n              whiteSpace: 'pre-wrap',\n              pointerEvents: 'none',\n            }}\n          >\n            {annotation.text}\n          </span>\n        )}\n      </div>\n      {/* Balloon tail - only render if tailPosition is not 'none' */}\n      {tailPosition !== 'none' && <div style={getTailStyle()} />}\n\n      {/* Resize handle */}\n      {editable && isSelected && !isEditing && (\n        <div\n          style={{\n            position: 'absolute',\n            width: '12px',\n            height: '12px',\n            backgroundColor: 'white',\n            border: '2px solid #3498db',\n            borderRadius: '50%',\n            right: '-6px',\n            bottom: '-6px',\n            cursor: 'nwse-resize',\n          }}\n          onMouseDown={handleResizeMouseDown}\n        />\n      )}\n    </div>\n  );\n};\n\nexport default TextBalloonAnnotation;\n","import React, { useState, useRef, useEffect } from 'react';\nimport { HighlightAnnotation as HighlightType } from '../../types';\n\ninterface HighlightAnnotationProps {\n  annotation: HighlightType;\n  isSelected: boolean;\n  onSelect: () => void;\n  onUpdate: (updates: Partial<HighlightType>) => void;\n  onContextMenu: (e: React.MouseEvent) => void;\n  scale: { scaleX: number; scaleY: number };\n  editable?: boolean;\n}\n\nconst HighlightAnnotation: React.FC<HighlightAnnotationProps> = ({\n  annotation,\n  isSelected,\n  onSelect,\n  onUpdate,\n  onContextMenu,\n  scale,\n  editable = true,\n}) => {\n  const [isDragging, setIsDragging] = useState(false);\n  const [isResizing, setIsResizing] = useState(false);\n  const startPosRef = useRef({ x: 0, y: 0 });\n\n  // Local state for smooth dragging\n  const [tempPosition, setTempPosition] = useState(annotation.position);\n  const [tempSize, setTempSize] = useState(annotation.size);\n\n  // Apply scale to position and size for display\n  const scaledX = tempPosition.x * scale.scaleX;\n  const scaledY = tempPosition.y * scale.scaleY;\n  const scaledWidth = tempSize.width * scale.scaleX;\n  const scaledHeight = tempSize.height * scale.scaleY;\n\n  const handleMouseDown = (e: React.MouseEvent) => {\n    if (!editable) return;\n    // Only start dragging on left click (button 0), not right click (button 2)\n    if (e.button !== 0) return;\n    e.stopPropagation();\n    onSelect();\n    setIsDragging(true);\n    startPosRef.current = { x: e.clientX, y: e.clientY };\n  };\n\n  const handleMouseMove = (e: MouseEvent) => {\n    if (!isDragging && !isResizing) return;\n\n    const dx = e.clientX - startPosRef.current.x;\n    const dy = e.clientY - startPosRef.current.y;\n    startPosRef.current = { x: e.clientX, y: e.clientY };\n\n    const dxScaled = dx / scale.scaleX;\n    const dyScaled = dy / scale.scaleY;\n\n    if (isDragging) {\n      setTempPosition(prev => ({\n        x: prev.x + dxScaled,\n        y: prev.y + dyScaled,\n      }));\n    } else if (isResizing) {\n      setTempSize(prev => ({\n        width: Math.max(20, prev.width + dxScaled),\n        height: Math.max(20, prev.height + dyScaled),\n      }));\n    }\n  };\n\n  const handleMouseUp = () => {\n    if (isDragging) {\n      onUpdate({ position: tempPosition });\n      setIsDragging(false);\n    } else if (isResizing) {\n      onUpdate({ size: tempSize });\n      setIsResizing(false);\n    }\n  };\n\n  const handleResizeMouseDown = (e: React.MouseEvent) => {\n    if (!editable) return;\n    e.stopPropagation();\n    e.preventDefault();\n    setIsResizing(true);\n    startPosRef.current = { x: e.clientX, y: e.clientY };\n  };\n\n  useEffect(() => {\n    if (isDragging || isResizing) {\n      document.addEventListener('mousemove', handleMouseMove);\n      document.addEventListener('mouseup', handleMouseUp);\n      return () => {\n        document.removeEventListener('mousemove', handleMouseMove);\n        document.removeEventListener('mouseup', handleMouseUp);\n      };\n    }\n  }, [isDragging, isResizing, tempPosition, tempSize]);\n\n  return (\n    <div\n      style={{\n        position: 'absolute',\n        left: scaledX,\n        top: scaledY,\n        width: scaledWidth,\n        height: scaledHeight,\n        backgroundColor: annotation.color,\n        opacity: annotation.opacity,\n        cursor: editable ? (isDragging ? 'grabbing' : 'grab') : 'default',\n        pointerEvents: editable ? 'auto' : 'none',\n        border: isSelected ? '2px dashed rgba(0, 0, 0, 0.5)' : 'none',\n        boxShadow: '0 4px 12px rgba(0, 0, 0, 0.2)',\n        borderRadius: `${4 * scale.scaleX}px`,\n        boxSizing: 'border-box',\n      }}\n      onMouseDown={handleMouseDown}\n      onContextMenu={onContextMenu}\n    >\n      {/* Resize handle */}\n      {editable && isSelected && (\n        <div\n          style={{\n            position: 'absolute',\n            width: '12px',\n            height: '12px',\n            backgroundColor: 'white',\n            border: '2px solid #3498db',\n            borderRadius: '50%',\n            right: '-6px',\n            bottom: '-6px',\n            cursor: 'nwse-resize',\n          }}\n          onMouseDown={handleResizeMouseDown}\n        />\n      )}\n    </div>\n  );\n};\n\nexport default HighlightAnnotation;\n","import React, { useState, useRef, useEffect } from 'react';\nimport { NumberedBadgeAnnotation as NumberedBadgeType } from '../../types';\n\ninterface NumberedBadgeAnnotationProps {\n  annotation: NumberedBadgeType;\n  isSelected: boolean;\n  onSelect: () => void;\n  onUpdate: (updates: Partial<NumberedBadgeType>) => void;\n  onContextMenu: (e: React.MouseEvent) => void;\n  scale: { scaleX: number; scaleY: number };\n  editable?: boolean;\n}\n\nconst NumberedBadgeAnnotation: React.FC<NumberedBadgeAnnotationProps> = ({\n  annotation,\n  isSelected,\n  onSelect,\n  onUpdate,\n  onContextMenu,\n  scale,\n  editable = true,\n}) => {\n  const [isDragging, setIsDragging] = useState(false);\n  const startPosRef = useRef({ x: 0, y: 0 });\n\n  // Local state for smooth dragging\n  const [tempPosition, setTempPosition] = useState(annotation.position);\n\n  // Apply scale to position and size for display\n  const scaledX = tempPosition.x * scale.scaleX;\n  const scaledY = tempPosition.y * scale.scaleY;\n  const scaledSize = annotation.size * scale.scaleX;\n\n  const handleMouseDown = (e: React.MouseEvent) => {\n    if (!editable) return;\n    // Only start dragging on left click (button 0), not right click (button 2)\n    if (e.button !== 0) return;\n    e.stopPropagation();\n    onSelect();\n    setIsDragging(true);\n    startPosRef.current = { x: e.clientX, y: e.clientY };\n  };\n\n  const handleMouseMove = (e: MouseEvent) => {\n    if (!isDragging) return;\n\n    const dx = e.clientX - startPosRef.current.x;\n    const dy = e.clientY - startPosRef.current.y;\n    startPosRef.current = { x: e.clientX, y: e.clientY };\n\n    const dxScaled = dx / scale.scaleX;\n    const dyScaled = dy / scale.scaleY;\n\n    setTempPosition(prev => ({\n      x: prev.x + dxScaled,\n      y: prev.y + dyScaled,\n    }));\n  };\n\n  const handleMouseUp = () => {\n    if (isDragging) {\n      onUpdate({ position: tempPosition });\n      setIsDragging(false);\n    }\n  };\n\n  useEffect(() => {\n    if (isDragging) {\n      document.addEventListener('mousemove', handleMouseMove);\n      document.addEventListener('mouseup', handleMouseUp);\n      return () => {\n        document.removeEventListener('mousemove', handleMouseMove);\n        document.removeEventListener('mouseup', handleMouseUp);\n      };\n    }\n  }, [isDragging, tempPosition]);\n\n  useEffect(() => {\n    if (!isDragging) {\n      const positionChanged =\n        annotation.position.x !== tempPosition.x ||\n        annotation.position.y !== tempPosition.y;\n\n      if (positionChanged) {\n        setTempPosition(annotation.position);\n      }\n    }\n  }, [annotation.position, isDragging, tempPosition]);\n\n  return (\n    <div\n      style={{\n        position: 'absolute',\n        left: scaledX - (scaledSize / 2),\n        top: scaledY - (scaledSize / 2),\n        width: scaledSize,\n        height: scaledSize,\n        backgroundColor: annotation.backgroundColor,\n        color: annotation.textColor,\n        borderRadius: '50%',\n        display: 'flex',\n        alignItems: 'center',\n        justifyContent: 'center',\n        fontSize: scaledSize * 0.5,\n        fontWeight: 'bold',\n        cursor: editable ? (isDragging ? 'grabbing' : 'grab') : 'default',\n        pointerEvents: editable ? 'auto' : 'none',\n        userSelect: 'none',\n        boxShadow: '0 4px 12px rgba(0, 0, 0, 0.4)',\n        border: isSelected ? `3px solid ${annotation.textColor}` : 'none',\n        boxSizing: 'border-box',\n        willChange: isDragging ? 'left, top' : 'auto',\n      }}\n      onMouseDown={handleMouseDown}\n      onContextMenu={onContextMenu}\n    >\n      {annotation.number}\n    </div>\n  );\n};\n\nexport default NumberedBadgeAnnotation;\n","import React, { useState, useRef, useEffect } from 'react';\nimport { RectAnnotation as RectType } from '../../types';\n\ninterface RectAnnotationProps {\n  annotation: RectType;\n  isSelected: boolean;\n  onSelect: () => void;\n  onUpdate: (updates: Partial<RectType>) => void;\n  onContextMenu: (e: React.MouseEvent) => void;\n  scale: { scaleX: number; scaleY: number };\n  editable?: boolean;\n}\n\nconst RectAnnotation: React.FC<RectAnnotationProps> = ({\n  annotation,\n  isSelected,\n  onSelect,\n  onUpdate,\n  onContextMenu,\n  scale,\n  editable = true,\n}) => {\n  const [isDragging, setIsDragging] = useState(false);\n  const [isResizing, setIsResizing] = useState(false);\n  const startPosRef = useRef({ x: 0, y: 0 });\n\n  // Local state for smooth dragging\n  const [tempPosition, setTempPosition] = useState(annotation.position);\n  const [tempSize, setTempSize] = useState(annotation.size);\n\n  // Apply scale to position and size for display\n  const scaledX = tempPosition.x * scale.scaleX;\n  const scaledY = tempPosition.y * scale.scaleY;\n  const scaledWidth = tempSize.width * scale.scaleX;\n  const scaledHeight = tempSize.height * scale.scaleY;\n\n  const handleMouseDown = (e: React.MouseEvent) => {\n    if (!editable) return;\n    // Only start dragging on left click (button 0), not right click (button 2)\n    if (e.button !== 0) return;\n    e.stopPropagation();\n    onSelect();\n    setIsDragging(true);\n    startPosRef.current = { x: e.clientX, y: e.clientY };\n  };\n\n  const handleMouseMove = (e: MouseEvent) => {\n    if (!isDragging && !isResizing) return;\n\n    const dx = e.clientX - startPosRef.current.x;\n    const dy = e.clientY - startPosRef.current.y;\n    startPosRef.current = { x: e.clientX, y: e.clientY };\n\n    const dxScaled = dx / scale.scaleX;\n    const dyScaled = dy / scale.scaleY;\n\n    if (isDragging) {\n      setTempPosition(prev => ({\n        x: prev.x + dxScaled,\n        y: prev.y + dyScaled,\n      }));\n    } else if (isResizing) {\n      setTempSize(prev => ({\n        width: Math.max(20, prev.width + dxScaled),\n        height: Math.max(20, prev.height + dyScaled),\n      }));\n    }\n  };\n\n  const handleMouseUp = () => {\n    if (isDragging) {\n      onUpdate({ position: tempPosition });\n      setIsDragging(false);\n    } else if (isResizing) {\n      onUpdate({ size: tempSize });\n      setIsResizing(false);\n    }\n  };\n\n  const handleResizeMouseDown = (e: React.MouseEvent) => {\n    if (!editable) return;\n    e.stopPropagation();\n    e.preventDefault();\n    setIsResizing(true);\n    startPosRef.current = { x: e.clientX, y: e.clientY };\n  };\n\n  useEffect(() => {\n    if (isDragging || isResizing) {\n      document.addEventListener('mousemove', handleMouseMove);\n      document.addEventListener('mouseup', handleMouseUp);\n      return () => {\n        document.removeEventListener('mousemove', handleMouseMove);\n        document.removeEventListener('mouseup', handleMouseUp);\n      };\n    }\n  }, [isDragging, isResizing, tempPosition, tempSize]);\n\n  return (\n    <div\n      style={{\n        position: 'absolute',\n        left: scaledX,\n        top: scaledY,\n        width: scaledWidth,\n        height: scaledHeight,\n        backgroundColor: annotation.filled ? annotation.color : 'transparent',\n        opacity: annotation.opacity,\n        cursor: editable ? (isDragging ? 'grabbing' : 'grab') : 'default',\n        pointerEvents: editable ? 'auto' : 'none',\n        border: `${annotation.strokeWidth * scale.scaleX}px solid ${annotation.color}`,\n        boxShadow: isSelected ? '0 0 0 2px rgba(0, 0, 0, 0.5)' : '0 4px 12px rgba(0, 0, 0, 0.2)',\n        borderRadius: `${2 * scale.scaleX}px`,\n        boxSizing: 'border-box',\n      }}\n      onMouseDown={handleMouseDown}\n      onContextMenu={onContextMenu}\n    >\n      {/* Resize handle */}\n      {editable && isSelected && (\n        <div\n          style={{\n            position: 'absolute',\n            width: '12px',\n            height: '12px',\n            backgroundColor: 'white',\n            border: '2px solid #3498db',\n            borderRadius: '50%',\n            right: '-6px',\n            bottom: '-6px',\n            cursor: 'nwse-resize',\n          }}\n          onMouseDown={handleResizeMouseDown}\n        />\n      )}\n    </div>\n  );\n};\n\nexport default RectAnnotation;\n","import React, { useState, useRef, useEffect } from 'react';\nimport { CircleAnnotation as CircleType } from '../../types';\n\ninterface CircleAnnotationProps {\n  annotation: CircleType;\n  isSelected: boolean;\n  onSelect: () => void;\n  onUpdate: (updates: Partial<CircleType>) => void;\n  onContextMenu: (e: React.MouseEvent) => void;\n  scale: { scaleX: number; scaleY: number };\n  editable?: boolean;\n}\n\nconst CircleAnnotation: React.FC<CircleAnnotationProps> = ({\n  annotation,\n  isSelected,\n  onSelect,\n  onUpdate,\n  onContextMenu,\n  scale,\n  editable = true,\n}) => {\n  const [isDragging, setIsDragging] = useState(false);\n  const [isResizing, setIsResizing] = useState(false);\n  const startPosRef = useRef({ x: 0, y: 0 });\n\n  // Local state for smooth dragging\n  const [tempPosition, setTempPosition] = useState(annotation.position);\n  const [tempRadius, setTempRadius] = useState(annotation.radius);\n\n  // Apply scale to position and size for display\n  const scaledX = tempPosition.x * scale.scaleX;\n  const scaledY = tempPosition.y * scale.scaleY;\n  const scaledRadius = tempRadius * scale.scaleX;\n  const scaledDiameter = scaledRadius * 2;\n\n  const handleMouseDown = (e: React.MouseEvent) => {\n    if (!editable) return;\n    // Only start dragging on left click (button 0), not right click (button 2)\n    if (e.button !== 0) return;\n    e.stopPropagation();\n    onSelect();\n    setIsDragging(true);\n    startPosRef.current = { x: e.clientX, y: e.clientY };\n  };\n\n  const handleMouseMove = (e: MouseEvent) => {\n    if (!isDragging && !isResizing) return;\n\n    const dx = e.clientX - startPosRef.current.x;\n    const dy = e.clientY - startPosRef.current.y;\n    startPosRef.current = { x: e.clientX, y: e.clientY };\n\n    const dxScaled = dx / scale.scaleX;\n    const dyScaled = dy / scale.scaleY;\n\n    if (isDragging) {\n      setTempPosition(prev => ({\n        x: prev.x + dxScaled,\n        y: prev.y + dyScaled,\n      }));\n    } else if (isResizing) {\n      // Calculate new radius from diagonal movement\n      const delta = Math.sqrt(dx * dx + dy * dy) / scale.scaleX;\n      const direction = (dx + dy) > 0 ? 1 : -1;\n      setTempRadius(prev => Math.max(10, prev + (delta * direction)));\n    }\n  };\n\n  const handleMouseUp = () => {\n    if (isDragging) {\n      onUpdate({ position: tempPosition });\n      setIsDragging(false);\n    } else if (isResizing) {\n      onUpdate({ radius: tempRadius });\n      setIsResizing(false);\n    }\n  };\n\n  const handleResizeMouseDown = (e: React.MouseEvent) => {\n    if (!editable) return;\n    e.stopPropagation();\n    e.preventDefault();\n    setIsResizing(true);\n    startPosRef.current = { x: e.clientX, y: e.clientY };\n  };\n\n  useEffect(() => {\n    if (isDragging || isResizing) {\n      document.addEventListener('mousemove', handleMouseMove);\n      document.addEventListener('mouseup', handleMouseUp);\n      return () => {\n        document.removeEventListener('mousemove', handleMouseMove);\n        document.removeEventListener('mouseup', handleMouseUp);\n      };\n    }\n  }, [isDragging, isResizing, tempPosition, tempRadius]);\n\n  return (\n    <div\n      style={{\n        position: 'absolute',\n        left: scaledX - scaledRadius,\n        top: scaledY - scaledRadius,\n        width: scaledDiameter,\n        height: scaledDiameter,\n        backgroundColor: annotation.filled ? annotation.color : 'transparent',\n        opacity: annotation.opacity,\n        cursor: editable ? (isDragging ? 'grabbing' : 'grab') : 'default',\n        pointerEvents: editable ? 'auto' : 'none',\n        border: `${annotation.strokeWidth * scale.scaleX}px solid ${annotation.color}`,\n        boxShadow: isSelected ? '0 0 0 2px rgba(0, 0, 0, 0.5)' : '0 4px 12px rgba(0, 0, 0, 0.2)',\n        borderRadius: '50%',\n        boxSizing: 'border-box',\n      }}\n      onMouseDown={handleMouseDown}\n      onContextMenu={onContextMenu}\n    >\n      {/* Resize handle */}\n      {editable && isSelected && (\n        <div\n          style={{\n            position: 'absolute',\n            width: '12px',\n            height: '12px',\n            backgroundColor: 'white',\n            border: '2px solid #3498db',\n            borderRadius: '50%',\n            right: '-6px',\n            bottom: '-6px',\n            cursor: 'nwse-resize',\n          }}\n          onMouseDown={handleResizeMouseDown}\n        />\n      )}\n    </div>\n  );\n};\n\nexport default CircleAnnotation;\n","import React, { useState, useRef, useEffect, useMemo } from 'react';\nimport { AIImageAnnotation, ImageAnnotation as ImageAnnotationType, Position, Size, TornEdgeSelection } from '../../types';\n\ntype ImageLikeAnnotation = ImageAnnotationType | AIImageAnnotation;\n\ninterface ImageAnnotationProps {\n  annotation: ImageLikeAnnotation;\n  isSelected: boolean;\n  onSelect: () => void;\n  onUpdate: (updates: Partial<ImageLikeAnnotation>) => void;\n  onContextMenu: (e: React.MouseEvent) => void;\n  scale: { scaleX: number; scaleY: number };\n  editable?: boolean;\n}\n\nconst MIN_SIZE = 48;\n\nconst clamp = (value: number, min: number, max: number) => Math.max(min, Math.min(max, value));\n\nconst randomInRange = (random: () => number, min: number, max: number) => random() * (max - min) + min;\n\nconst hasAnyTornEdges = (edges?: TornEdgeSelection | null): boolean => {\n  if (!edges) return false;\n  return Boolean(edges.top || edges.right || edges.bottom || edges.left);\n};\n\nconst hashString = (value: string) => {\n  let hash = 0;\n  for (let i = 0; i < value.length; i++) {\n    hash = Math.imul(31, hash) + value.charCodeAt(i);\n  }\n  return hash || 1;\n};\n\nconst mulberry32 = (seed: number) => () => {\n  let t = seed + 0x6d2b79f5;\n  t = Math.imul(t ^ (t >>> 15), t | 1);\n  t ^= t + Math.imul(t ^ (t >>> 7), t | 61);\n  return ((t ^ (t >>> 14)) >>> 0) / 4294967296;\n};\n\nconst createSeededRandom = (seed: string) => {\n  return mulberry32(hashString(seed));\n};\n\n/**\n * Multi-scale noise function for organic variation\n * Combines multiple octaves for natural-looking randomness\n */\nconst multiScaleNoise = (progress: number, random: () => number, octaves = 3): number => {\n  let value = 0;\n  let amplitude = 1.0;\n  let frequency = 1.0;\n  let maxValue = 0;\n\n  for (let i = 0; i < octaves; i++) {\n    // Use random values as noise samples\n    const noiseValue = (random() - 0.5) * 2; // -1 to 1\n    // Modulate with sine for smoother variation\n    const octaveValue = Math.sin(progress * Math.PI * frequency) * noiseValue;\n    value += octaveValue * amplitude;\n    maxValue += amplitude;\n\n    amplitude *= 0.5; // Each octave contributes less\n    frequency *= 2.0; // Higher frequency for detail\n  }\n\n  return value / maxValue; // Normalize to -1 to 1 range\n};\n\ninterface Point {\n  x: number;\n  y: number;\n}\n\ninterface BezierPoint extends Point {\n  controlX?: number;\n  controlY?: number;\n}\n\nconst buildHorizontalEdge = (\n  width: number,\n  height: number,\n  side: 'top' | 'bottom',\n  amplitude: number,\n  random: () => number,\n): BezierPoint[] => {\n  const segments = Math.max(24, Math.round(width / 8));\n  const baseline = side === 'top' ? 0 : height;\n  const direction = side === 'top' ? 1 : -1; // Left-to-right vs right-to-left\n  const inwardMultiplier = side === 'top' ? 1 : -1;\n  const points: BezierPoint[] = [];\n\n  let tearMemory = 0;\n  let prevOffset = (random() - 0.5) * amplitude * 0.6;\n  const startX = direction === 1 ? 0 : width;\n  const startY = clamp(\n    baseline + prevOffset * inwardMultiplier,\n    -amplitude * 2,\n    height + amplitude * 2,\n  );\n  points.push({ x: Number(startX.toFixed(2)), y: Number(startY.toFixed(2)) });\n\n  for (let i = 1; i <= segments; i++) {\n    const progress = segments === 0 ? 0 : i / segments;\n    tearMemory *= 0.52;\n    if (random() < 0.32) {\n      const tearDirection = random() < 0.6 ? 1 : -1;\n      tearMemory = tearDirection * amplitude * Math.max(0.9, Math.min(2.6, randomInRange(random, 0.9, 2.6)));\n    }\n\n    const noise = multiScaleNoise(progress * Math.max(0.6, Math.min(1.4, randomInRange(random, 0.6, 1.4))), random, 4) * amplitude * 0.55;\n    const notch = random() < 0.18 ? (random() < 0.55 ? -1 : 1) * amplitude * randomInRange(random, 0.8, 1.8) : 0;\n    const wander = (random() - 0.5) * amplitude * 0.45;\n\n    let offset = prevOffset * 0.4 + noise + wander + notch + tearMemory;\n    offset = Math.max(-amplitude * 2.0, Math.min(amplitude * 2.0, offset));\n    const limitedOffset = offset;\n\n    const x = direction === 1 ? progress * width : width - progress * width;\n    const y = Math.max(-amplitude * 2, Math.min(height + amplitude * 2, baseline + limitedOffset * inwardMultiplier));\n\n    points.push({\n      x: Number(x.toFixed(2)),\n      y: Number(y.toFixed(2)),\n    });\n\n    prevOffset = limitedOffset;\n  }\n\n  return points;\n};\n\nconst buildVerticalEdge = (\n  width: number,\n  height: number,\n  side: 'left' | 'right',\n  amplitude: number,\n  random: () => number,\n): BezierPoint[] => {\n  const segments = Math.max(24, Math.round(height / 12));\n  const baseline = side === 'left' ? 0 : width;\n  const direction = side === 'right' ? 1 : -1; // Top-to-bottom vs bottom-to-top\n  const inwardMultiplier = side === 'left' ? 1 : -1;\n  const points: BezierPoint[] = [];\n\n  let tearMemory = 0;\n  let prevOffset = (random() - 0.5) * amplitude * 0.6;\n  const startY = direction === 1 ? 0 : height;\n  const startX = Math.max(-amplitude * 2, Math.min(width + amplitude * 2, baseline + prevOffset * inwardMultiplier));\n  points.push({ x: Number(startX.toFixed(2)), y: Number(startY.toFixed(2)) });\n\n  for (let i = 1; i <= segments; i++) {\n    const progress = segments === 0 ? 0 : i / segments;\n    tearMemory *= 0.52;\n    if (random() < 0.32) {\n      const tearDirection = random() < 0.6 ? 1 : -1;\n      tearMemory = tearDirection * amplitude * Math.max(0.9, Math.min(2.6, randomInRange(random, 0.9, 2.6)));\n    }\n\n    const noise = multiScaleNoise(progress * Math.max(0.6, Math.min(1.4, randomInRange(random, 0.6, 1.4))), random, 4) * amplitude * 0.55;\n    const notch = random() < 0.18 ? (random() < 0.55 ? -1 : 1) * amplitude * randomInRange(random, 0.8, 1.8) : 0;\n    const wander = (random() - 0.5) * amplitude * 0.45;\n\n    let offset = prevOffset * 0.4 + noise + wander + notch + tearMemory;\n    offset = Math.max(-amplitude * 2.0, Math.min(amplitude * 2.0, offset));\n    const limitedOffset = offset;\n\n    const y = direction === 1 ? progress * height : height - progress * height;\n    const x = Math.max(-amplitude * 2, Math.min(width + amplitude * 2, baseline + limitedOffset * inwardMultiplier));\n\n    points.push({\n      x: Number(x.toFixed(2)),\n      y: Number(y.toFixed(2)),\n    });\n\n    prevOffset = limitedOffset;\n  }\n\n  return points;\n};\n\nconst generateTornPath = (\n  width: number,\n  height: number,\n  edges: TornEdgeSelection,\n  seed: string,\n): string => {\n  const safeWidth = Math.max(2, width);\n  const safeHeight = Math.max(2, height);\n  const amplitude = Math.min(28, Math.max(8, Math.min(safeWidth, safeHeight) * 0.08));\n\n  const topPoints = edges.top ? buildHorizontalEdge(safeWidth, safeHeight, 'top', amplitude, createSeededRandom(`${seed}-top`)) : null;\n  const rightPoints = edges.right ? buildVerticalEdge(safeWidth, safeHeight, 'right', amplitude, createSeededRandom(`${seed}-right`)) : null;\n  const bottomPoints = edges.bottom ? buildHorizontalEdge(safeWidth, safeHeight, 'bottom', amplitude, createSeededRandom(`${seed}-bottom`)) : null;\n  const leftPoints = edges.left ? buildVerticalEdge(safeWidth, safeHeight, 'left', amplitude, createSeededRandom(`${seed}-left`)) : null;\n\n  const pathParts: string[] = [];\n  const startPoint = topPoints?.[0] ?? { x: 0, y: 0 };\n  pathParts.push(`M ${startPoint.x} ${startPoint.y}`);\n\n  // Helper function to add smooth Bezier curves between points\n  const addBezierSegments = (points: BezierPoint[]) => {\n    for (let i = 1; i < points.length; i++) {\n      const point = points[i];\n      if (point.controlX !== undefined && point.controlY !== undefined) {\n        // Quadratic Bezier curve with control point\n        pathParts.push(`Q ${point.controlX} ${point.controlY} ${point.x} ${point.y}`);\n      } else {\n        // Fallback to linear if no control point\n        pathParts.push(`L ${point.x} ${point.y}`);\n      }\n    }\n  };\n\n  if (topPoints) {\n    addBezierSegments(topPoints);\n  } else {\n    pathParts.push(`L ${safeWidth} 0`);\n  }\n\n  if (rightPoints) {\n    addBezierSegments(rightPoints);\n  } else {\n    pathParts.push(`L ${safeWidth} ${safeHeight}`);\n  }\n\n  if (bottomPoints) {\n    addBezierSegments(bottomPoints);\n  } else {\n    pathParts.push(`L 0 ${safeHeight}`);\n  }\n\n  if (leftPoints) {\n    addBezierSegments(leftPoints);\n  } else {\n    pathParts.push('Z');\n    return pathParts.join(' ');\n  }\n\n  pathParts.push('Z');\n  return pathParts.join(' ');\n};\n\nconst ImageAnnotation: React.FC<ImageAnnotationProps> = ({\n  annotation,\n  isSelected,\n  onSelect,\n  onUpdate,\n  onContextMenu,\n  scale,\n  editable = true,\n}) => {\n  const [isDragging, setIsDragging] = useState(false);\n  const [isResizing, setIsResizing] = useState(false);\n  const startPosRef = useRef({ x: 0, y: 0 });\n  const aspectRatioRef = useRef(\n    annotation.naturalSize.width > 0 && annotation.naturalSize.height > 0\n      ? annotation.naturalSize.width / annotation.naturalSize.height\n      : annotation.size.width / annotation.size.height || 1,\n  );\n\n  const [tempPosition, setTempPosition] = useState<Position>(() => ({ ...annotation.position }));\n  const [tempSize, setTempSize] = useState<Size>(() => ({ ...annotation.size }));\n\n  const latestPositionRef = useRef<Position>({ ...annotation.position });\n  const latestSizeRef = useRef<Size>({ ...annotation.size });\n  const pendingUpdateRef = useRef<{ position?: Position; size?: Size } | null>(null);\n\n  const safeScaleX = Number.isFinite(scale.scaleX) && Math.abs(scale.scaleX) > 0.0001 ? scale.scaleX : 1;\n  const safeScaleY = Number.isFinite(scale.scaleY) && Math.abs(scale.scaleY) > 0.0001 ? scale.scaleY : 1;\n\n  const scaledX = tempPosition.x * safeScaleX;\n  const scaledY = tempPosition.y * safeScaleY;\n  const scaledWidth = tempSize.width * safeScaleX;\n  const scaledHeight = tempSize.height * safeScaleY;\n\n  // Debug logging for image annotation scaling\n  if (annotation.id === Object.keys(annotation)[0]) { // Log only once\n    console.log('ImageAnnotation scaling:', {\n      tempSize,\n      scale: { scaleX: safeScaleX, scaleY: safeScaleY },\n      scaledDimensions: { width: scaledWidth, height: scaledHeight }\n    });\n  }\n\n  const handleMouseDown = (e: React.MouseEvent) => {\n    if (!editable) return;\n    if (e.button !== 0) return;\n    e.stopPropagation();\n    window.getSelection?.()?.removeAllRanges?.();\n    onSelect();\n    setIsDragging(true);\n    startPosRef.current = { x: e.clientX, y: e.clientY };\n    latestPositionRef.current = { ...tempPosition };\n  };\n\n  const handleMouseMove = (e: MouseEvent) => {\n    if (!isDragging && !isResizing) return;\n\n    const dx = e.clientX - startPosRef.current.x;\n    const dy = e.clientY - startPosRef.current.y;\n    startPosRef.current = { x: e.clientX, y: e.clientY };\n\n    const dxScaled = dx / safeScaleX;\n    const dyScaled = dy / safeScaleY;\n\n    if (isDragging) {\n      const next = {\n        x: latestPositionRef.current.x + dxScaled,\n        y: latestPositionRef.current.y + dyScaled,\n      };\n      latestPositionRef.current = next;\n      setTempPosition(next);\n    } else if (isResizing) {\n      const ratio = aspectRatioRef.current && aspectRatioRef.current > 0.0001 ? aspectRatioRef.current : 1;\n      const baseSize = latestSizeRef.current;\n\n      let proposedWidth = baseSize.width + dxScaled;\n      let proposedHeight = baseSize.height + dyScaled;\n\n      if (Math.abs(dxScaled) >= Math.abs(dyScaled)) {\n        proposedHeight = proposedWidth / ratio;\n      } else {\n        proposedWidth = proposedHeight * ratio;\n      }\n\n      const minWidth = MIN_SIZE;\n      const minHeight = MIN_SIZE / ratio;\n\n      let width = Math.max(minWidth, proposedWidth);\n      let height = width / ratio;\n      if (height < minHeight) {\n        height = minHeight;\n        width = height * ratio;\n      }\n\n      const nextSize = { width, height };\n      latestSizeRef.current = nextSize;\n      setTempSize(nextSize);\n    }\n  };\n\n  const handleMouseUp = () => {\n    if (isDragging) {\n      const committedPosition = { ...latestPositionRef.current };\n      pendingUpdateRef.current = { position: committedPosition };\n      onUpdate({ position: committedPosition });\n      setIsDragging(false);\n    } else if (isResizing) {\n      const committedSize = { ...latestSizeRef.current };\n      pendingUpdateRef.current = { size: committedSize };\n      onUpdate({ size: committedSize });\n      setIsResizing(false);\n    }\n  };\n\n  const handleResizeMouseDown = (e: React.MouseEvent) => {\n    if (!editable) return;\n    e.stopPropagation();\n    e.preventDefault();\n    setIsResizing(true);\n    startPosRef.current = { x: e.clientX, y: e.clientY };\n    latestSizeRef.current = { ...tempSize };\n  };\n\n  useEffect(() => {\n    if (isDragging || isResizing) {\n      document.addEventListener('mousemove', handleMouseMove);\n      document.addEventListener('mouseup', handleMouseUp);\n      return () => {\n        document.removeEventListener('mousemove', handleMouseMove);\n        document.removeEventListener('mouseup', handleMouseUp);\n      };\n    }\n  }, [isDragging, isResizing]);\n\n  useEffect(() => {\n    if (isDragging || isResizing) return;\n\n    const pending = pendingUpdateRef.current;\n    const positionDiff =\n      annotation.position.x !== tempPosition.x || annotation.position.y !== tempPosition.y;\n    const sizeDiff =\n      annotation.size.width !== tempSize.width || annotation.size.height !== tempSize.height;\n\n    if (pending) {\n      const positionMatches =\n        !pending.position ||\n        (pending.position.x === annotation.position.x && pending.position.y === annotation.position.y);\n      const sizeMatches =\n        !pending.size ||\n        (pending.size.width === annotation.size.width && pending.size.height === annotation.size.height);\n\n      if (positionMatches && sizeMatches) {\n        pendingUpdateRef.current = null;\n      } else {\n        return;\n      }\n    }\n\n    if (positionDiff) {\n      const next = { ...annotation.position };\n      latestPositionRef.current = next;\n      setTempPosition(next);\n    }\n    if (sizeDiff) {\n      const nextSize = { ...annotation.size };\n      latestSizeRef.current = nextSize;\n      setTempSize(nextSize);\n    }\n\n    const ratio =\n      annotation.naturalSize.width > 0 && annotation.naturalSize.height > 0\n        ? annotation.naturalSize.width / annotation.naturalSize.height\n        : annotation.size.width / annotation.size.height || 1;\n    aspectRatioRef.current = ratio;\n  }, [annotation.position, annotation.size, annotation.naturalSize, isDragging, isResizing, tempPosition, tempSize]);\n\n  const outerBorder = Math.max(2, 2 * safeScaleX);\n  const innerBorder = Math.max(3, 3 * safeScaleX);\n  const borderRadius = Math.max(12, 12 * safeScaleX);\n  const rawShadow = annotation.shadowColor ?? 'rgba(15, 23, 42, 0.35)';\n  const shadowHasOffsets = /(px|rem|em|vh|vw)/.test(rawShadow);\n  const boxShadowValue = shadowHasOffsets ? rawShadow : `0 16px 32px ${rawShadow}`;\n  const outerBorderColor = annotation.borderColor ?? 'rgba(15, 23, 42, 0.2)';\n  const innerBorderColor = annotation.innerBorderColor ?? '#ffffff';\n  const resolvedTornEdges = useMemo(\n    () => ({\n      top: Boolean(annotation.tornEdges?.top),\n      right: Boolean(annotation.tornEdges?.right),\n      bottom: Boolean(annotation.tornEdges?.bottom),\n      left: Boolean(annotation.tornEdges?.left),\n    }),\n    [annotation.tornEdges],\n  );\n  const hasTorn = hasAnyTornEdges(annotation.tornEdges);\n  const clipPathId = useMemo(\n    () => `tear-mask-${annotation.id}-${Math.random().toString(36).slice(2, 7)}`,\n    [annotation.id],\n  );\n  const tornPath = useMemo(() => {\n    if (!hasTorn) return null;\n    return generateTornPath(\n      Math.max(tempSize.width, 2),\n      Math.max(tempSize.height, 2),\n      resolvedTornEdges,\n      annotation.id,\n    );\n  }, [annotation.id, hasTorn, resolvedTornEdges, tempSize.height, tempSize.width]);\n  const shadowColor = annotation.shadowColor ?? 'rgba(15, 23, 42, 0.35)';\n\n  useEffect(() => {\n    if (typeof import.meta !== 'undefined' && import.meta.env?.DEV) {\n      console.debug(\n        `[ImageAnnotation:${annotation.id}] torn edges`,\n        annotation.tornEdges ?? null,\n        {\n          hasTorn,\n          pathGenerated: Boolean(tornPath),\n          size: { width: tempSize.width, height: tempSize.height },\n        },\n      );\n    }\n  }, [annotation.id, annotation.tornEdges, hasTorn, tornPath, tempSize.height, tempSize.width]);\n\n  return (\n    <div\n      style={{\n        position: 'absolute',\n        left: scaledX,\n        top: scaledY,\n        width: scaledWidth,\n        height: scaledHeight,\n        cursor: editable ? (isDragging ? 'grabbing' : 'grab') : 'default',\n        pointerEvents: editable ? 'auto' : 'none',\n        boxShadow: hasTorn ? 'none' : boxShadowValue,\n        borderRadius: hasTorn ? 0 : borderRadius,\n        border: hasTorn ? 'none' : `${outerBorder}px solid ${outerBorderColor}`,\n        opacity: annotation.opacity ?? 1,\n        boxSizing: 'border-box',\n        backgroundColor: hasTorn ? 'transparent' : '#fff',\n        overflow: 'visible',\n      }}\n      onMouseDown={handleMouseDown}\n      onContextMenu={onContextMenu}\n    >\n      {hasTorn ? (\n        tornPath && (\n          <TornImage\n            width={Math.max(tempSize.width, 1)}\n            height={Math.max(tempSize.height, 1)}\n            imageData={annotation.imageData}\n            clipPathId={clipPathId}\n            pathData={tornPath}\n            outerBorderColor={outerBorderColor}\n            innerBorderColor={innerBorderColor}\n            outerBorderWidth={outerBorder}\n            innerBorderWidth={innerBorder}\n            shadowColor={shadowColor}\n          />\n        )\n      ) : (\n        <div\n          style={{\n            position: 'absolute',\n            inset: outerBorder,\n            borderRadius: Math.max(borderRadius - outerBorder, 8),\n            border: `${innerBorder}px solid ${innerBorderColor}`,\n            overflow: 'hidden',\n            backgroundColor: '#ffffff',\n            pointerEvents: 'none',\n          }}\n        >\n          <img\n            src={annotation.imageData}\n            alt=\"Annotation\"\n            draggable={false}\n            style={{\n              width: '100%',\n              height: '100%',\n              objectFit: 'contain',\n              display: 'block',\n            }}\n          />\n        </div>\n      )}\n\n      {editable && isSelected && (\n        <div\n          style={{\n            position: 'absolute',\n            width: 12,\n            height: 12,\n            right: -6,\n            bottom: -6,\n            backgroundColor: '#ffffff',\n            border: '2px solid #2563eb',\n            borderRadius: '50%',\n            cursor: 'nwse-resize',\n            boxShadow: '0 0 0 1px rgba(37, 99, 235, 0.35)',\n          }}\n          onMouseDown={handleResizeMouseDown}\n        />\n      )}\n    </div>\n  );\n};\n\nexport default ImageAnnotation;\n\ninterface TornImageProps {\n  width: number;\n  height: number;\n  imageData?: string;\n  clipPathId: string;\n  pathData: string;\n  outerBorderColor: string;\n  innerBorderColor: string;\n  outerBorderWidth: number;\n  innerBorderWidth: number;\n  shadowColor: string;\n}\n\nconst TornImage: React.FC<TornImageProps> = ({\n  width,\n  height,\n  imageData,\n  clipPathId,\n  pathData,\n  outerBorderColor,\n  innerBorderColor,\n  outerBorderWidth,\n  innerBorderWidth,\n  shadowColor,\n}) => {\n  const safeWidth = Math.max(width, 1);\n  const safeHeight = Math.max(height, 1);\n  const filterId = `${clipPathId}-shadow`;\n  const shadowOffset = Math.max(8, safeHeight * 0.05);\n  const shadowBlur = Math.max(12, Math.min(28, safeHeight * 0.12));\n  const filterMargin = Math.max(safeWidth, safeHeight) * 0.6;\n\n  return (\n    <div\n      style={{\n        position: 'absolute',\n        inset: 0,\n        pointerEvents: 'none',\n        overflow: 'visible',\n      }}\n    >\n      <svg\n        width=\"100%\"\n        height=\"100%\"\n        viewBox={`0 0 ${safeWidth} ${safeHeight}`}\n        preserveAspectRatio=\"none\"\n        style={{ display: 'block', overflow: 'visible' }}\n      >\n        <defs>\n          {/* Dual-layer shadow filter for realistic depth */}\n          <filter\n            id={filterId}\n            x={-filterMargin}\n            y={-filterMargin}\n            width={safeWidth + filterMargin * 2}\n            height={safeHeight + filterMargin * 2}\n            filterUnits=\"userSpaceOnUse\"\n            colorInterpolationFilters=\"sRGB\"\n          >\n            {/* Primary shadow - sharp and dark */}\n            <feDropShadow dx=\"0\" dy={shadowOffset} stdDeviation={shadowBlur} floodColor={shadowColor} floodOpacity=\"0.6\" />\n            {/* Secondary shadow - soft and ambient */}\n            <feDropShadow dx=\"0\" dy={shadowOffset * 0.3} stdDeviation={shadowBlur * 2} floodColor={shadowColor} floodOpacity=\"0.15\" />\n          </filter>\n          <clipPath id={clipPathId}>\n            <path d={pathData} />\n          </clipPath>\n        </defs>\n        <path d={pathData} fill=\"#ffffff\" filter={`url(#${filterId})`} />\n        <g clipPath={`url(#${clipPathId})`}>\n          <rect width={safeWidth} height={safeHeight} fill=\"#ffffff\" />\n          <image\n            href={imageData}\n            xlinkHref={imageData}\n            width={safeWidth}\n            height={safeHeight}\n            preserveAspectRatio=\"xMidYMid slice\"\n          />\n        </g>\n        {/* Paper fiber edge highlight - subtle off-white */}\n        <path\n          d={pathData}\n          fill=\"none\"\n          stroke=\"rgba(255, 253, 248, 0.85)\"\n          strokeWidth={1.2}\n          strokeLinejoin=\"round\"\n          opacity={0.7}\n        />\n        {/* Outer border */}\n        <path\n          d={pathData}\n          fill=\"none\"\n          stroke={outerBorderColor}\n          strokeWidth={outerBorderWidth * 2}\n          strokeLinejoin=\"round\"\n        />\n        {/* Inner border */}\n        <path\n          d={pathData}\n          fill=\"none\"\n          stroke={innerBorderColor}\n          strokeWidth={innerBorderWidth * 1.6}\n          strokeLinejoin=\"round\"\n        />\n      </svg>\n    </div>\n  );\n};\n","function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=\" \"),n+=f)}else for(f in e)e[f]&&(n&&(n+=\" \"),n+=f);return n}export function clsx(){for(var e,t,f=0,n=\"\",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=\" \"),n+=t);return n}export default clsx;","// packages/react/compose-refs/src/compose-refs.tsx\nimport * as React from \"react\";\nfunction setRef(ref, value) {\n  if (typeof ref === \"function\") {\n    return ref(value);\n  } else if (ref !== null && ref !== void 0) {\n    ref.current = value;\n  }\n}\nfunction composeRefs(...refs) {\n  return (node) => {\n    let hasCleanup = false;\n    const cleanups = refs.map((ref) => {\n      const cleanup = setRef(ref, node);\n      if (!hasCleanup && typeof cleanup == \"function\") {\n        hasCleanup = true;\n      }\n      return cleanup;\n    });\n    if (hasCleanup) {\n      return () => {\n        for (let i = 0; i < cleanups.length; i++) {\n          const cleanup = cleanups[i];\n          if (typeof cleanup == \"function\") {\n            cleanup();\n          } else {\n            setRef(refs[i], null);\n          }\n        }\n      };\n    }\n  };\n}\nfunction useComposedRefs(...refs) {\n  return React.useCallback(composeRefs(...refs), refs);\n}\nexport {\n  composeRefs,\n  useComposedRefs\n};\n//# sourceMappingURL=index.mjs.map\n","// src/slot.tsx\nimport * as React from \"react\";\nimport { composeRefs } from \"@radix-ui/react-compose-refs\";\nimport { Fragment as Fragment2, jsx } from \"react/jsx-runtime\";\n// @__NO_SIDE_EFFECTS__\nfunction createSlot(ownerName) {\n  const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);\n  const Slot2 = React.forwardRef((props, forwardedRef) => {\n    const { children, ...slotProps } = props;\n    const childrenArray = React.Children.toArray(children);\n    const slottable = childrenArray.find(isSlottable);\n    if (slottable) {\n      const newElement = slottable.props.children;\n      const newChildren = childrenArray.map((child) => {\n        if (child === slottable) {\n          if (React.Children.count(newElement) > 1) return React.Children.only(null);\n          return React.isValidElement(newElement) ? newElement.props.children : null;\n        } else {\n          return child;\n        }\n      });\n      return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });\n    }\n    return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });\n  });\n  Slot2.displayName = `${ownerName}.Slot`;\n  return Slot2;\n}\nvar Slot = /* @__PURE__ */ createSlot(\"Slot\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlotClone(ownerName) {\n  const SlotClone = React.forwardRef((props, forwardedRef) => {\n    const { children, ...slotProps } = props;\n    if (React.isValidElement(children)) {\n      const childrenRef = getElementRef(children);\n      const props2 = mergeProps(slotProps, children.props);\n      if (children.type !== React.Fragment) {\n        props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;\n      }\n      return React.cloneElement(children, props2);\n    }\n    return React.Children.count(children) > 1 ? React.Children.only(null) : null;\n  });\n  SlotClone.displayName = `${ownerName}.SlotClone`;\n  return SlotClone;\n}\nvar SLOTTABLE_IDENTIFIER = Symbol(\"radix.slottable\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlottable(ownerName) {\n  const Slottable2 = ({ children }) => {\n    return /* @__PURE__ */ jsx(Fragment2, { children });\n  };\n  Slottable2.displayName = `${ownerName}.Slottable`;\n  Slottable2.__radixId = SLOTTABLE_IDENTIFIER;\n  return Slottable2;\n}\nvar Slottable = /* @__PURE__ */ createSlottable(\"Slottable\");\nfunction isSlottable(child) {\n  return React.isValidElement(child) && typeof child.type === \"function\" && \"__radixId\" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;\n}\nfunction mergeProps(slotProps, childProps) {\n  const overrideProps = { ...childProps };\n  for (const propName in childProps) {\n    const slotPropValue = slotProps[propName];\n    const childPropValue = childProps[propName];\n    const isHandler = /^on[A-Z]/.test(propName);\n    if (isHandler) {\n      if (slotPropValue && childPropValue) {\n        overrideProps[propName] = (...args) => {\n          const result = childPropValue(...args);\n          slotPropValue(...args);\n          return result;\n        };\n      } else if (slotPropValue) {\n        overrideProps[propName] = slotPropValue;\n      }\n    } else if (propName === \"style\") {\n      overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n    } else if (propName === \"className\") {\n      overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(\" \");\n    }\n  }\n  return { ...slotProps, ...overrideProps };\n}\nfunction getElementRef(element) {\n  let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n  let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n  if (mayWarn) {\n    return element.ref;\n  }\n  getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n  mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n  if (mayWarn) {\n    return element.props.ref;\n  }\n  return element.props.ref || element.ref;\n}\nexport {\n  Slot as Root,\n  Slot,\n  Slottable,\n  createSlot,\n  createSlottable\n};\n//# sourceMappingURL=index.mjs.map\n","/**\n * Copyright 2022 Joe Bell. All rights reserved.\n *\n * This file is licensed to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with the\n * License. You may obtain a copy of the License at\n *\n *   http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR REPRESENTATIONS OF ANY KIND, either express or implied. See the\n * License for the specific language governing permissions and limitations under\n * the License.\n */ import { clsx } from \"clsx\";\nconst falsyToString = (value)=>typeof value === \"boolean\" ? `${value}` : value === 0 ? \"0\" : value;\nexport const cx = clsx;\nexport const cva = (base, config)=>(props)=>{\n        var _config_compoundVariants;\n        if ((config === null || config === void 0 ? void 0 : config.variants) == null) return cx(base, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);\n        const { variants, defaultVariants } = config;\n        const getVariantClassNames = Object.keys(variants).map((variant)=>{\n            const variantProp = props === null || props === void 0 ? void 0 : props[variant];\n            const defaultVariantProp = defaultVariants === null || defaultVariants === void 0 ? void 0 : defaultVariants[variant];\n            if (variantProp === null) return null;\n            const variantKey = falsyToString(variantProp) || falsyToString(defaultVariantProp);\n            return variants[variant][variantKey];\n        });\n        const propsWithoutUndefined = props && Object.entries(props).reduce((acc, param)=>{\n            let [key, value] = param;\n            if (value === undefined) {\n                return acc;\n            }\n            acc[key] = value;\n            return acc;\n        }, {});\n        const getCompoundVariantClassNames = config === null || config === void 0 ? void 0 : (_config_compoundVariants = config.compoundVariants) === null || _config_compoundVariants === void 0 ? void 0 : _config_compoundVariants.reduce((acc, param)=>{\n            let { class: cvClass, className: cvClassName, ...compoundVariantOptions } = param;\n            return Object.entries(compoundVariantOptions).every((param)=>{\n                let [key, value] = param;\n                return Array.isArray(value) ? value.includes({\n                    ...defaultVariants,\n                    ...propsWithoutUndefined\n                }[key]) : ({\n                    ...defaultVariants,\n                    ...propsWithoutUndefined\n                })[key] === value;\n            }) ? [\n                ...acc,\n                cvClass,\n                cvClassName\n            ] : acc;\n        }, []);\n        return cx(base, getVariantClassNames, getCompoundVariantClassNames, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);\n    };\n\n","const CLASS_PART_SEPARATOR = '-';\nconst createClassGroupUtils = config => {\n  const classMap = createClassMap(config);\n  const {\n    conflictingClassGroups,\n    conflictingClassGroupModifiers\n  } = config;\n  const getClassGroupId = className => {\n    const classParts = className.split(CLASS_PART_SEPARATOR);\n    // Classes like `-inset-1` produce an empty string as first classPart. We assume that classes for negative values are used correctly and remove it from classParts.\n    if (classParts[0] === '' && classParts.length !== 1) {\n      classParts.shift();\n    }\n    return getGroupRecursive(classParts, classMap) || getGroupIdForArbitraryProperty(className);\n  };\n  const getConflictingClassGroupIds = (classGroupId, hasPostfixModifier) => {\n    const conflicts = conflictingClassGroups[classGroupId] || [];\n    if (hasPostfixModifier && conflictingClassGroupModifiers[classGroupId]) {\n      return [...conflicts, ...conflictingClassGroupModifiers[classGroupId]];\n    }\n    return conflicts;\n  };\n  return {\n    getClassGroupId,\n    getConflictingClassGroupIds\n  };\n};\nconst getGroupRecursive = (classParts, classPartObject) => {\n  if (classParts.length === 0) {\n    return classPartObject.classGroupId;\n  }\n  const currentClassPart = classParts[0];\n  const nextClassPartObject = classPartObject.nextPart.get(currentClassPart);\n  const classGroupFromNextClassPart = nextClassPartObject ? getGroupRecursive(classParts.slice(1), nextClassPartObject) : undefined;\n  if (classGroupFromNextClassPart) {\n    return classGroupFromNextClassPart;\n  }\n  if (classPartObject.validators.length === 0) {\n    return undefined;\n  }\n  const classRest = classParts.join(CLASS_PART_SEPARATOR);\n  return classPartObject.validators.find(({\n    validator\n  }) => validator(classRest))?.classGroupId;\n};\nconst arbitraryPropertyRegex = /^\\[(.+)\\]$/;\nconst getGroupIdForArbitraryProperty = className => {\n  if (arbitraryPropertyRegex.test(className)) {\n    const arbitraryPropertyClassName = arbitraryPropertyRegex.exec(className)[1];\n    const property = arbitraryPropertyClassName?.substring(0, arbitraryPropertyClassName.indexOf(':'));\n    if (property) {\n      // I use two dots here because one dot is used as prefix for class groups in plugins\n      return 'arbitrary..' + property;\n    }\n  }\n};\n/**\n * Exported for testing only\n */\nconst createClassMap = config => {\n  const {\n    theme,\n    classGroups\n  } = config;\n  const classMap = {\n    nextPart: new Map(),\n    validators: []\n  };\n  for (const classGroupId in classGroups) {\n    processClassesRecursively(classGroups[classGroupId], classMap, classGroupId, theme);\n  }\n  return classMap;\n};\nconst processClassesRecursively = (classGroup, classPartObject, classGroupId, theme) => {\n  classGroup.forEach(classDefinition => {\n    if (typeof classDefinition === 'string') {\n      const classPartObjectToEdit = classDefinition === '' ? classPartObject : getPart(classPartObject, classDefinition);\n      classPartObjectToEdit.classGroupId = classGroupId;\n      return;\n    }\n    if (typeof classDefinition === 'function') {\n      if (isThemeGetter(classDefinition)) {\n        processClassesRecursively(classDefinition(theme), classPartObject, classGroupId, theme);\n        return;\n      }\n      classPartObject.validators.push({\n        validator: classDefinition,\n        classGroupId\n      });\n      return;\n    }\n    Object.entries(classDefinition).forEach(([key, classGroup]) => {\n      processClassesRecursively(classGroup, getPart(classPartObject, key), classGroupId, theme);\n    });\n  });\n};\nconst getPart = (classPartObject, path) => {\n  let currentClassPartObject = classPartObject;\n  path.split(CLASS_PART_SEPARATOR).forEach(pathPart => {\n    if (!currentClassPartObject.nextPart.has(pathPart)) {\n      currentClassPartObject.nextPart.set(pathPart, {\n        nextPart: new Map(),\n        validators: []\n      });\n    }\n    currentClassPartObject = currentClassPartObject.nextPart.get(pathPart);\n  });\n  return currentClassPartObject;\n};\nconst isThemeGetter = func => func.isThemeGetter;\n\n// LRU cache inspired from hashlru (https://github.com/dominictarr/hashlru/blob/v1.0.4/index.js) but object replaced with Map to improve performance\nconst createLruCache = maxCacheSize => {\n  if (maxCacheSize < 1) {\n    return {\n      get: () => undefined,\n      set: () => {}\n    };\n  }\n  let cacheSize = 0;\n  let cache = new Map();\n  let previousCache = new Map();\n  const update = (key, value) => {\n    cache.set(key, value);\n    cacheSize++;\n    if (cacheSize > maxCacheSize) {\n      cacheSize = 0;\n      previousCache = cache;\n      cache = new Map();\n    }\n  };\n  return {\n    get(key) {\n      let value = cache.get(key);\n      if (value !== undefined) {\n        return value;\n      }\n      if ((value = previousCache.get(key)) !== undefined) {\n        update(key, value);\n        return value;\n      }\n    },\n    set(key, value) {\n      if (cache.has(key)) {\n        cache.set(key, value);\n      } else {\n        update(key, value);\n      }\n    }\n  };\n};\nconst IMPORTANT_MODIFIER = '!';\nconst MODIFIER_SEPARATOR = ':';\nconst MODIFIER_SEPARATOR_LENGTH = MODIFIER_SEPARATOR.length;\nconst createParseClassName = config => {\n  const {\n    prefix,\n    experimentalParseClassName\n  } = config;\n  /**\n   * Parse class name into parts.\n   *\n   * Inspired by `splitAtTopLevelOnly` used in Tailwind CSS\n   * @see https://github.com/tailwindlabs/tailwindcss/blob/v3.2.2/src/util/splitAtTopLevelOnly.js\n   */\n  let parseClassName = className => {\n    const modifiers = [];\n    let bracketDepth = 0;\n    let parenDepth = 0;\n    let modifierStart = 0;\n    let postfixModifierPosition;\n    for (let index = 0; index < className.length; index++) {\n      let currentCharacter = className[index];\n      if (bracketDepth === 0 && parenDepth === 0) {\n        if (currentCharacter === MODIFIER_SEPARATOR) {\n          modifiers.push(className.slice(modifierStart, index));\n          modifierStart = index + MODIFIER_SEPARATOR_LENGTH;\n          continue;\n        }\n        if (currentCharacter === '/') {\n          postfixModifierPosition = index;\n          continue;\n        }\n      }\n      if (currentCharacter === '[') {\n        bracketDepth++;\n      } else if (currentCharacter === ']') {\n        bracketDepth--;\n      } else if (currentCharacter === '(') {\n        parenDepth++;\n      } else if (currentCharacter === ')') {\n        parenDepth--;\n      }\n    }\n    const baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.substring(modifierStart);\n    const baseClassName = stripImportantModifier(baseClassNameWithImportantModifier);\n    const hasImportantModifier = baseClassName !== baseClassNameWithImportantModifier;\n    const maybePostfixModifierPosition = postfixModifierPosition && postfixModifierPosition > modifierStart ? postfixModifierPosition - modifierStart : undefined;\n    return {\n      modifiers,\n      hasImportantModifier,\n      baseClassName,\n      maybePostfixModifierPosition\n    };\n  };\n  if (prefix) {\n    const fullPrefix = prefix + MODIFIER_SEPARATOR;\n    const parseClassNameOriginal = parseClassName;\n    parseClassName = className => className.startsWith(fullPrefix) ? parseClassNameOriginal(className.substring(fullPrefix.length)) : {\n      isExternal: true,\n      modifiers: [],\n      hasImportantModifier: false,\n      baseClassName: className,\n      maybePostfixModifierPosition: undefined\n    };\n  }\n  if (experimentalParseClassName) {\n    const parseClassNameOriginal = parseClassName;\n    parseClassName = className => experimentalParseClassName({\n      className,\n      parseClassName: parseClassNameOriginal\n    });\n  }\n  return parseClassName;\n};\nconst stripImportantModifier = baseClassName => {\n  if (baseClassName.endsWith(IMPORTANT_MODIFIER)) {\n    return baseClassName.substring(0, baseClassName.length - 1);\n  }\n  /**\n   * In Tailwind CSS v3 the important modifier was at the start of the base class name. This is still supported for legacy reasons.\n   * @see https://github.com/dcastil/tailwind-merge/issues/513#issuecomment-2614029864\n   */\n  if (baseClassName.startsWith(IMPORTANT_MODIFIER)) {\n    return baseClassName.substring(1);\n  }\n  return baseClassName;\n};\n\n/**\n * Sorts modifiers according to following schema:\n * - Predefined modifiers are sorted alphabetically\n * - When an arbitrary variant appears, it must be preserved which modifiers are before and after it\n */\nconst createSortModifiers = config => {\n  const orderSensitiveModifiers = Object.fromEntries(config.orderSensitiveModifiers.map(modifier => [modifier, true]));\n  const sortModifiers = modifiers => {\n    if (modifiers.length <= 1) {\n      return modifiers;\n    }\n    const sortedModifiers = [];\n    let unsortedModifiers = [];\n    modifiers.forEach(modifier => {\n      const isPositionSensitive = modifier[0] === '[' || orderSensitiveModifiers[modifier];\n      if (isPositionSensitive) {\n        sortedModifiers.push(...unsortedModifiers.sort(), modifier);\n        unsortedModifiers = [];\n      } else {\n        unsortedModifiers.push(modifier);\n      }\n    });\n    sortedModifiers.push(...unsortedModifiers.sort());\n    return sortedModifiers;\n  };\n  return sortModifiers;\n};\nconst createConfigUtils = config => ({\n  cache: createLruCache(config.cacheSize),\n  parseClassName: createParseClassName(config),\n  sortModifiers: createSortModifiers(config),\n  ...createClassGroupUtils(config)\n});\nconst SPLIT_CLASSES_REGEX = /\\s+/;\nconst mergeClassList = (classList, configUtils) => {\n  const {\n    parseClassName,\n    getClassGroupId,\n    getConflictingClassGroupIds,\n    sortModifiers\n  } = configUtils;\n  /**\n   * Set of classGroupIds in following format:\n   * `{importantModifier}{variantModifiers}{classGroupId}`\n   * @example 'float'\n   * @example 'hover:focus:bg-color'\n   * @example 'md:!pr'\n   */\n  const classGroupsInConflict = [];\n  const classNames = classList.trim().split(SPLIT_CLASSES_REGEX);\n  let result = '';\n  for (let index = classNames.length - 1; index >= 0; index -= 1) {\n    const originalClassName = classNames[index];\n    const {\n      isExternal,\n      modifiers,\n      hasImportantModifier,\n      baseClassName,\n      maybePostfixModifierPosition\n    } = parseClassName(originalClassName);\n    if (isExternal) {\n      result = originalClassName + (result.length > 0 ? ' ' + result : result);\n      continue;\n    }\n    let hasPostfixModifier = !!maybePostfixModifierPosition;\n    let classGroupId = getClassGroupId(hasPostfixModifier ? baseClassName.substring(0, maybePostfixModifierPosition) : baseClassName);\n    if (!classGroupId) {\n      if (!hasPostfixModifier) {\n        // Not a Tailwind class\n        result = originalClassName + (result.length > 0 ? ' ' + result : result);\n        continue;\n      }\n      classGroupId = getClassGroupId(baseClassName);\n      if (!classGroupId) {\n        // Not a Tailwind class\n        result = originalClassName + (result.length > 0 ? ' ' + result : result);\n        continue;\n      }\n      hasPostfixModifier = false;\n    }\n    const variantModifier = sortModifiers(modifiers).join(':');\n    const modifierId = hasImportantModifier ? variantModifier + IMPORTANT_MODIFIER : variantModifier;\n    const classId = modifierId + classGroupId;\n    if (classGroupsInConflict.includes(classId)) {\n      // Tailwind class omitted due to conflict\n      continue;\n    }\n    classGroupsInConflict.push(classId);\n    const conflictGroups = getConflictingClassGroupIds(classGroupId, hasPostfixModifier);\n    for (let i = 0; i < conflictGroups.length; ++i) {\n      const group = conflictGroups[i];\n      classGroupsInConflict.push(modifierId + group);\n    }\n    // Tailwind class not in conflict\n    result = originalClassName + (result.length > 0 ? ' ' + result : result);\n  }\n  return result;\n};\n\n/**\n * The code in this file is copied from https://github.com/lukeed/clsx and modified to suit the needs of tailwind-merge better.\n *\n * Specifically:\n * - Runtime code from https://github.com/lukeed/clsx/blob/v1.2.1/src/index.js\n * - TypeScript types from https://github.com/lukeed/clsx/blob/v1.2.1/clsx.d.ts\n *\n * Original code has MIT license: Copyright (c) Luke Edwards <luke.edwards05@gmail.com> (lukeed.com)\n */\nfunction twJoin() {\n  let index = 0;\n  let argument;\n  let resolvedValue;\n  let string = '';\n  while (index < arguments.length) {\n    if (argument = arguments[index++]) {\n      if (resolvedValue = toValue(argument)) {\n        string && (string += ' ');\n        string += resolvedValue;\n      }\n    }\n  }\n  return string;\n}\nconst toValue = mix => {\n  if (typeof mix === 'string') {\n    return mix;\n  }\n  let resolvedValue;\n  let string = '';\n  for (let k = 0; k < mix.length; k++) {\n    if (mix[k]) {\n      if (resolvedValue = toValue(mix[k])) {\n        string && (string += ' ');\n        string += resolvedValue;\n      }\n    }\n  }\n  return string;\n};\nfunction createTailwindMerge(createConfigFirst, ...createConfigRest) {\n  let configUtils;\n  let cacheGet;\n  let cacheSet;\n  let functionToCall = initTailwindMerge;\n  function initTailwindMerge(classList) {\n    const config = createConfigRest.reduce((previousConfig, createConfigCurrent) => createConfigCurrent(previousConfig), createConfigFirst());\n    configUtils = createConfigUtils(config);\n    cacheGet = configUtils.cache.get;\n    cacheSet = configUtils.cache.set;\n    functionToCall = tailwindMerge;\n    return tailwindMerge(classList);\n  }\n  function tailwindMerge(classList) {\n    const cachedResult = cacheGet(classList);\n    if (cachedResult) {\n      return cachedResult;\n    }\n    const result = mergeClassList(classList, configUtils);\n    cacheSet(classList, result);\n    return result;\n  }\n  return function callTailwindMerge() {\n    return functionToCall(twJoin.apply(null, arguments));\n  };\n}\nconst fromTheme = key => {\n  const themeGetter = theme => theme[key] || [];\n  themeGetter.isThemeGetter = true;\n  return themeGetter;\n};\nconst arbitraryValueRegex = /^\\[(?:(\\w[\\w-]*):)?(.+)\\]$/i;\nconst arbitraryVariableRegex = /^\\((?:(\\w[\\w-]*):)?(.+)\\)$/i;\nconst fractionRegex = /^\\d+\\/\\d+$/;\nconst tshirtUnitRegex = /^(\\d+(\\.\\d+)?)?(xs|sm|md|lg|xl)$/;\nconst lengthUnitRegex = /\\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\\b(calc|min|max|clamp)\\(.+\\)|^0$/;\nconst colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\\(.+\\)$/;\n// Shadow always begins with x and y offset separated by underscore optionally prepended by inset\nconst shadowRegex = /^(inset_)?-?((\\d+)?\\.?(\\d+)[a-z]+|0)_-?((\\d+)?\\.?(\\d+)[a-z]+|0)/;\nconst imageRegex = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\\(.+\\)$/;\nconst isFraction = value => fractionRegex.test(value);\nconst isNumber = value => !!value && !Number.isNaN(Number(value));\nconst isInteger = value => !!value && Number.isInteger(Number(value));\nconst isPercent = value => value.endsWith('%') && isNumber(value.slice(0, -1));\nconst isTshirtSize = value => tshirtUnitRegex.test(value);\nconst isAny = () => true;\nconst isLengthOnly = value =>\n// `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.\n// For example, `hsl(0 0% 0%)` would be classified as a length without this check.\n// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.\nlengthUnitRegex.test(value) && !colorFunctionRegex.test(value);\nconst isNever = () => false;\nconst isShadow = value => shadowRegex.test(value);\nconst isImage = value => imageRegex.test(value);\nconst isAnyNonArbitrary = value => !isArbitraryValue(value) && !isArbitraryVariable(value);\nconst isArbitrarySize = value => getIsArbitraryValue(value, isLabelSize, isNever);\nconst isArbitraryValue = value => arbitraryValueRegex.test(value);\nconst isArbitraryLength = value => getIsArbitraryValue(value, isLabelLength, isLengthOnly);\nconst isArbitraryNumber = value => getIsArbitraryValue(value, isLabelNumber, isNumber);\nconst isArbitraryPosition = value => getIsArbitraryValue(value, isLabelPosition, isNever);\nconst isArbitraryImage = value => getIsArbitraryValue(value, isLabelImage, isImage);\nconst isArbitraryShadow = value => getIsArbitraryValue(value, isLabelShadow, isShadow);\nconst isArbitraryVariable = value => arbitraryVariableRegex.test(value);\nconst isArbitraryVariableLength = value => getIsArbitraryVariable(value, isLabelLength);\nconst isArbitraryVariableFamilyName = value => getIsArbitraryVariable(value, isLabelFamilyName);\nconst isArbitraryVariablePosition = value => getIsArbitraryVariable(value, isLabelPosition);\nconst isArbitraryVariableSize = value => getIsArbitraryVariable(value, isLabelSize);\nconst isArbitraryVariableImage = value => getIsArbitraryVariable(value, isLabelImage);\nconst isArbitraryVariableShadow = value => getIsArbitraryVariable(value, isLabelShadow, true);\n// Helpers\nconst getIsArbitraryValue = (value, testLabel, testValue) => {\n  const result = arbitraryValueRegex.exec(value);\n  if (result) {\n    if (result[1]) {\n      return testLabel(result[1]);\n    }\n    return testValue(result[2]);\n  }\n  return false;\n};\nconst getIsArbitraryVariable = (value, testLabel, shouldMatchNoLabel = false) => {\n  const result = arbitraryVariableRegex.exec(value);\n  if (result) {\n    if (result[1]) {\n      return testLabel(result[1]);\n    }\n    return shouldMatchNoLabel;\n  }\n  return false;\n};\n// Labels\nconst isLabelPosition = label => label === 'position' || label === 'percentage';\nconst isLabelImage = label => label === 'image' || label === 'url';\nconst isLabelSize = label => label === 'length' || label === 'size' || label === 'bg-size';\nconst isLabelLength = label => label === 'length';\nconst isLabelNumber = label => label === 'number';\nconst isLabelFamilyName = label => label === 'family-name';\nconst isLabelShadow = label => label === 'shadow';\nconst validators = /*#__PURE__*/Object.defineProperty({\n  __proto__: null,\n  isAny,\n  isAnyNonArbitrary,\n  isArbitraryImage,\n  isArbitraryLength,\n  isArbitraryNumber,\n  isArbitraryPosition,\n  isArbitraryShadow,\n  isArbitrarySize,\n  isArbitraryValue,\n  isArbitraryVariable,\n  isArbitraryVariableFamilyName,\n  isArbitraryVariableImage,\n  isArbitraryVariableLength,\n  isArbitraryVariablePosition,\n  isArbitraryVariableShadow,\n  isArbitraryVariableSize,\n  isFraction,\n  isInteger,\n  isNumber,\n  isPercent,\n  isTshirtSize\n}, Symbol.toStringTag, {\n  value: 'Module'\n});\nconst getDefaultConfig = () => {\n  /**\n   * Theme getters for theme variable namespaces\n   * @see https://tailwindcss.com/docs/theme#theme-variable-namespaces\n   */\n  /***/\n  const themeColor = fromTheme('color');\n  const themeFont = fromTheme('font');\n  const themeText = fromTheme('text');\n  const themeFontWeight = fromTheme('font-weight');\n  const themeTracking = fromTheme('tracking');\n  const themeLeading = fromTheme('leading');\n  const themeBreakpoint = fromTheme('breakpoint');\n  const themeContainer = fromTheme('container');\n  const themeSpacing = fromTheme('spacing');\n  const themeRadius = fromTheme('radius');\n  const themeShadow = fromTheme('shadow');\n  const themeInsetShadow = fromTheme('inset-shadow');\n  const themeTextShadow = fromTheme('text-shadow');\n  const themeDropShadow = fromTheme('drop-shadow');\n  const themeBlur = fromTheme('blur');\n  const themePerspective = fromTheme('perspective');\n  const themeAspect = fromTheme('aspect');\n  const themeEase = fromTheme('ease');\n  const themeAnimate = fromTheme('animate');\n  /**\n   * Helpers to avoid repeating the same scales\n   *\n   * We use functions that create a new array every time they're called instead of static arrays.\n   * This ensures that users who modify any scale by mutating the array (e.g. with `array.push(element)`) don't accidentally mutate arrays in other parts of the config.\n   */\n  /***/\n  const scaleBreak = () => ['auto', 'avoid', 'all', 'avoid-page', 'page', 'left', 'right', 'column'];\n  const scalePosition = () => ['center', 'top', 'bottom', 'left', 'right', 'top-left',\n  // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378\n  'left-top', 'top-right',\n  // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378\n  'right-top', 'bottom-right',\n  // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378\n  'right-bottom', 'bottom-left',\n  // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378\n  'left-bottom'];\n  const scalePositionWithArbitrary = () => [...scalePosition(), isArbitraryVariable, isArbitraryValue];\n  const scaleOverflow = () => ['auto', 'hidden', 'clip', 'visible', 'scroll'];\n  const scaleOverscroll = () => ['auto', 'contain', 'none'];\n  const scaleUnambiguousSpacing = () => [isArbitraryVariable, isArbitraryValue, themeSpacing];\n  const scaleInset = () => [isFraction, 'full', 'auto', ...scaleUnambiguousSpacing()];\n  const scaleGridTemplateColsRows = () => [isInteger, 'none', 'subgrid', isArbitraryVariable, isArbitraryValue];\n  const scaleGridColRowStartAndEnd = () => ['auto', {\n    span: ['full', isInteger, isArbitraryVariable, isArbitraryValue]\n  }, isInteger, isArbitraryVariable, isArbitraryValue];\n  const scaleGridColRowStartOrEnd = () => [isInteger, 'auto', isArbitraryVariable, isArbitraryValue];\n  const scaleGridAutoColsRows = () => ['auto', 'min', 'max', 'fr', isArbitraryVariable, isArbitraryValue];\n  const scaleAlignPrimaryAxis = () => ['start', 'end', 'center', 'between', 'around', 'evenly', 'stretch', 'baseline', 'center-safe', 'end-safe'];\n  const scaleAlignSecondaryAxis = () => ['start', 'end', 'center', 'stretch', 'center-safe', 'end-safe'];\n  const scaleMargin = () => ['auto', ...scaleUnambiguousSpacing()];\n  const scaleSizing = () => [isFraction, 'auto', 'full', 'dvw', 'dvh', 'lvw', 'lvh', 'svw', 'svh', 'min', 'max', 'fit', ...scaleUnambiguousSpacing()];\n  const scaleColor = () => [themeColor, isArbitraryVariable, isArbitraryValue];\n  const scaleBgPosition = () => [...scalePosition(), isArbitraryVariablePosition, isArbitraryPosition, {\n    position: [isArbitraryVariable, isArbitraryValue]\n  }];\n  const scaleBgRepeat = () => ['no-repeat', {\n    repeat: ['', 'x', 'y', 'space', 'round']\n  }];\n  const scaleBgSize = () => ['auto', 'cover', 'contain', isArbitraryVariableSize, isArbitrarySize, {\n    size: [isArbitraryVariable, isArbitraryValue]\n  }];\n  const scaleGradientStopPosition = () => [isPercent, isArbitraryVariableLength, isArbitraryLength];\n  const scaleRadius = () => [\n  // Deprecated since Tailwind CSS v4.0.0\n  '', 'none', 'full', themeRadius, isArbitraryVariable, isArbitraryValue];\n  const scaleBorderWidth = () => ['', isNumber, isArbitraryVariableLength, isArbitraryLength];\n  const scaleLineStyle = () => ['solid', 'dashed', 'dotted', 'double'];\n  const scaleBlendMode = () => ['normal', 'multiply', 'screen', 'overlay', 'darken', 'lighten', 'color-dodge', 'color-burn', 'hard-light', 'soft-light', 'difference', 'exclusion', 'hue', 'saturation', 'color', 'luminosity'];\n  const scaleMaskImagePosition = () => [isNumber, isPercent, isArbitraryVariablePosition, isArbitraryPosition];\n  const scaleBlur = () => [\n  // Deprecated since Tailwind CSS v4.0.0\n  '', 'none', themeBlur, isArbitraryVariable, isArbitraryValue];\n  const scaleRotate = () => ['none', isNumber, isArbitraryVariable, isArbitraryValue];\n  const scaleScale = () => ['none', isNumber, isArbitraryVariable, isArbitraryValue];\n  const scaleSkew = () => [isNumber, isArbitraryVariable, isArbitraryValue];\n  const scaleTranslate = () => [isFraction, 'full', ...scaleUnambiguousSpacing()];\n  return {\n    cacheSize: 500,\n    theme: {\n      animate: ['spin', 'ping', 'pulse', 'bounce'],\n      aspect: ['video'],\n      blur: [isTshirtSize],\n      breakpoint: [isTshirtSize],\n      color: [isAny],\n      container: [isTshirtSize],\n      'drop-shadow': [isTshirtSize],\n      ease: ['in', 'out', 'in-out'],\n      font: [isAnyNonArbitrary],\n      'font-weight': ['thin', 'extralight', 'light', 'normal', 'medium', 'semibold', 'bold', 'extrabold', 'black'],\n      'inset-shadow': [isTshirtSize],\n      leading: ['none', 'tight', 'snug', 'normal', 'relaxed', 'loose'],\n      perspective: ['dramatic', 'near', 'normal', 'midrange', 'distant', 'none'],\n      radius: [isTshirtSize],\n      shadow: [isTshirtSize],\n      spacing: ['px', isNumber],\n      text: [isTshirtSize],\n      'text-shadow': [isTshirtSize],\n      tracking: ['tighter', 'tight', 'normal', 'wide', 'wider', 'widest']\n    },\n    classGroups: {\n      // --------------\n      // --- Layout ---\n      // --------------\n      /**\n       * Aspect Ratio\n       * @see https://tailwindcss.com/docs/aspect-ratio\n       */\n      aspect: [{\n        aspect: ['auto', 'square', isFraction, isArbitraryValue, isArbitraryVariable, themeAspect]\n      }],\n      /**\n       * Container\n       * @see https://tailwindcss.com/docs/container\n       * @deprecated since Tailwind CSS v4.0.0\n       */\n      container: ['container'],\n      /**\n       * Columns\n       * @see https://tailwindcss.com/docs/columns\n       */\n      columns: [{\n        columns: [isNumber, isArbitraryValue, isArbitraryVariable, themeContainer]\n      }],\n      /**\n       * Break After\n       * @see https://tailwindcss.com/docs/break-after\n       */\n      'break-after': [{\n        'break-after': scaleBreak()\n      }],\n      /**\n       * Break Before\n       * @see https://tailwindcss.com/docs/break-before\n       */\n      'break-before': [{\n        'break-before': scaleBreak()\n      }],\n      /**\n       * Break Inside\n       * @see https://tailwindcss.com/docs/break-inside\n       */\n      'break-inside': [{\n        'break-inside': ['auto', 'avoid', 'avoid-page', 'avoid-column']\n      }],\n      /**\n       * Box Decoration Break\n       * @see https://tailwindcss.com/docs/box-decoration-break\n       */\n      'box-decoration': [{\n        'box-decoration': ['slice', 'clone']\n      }],\n      /**\n       * Box Sizing\n       * @see https://tailwindcss.com/docs/box-sizing\n       */\n      box: [{\n        box: ['border', 'content']\n      }],\n      /**\n       * Display\n       * @see https://tailwindcss.com/docs/display\n       */\n      display: ['block', 'inline-block', 'inline', 'flex', 'inline-flex', 'table', 'inline-table', 'table-caption', 'table-cell', 'table-column', 'table-column-group', 'table-footer-group', 'table-header-group', 'table-row-group', 'table-row', 'flow-root', 'grid', 'inline-grid', 'contents', 'list-item', 'hidden'],\n      /**\n       * Screen Reader Only\n       * @see https://tailwindcss.com/docs/display#screen-reader-only\n       */\n      sr: ['sr-only', 'not-sr-only'],\n      /**\n       * Floats\n       * @see https://tailwindcss.com/docs/float\n       */\n      float: [{\n        float: ['right', 'left', 'none', 'start', 'end']\n      }],\n      /**\n       * Clear\n       * @see https://tailwindcss.com/docs/clear\n       */\n      clear: [{\n        clear: ['left', 'right', 'both', 'none', 'start', 'end']\n      }],\n      /**\n       * Isolation\n       * @see https://tailwindcss.com/docs/isolation\n       */\n      isolation: ['isolate', 'isolation-auto'],\n      /**\n       * Object Fit\n       * @see https://tailwindcss.com/docs/object-fit\n       */\n      'object-fit': [{\n        object: ['contain', 'cover', 'fill', 'none', 'scale-down']\n      }],\n      /**\n       * Object Position\n       * @see https://tailwindcss.com/docs/object-position\n       */\n      'object-position': [{\n        object: scalePositionWithArbitrary()\n      }],\n      /**\n       * Overflow\n       * @see https://tailwindcss.com/docs/overflow\n       */\n      overflow: [{\n        overflow: scaleOverflow()\n      }],\n      /**\n       * Overflow X\n       * @see https://tailwindcss.com/docs/overflow\n       */\n      'overflow-x': [{\n        'overflow-x': scaleOverflow()\n      }],\n      /**\n       * Overflow Y\n       * @see https://tailwindcss.com/docs/overflow\n       */\n      'overflow-y': [{\n        'overflow-y': scaleOverflow()\n      }],\n      /**\n       * Overscroll Behavior\n       * @see https://tailwindcss.com/docs/overscroll-behavior\n       */\n      overscroll: [{\n        overscroll: scaleOverscroll()\n      }],\n      /**\n       * Overscroll Behavior X\n       * @see https://tailwindcss.com/docs/overscroll-behavior\n       */\n      'overscroll-x': [{\n        'overscroll-x': scaleOverscroll()\n      }],\n      /**\n       * Overscroll Behavior Y\n       * @see https://tailwindcss.com/docs/overscroll-behavior\n       */\n      'overscroll-y': [{\n        'overscroll-y': scaleOverscroll()\n      }],\n      /**\n       * Position\n       * @see https://tailwindcss.com/docs/position\n       */\n      position: ['static', 'fixed', 'absolute', 'relative', 'sticky'],\n      /**\n       * Top / Right / Bottom / Left\n       * @see https://tailwindcss.com/docs/top-right-bottom-left\n       */\n      inset: [{\n        inset: scaleInset()\n      }],\n      /**\n       * Right / Left\n       * @see https://tailwindcss.com/docs/top-right-bottom-left\n       */\n      'inset-x': [{\n        'inset-x': scaleInset()\n      }],\n      /**\n       * Top / Bottom\n       * @see https://tailwindcss.com/docs/top-right-bottom-left\n       */\n      'inset-y': [{\n        'inset-y': scaleInset()\n      }],\n      /**\n       * Start\n       * @see https://tailwindcss.com/docs/top-right-bottom-left\n       */\n      start: [{\n        start: scaleInset()\n      }],\n      /**\n       * End\n       * @see https://tailwindcss.com/docs/top-right-bottom-left\n       */\n      end: [{\n        end: scaleInset()\n      }],\n      /**\n       * Top\n       * @see https://tailwindcss.com/docs/top-right-bottom-left\n       */\n      top: [{\n        top: scaleInset()\n      }],\n      /**\n       * Right\n       * @see https://tailwindcss.com/docs/top-right-bottom-left\n       */\n      right: [{\n        right: scaleInset()\n      }],\n      /**\n       * Bottom\n       * @see https://tailwindcss.com/docs/top-right-bottom-left\n       */\n      bottom: [{\n        bottom: scaleInset()\n      }],\n      /**\n       * Left\n       * @see https://tailwindcss.com/docs/top-right-bottom-left\n       */\n      left: [{\n        left: scaleInset()\n      }],\n      /**\n       * Visibility\n       * @see https://tailwindcss.com/docs/visibility\n       */\n      visibility: ['visible', 'invisible', 'collapse'],\n      /**\n       * Z-Index\n       * @see https://tailwindcss.com/docs/z-index\n       */\n      z: [{\n        z: [isInteger, 'auto', isArbitraryVariable, isArbitraryValue]\n      }],\n      // ------------------------\n      // --- Flexbox and Grid ---\n      // ------------------------\n      /**\n       * Flex Basis\n       * @see https://tailwindcss.com/docs/flex-basis\n       */\n      basis: [{\n        basis: [isFraction, 'full', 'auto', themeContainer, ...scaleUnambiguousSpacing()]\n      }],\n      /**\n       * Flex Direction\n       * @see https://tailwindcss.com/docs/flex-direction\n       */\n      'flex-direction': [{\n        flex: ['row', 'row-reverse', 'col', 'col-reverse']\n      }],\n      /**\n       * Flex Wrap\n       * @see https://tailwindcss.com/docs/flex-wrap\n       */\n      'flex-wrap': [{\n        flex: ['nowrap', 'wrap', 'wrap-reverse']\n      }],\n      /**\n       * Flex\n       * @see https://tailwindcss.com/docs/flex\n       */\n      flex: [{\n        flex: [isNumber, isFraction, 'auto', 'initial', 'none', isArbitraryValue]\n      }],\n      /**\n       * Flex Grow\n       * @see https://tailwindcss.com/docs/flex-grow\n       */\n      grow: [{\n        grow: ['', isNumber, isArbitraryVariable, isArbitraryValue]\n      }],\n      /**\n       * Flex Shrink\n       * @see https://tailwindcss.com/docs/flex-shrink\n       */\n      shrink: [{\n        shrink: ['', isNumber, isArbitraryVariable, isArbitraryValue]\n      }],\n      /**\n       * Order\n       * @see https://tailwindcss.com/docs/order\n       */\n      order: [{\n        order: [isInteger, 'first', 'last', 'none', isArbitraryVariable, isArbitraryValue]\n      }],\n      /**\n       * Grid Template Columns\n       * @see https://tailwindcss.com/docs/grid-template-columns\n       */\n      'grid-cols': [{\n        'grid-cols': scaleGridTemplateColsRows()\n      }],\n      /**\n       * Grid Column Start / End\n       * @see https://tailwindcss.com/docs/grid-column\n       */\n      'col-start-end': [{\n        col: scaleGridColRowStartAndEnd()\n      }],\n      /**\n       * Grid Column Start\n       * @see https://tailwindcss.com/docs/grid-column\n       */\n      'col-start': [{\n        'col-start': scaleGridColRowStartOrEnd()\n      }],\n      /**\n       * Grid Column End\n       * @see https://tailwindcss.com/docs/grid-column\n       */\n      'col-end': [{\n        'col-end': scaleGridColRowStartOrEnd()\n      }],\n      /**\n       * Grid Template Rows\n       * @see https://tailwindcss.com/docs/grid-template-rows\n       */\n      'grid-rows': [{\n        'grid-rows': scaleGridTemplateColsRows()\n      }],\n      /**\n       * Grid Row Start / End\n       * @see https://tailwindcss.com/docs/grid-row\n       */\n      'row-start-end': [{\n        row: scaleGridColRowStartAndEnd()\n      }],\n      /**\n       * Grid Row Start\n       * @see https://tailwindcss.com/docs/grid-row\n       */\n      'row-start': [{\n        'row-start': scaleGridColRowStartOrEnd()\n      }],\n      /**\n       * Grid Row End\n       * @see https://tailwindcss.com/docs/grid-row\n       */\n      'row-end': [{\n        'row-end': scaleGridColRowStartOrEnd()\n      }],\n      /**\n       * Grid Auto Flow\n       * @see https://tailwindcss.com/docs/grid-auto-flow\n       */\n      'grid-flow': [{\n        'grid-flow': ['row', 'col', 'dense', 'row-dense', 'col-dense']\n      }],\n      /**\n       * Grid Auto Columns\n       * @see https://tailwindcss.com/docs/grid-auto-columns\n       */\n      'auto-cols': [{\n        'auto-cols': scaleGridAutoColsRows()\n      }],\n      /**\n       * Grid Auto Rows\n       * @see https://tailwindcss.com/docs/grid-auto-rows\n       */\n      'auto-rows': [{\n        'auto-rows': scaleGridAutoColsRows()\n      }],\n      /**\n       * Gap\n       * @see https://tailwindcss.com/docs/gap\n       */\n      gap: [{\n        gap: scaleUnambiguousSpacing()\n      }],\n      /**\n       * Gap X\n       * @see https://tailwindcss.com/docs/gap\n       */\n      'gap-x': [{\n        'gap-x': scaleUnambiguousSpacing()\n      }],\n      /**\n       * Gap Y\n       * @see https://tailwindcss.com/docs/gap\n       */\n      'gap-y': [{\n        'gap-y': scaleUnambiguousSpacing()\n      }],\n      /**\n       * Justify Content\n       * @see https://tailwindcss.com/docs/justify-content\n       */\n      'justify-content': [{\n        justify: [...scaleAlignPrimaryAxis(), 'normal']\n      }],\n      /**\n       * Justify Items\n       * @see https://tailwindcss.com/docs/justify-items\n       */\n      'justify-items': [{\n        'justify-items': [...scaleAlignSecondaryAxis(), 'normal']\n      }],\n      /**\n       * Justify Self\n       * @see https://tailwindcss.com/docs/justify-self\n       */\n      'justify-self': [{\n        'justify-self': ['auto', ...scaleAlignSecondaryAxis()]\n      }],\n      /**\n       * Align Content\n       * @see https://tailwindcss.com/docs/align-content\n       */\n      'align-content': [{\n        content: ['normal', ...scaleAlignPrimaryAxis()]\n      }],\n      /**\n       * Align Items\n       * @see https://tailwindcss.com/docs/align-items\n       */\n      'align-items': [{\n        items: [...scaleAlignSecondaryAxis(), {\n          baseline: ['', 'last']\n        }]\n      }],\n      /**\n       * Align Self\n       * @see https://tailwindcss.com/docs/align-self\n       */\n      'align-self': [{\n        self: ['auto', ...scaleAlignSecondaryAxis(), {\n          baseline: ['', 'last']\n        }]\n      }],\n      /**\n       * Place Content\n       * @see https://tailwindcss.com/docs/place-content\n       */\n      'place-content': [{\n        'place-content': scaleAlignPrimaryAxis()\n      }],\n      /**\n       * Place Items\n       * @see https://tailwindcss.com/docs/place-items\n       */\n      'place-items': [{\n        'place-items': [...scaleAlignSecondaryAxis(), 'baseline']\n      }],\n      /**\n       * Place Self\n       * @see https://tailwindcss.com/docs/place-self\n       */\n      'place-self': [{\n        'place-self': ['auto', ...scaleAlignSecondaryAxis()]\n      }],\n      // Spacing\n      /**\n       * Padding\n       * @see https://tailwindcss.com/docs/padding\n       */\n      p: [{\n        p: scaleUnambiguousSpacing()\n      }],\n      /**\n       * Padding X\n       * @see https://tailwindcss.com/docs/padding\n       */\n      px: [{\n        px: scaleUnambiguousSpacing()\n      }],\n      /**\n       * Padding Y\n       * @see https://tailwindcss.com/docs/padding\n       */\n      py: [{\n        py: scaleUnambiguousSpacing()\n      }],\n      /**\n       * Padding Start\n       * @see https://tailwindcss.com/docs/padding\n       */\n      ps: [{\n        ps: scaleUnambiguousSpacing()\n      }],\n      /**\n       * Padding End\n       * @see https://tailwindcss.com/docs/padding\n       */\n      pe: [{\n        pe: scaleUnambiguousSpacing()\n      }],\n      /**\n       * Padding Top\n       * @see https://tailwindcss.com/docs/padding\n       */\n      pt: [{\n        pt: scaleUnambiguousSpacing()\n      }],\n      /**\n       * Padding Right\n       * @see https://tailwindcss.com/docs/padding\n       */\n      pr: [{\n        pr: scaleUnambiguousSpacing()\n      }],\n      /**\n       * Padding Bottom\n       * @see https://tailwindcss.com/docs/padding\n       */\n      pb: [{\n        pb: scaleUnambiguousSpacing()\n      }],\n      /**\n       * Padding Left\n       * @see https://tailwindcss.com/docs/padding\n       */\n      pl: [{\n        pl: scaleUnambiguousSpacing()\n      }],\n      /**\n       * Margin\n       * @see https://tailwindcss.com/docs/margin\n       */\n      m: [{\n        m: scaleMargin()\n      }],\n      /**\n       * Margin X\n       * @see https://tailwindcss.com/docs/margin\n       */\n      mx: [{\n        mx: scaleMargin()\n      }],\n      /**\n       * Margin Y\n       * @see https://tailwindcss.com/docs/margin\n       */\n      my: [{\n        my: scaleMargin()\n      }],\n      /**\n       * Margin Start\n       * @see https://tailwindcss.com/docs/margin\n       */\n      ms: [{\n        ms: scaleMargin()\n      }],\n      /**\n       * Margin End\n       * @see https://tailwindcss.com/docs/margin\n       */\n      me: [{\n        me: scaleMargin()\n      }],\n      /**\n       * Margin Top\n       * @see https://tailwindcss.com/docs/margin\n       */\n      mt: [{\n        mt: scaleMargin()\n      }],\n      /**\n       * Margin Right\n       * @see https://tailwindcss.com/docs/margin\n       */\n      mr: [{\n        mr: scaleMargin()\n      }],\n      /**\n       * Margin Bottom\n       * @see https://tailwindcss.com/docs/margin\n       */\n      mb: [{\n        mb: scaleMargin()\n      }],\n      /**\n       * Margin Left\n       * @see https://tailwindcss.com/docs/margin\n       */\n      ml: [{\n        ml: scaleMargin()\n      }],\n      /**\n       * Space Between X\n       * @see https://tailwindcss.com/docs/margin#adding-space-between-children\n       */\n      'space-x': [{\n        'space-x': scaleUnambiguousSpacing()\n      }],\n      /**\n       * Space Between X Reverse\n       * @see https://tailwindcss.com/docs/margin#adding-space-between-children\n       */\n      'space-x-reverse': ['space-x-reverse'],\n      /**\n       * Space Between Y\n       * @see https://tailwindcss.com/docs/margin#adding-space-between-children\n       */\n      'space-y': [{\n        'space-y': scaleUnambiguousSpacing()\n      }],\n      /**\n       * Space Between Y Reverse\n       * @see https://tailwindcss.com/docs/margin#adding-space-between-children\n       */\n      'space-y-reverse': ['space-y-reverse'],\n      // --------------\n      // --- Sizing ---\n      // --------------\n      /**\n       * Size\n       * @see https://tailwindcss.com/docs/width#setting-both-width-and-height\n       */\n      size: [{\n        size: scaleSizing()\n      }],\n      /**\n       * Width\n       * @see https://tailwindcss.com/docs/width\n       */\n      w: [{\n        w: [themeContainer, 'screen', ...scaleSizing()]\n      }],\n      /**\n       * Min-Width\n       * @see https://tailwindcss.com/docs/min-width\n       */\n      'min-w': [{\n        'min-w': [themeContainer, 'screen', /** Deprecated. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */\n        'none', ...scaleSizing()]\n      }],\n      /**\n       * Max-Width\n       * @see https://tailwindcss.com/docs/max-width\n       */\n      'max-w': [{\n        'max-w': [themeContainer, 'screen', 'none', /** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */\n        'prose', /** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */\n        {\n          screen: [themeBreakpoint]\n        }, ...scaleSizing()]\n      }],\n      /**\n       * Height\n       * @see https://tailwindcss.com/docs/height\n       */\n      h: [{\n        h: ['screen', 'lh', ...scaleSizing()]\n      }],\n      /**\n       * Min-Height\n       * @see https://tailwindcss.com/docs/min-height\n       */\n      'min-h': [{\n        'min-h': ['screen', 'lh', 'none', ...scaleSizing()]\n      }],\n      /**\n       * Max-Height\n       * @see https://tailwindcss.com/docs/max-height\n       */\n      'max-h': [{\n        'max-h': ['screen', 'lh', ...scaleSizing()]\n      }],\n      // ------------------\n      // --- Typography ---\n      // ------------------\n      /**\n       * Font Size\n       * @see https://tailwindcss.com/docs/font-size\n       */\n      'font-size': [{\n        text: ['base', themeText, isArbitraryVariableLength, isArbitraryLength]\n      }],\n      /**\n       * Font Smoothing\n       * @see https://tailwindcss.com/docs/font-smoothing\n       */\n      'font-smoothing': ['antialiased', 'subpixel-antialiased'],\n      /**\n       * Font Style\n       * @see https://tailwindcss.com/docs/font-style\n       */\n      'font-style': ['italic', 'not-italic'],\n      /**\n       * Font Weight\n       * @see https://tailwindcss.com/docs/font-weight\n       */\n      'font-weight': [{\n        font: [themeFontWeight, isArbitraryVariable, isArbitraryNumber]\n      }],\n      /**\n       * Font Stretch\n       * @see https://tailwindcss.com/docs/font-stretch\n       */\n      'font-stretch': [{\n        'font-stretch': ['ultra-condensed', 'extra-condensed', 'condensed', 'semi-condensed', 'normal', 'semi-expanded', 'expanded', 'extra-expanded', 'ultra-expanded', isPercent, isArbitraryValue]\n      }],\n      /**\n       * Font Family\n       * @see https://tailwindcss.com/docs/font-family\n       */\n      'font-family': [{\n        font: [isArbitraryVariableFamilyName, isArbitraryValue, themeFont]\n      }],\n      /**\n       * Font Variant Numeric\n       * @see https://tailwindcss.com/docs/font-variant-numeric\n       */\n      'fvn-normal': ['normal-nums'],\n      /**\n       * Font Variant Numeric\n       * @see https://tailwindcss.com/docs/font-variant-numeric\n       */\n      'fvn-ordinal': ['ordinal'],\n      /**\n       * Font Variant Numeric\n       * @see https://tailwindcss.com/docs/font-variant-numeric\n       */\n      'fvn-slashed-zero': ['slashed-zero'],\n      /**\n       * Font Variant Numeric\n       * @see https://tailwindcss.com/docs/font-variant-numeric\n       */\n      'fvn-figure': ['lining-nums', 'oldstyle-nums'],\n      /**\n       * Font Variant Numeric\n       * @see https://tailwindcss.com/docs/font-variant-numeric\n       */\n      'fvn-spacing': ['proportional-nums', 'tabular-nums'],\n      /**\n       * Font Variant Numeric\n       * @see https://tailwindcss.com/docs/font-variant-numeric\n       */\n      'fvn-fraction': ['diagonal-fractions', 'stacked-fractions'],\n      /**\n       * Letter Spacing\n       * @see https://tailwindcss.com/docs/letter-spacing\n       */\n      tracking: [{\n        tracking: [themeTracking, isArbitraryVariable, isArbitraryValue]\n      }],\n      /**\n       * Line Clamp\n       * @see https://tailwindcss.com/docs/line-clamp\n       */\n      'line-clamp': [{\n        'line-clamp': [isNumber, 'none', isArbitraryVariable, isArbitraryNumber]\n      }],\n      /**\n       * Line Height\n       * @see https://tailwindcss.com/docs/line-height\n       */\n      leading: [{\n        leading: [/** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */\n        themeLeading, ...scaleUnambiguousSpacing()]\n      }],\n      /**\n       * List Style Image\n       * @see https://tailwindcss.com/docs/list-style-image\n       */\n      'list-image': [{\n        'list-image': ['none', isArbitraryVariable, isArbitraryValue]\n      }],\n      /**\n       * List Style Position\n       * @see https://tailwindcss.com/docs/list-style-position\n       */\n      'list-style-position': [{\n        list: ['inside', 'outside']\n      }],\n      /**\n       * List Style Type\n       * @see https://tailwindcss.com/docs/list-style-type\n       */\n      'list-style-type': [{\n        list: ['disc', 'decimal', 'none', isArbitraryVariable, isArbitraryValue]\n      }],\n      /**\n       * Text Alignment\n       * @see https://tailwindcss.com/docs/text-align\n       */\n      'text-alignment': [{\n        text: ['left', 'center', 'right', 'justify', 'start', 'end']\n      }],\n      /**\n       * Placeholder Color\n       * @deprecated since Tailwind CSS v3.0.0\n       * @see https://v3.tailwindcss.com/docs/placeholder-color\n       */\n      'placeholder-color': [{\n        placeholder: scaleColor()\n      }],\n      /**\n       * Text Color\n       * @see https://tailwindcss.com/docs/text-color\n       */\n      'text-color': [{\n        text: scaleColor()\n      }],\n      /**\n       * Text Decoration\n       * @see https://tailwindcss.com/docs/text-decoration\n       */\n      'text-decoration': ['underline', 'overline', 'line-through', 'no-underline'],\n      /**\n       * Text Decoration Style\n       * @see https://tailwindcss.com/docs/text-decoration-style\n       */\n      'text-decoration-style': [{\n        decoration: [...scaleLineStyle(), 'wavy']\n      }],\n      /**\n       * Text Decoration Thickness\n       * @see https://tailwindcss.com/docs/text-decoration-thickness\n       */\n      'text-decoration-thickness': [{\n        decoration: [isNumber, 'from-font', 'auto', isArbitraryVariable, isArbitraryLength]\n      }],\n      /**\n       * Text Decoration Color\n       * @see https://tailwindcss.com/docs/text-decoration-color\n       */\n      'text-decoration-color': [{\n        decoration: scaleColor()\n      }],\n      /**\n       * Text Underline Offset\n       * @see https://tailwindcss.com/docs/text-underline-offset\n       */\n      'underline-offset': [{\n        'underline-offset': [isNumber, 'auto', isArbitraryVariable, isArbitraryValue]\n      }],\n      /**\n       * Text Transform\n       * @see https://tailwindcss.com/docs/text-transform\n       */\n      'text-transform': ['uppercase', 'lowercase', 'capitalize', 'normal-case'],\n      /**\n       * Text Overflow\n       * @see https://tailwindcss.com/docs/text-overflow\n       */\n      'text-overflow': ['truncate', 'text-ellipsis', 'text-clip'],\n      /**\n       * Text Wrap\n       * @see https://tailwindcss.com/docs/text-wrap\n       */\n      'text-wrap': [{\n        text: ['wrap', 'nowrap', 'balance', 'pretty']\n      }],\n      /**\n       * Text Indent\n       * @see https://tailwindcss.com/docs/text-indent\n       */\n      indent: [{\n        indent: scaleUnambiguousSpacing()\n      }],\n      /**\n       * Vertical Alignment\n       * @see https://tailwindcss.com/docs/vertical-align\n       */\n      'vertical-align': [{\n        align: ['baseline', 'top', 'middle', 'bottom', 'text-top', 'text-bottom', 'sub', 'super', isArbitraryVariable, isArbitraryValue]\n      }],\n      /**\n       * Whitespace\n       * @see https://tailwindcss.com/docs/whitespace\n       */\n      whitespace: [{\n        whitespace: ['normal', 'nowrap', 'pre', 'pre-line', 'pre-wrap', 'break-spaces']\n      }],\n      /**\n       * Word Break\n       * @see https://tailwindcss.com/docs/word-break\n       */\n      break: [{\n        break: ['normal', 'words', 'all', 'keep']\n      }],\n      /**\n       * Overflow Wrap\n       * @see https://tailwindcss.com/docs/overflow-wrap\n       */\n      wrap: [{\n        wrap: ['break-word', 'anywhere', 'normal']\n      }],\n      /**\n       * Hyphens\n       * @see https://tailwindcss.com/docs/hyphens\n       */\n      hyphens: [{\n        hyphens: ['none', 'manual', 'auto']\n      }],\n      /**\n       * Content\n       * @see https://tailwindcss.com/docs/content\n       */\n      content: [{\n        content: ['none', isArbitraryVariable, isArbitraryValue]\n      }],\n      // -------------------\n      // --- Backgrounds ---\n      // -------------------\n      /**\n       * Background Attachment\n       * @see https://tailwindcss.com/docs/background-attachment\n       */\n      'bg-attachment': [{\n        bg: ['fixed', 'local', 'scroll']\n      }],\n      /**\n       * Background Clip\n       * @see https://tailwindcss.com/docs/background-clip\n       */\n      'bg-clip': [{\n        'bg-clip': ['border', 'padding', 'content', 'text']\n      }],\n      /**\n       * Background Origin\n       * @see https://tailwindcss.com/docs/background-origin\n       */\n      'bg-origin': [{\n        'bg-origin': ['border', 'padding', 'content']\n      }],\n      /**\n       * Background Position\n       * @see https://tailwindcss.com/docs/background-position\n       */\n      'bg-position': [{\n        bg: scaleBgPosition()\n      }],\n      /**\n       * Background Repeat\n       * @see https://tailwindcss.com/docs/background-repeat\n       */\n      'bg-repeat': [{\n        bg: scaleBgRepeat()\n      }],\n      /**\n       * Background Size\n       * @see https://tailwindcss.com/docs/background-size\n       */\n      'bg-size': [{\n        bg: scaleBgSize()\n      }],\n      /**\n       * Background Image\n       * @see https://tailwindcss.com/docs/background-image\n       */\n      'bg-image': [{\n        bg: ['none', {\n          linear: [{\n            to: ['t', 'tr', 'r', 'br', 'b', 'bl', 'l', 'tl']\n          }, isInteger, isArbitraryVariable, isArbitraryValue],\n          radial: ['', isArbitraryVariable, isArbitraryValue],\n          conic: [isInteger, isArbitraryVariable, isArbitraryValue]\n        }, isArbitraryVariableImage, isArbitraryImage]\n      }],\n      /**\n       * Background Color\n       * @see https://tailwindcss.com/docs/background-color\n       */\n      'bg-color': [{\n        bg: scaleColor()\n      }],\n      /**\n       * Gradient Color Stops From Position\n       * @see https://tailwindcss.com/docs/gradient-color-stops\n       */\n      'gradient-from-pos': [{\n        from: scaleGradientStopPosition()\n      }],\n      /**\n       * Gradient Color Stops Via Position\n       * @see https://tailwindcss.com/docs/gradient-color-stops\n       */\n      'gradient-via-pos': [{\n        via: scaleGradientStopPosition()\n      }],\n      /**\n       * Gradient Color Stops To Position\n       * @see https://tailwindcss.com/docs/gradient-color-stops\n       */\n      'gradient-to-pos': [{\n        to: scaleGradientStopPosition()\n      }],\n      /**\n       * Gradient Color Stops From\n       * @see https://tailwindcss.com/docs/gradient-color-stops\n       */\n      'gradient-from': [{\n        from: scaleColor()\n      }],\n      /**\n       * Gradient Color Stops Via\n       * @see https://tailwindcss.com/docs/gradient-color-stops\n       */\n      'gradient-via': [{\n        via: scaleColor()\n      }],\n      /**\n       * Gradient Color Stops To\n       * @see https://tailwindcss.com/docs/gradient-color-stops\n       */\n      'gradient-to': [{\n        to: scaleColor()\n      }],\n      // ---------------\n      // --- Borders ---\n      // ---------------\n      /**\n       * Border Radius\n       * @see https://tailwindcss.com/docs/border-radius\n       */\n      rounded: [{\n        rounded: scaleRadius()\n      }],\n      /**\n       * Border Radius Start\n       * @see https://tailwindcss.com/docs/border-radius\n       */\n      'rounded-s': [{\n        'rounded-s': scaleRadius()\n      }],\n      /**\n       * Border Radius End\n       * @see https://tailwindcss.com/docs/border-radius\n       */\n      'rounded-e': [{\n        'rounded-e': scaleRadius()\n      }],\n      /**\n       * Border Radius Top\n       * @see https://tailwindcss.com/docs/border-radius\n       */\n      'rounded-t': [{\n        'rounded-t': scaleRadius()\n      }],\n      /**\n       * Border Radius Right\n       * @see https://tailwindcss.com/docs/border-radius\n       */\n      'rounded-r': [{\n        'rounded-r': scaleRadius()\n      }],\n      /**\n       * Border Radius Bottom\n       * @see https://tailwindcss.com/docs/border-radius\n       */\n      'rounded-b': [{\n        'rounded-b': scaleRadius()\n      }],\n      /**\n       * Border Radius Left\n       * @see https://tailwindcss.com/docs/border-radius\n       */\n      'rounded-l': [{\n        'rounded-l': scaleRadius()\n      }],\n      /**\n       * Border Radius Start Start\n       * @see https://tailwindcss.com/docs/border-radius\n       */\n      'rounded-ss': [{\n        'rounded-ss': scaleRadius()\n      }],\n      /**\n       * Border Radius Start End\n       * @see https://tailwindcss.com/docs/border-radius\n       */\n      'rounded-se': [{\n        'rounded-se': scaleRadius()\n      }],\n      /**\n       * Border Radius End End\n       * @see https://tailwindcss.com/docs/border-radius\n       */\n      'rounded-ee': [{\n        'rounded-ee': scaleRadius()\n      }],\n      /**\n       * Border Radius End Start\n       * @see https://tailwindcss.com/docs/border-radius\n       */\n      'rounded-es': [{\n        'rounded-es': scaleRadius()\n      }],\n      /**\n       * Border Radius Top Left\n       * @see https://tailwindcss.com/docs/border-radius\n       */\n      'rounded-tl': [{\n        'rounded-tl': scaleRadius()\n      }],\n      /**\n       * Border Radius Top Right\n       * @see https://tailwindcss.com/docs/border-radius\n       */\n      'rounded-tr': [{\n        'rounded-tr': scaleRadius()\n      }],\n      /**\n       * Border Radius Bottom Right\n       * @see https://tailwindcss.com/docs/border-radius\n       */\n      'rounded-br': [{\n        'rounded-br': scaleRadius()\n      }],\n      /**\n       * Border Radius Bottom Left\n       * @see https://tailwindcss.com/docs/border-radius\n       */\n      'rounded-bl': [{\n        'rounded-bl': scaleRadius()\n      }],\n      /**\n       * Border Width\n       * @see https://tailwindcss.com/docs/border-width\n       */\n      'border-w': [{\n        border: scaleBorderWidth()\n      }],\n      /**\n       * Border Width X\n       * @see https://tailwindcss.com/docs/border-width\n       */\n      'border-w-x': [{\n        'border-x': scaleBorderWidth()\n      }],\n      /**\n       * Border Width Y\n       * @see https://tailwindcss.com/docs/border-width\n       */\n      'border-w-y': [{\n        'border-y': scaleBorderWidth()\n      }],\n      /**\n       * Border Width Start\n       * @see https://tailwindcss.com/docs/border-width\n       */\n      'border-w-s': [{\n        'border-s': scaleBorderWidth()\n      }],\n      /**\n       * Border Width End\n       * @see https://tailwindcss.com/docs/border-width\n       */\n      'border-w-e': [{\n        'border-e': scaleBorderWidth()\n      }],\n      /**\n       * Border Width Top\n       * @see https://tailwindcss.com/docs/border-width\n       */\n      'border-w-t': [{\n        'border-t': scaleBorderWidth()\n      }],\n      /**\n       * Border Width Right\n       * @see https://tailwindcss.com/docs/border-width\n       */\n      'border-w-r': [{\n        'border-r': scaleBorderWidth()\n      }],\n      /**\n       * Border Width Bottom\n       * @see https://tailwindcss.com/docs/border-width\n       */\n      'border-w-b': [{\n        'border-b': scaleBorderWidth()\n      }],\n      /**\n       * Border Width Left\n       * @see https://tailwindcss.com/docs/border-width\n       */\n      'border-w-l': [{\n        'border-l': scaleBorderWidth()\n      }],\n      /**\n       * Divide Width X\n       * @see https://tailwindcss.com/docs/border-width#between-children\n       */\n      'divide-x': [{\n        'divide-x': scaleBorderWidth()\n      }],\n      /**\n       * Divide Width X Reverse\n       * @see https://tailwindcss.com/docs/border-width#between-children\n       */\n      'divide-x-reverse': ['divide-x-reverse'],\n      /**\n       * Divide Width Y\n       * @see https://tailwindcss.com/docs/border-width#between-children\n       */\n      'divide-y': [{\n        'divide-y': scaleBorderWidth()\n      }],\n      /**\n       * Divide Width Y Reverse\n       * @see https://tailwindcss.com/docs/border-width#between-children\n       */\n      'divide-y-reverse': ['divide-y-reverse'],\n      /**\n       * Border Style\n       * @see https://tailwindcss.com/docs/border-style\n       */\n      'border-style': [{\n        border: [...scaleLineStyle(), 'hidden', 'none']\n      }],\n      /**\n       * Divide Style\n       * @see https://tailwindcss.com/docs/border-style#setting-the-divider-style\n       */\n      'divide-style': [{\n        divide: [...scaleLineStyle(), 'hidden', 'none']\n      }],\n      /**\n       * Border Color\n       * @see https://tailwindcss.com/docs/border-color\n       */\n      'border-color': [{\n        border: scaleColor()\n      }],\n      /**\n       * Border Color X\n       * @see https://tailwindcss.com/docs/border-color\n       */\n      'border-color-x': [{\n        'border-x': scaleColor()\n      }],\n      /**\n       * Border Color Y\n       * @see https://tailwindcss.com/docs/border-color\n       */\n      'border-color-y': [{\n        'border-y': scaleColor()\n      }],\n      /**\n       * Border Color S\n       * @see https://tailwindcss.com/docs/border-color\n       */\n      'border-color-s': [{\n        'border-s': scaleColor()\n      }],\n      /**\n       * Border Color E\n       * @see https://tailwindcss.com/docs/border-color\n       */\n      'border-color-e': [{\n        'border-e': scaleColor()\n      }],\n      /**\n       * Border Color Top\n       * @see https://tailwindcss.com/docs/border-color\n       */\n      'border-color-t': [{\n        'border-t': scaleColor()\n      }],\n      /**\n       * Border Color Right\n       * @see https://tailwindcss.com/docs/border-color\n       */\n      'border-color-r': [{\n        'border-r': scaleColor()\n      }],\n      /**\n       * Border Color Bottom\n       * @see https://tailwindcss.com/docs/border-color\n       */\n      'border-color-b': [{\n        'border-b': scaleColor()\n      }],\n      /**\n       * Border Color Left\n       * @see https://tailwindcss.com/docs/border-color\n       */\n      'border-color-l': [{\n        'border-l': scaleColor()\n      }],\n      /**\n       * Divide Color\n       * @see https://tailwindcss.com/docs/divide-color\n       */\n      'divide-color': [{\n        divide: scaleColor()\n      }],\n      /**\n       * Outline Style\n       * @see https://tailwindcss.com/docs/outline-style\n       */\n      'outline-style': [{\n        outline: [...scaleLineStyle(), 'none', 'hidden']\n      }],\n      /**\n       * Outline Offset\n       * @see https://tailwindcss.com/docs/outline-offset\n       */\n      'outline-offset': [{\n        'outline-offset': [isNumber, isArbitraryVariable, isArbitraryValue]\n      }],\n      /**\n       * Outline Width\n       * @see https://tailwindcss.com/docs/outline-width\n       */\n      'outline-w': [{\n        outline: ['', isNumber, isArbitraryVariableLength, isArbitraryLength]\n      }],\n      /**\n       * Outline Color\n       * @see https://tailwindcss.com/docs/outline-color\n       */\n      'outline-color': [{\n        outline: scaleColor()\n      }],\n      // ---------------\n      // --- Effects ---\n      // ---------------\n      /**\n       * Box Shadow\n       * @see https://tailwindcss.com/docs/box-shadow\n       */\n      shadow: [{\n        shadow: [\n        // Deprecated since Tailwind CSS v4.0.0\n        '', 'none', themeShadow, isArbitraryVariableShadow, isArbitraryShadow]\n      }],\n      /**\n       * Box Shadow Color\n       * @see https://tailwindcss.com/docs/box-shadow#setting-the-shadow-color\n       */\n      'shadow-color': [{\n        shadow: scaleColor()\n      }],\n      /**\n       * Inset Box Shadow\n       * @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-shadow\n       */\n      'inset-shadow': [{\n        'inset-shadow': ['none', themeInsetShadow, isArbitraryVariableShadow, isArbitraryShadow]\n      }],\n      /**\n       * Inset Box Shadow Color\n       * @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-shadow-color\n       */\n      'inset-shadow-color': [{\n        'inset-shadow': scaleColor()\n      }],\n      /**\n       * Ring Width\n       * @see https://tailwindcss.com/docs/box-shadow#adding-a-ring\n       */\n      'ring-w': [{\n        ring: scaleBorderWidth()\n      }],\n      /**\n       * Ring Width Inset\n       * @see https://v3.tailwindcss.com/docs/ring-width#inset-rings\n       * @deprecated since Tailwind CSS v4.0.0\n       * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158\n       */\n      'ring-w-inset': ['ring-inset'],\n      /**\n       * Ring Color\n       * @see https://tailwindcss.com/docs/box-shadow#setting-the-ring-color\n       */\n      'ring-color': [{\n        ring: scaleColor()\n      }],\n      /**\n       * Ring Offset Width\n       * @see https://v3.tailwindcss.com/docs/ring-offset-width\n       * @deprecated since Tailwind CSS v4.0.0\n       * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158\n       */\n      'ring-offset-w': [{\n        'ring-offset': [isNumber, isArbitraryLength]\n      }],\n      /**\n       * Ring Offset Color\n       * @see https://v3.tailwindcss.com/docs/ring-offset-color\n       * @deprecated since Tailwind CSS v4.0.0\n       * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158\n       */\n      'ring-offset-color': [{\n        'ring-offset': scaleColor()\n      }],\n      /**\n       * Inset Ring Width\n       * @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-ring\n       */\n      'inset-ring-w': [{\n        'inset-ring': scaleBorderWidth()\n      }],\n      /**\n       * Inset Ring Color\n       * @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-ring-color\n       */\n      'inset-ring-color': [{\n        'inset-ring': scaleColor()\n      }],\n      /**\n       * Text Shadow\n       * @see https://tailwindcss.com/docs/text-shadow\n       */\n      'text-shadow': [{\n        'text-shadow': ['none', themeTextShadow, isArbitraryVariableShadow, isArbitraryShadow]\n      }],\n      /**\n       * Text Shadow Color\n       * @see https://tailwindcss.com/docs/text-shadow#setting-the-shadow-color\n       */\n      'text-shadow-color': [{\n        'text-shadow': scaleColor()\n      }],\n      /**\n       * Opacity\n       * @see https://tailwindcss.com/docs/opacity\n       */\n      opacity: [{\n        opacity: [isNumber, isArbitraryVariable, isArbitraryValue]\n      }],\n      /**\n       * Mix Blend Mode\n       * @see https://tailwindcss.com/docs/mix-blend-mode\n       */\n      'mix-blend': [{\n        'mix-blend': [...scaleBlendMode(), 'plus-darker', 'plus-lighter']\n      }],\n      /**\n       * Background Blend Mode\n       * @see https://tailwindcss.com/docs/background-blend-mode\n       */\n      'bg-blend': [{\n        'bg-blend': scaleBlendMode()\n      }],\n      /**\n       * Mask Clip\n       * @see https://tailwindcss.com/docs/mask-clip\n       */\n      'mask-clip': [{\n        'mask-clip': ['border', 'padding', 'content', 'fill', 'stroke', 'view']\n      }, 'mask-no-clip'],\n      /**\n       * Mask Composite\n       * @see https://tailwindcss.com/docs/mask-composite\n       */\n      'mask-composite': [{\n        mask: ['add', 'subtract', 'intersect', 'exclude']\n      }],\n      /**\n       * Mask Image\n       * @see https://tailwindcss.com/docs/mask-image\n       */\n      'mask-image-linear-pos': [{\n        'mask-linear': [isNumber]\n      }],\n      'mask-image-linear-from-pos': [{\n        'mask-linear-from': scaleMaskImagePosition()\n      }],\n      'mask-image-linear-to-pos': [{\n        'mask-linear-to': scaleMaskImagePosition()\n      }],\n      'mask-image-linear-from-color': [{\n        'mask-linear-from': scaleColor()\n      }],\n      'mask-image-linear-to-color': [{\n        'mask-linear-to': scaleColor()\n      }],\n      'mask-image-t-from-pos': [{\n        'mask-t-from': scaleMaskImagePosition()\n      }],\n      'mask-image-t-to-pos': [{\n        'mask-t-to': scaleMaskImagePosition()\n      }],\n      'mask-image-t-from-color': [{\n        'mask-t-from': scaleColor()\n      }],\n      'mask-image-t-to-color': [{\n        'mask-t-to': scaleColor()\n      }],\n      'mask-image-r-from-pos': [{\n        'mask-r-from': scaleMaskImagePosition()\n      }],\n      'mask-image-r-to-pos': [{\n        'mask-r-to': scaleMaskImagePosition()\n      }],\n      'mask-image-r-from-color': [{\n        'mask-r-from': scaleColor()\n      }],\n      'mask-image-r-to-color': [{\n        'mask-r-to': scaleColor()\n      }],\n      'mask-image-b-from-pos': [{\n        'mask-b-from': scaleMaskImagePosition()\n      }],\n      'mask-image-b-to-pos': [{\n        'mask-b-to': scaleMaskImagePosition()\n      }],\n      'mask-image-b-from-color': [{\n        'mask-b-from': scaleColor()\n      }],\n      'mask-image-b-to-color': [{\n        'mask-b-to': scaleColor()\n      }],\n      'mask-image-l-from-pos': [{\n        'mask-l-from': scaleMaskImagePosition()\n      }],\n      'mask-image-l-to-pos': [{\n        'mask-l-to': scaleMaskImagePosition()\n      }],\n      'mask-image-l-from-color': [{\n        'mask-l-from': scaleColor()\n      }],\n      'mask-image-l-to-color': [{\n        'mask-l-to': scaleColor()\n      }],\n      'mask-image-x-from-pos': [{\n        'mask-x-from': scaleMaskImagePosition()\n      }],\n      'mask-image-x-to-pos': [{\n        'mask-x-to': scaleMaskImagePosition()\n      }],\n      'mask-image-x-from-color': [{\n        'mask-x-from': scaleColor()\n      }],\n      'mask-image-x-to-color': [{\n        'mask-x-to': scaleColor()\n      }],\n      'mask-image-y-from-pos': [{\n        'mask-y-from': scaleMaskImagePosition()\n      }],\n      'mask-image-y-to-pos': [{\n        'mask-y-to': scaleMaskImagePosition()\n      }],\n      'mask-image-y-from-color': [{\n        'mask-y-from': scaleColor()\n      }],\n      'mask-image-y-to-color': [{\n        'mask-y-to': scaleColor()\n      }],\n      'mask-image-radial': [{\n        'mask-radial': [isArbitraryVariable, isArbitraryValue]\n      }],\n      'mask-image-radial-from-pos': [{\n        'mask-radial-from': scaleMaskImagePosition()\n      }],\n      'mask-image-radial-to-pos': [{\n        'mask-radial-to': scaleMaskImagePosition()\n      }],\n      'mask-image-radial-from-color': [{\n        'mask-radial-from': scaleColor()\n      }],\n      'mask-image-radial-to-color': [{\n        'mask-radial-to': scaleColor()\n      }],\n      'mask-image-radial-shape': [{\n        'mask-radial': ['circle', 'ellipse']\n      }],\n      'mask-image-radial-size': [{\n        'mask-radial': [{\n          closest: ['side', 'corner'],\n          farthest: ['side', 'corner']\n        }]\n      }],\n      'mask-image-radial-pos': [{\n        'mask-radial-at': scalePosition()\n      }],\n      'mask-image-conic-pos': [{\n        'mask-conic': [isNumber]\n      }],\n      'mask-image-conic-from-pos': [{\n        'mask-conic-from': scaleMaskImagePosition()\n      }],\n      'mask-image-conic-to-pos': [{\n        'mask-conic-to': scaleMaskImagePosition()\n      }],\n      'mask-image-conic-from-color': [{\n        'mask-conic-from': scaleColor()\n      }],\n      'mask-image-conic-to-color': [{\n        'mask-conic-to': scaleColor()\n      }],\n      /**\n       * Mask Mode\n       * @see https://tailwindcss.com/docs/mask-mode\n       */\n      'mask-mode': [{\n        mask: ['alpha', 'luminance', 'match']\n      }],\n      /**\n       * Mask Origin\n       * @see https://tailwindcss.com/docs/mask-origin\n       */\n      'mask-origin': [{\n        'mask-origin': ['border', 'padding', 'content', 'fill', 'stroke', 'view']\n      }],\n      /**\n       * Mask Position\n       * @see https://tailwindcss.com/docs/mask-position\n       */\n      'mask-position': [{\n        mask: scaleBgPosition()\n      }],\n      /**\n       * Mask Repeat\n       * @see https://tailwindcss.com/docs/mask-repeat\n       */\n      'mask-repeat': [{\n        mask: scaleBgRepeat()\n      }],\n      /**\n       * Mask Size\n       * @see https://tailwindcss.com/docs/mask-size\n       */\n      'mask-size': [{\n        mask: scaleBgSize()\n      }],\n      /**\n       * Mask Type\n       * @see https://tailwindcss.com/docs/mask-type\n       */\n      'mask-type': [{\n        'mask-type': ['alpha', 'luminance']\n      }],\n      /**\n       * Mask Image\n       * @see https://tailwindcss.com/docs/mask-image\n       */\n      'mask-image': [{\n        mask: ['none', isArbitraryVariable, isArbitraryValue]\n      }],\n      // ---------------\n      // --- Filters ---\n      // ---------------\n      /**\n       * Filter\n       * @see https://tailwindcss.com/docs/filter\n       */\n      filter: [{\n        filter: [\n        // Deprecated since Tailwind CSS v3.0.0\n        '', 'none', isArbitraryVariable, isArbitraryValue]\n      }],\n      /**\n       * Blur\n       * @see https://tailwindcss.com/docs/blur\n       */\n      blur: [{\n        blur: scaleBlur()\n      }],\n      /**\n       * Brightness\n       * @see https://tailwindcss.com/docs/brightness\n       */\n      brightness: [{\n        brightness: [isNumber, isArbitraryVariable, isArbitraryValue]\n      }],\n      /**\n       * Contrast\n       * @see https://tailwindcss.com/docs/contrast\n       */\n      contrast: [{\n        contrast: [isNumber, isArbitraryVariable, isArbitraryValue]\n      }],\n      /**\n       * Drop Shadow\n       * @see https://tailwindcss.com/docs/drop-shadow\n       */\n      'drop-shadow': [{\n        'drop-shadow': [\n        // Deprecated since Tailwind CSS v4.0.0\n        '', 'none', themeDropShadow, isArbitraryVariableShadow, isArbitraryShadow]\n      }],\n      /**\n       * Drop Shadow Color\n       * @see https://tailwindcss.com/docs/filter-drop-shadow#setting-the-shadow-color\n       */\n      'drop-shadow-color': [{\n        'drop-shadow': scaleColor()\n      }],\n      /**\n       * Grayscale\n       * @see https://tailwindcss.com/docs/grayscale\n       */\n      grayscale: [{\n        grayscale: ['', isNumber, isArbitraryVariable, isArbitraryValue]\n      }],\n      /**\n       * Hue Rotate\n       * @see https://tailwindcss.com/docs/hue-rotate\n       */\n      'hue-rotate': [{\n        'hue-rotate': [isNumber, isArbitraryVariable, isArbitraryValue]\n      }],\n      /**\n       * Invert\n       * @see https://tailwindcss.com/docs/invert\n       */\n      invert: [{\n        invert: ['', isNumber, isArbitraryVariable, isArbitraryValue]\n      }],\n      /**\n       * Saturate\n       * @see https://tailwindcss.com/docs/saturate\n       */\n      saturate: [{\n        saturate: [isNumber, isArbitraryVariable, isArbitraryValue]\n      }],\n      /**\n       * Sepia\n       * @see https://tailwindcss.com/docs/sepia\n       */\n      sepia: [{\n        sepia: ['', isNumber, isArbitraryVariable, isArbitraryValue]\n      }],\n      /**\n       * Backdrop Filter\n       * @see https://tailwindcss.com/docs/backdrop-filter\n       */\n      'backdrop-filter': [{\n        'backdrop-filter': [\n        // Deprecated since Tailwind CSS v3.0.0\n        '', 'none', isArbitraryVariable, isArbitraryValue]\n      }],\n      /**\n       * Backdrop Blur\n       * @see https://tailwindcss.com/docs/backdrop-blur\n       */\n      'backdrop-blur': [{\n        'backdrop-blur': scaleBlur()\n      }],\n      /**\n       * Backdrop Brightness\n       * @see https://tailwindcss.com/docs/backdrop-brightness\n       */\n      'backdrop-brightness': [{\n        'backdrop-brightness': [isNumber, isArbitraryVariable, isArbitraryValue]\n      }],\n      /**\n       * Backdrop Contrast\n       * @see https://tailwindcss.com/docs/backdrop-contrast\n       */\n      'backdrop-contrast': [{\n        'backdrop-contrast': [isNumber, isArbitraryVariable, isArbitraryValue]\n      }],\n      /**\n       * Backdrop Grayscale\n       * @see https://tailwindcss.com/docs/backdrop-grayscale\n       */\n      'backdrop-grayscale': [{\n        'backdrop-grayscale': ['', isNumber, isArbitraryVariable, isArbitraryValue]\n      }],\n      /**\n       * Backdrop Hue Rotate\n       * @see https://tailwindcss.com/docs/backdrop-hue-rotate\n       */\n      'backdrop-hue-rotate': [{\n        'backdrop-hue-rotate': [isNumber, isArbitraryVariable, isArbitraryValue]\n      }],\n      /**\n       * Backdrop Invert\n       * @see https://tailwindcss.com/docs/backdrop-invert\n       */\n      'backdrop-invert': [{\n        'backdrop-invert': ['', isNumber, isArbitraryVariable, isArbitraryValue]\n      }],\n      /**\n       * Backdrop Opacity\n       * @see https://tailwindcss.com/docs/backdrop-opacity\n       */\n      'backdrop-opacity': [{\n        'backdrop-opacity': [isNumber, isArbitraryVariable, isArbitraryValue]\n      }],\n      /**\n       * Backdrop Saturate\n       * @see https://tailwindcss.com/docs/backdrop-saturate\n       */\n      'backdrop-saturate': [{\n        'backdrop-saturate': [isNumber, isArbitraryVariable, isArbitraryValue]\n      }],\n      /**\n       * Backdrop Sepia\n       * @see https://tailwindcss.com/docs/backdrop-sepia\n       */\n      'backdrop-sepia': [{\n        'backdrop-sepia': ['', isNumber, isArbitraryVariable, isArbitraryValue]\n      }],\n      // --------------\n      // --- Tables ---\n      // --------------\n      /**\n       * Border Collapse\n       * @see https://tailwindcss.com/docs/border-collapse\n       */\n      'border-collapse': [{\n        border: ['collapse', 'separate']\n      }],\n      /**\n       * Border Spacing\n       * @see https://tailwindcss.com/docs/border-spacing\n       */\n      'border-spacing': [{\n        'border-spacing': scaleUnambiguousSpacing()\n      }],\n      /**\n       * Border Spacing X\n       * @see https://tailwindcss.com/docs/border-spacing\n       */\n      'border-spacing-x': [{\n        'border-spacing-x': scaleUnambiguousSpacing()\n      }],\n      /**\n       * Border Spacing Y\n       * @see https://tailwindcss.com/docs/border-spacing\n       */\n      'border-spacing-y': [{\n        'border-spacing-y': scaleUnambiguousSpacing()\n      }],\n      /**\n       * Table Layout\n       * @see https://tailwindcss.com/docs/table-layout\n       */\n      'table-layout': [{\n        table: ['auto', 'fixed']\n      }],\n      /**\n       * Caption Side\n       * @see https://tailwindcss.com/docs/caption-side\n       */\n      caption: [{\n        caption: ['top', 'bottom']\n      }],\n      // ---------------------------------\n      // --- Transitions and Animation ---\n      // ---------------------------------\n      /**\n       * Transition Property\n       * @see https://tailwindcss.com/docs/transition-property\n       */\n      transition: [{\n        transition: ['', 'all', 'colors', 'opacity', 'shadow', 'transform', 'none', isArbitraryVariable, isArbitraryValue]\n      }],\n      /**\n       * Transition Behavior\n       * @see https://tailwindcss.com/docs/transition-behavior\n       */\n      'transition-behavior': [{\n        transition: ['normal', 'discrete']\n      }],\n      /**\n       * Transition Duration\n       * @see https://tailwindcss.com/docs/transition-duration\n       */\n      duration: [{\n        duration: [isNumber, 'initial', isArbitraryVariable, isArbitraryValue]\n      }],\n      /**\n       * Transition Timing Function\n       * @see https://tailwindcss.com/docs/transition-timing-function\n       */\n      ease: [{\n        ease: ['linear', 'initial', themeEase, isArbitraryVariable, isArbitraryValue]\n      }],\n      /**\n       * Transition Delay\n       * @see https://tailwindcss.com/docs/transition-delay\n       */\n      delay: [{\n        delay: [isNumber, isArbitraryVariable, isArbitraryValue]\n      }],\n      /**\n       * Animation\n       * @see https://tailwindcss.com/docs/animation\n       */\n      animate: [{\n        animate: ['none', themeAnimate, isArbitraryVariable, isArbitraryValue]\n      }],\n      // ------------------\n      // --- Transforms ---\n      // ------------------\n      /**\n       * Backface Visibility\n       * @see https://tailwindcss.com/docs/backface-visibility\n       */\n      backface: [{\n        backface: ['hidden', 'visible']\n      }],\n      /**\n       * Perspective\n       * @see https://tailwindcss.com/docs/perspective\n       */\n      perspective: [{\n        perspective: [themePerspective, isArbitraryVariable, isArbitraryValue]\n      }],\n      /**\n       * Perspective Origin\n       * @see https://tailwindcss.com/docs/perspective-origin\n       */\n      'perspective-origin': [{\n        'perspective-origin': scalePositionWithArbitrary()\n      }],\n      /**\n       * Rotate\n       * @see https://tailwindcss.com/docs/rotate\n       */\n      rotate: [{\n        rotate: scaleRotate()\n      }],\n      /**\n       * Rotate X\n       * @see https://tailwindcss.com/docs/rotate\n       */\n      'rotate-x': [{\n        'rotate-x': scaleRotate()\n      }],\n      /**\n       * Rotate Y\n       * @see https://tailwindcss.com/docs/rotate\n       */\n      'rotate-y': [{\n        'rotate-y': scaleRotate()\n      }],\n      /**\n       * Rotate Z\n       * @see https://tailwindcss.com/docs/rotate\n       */\n      'rotate-z': [{\n        'rotate-z': scaleRotate()\n      }],\n      /**\n       * Scale\n       * @see https://tailwindcss.com/docs/scale\n       */\n      scale: [{\n        scale: scaleScale()\n      }],\n      /**\n       * Scale X\n       * @see https://tailwindcss.com/docs/scale\n       */\n      'scale-x': [{\n        'scale-x': scaleScale()\n      }],\n      /**\n       * Scale Y\n       * @see https://tailwindcss.com/docs/scale\n       */\n      'scale-y': [{\n        'scale-y': scaleScale()\n      }],\n      /**\n       * Scale Z\n       * @see https://tailwindcss.com/docs/scale\n       */\n      'scale-z': [{\n        'scale-z': scaleScale()\n      }],\n      /**\n       * Scale 3D\n       * @see https://tailwindcss.com/docs/scale\n       */\n      'scale-3d': ['scale-3d'],\n      /**\n       * Skew\n       * @see https://tailwindcss.com/docs/skew\n       */\n      skew: [{\n        skew: scaleSkew()\n      }],\n      /**\n       * Skew X\n       * @see https://tailwindcss.com/docs/skew\n       */\n      'skew-x': [{\n        'skew-x': scaleSkew()\n      }],\n      /**\n       * Skew Y\n       * @see https://tailwindcss.com/docs/skew\n       */\n      'skew-y': [{\n        'skew-y': scaleSkew()\n      }],\n      /**\n       * Transform\n       * @see https://tailwindcss.com/docs/transform\n       */\n      transform: [{\n        transform: [isArbitraryVariable, isArbitraryValue, '', 'none', 'gpu', 'cpu']\n      }],\n      /**\n       * Transform Origin\n       * @see https://tailwindcss.com/docs/transform-origin\n       */\n      'transform-origin': [{\n        origin: scalePositionWithArbitrary()\n      }],\n      /**\n       * Transform Style\n       * @see https://tailwindcss.com/docs/transform-style\n       */\n      'transform-style': [{\n        transform: ['3d', 'flat']\n      }],\n      /**\n       * Translate\n       * @see https://tailwindcss.com/docs/translate\n       */\n      translate: [{\n        translate: scaleTranslate()\n      }],\n      /**\n       * Translate X\n       * @see https://tailwindcss.com/docs/translate\n       */\n      'translate-x': [{\n        'translate-x': scaleTranslate()\n      }],\n      /**\n       * Translate Y\n       * @see https://tailwindcss.com/docs/translate\n       */\n      'translate-y': [{\n        'translate-y': scaleTranslate()\n      }],\n      /**\n       * Translate Z\n       * @see https://tailwindcss.com/docs/translate\n       */\n      'translate-z': [{\n        'translate-z': scaleTranslate()\n      }],\n      /**\n       * Translate None\n       * @see https://tailwindcss.com/docs/translate\n       */\n      'translate-none': ['translate-none'],\n      // ---------------------\n      // --- Interactivity ---\n      // ---------------------\n      /**\n       * Accent Color\n       * @see https://tailwindcss.com/docs/accent-color\n       */\n      accent: [{\n        accent: scaleColor()\n      }],\n      /**\n       * Appearance\n       * @see https://tailwindcss.com/docs/appearance\n       */\n      appearance: [{\n        appearance: ['none', 'auto']\n      }],\n      /**\n       * Caret Color\n       * @see https://tailwindcss.com/docs/just-in-time-mode#caret-color-utilities\n       */\n      'caret-color': [{\n        caret: scaleColor()\n      }],\n      /**\n       * Color Scheme\n       * @see https://tailwindcss.com/docs/color-scheme\n       */\n      'color-scheme': [{\n        scheme: ['normal', 'dark', 'light', 'light-dark', 'only-dark', 'only-light']\n      }],\n      /**\n       * Cursor\n       * @see https://tailwindcss.com/docs/cursor\n       */\n      cursor: [{\n        cursor: ['auto', 'default', 'pointer', 'wait', 'text', 'move', 'help', 'not-allowed', 'none', 'context-menu', 'progress', 'cell', 'crosshair', 'vertical-text', 'alias', 'copy', 'no-drop', 'grab', 'grabbing', 'all-scroll', 'col-resize', 'row-resize', 'n-resize', 'e-resize', 's-resize', 'w-resize', 'ne-resize', 'nw-resize', 'se-resize', 'sw-resize', 'ew-resize', 'ns-resize', 'nesw-resize', 'nwse-resize', 'zoom-in', 'zoom-out', isArbitraryVariable, isArbitraryValue]\n      }],\n      /**\n       * Field Sizing\n       * @see https://tailwindcss.com/docs/field-sizing\n       */\n      'field-sizing': [{\n        'field-sizing': ['fixed', 'content']\n      }],\n      /**\n       * Pointer Events\n       * @see https://tailwindcss.com/docs/pointer-events\n       */\n      'pointer-events': [{\n        'pointer-events': ['auto', 'none']\n      }],\n      /**\n       * Resize\n       * @see https://tailwindcss.com/docs/resize\n       */\n      resize: [{\n        resize: ['none', '', 'y', 'x']\n      }],\n      /**\n       * Scroll Behavior\n       * @see https://tailwindcss.com/docs/scroll-behavior\n       */\n      'scroll-behavior': [{\n        scroll: ['auto', 'smooth']\n      }],\n      /**\n       * Scroll Margin\n       * @see https://tailwindcss.com/docs/scroll-margin\n       */\n      'scroll-m': [{\n        'scroll-m': scaleUnambiguousSpacing()\n      }],\n      /**\n       * Scroll Margin X\n       * @see https://tailwindcss.com/docs/scroll-margin\n       */\n      'scroll-mx': [{\n        'scroll-mx': scaleUnambiguousSpacing()\n      }],\n      /**\n       * Scroll Margin Y\n       * @see https://tailwindcss.com/docs/scroll-margin\n       */\n      'scroll-my': [{\n        'scroll-my': scaleUnambiguousSpacing()\n      }],\n      /**\n       * Scroll Margin Start\n       * @see https://tailwindcss.com/docs/scroll-margin\n       */\n      'scroll-ms': [{\n        'scroll-ms': scaleUnambiguousSpacing()\n      }],\n      /**\n       * Scroll Margin End\n       * @see https://tailwindcss.com/docs/scroll-margin\n       */\n      'scroll-me': [{\n        'scroll-me': scaleUnambiguousSpacing()\n      }],\n      /**\n       * Scroll Margin Top\n       * @see https://tailwindcss.com/docs/scroll-margin\n       */\n      'scroll-mt': [{\n        'scroll-mt': scaleUnambiguousSpacing()\n      }],\n      /**\n       * Scroll Margin Right\n       * @see https://tailwindcss.com/docs/scroll-margin\n       */\n      'scroll-mr': [{\n        'scroll-mr': scaleUnambiguousSpacing()\n      }],\n      /**\n       * Scroll Margin Bottom\n       * @see https://tailwindcss.com/docs/scroll-margin\n       */\n      'scroll-mb': [{\n        'scroll-mb': scaleUnambiguousSpacing()\n      }],\n      /**\n       * Scroll Margin Left\n       * @see https://tailwindcss.com/docs/scroll-margin\n       */\n      'scroll-ml': [{\n        'scroll-ml': scaleUnambiguousSpacing()\n      }],\n      /**\n       * Scroll Padding\n       * @see https://tailwindcss.com/docs/scroll-padding\n       */\n      'scroll-p': [{\n        'scroll-p': scaleUnambiguousSpacing()\n      }],\n      /**\n       * Scroll Padding X\n       * @see https://tailwindcss.com/docs/scroll-padding\n       */\n      'scroll-px': [{\n        'scroll-px': scaleUnambiguousSpacing()\n      }],\n      /**\n       * Scroll Padding Y\n       * @see https://tailwindcss.com/docs/scroll-padding\n       */\n      'scroll-py': [{\n        'scroll-py': scaleUnambiguousSpacing()\n      }],\n      /**\n       * Scroll Padding Start\n       * @see https://tailwindcss.com/docs/scroll-padding\n       */\n      'scroll-ps': [{\n        'scroll-ps': scaleUnambiguousSpacing()\n      }],\n      /**\n       * Scroll Padding End\n       * @see https://tailwindcss.com/docs/scroll-padding\n       */\n      'scroll-pe': [{\n        'scroll-pe': scaleUnambiguousSpacing()\n      }],\n      /**\n       * Scroll Padding Top\n       * @see https://tailwindcss.com/docs/scroll-padding\n       */\n      'scroll-pt': [{\n        'scroll-pt': scaleUnambiguousSpacing()\n      }],\n      /**\n       * Scroll Padding Right\n       * @see https://tailwindcss.com/docs/scroll-padding\n       */\n      'scroll-pr': [{\n        'scroll-pr': scaleUnambiguousSpacing()\n      }],\n      /**\n       * Scroll Padding Bottom\n       * @see https://tailwindcss.com/docs/scroll-padding\n       */\n      'scroll-pb': [{\n        'scroll-pb': scaleUnambiguousSpacing()\n      }],\n      /**\n       * Scroll Padding Left\n       * @see https://tailwindcss.com/docs/scroll-padding\n       */\n      'scroll-pl': [{\n        'scroll-pl': scaleUnambiguousSpacing()\n      }],\n      /**\n       * Scroll Snap Align\n       * @see https://tailwindcss.com/docs/scroll-snap-align\n       */\n      'snap-align': [{\n        snap: ['start', 'end', 'center', 'align-none']\n      }],\n      /**\n       * Scroll Snap Stop\n       * @see https://tailwindcss.com/docs/scroll-snap-stop\n       */\n      'snap-stop': [{\n        snap: ['normal', 'always']\n      }],\n      /**\n       * Scroll Snap Type\n       * @see https://tailwindcss.com/docs/scroll-snap-type\n       */\n      'snap-type': [{\n        snap: ['none', 'x', 'y', 'both']\n      }],\n      /**\n       * Scroll Snap Type Strictness\n       * @see https://tailwindcss.com/docs/scroll-snap-type\n       */\n      'snap-strictness': [{\n        snap: ['mandatory', 'proximity']\n      }],\n      /**\n       * Touch Action\n       * @see https://tailwindcss.com/docs/touch-action\n       */\n      touch: [{\n        touch: ['auto', 'none', 'manipulation']\n      }],\n      /**\n       * Touch Action X\n       * @see https://tailwindcss.com/docs/touch-action\n       */\n      'touch-x': [{\n        'touch-pan': ['x', 'left', 'right']\n      }],\n      /**\n       * Touch Action Y\n       * @see https://tailwindcss.com/docs/touch-action\n       */\n      'touch-y': [{\n        'touch-pan': ['y', 'up', 'down']\n      }],\n      /**\n       * Touch Action Pinch Zoom\n       * @see https://tailwindcss.com/docs/touch-action\n       */\n      'touch-pz': ['touch-pinch-zoom'],\n      /**\n       * User Select\n       * @see https://tailwindcss.com/docs/user-select\n       */\n      select: [{\n        select: ['none', 'text', 'all', 'auto']\n      }],\n      /**\n       * Will Change\n       * @see https://tailwindcss.com/docs/will-change\n       */\n      'will-change': [{\n        'will-change': ['auto', 'scroll', 'contents', 'transform', isArbitraryVariable, isArbitraryValue]\n      }],\n      // -----------\n      // --- SVG ---\n      // -----------\n      /**\n       * Fill\n       * @see https://tailwindcss.com/docs/fill\n       */\n      fill: [{\n        fill: ['none', ...scaleColor()]\n      }],\n      /**\n       * Stroke Width\n       * @see https://tailwindcss.com/docs/stroke-width\n       */\n      'stroke-w': [{\n        stroke: [isNumber, isArbitraryVariableLength, isArbitraryLength, isArbitraryNumber]\n      }],\n      /**\n       * Stroke\n       * @see https://tailwindcss.com/docs/stroke\n       */\n      stroke: [{\n        stroke: ['none', ...scaleColor()]\n      }],\n      // ---------------------\n      // --- Accessibility ---\n      // ---------------------\n      /**\n       * Forced Color Adjust\n       * @see https://tailwindcss.com/docs/forced-color-adjust\n       */\n      'forced-color-adjust': [{\n        'forced-color-adjust': ['auto', 'none']\n      }]\n    },\n    conflictingClassGroups: {\n      overflow: ['overflow-x', 'overflow-y'],\n      overscroll: ['overscroll-x', 'overscroll-y'],\n      inset: ['inset-x', 'inset-y', 'start', 'end', 'top', 'right', 'bottom', 'left'],\n      'inset-x': ['right', 'left'],\n      'inset-y': ['top', 'bottom'],\n      flex: ['basis', 'grow', 'shrink'],\n      gap: ['gap-x', 'gap-y'],\n      p: ['px', 'py', 'ps', 'pe', 'pt', 'pr', 'pb', 'pl'],\n      px: ['pr', 'pl'],\n      py: ['pt', 'pb'],\n      m: ['mx', 'my', 'ms', 'me', 'mt', 'mr', 'mb', 'ml'],\n      mx: ['mr', 'ml'],\n      my: ['mt', 'mb'],\n      size: ['w', 'h'],\n      'font-size': ['leading'],\n      'fvn-normal': ['fvn-ordinal', 'fvn-slashed-zero', 'fvn-figure', 'fvn-spacing', 'fvn-fraction'],\n      'fvn-ordinal': ['fvn-normal'],\n      'fvn-slashed-zero': ['fvn-normal'],\n      'fvn-figure': ['fvn-normal'],\n      'fvn-spacing': ['fvn-normal'],\n      'fvn-fraction': ['fvn-normal'],\n      'line-clamp': ['display', 'overflow'],\n      rounded: ['rounded-s', 'rounded-e', 'rounded-t', 'rounded-r', 'rounded-b', 'rounded-l', 'rounded-ss', 'rounded-se', 'rounded-ee', 'rounded-es', 'rounded-tl', 'rounded-tr', 'rounded-br', 'rounded-bl'],\n      'rounded-s': ['rounded-ss', 'rounded-es'],\n      'rounded-e': ['rounded-se', 'rounded-ee'],\n      'rounded-t': ['rounded-tl', 'rounded-tr'],\n      'rounded-r': ['rounded-tr', 'rounded-br'],\n      'rounded-b': ['rounded-br', 'rounded-bl'],\n      'rounded-l': ['rounded-tl', 'rounded-bl'],\n      'border-spacing': ['border-spacing-x', 'border-spacing-y'],\n      'border-w': ['border-w-x', 'border-w-y', 'border-w-s', 'border-w-e', 'border-w-t', 'border-w-r', 'border-w-b', 'border-w-l'],\n      'border-w-x': ['border-w-r', 'border-w-l'],\n      'border-w-y': ['border-w-t', 'border-w-b'],\n      'border-color': ['border-color-x', 'border-color-y', 'border-color-s', 'border-color-e', 'border-color-t', 'border-color-r', 'border-color-b', 'border-color-l'],\n      'border-color-x': ['border-color-r', 'border-color-l'],\n      'border-color-y': ['border-color-t', 'border-color-b'],\n      translate: ['translate-x', 'translate-y', 'translate-none'],\n      'translate-none': ['translate', 'translate-x', 'translate-y', 'translate-z'],\n      'scroll-m': ['scroll-mx', 'scroll-my', 'scroll-ms', 'scroll-me', 'scroll-mt', 'scroll-mr', 'scroll-mb', 'scroll-ml'],\n      'scroll-mx': ['scroll-mr', 'scroll-ml'],\n      'scroll-my': ['scroll-mt', 'scroll-mb'],\n      'scroll-p': ['scroll-px', 'scroll-py', 'scroll-ps', 'scroll-pe', 'scroll-pt', 'scroll-pr', 'scroll-pb', 'scroll-pl'],\n      'scroll-px': ['scroll-pr', 'scroll-pl'],\n      'scroll-py': ['scroll-pt', 'scroll-pb'],\n      touch: ['touch-x', 'touch-y', 'touch-pz'],\n      'touch-x': ['touch'],\n      'touch-y': ['touch'],\n      'touch-pz': ['touch']\n    },\n    conflictingClassGroupModifiers: {\n      'font-size': ['leading']\n    },\n    orderSensitiveModifiers: ['*', '**', 'after', 'backdrop', 'before', 'details-content', 'file', 'first-letter', 'first-line', 'marker', 'placeholder', 'selection']\n  };\n};\n\n/**\n * @param baseConfig Config where other config will be merged into. This object will be mutated.\n * @param configExtension Partial config to merge into the `baseConfig`.\n */\nconst mergeConfigs = (baseConfig, {\n  cacheSize,\n  prefix,\n  experimentalParseClassName,\n  extend = {},\n  override = {}\n}) => {\n  overrideProperty(baseConfig, 'cacheSize', cacheSize);\n  overrideProperty(baseConfig, 'prefix', prefix);\n  overrideProperty(baseConfig, 'experimentalParseClassName', experimentalParseClassName);\n  overrideConfigProperties(baseConfig.theme, override.theme);\n  overrideConfigProperties(baseConfig.classGroups, override.classGroups);\n  overrideConfigProperties(baseConfig.conflictingClassGroups, override.conflictingClassGroups);\n  overrideConfigProperties(baseConfig.conflictingClassGroupModifiers, override.conflictingClassGroupModifiers);\n  overrideProperty(baseConfig, 'orderSensitiveModifiers', override.orderSensitiveModifiers);\n  mergeConfigProperties(baseConfig.theme, extend.theme);\n  mergeConfigProperties(baseConfig.classGroups, extend.classGroups);\n  mergeConfigProperties(baseConfig.conflictingClassGroups, extend.conflictingClassGroups);\n  mergeConfigProperties(baseConfig.conflictingClassGroupModifiers, extend.conflictingClassGroupModifiers);\n  mergeArrayProperties(baseConfig, extend, 'orderSensitiveModifiers');\n  return baseConfig;\n};\nconst overrideProperty = (baseObject, overrideKey, overrideValue) => {\n  if (overrideValue !== undefined) {\n    baseObject[overrideKey] = overrideValue;\n  }\n};\nconst overrideConfigProperties = (baseObject, overrideObject) => {\n  if (overrideObject) {\n    for (const key in overrideObject) {\n      overrideProperty(baseObject, key, overrideObject[key]);\n    }\n  }\n};\nconst mergeConfigProperties = (baseObject, mergeObject) => {\n  if (mergeObject) {\n    for (const key in mergeObject) {\n      mergeArrayProperties(baseObject, mergeObject, key);\n    }\n  }\n};\nconst mergeArrayProperties = (baseObject, mergeObject, key) => {\n  const mergeValue = mergeObject[key];\n  if (mergeValue !== undefined) {\n    baseObject[key] = baseObject[key] ? baseObject[key].concat(mergeValue) : mergeValue;\n  }\n};\nconst extendTailwindMerge = (configExtension, ...createConfig) => typeof configExtension === 'function' ? createTailwindMerge(getDefaultConfig, configExtension, ...createConfig) : createTailwindMerge(() => mergeConfigs(getDefaultConfig(), configExtension), ...createConfig);\nconst twMerge = /*#__PURE__*/createTailwindMerge(getDefaultConfig);\nexport { createTailwindMerge, extendTailwindMerge, fromTheme, getDefaultConfig, mergeConfigs, twJoin, twMerge, validators };\n//# sourceMappingURL=bundle-mjs.mjs.map\n","import { clsx, type ClassValue } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]) {\n  return twMerge(clsx(inputs))\n}\n","import * as React from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/utils/cn\"\n\nconst buttonVariants = cva(\n  \"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0\",\n  {\n    variants: {\n      variant: {\n        default: \"bg-primary text-primary-foreground hover:bg-primary/90\",\n        destructive:\n          \"bg-destructive text-destructive-foreground hover:bg-destructive/90\",\n        outline:\n          \"border border-input bg-background hover:bg-accent hover:text-accent-foreground\",\n        secondary:\n          \"bg-secondary text-secondary-foreground hover:bg-secondary/80\",\n        ghost: \"hover:bg-accent hover:text-accent-foreground\",\n        link: \"text-primary underline-offset-4 hover:underline\",\n      },\n      size: {\n        default: \"h-10 px-4 py-2\",\n        sm: \"h-9 rounded-md px-3\",\n        lg: \"h-11 rounded-md px-8\",\n        icon: \"h-10 w-10\",\n      },\n    },\n    defaultVariants: {\n      variant: \"default\",\n      size: \"default\",\n    },\n  }\n)\n\nexport interface ButtonProps\n  extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n    VariantProps<typeof buttonVariants> {\n  asChild?: boolean\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n  ({ className, variant, size, asChild = false, ...props }, ref) => {\n    const Comp = asChild ? Slot : \"button\"\n    return (\n      <Comp\n        className={cn(buttonVariants({ variant, size, className }))}\n        ref={ref}\n        {...props}\n      />\n    )\n  }\n)\nButton.displayName = \"Button\"\n\nexport { Button, buttonVariants }\n","import React, { useState, useEffect, useRef, useCallback } from 'react';\nimport { createPortal } from 'react-dom';\nimport { Button } from '../ui/button';\nimport { AlignLeft, AlignCenter, AlignRight, GripVertical, Minus, Plus } from 'lucide-react';\nimport clsx from 'clsx';\n\ninterface FloatingRichTextToolbarProps {\n  isVisible: boolean;\n  fontSize: number;\n  onFontSizeChange: (size: number) => void;\n  onBold: () => void;\n  onItalic: () => void;\n  onUnderline: () => void;\n  onAlignLeft: () => void;\n  onAlignCenter: () => void;\n  onAlignRight: () => void;\n  onColorChange: (color: string) => void;\n  minFontSize?: number;\n  maxFontSize?: number;\n  fontStep?: number;\n}\n\nconst STORAGE_KEY = 'richTextToolbarPosition';\nconst DEFAULT_POSITION = { x: window.innerWidth / 2 - 200, y: 100 };\n\nconst FloatingRichTextToolbar: React.FC<FloatingRichTextToolbarProps> = ({\n  isVisible,\n  fontSize,\n  onFontSizeChange,\n  onBold,\n  onItalic,\n  onUnderline,\n  onAlignLeft,\n  onAlignCenter,\n  onAlignRight,\n  onColorChange,\n  minFontSize = 8,\n  maxFontSize = 96,\n  fontStep = 1,\n}) => {\n  const [position, setPosition] = useState<{ x: number; y: number }>(() => {\n    try {\n      const saved = localStorage.getItem(STORAGE_KEY);\n      if (saved) {\n        const parsed = JSON.parse(saved);\n        // Validate position is within viewport\n        if (\n          parsed.x >= 0 &&\n          parsed.y >= 0 &&\n          parsed.x < window.innerWidth - 100 &&\n          parsed.y < window.innerHeight - 100\n        ) {\n          return parsed;\n        }\n      }\n    } catch (e) {\n      console.error('Failed to load toolbar position:', e);\n    }\n    return DEFAULT_POSITION;\n  });\n\n  const [isDragging, setIsDragging] = useState(false);\n  const startPosRef = useRef({ x: 0, y: 0 });\n  const startToolbarPosRef = useRef({ x: 0, y: 0 });\n  const toolbarRef = useRef<HTMLDivElement>(null);\n\n  const clampPosition = useCallback((x: number, y: number) => {\n    const toolbarWidth = 400; // Approximate toolbar width\n    const toolbarHeight = 60; // Approximate toolbar height\n    const padding = 10;\n\n    return {\n      x: Math.max(padding, Math.min(x, window.innerWidth - toolbarWidth - padding)),\n      y: Math.max(padding, Math.min(y, window.innerHeight - toolbarHeight - padding)),\n    };\n  }, []);\n\n  const handleMouseDown = (e: React.MouseEvent) => {\n    if (e.button !== 0) return; // Only left click\n    e.preventDefault();\n    e.stopPropagation();\n    setIsDragging(true);\n    startPosRef.current = { x: e.clientX, y: e.clientY };\n    startToolbarPosRef.current = { ...position };\n  };\n\n  const handleMouseMove = useCallback(\n    (e: MouseEvent) => {\n      if (!isDragging) return;\n\n      const dx = e.clientX - startPosRef.current.x;\n      const dy = e.clientY - startPosRef.current.y;\n\n      const newPos = clampPosition(\n        startToolbarPosRef.current.x + dx,\n        startToolbarPosRef.current.y + dy\n      );\n\n      setPosition(newPos);\n    },\n    [isDragging, clampPosition]\n  );\n\n  const handleMouseUp = useCallback(() => {\n    if (isDragging) {\n      setIsDragging(false);\n      // Save position to localStorage\n      try {\n        localStorage.setItem(STORAGE_KEY, JSON.stringify(position));\n      } catch (e) {\n        console.error('Failed to save toolbar position:', e);\n      }\n    }\n  }, [isDragging, position]);\n\n  useEffect(() => {\n    if (isDragging) {\n      document.addEventListener('mousemove', handleMouseMove);\n      document.addEventListener('mouseup', handleMouseUp);\n      return () => {\n        document.removeEventListener('mousemove', handleMouseMove);\n        document.removeEventListener('mouseup', handleMouseUp);\n      };\n    }\n  }, [isDragging, handleMouseMove, handleMouseUp]);\n\n  // Handle window resize to keep toolbar in bounds\n  useEffect(() => {\n    const handleResize = () => {\n      setPosition((prev) => clampPosition(prev.x, prev.y));\n    };\n    window.addEventListener('resize', handleResize);\n    return () => window.removeEventListener('resize', handleResize);\n  }, [clampPosition]);\n\n  const handleFontSizeChange = useCallback((delta: number) => {\n    const newSize = Math.max(minFontSize, Math.min(maxFontSize, fontSize + delta));\n    onFontSizeChange(newSize);\n  }, [fontSize, minFontSize, maxFontSize, onFontSizeChange]);\n\n  if (!isVisible) return null;\n\n  const toolbar = (\n    <div\n      ref={toolbarRef}\n      className={clsx(\n        'fixed z-[9999] rounded-lg border border-border bg-background shadow-xl',\n        isDragging ? 'cursor-grabbing' : 'cursor-default'\n      )}\n      style={{\n        left: `${position.x}px`,\n        top: `${position.y}px`,\n        userSelect: 'none',\n      }}\n    >\n      <div className=\"flex items-center gap-3 px-4 py-2\">\n        {/* Drag Handle */}\n        <div\n          className=\"cursor-grab hover:bg-muted/50 rounded p-1 transition-colors\"\n          onMouseDown={handleMouseDown}\n        >\n          <GripVertical className=\"h-4 w-4 text-muted-foreground\" />\n        </div>\n\n        {/* Text Formatting */}\n        <div className=\"flex items-center gap-1 border-r border-border pr-3\">\n          <Button\n            type=\"button\"\n            size=\"sm\"\n            variant=\"ghost\"\n            className=\"px-2 py-1 h-7\"\n            onMouseDown={(e) => e.preventDefault()}\n            onClick={onBold}\n          >\n            <span className=\"font-semibold text-sm\">B</span>\n          </Button>\n          <Button\n            type=\"button\"\n            size=\"sm\"\n            variant=\"ghost\"\n            className=\"px-2 py-1 h-7 italic\"\n            onMouseDown={(e) => e.preventDefault()}\n            onClick={onItalic}\n          >\n            <span className=\"text-sm\">I</span>\n          </Button>\n          <Button\n            type=\"button\"\n            size=\"sm\"\n            variant=\"ghost\"\n            className=\"px-2 py-1 h-7 underline\"\n            onMouseDown={(e) => e.preventDefault()}\n            onClick={onUnderline}\n          >\n            <span className=\"text-sm\">U</span>\n          </Button>\n        </div>\n\n        {/* Alignment */}\n        <div className=\"flex items-center gap-1 border-r border-border pr-3\">\n          <Button\n            type=\"button\"\n            size=\"sm\"\n            variant=\"ghost\"\n            className=\"px-2 py-1 h-7\"\n            onMouseDown={(e) => e.preventDefault()}\n            onClick={onAlignLeft}\n          >\n            <AlignLeft className=\"h-3.5 w-3.5\" />\n          </Button>\n          <Button\n            type=\"button\"\n            size=\"sm\"\n            variant=\"ghost\"\n            className=\"px-2 py-1 h-7\"\n            onMouseDown={(e) => e.preventDefault()}\n            onClick={onAlignCenter}\n          >\n            <AlignCenter className=\"h-3.5 w-3.5\" />\n          </Button>\n          <Button\n            type=\"button\"\n            size=\"sm\"\n            variant=\"ghost\"\n            className=\"px-2 py-1 h-7\"\n            onMouseDown={(e) => e.preventDefault()}\n            onClick={onAlignRight}\n          >\n            <AlignRight className=\"h-3.5 w-3.5\" />\n          </Button>\n        </div>\n\n        {/* Font Size */}\n        <div className=\"flex items-center gap-1 border-r border-border pr-3\">\n          <Button\n            type=\"button\"\n            size=\"sm\"\n            variant=\"ghost\"\n            className=\"px-1.5 py-1 h-7\"\n            onMouseDown={(e) => e.preventDefault()}\n            onClick={() => handleFontSizeChange(-fontStep)}\n            disabled={fontSize <= minFontSize}\n          >\n            <Minus className=\"h-3 w-3\" />\n          </Button>\n          <span className=\"text-xs font-mono min-w-[2.5rem] text-center\">{fontSize}px</span>\n          <Button\n            type=\"button\"\n            size=\"sm\"\n            variant=\"ghost\"\n            className=\"px-1.5 py-1 h-7\"\n            onMouseDown={(e) => e.preventDefault()}\n            onClick={() => handleFontSizeChange(fontStep)}\n            disabled={fontSize >= maxFontSize}\n          >\n            <Plus className=\"h-3 w-3\" />\n          </Button>\n        </div>\n\n        {/* Color Picker */}\n        <label className=\"flex items-center gap-2 text-xs text-muted-foreground cursor-pointer\">\n          <span>Color</span>\n          <input\n            type=\"color\"\n            onMouseDown={(e) => {\n              e.preventDefault();\n              e.stopPropagation();\n            }}\n            onChange={(e) => onColorChange(e.target.value)}\n            className=\"h-6 w-6 rounded border border-border bg-transparent cursor-pointer\"\n          />\n        </label>\n      </div>\n    </div>\n  );\n\n  return createPortal(toolbar, document.body);\n};\n\nexport default FloatingRichTextToolbar;\n","import React, { useCallback, useEffect, useRef, useState } from 'react';\nimport clsx from 'clsx';\nimport FloatingRichTextToolbar from './FloatingRichTextToolbar';\n\ninterface RichTextEditorProps {\n  value: string;\n  onChange: (value: string) => void;\n  placeholder?: string;\n  className?: string;\n  readOnly?: boolean;\n  onBlur?: (event: React.FocusEvent<HTMLDivElement>) => void;\n  onFocus?: () => void;\n  onKeyDown?: (event: React.KeyboardEvent<HTMLDivElement>) => void;\n  minHeight?: number;\n  style?: React.CSSProperties;\n  autoFocus?: boolean;\n  badgeBackgroundColor?: string;\n  badgeTextColor?: string;\n  fontSizeVariant?: 'small' | 'medium' | 'large';\n  onFontSizeVariantChange?: (variant: 'small' | 'medium' | 'large') => void;\n  enableFontSizeControl?: boolean;\n  contentFontSize?: string;\n}\n\nconst MIN_FONT_SIZE = 8;\nconst MAX_FONT_SIZE = 96;\nconst FONT_STEP = 1;\n\nconst RichTextEditor: React.FC<RichTextEditorProps> = ({\n  value,\n  onChange,\n  placeholder,\n  className,\n  readOnly = false,\n  onBlur,\n  onFocus,\n  onKeyDown,\n  minHeight = 160,\n  style,\n  autoFocus = false,\n  badgeBackgroundColor = '#3498db',\n  badgeTextColor = '#ffffff',\n}) => {\n  const editorRef = useRef<HTMLDivElement | null>(null);\n  const selectionRef = useRef<Range | null>(null);\n  const [fontSize, setFontSize] = useState(14);\n  const [isFocused, setIsFocused] = useState(false);\n\n  const convertBadgePatterns = useCallback((html: string): string => {\n    // Replace ((number)) patterns with badge HTML\n    return html.replace(/\\(\\((\\d+)\\)\\)/g, (_match, number) => {\n      return `<span class=\"rich-text-badge\" style=\"background-color: ${badgeBackgroundColor}; color: ${badgeTextColor};\" contenteditable=\"false\">${number}</span>`;\n    });\n  }, [badgeBackgroundColor, badgeTextColor]);\n\n  const syncValue = useCallback(() => {\n    if (!editorRef.current) return;\n    let html = editorRef.current.innerHTML;\n\n    // Convert badge patterns before syncing\n    const convertedHtml = convertBadgePatterns(html);\n    if (convertedHtml !== html) {\n      // Save cursor position info\n      const selection = window.getSelection();\n      let savedRange: Range | null = null;\n      if (selection && selection.rangeCount > 0) {\n        savedRange = selection.getRangeAt(0).cloneRange();\n      }\n\n      // Update content\n      editorRef.current.innerHTML = convertedHtml;\n\n      // Try to restore cursor position after the badge\n      try {\n        if (savedRange) {\n          const newSelection = window.getSelection();\n          if (newSelection) {\n            // Find all badge elements\n            const badges = editorRef.current.querySelectorAll('.rich-text-badge');\n            if (badges.length > 0) {\n              // Place cursor after the last badge (most recently created)\n              const lastBadge = badges[badges.length - 1];\n              const newRange = document.createRange();\n              if (lastBadge.nextSibling) {\n                newRange.setStart(lastBadge.nextSibling, 0);\n              } else if (lastBadge.parentNode) {\n                newRange.setStartAfter(lastBadge);\n              }\n              newRange.collapse(true);\n              newSelection.removeAllRanges();\n              newSelection.addRange(newRange);\n            }\n          }\n        }\n      } catch (e) {\n        // Cursor positioning failed, ignore\n      }\n\n      html = convertedHtml;\n    }\n\n    onChange(html);\n  }, [onChange, convertBadgePatterns]);\n\n  const saveSelection = useCallback(() => {\n    const selection = window.getSelection();\n    if (!selection || selection.rangeCount === 0) {\n      selectionRef.current = null;\n      return;\n    }\n    selectionRef.current = selection.getRangeAt(0).cloneRange();\n  }, []);\n\n  const restoreSelection = useCallback(() => {\n    const selection = window.getSelection();\n    if (!selection || !selectionRef.current) return;\n    selection.removeAllRanges();\n    selection.addRange(selectionRef.current);\n  }, []);\n\n  const applyAlignment = useCallback((alignment: 'left' | 'center' | 'right') => {\n    if (!editorRef.current || readOnly) return;\n    editorRef.current.focus();\n    restoreSelection();\n\n    const selection = window.getSelection();\n    if (!selection || selection.rangeCount === 0) return;\n\n    const range = selection.getRangeAt(0);\n    let node = range.commonAncestorContainer;\n\n    // Find the block-level element containing the selection\n    while (node && node !== editorRef.current) {\n      if (node.nodeType === Node.ELEMENT_NODE) {\n        const element = node as HTMLElement;\n        const display = window.getComputedStyle(element).display;\n        if (display === 'block' || element.tagName === 'P' || element.tagName === 'DIV') {\n          element.style.textAlign = alignment;\n          syncValue();\n          saveSelection();\n          return;\n        }\n      }\n      const parentNode = node.parentNode;\n      if (!parentNode) break;\n      node = parentNode;\n    }\n\n    // Fallback to execCommand if no block element found\n    document.execCommand('styleWithCSS', false, 'true');\n    document.execCommand(`justify${alignment.charAt(0).toUpperCase() + alignment.slice(1)}`, false, undefined);\n    syncValue();\n    saveSelection();\n  }, [readOnly, restoreSelection, syncValue, saveSelection]);\n\n  const execCommand = useCallback((command: string, valueArg?: string) => {\n    if (!editorRef.current || readOnly) return;\n\n    // Handle alignment commands specially\n    if (command === 'justifyLeft') {\n      applyAlignment('left');\n      return;\n    } else if (command === 'justifyCenter') {\n      applyAlignment('center');\n      return;\n    } else if (command === 'justifyRight') {\n      applyAlignment('right');\n      return;\n    }\n\n    editorRef.current.focus();\n    restoreSelection();\n    document.execCommand('styleWithCSS', false, 'true');\n    document.execCommand(command, false, valueArg);\n    syncValue();\n    saveSelection();\n  }, [readOnly, restoreSelection, syncValue, saveSelection, applyAlignment]);\n\n  const applySpanStyle = useCallback((style: Partial<CSSStyleDeclaration>) => {\n    if (!editorRef.current || readOnly) return false;\n    editorRef.current.focus();\n    restoreSelection();\n    const selection = window.getSelection();\n    if (!selection || selection.rangeCount === 0) return false;\n    const range = selection.getRangeAt(0);\n    if (range.collapsed) return false;\n    const fragment = range.extractContents();\n    if (!fragment.hasChildNodes()) return false;\n    const span = document.createElement('span');\n    Object.entries(style).forEach(([key, value]) => {\n      if (value) {\n        (span.style as any)[key] = value;\n      }\n    });\n    span.appendChild(fragment);\n    range.insertNode(span);\n    const newRange = document.createRange();\n    newRange.selectNodeContents(span);\n    selection.removeAllRanges();\n    selection.addRange(newRange);\n    selectionRef.current = newRange.cloneRange();\n    syncValue();\n    saveSelection();\n    return true;\n  }, [readOnly, restoreSelection, syncValue, saveSelection]);\n\n  const setFontSizePx = useCallback((next: number) => {\n    const clamped = Math.min(MAX_FONT_SIZE, Math.max(MIN_FONT_SIZE, next));\n    const applied = applySpanStyle({ fontSize: `${clamped}px` });\n    setFontSize(clamped);\n    if (!applied) {\n      syncValue();\n    }\n  }, [applySpanStyle, syncValue]);\n\n  useEffect(() => {\n    if (!editorRef.current) return;\n    if (editorRef.current.innerHTML !== value) {\n      editorRef.current.innerHTML = value || '';\n    }\n  }, [value]);\n\n  useEffect(() => {\n    if (autoFocus && editorRef.current && !readOnly) {\n      editorRef.current.focus();\n      saveSelection();\n    }\n  }, [autoFocus, readOnly, saveSelection]);\n\n  return (\n    <>\n      <FloatingRichTextToolbar\n        isVisible={!readOnly && isFocused}\n        fontSize={fontSize}\n        onFontSizeChange={setFontSizePx}\n        onBold={() => execCommand('bold')}\n        onItalic={() => execCommand('italic')}\n        onUnderline={() => execCommand('underline')}\n        onAlignLeft={() => execCommand('justifyLeft')}\n        onAlignCenter={() => execCommand('justifyCenter')}\n        onAlignRight={() => execCommand('justifyRight')}\n        onColorChange={(color) => execCommand('foreColor', color)}\n        minFontSize={MIN_FONT_SIZE}\n        maxFontSize={MAX_FONT_SIZE}\n        fontStep={FONT_STEP}\n      />\n      <div className={clsx('flex flex-col rounded-md border border-border/60 bg-background shadow-sm', className)} style={{ minHeight, ...style }}>\n        <div className=\"relative flex-1\">\n        {!value && !isFocused && !readOnly && placeholder ? (\n          <div className=\"pointer-events-none absolute left-3 top-3 text-sm text-muted-foreground/70\">{placeholder}</div>\n        ) : null}\n        <div\n          ref={editorRef}\n          className={clsx(\n            'rich-text-editor-content prose prose-sm max-w-none px-3 py-3 outline-none',\n            readOnly ? 'pointer-events-none select-text' : 'cursor-text',\n          )}\n          contentEditable={!readOnly}\n          suppressContentEditableWarning\n          onInput={syncValue}\n          onBlur={(event) => {\n            setIsFocused(false);\n            saveSelection();\n            onBlur?.(event);\n          }}\n          onFocus={() => {\n            setIsFocused(true);\n            onFocus?.();\n            saveSelection();\n          }}\n          onKeyDown={(event) => {\n            onKeyDown?.(event);\n          }}\n          onKeyUp={saveSelection}\n          onMouseUp={saveSelection}\n          style={{ minHeight: Math.max(80, minHeight - 40) }}\n        />\n      </div>\n    </div>\n    </>\n  );\n};\n\nexport default RichTextEditor;\n","import React, { useEffect, useRef, useState, useCallback } from 'react';\nimport clsx from 'clsx';\nimport { RichTextAnnotation as RichTextAnnotationType } from '@/types';\nimport RichTextEditor from '@/components/editor/RichTextEditor';\n\ninterface RichTextAnnotationProps {\n  annotation: RichTextAnnotationType;\n  isSelected: boolean;\n  onSelect: () => void;\n  onUpdate: (updates: Partial<RichTextAnnotationType>) => void;\n  onContextMenu: (e: React.MouseEvent) => void;\n  scale: { scaleX: number; scaleY: number };\n  editable: boolean;\n}\n\nconst MIN_WIDTH = 160;\nconst MIN_HEIGHT = 120;\n\nconst FONT_SIZE_STYLES: Record<'small' | 'medium' | 'large', string> = {\n  small: '14px',\n  medium: '18px',\n  large: '24px',\n};\n\nconst RichTextAnnotation: React.FC<RichTextAnnotationProps> = ({\n  annotation,\n  isSelected,\n  onSelect,\n  onUpdate,\n  onContextMenu,\n  scale,\n  editable,\n}) => {\n  const [isDragging, setIsDragging] = useState(false);\n  const [isResizing, setIsResizing] = useState(false);\n  const startPosRef = useRef({ x: 0, y: 0 });\n  const startSizeRef = useRef({ width: annotation.size.width, height: annotation.size.height });\n  const startPositionRef = useRef({ x: annotation.position.x, y: annotation.position.y });\n  const [tempPosition, setTempPosition] = useState(annotation.position);\n  const [tempSize, setTempSize] = useState(annotation.size);\n  const [html, setHtml] = useState(annotation.html);\n  const [isEditing, setIsEditing] = useState(false);\n  const editorContainerRef = useRef<HTMLDivElement>(null);\n\n  const showBorder = annotation.showBorder !== false;\n  const showBackground = annotation.showBackground !== false;\n  const showShadow = annotation.showShadow !== false;\n  const fontSizeVariant = annotation.fontSizeVariant ?? 'medium';\n  const fontSizeValue = FONT_SIZE_STYLES[fontSizeVariant];\n\n  // Scale the font size proportionally with the canvas scale\n  const baseFontSize = parseFloat(fontSizeValue);\n  const scaledFontSize = `${baseFontSize * scale.scaleX}px`;\n\n  const scaledX = tempPosition.x * scale.scaleX;\n  const scaledY = tempPosition.y * scale.scaleY;\n  const scaledWidth = Math.max(MIN_WIDTH, tempSize.width) * scale.scaleX;\n  const scaledHeight = Math.max(MIN_HEIGHT, tempSize.height) * scale.scaleY;\n\n  useEffect(() => {\n    if (!isDragging) {\n      const positionChanged =\n        annotation.position.x !== tempPosition.x ||\n        annotation.position.y !== tempPosition.y;\n      if (positionChanged) {\n        setTempPosition(annotation.position);\n      }\n    }\n  }, [annotation.position, isDragging, tempPosition]);\n\n  useEffect(() => {\n    if (!isResizing) {\n      const sizeChanged =\n        annotation.size.width !== tempSize.width ||\n        annotation.size.height !== tempSize.height;\n      if (sizeChanged) {\n        setTempSize(annotation.size);\n      }\n    }\n  }, [annotation.size, isResizing, tempSize]);\n\n  useEffect(() => {\n    if (annotation.html !== html) {\n      setHtml(annotation.html);\n    }\n  }, [annotation.html, html]);\n\n  const wasSelectedRef = useRef(isSelected);\n\n  useEffect(() => {\n    if (!editable) {\n      setIsEditing(false);\n      wasSelectedRef.current = isSelected;\n      return;\n    }\n\n    if (wasSelectedRef.current && !isSelected) {\n      setIsEditing(false);\n    }\n\n    wasSelectedRef.current = isSelected;\n  }, [editable, isSelected]);\n\n  const commitPosition = useCallback(() => {\n    onUpdate({ position: { ...tempPosition } });\n  }, [onUpdate, tempPosition]);\n\n  const commitSize = useCallback(() => {\n    onUpdate({\n      size: { ...tempSize },\n      width: tempSize.width,\n      height: tempSize.height,\n      sizeVariant: 'custom',\n    });\n  }, [onUpdate, tempSize]);\n\n  const handleMouseDown = (e: React.MouseEvent) => {\n    if (isEditing) return;\n    if (e.button !== 0) return;\n    if (e.detail > 1) {\n      return;\n    }\n    e.stopPropagation();\n    onSelect();\n    setIsDragging(true);\n    startPosRef.current = { x: e.clientX, y: e.clientY };\n    startPositionRef.current = { ...tempPosition };\n  };\n\n  const handleResizeMouseDown = (e: React.MouseEvent) => {\n    if (e.button !== 0) return;\n    e.stopPropagation();\n    onSelect();\n    setIsResizing(true);\n    startPosRef.current = { x: e.clientX, y: e.clientY };\n    startSizeRef.current = { ...tempSize };\n  };\n\n  const handleMouseMove = (e: MouseEvent) => {\n    if (!isDragging && !isResizing) return;\n\n    const dx = e.clientX - startPosRef.current.x;\n    const dy = e.clientY - startPosRef.current.y;\n\n    const dxScaled = dx / scale.scaleX;\n    const dyScaled = dy / scale.scaleY;\n\n    if (isDragging) {\n      const newPos = {\n        x: startPositionRef.current.x + dxScaled,\n        y: startPositionRef.current.y + dyScaled,\n      };\n      setTempPosition(newPos);\n    } else if (isResizing) {\n      const newSize = {\n        width: Math.max(MIN_WIDTH, startSizeRef.current.width + dxScaled),\n        height: Math.max(MIN_HEIGHT, startSizeRef.current.height + dyScaled),\n      };\n      setTempSize(newSize);\n    }\n  };\n\n  const handleMouseUp = () => {\n    if (isDragging) {\n      setIsDragging(false);\n      commitPosition();\n    }\n    if (isResizing) {\n      setIsResizing(false);\n      commitSize();\n    }\n  };\n\n  useEffect(() => {\n    if (isDragging || isResizing) {\n      document.addEventListener('mousemove', handleMouseMove);\n      document.addEventListener('mouseup', handleMouseUp);\n      return () => {\n        document.removeEventListener('mousemove', handleMouseMove);\n        document.removeEventListener('mouseup', handleMouseUp);\n      };\n    }\n  }, [isDragging, isResizing, handleMouseMove]);\n\n  const handleHtmlChange = (nextHtml: string) => {\n    setHtml(nextHtml);\n    onUpdate({ html: nextHtml });\n  };\n\n  const closeEditor = () => setIsEditing(false);\n\n  const handleEditorBlur = () => {\n    if (!editable) return;\n    // Delay to allow focus to settle on toolbar interactions.\n    window.requestAnimationFrame(() => {\n      const activeElement = document.activeElement as HTMLElement | null;\n      const container = editorContainerRef.current;\n      if (!container) return;\n\n      if (!activeElement || activeElement === document.body || activeElement === document.documentElement) {\n        const editableRegion = container.querySelector('.rich-text-editor-content') as HTMLDivElement | null;\n        editableRegion?.focus();\n        return;\n      }\n\n      if (container.contains(activeElement)) {\n        return;\n      }\n\n      // Do not immediately close here; selection change will handle exiting edit mode.\n    });\n  };\n\n  const handleDoubleClick = (e: React.MouseEvent) => {\n    if (!editable) return;\n    e.stopPropagation();\n    onSelect();\n    setIsDragging(false);\n    setIsResizing(false);\n    setIsEditing(true);\n  };\n\n  const handleEditorKeyDown = (event: React.KeyboardEvent<HTMLDivElement>) => {\n    if (event.key === 'Escape') {\n      event.preventDefault();\n      event.stopPropagation();\n      closeEditor();\n    }\n  };\n\n  const isEditorActive = editable && isSelected && isEditing;\n\n  return (\n    <div\n      style={{\n        position: 'absolute',\n        left: scaledX,\n        top: scaledY,\n        width: scaledWidth,\n        minHeight: scaledHeight,\n        cursor: isEditorActive ? 'text' : isDragging ? 'grabbing' : 'grab',\n      }}\n      onMouseDown={handleMouseDown}\n      onContextMenu={onContextMenu}\n      onDoubleClick={handleDoubleClick}\n    >\n      <div\n        ref={editorContainerRef}\n        className={clsx(\n          'h-full rounded-md border transition-colors',\n          showBorder ? (isSelected ? 'border-primary' : 'border-border/60') : 'border-transparent',\n          showBackground ? 'bg-background/90' : 'bg-transparent',\n          showShadow ? 'shadow-md' : 'shadow-none',\n          isSelected ? 'ring-2 ring-primary/30' : null,\n        )}\n        style={{\n          width: '100%',\n          minHeight: scaledHeight,\n          pointerEvents: editable ? 'auto' : 'none',\n          fontSize: fontSizeValue,\n        }}\n        onMouseDown={(e) => {\n          if (!isSelected) {\n            onSelect();\n          }\n          if (isEditorActive) {\n            e.stopPropagation();\n          }\n        }}\n      >\n        {isEditorActive ? (\n          <RichTextEditor\n            value={html}\n            onChange={handleHtmlChange}\n            badgeBackgroundColor={annotation.badgeBackgroundColor}\n            badgeTextColor={annotation.badgeTextColor}\n            fontSizeVariant={fontSizeVariant}\n            onFontSizeVariantChange={(variant) => {\n              onUpdate({ fontSizeVariant: variant });\n            }}\n            contentFontSize={scaledFontSize}\n            placeholder=\"Start typing…\"\n            className=\"h-full\"\n            minHeight={scaledHeight}\n            autoFocus\n            onBlur={handleEditorBlur}\n            onKeyDown={handleEditorKeyDown}\n          />\n        ) : (\n          <div\n            className=\"rich-text-annotation-view prose pointer-events-none max-w-none select-text px-3 py-3\"\n            style={{\n              fontFamily: 'var(--font-sans, Inter, ui-sans-serif, system-ui)',\n              lineHeight: 1.5,\n              fontSize: fontSizeValue,\n              transform: `scale(${scale.scaleX}, ${scale.scaleY})`,\n              transformOrigin: 'top left',\n              width: `${100 / scale.scaleX}%`,\n              height: `${100 / scale.scaleY}%`,\n            }}\n            dangerouslySetInnerHTML={{ __html: html }}\n          />\n        )}\n      </div>\n      {editable && isSelected ? (\n        <div\n          className=\"absolute bottom-0 right-0 h-3 w-3 translate-x-1/2 translate-y-1/2 cursor-nwse-resize rounded-sm border border-border bg-background shadow-sm\"\n          onMouseDown={handleResizeMouseDown}\n        />\n      ) : null}\n    </div>\n  );\n};\n\nexport default RichTextAnnotation;\n","import React, { useState } from 'react';\nimport { Tutorial, Step, SubStep } from './types';\n\ninterface TooltipProps {\n  content: string;\n  children: React.ReactNode;\n}\n\nconst BalloonTooltip: React.FC<TooltipProps> = ({ content, children }) => {\n  const [isVisible, setIsVisible] = useState(false);\n\n  return (\n    <div\n      className=\"relative inline-block\"\n      onMouseEnter={() => setIsVisible(true)}\n      onMouseLeave={() => setIsVisible(false)}\n    >\n      {children}\n      {isVisible && (\n        <div\n          className=\"absolute right-full mr-3 top-1/2 -translate-y-1/2 z-50 whitespace-nowrap\"\n          style={{ pointerEvents: 'none' }}\n        >\n          <div className=\"relative bg-popover text-popover-foreground px-3 py-2 rounded-lg shadow-lg border border-border text-sm font-medium\">\n            {content}\n            {/* Arrow pointing right */}\n            <div\n              className=\"absolute right-0 top-1/2 -translate-y-1/2 translate-x-full\"\n              style={{\n                width: 0,\n                height: 0,\n                borderTop: '6px solid transparent',\n                borderBottom: '6px solid transparent',\n                borderLeft: '6px solid hsl(var(--border))',\n              }}\n            />\n            <div\n              className=\"absolute right-0 top-1/2 -translate-y-1/2 translate-x-full\"\n              style={{\n                width: 0,\n                height: 0,\n                borderTop: '5px solid transparent',\n                borderBottom: '5px solid transparent',\n                borderLeft: '5px solid hsl(var(--popover))',\n                marginRight: '1px',\n              }}\n            />\n          </div>\n        </div>\n      )}\n    </div>\n  );\n};\n\ninterface NestedProgressIndicatorProps {\n  tutorial: Tutorial;\n  currentStepIndex: number;\n  currentSubstepIndex: number;\n  currentSlideIndex: number;\n  onStepClick: (stepIndex: number) => void;\n  onSubstepClick: (stepIndex: number, substepIndex: number) => void;\n  onSlideClick: (stepIndex: number, substepIndex: number, slideIndex: number) => void;\n}\n\nconst NestedProgressIndicator: React.FC<NestedProgressIndicatorProps> = ({\n  tutorial,\n  currentStepIndex,\n  currentSubstepIndex,\n  currentSlideIndex,\n  onStepClick,\n  onSubstepClick,\n  onSlideClick,\n}) => {\n  const getSlideCount = (substep: SubStep): number => {\n    return substep.slides?.length || 1;\n  };\n\n  const renderSlideDots = (\n    stepIndex: number,\n    substepIndex: number,\n    substep: SubStep,\n  ) => {\n    const slideCount = getSlideCount(substep);\n    if (slideCount <= 1) return null;\n\n    const isCurrentSubstep = stepIndex === currentStepIndex && substepIndex === currentSubstepIndex;\n\n    return (\n      <div className=\"flex flex-col items-center gap-0.5 px-1 py-1 bg-muted/40 rounded-full\">\n        {Array.from({ length: slideCount }).map((_, slideIndex) => {\n          const isActive = isCurrentSubstep && slideIndex === currentSlideIndex;\n          return (\n            <button\n              key={slideIndex}\n              onClick={(e) => {\n                e.stopPropagation();\n                onSlideClick(stepIndex, substepIndex, slideIndex);\n              }}\n              className={`w-1 h-1 rounded-full transition-all ${\n                isActive\n                  ? 'bg-primary scale-150'\n                  : 'bg-muted-foreground/40 hover:bg-muted-foreground/60'\n              }`}\n              title={`Slide ${slideIndex + 1} of ${slideCount}`}\n            />\n          );\n        })}\n      </div>\n    );\n  };\n\n  const renderSubstepDot = (\n    stepIndex: number,\n    substepIndex: number,\n    substep: SubStep,\n    step: Step,\n  ) => {\n    const slideCount = getSlideCount(substep);\n    const isCurrentSubstep = stepIndex === currentStepIndex && substepIndex === currentSubstepIndex;\n    const hasSlides = slideCount > 1;\n\n    if (hasSlides) {\n      // Substep with slides: show as nested container with vertical dots\n      return (\n        <button\n          key={substepIndex}\n          onClick={(e) => {\n            e.stopPropagation();\n            onSubstepClick(stepIndex, substepIndex);\n          }}\n          className={`flex flex-col items-center gap-0.5 px-0 py-1.5 rounded-lg transition-all border ${\n            isCurrentSubstep\n              ? 'bg-primary/10 border-primary scale-105'\n              : 'bg-muted/20 border-muted-foreground/20 hover:bg-muted/40 hover:border-muted-foreground/40'\n          }`}\n          title={`${step.title} - ${substep.title || `Substep ${substepIndex + 1}`}`}\n        >\n          {renderSlideDots(stepIndex, substepIndex, substep)}\n        </button>\n      );\n    }\n\n    // Substep without slides: show as simple dot\n    return (\n      <button\n        key={substepIndex}\n        onClick={(e) => {\n          e.stopPropagation();\n          onSubstepClick(stepIndex, substepIndex);\n        }}\n        className={`w-1.5 h-1.5 rounded-full transition-all ${\n          isCurrentSubstep\n            ? 'bg-primary scale-150'\n            : 'bg-muted-foreground/40 hover:bg-muted-foreground/60'\n        }`}\n        title={`${step.title} - ${substep.title || `Substep ${substepIndex + 1}`}`}\n      />\n    );\n  };\n\n  const renderStepIndicator = (step: Step, stepIndex: number) => {\n    const hasSubsteps = step.subSteps.length > 0;\n    const isCurrentStep = stepIndex === currentStepIndex;\n\n    if (!hasSubsteps) {\n      // Step without substeps: show as simple dot\n      return (\n        <button\n          key={step.id}\n          onClick={() => onStepClick(stepIndex)}\n          className={`w-2 h-2 rounded-full transition-all ${\n            isCurrentStep\n              ? 'bg-primary scale-150'\n              : 'bg-muted-foreground/30 hover:bg-muted-foreground/50'\n          }`}\n          title={step.title}\n        />\n      );\n    }\n\n    // Step with substeps: show as container with nested substep indicators vertically\n    return (\n      <button\n        key={step.id}\n        onClick={() => onStepClick(stepIndex)}\n        className={`flex flex-col items-center gap-1 px-1.5 py-1.5 rounded-xl transition-all border ${\n          isCurrentStep\n            ? 'bg-primary/5 border-primary/50 scale-105'\n            : 'bg-muted/10 border-muted-foreground/20 hover:bg-muted/30 hover:border-muted-foreground/40'\n        }`}\n        title={step.title}\n      >\n        {step.subSteps.map((substep, substepIndex) =>\n          renderSubstepDot(stepIndex, substepIndex, substep, step)\n        )}\n      </button>\n    );\n  };\n\n  return (\n    <div className=\"fixed right-6 top-1/2 -translate-y-1/2 z-50 flex flex-col items-center gap-2\">\n      {/* Tutorial Title Icon with Balloon Tooltip */}\n      <BalloonTooltip content={tutorial.title}>\n        <div className=\"w-6 h-6 rounded-full bg-primary/20 border border-primary/40 flex items-center justify-center cursor-pointer hover:bg-primary/30 transition-colors mb-1\">\n          <svg\n            width=\"12\"\n            height=\"12\"\n            viewBox=\"0 0 24 24\"\n            fill=\"none\"\n            stroke=\"currentColor\"\n            strokeWidth=\"2\"\n            strokeLinecap=\"round\"\n            strokeLinejoin=\"round\"\n            className=\"text-primary\"\n          >\n            <path d=\"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H20v20H6.5a2.5 2.5 0 0 1 0-5H20\" />\n          </svg>\n        </div>\n      </BalloonTooltip>\n      {tutorial.steps.map((step, stepIndex) => renderStepIndicator(step, stepIndex))}\n    </div>\n  );\n};\n\nexport default NestedProgressIndicator;\n","/**\n * Image Reference System (Player-only version)\n * Resolves image references for display\n */\n\nimport { Project, ProjectImage, ImageAnnotation, AIImageAnnotation } from '../types';\n\n/**\n * Get image data by reference ID\n */\nexport function getImageByRef(project: Project | null, imageRef: string): ProjectImage | null {\n  if (!project?.images) return null;\n  return project.images.find(img => img.id === imageRef) || null;\n}\n\n/**\n * Resolve image data from annotation (handles both legacy and reference-based)\n */\nexport function resolveImageData(\n  annotation: ImageAnnotation | AIImageAnnotation,\n  project: Project | null\n): string | null {\n  // New format: use imageRef\n  if (annotation.imageRef && project) {\n    const image = getImageByRef(project, annotation.imageRef);\n    return image?.data || null;\n  }\n\n  // Legacy format: use direct imageData\n  if (annotation.imageData) {\n    return annotation.imageData;\n  }\n\n  return null;\n}\n","import React, { useState, useEffect, useRef, useCallback, useMemo, forwardRef, useImperativeHandle } from 'react';\nimport { Tutorial, Step, SubStep, Annotation } from './types';\nimport { ChevronUp, ChevronDown } from 'lucide-react';\nimport { ParallaxProvider } from 'react-scroll-parallax';\nimport ArrowAnnotation from './components/annotations/ArrowAnnotation';\nimport TextBalloonAnnotation from './components/annotations/TextBalloonAnnotation';\nimport HighlightAnnotation from './components/annotations/HighlightAnnotation';\nimport NumberedBadgeAnnotation from './components/annotations/NumberedBadgeAnnotation';\nimport RectAnnotation from './components/annotations/RectAnnotation';\nimport CircleAnnotation from './components/annotations/CircleAnnotation';\nimport ImageAnnotationComponent from './components/annotations/ImageAnnotation';\nimport RichTextAnnotationComponent from './components/annotations/RichTextAnnotation';\nimport { ImageLoader } from './utils/imageLoaders';\nimport NestedProgressIndicator from './NestedProgressIndicator';\nimport { resolveImageData } from './utils/imageReferences';\n\nconst stripRichTextContent = (html: string) => {\n  if (!html) return '';\n  return html\n    .replace(/<style[^>]*>.*?<\\/style>/gis, '')\n    .replace(/<script[^>]*>.*?<\\/script>/gis, '')\n    .replace(/<!--.*?-->/gs, '')\n    .replace(/&nbsp;/gi, ' ')\n    .replace(/<br\\s*\\/?>/gi, ' ')\n    .replace(/<[^>]+>/g, ' ')\n    .replace(/\\s+/g, ' ')\n    .trim();\n};\n\nconst normalizeRichTextValue = (html: string) => {\n  if (!html) return '';\n  return stripRichTextContent(html) === '' ? '' : html;\n};\n\nconst isRichTextEmpty = (html?: string | null) => normalizeRichTextValue(html ?? '') === '';\n\ninterface StepSection {\n  stepIndex: number;\n  step: Step;\n  currentSubstepIndex: number;\n}\n\nexport interface TutorialPlayerCoreHandle {\n  // Player-only version has no editing methods\n}\n\nexport interface TutorialPlayerCoreProps {\n  // Required props\n  tutorial: Tutorial;\n  currentStepIndex: number;\n  substepIndices: Map<number, number>;\n  slideIndices?: Map<string, number>; // Map of \"${stepIndex}-${substepIndex}\" -> slideIndex\n  onStepChange: (stepIndex: number) => void;\n  onSubstepChange: (stepIndex: number, substepIndex: number) => void;\n  onSlideChange?: (stepIndex: number, substepIndex: number, slideIndex: number) => void;\n  imageLoader: ImageLoader;\n  resolveImagePath?: (relativePath: string) => string;\n\n  // Optional styling\n  className?: string;\n}\n\nconst TutorialPlayerCore = forwardRef<TutorialPlayerCoreHandle, TutorialPlayerCoreProps>(({\n  tutorial: selectedTutorial,\n  currentStepIndex,\n  substepIndices,\n  slideIndices = new Map(),\n  onStepChange,\n  onSubstepChange,\n  onSlideChange,\n  imageLoader,\n  resolveImagePath = (path) => path,\n  className,\n}, ref) => {\n  // Player state\n  const [screenshotDataUrls, setScreenshotDataUrls] = useState<Map<string, string>>(new Map());\n  const [imageScales, setImageScales] = useState<Map<string, { scaleX: number; scaleY: number }>>(new Map());\n  const [imageDimensions, setImageDimensions] = useState<Map<string, { width: number; height: number }>>(new Map());\n  const [transitionsReady, setTransitionsReady] = useState(false);\n  const outerContainerRef = useRef<HTMLDivElement>(null);\n  const stepRefs = useRef<(HTMLDivElement | null)[]>([]);\n  const substepScrollRefs = useRef<Map<number, HTMLDivElement>>(new Map());\n  const substepRefs = useRef<Map<string, HTMLDivElement>>(new Map());\n  const imageRefs = useRef<Map<string, HTMLImageElement | HTMLDivElement>>(new Map());\n\n  const DEFAULT_CANVAS_DIMENSIONS = { width: 960, height: 540 };\n\n  const getEffectiveScale = (key?: string | null) => {\n    if (!key) {\n      return { scaleX: 1, scaleY: 1 };\n    }\n    const scale = getImageScale(key);\n    const safeScaleX = Number.isFinite(scale.scaleX) && Math.abs(scale.scaleX) > 0.0001 ? scale.scaleX : 1;\n    const safeScaleY = Number.isFinite(scale.scaleY) && Math.abs(scale.scaleY) > 0.0001 ? scale.scaleY : 1;\n    return { scaleX: safeScaleX, scaleY: safeScaleY };\n  };\n\n  /**\n   * Calculate canvas dimensions based on annotation bounding box\n   * Returns dimensions that encompass all annotations plus margin\n   */\n  const calculateAnnotationBounds = (annotations: Annotation[], margin: number = 30): { width: number; height: number } => {\n    if (!annotations || annotations.length === 0) {\n      return DEFAULT_CANVAS_DIMENSIONS;\n    }\n\n    let minX = Infinity;\n    let minY = Infinity;\n    let maxX = -Infinity;\n    let maxY = -Infinity;\n\n    annotations.forEach((annotation) => {\n      const { position } = annotation;\n\n      switch (annotation.type) {\n        case 'arrow': {\n          // Arrow has startPosition, endPosition, and optional controlPoint\n          const points = [annotation.startPosition, annotation.endPosition];\n          if (annotation.controlPoint) {\n            points.push(annotation.controlPoint);\n          }\n          points.forEach((point) => {\n            minX = Math.min(minX, point.x);\n            minY = Math.min(minY, point.y);\n            maxX = Math.max(maxX, point.x);\n            maxY = Math.max(maxY, point.y);\n          });\n          break;\n        }\n        case 'circle': {\n          // Circle has radius\n          const radius = annotation.radius;\n          minX = Math.min(minX, position.x - radius);\n          minY = Math.min(minY, position.y - radius);\n          maxX = Math.max(maxX, position.x + radius);\n          maxY = Math.max(maxY, position.y + radius);\n          break;\n        }\n        case 'numberedBadge': {\n          // NumberedBadge has size (diameter)\n          const halfSize = annotation.size / 2;\n          minX = Math.min(minX, position.x - halfSize);\n          minY = Math.min(minY, position.y - halfSize);\n          maxX = Math.max(maxX, position.x + halfSize);\n          maxY = Math.max(maxY, position.y + halfSize);\n          break;\n        }\n        case 'textBalloon':\n        case 'highlight':\n        case 'rect':\n        case 'image':\n        case 'aiImage':\n        case 'richText': {\n          // These annotations have position + size\n          const { width, height } = annotation.size;\n          minX = Math.min(minX, position.x);\n          minY = Math.min(minY, position.y);\n          maxX = Math.max(maxX, position.x + width);\n          maxY = Math.max(maxY, position.y + height);\n          break;\n        }\n      }\n    });\n\n    // If no valid bounds were found, return default\n    if (!isFinite(minX) || !isFinite(minY) || !isFinite(maxX) || !isFinite(maxY)) {\n      return DEFAULT_CANVAS_DIMENSIONS;\n    }\n\n    // Calculate dimensions with margin\n    const width = Math.max(maxX - minX + (margin * 2), DEFAULT_CANVAS_DIMENSIONS.width);\n    const height = Math.max(maxY - minY + (margin * 2), DEFAULT_CANVAS_DIMENSIONS.height);\n\n    return { width, height };\n  };\n\n  const normalizePath = (path?: string | null) => (path && path.trim() !== '' ? path : null);\n\n  const getCurrentSlideIndex = (stepIndex: number, substepIndex: number): number => {\n    const key = `${stepIndex}-${substepIndex}`;\n    return slideIndices.get(key) || 0;\n  };\n\n  /**\n   * Resolve screenshot path for a substep's slide.\n   * Screenshots are exclusively managed at the slide level.\n   * Returns null if no screenshot is set, which displays an empty canvas.\n   */\n  const resolveSubstepScreenshotKey = (_step: Step, substep: SubStep, slideIndex?: number): string | null => {\n    // Check slide-level screenshot (single source of truth)\n    if (substep.slides && substep.slides.length > 0 && slideIndex !== undefined) {\n      const slide = substep.slides[slideIndex];\n      if (slide) {\n        return normalizePath(slide.screenshotPath ?? null);\n      }\n    }\n\n    // No screenshot - display empty canvas with annotation support\n    return null;\n  };\n\n  const resolveSubstepAnnotations = (substep: SubStep, slideIndex?: number): Annotation[] => {\n    // If substep has slides and a valid slide index is provided, use slide annotations\n    if (substep.slides && substep.slides.length > 0 && slideIndex !== undefined) {\n      const slide = substep.slides[slideIndex];\n      if (slide) {\n        return slide.annotations || [];\n      }\n    }\n\n    // Fallback to legacy substep annotations\n    return substep.annotations || [];\n  };\n\n  // Load screenshots using the injected imageLoader\n  useEffect(() => {\n    const loadScreenshots = async () => {\n      if (!selectedTutorial) {\n        setScreenshotDataUrls(new Map());\n        return;\n      }\n\n      const newDataUrls = new Map<string, string>();\n      const uniquePaths = new Set<string>();\n\n      // Collect all unique screenshot paths from slides\n      selectedTutorial.steps.forEach(step => {\n        step.subSteps.forEach(substep => {\n          if (substep.slides) {\n            substep.slides.forEach(slide => {\n              if (slide.screenshotPath) {\n                uniquePaths.add(slide.screenshotPath);\n              }\n            });\n          }\n        });\n      });\n\n      for (const path of uniquePaths) {\n        try {\n          if (path.startsWith('data:')) {\n            newDataUrls.set(path, path);\n          } else {\n            const resolvedPath = resolveImagePath(path);\n            const dataUrl = await imageLoader(resolvedPath);\n            newDataUrls.set(path, dataUrl);\n          }\n        } catch (error) {\n          console.error('Failed to load screenshot:', path, error);\n        }\n      }\n      setScreenshotDataUrls(newDataUrls);\n    };\n    loadScreenshots();\n  }, [selectedTutorial, imageLoader, resolveImagePath]);\n\n  // Enable transitions after mount\n  useEffect(() => {\n    requestAnimationFrame(() => {\n      setTransitionsReady(true);\n    });\n  }, []);\n\n  // Helper to get current substep index for a step\n  const getCurrentSubstepIndex = (stepIndex: number): number => {\n    return substepIndices.get(stepIndex) || 0;\n  };\n\n  // Build step sections array\n  const stepSections: StepSection[] = useMemo(() => {\n    if (!selectedTutorial) return [];\n\n    return selectedTutorial.steps.map((step, stepIndex) => ({\n      stepIndex,\n      step,\n      currentSubstepIndex: substepIndices.get(stepIndex) || 0,\n    }));\n  }, [selectedTutorial, substepIndices]);\n\n  // Scroll-based tracking for current step\n  useEffect(() => {\n    if (!outerContainerRef.current) return;\n\n    let rafId: number | null = null;\n\n    const handleScroll = () => {\n      if (rafId) return;\n\n      rafId = requestAnimationFrame(() => {\n        const container = outerContainerRef.current;\n        if (!container) {\n          rafId = null;\n          return;\n        }\n\n        const scrollY = container.scrollTop;\n        const viewportHeight = container.clientHeight;\n        const viewportCenter = scrollY + viewportHeight / 2;\n\n        let closestIndex = 0;\n        let closestDistance = Infinity;\n\n        stepRefs.current.forEach((stepEl, index) => {\n          if (!stepEl) return;\n          const rect = stepEl.getBoundingClientRect();\n          const containerRect = container.getBoundingClientRect();\n          const elementTop = rect.top - containerRect.top + scrollY;\n          const elementCenter = elementTop + rect.height / 2;\n          const distance = Math.abs(elementCenter - viewportCenter);\n\n          if (distance < closestDistance) {\n            closestDistance = distance;\n            closestIndex = index;\n          }\n        });\n\n        if (closestIndex !== currentStepIndex) {\n          onStepChange(closestIndex);\n        }\n        rafId = null;\n      });\n    };\n\n    const container = outerContainerRef.current;\n    container.addEventListener('scroll', handleScroll, { passive: true });\n    handleScroll();\n\n    return () => {\n      container.removeEventListener('scroll', handleScroll);\n      if (rafId) cancelAnimationFrame(rafId);\n    };\n  }, [stepSections.length, currentStepIndex, onStepChange]);\n\n  // Calculate scale and dimensions for an image or canvas\n  const calculateImageScale = useCallback((key: string, element: HTMLImageElement | HTMLDivElement, naturalDims?: { width: number; height: number }) => {\n    let displayedWidth: number;\n    let displayedHeight: number;\n    let naturalWidth: number;\n    let naturalHeight: number;\n\n    if (element instanceof HTMLImageElement) {\n      // For images, use the built-in natural dimensions\n      if (!element.naturalWidth || !element.naturalHeight) return;\n      displayedWidth = element.width;\n      displayedHeight = element.height;\n      naturalWidth = element.naturalWidth;\n      naturalHeight = element.naturalHeight;\n    } else {\n      // For canvas divs, use provided natural dimensions\n      if (!naturalDims || !naturalDims.width || !naturalDims.height) return;\n      displayedWidth = element.offsetWidth;\n      displayedHeight = element.offsetHeight;\n      naturalWidth = naturalDims.width;\n      naturalHeight = naturalDims.height;\n    }\n\n    // Don't calculate scale if element hasn't been laid out yet\n    if (!displayedWidth || !displayedHeight) {\n      console.log('Skipping scale calculation - element not laid out yet');\n      return;\n    }\n\n    const scaleX = displayedWidth / naturalWidth;\n    const scaleY = displayedHeight / naturalHeight;\n\n    setImageScales(prev => {\n      const existing = prev.get(key);\n      if (existing && existing.scaleX === scaleX && existing.scaleY === scaleY) {\n        return prev;\n      }\n      const newMap = new Map(prev);\n      newMap.set(key, { scaleX, scaleY });\n      return newMap;\n    });\n\n    setImageDimensions(prev => {\n      const existing = prev.get(key);\n      if (existing && existing.width === displayedWidth && existing.height === displayedHeight) {\n        return prev;\n      }\n      const newMap = new Map(prev);\n      newMap.set(key, { width: displayedWidth, height: displayedHeight });\n      return newMap;\n    });\n  }, []);\n\n  // Recalculate image and canvas scales on window resize\n  useEffect(() => {\n    const handleResize = () => {\n      imageRefs.current.forEach((element, key) => {\n        if (!element) return;\n\n        if (element instanceof HTMLImageElement) {\n          // For images\n          if (element.naturalWidth && element.naturalHeight) {\n            calculateImageScale(key, element);\n          }\n        } else {\n          // For canvas divs, extract natural dimensions from the key\n          const parts = key.split(':');\n          if (parts.length === 3) {\n            const naturalDims = { width: parseFloat(parts[1]), height: parseFloat(parts[2]) };\n            if (naturalDims.width > 0 && naturalDims.height > 0) {\n              calculateImageScale(key, element, naturalDims);\n            }\n          }\n        }\n      });\n    };\n\n    window.addEventListener('resize', handleResize);\n    return () => window.removeEventListener('resize', handleResize);\n  }, [calculateImageScale]);\n\n  // Keyboard navigation\n  useEffect(() => {\n    const handleKeyDown = (e: KeyboardEvent) => {\n      const target = e.target as HTMLElement;\n      // Don't intercept keys when user is typing in input fields or contentEditable elements\n      if (\n        target.tagName === 'INPUT' ||\n        target.tagName === 'TEXTAREA' ||\n        target.isContentEditable\n      ) {\n        return;\n      }\n\n      if (e.key === 'ArrowDown' || e.key === ' ') {\n        e.preventDefault();\n        navigateSubstep(1);\n      } else if (e.key === 'ArrowUp') {\n        e.preventDefault();\n        navigateSubstep(-1);\n      } else if (e.key === 'Home') {\n        e.preventDefault();\n        scrollToStep(0);\n        onSubstepChange(0, 0);\n      } else if (e.key === 'End') {\n        e.preventDefault();\n        const lastStepIndex = stepSections.length - 1;\n        scrollToStep(lastStepIndex);\n        const lastSubstepIndex = stepSections[lastStepIndex]?.step.subSteps.length - 1 || 0;\n        onSubstepChange(lastStepIndex, lastSubstepIndex);\n      }\n    };\n\n    window.addEventListener('keydown', handleKeyDown);\n    return () => window.removeEventListener('keydown', handleKeyDown);\n  }, [currentStepIndex, substepIndices, stepSections, onSubstepChange]);\n\n  const scrollToStep = (stepIndex: number) => {\n    if (stepIndex < 0 || stepIndex >= stepSections.length) return;\n    const targetStep = stepRefs.current[stepIndex];\n    if (!targetStep) return;\n    targetStep.scrollIntoView({ behavior: 'smooth', block: 'start' });\n  };\n\n  const scrollToSubstep = (stepIndex: number, substepIndex: number) => {\n    const step = stepSections[stepIndex]?.step;\n    if (!step) return;\n\n    const key = `${step.id}-${step.subSteps[substepIndex]?.id}`;\n    const substepEl = substepRefs.current.get(key);\n    if (substepEl) {\n      substepEl.scrollIntoView({ behavior: 'smooth', block: 'start' });\n    }\n  };\n\n  const scrollToSlide = (stepIndex: number, substepIndex: number, slideIndex: number) => {\n    const scrollContainer = substepScrollRefs.current.get(stepIndex);\n    if (!scrollContainer) return;\n\n    // Find the slide element by data attributes\n    const slideEl = scrollContainer.querySelector(\n      `[data-substep-index=\"${substepIndex}\"][data-slide-index=\"${slideIndex}\"]`\n    ) as HTMLElement | null;\n\n    if (slideEl) {\n      slideEl.scrollIntoView({ behavior: 'smooth', block: 'center' });\n    }\n  };\n\n  const navigateSubstep = (direction: 1 | -1) => {\n    const currentStep = stepSections[currentStepIndex];\n    if (!currentStep) return;\n\n    const currentSubstepIdx = getCurrentSubstepIndex(currentStepIndex);\n    const currentSubstep = currentStep.step.subSteps[currentSubstepIdx];\n    const currentSlideIdx = getCurrentSlideIndex(currentStepIndex, currentSubstepIdx);\n    const slideCount = currentSubstep?.slides?.length || 1;\n\n    // First, try to navigate within slides of current substep\n    if (slideCount > 1) {\n      const newSlideIdx = currentSlideIdx + direction;\n      if (newSlideIdx >= 0 && newSlideIdx < slideCount) {\n        // Navigate to different slide within same substep\n        if (onSlideChange) {\n          onSlideChange(currentStepIndex, currentSubstepIdx, newSlideIdx);\n        }\n        // Scroll to the new slide\n        scrollToSlide(currentStepIndex, currentSubstepIdx, newSlideIdx);\n        return;\n      }\n    }\n\n    // If we're at the edge of slides, navigate to next/previous substep\n    const newSubstepIdx = currentSubstepIdx + direction;\n\n    if (newSubstepIdx >= 0 && newSubstepIdx < currentStep.step.subSteps.length) {\n      scrollToSubstep(currentStepIndex, newSubstepIdx);\n      // When going backwards, start at the last slide of the previous substep\n      if (direction < 0) {\n        const prevSubstep = currentStep.step.subSteps[newSubstepIdx];\n        const prevSlideCount = prevSubstep?.slides?.length || 1;\n        if (onSlideChange && prevSlideCount > 1) {\n          onSlideChange(currentStepIndex, newSubstepIdx, prevSlideCount - 1);\n          // Scroll to last slide after substep scroll completes\n          setTimeout(() => scrollToSlide(currentStepIndex, newSubstepIdx, prevSlideCount - 1), 150);\n        }\n      }\n    } else if (direction > 0 && currentStepIndex < stepSections.length - 1) {\n      scrollToStep(currentStepIndex + 1);\n      onSubstepChange(currentStepIndex + 1, 0);\n      if (onSlideChange) {\n        onSlideChange(currentStepIndex + 1, 0, 0);\n      }\n    } else if (direction < 0 && currentStepIndex > 0) {\n      const prevStepIndex = currentStepIndex - 1;\n      const lastSubstepIndex = stepSections[prevStepIndex].step.subSteps.length - 1;\n      scrollToStep(prevStepIndex);\n      onSubstepChange(prevStepIndex, lastSubstepIndex);\n      // Start at the last slide of the last substep\n      const lastSubstep = stepSections[prevStepIndex].step.subSteps[lastSubstepIndex];\n      const lastSlideCount = lastSubstep?.slides?.length || 1;\n      if (onSlideChange && lastSlideCount > 1) {\n        onSlideChange(prevStepIndex, lastSubstepIndex, lastSlideCount - 1);\n        // Scroll to last slide after step scroll completes\n        setTimeout(() => scrollToSlide(prevStepIndex, lastSubstepIndex, lastSlideCount - 1), 200);\n      }\n    }\n  };\n\n  const getScreenshotSrc = (path?: string | null) => {\n    if (!path) return null;\n    return screenshotDataUrls.get(path) || null;\n  };\n\n  const getImageScale = (screenshotPath: string | null | undefined) => {\n    if (!screenshotPath) return { scaleX: 1, scaleY: 1 };\n    return imageScales.get(screenshotPath) || { scaleX: 1, scaleY: 1 };\n  };\n\n  const getImageDimensions = (screenshotPath: string | null | undefined) => {\n    if (!screenshotPath) return { width: 0, height: 0 };\n    return imageDimensions.get(screenshotPath) || { width: 0, height: 0 };\n  };\n\n  // Expose empty ref for player (no editing methods)\n  useImperativeHandle(ref, () => ({}), []);\n\n  const renderAnnotation = (\n    annotation: Annotation,\n    scale: { scaleX: number; scaleY: number },\n    isCurrentSlide: boolean\n  ) => {\n    const baseStyle: React.CSSProperties = {\n      pointerEvents: 'none',\n      ...(transitionsReady && { transition: 'opacity 300ms ease-out' }),\n      opacity: 1,\n    };\n\n    let annotationComponent;\n    switch (annotation.type) {\n      case 'arrow':\n        annotationComponent = (\n          <ArrowAnnotation\n            annotation={annotation}\n            isSelected={false}\n            isCurrentSubstep={isCurrentSlide}\n            onSelect={() => {}}\n            onUpdate={() => {}}\n            onContextMenu={() => {}}\n            scale={scale}\n            editable={false}\n          />\n        );\n        break;\n      case 'textBalloon':\n        annotationComponent = (\n          <TextBalloonAnnotation\n            annotation={annotation}\n            isSelected={false}\n            onSelect={() => {}}\n            onUpdate={() => {}}\n            onContextMenu={() => {}}\n            scale={scale}\n            editable={false}\n          />\n        );\n        break;\n      case 'highlight':\n        annotationComponent = (\n          <HighlightAnnotation\n            annotation={annotation}\n            isSelected={false}\n            onSelect={() => {}}\n            onUpdate={() => {}}\n            onContextMenu={() => {}}\n            scale={scale}\n            editable={false}\n          />\n        );\n        break;\n      case 'numberedBadge':\n        annotationComponent = (\n          <NumberedBadgeAnnotation\n            annotation={annotation}\n            isSelected={false}\n            onSelect={() => {}}\n            onUpdate={() => {}}\n            onContextMenu={() => {}}\n            scale={scale}\n            editable={false}\n          />\n        );\n        break;\n      case 'rect':\n        annotationComponent = (\n          <RectAnnotation\n            annotation={annotation}\n            isSelected={false}\n            onSelect={() => {}}\n            onUpdate={() => {}}\n            onContextMenu={() => {}}\n            scale={scale}\n            editable={false}\n          />\n        );\n        break;\n      case 'circle':\n        annotationComponent = (\n          <CircleAnnotation\n            annotation={annotation}\n            isSelected={false}\n            onSelect={() => {}}\n            onUpdate={() => {}}\n            onContextMenu={() => {}}\n            scale={scale}\n            editable={false}\n          />\n        );\n        break;\n      case 'image':\n      case 'aiImage':\n        annotationComponent = (\n          <ImageAnnotationComponent\n            annotation={annotation}\n            isSelected={false}\n            onSelect={() => {}}\n            onUpdate={() => {}}\n            onContextMenu={() => {}}\n            scale={scale}\n            editable={false}\n          />\n        );\n        break;\n      case 'richText':\n        annotationComponent = (\n          <RichTextAnnotationComponent\n            annotation={annotation}\n            isSelected={false}\n            onSelect={() => {}}\n            onUpdate={() => {}}\n            onContextMenu={() => {}}\n            scale={scale}\n            editable={false}\n          />\n        );\n        break;\n      default:\n        return null;\n    }\n\n    // Key uses only annotation ID to ensure stable component identity\n    // Position changes are handled by each annotation component's internal useEffect\n    // Including other values in the key would cause remounts during drag operations\n    return (\n      <div key={annotation.id} style={baseStyle}>\n        {annotationComponent}\n      </div>\n    );\n  };\n\n  if (!selectedTutorial) {\n    return (\n      <div className=\"h-screen flex items-center justify-center bg-background\">\n        <div className=\"text-center\">\n          <p className=\"text-muted-foreground\">No tutorial selected</p>\n        </div>\n      </div>\n    );\n  }\n\n  return (\n    <ParallaxProvider>\n      <div className={`h-full w-full relative bg-background ${className || ''}`}>\n\n        {/* Nested Progress Indicator */}\n        <NestedProgressIndicator\n          tutorial={selectedTutorial}\n          currentStepIndex={currentStepIndex}\n          currentSubstepIndex={getCurrentSubstepIndex(currentStepIndex)}\n          currentSlideIndex={getCurrentSlideIndex(currentStepIndex, getCurrentSubstepIndex(currentStepIndex))}\n          onStepClick={(stepIndex) => {\n            scrollToStep(stepIndex);\n            onSubstepChange(stepIndex, 0);\n          }}\n          onSubstepClick={(stepIndex, substepIndex) => {\n            scrollToStep(stepIndex);\n            setTimeout(() => scrollToSubstep(stepIndex, substepIndex), 100);\n          }}\n          onSlideClick={(stepIndex, substepIndex, slideIndex) => {\n            scrollToStep(stepIndex);\n            setTimeout(() => scrollToSubstep(stepIndex, substepIndex), 100);\n            if (onSlideChange) {\n              onSlideChange(stepIndex, substepIndex, slideIndex);\n            }\n          }}\n        />\n\n      {/* Navigation FAB Buttons */}\n      <div className=\"fixed bottom-6 right-6 z-50 flex flex-col gap-3\">\n        <button\n          onClick={() => navigateSubstep(-1)}\n          disabled={\n            currentStepIndex === 0 &&\n            getCurrentSubstepIndex(0) === 0 &&\n            getCurrentSlideIndex(0, 0) === 0\n          }\n          className=\"w-10 h-10 rounded-full bg-primary text-primary-foreground shadow-lg hover:shadow-xl hover:scale-105 transition-all duration-200 flex items-center justify-center disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:scale-100 disabled:hover:shadow-lg\"\n        >\n          <ChevronUp className=\"h-5 w-5\" />\n        </button>\n        <button\n          onClick={() => navigateSubstep(1)}\n          disabled={(() => {\n            if (currentStepIndex !== stepSections.length - 1) return false;\n            const lastStep = stepSections[currentStepIndex];\n            if (!lastStep) return true;\n            const lastSubstepIdx = lastStep.step.subSteps.length - 1;\n            if (getCurrentSubstepIndex(currentStepIndex) !== lastSubstepIdx) return false;\n            const lastSubstep = lastStep.step.subSteps[lastSubstepIdx];\n            const lastSlideCount = lastSubstep?.slides?.length || 1;\n            return getCurrentSlideIndex(currentStepIndex, lastSubstepIdx) === lastSlideCount - 1;\n          })()}\n          className=\"w-10 h-10 rounded-full bg-primary text-primary-foreground shadow-lg hover:shadow-xl hover:scale-105 transition-all duration-200 flex items-center justify-center disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:scale-100 disabled:hover:shadow-lg\"\n        >\n          <ChevronDown className=\"h-5 w-5\" />\n        </button>\n      </div>\n\n      {/* Outer Scroll Container - Steps */}\n      <div\n        ref={outerContainerRef}\n        className=\"h-full overflow-y-scroll scroll-smooth snap-y snap-mandatory\"\n        style={{ scrollbarWidth: 'none', msOverflowStyle: 'none' }}\n      >\n        <style>{`\n          div::-webkit-scrollbar {\n            display: none;\n          }\n        `}</style>\n\n        {stepSections.length === 0 ? (\n          <div className=\"h-full w-full flex items-center justify-center\">\n            <div className=\"text-center space-y-4 max-w-md p-8\">\n              <div className=\"flex justify-center\">\n                <div className=\"w-16 h-16 rounded-full bg-primary/10 flex items-center justify-center\">\n                  <svg width=\"32\" height=\"32\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\">\n                    <line x1=\"12\" y1=\"5\" x2=\"12\" y2=\"19\"></line>\n                    <line x1=\"5\" y1=\"12\" x2=\"19\" y2=\"12\"></line>\n                  </svg>\n                </div>\n              </div>\n\n              <div className=\"space-y-2\">\n                <h3 className=\"text-lg font-semibold\">No steps yet</h3>\n                <p className=\"text-sm text-muted-foreground\">\n                  This tutorial has no steps to display\n                </p>\n              </div>\n            </div>\n          </div>\n        ) : stepSections.map((section, stepIdx) => {\n          const currentSubstepIdx = getCurrentSubstepIndex(section.stepIndex);\n\n          return (\n            <div\n              key={section.step.id}\n              ref={(el) => {\n                stepRefs.current[stepIdx] = el;\n              }}\n              className=\"w-full snap-start\"\n              style={{ display: 'flex', flexDirection: 'column', height: '100%', boxSizing: 'border-box', overflow: 'visible' }}\n            >\n              {/* Fixed Step Header */}\n              <div\n                className=\"flex flex-col px-4 pb-2 pt-2\"\n                style={{ flexShrink: 0 }}\n              >\n                <div className=\"flex items-center gap-2\">\n                  <div\n                    className=\"flex items-center justify-center w-7 h-7 rounded-full text-xs font-semibold\"\n                    style={{\n                      backgroundColor: section.stepIndex === currentStepIndex\n                        ? 'hsl(var(--primary))'\n                        : 'hsl(var(--muted))',\n                      color: section.stepIndex === currentStepIndex\n                        ? 'hsl(var(--primary-foreground))'\n                        : 'hsl(var(--muted-foreground))'\n                    }}\n                  >\n                    {section.stepIndex + 1}\n                  </div>\n                  <h2\n                    className=\"text-base font-bold\"\n                    style={{\n                      color: section.stepIndex === currentStepIndex\n                        ? 'inherit'\n                        : 'hsl(var(--muted-foreground))'\n                    }}\n                  >\n                    {section.step.title}\n                  </h2>\n                </div>\n                {!isRichTextEmpty(section.step.description) ? (\n                  <div\n                    className=\"prose prose-sm mt-2 ml-9 max-w-none leading-relaxed rich-text-display\"\n                    style={{\n                      color: section.stepIndex === currentStepIndex\n                        ? 'inherit'\n                        : 'hsl(var(--muted-foreground))'\n                    }}\n                    dangerouslySetInnerHTML={{ __html: section.step.description }}\n                  />\n                ) : null}\n              </div>\n\n              {/* Main Content Area */}\n              {section.step.subSteps.length > 0 ? (\n                <div style={{ flex: '1 1 0', minHeight: 0, display: 'flex', gap: '16px', padding: '0px 60px 0px 16px' }}>\n                  {/* Left: Fixed Substep List - Timeline */}\n                  <div\n                    style={{ width: '250px', flexShrink: 0, position: 'relative', paddingTop: '20px' }}\n                  >\n                    {/* Substeps */}\n                    <div style={{ display: 'flex', flexDirection: 'column', gap: '12px', position: 'relative', zIndex: 1 }}>\n                      {section.step.subSteps.map((substep, idx) => {\n                        const isCurrentSubstep = idx === currentSubstepIdx;\n\n                        return (\n                          <div\n                            key={substep.id}\n                            className=\"flex items-start gap-3\"\n                          >\n                            {/* Badge wrapper with line segment */}\n                            <div style={{\n                              position: 'relative',\n                              flexShrink: 0,\n                              alignSelf: 'stretch',\n                              display: 'flex',\n                              flexDirection: 'column',\n                              width: '28px', // Fixed width to match largest badge\n                              alignItems: 'center' // Center badges horizontally\n                            }}>\n                              {/* Connecting line segment */}\n                              <div\n                                style={{\n                                  position: 'absolute',\n                                  left: '50%',\n                                  transform: 'translateX(-1px)',\n                                  width: '2px',\n                                  backgroundColor: idx < currentSubstepIdx\n                                    ? 'hsl(var(--primary))'\n                                    : 'hsl(var(--muted))',\n                                  ...(idx === 0\n                                    ? { top: '14px', bottom: '-12px' } // First: badge center to beyond bottom\n                                    : idx === section.step.subSteps.length - 1\n                                    ? { top: '-12px', height: '26px' } // Last: from above to badge center (12px + 14px)\n                                    : { top: '-12px', bottom: '-12px' } // Middle: through full height\n                                  ),\n                                  zIndex: idx < currentSubstepIdx ? 1 : 0, // Blue lines on top\n                                }}\n                              />\n                              {/* Badge */}\n                              <div\n                                className=\"flex items-center justify-center rounded-full text-xs font-bold\"\n                                style={{\n                                  width: isCurrentSubstep ? '28px' : '24px',\n                                  height: isCurrentSubstep ? '28px' : '24px',\n                                  backgroundColor: isCurrentSubstep\n                                    ? 'hsl(var(--primary))'\n                                    : 'hsl(var(--card))',\n                                  color: isCurrentSubstep\n                                    ? 'hsl(var(--primary-foreground))'\n                                    : 'hsl(var(--muted-foreground))',\n                                  border: !isCurrentSubstep ? '2px solid hsl(var(--muted))' : 'none',\n                                  transition: 'all 0.3s ease',\n                                  boxShadow: isCurrentSubstep ? '0 0 0 4px hsl(var(--primary) / 0.2)' : 'none',\n                                  position: 'relative',\n                                  zIndex: 2,\n                                  pointerEvents: 'none',\n                                }}\n                              >\n                                {idx + 1}\n                              </div>\n                            </div>\n                            <div style={{ flex: 1, paddingTop: '2px' }}>\n                              <h3\n                                className=\"text-sm font-semibold leading-tight\"\n                                style={{\n                                  color: isCurrentSubstep\n                                    ? 'inherit'\n                                    : 'hsl(var(--muted-foreground))'\n                                }}\n                              >\n                                {substep.title}\n                              </h3>\n                              {isCurrentSubstep && !isRichTextEmpty(substep.description) ? (\n                                <div\n                                  className=\"prose prose-xs mt-2 max-w-none leading-relaxed rich-text-display substep-description text-muted-foreground\"\n                                  dangerouslySetInnerHTML={{ __html: substep.description }}\n                                />\n                              ) : null}\n                            </div>\n                          </div>\n                        );\n                      })}\n                    </div>\n                  </div>\n\n                  {/* Right: Scrollable Screenshot Container */}\n                  <div\n                    ref={(el) => {\n                      if (el) substepScrollRefs.current.set(section.stepIndex, el);\n                    }}\n                    className=\"overflow-y-scroll scroll-smooth snap-y snap-mandatory\"\n                    style={{ flex: '1 1 0', minHeight: 0, scrollbarWidth: 'none', msOverflowStyle: 'none', padding: '30px 0' }}\n                    onScroll={(e) => {\n                      // Detect which slide is currently most visible\n                      const container = e.currentTarget;\n                      const children = Array.from(container.children) as HTMLElement[];\n                      const containerRect = container.getBoundingClientRect();\n\n                      // Get current substep info for containment logic\n                      const currentSubstepIdx = getCurrentSubstepIndex(section.stepIndex);\n\n                      let bestChild: HTMLElement | null = null;\n                      let bestVisibility = 0;\n\n                      children.forEach((child) => {\n                        const childSubstepIdx = parseInt((child as HTMLElement).getAttribute('data-substep-index') || '0');\n\n                        // Only consider slides from adjacent substeps (current, previous, or next)\n                        // This allows backward scrolling while keeping the scope manageable\n                        const isAdjacentSubstep = Math.abs(childSubstepIdx - currentSubstepIdx) <= 1;\n                        if (!isAdjacentSubstep) {\n                          return; // Skip slides from non-adjacent substeps\n                        }\n\n                        const childRect = child.getBoundingClientRect();\n                        const visible = Math.max(0, Math.min(childRect.bottom, containerRect.bottom) - Math.max(childRect.top, containerRect.top));\n                        const ratio = childRect.height > 0 ? visible / childRect.height : 0;\n\n                        if (ratio > bestVisibility) {\n                          bestVisibility = ratio;\n                          bestChild = child;\n                        }\n                      });\n\n                      // Only switch when a slide is at least 50% visible to prevent premature next-step jumps\n                      if (bestChild && bestVisibility >= 0.5 && section.stepIndex === currentStepIndex) {\n                        const substepIdx = parseInt((bestChild as HTMLElement).getAttribute('data-substep-index') || '0');\n                        const slideIdx = parseInt((bestChild as HTMLElement).getAttribute('data-slide-index') || '0');\n                        const currentSubstepIdx = getCurrentSubstepIndex(section.stepIndex);\n\n                        // Check if we're trying to advance to a new substep\n                        if (substepIdx !== currentSubstepIdx) {\n                          // Prevent advancing to next substep if we're on the last slide of current substep\n                          // Use dual-condition check to ensure clean transition without grey effect\n                          const currentSubstep = section.step.subSteps[currentSubstepIdx];\n                          const currentSubstepSlideCount = currentSubstep?.slides?.length || 1;\n                          const isOnLastSlideOfCurrentSubstep = getCurrentSlideIndex(section.stepIndex, currentSubstepIdx) === currentSubstepSlideCount - 1;\n\n                          if (isOnLastSlideOfCurrentSubstep && substepIdx === currentSubstepIdx + 1) {\n                            // Special case: if this is the last substep, use relaxed conditions\n                            const isLastSubstep = substepIdx === section.step.subSteps.length - 1;\n\n                            if (isLastSubstep) {\n                              // For last substep: check if we've scrolled near the bottom OR if visibility is reasonable\n                              const scrolledToBottom = container.scrollHeight - (container.scrollTop + container.clientHeight) < 50;\n                              const hasReasonableVisibility = bestVisibility >= 0.3;\n\n                              if (!scrolledToBottom && !hasReasonableVisibility) {\n                                return; // Don't advance until we've scrolled far enough\n                              }\n                            } else {\n                              // For other substeps: use strict dual-condition check\n                              // Find the last slide of the current substep\n                              const lastSlideElement = children.find(child => {\n                                const childSubstepIdx = parseInt((child as HTMLElement).getAttribute('data-substep-index') || '0');\n                                const childSlideIdx = parseInt((child as HTMLElement).getAttribute('data-slide-index') || '0');\n                                return childSubstepIdx === currentSubstepIdx && childSlideIdx === currentSubstepSlideCount - 1;\n                              });\n\n                              if (lastSlideElement) {\n                                const lastSlideRect = lastSlideElement.getBoundingClientRect();\n                                const lastSlideVisible = Math.max(0, Math.min(lastSlideRect.bottom, containerRect.bottom) - Math.max(lastSlideRect.top, containerRect.top));\n                                const lastSlideRatio = lastSlideRect.height > 0 ? lastSlideVisible / lastSlideRect.height : 0;\n\n                                // DUAL CONDITION: Next slide must be 70%+ visible AND last slide must be < 20% visible\n                                // This ensures the last slide is mostly out of view before advancing\n                                if (bestVisibility < 0.7 || lastSlideRatio >= 0.2) {\n                                  return; // Don't advance until transition is clear\n                                }\n                              }\n                            }\n                          }\n\n                          onSubstepChange(section.stepIndex, substepIdx);\n                        }\n\n                        const currentSlideForSubstep = getCurrentSlideIndex(section.stepIndex, substepIdx);\n                        if (slideIdx !== currentSlideForSubstep && onSlideChange) {\n                          onSlideChange(section.stepIndex, substepIdx, slideIdx);\n                        }\n                      }\n                    }}\n                  >\n                    {section.step.subSteps.map((substep, substepIdx) => {\n                      const isCurrentSubstep = substepIdx === currentSubstepIdx;\n                      const currentSlideIdx = getCurrentSlideIndex(section.stepIndex, substepIdx);\n\n                      // Get slide count for this substep\n                      const slideCount = substep.slides?.length || 1;\n\n                      // Render each slide as a separate scroll section\n                      return Array.from({ length: slideCount }).map((_, slideIdx) => {\n                        const isCurrentSlide = isCurrentSubstep && slideIdx === currentSlideIdx;\n                        const screenshotPath = resolveSubstepScreenshotKey(section.step, substep, slideIdx);\n                        const screenshotSrc = screenshotPath ? getScreenshotSrc(screenshotPath) : null;\n                        const annotations = resolveSubstepAnnotations(substep, slideIdx);\n                        const hasAnnotations = (annotations?.length ?? 0) > 0;\n\n                        return (\n                          <div\n                            key={`${substep.id}-slide-${slideIdx}`}\n                            ref={(el) => {\n                              if (el && slideIdx === 0) {\n                                // Store ref only for first slide to maintain substep navigation\n                                substepRefs.current.set(`${section.step.id}-${substep.id}`, el);\n                              }\n                            }}\n                            data-substep-index={substepIdx}\n                            data-slide-index={slideIdx}\n                            style={{ width: '100%', minHeight: '70%', display: 'flex', alignItems: 'center', justifyContent: 'center', position: 'relative', padding: '20px 75px', marginBottom: '10px', scrollSnapAlign: 'center' }}\n                          >\n                          {(() => {\n                            const hasScreenshot = Boolean(screenshotPath && screenshotSrc);\n\n                            // For slides without screenshots, calculate dimensions from annotations and treat like an image\n                            const calculatedDims = hasScreenshot ? null : calculateAnnotationBounds(annotations, 30);\n                            const canvasKey = hasScreenshot ? null : `canvas-${section.step.id}-${substep.id}-${slideIdx}:${calculatedDims!.width}:${calculatedDims!.height}`;\n\n                            // Canvas natural dimensions (for sizing the canvas div itself)\n                            const canvasNaturalDims = hasScreenshot\n                              ? null\n                              : (calculatedDims!.width > 0 && calculatedDims!.height > 0 ? calculatedDims! : DEFAULT_CANVAS_DIMENSIONS);\n\n                            // Displayed dimensions (for annotation container - same for both screenshots and canvases)\n                            const displayedDims = hasScreenshot\n                              ? getImageDimensions(screenshotPath!)\n                              : getImageDimensions(canvasKey!);\n\n                            // Use displayed dimensions for annotation container, with fallback to natural dimensions\n                            const resolvedDims = displayedDims.width > 0 && displayedDims.height > 0\n                              ? displayedDims\n                              : (canvasNaturalDims || DEFAULT_CANVAS_DIMENSIONS);\n\n                            // Use the same key for both screenshots and canvases\n                            const scaleKey = hasScreenshot ? screenshotPath : canvasKey;\n                            const annotationScale = getEffectiveScale(scaleKey);\n                            const canRenderAnnotations = resolvedDims.width > 0 && resolvedDims.height > 0;\n\n                            return (\n                              <div style={{\n                                position: 'relative',\n                                width: '100%',\n                                height: '100%',\n                                display: 'flex',\n                                alignItems: 'center',\n                                justifyContent: 'center',\n                                opacity: isCurrentSlide ? 1 : 0.4,\n                                filter: isCurrentSlide ? 'grayscale(0)' : 'grayscale(1)',\n                                ...(transitionsReady && {\n                                  transition: 'opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), filter 0.6s cubic-bezier(0.4, 0, 0.2, 1)'\n                                })\n                              }}>\n                                <div style={{\n                                  position: 'relative',\n                                  display: 'flex',\n                                  alignItems: 'center',\n                                  justifyContent: 'center',\n                                  width: '100%',\n                                  height: '100%',\n                                  transform: isCurrentSlide ? 'scale(1) translateY(0)' : 'scale(0.95) translateY(10px)',\n                                  ...(transitionsReady && {\n                                    transition: 'transform 0.6s cubic-bezier(0.4, 0, 0.2, 1)'\n                                  })\n                                }}\n                                data-screenshot-container=\"true\"\n                              >\n                                  {hasScreenshot ? (\n                                    <img\n                                      ref={(el) => {\n                                        if (el && typeof screenshotPath === 'string') {\n                                          imageRefs.current.set(screenshotPath, el);\n                                        }\n                                      }}\n                                      src={screenshotSrc ?? undefined}\n                                      alt=\"Screenshot\"\n                                      style={{\n                                        maxWidth: '100%',\n                                        maxHeight: '100%',\n                                        width: 'auto',\n                                        height: 'auto',\n                                        display: 'block',\n                                        position: 'relative',\n                                        zIndex: 1\n                                      }}\n                                      className=\"rounded-lg shadow-xl\"\n                                      onLoad={(e) => {\n                                        const img = e.currentTarget;\n                                        if (img.naturalWidth && img.naturalHeight && typeof screenshotPath === 'string') {\n                                          calculateImageScale(screenshotPath, img);\n                                        }\n                                      }}\n                                    />\n                                  ) : (\n                                    <div\n                                      ref={(el) => {\n                                        if (el && canvasKey) {\n                                          imageRefs.current.set(canvasKey, el);\n\n                                          // Use ResizeObserver and requestAnimationFrame for reliable dimension tracking\n                                          const observer = new ResizeObserver(() => {\n                                            // Use RAF to ensure layout is complete\n                                            requestAnimationFrame(() => {\n                                              if (el.offsetWidth > 0 && el.offsetHeight > 0) {\n                                                calculateImageScale(canvasKey, el, canvasNaturalDims!);\n                                              }\n                                            });\n                                          });\n                                          observer.observe(el);\n\n                                          // Also try immediate calculation\n                                          requestAnimationFrame(() => {\n                                            if (el.offsetWidth > 0 && el.offsetHeight > 0) {\n                                              calculateImageScale(canvasKey, el, canvasNaturalDims!);\n                                            }\n                                          });\n                                        }\n                                      }}\n                                      style={{\n                                        width: '100%',\n                                        maxWidth: canvasNaturalDims!.width,\n                                        minHeight: !hasAnnotations ? '400px' : undefined,\n                                        aspectRatio: `${canvasNaturalDims!.width} / ${canvasNaturalDims!.height}`,\n                                        display: 'block',\n                                        position: 'relative',\n                                        borderRadius: 16,\n                                        border: '1px solid hsl(var(--muted-foreground) / 0.15)',\n                                        background: 'radial-gradient(circle at center, hsl(var(--muted)/0.15), transparent 65%)',\n                                        boxShadow: 'inset 0 0 32px hsl(var(--muted)/0.2)',\n                                        zIndex: 1\n                                      }}\n                                    >\n                                      {!hasAnnotations && (\n                                        <div\n                                          style={{\n                                            position: 'absolute',\n                                            inset: 0,\n                                            display: 'flex',\n                                            flexDirection: 'column',\n                                            alignItems: 'center',\n                                            justifyContent: 'center',\n                                            gap: '16px',\n                                            pointerEvents: 'none'\n                                          }}\n                                        >\n                                          {/* Icon */}\n                                          <svg\n                                            width=\"64\"\n                                            height=\"64\"\n                                            viewBox=\"0 0 24 24\"\n                                            fill=\"none\"\n                                            stroke=\"hsl(var(--muted-foreground) / 0.3)\"\n                                            strokeWidth=\"1.5\"\n                                            strokeLinecap=\"round\"\n                                            strokeLinejoin=\"round\"\n                                          >\n                                            <rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\"/>\n                                            <circle cx=\"8.5\" cy=\"8.5\" r=\"1.5\"/>\n                                            <polyline points=\"21 15 16 10 5 21\"/>\n                                          </svg>\n\n                                          {/* Main message */}\n                                          <div\n                                            style={{\n                                              color: 'hsl(var(--muted-foreground) / 0.6)',\n                                              fontSize: '18px',\n                                              fontWeight: 600,\n                                              textAlign: 'center'\n                                            }}\n                                          >\n                                            No Content Yet\n                                          </div>\n\n                                          {/* Helper text */}\n                                          <div\n                                            style={{\n                                              color: 'hsl(var(--muted-foreground) / 0.4)',\n                                              fontSize: '14px',\n                                              textAlign: 'center',\n                                              maxWidth: '300px',\n                                              lineHeight: '1.5'\n                                            }}\n                                          >\n                                            This step has no content to display\n                                          </div>\n                                        </div>\n                                      )}\n                                    </div>\n                                  )}\n\n                                  {canRenderAnnotations && (\n                                    <div\n                                      style={{ position: 'absolute', inset: 0, display: 'flex', alignItems: 'center', justifyContent: 'center', pointerEvents: 'none', zIndex: 2, overflow: 'visible' }}\n                                    >\n                                      <div\n                                        style={{ position: 'relative', width: resolvedDims.width, height: resolvedDims.height, pointerEvents: 'none', overflow: 'visible' }}\n                                      >\n                                        {annotations.map((annotation) => {\n                                          // Resolve image references before rendering\n                                          const resolvedAnnotation = (annotation.type === 'image' || annotation.type === 'aiImage') && annotation.imageRef && !annotation.imageData ?\n                                            { ...annotation, imageData: resolveImageData(annotation, null) ?? undefined } : annotation;\n                                          return renderAnnotation(\n                                            resolvedAnnotation,\n                                            annotationScale,\n                                            isCurrentSlide\n                                          );\n                                        })}\n                                      </div>\n                                    </div>\n                                  )}\n                                </div>\n                              </div>\n                            );\n                          })()}\n                        </div>\n                      );\n                    });\n                  })}\n                  </div>\n                </div>\n              ) : null}\n            </div>\n          );\n        })}\n      </div>\n      </div>\n    </ParallaxProvider>\n  );\n});\n\nTutorialPlayerCore.displayName = 'TutorialPlayerCore';\n\nexport default TutorialPlayerCore;\n","/**\n * Image loader function type\n */\nexport type ImageLoader = (path: string) => Promise<string>;\n\n/**\n * Default image loader for web environments\n * Fetches images from URLs and converts them to data URLs\n */\nexport const defaultWebImageLoader: ImageLoader = async (path: string): Promise<string> => {\n  // If it's already a data URL, return as is\n  if (path.startsWith('data:')) {\n    return path;\n  }\n\n  // Fetch the image\n  const response = await fetch(path);\n  if (!response.ok) {\n    throw new Error(`Failed to load image: ${path}`);\n  }\n\n  const blob = await response.blob();\n  return new Promise((resolve, reject) => {\n    const reader = new FileReader();\n    reader.onloadend = () => resolve(reader.result as string);\n    reader.onerror = reject;\n    reader.readAsDataURL(blob);\n  });\n};\n\n/**\n * Example Tauri image loader for reference\n * Should be implemented in the consuming app if using Tauri\n */\nexport const createTauriImageLoader = () => {\n  return async (_path: string): Promise<string> => {\n    // This is just an example - actual implementation needs Tauri imports\n    throw new Error(\n      'Tauri image loader must be implemented in your app. ' +\n      'Import readFile from @tauri-apps/plugin-fs and implement accordingly.'\n    );\n  };\n};\n\n/**\n * Helper to convert bytes to base64 in chunks (useful for Tauri)\n */\nexport const bytesToBase64 = (bytes: Uint8Array): string => {\n  let binary = '';\n  const chunkSize = 8192;\n  for (let i = 0; i < bytes.length; i += chunkSize) {\n    const chunk = bytes.subarray(i, i + chunkSize);\n    binary += String.fromCharCode(...chunk);\n  }\n  return btoa(binary);\n};\n","import React, { useState, useEffect } from 'react';\nimport { Tutorial } from './types';\nimport TutorialPlayerCore from './TutorialPlayerCore';\nimport { defaultWebImageLoader, ImageLoader } from './utils/imageLoaders';\nimport './styles/styles.css';\n\nexport interface TutorialPlayerProps {\n  /** Array of tutorials to display */\n  tutorials: Tutorial[];\n  /** ID of the initially selected tutorial (defaults to first tutorial) */\n  initialTutorialId?: string;\n  /** Custom image loader function - receives image path and returns data URL */\n  imageLoader?: ImageLoader;\n  /** Function to resolve relative image paths to absolute paths/URLs */\n  resolveImagePath?: (relativePath: string) => string;\n  /** Additional CSS class name */\n  className?: string;\n}\n\nconst TutorialPlayer: React.FC<TutorialPlayerProps> = ({\n  tutorials,\n  initialTutorialId,\n  imageLoader = defaultWebImageLoader,\n  resolveImagePath = (path) => path,\n  className = '',\n}) => {\n  const [selectedTutorial, setSelectedTutorial] = useState<Tutorial | null>(null);\n  const [currentStepIndex, setCurrentStepIndex] = useState(0);\n  const [substepIndices, setSubstepIndices] = useState<Map<number, number>>(new Map());\n  const [slideIndices, setSlideIndices] = useState<Map<string, number>>(new Map());\n\n  // Set initial tutorial as selected on mount\n  useEffect(() => {\n    if (tutorials && tutorials.length > 0 && !selectedTutorial) {\n      const initialTutorial = initialTutorialId\n        ? tutorials.find(t => t.id === initialTutorialId) || tutorials[0]\n        : tutorials[0];\n\n      setSelectedTutorial(initialTutorial);\n      setCurrentStepIndex(0);\n      // Initialize all steps to show first substep\n      const initialIndices = new Map<number, number>();\n      initialTutorial.steps.forEach((_, idx) => {\n        initialIndices.set(idx, 0);\n      });\n      setSubstepIndices(initialIndices);\n    }\n  }, [tutorials, initialTutorialId, selectedTutorial]);\n\n  const handleStepChange = (stepIndex: number) => {\n    setCurrentStepIndex(stepIndex);\n  };\n\n  const handleSubstepChange = (stepIndex: number, substepIndex: number) => {\n    setSubstepIndices(prev => {\n      const newMap = new Map(prev);\n      newMap.set(stepIndex, substepIndex);\n      return newMap;\n    });\n  };\n\n  const handleSlideChange = (stepIndex: number, substepIndex: number, slideIndex: number) => {\n    const key = `${stepIndex}-${substepIndex}`;\n    setSlideIndices(prev => {\n      const newMap = new Map(prev);\n      newMap.set(key, slideIndex);\n      return newMap;\n    });\n  };\n\n  if (!selectedTutorial) {\n    return (\n      <div className={`h-full flex items-center justify-center ${className}`}>\n        <div className=\"text-center\">\n          <p className=\"text-muted-foreground\">No tutorial available</p>\n        </div>\n      </div>\n    );\n  }\n\n  return (\n    <TutorialPlayerCore\n      tutorial={selectedTutorial}\n      currentStepIndex={currentStepIndex}\n      substepIndices={substepIndices}\n      slideIndices={slideIndices}\n      onStepChange={handleStepChange}\n      onSubstepChange={handleSubstepChange}\n      onSlideChange={handleSlideChange}\n      imageLoader={imageLoader}\n      resolveImagePath={resolveImagePath}\n      className={className}\n    />\n  );\n};\n\nexport default TutorialPlayer;\n"],"names":["toKebabCase","string","toCamelCase","match","p1","p2","toPascalCase","camelCase","mergeClasses","classes","className","index","array","hasA11yProp","props","prop","defaultAttributes","Icon","forwardRef","color","size","strokeWidth","absoluteStrokeWidth","children","iconNode","rest","ref","createElement","tag","attrs","createLucideIcon","iconName","Component","__iconNode","ChevronDown","ChevronUp","GripVertical","Minus","Plus","TextAlignCenter","TextAlignEnd","TextAlignStart","NEWTON_ITERATIONS","NEWTON_MIN_SLOPE","SUBDIVISION_PRECISION","SUBDIVISION_MAX_ITERATIONS","kSplineTableSize","kSampleStepSize","float32ArraySupported","A","aA1","aA2","B","C","calcBezier","aT","getSlope","binarySubdivide","aX","aA","aB","mX1","mX2","currentX","currentT","i","newtonRaphsonIterate","aGuessT","currentSlope","LinearEasing","x","src","mY1","mY2","sampleValues","getTForX","intervalStart","currentSample","lastSample","dist","guessForT","initialSlope","Limits","properties","_extends","target","source","key","ValidCSSEffects","Units","RotationUnits","ScaleUnits","ScrollAxis","EasingPreset","id","createId","Rect","options","rect","scrollRect","_proto","rootMargin","totalRootY","totalRootX","VALID_UNITS","parseValueAndUnit","str","defaultUnit","out","isValid","isValidUnit","easingPresets","createEasingFunction","easing","bezier","params","PARALLAX_EFFECTS","MAP_EFFECT_TO_DEFAULT_UNIT","parseElementTransitionEffects","scrollAxis","parsedEffects","defaultValue","value","startSpeed","endSpeed","startParsed","endParsed","speedConfig","_value","_startParsed","_endParsed","getProgressAmount","start","totalDist","currentScroll","startAdjustedScroll","amount","isElementInView","end","scroll","isInView","scaleBetween","newMin","newMax","oldMin","oldMax","scaleEffectByProgress","effect","progress","TRANSFORM_EFFECTS","v","setWillChangeStyles","el","effects","keys","hasOpacity","willChange","setElementStyles","transform","getTransformStyles","opacity","getOpacityStyles","scaledOpacity","styleStr","acc","scaledEffect","resetStyles","element","createLimitsForRelativeElements","view","shouldAlwaysCompleteAnimation","startY","startX","endY","endX","limits","getTranslateScalar","startTranslatePx","endTranslatePx","slow","totalAbsOff","totalDistTrue","scale","getStartEndValueInPx","translate","elementSize","unit","startScale","endScale","_startScale","_endScale","DEFAULT_VALUE","createLimitsWithTranslationsForRelativeElements","translateX","translateY","_getStartEndValueInPx","startTranslateXPx","endTranslateXPx","_getStartEndValueInPx2","startTranslateYPx","endTranslateYPx","startMultiplierY","endMultiplierY","startMultiplierX","endMultiplierX","topBeginsInView","leftBeginsInView","bottomEndsInView","rightEndsInView","_totalDist","_totalDist2","_totalDist3","scaleTranslateEffectsForSlowerScroll","effectsCopy","getShouldScaleTranslateEffects","clamp","num","min","max","Element","nextProps","shouldScaleTranslateEffects","nextIsInView","isFirstChange","finalProgress","nextProgress","isVertical","total","s","View","config","Scroll","y","testForPassiveScroll","supportsPassiveOption","opts","ParallaxController","_ref","_ref$scrollAxis","scrollContainer","_ref$disabled","disabled","_this$_getScrollPosit","hasWindow","_this","method","_this$_resizeObserver","_this2","observedEl","nx","ny","_this$elements","_this$_getScrollPosit2","_temp","_this3","_ref2","updateCache","_width","_height","_scrollHeight","_scrollWidth","html","width","height","scrollHeight","scrollWidth","newElement","_this$_getScrollPosit3","_this4","ParallaxContext","React","createController","ParallaxProvider","controller","useRef","useEffect","_controller$current","clonePosition","pos","cloneOptionalPosition","positionsEqual","a","b","snapshotsEqual","createSnapshot","control","ArrowAnnotation","annotation","isSelected","isCurrentSubstep","onSelect","onUpdate","onContextMenu","editable","isDragging","setIsDragging","useState","startPosRef","tempStartPosition","setTempStartPosition","tempEndPosition","setTempEndPosition","tempControlPoint","setTempControlPoint","latestStartRef","latestEndRef","latestControlRef","lastSentUpdateRef","prevAnnotationIdRef","annotationSnapshot","tempSnapshot","pendingSnapshot","_a","_b","currentStartPosition","currentEndPosition","currentControlPoint","displayColor","displayOpacity","scaledStartX","scaledStartY","scaledEndX","scaledEndY","scaledControlX","scaledControlY","handleMouseDown","e","type","handleMouseMove","dx","dy","dxScaled","dyScaled","nextStart","nextEnd","nextControl","handleMouseUp","snapshot","handleDoubleClick","midX","midY","length","perpX","perpY","offset","newControlPoint","arrowHeadSize","arrowHeadWidth","endAngle","startAngle","jsxs","jsx","Fragment","TextBalloonAnnotation","isEditing","setIsEditing","isResizing","setIsResizing","inputRef","tempPosition","setTempPosition","tempSize","setTempSize","scaledX","scaledY","scaledWidth","scaledHeight","handleTextChange","handleBlur","handleKeyDown","tailPosition","prev","handleResizeMouseDown","getTailStyle","tailSize","overlap","baseStyle","HighlightAnnotation","NumberedBadgeAnnotation","scaledSize","RectAnnotation","CircleAnnotation","tempRadius","setTempRadius","scaledRadius","scaledDiameter","delta","direction","MIN_SIZE","randomInRange","random","hasAnyTornEdges","edges","hashString","hash","mulberry32","seed","createSeededRandom","multiScaleNoise","octaves","amplitude","frequency","maxValue","noiseValue","octaveValue","buildHorizontalEdge","side","segments","baseline","inwardMultiplier","points","tearMemory","prevOffset","noise","notch","wander","limitedOffset","buildVerticalEdge","generateTornPath","safeWidth","safeHeight","topPoints","rightPoints","bottomPoints","leftPoints","pathParts","startPoint","addBezierSegments","point","ImageAnnotation","aspectRatioRef","latestPositionRef","latestSizeRef","pendingUpdateRef","safeScaleX","safeScaleY","_c","next","ratio","baseSize","proposedWidth","proposedHeight","minWidth","minHeight","nextSize","committedPosition","committedSize","pending","positionDiff","sizeDiff","positionMatches","sizeMatches","outerBorder","innerBorder","borderRadius","rawShadow","boxShadowValue","outerBorderColor","innerBorderColor","resolvedTornEdges","useMemo","_d","hasTorn","clipPathId","tornPath","shadowColor","TornImage","imageData","pathData","outerBorderWidth","innerBorderWidth","filterId","shadowOffset","shadowBlur","filterMargin","r","f","n","clsx","setRef","composeRefs","refs","node","hasCleanup","cleanups","cleanup","createSlot","ownerName","SlotClone","createSlotClone","Slot2","forwardedRef","slotProps","childrenArray","slottable","isSlottable","newChildren","child","Slot","childrenRef","getElementRef","props2","mergeProps","SLOTTABLE_IDENTIFIER","childProps","overrideProps","propName","slotPropValue","childPropValue","args","result","getter","mayWarn","falsyToString","cx","cva","base","_config_compoundVariants","variants","defaultVariants","getVariantClassNames","variant","variantProp","defaultVariantProp","variantKey","propsWithoutUndefined","param","getCompoundVariantClassNames","cvClass","cvClassName","compoundVariantOptions","CLASS_PART_SEPARATOR","createClassGroupUtils","classMap","createClassMap","conflictingClassGroups","conflictingClassGroupModifiers","classParts","getGroupRecursive","getGroupIdForArbitraryProperty","classGroupId","hasPostfixModifier","conflicts","classPartObject","currentClassPart","nextClassPartObject","classGroupFromNextClassPart","classRest","validator","arbitraryPropertyRegex","arbitraryPropertyClassName","property","theme","classGroups","processClassesRecursively","classGroup","classDefinition","classPartObjectToEdit","getPart","isThemeGetter","path","currentClassPartObject","pathPart","func","createLruCache","maxCacheSize","cacheSize","cache","previousCache","update","IMPORTANT_MODIFIER","MODIFIER_SEPARATOR","MODIFIER_SEPARATOR_LENGTH","createParseClassName","prefix","experimentalParseClassName","parseClassName","modifiers","bracketDepth","parenDepth","modifierStart","postfixModifierPosition","currentCharacter","baseClassNameWithImportantModifier","baseClassName","stripImportantModifier","hasImportantModifier","maybePostfixModifierPosition","fullPrefix","parseClassNameOriginal","createSortModifiers","orderSensitiveModifiers","modifier","sortedModifiers","unsortedModifiers","createConfigUtils","SPLIT_CLASSES_REGEX","mergeClassList","classList","configUtils","getClassGroupId","getConflictingClassGroupIds","sortModifiers","classGroupsInConflict","classNames","originalClassName","isExternal","variantModifier","modifierId","classId","conflictGroups","group","twJoin","argument","resolvedValue","toValue","mix","k","createTailwindMerge","createConfigFirst","createConfigRest","cacheGet","cacheSet","functionToCall","initTailwindMerge","previousConfig","createConfigCurrent","tailwindMerge","cachedResult","fromTheme","themeGetter","arbitraryValueRegex","arbitraryVariableRegex","fractionRegex","tshirtUnitRegex","lengthUnitRegex","colorFunctionRegex","shadowRegex","imageRegex","isFraction","isNumber","isInteger","isPercent","isTshirtSize","isAny","isLengthOnly","isNever","isShadow","isImage","isAnyNonArbitrary","isArbitraryValue","isArbitraryVariable","isArbitrarySize","getIsArbitraryValue","isLabelSize","isArbitraryLength","isLabelLength","isArbitraryNumber","isLabelNumber","isArbitraryPosition","isLabelPosition","isArbitraryImage","isLabelImage","isArbitraryShadow","isLabelShadow","isArbitraryVariableLength","getIsArbitraryVariable","isArbitraryVariableFamilyName","isLabelFamilyName","isArbitraryVariablePosition","isArbitraryVariableSize","isArbitraryVariableImage","isArbitraryVariableShadow","testLabel","testValue","shouldMatchNoLabel","label","getDefaultConfig","themeColor","themeFont","themeText","themeFontWeight","themeTracking","themeLeading","themeBreakpoint","themeContainer","themeSpacing","themeRadius","themeShadow","themeInsetShadow","themeTextShadow","themeDropShadow","themeBlur","themePerspective","themeAspect","themeEase","themeAnimate","scaleBreak","scalePosition","scalePositionWithArbitrary","scaleOverflow","scaleOverscroll","scaleUnambiguousSpacing","scaleInset","scaleGridTemplateColsRows","scaleGridColRowStartAndEnd","scaleGridColRowStartOrEnd","scaleGridAutoColsRows","scaleAlignPrimaryAxis","scaleAlignSecondaryAxis","scaleMargin","scaleSizing","scaleColor","scaleBgPosition","scaleBgRepeat","scaleBgSize","scaleGradientStopPosition","scaleRadius","scaleBorderWidth","scaleLineStyle","scaleBlendMode","scaleMaskImagePosition","scaleBlur","scaleRotate","scaleScale","scaleSkew","scaleTranslate","twMerge","cn","inputs","buttonVariants","Button","asChild","Comp","STORAGE_KEY","DEFAULT_POSITION","FloatingRichTextToolbar","isVisible","fontSize","onFontSizeChange","onBold","onItalic","onUnderline","onAlignLeft","onAlignCenter","onAlignRight","onColorChange","minFontSize","maxFontSize","fontStep","position","setPosition","saved","parsed","startToolbarPosRef","toolbarRef","clampPosition","useCallback","newPos","handleResize","handleFontSizeChange","newSize","toolbar","AlignLeft","AlignCenter","AlignRight","createPortal","MIN_FONT_SIZE","MAX_FONT_SIZE","FONT_STEP","RichTextEditor","onChange","placeholder","readOnly","onBlur","onFocus","onKeyDown","style","autoFocus","badgeBackgroundColor","badgeTextColor","editorRef","selectionRef","setFontSize","isFocused","setIsFocused","convertBadgePatterns","_match","number","syncValue","convertedHtml","selection","savedRange","newSelection","badges","lastBadge","newRange","saveSelection","restoreSelection","applyAlignment","alignment","parentNode","execCommand","command","valueArg","applySpanStyle","range","fragment","span","setFontSizePx","clamped","applied","event","MIN_WIDTH","MIN_HEIGHT","FONT_SIZE_STYLES","RichTextAnnotation","startSizeRef","startPositionRef","setHtml","editorContainerRef","showBorder","showBackground","showShadow","fontSizeVariant","fontSizeValue","scaledFontSize","wasSelectedRef","commitPosition","commitSize","handleHtmlChange","nextHtml","closeEditor","handleEditorBlur","activeElement","container","editableRegion","handleEditorKeyDown","isEditorActive","BalloonTooltip","content","setIsVisible","NestedProgressIndicator","tutorial","currentStepIndex","currentSubstepIndex","currentSlideIndex","onStepClick","onSubstepClick","onSlideClick","getSlideCount","substep","renderSlideDots","stepIndex","substepIndex","slideCount","_","slideIndex","isActive","renderSubstepDot","step","renderStepIndicator","hasSubsteps","isCurrentStep","resolveImageData","project","stripRichTextContent","normalizeRichTextValue","isRichTextEmpty","TutorialPlayerCore","selectedTutorial","substepIndices","slideIndices","onStepChange","onSubstepChange","onSlideChange","imageLoader","resolveImagePath","screenshotDataUrls","setScreenshotDataUrls","imageScales","setImageScales","imageDimensions","setImageDimensions","transitionsReady","setTransitionsReady","outerContainerRef","stepRefs","substepScrollRefs","substepRefs","imageRefs","DEFAULT_CANVAS_DIMENSIONS","getEffectiveScale","getImageScale","calculateAnnotationBounds","annotations","margin","minX","minY","maxX","maxY","radius","halfSize","normalizePath","getCurrentSlideIndex","resolveSubstepScreenshotKey","_step","slide","resolveSubstepAnnotations","newDataUrls","uniquePaths","resolvedPath","dataUrl","error","getCurrentSubstepIndex","stepSections","rafId","handleScroll","scrollY","viewportHeight","viewportCenter","closestIndex","closestDistance","stepEl","containerRect","elementCenter","distance","calculateImageScale","naturalDims","displayedWidth","displayedHeight","naturalWidth","naturalHeight","scaleX","scaleY","existing","newMap","parts","navigateSubstep","scrollToStep","lastStepIndex","lastSubstepIndex","targetStep","scrollToSubstep","substepEl","scrollToSlide","slideEl","currentStep","currentSubstepIdx","currentSubstep","currentSlideIdx","newSlideIdx","newSubstepIdx","prevSubstep","prevSlideCount","prevStepIndex","lastSubstep","lastSlideCount","getScreenshotSrc","screenshotPath","getImageDimensions","useImperativeHandle","renderAnnotation","isCurrentSlide","annotationComponent","ImageAnnotationComponent","RichTextAnnotationComponent","lastStep","lastSubstepIdx","section","stepIdx","idx","bestChild","bestVisibility","childSubstepIdx","childRect","visible","substepIdx","slideIdx","currentSubstepSlideCount","scrolledToBottom","hasReasonableVisibility","lastSlideElement","childSlideIdx","lastSlideRect","lastSlideVisible","lastSlideRatio","currentSlideForSubstep","screenshotSrc","hasAnnotations","hasScreenshot","calculatedDims","canvasKey","canvasNaturalDims","displayedDims","resolvedDims","annotationScale","canRenderAnnotations","img","resolvedAnnotation","defaultWebImageLoader","response","blob","resolve","reject","reader","createTauriImageLoader","_path","bytesToBase64","bytes","binary","chunk","TutorialPlayer","tutorials","initialTutorialId","setSelectedTutorial","setCurrentStepIndex","setSubstepIndices","setSlideIndices","initialTutorial","t","initialIndices","handleStepChange","handleSubstepChange","handleSlideChange"],"mappings":"6bAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAOA,MAAMA,GAAeC,GAAWA,EAAO,QAAQ,qBAAsB,OAAO,EAAE,YAAW,EACnFC,GAAeD,GAAWA,EAAO,QACrC,wBACA,CAACE,EAAOC,EAAIC,IAAOA,EAAKA,EAAG,YAAW,EAAKD,EAAG,YAAW,CAC3D,EACME,GAAgBL,GAAW,CAC/B,MAAMM,EAAYL,GAAYD,CAAM,EACpC,OAAOM,EAAU,OAAO,CAAC,EAAE,YAAW,EAAKA,EAAU,MAAM,CAAC,CAC9D,EACMC,GAAe,IAAIC,IAAYA,EAAQ,OAAO,CAACC,EAAWC,EAAOC,IAC9D,EAAQF,GAAcA,EAAU,KAAI,IAAO,IAAME,EAAM,QAAQF,CAAS,IAAMC,CACtF,EAAE,KAAK,GAAG,EAAE,KAAI,EACXE,GAAeC,GAAU,CAC7B,UAAWC,KAAQD,EACjB,GAAIC,EAAK,WAAW,OAAO,GAAKA,IAAS,QAAUA,IAAS,QAC1D,MAAO,EAGb,ECzBA;AAAA;AAAA;AAAA;AAAA;AAAA,GAOA,IAAIC,GAAoB,CACtB,MAAO,6BACP,MAAO,GACP,OAAQ,GACR,QAAS,YACT,KAAM,OACN,OAAQ,eACR,YAAa,EACb,cAAe,QACf,eAAgB,OAClB,ECjBA;AAAA;AAAA;AAAA;AAAA;AAAA,GAWA,MAAMC,GAAOC,EAAAA,WACX,CAAC,CACC,MAAAC,EAAQ,eACR,KAA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