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EAAO7D,EAAP6D,QACArB,EAASxC,EAATwC,UACA1F,EAAIkD,EAAJlD,KACGf,EAAKmJ,EAAAlF,EAAAmF,GAEFR,EAASrB,IACbwB,EAAoB,KACpBhI,GAAQgI,EAAwB,SAAEhI,GAClC0F,GAGF,OACE5H,EAAAA,cAAA,MAAA7B,OAAAC,OAAA,GAAS+C,EAAK,CAAEyG,UAAWmC,IACzB/J,EAAAA,cAACwK,EAAAA,EAAe,CAAC5C,UAAU,qBAC3B5H,EAAAA,cAAA,SAAIiJ,GAGV,C","sources":["webpack://uk-b2c/./node_modules/@bugsnag/plugin-react/dist/bugsnag-react.js","webpack://uk-b2c/./app/javascript/packs/modalitySearch.tsx","webpack://uk-b2c/./app/javascript/src/NewSearchResults/SearchForm/BodyPartsInput.tsx","webpack://uk-b2c/./app/javascript/src/NewSearchResults/SearchForm/ConsultationFooter.tsx","webpack://uk-b2c/./app/javascript/src/NewSearchResults/SearchForm/inputStyles.ts","webpack://uk-b2c/./app/javascript/src/shared/SystemMessage.tsx"],"sourcesContent":["(function (f) {\n if (typeof exports === \"object\" && typeof module !== \"undefined\") {\n module.exports = f();\n } else if (typeof define === \"function\" && define.amd) {\n define([], f);\n } else {\n var g;\n if (typeof window !== \"undefined\") {\n g = window;\n } else if (typeof global !== \"undefined\") {\n g = global;\n } else if (typeof self !== \"undefined\") {\n g = self;\n } else {\n g = this;\n }\n g.BugsnagPluginReact = f();\n }\n})(function () {\n var define, module, exports;\n var _$src_1 = {};\n function _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n }\n function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n return self;\n }\n function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n _setPrototypeOf(subClass, superClass);\n }\n function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n }\n _$src_1 = /*#__PURE__*/function () {\n function BugsnagPluginReact() {\n // Fetch React from the window object, if it exists\n var globalReact = typeof window !== 'undefined' && window.React;\n this.name = 'react';\n this.lazy = arguments.length === 0 && !globalReact;\n if (!this.lazy) {\n this.React = (arguments.length <= 0 ? undefined : arguments[0]) || globalReact;\n if (!this.React) throw new Error('@bugsnag/plugin-react reference to `React` was undefined');\n }\n }\n var _proto = BugsnagPluginReact.prototype;\n _proto.load = function load(client) {\n if (!this.lazy) {\n var ErrorBoundary = createClass(this.React, client);\n ErrorBoundary.createErrorBoundary = function () {\n return ErrorBoundary;\n };\n return ErrorBoundary;\n }\n var BugsnagPluginReactLazyInitializer = function () {\n throw new Error(\"@bugsnag/plugin-react was used incorrectly. Valid usage is as follows:\\nPass React to the plugin constructor\\n\\n `Bugsnag.start({ plugins: [new BugsnagPluginReact(React)] })`\\nand then call `const ErrorBoundary = Bugsnag.getPlugin('react').createErrorBoundary()`\\n\\nOr if React is not available until after Bugsnag has started,\\nconstruct the plugin with no arguments\\n `Bugsnag.start({ plugins: [new BugsnagPluginReact()] })`,\\nthen pass in React when available to construct your error boundary\\n `const ErrorBoundary = Bugsnag.getPlugin('react').createErrorBoundary(React)`\");\n };\n BugsnagPluginReactLazyInitializer.createErrorBoundary = function (React) {\n if (!React) throw new Error('@bugsnag/plugin-react reference to `React` was undefined');\n return createClass(React, client);\n };\n return BugsnagPluginReactLazyInitializer;\n };\n return BugsnagPluginReact;\n }();\n var formatComponentStack = function (str) {\n var lines = str.split(/\\s*\\n\\s*/g);\n var ret = '';\n for (var line = 0, len = lines.length; line < len; line++) {\n if (lines[line].length) ret += \"\" + (ret.length ? '\\n' : '') + lines[line];\n }\n return ret;\n };\n var createClass = function (React, client) {\n return /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(ErrorBoundary, _React$Component);\n function ErrorBoundary(props) {\n var _this;\n _this = _React$Component.call(this, props) || this;\n _this.state = {\n error: null,\n info: null\n };\n _this.handleClearError = _this.handleClearError.bind(_assertThisInitialized(_this));\n return _this;\n }\n var _proto2 = ErrorBoundary.prototype;\n _proto2.handleClearError = function handleClearError() {\n this.setState({\n error: null,\n info: null\n });\n };\n _proto2.componentDidCatch = function componentDidCatch(error, info) {\n var onError = this.props.onError;\n var handledState = {\n severity: 'error',\n unhandled: true,\n severityReason: {\n type: 'unhandledException'\n }\n };\n var event = client.Event.create(error, true, handledState, 1);\n if (info && info.componentStack) info.componentStack = formatComponentStack(info.componentStack);\n event.addMetadata('react', info);\n client._notify(event, onError);\n this.setState({\n error: error,\n info: info\n });\n };\n _proto2.render = function render() {\n var error = this.state.error;\n if (error) {\n var FallbackComponent = this.props.FallbackComponent;\n if (FallbackComponent) return React.createElement(FallbackComponent, _extends({}, this.state, {\n clearError: this.handleClearError\n }));\n return null;\n }\n return this.props.children;\n };\n return ErrorBoundary;\n }(React.Component);\n };\n _$src_1.formatComponentStack = formatComponentStack;\n _$src_1[\"default\"] = _$src_1;\n return _$src_1;\n});","import * as React from \"react\";\nimport * as ReactDOM from \"react-dom/client\";\n\nimport Bugsnag from \"@bugsnag/js\";\nimport BugsnagPluginReact from \"@bugsnag/plugin-react\";\nimport { ModalitySearch } from \"../src/ModalitySearch/ModalitySearch\";\nimport { GoogleScriptsProvider } from \"../src/shared/GoogleScriptsContext\";\n\nBugsnag.start({\n apiKey: window.AppConfig.BUGSNAG_FRONTEND_API_KEY || \"invalid\",\n plugins: [new BugsnagPluginReact()],\n releaseStage: window.AppConfig.RAILS_ENV,\n enabledReleaseStages: [\"production\", \"staging\"],\n});\n\nconst googleScriptsLibraries = [\"places\" as const];\n\ndocument.addEventListener(\"DOMContentLoaded\", () => {\n let node = document.getElementById(\"modality_search\");\n\n if (!node) {\n return;\n }\n\n const data = JSON.parse(node.getAttribute(\"data\") || \"[]\");\n\n const area = data.area;\n const selectedScanType = data.scan_type;\n const availableBodyParts = data.available_body_parts ?? [];\n const selectedBodyParts = data.selected_body_parts ?? [];\n const isSearchBar = data.isSearchBar ?? false;\n const cta = data.cta ?? \"Find a centre\";\n\n const root = ReactDOM.createRoot(node);\n root.render(\n \n \n \n );\n});\n","import { Combobox } from \"@headlessui/react\";\nimport {\n IconArrowRight,\n IconChevronDown,\n IconSearch,\n} from \"@tabler/icons-react\";\nimport React from \"react\";\nimport { SystemMessage } from \"../../shared/SystemMessage\";\n\nimport classNames from \"classnames\";\nimport { partition } from \"fp-ts/lib/Array\";\nimport { BodyPart } from \"../types\";\nimport {\n itemStyles,\n labelStyles,\n optionsStyles,\n targetStyles,\n} from \"./inputStyles\";\nimport { pipe } from \"fp-ts/lib/function\";\nimport { ConsultationFooter } from \"./ConsultationFooter\";\n\ninterface BodyPartInputProps {\n name?: string;\n availableBodyParts: BodyPart[];\n maxBodyParts?: number;\n selectedBodyPartIds: number[];\n setSelectedBodyPartIds: (id: number[]) => void;\n errorId?: string;\n isGrouped?: boolean;\n inputClassName?: string;\n showConsultationFooter?: boolean;\n}\n\nexport function BodyPartInput({\n name = \"body-parts\",\n availableBodyParts,\n maxBodyParts = 4,\n selectedBodyPartIds,\n setSelectedBodyPartIds,\n isGrouped,\n errorId,\n inputClassName,\n showConsultationFooter,\n}: BodyPartInputProps) {\n const comboButton = React.useRef(null);\n const [query, setQuery] = React.useState(\"\");\n\n const filterByQuery = (items: BodyPart[]) => {\n return Boolean(query)\n ? items.filter(({ name }) =>\n name.toLowerCase().includes(query.trim().toLowerCase())\n )\n : items;\n };\n\n const { unselectedParts, selectedParts } = pipe(\n availableBodyParts,\n partition(({ id }) => selectedBodyPartIds?.includes(id)),\n ({ left, right }) => ({\n selectedParts: right,\n unselectedParts: filterByQuery(left),\n })\n );\n\n const warningId = `${name}-warning`;\n\n const totalParts = selectedBodyPartIds.length;\n const partLimitExceeded = totalParts >= maxBodyParts;\n\n React.useEffect(() => {\n // Allow tab to focus to work.\n if (comboButton.current) {\n comboButton.current.setAttribute(\"tabindex\", \"auto\");\n }\n }, [comboButton]);\n\n return (\n {\n setQuery(\"\");\n setSelectedBodyPartIds(value);\n if (comboButton.current) comboButton.current.click();\n }}\n >\n \n
\n {Boolean(totalParts) && (\n
\n Body Parts\n \n {totalParts}\n \n
\n )}\n \n {selectedParts.map(({ name }) => name || \"\").join(\", \") ||\n \"Body Parts\"}\n \n
\n \n \n \n
\n \n query}\n onChange={(e) => setQuery(e.target.value)}\n className=\"w-full focus:outline-none\"\n />\n
\n\n {partLimitExceeded && (\n \n )}\n\n {unselectedParts.length === 0 && !selectedParts.length && (\n

\n No body parts found\n

\n )}\n\n {selectedParts.map((bp) => (\n \n \n {bp.name}\n \n ))}\n\n {!partLimitExceeded &&\n unselectedParts.map((bp) => (\n \n \n {bp.name}\n \n ))}\n {showConsultationFooter && }\n \n \n );\n}\n","import { IconArrowRight } from \"@tabler/icons-react\";\nimport React from \"react\";\n\nexport function ConsultationFooter() {\n return (\n
\n Not sure what scan you need?{\" \"}\n \n Book a consultation {\" \"}\n \n
\n );\n}\n","import classNames from \"classnames\";\n\nexport const labelStyles = \"block text-sm text-neutral-500 flex gap-x-1\";\nexport const optionsStyles =\n \"ring-primary-300 absolute left-0 mt-2 space-y-px overflow-auto rounded-lg border border-neutral-200 bg-white p-2 text-sm font-medium text-neutral-700 shadow-lg focus:outline-none focus-visible:ring-2 min-w-full z-20\";\n\nexport function itemStyles(\n item: { selected: boolean; active: boolean },\n className?: string | boolean\n) {\n return classNames(\n item.active && \"bg-neutral-100\",\n \"cursor-pointer rounded-md p-2.5 flex items-center gap-2 select-none\",\n className\n );\n}\n\nexport function inputWrapperStyles(error = false, isGrouped = false) {\n return classNames(\n \"h-fit\",\n error && \"space-y-2\",\n error && isGrouped && \"lg:space-y-0\"\n );\n}\n\nexport function targetStyles(\n isGrouped?: boolean,\n ...styles: classNames.ArgumentArray\n) {\n return classNames(\n \"flex items-center gap-x-2.5 text-start gap-x-2.5 px-3 w-full\",\n \"text-base bg-white font-medium\",\n \"text-neutral-950 \",\n \"focus:outline-none focus-visible:ring-2 ring-primary-300\",\n \"border border-neutral-300 rounded-lg min-h-[63px]\",\n isGrouped && \"lg:border-0 lg:min-h-[44px] lg:py-0 lg:px-[18px]\",\n ...styles\n );\n}\n","import { IconAlertCircle } from \"@tabler/icons-react\";\nimport classNames from \"classnames\";\nimport React from \"react\";\n\ntype Comp = Omit, \"children\">;\n\ninterface SystemMessageProps extends Comp {\n message: string;\n type?: keyof (typeof MessageStyles)[\"variants\"];\n}\n\nconst MessageStyles = {\n base: \"flex items-center gap-x-2 p-4 text-base font-medium border rounded-lg w-full\",\n variants: {\n error: \"bg-red-50 text-red-600 border-red-600\",\n warning: \"bg-warning-50 text-neutral-950 border-warning-400\",\n },\n} as const;\n\nexport function SystemMessage({\n message,\n className,\n type,\n ...props\n}: SystemMessageProps) {\n const styles = classNames(\n MessageStyles[\"base\"],\n type && MessageStyles[\"variants\"][type],\n className\n );\n\n return (\n
\n \n

