@okam/stack-ui 1.35.6 → 1.35.7

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 (227) hide show
  1. package/index107.js +1 -1
  2. package/index107.mjs +1 -1
  3. package/index114.js +1 -1
  4. package/index114.mjs +1 -1
  5. package/index116.js +1 -1
  6. package/index116.mjs +3 -3
  7. package/index117.js +1 -1
  8. package/index117.mjs +3 -3
  9. package/index118.js +1 -1
  10. package/index118.mjs +1 -1
  11. package/index119.js +1 -1
  12. package/index119.mjs +1 -1
  13. package/index124.js +1 -1
  14. package/index124.mjs +1 -1
  15. package/index126.js +1 -1
  16. package/index126.mjs +2 -2
  17. package/index127.js +1 -1
  18. package/index127.mjs +5 -5
  19. package/index128.js +1 -1
  20. package/index128.mjs +3 -3
  21. package/index129.js +1 -1
  22. package/index129.mjs +9 -9
  23. package/index135.js +1 -1
  24. package/index135.mjs +1 -1
  25. package/index144.js +1 -1
  26. package/index144.mjs +55 -10
  27. package/index145.js +1 -1
  28. package/index145.mjs +10 -55
  29. package/index150.js +1 -1
  30. package/index150.mjs +1 -1
  31. package/index151.js +1 -1
  32. package/index151.mjs +1 -1
  33. package/index153.js +1 -1
  34. package/index153.mjs +22 -68
  35. package/index154.js +1 -1
  36. package/index154.mjs +62 -370
  37. package/index155.js +1 -1
  38. package/index155.mjs +379 -44
  39. package/index156.js +1 -1
  40. package/index156.mjs +47 -4
  41. package/index157.js +1 -1
  42. package/index157.mjs +4 -25
  43. package/index158.js +1 -1
  44. package/index158.mjs +23 -46
  45. package/index159.js +1 -1
  46. package/index159.mjs +46 -4
  47. package/index160.js +1 -1
  48. package/index160.mjs +5 -24
  49. package/index161.js +1 -1
  50. package/index161.mjs +23 -11
  51. package/index162.js +1 -1
  52. package/index162.mjs +12 -4
  53. package/index163.js +1 -1
  54. package/index163.mjs +4 -14
  55. package/index164.js +1 -1
  56. package/index164.mjs +14 -21
  57. package/index165.js +1 -1
  58. package/index165.mjs +21 -42
  59. package/index166.js +1 -1
  60. package/index166.mjs +41 -23
  61. package/index167.js +1 -1
  62. package/index167.mjs +24 -42
  63. package/index168.js +1 -1
  64. package/index168.mjs +41 -27
  65. package/index169.js +1 -1
  66. package/index169.mjs +27 -30
  67. package/index170.js +1 -1
  68. package/index170.mjs +30 -13
  69. package/index171.js +1 -1
  70. package/index171.mjs +14 -28
  71. package/index172.js +1 -1
  72. package/index172.mjs +28 -9
  73. package/index173.js +1 -1
  74. package/index173.mjs +9 -6
  75. package/index174.js +1 -1
  76. package/index174.mjs +6 -5
  77. package/index175.js +1 -1
  78. package/index175.mjs +5 -13
  79. package/index176.js +1 -1
  80. package/index176.mjs +13 -8
  81. package/index177.js +1 -1
  82. package/index177.mjs +8 -17
  83. package/index178.js +1 -1
  84. package/index178.mjs +17 -19
  85. package/index179.js +1 -1
  86. package/index179.mjs +19 -54
  87. package/index18.js +1 -1
  88. package/index18.mjs +49 -44
  89. package/index180.js +1 -1
  90. package/index180.mjs +50 -23
  91. package/index181.js +1 -1
  92. package/index181.mjs +122 -138
  93. package/index182.js +1 -1
  94. package/index182.mjs +129 -192
  95. package/index183.js +1 -1
  96. package/index183.mjs +44 -22
  97. package/index184.js +1 -1
  98. package/index184.mjs +14 -49
  99. package/index185.js +1 -1
  100. package/index185.mjs +93 -46
  101. package/index186.js +1 -1
  102. package/index186.mjs +98 -89
  103. package/index187.js +1 -1
  104. package/index187.mjs +5 -72
  105. package/index188.js +1 -1
  106. package/index188.mjs +3 -68
  107. package/index189.js +1 -1
  108. package/index189.mjs +125 -7
  109. package/index190.js +1 -1
  110. package/index190.mjs +29 -11
  111. package/index191.js +1 -1
  112. package/index191.mjs +40 -113
  113. package/index192.js +1 -1
  114. package/index192.mjs +41 -131
  115. package/index193.js +1 -1
  116. package/index193.mjs +36 -43
  117. package/index194.js +1 -1
  118. package/index194.mjs +110 -11
  119. package/index195.js +1 -1
  120. package/index195.mjs +59 -77
  121. package/index196.js +1 -1
  122. package/index196.mjs +94 -99
  123. package/index197.js +1 -1
  124. package/index197.mjs +98 -5
  125. package/index198.js +1 -1
  126. package/index198.mjs +140 -3
  127. package/index199.js +1 -1
  128. package/index199.mjs +191 -119
  129. package/index200.js +1 -1
  130. package/index200.mjs +22 -29
  131. package/index201.js +1 -1
  132. package/index201.mjs +49 -51
  133. package/index202.js +1 -1
  134. package/index202.mjs +47 -43
  135. package/index203.js +1 -1
  136. package/index203.mjs +95 -35
  137. package/index204.js +1 -1
  138. package/index204.mjs +72 -114
  139. package/index205.js +1 -1
  140. package/index205.mjs +67 -76
  141. package/index206.js +1 -1
  142. package/index206.mjs +7 -101
  143. package/index207.js +1 -1
  144. package/index207.mjs +12 -98
  145. package/index235.js +1 -1
  146. package/index235.mjs +5 -5
  147. package/index236.js +1 -1
  148. package/index236.mjs +1 -1
  149. package/index237.js +1 -1
  150. package/index237.mjs +4 -4
  151. package/index238.js +1 -1
  152. package/index238.mjs +1 -1
  153. package/index239.js +1 -1
  154. package/index239.mjs +1 -1
  155. package/index240.js +1 -1
  156. package/index240.mjs +4 -4
  157. package/index241.js +1 -1
  158. package/index241.mjs +4 -4
  159. package/index242.js +1 -1
  160. package/index242.mjs +1 -1
  161. package/index243.js +1 -1
  162. package/index243.mjs +4 -4
  163. package/index244.js +1 -1
  164. package/index244.mjs +4 -4
  165. package/index245.js +1 -1
  166. package/index245.mjs +1 -1
  167. package/index246.js +1 -1
  168. package/index246.mjs +4 -4
  169. package/index247.js +1 -1
  170. package/index247.mjs +4 -4
  171. package/index248.js +1 -1
  172. package/index248.mjs +1 -1
  173. package/index249.js +1 -1
  174. package/index249.mjs +1 -1
  175. package/index250.js +1 -1
  176. package/index250.mjs +4 -4
  177. package/index251.js +1 -1
  178. package/index251.mjs +4 -4
  179. package/index252.js +1 -1
  180. package/index252.mjs +1 -1
  181. package/index253.js +1 -1
  182. package/index253.mjs +4 -4
  183. package/index254.js +1 -1
  184. package/index254.mjs +4 -4
  185. package/index255.js +1 -1
  186. package/index255.mjs +4 -4
  187. package/index256.js +1 -1
  188. package/index256.mjs +1 -1
  189. package/index257.js +1 -1
  190. package/index257.mjs +4 -4
  191. package/index258.js +1 -1
  192. package/index258.mjs +4 -4
  193. package/index259.js +1 -1
  194. package/index259.mjs +4 -4
  195. package/index260.js +1 -1
  196. package/index260.mjs +4 -4
  197. package/index261.js +1 -1
  198. package/index261.mjs +4 -4
  199. package/index262.js +1 -1
  200. package/index262.mjs +1 -1
  201. package/index263.js +1 -1
  202. package/index263.mjs +1 -1
  203. package/index264.js +1 -1
  204. package/index264.mjs +1 -1
  205. package/index265.js +1 -1
  206. package/index265.mjs +4 -4
  207. package/index266.js +1 -1
  208. package/index266.mjs +4 -4
  209. package/index267.js +1 -1
  210. package/index267.mjs +4 -4
  211. package/index268.js +1 -1
  212. package/index268.mjs +4 -4
  213. package/index269.js +1 -1
  214. package/index269.mjs +5 -5
  215. package/index278.js +1 -1
  216. package/index278.mjs +3 -3
  217. package/index280.js +1 -1
  218. package/index280.mjs +2 -2
  219. package/index281.js +1 -1
  220. package/index281.mjs +5 -5
  221. package/index284.js +1 -1
  222. package/index284.mjs +3 -3
  223. package/index287.js +1 -1
  224. package/index287.mjs +1 -1
  225. package/index288.js +1 -1
  226. package/index288.mjs +4 -4
  227. package/package.json +1 -1
