@swan-admin/swan-web-component 1.0.85 → 1.0.86

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":"index.mjs","sources":["../src/atoms/customInput/CustomInput.tsx","../src/components/onboarding/EmailStep.tsx","../src/components/onboarding/NameStep.tsx","../src/components/onboarding/GenderStep.tsx","../src/components/onboarding/HeightStep.tsx","../src/atoms/progressDots/ProgressDots.tsx","../src/components/onboarding/StepsWrapper.tsx","../src/components/onboarding/Onboarding.tsx","../src/utils/deviceFocalLengthJson/index.ts","../src/components/focalLength/FocalLengthWrapper.tsx","../src/components/focalLength/FocalLength.tsx","../src/components/educational/MuseSteps/MuseScreenRenderer.tsx","../src/components/educational/MuseSteps/index.tsx","../src/components/educational/MuseSteps/BodyScanAnimation.tsx","../src/components/educational/MuseSteps/FaceScanAnimation.tsx","../src/components/educational/MuseSteps/TypewritterScene.tsx","../src/customHooks/useMuseAnimation.ts","../src/components/educational/VolumeStep.tsx","../src/components/educational/SetupScreen.tsx","../src/components/educational/EducationalStepsWrapper.tsx","../src/components/educational/Educational.tsx"],"sourcesContent":["import * as React from \"react\";\n\n/** Lightweight classnames helper to avoid depending on ../../utils/utils */\nconst cn = (...classes: Array<string | false | null | undefined>) =>\n classes.filter(Boolean).join(\" \");\n\nexport interface CustomInputProps\n extends React.InputHTMLAttributes<HTMLInputElement> {\n className?: string;\n type?: string;\n resolvedConfig?: any;\n}\n\nconst CustomInput = React.forwardRef<HTMLInputElement, CustomInputProps>(\n ({ className, resolvedConfig, type, ...props }, ref) => (\n <>\n <input\n type={type}\n className={`${className ? className : ''} customInput ` + cn(\n \"flex w-full px-[.75rem] h-[40px] text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed backdrop-blur-sm bg-btn font-medium pl-[1rem] pr-[2.5rem] focus:ring-1 focus:outline-none transition-all duration-200\",\n \n )}\n autoCapitalize=\"off\"\n autoCorrect=\"off\"\n ref={ref}\n {...props}\n style={{\n background: resolvedConfig?.style?.input?.inputBackgroundColor || '#F9FAFC',\n color: resolvedConfig?.style?.input?.inputTextColor || '#000',\n fontSize: resolvedConfig?.style?.input?.inputFontSize || '16px',\n fontWeight: resolvedConfig?.style?.input?.inputFontWeight || '400',\n border: `1px solid ${resolvedConfig?.style?.input?.inputBorderColor || 'transparent'}`,\n fontFamily: resolvedConfig?.style?.base?.baseFontFamily || 'Inter, sans-serif',\n borderRadius: resolvedConfig?.style?.input?.inputBorderRadius || '4px',\n }}\n />\n <style>\n {`\n .customInput::placeholder {\n color: ${resolvedConfig?.style?.input?.inputPlaceholderColor || '#000'};\n font-weight: ${resolvedConfig?.style?.input?.inputFontWeight || '500'};\n opacity: 1;\n font-size: ${resolvedConfig?.style?.input?.inputFontSize || '14px'};\n }\n .customInput:focus-visible {\n box-shadow:0 0 0 2px white, 0 0 0 4px rgb(from currentColor r g b / 0.5);\n }\n \n `}\n </style>\n </>\n )\n );\n\n CustomInput.displayName = \"CustomInput\";\n\n export default CustomInput;\n","import CustomInput from \"../../atoms/customInput/CustomInput\";\nimport SpecificButton from \"../../atoms/specificButton/SpecificButton\";\nimport { LanguageContext } from \"../../utils/context/languageContext\";\nimport { LanguageKeys } from \"../../utils/languageKeys\";\nimport { handleErrorMessage, isValidEmail } from \"../../utils/utils\";\nimport { ArrowRight } from \"lucide-react\";\nimport React, { useContext } from \"react\";\n\ninterface EmailStepProps {\n\tonComplete: (value: any) => void;\n\tinitialValue?: any;\n\tresolvedConfig?: any;\n\tonStepComplete?: (value: any) => Promise<void> | void;\n}\n\nconst EmailStep = ({ onComplete, initialValue, resolvedConfig, onStepComplete }: EmailStepProps) => {\n\tconst [value, setValue] = React.useState(initialValue || \"\");\n\tconst [message, setMessage] = React.useState<string | undefined>(undefined);\n\tconst [loading, setLoading] = React.useState(false);\n\tconst { translate } = useContext(LanguageContext) || {};\n\tconst handleNext = async (e: React.FormEvent<HTMLFormElement>) => {\n\t\te.preventDefault();\n\t\tsetLoading(true);\n\t\ttry {\n\t\t\tif (!value.trim()) {\n\t\t\t\tsetMessage(translate?.(LanguageKeys.emailRequired));\n\t\t\t\treturn;\n\t\t\t} else if (!isValidEmail(value.trim())) {\n\t\t\t\tsetMessage(translate?.(LanguageKeys.validEmail));\n\t\t\t} else {\n\t\t\t\tawait onStepComplete?.(value);\n\t\t\t\tonComplete?.(value);\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tsetMessage(handleErrorMessage(error));\n\t\t} finally {\n\t\t\tsetLoading(false);\n\t\t}\n\t};\n\treturn (\n\t\t<div className=\"w-full max-w-md\">\n\t\t\t<form className=\"mt-[3.5rem]\" onSubmit={handleNext}>\n\t\t\t\t<div>\n\t\t\t\t\t<CustomInput\n\t\t\t\t\t\trequired\n\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\tid=\"name\"\n\t\t\t\t\t\tplaceholder={translate?.(LanguageKeys.enterEmail)}\n\t\t\t\t\t\tresolvedConfig={resolvedConfig}\n\t\t\t\t\t\tvalue={value}\n\t\t\t\t\t\tonChange={(e) => {\n\t\t\t\t\t\t\tsetMessage(undefined);\n\t\t\t\t\t\t\tsetValue(e.target.value);\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t\t{message && (\n\t\t\t\t\t\t<p\n\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\tcolor: resolvedConfig?.style?.input?.inputErrorColor || \"#000\",\n\t\t\t\t\t\t\t\tfontSize: resolvedConfig?.style?.input?.inputErrorFontSize || \"16px\",\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{message}\n\t\t\t\t\t\t</p>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t\t<div className=\"flex justify-end mt-[.5rem]\">\n\t\t\t\t\t<SpecificButton type=\"submit\" disabled={!value.trim() || loading} resolvedConfig={resolvedConfig} buttonText={translate?.(LanguageKeys.next)} postfixIcon={<ArrowRight size={14} />} />\n\t\t\t\t</div>\n\t\t\t</form>\n\t\t</div>\n\t);\n};\n\nexport default EmailStep;\n","import CustomInput from \"../../atoms/customInput/CustomInput\";\nimport SpecificButton from \"../../atoms/specificButton/SpecificButton\";\nimport { LanguageContext } from \"../../utils/context/languageContext\";\nimport { LanguageKeys } from \"../../utils/languageKeys\";\nimport { handleErrorMessage } from \"../../utils/utils\";\nimport { ArrowRight } from \"lucide-react\";\nimport React, { useContext } from \"react\";\n\ninterface NameStepProps {\n\tonComplete: (value: any) => void;\n\tinitialValue?: any;\n\tresolvedConfig?: any;\n\tonStepComplete?: (value: any) => Promise<void> | void;\n}\nconst NameStep = ({ onComplete, initialValue, resolvedConfig, onStepComplete }: NameStepProps) => {\n\tconst [value, setValue] = React.useState(initialValue || \"\");\n\tconst [message, setMessage] = React.useState<string | undefined>(undefined);\n\t const [loading, setLoading] = React.useState(false);\n\t const {translate} = useContext(LanguageContext)||{}\n\tconst handleNext = async (e: React.FormEvent<HTMLFormElement>) => {\n\t\te.preventDefault();\n\t\tsetLoading(true);\n\t\ttry {\n\t\t\tif (!value.trim()) {\n\t\t\t\tsetMessage(translate?.(LanguageKeys.nameRequired));\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\tawait onStepComplete?.(value);\n\t\t\t\tonComplete?.(value);\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tsetMessage(handleErrorMessage(error));\n\t\t}finally{\n\t\t\tsetLoading(false);\n\t\t}\n\t};\n\treturn (\n\t\t<div className=\"w-full max-w-md\">\n\t\t\t<form onSubmit={handleNext} className=\"mt-[3.5rem] mb-[.75rem]\">\n\t\t\t\t<div>\n\t\t\t\t\t<CustomInput\n\t\t\t\t\t\trequired\n\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\tid=\"name\"\n\t\t\t\t\t\tplaceholder={translate?.(LanguageKeys.enterName)}\n\t\t\t\t\t\tresolvedConfig={resolvedConfig}\n\t\t\t\t\t\tonChange={(e) => {\n\t\t\t\t\t\t\tsetValue(e.target.value);\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t\t{message && <p className=\"mt-[0.2rem] text-[16px]\"\n style={{\n color: resolvedConfig?.style?.input?.inputErrorColor || '#000',\n fontSize: resolvedConfig?.style?.input?.inputErrorFontSize || '16px',\n }}\n >{message}</p>}\n\t\t\t\t</div>\n\t\t\t\t<div className=\"flex justify-end mt-[.5rem]\">\n\t\t\t\t\t<SpecificButton disabled={!value.trim() || loading} resolvedConfig={resolvedConfig} buttonText={translate?.(LanguageKeys.next)} type=\"submit\" postfixIcon={<ArrowRight size={14} />} />\n\t\t\t\t</div>\n\t\t\t</form>\n\t\t</div>\n\t);\n};\n\nexport default NameStep;\n","import SpecificButton from \"../../atoms/specificButton/SpecificButton\";\nimport { GenderStepProps } from \"../../types/interfaces\";\nimport { LanguageContext } from \"../../utils/context/languageContext\";\nimport { GenderType } from \"../../utils/enums\";\nimport { LanguageKeys } from \"../../utils/languageKeys\";\nimport { handleErrorMessage } from \"../../utils/utils\";\nimport { ArrowRight } from \"lucide-react\";\nimport React, { useContext, useState } from \"react\";\n\nconst GenderStep = ({ onComplete, initialValue, resolvedConfig, onStepComplete }: GenderStepProps) => {\n\tconst [genderType, setGenderType] = useState<GenderType>(initialValue);\n\tconst [message, setMessage] = React.useState<string | undefined>(undefined);\n\tconst [loading, setLoading] = React.useState(false);\n\tconst { translate } = useContext(LanguageContext) || {};\n\n\tconst handleNext = async () => {\n\t\tsetLoading(true);\n\t\tsetMessage(undefined);\n\t\ttry {\n\t\t\tawait onStepComplete?.(genderType);\n\t\t\tonComplete?.(genderType);\n\t\t} catch (error) {\n\t\t\tconsole.log(error, \"gener\");\n\t\t\tsetMessage(handleErrorMessage(error));\n\t\t} finally {\n\t\t\tsetLoading(false);\n\t\t}\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<div className=\" w-full flex flex-col max-w-md mt-[3.5rem] mb-[.75rem] gap-[1rem]\">\n\t\t\t\t<button\n\t\t\t\t\tclassName={` text-btnSize bg-btn text-base cursor-pointer text-sm border leading-none rounded-[.375rem] focus-visible:ring-secondary p-[1rem] ${\n\t\t\t\t\t\tgenderType === GenderType.Male ? ` shadow-[0_1px_1px_rgba(0,0,0,0.251)]` : \"\"\n\t\t\t\t\t}`}\n\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\tsetGenderType(GenderType.Male);\n\t\t\t\t\t\tsetMessage(undefined);\n\t\t\t\t\t}}\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\tbackground: resolvedConfig?.style?.input?.inputBackgroundColor || \"#F9FAFC\",\n\t\t\t\t\t\tcolor: resolvedConfig?.style?.input?.inputTextColor || \"#000\",\n\t\t\t\t\t\tfontSize: resolvedConfig?.style?.input?.inputFontSize || \"16px\",\n\t\t\t\t\t\tfontWeight: resolvedConfig?.style?.input?.inputFontWeight || \"400\",\n\t\t\t\t\t\tborder: `1px solid ${genderType === GenderType.Male ? resolvedConfig?.style?.base?.primaryColor : `transparent`}`,\n\t\t\t\t\t\tfontFamily: resolvedConfig?.style?.base?.baseFontFamily || \"Inter, sans-serif\",\n\t\t\t\t\t\tborderRadius: resolvedConfig?.style?.input?.inputBorderRadius || \"4px\",\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t{translate?.(LanguageKeys.mens)}\n\t\t\t\t</button>\n\t\t\t\t<button\n\t\t\t\t\tclassName={`text-btnSize font-btnFont cursor-pointer leading-none rounded-[.375rem] focus-visible:ring-secondary p-[1rem] ${\n\t\t\t\t\t\tgenderType === GenderType.Female ? ` shadow-[0_1px_1px_rgba(0,0,0,0.251)]` : \"\"\n\t\t\t\t\t}`}\n\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\tsetGenderType(GenderType.Female);\n\t\t\t\t\t\tsetMessage(undefined);\n\t\t\t\t\t}}\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\tbackground: resolvedConfig?.style?.input?.inputBackgroundColor || \"#F9FAFC\",\n\t\t\t\t\t\tcolor: resolvedConfig?.style?.input?.inputTextColor || \"#000\",\n\t\t\t\t\t\tfontSize: resolvedConfig?.style?.input?.inputFontSize || \"16px\",\n\t\t\t\t\t\tfontWeight: resolvedConfig?.style?.input?.inputFontWeight || \"400\",\n\t\t\t\t\t\tborder: `1px solid ${genderType === GenderType.Female ? resolvedConfig?.style?.base?.primaryColor : `transparent`}`,\n\t\t\t\t\t\tfontFamily: resolvedConfig?.style?.base?.baseFontFamily || \"Inter, sans-serif\",\n\t\t\t\t\t\tborderRadius: resolvedConfig?.style?.input?.inputBorderRadius || \"4px\",\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t{translate?.(LanguageKeys.womens)}\n\t\t\t\t</button>\n\t\t\t\t{message && (\n\t\t\t\t\t<p\n\t\t\t\t\t\tclassName=\"mt-[0.2rem]\"\n\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\tcolor: resolvedConfig?.style?.input?.inputErrorColor || \"#000\",\n\t\t\t\t\t\t\tfontSize: resolvedConfig?.style?.input?.inputErrorFontSize || \"16px\",\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t{message}\n\t\t\t\t\t</p>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t\t<div className=\"flex justify-end mt-[.5rem]\">\n\t\t\t\t<SpecificButton\n\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\tresolvedConfig={resolvedConfig}\n\t\t\t\t\tbuttonText={translate?.(LanguageKeys.next)}\n\t\t\t\t\tpostfixIcon={<ArrowRight size={14} />}\n\t\t\t\t\tdisabled={!genderType || loading}\n\t\t\t\t\tbuttonFunc={handleNext}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</>\n\t);\n};\n\nexport default GenderStep;\n","import CustomInput from \"../../atoms/customInput/CustomInput\";\nimport SpecificButton from \"../../atoms/specificButton/SpecificButton\";\nimport { HeightStepProps } from \"../../types/interfaces\";\nimport { LanguageContext } from \"../../utils/context/languageContext\";\nimport { LanguageKeys } from \"../../utils/languageKeys\";\nimport { convertToCentimeters, handleErrorMessage } from \"../../utils/utils\";\nimport { MenuItem, Select } from \"@mui/material\";\nimport { ArrowRight } from \"lucide-react\";\nimport { useCallback, useContext, useEffect, useMemo, useState } from \"react\";\n\nconst HeightStep = ({ onComplete, initialValue, resolvedConfig, onStepComplete }: HeightStepProps) => {\n\tconst [localHeight, setLocalHeight] = useState({ cm: initialValue ? String(initialValue) : \"\", ft: \"\", inch: \"\" });\n\tconst [measurementUnit, setMeasurementUnit] = useState(\"cm\");\n\tconst [message, setMessage] = useState<string | undefined>(undefined);\n\tconst { translate, preferredLanguage } = useContext(LanguageContext) || {};\n\tconst handleSetHeight = useCallback(\n\t\t(event: React.ChangeEvent<HTMLInputElement>) => {\n\t\t\tsetMessage(undefined);\n\t\t\tif (measurementUnit === \"cm\") {\n\t\t\t\tsetLocalHeight((prev) => ({ ...prev, cm: event.target.value, ft: \"\", inch: \"\" }));\n\t\t\t} else if (event.target.id === \"ft\") {\n\t\t\t\tsetLocalHeight((prev) => ({ ...prev, ft: event.target.value, cm: \"\" }));\n\t\t\t} else {\n\t\t\t\tsetLocalHeight((prev) => ({ ...prev, inch: event.target.value, cm: \"\" }));\n\t\t\t}\n\t\t},\n\t\t[measurementUnit],\n\t);\n\n\tconst handleMeasurementUnit = useCallback((event: any) => {\n\t\tconst val = event.target.value;\n\t\tsetMeasurementUnit(val);\n\t\tsetLocalHeight({ cm: \"\", ft: \"\", inch: \"\" });\n\t\tsetMessage(undefined);\n\t}, []);\n\tconst validateHeight = useCallback(\n\t\t(height: { cm: string; ft: string; inch: string }) => {\n\t\t\tif (measurementUnit === \"cm\") {\n\t\t\t\treturn !(+height.cm < 152.4 || +height.cm > 213.36);\n\t\t\t}\n\t\t\treturn !(convertToCentimeters(+height.ft, +height.inch) < 152.4 || convertToCentimeters(+height.ft, +height.inch) > 213.36);\n\t\t},\n\t\t[measurementUnit],\n\t);\n\n\tconst checkMeasurement = useCallback(async () => {\n\t\ttry {\n\t\t\tif (!validateHeight(localHeight)) {\n\t\t\t\t// setError(true);\n\t\t\t\tsetMessage(translate?.(LanguageKeys.heightError));\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst height = { cm: +localHeight.cm, ft: +localHeight.ft, inch: +localHeight.inch };\n\t\t\tawait onStepComplete?.(height);\n\t\t\tonComplete?.(height);\n\t\t} catch (error) {\n\t\t\tsetMessage(handleErrorMessage(error));\n\t\t}\n\t}, [localHeight, validateHeight, onStepComplete]);\n\tconst isButtonDisabled = useMemo(() => (!localHeight.cm && !localHeight.ft && !localHeight.inch) || !!message, [localHeight, message]);\n\tuseEffect(() => {\n\t\tif (localHeight.cm === \"\" && localHeight.ft !== \"\") {\n\t\t\tsetMeasurementUnit(\"ft\");\n\t\t}\n\t}, [localHeight]);\n\tconst renderHeightInput = useCallback(() => {\n\t\tif (measurementUnit === \"cm\") {\n\t\t\treturn (\n\t\t\t\t<div className={`w-full`}>\n\t\t\t\t\t<CustomInput\n\t\t\t\t\t\trequired\n\t\t\t\t\t\t// variant=\"filled\"\n\t\t\t\t\t\ttype=\"number\"\n\t\t\t\t\t\tid=\"cm\"\n\t\t\t\t\t\tplaceholder={translate?.(LanguageKeys.height)}\n\t\t\t\t\t\tclassName=\"!pr-[10px]\"\n\t\t\t\t\t\tinputMode=\"numeric\"\n\t\t\t\t\t\tvalue={localHeight.cm}\n\t\t\t\t\t\tonChange={handleSetHeight}\n\t\t\t\t\t\tresolvedConfig={resolvedConfig}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t);\n\t\t} else {\n\t\t\treturn (\n\t\t\t\t<div className=\"flex gap-[.5rem]\">\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<CustomInput\n\t\t\t\t\t\t\trequired\n\t\t\t\t\t\t\t// variant=\"filled\"\n\t\t\t\t\t\t\ttype=\"number\"\n\t\t\t\t\t\t\tid=\"ft\"\n\t\t\t\t\t\t\t// error={error}\n\t\t\t\t\t\t\tclassName=\"!pr-[10px]\"\n\t\t\t\t\t\t\tplaceholder={translate?.(LanguageKeys.heightInFt)}\n\t\t\t\t\t\t\tvalue={localHeight.ft}\n\t\t\t\t\t\t\tonChange={handleSetHeight}\n\t\t\t\t\t\t\tresolvedConfig={resolvedConfig}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<CustomInput\n\t\t\t\t\t\t\trequired\n\t\t\t\t\t\t\t// variant=\"filled\"\n\t\t\t\t\t\t\ttype=\"number\"\n\t\t\t\t\t\t\tid=\"inch\"\n\t\t\t\t\t\t\t// error={error}\n\t\t\t\t\t\t\tclassName=\"!pr-[10px]\"\n\t\t\t\t\t\t\tplaceholder={translate?.(LanguageKeys.heightInInch)}\n\t\t\t\t\t\t\tvalue={localHeight.inch}\n\t\t\t\t\t\t\tonChange={handleSetHeight}\n\t\t\t\t\t\t\tresolvedConfig={resolvedConfig}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t);\n\t\t}\n\t}, [localHeight, preferredLanguage]);\n\treturn (\n\t\t<div className=\"h-full w-full\">\n\t\t\t<div className=\"mt-[3.5rem] mb-[.75rem]\">\n\t\t\t\t<div className=\"w-full flex gap-[.5rem]\">\n\t\t\t\t\t{renderHeightInput()}\n\t\t\t\t\t<Select\n\t\t\t\t\t\tclassName=\"bg-btn outline-none h-[40px] [&_svg]:text-base !shadow-none !outline-none !text-base\"\n\t\t\t\t\t\tvalue={measurementUnit}\n\t\t\t\t\t\tonChange={handleMeasurementUnit}\n\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\tbackground: resolvedConfig?.style?.input?.inputBackgroundColor || \"#F9FAFC\",\n\t\t\t\t\t\t\tcolor: resolvedConfig?.style?.input?.inputTextColor || \"#000\",\n\t\t\t\t\t\t\tfontSize: resolvedConfig?.style?.input?.inputFontSize || \"16px\",\n\t\t\t\t\t\t\tfontWeight: resolvedConfig?.style?.input?.inputFontWeight || \"400\",\n\t\t\t\t\t\t\tborder: `1px solid ${resolvedConfig?.style?.input?.inputBorderColor || \"transparent\"}`,\n\t\t\t\t\t\t\tfontFamily: resolvedConfig?.style?.base?.baseFontFamily || \"Inter, sans-serif\",\n\t\t\t\t\t\t\tborderRadius: resolvedConfig?.style?.input?.inputBorderRadius || \"4px\",\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t<MenuItem value=\"cm\">{translate?.(LanguageKeys.cmMeasurementUnit)}</MenuItem>\n\t\t\t\t\t\t<MenuItem value=\"ft\">{translate?.(LanguageKeys.ftMeasurementUnit)}</MenuItem>\n\t\t\t\t\t</Select>\n\t\t\t\t\t<style>\n\t\t\t\t\t\t{`\n .MuiOutlinedInput-notchedOutline {\n border: 1px solid ${resolvedConfig?.style?.input?.inputBorderColor || \"transparent\"} !important;\n outline: none;\n }\n .MuiSelect-select{\n outline: none;\n }\n \n `}\n\t\t\t\t\t</style>\n\t\t\t\t</div>\n\t\t\t\t<div\n\t\t\t\t\tclassName=\"mt-2\"\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\tcolor: resolvedConfig?.style?.input?.inputErrorColor || \"#000\",\n\t\t\t\t\t\tfontSize: resolvedConfig?.style?.input?.inputErrorFontSize || \"16px\",\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t{message}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div className=\"flex justify-end\">\n\t\t\t\t<SpecificButton resolvedConfig={resolvedConfig} disabled={isButtonDisabled} buttonFunc={checkMeasurement} buttonText={translate?.(LanguageKeys.next)} postfixIcon={<ArrowRight size={14} />} />\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nexport default HeightStep;\n","import React, { useMemo } from \"react\";\n\ninterface ProgressDotsProps {\n totalSteps: number;\n currentStepIndex: number;\n resolvedConfig?: any;\n}\n\nconst ProgressDots: React.FC<ProgressDotsProps> = ({\n totalSteps,\n currentStepIndex,\n resolvedConfig\n}) => {\n const activeColor = resolvedConfig?.style?.base?.primaryColor || \"#000\";\n const inactiveColor = resolvedConfig?.style?.base?.secondaryColor || \"#D9D9D9\";\n\n const dots = useMemo(\n () =>\n Array.from({ length: totalSteps }, (_, i) => ({\n index: i,\n isActive: i === currentStepIndex,\n isCompleted: i < currentStepIndex\n })),\n [totalSteps, currentStepIndex]\n );\n\n return (\n <div className=\"flex justify-center items-center gap-[4px] my-[1.5rem]\">\n {dots.map(({ index, isActive, isCompleted }) => (\n <div\n key={index}\n className={`h-[3px] rounded-[9999px] transition-all duration-300 ${\n isActive ? \"w-[50px]\" : \"w-[30px]\"\n }`}\n style={{\n backgroundColor: isCompleted || isActive ? activeColor : inactiveColor\n }}\n />\n ))}\n </div>\n );\n};\n\nexport default ProgressDots;\n","import { useContext, useEffect } from \"react\";\nimport EmailStep from \"./EmailStep\";\nimport NameStep from \"./NameStep\";\nimport GenderStep from \"./GenderStep\";\nimport HeightStep from \"./HeightStep\";\nimport { OnboardingStep } from \"../../utils/enums\";\nimport { Config, Step } from \"../../types/interfaces\";\nimport { LanguageContext } from \"../../utils/context/languageContext\";\nimport { LanguageKeys } from \"../../utils/languageKeys\";\nimport ProgressDots from \"../../atoms/progressDots/ProgressDots\";\nimport { useLocalConfig } from \"../../config/useLocalConfig\";\n\nconst StepsWrapper = ({\n currentStep,\n handleStepComplete,\n fullOrder,\n config,\n visibleSteps = [],\n}: {\n currentStep: Step;\n handleStepComplete: (val: any) => void;\n fullOrder: any;\n config?: Config;\n visibleSteps?: Step[];\n}) => {\n const { setPreferredLanguage, translate } = useContext(LanguageContext) || {};\n const resolvedConfig = useLocalConfig(config);\n\n const renderStep = () => {\n if (!currentStep) return null;\n\n const commonProps = {\n resolvedConfig,\n initialValue: currentStep.value,\n onComplete: handleStepComplete,\n onStepComplete: currentStep?.onStepComplete,\n };\n\n switch (currentStep.type) {\n case OnboardingStep.Email:\n return <EmailStep {...commonProps} />;\n case OnboardingStep.Name:\n return <NameStep {...commonProps} />;\n case OnboardingStep.Gender:\n return <GenderStep {...commonProps} />;\n case OnboardingStep.Height:\n return <HeightStep {...commonProps} />;\n default:\n return (\n <div>\n {translate?.(LanguageKeys.noValidSteps)} {currentStep.type}\n </div>\n );\n }\n };\n\n useEffect(() => {\n setPreferredLanguage?.(resolvedConfig.language);\n }, [resolvedConfig]);\n\n if (!visibleSteps.length)\n return <div>{translate?.(LanguageKeys.unsupportedStep)}</div>;\n\n /** 7️⃣ The dot index must never depend on resolved visibility */\n const absoluteIndex = currentStep ? fullOrder.indexOf(currentStep.type) : 0;\n\n return (\n <>\n <div\n id=\"swan-onboarding-bg\"\n style={{ background: resolvedConfig?.style?.base?.backgroundColor }}\n className=\"fixed w-full h-full z-[0] pointer-events-none top-0 left-0\"\n ></div>\n\n <div className=\"px-[15px] relative pt-[15px] w-full flex items-center flex-col\">\n <div className=\"max-w-[28rem] mx-auto w-full\">\n {/* Logo */}\n {resolvedConfig?.logo && (\n <div className=\"text-center mb-[1rem] flex justify-center\">\n <img\n src={resolvedConfig?.logo}\n alt=\"logo\"\n style={{\n height: resolvedConfig?.style?.logo?.logoHeight,\n width: resolvedConfig?.style?.logo?.logoWidth,\n }}\n className=\"h-10 mx-auto\"\n />\n </div>\n )}\n\n {/* Progress Dots */}\n <ProgressDots\n resolvedConfig={resolvedConfig}\n totalSteps={fullOrder.length}\n currentStepIndex={absoluteIndex}\n />\n\n {/* Heading */}\n <h1\n style={{\n fontFamily:\n resolvedConfig?.style?.heading?.headingFontFamily ||\n \"SeriouslyNostalgic Fn\",\n fontSize: resolvedConfig?.style?.heading?.headingFontSize || \"32px\",\n color: resolvedConfig?.style?.heading?.headingColor || \"#000\",\n fontWeight:\n resolvedConfig?.style?.heading?.headingFontWeight || \"normal\",\n }}\n className=\"text-center pt-[1.5rem]\"\n >\n {translate?.(LanguageKeys.onboarding[currentStep?.type || \"heading\"])}\n </h1>\n\n {/* Step */}\n {renderStep()}\n </div>\n </div>\n </>\n );\n};\n\nexport default StepsWrapper;\n","\"use client\";\nimport React, { useState, useMemo, useCallback } from \"react\";\nimport { OnboardingProps } from \"../../types/interfaces\";\nimport { resolveSteps } from \"../../utils/utils\";\nimport LanguageContextProvider from \"../../utils/context/languageContext\";\nimport StepsWrapper from \"./StepsWrapper\";\n\nexport const Onboarding: React.FC<OnboardingProps> = ({\n steps,\n config,\n onComplete,\n}) => {\n const visibleSteps = useMemo(() => resolveSteps(steps), [steps]);\n const [values, setValues] = useState<Record<string, any>>({});\n const [stepIndex, setStepIndex] = useState(0);\n const currentStep = visibleSteps[stepIndex];\n const fullOrder = steps.map((s) => s.type);\n\n /** 4️⃣ Handle completion for a step */\n const handleStepComplete = useCallback(\n (value: any) => {\n if (!currentStep) return;\n const updated = { ...values, [currentStep.type]: value };\n setValues(updated);\n if (stepIndex === visibleSteps.length - 1) {\n onComplete?.(updated);\n } else {\n setStepIndex((prev) => prev + 1); // 👈 FIX\n }\n },\n [currentStep, values, stepIndex, visibleSteps.length, onComplete]\n );\n\n if (!visibleSteps.length)\n return <div>No steps configured for onboarding.</div>;\n\n return (\n <LanguageContextProvider>\n <StepsWrapper\n currentStep={currentStep}\n handleStepComplete={handleStepComplete}\n visibleSteps={visibleSteps}\n fullOrder={fullOrder}\n config={config}\n />\n </LanguageContextProvider>\n );\n};\n","import Alcatel from \"./Alcatel.json\"\nimport Apple from \"./Apple.json\"\nimport CAT from \"./CAT.json\"\nimport Fairphone from \"./Fairphone.json\"\nimport Fujitsu from \"./Fujitsu.json\"\nimport Google from \"./Google.json\"\nimport Huawei from \"./Huawei.json\"\nimport iTel from \"./iTel.json\"\nimport Lava from \"./Lava.json\"\nimport Lg from \"./Lg.json\"\nimport Motorola from \"./Motorola.json\"\nimport NokiaHmd from \"./NokiaHmd.json\"\nimport Nothing from \"./Nothing.json\"\nimport Olla from \"./Olla.json\"\nimport Oneplus from \"./Oneplus.json\"\nimport Oppo from \"./Oppo.json\"\nimport Realme from \"./Realme.json\"\nimport Samsung from \"./Samsung.json\"\nimport Sharp from \"./Sharp.json\"\nimport Sony from \"./Sony.json\"\nimport Tecno from \"./Tecno.json\"\nimport Vivo from \"./Vivo.json\"\nimport Vsmart from \"./Vsmart.json\"\nimport Wiko from \"./Wiko.json\"\nimport Xiaomi from \"./Xiaomi.json\"\n\n\n\n\nconst DevicesList=[\n Alcatel,Apple,CAT,Fairphone,Fujitsu,Google,Huawei,iTel,Lava,Lg,Motorola,NokiaHmd,Nothing,Olla,Oneplus,Oppo,Realme,Samsung,Sharp,Sony,\n Tecno,Vivo,Vsmart,Wiko,Xiaomi\n\n]\n \n\nexport default DevicesList\n","import { useCallback, useContext, useEffect, useState } from \"react\";\nimport { LanguageContext } from \"../../utils/context/languageContext\";\nimport Header from \"../Header\";\nimport { MenuItem, Select } from \"@mui/material\";\nimport SpecificButton from \"../../atoms/specificButton/SpecificButton\";\nimport { ArrowRight } from \"lucide-react\";\nimport { useLocalConfig } from \"../../config/useLocalConfig\";\nimport { FocalLengthProps } from \"../../types/interfaces\";\nimport DevicesList from \"../../utils/deviceFocalLengthJson\";\nimport { handleErrorMessage } from \"../../utils/utils\";\nimport { LanguageKeys } from \"../../utils/languageKeys\";\n\ntype PhoneModel = {\n\tid: number;\n\tmodel_name: string;\n\tfocal_length: number;\n};\n\ntype DeviceManufacturer = Record<string, PhoneModel[]>;\ntype DevicesListType = DeviceManufacturer[];\n\nconst FocalLengthWrapper = ({ config, initialValue, onComplete }: FocalLengthProps) => {\n\tconst { translate, setPreferredLanguage } = useContext(LanguageContext) || {};\n\tconst resolvedConfig = useLocalConfig(config);\n\tconst [deviceInfo, setDeviceInfo] = useState({\n\t\tbrandName: initialValue?.brandName ?? \"\",\n\t\tmodel: initialValue?.model ?? (null as PhoneModel | null),\n\t});\n\tconst [message, setMessage] = useState<string | undefined>(undefined);\n\tconst [loading, setLoading] = useState(false);\n\n\t/* ------------ Brand Menu ------------ */\n\tconst manufacturerMenuItems = useCallback(() => {\n\t\treturn (DevicesList as DevicesListType).map((manufacturer) => {\n\t\t\tconst brandName = Object.keys(manufacturer)[0];\n\t\t\treturn (\n\t\t\t\t<MenuItem key={brandName} value={brandName}>\n\t\t\t\t\t{brandName}\n\t\t\t\t</MenuItem>\n\t\t\t);\n\t\t});\n\t}, []);\n\n\t/* ------------ Model Menu ------------ */\n\tconst phoneModelMenuItems = useCallback(() => {\n\t\tconst brandMatch = (DevicesList as DevicesListType).find((manufacturer) => {\n\t\t\tconst key = Object.keys(manufacturer)[0];\n\t\t\treturn key === deviceInfo.brandName;\n\t\t});\n\n\t\tif (!brandMatch) return null;\n\n\t\tconst key = Object.keys(brandMatch)[0];\n\t\tconst models = brandMatch[key];\n\n\t\treturn models.map((phone) => (\n\t\t\t<MenuItem key={phone.id} value={phone.id}>\n\t\t\t\t{phone.model_name}\n\t\t\t</MenuItem>\n\t\t));\n\t}, [deviceInfo.brandName]);\n\n\tconst handleStepComplete = useCallback(async () => {\n\t\tsetLoading(true);\n\t\ttry {\n\t\t\tif (deviceInfo.brandName && deviceInfo.model) {\n\t\t\t\tawait onComplete?.({\n\t\t\t\t\tbrandName: deviceInfo.brandName,\n\t\t\t\t\tmodelName: deviceInfo.model.model_name,\n\t\t\t\t\tfocalLength: deviceInfo.model.focal_length,\n\t\t\t\t});\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tsetMessage(handleErrorMessage(error));\n\t\t} finally {\n\t\t\tsetLoading(false);\n\t\t}\n\t}, [deviceInfo]);\n\n\t/* ------------ Brand Change ------------ */\n\tconst handleBrandChange = (event: any) => {\n\t\tsetDeviceInfo({\n\t\t\tbrandName: event.target.value,\n\t\t\tmodel: null,\n\t\t});\n\t};\n\n\t/* ------------ Model Change ------------ */\n\tconst handleModelChange = (event: any) => {\n\t\tconst selectedId = event.target.value;\n\n\t\tconst brandMatch = (DevicesList as DevicesListType).find((m) => {\n\t\t\treturn Object.keys(m)[0] === deviceInfo.brandName;\n\t\t});\n\n\t\tif (!brandMatch) return;\n\n\t\tconst key = Object.keys(brandMatch)[0];\n\t\tconst models = brandMatch[key];\n\n\t\tconst foundModel = models.find((phone) => phone.id === selectedId);\n\n\t\tsetDeviceInfo((prev) => ({\n\t\t\t...prev,\n\t\t\tmodel: foundModel ?? null,\n\t\t}));\n\t};\n\n\tuseEffect(() => {\n\t\tsetPreferredLanguage?.(resolvedConfig?.language);\n\t}, [resolvedConfig]);\n\n\treturn (\n\t\t<div\n\t\t\tclassName=\"h-full flex-col max-w-md mx-auto pt-[1rem] p-[15px] w-full flex justify-start items-start text-center rounded-t-[20px]\"\n\t\t\tstyle={{ background: resolvedConfig?.style?.base?.backgroundColor }}\n\t\t>\n\t\t\t<div className=\"w-full max-w-[28rem] mx-auto\">\n\t\t\t\t<Header subtitle={translate?.(LanguageKeys.phoneModel)} resolvedConfig={resolvedConfig} />\n\t\t\t\t<div className=\"text-left mb-[.25rem] mt-[1rem]\">{translate?.(LanguageKeys.selectPhoneBrand)}</div>\n\n\t\t\t\t<Select\n\t\t\t\t\tonChange={handleBrandChange}\n\t\t\t\t\tclassName=\"w-full h-[40px] !shadow-none !outline-none text-left\"\n\t\t\t\t\tvalue={deviceInfo.brandName}\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\tbackground: resolvedConfig?.style?.input?.inputBackgroundColor || \"#F9FAFC\",\n\t\t\t\t\t\tcolor: resolvedConfig?.style?.input?.inputTextColor || \"#000\",\n\t\t\t\t\t\tfontSize: resolvedConfig?.style?.input?.inputFontSize || \"16px\",\n\t\t\t\t\t\tfontWeight: resolvedConfig?.style?.input?.inputFontWeight || \"400\",\n\t\t\t\t\t\tborder: `1px solid ${resolvedConfig?.style?.input?.inputBorderColor || \"transparent\"}`,\n\t\t\t\t\t\tfontFamily: resolvedConfig?.style?.base?.baseFontFamily || \"Inter, sans-serif\",\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t{manufacturerMenuItems()}\n\t\t\t\t</Select>\n\n\t\t\t\t<div className=\"text-left mb-[.25rem] mt-[1rem]\">{translate?.(LanguageKeys.selectPhoneModel)}</div>\n\n\t\t\t\t<Select\n\t\t\t\t\tonChange={handleModelChange}\n\t\t\t\t\tclassName=\"w-full bg-btn h-[40px] !shadow-none !outline-none text-left\"\n\t\t\t\t\tvalue={deviceInfo.model?.id || \"\"}\n\t\t\t\t\tdisabled={!deviceInfo.brandName}\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\tbackground: resolvedConfig?.style?.input?.inputBackgroundColor || \"#F9FAFC\",\n\t\t\t\t\t\tcolor: resolvedConfig?.style?.input?.inputTextColor || \"#000\",\n\t\t\t\t\t\tfontSize: resolvedConfig?.style?.input?.inputFontSize || \"16px\",\n\t\t\t\t\t\tfontWeight: resolvedConfig?.style?.input?.inputFontWeight || \"400\",\n\t\t\t\t\t\tborder: `1px solid ${resolvedConfig?.style?.input?.inputBorderColor || \"transparent\"}`,\n\t\t\t\t\t\tfontFamily: resolvedConfig?.style?.base?.baseFontFamily || \"Inter, sans-serif\",\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t{phoneModelMenuItems()}\n\t\t\t\t</Select>\n\t\t\t\t<style>\n\t\t\t\t\t{`\n .MuiOutlinedInput-notchedOutline {\n border: 1px solid ${resolvedConfig?.style?.input?.inputBorderColor || \"transparent\"} !important;\n outline: none;\n }\n .MuiSelect-select{\n outline: none;\n }\n \n `}\n\t\t\t\t</style>\n\t\t\t\t{message && <p className=\"mt-[0.2rem] text-[16px]\">{message}</p>}\n\t\t\t</div>\n\n\t\t\t<div className=\"mt-[.75rem] mb-[1.25rem] max-w-[28rem] mx-auto w-full flex justify-end\">\n\t\t\t\t<SpecificButton\n\t\t\t\t\tdisabled={!deviceInfo?.brandName || !deviceInfo?.model || loading}\n\t\t\t\t\tpostfixIcon={<ArrowRight />}\n\t\t\t\t\tresolvedConfig={resolvedConfig}\n\t\t\t\t\tbuttonFunc={handleStepComplete}\n\t\t\t\t\tbuttonText={translate?.(LanguageKeys.next)}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nexport default FocalLengthWrapper;\n","import React from \"react\";\nimport FocalLengthWrapper from \"./FocalLengthWrapper\";\nimport { FocalLengthProps } from \"../../types/interfaces\";\nimport LanguageContextProvider from \"../../utils/context/languageContext\";\n\nexport const FocalLength: React.FC<FocalLengthProps> = ({\n onComplete,\n initialValue,\n config,\n}: FocalLengthProps) => {\n return (\n <LanguageContextProvider>\n <FocalLengthWrapper\n config={config}\n onComplete={onComplete}\n initialValue={initialValue}\n />\n </LanguageContextProvider>\n );\n};\n","import React from \"react\";\nimport { motion, AnimatePresence } from \"framer-motion\";\n\nexport default function MuseScreenRenderer({\n\tscreenIndex,\n\tscanLinePosition,\n\tfaceZoomed,\n\tshowFaceScanLine,\n\tfaceScanLinePosition,\n\tshowLargeS,\n\ttypewriterText,\n\tfullText,\n\tscreens,\n\tvideoToShow,\n\tfaceScanVideo,\n\tsizeVideo,\n\tformFittingVideo,\n}: any) {\n\tconst screen = screens[screenIndex];\n\n\t// Map screen id to props for each component\n\tconst componentProps: any = {\n\t\tbody: { scanLinePosition, videoToShow },\n\t\tface: {\n\t\t\tfaceZoomed,\n\t\t\tshowFaceScanLine,\n\t\t\tfaceScanLinePosition,\n\t\t\tfaceScanVideo,\n\t\t},\n\t\tsizeFit: { showLargeS, typewriterText, fullText, sizeVideo },\n\t};\n\n\tconst hasComponent = !!screen.component;\n\tconst Comp = hasComponent ? screen.component : null;\n\n\tlet content = null;\n\tif (hasComponent) {\n\t\tcontent = React.createElement(Comp.type || Comp, componentProps[screen.id] || {});\n\t} else if (screen.image) {\n\t\tcontent = (\n\t\t\t<video className=\"h-full w-full object-contain border-none\" muted loop autoPlay playsInline preload=\"auto\">\n\t\t\t\t<source src={formFittingVideo} type=\"video/mp4\" />\n\t\t\t</video>\n\t\t);\n\t}\n\n\treturn (\n\t\t<AnimatePresence mode=\"wait\">\n\t\t\t<motion.div key={screenIndex} initial={{ opacity: 0, y: 20 }} animate={{ opacity: 1, y: 0 }} exit={{ opacity: 0, y: -20 }} transition={{ duration: 0.4 }} className=\"w-full h-full\">\n\t\t\t\t{content}\n\t\t\t</motion.div>\n\t\t</AnimatePresence>\n\t);\n}\n","import { ArrowRight } from \"lucide-react\";\nimport BodyScanAnimation from \"./BodyScanAnimation\";\nimport FaceScanAnimation from \"./FaceScanAnimation\";\nimport TypewriterScene from \"./TypewritterScene\";\nimport { useContext, useMemo, useState } from \"react\";\nimport MuseScreenRenderer from \"./MuseScreenRenderer\";\nimport Header from \"../../Header\";\nimport { GenderType, MuseScreenStep } from \"../../../utils/enums\";\nimport {\n bodyScanPerson,\n faceScanPerson,\n faceScanVideo,\n femaleScanVideo,\n fittingGuide,\n formFittingGuide,\n fullText,\n leSableDress,\n maleFaceScanVideo,\n maleFormFittingGuide,\n maleScanVideo,\n maleSizeSuggestions,\n OUTFIT_IMAGES,\n sizeSuggestions,\n} from \"../../..//utils/constants\";\nimport { MuseStepsProps } from \"../../../types/interfaces\";\nimport useMuseAnimations from \"../../../customHooks/useMuseAnimation\";\nimport SpecificButton from \"../../../atoms/specificButton/SpecificButton\";\nimport { LanguageKeys } from \"../../../utils/languageKeys\";\nimport { LanguageContext } from \"../../../utils/context/languageContext\";\n\nconst screens: {\n id: string;\n title: string;\n description: string;\n image: string;\n component?: React.ReactNode;\n}[] = [\n {\n id: MuseScreenStep.Body,\n title: LanguageKeys.bodyScan,\n description: LanguageKeys.bodyScanDescription,\n image: bodyScanPerson,\n component: <BodyScanAnimation />,\n },\n {\n id: MuseScreenStep.Face,\n title: LanguageKeys.faceScan,\n description: LanguageKeys.faceScanDescription,\n image: faceScanPerson,\n component: <FaceScanAnimation />,\n },\n {\n id: MuseScreenStep.SizeFit,\n title: LanguageKeys.sizeFit,\n description: \"\",\n image: leSableDress,\n component: <TypewriterScene />,\n },\n {\n id: MuseScreenStep.Ready,\n title: LanguageKeys.readyToStart,\n description: LanguageKeys.readyToStartDescription,\n image: fittingGuide,\n },\n];\n\nexport default function MuseSteps({\n applicableScreens,\n config,\n gender,\n handleNext,\n}: MuseStepsProps) {\n const { translate } = useContext(LanguageContext) || {};\n const [currentScreen, setCurrentScreen] = useState(0);\n const [scanLinePosition, setScanLinePosition] = useState(0);\n const [faceZoomed, setFaceZoomed] = useState(false);\n const [faceScanLinePosition, setFaceScanLinePosition] = useState(0);\n const [showFaceScanLine, setShowFaceScanLine] = useState(false);\n const [currentOutfit, setCurrentOutfit] = useState(0);\n const [typewriterText, setTypewriterText] = useState(\"\");\n const [showLargeS, setShowLargeS] = useState(false);\n\n const screensToShow = useMemo(() => {\n if (!applicableScreens?.length) {\n return screens;\n }\n return screens.filter((screen) => applicableScreens.includes(screen.id));\n }, [applicableScreens]);\n\n useMuseAnimations({\n screenId: screensToShow[currentScreen].id,\n setScanLinePosition,\n setFaceZoomed,\n setShowFaceScanLine,\n setFaceScanLinePosition,\n setCurrentOutfit,\n setTypewriterText,\n setShowLargeS,\n outfitImages: OUTFIT_IMAGES,\n fullText,\n });\n\n const onNextClick = () => {\n if (currentScreen < screensToShow.length - 1) {\n setCurrentScreen((prev) => prev + 1);\n } else {\n handleNext?.();\n }\n };\n return (\n <div\n className=\"relative h-full max-w-[28rem] mx-auto w-full flex justify-center\"\n style={{ background: config?.style?.base?.backgroundColor }}\n >\n \n \n <div className=\"absolute bottom-0 left-0 right-0 h-full shadow-lg \">\n <div className=\"h-full flex flex-col p-[1rem] w-full\">\n <Header noTitle resolvedConfig={config} />\n <div className=\"text-center pb-[.5rem]\">\n <h1\n style={{\n fontFamily:\n config?.style?.heading?.headingFontFamily ||\n \"SeriouslyNostalgic Fn\",\n fontSize: config?.style?.heading?.headingFontSize || \"32px\",\n color: config?.style?.heading?.headingColor || \"#000\",\n fontWeight:\n config?.style?.heading?.headingFontWeight || \"normal\",\n }}\n >\n {translate?.(screensToShow[currentScreen].title)}\n </h1>\n {screensToShow[currentScreen].description && (\n <p\n className=\" mt-[.25rem] max-w-[280px] mx-auto min-h-[40px]\"\n style={{\n fontFamily:\n config?.style?.subheading?.subheadingFontFamily ||\n \"'Inter', sans-serif\",\n fontSize:\n config?.style?.subheading?.subheadingFontSize || \"14px\",\n color:\n config?.style?.subheading?.subheadingColor || \"#4b5563\",\n fontWeight:\n config?.style?.subheading?.subheadingFontWeight || \"normal\",\n }}\n >\n {translate?.(screensToShow[currentScreen].description)}\n </p>\n )}\n </div>\n <div className=\"flex-1 flex justify-center items-center overflow-hidden py-[1rem] relative\">\n <MuseScreenRenderer\n screenIndex={currentScreen}\n scanLinePosition={scanLinePosition}\n faceZoomed={faceZoomed}\n showFaceScanLine={showFaceScanLine}\n faceScanLinePosition={faceScanLinePosition}\n outfitImages={OUTFIT_IMAGES}\n currentOutfit={currentOutfit}\n showLargeS={showLargeS}\n typewriterText={typewriterText}\n fullText={fullText}\n screens={screensToShow}\n videoToShow={\n gender === GenderType.Male ? maleScanVideo : femaleScanVideo\n }\n faceScanVideo={\n gender === GenderType.Male ? maleFaceScanVideo : faceScanVideo\n }\n sizeVideo={\n gender === GenderType.Male\n ? maleSizeSuggestions\n : sizeSuggestions\n }\n formFittingVideo={\n gender === GenderType.Male\n ? maleFormFittingGuide\n : formFittingGuide\n }\n />\n </div>\n\n <div className=\"pt-[.5rem] flex justify-end\">\n <SpecificButton\n resolvedConfig={config}\n buttonText={translate?.(LanguageKeys.next)}\n type=\"submit\"\n postfixIcon={<ArrowRight size={14} />}\n buttonFunc={onNextClick}\n />\n </div>\n </div>\n </div>\n </div>\n );\n}\n","export default function BodyScanAnimation({\n videoToShow,\n}: {\n videoToShow?: string;\n}) {\n return (\n <div className=\"relative w-full h-full\">\n <video\n className=\"h-full w-full object-contain border-none\"\n muted\n autoPlay\n loop\n playsInline\n >\n <source src={videoToShow} type=\"video/mp4\" />\n </video>\n </div>\n );\n}\n","import { FaceScanAnimationProps } from \"../../../types/interfaces\";\n\nexport default function FaceScanAnimation({\n faceZoomed,\n showFaceScanLine,\n faceScanLinePosition,\n faceScanVideo,\n}: FaceScanAnimationProps) {\n return (\n <div className=\"relative h-full w-full\">\n <div className=\"w-full h-full relative\">\n <video\n className=\"h-full w-full object-contain border-none\"\n muted\n autoPlay\n playsInline\n >\n <source src={faceScanVideo} type=\"video/mp4\" />\n </video>\n {showFaceScanLine && faceZoomed && (\n <div\n className=\"absolute w-[1px] bg-[#8B5CF6] shadow-[0_0_8px_rgba(139,92,246,0.8)] z-20\"\n style={{\n left: `${faceScanLinePosition}%`,\n top: \"0%\",\n height: \"40%\",\n opacity:\n faceScanLinePosition && faceScanLinePosition >= 0 ? 1 : 0,\n }}\n />\n )}\n </div>\n </div>\n );\n}\n","export default function TypewriterScene({ sizeVideo }: { sizeVideo?: string }) {\n return (\n <div className=\"relative w-full h-full flex justify-center items-center\">\n <video\n className=\"h-full w-full object-contain border-none\"\n muted\n loop\n autoPlay\n playsInline\n >\n <source src={sizeVideo} type=\"video/mp4\" />\n </video>\n </div>\n );\n}\n","import { useEffect, useRef } from \"react\";\n\nfunction useMuseAnimations({\n screenId,\n setScanLinePosition,\n setFaceZoomed,\n setShowFaceScanLine,\n setFaceScanLinePosition,\n setCurrentOutfit,\n outfitImages,\n setTypewriterText,\n setShowLargeS,\n fullText,\n}: any) {\n const animationRefs = useRef<any>({\n scan: null,\n face: null,\n outfit: null,\n typewriter: null,\n });\n\n const cleanupAnimations = () => {\n Object.values(animationRefs.current).forEach((ref: any) => {\n if (typeof ref === \"number\") {\n cancelAnimationFrame(ref);\n } else if (ref) {\n clearTimeout(ref);\n clearInterval(ref);\n }\n });\n animationRefs.current = {\n scan: null,\n face: null,\n outfit: null,\n typewriter: null,\n };\n };\n\n useEffect(() => {\n cleanupAnimations();\n\n switch (screenId) {\n case \"body\": {\n const startTime = Date.now();\n const duration = 3000;\n\n const animateScanLine = () => {\n const elapsed = Date.now() - startTime;\n const progress = Math.min(elapsed / duration, 1);\n setScanLinePosition(progress * 100);\n if (progress < 1) {\n animationRefs.current.scan = requestAnimationFrame(animateScanLine);\n }\n };\n\n animationRefs.current.scan = requestAnimationFrame(animateScanLine);\n break;\n }\n\n case \"face\": {\n setFaceZoomed(false);\n setShowFaceScanLine(false);\n setFaceScanLinePosition(0);\n\n animationRefs.current.face = setTimeout(() => {\n setFaceZoomed(true);\n\n setTimeout(() => {\n setShowFaceScanLine(true);\n\n const startTime = Date.now();\n const duration = 6000; // ✅ Total 6s (3s for each direction)\n\n const animateFaceScanLine = () => {\n const elapsed = Date.now() - startTime;\n const progress = Math.min(elapsed / duration, 1);\n\n setFaceScanLinePosition(\n progress <= 0.5 ? progress * 2 * 100 : (2 - progress * 2) * 100\n );\n\n if (progress < 1) {\n animationRefs.current.face =\n requestAnimationFrame(animateFaceScanLine);\n }\n };\n\n animationRefs.current.face =\n requestAnimationFrame(animateFaceScanLine);\n }, 2500); // Delay after zoom\n }, 800); // Delay before zoom\n break;\n }\n\n case \"sizeFit\": {\n setCurrentOutfit(0);\n animationRefs.current.outfit = setInterval(() => {\n setCurrentOutfit((prev: any) => (prev + 1) % outfitImages.length);\n }, 1500);\n break;\n }\n\n case \"ready\": {\n setShowLargeS(false);\n setTypewriterText(\"\");\n\n animationRefs.current.typewriter = setTimeout(() => {\n setShowLargeS(true);\n setTimeout(() => {\n let currentIndex = 0;\n const typeNextChar = () => {\n if (currentIndex < fullText.length) {\n setTypewriterText(fullText.slice(0, currentIndex + 1));\n currentIndex++;\n animationRefs.current.typewriter = setTimeout(typeNextChar, 30);\n }\n };\n typeNextChar();\n }, 1000);\n }, 800);\n break;\n }\n\n default:\n break;\n }\n\n return cleanupAnimations;\n }, [screenId]);\n}\n\nexport default useMuseAnimations;\n","import { ArrowRight, Volume2 } from \"lucide-react\";\nimport { useState, useEffect, useContext } from \"react\";\nimport Header from \"../Header\";\nimport { VolumeStepProps } from \"../../types/interfaces\";\nimport { LanguageContext } from \"../../utils/context/languageContext\";\nimport { LanguageKeys } from \"../../utils/languageKeys\";\nimport SpecificButton from \"../../atoms/specificButton/SpecificButton\";\n\nexport default function VolumeScreen({ handleNext, config }: VolumeStepProps) {\n const { translate } = useContext(LanguageContext) || {};\n const [mousePosition, setMousePosition] = useState({ x: 0, y: 0 });\n const [isAnimationPaused, setIsAnimationPaused] = useState(false);\n\n useEffect(() => {\n const handleMouseMove = (e: any) => {\n setMousePosition({ x: e.clientX, y: e.clientY });\n };\n window.addEventListener(\"mousemove\", handleMouseMove);\n return () => window.removeEventListener(\"mousemove\", handleMouseMove);\n }, []);\n\n const toggleAnimationPause = () => {\n setIsAnimationPaused((prev) => !prev);\n };\n\n function hexToRgba(hex: string, alpha: number = 1): string {\n hex = hex.replace(\"#\", \"\");\n\n if (hex.length === 3) {\n hex = hex\n .split(\"\")\n .map((h) => h + h)\n .join(\"\");\n }\n\n const r = parseInt(hex.substring(0, 2), 16);\n const g = parseInt(hex.substring(2, 4), 16);\n const b = parseInt(hex.substring(4, 6), 16);\n\n return `rgba(${r}, ${g}, ${b}, ${alpha})`;\n }\n const brandColor = config?.style?.base?.brandColor || \"#000\";\n const rgba1 = hexToRgba(brandColor, 0.19);\n const rgba2 = hexToRgba(brandColor, 0.23);\n const rgba3 = hexToRgba(brandColor, 0.24);\n\n const calculateHolographicEffect = () => {\n const windowWidth =\n typeof window !== \"undefined\" ? window.innerWidth : 1000;\n const windowHeight =\n typeof window !== \"undefined\" ? window.innerHeight : 1000;\n const normalizedX = (mousePosition.x / windowWidth) * 2 - 1;\n const normalizedY = (mousePosition.y / windowHeight) * 2 - 1;\n const rotateX = normalizedY * 5;\n const rotateY = normalizedX * -5;\n\n return {\n transform: `perspective(1000px) rotateX(${rotateX}deg) rotateY(${rotateY}deg)`,\n background: \"#fff\",\n boxShadow: `0 0 20px ${rgba1}, 0 0 30px ${rgba2}`,\n };\n };\n\n const holographicStyle = calculateHolographicEffect();\n\n return (\n <div\n className=\"flex h-full max-w-[28rem] mx-auto w-full flex-col relative items-center justify-center overflow-hidden max-w-md mx-auto bg-primary text-base\"\n style={{ background: config?.style?.base?.backgroundColor }}\n >\n <div className=\"flex justify-start absolute z-[99] top-[1rem] max-w-md mx-auto w-full px-[1rem]\">\n <Header noTitle resolvedConfig={config} />\n </div>\n <div className=\"relative mb-[2rem]\">\n {[...Array(3)].map((_, i) => (\n <div\n key={i}\n className=\"absolute rounded-[9999px]\"\n style={{\n width: \"100px\",\n height: \"100px\",\n minHeight: \"100px\",\n minWidth: \"100px\",\n background: config?.style?.base?.backgroundColor || \"#fff\",\n boxShadow: `0 0 20px 2px ${rgba3}`,\n border: \"none\",\n filter: \"blur(1px)\",\n margin: \"0 auto\",\n left: \"50%\",\n top: \"50%\",\n animation: isAnimationPaused\n ? \"none\"\n : `gentleRipple 15s cubic-bezier(0.1, 0.5, 0.2, 1) ${\n i * 5\n }s infinite`,\n opacity: isAnimationPaused ? 1 : 0,\n transform: isAnimationPaused\n ? \"translate(-50%, -50%) scale(0.5)\"\n : \"translate(-50%, -50%)\",\n }}\n />\n ))}\n\n <div\n className=\"relative z-10 rounded-[9999px] p-[1.5rem] cursor-pointer transition-all backdrop-blur-sm\"\n style={{\n ...holographicStyle,\n transition: \"transform 0.1s ease-out, box-shadow 0.1s ease-out\",\n }}\n onClick={toggleAnimationPause}\n >\n <Volume2\n className=\"w-[3rem] h-[3rem] relative z-10\"\n style={{ filter: \"drop-shadow(0 0 5px rgba(255, 255, 255, 0.7))\" }}\n color={config?.style?.base?.primaryColor || \"#000\"}\n />\n </div>\n </div>\n\n <div className=\"relative z-10 text-center max-w-[20rem]\">\n <div\n className=\" mb-[.5rem]\"\n style={{\n fontFamily:\n config?.style?.subheading?.subheadingFontFamily ||\n \"'Inter', sans-serif\",\n fontSize: config?.style?.subheading?.subheadingFontSize || \"14px\",\n color: config?.style?.subheading?.subheadingColor || \"#4b5563\",\n fontWeight:\n config?.style?.subheading?.subheadingFontWeight || \"normal\",\n }}\n >\n {translate?.(LanguageKeys.turnUpVolume)}\n </div>\n </div>\n\n <div className=\"absolute bottom-[1rem] right-0 max-w-[28rem] mx-auto w-full px-[1rem] max-w-md mx-auto\">\n <div className=\"flex justify-end\">\n <SpecificButton\n buttonFunc={() => handleNext()}\n postfixIcon={<ArrowRight />}\n buttonText={translate?.(LanguageKeys.continue)}\n resolvedConfig={config}\n />\n </div>\n </div>\n <style>{`\n @keyframes gentleRipple {\n 0% {\n transform: translate(-50%, -50%) scale(0.5) translateZ(0);\n opacity: 0.7;\n }\n 50% {\n opacity: 0.4;\n }\n 100% {\n transform: translate(-50%, -50%) scale(25) translateZ(0);\n opacity: 0;\n }\n }\n`}</style>\n </div>\n );\n}\n","import { useContext } from \"react\";\nimport { ArrowRight } from \"lucide-react\";\nimport Header from \"../Header\";\nimport { maleSetupVideo, setupVideo } from \"../../utils/constants\";\nimport { SetupScreenProps } from \"../../types/interfaces\";\nimport { LanguageContext } from \"../../utils/context/languageContext\";\nimport { LanguageKeys } from \"../../utils/languageKeys\";\nimport { GenderType } from \"../../utils/enums\";\nimport SpecificButton from \"../../atoms/specificButton/SpecificButton\";\n\nexport default function SetupScreen({ gender, handleNext, config }: SetupScreenProps) {\n\tconst { translate } = useContext(LanguageContext) || {};\n\n\treturn (\n\t\t<div\n\t\t\tclassName=\"flex h-full max-w-[28rem] mx-auto w-full p-[1rem] relative flex-col items-center overflow-hidden max-w-md mx-auto bg-primary text-base\"\n\t\t\tstyle={{ background: config?.style?.base?.backgroundColor }}\n\t\t>\n\t\t\t<div className=\"flex justify-start max-w-md mx-auto w-full \">\n\t\t\t\t<Header noTitle resolvedConfig={config} />\n\t\t\t</div>\n\t\t\t<h2\n\t\t\t\tclassName=\"mb-[1rem] text-[32px]\"\n\t\t\t\tstyle={{\n\t\t\t\t\tfontFamily: config?.style?.heading?.headingFontFamily || \"SeriouslyNostalgic Fn\",\n\t\t\t\t\tfontSize: config?.style?.heading?.headingFontSize || \"32px\",\n\t\t\t\t\tcolor: config?.style?.heading?.headingColor || \"#000\",\n\t\t\t\t\tfontWeight: config?.style?.heading?.headingFontWeight || \"normal\",\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t{translate?.(LanguageKeys.phonePlacement)}\n\t\t\t</h2>\n\t\t\t<p\n\t\t\t\tclassName=\"text-center text-gray-600 text-sm mt-1 max-w-[280px] mx-auto min-h-[40px]\"\n\t\t\t\tstyle={{\n\t\t\t\t\tfontFamily: config?.style?.subheading?.subheadingFontFamily || \"'Inter', sans-serif\",\n\t\t\t\t\tfontSize: config?.style?.subheading?.subheadingFontSize || \"14px\",\n\t\t\t\t\tcolor: config?.style?.subheading?.subheadingColor || \"#4b5563\",\n\t\t\t\t\tfontWeight: config?.style?.subheading?.subheadingFontWeight || \"normal\",\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t{translate?.(LanguageKeys.phonePlacementDescription)}\n\t\t\t</p>\n\t\t\t<div className=\"relative w-full h-full flex flex-col items-center max-w-md pt-[1rem]\">\n\t\t\t\t<div className=\"relative w-full h-auto\">\n\t\t\t\t\t<video className=\"h-full w-full object-contain border-none\" muted loop autoPlay playsInline>\n\t\t\t\t\t\t<source src={gender === GenderType.Male ? maleSetupVideo : setupVideo} type=\"video/mp4\" />\n\t\t\t\t\t</video>\n\t\t\t\t</div>\n\n\t\t\t\t<div className=\"absolute bottom-[0] max-w-[28rem] mx-auto w-full left-0 right-0 flex justify-center max-w-md mx-auto\">\n\t\t\t\t\t<div className=\"flex justify-end w-full\">\n\t\t\t\t\t\t<SpecificButton buttonFunc={() => handleNext?.()} buttonText={translate?.(LanguageKeys.continue)} postfixIcon={<ArrowRight />} resolvedConfig={config} />\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n","import { useContext, useEffect, useState } from \"react\";\nimport MuseSteps from \"./MuseSteps\";\nimport VolumeStep from \"./VolumeStep\";\nimport SetupScreen from \"./SetupScreen\";\nimport { EducationalProps } from \"../../types/interfaces\";\nimport { GenderType, MuseScreenStep, SectionType } from \"../../utils/enums\";\nimport { useLocalConfig } from \"../../config/useLocalConfig\";\nimport { LanguageContext } from \"../../utils/context/languageContext\";\n\nconst EducationalStepsWrapper = ({ sections, gender, onComplete, config }: EducationalProps) => {\n\tconst resolvedConfig = useLocalConfig(config);\n\tconst { setPreferredLanguage } = useContext(LanguageContext) || {};\n\tconst [step, setStep] = useState(1);\n\n\tuseEffect(() => {\n\t\tsetPreferredLanguage?.(resolvedConfig.language);\n\t}, [resolvedConfig]);\n\n\tswitch (step) {\n\t\tcase 1:\n\t\t\treturn (\n\t\t\t\t<MuseSteps\n\t\t\t\t\tapplicableScreens={\n\t\t\t\t\t\tsections?.[0] === SectionType.Full || !sections || !sections?.length\n\t\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t\t: sections[0] === SectionType.Body\n\t\t\t\t\t\t\t? [MuseScreenStep.Body, MuseScreenStep.SizeFit, MuseScreenStep.Ready]\n\t\t\t\t\t\t\t: [MuseScreenStep.Face, MuseScreenStep.SizeFit]\n\t\t\t\t\t}\n\t\t\t\t\tconfig={resolvedConfig}\n\t\t\t\t\tgender={gender || GenderType.Male}\n\t\t\t\t\thandleNext={() => setStep(2)}\n\t\t\t\t/>\n\t\t\t);\n\n\t\tcase 2:\n\t\t\treturn <VolumeStep handleNext={() => (sections?.[0] === SectionType.Face ? onComplete?.() : setStep(3))} config={resolvedConfig} />;\n\n\t\tcase 3:\n\t\t\treturn <SetupScreen config={resolvedConfig} gender={gender || GenderType.Male} handleNext={onComplete} />;\n\n\t\tdefault:\n\t\t\treturn <></>;\n\t}\n};\n\nexport default EducationalStepsWrapper;\n","import { EducationalProps } from \"../../types/interfaces\";\nimport { GenderType } from \"../../utils/enums\";\nimport EducationalStepsWrapper from \"./EducationalStepsWrapper\";\nimport LanguageContextProvider from \"../../utils/context/languageContext\";\n\nexport const Educational: React.FC<EducationalProps> = ({\n sections = [],\n config,\n gender = GenderType.Male,\n onComplete,\n}) => {\n return (\n <LanguageContextProvider>\n <EducationalStepsWrapper\n sections={sections}\n config={config}\n gender={gender}\n onComplete={onComplete}\n />\n </LanguageContextProvider>\n );\n};\n"],"names":["cn","classes","filter","Boolean","join","CustomInput","React","forwardRef","className","resolvedConfig","type","props","ref","_jsxs","_Fragment","children","_jsx","autoCapitalize","autoCorrect","style","background","input","inputBackgroundColor","color","inputTextColor","fontSize","inputFontSize","fontWeight","inputFontWeight","border","inputBorderColor","fontFamily","base","baseFontFamily","borderRadius","inputBorderRadius","inputPlaceholderColor","displayName","EmailStep","onComplete","initialValue","onStepComplete","value","setValue","useState","message","setMessage","undefined","loading","setLoading","translate","useContext","LanguageContext","onSubmit","async","e","preventDefault","trim","LanguageKeys","emailRequired","isValidEmail","validEmail","error","handleErrorMessage","required","id","placeholder","enterEmail","onChange","target","inputErrorColor","inputErrorFontSize","SpecificButton","disabled","buttonText","next","postfixIcon","ArrowRight","size","NameStep","nameRequired","enterName","GenderStep","genderType","setGenderType","GenderType","Male","onClick","primaryColor","mens","Female","womens","buttonFunc","console","log","HeightStep","localHeight","setLocalHeight","cm","String","ft","inch","measurementUnit","setMeasurementUnit","preferredLanguage","handleSetHeight","useCallback","event","prev","handleMeasurementUnit","val","validateHeight","height","convertToCentimeters","checkMeasurement","heightError","isButtonDisabled","useMemo","useEffect","renderHeightInput","inputMode","heightInFt","heightInInch","Select","MenuItem","cmMeasurementUnit","ftMeasurementUnit","ProgressDots","totalSteps","currentStepIndex","activeColor","inactiveColor","secondaryColor","dots","Array","from","length","_","i","index","isActive","isCompleted","map","backgroundColor","StepsWrapper","currentStep","handleStepComplete","fullOrder","config","visibleSteps","setPreferredLanguage","useLocalConfig","language","unsupportedStep","absoluteIndex","indexOf","logo","src","alt","logoHeight","width","logoWidth","heading","headingFontFamily","headingFontSize","headingColor","headingFontWeight","onboarding","commonProps","OnboardingStep","Email","Name","Gender","Height","noValidSteps","renderStep","Onboarding","steps","resolveSteps","values","setValues","stepIndex","setStepIndex","s","updated","LanguageContextProvider","DevicesList","FocalLengthWrapper","deviceInfo","setDeviceInfo","brandName","model","manufacturerMenuItems","manufacturer","Object","keys","phoneModelMenuItems","brandMatch","find","phone","model_name","modelName","focalLength","focal_length","Header","subtitle","phoneModel","selectPhoneBrand","selectPhoneModel","selectedId","m","foundModel","FocalLength","MuseScreenRenderer","screenIndex","scanLinePosition","faceZoomed","showFaceScanLine","faceScanLinePosition","showLargeS","typewriterText","fullText","screens","videoToShow","faceScanVideo","sizeVideo","formFittingVideo","screen","componentProps","body","face","sizeFit","hasComponent","component","Comp","content","createElement","image","muted","loop","autoPlay","playsInline","preload","AnimatePresence","mode","motion","div","initial","opacity","y","animate","exit","transition","duration","MuseScreenStep","Body","title","bodyScan","description","bodyScanDescription","bodyScanPerson","Face","faceScan","faceScanDescription","faceScanPerson","left","top","SizeFit","leSableDress","Ready","readyToStart","readyToStartDescription","fittingGuide","MuseSteps","applicableScreens","gender","handleNext","currentScreen","setCurrentScreen","setScanLinePosition","setFaceZoomed","setFaceScanLinePosition","setShowFaceScanLine","currentOutfit","setCurrentOutfit","setTypewriterText","setShowLargeS","screensToShow","includes","screenId","outfitImages","animationRefs","useRef","scan","outfit","typewriter","cleanupAnimations","current","forEach","cancelAnimationFrame","clearTimeout","clearInterval","startTime","Date","now","animateScanLine","elapsed","progress","Math","min","requestAnimationFrame","setTimeout","animateFaceScanLine","setInterval","currentIndex","typeNextChar","slice","useMuseAnimations","OUTFIT_IMAGES","noTitle","subheading","subheadingFontFamily","subheadingFontSize","subheadingColor","subheadingFontWeight","maleScanVideo","femaleScanVideo","maleFaceScanVideo","maleSizeSuggestions","sizeSuggestions","maleFormFittingGuide","formFittingGuide","VolumeScreen","mousePosition","setMousePosition","x","isAnimationPaused","setIsAnimationPaused","handleMouseMove","clientX","clientY","window","addEventListener","removeEventListener","hexToRgba","hex","alpha","replace","split","h","parseInt","substring","brandColor","rgba1","rgba2","rgba3","holographicStyle","windowWidth","innerWidth","windowHeight","innerHeight","normalizedX","transform","boxShadow","calculateHolographicEffect","minHeight","minWidth","margin","animation","Volume2","turnUpVolume","continue","SetupScreen","phonePlacement","phonePlacementDescription","maleSetupVideo","setupVide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,KAAK,EACJ,OAAOO,EAACoW,GAAW,CAAChO,OAAQ3I,EAAgB0Q,OAAQA,GAAU9L,EAAWC,KAAM8L,WAAY7O,IAE5F,QACC,OAAOvB,UCrCGgX,GAA0C,EACrDN,WAAW,GACXtO,SACA+H,SAAS9L,EAAWC,KACpB/C,gBAGEvB,EAACyK,EAAuB,CAAA1K,SACtBC,EAACyW,GAAuB,CACtBC,SAAUA,EACVtO,OAAQA,EACR+H,OAAQA,EACR5O,WAAYA"}
1
+ {"version":3,"file":"index.mjs","sources":["../src/atoms/customInput/CustomInput.tsx","../src/components/onboarding/EmailStep.tsx","../src/components/onboarding/NameStep.tsx","../src/components/onboarding/GenderStep.tsx","../src/components/onboarding/HeightStep.tsx","../src/atoms/progressDots/ProgressDots.tsx","../src/components/onboarding/StepsWrapper.tsx","../src/components/onboarding/Onboarding.tsx","../src/utils/deviceFocalLengthJson/index.ts","../src/components/focalLength/FocalLengthWrapper.tsx","../src/components/focalLength/FocalLength.tsx","../src/components/educational/MuseSteps/MuseScreenRenderer.tsx","../src/components/educational/MuseSteps/index.tsx","../src/components/educational/MuseSteps/BodyScanAnimation.tsx","../src/components/educational/MuseSteps/FaceScanAnimation.tsx","../src/components/educational/MuseSteps/TypewritterScene.tsx","../src/customHooks/useMuseAnimation.ts","../src/components/educational/VolumeStep.tsx","../src/components/educational/SetupScreen.tsx","../src/components/educational/EducationalStepsWrapper.tsx","../src/components/educational/Educational.tsx"],"sourcesContent":["import * as React from \"react\";\n\n/** Lightweight classnames helper to avoid depending on ../../utils/utils */\nconst cn = (...classes: Array<string | false | null | undefined>) =>\n classes.filter(Boolean).join(\" \");\n\nexport interface CustomInputProps\n extends React.InputHTMLAttributes<HTMLInputElement> {\n className?: string;\n type?: string;\n resolvedConfig?: any;\n}\n\nconst CustomInput = React.forwardRef<HTMLInputElement, CustomInputProps>(\n ({ className, resolvedConfig, type, ...props }, ref) => (\n <>\n <input\n type={type}\n className={`${className ? className : ''} customInput ` + cn(\n \"flex w-full px-[.75rem] h-[40px] text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed backdrop-blur-sm bg-btn font-medium pl-[1rem] pr-[2.5rem] focus:ring-1 focus:outline-none transition-all duration-200\",\n \n )}\n autoCapitalize=\"off\"\n autoCorrect=\"off\"\n ref={ref}\n {...props}\n style={{\n background: resolvedConfig?.style?.input?.inputBackgroundColor || '#F9FAFC',\n color: resolvedConfig?.style?.input?.inputTextColor || '#000',\n fontSize: resolvedConfig?.style?.input?.inputFontSize || '16px',\n fontWeight: resolvedConfig?.style?.input?.inputFontWeight || '400',\n border: `1px solid ${resolvedConfig?.style?.input?.inputBorderColor || 'transparent'}`,\n fontFamily: resolvedConfig?.style?.base?.baseFontFamily || 'Inter, sans-serif',\n borderRadius: resolvedConfig?.style?.input?.inputBorderRadius || '4px',\n }}\n />\n <style>\n {`\n .customInput::placeholder {\n color: ${resolvedConfig?.style?.input?.inputPlaceholderColor || '#000'};\n font-weight: ${resolvedConfig?.style?.input?.inputFontWeight || '500'};\n opacity: 1;\n font-size: ${resolvedConfig?.style?.input?.inputFontSize || '14px'};\n }\n .customInput:focus-visible {\n box-shadow:0 0 0 2px white, 0 0 0 4px rgb(from currentColor r g b / 0.5);\n }\n \n `}\n </style>\n </>\n )\n );\n\n CustomInput.displayName = \"CustomInput\";\n\n export default CustomInput;\n","import CustomInput from \"../../atoms/customInput/CustomInput\";\nimport SpecificButton from \"../../atoms/specificButton/SpecificButton\";\nimport { LanguageContext } from \"../../utils/context/languageContext\";\nimport { LanguageKeys } from \"../../utils/languageKeys\";\nimport { handleErrorMessage, isValidEmail } from \"../../utils/utils\";\nimport { ArrowRight } from \"lucide-react\";\nimport React, { useContext } from \"react\";\n\ninterface EmailStepProps {\n\tonComplete: (value: any) => void;\n\tinitialValue?: any;\n\tresolvedConfig?: any;\n\tonStepComplete?: (value: any) => Promise<void> | void;\n}\n\nconst EmailStep = ({ onComplete, initialValue, resolvedConfig, onStepComplete }: EmailStepProps) => {\n\tconst [value, setValue] = React.useState(initialValue || \"\");\n\tconst [message, setMessage] = React.useState<string | undefined>(undefined);\n\tconst [loading, setLoading] = React.useState(false);\n\tconst { translate } = useContext(LanguageContext) || {};\n\tconst handleNext = async (e: React.FormEvent<HTMLFormElement>) => {\n\t\te.preventDefault();\n\t\tsetLoading(true);\n\t\ttry {\n\t\t\tif (!value.trim()) {\n\t\t\t\tsetMessage(translate?.(LanguageKeys.emailRequired));\n\t\t\t\treturn;\n\t\t\t} else if (!isValidEmail(value.trim())) {\n\t\t\t\tsetMessage(translate?.(LanguageKeys.validEmail));\n\t\t\t} else {\n\t\t\t\tawait onStepComplete?.(value);\n\t\t\t\tonComplete?.(value);\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tsetMessage(handleErrorMessage(error));\n\t\t} finally {\n\t\t\tsetLoading(false);\n\t\t}\n\t};\n\treturn (\n\t\t<div className=\"w-full max-w-md\">\n\t\t\t<form className=\"mt-[3.5rem]\" onSubmit={handleNext}>\n\t\t\t\t<div>\n\t\t\t\t\t<CustomInput\n\t\t\t\t\t\trequired\n\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\tid=\"name\"\n\t\t\t\t\t\tplaceholder={translate?.(LanguageKeys.enterEmail)}\n\t\t\t\t\t\tresolvedConfig={resolvedConfig}\n\t\t\t\t\t\tvalue={value}\n\t\t\t\t\t\tonChange={(e) => {\n\t\t\t\t\t\t\tsetMessage(undefined);\n\t\t\t\t\t\t\tsetValue(e.target.value);\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t\t{message && (\n\t\t\t\t\t\t<p\n\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\tcolor: resolvedConfig?.style?.input?.inputErrorColor || \"#000\",\n\t\t\t\t\t\t\t\tfontSize: resolvedConfig?.style?.input?.inputErrorFontSize || \"16px\",\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{message}\n\t\t\t\t\t\t</p>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t\t<div className=\"flex justify-end mt-[.5rem]\">\n\t\t\t\t\t<SpecificButton type=\"submit\" disabled={!value.trim() || loading} resolvedConfig={resolvedConfig} buttonText={translate?.(LanguageKeys.next)} postfixIcon={<ArrowRight size={14} />} />\n\t\t\t\t</div>\n\t\t\t</form>\n\t\t</div>\n\t);\n};\n\nexport default EmailStep;\n","import CustomInput from \"../../atoms/customInput/CustomInput\";\nimport SpecificButton from \"../../atoms/specificButton/SpecificButton\";\nimport { LanguageContext } from \"../../utils/context/languageContext\";\nimport { LanguageKeys } from \"../../utils/languageKeys\";\nimport { handleErrorMessage } from \"../../utils/utils\";\nimport { ArrowRight } from \"lucide-react\";\nimport React, { useContext } from \"react\";\n\ninterface NameStepProps {\n\tonComplete: (value: any) => void;\n\tinitialValue?: any;\n\tresolvedConfig?: any;\n\tonStepComplete?: (value: any) => Promise<void> | void;\n}\nconst NameStep = ({ onComplete, initialValue, resolvedConfig, onStepComplete }: NameStepProps) => {\n\tconst [value, setValue] = React.useState(initialValue || \"\");\n\tconst [message, setMessage] = React.useState<string | undefined>(undefined);\n\t const [loading, setLoading] = React.useState(false);\n\t const {translate} = useContext(LanguageContext)||{}\n\tconst handleNext = async (e: React.FormEvent<HTMLFormElement>) => {\n\t\te.preventDefault();\n\t\tsetLoading(true);\n\t\ttry {\n\t\t\tif (!value.trim()) {\n\t\t\t\tsetMessage(translate?.(LanguageKeys.nameRequired));\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\tawait onStepComplete?.(value);\n\t\t\t\tonComplete?.(value);\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tsetMessage(handleErrorMessage(error));\n\t\t}finally{\n\t\t\tsetLoading(false);\n\t\t}\n\t};\n\treturn (\n\t\t<div className=\"w-full max-w-md\">\n\t\t\t<form onSubmit={handleNext} className=\"mt-[3.5rem] mb-[.75rem]\">\n\t\t\t\t<div>\n\t\t\t\t\t<CustomInput\n\t\t\t\t\t\trequired\n\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\tid=\"name\"\n\t\t\t\t\t\tplaceholder={translate?.(LanguageKeys.enterName)}\n\t\t\t\t\t\tresolvedConfig={resolvedConfig}\n\t\t\t\t\t\tonChange={(e) => {\n\t\t\t\t\t\t\tsetValue(e.target.value);\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t\t{message && <p className=\"mt-[0.2rem] text-[16px]\"\n style={{\n color: resolvedConfig?.style?.input?.inputErrorColor || '#000',\n fontSize: resolvedConfig?.style?.input?.inputErrorFontSize || '16px',\n }}\n >{message}</p>}\n\t\t\t\t</div>\n\t\t\t\t<div className=\"flex justify-end mt-[.5rem]\">\n\t\t\t\t\t<SpecificButton disabled={!value.trim() || loading} resolvedConfig={resolvedConfig} buttonText={translate?.(LanguageKeys.next)} type=\"submit\" postfixIcon={<ArrowRight size={14} />} />\n\t\t\t\t</div>\n\t\t\t</form>\n\t\t</div>\n\t);\n};\n\nexport default NameStep;\n","import SpecificButton from \"../../atoms/specificButton/SpecificButton\";\nimport { GenderStepProps } from \"../../types/interfaces\";\nimport { LanguageContext } from \"../../utils/context/languageContext\";\nimport { GenderType } from \"../../utils/enums\";\nimport { LanguageKeys } from \"../../utils/languageKeys\";\nimport { handleErrorMessage } from \"../../utils/utils\";\nimport { ArrowRight } from \"lucide-react\";\nimport React, { useContext, useState } from \"react\";\n\nconst GenderStep = ({ onComplete, initialValue, resolvedConfig, onStepComplete }: GenderStepProps) => {\n\tconst [genderType, setGenderType] = useState<GenderType>(initialValue);\n\tconst [message, setMessage] = React.useState<string | undefined>(undefined);\n\tconst [loading, setLoading] = React.useState(false);\n\tconst { translate } = useContext(LanguageContext) || {};\n\n\tconst handleNext = async () => {\n\t\tsetLoading(true);\n\t\tsetMessage(undefined);\n\t\ttry {\n\t\t\tawait onStepComplete?.(genderType);\n\t\t\tonComplete?.(genderType);\n\t\t} catch (error) {\n\t\t\tconsole.log(error, \"gener\");\n\t\t\tsetMessage(handleErrorMessage(error));\n\t\t} finally {\n\t\t\tsetLoading(false);\n\t\t}\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<div className=\" w-full flex flex-col max-w-md mt-[3.5rem] mb-[.75rem] gap-[1rem]\">\n\t\t\t\t<button\n\t\t\t\t\tclassName={` text-btnSize bg-btn text-base cursor-pointer text-sm border leading-none rounded-[.375rem] focus-visible:ring-secondary p-[1rem] ${\n\t\t\t\t\t\tgenderType === GenderType.Male ? ` shadow-[0_1px_1px_rgba(0,0,0,0.251)]` : \"\"\n\t\t\t\t\t}`}\n\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\tsetGenderType(GenderType.Male);\n\t\t\t\t\t\tsetMessage(undefined);\n\t\t\t\t\t}}\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\tbackground: resolvedConfig?.style?.input?.inputBackgroundColor || \"#F9FAFC\",\n\t\t\t\t\t\tcolor: resolvedConfig?.style?.input?.inputTextColor || \"#000\",\n\t\t\t\t\t\tfontSize: resolvedConfig?.style?.input?.inputFontSize || \"16px\",\n\t\t\t\t\t\tfontWeight: resolvedConfig?.style?.input?.inputFontWeight || \"400\",\n\t\t\t\t\t\tborder: `1px solid ${genderType === GenderType.Male ? resolvedConfig?.style?.base?.primaryColor : `transparent`}`,\n\t\t\t\t\t\tfontFamily: resolvedConfig?.style?.base?.baseFontFamily || \"Inter, sans-serif\",\n\t\t\t\t\t\tborderRadius: resolvedConfig?.style?.input?.inputBorderRadius || \"4px\",\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t{translate?.(LanguageKeys.mens)}\n\t\t\t\t</button>\n\t\t\t\t<button\n\t\t\t\t\tclassName={`text-btnSize font-btnFont cursor-pointer leading-none rounded-[.375rem] focus-visible:ring-secondary p-[1rem] ${\n\t\t\t\t\t\tgenderType === GenderType.Female ? ` shadow-[0_1px_1px_rgba(0,0,0,0.251)]` : \"\"\n\t\t\t\t\t}`}\n\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\tsetGenderType(GenderType.Female);\n\t\t\t\t\t\tsetMessage(undefined);\n\t\t\t\t\t}}\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\tbackground: resolvedConfig?.style?.input?.inputBackgroundColor || \"#F9FAFC\",\n\t\t\t\t\t\tcolor: resolvedConfig?.style?.input?.inputTextColor || \"#000\",\n\t\t\t\t\t\tfontSize: resolvedConfig?.style?.input?.inputFontSize || \"16px\",\n\t\t\t\t\t\tfontWeight: resolvedConfig?.style?.input?.inputFontWeight || \"400\",\n\t\t\t\t\t\tborder: `1px solid ${genderType === GenderType.Female ? resolvedConfig?.style?.base?.primaryColor : `transparent`}`,\n\t\t\t\t\t\tfontFamily: resolvedConfig?.style?.base?.baseFontFamily || \"Inter, sans-serif\",\n\t\t\t\t\t\tborderRadius: resolvedConfig?.style?.input?.inputBorderRadius || \"4px\",\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t{translate?.(LanguageKeys.womens)}\n\t\t\t\t</button>\n\t\t\t\t{message && (\n\t\t\t\t\t<p\n\t\t\t\t\t\tclassName=\"mt-[0.2rem]\"\n\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\tcolor: resolvedConfig?.style?.input?.inputErrorColor || \"#000\",\n\t\t\t\t\t\t\tfontSize: resolvedConfig?.style?.input?.inputErrorFontSize || \"16px\",\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t{message}\n\t\t\t\t\t</p>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t\t<div className=\"flex justify-end mt-[.5rem]\">\n\t\t\t\t<SpecificButton\n\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\tresolvedConfig={resolvedConfig}\n\t\t\t\t\tbuttonText={translate?.(LanguageKeys.next)}\n\t\t\t\t\tpostfixIcon={<ArrowRight size={14} />}\n\t\t\t\t\tdisabled={!genderType || loading}\n\t\t\t\t\tbuttonFunc={handleNext}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</>\n\t);\n};\n\nexport default GenderStep;\n","import CustomInput from \"../../atoms/customInput/CustomInput\";\nimport SpecificButton from \"../../atoms/specificButton/SpecificButton\";\nimport { HeightStepProps } from \"../../types/interfaces\";\nimport { LanguageContext } from \"../../utils/context/languageContext\";\nimport { LanguageKeys } from \"../../utils/languageKeys\";\nimport { convertToCentimeters, handleErrorMessage } from \"../../utils/utils\";\nimport { MenuItem, Select } from \"@mui/material\";\nimport { ArrowRight } from \"lucide-react\";\nimport { useCallback, useContext, useEffect, useMemo, useState } from \"react\";\n\nconst HeightStep = ({ onComplete, initialValue, resolvedConfig, onStepComplete }: HeightStepProps) => {\n\tconst [localHeight, setLocalHeight] = useState({ cm: initialValue ? String(initialValue) : \"\", ft: \"\", inch: \"\" });\n\tconst [measurementUnit, setMeasurementUnit] = useState(\"cm\");\n\tconst [message, setMessage] = useState<string | undefined>(undefined);\n\tconst { translate, preferredLanguage } = useContext(LanguageContext) || {};\n\tconst handleSetHeight = useCallback(\n\t\t(event: React.ChangeEvent<HTMLInputElement>) => {\n\t\t\tsetMessage(undefined);\n\t\t\tif (measurementUnit === \"cm\") {\n\t\t\t\tsetLocalHeight((prev) => ({ ...prev, cm: event.target.value, ft: \"\", inch: \"\" }));\n\t\t\t} else if (event.target.id === \"ft\") {\n\t\t\t\tsetLocalHeight((prev) => ({ ...prev, ft: event.target.value, cm: \"\" }));\n\t\t\t} else {\n\t\t\t\tsetLocalHeight((prev) => ({ ...prev, inch: event.target.value, cm: \"\" }));\n\t\t\t}\n\t\t},\n\t\t[measurementUnit],\n\t);\n\n\tconst handleMeasurementUnit = useCallback((event: any) => {\n\t\tconst val = event.target.value;\n\t\tsetMeasurementUnit(val);\n\t\tsetLocalHeight({ cm: \"\", ft: \"\", inch: \"\" });\n\t\tsetMessage(undefined);\n\t}, []);\n\tconst validateHeight = useCallback(\n\t\t(height: { cm: string; ft: string; inch: string }) => {\n\t\t\tif (measurementUnit === \"cm\") {\n\t\t\t\treturn !(+height.cm < 152.4 || +height.cm > 213.36);\n\t\t\t}\n\t\t\treturn !(convertToCentimeters(+height.ft, +height.inch) < 152.4 || convertToCentimeters(+height.ft, +height.inch) > 213.36);\n\t\t},\n\t\t[measurementUnit],\n\t);\n\n\tconst checkMeasurement = useCallback(async () => {\n\t\ttry {\n\t\t\tif (!validateHeight(localHeight)) {\n\t\t\t\t// setError(true);\n\t\t\t\tsetMessage(translate?.(LanguageKeys.heightError));\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst height = { cm: +localHeight.cm, ft: +localHeight.ft, inch: +localHeight.inch };\n\t\t\tawait onStepComplete?.(height);\n\t\t\tonComplete?.(height);\n\t\t} catch (error) {\n\t\t\tsetMessage(handleErrorMessage(error));\n\t\t}\n\t}, [localHeight, validateHeight, onStepComplete]);\n\tconst isButtonDisabled = useMemo(() => (!localHeight.cm && !localHeight.ft && !localHeight.inch) || !!message, [localHeight, message]);\n\tuseEffect(() => {\n\t\tif (localHeight.cm === \"\" && localHeight.ft !== \"\") {\n\t\t\tsetMeasurementUnit(\"ft\");\n\t\t}\n\t}, [localHeight]);\n\tconst renderHeightInput = useCallback(() => {\n\t\tif (measurementUnit === \"cm\") {\n\t\t\treturn (\n\t\t\t\t<div className={`w-full`}>\n\t\t\t\t\t<CustomInput\n\t\t\t\t\t\trequired\n\t\t\t\t\t\t// variant=\"filled\"\n\t\t\t\t\t\ttype=\"number\"\n\t\t\t\t\t\tid=\"cm\"\n\t\t\t\t\t\tplaceholder={translate?.(LanguageKeys.height)}\n\t\t\t\t\t\tclassName=\"!pr-[10px]\"\n\t\t\t\t\t\tinputMode=\"numeric\"\n\t\t\t\t\t\tvalue={localHeight.cm}\n\t\t\t\t\t\tonChange={handleSetHeight}\n\t\t\t\t\t\tresolvedConfig={resolvedConfig}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t);\n\t\t} else {\n\t\t\treturn (\n\t\t\t\t<div className=\"flex gap-[.5rem]\">\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<CustomInput\n\t\t\t\t\t\t\trequired\n\t\t\t\t\t\t\t// variant=\"filled\"\n\t\t\t\t\t\t\ttype=\"number\"\n\t\t\t\t\t\t\tid=\"ft\"\n\t\t\t\t\t\t\t// error={error}\n\t\t\t\t\t\t\tclassName=\"!pr-[10px]\"\n\t\t\t\t\t\t\tplaceholder={translate?.(LanguageKeys.heightInFt)}\n\t\t\t\t\t\t\tvalue={localHeight.ft}\n\t\t\t\t\t\t\tonChange={handleSetHeight}\n\t\t\t\t\t\t\tresolvedConfig={resolvedConfig}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<CustomInput\n\t\t\t\t\t\t\trequired\n\t\t\t\t\t\t\t// variant=\"filled\"\n\t\t\t\t\t\t\ttype=\"number\"\n\t\t\t\t\t\t\tid=\"inch\"\n\t\t\t\t\t\t\t// error={error}\n\t\t\t\t\t\t\tclassName=\"!pr-[10px]\"\n\t\t\t\t\t\t\tplaceholder={translate?.(LanguageKeys.heightInInch)}\n\t\t\t\t\t\t\tvalue={localHeight.inch}\n\t\t\t\t\t\t\tonChange={handleSetHeight}\n\t\t\t\t\t\t\tresolvedConfig={resolvedConfig}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t);\n\t\t}\n\t}, [localHeight, preferredLanguage]);\n\treturn (\n\t\t<div className=\"h-full w-full\">\n\t\t\t<div className=\"mt-[3.5rem] mb-[.75rem]\">\n\t\t\t\t<div className=\"w-full flex gap-[.5rem]\">\n\t\t\t\t\t{renderHeightInput()}\n\t\t\t\t\t<Select\n\t\t\t\t\t\tclassName=\"bg-btn outline-none h-[40px] [&_svg]:text-base !shadow-none !outline-none !text-base\"\n\t\t\t\t\t\tvalue={measurementUnit}\n\t\t\t\t\t\tonChange={handleMeasurementUnit}\n\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\tbackground: resolvedConfig?.style?.input?.inputBackgroundColor || \"#F9FAFC\",\n\t\t\t\t\t\t\tcolor: resolvedConfig?.style?.input?.inputTextColor || \"#000\",\n\t\t\t\t\t\t\tfontSize: resolvedConfig?.style?.input?.inputFontSize || \"16px\",\n\t\t\t\t\t\t\tfontWeight: resolvedConfig?.style?.input?.inputFontWeight || \"400\",\n\t\t\t\t\t\t\tborder: `1px solid ${resolvedConfig?.style?.input?.inputBorderColor || \"transparent\"}`,\n\t\t\t\t\t\t\tfontFamily: resolvedConfig?.style?.base?.baseFontFamily || \"Inter, sans-serif\",\n\t\t\t\t\t\t\tborderRadius: resolvedConfig?.style?.input?.inputBorderRadius || \"4px\",\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t<MenuItem value=\"cm\">{translate?.(LanguageKeys.cmMeasurementUnit)}</MenuItem>\n\t\t\t\t\t\t<MenuItem value=\"ft\">{translate?.(LanguageKeys.ftMeasurementUnit)}</MenuItem>\n\t\t\t\t\t</Select>\n\t\t\t\t\t<style>\n\t\t\t\t\t\t{`\n .MuiOutlinedInput-notchedOutline {\n border: 1px solid ${resolvedConfig?.style?.input?.inputBorderColor || \"transparent\"} !important;\n outline: none;\n }\n .MuiSelect-select{\n outline: none;\n }\n \n `}\n\t\t\t\t\t</style>\n\t\t\t\t</div>\n\t\t\t\t<div\n\t\t\t\t\tclassName=\"mt-2\"\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\tcolor: resolvedConfig?.style?.input?.inputErrorColor || \"#000\",\n\t\t\t\t\t\tfontSize: resolvedConfig?.style?.input?.inputErrorFontSize || \"16px\",\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t{message}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div className=\"flex justify-end\">\n\t\t\t\t<SpecificButton resolvedConfig={resolvedConfig} disabled={isButtonDisabled} buttonFunc={checkMeasurement} buttonText={translate?.(LanguageKeys.next)} postfixIcon={<ArrowRight size={14} />} />\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nexport default HeightStep;\n","import React, { useMemo } from \"react\";\n\ninterface ProgressDotsProps {\n totalSteps: number;\n currentStepIndex: number;\n resolvedConfig?: any;\n}\n\nconst ProgressDots: React.FC<ProgressDotsProps> = ({\n totalSteps,\n currentStepIndex,\n resolvedConfig\n}) => {\n const activeColor = resolvedConfig?.style?.base?.primaryColor || \"#000\";\n const inactiveColor = resolvedConfig?.style?.base?.secondaryColor || \"#D9D9D9\";\n\n const dots = useMemo(\n () =>\n Array.from({ length: totalSteps }, (_, i) => ({\n index: i,\n isActive: i === currentStepIndex,\n isCompleted: i < currentStepIndex\n })),\n [totalSteps, currentStepIndex]\n );\n\n return (\n <div className=\"flex justify-center items-center gap-[4px] my-[1.5rem]\">\n {dots.map(({ index, isActive, isCompleted }) => (\n <div\n key={index}\n className={`h-[3px] rounded-[9999px] transition-all duration-300 ${\n isActive ? \"w-[50px]\" : \"w-[30px]\"\n }`}\n style={{\n backgroundColor: isCompleted || isActive ? activeColor : inactiveColor\n }}\n />\n ))}\n </div>\n );\n};\n\nexport default ProgressDots;\n","import { useContext, useEffect } from \"react\";\nimport EmailStep from \"./EmailStep\";\nimport NameStep from \"./NameStep\";\nimport GenderStep from \"./GenderStep\";\nimport HeightStep from \"./HeightStep\";\nimport { OnboardingStep } from \"../../utils/enums\";\nimport { Config, Step } from \"../../types/interfaces\";\nimport { LanguageContext } from \"../../utils/context/languageContext\";\nimport { LanguageKeys } from \"../../utils/languageKeys\";\nimport ProgressDots from \"../../atoms/progressDots/ProgressDots\";\nimport { useLocalConfig } from \"../../config/useLocalConfig\";\n\nconst StepsWrapper = ({\n currentStep,\n handleStepComplete,\n fullOrder,\n config,\n visibleSteps = [],\n}: {\n currentStep: Step;\n handleStepComplete: (val: any) => void;\n fullOrder: any;\n config?: Config;\n visibleSteps?: Step[];\n}) => {\n const { setPreferredLanguage, translate } = useContext(LanguageContext) || {};\n const resolvedConfig = useLocalConfig(config);\n\n const renderStep = () => {\n if (!currentStep) return null;\n\n const commonProps = {\n resolvedConfig,\n initialValue: currentStep.value,\n onComplete: handleStepComplete,\n onStepComplete: currentStep?.onStepComplete,\n };\n\n switch (currentStep.type) {\n case OnboardingStep.Email:\n return <EmailStep {...commonProps} />;\n case OnboardingStep.Name:\n return <NameStep {...commonProps} />;\n case OnboardingStep.Gender:\n return <GenderStep {...commonProps} />;\n case OnboardingStep.Height:\n return <HeightStep {...commonProps} />;\n default:\n return (\n <div>\n {translate?.(LanguageKeys.noValidSteps)} {currentStep.type}\n </div>\n );\n }\n };\n\n useEffect(() => {\n setPreferredLanguage?.(resolvedConfig.language);\n }, [resolvedConfig]);\n\n if (!visibleSteps.length)\n return <div>{translate?.(LanguageKeys.unsupportedStep)}</div>;\n\n /** 7️⃣ The dot index must never depend on resolved visibility */\n const absoluteIndex = currentStep ? fullOrder.indexOf(currentStep.type) : 0;\n\n return (\n <>\n <div\n id=\"swan-onboarding-bg\"\n style={{ background: resolvedConfig?.style?.base?.backgroundColor }}\n className=\"fixed w-full h-full z-[0] pointer-events-none top-0 left-0\"\n ></div>\n\n <div className=\"px-[15px] relative pt-[15px] w-full flex items-center flex-col\">\n <div className=\"max-w-[28rem] mx-auto w-full\">\n {/* Logo */}\n {resolvedConfig?.logo && (\n <div className=\"text-center mb-[1rem] flex justify-center\">\n <img\n src={resolvedConfig?.logo}\n alt=\"logo\"\n style={{\n height: resolvedConfig?.style?.logo?.logoHeight,\n width: resolvedConfig?.style?.logo?.logoWidth,\n }}\n className=\"h-10 mx-auto\"\n />\n </div>\n )}\n\n {/* Progress Dots */}\n <ProgressDots\n resolvedConfig={resolvedConfig}\n totalSteps={fullOrder.length}\n currentStepIndex={absoluteIndex}\n />\n\n {/* Heading */}\n <h1\n style={{\n fontFamily:\n resolvedConfig?.style?.heading?.headingFontFamily ||\n \"SeriouslyNostalgic Fn\",\n fontSize: resolvedConfig?.style?.heading?.headingFontSize || \"32px\",\n color: resolvedConfig?.style?.heading?.headingColor || \"#000\",\n fontWeight:\n resolvedConfig?.style?.heading?.headingFontWeight || \"normal\",\n }}\n className=\"text-center pt-[1.5rem]\"\n >\n {translate?.(LanguageKeys.onboarding[currentStep?.type || \"heading\"])}\n </h1>\n\n {/* Step */}\n {renderStep()}\n </div>\n </div>\n </>\n );\n};\n\nexport default StepsWrapper;\n","\"use client\";\nimport React, { useState, useMemo, useCallback } from \"react\";\nimport { OnboardingProps } from \"../../types/interfaces\";\nimport { resolveSteps } from \"../../utils/utils\";\nimport LanguageContextProvider from \"../../utils/context/languageContext\";\nimport StepsWrapper from \"./StepsWrapper\";\n\nexport const Onboarding: React.FC<OnboardingProps> = ({\n steps,\n config,\n onComplete,\n}) => {\n const visibleSteps = useMemo(() => resolveSteps(steps), [steps]);\n const [values, setValues] = useState<Record<string, any>>({});\n const [stepIndex, setStepIndex] = useState(0);\n const currentStep = visibleSteps[stepIndex];\n const fullOrder = steps.map((s) => s.type);\n\n /** 4️⃣ Handle completion for a step */\n const handleStepComplete = useCallback(\n (value: any) => {\n if (!currentStep) return;\n const updated = { ...values, [currentStep.type]: value };\n setValues(updated);\n if (stepIndex === visibleSteps.length - 1) {\n onComplete?.(updated);\n } else {\n setStepIndex((prev) => prev + 1); // 👈 FIX\n }\n },\n [currentStep, values, stepIndex, visibleSteps.length, onComplete]\n );\n\n if (!visibleSteps.length)\n return <div>No steps configured for onboarding.</div>;\n\n return (\n <LanguageContextProvider>\n <StepsWrapper\n currentStep={currentStep}\n handleStepComplete={handleStepComplete}\n visibleSteps={visibleSteps}\n fullOrder={fullOrder}\n config={config}\n />\n </LanguageContextProvider>\n );\n};\n","import Alcatel from \"./Alcatel.json\"\nimport Apple from \"./Apple.json\"\nimport CAT from \"./CAT.json\"\nimport Fairphone from \"./Fairphone.json\"\nimport Fujitsu from \"./Fujitsu.json\"\nimport Google from \"./Google.json\"\nimport Huawei from \"./Huawei.json\"\nimport iTel from \"./iTel.json\"\nimport Lava from \"./Lava.json\"\nimport Lg from \"./Lg.json\"\nimport Motorola from \"./Motorola.json\"\nimport NokiaHmd from \"./NokiaHmd.json\"\nimport Nothing from \"./Nothing.json\"\nimport Olla from \"./Olla.json\"\nimport Oneplus from \"./Oneplus.json\"\nimport Oppo from \"./Oppo.json\"\nimport Realme from \"./Realme.json\"\nimport Samsung from \"./Samsung.json\"\nimport Sharp from \"./Sharp.json\"\nimport Sony from \"./Sony.json\"\nimport Tecno from \"./Tecno.json\"\nimport Vivo from \"./Vivo.json\"\nimport Vsmart from \"./Vsmart.json\"\nimport Wiko from \"./Wiko.json\"\nimport Xiaomi from \"./Xiaomi.json\"\n\n\n\n\nconst DevicesList=[\n Alcatel,Apple,CAT,Fairphone,Fujitsu,Google,Huawei,iTel,Lava,Lg,Motorola,NokiaHmd,Nothing,Olla,Oneplus,Oppo,Realme,Samsung,Sharp,Sony,\n Tecno,Vivo,Vsmart,Wiko,Xiaomi\n\n]\n \n\nexport default DevicesList\n","import { useCallback, useContext, useEffect, useState } from \"react\";\nimport { LanguageContext } from \"../../utils/context/languageContext\";\nimport Header from \"../Header\";\nimport { MenuItem, Select } from \"@mui/material\";\nimport SpecificButton from \"../../atoms/specificButton/SpecificButton\";\nimport { ArrowRight } from \"lucide-react\";\nimport { useLocalConfig } from \"../../config/useLocalConfig\";\nimport { FocalLengthProps } from \"../../types/interfaces\";\nimport DevicesList from \"../../utils/deviceFocalLengthJson\";\nimport { handleErrorMessage } from \"../../utils/utils\";\nimport { LanguageKeys } from \"../../utils/languageKeys\";\n\ntype PhoneModel = {\n\tid: number;\n\tmodel_name: string;\n\tfocal_length: number;\n};\n\ntype DeviceManufacturer = Record<string, PhoneModel[]>;\ntype DevicesListType = DeviceManufacturer[];\n\nconst FocalLengthWrapper = ({ config, initialValue, onComplete }: FocalLengthProps) => {\n\tconst { translate, setPreferredLanguage } = useContext(LanguageContext) || {};\n\tconst resolvedConfig = useLocalConfig(config);\n\tconst [deviceInfo, setDeviceInfo] = useState({\n\t\tbrandName: initialValue?.brandName ?? \"\",\n\t\tmodel: initialValue?.model ?? (null as PhoneModel | null),\n\t});\n\tconst [message, setMessage] = useState<string | undefined>(undefined);\n\tconst [loading, setLoading] = useState(false);\n\n\t/* ------------ Brand Menu ------------ */\n\tconst manufacturerMenuItems = useCallback(() => {\n\t\treturn (DevicesList as DevicesListType).map((manufacturer) => {\n\t\t\tconst brandName = Object.keys(manufacturer)[0];\n\t\t\treturn (\n\t\t\t\t<MenuItem key={brandName} value={brandName}>\n\t\t\t\t\t{brandName}\n\t\t\t\t</MenuItem>\n\t\t\t);\n\t\t});\n\t}, []);\n\n\t/* ------------ Model Menu ------------ */\n\tconst phoneModelMenuItems = useCallback(() => {\n\t\tconst brandMatch = (DevicesList as DevicesListType).find((manufacturer) => {\n\t\t\tconst key = Object.keys(manufacturer)[0];\n\t\t\treturn key === deviceInfo.brandName;\n\t\t});\n\n\t\tif (!brandMatch) return null;\n\n\t\tconst key = Object.keys(brandMatch)[0];\n\t\tconst models = brandMatch[key];\n\n\t\treturn models.map((phone) => (\n\t\t\t<MenuItem key={phone.id} value={phone.id}>\n\t\t\t\t{phone.model_name}\n\t\t\t</MenuItem>\n\t\t));\n\t}, [deviceInfo.brandName]);\n\n\tconst handleStepComplete = useCallback(async () => {\n\t\tsetLoading(true);\n\t\ttry {\n\t\t\tif (deviceInfo.brandName && deviceInfo.model) {\n\t\t\t\tawait onComplete?.({\n\t\t\t\t\tbrandName: deviceInfo.brandName,\n\t\t\t\t\tmodelName: deviceInfo.model.model_name,\n\t\t\t\t\tfocalLength: deviceInfo.model.focal_length,\n\t\t\t\t});\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tsetMessage(handleErrorMessage(error));\n\t\t} finally {\n\t\t\tsetLoading(false);\n\t\t}\n\t}, [deviceInfo]);\n\n\t/* ------------ Brand Change ------------ */\n\tconst handleBrandChange = (event: any) => {\n\t\tsetDeviceInfo({\n\t\t\tbrandName: event.target.value,\n\t\t\tmodel: null,\n\t\t});\n\t};\n\n\t/* ------------ Model Change ------------ */\n\tconst handleModelChange = (event: any) => {\n\t\tconst selectedId = event.target.value;\n\n\t\tconst brandMatch = (DevicesList as DevicesListType).find((m) => {\n\t\t\treturn Object.keys(m)[0] === deviceInfo.brandName;\n\t\t});\n\n\t\tif (!brandMatch) return;\n\n\t\tconst key = Object.keys(brandMatch)[0];\n\t\tconst models = brandMatch[key];\n\n\t\tconst foundModel = models.find((phone) => phone.id === selectedId);\n\n\t\tsetDeviceInfo((prev) => ({\n\t\t\t...prev,\n\t\t\tmodel: foundModel ?? null,\n\t\t}));\n\t};\n\n\tuseEffect(() => {\n\t\tsetPreferredLanguage?.(resolvedConfig?.language);\n\t}, [resolvedConfig]);\n\n\treturn (\n\t\t<div\n\t\t\tclassName=\"h-full flex-col max-w-md mx-auto pt-[1rem] p-[15px] w-full flex justify-start items-start text-center rounded-t-[20px]\"\n\t\t\tstyle={{ background: resolvedConfig?.style?.base?.backgroundColor }}\n\t\t>\n\t\t\t<div className=\"w-full max-w-[28rem] mx-auto\">\n\t\t\t\t<Header subtitle={translate?.(LanguageKeys.phoneModel)} resolvedConfig={resolvedConfig} />\n\t\t\t\t<div className=\"text-left mb-[.25rem] mt-[1rem]\">{translate?.(LanguageKeys.selectPhoneBrand)}</div>\n\n\t\t\t\t<Select\n\t\t\t\t\tonChange={handleBrandChange}\n\t\t\t\t\tclassName=\"w-full h-[40px] !shadow-none !outline-none text-left\"\n\t\t\t\t\tvalue={deviceInfo.brandName}\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\tbackground: resolvedConfig?.style?.input?.inputBackgroundColor || \"#F9FAFC\",\n\t\t\t\t\t\tcolor: resolvedConfig?.style?.input?.inputTextColor || \"#000\",\n\t\t\t\t\t\tfontSize: resolvedConfig?.style?.input?.inputFontSize || \"16px\",\n\t\t\t\t\t\tfontWeight: resolvedConfig?.style?.input?.inputFontWeight || \"400\",\n\t\t\t\t\t\tborder: `1px solid ${resolvedConfig?.style?.input?.inputBorderColor || \"transparent\"}`,\n\t\t\t\t\t\tfontFamily: resolvedConfig?.style?.base?.baseFontFamily || \"Inter, sans-serif\",\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t{manufacturerMenuItems()}\n\t\t\t\t</Select>\n\n\t\t\t\t<div className=\"text-left mb-[.25rem] mt-[1rem]\">{translate?.(LanguageKeys.selectPhoneModel)}</div>\n\n\t\t\t\t<Select\n\t\t\t\t\tonChange={handleModelChange}\n\t\t\t\t\tclassName=\"w-full bg-btn h-[40px] !shadow-none !outline-none text-left\"\n\t\t\t\t\tvalue={deviceInfo.model?.id || \"\"}\n\t\t\t\t\tdisabled={!deviceInfo.brandName}\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\tbackground: resolvedConfig?.style?.input?.inputBackgroundColor || \"#F9FAFC\",\n\t\t\t\t\t\tcolor: resolvedConfig?.style?.input?.inputTextColor || \"#000\",\n\t\t\t\t\t\tfontSize: resolvedConfig?.style?.input?.inputFontSize || \"16px\",\n\t\t\t\t\t\tfontWeight: resolvedConfig?.style?.input?.inputFontWeight || \"400\",\n\t\t\t\t\t\tborder: `1px solid ${resolvedConfig?.style?.input?.inputBorderColor || \"transparent\"}`,\n\t\t\t\t\t\tfontFamily: resolvedConfig?.style?.base?.baseFontFamily || \"Inter, sans-serif\",\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t{phoneModelMenuItems()}\n\t\t\t\t</Select>\n\t\t\t\t<style>\n\t\t\t\t\t{`\n .MuiOutlinedInput-notchedOutline {\n border: 1px solid ${resolvedConfig?.style?.input?.inputBorderColor || \"transparent\"} !important;\n outline: none;\n }\n .MuiSelect-select{\n outline: none;\n }\n \n `}\n\t\t\t\t</style>\n\t\t\t\t{message && <p className=\"mt-[0.2rem] text-[16px]\">{message}</p>}\n\t\t\t</div>\n\n\t\t\t<div className=\"mt-[.75rem] mb-[1.25rem] max-w-[28rem] mx-auto w-full flex justify-end\">\n\t\t\t\t<SpecificButton\n\t\t\t\t\tdisabled={!deviceInfo?.brandName || !deviceInfo?.model || loading}\n\t\t\t\t\tpostfixIcon={<ArrowRight />}\n\t\t\t\t\tresolvedConfig={resolvedConfig}\n\t\t\t\t\tbuttonFunc={handleStepComplete}\n\t\t\t\t\tbuttonText={translate?.(LanguageKeys.next)}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nexport default FocalLengthWrapper;\n","import React from \"react\";\nimport FocalLengthWrapper from \"./FocalLengthWrapper\";\nimport { FocalLengthProps } from \"../../types/interfaces\";\nimport LanguageContextProvider from \"../../utils/context/languageContext\";\n\nexport const FocalLength: React.FC<FocalLengthProps> = ({\n onComplete,\n initialValue,\n config,\n}: FocalLengthProps) => {\n return (\n <LanguageContextProvider>\n <FocalLengthWrapper\n config={config}\n onComplete={onComplete}\n initialValue={initialValue}\n />\n </LanguageContextProvider>\n );\n};\n","import React from \"react\";\nimport { motion, AnimatePresence } from \"framer-motion\";\n\nexport default function MuseScreenRenderer({\n\tscreenIndex,\n\tscanLinePosition,\n\tfaceZoomed,\n\tshowFaceScanLine,\n\tfaceScanLinePosition,\n\tshowLargeS,\n\ttypewriterText,\n\tfullText,\n\tscreens,\n\tvideoToShow,\n\tfaceScanVideo,\n\tsizeVideo,\n\tformFittingVideo,\n}: any) {\n\tconst screen = screens[screenIndex];\n\n\t// Map screen id to props for each component\n\tconst componentProps: any = {\n\t\tbody: { scanLinePosition, videoToShow },\n\t\tface: {\n\t\t\tfaceZoomed,\n\t\t\tshowFaceScanLine,\n\t\t\tfaceScanLinePosition,\n\t\t\tfaceScanVideo,\n\t\t},\n\t\tsizeFit: { showLargeS, typewriterText, fullText, sizeVideo },\n\t};\n\n\tconst hasComponent = !!screen.component;\n\tconst Comp = hasComponent ? screen.component : null;\n\n\tlet content = null;\n\tif (hasComponent) {\n\t\tcontent = React.createElement(Comp.type || Comp, componentProps[screen.id] || {});\n\t} else if (screen.image) {\n\t\tcontent = (\n\t\t\t<video className=\"h-full w-full object-contain border-none\" muted loop autoPlay playsInline preload=\"auto\">\n\t\t\t\t<source src={formFittingVideo} type=\"video/mp4\" />\n\t\t\t</video>\n\t\t);\n\t}\n\n\treturn (\n\t\t<AnimatePresence mode=\"wait\">\n\t\t\t<motion.div key={screenIndex} initial={{ opacity: 0, y: 20 }} animate={{ opacity: 1, y: 0 }} exit={{ opacity: 0, y: -20 }} transition={{ duration: 0.4 }} className=\"w-full h-full\">\n\t\t\t\t{content}\n\t\t\t</motion.div>\n\t\t</AnimatePresence>\n\t);\n}\n","import { ArrowRight } from \"lucide-react\";\nimport BodyScanAnimation from \"./BodyScanAnimation\";\nimport FaceScanAnimation from \"./FaceScanAnimation\";\nimport TypewriterScene from \"./TypewritterScene\";\nimport { useContext, useMemo, useState } from \"react\";\nimport MuseScreenRenderer from \"./MuseScreenRenderer\";\nimport Header from \"../../Header\";\nimport { GenderType, MuseScreenStep } from \"../../../utils/enums\";\nimport {\n bodyScanPerson,\n faceScanPerson,\n faceScanVideo,\n femaleScanVideo,\n fittingGuide,\n formFittingGuide,\n fullText,\n leSableDress,\n maleFaceScanVideo,\n maleFormFittingGuide,\n maleScanVideo,\n maleSizeSuggestions,\n OUTFIT_IMAGES,\n sizeSuggestions,\n} from \"../../..//utils/constants\";\nimport { MuseStepsProps } from \"../../../types/interfaces\";\nimport useMuseAnimations from \"../../../customHooks/useMuseAnimation\";\nimport SpecificButton from \"../../../atoms/specificButton/SpecificButton\";\nimport { LanguageKeys } from \"../../../utils/languageKeys\";\nimport { LanguageContext } from \"../../../utils/context/languageContext\";\n\nconst screens: {\n id: string;\n title: string;\n description: string;\n image: string;\n component?: React.ReactNode;\n}[] = [\n {\n id: MuseScreenStep.Body,\n title: LanguageKeys.bodyScan,\n description: LanguageKeys.bodyScanDescription,\n image: bodyScanPerson,\n component: <BodyScanAnimation />,\n },\n {\n id: MuseScreenStep.Face,\n title: LanguageKeys.faceScan,\n description: LanguageKeys.faceScanDescription,\n image: faceScanPerson,\n component: <FaceScanAnimation />,\n },\n {\n id: MuseScreenStep.SizeFit,\n title: LanguageKeys.sizeFit,\n description: \"\",\n image: leSableDress,\n component: <TypewriterScene />,\n },\n {\n id: MuseScreenStep.Ready,\n title: LanguageKeys.readyToStart,\n description: LanguageKeys.readyToStartDescription,\n image: fittingGuide,\n },\n];\n\nexport default function MuseSteps({\n applicableScreens,\n config,\n gender,\n handleNext,\n}: MuseStepsProps) {\n const { translate } = useContext(LanguageContext) || {};\n const [currentScreen, setCurrentScreen] = useState(0);\n const [scanLinePosition, setScanLinePosition] = useState(0);\n const [faceZoomed, setFaceZoomed] = useState(false);\n const [faceScanLinePosition, setFaceScanLinePosition] = useState(0);\n const [showFaceScanLine, setShowFaceScanLine] = useState(false);\n const [currentOutfit, setCurrentOutfit] = useState(0);\n const [typewriterText, setTypewriterText] = useState(\"\");\n const [showLargeS, setShowLargeS] = useState(false);\n\n const screensToShow = useMemo(() => {\n if (!applicableScreens?.length) {\n return screens;\n }\n return screens.filter((screen) => applicableScreens.includes(screen.id));\n }, [applicableScreens]);\n\n useMuseAnimations({\n screenId: screensToShow[currentScreen].id,\n setScanLinePosition,\n setFaceZoomed,\n setShowFaceScanLine,\n setFaceScanLinePosition,\n setCurrentOutfit,\n setTypewriterText,\n setShowLargeS,\n outfitImages: OUTFIT_IMAGES,\n fullText,\n });\n\n const onNextClick = () => {\n if (currentScreen < screensToShow.length - 1) {\n setCurrentScreen((prev) => prev + 1);\n } else {\n handleNext?.();\n }\n };\n return (\n <div\n className=\"relative h-full max-w-[28rem] mx-auto w-full flex justify-center\"\n style={{ background: config?.style?.base?.backgroundColor }}\n >\n \n \n <div className=\"absolute bottom-0 left-0 right-0 h-full shadow-lg \">\n <div className=\"h-full flex flex-col p-[1rem] w-full\">\n <Header noTitle resolvedConfig={config} />\n <div className=\"text-center pb-[.5rem]\">\n <h1\n style={{\n fontFamily:\n config?.style?.heading?.headingFontFamily ||\n \"SeriouslyNostalgic Fn\",\n fontSize: config?.style?.heading?.headingFontSize || \"32px\",\n color: config?.style?.heading?.headingColor || \"#000\",\n fontWeight:\n config?.style?.heading?.headingFontWeight || \"normal\",\n }}\n >\n {translate?.(screensToShow[currentScreen].title)}\n </h1>\n {screensToShow[currentScreen].description && (\n <p\n className=\" mt-[.25rem] max-w-[280px] mx-auto min-h-[40px]\"\n style={{\n fontFamily:\n config?.style?.subheading?.subheadingFontFamily ||\n \"'Inter', sans-serif\",\n fontSize:\n config?.style?.subheading?.subheadingFontSize || \"14px\",\n color:\n config?.style?.subheading?.subheadingColor || \"#4b5563\",\n fontWeight:\n config?.style?.subheading?.subheadingFontWeight || \"normal\",\n }}\n >\n {translate?.(screensToShow[currentScreen].description)}\n </p>\n )}\n </div>\n <div className=\"flex-1 flex justify-center items-center overflow-hidden py-[1rem] relative\">\n <MuseScreenRenderer\n screenIndex={currentScreen}\n scanLinePosition={scanLinePosition}\n faceZoomed={faceZoomed}\n showFaceScanLine={showFaceScanLine}\n faceScanLinePosition={faceScanLinePosition}\n outfitImages={OUTFIT_IMAGES}\n currentOutfit={currentOutfit}\n showLargeS={showLargeS}\n typewriterText={typewriterText}\n fullText={fullText}\n screens={screensToShow}\n videoToShow={\n gender === GenderType.Male ? maleScanVideo : femaleScanVideo\n }\n faceScanVideo={\n gender === GenderType.Male ? maleFaceScanVideo : faceScanVideo\n }\n sizeVideo={\n gender === GenderType.Male\n ? maleSizeSuggestions\n : sizeSuggestions\n }\n formFittingVideo={\n gender === GenderType.Male\n ? maleFormFittingGuide\n : formFittingGuide\n }\n />\n </div>\n\n <div className=\"pt-[.5rem] flex justify-end\">\n <SpecificButton\n resolvedConfig={config}\n buttonText={translate?.(LanguageKeys.next)}\n type=\"submit\"\n postfixIcon={<ArrowRight size={14} />}\n buttonFunc={onNextClick}\n />\n </div>\n </div>\n </div>\n </div>\n );\n}\n","export default function BodyScanAnimation({\n videoToShow,\n}: {\n videoToShow?: string;\n}) {\n return (\n <div className=\"relative w-full h-full\">\n <video\n className=\"h-full w-full object-contain border-none\"\n muted\n autoPlay\n loop\n playsInline\n >\n <source src={videoToShow} type=\"video/mp4\" />\n </video>\n </div>\n );\n}\n","import { FaceScanAnimationProps } from \"../../../types/interfaces\";\n\nexport default function FaceScanAnimation({\n faceZoomed,\n showFaceScanLine,\n faceScanLinePosition,\n faceScanVideo,\n}: FaceScanAnimationProps) {\n return (\n <div className=\"relative h-full w-full\">\n <div className=\"w-full h-full relative\">\n <video\n className=\"h-full w-full object-contain border-none\"\n muted\n autoPlay\n playsInline\n >\n <source src={faceScanVideo} type=\"video/mp4\" />\n </video>\n {showFaceScanLine && faceZoomed && (\n <div\n className=\"absolute w-[1px] bg-[#8B5CF6] shadow-[0_0_8px_rgba(139,92,246,0.8)] z-20\"\n style={{\n left: `${faceScanLinePosition}%`,\n top: \"0%\",\n height: \"40%\",\n opacity:\n faceScanLinePosition && faceScanLinePosition >= 0 ? 1 : 0,\n }}\n />\n )}\n </div>\n </div>\n );\n}\n","export default function TypewriterScene({ sizeVideo }: { sizeVideo?: string }) {\n return (\n <div className=\"relative w-full h-full flex justify-center items-center\">\n <video\n className=\"h-full w-full object-contain border-none\"\n muted\n loop\n autoPlay\n playsInline\n >\n <source src={sizeVideo} type=\"video/mp4\" />\n </video>\n </div>\n );\n}\n","import { useEffect, useRef } from \"react\";\n\nfunction useMuseAnimations({\n screenId,\n setScanLinePosition,\n setFaceZoomed,\n setShowFaceScanLine,\n setFaceScanLinePosition,\n setCurrentOutfit,\n outfitImages,\n setTypewriterText,\n setShowLargeS,\n fullText,\n}: any) {\n const animationRefs = useRef<any>({\n scan: null,\n face: null,\n outfit: null,\n typewriter: null,\n });\n\n const cleanupAnimations = () => {\n Object.values(animationRefs.current).forEach((ref: any) => {\n if (typeof ref === \"number\") {\n cancelAnimationFrame(ref);\n } else if (ref) {\n clearTimeout(ref);\n clearInterval(ref);\n }\n });\n animationRefs.current = {\n scan: null,\n face: null,\n outfit: null,\n typewriter: null,\n };\n };\n\n useEffect(() => {\n cleanupAnimations();\n\n switch (screenId) {\n case \"body\": {\n const startTime = Date.now();\n const duration = 3000;\n\n const animateScanLine = () => {\n const elapsed = Date.now() - startTime;\n const progress = Math.min(elapsed / duration, 1);\n setScanLinePosition(progress * 100);\n if (progress < 1) {\n animationRefs.current.scan = requestAnimationFrame(animateScanLine);\n }\n };\n\n animationRefs.current.scan = requestAnimationFrame(animateScanLine);\n break;\n }\n\n case \"face\": {\n setFaceZoomed(false);\n setShowFaceScanLine(false);\n setFaceScanLinePosition(0);\n\n animationRefs.current.face = setTimeout(() => {\n setFaceZoomed(true);\n\n setTimeout(() => {\n setShowFaceScanLine(true);\n\n const startTime = Date.now();\n const duration = 6000; // ✅ Total 6s (3s for each direction)\n\n const animateFaceScanLine = () => {\n const elapsed = Date.now() - startTime;\n const progress = Math.min(elapsed / duration, 1);\n\n setFaceScanLinePosition(\n progress <= 0.5 ? progress * 2 * 100 : (2 - progress * 2) * 100\n );\n\n if (progress < 1) {\n animationRefs.current.face =\n requestAnimationFrame(animateFaceScanLine);\n }\n };\n\n animationRefs.current.face =\n requestAnimationFrame(animateFaceScanLine);\n }, 2500); // Delay after zoom\n }, 800); // Delay before zoom\n break;\n }\n\n case \"sizeFit\": {\n setCurrentOutfit(0);\n animationRefs.current.outfit = setInterval(() => {\n setCurrentOutfit((prev: any) => (prev + 1) % outfitImages.length);\n }, 1500);\n break;\n }\n\n case \"ready\": {\n setShowLargeS(false);\n setTypewriterText(\"\");\n\n animationRefs.current.typewriter = setTimeout(() => {\n setShowLargeS(true);\n setTimeout(() => {\n let currentIndex = 0;\n const typeNextChar = () => {\n if (currentIndex < fullText.length) {\n setTypewriterText(fullText.slice(0, currentIndex + 1));\n currentIndex++;\n animationRefs.current.typewriter = setTimeout(typeNextChar, 30);\n }\n };\n typeNextChar();\n }, 1000);\n }, 800);\n break;\n }\n\n default:\n break;\n }\n\n return cleanupAnimations;\n }, [screenId]);\n}\n\nexport default useMuseAnimations;\n","import { ArrowRight, Volume2 } from \"lucide-react\";\nimport { useState, useEffect, useContext } from \"react\";\nimport Header from \"../Header\";\nimport { VolumeStepProps } from \"../../types/interfaces\";\nimport { LanguageContext } from \"../../utils/context/languageContext\";\nimport { LanguageKeys } from \"../../utils/languageKeys\";\nimport SpecificButton from \"../../atoms/specificButton/SpecificButton\";\n\nexport default function VolumeScreen({ handleNext, config }: VolumeStepProps) {\n const { translate } = useContext(LanguageContext) || {};\n const [mousePosition, setMousePosition] = useState({ x: 0, y: 0 });\n const [isAnimationPaused, setIsAnimationPaused] = useState(false);\n\n useEffect(() => {\n const handleMouseMove = (e: any) => {\n setMousePosition({ x: e.clientX, y: e.clientY });\n };\n window.addEventListener(\"mousemove\", handleMouseMove);\n return () => window.removeEventListener(\"mousemove\", handleMouseMove);\n }, []);\n\n const toggleAnimationPause = () => {\n setIsAnimationPaused((prev) => !prev);\n };\n\n function hexToRgba(hex: string, alpha: number = 1): string {\n hex = hex.replace(\"#\", \"\");\n\n if (hex.length === 3) {\n hex = hex\n .split(\"\")\n .map((h) => h + h)\n .join(\"\");\n }\n\n const r = parseInt(hex.substring(0, 2), 16);\n const g = parseInt(hex.substring(2, 4), 16);\n const b = parseInt(hex.substring(4, 6), 16);\n\n return `rgba(${r}, ${g}, ${b}, ${alpha})`;\n }\n const brandColor = config?.style?.base?.brandColor || \"#000\";\n const rgba1 = hexToRgba(brandColor, 0.19);\n const rgba2 = hexToRgba(brandColor, 0.23);\n const rgba3 = hexToRgba(brandColor, 0.24);\n\n const calculateHolographicEffect = () => {\n const windowWidth =\n typeof window !== \"undefined\" ? window.innerWidth : 1000;\n const windowHeight =\n typeof window !== \"undefined\" ? window.innerHeight : 1000;\n const normalizedX = (mousePosition.x / windowWidth) * 2 - 1;\n const normalizedY = (mousePosition.y / windowHeight) * 2 - 1;\n const rotateX = normalizedY * 5;\n const rotateY = normalizedX * -5;\n\n return {\n transform: `perspective(1000px) rotateX(${rotateX}deg) rotateY(${rotateY}deg)`,\n background: \"#fff\",\n boxShadow: `0 0 20px ${rgba1}, 0 0 30px ${rgba2}`,\n };\n };\n\n const holographicStyle = calculateHolographicEffect();\n\n return (\n <div\n className=\"flex h-full max-w-[28rem] mx-auto w-full flex-col relative items-center justify-center overflow-hidden max-w-md mx-auto bg-primary text-base\"\n style={{ background: config?.style?.base?.backgroundColor }}\n >\n <div className=\"flex justify-start absolute z-[99] top-[1rem] max-w-md mx-auto w-full px-[1rem]\">\n <Header noTitle resolvedConfig={config} />\n </div>\n <div className=\"relative mb-[2rem]\">\n {[...Array(3)].map((_, i) => (\n <div\n key={i}\n className=\"absolute rounded-[9999px]\"\n style={{\n width: \"100px\",\n height: \"100px\",\n minHeight: \"100px\",\n minWidth: \"100px\",\n background: config?.style?.base?.backgroundColor || \"#fff\",\n boxShadow: `0 0 20px 2px ${rgba3}`,\n border: \"none\",\n filter: \"blur(1px)\",\n margin: \"0 auto\",\n left: \"50%\",\n top: \"50%\",\n animation: isAnimationPaused\n ? \"none\"\n : `gentleRipple 15s cubic-bezier(0.1, 0.5, 0.2, 1) ${\n i * 5\n }s infinite`,\n opacity: isAnimationPaused ? 1 : 0,\n transform: isAnimationPaused\n ? \"translate(-50%, -50%) scale(0.5)\"\n : \"translate(-50%, -50%)\",\n }}\n />\n ))}\n\n <div\n className=\"relative z-10 rounded-[9999px] p-[1.5rem] cursor-pointer transition-all backdrop-blur-sm\"\n style={{\n ...holographicStyle,\n transition: \"transform 0.1s ease-out, box-shadow 0.1s ease-out\",\n }}\n onClick={toggleAnimationPause}\n >\n <Volume2\n className=\"w-[3rem] h-[3rem] relative z-10\"\n style={{ filter: \"drop-shadow(0 0 5px rgba(255, 255, 255, 0.7))\" }}\n color={config?.style?.base?.primaryColor || \"#000\"}\n />\n </div>\n </div>\n\n <div className=\"relative z-10 text-center max-w-[20rem]\">\n <div\n className=\" mb-[.5rem]\"\n style={{\n fontFamily:\n config?.style?.subheading?.subheadingFontFamily ||\n \"'Inter', sans-serif\",\n fontSize: config?.style?.subheading?.subheadingFontSize || \"14px\",\n color: config?.style?.subheading?.subheadingColor || \"#4b5563\",\n fontWeight:\n config?.style?.subheading?.subheadingFontWeight || \"normal\",\n }}\n >\n {translate?.(LanguageKeys.turnUpVolume)}\n </div>\n </div>\n\n <div className=\"absolute bottom-[1rem] right-0 max-w-[28rem] mx-auto w-full px-[1rem] max-w-md mx-auto\">\n <div className=\"flex justify-end\">\n <SpecificButton\n buttonFunc={() => handleNext()}\n postfixIcon={<ArrowRight />}\n buttonText={translate?.(LanguageKeys.continue)}\n resolvedConfig={config}\n />\n </div>\n </div>\n <style>{`\n @keyframes gentleRipple {\n 0% {\n transform: translate(-50%, -50%) scale(0.5) translateZ(0);\n opacity: 0.7;\n }\n 50% {\n opacity: 0.4;\n }\n 100% {\n transform: translate(-50%, -50%) scale(25) translateZ(0);\n opacity: 0;\n }\n }\n`}</style>\n </div>\n );\n}\n","import { useContext } from \"react\";\nimport { ArrowRight } from \"lucide-react\";\nimport Header from \"../Header\";\nimport { maleSetupVideo, setupVideo } from \"../../utils/constants\";\nimport { SetupScreenProps } from \"../../types/interfaces\";\nimport { LanguageContext } from \"../../utils/context/languageContext\";\nimport { LanguageKeys } from \"../../utils/languageKeys\";\nimport { GenderType } from \"../../utils/enums\";\nimport SpecificButton from \"../../atoms/specificButton/SpecificButton\";\n\nexport default function SetupScreen({ gender, handleNext, config }: SetupScreenProps) {\n\tconst { translate } = useContext(LanguageContext) || {};\n\n\treturn (\n\t\t<div\n\t\t\tclassName=\"flex h-full max-w-[28rem] mx-auto w-full p-[1rem] relative flex-col items-center overflow-hidden max-w-md mx-auto bg-primary text-base\"\n\t\t\tstyle={{ background: config?.style?.base?.backgroundColor }}\n\t\t>\n\t\t\t<div className=\"flex justify-start max-w-md mx-auto w-full \">\n\t\t\t\t<Header noTitle resolvedConfig={config} />\n\t\t\t</div>\n\t\t\t<h2\n\t\t\t\tclassName=\"mb-[1rem] text-[32px]\"\n\t\t\t\tstyle={{\n\t\t\t\t\tfontFamily: config?.style?.heading?.headingFontFamily || \"SeriouslyNostalgic Fn\",\n\t\t\t\t\tfontSize: config?.style?.heading?.headingFontSize || \"32px\",\n\t\t\t\t\tcolor: config?.style?.heading?.headingColor || \"#000\",\n\t\t\t\t\tfontWeight: config?.style?.heading?.headingFontWeight || \"normal\",\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t{translate?.(LanguageKeys.phonePlacement)}\n\t\t\t</h2>\n\t\t\t<p\n\t\t\t\tclassName=\"text-center text-gray-600 text-sm mt-1 max-w-[280px] mx-auto min-h-[40px]\"\n\t\t\t\tstyle={{\n\t\t\t\t\tfontFamily: config?.style?.subheading?.subheadingFontFamily || \"'Inter', sans-serif\",\n\t\t\t\t\tfontSize: config?.style?.subheading?.subheadingFontSize || \"14px\",\n\t\t\t\t\tcolor: config?.style?.subheading?.subheadingColor || \"#4b5563\",\n\t\t\t\t\tfontWeight: config?.style?.subheading?.subheadingFontWeight || \"normal\",\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t{translate?.(LanguageKeys.phonePlacementDescription)}\n\t\t\t</p>\n\t\t\t<div className=\"relative w-full h-full flex flex-col items-center max-w-md pt-[1rem]\">\n\t\t\t\t<div className=\"relative w-full h-auto\">\n\t\t\t\t\t<video className=\"h-full w-full object-contain border-none\" muted loop autoPlay playsInline>\n\t\t\t\t\t\t<source src={gender === GenderType.Male ? maleSetupVideo : setupVideo} type=\"video/mp4\" />\n\t\t\t\t\t</video>\n\t\t\t\t</div>\n\n\t\t\t\t<div className=\"absolute bottom-[0] max-w-[28rem] mx-auto w-full left-0 right-0 flex justify-center max-w-md mx-auto\">\n\t\t\t\t\t<div className=\"flex justify-end w-full\">\n\t\t\t\t\t\t<SpecificButton buttonFunc={() => handleNext?.()} buttonText={translate?.(LanguageKeys.continue)} postfixIcon={<ArrowRight />} resolvedConfig={config} />\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n","import { useContext, useEffect, useState } from \"react\";\nimport MuseSteps from \"./MuseSteps\";\nimport VolumeStep from \"./VolumeStep\";\nimport SetupScreen from \"./SetupScreen\";\nimport { EducationalProps } from \"../../types/interfaces\";\nimport { GenderType, MuseScreenStep, SectionType } from \"../../utils/enums\";\nimport { useLocalConfig } from \"../../config/useLocalConfig\";\nimport { LanguageContext } from \"../../utils/context/languageContext\";\n\nconst EducationalStepsWrapper = ({ sections, gender, onComplete, config }: EducationalProps) => {\n\tconst resolvedConfig = useLocalConfig(config);\n\tconst { setPreferredLanguage } = useContext(LanguageContext) || {};\n\tconst [step, setStep] = useState(1);\n\n\tuseEffect(() => {\n\t\tsetPreferredLanguage?.(resolvedConfig.language);\n\t}, [resolvedConfig]);\n\n\tswitch (step) {\n\t\tcase 1:\n\t\t\treturn (\n\t\t\t\t<MuseSteps\n\t\t\t\t\tapplicableScreens={\n\t\t\t\t\t\tsections?.[0] === SectionType.Full || !sections || !sections?.length\n\t\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t\t: sections[0] === SectionType.Body\n\t\t\t\t\t\t\t? [MuseScreenStep.Body, MuseScreenStep.SizeFit, MuseScreenStep.Ready]\n\t\t\t\t\t\t\t: [MuseScreenStep.Face, MuseScreenStep.SizeFit]\n\t\t\t\t\t}\n\t\t\t\t\tconfig={resolvedConfig}\n\t\t\t\t\tgender={gender || GenderType.Male}\n\t\t\t\t\thandleNext={() => setStep(2)}\n\t\t\t\t/>\n\t\t\t);\n\n\t\tcase 2:\n\t\t\treturn <VolumeStep handleNext={() => (sections?.[0] === SectionType.Face ? onComplete?.() : setStep(3))} config={resolvedConfig} />;\n\n\t\tcase 3:\n\t\t\treturn <SetupScreen config={resolvedConfig} gender={gender || GenderType.Male} handleNext={onComplete} />;\n\n\t\tdefault:\n\t\t\treturn <></>;\n\t}\n};\n\nexport default EducationalStepsWrapper;\n","import { EducationalProps } from \"../../types/interfaces\";\nimport { GenderType } from \"../../utils/enums\";\nimport EducationalStepsWrapper from \"./EducationalStepsWrapper\";\nimport LanguageContextProvider from \"../../utils/context/languageContext\";\n\nexport const Educational: React.FC<EducationalProps> = ({\n sections = [],\n config,\n gender = GenderType.Male,\n onComplete,\n}) => {\n return (\n <LanguageContextProvider>\n <EducationalStepsWrapper\n sections={sections}\n config={config}\n gender={gender}\n onComplete={onComplete}\n />\n </LanguageContextProvider>\n );\n};\n"],"names":["cn","classes","filter","Boolean","join","CustomInput","React","forwardRef","className","resolvedConfig","type","props","ref","_jsxs","_Fragment","children","_jsx","autoCapitalize","autoCorrect","style","background","input","inputBackgroundColor","color","inputTextColor","fontSize","inputFontSize","fontWeight","inputFontWeight","border","inputBorderColor","fontFamily","base","baseFontFamily","borderRadius","inputBorderRadius","inputPlaceholderColor","displayName","EmailStep","onComplete","initialValue","onStepComplete","value","setValue","useState","message","setMessage","undefined","loading","setLoading","translate","useContext","LanguageContext","onSubmit","async","e","preventDefault","trim","LanguageKeys","emailRequired","isValidEmail","validEmail","error","handleErrorMessage","required","id","placeholder","enterEmail","onChange","target","inputErrorColor","inputErrorFontSize","SpecificButton","disabled","buttonText","next","postfixIcon","ArrowRight","size","NameStep","nameRequired","enterName","GenderStep","genderType","setGenderType","GenderType","Male","onClick","primaryColor","mens","Female","womens","buttonFunc","console","log","HeightStep","localHeight","setLocalHeight","cm","String","ft","inch","measurementUnit","setMeasurementUnit","preferredLanguage","handleSetHeight","useCallback","event","prev","handleMeasurementUnit","val","validateHeight","height","convertToCentimeters","checkMeasurement","heightError","isButtonDisabled","useMemo","useEffect","renderHeightInput","inputMode","heightInFt","heightInInch","Select","MenuItem","cmMeasurementUnit","ftMeasurementUnit","ProgressDots","totalSteps","currentStepIndex","activeColor","inactiveColor","secondaryColor","dots","Array","from","length","_","i","index","isActive","isCompleted","map","backgroundColor","StepsWrapper","currentStep","handleStepComplete","fullOrder","config","visibleSteps","setPreferredLanguage","useLocalConfig","language","unsupportedStep","absoluteIndex","indexOf","logo","src","alt","logoHeight","width","logoWidth","heading","headingFontFamily","headingFontSize","headingColor","headingFontWeight","onboarding","commonProps","OnboardingStep","Email","Name","Gender","Height","noValidSteps","renderStep","Onboarding","steps","resolveSteps","values","setValues","stepIndex","setStepIndex","s","updated","LanguageContextProvider","DevicesList","FocalLengthWrapper","deviceInfo","setDeviceInfo","brandName","model","manufacturerMenuItems","manufacturer","Object","keys","phoneModelMenuItems","brandMatch","find","phone","model_name","modelName","focalLength","focal_length","Header","subtitle","phoneModel","selectPhoneBrand","selectPhoneModel","selectedId","m","foundModel","FocalLength","MuseScreenRenderer","screenIndex","scanLinePosition","faceZoomed","showFaceScanLine","faceScanLinePosition","showLargeS","typewriterText","fullText","screens","videoToShow","faceScanVideo","sizeVideo","formFittingVideo","screen","componentProps","body","face","sizeFit","hasComponent","component","Comp","content","createElement","image","muted","loop","autoPlay","playsInline","preload","AnimatePresence","mode","motion","div","initial","opacity","y","animate","exit","transition","duration","MuseScreenStep","Body","title","bodyScan","description","bodyScanDescription","bodyScanPerson","Face","faceScan","faceScanDescription","faceScanPerson","left","top","SizeFit","leSableDress","Ready","readyToStart","readyToStartDescription","fittingGuide","MuseSteps","applicableScreens","gender","handleNext","currentScreen","setCurrentScreen","setScanLinePosition","setFaceZoomed","setFaceScanLinePosition","setShowFaceScanLine","currentOutfit","setCurrentOutfit","setTypewriterText","setShowLargeS","screensToShow","includes","screenId","outfitImages","animationRefs","useRef","scan","outfit","typewriter","cleanupAnimations","current","forEach","cancelAnimationFrame","clearTimeout","clearInterval","startTime","Date","now","animateScanLine","elapsed","progress","Math","min","requestAnimationFrame","setTimeout","animateFaceScanLine","setInterval","currentIndex","typeNextChar","slice","useMuseAnimations","OUTFIT_IMAGES","noTitle","subheading","subheadingFontFamily","subheadingFontSize","subheadingColor","subheadingFontWeight","maleScanVideo","femaleScanVideo","maleFaceScanVideo","maleSizeSuggestions","sizeSuggestions","maleFormFittingGuide","formFittingGuide","VolumeScreen","mousePosition","setMousePosition","x","isAnimationPaused","setIsAnimationPaused","handleMouseMove","clientX","clientY","window","addEventListener","removeEventListener","hexToRgba","hex","alpha","replace","split","h","parseInt","substring","brandColor","rgba1","rgba2","rgba3","holographicStyle","windowWidth","innerWidth","windowHeight","innerHeight","normalizedX","transform","boxShadow","calculateHolographicEffect","minHeight","minWidth","margin","animation","Volume2","turnUpVolume","continue","SetupScreen","phonePlacement","phonePlacementDescription","maleSetupVideo","setupVideo","EducationalStepsWrapper","sections","step","setStep","SectionType","Full","VolumeStep","Educational"],"mappings":"m9BAGA,MAAMA,EAAK,IAAIC,IACXA,EAAQC,OAAOC,SAASC,KAAK,KAS3BC,EAAcC,EAAMC,WAClB,EAAGC,YAAWC,iBAAgBC,UAASC,GAASC,IAC5CC,EAAAC,EAAA,CAAAC,SAAA,CACIC,EAAA,QAAA,CACIN,KAAMA,EACNF,UAAW,GAAGA,GAAwB,kBAAoBR,EACtD,mZAGJiB,eAAe,MACfC,YAAY,MACZN,IAAKA,KACDD,EACJQ,MAAO,CACHC,WAAYX,GAAgBU,OAAOE,OAAOC,sBAAwB,UAClEC,MAAOd,GAAgBU,OAAOE,OAAOG,gBAAkB,OACvDC,SAAUhB,GAAgBU,OAAOE,OAAOK,eAAiB,OACzDC,WAAYlB,GAAgBU,OAAOE,OAAOO,iBAAmB,MAC7DC,OAAQ,aAAapB,GAAgBU,OAAOE,OAAOS,kBAAoB,gBACvEC,WAAYtB,GAAgBU,OAAOa,MAAMC,gBAAkB,oBAC3DC,aAAczB,GAAgBU,OAAOE,OAAOc,mBAAqB,SAGxEnB,EAAA,QAAA,CAAAD,SACI,mEAEEN,GAAgBU,OAAOE,OAAOe,uBAAyB,uCACjD3B,GAAgBU,OAAOE,OAAOO,iBAAmB,+DAEnDnB,GAAgBU,OAAOE,OAAOK,eAAiB,iNAY9DrB,EAAYgC,YAAc,cCvCtC,MAAMC,EAAY,EAAGC,aAAYC,eAAc/B,iBAAgBgC,qBAC9D,MAAOC,EAAOC,GAAYrC,EAAMsC,SAASJ,GAAgB,KAClDK,EAASC,GAAcxC,EAAMsC,cAA6BG,IAC1DC,EAASC,GAAc3C,EAAMsC,UAAS,IACvC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,EAAWC,KAC7B8L,WAAY,IAAMwG,EAAQ,KAI7B,KAAK,EACJ,OAAO5W,EAAC+W,GAAU,CAAC3G,WAAY,IAAOsG,IAAW,KAAOG,EAAYxH,KAAO9N,MAAiBqV,EAAQ,GAAKxO,OAAQ3I,IAElH,KAAK,EACJ,OAAOO,EAACoW,GAAW,CAAChO,OAAQ3I,EAAgB0Q,OAAQA,GAAU9L,EAAWC,KAAM8L,WAAY7O,IAE5F,QACC,OAAOvB,UCrCGgX,GAA0C,EACrDN,WAAW,GACXtO,SACA+H,SAAS9L,EAAWC,KACpB/C,gBAGEvB,EAACyK,EAAuB,CAAA1K,SACtBC,EAACyW,GAAuB,CACtBC,SAAUA,EACVtO,OAAQA,EACR+H,OAAQA,EACR5O,WAAYA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swan-admin/swan-web-component",
3
- "version": "1.0.85",
3
+ "version": "1.0.86",
4
4
  "description": "Cross-framework Onboarding component (React + Angular compatible)",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -1,2 +0,0 @@
1
- import{jsxs as e,jsx as t,Fragment as n}from"react/jsx-runtime";import a,{useContext as s,useCallback as r,useMemo as o,createContext as i,useState as l,useEffect as c,useLayoutEffect as d,useRef as u}from"react";import{L as m,H as f,a as h,b as p,S as g,n as y,v,r as x,s as b,k as w,j as S,o as N,e as C,c as F,q as D,t as I,i as k,w as T,x as L,V as E,y as $,C as M,z as _,A as z,B as A,D as j,G as U,u as P,E as V,p as R,f as W,h as B,l as q}from"./LoadingScreen-DgDeiI0O.js";import O from"clsx";import K from"react-webcam";import H from"@mui/icons-material/Close";import J,{posthog as G}from"posthog-js";import{Dialog as Q,Box as Y,Drawer as X}from"@mui/material";import Z from"@mui/material/Dialog";import ee from"video.js";var te=a.memo(function({size:n=16}){return e("svg",{width:n,height:n,viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t("path",{d:"M22.6968 14.6968C22.6968 16.8185 21.8539 18.8533 20.3536 20.3536C18.8533 21.8539 16.8185 22.6968 14.6968 22.6968",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),t("path",{d:"M18.6968 11.6968V10.6968C18.6968 10.1663 18.4861 9.65764 18.111 9.28256C17.7359 8.90749 17.2272 8.69678 16.6968 8.69678C16.1663 8.69678 15.6576 8.90749 15.2826 9.28256C14.9075 9.65764 14.6968 10.1663 14.6968 10.6968",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),t("path",{d:"M14.6968 10.6968V9.69678C14.6968 9.16634 14.4861 8.65764 14.111 8.28256C13.7359 7.90749 13.2272 7.69678 12.6968 7.69678C12.1663 7.69678 11.6576 7.90749 11.2826 8.28256C10.9075 8.65764 10.6968 9.16634 10.6968 9.69678V10.6968",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),t("path",{d:"M10.6968 10.1968V4.69678C10.6968 4.16634 10.4861 3.65764 10.111 3.28256C9.73592 2.90749 9.22721 2.69678 8.69678 2.69678C8.16634 2.69678 7.65764 2.90749 7.28256 3.28256C6.90749 3.65764 6.69678 4.16634 6.69678 4.69678V14.6968",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),t("path",{d:"M18.6969 11.6968C18.6969 11.1663 18.9076 10.6576 19.2827 10.2826C19.6577 9.90749 20.1664 9.69678 20.6969 9.69678C21.2273 9.69678 21.736 9.90749 22.1111 10.2826C22.4862 10.6576 22.6969 11.1663 22.6969 11.6968V14.6968C22.6969 16.8185 21.854 18.8533 20.3537 20.3536C18.8534 21.8539 16.8186 22.6968 14.6969 22.6968H12.6969C9.89688 22.6968 8.19688 21.8368 6.70688 20.3568L3.10688 16.7568C2.76282 16.3757 2.57847 15.8769 2.592 15.3637C2.60554 14.8505 2.81593 14.3621 3.1796 13.9997C3.54327 13.6373 4.03238 13.4287 4.54565 13.417C5.05892 13.4053 5.55704 13.5914 5.93688 13.9368L7.69688 15.6968",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})});var ne=a.memo(function({angle:n,countdown:a,isScanning:i,isInTargetRange:l,stabilityScore:c,children:d,config:u}){const{translate:p}=s(m)||{},g=r(()=>n<80?Math.max(0,Math.min(100,10*(n-60))):n>95?Math.max(0,Math.min(100,10*(105-n))):100,[n]),y=o(()=>{if(i)return u?.style?.angleDetector?.successAngleBackground||"#4f46e5";const e=g();if(0===e)return u?.style?.angleDetector?.successAngleLowBackground||"#ffffff";if(100===e)return u?.style?.angleDetector?.successAngleBackground||"#4f46e5";return`rgb(${Math.round(255-e/100*116)}, ${Math.round(255-e/100*163)}, ${Math.round(255-e/100*9)})`},[i,g]),v=r((e,t)=>t>70?e?`text-[${u?.style?.angleDetector?.successAngleTextLightColor}]/70`:`text-[${u?.style?.angleDetector?.successAngleTextLightColor}]`:e?`text-[${u?.style?.angleDetector?.successAngleTextLightColor}]/40`:`text-[${u?.style?.angleDetector?.successAngleTextDarkColor}]/70`,[]),x=r((e=!1)=>{const t=g();return i?`text-[${u?.style?.angleDetector?.successAngleTextLightColor}]`:v(e,t)},[i,g]),b=r((e,t)=>t>70||e?u?.style?.angleDetector?.successAngleTextLightColor:u?.style?.angleDetector?.successAngleTextDarkColor,[]),w=r((e=!1)=>{const t=g();return i?u?.style?.angleDetector?.successAngleTextLightColor:b(e,t)},[i,g]),S=a;function N(){document.documentElement.style.setProperty("--real-vh",window.innerHeight+"px")}return N(),window.addEventListener("resize",N),e("div",{className:"flex w-screen flex-col items-center h-[var(--real-vh)] overflow-hidden touch-none justify-center transition-all duration-300 max-w-[28rem] mx-auto",style:{backgroundColor:y},children:[t("div",{className:"flex justify-start fixed top-[.5rem] max-w-[28rem] mx-auto w-full px-[1rem]",children:t("div",{className:"flex justify-start ",children:t(f,{noTitle:!0,resolvedConfig:u})})}),null!==S?t("div",{className:"relative flex h-[6rem] w-[6rem] items-center justify-center rounded-[9999px] bg-[#fff]/20 transition-all duration-300",style:{border:`2px solid ${w()}`},children:t("div",{className:`text-[3rem] font-bold text-[${w()}]`,style:{fontFamily:u?.style?.base?.baseFontFamily||"Inter, sans-serif"},children:S})}):e("div",i?{className:"relative flex flex-col items-center justify-center",children:[t("div",{className:"relative flex h-16 w-16 items-center justify-center rounded-[9999px] border-2 bg-[#fff]/30 border-[#fff]",children:t("div",{className:"h-4 w-4 rounded-[9999px] animate-pulse bg-[#fff]/80"})}),d]}:{className:O("relative flex h-[4rem] w-[4rem] items-center justify-center rounded-[9999px] ",l?"bg-[#fff]/20 border-[#fff]":"bg-[#fff]/10 border-[#fff]"),style:{transform:`translateY(${3*(90-n)}px)`,transition:"transform 0.2s ease-out",border:`2px solid ${w()}`},children:[t("div",{className:`h-[1rem] w-[1rem] rounded-[9999px] bg-[${w()}]/80`,style:{backgroundColor:`${w()}B3`}}),e("div",{className:O("mt-[.5rem] w-[180px] flex-col flex items-center absolute top-[60px]",x()),style:{color:w()},children:[t(te,{size:30}),e("p",{style:{fontFamily:u?.style?.base?.baseFontFamily||"Inter, sans-serif"},children:[" ",p?.(h.startLevelCheck),t("br",{})]})]})]}),null!==S&&t("div",{className:"absolute bottom-[8rem] text-center",children:t("div",{className:O("text-sm font-medium px-4 py-1.5 bg-black/20 rounded-[9999px] mt-8",x()),style:{fontFamily:u?.style?.base?.baseFontFamily||"Inter, sans-serif",color:w()},children:p?.(h.leavePhone)})}),l&&null===S&&!i&&t("div",{className:"absolute bottom-[8rem] w-[12rem]",children:t("div",{className:`h-[.375rem] w-full bg-[${w()}]/20 rounded-[9999px] overflow-hidden`,style:{backgroundColor:`${w()}33`},children:t("div",{className:`h-full bg-[${w()}]/70 transition-all duration-300 rounded-[9999px]`,style:{width:`${n}%`,backgroundColor:`${w()}B3`}})})}),null===S&&!i&&t("div",{className:"absolute bottom-[5rem] text-center",children:e("div",{className:O("text-[1.5rem] font-light",x()),style:{color:w()},children:[Math.round(n),"°"]})}),null===S&&!i&&t("div",{className:"absolute bottom-[2rem] text-center max-w-[20rem] mx-auto",children:t("div",{className:O("text-[.75rem] opacity-50",x()),style:{fontFamily:u?.style?.base?.baseFontFamily||"Inter, sans-serif",color:w()},children:p?.(h.placePhoneUpright)})})]})});const ae="DESKTOP",se="TAB",re="MOBILE",oe=i(void 0);function ie({children:e}){const[n,a]=l([window?.innerWidth,window?.innerHeight]),[s,r]=l(!1),i=()=>{a([window?.innerWidth,window?.innerHeight])};c(()=>{i()},[]),d(()=>(window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)),[i]);let u=ae;n[0]>768&&n[0]<1024&&(u=se),n[0]<768&&(u=re);const m=o(()=>({size:n,setSize:a,clearInputs:s,setClearInputs:r,media:u}),[n,s,u]);return t(oe.Provider,{value:m,children:e})}function le({handleShowStreamCamera:n,loadingCam:a,handleUserMedia:r,handlePause:o,pause:i,recordingStarted:l,startSendingVideoFrames:c,showPause:d,webcamRef:u,resetDetector:f,config:x}){const{media:b}=s(oe)||{},{translate:w}=s(m)||{};return e("div",{className:"App w-screen h-[100vh] relative ",children:[t("span",{onClick:()=>{n(),f()},className:"fixed right-[20px] top-[20px] z-[999]",children:t(H,{className:"text-[#fff]"})}),t("div",{className:"w-full h-full overflow-hidden ",children:b===re&&t(K,{audio:!1,ref:u,screenshotQuality:1,videoConstraints:p,mirrored:!0,screenshotFormat:"image/jpeg",onUserMedia:r,style:{position:"fixed",top:0,bottom:0,zIndex:0,width:"100%",height:"100%",objectFit:"cover"}})}),e("div",{className:"fixed bottom-[30px] w-full z-[999] flex flex-col gap-4 items-center justify-center",children:[d&&t(g,{className:"!w-[180px] !h-[40px] !py-[0] mx-auto ",prefix:y,buttonText:w?.(h.pause),buttonFunc:o,resolvedConfig:x,btnSecondary:!0}),i?t("div",{children:t(g,{className:"!w-[180px] !h-[40px] !py-[0] mx-auto",buttonText:w?.(h.restart),buttonFunc:n,resolvedConfig:x,btnSecondary:!0})}):l?null:t(g,{className:"!w-[180px] !h-[40px] !py-[0] mx-auto !bg-[#ffffff] !text-[#000000] "+(a?"!opacity-50":""),buttonText:w?.(h.startScan),buttonFunc:c,disabled:a,resolvedConfig:x})]}),t("audio",{id:"audioElement",crossOrigin:"anonymous",preload:"auto",style:{position:"absolute",zIndex:-99999},src:`${v}scanAudioInstructions/silence.mp3`})]})}let ce=null,de=null,ue=null;const me=i(null);let fe,he=null,pe=null;var ge=a.memo(function({setIsScanLocked:e,resetDetector:n,scanID:a,setIsVideoUploaded:o,setScanFailsError:i,setScanStartTime:d,setScanUniqueKey:m,userDetails:f,config:h}){const{gender:p,heightInCm:g,email:y,shopDomain:D}=f,I=u(null),k=u(null),[T,L]=l([]),[E,$]=l(!0),[M,_]=l(!1),[z,A]=l(!1),[j,U]=l(!0),[P,V]=l(!1),R=u(null),[W,B]=l(""),[q,O]=l([]),[K,H]=l(""),[G,Q]=l(!1),[Y,X]=l(!1),[Z,ee]=l(!1),[te,ne]=l([]),[ae,se]=l(!1),re=u(!0),{poseDetector:oe}=function(){const[e,t]=l(0),[n,a]=l(0),[s,r]=l(!1),o=u(0),i=u(0),d=u(!0);async function m(){if("undefined"==typeof window||"undefined"==typeof navigator)return!1;try{console.log("Starting TensorFlow preload...");const[e,t,n]=await Promise.all([import("./pose-detection.esm-BehJiApJ.js"),import("@tensorflow/tfjs-core"),import("@tensorflow/tfjs-backend-webgl")]);ue=e,await t.setBackend("webgl"),await t.ready(),console.log("TensorFlow backend ready (WebGL)");const a={runtime:"mediapipe",modelType:"full",solutionPath:"https://cdn.jsdelivr.net/npm/@mediapipe/pose"};try{de=await ue.createDetector(ue.SupportedModels.BlazePose,a),console.log("MediaPipe detector created successfully")}catch(e){console.warn("MediaPipe failed, falling back to TFJS runtime:",e),de=await ue.createDetector(ue.SupportedModels.BlazePose,{runtime:"tfjs",modelType:"full"}),console.log("TFJS detector created successfully")}return!0}catch(e){return console.error("Failed to load TensorFlow dependencies:",e),ce=null,!1}}function f(e){return!(!e||0===e.length)&&22===e.filter(e=>e[2]>.7).length}return c(()=>{if(d.current=!0,!de)return ce||(ce=m()),ce.then(e=>{e&&d.current&&r(!0)}),()=>{d.current=!1};r(!0)},[]),c(()=>{i.current=e,e>6&&o.current<2&&(a(e=>e+1),t(0))},[e]),c(()=>{o.current=n},[n]),{poseDetector:async(e,n)=>{if(!de||!d.current||!n?.current?.video)return;const a=n.current.video;if(!(a.readyState<2))try{const n=await de.estimatePoses(a,{flipHorizontal:!1});if(!n||!n.length)return;const s=n[0].keypoints.slice(11).map(e=>[e.x>0&&e.x<720?e.x:-1,e.y>0&&e.y<1280?e.y:-1,e.score??0]);0!==o.current||f(s)||t(e=>e+1),1===o.current&&f(s)&&t(e=>e+1),2===o.current&&e()}catch(e){console.error("Pose detection error:",e)}},isLoaded:s,spinPhase:n,resetDetector:()=>{o.current=0,i.current=0,t(0),a(0)},retryLoading:async()=>{de||ce||(ce=m(),await ce&&d.current&&r(!0))}}}(),ie=u(!0),ge=u(!1),[ye,ve]=l([]);let xe=0;const{setStartGyro:be,handleFileUpload:we,setUploadLoading:Se}=s(me),Ne=()=>{ge.current=!1,clearTimeout(fe),R.current&&clearTimeout(R.current),m(F()),i(""),Se?.(!1),L([]),$(!0),_(!1),A(!1),U(!0),V(!1),R.current=null,B(""),O([]),H(""),Q(!G),be(!1),b.stopAudio(),X(!1),ee(!1),xe=0,null!==k.current&&k.current.stop(),te.forEach(e=>{k.current&&k.current.removeEventListener("dataavailable",e)}),ne([]),re.current=!0,se(!1),o(!1)},Ce=r(()=>{setTimeout(()=>{$(!1)},1e3)},[]),Fe=r(()=>{x({eventName:`${D}/rescan`,email:y,scanID:a,height:g,gender:p,status:!1}),re.current=!1,Ne(),_e()},[Ne,a,y]),De=r(()=>{re.current=!1,ee(!0),se(!1),R.current&&clearTimeout(R.current),k.current&&k.current.pause(),b.stopAudio(),w.poseDetection.disconnect(),xe=0,k.current&&k.current.stop(),te.forEach(e=>{k.current&&k.current.removeEventListener("dataavailable",e)}),ne([]),clearTimeout(fe)},[k,te,b,re]),Ie=r(async()=>{re.current=!0,await b.playAudio(`${v}SpotOn.mp3`),ee(!1),se(!1),R.current&&clearTimeout(R.current),_(!1)},[R,b]),ke=r(async()=>{try{he=await w.poseDetection.connect(),J.capture(`${D}/pose_detection_connected`,{scanID:a,email:y,id:he})}catch(e){console.log(e,"while connecting websocket")}},[a,D,y]),Te=r(({data:e})=>{e&&e.size>0&&re.current&&(L(t=>t.concat(e)),!ge.current&&I.current&&(ge.current=!0,oe(()=>{Ie(),S({eventName:`${D}/tensorFlow`,scanID:a,email:y,message:"recording stopped by tensorflow "})},I)))},[Ie,S,D,a,y,I]),Le=r(async()=>{q.length>0&&re.current&&(await b.playAudio(v+q[q.length-1]),re.current&&(fe=setTimeout(Le,2e3)))},[q,re]),Ee=r(()=>{k&&k.current&&k.current.stop(),_(!0);try{if(I&&I.current&&I.current.stream){const e={mimeType:ye[0]};k.current=new MediaRecorder(I.current.stream,e),k.current.addEventListener("dataavailable",Te),ne([...te,Te]),k.current.start(1e3),U(!1)}}catch(e){console.log("error while using media recorder",e)}},[I,ye,Te,te]),$e=r(async()=>{R.current&&clearTimeout(R.current),Ee(),re.current&&(R.current=setTimeout(async()=>{re.current&&(await b.playAudio(`${v}SpotOn.mp3`),_(!1))},15e3)),A(!0),re.current&&await b.playAudio(`${v}Spin.mp3`)},[Ee,re,b]),Me=r(({data:e})=>{e.size>0&&w.poseDetection.connected()&&(w.poseDetection.poseStatus(async e=>{if(e&&e.audio&&e.audio.length>0){const t=document.querySelector("#audioElement");!0===e.status&&e.sid===he?xe<2?(0===xe&&t?.paused&&await b.playAudio(v+e.audio),xe+=1):(H(e.audio),clearTimeout(fe),w.poseDetection.disconnect(),setTimeout($e,1e3)):(xe=0,!t?.paused||pe&&pe?.audioName===e.audio?pe?.audioName===e.audio&&t?.paused&&(pe&&pe.no_of_times_skipped>=pe.skipCount?(pe.no_of_times_skipped=0,b.playAudio(v+e.audio)):pe&&(pe.no_of_times_skipped+=1)):(pe={skipCount:2,no_of_times_skipped:0,audioName:e.audio},b.playAudio(v+e.audio)))}}),I?.current&&null!==I.current.getScreenshot()&&w.poseDetection.videoEmit({image:I.current.getScreenshot()||"",scanId:a}))},[I,a,w,he,xe,$e,b]),_e=r(async()=>{V(!0),be(!0),ie.current&&(ie.current=!1,S({eventName:"scan started",scanID:a,status:"success",email:y})),d(N()),$(!0),re.current&&await b.playAudio(`${v}StartScan.mp3`),re.current&&await b.playAudio(`${v}LiftArmsAndHoldAtHip.mp3`),re.current&&(V(!1),_(!0),X(!0),se(!0),Ce());try{if(I&&I.current&&I.current.stream&&re.current){const e={mimeType:ye[0]};re.current&&(k.current=new MediaRecorder(I.current.stream,e)),re.current&&k.current&&k.current.addEventListener("dataavailable",Me),ne([...te,Me]),k.current&&k.current.start(1e3),U(!1),re.current&&(fe=setTimeout(Le,2e3))}}catch(e){console.log("error ----------",e)}},[I,ye,Me,te,Le,re]);return c(()=>(D&&(e(!0),ke()),()=>{he&&(w.poseDetection.disconnect(),J.capture(`${D}/pose_detection_disconnected`,{scanID:a,email:y,id:he})),te.forEach(e=>{k?.current?.removeEventListener("dataavailable",e)})}),[G,D]),c(()=>{q.push(W)},[W]),c(()=>{O([])},[K]),c(()=>{const e=T.length&&T.length>0;j||!e||M||!re.current||Z||k&&k.current&&(M||(k.current.stop(),U(!0)))},[j,M,T,Z]),c(()=>{const e=T.length&&T.length>0;if(j||!e||M)console.log("No video found to upload");else if(k&&k.current&&re.current&&!Z&&!M){const e=new File(T,`${a}.webm`,{type:"video/webm"});Se?.(!0),i(""),we?.(e)}},[j,M,T,Z,k,re]),c(()=>{if("undefined"!=typeof MediaRecorder){const e=C.filter(e=>MediaRecorder.isTypeSupported(e));ve(e)}},[]),c(()=>{Ne()},[]),t(le,{resetDetector:n,handleShowStreamCamera:Ne,loadingCam:E,handlePause:De,showRestart:Y,pause:Z,handleReScan:Fe,recordingStarted:M,isScanning:P,startSendingVideoFrames:_e,faceDone:z,stopRecording:Ie,showPause:ae,webcamRef:I,handleUserMedia:Ce,config:h})});function ye({scanID:e,userDetails:n,setIsVideoUploaded:a,setScanFailsError:s,setScanStartTime:r,setScanUniqueKey:o,config:i}){const[d,m]=l(90),[f,h]=l(0),[p,g]=l(null),[y,v]=l(!1),[x,b]=l(0),w=u([]),[S,N]=l(!1),C=d-f,F=C>=80&&C<=95;c(()=>{if("undefined"!=typeof window&&window.DeviceOrientationEvent){const e=e=>{if(null!==e.beta){let t=Math.abs(e.beta);null!==e.gamma&&(t*=Math.cos(e.gamma*Math.PI/180)),t=Math.max(0,Math.min(180,t)),m(t)}},t=async()=>{const t=DeviceOrientationEvent;if(t&&"function"==typeof t.requestPermission)try{"granted"===await t.requestPermission()&&window.addEventListener("deviceorientation",e)}catch(e){console.error("Permission error",e)}else window.addEventListener("deviceorientation",e);return()=>{e&&window.removeEventListener("deviceorientation",e)}};document.addEventListener("click",t,{once:!0})}},[]),c(()=>{if(w.current=[...w.current.slice(-4),C],w.current.length>=5){const e=Math.max(...w.current)-Math.min(...w.current);b(F&&e<2?e=>Math.min(100,e+10):e=>Math.max(0,e-20))}F||null===p&&!y||I()},[C,F,p,y]),c(()=>{x>=100&&null===p&&!y&&D(),x<50&&null!==p&&I()},[x,p,y]);const D=()=>{g(3);const e=setInterval(()=>{g(t=>null===t||t<=1?(clearInterval(e),v(!0),null):t-1)},1e3)},I=()=>{g(null),S||v(!1)};return t(ne,{angle:C,countdown:p,isScanning:y,isInTargetRange:F,stabilityScore:x,config:i,children:y&&t(ge,{setIsScanLocked:N,resetDetector:()=>{m(90),h(0),g(null),v(!1),b(0),N(!1),w.current=[]},scanID:e,userDetails:n,setIsVideoUploaded:a,setScanFailsError:s,setScanStartTime:r,setScanUniqueKey:o,config:i})})}function ve({message:a,config:r}){const{translate:o}=s(m)||{};return t(Q,{open:!0,className:"confirm-modal",children:t("div",{className:"modal-main",children:t("div",{className:"text-center",children:e(n,a?{children:[t("h2",{style:{fontFamily:r?.style?.heading?.headingFontFamily||"SeriouslyNostalgic Fn",fontSize:r?.style?.heading?.headingFontSize||"32px",color:r?.style?.heading?.headingColor||"#000",fontWeight:r?.style?.heading?.headingFontWeight||"normal"},children:o?.(h.cameraAlreadyInUse)}),t("p",{className:"mt-[0.5rem] text-sm",style:{fontFamily:r?.style?.base?.baseFontFamily||"Inter, sans-serif",fontSize:r?.style?.base?.baseFontSize||"16px",color:r?.style?.base?.baseTextColor||"#000"},children:o?.(h.tryClosingBrowser)})]}:{children:[t("h2",{style:{fontFamily:r?.style?.heading?.headingFontFamily||"SeriouslyNostalgic Fn",fontSize:r?.style?.heading?.headingFontSize||"32px",color:r?.style?.heading?.headingColor||"#000",fontWeight:r?.style?.heading?.headingFontWeight||"normal"},children:o?.(h.checkCameraSettings)}),t("p",{className:"mt-[0.5rem] text-sm",style:{fontFamily:r?.style?.base?.baseFontFamily||"Inter, sans-serif",fontSize:r?.style?.base?.baseFontSize||"16px",color:r?.style?.base?.baseTextColor||"#000"},children:`${o?.(h.setting)} > ${D()} > ${o?.(h.enableCameraPermissions)}`})]})})})})}function xe({setShowDrawer:e,config:n,loader:a}){const[s,o]=l({disabled:!1,message:""}),[i,d]=l(!0),m=u(null),f=r(async()=>{const e=await I();o(e),d(!1)},[]);return c(()=>{f()},[]),i?t(k,{url:a}):s?.disabled?t(ve,{config:n,message:s?.message}):t(K,{audio:!1,ref:m,screenshotQuality:1,videoConstraints:p,mirrored:!0,onUserMedia:()=>e?.(!0),screenshotFormat:"image/jpeg",style:{position:"relative",top:0,bottom:0,zIndex:0,width:"100%",height:"100%",objectFit:"cover"}})}function be({link:e,onReady:n,wrapperClassName:a="[&_video]:rounded-t-[20px] w-full h-full"}){const s=u(null),r=u(null);let o={autoplay:!0,controls:!1,responsive:!0,fluid:!0,muted:!0,navigationUI:"hide",preload:"metadata",poster:T};return c(()=>{if(!r.current&&e&&s?.current){const t=ee(s.current,{...o});t.ready(()=>{r.current=t;const a={...o,sources:[{src:e,type:"application/x-mpegURL"}]};t.autoplay(a.autoplay),t.src(a.sources),n?.(t)})}},[e,s]),c(()=>{const e=r.current;return()=>{e&&!e.isDisposed()&&(e.dispose(),r.current=null)}},[r]),t("div",{className:a,children:t("video",{ref:s,muted:!0,className:"video-js",playsInline:!0,onDrag:e=>e.preventDefault()})})}function we({scanFailsError:a,serverAtCapacity:r=!1,onNext:o,gender:i,setScanUniqueKey:c,resolvedConfig:d,setIsVideoUploaded:u}){const{translate:p}=s(m)||{},[y,v]=l(!1),x=()=>{v(!y)};return e(n,{children:[e("div",{className:"flex flex-col h-full max-w-[28rem] mx-auto w-full rounded-t-[20px] overflow-y-auto",style:{background:d?.style?.base?.backgroundColor},children:[t("div",{className:"w-full max-w-[28rem] mx-auto pt-[1rem] px-[1rem]",children:t(f,{noTitle:!0,resolvedConfig:d})}),e("div",{className:"flex-1",children:[a&&e("div",{className:"px-[1rem]",children:[t("h2",{className:"text-center",style:{fontFamily:d?.style?.heading?.headingFontFamily||"SeriouslyNostalgic Fn",fontSize:d?.style?.heading?.headingFontSize||"32px",color:d?.style?.heading?.headingColor||"#000",fontWeight:d?.style?.heading?.headingFontWeight||"normal"},children:p?.(h.issueWithScan)}),t("p",{style:{fontFamily:d?.style?.base?.baseFontFamily||"Inter, sans-serif",fontSize:d?.style?.base?.baseFontSize||"16px",color:d?.style?.base?.baseTextColor||"#1E1E1E"},children:p?.(h.reason)}),t("p",{style:{fontFamily:d?.style?.base?.baseFontFamily||"Inter, sans-serif",fontSize:d?.style?.base?.baseFontSize||"16px",color:d?.style?.base?.baseTextColor||"#1E1E1E"},children:L(a)}),t("img",{className:"my-[0.5rem] aspect-[2/1.4] w-full object-cover",onClick:x,src:E[i],alt:"icon"})]}),r&&e("div",{className:"p-[1rem] text-center",children:[t("h3",{style:{fontFamily:d?.style?.heading?.headingFontFamily||"SeriouslyNostalgic Fn",fontSize:d?.style?.heading?.headingFontSize||"32px",color:d?.style?.heading?.headingColor||"#000",fontWeight:d?.style?.heading?.headingFontWeight||"normal"},children:p?.(h.serverAtCapacity)}),t("p",{className:"text-base mt-[0.5rem]",style:{fontFamily:d?.style?.base?.baseFontFamily||"Inter, sans-serif",fontSize:d?.style?.base?.baseFontSize||"16px",color:d?.style?.base?.baseTextColor||"#1E1E1E"},children:p?.(h.serverAtCapacityDescription)})]})]}),a&&t("div",{className:"p-[1rem] flex gap-[0.5rem]",children:t(g,{disabled:!1,buttonText:p?.(h.scanAgain),className:"!shadow-none",buttonFunc:()=>{o?o?.():c(F()),u(!1)},resolvedConfig:d})})]}),y&&e(Z,{className:"w-screen h-screen video-modal",onClose:x,open:y,children:[t("div",{className:"flex justifyEnd ",children:t("span",{className:"closeBtn",onClick:x,children:t(H,{className:"absolute right-[8px] top-[8px] text-white z-[9]"})})}),t("div",{className:"aspect-video object-cover rounded-[20px] ",children:t(be,{link:i?$[i].PRE_LINK:$.male.PRE_LINK,wrapperClassName:"w-screen h-screen fixed top-[0] left-[0]"})})]})]})}function Se({scanId:n,userDetails:a,config:o,isFaceScan:i,isVideoUploadedCorrect:d,isMeasurementAvailable:u,onScanSuccess:p,isSuccess:y}){const{gender:v,shopDomain:x,heightInCm:b,deviceFocalLength:S,userName:N,email:C,scanType:F}=a,D=[M,_,z].includes(F),[I,k]=l(!0),T=r(async()=>{try{D&&await w.auth.addUser({scanId:n,email:C,name:N,gender:v,height:b}),G.capture(x,{scanID:n,email:C,height:b,focalLength:S,clothesFit:"0",gender:v})}catch(e){console.log(e)}},[D]),{translate:L}=s(m)||{};c(()=>{d&&T()},[d]);const E=y||(i?u&&d:d||u);return t(Y,{className:"flex h-full w-full flex-col ",children:e("div",{className:"h-full w-full flex-col items-center justify-center flex",children:[t(xe,{loader:o?.loader,setShowDrawer:k}),t(X,{open:I,onClose:(e,t)=>{},className:"camera-drawer",anchor:"bottom",children:t("div",{className:"max-w-[28rem] mx-auto w-full h-full flex text-center flex-col justify-between items-center bg-primary rounded-t-[30px] p-[1rem]",style:{background:o?.style?.base?.backgroundColor},children:e("div",{className:"w-full h-full flex flex-col",children:[t(f,{title:L?.(h.measurementsBeingTaken),resolvedConfig:o}),t("div",{className:"flex items-center justify-center flex-1",children:t("video",{preload:"auto",className:"max-h-[calc(100vh-450px)] mx-auto w-full object-contain border-none",muted:!0,loop:!0,autoPlay:!0,playsInline:!0,children:t("source",{src:v===U.Male?A:j,type:"video/mp4"})})}),E&&t(g,{resolvedConfig:o,className:"!w-[180px] mx-auto",buttonText:L?.(h.next),buttonFunc:p&&p})]})})})]})})}const Ne=({userDetails:n,config:a,onRetry:o,onScanError:i,isError:d,isSuccess:u,onScanSuccess:f})=>{const{gender:h,scanType:p,shopDomain:g,heightInCm:y,email:v,deviceFocalLength:x,deviceModelName:b,callbackUrl:C}=n,[D,T]=l(!1),[E,$]=l(!1),[M,_]=l(!1),[z,A]=l({disabled:!1,message:""}),[j,U]=l(""),[O,K]=l(!1),[H,G]=l(!0),[Q,Y]=l(!1),[Z,ee]=l(""),[te,ne]=l(N()),{gyroData:ae}=function(e){const[t,n]=l([]),[a,s]=l(!1),o=r(e=>{try{const{alpha:t,beta:a,gamma:s}=e;n(e=>[...e,{alpha:t?.toString()||void 0,beta:a?.toString()||void 0,gamma:s?.toString()||void 0,timestamp:(new Date).toISOString()}])}catch(e){console.log(e)}},[]),i=r(async()=>{const e=DeviceOrientationEvent;if(void 0!==e&&"function"==typeof e.requestPermission)try{"granted"===await e.requestPermission()?s(!0):console.warn("Device orientation permission denied.")}catch(e){console.error("Error requesting device orientation permission:",e)}else s(!0)},[]);return c(()=>(e&&a?window.addEventListener("deviceorientation",o):n([]),()=>{window.removeEventListener("deviceorientation",o)}),[e,a,o]),c(()=>{e&&i()},[e,i]),{gyroData:t}}(Q),{setPreferredLanguage:se}=s(m)||{},re=P(a),oe=r(()=>{ee(F()),U(""),T(!1),K(!1)},[]),le=e=>{i({...e,message:L(e)}),ce(),_(!1),U(e),$(!1),S({eventName:`${g}/measurement_failed/fit-view`,scanID:Z,status:"failed",email:v,message:L(e)}),te&&S({eventName:`${g}/scan_completion_time`,scanID:Z,status:"failed",completionTime:N()-te,email:v})},ce=()=>{ne(null),ee("")},de=r(async e=>{if(e&&"success"===e?.scanStatus&&"intermediate"===e?.resultType&&200===e?.code)return void S({eventName:`${g}/measurement_success/intermediate`,scanID:Z,status:"success",email:v});ce();const t=Z;_(!0),S({eventName:`${g}/measurement_success/fit-view`,scanID:t,status:"success",email:v}),te&&S({eventName:`${g}/scan_completion_time`,scanID:t,status:"success",completionTime:N()-te,email:v})},[p,g,Z]),ue=e=>{_(!1),U(""),$(!1),w.measurement.handleMeasurementSocket({scanId:e||Z,onOpen:()=>{q({eventName:`${g}/webSocket`,scanID:Z,connection:"open",type:"measurement_recommendation",email:v})},onClose:()=>q({eventName:`${g}/webSocket`,scanID:Z,connection:"close",type:"measurement_recommendation",email:v}),onError:e=>{le(e),q({eventName:`${g}/webSocket`,scanID:Z,connection:"error",type:"measurement_recommendation",email:v})},onSuccess:e=>{q({eventName:`${g}/webSocket`,scanID:Z,connection:"success",type:"measurement_recommendation",email:v}),de(e)}})},fe=r(async e=>{const t=V({gender:h,focal_length:`${x}`,height:`${y}`,customer_store_url:g,clothes_fit:"0",scan_type:p,callback_url:C||"https://example.com/webhook"});S({eventName:`${g}/body_scan_meta_data`,scanID:Z,email:v,data:JSON.stringify(t)});try{await w.fileUpload.uploadFileFrontend({file:e,arrayMetaData:t,scanId:Z,email:v}),await w.fileUpload.setDeviceInfo({model:b,detection:"manual",gyro:ae,scanId:Z}),console.log("video successfully uploaded"),K(!1),S({eventName:`${g}/scan_success`,scanID:Z,status:"success",email:v,data:JSON.stringify(t)}),S({eventName:"scan finished",scanID:Z,status:"success",email:v}),ne(N()),setTimeout(()=>{K(!0)},3e3)}catch(e){S({eventName:"scan finished",scanID:Z,status:"failed",email:v,message:L(e)}),S({eventName:`${g}/scan_failed`,scanID:Z,status:"failed",email:v,message:L(e),data:JSON.stringify(t)}),U(L(e)),K(!1),console.log(e,"video upload failed")}finally{Y(!1)}},[Z,ae]),he=r(async e=>{try{const t=await w.measurement.getMeasurementResult(e),n=t?.data?.isMeasured,a=te||N(),s=N(),r=300;if(G(!1),!1===n)return ce(),void ee(F());T(!0),!0===n?await de(null):null===n&&a>s+r?le(t?.data?.error):ue(e)}catch(e){console.log(e),ce(),ee(F()),T(!1)}},[le,de,ee]),pe=r(async()=>{if(+y<152.4||+y>213.36)return void i({message:"Height must be between 152.4cm (5ft) and 213.36cm (7ft)"});const e=await I();if(e.disabled)S({eventName:`${g}/camera_activation`,scanID:Z,status:"failed",email:v}),G(!1);else{Z?he(Z):G(!1),S({eventName:`${g}/camera_activation`,scanID:Z,status:"success",email:v})}A(e),U(""),K(!1)},[he,v,Z,ee,g]);return c(()=>{J.init(R,{api_host:W}),J.capture("$pageview")},[]),c(()=>{se?.(re?.language)},[re]),c(()=>{d||u||g&&pe()},[g,y,d,u]),c(()=>{d||u||O&&g&&Z&&ue()},[O,g,Z,d,u]),d?e(B,{children:[t(xe,{}),t(X,{anchor:"bottom",open:!0,className:"camera-drawer",onClose:(e,t)=>{},children:t(we,{scanFailsError:j||d,onNext:()=>{},setScanUniqueKey:ee,gender:h,resolvedConfig:re,setIsVideoUploaded:K})})]}):u?t(Se,{isFaceScan:!1,scanId:Z,isMeasurementAvailable:M,userDetails:n,isVideoUploadedCorrect:E,config:re,isSuccess:u}):H?t("div",{className:"flex top-0 !mt-0 left-0 z-[999] bg-opacity-80 bg-[#1b1b1b] absolute justify-center items-center w-full h-full",children:t(k,{url:re?.loader})}):z.disabled?t(B,{children:t(ve,{})}):D||j?!D&&!M||j?e(B,{children:[t(xe,{}),t(X,{anchor:"bottom",open:!0,className:"camera-drawer",onClose:(e,t)=>{},children:t(we,{scanFailsError:j,onNext:()=>{o?.(),oe()},setScanUniqueKey:ee,gender:h,resolvedConfig:re,setIsVideoUploaded:K})})]}):t(B,{children:t(Se,{isFaceScan:!1,scanId:Z,isMeasurementAvailable:M,userDetails:n,onScanSuccess:f,isVideoUploadedCorrect:E,config:re})}):t(me.Provider,{value:{setStartGyro:Y,handleFileUpload:fe,setUploadLoading:T},children:t(ie,{children:t(B,{children:t(ye,{config:re,scanID:Z,userDetails:n,setIsVideoUploaded:K,setScanFailsError:U,setScanStartTime:ne,setScanUniqueKey:ee})})})})};export{Ne as B};
2
- //# sourceMappingURL=BodyScan-Bqhg-Sgk.js.map