{message}

\n
\n );\n}\n"],"names":["module","exports","_$src_1","_extends","Object","assign","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","this","_assertThisInitialized","self","ReferenceError","_inheritsLoose","subClass","superClass","create","constructor","_setPrototypeOf","o","p","setPrototypeOf","__proto__","BugsnagPluginReact","globalReact","window","React","name","lazy","undefined","Error","load","client","ErrorBoundary","createClass","createErrorBoundary","BugsnagPluginReactLazyInitializer","formatComponentStack","str","lines","split","ret","line","len","_React$Component","props","_this","state","error","info","handleClearError","bind","_proto2","setState","componentDidCatch","onError","handledState","severity","unhandled","severityReason","type","event","Event","componentStack","addMetadata","_notify","render","FallbackComponent","createElement","clearError","children","Component","f","Bugsnag","apiKey","AppConfig","BUGSNAG_FRONTEND_API_KEY","plugins","releaseStage","RAILS_ENV","enabledReleaseStages","googleScriptsLibraries","document","addEventListener","_data$available_body_","_data$selected_body_p","_data$isSearchBar","_data$cta","node","getElementById","data","JSON","parse","getAttribute","area","selectedScanType","scan_type","availableBodyParts","available_body_parts","selectedBodyParts","selected_body_parts","isSearchBar","cta","ReactDOM","GoogleScriptsProvider","libraries","ModalitySearch","initialArea","scanType","BodyPartInput","_ref","_ref$name","_ref$maxBodyParts","maxBodyParts","selectedBodyPartIds","setSelectedBodyPartIds","isGrouped","errorId","showConsultationFooter","inputClassName","comboButton","_React$useState2","_slicedToArray","query","setQuery","_pipe","pipe","partition","_ref3","id","includes","_ref4","items","left","selectedParts","right","unselectedParts","Boolean","filter","_ref2","toLowerCase","trim","warningId","concat","totalParts","partLimitExceeded","current","setAttribute","Combobox","as","className","value","multiple","onChange","click","Button","ref","targetStyles","labelStyles","map","_ref5","join","IconChevronDown","Options","classNames","optionsStyles","IconSearch","Input","displayValue","e","SystemMessage","message","role","bp","Option","itemStyles","defaultChecked","readOnly","ConsultationFooter","href","IconArrowRight","item","active","inputWrapperStyles","_len","styles","Array","_key","MessageStyles","base","variants","warning","_objectWithoutProperties","_excluded","IconAlertCircle"],"sourceRoot":""}