@okam/stack-ui 1.32.1 → 1.32.2

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 (278) hide show
  1. package/index.d.ts +1 -1
  2. package/index.js +1 -1
  3. package/index.mjs +53 -55
  4. package/index101.js +1 -1
  5. package/index101.mjs +1 -1
  6. package/index102.js +1 -1
  7. package/index102.mjs +3 -3
  8. package/index103.js +1 -1
  9. package/index103.mjs +1 -1
  10. package/index110.js +1 -1
  11. package/index110.mjs +5 -5
  12. package/index111.js +1 -1
  13. package/index111.mjs +2 -2
  14. package/index112.js +1 -1
  15. package/index112.mjs +1 -1
  16. package/index113.js +1 -1
  17. package/index113.mjs +2 -2
  18. package/index115.js +1 -1
  19. package/index115.mjs +4 -4
  20. package/index116.js +1 -1
  21. package/index116.mjs +2 -2
  22. package/index120.js +1 -1
  23. package/index120.mjs +4 -4
  24. package/index121.js +1 -1
  25. package/index121.mjs +2 -2
  26. package/index124.js +1 -1
  27. package/index124.mjs +1 -1
  28. package/index125.js +1 -1
  29. package/index125.mjs +3 -3
  30. package/index126.js +1 -1
  31. package/index126.mjs +3 -3
  32. package/index130.js +1 -1
  33. package/index130.mjs +2 -2
  34. package/index133.js +1 -1
  35. package/index133.mjs +1 -1
  36. package/index138.js +1 -1
  37. package/index138.mjs +12 -46
  38. package/index139.js +1 -1
  39. package/index139.mjs +46 -241
  40. package/index140.js +1 -2
  41. package/index140.mjs +241 -13
  42. package/index141.js +2 -1
  43. package/index141.mjs +12 -29
  44. package/index142.js +1 -1
  45. package/index142.mjs +30 -52
  46. package/index143.js +1 -1
  47. package/index143.mjs +52 -12
  48. package/index145.js +1 -1
  49. package/index145.mjs +1 -1
  50. package/index147.js +1 -1
  51. package/index147.mjs +2 -2
  52. package/index148.js +1 -1
  53. package/index148.mjs +3 -3
  54. package/index149.js +1 -1
  55. package/index149.mjs +3 -3
  56. package/index150.js +1 -1
  57. package/index150.mjs +1 -1
  58. package/index151.js +1 -1
  59. package/index151.mjs +3 -3
  60. package/index152.js +1 -1
  61. package/index152.mjs +20 -106
  62. package/index153.js +1 -1
  63. package/index153.mjs +107 -83
  64. package/index154.js +1 -1
  65. package/index154.mjs +83 -26
  66. package/index155.js +1 -1
  67. package/index155.mjs +25 -20
  68. package/index156.js +1 -1
  69. package/index156.mjs +123 -17
  70. package/index157.js +1 -1
  71. package/index157.mjs +24 -122
  72. package/index158.js +1 -1
  73. package/index158.mjs +17 -71
  74. package/index159.js +1 -1
  75. package/index159.mjs +62 -338
  76. package/index160.js +1 -1
  77. package/index160.mjs +346 -42
  78. package/index161.js +1 -1
  79. package/index161.mjs +43 -29
  80. package/index162.js +1 -1
  81. package/index162.mjs +28 -24
  82. package/index164.js +1 -1
  83. package/index164.mjs +2 -2
  84. package/index167.js +1 -1
  85. package/index167.mjs +3 -3
  86. package/index169.js +1 -1
  87. package/index169.mjs +1 -1
  88. package/index170.js +1 -1
  89. package/index170.mjs +1 -1
  90. package/index171.js +1 -1
  91. package/index171.mjs +1 -1
  92. package/index178.js +1 -1
  93. package/index178.mjs +1 -1
  94. package/index180.js +1 -1
  95. package/index180.mjs +2 -2
  96. package/index182.js +1 -1
  97. package/index182.mjs +1 -1
  98. package/index198.js +1 -1
  99. package/index198.mjs +70 -201
  100. package/index199.js +1 -1
  101. package/index199.mjs +91 -60
  102. package/index200.js +1 -1
  103. package/index200.mjs +151 -139
  104. package/index201.js +1 -1
  105. package/index201.mjs +72 -125
  106. package/index202.js +1 -1
  107. package/index202.mjs +38 -220
  108. package/index203.js +1 -1
  109. package/index203.mjs +5 -190
  110. package/index204.js +1 -1
  111. package/index204.mjs +60 -68
  112. package/index205.js +1 -1
  113. package/index205.mjs +53 -273
  114. package/index206.js +1 -1
  115. package/index206.mjs +191 -86
  116. package/index207.js +1 -1
  117. package/index207.mjs +56 -180
  118. package/index208.js +1 -1
  119. package/index208.mjs +134 -75
  120. package/index209.js +1 -1
  121. package/index209.mjs +118 -52
  122. package/index210.js +1 -1
  123. package/index210.mjs +214 -116
  124. package/index211.js +1 -1
  125. package/index211.mjs +181 -107
  126. package/index212.js +1 -1
  127. package/index212.mjs +61 -114
  128. package/index213.js +1 -1
  129. package/index213.mjs +272 -65
  130. package/index214.js +1 -1
  131. package/index214.mjs +93 -105
  132. package/index215.js +1 -1
  133. package/index215.mjs +183 -47
  134. package/index216.js +1 -1
  135. package/index216.mjs +77 -86
  136. package/index217.js +1 -1
  137. package/index217.mjs +53 -65
  138. package/index218.js +1 -1
  139. package/index218.mjs +122 -52
  140. package/index219.js +1 -1
  141. package/index219.mjs +111 -94
  142. package/index220.js +1 -5
  143. package/index220.mjs +117 -75
  144. package/index221.js +1 -1
  145. package/index221.mjs +63 -2016
  146. package/index222.js +1 -1
  147. package/index222.mjs +105 -54
  148. package/index223.js +1 -1
  149. package/index223.mjs +50 -186
  150. package/index224.js +1 -1
  151. package/index224.mjs +89 -68
  152. package/index225.js +1 -1
  153. package/index225.mjs +68 -93
  154. package/index226.js +1 -1
  155. package/index226.mjs +52 -151
  156. package/index227.js +1 -1
  157. package/index227.mjs +100 -72
  158. package/index228.js +5 -1
  159. package/index228.mjs +78 -40
  160. package/index229.js +1 -1
  161. package/index229.mjs +2025 -5
  162. package/index230.js +1 -1
  163. package/index230.mjs +59 -61
  164. package/index231.js +1 -1
  165. package/index231.mjs +187 -58
  166. package/index270.js +1 -1
  167. package/index270.mjs +44 -126
  168. package/index271.js +1 -1
  169. package/index271.mjs +9 -190
  170. package/index272.js +1 -1
  171. package/index272.mjs +16 -10
  172. package/index273.js +1 -1
  173. package/index273.mjs +16 -4
  174. package/index274.js +1 -1
  175. package/index274.mjs +16 -37
  176. package/index275.js +1 -1
  177. package/index275.mjs +16 -6
  178. package/index276.js +1 -1
  179. package/index276.mjs +16 -30
  180. package/index277.js +1 -1
  181. package/index277.mjs +16 -7
  182. package/index278.js +1 -1
  183. package/index278.mjs +16 -49
  184. package/index279.js +1 -1
  185. package/index279.mjs +16 -10
  186. package/index280.js +1 -1
  187. package/index280.mjs +15 -15
  188. package/index281.js +1 -1
  189. package/index281.mjs +15 -15
  190. package/index282.js +1 -1
  191. package/index282.mjs +12 -12
  192. package/index283.js +1 -1
  193. package/index283.mjs +15 -15
  194. package/index284.js +1 -1
  195. package/index284.mjs +15 -15
  196. package/index285.js +1 -1
  197. package/index285.mjs +15 -15
  198. package/index286.js +1 -1
  199. package/index286.mjs +15 -15
  200. package/index287.js +1 -1
  201. package/index287.mjs +15 -15
  202. package/index288.js +1 -1
  203. package/index288.mjs +15 -15
  204. package/index289.js +1 -1
  205. package/index289.mjs +15 -15
  206. package/index290.js +1 -1
  207. package/index290.mjs +12 -12
  208. package/index291.js +1 -1
  209. package/index291.mjs +15 -15
  210. package/index292.js +1 -1
  211. package/index292.mjs +15 -15
  212. package/index293.js +1 -1
  213. package/index293.mjs +15 -15
  214. package/index294.js +1 -1
  215. package/index294.mjs +12 -12
  216. package/index295.js +1 -1
  217. package/index295.mjs +15 -15
  218. package/index296.js +1 -1
  219. package/index296.mjs +15 -15
  220. package/index297.js +1 -1
  221. package/index297.mjs +15 -15
  222. package/index298.js +1 -1
  223. package/index298.mjs +12 -12
  224. package/index299.js +1 -1
  225. package/index299.mjs +15 -15
  226. package/index300.js +1 -1
  227. package/index300.mjs +15 -15
  228. package/index301.js +1 -1
  229. package/index301.mjs +15 -15
  230. package/index302.js +1 -1
  231. package/index302.mjs +12 -12
  232. package/index303.js +1 -1
  233. package/index303.mjs +15 -15
  234. package/index304.js +1 -1
  235. package/index304.mjs +15 -15
  236. package/index305.js +1 -1
  237. package/index305.mjs +12 -12
  238. package/index306.js +1 -1
  239. package/index306.mjs +130 -15
  240. package/index307.js +1 -1
  241. package/index307.mjs +191 -16
  242. package/index308.js +1 -1
  243. package/index308.mjs +10 -16
  244. package/index309.js +1 -1
  245. package/index309.mjs +4 -16
  246. package/index310.js +1 -1
  247. package/index310.mjs +37 -16
  248. package/index311.js +1 -1
  249. package/index311.mjs +6 -16
  250. package/index312.js +1 -1
  251. package/index312.mjs +30 -16
  252. package/index313.js +1 -1
  253. package/index313.mjs +7 -16
  254. package/index315.js +1 -1
  255. package/index315.mjs +1 -1
  256. package/index318.js +1 -1
  257. package/index318.mjs +1 -1
  258. package/index325.js +1 -1
  259. package/index325.mjs +1 -1
  260. package/index330.js +1 -1
  261. package/index330.mjs +1 -1
  262. package/index338.js +1 -1
  263. package/index338.mjs +4 -7
  264. package/index339.js +1 -1
  265. package/index339.mjs +6 -68
  266. package/index340.js +1 -1
  267. package/index340.mjs +65 -27
  268. package/index341.js +1 -1
  269. package/index341.mjs +30 -6
  270. package/index342.js +1 -1
  271. package/index342.mjs +6 -6
  272. package/index343.js +1 -1
  273. package/index343.mjs +6 -20
  274. package/index344.js +1 -1
  275. package/index344.mjs +20 -3
  276. package/index99.js +1 -1
  277. package/index99.mjs +1 -1
  278. package/package.json +1 -1
