"use strict";
/*
 * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
 * This devtool is neither made for production nor for readable output files.
 * It uses "eval()" calls to create a separate source file in the browser devtools.
 * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
 * or disable the default devtool with "devtool: false".
 * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
 */
(self["webpackChunktimetics"] = self["webpackChunktimetics"] || []).push([["assets_src_admin_pages_meeting_CreateMeeting_js"],{

/***/ "./assets/src/admin/pages/meeting/CreateMeeting.js":
/*!*********************************************************!*\
  !*** ./assets/src/admin/pages/meeting/CreateMeeting.js ***!
  \*********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react_router_dom__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react-router-dom */ \"./node_modules/react-router/dist/index.js\");\n/* harmony import */ var react_router_dom__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react-router-dom */ \"./node_modules/react-router-dom/dist/index.js\");\n/* harmony import */ var _common_Spinner__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../common/Spinner */ \"./assets/src/common/Spinner.js\");\n/* harmony import */ var _common_UseRequestConfig__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/UseRequestConfig */ \"./assets/src/common/UseRequestConfig.js\");\n/* harmony import */ var _actionCreators_common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../actionCreators/common */ \"./assets/src/admin/actionCreators/common.js\");\n/* harmony import */ var _context_provider__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../context/provider */ \"./assets/src/admin/context/provider.js\");\n/* harmony import */ var _hook_useMeetings__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./hook/useMeetings */ \"./assets/src/admin/pages/meeting/hook/useMeetings.js\");\n/* harmony import */ var _steps_CreateStep__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./steps/CreateStep */ \"./assets/src/admin/pages/meeting/steps/CreateStep.js\");\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\nvar React = window.React;\nvar useState = React.useState,\n  useEffect = React.useEffect;\nvar _window$antd = window.antd,\n  Button = _window$antd.Button,\n  Form = _window$antd.Form,\n  Typography = _window$antd.Typography;\nvar Title = Typography.Title;\nvar __ = wp.i18n.__;\n\n\n\n\n\n\n\nfunction CreateMeeting() {\n  var navigate = (0,react_router_dom__WEBPACK_IMPORTED_MODULE_6__.useNavigate)();\n  var _useStateValue = (0,_context_provider__WEBPACK_IMPORTED_MODULE_3__.useStateValue)(),\n    _useStateValue2 = _slicedToArray(_useStateValue, 2),\n    _useStateValue2$ = _useStateValue2[0],\n    meetingReducer = _useStateValue2$.meeting,\n    staff = _useStateValue2$.staff,\n    settings = _useStateValue2$.settings,\n    dispatch = _useStateValue2[1];\n  var _useSearchParams = (0,react_router_dom__WEBPACK_IMPORTED_MODULE_7__.useSearchParams)(),\n    _useSearchParams2 = _slicedToArray(_useSearchParams, 1),\n    searchParams = _useSearchParams2[0];\n  var getConfig = (0,_common_UseRequestConfig__WEBPACK_IMPORTED_MODULE_1__[\"default\"])();\n  var _Form$useForm = Form.useForm(),\n    _Form$useForm2 = _slicedToArray(_Form$useForm, 1),\n    form = _Form$useForm2[0];\n  var _useState = useState(1),\n    _useState2 = _slicedToArray(_useState, 2),\n    current = _useState2[0],\n    setCurrent = _useState2[1];\n  var _useMeetings = (0,_hook_useMeetings__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(),\n    submitMeeting = _useMeetings.submitMeeting;\n  var _meetingReducer$meeti = meetingReducer.meeting,\n    meeting = _meetingReducer$meeti === void 0 ? null : _meetingReducer$meeti,\n    meetingId = meetingReducer.meetingId,\n    loading = meetingReducer.loading,\n    meetingType = meetingReducer.meetingType,\n    _meetingReducer$meeti2 = meetingReducer.meetingCustom,\n    meetingCustom = _meetingReducer$meeti2 === void 0 ? false : _meetingReducer$meeti2,\n    _meetingReducer$meeti3 = meetingReducer.meetingCustomValue,\n    meetingCustomValue = _meetingReducer$meeti3 === void 0 ? \"\" : _meetingReducer$meeti3,\n    meetingCustomTime = meetingReducer.meetingCustomTime,\n    _meetingReducer$selec = meetingReducer.selectedStaffIds,\n    selectedStaffIds = _meetingReducer$selec === void 0 ? [] : _meetingReducer$selec,\n    schedules = meetingReducer.schedules,\n    timeCompareError = meetingReducer.timeCompareError;\n  var staffs = staff.staffs;\n  var settingsLoading = settings.loading;\n  var id = searchParams.get(\"id\");\n  useEffect(function () {\n    return function () {\n      (0,_actionCreators_common__WEBPACK_IMPORTED_MODULE_2__.setState)({\n        dispatch: dispatch,\n        name: \"meeting\",\n        value: null\n      });\n      (0,_actionCreators_common__WEBPACK_IMPORTED_MODULE_2__.setState)({\n        dispatch: dispatch,\n        name: \"meetingId\",\n        value: null\n      });\n      (0,_actionCreators_common__WEBPACK_IMPORTED_MODULE_2__.setState)({\n        dispatch: dispatch,\n        name: \"meetingType\",\n        value: \"One-to-One\"\n      });\n      (0,_actionCreators_common__WEBPACK_IMPORTED_MODULE_2__.setState)({\n        dispatch: dispatch,\n        name: \"schedules\",\n        value: undefined\n      });\n      (0,_actionCreators_common__WEBPACK_IMPORTED_MODULE_2__.setState)({\n        dispatch: dispatch,\n        name: \"selectedStaffIds\",\n        value: []\n      });\n      (0,_actionCreators_common__WEBPACK_IMPORTED_MODULE_2__.setState)({\n        dispatch: dispatch,\n        name: \"selectedStaff\",\n        value: []\n      });\n    };\n  }, []);\n  var onFinish = function onFinish(values) {\n    submitMeeting({\n      values: values,\n      id: id,\n      form: form\n    });\n  };\n\n  /**\n   *\n   * @param {Object} errorInfo Error details of form submission(if any)\n   */\n  var onFinishFailed = function onFinishFailed(errorInfo) {};\n  if (loading || settingsLoading) {\n    return /*#__PURE__*/React.createElement(_common_Spinner__WEBPACK_IMPORTED_MODULE_0__[\"default\"], {\n      tip: __(\"Loading...\", \"timetics\"),\n      type: \"info\",\n      size: \"large\",\n      wrapperClassName: \"tt-spinner-wrapper\"\n    });\n  }\n  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"div\", {\n    className: \"tt-container-wrapper\"\n  }, /*#__PURE__*/React.createElement(Button, {\n    className: \"tt-mb-20\",\n    size: \"large\",\n    onClick: function onClick() {\n      (0,_actionCreators_common__WEBPACK_IMPORTED_MODULE_2__.setState)({\n        dispatch: dispatch,\n        name: \"meeting\",\n        value: null\n      });\n      (0,_actionCreators_common__WEBPACK_IMPORTED_MODULE_2__.setState)({\n        dispatch: dispatch,\n        name: \"meetingId\",\n        value: null\n      });\n      navigate(\"/meetings\");\n    }\n  }, __(\"Back to Meetings\", \"timetics\")), /*#__PURE__*/React.createElement(Title, {\n    level: 3,\n    className: \"tt-meeting-type\"\n  }, meetingReducer === null || meetingReducer === void 0 ? void 0 : meetingReducer.meetingTitle), /*#__PURE__*/React.createElement(\"div\", {\n    className: \"tt-form-container\"\n  }, /*#__PURE__*/React.createElement(_steps_CreateStep__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n    onFinishFailed: onFinishFailed,\n    onFinish: onFinish,\n    form: form\n  }))));\n}\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CreateMeeting);\n\n//Dummy data\n\nvar customTimer = [{\n  id: 1,\n  name: \"hrs\",\n  value: \"hrs\"\n}, {\n  id: 2,\n  name: \"min\",\n  value: \"min\"\n}];\n\n//# sourceURL=webpack://timetics/./assets/src/admin/pages/meeting/CreateMeeting.js?");

/***/ }),

