@hortiview/shared-components 2.18.0 → 2.18.1

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 (219) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/{AlertBanner-aW6joVUm.js → AlertBanner-BFzaGOer.js} +3 -3
  3. package/dist/{GenericCard-IWX-Bmb_.js → GenericCard-grpa3KJR.js} +3 -3
  4. package/dist/{ListAreaService-Fsm3-gDM.js → ListAreaService-DfxJ7jFs.js} +5 -5
  5. package/dist/{_Map-D8db_GOu.js → _Map-BYxTn6ob.js} +1 -1
  6. package/dist/{_commonjsHelpers-B4e78b8K.js → _commonjsHelpers-ByX85dGu.js} +18 -13
  7. package/dist/animationframe-CqXArbwZ.js +32 -0
  8. package/dist/component-By6nyiBU.js +70 -0
  9. package/dist/{component-DEJuY56h.js → component-DYpB_4EP.js} +1 -111
  10. package/dist/components/AlertBanner/AlertBanner.js +4 -4
  11. package/dist/components/AlertBanner/LinkBanner.js +3 -3
  12. package/dist/components/AllowedButton/AllowedButton.js +1 -1
  13. package/dist/components/AllowedIconButton/AllowedIconButton.js +1 -1
  14. package/dist/components/BaseView/BaseView.js +14 -14
  15. package/dist/components/BasicHeading/BasicHeading.js +5 -5
  16. package/dist/components/BlockView/BlockView.js +2 -2
  17. package/dist/components/ButtonCard/ButtonCard.js +6 -6
  18. package/dist/components/ChipCard/ChipCard.js +13 -255
  19. package/dist/components/ConfirmationModal/ConfirmationModal.js +8 -8
  20. package/dist/components/ContextMenu/ContextMenu.js +12 -12
  21. package/dist/components/DeleteModal/DeleteModal.js +25 -25
  22. package/dist/components/DetailContentWrapper/DetailContentWrapper.js +1 -1
  23. package/dist/components/Disclaimer/Disclaimer.js +3 -3
  24. package/dist/components/EmptyView/EmptyView.js +3 -3
  25. package/dist/components/Filter/Filter.js +15 -15
  26. package/dist/components/FormComponents/FormCheckBox/FormCheckBox.js +1 -1
  27. package/dist/components/FormComponents/FormDatePicker/FormDatePicker.js +7 -22
  28. package/dist/components/FormComponents/FormNumber/CustomTextField.js +3 -3
  29. package/dist/components/FormComponents/FormNumber/FormNumber.js +1 -1
  30. package/dist/components/FormComponents/FormRadio/FormRadio.js +1 -1
  31. package/dist/components/FormComponents/FormSelect/FormSelect.js +4 -4
  32. package/dist/components/FormComponents/FormSelect/SelectTooltipText.js +2 -2
  33. package/dist/components/FormComponents/FormSlider/FormSlider.js +10 -98
  34. package/dist/components/FormComponents/FormText/FormText.js +2 -2
  35. package/dist/components/FormComponents/FormToggle/FormToggle.js +4 -4
  36. package/dist/components/FormattedNumberDisplay/FormattedNumberDisplay.js +1 -1
  37. package/dist/components/GenericTable/GenericTable.js +36 -172
  38. package/dist/components/GenericTable/Mobile/GenericCard.js +4 -4
  39. package/dist/components/GenericTable/Mobile/GenericCardList.js +4 -4
  40. package/dist/components/HashTabView/HashTabView.js +10 -428
  41. package/dist/components/HeaderFilter/HeaderFilter.js +1 -1
  42. package/dist/components/Iconify/Iconify.js +2 -2
  43. package/dist/components/InfoCard/InfoCard.js +4 -4
  44. package/dist/components/InfoGroup/InfoGroup.js +4 -4
  45. package/dist/components/ListArea/ListArea.js +6 -6
  46. package/dist/components/ListArea/ListAreaService.js +6 -6
  47. package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.js +13 -5
  48. package/dist/components/LoadingSpinner/Default/LoadingSpinner.js +8 -74
  49. package/dist/components/Modal/Modal.js +12 -122
  50. package/dist/components/ModulePadding/ModulePadding.js +11 -11
  51. package/dist/components/OfflineView/OfflineView.js +45 -7
  52. package/dist/components/OnboardingBanner/OnboardingBanner.js +8 -8
  53. package/dist/components/OverflowTooltip/OverflowTooltip.js +2 -2
  54. package/dist/components/SearchBar/SearchBar.js +2 -2
  55. package/dist/components/Select/Select.js +2 -2
  56. package/dist/components/Stepper/Stepper.js +1 -1
  57. package/dist/components/Stepper/components/StepperButton.js +1 -1
  58. package/dist/components/Stepper/components/StepperHeader.js +3 -3
  59. package/dist/components/Stepper/components/StepperItem.js +2 -2
  60. package/dist/{correct-is-regexp-logic-Y0ToWEjF.js → correct-is-regexp-logic-BJ-OWRrn.js} +1 -1
  61. package/dist/{defineProperty-BTsGZ3c1.js → defineProperty-B7N9EBBI.js} +3 -3
  62. package/dist/{es.string.iterator-UszlTFwY.js → es.string.iterator-DBx2A42F.js} +2 -2
  63. package/dist/{find-CHg-_ooq.js → find-eU9ab_u7.js} +4 -4
  64. package/dist/{get-DxjPG00Z.js → get-BLvvbtML.js} +3 -3
  65. package/dist/get-CBFiuc3f.js +7 -0
  66. package/dist/hooks/useBreakpoints.js +37 -3
  67. package/dist/hooks/useHelperText.js +1 -1
  68. package/dist/{identity-BVIVr9qu.js → identity-B0bbReND.js} +4 -4
  69. package/dist/{index-BcGujPyk.js → index-Df2FYN-K.js} +5 -26
  70. package/dist/{index.es-B8p8KCdj.js → index.es-B19PQgzU.js} +4 -4
  71. package/dist/{index.es-BYcQTTL8.js → index.es-B9BUXRQn.js} +9 -339
  72. package/dist/{index.es-BPv5dCFQ.js → index.es-BOG3_7IM.js} +12 -12
  73. package/dist/{index.es-DGoBge9W.js → index.es-BOvO8moE.js} +4 -4
  74. package/dist/{index.es-BoUnovl_.js → index.es-BcnmoCEg.js} +8 -74
  75. package/dist/{index.es-C32E1Lcb.js → index.es-BwafUoK3.js} +82 -147
  76. package/dist/{index.es-B1h6DPYp.js → index.es-C27R5Xae.js} +2 -2
  77. package/dist/{index.es-nwjKmW7-.js → index.es-C2IOpX7R.js} +34 -111
  78. package/dist/{index.es-Da7ok-B-.js → index.es-C6I3L4U4.js} +2 -2
  79. package/dist/{index.es-BHvm4m-B.js → index.es-Cg57snrN.js} +19 -261
  80. package/dist/{index.es-DUTChZks.js → index.es-Ci3O23C_.js} +6 -72
  81. package/dist/{index.es-t87yNd9Y.js → index.es-CkB4776y.js} +6 -72
  82. package/dist/{index.es-CeQB6igi.js → index.es-Cr1PSTyq.js} +3 -3
  83. package/dist/{index.es--C-VLspF.js → index.es-D1iB_QlE.js} +8 -140
  84. package/dist/{index.es-Dgxrk6xW.js → index.es-DEBGoIKX.js} +2 -2
  85. package/dist/{index.es-CWyjqoEE.js → index.es-DHnCVuQ8.js} +7 -73
  86. package/dist/{index.es-Bo-d_yTV.js → index.es-DHoIQ8lu.js} +2 -2
  87. package/dist/{index.es-SjZ_-d7U.js → index.es-DUrjyxNI.js} +5 -5
  88. package/dist/{index.es-Cfv794DG.js → index.es-DdeCB7LW.js} +1 -1
  89. package/dist/{index.es-BanVdXEd.js → index.es-DgncYOqO.js} +2 -2
  90. package/dist/{index.es-DOnQ26kT.js → index.es-DhlgTSuU.js} +3 -3
  91. package/dist/{index.es-oxil0uFe.js → index.es-Z0aF-7Cn.js} +3 -6
  92. package/dist/{index.es-DmRhbgqK.js → index.es-l_3PNohs.js} +2 -68
  93. package/dist/{isArray-B457bpaW.js → isArray-Ce1Q96lU.js} +1 -1
  94. package/dist/isArray-olhCpv2e.js +7 -0
  95. package/dist/{isEmpty-BnfHn4bl.js → isEmpty-l2xQKl4x.js} +3 -3
  96. package/dist/{isString-DVA49FEo.js → isString-BNdV0Jpg.js} +3 -3
  97. package/dist/{isTypedArray-DziahYkI.js → isTypedArray-D39qzPYE.js} +2 -2
  98. package/dist/{keyboard-DiKJoabs.js → keyboard-DbG3oyPU.js} +3 -25
  99. package/dist/main.js +15 -15
  100. package/dist/{map-BprzXv4m.js → map-ZSVweMI1.js} +5 -5
  101. package/dist/{omit-CYY_mIYv.js → omit-BWQrFyQ-.js} +7 -7
  102. package/dist/{orderBy-DLBJlgdL.js → orderBy-Ce85KqD6.js} +7 -7
  103. package/dist/{parse-int-D-3oah_F.js → parse-int-CGpIXMGa.js} +2 -2
  104. package/dist/{react-number-format.es-DzkMiF8j.js → react-number-format.es-pczkQ4lQ.js} +0 -1
  105. package/dist/{react-tooltip.min-CVsI--2Y.js → react-tooltip.min-Dkz5ltCC.js} +1 -12
  106. package/dist/{react.esm-Bm0cAgpZ.js → react.esm-DF7i80eN.js} +2471 -2582
  107. package/dist/services/UtilService.js +9 -9
  108. package/dist/{slicedToArray-ByMQIs5x.js → slicedToArray-DC6VAZtW.js} +4 -4
  109. package/dist/test-utils.js +1 -1
  110. package/dist/{toString-B7FIT8FE.js → toString-D5bEU-DN.js} +1 -1
  111. package/dist/{uniqueId-BNVTeImh.js → uniqueId-CJo-XRQb.js} +2 -2
  112. package/dist/{util-DA21pZXj.js → util-CBo-ipCE.js} +0 -22
  113. package/package.json +2 -2
  114. package/dist/BigLoadingSpinner-DGj9_Z5J.js +0 -16
  115. package/dist/OfflineView-CIwV08EQ.js +0 -48
  116. package/dist/animationframe-BVKDmEXe.js +0 -54
  117. package/dist/component-Bz_dtX1r.js +0 -114
  118. package/dist/components/AlertBanner/AlertBanner.test.d.ts +0 -1
  119. package/dist/components/AlertBanner/AlertBanner.test.js +0 -34
  120. package/dist/components/AlertBanner/LinkBanner.test.d.ts +0 -1
  121. package/dist/components/AlertBanner/LinkBanner.test.js +0 -17
  122. package/dist/components/Allowed/Allowed.test.d.ts +0 -1
  123. package/dist/components/Allowed/Allowed.test.js +0 -49
  124. package/dist/components/AllowedButton/AllowedButton.test.d.ts +0 -1
  125. package/dist/components/AllowedButton/AllowedButton.test.js +0 -126
  126. package/dist/components/AllowedIconButton/AllowedIconButton.test.d.ts +0 -1
  127. package/dist/components/AllowedIconButton/AllowedIconButton.test.js +0 -121
  128. package/dist/components/BaseView/BaseView.test.d.ts +0 -1
  129. package/dist/components/BaseView/BaseView.test.js +0 -180
  130. package/dist/components/BasicHeading/BasicHeading.test.d.ts +0 -1
  131. package/dist/components/BasicHeading/BasicHeading.test.js +0 -36
  132. package/dist/components/BlockView/BlockView.test.d.ts +0 -1
  133. package/dist/components/BlockView/BlockView.test.js +0 -47
  134. package/dist/components/ButtonCard/ButtonCard.test.d.ts +0 -1
  135. package/dist/components/ButtonCard/ButtonCard.test.js +0 -92
  136. package/dist/components/ChipCard/ChipCard.test.d.ts +0 -1
  137. package/dist/components/ChipCard/ChipCard.test.js +0 -25
  138. package/dist/components/ConfirmationModal/ConfirmationModal.test.d.ts +0 -1
  139. package/dist/components/ConfirmationModal/ConfirmationModal.test.js +0 -221
  140. package/dist/components/ContextMenu/ContextMenu.test.d.ts +0 -1
  141. package/dist/components/ContextMenu/ContextMenu.test.js +0 -96
  142. package/dist/components/DeleteModal/DeleteModal.test.d.ts +0 -1
  143. package/dist/components/DeleteModal/DeleteModal.test.js +0 -132
  144. package/dist/components/Disclaimer/Disclaimer.test.d.ts +0 -1
  145. package/dist/components/Disclaimer/Disclaimer.test.js +0 -13
  146. package/dist/components/EmptyView/EmptyView.test.d.ts +0 -1
  147. package/dist/components/EmptyView/EmptyView.test.js +0 -50
  148. package/dist/components/Filter/Filter.test.d.ts +0 -1
  149. package/dist/components/Filter/Filter.test.js +0 -166
  150. package/dist/components/FormComponents/FormCheckBox/FormCheckBox.test.d.ts +0 -1
  151. package/dist/components/FormComponents/FormCheckBox/FormCheckBox.test.js +0 -56
  152. package/dist/components/FormComponents/FormDatePicker/FormDatePicker.test.d.ts +0 -1
  153. package/dist/components/FormComponents/FormDatePicker/FormDatePicker.test.js +0 -56
  154. package/dist/components/FormComponents/FormNumber/FormNumber.test.d.ts +0 -1
  155. package/dist/components/FormComponents/FormNumber/FormNumber.test.js +0 -51
  156. package/dist/components/FormComponents/FormRadio/FormRadio.test.d.ts +0 -1
  157. package/dist/components/FormComponents/FormRadio/FormRadio.test.js +0 -73
  158. package/dist/components/FormComponents/FormSelect/FormSelect.test.d.ts +0 -1
  159. package/dist/components/FormComponents/FormSelect/FormSelect.test.js +0 -226
  160. package/dist/components/FormComponents/FormSlider/FormSlider.test.d.ts +0 -1
  161. package/dist/components/FormComponents/FormSlider/FormSlider.test.js +0 -49
  162. package/dist/components/FormComponents/FormText/FormText.test.d.ts +0 -1
  163. package/dist/components/FormComponents/FormText/FormText.test.js +0 -113
  164. package/dist/components/FormComponents/FormToggle/FormToggle.test.d.ts +0 -1
  165. package/dist/components/FormComponents/FormToggle/FormToggle.test.js +0 -54
  166. package/dist/components/GenericTable/GenericTable.test.d.ts +0 -1
  167. package/dist/components/GenericTable/GenericTable.test.js +0 -115
  168. package/dist/components/GenericTable/Mobile/GenericCard.test.d.ts +0 -1
  169. package/dist/components/GenericTable/Mobile/GenericCard.test.js +0 -76
  170. package/dist/components/GenericTable/Mobile/GenericCardList.test.d.ts +0 -1
  171. package/dist/components/GenericTable/Mobile/GenericCardList.test.js +0 -75
  172. package/dist/components/HashTabView/HashTabView.test.d.ts +0 -1
  173. package/dist/components/HashTabView/HashTabView.test.js +0 -31
  174. package/dist/components/HeaderFilter/HeaderFilter.test.d.ts +0 -1
  175. package/dist/components/HeaderFilter/HeaderFilter.test.js +0 -46
  176. package/dist/components/Iconify/Iconify.test.d.ts +0 -1
  177. package/dist/components/Iconify/Iconify.test.js +0 -28
  178. package/dist/components/InfoCard/InfoCard.test.d.ts +0 -1
  179. package/dist/components/InfoCard/InfoCard.test.js +0 -48
  180. package/dist/components/InfoGroup/InfoGroup.test.d.ts +0 -1
  181. package/dist/components/InfoGroup/InfoGroup.test.js +0 -40
  182. package/dist/components/ListArea/ListArea.test.d.ts +0 -1
  183. package/dist/components/ListArea/ListArea.test.js +0 -110
  184. package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.test.d.ts +0 -1
  185. package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.test.js +0 -15
  186. package/dist/components/LoadingSpinner/Default/LoadingSpinner.test.d.ts +0 -1
  187. package/dist/components/LoadingSpinner/Default/LoadingSpinner.test.js +0 -20
  188. package/dist/components/ModulePadding/ModulePadding.test.d.ts +0 -1
  189. package/dist/components/ModulePadding/ModulePadding.test.js +0 -22
  190. package/dist/components/OfflineView/OfflineView.test.d.ts +0 -1
  191. package/dist/components/OfflineView/OfflineView.test.js +0 -24
  192. package/dist/components/OnboardingBanner/OnboardingBanner.test.d.ts +0 -1
  193. package/dist/components/OnboardingBanner/OnboardingBanner.test.js +0 -72
  194. package/dist/components/OverflowTooltip/OverflowTooltip.test.d.ts +0 -1
  195. package/dist/components/OverflowTooltip/OverflowTooltip.test.js +0 -37
  196. package/dist/components/PermissionChecks/PermissionService.test.d.ts +0 -1
  197. package/dist/components/PermissionChecks/PermissionService.test.js +0 -91
  198. package/dist/components/SafeForm/SafeForm.test.d.ts +0 -1
  199. package/dist/components/SafeForm/SafeForm.test.js +0 -91
  200. package/dist/components/Scrollbar/scrollbar.test.d.ts +0 -1
  201. package/dist/components/Scrollbar/scrollbar.test.js +0 -15
  202. package/dist/components/SearchBar/SearchBar.test.d.ts +0 -1
  203. package/dist/components/SearchBar/SearchBar.test.js +0 -23
  204. package/dist/components/Select/Select.test.d.ts +0 -1
  205. package/dist/components/Select/Select.test.js +0 -28
  206. package/dist/components/Stepper/Stepper.test.d.ts +0 -1
  207. package/dist/components/Stepper/Stepper.test.js +0 -342
  208. package/dist/components/VerticalDivider/VerticalDivider.test.d.ts +0 -1
  209. package/dist/components/VerticalDivider/VerticalDivider.test.js +0 -15
  210. package/dist/get-D8IXqiys.js +0 -7
  211. package/dist/hooks/useBreakpoints.test.d.ts +0 -1
  212. package/dist/hooks/useBreakpoints.test.js +0 -11
  213. package/dist/index-BLPBqbdx.js +0 -11025
  214. package/dist/isArray-BjSPDQ4v.js +0 -7
  215. package/dist/magic-string.es-uPKorP4O.js +0 -663
  216. package/dist/services/services.test.d.ts +0 -1
  217. package/dist/services/services.test.js +0 -106
  218. package/dist/useBreakpoints-MzTZ0tCT.js +0 -45
  219. package/dist/vi.bdSIJ99Y-B308Q-4w.js +0 -11963