package/index230.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index328.js"),w=require("./index174.js"),m=require("./index337.js");require("react");let d=null,L=new Set,u=new Map,a=!1,s=!1;function c(e,n){for(let t of L)t(e,n)}function y(e){return!(e.metaKey||!w.isMac()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function f(e){a=!0,y(e)&&(d="keyboard",c("keyboard",e))}function o(e){d="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(a=!0,c("pointer",e))}function l(e){m.isVirtualClick(e)&&(a=!0,d="virtual")}function b(e){e.target===window||e.target===document||(!a&&!s&&(d="virtual",c("virtual",e)),a=!1,s=!1)}function $(){a=!1,s=!0}function v(e){if(typeof window>"u"||u.get(i.getOwnerWindow(e)))return;const n=i.getOwnerWindow(e),t=i.getOwnerDocument(e);let r=n.HTMLElement.prototype.focus;n.HTMLElement.prototype.focus=function(){a=!0,r.apply(this,arguments)},t.addEventListener("keydown",f,!0),t.addEventListener("keyup",f,!0),t.addEventListener("click",l,!0),n.addEventListener("focus",b,!0),n.addEventListener("blur",$,!1),typeof PointerEvent<"u"?(t.addEventListener("pointerdown",o,!0),t.addEventListener("pointermove",o,!0),t.addEventListener("pointerup",o,!0)):(t.addEventListener("mousedown",o,!0),t.addEventListener("mousemove",o,!0),t.addEventListener("mouseup",o,!0)),n.addEventListener("beforeunload",()=>{p(e)},{once:!0}),u.set(n,{focus:r})}const p=(e,n)=>{const t=i.getOwnerWindow(e),r=i.getOwnerDocument(e);n&&r.removeEventListener("DOMContentLoaded",n),u.has(t)&&(t.HTMLElement.prototype.focus=u.get(t).focus,r.removeEventListener("keydown",f,!0),r.removeEventListener("keyup",f,!0),r.removeEventListener("click",l,!0),t.removeEventListener("focus",b,!0),t.removeEventListener("blur",$,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",o,!0),r.removeEventListener("pointermove",o,!0),r.removeEventListener("pointerup",o,!0)):(r.removeEventListener("mousedown",o,!0),r.removeEventListener("mousemove",o,!0),r.removeEventListener("mouseup",o,!0)),u.delete(t))};function E(e){const n=i.getOwnerDocument(e);let t;return n.readyState!=="loading"?v(e):(t=()=>{v(e)},n.addEventListener("DOMContentLoaded",t)),()=>p(e,t)}typeof document<"u"&&E();function g(){return d}function k(e){d=e,c(e,null)}exports.addWindowFocusTracking=E;exports.getInteractionModality=g;exports.hasSetupGlobalListeners=u;exports.setInteractionModality=k;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index231.js"),p=require("./index229.js");function d(n,i){n===void 0&&(n={}),i===void 0&&(i=!0);const t={on:{}},f={},s={};o.e(t,p.d),t._emitClasses=!0,t.init=!1;const e={},l=o.p.map(a=>a.replace(/_/,"")),r=Object.assign({},n);return Object.keys(r).forEach(a=>{typeof n[a]>"u"||(l.indexOf(a)>=0?o.i(n[a])?(t[a]={},s[a]={},o.e(t[a],n[a]),o.e(s[a],n[a])):(t[a]=n[a],s[a]=n[a]):a.search(/on[A-Z]/)===0&&typeof n[a]=="function"?i?f[`${a[2].toLowerCase()}${a.substr(3)}`]=n[a]:t.on[`${a[2].toLowerCase()}${a.substr(3)}`]=n[a]:e[a]=n[a])}),["navigation","pagination","scrollbar"].forEach(a=>{t[a]===!0&&(t[a]={}),t[a]===!1&&delete t[a]}),{params:t,passedParams:s,rest:e,events:f}}function m(n,i){let{el:t,nextEl:f,prevEl:s,paginationEl:e,scrollbarEl:l,swiper:r}=n;o.n(i)&&f&&s&&(r.params.navigation.nextEl=f,r.originalParams.navigation.nextEl=f,r.params.navigation.prevEl=s,r.originalParams.navigation.prevEl=s),o.a(i)&&e&&(r.params.pagination.el=e,r.originalParams.pagination.el=e),o.b(i)&&l&&(r.params.scrollbar.el=l,r.originalParams.scrollbar.el=l),r.init(t)}function h(n,i,t,f,s){const e=[];if(!i)return e;const l=a=>{e.indexOf(a)<0&&e.push(a)};if(t&&f){const a=f.map(s),u=t.map(s);a.join("")!==u.join("")&&l("children"),f.length!==t.length&&l("children")}return o.p.filter(a=>a[0]==="_").map(a=>a.replace(/_/,"")).forEach(a=>{if(a in n&&a in i)if(o.i(n[a])&&o.i(i[a])){const u=Object.keys(n[a]),g=Object.keys(i[a]);u.length!==g.length?l(a):(u.forEach(c=>{n[a][c]!==i[a][c]&&l(a)}),g.forEach(c=>{n[a][c]!==i[a][c]&&l(a)}))}else n[a]!==i[a]&&l(a)}),e}const v=n=>{!n||n.destroyed||!n.params.virtual||n.params.virtual&&!n.params.virtual.enabled||(n.updateSlides(),n.updateProgress(),n.updateSlidesClasses(),n.parallax&&n.params.parallax&&n.params.parallax.enabled&&n.parallax.setTranslate())};exports.a=h;exports.g=d;exports.m=m;exports.u=v;
package/index230.mjs CHANGED
@@ -1,64 +1,62 @@
1
- import { getOwnerDocument as v, getOwnerWindow as s } from "./index328.mjs";
2
- import { isMac as m } from "./index174.mjs";
3
- import { isVirtualClick as L } from "./index337.mjs";
4
- import "react";
5
- let f = null, y = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Map(), a = !1, c = !1;
6
- function u(e, n) {
7
- for (let t of y) t(e, n);
8
- }
9
- function w(e) {
10
- return !(e.metaKey || !m() && e.altKey || e.ctrlKey || e.key === "Control" || e.key === "Shift" || e.key === "Meta");
11
- }
12
- function d(e) {
13
- a = !0, w(e) && (f = "keyboard", u("keyboard", e));
14
- }
15
- function o(e) {
16
- f = "pointer", (e.type === "mousedown" || e.type === "pointerdown") && (a = !0, u("pointer", e));
17
- }
18
- function b(e) {
19
- L(e) && (a = !0, f = "virtual");
20
- }
21
- function l(e) {
22
- e.target === window || e.target === document || (!a && !c && (f = "virtual", u("virtual", e)), a = !1, c = !1);
23
- }
24
- function p() {
25
- a = !1, c = !0;
26
- }
27
- function $(e) {
28
- if (typeof window > "u" || i.get(s(e))) return;
29
- const n = s(e), t = v(e);
30
- let r = n.HTMLElement.prototype.focus;
31
- n.HTMLElement.prototype.focus = function() {
32
- a = !0, r.apply(this, arguments);
33
- }, t.addEventListener("keydown", d, !0), t.addEventListener("keyup", d, !0), t.addEventListener("click", b, !0), n.addEventListener("focus", l, !0), n.addEventListener("blur", p, !1), typeof PointerEvent < "u" ? (t.addEventListener("pointerdown", o, !0), t.addEventListener("pointermove", o, !0), t.addEventListener("pointerup", o, !0)) : (t.addEventListener("mousedown", o, !0), t.addEventListener("mousemove", o, !0), t.addEventListener("mouseup", o, !0)), n.addEventListener("beforeunload", () => {
34
- E(e);
35
- }, {
36
- once: !0
37
- }), i.set(n, {
38
- focus: r
39
- });
40
- }
41
- const E = (e, n) => {
42
- const t = s(e), r = v(e);
43
- n && r.removeEventListener("DOMContentLoaded", n), i.has(t) && (t.HTMLElement.prototype.focus = i.get(t).focus, r.removeEventListener("keydown", d, !0), r.removeEventListener("keyup", d, !0), r.removeEventListener("click", b, !0), t.removeEventListener("focus", l, !0), t.removeEventListener("blur", p, !1), typeof PointerEvent < "u" ? (r.removeEventListener("pointerdown", o, !0), r.removeEventListener("pointermove", o, !0), r.removeEventListener("pointerup", o, !0)) : (r.removeEventListener("mousedown", o, !0), r.removeEventListener("mousemove", o, !0), r.removeEventListener("mouseup", o, !0)), i.delete(t));
1
+ import { e as u, p as d, i as g, n as m, a as h, b as v } from "./index231.mjs";
2
+ import { d as x } from "./index229.mjs";
3
+ function b(n, i) {
4
+ n === void 0 && (n = {}), i === void 0 && (i = !0);
5
+ const t = {
6
+ on: {}
7
+ }, e = {}, r = {};
8
+ u(t, x), t._emitClasses = !0, t.init = !1;
9
+ const o = {}, s = d.map((a) => a.replace(/_/, "")), l = Object.assign({}, n);
10
+ return Object.keys(l).forEach((a) => {
11
+ typeof n[a] > "u" || (s.indexOf(a) >= 0 ? g(n[a]) ? (t[a] = {}, r[a] = {}, u(t[a], n[a]), u(r[a], n[a])) : (t[a] = n[a], r[a] = n[a]) : a.search(/on[A-Z]/) === 0 && typeof n[a] == "function" ? i ? e[`${a[2].toLowerCase()}${a.substr(3)}`] = n[a] : t.on[`${a[2].toLowerCase()}${a.substr(3)}`] = n[a] : o[a] = n[a]);
12
+ }), ["navigation", "pagination", "scrollbar"].forEach((a) => {
13
+ t[a] === !0 && (t[a] = {}), t[a] === !1 && delete t[a];
14
+ }), {
15
+ params: t,
16
+ passedParams: r,
17
+ rest: o,
18
+ events: e
19
+ };
20
+ }
21
+ function C(n, i) {
22
+ let {
23
+ el: t,
24
+ nextEl: e,
25
+ prevEl: r,
26
+ paginationEl: o,
27
+ scrollbarEl: s,
28
+ swiper: l
29
+ } = n;
30
+ m(i) && e && r && (l.params.navigation.nextEl = e, l.originalParams.navigation.nextEl = e, l.params.navigation.prevEl = r, l.originalParams.navigation.prevEl = r), h(i) && o && (l.params.pagination.el = o, l.originalParams.pagination.el = o), v(i) && s && (l.params.scrollbar.el = s, l.originalParams.scrollbar.el = s), l.init(t);
31
+ }
32
+ function S(n, i, t, e, r) {
33
+ const o = [];
34
+ if (!i) return o;
35
+ const s = (a) => {
36
+ o.indexOf(a) < 0 && o.push(a);
37
+ };
38
+ if (t && e) {
39
+ const a = e.map(r), c = t.map(r);
40
+ a.join("") !== c.join("") && s("children"), e.length !== t.length && s("children");
41
+ }
42
+ return d.filter((a) => a[0] === "_").map((a) => a.replace(/_/, "")).forEach((a) => {
43
+ if (a in n && a in i)
44
+ if (g(n[a]) && g(i[a])) {
45
+ const c = Object.keys(n[a]), p = Object.keys(i[a]);
46
+ c.length !== p.length ? s(a) : (c.forEach((f) => {
47
+ n[a][f] !== i[a][f] && s(a);
48
+ }), p.forEach((f) => {
49
+ n[a][f] !== i[a][f] && s(a);
50
+ }));
51
+ } else n[a] !== i[a] && s(a);
52
+ }), o;
53
+ }
54
+ const _ = (n) => {
55
+ !n || n.destroyed || !n.params.virtual || n.params.virtual && !n.params.virtual.enabled || (n.updateSlides(), n.updateProgress(), n.updateSlidesClasses(), n.parallax && n.params.parallax && n.params.parallax.enabled && n.parallax.setTranslate());
44
56
  };
45
- function g(e) {
46
- const n = v(e);
47
- let t;
48
- return n.readyState !== "loading" ? $(e) : (t = () => {
49
- $(e);
50
- }, n.addEventListener("DOMContentLoaded", t)), () => E(e, t);
51
- }
52
- typeof document < "u" && g();
53
- function O() {
54
- return f;
55
- }
56
- function C(e) {
57
- f = e, u(e, null);
58
- }
59
57
  export {
60
- g as addWindowFocusTracking,
61
- O as getInteractionModality,
62
- i as hasSetupGlobalListeners,
63
- C as setInteractionModality
58
+ S as a,
59
+ b as g,
60
+ C as m,
61
+ _ as u
64
62
  };
package/index231.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const $=require("./index170.js"),i=require("./index152.js");function b(e,r,f){return r!=null&&e.compare(r)<0||f!=null&&e.compare(f)>0}function D(e,r,f,n,s){let t={};for(let c in r)t[c]=Math.floor(r[c]/2),t[c]>0&&r[c]%2===0&&t[c]--;let o=l(e,r,f).subtract(t);return a(e,o,r,f,n,s)}function l(e,r,f,n,s){let t=e;return r.years?t=i.startOfYear(e):r.months?t=i.startOfMonth(e):r.weeks&&(t=i.startOfWeek(e,f)),a(e,t,r,f,n,s)}function p(e,r,f,n,s){let t={...r};t.days?t.days--:t.weeks?t.weeks--:t.months?t.months--:t.years&&t.years--;let o=l(e,r,f).subtract(t);return a(e,o,r,f,n,s)}function a(e,r,f,n,s,t){if(s&&e.compare(s)>=0){let o=i.maxDate(r,l($.toCalendarDate(s),f,n));o&&(r=o)}if(t&&e.compare(t)<=0){let o=i.minDate(r,p($.toCalendarDate(t),f,n));o&&(r=o)}return r}function u(e,r,f){if(r){let n=i.maxDate(e,$.toCalendarDate(r));n&&(e=n)}if(f){let n=i.minDate(e,$.toCalendarDate(f));n&&(e=n)}return e}function y(e,r,f){if(!f)return e;for(;e.compare(r)>=0&&f(e);)e=e.subtract({days:1});return e.compare(r)>=0?e:null}exports.alignCenter=D;exports.alignEnd=p;exports.alignStart=l;exports.constrainStart=a;exports.constrainValue=u;exports.isInvalid=b;exports.previousAvailableDate=y;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const M=["eventsPrefix","injectStyles","injectStylesUrls","modules","init","_direction","oneWayMovement","swiperElementNodeName","touchEventsTarget","initialSlide","_speed","cssMode","updateOnWindowResize","resizeObserver","nested","focusableElements","_enabled","_width","_height","preventInteractionOnTransition","userAgent","url","_edgeSwipeDetection","_edgeSwipeThreshold","_freeMode","_autoHeight","setWrapperSize","virtualTranslate","_effect","breakpoints","breakpointsBase","_spaceBetween","_slidesPerView","maxBackfaceHiddenSlides","_grid","_slidesPerGroup","_slidesPerGroupSkip","_slidesPerGroupAuto","_centeredSlides","_centeredSlidesBounds","_slidesOffsetBefore","_slidesOffsetAfter","normalizeSlideIndex","_centerInsufficientSlides","_watchOverflow","roundLengths","touchRatio","touchAngle","simulateTouch","_shortSwipes","_longSwipes","longSwipesRatio","longSwipesMs","_followFinger","allowTouchMove","_threshold","touchMoveStopPropagation","touchStartPreventDefault","touchStartForcePreventDefault","touchReleaseOnEdges","uniqueNavElements","_resistance","_resistanceRatio","_watchSlidesProgress","_grabCursor","preventClicks","preventClicksPropagation","_slideToClickedSlide","_loop","loopAdditionalSlides","loopAddBlankSlides","loopPreventsSliding","_rewind","_allowSlidePrev","_allowSlideNext","_swipeHandler","_noSwiping","noSwipingClass","noSwipingSelector","passiveListeners","containerModifierClass","slideClass","slideActiveClass","slideVisibleClass","slideFullyVisibleClass","slideNextClass","slidePrevClass","slideBlankClass","wrapperClass","lazyPreloaderClass","lazyPreloadPrevNext","runCallbacksOnInit","observer","observeParents","observeSlideChildren","a11y","_autoplay","_controller","coverflowEffect","cubeEffect","fadeEffect","flipEffect","creativeEffect","cardsEffect","hashNavigation","history","keyboard","mousewheel","_navigation","_pagination","parallax","_scrollbar","_thumbs","virtual","zoom","control"];function g(t){return typeof t=="object"&&t!==null&&t.constructor&&Object.prototype.toString.call(t).slice(8,-1)==="Object"&&!t.__swiper__}function j(t,i){const r=["__proto__","constructor","prototype"];Object.keys(i).filter(e=>r.indexOf(e)<0).forEach(e=>{typeof t[e]>"u"?t[e]=i[e]:g(i[e])&&g(t[e])&&Object.keys(i[e]).length>0?i[e].__swiper__?t[e]=i[e]:j(t[e],i[e]):t[e]=i[e]})}function z(t){return t===void 0&&(t={}),t.navigation&&typeof t.navigation.nextEl>"u"&&typeof t.navigation.prevEl>"u"}function B(t){return t===void 0&&(t={}),t.pagination&&typeof t.pagination.el>"u"}function I(t){return t===void 0&&(t={}),t.scrollbar&&typeof t.scrollbar.el>"u"}function L(t){t===void 0&&(t="");const i=t.split(" ").map(e=>e.trim()).filter(e=>!!e),r=[];return i.forEach(e=>{r.indexOf(e)<0&&r.push(e)}),r.join(" ")}function N(t){return t===void 0&&(t=""),t?t.includes("swiper-wrapper")?t:`swiper-wrapper ${t}`:"swiper-wrapper"}function A(t){let{swiper:i,slides:r,passedParams:e,changedParams:o,nextEl:s,prevEl:a,scrollbarEl:d,paginationEl:c}=t;const h=o.filter(n=>n!=="children"&&n!=="direction"&&n!=="wrapperClass"),{params:l,pagination:p,navigation:f,scrollbar:v,virtual:u,thumbs:E}=i;let S,_,P,C,x,m,O,b;o.includes("thumbs")&&e.thumbs&&e.thumbs.swiper&&!e.thumbs.swiper.destroyed&&l.thumbs&&(!l.thumbs.swiper||l.thumbs.swiper.destroyed)&&(S=!0),o.includes("controller")&&e.controller&&e.controller.control&&l.controller&&!l.controller.control&&(_=!0),o.includes("pagination")&&e.pagination&&(e.pagination.el||c)&&(l.pagination||l.pagination===!1)&&p&&!p.el&&(P=!0),o.includes("scrollbar")&&e.scrollbar&&(e.scrollbar.el||d)&&(l.scrollbar||l.scrollbar===!1)&&v&&!v.el&&(C=!0),o.includes("navigation")&&e.navigation&&(e.navigation.prevEl||a)&&(e.navigation.nextEl||s)&&(l.navigation||l.navigation===!1)&&f&&!f.prevEl&&!f.nextEl&&(x=!0);const T=n=>{i[n]&&(i[n].destroy(),n==="navigation"?(i.isElement&&(i[n].prevEl.remove(),i[n].nextEl.remove()),l[n].prevEl=void 0,l[n].nextEl=void 0,i[n].prevEl=void 0,i[n].nextEl=void 0):(i.isElement&&i[n].el.remove(),l[n].el=void 0,i[n].el=void 0))};o.includes("loop")&&i.isElement&&(l.loop&&!e.loop?m=!0:!l.loop&&e.loop?O=!0:b=!0),h.forEach(n=>{if(g(l[n])&&g(e[n]))Object.assign(l[n],e[n]),(n==="navigation"||n==="pagination"||n==="scrollbar")&&"enabled"in e[n]&&!e[n].enabled&&T(n);else{const w=e[n];(w===!0||w===!1)&&(n==="navigation"||n==="pagination"||n==="scrollbar")?w===!1&&T(n):l[n]=e[n]}}),h.includes("controller")&&!_&&i.controller&&i.controller.control&&l.controller&&l.controller.control&&(i.controller.control=l.controller.control),o.includes("children")&&r&&u&&l.virtual.enabled?(u.slides=r,u.update(!0)):o.includes("virtual")&&u&&l.virtual.enabled&&(r&&(u.slides=r),u.update(!0)),o.includes("children")&&r&&l.loop&&(b=!0),S&&E.init()&&E.update(!0),_&&(i.controller.control=l.controller.control),P&&(i.isElement&&(!c||typeof c=="string")&&(c=document.createElement("div"),c.classList.add("swiper-pagination"),c.part.add("pagination"),i.el.appendChild(c)),c&&(l.pagination.el=c),p.init(),p.render(),p.update()),C&&(i.isElement&&(!d||typeof d=="string")&&(d=document.createElement("div"),d.classList.add("swiper-scrollbar"),d.part.add("scrollbar"),i.el.appendChild(d)),d&&(l.scrollbar.el=d),v.init(),v.updateSize(),v.setTranslate()),x&&(i.isElement&&((!s||typeof s=="string")&&(s=document.createElement("div"),s.classList.add("swiper-button-next"),s.innerHTML=i.hostEl.constructor.nextButtonSvg,s.part.add("button-next"),i.el.appendChild(s)),(!a||typeof a=="string")&&(a=document.createElement("div"),a.classList.add("swiper-button-prev"),a.innerHTML=i.hostEl.constructor.prevButtonSvg,a.part.add("button-prev"),i.el.appendChild(a))),s&&(l.navigation.nextEl=s),a&&(l.navigation.prevEl=a),f.init(),f.update()),o.includes("allowSlideNext")&&(i.allowSlideNext=e.allowSlideNext),o.includes("allowSlidePrev")&&(i.allowSlidePrev=e.allowSlidePrev),o.includes("direction")&&i.changeDirection(e.direction,!1),(m||b)&&i.loopDestroy(),(O||b)&&i.loopCreate(),i.update()}exports.a=B;exports.b=I;exports.d=L;exports.e=j;exports.i=g;exports.n=z;exports.p=M;exports.u=A;exports.w=N;
package/index231.mjs CHANGED
@@ -1,62 +1,191 @@
1
- import { toCalendarDate as o } from "./index170.mjs";
2
- import { startOfYear as l, startOfMonth as x, startOfWeek as w, maxDate as i, minDate as b } from "./index152.mjs";
3
- function m(f, e, t) {
4
- return e != null && f.compare(e) < 0 || t != null && f.compare(t) > 0;
5
- }
6
- function u(f, e, t, s, $) {
7
- let r = {};
8
- for (let n in e)
9
- r[n] = Math.floor(e[n] / 2), r[n] > 0 && e[n] % 2 === 0 && r[n]--;
10
- let c = a(f, e, t).subtract(r);
11
- return p(f, c, e, t, s, $);
12
- }
13
- function a(f, e, t, s, $) {
14
- let r = f;
15
- return e.years ? r = l(f) : e.months ? r = x(f) : e.weeks && (r = w(f, t)), p(f, r, e, t, s, $);
16
- }
17
- function D(f, e, t, s, $) {
18
- let r = {
19
- ...e
20
- };
21
- r.days ? r.days-- : r.weeks ? r.weeks-- : r.months ? r.months-- : r.years && r.years--;
22
- let c = a(f, e, t).subtract(r);
23
- return p(f, c, e, t, s, $);
24
- }
25
- function p(f, e, t, s, $, r) {
26
- if ($ && f.compare($) >= 0) {
27
- let c = i(e, a(o($), t, s));
28
- c && (e = c);
29
- }
30
- if (r && f.compare(r) <= 0) {
31
- let c = b(e, D(o(r), t, s));
32
- c && (e = c);
33
- }
34
- return e;
35
- }
36
- function k(f, e, t) {
37
- if (e) {
38
- let s = i(f, o(e));
39
- s && (f = s);
40
- }
41
- if (t) {
42
- let s = b(f, o(t));
43
- s && (f = s);
44
- }
45
- return f;
46
- }
47
- function O(f, e, t) {
48
- if (!t) return f;
49
- for (; f.compare(e) >= 0 && t(f); ) f = f.subtract({
50
- days: 1
1
+ const z = [
2
+ "eventsPrefix",
3
+ "injectStyles",
4
+ "injectStylesUrls",
5
+ "modules",
6
+ "init",
7
+ "_direction",
8
+ "oneWayMovement",
9
+ "swiperElementNodeName",
10
+ "touchEventsTarget",
11
+ "initialSlide",
12
+ "_speed",
13
+ "cssMode",
14
+ "updateOnWindowResize",
15
+ "resizeObserver",
16
+ "nested",
17
+ "focusableElements",
18
+ "_enabled",
19
+ "_width",
20
+ "_height",
21
+ "preventInteractionOnTransition",
22
+ "userAgent",
23
+ "url",
24
+ "_edgeSwipeDetection",
25
+ "_edgeSwipeThreshold",
26
+ "_freeMode",
27
+ "_autoHeight",
28
+ "setWrapperSize",
29
+ "virtualTranslate",
30
+ "_effect",
31
+ "breakpoints",
32
+ "breakpointsBase",
33
+ "_spaceBetween",
34
+ "_slidesPerView",
35
+ "maxBackfaceHiddenSlides",
36
+ "_grid",
37
+ "_slidesPerGroup",
38
+ "_slidesPerGroupSkip",
39
+ "_slidesPerGroupAuto",
40
+ "_centeredSlides",
41
+ "_centeredSlidesBounds",
42
+ "_slidesOffsetBefore",
43
+ "_slidesOffsetAfter",
44
+ "normalizeSlideIndex",
45
+ "_centerInsufficientSlides",
46
+ "_watchOverflow",
47
+ "roundLengths",
48
+ "touchRatio",
49
+ "touchAngle",
50
+ "simulateTouch",
51
+ "_shortSwipes",
52
+ "_longSwipes",
53
+ "longSwipesRatio",
54
+ "longSwipesMs",
55
+ "_followFinger",
56
+ "allowTouchMove",
57
+ "_threshold",
58
+ "touchMoveStopPropagation",
59
+ "touchStartPreventDefault",
60
+ "touchStartForcePreventDefault",
61
+ "touchReleaseOnEdges",
62
+ "uniqueNavElements",
63
+ "_resistance",
64
+ "_resistanceRatio",
65
+ "_watchSlidesProgress",
66
+ "_grabCursor",
67
+ "preventClicks",
68
+ "preventClicksPropagation",
69
+ "_slideToClickedSlide",
70
+ "_loop",
71
+ "loopAdditionalSlides",
72
+ "loopAddBlankSlides",
73
+ "loopPreventsSliding",
74
+ "_rewind",
75
+ "_allowSlidePrev",
76
+ "_allowSlideNext",
77
+ "_swipeHandler",
78
+ "_noSwiping",
79
+ "noSwipingClass",
80
+ "noSwipingSelector",
81
+ "passiveListeners",
82
+ "containerModifierClass",
83
+ "slideClass",
84
+ "slideActiveClass",
85
+ "slideVisibleClass",
86
+ "slideFullyVisibleClass",
87
+ "slideNextClass",
88
+ "slidePrevClass",
89
+ "slideBlankClass",
90
+ "wrapperClass",
91
+ "lazyPreloaderClass",
92
+ "lazyPreloadPrevNext",
93
+ "runCallbacksOnInit",
94
+ "observer",
95
+ "observeParents",
96
+ "observeSlideChildren",
97
+ // modules
98
+ "a11y",
99
+ "_autoplay",
100
+ "_controller",
101
+ "coverflowEffect",
102
+ "cubeEffect",
103
+ "fadeEffect",
104
+ "flipEffect",
105
+ "creativeEffect",
106
+ "cardsEffect",
107
+ "hashNavigation",
108
+ "history",
109
+ "keyboard",
110
+ "mousewheel",
111
+ "_navigation",
112
+ "_pagination",
113
+ "parallax",
114
+ "_scrollbar",
115
+ "_thumbs",
116
+ "virtual",
117
+ "zoom",
118
+ "control"
119
+ ];
120
+ function b(t) {
121
+ return typeof t == "object" && t !== null && t.constructor && Object.prototype.toString.call(t).slice(8, -1) === "Object" && !t.__swiper__;
122
+ }
123
+ function j(t, i) {
124
+ const r = ["__proto__", "constructor", "prototype"];
125
+ Object.keys(i).filter((e) => r.indexOf(e) < 0).forEach((e) => {
126
+ typeof t[e] > "u" ? t[e] = i[e] : b(i[e]) && b(t[e]) && Object.keys(i[e]).length > 0 ? i[e].__swiper__ ? t[e] = i[e] : j(t[e], i[e]) : t[e] = i[e];
51
127
  });
52
- return f.compare(e) >= 0 ? f : null;
128
+ }
129
+ function M(t) {
130
+ return t === void 0 && (t = {}), t.navigation && typeof t.navigation.nextEl > "u" && typeof t.navigation.prevEl > "u";
131
+ }
132
+ function B(t) {
133
+ return t === void 0 && (t = {}), t.pagination && typeof t.pagination.el > "u";
134
+ }
135
+ function I(t) {
136
+ return t === void 0 && (t = {}), t.scrollbar && typeof t.scrollbar.el > "u";
137
+ }
138
+ function L(t) {
139
+ t === void 0 && (t = "");
140
+ const i = t.split(" ").map((e) => e.trim()).filter((e) => !!e), r = [];
141
+ return i.forEach((e) => {
142
+ r.indexOf(e) < 0 && r.push(e);
143
+ }), r.join(" ");
144
+ }
145
+ function N(t) {
146
+ return t === void 0 && (t = ""), t ? t.includes("swiper-wrapper") ? t : `swiper-wrapper ${t}` : "swiper-wrapper";
147
+ }
148
+ function A(t) {
149
+ let {
150
+ swiper: i,
151
+ slides: r,
152
+ passedParams: e,
153
+ changedParams: o,
154
+ nextEl: s,
155
+ prevEl: a,
156
+ scrollbarEl: d,
157
+ paginationEl: c
158
+ } = t;
159
+ const h = o.filter((n) => n !== "children" && n !== "direction" && n !== "wrapperClass"), {
160
+ params: l,
161
+ pagination: p,
162
+ navigation: f,
163
+ scrollbar: v,
164
+ virtual: u,
165
+ thumbs: E
166
+ } = i;
167
+ let S, _, x, C, P, m, O, g;
168
+ o.includes("thumbs") && e.thumbs && e.thumbs.swiper && !e.thumbs.swiper.destroyed && l.thumbs && (!l.thumbs.swiper || l.thumbs.swiper.destroyed) && (S = !0), o.includes("controller") && e.controller && e.controller.control && l.controller && !l.controller.control && (_ = !0), o.includes("pagination") && e.pagination && (e.pagination.el || c) && (l.pagination || l.pagination === !1) && p && !p.el && (x = !0), o.includes("scrollbar") && e.scrollbar && (e.scrollbar.el || d) && (l.scrollbar || l.scrollbar === !1) && v && !v.el && (C = !0), o.includes("navigation") && e.navigation && (e.navigation.prevEl || a) && (e.navigation.nextEl || s) && (l.navigation || l.navigation === !1) && f && !f.prevEl && !f.nextEl && (P = !0);
169
+ const T = (n) => {
170
+ i[n] && (i[n].destroy(), n === "navigation" ? (i.isElement && (i[n].prevEl.remove(), i[n].nextEl.remove()), l[n].prevEl = void 0, l[n].nextEl = void 0, i[n].prevEl = void 0, i[n].nextEl = void 0) : (i.isElement && i[n].el.remove(), l[n].el = void 0, i[n].el = void 0));
171
+ };
172
+ o.includes("loop") && i.isElement && (l.loop && !e.loop ? m = !0 : !l.loop && e.loop ? O = !0 : g = !0), h.forEach((n) => {
173
+ if (b(l[n]) && b(e[n]))
174
+ Object.assign(l[n], e[n]), (n === "navigation" || n === "pagination" || n === "scrollbar") && "enabled" in e[n] && !e[n].enabled && T(n);
175
+ else {
176
+ const w = e[n];
177
+ (w === !0 || w === !1) && (n === "navigation" || n === "pagination" || n === "scrollbar") ? w === !1 && T(n) : l[n] = e[n];
178
+ }
179
+ }), h.includes("controller") && !_ && i.controller && i.controller.control && l.controller && l.controller.control && (i.controller.control = l.controller.control), o.includes("children") && r && u && l.virtual.enabled ? (u.slides = r, u.update(!0)) : o.includes("virtual") && u && l.virtual.enabled && (r && (u.slides = r), u.update(!0)), o.includes("children") && r && l.loop && (g = !0), S && E.init() && E.update(!0), _ && (i.controller.control = l.controller.control), x && (i.isElement && (!c || typeof c == "string") && (c = document.createElement("div"), c.classList.add("swiper-pagination"), c.part.add("pagination"), i.el.appendChild(c)), c && (l.pagination.el = c), p.init(), p.render(), p.update()), C && (i.isElement && (!d || typeof d == "string") && (d = document.createElement("div"), d.classList.add("swiper-scrollbar"), d.part.add("scrollbar"), i.el.appendChild(d)), d && (l.scrollbar.el = d), v.init(), v.updateSize(), v.setTranslate()), P && (i.isElement && ((!s || typeof s == "string") && (s = document.createElement("div"), s.classList.add("swiper-button-next"), s.innerHTML = i.hostEl.constructor.nextButtonSvg, s.part.add("button-next"), i.el.appendChild(s)), (!a || typeof a == "string") && (a = document.createElement("div"), a.classList.add("swiper-button-prev"), a.innerHTML = i.hostEl.constructor.prevButtonSvg, a.part.add("button-prev"), i.el.appendChild(a))), s && (l.navigation.nextEl = s), a && (l.navigation.prevEl = a), f.init(), f.update()), o.includes("allowSlideNext") && (i.allowSlideNext = e.allowSlideNext), o.includes("allowSlidePrev") && (i.allowSlidePrev = e.allowSlidePrev), o.includes("direction") && i.changeDirection(e.direction, !1), (m || g) && i.loopDestroy(), (O || g) && i.loopCreate(), i.update();
53
180
  }
54
181
  export {
55
- u as alignCenter,
56
- D as alignEnd,
57
- a as alignStart,
58
- p as constrainStart,
59
- k as constrainValue,
60
- m as isInvalid,
61
- O as previousAvailableDate
182
+ B as a,
183
+ I as b,
184
+ L as d,
185
+ j as e,
186
+ b as i,
187
+ M as n,
188
+ z as p,
189
+ A as u,
190
+ N as w
62
191
  };
package/index270.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function r(e){return e!==null&&typeof e=="object"&&"constructor"in e&&e.constructor===Object}function o(e,n){e===void 0&&(e={}),n===void 0&&(n={}),Object.keys(n).forEach(t=>{typeof e[t]>"u"?e[t]=n[t]:r(n[t])&&r(e[t])&&Object.keys(n[t]).length>0&&o(e[t],n[t])})}const u={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}},createElementNS(){return{}},importNode(){return null},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function i(){const e=typeof document<"u"?document:{};return o(e,u),e}const c={document:u,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle(){return{getPropertyValue(){return""}}},Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia(){return{}},requestAnimationFrame(e){return typeof setTimeout>"u"?(e(),null):setTimeout(e,0)},cancelAnimationFrame(e){typeof setTimeout>"u"||clearTimeout(e)}};function s(){const e=typeof window<"u"?window:{};return o(e,c),e}exports.a=s;exports.g=i;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=7e3;let t=null;function s(o,e="assertive",i=r){t?t.announce(o,e,i):(t=new c,(typeof IS_REACT_ACT_ENVIRONMENT=="boolean"?IS_REACT_ACT_ENVIRONMENT:typeof jest<"u")?t.announce(o,e,i):setTimeout(()=>{t!=null&&t.isAttached()&&(t==null||t.announce(o,e,i))},100))}function u(o){t&&t.clear(o)}class c{isAttached(){var e;return(e=this.node)===null||e===void 0?void 0:e.isConnected}createLog(e){let i=document.createElement("div");return i.setAttribute("role","log"),i.setAttribute("aria-live",e),i.setAttribute("aria-relevant","additions"),i}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(e,i="assertive",a=r){var d,l;if(!this.node)return;let n=document.createElement("div");typeof e=="object"?(n.setAttribute("role","img"),n.setAttribute("aria-labelledby",e["aria-labelledby"])):n.textContent=e,i==="assertive"?(d=this.assertiveLog)===null||d===void 0||d.appendChild(n):(l=this.politeLog)===null||l===void 0||l.appendChild(n),e!==""&&setTimeout(()=>{n.remove()},a)}clear(e){this.node&&((!e||e==="assertive")&&this.assertiveLog&&(this.assertiveLog.innerHTML=""),(!e||e==="polite")&&this.politeLog&&(this.politeLog.innerHTML=""))}constructor(){this.node=null,this.assertiveLog=null,this.politeLog=null,typeof document<"u"&&(this.node=document.createElement("div"),this.node.dataset.liveAnnouncer="true",Object.assign(this.node.style,{border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"}),this.assertiveLog=this.createLog("assertive"),this.node.appendChild(this.assertiveLog),this.politeLog=this.createLog("polite"),this.node.appendChild(this.politeLog),document.body.prepend(this.node))}}exports.announce=s;exports.clearAnnouncer=u;
package/index270.mjs CHANGED
@@ -1,133 +1,51 @@
1
- function r(e) {
2
- return e !== null && typeof e == "object" && "constructor" in e && e.constructor === Object;
1
+ let t = null;
2
+ function s(o, e = "assertive", i = 7e3) {
3
+ t ? t.announce(o, e, i) : (t = new a(), (typeof IS_REACT_ACT_ENVIRONMENT == "boolean" ? IS_REACT_ACT_ENVIRONMENT : typeof jest < "u") ? t.announce(o, e, i) : setTimeout(() => {
4
+ t != null && t.isAttached() && (t == null || t.announce(o, e, i));
5
+ }, 100));
3
6
  }
4
- function o(e, n) {
5
- e === void 0 && (e = {}), n === void 0 && (n = {}), Object.keys(n).forEach((t) => {
6
- typeof e[t] > "u" ? e[t] = n[t] : r(n[t]) && r(e[t]) && Object.keys(n[t]).length > 0 && o(e[t], n[t]);
7
- });
7
+ function h(o) {
8
+ t && t.clear(o);
8
9
  }
9
- const u = {
10
- body: {},
11
- addEventListener() {
12
- },
13
- removeEventListener() {
14
- },
15
- activeElement: {
16
- blur() {
17
- },
18
- nodeName: ""
19
- },
20
- querySelector() {
21
- return null;
22
- },
23
- querySelectorAll() {
24
- return [];
25
- },
26
- getElementById() {
27
- return null;
28
- },
29
- createEvent() {
30
- return {
31
- initEvent() {
32
- }
33
- };
34
- },
35
- createElement() {
36
- return {
37
- children: [],
38
- childNodes: [],
39
- style: {},
40
- setAttribute() {
41
- },
42
- getElementsByTagName() {
43
- return [];
44
- }
45
- };
46
- },
47
- createElementNS() {
48
- return {};
49
- },
50
- importNode() {
51
- return null;
52
- },
53
- location: {
54
- hash: "",
55
- host: "",
56
- hostname: "",
57
- href: "",
58
- origin: "",
59
- pathname: "",
60
- protocol: "",
61
- search: ""
10
+ class a {
11
+ isAttached() {
12
+ var e;
13
+ return (e = this.node) === null || e === void 0 ? void 0 : e.isConnected;
62
14
  }
63
- };
64
- function c() {
65
- const e = typeof document < "u" ? document : {};
66
- return o(e, u), e;
67
- }
68
- const i = {
69
- document: u,
70
- navigator: {
71
- userAgent: ""
72
- },
73
- location: {
74
- hash: "",
75
- host: "",
76
- hostname: "",
77
- href: "",
78
- origin: "",
79
- pathname: "",
80
- protocol: "",
81
- search: ""
82
- },
83
- history: {
84
- replaceState() {
85
- },
86
- pushState() {
87
- },
88
- go() {
89
- },
90
- back() {
91
- }
92
- },
93
- CustomEvent: function() {
94
- return this;
95
- },
96
- addEventListener() {
97
- },
98
- removeEventListener() {
99
- },
100
- getComputedStyle() {
101
- return {
102
- getPropertyValue() {
103
- return "";
104
- }
105
- };
106
- },
107
- Image() {
108
- },
109
- Date() {
110
- },
111
- screen: {},
112
- setTimeout() {
113
- },
114
- clearTimeout() {
115
- },
116
- matchMedia() {
117
- return {};
118
- },
119
- requestAnimationFrame(e) {
120
- return typeof setTimeout > "u" ? (e(), null) : setTimeout(e, 0);
121
- },
122
- cancelAnimationFrame(e) {
123
- typeof setTimeout > "u" || clearTimeout(e);
15
+ createLog(e) {
16
+ let i = document.createElement("div");
17
+ return i.setAttribute("role", "log"), i.setAttribute("aria-live", e), i.setAttribute("aria-relevant", "additions"), i;
18
+ }
19
+ destroy() {
20
+ this.node && (document.body.removeChild(this.node), this.node = null);
21
+ }
22
+ announce(e, i = "assertive", r = 7e3) {
23
+ var d, l;
24
+ if (!this.node) return;
25
+ let n = document.createElement("div");
26
+ typeof e == "object" ? (n.setAttribute("role", "img"), n.setAttribute("aria-labelledby", e["aria-labelledby"])) : n.textContent = e, i === "assertive" ? (d = this.assertiveLog) === null || d === void 0 || d.appendChild(n) : (l = this.politeLog) === null || l === void 0 || l.appendChild(n), e !== "" && setTimeout(() => {
27
+ n.remove();
28
+ }, r);
29
+ }
30
+ clear(e) {
31
+ this.node && ((!e || e === "assertive") && this.assertiveLog && (this.assertiveLog.innerHTML = ""), (!e || e === "polite") && this.politeLog && (this.politeLog.innerHTML = ""));
32
+ }
33
+ constructor() {
34
+ this.node = null, this.assertiveLog = null, this.politeLog = null, typeof document < "u" && (this.node = document.createElement("div"), this.node.dataset.liveAnnouncer = "true", Object.assign(this.node.style, {
35
+ border: 0,
36
+ clip: "rect(0 0 0 0)",
37
+ clipPath: "inset(50%)",
38
+ height: "1px",
39
+ margin: "-1px",
40
+ overflow: "hidden",
41
+ padding: 0,
42
+ position: "absolute",
43
+ width: "1px",
44
+ whiteSpace: "nowrap"
45
+ }), this.assertiveLog = this.createLog("assertive"), this.node.appendChild(this.assertiveLog), this.politeLog = this.createLog("polite"), this.node.appendChild(this.politeLog), document.body.prepend(this.node));
124
46
  }
125
- };
126
- function s() {
127
- const e = typeof window < "u" ? window : {};
128
- return o(e, i), e;
129
47
  }
130
48
  export {
131
- s as a,
132
- c as g
49
+ s as announce,
50
+ h as clearAnnouncer
133
51
  };