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CrG,IAAmBA,GAC1EwH,EAAY,CACXW,UAAW,EACXjF,IAAKA,EACL6D,MAAO,IACA5H,EAAM4H,SACNU,EACHW,SAAU,WACVb,cAAe,OACfc,QAAS,EACTC,OAAQ,OAIpB,SAASjC,EAAsCrG,GAC3C,MAAmB,kBAAZA,EAEX,SAASsG,EAA+BtG,GACpC,OAAOqG,EAAsCrG,GAAW,gBAAkBA,EAAU,UAAY,YAEpG,MAAMuI,EAA4C3D,EAC5C4D,EAA4CtB,G,kFCpKlD,SAASuB,EAA0C1G,GAC/C,MAAMmB,GAAM,YAAc,CACtBnB,MAAOA,EACP2G,SAAU3G,IAId,OAAO,cAAe,KACdmB,EAAI6C,QAAQhE,QAAUA,IACtBmB,EAAI6C,QAAQ2C,SAAWxF,EAAI6C,QAAQhE,MACnCmB,EAAI6C,QAAQhE,MAAQA,GAEjBmB,EAAI6C,QAAQ2C,WACpB,CACC3G","sources":["webpack://_N_E/./public/icons/divider-horizontal.svg","webpack://_N_E/./public/icons/tick.svg","webpack://_N_E/./src/components/dls/Forms/Checkbox/Checkbox.tsx","webpack://_N_E/./src/components/dls/Forms/Input/index.tsx","webpack://_N_E/./src/utils/filter-translations.ts","webpack://_N_E/./src/components/dls/Forms/Checkbox/Checkbox.module.scss","webpack://_N_E/./src/components/dls/Forms/Input/Input.module.scss","webpack://_N_E/./node_modules/@radix-ui/react-checkbox/dist/index.mjs","webpack://_N_E/./node_modules/@radix-ui/react-use-previous/dist/index.mjs"],"sourcesContent":["var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nvar SvgDividerHorizontal = function SvgDividerHorizontal(props) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n viewBox: \"0 0 20 20\",\n height: 16,\n width: 16,\n fill: \"none\"\n }, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n stroke: \"var(--color-secondary-medium)\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n d: \"M5 10h10\"\n })));\n};\nexport default SvgDividerHorizontal;","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nvar SvgTick = function SvgTick(props) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n viewBox: \"0 0 20 20\",\n height: 20,\n width: 20,\n fill: \"none\"\n }, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"m14 7-5.5 5.5L6 10\",\n stroke: \"var(--color-background-default)\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n })));\n};\nexport default SvgTick;","import React from 'react';\n\nimport * as RadixCheckbox from '@radix-ui/react-checkbox';\nimport classNames from 'classnames';\n\nimport styles from './Checkbox.module.scss';\n\nimport DividerHorizontalIcon from '@/icons/divider-horizontal.svg';\nimport TickIcon from '@/icons/tick.svg';\n\nconst INDETERMINATE = 'indeterminate';\n\ninterface Props {\n id: string;\n onChange: (checked: boolean) => void;\n checked?: boolean | typeof INDETERMINATE;\n disabled?: boolean;\n required?: boolean;\n label?: string | JSX.Element;\n name?: string;\n defaultChecked?: boolean;\n}\n\nconst Checkbox: React.FC = ({\n disabled = false,\n required = false,\n defaultChecked,\n checked,\n id,\n label,\n name,\n onChange,\n}) => {\n /**\n * Handle when the value of the checkbox input changes.\n *\n * @param {boolean} newChecked\n * @returns {void}\n */\n const handleChange = (newChecked: boolean): void => {\n onChange(newChecked);\n };\n\n return (\n
\n \n \n {checked === INDETERMINATE ? : }\n \n \n {label && (\n \n )}\n
\n );\n};\n\nexport default Checkbox;\n","/* eslint-disable max-lines */\nimport React, {\n ReactNode,\n useState,\n useEffect,\n ChangeEvent,\n RefObject,\n KeyboardEvent,\n HTMLAttributes,\n} from 'react';\n\nimport classNames from 'classnames';\n\nimport Button, { ButtonShape, ButtonSize, ButtonVariant } from '../../Button/Button';\n\nimport styles from './Input.module.scss';\n\nimport ClearIcon from '@/icons/close.svg';\n\nexport enum InputSize {\n Small = 'small',\n Medium = 'medium',\n Large = 'large',\n}\n\nexport enum InputType {\n Error = 'error',\n Warning = 'warning',\n Success = 'success',\n}\n\nexport enum InputVariant {\n Default = 'default',\n Main = 'main',\n}\ninterface Props {\n id: string;\n name?: string;\n size?: InputSize;\n placeholder?: string;\n fixedWidth?: boolean;\n disabled?: boolean;\n clearable?: boolean;\n prefix?: ReactNode;\n suffix?: ReactNode;\n onClearClicked?: () => void;\n onChange?: (value: string) => void;\n onKeyDown?: (event: KeyboardEvent) => void;\n inputMode?: HTMLAttributes['inputMode'];\n value?: string;\n label?: string | JSX.Element;\n type?: InputType;\n shouldFlipOnRTL?: boolean;\n variant?: InputVariant;\n containerClassName?: string;\n htmlType?: React.HTMLInputTypeAttribute;\n isRequired?: boolean;\n inputRef?: RefObject;\n}\n\nconst Input: React.FC = ({\n id,\n name,\n label,\n placeholder,\n size = InputSize.Medium,\n fixedWidth = true,\n disabled = false,\n clearable = false,\n type,\n variant,\n prefix,\n suffix,\n onClearClicked,\n onChange,\n onKeyDown,\n inputMode,\n value = '',\n shouldFlipOnRTL = true,\n containerClassName,\n htmlType,\n isRequired,\n inputRef,\n}) => {\n const [inputValue, setInputValue] = useState(value);\n // listen to any change in value in-case the value gets populated after and API call.\n useEffect(() => {\n setInputValue(value);\n }, [value]);\n\n const onValueChange = (event: ChangeEvent) => {\n const newValue = event.target.value;\n setInputValue(newValue);\n if (onChange) {\n onChange(newValue);\n }\n };\n\n return (\n <>\n {label &&

{label}

}\n \n {prefix && (\n
{prefix}
\n )}\n \n {clearable ? (\n <>\n {inputValue && (\n
\n \n \n \n
\n )}\n \n ) : (\n <>\n {suffix && (\n
\n {suffix}\n
\n )}\n \n )}\n \n \n );\n};\n\nexport default Input;\n","import Fuse from 'fuse.js';\n\nimport AvailableTranslation from 'types/AvailableTranslation';\n\nconst filterTranslations = (\n translations: AvailableTranslation[],\n searchQuery: string,\n): AvailableTranslation[] => {\n const fuse = new Fuse(translations, {\n keys: ['name', 'languageName', 'authorName', 'translatedName.name'],\n threshold: 0.3,\n });\n\n const filteredTranslations = fuse.search(searchQuery).map(({ item }) => item);\n return filteredTranslations;\n};\n\nexport default filterTranslations;\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"container\":\"Checkbox_container__LWbsV\",\"checkbox\":\"Checkbox_checkbox__bbyfA\",\"label\":\"Checkbox_label__MrEvp\",\"disabled\":\"Checkbox_disabled__3XIf_\",\"indicator\":\"Checkbox_indicator__6umIV\",\"disabledIndicator\":\"Checkbox_disabledIndicator__Dmw2E\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"container\":\"Input_container__5BNOH\",\"fixedWidth\":\"Input_fixedWidth__MZoNx\",\"disabled\":\"Input_disabled__AFA4l\",\"error\":\"Input_error__cfc8q\",\"success\":\"Input_success__qb_Ue\",\"warning\":\"Input_warning__KwRSJ\",\"main\":\"Input_main__K4bVL\",\"input\":\"Input_input__za7E9\",\"rtlInput\":\"Input_rtlInput__8Yg1Q\",\"smallContainer\":\"Input_smallContainer__bxyYT\",\"mediumContainer\":\"Input_mediumContainer__jEOpT\",\"largeContainer\":\"Input_largeContainer__yafZ8\",\"label\":\"Input_label__loZWW\",\"clearContainer\":\"Input_clearContainer__3LxT4\",\"prefixSuffixContainer\":\"Input_prefixSuffixContainer__n84F6\",\"prefix\":\"Input_prefix__jYhnp\",\"suffix\":\"Input_suffix__v_BvR\"};","import $1bpvS$babelruntimehelpersesmextends from \"@babel/runtime/helpers/esm/extends\";\nimport {forwardRef as $1bpvS$forwardRef, useState as $1bpvS$useState, useRef as $1bpvS$useRef, useEffect as $1bpvS$useEffect, createElement as $1bpvS$createElement} from \"react\";\nimport {useComposedRefs as $1bpvS$useComposedRefs} from \"@radix-ui/react-compose-refs\";\nimport {createContextScope as $1bpvS$createContextScope} from \"@radix-ui/react-context\";\nimport {composeEventHandlers as $1bpvS$composeEventHandlers} from \"@radix-ui/primitive\";\nimport {useControllableState as $1bpvS$useControllableState} from \"@radix-ui/react-use-controllable-state\";\nimport {usePrevious as $1bpvS$usePrevious} from \"@radix-ui/react-use-previous\";\nimport {useSize as $1bpvS$useSize} from \"@radix-ui/react-use-size\";\nimport {Presence as $1bpvS$Presence} from \"@radix-ui/react-presence\";\nimport {Primitive as $1bpvS$Primitive} from \"@radix-ui/react-primitive\";\n\n\n\n\n\n\n\n\n\n\n\n/* -------------------------------------------------------------------------------------------------\n * Checkbox\n * -----------------------------------------------------------------------------------------------*/ const $e698a72e93240346$var$CHECKBOX_NAME = 'Checkbox';\nconst [$e698a72e93240346$var$createCheckboxContext, $e698a72e93240346$export$b566c4ff5488ea01] = $1bpvS$createContextScope($e698a72e93240346$var$CHECKBOX_NAME);\nconst [$e698a72e93240346$var$CheckboxProvider, $e698a72e93240346$var$useCheckboxContext] = $e698a72e93240346$var$createCheckboxContext($e698a72e93240346$var$CHECKBOX_NAME);\nconst $e698a72e93240346$export$48513f6b9f8ce62d = /*#__PURE__*/ $1bpvS$forwardRef((props, forwardedRef)=>{\n const { __scopeCheckbox: __scopeCheckbox , name: name , checked: checkedProp , defaultChecked: defaultChecked , required: required , disabled: disabled , value: value = 'on' , onCheckedChange: onCheckedChange , ...checkboxProps } = props;\n const [button, setButton] = $1bpvS$useState(null);\n const composedRefs = $1bpvS$useComposedRefs(forwardedRef, (node)=>setButton(node)\n );\n const hasConsumerStoppedPropagationRef = $1bpvS$useRef(false); // We set this to true by default so that events bubble to forms without JS (SSR)\n const isFormControl = button ? Boolean(button.closest('form')) : true;\n const [checked = false, setChecked] = $1bpvS$useControllableState({\n prop: checkedProp,\n defaultProp: defaultChecked,\n onChange: onCheckedChange\n });\n const initialCheckedStateRef = $1bpvS$useRef(checked);\n $1bpvS$useEffect(()=>{\n const form = button === null || button === void 0 ? void 0 : button.form;\n if (form) {\n const reset = ()=>setChecked(initialCheckedStateRef.current)\n ;\n form.addEventListener('reset', reset);\n return ()=>form.removeEventListener('reset', reset)\n ;\n }\n }, [\n button,\n setChecked\n ]);\n return /*#__PURE__*/ $1bpvS$createElement($e698a72e93240346$var$CheckboxProvider, {\n scope: __scopeCheckbox,\n state: checked,\n disabled: disabled\n }, /*#__PURE__*/ $1bpvS$createElement($1bpvS$Primitive.button, $1bpvS$babelruntimehelpersesmextends({\n type: \"button\",\n role: \"checkbox\",\n \"aria-checked\": $e698a72e93240346$var$isIndeterminate(checked) ? 'mixed' : checked,\n \"aria-required\": required,\n \"data-state\": $e698a72e93240346$var$getState(checked),\n \"data-disabled\": disabled ? '' : undefined,\n disabled: disabled,\n value: value\n }, checkboxProps, {\n ref: composedRefs,\n onKeyDown: $1bpvS$composeEventHandlers(props.onKeyDown, (event)=>{\n // According to WAI ARIA, Checkboxes don't activate on enter keypress\n if (event.key === 'Enter') event.preventDefault();\n }),\n onClick: $1bpvS$composeEventHandlers(props.onClick, (event)=>{\n setChecked((prevChecked)=>$e698a72e93240346$var$isIndeterminate(prevChecked) ? true : !prevChecked\n );\n if (isFormControl) {\n hasConsumerStoppedPropagationRef.current = event.isPropagationStopped(); // if checkbox is in a form, stop propagation from the button so that we only propagate\n // one click event (from the input). We propagate changes from an input so that native\n // form validation works and form events reflect checkbox updates.\n if (!hasConsumerStoppedPropagationRef.current) event.stopPropagation();\n }\n })\n })), isFormControl && /*#__PURE__*/ $1bpvS$createElement($e698a72e93240346$var$BubbleInput, {\n control: button,\n bubbles: !hasConsumerStoppedPropagationRef.current,\n name: name,\n value: value,\n checked: checked,\n required: required,\n disabled: disabled // We transform because the input is absolutely positioned but we have\n ,\n style: {\n transform: 'translateX(-100%)'\n }\n }));\n});\n/*#__PURE__*/ Object.assign($e698a72e93240346$export$48513f6b9f8ce62d, {\n displayName: $e698a72e93240346$var$CHECKBOX_NAME\n});\n/* -------------------------------------------------------------------------------------------------\n * CheckboxIndicator\n * -----------------------------------------------------------------------------------------------*/ const $e698a72e93240346$var$INDICATOR_NAME = 'CheckboxIndicator';\nconst $e698a72e93240346$export$59aad738f51d1c05 = /*#__PURE__*/ $1bpvS$forwardRef((props, forwardedRef)=>{\n const { __scopeCheckbox: __scopeCheckbox , forceMount: forceMount , ...indicatorProps } = props;\n const context = $e698a72e93240346$var$useCheckboxContext($e698a72e93240346$var$INDICATOR_NAME, __scopeCheckbox);\n return /*#__PURE__*/ $1bpvS$createElement($1bpvS$Presence, {\n present: forceMount || $e698a72e93240346$var$isIndeterminate(context.state) || context.state === true\n }, /*#__PURE__*/ $1bpvS$createElement($1bpvS$Primitive.span, $1bpvS$babelruntimehelpersesmextends({\n \"data-state\": $e698a72e93240346$var$getState(context.state),\n \"data-disabled\": context.disabled ? '' : undefined\n }, indicatorProps, {\n ref: forwardedRef,\n style: {\n pointerEvents: 'none',\n ...props.style\n }\n })));\n});\n/*#__PURE__*/ Object.assign($e698a72e93240346$export$59aad738f51d1c05, {\n displayName: $e698a72e93240346$var$INDICATOR_NAME\n});\n/* ---------------------------------------------------------------------------------------------- */ const $e698a72e93240346$var$BubbleInput = (props)=>{\n const { control: control , checked: checked , bubbles: bubbles = true , ...inputProps } = props;\n const ref = $1bpvS$useRef(null);\n const prevChecked = $1bpvS$usePrevious(checked);\n const controlSize = $1bpvS$useSize(control); // Bubble checked change to parents (e.g form change event)\n $1bpvS$useEffect(()=>{\n const input = ref.current;\n const inputProto = window.HTMLInputElement.prototype;\n const descriptor = Object.getOwnPropertyDescriptor(inputProto, 'checked');\n const setChecked = descriptor.set;\n if (prevChecked !== checked && setChecked) {\n const event = new Event('click', {\n bubbles: bubbles\n });\n input.indeterminate = $e698a72e93240346$var$isIndeterminate(checked);\n setChecked.call(input, $e698a72e93240346$var$isIndeterminate(checked) ? false : checked);\n input.dispatchEvent(event);\n }\n }, [\n prevChecked,\n checked,\n bubbles\n ]);\n return /*#__PURE__*/ $1bpvS$createElement(\"input\", $1bpvS$babelruntimehelpersesmextends({\n type: \"checkbox\",\n \"aria-hidden\": true,\n defaultChecked: $e698a72e93240346$var$isIndeterminate(checked) ? false : checked\n }, inputProps, {\n tabIndex: -1,\n ref: ref,\n style: {\n ...props.style,\n ...controlSize,\n position: 'absolute',\n pointerEvents: 'none',\n opacity: 0,\n margin: 0\n }\n }));\n};\nfunction $e698a72e93240346$var$isIndeterminate(checked) {\n return checked === 'indeterminate';\n}\nfunction $e698a72e93240346$var$getState(checked) {\n return $e698a72e93240346$var$isIndeterminate(checked) ? 'indeterminate' : checked ? 'checked' : 'unchecked';\n}\nconst $e698a72e93240346$export$be92b6f5f03c0fe9 = $e698a72e93240346$export$48513f6b9f8ce62d;\nconst $e698a72e93240346$export$adb584737d712b70 = $e698a72e93240346$export$59aad738f51d1c05;\n\n\n\n\nexport {$e698a72e93240346$export$b566c4ff5488ea01 as createCheckboxScope, $e698a72e93240346$export$48513f6b9f8ce62d as Checkbox, $e698a72e93240346$export$59aad738f51d1c05 as CheckboxIndicator, $e698a72e93240346$export$be92b6f5f03c0fe9 as Root, $e698a72e93240346$export$adb584737d712b70 as Indicator};\n//# sourceMappingURL=index.mjs.map\n","import {useRef as $8LvvK$useRef, useMemo as $8LvvK$useMemo} from \"react\";\n\n\nfunction $010c2913dbd2fe3d$export$5cae361ad82dce8b(value) {\n const ref = $8LvvK$useRef({\n value: value,\n previous: value\n }); // We compare values before making an update to ensure that\n // a change has been made. This ensures the previous value is\n // persisted correctly between renders.\n return $8LvvK$useMemo(()=>{\n if (ref.current.value !== value) {\n ref.current.previous = ref.current.value;\n ref.current.value = value;\n }\n return ref.current.previous;\n }, [\n value\n ]);\n}\n\n\n\n\nexport {$010c2913dbd2fe3d$export$5cae361ad82dce8b as usePrevious};\n//# sourceMappingURL=index.mjs.map\n"],"names":["_path","_extends","Object","assign","bind","n","e","arguments","length","t","r","hasOwnProperty","call","apply","props","viewBox","height","width","fill","stroke","strokeWidth","strokeLinecap","strokeLinejoin","d","disabled","required","defaultChecked","checked","id","label","name","onChange","div","className","classNames","styles","RadixCheckbox","onCheckedChange","newChecked","undefined","DividerHorizontalIcon","TickIcon","htmlFor","InputSize","InputType","InputVariant","placeholder","size","Medium","fixedWidth","clearable","type","variant","prefix","suffix","onClearClicked","onKeyDown","inputMode","value","shouldFlipOnRTL","containerClassName","htmlType","isRequired","inputRef","useState","inputValue","setInputValue","useEffect","p","Small","Large","Error","Success","Warning","Main","input","dir","ref","event","newValue","target","Button","shape","ButtonShape","ButtonVariant","ButtonSize","onClick","ClearIcon","translations","searchQuery","Fuse","keys","threshold","search","map","item","module","exports","$e698a72e93240346$var$CHECKBOX_NAME","$e698a72e93240346$var$createCheckboxContext","$e698a72e93240346$export$b566c4ff5488ea01","$e698a72e93240346$var$CheckboxProvider","$e698a72e93240346$var$useCheckboxContext","$e698a72e93240346$export$48513f6b9f8ce62d","forwardedRef","__scopeCheckbox","checkedProp","checkboxProps","button","setButton","composedRefs","node","hasConsumerStoppedPropagationRef","isFormControl","Boolean","closest","setChecked","prop","defaultProp","initialCheckedStateRef","form","reset","current","addEventListener","removeEventListener","scope","state","role","$e698a72e93240346$var$isIndeterminate","$e698a72e93240346$var$getState","key","preventDefault","prevChecked","isPropagationStopped","stopPropagation","$e698a72e93240346$var$BubbleInput","control","bubbles","style","transform","$e698a72e93240346$var$INDICATOR_NAME","$e698a72e93240346$export$59aad738f51d1c05","forceMount","indicatorProps","context","present","pointerEvents","inputProps","controlSize","inputProto","window","HTMLInputElement","prototype","getOwnPropertyDescriptor","set","Event","indeterminate","dispatchEvent","tabIndex","position","opacity","margin","$e698a72e93240346$export$be92b6f5f03c0fe9","$e698a72e93240346$export$adb584737d712b70","$010c2913dbd2fe3d$export$5cae361ad82dce8b","previous"],"sourceRoot":""}