@@ -1,7 +0,0 @@
1
- import { g as r } from "./_commonjsHelpers-B4e78b8K.js";
2
- import { r as o } from "./isArray-B457bpaW.js";
3
- var s = o();
4
- const i = /* @__PURE__ */ r(s);
5
- export {
6
- i
7
- };
@@ -1,663 +0,0 @@
1
- var x = 44, E = 59, m = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", S = new Uint8Array(64), k = new Uint8Array(128);
2
- for (let u = 0; u < m.length; u++) {
3
- const t = m.charCodeAt(u);
4
- S[u] = t, k[t] = u;
5
- }
6
- function c(u, t, e) {
7
- let i = t - e;
8
- i = i < 0 ? -i << 1 | 1 : i << 1;
9
- do {
10
- let n = i & 31;
11
- i >>>= 5, i > 0 && (n |= 32), u.write(S[n]);
12
- } while (i > 0);
13
- return t;
14
- }
15
- var b = 1024 * 16, C = typeof TextDecoder < "u" ? /* @__PURE__ */ new TextDecoder() : typeof Buffer < "u" ? {
16
- decode(u) {
17
- return Buffer.from(u.buffer, u.byteOffset, u.byteLength).toString();
18
- }
19
- } : {
20
- decode(u) {
21
- let t = "";
22
- for (let e = 0; e < u.length; e++)
23
- t += String.fromCharCode(u[e]);
24
- return t;
25
- }
26
- }, L = class {
27
- constructor() {
28
- this.pos = 0, this.out = "", this.buffer = new Uint8Array(b);
29
- }
30
- write(u) {
31
- const { buffer: t } = this;
32
- t[this.pos++] = u, this.pos === b && (this.out += C.decode(t), this.pos = 0);
33
- }
34
- flush() {
35
- const { buffer: u, out: t, pos: e } = this;
36
- return e > 0 ? t + C.decode(u.subarray(0, e)) : t;
37
- }
38
- };
39
- function R(u) {
40
- const t = new L();
41
- let e = 0, i = 0, n = 0, r = 0;
42
- for (let s = 0; s < u.length; s++) {
43
- const h = u[s];
44
- if (s > 0 && t.write(E), h.length === 0) continue;
45
- let o = 0;
46
- for (let l = 0; l < h.length; l++) {
47
- const a = h[l];
48
- l > 0 && t.write(x), o = c(t, a[0], o), a.length !== 1 && (e = c(t, a[1], e), i = c(t, a[2], i), n = c(t, a[3], n), a.length !== 4 && (r = c(t, a[4], r)));
49
- }
50
- }
51
- return t.flush();
52
- }
53
- class p {
54
- constructor(t) {
55
- this.bits = t instanceof p ? t.bits.slice() : [];
56
- }
57
- add(t) {
58
- this.bits[t >> 5] |= 1 << (t & 31);
59
- }
60
- has(t) {
61
- return !!(this.bits[t >> 5] & 1 << (t & 31));
62
- }
63
- }
64
- class g {
65
- constructor(t, e, i) {
66
- this.start = t, this.end = e, this.original = i, this.intro = "", this.outro = "", this.content = i, this.storeName = !1, this.edited = !1, this.previous = null, this.next = null;
67
- }
68
- appendLeft(t) {
69
- this.outro += t;
70
- }
71
- appendRight(t) {
72
- this.intro = this.intro + t;
73
- }
74
- clone() {
75
- const t = new g(this.start, this.end, this.original);
76
- return t.intro = this.intro, t.outro = this.outro, t.content = this.content, t.storeName = this.storeName, t.edited = this.edited, t;
77
- }
78
- contains(t) {
79
- return this.start < t && t < this.end;
80
- }
81
- eachNext(t) {
82
- let e = this;
83
- for (; e; )
84
- t(e), e = e.next;
85
- }
86
- eachPrevious(t) {
87
- let e = this;
88
- for (; e; )
89
- t(e), e = e.previous;
90
- }
91
- edit(t, e, i) {
92
- return this.content = t, i || (this.intro = "", this.outro = ""), this.storeName = e, this.edited = !0, this;
93
- }
94
- prependLeft(t) {
95
- this.outro = t + this.outro;
96
- }
97
- prependRight(t) {
98
- this.intro = t + this.intro;
99
- }
100
- reset() {
101
- this.intro = "", this.outro = "", this.edited && (this.content = this.original, this.storeName = !1, this.edited = !1);
102
- }
103
- split(t) {
104
- const e = t - this.start, i = this.original.slice(0, e), n = this.original.slice(e);
105
- this.original = i;
106
- const r = new g(t, this.end, n);
107
- return r.outro = this.outro, this.outro = "", this.end = t, this.edited ? (r.edit("", !1), this.content = "") : this.content = i, r.next = this.next, r.next && (r.next.previous = r), r.previous = this, this.next = r, r;
108
- }
109
- toString() {
110
- return this.intro + this.content + this.outro;
111
- }
112
- trimEnd(t) {
113
- if (this.outro = this.outro.replace(t, ""), this.outro.length) return !0;
114
- const e = this.content.replace(t, "");
115
- if (e.length)
116
- return e !== this.content && (this.split(this.start + e.length).edit("", void 0, !0), this.edited && this.edit(e, this.storeName, !0)), !0;
117
- if (this.edit("", void 0, !0), this.intro = this.intro.replace(t, ""), this.intro.length) return !0;
118
- }
119
- trimStart(t) {
120
- if (this.intro = this.intro.replace(t, ""), this.intro.length) return !0;
121
- const e = this.content.replace(t, "");
122
- if (e.length) {
123
- if (e !== this.content) {
124
- const i = this.split(this.end - e.length);
125
- this.edited && i.edit(e, this.storeName, !0), this.edit("", void 0, !0);
126
- }
127
- return !0;
128
- } else if (this.edit("", void 0, !0), this.outro = this.outro.replace(t, ""), this.outro.length) return !0;
129
- }
130
- }
131
- function _() {
132
- return typeof globalThis < "u" && typeof globalThis.btoa == "function" ? (u) => globalThis.btoa(unescape(encodeURIComponent(u))) : typeof Buffer == "function" ? (u) => Buffer.from(u, "utf-8").toString("base64") : () => {
133
- throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.");
134
- };
135
- }
136
- const O = /* @__PURE__ */ _();
137
- class N {
138
- constructor(t) {
139
- this.version = 3, this.file = t.file, this.sources = t.sources, this.sourcesContent = t.sourcesContent, this.names = t.names, this.mappings = R(t.mappings), typeof t.x_google_ignoreList < "u" && (this.x_google_ignoreList = t.x_google_ignoreList), typeof t.debugId < "u" && (this.debugId = t.debugId);
140
- }
141
- toString() {
142
- return JSON.stringify(this);
143
- }
144
- toUrl() {
145
- return "data:application/json;charset=utf-8;base64," + O(this.toString());
146
- }
147
- }
148
- function I(u) {
149
- const t = u.split(`
150
- `), e = t.filter((r) => /^\t+/.test(r)), i = t.filter((r) => /^ {2,}/.test(r));
151
- if (e.length === 0 && i.length === 0)
152
- return null;
153
- if (e.length >= i.length)
154
- return " ";
155
- const n = i.reduce((r, s) => {
156
- const h = /^ +/.exec(s)[0].length;
157
- return Math.min(h, r);
158
- }, 1 / 0);
159
- return new Array(n + 1).join(" ");
160
- }
161
- function A(u, t) {
162
- const e = u.split(/[/\\]/), i = t.split(/[/\\]/);
163
- for (e.pop(); e[0] === i[0]; )
164
- e.shift(), i.shift();
165
- if (e.length) {
166
- let n = e.length;
167
- for (; n--; ) e[n] = "..";
168
- }
169
- return e.concat(i).join("/");
170
- }
171
- const T = Object.prototype.toString;
172
- function j(u) {
173
- return T.call(u) === "[object Object]";
174
- }
175
- function y(u) {
176
- const t = u.split(`
177
- `), e = [];
178
- for (let i = 0, n = 0; i < t.length; i++)
179
- e.push(n), n += t[i].length + 1;
180
- return function(n) {
181
- let r = 0, s = e.length;
182
- for (; r < s; ) {
183
- const l = r + s >> 1;
184
- n < e[l] ? s = l : r = l + 1;
185
- }
186
- const h = r - 1, o = n - e[h];
187
- return { line: h, column: o };
188
- };
189
- }
190
- const $ = /\w/;
191
- class U {
192
- constructor(t) {
193
- this.hires = t, this.generatedCodeLine = 0, this.generatedCodeColumn = 0, this.raw = [], this.rawSegments = this.raw[this.generatedCodeLine] = [], this.pending = null;
194
- }
195
- addEdit(t, e, i, n) {
196
- if (e.length) {
197
- const r = e.length - 1;
198
- let s = e.indexOf(`
199
- `, 0), h = -1;
200
- for (; s >= 0 && r > s; ) {
201
- const l = [this.generatedCodeColumn, t, i.line, i.column];
202
- n >= 0 && l.push(n), this.rawSegments.push(l), this.generatedCodeLine += 1, this.raw[this.generatedCodeLine] = this.rawSegments = [], this.generatedCodeColumn = 0, h = s, s = e.indexOf(`
203
- `, s + 1);
204
- }
205
- const o = [this.generatedCodeColumn, t, i.line, i.column];
206
- n >= 0 && o.push(n), this.rawSegments.push(o), this.advance(e.slice(h + 1));
207
- } else this.pending && (this.rawSegments.push(this.pending), this.advance(e));
208
- this.pending = null;
209
- }
210
- addUneditedChunk(t, e, i, n, r) {
211
- let s = e.start, h = !0, o = !1;
212
- for (; s < e.end; ) {
213
- if (i[s] === `
214
- `)
215
- n.line += 1, n.column = 0, this.generatedCodeLine += 1, this.raw[this.generatedCodeLine] = this.rawSegments = [], this.generatedCodeColumn = 0, h = !0, o = !1;
216
- else {
217
- if (this.hires || h || r.has(s)) {
218
- const l = [this.generatedCodeColumn, t, n.line, n.column];
219
- this.hires === "boundary" ? $.test(i[s]) ? o || (this.rawSegments.push(l), o = !0) : (this.rawSegments.push(l), o = !1) : this.rawSegments.push(l);
220
- }
221
- n.column += 1, this.generatedCodeColumn += 1, h = !1;
222
- }
223
- s += 1;
224
- }
225
- this.pending = null;
226
- }
227
- advance(t) {
228
- if (!t) return;
229
- const e = t.split(`
230
- `);
231
- if (e.length > 1) {
232
- for (let i = 0; i < e.length - 1; i++)
233
- this.generatedCodeLine++, this.raw[this.generatedCodeLine] = this.rawSegments = [];
234
- this.generatedCodeColumn = 0;
235
- }
236
- this.generatedCodeColumn += e[e.length - 1].length;
237
- }
238
- }
239
- const d = `
240
- `, f = {
241
- insertLeft: !1,
242
- insertRight: !1,
243
- storeName: !1
244
- };
245
- class v {
246
- constructor(t, e = {}) {
247
- const i = new g(0, t.length, t);
248
- Object.defineProperties(this, {
249
- original: { writable: !0, value: t },
250
- outro: { writable: !0, value: "" },
251
- intro: { writable: !0, value: "" },
252
- firstChunk: { writable: !0, value: i },
253
- lastChunk: { writable: !0, value: i },
254
- lastSearchedChunk: { writable: !0, value: i },
255
- byStart: { writable: !0, value: {} },
256
- byEnd: { writable: !0, value: {} },
257
- filename: { writable: !0, value: e.filename },
258
- indentExclusionRanges: { writable: !0, value: e.indentExclusionRanges },
259
- sourcemapLocations: { writable: !0, value: new p() },
260
- storedNames: { writable: !0, value: {} },
261
- indentStr: { writable: !0, value: void 0 },
262
- ignoreList: { writable: !0, value: e.ignoreList },
263
- offset: { writable: !0, value: e.offset || 0 }
264
- }), this.byStart[0] = i, this.byEnd[t.length] = i;
265
- }
266
- addSourcemapLocation(t) {
267
- this.sourcemapLocations.add(t);
268
- }
269
- append(t) {
270
- if (typeof t != "string") throw new TypeError("outro content must be a string");
271
- return this.outro += t, this;
272
- }
273
- appendLeft(t, e) {
274
- if (t = t + this.offset, typeof e != "string") throw new TypeError("inserted content must be a string");
275
- this._split(t);
276
- const i = this.byEnd[t];
277
- return i ? i.appendLeft(e) : this.intro += e, this;
278
- }
279
- appendRight(t, e) {
280
- if (t = t + this.offset, typeof e != "string") throw new TypeError("inserted content must be a string");
281
- this._split(t);
282
- const i = this.byStart[t];
283
- return i ? i.appendRight(e) : this.outro += e, this;
284
- }
285
- clone() {
286
- const t = new v(this.original, { filename: this.filename, offset: this.offset });
287
- let e = this.firstChunk, i = t.firstChunk = t.lastSearchedChunk = e.clone();
288
- for (; e; ) {
289
- t.byStart[i.start] = i, t.byEnd[i.end] = i;
290
- const n = e.next, r = n && n.clone();
291
- r && (i.next = r, r.previous = i, i = r), e = n;
292
- }
293
- return t.lastChunk = i, this.indentExclusionRanges && (t.indentExclusionRanges = this.indentExclusionRanges.slice()), t.sourcemapLocations = new p(this.sourcemapLocations), t.intro = this.intro, t.outro = this.outro, t;
294
- }
295
- generateDecodedMap(t) {
296
- t = t || {};
297
- const e = 0, i = Object.keys(this.storedNames), n = new U(t.hires), r = y(this.original);
298
- return this.intro && n.advance(this.intro), this.firstChunk.eachNext((s) => {
299
- const h = r(s.start);
300
- s.intro.length && n.advance(s.intro), s.edited ? n.addEdit(
301
- e,
302
- s.content,
303
- h,
304
- s.storeName ? i.indexOf(s.original) : -1
305
- ) : n.addUneditedChunk(e, s, this.original, h, this.sourcemapLocations), s.outro.length && n.advance(s.outro);
306
- }), this.outro && n.advance(this.outro), {
307
- file: t.file ? t.file.split(/[/\\]/).pop() : void 0,
308
- sources: [
309
- t.source ? A(t.file || "", t.source) : t.file || ""
310
- ],
311
- sourcesContent: t.includeContent ? [this.original] : void 0,
312
- names: i,
313
- mappings: n.raw,
314
- x_google_ignoreList: this.ignoreList ? [e] : void 0
315
- };
316
- }
317
- generateMap(t) {
318
- return new N(this.generateDecodedMap(t));
319
- }
320
- _ensureindentStr() {
321
- this.indentStr === void 0 && (this.indentStr = I(this.original));
322
- }
323
- _getRawIndentString() {
324
- return this._ensureindentStr(), this.indentStr;
325
- }
326
- getIndentString() {
327
- return this._ensureindentStr(), this.indentStr === null ? " " : this.indentStr;
328
- }
329
- indent(t, e) {
330
- const i = /^[^\r\n]/gm;
331
- if (j(t) && (e = t, t = void 0), t === void 0 && (this._ensureindentStr(), t = this.indentStr || " "), t === "") return this;
332
- e = e || {};
333
- const n = {};
334
- e.exclude && (typeof e.exclude[0] == "number" ? [e.exclude] : e.exclude).forEach((a) => {
335
- for (let w = a[0]; w < a[1]; w += 1)
336
- n[w] = !0;
337
- });
338
- let r = e.indentStart !== !1;
339
- const s = (l) => r ? `${t}${l}` : (r = !0, l);
340
- this.intro = this.intro.replace(i, s);
341
- let h = 0, o = this.firstChunk;
342
- for (; o; ) {
343
- const l = o.end;
344
- if (o.edited)
345
- n[h] || (o.content = o.content.replace(i, s), o.content.length && (r = o.content[o.content.length - 1] === `
346
- `));
347
- else
348
- for (h = o.start; h < l; ) {
349
- if (!n[h]) {
350
- const a = this.original[h];
351
- a === `
352
- ` ? r = !0 : a !== "\r" && r && (r = !1, h === o.start || (this._splitChunk(o, h), o = o.next), o.prependRight(t));
353
- }
354
- h += 1;
355
- }
356
- h = o.end, o = o.next;
357
- }
358
- return this.outro = this.outro.replace(i, s), this;
359
- }
360
- insert() {
361
- throw new Error(
362
- "magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)"
363
- );
364
- }
365
- insertLeft(t, e) {
366
- return f.insertLeft || (console.warn(
367
- "magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead"
368
- ), f.insertLeft = !0), this.appendLeft(t, e);
369
- }
370
- insertRight(t, e) {
371
- return f.insertRight || (console.warn(
372
- "magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead"
373
- ), f.insertRight = !0), this.prependRight(t, e);
374
- }
375
- move(t, e, i) {
376
- if (t = t + this.offset, e = e + this.offset, i = i + this.offset, i >= t && i <= e) throw new Error("Cannot move a selection inside itself");
377
- this._split(t), this._split(e), this._split(i);
378
- const n = this.byStart[t], r = this.byEnd[e], s = n.previous, h = r.next, o = this.byStart[i];
379
- if (!o && r === this.lastChunk) return this;
380
- const l = o ? o.previous : this.lastChunk;
381
- return s && (s.next = h), h && (h.previous = s), l && (l.next = n), o && (o.previous = r), n.previous || (this.firstChunk = r.next), r.next || (this.lastChunk = n.previous, this.lastChunk.next = null), n.previous = l, r.next = o || null, l || (this.firstChunk = n), o || (this.lastChunk = r), this;
382
- }
383
- overwrite(t, e, i, n) {
384
- return n = n || {}, this.update(t, e, i, { ...n, overwrite: !n.contentOnly });
385
- }
386
- update(t, e, i, n) {
387
- if (t = t + this.offset, e = e + this.offset, typeof i != "string") throw new TypeError("replacement content must be a string");
388
- if (this.original.length !== 0) {
389
- for (; t < 0; ) t += this.original.length;
390
- for (; e < 0; ) e += this.original.length;
391
- }
392
- if (e > this.original.length) throw new Error("end is out of bounds");
393
- if (t === e)
394
- throw new Error(
395
- "Cannot overwrite a zero-length range – use appendLeft or prependRight instead"
396
- );
397
- this._split(t), this._split(e), n === !0 && (f.storeName || (console.warn(
398
- "The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"
399
- ), f.storeName = !0), n = { storeName: !0 });
400
- const r = n !== void 0 ? n.storeName : !1, s = n !== void 0 ? n.overwrite : !1;
401
- if (r) {
402
- const l = this.original.slice(t, e);
403
- Object.defineProperty(this.storedNames, l, {
404
- writable: !0,
405
- value: !0,
406
- enumerable: !0
407
- });
408
- }
409
- const h = this.byStart[t], o = this.byEnd[e];
410
- if (h) {
411
- let l = h;
412
- for (; l !== o; ) {
413
- if (l.next !== this.byStart[l.end])
414
- throw new Error("Cannot overwrite across a split point");
415
- l = l.next, l.edit("", !1);
416
- }
417
- h.edit(i, r, !s);
418
- } else {
419
- const l = new g(t, e, "").edit(i, r);
420
- o.next = l, l.previous = o;
421
- }
422
- return this;
423
- }
424
- prepend(t) {
425
- if (typeof t != "string") throw new TypeError("outro content must be a string");
426
- return this.intro = t + this.intro, this;
427
- }
428
- prependLeft(t, e) {
429
- if (t = t + this.offset, typeof e != "string") throw new TypeError("inserted content must be a string");
430
- this._split(t);
431
- const i = this.byEnd[t];
432
- return i ? i.prependLeft(e) : this.intro = e + this.intro, this;
433
- }
434
- prependRight(t, e) {
435
- if (t = t + this.offset, typeof e != "string") throw new TypeError("inserted content must be a string");
436
- this._split(t);
437
- const i = this.byStart[t];
438
- return i ? i.prependRight(e) : this.outro = e + this.outro, this;
439
- }
440
- remove(t, e) {
441
- if (t = t + this.offset, e = e + this.offset, this.original.length !== 0) {
442
- for (; t < 0; ) t += this.original.length;
443
- for (; e < 0; ) e += this.original.length;
444
- }
445
- if (t === e) return this;
446
- if (t < 0 || e > this.original.length) throw new Error("Character is out of bounds");
447
- if (t > e) throw new Error("end must be greater than start");
448
- this._split(t), this._split(e);
449
- let i = this.byStart[t];
450
- for (; i; )
451
- i.intro = "", i.outro = "", i.edit(""), i = e > i.end ? this.byStart[i.end] : null;
452
- return this;
453
- }
454
- reset(t, e) {
455
- if (t = t + this.offset, e = e + this.offset, this.original.length !== 0) {
456
- for (; t < 0; ) t += this.original.length;
457
- for (; e < 0; ) e += this.original.length;
458
- }
459
- if (t === e) return this;
460
- if (t < 0 || e > this.original.length) throw new Error("Character is out of bounds");
461
- if (t > e) throw new Error("end must be greater than start");
462
- this._split(t), this._split(e);
463
- let i = this.byStart[t];
464
- for (; i; )
465
- i.reset(), i = e > i.end ? this.byStart[i.end] : null;
466
- return this;
467
- }
468
- lastChar() {
469
- if (this.outro.length) return this.outro[this.outro.length - 1];
470
- let t = this.lastChunk;
471
- do {
472
- if (t.outro.length) return t.outro[t.outro.length - 1];
473
- if (t.content.length) return t.content[t.content.length - 1];
474
- if (t.intro.length) return t.intro[t.intro.length - 1];
475
- } while (t = t.previous);
476
- return this.intro.length ? this.intro[this.intro.length - 1] : "";
477
- }
478
- lastLine() {
479
- let t = this.outro.lastIndexOf(d);
480
- if (t !== -1) return this.outro.substr(t + 1);
481
- let e = this.outro, i = this.lastChunk;
482
- do {
483
- if (i.outro.length > 0) {
484
- if (t = i.outro.lastIndexOf(d), t !== -1) return i.outro.substr(t + 1) + e;
485
- e = i.outro + e;
486
- }
487
- if (i.content.length > 0) {
488
- if (t = i.content.lastIndexOf(d), t !== -1) return i.content.substr(t + 1) + e;
489
- e = i.content + e;
490
- }
491
- if (i.intro.length > 0) {
492
- if (t = i.intro.lastIndexOf(d), t !== -1) return i.intro.substr(t + 1) + e;
493
- e = i.intro + e;
494
- }
495
- } while (i = i.previous);
496
- return t = this.intro.lastIndexOf(d), t !== -1 ? this.intro.substr(t + 1) + e : this.intro + e;
497
- }
498
- slice(t = 0, e = this.original.length - this.offset) {
499
- if (t = t + this.offset, e = e + this.offset, this.original.length !== 0) {
500
- for (; t < 0; ) t += this.original.length;
501
- for (; e < 0; ) e += this.original.length;
502
- }
503
- let i = "", n = this.firstChunk;
504
- for (; n && (n.start > t || n.end <= t); ) {
505
- if (n.start < e && n.end >= e)
506
- return i;
507
- n = n.next;
508
- }
509
- if (n && n.edited && n.start !== t)
510
- throw new Error(`Cannot use replaced character ${t} as slice start anchor.`);
511
- const r = n;
512
- for (; n; ) {
513
- n.intro && (r !== n || n.start === t) && (i += n.intro);
514
- const s = n.start < e && n.end >= e;
515
- if (s && n.edited && n.end !== e)
516
- throw new Error(`Cannot use replaced character ${e} as slice end anchor.`);
517
- const h = r === n ? t - n.start : 0, o = s ? n.content.length + e - n.end : n.content.length;
518
- if (i += n.content.slice(h, o), n.outro && (!s || n.end === e) && (i += n.outro), s)
519
- break;
520
- n = n.next;
521
- }
522
- return i;
523
- }
524
- // TODO deprecate this? not really very useful
525
- snip(t, e) {
526
- const i = this.clone();
527
- return i.remove(0, t), i.remove(e, i.original.length), i;
528
- }
529
- _split(t) {
530
- if (this.byStart[t] || this.byEnd[t]) return;
531
- let e = this.lastSearchedChunk, i = e;
532
- const n = t > e.end;
533
- for (; e; ) {
534
- if (e.contains(t)) return this._splitChunk(e, t);
535
- if (e = n ? this.byStart[e.end] : this.byEnd[e.start], e === i) return;
536
- i = e;
537
- }
538
- }
539
- _splitChunk(t, e) {
540
- if (t.edited && t.content.length) {
541
- const n = y(this.original)(e);
542
- throw new Error(
543
- `Cannot split a chunk that has already been edited (${n.line}:${n.column} – "${t.original}")`
544
- );
545
- }
546
- const i = t.split(e);
547
- return this.byEnd[e] = t, this.byStart[e] = i, this.byEnd[i.end] = i, t === this.lastChunk && (this.lastChunk = i), this.lastSearchedChunk = t, !0;
548
- }
549
- toString() {
550
- let t = this.intro, e = this.firstChunk;
551
- for (; e; )
552
- t += e.toString(), e = e.next;
553
- return t + this.outro;
554
- }
555
- isEmpty() {
556
- let t = this.firstChunk;
557
- do
558
- if (t.intro.length && t.intro.trim() || t.content.length && t.content.trim() || t.outro.length && t.outro.trim())
559
- return !1;
560
- while (t = t.next);
561
- return !0;
562
- }
563
- length() {
564
- let t = this.firstChunk, e = 0;
565
- do
566
- e += t.intro.length + t.content.length + t.outro.length;
567
- while (t = t.next);
568
- return e;
569
- }
570
- trimLines() {
571
- return this.trim("[\\r\\n]");
572
- }
573
- trim(t) {
574
- return this.trimStart(t).trimEnd(t);
575
- }
576
- trimEndAborted(t) {
577
- const e = new RegExp((t || "\\s") + "+$");
578
- if (this.outro = this.outro.replace(e, ""), this.outro.length) return !0;
579
- let i = this.lastChunk;
580
- do {
581
- const n = i.end, r = i.trimEnd(e);
582
- if (i.end !== n && (this.lastChunk === i && (this.lastChunk = i.next), this.byEnd[i.end] = i, this.byStart[i.next.start] = i.next, this.byEnd[i.next.end] = i.next), r) return !0;
583
- i = i.previous;
584
- } while (i);
585
- return !1;
586
- }
587
- trimEnd(t) {
588
- return this.trimEndAborted(t), this;
589
- }
590
- trimStartAborted(t) {
591
- const e = new RegExp("^" + (t || "\\s") + "+");
592
- if (this.intro = this.intro.replace(e, ""), this.intro.length) return !0;
593
- let i = this.firstChunk;
594
- do {
595
- const n = i.end, r = i.trimStart(e);
596
- if (i.end !== n && (i === this.lastChunk && (this.lastChunk = i.next), this.byEnd[i.end] = i, this.byStart[i.next.start] = i.next, this.byEnd[i.next.end] = i.next), r) return !0;
597
- i = i.next;
598
- } while (i);
599
- return !1;
600
- }
601
- trimStart(t) {
602
- return this.trimStartAborted(t), this;
603
- }
604
- hasChanged() {
605
- return this.original !== this.toString();
606
- }
607
- _replaceRegexp(t, e) {
608
- function i(r, s) {
609
- return typeof e == "string" ? e.replace(/\$(\$|&|\d+)/g, (h, o) => o === "$" ? "$" : o === "&" ? r[0] : +o < r.length ? r[+o] : `$${o}`) : e(...r, r.index, s, r.groups);
610
- }
611
- function n(r, s) {
612
- let h;
613
- const o = [];
614
- for (; h = r.exec(s); )
615
- o.push(h);
616
- return o;
617
- }
618
- if (t.global)
619
- n(t, this.original).forEach((s) => {
620
- if (s.index != null) {
621
- const h = i(s, this.original);
622
- h !== s[0] && this.overwrite(s.index, s.index + s[0].length, h);
623
- }
624
- });
625
- else {
626
- const r = this.original.match(t);
627
- if (r && r.index != null) {
628
- const s = i(r, this.original);
629
- s !== r[0] && this.overwrite(r.index, r.index + r[0].length, s);
630
- }
631
- }
632
- return this;
633
- }
634
- _replaceString(t, e) {
635
- const { original: i } = this, n = i.indexOf(t);
636
- return n !== -1 && (typeof e == "function" && (e = e(t, n, i)), t !== e && this.overwrite(n, n + t.length, e)), this;
637
- }
638
- replace(t, e) {
639
- return typeof t == "string" ? this._replaceString(t, e) : this._replaceRegexp(t, e);
640
- }
641
- _replaceAllString(t, e) {
642
- const { original: i } = this, n = t.length;
643
- for (let r = i.indexOf(t); r !== -1; r = i.indexOf(t, r + n)) {
644
- const s = i.slice(r, r + n);
645
- let h = e;
646
- typeof e == "function" && (h = e(s, r, i)), s !== h && this.overwrite(r, r + n, h);
647
- }
648
- return this;
649
- }
650
- replaceAll(t, e) {
651
- if (typeof t == "string")
652
- return this._replaceAllString(t, e);
653
- if (!t.global)
654
- throw new TypeError(
655
- "MagicString.prototype.replaceAll called with a non-global RegExp argument"
656
- );
657
- return this._replaceRegexp(t, e);
658
- }
659
- }
660
- export {
661
- N as SourceMap,
662
- v as default
663
- };
@@ -1 +0,0 @@
1
- export {};