/***/ "./assets/src/admin/pages/meeting/steps/CreateStep.js":
/*!************************************************************!*\
  !*** ./assets/src/admin/pages/meeting/steps/CreateStep.js ***!
  \************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! dayjs */ \"./node_modules/dayjs/dayjs.min.js\");\n/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(dayjs__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _common_CreateOrUpdate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../common/CreateOrUpdate */ \"./assets/src/common/CreateOrUpdate.js\");\n/* harmony import */ var _common_SelectInput__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../common/SelectInput */ \"./assets/src/common/SelectInput.js\");\n/* harmony import */ var _helper_helpers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../helper/helpers */ \"./assets/src/helper/helpers.js\");\n/* harmony import */ var _actionCreators_actions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../actionCreators/actions */ \"./assets/src/admin/actionCreators/actions.js\");\n/* harmony import */ var _actionCreators_common__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../actionCreators/common */ \"./assets/src/admin/actionCreators/common.js\");\n/* harmony import */ var _components_Schedules__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../components/Schedules */ \"./assets/src/admin/components/Schedules.js\");\n/* harmony import */ var _context_provider__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../context/provider */ \"./assets/src/admin/context/provider.js\");\n/* harmony import */ var _utils_dummyData__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../utils/dummyData */ \"./assets/src/admin/utils/dummyData.js\");\n/* harmony import */ var _hook_useMeetings__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../hook/useMeetings */ \"./assets/src/admin/pages/meeting/hook/useMeetings.js\");\n/* harmony import */ var _common_TextInput__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../../common/TextInput */ \"./assets/src/common/TextInput.js\");\n/* harmony import */ var _LocationType__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../LocationType */ \"./assets/src/admin/pages/meeting/LocationType.js\");\n/* harmony import */ var _TicketPrice__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../TicketPrice */ \"./assets/src/admin/pages/meeting/TicketPrice.js\");\n/* harmony import */ var _utils_timezone__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../utils/timezone */ \"./assets/src/admin/utils/timezone.js\");\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it[\"return\"] != null) it[\"return\"](); } finally { if (didErr) throw err; } } }; }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\n\n\n\n\n\n\n\n\n\n\nvar __ = wp.i18n.__;\n\n\n\nvar React = window.React;\nvar useState = React.useState,\n  useEffect = React.useEffect,\n  useRef = React.useRef;\nvar _window$antd = window.antd,\n  Col = _window$antd.Col,\n  Row = _window$antd.Row,\n  Form = _window$antd.Form,\n  Button = _window$antd.Button,\n  Space = _window$antd.Space,\n  Select = _window$antd.Select;\nvar MEETING_TYPE = {\n  oneToOne: \"One-to-One\",\n  oneToMany: \"One-to-Many\",\n  seat: \"seat\"\n};\nvar ADDRESS_TYPE = {\n  googleMeet: \"google-meet\",\n  zoom: \"zoom\",\n  inPerson: \"in-person-meeting\",\n  phoneCall: \"phone-call\"\n};\nfunction CreateStep(_ref) {\n  var _meeting$locations, _settings$nicheData;\n  var onFinish = _ref.onFinish,\n    _onFinishFailed = _ref.onFinishFailed,\n    saveUpdate = _ref.saveUpdate,\n    form = _ref.form;\n  var _useMeetings = (0,_hook_useMeetings__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(),\n    getStaffsSchedule = _useMeetings.getStaffsSchedule;\n  var _useStateValue = (0,_context_provider__WEBPACK_IMPORTED_MODULE_7__.useStateValue)(),\n    _useStateValue2 = _slicedToArray(_useStateValue, 2),\n    _useStateValue2$ = _useStateValue2[0],\n    meetingReducer = _useStateValue2$.meeting,\n    staffReducer = _useStateValue2$.staff,\n    settingsReducer = _useStateValue2$.settings,\n    dispatch = _useStateValue2[1];\n  var staffs = staffReducer.staffs;\n  var settings = settingsReducer.settings;\n  var _meetingReducer$meeti = meetingReducer.meeting,\n    meeting = _meetingReducer$meeti === void 0 ? null : _meetingReducer$meeti,\n    meetingId = meetingReducer.meetingId,\n    loading = meetingReducer.loading,\n    meetingType = meetingReducer.meetingType,\n    meetingStartDate = meetingReducer.meetingStartDate,\n    meetingEndDate = meetingReducer.meetingEndDate,\n    schedules = meetingReducer.schedules,\n    _meetingReducer$selec = meetingReducer.selectedStaffIds,\n    selectedStaffIds = _meetingReducer$selec === void 0 ? [] : _meetingReducer$selec,\n    _meetingReducer$selec2 = meetingReducer.selectedStaff,\n    selectedStaff = _meetingReducer$selec2 === void 0 ? [] : _meetingReducer$selec2,\n    meetingDuration = meetingReducer.meetingDuration,\n    categories = meetingReducer.categories;\n  var _useState = useState(window.timeticsPro ? \"multiple\" : \"\"),\n    _useState2 = _slicedToArray(_useState, 2),\n    staffSelectMode = _useState2[0],\n    setStaffSelectMode = _useState2[1];\n  var _useState3 = useState(\"09:00 AM\"),\n    _useState4 = _slicedToArray(_useState3, 2),\n    startTime = _useState4[0],\n    setStartTime = _useState4[1];\n  var fp = useRef(null);\n  useEffect(function () {\n    form.setFieldsValue({\n      staff: selectedStaffIds\n    });\n  }, [selectedStaffIds]);\n  useEffect(function () {\n    if (typeof window !== \"undefined\" && window.flatpickr && fp.current) {\n      var _meeting$availability, _meeting$availability2, _meeting$availability3, _meeting$availability4, _window, _window$timetics;\n      var inputEl = fp.current;\n      if (settings !== null && settings !== void 0 && settings.calendar_locale) window.flatpickr.localize(window.flatpickr.l10ns[settings === null || settings === void 0 ? void 0 : settings.calendar_locale]);\n      var flatpickrInstance = window.flatpickr(inputEl, {\n        defaultDate: meeting !== null && meeting !== void 0 && (_meeting$availability = meeting.availability) !== null && _meeting$availability !== void 0 && _meeting$availability.start && meeting !== null && meeting !== void 0 && (_meeting$availability2 = meeting.availability) !== null && _meeting$availability2 !== void 0 && _meeting$availability2.end ? [meeting === null || meeting === void 0 ? void 0 : (_meeting$availability3 = meeting.availability) === null || _meeting$availability3 === void 0 ? void 0 : _meeting$availability3.start, meeting === null || meeting === void 0 ? void 0 : (_meeting$availability4 = meeting.availability) === null || _meeting$availability4 === void 0 ? void 0 : _meeting$availability4.end] : [],\n        // showMonths: 2,\n        locale: {\n          firstDayOfWeek: Number((_window = window) === null || _window === void 0 ? void 0 : (_window$timetics = _window.timetics) === null || _window$timetics === void 0 ? void 0 : _window$timetics.start_of_week) // start week on Monday\n        },\n\n        altFormat: \"F j, Y\",\n        dateFormat: \"Y-m-d\",\n        minDate: \"today\",\n        // monthSelectorType: \"static\",\n        mode: \"range\",\n        onChange: function onChange(selectedDates, dateStr, instance) {\n          // const day = getWeekDay(new Date(dateStr));\n\n          dispatch({\n            type: _actionCreators_actions__WEBPACK_IMPORTED_MODULE_4__.actions.SET_META_DATA_WITH_MEETING,\n            payload: {\n              meetingStartDate: dayjs__WEBPACK_IMPORTED_MODULE_0___default()(selectedDates[0]).format(\"YYYY-MM-DD\"),\n              meetingEndDate: dayjs__WEBPACK_IMPORTED_MODULE_0___default()(selectedDates[1]).format(\"YYYY-MM-DD\")\n            }\n          });\n        }\n      });\n      return function () {\n        flatpickrInstance.destroy();\n      };\n    }\n  }, []);\n  var selectStaffHandler = function selectStaffHandler(_ref2) {\n    var values = _ref2.values,\n      option = _ref2.option;\n    var _staffs = [];\n    var _staffsIds = [];\n    var _schedules = {};\n    if (Array.isArray(option)) {\n      var _id = values.filter(function (id) {\n        return !_toConsumableArray(selectedStaffIds).includes(id);\n      });\n      if (_id.length > 0) {\n        _schedules[_id[0]] = getStaffsSchedule({\n          staffId: _id[0]\n        }); //dummySchedules({startTime,duration: meetingDuration,});\n      }\n\n      _staffs = option;\n      _staffsIds = values;\n      (0,_actionCreators_common__WEBPACK_IMPORTED_MODULE_5__.setState)({\n        dispatch: dispatch,\n        name: \"schedules\",\n        value: _objectSpread(_objectSpread({}, schedules), _schedules)\n      });\n    } else {\n      _staffs = [option];\n      _staffsIds = [values];\n      _schedules[values] = getStaffsSchedule({\n        staffId: values\n      }); //dummySchedules({startTime,duration: meetingDuration,});\n      (0,_actionCreators_common__WEBPACK_IMPORTED_MODULE_5__.setState)({\n        dispatch: dispatch,\n        name: \"schedules\",\n        value: _objectSpread({}, _schedules)\n      });\n    }\n    (0,_actionCreators_common__WEBPACK_IMPORTED_MODULE_5__.setState)({\n      dispatch: dispatch,\n      name: \"selectedStaff\",\n      value: _staffs\n    });\n    (0,_actionCreators_common__WEBPACK_IMPORTED_MODULE_5__.setState)({\n      dispatch: dispatch,\n      name: \"selectedStaffIds\",\n      value: _staffsIds\n    });\n  };\n  var deselectStaffHandler = function deselectStaffHandler(_ref3) {\n    var id = _ref3.id,\n      option = _ref3.option;\n    var _schedules = _objectSpread({}, schedules);\n    delete _schedules[id];\n    (0,_actionCreators_common__WEBPACK_IMPORTED_MODULE_5__.setState)({\n      dispatch: dispatch,\n      name: \"schedules\",\n      value: _objectSpread({}, _schedules)\n    });\n    var _staffs = _toConsumableArray(selectedStaff);\n    var _staffsIds = _toConsumableArray(selectedStaffIds);\n    _staffs = _staffs.filter(function (item) {\n      return item.id !== id;\n    });\n    _staffsIds = _staffsIds.filter(function (item) {\n      return item !== id;\n    });\n    (0,_actionCreators_common__WEBPACK_IMPORTED_MODULE_5__.setState)({\n      dispatch: dispatch,\n      name: \"selectedStaff\",\n      value: _staffs\n    });\n    (0,_actionCreators_common__WEBPACK_IMPORTED_MODULE_5__.setState)({\n      dispatch: dispatch,\n      name: \"selectedStaffIds\",\n      value: _staffsIds\n    });\n    form.setFieldsValue({\n      staff: _staffsIds\n    });\n  };\n  var onFinished = function onFinished(values) {\n    var _meetinBufferTime = 0;\n    if (values !== null && values !== void 0 && values.buffer_time) {\n      var _values$buffer_time;\n      if ((values === null || values === void 0 ? void 0 : (_values$buffer_time = values.buffer_time) === null || _values$buffer_time === void 0 ? void 0 : _values$buffer_time.split(\" \")[1]) == \"hr\") {\n        _meetinBufferTime = +(values === null || values === void 0 ? void 0 : values.buffer_time.split(\" \")[0]) * 60;\n      } else {\n        _meetinBufferTime = +(values === null || values === void 0 ? void 0 : values.buffer_time.split(\" \")[0]);\n      }\n    }\n    dispatch({\n      type: _actionCreators_actions__WEBPACK_IMPORTED_MODULE_4__.actions.SET_META_DATA_WITH_MEETING,\n      payload: {\n        meetingBufferTime: _meetinBufferTime\n      }\n    });\n    onFinish(_objectSpread(_objectSpread(_objectSpread({}, meeting), values), {}, {\n      availability: {\n        start: meetingStartDate !== null && meetingStartDate !== void 0 ? meetingStartDate : dayjs__WEBPACK_IMPORTED_MODULE_0___default()().format(\"YYYY-MM-DD\"),\n        end: meetingEndDate !== null && meetingEndDate !== void 0 ? meetingEndDate : dayjs__WEBPACK_IMPORTED_MODULE_0___default()().add(1, \"year\").format(\"YYYY-MM-DD\")\n      },\n      duration: \"30 min\",\n      fleunt_crm_webhook: \"\",\n      seat_plan: [],\n      seat_plan_settings: \"\",\n      visibility: \"enabled\"\n    }));\n  };\n  return /*#__PURE__*/React.createElement(Form, {\n    form: form,\n    name: \"dynamic_form_complex\",\n    layout: \"vertical\",\n    autoComplete: \"on\",\n    onFinish: onFinished,\n    onFinishFailed: function onFinishFailed(errorInfo) {\n      _onFinishFailed(_objectSpread(_objectSpread({}, errorInfo), {}, {\n        values: _objectSpread(_objectSpread({}, errorInfo === null || errorInfo === void 0 ? void 0 : errorInfo.values), {}, {\n          meeting_start_date: meetingStartDate,\n          meeting_end_date: meetingEndDate\n        })\n      }));\n    },\n    initialValues: _objectSpread(_objectSpread({}, meeting), {}, {\n      staff: selectedStaffIds,\n      locations: meeting !== null && meeting !== void 0 && (_meeting$locations = meeting.locations) !== null && _meeting$locations !== void 0 && _meeting$locations.length ? meeting === null || meeting === void 0 ? void 0 : meeting.locations : [meetingType === MEETING_TYPE.seat ? {\n        location_type: ADDRESS_TYPE.inPerson,\n        location: \"\"\n      } : {\n        location_type: ADDRESS_TYPE.googleMeet,\n        location: \"Google Meet\"\n      }]\n    })\n  }, /*#__PURE__*/React.createElement(_common_TextInput__WEBPACK_IMPORTED_MODULE_10__[\"default\"], {\n    label: __(\"Title\", \"timetics\"),\n    name: \"name\",\n    required: true,\n    rules: [{\n      required: true,\n      message: __(\"Please enter title!\", \"timetics\")\n    }],\n    type: \"text\",\n    size: \"small\",\n    placeholder: __(\"Title\", \"timetics\")\n  }), /*#__PURE__*/React.createElement(Row, {\n    gutter: [16, 0]\n  }, Boolean(timetics.timeticsPro) ? /*#__PURE__*/React.createElement(Col, {\n    xs: 24,\n    md: 12\n  }, /*#__PURE__*/React.createElement(Form.Item, {\n    className: \"timetics-input \",\n    name: \"categories\",\n    label: __(\"Select \" + (settings === null || settings === void 0 ? void 0 : (_settings$nicheData = settings.nicheData) === null || _settings$nicheData === void 0 ? void 0 : _settings$nicheData.title.workSpace.singular), \"timetics\")\n  }, /*#__PURE__*/React.createElement(Select, {\n    style: {\n      width: \"100%\"\n    },\n    className: \"tt-host-input timetics-input\",\n    placeholder: __(\"Categorize your meeting\", \"timetics\"),\n    key: \"staff\",\n    options: categories\n    // value={selectedStaffIds}\n    ,\n    fieldNames: {\n      label: \"name\",\n      value: \"term_id\"\n    },\n    mode: staffSelectMode,\n    showArrow: true\n  }))) : null, /*#__PURE__*/React.createElement(Col, {\n    xs: 24,\n    md: Boolean(timetics.timeticsPro) ? 12 : 24\n  }, /*#__PURE__*/React.createElement(Form.Item, {\n    className: \"timetics-input\",\n    label: __(\"Meeting date range (meeting availibility)\", \"timetics\"),\n    name: \"meeting_date_range\"\n    // rules={rules}\n  }, /*#__PURE__*/React.createElement(\"input\", {\n    placeholder: \"Select booking date\",\n    ref: fp,\n    type: \"text\",\n    className: \"tt-flat-picker-input ant-input ant-input-lg\",\n    id: \"booking-date\",\n    name: \"booking-date\"\n  })))), loading == false && /*#__PURE__*/React.createElement(_LocationType__WEBPACK_IMPORTED_MODULE_11__[\"default\"], {\n    form: form\n  }), wp.hooks.applyFilters(\"ticket_price_repeater\"), (meetingReducer === null || meetingReducer === void 0 ? void 0 : meetingReducer.meetingType) == \"One-to-One\" && /*#__PURE__*/React.createElement(_TicketPrice__WEBPACK_IMPORTED_MODULE_12__[\"default\"], null), /*#__PURE__*/React.createElement(_common_SelectInput__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n    initialValue: (settings === null || settings === void 0 ? void 0 : settings.locale_timezone) || Intl.DateTimeFormat().resolvedOptions().timeZone,\n    style: {\n      width: \"100%\"\n    },\n    key: \"meeting-timezone\",\n    data: function () {\n      if (!Intl.supportedValuesOf) {\n        return [{\n          label: \"Your browser does not support Intl.supportedValuesOf()\",\n          value: null\n        }];\n      } else {\n        var options = [];\n        var _iterator = _createForOfIteratorHelper(Intl.supportedValuesOf(\"timeZone\")),\n          _step;\n        try {\n          for (_iterator.s(); !(_step = _iterator.n()).done;) {\n            var timeZone = _step.value;\n            options.push({\n              label: timeZone,\n              value: timeZone\n            });\n          }\n        } catch (err) {\n          _iterator.e(err);\n        } finally {\n          _iterator.f();\n        }\n        return options;\n      }\n    }(),\n    label: __(\"meeting Time zone\", \"timetics\"),\n    labelCol: 24,\n    wrapperCol: 24,\n    name: \"timezone\",\n    showSearch: true,\n    rules: [{\n      required: true,\n      message: __(\"Please select your timezone\", \"timetics\")\n    }]\n  }), /*#__PURE__*/React.createElement(Form.Item, {\n    className: \"timetics-input \",\n    wrapperCol: 24,\n    name: \"staff\",\n    label: __(\"select host\", \"timetics\"),\n    rules: [{\n      required: true,\n      message: __(\"Please select host\", \"timetics\")\n    }]\n  }, /*#__PURE__*/React.createElement(Select, {\n    style: {\n      width: \"100%\"\n    },\n    className: \"tt-host-input timetics-input\",\n    placeholder: __(\"Select host\", \"timetics\"),\n    key: \"staff\",\n    options: staffs,\n    value: selectedStaffIds,\n    fieldNames: {\n      label: \"full_name\",\n      value: \"id\"\n    },\n    mode: staffSelectMode,\n    onChange: function onChange(values, option) {\n      selectStaffHandler({\n        values: values,\n        option: option\n      });\n    },\n    onDeselect: function onDeselect(id, option) {\n      deselectStaffHandler({\n        id: id,\n        option: option\n      });\n    },\n    showArrow: true\n  })), selectedStaff !== null && selectedStaff !== void 0 && selectedStaff.length ? /*#__PURE__*/React.createElement(Form.Item, {\n    className: \"timetics-input \",\n    wrapperCol: 24,\n    label: __(\"Select availability \", \"timetics\")\n  }, /*#__PURE__*/React.createElement(_components_Schedules__WEBPACK_IMPORTED_MODULE_6__[\"default\"], {\n    meetingType: meetingType,\n    schedules: schedules,\n    selectedStaffIds: selectedStaffIds,\n    selectedStaff: selectedStaff,\n    meetingDuration: meetingDuration\n  })) : null, /*#__PURE__*/React.createElement(Row, {\n    justify: \"end\"\n  }, /*#__PURE__*/React.createElement(Space, null, saveUpdate ? /*#__PURE__*/React.createElement(Button, {\n    size: \"large\",\n    type: \"primary\",\n    htmlType: \"submit\"\n  }, __(\"Save Updates\", \"timetics\")) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_common_CreateOrUpdate__WEBPACK_IMPORTED_MODULE_1__[\"default\"], {\n    id: meetingId,\n    type: \"primary\",\n    htmlType: \"submit\",\n    size: \"large\",\n    buttonText: meetingId ? \"Update Meeting\" : \"Create Meeting\"\n  })))));\n}\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CreateStep);\n\n//# sourceURL=webpack://timetics/./assets/src/admin/pages/meeting/steps/CreateStep.js?");

