hplx-feature-library 1.0.170 → 1.0.171

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.
Files changed (202) hide show
  1. package/dist/Attachments/components/document-canvas/document-pen-tool.d.ts +1 -1
  2. package/dist/Attachments/components/drag-drop-overlay.d.ts +1 -1
  3. package/dist/Attachments/components/edit-document-modal.d.ts +1 -1
  4. package/dist/Attachments/components/uploading-toast.d.ts +1 -1
  5. package/dist/Attachments/context/index.d.ts +2 -2
  6. package/dist/Attachments/hooks/useDropdownPosition.d.ts +1 -1
  7. package/dist/Attachments/index.js +12670 -11144
  8. package/dist/CameraCapture/index.d.ts +1 -1
  9. package/dist/PediatricsCalculator/components/PediatricsCalculatorTableContext.d.ts +1 -1
  10. package/dist/PediatricsCalculator/index.js +1 -1
  11. package/dist/PediatricsCalculatorTable-BglWcUGO.cjs +40 -0
  12. package/dist/PediatricsCalculatorTable-Dwluo5W0.js +2163 -0
  13. package/dist/components/{customDropdown/CustomDropdown.d.ts → CustomDropdown.d.ts} +2 -2
  14. package/dist/components/{toggleButtons/ToggleButtons.d.ts → ToggleButtons.d.ts} +1 -1
  15. package/dist/hplx-feature-library.css +1 -1
  16. package/dist/index.d.ts +0 -5
  17. package/dist/index.js +2 -12
  18. package/dist/useOutsideClick-COATBT9j.cjs +92 -0
  19. package/dist/useOutsideClick-CYAjbj1N.js +6878 -0
  20. package/package.json +4 -60
  21. package/dist/APIAction--DyoXs57.js +0 -3752
  22. package/dist/APIAction-B5XQnkiF.cjs +0 -9
  23. package/dist/AlertPopup/index.js +0 -79
  24. package/dist/AllInvestigations/components/AllInvestigationsTable.d.ts +0 -19
  25. package/dist/AllInvestigations/index.d.ts +0 -1
  26. package/dist/AllInvestigations/index.js +0 -4
  27. package/dist/AllInvestigations/utils/test-tange-util.d.ts +0 -8
  28. package/dist/AllInvestigationsTable-Dj3AKVVv.js +0 -17066
  29. package/dist/AllInvestigationsTable-aw_zEJj_.cjs +0 -79
  30. package/dist/CustomDropdown/index.js +0 -256
  31. package/dist/DateTimePicker/DateAndTimePicker/index.js +0 -5930
  32. package/dist/PatientAddEdit/index.js +0 -1662
  33. package/dist/PatientPopup/action/APIAction.d.ts +0 -65
  34. package/dist/PatientPopup/app/PatientPopupContainer.d.ts +0 -6
  35. package/dist/PatientPopup/app/PatientPopupContext.d.ts +0 -30
  36. package/dist/PatientPopup/common/common.d.ts +0 -14
  37. package/dist/PatientPopup/components/Lab/HPLXLab.d.ts +0 -8
  38. package/dist/PatientPopup/components/Lab/LISLab.d.ts +0 -8
  39. package/dist/PatientPopup/components/Lab/LabTable.d.ts +0 -5
  40. package/dist/PatientPopup/components/Lab/index.d.ts +0 -5
  41. package/dist/PatientPopup/components/Loader/Loader.d.ts +0 -2
  42. package/dist/PatientPopup/components/Pagination.d.ts +0 -9
  43. package/dist/PatientPopup/components/Profile/Abha.d.ts +0 -11
  44. package/dist/PatientPopup/components/Profile/PatientDetailsModal.d.ts +0 -1
  45. package/dist/PatientPopup/components/Profile/Profile.d.ts +0 -11
  46. package/dist/PatientPopup/components/Profile/Sms.d.ts +0 -2
  47. package/dist/PatientPopup/components/Visits/Table.d.ts +0 -11
  48. package/dist/PatientPopup/components/Visits/index.d.ts +0 -15
  49. package/dist/PatientPopup/components/addBills/AddBillFooter.d.ts +0 -2
  50. package/dist/PatientPopup/components/addBills/AddBills.d.ts +0 -5
  51. package/dist/PatientPopup/components/addBills/AddBillsTable.d.ts +0 -17
  52. package/dist/PatientPopup/components/addBills/DropDown.d.ts +0 -15
  53. package/dist/PatientPopup/components/appointment/AllAppts.d.ts +0 -8
  54. package/dist/PatientPopup/components/appointment/Appointment.d.ts +0 -2
  55. package/dist/PatientPopup/components/appointment/AppointmentsTable.d.ts +0 -10
  56. package/dist/PatientPopup/components/bills/Bills.d.ts +0 -6
  57. package/dist/PatientPopup/components/bills/BillsTable.d.ts +0 -11
  58. package/dist/PatientPopup/components/deposit/DepositSection.d.ts +0 -9
  59. package/dist/PatientPopup/components/mainNavItem/MainNavItem.d.ts +0 -13
  60. package/dist/PatientPopup/components/patientPopupBody/PatientPopupBody.d.ts +0 -8
  61. package/dist/PatientPopup/components/patientPopupHeader/PatientPopupHeader.d.ts +0 -10
  62. package/dist/PatientPopup/components/patientPopupSummary/BillSummary.d.ts +0 -19
  63. package/dist/PatientPopup/components/patientPopupSummary/ConsultationDetails.d.ts +0 -14
  64. package/dist/PatientPopup/components/patientPopupSummary/DeleteItem.d.ts +0 -11
  65. package/dist/PatientPopup/components/patientPopupSummary/DepositRefundSummary.d.ts +0 -8
  66. package/dist/PatientPopup/components/patientPopupSummary/LabServiceDetails.d.ts +0 -13
  67. package/dist/PatientPopup/components/patientPopupSummary/OtherServiceDetails.d.ts +0 -13
  68. package/dist/PatientPopup/components/patientPopupSummary/PatientPopupSummary.d.ts +0 -8
  69. package/dist/PatientPopup/components/patientPopupSummary/PaymentCard.d.ts +0 -25
  70. package/dist/PatientPopup/components/patientPopupSummary/ServiceLevelBillSummary.d.ts +0 -18
  71. package/dist/PatientPopup/components/payments/DepositRefundTable.d.ts +0 -14
  72. package/dist/PatientPopup/components/payments/OtherServicesTable.d.ts +0 -16
  73. package/dist/PatientPopup/components/payments/PaymentEditModal.d.ts +0 -15
  74. package/dist/PatientPopup/components/payments/PaymentHeader.d.ts +0 -7
  75. package/dist/PatientPopup/components/payments/Payments.d.ts +0 -5
  76. package/dist/PatientPopup/components/payments/PaymentsTable.d.ts +0 -14
  77. package/dist/PatientPopup/constants/AppConstants.d.ts +0 -123
  78. package/dist/PatientPopup/index.d.ts +0 -1
  79. package/dist/PatientPopup/index.js +0 -135376
  80. package/dist/PatientPopup/types/hplxAPITypes.d.ts +0 -37
  81. package/dist/PatientPopup/utils/PrintFontLoader.d.ts +0 -4
  82. package/dist/PatientPopup/utils/helperFunctions.d.ts +0 -3
  83. package/dist/PediatricsCalculatorTable-CTA61g3h.cjs +0 -1
  84. package/dist/PediatricsCalculatorTable-QgonqxbR.js +0 -833
  85. package/dist/ReusableModal-CIgDYOWZ.cjs +0 -1
  86. package/dist/ReusableModal-pSi21hnc.js +0 -29
  87. package/dist/ReusableTable/ReusableTable.d.ts +0 -3
  88. package/dist/ReusableTable/ReusableTableConstants.d.ts +0 -8
  89. package/dist/ReusableTable/ReusableTableTypes.d.ts +0 -96
  90. package/dist/ReusableTable/components/EmptyTableContainer.d.ts +0 -12
  91. package/dist/ReusableTable/components/FilterCheckbox.d.ts +0 -8
  92. package/dist/ReusableTable/components/FilterDropdown.d.ts +0 -17
  93. package/dist/ReusableTable/components/Pagination.d.ts +0 -2
  94. package/dist/ReusableTable/components/TableBody.d.ts +0 -2
  95. package/dist/ReusableTable/components/TableCell.d.ts +0 -3
  96. package/dist/ReusableTable/components/TableFilterSelect.d.ts +0 -12
  97. package/dist/ReusableTable/components/TableHead.d.ts +0 -2
  98. package/dist/ReusableTable/components/TableMain.d.ts +0 -2
  99. package/dist/ReusableTable/components/TableRow.d.ts +0 -3
  100. package/dist/ReusableTable/context/TableContext.d.ts +0 -21
  101. package/dist/ReusableTable/context/TableContextBase.d.ts +0 -26
  102. package/dist/ReusableTable/context/useTableContext.d.ts +0 -2
  103. package/dist/Subscription/components/SubscriptionBadge.d.ts +0 -2
  104. package/dist/ToggleButtons/index.js +0 -17
  105. package/dist/TrendGraphs/AreaChartComponent.d.ts +0 -9
  106. package/dist/TrendGraphs/LineChartComponent/DataPointToolTip.d.ts +0 -16
  107. package/dist/TrendGraphs/LineChartComponent/LineChartBody.d.ts +0 -2
  108. package/dist/TrendGraphs/LineChartComponent/LineChartHeader.d.ts +0 -2
  109. package/dist/TrendGraphs/LineChartComponent/index.d.ts +0 -2
  110. package/dist/TrendGraphs/context/index.d.ts +0 -2
  111. package/dist/TrendGraphs/hooks/useTrendGraphContext.d.ts +0 -2
  112. package/dist/TrendGraphs/utils/index.d.ts +0 -4
  113. package/dist/changePasswordModal/APIAction/APIActions.d.ts +0 -8
  114. package/dist/changePasswordModal/component/ChangePasswordModal.d.ts +0 -14
  115. package/dist/clsx-C11secjj.cjs +0 -1
  116. package/dist/clsx-OuTLNxxd.js +0 -16
  117. package/dist/common/APIAction/APIAction.d.ts +0 -28
  118. package/dist/common/components/BorderFullWidth.d.ts +0 -2
  119. package/dist/common/components/table/ExistingPatients.d.ts +0 -17
  120. package/dist/common/editRibbon/EditRibbon.d.ts +0 -9
  121. package/dist/common/utils/NetworkInstance.d.ts +0 -4
  122. package/dist/common/utils/common-utils.d.ts +0 -36
  123. package/dist/components/Modal.d.ts +0 -5
  124. package/dist/components/PatientAddEdit.d.ts +0 -3
  125. package/dist/components/alertPopup/index.d.ts +0 -1
  126. package/dist/components/customDropdown/index.d.ts +0 -1
  127. package/dist/components/dateTimePicker/DateAndTimePicker.d.ts +0 -21
  128. package/dist/components/dateTimePicker/index.d.ts +0 -1
  129. package/dist/components/toggleButtons/index.d.ts +0 -1
  130. package/dist/constants/CommonConstant.d.ts +0 -70
  131. package/dist/constants/TrendGraphsConstants.d.ts +0 -2
  132. package/dist/dayjs.min-BbV4duaj.js +0 -284
  133. package/dist/dayjs.min-DXp74Ozx.cjs +0 -1
  134. package/dist/fonts/AnekMalayalam-Bold.ttf +0 -0
  135. package/dist/fonts/AnekMalayalam-Regular.ttf +0 -0
  136. package/dist/fonts/Arial-Bold-Italic.ttf +0 -0
  137. package/dist/fonts/Arial-Bold.ttf +0 -0
  138. package/dist/fonts/Arial-Italic.ttf +0 -0
  139. package/dist/fonts/Arial.ttf +0 -0
  140. package/dist/fonts/IndianRupee.ttf +0 -0
  141. package/dist/fonts/MuktaMaheePunjabi-Bold.ttf +0 -0
  142. package/dist/fonts/MuktaMaheePunjabi-Regular.ttf +0 -0
  143. package/dist/fonts/Noto-Sans-Telugu-Bold.ttf +0 -0
  144. package/dist/fonts/Noto-Sans-Telugu-Regular.ttf +0 -0
  145. package/dist/fonts/NotoNastaliqUrdu-Bold.ttf +0 -0
  146. package/dist/fonts/NotoNastaliqUrdu-Regular.ttf +0 -0
  147. package/dist/fonts/NotoSansArabic-Bold.ttf +0 -0
  148. package/dist/fonts/NotoSansArabic.ttf +0 -0
  149. package/dist/fonts/NotoSansHindi-Bold.ttf +0 -0
  150. package/dist/fonts/NotoSansHindi.ttf +0 -0
  151. package/dist/fonts/NotoSansKannada-Bold.ttf +0 -0
  152. package/dist/fonts/NotoSansKannada.ttf +0 -0
  153. package/dist/fonts/NotoSansOriya-Bold.ttf +0 -0
  154. package/dist/fonts/NotoSansOriya.ttf +0 -0
  155. package/dist/fonts/NotoSansTamil-Bold.ttf +0 -0
  156. package/dist/fonts/NotoSansTamil.ttf +0 -0
  157. package/dist/fonts/NotoSerifGujarati-Bold.ttf +0 -0
  158. package/dist/fonts/NotoSerifGujarati-Regular.ttf +0 -0
  159. package/dist/fonts/Roboto-Regular.ttf +0 -0
  160. package/dist/fonts/Times-Bold-Italic.ttf +0 -0
  161. package/dist/fonts/Times-Bold.ttf +0 -0
  162. package/dist/fonts/Times-Italic.ttf +0 -0
  163. package/dist/fonts/Times.ttf +0 -0
  164. package/dist/fonts/TiroBangla-Bold.ttf +0 -0
  165. package/dist/fonts/TiroBangla-Regular.ttf +0 -0
  166. package/dist/fonts/Verdana-Bold-Italic.ttf +0 -0
  167. package/dist/fonts/Verdana-Bold.ttf +0 -0
  168. package/dist/fonts/Verdana-Italic.ttf +0 -0
  169. package/dist/fonts/Verdana.ttf +0 -0
  170. package/dist/hooks/useMediaQuery.d.ts +0 -1
  171. package/dist/index-CJFGOBPb.js +0 -122
  172. package/dist/index-DQlbIHh3.cjs +0 -102
  173. package/dist/index-DfcUmlge.cjs +0 -17
  174. package/dist/index-DkA8S5IK.cjs +0 -32
  175. package/dist/index-sG1tIMJ6.js +0 -7242
  176. package/dist/index-vVtPa2-N.js +0 -961
  177. package/dist/nineDots/NineDotsTypes.d.ts +0 -22
  178. package/dist/nineDots/NineDotsUtils.d.ts +0 -3
  179. package/dist/nineDots/nineDots.d.ts +0 -3
  180. package/dist/parseISO-AwyR5Nhg.cjs +0 -1
  181. package/dist/parseISO-Cso9HWPX.js +0 -1414
  182. package/dist/searchPatients/SearchPatients.d.ts +0 -11
  183. package/dist/types/APIEndPoints.d.ts +0 -11
  184. package/dist/types/AllInvestigationTypes/index.js +0 -4
  185. package/dist/types/AllInvestigationTypes.d.ts +0 -45
  186. package/dist/types/ApiResponseTypes.d.ts +0 -290
  187. package/dist/types/CommonTypes.d.ts +0 -255
  188. package/dist/types/PatientAddEditTypes/index.js +0 -1
  189. package/dist/types/PatientAddEditTypes.d.ts +0 -7
  190. package/dist/types/PatientPopupTypes/index.js +0 -1
  191. package/dist/types/PatientPopupTypes.d.ts +0 -836
  192. package/dist/types/TrendGraphTypes.d.ts +0 -19
  193. package/dist/useClickOutside-BjJyGTec.js +0 -14
  194. package/dist/useClickOutside-DsVG12Cs.cjs +0 -1
  195. package/dist/useOutsideClick-C4Q0aGuf.js +0 -15
  196. package/dist/useOutsideClick-CicUjzPP.cjs +0 -1
  197. package/dist/userProfile/APIAction/APIActions.d.ts +0 -18
  198. package/dist/userProfile/UserProfile.d.ts +0 -18
  199. package/dist/userProfile/UserProfileItem.d.ts +0 -7
  200. package/dist/warning-BozzKWdr.js +0 -38
  201. package/dist/warning-W0tkkrLJ.cjs +0 -1
  202. /package/dist/components/{alertPopup/AlertPopup.d.ts → AlertPopup.d.ts} +0 -0
