medos-sdk 1.1.11 → 1.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/MedosClient.js +1 -1
- package/dist/components/appointment-booking/AppointmentCalender.js +10 -72
- package/dist/components/appointment-booking/appointment-modal-styles.d.ts +272 -0
- package/dist/components/appointment-booking/appointment-modal-styles.js +419 -0
- package/dist/components/appointment-booking/components/AppointmentConfirmationStep.d.ts +28 -0
- package/dist/components/appointment-booking/components/AppointmentConfirmationStep.js +107 -0
- package/dist/components/appointment-booking/components/AppointmentDateTimeModal.d.ts +18 -0
- package/dist/components/appointment-booking/components/AppointmentDateTimeModal.js +306 -0
- package/dist/components/appointment-booking/components/AppointmentSummaryStep.d.ts +12 -0
- package/dist/components/appointment-booking/components/AppointmentSummaryStep.js +194 -0
- package/dist/components/appointment-booking/components/BookingOptionStep.d.ts +14 -0
- package/dist/components/appointment-booking/components/BookingOptionStep.js +350 -0
- package/dist/components/appointment-booking/components/DoctorSelectModal.d.ts +14 -0
- package/dist/components/appointment-booking/components/DoctorSelectModal.js +213 -0
- package/dist/components/appointment-booking/components/PatientDetailsStep.d.ts +3 -0
- package/dist/components/appointment-booking/components/PatientDetailsStep.js +96 -0
- package/dist/components/appointment-booking/components/PatientSelectionStep.d.ts +12 -0
- package/dist/components/appointment-booking/components/PatientSelectionStep.js +254 -0
- package/dist/components/appointment-booking/components/PhoneVerificationStep.d.ts +3 -0
- package/dist/components/appointment-booking/components/PhoneVerificationStep.js +49 -0
- package/dist/components/appointment-booking/components/SuccessStep.d.ts +5 -0
- package/dist/components/appointment-booking/components/SuccessStep.js +9 -0
- package/dist/components/appointment-booking/components/index.d.ts +9 -0
- package/dist/components/appointment-booking/components/index.js +9 -0
- package/dist/components/appointment-booking/hooks/useAppointmentFlow.js +1 -0
- package/dist/components/appointment-booking/index.d.ts +2 -4
- package/dist/components/appointment-booking/index.js +2 -2
- package/dist/components/appointment-booking/types.d.ts +4 -0
- package/dist/components/constants/constant.d.ts +2 -0
- package/dist/components/constants/constant.js +15 -0
- package/dist/components/constants/index.d.ts +3 -0
- package/dist/components/constants/index.js +24 -0
- package/dist/components/constants/options.d.ts +13 -0
- package/dist/components/constants/options.js +35 -0
- package/dist/components/constants/validation.d.ts +6 -0
- package/dist/components/constants/validation.js +16 -0
- package/dist/components/enquiry-form/EnquiryForm.d.ts +7 -0
- package/dist/components/enquiry-form/EnquiryForm.js +238 -0
- package/dist/components/enquiry-form/components/ContactInformationStep.d.ts +13 -0
- package/dist/components/enquiry-form/components/ContactInformationStep.js +21 -0
- package/dist/components/enquiry-form/components/ContactPreferenceStep.d.ts +9 -0
- package/dist/components/enquiry-form/components/ContactPreferenceStep.js +20 -0
- package/dist/components/enquiry-form/components/InquiryDetailsStep.d.ts +10 -0
- package/dist/components/enquiry-form/components/InquiryDetailsStep.js +20 -0
- package/dist/components/enquiry-form/components/index.d.ts +3 -0
- package/dist/components/enquiry-form/components/index.js +3 -0
- package/dist/components/enquiry-form/index.d.ts +2 -0
- package/dist/components/enquiry-form/index.js +2 -0
- package/dist/components/index.d.ts +7 -0
- package/dist/components/index.js +7 -0
- package/dist/components/shared/icons/Check.d.ts +6 -0
- package/dist/components/shared/icons/Check.js +2 -0
- package/dist/components/shared/icons/ChevronDownIcon.d.ts +4 -0
- package/dist/components/shared/icons/ChevronDownIcon.js +2 -0
- package/dist/components/shared/icons/ChevronLeft.d.ts +3 -0
- package/dist/components/shared/icons/ChevronLeft.js +3 -0
- package/dist/components/shared/icons/ChevronRight.d.ts +3 -0
- package/dist/components/shared/icons/ChevronRight.js +3 -0
- package/dist/components/shared/icons/CloseIcon.d.ts +9 -0
- package/dist/components/shared/icons/CloseIcon.js +5 -0
- package/dist/components/shared/icons/ConfirmationCheck.d.ts +1 -0
- package/dist/components/shared/icons/ConfirmationCheck.js +9 -0
- package/dist/components/shared/icons/ConsultationType.d.ts +1 -0
- package/dist/components/shared/icons/ConsultationType.js +2 -0
- package/dist/components/shared/icons/Date&TimeIcon.d.ts +1 -0
- package/dist/components/shared/icons/Date&TimeIcon.js +2 -0
- package/dist/components/shared/icons/MapIcon.d.ts +1 -0
- package/dist/components/shared/icons/MapIcon.js +2 -0
- package/dist/components/shared/icons/MedosLogo.d.ts +3 -0
- package/dist/components/shared/icons/MedosLogo.js +3 -0
- package/dist/components/shared/icons/PaymentMethodIcon.d.ts +1 -0
- package/dist/components/shared/icons/PaymentMethodIcon.js +2 -0
- package/dist/components/shared/icons/SuccessIcon.d.ts +8 -0
- package/dist/components/shared/icons/SuccessIcon.js +14 -0
- package/dist/components/shared/icons/UserIcon.d.ts +1 -0
- package/dist/components/shared/icons/UserIcon.js +2 -0
- package/dist/components/shared/icons/index.d.ts +13 -0
- package/dist/components/shared/icons/index.js +13 -0
- package/dist/components/shared/index.d.ts +2 -0
- package/dist/components/shared/index.js +2 -0
- package/dist/components/shared/ui/Calendar.d.ts +5 -0
- package/dist/components/shared/ui/Calendar.js +167 -0
- package/dist/components/shared/ui/SelectDropdown.d.ts +41 -0
- package/dist/components/shared/ui/SelectDropdown.js +301 -0
- package/dist/components/shared/ui/index.d.ts +2 -0
- package/dist/components/shared/ui/index.js +2 -0
- package/dist/components/styles/appointment.d.ts +4 -0
- package/dist/components/styles/appointment.js +220 -0
- package/dist/components/styles/enquiry.d.ts +2 -0
- package/dist/components/styles/enquiry.js +3 -0
- package/dist/components/styles/index.d.ts +2 -0
- package/dist/components/styles/index.js +2 -0
- package/dist/components/styles/shared.d.ts +3 -0
- package/dist/components/styles/shared.js +78 -0
- package/dist/components/styles.d.ts +1 -6
- package/dist/components/styles.js +1 -298
- package/dist/components/theme-styles.js +18 -0
- package/dist/components/types/appointment.d.ts +42 -0
- package/dist/components/types/appointment.js +1 -0
- package/dist/components/types/common.d.ts +24 -0
- package/dist/components/types/common.js +1 -0
- package/dist/components/types/enquiry.d.ts +59 -0
- package/dist/components/types/enquiry.js +1 -0
- package/dist/components/types/index.d.ts +4 -0
- package/dist/components/types/index.js +4 -0
- package/dist/components/types.d.ts +1 -54
- package/dist/components/types.js +1 -38
- package/dist/components/utils/date.d.ts +4 -0
- package/dist/components/utils/date.js +65 -0
- package/dist/components/utils/formatting.d.ts +4 -0
- package/dist/components/utils/formatting.js +9 -0
- package/dist/components/utils/index.d.ts +3 -0
- package/dist/components/utils/index.js +3 -0
- package/dist/components/utils/validation.d.ts +4 -0
- package/dist/components/utils/validation.js +37 -0
- package/dist/components/utils.d.ts +1 -8
- package/dist/components/utils.js +1 -74
- package/dist/components/validation.d.ts +1 -4
- package/dist/components/validation.js +1 -48
- package/dist/constants/index.d.ts +1 -1
- package/dist/constants/index.js +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/react/index.d.ts +3 -3
- package/dist/react/index.js +1 -1
- package/dist/services/AppointmentService.js +26 -9
- package/dist/services/AuthService.js +1 -1
- package/dist/vanilla/AppointmentCalendarWidget.d.ts +8 -0
- package/dist/vanilla/AppointmentCalendarWidget.js +598 -20
- package/dist/vanilla/components/appointment-booking/appointment-modal-styles.d.ts +272 -0
- package/dist/vanilla/components/appointment-booking/components/AppointmentConfirmationStep.d.ts +28 -0
- package/dist/vanilla/components/appointment-booking/components/AppointmentDateTimeModal.d.ts +18 -0
- package/dist/vanilla/components/appointment-booking/components/AppointmentSummaryStep.d.ts +12 -0
- package/dist/vanilla/components/appointment-booking/components/BookingOptionStep.d.ts +14 -0
- package/dist/vanilla/components/appointment-booking/components/DoctorSelectModal.d.ts +14 -0
- package/dist/vanilla/components/appointment-booking/components/PatientDetailsStep.d.ts +3 -0
- package/dist/vanilla/components/appointment-booking/components/PatientSelectionStep.d.ts +12 -0
- package/dist/vanilla/components/appointment-booking/components/PhoneVerificationStep.d.ts +3 -0
- package/dist/vanilla/components/appointment-booking/components/SuccessStep.d.ts +5 -0
- package/dist/vanilla/components/appointment-booking/components/index.d.ts +9 -0
- package/dist/vanilla/components/appointment-booking/index.d.ts +2 -4
- package/dist/vanilla/components/appointment-booking/types.d.ts +4 -0
- package/dist/vanilla/components/constants/constant.d.ts +2 -0
- package/dist/vanilla/components/constants/index.d.ts +3 -0
- package/dist/vanilla/components/constants/options.d.ts +13 -0
- package/dist/vanilla/components/constants/validation.d.ts +6 -0
- package/dist/vanilla/components/enquiry-form/EnquiryForm.d.ts +7 -0
- package/dist/vanilla/components/enquiry-form/components/ContactInformationStep.d.ts +13 -0
- package/dist/vanilla/components/enquiry-form/components/ContactPreferenceStep.d.ts +9 -0
- package/dist/vanilla/components/enquiry-form/components/InquiryDetailsStep.d.ts +10 -0
- package/dist/vanilla/components/enquiry-form/components/index.d.ts +3 -0
- package/dist/vanilla/components/enquiry-form/index.d.ts +2 -0
- package/dist/vanilla/components/index.d.ts +7 -3
- package/dist/vanilla/components/shared/icons/Check.d.ts +6 -0
- package/dist/vanilla/components/shared/icons/ChevronDownIcon.d.ts +4 -0
- package/dist/vanilla/components/shared/icons/ChevronLeft.d.ts +3 -0
- package/dist/vanilla/components/shared/icons/ChevronRight.d.ts +3 -0
- package/dist/vanilla/components/shared/icons/CloseIcon.d.ts +9 -0
- package/dist/vanilla/components/shared/icons/ConfirmationCheck.d.ts +1 -0
- package/dist/vanilla/components/shared/icons/ConsultationType.d.ts +1 -0
- package/dist/vanilla/components/shared/icons/Date&TimeIcon.d.ts +1 -0
- package/dist/vanilla/components/shared/icons/MapIcon.d.ts +1 -0
- package/dist/vanilla/components/shared/icons/MedosLogo.d.ts +3 -0
- package/dist/vanilla/components/shared/icons/PaymentMethodIcon.d.ts +1 -0
- package/dist/vanilla/components/shared/icons/SuccessIcon.d.ts +8 -0
- package/dist/vanilla/components/shared/icons/UserIcon.d.ts +1 -0
- package/dist/vanilla/components/shared/icons/index.d.ts +13 -0
- package/dist/vanilla/components/shared/index.d.ts +2 -0
- package/dist/vanilla/components/shared/ui/Calendar.d.ts +5 -0
- package/dist/vanilla/components/shared/ui/SelectDropdown.d.ts +41 -0
- package/dist/vanilla/components/shared/ui/index.d.ts +2 -0
- package/dist/vanilla/components/styles/appointment.d.ts +4 -0
- package/dist/vanilla/components/styles/enquiry.d.ts +2 -0
- package/dist/vanilla/components/styles/index.d.ts +2 -0
- package/dist/vanilla/components/styles/shared.d.ts +3 -0
- package/dist/vanilla/components/styles.d.ts +1 -6
- package/dist/vanilla/components/types/appointment.d.ts +42 -0
- package/dist/vanilla/components/types/common.d.ts +24 -0
- package/dist/vanilla/components/types/enquiry.d.ts +59 -0
- package/dist/vanilla/components/types/index.d.ts +4 -0
- package/dist/vanilla/components/types.d.ts +1 -54
- package/dist/vanilla/components/utils/date.d.ts +4 -0
- package/dist/vanilla/components/utils/formatting.d.ts +4 -0
- package/dist/vanilla/components/utils/index.d.ts +3 -0
- package/dist/vanilla/components/utils/validation.d.ts +4 -0
- package/dist/vanilla/components/utils.d.ts +1 -8
- package/dist/vanilla/components/validation.d.ts +1 -4
- package/dist/vanilla/constants/index.d.ts +1 -1
- package/dist/vanilla/enquiry-widget.js +3277 -56
- package/dist/vanilla/index.d.ts +2 -2
- package/dist/vanilla/react/index.d.ts +3 -3
- package/dist/vanilla/vanilla/AppointmentCalendarWidget.d.ts +8 -0
- package/dist/vanilla/widget.css +214 -0
- package/dist/vanilla/widget.js +4047 -187
- package/package.json +2 -2
package/dist/vanilla/widget.js
CHANGED
|
@@ -3841,8 +3841,3434 @@ const {
|
|
|
3841
3841
|
mergeConfig
|
|
3842
3842
|
} = axios;
|
|
3843
3843
|
|
|
3844
|
+
function getDefaultExportFromCjs (x) {
|
|
3845
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
3846
|
+
}
|
|
3847
|
+
|
|
3848
|
+
var jsxRuntime = {exports: {}};
|
|
3849
|
+
|
|
3850
|
+
var reactJsxRuntime_production = {};
|
|
3851
|
+
|
|
3852
|
+
/**
|
|
3853
|
+
* @license React
|
|
3854
|
+
* react-jsx-runtime.production.js
|
|
3855
|
+
*
|
|
3856
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3857
|
+
*
|
|
3858
|
+
* This source code is licensed under the MIT license found in the
|
|
3859
|
+
* LICENSE file in the root directory of this source tree.
|
|
3860
|
+
*/
|
|
3861
|
+
|
|
3862
|
+
var hasRequiredReactJsxRuntime_production;
|
|
3863
|
+
|
|
3864
|
+
function requireReactJsxRuntime_production () {
|
|
3865
|
+
if (hasRequiredReactJsxRuntime_production) return reactJsxRuntime_production;
|
|
3866
|
+
hasRequiredReactJsxRuntime_production = 1;
|
|
3867
|
+
var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
|
|
3868
|
+
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
|
|
3869
|
+
function jsxProd(type, config, maybeKey) {
|
|
3870
|
+
var key = null;
|
|
3871
|
+
void 0 !== maybeKey && (key = "" + maybeKey);
|
|
3872
|
+
void 0 !== config.key && (key = "" + config.key);
|
|
3873
|
+
if ("key" in config) {
|
|
3874
|
+
maybeKey = {};
|
|
3875
|
+
for (var propName in config)
|
|
3876
|
+
"key" !== propName && (maybeKey[propName] = config[propName]);
|
|
3877
|
+
} else maybeKey = config;
|
|
3878
|
+
config = maybeKey.ref;
|
|
3879
|
+
return {
|
|
3880
|
+
$$typeof: REACT_ELEMENT_TYPE,
|
|
3881
|
+
type: type,
|
|
3882
|
+
key: key,
|
|
3883
|
+
ref: void 0 !== config ? config : null,
|
|
3884
|
+
props: maybeKey
|
|
3885
|
+
};
|
|
3886
|
+
}
|
|
3887
|
+
reactJsxRuntime_production.Fragment = REACT_FRAGMENT_TYPE;
|
|
3888
|
+
reactJsxRuntime_production.jsx = jsxProd;
|
|
3889
|
+
reactJsxRuntime_production.jsxs = jsxProd;
|
|
3890
|
+
return reactJsxRuntime_production;
|
|
3891
|
+
}
|
|
3892
|
+
|
|
3893
|
+
var reactJsxRuntime_development = {};
|
|
3894
|
+
|
|
3895
|
+
var react = {exports: {}};
|
|
3896
|
+
|
|
3897
|
+
var react_production = {};
|
|
3898
|
+
|
|
3899
|
+
/**
|
|
3900
|
+
* @license React
|
|
3901
|
+
* react.production.js
|
|
3902
|
+
*
|
|
3903
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3904
|
+
*
|
|
3905
|
+
* This source code is licensed under the MIT license found in the
|
|
3906
|
+
* LICENSE file in the root directory of this source tree.
|
|
3907
|
+
*/
|
|
3908
|
+
|
|
3909
|
+
var hasRequiredReact_production;
|
|
3910
|
+
|
|
3911
|
+
function requireReact_production () {
|
|
3912
|
+
if (hasRequiredReact_production) return react_production;
|
|
3913
|
+
hasRequiredReact_production = 1;
|
|
3914
|
+
var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
|
|
3915
|
+
REACT_PORTAL_TYPE = Symbol.for("react.portal"),
|
|
3916
|
+
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
|
|
3917
|
+
REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
|
|
3918
|
+
REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
|
|
3919
|
+
REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
|
|
3920
|
+
REACT_CONTEXT_TYPE = Symbol.for("react.context"),
|
|
3921
|
+
REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
|
|
3922
|
+
REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
|
|
3923
|
+
REACT_MEMO_TYPE = Symbol.for("react.memo"),
|
|
3924
|
+
REACT_LAZY_TYPE = Symbol.for("react.lazy"),
|
|
3925
|
+
REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
|
|
3926
|
+
MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
|
|
3927
|
+
function getIteratorFn(maybeIterable) {
|
|
3928
|
+
if (null === maybeIterable || "object" !== typeof maybeIterable) return null;
|
|
3929
|
+
maybeIterable =
|
|
3930
|
+
(MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||
|
|
3931
|
+
maybeIterable["@@iterator"];
|
|
3932
|
+
return "function" === typeof maybeIterable ? maybeIterable : null;
|
|
3933
|
+
}
|
|
3934
|
+
var ReactNoopUpdateQueue = {
|
|
3935
|
+
isMounted: function () {
|
|
3936
|
+
return false;
|
|
3937
|
+
},
|
|
3938
|
+
enqueueForceUpdate: function () {},
|
|
3939
|
+
enqueueReplaceState: function () {},
|
|
3940
|
+
enqueueSetState: function () {}
|
|
3941
|
+
},
|
|
3942
|
+
assign = Object.assign,
|
|
3943
|
+
emptyObject = {};
|
|
3944
|
+
function Component(props, context, updater) {
|
|
3945
|
+
this.props = props;
|
|
3946
|
+
this.context = context;
|
|
3947
|
+
this.refs = emptyObject;
|
|
3948
|
+
this.updater = updater || ReactNoopUpdateQueue;
|
|
3949
|
+
}
|
|
3950
|
+
Component.prototype.isReactComponent = {};
|
|
3951
|
+
Component.prototype.setState = function (partialState, callback) {
|
|
3952
|
+
if (
|
|
3953
|
+
"object" !== typeof partialState &&
|
|
3954
|
+
"function" !== typeof partialState &&
|
|
3955
|
+
null != partialState
|
|
3956
|
+
)
|
|
3957
|
+
throw Error(
|
|
3958
|
+
"takes an object of state variables to update or a function which returns an object of state variables."
|
|
3959
|
+
);
|
|
3960
|
+
this.updater.enqueueSetState(this, partialState, callback, "setState");
|
|
3961
|
+
};
|
|
3962
|
+
Component.prototype.forceUpdate = function (callback) {
|
|
3963
|
+
this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
|
|
3964
|
+
};
|
|
3965
|
+
function ComponentDummy() {}
|
|
3966
|
+
ComponentDummy.prototype = Component.prototype;
|
|
3967
|
+
function PureComponent(props, context, updater) {
|
|
3968
|
+
this.props = props;
|
|
3969
|
+
this.context = context;
|
|
3970
|
+
this.refs = emptyObject;
|
|
3971
|
+
this.updater = updater || ReactNoopUpdateQueue;
|
|
3972
|
+
}
|
|
3973
|
+
var pureComponentPrototype = (PureComponent.prototype = new ComponentDummy());
|
|
3974
|
+
pureComponentPrototype.constructor = PureComponent;
|
|
3975
|
+
assign(pureComponentPrototype, Component.prototype);
|
|
3976
|
+
pureComponentPrototype.isPureReactComponent = true;
|
|
3977
|
+
var isArrayImpl = Array.isArray;
|
|
3978
|
+
function noop() {}
|
|
3979
|
+
var ReactSharedInternals = { H: null, A: null, T: null, S: null },
|
|
3980
|
+
hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
3981
|
+
function ReactElement(type, key, props) {
|
|
3982
|
+
var refProp = props.ref;
|
|
3983
|
+
return {
|
|
3984
|
+
$$typeof: REACT_ELEMENT_TYPE,
|
|
3985
|
+
type: type,
|
|
3986
|
+
key: key,
|
|
3987
|
+
ref: void 0 !== refProp ? refProp : null,
|
|
3988
|
+
props: props
|
|
3989
|
+
};
|
|
3990
|
+
}
|
|
3991
|
+
function cloneAndReplaceKey(oldElement, newKey) {
|
|
3992
|
+
return ReactElement(oldElement.type, newKey, oldElement.props);
|
|
3993
|
+
}
|
|
3994
|
+
function isValidElement(object) {
|
|
3995
|
+
return (
|
|
3996
|
+
"object" === typeof object &&
|
|
3997
|
+
null !== object &&
|
|
3998
|
+
object.$$typeof === REACT_ELEMENT_TYPE
|
|
3999
|
+
);
|
|
4000
|
+
}
|
|
4001
|
+
function escape(key) {
|
|
4002
|
+
var escaperLookup = { "=": "=0", ":": "=2" };
|
|
4003
|
+
return (
|
|
4004
|
+
"$" +
|
|
4005
|
+
key.replace(/[=:]/g, function (match) {
|
|
4006
|
+
return escaperLookup[match];
|
|
4007
|
+
})
|
|
4008
|
+
);
|
|
4009
|
+
}
|
|
4010
|
+
var userProvidedKeyEscapeRegex = /\/+/g;
|
|
4011
|
+
function getElementKey(element, index) {
|
|
4012
|
+
return "object" === typeof element && null !== element && null != element.key
|
|
4013
|
+
? escape("" + element.key)
|
|
4014
|
+
: index.toString(36);
|
|
4015
|
+
}
|
|
4016
|
+
function resolveThenable(thenable) {
|
|
4017
|
+
switch (thenable.status) {
|
|
4018
|
+
case "fulfilled":
|
|
4019
|
+
return thenable.value;
|
|
4020
|
+
case "rejected":
|
|
4021
|
+
throw thenable.reason;
|
|
4022
|
+
default:
|
|
4023
|
+
switch (
|
|
4024
|
+
("string" === typeof thenable.status
|
|
4025
|
+
? thenable.then(noop, noop)
|
|
4026
|
+
: ((thenable.status = "pending"),
|
|
4027
|
+
thenable.then(
|
|
4028
|
+
function (fulfilledValue) {
|
|
4029
|
+
"pending" === thenable.status &&
|
|
4030
|
+
((thenable.status = "fulfilled"),
|
|
4031
|
+
(thenable.value = fulfilledValue));
|
|
4032
|
+
},
|
|
4033
|
+
function (error) {
|
|
4034
|
+
"pending" === thenable.status &&
|
|
4035
|
+
((thenable.status = "rejected"), (thenable.reason = error));
|
|
4036
|
+
}
|
|
4037
|
+
)),
|
|
4038
|
+
thenable.status)
|
|
4039
|
+
) {
|
|
4040
|
+
case "fulfilled":
|
|
4041
|
+
return thenable.value;
|
|
4042
|
+
case "rejected":
|
|
4043
|
+
throw thenable.reason;
|
|
4044
|
+
}
|
|
4045
|
+
}
|
|
4046
|
+
throw thenable;
|
|
4047
|
+
}
|
|
4048
|
+
function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
|
|
4049
|
+
var type = typeof children;
|
|
4050
|
+
if ("undefined" === type || "boolean" === type) children = null;
|
|
4051
|
+
var invokeCallback = false;
|
|
4052
|
+
if (null === children) invokeCallback = true;
|
|
4053
|
+
else
|
|
4054
|
+
switch (type) {
|
|
4055
|
+
case "bigint":
|
|
4056
|
+
case "string":
|
|
4057
|
+
case "number":
|
|
4058
|
+
invokeCallback = true;
|
|
4059
|
+
break;
|
|
4060
|
+
case "object":
|
|
4061
|
+
switch (children.$$typeof) {
|
|
4062
|
+
case REACT_ELEMENT_TYPE:
|
|
4063
|
+
case REACT_PORTAL_TYPE:
|
|
4064
|
+
invokeCallback = true;
|
|
4065
|
+
break;
|
|
4066
|
+
case REACT_LAZY_TYPE:
|
|
4067
|
+
return (
|
|
4068
|
+
(invokeCallback = children._init),
|
|
4069
|
+
mapIntoArray(
|
|
4070
|
+
invokeCallback(children._payload),
|
|
4071
|
+
array,
|
|
4072
|
+
escapedPrefix,
|
|
4073
|
+
nameSoFar,
|
|
4074
|
+
callback
|
|
4075
|
+
)
|
|
4076
|
+
);
|
|
4077
|
+
}
|
|
4078
|
+
}
|
|
4079
|
+
if (invokeCallback)
|
|
4080
|
+
return (
|
|
4081
|
+
(callback = callback(children)),
|
|
4082
|
+
(invokeCallback =
|
|
4083
|
+
"" === nameSoFar ? "." + getElementKey(children, 0) : nameSoFar),
|
|
4084
|
+
isArrayImpl(callback)
|
|
4085
|
+
? ((escapedPrefix = ""),
|
|
4086
|
+
null != invokeCallback &&
|
|
4087
|
+
(escapedPrefix =
|
|
4088
|
+
invokeCallback.replace(userProvidedKeyEscapeRegex, "$&/") + "/"),
|
|
4089
|
+
mapIntoArray(callback, array, escapedPrefix, "", function (c) {
|
|
4090
|
+
return c;
|
|
4091
|
+
}))
|
|
4092
|
+
: null != callback &&
|
|
4093
|
+
(isValidElement(callback) &&
|
|
4094
|
+
(callback = cloneAndReplaceKey(
|
|
4095
|
+
callback,
|
|
4096
|
+
escapedPrefix +
|
|
4097
|
+
(null == callback.key ||
|
|
4098
|
+
(children && children.key === callback.key)
|
|
4099
|
+
? ""
|
|
4100
|
+
: ("" + callback.key).replace(
|
|
4101
|
+
userProvidedKeyEscapeRegex,
|
|
4102
|
+
"$&/"
|
|
4103
|
+
) + "/") +
|
|
4104
|
+
invokeCallback
|
|
4105
|
+
)),
|
|
4106
|
+
array.push(callback)),
|
|
4107
|
+
1
|
|
4108
|
+
);
|
|
4109
|
+
invokeCallback = 0;
|
|
4110
|
+
var nextNamePrefix = "" === nameSoFar ? "." : nameSoFar + ":";
|
|
4111
|
+
if (isArrayImpl(children))
|
|
4112
|
+
for (var i = 0; i < children.length; i++)
|
|
4113
|
+
(nameSoFar = children[i]),
|
|
4114
|
+
(type = nextNamePrefix + getElementKey(nameSoFar, i)),
|
|
4115
|
+
(invokeCallback += mapIntoArray(
|
|
4116
|
+
nameSoFar,
|
|
4117
|
+
array,
|
|
4118
|
+
escapedPrefix,
|
|
4119
|
+
type,
|
|
4120
|
+
callback
|
|
4121
|
+
));
|
|
4122
|
+
else if (((i = getIteratorFn(children)), "function" === typeof i))
|
|
4123
|
+
for (
|
|
4124
|
+
children = i.call(children), i = 0;
|
|
4125
|
+
!(nameSoFar = children.next()).done;
|
|
4126
|
+
|
|
4127
|
+
)
|
|
4128
|
+
(nameSoFar = nameSoFar.value),
|
|
4129
|
+
(type = nextNamePrefix + getElementKey(nameSoFar, i++)),
|
|
4130
|
+
(invokeCallback += mapIntoArray(
|
|
4131
|
+
nameSoFar,
|
|
4132
|
+
array,
|
|
4133
|
+
escapedPrefix,
|
|
4134
|
+
type,
|
|
4135
|
+
callback
|
|
4136
|
+
));
|
|
4137
|
+
else if ("object" === type) {
|
|
4138
|
+
if ("function" === typeof children.then)
|
|
4139
|
+
return mapIntoArray(
|
|
4140
|
+
resolveThenable(children),
|
|
4141
|
+
array,
|
|
4142
|
+
escapedPrefix,
|
|
4143
|
+
nameSoFar,
|
|
4144
|
+
callback
|
|
4145
|
+
);
|
|
4146
|
+
array = String(children);
|
|
4147
|
+
throw Error(
|
|
4148
|
+
"Objects are not valid as a React child (found: " +
|
|
4149
|
+
("[object Object]" === array
|
|
4150
|
+
? "object with keys {" + Object.keys(children).join(", ") + "}"
|
|
4151
|
+
: array) +
|
|
4152
|
+
"). If you meant to render a collection of children, use an array instead."
|
|
4153
|
+
);
|
|
4154
|
+
}
|
|
4155
|
+
return invokeCallback;
|
|
4156
|
+
}
|
|
4157
|
+
function mapChildren(children, func, context) {
|
|
4158
|
+
if (null == children) return children;
|
|
4159
|
+
var result = [],
|
|
4160
|
+
count = 0;
|
|
4161
|
+
mapIntoArray(children, result, "", "", function (child) {
|
|
4162
|
+
return func.call(context, child, count++);
|
|
4163
|
+
});
|
|
4164
|
+
return result;
|
|
4165
|
+
}
|
|
4166
|
+
function lazyInitializer(payload) {
|
|
4167
|
+
if (-1 === payload._status) {
|
|
4168
|
+
var ctor = payload._result;
|
|
4169
|
+
ctor = ctor();
|
|
4170
|
+
ctor.then(
|
|
4171
|
+
function (moduleObject) {
|
|
4172
|
+
if (0 === payload._status || -1 === payload._status)
|
|
4173
|
+
(payload._status = 1), (payload._result = moduleObject);
|
|
4174
|
+
},
|
|
4175
|
+
function (error) {
|
|
4176
|
+
if (0 === payload._status || -1 === payload._status)
|
|
4177
|
+
(payload._status = 2), (payload._result = error);
|
|
4178
|
+
}
|
|
4179
|
+
);
|
|
4180
|
+
-1 === payload._status && ((payload._status = 0), (payload._result = ctor));
|
|
4181
|
+
}
|
|
4182
|
+
if (1 === payload._status) return payload._result.default;
|
|
4183
|
+
throw payload._result;
|
|
4184
|
+
}
|
|
4185
|
+
var reportGlobalError =
|
|
4186
|
+
"function" === typeof reportError
|
|
4187
|
+
? reportError
|
|
4188
|
+
: function (error) {
|
|
4189
|
+
if (
|
|
4190
|
+
"object" === typeof window &&
|
|
4191
|
+
"function" === typeof window.ErrorEvent
|
|
4192
|
+
) {
|
|
4193
|
+
var event = new window.ErrorEvent("error", {
|
|
4194
|
+
bubbles: true,
|
|
4195
|
+
cancelable: true,
|
|
4196
|
+
message:
|
|
4197
|
+
"object" === typeof error &&
|
|
4198
|
+
null !== error &&
|
|
4199
|
+
"string" === typeof error.message
|
|
4200
|
+
? String(error.message)
|
|
4201
|
+
: String(error),
|
|
4202
|
+
error: error
|
|
4203
|
+
});
|
|
4204
|
+
if (!window.dispatchEvent(event)) return;
|
|
4205
|
+
} else if (
|
|
4206
|
+
"object" === typeof process &&
|
|
4207
|
+
"function" === typeof process.emit
|
|
4208
|
+
) {
|
|
4209
|
+
process.emit("uncaughtException", error);
|
|
4210
|
+
return;
|
|
4211
|
+
}
|
|
4212
|
+
console.error(error);
|
|
4213
|
+
},
|
|
4214
|
+
Children = {
|
|
4215
|
+
map: mapChildren,
|
|
4216
|
+
forEach: function (children, forEachFunc, forEachContext) {
|
|
4217
|
+
mapChildren(
|
|
4218
|
+
children,
|
|
4219
|
+
function () {
|
|
4220
|
+
forEachFunc.apply(this, arguments);
|
|
4221
|
+
},
|
|
4222
|
+
forEachContext
|
|
4223
|
+
);
|
|
4224
|
+
},
|
|
4225
|
+
count: function (children) {
|
|
4226
|
+
var n = 0;
|
|
4227
|
+
mapChildren(children, function () {
|
|
4228
|
+
n++;
|
|
4229
|
+
});
|
|
4230
|
+
return n;
|
|
4231
|
+
},
|
|
4232
|
+
toArray: function (children) {
|
|
4233
|
+
return (
|
|
4234
|
+
mapChildren(children, function (child) {
|
|
4235
|
+
return child;
|
|
4236
|
+
}) || []
|
|
4237
|
+
);
|
|
4238
|
+
},
|
|
4239
|
+
only: function (children) {
|
|
4240
|
+
if (!isValidElement(children))
|
|
4241
|
+
throw Error(
|
|
4242
|
+
"React.Children.only expected to receive a single React element child."
|
|
4243
|
+
);
|
|
4244
|
+
return children;
|
|
4245
|
+
}
|
|
4246
|
+
};
|
|
4247
|
+
react_production.Activity = REACT_ACTIVITY_TYPE;
|
|
4248
|
+
react_production.Children = Children;
|
|
4249
|
+
react_production.Component = Component;
|
|
4250
|
+
react_production.Fragment = REACT_FRAGMENT_TYPE;
|
|
4251
|
+
react_production.Profiler = REACT_PROFILER_TYPE;
|
|
4252
|
+
react_production.PureComponent = PureComponent;
|
|
4253
|
+
react_production.StrictMode = REACT_STRICT_MODE_TYPE;
|
|
4254
|
+
react_production.Suspense = REACT_SUSPENSE_TYPE;
|
|
4255
|
+
react_production.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =
|
|
4256
|
+
ReactSharedInternals;
|
|
4257
|
+
react_production.__COMPILER_RUNTIME = {
|
|
4258
|
+
__proto__: null,
|
|
4259
|
+
c: function (size) {
|
|
4260
|
+
return ReactSharedInternals.H.useMemoCache(size);
|
|
4261
|
+
}
|
|
4262
|
+
};
|
|
4263
|
+
react_production.cache = function (fn) {
|
|
4264
|
+
return function () {
|
|
4265
|
+
return fn.apply(null, arguments);
|
|
4266
|
+
};
|
|
4267
|
+
};
|
|
4268
|
+
react_production.cacheSignal = function () {
|
|
4269
|
+
return null;
|
|
4270
|
+
};
|
|
4271
|
+
react_production.cloneElement = function (element, config, children) {
|
|
4272
|
+
if (null === element || void 0 === element)
|
|
4273
|
+
throw Error(
|
|
4274
|
+
"The argument must be a React element, but you passed " + element + "."
|
|
4275
|
+
);
|
|
4276
|
+
var props = assign({}, element.props),
|
|
4277
|
+
key = element.key;
|
|
4278
|
+
if (null != config)
|
|
4279
|
+
for (propName in (void 0 !== config.key && (key = "" + config.key), config))
|
|
4280
|
+
!hasOwnProperty.call(config, propName) ||
|
|
4281
|
+
"key" === propName ||
|
|
4282
|
+
"__self" === propName ||
|
|
4283
|
+
"__source" === propName ||
|
|
4284
|
+
("ref" === propName && void 0 === config.ref) ||
|
|
4285
|
+
(props[propName] = config[propName]);
|
|
4286
|
+
var propName = arguments.length - 2;
|
|
4287
|
+
if (1 === propName) props.children = children;
|
|
4288
|
+
else if (1 < propName) {
|
|
4289
|
+
for (var childArray = Array(propName), i = 0; i < propName; i++)
|
|
4290
|
+
childArray[i] = arguments[i + 2];
|
|
4291
|
+
props.children = childArray;
|
|
4292
|
+
}
|
|
4293
|
+
return ReactElement(element.type, key, props);
|
|
4294
|
+
};
|
|
4295
|
+
react_production.createContext = function (defaultValue) {
|
|
4296
|
+
defaultValue = {
|
|
4297
|
+
$$typeof: REACT_CONTEXT_TYPE,
|
|
4298
|
+
_currentValue: defaultValue,
|
|
4299
|
+
_currentValue2: defaultValue,
|
|
4300
|
+
_threadCount: 0,
|
|
4301
|
+
Provider: null,
|
|
4302
|
+
Consumer: null
|
|
4303
|
+
};
|
|
4304
|
+
defaultValue.Provider = defaultValue;
|
|
4305
|
+
defaultValue.Consumer = {
|
|
4306
|
+
$$typeof: REACT_CONSUMER_TYPE,
|
|
4307
|
+
_context: defaultValue
|
|
4308
|
+
};
|
|
4309
|
+
return defaultValue;
|
|
4310
|
+
};
|
|
4311
|
+
react_production.createElement = function (type, config, children) {
|
|
4312
|
+
var propName,
|
|
4313
|
+
props = {},
|
|
4314
|
+
key = null;
|
|
4315
|
+
if (null != config)
|
|
4316
|
+
for (propName in (void 0 !== config.key && (key = "" + config.key), config))
|
|
4317
|
+
hasOwnProperty.call(config, propName) &&
|
|
4318
|
+
"key" !== propName &&
|
|
4319
|
+
"__self" !== propName &&
|
|
4320
|
+
"__source" !== propName &&
|
|
4321
|
+
(props[propName] = config[propName]);
|
|
4322
|
+
var childrenLength = arguments.length - 2;
|
|
4323
|
+
if (1 === childrenLength) props.children = children;
|
|
4324
|
+
else if (1 < childrenLength) {
|
|
4325
|
+
for (var childArray = Array(childrenLength), i = 0; i < childrenLength; i++)
|
|
4326
|
+
childArray[i] = arguments[i + 2];
|
|
4327
|
+
props.children = childArray;
|
|
4328
|
+
}
|
|
4329
|
+
if (type && type.defaultProps)
|
|
4330
|
+
for (propName in ((childrenLength = type.defaultProps), childrenLength))
|
|
4331
|
+
void 0 === props[propName] &&
|
|
4332
|
+
(props[propName] = childrenLength[propName]);
|
|
4333
|
+
return ReactElement(type, key, props);
|
|
4334
|
+
};
|
|
4335
|
+
react_production.createRef = function () {
|
|
4336
|
+
return { current: null };
|
|
4337
|
+
};
|
|
4338
|
+
react_production.forwardRef = function (render) {
|
|
4339
|
+
return { $$typeof: REACT_FORWARD_REF_TYPE, render: render };
|
|
4340
|
+
};
|
|
4341
|
+
react_production.isValidElement = isValidElement;
|
|
4342
|
+
react_production.lazy = function (ctor) {
|
|
4343
|
+
return {
|
|
4344
|
+
$$typeof: REACT_LAZY_TYPE,
|
|
4345
|
+
_payload: { _status: -1, _result: ctor },
|
|
4346
|
+
_init: lazyInitializer
|
|
4347
|
+
};
|
|
4348
|
+
};
|
|
4349
|
+
react_production.memo = function (type, compare) {
|
|
4350
|
+
return {
|
|
4351
|
+
$$typeof: REACT_MEMO_TYPE,
|
|
4352
|
+
type: type,
|
|
4353
|
+
compare: void 0 === compare ? null : compare
|
|
4354
|
+
};
|
|
4355
|
+
};
|
|
4356
|
+
react_production.startTransition = function (scope) {
|
|
4357
|
+
var prevTransition = ReactSharedInternals.T,
|
|
4358
|
+
currentTransition = {};
|
|
4359
|
+
ReactSharedInternals.T = currentTransition;
|
|
4360
|
+
try {
|
|
4361
|
+
var returnValue = scope(),
|
|
4362
|
+
onStartTransitionFinish = ReactSharedInternals.S;
|
|
4363
|
+
null !== onStartTransitionFinish &&
|
|
4364
|
+
onStartTransitionFinish(currentTransition, returnValue);
|
|
4365
|
+
"object" === typeof returnValue &&
|
|
4366
|
+
null !== returnValue &&
|
|
4367
|
+
"function" === typeof returnValue.then &&
|
|
4368
|
+
returnValue.then(noop, reportGlobalError);
|
|
4369
|
+
} catch (error) {
|
|
4370
|
+
reportGlobalError(error);
|
|
4371
|
+
} finally {
|
|
4372
|
+
null !== prevTransition &&
|
|
4373
|
+
null !== currentTransition.types &&
|
|
4374
|
+
(prevTransition.types = currentTransition.types),
|
|
4375
|
+
(ReactSharedInternals.T = prevTransition);
|
|
4376
|
+
}
|
|
4377
|
+
};
|
|
4378
|
+
react_production.unstable_useCacheRefresh = function () {
|
|
4379
|
+
return ReactSharedInternals.H.useCacheRefresh();
|
|
4380
|
+
};
|
|
4381
|
+
react_production.use = function (usable) {
|
|
4382
|
+
return ReactSharedInternals.H.use(usable);
|
|
4383
|
+
};
|
|
4384
|
+
react_production.useActionState = function (action, initialState, permalink) {
|
|
4385
|
+
return ReactSharedInternals.H.useActionState(action, initialState, permalink);
|
|
4386
|
+
};
|
|
4387
|
+
react_production.useCallback = function (callback, deps) {
|
|
4388
|
+
return ReactSharedInternals.H.useCallback(callback, deps);
|
|
4389
|
+
};
|
|
4390
|
+
react_production.useContext = function (Context) {
|
|
4391
|
+
return ReactSharedInternals.H.useContext(Context);
|
|
4392
|
+
};
|
|
4393
|
+
react_production.useDebugValue = function () {};
|
|
4394
|
+
react_production.useDeferredValue = function (value, initialValue) {
|
|
4395
|
+
return ReactSharedInternals.H.useDeferredValue(value, initialValue);
|
|
4396
|
+
};
|
|
4397
|
+
react_production.useEffect = function (create, deps) {
|
|
4398
|
+
return ReactSharedInternals.H.useEffect(create, deps);
|
|
4399
|
+
};
|
|
4400
|
+
react_production.useEffectEvent = function (callback) {
|
|
4401
|
+
return ReactSharedInternals.H.useEffectEvent(callback);
|
|
4402
|
+
};
|
|
4403
|
+
react_production.useId = function () {
|
|
4404
|
+
return ReactSharedInternals.H.useId();
|
|
4405
|
+
};
|
|
4406
|
+
react_production.useImperativeHandle = function (ref, create, deps) {
|
|
4407
|
+
return ReactSharedInternals.H.useImperativeHandle(ref, create, deps);
|
|
4408
|
+
};
|
|
4409
|
+
react_production.useInsertionEffect = function (create, deps) {
|
|
4410
|
+
return ReactSharedInternals.H.useInsertionEffect(create, deps);
|
|
4411
|
+
};
|
|
4412
|
+
react_production.useLayoutEffect = function (create, deps) {
|
|
4413
|
+
return ReactSharedInternals.H.useLayoutEffect(create, deps);
|
|
4414
|
+
};
|
|
4415
|
+
react_production.useMemo = function (create, deps) {
|
|
4416
|
+
return ReactSharedInternals.H.useMemo(create, deps);
|
|
4417
|
+
};
|
|
4418
|
+
react_production.useOptimistic = function (passthrough, reducer) {
|
|
4419
|
+
return ReactSharedInternals.H.useOptimistic(passthrough, reducer);
|
|
4420
|
+
};
|
|
4421
|
+
react_production.useReducer = function (reducer, initialArg, init) {
|
|
4422
|
+
return ReactSharedInternals.H.useReducer(reducer, initialArg, init);
|
|
4423
|
+
};
|
|
4424
|
+
react_production.useRef = function (initialValue) {
|
|
4425
|
+
return ReactSharedInternals.H.useRef(initialValue);
|
|
4426
|
+
};
|
|
4427
|
+
react_production.useState = function (initialState) {
|
|
4428
|
+
return ReactSharedInternals.H.useState(initialState);
|
|
4429
|
+
};
|
|
4430
|
+
react_production.useSyncExternalStore = function (
|
|
4431
|
+
subscribe,
|
|
4432
|
+
getSnapshot,
|
|
4433
|
+
getServerSnapshot
|
|
4434
|
+
) {
|
|
4435
|
+
return ReactSharedInternals.H.useSyncExternalStore(
|
|
4436
|
+
subscribe,
|
|
4437
|
+
getSnapshot,
|
|
4438
|
+
getServerSnapshot
|
|
4439
|
+
);
|
|
4440
|
+
};
|
|
4441
|
+
react_production.useTransition = function () {
|
|
4442
|
+
return ReactSharedInternals.H.useTransition();
|
|
4443
|
+
};
|
|
4444
|
+
react_production.version = "19.2.0";
|
|
4445
|
+
return react_production;
|
|
4446
|
+
}
|
|
4447
|
+
|
|
4448
|
+
var react_development = {exports: {}};
|
|
4449
|
+
|
|
4450
|
+
/**
|
|
4451
|
+
* @license React
|
|
4452
|
+
* react.development.js
|
|
4453
|
+
*
|
|
4454
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
4455
|
+
*
|
|
4456
|
+
* This source code is licensed under the MIT license found in the
|
|
4457
|
+
* LICENSE file in the root directory of this source tree.
|
|
4458
|
+
*/
|
|
4459
|
+
react_development.exports;
|
|
4460
|
+
|
|
4461
|
+
var hasRequiredReact_development;
|
|
4462
|
+
|
|
4463
|
+
function requireReact_development () {
|
|
4464
|
+
if (hasRequiredReact_development) return react_development.exports;
|
|
4465
|
+
hasRequiredReact_development = 1;
|
|
4466
|
+
(function (module, exports$1) {
|
|
4467
|
+
"production" !== process.env.NODE_ENV &&
|
|
4468
|
+
(function () {
|
|
4469
|
+
function defineDeprecationWarning(methodName, info) {
|
|
4470
|
+
Object.defineProperty(Component.prototype, methodName, {
|
|
4471
|
+
get: function () {
|
|
4472
|
+
console.warn(
|
|
4473
|
+
"%s(...) is deprecated in plain JavaScript React classes. %s",
|
|
4474
|
+
info[0],
|
|
4475
|
+
info[1]
|
|
4476
|
+
);
|
|
4477
|
+
}
|
|
4478
|
+
});
|
|
4479
|
+
}
|
|
4480
|
+
function getIteratorFn(maybeIterable) {
|
|
4481
|
+
if (null === maybeIterable || "object" !== typeof maybeIterable)
|
|
4482
|
+
return null;
|
|
4483
|
+
maybeIterable =
|
|
4484
|
+
(MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||
|
|
4485
|
+
maybeIterable["@@iterator"];
|
|
4486
|
+
return "function" === typeof maybeIterable ? maybeIterable : null;
|
|
4487
|
+
}
|
|
4488
|
+
function warnNoop(publicInstance, callerName) {
|
|
4489
|
+
publicInstance =
|
|
4490
|
+
((publicInstance = publicInstance.constructor) &&
|
|
4491
|
+
(publicInstance.displayName || publicInstance.name)) ||
|
|
4492
|
+
"ReactClass";
|
|
4493
|
+
var warningKey = publicInstance + "." + callerName;
|
|
4494
|
+
didWarnStateUpdateForUnmountedComponent[warningKey] ||
|
|
4495
|
+
(console.error(
|
|
4496
|
+
"Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",
|
|
4497
|
+
callerName,
|
|
4498
|
+
publicInstance
|
|
4499
|
+
),
|
|
4500
|
+
(didWarnStateUpdateForUnmountedComponent[warningKey] = true));
|
|
4501
|
+
}
|
|
4502
|
+
function Component(props, context, updater) {
|
|
4503
|
+
this.props = props;
|
|
4504
|
+
this.context = context;
|
|
4505
|
+
this.refs = emptyObject;
|
|
4506
|
+
this.updater = updater || ReactNoopUpdateQueue;
|
|
4507
|
+
}
|
|
4508
|
+
function ComponentDummy() {}
|
|
4509
|
+
function PureComponent(props, context, updater) {
|
|
4510
|
+
this.props = props;
|
|
4511
|
+
this.context = context;
|
|
4512
|
+
this.refs = emptyObject;
|
|
4513
|
+
this.updater = updater || ReactNoopUpdateQueue;
|
|
4514
|
+
}
|
|
4515
|
+
function noop() {}
|
|
4516
|
+
function testStringCoercion(value) {
|
|
4517
|
+
return "" + value;
|
|
4518
|
+
}
|
|
4519
|
+
function checkKeyStringCoercion(value) {
|
|
4520
|
+
try {
|
|
4521
|
+
testStringCoercion(value);
|
|
4522
|
+
var JSCompiler_inline_result = !1;
|
|
4523
|
+
} catch (e) {
|
|
4524
|
+
JSCompiler_inline_result = true;
|
|
4525
|
+
}
|
|
4526
|
+
if (JSCompiler_inline_result) {
|
|
4527
|
+
JSCompiler_inline_result = console;
|
|
4528
|
+
var JSCompiler_temp_const = JSCompiler_inline_result.error;
|
|
4529
|
+
var JSCompiler_inline_result$jscomp$0 =
|
|
4530
|
+
("function" === typeof Symbol &&
|
|
4531
|
+
Symbol.toStringTag &&
|
|
4532
|
+
value[Symbol.toStringTag]) ||
|
|
4533
|
+
value.constructor.name ||
|
|
4534
|
+
"Object";
|
|
4535
|
+
JSCompiler_temp_const.call(
|
|
4536
|
+
JSCompiler_inline_result,
|
|
4537
|
+
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
4538
|
+
JSCompiler_inline_result$jscomp$0
|
|
4539
|
+
);
|
|
4540
|
+
return testStringCoercion(value);
|
|
4541
|
+
}
|
|
4542
|
+
}
|
|
4543
|
+
function getComponentNameFromType(type) {
|
|
4544
|
+
if (null == type) return null;
|
|
4545
|
+
if ("function" === typeof type)
|
|
4546
|
+
return type.$$typeof === REACT_CLIENT_REFERENCE
|
|
4547
|
+
? null
|
|
4548
|
+
: type.displayName || type.name || null;
|
|
4549
|
+
if ("string" === typeof type) return type;
|
|
4550
|
+
switch (type) {
|
|
4551
|
+
case REACT_FRAGMENT_TYPE:
|
|
4552
|
+
return "Fragment";
|
|
4553
|
+
case REACT_PROFILER_TYPE:
|
|
4554
|
+
return "Profiler";
|
|
4555
|
+
case REACT_STRICT_MODE_TYPE:
|
|
4556
|
+
return "StrictMode";
|
|
4557
|
+
case REACT_SUSPENSE_TYPE:
|
|
4558
|
+
return "Suspense";
|
|
4559
|
+
case REACT_SUSPENSE_LIST_TYPE:
|
|
4560
|
+
return "SuspenseList";
|
|
4561
|
+
case REACT_ACTIVITY_TYPE:
|
|
4562
|
+
return "Activity";
|
|
4563
|
+
}
|
|
4564
|
+
if ("object" === typeof type)
|
|
4565
|
+
switch (
|
|
4566
|
+
("number" === typeof type.tag &&
|
|
4567
|
+
console.error(
|
|
4568
|
+
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
4569
|
+
),
|
|
4570
|
+
type.$$typeof)
|
|
4571
|
+
) {
|
|
4572
|
+
case REACT_PORTAL_TYPE:
|
|
4573
|
+
return "Portal";
|
|
4574
|
+
case REACT_CONTEXT_TYPE:
|
|
4575
|
+
return type.displayName || "Context";
|
|
4576
|
+
case REACT_CONSUMER_TYPE:
|
|
4577
|
+
return (type._context.displayName || "Context") + ".Consumer";
|
|
4578
|
+
case REACT_FORWARD_REF_TYPE:
|
|
4579
|
+
var innerType = type.render;
|
|
4580
|
+
type = type.displayName;
|
|
4581
|
+
type ||
|
|
4582
|
+
((type = innerType.displayName || innerType.name || ""),
|
|
4583
|
+
(type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef"));
|
|
4584
|
+
return type;
|
|
4585
|
+
case REACT_MEMO_TYPE:
|
|
4586
|
+
return (
|
|
4587
|
+
(innerType = type.displayName || null),
|
|
4588
|
+
null !== innerType
|
|
4589
|
+
? innerType
|
|
4590
|
+
: getComponentNameFromType(type.type) || "Memo"
|
|
4591
|
+
);
|
|
4592
|
+
case REACT_LAZY_TYPE:
|
|
4593
|
+
innerType = type._payload;
|
|
4594
|
+
type = type._init;
|
|
4595
|
+
try {
|
|
4596
|
+
return getComponentNameFromType(type(innerType));
|
|
4597
|
+
} catch (x) {}
|
|
4598
|
+
}
|
|
4599
|
+
return null;
|
|
4600
|
+
}
|
|
4601
|
+
function getTaskName(type) {
|
|
4602
|
+
if (type === REACT_FRAGMENT_TYPE) return "<>";
|
|
4603
|
+
if (
|
|
4604
|
+
"object" === typeof type &&
|
|
4605
|
+
null !== type &&
|
|
4606
|
+
type.$$typeof === REACT_LAZY_TYPE
|
|
4607
|
+
)
|
|
4608
|
+
return "<...>";
|
|
4609
|
+
try {
|
|
4610
|
+
var name = getComponentNameFromType(type);
|
|
4611
|
+
return name ? "<" + name + ">" : "<...>";
|
|
4612
|
+
} catch (x) {
|
|
4613
|
+
return "<...>";
|
|
4614
|
+
}
|
|
4615
|
+
}
|
|
4616
|
+
function getOwner() {
|
|
4617
|
+
var dispatcher = ReactSharedInternals.A;
|
|
4618
|
+
return null === dispatcher ? null : dispatcher.getOwner();
|
|
4619
|
+
}
|
|
4620
|
+
function UnknownOwner() {
|
|
4621
|
+
return Error("react-stack-top-frame");
|
|
4622
|
+
}
|
|
4623
|
+
function hasValidKey(config) {
|
|
4624
|
+
if (hasOwnProperty.call(config, "key")) {
|
|
4625
|
+
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
|
|
4626
|
+
if (getter && getter.isReactWarning) return false;
|
|
4627
|
+
}
|
|
4628
|
+
return void 0 !== config.key;
|
|
4629
|
+
}
|
|
4630
|
+
function defineKeyPropWarningGetter(props, displayName) {
|
|
4631
|
+
function warnAboutAccessingKey() {
|
|
4632
|
+
specialPropKeyWarningShown ||
|
|
4633
|
+
((specialPropKeyWarningShown = true),
|
|
4634
|
+
console.error(
|
|
4635
|
+
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
4636
|
+
displayName
|
|
4637
|
+
));
|
|
4638
|
+
}
|
|
4639
|
+
warnAboutAccessingKey.isReactWarning = true;
|
|
4640
|
+
Object.defineProperty(props, "key", {
|
|
4641
|
+
get: warnAboutAccessingKey,
|
|
4642
|
+
configurable: true
|
|
4643
|
+
});
|
|
4644
|
+
}
|
|
4645
|
+
function elementRefGetterWithDeprecationWarning() {
|
|
4646
|
+
var componentName = getComponentNameFromType(this.type);
|
|
4647
|
+
didWarnAboutElementRef[componentName] ||
|
|
4648
|
+
((didWarnAboutElementRef[componentName] = true),
|
|
4649
|
+
console.error(
|
|
4650
|
+
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
4651
|
+
));
|
|
4652
|
+
componentName = this.props.ref;
|
|
4653
|
+
return void 0 !== componentName ? componentName : null;
|
|
4654
|
+
}
|
|
4655
|
+
function ReactElement(type, key, props, owner, debugStack, debugTask) {
|
|
4656
|
+
var refProp = props.ref;
|
|
4657
|
+
type = {
|
|
4658
|
+
$$typeof: REACT_ELEMENT_TYPE,
|
|
4659
|
+
type: type,
|
|
4660
|
+
key: key,
|
|
4661
|
+
props: props,
|
|
4662
|
+
_owner: owner
|
|
4663
|
+
};
|
|
4664
|
+
null !== (void 0 !== refProp ? refProp : null)
|
|
4665
|
+
? Object.defineProperty(type, "ref", {
|
|
4666
|
+
enumerable: false,
|
|
4667
|
+
get: elementRefGetterWithDeprecationWarning
|
|
4668
|
+
})
|
|
4669
|
+
: Object.defineProperty(type, "ref", { enumerable: false, value: null });
|
|
4670
|
+
type._store = {};
|
|
4671
|
+
Object.defineProperty(type._store, "validated", {
|
|
4672
|
+
configurable: false,
|
|
4673
|
+
enumerable: false,
|
|
4674
|
+
writable: true,
|
|
4675
|
+
value: 0
|
|
4676
|
+
});
|
|
4677
|
+
Object.defineProperty(type, "_debugInfo", {
|
|
4678
|
+
configurable: false,
|
|
4679
|
+
enumerable: false,
|
|
4680
|
+
writable: true,
|
|
4681
|
+
value: null
|
|
4682
|
+
});
|
|
4683
|
+
Object.defineProperty(type, "_debugStack", {
|
|
4684
|
+
configurable: false,
|
|
4685
|
+
enumerable: false,
|
|
4686
|
+
writable: true,
|
|
4687
|
+
value: debugStack
|
|
4688
|
+
});
|
|
4689
|
+
Object.defineProperty(type, "_debugTask", {
|
|
4690
|
+
configurable: false,
|
|
4691
|
+
enumerable: false,
|
|
4692
|
+
writable: true,
|
|
4693
|
+
value: debugTask
|
|
4694
|
+
});
|
|
4695
|
+
Object.freeze && (Object.freeze(type.props), Object.freeze(type));
|
|
4696
|
+
return type;
|
|
4697
|
+
}
|
|
4698
|
+
function cloneAndReplaceKey(oldElement, newKey) {
|
|
4699
|
+
newKey = ReactElement(
|
|
4700
|
+
oldElement.type,
|
|
4701
|
+
newKey,
|
|
4702
|
+
oldElement.props,
|
|
4703
|
+
oldElement._owner,
|
|
4704
|
+
oldElement._debugStack,
|
|
4705
|
+
oldElement._debugTask
|
|
4706
|
+
);
|
|
4707
|
+
oldElement._store &&
|
|
4708
|
+
(newKey._store.validated = oldElement._store.validated);
|
|
4709
|
+
return newKey;
|
|
4710
|
+
}
|
|
4711
|
+
function validateChildKeys(node) {
|
|
4712
|
+
isValidElement(node)
|
|
4713
|
+
? node._store && (node._store.validated = 1)
|
|
4714
|
+
: "object" === typeof node &&
|
|
4715
|
+
null !== node &&
|
|
4716
|
+
node.$$typeof === REACT_LAZY_TYPE &&
|
|
4717
|
+
("fulfilled" === node._payload.status
|
|
4718
|
+
? isValidElement(node._payload.value) &&
|
|
4719
|
+
node._payload.value._store &&
|
|
4720
|
+
(node._payload.value._store.validated = 1)
|
|
4721
|
+
: node._store && (node._store.validated = 1));
|
|
4722
|
+
}
|
|
4723
|
+
function isValidElement(object) {
|
|
4724
|
+
return (
|
|
4725
|
+
"object" === typeof object &&
|
|
4726
|
+
null !== object &&
|
|
4727
|
+
object.$$typeof === REACT_ELEMENT_TYPE
|
|
4728
|
+
);
|
|
4729
|
+
}
|
|
4730
|
+
function escape(key) {
|
|
4731
|
+
var escaperLookup = { "=": "=0", ":": "=2" };
|
|
4732
|
+
return (
|
|
4733
|
+
"$" +
|
|
4734
|
+
key.replace(/[=:]/g, function (match) {
|
|
4735
|
+
return escaperLookup[match];
|
|
4736
|
+
})
|
|
4737
|
+
);
|
|
4738
|
+
}
|
|
4739
|
+
function getElementKey(element, index) {
|
|
4740
|
+
return "object" === typeof element &&
|
|
4741
|
+
null !== element &&
|
|
4742
|
+
null != element.key
|
|
4743
|
+
? (checkKeyStringCoercion(element.key), escape("" + element.key))
|
|
4744
|
+
: index.toString(36);
|
|
4745
|
+
}
|
|
4746
|
+
function resolveThenable(thenable) {
|
|
4747
|
+
switch (thenable.status) {
|
|
4748
|
+
case "fulfilled":
|
|
4749
|
+
return thenable.value;
|
|
4750
|
+
case "rejected":
|
|
4751
|
+
throw thenable.reason;
|
|
4752
|
+
default:
|
|
4753
|
+
switch (
|
|
4754
|
+
("string" === typeof thenable.status
|
|
4755
|
+
? thenable.then(noop, noop)
|
|
4756
|
+
: ((thenable.status = "pending"),
|
|
4757
|
+
thenable.then(
|
|
4758
|
+
function (fulfilledValue) {
|
|
4759
|
+
"pending" === thenable.status &&
|
|
4760
|
+
((thenable.status = "fulfilled"),
|
|
4761
|
+
(thenable.value = fulfilledValue));
|
|
4762
|
+
},
|
|
4763
|
+
function (error) {
|
|
4764
|
+
"pending" === thenable.status &&
|
|
4765
|
+
((thenable.status = "rejected"),
|
|
4766
|
+
(thenable.reason = error));
|
|
4767
|
+
}
|
|
4768
|
+
)),
|
|
4769
|
+
thenable.status)
|
|
4770
|
+
) {
|
|
4771
|
+
case "fulfilled":
|
|
4772
|
+
return thenable.value;
|
|
4773
|
+
case "rejected":
|
|
4774
|
+
throw thenable.reason;
|
|
4775
|
+
}
|
|
4776
|
+
}
|
|
4777
|
+
throw thenable;
|
|
4778
|
+
}
|
|
4779
|
+
function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
|
|
4780
|
+
var type = typeof children;
|
|
4781
|
+
if ("undefined" === type || "boolean" === type) children = null;
|
|
4782
|
+
var invokeCallback = false;
|
|
4783
|
+
if (null === children) invokeCallback = true;
|
|
4784
|
+
else
|
|
4785
|
+
switch (type) {
|
|
4786
|
+
case "bigint":
|
|
4787
|
+
case "string":
|
|
4788
|
+
case "number":
|
|
4789
|
+
invokeCallback = true;
|
|
4790
|
+
break;
|
|
4791
|
+
case "object":
|
|
4792
|
+
switch (children.$$typeof) {
|
|
4793
|
+
case REACT_ELEMENT_TYPE:
|
|
4794
|
+
case REACT_PORTAL_TYPE:
|
|
4795
|
+
invokeCallback = true;
|
|
4796
|
+
break;
|
|
4797
|
+
case REACT_LAZY_TYPE:
|
|
4798
|
+
return (
|
|
4799
|
+
(invokeCallback = children._init),
|
|
4800
|
+
mapIntoArray(
|
|
4801
|
+
invokeCallback(children._payload),
|
|
4802
|
+
array,
|
|
4803
|
+
escapedPrefix,
|
|
4804
|
+
nameSoFar,
|
|
4805
|
+
callback
|
|
4806
|
+
)
|
|
4807
|
+
);
|
|
4808
|
+
}
|
|
4809
|
+
}
|
|
4810
|
+
if (invokeCallback) {
|
|
4811
|
+
invokeCallback = children;
|
|
4812
|
+
callback = callback(invokeCallback);
|
|
4813
|
+
var childKey =
|
|
4814
|
+
"" === nameSoFar ? "." + getElementKey(invokeCallback, 0) : nameSoFar;
|
|
4815
|
+
isArrayImpl(callback)
|
|
4816
|
+
? ((escapedPrefix = ""),
|
|
4817
|
+
null != childKey &&
|
|
4818
|
+
(escapedPrefix =
|
|
4819
|
+
childKey.replace(userProvidedKeyEscapeRegex, "$&/") + "/"),
|
|
4820
|
+
mapIntoArray(callback, array, escapedPrefix, "", function (c) {
|
|
4821
|
+
return c;
|
|
4822
|
+
}))
|
|
4823
|
+
: null != callback &&
|
|
4824
|
+
(isValidElement(callback) &&
|
|
4825
|
+
(null != callback.key &&
|
|
4826
|
+
((invokeCallback && invokeCallback.key === callback.key) ||
|
|
4827
|
+
checkKeyStringCoercion(callback.key)),
|
|
4828
|
+
(escapedPrefix = cloneAndReplaceKey(
|
|
4829
|
+
callback,
|
|
4830
|
+
escapedPrefix +
|
|
4831
|
+
(null == callback.key ||
|
|
4832
|
+
(invokeCallback && invokeCallback.key === callback.key)
|
|
4833
|
+
? ""
|
|
4834
|
+
: ("" + callback.key).replace(
|
|
4835
|
+
userProvidedKeyEscapeRegex,
|
|
4836
|
+
"$&/"
|
|
4837
|
+
) + "/") +
|
|
4838
|
+
childKey
|
|
4839
|
+
)),
|
|
4840
|
+
"" !== nameSoFar &&
|
|
4841
|
+
null != invokeCallback &&
|
|
4842
|
+
isValidElement(invokeCallback) &&
|
|
4843
|
+
null == invokeCallback.key &&
|
|
4844
|
+
invokeCallback._store &&
|
|
4845
|
+
!invokeCallback._store.validated &&
|
|
4846
|
+
(escapedPrefix._store.validated = 2),
|
|
4847
|
+
(callback = escapedPrefix)),
|
|
4848
|
+
array.push(callback));
|
|
4849
|
+
return 1;
|
|
4850
|
+
}
|
|
4851
|
+
invokeCallback = 0;
|
|
4852
|
+
childKey = "" === nameSoFar ? "." : nameSoFar + ":";
|
|
4853
|
+
if (isArrayImpl(children))
|
|
4854
|
+
for (var i = 0; i < children.length; i++)
|
|
4855
|
+
(nameSoFar = children[i]),
|
|
4856
|
+
(type = childKey + getElementKey(nameSoFar, i)),
|
|
4857
|
+
(invokeCallback += mapIntoArray(
|
|
4858
|
+
nameSoFar,
|
|
4859
|
+
array,
|
|
4860
|
+
escapedPrefix,
|
|
4861
|
+
type,
|
|
4862
|
+
callback
|
|
4863
|
+
));
|
|
4864
|
+
else if (((i = getIteratorFn(children)), "function" === typeof i))
|
|
4865
|
+
for (
|
|
4866
|
+
i === children.entries &&
|
|
4867
|
+
(didWarnAboutMaps ||
|
|
4868
|
+
console.warn(
|
|
4869
|
+
"Using Maps as children is not supported. Use an array of keyed ReactElements instead."
|
|
4870
|
+
),
|
|
4871
|
+
(didWarnAboutMaps = true)),
|
|
4872
|
+
children = i.call(children),
|
|
4873
|
+
i = 0;
|
|
4874
|
+
!(nameSoFar = children.next()).done;
|
|
4875
|
+
|
|
4876
|
+
)
|
|
4877
|
+
(nameSoFar = nameSoFar.value),
|
|
4878
|
+
(type = childKey + getElementKey(nameSoFar, i++)),
|
|
4879
|
+
(invokeCallback += mapIntoArray(
|
|
4880
|
+
nameSoFar,
|
|
4881
|
+
array,
|
|
4882
|
+
escapedPrefix,
|
|
4883
|
+
type,
|
|
4884
|
+
callback
|
|
4885
|
+
));
|
|
4886
|
+
else if ("object" === type) {
|
|
4887
|
+
if ("function" === typeof children.then)
|
|
4888
|
+
return mapIntoArray(
|
|
4889
|
+
resolveThenable(children),
|
|
4890
|
+
array,
|
|
4891
|
+
escapedPrefix,
|
|
4892
|
+
nameSoFar,
|
|
4893
|
+
callback
|
|
4894
|
+
);
|
|
4895
|
+
array = String(children);
|
|
4896
|
+
throw Error(
|
|
4897
|
+
"Objects are not valid as a React child (found: " +
|
|
4898
|
+
("[object Object]" === array
|
|
4899
|
+
? "object with keys {" + Object.keys(children).join(", ") + "}"
|
|
4900
|
+
: array) +
|
|
4901
|
+
"). If you meant to render a collection of children, use an array instead."
|
|
4902
|
+
);
|
|
4903
|
+
}
|
|
4904
|
+
return invokeCallback;
|
|
4905
|
+
}
|
|
4906
|
+
function mapChildren(children, func, context) {
|
|
4907
|
+
if (null == children) return children;
|
|
4908
|
+
var result = [],
|
|
4909
|
+
count = 0;
|
|
4910
|
+
mapIntoArray(children, result, "", "", function (child) {
|
|
4911
|
+
return func.call(context, child, count++);
|
|
4912
|
+
});
|
|
4913
|
+
return result;
|
|
4914
|
+
}
|
|
4915
|
+
function lazyInitializer(payload) {
|
|
4916
|
+
if (-1 === payload._status) {
|
|
4917
|
+
var ioInfo = payload._ioInfo;
|
|
4918
|
+
null != ioInfo && (ioInfo.start = ioInfo.end = performance.now());
|
|
4919
|
+
ioInfo = payload._result;
|
|
4920
|
+
var thenable = ioInfo();
|
|
4921
|
+
thenable.then(
|
|
4922
|
+
function (moduleObject) {
|
|
4923
|
+
if (0 === payload._status || -1 === payload._status) {
|
|
4924
|
+
payload._status = 1;
|
|
4925
|
+
payload._result = moduleObject;
|
|
4926
|
+
var _ioInfo = payload._ioInfo;
|
|
4927
|
+
null != _ioInfo && (_ioInfo.end = performance.now());
|
|
4928
|
+
void 0 === thenable.status &&
|
|
4929
|
+
((thenable.status = "fulfilled"),
|
|
4930
|
+
(thenable.value = moduleObject));
|
|
4931
|
+
}
|
|
4932
|
+
},
|
|
4933
|
+
function (error) {
|
|
4934
|
+
if (0 === payload._status || -1 === payload._status) {
|
|
4935
|
+
payload._status = 2;
|
|
4936
|
+
payload._result = error;
|
|
4937
|
+
var _ioInfo2 = payload._ioInfo;
|
|
4938
|
+
null != _ioInfo2 && (_ioInfo2.end = performance.now());
|
|
4939
|
+
void 0 === thenable.status &&
|
|
4940
|
+
((thenable.status = "rejected"), (thenable.reason = error));
|
|
4941
|
+
}
|
|
4942
|
+
}
|
|
4943
|
+
);
|
|
4944
|
+
ioInfo = payload._ioInfo;
|
|
4945
|
+
if (null != ioInfo) {
|
|
4946
|
+
ioInfo.value = thenable;
|
|
4947
|
+
var displayName = thenable.displayName;
|
|
4948
|
+
"string" === typeof displayName && (ioInfo.name = displayName);
|
|
4949
|
+
}
|
|
4950
|
+
-1 === payload._status &&
|
|
4951
|
+
((payload._status = 0), (payload._result = thenable));
|
|
4952
|
+
}
|
|
4953
|
+
if (1 === payload._status)
|
|
4954
|
+
return (
|
|
4955
|
+
(ioInfo = payload._result),
|
|
4956
|
+
void 0 === ioInfo &&
|
|
4957
|
+
console.error(
|
|
4958
|
+
"lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))\n\nDid you accidentally put curly braces around the import?",
|
|
4959
|
+
ioInfo
|
|
4960
|
+
),
|
|
4961
|
+
"default" in ioInfo ||
|
|
4962
|
+
console.error(
|
|
4963
|
+
"lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))",
|
|
4964
|
+
ioInfo
|
|
4965
|
+
),
|
|
4966
|
+
ioInfo.default
|
|
4967
|
+
);
|
|
4968
|
+
throw payload._result;
|
|
4969
|
+
}
|
|
4970
|
+
function resolveDispatcher() {
|
|
4971
|
+
var dispatcher = ReactSharedInternals.H;
|
|
4972
|
+
null === dispatcher &&
|
|
4973
|
+
console.error(
|
|
4974
|
+
"Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem."
|
|
4975
|
+
);
|
|
4976
|
+
return dispatcher;
|
|
4977
|
+
}
|
|
4978
|
+
function releaseAsyncTransition() {
|
|
4979
|
+
ReactSharedInternals.asyncTransitions--;
|
|
4980
|
+
}
|
|
4981
|
+
function enqueueTask(task) {
|
|
4982
|
+
if (null === enqueueTaskImpl)
|
|
4983
|
+
try {
|
|
4984
|
+
var requireString = ("require" + Math.random()).slice(0, 7);
|
|
4985
|
+
enqueueTaskImpl = (module && module[requireString]).call(
|
|
4986
|
+
module,
|
|
4987
|
+
"timers"
|
|
4988
|
+
).setImmediate;
|
|
4989
|
+
} catch (_err) {
|
|
4990
|
+
enqueueTaskImpl = function (callback) {
|
|
4991
|
+
false === didWarnAboutMessageChannel &&
|
|
4992
|
+
((didWarnAboutMessageChannel = true),
|
|
4993
|
+
"undefined" === typeof MessageChannel &&
|
|
4994
|
+
console.error(
|
|
4995
|
+
"This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."
|
|
4996
|
+
));
|
|
4997
|
+
var channel = new MessageChannel();
|
|
4998
|
+
channel.port1.onmessage = callback;
|
|
4999
|
+
channel.port2.postMessage(void 0);
|
|
5000
|
+
};
|
|
5001
|
+
}
|
|
5002
|
+
return enqueueTaskImpl(task);
|
|
5003
|
+
}
|
|
5004
|
+
function aggregateErrors(errors) {
|
|
5005
|
+
return 1 < errors.length && "function" === typeof AggregateError
|
|
5006
|
+
? new AggregateError(errors)
|
|
5007
|
+
: errors[0];
|
|
5008
|
+
}
|
|
5009
|
+
function popActScope(prevActQueue, prevActScopeDepth) {
|
|
5010
|
+
prevActScopeDepth !== actScopeDepth - 1 &&
|
|
5011
|
+
console.error(
|
|
5012
|
+
"You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "
|
|
5013
|
+
);
|
|
5014
|
+
actScopeDepth = prevActScopeDepth;
|
|
5015
|
+
}
|
|
5016
|
+
function recursivelyFlushAsyncActWork(returnValue, resolve, reject) {
|
|
5017
|
+
var queue = ReactSharedInternals.actQueue;
|
|
5018
|
+
if (null !== queue)
|
|
5019
|
+
if (0 !== queue.length)
|
|
5020
|
+
try {
|
|
5021
|
+
flushActQueue(queue);
|
|
5022
|
+
enqueueTask(function () {
|
|
5023
|
+
return recursivelyFlushAsyncActWork(returnValue, resolve, reject);
|
|
5024
|
+
});
|
|
5025
|
+
return;
|
|
5026
|
+
} catch (error) {
|
|
5027
|
+
ReactSharedInternals.thrownErrors.push(error);
|
|
5028
|
+
}
|
|
5029
|
+
else ReactSharedInternals.actQueue = null;
|
|
5030
|
+
0 < ReactSharedInternals.thrownErrors.length
|
|
5031
|
+
? ((queue = aggregateErrors(ReactSharedInternals.thrownErrors)),
|
|
5032
|
+
(ReactSharedInternals.thrownErrors.length = 0),
|
|
5033
|
+
reject(queue))
|
|
5034
|
+
: resolve(returnValue);
|
|
5035
|
+
}
|
|
5036
|
+
function flushActQueue(queue) {
|
|
5037
|
+
if (!isFlushing) {
|
|
5038
|
+
isFlushing = true;
|
|
5039
|
+
var i = 0;
|
|
5040
|
+
try {
|
|
5041
|
+
for (; i < queue.length; i++) {
|
|
5042
|
+
var callback = queue[i];
|
|
5043
|
+
do {
|
|
5044
|
+
ReactSharedInternals.didUsePromise = !1;
|
|
5045
|
+
var continuation = callback(!1);
|
|
5046
|
+
if (null !== continuation) {
|
|
5047
|
+
if (ReactSharedInternals.didUsePromise) {
|
|
5048
|
+
queue[i] = callback;
|
|
5049
|
+
queue.splice(0, i);
|
|
5050
|
+
return;
|
|
5051
|
+
}
|
|
5052
|
+
callback = continuation;
|
|
5053
|
+
} else break;
|
|
5054
|
+
} while (1);
|
|
5055
|
+
}
|
|
5056
|
+
queue.length = 0;
|
|
5057
|
+
} catch (error) {
|
|
5058
|
+
queue.splice(0, i + 1), ReactSharedInternals.thrownErrors.push(error);
|
|
5059
|
+
} finally {
|
|
5060
|
+
isFlushing = false;
|
|
5061
|
+
}
|
|
5062
|
+
}
|
|
5063
|
+
}
|
|
5064
|
+
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
|
|
5065
|
+
"function" ===
|
|
5066
|
+
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&
|
|
5067
|
+
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
5068
|
+
var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
|
|
5069
|
+
REACT_PORTAL_TYPE = Symbol.for("react.portal"),
|
|
5070
|
+
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
|
|
5071
|
+
REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
|
|
5072
|
+
REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
|
|
5073
|
+
REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
|
|
5074
|
+
REACT_CONTEXT_TYPE = Symbol.for("react.context"),
|
|
5075
|
+
REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
|
|
5076
|
+
REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
|
|
5077
|
+
REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
|
|
5078
|
+
REACT_MEMO_TYPE = Symbol.for("react.memo"),
|
|
5079
|
+
REACT_LAZY_TYPE = Symbol.for("react.lazy"),
|
|
5080
|
+
REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
|
|
5081
|
+
MAYBE_ITERATOR_SYMBOL = Symbol.iterator,
|
|
5082
|
+
didWarnStateUpdateForUnmountedComponent = {},
|
|
5083
|
+
ReactNoopUpdateQueue = {
|
|
5084
|
+
isMounted: function () {
|
|
5085
|
+
return false;
|
|
5086
|
+
},
|
|
5087
|
+
enqueueForceUpdate: function (publicInstance) {
|
|
5088
|
+
warnNoop(publicInstance, "forceUpdate");
|
|
5089
|
+
},
|
|
5090
|
+
enqueueReplaceState: function (publicInstance) {
|
|
5091
|
+
warnNoop(publicInstance, "replaceState");
|
|
5092
|
+
},
|
|
5093
|
+
enqueueSetState: function (publicInstance) {
|
|
5094
|
+
warnNoop(publicInstance, "setState");
|
|
5095
|
+
}
|
|
5096
|
+
},
|
|
5097
|
+
assign = Object.assign,
|
|
5098
|
+
emptyObject = {};
|
|
5099
|
+
Object.freeze(emptyObject);
|
|
5100
|
+
Component.prototype.isReactComponent = {};
|
|
5101
|
+
Component.prototype.setState = function (partialState, callback) {
|
|
5102
|
+
if (
|
|
5103
|
+
"object" !== typeof partialState &&
|
|
5104
|
+
"function" !== typeof partialState &&
|
|
5105
|
+
null != partialState
|
|
5106
|
+
)
|
|
5107
|
+
throw Error(
|
|
5108
|
+
"takes an object of state variables to update or a function which returns an object of state variables."
|
|
5109
|
+
);
|
|
5110
|
+
this.updater.enqueueSetState(this, partialState, callback, "setState");
|
|
5111
|
+
};
|
|
5112
|
+
Component.prototype.forceUpdate = function (callback) {
|
|
5113
|
+
this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
|
|
5114
|
+
};
|
|
5115
|
+
var deprecatedAPIs = {
|
|
5116
|
+
isMounted: [
|
|
5117
|
+
"isMounted",
|
|
5118
|
+
"Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."
|
|
5119
|
+
],
|
|
5120
|
+
replaceState: [
|
|
5121
|
+
"replaceState",
|
|
5122
|
+
"Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."
|
|
5123
|
+
]
|
|
5124
|
+
};
|
|
5125
|
+
for (fnName in deprecatedAPIs)
|
|
5126
|
+
deprecatedAPIs.hasOwnProperty(fnName) &&
|
|
5127
|
+
defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
|
|
5128
|
+
ComponentDummy.prototype = Component.prototype;
|
|
5129
|
+
deprecatedAPIs = PureComponent.prototype = new ComponentDummy();
|
|
5130
|
+
deprecatedAPIs.constructor = PureComponent;
|
|
5131
|
+
assign(deprecatedAPIs, Component.prototype);
|
|
5132
|
+
deprecatedAPIs.isPureReactComponent = true;
|
|
5133
|
+
var isArrayImpl = Array.isArray,
|
|
5134
|
+
REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"),
|
|
5135
|
+
ReactSharedInternals = {
|
|
5136
|
+
H: null,
|
|
5137
|
+
A: null,
|
|
5138
|
+
T: null,
|
|
5139
|
+
S: null,
|
|
5140
|
+
actQueue: null,
|
|
5141
|
+
asyncTransitions: 0,
|
|
5142
|
+
isBatchingLegacy: false,
|
|
5143
|
+
didScheduleLegacyUpdate: false,
|
|
5144
|
+
didUsePromise: false,
|
|
5145
|
+
thrownErrors: [],
|
|
5146
|
+
getCurrentStack: null,
|
|
5147
|
+
recentlyCreatedOwnerStacks: 0
|
|
5148
|
+
},
|
|
5149
|
+
hasOwnProperty = Object.prototype.hasOwnProperty,
|
|
5150
|
+
createTask = console.createTask
|
|
5151
|
+
? console.createTask
|
|
5152
|
+
: function () {
|
|
5153
|
+
return null;
|
|
5154
|
+
};
|
|
5155
|
+
deprecatedAPIs = {
|
|
5156
|
+
react_stack_bottom_frame: function (callStackForError) {
|
|
5157
|
+
return callStackForError();
|
|
5158
|
+
}
|
|
5159
|
+
};
|
|
5160
|
+
var specialPropKeyWarningShown, didWarnAboutOldJSXRuntime;
|
|
5161
|
+
var didWarnAboutElementRef = {};
|
|
5162
|
+
var unknownOwnerDebugStack = deprecatedAPIs.react_stack_bottom_frame.bind(
|
|
5163
|
+
deprecatedAPIs,
|
|
5164
|
+
UnknownOwner
|
|
5165
|
+
)();
|
|
5166
|
+
var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
|
|
5167
|
+
var didWarnAboutMaps = false,
|
|
5168
|
+
userProvidedKeyEscapeRegex = /\/+/g,
|
|
5169
|
+
reportGlobalError =
|
|
5170
|
+
"function" === typeof reportError
|
|
5171
|
+
? reportError
|
|
5172
|
+
: function (error) {
|
|
5173
|
+
if (
|
|
5174
|
+
"object" === typeof window &&
|
|
5175
|
+
"function" === typeof window.ErrorEvent
|
|
5176
|
+
) {
|
|
5177
|
+
var event = new window.ErrorEvent("error", {
|
|
5178
|
+
bubbles: true,
|
|
5179
|
+
cancelable: true,
|
|
5180
|
+
message:
|
|
5181
|
+
"object" === typeof error &&
|
|
5182
|
+
null !== error &&
|
|
5183
|
+
"string" === typeof error.message
|
|
5184
|
+
? String(error.message)
|
|
5185
|
+
: String(error),
|
|
5186
|
+
error: error
|
|
5187
|
+
});
|
|
5188
|
+
if (!window.dispatchEvent(event)) return;
|
|
5189
|
+
} else if (
|
|
5190
|
+
"object" === typeof process &&
|
|
5191
|
+
"function" === typeof process.emit
|
|
5192
|
+
) {
|
|
5193
|
+
process.emit("uncaughtException", error);
|
|
5194
|
+
return;
|
|
5195
|
+
}
|
|
5196
|
+
console.error(error);
|
|
5197
|
+
},
|
|
5198
|
+
didWarnAboutMessageChannel = false,
|
|
5199
|
+
enqueueTaskImpl = null,
|
|
5200
|
+
actScopeDepth = 0,
|
|
5201
|
+
didWarnNoAwaitAct = false,
|
|
5202
|
+
isFlushing = false,
|
|
5203
|
+
queueSeveralMicrotasks =
|
|
5204
|
+
"function" === typeof queueMicrotask
|
|
5205
|
+
? function (callback) {
|
|
5206
|
+
queueMicrotask(function () {
|
|
5207
|
+
return queueMicrotask(callback);
|
|
5208
|
+
});
|
|
5209
|
+
}
|
|
5210
|
+
: enqueueTask;
|
|
5211
|
+
deprecatedAPIs = Object.freeze({
|
|
5212
|
+
__proto__: null,
|
|
5213
|
+
c: function (size) {
|
|
5214
|
+
return resolveDispatcher().useMemoCache(size);
|
|
5215
|
+
}
|
|
5216
|
+
});
|
|
5217
|
+
var fnName = {
|
|
5218
|
+
map: mapChildren,
|
|
5219
|
+
forEach: function (children, forEachFunc, forEachContext) {
|
|
5220
|
+
mapChildren(
|
|
5221
|
+
children,
|
|
5222
|
+
function () {
|
|
5223
|
+
forEachFunc.apply(this, arguments);
|
|
5224
|
+
},
|
|
5225
|
+
forEachContext
|
|
5226
|
+
);
|
|
5227
|
+
},
|
|
5228
|
+
count: function (children) {
|
|
5229
|
+
var n = 0;
|
|
5230
|
+
mapChildren(children, function () {
|
|
5231
|
+
n++;
|
|
5232
|
+
});
|
|
5233
|
+
return n;
|
|
5234
|
+
},
|
|
5235
|
+
toArray: function (children) {
|
|
5236
|
+
return (
|
|
5237
|
+
mapChildren(children, function (child) {
|
|
5238
|
+
return child;
|
|
5239
|
+
}) || []
|
|
5240
|
+
);
|
|
5241
|
+
},
|
|
5242
|
+
only: function (children) {
|
|
5243
|
+
if (!isValidElement(children))
|
|
5244
|
+
throw Error(
|
|
5245
|
+
"React.Children.only expected to receive a single React element child."
|
|
5246
|
+
);
|
|
5247
|
+
return children;
|
|
5248
|
+
}
|
|
5249
|
+
};
|
|
5250
|
+
exports$1.Activity = REACT_ACTIVITY_TYPE;
|
|
5251
|
+
exports$1.Children = fnName;
|
|
5252
|
+
exports$1.Component = Component;
|
|
5253
|
+
exports$1.Fragment = REACT_FRAGMENT_TYPE;
|
|
5254
|
+
exports$1.Profiler = REACT_PROFILER_TYPE;
|
|
5255
|
+
exports$1.PureComponent = PureComponent;
|
|
5256
|
+
exports$1.StrictMode = REACT_STRICT_MODE_TYPE;
|
|
5257
|
+
exports$1.Suspense = REACT_SUSPENSE_TYPE;
|
|
5258
|
+
exports$1.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =
|
|
5259
|
+
ReactSharedInternals;
|
|
5260
|
+
exports$1.__COMPILER_RUNTIME = deprecatedAPIs;
|
|
5261
|
+
exports$1.act = function (callback) {
|
|
5262
|
+
var prevActQueue = ReactSharedInternals.actQueue,
|
|
5263
|
+
prevActScopeDepth = actScopeDepth;
|
|
5264
|
+
actScopeDepth++;
|
|
5265
|
+
var queue = (ReactSharedInternals.actQueue =
|
|
5266
|
+
null !== prevActQueue ? prevActQueue : []),
|
|
5267
|
+
didAwaitActCall = false;
|
|
5268
|
+
try {
|
|
5269
|
+
var result = callback();
|
|
5270
|
+
} catch (error) {
|
|
5271
|
+
ReactSharedInternals.thrownErrors.push(error);
|
|
5272
|
+
}
|
|
5273
|
+
if (0 < ReactSharedInternals.thrownErrors.length)
|
|
5274
|
+
throw (
|
|
5275
|
+
(popActScope(prevActQueue, prevActScopeDepth),
|
|
5276
|
+
(callback = aggregateErrors(ReactSharedInternals.thrownErrors)),
|
|
5277
|
+
(ReactSharedInternals.thrownErrors.length = 0),
|
|
5278
|
+
callback)
|
|
5279
|
+
);
|
|
5280
|
+
if (
|
|
5281
|
+
null !== result &&
|
|
5282
|
+
"object" === typeof result &&
|
|
5283
|
+
"function" === typeof result.then
|
|
5284
|
+
) {
|
|
5285
|
+
var thenable = result;
|
|
5286
|
+
queueSeveralMicrotasks(function () {
|
|
5287
|
+
didAwaitActCall ||
|
|
5288
|
+
didWarnNoAwaitAct ||
|
|
5289
|
+
((didWarnNoAwaitAct = true),
|
|
5290
|
+
console.error(
|
|
5291
|
+
"You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"
|
|
5292
|
+
));
|
|
5293
|
+
});
|
|
5294
|
+
return {
|
|
5295
|
+
then: function (resolve, reject) {
|
|
5296
|
+
didAwaitActCall = true;
|
|
5297
|
+
thenable.then(
|
|
5298
|
+
function (returnValue) {
|
|
5299
|
+
popActScope(prevActQueue, prevActScopeDepth);
|
|
5300
|
+
if (0 === prevActScopeDepth) {
|
|
5301
|
+
try {
|
|
5302
|
+
flushActQueue(queue),
|
|
5303
|
+
enqueueTask(function () {
|
|
5304
|
+
return recursivelyFlushAsyncActWork(
|
|
5305
|
+
returnValue,
|
|
5306
|
+
resolve,
|
|
5307
|
+
reject
|
|
5308
|
+
);
|
|
5309
|
+
});
|
|
5310
|
+
} catch (error$0) {
|
|
5311
|
+
ReactSharedInternals.thrownErrors.push(error$0);
|
|
5312
|
+
}
|
|
5313
|
+
if (0 < ReactSharedInternals.thrownErrors.length) {
|
|
5314
|
+
var _thrownError = aggregateErrors(
|
|
5315
|
+
ReactSharedInternals.thrownErrors
|
|
5316
|
+
);
|
|
5317
|
+
ReactSharedInternals.thrownErrors.length = 0;
|
|
5318
|
+
reject(_thrownError);
|
|
5319
|
+
}
|
|
5320
|
+
} else resolve(returnValue);
|
|
5321
|
+
},
|
|
5322
|
+
function (error) {
|
|
5323
|
+
popActScope(prevActQueue, prevActScopeDepth);
|
|
5324
|
+
0 < ReactSharedInternals.thrownErrors.length
|
|
5325
|
+
? ((error = aggregateErrors(
|
|
5326
|
+
ReactSharedInternals.thrownErrors
|
|
5327
|
+
)),
|
|
5328
|
+
(ReactSharedInternals.thrownErrors.length = 0),
|
|
5329
|
+
reject(error))
|
|
5330
|
+
: reject(error);
|
|
5331
|
+
}
|
|
5332
|
+
);
|
|
5333
|
+
}
|
|
5334
|
+
};
|
|
5335
|
+
}
|
|
5336
|
+
var returnValue$jscomp$0 = result;
|
|
5337
|
+
popActScope(prevActQueue, prevActScopeDepth);
|
|
5338
|
+
0 === prevActScopeDepth &&
|
|
5339
|
+
(flushActQueue(queue),
|
|
5340
|
+
0 !== queue.length &&
|
|
5341
|
+
queueSeveralMicrotasks(function () {
|
|
5342
|
+
didAwaitActCall ||
|
|
5343
|
+
didWarnNoAwaitAct ||
|
|
5344
|
+
((didWarnNoAwaitAct = true),
|
|
5345
|
+
console.error(
|
|
5346
|
+
"A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)"
|
|
5347
|
+
));
|
|
5348
|
+
}),
|
|
5349
|
+
(ReactSharedInternals.actQueue = null));
|
|
5350
|
+
if (0 < ReactSharedInternals.thrownErrors.length)
|
|
5351
|
+
throw (
|
|
5352
|
+
((callback = aggregateErrors(ReactSharedInternals.thrownErrors)),
|
|
5353
|
+
(ReactSharedInternals.thrownErrors.length = 0),
|
|
5354
|
+
callback)
|
|
5355
|
+
);
|
|
5356
|
+
return {
|
|
5357
|
+
then: function (resolve, reject) {
|
|
5358
|
+
didAwaitActCall = true;
|
|
5359
|
+
0 === prevActScopeDepth
|
|
5360
|
+
? ((ReactSharedInternals.actQueue = queue),
|
|
5361
|
+
enqueueTask(function () {
|
|
5362
|
+
return recursivelyFlushAsyncActWork(
|
|
5363
|
+
returnValue$jscomp$0,
|
|
5364
|
+
resolve,
|
|
5365
|
+
reject
|
|
5366
|
+
);
|
|
5367
|
+
}))
|
|
5368
|
+
: resolve(returnValue$jscomp$0);
|
|
5369
|
+
}
|
|
5370
|
+
};
|
|
5371
|
+
};
|
|
5372
|
+
exports$1.cache = function (fn) {
|
|
5373
|
+
return function () {
|
|
5374
|
+
return fn.apply(null, arguments);
|
|
5375
|
+
};
|
|
5376
|
+
};
|
|
5377
|
+
exports$1.cacheSignal = function () {
|
|
5378
|
+
return null;
|
|
5379
|
+
};
|
|
5380
|
+
exports$1.captureOwnerStack = function () {
|
|
5381
|
+
var getCurrentStack = ReactSharedInternals.getCurrentStack;
|
|
5382
|
+
return null === getCurrentStack ? null : getCurrentStack();
|
|
5383
|
+
};
|
|
5384
|
+
exports$1.cloneElement = function (element, config, children) {
|
|
5385
|
+
if (null === element || void 0 === element)
|
|
5386
|
+
throw Error(
|
|
5387
|
+
"The argument must be a React element, but you passed " +
|
|
5388
|
+
element +
|
|
5389
|
+
"."
|
|
5390
|
+
);
|
|
5391
|
+
var props = assign({}, element.props),
|
|
5392
|
+
key = element.key,
|
|
5393
|
+
owner = element._owner;
|
|
5394
|
+
if (null != config) {
|
|
5395
|
+
var JSCompiler_inline_result;
|
|
5396
|
+
a: {
|
|
5397
|
+
if (
|
|
5398
|
+
hasOwnProperty.call(config, "ref") &&
|
|
5399
|
+
(JSCompiler_inline_result = Object.getOwnPropertyDescriptor(
|
|
5400
|
+
config,
|
|
5401
|
+
"ref"
|
|
5402
|
+
).get) &&
|
|
5403
|
+
JSCompiler_inline_result.isReactWarning
|
|
5404
|
+
) {
|
|
5405
|
+
JSCompiler_inline_result = false;
|
|
5406
|
+
break a;
|
|
5407
|
+
}
|
|
5408
|
+
JSCompiler_inline_result = void 0 !== config.ref;
|
|
5409
|
+
}
|
|
5410
|
+
JSCompiler_inline_result && (owner = getOwner());
|
|
5411
|
+
hasValidKey(config) &&
|
|
5412
|
+
(checkKeyStringCoercion(config.key), (key = "" + config.key));
|
|
5413
|
+
for (propName in config)
|
|
5414
|
+
!hasOwnProperty.call(config, propName) ||
|
|
5415
|
+
"key" === propName ||
|
|
5416
|
+
"__self" === propName ||
|
|
5417
|
+
"__source" === propName ||
|
|
5418
|
+
("ref" === propName && void 0 === config.ref) ||
|
|
5419
|
+
(props[propName] = config[propName]);
|
|
5420
|
+
}
|
|
5421
|
+
var propName = arguments.length - 2;
|
|
5422
|
+
if (1 === propName) props.children = children;
|
|
5423
|
+
else if (1 < propName) {
|
|
5424
|
+
JSCompiler_inline_result = Array(propName);
|
|
5425
|
+
for (var i = 0; i < propName; i++)
|
|
5426
|
+
JSCompiler_inline_result[i] = arguments[i + 2];
|
|
5427
|
+
props.children = JSCompiler_inline_result;
|
|
5428
|
+
}
|
|
5429
|
+
props = ReactElement(
|
|
5430
|
+
element.type,
|
|
5431
|
+
key,
|
|
5432
|
+
props,
|
|
5433
|
+
owner,
|
|
5434
|
+
element._debugStack,
|
|
5435
|
+
element._debugTask
|
|
5436
|
+
);
|
|
5437
|
+
for (key = 2; key < arguments.length; key++)
|
|
5438
|
+
validateChildKeys(arguments[key]);
|
|
5439
|
+
return props;
|
|
5440
|
+
};
|
|
5441
|
+
exports$1.createContext = function (defaultValue) {
|
|
5442
|
+
defaultValue = {
|
|
5443
|
+
$$typeof: REACT_CONTEXT_TYPE,
|
|
5444
|
+
_currentValue: defaultValue,
|
|
5445
|
+
_currentValue2: defaultValue,
|
|
5446
|
+
_threadCount: 0,
|
|
5447
|
+
Provider: null,
|
|
5448
|
+
Consumer: null
|
|
5449
|
+
};
|
|
5450
|
+
defaultValue.Provider = defaultValue;
|
|
5451
|
+
defaultValue.Consumer = {
|
|
5452
|
+
$$typeof: REACT_CONSUMER_TYPE,
|
|
5453
|
+
_context: defaultValue
|
|
5454
|
+
};
|
|
5455
|
+
defaultValue._currentRenderer = null;
|
|
5456
|
+
defaultValue._currentRenderer2 = null;
|
|
5457
|
+
return defaultValue;
|
|
5458
|
+
};
|
|
5459
|
+
exports$1.createElement = function (type, config, children) {
|
|
5460
|
+
for (var i = 2; i < arguments.length; i++)
|
|
5461
|
+
validateChildKeys(arguments[i]);
|
|
5462
|
+
i = {};
|
|
5463
|
+
var key = null;
|
|
5464
|
+
if (null != config)
|
|
5465
|
+
for (propName in (didWarnAboutOldJSXRuntime ||
|
|
5466
|
+
!("__self" in config) ||
|
|
5467
|
+
"key" in config ||
|
|
5468
|
+
((didWarnAboutOldJSXRuntime = true),
|
|
5469
|
+
console.warn(
|
|
5470
|
+
"Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform"
|
|
5471
|
+
)),
|
|
5472
|
+
hasValidKey(config) &&
|
|
5473
|
+
(checkKeyStringCoercion(config.key), (key = "" + config.key)),
|
|
5474
|
+
config))
|
|
5475
|
+
hasOwnProperty.call(config, propName) &&
|
|
5476
|
+
"key" !== propName &&
|
|
5477
|
+
"__self" !== propName &&
|
|
5478
|
+
"__source" !== propName &&
|
|
5479
|
+
(i[propName] = config[propName]);
|
|
5480
|
+
var childrenLength = arguments.length - 2;
|
|
5481
|
+
if (1 === childrenLength) i.children = children;
|
|
5482
|
+
else if (1 < childrenLength) {
|
|
5483
|
+
for (
|
|
5484
|
+
var childArray = Array(childrenLength), _i = 0;
|
|
5485
|
+
_i < childrenLength;
|
|
5486
|
+
_i++
|
|
5487
|
+
)
|
|
5488
|
+
childArray[_i] = arguments[_i + 2];
|
|
5489
|
+
Object.freeze && Object.freeze(childArray);
|
|
5490
|
+
i.children = childArray;
|
|
5491
|
+
}
|
|
5492
|
+
if (type && type.defaultProps)
|
|
5493
|
+
for (propName in ((childrenLength = type.defaultProps), childrenLength))
|
|
5494
|
+
void 0 === i[propName] && (i[propName] = childrenLength[propName]);
|
|
5495
|
+
key &&
|
|
5496
|
+
defineKeyPropWarningGetter(
|
|
5497
|
+
i,
|
|
5498
|
+
"function" === typeof type
|
|
5499
|
+
? type.displayName || type.name || "Unknown"
|
|
5500
|
+
: type
|
|
5501
|
+
);
|
|
5502
|
+
var propName = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
|
|
5503
|
+
return ReactElement(
|
|
5504
|
+
type,
|
|
5505
|
+
key,
|
|
5506
|
+
i,
|
|
5507
|
+
getOwner(),
|
|
5508
|
+
propName ? Error("react-stack-top-frame") : unknownOwnerDebugStack,
|
|
5509
|
+
propName ? createTask(getTaskName(type)) : unknownOwnerDebugTask
|
|
5510
|
+
);
|
|
5511
|
+
};
|
|
5512
|
+
exports$1.createRef = function () {
|
|
5513
|
+
var refObject = { current: null };
|
|
5514
|
+
Object.seal(refObject);
|
|
5515
|
+
return refObject;
|
|
5516
|
+
};
|
|
5517
|
+
exports$1.forwardRef = function (render) {
|
|
5518
|
+
null != render && render.$$typeof === REACT_MEMO_TYPE
|
|
5519
|
+
? console.error(
|
|
5520
|
+
"forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."
|
|
5521
|
+
)
|
|
5522
|
+
: "function" !== typeof render
|
|
5523
|
+
? console.error(
|
|
5524
|
+
"forwardRef requires a render function but was given %s.",
|
|
5525
|
+
null === render ? "null" : typeof render
|
|
5526
|
+
)
|
|
5527
|
+
: 0 !== render.length &&
|
|
5528
|
+
2 !== render.length &&
|
|
5529
|
+
console.error(
|
|
5530
|
+
"forwardRef render functions accept exactly two parameters: props and ref. %s",
|
|
5531
|
+
1 === render.length
|
|
5532
|
+
? "Did you forget to use the ref parameter?"
|
|
5533
|
+
: "Any additional parameter will be undefined."
|
|
5534
|
+
);
|
|
5535
|
+
null != render &&
|
|
5536
|
+
null != render.defaultProps &&
|
|
5537
|
+
console.error(
|
|
5538
|
+
"forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?"
|
|
5539
|
+
);
|
|
5540
|
+
var elementType = { $$typeof: REACT_FORWARD_REF_TYPE, render: render },
|
|
5541
|
+
ownName;
|
|
5542
|
+
Object.defineProperty(elementType, "displayName", {
|
|
5543
|
+
enumerable: false,
|
|
5544
|
+
configurable: true,
|
|
5545
|
+
get: function () {
|
|
5546
|
+
return ownName;
|
|
5547
|
+
},
|
|
5548
|
+
set: function (name) {
|
|
5549
|
+
ownName = name;
|
|
5550
|
+
render.name ||
|
|
5551
|
+
render.displayName ||
|
|
5552
|
+
(Object.defineProperty(render, "name", { value: name }),
|
|
5553
|
+
(render.displayName = name));
|
|
5554
|
+
}
|
|
5555
|
+
});
|
|
5556
|
+
return elementType;
|
|
5557
|
+
};
|
|
5558
|
+
exports$1.isValidElement = isValidElement;
|
|
5559
|
+
exports$1.lazy = function (ctor) {
|
|
5560
|
+
ctor = { _status: -1, _result: ctor };
|
|
5561
|
+
var lazyType = {
|
|
5562
|
+
$$typeof: REACT_LAZY_TYPE,
|
|
5563
|
+
_payload: ctor,
|
|
5564
|
+
_init: lazyInitializer
|
|
5565
|
+
},
|
|
5566
|
+
ioInfo = {
|
|
5567
|
+
name: "lazy",
|
|
5568
|
+
start: -1,
|
|
5569
|
+
end: -1,
|
|
5570
|
+
value: null,
|
|
5571
|
+
owner: null,
|
|
5572
|
+
debugStack: Error("react-stack-top-frame"),
|
|
5573
|
+
debugTask: console.createTask ? console.createTask("lazy()") : null
|
|
5574
|
+
};
|
|
5575
|
+
ctor._ioInfo = ioInfo;
|
|
5576
|
+
lazyType._debugInfo = [{ awaited: ioInfo }];
|
|
5577
|
+
return lazyType;
|
|
5578
|
+
};
|
|
5579
|
+
exports$1.memo = function (type, compare) {
|
|
5580
|
+
null == type &&
|
|
5581
|
+
console.error(
|
|
5582
|
+
"memo: The first argument must be a component. Instead received: %s",
|
|
5583
|
+
null === type ? "null" : typeof type
|
|
5584
|
+
);
|
|
5585
|
+
compare = {
|
|
5586
|
+
$$typeof: REACT_MEMO_TYPE,
|
|
5587
|
+
type: type,
|
|
5588
|
+
compare: void 0 === compare ? null : compare
|
|
5589
|
+
};
|
|
5590
|
+
var ownName;
|
|
5591
|
+
Object.defineProperty(compare, "displayName", {
|
|
5592
|
+
enumerable: false,
|
|
5593
|
+
configurable: true,
|
|
5594
|
+
get: function () {
|
|
5595
|
+
return ownName;
|
|
5596
|
+
},
|
|
5597
|
+
set: function (name) {
|
|
5598
|
+
ownName = name;
|
|
5599
|
+
type.name ||
|
|
5600
|
+
type.displayName ||
|
|
5601
|
+
(Object.defineProperty(type, "name", { value: name }),
|
|
5602
|
+
(type.displayName = name));
|
|
5603
|
+
}
|
|
5604
|
+
});
|
|
5605
|
+
return compare;
|
|
5606
|
+
};
|
|
5607
|
+
exports$1.startTransition = function (scope) {
|
|
5608
|
+
var prevTransition = ReactSharedInternals.T,
|
|
5609
|
+
currentTransition = {};
|
|
5610
|
+
currentTransition._updatedFibers = new Set();
|
|
5611
|
+
ReactSharedInternals.T = currentTransition;
|
|
5612
|
+
try {
|
|
5613
|
+
var returnValue = scope(),
|
|
5614
|
+
onStartTransitionFinish = ReactSharedInternals.S;
|
|
5615
|
+
null !== onStartTransitionFinish &&
|
|
5616
|
+
onStartTransitionFinish(currentTransition, returnValue);
|
|
5617
|
+
"object" === typeof returnValue &&
|
|
5618
|
+
null !== returnValue &&
|
|
5619
|
+
"function" === typeof returnValue.then &&
|
|
5620
|
+
(ReactSharedInternals.asyncTransitions++,
|
|
5621
|
+
returnValue.then(releaseAsyncTransition, releaseAsyncTransition),
|
|
5622
|
+
returnValue.then(noop, reportGlobalError));
|
|
5623
|
+
} catch (error) {
|
|
5624
|
+
reportGlobalError(error);
|
|
5625
|
+
} finally {
|
|
5626
|
+
null === prevTransition &&
|
|
5627
|
+
currentTransition._updatedFibers &&
|
|
5628
|
+
((scope = currentTransition._updatedFibers.size),
|
|
5629
|
+
currentTransition._updatedFibers.clear(),
|
|
5630
|
+
10 < scope &&
|
|
5631
|
+
console.warn(
|
|
5632
|
+
"Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."
|
|
5633
|
+
)),
|
|
5634
|
+
null !== prevTransition &&
|
|
5635
|
+
null !== currentTransition.types &&
|
|
5636
|
+
(null !== prevTransition.types &&
|
|
5637
|
+
prevTransition.types !== currentTransition.types &&
|
|
5638
|
+
console.error(
|
|
5639
|
+
"We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."
|
|
5640
|
+
),
|
|
5641
|
+
(prevTransition.types = currentTransition.types)),
|
|
5642
|
+
(ReactSharedInternals.T = prevTransition);
|
|
5643
|
+
}
|
|
5644
|
+
};
|
|
5645
|
+
exports$1.unstable_useCacheRefresh = function () {
|
|
5646
|
+
return resolveDispatcher().useCacheRefresh();
|
|
5647
|
+
};
|
|
5648
|
+
exports$1.use = function (usable) {
|
|
5649
|
+
return resolveDispatcher().use(usable);
|
|
5650
|
+
};
|
|
5651
|
+
exports$1.useActionState = function (action, initialState, permalink) {
|
|
5652
|
+
return resolveDispatcher().useActionState(
|
|
5653
|
+
action,
|
|
5654
|
+
initialState,
|
|
5655
|
+
permalink
|
|
5656
|
+
);
|
|
5657
|
+
};
|
|
5658
|
+
exports$1.useCallback = function (callback, deps) {
|
|
5659
|
+
return resolveDispatcher().useCallback(callback, deps);
|
|
5660
|
+
};
|
|
5661
|
+
exports$1.useContext = function (Context) {
|
|
5662
|
+
var dispatcher = resolveDispatcher();
|
|
5663
|
+
Context.$$typeof === REACT_CONSUMER_TYPE &&
|
|
5664
|
+
console.error(
|
|
5665
|
+
"Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"
|
|
5666
|
+
);
|
|
5667
|
+
return dispatcher.useContext(Context);
|
|
5668
|
+
};
|
|
5669
|
+
exports$1.useDebugValue = function (value, formatterFn) {
|
|
5670
|
+
return resolveDispatcher().useDebugValue(value, formatterFn);
|
|
5671
|
+
};
|
|
5672
|
+
exports$1.useDeferredValue = function (value, initialValue) {
|
|
5673
|
+
return resolveDispatcher().useDeferredValue(value, initialValue);
|
|
5674
|
+
};
|
|
5675
|
+
exports$1.useEffect = function (create, deps) {
|
|
5676
|
+
null == create &&
|
|
5677
|
+
console.warn(
|
|
5678
|
+
"React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?"
|
|
5679
|
+
);
|
|
5680
|
+
return resolveDispatcher().useEffect(create, deps);
|
|
5681
|
+
};
|
|
5682
|
+
exports$1.useEffectEvent = function (callback) {
|
|
5683
|
+
return resolveDispatcher().useEffectEvent(callback);
|
|
5684
|
+
};
|
|
5685
|
+
exports$1.useId = function () {
|
|
5686
|
+
return resolveDispatcher().useId();
|
|
5687
|
+
};
|
|
5688
|
+
exports$1.useImperativeHandle = function (ref, create, deps) {
|
|
5689
|
+
return resolveDispatcher().useImperativeHandle(ref, create, deps);
|
|
5690
|
+
};
|
|
5691
|
+
exports$1.useInsertionEffect = function (create, deps) {
|
|
5692
|
+
null == create &&
|
|
5693
|
+
console.warn(
|
|
5694
|
+
"React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"
|
|
5695
|
+
);
|
|
5696
|
+
return resolveDispatcher().useInsertionEffect(create, deps);
|
|
5697
|
+
};
|
|
5698
|
+
exports$1.useLayoutEffect = function (create, deps) {
|
|
5699
|
+
null == create &&
|
|
5700
|
+
console.warn(
|
|
5701
|
+
"React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"
|
|
5702
|
+
);
|
|
5703
|
+
return resolveDispatcher().useLayoutEffect(create, deps);
|
|
5704
|
+
};
|
|
5705
|
+
exports$1.useMemo = function (create, deps) {
|
|
5706
|
+
return resolveDispatcher().useMemo(create, deps);
|
|
5707
|
+
};
|
|
5708
|
+
exports$1.useOptimistic = function (passthrough, reducer) {
|
|
5709
|
+
return resolveDispatcher().useOptimistic(passthrough, reducer);
|
|
5710
|
+
};
|
|
5711
|
+
exports$1.useReducer = function (reducer, initialArg, init) {
|
|
5712
|
+
return resolveDispatcher().useReducer(reducer, initialArg, init);
|
|
5713
|
+
};
|
|
5714
|
+
exports$1.useRef = function (initialValue) {
|
|
5715
|
+
return resolveDispatcher().useRef(initialValue);
|
|
5716
|
+
};
|
|
5717
|
+
exports$1.useState = function (initialState) {
|
|
5718
|
+
return resolveDispatcher().useState(initialState);
|
|
5719
|
+
};
|
|
5720
|
+
exports$1.useSyncExternalStore = function (
|
|
5721
|
+
subscribe,
|
|
5722
|
+
getSnapshot,
|
|
5723
|
+
getServerSnapshot
|
|
5724
|
+
) {
|
|
5725
|
+
return resolveDispatcher().useSyncExternalStore(
|
|
5726
|
+
subscribe,
|
|
5727
|
+
getSnapshot,
|
|
5728
|
+
getServerSnapshot
|
|
5729
|
+
);
|
|
5730
|
+
};
|
|
5731
|
+
exports$1.useTransition = function () {
|
|
5732
|
+
return resolveDispatcher().useTransition();
|
|
5733
|
+
};
|
|
5734
|
+
exports$1.version = "19.2.0";
|
|
5735
|
+
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
|
|
5736
|
+
"function" ===
|
|
5737
|
+
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
|
|
5738
|
+
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
5739
|
+
})();
|
|
5740
|
+
} (react_development, react_development.exports));
|
|
5741
|
+
return react_development.exports;
|
|
5742
|
+
}
|
|
5743
|
+
|
|
5744
|
+
var hasRequiredReact;
|
|
5745
|
+
|
|
5746
|
+
function requireReact () {
|
|
5747
|
+
if (hasRequiredReact) return react.exports;
|
|
5748
|
+
hasRequiredReact = 1;
|
|
5749
|
+
|
|
5750
|
+
if (process.env.NODE_ENV === 'production') {
|
|
5751
|
+
react.exports = requireReact_production();
|
|
5752
|
+
} else {
|
|
5753
|
+
react.exports = requireReact_development();
|
|
5754
|
+
}
|
|
5755
|
+
return react.exports;
|
|
5756
|
+
}
|
|
5757
|
+
|
|
5758
|
+
/**
|
|
5759
|
+
* @license React
|
|
5760
|
+
* react-jsx-runtime.development.js
|
|
5761
|
+
*
|
|
5762
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
5763
|
+
*
|
|
5764
|
+
* This source code is licensed under the MIT license found in the
|
|
5765
|
+
* LICENSE file in the root directory of this source tree.
|
|
5766
|
+
*/
|
|
5767
|
+
|
|
5768
|
+
var hasRequiredReactJsxRuntime_development;
|
|
5769
|
+
|
|
5770
|
+
function requireReactJsxRuntime_development () {
|
|
5771
|
+
if (hasRequiredReactJsxRuntime_development) return reactJsxRuntime_development;
|
|
5772
|
+
hasRequiredReactJsxRuntime_development = 1;
|
|
5773
|
+
"production" !== process.env.NODE_ENV &&
|
|
5774
|
+
(function () {
|
|
5775
|
+
function getComponentNameFromType(type) {
|
|
5776
|
+
if (null == type) return null;
|
|
5777
|
+
if ("function" === typeof type)
|
|
5778
|
+
return type.$$typeof === REACT_CLIENT_REFERENCE
|
|
5779
|
+
? null
|
|
5780
|
+
: type.displayName || type.name || null;
|
|
5781
|
+
if ("string" === typeof type) return type;
|
|
5782
|
+
switch (type) {
|
|
5783
|
+
case REACT_FRAGMENT_TYPE:
|
|
5784
|
+
return "Fragment";
|
|
5785
|
+
case REACT_PROFILER_TYPE:
|
|
5786
|
+
return "Profiler";
|
|
5787
|
+
case REACT_STRICT_MODE_TYPE:
|
|
5788
|
+
return "StrictMode";
|
|
5789
|
+
case REACT_SUSPENSE_TYPE:
|
|
5790
|
+
return "Suspense";
|
|
5791
|
+
case REACT_SUSPENSE_LIST_TYPE:
|
|
5792
|
+
return "SuspenseList";
|
|
5793
|
+
case REACT_ACTIVITY_TYPE:
|
|
5794
|
+
return "Activity";
|
|
5795
|
+
}
|
|
5796
|
+
if ("object" === typeof type)
|
|
5797
|
+
switch (
|
|
5798
|
+
("number" === typeof type.tag &&
|
|
5799
|
+
console.error(
|
|
5800
|
+
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
5801
|
+
),
|
|
5802
|
+
type.$$typeof)
|
|
5803
|
+
) {
|
|
5804
|
+
case REACT_PORTAL_TYPE:
|
|
5805
|
+
return "Portal";
|
|
5806
|
+
case REACT_CONTEXT_TYPE:
|
|
5807
|
+
return type.displayName || "Context";
|
|
5808
|
+
case REACT_CONSUMER_TYPE:
|
|
5809
|
+
return (type._context.displayName || "Context") + ".Consumer";
|
|
5810
|
+
case REACT_FORWARD_REF_TYPE:
|
|
5811
|
+
var innerType = type.render;
|
|
5812
|
+
type = type.displayName;
|
|
5813
|
+
type ||
|
|
5814
|
+
((type = innerType.displayName || innerType.name || ""),
|
|
5815
|
+
(type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef"));
|
|
5816
|
+
return type;
|
|
5817
|
+
case REACT_MEMO_TYPE:
|
|
5818
|
+
return (
|
|
5819
|
+
(innerType = type.displayName || null),
|
|
5820
|
+
null !== innerType
|
|
5821
|
+
? innerType
|
|
5822
|
+
: getComponentNameFromType(type.type) || "Memo"
|
|
5823
|
+
);
|
|
5824
|
+
case REACT_LAZY_TYPE:
|
|
5825
|
+
innerType = type._payload;
|
|
5826
|
+
type = type._init;
|
|
5827
|
+
try {
|
|
5828
|
+
return getComponentNameFromType(type(innerType));
|
|
5829
|
+
} catch (x) {}
|
|
5830
|
+
}
|
|
5831
|
+
return null;
|
|
5832
|
+
}
|
|
5833
|
+
function testStringCoercion(value) {
|
|
5834
|
+
return "" + value;
|
|
5835
|
+
}
|
|
5836
|
+
function checkKeyStringCoercion(value) {
|
|
5837
|
+
try {
|
|
5838
|
+
testStringCoercion(value);
|
|
5839
|
+
var JSCompiler_inline_result = !1;
|
|
5840
|
+
} catch (e) {
|
|
5841
|
+
JSCompiler_inline_result = true;
|
|
5842
|
+
}
|
|
5843
|
+
if (JSCompiler_inline_result) {
|
|
5844
|
+
JSCompiler_inline_result = console;
|
|
5845
|
+
var JSCompiler_temp_const = JSCompiler_inline_result.error;
|
|
5846
|
+
var JSCompiler_inline_result$jscomp$0 =
|
|
5847
|
+
("function" === typeof Symbol &&
|
|
5848
|
+
Symbol.toStringTag &&
|
|
5849
|
+
value[Symbol.toStringTag]) ||
|
|
5850
|
+
value.constructor.name ||
|
|
5851
|
+
"Object";
|
|
5852
|
+
JSCompiler_temp_const.call(
|
|
5853
|
+
JSCompiler_inline_result,
|
|
5854
|
+
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
5855
|
+
JSCompiler_inline_result$jscomp$0
|
|
5856
|
+
);
|
|
5857
|
+
return testStringCoercion(value);
|
|
5858
|
+
}
|
|
5859
|
+
}
|
|
5860
|
+
function getTaskName(type) {
|
|
5861
|
+
if (type === REACT_FRAGMENT_TYPE) return "<>";
|
|
5862
|
+
if (
|
|
5863
|
+
"object" === typeof type &&
|
|
5864
|
+
null !== type &&
|
|
5865
|
+
type.$$typeof === REACT_LAZY_TYPE
|
|
5866
|
+
)
|
|
5867
|
+
return "<...>";
|
|
5868
|
+
try {
|
|
5869
|
+
var name = getComponentNameFromType(type);
|
|
5870
|
+
return name ? "<" + name + ">" : "<...>";
|
|
5871
|
+
} catch (x) {
|
|
5872
|
+
return "<...>";
|
|
5873
|
+
}
|
|
5874
|
+
}
|
|
5875
|
+
function getOwner() {
|
|
5876
|
+
var dispatcher = ReactSharedInternals.A;
|
|
5877
|
+
return null === dispatcher ? null : dispatcher.getOwner();
|
|
5878
|
+
}
|
|
5879
|
+
function UnknownOwner() {
|
|
5880
|
+
return Error("react-stack-top-frame");
|
|
5881
|
+
}
|
|
5882
|
+
function hasValidKey(config) {
|
|
5883
|
+
if (hasOwnProperty.call(config, "key")) {
|
|
5884
|
+
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
|
|
5885
|
+
if (getter && getter.isReactWarning) return false;
|
|
5886
|
+
}
|
|
5887
|
+
return void 0 !== config.key;
|
|
5888
|
+
}
|
|
5889
|
+
function defineKeyPropWarningGetter(props, displayName) {
|
|
5890
|
+
function warnAboutAccessingKey() {
|
|
5891
|
+
specialPropKeyWarningShown ||
|
|
5892
|
+
((specialPropKeyWarningShown = true),
|
|
5893
|
+
console.error(
|
|
5894
|
+
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
5895
|
+
displayName
|
|
5896
|
+
));
|
|
5897
|
+
}
|
|
5898
|
+
warnAboutAccessingKey.isReactWarning = true;
|
|
5899
|
+
Object.defineProperty(props, "key", {
|
|
5900
|
+
get: warnAboutAccessingKey,
|
|
5901
|
+
configurable: true
|
|
5902
|
+
});
|
|
5903
|
+
}
|
|
5904
|
+
function elementRefGetterWithDeprecationWarning() {
|
|
5905
|
+
var componentName = getComponentNameFromType(this.type);
|
|
5906
|
+
didWarnAboutElementRef[componentName] ||
|
|
5907
|
+
((didWarnAboutElementRef[componentName] = true),
|
|
5908
|
+
console.error(
|
|
5909
|
+
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
5910
|
+
));
|
|
5911
|
+
componentName = this.props.ref;
|
|
5912
|
+
return void 0 !== componentName ? componentName : null;
|
|
5913
|
+
}
|
|
5914
|
+
function ReactElement(type, key, props, owner, debugStack, debugTask) {
|
|
5915
|
+
var refProp = props.ref;
|
|
5916
|
+
type = {
|
|
5917
|
+
$$typeof: REACT_ELEMENT_TYPE,
|
|
5918
|
+
type: type,
|
|
5919
|
+
key: key,
|
|
5920
|
+
props: props,
|
|
5921
|
+
_owner: owner
|
|
5922
|
+
};
|
|
5923
|
+
null !== (void 0 !== refProp ? refProp : null)
|
|
5924
|
+
? Object.defineProperty(type, "ref", {
|
|
5925
|
+
enumerable: false,
|
|
5926
|
+
get: elementRefGetterWithDeprecationWarning
|
|
5927
|
+
})
|
|
5928
|
+
: Object.defineProperty(type, "ref", { enumerable: false, value: null });
|
|
5929
|
+
type._store = {};
|
|
5930
|
+
Object.defineProperty(type._store, "validated", {
|
|
5931
|
+
configurable: false,
|
|
5932
|
+
enumerable: false,
|
|
5933
|
+
writable: true,
|
|
5934
|
+
value: 0
|
|
5935
|
+
});
|
|
5936
|
+
Object.defineProperty(type, "_debugInfo", {
|
|
5937
|
+
configurable: false,
|
|
5938
|
+
enumerable: false,
|
|
5939
|
+
writable: true,
|
|
5940
|
+
value: null
|
|
5941
|
+
});
|
|
5942
|
+
Object.defineProperty(type, "_debugStack", {
|
|
5943
|
+
configurable: false,
|
|
5944
|
+
enumerable: false,
|
|
5945
|
+
writable: true,
|
|
5946
|
+
value: debugStack
|
|
5947
|
+
});
|
|
5948
|
+
Object.defineProperty(type, "_debugTask", {
|
|
5949
|
+
configurable: false,
|
|
5950
|
+
enumerable: false,
|
|
5951
|
+
writable: true,
|
|
5952
|
+
value: debugTask
|
|
5953
|
+
});
|
|
5954
|
+
Object.freeze && (Object.freeze(type.props), Object.freeze(type));
|
|
5955
|
+
return type;
|
|
5956
|
+
}
|
|
5957
|
+
function jsxDEVImpl(
|
|
5958
|
+
type,
|
|
5959
|
+
config,
|
|
5960
|
+
maybeKey,
|
|
5961
|
+
isStaticChildren,
|
|
5962
|
+
debugStack,
|
|
5963
|
+
debugTask
|
|
5964
|
+
) {
|
|
5965
|
+
var children = config.children;
|
|
5966
|
+
if (void 0 !== children)
|
|
5967
|
+
if (isStaticChildren)
|
|
5968
|
+
if (isArrayImpl(children)) {
|
|
5969
|
+
for (
|
|
5970
|
+
isStaticChildren = 0;
|
|
5971
|
+
isStaticChildren < children.length;
|
|
5972
|
+
isStaticChildren++
|
|
5973
|
+
)
|
|
5974
|
+
validateChildKeys(children[isStaticChildren]);
|
|
5975
|
+
Object.freeze && Object.freeze(children);
|
|
5976
|
+
} else
|
|
5977
|
+
console.error(
|
|
5978
|
+
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
5979
|
+
);
|
|
5980
|
+
else validateChildKeys(children);
|
|
5981
|
+
if (hasOwnProperty.call(config, "key")) {
|
|
5982
|
+
children = getComponentNameFromType(type);
|
|
5983
|
+
var keys = Object.keys(config).filter(function (k) {
|
|
5984
|
+
return "key" !== k;
|
|
5985
|
+
});
|
|
5986
|
+
isStaticChildren =
|
|
5987
|
+
0 < keys.length
|
|
5988
|
+
? "{key: someKey, " + keys.join(": ..., ") + ": ...}"
|
|
5989
|
+
: "{key: someKey}";
|
|
5990
|
+
didWarnAboutKeySpread[children + isStaticChildren] ||
|
|
5991
|
+
((keys =
|
|
5992
|
+
0 < keys.length ? "{" + keys.join(": ..., ") + ": ...}" : "{}"),
|
|
5993
|
+
console.error(
|
|
5994
|
+
'A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',
|
|
5995
|
+
isStaticChildren,
|
|
5996
|
+
children,
|
|
5997
|
+
keys,
|
|
5998
|
+
children
|
|
5999
|
+
),
|
|
6000
|
+
(didWarnAboutKeySpread[children + isStaticChildren] = true));
|
|
6001
|
+
}
|
|
6002
|
+
children = null;
|
|
6003
|
+
void 0 !== maybeKey &&
|
|
6004
|
+
(checkKeyStringCoercion(maybeKey), (children = "" + maybeKey));
|
|
6005
|
+
hasValidKey(config) &&
|
|
6006
|
+
(checkKeyStringCoercion(config.key), (children = "" + config.key));
|
|
6007
|
+
if ("key" in config) {
|
|
6008
|
+
maybeKey = {};
|
|
6009
|
+
for (var propName in config)
|
|
6010
|
+
"key" !== propName && (maybeKey[propName] = config[propName]);
|
|
6011
|
+
} else maybeKey = config;
|
|
6012
|
+
children &&
|
|
6013
|
+
defineKeyPropWarningGetter(
|
|
6014
|
+
maybeKey,
|
|
6015
|
+
"function" === typeof type
|
|
6016
|
+
? type.displayName || type.name || "Unknown"
|
|
6017
|
+
: type
|
|
6018
|
+
);
|
|
6019
|
+
return ReactElement(
|
|
6020
|
+
type,
|
|
6021
|
+
children,
|
|
6022
|
+
maybeKey,
|
|
6023
|
+
getOwner(),
|
|
6024
|
+
debugStack,
|
|
6025
|
+
debugTask
|
|
6026
|
+
);
|
|
6027
|
+
}
|
|
6028
|
+
function validateChildKeys(node) {
|
|
6029
|
+
isValidElement(node)
|
|
6030
|
+
? node._store && (node._store.validated = 1)
|
|
6031
|
+
: "object" === typeof node &&
|
|
6032
|
+
null !== node &&
|
|
6033
|
+
node.$$typeof === REACT_LAZY_TYPE &&
|
|
6034
|
+
("fulfilled" === node._payload.status
|
|
6035
|
+
? isValidElement(node._payload.value) &&
|
|
6036
|
+
node._payload.value._store &&
|
|
6037
|
+
(node._payload.value._store.validated = 1)
|
|
6038
|
+
: node._store && (node._store.validated = 1));
|
|
6039
|
+
}
|
|
6040
|
+
function isValidElement(object) {
|
|
6041
|
+
return (
|
|
6042
|
+
"object" === typeof object &&
|
|
6043
|
+
null !== object &&
|
|
6044
|
+
object.$$typeof === REACT_ELEMENT_TYPE
|
|
6045
|
+
);
|
|
6046
|
+
}
|
|
6047
|
+
var React = requireReact(),
|
|
6048
|
+
REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
|
|
6049
|
+
REACT_PORTAL_TYPE = Symbol.for("react.portal"),
|
|
6050
|
+
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
|
|
6051
|
+
REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
|
|
6052
|
+
REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
|
|
6053
|
+
REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
|
|
6054
|
+
REACT_CONTEXT_TYPE = Symbol.for("react.context"),
|
|
6055
|
+
REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
|
|
6056
|
+
REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
|
|
6057
|
+
REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
|
|
6058
|
+
REACT_MEMO_TYPE = Symbol.for("react.memo"),
|
|
6059
|
+
REACT_LAZY_TYPE = Symbol.for("react.lazy"),
|
|
6060
|
+
REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
|
|
6061
|
+
REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"),
|
|
6062
|
+
ReactSharedInternals =
|
|
6063
|
+
React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
|
|
6064
|
+
hasOwnProperty = Object.prototype.hasOwnProperty,
|
|
6065
|
+
isArrayImpl = Array.isArray,
|
|
6066
|
+
createTask = console.createTask
|
|
6067
|
+
? console.createTask
|
|
6068
|
+
: function () {
|
|
6069
|
+
return null;
|
|
6070
|
+
};
|
|
6071
|
+
React = {
|
|
6072
|
+
react_stack_bottom_frame: function (callStackForError) {
|
|
6073
|
+
return callStackForError();
|
|
6074
|
+
}
|
|
6075
|
+
};
|
|
6076
|
+
var specialPropKeyWarningShown;
|
|
6077
|
+
var didWarnAboutElementRef = {};
|
|
6078
|
+
var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(
|
|
6079
|
+
React,
|
|
6080
|
+
UnknownOwner
|
|
6081
|
+
)();
|
|
6082
|
+
var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
|
|
6083
|
+
var didWarnAboutKeySpread = {};
|
|
6084
|
+
reactJsxRuntime_development.Fragment = REACT_FRAGMENT_TYPE;
|
|
6085
|
+
reactJsxRuntime_development.jsx = function (type, config, maybeKey) {
|
|
6086
|
+
var trackActualOwner =
|
|
6087
|
+
1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
|
|
6088
|
+
return jsxDEVImpl(
|
|
6089
|
+
type,
|
|
6090
|
+
config,
|
|
6091
|
+
maybeKey,
|
|
6092
|
+
false,
|
|
6093
|
+
trackActualOwner
|
|
6094
|
+
? Error("react-stack-top-frame")
|
|
6095
|
+
: unknownOwnerDebugStack,
|
|
6096
|
+
trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
|
|
6097
|
+
);
|
|
6098
|
+
};
|
|
6099
|
+
reactJsxRuntime_development.jsxs = function (type, config, maybeKey) {
|
|
6100
|
+
var trackActualOwner =
|
|
6101
|
+
1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
|
|
6102
|
+
return jsxDEVImpl(
|
|
6103
|
+
type,
|
|
6104
|
+
config,
|
|
6105
|
+
maybeKey,
|
|
6106
|
+
true,
|
|
6107
|
+
trackActualOwner
|
|
6108
|
+
? Error("react-stack-top-frame")
|
|
6109
|
+
: unknownOwnerDebugStack,
|
|
6110
|
+
trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
|
|
6111
|
+
);
|
|
6112
|
+
};
|
|
6113
|
+
})();
|
|
6114
|
+
return reactJsxRuntime_development;
|
|
6115
|
+
}
|
|
6116
|
+
|
|
6117
|
+
var hasRequiredJsxRuntime;
|
|
6118
|
+
|
|
6119
|
+
function requireJsxRuntime () {
|
|
6120
|
+
if (hasRequiredJsxRuntime) return jsxRuntime.exports;
|
|
6121
|
+
hasRequiredJsxRuntime = 1;
|
|
6122
|
+
|
|
6123
|
+
if (process.env.NODE_ENV === 'production') {
|
|
6124
|
+
jsxRuntime.exports = requireReactJsxRuntime_production();
|
|
6125
|
+
} else {
|
|
6126
|
+
jsxRuntime.exports = requireReactJsxRuntime_development();
|
|
6127
|
+
}
|
|
6128
|
+
return jsxRuntime.exports;
|
|
6129
|
+
}
|
|
6130
|
+
|
|
6131
|
+
var jsxRuntimeExports = requireJsxRuntime();
|
|
6132
|
+
|
|
6133
|
+
const COUNTRY_CODES = [
|
|
6134
|
+
{ code: "+91", label: "🇮🇳 +91" },
|
|
6135
|
+
{ code: "+1", label: "🇺🇸 +1" },
|
|
6136
|
+
{ code: "+44", label: "🇬🇧 +44" },
|
|
6137
|
+
{ code: "+86", label: "🇨🇳 +86" },
|
|
6138
|
+
{ code: "+81", label: "🇯🇵 +81" },
|
|
6139
|
+
];
|
|
6140
|
+
const GENDER_OPTIONS = [
|
|
6141
|
+
{ value: "MALE", label: "Male" },
|
|
6142
|
+
{ value: "FEMALE", label: "Female" },
|
|
6143
|
+
{ value: "OTHER", label: "Other" },
|
|
6144
|
+
];
|
|
6145
|
+
const BLOOD_GROUP_OPTIONS = [
|
|
6146
|
+
{ value: "A+", label: "A+" },
|
|
6147
|
+
{ value: "A-", label: "A-" },
|
|
6148
|
+
{ value: "B+", label: "B+" },
|
|
6149
|
+
{ value: "B-", label: "B-" },
|
|
6150
|
+
{ value: "AB+", label: "AB+" },
|
|
6151
|
+
{ value: "AB-", label: "AB-" },
|
|
6152
|
+
{ value: "O+", label: "O+" },
|
|
6153
|
+
{ value: "O-", label: "O-" },
|
|
6154
|
+
];
|
|
6155
|
+
const mapBloodGroupToApi = (uiBloodGroup) => {
|
|
6156
|
+
const bloodGroupMap = {
|
|
6157
|
+
"A+": "A_POSITIVE",
|
|
6158
|
+
"A-": "A_NEGATIVE",
|
|
6159
|
+
"B+": "B_POSITIVE",
|
|
6160
|
+
"B-": "B_NEGATIVE",
|
|
6161
|
+
"AB+": "AB_POSITIVE",
|
|
6162
|
+
"AB-": "AB_NEGATIVE",
|
|
6163
|
+
"O+": "O_POSITIVE",
|
|
6164
|
+
"O-": "O_NEGATIVE",
|
|
6165
|
+
};
|
|
6166
|
+
return bloodGroupMap[uiBloodGroup];
|
|
6167
|
+
};
|
|
6168
|
+
|
|
6169
|
+
var reactExports = requireReact();
|
|
6170
|
+
var React = /*@__PURE__*/getDefaultExportFromCjs(reactExports);
|
|
6171
|
+
|
|
6172
|
+
const defaultTheme = {
|
|
6173
|
+
name: "default",
|
|
6174
|
+
colors: {
|
|
6175
|
+
primary: "#27903F",
|
|
6176
|
+
primaryHover: "#218838",
|
|
6177
|
+
primaryActive: "#1e7835",
|
|
6178
|
+
secondary: "#009b4d",
|
|
6179
|
+
secondaryHover: "#008840",
|
|
6180
|
+
accent: "#10b981",
|
|
6181
|
+
accentHover: "#059669",
|
|
6182
|
+
background: "#f6f8fa",
|
|
6183
|
+
backgroundSecondary: "#f9fafb",
|
|
6184
|
+
backgroundTertiary: "#fff",
|
|
6185
|
+
surface: "#fff",
|
|
6186
|
+
surfaceHover: "#f9fafb",
|
|
6187
|
+
border: "#e5e7eb",
|
|
6188
|
+
borderHover: "#d1d5db",
|
|
6189
|
+
borderFocus: "#27903F",
|
|
6190
|
+
text: "#111827",
|
|
6191
|
+
textSecondary: "#374151",
|
|
6192
|
+
textTertiary: "#4E8F50",
|
|
6193
|
+
textDisabled: "#9ca3af",
|
|
6194
|
+
textOnPrimary: "#fff",
|
|
6195
|
+
textOnSecondary: "#fff",
|
|
6196
|
+
success: "#4E8F50",
|
|
6197
|
+
successBackground: "#ecfdf5",
|
|
6198
|
+
successBorder: "#6ee7b7",
|
|
6199
|
+
error: "#ef4444",
|
|
6200
|
+
errorBackground: "#fee2e2",
|
|
6201
|
+
errorBorder: "#fca5a5",
|
|
6202
|
+
warning: "#f59e0b",
|
|
6203
|
+
warningBackground: "#fef3c7",
|
|
6204
|
+
warningBorder: "#fcd34d",
|
|
6205
|
+
info: "#3b82f6",
|
|
6206
|
+
infoBackground: "#dbeafe",
|
|
6207
|
+
infoBorder: "#93c5fd",
|
|
6208
|
+
},
|
|
6209
|
+
typography: {
|
|
6210
|
+
fontFamily: "'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif",
|
|
6211
|
+
fontFamilyHeading: "'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif",
|
|
6212
|
+
fontSizeXs: "12px",
|
|
6213
|
+
fontSizeSm: "14px",
|
|
6214
|
+
fontSizeMd: "16px",
|
|
6215
|
+
fontSizeLg: "18px",
|
|
6216
|
+
fontSizeXl: "20px",
|
|
6217
|
+
fontSize2xl: "24px",
|
|
6218
|
+
fontSize3xl: "30px",
|
|
6219
|
+
fontWeightNormal: "400",
|
|
6220
|
+
fontWeightMedium: "500",
|
|
6221
|
+
fontWeightSemibold: "600",
|
|
6222
|
+
fontWeightBold: "700",
|
|
6223
|
+
lineHeightTight: "1.25",
|
|
6224
|
+
lineHeightNormal: "1.5",
|
|
6225
|
+
lineHeightRelaxed: "1.75",
|
|
6226
|
+
},
|
|
6227
|
+
spacing: {
|
|
6228
|
+
xs: "4px",
|
|
6229
|
+
sm: "8px",
|
|
6230
|
+
md: "12px",
|
|
6231
|
+
lg: "16px",
|
|
6232
|
+
xl: "20px",
|
|
6233
|
+
"2xl": "24px",
|
|
6234
|
+
"3xl": "32px",
|
|
6235
|
+
"4xl": "40px",
|
|
6236
|
+
},
|
|
6237
|
+
shadows: {
|
|
6238
|
+
none: "none",
|
|
6239
|
+
sm: "0 1px 2px 0 rgba(0, 0, 0, 0.05)",
|
|
6240
|
+
md: "0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",
|
|
6241
|
+
lg: "0 8px 24px rgba(16, 24, 40, 0.08)",
|
|
6242
|
+
xl: "0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)",
|
|
6243
|
+
"2xl": "0 25px 50px -12px rgba(0, 0, 0, 0.25)",
|
|
6244
|
+
},
|
|
6245
|
+
radii: {
|
|
6246
|
+
none: "0",
|
|
6247
|
+
sm: "4px",
|
|
6248
|
+
md: "8px",
|
|
6249
|
+
lg: "12px",
|
|
6250
|
+
xl: "16px",
|
|
6251
|
+
full: "9999px",
|
|
6252
|
+
},
|
|
6253
|
+
transitions: {
|
|
6254
|
+
fast: "150ms cubic-bezier(0.4, 0, 0.2, 1)",
|
|
6255
|
+
normal: "200ms cubic-bezier(0.4, 0, 0.2, 1)",
|
|
6256
|
+
slow: "300ms cubic-bezier(0.4, 0, 0.2, 1)",
|
|
6257
|
+
},
|
|
6258
|
+
breakpoints: {
|
|
6259
|
+
mobile: "320px",
|
|
6260
|
+
tablet: "768px",
|
|
6261
|
+
desktop: "1024px",
|
|
6262
|
+
wide: "1280px",
|
|
6263
|
+
},
|
|
6264
|
+
};
|
|
6265
|
+
|
|
6266
|
+
const ThemeContext = reactExports.createContext(undefined);
|
|
6267
|
+
function useTheme() {
|
|
6268
|
+
const context = React.useContext(ThemeContext);
|
|
6269
|
+
return context?.theme || defaultTheme;
|
|
6270
|
+
}
|
|
6271
|
+
|
|
6272
|
+
function getContainerStyles(theme, prefix = "medos", breakpoint) {
|
|
6273
|
+
const isMobile = breakpoint === "mobile";
|
|
6274
|
+
const isTablet = breakpoint === "tablet";
|
|
6275
|
+
return {
|
|
6276
|
+
container: {
|
|
6277
|
+
display: "flex",
|
|
6278
|
+
justifyContent: "center",
|
|
6279
|
+
padding: isMobile ? "16px" : "20px",
|
|
6280
|
+
fontFamily: theme.typography.fontFamily,
|
|
6281
|
+
background: theme.colors.background,
|
|
6282
|
+
},
|
|
6283
|
+
card: {
|
|
6284
|
+
width: "100%",
|
|
6285
|
+
maxWidth: isMobile || isTablet ? "100%" : 720,
|
|
6286
|
+
background: theme.colors.surface,
|
|
6287
|
+
borderRadius: "12px",
|
|
6288
|
+
boxShadow: "0 4px 12px rgba(0, 0, 0, 0.08)",
|
|
6289
|
+
padding: isMobile ? "20px" : "24px",
|
|
6290
|
+
boxSizing: "border-box",
|
|
6291
|
+
},
|
|
6292
|
+
header: {
|
|
6293
|
+
display: "flex",
|
|
6294
|
+
alignItems: "center",
|
|
6295
|
+
justifyContent: "space-between",
|
|
6296
|
+
marginBottom: "20px",
|
|
6297
|
+
flexWrap: isMobile ? "wrap" : "nowrap",
|
|
6298
|
+
},
|
|
6299
|
+
title: {
|
|
6300
|
+
marginLeft: isMobile ? 0 : 10,
|
|
6301
|
+
fontSize: isMobile ? "18px" : "20px",
|
|
6302
|
+
fontWeight: 600,
|
|
6303
|
+
color: theme.colors.text,
|
|
6304
|
+
margin: 0,
|
|
6305
|
+
},
|
|
6306
|
+
section: {
|
|
6307
|
+
marginTop: "16px",
|
|
6308
|
+
},
|
|
6309
|
+
errorMessage: {
|
|
6310
|
+
marginBottom: "16px",
|
|
6311
|
+
padding: "12px 16px",
|
|
6312
|
+
borderRadius: "8px",
|
|
6313
|
+
backgroundColor: theme.colors.errorBackground,
|
|
6314
|
+
color: theme.colors.error,
|
|
6315
|
+
fontWeight: 500,
|
|
6316
|
+
fontSize: "14px",
|
|
6317
|
+
border: `1px solid ${theme.colors.error}20`,
|
|
6318
|
+
},
|
|
6319
|
+
content: {
|
|
6320
|
+
padding: isMobile ? "16px 0 16px 0" : "24px 0 24px 0",
|
|
6321
|
+
},
|
|
6322
|
+
actions: {
|
|
6323
|
+
display: "flex",
|
|
6324
|
+
gap: "12px",
|
|
6325
|
+
marginTop: "24px",
|
|
6326
|
+
paddingTop: "20px",
|
|
6327
|
+
borderTop: `1px solid ${theme.colors.border}`,
|
|
6328
|
+
justifyContent: isMobile ? "stretch" : "flex-end",
|
|
6329
|
+
flexDirection: isMobile ? "column" : "row",
|
|
6330
|
+
},
|
|
6331
|
+
branding: {
|
|
6332
|
+
display: "flex",
|
|
6333
|
+
alignItems: "center",
|
|
6334
|
+
justifyContent: "center",
|
|
6335
|
+
gap: "8px",
|
|
6336
|
+
marginTop: isMobile ? "16px" : "24px",
|
|
6337
|
+
paddingTop: isMobile ? "12px" : "16px",
|
|
6338
|
+
borderTop: `1px solid ${theme.colors.border}`,
|
|
6339
|
+
opacity: 0.8,
|
|
6340
|
+
},
|
|
6341
|
+
poweredBy: {
|
|
6342
|
+
fontSize: "12px",
|
|
6343
|
+
color: theme.colors.textSecondary,
|
|
6344
|
+
fontWeight: 500,
|
|
6345
|
+
},
|
|
6346
|
+
};
|
|
6347
|
+
}
|
|
6348
|
+
function getButtonStyles(theme, prefix = "medos", breakpoint) {
|
|
6349
|
+
const isMobile = breakpoint === "mobile";
|
|
6350
|
+
const minHeight = isMobile ? "44px" : "40px";
|
|
6351
|
+
const basePadding = isMobile ? "12px 20px" : "10px 20px";
|
|
6352
|
+
const borderRadius = "8px";
|
|
6353
|
+
return {
|
|
6354
|
+
primary: {
|
|
6355
|
+
background: theme.colors.secondary,
|
|
6356
|
+
color: theme.colors.textOnSecondary,
|
|
6357
|
+
border: "none",
|
|
6358
|
+
padding: basePadding,
|
|
6359
|
+
borderRadius,
|
|
6360
|
+
cursor: "pointer",
|
|
6361
|
+
fontWeight: 600,
|
|
6362
|
+
fontSize: "14px",
|
|
6363
|
+
transition: "all 0.2s ease",
|
|
6364
|
+
minHeight,
|
|
6365
|
+
width: isMobile ? "100%" : "auto",
|
|
6366
|
+
boxShadow: "0 1px 2px rgba(0, 0, 0, 0.05)",
|
|
6367
|
+
lineHeight: "1.5",
|
|
6368
|
+
},
|
|
6369
|
+
primaryHover: {
|
|
6370
|
+
background: theme.colors.secondaryHover,
|
|
6371
|
+
boxShadow: "0 2px 4px rgba(0, 0, 0, 0.1)",
|
|
6372
|
+
},
|
|
6373
|
+
primaryDisabled: {
|
|
6374
|
+
opacity: 0.6,
|
|
6375
|
+
cursor: "not-allowed",
|
|
6376
|
+
},
|
|
6377
|
+
secondary: {
|
|
6378
|
+
background: theme.colors.surface,
|
|
6379
|
+
color: theme.colors.primary,
|
|
6380
|
+
border: `1px solid ${theme.colors.border}`,
|
|
6381
|
+
padding: basePadding,
|
|
6382
|
+
borderRadius,
|
|
6383
|
+
cursor: "pointer",
|
|
6384
|
+
fontWeight: 600,
|
|
6385
|
+
fontSize: "14px",
|
|
6386
|
+
transition: "all 0.2s ease",
|
|
6387
|
+
minHeight,
|
|
6388
|
+
width: isMobile ? "100%" : "auto",
|
|
6389
|
+
lineHeight: "1.5",
|
|
6390
|
+
},
|
|
6391
|
+
secondaryHover: {
|
|
6392
|
+
background: theme.colors.surfaceHover,
|
|
6393
|
+
borderColor: theme.colors.borderHover,
|
|
6394
|
+
},
|
|
6395
|
+
outline: {
|
|
6396
|
+
background: "transparent",
|
|
6397
|
+
color: theme.colors.text,
|
|
6398
|
+
border: `1px solid ${theme.colors.border}`,
|
|
6399
|
+
padding: basePadding,
|
|
6400
|
+
borderRadius,
|
|
6401
|
+
cursor: "pointer",
|
|
6402
|
+
fontWeight: 500,
|
|
6403
|
+
fontSize: "14px",
|
|
6404
|
+
transition: "all 0.2s ease",
|
|
6405
|
+
minHeight,
|
|
6406
|
+
width: isMobile ? "100%" : "auto",
|
|
6407
|
+
lineHeight: "1.5",
|
|
6408
|
+
},
|
|
6409
|
+
outlineHover: {
|
|
6410
|
+
background: theme.colors.backgroundSecondary,
|
|
6411
|
+
borderColor: theme.colors.borderHover,
|
|
6412
|
+
},
|
|
6413
|
+
ghost: {
|
|
6414
|
+
background: "transparent",
|
|
6415
|
+
color: theme.colors.primary,
|
|
6416
|
+
border: "none",
|
|
6417
|
+
padding: basePadding,
|
|
6418
|
+
borderRadius,
|
|
6419
|
+
cursor: "pointer",
|
|
6420
|
+
fontWeight: 500,
|
|
6421
|
+
fontSize: "14px",
|
|
6422
|
+
transition: "all 0.2s ease",
|
|
6423
|
+
minHeight,
|
|
6424
|
+
width: isMobile ? "100%" : "auto",
|
|
6425
|
+
lineHeight: "1.5",
|
|
6426
|
+
},
|
|
6427
|
+
ghostHover: {
|
|
6428
|
+
background: `${theme.colors.primary}10`,
|
|
6429
|
+
},
|
|
6430
|
+
};
|
|
6431
|
+
}
|
|
6432
|
+
function getPhoneVerifyStyles(theme, prefix = "medos", breakpoint) {
|
|
6433
|
+
const isMobile = breakpoint === "mobile";
|
|
6434
|
+
const borderRadius = "12px";
|
|
6435
|
+
const cardBorder = `1px solid ${theme.colors.border}`;
|
|
6436
|
+
return {
|
|
6437
|
+
container: {
|
|
6438
|
+
border: cardBorder,
|
|
6439
|
+
borderRadius,
|
|
6440
|
+
overflow: "hidden",
|
|
6441
|
+
backgroundColor: theme.colors.surface,
|
|
6442
|
+
boxShadow: "0 1px 3px rgba(0, 0, 0, 0.04)",
|
|
6443
|
+
},
|
|
6444
|
+
header: {
|
|
6445
|
+
padding: isMobile ? "16px 20px" : "18px 24px",
|
|
6446
|
+
borderBottom: cardBorder,
|
|
6447
|
+
backgroundColor: theme.colors.primary,
|
|
6448
|
+
color: theme.colors.textOnPrimary,
|
|
6449
|
+
},
|
|
6450
|
+
title: {
|
|
6451
|
+
fontSize: isMobile ? "16px" : "18px",
|
|
6452
|
+
fontWeight: 600,
|
|
6453
|
+
margin: 0,
|
|
6454
|
+
color: theme.colors.textOnPrimary,
|
|
6455
|
+
},
|
|
6456
|
+
content: {
|
|
6457
|
+
padding: isMobile ? "20px" : "24px",
|
|
6458
|
+
},
|
|
6459
|
+
label: {
|
|
6460
|
+
display: "block",
|
|
6461
|
+
fontSize: "14px",
|
|
6462
|
+
fontWeight: 500,
|
|
6463
|
+
color: theme.colors.text,
|
|
6464
|
+
marginBottom: "8px",
|
|
6465
|
+
},
|
|
6466
|
+
phoneInputContainer: {
|
|
6467
|
+
display: "flex",
|
|
6468
|
+
gap: "10px",
|
|
6469
|
+
flexDirection: isMobile ? "column" : "row",
|
|
6470
|
+
},
|
|
6471
|
+
phoneInput: {
|
|
6472
|
+
flex: 1,
|
|
6473
|
+
width: "100%",
|
|
6474
|
+
padding: "10px 14px",
|
|
6475
|
+
borderRadius: "8px",
|
|
6476
|
+
border: `1px solid ${theme.colors.border}`,
|
|
6477
|
+
fontSize: "14px",
|
|
6478
|
+
outline: "none",
|
|
6479
|
+
color: theme.colors.text,
|
|
6480
|
+
boxSizing: "border-box",
|
|
6481
|
+
transition: "border-color 0.2s ease, box-shadow 0.2s ease",
|
|
6482
|
+
minHeight: isMobile ? "44px" : "40px",
|
|
6483
|
+
backgroundColor: theme.colors.surface,
|
|
6484
|
+
},
|
|
6485
|
+
phoneInputFocus: {
|
|
6486
|
+
borderColor: theme.colors.primary,
|
|
6487
|
+
boxShadow: `0 0 0 3px ${theme.colors.primary}15`,
|
|
6488
|
+
},
|
|
6489
|
+
phoneDisplay: {
|
|
6490
|
+
padding: "10px 14px",
|
|
6491
|
+
background: theme.colors.backgroundSecondary,
|
|
6492
|
+
borderRadius: "8px",
|
|
6493
|
+
fontSize: "14px",
|
|
6494
|
+
color: theme.colors.text,
|
|
6495
|
+
fontWeight: 500,
|
|
6496
|
+
border: `1px solid ${theme.colors.border}`,
|
|
6497
|
+
},
|
|
6498
|
+
otpInput: {
|
|
6499
|
+
width: "100%",
|
|
6500
|
+
padding: "10px 14px",
|
|
6501
|
+
border: `1px solid ${theme.colors.border}`,
|
|
6502
|
+
borderRadius: "8px",
|
|
6503
|
+
fontSize: "14px",
|
|
6504
|
+
outline: "none",
|
|
6505
|
+
color: theme.colors.text,
|
|
6506
|
+
boxSizing: "border-box",
|
|
6507
|
+
transition: "border-color 0.2s ease, box-shadow 0.2s ease",
|
|
6508
|
+
backgroundColor: theme.colors.surface,
|
|
6509
|
+
},
|
|
6510
|
+
otpInputFocus: {
|
|
6511
|
+
borderColor: theme.colors.primary,
|
|
6512
|
+
boxShadow: `0 0 0 3px ${theme.colors.primary}15`,
|
|
6513
|
+
},
|
|
6514
|
+
otpHint: {
|
|
6515
|
+
marginTop: "8px",
|
|
6516
|
+
fontSize: "12px",
|
|
6517
|
+
color: theme.colors.textSecondary,
|
|
6518
|
+
},
|
|
6519
|
+
successMessage: {
|
|
6520
|
+
marginTop: "20px",
|
|
6521
|
+
padding: "16px",
|
|
6522
|
+
borderRadius: "8px",
|
|
6523
|
+
backgroundColor: theme.colors.successBackground,
|
|
6524
|
+
border: `1px solid ${theme.colors.success}`,
|
|
6525
|
+
display: "flex",
|
|
6526
|
+
alignItems: "center",
|
|
6527
|
+
gap: "12px",
|
|
6528
|
+
},
|
|
6529
|
+
successIcon: {
|
|
6530
|
+
fontSize: "24px",
|
|
6531
|
+
color: theme.colors.success,
|
|
6532
|
+
},
|
|
6533
|
+
successTitle: {
|
|
6534
|
+
fontSize: "14px",
|
|
6535
|
+
fontWeight: 600,
|
|
6536
|
+
color: theme.colors.success,
|
|
6537
|
+
},
|
|
6538
|
+
successSubtitle: {
|
|
6539
|
+
fontSize: "12px",
|
|
6540
|
+
color: theme.colors.textSecondary,
|
|
6541
|
+
marginTop: "2px",
|
|
6542
|
+
},
|
|
6543
|
+
footer: {
|
|
6544
|
+
padding: isMobile ? "16px 20px" : "18px 24px",
|
|
6545
|
+
borderTop: `1px solid ${theme.colors.border}`,
|
|
6546
|
+
backgroundColor: theme.colors.surface,
|
|
6547
|
+
display: "flex",
|
|
6548
|
+
gap: "12px",
|
|
6549
|
+
justifyContent: isMobile ? "stretch" : "flex-end",
|
|
6550
|
+
flexDirection: isMobile ? "column" : "row",
|
|
6551
|
+
},
|
|
6552
|
+
};
|
|
6553
|
+
}
|
|
6554
|
+
function getPatientDetailsStyles(theme, prefix = "medos", breakpoint) {
|
|
6555
|
+
const borderRadius = "12px";
|
|
6556
|
+
const cardBorder = `1px solid ${theme.colors.border}`;
|
|
6557
|
+
return {
|
|
6558
|
+
sectionCard: {
|
|
6559
|
+
border: cardBorder,
|
|
6560
|
+
borderRadius,
|
|
6561
|
+
marginBottom: "24px",
|
|
6562
|
+
overflow: "visible",
|
|
6563
|
+
boxShadow: "0 1px 3px rgba(0, 0, 0, 0.04)",
|
|
6564
|
+
},
|
|
6565
|
+
sectionHeader: {
|
|
6566
|
+
backgroundColor: theme.colors.primary,
|
|
6567
|
+
padding: "18px 24px",
|
|
6568
|
+
display: "flex",
|
|
6569
|
+
alignItems: "center",
|
|
6570
|
+
gap: "12px",
|
|
6571
|
+
borderBottom: cardBorder,
|
|
6572
|
+
color: theme.colors.textOnPrimary,
|
|
6573
|
+
},
|
|
6574
|
+
sectionTitle: {
|
|
6575
|
+
fontSize: "18px",
|
|
6576
|
+
fontWeight: 600,
|
|
6577
|
+
margin: 0,
|
|
6578
|
+
color: theme.colors.textOnPrimary,
|
|
6579
|
+
},
|
|
6580
|
+
sectionBody: {
|
|
6581
|
+
padding: "24px",
|
|
6582
|
+
},
|
|
6583
|
+
gridRow: {
|
|
6584
|
+
display: "grid",
|
|
6585
|
+
gridTemplateColumns: "1fr 1fr",
|
|
6586
|
+
gap: "20px",
|
|
6587
|
+
marginTop: "20px",
|
|
6588
|
+
},
|
|
6589
|
+
label: {
|
|
6590
|
+
display: "block",
|
|
6591
|
+
fontSize: "14px",
|
|
6592
|
+
marginBottom: "8px",
|
|
6593
|
+
color: theme.colors.text,
|
|
6594
|
+
fontWeight: 500,
|
|
6595
|
+
},
|
|
6596
|
+
input: {
|
|
6597
|
+
width: "100%",
|
|
6598
|
+
padding: "10px 14px",
|
|
6599
|
+
borderRadius: "8px",
|
|
6600
|
+
border: cardBorder,
|
|
6601
|
+
outline: "none",
|
|
6602
|
+
fontSize: "14px",
|
|
6603
|
+
boxSizing: "border-box",
|
|
6604
|
+
color: theme.colors.text,
|
|
6605
|
+
transition: "border-color 0.2s ease, box-shadow 0.2s ease",
|
|
6606
|
+
minHeight: "40px",
|
|
6607
|
+
backgroundColor: theme.colors.surface,
|
|
6608
|
+
},
|
|
6609
|
+
inputFocus: {
|
|
6610
|
+
borderColor: theme.colors.primary,
|
|
6611
|
+
boxShadow: `0 0 0 3px ${theme.colors.primary}15`,
|
|
6612
|
+
},
|
|
6613
|
+
phoneDisplay: {
|
|
6614
|
+
display: "flex",
|
|
6615
|
+
gap: "10px",
|
|
6616
|
+
flexDirection: "row",
|
|
6617
|
+
},
|
|
6618
|
+
phoneCode: {
|
|
6619
|
+
width: "100px",
|
|
6620
|
+
padding: "10px 14px",
|
|
6621
|
+
borderRadius: "8px",
|
|
6622
|
+
border: cardBorder,
|
|
6623
|
+
backgroundColor: theme.colors.backgroundSecondary,
|
|
6624
|
+
fontSize: "14px",
|
|
6625
|
+
boxSizing: "border-box",
|
|
6626
|
+
color: theme.colors.textSecondary,
|
|
6627
|
+
},
|
|
6628
|
+
phoneNumber: {
|
|
6629
|
+
flex: 1,
|
|
6630
|
+
padding: "10px 14px",
|
|
6631
|
+
borderRadius: "8px",
|
|
6632
|
+
border: cardBorder,
|
|
6633
|
+
backgroundColor: theme.colors.backgroundSecondary,
|
|
6634
|
+
fontSize: "14px",
|
|
6635
|
+
boxSizing: "border-box",
|
|
6636
|
+
color: theme.colors.textSecondary,
|
|
6637
|
+
},
|
|
6638
|
+
};
|
|
6639
|
+
}
|
|
6640
|
+
function getSuccessStyles(theme, prefix = "medos") {
|
|
6641
|
+
return {
|
|
6642
|
+
container: {
|
|
6643
|
+
display: "flex",
|
|
6644
|
+
flexDirection: "column",
|
|
6645
|
+
alignItems: "center",
|
|
6646
|
+
padding: "32px 24px",
|
|
6647
|
+
textAlign: "center",
|
|
6648
|
+
},
|
|
6649
|
+
header: {
|
|
6650
|
+
marginBottom: "24px",
|
|
6651
|
+
},
|
|
6652
|
+
iconContainer: {
|
|
6653
|
+
display: "flex",
|
|
6654
|
+
alignItems: "center",
|
|
6655
|
+
justifyContent: "center",
|
|
6656
|
+
width: "72px",
|
|
6657
|
+
height: "72px",
|
|
6658
|
+
borderRadius: "50%",
|
|
6659
|
+
backgroundColor: theme.colors.successBackground,
|
|
6660
|
+
marginBottom: "20px",
|
|
6661
|
+
},
|
|
6662
|
+
detailsContainer: {
|
|
6663
|
+
display: "flex",
|
|
6664
|
+
flexDirection: "column",
|
|
6665
|
+
alignItems: "center",
|
|
6666
|
+
gap: "12px",
|
|
6667
|
+
textAlign: "center",
|
|
6668
|
+
},
|
|
6669
|
+
detailsTitle: {
|
|
6670
|
+
fontWeight: 600,
|
|
6671
|
+
fontSize: "18px",
|
|
6672
|
+
color: theme.colors.success,
|
|
6673
|
+
margin: 0,
|
|
6674
|
+
},
|
|
6675
|
+
detailsList: {
|
|
6676
|
+
display: "flex",
|
|
6677
|
+
flexDirection: "column",
|
|
6678
|
+
gap: "4px",
|
|
6679
|
+
fontSize: "14px",
|
|
6680
|
+
width: "100%",
|
|
6681
|
+
maxWidth: "400px",
|
|
6682
|
+
textAlign: "center",
|
|
6683
|
+
color: theme.colors.textSecondary,
|
|
6684
|
+
},
|
|
6685
|
+
confirmationNote: {
|
|
6686
|
+
marginTop: "12px",
|
|
6687
|
+
fontSize: "14px",
|
|
6688
|
+
color: theme.colors.textSecondary,
|
|
6689
|
+
lineHeight: "1.5",
|
|
6690
|
+
},
|
|
6691
|
+
actionContainer: {
|
|
6692
|
+
marginTop: "32px",
|
|
6693
|
+
display: "flex",
|
|
6694
|
+
justifyContent: "center",
|
|
6695
|
+
},
|
|
6696
|
+
};
|
|
6697
|
+
}
|
|
6698
|
+
getContainerStyles(defaultTheme);
|
|
6699
|
+
getButtonStyles(defaultTheme);
|
|
6700
|
+
getPhoneVerifyStyles(defaultTheme);
|
|
6701
|
+
getPatientDetailsStyles(defaultTheme);
|
|
6702
|
+
getSuccessStyles(defaultTheme);
|
|
6703
|
+
|
|
6704
|
+
const PHONE_MIN_LENGTH = 7;
|
|
6705
|
+
const PHONE_MAX_LENGTH = 15;
|
|
6706
|
+
const COUNTRY_CODE_REGEX = /^\+[1-9]\d{0,3}$/;
|
|
6707
|
+
const DATE_FORMAT_REGEX = /^\d{4}-\d{2}-\d{2}$/;
|
|
6708
|
+
const MIN_BIRTH_YEAR = 1900;
|
|
6709
|
+
const VALID_BLOOD_GROUPS = [
|
|
6710
|
+
"A+",
|
|
6711
|
+
"A-",
|
|
6712
|
+
"B+",
|
|
6713
|
+
"B-",
|
|
6714
|
+
"AB+",
|
|
6715
|
+
"AB-",
|
|
6716
|
+
"O+",
|
|
6717
|
+
"O-",
|
|
6718
|
+
"UNKNOWN",
|
|
6719
|
+
];
|
|
6720
|
+
|
|
6721
|
+
const validatePhoneNumber$1 = (phone) => {
|
|
6722
|
+
const cleaned = phone.replace(/\D/g, "");
|
|
6723
|
+
return (cleaned.length >= PHONE_MIN_LENGTH && cleaned.length <= PHONE_MAX_LENGTH);
|
|
6724
|
+
};
|
|
6725
|
+
const validateCountryCode$1 = (code) => {
|
|
6726
|
+
return COUNTRY_CODE_REGEX.test(code);
|
|
6727
|
+
};
|
|
6728
|
+
const validateBloodGroup = (bloodGroup) => {
|
|
6729
|
+
return VALID_BLOOD_GROUPS.includes(bloodGroup);
|
|
6730
|
+
};
|
|
6731
|
+
const validateDateOfBirth = (dob) => {
|
|
6732
|
+
if (!dob)
|
|
6733
|
+
return false;
|
|
6734
|
+
if (!DATE_FORMAT_REGEX.test(dob))
|
|
6735
|
+
return false;
|
|
6736
|
+
const [yearStr, monthStr, dayStr] = dob.split("-");
|
|
6737
|
+
const year = parseInt(yearStr, 10);
|
|
6738
|
+
const month = parseInt(monthStr, 10);
|
|
6739
|
+
const day = parseInt(dayStr, 10);
|
|
6740
|
+
if (month < 1 || month > 12 || day < 1 || day > 31)
|
|
6741
|
+
return false;
|
|
6742
|
+
const date = new Date(year, month - 1, day);
|
|
6743
|
+
if (date.getFullYear() !== year ||
|
|
6744
|
+
date.getMonth() !== month - 1 ||
|
|
6745
|
+
date.getDate() !== day) {
|
|
6746
|
+
return false;
|
|
6747
|
+
}
|
|
6748
|
+
const today = new Date();
|
|
6749
|
+
today.setHours(0, 0, 0, 0);
|
|
6750
|
+
date.setHours(0, 0, 0, 0);
|
|
6751
|
+
if (date > today)
|
|
6752
|
+
return false;
|
|
6753
|
+
if (year < MIN_BIRTH_YEAR)
|
|
6754
|
+
return false;
|
|
6755
|
+
return true;
|
|
6756
|
+
};
|
|
6757
|
+
|
|
6758
|
+
const Check = ({ className, size = 16 }) => (jsxRuntimeExports.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className: className, children: jsxRuntimeExports.jsx("polyline", { points: "20 6 9 17 4 12" }) }));
|
|
6759
|
+
|
|
6760
|
+
const ChevronDownIcon = ({ className }) => (jsxRuntimeExports.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className: className, children: jsxRuntimeExports.jsx("polyline", { points: "6 9 12 15 18 9" }) }));
|
|
6761
|
+
|
|
6762
|
+
const cn = (...classes) => {
|
|
6763
|
+
return classes.filter(Boolean).join(" ");
|
|
6764
|
+
};
|
|
6765
|
+
if (typeof document !== "undefined") {
|
|
6766
|
+
const styleId = "custom-select-styles";
|
|
6767
|
+
if (!document.getElementById(styleId)) {
|
|
6768
|
+
const styleElement = document.createElement("style");
|
|
6769
|
+
styleElement.id = styleId;
|
|
6770
|
+
styleElement.innerHTML = `
|
|
6771
|
+
/* Container */
|
|
6772
|
+
.select-container {
|
|
6773
|
+
position: relative;
|
|
6774
|
+
display: inline-block;
|
|
6775
|
+
width: 100%;
|
|
6776
|
+
}
|
|
6777
|
+
|
|
6778
|
+
/* Trigger Button */
|
|
6779
|
+
.select-trigger {
|
|
6780
|
+
display: flex;
|
|
6781
|
+
height: 40px;
|
|
6782
|
+
width: 100%;
|
|
6783
|
+
align-items: center;
|
|
6784
|
+
justify-content: space-between;
|
|
6785
|
+
white-space: nowrap;
|
|
6786
|
+
border-radius: 6px;
|
|
6787
|
+
border: 1px solid #e2e8f0;
|
|
6788
|
+
background-color: #fff;
|
|
6789
|
+
padding: 8px 12px;
|
|
6790
|
+
font-size: 14px;
|
|
6791
|
+
line-height: 1.5;
|
|
6792
|
+
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
|
|
6793
|
+
transition: all 0.15s ease-in-out;
|
|
6794
|
+
cursor: pointer;
|
|
6795
|
+
outline: none;
|
|
6796
|
+
font-family: inherit;
|
|
6797
|
+
text-align: left;
|
|
6798
|
+
}
|
|
6799
|
+
|
|
6800
|
+
.select-trigger:hover:not(:disabled) {
|
|
6801
|
+
background-color: #f8fafc;
|
|
6802
|
+
border-color: #cbd5e1;
|
|
6803
|
+
}
|
|
6804
|
+
|
|
6805
|
+
.select-trigger:focus:not(:disabled) {
|
|
6806
|
+
border-color: #94a3b8;
|
|
6807
|
+
box-shadow: 0 0 0 2px rgba(148, 163, 184, 0.2);
|
|
6808
|
+
}
|
|
6809
|
+
|
|
6810
|
+
.select-trigger:disabled {
|
|
6811
|
+
cursor: not-allowed;
|
|
6812
|
+
opacity: 0.5;
|
|
6813
|
+
background-color: #f9fafb;
|
|
6814
|
+
}
|
|
6815
|
+
|
|
6816
|
+
.select-trigger-error {
|
|
6817
|
+
border-color: #ef4444;
|
|
6818
|
+
}
|
|
6819
|
+
|
|
6820
|
+
.select-trigger-error:focus {
|
|
6821
|
+
border-color: #ef4444;
|
|
6822
|
+
box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
|
|
6823
|
+
}
|
|
6824
|
+
|
|
6825
|
+
/* Select Value */
|
|
6826
|
+
.select-value {
|
|
6827
|
+
flex: 1;
|
|
6828
|
+
overflow: hidden;
|
|
6829
|
+
text-overflow: ellipsis;
|
|
6830
|
+
white-space: nowrap;
|
|
6831
|
+
color: #1e293b;
|
|
6832
|
+
}
|
|
6833
|
+
|
|
6834
|
+
.select-placeholder {
|
|
6835
|
+
color: #94a3b8;
|
|
6836
|
+
}
|
|
6837
|
+
|
|
6838
|
+
/* Select Icon */
|
|
6839
|
+
.select-icon {
|
|
6840
|
+
height: 16px;
|
|
6841
|
+
width: 16px;
|
|
6842
|
+
opacity: 0.5;
|
|
6843
|
+
flex-shrink: 0;
|
|
6844
|
+
margin-left: 8px;
|
|
6845
|
+
transition: transform 0.2s;
|
|
6846
|
+
}
|
|
6847
|
+
|
|
6848
|
+
.select-trigger[aria-expanded="true"] .select-icon {
|
|
6849
|
+
transform: rotate(180deg);
|
|
6850
|
+
}
|
|
6851
|
+
|
|
6852
|
+
.select-icon-error {
|
|
6853
|
+
color: #ef4444;
|
|
6854
|
+
}
|
|
6855
|
+
|
|
6856
|
+
/* Content Dropdown */
|
|
6857
|
+
.select-content {
|
|
6858
|
+
position: absolute;
|
|
6859
|
+
top: 100%;
|
|
6860
|
+
left: 0;
|
|
6861
|
+
right: 0;
|
|
6862
|
+
z-index: 1050;
|
|
6863
|
+
margin-top: 4px;
|
|
6864
|
+
overflow: hidden;
|
|
6865
|
+
border-radius: 6px;
|
|
6866
|
+
border: 1px solid #e2e8f0;
|
|
6867
|
+
background-color: #ffffff;
|
|
6868
|
+
color: #1e293b;
|
|
6869
|
+
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
|
|
6870
|
+
animation: select-show 0.15s ease-out;
|
|
6871
|
+
}
|
|
6872
|
+
|
|
6873
|
+
@keyframes select-show {
|
|
6874
|
+
from {
|
|
6875
|
+
opacity: 0;
|
|
6876
|
+
transform: translateY(-4px);
|
|
6877
|
+
}
|
|
6878
|
+
to {
|
|
6879
|
+
opacity: 1;
|
|
6880
|
+
transform: translateY(0);
|
|
6881
|
+
}
|
|
6882
|
+
}
|
|
6883
|
+
|
|
6884
|
+
/* Viewport */
|
|
6885
|
+
.select-viewport {
|
|
6886
|
+
padding: 4px;
|
|
6887
|
+
max-height: 256px;
|
|
6888
|
+
overflow-y: auto;
|
|
6889
|
+
}
|
|
6890
|
+
|
|
6891
|
+
/* Select Item */
|
|
6892
|
+
.select-item {
|
|
6893
|
+
position: relative;
|
|
6894
|
+
display: flex;
|
|
6895
|
+
width: 100%;
|
|
6896
|
+
cursor: pointer;
|
|
6897
|
+
user-select: none;
|
|
6898
|
+
align-items: center;
|
|
6899
|
+
border-radius: 4px;
|
|
6900
|
+
padding: 8px 8px 8px 32px;
|
|
6901
|
+
font-size: 14px;
|
|
6902
|
+
outline: none;
|
|
6903
|
+
transition: background-color 0.1s ease;
|
|
6904
|
+
}
|
|
6905
|
+
|
|
6906
|
+
.select-item:hover:not(.select-item-disabled) {
|
|
6907
|
+
background-color: #f1f5f9;
|
|
6908
|
+
}
|
|
6909
|
+
|
|
6910
|
+
.select-item:focus {
|
|
6911
|
+
background-color: #f1f5f9;
|
|
6912
|
+
}
|
|
6913
|
+
|
|
6914
|
+
.select-item-selected {
|
|
6915
|
+
background-color: #f3f4f6;
|
|
6916
|
+
}
|
|
6917
|
+
|
|
6918
|
+
.select-item-disabled {
|
|
6919
|
+
pointer-events: none;
|
|
6920
|
+
opacity: 0.5;
|
|
6921
|
+
cursor: not-allowed;
|
|
6922
|
+
}
|
|
6923
|
+
|
|
6924
|
+
/* Item Indicator */
|
|
6925
|
+
.select-item-indicator {
|
|
6926
|
+
position: absolute;
|
|
6927
|
+
left: 8px;
|
|
6928
|
+
display: flex;
|
|
6929
|
+
height: 14px;
|
|
6930
|
+
width: 14px;
|
|
6931
|
+
align-items: center;
|
|
6932
|
+
justify-content: center;
|
|
6933
|
+
}
|
|
6934
|
+
|
|
6935
|
+
/* Item Text */
|
|
6936
|
+
.select-item-text {
|
|
6937
|
+
flex: 1;
|
|
6938
|
+
}
|
|
6939
|
+
|
|
6940
|
+
/* Select Group */
|
|
6941
|
+
.select-group {
|
|
6942
|
+
padding: 2px 0;
|
|
6943
|
+
}
|
|
6944
|
+
|
|
6945
|
+
/* Select Label */
|
|
6946
|
+
.select-label {
|
|
6947
|
+
padding: 8px 8px 6px;
|
|
6948
|
+
font-size: 12px;
|
|
6949
|
+
font-weight: 600;
|
|
6950
|
+
color: #64748b;
|
|
6951
|
+
}
|
|
6952
|
+
|
|
6953
|
+
/* Select Separator */
|
|
6954
|
+
.select-separator {
|
|
6955
|
+
margin: 4px 0;
|
|
6956
|
+
height: 1px;
|
|
6957
|
+
background-color: #e2e8f0;
|
|
6958
|
+
}
|
|
6959
|
+
|
|
6960
|
+
/* Scrollbar styling */
|
|
6961
|
+
.select-viewport::-webkit-scrollbar {
|
|
6962
|
+
width: 8px;
|
|
6963
|
+
}
|
|
6964
|
+
|
|
6965
|
+
.select-viewport::-webkit-scrollbar-track {
|
|
6966
|
+
background: #f1f5f9;
|
|
6967
|
+
border-radius: 4px;
|
|
6968
|
+
}
|
|
6969
|
+
|
|
6970
|
+
.select-viewport::-webkit-scrollbar-thumb {
|
|
6971
|
+
background: #cbd5e1;
|
|
6972
|
+
border-radius: 4px;
|
|
6973
|
+
}
|
|
6974
|
+
|
|
6975
|
+
.select-viewport::-webkit-scrollbar-thumb:hover {
|
|
6976
|
+
background: #94a3b8;
|
|
6977
|
+
}
|
|
6978
|
+
`;
|
|
6979
|
+
document.head.appendChild(styleElement);
|
|
6980
|
+
}
|
|
6981
|
+
}
|
|
6982
|
+
const SelectContext = reactExports.createContext(undefined);
|
|
6983
|
+
const useSelectContext = () => {
|
|
6984
|
+
const context = reactExports.useContext(SelectContext);
|
|
6985
|
+
if (!context) {
|
|
6986
|
+
throw new Error("Select components must be used within a Select");
|
|
6987
|
+
}
|
|
6988
|
+
return context;
|
|
6989
|
+
};
|
|
6990
|
+
const Select = ({ children, value, onValueChange, defaultValue, disabled = false, }) => {
|
|
6991
|
+
const [isOpen, setIsOpen] = reactExports.useState(false);
|
|
6992
|
+
const [selectedValue, setSelectedValue] = reactExports.useState(value || defaultValue || "");
|
|
6993
|
+
const [selectedLabel, setSelectedLabel] = reactExports.useState("");
|
|
6994
|
+
const triggerRef = reactExports.useRef(null);
|
|
6995
|
+
const contentRef = reactExports.useRef(null);
|
|
6996
|
+
reactExports.useEffect(() => {
|
|
6997
|
+
if (value !== undefined) {
|
|
6998
|
+
setSelectedValue(value);
|
|
6999
|
+
}
|
|
7000
|
+
}, [value]);
|
|
7001
|
+
reactExports.useEffect(() => {
|
|
7002
|
+
const handleClickOutside = (event) => {
|
|
7003
|
+
if (triggerRef.current &&
|
|
7004
|
+
contentRef.current &&
|
|
7005
|
+
!triggerRef.current.contains(event.target) &&
|
|
7006
|
+
!contentRef.current.contains(event.target)) {
|
|
7007
|
+
setIsOpen(false);
|
|
7008
|
+
}
|
|
7009
|
+
};
|
|
7010
|
+
if (isOpen) {
|
|
7011
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
7012
|
+
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
7013
|
+
}
|
|
7014
|
+
}, [isOpen]);
|
|
7015
|
+
const handleSelect = (value, label) => {
|
|
7016
|
+
setSelectedValue(value);
|
|
7017
|
+
setSelectedLabel(label);
|
|
7018
|
+
if (onValueChange) {
|
|
7019
|
+
onValueChange(value);
|
|
7020
|
+
}
|
|
7021
|
+
setIsOpen(false);
|
|
7022
|
+
};
|
|
7023
|
+
return (jsxRuntimeExports.jsx(SelectContext.Provider, { value: {
|
|
7024
|
+
isOpen,
|
|
7025
|
+
setIsOpen,
|
|
7026
|
+
selectedValue,
|
|
7027
|
+
selectedLabel,
|
|
7028
|
+
handleSelect,
|
|
7029
|
+
triggerRef,
|
|
7030
|
+
contentRef,
|
|
7031
|
+
disabled,
|
|
7032
|
+
}, children: jsxRuntimeExports.jsx("div", { className: "select-container", children: children }) }));
|
|
7033
|
+
};
|
|
7034
|
+
const SelectTrigger = reactExports.forwardRef(({ children, className, error = false, ...props }, ref) => {
|
|
7035
|
+
const { isOpen, setIsOpen, triggerRef, disabled } = useSelectContext();
|
|
7036
|
+
return (jsxRuntimeExports.jsxs("button", { ref: triggerRef, type: "button", className: cn("select-trigger", error && "select-trigger-error", className), onClick: () => !disabled && setIsOpen(!isOpen), disabled: disabled, "aria-expanded": isOpen, "aria-haspopup": "listbox", ...props, children: [children, jsxRuntimeExports.jsx(ChevronDownIcon, { className: cn("select-icon", error && "select-icon-error") })] }));
|
|
7037
|
+
});
|
|
7038
|
+
SelectTrigger.displayName = "SelectTrigger";
|
|
7039
|
+
const SelectValue = ({ placeholder = "Select...", }) => {
|
|
7040
|
+
const { selectedLabel, selectedValue } = useSelectContext();
|
|
7041
|
+
return (jsxRuntimeExports.jsx("span", { className: cn("select-value", !selectedValue && "select-placeholder"), children: selectedLabel || placeholder }));
|
|
7042
|
+
};
|
|
7043
|
+
const SelectContent = reactExports.forwardRef(({ children, className, ...props }, ref) => {
|
|
7044
|
+
const { isOpen, contentRef } = useSelectContext();
|
|
7045
|
+
if (!isOpen)
|
|
7046
|
+
return null;
|
|
7047
|
+
return (jsxRuntimeExports.jsx("div", { ref: contentRef, className: cn("select-content", className), role: "listbox", ...props, children: jsxRuntimeExports.jsx("div", { className: "select-viewport", children: children }) }));
|
|
7048
|
+
});
|
|
7049
|
+
SelectContent.displayName = "SelectContent";
|
|
7050
|
+
const SelectItem = reactExports.forwardRef(({ children, value, className, disabled = false, ...props }, ref) => {
|
|
7051
|
+
const { selectedValue, handleSelect } = useSelectContext();
|
|
7052
|
+
const isSelected = selectedValue === value;
|
|
7053
|
+
return (jsxRuntimeExports.jsxs("div", { ref: ref, className: cn("select-item", isSelected && "select-item-selected", disabled && "select-item-disabled", className), onClick: () => !disabled && handleSelect(value, children), role: "option", "aria-selected": isSelected, "data-disabled": disabled, ...props, children: [isSelected && (jsxRuntimeExports.jsx("span", { className: "select-item-indicator", children: jsxRuntimeExports.jsx(Check, {}) })), jsxRuntimeExports.jsx("span", { className: "select-item-text", children: children })] }));
|
|
7054
|
+
});
|
|
7055
|
+
SelectItem.displayName = "SelectItem";
|
|
7056
|
+
|
|
7057
|
+
function useMediaQuery(query) {
|
|
7058
|
+
const [matches, setMatches] = reactExports.useState(false);
|
|
7059
|
+
reactExports.useEffect(() => {
|
|
7060
|
+
const mediaQuery = window.matchMedia(query);
|
|
7061
|
+
setMatches(mediaQuery.matches);
|
|
7062
|
+
const handler = (event) => {
|
|
7063
|
+
setMatches(event.matches);
|
|
7064
|
+
};
|
|
7065
|
+
if (mediaQuery.addEventListener) {
|
|
7066
|
+
mediaQuery.addEventListener("change", handler);
|
|
7067
|
+
return () => mediaQuery.removeEventListener("change", handler);
|
|
7068
|
+
}
|
|
7069
|
+
else {
|
|
7070
|
+
mediaQuery.addListener(handler);
|
|
7071
|
+
return () => mediaQuery.removeListener(handler);
|
|
7072
|
+
}
|
|
7073
|
+
}, [query]);
|
|
7074
|
+
return matches;
|
|
7075
|
+
}
|
|
7076
|
+
function useBreakpoint(theme) {
|
|
7077
|
+
const isWide = useMediaQuery(`(min-width: ${theme.breakpoints.wide})`);
|
|
7078
|
+
const isDesktop = useMediaQuery(`(min-width: ${theme.breakpoints.desktop})`);
|
|
7079
|
+
const isTablet = useMediaQuery(`(min-width: ${theme.breakpoints.tablet})`);
|
|
7080
|
+
if (isWide)
|
|
7081
|
+
return "wide";
|
|
7082
|
+
if (isDesktop)
|
|
7083
|
+
return "desktop";
|
|
7084
|
+
if (isTablet)
|
|
7085
|
+
return "tablet";
|
|
7086
|
+
return "mobile";
|
|
7087
|
+
}
|
|
7088
|
+
|
|
3844
7089
|
const API_BASE_URL = "https://api.medos.one/v1";
|
|
3845
7090
|
|
|
7091
|
+
const formatDateToISO = (date) => {
|
|
7092
|
+
const year = String(date.getFullYear()).padStart(4, "0");
|
|
7093
|
+
const month = String(date.getMonth() + 1).padStart(2, "0");
|
|
7094
|
+
const day = String(date.getDate()).padStart(2, "0");
|
|
7095
|
+
return `${year}-${month}-${day}`;
|
|
7096
|
+
};
|
|
7097
|
+
|
|
7098
|
+
const INITIAL_STATE = {
|
|
7099
|
+
step: 0,
|
|
7100
|
+
loading: false,
|
|
7101
|
+
error: null,
|
|
7102
|
+
workspaceId: null,
|
|
7103
|
+
addresses: [],
|
|
7104
|
+
addressDoctorsMap: {},
|
|
7105
|
+
selectedAddress: null,
|
|
7106
|
+
selectedDoctor: null,
|
|
7107
|
+
selectedDate: new Date(),
|
|
7108
|
+
slots: [],
|
|
7109
|
+
selectedSlot: null,
|
|
7110
|
+
consultationMode: "OFFLINE",
|
|
7111
|
+
consultationCharge: "",
|
|
7112
|
+
patientName: "",
|
|
7113
|
+
patientAge: "",
|
|
7114
|
+
patientEmail: "",
|
|
7115
|
+
patientGender: "",
|
|
7116
|
+
bloodGroup: "",
|
|
7117
|
+
patientDob: "",
|
|
7118
|
+
patientAddress: "",
|
|
7119
|
+
patientCity: "",
|
|
7120
|
+
patientState: "",
|
|
7121
|
+
patientCountry: "",
|
|
7122
|
+
patientZipcode: "",
|
|
7123
|
+
patientLandmark: "",
|
|
7124
|
+
countryCode: "+91",
|
|
7125
|
+
patientPhone: "",
|
|
7126
|
+
otpCode: "",
|
|
7127
|
+
otpSent: false,
|
|
7128
|
+
otpVerified: false,
|
|
7129
|
+
otpSending: false,
|
|
7130
|
+
otpVerifying: false,
|
|
7131
|
+
verifiedPatients: [],
|
|
7132
|
+
selectedPatient: null,
|
|
7133
|
+
useExistingPatient: false,
|
|
7134
|
+
userSessionPacks: [],
|
|
7135
|
+
availablePackages: [],
|
|
7136
|
+
selectedSessionPack: null,
|
|
7137
|
+
selectedNewPackage: null,
|
|
7138
|
+
bookingOptionType: null,
|
|
7139
|
+
showPackageExplorer: false,
|
|
7140
|
+
packagesLoading: false,
|
|
7141
|
+
bookingType: "ONE_TIME_APPOINTMENT",
|
|
7142
|
+
paymentMode: "CASH",
|
|
7143
|
+
packageConfigId: undefined,
|
|
7144
|
+
patientPackageId: undefined,
|
|
7145
|
+
packageAmount: undefined,
|
|
7146
|
+
};
|
|
7147
|
+
|
|
7148
|
+
const PatientService = {
|
|
7149
|
+
async sendPhoneVerificationOtp(payload) {
|
|
7150
|
+
const client = await MedosClient.ensureInitialized();
|
|
7151
|
+
const res = await client.post("/patients/send-phone-verification-otp", payload);
|
|
7152
|
+
return res.data;
|
|
7153
|
+
},
|
|
7154
|
+
async verifyPhoneVerificationOtp(payload) {
|
|
7155
|
+
const client = await MedosClient.ensureInitialized();
|
|
7156
|
+
const res = await client.post("/patients/verify-phone-verification-otp", payload);
|
|
7157
|
+
return res.data;
|
|
7158
|
+
},
|
|
7159
|
+
};
|
|
7160
|
+
|
|
7161
|
+
const parsePatientName = (fullName) => {
|
|
7162
|
+
const nameParts = fullName.trim().split(/\s+/);
|
|
7163
|
+
const firstName = nameParts[0] || "Patient";
|
|
7164
|
+
const lastName = nameParts.slice(1).join(" ") || "";
|
|
7165
|
+
return {
|
|
7166
|
+
firstName,
|
|
7167
|
+
lastName,
|
|
7168
|
+
};
|
|
7169
|
+
};
|
|
7170
|
+
|
|
7171
|
+
const EnquiryService = {
|
|
7172
|
+
async submitEnquiry(payload) {
|
|
7173
|
+
try {
|
|
7174
|
+
const client = await MedosClient.ensureInitialized();
|
|
7175
|
+
const enquiryPayload = {
|
|
7176
|
+
type: "ENQUIRY",
|
|
7177
|
+
subject: payload.inquirySubject,
|
|
7178
|
+
description: payload.inquiryMessage,
|
|
7179
|
+
senderName: payload.patientName,
|
|
7180
|
+
senderEmail: payload.patientEmail,
|
|
7181
|
+
senderPhone: `${payload.countryCode}${payload.patientPhone}`,
|
|
7182
|
+
};
|
|
7183
|
+
const formData = new FormData();
|
|
7184
|
+
const jsonBlob = new Blob([JSON.stringify(enquiryPayload)], {
|
|
7185
|
+
type: "application/json",
|
|
7186
|
+
});
|
|
7187
|
+
formData.append("payload", jsonBlob);
|
|
7188
|
+
const res = await client.post("/inbox/create", formData);
|
|
7189
|
+
return res.data;
|
|
7190
|
+
}
|
|
7191
|
+
catch (error) {
|
|
7192
|
+
if (error instanceof Error) {
|
|
7193
|
+
throw new Error(`Failed to submit enquiry: ${error.message}`);
|
|
7194
|
+
}
|
|
7195
|
+
throw new Error("Failed to submit enquiry: Unknown error");
|
|
7196
|
+
}
|
|
7197
|
+
},
|
|
7198
|
+
};
|
|
7199
|
+
|
|
7200
|
+
const validateName = (name) => {
|
|
7201
|
+
return name.trim().length > 0;
|
|
7202
|
+
};
|
|
7203
|
+
const validateEmail = (email) => {
|
|
7204
|
+
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
7205
|
+
return emailRegex.test(email);
|
|
7206
|
+
};
|
|
7207
|
+
const validatePhoneNumber = (phone) => {
|
|
7208
|
+
const cleaned = phone.replace(/\D/g, "");
|
|
7209
|
+
return cleaned.length >= 7 && cleaned.length <= 15;
|
|
7210
|
+
};
|
|
7211
|
+
const validateSubject = (subject) => {
|
|
7212
|
+
return subject.trim().length > 0;
|
|
7213
|
+
};
|
|
7214
|
+
const validateMessage = (message) => {
|
|
7215
|
+
const trimmed = message.trim();
|
|
7216
|
+
return trimmed.length > 0;
|
|
7217
|
+
};
|
|
7218
|
+
const validateCountryCode = (code) => {
|
|
7219
|
+
return /^\+[1-9]\d{0,3}$/.test(code);
|
|
7220
|
+
};
|
|
7221
|
+
|
|
7222
|
+
React.memo(({ patientName, patientEmail, countryCode, patientPhone, onNameChange, onEmailChange, onCountryCodeChange, onPhoneChange, onNext, }) => {
|
|
7223
|
+
const theme = useTheme();
|
|
7224
|
+
const breakpoint = useBreakpoint(theme);
|
|
7225
|
+
const PHONE_VERIFY_STYLES = React.useMemo(() => getPhoneVerifyStyles(theme, "medos", breakpoint), [theme, breakpoint]);
|
|
7226
|
+
const BUTTON_STYLES = React.useMemo(() => getButtonStyles(theme, "medos", breakpoint), [theme, breakpoint]);
|
|
7227
|
+
const CONTAINER_STYLES = React.useMemo(() => getContainerStyles(theme, "medos", breakpoint), [theme, breakpoint]);
|
|
7228
|
+
const styles = getStyles$1(theme);
|
|
7229
|
+
return (jsxRuntimeExports.jsxs("div", { children: [jsxRuntimeExports.jsxs("div", { style: { marginBottom: "16px" }, children: [jsxRuntimeExports.jsxs("label", { style: PHONE_VERIFY_STYLES.label, children: ["Name", jsxRuntimeExports.jsx("span", { style: styles.mandatory, children: "*" })] }), jsxRuntimeExports.jsx("input", { type: "text", value: patientName, onChange: (e) => onNameChange(e.target.value), placeholder: "Enter your full name", style: PHONE_VERIFY_STYLES.phoneInput })] }), jsxRuntimeExports.jsxs("div", { style: { marginBottom: "16px" }, children: [jsxRuntimeExports.jsx("label", { style: PHONE_VERIFY_STYLES.label, children: "Email" }), jsxRuntimeExports.jsx("input", { type: "email", value: patientEmail, onChange: (e) => onEmailChange(e.target.value), placeholder: "Enter your email", style: PHONE_VERIFY_STYLES.phoneInput })] }), jsxRuntimeExports.jsxs("div", { style: { marginBottom: "16px" }, children: [jsxRuntimeExports.jsxs("label", { style: PHONE_VERIFY_STYLES.label, children: ["Phone Number", jsxRuntimeExports.jsx("span", { style: styles.mandatory, children: "*" })] }), jsxRuntimeExports.jsxs("div", { style: PHONE_VERIFY_STYLES.phoneInputContainer, children: [jsxRuntimeExports.jsx("input", { type: "text", value: countryCode, onChange: (e) => onCountryCodeChange(e.target.value), placeholder: "+91", style: {
|
|
7230
|
+
...PHONE_VERIFY_STYLES.phoneInput,
|
|
7231
|
+
width: "80px",
|
|
7232
|
+
flex: "none",
|
|
7233
|
+
} }), jsxRuntimeExports.jsx("input", { type: "tel", value: patientPhone, onChange: (e) => onPhoneChange(e.target.value), placeholder: "Enter phone number", style: PHONE_VERIFY_STYLES.phoneInput })] })] }), jsxRuntimeExports.jsx("div", { style: CONTAINER_STYLES.actions, children: jsxRuntimeExports.jsx("button", { onClick: onNext, style: BUTTON_STYLES.primary, children: "Next" }) })] }));
|
|
7234
|
+
});
|
|
7235
|
+
const getStyles$1 = (theme) => ({
|
|
7236
|
+
mandatory: { color: theme.colors.error, marginLeft: 4 },
|
|
7237
|
+
});
|
|
7238
|
+
|
|
7239
|
+
React.memo(({ inquirySubject, inquiryMessage, onSubjectChange, onMessageChange, onBack, onNext, }) => {
|
|
7240
|
+
const theme = useTheme();
|
|
7241
|
+
const PHONE_VERIFY_STYLES = React.useMemo(() => getPhoneVerifyStyles(theme), [theme]);
|
|
7242
|
+
const BUTTON_STYLES = React.useMemo(() => getButtonStyles(theme), [theme]);
|
|
7243
|
+
const CONTAINER_STYLES = React.useMemo(() => getContainerStyles(theme), [theme]);
|
|
7244
|
+
const styles = getStyles(theme);
|
|
7245
|
+
return (jsxRuntimeExports.jsxs("div", { children: [jsxRuntimeExports.jsxs("div", { style: { marginBottom: "16px" }, children: [jsxRuntimeExports.jsxs("label", { style: PHONE_VERIFY_STYLES.label, children: ["Subject", jsxRuntimeExports.jsx("span", { style: styles.mandatory, children: "*" })] }), jsxRuntimeExports.jsx("input", { type: "text", value: inquirySubject, onChange: (e) => onSubjectChange(e.target.value), placeholder: "Enter inquiry subject", style: PHONE_VERIFY_STYLES.phoneInput })] }), jsxRuntimeExports.jsxs("div", { style: { marginBottom: "16px" }, children: [jsxRuntimeExports.jsxs("label", { style: PHONE_VERIFY_STYLES.label, children: ["Message", jsxRuntimeExports.jsx("span", { style: styles.mandatory, children: "*" })] }), jsxRuntimeExports.jsx("textarea", { value: inquiryMessage, onChange: (e) => onMessageChange(e.target.value), placeholder: "Enter your inquiry message", rows: 5, style: {
|
|
7246
|
+
...PHONE_VERIFY_STYLES.otpInput,
|
|
7247
|
+
minHeight: "120px",
|
|
7248
|
+
resize: "vertical",
|
|
7249
|
+
fontFamily: "inherit",
|
|
7250
|
+
} })] }), jsxRuntimeExports.jsxs("div", { style: CONTAINER_STYLES.actions, children: [jsxRuntimeExports.jsx("button", { onClick: onBack, style: BUTTON_STYLES.secondary, children: "Back" }), jsxRuntimeExports.jsx("button", { onClick: onNext, style: BUTTON_STYLES.primary, children: "Next" })] })] }));
|
|
7251
|
+
});
|
|
7252
|
+
const getStyles = (theme) => ({
|
|
7253
|
+
mandatory: { color: theme.colors.error, marginLeft: 4 },
|
|
7254
|
+
});
|
|
7255
|
+
|
|
7256
|
+
React.memo(({ preferredContactMethod, onContactMethodChange, onBack, onSubmit, isLoading = false, }) => {
|
|
7257
|
+
const theme = useTheme();
|
|
7258
|
+
const PHONE_VERIFY_STYLES = React.useMemo(() => getPhoneVerifyStyles(theme), [theme]);
|
|
7259
|
+
const BUTTON_STYLES = React.useMemo(() => getButtonStyles(theme), [theme]);
|
|
7260
|
+
const CONTAINER_STYLES = React.useMemo(() => getContainerStyles(theme), [theme]);
|
|
7261
|
+
const contactOptions = [
|
|
7262
|
+
{ value: "PHONE", label: "Phone" },
|
|
7263
|
+
{ value: "EMAIL", label: "Email" },
|
|
7264
|
+
{ value: "BOTH", label: "Both" },
|
|
7265
|
+
];
|
|
7266
|
+
const handleContactMethodSelect = (value) => {
|
|
7267
|
+
onContactMethodChange(value);
|
|
7268
|
+
};
|
|
7269
|
+
return (jsxRuntimeExports.jsxs("div", { children: [jsxRuntimeExports.jsxs("div", { style: { marginBottom: "16px" }, children: [jsxRuntimeExports.jsx("label", { style: PHONE_VERIFY_STYLES.label, children: "Preferred Contact Method" }), jsxRuntimeExports.jsx("div", { style: { marginTop: "8px" }, children: jsxRuntimeExports.jsxs(Select, { value: preferredContactMethod, onValueChange: handleContactMethodSelect, children: [jsxRuntimeExports.jsx(SelectTrigger, { style: { width: "100%" }, children: jsxRuntimeExports.jsx(SelectValue, { placeholder: "Select contact method" }) }), jsxRuntimeExports.jsx(SelectContent, { children: contactOptions.map((option) => (jsxRuntimeExports.jsx(SelectItem, { value: option.value, children: option.label }, option.value))) })] }) })] }), jsxRuntimeExports.jsxs("div", { style: CONTAINER_STYLES.actions, children: [jsxRuntimeExports.jsx("button", { onClick: onBack, style: BUTTON_STYLES.secondary, children: "Back" }), jsxRuntimeExports.jsx("button", { onClick: onSubmit, style: BUTTON_STYLES.primary, children: isLoading ? "Submitting..." : "Submit" })] })] }));
|
|
7270
|
+
});
|
|
7271
|
+
|
|
3846
7272
|
let sessionToken = null;
|
|
3847
7273
|
const AuthService = {
|
|
3848
7274
|
async init(apiKey) {
|
|
@@ -3867,19 +7293,6 @@ const AuthService = {
|
|
|
3867
7293
|
},
|
|
3868
7294
|
};
|
|
3869
7295
|
|
|
3870
|
-
const PatientService = {
|
|
3871
|
-
async sendPhoneVerificationOtp(payload) {
|
|
3872
|
-
const client = await MedosClient.ensureInitialized();
|
|
3873
|
-
const res = await client.post("/patients/send-phone-verification-otp", payload);
|
|
3874
|
-
return res.data;
|
|
3875
|
-
},
|
|
3876
|
-
async verifyPhoneVerificationOtp(payload) {
|
|
3877
|
-
const client = await MedosClient.ensureInitialized();
|
|
3878
|
-
const res = await client.post("/patients/verify-phone-verification-otp", payload);
|
|
3879
|
-
return res.data;
|
|
3880
|
-
},
|
|
3881
|
-
};
|
|
3882
|
-
|
|
3883
7296
|
class MedosClient {
|
|
3884
7297
|
static async init({ apiKey }) {
|
|
3885
7298
|
if (!apiKey) {
|
|
@@ -4064,78 +7477,6 @@ MedosClient.isRefreshing = false;
|
|
|
4064
7477
|
MedosClient.pendingRequests = [];
|
|
4065
7478
|
MedosClient.initPromise = null;
|
|
4066
7479
|
|
|
4067
|
-
const INITIAL_STATE = {
|
|
4068
|
-
step: 0,
|
|
4069
|
-
loading: false,
|
|
4070
|
-
error: null,
|
|
4071
|
-
workspaceId: null,
|
|
4072
|
-
addresses: [],
|
|
4073
|
-
addressDoctorsMap: {},
|
|
4074
|
-
selectedAddress: null,
|
|
4075
|
-
selectedDoctor: null,
|
|
4076
|
-
selectedDate: new Date(),
|
|
4077
|
-
slots: [],
|
|
4078
|
-
selectedSlot: null,
|
|
4079
|
-
consultationMode: "OFFLINE",
|
|
4080
|
-
consultationCharge: "",
|
|
4081
|
-
patientName: "",
|
|
4082
|
-
patientAge: "",
|
|
4083
|
-
patientEmail: "",
|
|
4084
|
-
patientGender: "",
|
|
4085
|
-
bloodGroup: "",
|
|
4086
|
-
patientDob: "",
|
|
4087
|
-
patientAddress: "",
|
|
4088
|
-
patientCity: "",
|
|
4089
|
-
patientState: "",
|
|
4090
|
-
patientCountry: "",
|
|
4091
|
-
patientZipcode: "",
|
|
4092
|
-
patientLandmark: "",
|
|
4093
|
-
countryCode: "+91",
|
|
4094
|
-
patientPhone: "",
|
|
4095
|
-
otpCode: "",
|
|
4096
|
-
otpSent: false,
|
|
4097
|
-
otpVerified: false,
|
|
4098
|
-
otpSending: false,
|
|
4099
|
-
otpVerifying: false,
|
|
4100
|
-
verifiedPatients: [],
|
|
4101
|
-
selectedPatient: null,
|
|
4102
|
-
useExistingPatient: false,
|
|
4103
|
-
userSessionPacks: [],
|
|
4104
|
-
availablePackages: [],
|
|
4105
|
-
selectedSessionPack: null,
|
|
4106
|
-
selectedNewPackage: null,
|
|
4107
|
-
bookingOptionType: null,
|
|
4108
|
-
showPackageExplorer: false,
|
|
4109
|
-
packagesLoading: false,
|
|
4110
|
-
bookingType: "ONE_TIME_APPOINTMENT",
|
|
4111
|
-
paymentMode: "CASH",
|
|
4112
|
-
packageConfigId: undefined,
|
|
4113
|
-
patientPackageId: undefined,
|
|
4114
|
-
packageAmount: undefined,
|
|
4115
|
-
};
|
|
4116
|
-
|
|
4117
|
-
const COUNTRY_CODES = [
|
|
4118
|
-
{ code: "+91", label: "🇮🇳 +91" },
|
|
4119
|
-
{ code: "+1", label: "🇺🇸 +1" },
|
|
4120
|
-
{ code: "+44", label: "🇬🇧 +44" },
|
|
4121
|
-
{ code: "+86", label: "🇨🇳 +86" },
|
|
4122
|
-
{ code: "+81", label: "🇯🇵 +81" },
|
|
4123
|
-
];
|
|
4124
|
-
const mapBloodGroupToApi = (uiBloodGroup) => {
|
|
4125
|
-
const bloodGroupMap = {
|
|
4126
|
-
"A+": "A_POSITIVE",
|
|
4127
|
-
"A-": "A_NEGATIVE",
|
|
4128
|
-
"B+": "B_POSITIVE",
|
|
4129
|
-
"B-": "B_NEGATIVE",
|
|
4130
|
-
"AB+": "AB_POSITIVE",
|
|
4131
|
-
"AB-": "AB_NEGATIVE",
|
|
4132
|
-
"O+": "O_POSITIVE",
|
|
4133
|
-
"O-": "O_NEGATIVE",
|
|
4134
|
-
UNKNOWN: "UNKNOWN",
|
|
4135
|
-
};
|
|
4136
|
-
return bloodGroupMap[uiBloodGroup] || "UNKNOWN";
|
|
4137
|
-
};
|
|
4138
|
-
|
|
4139
7480
|
const WorkspaceService = {
|
|
4140
7481
|
async fetchWorkspace() {
|
|
4141
7482
|
try {
|
|
@@ -4251,9 +7592,27 @@ const AppointmentService = {
|
|
|
4251
7592
|
return [];
|
|
4252
7593
|
},
|
|
4253
7594
|
transformToUnifiedPayload(payload) {
|
|
4254
|
-
const
|
|
4255
|
-
|
|
4256
|
-
|
|
7595
|
+
const bookingType = payload.bookingType || "ONE_TIME_APPOINTMENT";
|
|
7596
|
+
if (bookingType === "PACKAGE_PURCHASE" ||
|
|
7597
|
+
bookingType === "USE_ACTIVE_PACKAGE") {
|
|
7598
|
+
if (!payload.packageConfigId) {
|
|
7599
|
+
throw new Error("packageConfigId is required when bookingType is PACKAGE_PURCHASE");
|
|
7600
|
+
}
|
|
7601
|
+
if (!payload.packageAmount) {
|
|
7602
|
+
throw new Error("packageAmount is required when bookingType is PACKAGE_PURCHASE");
|
|
7603
|
+
}
|
|
7604
|
+
}
|
|
7605
|
+
let consultationCharge;
|
|
7606
|
+
if (bookingType === "PACKAGE_PURCHASE" ||
|
|
7607
|
+
bookingType === "USE_ACTIVE_PACKAGE") {
|
|
7608
|
+
consultationCharge = 0;
|
|
7609
|
+
}
|
|
7610
|
+
else {
|
|
7611
|
+
consultationCharge =
|
|
7612
|
+
typeof payload.consultationCharge === "string"
|
|
7613
|
+
? Number.parseFloat(payload.consultationCharge) || 0
|
|
7614
|
+
: payload.consultationCharge || 0;
|
|
7615
|
+
}
|
|
4257
7616
|
const completeAddress = [
|
|
4258
7617
|
payload.patientAddress.addressLine1,
|
|
4259
7618
|
payload.patientAddress.addressLine2,
|
|
@@ -4272,7 +7631,7 @@ const AppointmentService = {
|
|
|
4272
7631
|
appointmentDate: payload.appointmentDate,
|
|
4273
7632
|
fromDateTimeTs: payload.fromDateTimeTs,
|
|
4274
7633
|
toDateTimeTs: payload.toDateTimeTs,
|
|
4275
|
-
bookingType
|
|
7634
|
+
bookingType,
|
|
4276
7635
|
consultationCharge,
|
|
4277
7636
|
paymentMode: payload.paymentMode || "CASH",
|
|
4278
7637
|
type: payload.type || "CONSULTATION",
|
|
@@ -4305,15 +7664,14 @@ const AppointmentService = {
|
|
|
4305
7664
|
patientId: payload.patientAddress.patientId || 0,
|
|
4306
7665
|
},
|
|
4307
7666
|
};
|
|
4308
|
-
if (
|
|
7667
|
+
if (bookingType === "PACKAGE_PURCHASE" ||
|
|
7668
|
+
bookingType === "USE_ACTIVE_PACKAGE") {
|
|
4309
7669
|
unifiedPayload.packageConfigId = payload.packageConfigId;
|
|
7670
|
+
unifiedPayload.packageAmount = payload.packageAmount;
|
|
4310
7671
|
}
|
|
4311
7672
|
if (payload.patientPackageId) {
|
|
4312
7673
|
unifiedPayload.patientPackageId = payload.patientPackageId;
|
|
4313
7674
|
}
|
|
4314
|
-
if (payload.packageAmount) {
|
|
4315
|
-
unifiedPayload.packageAmount = payload.packageAmount;
|
|
4316
|
-
}
|
|
4317
7675
|
return unifiedPayload;
|
|
4318
7676
|
},
|
|
4319
7677
|
async createLegacyAppointment(payload) {
|
|
@@ -4383,30 +7741,6 @@ const AppointmentService = {
|
|
|
4383
7741
|
},
|
|
4384
7742
|
};
|
|
4385
7743
|
|
|
4386
|
-
const validatePhoneNumber$1 = (phone) => {
|
|
4387
|
-
const cleaned = phone.replace(/\D/g, "");
|
|
4388
|
-
return cleaned.length >= 7 && cleaned.length <= 15;
|
|
4389
|
-
};
|
|
4390
|
-
const validateCountryCode$1 = (code) => {
|
|
4391
|
-
return /^\+[1-9]\d{0,3}$/.test(code);
|
|
4392
|
-
};
|
|
4393
|
-
|
|
4394
|
-
const formatDateToISO = (date) => {
|
|
4395
|
-
const year = String(date.getFullYear()).padStart(4, "0");
|
|
4396
|
-
const month = String(date.getMonth() + 1).padStart(2, "0");
|
|
4397
|
-
const day = String(date.getDate()).padStart(2, "0");
|
|
4398
|
-
return `${year}-${month}-${day}`;
|
|
4399
|
-
};
|
|
4400
|
-
const parsePatientName = (fullName) => {
|
|
4401
|
-
const nameParts = fullName.trim().split(/\s+/);
|
|
4402
|
-
const firstName = nameParts[0] || "Patient";
|
|
4403
|
-
const lastName = nameParts.slice(1).join(" ") || "";
|
|
4404
|
-
return {
|
|
4405
|
-
firstName,
|
|
4406
|
-
lastName,
|
|
4407
|
-
};
|
|
4408
|
-
};
|
|
4409
|
-
|
|
4410
7744
|
const VanillaIcons = {
|
|
4411
7745
|
chevronLeft: (size = 20, className = "") => `
|
|
4412
7746
|
<svg
|
|
@@ -6379,18 +9713,59 @@ class AppointmentCalendarWidget {
|
|
|
6379
9713
|
return false;
|
|
6380
9714
|
return true;
|
|
6381
9715
|
}
|
|
6382
|
-
updateSubmitButtonState() {
|
|
6383
|
-
|
|
6384
|
-
|
|
6385
|
-
|
|
6386
|
-
this.state.
|
|
6387
|
-
|
|
6388
|
-
|
|
6389
|
-
|
|
6390
|
-
|
|
6391
|
-
|
|
6392
|
-
|
|
6393
|
-
|
|
9716
|
+
updateSubmitButtonState() {
|
|
9717
|
+
try {
|
|
9718
|
+
const submitBtn = this.container.querySelector("#medos-btn-submit");
|
|
9719
|
+
if (submitBtn) {
|
|
9720
|
+
const canSubmit = this.state.patientName &&
|
|
9721
|
+
this.state.patientAddress &&
|
|
9722
|
+
this.state.patientCity &&
|
|
9723
|
+
this.state.patientState &&
|
|
9724
|
+
this.state.patientCountry &&
|
|
9725
|
+
this.state.patientZipcode &&
|
|
9726
|
+
this.state.patientAge &&
|
|
9727
|
+
this.state.patientGender &&
|
|
9728
|
+
this.state.otpVerified &&
|
|
9729
|
+
(!(this.state.patientDob && this.state.patientDob.trim() !== "") ||
|
|
9730
|
+
this.isValidDateOfBirth(this.state.patientDob)) &&
|
|
9731
|
+
(!(this.state.bloodGroup && this.state.bloodGroup.trim() !== "") ||
|
|
9732
|
+
this.isValidBloodGroup(this.state.bloodGroup));
|
|
9733
|
+
submitBtn.disabled = !(canSubmit && !this.state.loading);
|
|
9734
|
+
}
|
|
9735
|
+
}
|
|
9736
|
+
catch (error) {
|
|
9737
|
+
console.error("Error updating submit button state:", error);
|
|
9738
|
+
const submitBtn = this.container.querySelector("#medos-btn-submit");
|
|
9739
|
+
if (submitBtn) {
|
|
9740
|
+
submitBtn.disabled = true;
|
|
9741
|
+
}
|
|
9742
|
+
}
|
|
9743
|
+
}
|
|
9744
|
+
updatePatientDetailsButtonState() {
|
|
9745
|
+
try {
|
|
9746
|
+
const continueBtn = this.container.querySelector("#medos-btn-continue");
|
|
9747
|
+
if (continueBtn) {
|
|
9748
|
+
const isFormValid = this.state.patientName &&
|
|
9749
|
+
this.state.patientAge &&
|
|
9750
|
+
this.state.patientGender &&
|
|
9751
|
+
this.state.patientAddress &&
|
|
9752
|
+
this.state.patientCity &&
|
|
9753
|
+
this.state.patientState &&
|
|
9754
|
+
this.state.patientCountry &&
|
|
9755
|
+
this.state.patientZipcode &&
|
|
9756
|
+
(!(this.state.patientDob && this.state.patientDob.trim() !== "") ||
|
|
9757
|
+
this.isValidDateOfBirth(this.state.patientDob)) &&
|
|
9758
|
+
(!(this.state.bloodGroup && this.state.bloodGroup.trim() !== "") ||
|
|
9759
|
+
this.isValidBloodGroup(this.state.bloodGroup));
|
|
9760
|
+
continueBtn.disabled = !isFormValid;
|
|
9761
|
+
}
|
|
9762
|
+
}
|
|
9763
|
+
catch (error) {
|
|
9764
|
+
console.error("Error updating patient details button state:", error);
|
|
9765
|
+
const continueBtn = this.container.querySelector("#medos-btn-continue");
|
|
9766
|
+
if (continueBtn) {
|
|
9767
|
+
continueBtn.disabled = true;
|
|
9768
|
+
}
|
|
6394
9769
|
}
|
|
6395
9770
|
}
|
|
6396
9771
|
async sendOtp() {
|
|
@@ -6491,6 +9866,9 @@ class AppointmentCalendarWidget {
|
|
|
6491
9866
|
!this.state.selectedSlot ||
|
|
6492
9867
|
!this.state.workspaceId ||
|
|
6493
9868
|
!this.state.selectedAddress ||
|
|
9869
|
+
!this.state.patientName ||
|
|
9870
|
+
!this.state.patientAge ||
|
|
9871
|
+
!this.state.patientGender ||
|
|
6494
9872
|
!this.state.patientAddress ||
|
|
6495
9873
|
!this.state.patientCity ||
|
|
6496
9874
|
!this.state.patientState ||
|
|
@@ -6505,6 +9883,40 @@ class AppointmentCalendarWidget {
|
|
|
6505
9883
|
this.setState({ error: "Please verify your phone number first." });
|
|
6506
9884
|
return;
|
|
6507
9885
|
}
|
|
9886
|
+
if (this.state.patientDob && this.state.patientDob.trim() !== "") {
|
|
9887
|
+
if (!this.isValidDateOfBirth(this.state.patientDob)) {
|
|
9888
|
+
const dobValue = this.state.patientDob;
|
|
9889
|
+
const today = new Date();
|
|
9890
|
+
const inputDate = new Date(dobValue);
|
|
9891
|
+
if (inputDate > today) {
|
|
9892
|
+
this.displayFieldValidationError("dateOfBirth", "future");
|
|
9893
|
+
}
|
|
9894
|
+
else if (!/^\d{4}-\d{2}-\d{2}$/.test(dobValue)) {
|
|
9895
|
+
this.displayFieldValidationError("dateOfBirth", "format");
|
|
9896
|
+
}
|
|
9897
|
+
else {
|
|
9898
|
+
this.displayFieldValidationError("dateOfBirth", "invalid");
|
|
9899
|
+
}
|
|
9900
|
+
return;
|
|
9901
|
+
}
|
|
9902
|
+
}
|
|
9903
|
+
if (this.state.bloodGroup && this.state.bloodGroup.trim() !== "") {
|
|
9904
|
+
if (!this.isValidBloodGroup(this.state.bloodGroup)) {
|
|
9905
|
+
this.displayFieldValidationError("bloodGroup", "invalid");
|
|
9906
|
+
return;
|
|
9907
|
+
}
|
|
9908
|
+
try {
|
|
9909
|
+
const mappedValue = this.safeMapBloodGroupToApi(this.state.bloodGroup);
|
|
9910
|
+
if (mappedValue === "UNKNOWN" && this.state.bloodGroup !== "UNKNOWN") {
|
|
9911
|
+
this.displayFieldValidationError("bloodGroup", "mapping");
|
|
9912
|
+
return;
|
|
9913
|
+
}
|
|
9914
|
+
}
|
|
9915
|
+
catch (error) {
|
|
9916
|
+
this.displayFieldValidationError("bloodGroup", "mapping");
|
|
9917
|
+
return;
|
|
9918
|
+
}
|
|
9919
|
+
}
|
|
6508
9920
|
this.setState({ loading: true });
|
|
6509
9921
|
this.render();
|
|
6510
9922
|
try {
|
|
@@ -6550,13 +9962,12 @@ class AppointmentCalendarWidget {
|
|
|
6550
9962
|
gender: this.state.patientGender
|
|
6551
9963
|
? this.state.patientGender.toUpperCase()
|
|
6552
9964
|
: undefined,
|
|
6553
|
-
|
|
6554
|
-
|
|
6555
|
-
: mapBloodGroupToApi("UNKNOWN"),
|
|
9965
|
+
dob: this.safeFormatDateOfBirth(this.state.patientDob),
|
|
9966
|
+
bloodGroup: this.safeMapBloodGroupToApi(this.state.bloodGroup),
|
|
6556
9967
|
},
|
|
6557
9968
|
patientAddress: patientAddressPayload,
|
|
6558
9969
|
});
|
|
6559
|
-
this.state.step =
|
|
9970
|
+
this.state.step = 7;
|
|
6560
9971
|
this.options.onSuccess?.();
|
|
6561
9972
|
}
|
|
6562
9973
|
catch (e) {
|
|
@@ -6622,7 +10033,22 @@ class AppointmentCalendarWidget {
|
|
|
6622
10033
|
this.render();
|
|
6623
10034
|
return;
|
|
6624
10035
|
}
|
|
6625
|
-
|
|
10036
|
+
if (this.state.step === 5) {
|
|
10037
|
+
const isFormValid = this.state.patientName &&
|
|
10038
|
+
this.state.patientAge &&
|
|
10039
|
+
this.state.patientGender &&
|
|
10040
|
+
this.state.patientAddress &&
|
|
10041
|
+
this.state.patientCity &&
|
|
10042
|
+
this.state.patientState &&
|
|
10043
|
+
this.state.patientCountry &&
|
|
10044
|
+
this.state.patientZipcode;
|
|
10045
|
+
if (!isFormValid)
|
|
10046
|
+
return;
|
|
10047
|
+
this.state.step = 6;
|
|
10048
|
+
this.render();
|
|
10049
|
+
return;
|
|
10050
|
+
}
|
|
10051
|
+
this.state.step = Math.min(7, this.state.step + 1);
|
|
6626
10052
|
this.render();
|
|
6627
10053
|
}
|
|
6628
10054
|
goBack() {
|
|
@@ -6657,6 +10083,11 @@ class AppointmentCalendarWidget {
|
|
|
6657
10083
|
this.render();
|
|
6658
10084
|
return;
|
|
6659
10085
|
}
|
|
10086
|
+
if (this.state.step === 6) {
|
|
10087
|
+
this.state.step = 5;
|
|
10088
|
+
this.render();
|
|
10089
|
+
return;
|
|
10090
|
+
}
|
|
6660
10091
|
this.state.step = Math.max(0, this.state.step - 1);
|
|
6661
10092
|
this.render();
|
|
6662
10093
|
}
|
|
@@ -6667,7 +10098,25 @@ class AppointmentCalendarWidget {
|
|
|
6667
10098
|
this.render();
|
|
6668
10099
|
}
|
|
6669
10100
|
setState(updates) {
|
|
6670
|
-
|
|
10101
|
+
try {
|
|
10102
|
+
const safeUpdates = { ...updates };
|
|
10103
|
+
if ("bloodGroup" in safeUpdates && safeUpdates.bloodGroup === undefined) {
|
|
10104
|
+
safeUpdates.bloodGroup = "";
|
|
10105
|
+
}
|
|
10106
|
+
if ("patientDob" in safeUpdates && safeUpdates.patientDob === undefined) {
|
|
10107
|
+
safeUpdates.patientDob = "";
|
|
10108
|
+
}
|
|
10109
|
+
this.state = { ...this.state, ...safeUpdates };
|
|
10110
|
+
if (safeUpdates.bloodGroup !== undefined ||
|
|
10111
|
+
safeUpdates.patientDob !== undefined) {
|
|
10112
|
+
this.updatePatientDetailsButtonState();
|
|
10113
|
+
this.updateSubmitButtonState();
|
|
10114
|
+
}
|
|
10115
|
+
}
|
|
10116
|
+
catch (error) {
|
|
10117
|
+
console.error("Error updating state:", error);
|
|
10118
|
+
this.state = { ...this.state, ...updates };
|
|
10119
|
+
}
|
|
6671
10120
|
}
|
|
6672
10121
|
render() {
|
|
6673
10122
|
if (!this.mounted)
|
|
@@ -6770,6 +10219,61 @@ class AppointmentCalendarWidget {
|
|
|
6770
10219
|
});
|
|
6771
10220
|
}
|
|
6772
10221
|
}
|
|
10222
|
+
if (this.state.step === 5) {
|
|
10223
|
+
const genderContainer = this.container.querySelector("#medos-gender-select-container");
|
|
10224
|
+
if (genderContainer) {
|
|
10225
|
+
const genderOptions = GENDER_OPTIONS.map((g) => ({
|
|
10226
|
+
value: g.value,
|
|
10227
|
+
label: g.label,
|
|
10228
|
+
}));
|
|
10229
|
+
this.genderSelect = new VanillaSelect(genderContainer, genderOptions, {
|
|
10230
|
+
placeholder: "Select gender",
|
|
10231
|
+
onValueChange: (value) => {
|
|
10232
|
+
this.state.patientGender = value;
|
|
10233
|
+
this.updatePatientDetailsButtonState();
|
|
10234
|
+
},
|
|
10235
|
+
});
|
|
10236
|
+
if (this.state.patientGender) {
|
|
10237
|
+
this.genderSelect.setValue(this.state.patientGender);
|
|
10238
|
+
}
|
|
10239
|
+
}
|
|
10240
|
+
const bloodGroupContainer = this.container.querySelector("#medos-blood-group-select-container");
|
|
10241
|
+
if (bloodGroupContainer) {
|
|
10242
|
+
const bloodGroupOptions = BLOOD_GROUP_OPTIONS.map((bg) => ({
|
|
10243
|
+
value: bg.value,
|
|
10244
|
+
label: bg.label,
|
|
10245
|
+
}));
|
|
10246
|
+
this.bloodGroupSelect = new VanillaSelect(bloodGroupContainer, bloodGroupOptions, {
|
|
10247
|
+
placeholder: "Select blood group (optional)",
|
|
10248
|
+
onValueChange: (value) => {
|
|
10249
|
+
this.setState({ error: null });
|
|
10250
|
+
try {
|
|
10251
|
+
if (value && value.trim() !== "") {
|
|
10252
|
+
if (!this.isValidBloodGroup(value)) {
|
|
10253
|
+
this.displayFieldValidationError("bloodGroup", "invalid");
|
|
10254
|
+
return;
|
|
10255
|
+
}
|
|
10256
|
+
const mappedValue = this.safeMapBloodGroupToApi(value);
|
|
10257
|
+
if (mappedValue === "UNKNOWN" && value !== "UNKNOWN") {
|
|
10258
|
+
this.displayFieldValidationError("bloodGroup", "mapping");
|
|
10259
|
+
return;
|
|
10260
|
+
}
|
|
10261
|
+
}
|
|
10262
|
+
this.setState({ bloodGroup: value });
|
|
10263
|
+
this.updatePatientDetailsButtonState();
|
|
10264
|
+
this.updateSubmitButtonState();
|
|
10265
|
+
}
|
|
10266
|
+
catch (error) {
|
|
10267
|
+
console.error("Blood group selection error:", error);
|
|
10268
|
+
this.displayFieldValidationError("bloodGroup", "mapping");
|
|
10269
|
+
}
|
|
10270
|
+
},
|
|
10271
|
+
});
|
|
10272
|
+
if (this.state.bloodGroup) {
|
|
10273
|
+
this.bloodGroupSelect.setValue(this.state.bloodGroup);
|
|
10274
|
+
}
|
|
10275
|
+
}
|
|
10276
|
+
}
|
|
6773
10277
|
}
|
|
6774
10278
|
renderStep() {
|
|
6775
10279
|
switch (this.state.step) {
|
|
@@ -6786,8 +10290,10 @@ class AppointmentCalendarWidget {
|
|
|
6786
10290
|
case 4:
|
|
6787
10291
|
return this.renderPatientSelectionStep();
|
|
6788
10292
|
case 5:
|
|
6789
|
-
return this.
|
|
10293
|
+
return this.renderPatientDetailsStep();
|
|
6790
10294
|
case 6:
|
|
10295
|
+
return this.renderAppointmentSummaryStep();
|
|
10296
|
+
case 7:
|
|
6791
10297
|
return this.renderSuccessStep();
|
|
6792
10298
|
default:
|
|
6793
10299
|
return "";
|
|
@@ -7282,6 +10788,203 @@ class AppointmentCalendarWidget {
|
|
|
7282
10788
|
</div>
|
|
7283
10789
|
`;
|
|
7284
10790
|
}
|
|
10791
|
+
renderPatientDetailsStep() {
|
|
10792
|
+
const isFormValid = this.state.patientName &&
|
|
10793
|
+
this.state.patientAge &&
|
|
10794
|
+
this.state.patientGender &&
|
|
10795
|
+
this.state.patientAddress &&
|
|
10796
|
+
this.state.patientCity &&
|
|
10797
|
+
this.state.patientState &&
|
|
10798
|
+
this.state.patientCountry &&
|
|
10799
|
+
this.state.patientZipcode;
|
|
10800
|
+
return `
|
|
10801
|
+
<!-- Patient Information Section -->
|
|
10802
|
+
<div class="medos-section-card">
|
|
10803
|
+
<div class="medos-section-header">
|
|
10804
|
+
${VanillaIcons.user(14)}
|
|
10805
|
+
<span class="medos-section-title">Patient Information</span>
|
|
10806
|
+
</div>
|
|
10807
|
+
<div class="medos-section-body">
|
|
10808
|
+
<div class="medos-form-row">
|
|
10809
|
+
<div class="medos-form-field">
|
|
10810
|
+
<label class="medos-form-label">
|
|
10811
|
+
First Name <span style="color: #EF4444;">*</span>
|
|
10812
|
+
</label>
|
|
10813
|
+
<input
|
|
10814
|
+
type="text"
|
|
10815
|
+
class="medos-appointment-input"
|
|
10816
|
+
id="medos-patient-first-name"
|
|
10817
|
+
placeholder="Jane"
|
|
10818
|
+
value="${this.escapeHtml(this.state.patientName.split(" ")[0] || "")}"
|
|
10819
|
+
/>
|
|
10820
|
+
</div>
|
|
10821
|
+
<div class="medos-form-field">
|
|
10822
|
+
<label class="medos-form-label">
|
|
10823
|
+
Last Name <span style="color: #EF4444;">*</span>
|
|
10824
|
+
</label>
|
|
10825
|
+
<input
|
|
10826
|
+
type="text"
|
|
10827
|
+
class="medos-appointment-input"
|
|
10828
|
+
id="medos-patient-last-name"
|
|
10829
|
+
placeholder="Doe"
|
|
10830
|
+
value="${this.escapeHtml(this.state.patientName.split(" ").slice(1).join(" ") || "")}"
|
|
10831
|
+
/>
|
|
10832
|
+
</div>
|
|
10833
|
+
</div>
|
|
10834
|
+
|
|
10835
|
+
<div class="medos-form-row">
|
|
10836
|
+
<div class="medos-form-field">
|
|
10837
|
+
<label class="medos-form-label">
|
|
10838
|
+
Age <span style="color: #EF4444;">*</span>
|
|
10839
|
+
</label>
|
|
10840
|
+
<input
|
|
10841
|
+
type="number"
|
|
10842
|
+
class="medos-appointment-input"
|
|
10843
|
+
id="medos-patient-age"
|
|
10844
|
+
placeholder="25"
|
|
10845
|
+
min="0"
|
|
10846
|
+
max="120"
|
|
10847
|
+
value="${this.escapeHtml(this.state.patientAge)}"
|
|
10848
|
+
/>
|
|
10849
|
+
</div>
|
|
10850
|
+
<div class="medos-form-field">
|
|
10851
|
+
<label class="medos-form-label">Email</label>
|
|
10852
|
+
<input
|
|
10853
|
+
type="email"
|
|
10854
|
+
class="medos-appointment-input"
|
|
10855
|
+
id="medos-patient-email"
|
|
10856
|
+
placeholder="jane@example.com (optional)"
|
|
10857
|
+
value="${this.escapeHtml(this.state.patientEmail)}"
|
|
10858
|
+
/>
|
|
10859
|
+
</div>
|
|
10860
|
+
</div>
|
|
10861
|
+
|
|
10862
|
+
<div class="medos-form-row">
|
|
10863
|
+
<div class="medos-form-field">
|
|
10864
|
+
<label class="medos-form-label">
|
|
10865
|
+
Gender <span style="color: #EF4444;">*</span>
|
|
10866
|
+
</label>
|
|
10867
|
+
<div id="medos-gender-select-container"></div>
|
|
10868
|
+
</div>
|
|
10869
|
+
<div class="medos-form-field">
|
|
10870
|
+
<label class="medos-form-label">Blood Group</label>
|
|
10871
|
+
<div id="medos-blood-group-select-container"></div>
|
|
10872
|
+
</div>
|
|
10873
|
+
</div>
|
|
10874
|
+
|
|
10875
|
+
<div class="medos-form-row">
|
|
10876
|
+
<div class="medos-form-field">
|
|
10877
|
+
<label class="medos-form-label">Date of Birth</label>
|
|
10878
|
+
<input
|
|
10879
|
+
type="date"
|
|
10880
|
+
class="medos-appointment-input"
|
|
10881
|
+
id="medos-patient-dob"
|
|
10882
|
+
value="${this.escapeHtml(this.state.patientDob)}"
|
|
10883
|
+
/>
|
|
10884
|
+
${this.state.patientDob &&
|
|
10885
|
+
this.state.patientDob.trim() !== "" &&
|
|
10886
|
+
!this.isValidDateOfBirth(this.state.patientDob)
|
|
10887
|
+
? this.getDateOfBirthErrorMessage(this.state.patientDob)
|
|
10888
|
+
: ""}
|
|
10889
|
+
</div>
|
|
10890
|
+
</div>
|
|
10891
|
+
</div>
|
|
10892
|
+
</div>
|
|
10893
|
+
|
|
10894
|
+
<!-- Address Information Section -->
|
|
10895
|
+
<div class="medos-section-card">
|
|
10896
|
+
<div class="medos-section-header">
|
|
10897
|
+
${VanillaIcons.mapPin(14)}
|
|
10898
|
+
<span class="medos-section-title">Address Information</span>
|
|
10899
|
+
</div>
|
|
10900
|
+
<div class="medos-section-body">
|
|
10901
|
+
<div class="medos-form-field">
|
|
10902
|
+
<label class="medos-form-label">
|
|
10903
|
+
Address <span style="color: #EF4444;">*</span>
|
|
10904
|
+
</label>
|
|
10905
|
+
<input
|
|
10906
|
+
type="text"
|
|
10907
|
+
class="medos-appointment-input"
|
|
10908
|
+
id="medos-patient-address"
|
|
10909
|
+
placeholder="123 Main Street"
|
|
10910
|
+
value="${this.escapeHtml(this.state.patientAddress)}"
|
|
10911
|
+
/>
|
|
10912
|
+
</div>
|
|
10913
|
+
|
|
10914
|
+
<div class="medos-form-row">
|
|
10915
|
+
<div class="medos-form-field">
|
|
10916
|
+
<label class="medos-form-label">
|
|
10917
|
+
City <span style="color: #EF4444;">*</span>
|
|
10918
|
+
</label>
|
|
10919
|
+
<input
|
|
10920
|
+
type="text"
|
|
10921
|
+
class="medos-appointment-input"
|
|
10922
|
+
id="medos-patient-city"
|
|
10923
|
+
placeholder="New York"
|
|
10924
|
+
value="${this.escapeHtml(this.state.patientCity)}"
|
|
10925
|
+
/>
|
|
10926
|
+
</div>
|
|
10927
|
+
<div class="medos-form-field">
|
|
10928
|
+
<label class="medos-form-label">
|
|
10929
|
+
State <span style="color: #EF4444;">*</span>
|
|
10930
|
+
</label>
|
|
10931
|
+
<input
|
|
10932
|
+
type="text"
|
|
10933
|
+
class="medos-appointment-input"
|
|
10934
|
+
id="medos-patient-state"
|
|
10935
|
+
placeholder="NY"
|
|
10936
|
+
value="${this.escapeHtml(this.state.patientState)}"
|
|
10937
|
+
/>
|
|
10938
|
+
</div>
|
|
10939
|
+
</div>
|
|
10940
|
+
|
|
10941
|
+
<div class="medos-form-row">
|
|
10942
|
+
<div class="medos-form-field">
|
|
10943
|
+
<label class="medos-form-label">
|
|
10944
|
+
Country <span style="color: #EF4444;">*</span>
|
|
10945
|
+
</label>
|
|
10946
|
+
<input
|
|
10947
|
+
type="text"
|
|
10948
|
+
class="medos-appointment-input"
|
|
10949
|
+
id="medos-patient-country"
|
|
10950
|
+
placeholder="United States"
|
|
10951
|
+
value="${this.escapeHtml(this.state.patientCountry)}"
|
|
10952
|
+
/>
|
|
10953
|
+
</div>
|
|
10954
|
+
<div class="medos-form-field">
|
|
10955
|
+
<label class="medos-form-label">
|
|
10956
|
+
Zipcode <span style="color: #EF4444;">*</span>
|
|
10957
|
+
</label>
|
|
10958
|
+
<input
|
|
10959
|
+
type="text"
|
|
10960
|
+
class="medos-appointment-input"
|
|
10961
|
+
id="medos-patient-zipcode"
|
|
10962
|
+
placeholder="10001"
|
|
10963
|
+
value="${this.escapeHtml(this.state.patientZipcode)}"
|
|
10964
|
+
/>
|
|
10965
|
+
</div>
|
|
10966
|
+
</div>
|
|
10967
|
+
|
|
10968
|
+
<div class="medos-form-field" style="margin-top: 20px;">
|
|
10969
|
+
<label class="medos-form-label">Landmark</label>
|
|
10970
|
+
<input
|
|
10971
|
+
type="text"
|
|
10972
|
+
class="medos-appointment-input"
|
|
10973
|
+
id="medos-patient-landmark"
|
|
10974
|
+
placeholder="Near Central Park"
|
|
10975
|
+
value="${this.escapeHtml(this.state.patientLandmark)}"
|
|
10976
|
+
/>
|
|
10977
|
+
</div>
|
|
10978
|
+
</div>
|
|
10979
|
+
</div>
|
|
10980
|
+
|
|
10981
|
+
<div class="medos-actions">
|
|
10982
|
+
<button class="medos-btn medos-btn-back" id="medos-btn-back">${VanillaIcons.arrowLeft(14)} Back</button>
|
|
10983
|
+
<button class="medos-btn medos-btn-secondary" id="medos-btn-cancel">Cancel</button>
|
|
10984
|
+
<button class="medos-btn medos-btn-primary" id="medos-btn-continue" ${isFormValid ? "" : "disabled"}>Continue</button>
|
|
10985
|
+
</div>
|
|
10986
|
+
`;
|
|
10987
|
+
}
|
|
7285
10988
|
renderAppointmentSummaryStep() {
|
|
7286
10989
|
const selectedDoctor = this.doctors.find((d) => d.id === this.state.selectedDoctor);
|
|
7287
10990
|
const selectedAddress = this.state.addresses.find((addr) => addr.id === this.state.selectedAddress);
|
|
@@ -7599,6 +11302,7 @@ class AppointmentCalendarWidget {
|
|
|
7599
11302
|
const target = e.target;
|
|
7600
11303
|
this.state.patientAge = target.value;
|
|
7601
11304
|
this.updateSubmitButtonState();
|
|
11305
|
+
this.updatePatientDetailsButtonState();
|
|
7602
11306
|
});
|
|
7603
11307
|
}
|
|
7604
11308
|
const patientEmailInput = this.container.querySelector("#medos-patient-email");
|
|
@@ -7615,6 +11319,7 @@ class AppointmentCalendarWidget {
|
|
|
7615
11319
|
const target = e.target;
|
|
7616
11320
|
this.state.patientAddress = target.value;
|
|
7617
11321
|
this.updateSubmitButtonState();
|
|
11322
|
+
this.updatePatientDetailsButtonState();
|
|
7618
11323
|
});
|
|
7619
11324
|
}
|
|
7620
11325
|
const patientCityInput = this.container.querySelector("#medos-patient-city");
|
|
@@ -7623,6 +11328,7 @@ class AppointmentCalendarWidget {
|
|
|
7623
11328
|
const target = e.target;
|
|
7624
11329
|
this.state.patientCity = target.value;
|
|
7625
11330
|
this.updateSubmitButtonState();
|
|
11331
|
+
this.updatePatientDetailsButtonState();
|
|
7626
11332
|
});
|
|
7627
11333
|
}
|
|
7628
11334
|
const patientStateInput = this.container.querySelector("#medos-patient-state");
|
|
@@ -7631,6 +11337,7 @@ class AppointmentCalendarWidget {
|
|
|
7631
11337
|
const target = e.target;
|
|
7632
11338
|
this.state.patientState = target.value;
|
|
7633
11339
|
this.updateSubmitButtonState();
|
|
11340
|
+
this.updatePatientDetailsButtonState();
|
|
7634
11341
|
});
|
|
7635
11342
|
}
|
|
7636
11343
|
const patientCountryInput = this.container.querySelector("#medos-patient-country");
|
|
@@ -7639,6 +11346,7 @@ class AppointmentCalendarWidget {
|
|
|
7639
11346
|
const target = e.target;
|
|
7640
11347
|
this.state.patientCountry = target.value;
|
|
7641
11348
|
this.updateSubmitButtonState();
|
|
11349
|
+
this.updatePatientDetailsButtonState();
|
|
7642
11350
|
});
|
|
7643
11351
|
}
|
|
7644
11352
|
const patientZipcodeInput = this.container.querySelector("#medos-patient-zipcode");
|
|
@@ -7647,6 +11355,7 @@ class AppointmentCalendarWidget {
|
|
|
7647
11355
|
const target = e.target;
|
|
7648
11356
|
this.state.patientZipcode = target.value;
|
|
7649
11357
|
this.updateSubmitButtonState();
|
|
11358
|
+
this.updatePatientDetailsButtonState();
|
|
7650
11359
|
});
|
|
7651
11360
|
}
|
|
7652
11361
|
const patientLandmarkInput = this.container.querySelector("#medos-patient-landmark");
|
|
@@ -7656,6 +11365,92 @@ class AppointmentCalendarWidget {
|
|
|
7656
11365
|
this.state.patientLandmark = target.value;
|
|
7657
11366
|
});
|
|
7658
11367
|
}
|
|
11368
|
+
const patientFirstNameInput = this.container.querySelector("#medos-patient-first-name");
|
|
11369
|
+
if (patientFirstNameInput) {
|
|
11370
|
+
patientFirstNameInput.addEventListener("input", (e) => {
|
|
11371
|
+
const target = e.target;
|
|
11372
|
+
const lastName = this.state.patientName.split(" ").slice(1).join(" ") || "";
|
|
11373
|
+
this.state.patientName = `${target.value} ${lastName}`.trim();
|
|
11374
|
+
this.updatePatientDetailsButtonState();
|
|
11375
|
+
});
|
|
11376
|
+
}
|
|
11377
|
+
const patientLastNameInput = this.container.querySelector("#medos-patient-last-name");
|
|
11378
|
+
if (patientLastNameInput) {
|
|
11379
|
+
patientLastNameInput.addEventListener("input", (e) => {
|
|
11380
|
+
const target = e.target;
|
|
11381
|
+
const firstName = this.state.patientName.split(" ")[0] || "";
|
|
11382
|
+
this.state.patientName = `${firstName} ${target.value}`.trim();
|
|
11383
|
+
this.updatePatientDetailsButtonState();
|
|
11384
|
+
});
|
|
11385
|
+
}
|
|
11386
|
+
const patientDobInput = this.container.querySelector("#medos-patient-dob");
|
|
11387
|
+
if (patientDobInput) {
|
|
11388
|
+
patientDobInput.addEventListener("input", (e) => {
|
|
11389
|
+
const target = e.target;
|
|
11390
|
+
const dobValue = target.value;
|
|
11391
|
+
this.setState({ patientDob: dobValue });
|
|
11392
|
+
this.setState({ error: null });
|
|
11393
|
+
if (dobValue && dobValue.trim() !== "") {
|
|
11394
|
+
try {
|
|
11395
|
+
if (!this.isValidDateOfBirth(dobValue)) {
|
|
11396
|
+
target.classList.add("medos-input-error");
|
|
11397
|
+
const today = new Date();
|
|
11398
|
+
const inputDate = new Date(dobValue);
|
|
11399
|
+
if (inputDate > today) {
|
|
11400
|
+
target.title = "Date of birth cannot be in the future";
|
|
11401
|
+
}
|
|
11402
|
+
else if (!/^\d{4}-\d{2}-\d{2}$/.test(dobValue)) {
|
|
11403
|
+
target.title = "Please use YYYY-MM-DD format";
|
|
11404
|
+
}
|
|
11405
|
+
else {
|
|
11406
|
+
target.title = "Please enter a valid date";
|
|
11407
|
+
}
|
|
11408
|
+
}
|
|
11409
|
+
else {
|
|
11410
|
+
target.classList.remove("medos-input-error");
|
|
11411
|
+
target.title = "";
|
|
11412
|
+
}
|
|
11413
|
+
}
|
|
11414
|
+
catch (error) {
|
|
11415
|
+
console.warn("Date validation error:", error);
|
|
11416
|
+
target.classList.add("medos-input-error");
|
|
11417
|
+
target.title = "Date validation failed";
|
|
11418
|
+
}
|
|
11419
|
+
}
|
|
11420
|
+
else {
|
|
11421
|
+
target.classList.remove("medos-input-error");
|
|
11422
|
+
target.title = "";
|
|
11423
|
+
}
|
|
11424
|
+
this.updatePatientDetailsButtonState();
|
|
11425
|
+
this.updateSubmitButtonState();
|
|
11426
|
+
});
|
|
11427
|
+
patientDobInput.addEventListener("blur", (e) => {
|
|
11428
|
+
const target = e.target;
|
|
11429
|
+
const dobValue = target.value;
|
|
11430
|
+
if (dobValue && dobValue.trim() !== "") {
|
|
11431
|
+
try {
|
|
11432
|
+
if (!this.isValidDateOfBirth(dobValue)) {
|
|
11433
|
+
target.classList.add("medos-input-error");
|
|
11434
|
+
const today = new Date();
|
|
11435
|
+
const inputDate = new Date(dobValue);
|
|
11436
|
+
if (inputDate > today) {
|
|
11437
|
+
this.displayFieldValidationError("dateOfBirth", "future");
|
|
11438
|
+
}
|
|
11439
|
+
else if (!/^\d{4}-\d{2}-\d{2}$/.test(dobValue)) {
|
|
11440
|
+
this.displayFieldValidationError("dateOfBirth", "format");
|
|
11441
|
+
}
|
|
11442
|
+
else {
|
|
11443
|
+
this.displayFieldValidationError("dateOfBirth", "invalid");
|
|
11444
|
+
}
|
|
11445
|
+
}
|
|
11446
|
+
}
|
|
11447
|
+
catch (error) {
|
|
11448
|
+
console.warn("Date validation error on blur:", error);
|
|
11449
|
+
this.displayFieldValidationError("dateOfBirth", "invalid");
|
|
11450
|
+
}
|
|
11451
|
+
}
|
|
11452
|
+
});
|
|
11453
|
+
}
|
|
7659
11454
|
const optionCards = this.container.querySelectorAll(".medos-option-card");
|
|
7660
11455
|
optionCards.forEach((card) => {
|
|
7661
11456
|
card.addEventListener("click", () => {
|
|
@@ -7860,6 +11655,122 @@ class AppointmentCalendarWidget {
|
|
|
7860
11655
|
div.textContent = text;
|
|
7861
11656
|
return div.innerHTML;
|
|
7862
11657
|
}
|
|
11658
|
+
isValidDateOfBirth(dob) {
|
|
11659
|
+
try {
|
|
11660
|
+
return validateDateOfBirth(dob);
|
|
11661
|
+
}
|
|
11662
|
+
catch (error) {
|
|
11663
|
+
console.warn("Date of birth validation error:", error);
|
|
11664
|
+
return false;
|
|
11665
|
+
}
|
|
11666
|
+
}
|
|
11667
|
+
isValidBloodGroup(bloodGroup) {
|
|
11668
|
+
try {
|
|
11669
|
+
return validateBloodGroup(bloodGroup);
|
|
11670
|
+
}
|
|
11671
|
+
catch (error) {
|
|
11672
|
+
console.warn("Blood group validation error:", error);
|
|
11673
|
+
return false;
|
|
11674
|
+
}
|
|
11675
|
+
}
|
|
11676
|
+
safeMapBloodGroupToApi(bloodGroup) {
|
|
11677
|
+
try {
|
|
11678
|
+
if (!bloodGroup) {
|
|
11679
|
+
return "UNKNOWN";
|
|
11680
|
+
}
|
|
11681
|
+
if (!this.isValidBloodGroup(bloodGroup)) {
|
|
11682
|
+
console.warn(`Invalid blood group provided: ${bloodGroup}, using UNKNOWN`);
|
|
11683
|
+
return "UNKNOWN";
|
|
11684
|
+
}
|
|
11685
|
+
const mapped = mapBloodGroupToApi(bloodGroup);
|
|
11686
|
+
if (!mapped || mapped === "") {
|
|
11687
|
+
console.warn(`Blood group mapping failed for: ${bloodGroup}, using UNKNOWN`);
|
|
11688
|
+
return "UNKNOWN";
|
|
11689
|
+
}
|
|
11690
|
+
return mapped;
|
|
11691
|
+
}
|
|
11692
|
+
catch (error) {
|
|
11693
|
+
console.error("Blood group mapping error:", error);
|
|
11694
|
+
return "UNKNOWN";
|
|
11695
|
+
}
|
|
11696
|
+
}
|
|
11697
|
+
safeFormatDateOfBirth(dob) {
|
|
11698
|
+
try {
|
|
11699
|
+
if (!dob) {
|
|
11700
|
+
return undefined;
|
|
11701
|
+
}
|
|
11702
|
+
if (!this.isValidDateOfBirth(dob)) {
|
|
11703
|
+
console.warn(`Invalid date of birth provided: ${dob}, excluding from payload`);
|
|
11704
|
+
return undefined;
|
|
11705
|
+
}
|
|
11706
|
+
return dob;
|
|
11707
|
+
}
|
|
11708
|
+
catch (error) {
|
|
11709
|
+
console.error("Date of birth formatting error:", error);
|
|
11710
|
+
return undefined;
|
|
11711
|
+
}
|
|
11712
|
+
}
|
|
11713
|
+
getDateOfBirthErrorMessage(dobValue) {
|
|
11714
|
+
try {
|
|
11715
|
+
const today = new Date();
|
|
11716
|
+
const inputDate = new Date(dobValue);
|
|
11717
|
+
if (inputDate > today) {
|
|
11718
|
+
return '<div class="medos-validation-error">Date of birth cannot be in the future</div>';
|
|
11719
|
+
}
|
|
11720
|
+
else if (!/^\d{4}-\d{2}-\d{2}$/.test(dobValue)) {
|
|
11721
|
+
return '<div class="medos-validation-error">Please use YYYY-MM-DD format</div>';
|
|
11722
|
+
}
|
|
11723
|
+
else {
|
|
11724
|
+
return '<div class="medos-validation-error">Please enter a valid date of birth</div>';
|
|
11725
|
+
}
|
|
11726
|
+
}
|
|
11727
|
+
catch (error) {
|
|
11728
|
+
console.warn("Error generating date of birth error message:", error);
|
|
11729
|
+
return '<div class="medos-validation-error">Please enter a valid date of birth</div>';
|
|
11730
|
+
}
|
|
11731
|
+
}
|
|
11732
|
+
displayFieldValidationError(fieldName, errorType) {
|
|
11733
|
+
let errorMessage = "";
|
|
11734
|
+
switch (fieldName) {
|
|
11735
|
+
case "bloodGroup":
|
|
11736
|
+
switch (errorType) {
|
|
11737
|
+
case "invalid":
|
|
11738
|
+
errorMessage =
|
|
11739
|
+
"Please select a valid blood group from the dropdown or leave it empty.";
|
|
11740
|
+
break;
|
|
11741
|
+
case "mapping":
|
|
11742
|
+
errorMessage =
|
|
11743
|
+
"Blood group selection failed. Please try selecting again or leave it empty.";
|
|
11744
|
+
break;
|
|
11745
|
+
default:
|
|
11746
|
+
errorMessage =
|
|
11747
|
+
"Blood group validation failed. Please check your selection.";
|
|
11748
|
+
}
|
|
11749
|
+
break;
|
|
11750
|
+
case "dateOfBirth":
|
|
11751
|
+
switch (errorType) {
|
|
11752
|
+
case "invalid":
|
|
11753
|
+
errorMessage =
|
|
11754
|
+
"Please enter a valid date of birth in YYYY-MM-DD format or leave it empty.";
|
|
11755
|
+
break;
|
|
11756
|
+
case "future":
|
|
11757
|
+
errorMessage =
|
|
11758
|
+
"Date of birth cannot be in the future. Please enter a valid past date.";
|
|
11759
|
+
break;
|
|
11760
|
+
case "format":
|
|
11761
|
+
errorMessage =
|
|
11762
|
+
"Please enter date of birth in the correct format (YYYY-MM-DD).";
|
|
11763
|
+
break;
|
|
11764
|
+
default:
|
|
11765
|
+
errorMessage =
|
|
11766
|
+
"Date of birth validation failed. Please check the date format.";
|
|
11767
|
+
}
|
|
11768
|
+
break;
|
|
11769
|
+
default:
|
|
11770
|
+
errorMessage = `Validation failed for ${fieldName}. Please check your input.`;
|
|
11771
|
+
}
|
|
11772
|
+
this.setState({ error: errorMessage });
|
|
11773
|
+
}
|
|
7863
11774
|
destroy() {
|
|
7864
11775
|
this.mounted = false;
|
|
7865
11776
|
this.container.innerHTML = "";
|
|
@@ -7873,57 +11784,6 @@ function initAppointmentCalendar(options) {
|
|
|
7873
11784
|
return new AppointmentCalendarWidget(container, options);
|
|
7874
11785
|
}
|
|
7875
11786
|
|
|
7876
|
-
const EnquiryService = {
|
|
7877
|
-
async submitEnquiry(payload) {
|
|
7878
|
-
try {
|
|
7879
|
-
const client = await MedosClient.ensureInitialized();
|
|
7880
|
-
const enquiryPayload = {
|
|
7881
|
-
type: "ENQUIRY",
|
|
7882
|
-
subject: payload.inquirySubject,
|
|
7883
|
-
description: payload.inquiryMessage,
|
|
7884
|
-
senderName: payload.patientName,
|
|
7885
|
-
senderEmail: payload.patientEmail,
|
|
7886
|
-
senderPhone: `${payload.countryCode}${payload.patientPhone}`,
|
|
7887
|
-
};
|
|
7888
|
-
const formData = new FormData();
|
|
7889
|
-
const jsonBlob = new Blob([JSON.stringify(enquiryPayload)], {
|
|
7890
|
-
type: "application/json",
|
|
7891
|
-
});
|
|
7892
|
-
formData.append("payload", jsonBlob);
|
|
7893
|
-
const res = await client.post("/inbox/create", formData);
|
|
7894
|
-
return res.data;
|
|
7895
|
-
}
|
|
7896
|
-
catch (error) {
|
|
7897
|
-
if (error instanceof Error) {
|
|
7898
|
-
throw new Error(`Failed to submit enquiry: ${error.message}`);
|
|
7899
|
-
}
|
|
7900
|
-
throw new Error("Failed to submit enquiry: Unknown error");
|
|
7901
|
-
}
|
|
7902
|
-
},
|
|
7903
|
-
};
|
|
7904
|
-
|
|
7905
|
-
const validateName = (name) => {
|
|
7906
|
-
return name.trim().length > 0;
|
|
7907
|
-
};
|
|
7908
|
-
const validateEmail = (email) => {
|
|
7909
|
-
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
7910
|
-
return emailRegex.test(email);
|
|
7911
|
-
};
|
|
7912
|
-
const validatePhoneNumber = (phone) => {
|
|
7913
|
-
const cleaned = phone.replace(/\D/g, "");
|
|
7914
|
-
return cleaned.length >= 7 && cleaned.length <= 15;
|
|
7915
|
-
};
|
|
7916
|
-
const validateSubject = (subject) => {
|
|
7917
|
-
return subject.trim().length > 0;
|
|
7918
|
-
};
|
|
7919
|
-
const validateMessage = (message) => {
|
|
7920
|
-
const trimmed = message.trim();
|
|
7921
|
-
return trimmed.length > 0;
|
|
7922
|
-
};
|
|
7923
|
-
const validateCountryCode = (code) => {
|
|
7924
|
-
return /^\+[1-9]\d{0,3}$/.test(code);
|
|
7925
|
-
};
|
|
7926
|
-
|
|
7927
11787
|
const COUNTRY_CODES_ENQUIRY = [
|
|
7928
11788
|
{ value: "+91", label: "🇮🇳 +91" },
|
|
7929
11789
|
{ value: "+1", label: "🇺🇸 +1" },
|