/***/ }),

/***/ "./assets/src/common/UseRequestConfig.js":
/*!***********************************************!*\
  !*** ./assets/src/common/UseRequestConfig.js ***!
  \***********************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _admin_actionCreators_actions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../admin/actionCreators/actions */ \"./assets/src/admin/actionCreators/actions.js\");\n/* harmony import */ var _admin_context_provider__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../admin/context/provider */ \"./assets/src/admin/context/provider.js\");\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\n\nfunction useRequestConfig() {\n  var _useStateValue = (0,_admin_context_provider__WEBPACK_IMPORTED_MODULE_1__.useStateValue)(),\n    _useStateValue2 = _slicedToArray(_useStateValue, 2),\n    meeting = _useStateValue2[0].meeting,\n    dispatch = _useStateValue2[1];\n  var per_page = meeting.per_page,\n    paged = meeting.paged;\n  var getRequestConfig = function getRequestConfig(_ref) {\n    var _ref$method = _ref.method,\n      method = _ref$method === void 0 ? \"GET\" : _ref$method,\n      _ref$_per_page = _ref._per_page,\n      _per_page = _ref$_per_page === void 0 ? per_page : _ref$_per_page,\n      _ref$_paged = _ref._paged,\n      _paged = _ref$_paged === void 0 ? paged : _ref$_paged;\n    return {\n      method: method,\n      params: {\n        per_page: _per_page,\n        paged: _paged\n      }\n    };\n  };\n  var setRequestConfig = function setRequestConfig(_ref2) {\n    var _ref2$per_page = _ref2.per_page,\n      per_page = _ref2$per_page === void 0 ? per_page : _ref2$per_page,\n      _ref2$paged = _ref2.paged,\n      paged = _ref2$paged === void 0 ? paged : _ref2$paged;\n    dispatch({\n      type: _admin_actionCreators_actions__WEBPACK_IMPORTED_MODULE_0__.actions.SET_PAGINGATE_DATA,\n      payload: {\n        per_page: per_page,\n        paged: paged\n      }\n    });\n  };\n  var clearRequestConfig = function clearRequestConfig() {\n    dispatch({\n      type: _admin_actionCreators_actions__WEBPACK_IMPORTED_MODULE_0__.actions.SET_PAGINGATE_DATA,\n      payload: {\n        per_page: 10,\n        paged: 1\n      }\n    });\n  };\n  return {\n    getRequestConfig: getRequestConfig,\n    setRequestConfig: setRequestConfig,\n    clearRequestConfig: clearRequestConfig\n  };\n}\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (useRequestConfig);\n\n//# sourceURL=webpack://timetics/./assets/src/common/UseRequestConfig.js?");

/***/ })

}]);