package/index182.mjs CHANGED
@@ -1,200 +1,137 @@
1
- import { isWebKit as ot } from "./index167.mjs";
2
- import { clamp as G } from "./index234.mjs";
3
- const P = {
4
- top: "top",
5
- bottom: "top",
6
- left: "left",
7
- right: "left"
8
- }, z = {
9
- top: "bottom",
10
- bottom: "top",
11
- left: "right",
12
- right: "left"
13
- }, it = {
14
- top: "left",
15
- left: "top"
16
- }, K = {
17
- top: "height",
18
- left: "width"
19
- }, B = {
20
- width: "totalWidth",
21
- height: "totalHeight"
22
- }, H = {};
23
- let u = typeof document < "u" ? window.visualViewport : null;
24
- function j(e) {
25
- let t = 0, o = 0, c = 0, i = 0, a = 0, f = 0, l = {};
26
- var $;
27
- let p = (($ = u == null ? void 0 : u.scale) !== null && $ !== void 0 ? $ : 1) > 1;
28
- if (e.tagName === "BODY") {
29
- let h = document.documentElement;
30
- c = h.clientWidth, i = h.clientHeight;
31
- var s;
32
- t = (s = u == null ? void 0 : u.width) !== null && s !== void 0 ? s : c;
33
- var g;
34
- o = (g = u == null ? void 0 : u.height) !== null && g !== void 0 ? g : i, l.top = h.scrollTop || e.scrollTop, l.left = h.scrollLeft || e.scrollLeft, u && (a = u.offsetTop, f = u.offsetLeft);
35
- } else
36
- ({ width: t, height: o, top: a, left: f } = M(e)), l.top = e.scrollTop, l.left = e.scrollLeft, c = t, i = o;
37
- if (ot() && (e.tagName === "BODY" || e.tagName === "HTML") && p) {
38
- l.top = 0, l.left = 0;
39
- var d;
40
- a = (d = u == null ? void 0 : u.pageTop) !== null && d !== void 0 ? d : 0;
41
- var r;
42
- f = (r = u == null ? void 0 : u.pageLeft) !== null && r !== void 0 ? r : 0;
1
+ function M(n, a) {
2
+ let r = n.copy(), e = "hour" in r ? g(r, a) : 0;
3
+ y(r, a.years || 0), r.calendar.balanceYearMonth && r.calendar.balanceYearMonth(r, n), r.month += a.months || 0, s(r), $(r), r.day += (a.weeks || 0) * 7, r.day += a.days || 0, r.day += e, u(r), r.calendar.balanceDate && r.calendar.balanceDate(r), r.year < 1 && (r.year = 1, r.month = 1, r.day = 1);
4
+ let c = r.calendar.getYearsInEra(r);
5
+ if (r.year > c) {
6
+ var d, h;
7
+ let o = (d = (h = r.calendar).isInverseEra) === null || d === void 0 ? void 0 : d.call(h, r);
8
+ r.year = c, r.month = o ? 1 : r.calendar.getMonthsInYear(r), r.day = o ? 1 : r.calendar.getDaysInMonth(r);
43
9
  }
44
- return {
45
- width: t,
46
- height: o,
47
- totalWidth: c,
48
- totalHeight: i,
49
- scroll: l,
50
- top: a,
51
- left: f
52
- };
53
- }
54
- function ct(e) {
55
- return {
56
- top: e.scrollTop,
57
- left: e.scrollLeft,
58
- width: e.scrollWidth,
59
- height: e.scrollHeight
60
- };
61
- }
62
- function q(e, t, o, c, i, a, f) {
63
- var l;
64
- let $ = (l = i.scroll[e]) !== null && l !== void 0 ? l : 0, p = c[K[e]], s = c.scroll[P[e]] + a, g = p + c.scroll[P[e]] - a, d = t - $ + f[e] - c[P[e]], r = t - $ + o + f[e] - c[P[e]];
65
- return d < s ? s - d : r > g ? Math.max(g - r, s - d) : 0;
66
- }
67
- function rt(e) {
68
- let t = window.getComputedStyle(e);
69
- return {
70
- top: parseInt(t.marginTop, 10) || 0,
71
- bottom: parseInt(t.marginBottom, 10) || 0,
72
- left: parseInt(t.marginLeft, 10) || 0,
73
- right: parseInt(t.marginRight, 10) || 0
74
- };
75
- }
76
- function J(e) {
77
- if (H[e]) return H[e];
78
- let [t, o] = e.split(" "), c = P[t] || "right", i = it[c];
79
- P[o] || (o = "center");
80
- let a = K[c], f = K[i];
81
- return H[e] = {
82
- placement: t,
83
- crossPlacement: o,
84
- axis: c,
85
- crossAxis: i,
86
- size: a,
87
- crossSize: f
88
- }, H[e];
89
- }
90
- function Z(e, t, o, c, i, a, f, l, $, p) {
91
- let { placement: s, crossPlacement: g, axis: d, crossAxis: r, size: h, crossSize: v } = c, n = {};
92
- var w;
93
- n[r] = (w = e[r]) !== null && w !== void 0 ? w : 0;
94
- var m, x, E, T;
95
- g === "center" ? n[r] += (((m = e[v]) !== null && m !== void 0 ? m : 0) - ((x = o[v]) !== null && x !== void 0 ? x : 0)) / 2 : g !== r && (n[r] += ((E = e[v]) !== null && E !== void 0 ? E : 0) - ((T = o[v]) !== null && T !== void 0 ? T : 0)), n[r] += a;
96
- const _ = e[r] - o[v] + $ + p, I = e[r] + e[v] - $ - p;
97
- if (n[r] = G(n[r], _, I), s === d) {
98
- const b = l ? f[h] : t[B[h]];
99
- n[z[d]] = Math.floor(b - e[d] + i);
100
- } else n[d] = Math.floor(e[d] + e[h] + i);
101
- return n;
10
+ r.month < 1 && (r.month = 1, r.day = 1);
11
+ let l = r.calendar.getMonthsInYear(r);
12
+ return r.month > l && (r.month = l, r.day = r.calendar.getDaysInMonth(r)), r.day = Math.max(1, Math.min(r.calendar.getDaysInMonth(r), r.day)), r;
102
13
  }
103
- function at(e, t, o, c, i, a, f, l) {
104
- const $ = c ? o.height : t[B.height];
105
- var p;
106
- let s = e.top != null ? o.top + e.top : o.top + ($ - ((p = e.bottom) !== null && p !== void 0 ? p : 0) - f);
107
- var g, d, r, h, v, n;
108
- let w = l !== "top" ? (
109
- // We want the distance between the top of the overlay to the bottom of the boundary
110
- Math.max(0, t.height + t.top + ((g = t.scroll.top) !== null && g !== void 0 ? g : 0) - s - (((d = i.top) !== null && d !== void 0 ? d : 0) + ((r = i.bottom) !== null && r !== void 0 ? r : 0) + a))
111
- ) : Math.max(0, s + f - (t.top + ((h = t.scroll.top) !== null && h !== void 0 ? h : 0)) - (((v = i.top) !== null && v !== void 0 ? v : 0) + ((n = i.bottom) !== null && n !== void 0 ? n : 0) + a));
112
- return Math.min(t.height - a * 2, w);
113
- }
114
- function Q(e, t, o, c, i, a) {
115
- let { placement: f, axis: l, size: $ } = a;
116
- var p, s;
117
- if (f === l) return Math.max(0, o[l] - e[l] - ((p = e.scroll[l]) !== null && p !== void 0 ? p : 0) + t[l] - ((s = c[l]) !== null && s !== void 0 ? s : 0) - c[z[l]] - i);
118
- var g;
119
- return Math.max(0, e[$] + e[l] + e.scroll[l] - t[l] - o[l] - o[$] - ((g = c[l]) !== null && g !== void 0 ? g : 0) - c[z[l]] - i);
120
- }
121
- function nt(e, t, o, c, i, a, f, l, $, p, s, g, d, r, h, v) {
122
- let n = J(e), { size: w, crossAxis: m, crossSize: x, placement: E, crossPlacement: T } = n, _ = Z(t, l, o, n, s, g, p, d, h, v), I = s, b = Q(l, p, t, i, a + s, n);
123
- if (f && c[w] > b) {
124
- let X = J(`${z[E]} ${T}`), lt = Z(t, l, o, X, s, g, p, d, h, v);
125
- Q(l, p, t, i, a + s, X) > b && (n = X, _ = lt, I = s);
126
- }
127
- let L = "bottom";
128
- n.axis === "top" ? n.placement === "top" ? L = "top" : n.placement === "bottom" && (L = "bottom") : n.crossAxis === "top" && (n.crossPlacement === "top" ? L = "bottom" : n.crossPlacement === "bottom" && (L = "top"));
129
- let S = q(m, _[m], o[x], l, $, a, p);
130
- _[m] += S;
131
- let C = at(_, l, p, d, i, a, o.height, L);
132
- r && r < C && (C = r), o.height = Math.min(o.height, C), _ = Z(t, l, o, n, I, g, p, d, h, v), S = q(m, _[m], o[x], l, $, a, p), _[m] += S;
133
- let A = {}, k = t[m] + 0.5 * t[x] - _[m] - i[P[m]];
134
- const V = h / 2 + v;
135
- var F, N, R, Y;
136
- const D = P[m] === "left" ? ((F = i.left) !== null && F !== void 0 ? F : 0) + ((N = i.right) !== null && N !== void 0 ? N : 0) : ((R = i.top) !== null && R !== void 0 ? R : 0) + ((Y = i.bottom) !== null && Y !== void 0 ? Y : 0), O = o[x] - D - h / 2 - v, y = t[m] + h / 2 - (_[m] + i[P[m]]), tt = t[m] + t[x] - h / 2 - (_[m] + i[P[m]]), et = G(k, y, tt);
137
- return A[m] = G(et, V, O), {
138
- position: _,
139
- maxHeight: C,
140
- arrowOffsetLeft: A.left,
141
- arrowOffsetTop: A.top,
142
- placement: n.placement
143
- };
144
- }
145
- function dt(e) {
146
- let { placement: t, targetNode: o, overlayNode: c, scrollNode: i, padding: a, shouldFlip: f, boundaryElement: l, offset: $, crossOffset: p, maxHeight: s, arrowSize: g = 0, arrowBoundaryOffset: d = 0 } = e, r = c instanceof HTMLElement ? pt(c) : document.documentElement, h = r === document.documentElement;
147
- const v = window.getComputedStyle(r).position;
148
- let n = !!v && v !== "static", w = h ? M(o) : U(o, r);
149
- if (!h) {
150
- let { marginTop: A, marginLeft: k } = window.getComputedStyle(o);
151
- w.top += parseInt(A, 10) || 0, w.left += parseInt(k, 10) || 0;
152
- }
153
- let m = M(c), x = rt(c);
154
- var E, T;
155
- m.width += ((E = x.left) !== null && E !== void 0 ? E : 0) + ((T = x.right) !== null && T !== void 0 ? T : 0);
156
- var _, I;
157
- m.height += ((_ = x.top) !== null && _ !== void 0 ? _ : 0) + ((I = x.bottom) !== null && I !== void 0 ? I : 0);
158
- let b = ct(i), L = j(l), S = j(r), C = l.tagName === "BODY" ? M(r) : U(r, l);
159
- return r.tagName === "HTML" && l.tagName === "BODY" && (S.scroll.top = 0, S.scroll.left = 0), nt(t, w, m, b, x, a, f, L, S, C, $, p, n, s, g, d);
160
- }
161
- function M(e) {
162
- let { top: t, left: o, width: c, height: i } = e.getBoundingClientRect(), { scrollTop: a, scrollLeft: f, clientTop: l, clientLeft: $ } = document.documentElement;
163
- return {
164
- top: t + a - l,
165
- left: o + f - $,
166
- width: c,
167
- height: i
168
- };
169
- }
170
- function U(e, t) {
171
- let o = window.getComputedStyle(e), c;
172
- if (o.position === "fixed") {
173
- let { top: i, left: a, width: f, height: l } = e.getBoundingClientRect();
174
- c = {
175
- top: i,
176
- left: a,
177
- width: f,
178
- height: l
179
- };
180
- } else {
181
- c = M(e);
182
- let i = M(t), a = window.getComputedStyle(t);
183
- i.top += (parseInt(a.borderTopWidth, 10) || 0) - t.scrollTop, i.left += (parseInt(a.borderLeftWidth, 10) || 0) - t.scrollLeft, c.top -= i.top, c.left -= i.left;
14
+ function y(n, a) {
15
+ var r, e;
16
+ !((r = (e = n.calendar).isInverseEra) === null || r === void 0) && r.call(e, n) && (a = -a), n.year += a;
17
+ }
18
+ function s(n) {
19
+ for (; n.month < 1; )
20
+ y(n, -1), n.month += n.calendar.getMonthsInYear(n);
21
+ let a = 0;
22
+ for (; n.month > (a = n.calendar.getMonthsInYear(n)); )
23
+ n.month -= a, y(n, 1);
24
+ }
25
+ function u(n) {
26
+ for (; n.day < 1; )
27
+ n.month--, s(n), n.day += n.calendar.getDaysInMonth(n);
28
+ for (; n.day > n.calendar.getDaysInMonth(n); )
29
+ n.day -= n.calendar.getDaysInMonth(n), n.month++, s(n);
30
+ }
31
+ function $(n) {
32
+ n.month = Math.max(1, Math.min(n.calendar.getMonthsInYear(n), n.month)), n.day = Math.max(1, Math.min(n.calendar.getDaysInMonth(n), n.day));
33
+ }
34
+ function f(n) {
35
+ n.calendar.constrainDate && n.calendar.constrainDate(n), n.year = Math.max(1, Math.min(n.calendar.getYearsInEra(n), n.year)), $(n);
36
+ }
37
+ function m(n) {
38
+ let a = {};
39
+ for (let r in n) typeof n[r] == "number" && (a[r] = -n[r]);
40
+ return a;
41
+ }
42
+ function x(n, a) {
43
+ return M(n, m(a));
44
+ }
45
+ function D(n, a) {
46
+ let r = n.copy();
47
+ return a.era != null && (r.era = a.era), a.year != null && (r.year = a.year), a.month != null && (r.month = a.month), a.day != null && (r.day = a.day), f(r), r;
48
+ }
49
+ function Y(n, a) {
50
+ let r = n.copy();
51
+ return a.hour != null && (r.hour = a.hour), a.minute != null && (r.minute = a.minute), a.second != null && (r.second = a.second), a.millisecond != null && (r.millisecond = a.millisecond), I(r), r;
52
+ }
53
+ function b(n) {
54
+ n.second += Math.floor(n.millisecond / 1e3), n.millisecond = i(n.millisecond, 1e3), n.minute += Math.floor(n.second / 60), n.second = i(n.second, 60), n.hour += Math.floor(n.minute / 60), n.minute = i(n.minute, 60);
55
+ let a = Math.floor(n.hour / 24);
56
+ return n.hour = i(n.hour, 24), a;
57
+ }
58
+ function I(n) {
59
+ n.millisecond = Math.max(0, Math.min(n.millisecond, 1e3)), n.second = Math.max(0, Math.min(n.second, 59)), n.minute = Math.max(0, Math.min(n.minute, 59)), n.hour = Math.max(0, Math.min(n.hour, 23));
60
+ }
61
+ function i(n, a) {
62
+ let r = n % a;
63
+ return r < 0 && (r += a), r;
64
+ }
65
+ function g(n, a) {
66
+ return n.hour += a.hours || 0, n.minute += a.minutes || 0, n.second += a.seconds || 0, n.millisecond += a.milliseconds || 0, b(n);
67
+ }
68
+ function w(n, a, r, e) {
69
+ let c = n.copy();
70
+ switch (a) {
71
+ case "era": {
72
+ let l = n.calendar.getEras(), o = l.indexOf(n.era);
73
+ if (o < 0) throw new Error("Invalid era: " + n.era);
74
+ o = t(o, r, 0, l.length - 1, e == null ? void 0 : e.round), c.era = l[o], f(c);
75
+ break;
76
+ }
77
+ case "year":
78
+ var d, h;
79
+ !((d = (h = c.calendar).isInverseEra) === null || d === void 0) && d.call(h, c) && (r = -r), c.year = t(n.year, r, -1 / 0, 9999, e == null ? void 0 : e.round), c.year === -1 / 0 && (c.year = 1), c.calendar.balanceYearMonth && c.calendar.balanceYearMonth(c, n);
80
+ break;
81
+ case "month":
82
+ c.month = t(n.month, r, 1, n.calendar.getMonthsInYear(n), e == null ? void 0 : e.round);
83
+ break;
84
+ case "day":
85
+ c.day = t(n.day, r, 1, n.calendar.getDaysInMonth(n), e == null ? void 0 : e.round);
86
+ break;
87
+ default:
88
+ throw new Error("Unsupported field " + a);
184
89
  }
185
- return c.top -= parseInt(o.marginTop, 10) || 0, c.left -= parseInt(o.marginLeft, 10) || 0, c;
90
+ return n.calendar.balanceDate && n.calendar.balanceDate(c), f(c), c;
186
91
  }
187
- function pt(e) {
188
- let t = e.offsetParent;
189
- if (t && t === document.body && window.getComputedStyle(t).position === "static" && !W(t) && (t = document.documentElement), t == null)
190
- for (t = e.parentElement; t && !W(t); ) t = t.parentElement;
191
- return t || document.documentElement;
92
+ function k(n, a, r, e) {
93
+ let c = n.copy();
94
+ switch (a) {
95
+ case "hour": {
96
+ let d = n.hour, h = 0, l = 23;
97
+ if ((e == null ? void 0 : e.hourCycle) === 12) {
98
+ let o = d >= 12;
99
+ h = o ? 12 : 0, l = o ? 23 : 11;
100
+ }
101
+ c.hour = t(d, r, h, l, e == null ? void 0 : e.round);
102
+ break;
103
+ }
104
+ case "minute":
105
+ c.minute = t(n.minute, r, 0, 59, e == null ? void 0 : e.round);
106
+ break;
107
+ case "second":
108
+ c.second = t(n.second, r, 0, 59, e == null ? void 0 : e.round);
109
+ break;
110
+ case "millisecond":
111
+ c.millisecond = t(n.millisecond, r, 0, 999, e == null ? void 0 : e.round);
112
+ break;
113
+ default:
114
+ throw new Error("Unsupported field " + a);
115
+ }
116
+ return c;
192
117
  }
193
- function W(e) {
194
- let t = window.getComputedStyle(e);
195
- return t.transform !== "none" || /transform|perspective/.test(t.willChange) || t.filter !== "none" || t.contain === "paint" || "backdropFilter" in t && t.backdropFilter !== "none" || "WebkitBackdropFilter" in t && t.WebkitBackdropFilter !== "none";
118
+ function t(n, a, r, e, c = !1) {
119
+ if (c) {
120
+ n += Math.sign(a), n < r && (n = e);
121
+ let d = Math.abs(a);
122
+ a > 0 ? n = Math.ceil(n / d) * d : n = Math.floor(n / d) * d, n > e && (n = r);
123
+ } else
124
+ n += a, n < r ? n = e - (r - n - 1) : n > e && (n = r + (n - e - 1));
125
+ return n;
196
126
  }
197
127
  export {
198
- dt as calculatePosition,
199
- nt as calculatePositionInternal
128
+ M as add,
129
+ f as constrain,
130
+ I as constrainTime,
131
+ w as cycleDate,
132
+ k as cycleTime,
133
+ m as invertDuration,
134
+ D as set,
135
+ Y as setTime,
136
+ x as subtract
200
137
  };
package/index183.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react"),i=new WeakMap;function c(s){let{triggerRef:e,isOpen:r,onClose:t}=s;a.useEffect(()=>{if(!r||t===null)return;let o=n=>{let l=n.target;if(!e.current||l instanceof Node&&!l.contains(e.current)||n.target instanceof HTMLInputElement||n.target instanceof HTMLTextAreaElement)return;let f=t||i.get(e.current);f&&f()};return window.addEventListener("scroll",o,!0),()=>{window.removeEventListener("scroll",o,!0)}},[r,t,e])}exports.onCloseMap=i;exports.useCloseOnScroll=c;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index186.js"),u=require("./index197.js");function d(e,t){return t=l.toCalendar(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function $(e,t){var a,r,i,n;return(n=(i=(a=e.isEqual)===null||a===void 0?void 0:a.call(e,t))!==null&&i!==void 0?i:(r=t.isEqual)===null||r===void 0?void 0:r.call(t,e))!==null&&n!==void 0?n:e.identifier===t.identifier}function s(e,t,a){let r=e.calendar.toJulianDay(e),i=g(t),n=Math.ceil(r+1-i)%7;return n<0&&(n+=7),n}function m(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function v(e,t){return o(e)-o(t)}function o(e){return e.hour*36e5+e.minute*6e4+e.second*1e3+e.millisecond}let c=null;function p(){return c==null&&(c=new Intl.DateTimeFormat().resolvedOptions().timeZone),c}const f=new Map;function y(e){if(Intl.Locale){let a=f.get(e);return a||(a=new Intl.Locale(e).maximize().region,a&&f.set(e,a)),a}let t=e.split("-")[1];return t==="u"?void 0:t}function g(e){let t=y(e);return t&&u.weekStartData[t]||0}exports.compareDate=m;exports.compareTime=v;exports.getDayOfWeek=s;exports.getLocalTimeZone=p;exports.isEqualCalendar=$;exports.isSameDay=d;
package/index183.mjs CHANGED
@@ -1,25 +1,47 @@
1
- import { useEffect as a } from "react";
2
- const i = /* @__PURE__ */ new WeakMap();
3
- function u(s) {
4
- let { triggerRef: e, isOpen: r, onClose: t } = s;
5
- a(() => {
6
- if (!r || t === null) return;
7
- let o = (n) => {
8
- let l = n.target;
9
- if (!e.current || l instanceof Node && !l.contains(e.current) || n.target instanceof HTMLInputElement || n.target instanceof HTMLTextAreaElement) return;
10
- let f = t || i.get(e.current);
11
- f && f();
12
- };
13
- return window.addEventListener("scroll", o, !0), () => {
14
- window.removeEventListener("scroll", o, !0);
15
- };
16
- }, [
17
- r,
18
- t,
19
- e
20
- ]);
1
+ import { toCalendar as l } from "./index186.mjs";
2
+ import { weekStartData as u } from "./index197.mjs";
3
+ function p(e, a) {
4
+ return a = l(a, e.calendar), e.era === a.era && e.year === a.year && e.month === a.month && e.day === a.day;
5
+ }
6
+ function v(e, a) {
7
+ var t, r, i, n;
8
+ return (n = (i = (t = e.isEqual) === null || t === void 0 ? void 0 : t.call(e, a)) !== null && i !== void 0 ? i : (r = a.isEqual) === null || r === void 0 ? void 0 : r.call(a, e)) !== null && n !== void 0 ? n : e.identifier === a.identifier;
9
+ }
10
+ function y(e, a, t) {
11
+ let r = e.calendar.toJulianDay(e), i = d(a), n = Math.ceil(r + 1 - i) % 7;
12
+ return n < 0 && (n += 7), n;
13
+ }
14
+ function g(e, a) {
15
+ return e.calendar.toJulianDay(e) - a.calendar.toJulianDay(a);
16
+ }
17
+ function x(e, a) {
18
+ return c(e) - c(a);
19
+ }
20
+ function c(e) {
21
+ return e.hour * 36e5 + e.minute * 6e4 + e.second * 1e3 + e.millisecond;
22
+ }
23
+ let f = null;
24
+ function D() {
25
+ return f == null && (f = new Intl.DateTimeFormat().resolvedOptions().timeZone), f;
26
+ }
27
+ const o = /* @__PURE__ */ new Map();
28
+ function $(e) {
29
+ if (Intl.Locale) {
30
+ let t = o.get(e);
31
+ return t || (t = new Intl.Locale(e).maximize().region, t && o.set(e, t)), t;
32
+ }
33
+ let a = e.split("-")[1];
34
+ return a === "u" ? void 0 : a;
35
+ }
36
+ function d(e) {
37
+ let a = $(e);
38
+ return a && u[a] || 0;
21
39
  }
22
40
  export {
23
- i as onCloseMap,
24
- u as useCloseOnScroll
41
+ g as compareDate,
42
+ x as compareTime,
43
+ y as getDayOfWeek,
44
+ D as getLocalTimeZone,
45
+ v as isEqualCalendar,
46
+ p as isSameDay
25
47
  };
package/index184.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("@react-aria/focus"),D=require("react"),h=require("./index179.js"),y=require("./index185.js"),t=[];function b(a,i){let{onClose:n,shouldCloseOnBlur:l,isOpen:o,isDismissable:u=!1,isKeyboardDismissDisabled:d=!1,shouldCloseOnInteractOutside:s}=a;D.useEffect(()=>{if(o&&!t.includes(i))return t.push(i),()=>{let e=t.indexOf(i);e>=0&&t.splice(e,1)}},[o,i]);let r=()=>{t[t.length-1]===i&&n&&n()},c=e=>{(!s||s(e.target))&&t[t.length-1]===i&&(e.stopPropagation(),e.preventDefault())},f=e=>{(!s||s(e.target))&&(t[t.length-1]===i&&(e.stopPropagation(),e.preventDefault()),r())},p=e=>{e.key==="Escape"&&!d&&!e.nativeEvent.isComposing&&(e.stopPropagation(),e.preventDefault(),r())};y.useInteractOutside({ref:i,onInteractOutside:u&&o?f:void 0,onInteractOutsideStart:c});let{focusWithinProps:O}=h.useFocusWithin({isDisabled:!l,onBlurWithin:e=>{!e.relatedTarget||v.isElementInChildOfActiveScope(e.relatedTarget)||(!s||s(e.relatedTarget))&&(n==null||n())}}),g=e=>{e.target===e.currentTarget&&e.preventDefault()};return{overlayProps:{onKeyDown:p,...O},underlayProps:{onPointerDown:g}}}exports.useOverlay=b;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index186.js"),o=require("./index185.js");function e(r){return`${String(r.hour).padStart(2,"0")}:${String(r.minute).padStart(2,"0")}:${String(r.second).padStart(2,"0")}${r.millisecond?String(r.millisecond/1e3).slice(1):""}`}function n(r){let a=i.toCalendar(r,new o.GregorianCalendar),t;return a.era==="BC"?t=a.year===1?"0000":"-"+String(Math.abs(1-a.year)).padStart(6,"00"):t=String(a.year).padStart(4,"0"),`${t}-${String(a.month).padStart(2,"0")}-${String(a.day).padStart(2,"0")}`}function d(r){return`${n(r)}T${e(r)}`}exports.dateTimeToString=d;exports.dateToString=n;exports.timeToString=e;
package/index184.mjs CHANGED
@@ -1,52 +1,17 @@
1
- import { isElementInChildOfActiveScope as g } from "@react-aria/focus";
2
- import { useEffect as m } from "react";
3
- import { useFocusWithin as v } from "./index179.mjs";
4
- import { useInteractOutside as b } from "./index185.mjs";
5
- const t = [];
6
- function C(a, i) {
7
- let { onClose: o, shouldCloseOnBlur: l, isOpen: n, isDismissable: d = !1, isKeyboardDismissDisabled: u = !1, shouldCloseOnInteractOutside: s } = a;
8
- m(() => {
9
- if (n && !t.includes(i))
10
- return t.push(i), () => {
11
- let e = t.indexOf(i);
12
- e >= 0 && t.splice(e, 1);
13
- };
14
- }, [
15
- n,
16
- i
17
- ]);
18
- let r = () => {
19
- t[t.length - 1] === i && o && o();
20
- }, f = (e) => {
21
- (!s || s(e.target)) && t[t.length - 1] === i && (e.stopPropagation(), e.preventDefault());
22
- }, p = (e) => {
23
- (!s || s(e.target)) && (t[t.length - 1] === i && (e.stopPropagation(), e.preventDefault()), r());
24
- }, c = (e) => {
25
- e.key === "Escape" && !u && !e.nativeEvent.isComposing && (e.stopPropagation(), e.preventDefault(), r());
26
- };
27
- b({
28
- ref: i,
29
- onInteractOutside: d && n ? p : void 0,
30
- onInteractOutsideStart: f
31
- });
32
- let { focusWithinProps: O } = v({
33
- isDisabled: !l,
34
- onBlurWithin: (e) => {
35
- !e.relatedTarget || g(e.relatedTarget) || (!s || s(e.relatedTarget)) && (o == null || o());
36
- }
37
- }), D = (e) => {
38
- e.target === e.currentTarget && e.preventDefault();
39
- };
40
- return {
41
- overlayProps: {
42
- onKeyDown: c,
43
- ...O
44
- },
45
- underlayProps: {
46
- onPointerDown: D
47
- }
48
- };
1
+ import { toCalendar as e } from "./index186.mjs";
2
+ import { GregorianCalendar as n } from "./index185.mjs";
3
+ function o(a) {
4
+ return `${String(a.hour).padStart(2, "0")}:${String(a.minute).padStart(2, "0")}:${String(a.second).padStart(2, "0")}${a.millisecond ? String(a.millisecond / 1e3).slice(1) : ""}`;
5
+ }
6
+ function $(a) {
7
+ let r = e(a, new n()), t;
8
+ return r.era === "BC" ? t = r.year === 1 ? "0000" : "-" + String(Math.abs(1 - r.year)).padStart(6, "00") : t = String(r.year).padStart(4, "0"), `${t}-${String(r.month).padStart(2, "0")}-${String(r.day).padStart(2, "0")}`;
9
+ }
10
+ function c(a) {
11
+ return `${$(a)}T${o(a)}`;
49
12
  }
50
13
  export {
51
- C as useOverlay
14
+ c as dateTimeToString,
15
+ $ as dateToString,
16
+ o as timeToString
52
17
  };
package/index185.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("./index161.js"),v=require("./index175.js"),m=require("react");function D(r){let{ref:n,onInteractOutside:s,isDisabled:d,onInteractOutsideStart:l}=r,E=m.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),o=v.useEffectEvent(e=>{s&&c(e,n)&&(l&&l(e),E.current.isPointerDown=!0)}),f=v.useEffectEvent(e=>{s&&s(e)});m.useEffect(()=>{let e=E.current;if(d)return;const p=n.current,t=w.getOwnerDocument(p);if(typeof PointerEvent<"u"){let i=u=>{e.isPointerDown&&c(u,n)&&f(u),e.isPointerDown=!1};return t.addEventListener("pointerdown",o,!0),t.addEventListener("pointerup",i,!0),()=>{t.removeEventListener("pointerdown",o,!0),t.removeEventListener("pointerup",i,!0)}}else if(process.env.NODE_ENV==="test"){let i=a=>{e.ignoreEmulatedMouseEvents?e.ignoreEmulatedMouseEvents=!1:e.isPointerDown&&c(a,n)&&f(a),e.isPointerDown=!1},u=a=>{e.ignoreEmulatedMouseEvents=!0,e.isPointerDown&&c(a,n)&&f(a),e.isPointerDown=!1};return t.addEventListener("mousedown",o,!0),t.addEventListener("mouseup",i,!0),t.addEventListener("touchstart",o,!0),t.addEventListener("touchend",u,!0),()=>{t.removeEventListener("mousedown",o,!0),t.removeEventListener("mouseup",i,!0),t.removeEventListener("touchstart",o,!0),t.removeEventListener("touchend",u,!0)}}},[n,d,o,f])}function c(r,n){if(r.button>0)return!1;if(r.target){const s=r.target.ownerDocument;if(!s||!s.documentElement.contains(r.target)||r.target.closest("[data-react-aria-top-layer]"))return!1}return n.current?!r.composedPath().includes(n.current):!1}exports.useInteractOutside=D;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Y=require("./index181.js"),b=require("./index188.js"),y=1721426;function l(r,e,t,f){e=g(r,e);let a=e-1,n=-2;return t<=2?n=0:d(e)&&(n=-1),y-1+365*a+Math.floor(a/4)-Math.floor(a/100)+Math.floor(a/400)+Math.floor((367*t-362)/12+n+f)}function d(r){return r%4===0&&(r%100!==0||r%400===0)}function g(r,e){return r==="BC"?1-e:e}function M(r){let e="AD";return r<=0&&(e="BC",r=1-r),[e,r]}const q={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]};class B{fromJulianDay(e){let t=e,f=t-y,a=Math.floor(f/146097),n=b.mod(f,146097),c=Math.floor(n/36524),s=b.mod(n,36524),D=Math.floor(s/1461),p=b.mod(s,1461),$=Math.floor(p/365),C=a*400+c*100+D*4+$+(c!==4&&$!==4?1:0),[i,o]=M(C),m=t-l(i,o,1,1),u=2;t<l(i,o,3,1)?u=0:d(o)&&(u=1);let h=Math.floor(((m+u)*12+373)/367),x=t-l(i,o,h,1)+1;return new Y.CalendarDate(i,o,h,x)}toJulianDay(e){return l(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return q[d(e.year)?"leapyear":"standard"][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return d(e.year)?366:365}getYearsInEra(e){return 9999}getEras(){return["BC","AD"]}isInverseEra(e){return e.era==="BC"}balanceDate(e){e.year<=0&&(e.era=e.era==="BC"?"AD":"BC",e.year=1-e.year)}constructor(){this.identifier="gregory"}}exports.GregorianCalendar=B;exports.fromExtendedYear=M;exports.getExtendedYear=g;exports.gregorianToJulianDay=l;exports.isLeapYear=d;