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":["webpack://App/webpack/runtime/chunk loaded","webpack://App/./Client/include/react-components/Carousel/components/Carousel.js","webpack://App/./Client/src/Frame/components/CurrencySelector.tsx","webpack://App/./Client/src/Frame/components/CartFrame.tsx","webpack://App/./Client/src/Frame/components/ExcursionFrame.tsx","webpack://App/./Client/src/Frame/components/AccommodationSelector.tsx","webpack://App/./Client/src/Frame/components/ExcursionSearchWidget.tsx","webpack://App/./Client/include/jquery-components/bootstrap-datepicker/bootstrap-datepicker.ru.js","webpack://App/./Client/include/react-components/BootstrapDatePicker.tsx","webpack://App/./Client/include/react-components/BootstrapSelectPicker.tsx","webpack://App/./Client/src/Frame/components/ExtraFrame.tsx","webpack://App/./Client/src/Frame/components/HotelFrame.tsx","webpack://App/./Client/src/Frame/components/HotelSearchWidget.tsx","webpack://App/./Client/src/TourSearch/store/TourDescriptionStoreContainer.tsx","webpack://App/./Client/src/Frame/components/TourFrame.tsx","webpack://App/./Client/src/Frame/components/TourSearchWidget.tsx","webpack://App/./Client/src/Frame/components/FrameEmbedded.tsx","webpack://App/./Client/src/Frame/embedded.js","webpack://App/./Client/include/api-ito/ToursApi.ts","webpack://App/./Client/include/react-components/TouristPicker/TouristPicker.tsx","webpack://App/./Client/include/react-components/TouristPicker/TouristPickerDialog.tsx","webpack://App/./Client/include/react-components/TouristPicker/TouristPickerTextField.tsx","webpack://App/./Client/include/utils.ts","webpack://App/./Client/src/NewTourSearch/compoments/tp/TpSelect.tsx","webpack://App/./Client/src/TourSearch/components/TourDescription/AsyncSpinner.tsx","webpack://App/./Client/src/TourSearch/components/TourDescription/ImageGrid.tsx","webpack://App/./Client/src/TourSearch/components/TourDescription/Lightbox.tsx","webpack://App/./Client/src/TourSearch/store/utils.ts","webpack://App/webpack/bootstrap","webpack://App/webpack/runtime/amd options","webpack://App/webpack/runtime/compat get default export","webpack://App/webpack/runtime/define property getters","webpack://App/webpack/runtime/global","webpack://App/webpack/runtime/harmony module decorator","webpack://App/webpack/runtime/hasOwnProperty shorthand","webpack://App/webpack/runtime/make namespace object","webpack://App/webpack/runtime/node module decorator","webpack://App/webpack/runtime/publicPath","webpack://App/webpack/runtime/jsonp chunk loading","webpack://App/webpack/runtime/nonce","webpack://App/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = function(result, chunkIds, fn, priority) {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every(function(key) { return __webpack_require__.O[key](chunkIds[j]); })) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","import React, { Component } from 'react';\nimport Slide from '@material-ui/core/Slide';\nimport IconButton from '@material-ui/core/IconButton';\nimport { withStyles } from '@material-ui/core/styles';\nimport autoBind from 'auto-bind';\nimport NavigateBeforeIcon from '@material-ui/icons/NavigateBefore';\nimport NavigateNextIcon from '@material-ui/icons/NavigateNext';\nimport { useSwipeable } from 'react-swipeable';\n\nconst styles = {\n root: {\n position: \"relative\",\n overflow: \"hidden\"\n },\n active: {\n color: \"#494949\"\n },\n buttonWrapper: {\n position: \"absolute\",\n height: \"100px\",\n backgroundColor: \"transparent\",\n top: \"calc(50% - 70px)\",\n '&:hover': {\n '& $button': {\n opacity: 1,\n backgroundColor: \"rgba(0 0 0 / 80%)\",\n }\n }\n },\n fullHeightHoverWrapper: {\n height: \"100% !important\",\n top: \"0 !important\"\n },\n button: {\n margin: \"0 10px\",\n position: \"relative\",\n backgroundColor: \"rgb(20 24 27 / 0%)\",\n top: \"30px\",\n color: \"#efefef\",\n fontSize: \"30px\",\n transition: \"200ms\",\n cursor: \"pointer\",\n },\n fullHeightHoverButton: {\n top: \"calc(50% - 20px) !important\"\n },\n buttonVisible: {\n opacity: \"1\"\n },\n buttonHidden: {\n opacity: \"0\",\n },\n next: {\n right: 0\n },\n prev: {\n left: 0\n }\n}\n\nconst sanitizeProps = (props) => {\n const timeout = props.timeout !== undefined ? props.timeout : 200;\n\n return {\n children: props.children ? props.children : [],\n index: props.index !== undefined ? props.index : 0,\n strictIndexing: props.strictIndexing !== undefined ? props.strictIndexing : true,\n autoPlay: props.autoPlay !== undefined ? props.autoPlay : true,\n interval: props.interval !== undefined ? props.interval : 4000,\n navButtonsAlwaysInvisible: props.navButtonsAlwaysInvisible !== undefined ? props.navButtonsAlwaysInvisible : false,\n navButtonsAlwaysVisible: props.navButtonsAlwaysVisible !== undefined ? props.navButtonsAlwaysVisible : false,\n timeout: timeout,\n fullHeightHover: props.fullHeightHover !== undefined ? props.fullHeightHover : true,\n onChange: props.onChange !== undefined ? props.onChange : () => { },\n changeOnFirstRender: props.changeOnFirstRender !== undefined ? props.changeOnFirstRender : false,\n next: props.next !== undefined ? props.next : () => { },\n prev: props.prev !== undefined ? props.prev : () => { },\n className: props.className !== undefined ? props.className : \"\"\n }\n}\n\nclass Carousel extends Component {\n constructor(props) {\n super(props);\n autoBind(this);\n\n this.state = {\n active: 0,\n prevActive: 0,\n displayed: 0,\n }\n\n this.timer = null;\n }\n\n componentDidMount() {\n const { index, changeOnFirstRender } = sanitizeProps(this.props)\n this.setActive(index, undefined, changeOnFirstRender);\n\n this.start();\n }\n\n componentWillUnmount() {\n this.stop();\n }\n\n componentDidUpdate(prevProps, prevState) {\n prevProps = sanitizeProps(prevProps);\n const { autoPlay, interval, children, index } = sanitizeProps(this.props);\n\n if (autoPlay !== prevProps.autoPlay || interval !== prevProps.interval) {\n this.reset();\n }\n\n if (children.length !== prevProps.children.length) {\n this.setActive(index);\n }\n\n if (prevProps.index !== index) {\n this.setActive(index)\n }\n }\n\n stop() {\n if (this.timer) {\n clearInterval(this.timer)\n this.timer = null;\n }\n }\n\n start() {\n const { autoPlay, interval } = sanitizeProps(this.props);\n\n if (autoPlay) {\n this.timer = setInterval(this.next, interval);\n }\n }\n\n reset() {\n\n const { autoPlay } = sanitizeProps(this.props);\n this.stop();\n\n if (autoPlay) {\n this.start();\n }\n }\n\n setActive(index, callback = () => { }, runCallbacks = true) {\n const { onChange, timeout, children, strictIndexing } = sanitizeProps(this.props);\n\n // if index is bigger than the children length, set it to be the last child (if strictIndexing)\n if (Array.isArray(children)) {\n if (strictIndexing && index > children.length - 1) index = children.length - 1;\n if (strictIndexing && index < 0) index = 0;\n }\n else {\n index = 0;\n }\n\n const prevActive = this.state.active;\n\n this.setState({\n active: index,\n prevActive: prevActive,\n displayed: prevActive\n }, this.reset);\n\n setTimeout(() => {\n this.setState({\n displayed: index\n }, () => {\n if (runCallbacks) {\n // Call user defined callbacks\n callback(index, prevActive);\n onChange(index, prevActive);\n }\n\n\n })\n }, timeout);\n }\n\n next(event) {\n const { children, next } = sanitizeProps(this.props);\n\n const nextActive = this.state.active + 1 > children.length - 1 ? 0 : this.state.active + 1;\n\n this.setActive(nextActive, next)\n\n if (event)\n event.stopPropagation();\n }\n\n prev(event) {\n const { children, prev } = sanitizeProps(this.props);\n\n const nextActive = this.state.active - 1 < 0 ? children.length - 1 : this.state.active - 1;\n\n this.setActive(nextActive, prev)\n\n if (event)\n event.stopPropagation();\n }\n\n render() {\n const {\n children,\n navButtonsAlwaysInvisible,\n navButtonsAlwaysVisible,\n timeout,\n fullHeightHover,\n className,\n } = sanitizeProps(this.props);\n\n const classes = this.props.classes;\n\n const buttonCssClassValue = `${classes.button} ${navButtonsAlwaysVisible ? classes.buttonVisible : classes.buttonHidden} ${fullHeightHover ? classes.fullHeightHoverButton : \"\"}`;\n const buttonWrapperCssClassValue = `${classes.buttonWrapper} ${fullHeightHover ? classes.fullHeightHoverWrapper : \"\"}`;\n\n const compareActiveDisplayed = () => {\n if (this.state.active === 0 && this.state.prevActive === children.length - 1) {\n return true;\n }\n\n if (this.state.active === children.length - 1 && this.state.prevActive === 0) {\n return false;\n }\n\n if (this.state.active > this.state.prevActive) {\n return true;\n }\n\n return false;\n }\n\n return (\n
\n {\n Array.isArray(children) ?\n children.map((child, index) => {\n return (\n \n )\n })\n :\n \n }\n\n {!navButtonsAlwaysInvisible &&\n
\n \n \n \n
\n }\n\n {!navButtonsAlwaysInvisible &&\n
\n \n \n \n
\n }\n
\n )\n }\n}\n\nfunction CarouselItem(props) {\n const swipeHandlers = useSwipeable({\n onSwipedLeft: () => props.next(),\n onSwipedRight: () => props.prev()\n })\n\n return (\n props.display ? (\n
\n \n
\n {props.child}\n
\n
\n
\n ) : null\n )\n}\n\nexport default withStyles(styles)(Carousel);\n","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nimport React from 'react';\r\nimport { makeStyles, MenuItem, Paper, Select } from '@material-ui/core';\r\nimport { getCurrencies, getCurrency } from '../../../include/utils';\r\nimport { api } from '../../../include/network/network';\r\n//import Select from '../../../include/react-components/Select';\r\nconst useStyles = makeStyles(theme => ({\r\n currencySelector: {\r\n '& .MuiInput-underline:before, & .MuiInput-underline:after, & .MuiInput-underline:hover:before, & .MuiInput-underline:hover:after': {\r\n borderBottom: 'none',\r\n }\r\n },\r\n menu: {\r\n //marginTop: '10px',\r\n '& .MuiPopover-paper': {\r\n marginLeft: '-8px',\r\n marginTop: '4px',\r\n },\r\n '& .MuiMenu-list': {\r\n paddingTop: '30px !important',\r\n }\r\n }\r\n}));\r\nexport function CurrencySelector(props) {\r\n const currency = getCurrency();\r\n const currencies = getCurrencies();\r\n const classes = useStyles();\r\n return (React.createElement(Paper, Object.assign({ elevation: 1 }, props, { style: Object.assign({ backgroundColor: '#fff', borderRadius: '4px', paddingLeft: '10px' }, (props.style ? props.style : {})), className: classes.currencySelector }),\r\n React.createElement(Select, { variant: \"standard\", color: \"secondary\", label: '', value: currency.id, onChange: (e) => {\r\n (() => __awaiter(this, void 0, void 0, function* () {\r\n yield api('get', `/home/setcurrency?id=${e.target.value}`, {});\r\n window.location.reload();\r\n }))();\r\n //document.cookie = \"Currency=\" + e.target.value + \"; path=/\";\r\n //window.location.reload();\r\n }, style: {\r\n maxHeight: '100%'\r\n }, MenuProps: {\r\n className: classes.menu,\r\n } }, currencies.map(c => (React.createElement(MenuItem, { key: c.id, value: c.id }, c.name))))));\r\n}\r\n","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nimport { Accordion, AccordionDetails, AccordionSummary, AppBar, Button, Card, Container, Dialog, Grid, IconButton, makeStyles, TextField, Toolbar, Typography } from '@material-ui/core';\r\nimport { CheckCircleRounded, Close, ExpandMore } from '@material-ui/icons';\r\nimport moment from 'moment';\r\nimport { SnackbarProvider, useSnackbar } from 'notistack';\r\nimport React, { useMemo, useState } from 'react';\r\nimport { pluralizeDays, pluralizePersons, _T } from '../../../include/appI18n';\r\nimport { api } from '../../../include/network/network';\r\nimport { appUrl, isValidEmail } from '../../../include/utils';\r\nimport { _ParentFrame } from '../types/Frame';\r\nconst useStyles = makeStyles(theme => ({\r\n tourOrderTableTourname: {\r\n [theme.breakpoints.up(\"lg\")]: {\r\n width: '360px'\r\n }\r\n },\r\n tourOrderTableCheckindate: {\r\n [theme.breakpoints.up(\"lg\")]: {\r\n width: '80px'\r\n }\r\n },\r\n tourOrderTableCheckoutdate: {\r\n [theme.breakpoints.up(\"lg\")]: {\r\n width: '80px'\r\n }\r\n },\r\n tourOrderTableDuration: {\r\n [theme.breakpoints.up(\"lg\")]: {\r\n width: '240px'\r\n }\r\n },\r\n tourOrderTablePrice: {\r\n [theme.breakpoints.up(\"lg\")]: {\r\n width: '80px'\r\n }\r\n },\r\n tourOrderTablePersons: {\r\n [theme.breakpoints.up(\"lg\")]: {\r\n width: '120px'\r\n }\r\n },\r\n tourOrderTableAvailability: {\r\n textAlign: 'center',\r\n [theme.breakpoints.up(\"lg\")]: {\r\n width: '120px'\r\n }\r\n },\r\n orderInfo: {\r\n '& td': {\r\n paddingTop: '20px',\r\n '&:first-child': {\r\n paddingLeft: '20px',\r\n }\r\n },\r\n },\r\n tableResponsive: {\r\n minHeight: '.01%',\r\n overflowX: 'auto',\r\n '& > .table > thead > tr > th, & > .table > tbody > tr > th, & > .table > tfoot > tr > th, & > .table > thead > tr > td, & > .table > tbody > tr > td, & > .table > tfoot > tr > td': {\r\n whiteSpace: 'normal'\r\n }\r\n },\r\n orderTable: {\r\n fontSize: '11px',\r\n paddingLeft: '20px',\r\n paddingRight: '20px',\r\n marginBottom: 0,\r\n borderTop: '1px solid #e6e6e6 !important',\r\n width: '100%',\r\n maxWidth: '100%',\r\n '& thead': {\r\n backgroundColor: '#767676',\r\n color: '#fff',\r\n textTransform: 'uppercase',\r\n '& tr th': {\r\n padding: '4px',\r\n lineHeight: 1.5,\r\n fontWeight: 400,\r\n borderBottom: 0,\r\n verticalAlign: 'baseline',\r\n '& img, & .fa': {\r\n width: '30px',\r\n marginRight: '10px',\r\n display: 'none',\r\n fonhtSize: '2.5em',\r\n [theme.breakpoints.up(\"md\")]: {\r\n display: 'inline-block',\r\n },\r\n },\r\n '&:first-child': {\r\n paddingLeft: '20px',\r\n }\r\n },\r\n '& tr td': {\r\n border: 'none',\r\n '&:first-child': {\r\n paddingLeft: '20px',\r\n }\r\n },\r\n },\r\n },\r\n cart: {},\r\n hotelBody: {\r\n backgroundColor: '#fff',\r\n paddingLeft: '20px',\r\n paddingRight: '20px',\r\n paddingTop: '60px',\r\n paddingBottom: '25px',\r\n },\r\n hotelPanel: {\r\n marginBottom: '20px',\r\n marginTop: '10px',\r\n '& h2': {\r\n margin: 0,\r\n textTransform: 'uppercase',\r\n backgroundColor: theme.palette.secondary.main,\r\n width: '100%',\r\n height: '40px',\r\n lineHeight: '40px',\r\n verticalAlign: 'middle',\r\n paddingLeft: '15px',\r\n color: '#fff',\r\n fontSize: '14px',\r\n fontWeight: 'bold',\r\n }\r\n },\r\n hotelPanelHeder: {\r\n '& h2': {\r\n margin: 0,\r\n textTransform: 'uppercase',\r\n backgroundColor: theme.palette.secondary.main,\r\n width: '100%',\r\n height: '40px',\r\n lineHeight: '40px',\r\n verticalAlign: 'middle',\r\n paddingLeft: '15px',\r\n color: '#fff',\r\n fontSize: '14px',\r\n fontWeight: 'bold',\r\n }\r\n },\r\n order: {\r\n //display: 'none',\r\n },\r\n valueGeneral: {\r\n display: 'table-row',\r\n '& span': {\r\n display: 'table-cell',\r\n '&:first-child': {\r\n fontSize: '16px',\r\n fontWeight: 'bold',\r\n },\r\n '&:last-child': {\r\n fontSize: '24px',\r\n fontWeight: 'bold',\r\n textAlign: 'right',\r\n },\r\n }\r\n },\r\n valueSingle: {\r\n display: 'table-row',\r\n '& span': {\r\n display: 'table-cell',\r\n '&:first-child': {\r\n fontSize: '12px',\r\n fontWeight: 'normal',\r\n },\r\n '&:last-child': {\r\n fontSize: '16px',\r\n fontWeight: 'bold',\r\n textAlign: 'left',\r\n paddingLeft: '14px',\r\n },\r\n }\r\n },\r\n infoOrder: {\r\n fontSize: '12px',\r\n paddingTop: '10px',\r\n },\r\n orderHotel: {\r\n fontWeight: 'bold',\r\n fontSize: '16px',\r\n display: 'block',\r\n lineHeight: 2,\r\n },\r\n textGrey: {\r\n color: '#838383',\r\n display: 'block',\r\n lineHeight: 2,\r\n },\r\n textGreyUpper: {\r\n color: '#838383',\r\n display: 'block',\r\n lineHeight: 2,\r\n textTransform: 'uppercase',\r\n },\r\n immediate: {\r\n color: '#3fb717',\r\n textShadow: '0 0 transparent',\r\n textTransform: 'uppercase',\r\n fontWeight: 'bold',\r\n },\r\n request: {\r\n fontSize: '12px',\r\n fontStyle: 'italic',\r\n margin: '10px 0',\r\n color: theme.palette.primary.main,\r\n textShadow: '0 0 transparent',\r\n textTransform: 'uppercase',\r\n fontWeight: 'bold',\r\n },\r\n orderInfoBottom: {},\r\n orderDelBottom: {},\r\n orangeCollapseLink: {\r\n padding: '8px 22px',\r\n display: 'block',\r\n backgroundColor: 'transparent',\r\n },\r\n caretControl: {\r\n color: theme.palette.primary.main,\r\n },\r\n cartTourInfoList: {\r\n '& hr': {\r\n marginTop: '20px',\r\n marginBottom: '20px',\r\n border: 0,\r\n borderTop: '1px solid #eee',\r\n }\r\n },\r\n infoListItem: {},\r\n infoListItemHeader: {\r\n color: '#6d6d6d',\r\n borderRight: '1px dashed #d6d6d6',\r\n },\r\n infoListItemBody: {},\r\n infoListItemType: {\r\n background: '#929292',\r\n color: '#fff',\r\n padding: '2px 8px',\r\n borderRadius: '4px',\r\n fontSize: '0.7rem',\r\n fontWeight: 'bold',\r\n textTransform: 'uppercase',\r\n '& .MuiSvgIcon-root': {\r\n fontSize: '0.7rem'\r\n }\r\n },\r\n infoListItemTitle: {\r\n display: 'block',\r\n fontWeight: 600,\r\n },\r\n infoListItemSubtitle: {\r\n display: 'block',\r\n },\r\n infoListItemProp: {\r\n '&:not(:last-child)': {\r\n marginBottom: '0.25rem',\r\n }\r\n },\r\n infoListItemPropName: {\r\n color: '#3c3c3c',\r\n },\r\n infoListItemPropVal: {\r\n color: '#3c3c3c',\r\n textShadow: '0.2px 0 #6b6b6b',\r\n },\r\n infoListItemPropValOrderStatus: (p) => (Object.assign({}, p)),\r\n orderAddPoint: {\r\n display: 'none',\r\n },\r\n contactDetails: {\r\n margin: '20px',\r\n },\r\n inputs: {\r\n width: '40%',\r\n [theme.breakpoints.up(\"lg\")]: {\r\n width: '30%'\r\n },\r\n '& .MuiInput-formControl': {\r\n display: 'flex',\r\n },\r\n '& .MuiTextField-root': {\r\n marginBottom: '10px',\r\n },\r\n '& .MuiFormHelperText-filled:not(.Mui-error)': {\r\n display: 'none',\r\n }\r\n },\r\n hint: {\r\n marginLeft: '20px',\r\n display: 'flex',\r\n },\r\n infoBtn: {},\r\n cancelCondContainer: {\r\n display: 'none',\r\n },\r\n makeBookingBtn: {},\r\n accorddionSummary: {},\r\n transferCost: {\r\n textAlign: 'center',\r\n },\r\n orderStatus: {\r\n textAlign: 'center',\r\n },\r\n orderExcurName: {\r\n width: '450px',\r\n },\r\n excurDate: {\r\n width: '120px',\r\n },\r\n excurType: {\r\n width: '120px',\r\n },\r\n excurCost: {\r\n width: '120px',\r\n },\r\n excurHum: {\r\n width: '120px',\r\n },\r\n}));\r\nexport default function CartFrame(props) {\r\n const classes = useStyles();\r\n const { services, isOpen, handleClose, frameId } = props;\r\n const delService = (service) => {\r\n // пока услуга одна, поэтому просто закрываем\r\n handleClose();\r\n };\r\n const onClose = () => {\r\n if (success)\r\n location.reload();\r\n else\r\n handleClose();\r\n };\r\n const [success, setSucces] = useState(false);\r\n return (React.createElement(SnackbarProvider, { maxSnack: 3, anchorOrigin: { vertical: 'top', horizontal: 'right' } },\r\n React.createElement(Card, null,\r\n React.createElement(Container, null,\r\n React.createElement(Dialog, { open: isOpen, fullScreen: true },\r\n React.createElement(AppBar, { color: \"secondary\" },\r\n React.createElement(Toolbar, null,\r\n React.createElement(IconButton, { edge: \"end\", color: \"inherit\", onClick: onClose, \"aria-label\": \"close\" },\r\n React.createElement(Close, null)),\r\n React.createElement(Container, null,\r\n React.createElement(Grid, { container: true, style: { margin: 0 }, spacing: 4 },\r\n React.createElement(Grid, { item: true, xs: 12, className: classes.hotelPanelHeder },\r\n React.createElement(\"h2\", null, _T.BOOKING_YOUR_ORDER)))))),\r\n success ?\r\n React.createElement(Grid, { container: true, justify: \"center\", alignItems: \"center\", style: { height: '100vmin' } },\r\n React.createElement(Grid, { item: true, xs: \"auto\", style: { textAlign: 'center' } },\r\n React.createElement(Typography, { variant: \"h3\", style: { marginBottom: '20px' } }, _T.FRAME_BOOKING_SENDED),\r\n React.createElement(CheckCircleRounded, { htmlColor: \"#3fb717\", style: { fontSize: '120px' } }))) :\r\n React.createElement(React.Fragment, null, (services === null || services === void 0 ? void 0 : services.length)\r\n ? React.createElement(CartFrameOrder, Object.assign({}, props, { delCallback: delService, onSuccess: () => {\r\n setSucces(true);\r\n const parentFrame = _ParentFrame();\r\n parentFrame.sendMessage({ message: 'scroll', top: 0, behavior: 'smooth' });\r\n } }))\r\n : React.createElement(\"div\", { style: {\r\n textAlign: 'center',\r\n margin: '50px',\r\n } }, _T.CART_NO_SERVICES)))))));\r\n}\r\nfunction CartFrameOrder({ services, frameId, delCallback, price, pricePerPerson, currency, onSuccess, tempId }) {\r\n const classes = useStyles();\r\n const [name, setName] = useState('');\r\n const [email, setEmail] = useState('');\r\n const [phone, setPhone] = useState('');\r\n const [comment, setComment] = useState('');\r\n const snackbar = useSnackbar();\r\n //const [errors, setErrors] = useState([]);\r\n const bookingAvailable = useMemo(() => (services === null || services === void 0 ? void 0 : services.length) && name && email && phone, [services, name, email, phone]);\r\n const send = () => {\r\n if (!bookingAvailable) {\r\n snackbar.enqueueSnackbar('Please fill contactDetails', { variant: 'error', autoHideDuration: 10000 });\r\n return;\r\n }\r\n (() => __awaiter(this, void 0, void 0, function* () {\r\n var _a, _b;\r\n let tourSvc = services.find(s => s.type == 'tour');\r\n let excSvc = services.find(s => s.type == 'excursion');\r\n let extraSvc = services.find(s => s.type == 'extra');\r\n let hotel = services.find(s => s.type == 'hotel');\r\n const r = yield api('post', `/frame/${frameId}/send-booking-request${tempId ? `?tempId=${tempId}` : ''}`, {\r\n name, email, phone, comment, currencyId: ((_b = (_a = tourSvc === null || tourSvc === void 0 ? void 0 : tourSvc.cartData) === null || _a === void 0 ? void 0 : _a.bookingCurrency) === null || _b === void 0 ? void 0 : _b.id) || 0,\r\n tour: tourSvc && {\r\n accomodationIds: tourSvc.accmdVariantIds,\r\n tourVariantId: tourSvc.tourVariantId,\r\n excursions: tourSvc.excursions,\r\n hash: tourSvc.cartData.hash,\r\n },\r\n excursion: excSvc && {\r\n excursionId: excSvc.excursionId,\r\n date: excSvc.date,\r\n adultCount: excSvc.adultCount,\r\n childAges: excSvc.childAges,\r\n excursionSerialized: excSvc.excursionSerialized,\r\n },\r\n extra: extraSvc && {\r\n serviceId: extraSvc.serviceId,\r\n date: extraSvc.date,\r\n adultCount: extraSvc.adultCount,\r\n childAges: extraSvc.childAges,\r\n extraSerialized: extraSvc.extraSerialized,\r\n },\r\n hotel: hotel && {\r\n searchParamsSerialized: hotel.searchParamsSerialized,\r\n rooms: hotel.rooms,\r\n }\r\n });\r\n if (r.errors) {\r\n for (let i = 0; i < r.errors.length; i++)\r\n snackbar.enqueueSnackbar(r.errors[i], { variant: 'error', autoHideDuration: 5000 });\r\n //setErrors({ ...errors, ...r.errors });\r\n }\r\n else {\r\n onSuccess();\r\n }\r\n }))();\r\n };\r\n return (React.createElement(\"section\", { className: classes.cart },\r\n React.createElement(Container, null,\r\n React.createElement(\"div\", { className: classes.hotelBody },\r\n React.createElement(Grid, { container: true, style: { margin: 0 }, spacing: 4 },\r\n React.createElement(Grid, { item: true, md: 12 },\r\n React.createElement(\"div\", { className: classes.hotelPanel },\r\n React.createElement(\"div\", { className: classes.order },\r\n React.createElement(Grid, { container: true },\r\n React.createElement(Grid, { item: true, md: 4 },\r\n React.createElement(\"div\", { className: classes.valueGeneral },\r\n React.createElement(\"span\", null, _T.BOOKING_TOTAL_PRICE),\r\n React.createElement(\"span\", null,\r\n price.toFixed(2),\r\n \" \",\r\n currency.name)),\r\n React.createElement(\"div\", { className: classes.valueSingle },\r\n React.createElement(\"span\", null, _T.BOOKING_PRICE_PER_PERSON),\r\n React.createElement(\"span\", null,\r\n pricePerPerson.toFixed(2),\r\n \" \",\r\n currency.name))),\r\n React.createElement(Grid, { item: true, md: 4, className: classes.infoOrder })))),\r\n services.map(s => (React.createElement(CartFrameItem, { service: s, frameId: frameId, delCallback: delCallback }))),\r\n React.createElement(Accordion, { elevation: 2 },\r\n React.createElement(AccordionSummary, { expandIcon: React.createElement(ExpandMore, null), className: classes.accorddionSummary },\r\n React.createElement(Typography, { className: classes.orangeCollapseLink, display: \"block\" },\r\n React.createElement(\"span\", { className: classes.caretControl }, _T.COMMON_ADDITIONAL_REQUIREMENTS))),\r\n React.createElement(AccordionDetails, null,\r\n React.createElement(Grid, { container: true, spacing: 4 },\r\n React.createElement(Grid, { item: true, md: 6, xs: 12 },\r\n React.createElement(TextField, { multiline: true, fullWidth: true, variant: \"outlined\", label: '', value: comment, onChange: e => setComment(e.target.value) })),\r\n React.createElement(Grid, { item: true, md: 4, xs: 12 },\r\n React.createElement(\"p\", null,\r\n \"* \",\r\n _T.COMMON_ADDITIONAL_REQUIREMENTS_COMMENT)))))),\r\n React.createElement(Grid, { item: true, xs: 12, className: classes.orderAddPoint }),\r\n React.createElement(Grid, { item: true, xs: 12, className: classes.contactDetails },\r\n React.createElement(Typography, { variant: \"h3\", style: { fontSize: '16px', fontWeight: 'bold', marginBottom: '25px' } }, _T.COMMON_CONTACT_DETAILS),\r\n React.createElement(\"div\", { style: { display: 'flex' } },\r\n React.createElement(\"div\", { className: classes.inputs },\r\n React.createElement(TextField, { variant: \"outlined\", size: \"small\", fullWidth: true, label: _T.COMMON_NAME, required: true, type: \"text\", placeholder: `${_T.COMMON_NAME}*`, value: name, onChange: e => setName(e.target.value), error: !name || name.length > 50, inputProps: { maxlength: 50 } }),\r\n React.createElement(TextField, { variant: \"outlined\", size: \"small\", fullWidth: true, label: _T.COMMON_EMAIL, required: true, type: \"email\", placeholder: `${_T.COMMON_EMAIL}*`, value: email, onChange: e => setEmail(e.target.value), error: !email || !isValidEmail(email) || email.length > 50, inputProps: { maxlength: 50 } }),\r\n React.createElement(TextField, { variant: \"outlined\", size: \"small\", fullWidth: true, label: _T.COMMON_PHONE, required: true, type: \"text\", placeholder: `${_T.COMMON_PHONE}*`, value: phone, onChange: e => setPhone(e.target.value), error: !phone || phone.length > 20, inputProps: { maxlength: 20 } })))),\r\n React.createElement(Grid, { item: true, xs: 12, className: classes.cancelCondContainer }),\r\n React.createElement(Grid, { item: true, xs: 12 },\r\n React.createElement(Button, { disabled: !bookingAvailable, color: \"secondary\", variant: \"contained\", className: classes.makeBookingBtn, onClick: send }, _T.FRAME_SEND_BOOKING)))))));\r\n}\r\nfunction CartFrameItem({ service, frameId, delCallback }) {\r\n return (React.createElement(React.Fragment, null, service.type == 'tour'\r\n ? React.createElement(CartFrameTour, { service: service, frameId: frameId, delCallback: delCallback })\r\n : service.type == 'excursion'\r\n ? React.createElement(CartFrameExcursion, { service: service, frameId: frameId, delCallback: delCallback })\r\n : service.type == 'extra'\r\n ? React.createElement(CartFrameExtra, { service: service, frameId: frameId, delCallback: delCallback })\r\n : React.createElement(CartFrameHotel, { service: service, frameId: frameId, delCallback: delCallback })));\r\n}\r\nfunction CartFrameTour({ service, frameId, delCallback }) {\r\n var _a, _b, _c;\r\n //const [cartData, setCartData] = useState();\r\n const classes = useStyles();\r\n const { cartData } = service;\r\n //useEffect(() => {\r\n // (async () => {\r\n // const r = await api('post', `/frame/${frameId}/tour-cart`, { accomodationIds: service.accmdVariantIds, tourVariantId: service.tourVariantId, excursions: service.excursions });\r\n // if (r.response)\r\n // setCartData(r.response);\r\n // })();\r\n //}, []);\r\n const immediateConfirm = useMemo(() => cartData === null || cartData === void 0 ? void 0 : cartData.tour.variants[0].prices.find(x => x.accomodations[0].availability == 1), [cartData === null || cartData === void 0 ? void 0 : cartData.tour.variants[0].prices]);\r\n const renderDateRange = (rangeStart, rangeEnd) => (React.createElement(\"span\", null, rangeStart.isSame(rangeEnd) ? rangeStart.format('L') : `${rangeStart.format('L')} – ${rangeEnd.format('L')}`));\r\n const renderHotelService = (svc) => (React.createElement(Grid, { container: true, item: true, xs: 12, spacing: 4, className: classes.infoListItem },\r\n React.createElement(Grid, { item: true, xs: 3, className: classes.infoListItemHeader },\r\n React.createElement(\"span\", { className: classes.infoListItemType },\r\n React.createElement(\"i\", { className: \"fa fa-moon-o mr-1\" }),\r\n \" \",\r\n _T.COMMON_HOTEL),\r\n React.createElement(\"span\", { className: classes.infoListItemTitle }, svc.accommodation.hotelName),\r\n React.createElement(\"span\", { className: classes.infoListItemSubtitle }, renderDateRange(moment(svc.beginDate), moment(svc.endDate)))),\r\n React.createElement(Grid, { item: true, xs: 9, className: classes.infoListItemBody },\r\n React.createElement(\"div\", { className: classes.infoListItemProp },\r\n React.createElement(\"span\", { className: classes.infoListItemPropName },\r\n _T.COMMON_ROOM_CATEGORY,\r\n \": \"),\r\n React.createElement(\"span\", { className: classes.infoListItemPropVal },\r\n svc.accommodation.roomTypeName,\r\n \", \",\r\n svc.accommodation.roomCategoryName)),\r\n React.createElement(\"div\", { className: classes.infoListItemProp },\r\n React.createElement(\"span\", { className: classes.infoListItemPropName },\r\n _T.COMMON_MEAL,\r\n \": \"),\r\n React.createElement(\"span\", { className: classes.infoListItemPropVal }, svc.accommodation.mealTypeName)),\r\n React.createElement(\"div\", { className: classes.infoListItemProp },\r\n React.createElement(\"span\", { className: classes.infoListItemPropName },\r\n _T.COMMON_AVAILABILITY,\r\n \": \"),\r\n React.createElement(\"span\", { className: classes.infoListItemPropVal },\r\n React.createElement(\"span\", { className: svc.accommodation.availability == 0 ? classes.immediate : classes.request }, svc.accommodation.availability == 0 ? _T.ROOM_AVAILABLE : _T.ROOM_ONREQUEST))))));\r\n const renderTransferService = (svc) => (React.createElement(Grid, { container: true, item: true, xs: 12, spacing: 4, className: classes.infoListItem },\r\n React.createElement(Grid, { item: true, xs: 3, className: classes.infoListItemHeader },\r\n React.createElement(\"span\", { className: classes.infoListItemType },\r\n React.createElement(\"i\", { className: \"fa fa-cab mr-1\" }),\r\n \" \",\r\n _T.COMMON_TRANSFER),\r\n React.createElement(\"span\", { className: classes.infoListItemTitle }, svc.name),\r\n React.createElement(\"span\", { className: classes.infoListItemSubtitle }, renderDateRange(moment(svc.beginDate), moment(svc.endDate)))),\r\n React.createElement(Grid, { item: true, xs: 9, className: classes.infoListItemBody },\r\n React.createElement(\"div\", { className: classes.infoListItemProp },\r\n React.createElement(\"span\", { className: classes.infoListItemPropName },\r\n _T.COMMON_ROUTE,\r\n \": \"),\r\n React.createElement(\"span\", { className: classes.infoListItemPropVal },\r\n svc.cityFrom.name,\r\n \" (\",\r\n svc.placeFrom.name,\r\n \") \\u2192 \",\r\n svc.cityTo.name,\r\n \" (\",\r\n svc.placeTo.name,\r\n \")\")),\r\n React.createElement(\"div\", { className: classes.infoListItemProp },\r\n React.createElement(\"span\", { className: classes.infoListItemPropName },\r\n _T.TRANSFER_TYPE,\r\n \": \"),\r\n React.createElement(\"span\", { className: classes.infoListItemPropVal }, svc.transferType.name)))));\r\n const renderExtraService = (svc) => (React.createElement(Grid, { container: true, item: true, xs: 12, spacing: 4, className: classes.infoListItem },\r\n React.createElement(Grid, { item: true, xs: 3, className: classes.infoListItemHeader },\r\n React.createElement(\"span\", { className: classes.infoListItemType },\r\n React.createElement(\"i\", { className: \"fa fa-plus mr-1\" }),\r\n \" \",\r\n _T.COMMON_EXTRA_SERVICES),\r\n React.createElement(\"span\", { className: classes.infoListItemTitle }, svc.name),\r\n React.createElement(\"span\", { className: classes.infoListItemSubtitle }, renderDateRange(moment(svc.beginDate), moment(svc.endDate)))),\r\n React.createElement(Grid, { item: true, xs: 9, className: classes.infoListItemBody })));\r\n const renderExcursionService = (svc) => (React.createElement(Grid, { container: true, item: true, xs: 12, spacing: 4, className: classes.infoListItem },\r\n React.createElement(Grid, { item: true, xs: 3, className: classes.infoListItemHeader },\r\n React.createElement(\"span\", { className: classes.infoListItemType },\r\n React.createElement(\"i\", { className: \"fa fa-map mr-1\" }),\r\n \" \",\r\n _T.COMMON_EXCURSION),\r\n React.createElement(\"span\", { className: classes.infoListItemTitle }, svc.name),\r\n React.createElement(\"span\", { className: classes.infoListItemSubtitle }, renderDateRange(moment(svc.beginDate), moment(svc.endDate)))),\r\n React.createElement(Grid, { item: true, xs: 9, className: classes.infoListItemBody })));\r\n const renderFlightService = (svc) => (React.createElement(Grid, { container: true, item: true, xs: 12, spacing: 4, className: classes.infoListItem },\r\n React.createElement(Grid, { item: true, xs: 3, className: classes.infoListItemHeader },\r\n React.createElement(\"span\", { className: classes.infoListItemType },\r\n React.createElement(\"i\", { className: \"fa fa-plane mr-1\" }),\r\n \" \",\r\n _T.COMMON_FLIGHT),\r\n React.createElement(\"span\", { className: classes.infoListItemTitle }, svc.name),\r\n React.createElement(\"span\", { className: classes.infoListItemSubtitle }, renderDateRange(moment(svc.beginDate), moment(svc.endDate)))),\r\n React.createElement(Grid, { item: true, xs: 9, className: classes.infoListItemBody },\r\n React.createElement(\"div\", { className: classes.infoListItemProp },\r\n React.createElement(\"span\", { className: classes.infoListItemPropName },\r\n _T.COMMON_ROUTE,\r\n \": \"),\r\n React.createElement(\"span\", { className: classes.infoListItemPropVal },\r\n svc.cityFrom.name,\r\n \" \\u2192 \",\r\n svc.cityTo.name)),\r\n React.createElement(\"div\", { className: classes.infoListItemProp },\r\n React.createElement(\"span\", { className: classes.infoListItemPropName },\r\n _T.FLIGHT_CLASS,\r\n \": \"),\r\n React.createElement(\"span\", { className: classes.infoListItemPropVal }, svc.flightClass.name)))));\r\n return (React.createElement(React.Fragment, null, cartData ?\r\n React.createElement(React.Fragment, null,\r\n React.createElement(\"div\", { className: classes.tableResponsive },\r\n React.createElement(\"table\", { className: classes.orderTable },\r\n React.createElement(\"thead\", null,\r\n React.createElement(\"tr\", null,\r\n React.createElement(\"th\", { className: classes.tourOrderTableTourname },\r\n React.createElement(\"img\", { src: appUrl('/Content/img/icon_tour.png') }),\r\n \" \",\r\n _T.COMMON_TOUR),\r\n React.createElement(\"th\", { className: classes.tourOrderTableCheckindate }, _T.COMMON_CHECKIN),\r\n React.createElement(\"th\", { className: classes.tourOrderTableCheckoutdate }, _T.COMMON_CHECKOUT),\r\n React.createElement(\"th\", { className: classes.tourOrderTableDuration }, _T.COMMON_DURATION),\r\n React.createElement(\"th\", { className: classes.tourOrderTablePrice }, _T.BOOKING_TOTAL_PRICE),\r\n React.createElement(\"th\", { className: classes.tourOrderTablePersons }, _T.COMMON_PERSONCOUNT),\r\n React.createElement(\"th\", { className: classes.tourOrderTableAvailability }, _T.COMMON_AVAILABILITY))),\r\n React.createElement(\"tbody\", null,\r\n React.createElement(\"tr\", { className: classes.orderInfo, id: `tourServiceRow${cartData.id}` },\r\n React.createElement(\"td\", { className: classes.tourOrderTableTourname },\r\n React.createElement(\"span\", { className: classes.orderHotel }, cartData.tour.name),\r\n ((_c = (_b = (_a = cartData.tour.variants[0]) === null || _a === void 0 ? void 0 : _a.prices[0]) === null || _b === void 0 ? void 0 : _b.accomodations) === null || _c === void 0 ? void 0 : _c.length) === 1\r\n ? React.createElement(\"span\", { className: classes.textGrey },\r\n cartData.tour.variants[0].prices[0].accomodations[0].countryName,\r\n \",\",\r\n cartData.tour.variants[0].prices[0].accomodations[0].cityName)\r\n : null),\r\n React.createElement(\"td\", { className: classes.tourOrderTableCheckindate },\r\n moment(cartData.begin).format('L'),\r\n React.createElement(\"span\", { className: classes.textGreyUpper }, moment(cartData.begin).format('ddd'))),\r\n React.createElement(\"td\", { className: classes.tourOrderTableCheckoutdate },\r\n moment(cartData.end).format('L'),\r\n React.createElement(\"span\", { className: classes.textGreyUpper }, moment(cartData.end).format('ddd'))),\r\n React.createElement(\"td\", { className: classes.tourOrderTableDuration },\r\n cartData.tour.durationDays,\r\n \" \",\r\n pluralizeDays(cartData.tour.durationDays)),\r\n React.createElement(\"td\", { className: classes.tourOrderTablePrice },\r\n cartData.priceInBookingCurrency.toFixed(2),\r\n \" \",\r\n cartData.bookingCurrency.name),\r\n React.createElement(\"td\", { className: classes.tourOrderTablePersons },\r\n cartData.accommodation.adults + cartData.accommodation.childs,\r\n \" \",\r\n pluralizePersons(cartData.accommodation.adults + cartData.accommodation.childs)),\r\n React.createElement(\"td\", { className: classes.tourOrderTableAvailability },\r\n React.createElement(\"span\", { className: immediateConfirm ? classes.immediate : classes.request }, immediateConfirm ? _T.ROOM_AVAILABLE : _T.ROOM_ONREQUEST))),\r\n React.createElement(\"tr\", { className: classes.orderInfoBottom },\r\n React.createElement(\"td\", null),\r\n React.createElement(\"td\", { colSpan: 5 }),\r\n React.createElement(\"td\", { className: classes.orderDelBottom },\r\n React.createElement(Button, { variant: \"text\", onClick: () => delCallback(service) }, _T.BOOKING_DELETE_SERVICE)))))),\r\n React.createElement(Accordion, { elevation: 2 },\r\n React.createElement(AccordionSummary, { expandIcon: React.createElement(ExpandMore, null), className: classes.accorddionSummary },\r\n React.createElement(Typography, { className: classes.orangeCollapseLink, display: \"block\" },\r\n React.createElement(\"span\", { className: classes.caretControl }, _T.BOOKING_TOUR_INFORMATION))),\r\n React.createElement(AccordionDetails, null,\r\n React.createElement(Grid, { container: true, className: classes.cartTourInfoList },\r\n React.createElement(Grid, { item: true, xs: 12 },\r\n React.createElement(\"hr\", null)),\r\n cartData.allTourServices.map(tourSvc => (React.createElement(React.Fragment, null,\r\n tourSvc.type == 'hotel' ?\r\n renderHotelService(tourSvc) :\r\n tourSvc.type == 'transfer' ?\r\n renderTransferService(tourSvc) :\r\n tourSvc.type == 'extra' ?\r\n renderExtraService(tourSvc) :\r\n tourSvc.type == 'excursion' ?\r\n renderExcursionService(tourSvc) :\r\n tourSvc.type == 'flight' ?\r\n renderFlightService(tourSvc) :\r\n React.createElement(React.Fragment, null),\r\n React.createElement(Grid, { item: true, xs: 12 },\r\n React.createElement(\"hr\", null)))))))))\r\n : React.createElement(\"div\", null)));\r\n}\r\nfunction CartFrameExcursion({ service, frameId, delCallback }) {\r\n var _a, _b, _c, _d;\r\n const classes = useStyles();\r\n const { cartData } = service;\r\n return (React.createElement(React.Fragment, null, cartData ?\r\n React.createElement(React.Fragment, null,\r\n React.createElement(\"div\", { className: classes.tableResponsive },\r\n React.createElement(\"table\", { className: classes.orderTable },\r\n React.createElement(\"thead\", null,\r\n React.createElement(\"tr\", null,\r\n React.createElement(\"th\", null,\r\n React.createElement(\"img\", { src: appUrl('/Content/img/icon_exkurze.png') }),\r\n \" \",\r\n _T.COMMON_EXCURSIONS),\r\n React.createElement(\"th\", null, _T.COMMON_DATE),\r\n React.createElement(\"th\", null, _T.EXCURSION_TYPE),\r\n React.createElement(\"th\", { className: classes.transferCost }, _T.BOOKING_TOTAL_PRICE),\r\n React.createElement(\"th\", null, _T.COMMON_PERSONCOUNT),\r\n React.createElement(\"th\", { className: classes.orderStatus }, _T.COMMON_AVAILABILITY))),\r\n React.createElement(\"tbody\", null,\r\n React.createElement(\"tr\", { className: classes.orderInfo, id: `transferServiceRow${cartData.id}` },\r\n React.createElement(\"td\", { className: classes.orderExcurName },\r\n React.createElement(\"span\", { className: classes.orderHotel }, cartData.name),\r\n cartData.excursionProgramPrice\r\n ? cartData.excursionProgramPrice.excursionPrices.map((e, i) => (React.createElement(\"p\", null,\r\n i + 1,\r\n \") \",\r\n e.name,\r\n React.createElement(\"br\", null),\r\n e.excursionTypeName,\r\n React.createElement(\"br\", null),\r\n moment(e.date).format(`L ddd [, ${_T.COMMON_BEGIN_AT}] HH:mm`))))\r\n : null),\r\n React.createElement(\"td\", { className: classes.excurDate },\r\n moment(cartData.begin).format('L'),\r\n React.createElement(\"span\", { className: classes.textGreyUpper }, moment(cartData.begin).format('ddd'))),\r\n React.createElement(\"td\", { className: classes.excurType },\r\n React.createElement(\"span\", { style: { textTransform: 'uppercase' } }, (_b = (_a = cartData.excursionPrice) === null || _a === void 0 ? void 0 : _a.excursionTypeName) !== null && _b !== void 0 ? _b : `—`),\r\n React.createElement(\"div\", { style: { textTransform: 'uppercase' } },\r\n React.createElement(\"span\", { className: classes.textGreyUpper }, (_d = (_c = cartData.excursionPrice) === null || _c === void 0 ? void 0 : _c.vehicleTypeName) !== null && _d !== void 0 ? _d : ``))),\r\n React.createElement(\"td\", { className: classes.excurCost },\r\n cartData.priceInBookingCurrency.toFixed(2),\r\n \" \",\r\n cartData.bookingCurrency.name),\r\n React.createElement(\"td\", { className: classes.excurHum },\r\n cartData.accommodation.adults + cartData.accommodation.childs,\r\n \" \",\r\n pluralizePersons(cartData.accommodation.adults + cartData.accommodation.childs)),\r\n React.createElement(\"td\", { className: classes.orderStatus },\r\n React.createElement(\"span\", { className: classes.immediate }, _T.ROOM_AVAILABLE))),\r\n React.createElement(\"tr\", { className: classes.orderInfoBottom },\r\n React.createElement(\"td\", { colSpan: 5 }),\r\n React.createElement(\"td\", { className: classes.orderDelBottom },\r\n React.createElement(Button, { variant: \"text\", onClick: () => delCallback(service) }, _T.BOOKING_DELETE_SERVICE)))))))\r\n : React.createElement(\"div\", null)));\r\n}\r\nfunction CartFrameExtra({ service, frameId, delCallback }) {\r\n var _a, _b, _c;\r\n const classes = useStyles();\r\n const { cartData } = service;\r\n return (React.createElement(React.Fragment, null, cartData ?\r\n React.createElement(React.Fragment, null,\r\n React.createElement(\"div\", { className: classes.tableResponsive },\r\n React.createElement(\"table\", { className: classes.orderTable },\r\n React.createElement(\"thead\", null,\r\n React.createElement(\"tr\", null,\r\n React.createElement(\"th\", null,\r\n React.createElement(\"img\", { src: appUrl('/Content/img/icon_exkurze.png') }),\r\n \" \",\r\n _T.COMMON_EXTRA_SERVICES),\r\n React.createElement(\"th\", null, _T.COMMON_DATE),\r\n React.createElement(\"th\", null, _T.COMMON_EXTRA_CLASS),\r\n React.createElement(\"th\", { className: classes.transferCost }, _T.BOOKING_TOTAL_PRICE),\r\n React.createElement(\"th\", null, _T.COMMON_PERSONCOUNT),\r\n React.createElement(\"th\", { className: classes.orderStatus }, _T.COMMON_AVAILABILITY))),\r\n React.createElement(\"tbody\", null,\r\n React.createElement(\"tr\", { className: classes.orderInfo, id: `transferServiceRow${cartData.id}` },\r\n React.createElement(\"td\", { className: classes.orderExcurName },\r\n React.createElement(\"span\", { className: classes.orderHotel }, (_a = cartData.extraPrice) === null || _a === void 0 ? void 0 : _a.name)),\r\n React.createElement(\"td\", { className: classes.excurDate },\r\n moment(cartData.begin).format('L'),\r\n React.createElement(\"span\", { className: classes.textGreyUpper }, moment(cartData.begin).format('ddd'))),\r\n React.createElement(\"td\", { className: classes.excurType },\r\n React.createElement(\"span\", { style: { textTransform: 'uppercase' } }, (_c = (_b = cartData.extraPrice) === null || _b === void 0 ? void 0 : _b.serviceClassName) !== null && _c !== void 0 ? _c : `—`)),\r\n React.createElement(\"td\", { className: classes.excurCost },\r\n cartData.priceInBookingCurrency.toFixed(2),\r\n \" \",\r\n cartData.bookingCurrency.name),\r\n React.createElement(\"td\", { className: classes.excurHum },\r\n cartData.accommodation.adults + cartData.accommodation.childs,\r\n \" \",\r\n pluralizePersons(cartData.accommodation.adults + cartData.accommodation.childs)),\r\n React.createElement(\"td\", { className: classes.orderStatus },\r\n React.createElement(\"span\", { className: classes.immediate }, _T.ROOM_AVAILABLE))),\r\n React.createElement(\"tr\", { className: classes.orderInfoBottom },\r\n React.createElement(\"td\", { colSpan: 5 }),\r\n React.createElement(\"td\", { className: classes.orderDelBottom },\r\n React.createElement(Button, { variant: \"text\", onClick: () => delCallback(service) }, _T.BOOKING_DELETE_SERVICE)))))))\r\n : React.createElement(\"div\", null)));\r\n}\r\nfunction CartFrameHotel({ service, frameId, delCallback }) {\r\n var _a;\r\n const classes = useStyles();\r\n return (React.createElement(React.Fragment, null, ((_a = service.cartData) === null || _a === void 0 ? void 0 : _a.length) ? React.createElement(React.Fragment, null,\r\n React.createElement(\"div\", { className: classes.tableResponsive },\r\n React.createElement(\"table\", { className: classes.orderTable },\r\n React.createElement(\"thead\", null,\r\n React.createElement(\"tr\", null,\r\n React.createElement(\"th\", null,\r\n React.createElement(\"img\", { src: appUrl('/Content/img/icon_hotel.png') }),\r\n \" \",\r\n _T.COMMON_STAY),\r\n React.createElement(\"th\", null, _T.COMMON_CHECKIN),\r\n React.createElement(\"th\", null, _T.COMMON_CHECKOUT),\r\n React.createElement(\"th\", null, _T.COMMON_HOTELROOM),\r\n React.createElement(\"th\", null, _T.COMMON_MEAL),\r\n React.createElement(\"th\", null, _T.BOOKING_TOTAL_PRICE),\r\n React.createElement(\"th\", null, _T.COMMON_PERSONCOUNT),\r\n React.createElement(\"th\", { className: classes.orderStatus }, _T.COMMON_AVAILABILITY))),\r\n React.createElement(\"tbody\", null, service.cartData.map(cartData => {\r\n var _a, _b, _c;\r\n const compulsorySvcs = (_a = service.cartDataCompulsory) === null || _a === void 0 ? void 0 : _a.filter(x => x.serviceTag == cartData.serviceTag);\r\n return (React.createElement(React.Fragment, null,\r\n React.createElement(\"tr\", { className: classes.orderInfo, id: `hotelServiceRow${cartData.id}` },\r\n React.createElement(\"td\", null,\r\n React.createElement(\"span\", { className: classes.orderHotel }, (_c = (_b = cartData.hotel) === null || _b === void 0 ? void 0 : _b.name) !== null && _c !== void 0 ? _c : cartData.hotelPrice.hotelName)),\r\n React.createElement(\"td\", null,\r\n moment(cartData.begin).format('L'),\r\n React.createElement(\"span\", { className: classes.textGreyUpper }, moment(cartData.begin).format('ddd'))),\r\n React.createElement(\"td\", null,\r\n moment(cartData.end).format('L'),\r\n React.createElement(\"span\", { className: classes.textGreyUpper }, moment(cartData.end).format('ddd'))),\r\n React.createElement(\"td\", null,\r\n React.createElement(\"span\", { className: \"text-uppercase\" },\r\n React.createElement(\"b\", null,\r\n cartData.hotelPrice.roomType.name,\r\n \" \",\r\n cartData.hotelPrice.roomCategory.name)),\r\n React.createElement(\"span\", { className: \"text-grey\" },\r\n cartData.accommodation.adults,\r\n \" \",\r\n _T.COMMON_ADULT_SHORT,\r\n \" \",\r\n cartData.accommodation.childs > 0 ? (`${cartData.accommodation.childs} ${_T.COMMON_CHILD_SHORT}`) : null)),\r\n React.createElement(\"td\", null,\r\n cartData.priceInBookingCurrency.toFixed(2),\r\n \" \",\r\n cartData.bookingCurrency.name),\r\n React.createElement(\"td\", null,\r\n cartData.accommodation.adults + cartData.accommodation.childs,\r\n \" \",\r\n pluralizePersons(cartData.accommodation.adults + cartData.accommodation.childs)),\r\n React.createElement(\"td\", { className: classes.orderStatus },\r\n React.createElement(\"span\", { className: classes.immediate }, cartData.hotelPrice.immediateConfirm ? _T.ROOM_AVAILABLE : _T.ROOM_ONREQUEST))),\r\n (compulsorySvcs === null || compulsorySvcs === void 0 ? void 0 : compulsorySvcs.length) ? React.createElement(React.Fragment, null,\r\n React.createElement(\"tr\", { className: \"spanner\", \"data-compsvc-part\": cartData.serviceTag },\r\n React.createElement(\"td\", { colSpan: 8 })),\r\n React.createElement(\"tr\", { className: \"compulsory-services-header\", \"data-compsvc-part\": cartData.serviceTag },\r\n React.createElement(\"td\", null, _T.HOTEL_COMPUSORY_SERVICES),\r\n React.createElement(\"td\", { colSpan: 2 }, _T.COMMON_DATE),\r\n React.createElement(\"td\", { colSpan: 2 }, _T.COMMON_SERVICE),\r\n React.createElement(\"td\", null, _T.HOTEL_COMPULSORY_SERVICE_PRICE),\r\n React.createElement(\"td\", { colSpan: 2 }, _T.COMMON_PERSONCOUNT)),\r\n compulsorySvcs.map(compSvc => React.createElement(React.Fragment, null,\r\n React.createElement(\"tr\", { id: `compulsory-service-${compSvc.serviceTag}`, className: \"compulsory-services-body ajax-replace\", \"data-compsvc-part\": cartData.serviceTag },\r\n React.createElement(\"td\", null, \"\\u00A0\"),\r\n React.createElement(\"td\", { colSpan: 2 }, moment(compSvc.begin).format('L')),\r\n React.createElement(\"td\", { colSpan: 2 }, compSvc.compulsoryService.name),\r\n React.createElement(\"td\", null,\r\n compSvc.priceInBookingCurrency.toFixed(2),\r\n \" \",\r\n cartData.bookingCurrency.name),\r\n React.createElement(\"td\", { colSpan: 2 },\r\n compSvc.accommodation.adults + compSvc.accommodation.childs,\r\n \" \",\r\n pluralizePersons(compSvc.accommodation.adults + compSvc.accommodation.childs)))))) : null,\r\n React.createElement(\"tr\", { className: classes.orderInfoBottom },\r\n React.createElement(\"td\", { colSpan: 5 }),\r\n React.createElement(\"td\", { className: classes.orderDelBottom },\r\n React.createElement(Button, { variant: \"text\", onClick: () => delCallback(service) }, _T.BOOKING_DELETE_SERVICE)))));\r\n }))))) : React.createElement(\"div\", null)));\r\n}\r\n","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nimport { Box, Container, Grid, makeStyles, Typography } from '@material-ui/core';\r\nimport React, { useEffect, useMemo, useState } from 'react';\r\nimport { useHistory, useLocation } from 'react-router-dom';\r\nimport { _T } from '../../../include/appI18n';\r\nimport { api } from '../../../include/network/network';\r\nimport ExcursionToolbarContainer from '../../ExcursionDescription/components/ExcursionToolbarContainer';\r\nimport { LightboxImageGrid } from '../../TourSearch/components/TourDescription/LightboxImageGrid';\r\nimport { _ParentFrame } from '../types/Frame';\r\nimport CartFrame from './CartFrame';\r\nconst useStyles = makeStyles(theme => ({\r\n excurDescPanel: {\r\n backgroundColor: '#fafafa',\r\n marginTop: '15px',\r\n '& h2': {\r\n margin: 0,\r\n textTransform: 'uppercase',\r\n backgroundColor: theme.palette.secondary.main,\r\n width: '100%',\r\n height: '40px',\r\n lineHeight: '40px',\r\n verticalAlign: 'middle',\r\n paddingLeft: '15px',\r\n color: '#fff',\r\n fontSize: '14px',\r\n fontWeight: 'bold',\r\n }\r\n },\r\n excurDescText: {\r\n padding: '25px',\r\n '& p': {\r\n whiteSpace: 'pre-wrap',\r\n }\r\n },\r\n excursionDescription: {},\r\n excursionBody: {\r\n //marginBottom: '190px',\r\n backgroundColor: '#fff',\r\n //paddingLeft: '20px',\r\n //paddingRight: '20px',\r\n //paddingTop: '60px',\r\n paddingBottom: '25px',\r\n },\r\n imgWrap: {\r\n paddingLeft: 0,\r\n paddingRight: 0,\r\n },\r\n tableEx: {\r\n display: 'table',\r\n border: '0px solid black',\r\n margin: 0,\r\n padding: 0,\r\n width: '100%',\r\n '& > :not(:last-child)': {\r\n paddingBottom: '20px',\r\n },\r\n },\r\n rowEx: {\r\n display: 'table-row',\r\n },\r\n cellEx: {\r\n display: 'table-cell',\r\n border: 'none',\r\n fontWeight: 'bold',\r\n },\r\n cellExDesc: {\r\n display: 'table-cell',\r\n border: 'none',\r\n fontWeight: 'normal',\r\n width: '38%',\r\n padding: '10px 4px',\r\n },\r\n}));\r\nexport default function ExcursionFrame(props) {\r\n var _a;\r\n const classes = useStyles();\r\n const [description, setDescription] = useState();\r\n const [cartOpen, setCartOpen] = useState(false);\r\n const cart = useMemo(() => JSON.parse(sessionStorage.getItem('frame-cart') || '{ \"services\": [] }'), [cartOpen]);\r\n const history = useHistory();\r\n const { pathname, search, state: historyState } = useLocation();\r\n const handleClose = () => {\r\n setCartOpen(false);\r\n const sp = new URLSearchParams(search);\r\n sp.delete('cartOpen');\r\n history.replace({\r\n pathname: pathname,\r\n search: sp.toString(),\r\n state: historyState,\r\n });\r\n sessionStorage.setItem('frame-cart', '{ \"services\": [] }');\r\n };\r\n useEffect(() => {\r\n (() => __awaiter(this, void 0, void 0, function* () {\r\n var r = yield api('get', `/excursion/${props.excursionId}`, {});\r\n if (r.response && r.response.descriptions.length == 1)\r\n setDescription(r.response.descriptions[0]);\r\n }))();\r\n }, []);\r\n return (React.createElement(\"section\", { className: classes.excursionDescription },\r\n React.createElement(Container, { disableGutters: true }, description ?\r\n React.createElement(React.Fragment, null,\r\n React.createElement(\"div\", { className: classes.excursionBody, style: { display: cartOpen ? 'none' : 'unset' } },\r\n React.createElement(Grid, { container: true, style: { margin: 0 }, id: `excursionDescription${props.excursionId}` },\r\n React.createElement(Grid, { container: true, item: true, md: 12, className: classes.excurDescPanel },\r\n React.createElement(Grid, { item: true, xs: 12 },\r\n React.createElement(Typography, { variant: \"h2\", style: { marginBottom: '1.5rem' } }, description.excursionName)),\r\n React.createElement(Grid, { container: true, style: { margin: 0 }, item: true, md: 12, spacing: 2 },\r\n React.createElement(Grid, { item: true, sm: 4, className: classes.imgWrap }, ((_a = description.excursionImages) === null || _a === void 0 ? void 0 : _a.length) ?\r\n React.createElement(Box, { mb: 3 },\r\n React.createElement(LightboxImageGrid, { images: description.excursionImages.map(image => ({\r\n urls: {\r\n large: image.url,\r\n thumbnail: image.url,\r\n original: image.url,\r\n },\r\n description: image.description\r\n })), imageGridCellHeight: 140, onImageClick: (index) => {\r\n const parentFrame = _ParentFrame();\r\n parentFrame.sendMessage({ message: 'open-gallery', params: { initialIndex: index } });\r\n } })) : null),\r\n React.createElement(Grid, { item: true, sm: 8 },\r\n React.createElement(\"div\", { className: classes.tableEx },\r\n React.createElement(\"div\", { className: classes.rowEx },\r\n React.createElement(\"div\", { className: classes.cellExDesc }, _T.COMMON_EXCURSION_TYPE),\r\n React.createElement(\"div\", { className: classes.cellEx }, description.excursionTypeName)),\r\n description.excursionDuration ?\r\n React.createElement(\"div\", { className: classes.rowEx },\r\n React.createElement(\"div\", { className: classes.cellExDesc }, _T.COMMON_DURATION),\r\n React.createElement(\"div\", { className: classes.cellEx }, description.excursionDuration)) : null,\r\n description.durationInBusOneWay ?\r\n React.createElement(\"div\", { className: classes.rowEx },\r\n React.createElement(\"div\", { className: classes.cellExDesc }, _T.EXCURSION_BUS_ONE_WAY_DUR),\r\n React.createElement(\"div\", { className: classes.cellEx }, description.durationInBusOneWay)) : null,\r\n description.routeComplexity ?\r\n React.createElement(\"div\", { className: classes.rowEx },\r\n React.createElement(\"div\", { className: classes.cellExDesc }, _T.COMMON_ROUTE_COMPLEXITY),\r\n React.createElement(\"div\", { className: classes.cellEx }, description.routeComplexity)) : null,\r\n description.additionalPayments ?\r\n React.createElement(\"div\", { className: classes.rowEx },\r\n React.createElement(\"div\", { className: classes.cellExDesc }, _T.COMMON_ADDITIONALLY_PAID),\r\n React.createElement(\"div\", { className: classes.cellEx }, description.additionalPayments)) : null,\r\n description.recommendation ?\r\n React.createElement(\"div\", { className: classes.rowEx },\r\n React.createElement(\"div\", { className: classes.cellExDesc }, _T.COMMON_RECOMMENDATION),\r\n React.createElement(\"div\", { className: classes.cellEx }, description.recommendation)) : null,\r\n description.rootPoint ?\r\n React.createElement(\"div\", { className: classes.rowEx },\r\n React.createElement(\"div\", { className: classes.cellExDesc }, _T.COMMON_MEET_POINT),\r\n React.createElement(\"div\", { className: classes.cellEx }, description.rootPoint)) : null,\r\n description.timeBegin ?\r\n React.createElement(\"div\", { className: classes.rowEx },\r\n React.createElement(\"div\", { className: classes.cellExDesc }, _T.EXCURSION_TIME),\r\n React.createElement(\"div\", { className: classes.cellEx }, description.timeBegin)) : null,\r\n description.mealDescription ?\r\n React.createElement(\"div\", { className: classes.rowEx },\r\n React.createElement(\"div\", { className: classes.cellExDesc }, _T.EXCURSION_MEAL),\r\n React.createElement(\"div\", { className: classes.cellEx }, description.mealDescription)) : null))))),\r\n React.createElement(\"div\", { className: classes.excurDescPanel },\r\n React.createElement(Typography, { variant: \"h2\" }, _T.EXCURSION_SETTINGS),\r\n React.createElement(\"div\", { id: \"excursion-toolbar\" },\r\n React.createElement(ExcursionToolbarContainer, { excursionId: props.excursionId, frameId: props.id, tempFrameId: props.tempId, bookCallback: () => {\r\n setCartOpen(true);\r\n const sp = new URLSearchParams(search);\r\n sp.set('cartOpen', 'true');\r\n history.replace({\r\n pathname: pathname,\r\n search: sp.toString(),\r\n state: historyState,\r\n });\r\n const parentFrame = _ParentFrame();\r\n parentFrame.sendMessage({ message: 'scroll', top: 0, behavior: 'smooth' });\r\n } }))),\r\n React.createElement(\"div\", { className: classes.excurDescPanel },\r\n React.createElement(\"h2\", null, _T.EXCURSION_DESCRIPTION),\r\n React.createElement(\"div\", { className: classes.excurDescText },\r\n React.createElement(\"p\", { dangerouslySetInnerHTML: { __html: description.mainDescription } })))),\r\n React.createElement(CartFrame, Object.assign({}, cart, { isOpen: cartOpen, handleClose: handleClose, frameId: props.id, tempId: props.tempId }))) :\r\n React.createElement(React.Fragment, null))));\r\n}\r\n","import { Box, Button, ClickAwayListener, FormControl, Grid, Grow, IconButton, InputLabel, ListItemText, MenuList, OutlinedInput, Paper, Popper, styled, Typography, useControlled } from '@material-ui/core';\r\nimport { AddCircle, RemoveCircle } from '@material-ui/icons';\r\nimport { range, sumBy } from 'lodash';\r\nimport { useSnackbar } from 'notistack';\r\nimport React, { useEffect, useMemo, useRef, useState } from 'react';\r\nimport { formatString, _T } from '../../../include/appI18n';\r\nimport { pluralizeAutoSplit } from '../../../include/utils';\r\nimport { TpArrowIcon2, TpFormControl, TpInput, TpLabel, TpMenuItem } from '../../NewTourSearch/compoments/tp';\r\nexport const defaultAccommodation = {\r\n adults: 2,\r\n childs: 0,\r\n childAccommodations: []\r\n};\r\nconst IconButton2 = styled(IconButton)(({ theme }) => ({\r\n padding: '8px',\r\n}));\r\nexport const AccommodationSelector = React.forwardRef((props, ref) => {\r\n var _a, _b, _c;\r\n const { onChange } = props;\r\n const [value /*, onChange*/] = useControlled({\r\n name: 'value',\r\n controlled: props.value,\r\n default: props.multiply\r\n ? [Object.assign({}, defaultAccommodation)]\r\n : Object.assign({}, defaultAccommodation),\r\n state: 'value',\r\n });\r\n const [totalAdults, allowRemoveAdults, allowAddAdults] = useMemo(() => {\r\n const adults = Array.isArray(value) ? sumBy(value, a => a.adults) : value.adults;\r\n return [adults, adults > props.minAdults, adults < props.maxAdults];\r\n }, [value, props.minAdults, props.maxAdults]);\r\n const [totalChilds, allowRemoveChilds, allowAddChilds] = useMemo(() => {\r\n const childs = Array.isArray(value) ? sumBy(value, a => a.childAccommodations.length) : value.childAccommodations.length;\r\n return [childs, childs > props.minChilds, childs < props.maxChilds];\r\n }, [value, props.maxChilds, props.maxChilds]);\r\n const [open, setOpen] = React.useState(false);\r\n const [showDropdownContent, setShowDropdownContent] = React.useState(false);\r\n const anchorRef = useRef(null);\r\n const menuRef = React.useRef(null);\r\n const handleToggle = () => {\r\n if (!props.disabled)\r\n setOpen((prevOpen) => !prevOpen);\r\n else\r\n setOpen(false);\r\n };\r\n const handleClose = (event) => {\r\n if (anchorRef.current && menuRef.current && menuRef.current.contains(event.target)) {\r\n return;\r\n }\r\n setOpen(false);\r\n };\r\n const prevOpen = useRef(open);\r\n // return focus to the button when we transitioned from !open -> open\r\n useEffect(() => {\r\n if (prevOpen.current === true && open === false) {\r\n anchorRef.current.focus();\r\n }\r\n prevOpen.current = open;\r\n }, [open]);\r\n useEffect(() => {\r\n setTimeout(() => setShowDropdownContent(open), 200);\r\n }, [open]);\r\n const valueLabel = useMemo(() => {\r\n return `${totalAdults + totalChilds} ${pluralizeAutoSplit(totalAdults + totalChilds, _T.COMMON_PERSONS)}`;\r\n }, [totalAdults, totalChilds]);\r\n return (React.createElement(Box, Object.assign({}, ((_a = props.boxProps) !== null && _a !== void 0 ? _a : {}), { height: '100%', component: 'div' }),\r\n React.createElement(\"div\", { style: { display: 'flex', height: '100%' }, ref: ref },\r\n React.createElement(\"div\", { style: { display: 'flex', width: '100%', height: '100%' }, ref: anchorRef },\r\n React.createElement(TpFormControl, { variant: \"filled\", classes: props.formControlClasses, fullWidth: true, disabled: props.disabled },\r\n props.label ? React.createElement(TpLabel, { error: props.error }, props.label) : null,\r\n React.createElement(TpInput, { classes: props.inputClasses, disabled: props.disabled, value: valueLabel, onInput: (e) => {\r\n e.stopPropagation();\r\n e.preventDefault();\r\n }, readOnly: true, style: { caretColor: 'transparent' }, \"aria-controls\": open ? 'menu-list-grow' : undefined, \"aria-haspopup\": \"true\", onClick: handleToggle, startAdornment: props.startAdornment, endAdornment: (_b = props.endAdornment) !== null && _b !== void 0 ? _b : React.createElement(TpArrowIcon2, { className: \"MuiSvgIcon-root\" }), error: props.error })),\r\n React.createElement(Popper, { open: open, anchorEl: anchorRef.current, role: undefined, transition: true, style: {\r\n zIndex: 9999,\r\n width: (_c = anchorRef.current) === null || _c === void 0 ? void 0 : _c.clientWidth,\r\n maxHeight: '300px',\r\n } }, ({ TransitionProps, placement }) => {\r\n var _a;\r\n return (React.createElement(Grow, Object.assign({}, TransitionProps, { style: {\r\n transformOrigin: placement === 'bottom' ? 'left top' : 'left bottom',\r\n marginTop: placement === 'bottom' ? '2px' : 0,\r\n marginBottom: placement !== 'bottom' ? '2px' : 0,\r\n } }),\r\n React.createElement(Paper, { elevation: 4 },\r\n React.createElement(ClickAwayListener, { onClickAway: handleClose },\r\n React.createElement(Box, { width: \"100%\", height: \"100%\" }, showDropdownContent || !props.dropdownDelay ? React.createElement(Box, { width: \"100%\", height: \"100%\", padding: 2 },\r\n props.multiply && Array.isArray(value)\r\n ? React.createElement(NumberInput, { style: { marginBottom: '8px' }, value: value.length, onChange: newValue => {\r\n if (newValue > value.length) {\r\n let newArray = [...value, ...range(0, newValue - value.length).map(_ => (Object.assign({}, defaultAccommodation)))];\r\n onChange(newArray);\r\n }\r\n else if (newValue < value.length) {\r\n let newArray = [...value].slice(0, newValue);\r\n onChange(newArray);\r\n }\r\n }, minValue: 1, maxValue: (_a = props.maxItems) !== null && _a !== void 0 ? _a : 4, decrementDisabled: !allowRemoveAdults && !allowRemoveChilds, incrementDisabled: !allowAddAdults && !allowAddChilds, label: props.itemsCountInputLabel })\r\n : null,\r\n (Array.isArray(value) ? value : [value]).map((accommodation, index, accommodations) => (React.createElement(Box, { width: \"100%\", marginTop: \"24px\" },\r\n props.multiply && props.itemGroupLabelFormat\r\n ? React.createElement(Typography, { variant: \"h5\", style: { marginBottom: '16px' }, className: \"MuiTypography-h5-widget\" }, formatString(props.itemGroupLabelFormat, [index + 1]))\r\n : null,\r\n React.createElement(NumberInput, { style: { marginBottom: '8px' }, value: accommodation.adults, onChange: newValue => {\r\n let newAccommodation = Object.assign(Object.assign({}, accommodation), { adults: newValue });\r\n if (!props.multiply)\r\n onChange(newAccommodation);\r\n else if (Array.isArray(value)) {\r\n let newArray = [...value.slice(0, index), newAccommodation, ...value.slice(index + 1)];\r\n onChange(newArray);\r\n }\r\n }, minValue: props.minAdults, maxValue: props.maxAdults, label: _T.COMMON_ADULTS }),\r\n accommodation.childAccommodations.map((child, childIndex) => (React.createElement(Box, { justifyContent: \"space-between\", display: \"flex\", alignItems: \"center\", fontSize: \"1.1em\", marginBottom: \"8px\" },\r\n React.createElement(Box, null,\r\n React.createElement(Typography, null,\r\n _T.COMMON_CHILD,\r\n \", \",\r\n child.age,\r\n \" \",\r\n pluralizeAutoSplit(child.age, _T.COMMON_AGES_PLURAL))),\r\n React.createElement(Box, null,\r\n React.createElement(IconButton2, { onClick: _ => {\r\n let newArray = [...accommodation.childAccommodations.slice(0, childIndex), ...accommodation.childAccommodations.slice(childIndex + 1)];\r\n let newAccommodation = Object.assign(Object.assign({}, accommodation), { childAccommodations: newArray });\r\n if (!props.multiply)\r\n onChange(newAccommodation);\r\n else if (Array.isArray(value)) {\r\n let newArray = [...value.slice(0, index), newAccommodation, ...value.slice(index + 1)];\r\n onChange(newArray);\r\n }\r\n } },\r\n React.createElement(RemoveCircle, { className: \"MuiSvgIcon-root MuiSvgIcon-root-widget\", color: \"secondary\" })))))),\r\n accommodation.childAccommodations.length < props.maxChilds ? React.createElement(CustomSelect, { disabled: accommodation.childAccommodations.length >= props.maxChilds, label: _T.COMMON_ADD_CHILD, value: undefined, options: range(0, props.maxChildAge + 1), valueSelector: x => x, textSelector: x => `${x} ${pluralizeAutoSplit(x, _T.COMMON_AGES_PLURAL)}`, onChange: (newValue) => {\r\n let newArray = [...accommodation.childAccommodations, { age: typeof newValue == \"number\" ? newValue : Number.parseInt(newValue), withPlace: true }];\r\n let newAccommodation = Object.assign(Object.assign({}, accommodation), { childAccommodations: newArray });\r\n if (!props.multiply)\r\n onChange(newAccommodation);\r\n else if (Array.isArray(value)) {\r\n let newArray = [...value.slice(0, index), newAccommodation, ...value.slice(index + 1)];\r\n onChange(newArray);\r\n }\r\n }, startAdornment: React.createElement(IconButton2, { color: \"secondary\", disabled: true },\r\n React.createElement(AddCircle, { className: \"MuiSvgIcon-root MuiSvgIcon-root-widget\", color: \"secondary\" })), endAdornment: React.createElement(TpArrowIcon2, { className: \"MuiSvgIcon-root\" }), boxProps: { style: { marginBottom: '8px' } } }) : null))),\r\n React.createElement(Button, { onClick: handleClose, variant: \"contained\", color: \"secondary\", style: { marginTop: '8px' } }, \"OK\")) : null)))));\r\n })))));\r\n});\r\nexport function NumberInput(props) {\r\n const { onChange } = props;\r\n const [value /*, onChange*/] = useControlled({\r\n name: 'value',\r\n controlled: props.value,\r\n default: 0,\r\n state: 'value',\r\n });\r\n return (React.createElement(FormControl, { variant: \"outlined\", fullWidth: true, disabled: props.disabled, style: props.style },\r\n props.label ? React.createElement(InputLabel, { variant: \"outlined\", error: props.error }, props.label) : null,\r\n React.createElement(OutlinedInput, { label: props.label, disabled: props.disabled, value: value, onInput: (e) => {\r\n const input = e.target;\r\n const v = Number.parseInt(input.value);\r\n if (!Number.isInteger(v) || (v < value && props.decrementDisabled) || (v > value && props.incrementDisabled)) {\r\n // возможно лучше всегда отменять\r\n e.stopPropagation();\r\n e.preventDefault();\r\n return;\r\n }\r\n onChange(props.minValue !== undefined && v <= props.minValue\r\n ? props.minValue\r\n : props.maxValue !== undefined && v >= props.maxValue\r\n ? props.maxValue\r\n : v);\r\n }, readOnly: true, style: { caretColor: 'transparent' }, endAdornment: React.createElement(Grid, { container: true, style: {\r\n width: '136px',\r\n //width: '88px',\r\n marginRight: '-12px',\r\n marginTop: '-4px',\r\n } },\r\n React.createElement(Grid, { item: true, xs: 6 },\r\n React.createElement(IconButton2, { color: \"secondary\", style: { padding: '8px', opacity: '0.5', }, disabled: (props.minValue !== undefined && value <= props.minValue) || props.decrementDisabled, onClick: _ => onChange(value - 1) },\r\n React.createElement(RemoveCircle, { className: \"MuiSvgIcon-root MuiSvgIcon-root-widget\", color: (props.minValue !== undefined && value <= props.minValue) || props.decrementDisabled ? 'disabled' : 'secondary' }))),\r\n React.createElement(Grid, { item: true, xs: 6 },\r\n React.createElement(IconButton2, { color: \"secondary\", style: { padding: '8px', }, disabled: (props.maxValue !== undefined && value >= props.maxValue) || props.incrementDisabled, onClick: _ => onChange(value + 1) },\r\n React.createElement(AddCircle, { className: \"MuiSvgIcon-root MuiSvgIcon-root-widget\", color: (props.maxValue !== undefined && value >= props.maxValue) || props.incrementDisabled ? 'disabled' : 'secondary' })))), error: props.error })));\r\n}\r\nexport function CustomSelect(props) {\r\n var _a, _b, _c, _d;\r\n const snackbar = useSnackbar();\r\n const [open, setOpen] = React.useState(false);\r\n const anchorRef = React.useRef(null);\r\n const menuRef = React.useRef(null);\r\n const getOptionValue = (o) => typeof props.valueSelector == 'function' ? props.valueSelector(o) : o[props.valueSelector];\r\n const getOptionText = (o) => typeof props.textSelector == 'function' ? props.textSelector(o) : o[props.textSelector];\r\n const getDisabledState = (o) => typeof props.disabledSelector == 'function' ? props.disabledSelector(o) : false;\r\n const handleToggle = () => {\r\n if (!props.disabled)\r\n setOpen((prevOpen) => !prevOpen);\r\n else\r\n setOpen(false);\r\n };\r\n const handleClose = (event) => {\r\n if (anchorRef.current && menuRef.current && menuRef.current.contains(event.target)) {\r\n return;\r\n }\r\n setOpen(false);\r\n };\r\n const handleListKeyDown = (event) => {\r\n if (event.key === 'Tab') {\r\n event.preventDefault();\r\n setOpen(false);\r\n }\r\n };\r\n const [selected, setSelected] = useState(props.value !== undefined ? [props.value] : []);\r\n const [searchText, setSearchText] = useState();\r\n const [searchOpen, setSearchOpen] = useState(false);\r\n const options = useMemo(() => searchText && searchOpen ? props.options.filter(o => getOptionText(o).toLowerCase().includes(searchText.toLowerCase())) : props.options, [props.options, searchOpen, searchText]);\r\n const valueLabel = useMemo(() => {\r\n let q = props.value === undefined ? undefined : options.find(p => getOptionValue(p) === props.value);\r\n if (q !== undefined && q !== null)\r\n return getOptionText(q);\r\n return '';\r\n }, [selected, options, props.textSelector, props.valueSelector, props.value]);\r\n const searchRef = useRef(null);\r\n const prevOpen = useRef(open);\r\n useEffect(() => {\r\n if (prevOpen.current === true && open === false) {\r\n anchorRef.current.focus();\r\n }\r\n prevOpen.current = open;\r\n }, [open]);\r\n const MultiSelectMenu = React.createElement(MenuList, { ref: menuRef, autoFocusItem: open, id: \"menu-list-grow\", onKeyDown: handleListKeyDown, style: { maxHeight: (_a = props.heightPx) !== null && _a !== void 0 ? _a : 300, overflowY: 'auto' } }, options.map((o, i) => {\r\n let value = getOptionValue(o);\r\n let text = props.optionSelector && typeof props.optionSelector == 'function' ? props.optionSelector(o) : getOptionText(o);\r\n return (React.createElement(TpMenuItem, { selected: value == props.value, disabled: props.disabled || getDisabledState(o), dense: true, button: true, key: i, onClick: (e) => {\r\n props.onChange(value);\r\n setOpen(false);\r\n return;\r\n } },\r\n React.createElement(ListItemText, { primary: text })));\r\n }));\r\n return (React.createElement(React.Fragment, null,\r\n React.createElement(Box, Object.assign({}, ((_b = props.boxProps) !== null && _b !== void 0 ? _b : {})),\r\n React.createElement(\"div\", { style: { display: 'flex' }, ref: anchorRef },\r\n React.createElement(FormControl, { variant: \"outlined\", fullWidth: true, disabled: props.disabled },\r\n React.createElement(OutlinedInput, { className: \"pl-0\", placeholder: props.label, disabled: props.disabled, value: valueLabel, onInput: (e) => {\r\n e.stopPropagation();\r\n e.preventDefault();\r\n }, readOnly: true, style: { caretColor: 'transparent', fontSize: '1.2rem' }, \"aria-controls\": open ? 'menu-list-grow' : undefined, \"aria-haspopup\": \"true\", onClick: handleToggle, startAdornment: props.startAdornment, endAdornment: (_c = props.endAdornment) !== null && _c !== void 0 ? _c : React.createElement(TpArrowIcon2, { className: \"MuiSvgIcon-root\" }), error: props.error })),\r\n React.createElement(Popper, { open: open, anchorEl: anchorRef.current, role: undefined, transition: true, disablePortal: true, style: { zIndex: 9999, width: (_d = anchorRef.current) === null || _d === void 0 ? void 0 : _d.clientWidth, maxHeight: '300px' } }, ({ TransitionProps, placement }) => (React.createElement(Grow, Object.assign({}, TransitionProps, { style: { transformOrigin: placement === 'bottom' ? 'left top' : 'left bottom', marginTop: placement === 'bottom' ? '2px' : 0, marginBottom: placement !== 'bottom' ? '2px' : 0 } }),\r\n React.createElement(Paper, { elevation: 4 },\r\n React.createElement(ClickAwayListener, { onClickAway: handleClose }, MultiSelectMenu)))))))));\r\n}\r\n","import { AppBar, Button, CircularProgress, FormControl, Grid, makeStyles, Toolbar, Typography, useMediaQuery } from '@material-ui/core';\r\nimport { DateRange, People, WbIncandescent } from '@material-ui/icons';\r\nimport LocationOnIcon from '@material-ui/icons/LocationOn';\r\nimport { Autocomplete } from '@material-ui/lab';\r\nimport { throttle } from 'lodash';\r\nimport moment from 'moment';\r\nimport React, { useContext, useEffect, useMemo, useRef, useState } from \"react\";\r\nimport { formatString, _T } from '../../../include/appI18n';\r\nimport appSettings from '../../../include/appSettings';\r\nimport { api } from '../../../include/network/network';\r\nimport theme from '../../../include/react-common/theme';\r\nimport { BackdropContext } from '../../../include/react-components/BackdropProvider';\r\nimport { appUrl } from '../../../include/utils';\r\nimport { TpArrowIcon2, TpDateRangePickerField2, TpInput } from '../../NewTourSearch/compoments/tp';\r\nimport { AccommodationSelector, defaultAccommodation } from './AccommodationSelector';\r\nconst useStyles = makeStyles((theme) => ({\r\n icon: {\r\n //color: theme.palette.text.secondary,\r\n marginLeft: theme.spacing(1),\r\n marginRight: theme.spacing(1),\r\n },\r\n}));\r\nexport function ExcursionSearchWidget(props) {\r\n const classes = useStyles();\r\n const [loading, setLoading] = useState(false);\r\n const [isLoaded, setIsLoaded] = useState(false);\r\n const backdrop = useContext(BackdropContext);\r\n const tpMultiline = useMediaQuery(theme.breakpoints.up(\"sm\"));\r\n const [locations, setLocations] = useState([]);\r\n const [options, setOptions] = React.useState([]);\r\n const [value, setValue] = React.useState(null);\r\n const [inputValue, setInputValue] = React.useState('');\r\n const [toOpen, setToOpen] = useState(false);\r\n const directionRef = useRef(null);\r\n const datesRef = useRef(null);\r\n const accommodationRef = useRef(null);\r\n const [dates, setDates] = React.useState([undefined, undefined]);\r\n //const [dates, setDates] = React.useState<[string | undefined, string | undefined]>([moment().add(1, 'week').format('YYYY-MM-DD'), moment().add(2, 'week').format('YYYY-MM-DD')]);\r\n const datesError = useMemo(() => (!dates[0] || !moment(dates[0]).isValid() || !dates[1] || !moment(dates[1]).isValid()), [...dates]);\r\n const [error, setError] = useState(null);\r\n const [accommodation, setAccommodation] = useState(Object.assign({}, defaultAccommodation));\r\n //useLayoutEffect(() => {\r\n // if (loading)\r\n // backdrop.show();\r\n // else\r\n // backdrop.hide();\r\n //}, [loading, backdrop]);\r\n const searchUrl = useMemo(() => {\r\n if (!value || !accommodation || !(accommodation.adults + accommodation.childAccommodations.length) || datesError)\r\n return undefined;\r\n return appUrl('/Excursion', {\r\n CnId: value.type === 'excursion' ? value.grandParentId : (value === null || value === void 0 ? void 0 : value.type) === 'city' ? value.parentId : value.id,\r\n CtId: value.type === 'excursion' ? value.parentId : (value === null || value === void 0 ? void 0 : value.type) === 'city' ? value.id : null,\r\n ExcId: value.type === 'excursion' ? value.id : null,\r\n Begin: dates[0],\r\n End: dates[1],\r\n Adlt: accommodation.adults,\r\n Chd: accommodation.childAccommodations.length,\r\n Childs: accommodation.childAccommodations,\r\n });\r\n }, [value, ...dates, datesError, accommodation]);\r\n const fetch = useMemo(() => throttle((request, callback) => {\r\n setLoading(true);\r\n api('get', `/frame/${props.id}/excursion-search-widget/locations`, request)\r\n .then(r => {\r\n callback(r);\r\n setLoading(false);\r\n });\r\n }, 200), [props.id]);\r\n useEffect(() => {\r\n if (loading)\r\n return;\r\n fetch({ input: '', tempId: props.tempId }, (results) => {\r\n if (results === null || results === void 0 ? void 0 : results.response) {\r\n setLocations(results.response || []);\r\n setOptions(results.response || []);\r\n setIsLoaded(true);\r\n }\r\n });\r\n }, []);\r\n useEffect(() => {\r\n if (!isLoaded)\r\n return;\r\n let active = true;\r\n if (inputValue === '') {\r\n setOptions(locations);\r\n return undefined;\r\n }\r\n fetch({ input: inputValue, tempId: props.tempId }, (results) => {\r\n if (active) {\r\n let newOptions = [];\r\n //if (value) {\r\n // newOptions = [value];\r\n //}\r\n if (results === null || results === void 0 ? void 0 : results.response) {\r\n newOptions = [...newOptions, ...results.response];\r\n }\r\n setOptions(newOptions);\r\n }\r\n });\r\n return () => {\r\n active = false;\r\n };\r\n }, [isLoaded, value, inputValue, fetch]);\r\n return (React.createElement(AppBar, { position: \"static\", color: \"secondary\", style: { borderRadius: '5px' } },\r\n React.createElement(Toolbar, { variant: \"dense\", style: { padding: '4px' } },\r\n React.createElement(Grid, { container: true },\r\n React.createElement(Grid, { item: true, xs: 12, md: 5, className: \"input-autocomplete--grid-root-widget\" },\r\n React.createElement(Autocomplete, { clearText: _T.AUTOCOMPLETE_CLEAR, closeText: _T.AUTOCOMPLETE_CLOSE, getLimitTagsText: (num) => formatString(_T.AUTOCOMPLETE_LIMIT_TAGS, [num]), loadingText: _T.AUTOCOMPLETE_LOADING, noOptionsText: _T.AUTOCOMPLETE_NO_OPTIONS, openText: _T.AUTOCOMPLETE_OPEN, ref: directionRef, className: error == directionRef.current ? 'widget-field-error' : undefined, classes: { root: 'h-100' }, id: \"hotel-or-city-or-tour\", getOptionSelected: (option, value) => option.id === value.id && option.type === value.type, getOptionLabel: (option) => option.fullName, options: options, filterOptions: (x) => x, autoComplete: true, includeInputInList: true, value: value, loading: loading, disablePortal: true, open: toOpen, onOpen: _ => setToOpen(true), onClose: _ => setToOpen(false), onChange: (event, newValue) => {\r\n setOptions(newValue ? [newValue, ...options] : options);\r\n setValue(newValue);\r\n setError(null);\r\n }, onInputChange: (event, newInputValue) => {\r\n setInputValue(newInputValue);\r\n }, renderInput: (params) => (React.createElement(FormControl, Object.assign({}, params, { classes: { root: 'formControl-borderless-root' }, variant: \"outlined\", className: \"h-100\" }),\r\n React.createElement(TpInput, Object.assign({ classes: { root: 'tp-input-root input-borderless-root', input: 'input-px-small' }, placeholder: toOpen ? `${_T.COMMON_CITY}, ${_T.COMMON_EXCURSION}` : _T.COMMON_TO_WHERE }, params.InputProps, { inputProps: params.inputProps, endAdornment: (React.createElement(React.Fragment, null,\r\n loading ? React.createElement(CircularProgress, { color: \"inherit\", size: 20 }) : null,\r\n params.InputProps.endAdornment)) })))), renderOption: options == locations ? (option) => (React.createElement(\"span\", null, option.name)) : (option) => (React.createElement(Grid, { container: true, alignItems: \"center\" },\r\n React.createElement(Grid, { item: true }, option.type == 'excursion'\r\n ? React.createElement(WbIncandescent, { className: `MuiSvgIcon-root MuiSvgIcon-root-widget ${classes.icon}`, style: { rotate: '180deg' }, color: \"secondary\" })\r\n : React.createElement(LocationOnIcon, { className: `MuiSvgIcon-root MuiSvgIcon-root-widget ${classes.icon}`, color: \"secondary\" })),\r\n React.createElement(Grid, { item: true, xs: true },\r\n React.createElement(\"span\", { style: { fontWeight: 700 } }, option.fullName),\r\n React.createElement(Typography, { variant: \"body2\", color: \"textSecondary\" }, option.type == 'excursion' ? _T.COMMON_EXCURSION : option.type == 'city' ? _T.COMMON_CITY : '')))) })),\r\n React.createElement(Grid, { item: true, xs: 6, md: 3 },\r\n React.createElement(TpDateRangePickerField2, { dropdownDelay: true, ref: datesRef, className: error == datesRef.current ? ' widget-field-error' : '', formControlClasses: { root: 'formControl-borderless-root' }, inputClasses: { root: `tp-input-root input-borderless-root`, input: 'input-px-small' }, hideLabelWhenNotSelected: true, placeholder: _T.COMMON_CHECKIN_PERIOD, dates: dates, variant: \"outlined\", onChange: (d) => {\r\n var _a, _b;\r\n setDates([(_a = d[0]) === null || _a === void 0 ? void 0 : _a.format('YYYY-MM-DD'), (_b = d[1]) === null || _b === void 0 ? void 0 : _b.format('YYYY-MM-DD')]);\r\n setError(null);\r\n }, validDates: undefined, dateLimit: 365, dateLimitAlertText: formatString(_T.NEW_TOUR_SEARCH_MAX_DATES_WARNING, [365]), error: datesError, numberOfMonths: tpMultiline ? 2 : 1, startAdornment: React.createElement(DateRange, { className: `MuiSvgIcon-root MuiSvgIcon-root-widget ${classes.icon}`, color: \"secondary\" }), endAdornment: React.createElement(TpArrowIcon2, { className: \"MuiSvgIcon-root\" }) })),\r\n React.createElement(Grid, { item: true, xs: 6, md: 3 },\r\n React.createElement(AccommodationSelector, { dropdownDelay: true, ref: accommodationRef, formControlClasses: { root: 'formControl-borderless-root' }, inputClasses: { root: `tp-input-root input-borderless-root${(error == accommodationRef.current ? ' widget-field-error' : '')}`, input: 'input-px-small' }, boxProps: undefined, disabled: false, error: false, startAdornment: React.createElement(People, { className: `MuiSvgIcon-root MuiSvgIcon-root-widget ${classes.icon}`, color: \"secondary\" }), itemGroupLabelFormat: `${_T.COMMON_HOTELROOM} {0}`, itemsCountInputLabel: _T.COMMON_HOTELROOMS_COUNT, label: '', minAdults: 1, minChilds: 0, maxAdults: props.maxAdults, maxChilds: props.maxChilds, maxChildAge: appSettings().childMaxAge, onChange: newValue => {\r\n setAccommodation(Array.isArray(newValue) ? newValue[0] : newValue);\r\n setError(null);\r\n }, value: accommodation, required: true })),\r\n React.createElement(Grid, { item: true, xs: 12, md: 1 },\r\n React.createElement(Button, { fullWidth: true, style: { textTransform: 'uppercase', color: '#fff', height: '38px', marginLeft: '0.5px', marginRight: '0.5px', marginTop: '0.5px', marginBottom: '0.5px', borderRadius: '0' }, disabled: false && !searchUrl, onClick: _ => {\r\n if (searchUrl)\r\n window.open(searchUrl, '_parent');\r\n else {\r\n if (!value)\r\n setError(/*'Выберите направление'*/ directionRef.current);\r\n else if (datesError)\r\n setError(/*'Выберите даты'*/ datesRef.current);\r\n else if (!(accommodation.adults + accommodation.childAccommodations.length))\r\n setError(/*'Укажите туристов'*/ accommodationRef.current);\r\n }\r\n }, variant: \"contained\", color: \"primary\" }, _T.COMMON_SEARCH_VERB))))));\r\n}\r\n","import jQuery from 'jquery.js';\n\n!function(a){a.fn.datepicker.dates.ru={days:[\"Воскресенье\",\"Понедельник\",\"Вторник\",\"Среда\",\"Четверг\",\"Пятница\",\"Суббота\"],daysShort:[\"Вск\",\"Пнд\",\"Втр\",\"Срд\",\"Чтв\",\"Птн\",\"Суб\"],daysMin:[\"Вс\",\"Пн\",\"Вт\",\"Ср\",\"Чт\",\"Пт\",\"Сб\"],months:[\"Январь\",\"Февраль\",\"Март\",\"Апрель\",\"Май\",\"Июнь\",\"Июль\",\"Август\",\"Сентябрь\",\"Октябрь\",\"Ноябрь\",\"Декабрь\"],monthsShort:[\"Янв\",\"Фев\",\"Мар\",\"Апр\",\"Май\",\"Июн\",\"Июл\",\"Авг\",\"Сен\",\"Окт\",\"Ноя\",\"Дек\"],today:\"Сегодня\",clear:\"Очистить\",format:\"dd.mm.yyyy\",weekStart:1}}(jQuery);","import 'bootstrap-datepicker/dist/css/bootstrap-datepicker.css';\r\nimport 'bootstrap-datepicker/dist/js/bootstrap-datepicker';\r\n//import 'jquery-components/bootstrap-datepicker';\r\nimport $ from 'jquery';\r\nimport * as React from 'react';\r\nimport { useEffect, useRef } from 'react';\r\nimport { language } from '../appI18n';\r\nconst InputValidationMessage = (message, ref) => {\r\n return {\r\n onInvalid: () => {\r\n var _a;\r\n if ((_a = ref.current) === null || _a === void 0 ? void 0 : _a.setCustomValidity)\r\n ref.current.setCustomValidity(message);\r\n },\r\n onChange: () => {\r\n var _a;\r\n if ((_a = ref.current) === null || _a === void 0 ? void 0 : _a.setCustomValidity)\r\n ref.current.setCustomValidity('');\r\n }\r\n };\r\n};\r\nexport function BootstrapDatePicker(props) {\r\n var _a;\r\n const containerRef = useRef(null);\r\n const inputRef = useRef(null);\r\n //const displayValue = useMemo(() => props.selected ? ($.fn.datepicker as any).DPGlobal.format(props.selected.toDate().toLocaleDateString(), ($.fn.datepicker as any).defaults.format, language) : undefined, [props.selected])\r\n //const displayValue = useMemo(() => props.selected ? props.selected.toDate().toLocaleDateString() : undefined, [props.selected])\r\n useEffect(() => {\r\n if (!containerRef.current)\r\n return;\r\n $(containerRef.current).datepicker(Object.assign({ language: language, \r\n //format: 'yyyy-mm-dd',\r\n startDate: new Date(), orientation: \"bottom auto\", todayHighlight: true, autoclose: true, keepEmptyValues: true }, (props.datepickerOptions || {})));\r\n $(containerRef.current).off('clearDate');\r\n $(containerRef.current).off('changeDate');\r\n $(containerRef.current).on('clearDate', (e) => {\r\n if (props.onChange)\r\n props.onChange(undefined);\r\n });\r\n $(containerRef.current).on('changeDate', (e) => {\r\n if (props.onChange) {\r\n //props.onChange(e.date ? e.date.toISOString().split('T')[0] : undefined)\r\n //props.onChange(e.date ? moment(e.date).toDate().toLocaleDateString() : undefined)\r\n //props.onChange(moment(e.date))\r\n props.onChange(e.format());\r\n }\r\n });\r\n }, [containerRef.current, props.datepickerOptions]);\r\n //useEffect(() => {\r\n // if (!inputRef.current)\r\n // return\r\n // $(inputRef.current).selectpicker('refresh')\r\n //}, [props.disabled, props.required])\r\n useEffect(() => {\r\n if (!containerRef.current)\r\n return;\r\n $(containerRef.current).datepicker('setDate', props.selected);\r\n $(containerRef.current).datepicker('refresh');\r\n }, [props.selected, containerRef.current]);\r\n //useEffect(() => {\r\n // if (!containerRef.current)\r\n // return\r\n // //$(containerRef.current).datepicker('setDate', props.selected as any)\r\n // $(containerRef.current).datepicker('setDate', props.selected?.format((props.datepickerOptions?.format || 'mm/dd/yyyy').toString().toUpperCase()) as any)\r\n // setTimeout(() => {\r\n // $(containerRef.current!).datepicker('refresh')\r\n // }, 200)\r\n //}, [props.selected, containerRef.current])\r\n //useEffect(() => {\r\n // if (!selectRef.current)\r\n // return\r\n // $(selectRef.current).selectpicker('refresh')\r\n //})\r\n return (React.createElement(\"div\", { className: \"input-group date\", ref: containerRef },\r\n React.createElement(\"label\", { htmlFor: \"date\", className: \"input-group-addon input-date datepickerbutton\" }),\r\n React.createElement(\"input\", Object.assign({ ref: inputRef, type: \"text\", className: \"form-control px-0\", required: true, maxLength: 10 }, (props.customValidationMessage ? InputValidationMessage(props.customValidationMessage, inputRef) : {}), { value: typeof props.selected == 'string' ? props.selected : (_a = props.selected) === null || _a === void 0 ? void 0 : _a.toISOString().split('T')[0], autoComplete: \"off\" }, (props.inputProps || {}))),\r\n React.createElement(\"label\", { htmlFor: \"date\", className: \"input-group-addon datepickerbutton\" },\r\n React.createElement(\"span\", { className: \"input-select glyphicon glyphicon-calendar\" }))));\r\n}\r\n","//import 'bootstrap-select/dist/css/bootstrap-select.css';\r\nimport 'bootstrap-select/dist/js/bootstrap-select';\r\nimport $ from 'jquery';\r\nimport { groupBy } from 'lodash';\r\nimport * as React from 'react';\r\nimport { useEffect, useMemo, useRef } from 'react';\r\nconst InputValidationMessage = (message) => {\r\n const self = this;\r\n return {\r\n onInvalid: () => {\r\n if (self.setCustomValidity)\r\n self.setCustomValidity(message);\r\n },\r\n onChange: () => {\r\n if (self.setCustomValidity)\r\n self.setCustomValidity('');\r\n }\r\n };\r\n};\r\nexport function BootstrapSelectPicker(props) {\r\n var _a;\r\n const selectRef = useRef(null);\r\n const groups = useMemo(() => Object.values(groupBy(props.options, o => !props.groupSelector ? 1 : typeof props.groupSelector == 'function' ? props.groupSelector(o) : o[props.groupSelector])), [props.options, props.groupSelector]);\r\n useEffect(() => {\r\n if (!selectRef.current)\r\n return;\r\n $(selectRef.current).selectpicker({\r\n liveSearch: props.liveSearch,\r\n liveSearchStyle: props.liveSearchStyle,\r\n title: props.title,\r\n });\r\n $(selectRef.current).off('changed.bs.select');\r\n $(selectRef.current).on('changed.bs.select', () => {\r\n if (props.onChange)\r\n props.onChange($(selectRef.current).selectpicker('val', undefined));\r\n });\r\n $(selectRef.current).selectpicker('refresh');\r\n }, [selectRef.current, props.options]);\r\n useEffect(() => {\r\n if (!selectRef.current)\r\n return;\r\n $(selectRef.current).selectpicker('refresh');\r\n }, [props.disabled, props.required, props.labelSelector, props.valueSelector, props.groupSelector]);\r\n useEffect(() => {\r\n if (!selectRef.current)\r\n return;\r\n $(selectRef.current).selectpicker('val', props.selected);\r\n $(selectRef.current).selectpicker('refresh');\r\n }, [props.selected, selectRef.current]);\r\n //useEffect(() => {\r\n // if (!selectRef.current)\r\n // return\r\n // $(selectRef.current).selectpicker('refresh')\r\n //})\r\n const getOptionValue = (o) => (typeof props.valueSelector == 'function' ? props.valueSelector(o) : o[props.valueSelector]);\r\n const getOptionLabel = (o) => typeof props.labelSelector == 'function' ? props.labelSelector(o) : o[props.labelSelector];\r\n return (React.createElement(\"select\", Object.assign({ ref: selectRef, required: props.required, disabled: props.disabled }, (props.customValidationMessage ? InputValidationMessage(props.customValidationMessage) : {}), props.selectProps, { className: `${((_a = props.selectProps) === null || _a === void 0 ? void 0 : _a.className) || ''}`.trim(), value: props.selected }),\r\n props.anyOption ? React.createElement(\"option\", { value: props.anyOption.value }, props.anyOption.label) : null,\r\n groups.map((group, j, a) => (React.createElement(React.Fragment, { key: j }, a.length > 1 ? React.createElement(\"optgroup\", { key: j }, group.map((o, i) => React.createElement(\"option\", { key: i, value: getOptionValue(o) }, getOptionLabel(o)))) : React.createElement(React.Fragment, null, group.map((o, i) => React.createElement(\"option\", { key: i, value: getOptionValue(o) }, getOptionLabel(o)))))))));\r\n}\r\n","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nimport 'bootstrap/js/collapse.js';\r\nimport 'jquery-components/bootstrap-datepicker';\r\nimport 'jquery-components/bootstrap-select';\r\nimport 'jquery-components/bootstrap-validator';\r\nimport _, { range } from \"lodash\";\r\nimport moment from \"moment\";\r\nimport React, { useContext, useEffect, useLayoutEffect, useMemo, useState } from \"react\";\r\nimport { BootstrapDatePicker } from 'react-components/BootstrapDatePicker';\r\nimport { BootstrapSelectPicker } from 'react-components/BootstrapSelectPicker';\r\nimport { useHistory, useLocation } from \"react-router-dom\";\r\nimport { _T } from \"../../../include/appI18n\";\r\nimport appSettings from \"../../../include/appSettings\";\r\nimport { api } from \"../../../include/network/network\";\r\nimport { BackdropContext } from '../../../include/react-components/BackdropProvider';\r\nimport { formatMoney } from \"../../../include/utils\";\r\nimport { _ParentFrame } from \"../types/Frame\";\r\nimport CartFrame from \"./CartFrame\";\r\nexport function ExtraFrame(props) {\r\n var _a, _b, _c, _d, _e, _f;\r\n const [model, setModel] = useState({\r\n serviceClassId: props.extraServiceClassId,\r\n serviceId: props.extraServiceId,\r\n countryId: props.countryId,\r\n cityId: props.cityId,\r\n childs: 0,\r\n accommodation: {\r\n adults: ((_a = props.accommodation) === null || _a === void 0 ? void 0 : _a.adults) || 2,\r\n childs: ((_b = props.accommodation) === null || _b === void 0 ? void 0 : _b.childs) || 0,\r\n childAccommodations: ((_c = props.accommodation) === null || _c === void 0 ? void 0 : _c.childAccommodations) || range(0, ((_d = props.accommodation) === null || _d === void 0 ? void 0 : _d.childs) || 0).map(_ => 0)\r\n },\r\n //date: moment().add(1, 'w').toDate().toISOString().split('T')[0],\r\n date: moment().add(1, 'w').toDate(),\r\n duration: props.duration || 1,\r\n });\r\n const [searchResult, setSearchResult] = useState();\r\n const [serviceClasses, setServiceClasses] = useState([]);\r\n const [countries, setCountries] = useState([]);\r\n const [cities, setCities] = useState([]);\r\n const [extras, setExtras] = useState([]);\r\n const [cartOpen, setCartOpen] = useState(false);\r\n const cart = useMemo(() => JSON.parse(sessionStorage.getItem('frame-cart') || '{ \"services\": [] }'), [cartOpen]);\r\n const titles = useMemo(() => _T.EXTRA_RESULT_TITLE.split(','), [_T.EXTRA_RESULT_TITLE]);\r\n const history = useHistory();\r\n const { pathname, search, state: historyState } = useLocation();\r\n const backdrop = useContext(BackdropContext);\r\n const [loading, setLoading] = useState(false);\r\n const [isLoaded, setIsLoaded] = useState(false);\r\n const handleClose = () => {\r\n setCartOpen(false);\r\n const sp = new URLSearchParams(search);\r\n sp.delete('cartOpen');\r\n history.replace({\r\n pathname: pathname,\r\n search: sp.toString(),\r\n state: historyState,\r\n });\r\n sessionStorage.setItem('frame-cart', '{ \"services\": [] }');\r\n };\r\n useEffect(() => {\r\n searchExtras(false);\r\n }, []);\r\n useEffect(() => {\r\n if (loading)\r\n return;\r\n setLoading(true);\r\n (() => __awaiter(this, void 0, void 0, function* () {\r\n var _a;\r\n if (!model)\r\n return;\r\n if (!model.countryId) {\r\n setCities([]);\r\n return;\r\n }\r\n const citiesR = yield api('get', `/extra/GetCities`, { countryId: model.countryId });\r\n setCities(((_a = citiesR.response) === null || _a === void 0 ? void 0 : _a.items) || []);\r\n }))()\r\n .finally(() => {\r\n setLoading(false);\r\n });\r\n }, [model === null || model === void 0 ? void 0 : model.countryId]);\r\n useEffect(() => {\r\n if (loading)\r\n return;\r\n setLoading(true);\r\n (() => __awaiter(this, void 0, void 0, function* () {\r\n var _a;\r\n if (!model)\r\n return;\r\n if (!model.serviceClassId) {\r\n setExtras([]);\r\n return;\r\n }\r\n const r = yield api('get', `/extra/GetServices`, { classId: model.serviceClassId });\r\n setExtras(((_a = r.response) === null || _a === void 0 ? void 0 : _a.items) || []);\r\n }))()\r\n .finally(() => {\r\n setLoading(false);\r\n });\r\n }, [model === null || model === void 0 ? void 0 : model.serviceClassId]);\r\n useLayoutEffect(() => {\r\n if (loading)\r\n backdrop.show();\r\n else\r\n backdrop.hide();\r\n }, [loading, backdrop]);\r\n const searchExtras = (setExtrasRs = true) => __awaiter(this, void 0, void 0, function* () {\r\n var _g, _h, _j, _k, _l;\r\n if (loading)\r\n return;\r\n setLoading(true);\r\n if (!model)\r\n return;\r\n try {\r\n const r = yield api('get', `/extra`, Object.assign(Object.assign({}, model), { date: moment(model.date, ['YYYY-MM-DD', 'MM/DD/YYYY', 'DD.MM.YYYY']).format('YYYY-MM-DD') }));\r\n setCountries(((_g = r.response) === null || _g === void 0 ? void 0 : _g.searchData.countries) || []);\r\n setServiceClasses(((_h = r.response) === null || _h === void 0 ? void 0 : _h.searchData.classes) || []);\r\n setExtras(((_j = r.response) === null || _j === void 0 ? void 0 : _j.searchData.extras) || []);\r\n if (!((_k = r.response) === null || _k === void 0 ? void 0 : _k.searchData.countries.find(c => c.id == model.countryId))) {\r\n setCities([]);\r\n setModel(Object.assign(Object.assign({}, model), { countryId: undefined, cityId: undefined }));\r\n }\r\n if (setExtrasRs)\r\n setSearchResult((_l = r.response) === null || _l === void 0 ? void 0 : _l.searchResultRs);\r\n }\r\n finally {\r\n setTimeout(() => setLoading(false), 500);\r\n }\r\n });\r\n return (React.createElement(\"section\", { className: `extra-single` },\r\n React.createElement(\"div\", { className: \"row\" },\r\n React.createElement(\"section\", { className: \"extra-search-form\" },\r\n React.createElement(\"div\", { className: \"container\", style: { minWidth: 'min(100%, 1150px)' } },\r\n React.createElement(\"div\", { className: \"row\" },\r\n React.createElement(\"form\", { role: \"form\", id: \"extraSearchForm\", className: \"form-horizontal row no-gutters col-xs-12 mx-0 px-0 clear\", \"data-toggle\": \"validator\", \"data-delay\": \"30000\", \"data-focus\": \"false\" },\r\n React.createElement(\"div\", { className: \"col-md-6 col-xs-12 row pr-down-lg-0\" },\r\n React.createElement(\"label\", { className: \"col-md-3 col-xs-12 control-label extra-class\" },\r\n _T.COMMON_EXTRA_CLASS,\r\n React.createElement(\"span\", { className: \"text-danger\" }, \"*\")),\r\n React.createElement(\"div\", { className: \"col-md-9 col-xs-12 select-group form-group pr-down-lg-2\" },\r\n React.createElement(BootstrapSelectPicker, { liveSearch: true, title: _T.CONTROL_SELECTFROMLISTORFIRSTLETTERS, required: true, customValidationMessage: _T.CONTROL_FILLTHISFIELD, selectProps: {\r\n name: \"ServiceClassId\",\r\n id: \"ServiceClassId\",\r\n }, options: serviceClasses, labelSelector: \"name\", valueSelector: \"id\", selected: model.serviceClassId, disabled: true }),\r\n React.createElement(\"div\", { className: \"help-block with-errors\" })),\r\n React.createElement(\"label\", { className: \"col-md-3 col-xs-12 control-label country\" }, _T.COMMON_SERVICE),\r\n React.createElement(\"div\", { className: \"col-md-9 col-xs-12 select-group form-group pr-down-lg-2\" },\r\n React.createElement(BootstrapSelectPicker, { liveSearch: true, liveSearchStyle: \"startsWith\", options: extras, anyOption: {\r\n value: undefined,\r\n label: _T.COMMON_ANY_EXTRA,\r\n }, labelSelector: \"name\", valueSelector: \"id\", selected: model.serviceId, onChange: v => setModel(prev => (Object.assign(Object.assign({}, prev), { serviceId: typeof v == 'undefined' || typeof v == 'number' ? v : Number.parseInt(`${v}`) }))) }),\r\n React.createElement(\"div\", { className: \"help-block with-errors\" }))),\r\n React.createElement(\"div\", { className: \"col-md-6 col-xs-12 row pr-0\" },\r\n React.createElement(\"label\", { className: \"col-md-2 col-xs-12 control-label country\" }, _T.COMMON_COUNTRY),\r\n React.createElement(\"div\", { className: \"col-md-10 col-xs-12 select-group form-group pr-2\" },\r\n React.createElement(BootstrapSelectPicker, { liveSearch: true, liveSearchStyle: \"startsWith\", options: countries, anyOption: {\r\n value: undefined,\r\n label: _T.COMMON_ANY_COUNTRY,\r\n }, labelSelector: \"name\", valueSelector: \"id\", selected: model.countryId, onChange: v => setModel(prev => (Object.assign(Object.assign({}, prev), { countryId: typeof v == 'undefined' || typeof v == 'number' ? v : Number.parseInt(`${v}`) }))) }),\r\n React.createElement(\"div\", { className: \"help-block with-errors\" })),\r\n React.createElement(\"label\", { className: \"col-md-2 col-xs-12 control-label city\" }, _T.COMMON_CITY),\r\n React.createElement(\"div\", { className: \"col-md-10 col-xs-12 select-group form-group pr-2\" },\r\n React.createElement(BootstrapSelectPicker, { liveSearch: true, liveSearchStyle: \"startsWith\", options: cities, anyOption: {\r\n value: undefined,\r\n label: _T.COMMON_ANY_CITY,\r\n }, disabled: !model.countryId, labelSelector: \"name\", valueSelector: \"id\", selected: model.cityId, onChange: v => setModel(prev => (Object.assign(Object.assign({}, prev), { cityId: typeof v == 'undefined' || typeof v == 'number' ? v : Number.parseInt(`${v}`) }))) }),\r\n React.createElement(\"div\", { className: \"help-block with-errors\" }))),\r\n React.createElement(\"div\", { className: \"col-md-6 col-xs-12 row mt-3\" },\r\n React.createElement(\"label\", { htmlFor: \"date\", className: \"col-md-3 col-xs-12 control-label extra-class\" },\r\n _T.EXTRA_START_DATE,\r\n React.createElement(\"span\", { className: \"text-danger\" }, \"*\")),\r\n React.createElement(\"div\", { className: \"col-md-3 select-group form-group no-padding input-daterange col-xs-12 date-group extra-box-date ml-0 pl-1\" },\r\n React.createElement(\"div\", { className: \"form-group\" },\r\n React.createElement(BootstrapDatePicker, { selected: model.date, required: true, customValidationMessage: _T.CONTROL_FILLTHISFIELD, datepickerOptions: {\r\n autoclose: true,\r\n }, onChange: v => {\r\n setModel(prev => (Object.assign(Object.assign({}, prev), { date: v })));\r\n } }),\r\n React.createElement(\"div\", { className: \"help-block with-errors\" }))),\r\n React.createElement(\"label\", { className: \"control-label col-md-4 pl-0 pr-0\" },\r\n _T.COMMON_DURATION,\r\n React.createElement(\"span\", { className: \"text-danger\" }, \"*\")),\r\n React.createElement(\"div\", { className: \"col-md-2 col-xs-12\" },\r\n React.createElement(BootstrapSelectPicker, { liveSearch: true, liveSearchStyle: \"startsWith\", options: range(1, 28), labelSelector: x => x.toString(), valueSelector: x => x, selected: model.duration, customValidationMessage: _T.CONTROL_FILLTHISFIELD, onChange: v => setModel(prev => (Object.assign(Object.assign({}, prev), { duration: (typeof v == 'undefined' || typeof v == 'number' ? v : Number.parseInt(`${v}`)) || 1 }))) }))),\r\n React.createElement(\"div\", { className: \"col-md-6 col-xs-12 row mt-3 pr-0\" },\r\n React.createElement(\"label\", { className: \"col-md-2 col-xs-12 control-label label-left\" },\r\n _T.COMMON_TOURISTS,\r\n React.createElement(\"span\", { className: \"text-danger\" }, \"*\")),\r\n React.createElement(\"div\", { className: \"row col-md-10 col-xs-12 px-0\" },\r\n React.createElement(\"div\", { className: \"form-group col-md-2 col-xs-6 block-tourist pr-1\" },\r\n React.createElement(\"label\", { className: \"control-label\" }, _T.COMMON_ADULT_COUNT),\r\n React.createElement(BootstrapSelectPicker, { required: true, options: range(1, 10), labelSelector: x => x.toString(), valueSelector: x => x, selected: model.accommodation.adults, onChange: v => setModel(prev => (Object.assign(Object.assign({}, prev), { accommodation: Object.assign(Object.assign({}, prev.accommodation), { adults: (typeof v == 'undefined' || typeof v == 'number' ? v : Number.parseInt(`${v}`)) }) }))) })),\r\n React.createElement(\"div\", { className: \"form-group col-md-2 col-xs-6 block-tourist pl-3 pr-1\" },\r\n React.createElement(\"label\", { className: \"control-label\" }, _T.COMMON_CHILD_COUNT),\r\n React.createElement(BootstrapSelectPicker, { required: true, options: range(0, 5), labelSelector: x => x.toString(), valueSelector: x => x, selected: model.accommodation.childs, onChange: v => setModel(prev => (Object.assign(Object.assign({}, prev), { accommodation: Object.assign(Object.assign({}, prev.accommodation), { childs: v }) }))) })),\r\n React.createElement(\"div\", { className: \"block-tourist col-md-9 col-xs-12 row pr-0 pl-0 pl-sm-4\" }, range(1, 5).map(child => {\r\n var _a;\r\n return (React.createElement(\"div\", { key: child, style: { display: model.accommodation.childs >= child ? undefined : 'none' }, className: \"col-xs-3 col-md-3 select-group child child@(child) row no-gutters pr-0 pl-1\" },\r\n React.createElement(\"label\", { className: \"control-label\", dangerouslySetInnerHTML: { __html: `${_T.COMMON_CHILD_AGE_SHORTEST.replaceAll(\"\\n\", \"
\")}${child}` } }),\r\n React.createElement(BootstrapSelectPicker, { options: range(0, appSettings().childMaxAge), labelSelector: x => x.toString(), valueSelector: x => x, selected: (_a = model.accommodation.childAccommodations[child - 1]) === null || _a === void 0 ? void 0 : _a.age, onChange: v => setModel(prev => (Object.assign(Object.assign({}, prev), { accommodation: Object.assign(Object.assign({}, prev.accommodation), { childAccommodations: prev.accommodation.childAccommodations.map((c, i) => i == child - 1 ? Object.assign(Object.assign({}, c), { age: (typeof v == 'undefined' || typeof v == 'number' ? v : Number.parseInt(`${v}`)) }) : c) }) }))) })));\r\n })))),\r\n React.createElement(\"div\", { className: \"col-md-12 col-xs-12 row extra-button-search\" },\r\n React.createElement(\"div\", { className: \"col-md-6 col-xs-12\" },\r\n React.createElement(\"button\", { type: \"button\", className: \"btn btn-orange\", onClick: () => searchExtras(true) }, _T.COMMON_SEARCH),\r\n React.createElement(\"a\", { href: \"#\", id: \"clrBtn\", className: \"clear-fields\", onClick: e => {\r\n e.preventDefault();\r\n setModel(prev => (Object.assign(Object.assign({}, prev), { accommodation: Object.assign(Object.assign({}, prev.accommodation), { adults: props.accommodation.adults || 2, childs: props.accommodation.childs || 0 }), countryId: props.countryId, cityId: props.cityId, serviceId: props.extraServiceId, duration: props.duration, date: undefined })));\r\n } }, _T.COMMON_CLEARALLFIELDS)),\r\n React.createElement(\"div\", { className: \"col-md-6 col-xs-12 d-inline-block\" },\r\n React.createElement(\"p\", { className: \"request right-float\" },\r\n React.createElement(\"span\", { className: \"text-danger\" }, \"*\"),\r\n \" \",\r\n _T.REQUIRED_FIELDS))),\r\n !!searchResult && !((_e = searchResult.extraPrices) === null || _e === void 0 ? void 0 : _e.length) ? React.createElement(\"div\", { className: \"not-found\" }, _T.EXTRA_NOTHING_FOUND) : null)))),\r\n searchResult && !!((_f = searchResult.extraPrices) === null || _f === void 0 ? void 0 : _f.length) ?\r\n React.createElement(\"section\", { className: \"extra-body col-md-12 col-sm-12 col-xs-12 form-horizontal px-0\" },\r\n React.createElement(\"div\", { className: \"row m-0 mb-3 no-gutters\" },\r\n React.createElement(\"div\", { className: \"col-md-12\" },\r\n React.createElement(\"div\", { className: \"row extras-div\" },\r\n React.createElement(\"div\", { className: \"extra-search-panel\" },\r\n React.createElement(\"div\", { className: \"row m-0\" },\r\n React.createElement(\"div\", { className: \"extra-content transfer-content table-responsive col-md-12\" },\r\n React.createElement(\"table\", { className: \"table\" },\r\n React.createElement(\"thead\", null,\r\n React.createElement(\"tr\", null,\r\n React.createElement(\"th\", null, titles[0]),\r\n React.createElement(\"th\", { className: \"center\" }, titles[1]),\r\n React.createElement(\"th\", { className: \"center\" }, titles[2]),\r\n React.createElement(\"th\", { className: \"center\" }, titles[3]),\r\n React.createElement(\"th\", null))),\r\n React.createElement(\"tbody\", null, searchResult === null || searchResult === void 0 ? void 0 : searchResult.extraPrices.map((tr, i) => (React.createElement(\"tr\", { className: `${(i % 2 == 0 ? \" grey1\" : '')} hotel-title`, \"data-price\": formatMoney(tr.price, { currency: tr.currency.name }), \"data-tr-id\": tr.serviceId, \"data-tr-tp-id\": tr.serviceClassId, \"data-name\": tr.name, \"data-serialized\": tr.secureSerialized },\r\n React.createElement(\"td\", { className: \"black-text title-name\" }, tr.name),\r\n React.createElement(\"td\", { className: \"black-text center\" }, tr.cityName),\r\n React.createElement(\"td\", { className: \"black-text center title-price\" },\r\n formatMoney(tr.price, { currency: tr.currency.name }),\r\n \" \",\r\n tr.currency.name),\r\n React.createElement(\"td\", { className: \"black-text w-auto\", dangerouslySetInnerHTML: { __html: tr.description } }),\r\n React.createElement(\"td\", { className: \"text-center\" },\r\n React.createElement(\"a\", { href: \"#\", className: \"cart-btn\", onClick: (e) => __awaiter(this, void 0, void 0, function* () {\r\n e.preventDefault();\r\n setLoading(true);\r\n const cart = JSON.parse(sessionStorage.getItem('frame-cart') || '{ \"services\": [] }');\r\n cart.services = [];\r\n const r = yield api('post', `/frame/${props.id}/extra-cart${props.tempId ? `?tempId=${props.tempId}` : ''}`, { date: model.date, adultCount: model.accommodation.adults, childAges: model.accommodation.childAccommodations, extraSerialized: tr.secureSerialized });\r\n if (r.errors) {\r\n setLoading(false);\r\n return;\r\n }\r\n cart.services.push({\r\n type: 'extra',\r\n serviceId: tr.serviceId,\r\n date: moment(model.date, ['YYYY-MM-DD', 'MM/DD/YYYY', 'DD.MM.YYYY']).format('YYYY-MM-DD'),\r\n adultCount: model.accommodation.adults,\r\n childAges: model.accommodation.childAccommodations,\r\n extraSerialized: tr.secureSerialized,\r\n cartData: r.response,\r\n });\r\n const serviceDatas = cart.services.flatMap(s => s.type == 'hotel' ? [...s.cartData.map(x => x), ...s.cartDataCompulsory.map(x => x)] : [s.cartData]);\r\n cart.price = _.sum(_.map(serviceDatas, s => s.priceInBookingCurrency));\r\n cart.pricePerPerson = _.sum(_.map(serviceDatas, s => (s.priceInBookingCurrency / (s.accommodation.adults + s.accommodation.childs))));\r\n cart.currency = r.response.bookingCurrency;\r\n sessionStorage.setItem('frame-cart', JSON.stringify(cart));\r\n setCartOpen(true);\r\n const sp = new URLSearchParams(search);\r\n sp.set('cartOpen', 'true');\r\n history.replace({\r\n pathname: pathname,\r\n search: sp.toString(),\r\n state: historyState,\r\n });\r\n const parentFrame = _ParentFrame();\r\n parentFrame.sendMessage({ message: 'scroll', top: 0, behavior: 'smooth' });\r\n setLoading(false);\r\n }) }, _T.COMMON_CHOOSE)))))))))))))) : null),\r\n React.createElement(CartFrame, Object.assign({}, cart, { isOpen: cartOpen, handleClose: handleClose, frameId: props.id, tempId: props.tempId }))));\r\n}\r\nconst InputValidationMessage = (message) => {\r\n const self = this;\r\n return {\r\n onInvalid: () => {\r\n if (self.setCustomValidity)\r\n self.setCustomValidity(message);\r\n },\r\n onChange: () => {\r\n if (self.setCustomValidity)\r\n self.setCustomValidity('');\r\n }\r\n };\r\n};\r\n","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nimport { Modal } from '@material-ui/core';\r\nimport _ from 'lodash';\r\nimport moment from 'moment';\r\nimport React, { useEffect, useMemo, useState, useContext, useLayoutEffect } from 'react';\r\nimport { _T } from '../../../include/appI18n';\r\nimport appSettings from '../../../include/appSettings';\r\nimport { api } from '../../../include/network/network';\r\nimport { BootstrapDatePicker } from '../../../include/react-components/BootstrapDatePicker';\r\nimport { BootstrapSelectPicker } from '../../../include/react-components/BootstrapSelectPicker';\r\nimport { formatMoney, getCurrency, getWeekDays } from '../../../include/utils';\r\nimport { _ParentFrame } from '../types/Frame';\r\nimport CartFrame from \"./CartFrame\";\r\nimport { useHistory, useLocation } from \"react-router-dom\";\r\nimport { BackdropContext } from '../../../include/react-components/BackdropProvider';\r\nimport HotelLocation from '../../TourSearch/components/TourDescription/HotelLocation';\r\nimport { LightboxImageGrid } from '../../TourSearch/components/TourDescription/LightboxImageGrid';\r\nimport { LightboxThumbnail } from '../../TourSearch/components/TourDescription/LightboxThumbnail';\r\nfunction* orderTreeNodes(nodes, parentId = null, level = 0) {\r\n if (nodes) {\r\n for (let p of nodes.filter(x => { var _a; return ((_a = x.parentId) !== null && _a !== void 0 ? _a : '') == (parentId !== null && parentId !== void 0 ? parentId : ''); })) {\r\n p.level = level;\r\n yield p;\r\n for (let c of orderTreeNodes(nodes, p.id, level + 1))\r\n yield c;\r\n }\r\n }\r\n}\r\nfunction getAttributeProperties(desc, attributeId, roomId, mealId, languageId, culture) {\r\n var _a;\r\n if (!((_a = desc.hotelAttributeProperties) === null || _a === void 0 ? void 0 : _a.length))\r\n return null;\r\n const props = Object.values(_.groupBy(desc.hotelAttributeProperties.filter(x => x.attributeId == attributeId && (x.roomId == roomId || roomId == 0) && (x.mealId == mealId || mealId == 0)), x => x.id))\r\n .map(x => _.orderBy(x, q => q.languageId == languageId)[0])\r\n .map(x => `${x.name} - ${x.value}`);\r\n if (!props.length)\r\n return null;\r\n return `(${_.join(props, ', ')})`;\r\n}\r\nconst InputValidationMessage = (message, ref) => {\r\n return {\r\n onInvalid: () => {\r\n var _a;\r\n if ((_a = ref.current) === null || _a === void 0 ? void 0 : _a.setCustomValidity)\r\n ref.current.setCustomValidity(message);\r\n },\r\n onChange: () => {\r\n var _a;\r\n if ((_a = ref.current) === null || _a === void 0 ? void 0 : _a.setCustomValidity)\r\n ref.current.setCustomValidity('');\r\n }\r\n };\r\n};\r\nexport default function HotelFrame(props) {\r\n var _a, _b, _c, _d, _e, _f;\r\n const languageId = 1;\r\n const [rq, setRq] = useState();\r\n const [searchParamsSerialized, setSearchParamsSerialized] = useState();\r\n const [mustSelectPrice, setMustSelectPrice] = useState(false);\r\n const [checkInParamsOpen, setCheckInParamsOpen] = useState(false);\r\n const [recentHotels, setRecentHotels] = useState();\r\n const [hotel, setHotel] = useState();\r\n const [internalRooms, setInternalRooms] = useState();\r\n const [externalRooms, setExternalRooms] = useState();\r\n const [checkIn, checkOut] = useMemo(() => !rq ? [undefined, undefined] : [moment(rq.checkIn, ['YYYY-MM-DD', 'MM/DD/YYYY', 'DD.MM.YYYY']), moment(rq.checkOut, ['YYYY-MM-DD', 'MM/DD/YYYY', 'DD.MM.YYYY'])], [rq === null || rq === void 0 ? void 0 : rq.checkIn, rq === null || rq === void 0 ? void 0 : rq.checkOut]);\r\n const [activeTabs, setActiveTabs] = useState({});\r\n const hotelGroups = useMemo(() => !hotel ? [] : [hotel], [hotel]);\r\n const hidePrices = useMemo(() => !rq, [rq]);\r\n const hasPrices = useMemo(() => !!(hotel === null || hotel === void 0 ? void 0 : hotel.hotelPrices), [hotel === null || hotel === void 0 ? void 0 : hotel.hotelPrices]);\r\n const description = useMemo(() => hotel === null || hotel === void 0 ? void 0 : hotel.hotelDescription, [hotel === null || hotel === void 0 ? void 0 : hotel.hotelDescription]);\r\n const nights = useMemo(() => !(checkIn === null || checkIn === void 0 ? void 0 : checkIn.isValid()) || !(checkOut === null || checkOut === void 0 ? void 0 : checkOut.isValid()) ? 1 : checkOut.diff(checkIn, 'd'), [checkIn, checkOut]);\r\n const mealPriceGroups = useMemo(() => !hasPrices ? {} : _.groupBy(hotel.hotelPrices.map((x, hpi) => ({ hotelPrice: x, hpi })), x => `${x.hotelPrice.roomTypeId}_${x.hotelPrice.roomCategoryId}`), [hotel]);\r\n const [mealGroupsSelected, setMealGroupsSelected] = useState({});\r\n const [mealGroupsSelectorOpened, setMealGroupsSelectorOpened] = useState({});\r\n const globalCurrency = getCurrency();\r\n const backdrop = useContext(BackdropContext);\r\n const [loading, setLoading] = useState(false);\r\n const [isLoaded, setIsLoaded] = useState(false);\r\n const history = useHistory();\r\n const { pathname, search, state: historyState } = useLocation();\r\n const [cartOpen, setCartOpen] = useState(false);\r\n const cart = useMemo(() => JSON.parse(sessionStorage.getItem('frame-cart') || '{ \"services\": [] }'), [cartOpen]);\r\n useLayoutEffect(() => {\r\n if (loading)\r\n backdrop.show();\r\n else\r\n backdrop.hide();\r\n }, [loading, backdrop]);\r\n useEffect(() => {\r\n (() => __awaiter(this, void 0, void 0, function* () {\r\n var r = yield api('get', `/hotel/HotelGroupDescription?id=${props.hotelId}`, { includeRoomDescriptions: true });\r\n if (r.response && r.response) {\r\n setHotel(r.response.searchResult.hotelGroups[0]);\r\n setInternalRooms(r.response.roomDescriptions);\r\n setExternalRooms(r.response.externalRooms);\r\n }\r\n }))();\r\n }, []);\r\n useEffect(() => {\r\n if (!hotel || !checkIn || !rq)\r\n return;\r\n (() => __awaiter(this, void 0, void 0, function* () {\r\n setLoading(true);\r\n var r = yield api('get', `/hotel/HotelGroupDescription?id=${props.hotelId}`, {\r\n includeRoomDescriptions: true,\r\n cnId: hotel.hotelDescription.countryId,\r\n ctId: hotel.hotelDescription.cityId,\r\n cIn: checkIn.format('YYYY-MM-DD'),\r\n cOut: checkOut.format('YYYY-MM-DD'),\r\n rmCn: rq.roomCount,\r\n rm: rq.rooms.map(r => {\r\n var _a;\r\n return ({\r\n adults: r.adults,\r\n childs: r.childs,\r\n ages: ((_a = r.childAccommodations) === null || _a === void 0 ? void 0 : _a.map(a => a.age)) || [],\r\n });\r\n }),\r\n hotelId: hotel.hotelId,\r\n });\r\n if (r.response && r.response) {\r\n setHotel(r.response.searchResult.hotelGroups[0]);\r\n setInternalRooms(r.response.roomDescriptions);\r\n setExternalRooms(r.response.externalRooms);\r\n setSearchParamsSerialized(r.response.rq.searchParamsSerialized);\r\n }\r\n setLoading(false);\r\n }))();\r\n }, [checkIn]);\r\n const handleClose = () => {\r\n setCartOpen(false);\r\n const sp = new URLSearchParams(search);\r\n sp.delete('cartOpen');\r\n history.replace({\r\n pathname: pathname,\r\n search: sp.toString(),\r\n state: historyState,\r\n });\r\n sessionStorage.setItem('frame-cart', '{ \"services\": [] }');\r\n };\r\n return (React.createElement(React.Fragment, null,\r\n !description ? React.createElement(React.Fragment, null) :\r\n React.createElement(\"section\", { className: \"hotel-single\" },\r\n React.createElement(\"div\", { className: \"container\" },\r\n React.createElement(\"div\", { className: \"hotel-body\" },\r\n rq && checkIn && checkOut && hasPrices ? React.createElement(\"div\", { className: \"row m-0\" },\r\n React.createElement(\"div\", { className: \"col-md-9-2 hotel-info\" },\r\n React.createElement(\"div\", { className: \"hotel-info-item\" },\r\n React.createElement(\"span\", null,\r\n _T.COMMON_CHECKINDATE,\r\n \":\"),\r\n React.createElement(\"span\", null, checkIn.format(\"L\"))),\r\n React.createElement(\"div\", { className: \"hotel-info-item\" },\r\n React.createElement(\"span\", null,\r\n _T.COMMON_CHECKOUTDATE,\r\n \":\"),\r\n React.createElement(\"span\", null, checkOut.format(\"L\"))),\r\n React.createElement(\"div\", { className: \"hotel-info-item\" },\r\n React.createElement(\"span\", null,\r\n _T.COMMON_HOTELROOMS,\r\n \":\"),\r\n React.createElement(\"span\", null, rq.roomCount)),\r\n React.createElement(\"div\", { className: \"hotel-info-item\" },\r\n React.createElement(\"span\", null,\r\n _T.COMMON_ADULT_COUNT,\r\n \":\"),\r\n React.createElement(\"span\", null, _.sum(((_a = rq.rooms) === null || _a === void 0 ? void 0 : _a.map(r => r.adults)) || []))),\r\n React.createElement(\"div\", { className: \"hotel-info-item\" },\r\n React.createElement(\"span\", null,\r\n _T.COMMON_CHILD_COUNT,\r\n \":\"),\r\n React.createElement(\"span\", null, _.sum(((_b = rq.rooms) === null || _b === void 0 ? void 0 : _b.map(r => r.childs)) || []))),\r\n React.createElement(\"div\", { className: \"hotel-info-item\" },\r\n React.createElement(\"span\", null,\r\n _T.COMMON_NIGHTS_COUNT,\r\n \":\"),\r\n React.createElement(\"span\", null, checkOut.diff(checkIn, 'd'))))) : null,\r\n React.createElement(\"div\", { className: \"choose-checkin-params\" },\r\n React.createElement(\"a\", { className: \"btn btn-orange choose-params\", href: \"#\", onClick: () => setCheckInParamsOpen(true) }, _T.COMMON_CHECKIN_PARAMS)),\r\n React.createElement(\"div\", { className: \"row m-t-10 m-0\" },\r\n React.createElement(\"div\", { className: \"col-md-9\" },\r\n React.createElement(\"div\", { className: \"row\" },\r\n React.createElement(\"div\", { className: \"col-md-6 img-wrap\" }, ((_c = description.hotelImages) === null || _c === void 0 ? void 0 : _c.length) > 0 ? React.createElement(React.Fragment, null,\r\n React.createElement(LightboxImageGrid, { images: description.hotelImages, imageGridCellHeight: 120, imageGridSpacing: 6, onImageClick: (index) => {\r\n const parentFrame = _ParentFrame();\r\n parentFrame.sendMessage({ message: 'open-gallery', params: { hotelId: description.hotelId, initialIndex: index } });\r\n } })) : null),\r\n React.createElement(\"div\", { className: \"col-md-6 hotel-title\" },\r\n React.createElement(\"h1\", null, description.hotelName),\r\n React.createElement(\"p\", null, description.address),\r\n description.homePage ? React.createElement(\"a\", { target: \"_blank\", href: `${(description.homePage.toLowerCase().includes('://') ? '' : 'http://')}${description.homePage}`, className: \"web\" }, description.homePage) : null,\r\n React.createElement(\"p\", { className: \"rating\" }, (() => {\r\n const cat = new RegExp(/^\\s*(\\d+)\\s*\\*\\s*$/).exec(hotel.hotelCategory || '');\r\n if (!cat || cat.length < 2)\r\n return '';\r\n return React.createElement(React.Fragment, null, _.range(0, Number.parseInt(cat[1])).map(x => React.createElement(\"i\", { className: \"fa fa-star\", \"aria-hidden\": \"true\" })));\r\n })()),\r\n React.createElement(\"ul\", { className: \"hotel-links list-unstyled\" },\r\n description.description ?\r\n React.createElement(\"li\", null,\r\n React.createElement(\"a\", { \"data-smooth-scroll\": true, href: \"#hotelDescriptionLink\" },\r\n React.createElement(\"i\", { className: \"fa fa-angle-right\", \"aria-hidden\": \"true\" }),\r\n _T.HOTEL_DESCRIPTION)) : null,\r\n description.latitude != 0 && description.longitude != 0 ?\r\n React.createElement(\"li\", null,\r\n React.createElement(\"a\", { \"data-smooth-scroll\": true, href: \"#hotelOnMapLink\" },\r\n React.createElement(\"i\", { className: \"fa fa-angle-right\", \"aria-hidden\": \"true\" }),\r\n _T.HOTEL_PLACEONMAP)) : null,\r\n hasPrices ?\r\n React.createElement(\"li\", null,\r\n React.createElement(\"a\", { \"data-smooth-scroll\": true, href: \"#hotelPricesLink\" },\r\n React.createElement(\"i\", { className: \"fa fa-angle-right\", \"aria-hidden\": \"true\" }),\r\n _T.HOTEL_ROOMSPRICES)) : null,\r\n ((_d = description.hotelAttributes) === null || _d === void 0 ? void 0 : _d.length) ?\r\n React.createElement(\"li\", null,\r\n React.createElement(\"a\", { \"data-smooth-scroll\": true, href: \"#hotelServicesLink\" },\r\n React.createElement(\"i\", { className: \"fa fa-angle-right\", \"aria-hidden\": \"true\" }),\r\n _T.HOTEL_SERVICES)) : null))),\r\n React.createElement(\"div\", { className: \"row m-30\" },\r\n React.createElement(\"div\", { className: \"col-md-12\" },\r\n description.description || description.checkInTime || description.checkOutTime ? React.createElement(React.Fragment, null,\r\n React.createElement(\"div\", { className: \"hotel-panel\", id: \"hotelDescriptionLink\" },\r\n React.createElement(\"h2\", { className: \"hotel-title\" }, _T.HOTEL_DESCRIPTION),\r\n description.checkInTime || description.checkOutTime ? React.createElement(React.Fragment, null,\r\n React.createElement(\"div\", { className: \"hotel-text\" },\r\n description.checkInTime ? React.createElement(\"div\", null,\r\n React.createElement(\"b\", null,\r\n _T.COMMON_CHECK_IN_TIME,\r\n \": \"),\r\n description.checkInTime) : null,\r\n description.checkOutTime ? React.createElement(\"div\", null,\r\n React.createElement(\"b\", null,\r\n _T.COMMON_CHECK_OUT_TIME,\r\n \": \"),\r\n description.checkOutTime) : null)) : null,\r\n description.description ? React.createElement(\"div\", { className: \"hotel-text\" },\r\n React.createElement(\"p\", { dangerouslySetInnerHTML: { __html: description.description } })) : null,\r\n ((_e = description.taxes) === null || _e === void 0 ? void 0 : _e.length) ? React.createElement(\"div\", { className: \"hotel-taxes\" },\r\n React.createElement(\"br\", null),\r\n React.createElement(\"h4\", { className: \"mt-0\" }, _T.HOTEL_DESCRIPTION_TAXES_HEADER),\r\n React.createElement(\"ul\", { className: \"list-unstyled\" }, description.taxes.map(desc => (React.createElement(React.Fragment, null,\r\n React.createElement(\"li\", null,\r\n desc.name,\r\n \" - \",\r\n desc.price,\r\n \" \",\r\n desc.currency,\r\n \" \",\r\n desc.included ? '(включено в стоимость)' : ''),\r\n desc.description ? React.createElement(\"li\", { className: \"subtext text-grey\" }, desc.description) : null))))) : null)) : null,\r\n description.latitude != 0 && description.longitude != 0 ?\r\n React.createElement(\"div\", { className: \"hotel-panel\", id: \"hotelOnMapLink\" },\r\n React.createElement(\"h2\", { className: \"hotel-title\" }, _T.HOTEL_PLACEONMAP),\r\n React.createElement(HotelLocation, { description: description, height: 350 })) : null,\r\n React.createElement(\"div\", { className: `hotel-panel hotel-content${mustSelectPrice ? ' must-select-price' : ''}`, id: \"hotelPricesLink\" },\r\n hasPrices ? React.createElement(React.Fragment, null,\r\n React.createElement(\"h2\", { className: \"hotel-title\" }, _T.HOTEL_ROOMSPRICES),\r\n !hidePrices ? React.createElement(\"a\", { href: \"#\", className: \"add-to-cart btn btn-orange btn-in-table text-uppercase\", onClick: (e) => __awaiter(this, void 0, void 0, function* () {\r\n var _g;\r\n e.preventDefault();\r\n if (!_.sum(((_g = hotel === null || hotel === void 0 ? void 0 : hotel.selectedHotelPrices) === null || _g === void 0 ? void 0 : _g.map(h => h.count)) || [])) {\r\n setMustSelectPrice(true);\r\n return;\r\n }\r\n setLoading(true);\r\n const cart = JSON.parse(sessionStorage.getItem('frame-cart') || '{ \"services\": [] }');\r\n cart.services = [];\r\n const rooms = hotel === null || hotel === void 0 ? void 0 : hotel.selectedHotelPrices.map(h => JSON.stringify({\r\n roomCount: h.count,\r\n //hotelPrice: h.hotelPrice,\r\n //externalHotelPrice: externalRooms?.find(r => r.providerId == h.hotelPrice.externalProviderId && r.variantId == h.hotelPrice.bookingCode)?.externalHotelPrice,\r\n serialized: h.hotelPrice.secureSerialized,\r\n rooms: h.hotelPrice.allRoomNos.join(\";\"),\r\n compulsoryServiceParams: {},\r\n providerId: h.hotelPrice.externalProviderId,\r\n variantId: h.hotelPrice.bookingCode,\r\n }));\r\n const r = yield api('post', `/frame/${props.id}/hotel-cart${props.tempId ? `?tempId=${props.tempId}` : ''}`, {\r\n searchParamsSerialized,\r\n rooms: rooms,\r\n });\r\n if (r.errors) {\r\n setLoading(false);\r\n return;\r\n }\r\n cart.services.push({\r\n type: 'hotel',\r\n beginDate: checkIn.toDate(),\r\n endDate: checkOut.toDate(),\r\n nights,\r\n rq: rq,\r\n searchParamsSerialized: searchParamsSerialized,\r\n rooms: rooms,\r\n cartData: r.response.filter(x => x.hotelPrice).map(x => x),\r\n cartDataCompulsory: r.response.filter(x => !x.hotelPrice).map(x => x),\r\n });\r\n const serviceDatas = cart.services.flatMap(s => s.type == 'hotel' ? [...s.cartData.map(x => x), ...s.cartDataCompulsory.map(x => x)] : [s.cartData]);\r\n cart.price = _.sum(_.map(serviceDatas, s => s.priceInBookingCurrency));\r\n cart.pricePerPerson = _.sum(_.map(serviceDatas, s => (s.priceInBookingCurrency / (s.accommodation.adults + s.accommodation.childs))));\r\n cart.currency = r.response[0].bookingCurrency;\r\n sessionStorage.setItem('frame-cart', JSON.stringify(cart));\r\n setCartOpen(true);\r\n const sp = new URLSearchParams(search);\r\n sp.set('cartOpen', 'true');\r\n history.replace({\r\n pathname: pathname,\r\n search: sp.toString(),\r\n state: historyState,\r\n });\r\n const parentFrame = _ParentFrame();\r\n parentFrame.sendMessage({ message: 'scroll', top: 0, behavior: 'smooth' });\r\n setLoading(false);\r\n }) },\r\n _T.COMMON_CHOOSE,\r\n React.createElement(\"div\", { className: \"must-select-price-msg\" }, _T.HOTEL_SELECT_AT_LEAST_ONE_ROOM)) : null,\r\n React.createElement(\"table\", { className: \"table\" },\r\n React.createElement(\"tbody\", null, hotelGroups.map(hotelGroup => {\r\n var _a, _b, _c;\r\n const colorClass = \"grey1\";\r\n const currency = globalCurrency.name;\r\n const startNightIndex = -((((_a = checkIn === null || checkIn === void 0 ? void 0 : checkIn.weekday()) !== null && _a !== void 0 ? _a : 0) + 8) % 7);\r\n const hiddenClass = null;\r\n const weekDays = getWeekDays();\r\n return React.createElement(React.Fragment, null,\r\n Object.values(mealPriceGroups).flat().map(({ hotelPrice, hpi }) => {\r\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;\r\n const accmd = (_a = rq === null || rq === void 0 ? void 0 : rq.rooms[hotelPrice.roomNo - 1]) !== null && _a !== void 0 ? _a : { adults: 2, childAccommodations: null, childs: 0 };\r\n const external = !hotelPrice.externalProviderId ? null : externalRooms === null || externalRooms === void 0 ? void 0 : externalRooms.find(e => e.providerId == hotelPrice.externalProviderId && e.variantId == hotelPrice.bookingCode);\r\n const internal = internalRooms === null || internalRooms === void 0 ? void 0 : internalRooms.find(r => r.room.room == hpi.toString());\r\n const gallery = \"g-\" + hpi;\r\n const groupKey = `${hotelPrice.roomTypeId}_${hotelPrice.roomCategoryId}`;\r\n const group = mealPriceGroups[groupKey];\r\n return React.createElement(React.Fragment, null,\r\n React.createElement(\"tr\", { className: `${colorClass} collapse include more-info-${hotelGroup.hotelId} hotel${hotelGroup.hotelId} ${hiddenClass} in hotel-group-det${!hidePrices && group.length > 1 ? ' group-selector' : ''}${mealGroupsSelected[groupKey] == hotelPrice || (!mealGroupsSelected[groupKey] && hotelPrice == group[0].hotelPrice) ? '' : ' meal-group-inactive'}`, \"data-price\": formatMoney(hotelPrice.price), \"data-rooms\": hotelPrice.allRoomNo, \"data-category\": hotelPrice.roomCategory.name, \"data-type\": hotelPrice.roomType.name, \"data-meal\": hotelPrice.meal.name, \"data-serialized\": hotelPrice.secureSerialized, \"data-availability\": hotelPrice.immediateConfirm ? 1 : 0, \"data-accomodation\": JSON.stringify({ adults: accmd.adults, children: accmd.childAccommodations != null ? accmd.childAccommodations.map(c => c.age).filter((v, i) => i < accmd.childs) : [] }), \"data-hotel-id\": hotelGroup.hotelId, \"data-provider-id\": hotelPrice.externalProviderId, \"data-variant-id\": hotelPrice.bookingCode, \"data-start-night-index\": startNightIndex },\r\n React.createElement(\"td\", { className: \"px-4 pt-4 pb-0\", colSpan: 8 },\r\n React.createElement(\"div\", { className: \"room-container mb-3\" },\r\n React.createElement(\"div\", { className: \"room-description-col\" },\r\n React.createElement(\"div\", { className: \"room-description\" },\r\n React.createElement(\"div\", { className: \"description\" }, hotelPrice.externalProviderId && external ? React.createElement(React.Fragment, null, ((_c = (_b = external.externalHotelPrice) === null || _b === void 0 ? void 0 : _b.images) === null || _c === void 0 ? void 0 : _c.length) ? React.createElement(React.Fragment, null,\r\n React.createElement(LightboxThumbnail, { images: external.externalHotelPrice.images.map(x => ({\r\n urls: {\r\n large: x.url,\r\n original: x.url,\r\n thumbnail: x.url,\r\n }\r\n })), height: 160, onImageClick: () => {\r\n const parentFrame = _ParentFrame();\r\n parentFrame.sendMessage({ message: 'open-gallery', params: { hotelId: hotel === null || hotel === void 0 ? void 0 : hotel.hotelId, roomTypeId: internal === null || internal === void 0 ? void 0 : internal.description.roomTypeId, roomCategoryId: internal === null || internal === void 0 ? void 0 : internal.description.roomCategoryId, externalRoomProviderId: hotelPrice.externalProviderId, externalRoomVariantId: hotelPrice.bookingCode } });\r\n } })) : null) : internal ? React.createElement(React.Fragment, null, ((_d = internal.images) === null || _d === void 0 ? void 0 : _d.length) ? React.createElement(React.Fragment, null,\r\n React.createElement(LightboxThumbnail, { images: internal.images, height: 160, onImageClick: () => {\r\n const parentFrame = _ParentFrame();\r\n parentFrame.sendMessage({ message: 'open-gallery', params: { hotelId: hotel === null || hotel === void 0 ? void 0 : hotel.hotelId, roomTypeId: internal.description.roomTypeId, roomCategoryId: internal.description.roomCategoryId } });\r\n } })) : null) : null),\r\n !hidePrices ?\r\n React.createElement(\"div\", { className: \"description-sub\" },\r\n React.createElement(\"div\", { className: \"room-num\" }, ((_e = rq === null || rq === void 0 ? void 0 : rq.roomCount) !== null && _e !== void 0 ? _e : 0) > 1 ? React.createElement(React.Fragment, null,\r\n _T.COMMON_HOTELROOM,\r\n \" \",\r\n hotelPrice.allRoomNos.join(\", \")) : null),\r\n React.createElement(\"div\", { className: \"d-flex justify-content-between align-items-center\" },\r\n React.createElement(\"div\", { className: \"accmd\" },\r\n accmd.adults > 3 ? React.createElement(React.Fragment, null,\r\n React.createElement(\"div\", { className: \"adult\" }),\r\n React.createElement(\"span\", null,\r\n \"\\u00D7\",\r\n accmd.adults)) : _.range(0, accmd.adults).map(i => React.createElement(\"div\", { className: \"adult\" })),\r\n accmd.childs > 0 ? React.createElement(\"span\", null, \"+\") : null,\r\n _.range(0, accmd.childs).map(i => React.createElement(\"div\", { className: \"child\" }))),\r\n React.createElement(\"span\", { className: `room-avail ${hotelPrice.immediateConfirm ? \"immediate\" : \"request\"}` }, (hotelPrice.immediateConfirm ? _T.ROOM_AVAILABLE : _T.ROOM_ONREQUEST)))) : null)),\r\n React.createElement(\"div\", { className: \"room-prices-col\" },\r\n React.createElement(\"div\", { className: \"room-title-container mb-1\" },\r\n React.createElement(\"div\", { className: \"hotel-type\" },\r\n hotelPrice.roomType.name,\r\n (hotelPrice.roomType.name == hotelPrice.roomCategory.name ? \"\" : ` ${hotelPrice.roomCategory.name}`),\r\n (((_f = hotelPrice.accommodations) === null || _f === void 0 ? void 0 : _f.length) > 0 ? `, ${hotelPrice.accommodations.map(a => a.name).join(\"+\")}` : \"\"),\r\n \" \",\r\n (!hotelPrice.meal.name ? '' : ','),\r\n React.createElement(\"span\", { className: `meal-selector${mealGroupsSelectorOpened[groupKey] ? ' opened' : ''}`, onClick: () => setMealGroupsSelectorOpened(prev => (Object.assign(Object.assign({}, prev), { [groupKey]: !prev[groupKey] }))) },\r\n hotelPrice.meal.name,\r\n mealGroupsSelectorOpened[groupKey] ? React.createElement(\"ul\", { className: `meal-menu` }, group.filter(x => x.hotelPrice != hotelPrice).map(x => React.createElement(\"li\", { onClick: () => {\r\n setMealGroupsSelectorOpened(prev => (Object.assign(Object.assign({}, prev), { [groupKey]: false })));\r\n setMealGroupsSelected(prev => (Object.assign(Object.assign({}, prev), { [groupKey]: x.hotelPrice })));\r\n } }, x.hotelPrice.meal.name))) : null))),\r\n React.createElement(\"ul\", { className: \"tabs\" },\r\n React.createElement(\"li\", { \"data-tab\": \"tabPrice\", className: !activeTabs[hpi] ? \"active\" : undefined, onClick: () => setActiveTabs(prev => (Object.assign(Object.assign({}, prev), { [hpi]: 0 }))) }, _T.COMMON_PRICE),\r\n !hidePrices ? React.createElement(\"li\", { \"data-tab\": \"tabMeal\", className: activeTabs[hpi] == 1 ? \"active\" : undefined, onClick: () => setActiveTabs(prev => (Object.assign(Object.assign({}, prev), { [hpi]: 1 }))) }, _T.COMMON_MEAL_SERVS) : null,\r\n React.createElement(\"li\", { \"data-tab\": \"tabRoomDescription\", className: activeTabs[hpi] == 2 ? \"active\" : undefined, onClick: () => setActiveTabs(prev => (Object.assign(Object.assign({}, prev), { [hpi]: 2 }))) }, _T.ROOM_DESCRIPTION)),\r\n React.createElement(\"div\", { className: `tab tabPrice ${(!activeTabs[hpi] ? \"active\" : undefined)}` },\r\n React.createElement(\"table\", { className: \"table main price-table tab tabPrice active\" }, !hidePrices ? React.createElement(React.Fragment, null,\r\n React.createElement(\"tr\", { className: `${colorClass} collapse-title` },\r\n React.createElement(\"td\", null),\r\n React.createElement(\"td\", null),\r\n _.range(1, 8).map(w => React.createElement(\"td\", { className: \"week\" }, weekDays[w % 7].toUpperCase()))),\r\n (() => {\r\n var _a;\r\n let components = [];\r\n let week = 1;\r\n let mergedLastRow = 3;\r\n let allPrices = (_a = hotelPrice.perNightPrices) !== null && _a !== void 0 ? _a : [];\r\n let nightIndex = startNightIndex;\r\n do {\r\n components.push(React.createElement(\"tr\", { className: `${colorClass} rooms` },\r\n React.createElement(\"td\", { className: \"room\" }),\r\n React.createElement(\"td\", { className: \"period\" },\r\n week++,\r\n \" \",\r\n _T.COMMON_WEEK.toLowerCase()),\r\n _.range(1, 8).map(day => {\r\n nightIndex++;\r\n return React.createElement(React.Fragment, null,\r\n React.createElement(\"td\", { className: \"black-text text-center day-rate-item\", \"data-night-index\": nightIndex }, nightIndex >= 0 && nightIndex < allPrices.length ? formatMoney(allPrices[nightIndex]) : null));\r\n })));\r\n mergedLastRow--;\r\n } while (nightIndex < allPrices.length);\r\n return components;\r\n })()) : React.createElement(React.Fragment, null,\r\n React.createElement(\"tr\", { className: \"logon-to-price\" },\r\n React.createElement(\"td\", null,\r\n _T.COMMON_TO_SEE_PRICES,\r\n \" \",\r\n React.createElement(\"a\", { href: \"#\", className: \"choose-params\", onClick: () => setCheckInParamsOpen(true) }, _T.COMMON_SPECIFY_CHECKIN_PARAMS))))),\r\n !hidePrices ?\r\n React.createElement(\"div\", { className: \"hotel-conditions\" },\r\n React.createElement(\"a\", { className: \"cancel\", tabIndex: 0, role: \"button\", \"data-toggle\": \"popover\", \"data-trigger\": \"focus\" },\r\n React.createElement(\"span\", { className: \"info-btn d-inline-block\" },\r\n React.createElement(\"i\", { className: \"fa fa-info\", \"aria-hidden\": \"true\" })),\r\n _T.CANCELLATION_CONDITIONS),\r\n ((_h = (_g = hotelGroup.compulsoryServices) === null || _g === void 0 ? void 0 : _g.serviceList) === null || _h === void 0 ? void 0 : _h.length) ?\r\n React.createElement(\"a\", { tabIndex: 1, className: \"compulsory\", role: \"button\", \"data-popover-id\": `compulsory-popover-${hotelGroup.hotelId}`, \"data-toggle\": \"popover\", \"data-trigger\": \"focus\" },\r\n React.createElement(\"span\", { className: \"compulsory-btn d-inline-block\" },\r\n React.createElement(\"i\", { className: \"fa fa-exclamation\", \"aria-hidden\": \"true\" })),\r\n _T.HOTEL_COMPULSORY_SERVICES) : null) : null,\r\n React.createElement(\"ul\", { className: \"price-attrs list-unstyled\" },\r\n hotelPrice.isSpo && appSettings().hotelSearchResultShowSpo ? React.createElement(\"li\", null,\r\n React.createElement(\"a\", { className: \"is-spo d-inline-block\", \"data-toggle\": \"popover\", \"data-trigger\": \"focus\" }, \"* SPO\")) : null,\r\n hotelPrice.cancellationDenied ? React.createElement(\"li\", null,\r\n React.createElement(\"a\", { className: \"cancel-denied d-inline-block\", \"data-toggle\": \"popover\", \"data-trigger\": \"focus\" },\r\n \"* \",\r\n _T.HOTEL_CANCEL_DENIED)) : null)),\r\n !hidePrices ? React.createElement(\"div\", { className: `tab tabMeal ${(activeTabs[hpi] == 1 ? \"active\" : undefined)}` }, hotelPrice.externalProviderId && external ? React.createElement(React.Fragment, null, external ? React.createElement(React.Fragment, null,\r\n React.createElement(\"ul\", { className: \"meal\" }, (_k = (_j = external.externalHotelPrice) === null || _j === void 0 ? void 0 : _j.availableMeals) === null || _k === void 0 ? void 0 : _k.map(meal => React.createElement(\"li\", { title: meal.mealCode },\r\n meal.mealName,\r\n \" - \",\r\n meal.price,\r\n \" \",\r\n meal.currency,\r\n React.createElement(\"br\", null),\r\n React.createElement(\"span\", { className: \"subtext text-grey\" }, (meal.included ? '(включено в стомость)' : '')))))) : null) : internal ? React.createElement(React.Fragment, null,\r\n React.createElement(\"ul\", { className: \"meal\" }, (_l = internal.mealAttributes) === null || _l === void 0 ? void 0 : _l.map(m => React.createElement(\"li\", { className: `l${m.level}` }, m.name)))) : null) : null,\r\n React.createElement(\"div\", { className: `tab tabRoomDescription ${(activeTabs[hpi] == 2 ? \"active\" : undefined)}` }, hotelPrice.externalProviderId && external\r\n ? React.createElement(\"div\", { dangerouslySetInnerHTML: { __html: external.description || '' } })\r\n : internal\r\n ? React.createElement(React.Fragment, null,\r\n ((_m = internal.hotelRoomAttributes) === null || _m === void 0 ? void 0 : _m.length) ?\r\n React.createElement(\"ul\", { className: \"hot-attr\" }, internal.hotelRoomAttributes.map(m => React.createElement(\"li\", { className: `l${m.level}` }, m.name))) : null,\r\n React.createElement(\"div\", { className: \"hot-attr\" },\r\n React.createElement(\"p\", { dangerouslySetInnerHTML: { __html: ((_o = internal.description) === null || _o === void 0 ? void 0 : _o.description) || '' } }))) : null))),\r\n !hidePrices ?\r\n React.createElement(\"div\", { className: \"room-footer room-container mt-3 pt-3 pb-3\" },\r\n React.createElement(\"div\", { className: \"room-description-col\" },\r\n React.createElement(\"div\", { className: \"form-group\" },\r\n React.createElement(\"label\", { className: \"col-xs-12 col-md-8 px-0 pt-2 control-label\" }, _T.COMMON_ROOMCOUNT),\r\n React.createElement(\"div\", { className: \"col-xs-12 col-md-4 px-0 pl-1 select-group rooms\" },\r\n React.createElement(BootstrapSelectPicker, { required: true, selectProps: {\r\n className: 'room-count',\r\n }, options: _.range(0, 5), selected: ((_p = hotelGroup.selectedHotelPrices.find(p => p.hotelPrice == hotelPrice)) === null || _p === void 0 ? void 0 : _p.count) || 0, labelSelector: x => x.toString(), valueSelector: x => x, onChange: s => {\r\n const v = typeof s == 'undefined' || typeof s == 'number' ? s || 1 : Number.parseInt(`${s}`);\r\n if (v)\r\n setMustSelectPrice(false);\r\n return setHotel(prev => (Object.assign(Object.assign({}, prev), { selectedHotelPrices: [\r\n ...prev.selectedHotelPrices.filter(p => p.hotelPrice != hotelPrice),\r\n ...(!v ? [] : [{\r\n hotelPrice,\r\n count: v\r\n }])\r\n ] })));\r\n } }),\r\n React.createElement(\"select\", { className: \"selectpicker room-count\", \"data-container\": \"body\", required: true }, _.range(0, 5).map(i => { var _a; return React.createElement(\"option\", { selected: i == (((_a = hotelGroup.selectedHotelPrices.find(p => p.hotelPrice == hotelPrice)) === null || _a === void 0 ? void 0 : _a.count) || 0) }, i); })),\r\n React.createElement(\"div\", { className: \"help-block with-errors\" })))),\r\n React.createElement(\"div\", { className: \"room-prices-col\" },\r\n React.createElement(\"div\", { className: \"row pt-1\" },\r\n React.createElement(\"div\", { className: \"col-xs-6 price-container\" },\r\n React.createElement(\"span\", { className: \"price-title\" }, _T.COMMON_AVGPRICE),\r\n React.createElement(\"span\", { className: \"price\" },\r\n formatMoney(hotelPrice.price / (nights + (hotelGroup.pricePerDay ? 1 : 0))),\r\n \" \",\r\n currency)),\r\n React.createElement(\"div\", { className: \"col-xs-6 price-container total-price\" },\r\n React.createElement(\"span\", { className: \"price-title\" }, _T.COMMON_FULLPRICE),\r\n React.createElement(\"span\", { className: \"price\" },\r\n formatMoney(hotelPrice.price),\r\n \" \",\r\n currency))))) : null)));\r\n }),\r\n ((_c = (_b = hotelGroup === null || hotelGroup === void 0 ? void 0 : hotelGroup.compulsoryServices) === null || _b === void 0 ? void 0 : _b.serviceList) === null || _c === void 0 ? void 0 : _c.length) ? React.createElement(React.Fragment, null,\r\n React.createElement(\"div\", { id: `compulsory-popover-${hotelGroup.hotelId}`, style: { display: 'none' } },\r\n React.createElement(\"div\", { className: \"compulsory-popover-header\" },\r\n React.createElement(\"i\", { className: \"fa fa-exclamation\", \"aria-hidden\": \"true\" }),\r\n React.createElement(\"span\", { className: \"block\" }, _T.HOTEL_COMPULSORY_SERVICE_POPOVER_HEADER),\r\n React.createElement(\"button\", { type: \"button\", className: \"close\" }, \"\\u00D7\")),\r\n React.createElement(\"div\", { className: \"compulsory-popover-body\" },\r\n React.createElement(\"ul\", { className: \"mb-1\" }),\r\n React.createElement(\"p\", { className: \"m-0 p-0\" }, _T.HOTEL_COMPULSORY_SERVICE_POPOVER_FOOTER)),\r\n React.createElement(\"div\", { className: \"compulsory-popover-no-services-header\" },\r\n React.createElement(\"p\", { className: \"m-0 p-0\" }, _T.HOTEL_COMPULSORY_SERVICES_NOT_AVAILABLE)),\r\n React.createElement(\"div\", { className: \"compulsory-popover-no-services-body\" }))) : null);\r\n })))) : null,\r\n ((_f = description.hotelAttributes) === null || _f === void 0 ? void 0 : _f.length) ?\r\n React.createElement(\"div\", { className: \"hotel-panel\", id: \"hotelServicesLink\" },\r\n React.createElement(\"h2\", { className: \"hotel-title\" }, _T.HOTEL_SERVICES),\r\n React.createElement(\"div\", { className: \"hotel-text\" },\r\n React.createElement(\"div\", { className: \"row\" },\r\n React.createElement(\"ul\", { className: \"tree-attributes\" }, [...orderTreeNodes(Object.values(_.groupBy(description.hotelAttributes, x => `${x.id}_${x.parentId}`)).map(x => ({\r\n id: x[0].id,\r\n parentId: x[0].parentId,\r\n name: _.orderBy(x, q => q.languageId == languageId)[0].name,\r\n })).map(x => ({\r\n id: x.id.toString(),\r\n parentId: !x.parentId ? null : x.parentId.toString(),\r\n name: x.name,\r\n node: x,\r\n level: 0,\r\n })))].map(service => React.createElement(\"li\", { className: `l${service.level}` },\r\n service.name,\r\n \" \",\r\n getAttributeProperties(description, Number.parseInt(service.id), 0, 0, languageId, 'ru'))))))) : null)))),\r\n (recentHotels === null || recentHotels === void 0 ? void 0 : recentHotels.length) ?\r\n React.createElement(\"div\", { className: \"col-md-3 sidebar just-seen\" },\r\n React.createElement(\"div\", { className: \"sidebar-title\" },\r\n React.createElement(\"span\", null, _T.HOTEL_RECENTLYVIEWED)),\r\n React.createElement(\"div\", { className: \"sidebar-panel\" }, recentHotels.map(recent => React.createElement(\"a\", { href: recent.searchDetailsUrl },\r\n React.createElement(\"img\", { src: recent.imageUrl, alt: \"\", className: \"img-responsive\" }),\r\n recent.name)))) : null)))),\r\n React.createElement(SearchParam, { open: checkInParamsOpen, onClose: () => setCheckInParamsOpen(false), rq: rq, search: r => {\r\n setCheckInParamsOpen(false);\r\n setRq(r);\r\n } }),\r\n React.createElement(\"div\", { id: \"compulsory-service-choice-modal\", className: \"modal\", tabIndex: -1, role: \"dialog\" },\r\n React.createElement(\"div\", { className: \"modal-dialog\", role: \"document\" },\r\n React.createElement(\"div\", { className: \"modal-content\" },\r\n React.createElement(\"div\", { className: \"modal-header\" },\r\n React.createElement(\"button\", { type: \"button\", className: \"close\", \"data-dismiss\": \"modal\", \"aria-label\": \"Close\" },\r\n React.createElement(\"span\", { \"aria-hidden\": \"true\" }, \"\\u00D7\")),\r\n React.createElement(\"h5\", { className: \"modal-title\" }, _T.HOTEL_CHOOSE_COMPULSORY_SERVICE)),\r\n React.createElement(\"div\", { className: \"modal-body\" },\r\n React.createElement(\"div\", { className: \"service-list-container\" })),\r\n React.createElement(\"div\", { className: \"modal-footer\" },\r\n React.createElement(\"button\", { type: \"button\", className: \"btn btn-orange\", disabled: true }, _T.HOTEL_CHOOSE_COMPULSORY_SERVICE_PROCEED))))),\r\n React.createElement(CartFrame, Object.assign({}, cart, { isOpen: cartOpen, handleClose: handleClose, frameId: props.id, tempId: props.tempId }))));\r\n}\r\nfunction SearchParam(props) {\r\n var _a, _b;\r\n const [tempRq, setTempRq] = useState((_a = props.rq) !== null && _a !== void 0 ? _a : {\r\n checkIn: moment().add(7, 'd').toDate(),\r\n checkOut: moment().add(14, 'd').toDate(),\r\n roomCount: 1,\r\n rooms: [\r\n {\r\n adults: 2,\r\n childs: 0,\r\n childAccommodations: _.range(0, 4).map(() => ({ age: 0, withPlace: true })),\r\n },\r\n ],\r\n });\r\n return React.createElement(Modal, { open: props.open, onClose: props.onClose, className: \"checkin-params-background\" },\r\n React.createElement(\"section\", { className: \"container booking-form\" },\r\n React.createElement(\"div\", { className: \"row\" },\r\n React.createElement(\"form\", { className: \"form-horizontal col-md-offset-3 col-md-6 col-sm-12 col-xs-12 search-details-checkin-params\" },\r\n React.createElement(\"button\", { type: \"button\", className: \"close\", onClick: props.onClose }, \"\\u00D7\"),\r\n React.createElement(\"div\", { className: \"form-group input-daterange\" },\r\n React.createElement(\"label\", { htmlFor: \"checkIn\", className: \"col-md-3 col-xs-12 control-label\" }, _T.COMMON_CHECKINDATE),\r\n React.createElement(\"div\", { className: \"col-md-3 col-xs-6 date-group\" },\r\n React.createElement(\"div\", { className: \"form-group\" },\r\n React.createElement(\"div\", { className: \"input-group date\" },\r\n React.createElement(BootstrapDatePicker, { selected: tempRq.checkIn /*.format(\"L\")*/, required: true, customValidationMessage: _T.CONTROL_FILLTHISFIELD, datepickerOptions: {\r\n autoclose: true,\r\n }, onChange: v => {\r\n setTempRq(prev => (Object.assign(Object.assign({}, prev), { checkIn: v })));\r\n } })),\r\n React.createElement(\"div\", { className: \"help-block with-errors\" }))),\r\n React.createElement(\"label\", { htmlFor: \"checkOut\", className: \"col-md-3 col-xs-12 control-label living-date\" }, _T.COMMON_CHECKOUTDATE),\r\n React.createElement(\"div\", { className: \"col-md-3 col-xs-6 date-group\" },\r\n React.createElement(\"div\", { className: \"form-group\" },\r\n React.createElement(\"div\", { className: \"input-group date\" },\r\n React.createElement(BootstrapDatePicker, { selected: tempRq.checkOut, required: true, customValidationMessage: _T.CONTROL_FILLTHISFIELD, datepickerOptions: {\r\n autoclose: true,\r\n }, onChange: v => {\r\n setTempRq(prev => (Object.assign(Object.assign({}, prev), { checkOut: v })));\r\n } })),\r\n React.createElement(\"div\", { className: \"help-block with-errors\" })))),\r\n React.createElement(\"div\", { className: \"form-group\" },\r\n React.createElement(\"label\", { className: \"col-md-3 col-xs-4 control-label\" }, _T.COMMON_ROOMCOUNT),\r\n React.createElement(\"div\", { className: \"col-md-9 col-xs-6 select-group rooms\" },\r\n React.createElement(BootstrapSelectPicker, { required: true, selectProps: {\r\n id: 'roomCount',\r\n name: 'rmcn',\r\n }, options: _.range(1, 4), selected: tempRq.roomCount, labelSelector: x => x.toString(), valueSelector: x => x, onChange: s => {\r\n const newValue = typeof s == 'undefined' || typeof s == 'number' ? s || 1 : Number.parseInt(`${s}`);\r\n return setTempRq(prev => (Object.assign(Object.assign({}, prev), { roomCount: newValue, rooms: [\r\n ...prev.rooms.slice(0, newValue),\r\n ...(prev.rooms.length >= newValue ? [] : _.range(0, newValue - prev.rooms.length).map(() => ({\r\n adults: 2,\r\n childs: 0,\r\n childAccommodations: _.range(0, 4).map(() => ({ age: 0, withPlace: true })),\r\n })))\r\n ] })));\r\n } }),\r\n React.createElement(\"div\", { className: \"help-block with-errors\" }))), (_b = tempRq.rooms) === null || _b === void 0 ? void 0 :\r\n _b.map((room, roomNo) => (React.createElement(SearchParamRoom, { room: room, roomNo: roomNo, tempRq: tempRq, setTempRq: setTempRq }))),\r\n React.createElement(\"div\", { className: \"form-group\" },\r\n React.createElement(\"div\", { className: \"col-md-12 col-xs-12 text-center\" },\r\n React.createElement(\"button\", { type: \"button\", className: \"btn btn-orange\", onClick: () => {\r\n props.search(tempRq);\r\n } }, _T.COMMON_SEARCH)))))));\r\n}\r\nfunction SearchParamRoom(props) {\r\n const { room, roomNo, setTempRq, tempRq, } = props;\r\n return React.createElement(\"div\", { className: `grey-wrap row room room${roomNo}` },\r\n React.createElement(\"div\", { className: \"col-md-6 col-xs-12 grey-1\" },\r\n React.createElement(\"div\", { className: \"rooms-number col-md-6 col-xs-12\" },\r\n React.createElement(\"span\", null,\r\n React.createElement(\"br\", null),\r\n _T.COMMON_HOTELROOM,\r\n \" \",\r\n roomNo + 1)),\r\n React.createElement(\"div\", { className: \"form-group col-md-3 col-xs-6 select-group\" },\r\n React.createElement(\"label\", { className: \"control-label\" },\r\n React.createElement(\"br\", null),\r\n _T.COMMON_ADULT_COUNT),\r\n React.createElement(BootstrapSelectPicker, { required: true, selectProps: {\r\n id: `rooms${roomNo}adults`,\r\n name: `rm[${roomNo}].adults`,\r\n }, options: _.range(1, 11), selected: (room === null || room === void 0 ? void 0 : room.adults) || 2, labelSelector: x => x.toString(), valueSelector: x => x, onChange: s => setTempRq(prev => (Object.assign(Object.assign({}, prev), { rooms: [\r\n ...prev.rooms.slice(0, roomNo),\r\n Object.assign(Object.assign({}, room), { adults: typeof s == 'undefined' || typeof s == 'number' ? s || 1 : Number.parseInt(`${s}`) }),\r\n ...prev.rooms.slice(roomNo + 1),\r\n ] }))) })),\r\n React.createElement(\"div\", { className: \"form-group col-md-3 col-xs-6 select-group\" },\r\n React.createElement(\"label\", { className: \"control-label\" },\r\n React.createElement(\"br\", null),\r\n _T.COMMON_CHILD_COUNT),\r\n React.createElement(BootstrapSelectPicker, { required: true, selectProps: {\r\n id: `rooms${roomNo}childs`,\r\n name: `rm[${roomNo}].childs`,\r\n className: 'child-count',\r\n }, options: _.range(0, 5), selected: (room === null || room === void 0 ? void 0 : room.childs) || 0, labelSelector: x => x.toString(), valueSelector: x => x, onChange: s => {\r\n const newValue = typeof s == 'undefined' || typeof s == 'number' ? s || 1 : Number.parseInt(`${s}`);\r\n return setTempRq(prev => (Object.assign(Object.assign({}, prev), { rooms: [\r\n ...prev.rooms.slice(0, roomNo),\r\n Object.assign(Object.assign({}, room), { childs: newValue }),\r\n ...prev.rooms.slice(roomNo + 1),\r\n ] })));\r\n } }))),\r\n React.createElement(\"div\", { className: \"col-md-6 col-xs-12 grey-2\" }, _.range(1, 5).map(child => {\r\n var _a;\r\n return (React.createElement(\"div\", { className: `form-group col-md-3 col-xs-6 select-group child child${child}`, style: { display: child > room.childs ? 'none' : undefined } },\r\n React.createElement(\"label\", { className: \"control-label\" },\r\n \" \",\r\n React.createElement(\"span\", { dangerouslySetInnerHTML: { __html: _T.COMMON_CHILD_AGE.replaceAll(\"\\n\", \"
room.childs, selected: ((_a = room === null || room === void 0 ? void 0 : room.childAccommodations[0]) === null || _a === void 0 ? void 0 : _a.age) || 0, labelSelector: x => x.toString(), valueSelector: x => x, onChange: s => setTempRq(prev => (Object.assign(Object.assign({}, prev), { rooms: [\r\n ...prev.rooms.slice(0, roomNo),\r\n Object.assign(Object.assign({}, room), { childAccommodations: [\r\n ...room.childAccommodations.slice(0, child - 1),\r\n {\r\n age: typeof s == 'undefined' || typeof s == 'number' ? s || 1 : Number.parseInt(`${s}`),\r\n withPlace: true,\r\n },\r\n ...room.childAccommodations.slice(child),\r\n ] }),\r\n ...prev.rooms.slice(roomNo + 1),\r\n ] }))) })));\r\n })));\r\n}\r\n","import { AppBar, Button, CircularProgress, FormControl, Grid, makeStyles, Toolbar, Typography, useMediaQuery } from '@material-ui/core';\r\nimport { DateRange, Domain, People } from '@material-ui/icons';\r\nimport LocationOnIcon from '@material-ui/icons/LocationOn';\r\nimport { Autocomplete } from '@material-ui/lab';\r\nimport { sumBy, throttle } from 'lodash';\r\nimport moment from 'moment';\r\nimport React, { useContext, useEffect, useMemo, useRef, useState } from \"react\";\r\nimport { formatString, _T } from '../../../include/appI18n';\r\nimport appSettings from '../../../include/appSettings';\r\nimport { api } from '../../../include/network/network';\r\nimport theme from '../../../include/react-common/theme';\r\nimport { BackdropContext } from '../../../include/react-components/BackdropProvider';\r\nimport { appUrl } from '../../../include/utils';\r\nimport { TpArrowIcon2, TpDateRangePickerField2, TpInput } from '../../NewTourSearch/compoments/tp';\r\nimport { AccommodationSelector, defaultAccommodation } from './AccommodationSelector';\r\nconst useStyles = makeStyles((theme) => ({\r\n icon: {\r\n //color: theme.palette.text.secondary,\r\n marginLeft: theme.spacing(1),\r\n marginRight: theme.spacing(1),\r\n },\r\n}));\r\n// сделать высоту фрейма на 200 больше, а маржин снизу -200зч\r\nexport function HotelSearchWidget(props) {\r\n const classes = useStyles();\r\n const [loading, setLoading] = useState(false);\r\n const [isLoaded, setIsLoaded] = useState(false);\r\n const backdrop = useContext(BackdropContext);\r\n const tpMultiline = useMediaQuery(theme.breakpoints.up(\"sm\"));\r\n const [locations, setLocations] = useState([]);\r\n const [options, setOptions] = React.useState([]);\r\n const [value, setValue] = React.useState(null);\r\n const [inputValue, setInputValue] = React.useState('');\r\n const [toOpen, setToOpen] = useState(false);\r\n const directionRef = useRef(null);\r\n const datesRef = useRef(null);\r\n const accommodationRef = useRef(null);\r\n const [dates, setDates] = React.useState([undefined, undefined]);\r\n //const [dates, setDates] = React.useState<[string | undefined, string | undefined]>([moment().add(1, 'week').format('YYYY-MM-DD'), moment().add(2, 'week').format('YYYY-MM-DD')]);\r\n const datesError = useMemo(() => (!dates[0] || !moment(dates[0]).isValid() || !dates[1] || !moment(dates[1]).isValid()), [...dates]);\r\n const [error, setError] = useState(null);\r\n const [rooms, setRooms] = useState([Object.assign({}, defaultAccommodation)]);\r\n //useLayoutEffect(() => {\r\n // if (loading)\r\n // backdrop.show();\r\n // else\r\n // backdrop.hide();\r\n //}, [loading, backdrop]);\r\n const searchUrl = useMemo(() => {\r\n if (!value || !rooms.length || !sumBy(rooms, r => r.adults + r.childAccommodations.length) || datesError)\r\n return undefined;\r\n return appUrl('/Hotel/SearchResult', {\r\n CnId: value.type === 'hotel' ? value.grandParentId : (value === null || value === void 0 ? void 0 : value.type) === 'city' ? value.parentId : 0,\r\n CtId: value.type === 'hotel' ? value.parentId : (value === null || value === void 0 ? void 0 : value.type) === 'city' ? value.id : 0,\r\n CIn: dates[0],\r\n COut: dates[1],\r\n RmCn: rooms.length,\r\n Rm: rooms.map(r => ({\r\n adults: r.adults,\r\n childs: r.childAccommodations.length,\r\n ages: r.childAccommodations.map(a => a.age),\r\n })),\r\n HCt: props.hotelCategoryId || null,\r\n Htl: value.type === 'hotel' ? value.id : null,\r\n });\r\n }, [value, ...dates, datesError, rooms]);\r\n const fetch = useMemo(() => throttle((request, callback) => {\r\n setLoading(true);\r\n api('get', `/frame/${props.id}/hotel-search-widget/locations`, request)\r\n .then(r => {\r\n callback(r);\r\n setLoading(false);\r\n });\r\n }, 200), [props.id]);\r\n useEffect(() => {\r\n if (loading)\r\n return;\r\n fetch({ input: '', tempId: props.tempId }, (results) => {\r\n if (results === null || results === void 0 ? void 0 : results.response) {\r\n setLocations(results.response || []);\r\n setOptions(results.response || []);\r\n setIsLoaded(true);\r\n }\r\n });\r\n }, []);\r\n useEffect(() => {\r\n if (!isLoaded)\r\n return;\r\n let active = true;\r\n if (inputValue === '') {\r\n setOptions(locations);\r\n return undefined;\r\n }\r\n fetch({ input: inputValue, tempId: props.tempId }, (results) => {\r\n if (active) {\r\n let newOptions = [];\r\n //if (value) {\r\n // newOptions = [value];\r\n //}\r\n if (results === null || results === void 0 ? void 0 : results.response) {\r\n newOptions = [...newOptions, ...results.response];\r\n }\r\n setOptions(newOptions);\r\n }\r\n });\r\n return () => {\r\n active = false;\r\n };\r\n }, [isLoaded, value, inputValue, fetch]);\r\n return (React.createElement(AppBar, { position: \"static\", color: \"secondary\", style: { borderRadius: '5px' } },\r\n React.createElement(Toolbar, { variant: \"dense\", style: { padding: '4px' } },\r\n React.createElement(Grid, { container: true },\r\n React.createElement(Grid, { item: true, xs: 12, md: 5, className: \"input-autocomplete--grid-root-widget\" },\r\n React.createElement(Autocomplete, { clearText: _T.AUTOCOMPLETE_CLEAR, closeText: _T.AUTOCOMPLETE_CLOSE, getLimitTagsText: (num) => formatString(_T.AUTOCOMPLETE_LIMIT_TAGS, [num]), loadingText: _T.AUTOCOMPLETE_LOADING, noOptionsText: _T.AUTOCOMPLETE_NO_OPTIONS, openText: _T.AUTOCOMPLETE_OPEN, ref: directionRef, className: error == directionRef.current ? 'widget-field-error' : undefined, classes: { root: 'h-100' }, id: \"hotel-or-city\", getOptionSelected: (option, value) => option.id === value.id && option.type === value.type, getOptionLabel: (option) => option.fullName, options: options, filterOptions: (x) => x, autoComplete: true, includeInputInList: true, value: value, loading: loading, disablePortal: true, open: toOpen, onOpen: _ => setToOpen(true), onClose: _ => setToOpen(false), onChange: (event, newValue) => {\r\n setOptions(newValue ? [newValue, ...options] : options);\r\n setValue(newValue);\r\n setError(null);\r\n }, onInputChange: (event, newInputValue) => {\r\n setInputValue(newInputValue);\r\n }, renderInput: (params) => (React.createElement(FormControl, Object.assign({}, params, { classes: { root: 'formControl-borderless-root' }, variant: \"outlined\", className: \"h-100\" }),\r\n React.createElement(TpInput, Object.assign({ classes: { root: 'tp-input-root input-borderless-root', input: 'input-px-small' }, placeholder: toOpen ? `${_T.COMMON_CITY}, ${_T.COMMON_HOTEL}` : _T.COMMON_TO_WHERE }, params.InputProps, { inputProps: params.inputProps, endAdornment: (React.createElement(React.Fragment, null,\r\n loading ? React.createElement(CircularProgress, { color: \"inherit\", size: 20 }) : null,\r\n params.InputProps.endAdornment)) })))), renderOption: options == locations ? (option) => (React.createElement(\"span\", null, option.name)) : (option) => (React.createElement(Grid, { container: true, alignItems: \"center\" },\r\n React.createElement(Grid, { item: true }, option.type == 'hotel'\r\n ? React.createElement(Domain, { className: `MuiSvgIcon-root MuiSvgIcon-root-widget ${classes.icon}`, color: \"secondary\" })\r\n : React.createElement(LocationOnIcon, { className: `MuiSvgIcon-root MuiSvgIcon-root-widget ${classes.icon}`, color: \"secondary\" })),\r\n React.createElement(Grid, { item: true, xs: true },\r\n React.createElement(\"span\", { style: { fontWeight: 700 } }, option.fullName),\r\n React.createElement(Typography, { variant: \"body2\", color: \"textSecondary\" },\r\n option.type == 'hotel' ? _T.COMMON_HOTEL : option.type == 'city' ? _T.COMMON_CITY : '',\r\n option.type == 'hotel' ? ` ${option.parentName}${option.grandParentName ? `, ${option.grandParentName}` : ''}` : '')))) })),\r\n React.createElement(Grid, { item: true, xs: 6, md: 3 },\r\n React.createElement(TpDateRangePickerField2, { dropdownDelay: true, hideLabelWhenNotSelected: true, ref: datesRef, className: error == datesRef.current ? ' widget-field-error' : '', formControlClasses: { root: 'formControl-borderless-root' }, inputClasses: { root: `tp-input-root input-borderless-root`, input: 'input-px-small' }, placeholder: _T.COMMON_CHECKIN_CHECKOUT_DATES, dates: dates, variant: \"outlined\", onChange: (d) => {\r\n var _a, _b;\r\n setDates([(_a = d[0]) === null || _a === void 0 ? void 0 : _a.format('YYYY-MM-DD'), (_b = d[1]) === null || _b === void 0 ? void 0 : _b.format('YYYY-MM-DD')]);\r\n setError(null);\r\n }, validDates: undefined, dateLimit: 365, dateLimitAlertText: formatString(_T.NEW_TOUR_SEARCH_MAX_DATES_WARNING, [365]), error: datesError, numberOfMonths: tpMultiline ? 2 : 1, startAdornment: React.createElement(DateRange, { className: `MuiSvgIcon-root MuiSvgIcon-root-widget ${classes.icon}`, color: \"secondary\" }), endAdornment: React.createElement(TpArrowIcon2, { className: \"MuiSvgIcon-root\" }) })),\r\n React.createElement(Grid, { item: true, xs: 6, md: 3 },\r\n React.createElement(AccommodationSelector, { dropdownDelay: true, boxProps: undefined, disabled: false, error: false, ref: accommodationRef, formControlClasses: { root: 'formControl-borderless-root' }, inputClasses: { root: `tp-input-root input-borderless-root${(error == accommodationRef.current ? ' widget-field-error' : '')}`, input: 'input-px-small' }, itemGroupLabelFormat: `${_T.COMMON_HOTELROOM} {0}`, itemsCountInputLabel: _T.COMMON_HOTELROOMS_COUNT, startAdornment: React.createElement(People, { className: `MuiSvgIcon-root MuiSvgIcon-root-widget ${classes.icon}`, color: \"secondary\" }), label: '', minAdults: 1, minChilds: 0, maxAdults: props.maxAdults, maxChilds: props.maxChilds, maxItems: 3, multiply: true, maxChildAge: appSettings().childMaxAge, onChange: newValue => {\r\n setRooms(Array.isArray(newValue) ? newValue : [newValue]);\r\n setError(null);\r\n }, value: rooms, required: true })),\r\n React.createElement(Grid, { item: true, xs: 12, md: 1 },\r\n React.createElement(Button, { fullWidth: true, style: { textTransform: 'uppercase', color: '#fff', height: '38px', marginLeft: '0.5px', marginRight: '0.5px', marginTop: '0.5px', marginBottom: '0.5px', borderRadius: '0' }, disabled: false && !searchUrl, onClick: _ => {\r\n if (searchUrl)\r\n window.open(searchUrl, '_parent');\r\n else {\r\n if (!value)\r\n setError(/*'Выберите направление'*/ directionRef.current);\r\n else if (datesError)\r\n setError(/*'Выберите даты'*/ datesRef.current);\r\n else if (!rooms.length || !sumBy(rooms, r => r.adults + r.childAccommodations.length))\r\n setError(/*'Укажите туристов'*/ accommodationRef.current);\r\n }\r\n }, variant: \"contained\", color: \"primary\" }, _T.COMMON_SEARCH_VERB))))));\r\n}\r\n","import { createContainer } from 'react-sweet-state';\r\nimport { TourDescriptionStoreDefault, TourDescriptionStoreFrame } from './TourDescriptionStore';\r\nlet g_desription_store_hydrated = false;\r\nconst CreateTourDescriptionContainer = (store) => createContainer(store, {\r\n onInit: () => ({ getState, setState, dispatch }, { initialState: init }) => {\r\n var _a, _b, _c, _d, _e, _f;\r\n if (init)\r\n setState({ flightConfiguration: init.flightConfiguration });\r\n if (init && init.type == 'description-state' && init.description && !g_desription_store_hydrated) {\r\n g_desription_store_hydrated = true;\r\n // FIXME: duplicating loadDescription.\r\n const hotelServices = init.description.tourServices.filter((x) => x.type == 'hotel');\r\n if (hotelServices.length == 0) {\r\n setState({ currentAccommodationVariants: [], hasAccommodation: false, });\r\n }\r\n else {\r\n setState({\r\n currentAccommodationVariants: hotelServices.map(hotel => ({\r\n accommodation: hotel.accommodation,\r\n hotelDescription: hotel.hotelDescription,\r\n externalHotelPrice: hotel.externalHotelPrice\r\n })),\r\n hasAccommodation: true,\r\n });\r\n }\r\n //if (hotelServices.length == 1) {\r\n // const hotel = hotelServices[0];\r\n // const accommodation = hotel.accommodation || undefined;\r\n // setState({\r\n // currentAccommodationVariant: {\r\n // accommodation,\r\n // hotelDescription: hotel.hotelDescription,\r\n // },\r\n // hasAccommodation: true\r\n // });\r\n //} else if (hotelServices.length == 0) {\r\n // setState({ currentAccommodationVariant: undefined, hasAccommodation: false });\r\n //} else if (hotelServices.length > 1) {\r\n // setState({ currentAccommodationVariant: undefined, hasAccommodation: true });\r\n // //throw new Error('Unexpected number of hotel services');\r\n //}\r\n const { viewConfig } = getState();\r\n setState({\r\n loaded: true,\r\n loading: false,\r\n tourDescription: init.description.tourDescription,\r\n price: init.description.priceItem,\r\n hash: (_a = init.description.priceItem) === null || _a === void 0 ? void 0 : _a.servicesHash,\r\n externalFlightId: ((_c = (_b = init.description.priceItem) === null || _b === void 0 ? void 0 : _b.aviacenterServices) === null || _c === void 0 ? void 0 : _c.length) ? init.description.priceItem.aviacenterServices[0].externalId : undefined,\r\n externalFlightProviderId: ((_e = (_d = init.description.priceItem) === null || _d === void 0 ? void 0 : _d.aviacenterServices) === null || _e === void 0 ? void 0 : _e.length) ? init.description.priceItem.aviacenterServices[0].externalProviderId : undefined,\r\n tourEvents: init.description.tourEvents,\r\n tourServices: init.description.tourServices,\r\n tourVariant: init.description.tourVariant || undefined,\r\n viewConfig: Object.assign(Object.assign({}, viewConfig), { hidePrices: init.hidePrices || false }),\r\n extras: (_f = init.description.extras) !== null && _f !== void 0 ? _f : {},\r\n search: init.description.search,\r\n });\r\n const { tourServices, tourVariant, tourDescription, currentAccommodationVariants } = getState();\r\n if (tourVariant && tourVariant.checkInDate && tourDescription)\r\n //setState({ loading: true });\r\n for (const excursion of tourServices.filter(s => s.type == \"excursion\").map(s => s)) {\r\n setState({\r\n tourServices: [...tourServices].map(service => {\r\n var _a, _b, _c, _d, _e, _f, _g;\r\n if (service.type == \"excursion\" && service.id == excursion.id) {\r\n const exc = service;\r\n if (exc) {\r\n exc.prices = excursion.prices;\r\n const vehicleTypeId = (_b = (_a = excursion.prices) === null || _a === void 0 ? void 0 : _a.find((x) => x)) === null || _b === void 0 ? void 0 : _b.vehicleTypeId;\r\n if ((_c = exc.prices) === null || _c === void 0 ? void 0 : _c.length) {\r\n if (!((_d = exc.prices) === null || _d === void 0 ? void 0 : _d.find((e) => exc.currentVehicleTypeId == e.vehicleTypeId)) || exc.currentVehicleTypeId == undefined) {\r\n exc.currentVehicleTypeId = (_f = (_e = exc.prices[0]) === null || _e === void 0 ? void 0 : _e.vehicleTypeId) !== null && _f !== void 0 ? _f : vehicleTypeId;\r\n exc.excursionPrice = exc.prices ? exc.prices[0] : undefined;\r\n }\r\n else\r\n exc.excursionPrice = (_g = exc.prices) === null || _g === void 0 ? void 0 : _g.find((x) => x.vehicleTypeId == exc.currentVehicleTypeId);\r\n }\r\n }\r\n }\r\n return service;\r\n })\r\n });\r\n }\r\n }\r\n },\r\n});\r\n/**\r\n * Контейнер выполняющий функцию регидратации хранилища с описанием тура.\r\n */\r\nconst Container = CreateTourDescriptionContainer(TourDescriptionStoreDefault);\r\nconst FrameContainer = CreateTourDescriptionContainer(TourDescriptionStoreFrame);\r\nexport { Container as TourDescriptionStoreContainer, FrameContainer as TourDescriptionStoreFrameContainer };\r\n","import React, { useMemo, useState } from 'react';\r\nimport { useHistory, useLocation } from 'react-router-dom';\r\nimport { TourDescriptionContainer } from '../../TourSearch/components/TourDescription';\r\nimport { TourDescriptionStoreFrameContainer } from '../../TourSearch/store/TourDescriptionStoreContainer';\r\nimport { _ParentFrame } from '../types/Frame';\r\nimport CartFrame from './CartFrame';\r\nexport default function TourFrame(props) {\r\n const [cartOpen, setCartOpen] = useState(false);\r\n const cart = useMemo(() => JSON.parse(sessionStorage.getItem('frame-cart') || '{ \"services\": [] }'), [cartOpen]);\r\n const history = useHistory();\r\n const { pathname, search, state: historyState } = useLocation();\r\n const handleClose = () => {\r\n setCartOpen(false);\r\n const sp = new URLSearchParams(search);\r\n sp.delete('cartOpen');\r\n history.replace({\r\n pathname: pathname,\r\n search: sp.toString(),\r\n state: historyState,\r\n });\r\n sessionStorage.setItem('frame-cart', '{ \"services\": [] }');\r\n };\r\n return (React.createElement(\"div\", null,\r\n React.createElement(TourDescriptionStoreFrameContainer, { initialState: { flightConfiguration: props.flightConfiguration } },\r\n React.createElement(TourDescriptionContainer, { style: { display: cartOpen ? 'none' : 'unset' }, isFrame: true, bookCallback: () => {\r\n setCartOpen(true);\r\n const sp = new URLSearchParams(search);\r\n sp.set('cartOpen', 'true');\r\n history.replace({\r\n pathname: pathname,\r\n search: sp.toString(),\r\n state: historyState,\r\n });\r\n const parentFrame = _ParentFrame();\r\n parentFrame.sendMessage({ message: 'scroll', top: 0, behavior: 'smooth' });\r\n }, hash: undefined })),\r\n React.createElement(CartFrame, Object.assign({}, cart, { isOpen: cartOpen, handleClose: handleClose, frameId: props.id, tempId: props.tempId }))));\r\n}\r\n","import { AppBar, Button, CircularProgress, FormControl, Grid, makeStyles, Toolbar, Typography, useMediaQuery } from '@material-ui/core';\r\nimport { DateRange, Domain, HourglassEmpty, Map, People } from '@material-ui/icons';\r\nimport LocationOnIcon from '@material-ui/icons/LocationOn';\r\nimport { Autocomplete } from '@material-ui/lab';\r\nimport _, { range, throttle } from 'lodash';\r\nimport moment from 'moment';\r\nimport React, { useContext, useEffect, useMemo, useRef, useState } from \"react\";\r\nimport { formatString, _T } from '../../../include/appI18n';\r\nimport appSettings from '../../../include/appSettings';\r\nimport { api } from '../../../include/network/network';\r\nimport theme from '../../../include/react-common/theme';\r\nimport { BackdropContext } from '../../../include/react-components/BackdropProvider';\r\nimport { appUrl, pluralizeAutoSplit } from '../../../include/utils';\r\nimport { TpArrowIcon2, TpDateRangePickerField2, TpInput, TpSelect } from '../../NewTourSearch/compoments/tp';\r\nimport { AccommodationSelector, defaultAccommodation } from './AccommodationSelector';\r\nconst useStyles = makeStyles((theme) => ({\r\n icon: {\r\n //color: theme.palette.text.secondary,\r\n marginLeft: theme.spacing(1),\r\n marginRight: theme.spacing(1),\r\n },\r\n}));\r\nexport function TourSearchWidget(props) {\r\n const classes = useStyles();\r\n const [loading, setLoading] = useState(false);\r\n const [isLoaded, setIsLoaded] = useState(false);\r\n const backdrop = useContext(BackdropContext);\r\n const tpMultiline = useMediaQuery(theme.breakpoints.up(\"sm\"));\r\n const [locations, setLocations] = useState([]);\r\n const [options, setOptions] = React.useState([]);\r\n const [value, setValue] = React.useState(null);\r\n const [inputValue, setInputValue] = React.useState('');\r\n const [toOpen, setToOpen] = useState(false);\r\n const directionRef = useRef(null);\r\n const datesRef = useRef(null);\r\n const durationsRef = useRef(null);\r\n const accommodationRef = useRef(null);\r\n const [datesOpt, setDatesOpt] = useState([]);\r\n const validDates = useMemo(() => (datesOpt === null || datesOpt === void 0 ? void 0 : datesOpt.length) ? datesOpt : undefined, [datesOpt]);\r\n const [nightOpt, setNightOpt] = useState([]);\r\n const validNights = useMemo(() => (nightOpt === null || nightOpt === void 0 ? void 0 : nightOpt.length) ? nightOpt : range(1, 31), [nightOpt]);\r\n const [dates, setDates] = React.useState([undefined, undefined]);\r\n //const [dates, setDates] = React.useState<[string | undefined, string | undefined]>([moment().add(1, 'week').format('YYYY-MM-DD'), moment().add(2, 'week').format('YYYY-MM-DD')]);\r\n const datesError = useMemo(() => (!dates[0] || !moment(dates[0]).isValid() || !dates[1] || !moment(dates[1]).isValid()), [...dates]);\r\n const [error, setError] = useState(null);\r\n const [durations, setDurations] = useState([]);\r\n const [accommodation, setAccommodation] = useState(Object.assign({}, defaultAccommodation));\r\n //useLayoutEffect(() => {\r\n // if (loading)\r\n // backdrop.show();\r\n // else\r\n // backdrop.hide();\r\n //}, [loading, backdrop]);\r\n const fetchDatesAndDurations = useMemo(() => throttle((request, callback) => {\r\n setLoading(true);\r\n api('get', `/frame/${props.id}/tour-search-widget/dates-and-durations`, request)\r\n .then(r => {\r\n callback(r);\r\n setLoading(false);\r\n });\r\n }, 200), [props.id]);\r\n useEffect(() => {\r\n if (!value) {\r\n setDatesOpt([]);\r\n setNightOpt([]);\r\n return;\r\n }\r\n fetchDatesAndDurations({ locationId: value.id, locationType: value.type }, (results) => {\r\n if (results === null || results === void 0 ? void 0 : results.response) {\r\n let datesOptTemp = results.response.dates.map(x => moment(x).format('YYYY-MM-DD'));\r\n setDatesOpt(datesOptTemp);\r\n setNightOpt(results.response.durations);\r\n }\r\n });\r\n }, [value]);\r\n const searchUrl = useMemo(() => {\r\n if (!value || !accommodation || !(accommodation.adults + accommodation.childAccommodations.length) || datesError)\r\n return undefined;\r\n return appSettings().useOldSearchUI\r\n ? appUrl('/Tour/SearchResult', {\r\n CoId: value.type === 'hotel' ? value.grandParentId : (value === null || value === void 0 ? void 0 : value.type) === 'city' || (value === null || value === void 0 ? void 0 : value.type) === 'tour' ? value.parentId : value.id,\r\n CtId: value.type === 'hotel' ? [value.parentId] : (value === null || value === void 0 ? void 0 : value.type) === 'city' ? [value.id] : null,\r\n TrId: (value === null || value === void 0 ? void 0 : value.type) === 'tour' ? [value.id] : null,\r\n CiMin: dates[0],\r\n CiMax: dates[1],\r\n Dmin: durations.length > 0 ? durations[0] : 1,\r\n Dmax: durations.length > 0 ? durations[durations.length - 1] : 28,\r\n page: 0,\r\n AdC: accommodation.adults,\r\n ChC: accommodation.childAccommodations.length,\r\n CAg: accommodation.childAccommodations.map(a => a.age),\r\n hotelTo: value.type === 'hotel' ? [value.id] : null,\r\n })\r\n : appUrl('/Tour', {\r\n countryTo: value.type === 'hotel' ? value.grandParentId : (value === null || value === void 0 ? void 0 : value.type) === 'city' || (value === null || value === void 0 ? void 0 : value.type) === 'tour' ? value.parentId : value.id,\r\n cityTo: value.type === 'hotel' ? [value.parentId] : (value === null || value === void 0 ? void 0 : value.type) === 'city' ? [value.id] : null,\r\n tourTo: (value === null || value === void 0 ? void 0 : value.type) === 'tour' ? [value.id] : null,\r\n dateFrom: dates[0],\r\n dateTo: dates[1],\r\n nightTo: durations,\r\n pageIndex: 0,\r\n adultCount: accommodation.adults,\r\n childCount: accommodation.childAccommodations.length,\r\n childAge: accommodation.childAccommodations.map(a => a.age),\r\n hotelTo: value.type === 'hotel' ? [value.id] : null,\r\n });\r\n }, [value, ...dates, datesError, accommodation, appSettings]);\r\n const fetch = useMemo(() => throttle((request, callback) => {\r\n setLoading(true);\r\n api('get', `/frame/${props.id}/tour-search-widget/locations`, request)\r\n .then(r => {\r\n callback(r);\r\n setLoading(false);\r\n });\r\n }, 200), [props.id]);\r\n useEffect(() => {\r\n if (loading)\r\n return;\r\n fetch({ input: '', tempId: props.tempId }, (results) => {\r\n if (results === null || results === void 0 ? void 0 : results.response) {\r\n setLocations(results.response || []);\r\n setOptions(results.response || []);\r\n setIsLoaded(true);\r\n }\r\n });\r\n }, []);\r\n useEffect(() => {\r\n if (!isLoaded)\r\n return;\r\n let active = true;\r\n if (inputValue === '') {\r\n setOptions(locations);\r\n return undefined;\r\n }\r\n fetch({ input: inputValue, tempId: props.tempId }, (results) => {\r\n if (active) {\r\n let newOptions = [];\r\n //if (value) {\r\n // newOptions = [value];\r\n //}\r\n if (results === null || results === void 0 ? void 0 : results.response) {\r\n newOptions = [...newOptions, ...results.response];\r\n }\r\n setOptions(newOptions);\r\n }\r\n });\r\n return () => {\r\n active = false;\r\n };\r\n }, [isLoaded, value, inputValue, fetch]);\r\n return (React.createElement(AppBar, { position: \"static\", color: \"secondary\", style: { borderRadius: '5px' } },\r\n React.createElement(Toolbar, { variant: \"dense\", style: { padding: '4px' } },\r\n React.createElement(Grid, { container: true },\r\n React.createElement(Grid, { item: true, xs: 12, md: 4, className: \"input-autocomplete--grid-root-widget\" },\r\n React.createElement(Autocomplete, { clearText: _T.AUTOCOMPLETE_CLEAR, closeText: _T.AUTOCOMPLETE_CLOSE, getLimitTagsText: (num) => formatString(_T.AUTOCOMPLETE_LIMIT_TAGS, [num]), loadingText: _T.AUTOCOMPLETE_LOADING, noOptionsText: _T.AUTOCOMPLETE_NO_OPTIONS, openText: _T.AUTOCOMPLETE_OPEN, ref: directionRef, className: error == directionRef.current ? 'widget-field-error' : undefined, classes: { root: 'h-100' }, id: \"hotel-or-city-or-tour\", getOptionSelected: (option, value) => option.id === value.id && option.type === value.type, getOptionLabel: (option) => option.fullName, options: options, filterOptions: (x) => x, autoComplete: true, includeInputInList: true, value: value, loading: loading, disablePortal: true, open: toOpen, onOpen: _ => setToOpen(true), onClose: _ => setToOpen(false), onChange: (event, newValue) => {\r\n setOptions(newValue ? [newValue, ...options] : options);\r\n setValue(newValue);\r\n setError(null);\r\n }, onInputChange: (event, newInputValue) => {\r\n setInputValue(newInputValue);\r\n }, renderInput: (params) => (React.createElement(FormControl, Object.assign({}, params, { classes: { root: 'formControl-borderless-root' }, variant: \"outlined\", className: \"h-100\" }),\r\n React.createElement(TpInput, Object.assign({ classes: { root: 'tp-input-root input-borderless-root ', input: 'input-px-small' }, placeholder: toOpen ? `${_T.COMMON_CITY}, ${_T.COMMON_HOTEL}, ${_T.COMMON_TOUR}` : _T.COMMON_TO_WHERE }, params.InputProps, { inputProps: params.inputProps, endAdornment: (React.createElement(React.Fragment, null,\r\n loading ? React.createElement(CircularProgress, { color: \"inherit\", size: 20 }) : null,\r\n params.InputProps.endAdornment)) })))), renderOption: options == locations ? (option) => (React.createElement(\"span\", null, option.name)) : (option) => (React.createElement(Grid, { container: true, alignItems: \"center\" },\r\n React.createElement(Grid, { item: true }, option.type == 'hotel'\r\n ? React.createElement(Domain, { className: `MuiSvgIcon-root MuiSvgIcon-root-widget ${classes.icon}`, color: \"secondary\" })\r\n : option.type == 'tour'\r\n ? React.createElement(Map, { className: `MuiSvgIcon-root MuiSvgIcon-root-widget ${classes.icon}`, color: \"secondary\" })\r\n : React.createElement(LocationOnIcon, { className: `MuiSvgIcon-root MuiSvgIcon-root-widget ${classes.icon}`, color: \"secondary\" })),\r\n React.createElement(Grid, { item: true, xs: true },\r\n React.createElement(\"span\", { style: { fontWeight: 700 } }, option.fullName),\r\n React.createElement(Typography, { variant: \"body2\", color: \"textSecondary\" }, option.type == 'hotel' ? _T.COMMON_HOTEL : option.type == 'city' ? _T.COMMON_CITY : option.type == 'tour' ? _T.COMMON_TOUR : option.type == 'country' ? _T.COMMON_COUNTRY : '')))) })),\r\n React.createElement(Grid, { item: true, xs: 6, sm: 4, md: 2 },\r\n React.createElement(TpDateRangePickerField2, { dropdownDelay: true, ref: datesRef, className: error == datesRef.current ? ' widget-field-error' : '', formControlClasses: { root: 'formControl-borderless-root' }, inputClasses: { root: `tp-input-root input-borderless-root`, input: 'input-px-small' }, hideLabelWhenNotSelected: true, placeholder: _T.COMMON_CHECKIN_DATES, dates: dates, variant: \"outlined\", onClick: () => {\r\n if (!value)\r\n setError(directionRef.current);\r\n return !!value;\r\n }, onChange: (d) => {\r\n var _a, _b;\r\n setDates([(_a = d[0]) === null || _a === void 0 ? void 0 : _a.format('YYYY-MM-DD'), (_b = d[1]) === null || _b === void 0 ? void 0 : _b.format('YYYY-MM-DD')]);\r\n setError(null);\r\n }, validDates: validDates, dateLimit: 365, dateLimitAlertText: formatString(_T.NEW_TOUR_SEARCH_MAX_DATES_WARNING, [365]), error: datesError, numberOfMonths: tpMultiline ? 2 : 1, startAdornment: React.createElement(DateRange, { className: `MuiSvgIcon-root MuiSvgIcon-root-widget ${classes.icon}`, color: \"secondary\" }), endAdornment: React.createElement(TpArrowIcon2, { className: \"MuiSvgIcon-root\" }) })),\r\n React.createElement(Grid, { item: true, xs: 6, sm: 4, md: 2 },\r\n React.createElement(TpSelect, { dropdownDelay: true, multiselect: true, selected: durations, onClick: () => {\r\n if (!value)\r\n setError(directionRef.current);\r\n return !!value;\r\n }, onChange: newValues => {\r\n setDurations(newValues.map(v => typeof v === 'number' ? v : Number.parseInt(v)));\r\n setError(null);\r\n }, options: validNights, valueSelector: v => v, textSelector: v => `${v} ${pluralizeAutoSplit(v, _T.COMMON_NIGHTS_PLURAL)}`, ref: durationsRef, formControlClasses: { root: 'formControl-borderless-root' }, inputClasses: { root: `tp-input-root input-borderless-root`, input: 'input-px-small' }, placeholder: _T.COMMON_DURATION, startAdornment: React.createElement(HourglassEmpty, { className: `MuiSvgIcon-root MuiSvgIcon-root-widget ${classes.icon}`, color: \"secondary\" }), endAdornment: React.createElement(TpArrowIcon2, { className: \"MuiSvgIcon-root\" }), valueLabelFormat: selected => !selected.length ? '' : `${_.sortBy(selected, x => x).join(', ')} ${_T.COMMON_NIGHTS_PLURAL.split(',')[2]}` })),\r\n React.createElement(Grid, { item: true, xs: 12, sm: 4, md: 3 },\r\n React.createElement(AccommodationSelector, { dropdownDelay: true, ref: accommodationRef, formControlClasses: { root: 'formControl-borderless-root' }, inputClasses: { root: `tp-input-root input-borderless-root${(error == accommodationRef.current ? ' widget-field-error' : '')}`, input: 'input-px-small' }, boxProps: undefined, disabled: false, error: false, startAdornment: React.createElement(People, { className: `MuiSvgIcon-root MuiSvgIcon-root-widget ${classes.icon}`, color: \"secondary\" }), itemGroupLabelFormat: `${_T.COMMON_HOTELROOM} {0}`, itemsCountInputLabel: _T.COMMON_HOTELROOMS_COUNT, label: '', minAdults: 1, minChilds: 0, maxAdults: props.maxAdults, maxChilds: props.maxChilds, maxChildAge: appSettings().childMaxAge, onChange: newValue => {\r\n setAccommodation(Array.isArray(newValue) ? newValue[0] : newValue);\r\n setError(null);\r\n }, value: accommodation, required: true })),\r\n React.createElement(Grid, { item: true, xs: 12, md: 1 },\r\n React.createElement(Button, { fullWidth: true, style: { textTransform: 'uppercase', color: '#fff', height: '38px', marginLeft: '0.5px', marginRight: '0.5px', marginTop: '0.5px', marginBottom: '0.5px', borderRadius: '0' }, disabled: false && !searchUrl, onClick: _ => {\r\n if (searchUrl)\r\n window.open(searchUrl, '_parent');\r\n else {\r\n if (!value)\r\n setError(/*'Выберите направление'*/ directionRef.current);\r\n else if (datesError)\r\n setError(/*'Выберите даты'*/ datesRef.current);\r\n //else if (durations)\r\n // setError(/*'Выберите даты'*/datesRef.current);\r\n else if (!(accommodation.adults + accommodation.childAccommodations.length))\r\n setError(/*'Укажите туристов'*/ accommodationRef.current);\r\n }\r\n }, variant: \"contained\", color: \"primary\" }, _T.COMMON_SEARCH_VERB))))));\r\n}\r\n","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nimport MomentUtils from '@date-io/moment';\r\nimport { Container, ThemeProvider } from '@material-ui/core';\r\nimport { MuiPickersUtilsProvider } from '@material-ui/pickers';\r\n//import $ from 'jquery.js';\r\n//import 'bootstrap-notify';\r\nimport React, { useEffect, useState } from 'react';\r\nimport Theme from 'react-common/theme';\r\nimport { BrowserRouter as Router, Route, Switch } from 'react-router-dom';\r\nimport { api } from '../../../include/network/network';\r\nimport { BackdropProvider } from '../../../include/react-components/BackdropProvider';\r\nimport ErrorBoundary from '../../../include/react-components/ErrorBoundary';\r\nimport { GlobalSpinnerProvider } from '../../../include/react-components/GlobalSpinnerProvider';\r\nimport { appUrl } from '../../../include/utils';\r\nimport AsyncSpinner from '../../TourSearch/components/TourDescription/AsyncSpinner';\r\nimport { CurrencySelector } from './CurrencySelector';\r\nimport ExcursionFrame from './ExcursionFrame';\r\nimport { ExcursionSearchWidget } from './ExcursionSearchWidget';\r\nimport { ExtraFrame } from './ExtraFrame';\r\nimport HotelFrame from './HotelFrame';\r\nimport { HotelSearchWidget } from './HotelSearchWidget';\r\nimport TourFrame from './TourFrame';\r\nimport { TourSearchWidget } from './TourSearchWidget';\r\nexport function FrameEmbeddedContainer(props) {\r\n return (React.createElement(BackdropProvider, { isFrame: true },\r\n React.createElement(GlobalSpinnerProvider, null,\r\n React.createElement(ErrorBoundary, null,\r\n React.createElement(ThemeProvider, { theme: Theme },\r\n React.createElement(MuiPickersUtilsProvider, { utils: MomentUtils },\r\n React.createElement(Router, null,\r\n React.createElement(FrameEmbedded, Object.assign({}, props)))))))));\r\n}\r\nexport function FrameEmbedded({ id, tempId, hash, currencySwitchEnabled }) {\r\n const [frameInfo, setFrameInfo] = useState();\r\n //const [dialogOpen, setDialogOpen] = useState(false);\r\n useEffect(() => {\r\n (() => __awaiter(this, void 0, void 0, function* () {\r\n const r = yield api('get', `/frame/${id}/data`, { tempId });\r\n setFrameInfo(r.response);\r\n //setDialogOpen(true);\r\n }))();\r\n }, []);\r\n return (React.createElement(Container, null, frameInfo\r\n ?\r\n React.createElement(React.Fragment, null,\r\n currencySwitchEnabled && ['Tour', 'Hotel', 'Excursion', 'Extra'].includes(frameInfo === null || frameInfo === void 0 ? void 0 : frameInfo.type) ?\r\n React.createElement(CurrencySelector, { style: {\r\n position: 'absolute',\r\n top: '20px',\r\n right: '30px',\r\n zIndex: 10000,\r\n maxHeight: '48px',\r\n } }) : null,\r\n React.createElement(Switch, null,\r\n React.createElement(Route, { path: appUrl(`/frame/:frameId/excursion/:id`) },\r\n React.createElement(ExcursionFrame, Object.assign({}, frameInfo))),\r\n React.createElement(Route, { path: appUrl(`/frame/:frameId/tour/:id/view/:hash/:slug?`) },\r\n React.createElement(TourFrame, Object.assign({}, frameInfo))),\r\n React.createElement(Route, { path: appUrl(`/frame/:frameId/tour/:id/:slug?`) },\r\n React.createElement(TourFrame, Object.assign({}, frameInfo))),\r\n React.createElement(Route, { path: appUrl(`/frame/:frameId/hotel/:id/`) },\r\n React.createElement(HotelFrame, Object.assign({}, frameInfo))),\r\n React.createElement(Route, { path: appUrl(`/frame/:frameId/extra`) },\r\n React.createElement(ExtraFrame, Object.assign({}, frameInfo))),\r\n React.createElement(Route, { path: appUrl(`/frame/:frameId/hotel-search-widget`) },\r\n React.createElement(HotelSearchWidget, Object.assign({}, frameInfo))),\r\n React.createElement(Route, { path: appUrl(`/frame/:frameId/tour-search-widget`) },\r\n React.createElement(TourSearchWidget, Object.assign({}, frameInfo))),\r\n React.createElement(Route, { path: appUrl(`/frame/:frameId/excursion-search-widget`) },\r\n React.createElement(ExcursionSearchWidget, Object.assign({}, frameInfo)))))\r\n : React.createElement(AsyncSpinner, null)));\r\n}\r\n","import { setupLayout } from 'common.js';\r\nimport { render } from \"react-dom\";\r\nimport { FrameEmbeddedContainer } from './components/FrameEmbedded';\r\nimport 'jquery.js';\r\nimport 'jquery-components/bootstrap-dropdown';\r\n\r\nexport function setupFrameEmbedded(id, tempId, hash, currencySwitchEnabled) {\r\n const root = FrameEmbeddedContainer({ id, tempId, hash, currencySwitchEnabled });\r\n render(root, document.getElementById('frame-embedded'));\r\n}\r\n\r\nexport { setupLayout };\r\n","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nimport { api } from 'network/network.ts';\r\nfunction fromTourItemDto(rawItem) {\r\n return Object.assign(Object.assign({}, rawItem), { findCheapestTourVariant, variants: rawItem.variants.map(variant => (Object.assign(Object.assign({}, variant), { currency: rawItem.currency, \r\n //calcTourPrice,\r\n priceVariants: variant.prices.map(price => (Object.assign(Object.assign({}, price), { accomodationVariants: price.accomodations.map(accmdVariant => (Object.assign(Object.assign({}, accmdVariant), { orderAvailability: accmdVariant.immediateConfirm ? \"available\" : \"onRequest\", checkInDate: new Date(accmdVariant.checkInDate), \r\n //duration: accmdVariant.duration,\r\n currency: rawItem.currency }))) }))) }))) });\r\n}\r\n/**\r\n * Парсит json объект полученный в ответе из SearchTours и возвращает модели.\r\n */\r\nexport function parseSearchResult(response) {\r\n const resp = response;\r\n const tours = Array.from(resp.tours.map(x => fromTourItemDto(x)));\r\n return Object.assign(Object.assign({}, resp), { tours });\r\n}\r\n/**\r\n * Выполняет поиск туров и возвращает обработанную модель данных (пропущенную через\r\n * {@link parseSearchResult}).\r\n */\r\nexport function searchTours(query) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const { response, errors } = yield api('get', '/Tour/SearchResult', query);\r\n return !errors ? parseSearchResult(response) : { errors };\r\n });\r\n}\r\n/**\r\n * Получает детальную информацию о туре.\r\n * @param tourVariantId Идентификатор варианта тура\r\n * @param accmmdVariantId Идентификатор варианта размещения\r\n */\r\nexport function fetchTourDetails(params) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n let q = 'tourVariantId' in params\r\n ? { variant: params.tourVariantId, accmmd: params.accmmdVariantId }\r\n : 'tourId' in params\r\n ? { tourId: params.tourId, hotelId: params.hotelId }\r\n : {};\r\n if (params.excursions)\r\n q['exc'] = params.excursions;\r\n if (params.externalFlight) {\r\n q['fId'] = params.externalFlight.flightId;\r\n q['fpId'] = params.externalFlight.providerId;\r\n }\r\n const { response, errors } = yield api('get', 'hash' in params ? `/Tour/HotelTourDescription/${params.hash}` : '/Tour/HotelTourDescription', q);\r\n return !errors ? response : { errors };\r\n });\r\n}\r\n/**\r\n * Получает детальную информацию о туре в корзине.\r\n * @param tourVariantId Идентификатор варианта тура\r\n * @param accmmdVariantId Идентификатор варианта размещения\r\n */\r\nexport function fetchTourDetailsFromCart() {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const { response, errors } = yield api('get', `/Cart/TourDescription/`, {});\r\n return !errors ? response : { errors };\r\n });\r\n}\r\nexport function fetchExternalFlight(hash, externalFlight) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const { response, errors } = yield api('get', `/Tour/flight/${hash}`, { aviacenterProviderId: externalFlight.providerId, aviacenterFlightId: externalFlight.flightId });\r\n return !errors ? response : { errors };\r\n });\r\n}\r\nexport function fetchAdditionalFlights(hash, externalFlight) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const { response, errors } = yield api('post', `/Tour/flights/additional/${hash}`, { aviacenterProviderId: externalFlight.providerId, aviacenterFlightId: externalFlight.flightId });\r\n return !errors ? response : { errors };\r\n });\r\n}\r\n/**\r\n * Возвращает описание варианта тура.\r\n */\r\nexport function fetchTourVariant(tourId, date, duration, adultCount, childAges, currentHash) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const q = { tourId, date, duration, adultCount, childAges, currentHash };\r\n const { response, errors } = yield api('get', '/Tour/Variant', q);\r\n return !errors ? response : { errors };\r\n });\r\n}\r\n///**\r\n// * Получает даты доступности тура.\r\n// * @param tourVariantId Идентификатор варианта тура\r\n// * @param month Месяц для которого запрашивать доступность. Может содержать любую дату/время месяца.\r\n// * @param hotelId Идентификатор отеля для которого запрашивать доступность\r\n// */\r\n//export async function fetchTourAvailability(\r\n// tourId: number,\r\n// adultCount: number,\r\n// childAges: number[],\r\n// monthIso: string,\r\n// hotelId?: number): Promise\r\n//{\r\n// const q = { adultCount, childAges, month: monthIso, hotelId: hotelId };\r\n// const result = await api('get', '/Tour/' + tourId + '/Availability', q);\r\n// return !result.errors ? result.response : { errors: result.errors };\r\n//}\r\n/**\r\n * Получает приблизительные даты доступности тура. В результирующем списке могут присутствовать ложные даты.\r\n * @param tourId Идентификатор тура.\r\n * @param month Месяц для которого запрашивать доступность. Может содержать любую дату/время месяца.\r\n */\r\nexport function fetchTourAvailabilityApprox(tourId, monthIso) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const q = { month: monthIso, tourId };\r\n const result = yield api('get', '/Tour/' + tourId + '/Availability', q);\r\n return !result.errors ? result.response : { errors: result.errors };\r\n });\r\n}\r\n/**\r\n * Получает доступные варианты размещения для для тура на указанную дату.\r\n */\r\nexport function fetchAccommodations(tourId, adultCount, childAges, dateIso, immediateConfirm, hotelIndex, hash) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const q = { date: dateIso, tourId, adultCount, childAges, hotelIndex, immediateConfirm, hash };\r\n const result = yield api('get', '/Tour/Accommodations', q);\r\n return !result.errors ? result.response : { errors: result.errors };\r\n });\r\n}\r\n///**\r\n// * Получает рекомендованые отели для тура.\r\n// */\r\n//export async function fetchHotelRecommendations(tourVariantId: string): Promise {\r\n// const q = { variant: tourVariantId };\r\n// const result = await api('get', '/Tour/HotelRecommendations', q);\r\n// return !result.errors ? result.response : { errors: result.errors };\r\n//}\r\n/**\r\n * Получает рекомендованые отели для тура.\r\n */\r\nexport function fetchHotelRecommendationsNew(tourVariantId, hash) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const q = { variant: tourVariantId, hash };\r\n const result = yield api('get', '/Tour/HotelRecommendationsNew', q);\r\n return !result.errors ? result.response : { errors: result.errors };\r\n });\r\n}\r\n/**\r\n * Добавляет тур в корзину.\r\n * @returns Список ошибок или null, если операция прошла успешно.\r\n */\r\nexport function addTourToCart({ tourVariantId, accmdVariantIds, excursions, hash, externalFlight, extras, replaceExistingTour }) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const { response: _, errors } = yield api('post', '/Tour/AddToCart', {\r\n tourVariantId,\r\n accomodationIds: accmdVariantIds,\r\n excursions,\r\n hash,\r\n flightId: externalFlight === null || externalFlight === void 0 ? void 0 : externalFlight.flightId,\r\n flightProviderId: externalFlight === null || externalFlight === void 0 ? void 0 : externalFlight.providerId,\r\n extras,\r\n replaceExistingTour\r\n });\r\n return errors;\r\n });\r\n}\r\nexport function checkTourPrice(hash) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const { response, errors } = yield api('post', '/Tour/CheckPrice', { hash });\r\n return !(response === null || response === void 0 ? void 0 : response.expired);\r\n });\r\n}\r\nfunction findCheapestTourVariant() {\r\n let cheapestVariant = null;\r\n let cheapestPriceItem = null;\r\n let minPrice = 0;\r\n // FIXME: в данный момент не учитываем существование сложных туров,\r\n // поэтому (корректная) реализация этого кейса закомментирована, для того\r\n // чтобы соотнести логику расчета цен на тур с текущей реализацией на бэке\r\n // где этот кейс не поддерживается.\r\n //\r\n // for (const tourVariant of this.variants) {\r\n // const cheapestPerPeriod = tourVariant.accomodationPeriods\r\n // .map(x => [x, x.findCheapestAccomodationVariant()] as const);\r\n // const price = cheapestPerPeriod\r\n // .reduce((acc, [_, variant]) => acc + (variant?.price ?? 0), 0);\r\n // if (cheapestVariant == null || minPrice > price) {\r\n // cheapestVariant = tourVariant;\r\n // cheapestPeriods = cheapestPerPeriod;\r\n // minPrice = price;\r\n // }\r\n // }\r\n for (const tourVariant of this.variants) {\r\n const best = tourVariant.priceVariants.sort((a, b) => a.price - b.price)[0];\r\n const price = best.price;\r\n //const periods = tourVariant.priceVariants.length ? tourVariant.priceVariants : [];\r\n //const cheapestPerPeriod = periods\r\n // .map(x => [x, x.findCheapestAccomodationVariantPrice()] as const);\r\n //const price = cheapestPerPeriod\r\n // .reduce((acc, [_, variant]) => acc + (variant?.price ?? 0), 0);\r\n if (cheapestVariant == null || cheapestPriceItem == null || minPrice > price) {\r\n cheapestVariant = tourVariant;\r\n cheapestPriceItem = best;\r\n //cheapestPeriods = cheapestPerPeriod.length > 0 ? cheapestPerPeriod : null;\r\n minPrice = price;\r\n }\r\n }\r\n return cheapestVariant != null ? [cheapestVariant, cheapestPriceItem] : null;\r\n}\r\n","import { Checkbox, FormControl, InputLabel } from '@material-ui/core';\r\nimport Box from '@material-ui/core/Box';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport IconButton from '@material-ui/core/IconButton';\r\nimport Typography from '@material-ui/core/Typography';\r\nimport AddIcon from '@material-ui/icons/Add';\r\nimport RemoveIcon from '@material-ui/icons/Remove';\r\nimport { _T } from 'appI18n';\r\nimport range from 'lodash/range';\r\nimport React from 'react';\r\nimport Select from '../Select';\r\nimport useStyles from './styles';\r\nfunction TouristPickerCategory({ label, count, onAdd, onRemove }) {\r\n const classes = useStyles();\r\n return (React.createElement(Grid, { container: true, alignItems: \"center\" },\r\n React.createElement(Grid, { item: true, xs: 6 },\r\n React.createElement(Typography, { variant: \"h5\", component: \"span\" }, label)),\r\n React.createElement(Grid, { item: true, xs: 6 },\r\n React.createElement(Box, { display: \"flex\", alignItems: \"center\", justifyContent: \"space-between\" },\r\n React.createElement(IconButton, { className: classes.countBtn, onClick: onRemove },\r\n React.createElement(RemoveIcon, null)),\r\n React.createElement(Typography, { variant: \"h4\", component: \"span\" }, count),\r\n React.createElement(IconButton, { className: classes.countBtn, onClick: onAdd },\r\n React.createElement(AddIcon, null))))));\r\n}\r\nexport function TouristPicker({ adultCount, childAges, onChange }) {\r\n const classes = useStyles();\r\n const handleAddAdult = () => adultCount < 10 && onChange(adultCount + 1, childAges);\r\n const handleRemoveAdult = () => adultCount > 1 && onChange(adultCount - 1, childAges);\r\n const handleAddChild = () => childAges.length < 4 && onChange(adultCount, [...childAges, 0]);\r\n const handleRemoveChild = () => childAges.length > 0 && onChange(Math.max(adultCount, 0), childAges.slice(0, childAges.length - 1));\r\n const handleChildAgeChange = (childIndex, e) => {\r\n const ages = [...childAges];\r\n ages[childIndex] = parseInt(e.target.value);\r\n onChange(adultCount, ages);\r\n };\r\n return React.createElement(\"div\", { className: classes.root },\r\n React.createElement(\"div\", { className: classes.categories },\r\n React.createElement(TouristPickerCategory, { label: _T.COMMON_ADULTS, count: adultCount, onAdd: handleAddAdult, onRemove: handleRemoveAdult }),\r\n React.createElement(TouristPickerCategory, { label: _T.COMMON_CHILDREN, count: childAges.length, onAdd: handleAddChild, onRemove: handleRemoveChild })),\r\n React.createElement(\"div\", { className: classes.childAges }, childAges.map((x, i) => React.createElement(Select, { label: `${_T.COMMON_CHILD_AGE} ${i + 1}`, value: x, key: i, fullWidth: true, onChange: handleChildAgeChange.bind(null, i) }, range(0, Number.parseInt(_T.CHILD_MAX_AGE) + 1).map(age => React.createElement(\"option\", { value: age, key: age }, age))))));\r\n}\r\nexport function TouristPickerWithPlace({ adultCount, childAges, onChange }) {\r\n const classes = useStyles();\r\n const handleAddAdult = () => adultCount < 10 && onChange(adultCount + 1, childAges);\r\n const handleRemoveAdult = () => adultCount > 1 && onChange(adultCount - 1, childAges);\r\n const handleAddChild = () => childAges.length < 4 && onChange(adultCount, [...childAges, { age: 0, withPlace: false }]);\r\n const handleRemoveChild = () => childAges.length > 0 && onChange(Math.max(adultCount, 0), childAges.slice(0, childAges.length - 1));\r\n const handleChildAgeChange = (childIndex, e) => {\r\n const ages = [...childAges];\r\n ages[childIndex].age = parseInt(e.target.value);\r\n onChange(adultCount, ages);\r\n };\r\n const handleChildPlaceChange = (childIndex, e) => {\r\n const ages = [...childAges];\r\n ages[childIndex].withPlace = e.target.checked;\r\n onChange(adultCount, ages);\r\n };\r\n return React.createElement(\"div\", { className: classes.root },\r\n React.createElement(\"div\", { className: classes.categories },\r\n React.createElement(TouristPickerCategory, { label: _T.COMMON_ADULTS, count: adultCount, onAdd: handleAddAdult, onRemove: handleRemoveAdult }),\r\n React.createElement(TouristPickerCategory, { label: _T.COMMON_CHILDREN, count: childAges.length, onAdd: handleAddChild, onRemove: handleRemoveChild })),\r\n React.createElement(\"div\", { className: classes.childAges }, childAges.map((x, i) => React.createElement(\"div\", { className: \"input-group w-100\" },\r\n React.createElement(\"div\", { className: \"p-0\" },\r\n React.createElement(Select, { label: `${_T.COMMON_CHILD_AGE} ${i + 1}`, value: x.age, key: i, fullWidth: true, onChange: handleChildAgeChange.bind(null, i) }, range(0, Number.parseInt(_T.CHILD_MAX_AGE) + 1).map(age => React.createElement(\"option\", { value: age, key: age }, age)))),\r\n React.createElement(\"span\", { className: \"input-group-addon\" },\r\n React.createElement(FormControl, { variant: \"filled\", fullWidth: true },\r\n React.createElement(InputLabel, { variant: \"standard\", shrink: true }, _T.COMMON_CHILD_PLACE),\r\n React.createElement(Checkbox, { value: x.withPlace, checked: x.withPlace, key: i, onChange: handleChildPlaceChange.bind(null, i) })))))));\r\n}\r\n","import React, { useState } from 'react';\r\nimport Button from '@material-ui/core/Button';\r\nimport Dialog from '@material-ui/core/Dialog';\r\nimport DialogActions from '@material-ui/core/DialogActions';\r\nimport DialogContent from '@material-ui/core/DialogContent';\r\nimport DialogTitle from '@material-ui/core/DialogTitle';\r\nimport { _T } from 'appI18n';\r\nimport useStyles from './styles';\r\nimport { TouristPicker, TouristPickerWithPlace } from './TouristPicker';\r\nexport function TouristPickerDialog(props) {\r\n const [adultCount, setAdultCount] = useState(props.adultCount);\r\n const [childAges, setChildAges] = useState(props.childAges);\r\n const classes = useStyles();\r\n const handleApply = () => {\r\n if (props.adultCount != adultCount || childAges.join(' ') != props.childAges.join(' '))\r\n props.onChange(adultCount, childAges);\r\n props.onClose();\r\n };\r\n const handleClose = () => props.onClose();\r\n const handleChange = (adultCount, childAges) => {\r\n setAdultCount(adultCount);\r\n setChildAges(childAges);\r\n };\r\n return (React.createElement(Dialog, { open: props.open, onClose: handleClose, \"aria-labelledby\": \"change-tourists-dialog\", style: props.isFrame ? {\r\n height: 'fit-content'\r\n } : undefined },\r\n React.createElement(DialogTitle, { id: \"change-tourists-dialog\" }, _T.COMMON_CHANGE_TOURISTS),\r\n React.createElement(DialogContent, { className: classes.dialog },\r\n React.createElement(TouristPicker, { adultCount: adultCount, childAges: childAges, onChange: handleChange })),\r\n React.createElement(DialogActions, null,\r\n React.createElement(Button, { onClick: handleClose, color: \"primary\" }, _T.COMMON_ACTION_CANCEL),\r\n React.createElement(Button, { onClick: handleApply, color: \"primary\" }, _T.COMMON_ACTION_APPLY))));\r\n}\r\nexport function TouristPickerWithPlaceDialog(props) {\r\n const [adultCount, setAdultCount] = useState(props.adultCount);\r\n const [childAges, setChildAges] = useState(props.childAges.map(c => (Object.assign({}, c))));\r\n const classes = useStyles();\r\n const handleApply = () => {\r\n if (props.adultCount != adultCount || childAges.map(c => c.withPlace ? `${c.age}+` : c.age).join(' ') != props.childAges.map(c => c.withPlace ? `${c.age}+` : c.age).join(' '))\r\n props.onChange(adultCount, childAges);\r\n props.onClose();\r\n };\r\n const handleClose = () => props.onClose();\r\n const handleChange = (adultCount, childAges) => {\r\n setAdultCount(adultCount);\r\n setChildAges(childAges);\r\n };\r\n return (React.createElement(Dialog, { open: props.open, onClose: handleClose, \"aria-labelledby\": \"change-tourists-dialog\" },\r\n React.createElement(DialogTitle, { id: \"change-tourists-dialog\" }, _T.COMMON_CHANGE_TOURISTS),\r\n React.createElement(DialogContent, { className: classes.dialog },\r\n React.createElement(TouristPickerWithPlace, { adultCount: adultCount, childAges: childAges, onChange: handleChange })),\r\n React.createElement(DialogActions, null,\r\n React.createElement(Button, { onClick: handleClose, color: \"primary\" }, _T.COMMON_ACTION_CANCEL),\r\n React.createElement(Button, { onClick: handleApply, color: \"primary\" }, _T.COMMON_ACTION_APPLY))));\r\n}\r\n","import React from 'react';\r\nimport TouristIcon from '@material-ui/icons/PersonOutline';\r\nimport TextField from '../TextField';\r\nimport { makeStyles } from '@material-ui/core/styles';\r\nimport InputAdornment from '@material-ui/core/InputAdornment';\r\nimport { pluralizeI18n, _T } from 'appI18n';\r\nconst useStyles = makeStyles(theme => ({\r\n root: {\r\n cursor: 'pointer',\r\n display: 'inline-block',\r\n },\r\n value: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n '& svg': {\r\n display: 'inline-block',\r\n marginRight: 8,\r\n }\r\n },\r\n fullWidth: {\r\n width: '100%'\r\n },\r\n borderless: {\r\n border: 0,\r\n borderRadius: 0\r\n },\r\n}));\r\nexport function TouristPickerTextField(props) {\r\n return TouristPickerTextFieldBase(props);\r\n}\r\nexport function TouristPickerWithPlaceTextField(props) {\r\n return TouristPickerTextFieldBase(props);\r\n}\r\nfunction TouristPickerTextFieldBase(props) {\r\n const classes = useStyles();\r\n const adultsPlural = pluralizeI18n('adults', props.adultCount);\r\n const childrenPlural = pluralizeI18n('children', props.childAges.length);\r\n const rootClasses = `${classes.root} ${props.fullWidth ? classes.fullWidth : ''}` +\r\n ` ${props.borderless ? classes.borderless : ''}` +\r\n ` ${props.className || ''}`;\r\n const value = `${props.adultCount} ${adultsPlural} · ${props.childAges.length} ${childrenPlural}`;\r\n return (React.createElement(\"div\", { className: rootClasses, onClick: props.onClick },\r\n React.createElement(TextField, { label: _T.COMMON_TOURISTS, value: value, fullWidth: true, borderless: props.borderless, InputLabelProps: props.labelProps, InputProps: {\r\n startAdornment: React.createElement(InputAdornment, { position: \"start\" },\r\n React.createElement(TouristIcon, null)),\r\n readOnly: true\r\n }, masqueradeAsSelect: true, required: props.required, error: props.error, helperText: props.error && props.errorText ? props.errorText : undefined })));\r\n}\r\n","import { readCsrfToken } from \"./network/network\";\r\nconst pluralizeAutoSplit = (count, pattern) => pluralize(count, ...pattern.split(',', 3));\r\nfunction pluralize(count, word, two, five) {\r\n const forms = [five, word, two, two, two, five, five, five, five, five];\r\n const mod100 = count % 100;\r\n if (mod100 <= 10 || mod100 >= 20)\r\n return forms[count % 10];\r\n else if (mod100 && mod100 < 20)\r\n return five;\r\n}\r\nfunction formatMoney(value, options) {\r\n var _a, _b, _c;\r\n if (isNaN(value))\r\n return \"?\";\r\n var sign = RoundSignForCurrency(options === null || options === void 0 ? void 0 : options.currency);\r\n if (options === null || options === void 0 ? void 0 : options.localeAware) {\r\n return new Intl.NumberFormat(window.language || undefined, {\r\n minimumFractionDigits: (_a = options === null || options === void 0 ? void 0 : options.precision) !== null && _a !== void 0 ? _a : sign,\r\n maximumFractionDigits: (_b = options === null || options === void 0 ? void 0 : options.precision) !== null && _b !== void 0 ? _b : sign,\r\n }).format(value);\r\n }\r\n else {\r\n return value.toFixed((_c = options === null || options === void 0 ? void 0 : options.precision) !== null && _c !== void 0 ? _c : sign);\r\n }\r\n}\r\nfunction RoundSignForCurrency(currency) {\r\n if ((currency === null || currency === void 0 ? void 0 : currency.toUpperCase()) == 'RUB')\r\n return 0;\r\n return 2;\r\n}\r\nfunction appUrl(url, searchParams) {\r\n let result = baseUrl(url);\r\n if (!searchParams || Object.keys(searchParams).length == 0)\r\n return result;\r\n const urlSearchParams = toURLSearchParams(searchParams);\r\n return result + (result.indexOf('?') == -1 ? \"?\" : \"&\") + urlSearchParams.toString();\r\n}\r\nfunction baseUrl(url) {\r\n if (url.startsWith('/')) {\r\n const baseUrl = window.appBase;\r\n if (!baseUrl)\r\n return url;\r\n if (baseUrl.endsWith('/'))\r\n return baseUrl.replace(/\\/+$/, '') + url;\r\n else\r\n return baseUrl + url;\r\n }\r\n else {\r\n return url;\r\n }\r\n}\r\nfunction toURLSearchParams(obj) {\r\n const searchParams = new URLSearchParams();\r\n toURLSearchParamsInner(searchParams, obj);\r\n return searchParams;\r\n}\r\nfunction toURLSearchParamsInner(searchParams, obj, prefix = undefined) {\r\n for (const [k, v] of Object.entries(obj).filter(([_, v]) => v !== null && v !== undefined)) {\r\n if (Array.isArray(v)) {\r\n for (let i = 0; i < v.length; i++) {\r\n const arrayVal = v[i];\r\n if (typeof arrayVal == \"object\")\r\n toURLSearchParamsInner(searchParams, arrayVal, `${prefix || ''}${k}[${i}].`);\r\n else\r\n searchParams.append(`${prefix || ''}${k}[${i}]`, arrayVal);\r\n }\r\n }\r\n else if (typeof v == \"object\") {\r\n toURLSearchParamsInner(searchParams, v, `${prefix || ''}${k}.`);\r\n }\r\n else {\r\n searchParams.append(`${prefix || ''}${k}`, v);\r\n }\r\n }\r\n return searchParams;\r\n}\r\nfunction isValidEmail(email) {\r\n return !!email.match(/^((([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+(\\.([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+)*)|((\\x22)((((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(([\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]|\\x21|[\\x23-\\x5b]|[\\x5d-\\x7e]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(\\\\([\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]))))*(((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(\\x22)))@((([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.)+(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.?$/gi);\r\n}\r\nconst getWeekDays = () => window.weekDays;\r\nconst getCurrency = () => window.currency;\r\nconst getCurrencies = () => window.currencies;\r\nconst openPaymentUrl = (function () {\r\n function redirect(targetUrl) {\r\n window.location.href = targetUrl;\r\n }\r\n function redirectBlank(targetUrl) {\r\n window.open(targetUrl, '_blank');\r\n }\r\n function submitForm(targetUrl, params, isBlank) {\r\n var _a, _b;\r\n let form = document.createElement('form');\r\n form.setAttribute('action', targetUrl);\r\n form.setAttribute('method', 'POST');\r\n if (isBlank)\r\n form.setAttribute('target', '_blank');\r\n if (params) {\r\n if (!params[\"csrfToken\"])\r\n params[\"csrfToken\"] = readCsrfToken();\r\n let paramEntries = Object.entries(params);\r\n for (var i = 0; i < paramEntries.length; i++) {\r\n let name = paramEntries[i][0];\r\n let val = (_a = paramEntries[i][1]) !== null && _a !== void 0 ? _a : ((_b = paramEntries[i][1]) !== null && _b !== void 0 ? _b : '').toString();\r\n let el = document.createElement('input');\r\n el.setAttribute('type', 'hidden');\r\n el.setAttribute('name', name);\r\n el.setAttribute('value', val);\r\n form.appendChild(el);\r\n }\r\n }\r\n document.body.appendChild(form);\r\n form.submit();\r\n }\r\n return function (paymentUrl) {\r\n if (paymentUrl.httpVerb == 'post' && paymentUrl.contentType == 'form') {\r\n submitForm(paymentUrl.targetUrl, paymentUrl.params, paymentUrl.isBlank);\r\n }\r\n else if (paymentUrl.httpVerb == 'get' && !paymentUrl.isBlank) {\r\n redirect(paymentUrl.targetUrl);\r\n }\r\n else if (paymentUrl.httpVerb == 'get' && paymentUrl.isBlank) {\r\n redirectBlank(paymentUrl.targetUrl);\r\n }\r\n else {\r\n console.error('Don\\'t know how to handle payment URL', paymentUrl);\r\n throw new Error('Unsupported payment URL');\r\n }\r\n };\r\n})();\r\nfunction removeEmptyFields(value, removableValues = [null, undefined, NaN]) {\r\n //function removeEmptyFields>(value: T, removableValues: any[] = [null, undefined, NaN]): Partial {\r\n return Object.fromEntries(Object.keys(value).filter(key => !removableValues.find(r => r === value[key])).map(key => [key, value[key]]));\r\n}\r\nexport { appUrl, pluralize, pluralizeAutoSplit, formatMoney, toURLSearchParams, toURLSearchParamsInner, isValidEmail, getWeekDays, getCurrency, getCurrencies, openPaymentUrl, removeEmptyFields, };\r\n","import { Box, Checkbox, ClickAwayListener, createStyles, FormControl, FormLabel, Grid, Grow, IconButton, InputAdornment, InputBase, ListItemIcon, ListItemText, MenuItem, MenuList, Paper, Popper, useControlled, useTheme, withStyles } from '@material-ui/core';\r\nimport { Close, Search } from '@material-ui/icons';\r\nimport _ from 'lodash';\r\nimport moment from 'moment';\r\nimport { useSnackbar } from 'notistack';\r\nimport React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';\r\nimport { DateObject } from 'react-multi-date-picker';\r\nimport { language, _T } from '../../../../include/appI18n';\r\nimport '../../../../include/jquery-components/date-range-picker';\r\nimport '../../../../include/jquery-components/date-range-picker/date-range-picker.css';\r\nimport $ from '../../../../include/jquery.js';\r\nimport { russian, StyledCalendar } from '../../../../include/react-components/StyledCalendar';\r\nexport const TpLabel = (props) => React.createElement(FormLabel, Object.assign({ classes: { root: 'tp-filter-label', focused: 'tp-filter-label-focused' } }, props));\r\nexport const TpFormControl = withStyles((theme) => createStyles({\r\n root: {\r\n verticalAlign: 'baseline',\r\n },\r\n}))(FormControl);\r\nexport const TpInput = React.forwardRef((props, ref) => React.createElement(InputBase, Object.assign({}, props, { classes: Object.assign({ root: 'tp-input-root', input: 'tp-input', disabled: 'tp-input-disabled', error: 'tp-input-error' }, props.classes), ref: ref })));\r\nexport const TpMenuItem = (props) => React.createElement(MenuItem, Object.assign({ className: props.selected ? 'tp-list-item-selected' : undefined, classes: { root: 'tp-list-item', gutters: 'tp-list-item-gutters' } }, props));\r\nexport const TpArrowIcon = (props) => React.createElement(\"svg\", { className: props.className, width: \"8\", height: \"6\", viewBox: \"0 0 8 6\" },\r\n React.createElement(\"path\", { xmlns: \"http://www.w3.org/2000/svg\", d: \"M3.88281 6L0.393326 -6.52532e-07L7.37229 -4.68497e-08L3.88281 6Z\" }));\r\nexport const TpArrowIcon2 = (props) => React.createElement(\"svg\", { className: props.className, viewBox: \"0 0 24 24\" },\r\n React.createElement(\"path\", { xmlns: \"http://www.w3.org/2000/svg\", d: \"M7 10l5 5 5-5z\" }));\r\nfunction TpSelectInner(props, ref) {\r\n var _a, _b, _c, _d, _e, _f;\r\n const snackbar = useSnackbar();\r\n const [open, setOpen] = React.useState(false);\r\n const [showDropdownContent, setShowDropdownContent] = React.useState(!props.dropdownDelay);\r\n const anchorRef = React.useRef(null);\r\n const menuRef = React.useRef(null);\r\n const getOptionValue = (o) => typeof props.valueSelector == 'function' ? props.valueSelector(o) : o[props.valueSelector];\r\n const getOptionText = (o) => typeof props.textSelector == 'function' ? props.textSelector(o) : o[props.textSelector];\r\n const getDisabledState = (o) => typeof props.disabledSelector == 'function' ? props.disabledSelector(o) : false;\r\n const handleToggle = () => {\r\n if (!props.disabled)\r\n setOpen((prevOpen) => !prevOpen);\r\n else\r\n setOpen(false);\r\n };\r\n const handleClose = (event) => {\r\n if (anchorRef.current && menuRef.current && menuRef.current.contains(event.target)) {\r\n return;\r\n }\r\n setOpen(false);\r\n };\r\n useEffect(() => {\r\n setTimeout(() => setShowDropdownContent(open), 200);\r\n }, [open]);\r\n const handleListKeyDown = (event) => {\r\n if (event.key === 'Tab') {\r\n event.preventDefault();\r\n setOpen(false);\r\n }\r\n };\r\n const [selected, setSelected] = useState(props.multiselect ? props.selected : props.value !== undefined ? [props.value] : []);\r\n const [searchText, setSearchText] = useState();\r\n const [searchOpen, setSearchOpen] = useState(false);\r\n const options = useMemo(() => searchText && searchOpen ? props.options.filter(o => getOptionText(o).toLowerCase().includes(searchText.toLowerCase())) : props.options, [props.options, searchOpen, searchText]);\r\n useEffect(() => {\r\n if (!props.multiselect) {\r\n return;\r\n }\r\n if (!_.isEqual(_.orderBy(selected), _.orderBy(props.selected)))\r\n props.onChange(selected.filter(s => props.options.findIndex(o => getOptionValue(o) == s) >= 0));\r\n }, [selected]);\r\n useEffect(() => {\r\n if (props.multiselect && props.onChange && !open && !_.isEqual(_.orderBy(selected), _.orderBy(props.selected)))\r\n props.onChange(selected.filter(s => props.options.findIndex(o => getOptionValue(o) == s) >= 0));\r\n }, [open]);\r\n useEffect(() => {\r\n const newSelected = selected.filter(s => props.options.findIndex(o => getOptionValue(o) == s) >= 0);\r\n setSelected(newSelected);\r\n if (props.multiselect && props.onChange && !open && !_.isEqual(_.orderBy(newSelected), _.orderBy(props.selected)))\r\n props.onChange(newSelected);\r\n }, [props.options, props.valueSelector]);\r\n const valueLabel = useMemo(() => {\r\n if (!props.multiselect) {\r\n if (props.valueLabelFormat)\r\n return props.valueLabelFormat(props.value);\r\n let q = props.value === undefined ? undefined : options.find(p => getOptionValue(p) === props.value);\r\n if (q !== undefined && q !== null)\r\n return getOptionText(q);\r\n return '';\r\n }\r\n if (props.valueLabelFormat)\r\n return props.valueLabelFormat(selected);\r\n if (selected.length == 0 || selected.length == options.length)\r\n return (props.anyLabel || _T.COMMON_ANY_MALE);\r\n return _.orderBy(selected.filter(o => !!o).map(o => {\r\n let f = options.find(p => getOptionValue(p) == o);\r\n return f ? getOptionText(f) : '';\r\n }), v => v).filter(o => o).join(', ');\r\n }, [selected, options, props.textSelector, props.valueSelector, props.multiselect, (props.multiselect ? props.selected : props.value)]);\r\n const searchRef = useRef(null);\r\n const prevOpen = useRef(open);\r\n useEffect(() => {\r\n if (prevOpen.current === true && open === false) {\r\n anchorRef.current.focus();\r\n }\r\n prevOpen.current = open;\r\n }, [open]);\r\n const MultiSelectMenu = //useMemo(() => () => (\r\n React.createElement(MenuList, { ref: menuRef, autoFocusItem: open, id: \"menu-list-grow\", onKeyDown: handleListKeyDown, style: { maxHeight: (_a = props.heightPx) !== null && _a !== void 0 ? _a : 300, overflowY: 'auto' } }, options.map((o, i) => {\r\n let value = getOptionValue(o);\r\n let text = props.optionSelector && typeof props.optionSelector == 'function' ? props.optionSelector(o) : getOptionText(o);\r\n return (React.createElement(TpMenuItem, { selected: props.multiselect ? selected.indexOf(value) > -1 : value == props.value, disabled: props.disabled || getDisabledState(o), dense: true, button: true, key: i, onClick: (e) => {\r\n if (!props.multiselect) {\r\n //setSelected([value]);\r\n props.onChange(value);\r\n setOpen(false);\r\n return;\r\n }\r\n let newSelected = [];\r\n if (selected.indexOf(value) > -1) {\r\n newSelected = [...selected.filter(x => x != value && !!props.options.find(p => getOptionValue(p) == x))];\r\n }\r\n else {\r\n newSelected = [...selected.filter(x => !!props.options.find(p => getOptionValue(p) == x)), value];\r\n }\r\n if (props.maxSelected && newSelected.length > props.maxSelected && props.maxSelectedAlertText) {\r\n snackbar.enqueueSnackbar(props.maxSelectedAlertText, { variant: 'warning', autoHideDuration: 5000 });\r\n }\r\n else\r\n setSelected(newSelected);\r\n e.stopPropagation();\r\n } },\r\n props.multiselect ? React.createElement(ListItemIcon, null,\r\n React.createElement(Checkbox, { classes: { root: 'tp-list-item-checkbox', checked: 'tp-list-item-checkbox-selected' }, edge: \"start\", checked: selected.indexOf(value) > -1, tabIndex: -1, disableRipple: true, disabled: props.disabled })) : null,\r\n React.createElement(ListItemText, { primary: text })));\r\n }));\r\n return (React.createElement(React.Fragment, null, props.multiline ?\r\n React.createElement(Box, Object.assign({}, ((_b = props.boxProps) !== null && _b !== void 0 ? _b : {})),\r\n props.label ? React.createElement(TpLabel, { error: props.error }, props.label) : null,\r\n React.createElement(Box, Object.assign({}, ((_c = props.boxProps) !== null && _c !== void 0 ? _c : {}), { className: props.error ? 'tp-multi-select-error' : '' }),\r\n !props.searchable || !searchOpen ? React.createElement(TpInput, { onClick: props.onClick, classes: props.inputClasses, disabled: props.disabled, readOnly: true, fullWidth: true, value: valueLabel, placeholder: props.placeholder, startAdornment: props.startAdornment, endAdornment: props.searchable ?\r\n React.createElement(InputAdornment, { position: \"end\" },\r\n React.createElement(IconButton, { onClick: e => {\r\n setSearchOpen(true);\r\n setTimeout(() => { var _a; return (_a = searchRef.current) === null || _a === void 0 ? void 0 : _a.focus(); }, 400);\r\n } },\r\n React.createElement(Search, { color: \"inherit\" }))) : undefined, error: props.error }) : React.createElement(TpFormControl, { classes: props.formControlClasses, fullWidth: true },\r\n React.createElement(TpInput, { onClick: props.onClick, classes: props.inputClasses, disabled: props.disabled, fullWidth: true, inputRef: searchRef, value: searchText, onChange: (e) => setSearchText(e.target.value), placeholder: props.placeholder, startAdornment: (searchText === null || searchText === void 0 ? void 0 : searchText.length) && searchOpen ?\r\n React.createElement(InputAdornment, { position: \"start\" },\r\n React.createElement(IconButton, { onClick: () => setSearchText('') },\r\n React.createElement(Close, { color: \"inherit\" }))) : props.startAdornment, endAdornment: props.searchable ?\r\n React.createElement(InputAdornment, { position: \"end\" },\r\n React.createElement(IconButton, { onClick: e => {\r\n setSearchText('');\r\n setSearchOpen(false);\r\n } },\r\n React.createElement(Search, { color: \"inherit\" }))) : undefined, error: props.error })),\r\n React.createElement(Box, { height: props.heightPx },\r\n React.createElement(Paper, { elevation: 2, style: { height: '100%' }, className: \"tp-multiline-select-list-paper\" }, MultiSelectMenu)))) : React.createElement(Box, Object.assign({}, ((_d = props.boxProps) !== null && _d !== void 0 ? _d : {}), { style: { height: '100%' } }),\r\n React.createElement(\"div\", { style: { display: 'flex', height: '100%' }, ref: anchorRef },\r\n React.createElement(TpFormControl, { classes: props.formControlClasses, variant: \"filled\", fullWidth: true, disabled: props.disabled },\r\n props.label ? React.createElement(TpLabel, { error: props.error }, props.label) : null,\r\n React.createElement(TpInput, { classes: props.inputClasses, disabled: props.disabled, value: valueLabel, onInput: (e) => {\r\n e.stopPropagation();\r\n e.preventDefault();\r\n }, readOnly: true, placeholder: props.placeholder, style: { caretColor: 'transparent', height: '100%' }, \"aria-controls\": open ? 'menu-list-grow' : undefined, \"aria-haspopup\": \"true\", onClick: () => {\r\n let res = true;\r\n if (props.onClick)\r\n res = props.onClick();\r\n if (res)\r\n handleToggle();\r\n }, startAdornment: props.startAdornment, endAdornment: (_e = props.endAdornment) !== null && _e !== void 0 ? _e : React.createElement(TpArrowIcon, { className: \"MuiNativeSelect-icon MuiNativeSelect-iconFilled\" }), error: props.error })),\r\n React.createElement(Popper, { open: open, anchorEl: anchorRef.current, role: undefined, transition: true, style: { zIndex: 9999, width: (_f = anchorRef.current) === null || _f === void 0 ? void 0 : _f.clientWidth, maxHeight: '300px' } }, ({ TransitionProps, placement }) => (React.createElement(Grow, Object.assign({}, TransitionProps, { style: { transformOrigin: placement === 'bottom' ? 'left top' : 'left bottom', marginTop: placement === 'bottom' ? '2px' : 0, marginBottom: placement !== 'bottom' ? '2px' : 0 } }),\r\n React.createElement(Paper, { elevation: 4 },\r\n React.createElement(ClickAwayListener, { onClickAway: handleClose },\r\n React.createElement(Box, { width: \"100%\", height: \"100%\" }, showDropdownContent || !props.dropdownDelay ? MultiSelectMenu : null))))))))));\r\n}\r\nexport const TpSelect = React.forwardRef(TpSelectInner);\r\nexport const TpDateRangePickerField2 = React.forwardRef((props, ref) => {\r\n var _a, _b;\r\n const snackbar = useSnackbar();\r\n const [[startDate, endDate], setDates] = useState([props.dates[0] ? moment(props.dates[0]).toDate() : undefined, props.dates[1] ? moment(props.dates[1]).toDate() : undefined]);\r\n const [errors, setErrors] = useState([]);\r\n const inputRef = useRef(null);\r\n const [open, setOpen] = React.useState(false);\r\n const [showDropdownContent, setShowDropdownContent] = React.useState(false);\r\n const anchorRef = React.useRef(null);\r\n const menuRef = React.useRef(null);\r\n const valueLabel = useMemo(() => startDate && endDate ? (moment(startDate).isSame(endDate) ? moment(startDate).format('DD.MM.YY') : `${moment(startDate).format('DD.MM.YY')} - ${moment(endDate).format('DD.MM.YY')}`) : props.hideLabelWhenNotSelected ? '' : _T.COMMON_SELECT_DATES, [startDate, endDate, props.hideLabelWhenNotSelected]);\r\n const handleToggle = () => {\r\n if (!props.disabled)\r\n setOpen((prevOpen) => !prevOpen);\r\n else\r\n setOpen(false);\r\n };\r\n const handleClose = (event) => {\r\n if (anchorRef.current && anchorRef.current.contains(event.target)) {\r\n return;\r\n }\r\n setOpen(false);\r\n };\r\n const prevOpen = useRef(open);\r\n // return focus to the button when we transitioned from !open -> open\r\n useEffect(() => {\r\n if (prevOpen.current === true && open === false) {\r\n anchorRef.current.focus();\r\n }\r\n prevOpen.current = open;\r\n }, [open]);\r\n useEffect(() => {\r\n setTimeout(() => setShowDropdownContent(open), 200);\r\n }, [open]);\r\n useEffect(() => {\r\n if (!props.validationCallback)\r\n return;\r\n const validationResult = props.validationCallback([startDate ? moment(startDate) : undefined, endDate ? moment(endDate) : undefined]);\r\n if (!validationResult)\r\n return;\r\n if (Array.isArray(validationResult))\r\n setErrors([...validationResult]);\r\n else\r\n setErrors([validationResult]);\r\n }, [startDate, endDate, props.validationCallback]);\r\n return (React.createElement(\"div\", { style: { display: 'flex', height: '100%' }, ref: ref },\r\n React.createElement(\"div\", { style: { display: 'flex', width: '100%', height: '100%' }, ref: anchorRef },\r\n React.createElement(FormControl, { fullWidth: true, variant: props.variant, classes: props.formControlClasses, error: props.error, disabled: props.disabled, className: props.className },\r\n props.label ? React.createElement(TpLabel, null, props.label) : null,\r\n React.createElement(TpInput, { classes: props.inputClasses, disabled: props.disabled, placeholder: props.placeholder, id: props.id, ref: inputRef, value: valueLabel, onInput: (e) => {\r\n e.stopPropagation();\r\n e.preventDefault();\r\n }, readOnly: true, style: { caretColor: 'transparent', color: 'rgba(0, 0, 0, 0.3)' }, \"aria-controls\": open ? 'menu-list-grow' : undefined, \"aria-haspopup\": \"true\", onClick: e => {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n let res = true;\r\n if (props.onClick)\r\n res = props.onClick();\r\n if (res)\r\n handleToggle();\r\n }, startAdornment: props.startAdornment, endAdornment: (_a = props.endAdornment) !== null && _a !== void 0 ? _a : React.createElement(TpArrowIcon, { className: \"MuiNativeSelect-icon MuiNativeSelect-iconFilled\" }), error: props.error })),\r\n React.createElement(Popper, { open: open, anchorEl: anchorRef.current, role: undefined, transition: true, style: {\r\n zIndex: 9999,\r\n width: (_b = anchorRef.current) === null || _b === void 0 ? void 0 : _b.clientWidth\r\n } }, ({ TransitionProps, placement }) => (React.createElement(Grow, Object.assign({}, TransitionProps, { style: {\r\n transformOrigin: placement === 'bottom' ? 'left top' : 'left bottom',\r\n marginTop: placement === 'bottom' ? '2px' : 0,\r\n marginBottom: placement !== 'bottom' ? '2px' : 0\r\n } }),\r\n React.createElement(Paper, { elevation: 4 },\r\n React.createElement(ClickAwayListener, { onClickAway: handleClose },\r\n React.createElement(Box, { width: \"100%\", height: \"100%\" }, showDropdownContent || !props.dropdownDelay ? React.createElement(StyledCalendar, { ref: menuRef, range: true, showOtherDays: true, weekStartDayIndex: language.includes('ru') ? 1 : undefined, locale: language.includes('ru') ? russian : undefined, mapDays: ({ date }) => {\r\n var s = date.format('YYYY-MM-DD');\r\n if (props.validDates === undefined) {\r\n console.error('CheckIn date set is undefined');\r\n return { disabled: false };\r\n }\r\n return {\r\n disabled: props.validDates.indexOf(s) < 0,\r\n };\r\n }, minDate: moment().add(1, 'd').toDate(), highlightToday: false, numberOfMonths: props.numberOfMonths, value: [startDate, endDate].filter(x => !!x).map(x => x), onChange: value => {\r\n let s = value instanceof Date || typeof value == 'string' || typeof value == 'number'\r\n ? [moment(value), undefined]\r\n : value instanceof DateObject\r\n ? [moment(value.format('YYYY-MM-DD')), undefined]\r\n : Array.isArray(value)\r\n ? (value[0] instanceof Date || typeof value[0] == 'string' || typeof value[0] == 'number') && (value[value.length - 1] instanceof Date || typeof value[value.length - 1] == 'string' || typeof value[value.length - 1] == 'number')\r\n ? [moment(value[0]), value.length > 1 ? moment(value[value.length - 1]) : undefined]\r\n : value[0] instanceof DateObject && value[value.length - 1] instanceof DateObject\r\n ? [moment(value[0].format('YYYY-MM-DD')), value.length > 1 ? moment(value[value.length - 1].format('YYYY-MM-DD')) : undefined]\r\n : [undefined, undefined]\r\n : [undefined, undefined];\r\n if (s[0] == undefined || s[1] == undefined)\r\n return;\r\n if (props.dateLimit && s[0].diff(s[1], \"days\") >= props.dateLimit) {\r\n snackbar.enqueueSnackbar(props.dateLimitAlertText, { variant: 'warning', autoHideDuration: 5000 });\r\n }\r\n setDates([s[0].toDate(), s[1].toDate()]);\r\n if (props.onChange)\r\n props.onChange(s);\r\n setOpen(false);\r\n } }) : null)))))))));\r\n});\r\nexport function TpDateRangePickerField(props) {\r\n const snackbar = useSnackbar();\r\n const [[startDate, endDate], setDates] = useState([props.dates[0] ? moment(props.dates[0]) : undefined, props.dates[1] ? moment(props.dates[1]) : undefined]);\r\n const [errors, setErrors] = useState([]);\r\n const inputRef = useRef(null);\r\n const daterangepickerApply = useCallback((e, picker) => {\r\n if (props.dateLimit && picker.endDate.diff(picker.startDate, \"days\") >= props.dateLimit) {\r\n snackbar.enqueueSnackbar(props.dateLimitAlertText, { variant: 'warning', autoHideDuration: 5000 });\r\n }\r\n setDates([picker.startDate, picker.endDate]);\r\n if (props.onChange)\r\n props.onChange([picker.startDate, picker.endDate]);\r\n }, [props.onChange]);\r\n useEffect(() => {\r\n if (!inputRef.current)\r\n return;\r\n $(inputRef.current).daterangepicker({\r\n startDate: moment(props.dates[0]),\r\n endDate: moment(props.dates[1]),\r\n dateLimit: props.dateLimit,\r\n //startDate: moment($('#checkInDateStart').val()),\r\n //endDate: moment($('#checkInDateEnd').val()),\r\n minDate: moment(),\r\n autoApply: true,\r\n isInvalidDate: function (date) {\r\n // ����������� ���� ������� �� �������� � ������ ����������� ��� ������.\r\n var s = date.format('YYYY-MM-DD');\r\n if (props.validDates === undefined) {\r\n console.error('CheckIn date set is undefined');\r\n return false;\r\n }\r\n return props.validDates.indexOf(s) < 0;\r\n },\r\n //template: props.maxViewMode && props.maxViewMode < 2 ? \r\n // '
' +\r\n // '
' +\r\n // '
' +\r\n // '' +\r\n // '' +\r\n // '' +\r\n // '
' +\r\n // '
' +\r\n // '' +\r\n // '
' +\r\n // '
' +\r\n // '
' +\r\n // '
' +\r\n // '
' +\r\n // '
' +\r\n // ' ' +\r\n // '' +\r\n // '
' +\r\n // '
' +\r\n // '
':undefined,\r\n });\r\n $(inputRef.current).off('apply.daterangepicker', daterangepickerApply);\r\n $(inputRef.current).on('apply.daterangepicker', daterangepickerApply);\r\n return () => {\r\n };\r\n }, [inputRef.current, ...props.dates, props.validDates, props.numberOfMonths, daterangepickerApply]);\r\n useEffect(() => {\r\n if (!props.validationCallback)\r\n return;\r\n const validationResult = props.validationCallback([startDate, endDate]);\r\n if (!validationResult)\r\n return;\r\n if (Array.isArray(validationResult))\r\n setErrors([...validationResult]);\r\n else\r\n setErrors([validationResult]);\r\n }, [startDate, endDate, props.validationCallback]);\r\n const valueLabel = useMemo(() => startDate && endDate ? (startDate.isSame(endDate) ? startDate.format('DD.MM.YY') : `${startDate.format('DD.MM.YY')} - ${endDate.format('DD.MM.YY')}`) : _T.COMMON_SELECT_DATES, [startDate, endDate]);\r\n const theme = useTheme();\r\n return (React.createElement(FormControl, { fullWidth: true, variant: props.variant, error: props.error, disabled: props.disabled, className: props.className },\r\n React.createElement(TpLabel, null, props.label),\r\n React.createElement(TpInput, { disabled: props.disabled, id: props.id, ref: inputRef, value: valueLabel, style: { caretColor: 'transparent', color: 'rgba(0, 0, 0, 0.3)' }, endAdornment: React.createElement(TpArrowIcon, { className: \"MuiNativeSelect-icon\" }) })));\r\n //return \r\n}\r\nexport function TpDurationSelector(props) {\r\n const snackbar = useSnackbar();\r\n const [value] = useControlled({ name: 'value', controlled: props.value, default: props.value });\r\n const currentMinSelected = useMemo(() => value === undefined || value.length == 0 ? (props.options.length ? props.options[0] : 0) : value[0], [value, props.options]);\r\n const currentMaxSelected = useMemo(() => value === undefined || value.length == 0 ? (props.options.length ? props.options[props.options.length - 1] : 100) : value[1], [value, props.options]);\r\n return (React.createElement(Grid, { container: true, spacing: 1 },\r\n React.createElement(Grid, { item: true, xs: 'auto' },\r\n React.createElement(Box, { paddingRight: '8px', display: \"inline-flex\", className: \"tp-filter-label\" }, _T.COMMON_FROM.toLowerCase()),\r\n React.createElement(TpSelect, { value: currentMinSelected, onChange: (v) => {\r\n let start = v;\r\n let end = (() => {\r\n var _a;\r\n if (!value || value.length == 0 || (props.tourSearchMaxNightCount && props.options.indexOf(value[1]) - props.options.indexOf(v) >= props.tourSearchMaxNightCount)) {\r\n if ((value === null || value === void 0 ? void 0 : value.length) == 2)\r\n snackbar.enqueueSnackbar(_T.NEW_TOUR_SEARCH_DURATIONS_WARNING_MAX_SET_MAX);\r\n return (_a = (props.tourSearchMaxNightCount ? props.options[props.options.indexOf(v) + props.tourSearchMaxNightCount - 1] : undefined)) !== null && _a !== void 0 ? _a : props.options[props.options.length - 1];\r\n }\r\n if (v > value[1]) {\r\n snackbar.enqueueSnackbar(_T.NEW_TOUR_SEARCH_DURATIONS_WARNING_MAX_SET_MIN);\r\n return v;\r\n }\r\n return value[1];\r\n })();\r\n //let end = Math.min(Math.max(v, value ? value[1] : props.options.length ? getMaxValue(start) : 100), getMaxValue(start));\r\n props.onChange([start, end]);\r\n }, options: props.options, valueSelector: o => o, textSelector: o => `${o}`, required: true, error: props.error, boxProps: {\r\n display: 'inline-flex',\r\n width: '82px',\r\n } })),\r\n React.createElement(Grid, { item: true, xs: 'auto' },\r\n React.createElement(Box, { paddingRight: '8px', display: \"inline-flex\", className: \"tp-filter-label\" }, _T.COMMON_TO.toLowerCase()),\r\n React.createElement(TpSelect, { value: currentMaxSelected, onChange: (v) => {\r\n //let start = Math.min(v, value ? value[0] : props.options.length ? props.options[0] : 0);\r\n let start = (() => {\r\n var _a;\r\n if (!value || value.length == 0 || (props.tourSearchMaxNightCount && props.options.indexOf(v) - props.options.indexOf(value[0]) >= props.tourSearchMaxNightCount)) {\r\n if ((value === null || value === void 0 ? void 0 : value.length) == 2)\r\n snackbar.enqueueSnackbar(_T.NEW_TOUR_SEARCH_DURATIONS_WARNING_MIN_SET_MIN);\r\n return (_a = (props.tourSearchMaxNightCount ? props.options[props.options.indexOf(v) - props.tourSearchMaxNightCount + 1] : undefined)) !== null && _a !== void 0 ? _a : props.options[0];\r\n }\r\n if (v < value[0]) {\r\n snackbar.enqueueSnackbar(_T.NEW_TOUR_SEARCH_DURATIONS_WARNING_MIN_SET_MAX);\r\n return v;\r\n }\r\n return value[0];\r\n })();\r\n let end = v;\r\n props.onChange([start, end]);\r\n }, options: props.options, valueSelector: (o) => o, textSelector: (o) => `${o}`, required: true, error: props.error, boxProps: {\r\n display: 'inline-flex',\r\n width: '82px',\r\n } }))));\r\n}\r\n","import React from 'react';\r\nimport Box from '@material-ui/core/Box';\r\nimport CircularProgress from '@material-ui/core/CircularProgress';\r\nexport default function AsyncSpinner() {\r\n return React.createElement(Box, { display: \"flex\", justifyContent: \"center\" },\r\n React.createElement(CircularProgress, { variant: \"indeterminate\", size: 64 }));\r\n}\r\n","var __rest = (this && this.__rest) || function (s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n};\r\nimport React, { useCallback } from 'react';\r\nimport { makeStyles } from '@material-ui/core/styles';\r\nimport GridList from '@material-ui/core/GridList';\r\nimport GridListTile from '@material-ui/core/GridListTile';\r\nconst useStyles = makeStyles({\r\n img: {\r\n objectFit: 'cover',\r\n cursor: 'pointer',\r\n },\r\n grid: {\r\n borderRadius: 12\r\n },\r\n tile: {\r\n overflow: 'hidden',\r\n },\r\n imgTile: {\r\n '&:after': {\r\n top: 0,\r\n left: 0,\r\n right: 0,\r\n bottom: 0,\r\n pointerEvents: 'none',\r\n background: 'rgba(0,0,0,0)',\r\n transition: '.15s',\r\n content: '\" \"',\r\n position: 'absolute',\r\n display: 'block',\r\n },\r\n '&:hover:after': {\r\n background: 'rgba(0,0,0,30%)',\r\n },\r\n },\r\n}, { name: 'ImageGrid' });\r\nfunction Tile(props) {\r\n const { url, index, onClick } = props, tileProps = __rest(props, [\"url\", \"index\", \"onClick\"]);\r\n const classes = useStyles();\r\n const handleClick = useCallback(() => {\r\n if (props.onClick)\r\n props.onClick(index);\r\n }, [props.url, props.index, props.onClick]);\r\n return React.createElement(GridListTile, Object.assign({}, tileProps, { classes: { tile: `${classes.tile} ${classes.imgTile}` } }),\r\n React.createElement(\"img\", { src: url, className: classes.img, onClick: handleClick }));\r\n}\r\nfunction SmallGrid(props) {\r\n const colWidth = 6;\r\n const { images: unboundImages, onClick } = props, gridProps = __rest(props, [\"images\", \"onClick\"]);\r\n const images = unboundImages.slice(0, 3);\r\n const classes = useStyles();\r\n return React.createElement(GridList, Object.assign({}, gridProps, { cols: colWidth, classes: { root: classes.grid } }), images.length > 0\r\n ? React.createElement(Tile, { url: images[0].urls.large, cols: colWidth, rows: 3, index: 0, onClick: onClick })\r\n : null);\r\n}\r\nfunction MediumGrid(props) {\r\n const colWidth = 4;\r\n const { images, onClick } = props, gridProps = __rest(props, [\"images\", \"onClick\"]);\r\n const classes = useStyles();\r\n return React.createElement(GridList, Object.assign({}, gridProps, { cols: colWidth, classes: { root: classes.grid } }),\r\n images.length > 0\r\n ? React.createElement(Tile, { cols: colWidth - 1, rows: 3, url: images[0].urls.large, index: 0, onClick: onClick })\r\n : null,\r\n React.createElement(GridListTile, { rows: 3, classes: { tile: classes.tile } },\r\n React.createElement(GridList, { cols: 1, cellHeight: gridProps.cellHeight, spacing: gridProps.spacing }, images.slice(1, 4).map((x, i) => React.createElement(Tile, { url: x.urls.thumbnail, index: i + 1, onClick: onClick, key: i })))));\r\n}\r\nexport default function ImageGrid(props) {\r\n return (React.createElement(\"div\", null,\r\n props.images.length <= 3\r\n ? React.createElement(SmallGrid, { images: props.images, cellHeight: props.cellHeight, spacing: props.spacing, onClick: props.onClick })\r\n : null,\r\n props.images.length > 3\r\n ? React.createElement(MediumGrid, { images: props.images, cellHeight: props.cellHeight, spacing: props.spacing, onClick: props.onClick })\r\n : null));\r\n}\r\n","import React, { useCallback, useEffect, useRef, useState } from 'react';\r\nimport { makeStyles } from '@material-ui/core/styles';\r\nimport Backdrop from '@material-ui/core/Backdrop';\r\nimport Close from '@material-ui/icons/Close';\r\nimport ForwardIcon from '@material-ui/icons/ArrowForwardIos';\r\nimport BackIcon from '@material-ui/icons/ArrowBackIos';\r\nimport IconButton from '@material-ui/core/IconButton';\r\nimport Button from '@material-ui/core/Button';\r\nimport { Portal } from '@material-ui/core';\r\nconst useStyles = makeStyles(theme => ({\r\n backdrop: {\r\n zIndex: 10001,\r\n opacity: 1,\r\n background: '#000',\r\n color: '#f0f0f0',\r\n height: 'fit-content',\r\n minHeight: '100vh'\r\n },\r\n closeButton: {\r\n position: 'absolute',\r\n right: theme.spacing(2),\r\n top: theme.spacing(2),\r\n color: '#cfcfcf',\r\n '& button:hover': {\r\n background: \"#333\",\r\n color: '#fff'\r\n }\r\n },\r\n movementButton: {\r\n position: 'absolute',\r\n height: '100%',\r\n width: '10%',\r\n color: '#cfcfcf',\r\n '& button': {\r\n display: 'flex',\r\n width: '100%',\r\n height: '100%',\r\n alignItems: 'center',\r\n borderRadius: 0,\r\n },\r\n '& button:hover': {\r\n color: '#fff'\r\n },\r\n },\r\n forwardButton: {\r\n right: 0,\r\n top: 0\r\n },\r\n backButton: {\r\n left: 0,\r\n top: 0,\r\n '& button': {\r\n textAlign: 'right'\r\n }\r\n },\r\n root: {\r\n height: 'calc(100% - 160px)',\r\n width: '100%',\r\n position: 'relative',\r\n },\r\n viewport: {\r\n display: 'flex',\r\n justifyContent: 'center',\r\n alignItems: 'center',\r\n //marginTop: theme.spacing(2),\r\n marginBottom: theme.spacing(2),\r\n },\r\n image: {\r\n objectFit: 'cover',\r\n overflow: 'hidden',\r\n borderRadius: 6,\r\n cursor: 'pointer',\r\n maxHeight: '100%',\r\n },\r\n imageContainer: {\r\n position: 'relative',\r\n display: 'inline',\r\n },\r\n thumbs: {\r\n display: 'flex',\r\n overflow: 'hidden',\r\n '& > :first-child': { marginLeft: 'auto' },\r\n '& > :last-child': { marginRight: 'auto' },\r\n '& > :not(:last-child)': {\r\n marginRight: theme.spacing(1),\r\n }\r\n },\r\n thumb: {\r\n '& img': {\r\n borderRadius: theme.shape.borderRadius,\r\n overflow: 'hidden',\r\n objectFit: 'cover',\r\n width: 72,\r\n height: 72,\r\n filter: 'brightness(.4)',\r\n transition: '.3s filter linear, .3s -webkit-filter linear',\r\n cursor: 'pointer',\r\n },\r\n },\r\n thumbActive: {\r\n '& img': {\r\n filter: 'brightness(1)'\r\n },\r\n },\r\n description: {\r\n position: 'absolute',\r\n top: theme.spacing(3),\r\n left: 0,\r\n width: '100%',\r\n display: 'flex',\r\n justifyContent: 'center',\r\n '& > *': {\r\n overflow: 'hidden',\r\n maxWidth: '50%',\r\n },\r\n },\r\n}), { name: \"Lightbox\" });\r\nfunction Thumbnails({ urls, index, onChange }) {\r\n const classes = useStyles();\r\n const scrollRef = useRef();\r\n useEffect(() => {\r\n if (!scrollRef.current)\r\n return;\r\n scrollRef.current.scrollIntoView({ behavior: 'smooth', inline: 'center' });\r\n }, [urls, index]);\r\n return React.createElement(\"div\", { className: classes.thumbs }, urls.map((x, i) => React.createElement(\"div\", { key: i, className: `${classes.thumb} ${i == index ? classes.thumbActive : ''}`, ref: ref => index == i ? scrollRef.current = ref : 0 },\r\n React.createElement(\"img\", { src: x, onClick: () => index != i ? onChange(i) : 0 }))));\r\n}\r\nexport default function Lightbox(props) {\r\n var _a;\r\n const classes = useStyles();\r\n const [imageIndex, setImageIndex] = useState((_a = props.initialIndex) !== null && _a !== void 0 ? _a : 0);\r\n const handleBackButtonClick = useCallback(() => {\r\n setImageIndex((x) => x - 1 >= 0 ? x - 1 : props.images.length - 1);\r\n }, []);\r\n const handleForwardButtonClick = useCallback(() => {\r\n setImageIndex((x) => x + 1 < props.images.length ? x + 1 : 0);\r\n }, [props.images]);\r\n return React.createElement(Portal, { container: document.body },\r\n React.createElement(Backdrop, { open: props.open, className: classes.backdrop },\r\n React.createElement(\"div\", { className: classes.root },\r\n React.createElement(\"div\", { className: classes.viewport }, imageIndex < props.images.length\r\n ? React.createElement(\"img\", { src: props.images[imageIndex].urls.original, className: classes.image, onClick: handleForwardButtonClick })\r\n : null),\r\n React.createElement(\"div\", { className: `${classes.movementButton} ${classes.backButton}` },\r\n React.createElement(Button, { color: \"inherit\", onClick: handleBackButtonClick },\r\n React.createElement(BackIcon, { fontSize: \"large\" }))),\r\n React.createElement(\"div\", { className: `${classes.movementButton} ${classes.forwardButton}` },\r\n React.createElement(Button, { color: \"inherit\", onClick: handleForwardButtonClick },\r\n React.createElement(ForwardIcon, { fontSize: \"large\" }))),\r\n React.createElement(Thumbnails, { urls: props.images.map(x => x.urls.thumbnail), index: imageIndex, onChange: i => setImageIndex(i) })),\r\n React.createElement(\"div\", { className: classes.closeButton },\r\n React.createElement(IconButton, { color: \"inherit\", onClick: props.onClose },\r\n React.createElement(Close, { fontSize: \"large\" }))),\r\n React.createElement(\"div\", { className: classes.description },\r\n React.createElement(\"span\", null, props.images[imageIndex].description))));\r\n}\r\n","var __rest = (this && this.__rest) || function (s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n};\r\nimport { toURLSearchParams } from \"utils\";\r\nexport function makeSearchQueryFromURLParams(query) {\r\n const searchParams = new URLSearchParams(query);\r\n const queryObj = [...searchParams.keys()].reduce((acc, x) => {\r\n const values = searchParams.getAll(x);\r\n acc[x.toLowerCase()] = values.length > 1 ? values : values[0];\r\n return acc;\r\n }, {});\r\n const page = parseInt(queryObj['page']) || 0;\r\n delete queryObj['page'];\r\n return [queryObj, page];\r\n}\r\nexport function makeSearchId(query, page) {\r\n const { page: _ } = query, queryBlob = __rest(query, [\"page\"]);\r\n const searchParams = toURLSearchParams(queryBlob);\r\n searchParams.set('page', page + '');\r\n return searchParams.toString();\r\n}\r\nexport function mapExtrasToJsonCompatibility(extras) {\r\n return Object.keys(extras).filter(key => { var _a; return !!((_a = extras[key]) === null || _a === void 0 ? void 0 : _a.length); }).map(key => ({ key, value: extras[key] }));\r\n}\r\nexport function getExtraKey(e) {\r\n return e.groupByPackage ? `${e.packageId}-${e.day}` : e.compositeId;\r\n}\r\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","__webpack_require__.amdO = {};","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.hmd = function(module) {\n\tmodule = Object.create(module);\n\tif (!module.children) module.children = [];\n\tObject.defineProperty(module, 'exports', {\n\t\tenumerable: true,\n\t\tset: function() {\n\t\t\tthrow new Error('ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: ' + module.id);\n\t\t}\n\t});\n\treturn module;\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = function(module) {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript)\n\t\tscriptUrl = document.currentScript.src;\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) {\n\t\t\tvar i = scripts.length - 1;\n\t\t\twhile (i > -1 && !scriptUrl) scriptUrl = scripts[i--].src;\n\t\t}\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","__webpack_require__.b = document.baseURI || self.location.href;\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t6608: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = function(chunkId) { return installedChunks[chunkId] === 0; };\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = function(parentChunkLoadingFunction, data) {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some(function(id) { return installedChunks[id] !== 0; })) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkApp\"] = self[\"webpackChunkApp\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","__webpack_require__.nc = undefined;","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [7855,874,5291,6773,9803,8042,4448,5993,4728,279,2697,9356,1276,7980,2481,5498,9,3268,5246,5156,2320,8648,2617,4164,5803], function() { return __webpack_require__(14592); })\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","sanitizeProps","props","timeout","undefined","children","index","strictIndexing","autoPlay","interval","navButtonsAlwaysInvisible","navButtonsAlwaysVisible","fullHeightHover","onChange","changeOnFirstRender","next","prev","className","Carousel","Component","constructor","super","autoBind","this","state","active","prevActive","displayed","timer","componentDidMount","setActive","start","componentWillUnmount","stop","componentDidUpdate","prevProps","prevState","reset","length","clearInterval","setInterval","callback","arguments","runCallbacks","Array","isArray","setState","setTimeout","event","nextActive","stopPropagation","render","classes","buttonCssClassValue","button","buttonVisible","buttonHidden","fullHeightHoverButton","buttonWrapperCssClassValue","buttonWrapper","fullHeightHoverWrapper","compareActiveDisplayed","React","root","onMouseEnter","onMouseOut","map","child","CarouselItem","key","display","isNext","IconButton","onClick","size","NavigateNextIcon","fontSize","NavigateBeforeIcon","swipeHandlers","useSwipeable","onSwipedLeft","onSwipedRight","_extends","Slide","direction","in","withStyles","position","overflow","color","height","backgroundColor","top","opacity","margin","transition","cursor","right","left","__awaiter","thisArg","_arguments","P","generator","Promise","resolve","reject","fulfilled","value","step","e","rejected","result","done","then","apply","useStyles","makeStyles","theme","currencySelector","borderBottom","menu","marginLeft","marginTop","paddingTop","CurrencySelector","currency","currencies","Paper","Object","assign","elevation","style","borderRadius","paddingLeft","Select","variant","label","id","target","window","location","reload","maxHeight","MenuProps","c","MenuItem","name","tourOrderTableTourname","breakpoints","up","width","tourOrderTableCheckindate","tourOrderTableCheckoutdate","tourOrderTableDuration","tourOrderTablePrice","tourOrderTablePersons","tourOrderTableAvailability","textAlign","orderInfo","tableResponsive","minHeight","overflowX","whiteSpace","orderTable","paddingRight","marginBottom","borderTop","maxWidth","textTransform","padding","lineHeight","fontWeight","verticalAlign","marginRight","fonhtSize","border","cart","hotelBody","paddingBottom","hotelPanel","palette","secondary","main","hotelPanelHeder","order","valueGeneral","valueSingle","infoOrder","orderHotel","textGrey","textGreyUpper","immediate","textShadow","request","fontStyle","primary","orderInfoBottom","orderDelBottom","orangeCollapseLink","caretControl","cartTourInfoList","infoListItem","infoListItemHeader","borderRight","infoListItemBody","infoListItemType","background","infoListItemTitle","infoListItemSubtitle","infoListItemProp","infoListItemPropName","infoListItemPropVal","infoListItemPropValOrderStatus","p","orderAddPoint","contactDetails","inputs","hint","infoBtn","cancelCondContainer","makeBookingBtn","accorddionSummary","transferCost","orderStatus","orderExcurName","excurDate","excurType","excurCost","excurHum","CartFrame","services","isOpen","handleClose","frameId","success","setSucces","useState","maxSnack","anchorOrigin","vertical","horizontal","Card","Container","Dialog","open","fullScreen","AppBar","Toolbar","edge","Close","Grid","container","spacing","item","xs","_T","BOOKING_YOUR_ORDER","justify","alignItems","Typography","FRAME_BOOKING_SENDED","CheckCircleRounded","htmlColor","CartFrameOrder","delCallback","service","onSuccess","sendMessage","message","behavior","CART_NO_SERVICES","price","pricePerPerson","tempId","setName","email","setEmail","phone","setPhone","comment","setComment","snackbar","bookingAvailable","useMemo","md","BOOKING_TOTAL_PRICE","toFixed","BOOKING_PRICE_PER_PERSON","s","CartFrameItem","Accordion","AccordionSummary","expandIcon","ExpandMore","COMMON_ADDITIONAL_REQUIREMENTS","AccordionDetails","TextField","multiline","fullWidth","COMMON_ADDITIONAL_REQUIREMENTS_COMMENT","COMMON_CONTACT_DETAILS","COMMON_NAME","required","type","placeholder","error","inputProps","maxlength","COMMON_EMAIL","COMMON_PHONE","Button","disabled","_a","_b","tourSvc","find","excSvc","extraSvc","hotel","r","currencyId","cartData","bookingCurrency","tour","accomodationIds","accmdVariantIds","tourVariantId","excursions","hash","excursion","excursionId","date","adultCount","childAges","excursionSerialized","extra","serviceId","extraSerialized","searchParamsSerialized","rooms","errors","i","enqueueSnackbar","autoHideDuration","FRAME_SEND_BOOKING","CartFrameTour","CartFrameExcursion","CartFrameExtra","CartFrameHotel","_c","immediateConfirm","variants","prices","x","accomodations","availability","renderDateRange","rangeStart","rangeEnd","isSame","format","src","COMMON_TOUR","COMMON_CHECKIN","COMMON_CHECKOUT","COMMON_DURATION","COMMON_PERSONCOUNT","COMMON_AVAILABILITY","countryName","cityName","begin","end","durationDays","priceInBookingCurrency","accommodation","adults","childs","ROOM_AVAILABLE","ROOM_ONREQUEST","colSpan","BOOKING_DELETE_SERVICE","BOOKING_TOUR_INFORMATION","allTourServices","svc","COMMON_HOTEL","hotelName","beginDate","endDate","COMMON_ROOM_CATEGORY","roomTypeName","roomCategoryName","COMMON_MEAL","mealTypeName","COMMON_TRANSFER","COMMON_ROUTE","cityFrom","placeFrom","cityTo","placeTo","TRANSFER_TYPE","transferType","renderTransferService","COMMON_EXTRA_SERVICES","renderExtraService","COMMON_EXCURSION","renderExcursionService","COMMON_FLIGHT","FLIGHT_CLASS","flightClass","renderFlightService","_d","COMMON_EXCURSIONS","COMMON_DATE","EXCURSION_TYPE","excursionProgramPrice","excursionPrices","excursionTypeName","COMMON_BEGIN_AT","excursionPrice","vehicleTypeName","COMMON_EXTRA_CLASS","extraPrice","serviceClassName","COMMON_STAY","COMMON_HOTELROOM","compulsorySvcs","cartDataCompulsory","filter","serviceTag","hotelPrice","roomType","roomCategory","COMMON_ADULT_SHORT","COMMON_CHILD_SHORT","HOTEL_COMPUSORY_SERVICES","COMMON_SERVICE","HOTEL_COMPULSORY_SERVICE_PRICE","compSvc","compulsoryService","excurDescPanel","excurDescText","excursionDescription","excursionBody","imgWrap","tableEx","rowEx","cellEx","cellExDesc","ExcursionFrame","description","setDescription","cartOpen","setCartOpen","JSON","parse","sessionStorage","getItem","history","pathname","search","historyState","useEffect","response","descriptions","disableGutters","excursionName","sm","excursionImages","Box","mb","LightboxImageGrid","images","image","urls","large","url","thumbnail","original","imageGridCellHeight","onImageClick","params","initialIndex","COMMON_EXCURSION_TYPE","excursionDuration","durationInBusOneWay","EXCURSION_BUS_ONE_WAY_DUR","routeComplexity","COMMON_ROUTE_COMPLEXITY","additionalPayments","COMMON_ADDITIONALLY_PAID","recommendation","COMMON_RECOMMENDATION","rootPoint","COMMON_MEET_POINT","timeBegin","EXCURSION_TIME","mealDescription","EXCURSION_MEAL","EXCURSION_SETTINGS","ExcursionToolbarContainer","tempFrameId","bookCallback","sp","URLSearchParams","set","replace","toString","EXCURSION_DESCRIPTION","dangerouslySetInnerHTML","__html","mainDescription","delete","setItem","defaultAccommodation","childAccommodations","IconButton2","styled","AccommodationSelector","ref","useControlled","controlled","default","multiply","totalAdults","allowRemoveAdults","allowAddAdults","sumBy","a","minAdults","maxAdults","totalChilds","allowRemoveChilds","allowAddChilds","minChilds","maxChilds","setOpen","showDropdownContent","setShowDropdownContent","anchorRef","useRef","menuRef","current","contains","prevOpen","focus","valueLabel","COMMON_PERSONS","boxProps","component","formControlClasses","inputClasses","onInput","preventDefault","readOnly","caretColor","startAdornment","endAdornment","Popper","anchorEl","role","zIndex","clientWidth","TransitionProps","placement","Grow","transformOrigin","ClickAwayListener","onClickAway","dropdownDelay","NumberInput","newValue","newArray","range","_","slice","minValue","maxValue","maxItems","decrementDisabled","incrementDisabled","itemsCountInputLabel","accommodations","itemGroupLabelFormat","newAccommodation","COMMON_ADULTS","childIndex","justifyContent","COMMON_CHILD","age","COMMON_AGES_PLURAL","RemoveCircle","CustomSelect","COMMON_ADD_CHILD","options","maxChildAge","valueSelector","textSelector","Number","parseInt","withPlace","AddCircle","FormControl","InputLabel","OutlinedInput","input","v","isInteger","getOptionValue","o","getOptionText","getDisabledState","disabledSelector","selected","setSelected","searchText","setSearchText","searchOpen","setSearchOpen","toLowerCase","includes","q","MultiSelectMenu","MenuList","autoFocusItem","onKeyDown","heightPx","overflowY","text","optionSelector","dense","ListItemText","disablePortal","icon","ExcursionSearchWidget","loading","setLoading","isLoaded","setIsLoaded","tpMultiline","useContext","useMediaQuery","locations","setLocations","setOptions","setValue","inputValue","setInputValue","toOpen","setToOpen","directionRef","datesRef","accommodationRef","dates","setDates","datesError","isValid","setError","setAccommodation","searchUrl","CnId","grandParentId","parentId","CtId","ExcId","Begin","End","Adlt","Chd","Childs","fetch","throttle","results","newOptions","Autocomplete","clearText","AUTOCOMPLETE_CLEAR","closeText","AUTOCOMPLETE_CLOSE","getLimitTagsText","num","AUTOCOMPLETE_LIMIT_TAGS","loadingText","AUTOCOMPLETE_LOADING","noOptionsText","AUTOCOMPLETE_NO_OPTIONS","openText","AUTOCOMPLETE_OPEN","getOptionSelected","option","getOptionLabel","fullName","filterOptions","autoComplete","includeInputInList","onOpen","onClose","onInputChange","newInputValue","renderInput","COMMON_CITY","COMMON_TO_WHERE","InputProps","CircularProgress","renderOption","WbIncandescent","rotate","LocationOn","hideLabelWhenNotSelected","COMMON_CHECKIN_PERIOD","d","validDates","dateLimit","dateLimitAlertText","NEW_TOUR_SEARCH_MAX_DATES_WARNING","numberOfMonths","DateRange","People","COMMON_HOTELROOMS_COUNT","appSettings","childMaxAge","COMMON_SEARCH_VERB","jQuery","fn","datepicker","ru","days","daysShort","daysMin","months","monthsShort","today","clear","weekStart","InputValidationMessage","onInvalid","setCustomValidity","BootstrapDatePicker","containerRef","inputRef","language","startDate","Date","orientation","todayHighlight","autoclose","keepEmptyValues","datepickerOptions","off","on","htmlFor","maxLength","customValidationMessage","toISOString","split","self","BootstrapSelectPicker","selectRef","groups","values","groupBy","groupSelector","selectpicker","liveSearch","liveSearchStyle","title","labelSelector","selectProps","trim","anyOption","group","j","ExtraFrame","_e","_f","model","setModel","serviceClassId","extraServiceClassId","extraServiceId","countryId","cityId","add","toDate","duration","searchResult","setSearchResult","serviceClasses","setServiceClasses","countries","setCountries","cities","setCities","extras","setExtras","titles","EXTRA_RESULT_TITLE","backdrop","searchExtras","citiesR","items","finally","classId","useLayoutEffect","show","hide","setExtrasRs","_g","_h","_j","_k","_l","searchData","searchResultRs","minWidth","CONTROL_SELECTFROMLISTORFIRSTLETTERS","CONTROL_FILLTHISFIELD","COMMON_ANY_EXTRA","COMMON_COUNTRY","COMMON_ANY_COUNTRY","COMMON_ANY_CITY","EXTRA_START_DATE","COMMON_TOURISTS","COMMON_ADULT_COUNT","COMMON_CHILD_COUNT","COMMON_CHILD_AGE_SHORTEST","replaceAll","COMMON_SEARCH","href","COMMON_CLEARALLFIELDS","REQUIRED_FIELDS","extraPrices","EXTRA_NOTHING_FOUND","tr","secureSerialized","push","serviceDatas","flatMap","stringify","COMMON_CHOOSE","orderTreeNodes","nodes","level","HotelFrame","rq","setRq","setSearchParamsSerialized","mustSelectPrice","setMustSelectPrice","checkInParamsOpen","setCheckInParamsOpen","recentHotels","setRecentHotels","setHotel","internalRooms","setInternalRooms","externalRooms","setExternalRooms","checkIn","checkOut","activeTabs","setActiveTabs","hotelGroups","hidePrices","hasPrices","hotelPrices","hotelDescription","nights","diff","mealPriceGroups","hpi","roomTypeId","roomCategoryId","mealGroupsSelected","setMealGroupsSelected","mealGroupsSelectorOpened","setMealGroupsSelectorOpened","globalCurrency","hotelId","includeRoomDescriptions","roomDescriptions","cnId","ctId","cIn","cOut","rmCn","roomCount","rm","ages","COMMON_CHECKINDATE","COMMON_CHECKOUTDATE","COMMON_HOTELROOMS","COMMON_NIGHTS_COUNT","COMMON_CHECKIN_PARAMS","hotelImages","imageGridSpacing","address","homePage","cat","RegExp","exec","hotelCategory","HOTEL_DESCRIPTION","latitude","longitude","HOTEL_PLACEONMAP","HOTEL_ROOMSPRICES","hotelAttributes","HOTEL_SERVICES","checkInTime","checkOutTime","COMMON_CHECK_IN_TIME","COMMON_CHECK_OUT_TIME","taxes","HOTEL_DESCRIPTION_TAXES_HEADER","desc","included","HotelLocation","selectedHotelPrices","h","count","serialized","allRoomNos","join","compulsoryServiceParams","providerId","externalProviderId","variantId","bookingCode","HOTEL_SELECT_AT_LEAST_ONE_ROOM","hotelGroup","colorClass","startNightIndex","weekday","weekDays","flat","_m","_o","_p","accmd","roomNo","external","internal","room","groupKey","allRoomNo","meal","externalHotelPrice","LightboxThumbnail","externalRoomProviderId","externalRoomVariantId","COMMON_PRICE","COMMON_MEAL_SERVS","ROOM_DESCRIPTION","COMMON_TO_SEE_PRICES","COMMON_SPECIFY_CHECKIN_PARAMS","w","toUpperCase","components","week","allPrices","perNightPrices","nightIndex","COMMON_WEEK","day","tabIndex","CANCELLATION_CONDITIONS","compulsoryServices","serviceList","HOTEL_COMPULSORY_SERVICES","isSpo","hotelSearchResultShowSpo","cancellationDenied","HOTEL_CANCEL_DENIED","availableMeals","mealCode","mealName","mealAttributes","m","hotelRoomAttributes","COMMON_ROOMCOUNT","COMMON_AVGPRICE","pricePerDay","COMMON_FULLPRICE","HOTEL_COMPULSORY_SERVICE_POPOVER_HEADER","HOTEL_COMPULSORY_SERVICE_POPOVER_FOOTER","HOTEL_COMPULSORY_SERVICES_NOT_AVAILABLE","languageId","node","attributeId","roomId","mealId","culture","hotelAttributeProperties","getAttributeProperties","HOTEL_RECENTLYVIEWED","recent","searchDetailsUrl","imageUrl","alt","SearchParam","HOTEL_CHOOSE_COMPULSORY_SERVICE","HOTEL_CHOOSE_COMPULSORY_SERVICE_PROCEED","tempRq","setTempRq","Modal","SearchParamRoom","COMMON_CHILD_AGE","CHILD_AGE_TIP","HotelSearchWidget","setRooms","CIn","COut","RmCn","Rm","HCt","hotelCategoryId","Htl","Domain","parentName","grandParentName","COMMON_CHECKIN_CHECKOUT_DATES","g_desription_store_hydrated","CreateTourDescriptionContainer","store","onInit","getState","dispatch","initialState","init","flightConfiguration","hotelServices","tourServices","currentAccommodationVariants","hasAccommodation","viewConfig","loaded","tourDescription","priceItem","servicesHash","externalFlightId","aviacenterServices","externalId","externalFlightProviderId","tourEvents","tourVariant","checkInDate","exc","vehicleTypeId","currentVehicleTypeId","FrameContainer","TourDescriptionStore","TourFrame","TourDescription","T","isFrame","TourSearchWidget","durationsRef","datesOpt","setDatesOpt","nightOpt","setNightOpt","validNights","durations","setDurations","fetchDatesAndDurations","locationId","locationType","datesOptTemp","useOldSearchUI","CoId","TrId","CiMin","CiMax","Dmin","Dmax","page","AdC","ChC","CAg","hotelTo","countryTo","tourTo","dateFrom","dateTo","nightTo","pageIndex","childCount","childAge","Map","COMMON_CHECKIN_DATES","multiselect","newValues","COMMON_NIGHTS_PLURAL","HourglassEmpty","valueLabelFormat","FrameEmbedded","currencySwitchEnabled","frameInfo","setFrameInfo","path","AsyncSpinner","setupFrameEmbedded","BackdropProvider","GlobalSpinnerProvider","ErrorBoundary","ThemeProvider","M","utils","document","getElementById","fetchTourDetails","accmmd","accmmdVariantId","tourId","externalFlight","flightId","fetchTourDetailsFromCart","fetchExternalFlight","aviacenterProviderId","aviacenterFlightId","fetchAdditionalFlights","fetchTourVariant","currentHash","fetchTourAvailabilityApprox","monthIso","month","fetchAccommodations","dateIso","hotelIndex","fetchHotelRecommendationsNew","addTourToCart","replaceExistingTour","flightProviderId","TouristPickerCategory","onAdd","onRemove","countBtn","TouristPicker","handleChildAgeChange","categories","COMMON_CHILDREN","Math","max","bind","CHILD_MAX_AGE","TouristPickerWithPlace","handleChildPlaceChange","checked","shrink","COMMON_CHILD_PLACE","TouristPickerDialog","setAdultCount","setChildAges","COMMON_CHANGE_TOURISTS","dialog","COMMON_ACTION_CANCEL","COMMON_ACTION_APPLY","TouristPickerWithPlaceDialog","borderless","TouristPickerTextField","TouristPickerTextFieldBase","TouristPickerWithPlaceTextField","adultsPlural","childrenPlural","rootClasses","InputLabelProps","labelProps","masqueradeAsSelect","helperText","errorText","pluralizeAutoSplit","pattern","word","two","five","mod100","pluralize","formatMoney","isNaN","sign","localeAware","Intl","NumberFormat","minimumFractionDigits","precision","maximumFractionDigits","appUrl","searchParams","startsWith","baseUrl","appBase","endsWith","keys","urlSearchParams","toURLSearchParams","indexOf","obj","toURLSearchParamsInner","prefix","k","entries","arrayVal","append","isValidEmail","match","getWeekDays","getCurrency","getCurrencies","removeEmptyFields","removableValues","NaN","fromEntries","TpLabel","focused","TpFormControl","TpInput","TpMenuItem","gutters","TpArrowIcon","viewBox","xmlns","TpArrowIcon2","TpSelect","findIndex","newSelected","anyLabel","COMMON_ANY_MALE","f","searchRef","maxSelected","maxSelectedAlertText","disableRipple","searchable","res","TpDateRangePickerField2","setErrors","COMMON_SELECT_DATES","validationCallback","validationResult","S","showOtherDays","weekStartDayIndex","locale","mapDays","console","minDate","highlightToday","__rest","t","prototype","hasOwnProperty","call","getOwnPropertySymbols","propertyIsEnumerable","img","objectFit","grid","tile","imgTile","bottom","pointerEvents","content","Tile","tileProps","handleClick","useCallback","SmallGrid","unboundImages","gridProps","cols","rows","MediumGrid","colWidth","cellHeight","ImageGrid","closeButton","movementButton","forwardButton","backButton","viewport","imageContainer","thumbs","thumb","shape","thumbActive","Thumbnails","scrollRef","scrollIntoView","inline","Lightbox","imageIndex","setImageIndex","handleBackButtonClick","handleForwardButtonClick","body","mapExtrasToJsonCompatibility","getExtraKey","groupByPackage","packageId","compositeId","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","module","__webpack_modules__","amdO","O","chunkIds","priority","notFulfilled","Infinity","every","splice","n","getter","__esModule","definition","defineProperty","enumerable","get","g","globalThis","Function","hmd","create","Error","prop","Symbol","toStringTag","nmd","paths","scriptUrl","importScripts","currentScript","scripts","getElementsByTagName","b","baseURI","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","data","moreModules","runtime","some","chunkLoadingGlobal","forEach","nc","__webpack_exports__"],"sourceRoot":""}