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ySlice.js","components/widget/assets/media/StartBookingButton.js","components/widget/assets/media/widget-close.svg","components/widget/index.js","../node_modules/antd/es/alert/ErrorBoundary.js","../node_modules/antd/es/alert/index.js"],"sourcesContent":["import { apiSlice } from '../../store/apiSlice';\n\nconst submitRatingAndCommentTogether = async (\n { fishery_id, score, comments },\n api,\n extraOptions,\n executeBaseQuery\n) => {\n const requests = [];\n\n requests.push(\n executeBaseQuery({\n url: 'fishery/rating',\n method: 'post',\n data: {\n fishery_id: fishery_id,\n rating: score,\n },\n })\n );\n\n if (comments) {\n requests.push(\n executeBaseQuery({\n url: 'fishery/comment',\n method: 'post',\n data: {\n fishery_id: fishery_id,\n comment: comments,\n },\n })\n );\n }\n\n const results = await Promise.all(requests);\n if (results.every((res) => !res?.status || res.status === 200)) {\n return { data: results[0].data.result };\n } else {\n const error = results.find((res) => res?.status && res.data.status !== 200);\n return {\n error: {\n status: error.data.status,\n data: error.data,\n },\n };\n }\n};\n\nexport const extendedApiSlice = apiSlice\n .enhanceEndpoints({\n addTagTypes: ['Fishery', 'Quick Facts', 'Facilities', 'user_membership'],\n })\n .injectEndpoints({\n endpoints: (builder) => ({\n getFishery: builder.query({\n query: (fisheryPublicId) => ({\n url: `fishery`,\n method: 'get',\n params: { id: fisheryPublicId },\n }),\n providesTags: (result, error) =>\n error ? [] : [{ type: 'Fishery', id: result?.fishery_id }],\n }),\n getMembershipPlan: builder.query({\n query: ({ data }) => ({\n url: `fishery/membership_plans`,\n method: 'get',\n params: { fishery_id: data },\n useDefaultErrorHandler: false,\n }),\n providesTags: (result, error) =>\n error ? [] : [{ type: 'Fishery_membership', id: result?.fishery_id }],\n }),\n getUserMemberships: builder.query({\n query: ({ data }) => ({\n url: `user/memberships`,\n method: 'get',\n }),\n providesTags: (result, error) =>\n error ? [] : [{ type: 'user_membership' }],\n }),\n getMembershipsPaymentLink: builder.query({\n query: ({ plan_id }) => ({\n url: `user/memberships/payment_link`,\n method: 'get',\n params: { plan_id: plan_id },\n }),\n providesTags: (result, error) =>\n error ? [] : [{ type: 'user_membership' }],\n }),\n\n requestMembership: builder.mutation({\n query: (data) => ({\n url: 'user/memberships/request',\n method: 'post',\n data: data,\n }),\n invalidatesTags: (result, error, { fishery_id }) => [\n { type: 'user_membership' },\n ],\n }),\n markFisheryAsFavourite: builder.mutation({\n query: (fishery_id) => ({\n url: 'fav',\n method: 'post',\n data: {\n fishery_id: fishery_id,\n },\n }),\n invalidatesTags: (result, error, { fishery_id }) => [\n { type: 'Fishery', id: fishery_id },\n { type: 'Favourite' },\n ],\n }),\n\n submitReview: builder.mutation({\n queryFn: submitRatingAndCommentTogether,\n invalidatesTags: (result, error, { fishery_id }) => [\n { type: 'Fishery', id: fishery_id },\n ],\n }),\n\n getAllQuickFacts: builder.query({\n query: () => ({\n url: `fishery/quick_facts`,\n method: 'get',\n }),\n providesTags: (result, error) => [\n ...(error\n ? []\n : result.map(({ id }) => ({ type: 'Quick Facts', id }))),\n { type: 'Quick Facts', id: 'ALL' },\n ],\n }),\n\n getAllFacilities: builder.query({\n query: () => ({\n url: `fishery/facilities`,\n method: 'get',\n }),\n providesTags: (result, error) => [\n ...(error\n ? []\n : result.map(({ id }) => ({ type: 'Facilities', id }))),\n { type: 'Facilities', id: 'ALL' },\n ],\n }),\n }),\n });\n\nexport const {\n useGetFisheryQuery,\n useGetMembershipPlanQuery,\n useGetUserMembershipsQuery,\n useMarkFisheryAsFavouriteMutation,\n useSubmitReviewMutation,\n useGetAllQuickFactsQuery,\n useGetAllFacilitiesQuery,\n useRequestMembershipMutation,\n useGetMembershipsPaymentLinkQuery,\n} = extendedApiSlice;\n","import * as React from 'react';\nconst StartBookingButton = (props) => (\n \n \n \n \n \n \n);\nexport default StartBookingButton;\n","var _circle, _g;\nvar _excluded = [\"title\", \"titleId\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport * as React from \"react\";\nfunction SvgWidgetClose(_ref, svgRef) {\n var title = _ref.title,\n titleId = _ref.titleId,\n props = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: \"1em\",\n height: \"1em\",\n viewBox: \"0 0 970 970\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _circle || (_circle = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 485,\n cy: 485,\n r: 460,\n fill: \"#F2F6FA\",\n stroke: \"#CCD3D9\",\n strokeWidth: 50\n })), _g || (_g = /*#__PURE__*/React.createElement(\"g\", {\n transform: \"translate(279, 279)\"\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M30.0908 30.0909L381.909 381.909\",\n stroke: \"#1F2326\",\n strokeWidth: 60,\n strokeLinecap: \"round\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M381.909 30.0909L30.091 381.909\",\n stroke: \"#1F2326\",\n strokeWidth: 60,\n strokeLinecap: \"round\"\n }))));\n}\nvar ForwardRef = /*#__PURE__*/React.forwardRef(SvgWidgetClose);\nexport default __webpack_public_path__ + \"static/media/widget-close.b32f01df099db48991a9fcea1206253a.svg\";\nexport { ForwardRef as ReactComponent };","import { useParams } from 'react-router';\nimport React, { useEffect, useMemo, useState } from 'react';\nimport { useGetFisheryQuery } from '../fishery_profile/fisherySlice';\nimport { createSelector } from '@reduxjs/toolkit';\nimport { Alert } from 'antd';\nimport './assets/css/widget.css';\nimport '../admin/components/bookings/assets/css/admin_booking.css';\nimport '../user_bookings/assets/css/user_bookings.css';\nimport { useLocation } from 'react-router-dom';\nimport { sendWidgetMessage } from '../../utils/widgetUtils';\nimport { UserBookings } from '../user_bookings';\nimport WidgetLoading from './components/WidgetLoading';\nimport StartBookingButton from './assets/media/StartBookingButton';\nimport widgetClose from './assets/media/widget-close.svg';\n\nfunction ThirdPartyBookingWidget() {\n const searchParams = new URLSearchParams(useLocation().search);\n const fisheryId = useParams()['fishery_id'];\n const isOpen =\n (searchParams.get('open') ?? false)?.toLowerCase?.() === 'true';\n const [localIsOpen, setLocalIsOpen] = useState(isOpen);\n\n useEffect(() => {\n setLocalIsOpen(isOpen);\n }, [isOpen]);\n\n const publicIdSelector = useMemo(() => {\n return createSelector(\n (result) => result.data,\n (fisheryData) => fisheryData?.public_id\n );\n }, []);\n const {\n data: fisheryPublicId,\n isLoading: loading,\n isError: errorLoadingFisheryId,\n } = useGetFisheryQuery(fisheryId, {\n selectFromResult: (result) => ({\n ...result,\n data: publicIdSelector(result),\n }),\n });\n\n if (!localIsOpen) {\n return (\n {\n sendWidgetMessage({ type: 'widgetExpand' });\n setLocalIsOpen(true); // Optimistic update\n }}\n />\n );\n }\n\n if (loading) {\n return ;\n }\n\n if (errorLoadingFisheryId || !fisheryPublicId) {\n return (\n \n );\n }\n\n return (\n
\n {\n sendWidgetMessage({ type: 'widgetCollapse' });\n setLocalIsOpen(false); // Optimistic update\n }}\n />\n \n
\n );\n}\n\nexport default ThirdPartyBookingWidget;\n","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport * as React from 'react';\nimport Alert from '.';\nvar ErrorBoundary = /*#__PURE__*/function (_React$Component) {\n _inherits(ErrorBoundary, _React$Component);\n var _super = _createSuper(ErrorBoundary);\n function ErrorBoundary() {\n var _this;\n _classCallCheck(this, ErrorBoundary);\n _this = _super.apply(this, arguments);\n _this.state = {\n error: undefined,\n info: {\n componentStack: ''\n }\n };\n return _this;\n }\n _createClass(ErrorBoundary, [{\n key: \"componentDidCatch\",\n value: function componentDidCatch(error, info) {\n this.setState({\n error: error,\n info: info\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this$props = this.props,\n message = _this$props.message,\n description = _this$props.description,\n children = _this$props.children;\n var _this$state = this.state,\n error = _this$state.error,\n info = _this$state.info;\n var componentStack = info && info.componentStack ? info.componentStack : null;\n var errorMessage = typeof message === 'undefined' ? (error || '').toString() : message;\n var errorDescription = typeof description === 'undefined' ? componentStack : description;\n if (error) {\n return /*#__PURE__*/React.createElement(Alert, {\n type: \"error\",\n message: errorMessage,\n description: /*#__PURE__*/React.createElement(\"pre\", null, errorDescription)\n });\n }\n return children;\n }\n }]);\n return ErrorBoundary;\n}(React.Component);\nexport default ErrorBoundary;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nvar __rest = this && this.__rest || function (s, e) {\n var t = {};\n for (var p in s) {\n if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n }\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport CheckCircleFilled from \"@ant-design/icons/es/icons/CheckCircleFilled\";\nimport CheckCircleOutlined from \"@ant-design/icons/es/icons/CheckCircleOutlined\";\nimport CloseCircleFilled from \"@ant-design/icons/es/icons/CloseCircleFilled\";\nimport CloseCircleOutlined from \"@ant-design/icons/es/icons/CloseCircleOutlined\";\nimport CloseOutlined from \"@ant-design/icons/es/icons/CloseOutlined\";\nimport ExclamationCircleFilled from \"@ant-design/icons/es/icons/ExclamationCircleFilled\";\nimport ExclamationCircleOutlined from \"@ant-design/icons/es/icons/ExclamationCircleOutlined\";\nimport InfoCircleFilled from \"@ant-design/icons/es/icons/InfoCircleFilled\";\nimport InfoCircleOutlined from \"@ant-design/icons/es/icons/InfoCircleOutlined\";\nimport classNames from 'classnames';\nimport CSSMotion from 'rc-motion';\nimport * as React from 'react';\nimport { ConfigContext } from '../config-provider';\nimport getDataOrAriaProps from '../_util/getDataOrAriaProps';\nimport { replaceElement } from '../_util/reactNode';\nimport ErrorBoundary from './ErrorBoundary';\nvar iconMapFilled = {\n success: CheckCircleFilled,\n info: InfoCircleFilled,\n error: CloseCircleFilled,\n warning: ExclamationCircleFilled\n};\nvar iconMapOutlined = {\n success: CheckCircleOutlined,\n info: InfoCircleOutlined,\n error: CloseCircleOutlined,\n warning: ExclamationCircleOutlined\n};\nvar IconNode = function IconNode(props) {\n var description = props.description,\n icon = props.icon,\n prefixCls = props.prefixCls,\n type = props.type;\n var iconType = (description ? iconMapOutlined : iconMapFilled)[type] || null;\n if (icon) {\n return replaceElement(icon, /*#__PURE__*/React.createElement(\"span\", {\n className: \"\".concat(prefixCls, \"-icon\")\n }, icon), function () {\n return {\n className: classNames(\"\".concat(prefixCls, \"-icon\"), _defineProperty({}, icon.props.className, icon.props.className))\n };\n });\n }\n return /*#__PURE__*/React.createElement(iconType, {\n className: \"\".concat(prefixCls, \"-icon\")\n });\n};\nvar CloseIcon = function CloseIcon(props) {\n var isClosable = props.isClosable,\n closeText = props.closeText,\n prefixCls = props.prefixCls,\n closeIcon = props.closeIcon,\n handleClose = props.handleClose;\n return isClosable ? /*#__PURE__*/React.createElement(\"button\", {\n type: \"button\",\n onClick: handleClose,\n className: \"\".concat(prefixCls, \"-close-icon\"),\n tabIndex: 0\n }, closeText ? /*#__PURE__*/React.createElement(\"span\", {\n className: \"\".concat(prefixCls, \"-close-text\")\n }, closeText) : closeIcon) : null;\n};\nvar Alert = function Alert(_a) {\n var _classNames2;\n var description = _a.description,\n customizePrefixCls = _a.prefixCls,\n message = _a.message,\n banner = _a.banner,\n _a$className = _a.className,\n className = _a$className === void 0 ? '' : _a$className,\n style = _a.style,\n onMouseEnter = _a.onMouseEnter,\n onMouseLeave = _a.onMouseLeave,\n onClick = _a.onClick,\n afterClose = _a.afterClose,\n showIcon = _a.showIcon,\n closable = _a.closable,\n closeText = _a.closeText,\n _a$closeIcon = _a.closeIcon,\n closeIcon = _a$closeIcon === void 0 ? /*#__PURE__*/React.createElement(CloseOutlined, null) : _a$closeIcon,\n action = _a.action,\n props = __rest(_a, [\"description\", \"prefixCls\", \"message\", \"banner\", \"className\", \"style\", \"onMouseEnter\", \"onMouseLeave\", \"onClick\", \"afterClose\", \"showIcon\", \"closable\", \"closeText\", \"closeIcon\", \"action\"]);\n var _React$useState = React.useState(false),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n closed = _React$useState2[0],\n setClosed = _React$useState2[1];\n var ref = React.useRef();\n var _React$useContext = React.useContext(ConfigContext),\n getPrefixCls = _React$useContext.getPrefixCls,\n direction = _React$useContext.direction;\n var prefixCls = getPrefixCls('alert', customizePrefixCls);\n var handleClose = function handleClose(e) {\n var _a;\n setClosed(true);\n (_a = props.onClose) === null || _a === void 0 ? void 0 : _a.call(props, e);\n };\n var getType = function getType() {\n var type = props.type;\n if (type !== undefined) {\n return type;\n }\n // banner 模式默认为警告\n return banner ? 'warning' : 'info';\n };\n // closeable when closeText is assigned\n var isClosable = closeText ? true : closable;\n var type = getType();\n // banner 模式默认有 Icon\n var isShowIcon = banner && showIcon === undefined ? true : showIcon;\n var alertCls = classNames(prefixCls, \"\".concat(prefixCls, \"-\").concat(type), (_classNames2 = {}, _defineProperty(_classNames2, \"\".concat(prefixCls, \"-with-description\"), !!description), _defineProperty(_classNames2, \"\".concat(prefixCls, \"-no-icon\"), !isShowIcon), _defineProperty(_classNames2, \"\".concat(prefixCls, \"-banner\"), !!banner), _defineProperty(_classNames2, \"\".concat(prefixCls, \"-rtl\"), direction === 'rtl'), _classNames2), className);\n var dataOrAriaProps = getDataOrAriaProps(props);\n return /*#__PURE__*/React.createElement(CSSMotion, {\n visible: !closed,\n motionName: \"\".concat(prefixCls, \"-motion\"),\n motionAppear: false,\n motionEnter: false,\n onLeaveStart: function onLeaveStart(node) {\n return {\n maxHeight: node.offsetHeight\n };\n },\n onLeaveEnd: afterClose\n }, function (_ref) {\n var motionClassName = _ref.className,\n motionStyle = _ref.style;\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n ref: ref,\n \"data-show\": !closed,\n className: classNames(alertCls, motionClassName),\n style: _extends(_extends({}, style), motionStyle),\n onMouseEnter: onMouseEnter,\n onMouseLeave: onMouseLeave,\n onClick: onClick,\n role: \"alert\"\n }, dataOrAriaProps), isShowIcon ? /*#__PURE__*/React.createElement(IconNode, {\n description: description,\n icon: props.icon,\n prefixCls: prefixCls,\n type: type\n }) : null, /*#__PURE__*/React.createElement(\"div\", {\n className: \"\".concat(prefixCls, \"-content\")\n }, message ? /*#__PURE__*/React.createElement(\"div\", {\n className: \"\".concat(prefixCls, \"-message\")\n }, message) : null, description ? /*#__PURE__*/React.createElement(\"div\", {\n className: \"\".concat(prefixCls, \"-description\")\n }, description) : null), action ? /*#__PURE__*/React.createElement(\"div\", {\n className: \"\".concat(prefixCls, \"-action\")\n }, action) : null, /*#__PURE__*/React.createElement(CloseIcon, {\n isClosable: !!isClosable,\n closeText: closeText,\n prefixCls: prefixCls,\n closeIcon: closeIcon,\n handleClose: handleClose\n }));\n });\n};\nAlert.ErrorBoundary = ErrorBoundary;\nexport default Alert;"],"names":["submitRatingAndCommentTogether","_ref2","_asyncToGenerator","_regeneratorRuntime","mark","_callee","_ref","api","extraOptions","executeBaseQuery","fishery_id","score","comments","requests","results","error","wrap","_context","prev","next","push","url","method","data","rating","comment","Promise","all","sent","every","res","status","abrupt","result","find","stop","_x","_x2","_x3","_x4","apply","arguments","extendedApiSlice","apiSlice","addTagTypes","injectEndpoints","endpoints","builder","getFishery","query","fisheryPublicId","params","id","providesTags","type","getMembershipPlan","_ref3","useDefaultErrorHandler","getUserMemberships","_ref4","getMembershipsPaymentLink","_ref5","plan_id","requestMembership","mutation","invalidatesTags","_ref6","markFisheryAsFavourite","_ref7","submitReview","queryFn","_ref8","getAllQuickFacts","concat","_toConsumableArray","map","_ref9","getAllFacilities","_ref10","useGetFisheryQuery","useGetMembershipPlanQuery","useGetUserMembershipsQuery","useMarkFisheryAsFavouriteMutation","useSubmitReviewMutation","useGetAllQuickFactsQuery","useGetAllFacilitiesQuery","useRequestMembershipMutation","useGetMembershipsPaymentLinkQuery","props","_jsxs","_objectSpread","xmlns","width","height","fill","viewBox","children","_jsx","x","y","stroke","strokeWidth","rx","d","_ref$toLowerCase","_searchParams$get","searchParams","URLSearchParams","useLocation","search","fisheryId","useParams","isOpen","get","toLowerCase","call","_useState","useState","_useState2","_slicedToArray","localIsOpen","setLocalIsOpen","useEffect","publicIdSelector","useMemo","createSelector","fisheryData","public_id","_useGetFisheryQuery","selectFromResult","loading","isLoading","errorLoadingFisheryId","isError","WidgetLoading","Alert","message","description","className","src","widgetClose","alt","role","onClick","sendWidgetMessage","UserBookings","String","inWidget","StartBookingButton","ErrorBoundary","_React$Component","_inherits","_super","_createSuper","_this","_classCallCheck","this","state","undefined","info","componentStack","_createClass","key","value","setState","_this$props","_this$state","errorMessage","toString","errorDescription","React","__rest","s","e","t","p","Object","prototype","hasOwnProperty","indexOf","getOwnPropertySymbols","i","length","propertyIsEnumerable","iconMapFilled","success","CheckCircleFilled","InfoCircleFilled","CloseCircleFilled","warning","ExclamationCircleFilled","iconMapOutlined","CheckCircleOutlined","InfoCircleOutlined","CloseCircleOutlined","ExclamationCircleOutlined","IconNode","icon","prefixCls","iconType","replaceElement","classNames","_defineProperty","CloseIcon","isClosable","closeText","closeIcon","handleClose","tabIndex","_a","_classNames2","customizePrefixCls","banner","_a$className","style","onMouseEnter","onMouseLeave","afterClose","showIcon","closable","_a$closeIcon","CloseOutlined","action","_React$useState","_React$useState2","closed","setClosed","ref","_React$useContext","ConfigContext","getPrefixCls","direction","onClose","getType","isShowIcon","alertCls","dataOrAriaProps","getDataOrAriaProps","CSSMotion","visible","motionName","motionAppear","motionEnter","onLeaveStart","node","maxHeight","offsetHeight","onLeaveEnd","motionClassName","motionStyle","_extends"],"sourceRoot":""}