@@ -1,961 +0,0 @@
1
- import { r as de, f as Ee, g as Se } from "./index-sG1tIMJ6.js";
2
- import pe from "react";
3
- import Me from "react-dom";
4
- import { r as we } from "./warning-BozzKWdr.js";
5
- var Y = { exports: {} }, W = {}, G = { exports: {} }, T = {}, J = { exports: {} }, ee;
6
- function ve() {
7
- return ee || (ee = 1, function(p, s) {
8
- Object.defineProperty(s, "__esModule", {
9
- value: !0
10
- }), s.default = a;
11
- /*!
12
- * Adapted from jQuery UI core
13
- *
14
- * http://jqueryui.com
15
- *
16
- * Copyright 2014 jQuery Foundation and other contributors
17
- * Released under the MIT license.
18
- * http://jquery.org/license
19
- *
20
- * http://api.jqueryui.com/category/ui-core/
21
- */
22
- var h = "none", i = "contents", f = /^(input|select|textarea|button|object|iframe)$/;
23
- function v(n, u) {
24
- return u.getPropertyValue("overflow") !== "visible" || // if 'overflow: visible' set, check if there is actually any overflow
25
- n.scrollWidth <= 0 && n.scrollHeight <= 0;
26
- }
27
- function E(n) {
28
- var u = n.offsetWidth <= 0 && n.offsetHeight <= 0;
29
- if (u && !n.innerHTML) return !0;
30
- try {
31
- var l = window.getComputedStyle(n), y = l.getPropertyValue("display");
32
- return u ? y !== i && v(n, l) : y === h;
33
- } catch {
34
- return console.warn("Failed to inspect element style"), !1;
35
- }
36
- }
37
- function t(n) {
38
- for (var u = n, l = n.getRootNode && n.getRootNode(); u && u !== document.body; ) {
39
- if (l && u === l && (u = l.host.parentNode), E(u)) return !1;
40
- u = u.parentNode;
41
- }
42
- return !0;
43
- }
44
- function _(n, u) {
45
- var l = n.nodeName.toLowerCase(), y = f.test(l) && !n.disabled || l === "a" && n.href || u;
46
- return y && t(n);
47
- }
48
- function m(n) {
49
- var u = n.getAttribute("tabindex");
50
- u === null && (u = void 0);
51
- var l = isNaN(u);
52
- return (l || u >= 0) && _(n, !l);
53
- }
54
- function a(n) {
55
- var u = [].slice.call(n.querySelectorAll("*"), 0).reduce(function(l, y) {
56
- return l.concat(y.shadowRoot ? a(y.shadowRoot) : [y]);
57
- }, []);
58
- return u.filter(m);
59
- }
60
- p.exports = s.default;
61
- }(J, J.exports)), J.exports;
62
- }
63
- var te;
64
- function Ne() {
65
- if (te) return T;
66
- te = 1, Object.defineProperty(T, "__esModule", {
67
- value: !0
68
- }), T.resetState = E, T.log = t, T.handleBlur = _, T.handleFocus = m, T.markForFocusLater = a, T.returnFocus = n, T.popWithoutFocus = u, T.setupScopedFocus = l, T.teardownScopedFocus = y;
69
- var p = ve(), s = h(p);
70
- function h(O) {
71
- return O && O.__esModule ? O : { default: O };
72
- }
73
- var i = [], f = null, v = !1;
74
- function E() {
75
- i = [];
76
- }
77
- function t() {
78
- process.env.NODE_ENV !== "production" && (console.log("focusManager ----------"), i.forEach(function(O) {
79
- var S = O || {};
80
- console.log(S.nodeName, S.className, S.id);
81
- }), console.log("end focusManager ----------"));
82
- }
83
- function _() {
84
- v = !0;
85
- }
86
- function m() {
87
- if (v) {
88
- if (v = !1, !f)
89
- return;
90
- setTimeout(function() {
91
- if (!f.contains(document.activeElement)) {
92
- var O = (0, s.default)(f)[0] || f;
93
- O.focus();
94
- }
95
- }, 0);
96
- }
97
- }
98
- function a() {
99
- i.push(document.activeElement);
100
- }
101
- function n() {
102
- var O = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, S = null;
103
- try {
104
- i.length !== 0 && (S = i.pop(), S.focus({ preventScroll: O }));
105
- return;
106
- } catch {
107
- console.warn(["You tried to return focus to", S, "but it is not in the DOM anymore"].join(" "));
108
- }
109
- }
110
- function u() {
111
- i.length > 0 && i.pop();
112
- }
113
- function l(O) {
114
- f = O, window.addEventListener ? (window.addEventListener("blur", _, !1), document.addEventListener("focus", m, !0)) : (window.attachEvent("onBlur", _), document.attachEvent("onFocus", m));
115
- }
116
- function y() {
117
- f = null, window.addEventListener ? (window.removeEventListener("blur", _), document.removeEventListener("focus", m)) : (window.detachEvent("onBlur", _), document.detachEvent("onFocus", m));
118
- }
119
- return T;
120
- }
121
- var Q = { exports: {} }, ne;
122
- function Re() {
123
- return ne || (ne = 1, function(p, s) {
124
- Object.defineProperty(s, "__esModule", {
125
- value: !0
126
- }), s.default = E;
127
- var h = ve(), i = f(h);
128
- function f(t) {
129
- return t && t.__esModule ? t : { default: t };
130
- }
131
- function v() {
132
- var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : document;
133
- return t.activeElement.shadowRoot ? v(t.activeElement.shadowRoot) : t.activeElement;
134
- }
135
- function E(t, _) {
136
- var m = (0, i.default)(t);
137
- if (!m.length) {
138
- _.preventDefault();
139
- return;
140
- }
141
- var a = void 0, n = _.shiftKey, u = m[0], l = m[m.length - 1], y = v();
142
- if (t === y) {
143
- if (!n) return;
144
- a = l;
145
- }
146
- if (l === y && !n && (a = u), u === y && n && (a = l), a) {
147
- _.preventDefault(), a.focus();
148
- return;
149
- }
150
- var O = /(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent), S = O != null && O[1] != "Chrome" && /\biPod\b|\biPad\b/g.exec(navigator.userAgent) == null;
151
- if (S) {
152
- var R = m.indexOf(y);
153
- if (R > -1 && (R += n ? -1 : 1), a = m[R], typeof a > "u") {
154
- _.preventDefault(), a = n ? l : u, a.focus();
155
- return;
156
- }
157
- _.preventDefault(), a.focus();
158
- }
159
- }
160
- p.exports = s.default;
161
- }(Q, Q.exports)), Q.exports;
162
- }
163
- var D = {}, P = {}, X = { exports: {} };
164
- /*!
165
- Copyright (c) 2015 Jed Watson.
166
- Based on code that is Copyright 2013-2015, Facebook, Inc.
167
- All rights reserved.
168
- */
169
- var oe;
170
- function Te() {
171
- return oe || (oe = 1, function(p) {
172
- (function() {
173
- var s = !!(typeof window < "u" && window.document && window.document.createElement), h = {
174
- canUseDOM: s,
175
- canUseWorkers: typeof Worker < "u",
176
- canUseEventListeners: s && !!(window.addEventListener || window.attachEvent),
177
- canUseViewport: s && !!window.screen
178
- };
179
- p.exports ? p.exports = h : window.ExecutionEnvironment = h;
180
- })();
181
- }(X)), X.exports;
182
- }
183
- var re;
184
- function Z() {
185
- if (re) return P;
186
- re = 1, Object.defineProperty(P, "__esModule", {
187
- value: !0
188
- }), P.canUseDOM = P.SafeNodeList = P.SafeHTMLCollection = void 0;
189
- var p = Te(), s = h(p);
190
- function h(v) {
191
- return v && v.__esModule ? v : { default: v };
192
- }
193
- var i = s.default, f = i.canUseDOM ? window.HTMLElement : {};
194
- return P.SafeHTMLCollection = i.canUseDOM ? window.HTMLCollection : {}, P.SafeNodeList = i.canUseDOM ? window.NodeList : {}, P.canUseDOM = i.canUseDOM, P.default = f, P;
195
- }
196
- var ae;
197
- function me() {
198
- if (ae) return D;
199
- ae = 1, Object.defineProperty(D, "__esModule", {
200
- value: !0
201
- }), D.resetState = v, D.log = E, D.assertNodeList = t, D.setElement = _, D.validateElement = m, D.hide = a, D.show = n, D.documentNotReadyOrSSRTesting = u;
202
- var p = we(), s = i(p), h = Z();
203
- function i(l) {
204
- return l && l.__esModule ? l : { default: l };
205
- }
206
- var f = null;
207
- function v() {
208
- f && (f.removeAttribute ? f.removeAttribute("aria-hidden") : f.length != null ? f.forEach(function(l) {
209
- return l.removeAttribute("aria-hidden");
210
- }) : document.querySelectorAll(f).forEach(function(l) {
211
- return l.removeAttribute("aria-hidden");
212
- })), f = null;
213
- }
214
- function E() {
215
- if (process.env.NODE_ENV !== "production") {
216
- var l = f || {};
217
- console.log("ariaAppHider ----------"), console.log(l.nodeName, l.className, l.id), console.log("end ariaAppHider ----------");
218
- }
219
- }
220
- function t(l, y) {
221
- if (!l || !l.length)
222
- throw new Error("react-modal: No elements were found for selector " + y + ".");
223
- }
224
- function _(l) {
225
- var y = l;
226
- if (typeof y == "string" && h.canUseDOM) {
227
- var O = document.querySelectorAll(y);
228
- t(O, y), y = O;
229
- }
230
- return f = y || f, f;
231
- }
232
- function m(l) {
233
- var y = l || f;
234
- return y ? Array.isArray(y) || y instanceof HTMLCollection || y instanceof NodeList ? y : [y] : ((0, s.default)(!1, ["react-modal: App element is not defined.", "Please use `Modal.setAppElement(el)` or set `appElement={el}`.", "This is needed so screen readers don't see main content", "when modal is opened. It is not recommended, but you can opt-out", "by setting `ariaHideApp={false}`."].join(" ")), []);
235
- }
236
- function a(l) {
237
- var y = !0, O = !1, S = void 0;
238
- try {
239
- for (var R = m(l)[Symbol.iterator](), A; !(y = (A = R.next()).done); y = !0) {
240
- var q = A.value;
241
- q.setAttribute("aria-hidden", "true");
242
- }
243
- } catch (L) {
244
- O = !0, S = L;
245
- } finally {
246
- try {
247
- !y && R.return && R.return();
248
- } finally {
249
- if (O)
250
- throw S;
251
- }
252
- }
253
- }
254
- function n(l) {
255
- var y = !0, O = !1, S = void 0;
256
- try {
257
- for (var R = m(l)[Symbol.iterator](), A; !(y = (A = R.next()).done); y = !0) {
258
- var q = A.value;
259
- q.removeAttribute("aria-hidden");
260
- }
261
- } catch (L) {
262
- O = !0, S = L;
263
- } finally {
264
- try {
265
- !y && R.return && R.return();
266
- } finally {
267
- if (O)
268
- throw S;
269
- }
270
- }
271
- }
272
- function u() {
273
- f = null;
274
- }
275
- return D;
276
- }
277
- var I = {}, le;
278
- function De() {
279
- if (le) return I;
280
- le = 1, Object.defineProperty(I, "__esModule", {
281
- value: !0
282
- }), I.resetState = i, I.log = f;
283
- var p = {}, s = {};
284
- function h(m, a) {
285
- m.classList.remove(a);
286
- }
287
- function i() {
288
- var m = document.getElementsByTagName("html")[0];
289
- for (var a in p)
290
- h(m, p[a]);
291
- var n = document.body;
292
- for (var u in s)
293
- h(n, s[u]);
294
- p = {}, s = {};
295
- }
296
- function f() {
297
- if (process.env.NODE_ENV !== "production") {
298
- var m = document.getElementsByTagName("html")[0].className, a = `Show tracked classes:
299
-
300
- `;
301
- a += "<html /> (" + m + `):
302
- `;
303
- for (var n in p)
304
- a += " " + n + " " + p[n] + `
305
- `;
306
- m = document.body.className, a += `
307
-
308
- doc.body (` + m + `):
309
- `;
310
- for (var u in s)
311
- a += " " + u + " " + s[u] + `
312
- `;
313
- a += `
314
- `, console.log(a);
315
- }
316
- }
317
- var v = function(a, n) {
318
- return a[n] || (a[n] = 0), a[n] += 1, n;
319
- }, E = function(a, n) {
320
- return a[n] && (a[n] -= 1), n;
321
- }, t = function(a, n, u) {
322
- u.forEach(function(l) {
323
- v(n, l), a.add(l);
324
- });
325
- }, _ = function(a, n, u) {
326
- u.forEach(function(l) {
327
- E(n, l), n[l] === 0 && a.remove(l);
328
- });
329
- };
330
- return I.add = function(a, n) {
331
- return t(a.classList, a.nodeName.toLowerCase() == "html" ? p : s, n.split(" "));
332
- }, I.remove = function(a, n) {
333
- return _(a.classList, a.nodeName.toLowerCase() == "html" ? p : s, n.split(" "));
334
- }, I;
335
- }
336
- var V = {}, se;
337
- function he() {
338
- if (se) return V;
339
- se = 1, Object.defineProperty(V, "__esModule", {
340
- value: !0
341
- }), V.log = i, V.resetState = f;
342
- function p(v, E) {
343
- if (!(v instanceof E))
344
- throw new TypeError("Cannot call a class as a function");
345
- }
346
- var s = function v() {
347
- var E = this;
348
- p(this, v), this.register = function(t) {
349
- if (E.openInstances.indexOf(t) !== -1) {
350
- process.env.NODE_ENV !== "production" && console.warn("React-Modal: Cannot register modal instance that's already open");
351
- return;
352
- }
353
- E.openInstances.push(t), E.emit("register");
354
- }, this.deregister = function(t) {
355
- var _ = E.openInstances.indexOf(t);
356
- if (_ === -1) {
357
- process.env.NODE_ENV !== "production" && console.warn("React-Modal: Unable to deregister " + t + " as it was never registered");
358
- return;
359
- }
360
- E.openInstances.splice(_, 1), E.emit("deregister");
361
- }, this.subscribe = function(t) {
362
- E.subscribers.push(t);
363
- }, this.emit = function(t) {
364
- E.subscribers.forEach(function(_) {
365
- return _(
366
- t,
367
- // shallow copy to avoid accidental mutation
368
- E.openInstances.slice()
369
- );
370
- });
371
- }, this.openInstances = [], this.subscribers = [];
372
- }, h = new s();
373
- function i() {
374
- console.log("portalOpenInstances ----------"), console.log(h.openInstances.length), h.openInstances.forEach(function(v) {
375
- return console.log(v);
376
- }), console.log("end portalOpenInstances ----------");
377
- }
378
- function f() {
379
- h = new s();
380
- }
381
- return V.default = h, V;
382
- }
383
- var j = {}, ie;
384
- function Ae() {
385
- if (ie) return j;
386
- ie = 1, Object.defineProperty(j, "__esModule", {
387
- value: !0
388
- }), j.resetState = E, j.log = t;
389
- var p = he(), s = h(p);
390
- function h(a) {
391
- return a && a.__esModule ? a : { default: a };
392
- }
393
- var i = void 0, f = void 0, v = [];
394
- function E() {
395
- for (var a = [i, f], n = 0; n < a.length; n++) {
396
- var u = a[n];
397
- u && u.parentNode && u.parentNode.removeChild(u);
398
- }
399
- i = f = null, v = [];
400
- }
401
- function t() {
402
- console.log("bodyTrap ----------"), console.log(v.length);
403
- for (var a = [i, f], n = 0; n < a.length; n++) {
404
- var u = a[n], l = u || {};
405
- console.log(l.nodeName, l.className, l.id);
406
- }
407
- console.log("edn bodyTrap ----------");
408
- }
409
- function _() {
410
- if (v.length === 0) {
411
- process.env.NODE_ENV !== "production" && console.warn("React-Modal: Open instances > 0 expected");
412
- return;
413
- }
414
- v[v.length - 1].focusContent();
415
- }
416
- function m(a, n) {
417
- !i && !f && (i = document.createElement("div"), i.setAttribute("data-react-modal-body-trap", ""), i.style.position = "absolute", i.style.opacity = "0", i.setAttribute("tabindex", "0"), i.addEventListener("focus", _), f = i.cloneNode(), f.addEventListener("focus", _)), v = n, v.length > 0 ? (document.body.firstChild !== i && document.body.insertBefore(i, document.body.firstChild), document.body.lastChild !== f && document.body.appendChild(f)) : (i.parentElement && i.parentElement.removeChild(i), f.parentElement && f.parentElement.removeChild(f));
418
- }
419
- return s.default.subscribe(m), j;
420
- }
421
- var ue;
422
- function Pe() {
423
- return ue || (ue = 1, function(p, s) {
424
- Object.defineProperty(s, "__esModule", {
425
- value: !0
426
- });
427
- var h = Object.assign || function(r) {
428
- for (var o = 1; o < arguments.length; o++) {
429
- var g = arguments[o];
430
- for (var e in g)
431
- Object.prototype.hasOwnProperty.call(g, e) && (r[e] = g[e]);
432
- }
433
- return r;
434
- }, i = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(r) {
435
- return typeof r;
436
- } : function(r) {
437
- return r && typeof Symbol == "function" && r.constructor === Symbol && r !== Symbol.prototype ? "symbol" : typeof r;
438
- }, f = /* @__PURE__ */ function() {
439
- function r(o, g) {
440
- for (var e = 0; e < g.length; e++) {
441
- var c = g[e];
442
- c.enumerable = c.enumerable || !1, c.configurable = !0, "value" in c && (c.writable = !0), Object.defineProperty(o, c.key, c);
443
- }
444
- }
445
- return function(o, g, e) {
446
- return g && r(o.prototype, g), e && r(o, e), o;
447
- };
448
- }(), v = pe, E = /* @__PURE__ */ de(), t = B(E), _ = Ne(), m = L(_), a = Re(), n = B(a), u = me(), l = L(u), y = De(), O = L(y), S = Z(), R = B(S), A = he(), q = B(A);
449
- Ae();
450
- function L(r) {
451
- if (r && r.__esModule)
452
- return r;
453
- var o = {};
454
- if (r != null)
455
- for (var g in r)
456
- Object.prototype.hasOwnProperty.call(r, g) && (o[g] = r[g]);
457
- return o.default = r, o;
458
- }
459
- function B(r) {
460
- return r && r.__esModule ? r : { default: r };
461
- }
462
- function F(r, o) {
463
- if (!(r instanceof o))
464
- throw new TypeError("Cannot call a class as a function");
465
- }
466
- function K(r, o) {
467
- if (!r)
468
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
469
- return o && (typeof o == "object" || typeof o == "function") ? o : r;
470
- }
471
- function $(r, o) {
472
- if (typeof o != "function" && o !== null)
473
- throw new TypeError("Super expression must either be null or a function, not " + typeof o);
474
- r.prototype = Object.create(o && o.prototype, { constructor: { value: r, enumerable: !1, writable: !0, configurable: !0 } }), o && (Object.setPrototypeOf ? Object.setPrototypeOf(r, o) : r.__proto__ = o);
475
- }
476
- var U = {
477
- overlay: "ReactModal__Overlay",
478
- content: "ReactModal__Content"
479
- }, H = function(o) {
480
- return o.code === "Tab" || o.keyCode === 9;
481
- }, b = function(o) {
482
- return o.code === "Escape" || o.keyCode === 27;
483
- }, d = 0, C = function(r) {
484
- $(o, r);
485
- function o(g) {
486
- F(this, o);
487
- var e = K(this, (o.__proto__ || Object.getPrototypeOf(o)).call(this, g));
488
- return e.setOverlayRef = function(c) {
489
- e.overlay = c, e.props.overlayRef && e.props.overlayRef(c);
490
- }, e.setContentRef = function(c) {
491
- e.content = c, e.props.contentRef && e.props.contentRef(c);
492
- }, e.afterClose = function() {
493
- var c = e.props, w = c.appElement, M = c.ariaHideApp, N = c.htmlOpenClassName, x = c.bodyOpenClassName, k = c.parentSelector, z = k && k().ownerDocument || document;
494
- x && O.remove(z.body, x), N && O.remove(z.getElementsByTagName("html")[0], N), M && d > 0 && (d -= 1, d === 0 && l.show(w)), e.props.shouldFocusAfterRender && (e.props.shouldReturnFocusAfterClose ? (m.returnFocus(e.props.preventScroll), m.teardownScopedFocus()) : m.popWithoutFocus()), e.props.onAfterClose && e.props.onAfterClose(), q.default.deregister(e);
495
- }, e.open = function() {
496
- e.beforeOpen(), e.state.afterOpen && e.state.beforeClose ? (clearTimeout(e.closeTimer), e.setState({ beforeClose: !1 })) : (e.props.shouldFocusAfterRender && (m.setupScopedFocus(e.node), m.markForFocusLater()), e.setState({ isOpen: !0 }, function() {
497
- e.openAnimationFrame = requestAnimationFrame(function() {
498
- e.setState({ afterOpen: !0 }), e.props.isOpen && e.props.onAfterOpen && e.props.onAfterOpen({
499
- overlayEl: e.overlay,
500
- contentEl: e.content
501
- });
502
- });
503
- }));
504
- }, e.close = function() {
505
- e.props.closeTimeoutMS > 0 ? e.closeWithTimeout() : e.closeWithoutTimeout();
506
- }, e.focusContent = function() {
507
- return e.content && !e.contentHasFocus() && e.content.focus({ preventScroll: !0 });
508
- }, e.closeWithTimeout = function() {
509
- var c = Date.now() + e.props.closeTimeoutMS;
510
- e.setState({ beforeClose: !0, closesAt: c }, function() {
511
- e.closeTimer = setTimeout(e.closeWithoutTimeout, e.state.closesAt - Date.now());
512
- });
513
- }, e.closeWithoutTimeout = function() {
514
- e.setState({
515
- beforeClose: !1,
516
- isOpen: !1,
517
- afterOpen: !1,
518
- closesAt: null
519
- }, e.afterClose);
520
- }, e.handleKeyDown = function(c) {
521
- H(c) && (0, n.default)(e.content, c), e.props.shouldCloseOnEsc && b(c) && (c.stopPropagation(), e.requestClose(c));
522
- }, e.handleOverlayOnClick = function(c) {
523
- e.shouldClose === null && (e.shouldClose = !0), e.shouldClose && e.props.shouldCloseOnOverlayClick && (e.ownerHandlesClose() ? e.requestClose(c) : e.focusContent()), e.shouldClose = null;
524
- }, e.handleContentOnMouseUp = function() {
525
- e.shouldClose = !1;
526
- }, e.handleOverlayOnMouseDown = function(c) {
527
- !e.props.shouldCloseOnOverlayClick && c.target == e.overlay && c.preventDefault();
528
- }, e.handleContentOnClick = function() {
529
- e.shouldClose = !1;
530
- }, e.handleContentOnMouseDown = function() {
531
- e.shouldClose = !1;
532
- }, e.requestClose = function(c) {
533
- return e.ownerHandlesClose() && e.props.onRequestClose(c);
534
- }, e.ownerHandlesClose = function() {
535
- return e.props.onRequestClose;
536
- }, e.shouldBeClosed = function() {
537
- return !e.state.isOpen && !e.state.beforeClose;
538
- }, e.contentHasFocus = function() {
539
- return document.activeElement === e.content || e.content.contains(document.activeElement);
540
- }, e.buildClassName = function(c, w) {
541
- var M = (typeof w > "u" ? "undefined" : i(w)) === "object" ? w : {
542
- base: U[c],
543
- afterOpen: U[c] + "--after-open",
544
- beforeClose: U[c] + "--before-close"
545
- }, N = M.base;
546
- return e.state.afterOpen && (N = N + " " + M.afterOpen), e.state.beforeClose && (N = N + " " + M.beforeClose), typeof w == "string" && w ? N + " " + w : N;
547
- }, e.attributesFromObject = function(c, w) {
548
- return Object.keys(w).reduce(function(M, N) {
549
- return M[c + "-" + N] = w[N], M;
550
- }, {});
551
- }, e.state = {
552
- afterOpen: !1,
553
- beforeClose: !1
554
- }, e.shouldClose = null, e.moveFromContentToOverlay = null, e;
555
- }
556
- return f(o, [{
557
- key: "componentDidMount",
558
- value: function() {
559
- this.props.isOpen && this.open();
560
- }
561
- }, {
562
- key: "componentDidUpdate",
563
- value: function(e, c) {
564
- process.env.NODE_ENV !== "production" && (e.bodyOpenClassName !== this.props.bodyOpenClassName && console.warn('React-Modal: "bodyOpenClassName" prop has been modified. This may cause unexpected behavior when multiple modals are open.'), e.htmlOpenClassName !== this.props.htmlOpenClassName && console.warn('React-Modal: "htmlOpenClassName" prop has been modified. This may cause unexpected behavior when multiple modals are open.')), this.props.isOpen && !e.isOpen ? this.open() : !this.props.isOpen && e.isOpen && this.close(), this.props.shouldFocusAfterRender && this.state.isOpen && !c.isOpen && this.focusContent();
565
- }
566
- }, {
567
- key: "componentWillUnmount",
568
- value: function() {
569
- this.state.isOpen && this.afterClose(), clearTimeout(this.closeTimer), cancelAnimationFrame(this.openAnimationFrame);
570
- }
571
- }, {
572
- key: "beforeOpen",
573
- value: function() {
574
- var e = this.props, c = e.appElement, w = e.ariaHideApp, M = e.htmlOpenClassName, N = e.bodyOpenClassName, x = e.parentSelector, k = x && x().ownerDocument || document;
575
- N && O.add(k.body, N), M && O.add(k.getElementsByTagName("html")[0], M), w && (d += 1, l.hide(c)), q.default.register(this);
576
- }
577
- // Don't steal focus from inner elements
578
- }, {
579
- key: "render",
580
- value: function() {
581
- var e = this.props, c = e.id, w = e.className, M = e.overlayClassName, N = e.defaultStyles, x = e.children, k = w ? {} : N.content, z = M ? {} : N.overlay;
582
- if (this.shouldBeClosed())
583
- return null;
584
- var ge = {
585
- ref: this.setOverlayRef,
586
- className: this.buildClassName("overlay", M),
587
- style: h({}, z, this.props.style.overlay),
588
- onClick: this.handleOverlayOnClick,
589
- onMouseDown: this.handleOverlayOnMouseDown
590
- }, _e = h({
591
- id: c,
592
- ref: this.setContentRef,
593
- style: h({}, k, this.props.style.content),
594
- className: this.buildClassName("content", w),
595
- tabIndex: "-1",
596
- onKeyDown: this.handleKeyDown,
597
- onMouseDown: this.handleContentOnMouseDown,
598
- onMouseUp: this.handleContentOnMouseUp,
599
- onClick: this.handleContentOnClick,
600
- role: this.props.role,
601
- "aria-label": this.props.contentLabel
602
- }, this.attributesFromObject("aria", h({ modal: !0 }, this.props.aria)), this.attributesFromObject("data", this.props.data || {}), {
603
- "data-testid": this.props.testId
604
- }), Ce = this.props.contentElement(_e, x);
605
- return this.props.overlayElement(ge, Ce);
606
- }
607
- }]), o;
608
- }(v.Component);
609
- C.defaultProps = {
610
- style: {
611
- overlay: {},
612
- content: {}
613
- },
614
- defaultStyles: {}
615
- }, C.propTypes = {
616
- isOpen: t.default.bool.isRequired,
617
- defaultStyles: t.default.shape({
618
- content: t.default.object,
619
- overlay: t.default.object
620
- }),
621
- style: t.default.shape({
622
- content: t.default.object,
623
- overlay: t.default.object
624
- }),
625
- className: t.default.oneOfType([t.default.string, t.default.object]),
626
- overlayClassName: t.default.oneOfType([t.default.string, t.default.object]),
627
- parentSelector: t.default.func,
628
- bodyOpenClassName: t.default.string,
629
- htmlOpenClassName: t.default.string,
630
- ariaHideApp: t.default.bool,
631
- appElement: t.default.oneOfType([t.default.instanceOf(R.default), t.default.instanceOf(S.SafeHTMLCollection), t.default.instanceOf(S.SafeNodeList), t.default.arrayOf(t.default.instanceOf(R.default))]),
632
- onAfterOpen: t.default.func,
633
- onAfterClose: t.default.func,
634
- onRequestClose: t.default.func,
635
- closeTimeoutMS: t.default.number,
636
- shouldFocusAfterRender: t.default.bool,
637
- shouldCloseOnOverlayClick: t.default.bool,
638
- shouldReturnFocusAfterClose: t.default.bool,
639
- preventScroll: t.default.bool,
640
- role: t.default.string,
641
- contentLabel: t.default.string,
642
- aria: t.default.object,
643
- data: t.default.object,
644
- children: t.default.node,
645
- shouldCloseOnEsc: t.default.bool,
646
- overlayRef: t.default.func,
647
- contentRef: t.default.func,
648
- id: t.default.string,
649
- overlayElement: t.default.func,
650
- contentElement: t.default.func,
651
- testId: t.default.string
652
- }, s.default = C, p.exports = s.default;
653
- }(G, G.exports)), G.exports;
654
- }
655
- function ye() {
656
- var p = this.constructor.getDerivedStateFromProps(this.props, this.state);
657
- p != null && this.setState(p);
658
- }
659
- function be(p) {
660
- function s(h) {
661
- var i = this.constructor.getDerivedStateFromProps(p, h);
662
- return i ?? null;
663
- }
664
- this.setState(s.bind(this));
665
- }
666
- function Oe(p, s) {
667
- try {
668
- var h = this.props, i = this.state;
669
- this.props = p, this.state = s, this.__reactInternalSnapshotFlag = !0, this.__reactInternalSnapshot = this.getSnapshotBeforeUpdate(
670
- h,
671
- i
672
- );
673
- } finally {
674
- this.props = h, this.state = i;
675
- }
676
- }
677
- ye.__suppressDeprecationWarning = !0;
678
- be.__suppressDeprecationWarning = !0;
679
- Oe.__suppressDeprecationWarning = !0;
680
- function Le(p) {
681
- var s = p.prototype;
682
- if (!s || !s.isReactComponent)
683
- throw new Error("Can only polyfill class components");
684
- if (typeof p.getDerivedStateFromProps != "function" && typeof s.getSnapshotBeforeUpdate != "function")
685
- return p;
686
- var h = null, i = null, f = null;
687
- if (typeof s.componentWillMount == "function" ? h = "componentWillMount" : typeof s.UNSAFE_componentWillMount == "function" && (h = "UNSAFE_componentWillMount"), typeof s.componentWillReceiveProps == "function" ? i = "componentWillReceiveProps" : typeof s.UNSAFE_componentWillReceiveProps == "function" && (i = "UNSAFE_componentWillReceiveProps"), typeof s.componentWillUpdate == "function" ? f = "componentWillUpdate" : typeof s.UNSAFE_componentWillUpdate == "function" && (f = "UNSAFE_componentWillUpdate"), h !== null || i !== null || f !== null) {
688
- var v = p.displayName || p.name, E = typeof p.getDerivedStateFromProps == "function" ? "getDerivedStateFromProps()" : "getSnapshotBeforeUpdate()";
689
- throw Error(
690
- `Unsafe legacy lifecycles will not be called for components using new component APIs.
691
-
692
- ` + v + " uses " + E + " but also contains the following legacy lifecycles:" + (h !== null ? `
693
- ` + h : "") + (i !== null ? `
694
- ` + i : "") + (f !== null ? `
695
- ` + f : "") + `
696
-
697
- The above lifecycles should be removed. Learn more about this warning here:
698
- https://fb.me/react-async-component-lifecycle-hooks`
699
- );
700
- }
701
- if (typeof p.getDerivedStateFromProps == "function" && (s.componentWillMount = ye, s.componentWillReceiveProps = be), typeof s.getSnapshotBeforeUpdate == "function") {
702
- if (typeof s.componentDidUpdate != "function")
703
- throw new Error(
704
- "Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype"
705
- );
706
- s.componentWillUpdate = Oe;
707
- var t = s.componentDidUpdate;
708
- s.componentDidUpdate = function(m, a, n) {
709
- var u = this.__reactInternalSnapshotFlag ? this.__reactInternalSnapshot : n;
710
- t.call(this, m, a, u);
711
- };
712
- }
713
- return p;
714
- }
715
- const Fe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
716
- __proto__: null,
717
- polyfill: Le
718
- }, Symbol.toStringTag, { value: "Module" })), xe = /* @__PURE__ */ Ee(Fe);
719
- var fe;
720
- function qe() {
721
- if (fe) return W;
722
- fe = 1, Object.defineProperty(W, "__esModule", {
723
- value: !0
724
- }), W.bodyOpenClassName = W.portalClassName = void 0;
725
- var p = Object.assign || function(b) {
726
- for (var d = 1; d < arguments.length; d++) {
727
- var C = arguments[d];
728
- for (var r in C)
729
- Object.prototype.hasOwnProperty.call(C, r) && (b[r] = C[r]);
730
- }
731
- return b;
732
- }, s = /* @__PURE__ */ function() {
733
- function b(d, C) {
734
- for (var r = 0; r < C.length; r++) {
735
- var o = C[r];
736
- o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(d, o.key, o);
737
- }
738
- }
739
- return function(d, C, r) {
740
- return C && b(d.prototype, C), r && b(d, r), d;
741
- };
742
- }(), h = pe, i = S(h), f = Me, v = S(f), E = /* @__PURE__ */ de(), t = S(E), _ = Pe(), m = S(_), a = me(), n = O(a), u = Z(), l = S(u), y = xe;
743
- function O(b) {
744
- if (b && b.__esModule)
745
- return b;
746
- var d = {};
747
- if (b != null)
748
- for (var C in b)
749
- Object.prototype.hasOwnProperty.call(b, C) && (d[C] = b[C]);
750
- return d.default = b, d;
751
- }
752
- function S(b) {
753
- return b && b.__esModule ? b : { default: b };
754
- }
755
- function R(b, d) {
756
- if (!(b instanceof d))
757
- throw new TypeError("Cannot call a class as a function");
758
- }
759
- function A(b, d) {
760
- if (!b)
761
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
762
- return d && (typeof d == "object" || typeof d == "function") ? d : b;
763
- }
764
- function q(b, d) {
765
- if (typeof d != "function" && d !== null)
766
- throw new TypeError("Super expression must either be null or a function, not " + typeof d);
767
- b.prototype = Object.create(d && d.prototype, { constructor: { value: b, enumerable: !1, writable: !0, configurable: !0 } }), d && (Object.setPrototypeOf ? Object.setPrototypeOf(b, d) : b.__proto__ = d);
768
- }
769
- var L = W.portalClassName = "ReactModalPortal", B = W.bodyOpenClassName = "ReactModal__Body--open", F = u.canUseDOM && v.default.createPortal !== void 0, K = function(d) {
770
- return document.createElement(d);
771
- }, $ = function() {
772
- return F ? v.default.createPortal : v.default.unstable_renderSubtreeIntoContainer;
773
- };
774
- function U(b) {
775
- return b();
776
- }
777
- var H = function(b) {
778
- q(d, b);
779
- function d() {
780
- var C, r, o, g;
781
- R(this, d);
782
- for (var e = arguments.length, c = Array(e), w = 0; w < e; w++)
783
- c[w] = arguments[w];
784
- return g = (r = (o = A(this, (C = d.__proto__ || Object.getPrototypeOf(d)).call.apply(C, [this].concat(c))), o), o.removePortal = function() {
785
- !F && v.default.unmountComponentAtNode(o.node);
786
- var M = U(o.props.parentSelector);
787
- M && M.contains(o.node) ? M.removeChild(o.node) : console.warn('React-Modal: "parentSelector" prop did not returned any DOM element. Make sure that the parent element is unmounted to avoid any memory leaks.');
788
- }, o.portalRef = function(M) {
789
- o.portal = M;
790
- }, o.renderPortal = function(M) {
791
- var N = $(), x = N(o, i.default.createElement(m.default, p({ defaultStyles: d.defaultStyles }, M)), o.node);
792
- o.portalRef(x);
793
- }, r), A(o, g);
794
- }
795
- return s(d, [{
796
- key: "componentDidMount",
797
- value: function() {
798
- if (u.canUseDOM) {
799
- F || (this.node = K("div")), this.node.className = this.props.portalClassName;
800
- var r = U(this.props.parentSelector);
801
- r.appendChild(this.node), !F && this.renderPortal(this.props);
802
- }
803
- }
804
- }, {
805
- key: "getSnapshotBeforeUpdate",
806
- value: function(r) {
807
- var o = U(r.parentSelector), g = U(this.props.parentSelector);
808
- return { prevParent: o, nextParent: g };
809
- }
810
- }, {
811
- key: "componentDidUpdate",
812
- value: function(r, o, g) {
813
- if (u.canUseDOM) {
814
- var e = this.props, c = e.isOpen, w = e.portalClassName;
815
- r.portalClassName !== w && (this.node.className = w);
816
- var M = g.prevParent, N = g.nextParent;
817
- N !== M && (M.removeChild(this.node), N.appendChild(this.node)), !(!r.isOpen && !c) && !F && this.renderPortal(this.props);
818
- }
819
- }
820
- }, {
821
- key: "componentWillUnmount",
822
- value: function() {
823
- if (!(!u.canUseDOM || !this.node || !this.portal)) {
824
- var r = this.portal.state, o = Date.now(), g = r.isOpen && this.props.closeTimeoutMS && (r.closesAt || o + this.props.closeTimeoutMS);
825
- g ? (r.beforeClose || this.portal.closeWithTimeout(), setTimeout(this.removePortal, g - o)) : this.removePortal();
826
- }
827
- }
828
- }, {
829
- key: "render",
830
- value: function() {
831
- if (!u.canUseDOM || !F)
832
- return null;
833
- !this.node && F && (this.node = K("div"));
834
- var r = $();
835
- return r(i.default.createElement(m.default, p({
836
- ref: this.portalRef,
837
- defaultStyles: d.defaultStyles
838
- }, this.props)), this.node);
839
- }
840
- }], [{
841
- key: "setAppElement",
842
- value: function(r) {
843
- n.setElement(r);
844
- }
845
- /* eslint-disable react/no-unused-prop-types */
846
- /* eslint-enable react/no-unused-prop-types */
847
- }]), d;
848
- }(h.Component);
849
- return H.propTypes = {
850
- isOpen: t.default.bool.isRequired,
851
- style: t.default.shape({
852
- content: t.default.object,
853
- overlay: t.default.object
854
- }),
855
- portalClassName: t.default.string,
856
- bodyOpenClassName: t.default.string,
857
- htmlOpenClassName: t.default.string,
858
- className: t.default.oneOfType([t.default.string, t.default.shape({
859
- base: t.default.string.isRequired,
860
- afterOpen: t.default.string.isRequired,
861
- beforeClose: t.default.string.isRequired
862
- })]),
863
- overlayClassName: t.default.oneOfType([t.default.string, t.default.shape({
864
- base: t.default.string.isRequired,
865
- afterOpen: t.default.string.isRequired,
866
- beforeClose: t.default.string.isRequired
867
- })]),
868
- appElement: t.default.oneOfType([t.default.instanceOf(l.default), t.default.instanceOf(u.SafeHTMLCollection), t.default.instanceOf(u.SafeNodeList), t.default.arrayOf(t.default.instanceOf(l.default))]),
869
- onAfterOpen: t.default.func,
870
- onRequestClose: t.default.func,
871
- closeTimeoutMS: t.default.number,
872
- ariaHideApp: t.default.bool,
873
- shouldFocusAfterRender: t.default.bool,
874
- shouldCloseOnOverlayClick: t.default.bool,
875
- shouldReturnFocusAfterClose: t.default.bool,
876
- preventScroll: t.default.bool,
877
- parentSelector: t.default.func,
878
- aria: t.default.object,
879
- data: t.default.object,
880
- role: t.default.string,
881
- contentLabel: t.default.string,
882
- shouldCloseOnEsc: t.default.bool,
883
- overlayRef: t.default.func,
884
- contentRef: t.default.func,
885
- id: t.default.string,
886
- overlayElement: t.default.func,
887
- contentElement: t.default.func
888
- }, H.defaultProps = {
889
- isOpen: !1,
890
- portalClassName: L,
891
- bodyOpenClassName: B,
892
- role: "dialog",
893
- ariaHideApp: !0,
894
- closeTimeoutMS: 0,
895
- shouldFocusAfterRender: !0,
896
- shouldCloseOnEsc: !0,
897
- shouldCloseOnOverlayClick: !0,
898
- shouldReturnFocusAfterClose: !0,
899
- preventScroll: !1,
900
- parentSelector: function() {
901
- return document.body;
902
- },
903
- overlayElement: function(d, C) {
904
- return i.default.createElement(
905
- "div",
906
- d,
907
- C
908
- );
909
- },
910
- contentElement: function(d, C) {
911
- return i.default.createElement(
912
- "div",
913
- d,
914
- C
915
- );
916
- }
917
- }, H.defaultStyles = {
918
- overlay: {
919
- position: "fixed",
920
- top: 0,
921
- left: 0,
922
- right: 0,
923
- bottom: 0,
924
- backgroundColor: "rgba(255, 255, 255, 0.75)"
925
- },
926
- content: {
927
- position: "absolute",
928
- top: "40px",
929
- left: "40px",
930
- right: "40px",
931
- bottom: "40px",
932
- border: "1px solid #ccc",
933
- background: "#fff",
934
- overflow: "auto",
935
- WebkitOverflowScrolling: "touch",
936
- borderRadius: "4px",
937
- outline: "none",
938
- padding: "20px"
939
- }
940
- }, (0, y.polyfill)(H), process.env.NODE_ENV !== "production" && (H.setCreateHTMLElement = function(b) {
941
- return K = b;
942
- }), W.default = H, W;
943
- }
944
- var ce;
945
- function Ue() {
946
- return ce || (ce = 1, function(p, s) {
947
- Object.defineProperty(s, "__esModule", {
948
- value: !0
949
- });
950
- var h = qe(), i = f(h);
951
- function f(v) {
952
- return v && v.__esModule ? v : { default: v };
953
- }
954
- s.default = i.default, p.exports = s.default;
955
- }(Y, Y.exports)), Y.exports;
956
- }
957
- var He = Ue();
958
- const Ve = /* @__PURE__ */ Se(He);
959
- export {
960
- Ve as M
961
- };