@harshshahcg/survey-render 1.2.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"surveyRender.umd.cjs","sources":["../node_modules/react/cjs/react-jsx-runtime.production.min.js","../node_modules/react/cjs/react-jsx-runtime.development.js","../node_modules/react/jsx-runtime.js","../src/types/survey.types.ts","../src/utils/conditionalLogic.ts","../src/utils/validation.ts","../src/utils/responseFormatter.ts","../src/helpers/constants.ts","../src/utils/fileUtils.ts","../src/utils/responseHelpers.ts","../src/utils/questionStatus.ts","../src/components/custom/MCQSelect.tsx","../node_modules/clsx/dist/clsx.mjs","../node_modules/tailwind-merge/dist/bundle-mjs.mjs","../src/lib/utils.ts","../src/components/ui/textarea.tsx","../src/components/custom/TextResponse.tsx","../src/components/custom/Dropdown.tsx","../src/components/custom/TabularInput.tsx","../src/components/custom/DatePicker.tsx","../src/components/custom/MediaUpload.tsx","../src/components/ui/ErrorMessage.tsx","../src/components/custom/MediaResponse.tsx","../src/components/QuestionMapper.tsx","../src/components/QuestionRenderer.tsx","../src/utils/themeStatusStyles.ts","../src/components/QuestionListCarousel.tsx","../src/components/QuestionOverviewPanel.tsx","../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","../src/components/ui/button-variants.ts","../src/components/ui/button.tsx","../node_modules/@radix-ui/react-progress/node_modules/@radix-ui/react-context/dist/index.mjs","../node_modules/@radix-ui/react-progress/node_modules/@radix-ui/react-primitive/dist/index.mjs","../node_modules/@radix-ui/react-progress/dist/index.mjs","../src/components/ui/progress.tsx","../src/components/SurveyProgressBar.tsx","../node_modules/@radix-ui/primitive/dist/index.mjs","../node_modules/@radix-ui/react-context/dist/index.mjs","../node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs","../node_modules/@radix-ui/react-id/dist/index.mjs","../node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs","../node_modules/@radix-ui/react-primitive/node_modules/@radix-ui/react-slot/dist/index.mjs","../node_modules/@radix-ui/react-primitive/dist/index.mjs","../node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs","../node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs","../node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs","../node_modules/@radix-ui/react-focus-scope/dist/index.mjs","../node_modules/@radix-ui/react-portal/dist/index.mjs","../node_modules/@radix-ui/react-presence/dist/index.mjs","../node_modules/@radix-ui/react-focus-guards/dist/index.mjs","../node_modules/tslib/tslib.es6.mjs","../node_modules/react-remove-scroll-bar/dist/es2015/constants.js","../node_modules/use-callback-ref/dist/es2015/assignRef.js","../node_modules/use-callback-ref/dist/es2015/useRef.js","../node_modules/use-callback-ref/dist/es2015/useMergeRef.js","../node_modules/use-sidecar/dist/es2015/medium.js","../node_modules/use-sidecar/dist/es2015/exports.js","../node_modules/react-remove-scroll/dist/es2015/medium.js","../node_modules/react-remove-scroll/dist/es2015/UI.js","../node_modules/get-nonce/dist/es2015/index.js","../node_modules/react-style-singleton/dist/es2015/singleton.js","../node_modules/react-style-singleton/dist/es2015/hook.js","../node_modules/react-style-singleton/dist/es2015/component.js","../node_modules/react-remove-scroll-bar/dist/es2015/utils.js","../node_modules/react-remove-scroll-bar/dist/es2015/component.js","../node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js","../node_modules/react-remove-scroll/dist/es2015/handleScroll.js","../node_modules/react-remove-scroll/dist/es2015/SideEffect.js","../node_modules/react-remove-scroll/dist/es2015/sidecar.js","../node_modules/react-remove-scroll/dist/es2015/Combination.js","../node_modules/aria-hidden/dist/es2015/index.js","../node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-slot/dist/index.mjs","../node_modules/@radix-ui/react-dialog/dist/index.mjs","../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/x.js","../src/components/ui/dialog.tsx","../src/components/ValidationDialog.tsx","../src/utils/progressCalculation.ts","../src/components/ExitConfirmationDialog.tsx","../src/components/SubmissionLoadingOverlay.tsx","../src/components/SurveyContainer.tsx","../src/components/SurveyRenderer.tsx"],"sourcesContent":["/**\n * @license React\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var f=require(\"react\"),k=Symbol.for(\"react.element\"),l=Symbol.for(\"react.fragment\"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};\nfunction q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=\"\"+g);void 0!==a.key&&(e=\"\"+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q;\n","/**\n * @license React\n * react-jsx-runtime.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n'use strict';\n\nvar React = require('react');\n\n// ATTENTION\n// When adding new symbols to this file,\n// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'\n// The Symbol used to tag the ReactElement-like types.\nvar REACT_ELEMENT_TYPE = Symbol.for('react.element');\nvar REACT_PORTAL_TYPE = Symbol.for('react.portal');\nvar REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');\nvar REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');\nvar REACT_PROFILER_TYPE = Symbol.for('react.profiler');\nvar REACT_PROVIDER_TYPE = Symbol.for('react.provider');\nvar REACT_CONTEXT_TYPE = Symbol.for('react.context');\nvar REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');\nvar REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');\nvar REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');\nvar REACT_MEMO_TYPE = Symbol.for('react.memo');\nvar REACT_LAZY_TYPE = Symbol.for('react.lazy');\nvar REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');\nvar MAYBE_ITERATOR_SYMBOL = Symbol.iterator;\nvar FAUX_ITERATOR_SYMBOL = '@@iterator';\nfunction getIteratorFn(maybeIterable) {\n if (maybeIterable === null || typeof maybeIterable !== 'object') {\n return null;\n }\n\n var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];\n\n if (typeof maybeIterator === 'function') {\n return maybeIterator;\n }\n\n return null;\n}\n\nvar ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n\nfunction error(format) {\n {\n {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n printWarning('error', format, args);\n }\n }\n}\n\nfunction printWarning(level, format, args) {\n // When changing this logic, you might want to also\n // update consoleWithStackDev.www.js as well.\n {\n var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n var stack = ReactDebugCurrentFrame.getStackAddendum();\n\n if (stack !== '') {\n format += '%s';\n args = args.concat([stack]);\n } // eslint-disable-next-line react-internal/safe-string-coercion\n\n\n var argsWithFormat = args.map(function (item) {\n return String(item);\n }); // Careful: RN currently depends on this prefix\n\n argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it\n // breaks IE9: https://github.com/facebook/react/issues/13610\n // eslint-disable-next-line react-internal/no-production-logging\n\n Function.prototype.apply.call(console[level], console, argsWithFormat);\n }\n}\n\n// -----------------------------------------------------------------------------\n\nvar enableScopeAPI = false; // Experimental Create Event Handle API.\nvar enableCacheElement = false;\nvar enableTransitionTracing = false; // No known bugs, but needs performance testing\n\nvar enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber\n// stuff. Intended to enable React core members to more easily debug scheduling\n// issues in DEV builds.\n\nvar enableDebugTracing = false; // Track which Fiber(s) schedule render work.\n\nvar REACT_MODULE_REFERENCE;\n\n{\n REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');\n}\n\nfunction isValidElementType(type) {\n if (typeof type === 'string' || typeof type === 'function') {\n return true;\n } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).\n\n\n if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {\n return true;\n }\n\n if (typeof type === 'object' && type !== null) {\n if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object\n // types supported by any Flight configuration anywhere since\n // we don't know which Flight build this will end up being used\n // with.\n type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction getWrappedName(outerType, innerType, wrapperName) {\n var displayName = outerType.displayName;\n\n if (displayName) {\n return displayName;\n }\n\n var functionName = innerType.displayName || innerType.name || '';\n return functionName !== '' ? wrapperName + \"(\" + functionName + \")\" : wrapperName;\n} // Keep in sync with react-reconciler/getComponentNameFromFiber\n\n\nfunction getContextName(type) {\n return type.displayName || 'Context';\n} // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.\n\n\nfunction getComponentNameFromType(type) {\n if (type == null) {\n // Host root, text node or just invalid type.\n return null;\n }\n\n {\n if (typeof type.tag === 'number') {\n error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');\n }\n }\n\n if (typeof type === 'function') {\n return type.displayName || type.name || null;\n }\n\n if (typeof type === 'string') {\n return type;\n }\n\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return 'Fragment';\n\n case REACT_PORTAL_TYPE:\n return 'Portal';\n\n case REACT_PROFILER_TYPE:\n return 'Profiler';\n\n case REACT_STRICT_MODE_TYPE:\n return 'StrictMode';\n\n case REACT_SUSPENSE_TYPE:\n return 'Suspense';\n\n case REACT_SUSPENSE_LIST_TYPE:\n return 'SuspenseList';\n\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_CONTEXT_TYPE:\n var context = type;\n return getContextName(context) + '.Consumer';\n\n case REACT_PROVIDER_TYPE:\n var provider = type;\n return getContextName(provider._context) + '.Provider';\n\n case REACT_FORWARD_REF_TYPE:\n return getWrappedName(type, type.render, 'ForwardRef');\n\n case REACT_MEMO_TYPE:\n var outerName = type.displayName || null;\n\n if (outerName !== null) {\n return outerName;\n }\n\n return getComponentNameFromType(type.type) || 'Memo';\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n return getComponentNameFromType(init(payload));\n } catch (x) {\n return null;\n }\n }\n\n // eslint-disable-next-line no-fallthrough\n }\n }\n\n return null;\n}\n\nvar assign = Object.assign;\n\n// Helpers to patch console.logs to avoid logging during side-effect free\n// replaying on render function. This currently only patches the object\n// lazily which won't cover if the log function was extracted eagerly.\n// We could also eagerly patch the method.\nvar disabledDepth = 0;\nvar prevLog;\nvar prevInfo;\nvar prevWarn;\nvar prevError;\nvar prevGroup;\nvar prevGroupCollapsed;\nvar prevGroupEnd;\n\nfunction disabledLog() {}\n\ndisabledLog.__reactDisabledLog = true;\nfunction disableLogs() {\n {\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n prevLog = console.log;\n prevInfo = console.info;\n prevWarn = console.warn;\n prevError = console.error;\n prevGroup = console.group;\n prevGroupCollapsed = console.groupCollapsed;\n prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099\n\n var props = {\n configurable: true,\n enumerable: true,\n value: disabledLog,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n info: props,\n log: props,\n warn: props,\n error: props,\n group: props,\n groupCollapsed: props,\n groupEnd: props\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n disabledDepth++;\n }\n}\nfunction reenableLogs() {\n {\n disabledDepth--;\n\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n var props = {\n configurable: true,\n enumerable: true,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n log: assign({}, props, {\n value: prevLog\n }),\n info: assign({}, props, {\n value: prevInfo\n }),\n warn: assign({}, props, {\n value: prevWarn\n }),\n error: assign({}, props, {\n value: prevError\n }),\n group: assign({}, props, {\n value: prevGroup\n }),\n groupCollapsed: assign({}, props, {\n value: prevGroupCollapsed\n }),\n groupEnd: assign({}, props, {\n value: prevGroupEnd\n })\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n if (disabledDepth < 0) {\n error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');\n }\n }\n}\n\nvar ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;\nvar prefix;\nfunction describeBuiltInComponentFrame(name, source, ownerFn) {\n {\n if (prefix === undefined) {\n // Extract the VM specific prefix used by each line.\n try {\n throw Error();\n } catch (x) {\n var match = x.stack.trim().match(/\\n( *(at )?)/);\n prefix = match && match[1] || '';\n }\n } // We use the prefix to ensure our stacks line up with native stack frames.\n\n\n return '\\n' + prefix + name;\n }\n}\nvar reentry = false;\nvar componentFrameCache;\n\n{\n var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;\n componentFrameCache = new PossiblyWeakMap();\n}\n\nfunction describeNativeComponentFrame(fn, construct) {\n // If something asked for a stack inside a fake render, it should get ignored.\n if ( !fn || reentry) {\n return '';\n }\n\n {\n var frame = componentFrameCache.get(fn);\n\n if (frame !== undefined) {\n return frame;\n }\n }\n\n var control;\n reentry = true;\n var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.\n\n Error.prepareStackTrace = undefined;\n var previousDispatcher;\n\n {\n previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function\n // for warnings.\n\n ReactCurrentDispatcher.current = null;\n disableLogs();\n }\n\n try {\n // This should throw.\n if (construct) {\n // Something should be setting the props in the constructor.\n var Fake = function () {\n throw Error();\n }; // $FlowFixMe\n\n\n Object.defineProperty(Fake.prototype, 'props', {\n set: function () {\n // We use a throwing setter instead of frozen or non-writable props\n // because that won't throw in a non-strict mode function.\n throw Error();\n }\n });\n\n if (typeof Reflect === 'object' && Reflect.construct) {\n // We construct a different control for this case to include any extra\n // frames added by the construct call.\n try {\n Reflect.construct(Fake, []);\n } catch (x) {\n control = x;\n }\n\n Reflect.construct(fn, [], Fake);\n } else {\n try {\n Fake.call();\n } catch (x) {\n control = x;\n }\n\n fn.call(Fake.prototype);\n }\n } else {\n try {\n throw Error();\n } catch (x) {\n control = x;\n }\n\n fn();\n }\n } catch (sample) {\n // This is inlined manually because closure doesn't do it for us.\n if (sample && control && typeof sample.stack === 'string') {\n // This extracts the first frame from the sample that isn't also in the control.\n // Skipping one frame that we assume is the frame that calls the two.\n var sampleLines = sample.stack.split('\\n');\n var controlLines = control.stack.split('\\n');\n var s = sampleLines.length - 1;\n var c = controlLines.length - 1;\n\n while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {\n // We expect at least one stack frame to be shared.\n // Typically this will be the root most one. However, stack frames may be\n // cut off due to maximum stack limits. In this case, one maybe cut off\n // earlier than the other. We assume that the sample is longer or the same\n // and there for cut off earlier. So we should find the root most frame in\n // the sample somewhere in the control.\n c--;\n }\n\n for (; s >= 1 && c >= 0; s--, c--) {\n // Next we find the first one that isn't the same which should be the\n // frame that called our sample function and the control.\n if (sampleLines[s] !== controlLines[c]) {\n // In V8, the first line is describing the message but other VMs don't.\n // If we're about to return the first line, and the control is also on the same\n // line, that's a pretty good indicator that our sample threw at same line as\n // the control. I.e. before we entered the sample frame. So we ignore this result.\n // This can happen if you passed a class to function component, or non-function.\n if (s !== 1 || c !== 1) {\n do {\n s--;\n c--; // We may still have similar intermediate frames from the construct call.\n // The next one that isn't the same should be our match though.\n\n if (c < 0 || sampleLines[s] !== controlLines[c]) {\n // V8 adds a \"new\" prefix for native classes. Let's remove it to make it prettier.\n var _frame = '\\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled \"<anonymous>\"\n // but we have a user-provided \"displayName\"\n // splice it in to make the stack more readable.\n\n\n if (fn.displayName && _frame.includes('<anonymous>')) {\n _frame = _frame.replace('<anonymous>', fn.displayName);\n }\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, _frame);\n }\n } // Return the line we found.\n\n\n return _frame;\n }\n } while (s >= 1 && c >= 0);\n }\n\n break;\n }\n }\n }\n } finally {\n reentry = false;\n\n {\n ReactCurrentDispatcher.current = previousDispatcher;\n reenableLogs();\n }\n\n Error.prepareStackTrace = previousPrepareStackTrace;\n } // Fallback to just using the name if we couldn't make it throw.\n\n\n var name = fn ? fn.displayName || fn.name : '';\n var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, syntheticFrame);\n }\n }\n\n return syntheticFrame;\n}\nfunction describeFunctionComponentFrame(fn, source, ownerFn) {\n {\n return describeNativeComponentFrame(fn, false);\n }\n}\n\nfunction shouldConstruct(Component) {\n var prototype = Component.prototype;\n return !!(prototype && prototype.isReactComponent);\n}\n\nfunction describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {\n\n if (type == null) {\n return '';\n }\n\n if (typeof type === 'function') {\n {\n return describeNativeComponentFrame(type, shouldConstruct(type));\n }\n }\n\n if (typeof type === 'string') {\n return describeBuiltInComponentFrame(type);\n }\n\n switch (type) {\n case REACT_SUSPENSE_TYPE:\n return describeBuiltInComponentFrame('Suspense');\n\n case REACT_SUSPENSE_LIST_TYPE:\n return describeBuiltInComponentFrame('SuspenseList');\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_FORWARD_REF_TYPE:\n return describeFunctionComponentFrame(type.render);\n\n case REACT_MEMO_TYPE:\n // Memo may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n // Lazy may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);\n } catch (x) {}\n }\n }\n }\n\n return '';\n}\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar loggedTypeFailures = {};\nvar ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n ReactDebugCurrentFrame.setExtraStackFrame(stack);\n } else {\n ReactDebugCurrentFrame.setExtraStackFrame(null);\n }\n }\n}\n\nfunction checkPropTypes(typeSpecs, values, location, componentName, element) {\n {\n // $FlowFixMe This is okay but Flow doesn't know it.\n var has = Function.call.bind(hasOwnProperty);\n\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n // eslint-disable-next-line react-internal/prod-error-codes\n var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');\n err.name = 'Invariant Violation';\n throw err;\n }\n\n error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');\n } catch (ex) {\n error$1 = ex;\n }\n\n if (error$1 && !(error$1 instanceof Error)) {\n setCurrentlyValidatingElement(element);\n\n error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);\n\n setCurrentlyValidatingElement(null);\n }\n\n if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error$1.message] = true;\n setCurrentlyValidatingElement(element);\n\n error('Failed %s type: %s', location, error$1.message);\n\n setCurrentlyValidatingElement(null);\n }\n }\n }\n }\n}\n\nvar isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare\n\nfunction isArray(a) {\n return isArrayImpl(a);\n}\n\n/*\n * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol\n * and Temporal.* types. See https://github.com/facebook/react/pull/22064.\n *\n * The functions in this module will throw an easier-to-understand,\n * easier-to-debug exception with a clear errors message message explaining the\n * problem. (Instead of a confusing exception thrown inside the implementation\n * of the `value` object).\n */\n// $FlowFixMe only called in DEV, so void return is not possible.\nfunction typeName(value) {\n {\n // toStringTag is needed for namespaced types like Temporal.Instant\n var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;\n var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';\n return type;\n }\n} // $FlowFixMe only called in DEV, so void return is not possible.\n\n\nfunction willCoercionThrow(value) {\n {\n try {\n testStringCoercion(value);\n return false;\n } catch (e) {\n return true;\n }\n }\n}\n\nfunction testStringCoercion(value) {\n // If you ended up here by following an exception call stack, here's what's\n // happened: you supplied an object or symbol value to React (as a prop, key,\n // DOM attribute, CSS property, string ref, etc.) and when React tried to\n // coerce it to a string using `'' + value`, an exception was thrown.\n //\n // The most common types that will cause this exception are `Symbol` instances\n // and Temporal objects like `Temporal.Instant`. But any object that has a\n // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this\n // exception. (Library authors do this to prevent users from using built-in\n // numeric operators like `+` or comparison operators like `>=` because custom\n // methods are needed to perform accurate arithmetic or comparison.)\n //\n // To fix the problem, coerce this object or symbol value to a string before\n // passing it to React. The most reliable way is usually `String(value)`.\n //\n // To find which value is throwing, check the browser or debugger console.\n // Before this exception was thrown, there should be `console.error` output\n // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the\n // problem and how that type was used: key, atrribute, input value prop, etc.\n // In most cases, this console output also shows the component and its\n // ancestor components where the exception happened.\n //\n // eslint-disable-next-line react-internal/safe-string-coercion\n return '' + value;\n}\nfunction checkKeyStringCoercion(value) {\n {\n if (willCoercionThrow(value)) {\n error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));\n\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n}\n\nvar ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;\nvar RESERVED_PROPS = {\n key: true,\n ref: true,\n __self: true,\n __source: true\n};\nvar specialPropKeyWarningShown;\nvar specialPropRefWarningShown;\nvar didWarnAboutStringRefs;\n\n{\n didWarnAboutStringRefs = {};\n}\n\nfunction hasValidRef(config) {\n {\n if (hasOwnProperty.call(config, 'ref')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.ref !== undefined;\n}\n\nfunction hasValidKey(config) {\n {\n if (hasOwnProperty.call(config, 'key')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'key').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.key !== undefined;\n}\n\nfunction warnIfStringRefCannotBeAutoConverted(config, self) {\n {\n if (typeof config.ref === 'string' && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {\n var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);\n\n if (!didWarnAboutStringRefs[componentName]) {\n error('Component \"%s\" contains the string ref \"%s\". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref);\n\n didWarnAboutStringRefs[componentName] = true;\n }\n }\n }\n}\n\nfunction defineKeyPropWarningGetter(props, displayName) {\n {\n var warnAboutAccessingKey = function () {\n if (!specialPropKeyWarningShown) {\n specialPropKeyWarningShown = true;\n\n error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n }\n };\n\n warnAboutAccessingKey.isReactWarning = true;\n Object.defineProperty(props, 'key', {\n get: warnAboutAccessingKey,\n configurable: true\n });\n }\n}\n\nfunction defineRefPropWarningGetter(props, displayName) {\n {\n var warnAboutAccessingRef = function () {\n if (!specialPropRefWarningShown) {\n specialPropRefWarningShown = true;\n\n error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n }\n };\n\n warnAboutAccessingRef.isReactWarning = true;\n Object.defineProperty(props, 'ref', {\n get: warnAboutAccessingRef,\n configurable: true\n });\n }\n}\n/**\n * Factory method to create a new React element. This no longer adheres to\n * the class pattern, so do not use new to call it. Also, instanceof check\n * will not work. Instead test $$typeof field against Symbol.for('react.element') to check\n * if something is a React Element.\n *\n * @param {*} type\n * @param {*} props\n * @param {*} key\n * @param {string|object} ref\n * @param {*} owner\n * @param {*} self A *temporary* helper to detect places where `this` is\n * different from the `owner` when React.createElement is called, so that we\n * can warn. We want to get rid of owner and replace string `ref`s with arrow\n * functions, and as long as `this` and owner are the same, there will be no\n * change in behavior.\n * @param {*} source An annotation object (added by a transpiler or otherwise)\n * indicating filename, line number, and/or other information.\n * @internal\n */\n\n\nvar ReactElement = function (type, key, ref, self, source, owner, props) {\n var element = {\n // This tag allows us to uniquely identify this as a React Element\n $$typeof: REACT_ELEMENT_TYPE,\n // Built-in properties that belong on the element\n type: type,\n key: key,\n ref: ref,\n props: props,\n // Record the component responsible for creating this element.\n _owner: owner\n };\n\n {\n // The validation flag is currently mutative. We put it on\n // an external backing store so that we can freeze the whole object.\n // This can be replaced with a WeakMap once they are implemented in\n // commonly used development environments.\n element._store = {}; // To make comparing ReactElements easier for testing purposes, we make\n // the validation flag non-enumerable (where possible, which should\n // include every environment we run tests in), so the test framework\n // ignores it.\n\n Object.defineProperty(element._store, 'validated', {\n configurable: false,\n enumerable: false,\n writable: true,\n value: false\n }); // self and source are DEV only properties.\n\n Object.defineProperty(element, '_self', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: self\n }); // Two elements created in two different places should be considered\n // equal for testing purposes and therefore we hide it from enumeration.\n\n Object.defineProperty(element, '_source', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: source\n });\n\n if (Object.freeze) {\n Object.freeze(element.props);\n Object.freeze(element);\n }\n }\n\n return element;\n};\n/**\n * https://github.com/reactjs/rfcs/pull/107\n * @param {*} type\n * @param {object} props\n * @param {string} key\n */\n\nfunction jsxDEV(type, config, maybeKey, source, self) {\n {\n var propName; // Reserved names are extracted\n\n var props = {};\n var key = null;\n var ref = null; // Currently, key can be spread in as a prop. This causes a potential\n // issue if key is also explicitly declared (ie. <div {...props} key=\"Hi\" />\n // or <div key=\"Hi\" {...props} /> ). We want to deprecate key spread,\n // but as an intermediary step, we will use jsxDEV for everything except\n // <div {...props} key=\"Hi\" />, because we aren't currently able to tell if\n // key is explicitly declared to be undefined or not.\n\n if (maybeKey !== undefined) {\n {\n checkKeyStringCoercion(maybeKey);\n }\n\n key = '' + maybeKey;\n }\n\n if (hasValidKey(config)) {\n {\n checkKeyStringCoercion(config.key);\n }\n\n key = '' + config.key;\n }\n\n if (hasValidRef(config)) {\n ref = config.ref;\n warnIfStringRefCannotBeAutoConverted(config, self);\n } // Remaining properties are added to a new props object\n\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n }\n}\n\nvar ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;\nvar ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement$1(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n ReactDebugCurrentFrame$1.setExtraStackFrame(stack);\n } else {\n ReactDebugCurrentFrame$1.setExtraStackFrame(null);\n }\n }\n}\n\nvar propTypesMisspellWarningShown;\n\n{\n propTypesMisspellWarningShown = false;\n}\n/**\n * Verifies the object is a ReactElement.\n * See https://reactjs.org/docs/react-api.html#isvalidelement\n * @param {?object} object\n * @return {boolean} True if `object` is a ReactElement.\n * @final\n */\n\n\nfunction isValidElement(object) {\n {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n }\n}\n\nfunction getDeclarationErrorAddendum() {\n {\n if (ReactCurrentOwner$1.current) {\n var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);\n\n if (name) {\n return '\\n\\nCheck the render method of `' + name + '`.';\n }\n }\n\n return '';\n }\n}\n\nfunction getSourceInfoErrorAddendum(source) {\n {\n if (source !== undefined) {\n var fileName = source.fileName.replace(/^.*[\\\\\\/]/, '');\n var lineNumber = source.lineNumber;\n return '\\n\\nCheck your code at ' + fileName + ':' + lineNumber + '.';\n }\n\n return '';\n }\n}\n/**\n * Warn if there's no key explicitly set on dynamic arrays of children or\n * object keys are not valid. This allows us to keep track of children between\n * updates.\n */\n\n\nvar ownerHasKeyUseWarning = {};\n\nfunction getCurrentComponentErrorInfo(parentType) {\n {\n var info = getDeclarationErrorAddendum();\n\n if (!info) {\n var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;\n\n if (parentName) {\n info = \"\\n\\nCheck the top-level render call using <\" + parentName + \">.\";\n }\n }\n\n return info;\n }\n}\n/**\n * Warn if the element doesn't have an explicit key assigned to it.\n * This element is in an array. The array could grow and shrink or be\n * reordered. All children that haven't already been validated are required to\n * have a \"key\" property assigned to it. Error statuses are cached so a warning\n * will only be shown once.\n *\n * @internal\n * @param {ReactElement} element Element that requires a key.\n * @param {*} parentType element's parent's type.\n */\n\n\nfunction validateExplicitKey(element, parentType) {\n {\n if (!element._store || element._store.validated || element.key != null) {\n return;\n }\n\n element._store.validated = true;\n var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);\n\n if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {\n return;\n }\n\n ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a\n // property, it may be the creator of the child that's responsible for\n // assigning it a key.\n\n var childOwner = '';\n\n if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {\n // Give the component that originally created this child.\n childOwner = \" It was passed a child from \" + getComponentNameFromType(element._owner.type) + \".\";\n }\n\n setCurrentlyValidatingElement$1(element);\n\n error('Each child in a list should have a unique \"key\" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);\n\n setCurrentlyValidatingElement$1(null);\n }\n}\n/**\n * Ensure that every element either is passed in a static location, in an\n * array with an explicit keys property defined, or in an object literal\n * with valid key property.\n *\n * @internal\n * @param {ReactNode} node Statically passed child of any type.\n * @param {*} parentType node's parent's type.\n */\n\n\nfunction validateChildKeys(node, parentType) {\n {\n if (typeof node !== 'object') {\n return;\n }\n\n if (isArray(node)) {\n for (var i = 0; i < node.length; i++) {\n var child = node[i];\n\n if (isValidElement(child)) {\n validateExplicitKey(child, parentType);\n }\n }\n } else if (isValidElement(node)) {\n // This element was passed in a valid location.\n if (node._store) {\n node._store.validated = true;\n }\n } else if (node) {\n var iteratorFn = getIteratorFn(node);\n\n if (typeof iteratorFn === 'function') {\n // Entry iterators used to provide implicit keys,\n // but now we print a separate warning for them later.\n if (iteratorFn !== node.entries) {\n var iterator = iteratorFn.call(node);\n var step;\n\n while (!(step = iterator.next()).done) {\n if (isValidElement(step.value)) {\n validateExplicitKey(step.value, parentType);\n }\n }\n }\n }\n }\n }\n}\n/**\n * Given an element, validate that its props follow the propTypes definition,\n * provided by the type.\n *\n * @param {ReactElement} element\n */\n\n\nfunction validatePropTypes(element) {\n {\n var type = element.type;\n\n if (type === null || type === undefined || typeof type === 'string') {\n return;\n }\n\n var propTypes;\n\n if (typeof type === 'function') {\n propTypes = type.propTypes;\n } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.\n // Inner props are checked in the reconciler.\n type.$$typeof === REACT_MEMO_TYPE)) {\n propTypes = type.propTypes;\n } else {\n return;\n }\n\n if (propTypes) {\n // Intentionally inside to avoid triggering lazy initializers:\n var name = getComponentNameFromType(type);\n checkPropTypes(propTypes, element.props, 'prop', name, element);\n } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {\n propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:\n\n var _name = getComponentNameFromType(type);\n\n error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');\n }\n\n if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {\n error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');\n }\n }\n}\n/**\n * Given a fragment, validate that it can only be provided with fragment props\n * @param {ReactElement} fragment\n */\n\n\nfunction validateFragmentProps(fragment) {\n {\n var keys = Object.keys(fragment.props);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n\n if (key !== 'children' && key !== 'key') {\n setCurrentlyValidatingElement$1(fragment);\n\n error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);\n\n setCurrentlyValidatingElement$1(null);\n break;\n }\n }\n\n if (fragment.ref !== null) {\n setCurrentlyValidatingElement$1(fragment);\n\n error('Invalid attribute `ref` supplied to `React.Fragment`.');\n\n setCurrentlyValidatingElement$1(null);\n }\n }\n}\n\nvar didWarnAboutKeySpread = {};\nfunction jsxWithValidation(type, props, key, isStaticChildren, source, self) {\n {\n var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to\n // succeed and there will likely be errors in render.\n\n if (!validType) {\n var info = '';\n\n if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {\n info += ' You likely forgot to export your component from the file ' + \"it's defined in, or you might have mixed up default and named imports.\";\n }\n\n var sourceInfo = getSourceInfoErrorAddendum(source);\n\n if (sourceInfo) {\n info += sourceInfo;\n } else {\n info += getDeclarationErrorAddendum();\n }\n\n var typeString;\n\n if (type === null) {\n typeString = 'null';\n } else if (isArray(type)) {\n typeString = 'array';\n } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {\n typeString = \"<\" + (getComponentNameFromType(type.type) || 'Unknown') + \" />\";\n info = ' Did you accidentally export a JSX literal instead of a component?';\n } else {\n typeString = typeof type;\n }\n\n error('React.jsx: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);\n }\n\n var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.\n // TODO: Drop this when these are no longer allowed as the type argument.\n\n if (element == null) {\n return element;\n } // Skip key warning if the type isn't valid since our key validation logic\n // doesn't expect a non-string/function type and can throw confusing errors.\n // We don't want exception behavior to differ between dev and prod.\n // (Rendering will throw with a helpful message and as soon as the type is\n // fixed, the key warnings will appear.)\n\n\n if (validType) {\n var children = props.children;\n\n if (children !== undefined) {\n if (isStaticChildren) {\n if (isArray(children)) {\n for (var i = 0; i < children.length; i++) {\n validateChildKeys(children[i], type);\n }\n\n if (Object.freeze) {\n Object.freeze(children);\n }\n } else {\n error('React.jsx: Static children should always be an array. ' + 'You are likely explicitly calling React.jsxs or React.jsxDEV. ' + 'Use the Babel transform instead.');\n }\n } else {\n validateChildKeys(children, type);\n }\n }\n }\n\n {\n if (hasOwnProperty.call(props, 'key')) {\n var componentName = getComponentNameFromType(type);\n var keys = Object.keys(props).filter(function (k) {\n return k !== 'key';\n });\n var beforeExample = keys.length > 0 ? '{key: someKey, ' + keys.join(': ..., ') + ': ...}' : '{key: someKey}';\n\n if (!didWarnAboutKeySpread[componentName + beforeExample]) {\n var afterExample = keys.length > 0 ? '{' + keys.join(': ..., ') + ': ...}' : '{}';\n\n error('A props object containing a \"key\" prop is being spread into JSX:\\n' + ' let props = %s;\\n' + ' <%s {...props} />\\n' + 'React keys must be passed directly to JSX without using spread:\\n' + ' let props = %s;\\n' + ' <%s key={someKey} {...props} />', beforeExample, componentName, afterExample, componentName);\n\n didWarnAboutKeySpread[componentName + beforeExample] = true;\n }\n }\n }\n\n if (type === REACT_FRAGMENT_TYPE) {\n validateFragmentProps(element);\n } else {\n validatePropTypes(element);\n }\n\n return element;\n }\n} // These two functions exist to still get child warnings in dev\n// even with the prod transform. This means that jsxDEV is purely\n// opt-in behavior for better messages but that we won't stop\n// giving you warnings if you use production apis.\n\nfunction jsxWithValidationStatic(type, props, key) {\n {\n return jsxWithValidation(type, props, key, true);\n }\n}\nfunction jsxWithValidationDynamic(type, props, key) {\n {\n return jsxWithValidation(type, props, key, false);\n }\n}\n\nvar jsx = jsxWithValidationDynamic ; // we may want to special case jsxs internally to take advantage of static children.\n// for now we can ship identical prod functions\n\nvar jsxs = jsxWithValidationStatic ;\n\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.jsx = jsx;\nexports.jsxs = jsxs;\n })();\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.min.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","/**\n * Survey Render Library - Type definitions\n * Matches FMB/Offline Mini App question and config structure.\n */\n\nexport type SupportedQuestionType =\n | \"single-select\"\n | \"multi-select\"\n | \"drop-down\"\n | \"dropdown\"\n | \"text-response\"\n | \"calendar\"\n | \"video-response\"\n | \"voice-response\"\n | \"image-response\"\n | \"document-response\"\n | \"pdf-response\"\n | \"tabular-text-input\"\n | \"tabular-drop-down\"\n | \"tabular-check-box\";\n\nexport interface SurveyQuestion {\n surveyId: string;\n questionId: string;\n description: string;\n descriptionEN: string;\n type: SupportedQuestionType;\n isMandatory: boolean;\n options?: string[];\n optionsEN?: string[];\n textInputType?: \"None\" | \"Text\" | \"Numeric\";\n textLimitCharacter?: number | null;\n minValue?: string | number | null;\n maxValue?: string | number | null;\n outcomeDescription: string;\n questionDescriptionOptional: string;\n sourceQuestion: string;\n childrenQuestions?: Record<string, string[]>;\n tableHeaderValue?: string[];\n tableQuestionValue?: Array<{\n rowId: string;\n rowQuestion: string;\n }>;\n isDynamic?: boolean;\n /** Prefilled answer from saved/draft data; used to initialize response state */\n userAnswer?: SurveyResponseItem[\"userAnswer\"];\n}\n\n/** Per-question-type media config from data.config (supportedSize in MB). */\nexport interface SurveyMediaConfigItem {\n supportedType?: string[];\n suppotedType?: string[]; /* legacy typo in API */\n supportedSize?: number; /* max size in MB */\n}\n\nexport interface SurveyConfig {\n surveyId: string;\n surveyCode?: string;\n surveyName?: string;\n type?: string;\n medium: string;\n questionList: SurveyQuestion[];\n /** Optional media validation config per type (e.g. image-response, video-response, voice-response/audio-response). Size in MB. */\n config?: Record<string, SurveyMediaConfigItem>;\n}\n\n/** Row answer for tabular question types */\nexport interface RowAnswer {\n rowAnswer: string | boolean;\n rowId: string;\n rowQuestion: string;\n}\n\n/** File object returned for image/video/voice response types */\nexport interface FileObject {\n fileName: string;\n fileType: string;\n binary: string;\n}\n\n/** Single response item in the required output format */\nexport interface SurveyResponseItem {\n questionId: string;\n userAnswer:\n | string\n | number\n | boolean\n | string[]\n | RowAnswer[]\n | FileObject;\n}\n\n/** Required response format: array of { questionId, userAnswer } */\nexport type SurveyResponseArray = SurveyResponseItem[];\n\n/** Payload passed to onSubmit: survey-level fields + responses array */\nexport interface SurveySubmitPayload {\n surveyId: string;\n surveyCode?: string;\n surveyName?: string;\n type?: string;\n responses: SurveyResponseArray;\n}\n\nexport const SUPPORTED_QUESTION_TYPES: SupportedQuestionType[] = [\n \"single-select\",\n \"multi-select\",\n \"drop-down\",\n \"dropdown\",\n \"text-response\",\n \"calendar\",\n \"video-response\",\n \"voice-response\",\n \"image-response\",\n \"document-response\",\n \"pdf-response\",\n \"tabular-text-input\",\n \"tabular-drop-down\",\n \"tabular-check-box\",\n];\n\nexport function isSupportedQuestionType(type: string): type is SupportedQuestionType {\n return (SUPPORTED_QUESTION_TYPES as string[]).includes(type);\n}\n\n/** Default value per question type for initial state */\nexport function getDefaultValue(\n question: SurveyQuestion,\n): string | string[] | Record<string, string | boolean> | Date | null | FileObject {\n switch (question.type) {\n case \"single-select\":\n case \"drop-down\":\n case \"dropdown\":\n case \"text-response\":\n return \"\";\n case \"multi-select\":\n return [];\n case \"calendar\":\n case \"image-response\":\n case \"video-response\":\n case \"voice-response\":\n case \"document-response\":\n case \"pdf-response\":\n return null;\n case \"tabular-text-input\":\n case \"tabular-drop-down\":\n return {};\n case \"tabular-check-box\": {\n const out: Record<string, boolean> = {};\n question.tableQuestionValue?.forEach((r) => {\n out[r.rowId] = false;\n });\n return out;\n }\n default:\n return null;\n }\n}\n\n/** Initial value for a question: prefilled from userAnswer when present, otherwise default */\nexport function getInitialValue(\n question: SurveyQuestion,\n): string | string[] | Record<string, string | boolean> | Date | null | FileObject {\n const ua = question.userAnswer;\n if (ua === undefined || ua === null) {\n return getDefaultValue(question);\n }\n\n switch (question.type) {\n case \"single-select\":\n case \"drop-down\":\n case \"dropdown\":\n case \"text-response\":\n return typeof ua === \"string\" ? ua : String(ua);\n case \"multi-select\":\n return Array.isArray(ua) ? ua.map(String) : [];\n case \"calendar\": {\n if (typeof ua === \"string\") {\n const d = new Date(ua);\n return isNaN(d.getTime()) ? null : d;\n }\n if (ua instanceof Date) return ua;\n return null;\n }\n case \"tabular-text-input\":\n case \"tabular-drop-down\":\n case \"tabular-check-box\": {\n if (!Array.isArray(ua)) return getDefaultValue(question);\n const rows = ua as RowAnswer[];\n const record: Record<string, string | boolean> = {};\n rows.forEach((row) => {\n record[row.rowId] = row.rowAnswer;\n });\n return record;\n }\n case \"image-response\":\n case \"video-response\":\n case \"voice-response\":\n case \"document-response\":\n case \"pdf-response\":\n return ua && typeof ua === \"object\" && \"fileName\" in ua && \"binary\" in ua\n ? (ua as FileObject)\n : null;\n default:\n return getDefaultValue(question);\n }\n}\n","/**\n * Conditional logic: show child questions when parent answer matches.\n * sourceQuestion + childrenQuestions e.g. { \"Other\": [\"Q5.1\"] }\n */\n\nimport type { SurveyQuestion } from \"../types/survey.types\";\n\nexport interface VisibilityResult {\n visibleQuestions: string[];\n hiddenQuestions: string[];\n newlyVisible: string[];\n newlyHidden: string[];\n}\n\ntype ResponsesMap = Record<string, { value: unknown }>;\n\nfunction getQuestionId(q: SurveyQuestion): string {\n return q.questionId;\n}\n\nfunction evaluateCondition(\n responseValue: unknown,\n conditionValue: string,\n): boolean {\n if (Array.isArray(responseValue)) {\n return responseValue.includes(conditionValue);\n }\n return responseValue === conditionValue;\n}\n\n/**\n * Build visibility from questions and current responses.\n * Root questions (no sourceQuestion or not in any childrenQuestions) are always visible.\n * Child questions are visible when parent answer matches the key in childrenQuestions.\n */\nexport function calculateVisibility(\n questions: SurveyQuestion[],\n responses: ResponsesMap,\n previouslyVisible: string[] = [],\n): VisibilityResult {\n const allIds = questions.map(getQuestionId);\n const visibleSet = new Set<string>();\n\n const childIds = new Set<string>();\n questions.forEach((q) => {\n Object.values(q.childrenQuestions ?? {}).forEach((ids) => {\n ids.forEach((id) => childIds.add(id));\n });\n });\n\n const rootQuestions = questions.filter((q) => !childIds.has(q.questionId));\n rootQuestions.forEach((q) => visibleSet.add(q.questionId));\n\n questions.forEach((q) => {\n const children = q.childrenQuestions;\n if (!children || typeof children !== \"object\") return;\n\n const parentResponse = responses[q.questionId]?.value;\n\n Object.entries(children).forEach(([conditionValue, childQuestionIds]) => {\n if (!Array.isArray(childQuestionIds)) return;\n if (!evaluateCondition(parentResponse, conditionValue)) return;\n\n childQuestionIds.forEach((childId) => {\n visibleSet.add(childId);\n addDescendantsRecursive(questions, responses, childId, visibleSet);\n });\n });\n });\n\n const visibleArray = allIds.filter((id) => visibleSet.has(id));\n const hiddenArray = allIds.filter((id) => !visibleSet.has(id));\n const prevSet = new Set(previouslyVisible);\n const newlyVisible = visibleArray.filter((id) => !prevSet.has(id));\n const newlyHidden = previouslyVisible.filter((id) => !visibleSet.has(id));\n\n return {\n visibleQuestions: visibleArray,\n hiddenQuestions: hiddenArray,\n newlyVisible,\n newlyHidden,\n };\n}\n\nfunction addDescendantsRecursive(\n questions: SurveyQuestion[],\n responses: ResponsesMap,\n parentId: string,\n visibleSet: Set<string>,\n): void {\n const parent = questions.find((q) => q.questionId === parentId);\n if (!parent?.childrenQuestions) return;\n\n const parentResponse = responses[parentId]?.value;\n\n Object.entries(parent.childrenQuestions).forEach(([conditionValue, childIds]) => {\n if (!Array.isArray(childIds)) return;\n if (!evaluateCondition(parentResponse, conditionValue)) return;\n\n childIds.forEach((childId) => {\n visibleSet.add(childId);\n addDescendantsRecursive(questions, responses, childId, visibleSet);\n });\n });\n}\n\n/**\n * Remove responses for questions that are now hidden.\n */\nexport function clearHiddenResponses(\n responses: ResponsesMap,\n hiddenQuestionIds: string[],\n): ResponsesMap {\n const hidden = new Set(hiddenQuestionIds);\n const out: ResponsesMap = {};\n Object.entries(responses).forEach(([id, r]) => {\n if (!hidden.has(id)) out[id] = r;\n });\n return out;\n}\n","/**\n * Validation for survey responses before submit.\n * Checks: mandatory fields, text limits, numeric-only input, file presence, tabular completeness.\n * Returns list of { questionId, message } for ValidationDialog display.\n */\n\nimport type { SurveyQuestion } from \"../types/survey.types\";\n\nexport type ValidationErrorItem = { questionId: string; message: string };\n\ntype ResponsesMap = Record<string, unknown>;\n\nfunction isEmpty(value: unknown, type: SurveyQuestion[\"type\"]): boolean {\n if (value === null || value === undefined) return true;\n\n switch (type) {\n case \"single-select\":\n case \"drop-down\":\n case \"text-response\":\n case \"calendar\":\n return value === \"\";\n\n case \"multi-select\":\n return !Array.isArray(value) || value.length === 0;\n\n case \"image-response\":\n case \"video-response\":\n case \"voice-response\":\n case \"document-response\":\n case \"pdf-response\":\n if (value && typeof value === \"object\" && \"binary\" in value) return false;\n return true;\n\n case \"tabular-text-input\":\n case \"tabular-drop-down\":\n case \"tabular-check-box\": {\n if (typeof value !== \"object\" || value === null) return true;\n const obj = value as Record<string, unknown>;\n const keys = Object.keys(obj);\n if (keys.length === 0) return true;\n if (type === \"tabular-check-box\") {\n return !Object.values(obj).some((v) => v === true);\n }\n return Object.values(obj).every(\n (v) => v === \"\" || v === null || v === undefined\n );\n }\n\n default:\n return value === \"\" || value === null || value === undefined;\n }\n}\n\nfunction validateTextLimit(\n question: SurveyQuestion,\n value: unknown,\n): string | null {\n const limit = question.textLimitCharacter;\n if (limit == null || limit <= 0) return null;\n\n if (question.type === \"text-response\" && typeof value === \"string\") {\n if (value.length > limit) {\n return `Maximum ${limit} characters allowed`;\n }\n return null;\n }\n\n if (\n question.type === \"tabular-text-input\" &&\n typeof value === \"object\" &&\n value !== null\n ) {\n const obj = value as Record<string, unknown>;\n for (const [k, v] of Object.entries(obj)) {\n if (v != null && String(v).length > limit) {\n return `Field \"${k}\" exceeds ${limit} characters`;\n }\n }\n }\n return null;\n}\n\nfunction validateNumericInput(\n question: SurveyQuestion,\n value: unknown,\n): string | null {\n if (question.textInputType !== \"Numeric\") return null;\n\n if (question.type === \"text-response\") {\n if (value === \"\" || value == null) return null;\n const s = String(value).trim();\n if (!/^\\d+$/.test(s)) return \"Please enter numbers only\";\n return null;\n }\n\n if (\n question.type === \"tabular-text-input\" &&\n typeof value === \"object\" &&\n value !== null\n ) {\n const obj = value as Record<string, unknown>;\n for (const [k, v] of Object.entries(obj)) {\n if (v != null && v !== \"\") {\n const s = String(v).trim();\n if (!/^\\d+$/.test(s)) {\n return `Field \"${k}\" must contain numbers only`;\n }\n }\n }\n }\n return null;\n}\n\nfunction validateMinMax(\n question: SurveyQuestion,\n value: unknown,\n): string | null {\n const min = question.minValue != null ? Number(question.minValue) : NaN;\n const max = question.maxValue != null ? Number(question.maxValue) : NaN;\n if (isNaN(min) && isNaN(max)) return null;\n\n if (question.type === \"text-response\" && typeof value === \"string\") {\n if (value.trim() === \"\") return null;\n const n = Number(value);\n if (isNaN(n)) return null;\n if (!isNaN(min) && !isNaN(max) && (n < min || n > max)) {\n return `Value must be between ${min} and ${max}`;\n }\n if (!isNaN(min) && n < min) return `Value must be at least ${min}`;\n if (!isNaN(max) && n > max) return `Value must be at most ${max}`;\n return null;\n }\n\n if (\n question.type === \"tabular-text-input\" &&\n typeof value === \"object\" &&\n value !== null\n ) {\n const obj = value as Record<string, unknown>;\n for (const [k, v] of Object.entries(obj)) {\n if (v != null && String(v).trim() !== \"\") {\n const n = Number(v);\n if (!isNaN(n)) {\n if (!isNaN(min) && !isNaN(max) && (n < min || n > max)) {\n return `Field \"${k}\" must be between ${min} and ${max}`;\n }\n if (!isNaN(min) && n < min) return `Field \"${k}\" must be at least ${min}`;\n if (!isNaN(max) && n > max) return `Field \"${k}\" must be at most ${max}`;\n }\n }\n }\n }\n return null;\n}\n\n/**\n * Validate visible questions. Returns errors (questionId + message).\n * Used for submit guard and ValidationDialog (list missing questionIds).\n */\nexport function validateResponses(\n questions: SurveyQuestion[],\n responses: ResponsesMap,\n visibleQuestionIds: string[],\n): ValidationErrorItem[] {\n const questionMap = new Map(questions.map((q) => [q.questionId, q]));\n const errors: ValidationErrorItem[] = [];\n\n visibleQuestionIds.forEach((questionId) => {\n const question = questionMap.get(questionId);\n if (!question) return;\n\n const value = responses[questionId];\n\n if (question.isMandatory && isEmpty(value, question.type)) {\n errors.push({ questionId, message: \"This question is required\" });\n return;\n }\n\n if (isEmpty(value, question.type)) return;\n\n const limitErr = validateTextLimit(question, value);\n if (limitErr) {\n errors.push({ questionId, message: limitErr });\n return;\n }\n\n const numErr = validateNumericInput(question, value);\n if (numErr) {\n errors.push({ questionId, message: numErr });\n return;\n }\n\n const rangeErr = validateMinMax(question, value);\n if (rangeErr) {\n errors.push({ questionId, message: rangeErr });\n }\n });\n\n return errors;\n}\n\n/**\n * Check if all visible mandatory questions are filled and valid.\n */\nexport function canSubmit(\n questions: SurveyQuestion[],\n responses: ResponsesMap,\n visibleQuestionIds: string[],\n): boolean {\n return (\n validateResponses(questions, responses, visibleQuestionIds).length === 0\n );\n}\n","/**\n * Format internal responses (Record<questionId, value>) to required SurveyResponseArray.\n * Handles: scalar, multi-select, tabular (RowAnswer[]), file (FileObject).\n */\n\nimport type {\n SurveyConfig,\n SurveyQuestion,\n SurveyResponseArray,\n SurveyResponseItem,\n SurveySubmitPayload,\n RowAnswer,\n FileObject,\n} from \"../types/survey.types\";\n\nexport type InternalResponses = Record<string, unknown>;\n\nfunction formatDateToYYYYMMDD(value: unknown): string | unknown {\n if (value && typeof value === \"object\" && (value as Date).constructor?.name === \"Date\") {\n const d = value as Date;\n const y = d.getFullYear();\n const m = String(d.getMonth() + 1).padStart(2, \"0\");\n const day = String(d.getDate()).padStart(2, \"0\");\n return `${y}-${m}-${day}`;\n }\n if (typeof value === \"string\" && value.includes(\"T\")) {\n try {\n const d = new Date(value);\n if (!isNaN(d.getTime())) {\n const y = d.getFullYear();\n const m = String(d.getMonth() + 1).padStart(2, \"0\");\n const day = String(d.getDate()).padStart(2, \"0\");\n return `${y}-${m}-${day}`;\n }\n } catch {\n // ignore\n }\n }\n return value;\n}\n\n/**\n * Convert one question's value to userAnswer format.\n */\nfunction formatQuestionAnswer(\n question: SurveyQuestion,\n value: unknown,\n): SurveyResponseItem[\"userAnswer\"] {\n if (value === undefined || value === null) {\n return question.type === \"multi-select\" ? [] : \"\";\n }\n\n switch (question.type) {\n case \"single-select\":\n case \"drop-down\":\n case \"text-response\":\n return typeof value === \"string\" ? value : String(value);\n\n case \"multi-select\":\n return Array.isArray(value) ? value.map(String) : [];\n\n case \"calendar\":\n return formatDateToYYYYMMDD(value) as string;\n\n case \"image-response\":\n case \"video-response\":\n case \"voice-response\":\n case \"document-response\":\n case \"pdf-response\": {\n if (value && typeof value === \"object\" && \"fileName\" in value && \"binary\" in value) {\n return value as FileObject;\n }\n return value as FileObject;\n }\n\n case \"tabular-text-input\":\n case \"tabular-drop-down\":\n case \"tabular-check-box\": {\n const rows = question.tableQuestionValue ?? [];\n if (typeof value !== \"object\" || value === null) {\n return rows.map((r) => ({\n rowId: r.rowId,\n rowQuestion: r.rowQuestion,\n rowAnswer: \"\" as string | boolean,\n }));\n }\n const record = value as Record<string, unknown>;\n return rows.map((r) => ({\n rowId: r.rowId,\n rowQuestion: r.rowQuestion,\n rowAnswer: (record[r.rowId] as string | boolean) ?? (question.type === \"tabular-check-box\" ? false : \"\"),\n })) as RowAnswer[];\n }\n\n default:\n return value as string | number | boolean | string[] | RowAnswer[] | FileObject;\n }\n}\n\n/**\n * Build SurveySubmitPayload from config and internal responses.\n * Includes survey-level fields (surveyId, surveyCode, surveyName, type) and responses array.\n * Only includes visible question IDs (and their answers) in responses.\n */\nexport function formatResponses(\n config: SurveyConfig,\n responses: InternalResponses,\n visibleQuestionIds: string[],\n): SurveySubmitPayload {\n const questionMap = new Map(config.questionList.map((q: SurveyQuestion) => [q.questionId, q]));\n const responsesArray: SurveyResponseArray = [];\n\n visibleQuestionIds.forEach((questionId) => {\n const value = responses[questionId];\n const question = questionMap.get(questionId);\n if (!question) return;\n\n const userAnswer = formatQuestionAnswer(question, value);\n responsesArray.push({ questionId, userAnswer });\n });\n\n return {\n surveyId: config.surveyId,\n ...(config.surveyCode != null && { surveyCode: config.surveyCode }),\n ...(config.surveyName != null && { surveyName: config.surveyName }),\n ...(config.type != null && { type: config.type }),\n responses: responsesArray,\n };\n}\n","/**\n * Default media validation constants.\n * Used when survey data.config does not provide per-type settings.\n * Size in MB for readability; fileUtils converts to bytes.\n */\n\nexport const DEFAULT_MEDIA_ALLOWED_TYPES: Record<string, string[]> = {\n \"image-response\": [\"image/jpeg\", \"image/png\"],\n \"video-response\": [\"video/mp4\"],\n \"voice-response\": [\"audio/mpeg\"],\n \"document-response\": [\n \"application/msword\",\n \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\",\n \"application/vnd.ms-powerpoint\",\n \"application/vnd.openxmlformats-officedocument.presentationml.presentation\",\n \"application/vnd.ms-excel\",\n \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\",\n \"text/plain\",\n \"application/json\",\n ],\n \"pdf-response\": [\"application/pdf\"],\n};\n\nexport const DEFAULT_MEDIA_MAX_SIZE_MB: Record<string, number> = {\n \"image-response\": 20,\n \"video-response\": 60,\n \"voice-response\": 20,\n \"document-response\": 25,\n \"pdf-response\": 25,\n};\n","/**\n * File utilities: base64 conversion, type/size validation.\n * No paths or URLs in output - only { fileName, fileType, binary }.\n * Uses data.config when provided (supportedSize in MB), else static defaults from helpers/constants.\n */\n\nimport type { FileObject } from \"../types/survey.types\";\n\n/**\n * Type guard: checks if value is a FileObject (fileName + binary).\n * Use when normalizing raw values from response state.\n */\nexport function isValueFileObject(value: unknown): value is FileObject {\n return (\n value != null &&\n typeof value === \"object\" &&\n \"fileName\" in (value as object) &&\n \"binary\" in (value as object)\n );\n}\n\nimport {\n DEFAULT_MEDIA_ALLOWED_TYPES,\n DEFAULT_MEDIA_MAX_SIZE_MB,\n} from \"../helpers/constants\";\nimport type { SurveyConfig } from \"../types/survey.types\";\n\n/** Re-export for backward compatibility */\nexport const MEDIA_ALLOWED_TYPES = DEFAULT_MEDIA_ALLOWED_TYPES;\nexport const MEDIA_MAX_SIZE_MB = DEFAULT_MEDIA_MAX_SIZE_MB;\n\nexport interface EffectiveMediaConfig {\n allowedTypes: Record<string, string[]>;\n maxSizeBytes: Record<string, number>;\n}\n\nconst MEDIA_QUESTION_TYPES = [\n \"image-response\",\n \"video-response\",\n \"voice-response\",\n \"document-response\",\n \"pdf-response\",\n] as const;\n\nexport type MediaQuestionType = (typeof MEDIA_QUESTION_TYPES)[number];\n\n/**\n * Build effective media config from survey data.config (supportedSize in MB).\n * Falls back to static defaults when config or per-type settings are missing.\n * Data may use \"audio-response\"; we map it to \"voice-response\".\n */\nexport function getEffectiveMediaConfig(dataConfig?: SurveyConfig[\"config\"]): EffectiveMediaConfig {\n const allowedTypes: Record<string, string[]> = { ...DEFAULT_MEDIA_ALLOWED_TYPES };\n const maxSizeBytes: Record<string, number> = {};\n\n for (const key of MEDIA_QUESTION_TYPES) {\n const entry =\n dataConfig?.[key] ??\n (key === \"voice-response\" ? dataConfig?.[\"audio-response\"] : undefined);\n const types = entry?.supportedType ?? entry?.suppotedType;\n if (types?.length) allowedTypes[key] = types;\n const sizeMB = entry?.supportedSize;\n if (sizeMB != null && sizeMB > 0) {\n maxSizeBytes[key] = sizeMB * 1024 * 1024;\n } else {\n const maxMB = DEFAULT_MEDIA_MAX_SIZE_MB[key] ?? 10;\n maxSizeBytes[key] = maxMB * 1024 * 1024;\n }\n }\n\n return { allowedTypes, maxSizeBytes };\n}\n\nexport interface FileValidationResult {\n valid: boolean;\n error?: string;\n}\n\nexport function validateFileType(\n file: File,\n questionType: MediaQuestionType,\n mediaConfig?: EffectiveMediaConfig | null,\n): FileValidationResult {\n const allowed = mediaConfig?.allowedTypes[questionType] ?? MEDIA_ALLOWED_TYPES[questionType];\n if (!allowed?.length) return { valid: true };\n const ok = allowed.some((t) => file.type === t || file.type.startsWith(t.split(\"/\")[0] + \"/\"));\n if (!ok) {\n return {\n valid: false,\n error: `File type ${file.type} is not allowed. Allowed: ${allowed.join(\", \")}`,\n };\n }\n return { valid: true };\n}\n\nexport function validateFileSize(\n file: File,\n questionType: MediaQuestionType,\n mediaConfig?: EffectiveMediaConfig | null,\n): FileValidationResult {\n const maxBytes =\n mediaConfig?.maxSizeBytes[questionType] ??\n (MEDIA_MAX_SIZE_MB[questionType] ?? 10) * 1024 * 1024;\n if (file.size > maxBytes) {\n const maxMB = Math.round(maxBytes / (1024 * 1024));\n return {\n valid: false,\n error: `File size must be less than ${maxMB}MB`,\n };\n }\n return { valid: true };\n}\n\nexport function validateFile(\n file: File,\n questionType: MediaQuestionType,\n mediaConfig?: EffectiveMediaConfig | null,\n): FileValidationResult {\n const typeResult = validateFileType(file, questionType, mediaConfig);\n if (!typeResult.valid) return typeResult;\n return validateFileSize(file, questionType, mediaConfig);\n}\n\n/**\n * Convert File to base64 and return { fileName, fileType, binary }.\n */\nexport function fileToFileObject(file: File): Promise<{\n fileName: string;\n fileType: string;\n binary: string;\n}> {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.onload = () => {\n const result = reader.result;\n if (typeof result !== \"string\") {\n reject(new Error(\"Failed to read file as base64\"));\n return;\n }\n const base64 = result.includes(\",\") ? result.split(\",\")[1] : result;\n resolve({\n fileName: file.name,\n fileType: file.type,\n binary: base64,\n });\n };\n reader.onerror = () => reject(reader.error);\n reader.readAsDataURL(file);\n });\n}\n","/**\n * Shared helpers for validating survey responses.\n * Used by questionStatus, progressCalculation, QuestionOverviewPanel, TabularInput.\n */\n\nimport type { SurveyQuestion } from \"../types/survey.types\";\nimport { isValueFileObject } from \"./fileUtils\";\n\n/**\n * Validates text value against input type (Numeric, Alphabet, AlphaNumeric).\n * Returns true for None/Text or empty after trim.\n */\nexport function validateInputType(value: string, inputType?: string): boolean {\n if (!inputType || inputType === \"None\" || inputType === \"Text\") return true;\n const t = value.trim();\n switch (inputType) {\n case \"Numeric\":\n return /^\\d+$/.test(t);\n case \"Alphabet\":\n case \"AlphaNumeric\":\n return /^[A-Za-z0-9]+$/.test(t);\n default:\n return true;\n }\n}\n\n/**\n * Checks if a question has a non-empty answer based on its type.\n */\nexport function isQuestionAnswered(question: SurveyQuestion, value: unknown): boolean {\n if (value === undefined || value === null) return false;\n\n switch (question.type) {\n case \"single-select\":\n case \"dropdown\":\n case \"drop-down\":\n case \"text-response\":\n return value !== \"\" && value !== null && value !== undefined;\n\n case \"multi-select\":\n return Array.isArray(value) && value.length > 0;\n\n case \"calendar\":\n return (\n value != null &&\n typeof value === \"object\" &&\n (value as Date).constructor?.name === \"Date\"\n );\n\n case \"video-response\":\n case \"voice-response\":\n case \"image-response\":\n case \"document-response\":\n case \"pdf-response\":\n return (\n isValueFileObject(value) ||\n (typeof value === \"string\" && value !== \"\") ||\n (value != null &&\n typeof value === \"object\" &&\n \"devicePath\" in (value as object))\n );\n\n case \"tabular-text-input\":\n case \"tabular-drop-down\": {\n if (typeof value !== \"object\") return false;\n const tableValue = value as Record<string, unknown>;\n const expectedRows = question.tableQuestionValue || [];\n if (expectedRows.length === 0) {\n return (\n Object.keys(tableValue).length > 0 &&\n Object.values(tableValue).some(\n (v) => v !== \"\" && v !== null && v !== undefined\n )\n );\n }\n if (question.isMandatory) {\n return expectedRows.every((row) => {\n const v = tableValue[row.rowId];\n return v !== \"\" && v !== null && v !== undefined;\n });\n }\n return expectedRows.some((row) => {\n const v = tableValue[row.rowId];\n return v !== \"\" && v !== null && v !== undefined;\n });\n }\n\n case \"tabular-check-box\": {\n if (typeof value !== \"object\") return false;\n const tableValue = value as Record<string, unknown>;\n const expectedRows = question.tableQuestionValue || [];\n if (expectedRows.length === 0)\n return Object.values(tableValue).some((v) => v === true);\n if (question.isMandatory) {\n return expectedRows.some((row) => tableValue[row.rowId] === true);\n }\n return expectedRows.length > 0 && Object.keys(tableValue).length > 0;\n }\n\n default:\n return false;\n }\n}\n\n/**\n * Checks if a question's answer is valid (character limits, input type, etc.).\n */\nexport function isQuestionValid(question: SurveyQuestion, value: unknown): boolean {\n if (!isQuestionAnswered(question, value)) return !question.isMandatory;\n\n if (\n question.type === \"tabular-text-input\" ||\n question.type === \"tabular-drop-down\" ||\n question.type === \"tabular-check-box\"\n ) {\n if (typeof value === \"object\" && value !== null) {\n const tableValue = value as Record<string, unknown>;\n if (question.textLimitCharacter) {\n const limit = parseInt(question.textLimitCharacter.toString(), 10);\n for (const fieldValue of Object.values(tableValue)) {\n if (\n fieldValue != null &&\n String(fieldValue).length > limit\n )\n return false;\n }\n }\n if (question.textInputType) {\n for (const fieldValue of Object.values(tableValue)) {\n if (\n fieldValue != null &&\n !validateInputType(String(fieldValue), question.textInputType)\n )\n return false;\n }\n }\n }\n } else {\n if (question.textLimitCharacter && value != null) {\n if (\n String(value).length >\n parseInt(question.textLimitCharacter.toString(), 10)\n )\n return false;\n }\n if (\n question.textInputType &&\n value != null &&\n !validateInputType(String(value), question.textInputType)\n )\n return false;\n }\n return true;\n}\n","/**\n * Question status for overview/carousel: completed | error | required | unanswered.\n * Uses shared response helpers from responseHelpers.ts.\n */\n\nimport type { SurveyQuestion } from \"../types/survey.types\";\nimport { isQuestionAnswered, isQuestionValid } from \"./responseHelpers\";\n\nexport type QuestionStatus = \"completed\" | \"unanswered\" | \"required\" | \"error\";\n\n/**\n * Returns a map of questionId -> status for visible questions.\n * Used by QuestionListCarousel and QuestionOverviewPanel.\n */\nexport function getQuestionStatusMap(\n questions: SurveyQuestion[],\n responses: Record<string, unknown>,\n visibleQuestionIds: string[],\n readOnly = false,\n): Record<string, QuestionStatus> {\n const map: Record<string, QuestionStatus> = {};\n const questionById = new Map(questions.map((q) => [q.questionId, q]));\n\n for (const questionId of visibleQuestionIds) {\n if (readOnly) {\n map[questionId] = \"completed\";\n continue;\n }\n const question = questionById.get(questionId);\n if (!question) {\n map[questionId] = \"unanswered\";\n continue;\n }\n const value = responses[questionId];\n const answered = isQuestionAnswered(question, value);\n const valid = isQuestionValid(question, value);\n if (answered && valid) map[questionId] = \"completed\";\n else if (answered && !valid) map[questionId] = \"error\";\n else if (!answered && question.isMandatory) map[questionId] = \"required\";\n else map[questionId] = \"unanswered\";\n }\n return map;\n}\n","export interface MCQOption {\n id: string;\n text: string;\n}\n\nexport interface MCQSelectProps {\n options: MCQOption[];\n selectionMode: \"single\" | \"multiple\";\n selectedOptions?: string | string[];\n onOptionSelect: (optionId: string | string[]) => void;\n className?: string;\n disabled?: boolean;\n}\n\nexport default function MCQSelect({\n options,\n selectionMode,\n selectedOptions,\n onOptionSelect,\n className = \"\",\n disabled = false,\n}: MCQSelectProps) {\n const handleOptionClick = (optionId: string) => {\n if (selectionMode === \"single\") {\n onOptionSelect(optionId);\n } else {\n const currentSelections = Array.isArray(selectedOptions)\n ? selectedOptions\n : [];\n if (currentSelections.includes(optionId)) {\n onOptionSelect(currentSelections.filter((id) => id !== optionId));\n } else {\n onOptionSelect([...currentSelections, optionId]);\n }\n }\n };\n\n const isOptionSelected = (optionId: string): boolean => {\n if (selectionMode === \"single\") return selectedOptions === optionId;\n return Array.isArray(selectedOptions) && selectedOptions.includes(optionId);\n };\n\n return (\n <div className={`space-y-3 ${className}`}>\n {options.map((option) => {\n const isSelected = isOptionSelected(option.id);\n return (\n <button\n key={option.id}\n type=\"button\"\n onClick={() => handleOptionClick(option.id)}\n className={`w-full border px-4 py-3 text-left text-sm leading-5 font-normal transition-all border-rounded rounded-xl ${\n disabled ? \"cursor-not-allowed opacity-50\" : \"cursor-pointer\"\n } ${\n isSelected\n ? \"border-[var(--primary-600)] bg-[var(--primary-600)] text-[var(--primary-foreground)]\"\n : \"border-[var(--primary-600)] bg-[var(--neutral-50)] text-[var(--primary-600)] hover:bg-[var(--primary-50)]\"\n }`}\n >\n <div className=\"flex items-center gap-3\">\n <div className=\"flex-shrink-0\">\n {selectionMode === \"single\" ? (\n <div\n className={`h-4 w-4 rounded-full border-2 transition-all ${\n isSelected ? \"border-[var(--neutral-50)] bg-[var(--neutral-50)]\" : \"border-[var(--primary-600)] bg-transparent\"\n }`}\n >\n {isSelected && (\n <div className=\"h-full w-full scale-50 rounded-full bg-[var(--primary-600)]\" />\n )}\n </div>\n ) : (\n <div\n className={`h-4 w-4 rounded border-2 transition-all ${\n isSelected ? \"border-[var(--neutral-50)] bg-[var(--neutral-50)]\" : \"border-[var(--primary-600)] bg-transparent\"\n }`}\n >\n {isSelected && (\n <svg\n className=\"h-full w-full text-[var(--primary-600)]\"\n fill=\"currentColor\"\n viewBox=\"0 0 20 20\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z\"\n clipRule=\"evenodd\"\n />\n </svg>\n )}\n </div>\n )}\n </div>\n <span className=\"flex-1\">{option.text}</span>\n </div>\n </button>\n );\n })}\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;","/**\n * Concatenates two arrays faster than the array spread operator.\n */\nconst concatArrays = (array1, array2) => {\n // Pre-allocate for better V8 optimization\n const combinedArray = new Array(array1.length + array2.length);\n for (let i = 0; i < array1.length; i++) {\n combinedArray[i] = array1[i];\n }\n for (let i = 0; i < array2.length; i++) {\n combinedArray[array1.length + i] = array2[i];\n }\n return combinedArray;\n};\n\n// Factory function ensures consistent object shapes\nconst createClassValidatorObject = (classGroupId, validator) => ({\n classGroupId,\n validator\n});\n// Factory ensures consistent ClassPartObject shape\nconst createClassPartObject = (nextPart = new Map(), validators = null, classGroupId) => ({\n nextPart,\n validators,\n classGroupId\n});\nconst CLASS_PART_SEPARATOR = '-';\nconst EMPTY_CONFLICTS = [];\n// I use two dots here because one dot is used as prefix for class groups in plugins\nconst ARBITRARY_PROPERTY_PREFIX = 'arbitrary..';\nconst createClassGroupUtils = config => {\n const classMap = createClassMap(config);\n const {\n conflictingClassGroups,\n conflictingClassGroupModifiers\n } = config;\n const getClassGroupId = className => {\n if (className.startsWith('[') && className.endsWith(']')) {\n return getGroupIdForArbitraryProperty(className);\n }\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 skip it.\n const startIndex = classParts[0] === '' && classParts.length > 1 ? 1 : 0;\n return getGroupRecursive(classParts, startIndex, classMap);\n };\n const getConflictingClassGroupIds = (classGroupId, hasPostfixModifier) => {\n if (hasPostfixModifier) {\n const modifierConflicts = conflictingClassGroupModifiers[classGroupId];\n const baseConflicts = conflictingClassGroups[classGroupId];\n if (modifierConflicts) {\n if (baseConflicts) {\n // Merge base conflicts with modifier conflicts\n return concatArrays(baseConflicts, modifierConflicts);\n }\n // Only modifier conflicts\n return modifierConflicts;\n }\n // Fall back to without postfix if no modifier conflicts\n return baseConflicts || EMPTY_CONFLICTS;\n }\n return conflictingClassGroups[classGroupId] || EMPTY_CONFLICTS;\n };\n return {\n getClassGroupId,\n getConflictingClassGroupIds\n };\n};\nconst getGroupRecursive = (classParts, startIndex, classPartObject) => {\n const classPathsLength = classParts.length - startIndex;\n if (classPathsLength === 0) {\n return classPartObject.classGroupId;\n }\n const currentClassPart = classParts[startIndex];\n const nextClassPartObject = classPartObject.nextPart.get(currentClassPart);\n if (nextClassPartObject) {\n const result = getGroupRecursive(classParts, startIndex + 1, nextClassPartObject);\n if (result) return result;\n }\n const validators = classPartObject.validators;\n if (validators === null) {\n return undefined;\n }\n // Build classRest string efficiently by joining from startIndex onwards\n const classRest = startIndex === 0 ? classParts.join(CLASS_PART_SEPARATOR) : classParts.slice(startIndex).join(CLASS_PART_SEPARATOR);\n const validatorsLength = validators.length;\n for (let i = 0; i < validatorsLength; i++) {\n const validatorObj = validators[i];\n if (validatorObj.validator(classRest)) {\n return validatorObj.classGroupId;\n }\n }\n return undefined;\n};\n/**\n * Get the class group ID for an arbitrary property.\n *\n * @param className - The class name to get the group ID for. Is expected to be string starting with `[` and ending with `]`.\n */\nconst getGroupIdForArbitraryProperty = className => className.slice(1, -1).indexOf(':') === -1 ? undefined : (() => {\n const content = className.slice(1, -1);\n const colonIndex = content.indexOf(':');\n const property = content.slice(0, colonIndex);\n return property ? ARBITRARY_PROPERTY_PREFIX + property : undefined;\n})();\n/**\n * Exported for testing only\n */\nconst createClassMap = config => {\n const {\n theme,\n classGroups\n } = config;\n return processClassGroups(classGroups, theme);\n};\n// Split into separate functions to maintain monomorphic call sites\nconst processClassGroups = (classGroups, theme) => {\n const classMap = createClassPartObject();\n for (const classGroupId in classGroups) {\n const group = classGroups[classGroupId];\n processClassesRecursively(group, classMap, classGroupId, theme);\n }\n return classMap;\n};\nconst processClassesRecursively = (classGroup, classPartObject, classGroupId, theme) => {\n const len = classGroup.length;\n for (let i = 0; i < len; i++) {\n const classDefinition = classGroup[i];\n processClassDefinition(classDefinition, classPartObject, classGroupId, theme);\n }\n};\n// Split into separate functions for each type to maintain monomorphic call sites\nconst processClassDefinition = (classDefinition, classPartObject, classGroupId, theme) => {\n if (typeof classDefinition === 'string') {\n processStringDefinition(classDefinition, classPartObject, classGroupId);\n return;\n }\n if (typeof classDefinition === 'function') {\n processFunctionDefinition(classDefinition, classPartObject, classGroupId, theme);\n return;\n }\n processObjectDefinition(classDefinition, classPartObject, classGroupId, theme);\n};\nconst processStringDefinition = (classDefinition, classPartObject, classGroupId) => {\n const classPartObjectToEdit = classDefinition === '' ? classPartObject : getPart(classPartObject, classDefinition);\n classPartObjectToEdit.classGroupId = classGroupId;\n};\nconst processFunctionDefinition = (classDefinition, classPartObject, classGroupId, theme) => {\n if (isThemeGetter(classDefinition)) {\n processClassesRecursively(classDefinition(theme), classPartObject, classGroupId, theme);\n return;\n }\n if (classPartObject.validators === null) {\n classPartObject.validators = [];\n }\n classPartObject.validators.push(createClassValidatorObject(classGroupId, classDefinition));\n};\nconst processObjectDefinition = (classDefinition, classPartObject, classGroupId, theme) => {\n const entries = Object.entries(classDefinition);\n const len = entries.length;\n for (let i = 0; i < len; i++) {\n const [key, value] = entries[i];\n processClassesRecursively(value, getPart(classPartObject, key), classGroupId, theme);\n }\n};\nconst getPart = (classPartObject, path) => {\n let current = classPartObject;\n const parts = path.split(CLASS_PART_SEPARATOR);\n const len = parts.length;\n for (let i = 0; i < len; i++) {\n const part = parts[i];\n let next = current.nextPart.get(part);\n if (!next) {\n next = createClassPartObject();\n current.nextPart.set(part, next);\n }\n current = next;\n }\n return current;\n};\n// Type guard maintains monomorphic check\nconst isThemeGetter = func => 'isThemeGetter' in func && func.isThemeGetter === true;\n\n// LRU cache implementation using plain objects for simplicity\nconst createLruCache = maxCacheSize => {\n if (maxCacheSize < 1) {\n return {\n get: () => undefined,\n set: () => {}\n };\n }\n let cacheSize = 0;\n let cache = Object.create(null);\n let previousCache = Object.create(null);\n const update = (key, value) => {\n cache[key] = value;\n cacheSize++;\n if (cacheSize > maxCacheSize) {\n cacheSize = 0;\n previousCache = cache;\n cache = Object.create(null);\n }\n };\n return {\n get(key) {\n let value = cache[key];\n if (value !== undefined) {\n return value;\n }\n if ((value = previousCache[key]) !== undefined) {\n update(key, value);\n return value;\n }\n },\n set(key, value) {\n if (key in cache) {\n cache[key] = value;\n } else {\n update(key, value);\n }\n }\n };\n};\nconst IMPORTANT_MODIFIER = '!';\nconst MODIFIER_SEPARATOR = ':';\nconst EMPTY_MODIFIERS = [];\n// Pre-allocated result object shape for consistency\nconst createResultObject = (modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition, isExternal) => ({\n modifiers,\n hasImportantModifier,\n baseClassName,\n maybePostfixModifierPosition,\n isExternal\n});\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 // Use simple array with push for better performance\n const modifiers = [];\n let bracketDepth = 0;\n let parenDepth = 0;\n let modifierStart = 0;\n let postfixModifierPosition;\n const len = className.length;\n for (let index = 0; index < len; index++) {\n const currentCharacter = className[index];\n if (bracketDepth === 0 && parenDepth === 0) {\n if (currentCharacter === MODIFIER_SEPARATOR) {\n modifiers.push(className.slice(modifierStart, index));\n modifierStart = index + 1;\n continue;\n }\n if (currentCharacter === '/') {\n postfixModifierPosition = index;\n continue;\n }\n }\n if (currentCharacter === '[') bracketDepth++;else if (currentCharacter === ']') bracketDepth--;else if (currentCharacter === '(') parenDepth++;else if (currentCharacter === ')') parenDepth--;\n }\n const baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.slice(modifierStart);\n // Inline important modifier check\n let baseClassName = baseClassNameWithImportantModifier;\n let hasImportantModifier = false;\n if (baseClassNameWithImportantModifier.endsWith(IMPORTANT_MODIFIER)) {\n baseClassName = baseClassNameWithImportantModifier.slice(0, -1);\n hasImportantModifier = true;\n } else if (\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 baseClassNameWithImportantModifier.startsWith(IMPORTANT_MODIFIER)) {\n baseClassName = baseClassNameWithImportantModifier.slice(1);\n hasImportantModifier = true;\n }\n const maybePostfixModifierPosition = postfixModifierPosition && postfixModifierPosition > modifierStart ? postfixModifierPosition - modifierStart : undefined;\n return createResultObject(modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition);\n };\n if (prefix) {\n const fullPrefix = prefix + MODIFIER_SEPARATOR;\n const parseClassNameOriginal = parseClassName;\n parseClassName = className => className.startsWith(fullPrefix) ? parseClassNameOriginal(className.slice(fullPrefix.length)) : createResultObject(EMPTY_MODIFIERS, false, className, undefined, true);\n }\n if (experimentalParseClassName) {\n const parseClassNameOriginal = parseClassName;\n parseClassName = className => experimentalParseClassName({\n className,\n parseClassName: parseClassNameOriginal\n });\n }\n return parseClassName;\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 // Pre-compute weights for all known modifiers for O(1) comparison\n const modifierWeights = new Map();\n // Assign weights to sensitive modifiers (highest priority, but preserve order)\n config.orderSensitiveModifiers.forEach((mod, index) => {\n modifierWeights.set(mod, 1000000 + index); // High weights for sensitive mods\n });\n return modifiers => {\n const result = [];\n let currentSegment = [];\n // Process modifiers in one pass\n for (let i = 0; i < modifiers.length; i++) {\n const modifier = modifiers[i];\n // Check if modifier is sensitive (starts with '[' or in orderSensitiveModifiers)\n const isArbitrary = modifier[0] === '[';\n const isOrderSensitive = modifierWeights.has(modifier);\n if (isArbitrary || isOrderSensitive) {\n // Sort and flush current segment alphabetically\n if (currentSegment.length > 0) {\n currentSegment.sort();\n result.push(...currentSegment);\n currentSegment = [];\n }\n result.push(modifier);\n } else {\n // Regular modifier - add to current segment for batch sorting\n currentSegment.push(modifier);\n }\n }\n // Sort and add any remaining segment items\n if (currentSegment.length > 0) {\n currentSegment.sort();\n result.push(...currentSegment);\n }\n return result;\n };\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 // Fast path: skip sorting for empty or single modifier\n const variantModifier = modifiers.length === 0 ? '' : modifiers.length === 1 ? modifiers[0] : sortModifiers(modifiers).join(':');\n const modifierId = hasImportantModifier ? variantModifier + IMPORTANT_MODIFIER : variantModifier;\n const classId = modifierId + classGroupId;\n if (classGroupsInConflict.indexOf(classId) > -1) {\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 */\nconst twJoin = (...classLists) => {\n let index = 0;\n let argument;\n let resolvedValue;\n let string = '';\n while (index < classLists.length) {\n if (argument = classLists[index++]) {\n if (resolvedValue = toValue(argument)) {\n string && (string += ' ');\n string += resolvedValue;\n }\n }\n }\n return string;\n};\nconst toValue = mix => {\n // Fast path for strings\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};\nconst createTailwindMerge = (createConfigFirst, ...createConfigRest) => {\n let configUtils;\n let cacheGet;\n let cacheSet;\n let functionToCall;\n const 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 const 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 functionToCall = initTailwindMerge;\n return (...args) => functionToCall(twJoin(...args));\n};\nconst fallbackThemeArr = [];\nconst fromTheme = key => {\n const themeGetter = theme => theme[key] || fallbackThemeArr;\n themeGetter.isThemeGetter = true;\n return themeGetter;\n};\nconst arbitraryValueRegex = /^\\[(?:(\\w[\\w-]*):)?(.+)\\]$/i;\nconst arbitraryVariableRegex = /^\\((?:(\\w[\\w-]*):)?(.+)\\)$/i;\nconst fractionRegex = /^\\d+(?:\\.\\d+)?\\/\\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 isArbitraryWeight = value => getIsArbitraryValue(value, isLabelWeight, isAny);\nconst isArbitraryFamilyName = value => getIsArbitraryValue(value, isLabelFamilyName, isNever);\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);\nconst isArbitraryVariableWeight = value => getIsArbitraryVariable(value, isLabelWeight, 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 isLabelWeight = label => label === 'number' || label === 'weight';\nconst isLabelShadow = label => label === 'shadow';\nconst validators = /*#__PURE__*/Object.defineProperty({\n __proto__: null,\n isAny,\n isAnyNonArbitrary,\n isArbitraryFamilyName,\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 isArbitraryVariableWeight,\n isArbitraryWeight,\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 scaleSizingInline = () => [isFraction, 'screen', 'full', 'dvw', 'lvw', 'svw', 'min', 'max', 'fit', ...scaleUnambiguousSpacing()];\n const scaleSizingBlock = () => [isFraction, 'screen', 'full', 'lh', 'dvh', 'lvh', '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 * Inset\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n inset: [{\n inset: scaleInset()\n }],\n /**\n * Inset Inline\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n 'inset-x': [{\n 'inset-x': scaleInset()\n }],\n /**\n * Inset Block\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n 'inset-y': [{\n 'inset-y': scaleInset()\n }],\n /**\n * Inset Inline Start\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n * @todo class group will be renamed to `inset-s` in next major release\n */\n start: [{\n 'inset-s': scaleInset(),\n /**\n * @deprecated since Tailwind CSS v4.2.0 in favor of `inset-s-*` utilities.\n * @see https://github.com/tailwindlabs/tailwindcss/pull/19613\n */\n start: scaleInset()\n }],\n /**\n * Inset Inline End\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n * @todo class group will be renamed to `inset-e` in next major release\n */\n end: [{\n 'inset-e': scaleInset(),\n /**\n * @deprecated since Tailwind CSS v4.2.0 in favor of `inset-e-*` utilities.\n * @see https://github.com/tailwindlabs/tailwindcss/pull/19613\n */\n end: scaleInset()\n }],\n /**\n * Inset Block Start\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n 'inset-bs': [{\n 'inset-bs': scaleInset()\n }],\n /**\n * Inset Block End\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n 'inset-be': [{\n 'inset-be': 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 Inline\n * @see https://tailwindcss.com/docs/padding\n */\n px: [{\n px: scaleUnambiguousSpacing()\n }],\n /**\n * Padding Block\n * @see https://tailwindcss.com/docs/padding\n */\n py: [{\n py: scaleUnambiguousSpacing()\n }],\n /**\n * Padding Inline Start\n * @see https://tailwindcss.com/docs/padding\n */\n ps: [{\n ps: scaleUnambiguousSpacing()\n }],\n /**\n * Padding Inline End\n * @see https://tailwindcss.com/docs/padding\n */\n pe: [{\n pe: scaleUnambiguousSpacing()\n }],\n /**\n * Padding Block Start\n * @see https://tailwindcss.com/docs/padding\n */\n pbs: [{\n pbs: scaleUnambiguousSpacing()\n }],\n /**\n * Padding Block End\n * @see https://tailwindcss.com/docs/padding\n */\n pbe: [{\n pbe: 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 Inline\n * @see https://tailwindcss.com/docs/margin\n */\n mx: [{\n mx: scaleMargin()\n }],\n /**\n * Margin Block\n * @see https://tailwindcss.com/docs/margin\n */\n my: [{\n my: scaleMargin()\n }],\n /**\n * Margin Inline Start\n * @see https://tailwindcss.com/docs/margin\n */\n ms: [{\n ms: scaleMargin()\n }],\n /**\n * Margin Inline End\n * @see https://tailwindcss.com/docs/margin\n */\n me: [{\n me: scaleMargin()\n }],\n /**\n * Margin Block Start\n * @see https://tailwindcss.com/docs/margin\n */\n mbs: [{\n mbs: scaleMargin()\n }],\n /**\n * Margin Block End\n * @see https://tailwindcss.com/docs/margin\n */\n mbe: [{\n mbe: 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 * Inline Size\n * @see https://tailwindcss.com/docs/width\n */\n 'inline-size': [{\n inline: ['auto', ...scaleSizingInline()]\n }],\n /**\n * Min-Inline Size\n * @see https://tailwindcss.com/docs/min-width\n */\n 'min-inline-size': [{\n 'min-inline': ['auto', ...scaleSizingInline()]\n }],\n /**\n * Max-Inline Size\n * @see https://tailwindcss.com/docs/max-width\n */\n 'max-inline-size': [{\n 'max-inline': ['none', ...scaleSizingInline()]\n }],\n /**\n * Block Size\n * @see https://tailwindcss.com/docs/height\n */\n 'block-size': [{\n block: ['auto', ...scaleSizingBlock()]\n }],\n /**\n * Min-Block Size\n * @see https://tailwindcss.com/docs/min-height\n */\n 'min-block-size': [{\n 'min-block': ['auto', ...scaleSizingBlock()]\n }],\n /**\n * Max-Block Size\n * @see https://tailwindcss.com/docs/max-height\n */\n 'max-block-size': [{\n 'max-block': ['none', ...scaleSizingBlock()]\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, isArbitraryVariableWeight, isArbitraryWeight]\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, isArbitraryFamilyName, themeFont]\n }],\n /**\n * Font Feature Settings\n * @see https://tailwindcss.com/docs/font-feature-settings\n */\n 'font-features': [{\n 'font-features': [isArbitraryValue]\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 Inline\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-x': [{\n 'border-x': scaleBorderWidth()\n }],\n /**\n * Border Width Block\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-y': [{\n 'border-y': scaleBorderWidth()\n }],\n /**\n * Border Width Inline Start\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-s': [{\n 'border-s': scaleBorderWidth()\n }],\n /**\n * Border Width Inline End\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-e': [{\n 'border-e': scaleBorderWidth()\n }],\n /**\n * Border Width Block Start\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-bs': [{\n 'border-bs': scaleBorderWidth()\n }],\n /**\n * Border Width Block End\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-be': [{\n 'border-be': 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 Inline\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-x': [{\n 'border-x': scaleColor()\n }],\n /**\n * Border Color Block\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-y': [{\n 'border-y': scaleColor()\n }],\n /**\n * Border Color Inline Start\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-s': [{\n 'border-s': scaleColor()\n }],\n /**\n * Border Color Inline End\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-e': [{\n 'border-e': scaleColor()\n }],\n /**\n * Border Color Block Start\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-bs': [{\n 'border-bs': scaleColor()\n }],\n /**\n * Border Color Block End\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-be': [{\n 'border-be': 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 Inline\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-mx': [{\n 'scroll-mx': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Margin Block\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-my': [{\n 'scroll-my': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Margin Inline Start\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-ms': [{\n 'scroll-ms': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Margin Inline End\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-me': [{\n 'scroll-me': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Margin Block Start\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-mbs': [{\n 'scroll-mbs': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Margin Block End\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-mbe': [{\n 'scroll-mbe': 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 Inline\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-px': [{\n 'scroll-px': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Padding Block\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-py': [{\n 'scroll-py': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Padding Inline Start\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-ps': [{\n 'scroll-ps': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Padding Inline End\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-pe': [{\n 'scroll-pe': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Padding Block Start\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-pbs': [{\n 'scroll-pbs': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Padding Block End\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-pbe': [{\n 'scroll-pbe': 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', 'inset-bs', 'inset-be', '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', 'pbs', 'pbe', 'pt', 'pr', 'pb', 'pl'],\n px: ['pr', 'pl'],\n py: ['pt', 'pb'],\n m: ['mx', 'my', 'ms', 'me', 'mbs', 'mbe', '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-bs', 'border-w-be', '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-bs', 'border-color-be', '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-mbs', 'scroll-mbe', '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-pbs', 'scroll-pbe', '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 { cn } from \"../../lib/utils\";\n\nfunction Textarea({ className, ...props }: React.ComponentProps<\"textarea\">) {\n return (\n <textarea\n data-slot=\"textarea\"\n className={cn(\n \"border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 aria-invalid:border-destructive flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm\",\n className\n )}\n {...props}\n />\n );\n}\n\nexport { Textarea };\n","import { Textarea } from \"../ui/textarea\";\nimport { cn } from \"../../lib/utils\";\n\nexport interface TextResponseProps {\n value?: string;\n onChange: (value: string) => void;\n placeholder?: string;\n className?: string;\n disabled?: boolean;\n minRows?: number;\n maxRows?: number;\n characterLimit?: number;\n}\n\nexport default function TextResponse({\n value = \"\",\n onChange,\n placeholder = \"Enter your response...\",\n className = \"\",\n disabled = false,\n minRows = 3,\n maxRows = 8,\n characterLimit,\n}: TextResponseProps) {\n const handleChange = (e: React.ChangeEvent<HTMLTextAreaElement>) => {\n let v = e.target.value;\n if (characterLimit && v.length > characterLimit) v = v.slice(0, characterLimit);\n onChange(v);\n };\n\n const count = value.length;\n const isNearLimit = characterLimit && count >= characterLimit * 0.9;\n const isAtLimit = characterLimit && count >= characterLimit;\n\n return (\n <div className={cn(\"space-y-2\", className)}>\n <div className=\"relative\">\n <Textarea\n value={value}\n onChange={handleChange}\n placeholder={placeholder}\n disabled={disabled}\n rows={minRows}\n className={cn(\n \"w-full resize-y rounded-lg border border-[var(--neutral-200)] bg-[var(--neutral-50)] px-[13px] py-3 text-sm font-normal\",\n \"focus:border-[var(--primary-600)] focus:ring-0 focus:outline-none\",\n \"placeholder:text-textGray\",\n \"!field-sizing-auto !transition-none\", // Remove transitions that cause lag during resize\n \"resize-y\", // Ensure only vertical resize\n disabled && \"cursor-not-allowed opacity-50\",\n )}\n style={{\n minHeight: `${minRows * 1.5}rem`,\n maxHeight: `${maxRows * 1.5}rem`,\n boxSizing: \"border-box\",\n overflow: \"hidden\",\n borderRadius: \"0px\",\n backgroundColor: \"white\",\n }}\n />\n </div>\n {characterLimit != null && (\n <div className=\"flex justify-end\">\n <span\n className={cn(\n \"text-xs transition-colors\",\n isAtLimit ? \"text-error\" : isNearLimit ? \"text-warning\" : \"text-textGray\",\n )}\n >\n {count}/{characterLimit}\n </span>\n </div>\n )}\n </div>\n );\n}\n","import { useState, useRef, useEffect } from \"react\";\n\nexport interface DropdownOption {\n value: string;\n label: string;\n disabled?: boolean;\n}\n\nexport interface DropdownProps {\n options: DropdownOption[];\n value?: string;\n onChange: (value: string) => void;\n placeholder?: string;\n disabled?: boolean;\n error?: string;\n required?: boolean;\n className?: string;\n dropdownClassName?: string;\n}\n\nexport default function Dropdown({\n options,\n value,\n onChange,\n placeholder = \"Select an option\",\n disabled = false,\n error,\n required = false,\n className = \"\",\n}: DropdownProps) {\n const [isOpen, setIsOpen] = useState(false);\n const [highlightedIndex, setHighlightedIndex] = useState(-1);\n const dropdownRef = useRef<HTMLDivElement>(null);\n\n const selectedOption = options.find((opt) => opt.value === value);\n const displayValue = selectedOption?.label || \"\";\n\n useEffect(() => {\n function handleClickOutside(e: MouseEvent) {\n if (dropdownRef.current && !dropdownRef.current.contains(e.target as Node)) {\n setIsOpen(false);\n setHighlightedIndex(-1);\n }\n }\n if (isOpen) document.addEventListener(\"mousedown\", handleClickOutside);\n return () => document.removeEventListener(\"mousedown\", handleClickOutside);\n }, [isOpen]);\n\n useEffect(() => {\n function handleKeyDown(e: KeyboardEvent) {\n if (!isOpen) return;\n const enabled = options.filter((opt) => !opt.disabled);\n switch (e.key) {\n case \"ArrowDown\":\n e.preventDefault();\n setHighlightedIndex((p) => (p + 1 >= enabled.length ? 0 : p + 1));\n break;\n case \"ArrowUp\":\n e.preventDefault();\n setHighlightedIndex((p) => (p - 1 < 0 ? enabled.length - 1 : p - 1));\n break;\n case \"Enter\":\n e.preventDefault();\n if (highlightedIndex >= 0 && enabled[highlightedIndex]) {\n onChange(enabled[highlightedIndex].value);\n setIsOpen(false);\n }\n break;\n case \"Escape\":\n setIsOpen(false);\n setHighlightedIndex(-1);\n break;\n }\n }\n if (isOpen) document.addEventListener(\"keydown\", handleKeyDown);\n return () => document.removeEventListener(\"keydown\", handleKeyDown);\n }, [isOpen, highlightedIndex, options, onChange]);\n\n const handleToggle = () => {\n if (!disabled) {\n setIsOpen((o) => !o);\n setHighlightedIndex(-1);\n }\n };\n\n const handleSelect = (opt: DropdownOption) => {\n if (!opt.disabled) {\n onChange(opt.value);\n setIsOpen(false);\n setHighlightedIndex(-1);\n }\n };\n\n const baseInput =\n \"relative w-full cursor-pointer border border-rounded rounded-xl border-[var(--neutral-200)] bg-[var(--neutral-50)] px-3 py-2 pr-10 text-left focus:border-[var(--primary-600)] focus:outline-none focus:ring-1 focus:ring-[var(--primary-200)] \" +\n (disabled ? \"cursor-not-allowed bg-[var(--neutral-100)] text-[var(--neutral-500)] \" : \"\") +\n (error ? \"border-error focus:border-error focus:ring-error \" : \"\");\n\n return (\n <div className={`relative ${className}`} ref={dropdownRef}>\n <button\n type=\"button\"\n className={baseInput}\n onClick={handleToggle}\n disabled={disabled}\n aria-haspopup=\"listbox\"\n aria-expanded={isOpen}\n >\n <span className={`block truncate ${!displayValue ? \"text-textGray\" : \"text-textBlack\"}`}>\n {displayValue || placeholder}\n {required && !displayValue && <span className=\"ml-1 text-error\">*</span>}\n </span>\n <span className=\"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3\">\n <svg\n className={`h-4 w-4 transition-transform duration-200 ${isOpen ? \"rotate-180\" : \"\"} ${disabled ? \"text-[var(--neutral-500)]\" : \"text-textGray\"}`}\n fill=\"none\"\n stroke=\"currentColor\"\n viewBox=\"0 0 24 24\"\n >\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M19 9l-7 7-7-7\" />\n </svg>\n </span>\n </button>\n {error && <p className=\"mt-1 text-sm text-error\">{error}</p>}\n {isOpen && (\n <div\n className=\"absolute z-50 mt-1 max-h-60 w-full overflow-auto rounded-lg border border-[var(--neutral-200)] bg-[var(--neutral-50)] shadow-lg\"\n role=\"listbox\"\n >\n {options.length === 0 ? (\n <div className=\"px-3 py-2 text-sm text-textGray\">No options available</div>\n ) : (\n options.map((option) => {\n const enabled = options.filter((o) => !o.disabled);\n const enIdx = enabled.findIndex((o) => o.value === option.value);\n const isHighlighted = enIdx === highlightedIndex;\n const isSelected = option.value === value;\n return (\n <div\n key={option.value}\n className={`cursor-pointer px-3 py-2 text-sm transition-colors ${\n option.disabled\n ? \"cursor-not-allowed bg-[var(--neutral-100)] text-[var(--neutral-500)]\"\n : isHighlighted\n ? \"bg-[var(--primary-100)] text-[var(--primary-600)]\"\n : isSelected\n ? \"bg-[var(--primary-600)] text-[var(--primary-foreground)]\"\n : \"text-textBlack hover:bg-[var(--neutral-100)]\"\n }`}\n onClick={() => handleSelect(option)}\n onMouseEnter={() => !option.disabled && setHighlightedIndex(enIdx)}\n role=\"option\"\n aria-selected={isSelected}\n >\n {option.label}\n </div>\n );\n })\n )}\n </div>\n )}\n </div>\n );\n}\n","import { validateInputType } from \"../../utils/responseHelpers\";\n\nexport interface TabularInputOption {\n id: string;\n text: string;\n}\n\nexport interface TabularInputRow {\n id: string;\n label: string;\n}\n\nexport interface TabularInputColumn {\n id: string;\n title: string;\n width?: string;\n}\n\nexport interface TabularInputValue {\n rowId: string;\n value: string | boolean;\n}\n\nexport interface TabularInputConfig {\n type: \"dropdown\" | \"text\" | \"number\" | \"checkbox\";\n options?: TabularInputOption[];\n placeholder?: string;\n min?: number;\n max?: number;\n step?: number;\n required?: boolean;\n maxLength?: number;\n inputType?: string;\n checkboxLabel?: string;\n}\n\nexport interface TabularInputProps {\n columns: TabularInputColumn[];\n rows: TabularInputRow[];\n inputConfig: TabularInputConfig;\n values: TabularInputValue[];\n onValueChange: (rowId: string, value: string | boolean) => void;\n className?: string;\n}\n\nexport default function TabularInput({\n columns,\n rows,\n inputConfig,\n values,\n onValueChange,\n className = \"\",\n}: TabularInputProps) {\n const getValue = (rowId: string): string | boolean => {\n const v = values?.find((x) => x.rowId === rowId);\n if (v) return v.value;\n return inputConfig.type === \"checkbox\" ? false : \"\";\n };\n\n const baseClasses =\n \"w-full border border-[var(--neutral-200)] bg-[var(--neutral-50)] px-3 py-2 text-sm leading-5 font-normal transition-all focus:border-[var(--primary-600)] focus:outline-none\";\n\n const renderInput = (row: TabularInputRow) => {\n const current = getValue(row.id);\n switch (inputConfig.type) {\n case \"dropdown\":\n return (\n <select\n value={String(current)}\n onChange={(e) => onValueChange(row.id, e.target.value)}\n className={`${baseClasses} cursor-pointer appearance-none bg-[var(--neutral-50)] pr-8`}\n style={{\n backgroundImage: `url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23374151' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e\")`,\n backgroundPosition: \"right 8px center\",\n backgroundRepeat: \"no-repeat\",\n backgroundSize: \"16px\",\n borderRadius: \"0.75rem\",\n }}\n >\n <option value=\"\">Select</option>\n {inputConfig.options?.map((opt) => (\n <option key={opt.id} value={opt.id}>\n {opt.text}\n </option>\n ))}\n </select>\n );\n case \"number\":\n return (\n <input\n type=\"number\"\n value={String(current)}\n onChange={(e) => onValueChange(row.id, e.target.value)}\n placeholder={inputConfig.placeholder}\n min={inputConfig.min}\n max={inputConfig.max}\n step={inputConfig.step}\n required={inputConfig.required}\n className={baseClasses}\n style={{ borderRadius: \"0.75rem\" }}\n />\n );\n case \"checkbox\":\n return (\n <div className=\"flex items-center\">\n <input\n type=\"checkbox\"\n id={`cb-${row.id}`}\n checked={Boolean(current)}\n onChange={(e) => onValueChange(row.id, e.target.checked)}\n required={inputConfig.required}\n className=\"h-4 w-4 cursor-pointer border border-[var(--neutral-200)] text-[var(--primary-600)] focus:ring-2 focus:ring-[var(--primary-200)] focus:ring-offset-0\"\n />\n {inputConfig.checkboxLabel && (\n <label htmlFor={`cb-${row.id}`} className=\"ml-2 cursor-pointer text-sm text-textBlack\">\n {inputConfig.checkboxLabel}\n </label>\n )}\n </div>\n );\n case \"text\":\n default:\n return (\n <input\n type=\"text\"\n value={String(current)}\n onChange={(e) => {\n let v = e.target.value;\n if (inputConfig.maxLength && v.length > inputConfig.maxLength) return;\n if (inputConfig.inputType && v.trim() !== \"\" && !validateInputType(v, inputConfig.inputType)) return;\n onValueChange(row.id, v);\n }}\n placeholder={inputConfig.placeholder}\n required={inputConfig.required}\n maxLength={inputConfig.maxLength}\n className={baseClasses}\n style={{ borderRadius: \"0.75rem\" }}\n />\n );\n }\n };\n\n return (\n <div className={`overflow-hidden border border-rounded rounded-xl border-[var(--neutral-200)] bg-[var(--neutral-50)] ${className}`}>\n <div className=\"flex border-b border-[var(--neutral-200)] bg-[var(--neutral-100)]\">\n {columns.map((col, i) => (\n <div\n key={col.id}\n className={`flex-1 px-4 py-3 text-left text-sm font-medium text-textBlack ${i !== columns.length - 1 ? \"border-r border-[var(--neutral-200)]\" : \"\"}`}\n style={{ width: col.width }}\n >\n {col.title}\n </div>\n ))}\n </div>\n <div>\n {rows.map((row, rowIndex) => (\n <div\n key={row.id}\n className={rowIndex !== rows.length - 1 ? \"flex border-b border-[var(--neutral-200)]\" : \"flex\"}\n >\n <div\n className=\"flex flex-1 items-center border-r border-[var(--neutral-200)] px-4 py-3 text-sm text-textBlack\"\n style={{ width: columns[0]?.width }}\n >\n {row.label}\n </div>\n <div className=\"flex flex-1 items-center px-4 py-3\" style={{ width: columns[1]?.width }}>\n {renderInput(row)}\n </div>\n </div>\n ))}\n </div>\n </div>\n );\n}\n","import { useState, useRef, useEffect } from \"react\";\n\n// Same format as date-fns \"PPP\" (e.g. \"April 29, 2023\")\nfunction formatDatePPP(d: Date): string {\n const months = [\n \"January\", \"February\", \"March\", \"April\", \"May\", \"June\",\n \"July\", \"August\", \"September\", \"October\", \"November\", \"December\",\n ];\n return `${months[d.getMonth()]} ${d.getDate()}, ${d.getFullYear()}`;\n}\n\nconst MONTHS_FULL = [\n \"January\", \"February\", \"March\", \"April\", \"May\", \"June\",\n \"July\", \"August\", \"September\", \"October\", \"November\", \"December\",\n];\n\nconst WEEKDAYS = [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"];\n\nexport interface DatePickerProps {\n selectedDate?: Date;\n onDateSelect: (date: Date | undefined) => void;\n placeholder?: string;\n className?: string;\n disabled?: boolean;\n minDate?: Date;\n maxDate?: Date;\n}\n\nexport default function DatePicker({\n selectedDate,\n onDateSelect,\n placeholder = \"Select a date\",\n className = \"\",\n disabled = false,\n minDate,\n maxDate,\n}: DatePickerProps) {\n const [isOpen, setIsOpen] = useState(false);\n const [currentMonth, setCurrentMonth] = useState(() => selectedDate ?? new Date());\n const containerRef = useRef<HTMLDivElement>(null);\n\n // Sync currentMonth when popover opens (intentionally not selectedDate to avoid jumping while navigating)\n // eslint-disable-next-line react-hooks/exhaustive-deps -- only sync on open\n useEffect(() => {\n if (isOpen) {\n setCurrentMonth(selectedDate ?? new Date());\n }\n }, [isOpen]);\n\n // Close on outside click\n useEffect(() => {\n if (!isOpen) return;\n const handleClick = (e: MouseEvent) => {\n if (containerRef.current && !containerRef.current.contains(e.target as Node)) {\n setIsOpen(false);\n }\n };\n document.addEventListener(\"mousedown\", handleClick);\n return () => document.removeEventListener(\"mousedown\", handleClick);\n }, [isOpen]);\n\n const handleDateSelect = (date: Date) => {\n onDateSelect(date);\n setIsOpen(false);\n };\n\n const handleMonthChange = (monthValue: string) => {\n const next = new Date(currentMonth);\n next.setMonth(parseInt(monthValue, 10));\n setCurrentMonth(next);\n };\n\n const handleYearChange = (yearValue: string) => {\n const next = new Date(currentMonth);\n next.setFullYear(parseInt(yearValue, 10));\n setCurrentMonth(next);\n };\n\n const currentYear = new Date().getFullYear();\n const startYear = minDate ? minDate.getFullYear() : currentYear - 100;\n const endYear = maxDate ? maxDate.getFullYear() : currentYear + 100;\n const years = Array.from(\n { length: Math.max(1, endYear - startYear + 1) },\n (_, i) => startYear + i,\n );\n\n const isDateDisabled = (date: Date): boolean => {\n if (minDate && date < minDate) return true;\n if (maxDate && date > maxDate) return true;\n return false;\n };\n\n // Build calendar grid: first day of month (0=Sun), then all days\n const y = currentMonth.getFullYear();\n const m = currentMonth.getMonth();\n const firstDay = new Date(y, m, 1).getDay();\n const daysInMonth = new Date(y, m + 1, 0).getDate();\n const leadingEmpty = firstDay;\n\n const display = selectedDate ? formatDatePPP(selectedDate) : \"\";\n\n return (\n <div ref={containerRef} className={`relative ${className}`.trim()}>\n <button\n type=\"button\"\n onClick={() => !disabled && setIsOpen((o) => !o)}\n className={`flex w-full items-center justify-start border border-[var(--neutral-200)] bg-[var(--neutral-50)] px-[13px] py-3 text-left text-sm font-normal hover:bg-[var(--neutral-100)] ${\n !display ? \"text-textGray\" : \"text-textBlack\"\n } ${disabled ? \"cursor-not-allowed opacity-50\" : \"cursor-pointer\"}`}\n style={{ borderRadius: \"0.75rem\", backgroundColor: \"white\" }}\n >\n <svg\n className=\"mr-2 h-4 w-4 shrink-0 text-textGray\"\n fill=\"none\"\n stroke=\"currentColor\"\n viewBox=\"0 0 24 24\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z\"\n />\n </svg>\n {display || placeholder}\n </button>\n\n {isOpen && (\n <div\n className=\"absolute z-50 mt-1 w-auto rounded-md border border-[var(--neutral-200)] bg-[var(--neutral-50)] p-3 shadow-lg\"\n style={{ minWidth: \"280px\" }}\n >\n <div className=\"space-y-3\">\n {/* Month / Year header – same as app */}\n <div className=\"flex items-center justify-between gap-2\">\n <select\n value={currentMonth.getMonth().toString()}\n onChange={(e) => handleMonthChange(e.target.value)}\n className=\"h-8 w-32 rounded border border-[var(--primary-200)] bg-[var(--neutral-50)] px-2 text-sm focus:border-[var(--primary-600)] focus:outline-none\"\n >\n {MONTHS_FULL.map((month, index) => (\n <option key={month} value={index.toString()}>\n {month}\n </option>\n ))}\n </select>\n <select\n value={currentMonth.getFullYear().toString()}\n onChange={(e) => handleYearChange(e.target.value)}\n className=\"h-8 w-24 rounded border border-[var(--primary-200)] bg-[var(--neutral-50)] px-2 text-sm focus:border-[var(--primary-600)] focus:outline-none\"\n >\n {years.map((year) => (\n <option key={year} value={year.toString()}>\n {year}\n </option>\n ))}\n </select>\n </div>\n\n {/* Calendar grid – 7 columns, week header + days */}\n <div className=\"w-full\">\n <div className=\"grid grid-cols-7 gap-1 text-center text-xs font-medium text-textGray\">\n {WEEKDAYS.map((day) => (\n <div key={day}>{day}</div>\n ))}\n </div>\n <div className=\"mt-1 grid grid-cols-7 gap-1 text-sm\">\n {Array.from({ length: leadingEmpty }, (_, i) => (\n <div key={`empty-${i}`} />\n ))}\n {Array.from({ length: daysInMonth }, (_, i) => {\n const day = i + 1;\n const date = new Date(y, m, day);\n const disabled = isDateDisabled(date);\n const isSelected =\n selectedDate &&\n selectedDate.getFullYear() === y &&\n selectedDate.getMonth() === m &&\n selectedDate.getDate() === day;\n return (\n <button\n key={day}\n type=\"button\"\n disabled={disabled}\n onClick={() => !disabled && handleDateSelect(date)}\n className={`flex h-8 w-8 items-center justify-center rounded-md transition-colors ${\n disabled\n ? \"cursor-not-allowed text-[var(--neutral-400)]\"\n : \"hover:bg-[var(--primary-50)] hover:text-[var(--primary-600)]\"\n } ${isSelected ? \"bg-[var(--primary-600)] text-[var(--primary-foreground)] hover:bg-[var(--primary-600)] hover:text-[var(--primary-foreground)]\" : \"\"}`}\n >\n {day}\n </button>\n );\n })}\n </div>\n </div>\n </div>\n </div>\n )}\n </div>\n );\n}\n","import {\n useState,\n useRef,\n type DragEvent,\n type ChangeEvent,\n} from \"react\";\nimport type { FileObject } from \"../../types/survey.types\";\nimport { validateFile, fileToFileObject, MEDIA_MAX_SIZE_MB, MEDIA_ALLOWED_TYPES } from \"../../utils/fileUtils\";\nimport type { EffectiveMediaConfig } from \"../../utils/fileUtils\";\n\n/** Question types that use file upload; config comes from DEFAULT_MEDIA_ALLOWED_TYPES / survey config. */\nexport type MediaQuestionType =\n | \"image-response\"\n | \"video-response\"\n | \"voice-response\"\n | \"document-response\"\n | \"pdf-response\";\n\nexport interface MediaUploadProps {\n questionType: MediaQuestionType;\n value: FileObject | null;\n onChange: (value: FileObject | null) => void;\n className?: string;\n disabled?: boolean;\n mediaConfig?: EffectiveMediaConfig | null;\n}\n\n/** Label and whether to show preview (image/video/audio) or just filename (document/pdf). */\nconst QUESTION_TYPE_DISPLAY: Record<\n MediaQuestionType,\n { label: string; showPreview: boolean }\n> = {\n \"image-response\": { label: \"Image\", showPreview: true },\n \"video-response\": { label: \"Video\", showPreview: true },\n \"voice-response\": { label: \"Audio\", showPreview: true },\n \"document-response\": { label: \"Document\", showPreview: true },\n \"pdf-response\": { label: \"PDF\", showPreview: true },\n};\n\nfunction MediaIcon({ questionType }: { questionType: MediaQuestionType }) {\n const c = \"h-8 w-8 text-[var(--primary-600)]\";\n if (questionType === \"image-response\")\n return (\n <svg className={c} fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z\" />\n </svg>\n );\n if (questionType === \"video-response\")\n return (\n <svg className={c} fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z\" />\n </svg>\n );\n if (questionType === \"document-response\")\n return (\n <svg className={c} fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z\" />\n </svg>\n );\n if (questionType === \"pdf-response\")\n return (\n <svg className={c} fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z\" />\n </svg>\n );\n return (\n <svg className={c} fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M15.536 8.464a5 5 0 010 7.072m2.828-9.9a9 9 0 010 12.728M5.586 15H4a1 1 0 01-1-1v-4a1 1 0 011-1h1.586l4.707-4.707C10.923 3.663 12 4.109 12 5v14c0 .891-1.077 1.337-1.707.707L5.586 15z\" />\n </svg>\n );\n}\n\nexport default function MediaUpload({\n questionType,\n value,\n onChange,\n className = \"\",\n disabled = false,\n mediaConfig,\n}: MediaUploadProps) {\n const [isDragOver, setIsDragOver] = useState(false);\n const [errorMsg, setErrorMsg] = useState<string | null>(null);\n const inputRef = useRef<HTMLInputElement>(null);\n const display = QUESTION_TYPE_DISPLAY[questionType];\n const accept =\n mediaConfig?.allowedTypes[questionType]?.join(\",\") ??\n MEDIA_ALLOWED_TYPES[questionType]?.join(\",\") ??\n \"\";\n const maxMB =\n mediaConfig?.maxSizeBytes[questionType] != null\n ? Math.round(mediaConfig.maxSizeBytes[questionType] / (1024 * 1024))\n : MEDIA_MAX_SIZE_MB[questionType] ?? 10;\n const allowedTypesForMessage =\n mediaConfig?.allowedTypes[questionType] ?? MEDIA_ALLOWED_TYPES[questionType] ?? [];\n const supportedMessage =\n allowedTypesForMessage.length > 0\n ? `Supported: ${allowedTypesForMessage.join(\", \")} (max ${maxMB}MB)`\n : `Max size: ${maxMB}MB`;\n\n const processFile = async (file: File) => {\n setErrorMsg(null);\n const result = validateFile(file, questionType, mediaConfig);\n if (!result.valid) {\n setErrorMsg(result.error ?? \"Invalid file\");\n onChange(null);\n return;\n }\n try {\n const obj = await fileToFileObject(file);\n onChange(obj);\n } catch {\n setErrorMsg(\"Failed to read file\");\n onChange(null);\n }\n };\n\n const handleDrop = (e: DragEvent<HTMLElement>) => {\n e.preventDefault();\n e.stopPropagation();\n setIsDragOver(false);\n if (disabled) return;\n const f = e.dataTransfer.files?.[0];\n if (f) processFile(f);\n };\n\n const handleChange = (e: ChangeEvent<HTMLInputElement>) => {\n const f = e.target.files?.[0];\n if (f) processFile(f);\n e.target.value = \"\";\n };\n\n const remove = () => {\n onChange(null);\n setErrorMsg(null);\n };\n\n const hasValue = value?.binary;\n\n if (hasValue && value) {\n const src = `data:${value.fileType};base64,${value.binary}`;\n return (\n <div className={`relative border border-rounded rounded-xl border-[var(--neutral-200)] bg-[var(--neutral-50)] ${className}`}>\n <button\n type=\"button\"\n onClick={remove}\n disabled={disabled}\n className=\"absolute -top-3 -right-3 z-10 rounded-full border border-[var(--neutral-200)] bg-[var(--neutral-500)] p-1 text-[var(--primary-foreground)] transition-all hover:bg-[var(--primary-600)] hover:text-[var(--primary-foreground)] disabled:opacity-50\"\n aria-label=\"Remove\"\n >\n <svg className=\"h-4 w-4\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M6 18L18 6M6 6l12 12\" />\n </svg>\n </button>\n <div className=\"p-4\">\n {questionType === \"image-response\" && (\n <img src={src} alt=\"Uploaded\" className=\"max-h-64 w-full object-contain\" />\n )}\n {questionType === \"video-response\" && (\n <video src={src} controls className=\"max-h-64 w-full\">\n Your browser does not support the video tag.\n </video>\n )}\n {questionType === \"voice-response\" && (\n <div className=\"flex flex-col items-center space-y-4\">\n <MediaIcon questionType=\"voice-response\" />\n <p className=\"text-sm font-medium text-textBlack\">{value.fileName}</p>\n <audio src={src} controls className=\"w-full max-w-sm\">\n Your browser does not support the audio tag.\n </audio>\n </div>\n )}\n {questionType === \"pdf-response\" && (\n <div className=\"flex flex-col space-y-2\">\n <iframe\n src={src}\n title=\"PDF preview\"\n className=\"h-96 w-full rounded border border-[var(--neutral-200)] bg-[var(--neutral-50)]\"\n />\n <p className=\"text-sm text-textGray\">{value.fileName}</p>\n </div>\n )}\n {questionType === \"document-response\" && (\n <div className=\"flex flex-col items-center space-y-3\">\n <MediaIcon questionType=\"document-response\" />\n <p className=\"text-sm font-medium text-textBlack\">{value.fileName}</p>\n <a\n href={src}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"text-sm font-medium text-[var(--primary-600)] hover:underline\"\n >\n View / Open file\n </a>\n </div>\n )}\n {display.showPreview && questionType !== \"voice-response\" && questionType !== \"document-response\" && questionType !== \"pdf-response\" && (\n <p className=\"mt-2 text-sm text-textGray\">{value.fileName}</p>\n )}\n </div>\n </div>\n );\n }\n\n return (\n <div className={className}>\n <div\n className={`relative border-2 border-rounded rounded-xl border-dashed p-8 text-center transition-all ${\n isDragOver ? \"border-[var(--primary-600)] bg-[var(--primary-50)]\" : \"border-[var(--neutral-200)] bg-[var(--neutral-50)] hover:border-[var(--primary-600)] hover:bg-[var(--primary-50)]\"\n } ${disabled ? \"cursor-not-allowed opacity-50\" : \"cursor-pointer\"}`}\n onDragEnter={(e) => { e.preventDefault(); e.stopPropagation(); if (!disabled) setIsDragOver(true); }}\n onDragLeave={(e) => { e.preventDefault(); e.stopPropagation(); setIsDragOver(false); }}\n onDragOver={(e) => { e.preventDefault(); e.stopPropagation(); }}\n onDrop={handleDrop}\n onClick={() => !disabled && inputRef.current?.click()}\n >\n <input\n ref={inputRef}\n type=\"file\"\n accept={accept}\n onChange={handleChange}\n disabled={disabled}\n className=\"hidden\"\n aria-label={`Select ${display.label} file`}\n />\n <div className=\"space-y-4\">\n <div className=\"flex justify-center\">\n <MediaIcon questionType={questionType} />\n </div>\n <div>\n <p className=\"text-sm font-medium text-[var(--primary-600)]\">\n Tap to Upload {display.label}\n </p>\n <p className=\"mt-1 text-xs text-textGray\">\n or drag and drop your {display.label.toLowerCase()} here\n </p>\n </div>\n <div className=\"text-xs text-textGray\">\n <p>{supportedMessage}</p>\n </div>\n </div>\n </div>\n {errorMsg && (\n <div className=\"mt-4 rounded-lg border border-[var(--error-200)] bg-[var(--error-50)] p-3\">\n <p className=\"text-xs text-error\">{errorMsg}</p>\n </div>\n )}\n </div>\n );\n}\n","/**\n * Reusable inline error message for validation feedback.\n */\n\ninterface ErrorMessageProps {\n error?: string;\n className?: string;\n}\n\nexport function ErrorMessage({ error, className = \"\" }: ErrorMessageProps) {\n if (!error) return null;\n return (\n <p className={`mt-1 text-sm text-error ${className}`.trim()}>\n {error}\n </p>\n );\n}\n","/**\n * Unified media upload component for image, video, voice, document, and PDF responses.\n * Renders MediaUpload with the appropriate questionType.\n */\n\nimport type { SurveyQuestion, FileObject } from \"../../types/survey.types\";\nimport type { EffectiveMediaConfig } from \"../../utils/fileUtils\";\nimport MediaUpload from \"./MediaUpload\";\nimport { ErrorMessage } from \"../ui/ErrorMessage\";\n\nexport type MediaResponseQuestionType =\n | \"image-response\"\n | \"video-response\"\n | \"voice-response\"\n | \"document-response\"\n | \"pdf-response\";\n\nexport interface MediaResponseProps {\n questionType: MediaResponseQuestionType;\n question: SurveyQuestion;\n value: FileObject | null;\n onChange: (value: FileObject | null) => void;\n error?: string;\n disabled?: boolean;\n mediaConfig?: EffectiveMediaConfig | null;\n className?: string;\n}\n\nexport function MediaResponse({\n questionType,\n question: _question,\n value,\n onChange,\n error,\n disabled = false,\n mediaConfig,\n className = \"\",\n}: MediaResponseProps) {\n return (\n <div className={className}>\n <MediaUpload\n questionType={questionType}\n value={value}\n onChange={onChange}\n disabled={disabled}\n mediaConfig={mediaConfig}\n />\n <ErrorMessage error={error} />\n </div>\n );\n}\n","import type { SurveyQuestion } from \"../types/survey.types\";\nimport MCQSelect from \"./custom/MCQSelect\";\nimport TextResponse from \"./custom/TextResponse\";\nimport Dropdown from \"./custom/Dropdown\";\nimport TabularInput from \"./custom/TabularInput\";\nimport type {\n TabularInputColumn,\n TabularInputRow,\n TabularInputConfig,\n TabularInputValue,\n} from \"./custom/TabularInput\";\nimport DatePicker from \"./custom/DatePicker\";\nimport { MediaResponse } from \"./custom/MediaResponse\";\nimport type { EffectiveMediaConfig } from \"../utils/fileUtils\";\nimport { isValueFileObject } from \"../utils/fileUtils\";\nimport { ErrorMessage } from \"./ui/ErrorMessage\";\n\ninterface DropdownOption {\n value: string;\n label: string;\n disabled?: boolean;\n}\n\nexport interface QuestionMapperProps {\n question: SurveyQuestion;\n value: unknown;\n onChange: (value: unknown) => void;\n error?: string;\n touched?: boolean;\n disabled?: boolean;\n mediaConfig?: EffectiveMediaConfig | null;\n className?: string;\n}\n\nexport default function QuestionMapper({\n question,\n value,\n onChange,\n error,\n touched = true,\n disabled = false,\n mediaConfig,\n className = \"\",\n}: QuestionMapperProps) {\n const getDropdownOptions = (): DropdownOption[] => {\n if (!question.options) return [];\n return question.options.map((option, index) => ({\n value: option,\n label: question.optionsEN?.[index] ?? option,\n disabled: false,\n }));\n };\n\n const getMCQOptions = () => {\n if (!question.options) return [];\n return question.options.map((option, index) => ({\n id: option,\n text: question.optionsEN?.[index] ?? option,\n }));\n };\n\n const getTabularConfig = (): {\n columns: TabularInputColumn[];\n rows: TabularInputRow[];\n inputConfig: TabularInputConfig;\n } | null => {\n if (!question.tableHeaderValue || !question.tableQuestionValue) return null;\n\n const columns: TabularInputColumn[] = question.tableHeaderValue.map((header, index) => ({\n id: `col-${index}`,\n title: header,\n width: index === 0 ? \"60%\" : \"40%\",\n }));\n\n const rows: TabularInputRow[] = question.tableQuestionValue.map((row) => ({\n id: row.rowId,\n label: row.rowQuestion,\n }));\n\n let inputConfig: TabularInputConfig;\n switch (question.type) {\n case \"tabular-text-input\":\n inputConfig = {\n type: \"text\",\n placeholder: \"Enter text\",\n required: question.isMandatory,\n maxLength: question.textLimitCharacter\n ? parseInt(question.textLimitCharacter.toString(), 10)\n : undefined,\n inputType: question.textInputType,\n };\n break;\n case \"tabular-drop-down\": {\n const dropdownOptions = (question.optionsEN ?? question.options ?? []).map((option) => ({\n id: option,\n text: option,\n }));\n inputConfig = {\n type: \"dropdown\",\n options: dropdownOptions,\n required: question.isMandatory,\n };\n break;\n }\n case \"tabular-check-box\":\n inputConfig = {\n type: \"checkbox\",\n checkboxLabel: \"Yes\",\n required: question.isMandatory,\n };\n break;\n default:\n inputConfig = { type: \"text\", required: question.isMandatory };\n }\n return { columns, rows, inputConfig };\n };\n\n const getTabularValue = (): TabularInputValue[] => {\n if (!value || typeof value !== \"object\") return [];\n if (Array.isArray(value)) {\n return value.map((item: { rowId: string; rowAnswer?: string | boolean }) => ({\n rowId: item.rowId,\n value: (item.rowAnswer as string | boolean) ?? \"\",\n }));\n }\n const tableValue = value as Record<string, unknown>;\n return Object.entries(tableValue).map(([rowId, rowValue]) => ({\n rowId,\n value: rowValue as string | boolean,\n }));\n };\n\n const handleTabularChange = (rowId: string, rowValue: string | boolean) => {\n const currentValue = (value as Record<string, unknown>) || {};\n onChange({ ...currentValue, [rowId]: rowValue });\n };\n\n switch (question.type) {\n case \"single-select\":\n return (\n <div className={className}>\n <MCQSelect\n options={getMCQOptions()}\n selectedOptions={String(value ?? \"\")}\n onOptionSelect={(selected) => onChange(selected)}\n selectionMode=\"single\"\n disabled={disabled}\n />\n {touched && <ErrorMessage error={error} />}\n </div>\n );\n\n case \"multi-select\":\n return (\n <div className={className}>\n <MCQSelect\n options={getMCQOptions()}\n selectedOptions={Array.isArray(value) ? value.map(String) : []}\n onOptionSelect={(selected) => onChange(selected)}\n selectionMode=\"multiple\"\n disabled={disabled}\n />\n {touched && <ErrorMessage error={error} />}\n </div>\n );\n\n case \"dropdown\":\n case \"drop-down\":\n return (\n <div className={className}>\n <Dropdown\n options={getDropdownOptions()}\n value={String(value ?? \"\")}\n onChange={(v) => onChange(v)}\n placeholder=\"Select an option\"\n disabled={disabled}\n error={touched ? error : undefined}\n required={question.isMandatory}\n />\n </div>\n );\n\n case \"text-response\":\n return (\n <div className={className}>\n <TextResponse\n value={String(value ?? \"\")}\n onChange={(v) => onChange(v)}\n characterLimit={question.textLimitCharacter ?? undefined}\n placeholder=\"Enter your response...\"\n disabled={disabled}\n />\n {touched && <ErrorMessage error={error} />}\n </div>\n );\n\n case \"calendar\":\n return (\n <div className={className}>\n <DatePicker\n selectedDate={value instanceof Date ? value : undefined}\n onDateSelect={(date) => onChange(date ?? null)}\n disabled={disabled}\n placeholder=\"Select a date\"\n />\n {touched && <ErrorMessage error={error} />}\n </div>\n );\n\n case \"image-response\":\n case \"video-response\":\n case \"voice-response\":\n case \"document-response\":\n case \"pdf-response\": {\n const fileValue = isValueFileObject(value) ? value : null;\n return (\n <div className={className}>\n <MediaResponse\n questionType={question.type}\n question={question}\n value={fileValue}\n onChange={(v) => onChange(v)}\n error={touched ? error : undefined}\n disabled={disabled}\n mediaConfig={mediaConfig}\n />\n </div>\n );\n }\n\n case \"tabular-text-input\":\n case \"tabular-drop-down\":\n case \"tabular-check-box\": {\n const tabularConfig = getTabularConfig();\n if (!tabularConfig) {\n return (\n <div className={`text-error ${className}`}>\n Invalid tabular question configuration\n </div>\n );\n }\n return (\n <div className={className}>\n <TabularInput\n columns={tabularConfig.columns}\n rows={tabularConfig.rows}\n inputConfig={tabularConfig.inputConfig}\n values={getTabularValue()}\n onValueChange={handleTabularChange}\n />\n {touched && <ErrorMessage error={error} />}\n </div>\n );\n }\n\n default:\n return (\n <div className={`text-error ${className}`}>\n <p>Unsupported question type: {question.type}</p>\n <p className=\"mt-1 text-sm text-textGray\">Question: {question.description}</p>\n </div>\n );\n }\n}\n","import type { SurveyQuestion } from \"../types/survey.types\";\nimport { isSupportedQuestionType } from \"../types/survey.types\";\nimport type { EffectiveMediaConfig } from \"../utils/fileUtils\";\nimport QuestionMapper from \"./QuestionMapper\";\n\nexport interface QuestionRendererProps {\n question: SurveyQuestion;\n value: unknown;\n onChange: (value: unknown) => void;\n disabled?: boolean;\n error?: string;\n validationErrors?: Array<{ questionId: string; message: string }>;\n mediaConfig?: EffectiveMediaConfig | null;\n className?: string;\n}\n\nexport function QuestionRenderer({\n question,\n value,\n onChange,\n disabled = false,\n error,\n validationErrors = [],\n mediaConfig,\n className = \"\",\n}: QuestionRendererProps) {\n const questionErrors = validationErrors.filter((e) => e.questionId === question.questionId);\n const displayError = error ?? questionErrors.map((e) => e.message).join(\"; \");\n\n if (!isSupportedQuestionType(question.type)) {\n return (\n <div className={className}>\n <p className=\"text-error\">Unsupported question type: {question.type}</p>\n </div>\n );\n }\n\n return (\n <QuestionMapper\n question={question}\n value={value}\n onChange={onChange}\n error={displayError}\n touched={true}\n disabled={disabled}\n mediaConfig={mediaConfig}\n className={className}\n />\n );\n}\n","/**\n * Theme-based status styles for question indicators.\n * Uses CSS variables (--primary-600, --error-200, etc.) so themes control colors.\n * Apply theme via data-theme on a parent element (e.g. data-theme=\"emerald\").\n */\n\nexport type QuestionStatus = \"completed\" | \"unanswered\" | \"required\" | \"error\";\n\n/** Border and background classes for carousel question status indicators. */\nfunction getStatusClass(status: QuestionStatus | undefined): string {\n switch (status) {\n case \"completed\":\n return \"border-[var(--primary-200)] bg-[var(--primary-50)]\";\n case \"error\":\n return \"border-[var(--error-200)] bg-[var(--error-50)]\";\n // case \"required\":\n // return \"border-[var(--warning-200)] bg-[var(--warning-50)]\";\n default:\n return \"border-[var(--neutral-200)] bg-[var(--neutral-50)]\";\n }\n}\n\n/** Border and background classes for overview panel question cards. */\nfunction getStatusColor(status: string): string {\n switch (status) {\n case \"completed\":\n return \"border-[var(--primary-200)] bg-[var(--primary-50)]\";\n case \"error\":\n return \"border-[var(--error-200)] bg-[var(--error-50)]\";\n case \"required\":\n return \"border-[var(--warning-200)] bg-[var(--warning-50)]\";\n default:\n return \"border-[var(--neutral-200)] bg-[var(--neutral-50)]\";\n }\n}\n\n/** Icon/text color class by status (used in overview panel icons). */\nfunction getStatusIconClass(status: string): string {\n switch (status) {\n case \"completed\":\n return \"text-[var(--primary-600)]\";\n case \"error\":\n return \"text-[var(--error-600)]\";\n case \"required\":\n return \"text-[var(--warning-600)]\";\n default:\n return \"text-[var(--neutral-500)]\";\n }\n}\n\nexport { getStatusClass, getStatusColor, getStatusIconClass };\n","import { useRef, useEffect, useCallback } from \"react\";\nimport { getStatusClass } from \"../utils/themeStatusStyles\";\n\nexport type QuestionStatus = \"completed\" | \"unanswered\" | \"required\" | \"error\";\n\nexport interface QuestionListCarouselProps {\n /** Ordered list of visible question IDs (e.g. Q1, Q2, Q6.1) */\n questions: string[];\n /** Currently active question ID (controlled by parent) */\n activeQuestionId: string | undefined;\n /** Called when user selects a question (click card or arrow) */\n onQuestionSelect: (questionId: string) => void;\n /** Optional map of questionId -> status for styling */\n questionStatusMap?: Record<string, QuestionStatus>;\n className?: string;\n}\n\nexport function QuestionListCarousel({\n questions,\n activeQuestionId,\n onQuestionSelect,\n questionStatusMap = {},\n className = \"\",\n}: QuestionListCarouselProps) {\n const scrollRef = useRef<HTMLDivElement>(null);\n const itemRefs = useRef<(HTMLButtonElement | null)[]>([]);\n\n const activeIndex =\n activeQuestionId != null ? questions.indexOf(activeQuestionId) : -1;\n const hasMultiple = questions.length > 1;\n\n // Scroll active item into view when activeQuestionId changes (e.g. Previous/Next in container)\n useEffect(() => {\n if (activeIndex < 0 || activeIndex >= itemRefs.current.length) return;\n const el = itemRefs.current[activeIndex];\n el?.scrollIntoView({\n behavior: \"smooth\",\n inline: \"center\",\n block: \"nearest\",\n });\n }, [activeIndex, activeQuestionId]);\n\n const handleLeft = useCallback(() => {\n if (activeIndex <= 0) return;\n const prevId = questions[activeIndex - 1];\n if (prevId) onQuestionSelect(prevId);\n }, [activeIndex, questions, onQuestionSelect]);\n\n const handleRight = useCallback(() => {\n if (activeIndex >= questions.length - 1 || activeIndex < 0) return;\n const nextId = questions[activeIndex + 1];\n if (nextId) onQuestionSelect(nextId);\n }, [activeIndex, questions, onQuestionSelect]);\n\n if (questions.length === 0) return null;\n\n return (\n <div\n className={`flex items-center gap-2 overflow-hidden ${className}`.trim()}\n role=\"navigation\"\n aria-label=\"Question navigation\"\n >\n {hasMultiple && (\n <button\n type=\"button\"\n onClick={handleLeft}\n disabled={activeIndex <= 0}\n aria-label=\"Previous question\"\n className=\"flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-md border border-[var(--neutral-200)] bg-[var(--color-card)] text-[var(--color-foreground)] transition-colors hover:bg-[var(--neutral-100)] disabled:cursor-not-allowed disabled:opacity-50\"\n >\n <svg className=\"h-5 w-5\" fill=\"currentColor\" viewBox=\"0 0 20 20\">\n <path\n fillRule=\"evenodd\"\n d=\"M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z\"\n clipRule=\"evenodd\"\n />\n </svg>\n </button>\n )}\n\n <div\n ref={scrollRef}\n className=\"flex flex-1 gap-2 overflow-x-auto scroll-smooth whitespace-nowrap no-scrollbar py-1\"\n style={{ minHeight: 0 }}\n >\n {questions.map((questionId, index) => {\n const isActive = questionId === activeQuestionId;\n const status = questionStatusMap[questionId];\n const statusClass = getStatusClass(status);\n return (\n <button\n key={questionId}\n ref={(el) => {\n itemRefs.current[index] = el;\n }}\n type=\"button\"\n onClick={() => onQuestionSelect(questionId)}\n className={`min-w-[60px] flex-shrink-0 rounded-full border px-4 py-2 text-center text-sm transition-all cursor-pointer ${\n isActive\n ? \"border-[var(--primary-600)] ring-2 ring-[var(--primary-200)] bg-[var(--primary-50)] text-[var(--primary-600)]\"\n : `${statusClass} text-[var(--color-textBlack)] hover:border-[var(--primary-200)]`\n }`}\n aria-current={isActive ? \"step\" : undefined}\n aria-label={`Question ${questionId}`}\n >\n {questionId}\n </button>\n );\n })}\n </div>\n\n {hasMultiple && (\n <button\n type=\"button\"\n onClick={handleRight}\n disabled={activeIndex >= questions.length - 1}\n aria-label=\"Next question\"\n className=\"flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-md border border-[var(--neutral-200)] bg-[var(--color-card)] text-[var(--color-foreground)] transition-colors hover:bg-[var(--neutral-100)] disabled:cursor-not-allowed disabled:opacity-50\"\n >\n <svg className=\"h-5 w-5\" fill=\"currentColor\" viewBox=\"0 0 20 20\">\n <path\n fillRule=\"evenodd\"\n d=\"M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z\"\n clipRule=\"evenodd\"\n />\n </svg>\n </button>\n )}\n </div>\n );\n}\n","import type { SurveyQuestion } from \"../types/survey.types\";\nimport { getStatusColor, getStatusIconClass } from \"../utils/themeStatusStyles\";\nimport { isQuestionAnswered, isQuestionValid } from \"../utils/responseHelpers\";\n\nexport interface QuestionOverviewPanelProps {\n isOpen: boolean;\n onClose: () => void;\n questions: SurveyQuestion[];\n visibleQuestionIds: string[];\n responses: Record<string, unknown>;\n currentQuestionIndex: number;\n onGoToQuestion: (index: number) => void;\n readOnly?: boolean;\n}\n\nfunction getStatusIcon(status: string) {\n const iconClass = getStatusIconClass(status);\n switch (status) {\n case \"completed\":\n return (\n <svg\n className={`h-5 w-5 ${iconClass}`}\n fill=\"currentColor\"\n viewBox=\"0 0 20 20\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z\"\n clipRule=\"evenodd\"\n />\n </svg>\n );\n case \"error\":\n return (\n <svg\n className={`h-5 w-5 ${iconClass}`}\n fill=\"currentColor\"\n viewBox=\"0 0 20 20\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z\"\n clipRule=\"evenodd\"\n />\n </svg>\n );\n case \"required\":\n return (\n <svg\n className={`h-5 w-5 ${iconClass}`}\n fill=\"currentColor\"\n viewBox=\"0 0 20 20\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z\"\n clipRule=\"evenodd\"\n />\n </svg>\n );\n default:\n return (\n <div className=\"h-5 w-5 rounded-full border-2 border-[var(--neutral-200)]\" />\n );\n }\n}\n\nexport function QuestionOverviewPanel({\n isOpen,\n onClose,\n questions,\n visibleQuestionIds,\n responses,\n currentQuestionIndex,\n onGoToQuestion,\n readOnly = false,\n}: QuestionOverviewPanelProps) {\n const getQuestionStatus = (questionId: string): \"completed\" | \"unanswered\" | \"required\" | \"error\" => {\n if (readOnly) return \"completed\";\n\n const value = responses[questionId];\n const question = questions.find((q) => q.questionId === questionId);\n if (!question) return \"unanswered\";\n\n const isAnswered = isQuestionAnswered(question, value);\n const isValid = isQuestionValid(question, value);\n\n if (isAnswered && isValid) return \"completed\";\n if (isAnswered && !isValid) return \"error\";\n if (!isAnswered && question.isMandatory) return \"required\";\n return \"unanswered\";\n };\n\n if (!isOpen) return null;\n\n return (\n <>\n {/* Backdrop */}\n <div\n role=\"presentation\"\n onClick={onClose}\n className=\"fixed inset-0 z-50 bg-black/50\"\n />\n\n {/* Panel */}\n <div className=\"fixed top-0 right-0 z-50 h-full w-full max-w-md overflow-hidden bg-[var(--neutral-50)] shadow-2xl\">\n <div className=\"flex h-full flex-col\">\n {/* Header */}\n <div className=\"border-b border-[var(--neutral-200)] p-6\">\n <div className=\"flex items-center justify-between\">\n <h2 className=\"text-xl font-semibold text-textBlack\">\n Question Overview\n </h2>\n <button\n type=\"button\"\n onClick={onClose}\n className=\"rounded-lg p-2 text-[var(--color-foreground)] transition-colors hover:bg-[var(--neutral-100)]\"\n aria-label=\"Close\"\n >\n <svg\n className=\"h-5 w-5\"\n fill=\"none\"\n stroke=\"currentColor\"\n viewBox=\"0 0 24 24\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M6 18L18 6M6 6l12 12\"\n />\n </svg>\n </button>\n </div>\n </div>\n\n {/* Question Grid */}\n <div className=\"flex-1 overflow-y-auto p-6\">\n <div className=\"space-y-3\">\n {visibleQuestionIds.map((questionId, index) => {\n const question = questions.find((q) => q.questionId === questionId);\n if (!question) return null;\n\n const status = getQuestionStatus(questionId);\n const isCurrent = index === currentQuestionIndex;\n\n return (\n <button\n key={questionId}\n type=\"button\"\n onClick={() => onGoToQuestion(index)}\n className={`w-full rounded-lg border-2 p-4 text-left transition-all duration-200 ${\n isCurrent\n ? \"border-[var(--primary-600)] bg-[var(--primary-50)] shadow-md\"\n : `${getStatusColor(status)} hover:shadow-md`\n }`}\n >\n <div className=\"flex items-start gap-3\">\n <div className=\"mt-0.5 flex-shrink-0\">\n {getStatusIcon(status)}\n </div>\n <div className=\"min-w-0 flex-1\">\n <div className=\"mb-1 flex items-center gap-2\">\n <span className=\"text-sm font-medium text-[var(--primary-600)]\">\n {question.questionId}\n </span>\n {question.isMandatory && (\n <span className=\"text-xs text-error\">*</span>\n )}\n {isCurrent && (\n <span className=\"text-xs font-medium text-[var(--primary-600)]\">\n Current\n </span>\n )}\n </div>\n <p className=\"truncate text-sm font-medium text-textBlack\">\n {question.description}\n </p>\n </div>\n <div className=\"flex-shrink-0 text-xs text-textGray\">\n {index + 1}\n </div>\n </div>\n </button>\n );\n })}\n </div>\n </div>\n\n {/* Footer */}\n <div className=\"border-t border-[var(--neutral-200)] bg-[var(--neutral-50)] p-6\">\n <div className=\"flex items-center justify-between text-sm\">\n <div className=\"flex items-center gap-4\">\n <div className=\"flex items-center gap-1\">\n <div className=\"h-3 w-3 rounded-full bg-[var(--primary-600)]\" />\n <span className=\"text-textGray\">Completed</span>\n </div>\n <div className=\"flex items-center gap-1\">\n <div className=\"h-3 w-3 rounded-full bg-[var(--warning-600)]\" />\n <span className=\"text-textGray\">Required</span>\n </div>\n <div className=\"flex items-center gap-1\">\n <div className=\"h-3 w-3 rounded-full bg-[var(--error-600)]\" />\n <span className=\"text-textGray\">Error</span>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </>\n );\n}\n","// 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\";\nvar REACT_LAZY_TYPE = Symbol.for(\"react.lazy\");\nvar use = React[\" use \".trim().toString()];\nfunction isPromiseLike(value) {\n return typeof value === \"object\" && value !== null && \"then\" in value;\n}\nfunction isLazyComponent(element) {\n return element != null && typeof element === \"object\" && \"$$typeof\" in element && element.$$typeof === REACT_LAZY_TYPE && \"_payload\" in element && isPromiseLike(element._payload);\n}\n// @__NO_SIDE_EFFECTS__\nfunction createSlot(ownerName) {\n const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);\n const Slot2 = React.forwardRef((props, forwardedRef) => {\n let { children, ...slotProps } = props;\n if (isLazyComponent(children) && typeof use === \"function\") {\n children = use(children._payload);\n }\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 let { children, ...slotProps } = props;\n if (isLazyComponent(children) && typeof use === \"function\") {\n children = use(children._payload);\n }\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","import { cva } from \"class-variance-authority\";\n\nexport const buttonVariants = cva(\n \"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-[14px] text-[14px] leading-[20px] font-medium transition-all disabled:pointer-events-none disabled:opacity-50 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 aria-invalid:border-destructive hover:opacity-90\",\n {\n variants: {\n variant: {\n default:\n \"bg-[var(--primary-600)] text-[var(--primary-foreground)] shadow-xs hover:bg-[var(--primary-700)]\",\n destructive:\n \"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60\",\n outline:\n \"border border-[var(--primary-200)] bg-transparent text-[var(--color-foreground)] shadow-xs hover:bg-[var(--primary-100)] hover:text-[var(--primary-700)]\",\n secondary:\n \"bg-[var(--primary-100)] text-[var(--primary-700)] border border-[var(--primary-200)] shadow-xs hover:bg-[var(--primary-200)]\",\n ghost:\n \"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n size: {\n default: \"px-3 py-3\",\n sm: \"px-3 py-2\",\n lg: \"px-4 py-4\",\n icon: \"size-9\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n);\n","import * as React from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { type VariantProps } from \"class-variance-authority\";\nimport { cn } from \"../../lib/utils\";\nimport { buttonVariants } from \"./button-variants\";\n\nconst getBgColorClass = (color: string) => {\n switch (color) {\n case \"primary\":\n return \"bg-primary\";\n case \"secondary\":\n return \"bg-secondary\";\n case \"destructive\":\n return \"bg-destructive\";\n case \"muted\":\n return \"bg-muted\";\n case \"error\":\n return \"bg-red-500\";\n case \"success\":\n return \"bg-green-500\";\n case \"warning\":\n return \"bg-yellow-500\";\n case \"white\":\n return \"bg-white\";\n case \"gray\":\n return \"bg-gray-500\";\n case \"lightGray\":\n return \"bg-[#E5E7EB]\";\n case \"borderGray\":\n return \"bg-borderGray\";\n default:\n return `bg-[${color}]`;\n }\n};\n\nconst getTextColorClass = (color: string) => {\n switch (color) {\n case \"white\":\n return \"text-white\";\n case \"black\":\n return \"text-black\";\n case \"primary\":\n return \"text-primary\";\n case \"primary-foreground\":\n return \"text-primary-foreground\";\n case \"secondary\":\n return \"text-secondary\";\n case \"muted\":\n return \"text-muted-foreground\";\n default:\n return `text-[${color}]`;\n }\n};\n\ninterface ButtonProps\n extends React.ComponentProps<\"button\">,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean;\n bgColor?: string;\n textColor?: string;\n text?: string;\n prefixIcon?: React.ReactNode;\n suffixIcon?: React.ReactNode;\n}\n\nfunction Button({\n className,\n variant,\n size,\n asChild = false,\n bgColor,\n textColor,\n text,\n prefixIcon,\n suffixIcon,\n children,\n ...props\n}: ButtonProps) {\n const Comp = asChild ? Slot : \"button\";\n const customColorClasses = [\n bgColor && getBgColorClass(bgColor),\n textColor && getTextColorClass(textColor),\n ]\n .filter(Boolean)\n .join(\" \");\n const baseClasses = customColorClasses\n ? cn(\n \"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-[14px] text-[14px] leading-[20px] font-medium transition-all disabled:pointer-events-none disabled:opacity-50 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] hover:opacity-90 cursor-pointer\",\n size === \"sm\" && \"px-3 py-2\",\n size === \"lg\" && \"px-4 py-4\",\n size === \"icon\" && \"size-9\",\n (!size || size === \"default\") && \"px-3 py-3\",\n customColorClasses,\n className\n )\n : cn(buttonVariants({ variant, size, className }));\n\n if (text || prefixIcon || suffixIcon) {\n return (\n <Comp data-slot=\"button\" className={baseClasses} {...props}>\n {prefixIcon && (\n <span className=\"flex h-4 w-4 items-center justify-center\">\n {prefixIcon}\n </span>\n )}\n {text && <span className=\"flex-1 text-center\">{text}</span>}\n {suffixIcon && (\n <span className=\"flex h-4 w-4 items-center justify-center\">\n {suffixIcon}\n </span>\n )}\n {children}\n </Comp>\n );\n }\n return (\n <Comp data-slot=\"button\" className={baseClasses} {...props}>\n {children}\n </Comp>\n );\n}\n\nexport { Button };\n","// src/create-context.tsx\nimport * as React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nfunction createContext2(rootComponentName, defaultContext) {\n const Context = React.createContext(defaultContext);\n Context.displayName = rootComponentName + \"Context\";\n const Provider = (props) => {\n const { children, ...context } = props;\n const value = React.useMemo(() => context, Object.values(context));\n return /* @__PURE__ */ jsx(Context.Provider, { value, children });\n };\n Provider.displayName = rootComponentName + \"Provider\";\n function useContext2(consumerName) {\n const context = React.useContext(Context);\n if (context) return context;\n if (defaultContext !== void 0) return defaultContext;\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n return [Provider, useContext2];\n}\nfunction createContextScope(scopeName, createContextScopeDeps = []) {\n let defaultContexts = [];\n function createContext3(rootComponentName, defaultContext) {\n const BaseContext = React.createContext(defaultContext);\n BaseContext.displayName = rootComponentName + \"Context\";\n const index = defaultContexts.length;\n defaultContexts = [...defaultContexts, defaultContext];\n const Provider = (props) => {\n const { scope, children, ...context } = props;\n const Context = scope?.[scopeName]?.[index] || BaseContext;\n const value = React.useMemo(() => context, Object.values(context));\n return /* @__PURE__ */ jsx(Context.Provider, { value, children });\n };\n Provider.displayName = rootComponentName + \"Provider\";\n function useContext2(consumerName, scope) {\n const Context = scope?.[scopeName]?.[index] || BaseContext;\n const context = React.useContext(Context);\n if (context) return context;\n if (defaultContext !== void 0) return defaultContext;\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n return [Provider, useContext2];\n }\n const createScope = () => {\n const scopeContexts = defaultContexts.map((defaultContext) => {\n return React.createContext(defaultContext);\n });\n return function useScope(scope) {\n const contexts = scope?.[scopeName] || scopeContexts;\n return React.useMemo(\n () => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),\n [scope, contexts]\n );\n };\n };\n createScope.scopeName = scopeName;\n return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];\n}\nfunction composeContextScopes(...scopes) {\n const baseScope = scopes[0];\n if (scopes.length === 1) return baseScope;\n const createScope = () => {\n const scopeHooks = scopes.map((createScope2) => ({\n useScope: createScope2(),\n scopeName: createScope2.scopeName\n }));\n return function useComposedScopes(overrideScopes) {\n const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {\n const scopeProps = useScope(overrideScopes);\n const currentScope = scopeProps[`__scope${scopeName}`];\n return { ...nextScopes2, ...currentScope };\n }, {});\n return React.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);\n };\n };\n createScope.scopeName = baseScope.scopeName;\n return createScope;\n}\nexport {\n createContext2 as createContext,\n createContextScope\n};\n//# sourceMappingURL=index.mjs.map\n","// src/primitive.tsx\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NODES = [\n \"a\",\n \"button\",\n \"div\",\n \"form\",\n \"h2\",\n \"h3\",\n \"img\",\n \"input\",\n \"label\",\n \"li\",\n \"nav\",\n \"ol\",\n \"p\",\n \"select\",\n \"span\",\n \"svg\",\n \"ul\"\n];\nvar Primitive = NODES.reduce((primitive, node) => {\n const Slot = createSlot(`Primitive.${node}`);\n const Node = React.forwardRef((props, forwardedRef) => {\n const { asChild, ...primitiveProps } = props;\n const Comp = asChild ? Slot : node;\n if (typeof window !== \"undefined\") {\n window[Symbol.for(\"radix-ui\")] = true;\n }\n return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });\n });\n Node.displayName = `Primitive.${node}`;\n return { ...primitive, [node]: Node };\n}, {});\nfunction dispatchDiscreteCustomEvent(target, event) {\n if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));\n}\nvar Root = Primitive;\nexport {\n Primitive,\n Root,\n dispatchDiscreteCustomEvent\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/progress.tsx\nimport * as React from \"react\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { jsx } from \"react/jsx-runtime\";\nvar PROGRESS_NAME = \"Progress\";\nvar DEFAULT_MAX = 100;\nvar [createProgressContext, createProgressScope] = createContextScope(PROGRESS_NAME);\nvar [ProgressProvider, useProgressContext] = createProgressContext(PROGRESS_NAME);\nvar Progress = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeProgress,\n value: valueProp = null,\n max: maxProp,\n getValueLabel = defaultGetValueLabel,\n ...progressProps\n } = props;\n if ((maxProp || maxProp === 0) && !isValidMaxNumber(maxProp)) {\n console.error(getInvalidMaxError(`${maxProp}`, \"Progress\"));\n }\n const max = isValidMaxNumber(maxProp) ? maxProp : DEFAULT_MAX;\n if (valueProp !== null && !isValidValueNumber(valueProp, max)) {\n console.error(getInvalidValueError(`${valueProp}`, \"Progress\"));\n }\n const value = isValidValueNumber(valueProp, max) ? valueProp : null;\n const valueLabel = isNumber(value) ? getValueLabel(value, max) : void 0;\n return /* @__PURE__ */ jsx(ProgressProvider, { scope: __scopeProgress, value, max, children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"aria-valuemax\": max,\n \"aria-valuemin\": 0,\n \"aria-valuenow\": isNumber(value) ? value : void 0,\n \"aria-valuetext\": valueLabel,\n role: \"progressbar\",\n \"data-state\": getProgressState(value, max),\n \"data-value\": value ?? void 0,\n \"data-max\": max,\n ...progressProps,\n ref: forwardedRef\n }\n ) });\n }\n);\nProgress.displayName = PROGRESS_NAME;\nvar INDICATOR_NAME = \"ProgressIndicator\";\nvar ProgressIndicator = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeProgress, ...indicatorProps } = props;\n const context = useProgressContext(INDICATOR_NAME, __scopeProgress);\n return /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-state\": getProgressState(context.value, context.max),\n \"data-value\": context.value ?? void 0,\n \"data-max\": context.max,\n ...indicatorProps,\n ref: forwardedRef\n }\n );\n }\n);\nProgressIndicator.displayName = INDICATOR_NAME;\nfunction defaultGetValueLabel(value, max) {\n return `${Math.round(value / max * 100)}%`;\n}\nfunction getProgressState(value, maxValue) {\n return value == null ? \"indeterminate\" : value === maxValue ? \"complete\" : \"loading\";\n}\nfunction isNumber(value) {\n return typeof value === \"number\";\n}\nfunction isValidMaxNumber(max) {\n return isNumber(max) && !isNaN(max) && max > 0;\n}\nfunction isValidValueNumber(value, max) {\n return isNumber(value) && !isNaN(value) && value <= max && value >= 0;\n}\nfunction getInvalidMaxError(propValue, componentName) {\n return `Invalid prop \\`max\\` of value \\`${propValue}\\` supplied to \\`${componentName}\\`. Only numbers greater than 0 are valid max values. Defaulting to \\`${DEFAULT_MAX}\\`.`;\n}\nfunction getInvalidValueError(propValue, componentName) {\n return `Invalid prop \\`value\\` of value \\`${propValue}\\` supplied to \\`${componentName}\\`. The \\`value\\` prop must be:\n - a positive number\n - less than the value passed to \\`max\\` (or ${DEFAULT_MAX} if no \\`max\\` prop is set)\n - \\`null\\` or \\`undefined\\` if the progress is indeterminate.\n\nDefaulting to \\`null\\`.`;\n}\nvar Root = Progress;\nvar Indicator = ProgressIndicator;\nexport {\n Indicator,\n Progress,\n ProgressIndicator,\n Root,\n createProgressScope\n};\n//# sourceMappingURL=index.mjs.map\n","import * as React from \"react\";\nimport * as ProgressPrimitive from \"@radix-ui/react-progress\";\nimport { cn } from \"../../lib/utils\";\n\nfunction Progress({\n className,\n value,\n ...props\n}: React.ComponentProps<typeof ProgressPrimitive.Root>) {\n return (\n <ProgressPrimitive.Root\n data-slot=\"progress\"\n className={cn(\n \"relative h-2 w-full overflow-hidden rounded-full bg-[var(--primary-200)]/50\",\n className\n )}\n {...props}\n >\n <ProgressPrimitive.Indicator\n data-slot=\"progress-indicator\"\n className=\"h-full w-full flex-1 bg-[var(--primary-600)] transition-all duration-300 ease-out\"\n style={{ transform: `translateX(-${100 - (value || 0)}%)` }}\n />\n </ProgressPrimitive.Root>\n );\n}\n\nexport { Progress };\n","import { Progress } from \"./ui/progress\";\nimport { cn } from \"../lib/utils\";\n\nexport type ProgressMode = \"position\" | \"completion\";\nexport type ProgressBarVariant = \"default\" | \"gradient\";\n\nexport interface SurveyProgressBarProps {\n /** Current step index (0-based). */\n currentIndex: number;\n /** Total number of steps. */\n totalSteps: number;\n /** \"position\" = progress by step index. \"completion\" = progress by answered mandatory (FMB logic). Default: \"completion\" */\n progressMode?: ProgressMode;\n /** Progress value 0-100. Used when progressMode is \"completion\". */\n progressValue?: number;\n /** Show \"Question X of Y\" label. Default: true */\n showLabel?: boolean;\n /** Show percentage. Default: true */\n showPercentage?: boolean;\n /** Custom label format. Use {current} and {total} placeholders. Default: \"Question {current} of {total}\" */\n labelFormat?: string;\n /** Max width of the progress bar + percentage (e.g. \"240px\"). Default: \"240px\" */\n progressMaxWidth?: string;\n /** \"default\" = Radix Progress. \"gradient\" = FMB-style gradient bar. Default: \"default\" */\n variant?: ProgressBarVariant;\n /** Additional class name for the container. */\n className?: string;\n}\n\nconst defaultLabelFormat = \"Question {current} of {total}\";\n\nexport function SurveyProgressBar({\n currentIndex,\n totalSteps,\n progressMode = \"completion\",\n progressValue,\n showLabel = true,\n showPercentage = true,\n labelFormat = defaultLabelFormat,\n progressMaxWidth = \"100%\",\n variant = \"default\",\n className,\n}: SurveyProgressBarProps) {\n const current = currentIndex + 1;\n const progress =\n progressMode === \"completion\" && progressValue != null\n ? Math.min(100, Math.max(0, progressValue))\n : totalSteps > 0\n ? (current / totalSteps) * 100\n : 0;\n const label = labelFormat\n .replace(\"{current}\", String(current))\n .replace(\"{total}\", String(totalSteps));\n\n return (\n <div\n className={cn(\"flex items-center justify-between gap-4\", className)}\n role=\"progressbar\"\n aria-valuenow={current}\n aria-valuemin={1}\n aria-valuemax={totalSteps}\n aria-label={label}\n >\n {showLabel && (\n <span className=\"text-sm font-medium text-[var(--color-textGray)]\">\n {label}\n </span>\n )}\n <div\n className=\"flex min-w-0 flex-1 items-center gap-3\"\n style={{ maxWidth: progressMaxWidth }}\n >\n {variant === \"gradient\" ? (\n <div className=\"relative h-2 flex-1 min-w-0 overflow-hidden rounded-full bg-[var(--primary-200)]/50\">\n <div\n className=\"h-2 rounded-full bg-gradient-to-r from-[var(--primary-600)] to-[var(--primary-700)] transition-all duration-300 ease-out\"\n style={{ width: `${progress}%` }}\n />\n </div>\n ) : (\n <Progress value={progress} className=\"flex-1 min-w-0\" />\n )}\n {showPercentage && (\n <span className=\"text-sm font-medium text-[var(--color-textGray)] shrink-0\">\n {Math.round(progress)}%\n </span>\n )}\n </div>\n </div>\n );\n}\n","// src/primitive.tsx\nvar canUseDOM = !!(typeof window !== \"undefined\" && window.document && window.document.createElement);\nfunction composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {\n return function handleEvent(event) {\n originalEventHandler?.(event);\n if (checkForDefaultPrevented === false || !event.defaultPrevented) {\n return ourEventHandler?.(event);\n }\n };\n}\nfunction getOwnerWindow(element) {\n if (!canUseDOM) {\n throw new Error(\"Cannot access window outside of the DOM\");\n }\n return element?.ownerDocument?.defaultView ?? window;\n}\nfunction getOwnerDocument(element) {\n if (!canUseDOM) {\n throw new Error(\"Cannot access document outside of the DOM\");\n }\n return element?.ownerDocument ?? document;\n}\nfunction getActiveElement(node, activeDescendant = false) {\n const { activeElement } = getOwnerDocument(node);\n if (!activeElement?.nodeName) {\n return null;\n }\n if (isFrame(activeElement) && activeElement.contentDocument) {\n return getActiveElement(activeElement.contentDocument.body, activeDescendant);\n }\n if (activeDescendant) {\n const id = activeElement.getAttribute(\"aria-activedescendant\");\n if (id) {\n const element = getOwnerDocument(activeElement).getElementById(id);\n if (element) {\n return element;\n }\n }\n }\n return activeElement;\n}\nfunction isFrame(element) {\n return element.tagName === \"IFRAME\";\n}\nexport {\n canUseDOM,\n composeEventHandlers,\n getActiveElement,\n getOwnerDocument,\n getOwnerWindow,\n isFrame\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/context/src/create-context.tsx\nimport * as React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nfunction createContext2(rootComponentName, defaultContext) {\n const Context = React.createContext(defaultContext);\n const Provider = (props) => {\n const { children, ...context } = props;\n const value = React.useMemo(() => context, Object.values(context));\n return /* @__PURE__ */ jsx(Context.Provider, { value, children });\n };\n Provider.displayName = rootComponentName + \"Provider\";\n function useContext2(consumerName) {\n const context = React.useContext(Context);\n if (context) return context;\n if (defaultContext !== void 0) return defaultContext;\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n return [Provider, useContext2];\n}\nfunction createContextScope(scopeName, createContextScopeDeps = []) {\n let defaultContexts = [];\n function createContext3(rootComponentName, defaultContext) {\n const BaseContext = React.createContext(defaultContext);\n const index = defaultContexts.length;\n defaultContexts = [...defaultContexts, defaultContext];\n const Provider = (props) => {\n const { scope, children, ...context } = props;\n const Context = scope?.[scopeName]?.[index] || BaseContext;\n const value = React.useMemo(() => context, Object.values(context));\n return /* @__PURE__ */ jsx(Context.Provider, { value, children });\n };\n Provider.displayName = rootComponentName + \"Provider\";\n function useContext2(consumerName, scope) {\n const Context = scope?.[scopeName]?.[index] || BaseContext;\n const context = React.useContext(Context);\n if (context) return context;\n if (defaultContext !== void 0) return defaultContext;\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n return [Provider, useContext2];\n }\n const createScope = () => {\n const scopeContexts = defaultContexts.map((defaultContext) => {\n return React.createContext(defaultContext);\n });\n return function useScope(scope) {\n const contexts = scope?.[scopeName] || scopeContexts;\n return React.useMemo(\n () => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),\n [scope, contexts]\n );\n };\n };\n createScope.scopeName = scopeName;\n return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];\n}\nfunction composeContextScopes(...scopes) {\n const baseScope = scopes[0];\n if (scopes.length === 1) return baseScope;\n const createScope = () => {\n const scopeHooks = scopes.map((createScope2) => ({\n useScope: createScope2(),\n scopeName: createScope2.scopeName\n }));\n return function useComposedScopes(overrideScopes) {\n const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {\n const scopeProps = useScope(overrideScopes);\n const currentScope = scopeProps[`__scope${scopeName}`];\n return { ...nextScopes2, ...currentScope };\n }, {});\n return React.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);\n };\n };\n createScope.scopeName = baseScope.scopeName;\n return createScope;\n}\nexport {\n createContext2 as createContext,\n createContextScope\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/use-layout-effect/src/use-layout-effect.tsx\nimport * as React from \"react\";\nvar useLayoutEffect2 = globalThis?.document ? React.useLayoutEffect : () => {\n};\nexport {\n useLayoutEffect2 as useLayoutEffect\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/id/src/id.tsx\nimport * as React from \"react\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nvar useReactId = React[\" useId \".trim().toString()] || (() => void 0);\nvar count = 0;\nfunction useId(deterministicId) {\n const [id, setId] = React.useState(useReactId());\n useLayoutEffect(() => {\n if (!deterministicId) setId((reactId) => reactId ?? String(count++));\n }, [deterministicId]);\n return deterministicId || (id ? `radix-${id}` : \"\");\n}\nexport {\n useId\n};\n//# sourceMappingURL=index.mjs.map\n","// src/use-controllable-state.tsx\nimport * as React from \"react\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nvar useInsertionEffect = React[\" useInsertionEffect \".trim().toString()] || useLayoutEffect;\nfunction useControllableState({\n prop,\n defaultProp,\n onChange = () => {\n },\n caller\n}) {\n const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState({\n defaultProp,\n onChange\n });\n const isControlled = prop !== void 0;\n const value = isControlled ? prop : uncontrolledProp;\n if (true) {\n const isControlledRef = React.useRef(prop !== void 0);\n React.useEffect(() => {\n const wasControlled = isControlledRef.current;\n if (wasControlled !== isControlled) {\n const from = wasControlled ? \"controlled\" : \"uncontrolled\";\n const to = isControlled ? \"controlled\" : \"uncontrolled\";\n console.warn(\n `${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`\n );\n }\n isControlledRef.current = isControlled;\n }, [isControlled, caller]);\n }\n const setValue = React.useCallback(\n (nextValue) => {\n if (isControlled) {\n const value2 = isFunction(nextValue) ? nextValue(prop) : nextValue;\n if (value2 !== prop) {\n onChangeRef.current?.(value2);\n }\n } else {\n setUncontrolledProp(nextValue);\n }\n },\n [isControlled, prop, setUncontrolledProp, onChangeRef]\n );\n return [value, setValue];\n}\nfunction useUncontrolledState({\n defaultProp,\n onChange\n}) {\n const [value, setValue] = React.useState(defaultProp);\n const prevValueRef = React.useRef(value);\n const onChangeRef = React.useRef(onChange);\n useInsertionEffect(() => {\n onChangeRef.current = onChange;\n }, [onChange]);\n React.useEffect(() => {\n if (prevValueRef.current !== value) {\n onChangeRef.current?.(value);\n prevValueRef.current = value;\n }\n }, [value, prevValueRef]);\n return [value, setValue, onChangeRef];\n}\nfunction isFunction(value) {\n return typeof value === \"function\";\n}\n\n// src/use-controllable-state-reducer.tsx\nimport * as React2 from \"react\";\nimport { useEffectEvent } from \"@radix-ui/react-use-effect-event\";\nvar SYNC_STATE = Symbol(\"RADIX:SYNC_STATE\");\nfunction useControllableStateReducer(reducer, userArgs, initialArg, init) {\n const { prop: controlledState, defaultProp, onChange: onChangeProp, caller } = userArgs;\n const isControlled = controlledState !== void 0;\n const onChange = useEffectEvent(onChangeProp);\n if (true) {\n const isControlledRef = React2.useRef(controlledState !== void 0);\n React2.useEffect(() => {\n const wasControlled = isControlledRef.current;\n if (wasControlled !== isControlled) {\n const from = wasControlled ? \"controlled\" : \"uncontrolled\";\n const to = isControlled ? \"controlled\" : \"uncontrolled\";\n console.warn(\n `${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`\n );\n }\n isControlledRef.current = isControlled;\n }, [isControlled, caller]);\n }\n const args = [{ ...initialArg, state: defaultProp }];\n if (init) {\n args.push(init);\n }\n const [internalState, dispatch] = React2.useReducer(\n (state2, action) => {\n if (action.type === SYNC_STATE) {\n return { ...state2, state: action.state };\n }\n const next = reducer(state2, action);\n if (isControlled && !Object.is(next.state, state2.state)) {\n onChange(next.state);\n }\n return next;\n },\n ...args\n );\n const uncontrolledState = internalState.state;\n const prevValueRef = React2.useRef(uncontrolledState);\n React2.useEffect(() => {\n if (prevValueRef.current !== uncontrolledState) {\n prevValueRef.current = uncontrolledState;\n if (!isControlled) {\n onChange(uncontrolledState);\n }\n }\n }, [onChange, uncontrolledState, prevValueRef, isControlled]);\n const state = React2.useMemo(() => {\n const isControlled2 = controlledState !== void 0;\n if (isControlled2) {\n return { ...internalState, state: controlledState };\n }\n return internalState;\n }, [internalState, controlledState]);\n React2.useEffect(() => {\n if (isControlled && !Object.is(controlledState, internalState.state)) {\n dispatch({ type: SYNC_STATE, state: controlledState });\n }\n }, [controlledState, internalState.state, isControlled]);\n return [state, dispatch];\n}\nexport {\n useControllableState,\n useControllableStateReducer\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","// src/primitive.tsx\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NODES = [\n \"a\",\n \"button\",\n \"div\",\n \"form\",\n \"h2\",\n \"h3\",\n \"img\",\n \"input\",\n \"label\",\n \"li\",\n \"nav\",\n \"ol\",\n \"p\",\n \"select\",\n \"span\",\n \"svg\",\n \"ul\"\n];\nvar Primitive = NODES.reduce((primitive, node) => {\n const Slot = createSlot(`Primitive.${node}`);\n const Node = React.forwardRef((props, forwardedRef) => {\n const { asChild, ...primitiveProps } = props;\n const Comp = asChild ? Slot : node;\n if (typeof window !== \"undefined\") {\n window[Symbol.for(\"radix-ui\")] = true;\n }\n return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });\n });\n Node.displayName = `Primitive.${node}`;\n return { ...primitive, [node]: Node };\n}, {});\nfunction dispatchDiscreteCustomEvent(target, event) {\n if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));\n}\nvar Root = Primitive;\nexport {\n Primitive,\n Root,\n dispatchDiscreteCustomEvent\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/use-callback-ref/src/use-callback-ref.tsx\nimport * as React from \"react\";\nfunction useCallbackRef(callback) {\n const callbackRef = React.useRef(callback);\n React.useEffect(() => {\n callbackRef.current = callback;\n });\n return React.useMemo(() => (...args) => callbackRef.current?.(...args), []);\n}\nexport {\n useCallbackRef\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/use-escape-keydown/src/use-escape-keydown.tsx\nimport * as React from \"react\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nfunction useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {\n const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);\n React.useEffect(() => {\n const handleKeyDown = (event) => {\n if (event.key === \"Escape\") {\n onEscapeKeyDown(event);\n }\n };\n ownerDocument.addEventListener(\"keydown\", handleKeyDown, { capture: true });\n return () => ownerDocument.removeEventListener(\"keydown\", handleKeyDown, { capture: true });\n }, [onEscapeKeyDown, ownerDocument]);\n}\nexport {\n useEscapeKeydown\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/dismissable-layer.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { Primitive, dispatchDiscreteCustomEvent } from \"@radix-ui/react-primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useEscapeKeydown } from \"@radix-ui/react-use-escape-keydown\";\nimport { jsx } from \"react/jsx-runtime\";\nvar DISMISSABLE_LAYER_NAME = \"DismissableLayer\";\nvar CONTEXT_UPDATE = \"dismissableLayer.update\";\nvar POINTER_DOWN_OUTSIDE = \"dismissableLayer.pointerDownOutside\";\nvar FOCUS_OUTSIDE = \"dismissableLayer.focusOutside\";\nvar originalBodyPointerEvents;\nvar DismissableLayerContext = React.createContext({\n layers: /* @__PURE__ */ new Set(),\n layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),\n branches: /* @__PURE__ */ new Set()\n});\nvar DismissableLayer = React.forwardRef(\n (props, forwardedRef) => {\n const {\n disableOutsidePointerEvents = false,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n onDismiss,\n ...layerProps\n } = props;\n const context = React.useContext(DismissableLayerContext);\n const [node, setNode] = React.useState(null);\n const ownerDocument = node?.ownerDocument ?? globalThis?.document;\n const [, force] = React.useState({});\n const composedRefs = useComposedRefs(forwardedRef, (node2) => setNode(node2));\n const layers = Array.from(context.layers);\n const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);\n const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);\n const index = node ? layers.indexOf(node) : -1;\n const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;\n const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;\n const pointerDownOutside = usePointerDownOutside((event) => {\n const target = event.target;\n const isPointerDownOnBranch = [...context.branches].some((branch) => branch.contains(target));\n if (!isPointerEventsEnabled || isPointerDownOnBranch) return;\n onPointerDownOutside?.(event);\n onInteractOutside?.(event);\n if (!event.defaultPrevented) onDismiss?.();\n }, ownerDocument);\n const focusOutside = useFocusOutside((event) => {\n const target = event.target;\n const isFocusInBranch = [...context.branches].some((branch) => branch.contains(target));\n if (isFocusInBranch) return;\n onFocusOutside?.(event);\n onInteractOutside?.(event);\n if (!event.defaultPrevented) onDismiss?.();\n }, ownerDocument);\n useEscapeKeydown((event) => {\n const isHighestLayer = index === context.layers.size - 1;\n if (!isHighestLayer) return;\n onEscapeKeyDown?.(event);\n if (!event.defaultPrevented && onDismiss) {\n event.preventDefault();\n onDismiss();\n }\n }, ownerDocument);\n React.useEffect(() => {\n if (!node) return;\n if (disableOutsidePointerEvents) {\n if (context.layersWithOutsidePointerEventsDisabled.size === 0) {\n originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;\n ownerDocument.body.style.pointerEvents = \"none\";\n }\n context.layersWithOutsidePointerEventsDisabled.add(node);\n }\n context.layers.add(node);\n dispatchUpdate();\n return () => {\n if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) {\n ownerDocument.body.style.pointerEvents = originalBodyPointerEvents;\n }\n };\n }, [node, ownerDocument, disableOutsidePointerEvents, context]);\n React.useEffect(() => {\n return () => {\n if (!node) return;\n context.layers.delete(node);\n context.layersWithOutsidePointerEventsDisabled.delete(node);\n dispatchUpdate();\n };\n }, [node, context]);\n React.useEffect(() => {\n const handleUpdate = () => force({});\n document.addEventListener(CONTEXT_UPDATE, handleUpdate);\n return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);\n }, []);\n return /* @__PURE__ */ jsx(\n Primitive.div,\n {\n ...layerProps,\n ref: composedRefs,\n style: {\n pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? \"auto\" : \"none\" : void 0,\n ...props.style\n },\n onFocusCapture: composeEventHandlers(props.onFocusCapture, focusOutside.onFocusCapture),\n onBlurCapture: composeEventHandlers(props.onBlurCapture, focusOutside.onBlurCapture),\n onPointerDownCapture: composeEventHandlers(\n props.onPointerDownCapture,\n pointerDownOutside.onPointerDownCapture\n )\n }\n );\n }\n);\nDismissableLayer.displayName = DISMISSABLE_LAYER_NAME;\nvar BRANCH_NAME = \"DismissableLayerBranch\";\nvar DismissableLayerBranch = React.forwardRef((props, forwardedRef) => {\n const context = React.useContext(DismissableLayerContext);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n React.useEffect(() => {\n const node = ref.current;\n if (node) {\n context.branches.add(node);\n return () => {\n context.branches.delete(node);\n };\n }\n }, [context.branches]);\n return /* @__PURE__ */ jsx(Primitive.div, { ...props, ref: composedRefs });\n});\nDismissableLayerBranch.displayName = BRANCH_NAME;\nfunction usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {\n const handlePointerDownOutside = useCallbackRef(onPointerDownOutside);\n const isPointerInsideReactTreeRef = React.useRef(false);\n const handleClickRef = React.useRef(() => {\n });\n React.useEffect(() => {\n const handlePointerDown = (event) => {\n if (event.target && !isPointerInsideReactTreeRef.current) {\n let handleAndDispatchPointerDownOutsideEvent2 = function() {\n handleAndDispatchCustomEvent(\n POINTER_DOWN_OUTSIDE,\n handlePointerDownOutside,\n eventDetail,\n { discrete: true }\n );\n };\n var handleAndDispatchPointerDownOutsideEvent = handleAndDispatchPointerDownOutsideEvent2;\n const eventDetail = { originalEvent: event };\n if (event.pointerType === \"touch\") {\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n handleClickRef.current = handleAndDispatchPointerDownOutsideEvent2;\n ownerDocument.addEventListener(\"click\", handleClickRef.current, { once: true });\n } else {\n handleAndDispatchPointerDownOutsideEvent2();\n }\n } else {\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n }\n isPointerInsideReactTreeRef.current = false;\n };\n const timerId = window.setTimeout(() => {\n ownerDocument.addEventListener(\"pointerdown\", handlePointerDown);\n }, 0);\n return () => {\n window.clearTimeout(timerId);\n ownerDocument.removeEventListener(\"pointerdown\", handlePointerDown);\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n };\n }, [ownerDocument, handlePointerDownOutside]);\n return {\n // ensures we check React component tree (not just DOM tree)\n onPointerDownCapture: () => isPointerInsideReactTreeRef.current = true\n };\n}\nfunction useFocusOutside(onFocusOutside, ownerDocument = globalThis?.document) {\n const handleFocusOutside = useCallbackRef(onFocusOutside);\n const isFocusInsideReactTreeRef = React.useRef(false);\n React.useEffect(() => {\n const handleFocus = (event) => {\n if (event.target && !isFocusInsideReactTreeRef.current) {\n const eventDetail = { originalEvent: event };\n handleAndDispatchCustomEvent(FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {\n discrete: false\n });\n }\n };\n ownerDocument.addEventListener(\"focusin\", handleFocus);\n return () => ownerDocument.removeEventListener(\"focusin\", handleFocus);\n }, [ownerDocument, handleFocusOutside]);\n return {\n onFocusCapture: () => isFocusInsideReactTreeRef.current = true,\n onBlurCapture: () => isFocusInsideReactTreeRef.current = false\n };\n}\nfunction dispatchUpdate() {\n const event = new CustomEvent(CONTEXT_UPDATE);\n document.dispatchEvent(event);\n}\nfunction handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {\n const target = detail.originalEvent.target;\n const event = new CustomEvent(name, { bubbles: false, cancelable: true, detail });\n if (handler) target.addEventListener(name, handler, { once: true });\n if (discrete) {\n dispatchDiscreteCustomEvent(target, event);\n } else {\n target.dispatchEvent(event);\n }\n}\nvar Root = DismissableLayer;\nvar Branch = DismissableLayerBranch;\nexport {\n Branch,\n DismissableLayer,\n DismissableLayerBranch,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/focus-scope.tsx\nimport * as React from \"react\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { jsx } from \"react/jsx-runtime\";\nvar AUTOFOCUS_ON_MOUNT = \"focusScope.autoFocusOnMount\";\nvar AUTOFOCUS_ON_UNMOUNT = \"focusScope.autoFocusOnUnmount\";\nvar EVENT_OPTIONS = { bubbles: false, cancelable: true };\nvar FOCUS_SCOPE_NAME = \"FocusScope\";\nvar FocusScope = React.forwardRef((props, forwardedRef) => {\n const {\n loop = false,\n trapped = false,\n onMountAutoFocus: onMountAutoFocusProp,\n onUnmountAutoFocus: onUnmountAutoFocusProp,\n ...scopeProps\n } = props;\n const [container, setContainer] = React.useState(null);\n const onMountAutoFocus = useCallbackRef(onMountAutoFocusProp);\n const onUnmountAutoFocus = useCallbackRef(onUnmountAutoFocusProp);\n const lastFocusedElementRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setContainer(node));\n const focusScope = React.useRef({\n paused: false,\n pause() {\n this.paused = true;\n },\n resume() {\n this.paused = false;\n }\n }).current;\n React.useEffect(() => {\n if (trapped) {\n let handleFocusIn2 = function(event) {\n if (focusScope.paused || !container) return;\n const target = event.target;\n if (container.contains(target)) {\n lastFocusedElementRef.current = target;\n } else {\n focus(lastFocusedElementRef.current, { select: true });\n }\n }, handleFocusOut2 = function(event) {\n if (focusScope.paused || !container) return;\n const relatedTarget = event.relatedTarget;\n if (relatedTarget === null) return;\n if (!container.contains(relatedTarget)) {\n focus(lastFocusedElementRef.current, { select: true });\n }\n }, handleMutations2 = function(mutations) {\n const focusedElement = document.activeElement;\n if (focusedElement !== document.body) return;\n for (const mutation of mutations) {\n if (mutation.removedNodes.length > 0) focus(container);\n }\n };\n var handleFocusIn = handleFocusIn2, handleFocusOut = handleFocusOut2, handleMutations = handleMutations2;\n document.addEventListener(\"focusin\", handleFocusIn2);\n document.addEventListener(\"focusout\", handleFocusOut2);\n const mutationObserver = new MutationObserver(handleMutations2);\n if (container) mutationObserver.observe(container, { childList: true, subtree: true });\n return () => {\n document.removeEventListener(\"focusin\", handleFocusIn2);\n document.removeEventListener(\"focusout\", handleFocusOut2);\n mutationObserver.disconnect();\n };\n }\n }, [trapped, container, focusScope.paused]);\n React.useEffect(() => {\n if (container) {\n focusScopesStack.add(focusScope);\n const previouslyFocusedElement = document.activeElement;\n const hasFocusedCandidate = container.contains(previouslyFocusedElement);\n if (!hasFocusedCandidate) {\n const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT, EVENT_OPTIONS);\n container.addEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);\n container.dispatchEvent(mountEvent);\n if (!mountEvent.defaultPrevented) {\n focusFirst(removeLinks(getTabbableCandidates(container)), { select: true });\n if (document.activeElement === previouslyFocusedElement) {\n focus(container);\n }\n }\n }\n return () => {\n container.removeEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);\n setTimeout(() => {\n const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT, EVENT_OPTIONS);\n container.addEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);\n container.dispatchEvent(unmountEvent);\n if (!unmountEvent.defaultPrevented) {\n focus(previouslyFocusedElement ?? document.body, { select: true });\n }\n container.removeEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);\n focusScopesStack.remove(focusScope);\n }, 0);\n };\n }\n }, [container, onMountAutoFocus, onUnmountAutoFocus, focusScope]);\n const handleKeyDown = React.useCallback(\n (event) => {\n if (!loop && !trapped) return;\n if (focusScope.paused) return;\n const isTabKey = event.key === \"Tab\" && !event.altKey && !event.ctrlKey && !event.metaKey;\n const focusedElement = document.activeElement;\n if (isTabKey && focusedElement) {\n const container2 = event.currentTarget;\n const [first, last] = getTabbableEdges(container2);\n const hasTabbableElementsInside = first && last;\n if (!hasTabbableElementsInside) {\n if (focusedElement === container2) event.preventDefault();\n } else {\n if (!event.shiftKey && focusedElement === last) {\n event.preventDefault();\n if (loop) focus(first, { select: true });\n } else if (event.shiftKey && focusedElement === first) {\n event.preventDefault();\n if (loop) focus(last, { select: true });\n }\n }\n }\n },\n [loop, trapped, focusScope.paused]\n );\n return /* @__PURE__ */ jsx(Primitive.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });\n});\nFocusScope.displayName = FOCUS_SCOPE_NAME;\nfunction focusFirst(candidates, { select = false } = {}) {\n const previouslyFocusedElement = document.activeElement;\n for (const candidate of candidates) {\n focus(candidate, { select });\n if (document.activeElement !== previouslyFocusedElement) return;\n }\n}\nfunction getTabbableEdges(container) {\n const candidates = getTabbableCandidates(container);\n const first = findVisible(candidates, container);\n const last = findVisible(candidates.reverse(), container);\n return [first, last];\n}\nfunction getTabbableCandidates(container) {\n const nodes = [];\n const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {\n acceptNode: (node) => {\n const isHiddenInput = node.tagName === \"INPUT\" && node.type === \"hidden\";\n if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;\n return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;\n }\n });\n while (walker.nextNode()) nodes.push(walker.currentNode);\n return nodes;\n}\nfunction findVisible(elements, container) {\n for (const element of elements) {\n if (!isHidden(element, { upTo: container })) return element;\n }\n}\nfunction isHidden(node, { upTo }) {\n if (getComputedStyle(node).visibility === \"hidden\") return true;\n while (node) {\n if (upTo !== void 0 && node === upTo) return false;\n if (getComputedStyle(node).display === \"none\") return true;\n node = node.parentElement;\n }\n return false;\n}\nfunction isSelectableInput(element) {\n return element instanceof HTMLInputElement && \"select\" in element;\n}\nfunction focus(element, { select = false } = {}) {\n if (element && element.focus) {\n const previouslyFocusedElement = document.activeElement;\n element.focus({ preventScroll: true });\n if (element !== previouslyFocusedElement && isSelectableInput(element) && select)\n element.select();\n }\n}\nvar focusScopesStack = createFocusScopesStack();\nfunction createFocusScopesStack() {\n let stack = [];\n return {\n add(focusScope) {\n const activeFocusScope = stack[0];\n if (focusScope !== activeFocusScope) {\n activeFocusScope?.pause();\n }\n stack = arrayRemove(stack, focusScope);\n stack.unshift(focusScope);\n },\n remove(focusScope) {\n stack = arrayRemove(stack, focusScope);\n stack[0]?.resume();\n }\n };\n}\nfunction arrayRemove(array, item) {\n const updatedArray = [...array];\n const index = updatedArray.indexOf(item);\n if (index !== -1) {\n updatedArray.splice(index, 1);\n }\n return updatedArray;\n}\nfunction removeLinks(items) {\n return items.filter((item) => item.tagName !== \"A\");\n}\nvar Root = FocusScope;\nexport {\n FocusScope,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/portal.tsx\nimport * as React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nimport { jsx } from \"react/jsx-runtime\";\nvar PORTAL_NAME = \"Portal\";\nvar Portal = React.forwardRef((props, forwardedRef) => {\n const { container: containerProp, ...portalProps } = props;\n const [mounted, setMounted] = React.useState(false);\n useLayoutEffect(() => setMounted(true), []);\n const container = containerProp || mounted && globalThis?.document?.body;\n return container ? ReactDOM.createPortal(/* @__PURE__ */ jsx(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;\n});\nPortal.displayName = PORTAL_NAME;\nvar Root = Portal;\nexport {\n Portal,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/presence.tsx\nimport * as React2 from \"react\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\n\n// src/use-state-machine.tsx\nimport * as React from \"react\";\nfunction useStateMachine(initialState, machine) {\n return React.useReducer((state, event) => {\n const nextState = machine[state][event];\n return nextState ?? state;\n }, initialState);\n}\n\n// src/presence.tsx\nvar Presence = (props) => {\n const { present, children } = props;\n const presence = usePresence(present);\n const child = typeof children === \"function\" ? children({ present: presence.isPresent }) : React2.Children.only(children);\n const ref = useComposedRefs(presence.ref, getElementRef(child));\n const forceMount = typeof children === \"function\";\n return forceMount || presence.isPresent ? React2.cloneElement(child, { ref }) : null;\n};\nPresence.displayName = \"Presence\";\nfunction usePresence(present) {\n const [node, setNode] = React2.useState();\n const stylesRef = React2.useRef(null);\n const prevPresentRef = React2.useRef(present);\n const prevAnimationNameRef = React2.useRef(\"none\");\n const initialState = present ? \"mounted\" : \"unmounted\";\n const [state, send] = useStateMachine(initialState, {\n mounted: {\n UNMOUNT: \"unmounted\",\n ANIMATION_OUT: \"unmountSuspended\"\n },\n unmountSuspended: {\n MOUNT: \"mounted\",\n ANIMATION_END: \"unmounted\"\n },\n unmounted: {\n MOUNT: \"mounted\"\n }\n });\n React2.useEffect(() => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n prevAnimationNameRef.current = state === \"mounted\" ? currentAnimationName : \"none\";\n }, [state]);\n useLayoutEffect(() => {\n const styles = stylesRef.current;\n const wasPresent = prevPresentRef.current;\n const hasPresentChanged = wasPresent !== present;\n if (hasPresentChanged) {\n const prevAnimationName = prevAnimationNameRef.current;\n const currentAnimationName = getAnimationName(styles);\n if (present) {\n send(\"MOUNT\");\n } else if (currentAnimationName === \"none\" || styles?.display === \"none\") {\n send(\"UNMOUNT\");\n } else {\n const isAnimating = prevAnimationName !== currentAnimationName;\n if (wasPresent && isAnimating) {\n send(\"ANIMATION_OUT\");\n } else {\n send(\"UNMOUNT\");\n }\n }\n prevPresentRef.current = present;\n }\n }, [present, send]);\n useLayoutEffect(() => {\n if (node) {\n let timeoutId;\n const ownerWindow = node.ownerDocument.defaultView ?? window;\n const handleAnimationEnd = (event) => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n const isCurrentAnimation = currentAnimationName.includes(CSS.escape(event.animationName));\n if (event.target === node && isCurrentAnimation) {\n send(\"ANIMATION_END\");\n if (!prevPresentRef.current) {\n const currentFillMode = node.style.animationFillMode;\n node.style.animationFillMode = \"forwards\";\n timeoutId = ownerWindow.setTimeout(() => {\n if (node.style.animationFillMode === \"forwards\") {\n node.style.animationFillMode = currentFillMode;\n }\n });\n }\n }\n };\n const handleAnimationStart = (event) => {\n if (event.target === node) {\n prevAnimationNameRef.current = getAnimationName(stylesRef.current);\n }\n };\n node.addEventListener(\"animationstart\", handleAnimationStart);\n node.addEventListener(\"animationcancel\", handleAnimationEnd);\n node.addEventListener(\"animationend\", handleAnimationEnd);\n return () => {\n ownerWindow.clearTimeout(timeoutId);\n node.removeEventListener(\"animationstart\", handleAnimationStart);\n node.removeEventListener(\"animationcancel\", handleAnimationEnd);\n node.removeEventListener(\"animationend\", handleAnimationEnd);\n };\n } else {\n send(\"ANIMATION_END\");\n }\n }, [node, send]);\n return {\n isPresent: [\"mounted\", \"unmountSuspended\"].includes(state),\n ref: React2.useCallback((node2) => {\n stylesRef.current = node2 ? getComputedStyle(node2) : null;\n setNode(node2);\n }, [])\n };\n}\nfunction getAnimationName(styles) {\n return styles?.animationName || \"none\";\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}\nvar Root = Presence;\nexport {\n Presence,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/focus-guards.tsx\nimport * as React from \"react\";\nvar count = 0;\nfunction FocusGuards(props) {\n useFocusGuards();\n return props.children;\n}\nfunction useFocusGuards() {\n React.useEffect(() => {\n const edgeGuards = document.querySelectorAll(\"[data-radix-focus-guard]\");\n document.body.insertAdjacentElement(\"afterbegin\", edgeGuards[0] ?? createFocusGuard());\n document.body.insertAdjacentElement(\"beforeend\", edgeGuards[1] ?? createFocusGuard());\n count++;\n return () => {\n if (count === 1) {\n document.querySelectorAll(\"[data-radix-focus-guard]\").forEach((node) => node.remove());\n }\n count--;\n };\n }, []);\n}\nfunction createFocusGuard() {\n const element = document.createElement(\"span\");\n element.setAttribute(\"data-radix-focus-guard\", \"\");\n element.tabIndex = 0;\n element.style.outline = \"none\";\n element.style.opacity = \"0\";\n element.style.position = \"fixed\";\n element.style.pointerEvents = \"none\";\n return element;\n}\nexport {\n FocusGuards,\n FocusGuards as Root,\n useFocusGuards\n};\n//# sourceMappingURL=index.mjs.map\n","/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nvar ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n var r, s = 0;\n function next() {\n while (r = env.stack.pop()) {\n try {\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\n if (r.dispose) {\n var result = r.dispose.call(r.value);\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n else s |= 1;\n }\n catch (e) {\n fail(e);\n }\n }\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\n });\n }\n return path;\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __esDecorate,\n __runInitializers,\n __propKey,\n __setFunctionName,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n __rewriteRelativeImportExtension,\n};\n","export var zeroRightClassName = 'right-scroll-bar-position';\nexport var fullWidthClassName = 'width-before-scroll-bar';\nexport var noScrollbarsClassName = 'with-scroll-bars-hidden';\n/**\n * Name of a CSS variable containing the amount of \"hidden\" scrollbar\n * ! might be undefined ! use will fallback!\n */\nexport var removedBarSizeVariable = '--removed-body-scroll-bar-size';\n","/**\n * Assigns a value for a given ref, no matter of the ref format\n * @param {RefObject} ref - a callback function or ref object\n * @param value - a new value\n *\n * @see https://github.com/theKashey/use-callback-ref#assignref\n * @example\n * const refObject = useRef();\n * const refFn = (ref) => {....}\n *\n * assignRef(refObject, \"refValue\");\n * assignRef(refFn, \"refValue\");\n */\nexport function assignRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n }\n else if (ref) {\n ref.current = value;\n }\n return ref;\n}\n","import { useState } from 'react';\n/**\n * creates a MutableRef with ref change callback\n * @param initialValue - initial ref value\n * @param {Function} callback - a callback to run when value changes\n *\n * @example\n * const ref = useCallbackRef(0, (newValue, oldValue) => console.log(oldValue, '->', newValue);\n * ref.current = 1;\n * // prints 0 -> 1\n *\n * @see https://reactjs.org/docs/hooks-reference.html#useref\n * @see https://github.com/theKashey/use-callback-ref#usecallbackref---to-replace-reactuseref\n * @returns {MutableRefObject}\n */\nexport function useCallbackRef(initialValue, callback) {\n var ref = useState(function () { return ({\n // value\n value: initialValue,\n // last callback\n callback: callback,\n // \"memoized\" public interface\n facade: {\n get current() {\n return ref.value;\n },\n set current(value) {\n var last = ref.value;\n if (last !== value) {\n ref.value = value;\n ref.callback(value, last);\n }\n },\n },\n }); })[0];\n // update callback\n ref.callback = callback;\n return ref.facade;\n}\n","import * as React from 'react';\nimport { assignRef } from './assignRef';\nimport { useCallbackRef } from './useRef';\nvar useIsomorphicLayoutEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;\nvar currentValues = new WeakMap();\n/**\n * Merges two or more refs together providing a single interface to set their value\n * @param {RefObject|Ref} refs\n * @returns {MutableRefObject} - a new ref, which translates all changes to {refs}\n *\n * @see {@link mergeRefs} a version without buit-in memoization\n * @see https://github.com/theKashey/use-callback-ref#usemergerefs\n * @example\n * const Component = React.forwardRef((props, ref) => {\n * const ownRef = useRef();\n * const domRef = useMergeRefs([ref, ownRef]); // 👈 merge together\n * return <div ref={domRef}>...</div>\n * }\n */\nexport function useMergeRefs(refs, defaultValue) {\n var callbackRef = useCallbackRef(defaultValue || null, function (newValue) {\n return refs.forEach(function (ref) { return assignRef(ref, newValue); });\n });\n // handle refs changes - added or removed\n useIsomorphicLayoutEffect(function () {\n var oldValue = currentValues.get(callbackRef);\n if (oldValue) {\n var prevRefs_1 = new Set(oldValue);\n var nextRefs_1 = new Set(refs);\n var current_1 = callbackRef.current;\n prevRefs_1.forEach(function (ref) {\n if (!nextRefs_1.has(ref)) {\n assignRef(ref, null);\n }\n });\n nextRefs_1.forEach(function (ref) {\n if (!prevRefs_1.has(ref)) {\n assignRef(ref, current_1);\n }\n });\n }\n currentValues.set(callbackRef, refs);\n }, [refs]);\n return callbackRef;\n}\n","import { __assign } from \"tslib\";\nfunction ItoI(a) {\n return a;\n}\nfunction innerCreateMedium(defaults, middleware) {\n if (middleware === void 0) { middleware = ItoI; }\n var buffer = [];\n var assigned = false;\n var medium = {\n read: function () {\n if (assigned) {\n throw new Error('Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.');\n }\n if (buffer.length) {\n return buffer[buffer.length - 1];\n }\n return defaults;\n },\n useMedium: function (data) {\n var item = middleware(data, assigned);\n buffer.push(item);\n return function () {\n buffer = buffer.filter(function (x) { return x !== item; });\n };\n },\n assignSyncMedium: function (cb) {\n assigned = true;\n while (buffer.length) {\n var cbs = buffer;\n buffer = [];\n cbs.forEach(cb);\n }\n buffer = {\n push: function (x) { return cb(x); },\n filter: function () { return buffer; },\n };\n },\n assignMedium: function (cb) {\n assigned = true;\n var pendingQueue = [];\n if (buffer.length) {\n var cbs = buffer;\n buffer = [];\n cbs.forEach(cb);\n pendingQueue = buffer;\n }\n var executeQueue = function () {\n var cbs = pendingQueue;\n pendingQueue = [];\n cbs.forEach(cb);\n };\n var cycle = function () { return Promise.resolve().then(executeQueue); };\n cycle();\n buffer = {\n push: function (x) {\n pendingQueue.push(x);\n cycle();\n },\n filter: function (filter) {\n pendingQueue = pendingQueue.filter(filter);\n return buffer;\n },\n };\n },\n };\n return medium;\n}\nexport function createMedium(defaults, middleware) {\n if (middleware === void 0) { middleware = ItoI; }\n return innerCreateMedium(defaults, middleware);\n}\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport function createSidecarMedium(options) {\n if (options === void 0) { options = {}; }\n var medium = innerCreateMedium(null);\n medium.options = __assign({ async: true, ssr: false }, options);\n return medium;\n}\n","import { __assign, __rest } from \"tslib\";\nimport * as React from 'react';\nvar SideCar = function (_a) {\n var sideCar = _a.sideCar, rest = __rest(_a, [\"sideCar\"]);\n if (!sideCar) {\n throw new Error('Sidecar: please provide `sideCar` property to import the right car');\n }\n var Target = sideCar.read();\n if (!Target) {\n throw new Error('Sidecar medium not found');\n }\n return React.createElement(Target, __assign({}, rest));\n};\nSideCar.isSideCarExport = true;\nexport function exportSidecar(medium, exported) {\n medium.useMedium(exported);\n return SideCar;\n}\n","import { createSidecarMedium } from 'use-sidecar';\nexport var effectCar = createSidecarMedium();\n","import { __assign, __rest } from \"tslib\";\nimport * as React from 'react';\nimport { fullWidthClassName, zeroRightClassName } from 'react-remove-scroll-bar/constants';\nimport { useMergeRefs } from 'use-callback-ref';\nimport { effectCar } from './medium';\nvar nothing = function () {\n return;\n};\n/**\n * Removes scrollbar from the page and contain the scroll within the Lock\n */\nvar RemoveScroll = React.forwardRef(function (props, parentRef) {\n var ref = React.useRef(null);\n var _a = React.useState({\n onScrollCapture: nothing,\n onWheelCapture: nothing,\n onTouchMoveCapture: nothing,\n }), callbacks = _a[0], setCallbacks = _a[1];\n var forwardProps = props.forwardProps, children = props.children, className = props.className, removeScrollBar = props.removeScrollBar, enabled = props.enabled, shards = props.shards, sideCar = props.sideCar, noRelative = props.noRelative, noIsolation = props.noIsolation, inert = props.inert, allowPinchZoom = props.allowPinchZoom, _b = props.as, Container = _b === void 0 ? 'div' : _b, gapMode = props.gapMode, rest = __rest(props, [\"forwardProps\", \"children\", \"className\", \"removeScrollBar\", \"enabled\", \"shards\", \"sideCar\", \"noRelative\", \"noIsolation\", \"inert\", \"allowPinchZoom\", \"as\", \"gapMode\"]);\n var SideCar = sideCar;\n var containerRef = useMergeRefs([ref, parentRef]);\n var containerProps = __assign(__assign({}, rest), callbacks);\n return (React.createElement(React.Fragment, null,\n enabled && (React.createElement(SideCar, { sideCar: effectCar, removeScrollBar: removeScrollBar, shards: shards, noRelative: noRelative, noIsolation: noIsolation, inert: inert, setCallbacks: setCallbacks, allowPinchZoom: !!allowPinchZoom, lockRef: ref, gapMode: gapMode })),\n forwardProps ? (React.cloneElement(React.Children.only(children), __assign(__assign({}, containerProps), { ref: containerRef }))) : (React.createElement(Container, __assign({}, containerProps, { className: className, ref: containerRef }), children))));\n});\nRemoveScroll.defaultProps = {\n enabled: true,\n removeScrollBar: true,\n inert: false,\n};\nRemoveScroll.classNames = {\n fullWidth: fullWidthClassName,\n zeroRight: zeroRightClassName,\n};\nexport { RemoveScroll };\n","var currentNonce;\nexport var setNonce = function (nonce) {\n currentNonce = nonce;\n};\nexport var getNonce = function () {\n if (currentNonce) {\n return currentNonce;\n }\n if (typeof __webpack_nonce__ !== 'undefined') {\n return __webpack_nonce__;\n }\n return undefined;\n};\n","import { getNonce } from 'get-nonce';\nfunction makeStyleTag() {\n if (!document)\n return null;\n var tag = document.createElement('style');\n tag.type = 'text/css';\n var nonce = getNonce();\n if (nonce) {\n tag.setAttribute('nonce', nonce);\n }\n return tag;\n}\nfunction injectStyles(tag, css) {\n // @ts-ignore\n if (tag.styleSheet) {\n // @ts-ignore\n tag.styleSheet.cssText = css;\n }\n else {\n tag.appendChild(document.createTextNode(css));\n }\n}\nfunction insertStyleTag(tag) {\n var head = document.head || document.getElementsByTagName('head')[0];\n head.appendChild(tag);\n}\nexport var stylesheetSingleton = function () {\n var counter = 0;\n var stylesheet = null;\n return {\n add: function (style) {\n if (counter == 0) {\n if ((stylesheet = makeStyleTag())) {\n injectStyles(stylesheet, style);\n insertStyleTag(stylesheet);\n }\n }\n counter++;\n },\n remove: function () {\n counter--;\n if (!counter && stylesheet) {\n stylesheet.parentNode && stylesheet.parentNode.removeChild(stylesheet);\n stylesheet = null;\n }\n },\n };\n};\n","import * as React from 'react';\nimport { stylesheetSingleton } from './singleton';\n/**\n * creates a hook to control style singleton\n * @see {@link styleSingleton} for a safer component version\n * @example\n * ```tsx\n * const useStyle = styleHookSingleton();\n * ///\n * useStyle('body { overflow: hidden}');\n */\nexport var styleHookSingleton = function () {\n var sheet = stylesheetSingleton();\n return function (styles, isDynamic) {\n React.useEffect(function () {\n sheet.add(styles);\n return function () {\n sheet.remove();\n };\n }, [styles && isDynamic]);\n };\n};\n","import { styleHookSingleton } from './hook';\n/**\n * create a Component to add styles on demand\n * - styles are added when first instance is mounted\n * - styles are removed when the last instance is unmounted\n * - changing styles in runtime does nothing unless dynamic is set. But with multiple components that can lead to the undefined behavior\n */\nexport var styleSingleton = function () {\n var useStyle = styleHookSingleton();\n var Sheet = function (_a) {\n var styles = _a.styles, dynamic = _a.dynamic;\n useStyle(styles, dynamic);\n return null;\n };\n return Sheet;\n};\n","export var zeroGap = {\n left: 0,\n top: 0,\n right: 0,\n gap: 0,\n};\nvar parse = function (x) { return parseInt(x || '', 10) || 0; };\nvar getOffset = function (gapMode) {\n var cs = window.getComputedStyle(document.body);\n var left = cs[gapMode === 'padding' ? 'paddingLeft' : 'marginLeft'];\n var top = cs[gapMode === 'padding' ? 'paddingTop' : 'marginTop'];\n var right = cs[gapMode === 'padding' ? 'paddingRight' : 'marginRight'];\n return [parse(left), parse(top), parse(right)];\n};\nexport var getGapWidth = function (gapMode) {\n if (gapMode === void 0) { gapMode = 'margin'; }\n if (typeof window === 'undefined') {\n return zeroGap;\n }\n var offsets = getOffset(gapMode);\n var documentWidth = document.documentElement.clientWidth;\n var windowWidth = window.innerWidth;\n return {\n left: offsets[0],\n top: offsets[1],\n right: offsets[2],\n gap: Math.max(0, windowWidth - documentWidth + offsets[2] - offsets[0]),\n };\n};\n","import * as React from 'react';\nimport { styleSingleton } from 'react-style-singleton';\nimport { fullWidthClassName, zeroRightClassName, noScrollbarsClassName, removedBarSizeVariable } from './constants';\nimport { getGapWidth } from './utils';\nvar Style = styleSingleton();\nexport var lockAttribute = 'data-scroll-locked';\n// important tip - once we measure scrollBar width and remove them\n// we could not repeat this operation\n// thus we are using style-singleton - only the first \"yet correct\" style will be applied.\nvar getStyles = function (_a, allowRelative, gapMode, important) {\n var left = _a.left, top = _a.top, right = _a.right, gap = _a.gap;\n if (gapMode === void 0) { gapMode = 'margin'; }\n return \"\\n .\".concat(noScrollbarsClassName, \" {\\n overflow: hidden \").concat(important, \";\\n padding-right: \").concat(gap, \"px \").concat(important, \";\\n }\\n body[\").concat(lockAttribute, \"] {\\n overflow: hidden \").concat(important, \";\\n overscroll-behavior: contain;\\n \").concat([\n allowRelative && \"position: relative \".concat(important, \";\"),\n gapMode === 'margin' &&\n \"\\n padding-left: \".concat(left, \"px;\\n padding-top: \").concat(top, \"px;\\n padding-right: \").concat(right, \"px;\\n margin-left:0;\\n margin-top:0;\\n margin-right: \").concat(gap, \"px \").concat(important, \";\\n \"),\n gapMode === 'padding' && \"padding-right: \".concat(gap, \"px \").concat(important, \";\"),\n ]\n .filter(Boolean)\n .join(''), \"\\n }\\n \\n .\").concat(zeroRightClassName, \" {\\n right: \").concat(gap, \"px \").concat(important, \";\\n }\\n \\n .\").concat(fullWidthClassName, \" {\\n margin-right: \").concat(gap, \"px \").concat(important, \";\\n }\\n \\n .\").concat(zeroRightClassName, \" .\").concat(zeroRightClassName, \" {\\n right: 0 \").concat(important, \";\\n }\\n \\n .\").concat(fullWidthClassName, \" .\").concat(fullWidthClassName, \" {\\n margin-right: 0 \").concat(important, \";\\n }\\n \\n body[\").concat(lockAttribute, \"] {\\n \").concat(removedBarSizeVariable, \": \").concat(gap, \"px;\\n }\\n\");\n};\nvar getCurrentUseCounter = function () {\n var counter = parseInt(document.body.getAttribute(lockAttribute) || '0', 10);\n return isFinite(counter) ? counter : 0;\n};\nexport var useLockAttribute = function () {\n React.useEffect(function () {\n document.body.setAttribute(lockAttribute, (getCurrentUseCounter() + 1).toString());\n return function () {\n var newCounter = getCurrentUseCounter() - 1;\n if (newCounter <= 0) {\n document.body.removeAttribute(lockAttribute);\n }\n else {\n document.body.setAttribute(lockAttribute, newCounter.toString());\n }\n };\n }, []);\n};\n/**\n * Removes page scrollbar and blocks page scroll when mounted\n */\nexport var RemoveScrollBar = function (_a) {\n var noRelative = _a.noRelative, noImportant = _a.noImportant, _b = _a.gapMode, gapMode = _b === void 0 ? 'margin' : _b;\n useLockAttribute();\n /*\n gap will be measured on every component mount\n however it will be used only by the \"first\" invocation\n due to singleton nature of <Style\n */\n var gap = React.useMemo(function () { return getGapWidth(gapMode); }, [gapMode]);\n return React.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? '!important' : '') });\n};\n","var passiveSupported = false;\nif (typeof window !== 'undefined') {\n try {\n var options = Object.defineProperty({}, 'passive', {\n get: function () {\n passiveSupported = true;\n return true;\n },\n });\n // @ts-ignore\n window.addEventListener('test', options, options);\n // @ts-ignore\n window.removeEventListener('test', options, options);\n }\n catch (err) {\n passiveSupported = false;\n }\n}\nexport var nonPassive = passiveSupported ? { passive: false } : false;\n","var alwaysContainsScroll = function (node) {\n // textarea will always _contain_ scroll inside self. It only can be hidden\n return node.tagName === 'TEXTAREA';\n};\nvar elementCanBeScrolled = function (node, overflow) {\n if (!(node instanceof Element)) {\n return false;\n }\n var styles = window.getComputedStyle(node);\n return (\n // not-not-scrollable\n styles[overflow] !== 'hidden' &&\n // contains scroll inside self\n !(styles.overflowY === styles.overflowX && !alwaysContainsScroll(node) && styles[overflow] === 'visible'));\n};\nvar elementCouldBeVScrolled = function (node) { return elementCanBeScrolled(node, 'overflowY'); };\nvar elementCouldBeHScrolled = function (node) { return elementCanBeScrolled(node, 'overflowX'); };\nexport var locationCouldBeScrolled = function (axis, node) {\n var ownerDocument = node.ownerDocument;\n var current = node;\n do {\n // Skip over shadow root\n if (typeof ShadowRoot !== 'undefined' && current instanceof ShadowRoot) {\n current = current.host;\n }\n var isScrollable = elementCouldBeScrolled(axis, current);\n if (isScrollable) {\n var _a = getScrollVariables(axis, current), scrollHeight = _a[1], clientHeight = _a[2];\n if (scrollHeight > clientHeight) {\n return true;\n }\n }\n current = current.parentNode;\n } while (current && current !== ownerDocument.body);\n return false;\n};\nvar getVScrollVariables = function (_a) {\n var scrollTop = _a.scrollTop, scrollHeight = _a.scrollHeight, clientHeight = _a.clientHeight;\n return [\n scrollTop,\n scrollHeight,\n clientHeight,\n ];\n};\nvar getHScrollVariables = function (_a) {\n var scrollLeft = _a.scrollLeft, scrollWidth = _a.scrollWidth, clientWidth = _a.clientWidth;\n return [\n scrollLeft,\n scrollWidth,\n clientWidth,\n ];\n};\nvar elementCouldBeScrolled = function (axis, node) {\n return axis === 'v' ? elementCouldBeVScrolled(node) : elementCouldBeHScrolled(node);\n};\nvar getScrollVariables = function (axis, node) {\n return axis === 'v' ? getVScrollVariables(node) : getHScrollVariables(node);\n};\nvar getDirectionFactor = function (axis, direction) {\n /**\n * If the element's direction is rtl (right-to-left), then scrollLeft is 0 when the scrollbar is at its rightmost position,\n * and then increasingly negative as you scroll towards the end of the content.\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollLeft\n */\n return axis === 'h' && direction === 'rtl' ? -1 : 1;\n};\nexport var handleScroll = function (axis, endTarget, event, sourceDelta, noOverscroll) {\n var directionFactor = getDirectionFactor(axis, window.getComputedStyle(endTarget).direction);\n var delta = directionFactor * sourceDelta;\n // find scrollable target\n var target = event.target;\n var targetInLock = endTarget.contains(target);\n var shouldCancelScroll = false;\n var isDeltaPositive = delta > 0;\n var availableScroll = 0;\n var availableScrollTop = 0;\n do {\n if (!target) {\n break;\n }\n var _a = getScrollVariables(axis, target), position = _a[0], scroll_1 = _a[1], capacity = _a[2];\n var elementScroll = scroll_1 - capacity - directionFactor * position;\n if (position || elementScroll) {\n if (elementCouldBeScrolled(axis, target)) {\n availableScroll += elementScroll;\n availableScrollTop += position;\n }\n }\n var parent_1 = target.parentNode;\n // we will \"bubble\" from ShadowDom in case we are, or just to the parent in normal case\n // this is the same logic used in focus-lock\n target = (parent_1 && parent_1.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? parent_1.host : parent_1);\n } while (\n // portaled content\n (!targetInLock && target !== document.body) ||\n // self content\n (targetInLock && (endTarget.contains(target) || endTarget === target)));\n // handle epsilon around 0 (non standard zoom levels)\n if (isDeltaPositive &&\n ((noOverscroll && Math.abs(availableScroll) < 1) || (!noOverscroll && delta > availableScroll))) {\n shouldCancelScroll = true;\n }\n else if (!isDeltaPositive &&\n ((noOverscroll && Math.abs(availableScrollTop) < 1) || (!noOverscroll && -delta > availableScrollTop))) {\n shouldCancelScroll = true;\n }\n return shouldCancelScroll;\n};\n","import { __spreadArray } from \"tslib\";\nimport * as React from 'react';\nimport { RemoveScrollBar } from 'react-remove-scroll-bar';\nimport { styleSingleton } from 'react-style-singleton';\nimport { nonPassive } from './aggresiveCapture';\nimport { handleScroll, locationCouldBeScrolled } from './handleScroll';\nexport var getTouchXY = function (event) {\n return 'changedTouches' in event ? [event.changedTouches[0].clientX, event.changedTouches[0].clientY] : [0, 0];\n};\nexport var getDeltaXY = function (event) { return [event.deltaX, event.deltaY]; };\nvar extractRef = function (ref) {\n return ref && 'current' in ref ? ref.current : ref;\n};\nvar deltaCompare = function (x, y) { return x[0] === y[0] && x[1] === y[1]; };\nvar generateStyle = function (id) { return \"\\n .block-interactivity-\".concat(id, \" {pointer-events: none;}\\n .allow-interactivity-\").concat(id, \" {pointer-events: all;}\\n\"); };\nvar idCounter = 0;\nvar lockStack = [];\nexport function RemoveScrollSideCar(props) {\n var shouldPreventQueue = React.useRef([]);\n var touchStartRef = React.useRef([0, 0]);\n var activeAxis = React.useRef();\n var id = React.useState(idCounter++)[0];\n var Style = React.useState(styleSingleton)[0];\n var lastProps = React.useRef(props);\n React.useEffect(function () {\n lastProps.current = props;\n }, [props]);\n React.useEffect(function () {\n if (props.inert) {\n document.body.classList.add(\"block-interactivity-\".concat(id));\n var allow_1 = __spreadArray([props.lockRef.current], (props.shards || []).map(extractRef), true).filter(Boolean);\n allow_1.forEach(function (el) { return el.classList.add(\"allow-interactivity-\".concat(id)); });\n return function () {\n document.body.classList.remove(\"block-interactivity-\".concat(id));\n allow_1.forEach(function (el) { return el.classList.remove(\"allow-interactivity-\".concat(id)); });\n };\n }\n return;\n }, [props.inert, props.lockRef.current, props.shards]);\n var shouldCancelEvent = React.useCallback(function (event, parent) {\n if (('touches' in event && event.touches.length === 2) || (event.type === 'wheel' && event.ctrlKey)) {\n return !lastProps.current.allowPinchZoom;\n }\n var touch = getTouchXY(event);\n var touchStart = touchStartRef.current;\n var deltaX = 'deltaX' in event ? event.deltaX : touchStart[0] - touch[0];\n var deltaY = 'deltaY' in event ? event.deltaY : touchStart[1] - touch[1];\n var currentAxis;\n var target = event.target;\n var moveDirection = Math.abs(deltaX) > Math.abs(deltaY) ? 'h' : 'v';\n // allow horizontal touch move on Range inputs. They will not cause any scroll\n if ('touches' in event && moveDirection === 'h' && target.type === 'range') {\n return false;\n }\n // allow drag selection (iOS); check if selection's anchorNode is the same as target or contains target\n var selection = window.getSelection();\n var anchorNode = selection && selection.anchorNode;\n var isTouchingSelection = anchorNode ? anchorNode === target || anchorNode.contains(target) : false;\n if (isTouchingSelection) {\n return false;\n }\n var canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);\n if (!canBeScrolledInMainDirection) {\n return true;\n }\n if (canBeScrolledInMainDirection) {\n currentAxis = moveDirection;\n }\n else {\n currentAxis = moveDirection === 'v' ? 'h' : 'v';\n canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);\n // other axis might be not scrollable\n }\n if (!canBeScrolledInMainDirection) {\n return false;\n }\n if (!activeAxis.current && 'changedTouches' in event && (deltaX || deltaY)) {\n activeAxis.current = currentAxis;\n }\n if (!currentAxis) {\n return true;\n }\n var cancelingAxis = activeAxis.current || currentAxis;\n return handleScroll(cancelingAxis, parent, event, cancelingAxis === 'h' ? deltaX : deltaY, true);\n }, []);\n var shouldPrevent = React.useCallback(function (_event) {\n var event = _event;\n if (!lockStack.length || lockStack[lockStack.length - 1] !== Style) {\n // not the last active\n return;\n }\n var delta = 'deltaY' in event ? getDeltaXY(event) : getTouchXY(event);\n var sourceEvent = shouldPreventQueue.current.filter(function (e) { return e.name === event.type && (e.target === event.target || event.target === e.shadowParent) && deltaCompare(e.delta, delta); })[0];\n // self event, and should be canceled\n if (sourceEvent && sourceEvent.should) {\n if (event.cancelable) {\n event.preventDefault();\n }\n return;\n }\n // outside or shard event\n if (!sourceEvent) {\n var shardNodes = (lastProps.current.shards || [])\n .map(extractRef)\n .filter(Boolean)\n .filter(function (node) { return node.contains(event.target); });\n var shouldStop = shardNodes.length > 0 ? shouldCancelEvent(event, shardNodes[0]) : !lastProps.current.noIsolation;\n if (shouldStop) {\n if (event.cancelable) {\n event.preventDefault();\n }\n }\n }\n }, []);\n var shouldCancel = React.useCallback(function (name, delta, target, should) {\n var event = { name: name, delta: delta, target: target, should: should, shadowParent: getOutermostShadowParent(target) };\n shouldPreventQueue.current.push(event);\n setTimeout(function () {\n shouldPreventQueue.current = shouldPreventQueue.current.filter(function (e) { return e !== event; });\n }, 1);\n }, []);\n var scrollTouchStart = React.useCallback(function (event) {\n touchStartRef.current = getTouchXY(event);\n activeAxis.current = undefined;\n }, []);\n var scrollWheel = React.useCallback(function (event) {\n shouldCancel(event.type, getDeltaXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));\n }, []);\n var scrollTouchMove = React.useCallback(function (event) {\n shouldCancel(event.type, getTouchXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));\n }, []);\n React.useEffect(function () {\n lockStack.push(Style);\n props.setCallbacks({\n onScrollCapture: scrollWheel,\n onWheelCapture: scrollWheel,\n onTouchMoveCapture: scrollTouchMove,\n });\n document.addEventListener('wheel', shouldPrevent, nonPassive);\n document.addEventListener('touchmove', shouldPrevent, nonPassive);\n document.addEventListener('touchstart', scrollTouchStart, nonPassive);\n return function () {\n lockStack = lockStack.filter(function (inst) { return inst !== Style; });\n document.removeEventListener('wheel', shouldPrevent, nonPassive);\n document.removeEventListener('touchmove', shouldPrevent, nonPassive);\n document.removeEventListener('touchstart', scrollTouchStart, nonPassive);\n };\n }, []);\n var removeScrollBar = props.removeScrollBar, inert = props.inert;\n return (React.createElement(React.Fragment, null,\n inert ? React.createElement(Style, { styles: generateStyle(id) }) : null,\n removeScrollBar ? React.createElement(RemoveScrollBar, { noRelative: props.noRelative, gapMode: props.gapMode }) : null));\n}\nfunction getOutermostShadowParent(node) {\n var shadowParent = null;\n while (node !== null) {\n if (node instanceof ShadowRoot) {\n shadowParent = node.host;\n node = node.host;\n }\n node = node.parentNode;\n }\n return shadowParent;\n}\n","import { exportSidecar } from 'use-sidecar';\nimport { RemoveScrollSideCar } from './SideEffect';\nimport { effectCar } from './medium';\nexport default exportSidecar(effectCar, RemoveScrollSideCar);\n","import { __assign } from \"tslib\";\nimport * as React from 'react';\nimport { RemoveScroll } from './UI';\nimport SideCar from './sidecar';\nvar ReactRemoveScroll = React.forwardRef(function (props, ref) { return (React.createElement(RemoveScroll, __assign({}, props, { ref: ref, sideCar: SideCar }))); });\nReactRemoveScroll.classNames = RemoveScroll.classNames;\nexport default ReactRemoveScroll;\n","var getDefaultParent = function (originalTarget) {\n if (typeof document === 'undefined') {\n return null;\n }\n var sampleTarget = Array.isArray(originalTarget) ? originalTarget[0] : originalTarget;\n return sampleTarget.ownerDocument.body;\n};\nvar counterMap = new WeakMap();\nvar uncontrolledNodes = new WeakMap();\nvar markerMap = {};\nvar lockCount = 0;\nvar unwrapHost = function (node) {\n return node && (node.host || unwrapHost(node.parentNode));\n};\nvar correctTargets = function (parent, targets) {\n return targets\n .map(function (target) {\n if (parent.contains(target)) {\n return target;\n }\n var correctedTarget = unwrapHost(target);\n if (correctedTarget && parent.contains(correctedTarget)) {\n return correctedTarget;\n }\n console.error('aria-hidden', target, 'in not contained inside', parent, '. Doing nothing');\n return null;\n })\n .filter(function (x) { return Boolean(x); });\n};\n/**\n * Marks everything except given node(or nodes) as aria-hidden\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @param {String} [controlAttribute] - html Attribute to control\n * @return {Undo} undo command\n */\nvar applyAttributeToOthers = function (originalTarget, parentNode, markerName, controlAttribute) {\n var targets = correctTargets(parentNode, Array.isArray(originalTarget) ? originalTarget : [originalTarget]);\n if (!markerMap[markerName]) {\n markerMap[markerName] = new WeakMap();\n }\n var markerCounter = markerMap[markerName];\n var hiddenNodes = [];\n var elementsToKeep = new Set();\n var elementsToStop = new Set(targets);\n var keep = function (el) {\n if (!el || elementsToKeep.has(el)) {\n return;\n }\n elementsToKeep.add(el);\n keep(el.parentNode);\n };\n targets.forEach(keep);\n var deep = function (parent) {\n if (!parent || elementsToStop.has(parent)) {\n return;\n }\n Array.prototype.forEach.call(parent.children, function (node) {\n if (elementsToKeep.has(node)) {\n deep(node);\n }\n else {\n try {\n var attr = node.getAttribute(controlAttribute);\n var alreadyHidden = attr !== null && attr !== 'false';\n var counterValue = (counterMap.get(node) || 0) + 1;\n var markerValue = (markerCounter.get(node) || 0) + 1;\n counterMap.set(node, counterValue);\n markerCounter.set(node, markerValue);\n hiddenNodes.push(node);\n if (counterValue === 1 && alreadyHidden) {\n uncontrolledNodes.set(node, true);\n }\n if (markerValue === 1) {\n node.setAttribute(markerName, 'true');\n }\n if (!alreadyHidden) {\n node.setAttribute(controlAttribute, 'true');\n }\n }\n catch (e) {\n console.error('aria-hidden: cannot operate on ', node, e);\n }\n }\n });\n };\n deep(parentNode);\n elementsToKeep.clear();\n lockCount++;\n return function () {\n hiddenNodes.forEach(function (node) {\n var counterValue = counterMap.get(node) - 1;\n var markerValue = markerCounter.get(node) - 1;\n counterMap.set(node, counterValue);\n markerCounter.set(node, markerValue);\n if (!counterValue) {\n if (!uncontrolledNodes.has(node)) {\n node.removeAttribute(controlAttribute);\n }\n uncontrolledNodes.delete(node);\n }\n if (!markerValue) {\n node.removeAttribute(markerName);\n }\n });\n lockCount--;\n if (!lockCount) {\n // clear\n counterMap = new WeakMap();\n counterMap = new WeakMap();\n uncontrolledNodes = new WeakMap();\n markerMap = {};\n }\n };\n};\n/**\n * Marks everything except given node(or nodes) as aria-hidden\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @return {Undo} undo command\n */\nexport var hideOthers = function (originalTarget, parentNode, markerName) {\n if (markerName === void 0) { markerName = 'data-aria-hidden'; }\n var targets = Array.from(Array.isArray(originalTarget) ? originalTarget : [originalTarget]);\n var activeParentNode = parentNode || getDefaultParent(originalTarget);\n if (!activeParentNode) {\n return function () { return null; };\n }\n // we should not hide aria-live elements - https://github.com/theKashey/aria-hidden/issues/10\n // and script elements, as they have no impact on accessibility.\n targets.push.apply(targets, Array.from(activeParentNode.querySelectorAll('[aria-live], script')));\n return applyAttributeToOthers(targets, activeParentNode, markerName, 'aria-hidden');\n};\n/**\n * Marks everything except given node(or nodes) as inert\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @return {Undo} undo command\n */\nexport var inertOthers = function (originalTarget, parentNode, markerName) {\n if (markerName === void 0) { markerName = 'data-inert-ed'; }\n var activeParentNode = parentNode || getDefaultParent(originalTarget);\n if (!activeParentNode) {\n return function () { return null; };\n }\n return applyAttributeToOthers(originalTarget, activeParentNode, markerName, 'inert');\n};\n/**\n * @returns if current browser supports inert\n */\nexport var supportsInert = function () {\n return typeof HTMLElement !== 'undefined' && HTMLElement.prototype.hasOwnProperty('inert');\n};\n/**\n * Automatic function to \"suppress\" DOM elements - _hide_ or _inert_ in the best possible way\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @return {Undo} undo command\n */\nexport var suppressOthers = function (originalTarget, parentNode, markerName) {\n if (markerName === void 0) { markerName = 'data-suppressed'; }\n return (supportsInert() ? inertOthers : hideOthers)(originalTarget, parentNode, markerName);\n};\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","\"use client\";\n\n// src/dialog.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContext, createContextScope } from \"@radix-ui/react-context\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { DismissableLayer } from \"@radix-ui/react-dismissable-layer\";\nimport { FocusScope } from \"@radix-ui/react-focus-scope\";\nimport { Portal as PortalPrimitive } from \"@radix-ui/react-portal\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useFocusGuards } from \"@radix-ui/react-focus-guards\";\nimport { RemoveScroll } from \"react-remove-scroll\";\nimport { hideOthers } from \"aria-hidden\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\nvar DIALOG_NAME = \"Dialog\";\nvar [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);\nvar [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);\nvar Dialog = (props) => {\n const {\n __scopeDialog,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = true\n } = props;\n const triggerRef = React.useRef(null);\n const contentRef = React.useRef(null);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: DIALOG_NAME\n });\n return /* @__PURE__ */ jsx(\n DialogProvider,\n {\n scope: __scopeDialog,\n triggerRef,\n contentRef,\n contentId: useId(),\n titleId: useId(),\n descriptionId: useId(),\n open,\n onOpenChange: setOpen,\n onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),\n modal,\n children\n }\n );\n};\nDialog.displayName = DIALOG_NAME;\nvar TRIGGER_NAME = \"DialogTrigger\";\nvar DialogTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...triggerProps } = props;\n const context = useDialogContext(TRIGGER_NAME, __scopeDialog);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": context.open,\n \"aria-controls\": context.contentId,\n \"data-state\": getState(context.open),\n ...triggerProps,\n ref: composedTriggerRef,\n onClick: composeEventHandlers(props.onClick, context.onOpenToggle)\n }\n );\n }\n);\nDialogTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"DialogPortal\";\nvar [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME, {\n forceMount: void 0\n});\nvar DialogPortal = (props) => {\n const { __scopeDialog, forceMount, children, container } = props;\n const context = useDialogContext(PORTAL_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopeDialog, forceMount, children: React.Children.map(children, (child) => /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, container, children: child }) })) });\n};\nDialogPortal.displayName = PORTAL_NAME;\nvar OVERLAY_NAME = \"DialogOverlay\";\nvar DialogOverlay = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog);\n const { forceMount = portalContext.forceMount, ...overlayProps } = props;\n const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog);\n return context.modal ? /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(DialogOverlayImpl, { ...overlayProps, ref: forwardedRef }) }) : null;\n }\n);\nDialogOverlay.displayName = OVERLAY_NAME;\nvar Slot = createSlot(\"DialogOverlay.RemoveScroll\");\nvar DialogOverlayImpl = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...overlayProps } = props;\n const context = useDialogContext(OVERLAY_NAME, __scopeDialog);\n return (\n // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`\n // ie. when `Overlay` and `Content` are siblings\n /* @__PURE__ */ jsx(RemoveScroll, { as: Slot, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-state\": getState(context.open),\n ...overlayProps,\n ref: forwardedRef,\n style: { pointerEvents: \"auto\", ...overlayProps.style }\n }\n ) })\n );\n }\n);\nvar CONTENT_NAME = \"DialogContent\";\nvar DialogContent = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopeDialog);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsx(DialogContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(DialogContentNonModal, { ...contentProps, ref: forwardedRef }) });\n }\n);\nDialogContent.displayName = CONTENT_NAME;\nvar DialogContentModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);\n React.useEffect(() => {\n const content = contentRef.current;\n if (content) return hideOthers(content);\n }, []);\n return /* @__PURE__ */ jsx(\n DialogContentImpl,\n {\n ...props,\n ref: composedRefs,\n trapFocus: context.open,\n disableOutsidePointerEvents: true,\n onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {\n event.preventDefault();\n context.triggerRef.current?.focus();\n }),\n onPointerDownOutside: composeEventHandlers(props.onPointerDownOutside, (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n if (isRightClick) event.preventDefault();\n }),\n onFocusOutside: composeEventHandlers(\n props.onFocusOutside,\n (event) => event.preventDefault()\n )\n }\n );\n }\n);\nvar DialogContentNonModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n const hasInteractedOutsideRef = React.useRef(false);\n const hasPointerDownOutsideRef = React.useRef(false);\n return /* @__PURE__ */ jsx(\n DialogContentImpl,\n {\n ...props,\n ref: forwardedRef,\n trapFocus: false,\n disableOutsidePointerEvents: false,\n onCloseAutoFocus: (event) => {\n props.onCloseAutoFocus?.(event);\n if (!event.defaultPrevented) {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n event.preventDefault();\n }\n hasInteractedOutsideRef.current = false;\n hasPointerDownOutsideRef.current = false;\n },\n onInteractOutside: (event) => {\n props.onInteractOutside?.(event);\n if (!event.defaultPrevented) {\n hasInteractedOutsideRef.current = true;\n if (event.detail.originalEvent.type === \"pointerdown\") {\n hasPointerDownOutsideRef.current = true;\n }\n }\n const target = event.target;\n const targetIsTrigger = context.triggerRef.current?.contains(target);\n if (targetIsTrigger) event.preventDefault();\n if (event.detail.originalEvent.type === \"focusin\" && hasPointerDownOutsideRef.current) {\n event.preventDefault();\n }\n }\n }\n );\n }\n);\nvar DialogContentImpl = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props;\n const context = useDialogContext(CONTENT_NAME, __scopeDialog);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n useFocusGuards();\n return /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(\n FocusScope,\n {\n asChild: true,\n loop: true,\n trapped: trapFocus,\n onMountAutoFocus: onOpenAutoFocus,\n onUnmountAutoFocus: onCloseAutoFocus,\n children: /* @__PURE__ */ jsx(\n DismissableLayer,\n {\n role: \"dialog\",\n id: context.contentId,\n \"aria-describedby\": context.descriptionId,\n \"aria-labelledby\": context.titleId,\n \"data-state\": getState(context.open),\n ...contentProps,\n ref: composedRefs,\n onDismiss: () => context.onOpenChange(false)\n }\n )\n }\n ),\n /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(TitleWarning, { titleId: context.titleId }),\n /* @__PURE__ */ jsx(DescriptionWarning, { contentRef, descriptionId: context.descriptionId })\n ] })\n ] });\n }\n);\nvar TITLE_NAME = \"DialogTitle\";\nvar DialogTitle = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...titleProps } = props;\n const context = useDialogContext(TITLE_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(Primitive.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });\n }\n);\nDialogTitle.displayName = TITLE_NAME;\nvar DESCRIPTION_NAME = \"DialogDescription\";\nvar DialogDescription = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...descriptionProps } = props;\n const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(Primitive.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });\n }\n);\nDialogDescription.displayName = DESCRIPTION_NAME;\nvar CLOSE_NAME = \"DialogClose\";\nvar DialogClose = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...closeProps } = props;\n const context = useDialogContext(CLOSE_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n ...closeProps,\n ref: forwardedRef,\n onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))\n }\n );\n }\n);\nDialogClose.displayName = CLOSE_NAME;\nfunction getState(open) {\n return open ? \"open\" : \"closed\";\n}\nvar TITLE_WARNING_NAME = \"DialogTitleWarning\";\nvar [WarningProvider, useWarningContext] = createContext(TITLE_WARNING_NAME, {\n contentName: CONTENT_NAME,\n titleName: TITLE_NAME,\n docsSlug: \"dialog\"\n});\nvar TitleWarning = ({ titleId }) => {\n const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);\n const MESSAGE = `\\`${titleWarningContext.contentName}\\` requires a \\`${titleWarningContext.titleName}\\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \\`${titleWarningContext.titleName}\\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;\n React.useEffect(() => {\n if (titleId) {\n const hasTitle = document.getElementById(titleId);\n if (!hasTitle) console.error(MESSAGE);\n }\n }, [MESSAGE, titleId]);\n return null;\n};\nvar DESCRIPTION_WARNING_NAME = \"DialogDescriptionWarning\";\nvar DescriptionWarning = ({ contentRef, descriptionId }) => {\n const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);\n const MESSAGE = `Warning: Missing \\`Description\\` or \\`aria-describedby={undefined}\\` for {${descriptionWarningContext.contentName}}.`;\n React.useEffect(() => {\n const describedById = contentRef.current?.getAttribute(\"aria-describedby\");\n if (descriptionId && describedById) {\n const hasDescription = document.getElementById(descriptionId);\n if (!hasDescription) console.warn(MESSAGE);\n }\n }, [MESSAGE, contentRef, descriptionId]);\n return null;\n};\nvar Root = Dialog;\nvar Trigger = DialogTrigger;\nvar Portal = DialogPortal;\nvar Overlay = DialogOverlay;\nvar Content = DialogContent;\nvar Title = DialogTitle;\nvar Description = DialogDescription;\nvar Close = DialogClose;\nexport {\n Close,\n Content,\n Description,\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n Overlay,\n Portal,\n Root,\n Title,\n Trigger,\n WarningProvider,\n createDialogScope\n};\n//# sourceMappingURL=index.mjs.map\n","/**\n * @license lucide-react v0.536.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.536.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.536.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.536.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.536.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: \"M18 6 6 18\", key: \"1bl5f8\" }],\n [\"path\", { d: \"m6 6 12 12\", key: \"d8bk6v\" }]\n];\nconst X = createLucideIcon(\"x\", __iconNode);\n\nexport { __iconNode, X as default };\n//# sourceMappingURL=x.js.map\n","import * as React from \"react\";\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport { XIcon } from \"lucide-react\";\nimport { cn } from \"../../lib/utils\";\n\nfunction Dialog({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Root>) {\n return <DialogPrimitive.Root data-slot=\"dialog\" {...props} />;\n}\n\nfunction DialogTrigger({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Trigger>) {\n return <DialogPrimitive.Trigger data-slot=\"dialog-trigger\" {...props} />;\n}\n\nfunction DialogPortal({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Portal>) {\n return <DialogPrimitive.Portal data-slot=\"dialog-portal\" {...props} />;\n}\n\nfunction DialogClose({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Close>) {\n return <DialogPrimitive.Close data-slot=\"dialog-close\" {...props} />;\n}\n\nfunction DialogOverlay({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Overlay>) {\n return (\n <DialogPrimitive.Overlay\n data-slot=\"dialog-overlay\"\n className={cn(\n \"fixed inset-0 z-50 bg-[var(--overlay-bg)] data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0\",\n className\n )}\n {...props}\n />\n );\n}\n\nfunction DialogContent({\n className,\n children,\n showCloseButton = true,\n container,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Content> & {\n showCloseButton?: boolean;\n /** Mount portal inside this element so dialog inherits theme (data-theme) */\n container?: HTMLElement | null;\n}) {\n return (\n <DialogPortal data-slot=\"dialog-portal\" container={container ?? undefined}>\n <DialogOverlay />\n <DialogPrimitive.Content\n data-slot=\"dialog-content\"\n className={cn(\n \"fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border border-[var(--neutral-200)] bg-[var(--neutral-50)] p-4 shadow-lg duration-200 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:max-w-lg\",\n className,\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close\n data-slot=\"dialog-close\"\n className=\"absolute top-4 right-4 cursor-pointer rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-[var(--primary-200)] focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-[var(--primary-100)] data-[state=open]:text-[var(--primary-700)] [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\"\n >\n <XIcon />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Content>\n </DialogPortal>\n );\n}\n\nfunction DialogHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"dialog-header\"\n className={cn(\"flex flex-col gap-2 text-center sm:text-left\", className)}\n {...props}\n />\n );\n}\n\nfunction DialogFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"dialog-footer\"\n className={cn(\n \"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction DialogTitle({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Title>) {\n return (\n <DialogPrimitive.Title\n data-slot=\"dialog-title\"\n className={cn(\"text-lg leading-none font-semibold text-[var(--neutral-900)]\", className)}\n {...props}\n />\n );\n}\n\nfunction DialogDescription({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Description>) {\n return (\n <DialogPrimitive.Description\n data-slot=\"dialog-description\"\n className={cn(\"text-sm text-[var(--neutral-500)]\", className)}\n {...props}\n />\n );\n}\n\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n};\n","import type { ValidationErrorItem } from \"../utils/validation\";\nimport { Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, DialogFooter } from \"./ui/dialog\";\nimport { Button } from \"./ui/button\";\n\nexport interface ValidationDialogProps {\n open: boolean;\n onOpenChange: (open: boolean) => void;\n missingQuestionIds: string[];\n errors?: ValidationErrorItem[];\n onOk: () => void;\n /** Mount dialog inside this element to inherit theme */\n container?: HTMLElement | null;\n}\n\nexport function ValidationDialog({\n open,\n onOpenChange,\n missingQuestionIds,\n errors = [],\n onOk,\n container,\n}: ValidationDialogProps) {\n void missingQuestionIds;\n void errors;\n\n return (\n <Dialog open={open} onOpenChange={onOpenChange}>\n <DialogContent showCloseButton container={container} className=\"max-w-md border-[var(--neutral-200)] bg-[var(--neutral-50)]\">\n <DialogHeader>\n <DialogTitle id=\"validation-dialog-title\">\n Survey Incomplete\n </DialogTitle>\n </DialogHeader>\n <DialogDescription>\n Please fill all the required questions before submitting the survey.\n <br />\n Click OK to see which questions are still pending.\n </DialogDescription>\n <DialogFooter>\n <div className=\"flex w-full gap-3\">\n <Button onClick={onOk} text=\"OK\" className=\"flex-1\" />\n </div>\n </DialogFooter>\n </DialogContent>\n </Dialog>\n );\n}\n","/**\n * Progress calculation for survey completion.\n * Progress = (answered + valid mandatory) / (total mandatory) * 100.\n * If no mandatory questions, returns 100%.\n * Uses shared response helpers from responseHelpers.ts.\n */\n\nimport type { SurveyQuestion } from \"../types/survey.types\";\nimport { isQuestionAnswered, isQuestionValid } from \"./responseHelpers\";\n\nexport interface ProgressMetrics {\n overallProgress: number;\n totalQuestions: number;\n visibleQuestions: number;\n answeredQuestions: number;\n validQuestions: number;\n mandatoryQuestions: number;\n answeredMandatory: number;\n}\n\n/**\n * Calculate survey progress based on mandatory questions only.\n */\nexport function calculateWeightedProgress(\n questions: SurveyQuestion[],\n responses: Record<string, unknown>,\n visibleQuestionIds: string[]\n): ProgressMetrics {\n const visibleQuestions = questions.filter((q) =>\n visibleQuestionIds.includes(q.questionId)\n );\n const mandatoryQuestions = visibleQuestions.filter((q) => q.isMandatory);\n\n let answeredCount = 0;\n let validCount = 0;\n let answeredMandatory = 0;\n\n for (const q of visibleQuestions) {\n const value = responses[q.questionId];\n const answered = isQuestionAnswered(q, value);\n const valid = isQuestionValid(q, value);\n if (answered) answeredCount++;\n if (valid) validCount++;\n if (q.isMandatory && answered && valid) answeredMandatory++;\n }\n\n const overallProgress =\n mandatoryQuestions.length === 0\n ? 100\n : Math.round(\n (answeredMandatory / mandatoryQuestions.length) * 100\n );\n\n return {\n overallProgress: Math.min(100, Math.max(0, overallProgress)),\n totalQuestions: questions.length,\n visibleQuestions: visibleQuestions.length,\n answeredQuestions: answeredCount,\n validQuestions: validCount,\n mandatoryQuestions: mandatoryQuestions.length,\n answeredMandatory,\n };\n}\n","import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, DialogFooter } from \"./ui/dialog\";\nimport { Button } from \"./ui/button\";\n\nexport interface ExitConfirmationDialogProps {\n open: boolean;\n onOpenChange: (open: boolean) => void;\n onConfirm: () => void;\n onCancel: () => void;\n readOnly?: boolean;\n /** Mount dialog inside this element to inherit theme */\n container?: HTMLElement | null;\n}\n\nexport function ExitConfirmationDialog({\n open,\n onOpenChange,\n onConfirm,\n onCancel,\n readOnly = false,\n container,\n}: ExitConfirmationDialogProps) {\n return (\n <Dialog open={open} onOpenChange={onOpenChange}>\n <DialogContent showCloseButton container={container} className=\"max-w-md border-[var(--neutral-200)] bg-[var(--neutral-50)]\">\n <DialogHeader>\n <DialogTitle id=\"exit-dialog-title\">Exit Survey?</DialogTitle>\n </DialogHeader>\n <DialogDescription>\n {readOnly\n ? \"Are you sure you want to exit the survey?\"\n : \"Are you sure you want to exit? Your progress will be lost.\"}\n </DialogDescription>\n <DialogFooter className=\"flex gap-2 p-4\">\n <Button variant=\"outline\" onClick={onCancel} className=\"flex-1\">\n Cancel\n \n </Button>\n <Button type=\"button\" variant=\"default\" onClick={onConfirm} className=\"flex-1\">\n Yes, Exit\n \n </Button>\n </DialogFooter>\n </DialogContent>\n </Dialog>\n );\n}\n","export interface SubmissionLoadingOverlayProps {\n show: boolean;\n}\n\nexport function SubmissionLoadingOverlay({ show }: SubmissionLoadingOverlayProps) {\n if (!show) return null;\n\n return (\n <div\n className=\"fixed inset-0 z-[100] flex items-center justify-center bg-black/40\"\n role=\"status\"\n aria-live=\"polite\"\n aria-busy=\"true\"\n >\n <div className=\"flex flex-col items-center gap-4 rounded-lg bg-[var(--color-card)] p-6 shadow-xl border border-[var(--color-border)]\">\n <div\n className=\"h-10 w-10 animate-spin rounded-full border-2 border-primary border-t-transparent\"\n aria-hidden\n />\n <p className=\"text-sm font-medium text-textBlack\">Submitting...</p>\n </div>\n </div>\n );\n}\n","import { useState, useCallback, useEffect, useMemo, useRef } from \"react\";\nimport type { SurveyConfig, SurveySubmitPayload } from \"../types/survey.types\";\nimport { getInitialValue } from \"../types/survey.types\";\nimport {\n calculateVisibility,\n clearHiddenResponses,\n} from \"../utils/conditionalLogic\";\nimport { validateResponses } from \"../utils/validation\";\nimport { formatResponses } from \"../utils/responseFormatter\";\nimport { getEffectiveMediaConfig } from \"../utils/fileUtils\";\nimport { getQuestionStatusMap } from \"../utils/questionStatus\";\nimport { QuestionRenderer } from \"./QuestionRenderer\";\nimport { QuestionListCarousel } from \"./QuestionListCarousel\";\nimport { QuestionOverviewPanel } from \"./QuestionOverviewPanel\";\nimport { Button } from \"./ui/button\";\nimport { SurveyProgressBar } from \"./SurveyProgressBar\";\nimport { ValidationDialog } from \"./ValidationDialog\";\nimport { calculateWeightedProgress } from \"../utils/progressCalculation\";\nimport { ExitConfirmationDialog } from \"./ExitConfirmationDialog\";\nimport { SubmissionLoadingOverlay } from \"./SubmissionLoadingOverlay\";\n\nexport interface SurveyProgressBarConfig {\n /** \"position\" = progress by step index. \"completion\" = by answered mandatory (FMB logic). Default: \"completion\" */\n progressMode?: \"position\" | \"completion\";\n /** Show \"Question X of Y\" label. Default: true */\n showLabel?: boolean;\n /** Show percentage. Default: true */\n showPercentage?: boolean;\n /** Custom label format. Use {current} and {total} placeholders. Default: \"Question {current} of {total}\" */\n labelFormat?: string;\n /** Max width of the progress bar + percentage (e.g. \"240px\"). Default: \"240px\" */\n progressMaxWidth?: string;\n /** \"default\" = Radix Progress. \"gradient\" = FMB-style gradient bar. Default: \"gradient\" */\n variant?: \"default\" | \"gradient\";\n /** Additional class name for the progress bar container. */\n className?: string;\n}\n\nexport interface SurveyContainerProps {\n data: SurveyConfig;\n onSubmit: (payload: SurveySubmitPayload) => void;\n onSave?: (payload: SurveySubmitPayload) => void;\n onExit?: () => void;\n isSubmitting?: boolean;\n className?: string;\n showHeader?: boolean;\n /** Theme name (e.g. \"blue\", \"dark\"). Set by the consuming app via props. */\n theme?: string;\n /** Progress bar configuration. Omit to use defaults. Pass false to hide. */\n progressBar?: SurveyProgressBarConfig | false;\n}\n\ntype ResponsesState = Record<string, unknown>;\n\nexport function SurveyContainer({\n data,\n onSubmit,\n onSave,\n onExit,\n isSubmitting = false,\n className = \"\",\n showHeader = true,\n theme,\n progressBar = {},\n}: SurveyContainerProps) {\n const questions = data.questionList;\n const [responses, setResponses] = useState<ResponsesState>(() => {\n const initial: ResponsesState = {};\n questions.forEach((q) => {\n initial[q.questionId] = getInitialValue(q);\n });\n return initial;\n });\n\n const [visibleQuestions, setVisibleQuestions] = useState<string[]>(() => {\n const { visibleQuestions: vis } = calculateVisibility(questions, {}, []);\n return vis;\n });\n\n const [currentIndex, setCurrentIndex] = useState(0);\n const [overviewOpen, setOverviewOpen] = useState(false);\n const [validationOpen, setValidationOpen] = useState(false);\n const [exitOpen, setExitOpen] = useState(false);\n const [validationErrors, setValidationErrors] = useState<\n Array<{ questionId: string; message: string }>\n >([]);\n\n const mediaConfig = useMemo(\n () => getEffectiveMediaConfig(data.config),\n [data.config],\n );\n const questionStatusMap = useMemo(\n () => getQuestionStatusMap(questions, responses, visibleQuestions),\n [questions, responses, visibleQuestions],\n );\n\n const progressMetrics = useMemo(\n () => calculateWeightedProgress(questions, responses, visibleQuestions),\n [questions, responses, visibleQuestions],\n );\n\n const responsesForVisibility = useMemo(() => {\n const out: Record<string, { value: unknown }> = {};\n Object.entries(responses).forEach(([id, value]) => {\n out[id] = { value };\n });\n return out;\n }, [responses]);\n\n useEffect(() => {\n const { visibleQuestions: nextVisible, newlyHidden } = calculateVisibility(\n questions,\n responsesForVisibility,\n visibleQuestions,\n );\n const visibleChanged =\n nextVisible.length !== visibleQuestions.length ||\n nextVisible.some((id, i) => id !== visibleQuestions[i]);\n if (!visibleChanged && newlyHidden.length === 0) return;\n\n setVisibleQuestions(nextVisible);\n setCurrentIndex((prev) =>\n Math.min(prev, Math.max(0, nextVisible.length - 1)),\n );\n if (newlyHidden.length > 0) {\n setResponses((prev) => {\n const asMap = Object.fromEntries(\n Object.entries(prev).map(([k, v]) => [k, { value: v }]),\n );\n const cleared = clearHiddenResponses(asMap, newlyHidden);\n return Object.fromEntries(\n Object.entries(cleared).map(([k, v]) => [k, v.value]),\n );\n });\n }\n }, [responsesForVisibility, questions, visibleQuestions]);\n\n const currentQuestionId = visibleQuestions[currentIndex];\n const currentQuestion = questions.find(\n (q) => q.questionId === currentQuestionId,\n );\n const totalVisible = visibleQuestions.length;\n\n const handleResponseChange = useCallback(\n (value: unknown) => {\n if (!currentQuestionId) return;\n setResponses((prev) => ({ ...prev, [currentQuestionId]: value }));\n },\n [currentQuestionId],\n );\n\n const handleNext = useCallback(() => {\n if (currentIndex < totalVisible - 1) setCurrentIndex((i) => i + 1);\n }, [currentIndex, totalVisible]);\n\n const handlePrevious = useCallback(() => {\n if (currentIndex > 0) setCurrentIndex((i) => i - 1);\n }, [currentIndex]);\n\n const handleGoToQuestion = useCallback(\n (index: number) => {\n if (index >= 0 && index < totalVisible) {\n setCurrentIndex(index);\n setOverviewOpen(false);\n }\n },\n [totalVisible],\n );\n\n const handleCarouselSelect = useCallback(\n (questionId: string) => {\n const idx = visibleQuestions.indexOf(questionId);\n if (idx >= 0) handleGoToQuestion(idx);\n },\n [visibleQuestions, handleGoToQuestion],\n );\n\n const handleSubmit = useCallback(() => {\n const errors = validateResponses(questions, responses, visibleQuestions);\n if (errors.length > 0) {\n setValidationErrors(errors);\n setValidationOpen(true);\n return;\n }\n const payload = formatResponses(data, responses, visibleQuestions);\n onSubmit(payload);\n }, [data, questions, responses, visibleQuestions, onSubmit]);\n\n const handleValidationOk = useCallback(() => {\n setValidationOpen(false);\n setOverviewOpen(true);\n }, []);\n\n const handleExitClick = useCallback(() => {\n setExitOpen(true);\n }, []);\n\n const handleExitConfirm = useCallback(() => {\n setExitOpen(false);\n const payload = formatResponses(data, responses, visibleQuestions);\n onSave?.(payload);\n onExit?.();\n }, [data, responses, visibleQuestions, onSave, onExit]);\n\n const isLast = currentIndex === totalVisible - 1;\n const themeWrapperRef = useRef<HTMLDivElement | null>(null);\n\n const wrapperProps = theme ? { \"data-theme\": theme, ref: themeWrapperRef } : {};\n\n if (!currentQuestion) {\n return (\n <div {...wrapperProps} className=\"flex min-h-screen items-center justify-center\">\n <p className=\"text-[var(--color-textGray)]\">Loading survey...</p>\n </div>\n );\n }\n\n return (\n <div\n {...wrapperProps}\n className={`min-h-screen rounded-lg shadow-sm bg-[var(--neutral-50)] ${className}`}\n >\n {showHeader && (\n <header className=\"sticky top-0 z-40 border-b bg-[var(--header-bg,var(--primary-50))] border-[var(--header-border,var(--primary-200))]\">\n <div className=\"\">\n <div className=\"flex items-center justify-between px-4 py-3\">\n <h2 className=\"text-xl font-medium text-[var(--header-title,var(--primary-700))]\">{data.surveyName}</h2>\n <div className=\"flex items-center gap-4\">\n {onExit && (\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"icon\"\n onClick={handleExitClick}\n className=\"text-[var(--color-textGray)] hover:bg-[var(--neutral-100)] hover:text-[var(--color-textBlack)]\"\n title=\"Exit Survey\"\n aria-label=\"Exit survey\"\n >\n ✕\n </Button>\n )}\n </div>\n </div>\n </div>\n </header>\n )}\n\n {/* Question list carousel + progress bar */}\n <div className=\"space-y-3 bg-[var(--neutral-50)] px-4 py-3 shadow-sm\">\n <QuestionListCarousel\n questions={visibleQuestions}\n activeQuestionId={currentQuestionId}\n onQuestionSelect={handleCarouselSelect}\n questionStatusMap={questionStatusMap}\n />\n {progressBar !== false && (\n <SurveyProgressBar\n currentIndex={currentIndex}\n totalSteps={totalVisible}\n progressMode={progressBar.progressMode ?? \"completion\"}\n progressValue={progressMetrics.overallProgress}\n showLabel={progressBar.showLabel}\n showPercentage={progressBar.showPercentage}\n labelFormat={progressBar.labelFormat}\n progressMaxWidth={progressBar.progressMaxWidth}\n className={progressBar.className}\n />\n )}\n </div>\n\n {/* Question Container */}\n <main\n className=\"flex flex-col\"\n style={{\n minHeight: showHeader ? \"calc(100vh - 130px)\" : \"calc(100vh - 70px)\",\n }}\n >\n <div className=\"flex min-h-0 flex-1 flex-col overflow-hidden p-4\">\n <div className=\"relative flex-1 overflow-hidden min-h-0\">\n <div className=\"absolute inset-0 overflow-y-auto\">\n <div\n key={currentQuestionId}\n className=\"animate-question-enter rounded-xl bg-[var(--color-card)] p-6 shadow-sm border border-[var(--color-border)]\"\n >\n <div className=\"mb-3\">\n <span className=\"rounded-full bg-[var(--primary-100)] px-3 py-1 text-md font-medium text-[var(--primary-600)]\">\n {currentQuestion.questionId}\n </span>\n </div>\n <h2 className=\"text-lg leading-relaxed font-medium text-[var(--color-textBlack)]\">\n {currentQuestion.description}\n {currentQuestion.isMandatory && (\n <span className=\"ml-1 text-error\">*</span>\n )}\n </h2>\n {currentQuestion.textLimitCharacter != null && (\n <p className=\"mt-2 text-xs text-[var(--color-textGray)]\">\n Maximum {currentQuestion.textLimitCharacter} characters\n </p>\n )}\n {currentQuestion.textInputType === \"Numeric\" && (\n <p className=\"mt-2 text-xs text-[var(--color-textGray)]\">\n Please enter numeric value only (e.g. 1, 2, 3)\n </p>\n )}\n <div className=\"mt-6 flex max-w-4xl flex-1 flex-col justify-center\">\n <QuestionRenderer\n question={currentQuestion}\n value={responses[currentQuestionId]}\n onChange={handleResponseChange}\n validationErrors={validationErrors}\n mediaConfig={mediaConfig}\n />\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <footer className=\"flex-shrink-0 p-4 border-t border-[var(--color-borderGray)]\">\n <div className=\"flex justify-center gap-3 md:justify-end\">\n <Button\n type=\"button\"\n variant=\"outline\"\n onClick={handlePrevious}\n disabled={currentIndex === 0}\n className=\"min-w-[140px] text-md font-semibold\"\n prefixIcon={\n <svg\n className=\"h-5 w-5 transition-transform duration-200 group-hover:-translate-x-1\"\n fill=\"none\"\n stroke=\"currentColor\"\n viewBox=\"0 0 24 24\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M15 19l-7-7 7-7\"\n />\n </svg>\n }\n >\n Previous\n </Button>\n {!isLast ? (\n <Button\n type=\"button\"\n onClick={handleNext}\n className=\"min-w-[140px] text-md font-semibold\"\n suffixIcon={\n <svg\n className={`h-5 w-5 transition-transform duration-200 group-hover:translate-x-1`}\n fill=\"none\"\n stroke=\"currentColor\"\n viewBox=\"0 0 24 24\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M9 5l7 7-7 7\"\n />\n </svg>\n }\n text=\"Next\"\n >\n </Button>\n ) : (\n <Button\n type=\"button\"\n onClick={handleSubmit}\n className=\"min-w-[140px] text-md font-semibold\"\n suffixIcon={\n <svg\n className=\"h-5 w-5\"\n fill=\"none\"\n stroke=\"currentColor\"\n viewBox=\"0 0 24 24\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z\"\n />\n </svg>\n }\n text=\"Submit\"\n >\n </Button>\n )}\n </div>\n </footer>\n </main>\n\n <QuestionOverviewPanel\n isOpen={overviewOpen}\n onClose={() => setOverviewOpen(false)}\n questions={questions}\n visibleQuestionIds={visibleQuestions}\n responses={responses}\n currentQuestionIndex={currentIndex}\n onGoToQuestion={handleGoToQuestion}\n />\n\n <ValidationDialog\n open={validationOpen}\n onOpenChange={setValidationOpen}\n missingQuestionIds={validationErrors.map((e) => e.questionId)}\n errors={validationErrors}\n onOk={handleValidationOk}\n container={themeWrapperRef.current}\n />\n\n <ExitConfirmationDialog\n open={exitOpen}\n onOpenChange={setExitOpen}\n onConfirm={handleExitConfirm}\n onCancel={() => setExitOpen(false)}\n container={themeWrapperRef.current}\n />\n\n <SubmissionLoadingOverlay show={isSubmitting} />\n </div>\n );\n}\n","import type { SurveyConfig, SurveySubmitPayload } from \"../types/survey.types\";\nimport { SurveyContainer } from \"./SurveyContainer\";\nimport type { SurveyProgressBarConfig } from \"./SurveyContainer\";\n\nexport interface SurveyRendererProps {\n data: SurveyConfig;\n onSubmit: (payload: SurveySubmitPayload) => void;\n onSave?: (payload: SurveySubmitPayload) => void;\n onExit?: () => void;\n isSubmitting?: boolean;\n className?: string;\n showHeader?: boolean;\n /** Theme name (e.g. \"blue\", \"dark\"). Provided via props by the consuming app. */\n theme?: string;\n /** Progress bar config. Omit for defaults. Pass false to hide. */\n progressBar?: SurveyProgressBarConfig | false;\n}\n\n/**\n * Main entry component. Renders a full survey from JSON config.\n * Supports: conditional questions, validation, media uploads, progress bar, themes.\n * Wrap your app root (or survey container) with data-theme for styling.\n */\nexport function SurveyRenderer({\n data,\n onSubmit,\n onSave,\n onExit,\n isSubmitting = false,\n className = \"\",\n showHeader = true,\n theme,\n progressBar,\n}: SurveyRendererProps) {\n return (\n <SurveyContainer\n data={data}\n onSubmit={onSubmit}\n onSave={onSave}\n onExit={onExit}\n isSubmitting={isSubmitting}\n className={className}\n showHeader={showHeader}\n theme={theme}\n progressBar={progressBar}\n />\n );\n}\n"],"names":["f","require$$0","k","l","m","n","p","q","c","a","g","b","d","e","h","reactJsxRuntime_production_min","React","REACT_ELEMENT_TYPE","REACT_PORTAL_TYPE","REACT_FRAGMENT_TYPE","REACT_STRICT_MODE_TYPE","REACT_PROFILER_TYPE","REACT_PROVIDER_TYPE","REACT_CONTEXT_TYPE","REACT_FORWARD_REF_TYPE","REACT_SUSPENSE_TYPE","REACT_SUSPENSE_LIST_TYPE","REACT_MEMO_TYPE","REACT_LAZY_TYPE","REACT_OFFSCREEN_TYPE","MAYBE_ITERATOR_SYMBOL","FAUX_ITERATOR_SYMBOL","getIteratorFn","maybeIterable","maybeIterator","ReactSharedInternals","error","format","_len2","args","_key2","printWarning","level","ReactDebugCurrentFrame","stack","argsWithFormat","item","enableScopeAPI","enableCacheElement","enableTransitionTracing","enableLegacyHidden","enableDebugTracing","REACT_MODULE_REFERENCE","isValidElementType","type","getWrappedName","outerType","innerType","wrapperName","displayName","functionName","getContextName","getComponentNameFromType","context","provider","outerName","lazyComponent","payload","init","assign","disabledDepth","prevLog","prevInfo","prevWarn","prevError","prevGroup","prevGroupCollapsed","prevGroupEnd","disabledLog","disableLogs","props","reenableLogs","ReactCurrentDispatcher","prefix","describeBuiltInComponentFrame","name","source","ownerFn","x","match","reentry","componentFrameCache","PossiblyWeakMap","describeNativeComponentFrame","fn","construct","frame","control","previousPrepareStackTrace","previousDispatcher","Fake","sample","sampleLines","controlLines","s","_frame","syntheticFrame","describeFunctionComponentFrame","shouldConstruct","Component","prototype","describeUnknownElementTypeFrameInDEV","hasOwnProperty","loggedTypeFailures","setCurrentlyValidatingElement","element","owner","checkPropTypes","typeSpecs","values","location","componentName","has","typeSpecName","error$1","err","ex","isArrayImpl","isArray","typeName","value","hasToStringTag","willCoercionThrow","testStringCoercion","checkKeyStringCoercion","ReactCurrentOwner","RESERVED_PROPS","specialPropKeyWarningShown","specialPropRefWarningShown","hasValidRef","config","getter","hasValidKey","warnIfStringRefCannotBeAutoConverted","self","defineKeyPropWarningGetter","warnAboutAccessingKey","defineRefPropWarningGetter","warnAboutAccessingRef","ReactElement","key","ref","jsxDEV","maybeKey","propName","defaultProps","ReactCurrentOwner$1","ReactDebugCurrentFrame$1","setCurrentlyValidatingElement$1","propTypesMisspellWarningShown","isValidElement","object","getDeclarationErrorAddendum","getSourceInfoErrorAddendum","ownerHasKeyUseWarning","getCurrentComponentErrorInfo","parentType","info","parentName","validateExplicitKey","currentComponentErrorInfo","childOwner","validateChildKeys","node","i","child","iteratorFn","iterator","step","validatePropTypes","propTypes","_name","validateFragmentProps","fragment","keys","didWarnAboutKeySpread","jsxWithValidation","isStaticChildren","validType","sourceInfo","typeString","children","beforeExample","afterExample","jsxWithValidationStatic","jsxWithValidationDynamic","jsx","jsxs","reactJsxRuntime_development","jsxRuntimeModule","require$$1","SUPPORTED_QUESTION_TYPES","isSupportedQuestionType","getDefaultValue","question","out","_a","r","getInitialValue","ua","rows","record","row","getQuestionId","evaluateCondition","responseValue","conditionValue","calculateVisibility","questions","responses","previouslyVisible","allIds","visibleSet","childIds","ids","id","parentResponse","childQuestionIds","childId","addDescendantsRecursive","visibleArray","hiddenArray","prevSet","newlyVisible","newlyHidden","parentId","parent","clearHiddenResponses","hiddenQuestionIds","hidden","isEmpty","obj","v","validateTextLimit","limit","validateNumericInput","validateMinMax","min","max","validateResponses","visibleQuestionIds","questionMap","errors","questionId","limitErr","numErr","rangeErr","canSubmit","formatDateToYYYYMMDD","y","day","formatQuestionAnswer","formatResponses","responsesArray","userAnswer","DEFAULT_MEDIA_ALLOWED_TYPES","DEFAULT_MEDIA_MAX_SIZE_MB","isValueFileObject","MEDIA_ALLOWED_TYPES","MEDIA_MAX_SIZE_MB","MEDIA_QUESTION_TYPES","getEffectiveMediaConfig","dataConfig","allowedTypes","maxSizeBytes","entry","types","sizeMB","maxMB","validateFileType","file","questionType","mediaConfig","allowed","t","validateFileSize","maxBytes","validateFile","typeResult","fileToFileObject","resolve","reject","reader","result","base64","validateInputType","inputType","isQuestionAnswered","tableValue","expectedRows","isQuestionValid","fieldValue","getQuestionStatusMap","readOnly","map","questionById","answered","valid","MCQSelect","options","selectionMode","selectedOptions","onOptionSelect","className","disabled","handleOptionClick","optionId","currentSelections","isOptionSelected","option","isSelected","clsx","concatArrays","array1","array2","combinedArray","createClassValidatorObject","classGroupId","validator","createClassPartObject","nextPart","validators","CLASS_PART_SEPARATOR","EMPTY_CONFLICTS","ARBITRARY_PROPERTY_PREFIX","createClassGroupUtils","classMap","createClassMap","conflictingClassGroups","conflictingClassGroupModifiers","getGroupIdForArbitraryProperty","classParts","startIndex","getGroupRecursive","hasPostfixModifier","modifierConflicts","baseConflicts","classPartObject","currentClassPart","nextClassPartObject","classRest","validatorsLength","validatorObj","content","colonIndex","property","theme","classGroups","processClassGroups","group","processClassesRecursively","classGroup","len","classDefinition","processClassDefinition","processStringDefinition","processFunctionDefinition","processObjectDefinition","classPartObjectToEdit","getPart","isThemeGetter","entries","path","current","parts","part","next","func","createLruCache","maxCacheSize","cacheSize","cache","previousCache","update","IMPORTANT_MODIFIER","MODIFIER_SEPARATOR","EMPTY_MODIFIERS","createResultObject","modifiers","hasImportantModifier","baseClassName","maybePostfixModifierPosition","isExternal","createParseClassName","experimentalParseClassName","parseClassName","bracketDepth","parenDepth","modifierStart","postfixModifierPosition","index","currentCharacter","baseClassNameWithImportantModifier","fullPrefix","parseClassNameOriginal","createSortModifiers","modifierWeights","mod","currentSegment","modifier","isArbitrary","isOrderSensitive","createConfigUtils","SPLIT_CLASSES_REGEX","mergeClassList","classList","configUtils","getClassGroupId","getConflictingClassGroupIds","sortModifiers","classGroupsInConflict","classNames","originalClassName","variantModifier","modifierId","classId","conflictGroups","twJoin","classLists","argument","resolvedValue","string","toValue","mix","createTailwindMerge","createConfigFirst","createConfigRest","cacheGet","cacheSet","functionToCall","initTailwindMerge","previousConfig","createConfigCurrent","tailwindMerge","cachedResult","fallbackThemeArr","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","isArbitraryWeight","isLabelWeight","isArbitraryFamilyName","isLabelFamilyName","isArbitraryPosition","isLabelPosition","isArbitraryImage","isLabelImage","isArbitraryShadow","isLabelShadow","isArbitraryVariableLength","getIsArbitraryVariable","isArbitraryVariableFamilyName","isArbitraryVariablePosition","isArbitraryVariableSize","isArbitraryVariableImage","isArbitraryVariableShadow","isArbitraryVariableWeight","testLabel","testValue","shouldMatchNoLabel","label","twMerge","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","scaleSizingInline","scaleSizingBlock","scaleColor","scaleBgPosition","scaleBgRepeat","scaleBgSize","scaleGradientStopPosition","scaleRadius","scaleBorderWidth","scaleLineStyle","scaleBlendMode","scaleMaskImagePosition","scaleBlur","scaleRotate","scaleScale","scaleSkew","scaleTranslate","cn","inputs","Textarea","TextResponse","onChange","placeholder","minRows","maxRows","characterLimit","handleChange","count","isNearLimit","isAtLimit","Dropdown","required","isOpen","setIsOpen","useState","highlightedIndex","setHighlightedIndex","dropdownRef","useRef","selectedOption","opt","displayValue","useEffect","handleClickOutside","handleKeyDown","enabled","handleToggle","o","handleSelect","baseInput","enIdx","isHighlighted","TabularInput","columns","inputConfig","onValueChange","getValue","rowId","baseClasses","renderInput","col","rowIndex","_b","formatDatePPP","MONTHS_FULL","WEEKDAYS","DatePicker","selectedDate","onDateSelect","minDate","maxDate","currentMonth","setCurrentMonth","containerRef","handleClick","handleDateSelect","date","handleMonthChange","monthValue","handleYearChange","yearValue","currentYear","startYear","endYear","years","_","isDateDisabled","firstDay","daysInMonth","leadingEmpty","display","month","year","QUESTION_TYPE_DISPLAY","MediaIcon","MediaUpload","isDragOver","setIsDragOver","errorMsg","setErrorMsg","inputRef","accept","allowedTypesForMessage","supportedMessage","processFile","handleDrop","remove","src","ErrorMessage","MediaResponse","_question","QuestionMapper","touched","getDropdownOptions","getMCQOptions","getTabularConfig","header","getTabularValue","rowValue","handleTabularChange","selected","fileValue","tabularConfig","QuestionRenderer","validationErrors","questionErrors","displayError","getStatusClass","status","getStatusColor","getStatusIconClass","QuestionListCarousel","activeQuestionId","onQuestionSelect","questionStatusMap","scrollRef","itemRefs","activeIndex","hasMultiple","el","handleLeft","useCallback","prevId","handleRight","nextId","isActive","statusClass","getStatusIcon","iconClass","QuestionOverviewPanel","onClose","currentQuestionIndex","onGoToQuestion","getQuestionStatus","isAnswered","isValid","Fragment","isCurrent","setRef","composeRefs","refs","hasCleanup","cleanups","cleanup","useComposedRefs","use","isPromiseLike","isLazyComponent","createSlot","ownerName","SlotClone","createSlotClone","Slot2","forwardedRef","slotProps","childrenArray","slottable","isSlottable","newElement","newChildren","Slot","childrenRef","getElementRef","props2","mergeProps","SLOTTABLE_IDENTIFIER","childProps","overrideProps","slotPropValue","childPropValue","mayWarn","falsyToString","cx","buttonVariants","base","_config_compoundVariants","variants","defaultVariants","getVariantClassNames","variant","variantProp","defaultVariantProp","variantKey","propsWithoutUndefined","acc","param","getCompoundVariantClassNames","cvClass","cvClassName","compoundVariantOptions","getBgColorClass","color","getTextColorClass","Button","size","asChild","bgColor","textColor","text","prefixIcon","suffixIcon","Comp","customColorClasses","createContextScope","scopeName","createContextScopeDeps","defaultContexts","createContext3","rootComponentName","defaultContext","BaseContext","Provider","scope","Context","useContext2","consumerName","createScope","scopeContexts","contexts","composeContextScopes","scopes","baseScope","scopeHooks","createScope2","overrideScopes","nextScopes","nextScopes2","useScope","currentScope","NODES","Primitive","primitive","Node","primitiveProps","PROGRESS_NAME","DEFAULT_MAX","createProgressContext","ProgressProvider","useProgressContext","Progress","__scopeProgress","valueProp","maxProp","getValueLabel","defaultGetValueLabel","progressProps","isValidMaxNumber","getInvalidMaxError","isValidValueNumber","getInvalidValueError","valueLabel","getProgressState","INDICATOR_NAME","ProgressIndicator","indicatorProps","maxValue","propValue","Root","Indicator","ProgressPrimitive.Root","ProgressPrimitive.Indicator","defaultLabelFormat","SurveyProgressBar","currentIndex","totalSteps","progressMode","progressValue","showLabel","showPercentage","labelFormat","progressMaxWidth","progress","composeEventHandlers","originalEventHandler","ourEventHandler","checkForDefaultPrevented","event","createContext2","useLayoutEffect2","useReactId","useId","deterministicId","setId","useLayoutEffect","reactId","useInsertionEffect","useControllableState","prop","defaultProp","caller","uncontrolledProp","setUncontrolledProp","onChangeRef","useUncontrolledState","isControlled","isControlledRef","wasControlled","setValue","nextValue","value2","isFunction","prevValueRef","dispatchDiscreteCustomEvent","target","ReactDOM","useCallbackRef","callback","callbackRef","useEscapeKeydown","onEscapeKeyDownProp","ownerDocument","onEscapeKeyDown","DISMISSABLE_LAYER_NAME","CONTEXT_UPDATE","POINTER_DOWN_OUTSIDE","FOCUS_OUTSIDE","originalBodyPointerEvents","DismissableLayerContext","DismissableLayer","disableOutsidePointerEvents","onPointerDownOutside","onFocusOutside","onInteractOutside","onDismiss","layerProps","setNode","force","composedRefs","node2","layers","highestLayerWithOutsidePointerEventsDisabled","highestLayerWithOutsidePointerEventsDisabledIndex","isBodyPointerEventsDisabled","isPointerEventsEnabled","pointerDownOutside","usePointerDownOutside","isPointerDownOnBranch","branch","focusOutside","useFocusOutside","dispatchUpdate","handleUpdate","BRANCH_NAME","DismissableLayerBranch","handlePointerDownOutside","isPointerInsideReactTreeRef","handleClickRef","handlePointerDown","handleAndDispatchPointerDownOutsideEvent2","handleAndDispatchCustomEvent","eventDetail","timerId","handleFocusOutside","isFocusInsideReactTreeRef","handleFocus","handler","detail","discrete","AUTOFOCUS_ON_MOUNT","AUTOFOCUS_ON_UNMOUNT","EVENT_OPTIONS","FOCUS_SCOPE_NAME","FocusScope","loop","trapped","onMountAutoFocusProp","onUnmountAutoFocusProp","scopeProps","container","setContainer","onMountAutoFocus","onUnmountAutoFocus","lastFocusedElementRef","focusScope","handleFocusIn2","focus","handleFocusOut2","relatedTarget","handleMutations2","mutations","mutation","mutationObserver","focusScopesStack","previouslyFocusedElement","mountEvent","focusFirst","removeLinks","getTabbableCandidates","unmountEvent","isTabKey","focusedElement","container2","first","last","getTabbableEdges","candidates","select","candidate","findVisible","nodes","walker","isHiddenInput","elements","isHidden","upTo","isSelectableInput","createFocusScopesStack","activeFocusScope","arrayRemove","array","updatedArray","items","PORTAL_NAME","Portal","containerProp","portalProps","mounted","setMounted","useStateMachine","initialState","machine","state","Presence","present","presence","usePresence","React2","stylesRef","prevPresentRef","prevAnimationNameRef","send","currentAnimationName","getAnimationName","styles","wasPresent","prevAnimationName","timeoutId","ownerWindow","handleAnimationEnd","isCurrentAnimation","currentFillMode","handleAnimationStart","useFocusGuards","edgeGuards","createFocusGuard","__assign","__rest","__spreadArray","to","from","pack","ar","zeroRightClassName","fullWidthClassName","noScrollbarsClassName","removedBarSizeVariable","assignRef","initialValue","useIsomorphicLayoutEffect","currentValues","useMergeRefs","defaultValue","newValue","oldValue","prevRefs_1","nextRefs_1","current_1","ItoI","innerCreateMedium","defaults","middleware","buffer","assigned","medium","data","cb","cbs","pendingQueue","executeQueue","cycle","filter","createSidecarMedium","SideCar","sideCar","rest","Target","exportSidecar","exported","effectCar","nothing","RemoveScroll","parentRef","callbacks","setCallbacks","forwardProps","removeScrollBar","shards","noRelative","noIsolation","inert","allowPinchZoom","Container","gapMode","containerProps","getNonce","makeStyleTag","tag","nonce","injectStyles","css","insertStyleTag","head","stylesheetSingleton","counter","stylesheet","style","styleHookSingleton","sheet","isDynamic","styleSingleton","useStyle","Sheet","dynamic","zeroGap","parse","getOffset","cs","left","top","right","getGapWidth","offsets","documentWidth","windowWidth","Style","lockAttribute","getStyles","allowRelative","important","gap","getCurrentUseCounter","useLockAttribute","newCounter","RemoveScrollBar","noImportant","passiveSupported","nonPassive","alwaysContainsScroll","elementCanBeScrolled","overflow","elementCouldBeVScrolled","elementCouldBeHScrolled","locationCouldBeScrolled","axis","isScrollable","elementCouldBeScrolled","getScrollVariables","scrollHeight","clientHeight","getVScrollVariables","scrollTop","getHScrollVariables","scrollLeft","scrollWidth","clientWidth","getDirectionFactor","direction","handleScroll","endTarget","sourceDelta","noOverscroll","directionFactor","delta","targetInLock","shouldCancelScroll","isDeltaPositive","availableScroll","availableScrollTop","position","scroll_1","capacity","elementScroll","parent_1","getTouchXY","getDeltaXY","extractRef","deltaCompare","generateStyle","idCounter","lockStack","RemoveScrollSideCar","shouldPreventQueue","touchStartRef","activeAxis","lastProps","allow_1","shouldCancelEvent","touch","touchStart","deltaX","deltaY","currentAxis","moveDirection","selection","anchorNode","isTouchingSelection","canBeScrolledInMainDirection","cancelingAxis","shouldPrevent","_event","sourceEvent","shardNodes","shouldStop","shouldCancel","should","getOutermostShadowParent","scrollTouchStart","scrollWheel","scrollTouchMove","inst","shadowParent","ReactRemoveScroll","getDefaultParent","originalTarget","sampleTarget","counterMap","uncontrolledNodes","markerMap","lockCount","unwrapHost","correctTargets","targets","correctedTarget","applyAttributeToOthers","parentNode","markerName","controlAttribute","markerCounter","hiddenNodes","elementsToKeep","elementsToStop","keep","deep","attr","alreadyHidden","counterValue","markerValue","hideOthers","activeParentNode","DIALOG_NAME","createDialogContext","DialogProvider","useDialogContext","Dialog","__scopeDialog","openProp","defaultOpen","onOpenChange","modal","triggerRef","contentRef","open","setOpen","prevOpen","TRIGGER_NAME","DialogTrigger","triggerProps","composedTriggerRef","getState","PortalProvider","usePortalContext","DialogPortal","forceMount","PortalPrimitive","OVERLAY_NAME","DialogOverlay","portalContext","overlayProps","DialogOverlayImpl","CONTENT_NAME","DialogContent","contentProps","DialogContentModal","DialogContentNonModal","DialogContentImpl","originalEvent","ctrlLeftClick","hasInteractedOutsideRef","hasPointerDownOutsideRef","trapFocus","onOpenAutoFocus","onCloseAutoFocus","TitleWarning","DescriptionWarning","TITLE_NAME","DialogTitle","titleProps","DESCRIPTION_NAME","DialogDescription","descriptionProps","CLOSE_NAME","DialogClose","closeProps","TITLE_WARNING_NAME","WarningProvider","useWarningContext","createContext","titleId","titleWarningContext","MESSAGE","DESCRIPTION_WARNING_NAME","descriptionId","describedById","Overlay","Content","Title","Description","Close","toKebabCase","toCamelCase","p1","p2","toPascalCase","camelCase","mergeClasses","classes","hasA11yProp","defaultAttributes","Icon","forwardRef","strokeWidth","absoluteStrokeWidth","iconNode","createElement","attrs","createLucideIcon","iconName","X","DialogPrimitive.Root","DialogPrimitive.Portal","DialogPrimitive.Overlay","showCloseButton","DialogPrimitive.Content","DialogPrimitive.Close","XIcon","DialogHeader","DialogFooter","DialogPrimitive.Title","DialogPrimitive.Description","ValidationDialog","missingQuestionIds","onOk","calculateWeightedProgress","visibleQuestions","mandatoryQuestions","answeredCount","validCount","answeredMandatory","overallProgress","ExitConfirmationDialog","onConfirm","onCancel","SubmissionLoadingOverlay","show","SurveyContainer","onSubmit","onSave","onExit","isSubmitting","showHeader","progressBar","setResponses","initial","setVisibleQuestions","vis","setCurrentIndex","overviewOpen","setOverviewOpen","validationOpen","setValidationOpen","exitOpen","setExitOpen","setValidationErrors","useMemo","progressMetrics","responsesForVisibility","nextVisible","prev","asMap","cleared","currentQuestionId","currentQuestion","totalVisible","handleResponseChange","handleNext","handlePrevious","handleGoToQuestion","handleCarouselSelect","idx","handleSubmit","handleValidationOk","handleExitClick","handleExitConfirm","isLast","themeWrapperRef","wrapperProps","SurveyRenderer"],"mappings":";;;;;;;;6CASa,IAAIA,EAAEC,EAAiBC,EAAE,OAAO,IAAI,eAAe,EAAEC,EAAE,OAAO,IAAI,gBAAgB,EAAEC,EAAE,OAAO,UAAU,eAAeC,EAAEL,EAAE,mDAAmD,kBAAkBM,EAAE,CAAC,IAAI,GAAG,IAAI,GAAG,OAAO,GAAG,SAAS,EAAE,EAClP,SAASC,EAAEC,EAAEC,EAAEC,EAAE,CAAC,IAAIC,EAAEC,EAAE,CAAA,EAAGC,EAAE,KAAKC,EAAE,KAAcJ,IAAT,SAAaG,EAAE,GAAGH,GAAYD,EAAE,MAAX,SAAiBI,EAAE,GAAGJ,EAAE,KAAcA,EAAE,MAAX,SAAiBK,EAAEL,EAAE,KAAK,IAAIE,KAAKF,EAAEL,EAAE,KAAKK,EAAEE,CAAC,GAAG,CAACL,EAAE,eAAeK,CAAC,IAAIC,EAAED,CAAC,EAAEF,EAAEE,CAAC,GAAG,GAAGH,GAAGA,EAAE,aAAa,IAAIG,KAAKF,EAAED,EAAE,aAAaC,EAAWG,EAAED,CAAC,IAAZ,SAAgBC,EAAED,CAAC,EAAEF,EAAEE,CAAC,GAAG,MAAM,CAAC,SAAST,EAAE,KAAKM,EAAE,IAAIK,EAAE,IAAIC,EAAE,MAAMF,EAAE,OAAOP,EAAE,OAAO,CAAC,CAAC,OAAAU,YAAiBZ,EAAEY,GAAA,IAAYR,EAAEQ,GAAA,KAAaR;;;;;;;;yCCEtW,QAAQ,IAAI,WAA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AAAt8B,EACA,YAAAu8B,CACF,EAAwB,CACtB,OACEvmC,EAAAA,IAACimC,GAAA,CACC,KAAAlS,EACA,SAAAmS,EACA,OAAAC,EACA,OAAAC,EACA,aAAAC,EACA,UAAAh/B,EACA,WAAAi/B,EACA,MAAAt8B,EACA,YAAAu8B,CAAA,CAAA,CAGN","x_google_ignoreList":[0,1,2,12,13,28,29,30,33,34,35,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79]}
1
+ {"version":3,"file":"surveyRender.umd.cjs","sources":["../node_modules/react/cjs/react-jsx-runtime.production.min.js","../node_modules/react/cjs/react-jsx-runtime.development.js","../node_modules/react/jsx-runtime.js","../src/converters/types.ts","../src/converters/detectFormat.ts","../src/converters/plcToFmbInput.ts","../src/converters/fmbToPlcOutput.ts","../src/types/survey.types.ts","../src/utils/conditionalLogic.ts","../src/utils/validation.ts","../src/utils/responseFormatter.ts","../src/helpers/constants.ts","../src/utils/fileUtils.ts","../src/utils/responseHelpers.ts","../src/utils/questionStatus.ts","../src/components/custom/MCQSelect.tsx","../node_modules/clsx/dist/clsx.mjs","../node_modules/tailwind-merge/dist/bundle-mjs.mjs","../src/lib/utils.ts","../src/components/ui/textarea.tsx","../src/components/custom/TextResponse.tsx","../src/components/custom/Dropdown.tsx","../src/components/custom/TabularInput.tsx","../src/components/custom/DatePicker.tsx","../src/components/custom/MediaUpload.tsx","../src/components/ui/ErrorMessage.tsx","../src/components/custom/MediaResponse.tsx","../src/components/QuestionMapper.tsx","../src/components/QuestionRenderer.tsx","../src/utils/themeStatusStyles.ts","../src/components/QuestionListCarousel.tsx","../src/components/QuestionOverviewPanel.tsx","../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","../src/components/ui/button-variants.ts","../src/components/ui/button.tsx","../node_modules/@radix-ui/react-progress/node_modules/@radix-ui/react-context/dist/index.mjs","../node_modules/@radix-ui/react-progress/node_modules/@radix-ui/react-primitive/dist/index.mjs","../node_modules/@radix-ui/react-progress/dist/index.mjs","../src/components/ui/progress.tsx","../src/components/SurveyProgressBar.tsx","../node_modules/@radix-ui/primitive/dist/index.mjs","../node_modules/@radix-ui/react-context/dist/index.mjs","../node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs","../node_modules/@radix-ui/react-id/dist/index.mjs","../node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs","../node_modules/@radix-ui/react-primitive/node_modules/@radix-ui/react-slot/dist/index.mjs","../node_modules/@radix-ui/react-primitive/dist/index.mjs","../node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs","../node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs","../node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs","../node_modules/@radix-ui/react-focus-scope/dist/index.mjs","../node_modules/@radix-ui/react-portal/dist/index.mjs","../node_modules/@radix-ui/react-presence/dist/index.mjs","../node_modules/@radix-ui/react-focus-guards/dist/index.mjs","../node_modules/tslib/tslib.es6.mjs","../node_modules/react-remove-scroll-bar/dist/es2015/constants.js","../node_modules/use-callback-ref/dist/es2015/assignRef.js","../node_modules/use-callback-ref/dist/es2015/useRef.js","../node_modules/use-callback-ref/dist/es2015/useMergeRef.js","../node_modules/use-sidecar/dist/es2015/medium.js","../node_modules/use-sidecar/dist/es2015/exports.js","../node_modules/react-remove-scroll/dist/es2015/medium.js","../node_modules/react-remove-scroll/dist/es2015/UI.js","../node_modules/get-nonce/dist/es2015/index.js","../node_modules/react-style-singleton/dist/es2015/singleton.js","../node_modules/react-style-singleton/dist/es2015/hook.js","../node_modules/react-style-singleton/dist/es2015/component.js","../node_modules/react-remove-scroll-bar/dist/es2015/utils.js","../node_modules/react-remove-scroll-bar/dist/es2015/component.js","../node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js","../node_modules/react-remove-scroll/dist/es2015/handleScroll.js","../node_modules/react-remove-scroll/dist/es2015/SideEffect.js","../node_modules/react-remove-scroll/dist/es2015/sidecar.js","../node_modules/react-remove-scroll/dist/es2015/Combination.js","../node_modules/aria-hidden/dist/es2015/index.js","../node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-slot/dist/index.mjs","../node_modules/@radix-ui/react-dialog/dist/index.mjs","../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/x.js","../src/components/ui/dialog.tsx","../src/components/ValidationDialog.tsx","../src/utils/progressCalculation.ts","../src/components/ExitConfirmationDialog.tsx","../src/components/SubmissionLoadingOverlay.tsx","../src/components/SurveyContainer.tsx","../src/components/SurveyRenderer.tsx"],"sourcesContent":["/**\n * @license React\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var f=require(\"react\"),k=Symbol.for(\"react.element\"),l=Symbol.for(\"react.fragment\"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};\nfunction q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=\"\"+g);void 0!==a.key&&(e=\"\"+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q;\n","/**\n * @license React\n * react-jsx-runtime.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n'use strict';\n\nvar React = require('react');\n\n// ATTENTION\n// When adding new symbols to this file,\n// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'\n// The Symbol used to tag the ReactElement-like types.\nvar REACT_ELEMENT_TYPE = Symbol.for('react.element');\nvar REACT_PORTAL_TYPE = Symbol.for('react.portal');\nvar REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');\nvar REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');\nvar REACT_PROFILER_TYPE = Symbol.for('react.profiler');\nvar REACT_PROVIDER_TYPE = Symbol.for('react.provider');\nvar REACT_CONTEXT_TYPE = Symbol.for('react.context');\nvar REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');\nvar REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');\nvar REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');\nvar REACT_MEMO_TYPE = Symbol.for('react.memo');\nvar REACT_LAZY_TYPE = Symbol.for('react.lazy');\nvar REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');\nvar MAYBE_ITERATOR_SYMBOL = Symbol.iterator;\nvar FAUX_ITERATOR_SYMBOL = '@@iterator';\nfunction getIteratorFn(maybeIterable) {\n if (maybeIterable === null || typeof maybeIterable !== 'object') {\n return null;\n }\n\n var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];\n\n if (typeof maybeIterator === 'function') {\n return maybeIterator;\n }\n\n return null;\n}\n\nvar ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n\nfunction error(format) {\n {\n {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n printWarning('error', format, args);\n }\n }\n}\n\nfunction printWarning(level, format, args) {\n // When changing this logic, you might want to also\n // update consoleWithStackDev.www.js as well.\n {\n var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n var stack = ReactDebugCurrentFrame.getStackAddendum();\n\n if (stack !== '') {\n format += '%s';\n args = args.concat([stack]);\n } // eslint-disable-next-line react-internal/safe-string-coercion\n\n\n var argsWithFormat = args.map(function (item) {\n return String(item);\n }); // Careful: RN currently depends on this prefix\n\n argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it\n // breaks IE9: https://github.com/facebook/react/issues/13610\n // eslint-disable-next-line react-internal/no-production-logging\n\n Function.prototype.apply.call(console[level], console, argsWithFormat);\n }\n}\n\n// -----------------------------------------------------------------------------\n\nvar enableScopeAPI = false; // Experimental Create Event Handle API.\nvar enableCacheElement = false;\nvar enableTransitionTracing = false; // No known bugs, but needs performance testing\n\nvar enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber\n// stuff. Intended to enable React core members to more easily debug scheduling\n// issues in DEV builds.\n\nvar enableDebugTracing = false; // Track which Fiber(s) schedule render work.\n\nvar REACT_MODULE_REFERENCE;\n\n{\n REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');\n}\n\nfunction isValidElementType(type) {\n if (typeof type === 'string' || typeof type === 'function') {\n return true;\n } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).\n\n\n if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {\n return true;\n }\n\n if (typeof type === 'object' && type !== null) {\n if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object\n // types supported by any Flight configuration anywhere since\n // we don't know which Flight build this will end up being used\n // with.\n type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction getWrappedName(outerType, innerType, wrapperName) {\n var displayName = outerType.displayName;\n\n if (displayName) {\n return displayName;\n }\n\n var functionName = innerType.displayName || innerType.name || '';\n return functionName !== '' ? wrapperName + \"(\" + functionName + \")\" : wrapperName;\n} // Keep in sync with react-reconciler/getComponentNameFromFiber\n\n\nfunction getContextName(type) {\n return type.displayName || 'Context';\n} // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.\n\n\nfunction getComponentNameFromType(type) {\n if (type == null) {\n // Host root, text node or just invalid type.\n return null;\n }\n\n {\n if (typeof type.tag === 'number') {\n error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');\n }\n }\n\n if (typeof type === 'function') {\n return type.displayName || type.name || null;\n }\n\n if (typeof type === 'string') {\n return type;\n }\n\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return 'Fragment';\n\n case REACT_PORTAL_TYPE:\n return 'Portal';\n\n case REACT_PROFILER_TYPE:\n return 'Profiler';\n\n case REACT_STRICT_MODE_TYPE:\n return 'StrictMode';\n\n case REACT_SUSPENSE_TYPE:\n return 'Suspense';\n\n case REACT_SUSPENSE_LIST_TYPE:\n return 'SuspenseList';\n\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_CONTEXT_TYPE:\n var context = type;\n return getContextName(context) + '.Consumer';\n\n case REACT_PROVIDER_TYPE:\n var provider = type;\n return getContextName(provider._context) + '.Provider';\n\n case REACT_FORWARD_REF_TYPE:\n return getWrappedName(type, type.render, 'ForwardRef');\n\n case REACT_MEMO_TYPE:\n var outerName = type.displayName || null;\n\n if (outerName !== null) {\n return outerName;\n }\n\n return getComponentNameFromType(type.type) || 'Memo';\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n return getComponentNameFromType(init(payload));\n } catch (x) {\n return null;\n }\n }\n\n // eslint-disable-next-line no-fallthrough\n }\n }\n\n return null;\n}\n\nvar assign = Object.assign;\n\n// Helpers to patch console.logs to avoid logging during side-effect free\n// replaying on render function. This currently only patches the object\n// lazily which won't cover if the log function was extracted eagerly.\n// We could also eagerly patch the method.\nvar disabledDepth = 0;\nvar prevLog;\nvar prevInfo;\nvar prevWarn;\nvar prevError;\nvar prevGroup;\nvar prevGroupCollapsed;\nvar prevGroupEnd;\n\nfunction disabledLog() {}\n\ndisabledLog.__reactDisabledLog = true;\nfunction disableLogs() {\n {\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n prevLog = console.log;\n prevInfo = console.info;\n prevWarn = console.warn;\n prevError = console.error;\n prevGroup = console.group;\n prevGroupCollapsed = console.groupCollapsed;\n prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099\n\n var props = {\n configurable: true,\n enumerable: true,\n value: disabledLog,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n info: props,\n log: props,\n warn: props,\n error: props,\n group: props,\n groupCollapsed: props,\n groupEnd: props\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n disabledDepth++;\n }\n}\nfunction reenableLogs() {\n {\n disabledDepth--;\n\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n var props = {\n configurable: true,\n enumerable: true,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n log: assign({}, props, {\n value: prevLog\n }),\n info: assign({}, props, {\n value: prevInfo\n }),\n warn: assign({}, props, {\n value: prevWarn\n }),\n error: assign({}, props, {\n value: prevError\n }),\n group: assign({}, props, {\n value: prevGroup\n }),\n groupCollapsed: assign({}, props, {\n value: prevGroupCollapsed\n }),\n groupEnd: assign({}, props, {\n value: prevGroupEnd\n })\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n if (disabledDepth < 0) {\n error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');\n }\n }\n}\n\nvar ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;\nvar prefix;\nfunction describeBuiltInComponentFrame(name, source, ownerFn) {\n {\n if (prefix === undefined) {\n // Extract the VM specific prefix used by each line.\n try {\n throw Error();\n } catch (x) {\n var match = x.stack.trim().match(/\\n( *(at )?)/);\n prefix = match && match[1] || '';\n }\n } // We use the prefix to ensure our stacks line up with native stack frames.\n\n\n return '\\n' + prefix + name;\n }\n}\nvar reentry = false;\nvar componentFrameCache;\n\n{\n var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;\n componentFrameCache = new PossiblyWeakMap();\n}\n\nfunction describeNativeComponentFrame(fn, construct) {\n // If something asked for a stack inside a fake render, it should get ignored.\n if ( !fn || reentry) {\n return '';\n }\n\n {\n var frame = componentFrameCache.get(fn);\n\n if (frame !== undefined) {\n return frame;\n }\n }\n\n var control;\n reentry = true;\n var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.\n\n Error.prepareStackTrace = undefined;\n var previousDispatcher;\n\n {\n previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function\n // for warnings.\n\n ReactCurrentDispatcher.current = null;\n disableLogs();\n }\n\n try {\n // This should throw.\n if (construct) {\n // Something should be setting the props in the constructor.\n var Fake = function () {\n throw Error();\n }; // $FlowFixMe\n\n\n Object.defineProperty(Fake.prototype, 'props', {\n set: function () {\n // We use a throwing setter instead of frozen or non-writable props\n // because that won't throw in a non-strict mode function.\n throw Error();\n }\n });\n\n if (typeof Reflect === 'object' && Reflect.construct) {\n // We construct a different control for this case to include any extra\n // frames added by the construct call.\n try {\n Reflect.construct(Fake, []);\n } catch (x) {\n control = x;\n }\n\n Reflect.construct(fn, [], Fake);\n } else {\n try {\n Fake.call();\n } catch (x) {\n control = x;\n }\n\n fn.call(Fake.prototype);\n }\n } else {\n try {\n throw Error();\n } catch (x) {\n control = x;\n }\n\n fn();\n }\n } catch (sample) {\n // This is inlined manually because closure doesn't do it for us.\n if (sample && control && typeof sample.stack === 'string') {\n // This extracts the first frame from the sample that isn't also in the control.\n // Skipping one frame that we assume is the frame that calls the two.\n var sampleLines = sample.stack.split('\\n');\n var controlLines = control.stack.split('\\n');\n var s = sampleLines.length - 1;\n var c = controlLines.length - 1;\n\n while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {\n // We expect at least one stack frame to be shared.\n // Typically this will be the root most one. However, stack frames may be\n // cut off due to maximum stack limits. In this case, one maybe cut off\n // earlier than the other. We assume that the sample is longer or the same\n // and there for cut off earlier. So we should find the root most frame in\n // the sample somewhere in the control.\n c--;\n }\n\n for (; s >= 1 && c >= 0; s--, c--) {\n // Next we find the first one that isn't the same which should be the\n // frame that called our sample function and the control.\n if (sampleLines[s] !== controlLines[c]) {\n // In V8, the first line is describing the message but other VMs don't.\n // If we're about to return the first line, and the control is also on the same\n // line, that's a pretty good indicator that our sample threw at same line as\n // the control. I.e. before we entered the sample frame. So we ignore this result.\n // This can happen if you passed a class to function component, or non-function.\n if (s !== 1 || c !== 1) {\n do {\n s--;\n c--; // We may still have similar intermediate frames from the construct call.\n // The next one that isn't the same should be our match though.\n\n if (c < 0 || sampleLines[s] !== controlLines[c]) {\n // V8 adds a \"new\" prefix for native classes. Let's remove it to make it prettier.\n var _frame = '\\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled \"<anonymous>\"\n // but we have a user-provided \"displayName\"\n // splice it in to make the stack more readable.\n\n\n if (fn.displayName && _frame.includes('<anonymous>')) {\n _frame = _frame.replace('<anonymous>', fn.displayName);\n }\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, _frame);\n }\n } // Return the line we found.\n\n\n return _frame;\n }\n } while (s >= 1 && c >= 0);\n }\n\n break;\n }\n }\n }\n } finally {\n reentry = false;\n\n {\n ReactCurrentDispatcher.current = previousDispatcher;\n reenableLogs();\n }\n\n Error.prepareStackTrace = previousPrepareStackTrace;\n } // Fallback to just using the name if we couldn't make it throw.\n\n\n var name = fn ? fn.displayName || fn.name : '';\n var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, syntheticFrame);\n }\n }\n\n return syntheticFrame;\n}\nfunction describeFunctionComponentFrame(fn, source, ownerFn) {\n {\n return describeNativeComponentFrame(fn, false);\n }\n}\n\nfunction shouldConstruct(Component) {\n var prototype = Component.prototype;\n return !!(prototype && prototype.isReactComponent);\n}\n\nfunction describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {\n\n if (type == null) {\n return '';\n }\n\n if (typeof type === 'function') {\n {\n return describeNativeComponentFrame(type, shouldConstruct(type));\n }\n }\n\n if (typeof type === 'string') {\n return describeBuiltInComponentFrame(type);\n }\n\n switch (type) {\n case REACT_SUSPENSE_TYPE:\n return describeBuiltInComponentFrame('Suspense');\n\n case REACT_SUSPENSE_LIST_TYPE:\n return describeBuiltInComponentFrame('SuspenseList');\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_FORWARD_REF_TYPE:\n return describeFunctionComponentFrame(type.render);\n\n case REACT_MEMO_TYPE:\n // Memo may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n // Lazy may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);\n } catch (x) {}\n }\n }\n }\n\n return '';\n}\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar loggedTypeFailures = {};\nvar ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n ReactDebugCurrentFrame.setExtraStackFrame(stack);\n } else {\n ReactDebugCurrentFrame.setExtraStackFrame(null);\n }\n }\n}\n\nfunction checkPropTypes(typeSpecs, values, location, componentName, element) {\n {\n // $FlowFixMe This is okay but Flow doesn't know it.\n var has = Function.call.bind(hasOwnProperty);\n\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n // eslint-disable-next-line react-internal/prod-error-codes\n var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');\n err.name = 'Invariant Violation';\n throw err;\n }\n\n error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');\n } catch (ex) {\n error$1 = ex;\n }\n\n if (error$1 && !(error$1 instanceof Error)) {\n setCurrentlyValidatingElement(element);\n\n error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);\n\n setCurrentlyValidatingElement(null);\n }\n\n if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error$1.message] = true;\n setCurrentlyValidatingElement(element);\n\n error('Failed %s type: %s', location, error$1.message);\n\n setCurrentlyValidatingElement(null);\n }\n }\n }\n }\n}\n\nvar isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare\n\nfunction isArray(a) {\n return isArrayImpl(a);\n}\n\n/*\n * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol\n * and Temporal.* types. See https://github.com/facebook/react/pull/22064.\n *\n * The functions in this module will throw an easier-to-understand,\n * easier-to-debug exception with a clear errors message message explaining the\n * problem. (Instead of a confusing exception thrown inside the implementation\n * of the `value` object).\n */\n// $FlowFixMe only called in DEV, so void return is not possible.\nfunction typeName(value) {\n {\n // toStringTag is needed for namespaced types like Temporal.Instant\n var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;\n var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';\n return type;\n }\n} // $FlowFixMe only called in DEV, so void return is not possible.\n\n\nfunction willCoercionThrow(value) {\n {\n try {\n testStringCoercion(value);\n return false;\n } catch (e) {\n return true;\n }\n }\n}\n\nfunction testStringCoercion(value) {\n // If you ended up here by following an exception call stack, here's what's\n // happened: you supplied an object or symbol value to React (as a prop, key,\n // DOM attribute, CSS property, string ref, etc.) and when React tried to\n // coerce it to a string using `'' + value`, an exception was thrown.\n //\n // The most common types that will cause this exception are `Symbol` instances\n // and Temporal objects like `Temporal.Instant`. But any object that has a\n // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this\n // exception. (Library authors do this to prevent users from using built-in\n // numeric operators like `+` or comparison operators like `>=` because custom\n // methods are needed to perform accurate arithmetic or comparison.)\n //\n // To fix the problem, coerce this object or symbol value to a string before\n // passing it to React. The most reliable way is usually `String(value)`.\n //\n // To find which value is throwing, check the browser or debugger console.\n // Before this exception was thrown, there should be `console.error` output\n // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the\n // problem and how that type was used: key, atrribute, input value prop, etc.\n // In most cases, this console output also shows the component and its\n // ancestor components where the exception happened.\n //\n // eslint-disable-next-line react-internal/safe-string-coercion\n return '' + value;\n}\nfunction checkKeyStringCoercion(value) {\n {\n if (willCoercionThrow(value)) {\n error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));\n\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n}\n\nvar ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;\nvar RESERVED_PROPS = {\n key: true,\n ref: true,\n __self: true,\n __source: true\n};\nvar specialPropKeyWarningShown;\nvar specialPropRefWarningShown;\nvar didWarnAboutStringRefs;\n\n{\n didWarnAboutStringRefs = {};\n}\n\nfunction hasValidRef(config) {\n {\n if (hasOwnProperty.call(config, 'ref')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.ref !== undefined;\n}\n\nfunction hasValidKey(config) {\n {\n if (hasOwnProperty.call(config, 'key')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'key').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.key !== undefined;\n}\n\nfunction warnIfStringRefCannotBeAutoConverted(config, self) {\n {\n if (typeof config.ref === 'string' && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {\n var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);\n\n if (!didWarnAboutStringRefs[componentName]) {\n error('Component \"%s\" contains the string ref \"%s\". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref);\n\n didWarnAboutStringRefs[componentName] = true;\n }\n }\n }\n}\n\nfunction defineKeyPropWarningGetter(props, displayName) {\n {\n var warnAboutAccessingKey = function () {\n if (!specialPropKeyWarningShown) {\n specialPropKeyWarningShown = true;\n\n error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n }\n };\n\n warnAboutAccessingKey.isReactWarning = true;\n Object.defineProperty(props, 'key', {\n get: warnAboutAccessingKey,\n configurable: true\n });\n }\n}\n\nfunction defineRefPropWarningGetter(props, displayName) {\n {\n var warnAboutAccessingRef = function () {\n if (!specialPropRefWarningShown) {\n specialPropRefWarningShown = true;\n\n error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n }\n };\n\n warnAboutAccessingRef.isReactWarning = true;\n Object.defineProperty(props, 'ref', {\n get: warnAboutAccessingRef,\n configurable: true\n });\n }\n}\n/**\n * Factory method to create a new React element. This no longer adheres to\n * the class pattern, so do not use new to call it. Also, instanceof check\n * will not work. Instead test $$typeof field against Symbol.for('react.element') to check\n * if something is a React Element.\n *\n * @param {*} type\n * @param {*} props\n * @param {*} key\n * @param {string|object} ref\n * @param {*} owner\n * @param {*} self A *temporary* helper to detect places where `this` is\n * different from the `owner` when React.createElement is called, so that we\n * can warn. We want to get rid of owner and replace string `ref`s with arrow\n * functions, and as long as `this` and owner are the same, there will be no\n * change in behavior.\n * @param {*} source An annotation object (added by a transpiler or otherwise)\n * indicating filename, line number, and/or other information.\n * @internal\n */\n\n\nvar ReactElement = function (type, key, ref, self, source, owner, props) {\n var element = {\n // This tag allows us to uniquely identify this as a React Element\n $$typeof: REACT_ELEMENT_TYPE,\n // Built-in properties that belong on the element\n type: type,\n key: key,\n ref: ref,\n props: props,\n // Record the component responsible for creating this element.\n _owner: owner\n };\n\n {\n // The validation flag is currently mutative. We put it on\n // an external backing store so that we can freeze the whole object.\n // This can be replaced with a WeakMap once they are implemented in\n // commonly used development environments.\n element._store = {}; // To make comparing ReactElements easier for testing purposes, we make\n // the validation flag non-enumerable (where possible, which should\n // include every environment we run tests in), so the test framework\n // ignores it.\n\n Object.defineProperty(element._store, 'validated', {\n configurable: false,\n enumerable: false,\n writable: true,\n value: false\n }); // self and source are DEV only properties.\n\n Object.defineProperty(element, '_self', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: self\n }); // Two elements created in two different places should be considered\n // equal for testing purposes and therefore we hide it from enumeration.\n\n Object.defineProperty(element, '_source', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: source\n });\n\n if (Object.freeze) {\n Object.freeze(element.props);\n Object.freeze(element);\n }\n }\n\n return element;\n};\n/**\n * https://github.com/reactjs/rfcs/pull/107\n * @param {*} type\n * @param {object} props\n * @param {string} key\n */\n\nfunction jsxDEV(type, config, maybeKey, source, self) {\n {\n var propName; // Reserved names are extracted\n\n var props = {};\n var key = null;\n var ref = null; // Currently, key can be spread in as a prop. This causes a potential\n // issue if key is also explicitly declared (ie. <div {...props} key=\"Hi\" />\n // or <div key=\"Hi\" {...props} /> ). We want to deprecate key spread,\n // but as an intermediary step, we will use jsxDEV for everything except\n // <div {...props} key=\"Hi\" />, because we aren't currently able to tell if\n // key is explicitly declared to be undefined or not.\n\n if (maybeKey !== undefined) {\n {\n checkKeyStringCoercion(maybeKey);\n }\n\n key = '' + maybeKey;\n }\n\n if (hasValidKey(config)) {\n {\n checkKeyStringCoercion(config.key);\n }\n\n key = '' + config.key;\n }\n\n if (hasValidRef(config)) {\n ref = config.ref;\n warnIfStringRefCannotBeAutoConverted(config, self);\n } // Remaining properties are added to a new props object\n\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n }\n}\n\nvar ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;\nvar ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement$1(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n ReactDebugCurrentFrame$1.setExtraStackFrame(stack);\n } else {\n ReactDebugCurrentFrame$1.setExtraStackFrame(null);\n }\n }\n}\n\nvar propTypesMisspellWarningShown;\n\n{\n propTypesMisspellWarningShown = false;\n}\n/**\n * Verifies the object is a ReactElement.\n * See https://reactjs.org/docs/react-api.html#isvalidelement\n * @param {?object} object\n * @return {boolean} True if `object` is a ReactElement.\n * @final\n */\n\n\nfunction isValidElement(object) {\n {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n }\n}\n\nfunction getDeclarationErrorAddendum() {\n {\n if (ReactCurrentOwner$1.current) {\n var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);\n\n if (name) {\n return '\\n\\nCheck the render method of `' + name + '`.';\n }\n }\n\n return '';\n }\n}\n\nfunction getSourceInfoErrorAddendum(source) {\n {\n if (source !== undefined) {\n var fileName = source.fileName.replace(/^.*[\\\\\\/]/, '');\n var lineNumber = source.lineNumber;\n return '\\n\\nCheck your code at ' + fileName + ':' + lineNumber + '.';\n }\n\n return '';\n }\n}\n/**\n * Warn if there's no key explicitly set on dynamic arrays of children or\n * object keys are not valid. This allows us to keep track of children between\n * updates.\n */\n\n\nvar ownerHasKeyUseWarning = {};\n\nfunction getCurrentComponentErrorInfo(parentType) {\n {\n var info = getDeclarationErrorAddendum();\n\n if (!info) {\n var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;\n\n if (parentName) {\n info = \"\\n\\nCheck the top-level render call using <\" + parentName + \">.\";\n }\n }\n\n return info;\n }\n}\n/**\n * Warn if the element doesn't have an explicit key assigned to it.\n * This element is in an array. The array could grow and shrink or be\n * reordered. All children that haven't already been validated are required to\n * have a \"key\" property assigned to it. Error statuses are cached so a warning\n * will only be shown once.\n *\n * @internal\n * @param {ReactElement} element Element that requires a key.\n * @param {*} parentType element's parent's type.\n */\n\n\nfunction validateExplicitKey(element, parentType) {\n {\n if (!element._store || element._store.validated || element.key != null) {\n return;\n }\n\n element._store.validated = true;\n var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);\n\n if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {\n return;\n }\n\n ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a\n // property, it may be the creator of the child that's responsible for\n // assigning it a key.\n\n var childOwner = '';\n\n if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {\n // Give the component that originally created this child.\n childOwner = \" It was passed a child from \" + getComponentNameFromType(element._owner.type) + \".\";\n }\n\n setCurrentlyValidatingElement$1(element);\n\n error('Each child in a list should have a unique \"key\" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);\n\n setCurrentlyValidatingElement$1(null);\n }\n}\n/**\n * Ensure that every element either is passed in a static location, in an\n * array with an explicit keys property defined, or in an object literal\n * with valid key property.\n *\n * @internal\n * @param {ReactNode} node Statically passed child of any type.\n * @param {*} parentType node's parent's type.\n */\n\n\nfunction validateChildKeys(node, parentType) {\n {\n if (typeof node !== 'object') {\n return;\n }\n\n if (isArray(node)) {\n for (var i = 0; i < node.length; i++) {\n var child = node[i];\n\n if (isValidElement(child)) {\n validateExplicitKey(child, parentType);\n }\n }\n } else if (isValidElement(node)) {\n // This element was passed in a valid location.\n if (node._store) {\n node._store.validated = true;\n }\n } else if (node) {\n var iteratorFn = getIteratorFn(node);\n\n if (typeof iteratorFn === 'function') {\n // Entry iterators used to provide implicit keys,\n // but now we print a separate warning for them later.\n if (iteratorFn !== node.entries) {\n var iterator = iteratorFn.call(node);\n var step;\n\n while (!(step = iterator.next()).done) {\n if (isValidElement(step.value)) {\n validateExplicitKey(step.value, parentType);\n }\n }\n }\n }\n }\n }\n}\n/**\n * Given an element, validate that its props follow the propTypes definition,\n * provided by the type.\n *\n * @param {ReactElement} element\n */\n\n\nfunction validatePropTypes(element) {\n {\n var type = element.type;\n\n if (type === null || type === undefined || typeof type === 'string') {\n return;\n }\n\n var propTypes;\n\n if (typeof type === 'function') {\n propTypes = type.propTypes;\n } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.\n // Inner props are checked in the reconciler.\n type.$$typeof === REACT_MEMO_TYPE)) {\n propTypes = type.propTypes;\n } else {\n return;\n }\n\n if (propTypes) {\n // Intentionally inside to avoid triggering lazy initializers:\n var name = getComponentNameFromType(type);\n checkPropTypes(propTypes, element.props, 'prop', name, element);\n } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {\n propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:\n\n var _name = getComponentNameFromType(type);\n\n error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');\n }\n\n if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {\n error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');\n }\n }\n}\n/**\n * Given a fragment, validate that it can only be provided with fragment props\n * @param {ReactElement} fragment\n */\n\n\nfunction validateFragmentProps(fragment) {\n {\n var keys = Object.keys(fragment.props);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n\n if (key !== 'children' && key !== 'key') {\n setCurrentlyValidatingElement$1(fragment);\n\n error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);\n\n setCurrentlyValidatingElement$1(null);\n break;\n }\n }\n\n if (fragment.ref !== null) {\n setCurrentlyValidatingElement$1(fragment);\n\n error('Invalid attribute `ref` supplied to `React.Fragment`.');\n\n setCurrentlyValidatingElement$1(null);\n }\n }\n}\n\nvar didWarnAboutKeySpread = {};\nfunction jsxWithValidation(type, props, key, isStaticChildren, source, self) {\n {\n var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to\n // succeed and there will likely be errors in render.\n\n if (!validType) {\n var info = '';\n\n if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {\n info += ' You likely forgot to export your component from the file ' + \"it's defined in, or you might have mixed up default and named imports.\";\n }\n\n var sourceInfo = getSourceInfoErrorAddendum(source);\n\n if (sourceInfo) {\n info += sourceInfo;\n } else {\n info += getDeclarationErrorAddendum();\n }\n\n var typeString;\n\n if (type === null) {\n typeString = 'null';\n } else if (isArray(type)) {\n typeString = 'array';\n } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {\n typeString = \"<\" + (getComponentNameFromType(type.type) || 'Unknown') + \" />\";\n info = ' Did you accidentally export a JSX literal instead of a component?';\n } else {\n typeString = typeof type;\n }\n\n error('React.jsx: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);\n }\n\n var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.\n // TODO: Drop this when these are no longer allowed as the type argument.\n\n if (element == null) {\n return element;\n } // Skip key warning if the type isn't valid since our key validation logic\n // doesn't expect a non-string/function type and can throw confusing errors.\n // We don't want exception behavior to differ between dev and prod.\n // (Rendering will throw with a helpful message and as soon as the type is\n // fixed, the key warnings will appear.)\n\n\n if (validType) {\n var children = props.children;\n\n if (children !== undefined) {\n if (isStaticChildren) {\n if (isArray(children)) {\n for (var i = 0; i < children.length; i++) {\n validateChildKeys(children[i], type);\n }\n\n if (Object.freeze) {\n Object.freeze(children);\n }\n } else {\n error('React.jsx: Static children should always be an array. ' + 'You are likely explicitly calling React.jsxs or React.jsxDEV. ' + 'Use the Babel transform instead.');\n }\n } else {\n validateChildKeys(children, type);\n }\n }\n }\n\n {\n if (hasOwnProperty.call(props, 'key')) {\n var componentName = getComponentNameFromType(type);\n var keys = Object.keys(props).filter(function (k) {\n return k !== 'key';\n });\n var beforeExample = keys.length > 0 ? '{key: someKey, ' + keys.join(': ..., ') + ': ...}' : '{key: someKey}';\n\n if (!didWarnAboutKeySpread[componentName + beforeExample]) {\n var afterExample = keys.length > 0 ? '{' + keys.join(': ..., ') + ': ...}' : '{}';\n\n error('A props object containing a \"key\" prop is being spread into JSX:\\n' + ' let props = %s;\\n' + ' <%s {...props} />\\n' + 'React keys must be passed directly to JSX without using spread:\\n' + ' let props = %s;\\n' + ' <%s key={someKey} {...props} />', beforeExample, componentName, afterExample, componentName);\n\n didWarnAboutKeySpread[componentName + beforeExample] = true;\n }\n }\n }\n\n if (type === REACT_FRAGMENT_TYPE) {\n validateFragmentProps(element);\n } else {\n validatePropTypes(element);\n }\n\n return element;\n }\n} // These two functions exist to still get child warnings in dev\n// even with the prod transform. This means that jsxDEV is purely\n// opt-in behavior for better messages but that we won't stop\n// giving you warnings if you use production apis.\n\nfunction jsxWithValidationStatic(type, props, key) {\n {\n return jsxWithValidation(type, props, key, true);\n }\n}\nfunction jsxWithValidationDynamic(type, props, key) {\n {\n return jsxWithValidation(type, props, key, false);\n }\n}\n\nvar jsx = jsxWithValidationDynamic ; // we may want to special case jsxs internally to take advantage of static children.\n// for now we can ship identical prod functions\n\nvar jsxs = jsxWithValidationStatic ;\n\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.jsx = jsx;\nexports.jsxs = jsxs;\n })();\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.min.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","/**\n * Shared types for survey format detection and conversion.\n * Library always works internally with FMB; PLC is converted at input and output.\n */\n\nimport type { SurveyConfig, SurveySubmitPayload } from \"../types/survey.types\";\n\nexport type SurveyType = \"FMB\" | \"PLC\";\n\nexport interface BaseSurveyInput {\n type: SurveyType;\n surveyId: string;\n surveyCode?: string;\n surveyName?: string;\n medium: string;\n config?: Record<string, unknown>;\n questionList: unknown[];\n}\n\n/** PLC question structure (input format). */\nexport interface PLCQuestion {\n image: string;\n question: string;\n question_type: \"scq\" | \"mcq\";\n options: string[];\n correct_answer: string[];\n correct_answer_option: string[];\n question_number: number;\n isMandatory: boolean;\n}\n\n/** PLC survey config (input format). */\nexport interface PLCSurveyConfig extends BaseSurveyInput {\n type: \"PLC\";\n questionList: PLCQuestion[];\n}\n\n/** Type guard: input has type field \"PLC\". */\nexport function isPLCSurvey(data: BaseSurveyInput): data is PLCSurveyConfig {\n return data.type === \"PLC\";\n}\n\n/** Type guard: input has type field \"FMB\". */\nexport function isFMBSurvey(data: BaseSurveyInput | { type?: string }): data is SurveyConfig {\n return (data as BaseSurveyInput).type === \"FMB\";\n}\n\n/** PLC response item: full question and answer info for each question. */\nexport interface PLCResponseItem {\n question_number: number;\n question: string;\n correct_answer: string[];\n selected_answer: string[];\n correct_answer_option: string[];\n}\n\n/** Payload returned on submit/save when input was PLC. */\nexport interface PLCSubmitPayload {\n type: \"PLC\";\n surveyId: string;\n surveyCode?: string;\n surveyName?: string;\n medium: string;\n config?: Record<string, unknown>;\n responses: PLCResponseItem[];\n}\n\n/** Union: submit/save callback receives FMB or PLC payload depending on input format. */\nexport type SurveySubmitPayloadUnion = SurveySubmitPayload | PLCSubmitPayload;\n","/**\n * Detect survey format from input data.\n * Uses type field when present; otherwise infers from structure.\n */\n\nimport type { SurveyConfig } from \"../types/survey.types\";\nimport type { BaseSurveyInput, PLCSurveyConfig, SurveyType } from \"./types\";\nimport { isPLCSurvey } from \"./types\";\n\n/**\n * Detects whether the survey data is PLC or FMB format.\n * @param data - Survey input (must have type and questionList)\n * @returns \"PLC\" | \"FMB\"\n */\nexport function detectSurveyFormat(data: unknown): SurveyType {\n if (data == null || typeof data !== \"object\") {\n return \"FMB\";\n }\n const d = data as Record<string, unknown>;\n if (d.type === \"PLC\") {\n return \"PLC\";\n }\n if (d.type === \"FMB\") {\n return \"FMB\";\n }\n // Infer from structure: PLC has questionList items with question_number and question_type\n const list = d.questionList;\n if (Array.isArray(list) && list.length > 0) {\n const first = list[0] as Record<string, unknown>;\n if (\n typeof first.question_number === \"number\" &&\n (first.question_type === \"scq\" || first.question_type === \"mcq\")\n ) {\n return \"PLC\";\n }\n }\n return \"FMB\";\n}\n\n/**\n * Type guard: data is valid PLC survey config (after format detection).\n */\nexport function isPLCData(data: unknown): data is PLCSurveyConfig {\n return isPLCSurvey((data as BaseSurveyInput) ?? { type: \"FMB\", surveyId: \"\", medium: \"\", questionList: [] });\n}\n\n/**\n * Type guard: data is FMB survey config.\n */\nexport function isFMBData(data: unknown): data is SurveyConfig {\n if (data == null || typeof data !== \"object\") return false;\n return (data as Record<string, unknown>).type === \"FMB\";\n}\n","/**\n * Convert PLC survey config to FMB (SurveyConfig).\n * Library always works internally with FMB.\n */\n\nimport type { SurveyConfig, SurveyQuestion } from \"../types/survey.types\";\nimport type { PLCSurveyConfig, PLCQuestion } from \"./types\";\n\n/** PLC question_type → FMB type */\nconst PLC_TO_FMB_TYPE: Record<PLCQuestion[\"question_type\"], SurveyQuestion[\"type\"]> = {\n scq: \"single-select\",\n mcq: \"multi-select\",\n};\n\n/**\n * Convert a single PLC question to FMB SurveyQuestion.\n */\nfunction convertPLCQuestionToFMB(\n plcQuestion: PLCQuestion,\n surveyId: string\n): SurveyQuestion {\n const questionId = `Q${plcQuestion.question_number}`;\n const type = PLC_TO_FMB_TYPE[plcQuestion.question_type];\n\n return {\n surveyId,\n questionId,\n description: plcQuestion.question,\n descriptionEN: plcQuestion.question,\n type,\n isMandatory: plcQuestion.isMandatory,\n options: plcQuestion.options ?? [],\n optionsEN: plcQuestion.options ?? [],\n outcomeDescription: \"\",\n questionDescriptionOptional: \"\",\n sourceQuestion: \"\",\n ...(plcQuestion.image && plcQuestion.image.trim() !== \"\"\n ? { questionImage: plcQuestion.image.trim() }\n : {}),\n };\n}\n\n/**\n * Convert PLC survey config to FMB SurveyConfig.\n * Use the result for all internal rendering and state.\n */\nexport function convertPLCToFMB(plcData: PLCSurveyConfig): SurveyConfig {\n const surveyId = plcData.surveyId;\n const questionList = plcData.questionList.map((q) =>\n convertPLCQuestionToFMB(q, surveyId)\n );\n\n return {\n type: \"FMB\",\n surveyId,\n ...(plcData.surveyCode != null && { surveyCode: plcData.surveyCode }),\n ...(plcData.surveyName != null && { surveyName: plcData.surveyName }),\n medium: plcData.medium,\n ...(plcData.config != null && Object.keys(plcData.config).length > 0 && { config: plcData.config as SurveyConfig[\"config\"] }),\n questionList,\n };\n}\n","/**\n * Convert FMB submit payload back to PLC format.\n * Used when the survey was initialized with PLC data so output matches input format.\n * Each response item includes question text, correct_answer, selected_answer (option letters), and correct_answer_option.\n */\n\nimport type { SurveySubmitPayload, SurveyResponseItem } from \"../types/survey.types\";\nimport type { PLCSurveyConfig, PLCSubmitPayload, PLCResponseItem } from \"./types\";\nimport type { PLCQuestion } from \"./types\";\n\n/** Map question_number -> PLC question for lookup. */\nfunction buildQuestionByNumberMap(plcSurvey: PLCSurveyConfig): Map<number, PLCQuestion> {\n const map = new Map<number, PLCQuestion>();\n plcSurvey.questionList.forEach((q) => {\n map.set(q.question_number, q);\n });\n return map;\n}\n\n/** Map FMB questionId (e.g. \"Q1\") -> question_number. */\nfunction buildQuestionIdToNumberMap(plcSurvey: PLCSurveyConfig): Map<string, number> {\n const map = new Map<string, number>();\n plcSurvey.questionList.forEach((q) => {\n map.set(`Q${q.question_number}`, q.question_number);\n });\n return map;\n}\n\n/** Convert option index to letter (0 -> \"A\", 1 -> \"B\", ...). */\nfunction indexToOptionLetter(index: number): string {\n return String.fromCharCode(65 + index);\n}\n\n/**\n * Map user's selected option text(s) to option letter(s) using the PLC question's options array.\n */\nfunction selectedTextToOptionLetters(\n userAnswer: string | string[],\n options: string[]\n): string[] {\n const selectedTexts = Array.isArray(userAnswer) ? userAnswer : [userAnswer];\n if (selectedTexts.length === 0 || (selectedTexts.length === 1 && selectedTexts[0] === \"\")) {\n return [];\n }\n const letters: string[] = [];\n for (const text of selectedTexts) {\n const index = options.findIndex((opt) => opt === text || (opt && opt.trim() === String(text).trim()));\n if (index >= 0) {\n letters.push(indexToOptionLetter(index));\n }\n }\n return letters;\n}\n\n/**\n * Convert FMB submit payload to PLC format.\n * @param fmbPayload - Payload in FMB format (from formatResponses / submit)\n * @param originalPlcSurvey - The PLC config that was converted to FMB at init\n */\nexport function convertFMBToPLC(\n fmbPayload: SurveySubmitPayload,\n originalPlcSurvey: PLCSurveyConfig\n): PLCSubmitPayload {\n const questionIdToNumber = buildQuestionIdToNumberMap(originalPlcSurvey);\n const questionByNumber = buildQuestionByNumberMap(originalPlcSurvey);\n\n const responses: PLCResponseItem[] = fmbPayload.responses\n .map((item: SurveyResponseItem) => {\n const question_number = questionIdToNumber.get(item.questionId);\n if (question_number === undefined) return null;\n\n const plcQuestion = questionByNumber.get(question_number);\n if (!plcQuestion) return null;\n\n const userAnswer = item.userAnswer;\n const textAnswer: string | string[] =\n Array.isArray(userAnswer) ? userAnswer.map(String) : String(userAnswer ?? \"\");\n const selected_answer = selectedTextToOptionLetters(textAnswer, plcQuestion.options ?? []);\n\n return {\n question_number,\n question: plcQuestion.question,\n correct_answer: plcQuestion.correct_answer ?? [],\n selected_answer,\n correct_answer_option: plcQuestion.correct_answer_option ?? [],\n };\n })\n .filter((r): r is PLCResponseItem => r !== null);\n\n return {\n type: \"PLC\",\n surveyId: fmbPayload.surveyId,\n ...(fmbPayload.surveyCode != null && { surveyCode: fmbPayload.surveyCode }),\n ...(fmbPayload.surveyName != null && { surveyName: fmbPayload.surveyName }),\n medium: originalPlcSurvey.medium,\n ...(originalPlcSurvey.config != null && { config: originalPlcSurvey.config }),\n responses,\n };\n}\n","/**\n * Survey Render Library - Type definitions\n * Matches FMB/Offline Mini App question and config structure.\n */\n\nexport type SupportedQuestionType =\n | \"single-select\"\n | \"multi-select\"\n | \"drop-down\"\n | \"dropdown\"\n | \"text-response\"\n | \"calendar\"\n | \"video-response\"\n | \"voice-response\"\n | \"image-response\"\n | \"document-response\"\n | \"pdf-response\"\n | \"tabular-text-input\"\n | \"tabular-drop-down\"\n | \"tabular-check-box\";\n\nexport interface SurveyQuestion {\n surveyId: string;\n questionId: string;\n description: string;\n descriptionEN: string;\n type: SupportedQuestionType;\n isMandatory: boolean;\n options?: string[];\n optionsEN?: string[];\n textInputType?: \"None\" | \"Text\" | \"Numeric\";\n textLimitCharacter?: number | null;\n minValue?: string | number | null;\n maxValue?: string | number | null;\n outcomeDescription: string;\n questionDescriptionOptional: string;\n sourceQuestion: string;\n childrenQuestions?: Record<string, string[]>;\n tableHeaderValue?: string[];\n tableQuestionValue?: Array<{\n rowId: string;\n rowQuestion: string;\n }>;\n isDynamic?: boolean;\n /** Prefilled answer from saved/draft data; used to initialize response state */\n userAnswer?: SurveyResponseItem[\"userAnswer\"];\n /** Optional question image URL (e.g. from PLC format). Rendered above options when present. */\n questionImage?: string;\n}\n\n/** Per-question-type media config from data.config (supportedSize in MB). */\nexport interface SurveyMediaConfigItem {\n supportedType?: string[];\n suppotedType?: string[]; /* legacy typo in API */\n supportedSize?: number; /* max size in MB */\n}\n\nexport interface SurveyConfig {\n surveyId: string;\n surveyCode?: string;\n surveyName?: string;\n type?: string;\n medium: string;\n questionList: SurveyQuestion[];\n /** Optional media validation config per type (e.g. image-response, video-response, voice-response/audio-response). Size in MB. */\n config?: Record<string, SurveyMediaConfigItem>;\n}\n\n/** Row answer for tabular question types */\nexport interface RowAnswer {\n rowAnswer: string | boolean;\n rowId: string;\n rowQuestion: string;\n}\n\n/** File object returned for image/video/voice response types */\nexport interface FileObject {\n fileName: string;\n fileType: string;\n binary: string;\n}\n\n/** Single response item in the required output format */\nexport interface SurveyResponseItem {\n questionId: string;\n userAnswer:\n | string\n | number\n | boolean\n | string[]\n | RowAnswer[]\n | FileObject;\n}\n\n/** Required response format: array of { questionId, userAnswer } */\nexport type SurveyResponseArray = SurveyResponseItem[];\n\n/** Payload passed to onSubmit: survey-level fields + responses array */\nexport interface SurveySubmitPayload {\n surveyId: string;\n surveyCode?: string;\n surveyName?: string;\n type?: string;\n responses: SurveyResponseArray;\n}\n\nexport const SUPPORTED_QUESTION_TYPES: SupportedQuestionType[] = [\n \"single-select\",\n \"multi-select\",\n \"drop-down\",\n \"dropdown\",\n \"text-response\",\n \"calendar\",\n \"video-response\",\n \"voice-response\",\n \"image-response\",\n \"document-response\",\n \"pdf-response\",\n \"tabular-text-input\",\n \"tabular-drop-down\",\n \"tabular-check-box\",\n];\n\nexport function isSupportedQuestionType(type: string): type is SupportedQuestionType {\n return (SUPPORTED_QUESTION_TYPES as string[]).includes(type);\n}\n\n/** Default value per question type for initial state */\nexport function getDefaultValue(\n question: SurveyQuestion,\n): string | string[] | Record<string, string | boolean> | Date | null | FileObject {\n switch (question.type) {\n case \"single-select\":\n case \"drop-down\":\n case \"dropdown\":\n case \"text-response\":\n return \"\";\n case \"multi-select\":\n return [];\n case \"calendar\":\n case \"image-response\":\n case \"video-response\":\n case \"voice-response\":\n case \"document-response\":\n case \"pdf-response\":\n return null;\n case \"tabular-text-input\":\n case \"tabular-drop-down\":\n return {};\n case \"tabular-check-box\": {\n const out: Record<string, boolean> = {};\n question.tableQuestionValue?.forEach((r) => {\n out[r.rowId] = false;\n });\n return out;\n }\n default:\n return null;\n }\n}\n\n/** Initial value for a question: prefilled from userAnswer when present, otherwise default */\nexport function getInitialValue(\n question: SurveyQuestion,\n): string | string[] | Record<string, string | boolean> | Date | null | FileObject {\n const ua = question.userAnswer;\n if (ua === undefined || ua === null) {\n return getDefaultValue(question);\n }\n\n switch (question.type) {\n case \"single-select\":\n case \"drop-down\":\n case \"dropdown\":\n case \"text-response\":\n return typeof ua === \"string\" ? ua : String(ua);\n case \"multi-select\":\n return Array.isArray(ua) ? ua.map(String) : [];\n case \"calendar\": {\n if (typeof ua === \"string\") {\n const d = new Date(ua);\n return isNaN(d.getTime()) ? null : d;\n }\n if (ua instanceof Date) return ua;\n return null;\n }\n case \"tabular-text-input\":\n case \"tabular-drop-down\":\n case \"tabular-check-box\": {\n if (!Array.isArray(ua)) return getDefaultValue(question);\n const rows = ua as RowAnswer[];\n const record: Record<string, string | boolean> = {};\n rows.forEach((row) => {\n record[row.rowId] = row.rowAnswer;\n });\n return record;\n }\n case \"image-response\":\n case \"video-response\":\n case \"voice-response\":\n case \"document-response\":\n case \"pdf-response\":\n return ua && typeof ua === \"object\" && \"fileName\" in ua && \"binary\" in ua\n ? (ua as FileObject)\n : null;\n default:\n return getDefaultValue(question);\n }\n}\n","/**\n * Conditional logic: show child questions when parent answer matches.\n * sourceQuestion + childrenQuestions e.g. { \"Other\": [\"Q5.1\"] }\n */\n\nimport type { SurveyQuestion } from \"../types/survey.types\";\n\nexport interface VisibilityResult {\n visibleQuestions: string[];\n hiddenQuestions: string[];\n newlyVisible: string[];\n newlyHidden: string[];\n}\n\ntype ResponsesMap = Record<string, { value: unknown }>;\n\nfunction getQuestionId(q: SurveyQuestion): string {\n return q.questionId;\n}\n\nfunction evaluateCondition(\n responseValue: unknown,\n conditionValue: string,\n): boolean {\n if (Array.isArray(responseValue)) {\n return responseValue.includes(conditionValue);\n }\n return responseValue === conditionValue;\n}\n\n/**\n * Build visibility from questions and current responses.\n * Root questions (no sourceQuestion or not in any childrenQuestions) are always visible.\n * Child questions are visible when parent answer matches the key in childrenQuestions.\n */\nexport function calculateVisibility(\n questions: SurveyQuestion[],\n responses: ResponsesMap,\n previouslyVisible: string[] = [],\n): VisibilityResult {\n const allIds = questions.map(getQuestionId);\n const visibleSet = new Set<string>();\n\n const childIds = new Set<string>();\n questions.forEach((q) => {\n Object.values(q.childrenQuestions ?? {}).forEach((ids) => {\n ids.forEach((id) => childIds.add(id));\n });\n });\n\n const rootQuestions = questions.filter((q) => !childIds.has(q.questionId));\n rootQuestions.forEach((q) => visibleSet.add(q.questionId));\n\n questions.forEach((q) => {\n const children = q.childrenQuestions;\n if (!children || typeof children !== \"object\") return;\n\n const parentResponse = responses[q.questionId]?.value;\n\n Object.entries(children).forEach(([conditionValue, childQuestionIds]) => {\n if (!Array.isArray(childQuestionIds)) return;\n if (!evaluateCondition(parentResponse, conditionValue)) return;\n\n childQuestionIds.forEach((childId) => {\n visibleSet.add(childId);\n addDescendantsRecursive(questions, responses, childId, visibleSet);\n });\n });\n });\n\n const visibleArray = allIds.filter((id) => visibleSet.has(id));\n const hiddenArray = allIds.filter((id) => !visibleSet.has(id));\n const prevSet = new Set(previouslyVisible);\n const newlyVisible = visibleArray.filter((id) => !prevSet.has(id));\n const newlyHidden = previouslyVisible.filter((id) => !visibleSet.has(id));\n\n return {\n visibleQuestions: visibleArray,\n hiddenQuestions: hiddenArray,\n newlyVisible,\n newlyHidden,\n };\n}\n\nfunction addDescendantsRecursive(\n questions: SurveyQuestion[],\n responses: ResponsesMap,\n parentId: string,\n visibleSet: Set<string>,\n): void {\n const parent = questions.find((q) => q.questionId === parentId);\n if (!parent?.childrenQuestions) return;\n\n const parentResponse = responses[parentId]?.value;\n\n Object.entries(parent.childrenQuestions).forEach(([conditionValue, childIds]) => {\n if (!Array.isArray(childIds)) return;\n if (!evaluateCondition(parentResponse, conditionValue)) return;\n\n childIds.forEach((childId) => {\n visibleSet.add(childId);\n addDescendantsRecursive(questions, responses, childId, visibleSet);\n });\n });\n}\n\n/**\n * Remove responses for questions that are now hidden.\n */\nexport function clearHiddenResponses(\n responses: ResponsesMap,\n hiddenQuestionIds: string[],\n): ResponsesMap {\n const hidden = new Set(hiddenQuestionIds);\n const out: ResponsesMap = {};\n Object.entries(responses).forEach(([id, r]) => {\n if (!hidden.has(id)) out[id] = r;\n });\n return out;\n}\n","/**\n * Validation for survey responses before submit.\n * Checks: mandatory fields, text limits, numeric-only input, file presence, tabular completeness.\n * Returns list of { questionId, message } for ValidationDialog display.\n */\n\nimport type { SurveyQuestion } from \"../types/survey.types\";\n\nexport type ValidationErrorItem = { questionId: string; message: string };\n\ntype ResponsesMap = Record<string, unknown>;\n\nfunction isEmpty(value: unknown, type: SurveyQuestion[\"type\"]): boolean {\n if (value === null || value === undefined) return true;\n\n switch (type) {\n case \"single-select\":\n case \"drop-down\":\n case \"text-response\":\n case \"calendar\":\n return value === \"\";\n\n case \"multi-select\":\n return !Array.isArray(value) || value.length === 0;\n\n case \"image-response\":\n case \"video-response\":\n case \"voice-response\":\n case \"document-response\":\n case \"pdf-response\":\n if (value && typeof value === \"object\" && \"binary\" in value) return false;\n return true;\n\n case \"tabular-text-input\":\n case \"tabular-drop-down\":\n case \"tabular-check-box\": {\n if (typeof value !== \"object\" || value === null) return true;\n const obj = value as Record<string, unknown>;\n const keys = Object.keys(obj);\n if (keys.length === 0) return true;\n if (type === \"tabular-check-box\") {\n return !Object.values(obj).some((v) => v === true);\n }\n return Object.values(obj).every(\n (v) => v === \"\" || v === null || v === undefined\n );\n }\n\n default:\n return value === \"\" || value === null || value === undefined;\n }\n}\n\nfunction validateTextLimit(\n question: SurveyQuestion,\n value: unknown,\n): string | null {\n const limit = question.textLimitCharacter;\n if (limit == null || limit <= 0) return null;\n\n if (question.type === \"text-response\" && typeof value === \"string\") {\n if (value.length > limit) {\n return `Maximum ${limit} characters allowed`;\n }\n return null;\n }\n\n if (\n question.type === \"tabular-text-input\" &&\n typeof value === \"object\" &&\n value !== null\n ) {\n const obj = value as Record<string, unknown>;\n for (const [k, v] of Object.entries(obj)) {\n if (v != null && String(v).length > limit) {\n return `Field \"${k}\" exceeds ${limit} characters`;\n }\n }\n }\n return null;\n}\n\nfunction validateNumericInput(\n question: SurveyQuestion,\n value: unknown,\n): string | null {\n if (question.textInputType !== \"Numeric\") return null;\n\n if (question.type === \"text-response\") {\n if (value === \"\" || value == null) return null;\n const s = String(value).trim();\n if (!/^\\d+$/.test(s)) return \"Please enter numbers only\";\n return null;\n }\n\n if (\n question.type === \"tabular-text-input\" &&\n typeof value === \"object\" &&\n value !== null\n ) {\n const obj = value as Record<string, unknown>;\n for (const [k, v] of Object.entries(obj)) {\n if (v != null && v !== \"\") {\n const s = String(v).trim();\n if (!/^\\d+$/.test(s)) {\n return `Field \"${k}\" must contain numbers only`;\n }\n }\n }\n }\n return null;\n}\n\nfunction validateMinMax(\n question: SurveyQuestion,\n value: unknown,\n): string | null {\n const min = question.minValue != null ? Number(question.minValue) : NaN;\n const max = question.maxValue != null ? Number(question.maxValue) : NaN;\n if (isNaN(min) && isNaN(max)) return null;\n\n if (question.type === \"text-response\" && typeof value === \"string\") {\n if (value.trim() === \"\") return null;\n const n = Number(value);\n if (isNaN(n)) return null;\n if (!isNaN(min) && !isNaN(max) && (n < min || n > max)) {\n return `Value must be between ${min} and ${max}`;\n }\n if (!isNaN(min) && n < min) return `Value must be at least ${min}`;\n if (!isNaN(max) && n > max) return `Value must be at most ${max}`;\n return null;\n }\n\n if (\n question.type === \"tabular-text-input\" &&\n typeof value === \"object\" &&\n value !== null\n ) {\n const obj = value as Record<string, unknown>;\n for (const [k, v] of Object.entries(obj)) {\n if (v != null && String(v).trim() !== \"\") {\n const n = Number(v);\n if (!isNaN(n)) {\n if (!isNaN(min) && !isNaN(max) && (n < min || n > max)) {\n return `Field \"${k}\" must be between ${min} and ${max}`;\n }\n if (!isNaN(min) && n < min) return `Field \"${k}\" must be at least ${min}`;\n if (!isNaN(max) && n > max) return `Field \"${k}\" must be at most ${max}`;\n }\n }\n }\n }\n return null;\n}\n\n/**\n * Validate visible questions. Returns errors (questionId + message).\n * Used for submit guard and ValidationDialog (list missing questionIds).\n */\nexport function validateResponses(\n questions: SurveyQuestion[],\n responses: ResponsesMap,\n visibleQuestionIds: string[],\n): ValidationErrorItem[] {\n const questionMap = new Map(questions.map((q) => [q.questionId, q]));\n const errors: ValidationErrorItem[] = [];\n\n visibleQuestionIds.forEach((questionId) => {\n const question = questionMap.get(questionId);\n if (!question) return;\n\n const value = responses[questionId];\n\n if (question.isMandatory && isEmpty(value, question.type)) {\n errors.push({ questionId, message: \"This question is required\" });\n return;\n }\n\n if (isEmpty(value, question.type)) return;\n\n const limitErr = validateTextLimit(question, value);\n if (limitErr) {\n errors.push({ questionId, message: limitErr });\n return;\n }\n\n const numErr = validateNumericInput(question, value);\n if (numErr) {\n errors.push({ questionId, message: numErr });\n return;\n }\n\n const rangeErr = validateMinMax(question, value);\n if (rangeErr) {\n errors.push({ questionId, message: rangeErr });\n }\n });\n\n return errors;\n}\n\n/**\n * Check if all visible mandatory questions are filled and valid.\n */\nexport function canSubmit(\n questions: SurveyQuestion[],\n responses: ResponsesMap,\n visibleQuestionIds: string[],\n): boolean {\n return (\n validateResponses(questions, responses, visibleQuestionIds).length === 0\n );\n}\n","/**\n * Format internal responses (Record<questionId, value>) to required SurveyResponseArray.\n * Handles: scalar, multi-select, tabular (RowAnswer[]), file (FileObject).\n */\n\nimport type {\n SurveyConfig,\n SurveyQuestion,\n SurveyResponseArray,\n SurveyResponseItem,\n SurveySubmitPayload,\n RowAnswer,\n FileObject,\n} from \"../types/survey.types\";\n\nexport type InternalResponses = Record<string, unknown>;\n\nfunction formatDateToYYYYMMDD(value: unknown): string | unknown {\n if (value && typeof value === \"object\" && (value as Date).constructor?.name === \"Date\") {\n const d = value as Date;\n const y = d.getFullYear();\n const m = String(d.getMonth() + 1).padStart(2, \"0\");\n const day = String(d.getDate()).padStart(2, \"0\");\n return `${y}-${m}-${day}`;\n }\n if (typeof value === \"string\" && value.includes(\"T\")) {\n try {\n const d = new Date(value);\n if (!isNaN(d.getTime())) {\n const y = d.getFullYear();\n const m = String(d.getMonth() + 1).padStart(2, \"0\");\n const day = String(d.getDate()).padStart(2, \"0\");\n return `${y}-${m}-${day}`;\n }\n } catch {\n // ignore\n }\n }\n return value;\n}\n\n/**\n * Convert one question's value to userAnswer format.\n */\nfunction formatQuestionAnswer(\n question: SurveyQuestion,\n value: unknown,\n): SurveyResponseItem[\"userAnswer\"] {\n if (value === undefined || value === null) {\n return question.type === \"multi-select\" ? [] : \"\";\n }\n\n switch (question.type) {\n case \"single-select\":\n case \"drop-down\":\n case \"text-response\":\n return typeof value === \"string\" ? value : String(value);\n\n case \"multi-select\":\n return Array.isArray(value) ? value.map(String) : [];\n\n case \"calendar\":\n return formatDateToYYYYMMDD(value) as string;\n\n case \"image-response\":\n case \"video-response\":\n case \"voice-response\":\n case \"document-response\":\n case \"pdf-response\": {\n if (value && typeof value === \"object\" && \"fileName\" in value && \"binary\" in value) {\n return value as FileObject;\n }\n return value as FileObject;\n }\n\n case \"tabular-text-input\":\n case \"tabular-drop-down\":\n case \"tabular-check-box\": {\n const rows = question.tableQuestionValue ?? [];\n if (typeof value !== \"object\" || value === null) {\n return rows.map((r) => ({\n rowId: r.rowId,\n rowQuestion: r.rowQuestion,\n rowAnswer: \"\" as string | boolean,\n }));\n }\n const record = value as Record<string, unknown>;\n return rows.map((r) => ({\n rowId: r.rowId,\n rowQuestion: r.rowQuestion,\n rowAnswer: (record[r.rowId] as string | boolean) ?? (question.type === \"tabular-check-box\" ? false : \"\"),\n })) as RowAnswer[];\n }\n\n default:\n return value as string | number | boolean | string[] | RowAnswer[] | FileObject;\n }\n}\n\n/**\n * Build SurveySubmitPayload from config and internal responses.\n * Includes survey-level fields (surveyId, surveyCode, surveyName, type) and responses array.\n * Only includes visible question IDs (and their answers) in responses.\n */\nexport function formatResponses(\n config: SurveyConfig,\n responses: InternalResponses,\n visibleQuestionIds: string[],\n): SurveySubmitPayload {\n const questionMap = new Map(config.questionList.map((q: SurveyQuestion) => [q.questionId, q]));\n const responsesArray: SurveyResponseArray = [];\n\n visibleQuestionIds.forEach((questionId) => {\n const value = responses[questionId];\n const question = questionMap.get(questionId);\n if (!question) return;\n\n const userAnswer = formatQuestionAnswer(question, value);\n responsesArray.push({ questionId, userAnswer });\n });\n\n return {\n surveyId: config.surveyId,\n ...(config.surveyCode != null && { surveyCode: config.surveyCode }),\n ...(config.surveyName != null && { surveyName: config.surveyName }),\n ...(config.type != null && { type: config.type }),\n responses: responsesArray,\n };\n}\n","/**\n * Default media validation constants.\n * Used when survey data.config does not provide per-type settings.\n * Size in MB for readability; fileUtils converts to bytes.\n */\n\nexport const DEFAULT_MEDIA_ALLOWED_TYPES: Record<string, string[]> = {\n \"image-response\": [\"image/jpeg\", \"image/png\"],\n \"video-response\": [\"video/mp4\"],\n \"voice-response\": [\"audio/mpeg\"],\n \"document-response\": [\n \"application/msword\",\n \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\",\n \"application/vnd.ms-powerpoint\",\n \"application/vnd.openxmlformats-officedocument.presentationml.presentation\",\n \"application/vnd.ms-excel\",\n \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\",\n \"text/plain\",\n \"application/json\",\n ],\n \"pdf-response\": [\"application/pdf\"],\n};\n\nexport const DEFAULT_MEDIA_MAX_SIZE_MB: Record<string, number> = {\n \"image-response\": 20,\n \"video-response\": 60,\n \"voice-response\": 20,\n \"document-response\": 25,\n \"pdf-response\": 25,\n};\n","/**\n * File utilities: base64 conversion, type/size validation.\n * No paths or URLs in output - only { fileName, fileType, binary }.\n * Uses data.config when provided (supportedSize in MB), else static defaults from helpers/constants.\n */\n\nimport type { FileObject } from \"../types/survey.types\";\n\n/**\n * Type guard: checks if value is a FileObject (fileName + binary).\n * Use when normalizing raw values from response state.\n */\nexport function isValueFileObject(value: unknown): value is FileObject {\n return (\n value != null &&\n typeof value === \"object\" &&\n \"fileName\" in (value as object) &&\n \"binary\" in (value as object)\n );\n}\n\nimport {\n DEFAULT_MEDIA_ALLOWED_TYPES,\n DEFAULT_MEDIA_MAX_SIZE_MB,\n} from \"../helpers/constants\";\nimport type { SurveyConfig } from \"../types/survey.types\";\n\n/** Re-export for backward compatibility */\nexport const MEDIA_ALLOWED_TYPES = DEFAULT_MEDIA_ALLOWED_TYPES;\nexport const MEDIA_MAX_SIZE_MB = DEFAULT_MEDIA_MAX_SIZE_MB;\n\nexport interface EffectiveMediaConfig {\n allowedTypes: Record<string, string[]>;\n maxSizeBytes: Record<string, number>;\n}\n\nconst MEDIA_QUESTION_TYPES = [\n \"image-response\",\n \"video-response\",\n \"voice-response\",\n \"document-response\",\n \"pdf-response\",\n] as const;\n\nexport type MediaQuestionType = (typeof MEDIA_QUESTION_TYPES)[number];\n\n/**\n * Build effective media config from survey data.config (supportedSize in MB).\n * Falls back to static defaults when config or per-type settings are missing.\n * Data may use \"audio-response\"; we map it to \"voice-response\".\n */\nexport function getEffectiveMediaConfig(dataConfig?: SurveyConfig[\"config\"]): EffectiveMediaConfig {\n const allowedTypes: Record<string, string[]> = { ...DEFAULT_MEDIA_ALLOWED_TYPES };\n const maxSizeBytes: Record<string, number> = {};\n\n for (const key of MEDIA_QUESTION_TYPES) {\n const entry =\n dataConfig?.[key] ??\n (key === \"voice-response\" ? dataConfig?.[\"audio-response\"] : undefined);\n const types = entry?.supportedType ?? entry?.suppotedType;\n if (types?.length) allowedTypes[key] = types;\n const sizeMB = entry?.supportedSize;\n if (sizeMB != null && sizeMB > 0) {\n maxSizeBytes[key] = sizeMB * 1024 * 1024;\n } else {\n const maxMB = DEFAULT_MEDIA_MAX_SIZE_MB[key] ?? 10;\n maxSizeBytes[key] = maxMB * 1024 * 1024;\n }\n }\n\n return { allowedTypes, maxSizeBytes };\n}\n\nexport interface FileValidationResult {\n valid: boolean;\n error?: string;\n}\n\nexport function validateFileType(\n file: File,\n questionType: MediaQuestionType,\n mediaConfig?: EffectiveMediaConfig | null,\n): FileValidationResult {\n const allowed = mediaConfig?.allowedTypes[questionType] ?? MEDIA_ALLOWED_TYPES[questionType];\n if (!allowed?.length) return { valid: true };\n const ok = allowed.some((t) => file.type === t || file.type.startsWith(t.split(\"/\")[0] + \"/\"));\n if (!ok) {\n return {\n valid: false,\n error: `File type ${file.type} is not allowed. Allowed: ${allowed.join(\", \")}`,\n };\n }\n return { valid: true };\n}\n\nexport function validateFileSize(\n file: File,\n questionType: MediaQuestionType,\n mediaConfig?: EffectiveMediaConfig | null,\n): FileValidationResult {\n const maxBytes =\n mediaConfig?.maxSizeBytes[questionType] ??\n (MEDIA_MAX_SIZE_MB[questionType] ?? 10) * 1024 * 1024;\n if (file.size > maxBytes) {\n const maxMB = Math.round(maxBytes / (1024 * 1024));\n return {\n valid: false,\n error: `File size must be less than ${maxMB}MB`,\n };\n }\n return { valid: true };\n}\n\nexport function validateFile(\n file: File,\n questionType: MediaQuestionType,\n mediaConfig?: EffectiveMediaConfig | null,\n): FileValidationResult {\n const typeResult = validateFileType(file, questionType, mediaConfig);\n if (!typeResult.valid) return typeResult;\n return validateFileSize(file, questionType, mediaConfig);\n}\n\n/**\n * Convert File to base64 and return { fileName, fileType, binary }.\n */\nexport function fileToFileObject(file: File): Promise<{\n fileName: string;\n fileType: string;\n binary: string;\n}> {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.onload = () => {\n const result = reader.result;\n if (typeof result !== \"string\") {\n reject(new Error(\"Failed to read file as base64\"));\n return;\n }\n const base64 = result.includes(\",\") ? result.split(\",\")[1] : result;\n resolve({\n fileName: file.name,\n fileType: file.type,\n binary: base64,\n });\n };\n reader.onerror = () => reject(reader.error);\n reader.readAsDataURL(file);\n });\n}\n","/**\n * Shared helpers for validating survey responses.\n * Used by questionStatus, progressCalculation, QuestionOverviewPanel, TabularInput.\n */\n\nimport type { SurveyQuestion } from \"../types/survey.types\";\nimport { isValueFileObject } from \"./fileUtils\";\n\n/**\n * Validates text value against input type (Numeric, Alphabet, AlphaNumeric).\n * Returns true for None/Text or empty after trim.\n */\nexport function validateInputType(value: string, inputType?: string): boolean {\n if (!inputType || inputType === \"None\" || inputType === \"Text\") return true;\n const t = value.trim();\n switch (inputType) {\n case \"Numeric\":\n return /^\\d+$/.test(t);\n case \"Alphabet\":\n case \"AlphaNumeric\":\n return /^[A-Za-z0-9]+$/.test(t);\n default:\n return true;\n }\n}\n\n/**\n * Checks if a question has a non-empty answer based on its type.\n */\nexport function isQuestionAnswered(question: SurveyQuestion, value: unknown): boolean {\n if (value === undefined || value === null) return false;\n\n switch (question.type) {\n case \"single-select\":\n case \"dropdown\":\n case \"drop-down\":\n case \"text-response\":\n return value !== \"\" && value !== null && value !== undefined;\n\n case \"multi-select\":\n return Array.isArray(value) && value.length > 0;\n\n case \"calendar\":\n return (\n value != null &&\n typeof value === \"object\" &&\n (value as Date).constructor?.name === \"Date\"\n );\n\n case \"video-response\":\n case \"voice-response\":\n case \"image-response\":\n case \"document-response\":\n case \"pdf-response\":\n return (\n isValueFileObject(value) ||\n (typeof value === \"string\" && value !== \"\") ||\n (value != null &&\n typeof value === \"object\" &&\n \"devicePath\" in (value as object))\n );\n\n case \"tabular-text-input\":\n case \"tabular-drop-down\": {\n if (typeof value !== \"object\") return false;\n const tableValue = value as Record<string, unknown>;\n const expectedRows = question.tableQuestionValue || [];\n if (expectedRows.length === 0) {\n return (\n Object.keys(tableValue).length > 0 &&\n Object.values(tableValue).some(\n (v) => v !== \"\" && v !== null && v !== undefined\n )\n );\n }\n if (question.isMandatory) {\n return expectedRows.every((row) => {\n const v = tableValue[row.rowId];\n return v !== \"\" && v !== null && v !== undefined;\n });\n }\n return expectedRows.some((row) => {\n const v = tableValue[row.rowId];\n return v !== \"\" && v !== null && v !== undefined;\n });\n }\n\n case \"tabular-check-box\": {\n if (typeof value !== \"object\") return false;\n const tableValue = value as Record<string, unknown>;\n const expectedRows = question.tableQuestionValue || [];\n if (expectedRows.length === 0)\n return Object.values(tableValue).some((v) => v === true);\n if (question.isMandatory) {\n return expectedRows.some((row) => tableValue[row.rowId] === true);\n }\n return expectedRows.length > 0 && Object.keys(tableValue).length > 0;\n }\n\n default:\n return false;\n }\n}\n\n/**\n * Checks if a question's answer is valid (character limits, input type, etc.).\n */\nexport function isQuestionValid(question: SurveyQuestion, value: unknown): boolean {\n if (!isQuestionAnswered(question, value)) return !question.isMandatory;\n\n if (\n question.type === \"tabular-text-input\" ||\n question.type === \"tabular-drop-down\" ||\n question.type === \"tabular-check-box\"\n ) {\n if (typeof value === \"object\" && value !== null) {\n const tableValue = value as Record<string, unknown>;\n if (question.textLimitCharacter) {\n const limit = parseInt(question.textLimitCharacter.toString(), 10);\n for (const fieldValue of Object.values(tableValue)) {\n if (\n fieldValue != null &&\n String(fieldValue).length > limit\n )\n return false;\n }\n }\n if (question.textInputType) {\n for (const fieldValue of Object.values(tableValue)) {\n if (\n fieldValue != null &&\n !validateInputType(String(fieldValue), question.textInputType)\n )\n return false;\n }\n }\n }\n } else {\n if (question.textLimitCharacter && value != null) {\n if (\n String(value).length >\n parseInt(question.textLimitCharacter.toString(), 10)\n )\n return false;\n }\n if (\n question.textInputType &&\n value != null &&\n !validateInputType(String(value), question.textInputType)\n )\n return false;\n }\n return true;\n}\n","/**\n * Question status for overview/carousel: completed | error | required | unanswered.\n * Uses shared response helpers from responseHelpers.ts.\n */\n\nimport type { SurveyQuestion } from \"../types/survey.types\";\nimport { isQuestionAnswered, isQuestionValid } from \"./responseHelpers\";\n\nexport type QuestionStatus = \"completed\" | \"unanswered\" | \"required\" | \"error\";\n\n/**\n * Returns status for a single question. Used by QuestionOverviewPanel and when\n * building the carousel status map (including validation-error overrides).\n */\nexport function getQuestionStatus(\n questionId: string,\n questions: SurveyQuestion[],\n responses: Record<string, unknown>,\n readOnly = false,\n): QuestionStatus {\n if (readOnly) return \"completed\";\n\n const question = questions.find((q) => q.questionId === questionId);\n if (!question) return \"unanswered\";\n\n const value = responses[questionId];\n const answered = isQuestionAnswered(question, value);\n const valid = isQuestionValid(question, value);\n\n if (answered && valid) return \"completed\";\n if (answered && !valid) return \"error\";\n if (!answered && question.isMandatory) return \"required\";\n return \"unanswered\";\n}\n\n/**\n * Returns a map of questionId -> status for visible questions.\n * Used by QuestionListCarousel and QuestionOverviewPanel.\n */\nexport function getQuestionStatusMap(\n questions: SurveyQuestion[],\n responses: Record<string, unknown>,\n visibleQuestionIds: string[],\n readOnly = false,\n): Record<string, QuestionStatus> {\n const map: Record<string, QuestionStatus> = {};\n for (const questionId of visibleQuestionIds) {\n map[questionId] = getQuestionStatus(questionId, questions, responses, readOnly);\n }\n return map;\n}\n","export interface MCQOption {\n id: string;\n text: string;\n}\n\nexport interface MCQSelectProps {\n options: MCQOption[];\n selectionMode: \"single\" | \"multiple\";\n selectedOptions?: string | string[];\n onOptionSelect: (optionId: string | string[]) => void;\n className?: string;\n disabled?: boolean;\n}\n\nexport default function MCQSelect({\n options,\n selectionMode,\n selectedOptions,\n onOptionSelect,\n className = \"\",\n disabled = false,\n}: MCQSelectProps) {\n const handleOptionClick = (optionId: string) => {\n if (selectionMode === \"single\") {\n onOptionSelect(optionId);\n } else {\n const currentSelections = Array.isArray(selectedOptions)\n ? selectedOptions\n : [];\n if (currentSelections.includes(optionId)) {\n onOptionSelect(currentSelections.filter((id) => id !== optionId));\n } else {\n onOptionSelect([...currentSelections, optionId]);\n }\n }\n };\n\n const isOptionSelected = (optionId: string): boolean => {\n if (selectionMode === \"single\") return selectedOptions === optionId;\n return Array.isArray(selectedOptions) && selectedOptions.includes(optionId);\n };\n\n return (\n <div className={`space-y-3 ${className}`}>\n {options.map((option) => {\n const isSelected = isOptionSelected(option.id);\n return (\n <button\n key={option.id}\n type=\"button\"\n onClick={() => handleOptionClick(option.id)}\n className={`w-full border px-4 py-3 text-left text-sm leading-5 font-normal transition-all border-rounded rounded-xl ${\n disabled ? \"cursor-not-allowed opacity-50\" : \"cursor-pointer\"\n } ${\n isSelected\n ? \"border-[var(--primary-600)] bg-[var(--primary-600)] text-[var(--primary-foreground)]\"\n : \"border-[var(--primary-600)] bg-[var(--neutral-50)] text-[var(--primary-600)] hover:bg-[var(--primary-50)]\"\n }`}\n >\n <div className=\"flex items-center gap-3\">\n <div className=\"flex-shrink-0\">\n {selectionMode === \"single\" ? (\n <div\n className={`h-4 w-4 rounded-full border-2 transition-all ${\n isSelected ? \"border-[var(--neutral-50)] bg-[var(--neutral-50)]\" : \"border-[var(--primary-600)] bg-transparent\"\n }`}\n >\n {isSelected && (\n <div className=\"h-full w-full scale-50 rounded-full bg-[var(--primary-600)]\" />\n )}\n </div>\n ) : (\n <div\n className={`h-4 w-4 rounded border-2 transition-all ${\n isSelected ? \"border-[var(--neutral-50)] bg-[var(--neutral-50)]\" : \"border-[var(--primary-600)] bg-transparent\"\n }`}\n >\n {isSelected && (\n <svg\n className=\"h-full w-full text-[var(--primary-600)]\"\n fill=\"currentColor\"\n viewBox=\"0 0 20 20\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z\"\n clipRule=\"evenodd\"\n />\n </svg>\n )}\n </div>\n )}\n </div>\n <span className=\"flex-1\">{option.text}</span>\n </div>\n </button>\n );\n })}\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;","/**\n * Concatenates two arrays faster than the array spread operator.\n */\nconst concatArrays = (array1, array2) => {\n // Pre-allocate for better V8 optimization\n const combinedArray = new Array(array1.length + array2.length);\n for (let i = 0; i < array1.length; i++) {\n combinedArray[i] = array1[i];\n }\n for (let i = 0; i < array2.length; i++) {\n combinedArray[array1.length + i] = array2[i];\n }\n return combinedArray;\n};\n\n// Factory function ensures consistent object shapes\nconst createClassValidatorObject = (classGroupId, validator) => ({\n classGroupId,\n validator\n});\n// Factory ensures consistent ClassPartObject shape\nconst createClassPartObject = (nextPart = new Map(), validators = null, classGroupId) => ({\n nextPart,\n validators,\n classGroupId\n});\nconst CLASS_PART_SEPARATOR = '-';\nconst EMPTY_CONFLICTS = [];\n// I use two dots here because one dot is used as prefix for class groups in plugins\nconst ARBITRARY_PROPERTY_PREFIX = 'arbitrary..';\nconst createClassGroupUtils = config => {\n const classMap = createClassMap(config);\n const {\n conflictingClassGroups,\n conflictingClassGroupModifiers\n } = config;\n const getClassGroupId = className => {\n if (className.startsWith('[') && className.endsWith(']')) {\n return getGroupIdForArbitraryProperty(className);\n }\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 skip it.\n const startIndex = classParts[0] === '' && classParts.length > 1 ? 1 : 0;\n return getGroupRecursive(classParts, startIndex, classMap);\n };\n const getConflictingClassGroupIds = (classGroupId, hasPostfixModifier) => {\n if (hasPostfixModifier) {\n const modifierConflicts = conflictingClassGroupModifiers[classGroupId];\n const baseConflicts = conflictingClassGroups[classGroupId];\n if (modifierConflicts) {\n if (baseConflicts) {\n // Merge base conflicts with modifier conflicts\n return concatArrays(baseConflicts, modifierConflicts);\n }\n // Only modifier conflicts\n return modifierConflicts;\n }\n // Fall back to without postfix if no modifier conflicts\n return baseConflicts || EMPTY_CONFLICTS;\n }\n return conflictingClassGroups[classGroupId] || EMPTY_CONFLICTS;\n };\n return {\n getClassGroupId,\n getConflictingClassGroupIds\n };\n};\nconst getGroupRecursive = (classParts, startIndex, classPartObject) => {\n const classPathsLength = classParts.length - startIndex;\n if (classPathsLength === 0) {\n return classPartObject.classGroupId;\n }\n const currentClassPart = classParts[startIndex];\n const nextClassPartObject = classPartObject.nextPart.get(currentClassPart);\n if (nextClassPartObject) {\n const result = getGroupRecursive(classParts, startIndex + 1, nextClassPartObject);\n if (result) return result;\n }\n const validators = classPartObject.validators;\n if (validators === null) {\n return undefined;\n }\n // Build classRest string efficiently by joining from startIndex onwards\n const classRest = startIndex === 0 ? classParts.join(CLASS_PART_SEPARATOR) : classParts.slice(startIndex).join(CLASS_PART_SEPARATOR);\n const validatorsLength = validators.length;\n for (let i = 0; i < validatorsLength; i++) {\n const validatorObj = validators[i];\n if (validatorObj.validator(classRest)) {\n return validatorObj.classGroupId;\n }\n }\n return undefined;\n};\n/**\n * Get the class group ID for an arbitrary property.\n *\n * @param className - The class name to get the group ID for. Is expected to be string starting with `[` and ending with `]`.\n */\nconst getGroupIdForArbitraryProperty = className => className.slice(1, -1).indexOf(':') === -1 ? undefined : (() => {\n const content = className.slice(1, -1);\n const colonIndex = content.indexOf(':');\n const property = content.slice(0, colonIndex);\n return property ? ARBITRARY_PROPERTY_PREFIX + property : undefined;\n})();\n/**\n * Exported for testing only\n */\nconst createClassMap = config => {\n const {\n theme,\n classGroups\n } = config;\n return processClassGroups(classGroups, theme);\n};\n// Split into separate functions to maintain monomorphic call sites\nconst processClassGroups = (classGroups, theme) => {\n const classMap = createClassPartObject();\n for (const classGroupId in classGroups) {\n const group = classGroups[classGroupId];\n processClassesRecursively(group, classMap, classGroupId, theme);\n }\n return classMap;\n};\nconst processClassesRecursively = (classGroup, classPartObject, classGroupId, theme) => {\n const len = classGroup.length;\n for (let i = 0; i < len; i++) {\n const classDefinition = classGroup[i];\n processClassDefinition(classDefinition, classPartObject, classGroupId, theme);\n }\n};\n// Split into separate functions for each type to maintain monomorphic call sites\nconst processClassDefinition = (classDefinition, classPartObject, classGroupId, theme) => {\n if (typeof classDefinition === 'string') {\n processStringDefinition(classDefinition, classPartObject, classGroupId);\n return;\n }\n if (typeof classDefinition === 'function') {\n processFunctionDefinition(classDefinition, classPartObject, classGroupId, theme);\n return;\n }\n processObjectDefinition(classDefinition, classPartObject, classGroupId, theme);\n};\nconst processStringDefinition = (classDefinition, classPartObject, classGroupId) => {\n const classPartObjectToEdit = classDefinition === '' ? classPartObject : getPart(classPartObject, classDefinition);\n classPartObjectToEdit.classGroupId = classGroupId;\n};\nconst processFunctionDefinition = (classDefinition, classPartObject, classGroupId, theme) => {\n if (isThemeGetter(classDefinition)) {\n processClassesRecursively(classDefinition(theme), classPartObject, classGroupId, theme);\n return;\n }\n if (classPartObject.validators === null) {\n classPartObject.validators = [];\n }\n classPartObject.validators.push(createClassValidatorObject(classGroupId, classDefinition));\n};\nconst processObjectDefinition = (classDefinition, classPartObject, classGroupId, theme) => {\n const entries = Object.entries(classDefinition);\n const len = entries.length;\n for (let i = 0; i < len; i++) {\n const [key, value] = entries[i];\n processClassesRecursively(value, getPart(classPartObject, key), classGroupId, theme);\n }\n};\nconst getPart = (classPartObject, path) => {\n let current = classPartObject;\n const parts = path.split(CLASS_PART_SEPARATOR);\n const len = parts.length;\n for (let i = 0; i < len; i++) {\n const part = parts[i];\n let next = current.nextPart.get(part);\n if (!next) {\n next = createClassPartObject();\n current.nextPart.set(part, next);\n }\n current = next;\n }\n return current;\n};\n// Type guard maintains monomorphic check\nconst isThemeGetter = func => 'isThemeGetter' in func && func.isThemeGetter === true;\n\n// LRU cache implementation using plain objects for simplicity\nconst createLruCache = maxCacheSize => {\n if (maxCacheSize < 1) {\n return {\n get: () => undefined,\n set: () => {}\n };\n }\n let cacheSize = 0;\n let cache = Object.create(null);\n let previousCache = Object.create(null);\n const update = (key, value) => {\n cache[key] = value;\n cacheSize++;\n if (cacheSize > maxCacheSize) {\n cacheSize = 0;\n previousCache = cache;\n cache = Object.create(null);\n }\n };\n return {\n get(key) {\n let value = cache[key];\n if (value !== undefined) {\n return value;\n }\n if ((value = previousCache[key]) !== undefined) {\n update(key, value);\n return value;\n }\n },\n set(key, value) {\n if (key in cache) {\n cache[key] = value;\n } else {\n update(key, value);\n }\n }\n };\n};\nconst IMPORTANT_MODIFIER = '!';\nconst MODIFIER_SEPARATOR = ':';\nconst EMPTY_MODIFIERS = [];\n// Pre-allocated result object shape for consistency\nconst createResultObject = (modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition, isExternal) => ({\n modifiers,\n hasImportantModifier,\n baseClassName,\n maybePostfixModifierPosition,\n isExternal\n});\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 // Use simple array with push for better performance\n const modifiers = [];\n let bracketDepth = 0;\n let parenDepth = 0;\n let modifierStart = 0;\n let postfixModifierPosition;\n const len = className.length;\n for (let index = 0; index < len; index++) {\n const currentCharacter = className[index];\n if (bracketDepth === 0 && parenDepth === 0) {\n if (currentCharacter === MODIFIER_SEPARATOR) {\n modifiers.push(className.slice(modifierStart, index));\n modifierStart = index + 1;\n continue;\n }\n if (currentCharacter === '/') {\n postfixModifierPosition = index;\n continue;\n }\n }\n if (currentCharacter === '[') bracketDepth++;else if (currentCharacter === ']') bracketDepth--;else if (currentCharacter === '(') parenDepth++;else if (currentCharacter === ')') parenDepth--;\n }\n const baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.slice(modifierStart);\n // Inline important modifier check\n let baseClassName = baseClassNameWithImportantModifier;\n let hasImportantModifier = false;\n if (baseClassNameWithImportantModifier.endsWith(IMPORTANT_MODIFIER)) {\n baseClassName = baseClassNameWithImportantModifier.slice(0, -1);\n hasImportantModifier = true;\n } else if (\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 baseClassNameWithImportantModifier.startsWith(IMPORTANT_MODIFIER)) {\n baseClassName = baseClassNameWithImportantModifier.slice(1);\n hasImportantModifier = true;\n }\n const maybePostfixModifierPosition = postfixModifierPosition && postfixModifierPosition > modifierStart ? postfixModifierPosition - modifierStart : undefined;\n return createResultObject(modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition);\n };\n if (prefix) {\n const fullPrefix = prefix + MODIFIER_SEPARATOR;\n const parseClassNameOriginal = parseClassName;\n parseClassName = className => className.startsWith(fullPrefix) ? parseClassNameOriginal(className.slice(fullPrefix.length)) : createResultObject(EMPTY_MODIFIERS, false, className, undefined, true);\n }\n if (experimentalParseClassName) {\n const parseClassNameOriginal = parseClassName;\n parseClassName = className => experimentalParseClassName({\n className,\n parseClassName: parseClassNameOriginal\n });\n }\n return parseClassName;\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 // Pre-compute weights for all known modifiers for O(1) comparison\n const modifierWeights = new Map();\n // Assign weights to sensitive modifiers (highest priority, but preserve order)\n config.orderSensitiveModifiers.forEach((mod, index) => {\n modifierWeights.set(mod, 1000000 + index); // High weights for sensitive mods\n });\n return modifiers => {\n const result = [];\n let currentSegment = [];\n // Process modifiers in one pass\n for (let i = 0; i < modifiers.length; i++) {\n const modifier = modifiers[i];\n // Check if modifier is sensitive (starts with '[' or in orderSensitiveModifiers)\n const isArbitrary = modifier[0] === '[';\n const isOrderSensitive = modifierWeights.has(modifier);\n if (isArbitrary || isOrderSensitive) {\n // Sort and flush current segment alphabetically\n if (currentSegment.length > 0) {\n currentSegment.sort();\n result.push(...currentSegment);\n currentSegment = [];\n }\n result.push(modifier);\n } else {\n // Regular modifier - add to current segment for batch sorting\n currentSegment.push(modifier);\n }\n }\n // Sort and add any remaining segment items\n if (currentSegment.length > 0) {\n currentSegment.sort();\n result.push(...currentSegment);\n }\n return result;\n };\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 // Fast path: skip sorting for empty or single modifier\n const variantModifier = modifiers.length === 0 ? '' : modifiers.length === 1 ? modifiers[0] : sortModifiers(modifiers).join(':');\n const modifierId = hasImportantModifier ? variantModifier + IMPORTANT_MODIFIER : variantModifier;\n const classId = modifierId + classGroupId;\n if (classGroupsInConflict.indexOf(classId) > -1) {\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 */\nconst twJoin = (...classLists) => {\n let index = 0;\n let argument;\n let resolvedValue;\n let string = '';\n while (index < classLists.length) {\n if (argument = classLists[index++]) {\n if (resolvedValue = toValue(argument)) {\n string && (string += ' ');\n string += resolvedValue;\n }\n }\n }\n return string;\n};\nconst toValue = mix => {\n // Fast path for strings\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};\nconst createTailwindMerge = (createConfigFirst, ...createConfigRest) => {\n let configUtils;\n let cacheGet;\n let cacheSet;\n let functionToCall;\n const 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 const 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 functionToCall = initTailwindMerge;\n return (...args) => functionToCall(twJoin(...args));\n};\nconst fallbackThemeArr = [];\nconst fromTheme = key => {\n const themeGetter = theme => theme[key] || fallbackThemeArr;\n themeGetter.isThemeGetter = true;\n return themeGetter;\n};\nconst arbitraryValueRegex = /^\\[(?:(\\w[\\w-]*):)?(.+)\\]$/i;\nconst arbitraryVariableRegex = /^\\((?:(\\w[\\w-]*):)?(.+)\\)$/i;\nconst fractionRegex = /^\\d+(?:\\.\\d+)?\\/\\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 isArbitraryWeight = value => getIsArbitraryValue(value, isLabelWeight, isAny);\nconst isArbitraryFamilyName = value => getIsArbitraryValue(value, isLabelFamilyName, isNever);\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);\nconst isArbitraryVariableWeight = value => getIsArbitraryVariable(value, isLabelWeight, 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 isLabelWeight = label => label === 'number' || label === 'weight';\nconst isLabelShadow = label => label === 'shadow';\nconst validators = /*#__PURE__*/Object.defineProperty({\n __proto__: null,\n isAny,\n isAnyNonArbitrary,\n isArbitraryFamilyName,\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 isArbitraryVariableWeight,\n isArbitraryWeight,\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 scaleSizingInline = () => [isFraction, 'screen', 'full', 'dvw', 'lvw', 'svw', 'min', 'max', 'fit', ...scaleUnambiguousSpacing()];\n const scaleSizingBlock = () => [isFraction, 'screen', 'full', 'lh', 'dvh', 'lvh', '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 * Inset\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n inset: [{\n inset: scaleInset()\n }],\n /**\n * Inset Inline\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n 'inset-x': [{\n 'inset-x': scaleInset()\n }],\n /**\n * Inset Block\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n 'inset-y': [{\n 'inset-y': scaleInset()\n }],\n /**\n * Inset Inline Start\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n * @todo class group will be renamed to `inset-s` in next major release\n */\n start: [{\n 'inset-s': scaleInset(),\n /**\n * @deprecated since Tailwind CSS v4.2.0 in favor of `inset-s-*` utilities.\n * @see https://github.com/tailwindlabs/tailwindcss/pull/19613\n */\n start: scaleInset()\n }],\n /**\n * Inset Inline End\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n * @todo class group will be renamed to `inset-e` in next major release\n */\n end: [{\n 'inset-e': scaleInset(),\n /**\n * @deprecated since Tailwind CSS v4.2.0 in favor of `inset-e-*` utilities.\n * @see https://github.com/tailwindlabs/tailwindcss/pull/19613\n */\n end: scaleInset()\n }],\n /**\n * Inset Block Start\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n 'inset-bs': [{\n 'inset-bs': scaleInset()\n }],\n /**\n * Inset Block End\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n 'inset-be': [{\n 'inset-be': 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 Inline\n * @see https://tailwindcss.com/docs/padding\n */\n px: [{\n px: scaleUnambiguousSpacing()\n }],\n /**\n * Padding Block\n * @see https://tailwindcss.com/docs/padding\n */\n py: [{\n py: scaleUnambiguousSpacing()\n }],\n /**\n * Padding Inline Start\n * @see https://tailwindcss.com/docs/padding\n */\n ps: [{\n ps: scaleUnambiguousSpacing()\n }],\n /**\n * Padding Inline End\n * @see https://tailwindcss.com/docs/padding\n */\n pe: [{\n pe: scaleUnambiguousSpacing()\n }],\n /**\n * Padding Block Start\n * @see https://tailwindcss.com/docs/padding\n */\n pbs: [{\n pbs: scaleUnambiguousSpacing()\n }],\n /**\n * Padding Block End\n * @see https://tailwindcss.com/docs/padding\n */\n pbe: [{\n pbe: 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 Inline\n * @see https://tailwindcss.com/docs/margin\n */\n mx: [{\n mx: scaleMargin()\n }],\n /**\n * Margin Block\n * @see https://tailwindcss.com/docs/margin\n */\n my: [{\n my: scaleMargin()\n }],\n /**\n * Margin Inline Start\n * @see https://tailwindcss.com/docs/margin\n */\n ms: [{\n ms: scaleMargin()\n }],\n /**\n * Margin Inline End\n * @see https://tailwindcss.com/docs/margin\n */\n me: [{\n me: scaleMargin()\n }],\n /**\n * Margin Block Start\n * @see https://tailwindcss.com/docs/margin\n */\n mbs: [{\n mbs: scaleMargin()\n }],\n /**\n * Margin Block End\n * @see https://tailwindcss.com/docs/margin\n */\n mbe: [{\n mbe: 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 * Inline Size\n * @see https://tailwindcss.com/docs/width\n */\n 'inline-size': [{\n inline: ['auto', ...scaleSizingInline()]\n }],\n /**\n * Min-Inline Size\n * @see https://tailwindcss.com/docs/min-width\n */\n 'min-inline-size': [{\n 'min-inline': ['auto', ...scaleSizingInline()]\n }],\n /**\n * Max-Inline Size\n * @see https://tailwindcss.com/docs/max-width\n */\n 'max-inline-size': [{\n 'max-inline': ['none', ...scaleSizingInline()]\n }],\n /**\n * Block Size\n * @see https://tailwindcss.com/docs/height\n */\n 'block-size': [{\n block: ['auto', ...scaleSizingBlock()]\n }],\n /**\n * Min-Block Size\n * @see https://tailwindcss.com/docs/min-height\n */\n 'min-block-size': [{\n 'min-block': ['auto', ...scaleSizingBlock()]\n }],\n /**\n * Max-Block Size\n * @see https://tailwindcss.com/docs/max-height\n */\n 'max-block-size': [{\n 'max-block': ['none', ...scaleSizingBlock()]\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, isArbitraryVariableWeight, isArbitraryWeight]\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, isArbitraryFamilyName, themeFont]\n }],\n /**\n * Font Feature Settings\n * @see https://tailwindcss.com/docs/font-feature-settings\n */\n 'font-features': [{\n 'font-features': [isArbitraryValue]\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 Inline\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-x': [{\n 'border-x': scaleBorderWidth()\n }],\n /**\n * Border Width Block\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-y': [{\n 'border-y': scaleBorderWidth()\n }],\n /**\n * Border Width Inline Start\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-s': [{\n 'border-s': scaleBorderWidth()\n }],\n /**\n * Border Width Inline End\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-e': [{\n 'border-e': scaleBorderWidth()\n }],\n /**\n * Border Width Block Start\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-bs': [{\n 'border-bs': scaleBorderWidth()\n }],\n /**\n * Border Width Block End\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-be': [{\n 'border-be': 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 Inline\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-x': [{\n 'border-x': scaleColor()\n }],\n /**\n * Border Color Block\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-y': [{\n 'border-y': scaleColor()\n }],\n /**\n * Border Color Inline Start\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-s': [{\n 'border-s': scaleColor()\n }],\n /**\n * Border Color Inline End\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-e': [{\n 'border-e': scaleColor()\n }],\n /**\n * Border Color Block Start\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-bs': [{\n 'border-bs': scaleColor()\n }],\n /**\n * Border Color Block End\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-be': [{\n 'border-be': 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 Inline\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-mx': [{\n 'scroll-mx': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Margin Block\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-my': [{\n 'scroll-my': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Margin Inline Start\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-ms': [{\n 'scroll-ms': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Margin Inline End\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-me': [{\n 'scroll-me': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Margin Block Start\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-mbs': [{\n 'scroll-mbs': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Margin Block End\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-mbe': [{\n 'scroll-mbe': 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 Inline\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-px': [{\n 'scroll-px': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Padding Block\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-py': [{\n 'scroll-py': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Padding Inline Start\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-ps': [{\n 'scroll-ps': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Padding Inline End\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-pe': [{\n 'scroll-pe': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Padding Block Start\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-pbs': [{\n 'scroll-pbs': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Padding Block End\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-pbe': [{\n 'scroll-pbe': 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', 'inset-bs', 'inset-be', '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', 'pbs', 'pbe', 'pt', 'pr', 'pb', 'pl'],\n px: ['pr', 'pl'],\n py: ['pt', 'pb'],\n m: ['mx', 'my', 'ms', 'me', 'mbs', 'mbe', '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-bs', 'border-w-be', '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-bs', 'border-color-be', '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-mbs', 'scroll-mbe', '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-pbs', 'scroll-pbe', '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 { cn } from \"../../lib/utils\";\n\nfunction Textarea({ className, ...props }: React.ComponentProps<\"textarea\">) {\n return (\n <textarea\n data-slot=\"textarea\"\n className={cn(\n \"border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 aria-invalid:border-destructive flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm\",\n className\n )}\n {...props}\n />\n );\n}\n\nexport { Textarea };\n","import { Textarea } from \"../ui/textarea\";\nimport { cn } from \"../../lib/utils\";\n\nexport interface TextResponseProps {\n value?: string;\n onChange: (value: string) => void;\n placeholder?: string;\n className?: string;\n disabled?: boolean;\n minRows?: number;\n maxRows?: number;\n characterLimit?: number;\n}\n\nexport default function TextResponse({\n value = \"\",\n onChange,\n placeholder = \"Enter your response...\",\n className = \"\",\n disabled = false,\n minRows = 3,\n maxRows = 8,\n characterLimit,\n}: TextResponseProps) {\n const handleChange = (e: React.ChangeEvent<HTMLTextAreaElement>) => {\n let v = e.target.value;\n if (characterLimit && v.length > characterLimit) v = v.slice(0, characterLimit);\n onChange(v);\n };\n\n const count = value.length;\n const isNearLimit = characterLimit && count >= characterLimit * 0.9;\n const isAtLimit = characterLimit && count >= characterLimit;\n\n return (\n <div className={cn(\"space-y-2\", className)}>\n <div className=\"relative\">\n <Textarea\n value={value}\n onChange={handleChange}\n placeholder={placeholder}\n disabled={disabled}\n rows={minRows}\n className={cn(\n \"w-full resize-y rounded-lg border border-[var(--neutral-200)] bg-[var(--neutral-50)] px-[13px] py-3 text-sm font-normal\",\n \"focus:border-[var(--primary-600)] focus:ring-0 focus:outline-none\",\n \"placeholder:text-textGray\",\n \"!field-sizing-auto !transition-none\", // Remove transitions that cause lag during resize\n \"resize-y\", // Ensure only vertical resize\n disabled && \"cursor-not-allowed opacity-50\",\n )}\n style={{\n minHeight: `${minRows * 1.5}rem`,\n maxHeight: `${maxRows * 1.5}rem`,\n boxSizing: \"border-box\",\n overflow: \"hidden\",\n borderRadius: \"0px\",\n backgroundColor: \"white\",\n }}\n />\n </div>\n {characterLimit != null && (\n <div className=\"flex justify-end\">\n <span\n className={cn(\n \"text-xs transition-colors\",\n isAtLimit ? \"text-error\" : isNearLimit ? \"text-warning\" : \"text-textGray\",\n )}\n >\n {count}/{characterLimit}\n </span>\n </div>\n )}\n </div>\n );\n}\n","import { useState, useRef, useEffect } from \"react\";\n\nexport interface DropdownOption {\n value: string;\n label: string;\n disabled?: boolean;\n}\n\nexport interface DropdownProps {\n options: DropdownOption[];\n value?: string;\n onChange: (value: string) => void;\n placeholder?: string;\n disabled?: boolean;\n error?: string;\n required?: boolean;\n className?: string;\n dropdownClassName?: string;\n}\n\nexport default function Dropdown({\n options,\n value,\n onChange,\n placeholder = \"Select an option\",\n disabled = false,\n error,\n required = false,\n className = \"\",\n}: DropdownProps) {\n const [isOpen, setIsOpen] = useState(false);\n const [highlightedIndex, setHighlightedIndex] = useState(-1);\n const dropdownRef = useRef<HTMLDivElement>(null);\n\n const selectedOption = options.find((opt) => opt.value === value);\n const displayValue = selectedOption?.label || \"\";\n\n useEffect(() => {\n function handleClickOutside(e: MouseEvent) {\n if (dropdownRef.current && !dropdownRef.current.contains(e.target as Node)) {\n setIsOpen(false);\n setHighlightedIndex(-1);\n }\n }\n if (isOpen) document.addEventListener(\"mousedown\", handleClickOutside);\n return () => document.removeEventListener(\"mousedown\", handleClickOutside);\n }, [isOpen]);\n\n useEffect(() => {\n function handleKeyDown(e: KeyboardEvent) {\n if (!isOpen) return;\n const enabled = options.filter((opt) => !opt.disabled);\n switch (e.key) {\n case \"ArrowDown\":\n e.preventDefault();\n setHighlightedIndex((p) => (p + 1 >= enabled.length ? 0 : p + 1));\n break;\n case \"ArrowUp\":\n e.preventDefault();\n setHighlightedIndex((p) => (p - 1 < 0 ? enabled.length - 1 : p - 1));\n break;\n case \"Enter\":\n e.preventDefault();\n if (highlightedIndex >= 0 && enabled[highlightedIndex]) {\n onChange(enabled[highlightedIndex].value);\n setIsOpen(false);\n }\n break;\n case \"Escape\":\n setIsOpen(false);\n setHighlightedIndex(-1);\n break;\n }\n }\n if (isOpen) document.addEventListener(\"keydown\", handleKeyDown);\n return () => document.removeEventListener(\"keydown\", handleKeyDown);\n }, [isOpen, highlightedIndex, options, onChange]);\n\n const handleToggle = () => {\n if (!disabled) {\n setIsOpen((o) => !o);\n setHighlightedIndex(-1);\n }\n };\n\n const handleSelect = (opt: DropdownOption) => {\n if (!opt.disabled) {\n onChange(opt.value);\n setIsOpen(false);\n setHighlightedIndex(-1);\n }\n };\n\n const baseInput =\n \"relative w-full cursor-pointer border border-rounded rounded-xl border-[var(--neutral-200)] bg-[var(--neutral-50)] px-3 py-2 pr-10 text-left focus:border-[var(--primary-600)] focus:outline-none focus:ring-1 focus:ring-[var(--primary-200)] \" +\n (disabled ? \"cursor-not-allowed bg-[var(--neutral-100)] text-[var(--neutral-500)] \" : \"\") +\n (error ? \"border-error focus:border-error focus:ring-error \" : \"\");\n\n return (\n <div className={`relative ${className}`} ref={dropdownRef}>\n <button\n type=\"button\"\n className={baseInput}\n onClick={handleToggle}\n disabled={disabled}\n aria-haspopup=\"listbox\"\n aria-expanded={isOpen}\n >\n <span className={`block truncate ${!displayValue ? \"text-textGray\" : \"text-textBlack\"}`}>\n {displayValue || placeholder}\n {required && !displayValue && <span className=\"ml-1 text-error\">*</span>}\n </span>\n <span className=\"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3\">\n <svg\n className={`h-4 w-4 transition-transform duration-200 ${isOpen ? \"rotate-180\" : \"\"} ${disabled ? \"text-[var(--neutral-500)]\" : \"text-textGray\"}`}\n fill=\"none\"\n stroke=\"currentColor\"\n viewBox=\"0 0 24 24\"\n >\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M19 9l-7 7-7-7\" />\n </svg>\n </span>\n </button>\n {error && <p className=\"mt-1 text-sm text-error\">{error}</p>}\n {isOpen && (\n <div\n className=\"absolute z-50 mt-1 max-h-60 w-full overflow-auto rounded-lg border border-[var(--neutral-200)] bg-[var(--neutral-50)] shadow-lg\"\n role=\"listbox\"\n >\n {options.length === 0 ? (\n <div className=\"px-3 py-2 text-sm text-textGray\">No options available</div>\n ) : (\n options.map((option) => {\n const enabled = options.filter((o) => !o.disabled);\n const enIdx = enabled.findIndex((o) => o.value === option.value);\n const isHighlighted = enIdx === highlightedIndex;\n const isSelected = option.value === value;\n return (\n <div\n key={option.value}\n className={`cursor-pointer px-3 py-2 text-sm transition-colors ${\n option.disabled\n ? \"cursor-not-allowed bg-[var(--neutral-100)] text-[var(--neutral-500)]\"\n : isHighlighted\n ? \"bg-[var(--primary-100)] text-[var(--primary-600)]\"\n : isSelected\n ? \"bg-[var(--primary-600)] text-[var(--primary-foreground)]\"\n : \"text-textBlack hover:bg-[var(--neutral-100)]\"\n }`}\n onClick={() => handleSelect(option)}\n onMouseEnter={() => !option.disabled && setHighlightedIndex(enIdx)}\n role=\"option\"\n aria-selected={isSelected}\n >\n {option.label}\n </div>\n );\n })\n )}\n </div>\n )}\n </div>\n );\n}\n","import { validateInputType } from \"../../utils/responseHelpers\";\n\nexport interface TabularInputOption {\n id: string;\n text: string;\n}\n\nexport interface TabularInputRow {\n id: string;\n label: string;\n}\n\nexport interface TabularInputColumn {\n id: string;\n title: string;\n width?: string;\n}\n\nexport interface TabularInputValue {\n rowId: string;\n value: string | boolean;\n}\n\nexport interface TabularInputConfig {\n type: \"dropdown\" | \"text\" | \"number\" | \"checkbox\";\n options?: TabularInputOption[];\n placeholder?: string;\n min?: number;\n max?: number;\n step?: number;\n required?: boolean;\n maxLength?: number;\n inputType?: string;\n checkboxLabel?: string;\n}\n\nexport interface TabularInputProps {\n columns: TabularInputColumn[];\n rows: TabularInputRow[];\n inputConfig: TabularInputConfig;\n values: TabularInputValue[];\n onValueChange: (rowId: string, value: string | boolean) => void;\n className?: string;\n}\n\nexport default function TabularInput({\n columns,\n rows,\n inputConfig,\n values,\n onValueChange,\n className = \"\",\n}: TabularInputProps) {\n const getValue = (rowId: string): string | boolean => {\n const v = values?.find((x) => x.rowId === rowId);\n if (v) return v.value;\n return inputConfig.type === \"checkbox\" ? false : \"\";\n };\n\n const baseClasses =\n \"w-full border border-[var(--neutral-200)] bg-[var(--neutral-50)] px-3 py-2 text-sm leading-5 font-normal transition-all focus:border-[var(--primary-600)] focus:outline-none\";\n\n const renderInput = (row: TabularInputRow) => {\n const current = getValue(row.id);\n switch (inputConfig.type) {\n case \"dropdown\":\n return (\n <select\n value={String(current)}\n onChange={(e) => onValueChange(row.id, e.target.value)}\n className={`${baseClasses} cursor-pointer appearance-none bg-[var(--neutral-50)] pr-8`}\n style={{\n backgroundImage: `url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23374151' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e\")`,\n backgroundPosition: \"right 8px center\",\n backgroundRepeat: \"no-repeat\",\n backgroundSize: \"16px\",\n borderRadius: \"0.75rem\",\n }}\n >\n <option value=\"\">Select</option>\n {inputConfig.options?.map((opt) => (\n <option key={opt.id} value={opt.id}>\n {opt.text}\n </option>\n ))}\n </select>\n );\n case \"number\":\n return (\n <input\n type=\"number\"\n value={String(current)}\n onChange={(e) => onValueChange(row.id, e.target.value)}\n placeholder={inputConfig.placeholder}\n min={inputConfig.min}\n max={inputConfig.max}\n step={inputConfig.step}\n required={inputConfig.required}\n className={baseClasses}\n style={{ borderRadius: \"0.75rem\" }}\n />\n );\n case \"checkbox\":\n return (\n <div className=\"flex items-center\">\n <input\n type=\"checkbox\"\n id={`cb-${row.id}`}\n checked={Boolean(current)}\n onChange={(e) => onValueChange(row.id, e.target.checked)}\n required={inputConfig.required}\n className=\"h-4 w-4 cursor-pointer border border-[var(--neutral-200)] text-[var(--primary-600)] focus:ring-2 focus:ring-[var(--primary-200)] focus:ring-offset-0\"\n />\n {inputConfig.checkboxLabel && (\n <label htmlFor={`cb-${row.id}`} className=\"ml-2 cursor-pointer text-sm text-textBlack\">\n {inputConfig.checkboxLabel}\n </label>\n )}\n </div>\n );\n case \"text\":\n default:\n return (\n <input\n type=\"text\"\n value={String(current)}\n onChange={(e) => {\n let v = e.target.value;\n if (inputConfig.maxLength && v.length > inputConfig.maxLength) return;\n if (inputConfig.inputType && v.trim() !== \"\" && !validateInputType(v, inputConfig.inputType)) return;\n onValueChange(row.id, v);\n }}\n placeholder={inputConfig.placeholder}\n required={inputConfig.required}\n maxLength={inputConfig.maxLength}\n className={baseClasses}\n style={{ borderRadius: \"0.75rem\" }}\n />\n );\n }\n };\n\n return (\n <div className={`overflow-hidden border border-rounded rounded-xl border-[var(--neutral-200)] bg-[var(--neutral-50)] ${className}`}>\n <div className=\"flex border-b border-[var(--neutral-200)] bg-[var(--neutral-100)]\">\n {columns.map((col, i) => (\n <div\n key={col.id}\n className={`flex-1 px-4 py-3 text-left text-sm font-medium text-textBlack ${i !== columns.length - 1 ? \"border-r border-[var(--neutral-200)]\" : \"\"}`}\n style={{ width: col.width }}\n >\n {col.title}\n </div>\n ))}\n </div>\n <div>\n {rows.map((row, rowIndex) => (\n <div\n key={row.id}\n className={rowIndex !== rows.length - 1 ? \"flex border-b border-[var(--neutral-200)]\" : \"flex\"}\n >\n <div\n className=\"flex flex-1 items-center border-r border-[var(--neutral-200)] px-4 py-3 text-sm text-textBlack\"\n style={{ width: columns[0]?.width }}\n >\n {row.label}\n </div>\n <div className=\"flex flex-1 items-center px-4 py-3\" style={{ width: columns[1]?.width }}>\n {renderInput(row)}\n </div>\n </div>\n ))}\n </div>\n </div>\n );\n}\n","import { useState, useRef, useEffect } from \"react\";\n\n// Same format as date-fns \"PPP\" (e.g. \"April 29, 2023\")\nfunction formatDatePPP(d: Date): string {\n const months = [\n \"January\", \"February\", \"March\", \"April\", \"May\", \"June\",\n \"July\", \"August\", \"September\", \"October\", \"November\", \"December\",\n ];\n return `${months[d.getMonth()]} ${d.getDate()}, ${d.getFullYear()}`;\n}\n\nconst MONTHS_FULL = [\n \"January\", \"February\", \"March\", \"April\", \"May\", \"June\",\n \"July\", \"August\", \"September\", \"October\", \"November\", \"December\",\n];\n\nconst WEEKDAYS = [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"];\n\nexport interface DatePickerProps {\n selectedDate?: Date;\n onDateSelect: (date: Date | undefined) => void;\n placeholder?: string;\n className?: string;\n disabled?: boolean;\n minDate?: Date;\n maxDate?: Date;\n}\n\nexport default function DatePicker({\n selectedDate,\n onDateSelect,\n placeholder = \"Select a date\",\n className = \"\",\n disabled = false,\n minDate,\n maxDate,\n}: DatePickerProps) {\n const [isOpen, setIsOpen] = useState(false);\n const [currentMonth, setCurrentMonth] = useState(() => selectedDate ?? new Date());\n const containerRef = useRef<HTMLDivElement>(null);\n\n // Sync currentMonth when popover opens (intentionally not selectedDate to avoid jumping while navigating)\n // eslint-disable-next-line react-hooks/exhaustive-deps -- only sync on open\n useEffect(() => {\n if (isOpen) {\n setCurrentMonth(selectedDate ?? new Date());\n }\n }, [isOpen]);\n\n // Close on outside click\n useEffect(() => {\n if (!isOpen) return;\n const handleClick = (e: MouseEvent) => {\n if (containerRef.current && !containerRef.current.contains(e.target as Node)) {\n setIsOpen(false);\n }\n };\n document.addEventListener(\"mousedown\", handleClick);\n return () => document.removeEventListener(\"mousedown\", handleClick);\n }, [isOpen]);\n\n const handleDateSelect = (date: Date) => {\n onDateSelect(date);\n setIsOpen(false);\n };\n\n const handleMonthChange = (monthValue: string) => {\n const next = new Date(currentMonth);\n next.setMonth(parseInt(monthValue, 10));\n setCurrentMonth(next);\n };\n\n const handleYearChange = (yearValue: string) => {\n const next = new Date(currentMonth);\n next.setFullYear(parseInt(yearValue, 10));\n setCurrentMonth(next);\n };\n\n const currentYear = new Date().getFullYear();\n const startYear = minDate ? minDate.getFullYear() : currentYear - 100;\n const endYear = maxDate ? maxDate.getFullYear() : currentYear + 100;\n const years = Array.from(\n { length: Math.max(1, endYear - startYear + 1) },\n (_, i) => startYear + i,\n );\n\n const isDateDisabled = (date: Date): boolean => {\n if (minDate && date < minDate) return true;\n if (maxDate && date > maxDate) return true;\n return false;\n };\n\n // Build calendar grid: first day of month (0=Sun), then all days\n const y = currentMonth.getFullYear();\n const m = currentMonth.getMonth();\n const firstDay = new Date(y, m, 1).getDay();\n const daysInMonth = new Date(y, m + 1, 0).getDate();\n const leadingEmpty = firstDay;\n\n const display = selectedDate ? formatDatePPP(selectedDate) : \"\";\n\n return (\n <div ref={containerRef} className={`relative ${className}`.trim()}>\n <button\n type=\"button\"\n onClick={() => !disabled && setIsOpen((o) => !o)}\n className={`flex w-full items-center justify-start border border-[var(--neutral-200)] bg-[var(--neutral-50)] px-[13px] py-3 text-left text-sm font-normal hover:bg-[var(--neutral-100)] ${\n !display ? \"text-textGray\" : \"text-textBlack\"\n } ${disabled ? \"cursor-not-allowed opacity-50\" : \"cursor-pointer\"}`}\n style={{ borderRadius: \"0.75rem\", backgroundColor: \"white\" }}\n >\n <svg\n className=\"mr-2 h-4 w-4 shrink-0 text-textGray\"\n fill=\"none\"\n stroke=\"currentColor\"\n viewBox=\"0 0 24 24\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z\"\n />\n </svg>\n {display || placeholder}\n </button>\n\n {isOpen && (\n <div\n className=\"absolute z-50 mt-1 w-auto rounded-md border border-[var(--neutral-200)] bg-[var(--neutral-50)] p-3 shadow-lg\"\n style={{ minWidth: \"280px\" }}\n >\n <div className=\"space-y-3\">\n {/* Month / Year header – same as app */}\n <div className=\"flex items-center justify-between gap-2\">\n <select\n value={currentMonth.getMonth().toString()}\n onChange={(e) => handleMonthChange(e.target.value)}\n className=\"h-8 w-32 rounded border border-[var(--primary-200)] bg-[var(--neutral-50)] px-2 text-sm focus:border-[var(--primary-600)] focus:outline-none\"\n >\n {MONTHS_FULL.map((month, index) => (\n <option key={month} value={index.toString()}>\n {month}\n </option>\n ))}\n </select>\n <select\n value={currentMonth.getFullYear().toString()}\n onChange={(e) => handleYearChange(e.target.value)}\n className=\"h-8 w-24 rounded border border-[var(--primary-200)] bg-[var(--neutral-50)] px-2 text-sm focus:border-[var(--primary-600)] focus:outline-none\"\n >\n {years.map((year) => (\n <option key={year} value={year.toString()}>\n {year}\n </option>\n ))}\n </select>\n </div>\n\n {/* Calendar grid – 7 columns, week header + days */}\n <div className=\"w-full\">\n <div className=\"grid grid-cols-7 gap-1 text-center text-xs font-medium text-textGray\">\n {WEEKDAYS.map((day) => (\n <div key={day}>{day}</div>\n ))}\n </div>\n <div className=\"mt-1 grid grid-cols-7 gap-1 text-sm\">\n {Array.from({ length: leadingEmpty }, (_, i) => (\n <div key={`empty-${i}`} />\n ))}\n {Array.from({ length: daysInMonth }, (_, i) => {\n const day = i + 1;\n const date = new Date(y, m, day);\n const disabled = isDateDisabled(date);\n const isSelected =\n selectedDate &&\n selectedDate.getFullYear() === y &&\n selectedDate.getMonth() === m &&\n selectedDate.getDate() === day;\n return (\n <button\n key={day}\n type=\"button\"\n disabled={disabled}\n onClick={() => !disabled && handleDateSelect(date)}\n className={`flex h-8 w-8 items-center justify-center rounded-md transition-colors ${\n disabled\n ? \"cursor-not-allowed text-[var(--neutral-400)]\"\n : \"hover:bg-[var(--primary-50)] hover:text-[var(--primary-600)]\"\n } ${isSelected ? \"bg-[var(--primary-600)] text-[var(--primary-foreground)] hover:bg-[var(--primary-600)] hover:text-[var(--primary-foreground)]\" : \"\"}`}\n >\n {day}\n </button>\n );\n })}\n </div>\n </div>\n </div>\n </div>\n )}\n </div>\n );\n}\n","import {\n useState,\n useRef,\n type DragEvent,\n type ChangeEvent,\n} from \"react\";\nimport type { FileObject } from \"../../types/survey.types\";\nimport { validateFile, fileToFileObject, MEDIA_MAX_SIZE_MB, MEDIA_ALLOWED_TYPES } from \"../../utils/fileUtils\";\nimport type { EffectiveMediaConfig } from \"../../utils/fileUtils\";\n\n/** Question types that use file upload; config comes from DEFAULT_MEDIA_ALLOWED_TYPES / survey config. */\nexport type MediaQuestionType =\n | \"image-response\"\n | \"video-response\"\n | \"voice-response\"\n | \"document-response\"\n | \"pdf-response\";\n\nexport interface MediaUploadProps {\n questionType: MediaQuestionType;\n value: FileObject | null;\n onChange: (value: FileObject | null) => void;\n className?: string;\n disabled?: boolean;\n mediaConfig?: EffectiveMediaConfig | null;\n}\n\n/** Label and whether to show preview (image/video/audio) or just filename (document/pdf). */\nconst QUESTION_TYPE_DISPLAY: Record<\n MediaQuestionType,\n { label: string; showPreview: boolean }\n> = {\n \"image-response\": { label: \"Image\", showPreview: true },\n \"video-response\": { label: \"Video\", showPreview: true },\n \"voice-response\": { label: \"Audio\", showPreview: true },\n \"document-response\": { label: \"Document\", showPreview: true },\n \"pdf-response\": { label: \"PDF\", showPreview: true },\n};\n\nfunction MediaIcon({ questionType }: { questionType: MediaQuestionType }) {\n const c = \"h-8 w-8 text-[var(--primary-600)]\";\n if (questionType === \"image-response\")\n return (\n <svg className={c} fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z\" />\n </svg>\n );\n if (questionType === \"video-response\")\n return (\n <svg className={c} fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z\" />\n </svg>\n );\n if (questionType === \"document-response\")\n return (\n <svg className={c} fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z\" />\n </svg>\n );\n if (questionType === \"pdf-response\")\n return (\n <svg className={c} fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z\" />\n </svg>\n );\n return (\n <svg className={c} fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M15.536 8.464a5 5 0 010 7.072m2.828-9.9a9 9 0 010 12.728M5.586 15H4a1 1 0 01-1-1v-4a1 1 0 011-1h1.586l4.707-4.707C10.923 3.663 12 4.109 12 5v14c0 .891-1.077 1.337-1.707.707L5.586 15z\" />\n </svg>\n );\n}\n\nexport default function MediaUpload({\n questionType,\n value,\n onChange,\n className = \"\",\n disabled = false,\n mediaConfig,\n}: MediaUploadProps) {\n const [isDragOver, setIsDragOver] = useState(false);\n const [errorMsg, setErrorMsg] = useState<string | null>(null);\n const inputRef = useRef<HTMLInputElement>(null);\n const display = QUESTION_TYPE_DISPLAY[questionType];\n const accept =\n mediaConfig?.allowedTypes[questionType]?.join(\",\") ??\n MEDIA_ALLOWED_TYPES[questionType]?.join(\",\") ??\n \"\";\n const maxMB =\n mediaConfig?.maxSizeBytes[questionType] != null\n ? Math.round(mediaConfig.maxSizeBytes[questionType] / (1024 * 1024))\n : MEDIA_MAX_SIZE_MB[questionType] ?? 10;\n const allowedTypesForMessage =\n mediaConfig?.allowedTypes[questionType] ?? MEDIA_ALLOWED_TYPES[questionType] ?? [];\n const supportedMessage =\n allowedTypesForMessage.length > 0\n ? `Supported: ${allowedTypesForMessage.join(\", \")} (max ${maxMB}MB)`\n : `Max size: ${maxMB}MB`;\n\n const processFile = async (file: File) => {\n setErrorMsg(null);\n const result = validateFile(file, questionType, mediaConfig);\n if (!result.valid) {\n setErrorMsg(result.error ?? \"Invalid file\");\n onChange(null);\n return;\n }\n try {\n const obj = await fileToFileObject(file);\n onChange(obj);\n } catch {\n setErrorMsg(\"Failed to read file\");\n onChange(null);\n }\n };\n\n const handleDrop = (e: DragEvent<HTMLElement>) => {\n e.preventDefault();\n e.stopPropagation();\n setIsDragOver(false);\n if (disabled) return;\n const f = e.dataTransfer.files?.[0];\n if (f) processFile(f);\n };\n\n const handleChange = (e: ChangeEvent<HTMLInputElement>) => {\n const f = e.target.files?.[0];\n if (f) processFile(f);\n e.target.value = \"\";\n };\n\n const remove = () => {\n onChange(null);\n setErrorMsg(null);\n };\n\n const hasValue = value?.binary;\n\n if (hasValue && value) {\n const src = `data:${value.fileType};base64,${value.binary}`;\n return (\n <div className={`relative border border-rounded rounded-xl border-[var(--neutral-200)] bg-[var(--neutral-50)] ${className}`}>\n <button\n type=\"button\"\n onClick={remove}\n disabled={disabled}\n className=\"absolute -top-3 -right-3 z-10 rounded-full border border-[var(--neutral-200)] bg-[var(--neutral-500)] p-1 text-[var(--primary-foreground)] transition-all hover:bg-[var(--primary-600)] hover:text-[var(--primary-foreground)] disabled:opacity-50\"\n aria-label=\"Remove\"\n >\n <svg className=\"h-4 w-4\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M6 18L18 6M6 6l12 12\" />\n </svg>\n </button>\n <div className=\"p-4\">\n {questionType === \"image-response\" && (\n <img src={src} alt=\"Uploaded\" className=\"max-h-64 w-full object-contain\" />\n )}\n {questionType === \"video-response\" && (\n <video src={src} controls className=\"max-h-64 w-full\">\n Your browser does not support the video tag.\n </video>\n )}\n {questionType === \"voice-response\" && (\n <div className=\"flex flex-col items-center space-y-4\">\n <MediaIcon questionType=\"voice-response\" />\n <p className=\"text-sm font-medium text-textBlack\">{value.fileName}</p>\n <audio src={src} controls className=\"w-full max-w-sm\">\n Your browser does not support the audio tag.\n </audio>\n </div>\n )}\n {questionType === \"pdf-response\" && (\n <div className=\"flex flex-col space-y-2\">\n <iframe\n src={src}\n title=\"PDF preview\"\n className=\"h-96 w-full rounded border border-[var(--neutral-200)] bg-[var(--neutral-50)]\"\n />\n <p className=\"text-sm text-textGray\">{value.fileName}</p>\n </div>\n )}\n {questionType === \"document-response\" && (\n <div className=\"flex flex-col items-center space-y-3\">\n <MediaIcon questionType=\"document-response\" />\n <p className=\"text-sm font-medium text-textBlack\">{value.fileName}</p>\n <a\n href={src}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"text-sm font-medium text-[var(--primary-600)] hover:underline\"\n >\n View / Open file\n </a>\n </div>\n )}\n {display.showPreview && questionType !== \"voice-response\" && questionType !== \"document-response\" && questionType !== \"pdf-response\" && (\n <p className=\"mt-2 text-sm text-textGray\">{value.fileName}</p>\n )}\n </div>\n </div>\n );\n }\n\n return (\n <div className={className}>\n <div\n className={`relative border-2 border-rounded rounded-xl border-dashed p-8 text-center transition-all ${\n isDragOver ? \"border-[var(--primary-600)] bg-[var(--primary-50)]\" : \"border-[var(--neutral-200)] bg-[var(--neutral-50)] hover:border-[var(--primary-600)] hover:bg-[var(--primary-50)]\"\n } ${disabled ? \"cursor-not-allowed opacity-50\" : \"cursor-pointer\"}`}\n onDragEnter={(e) => { e.preventDefault(); e.stopPropagation(); if (!disabled) setIsDragOver(true); }}\n onDragLeave={(e) => { e.preventDefault(); e.stopPropagation(); setIsDragOver(false); }}\n onDragOver={(e) => { e.preventDefault(); e.stopPropagation(); }}\n onDrop={handleDrop}\n onClick={() => !disabled && inputRef.current?.click()}\n >\n <input\n ref={inputRef}\n type=\"file\"\n accept={accept}\n onChange={handleChange}\n disabled={disabled}\n className=\"hidden\"\n aria-label={`Select ${display.label} file`}\n />\n <div className=\"space-y-4\">\n <div className=\"flex justify-center\">\n <MediaIcon questionType={questionType} />\n </div>\n <div>\n <p className=\"text-sm font-medium text-[var(--primary-600)]\">\n Tap to Upload {display.label}\n </p>\n <p className=\"mt-1 text-xs text-textGray\">\n or drag and drop your {display.label.toLowerCase()} here\n </p>\n </div>\n <div className=\"text-xs text-textGray\">\n <p>{supportedMessage}</p>\n </div>\n </div>\n </div>\n {errorMsg && (\n <div className=\"mt-4 rounded-lg border border-[var(--error-200)] bg-[var(--error-50)] p-3\">\n <p className=\"text-xs text-error\">{errorMsg}</p>\n </div>\n )}\n </div>\n );\n}\n","/**\n * Reusable inline error message for validation feedback.\n */\n\ninterface ErrorMessageProps {\n error?: string;\n className?: string;\n}\n\nexport function ErrorMessage({ error, className = \"\" }: ErrorMessageProps) {\n if (!error) return null;\n return (\n <p className={`mt-1 text-sm text-error ${className}`.trim()}>\n {error}\n </p>\n );\n}\n","/**\n * Unified media upload component for image, video, voice, document, and PDF responses.\n * Renders MediaUpload with the appropriate questionType.\n */\n\nimport type { SurveyQuestion, FileObject } from \"../../types/survey.types\";\nimport type { EffectiveMediaConfig } from \"../../utils/fileUtils\";\nimport MediaUpload from \"./MediaUpload\";\nimport { ErrorMessage } from \"../ui/ErrorMessage\";\n\nexport type MediaResponseQuestionType =\n | \"image-response\"\n | \"video-response\"\n | \"voice-response\"\n | \"document-response\"\n | \"pdf-response\";\n\nexport interface MediaResponseProps {\n questionType: MediaResponseQuestionType;\n question: SurveyQuestion;\n value: FileObject | null;\n onChange: (value: FileObject | null) => void;\n error?: string;\n disabled?: boolean;\n mediaConfig?: EffectiveMediaConfig | null;\n className?: string;\n}\n\nexport function MediaResponse({\n questionType,\n question: _question,\n value,\n onChange,\n error,\n disabled = false,\n mediaConfig,\n className = \"\",\n}: MediaResponseProps) {\n return (\n <div className={className}>\n <MediaUpload\n questionType={questionType}\n value={value}\n onChange={onChange}\n disabled={disabled}\n mediaConfig={mediaConfig}\n />\n <ErrorMessage error={error} />\n </div>\n );\n}\n","import type { SurveyQuestion } from \"../types/survey.types\";\nimport MCQSelect from \"./custom/MCQSelect\";\nimport TextResponse from \"./custom/TextResponse\";\nimport Dropdown from \"./custom/Dropdown\";\nimport TabularInput from \"./custom/TabularInput\";\nimport type {\n TabularInputColumn,\n TabularInputRow,\n TabularInputConfig,\n TabularInputValue,\n} from \"./custom/TabularInput\";\nimport DatePicker from \"./custom/DatePicker\";\nimport { MediaResponse } from \"./custom/MediaResponse\";\nimport type { EffectiveMediaConfig } from \"../utils/fileUtils\";\nimport { isValueFileObject } from \"../utils/fileUtils\";\nimport { ErrorMessage } from \"./ui/ErrorMessage\";\n\ninterface DropdownOption {\n value: string;\n label: string;\n disabled?: boolean;\n}\n\nexport interface QuestionMapperProps {\n question: SurveyQuestion;\n value: unknown;\n onChange: (value: unknown) => void;\n error?: string;\n touched?: boolean;\n disabled?: boolean;\n mediaConfig?: EffectiveMediaConfig | null;\n className?: string;\n}\n\nexport default function QuestionMapper({\n question,\n value,\n onChange,\n error,\n touched = true,\n disabled = false,\n mediaConfig,\n className = \"\",\n}: QuestionMapperProps) {\n const getDropdownOptions = (): DropdownOption[] => {\n if (!question.options) return [];\n return question.options.map((option, index) => ({\n value: option,\n label: question.optionsEN?.[index] ?? option,\n disabled: false,\n }));\n };\n\n const getMCQOptions = () => {\n if (!question.options) return [];\n return question.options.map((option, index) => ({\n id: option,\n text: question.optionsEN?.[index] ?? option,\n }));\n };\n\n const getTabularConfig = (): {\n columns: TabularInputColumn[];\n rows: TabularInputRow[];\n inputConfig: TabularInputConfig;\n } | null => {\n if (!question.tableHeaderValue || !question.tableQuestionValue) return null;\n\n const columns: TabularInputColumn[] = question.tableHeaderValue.map((header, index) => ({\n id: `col-${index}`,\n title: header,\n width: index === 0 ? \"60%\" : \"40%\",\n }));\n\n const rows: TabularInputRow[] = question.tableQuestionValue.map((row) => ({\n id: row.rowId,\n label: row.rowQuestion,\n }));\n\n let inputConfig: TabularInputConfig;\n switch (question.type) {\n case \"tabular-text-input\":\n inputConfig = {\n type: \"text\",\n placeholder: \"Enter text\",\n required: question.isMandatory,\n maxLength: question.textLimitCharacter\n ? parseInt(question.textLimitCharacter.toString(), 10)\n : undefined,\n inputType: question.textInputType,\n };\n break;\n case \"tabular-drop-down\": {\n const dropdownOptions = (question.optionsEN ?? question.options ?? []).map((option) => ({\n id: option,\n text: option,\n }));\n inputConfig = {\n type: \"dropdown\",\n options: dropdownOptions,\n required: question.isMandatory,\n };\n break;\n }\n case \"tabular-check-box\":\n inputConfig = {\n type: \"checkbox\",\n checkboxLabel: \"Yes\",\n required: question.isMandatory,\n };\n break;\n default:\n inputConfig = { type: \"text\", required: question.isMandatory };\n }\n return { columns, rows, inputConfig };\n };\n\n const getTabularValue = (): TabularInputValue[] => {\n if (!value || typeof value !== \"object\") return [];\n if (Array.isArray(value)) {\n return value.map((item: { rowId: string; rowAnswer?: string | boolean }) => ({\n rowId: item.rowId,\n value: (item.rowAnswer as string | boolean) ?? \"\",\n }));\n }\n const tableValue = value as Record<string, unknown>;\n return Object.entries(tableValue).map(([rowId, rowValue]) => ({\n rowId,\n value: rowValue as string | boolean,\n }));\n };\n\n const handleTabularChange = (rowId: string, rowValue: string | boolean) => {\n const currentValue = (value as Record<string, unknown>) || {};\n onChange({ ...currentValue, [rowId]: rowValue });\n };\n\n switch (question.type) {\n case \"single-select\":\n return (\n <div className={className}>\n <MCQSelect\n options={getMCQOptions()}\n selectedOptions={String(value ?? \"\")}\n onOptionSelect={(selected) => onChange(selected)}\n selectionMode=\"single\"\n disabled={disabled}\n />\n {touched && <ErrorMessage error={error} />}\n </div>\n );\n\n case \"multi-select\":\n return (\n <div className={className}>\n <MCQSelect\n options={getMCQOptions()}\n selectedOptions={Array.isArray(value) ? value.map(String) : []}\n onOptionSelect={(selected) => onChange(selected)}\n selectionMode=\"multiple\"\n disabled={disabled}\n />\n {touched && <ErrorMessage error={error} />}\n </div>\n );\n\n case \"dropdown\":\n case \"drop-down\":\n return (\n <div className={className}>\n <Dropdown\n options={getDropdownOptions()}\n value={String(value ?? \"\")}\n onChange={(v) => onChange(v)}\n placeholder=\"Select an option\"\n disabled={disabled}\n error={touched ? error : undefined}\n required={question.isMandatory}\n />\n </div>\n );\n\n case \"text-response\":\n return (\n <div className={className}>\n <TextResponse\n value={String(value ?? \"\")}\n onChange={(v) => onChange(v)}\n characterLimit={question.textLimitCharacter ?? undefined}\n placeholder=\"Enter your response...\"\n disabled={disabled}\n />\n {touched && <ErrorMessage error={error} />}\n </div>\n );\n\n case \"calendar\":\n return (\n <div className={className}>\n <DatePicker\n selectedDate={value instanceof Date ? value : undefined}\n onDateSelect={(date) => onChange(date ?? null)}\n disabled={disabled}\n placeholder=\"Select a date\"\n />\n {touched && <ErrorMessage error={error} />}\n </div>\n );\n\n case \"image-response\":\n case \"video-response\":\n case \"voice-response\":\n case \"document-response\":\n case \"pdf-response\": {\n const fileValue = isValueFileObject(value) ? value : null;\n return (\n <div className={className}>\n <MediaResponse\n questionType={question.type}\n question={question}\n value={fileValue}\n onChange={(v) => onChange(v)}\n error={touched ? error : undefined}\n disabled={disabled}\n mediaConfig={mediaConfig}\n />\n </div>\n );\n }\n\n case \"tabular-text-input\":\n case \"tabular-drop-down\":\n case \"tabular-check-box\": {\n const tabularConfig = getTabularConfig();\n if (!tabularConfig) {\n return (\n <div className={`text-error ${className}`}>\n Invalid tabular question configuration\n </div>\n );\n }\n return (\n <div className={className}>\n <TabularInput\n columns={tabularConfig.columns}\n rows={tabularConfig.rows}\n inputConfig={tabularConfig.inputConfig}\n values={getTabularValue()}\n onValueChange={handleTabularChange}\n />\n {touched && <ErrorMessage error={error} />}\n </div>\n );\n }\n\n default:\n return (\n <div className={`text-error ${className}`}>\n <p>Unsupported question type: {question.type}</p>\n <p className=\"mt-1 text-sm text-textGray\">Question: {question.description}</p>\n </div>\n );\n }\n}\n","import type { SurveyQuestion } from \"../types/survey.types\";\nimport { isSupportedQuestionType } from \"../types/survey.types\";\nimport type { EffectiveMediaConfig } from \"../utils/fileUtils\";\nimport QuestionMapper from \"./QuestionMapper\";\n\nexport interface QuestionRendererProps {\n question: SurveyQuestion;\n value: unknown;\n onChange: (value: unknown) => void;\n disabled?: boolean;\n error?: string;\n validationErrors?: Array<{ questionId: string; message: string }>;\n mediaConfig?: EffectiveMediaConfig | null;\n className?: string;\n}\n\nexport function QuestionRenderer({\n question,\n value,\n onChange,\n disabled = false,\n error,\n validationErrors = [],\n mediaConfig,\n className = \"\",\n}: QuestionRendererProps) {\n const questionErrors = validationErrors.filter((e) => e.questionId === question.questionId);\n const displayError = error ?? questionErrors.map((e) => e.message).join(\"; \");\n\n if (!isSupportedQuestionType(question.type)) {\n return (\n <div className={className}>\n <p className=\"text-error\">Unsupported question type: {question.type}</p>\n </div>\n );\n }\n\n return (\n <QuestionMapper\n question={question}\n value={value}\n onChange={onChange}\n error={displayError}\n touched={true}\n disabled={disabled}\n mediaConfig={mediaConfig}\n className={className}\n />\n );\n}\n","/**\n * Theme-based status styles for question indicators.\n * Uses CSS variables (--primary-600, --error-200, etc.) so themes control colors.\n * Apply theme via data-theme on a parent element (e.g. data-theme=\"emerald\").\n */\n\nexport type QuestionStatus = \"completed\" | \"unanswered\" | \"required\" | \"error\";\n\n/** Border and background classes for carousel question status indicators. */\nfunction getStatusClass(status: QuestionStatus | undefined): string {\n console.log(\"status\", status);\n switch (status) {\n case \"completed\":\n return \"border-[var(--primary-200)] bg-[var(--primary-50)]\";\n case \"error\":\n return \"border-[var(--error-200)] bg-[var(--error-50)]\";\n // case \"required\":\n // return \"border-[var(--warning-200)] bg-[var(--warning-50)]\";\n default:\n return \"border-[var(--neutral-200)] bg-[var(--neutral-50)]\";\n }\n}\n\n/** Border and background classes for overview panel question cards. */\nfunction getStatusColor(status: string): string {\n switch (status) {\n case \"completed\":\n return \"border-[var(--primary-200)] bg-[var(--primary-50)]\";\n case \"error\":\n return \"border-[var(--error-200)] bg-[var(--error-50)]\";\n case \"required\":\n return \"border-[var(--warning-200)] bg-[var(--warning-50)]\";\n default:\n return \"border-[var(--neutral-200)] bg-[var(--neutral-50)]\";\n }\n}\n\n/** Icon/text color class by status (used in overview panel icons). */\nfunction getStatusIconClass(status: string): string {\n switch (status) {\n case \"completed\":\n return \"text-[var(--primary-600)]\";\n case \"error\":\n return \"text-[var(--error-600)]\";\n case \"required\":\n return \"text-[var(--warning-600)]\";\n default:\n return \"text-[var(--neutral-500)]\";\n }\n}\n\nexport { getStatusClass, getStatusColor, getStatusIconClass };\n","import { useRef, useEffect, useCallback } from \"react\";\nimport { getStatusClass } from \"../utils/themeStatusStyles\";\n\nexport type QuestionStatus = \"completed\" | \"unanswered\" | \"required\" | \"error\";\n\nexport interface QuestionListCarouselProps {\n /** Ordered list of visible question IDs (e.g. Q1, Q2, Q6.1) */\n questions: string[];\n /** Currently active question ID (controlled by parent) */\n activeQuestionId: string | undefined;\n /** Called when user selects a question (click card or arrow) */\n onQuestionSelect: (questionId: string) => void;\n /** Optional map of questionId -> status for styling */\n questionStatusMap?: Record<string, QuestionStatus>;\n className?: string;\n}\n\nexport function QuestionListCarousel({\n questions,\n activeQuestionId,\n onQuestionSelect,\n questionStatusMap = {},\n className = \"\",\n}: QuestionListCarouselProps) {\n const scrollRef = useRef<HTMLDivElement>(null);\n const itemRefs = useRef<(HTMLButtonElement | null)[]>([]);\n\n const activeIndex =\n activeQuestionId != null ? questions.indexOf(activeQuestionId) : -1;\n const hasMultiple = questions.length > 1;\n\n // Scroll active item into view when activeQuestionId changes (e.g. Previous/Next in container)\n useEffect(() => {\n if (activeIndex < 0 || activeIndex >= itemRefs.current.length) return;\n const el = itemRefs.current[activeIndex];\n el?.scrollIntoView({\n behavior: \"smooth\",\n inline: \"center\",\n block: \"nearest\",\n });\n }, [activeIndex, activeQuestionId]);\n\n const handleLeft = useCallback(() => {\n if (activeIndex <= 0) return;\n const prevId = questions[activeIndex - 1];\n if (prevId) onQuestionSelect(prevId);\n }, [activeIndex, questions, onQuestionSelect]);\n\n const handleRight = useCallback(() => {\n if (activeIndex >= questions.length - 1 || activeIndex < 0) return;\n const nextId = questions[activeIndex + 1];\n if (nextId) onQuestionSelect(nextId);\n }, [activeIndex, questions, onQuestionSelect]);\n\n if (questions.length === 0) return null;\n\n return (\n <div\n className={`flex items-center gap-2 overflow-hidden ${className}`.trim()}\n role=\"navigation\"\n aria-label=\"Question navigation\"\n >\n {hasMultiple && (\n <button\n type=\"button\"\n onClick={handleLeft}\n disabled={activeIndex <= 0}\n aria-label=\"Previous question\"\n className=\"flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-md border border-[var(--neutral-200)] bg-[var(--color-card)] text-[var(--color-foreground)] transition-colors hover:bg-[var(--neutral-100)] disabled:cursor-not-allowed disabled:opacity-50\"\n >\n <svg className=\"h-5 w-5\" fill=\"currentColor\" viewBox=\"0 0 20 20\">\n <path\n fillRule=\"evenodd\"\n d=\"M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z\"\n clipRule=\"evenodd\"\n />\n </svg>\n </button>\n )}\n\n <div\n ref={scrollRef}\n className=\"flex flex-1 gap-2 overflow-x-auto scroll-smooth whitespace-nowrap no-scrollbar py-1\"\n style={{ minHeight: 0 }}\n >\n {questions.map((questionId, index) => {\n const isActive = questionId === activeQuestionId;\n const status = questionStatusMap[questionId];\n const statusClass = getStatusClass(status);\n return (\n <button\n key={questionId}\n ref={(el) => {\n itemRefs.current[index] = el;\n }}\n type=\"button\"\n onClick={() => onQuestionSelect(questionId)}\n className={`min-w-[60px] flex-shrink-0 rounded-full border px-4 py-2 text-center text-sm transition-all cursor-pointer ${\n isActive\n ? \"border-[var(--primary-600)] ring-2 ring-[var(--primary-200)] bg-[var(--primary-50)] text-[var(--primary-600)]\"\n : `${statusClass} text-[var(--color-textBlack)] hover:border-[var(--primary-200)]`\n }`}\n aria-current={isActive ? \"step\" : undefined}\n aria-label={`Question ${questionId}`}\n >\n {questionId}\n </button>\n );\n })}\n </div>\n\n {hasMultiple && (\n <button\n type=\"button\"\n onClick={handleRight}\n disabled={activeIndex >= questions.length - 1}\n aria-label=\"Next question\"\n className=\"flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-md border border-[var(--neutral-200)] bg-[var(--color-card)] text-[var(--color-foreground)] transition-colors hover:bg-[var(--neutral-100)] disabled:cursor-not-allowed disabled:opacity-50\"\n >\n <svg className=\"h-5 w-5\" fill=\"currentColor\" viewBox=\"0 0 20 20\">\n <path\n fillRule=\"evenodd\"\n d=\"M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z\"\n clipRule=\"evenodd\"\n />\n </svg>\n </button>\n )}\n </div>\n );\n}\n","import type { SurveyQuestion } from \"../types/survey.types\";\nimport { getStatusColor, getStatusIconClass } from \"../utils/themeStatusStyles\";\nimport { getQuestionStatus } from \"../utils/questionStatus\";\n\nexport interface QuestionOverviewPanelProps {\n isOpen: boolean;\n onClose: () => void;\n questions: SurveyQuestion[];\n visibleQuestionIds: string[];\n responses: Record<string, unknown>;\n currentQuestionIndex: number;\n onGoToQuestion: (index: number) => void;\n readOnly?: boolean;\n}\n\nfunction getStatusIcon(status: string) {\n const iconClass = getStatusIconClass(status);\n switch (status) {\n case \"completed\":\n return (\n <svg\n className={`h-5 w-5 ${iconClass}`}\n fill=\"currentColor\"\n viewBox=\"0 0 20 20\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z\"\n clipRule=\"evenodd\"\n />\n </svg>\n );\n case \"error\":\n return (\n <svg\n className={`h-5 w-5 ${iconClass}`}\n fill=\"currentColor\"\n viewBox=\"0 0 20 20\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z\"\n clipRule=\"evenodd\"\n />\n </svg>\n );\n case \"required\":\n return (\n <svg\n className={`h-5 w-5 ${iconClass}`}\n fill=\"currentColor\"\n viewBox=\"0 0 20 20\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z\"\n clipRule=\"evenodd\"\n />\n </svg>\n );\n default:\n return (\n <div className=\"h-5 w-5 rounded-full border-2 border-[var(--neutral-200)]\" />\n );\n }\n}\n\nexport function QuestionOverviewPanel({\n isOpen,\n onClose,\n questions,\n visibleQuestionIds,\n responses,\n currentQuestionIndex,\n onGoToQuestion,\n readOnly = false,\n}: QuestionOverviewPanelProps) {\n if (!isOpen) return null;\n\n return (\n <>\n {/* Backdrop */}\n <div\n role=\"presentation\"\n onClick={onClose}\n className=\"fixed inset-0 z-50 bg-black/50\"\n />\n\n {/* Panel */}\n <div className=\"fixed top-0 right-0 z-50 h-full w-full max-w-md overflow-hidden bg-[var(--neutral-50)] shadow-2xl\">\n <div className=\"flex h-full flex-col\">\n {/* Header */}\n <div className=\"border-b border-[var(--neutral-200)] p-6\">\n <div className=\"flex items-center justify-between\">\n <h2 className=\"text-xl font-semibold text-textBlack\">\n Question Overview\n </h2>\n <button\n type=\"button\"\n onClick={onClose}\n className=\"rounded-lg p-2 text-[var(--color-foreground)] transition-colors hover:bg-[var(--neutral-100)]\"\n aria-label=\"Close\"\n >\n <svg\n className=\"h-5 w-5\"\n fill=\"none\"\n stroke=\"currentColor\"\n viewBox=\"0 0 24 24\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M6 18L18 6M6 6l12 12\"\n />\n </svg>\n </button>\n </div>\n </div>\n\n {/* Question Grid */}\n <div className=\"flex-1 overflow-y-auto p-6\">\n <div className=\"space-y-3\">\n {visibleQuestionIds.map((questionId, index) => {\n const question = questions.find((q) => q.questionId === questionId);\n if (!question) return null;\n\n const status = getQuestionStatus(questionId, questions, responses, readOnly);\n const isCurrent = index === currentQuestionIndex;\n\n return (\n <button\n key={questionId}\n type=\"button\"\n onClick={() => onGoToQuestion(index)}\n className={`w-full rounded-lg border-2 p-4 text-left transition-all duration-200 ${\n isCurrent\n ? \"border-[var(--primary-600)] bg-[var(--primary-50)] shadow-md\"\n : `${getStatusColor(status)} hover:shadow-md`\n }`}\n >\n <div className=\"flex items-start gap-3\">\n <div className=\"mt-0.5 flex-shrink-0\">\n {getStatusIcon(status)}\n </div>\n <div className=\"min-w-0 flex-1\">\n <div className=\"mb-1 flex items-center gap-2\">\n <span className=\"text-sm font-medium text-[var(--primary-600)]\">\n {question.questionId}\n </span>\n {question.isMandatory && (\n <span className=\"text-xs text-error\">*</span>\n )}\n {isCurrent && (\n <span className=\"text-xs font-medium text-[var(--primary-600)]\">\n Current\n </span>\n )}\n </div>\n <p className=\"truncate text-sm font-medium text-textBlack\">\n {question.description}\n </p>\n </div>\n <div className=\"flex-shrink-0 text-xs text-textGray\">\n {index + 1}\n </div>\n </div>\n </button>\n );\n })}\n </div>\n </div>\n\n {/* Footer */}\n <div className=\"border-t border-[var(--neutral-200)] bg-[var(--neutral-50)] p-6\">\n <div className=\"flex items-center justify-between text-sm\">\n <div className=\"flex items-center gap-4\">\n <div className=\"flex items-center gap-1\">\n <div className=\"h-3 w-3 rounded-full bg-[var(--primary-600)]\" />\n <span className=\"text-textGray\">Completed</span>\n </div>\n <div className=\"flex items-center gap-1\">\n <div className=\"h-3 w-3 rounded-full bg-[var(--warning-600)]\" />\n <span className=\"text-textGray\">Required</span>\n </div>\n <div className=\"flex items-center gap-1\">\n <div className=\"h-3 w-3 rounded-full bg-[var(--error-600)]\" />\n <span className=\"text-textGray\">Error</span>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </>\n );\n}\n","// 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\";\nvar REACT_LAZY_TYPE = Symbol.for(\"react.lazy\");\nvar use = React[\" use \".trim().toString()];\nfunction isPromiseLike(value) {\n return typeof value === \"object\" && value !== null && \"then\" in value;\n}\nfunction isLazyComponent(element) {\n return element != null && typeof element === \"object\" && \"$$typeof\" in element && element.$$typeof === REACT_LAZY_TYPE && \"_payload\" in element && isPromiseLike(element._payload);\n}\n// @__NO_SIDE_EFFECTS__\nfunction createSlot(ownerName) {\n const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);\n const Slot2 = React.forwardRef((props, forwardedRef) => {\n let { children, ...slotProps } = props;\n if (isLazyComponent(children) && typeof use === \"function\") {\n children = use(children._payload);\n }\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 let { children, ...slotProps } = props;\n if (isLazyComponent(children) && typeof use === \"function\") {\n children = use(children._payload);\n }\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","import { cva } from \"class-variance-authority\";\n\nexport const buttonVariants = cva(\n \"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-[14px] text-[14px] leading-[20px] font-medium transition-all disabled:pointer-events-none disabled:opacity-50 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 aria-invalid:border-destructive hover:opacity-90\",\n {\n variants: {\n variant: {\n default:\n \"bg-[var(--primary-600)] text-[var(--primary-foreground)] shadow-xs hover:bg-[var(--primary-700)]\",\n destructive:\n \"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60\",\n outline:\n \"border border-[var(--primary-200)] bg-transparent text-[var(--color-foreground)] shadow-xs hover:bg-[var(--primary-100)] hover:text-[var(--primary-700)]\",\n secondary:\n \"bg-[var(--primary-100)] text-[var(--primary-700)] border border-[var(--primary-200)] shadow-xs hover:bg-[var(--primary-200)]\",\n ghost:\n \"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n size: {\n default: \"px-3 py-3\",\n sm: \"px-3 py-2\",\n lg: \"px-4 py-4\",\n icon: \"size-9\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n);\n","import * as React from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { type VariantProps } from \"class-variance-authority\";\nimport { cn } from \"../../lib/utils\";\nimport { buttonVariants } from \"./button-variants\";\n\nconst getBgColorClass = (color: string) => {\n switch (color) {\n case \"primary\":\n return \"bg-primary\";\n case \"secondary\":\n return \"bg-secondary\";\n case \"destructive\":\n return \"bg-destructive\";\n case \"muted\":\n return \"bg-muted\";\n case \"error\":\n return \"bg-red-500\";\n case \"success\":\n return \"bg-green-500\";\n case \"warning\":\n return \"bg-yellow-500\";\n case \"white\":\n return \"bg-white\";\n case \"gray\":\n return \"bg-gray-500\";\n case \"lightGray\":\n return \"bg-[#E5E7EB]\";\n case \"borderGray\":\n return \"bg-borderGray\";\n default:\n return `bg-[${color}]`;\n }\n};\n\nconst getTextColorClass = (color: string) => {\n switch (color) {\n case \"white\":\n return \"text-white\";\n case \"black\":\n return \"text-black\";\n case \"primary\":\n return \"text-primary\";\n case \"primary-foreground\":\n return \"text-primary-foreground\";\n case \"secondary\":\n return \"text-secondary\";\n case \"muted\":\n return \"text-muted-foreground\";\n default:\n return `text-[${color}]`;\n }\n};\n\ninterface ButtonProps\n extends React.ComponentProps<\"button\">,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean;\n bgColor?: string;\n textColor?: string;\n text?: string;\n prefixIcon?: React.ReactNode;\n suffixIcon?: React.ReactNode;\n}\n\nfunction Button({\n className,\n variant,\n size,\n asChild = false,\n bgColor,\n textColor,\n text,\n prefixIcon,\n suffixIcon,\n children,\n ...props\n}: ButtonProps) {\n const Comp = asChild ? Slot : \"button\";\n const customColorClasses = [\n bgColor && getBgColorClass(bgColor),\n textColor && getTextColorClass(textColor),\n ]\n .filter(Boolean)\n .join(\" \");\n const baseClasses = customColorClasses\n ? cn(\n \"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-[14px] text-[14px] leading-[20px] font-medium transition-all disabled:pointer-events-none disabled:opacity-50 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] hover:opacity-90 cursor-pointer\",\n size === \"sm\" && \"px-3 py-2\",\n size === \"lg\" && \"px-4 py-4\",\n size === \"icon\" && \"size-9\",\n (!size || size === \"default\") && \"px-3 py-3\",\n customColorClasses,\n className\n )\n : cn(buttonVariants({ variant, size, className }));\n\n if (text || prefixIcon || suffixIcon) {\n return (\n <Comp data-slot=\"button\" className={baseClasses} {...props}>\n {prefixIcon && (\n <span className=\"flex h-4 w-4 items-center justify-center\">\n {prefixIcon}\n </span>\n )}\n {text && <span className=\"flex-1 text-center\">{text}</span>}\n {suffixIcon && (\n <span className=\"flex h-4 w-4 items-center justify-center\">\n {suffixIcon}\n </span>\n )}\n {children}\n </Comp>\n );\n }\n return (\n <Comp data-slot=\"button\" className={baseClasses} {...props}>\n {children}\n </Comp>\n );\n}\n\nexport { Button };\n","// src/create-context.tsx\nimport * as React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nfunction createContext2(rootComponentName, defaultContext) {\n const Context = React.createContext(defaultContext);\n Context.displayName = rootComponentName + \"Context\";\n const Provider = (props) => {\n const { children, ...context } = props;\n const value = React.useMemo(() => context, Object.values(context));\n return /* @__PURE__ */ jsx(Context.Provider, { value, children });\n };\n Provider.displayName = rootComponentName + \"Provider\";\n function useContext2(consumerName) {\n const context = React.useContext(Context);\n if (context) return context;\n if (defaultContext !== void 0) return defaultContext;\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n return [Provider, useContext2];\n}\nfunction createContextScope(scopeName, createContextScopeDeps = []) {\n let defaultContexts = [];\n function createContext3(rootComponentName, defaultContext) {\n const BaseContext = React.createContext(defaultContext);\n BaseContext.displayName = rootComponentName + \"Context\";\n const index = defaultContexts.length;\n defaultContexts = [...defaultContexts, defaultContext];\n const Provider = (props) => {\n const { scope, children, ...context } = props;\n const Context = scope?.[scopeName]?.[index] || BaseContext;\n const value = React.useMemo(() => context, Object.values(context));\n return /* @__PURE__ */ jsx(Context.Provider, { value, children });\n };\n Provider.displayName = rootComponentName + \"Provider\";\n function useContext2(consumerName, scope) {\n const Context = scope?.[scopeName]?.[index] || BaseContext;\n const context = React.useContext(Context);\n if (context) return context;\n if (defaultContext !== void 0) return defaultContext;\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n return [Provider, useContext2];\n }\n const createScope = () => {\n const scopeContexts = defaultContexts.map((defaultContext) => {\n return React.createContext(defaultContext);\n });\n return function useScope(scope) {\n const contexts = scope?.[scopeName] || scopeContexts;\n return React.useMemo(\n () => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),\n [scope, contexts]\n );\n };\n };\n createScope.scopeName = scopeName;\n return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];\n}\nfunction composeContextScopes(...scopes) {\n const baseScope = scopes[0];\n if (scopes.length === 1) return baseScope;\n const createScope = () => {\n const scopeHooks = scopes.map((createScope2) => ({\n useScope: createScope2(),\n scopeName: createScope2.scopeName\n }));\n return function useComposedScopes(overrideScopes) {\n const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {\n const scopeProps = useScope(overrideScopes);\n const currentScope = scopeProps[`__scope${scopeName}`];\n return { ...nextScopes2, ...currentScope };\n }, {});\n return React.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);\n };\n };\n createScope.scopeName = baseScope.scopeName;\n return createScope;\n}\nexport {\n createContext2 as createContext,\n createContextScope\n};\n//# sourceMappingURL=index.mjs.map\n","// src/primitive.tsx\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NODES = [\n \"a\",\n \"button\",\n \"div\",\n \"form\",\n \"h2\",\n \"h3\",\n \"img\",\n \"input\",\n \"label\",\n \"li\",\n \"nav\",\n \"ol\",\n \"p\",\n \"select\",\n \"span\",\n \"svg\",\n \"ul\"\n];\nvar Primitive = NODES.reduce((primitive, node) => {\n const Slot = createSlot(`Primitive.${node}`);\n const Node = React.forwardRef((props, forwardedRef) => {\n const { asChild, ...primitiveProps } = props;\n const Comp = asChild ? Slot : node;\n if (typeof window !== \"undefined\") {\n window[Symbol.for(\"radix-ui\")] = true;\n }\n return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });\n });\n Node.displayName = `Primitive.${node}`;\n return { ...primitive, [node]: Node };\n}, {});\nfunction dispatchDiscreteCustomEvent(target, event) {\n if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));\n}\nvar Root = Primitive;\nexport {\n Primitive,\n Root,\n dispatchDiscreteCustomEvent\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/progress.tsx\nimport * as React from \"react\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { jsx } from \"react/jsx-runtime\";\nvar PROGRESS_NAME = \"Progress\";\nvar DEFAULT_MAX = 100;\nvar [createProgressContext, createProgressScope] = createContextScope(PROGRESS_NAME);\nvar [ProgressProvider, useProgressContext] = createProgressContext(PROGRESS_NAME);\nvar Progress = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeProgress,\n value: valueProp = null,\n max: maxProp,\n getValueLabel = defaultGetValueLabel,\n ...progressProps\n } = props;\n if ((maxProp || maxProp === 0) && !isValidMaxNumber(maxProp)) {\n console.error(getInvalidMaxError(`${maxProp}`, \"Progress\"));\n }\n const max = isValidMaxNumber(maxProp) ? maxProp : DEFAULT_MAX;\n if (valueProp !== null && !isValidValueNumber(valueProp, max)) {\n console.error(getInvalidValueError(`${valueProp}`, \"Progress\"));\n }\n const value = isValidValueNumber(valueProp, max) ? valueProp : null;\n const valueLabel = isNumber(value) ? getValueLabel(value, max) : void 0;\n return /* @__PURE__ */ jsx(ProgressProvider, { scope: __scopeProgress, value, max, children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"aria-valuemax\": max,\n \"aria-valuemin\": 0,\n \"aria-valuenow\": isNumber(value) ? value : void 0,\n \"aria-valuetext\": valueLabel,\n role: \"progressbar\",\n \"data-state\": getProgressState(value, max),\n \"data-value\": value ?? void 0,\n \"data-max\": max,\n ...progressProps,\n ref: forwardedRef\n }\n ) });\n }\n);\nProgress.displayName = PROGRESS_NAME;\nvar INDICATOR_NAME = \"ProgressIndicator\";\nvar ProgressIndicator = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeProgress, ...indicatorProps } = props;\n const context = useProgressContext(INDICATOR_NAME, __scopeProgress);\n return /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-state\": getProgressState(context.value, context.max),\n \"data-value\": context.value ?? void 0,\n \"data-max\": context.max,\n ...indicatorProps,\n ref: forwardedRef\n }\n );\n }\n);\nProgressIndicator.displayName = INDICATOR_NAME;\nfunction defaultGetValueLabel(value, max) {\n return `${Math.round(value / max * 100)}%`;\n}\nfunction getProgressState(value, maxValue) {\n return value == null ? \"indeterminate\" : value === maxValue ? \"complete\" : \"loading\";\n}\nfunction isNumber(value) {\n return typeof value === \"number\";\n}\nfunction isValidMaxNumber(max) {\n return isNumber(max) && !isNaN(max) && max > 0;\n}\nfunction isValidValueNumber(value, max) {\n return isNumber(value) && !isNaN(value) && value <= max && value >= 0;\n}\nfunction getInvalidMaxError(propValue, componentName) {\n return `Invalid prop \\`max\\` of value \\`${propValue}\\` supplied to \\`${componentName}\\`. Only numbers greater than 0 are valid max values. Defaulting to \\`${DEFAULT_MAX}\\`.`;\n}\nfunction getInvalidValueError(propValue, componentName) {\n return `Invalid prop \\`value\\` of value \\`${propValue}\\` supplied to \\`${componentName}\\`. The \\`value\\` prop must be:\n - a positive number\n - less than the value passed to \\`max\\` (or ${DEFAULT_MAX} if no \\`max\\` prop is set)\n - \\`null\\` or \\`undefined\\` if the progress is indeterminate.\n\nDefaulting to \\`null\\`.`;\n}\nvar Root = Progress;\nvar Indicator = ProgressIndicator;\nexport {\n Indicator,\n Progress,\n ProgressIndicator,\n Root,\n createProgressScope\n};\n//# sourceMappingURL=index.mjs.map\n","import * as React from \"react\";\nimport * as ProgressPrimitive from \"@radix-ui/react-progress\";\nimport { cn } from \"../../lib/utils\";\n\nfunction Progress({\n className,\n value,\n ...props\n}: React.ComponentProps<typeof ProgressPrimitive.Root>) {\n return (\n <ProgressPrimitive.Root\n data-slot=\"progress\"\n className={cn(\n \"relative h-2 w-full overflow-hidden rounded-full bg-[var(--primary-200)]/50\",\n className\n )}\n {...props}\n >\n <ProgressPrimitive.Indicator\n data-slot=\"progress-indicator\"\n className=\"h-full w-full flex-1 bg-[var(--primary-600)] transition-all duration-300 ease-out\"\n style={{ transform: `translateX(-${100 - (value || 0)}%)` }}\n />\n </ProgressPrimitive.Root>\n );\n}\n\nexport { Progress };\n","import { Progress } from \"./ui/progress\";\nimport { cn } from \"../lib/utils\";\n\nexport type ProgressMode = \"position\" | \"completion\";\nexport type ProgressBarVariant = \"default\" | \"gradient\";\n\nexport interface SurveyProgressBarProps {\n /** Current step index (0-based). */\n currentIndex: number;\n /** Total number of steps. */\n totalSteps: number;\n /** \"position\" = progress by step index. \"completion\" = progress by answered mandatory (FMB logic). Default: \"completion\" */\n progressMode?: ProgressMode;\n /** Progress value 0-100. Used when progressMode is \"completion\". */\n progressValue?: number;\n /** Show \"Question X of Y\" label. Default: true */\n showLabel?: boolean;\n /** Show percentage. Default: true */\n showPercentage?: boolean;\n /** Custom label format. Use {current} and {total} placeholders. Default: \"Question {current} of {total}\" */\n labelFormat?: string;\n /** Max width of the progress bar + percentage (e.g. \"240px\"). Default: \"240px\" */\n progressMaxWidth?: string;\n /** \"default\" = Radix Progress. \"gradient\" = FMB-style gradient bar. Default: \"default\" */\n variant?: ProgressBarVariant;\n /** Additional class name for the container. */\n className?: string;\n}\n\nconst defaultLabelFormat = \"Question {current} of {total}\";\n\nexport function SurveyProgressBar({\n currentIndex,\n totalSteps,\n progressMode = \"completion\",\n progressValue,\n showLabel = true,\n showPercentage = true,\n labelFormat = defaultLabelFormat,\n progressMaxWidth = \"100%\",\n variant = \"default\",\n className,\n}: SurveyProgressBarProps) {\n const current = currentIndex + 1;\n const progress =\n progressMode === \"completion\" && progressValue != null\n ? Math.min(100, Math.max(0, progressValue))\n : totalSteps > 0\n ? (current / totalSteps) * 100\n : 0;\n const label = labelFormat\n .replace(\"{current}\", String(current))\n .replace(\"{total}\", String(totalSteps));\n\n return (\n <div\n className={cn(\"flex items-center justify-between gap-4\", className)}\n role=\"progressbar\"\n aria-valuenow={current}\n aria-valuemin={1}\n aria-valuemax={totalSteps}\n aria-label={label}\n >\n {showLabel && (\n <span className=\"text-sm font-medium text-[var(--color-textGray)]\">\n {label}\n </span>\n )}\n <div\n className=\"flex min-w-0 flex-1 items-center gap-3\"\n style={{ maxWidth: progressMaxWidth }}\n >\n {variant === \"gradient\" ? (\n <div className=\"relative h-2 flex-1 min-w-0 overflow-hidden rounded-full bg-[var(--primary-200)]/50\">\n <div\n className=\"h-2 rounded-full bg-gradient-to-r from-[var(--primary-600)] to-[var(--primary-700)] transition-all duration-300 ease-out\"\n style={{ width: `${progress}%` }}\n />\n </div>\n ) : (\n <Progress value={progress} className=\"flex-1 min-w-0\" />\n )}\n {showPercentage && (\n <span className=\"text-sm font-medium text-[var(--color-textGray)] shrink-0\">\n {Math.round(progress)}%\n </span>\n )}\n </div>\n </div>\n );\n}\n","// src/primitive.tsx\nvar canUseDOM = !!(typeof window !== \"undefined\" && window.document && window.document.createElement);\nfunction composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {\n return function handleEvent(event) {\n originalEventHandler?.(event);\n if (checkForDefaultPrevented === false || !event.defaultPrevented) {\n return ourEventHandler?.(event);\n }\n };\n}\nfunction getOwnerWindow(element) {\n if (!canUseDOM) {\n throw new Error(\"Cannot access window outside of the DOM\");\n }\n return element?.ownerDocument?.defaultView ?? window;\n}\nfunction getOwnerDocument(element) {\n if (!canUseDOM) {\n throw new Error(\"Cannot access document outside of the DOM\");\n }\n return element?.ownerDocument ?? document;\n}\nfunction getActiveElement(node, activeDescendant = false) {\n const { activeElement } = getOwnerDocument(node);\n if (!activeElement?.nodeName) {\n return null;\n }\n if (isFrame(activeElement) && activeElement.contentDocument) {\n return getActiveElement(activeElement.contentDocument.body, activeDescendant);\n }\n if (activeDescendant) {\n const id = activeElement.getAttribute(\"aria-activedescendant\");\n if (id) {\n const element = getOwnerDocument(activeElement).getElementById(id);\n if (element) {\n return element;\n }\n }\n }\n return activeElement;\n}\nfunction isFrame(element) {\n return element.tagName === \"IFRAME\";\n}\nexport {\n canUseDOM,\n composeEventHandlers,\n getActiveElement,\n getOwnerDocument,\n getOwnerWindow,\n isFrame\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/context/src/create-context.tsx\nimport * as React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nfunction createContext2(rootComponentName, defaultContext) {\n const Context = React.createContext(defaultContext);\n const Provider = (props) => {\n const { children, ...context } = props;\n const value = React.useMemo(() => context, Object.values(context));\n return /* @__PURE__ */ jsx(Context.Provider, { value, children });\n };\n Provider.displayName = rootComponentName + \"Provider\";\n function useContext2(consumerName) {\n const context = React.useContext(Context);\n if (context) return context;\n if (defaultContext !== void 0) return defaultContext;\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n return [Provider, useContext2];\n}\nfunction createContextScope(scopeName, createContextScopeDeps = []) {\n let defaultContexts = [];\n function createContext3(rootComponentName, defaultContext) {\n const BaseContext = React.createContext(defaultContext);\n const index = defaultContexts.length;\n defaultContexts = [...defaultContexts, defaultContext];\n const Provider = (props) => {\n const { scope, children, ...context } = props;\n const Context = scope?.[scopeName]?.[index] || BaseContext;\n const value = React.useMemo(() => context, Object.values(context));\n return /* @__PURE__ */ jsx(Context.Provider, { value, children });\n };\n Provider.displayName = rootComponentName + \"Provider\";\n function useContext2(consumerName, scope) {\n const Context = scope?.[scopeName]?.[index] || BaseContext;\n const context = React.useContext(Context);\n if (context) return context;\n if (defaultContext !== void 0) return defaultContext;\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n return [Provider, useContext2];\n }\n const createScope = () => {\n const scopeContexts = defaultContexts.map((defaultContext) => {\n return React.createContext(defaultContext);\n });\n return function useScope(scope) {\n const contexts = scope?.[scopeName] || scopeContexts;\n return React.useMemo(\n () => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),\n [scope, contexts]\n );\n };\n };\n createScope.scopeName = scopeName;\n return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];\n}\nfunction composeContextScopes(...scopes) {\n const baseScope = scopes[0];\n if (scopes.length === 1) return baseScope;\n const createScope = () => {\n const scopeHooks = scopes.map((createScope2) => ({\n useScope: createScope2(),\n scopeName: createScope2.scopeName\n }));\n return function useComposedScopes(overrideScopes) {\n const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {\n const scopeProps = useScope(overrideScopes);\n const currentScope = scopeProps[`__scope${scopeName}`];\n return { ...nextScopes2, ...currentScope };\n }, {});\n return React.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);\n };\n };\n createScope.scopeName = baseScope.scopeName;\n return createScope;\n}\nexport {\n createContext2 as createContext,\n createContextScope\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/use-layout-effect/src/use-layout-effect.tsx\nimport * as React from \"react\";\nvar useLayoutEffect2 = globalThis?.document ? React.useLayoutEffect : () => {\n};\nexport {\n useLayoutEffect2 as useLayoutEffect\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/id/src/id.tsx\nimport * as React from \"react\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nvar useReactId = React[\" useId \".trim().toString()] || (() => void 0);\nvar count = 0;\nfunction useId(deterministicId) {\n const [id, setId] = React.useState(useReactId());\n useLayoutEffect(() => {\n if (!deterministicId) setId((reactId) => reactId ?? String(count++));\n }, [deterministicId]);\n return deterministicId || (id ? `radix-${id}` : \"\");\n}\nexport {\n useId\n};\n//# sourceMappingURL=index.mjs.map\n","// src/use-controllable-state.tsx\nimport * as React from \"react\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nvar useInsertionEffect = React[\" useInsertionEffect \".trim().toString()] || useLayoutEffect;\nfunction useControllableState({\n prop,\n defaultProp,\n onChange = () => {\n },\n caller\n}) {\n const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState({\n defaultProp,\n onChange\n });\n const isControlled = prop !== void 0;\n const value = isControlled ? prop : uncontrolledProp;\n if (true) {\n const isControlledRef = React.useRef(prop !== void 0);\n React.useEffect(() => {\n const wasControlled = isControlledRef.current;\n if (wasControlled !== isControlled) {\n const from = wasControlled ? \"controlled\" : \"uncontrolled\";\n const to = isControlled ? \"controlled\" : \"uncontrolled\";\n console.warn(\n `${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`\n );\n }\n isControlledRef.current = isControlled;\n }, [isControlled, caller]);\n }\n const setValue = React.useCallback(\n (nextValue) => {\n if (isControlled) {\n const value2 = isFunction(nextValue) ? nextValue(prop) : nextValue;\n if (value2 !== prop) {\n onChangeRef.current?.(value2);\n }\n } else {\n setUncontrolledProp(nextValue);\n }\n },\n [isControlled, prop, setUncontrolledProp, onChangeRef]\n );\n return [value, setValue];\n}\nfunction useUncontrolledState({\n defaultProp,\n onChange\n}) {\n const [value, setValue] = React.useState(defaultProp);\n const prevValueRef = React.useRef(value);\n const onChangeRef = React.useRef(onChange);\n useInsertionEffect(() => {\n onChangeRef.current = onChange;\n }, [onChange]);\n React.useEffect(() => {\n if (prevValueRef.current !== value) {\n onChangeRef.current?.(value);\n prevValueRef.current = value;\n }\n }, [value, prevValueRef]);\n return [value, setValue, onChangeRef];\n}\nfunction isFunction(value) {\n return typeof value === \"function\";\n}\n\n// src/use-controllable-state-reducer.tsx\nimport * as React2 from \"react\";\nimport { useEffectEvent } from \"@radix-ui/react-use-effect-event\";\nvar SYNC_STATE = Symbol(\"RADIX:SYNC_STATE\");\nfunction useControllableStateReducer(reducer, userArgs, initialArg, init) {\n const { prop: controlledState, defaultProp, onChange: onChangeProp, caller } = userArgs;\n const isControlled = controlledState !== void 0;\n const onChange = useEffectEvent(onChangeProp);\n if (true) {\n const isControlledRef = React2.useRef(controlledState !== void 0);\n React2.useEffect(() => {\n const wasControlled = isControlledRef.current;\n if (wasControlled !== isControlled) {\n const from = wasControlled ? \"controlled\" : \"uncontrolled\";\n const to = isControlled ? \"controlled\" : \"uncontrolled\";\n console.warn(\n `${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`\n );\n }\n isControlledRef.current = isControlled;\n }, [isControlled, caller]);\n }\n const args = [{ ...initialArg, state: defaultProp }];\n if (init) {\n args.push(init);\n }\n const [internalState, dispatch] = React2.useReducer(\n (state2, action) => {\n if (action.type === SYNC_STATE) {\n return { ...state2, state: action.state };\n }\n const next = reducer(state2, action);\n if (isControlled && !Object.is(next.state, state2.state)) {\n onChange(next.state);\n }\n return next;\n },\n ...args\n );\n const uncontrolledState = internalState.state;\n const prevValueRef = React2.useRef(uncontrolledState);\n React2.useEffect(() => {\n if (prevValueRef.current !== uncontrolledState) {\n prevValueRef.current = uncontrolledState;\n if (!isControlled) {\n onChange(uncontrolledState);\n }\n }\n }, [onChange, uncontrolledState, prevValueRef, isControlled]);\n const state = React2.useMemo(() => {\n const isControlled2 = controlledState !== void 0;\n if (isControlled2) {\n return { ...internalState, state: controlledState };\n }\n return internalState;\n }, [internalState, controlledState]);\n React2.useEffect(() => {\n if (isControlled && !Object.is(controlledState, internalState.state)) {\n dispatch({ type: SYNC_STATE, state: controlledState });\n }\n }, [controlledState, internalState.state, isControlled]);\n return [state, dispatch];\n}\nexport {\n useControllableState,\n useControllableStateReducer\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","// src/primitive.tsx\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NODES = [\n \"a\",\n \"button\",\n \"div\",\n \"form\",\n \"h2\",\n \"h3\",\n \"img\",\n \"input\",\n \"label\",\n \"li\",\n \"nav\",\n \"ol\",\n \"p\",\n \"select\",\n \"span\",\n \"svg\",\n \"ul\"\n];\nvar Primitive = NODES.reduce((primitive, node) => {\n const Slot = createSlot(`Primitive.${node}`);\n const Node = React.forwardRef((props, forwardedRef) => {\n const { asChild, ...primitiveProps } = props;\n const Comp = asChild ? Slot : node;\n if (typeof window !== \"undefined\") {\n window[Symbol.for(\"radix-ui\")] = true;\n }\n return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });\n });\n Node.displayName = `Primitive.${node}`;\n return { ...primitive, [node]: Node };\n}, {});\nfunction dispatchDiscreteCustomEvent(target, event) {\n if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));\n}\nvar Root = Primitive;\nexport {\n Primitive,\n Root,\n dispatchDiscreteCustomEvent\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/use-callback-ref/src/use-callback-ref.tsx\nimport * as React from \"react\";\nfunction useCallbackRef(callback) {\n const callbackRef = React.useRef(callback);\n React.useEffect(() => {\n callbackRef.current = callback;\n });\n return React.useMemo(() => (...args) => callbackRef.current?.(...args), []);\n}\nexport {\n useCallbackRef\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/use-escape-keydown/src/use-escape-keydown.tsx\nimport * as React from \"react\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nfunction useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {\n const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);\n React.useEffect(() => {\n const handleKeyDown = (event) => {\n if (event.key === \"Escape\") {\n onEscapeKeyDown(event);\n }\n };\n ownerDocument.addEventListener(\"keydown\", handleKeyDown, { capture: true });\n return () => ownerDocument.removeEventListener(\"keydown\", handleKeyDown, { capture: true });\n }, [onEscapeKeyDown, ownerDocument]);\n}\nexport {\n useEscapeKeydown\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/dismissable-layer.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { Primitive, dispatchDiscreteCustomEvent } from \"@radix-ui/react-primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useEscapeKeydown } from \"@radix-ui/react-use-escape-keydown\";\nimport { jsx } from \"react/jsx-runtime\";\nvar DISMISSABLE_LAYER_NAME = \"DismissableLayer\";\nvar CONTEXT_UPDATE = \"dismissableLayer.update\";\nvar POINTER_DOWN_OUTSIDE = \"dismissableLayer.pointerDownOutside\";\nvar FOCUS_OUTSIDE = \"dismissableLayer.focusOutside\";\nvar originalBodyPointerEvents;\nvar DismissableLayerContext = React.createContext({\n layers: /* @__PURE__ */ new Set(),\n layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),\n branches: /* @__PURE__ */ new Set()\n});\nvar DismissableLayer = React.forwardRef(\n (props, forwardedRef) => {\n const {\n disableOutsidePointerEvents = false,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n onDismiss,\n ...layerProps\n } = props;\n const context = React.useContext(DismissableLayerContext);\n const [node, setNode] = React.useState(null);\n const ownerDocument = node?.ownerDocument ?? globalThis?.document;\n const [, force] = React.useState({});\n const composedRefs = useComposedRefs(forwardedRef, (node2) => setNode(node2));\n const layers = Array.from(context.layers);\n const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);\n const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);\n const index = node ? layers.indexOf(node) : -1;\n const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;\n const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;\n const pointerDownOutside = usePointerDownOutside((event) => {\n const target = event.target;\n const isPointerDownOnBranch = [...context.branches].some((branch) => branch.contains(target));\n if (!isPointerEventsEnabled || isPointerDownOnBranch) return;\n onPointerDownOutside?.(event);\n onInteractOutside?.(event);\n if (!event.defaultPrevented) onDismiss?.();\n }, ownerDocument);\n const focusOutside = useFocusOutside((event) => {\n const target = event.target;\n const isFocusInBranch = [...context.branches].some((branch) => branch.contains(target));\n if (isFocusInBranch) return;\n onFocusOutside?.(event);\n onInteractOutside?.(event);\n if (!event.defaultPrevented) onDismiss?.();\n }, ownerDocument);\n useEscapeKeydown((event) => {\n const isHighestLayer = index === context.layers.size - 1;\n if (!isHighestLayer) return;\n onEscapeKeyDown?.(event);\n if (!event.defaultPrevented && onDismiss) {\n event.preventDefault();\n onDismiss();\n }\n }, ownerDocument);\n React.useEffect(() => {\n if (!node) return;\n if (disableOutsidePointerEvents) {\n if (context.layersWithOutsidePointerEventsDisabled.size === 0) {\n originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;\n ownerDocument.body.style.pointerEvents = \"none\";\n }\n context.layersWithOutsidePointerEventsDisabled.add(node);\n }\n context.layers.add(node);\n dispatchUpdate();\n return () => {\n if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) {\n ownerDocument.body.style.pointerEvents = originalBodyPointerEvents;\n }\n };\n }, [node, ownerDocument, disableOutsidePointerEvents, context]);\n React.useEffect(() => {\n return () => {\n if (!node) return;\n context.layers.delete(node);\n context.layersWithOutsidePointerEventsDisabled.delete(node);\n dispatchUpdate();\n };\n }, [node, context]);\n React.useEffect(() => {\n const handleUpdate = () => force({});\n document.addEventListener(CONTEXT_UPDATE, handleUpdate);\n return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);\n }, []);\n return /* @__PURE__ */ jsx(\n Primitive.div,\n {\n ...layerProps,\n ref: composedRefs,\n style: {\n pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? \"auto\" : \"none\" : void 0,\n ...props.style\n },\n onFocusCapture: composeEventHandlers(props.onFocusCapture, focusOutside.onFocusCapture),\n onBlurCapture: composeEventHandlers(props.onBlurCapture, focusOutside.onBlurCapture),\n onPointerDownCapture: composeEventHandlers(\n props.onPointerDownCapture,\n pointerDownOutside.onPointerDownCapture\n )\n }\n );\n }\n);\nDismissableLayer.displayName = DISMISSABLE_LAYER_NAME;\nvar BRANCH_NAME = \"DismissableLayerBranch\";\nvar DismissableLayerBranch = React.forwardRef((props, forwardedRef) => {\n const context = React.useContext(DismissableLayerContext);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n React.useEffect(() => {\n const node = ref.current;\n if (node) {\n context.branches.add(node);\n return () => {\n context.branches.delete(node);\n };\n }\n }, [context.branches]);\n return /* @__PURE__ */ jsx(Primitive.div, { ...props, ref: composedRefs });\n});\nDismissableLayerBranch.displayName = BRANCH_NAME;\nfunction usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {\n const handlePointerDownOutside = useCallbackRef(onPointerDownOutside);\n const isPointerInsideReactTreeRef = React.useRef(false);\n const handleClickRef = React.useRef(() => {\n });\n React.useEffect(() => {\n const handlePointerDown = (event) => {\n if (event.target && !isPointerInsideReactTreeRef.current) {\n let handleAndDispatchPointerDownOutsideEvent2 = function() {\n handleAndDispatchCustomEvent(\n POINTER_DOWN_OUTSIDE,\n handlePointerDownOutside,\n eventDetail,\n { discrete: true }\n );\n };\n var handleAndDispatchPointerDownOutsideEvent = handleAndDispatchPointerDownOutsideEvent2;\n const eventDetail = { originalEvent: event };\n if (event.pointerType === \"touch\") {\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n handleClickRef.current = handleAndDispatchPointerDownOutsideEvent2;\n ownerDocument.addEventListener(\"click\", handleClickRef.current, { once: true });\n } else {\n handleAndDispatchPointerDownOutsideEvent2();\n }\n } else {\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n }\n isPointerInsideReactTreeRef.current = false;\n };\n const timerId = window.setTimeout(() => {\n ownerDocument.addEventListener(\"pointerdown\", handlePointerDown);\n }, 0);\n return () => {\n window.clearTimeout(timerId);\n ownerDocument.removeEventListener(\"pointerdown\", handlePointerDown);\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n };\n }, [ownerDocument, handlePointerDownOutside]);\n return {\n // ensures we check React component tree (not just DOM tree)\n onPointerDownCapture: () => isPointerInsideReactTreeRef.current = true\n };\n}\nfunction useFocusOutside(onFocusOutside, ownerDocument = globalThis?.document) {\n const handleFocusOutside = useCallbackRef(onFocusOutside);\n const isFocusInsideReactTreeRef = React.useRef(false);\n React.useEffect(() => {\n const handleFocus = (event) => {\n if (event.target && !isFocusInsideReactTreeRef.current) {\n const eventDetail = { originalEvent: event };\n handleAndDispatchCustomEvent(FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {\n discrete: false\n });\n }\n };\n ownerDocument.addEventListener(\"focusin\", handleFocus);\n return () => ownerDocument.removeEventListener(\"focusin\", handleFocus);\n }, [ownerDocument, handleFocusOutside]);\n return {\n onFocusCapture: () => isFocusInsideReactTreeRef.current = true,\n onBlurCapture: () => isFocusInsideReactTreeRef.current = false\n };\n}\nfunction dispatchUpdate() {\n const event = new CustomEvent(CONTEXT_UPDATE);\n document.dispatchEvent(event);\n}\nfunction handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {\n const target = detail.originalEvent.target;\n const event = new CustomEvent(name, { bubbles: false, cancelable: true, detail });\n if (handler) target.addEventListener(name, handler, { once: true });\n if (discrete) {\n dispatchDiscreteCustomEvent(target, event);\n } else {\n target.dispatchEvent(event);\n }\n}\nvar Root = DismissableLayer;\nvar Branch = DismissableLayerBranch;\nexport {\n Branch,\n DismissableLayer,\n DismissableLayerBranch,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/focus-scope.tsx\nimport * as React from \"react\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { jsx } from \"react/jsx-runtime\";\nvar AUTOFOCUS_ON_MOUNT = \"focusScope.autoFocusOnMount\";\nvar AUTOFOCUS_ON_UNMOUNT = \"focusScope.autoFocusOnUnmount\";\nvar EVENT_OPTIONS = { bubbles: false, cancelable: true };\nvar FOCUS_SCOPE_NAME = \"FocusScope\";\nvar FocusScope = React.forwardRef((props, forwardedRef) => {\n const {\n loop = false,\n trapped = false,\n onMountAutoFocus: onMountAutoFocusProp,\n onUnmountAutoFocus: onUnmountAutoFocusProp,\n ...scopeProps\n } = props;\n const [container, setContainer] = React.useState(null);\n const onMountAutoFocus = useCallbackRef(onMountAutoFocusProp);\n const onUnmountAutoFocus = useCallbackRef(onUnmountAutoFocusProp);\n const lastFocusedElementRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setContainer(node));\n const focusScope = React.useRef({\n paused: false,\n pause() {\n this.paused = true;\n },\n resume() {\n this.paused = false;\n }\n }).current;\n React.useEffect(() => {\n if (trapped) {\n let handleFocusIn2 = function(event) {\n if (focusScope.paused || !container) return;\n const target = event.target;\n if (container.contains(target)) {\n lastFocusedElementRef.current = target;\n } else {\n focus(lastFocusedElementRef.current, { select: true });\n }\n }, handleFocusOut2 = function(event) {\n if (focusScope.paused || !container) return;\n const relatedTarget = event.relatedTarget;\n if (relatedTarget === null) return;\n if (!container.contains(relatedTarget)) {\n focus(lastFocusedElementRef.current, { select: true });\n }\n }, handleMutations2 = function(mutations) {\n const focusedElement = document.activeElement;\n if (focusedElement !== document.body) return;\n for (const mutation of mutations) {\n if (mutation.removedNodes.length > 0) focus(container);\n }\n };\n var handleFocusIn = handleFocusIn2, handleFocusOut = handleFocusOut2, handleMutations = handleMutations2;\n document.addEventListener(\"focusin\", handleFocusIn2);\n document.addEventListener(\"focusout\", handleFocusOut2);\n const mutationObserver = new MutationObserver(handleMutations2);\n if (container) mutationObserver.observe(container, { childList: true, subtree: true });\n return () => {\n document.removeEventListener(\"focusin\", handleFocusIn2);\n document.removeEventListener(\"focusout\", handleFocusOut2);\n mutationObserver.disconnect();\n };\n }\n }, [trapped, container, focusScope.paused]);\n React.useEffect(() => {\n if (container) {\n focusScopesStack.add(focusScope);\n const previouslyFocusedElement = document.activeElement;\n const hasFocusedCandidate = container.contains(previouslyFocusedElement);\n if (!hasFocusedCandidate) {\n const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT, EVENT_OPTIONS);\n container.addEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);\n container.dispatchEvent(mountEvent);\n if (!mountEvent.defaultPrevented) {\n focusFirst(removeLinks(getTabbableCandidates(container)), { select: true });\n if (document.activeElement === previouslyFocusedElement) {\n focus(container);\n }\n }\n }\n return () => {\n container.removeEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);\n setTimeout(() => {\n const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT, EVENT_OPTIONS);\n container.addEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);\n container.dispatchEvent(unmountEvent);\n if (!unmountEvent.defaultPrevented) {\n focus(previouslyFocusedElement ?? document.body, { select: true });\n }\n container.removeEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);\n focusScopesStack.remove(focusScope);\n }, 0);\n };\n }\n }, [container, onMountAutoFocus, onUnmountAutoFocus, focusScope]);\n const handleKeyDown = React.useCallback(\n (event) => {\n if (!loop && !trapped) return;\n if (focusScope.paused) return;\n const isTabKey = event.key === \"Tab\" && !event.altKey && !event.ctrlKey && !event.metaKey;\n const focusedElement = document.activeElement;\n if (isTabKey && focusedElement) {\n const container2 = event.currentTarget;\n const [first, last] = getTabbableEdges(container2);\n const hasTabbableElementsInside = first && last;\n if (!hasTabbableElementsInside) {\n if (focusedElement === container2) event.preventDefault();\n } else {\n if (!event.shiftKey && focusedElement === last) {\n event.preventDefault();\n if (loop) focus(first, { select: true });\n } else if (event.shiftKey && focusedElement === first) {\n event.preventDefault();\n if (loop) focus(last, { select: true });\n }\n }\n }\n },\n [loop, trapped, focusScope.paused]\n );\n return /* @__PURE__ */ jsx(Primitive.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });\n});\nFocusScope.displayName = FOCUS_SCOPE_NAME;\nfunction focusFirst(candidates, { select = false } = {}) {\n const previouslyFocusedElement = document.activeElement;\n for (const candidate of candidates) {\n focus(candidate, { select });\n if (document.activeElement !== previouslyFocusedElement) return;\n }\n}\nfunction getTabbableEdges(container) {\n const candidates = getTabbableCandidates(container);\n const first = findVisible(candidates, container);\n const last = findVisible(candidates.reverse(), container);\n return [first, last];\n}\nfunction getTabbableCandidates(container) {\n const nodes = [];\n const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {\n acceptNode: (node) => {\n const isHiddenInput = node.tagName === \"INPUT\" && node.type === \"hidden\";\n if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;\n return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;\n }\n });\n while (walker.nextNode()) nodes.push(walker.currentNode);\n return nodes;\n}\nfunction findVisible(elements, container) {\n for (const element of elements) {\n if (!isHidden(element, { upTo: container })) return element;\n }\n}\nfunction isHidden(node, { upTo }) {\n if (getComputedStyle(node).visibility === \"hidden\") return true;\n while (node) {\n if (upTo !== void 0 && node === upTo) return false;\n if (getComputedStyle(node).display === \"none\") return true;\n node = node.parentElement;\n }\n return false;\n}\nfunction isSelectableInput(element) {\n return element instanceof HTMLInputElement && \"select\" in element;\n}\nfunction focus(element, { select = false } = {}) {\n if (element && element.focus) {\n const previouslyFocusedElement = document.activeElement;\n element.focus({ preventScroll: true });\n if (element !== previouslyFocusedElement && isSelectableInput(element) && select)\n element.select();\n }\n}\nvar focusScopesStack = createFocusScopesStack();\nfunction createFocusScopesStack() {\n let stack = [];\n return {\n add(focusScope) {\n const activeFocusScope = stack[0];\n if (focusScope !== activeFocusScope) {\n activeFocusScope?.pause();\n }\n stack = arrayRemove(stack, focusScope);\n stack.unshift(focusScope);\n },\n remove(focusScope) {\n stack = arrayRemove(stack, focusScope);\n stack[0]?.resume();\n }\n };\n}\nfunction arrayRemove(array, item) {\n const updatedArray = [...array];\n const index = updatedArray.indexOf(item);\n if (index !== -1) {\n updatedArray.splice(index, 1);\n }\n return updatedArray;\n}\nfunction removeLinks(items) {\n return items.filter((item) => item.tagName !== \"A\");\n}\nvar Root = FocusScope;\nexport {\n FocusScope,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/portal.tsx\nimport * as React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nimport { jsx } from \"react/jsx-runtime\";\nvar PORTAL_NAME = \"Portal\";\nvar Portal = React.forwardRef((props, forwardedRef) => {\n const { container: containerProp, ...portalProps } = props;\n const [mounted, setMounted] = React.useState(false);\n useLayoutEffect(() => setMounted(true), []);\n const container = containerProp || mounted && globalThis?.document?.body;\n return container ? ReactDOM.createPortal(/* @__PURE__ */ jsx(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;\n});\nPortal.displayName = PORTAL_NAME;\nvar Root = Portal;\nexport {\n Portal,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/presence.tsx\nimport * as React2 from \"react\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\n\n// src/use-state-machine.tsx\nimport * as React from \"react\";\nfunction useStateMachine(initialState, machine) {\n return React.useReducer((state, event) => {\n const nextState = machine[state][event];\n return nextState ?? state;\n }, initialState);\n}\n\n// src/presence.tsx\nvar Presence = (props) => {\n const { present, children } = props;\n const presence = usePresence(present);\n const child = typeof children === \"function\" ? children({ present: presence.isPresent }) : React2.Children.only(children);\n const ref = useComposedRefs(presence.ref, getElementRef(child));\n const forceMount = typeof children === \"function\";\n return forceMount || presence.isPresent ? React2.cloneElement(child, { ref }) : null;\n};\nPresence.displayName = \"Presence\";\nfunction usePresence(present) {\n const [node, setNode] = React2.useState();\n const stylesRef = React2.useRef(null);\n const prevPresentRef = React2.useRef(present);\n const prevAnimationNameRef = React2.useRef(\"none\");\n const initialState = present ? \"mounted\" : \"unmounted\";\n const [state, send] = useStateMachine(initialState, {\n mounted: {\n UNMOUNT: \"unmounted\",\n ANIMATION_OUT: \"unmountSuspended\"\n },\n unmountSuspended: {\n MOUNT: \"mounted\",\n ANIMATION_END: \"unmounted\"\n },\n unmounted: {\n MOUNT: \"mounted\"\n }\n });\n React2.useEffect(() => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n prevAnimationNameRef.current = state === \"mounted\" ? currentAnimationName : \"none\";\n }, [state]);\n useLayoutEffect(() => {\n const styles = stylesRef.current;\n const wasPresent = prevPresentRef.current;\n const hasPresentChanged = wasPresent !== present;\n if (hasPresentChanged) {\n const prevAnimationName = prevAnimationNameRef.current;\n const currentAnimationName = getAnimationName(styles);\n if (present) {\n send(\"MOUNT\");\n } else if (currentAnimationName === \"none\" || styles?.display === \"none\") {\n send(\"UNMOUNT\");\n } else {\n const isAnimating = prevAnimationName !== currentAnimationName;\n if (wasPresent && isAnimating) {\n send(\"ANIMATION_OUT\");\n } else {\n send(\"UNMOUNT\");\n }\n }\n prevPresentRef.current = present;\n }\n }, [present, send]);\n useLayoutEffect(() => {\n if (node) {\n let timeoutId;\n const ownerWindow = node.ownerDocument.defaultView ?? window;\n const handleAnimationEnd = (event) => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n const isCurrentAnimation = currentAnimationName.includes(CSS.escape(event.animationName));\n if (event.target === node && isCurrentAnimation) {\n send(\"ANIMATION_END\");\n if (!prevPresentRef.current) {\n const currentFillMode = node.style.animationFillMode;\n node.style.animationFillMode = \"forwards\";\n timeoutId = ownerWindow.setTimeout(() => {\n if (node.style.animationFillMode === \"forwards\") {\n node.style.animationFillMode = currentFillMode;\n }\n });\n }\n }\n };\n const handleAnimationStart = (event) => {\n if (event.target === node) {\n prevAnimationNameRef.current = getAnimationName(stylesRef.current);\n }\n };\n node.addEventListener(\"animationstart\", handleAnimationStart);\n node.addEventListener(\"animationcancel\", handleAnimationEnd);\n node.addEventListener(\"animationend\", handleAnimationEnd);\n return () => {\n ownerWindow.clearTimeout(timeoutId);\n node.removeEventListener(\"animationstart\", handleAnimationStart);\n node.removeEventListener(\"animationcancel\", handleAnimationEnd);\n node.removeEventListener(\"animationend\", handleAnimationEnd);\n };\n } else {\n send(\"ANIMATION_END\");\n }\n }, [node, send]);\n return {\n isPresent: [\"mounted\", \"unmountSuspended\"].includes(state),\n ref: React2.useCallback((node2) => {\n stylesRef.current = node2 ? getComputedStyle(node2) : null;\n setNode(node2);\n }, [])\n };\n}\nfunction getAnimationName(styles) {\n return styles?.animationName || \"none\";\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}\nvar Root = Presence;\nexport {\n Presence,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/focus-guards.tsx\nimport * as React from \"react\";\nvar count = 0;\nfunction FocusGuards(props) {\n useFocusGuards();\n return props.children;\n}\nfunction useFocusGuards() {\n React.useEffect(() => {\n const edgeGuards = document.querySelectorAll(\"[data-radix-focus-guard]\");\n document.body.insertAdjacentElement(\"afterbegin\", edgeGuards[0] ?? createFocusGuard());\n document.body.insertAdjacentElement(\"beforeend\", edgeGuards[1] ?? createFocusGuard());\n count++;\n return () => {\n if (count === 1) {\n document.querySelectorAll(\"[data-radix-focus-guard]\").forEach((node) => node.remove());\n }\n count--;\n };\n }, []);\n}\nfunction createFocusGuard() {\n const element = document.createElement(\"span\");\n element.setAttribute(\"data-radix-focus-guard\", \"\");\n element.tabIndex = 0;\n element.style.outline = \"none\";\n element.style.opacity = \"0\";\n element.style.position = \"fixed\";\n element.style.pointerEvents = \"none\";\n return element;\n}\nexport {\n FocusGuards,\n FocusGuards as Root,\n useFocusGuards\n};\n//# sourceMappingURL=index.mjs.map\n","/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nvar ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n var r, s = 0;\n function next() {\n while (r = env.stack.pop()) {\n try {\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\n if (r.dispose) {\n var result = r.dispose.call(r.value);\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n else s |= 1;\n }\n catch (e) {\n fail(e);\n }\n }\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\n });\n }\n return path;\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __esDecorate,\n __runInitializers,\n __propKey,\n __setFunctionName,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n __rewriteRelativeImportExtension,\n};\n","export var zeroRightClassName = 'right-scroll-bar-position';\nexport var fullWidthClassName = 'width-before-scroll-bar';\nexport var noScrollbarsClassName = 'with-scroll-bars-hidden';\n/**\n * Name of a CSS variable containing the amount of \"hidden\" scrollbar\n * ! might be undefined ! use will fallback!\n */\nexport var removedBarSizeVariable = '--removed-body-scroll-bar-size';\n","/**\n * Assigns a value for a given ref, no matter of the ref format\n * @param {RefObject} ref - a callback function or ref object\n * @param value - a new value\n *\n * @see https://github.com/theKashey/use-callback-ref#assignref\n * @example\n * const refObject = useRef();\n * const refFn = (ref) => {....}\n *\n * assignRef(refObject, \"refValue\");\n * assignRef(refFn, \"refValue\");\n */\nexport function assignRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n }\n else if (ref) {\n ref.current = value;\n }\n return ref;\n}\n","import { useState } from 'react';\n/**\n * creates a MutableRef with ref change callback\n * @param initialValue - initial ref value\n * @param {Function} callback - a callback to run when value changes\n *\n * @example\n * const ref = useCallbackRef(0, (newValue, oldValue) => console.log(oldValue, '->', newValue);\n * ref.current = 1;\n * // prints 0 -> 1\n *\n * @see https://reactjs.org/docs/hooks-reference.html#useref\n * @see https://github.com/theKashey/use-callback-ref#usecallbackref---to-replace-reactuseref\n * @returns {MutableRefObject}\n */\nexport function useCallbackRef(initialValue, callback) {\n var ref = useState(function () { return ({\n // value\n value: initialValue,\n // last callback\n callback: callback,\n // \"memoized\" public interface\n facade: {\n get current() {\n return ref.value;\n },\n set current(value) {\n var last = ref.value;\n if (last !== value) {\n ref.value = value;\n ref.callback(value, last);\n }\n },\n },\n }); })[0];\n // update callback\n ref.callback = callback;\n return ref.facade;\n}\n","import * as React from 'react';\nimport { assignRef } from './assignRef';\nimport { useCallbackRef } from './useRef';\nvar useIsomorphicLayoutEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;\nvar currentValues = new WeakMap();\n/**\n * Merges two or more refs together providing a single interface to set their value\n * @param {RefObject|Ref} refs\n * @returns {MutableRefObject} - a new ref, which translates all changes to {refs}\n *\n * @see {@link mergeRefs} a version without buit-in memoization\n * @see https://github.com/theKashey/use-callback-ref#usemergerefs\n * @example\n * const Component = React.forwardRef((props, ref) => {\n * const ownRef = useRef();\n * const domRef = useMergeRefs([ref, ownRef]); // 👈 merge together\n * return <div ref={domRef}>...</div>\n * }\n */\nexport function useMergeRefs(refs, defaultValue) {\n var callbackRef = useCallbackRef(defaultValue || null, function (newValue) {\n return refs.forEach(function (ref) { return assignRef(ref, newValue); });\n });\n // handle refs changes - added or removed\n useIsomorphicLayoutEffect(function () {\n var oldValue = currentValues.get(callbackRef);\n if (oldValue) {\n var prevRefs_1 = new Set(oldValue);\n var nextRefs_1 = new Set(refs);\n var current_1 = callbackRef.current;\n prevRefs_1.forEach(function (ref) {\n if (!nextRefs_1.has(ref)) {\n assignRef(ref, null);\n }\n });\n nextRefs_1.forEach(function (ref) {\n if (!prevRefs_1.has(ref)) {\n assignRef(ref, current_1);\n }\n });\n }\n currentValues.set(callbackRef, refs);\n }, [refs]);\n return callbackRef;\n}\n","import { __assign } from \"tslib\";\nfunction ItoI(a) {\n return a;\n}\nfunction innerCreateMedium(defaults, middleware) {\n if (middleware === void 0) { middleware = ItoI; }\n var buffer = [];\n var assigned = false;\n var medium = {\n read: function () {\n if (assigned) {\n throw new Error('Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.');\n }\n if (buffer.length) {\n return buffer[buffer.length - 1];\n }\n return defaults;\n },\n useMedium: function (data) {\n var item = middleware(data, assigned);\n buffer.push(item);\n return function () {\n buffer = buffer.filter(function (x) { return x !== item; });\n };\n },\n assignSyncMedium: function (cb) {\n assigned = true;\n while (buffer.length) {\n var cbs = buffer;\n buffer = [];\n cbs.forEach(cb);\n }\n buffer = {\n push: function (x) { return cb(x); },\n filter: function () { return buffer; },\n };\n },\n assignMedium: function (cb) {\n assigned = true;\n var pendingQueue = [];\n if (buffer.length) {\n var cbs = buffer;\n buffer = [];\n cbs.forEach(cb);\n pendingQueue = buffer;\n }\n var executeQueue = function () {\n var cbs = pendingQueue;\n pendingQueue = [];\n cbs.forEach(cb);\n };\n var cycle = function () { return Promise.resolve().then(executeQueue); };\n cycle();\n buffer = {\n push: function (x) {\n pendingQueue.push(x);\n cycle();\n },\n filter: function (filter) {\n pendingQueue = pendingQueue.filter(filter);\n return buffer;\n },\n };\n },\n };\n return medium;\n}\nexport function createMedium(defaults, middleware) {\n if (middleware === void 0) { middleware = ItoI; }\n return innerCreateMedium(defaults, middleware);\n}\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport function createSidecarMedium(options) {\n if (options === void 0) { options = {}; }\n var medium = innerCreateMedium(null);\n medium.options = __assign({ async: true, ssr: false }, options);\n return medium;\n}\n","import { __assign, __rest } from \"tslib\";\nimport * as React from 'react';\nvar SideCar = function (_a) {\n var sideCar = _a.sideCar, rest = __rest(_a, [\"sideCar\"]);\n if (!sideCar) {\n throw new Error('Sidecar: please provide `sideCar` property to import the right car');\n }\n var Target = sideCar.read();\n if (!Target) {\n throw new Error('Sidecar medium not found');\n }\n return React.createElement(Target, __assign({}, rest));\n};\nSideCar.isSideCarExport = true;\nexport function exportSidecar(medium, exported) {\n medium.useMedium(exported);\n return SideCar;\n}\n","import { createSidecarMedium } from 'use-sidecar';\nexport var effectCar = createSidecarMedium();\n","import { __assign, __rest } from \"tslib\";\nimport * as React from 'react';\nimport { fullWidthClassName, zeroRightClassName } from 'react-remove-scroll-bar/constants';\nimport { useMergeRefs } from 'use-callback-ref';\nimport { effectCar } from './medium';\nvar nothing = function () {\n return;\n};\n/**\n * Removes scrollbar from the page and contain the scroll within the Lock\n */\nvar RemoveScroll = React.forwardRef(function (props, parentRef) {\n var ref = React.useRef(null);\n var _a = React.useState({\n onScrollCapture: nothing,\n onWheelCapture: nothing,\n onTouchMoveCapture: nothing,\n }), callbacks = _a[0], setCallbacks = _a[1];\n var forwardProps = props.forwardProps, children = props.children, className = props.className, removeScrollBar = props.removeScrollBar, enabled = props.enabled, shards = props.shards, sideCar = props.sideCar, noRelative = props.noRelative, noIsolation = props.noIsolation, inert = props.inert, allowPinchZoom = props.allowPinchZoom, _b = props.as, Container = _b === void 0 ? 'div' : _b, gapMode = props.gapMode, rest = __rest(props, [\"forwardProps\", \"children\", \"className\", \"removeScrollBar\", \"enabled\", \"shards\", \"sideCar\", \"noRelative\", \"noIsolation\", \"inert\", \"allowPinchZoom\", \"as\", \"gapMode\"]);\n var SideCar = sideCar;\n var containerRef = useMergeRefs([ref, parentRef]);\n var containerProps = __assign(__assign({}, rest), callbacks);\n return (React.createElement(React.Fragment, null,\n enabled && (React.createElement(SideCar, { sideCar: effectCar, removeScrollBar: removeScrollBar, shards: shards, noRelative: noRelative, noIsolation: noIsolation, inert: inert, setCallbacks: setCallbacks, allowPinchZoom: !!allowPinchZoom, lockRef: ref, gapMode: gapMode })),\n forwardProps ? (React.cloneElement(React.Children.only(children), __assign(__assign({}, containerProps), { ref: containerRef }))) : (React.createElement(Container, __assign({}, containerProps, { className: className, ref: containerRef }), children))));\n});\nRemoveScroll.defaultProps = {\n enabled: true,\n removeScrollBar: true,\n inert: false,\n};\nRemoveScroll.classNames = {\n fullWidth: fullWidthClassName,\n zeroRight: zeroRightClassName,\n};\nexport { RemoveScroll };\n","var currentNonce;\nexport var setNonce = function (nonce) {\n currentNonce = nonce;\n};\nexport var getNonce = function () {\n if (currentNonce) {\n return currentNonce;\n }\n if (typeof __webpack_nonce__ !== 'undefined') {\n return __webpack_nonce__;\n }\n return undefined;\n};\n","import { getNonce } from 'get-nonce';\nfunction makeStyleTag() {\n if (!document)\n return null;\n var tag = document.createElement('style');\n tag.type = 'text/css';\n var nonce = getNonce();\n if (nonce) {\n tag.setAttribute('nonce', nonce);\n }\n return tag;\n}\nfunction injectStyles(tag, css) {\n // @ts-ignore\n if (tag.styleSheet) {\n // @ts-ignore\n tag.styleSheet.cssText = css;\n }\n else {\n tag.appendChild(document.createTextNode(css));\n }\n}\nfunction insertStyleTag(tag) {\n var head = document.head || document.getElementsByTagName('head')[0];\n head.appendChild(tag);\n}\nexport var stylesheetSingleton = function () {\n var counter = 0;\n var stylesheet = null;\n return {\n add: function (style) {\n if (counter == 0) {\n if ((stylesheet = makeStyleTag())) {\n injectStyles(stylesheet, style);\n insertStyleTag(stylesheet);\n }\n }\n counter++;\n },\n remove: function () {\n counter--;\n if (!counter && stylesheet) {\n stylesheet.parentNode && stylesheet.parentNode.removeChild(stylesheet);\n stylesheet = null;\n }\n },\n };\n};\n","import * as React from 'react';\nimport { stylesheetSingleton } from './singleton';\n/**\n * creates a hook to control style singleton\n * @see {@link styleSingleton} for a safer component version\n * @example\n * ```tsx\n * const useStyle = styleHookSingleton();\n * ///\n * useStyle('body { overflow: hidden}');\n */\nexport var styleHookSingleton = function () {\n var sheet = stylesheetSingleton();\n return function (styles, isDynamic) {\n React.useEffect(function () {\n sheet.add(styles);\n return function () {\n sheet.remove();\n };\n }, [styles && isDynamic]);\n };\n};\n","import { styleHookSingleton } from './hook';\n/**\n * create a Component to add styles on demand\n * - styles are added when first instance is mounted\n * - styles are removed when the last instance is unmounted\n * - changing styles in runtime does nothing unless dynamic is set. But with multiple components that can lead to the undefined behavior\n */\nexport var styleSingleton = function () {\n var useStyle = styleHookSingleton();\n var Sheet = function (_a) {\n var styles = _a.styles, dynamic = _a.dynamic;\n useStyle(styles, dynamic);\n return null;\n };\n return Sheet;\n};\n","export var zeroGap = {\n left: 0,\n top: 0,\n right: 0,\n gap: 0,\n};\nvar parse = function (x) { return parseInt(x || '', 10) || 0; };\nvar getOffset = function (gapMode) {\n var cs = window.getComputedStyle(document.body);\n var left = cs[gapMode === 'padding' ? 'paddingLeft' : 'marginLeft'];\n var top = cs[gapMode === 'padding' ? 'paddingTop' : 'marginTop'];\n var right = cs[gapMode === 'padding' ? 'paddingRight' : 'marginRight'];\n return [parse(left), parse(top), parse(right)];\n};\nexport var getGapWidth = function (gapMode) {\n if (gapMode === void 0) { gapMode = 'margin'; }\n if (typeof window === 'undefined') {\n return zeroGap;\n }\n var offsets = getOffset(gapMode);\n var documentWidth = document.documentElement.clientWidth;\n var windowWidth = window.innerWidth;\n return {\n left: offsets[0],\n top: offsets[1],\n right: offsets[2],\n gap: Math.max(0, windowWidth - documentWidth + offsets[2] - offsets[0]),\n };\n};\n","import * as React from 'react';\nimport { styleSingleton } from 'react-style-singleton';\nimport { fullWidthClassName, zeroRightClassName, noScrollbarsClassName, removedBarSizeVariable } from './constants';\nimport { getGapWidth } from './utils';\nvar Style = styleSingleton();\nexport var lockAttribute = 'data-scroll-locked';\n// important tip - once we measure scrollBar width and remove them\n// we could not repeat this operation\n// thus we are using style-singleton - only the first \"yet correct\" style will be applied.\nvar getStyles = function (_a, allowRelative, gapMode, important) {\n var left = _a.left, top = _a.top, right = _a.right, gap = _a.gap;\n if (gapMode === void 0) { gapMode = 'margin'; }\n return \"\\n .\".concat(noScrollbarsClassName, \" {\\n overflow: hidden \").concat(important, \";\\n padding-right: \").concat(gap, \"px \").concat(important, \";\\n }\\n body[\").concat(lockAttribute, \"] {\\n overflow: hidden \").concat(important, \";\\n overscroll-behavior: contain;\\n \").concat([\n allowRelative && \"position: relative \".concat(important, \";\"),\n gapMode === 'margin' &&\n \"\\n padding-left: \".concat(left, \"px;\\n padding-top: \").concat(top, \"px;\\n padding-right: \").concat(right, \"px;\\n margin-left:0;\\n margin-top:0;\\n margin-right: \").concat(gap, \"px \").concat(important, \";\\n \"),\n gapMode === 'padding' && \"padding-right: \".concat(gap, \"px \").concat(important, \";\"),\n ]\n .filter(Boolean)\n .join(''), \"\\n }\\n \\n .\").concat(zeroRightClassName, \" {\\n right: \").concat(gap, \"px \").concat(important, \";\\n }\\n \\n .\").concat(fullWidthClassName, \" {\\n margin-right: \").concat(gap, \"px \").concat(important, \";\\n }\\n \\n .\").concat(zeroRightClassName, \" .\").concat(zeroRightClassName, \" {\\n right: 0 \").concat(important, \";\\n }\\n \\n .\").concat(fullWidthClassName, \" .\").concat(fullWidthClassName, \" {\\n margin-right: 0 \").concat(important, \";\\n }\\n \\n body[\").concat(lockAttribute, \"] {\\n \").concat(removedBarSizeVariable, \": \").concat(gap, \"px;\\n }\\n\");\n};\nvar getCurrentUseCounter = function () {\n var counter = parseInt(document.body.getAttribute(lockAttribute) || '0', 10);\n return isFinite(counter) ? counter : 0;\n};\nexport var useLockAttribute = function () {\n React.useEffect(function () {\n document.body.setAttribute(lockAttribute, (getCurrentUseCounter() + 1).toString());\n return function () {\n var newCounter = getCurrentUseCounter() - 1;\n if (newCounter <= 0) {\n document.body.removeAttribute(lockAttribute);\n }\n else {\n document.body.setAttribute(lockAttribute, newCounter.toString());\n }\n };\n }, []);\n};\n/**\n * Removes page scrollbar and blocks page scroll when mounted\n */\nexport var RemoveScrollBar = function (_a) {\n var noRelative = _a.noRelative, noImportant = _a.noImportant, _b = _a.gapMode, gapMode = _b === void 0 ? 'margin' : _b;\n useLockAttribute();\n /*\n gap will be measured on every component mount\n however it will be used only by the \"first\" invocation\n due to singleton nature of <Style\n */\n var gap = React.useMemo(function () { return getGapWidth(gapMode); }, [gapMode]);\n return React.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? '!important' : '') });\n};\n","var passiveSupported = false;\nif (typeof window !== 'undefined') {\n try {\n var options = Object.defineProperty({}, 'passive', {\n get: function () {\n passiveSupported = true;\n return true;\n },\n });\n // @ts-ignore\n window.addEventListener('test', options, options);\n // @ts-ignore\n window.removeEventListener('test', options, options);\n }\n catch (err) {\n passiveSupported = false;\n }\n}\nexport var nonPassive = passiveSupported ? { passive: false } : false;\n","var alwaysContainsScroll = function (node) {\n // textarea will always _contain_ scroll inside self. It only can be hidden\n return node.tagName === 'TEXTAREA';\n};\nvar elementCanBeScrolled = function (node, overflow) {\n if (!(node instanceof Element)) {\n return false;\n }\n var styles = window.getComputedStyle(node);\n return (\n // not-not-scrollable\n styles[overflow] !== 'hidden' &&\n // contains scroll inside self\n !(styles.overflowY === styles.overflowX && !alwaysContainsScroll(node) && styles[overflow] === 'visible'));\n};\nvar elementCouldBeVScrolled = function (node) { return elementCanBeScrolled(node, 'overflowY'); };\nvar elementCouldBeHScrolled = function (node) { return elementCanBeScrolled(node, 'overflowX'); };\nexport var locationCouldBeScrolled = function (axis, node) {\n var ownerDocument = node.ownerDocument;\n var current = node;\n do {\n // Skip over shadow root\n if (typeof ShadowRoot !== 'undefined' && current instanceof ShadowRoot) {\n current = current.host;\n }\n var isScrollable = elementCouldBeScrolled(axis, current);\n if (isScrollable) {\n var _a = getScrollVariables(axis, current), scrollHeight = _a[1], clientHeight = _a[2];\n if (scrollHeight > clientHeight) {\n return true;\n }\n }\n current = current.parentNode;\n } while (current && current !== ownerDocument.body);\n return false;\n};\nvar getVScrollVariables = function (_a) {\n var scrollTop = _a.scrollTop, scrollHeight = _a.scrollHeight, clientHeight = _a.clientHeight;\n return [\n scrollTop,\n scrollHeight,\n clientHeight,\n ];\n};\nvar getHScrollVariables = function (_a) {\n var scrollLeft = _a.scrollLeft, scrollWidth = _a.scrollWidth, clientWidth = _a.clientWidth;\n return [\n scrollLeft,\n scrollWidth,\n clientWidth,\n ];\n};\nvar elementCouldBeScrolled = function (axis, node) {\n return axis === 'v' ? elementCouldBeVScrolled(node) : elementCouldBeHScrolled(node);\n};\nvar getScrollVariables = function (axis, node) {\n return axis === 'v' ? getVScrollVariables(node) : getHScrollVariables(node);\n};\nvar getDirectionFactor = function (axis, direction) {\n /**\n * If the element's direction is rtl (right-to-left), then scrollLeft is 0 when the scrollbar is at its rightmost position,\n * and then increasingly negative as you scroll towards the end of the content.\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollLeft\n */\n return axis === 'h' && direction === 'rtl' ? -1 : 1;\n};\nexport var handleScroll = function (axis, endTarget, event, sourceDelta, noOverscroll) {\n var directionFactor = getDirectionFactor(axis, window.getComputedStyle(endTarget).direction);\n var delta = directionFactor * sourceDelta;\n // find scrollable target\n var target = event.target;\n var targetInLock = endTarget.contains(target);\n var shouldCancelScroll = false;\n var isDeltaPositive = delta > 0;\n var availableScroll = 0;\n var availableScrollTop = 0;\n do {\n if (!target) {\n break;\n }\n var _a = getScrollVariables(axis, target), position = _a[0], scroll_1 = _a[1], capacity = _a[2];\n var elementScroll = scroll_1 - capacity - directionFactor * position;\n if (position || elementScroll) {\n if (elementCouldBeScrolled(axis, target)) {\n availableScroll += elementScroll;\n availableScrollTop += position;\n }\n }\n var parent_1 = target.parentNode;\n // we will \"bubble\" from ShadowDom in case we are, or just to the parent in normal case\n // this is the same logic used in focus-lock\n target = (parent_1 && parent_1.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? parent_1.host : parent_1);\n } while (\n // portaled content\n (!targetInLock && target !== document.body) ||\n // self content\n (targetInLock && (endTarget.contains(target) || endTarget === target)));\n // handle epsilon around 0 (non standard zoom levels)\n if (isDeltaPositive &&\n ((noOverscroll && Math.abs(availableScroll) < 1) || (!noOverscroll && delta > availableScroll))) {\n shouldCancelScroll = true;\n }\n else if (!isDeltaPositive &&\n ((noOverscroll && Math.abs(availableScrollTop) < 1) || (!noOverscroll && -delta > availableScrollTop))) {\n shouldCancelScroll = true;\n }\n return shouldCancelScroll;\n};\n","import { __spreadArray } from \"tslib\";\nimport * as React from 'react';\nimport { RemoveScrollBar } from 'react-remove-scroll-bar';\nimport { styleSingleton } from 'react-style-singleton';\nimport { nonPassive } from './aggresiveCapture';\nimport { handleScroll, locationCouldBeScrolled } from './handleScroll';\nexport var getTouchXY = function (event) {\n return 'changedTouches' in event ? [event.changedTouches[0].clientX, event.changedTouches[0].clientY] : [0, 0];\n};\nexport var getDeltaXY = function (event) { return [event.deltaX, event.deltaY]; };\nvar extractRef = function (ref) {\n return ref && 'current' in ref ? ref.current : ref;\n};\nvar deltaCompare = function (x, y) { return x[0] === y[0] && x[1] === y[1]; };\nvar generateStyle = function (id) { return \"\\n .block-interactivity-\".concat(id, \" {pointer-events: none;}\\n .allow-interactivity-\").concat(id, \" {pointer-events: all;}\\n\"); };\nvar idCounter = 0;\nvar lockStack = [];\nexport function RemoveScrollSideCar(props) {\n var shouldPreventQueue = React.useRef([]);\n var touchStartRef = React.useRef([0, 0]);\n var activeAxis = React.useRef();\n var id = React.useState(idCounter++)[0];\n var Style = React.useState(styleSingleton)[0];\n var lastProps = React.useRef(props);\n React.useEffect(function () {\n lastProps.current = props;\n }, [props]);\n React.useEffect(function () {\n if (props.inert) {\n document.body.classList.add(\"block-interactivity-\".concat(id));\n var allow_1 = __spreadArray([props.lockRef.current], (props.shards || []).map(extractRef), true).filter(Boolean);\n allow_1.forEach(function (el) { return el.classList.add(\"allow-interactivity-\".concat(id)); });\n return function () {\n document.body.classList.remove(\"block-interactivity-\".concat(id));\n allow_1.forEach(function (el) { return el.classList.remove(\"allow-interactivity-\".concat(id)); });\n };\n }\n return;\n }, [props.inert, props.lockRef.current, props.shards]);\n var shouldCancelEvent = React.useCallback(function (event, parent) {\n if (('touches' in event && event.touches.length === 2) || (event.type === 'wheel' && event.ctrlKey)) {\n return !lastProps.current.allowPinchZoom;\n }\n var touch = getTouchXY(event);\n var touchStart = touchStartRef.current;\n var deltaX = 'deltaX' in event ? event.deltaX : touchStart[0] - touch[0];\n var deltaY = 'deltaY' in event ? event.deltaY : touchStart[1] - touch[1];\n var currentAxis;\n var target = event.target;\n var moveDirection = Math.abs(deltaX) > Math.abs(deltaY) ? 'h' : 'v';\n // allow horizontal touch move on Range inputs. They will not cause any scroll\n if ('touches' in event && moveDirection === 'h' && target.type === 'range') {\n return false;\n }\n // allow drag selection (iOS); check if selection's anchorNode is the same as target or contains target\n var selection = window.getSelection();\n var anchorNode = selection && selection.anchorNode;\n var isTouchingSelection = anchorNode ? anchorNode === target || anchorNode.contains(target) : false;\n if (isTouchingSelection) {\n return false;\n }\n var canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);\n if (!canBeScrolledInMainDirection) {\n return true;\n }\n if (canBeScrolledInMainDirection) {\n currentAxis = moveDirection;\n }\n else {\n currentAxis = moveDirection === 'v' ? 'h' : 'v';\n canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);\n // other axis might be not scrollable\n }\n if (!canBeScrolledInMainDirection) {\n return false;\n }\n if (!activeAxis.current && 'changedTouches' in event && (deltaX || deltaY)) {\n activeAxis.current = currentAxis;\n }\n if (!currentAxis) {\n return true;\n }\n var cancelingAxis = activeAxis.current || currentAxis;\n return handleScroll(cancelingAxis, parent, event, cancelingAxis === 'h' ? deltaX : deltaY, true);\n }, []);\n var shouldPrevent = React.useCallback(function (_event) {\n var event = _event;\n if (!lockStack.length || lockStack[lockStack.length - 1] !== Style) {\n // not the last active\n return;\n }\n var delta = 'deltaY' in event ? getDeltaXY(event) : getTouchXY(event);\n var sourceEvent = shouldPreventQueue.current.filter(function (e) { return e.name === event.type && (e.target === event.target || event.target === e.shadowParent) && deltaCompare(e.delta, delta); })[0];\n // self event, and should be canceled\n if (sourceEvent && sourceEvent.should) {\n if (event.cancelable) {\n event.preventDefault();\n }\n return;\n }\n // outside or shard event\n if (!sourceEvent) {\n var shardNodes = (lastProps.current.shards || [])\n .map(extractRef)\n .filter(Boolean)\n .filter(function (node) { return node.contains(event.target); });\n var shouldStop = shardNodes.length > 0 ? shouldCancelEvent(event, shardNodes[0]) : !lastProps.current.noIsolation;\n if (shouldStop) {\n if (event.cancelable) {\n event.preventDefault();\n }\n }\n }\n }, []);\n var shouldCancel = React.useCallback(function (name, delta, target, should) {\n var event = { name: name, delta: delta, target: target, should: should, shadowParent: getOutermostShadowParent(target) };\n shouldPreventQueue.current.push(event);\n setTimeout(function () {\n shouldPreventQueue.current = shouldPreventQueue.current.filter(function (e) { return e !== event; });\n }, 1);\n }, []);\n var scrollTouchStart = React.useCallback(function (event) {\n touchStartRef.current = getTouchXY(event);\n activeAxis.current = undefined;\n }, []);\n var scrollWheel = React.useCallback(function (event) {\n shouldCancel(event.type, getDeltaXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));\n }, []);\n var scrollTouchMove = React.useCallback(function (event) {\n shouldCancel(event.type, getTouchXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));\n }, []);\n React.useEffect(function () {\n lockStack.push(Style);\n props.setCallbacks({\n onScrollCapture: scrollWheel,\n onWheelCapture: scrollWheel,\n onTouchMoveCapture: scrollTouchMove,\n });\n document.addEventListener('wheel', shouldPrevent, nonPassive);\n document.addEventListener('touchmove', shouldPrevent, nonPassive);\n document.addEventListener('touchstart', scrollTouchStart, nonPassive);\n return function () {\n lockStack = lockStack.filter(function (inst) { return inst !== Style; });\n document.removeEventListener('wheel', shouldPrevent, nonPassive);\n document.removeEventListener('touchmove', shouldPrevent, nonPassive);\n document.removeEventListener('touchstart', scrollTouchStart, nonPassive);\n };\n }, []);\n var removeScrollBar = props.removeScrollBar, inert = props.inert;\n return (React.createElement(React.Fragment, null,\n inert ? React.createElement(Style, { styles: generateStyle(id) }) : null,\n removeScrollBar ? React.createElement(RemoveScrollBar, { noRelative: props.noRelative, gapMode: props.gapMode }) : null));\n}\nfunction getOutermostShadowParent(node) {\n var shadowParent = null;\n while (node !== null) {\n if (node instanceof ShadowRoot) {\n shadowParent = node.host;\n node = node.host;\n }\n node = node.parentNode;\n }\n return shadowParent;\n}\n","import { exportSidecar } from 'use-sidecar';\nimport { RemoveScrollSideCar } from './SideEffect';\nimport { effectCar } from './medium';\nexport default exportSidecar(effectCar, RemoveScrollSideCar);\n","import { __assign } from \"tslib\";\nimport * as React from 'react';\nimport { RemoveScroll } from './UI';\nimport SideCar from './sidecar';\nvar ReactRemoveScroll = React.forwardRef(function (props, ref) { return (React.createElement(RemoveScroll, __assign({}, props, { ref: ref, sideCar: SideCar }))); });\nReactRemoveScroll.classNames = RemoveScroll.classNames;\nexport default ReactRemoveScroll;\n","var getDefaultParent = function (originalTarget) {\n if (typeof document === 'undefined') {\n return null;\n }\n var sampleTarget = Array.isArray(originalTarget) ? originalTarget[0] : originalTarget;\n return sampleTarget.ownerDocument.body;\n};\nvar counterMap = new WeakMap();\nvar uncontrolledNodes = new WeakMap();\nvar markerMap = {};\nvar lockCount = 0;\nvar unwrapHost = function (node) {\n return node && (node.host || unwrapHost(node.parentNode));\n};\nvar correctTargets = function (parent, targets) {\n return targets\n .map(function (target) {\n if (parent.contains(target)) {\n return target;\n }\n var correctedTarget = unwrapHost(target);\n if (correctedTarget && parent.contains(correctedTarget)) {\n return correctedTarget;\n }\n console.error('aria-hidden', target, 'in not contained inside', parent, '. Doing nothing');\n return null;\n })\n .filter(function (x) { return Boolean(x); });\n};\n/**\n * Marks everything except given node(or nodes) as aria-hidden\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @param {String} [controlAttribute] - html Attribute to control\n * @return {Undo} undo command\n */\nvar applyAttributeToOthers = function (originalTarget, parentNode, markerName, controlAttribute) {\n var targets = correctTargets(parentNode, Array.isArray(originalTarget) ? originalTarget : [originalTarget]);\n if (!markerMap[markerName]) {\n markerMap[markerName] = new WeakMap();\n }\n var markerCounter = markerMap[markerName];\n var hiddenNodes = [];\n var elementsToKeep = new Set();\n var elementsToStop = new Set(targets);\n var keep = function (el) {\n if (!el || elementsToKeep.has(el)) {\n return;\n }\n elementsToKeep.add(el);\n keep(el.parentNode);\n };\n targets.forEach(keep);\n var deep = function (parent) {\n if (!parent || elementsToStop.has(parent)) {\n return;\n }\n Array.prototype.forEach.call(parent.children, function (node) {\n if (elementsToKeep.has(node)) {\n deep(node);\n }\n else {\n try {\n var attr = node.getAttribute(controlAttribute);\n var alreadyHidden = attr !== null && attr !== 'false';\n var counterValue = (counterMap.get(node) || 0) + 1;\n var markerValue = (markerCounter.get(node) || 0) + 1;\n counterMap.set(node, counterValue);\n markerCounter.set(node, markerValue);\n hiddenNodes.push(node);\n if (counterValue === 1 && alreadyHidden) {\n uncontrolledNodes.set(node, true);\n }\n if (markerValue === 1) {\n node.setAttribute(markerName, 'true');\n }\n if (!alreadyHidden) {\n node.setAttribute(controlAttribute, 'true');\n }\n }\n catch (e) {\n console.error('aria-hidden: cannot operate on ', node, e);\n }\n }\n });\n };\n deep(parentNode);\n elementsToKeep.clear();\n lockCount++;\n return function () {\n hiddenNodes.forEach(function (node) {\n var counterValue = counterMap.get(node) - 1;\n var markerValue = markerCounter.get(node) - 1;\n counterMap.set(node, counterValue);\n markerCounter.set(node, markerValue);\n if (!counterValue) {\n if (!uncontrolledNodes.has(node)) {\n node.removeAttribute(controlAttribute);\n }\n uncontrolledNodes.delete(node);\n }\n if (!markerValue) {\n node.removeAttribute(markerName);\n }\n });\n lockCount--;\n if (!lockCount) {\n // clear\n counterMap = new WeakMap();\n counterMap = new WeakMap();\n uncontrolledNodes = new WeakMap();\n markerMap = {};\n }\n };\n};\n/**\n * Marks everything except given node(or nodes) as aria-hidden\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @return {Undo} undo command\n */\nexport var hideOthers = function (originalTarget, parentNode, markerName) {\n if (markerName === void 0) { markerName = 'data-aria-hidden'; }\n var targets = Array.from(Array.isArray(originalTarget) ? originalTarget : [originalTarget]);\n var activeParentNode = parentNode || getDefaultParent(originalTarget);\n if (!activeParentNode) {\n return function () { return null; };\n }\n // we should not hide aria-live elements - https://github.com/theKashey/aria-hidden/issues/10\n // and script elements, as they have no impact on accessibility.\n targets.push.apply(targets, Array.from(activeParentNode.querySelectorAll('[aria-live], script')));\n return applyAttributeToOthers(targets, activeParentNode, markerName, 'aria-hidden');\n};\n/**\n * Marks everything except given node(or nodes) as inert\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @return {Undo} undo command\n */\nexport var inertOthers = function (originalTarget, parentNode, markerName) {\n if (markerName === void 0) { markerName = 'data-inert-ed'; }\n var activeParentNode = parentNode || getDefaultParent(originalTarget);\n if (!activeParentNode) {\n return function () { return null; };\n }\n return applyAttributeToOthers(originalTarget, activeParentNode, markerName, 'inert');\n};\n/**\n * @returns if current browser supports inert\n */\nexport var supportsInert = function () {\n return typeof HTMLElement !== 'undefined' && HTMLElement.prototype.hasOwnProperty('inert');\n};\n/**\n * Automatic function to \"suppress\" DOM elements - _hide_ or _inert_ in the best possible way\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @return {Undo} undo command\n */\nexport var suppressOthers = function (originalTarget, parentNode, markerName) {\n if (markerName === void 0) { markerName = 'data-suppressed'; }\n return (supportsInert() ? inertOthers : hideOthers)(originalTarget, parentNode, markerName);\n};\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","\"use client\";\n\n// src/dialog.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContext, createContextScope } from \"@radix-ui/react-context\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { DismissableLayer } from \"@radix-ui/react-dismissable-layer\";\nimport { FocusScope } from \"@radix-ui/react-focus-scope\";\nimport { Portal as PortalPrimitive } from \"@radix-ui/react-portal\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useFocusGuards } from \"@radix-ui/react-focus-guards\";\nimport { RemoveScroll } from \"react-remove-scroll\";\nimport { hideOthers } from \"aria-hidden\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\nvar DIALOG_NAME = \"Dialog\";\nvar [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);\nvar [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);\nvar Dialog = (props) => {\n const {\n __scopeDialog,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = true\n } = props;\n const triggerRef = React.useRef(null);\n const contentRef = React.useRef(null);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: DIALOG_NAME\n });\n return /* @__PURE__ */ jsx(\n DialogProvider,\n {\n scope: __scopeDialog,\n triggerRef,\n contentRef,\n contentId: useId(),\n titleId: useId(),\n descriptionId: useId(),\n open,\n onOpenChange: setOpen,\n onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),\n modal,\n children\n }\n );\n};\nDialog.displayName = DIALOG_NAME;\nvar TRIGGER_NAME = \"DialogTrigger\";\nvar DialogTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...triggerProps } = props;\n const context = useDialogContext(TRIGGER_NAME, __scopeDialog);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": context.open,\n \"aria-controls\": context.contentId,\n \"data-state\": getState(context.open),\n ...triggerProps,\n ref: composedTriggerRef,\n onClick: composeEventHandlers(props.onClick, context.onOpenToggle)\n }\n );\n }\n);\nDialogTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"DialogPortal\";\nvar [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME, {\n forceMount: void 0\n});\nvar DialogPortal = (props) => {\n const { __scopeDialog, forceMount, children, container } = props;\n const context = useDialogContext(PORTAL_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopeDialog, forceMount, children: React.Children.map(children, (child) => /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, container, children: child }) })) });\n};\nDialogPortal.displayName = PORTAL_NAME;\nvar OVERLAY_NAME = \"DialogOverlay\";\nvar DialogOverlay = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog);\n const { forceMount = portalContext.forceMount, ...overlayProps } = props;\n const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog);\n return context.modal ? /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(DialogOverlayImpl, { ...overlayProps, ref: forwardedRef }) }) : null;\n }\n);\nDialogOverlay.displayName = OVERLAY_NAME;\nvar Slot = createSlot(\"DialogOverlay.RemoveScroll\");\nvar DialogOverlayImpl = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...overlayProps } = props;\n const context = useDialogContext(OVERLAY_NAME, __scopeDialog);\n return (\n // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`\n // ie. when `Overlay` and `Content` are siblings\n /* @__PURE__ */ jsx(RemoveScroll, { as: Slot, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-state\": getState(context.open),\n ...overlayProps,\n ref: forwardedRef,\n style: { pointerEvents: \"auto\", ...overlayProps.style }\n }\n ) })\n );\n }\n);\nvar CONTENT_NAME = \"DialogContent\";\nvar DialogContent = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopeDialog);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsx(DialogContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(DialogContentNonModal, { ...contentProps, ref: forwardedRef }) });\n }\n);\nDialogContent.displayName = CONTENT_NAME;\nvar DialogContentModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);\n React.useEffect(() => {\n const content = contentRef.current;\n if (content) return hideOthers(content);\n }, []);\n return /* @__PURE__ */ jsx(\n DialogContentImpl,\n {\n ...props,\n ref: composedRefs,\n trapFocus: context.open,\n disableOutsidePointerEvents: true,\n onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {\n event.preventDefault();\n context.triggerRef.current?.focus();\n }),\n onPointerDownOutside: composeEventHandlers(props.onPointerDownOutside, (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n if (isRightClick) event.preventDefault();\n }),\n onFocusOutside: composeEventHandlers(\n props.onFocusOutside,\n (event) => event.preventDefault()\n )\n }\n );\n }\n);\nvar DialogContentNonModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n const hasInteractedOutsideRef = React.useRef(false);\n const hasPointerDownOutsideRef = React.useRef(false);\n return /* @__PURE__ */ jsx(\n DialogContentImpl,\n {\n ...props,\n ref: forwardedRef,\n trapFocus: false,\n disableOutsidePointerEvents: false,\n onCloseAutoFocus: (event) => {\n props.onCloseAutoFocus?.(event);\n if (!event.defaultPrevented) {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n event.preventDefault();\n }\n hasInteractedOutsideRef.current = false;\n hasPointerDownOutsideRef.current = false;\n },\n onInteractOutside: (event) => {\n props.onInteractOutside?.(event);\n if (!event.defaultPrevented) {\n hasInteractedOutsideRef.current = true;\n if (event.detail.originalEvent.type === \"pointerdown\") {\n hasPointerDownOutsideRef.current = true;\n }\n }\n const target = event.target;\n const targetIsTrigger = context.triggerRef.current?.contains(target);\n if (targetIsTrigger) event.preventDefault();\n if (event.detail.originalEvent.type === \"focusin\" && hasPointerDownOutsideRef.current) {\n event.preventDefault();\n }\n }\n }\n );\n }\n);\nvar DialogContentImpl = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props;\n const context = useDialogContext(CONTENT_NAME, __scopeDialog);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n useFocusGuards();\n return /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(\n FocusScope,\n {\n asChild: true,\n loop: true,\n trapped: trapFocus,\n onMountAutoFocus: onOpenAutoFocus,\n onUnmountAutoFocus: onCloseAutoFocus,\n children: /* @__PURE__ */ jsx(\n DismissableLayer,\n {\n role: \"dialog\",\n id: context.contentId,\n \"aria-describedby\": context.descriptionId,\n \"aria-labelledby\": context.titleId,\n \"data-state\": getState(context.open),\n ...contentProps,\n ref: composedRefs,\n onDismiss: () => context.onOpenChange(false)\n }\n )\n }\n ),\n /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(TitleWarning, { titleId: context.titleId }),\n /* @__PURE__ */ jsx(DescriptionWarning, { contentRef, descriptionId: context.descriptionId })\n ] })\n ] });\n }\n);\nvar TITLE_NAME = \"DialogTitle\";\nvar DialogTitle = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...titleProps } = props;\n const context = useDialogContext(TITLE_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(Primitive.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });\n }\n);\nDialogTitle.displayName = TITLE_NAME;\nvar DESCRIPTION_NAME = \"DialogDescription\";\nvar DialogDescription = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...descriptionProps } = props;\n const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(Primitive.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });\n }\n);\nDialogDescription.displayName = DESCRIPTION_NAME;\nvar CLOSE_NAME = \"DialogClose\";\nvar DialogClose = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...closeProps } = props;\n const context = useDialogContext(CLOSE_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n ...closeProps,\n ref: forwardedRef,\n onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))\n }\n );\n }\n);\nDialogClose.displayName = CLOSE_NAME;\nfunction getState(open) {\n return open ? \"open\" : \"closed\";\n}\nvar TITLE_WARNING_NAME = \"DialogTitleWarning\";\nvar [WarningProvider, useWarningContext] = createContext(TITLE_WARNING_NAME, {\n contentName: CONTENT_NAME,\n titleName: TITLE_NAME,\n docsSlug: \"dialog\"\n});\nvar TitleWarning = ({ titleId }) => {\n const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);\n const MESSAGE = `\\`${titleWarningContext.contentName}\\` requires a \\`${titleWarningContext.titleName}\\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \\`${titleWarningContext.titleName}\\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;\n React.useEffect(() => {\n if (titleId) {\n const hasTitle = document.getElementById(titleId);\n if (!hasTitle) console.error(MESSAGE);\n }\n }, [MESSAGE, titleId]);\n return null;\n};\nvar DESCRIPTION_WARNING_NAME = \"DialogDescriptionWarning\";\nvar DescriptionWarning = ({ contentRef, descriptionId }) => {\n const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);\n const MESSAGE = `Warning: Missing \\`Description\\` or \\`aria-describedby={undefined}\\` for {${descriptionWarningContext.contentName}}.`;\n React.useEffect(() => {\n const describedById = contentRef.current?.getAttribute(\"aria-describedby\");\n if (descriptionId && describedById) {\n const hasDescription = document.getElementById(descriptionId);\n if (!hasDescription) console.warn(MESSAGE);\n }\n }, [MESSAGE, contentRef, descriptionId]);\n return null;\n};\nvar Root = Dialog;\nvar Trigger = DialogTrigger;\nvar Portal = DialogPortal;\nvar Overlay = DialogOverlay;\nvar Content = DialogContent;\nvar Title = DialogTitle;\nvar Description = DialogDescription;\nvar Close = DialogClose;\nexport {\n Close,\n Content,\n Description,\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n Overlay,\n Portal,\n Root,\n Title,\n Trigger,\n WarningProvider,\n createDialogScope\n};\n//# sourceMappingURL=index.mjs.map\n","/**\n * @license lucide-react v0.536.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.536.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.536.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.536.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.536.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: \"M18 6 6 18\", key: \"1bl5f8\" }],\n [\"path\", { d: \"m6 6 12 12\", key: \"d8bk6v\" }]\n];\nconst X = createLucideIcon(\"x\", __iconNode);\n\nexport { __iconNode, X as default };\n//# sourceMappingURL=x.js.map\n","import * as React from \"react\";\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport { XIcon } from \"lucide-react\";\nimport { cn } from \"../../lib/utils\";\n\nfunction Dialog({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Root>) {\n return <DialogPrimitive.Root data-slot=\"dialog\" {...props} />;\n}\n\nfunction DialogTrigger({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Trigger>) {\n return <DialogPrimitive.Trigger data-slot=\"dialog-trigger\" {...props} />;\n}\n\nfunction DialogPortal({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Portal>) {\n return <DialogPrimitive.Portal data-slot=\"dialog-portal\" {...props} />;\n}\n\nfunction DialogClose({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Close>) {\n return <DialogPrimitive.Close data-slot=\"dialog-close\" {...props} />;\n}\n\nfunction DialogOverlay({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Overlay>) {\n return (\n <DialogPrimitive.Overlay\n data-slot=\"dialog-overlay\"\n className={cn(\n \"fixed inset-0 z-50 bg-[var(--overlay-bg)] data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0\",\n className\n )}\n {...props}\n />\n );\n}\n\nfunction DialogContent({\n className,\n children,\n showCloseButton = true,\n container,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Content> & {\n showCloseButton?: boolean;\n /** Mount portal inside this element so dialog inherits theme (data-theme) */\n container?: HTMLElement | null;\n}) {\n return (\n <DialogPortal data-slot=\"dialog-portal\" container={container ?? undefined}>\n <DialogOverlay />\n <DialogPrimitive.Content\n data-slot=\"dialog-content\"\n className={cn(\n \"fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border border-[var(--neutral-200)] bg-[var(--neutral-50)] p-4 shadow-lg duration-200 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:max-w-lg\",\n className,\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close\n data-slot=\"dialog-close\"\n className=\"absolute top-4 right-4 cursor-pointer rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-[var(--primary-200)] focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-[var(--primary-100)] data-[state=open]:text-[var(--primary-700)] [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\"\n >\n <XIcon />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Content>\n </DialogPortal>\n );\n}\n\nfunction DialogHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"dialog-header\"\n className={cn(\"flex flex-col gap-2 text-center sm:text-left\", className)}\n {...props}\n />\n );\n}\n\nfunction DialogFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"dialog-footer\"\n className={cn(\n \"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction DialogTitle({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Title>) {\n return (\n <DialogPrimitive.Title\n data-slot=\"dialog-title\"\n className={cn(\"text-lg leading-none font-semibold text-[var(--neutral-900)]\", className)}\n {...props}\n />\n );\n}\n\nfunction DialogDescription({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Description>) {\n return (\n <DialogPrimitive.Description\n data-slot=\"dialog-description\"\n className={cn(\"text-sm text-[var(--neutral-500)]\", className)}\n {...props}\n />\n );\n}\n\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n};\n","import type { ValidationErrorItem } from \"../utils/validation\";\nimport { Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, DialogFooter } from \"./ui/dialog\";\nimport { Button } from \"./ui/button\";\n\nexport interface ValidationDialogProps {\n open: boolean;\n onOpenChange: (open: boolean) => void;\n missingQuestionIds: string[];\n errors?: ValidationErrorItem[];\n onOk: () => void;\n /** Mount dialog inside this element to inherit theme */\n container?: HTMLElement | null;\n}\n\nexport function ValidationDialog({\n open,\n onOpenChange,\n missingQuestionIds,\n errors = [],\n onOk,\n container,\n}: ValidationDialogProps) {\n void missingQuestionIds;\n void errors;\n\n return (\n <Dialog open={open} onOpenChange={onOpenChange}>\n <DialogContent showCloseButton container={container} className=\"max-w-md border-[var(--neutral-200)] bg-[var(--neutral-50)]\">\n <DialogHeader>\n <DialogTitle id=\"validation-dialog-title\">\n Survey Incomplete\n </DialogTitle>\n </DialogHeader>\n <DialogDescription>\n Please fill all the required questions before submitting the survey.\n <br />\n Click OK to see which questions are still pending.\n </DialogDescription>\n <DialogFooter>\n <div className=\"flex w-full gap-3\">\n <Button onClick={onOk} text=\"OK\" className=\"flex-1\" />\n </div>\n </DialogFooter>\n </DialogContent>\n </Dialog>\n );\n}\n","/**\n * Progress calculation for survey completion.\n * Progress = (answered + valid mandatory) / (total mandatory) * 100.\n * If no mandatory questions, returns 100%.\n * Uses shared response helpers from responseHelpers.ts.\n */\n\nimport type { SurveyQuestion } from \"../types/survey.types\";\nimport { isQuestionAnswered, isQuestionValid } from \"./responseHelpers\";\n\nexport interface ProgressMetrics {\n overallProgress: number;\n totalQuestions: number;\n visibleQuestions: number;\n answeredQuestions: number;\n validQuestions: number;\n mandatoryQuestions: number;\n answeredMandatory: number;\n}\n\n/**\n * Calculate survey progress based on mandatory questions only.\n */\nexport function calculateWeightedProgress(\n questions: SurveyQuestion[],\n responses: Record<string, unknown>,\n visibleQuestionIds: string[]\n): ProgressMetrics {\n const visibleQuestions = questions.filter((q) =>\n visibleQuestionIds.includes(q.questionId)\n );\n const mandatoryQuestions = visibleQuestions.filter((q) => q.isMandatory);\n\n let answeredCount = 0;\n let validCount = 0;\n let answeredMandatory = 0;\n\n for (const q of visibleQuestions) {\n const value = responses[q.questionId];\n const answered = isQuestionAnswered(q, value);\n const valid = isQuestionValid(q, value);\n if (answered) answeredCount++;\n if (valid) validCount++;\n if (q.isMandatory && answered && valid) answeredMandatory++;\n }\n\n const overallProgress =\n mandatoryQuestions.length === 0\n ? 100\n : Math.round(\n (answeredMandatory / mandatoryQuestions.length) * 100\n );\n\n return {\n overallProgress: Math.min(100, Math.max(0, overallProgress)),\n totalQuestions: questions.length,\n visibleQuestions: visibleQuestions.length,\n answeredQuestions: answeredCount,\n validQuestions: validCount,\n mandatoryQuestions: mandatoryQuestions.length,\n answeredMandatory,\n };\n}\n","import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, DialogFooter } from \"./ui/dialog\";\nimport { Button } from \"./ui/button\";\n\nexport interface ExitConfirmationDialogProps {\n open: boolean;\n onOpenChange: (open: boolean) => void;\n onConfirm: () => void;\n onCancel: () => void;\n readOnly?: boolean;\n /** Mount dialog inside this element to inherit theme */\n container?: HTMLElement | null;\n}\n\nexport function ExitConfirmationDialog({\n open,\n onOpenChange,\n onConfirm,\n onCancel,\n readOnly = false,\n container,\n}: ExitConfirmationDialogProps) {\n return (\n <Dialog open={open} onOpenChange={onOpenChange}>\n <DialogContent showCloseButton container={container} className=\"max-w-md border-[var(--neutral-200)] bg-[var(--neutral-50)]\">\n <DialogHeader>\n <DialogTitle id=\"exit-dialog-title\">Exit Survey?</DialogTitle>\n </DialogHeader>\n <DialogDescription>\n {readOnly\n ? \"Are you sure you want to exit the survey?\"\n : \"Are you sure you want to exit? Your progress will be lost.\"}\n </DialogDescription>\n <DialogFooter className=\"flex gap-2 p-4\">\n <Button variant=\"outline\" onClick={onCancel} className=\"flex-1\">\n Cancel\n \n </Button>\n <Button type=\"button\" variant=\"default\" onClick={onConfirm} className=\"flex-1\">\n Yes, Exit\n \n </Button>\n </DialogFooter>\n </DialogContent>\n </Dialog>\n );\n}\n","export interface SubmissionLoadingOverlayProps {\n show: boolean;\n}\n\nexport function SubmissionLoadingOverlay({ show }: SubmissionLoadingOverlayProps) {\n if (!show) return null;\n\n return (\n <div\n className=\"fixed inset-0 z-[100] flex items-center justify-center bg-black/40\"\n role=\"status\"\n aria-live=\"polite\"\n aria-busy=\"true\"\n >\n <div className=\"flex flex-col items-center gap-4 rounded-lg bg-[var(--color-card)] p-6 shadow-xl border border-[var(--color-border)]\">\n <div\n className=\"h-10 w-10 animate-spin rounded-full border-2 border-primary border-t-transparent\"\n aria-hidden\n />\n <p className=\"text-sm font-medium text-textBlack\">Submitting...</p>\n </div>\n </div>\n );\n}\n","import { useState, useCallback, useEffect, useMemo, useRef } from \"react\";\nimport type { SurveyConfig, SurveySubmitPayload } from \"../types/survey.types\";\nimport { getInitialValue } from \"../types/survey.types\";\nimport {\n calculateVisibility,\n clearHiddenResponses,\n} from \"../utils/conditionalLogic\";\nimport { validateResponses } from \"../utils/validation\";\nimport { formatResponses } from \"../utils/responseFormatter\";\nimport { getEffectiveMediaConfig } from \"../utils/fileUtils\";\nimport { getQuestionStatusMap } from \"../utils/questionStatus\";\nimport { QuestionRenderer } from \"./QuestionRenderer\";\nimport { QuestionListCarousel } from \"./QuestionListCarousel\";\nimport { QuestionOverviewPanel } from \"./QuestionOverviewPanel\";\nimport { Button } from \"./ui/button\";\nimport { SurveyProgressBar } from \"./SurveyProgressBar\";\nimport { ValidationDialog } from \"./ValidationDialog\";\nimport { calculateWeightedProgress } from \"../utils/progressCalculation\";\nimport { ExitConfirmationDialog } from \"./ExitConfirmationDialog\";\nimport { SubmissionLoadingOverlay } from \"./SubmissionLoadingOverlay\";\n\nexport interface SurveyProgressBarConfig {\n /** \"position\" = progress by step index. \"completion\" = by answered mandatory (FMB logic). Default: \"completion\" */\n progressMode?: \"position\" | \"completion\";\n /** Show \"Question X of Y\" label. Default: true */\n showLabel?: boolean;\n /** Show percentage. Default: true */\n showPercentage?: boolean;\n /** Custom label format. Use {current} and {total} placeholders. Default: \"Question {current} of {total}\" */\n labelFormat?: string;\n /** Max width of the progress bar + percentage (e.g. \"240px\"). Default: \"240px\" */\n progressMaxWidth?: string;\n /** \"default\" = Radix Progress. \"gradient\" = FMB-style gradient bar. Default: \"gradient\" */\n variant?: \"default\" | \"gradient\";\n /** Additional class name for the progress bar container. */\n className?: string;\n}\n\nexport interface SurveyContainerProps {\n data: SurveyConfig;\n onSubmit: (payload: SurveySubmitPayload) => void;\n onSave?: (payload: SurveySubmitPayload) => void;\n onExit?: () => void;\n isSubmitting?: boolean;\n className?: string;\n showHeader?: boolean;\n /** Theme name (e.g. \"blue\", \"dark\"). Set by the consuming app via props. */\n theme?: string;\n /** Progress bar configuration. Omit to use defaults. Pass false to hide. */\n progressBar?: SurveyProgressBarConfig | false;\n}\n\ntype ResponsesState = Record<string, unknown>;\n\nexport function SurveyContainer({\n data,\n onSubmit,\n onSave,\n onExit,\n isSubmitting = false,\n className = \"\",\n showHeader = true,\n theme,\n progressBar = {},\n}: SurveyContainerProps) {\n const questions = data.questionList;\n const [responses, setResponses] = useState<ResponsesState>(() => {\n const initial: ResponsesState = {};\n questions.forEach((q) => {\n initial[q.questionId] = getInitialValue(q);\n });\n return initial;\n });\n\n const [visibleQuestions, setVisibleQuestions] = useState<string[]>(() => {\n const { visibleQuestions: vis } = calculateVisibility(questions, {}, []);\n return vis;\n });\n\n const [currentIndex, setCurrentIndex] = useState(0);\n const [overviewOpen, setOverviewOpen] = useState(false);\n const [validationOpen, setValidationOpen] = useState(false);\n const [exitOpen, setExitOpen] = useState(false);\n const [validationErrors, setValidationErrors] = useState<\n Array<{ questionId: string; message: string }>\n >([]);\n\n const mediaConfig = useMemo(\n () => getEffectiveMediaConfig(data.config),\n [data.config],\n );\n const questionStatusMap = useMemo(\n () => {\n const base = getQuestionStatusMap(questions, responses, visibleQuestions);\n if (validationErrors.length === 0) return base;\n const withErrors = { ...base };\n validationErrors.forEach((e) => {\n withErrors[e.questionId] = \"error\";\n });\n return withErrors;\n },\n [questions, responses, visibleQuestions, validationErrors],\n );\n\n const progressMetrics = useMemo(\n () => calculateWeightedProgress(questions, responses, visibleQuestions),\n [questions, responses, visibleQuestions],\n );\n\n const responsesForVisibility = useMemo(() => {\n const out: Record<string, { value: unknown }> = {};\n Object.entries(responses).forEach(([id, value]) => {\n out[id] = { value };\n });\n return out;\n }, [responses]);\n\n useEffect(() => {\n const { visibleQuestions: nextVisible, newlyHidden } = calculateVisibility(\n questions,\n responsesForVisibility,\n visibleQuestions,\n );\n const visibleChanged =\n nextVisible.length !== visibleQuestions.length ||\n nextVisible.some((id, i) => id !== visibleQuestions[i]);\n if (!visibleChanged && newlyHidden.length === 0) return;\n\n setVisibleQuestions(nextVisible);\n setCurrentIndex((prev) =>\n Math.min(prev, Math.max(0, nextVisible.length - 1)),\n );\n if (newlyHidden.length > 0) {\n setResponses((prev) => {\n const asMap = Object.fromEntries(\n Object.entries(prev).map(([k, v]) => [k, { value: v }]),\n );\n const cleared = clearHiddenResponses(asMap, newlyHidden);\n return Object.fromEntries(\n Object.entries(cleared).map(([k, v]) => [k, v.value]),\n );\n });\n }\n }, [responsesForVisibility, questions, visibleQuestions]);\n\n const currentQuestionId = visibleQuestions[currentIndex];\n const currentQuestion = questions.find(\n (q) => q.questionId === currentQuestionId,\n );\n const totalVisible = visibleQuestions.length;\n\n const handleResponseChange = useCallback(\n (value: unknown) => {\n if (!currentQuestionId) return;\n setResponses((prev) => ({ ...prev, [currentQuestionId]: value }));\n // Clear validation error for this question when user updates the answer\n setValidationErrors((prev) =>\n prev.filter((e) => e.questionId !== currentQuestionId)\n );\n },\n [currentQuestionId],\n );\n\n const handleNext = useCallback(() => {\n if (currentIndex < totalVisible - 1) setCurrentIndex((i) => i + 1);\n }, [currentIndex, totalVisible]);\n\n const handlePrevious = useCallback(() => {\n if (currentIndex > 0) setCurrentIndex((i) => i - 1);\n }, [currentIndex]);\n\n const handleGoToQuestion = useCallback(\n (index: number) => {\n if (index >= 0 && index < totalVisible) {\n setCurrentIndex(index);\n setOverviewOpen(false);\n }\n },\n [totalVisible],\n );\n\n const handleCarouselSelect = useCallback(\n (questionId: string) => {\n const idx = visibleQuestions.indexOf(questionId);\n if (idx >= 0) handleGoToQuestion(idx);\n },\n [visibleQuestions, handleGoToQuestion],\n );\n\n const handleSubmit = useCallback(() => {\n const errors = validateResponses(questions, responses, visibleQuestions);\n if (errors.length > 0) {\n setValidationErrors(errors);\n setValidationOpen(true);\n return;\n }\n const payload = formatResponses(data, responses, visibleQuestions);\n onSubmit(payload);\n }, [data, questions, responses, visibleQuestions, onSubmit]);\n\n const handleValidationOk = useCallback(() => {\n setValidationOpen(false);\n setOverviewOpen(true);\n }, []);\n\n const handleExitClick = useCallback(() => {\n setExitOpen(true);\n }, []);\n\n const handleExitConfirm = useCallback(() => {\n setExitOpen(false);\n const payload = formatResponses(data, responses, visibleQuestions);\n onSave?.(payload);\n onExit?.();\n }, [data, responses, visibleQuestions, onSave, onExit]);\n\n const isLast = currentIndex === totalVisible - 1;\n const themeWrapperRef = useRef<HTMLDivElement | null>(null);\n\n const wrapperProps = theme ? { \"data-theme\": theme, ref: themeWrapperRef } : {};\n\n if (!currentQuestion) {\n return (\n <div {...wrapperProps} className=\"flex min-h-screen items-center justify-center\">\n <p className=\"text-[var(--color-textGray)]\">Loading survey...</p>\n </div>\n );\n }\n\n return (\n <div\n {...wrapperProps}\n className={`min-h-screen rounded-lg shadow-sm bg-[var(--primary-foreground)] ${className}`}\n >\n {showHeader && (\n <header className=\"sticky top-0 z-40 border-b bg-[var(--header-bg,var(--primary-50))] border-[var(--header-border,var(--primary-200))]\">\n <div className=\"\">\n <div className=\"flex items-center justify-between px-4 py-3\">\n <h2 className=\"text-xl font-medium text-[var(--header-title,var(--primary-700))]\">{data.surveyName}</h2>\n <div className=\"flex items-center gap-4\">\n {onExit && (\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"icon\"\n onClick={handleExitClick}\n className=\"text-[var(--color-textGray)] hover:bg-[var(--neutral-100)] hover:text-[var(--color-textBlack)]\"\n title=\"Exit Survey\"\n aria-label=\"Exit survey\"\n >\n ✕\n </Button>\n )}\n </div>\n </div>\n </div>\n </header>\n )}\n\n {/* Question list carousel + progress bar */}\n <div className=\"space-y-3 bg-[var(--primary-foreground)] px-4 py-3 shadow-sm\">\n <QuestionListCarousel\n questions={visibleQuestions}\n activeQuestionId={currentQuestionId}\n onQuestionSelect={handleCarouselSelect}\n questionStatusMap={questionStatusMap}\n />\n {progressBar !== false && (\n <SurveyProgressBar\n currentIndex={currentIndex}\n totalSteps={totalVisible}\n progressMode={progressBar.progressMode ?? \"completion\"}\n progressValue={progressMetrics.overallProgress}\n showLabel={progressBar.showLabel}\n showPercentage={progressBar.showPercentage}\n labelFormat={progressBar.labelFormat}\n progressMaxWidth={progressBar.progressMaxWidth}\n className={progressBar.className}\n />\n )}\n </div>\n\n {/* Question Container */}\n <main\n className=\"flex flex-col\"\n style={{\n minHeight: showHeader ? \"calc(100vh - 130px)\" : \"calc(100vh - 70px)\",\n }}\n >\n <div className=\"flex min-h-0 flex-1 flex-col overflow-hidden p-4\">\n <div className=\"relative flex-1 overflow-hidden min-h-0\">\n <div className=\"absolute inset-0 overflow-y-auto\">\n <div\n key={currentQuestionId}\n className=\"animate-question-enter rounded-xl bg-[var(--color-card)] p-6 shadow-sm border border-[var(--color-border)]\"\n >\n <div className=\"mb-3\">\n <span className=\"rounded-full bg-[var(--primary-100)] px-3 py-1 text-md font-medium text-[var(--primary-600)]\">\n {currentQuestion.questionId}\n </span>\n </div>\n <h2 className=\"text-lg leading-relaxed font-medium text-[var(--color-textBlack)]\">\n {currentQuestion.description}\n {currentQuestion.isMandatory && (\n <span className=\"ml-1 text-error\">*</span>\n )}\n </h2>\n {currentQuestion.questionImage?.trim() ? (\n <div className=\"mt-4\">\n <img\n src={currentQuestion.questionImage}\n alt=\"\"\n loading=\"lazy\"\n className=\"max-w-full h-auto rounded-lg border border-[var(--neutral-200)] object-contain\"\n style={{ maxHeight: \"min(60vh, 400px)\" }}\n />\n </div>\n ) : null}\n {currentQuestion.textLimitCharacter != null && (\n <p className=\"mt-2 text-xs text-[var(--color-textGray)]\">\n Maximum {currentQuestion.textLimitCharacter} characters\n </p>\n )}\n {currentQuestion.textInputType === \"Numeric\" && (\n <p className=\"mt-2 text-xs text-[var(--color-textGray)]\">\n Please enter numeric value only (e.g. 1, 2, 3)\n </p>\n )}\n <div className=\"mt-6 flex max-w-4xl flex-1 flex-col justify-center\">\n <QuestionRenderer\n question={currentQuestion}\n value={responses[currentQuestionId]}\n onChange={handleResponseChange}\n validationErrors={validationErrors}\n mediaConfig={mediaConfig}\n />\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <footer className=\"flex-shrink-0 p-4 border-t border-[var(--color-borderGray)]\">\n <div className=\"flex justify-center gap-3 md:justify-end\">\n <Button\n type=\"button\"\n variant=\"outline\"\n onClick={handlePrevious}\n disabled={currentIndex === 0}\n className=\"min-w-[140px] text-md font-semibold\"\n prefixIcon={\n <svg\n className=\"h-5 w-5 transition-transform duration-200 group-hover:-translate-x-1\"\n fill=\"none\"\n stroke=\"currentColor\"\n viewBox=\"0 0 24 24\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M15 19l-7-7 7-7\"\n />\n </svg>\n }\n >\n Previous\n </Button>\n {!isLast ? (\n <Button\n type=\"button\"\n onClick={handleNext}\n className=\"min-w-[140px] text-md font-semibold\"\n suffixIcon={\n <svg\n className={`h-5 w-5 transition-transform duration-200 group-hover:translate-x-1`}\n fill=\"none\"\n stroke=\"currentColor\"\n viewBox=\"0 0 24 24\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M9 5l7 7-7 7\"\n />\n </svg>\n }\n text=\"Next\"\n >\n </Button>\n ) : (\n <Button\n type=\"button\"\n onClick={handleSubmit}\n className=\"min-w-[140px] text-md font-semibold\"\n suffixIcon={\n <svg\n className=\"h-5 w-5\"\n fill=\"none\"\n stroke=\"currentColor\"\n viewBox=\"0 0 24 24\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z\"\n />\n </svg>\n }\n text=\"Submit\"\n >\n </Button>\n )}\n </div>\n </footer>\n </main>\n\n <QuestionOverviewPanel\n isOpen={overviewOpen}\n onClose={() => setOverviewOpen(false)}\n questions={questions}\n visibleQuestionIds={visibleQuestions}\n responses={responses}\n currentQuestionIndex={currentIndex}\n onGoToQuestion={handleGoToQuestion}\n />\n\n <ValidationDialog\n open={validationOpen}\n onOpenChange={setValidationOpen}\n missingQuestionIds={validationErrors.map((e) => e.questionId)}\n errors={validationErrors}\n onOk={handleValidationOk}\n container={themeWrapperRef.current}\n />\n\n <ExitConfirmationDialog\n open={exitOpen}\n onOpenChange={setExitOpen}\n onConfirm={handleExitConfirm}\n onCancel={() => setExitOpen(false)}\n container={themeWrapperRef.current}\n />\n\n <SubmissionLoadingOverlay show={isSubmitting} />\n </div>\n );\n}\n","import { useMemo, useRef, useCallback } from \"react\";\nimport type { SurveyConfig, SurveySubmitPayload } from \"../types/survey.types\";\nimport type { PLCSurveyConfig } from \"../converters/types\";\nimport { detectSurveyFormat } from \"../converters/detectFormat\";\nimport { convertPLCToFMB } from \"../converters/plcToFmbInput\";\nimport { convertFMBToPLC } from \"../converters/fmbToPlcOutput\";\nimport { SurveyContainer } from \"./SurveyContainer\";\nimport type { SurveyProgressBarConfig } from \"./SurveyContainer\";\n\n/** Survey input: FMB (internal format) or PLC (converted to FMB at runtime). */\nexport type SurveyInputData = SurveyConfig | PLCSurveyConfig;\n\n/** Payload passed to onSubmit/onSave: FMB or PLC depending on input data type. */\nexport type SurveySubmitPayloadUnion = SurveySubmitPayload | import(\"../converters/types\").PLCSubmitPayload;\n\nexport interface SurveyRendererProps {\n /** Survey config in FMB or PLC format. PLC is auto-converted to FMB internally. */\n data: SurveyInputData;\n /** Called with submit payload in same format as input (FMB or PLC). */\n onSubmit: (payload: SurveySubmitPayloadUnion) => void;\n /** Called with draft payload in same format as input (FMB or PLC). */\n onSave?: (payload: SurveySubmitPayloadUnion) => void;\n onExit?: () => void;\n isSubmitting?: boolean;\n className?: string;\n showHeader?: boolean;\n /** Theme name (e.g. \"blue\", \"dark\"). Provided via props by the consuming app. */\n theme?: string;\n /** Progress bar config. Omit for defaults. Pass false to hide. */\n progressBar?: SurveyProgressBarConfig | false;\n}\n\n/**\n * Main entry component. Renders a full survey from JSON config.\n * Supports FMB and PLC formats; PLC is converted to FMB internally. Output format matches input.\n */\nexport function SurveyRenderer({\n data,\n onSubmit,\n onSave,\n onExit,\n isSubmitting = false,\n className = \"\",\n showHeader = true,\n theme,\n progressBar,\n}: SurveyRendererProps) {\n const format = useMemo(() => detectSurveyFormat(data), [data]);\n const fmbData = useMemo((): SurveyConfig => {\n if (format === \"PLC\") {\n return convertPLCToFMB(data as PLCSurveyConfig);\n }\n return data as SurveyConfig;\n }, [data, format]);\n\n const originalPlcRef = useRef<PLCSurveyConfig | null>(null);\n if (format === \"PLC\") {\n originalPlcRef.current = data as PLCSurveyConfig;\n } else {\n originalPlcRef.current = null;\n }\n\n const handleSubmit = useCallback(\n (payload: SurveySubmitPayload) => {\n if (format === \"PLC\" && originalPlcRef.current) {\n onSubmit(convertFMBToPLC(payload, originalPlcRef.current));\n } else {\n onSubmit(payload);\n }\n },\n [format, onSubmit]\n );\n\n const handleSave = useCallback(\n (payload: SurveySubmitPayload) => {\n if (!onSave) return;\n if (format === \"PLC\" && originalPlcRef.current) {\n onSave(convertFMBToPLC(payload, originalPlcRef.current));\n } else {\n onSave(payload);\n }\n },\n [format, onSave]\n );\n\n return (\n <SurveyContainer\n data={fmbData}\n onSubmit={handleSubmit}\n onSave={handleSave}\n onExit={onExit}\n isSubmitting={isSubmitting}\n className={className}\n showHeader={showHeader}\n theme={theme}\n progressBar={progressBar}\n />\n );\n}\n"],"names":["f","require$$0","k","l","m","n","p","q","c","a","g","b","d","e","h","reactJsxRuntime_production_min","React","REACT_ELEMENT_TYPE","REACT_PORTAL_TYPE","REACT_FRAGMENT_TYPE","REACT_STRICT_MODE_TYPE","REACT_PROFILER_TYPE","REACT_PROVIDER_TYPE","REACT_CONTEXT_TYPE","REACT_FORWARD_REF_TYPE","REACT_SUSPENSE_TYPE","REACT_SUSPENSE_LIST_TYPE","REACT_MEMO_TYPE","REACT_LAZY_TYPE","REACT_OFFSCREEN_TYPE","MAYBE_ITERATOR_SYMBOL","FAUX_ITERATOR_SYMBOL","getIteratorFn","maybeIterable","maybeIterator","ReactSharedInternals","error","format","_len2","args","_key2","printWarning","level","ReactDebugCurrentFrame","stack","argsWithFormat","item","enableScopeAPI","enableCacheElement","enableTransitionTracing","enableLegacyHidden","enableDebugTracing","REACT_MODULE_REFERENCE","isValidElementType","type","getWrappedName","outerType","innerType","wrapperName","displayName","functionName","getContextName","getComponentNameFromType","context","provider","outerName","lazyComponent","payload","init","assign","disabledDepth","prevLog","prevInfo","prevWarn","prevError","prevGroup","prevGroupCollapsed","prevGroupEnd","disabledLog","disableLogs","props","reenableLogs","ReactCurrentDispatcher","prefix","describeBuiltInComponentFrame","name","source","ownerFn","x","match","reentry","componentFrameCache","PossiblyWeakMap","describeNativeComponentFrame","fn","construct","frame","control","previousPrepareStackTrace","previousDispatcher","Fake","sample","sampleLines","controlLines","s","_frame","syntheticFrame","describeFunctionComponentFrame","shouldConstruct","Component","prototype","describeUnknownElementTypeFrameInDEV","hasOwnProperty","loggedTypeFailures","setCurrentlyValidatingElement","element","owner","checkPropTypes","typeSpecs","values","location","componentName","has","typeSpecName","error$1","err","ex","isArrayImpl","isArray","typeName","value","hasToStringTag","willCoercionThrow","testStringCoercion","checkKeyStringCoercion","ReactCurrentOwner","RESERVED_PROPS","specialPropKeyWarningShown","specialPropRefWarningShown","hasValidRef","config","getter","hasValidKey","warnIfStringRefCannotBeAutoConverted","self","defineKeyPropWarningGetter","warnAboutAccessingKey","defineRefPropWarningGetter","warnAboutAccessingRef","ReactElement","key","ref","jsxDEV","maybeKey","propName","defaultProps","ReactCurrentOwner$1","ReactDebugCurrentFrame$1","setCurrentlyValidatingElement$1","propTypesMisspellWarningShown","isValidElement","object","getDeclarationErrorAddendum","getSourceInfoErrorAddendum","ownerHasKeyUseWarning","getCurrentComponentErrorInfo","parentType","info","parentName","validateExplicitKey","currentComponentErrorInfo","childOwner","validateChildKeys","node","i","child","iteratorFn","iterator","step","validatePropTypes","propTypes","_name","validateFragmentProps","fragment","keys","didWarnAboutKeySpread","jsxWithValidation","isStaticChildren","validType","sourceInfo","typeString","children","beforeExample","afterExample","jsxWithValidationStatic","jsxWithValidationDynamic","jsx","jsxs","reactJsxRuntime_development","jsxRuntimeModule","require$$1","isPLCSurvey","data","isFMBSurvey","detectSurveyFormat","list","first","isPLCData","isFMBData","PLC_TO_FMB_TYPE","convertPLCQuestionToFMB","plcQuestion","surveyId","questionId","convertPLCToFMB","plcData","questionList","buildQuestionByNumberMap","plcSurvey","map","buildQuestionIdToNumberMap","indexToOptionLetter","index","selectedTextToOptionLetters","userAnswer","options","selectedTexts","letters","text","opt","convertFMBToPLC","fmbPayload","originalPlcSurvey","questionIdToNumber","questionByNumber","responses","question_number","textAnswer","selected_answer","r","SUPPORTED_QUESTION_TYPES","isSupportedQuestionType","getDefaultValue","question","out","_a","getInitialValue","ua","rows","record","row","getQuestionId","evaluateCondition","responseValue","conditionValue","calculateVisibility","questions","previouslyVisible","allIds","visibleSet","childIds","ids","id","parentResponse","childQuestionIds","childId","addDescendantsRecursive","visibleArray","hiddenArray","prevSet","newlyVisible","newlyHidden","parentId","parent","clearHiddenResponses","hiddenQuestionIds","hidden","isEmpty","obj","v","validateTextLimit","limit","validateNumericInput","validateMinMax","min","max","validateResponses","visibleQuestionIds","questionMap","errors","limitErr","numErr","rangeErr","canSubmit","formatDateToYYYYMMDD","y","day","formatQuestionAnswer","formatResponses","responsesArray","DEFAULT_MEDIA_ALLOWED_TYPES","DEFAULT_MEDIA_MAX_SIZE_MB","isValueFileObject","MEDIA_ALLOWED_TYPES","MEDIA_MAX_SIZE_MB","MEDIA_QUESTION_TYPES","getEffectiveMediaConfig","dataConfig","allowedTypes","maxSizeBytes","entry","types","sizeMB","maxMB","validateFileType","file","questionType","mediaConfig","allowed","t","validateFileSize","maxBytes","validateFile","typeResult","fileToFileObject","resolve","reject","reader","result","base64","validateInputType","inputType","isQuestionAnswered","tableValue","expectedRows","isQuestionValid","fieldValue","getQuestionStatus","readOnly","answered","valid","getQuestionStatusMap","MCQSelect","selectionMode","selectedOptions","onOptionSelect","className","disabled","handleOptionClick","optionId","currentSelections","isOptionSelected","option","isSelected","clsx","concatArrays","array1","array2","combinedArray","createClassValidatorObject","classGroupId","validator","createClassPartObject","nextPart","validators","CLASS_PART_SEPARATOR","EMPTY_CONFLICTS","ARBITRARY_PROPERTY_PREFIX","createClassGroupUtils","classMap","createClassMap","conflictingClassGroups","conflictingClassGroupModifiers","getGroupIdForArbitraryProperty","classParts","startIndex","getGroupRecursive","hasPostfixModifier","modifierConflicts","baseConflicts","classPartObject","currentClassPart","nextClassPartObject","classRest","validatorsLength","validatorObj","content","colonIndex","property","theme","classGroups","processClassGroups","group","processClassesRecursively","classGroup","len","classDefinition","processClassDefinition","processStringDefinition","processFunctionDefinition","processObjectDefinition","classPartObjectToEdit","getPart","isThemeGetter","entries","path","current","parts","part","next","func","createLruCache","maxCacheSize","cacheSize","cache","previousCache","update","IMPORTANT_MODIFIER","MODIFIER_SEPARATOR","EMPTY_MODIFIERS","createResultObject","modifiers","hasImportantModifier","baseClassName","maybePostfixModifierPosition","isExternal","createParseClassName","experimentalParseClassName","parseClassName","bracketDepth","parenDepth","modifierStart","postfixModifierPosition","currentCharacter","baseClassNameWithImportantModifier","fullPrefix","parseClassNameOriginal","createSortModifiers","modifierWeights","mod","currentSegment","modifier","isArbitrary","isOrderSensitive","createConfigUtils","SPLIT_CLASSES_REGEX","mergeClassList","classList","configUtils","getClassGroupId","getConflictingClassGroupIds","sortModifiers","classGroupsInConflict","classNames","originalClassName","variantModifier","modifierId","classId","conflictGroups","twJoin","classLists","argument","resolvedValue","string","toValue","mix","createTailwindMerge","createConfigFirst","createConfigRest","cacheGet","cacheSet","functionToCall","initTailwindMerge","previousConfig","createConfigCurrent","tailwindMerge","cachedResult","fallbackThemeArr","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","isArbitraryWeight","isLabelWeight","isArbitraryFamilyName","isLabelFamilyName","isArbitraryPosition","isLabelPosition","isArbitraryImage","isLabelImage","isArbitraryShadow","isLabelShadow","isArbitraryVariableLength","getIsArbitraryVariable","isArbitraryVariableFamilyName","isArbitraryVariablePosition","isArbitraryVariableSize","isArbitraryVariableImage","isArbitraryVariableShadow","isArbitraryVariableWeight","testLabel","testValue","shouldMatchNoLabel","label","twMerge","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","scaleSizingInline","scaleSizingBlock","scaleColor","scaleBgPosition","scaleBgRepeat","scaleBgSize","scaleGradientStopPosition","scaleRadius","scaleBorderWidth","scaleLineStyle","scaleBlendMode","scaleMaskImagePosition","scaleBlur","scaleRotate","scaleScale","scaleSkew","scaleTranslate","cn","inputs","Textarea","TextResponse","onChange","placeholder","minRows","maxRows","characterLimit","handleChange","count","isNearLimit","isAtLimit","Dropdown","required","isOpen","setIsOpen","useState","highlightedIndex","setHighlightedIndex","dropdownRef","useRef","selectedOption","displayValue","useEffect","handleClickOutside","handleKeyDown","enabled","handleToggle","o","handleSelect","baseInput","enIdx","isHighlighted","TabularInput","columns","inputConfig","onValueChange","getValue","rowId","baseClasses","renderInput","col","rowIndex","_b","formatDatePPP","MONTHS_FULL","WEEKDAYS","DatePicker","selectedDate","onDateSelect","minDate","maxDate","currentMonth","setCurrentMonth","containerRef","handleClick","handleDateSelect","date","handleMonthChange","monthValue","handleYearChange","yearValue","currentYear","startYear","endYear","years","_","isDateDisabled","firstDay","daysInMonth","leadingEmpty","display","month","year","QUESTION_TYPE_DISPLAY","MediaIcon","MediaUpload","isDragOver","setIsDragOver","errorMsg","setErrorMsg","inputRef","accept","allowedTypesForMessage","supportedMessage","processFile","handleDrop","remove","src","ErrorMessage","MediaResponse","_question","QuestionMapper","touched","getDropdownOptions","getMCQOptions","getTabularConfig","header","getTabularValue","rowValue","handleTabularChange","selected","fileValue","tabularConfig","QuestionRenderer","validationErrors","questionErrors","displayError","getStatusClass","status","getStatusColor","getStatusIconClass","QuestionListCarousel","activeQuestionId","onQuestionSelect","questionStatusMap","scrollRef","itemRefs","activeIndex","hasMultiple","el","handleLeft","useCallback","prevId","handleRight","nextId","isActive","statusClass","getStatusIcon","iconClass","QuestionOverviewPanel","onClose","currentQuestionIndex","onGoToQuestion","Fragment","isCurrent","setRef","composeRefs","refs","hasCleanup","cleanups","cleanup","useComposedRefs","use","isPromiseLike","isLazyComponent","createSlot","ownerName","SlotClone","createSlotClone","Slot2","forwardedRef","slotProps","childrenArray","slottable","isSlottable","newElement","newChildren","Slot","childrenRef","getElementRef","props2","mergeProps","SLOTTABLE_IDENTIFIER","childProps","overrideProps","slotPropValue","childPropValue","mayWarn","falsyToString","cx","buttonVariants","base","_config_compoundVariants","variants","defaultVariants","getVariantClassNames","variant","variantProp","defaultVariantProp","variantKey","propsWithoutUndefined","acc","param","getCompoundVariantClassNames","cvClass","cvClassName","compoundVariantOptions","getBgColorClass","color","getTextColorClass","Button","size","asChild","bgColor","textColor","prefixIcon","suffixIcon","Comp","customColorClasses","createContextScope","scopeName","createContextScopeDeps","defaultContexts","createContext3","rootComponentName","defaultContext","BaseContext","Provider","scope","Context","useContext2","consumerName","createScope","scopeContexts","contexts","composeContextScopes","scopes","baseScope","scopeHooks","createScope2","overrideScopes","nextScopes","nextScopes2","useScope","currentScope","NODES","Primitive","primitive","Node","primitiveProps","PROGRESS_NAME","DEFAULT_MAX","createProgressContext","ProgressProvider","useProgressContext","Progress","__scopeProgress","valueProp","maxProp","getValueLabel","defaultGetValueLabel","progressProps","isValidMaxNumber","getInvalidMaxError","isValidValueNumber","getInvalidValueError","valueLabel","getProgressState","INDICATOR_NAME","ProgressIndicator","indicatorProps","maxValue","propValue","Root","Indicator","ProgressPrimitive.Root","ProgressPrimitive.Indicator","defaultLabelFormat","SurveyProgressBar","currentIndex","totalSteps","progressMode","progressValue","showLabel","showPercentage","labelFormat","progressMaxWidth","progress","composeEventHandlers","originalEventHandler","ourEventHandler","checkForDefaultPrevented","event","createContext2","useLayoutEffect2","useReactId","useId","deterministicId","setId","useLayoutEffect","reactId","useInsertionEffect","useControllableState","prop","defaultProp","caller","uncontrolledProp","setUncontrolledProp","onChangeRef","useUncontrolledState","isControlled","isControlledRef","wasControlled","setValue","nextValue","value2","isFunction","prevValueRef","dispatchDiscreteCustomEvent","target","ReactDOM","useCallbackRef","callback","callbackRef","useEscapeKeydown","onEscapeKeyDownProp","ownerDocument","onEscapeKeyDown","DISMISSABLE_LAYER_NAME","CONTEXT_UPDATE","POINTER_DOWN_OUTSIDE","FOCUS_OUTSIDE","originalBodyPointerEvents","DismissableLayerContext","DismissableLayer","disableOutsidePointerEvents","onPointerDownOutside","onFocusOutside","onInteractOutside","onDismiss","layerProps","setNode","force","composedRefs","node2","layers","highestLayerWithOutsidePointerEventsDisabled","highestLayerWithOutsidePointerEventsDisabledIndex","isBodyPointerEventsDisabled","isPointerEventsEnabled","pointerDownOutside","usePointerDownOutside","isPointerDownOnBranch","branch","focusOutside","useFocusOutside","dispatchUpdate","handleUpdate","BRANCH_NAME","DismissableLayerBranch","handlePointerDownOutside","isPointerInsideReactTreeRef","handleClickRef","handlePointerDown","handleAndDispatchPointerDownOutsideEvent2","handleAndDispatchCustomEvent","eventDetail","timerId","handleFocusOutside","isFocusInsideReactTreeRef","handleFocus","handler","detail","discrete","AUTOFOCUS_ON_MOUNT","AUTOFOCUS_ON_UNMOUNT","EVENT_OPTIONS","FOCUS_SCOPE_NAME","FocusScope","loop","trapped","onMountAutoFocusProp","onUnmountAutoFocusProp","scopeProps","container","setContainer","onMountAutoFocus","onUnmountAutoFocus","lastFocusedElementRef","focusScope","handleFocusIn2","focus","handleFocusOut2","relatedTarget","handleMutations2","mutations","mutation","mutationObserver","focusScopesStack","previouslyFocusedElement","mountEvent","focusFirst","removeLinks","getTabbableCandidates","unmountEvent","isTabKey","focusedElement","container2","last","getTabbableEdges","candidates","select","candidate","findVisible","nodes","walker","isHiddenInput","elements","isHidden","upTo","isSelectableInput","createFocusScopesStack","activeFocusScope","arrayRemove","array","updatedArray","items","PORTAL_NAME","Portal","containerProp","portalProps","mounted","setMounted","useStateMachine","initialState","machine","state","Presence","present","presence","usePresence","React2","stylesRef","prevPresentRef","prevAnimationNameRef","send","currentAnimationName","getAnimationName","styles","wasPresent","prevAnimationName","timeoutId","ownerWindow","handleAnimationEnd","isCurrentAnimation","currentFillMode","handleAnimationStart","useFocusGuards","edgeGuards","createFocusGuard","__assign","__rest","__spreadArray","to","from","pack","ar","zeroRightClassName","fullWidthClassName","noScrollbarsClassName","removedBarSizeVariable","assignRef","initialValue","useIsomorphicLayoutEffect","currentValues","useMergeRefs","defaultValue","newValue","oldValue","prevRefs_1","nextRefs_1","current_1","ItoI","innerCreateMedium","defaults","middleware","buffer","assigned","medium","cb","cbs","pendingQueue","executeQueue","cycle","filter","createSidecarMedium","SideCar","sideCar","rest","Target","exportSidecar","exported","effectCar","nothing","RemoveScroll","parentRef","callbacks","setCallbacks","forwardProps","removeScrollBar","shards","noRelative","noIsolation","inert","allowPinchZoom","Container","gapMode","containerProps","getNonce","makeStyleTag","tag","nonce","injectStyles","css","insertStyleTag","head","stylesheetSingleton","counter","stylesheet","style","styleHookSingleton","sheet","isDynamic","styleSingleton","useStyle","Sheet","dynamic","zeroGap","parse","getOffset","cs","left","top","right","getGapWidth","offsets","documentWidth","windowWidth","Style","lockAttribute","getStyles","allowRelative","important","gap","getCurrentUseCounter","useLockAttribute","newCounter","RemoveScrollBar","noImportant","passiveSupported","nonPassive","alwaysContainsScroll","elementCanBeScrolled","overflow","elementCouldBeVScrolled","elementCouldBeHScrolled","locationCouldBeScrolled","axis","isScrollable","elementCouldBeScrolled","getScrollVariables","scrollHeight","clientHeight","getVScrollVariables","scrollTop","getHScrollVariables","scrollLeft","scrollWidth","clientWidth","getDirectionFactor","direction","handleScroll","endTarget","sourceDelta","noOverscroll","directionFactor","delta","targetInLock","shouldCancelScroll","isDeltaPositive","availableScroll","availableScrollTop","position","scroll_1","capacity","elementScroll","parent_1","getTouchXY","getDeltaXY","extractRef","deltaCompare","generateStyle","idCounter","lockStack","RemoveScrollSideCar","shouldPreventQueue","touchStartRef","activeAxis","lastProps","allow_1","shouldCancelEvent","touch","touchStart","deltaX","deltaY","currentAxis","moveDirection","selection","anchorNode","isTouchingSelection","canBeScrolledInMainDirection","cancelingAxis","shouldPrevent","_event","sourceEvent","shardNodes","shouldStop","shouldCancel","should","getOutermostShadowParent","scrollTouchStart","scrollWheel","scrollTouchMove","inst","shadowParent","ReactRemoveScroll","getDefaultParent","originalTarget","sampleTarget","counterMap","uncontrolledNodes","markerMap","lockCount","unwrapHost","correctTargets","targets","correctedTarget","applyAttributeToOthers","parentNode","markerName","controlAttribute","markerCounter","hiddenNodes","elementsToKeep","elementsToStop","keep","deep","attr","alreadyHidden","counterValue","markerValue","hideOthers","activeParentNode","DIALOG_NAME","createDialogContext","DialogProvider","useDialogContext","Dialog","__scopeDialog","openProp","defaultOpen","onOpenChange","modal","triggerRef","contentRef","open","setOpen","prevOpen","TRIGGER_NAME","DialogTrigger","triggerProps","composedTriggerRef","getState","PortalProvider","usePortalContext","DialogPortal","forceMount","PortalPrimitive","OVERLAY_NAME","DialogOverlay","portalContext","overlayProps","DialogOverlayImpl","CONTENT_NAME","DialogContent","contentProps","DialogContentModal","DialogContentNonModal","DialogContentImpl","originalEvent","ctrlLeftClick","hasInteractedOutsideRef","hasPointerDownOutsideRef","trapFocus","onOpenAutoFocus","onCloseAutoFocus","TitleWarning","DescriptionWarning","TITLE_NAME","DialogTitle","titleProps","DESCRIPTION_NAME","DialogDescription","descriptionProps","CLOSE_NAME","DialogClose","closeProps","TITLE_WARNING_NAME","WarningProvider","useWarningContext","createContext","titleId","titleWarningContext","MESSAGE","DESCRIPTION_WARNING_NAME","descriptionId","describedById","Overlay","Content","Title","Description","Close","toKebabCase","toCamelCase","p1","p2","toPascalCase","camelCase","mergeClasses","classes","hasA11yProp","defaultAttributes","Icon","forwardRef","strokeWidth","absoluteStrokeWidth","iconNode","createElement","attrs","createLucideIcon","iconName","X","DialogPrimitive.Root","DialogPrimitive.Portal","DialogPrimitive.Overlay","showCloseButton","DialogPrimitive.Content","DialogPrimitive.Close","XIcon","DialogHeader","DialogFooter","DialogPrimitive.Title","DialogPrimitive.Description","ValidationDialog","missingQuestionIds","onOk","calculateWeightedProgress","visibleQuestions","mandatoryQuestions","answeredCount","validCount","answeredMandatory","overallProgress","ExitConfirmationDialog","onConfirm","onCancel","SubmissionLoadingOverlay","show","SurveyContainer","onSubmit","onSave","onExit","isSubmitting","showHeader","progressBar","setResponses","initial","setVisibleQuestions","vis","setCurrentIndex","overviewOpen","setOverviewOpen","validationOpen","setValidationOpen","exitOpen","setExitOpen","setValidationErrors","useMemo","withErrors","progressMetrics","responsesForVisibility","nextVisible","prev","asMap","cleared","currentQuestionId","currentQuestion","totalVisible","handleResponseChange","handleNext","handlePrevious","handleGoToQuestion","handleCarouselSelect","idx","handleSubmit","handleValidationOk","handleExitClick","handleExitConfirm","isLast","themeWrapperRef","wrapperProps","SurveyRenderer","fmbData","originalPlcRef","handleSave"],"mappings":";;;;;;;;6CASa,IAAIA,EAAEC,EAAiBC,EAAE,OAAO,IAAI,eAAe,EAAEC,EAAE,OAAO,IAAI,gBAAgB,EAAEC,EAAE,OAAO,UAAU,eAAeC,EAAEL,EAAE,mDAAmD,kBAAkBM,EAAE,CAAC,IAAI,GAAG,IAAI,GAAG,OAAO,GAAG,SAAS,EAAE,E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