uikit 3.25.26 → 3.25.27-dev.9e97c1f

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 (226) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/build/prefix.js +1 -1
  3. package/build/publishDev.js +1 -1
  4. package/build/scope.js +1 -1
  5. package/build/scss.js +1 -1
  6. package/build/util.js +0 -2
  7. package/dist/css/uikit-core-rtl.css +1327 -1204
  8. package/dist/css/uikit-core-rtl.min.css +1 -1
  9. package/dist/css/uikit-core.css +1327 -1204
  10. package/dist/css/uikit-core.min.css +1 -1
  11. package/dist/css/uikit-rtl.css +1339 -1223
  12. package/dist/css/uikit-rtl.min.css +1 -1
  13. package/dist/css/uikit.css +1339 -1223
  14. package/dist/css/uikit.min.css +1 -1
  15. package/dist/js/components/countdown.js +1 -1
  16. package/dist/js/components/countdown.min.js +1 -1
  17. package/dist/js/components/filter.js +1 -1
  18. package/dist/js/components/filter.min.js +1 -1
  19. package/dist/js/components/lightbox-panel.js +149 -146
  20. package/dist/js/components/lightbox-panel.min.js +1 -1
  21. package/dist/js/components/lightbox.js +150 -147
  22. package/dist/js/components/lightbox.min.js +1 -1
  23. package/dist/js/components/marquee.js +215 -0
  24. package/dist/js/components/marquee.min.js +1 -0
  25. package/dist/js/components/notification.js +8 -6
  26. package/dist/js/components/notification.min.js +1 -1
  27. package/dist/js/components/parallax.js +8 -12
  28. package/dist/js/components/parallax.min.js +1 -1
  29. package/dist/js/components/slider-parallax.js +8 -12
  30. package/dist/js/components/slider-parallax.min.js +1 -1
  31. package/dist/js/components/slider.js +65 -26
  32. package/dist/js/components/slider.min.js +1 -1
  33. package/dist/js/components/slideshow-parallax.js +8 -12
  34. package/dist/js/components/slideshow-parallax.min.js +1 -1
  35. package/dist/js/components/slideshow.js +95 -103
  36. package/dist/js/components/slideshow.min.js +1 -1
  37. package/dist/js/components/sortable.js +1 -1
  38. package/dist/js/components/sortable.min.js +1 -1
  39. package/dist/js/components/tooltip.js +15 -17
  40. package/dist/js/components/tooltip.min.js +1 -1
  41. package/dist/js/components/upload.js +1 -1
  42. package/dist/js/components/upload.min.js +1 -1
  43. package/dist/js/uikit-core.js +888 -337
  44. package/dist/js/uikit-core.min.js +1 -1
  45. package/dist/js/uikit-icons.js +1 -1
  46. package/dist/js/uikit-icons.min.js +1 -1
  47. package/dist/js/uikit.js +766 -433
  48. package/dist/js/uikit.min.js +1 -1
  49. package/package.json +1 -1
  50. package/src/js/api/component.js +2 -3
  51. package/src/js/api/observables.js +16 -4
  52. package/src/js/api/options.js +6 -3
  53. package/src/js/api/props.js +1 -3
  54. package/src/js/api/state.js +7 -8
  55. package/src/js/components/index.js +1 -0
  56. package/src/js/components/internal/lightbox-animations.js +7 -26
  57. package/src/js/components/internal/slider-preload.js +1 -0
  58. package/src/js/components/internal/slideshow-animations.js +15 -62
  59. package/src/js/components/lightbox-panel.js +123 -109
  60. package/src/js/components/lightbox.js +5 -8
  61. package/src/js/components/marquee.js +156 -0
  62. package/src/js/components/notification.js +7 -5
  63. package/src/js/core/accordion.js +62 -31
  64. package/src/js/core/alert.js +1 -1
  65. package/src/js/core/drop.js +4 -3
  66. package/src/js/core/dropnav.js +13 -32
  67. package/src/js/core/grid.js +5 -19
  68. package/src/js/core/margin.js +3 -0
  69. package/src/js/core/overflow-auto.js +5 -1
  70. package/src/js/core/sticky.js +1 -1
  71. package/src/js/core/switcher.js +18 -62
  72. package/src/js/core/video.js +236 -21
  73. package/src/js/mixin/connect.js +90 -0
  74. package/src/js/mixin/internal/slideshow-animations.js +5 -13
  75. package/src/js/mixin/internal/slideshow-transitioner.js +2 -2
  76. package/src/js/mixin/parallax.js +1 -4
  77. package/src/js/mixin/position.js +1 -1
  78. package/src/js/mixin/scroll-driven.js +57 -0
  79. package/src/js/mixin/slider-nav.js +2 -12
  80. package/src/js/mixin/slider-parallax.js +9 -38
  81. package/src/js/mixin/togglable.js +13 -14
  82. package/src/js/util/attr.js +7 -7
  83. package/src/js/util/dom.js +3 -4
  84. package/src/js/util/keys.js +14 -0
  85. package/src/js/util/lang.js +2 -2
  86. package/src/js/util/player.js +4 -2
  87. package/src/js/util/style.js +12 -13
  88. package/src/js/util/viewport.js +22 -25
  89. package/src/less/components/_import.less +8 -3
  90. package/src/less/components/animation.less +1 -1
  91. package/src/less/components/base.less +1 -1
  92. package/src/less/components/button.less +1 -1
  93. package/src/less/components/card.less +8 -8
  94. package/src/less/components/dropcap.less +71 -0
  95. package/src/less/components/floating-shadow.less +66 -0
  96. package/src/less/components/form.less +15 -15
  97. package/src/less/components/grid.less +58 -65
  98. package/src/less/components/lightbox.less +2 -8
  99. package/src/less/components/logo.less +94 -0
  100. package/src/less/components/margin.less +155 -124
  101. package/src/less/components/marquee.less +133 -0
  102. package/src/less/components/modal.less +1 -4
  103. package/src/less/components/nav.less +1 -1
  104. package/src/less/components/navbar.less +1 -1
  105. package/src/less/components/padding.less +9 -9
  106. package/src/less/components/position.less +9 -4
  107. package/src/less/components/search.less +1 -1
  108. package/src/less/components/slideshow.less +1 -4
  109. package/src/less/components/switcher.less +5 -2
  110. package/src/less/components/table.less +4 -4
  111. package/src/less/components/text.less +10 -4
  112. package/src/less/components/utility.less +0 -163
  113. package/src/less/components/visibility.less +4 -4
  114. package/src/less/theme/_import.less +6 -2
  115. package/src/less/theme/alert.less +0 -5
  116. package/src/less/theme/dropcap.less +29 -0
  117. package/src/less/theme/floating-shadow.less +20 -0
  118. package/src/less/theme/logo.less +29 -0
  119. package/src/less/theme/marquee.less +14 -0
  120. package/src/less/theme/thumbnav.less +1 -4
  121. package/src/less/theme/utility.less +0 -32
  122. package/src/scss/components/_import.scss +8 -3
  123. package/src/scss/components/animation.scss +1 -1
  124. package/src/scss/components/base.scss +1 -1
  125. package/src/scss/components/button.scss +1 -1
  126. package/src/scss/components/card.scss +8 -8
  127. package/src/scss/components/dropcap.scss +63 -0
  128. package/src/scss/components/floating-shadow.scss +63 -0
  129. package/src/scss/components/form.scss +14 -14
  130. package/src/scss/components/grid.scss +57 -64
  131. package/src/scss/components/lightbox.scss +2 -8
  132. package/src/scss/components/logo.scss +75 -0
  133. package/src/scss/components/margin.scss +155 -124
  134. package/src/scss/components/marquee.scss +136 -0
  135. package/src/scss/components/modal.scss +1 -4
  136. package/src/scss/components/nav.scss +1 -1
  137. package/src/scss/components/navbar.scss +1 -1
  138. package/src/scss/components/padding.scss +9 -9
  139. package/src/scss/components/position.scss +9 -4
  140. package/src/scss/components/search.scss +1 -1
  141. package/src/scss/components/slideshow.scss +1 -4
  142. package/src/scss/components/switcher.scss +5 -2
  143. package/src/scss/components/table.scss +4 -4
  144. package/src/scss/components/text.scss +10 -4
  145. package/src/scss/components/utility.scss +0 -129
  146. package/src/scss/components/visibility.scss +4 -4
  147. package/src/scss/mixins-theme.scss +44 -43
  148. package/src/scss/mixins.scss +40 -31
  149. package/src/scss/variables-theme.scss +14 -14
  150. package/src/scss/variables.scss +14 -14
  151. package/tests/accordion.html +77 -10
  152. package/tests/alert.html +1 -1
  153. package/tests/align.html +5 -5
  154. package/tests/animation.html +4 -4
  155. package/tests/article.html +7 -7
  156. package/tests/background.html +2 -2
  157. package/tests/badge.html +1 -1
  158. package/tests/base.html +2 -2
  159. package/tests/button.html +1 -1
  160. package/tests/card.html +15 -15
  161. package/tests/close.html +2 -2
  162. package/tests/comment.html +9 -9
  163. package/tests/container.html +2 -2
  164. package/tests/countdown.html +21 -21
  165. package/tests/cover.html +3 -3
  166. package/tests/description-list.html +1 -1
  167. package/tests/divider.html +3 -3
  168. package/tests/dotnav.html +1 -1
  169. package/tests/drop.html +7 -7
  170. package/tests/dropbar.html +5 -5
  171. package/tests/dropcap.html +26 -0
  172. package/tests/dropdown.html +1 -1
  173. package/tests/dropnav.html +18 -18
  174. package/tests/filter.html +3 -3
  175. package/tests/floating-shadow.html +44 -0
  176. package/tests/form.html +14 -14
  177. package/tests/grid.html +41 -47
  178. package/tests/heading.html +2 -2
  179. package/tests/height-viewport.html +4 -4
  180. package/tests/height.html +5 -5
  181. package/tests/icon.html +8 -8
  182. package/tests/image.html +6 -6
  183. package/tests/index.html +13 -13
  184. package/tests/js/index.js +1 -1
  185. package/tests/leader.html +5 -5
  186. package/tests/lightbox.html +6 -6
  187. package/tests/link.html +1 -1
  188. package/tests/list.html +4 -4
  189. package/tests/logo.html +84 -0
  190. package/tests/margin.html +59 -7
  191. package/tests/marker.html +3 -3
  192. package/tests/marquee.html +617 -0
  193. package/tests/modal.html +3 -3
  194. package/tests/nav.html +5 -5
  195. package/tests/navbar.html +27 -27
  196. package/tests/notification.html +8 -2
  197. package/tests/offcanvas.html +12 -12
  198. package/tests/overlay.html +3 -3
  199. package/tests/padding.html +1 -1
  200. package/tests/pagination.html +3 -3
  201. package/tests/parallax.html +1 -1
  202. package/tests/position.html +6 -6
  203. package/tests/scrollspy.html +13 -13
  204. package/tests/search.html +5 -5
  205. package/tests/section.html +17 -17
  206. package/tests/slidenav.html +3 -3
  207. package/tests/slider.html +5 -5
  208. package/tests/slideshow.html +33 -3
  209. package/tests/sortable.html +15 -15
  210. package/tests/sticky-navbar.html +4 -4
  211. package/tests/sticky-parallax.html +3 -3
  212. package/tests/sticky.html +3 -3
  213. package/tests/svg.html +3 -2
  214. package/tests/switcher.html +7 -7
  215. package/tests/tab.html +5 -5
  216. package/tests/text.html +9 -3
  217. package/tests/tile.html +4 -4
  218. package/tests/toggle.html +1 -1
  219. package/tests/tooltip.html +3 -3
  220. package/tests/totop.html +2 -2
  221. package/tests/transition.html +1 -1
  222. package/tests/upload.html +5 -5
  223. package/tests/utility.html +16 -116
  224. package/tests/video.html +224 -24
  225. package/tests/visibility.html +4 -4
  226. package/tests/width.html +12 -12
package/dist/js/uikit.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.25.26 | https://www.getuikit.com | (c) 2014 - 2026 YOOtheme | MIT License */
1
+ /*! UIkit 3.25.27-dev.9e97c1f | https://www.getuikit.com | (c) 2014 - 2026 YOOtheme | MIT License */
2
2
 
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
@@ -135,8 +135,8 @@
135
135
  }
136
136
  function pick(obj, props) {
137
137
  const result = {};
138
- for (const prop of props) {
139
- result[prop] = obj[prop];
138
+ for (const key of props) {
139
+ result[key] = obj[key];
140
140
  }
141
141
  return result;
142
142
  }
@@ -247,13 +247,12 @@
247
247
  }
248
248
  if (isUndefined(value)) {
249
249
  return (_a = toNode(element)) == null ? void 0 : _a.getAttribute(name);
250
- } else {
251
- for (const el of toNodes(element)) {
252
- if (value === null) {
253
- removeAttr(el, name);
254
- } else {
255
- el.setAttribute(name, value);
256
- }
250
+ }
251
+ for (const el of toNodes(element)) {
252
+ if (value === null) {
253
+ removeAttr(el, name);
254
+ } else {
255
+ el.setAttribute(name, value);
257
256
  }
258
257
  }
259
258
  }
@@ -590,19 +589,18 @@
590
589
  property = propName(property);
591
590
  if (isUndefined(value)) {
592
591
  return getComputedStyle(element2).getPropertyValue(property);
593
- } else {
594
- element2.style.setProperty(
595
- property,
596
- isNumeric(value) && !cssNumber[property] && !isCustomProperty(property) ? `${value}px` : value || isNumber(value) ? value : "",
597
- priority
598
- );
599
592
  }
593
+ element2.style.setProperty(
594
+ property,
595
+ isNumeric(value) && !cssNumber[property] && !isCustomProperty(property) ? `${value}px` : value || isNumber(value) ? value : "",
596
+ priority
597
+ );
600
598
  } else if (isArray(property)) {
601
- const props = {};
599
+ const values = {};
602
600
  for (const prop of property) {
603
- props[prop] = css(element2, prop);
601
+ values[prop] = css(element2, prop);
604
602
  }
605
- return props;
603
+ return values;
606
604
  } else if (isObject(property)) {
607
605
  for (const prop in property) {
608
606
  css(element2, prop, property[prop], value);
@@ -797,7 +795,9 @@
797
795
  );
798
796
  }
799
797
  function unwrap(element) {
800
- toNodes(element).map(parent).filter((value, index, self) => self.indexOf(value) === index).forEach((parent2) => parent2.replaceWith(...parent2.childNodes));
798
+ for (const elementParent of new Set(toNodes(element).map(parent))) {
799
+ elementParent.replaceWith(...elementParent.childNodes);
800
+ }
801
801
  }
802
802
  const singleTagRe = /^<(\w+)\s*\/?>(?:<\/\1>)?$/;
803
803
  function fragment(html2) {
@@ -838,7 +838,7 @@
838
838
  height: ["top", "bottom"]
839
839
  };
840
840
  function dimensions$1(element) {
841
- const rect = isElement(element) ? toNode(element).getBoundingClientRect() : { height: height(element), width: width(element), top: 0, left: 0 };
841
+ const rect = isElement(element) ? toNode(element).getBoundingClientRect() : { height: height$1(element), width: width(element), top: 0, left: 0 };
842
842
  return {
843
843
  height: rect.height,
844
844
  width: rect.width,
@@ -904,7 +904,7 @@
904
904
  }
905
905
  return offset2;
906
906
  }
907
- const height = dimension("height");
907
+ const height$1 = dimension("height");
908
908
  const width = dimension("width");
909
909
  function dimension(prop) {
910
910
  const propName = ucfirst(prop);
@@ -1159,7 +1159,9 @@
1159
1159
  return isTag(el, "iframe") && (isYoutube(el) || isVimeo(el));
1160
1160
  }
1161
1161
  function isYoutube(el) {
1162
- return /\/\/.*?youtube(-nocookie)?\.[a-z]+\/(watch\?v=[^&\s]+|embed)|youtu\.be\//.test(el.src);
1162
+ return /\/\/.*?youtube(-nocookie)?\.[a-z]+\/(watch\?v=[^&\s]+|embed)|youtu\.be\/.*/.test(
1163
+ el.src
1164
+ );
1163
1165
  }
1164
1166
  function isVimeo(el) {
1165
1167
  return /vimeo\.com\/video\/.*/.test(el.src);
@@ -1171,7 +1173,7 @@
1171
1173
  function post(el, cmd) {
1172
1174
  el.contentWindow.postMessage(JSON.stringify({ event: "command", ...cmd }), "*");
1173
1175
  }
1174
- const stateKey = "_ukPlayer";
1176
+ const stateKey = /* @__PURE__ */ Symbol();
1175
1177
  let counter = 0;
1176
1178
  function enableApi(el) {
1177
1179
  if (el[stateKey]) {
@@ -1202,17 +1204,16 @@
1202
1204
  if (!isVisible(element)) {
1203
1205
  return false;
1204
1206
  }
1205
- return intersectRect(
1206
- ...overflowParents(element).map((parent2) => {
1207
- const { top, left, bottom, right } = offsetViewport(parent2);
1208
- return {
1209
- top: top - offsetTop,
1210
- left: left - offsetLeft,
1211
- bottom: bottom + offsetTop,
1212
- right: right + offsetLeft
1213
- };
1214
- }).concat(offset(element))
1215
- );
1207
+ const rects = overflowParents(element).map((parent2) => {
1208
+ const { top, left, bottom, right } = offsetViewport(parent2);
1209
+ return {
1210
+ top: top - offsetTop,
1211
+ left: left - offsetLeft,
1212
+ bottom: bottom + offsetTop,
1213
+ right: right + offsetLeft
1214
+ };
1215
+ });
1216
+ return intersectRect(...rects, offset(element));
1216
1217
  }
1217
1218
  function scrollIntoView(element, { offset: offsetBy = 0 } = {}) {
1218
1219
  const parents2 = isVisible(element) ? scrollParents(element, false, ["hidden"]) : [];
@@ -1296,11 +1297,12 @@
1296
1297
  if (~fixedIndex) {
1297
1298
  ancestors = ancestors.slice(fixedIndex);
1298
1299
  }
1299
- return [scrollEl].concat(
1300
- ancestors.filter(
1300
+ return [
1301
+ scrollEl,
1302
+ ...ancestors.filter(
1301
1303
  (parent2) => css(parent2, "overflow").split(" ").some((prop) => includes(["auto", "scroll", ...props], prop)) && (!scrollable || parent2.scrollHeight > offsetViewport(parent2).height)
1302
1304
  )
1303
- ).reverse();
1305
+ ].reverse();
1304
1306
  }
1305
1307
  function scrollParent(...args) {
1306
1308
  return scrollParents(...args)[0];
@@ -1589,7 +1591,7 @@
1589
1591
  hasClass: hasClass,
1590
1592
  hasOwn: hasOwn,
1591
1593
  hasTouch: hasTouch,
1592
- height: height,
1594
+ height: height$1,
1593
1595
  html: html,
1594
1596
  hyphenate: hyphenate,
1595
1597
  inBrowser: inBrowser,
@@ -1882,11 +1884,14 @@
1882
1884
  function coerce$1(type, value) {
1883
1885
  if (type === Boolean) {
1884
1886
  return toBoolean(value);
1885
- } else if (type === Number) {
1887
+ }
1888
+ if (type === Number) {
1886
1889
  return toNumber(value);
1887
- } else if (type === "list") {
1890
+ }
1891
+ if (type === "list") {
1888
1892
  return toList(value);
1889
- } else if (type === Object && isString(value)) {
1893
+ }
1894
+ if (type === Object && isString(value)) {
1890
1895
  return parseOptions(value);
1891
1896
  }
1892
1897
  return type ? type(value) : value;
@@ -1962,9 +1967,9 @@
1962
1967
  function lazyload(options = {}) {
1963
1968
  return intersection({
1964
1969
  handler: function(entries, observer) {
1965
- const { targets = this.$el, preload = 5 } = options;
1970
+ const { targets = this.$el, preload = 5, media = false } = options;
1966
1971
  for (const el of toNodes(isFunction(targets) ? targets(this) : targets)) {
1967
- $$('[loading="lazy"]', el).slice(0, preload - 1).forEach((el2) => removeAttr(el2, "loading"));
1972
+ (media ? preloadMedia : loadLazyElements)(el, preload);
1968
1973
  }
1969
1974
  for (const { isIntersecting, target } of entries) {
1970
1975
  isIntersecting && observer.unobserve(target);
@@ -1973,6 +1978,15 @@
1973
1978
  ...options
1974
1979
  });
1975
1980
  }
1981
+ function preloadMedia(el, preload = 5) {
1982
+ loadLazyElements(el, preload);
1983
+ for (const video of $$('video[preload="none"]', el)) {
1984
+ video.preload = "";
1985
+ }
1986
+ }
1987
+ function loadLazyElements(el, preload) {
1988
+ $$('[loading="lazy"]', el).slice(0, preload - 1).forEach((el2) => removeAttr(el2, "loading"));
1989
+ }
1976
1990
  function viewport(options) {
1977
1991
  return observe((target, handler) => observeViewportResize(handler), options, "resize");
1978
1992
  }
@@ -2036,10 +2050,12 @@
2036
2050
  var Margin = {
2037
2051
  props: {
2038
2052
  margin: String,
2053
+ firstRow: Boolean,
2039
2054
  firstColumn: Boolean
2040
2055
  },
2041
2056
  data: {
2042
2057
  margin: "uk-margin-small-top",
2058
+ firstRow: false,
2043
2059
  firstColumn: "uk-first-column"
2044
2060
  },
2045
2061
  observe: [
@@ -2079,6 +2095,7 @@
2079
2095
  for (const row of rows) {
2080
2096
  for (const el of row) {
2081
2097
  toggleClass(el, this.margin, rows[0] !== row);
2098
+ toggleClass(el, this.firstRow, rows[0] === row);
2082
2099
  toggleClass(el, this.firstColumn, row[isRtl ? row.length - 1 : 0] === el);
2083
2100
  }
2084
2101
  }
@@ -2170,16 +2187,16 @@
2170
2187
  removeClass(target, clsLeave);
2171
2188
  });
2172
2189
  const enterFn = wrapIndexFn(async () => {
2173
- const oldHeight = height(target);
2190
+ const oldHeight = height$1(target);
2174
2191
  addClass(target, clsEnter);
2175
2192
  action();
2176
2193
  css(stagger ? children(target) : target, propsOut);
2177
- height(target, oldHeight);
2194
+ height$1(target, oldHeight);
2178
2195
  await awaitTimeout();
2179
- height(target, "");
2180
- const newHeight = height(target);
2196
+ height$1(target, "");
2197
+ const newHeight = height$1(target);
2181
2198
  css(target, "alignContent", "flex-start");
2182
- height(target, oldHeight);
2199
+ height$1(target, oldHeight);
2183
2200
  const transitions = [];
2184
2201
  let targetDuration = duration / 2;
2185
2202
  if (stagger) {
@@ -2353,6 +2370,19 @@
2353
2370
  RIGHT: 39,
2354
2371
  DOWN: 40
2355
2372
  };
2373
+ function getNavigationIndex(keyCode, previousKey = keyMap.LEFT, nextKey = keyMap.RIGHT) {
2374
+ switch (keyCode) {
2375
+ case keyMap.HOME:
2376
+ return 0;
2377
+ case keyMap.END:
2378
+ return "last";
2379
+ case previousKey:
2380
+ return "previous";
2381
+ case nextKey:
2382
+ return "next";
2383
+ }
2384
+ return -1;
2385
+ }
2356
2386
 
2357
2387
  function maybeDefaultPreventClick(e) {
2358
2388
  if (e.target.closest('a[href="#"],a[href=""]')) {
@@ -2813,20 +2843,18 @@
2813
2843
  if (show) {
2814
2844
  _toggle(el, true);
2815
2845
  }
2816
- const prevProps = Object.fromEntries(
2817
- [
2818
- "padding",
2819
- "border",
2820
- "width",
2821
- "height",
2822
- "minWidth",
2823
- "minHeight",
2824
- "overflowY",
2825
- "overflowX",
2826
- marginProp,
2827
- marginStartProp
2828
- ].map((key) => [key, el.style[key]])
2829
- );
2846
+ const prevProps = pick(el.style, [
2847
+ "padding",
2848
+ "border",
2849
+ "width",
2850
+ "height",
2851
+ "minWidth",
2852
+ "minHeight",
2853
+ "overflowY",
2854
+ "overflowX",
2855
+ marginProp,
2856
+ marginStartProp
2857
+ ]);
2830
2858
  const dim = dimensions$1(el);
2831
2859
  const currentMargin = toFloat(css(el, marginProp));
2832
2860
  const marginStart = toFloat(css(el, marginStartProp));
@@ -3100,18 +3128,11 @@
3100
3128
 
3101
3129
  var Animations$2 = {
3102
3130
  slide: {
3103
- show(dir) {
3104
- return [{ transform: translate(dir * -100) }, { transform: translate() }];
3105
- },
3106
- percent(current) {
3107
- return translated(current);
3108
- },
3109
- translate(percent, dir) {
3110
- return [
3111
- { transform: translate(dir * -100 * percent) },
3112
- { transform: translate(dir * 100 * (1 - percent)) }
3113
- ];
3114
- }
3131
+ percent: translated,
3132
+ translate: (percent, dir) => [
3133
+ { transform: translate(dir * -100 * percent) },
3134
+ { transform: translate(dir * 100 * (1 - percent)) }
3135
+ ]
3115
3136
  }
3116
3137
  };
3117
3138
  function translated(el) {
@@ -3122,8 +3143,8 @@
3122
3143
  }
3123
3144
 
3124
3145
  function Transitioner$1(prev, next, dir, { animation, easing }) {
3125
- const { percent, translate, show = noop } = animation;
3126
- const props = show(dir);
3146
+ const { percent, translate } = animation;
3147
+ const props = translate(1, dir);
3127
3148
  const { promise, resolve } = withResolvers();
3128
3149
  return {
3129
3150
  dir,
@@ -3405,7 +3426,7 @@
3405
3426
  return Math.atan2(Math.abs(pos2.y - pos1.y), Math.abs(pos2.x - pos1.x)) * 180 / Math.PI;
3406
3427
  }
3407
3428
 
3408
- var VERSION = '3.25.26';
3429
+ var VERSION = '3.25.27-dev.9e97c1f';
3409
3430
 
3410
3431
  function initWatches(instance) {
3411
3432
  instance._watches = [];
@@ -3614,7 +3635,7 @@
3614
3635
  }
3615
3636
  const getAttributes = memoize((id, props) => {
3616
3637
  const attributes = Object.keys(props);
3617
- const filter = attributes.concat(id).flatMap((key) => [hyphenate(key), `data-${hyphenate(key)}`]);
3638
+ const filter = [...attributes, id].flatMap((key) => [hyphenate(key), `data-${hyphenate(key)}`]);
3618
3639
  return { attributes, filter };
3619
3640
  });
3620
3641
  function initPropsObserver(instance) {
@@ -3704,14 +3725,10 @@
3704
3725
  }
3705
3726
  function normalizeData({ data = {} }, { args = [], props = {} }) {
3706
3727
  if (isArray(data)) {
3707
- data = data.slice(0, args.length).reduce((data2, value, index) => {
3708
- if (isPlainObject(value)) {
3709
- assign(data2, value);
3710
- } else {
3711
- data2[args[index]] = value;
3712
- }
3713
- return data2;
3714
- }, {});
3728
+ data = data.slice(0, args.length).reduce(
3729
+ (data2, value, index) => assign(data2, isPlainObject(value) ? value : { [args[index]]: value }),
3730
+ {}
3731
+ );
3715
3732
  }
3716
3733
  for (const key in data) {
3717
3734
  if (isUndefined(data[key])) {
@@ -3759,11 +3776,10 @@
3759
3776
  function init(element2) {
3760
3777
  const instance = getComponent(element2, name);
3761
3778
  if (instance) {
3762
- if (data) {
3763
- instance.$destroy();
3764
- } else {
3779
+ if (!data) {
3765
3780
  return instance;
3766
3781
  }
3782
+ instance.$destroy();
3767
3783
  }
3768
3784
  return new Component({ el: element2, data });
3769
3785
  }
@@ -4014,7 +4030,7 @@
4014
4030
  if (!isNumeric(cmd)) {
4015
4031
  return;
4016
4032
  }
4017
- let i = keyCode === keyMap.HOME ? 0 : keyCode === keyMap.END ? "last" : keyCode === keyMap.LEFT ? "previous" : keyCode === keyMap.RIGHT ? "next" : -1;
4033
+ const i = getNavigationIndex(keyCode);
4018
4034
  if (~i) {
4019
4035
  e.preventDefault();
4020
4036
  this.show(i);
@@ -4264,75 +4280,35 @@
4264
4280
  var Animations$1 = {
4265
4281
  ...Animations$2,
4266
4282
  fade: {
4267
- show() {
4268
- return [{ opacity: 0, zIndex: 0 }, { zIndex: -1 }];
4269
- },
4270
- percent(current) {
4271
- return 1 - css(current, "opacity");
4272
- },
4273
- translate(percent) {
4274
- return [{ opacity: 1 - percent, zIndex: 0 }, { zIndex: -1 }];
4275
- }
4283
+ percent: (current) => 1 - css(current, "opacity"),
4284
+ translate: (percent) => [{ opacity: 1 - percent, zIndex: 0 }, { zIndex: -1 }]
4276
4285
  },
4277
4286
  scale: {
4278
- show() {
4279
- return [{ opacity: 0, transform: scale3d(1 + 0.5), zIndex: 0 }, { zIndex: -1 }];
4280
- },
4281
- percent(current) {
4282
- return 1 - css(current, "opacity");
4283
- },
4284
- translate(percent) {
4285
- return [
4286
- { opacity: 1 - percent, transform: scale3d(1 + 0.5 * percent), zIndex: 0 },
4287
- { zIndex: -1 }
4288
- ];
4289
- }
4287
+ percent: (current) => 1 - css(current, "opacity"),
4288
+ translate: (percent) => [
4289
+ { opacity: 1 - percent, transform: scale3d(1 + 0.5 * percent), zIndex: 0 },
4290
+ { zIndex: -1 }
4291
+ ]
4290
4292
  },
4291
4293
  pull: {
4292
- show(dir) {
4293
- return dir < 0 ? [
4294
- { transform: translate(30), zIndex: -1 },
4295
- { transform: translate(), zIndex: 0 }
4296
- ] : [
4297
- { transform: translate(-100), zIndex: 0 },
4298
- { transform: translate(), zIndex: -1 }
4299
- ];
4300
- },
4301
- percent(current, next, dir) {
4302
- return dir < 0 ? 1 - translated(next) : translated(current);
4303
- },
4304
- translate(percent, dir) {
4305
- return dir < 0 ? [
4306
- { transform: translate(30 * percent), zIndex: -1 },
4307
- { transform: translate(-100 * (1 - percent)), zIndex: 0 }
4308
- ] : [
4309
- { transform: translate(-percent * 100), zIndex: 0 },
4310
- { transform: translate(30 * (1 - percent)), zIndex: -1 }
4311
- ];
4312
- }
4294
+ percent: (current, next, dir) => dir < 0 ? 1 - translated(next) : translated(current),
4295
+ translate: (percent, dir) => dir < 0 ? [
4296
+ { transform: translate(30 * percent), zIndex: -1 },
4297
+ { transform: translate(-100 * (1 - percent)), zIndex: 0 }
4298
+ ] : [
4299
+ { transform: translate(-percent * 100), zIndex: 0 },
4300
+ { transform: translate(30 * (1 - percent)), zIndex: -1 }
4301
+ ]
4313
4302
  },
4314
4303
  push: {
4315
- show(dir) {
4316
- return dir < 0 ? [
4317
- { transform: translate(100), zIndex: 0 },
4318
- { transform: translate(), zIndex: -1 }
4319
- ] : [
4320
- { transform: translate(-30), zIndex: -1 },
4321
- { transform: translate(), zIndex: 0 }
4322
- ];
4323
- },
4324
- percent(current, next, dir) {
4325
- return dir > 0 ? 1 - translated(next) : translated(current);
4326
- },
4327
- translate(percent, dir) {
4328
- return dir < 0 ? [
4329
- { transform: translate(percent * 100), zIndex: 0 },
4330
- { transform: translate(-30 * (1 - percent)), zIndex: -1 }
4331
- ] : [
4332
- { transform: translate(-30 * percent), zIndex: -1 },
4333
- { transform: translate(100 * (1 - percent)), zIndex: 0 }
4334
- ];
4335
- }
4304
+ percent: (current, next, dir) => dir > 0 ? 1 - translated(next) : translated(current),
4305
+ translate: (percent, dir) => dir < 0 ? [
4306
+ { transform: translate(percent * 100), zIndex: 0 },
4307
+ { transform: translate(-30 * (1 - percent)), zIndex: -1 }
4308
+ ] : [
4309
+ { transform: translate(-30 * percent), zIndex: -1 },
4310
+ { transform: translate(100 * (1 - percent)), zIndex: 0 }
4311
+ ]
4336
4312
  }
4337
4313
  };
4338
4314
  function scale3d(value) {
@@ -4342,32 +4318,15 @@
4342
4318
  var Animations = {
4343
4319
  ...Animations$2,
4344
4320
  fade: {
4345
- show() {
4346
- return [{ opacity: 0 }, { opacity: 1 }];
4347
- },
4348
- percent(current) {
4349
- return 1 - css(current, "opacity");
4350
- },
4351
- translate(percent) {
4352
- return [{ opacity: 1 - percent }, { opacity: percent }];
4353
- }
4321
+ percent: (current) => 1 - css(current, "opacity"),
4322
+ translate: (percent) => [{ opacity: 1 - percent }, { opacity: percent }]
4354
4323
  },
4355
4324
  scale: {
4356
- show() {
4357
- return [
4358
- { opacity: 0, transform: scale3d(1 - 0.2) },
4359
- { opacity: 1, transform: scale3d(1) }
4360
- ];
4361
- },
4362
- percent(current) {
4363
- return 1 - css(current, "opacity");
4364
- },
4365
- translate(percent) {
4366
- return [
4367
- { opacity: 1 - percent, transform: scale3d(1 - 0.2 * percent) },
4368
- { opacity: percent, transform: scale3d(1 - 0.2 + 0.2 * percent) }
4369
- ];
4370
- }
4325
+ percent: (current) => 1 - css(current, "opacity"),
4326
+ translate: (percent) => [
4327
+ { opacity: 1 - percent, transform: scale3d(1 - 0.2 * percent) },
4328
+ { opacity: percent, transform: scale3d(1 - 0.2 + 0.2 * percent) }
4329
+ ]
4371
4330
  }
4372
4331
  };
4373
4332
 
@@ -4499,16 +4458,7 @@
4499
4458
  if (!this.isToggled() || !this.draggable) {
4500
4459
  return;
4501
4460
  }
4502
- let i = -1;
4503
- if (keyCode === keyMap.LEFT) {
4504
- i = "previous";
4505
- } else if (keyCode === keyMap.RIGHT) {
4506
- i = "next";
4507
- } else if (keyCode === keyMap.HOME) {
4508
- i = 0;
4509
- } else if (keyCode === keyMap.END) {
4510
- i = "last";
4511
- }
4461
+ const i = getNavigationIndex(keyCode);
4512
4462
  if (~i) {
4513
4463
  this.show(i);
4514
4464
  }
@@ -4550,81 +4500,22 @@
4550
4500
  if (!src) {
4551
4501
  return;
4552
4502
  }
4553
- let matches2;
4554
- const iframeAttrs = {
4555
- allowfullscreen: "",
4556
- style: "max-width: 100%; box-sizing: border-box;",
4557
- "uk-responsive": "",
4558
- "uk-video": Boolean(this.videoAutoplay)
4559
- };
4560
- if (type === "image" || isImage(src)) {
4561
- const img = createEl("img");
4562
- wrapInPicture(img, item.sources);
4563
- attr(img, {
4564
- src,
4565
- ...pick(item, ["alt", "srcset", "sizes"]),
4566
- ...attrs
4567
- });
4568
- on(img, "load", () => this.setItem(item, parent(img) || img));
4569
- on(img, "error", () => this.setError(item));
4570
- } else if (type === "video" || isVideo(src)) {
4571
- const inline = this.videoAutoplay === "inline";
4572
- const video = createEl("video", {
4573
- src,
4574
- playsinline: "",
4575
- controls: inline ? null : "",
4576
- loop: inline ? "" : null,
4577
- muted: inline ? "" : null,
4578
- poster: this.videoAutoplay ? null : item.poster,
4579
- "uk-video": Boolean(this.videoAutoplay),
4580
- ...attrs
4581
- });
4582
- on(video, "loadedmetadata", () => this.setItem(item, video));
4583
- on(video, "error", () => this.setError(item));
4584
- } else if (type === "iframe" || src.match(/\.(html|php)($|\?)/i)) {
4585
- this.setItem(
4586
- item,
4587
- createEl("iframe", {
4588
- src,
4589
- allowfullscreen: "",
4590
- class: "uk-lightbox-iframe",
4591
- ...attrs
4592
- })
4593
- );
4594
- } else if (matches2 = src.match(
4595
- /\/\/(?:.*?youtube(-nocookie)?\..*?(?:[?&]v=|\/shorts\/)|youtu\.be\/)([\w-]{11})[&?]?(.*)?/
4596
- )) {
4597
- this.setItem(
4598
- item,
4599
- createEl("iframe", {
4600
- src: `https://www.youtube${matches2[1] || ""}.com/embed/${matches2[2]}${matches2[3] ? `?${matches2[3]}` : ""}`,
4601
- width: 1920,
4602
- height: 1080,
4603
- ...iframeAttrs,
4604
- ...attrs
4605
- })
4606
- );
4607
- } else if (matches2 = src.match(/\/\/.*?vimeo\.[a-z]+\/(\d+)[&?]?(.*)?/)) {
4608
- try {
4609
- const { height, width } = await (await fetch(
4610
- `https://vimeo.com/api/oembed.json?maxwidth=1920&url=${encodeURI(
4611
- src
4612
- )}`,
4613
- { credentials: "omit" }
4614
- )).json();
4615
- this.setItem(
4616
- item,
4617
- createEl("iframe", {
4618
- src: `https://player.vimeo.com/video/${matches2[1]}${matches2[2] ? `?${matches2[2]}` : ""}`,
4619
- width,
4620
- height,
4621
- ...iframeAttrs,
4622
- ...attrs
4623
- })
4624
- );
4625
- } catch {
4626
- this.setError(item);
4503
+ try {
4504
+ for (const loader of [
4505
+ loadImage,
4506
+ loadVideo,
4507
+ loadIframe,
4508
+ loadYouTube,
4509
+ loadVimeo
4510
+ ]) {
4511
+ const content = await loader({ src, type, attrs, item, cmp: this });
4512
+ if (content) {
4513
+ this.setItem(item, content);
4514
+ return;
4515
+ }
4627
4516
  }
4517
+ } catch {
4518
+ this.setError(item);
4628
4519
  }
4629
4520
  }
4630
4521
  },
@@ -4684,6 +4575,91 @@
4684
4575
  attr(el, attrs);
4685
4576
  return el;
4686
4577
  }
4578
+ async function loadImage({ src, type, attrs, item }) {
4579
+ if (type !== "image" && !isImage(src)) {
4580
+ return;
4581
+ }
4582
+ const img = createEl("img");
4583
+ wrapInPicture(img, item.sources);
4584
+ attr(img, {
4585
+ src,
4586
+ ...pick(item, ["alt", "srcset", "sizes"]),
4587
+ ...attrs
4588
+ });
4589
+ await img.decode();
4590
+ return parent(img) || img;
4591
+ }
4592
+ function loadVideo({ src, type, attrs, item, cmp }) {
4593
+ if (type !== "video" && !isVideo(src)) {
4594
+ return;
4595
+ }
4596
+ const inline = cmp.videoAutoplay === "inline";
4597
+ const video = createEl("video", {
4598
+ src,
4599
+ playsinline: "",
4600
+ controls: inline ? null : "",
4601
+ loop: inline ? "" : null,
4602
+ muted: inline ? "" : null,
4603
+ poster: cmp.videoAutoplay ? null : item.poster,
4604
+ "uk-video": Boolean(cmp.videoAutoplay),
4605
+ ...attrs
4606
+ });
4607
+ return new Promise((resolve, reject) => {
4608
+ on(video, "loadedmetadata", () => resolve(video));
4609
+ on(video, "error", reject);
4610
+ });
4611
+ }
4612
+ function loadIframe({ src, type, attrs }) {
4613
+ if (type !== "iframe" && !/\.(html|php)($|\?)/i.test(src)) {
4614
+ return;
4615
+ }
4616
+ return createEl("iframe", {
4617
+ src,
4618
+ allowfullscreen: "",
4619
+ class: "uk-lightbox-iframe",
4620
+ ...attrs
4621
+ });
4622
+ }
4623
+ function loadYouTube({ src, attrs, cmp }) {
4624
+ const matches2 = src.match(
4625
+ /\/\/(?:.*?youtube(-nocookie)?\..*?(?:[?&]v=|\/shorts\/)|youtu\.be\/)([\w-]{11})[&?]?(.*)?/
4626
+ );
4627
+ if (!matches2) {
4628
+ return;
4629
+ }
4630
+ return createEl("iframe", {
4631
+ src: `https://www.youtube${matches2[1] || ""}.com/embed/${matches2[2]}${matches2[3] ? `?${matches2[3]}` : ""}`,
4632
+ width: 1920,
4633
+ height: 1080,
4634
+ ...getIframeAttrs(cmp),
4635
+ ...attrs
4636
+ });
4637
+ }
4638
+ async function loadVimeo({ src, attrs, cmp }) {
4639
+ const matches2 = src.match(/\/\/.*?vimeo\.[a-z]+\/(\d+)[&?]?(.*)?/);
4640
+ if (!matches2) {
4641
+ return;
4642
+ }
4643
+ const { height, width } = await (await fetch(
4644
+ `https://vimeo.com/api/oembed.json?maxwidth=1920&url=${encodeURIComponent(src)}`,
4645
+ { credentials: "omit" }
4646
+ )).json();
4647
+ return createEl("iframe", {
4648
+ src: `https://player.vimeo.com/video/${matches2[1]}${matches2[2] ? `?${matches2[2]}` : ""}`,
4649
+ width,
4650
+ height,
4651
+ ...getIframeAttrs(cmp),
4652
+ ...attrs
4653
+ });
4654
+ }
4655
+ function getIframeAttrs(cmp) {
4656
+ return {
4657
+ allowfullscreen: "",
4658
+ style: "max-width: 100%; box-sizing: border-box;",
4659
+ "uk-responsive": "",
4660
+ "uk-video": Boolean(cmp.videoAutoplay)
4661
+ };
4662
+ }
4687
4663
  function toThumbnavItem(item, videoAutoplay) {
4688
4664
  const el = item.poster || item.thumb && (item.type === "image" || isImage(item.thumb)) ? createEl("img", { src: item.poster || item.thumb, alt: "" }) : item.thumb && (item.type === "video" || isVideo(item.thumb)) ? createEl("video", {
4689
4665
  src: item.thumb,
@@ -4769,7 +4745,7 @@
4769
4745
  if (items[i].thumb) {
4770
4746
  continue;
4771
4747
  }
4772
- const parent = parents(toggle).reverse().concat(toggle).find(
4748
+ const parent = [...parents(toggle).reverse(), toggle].find(
4773
4749
  (parent2) => this.$el.contains(parent2) && (parent2 === toggle || $$(this.toggle, parent2).length === 1)
4774
4750
  );
4775
4751
  if (!parent) {
@@ -4792,6 +4768,121 @@
4792
4768
  return item;
4793
4769
  }
4794
4770
 
4771
+ const hasAnimationApi = inBrowser && window.Animation;
4772
+ var marquee = {
4773
+ mixins: [Class],
4774
+ props: {
4775
+ velocity: Number,
4776
+ start: Number,
4777
+ reverse: Boolean,
4778
+ pause: Boolean,
4779
+ pauseVelocity: Number,
4780
+ fadeSize: null
4781
+ },
4782
+ data: {
4783
+ velocity: 25,
4784
+ start: 0,
4785
+ reverse: false,
4786
+ pause: false,
4787
+ pauseVelocity: 10,
4788
+ selList: ".uk-marquee-items",
4789
+ fadeSize: 0
4790
+ },
4791
+ computed: {
4792
+ list: ({ selList }, $el) => $(selList, $el),
4793
+ items() {
4794
+ return children(this.list);
4795
+ }
4796
+ },
4797
+ watch: {
4798
+ items() {
4799
+ this.$emit();
4800
+ }
4801
+ },
4802
+ observe: [
4803
+ resize({
4804
+ target: ({ $el, items }) => [$el, ...items]
4805
+ }),
4806
+ intersection({
4807
+ handler(entries) {
4808
+ let active;
4809
+ for (const entry of entries) {
4810
+ entry.target.inert = !entry.isIntersecting;
4811
+ active || (active = entry.isIntersecting && entry.target);
4812
+ }
4813
+ if (!active) {
4814
+ return;
4815
+ }
4816
+ const { items } = this;
4817
+ const index = items.indexOf(active);
4818
+ if (!~index) {
4819
+ return;
4820
+ }
4821
+ const direction = this.reverse ? 1 : -1;
4822
+ for (let offset = 1; offset < items.length; offset++) {
4823
+ const item = items[getIndex(index + direction * offset, items)];
4824
+ if (item.inert) {
4825
+ preloadMedia(item);
4826
+ break;
4827
+ }
4828
+ }
4829
+ },
4830
+ target: ({ items }) => items,
4831
+ args: { intersecting: false },
4832
+ options: ({ $el }) => ({ root: $el })
4833
+ })
4834
+ ],
4835
+ methods: {
4836
+ vertical() {
4837
+ return hasClass(this.$el, `${this.$options.id}-vertical`);
4838
+ }
4839
+ },
4840
+ events: {
4841
+ name: [pointerEnter, pointerLeave],
4842
+ el: ({ $el }) => $el,
4843
+ self: true,
4844
+ filter: ({ pause }) => hasAnimationApi && pause,
4845
+ handler(e) {
4846
+ for (const el of this.items) {
4847
+ for (const animation of el.getAnimations()) {
4848
+ animation.playbackRate = e.type === pointerEnter ? this.pauseVelocity / this.velocity : 1;
4849
+ }
4850
+ }
4851
+ }
4852
+ },
4853
+ update: {
4854
+ write() {
4855
+ const prefix = this.$options.id;
4856
+ const items = this.items;
4857
+ const vertical = this.vertical();
4858
+ css(items, "offset", "none");
4859
+ const dir = vertical ? ["top", "bottom"] : ["left", "right"];
4860
+ if (!vertical && isRtl) {
4861
+ dir.reverse();
4862
+ }
4863
+ const listStart = dimensions$1(this.list)[dir[0]];
4864
+ const itemEnds = items.map((el) => dimensions$1(el)[dir[1]]);
4865
+ const listEnd = Math[!vertical && isRtl ? "min" : "max"](...itemEnds);
4866
+ for (const [index, el] of items.entries()) {
4867
+ const elEnd = itemEnds[index];
4868
+ const line1 = listEnd - elEnd;
4869
+ const line2 = elEnd - listStart;
4870
+ const path = vertical ? `"M0 0 v${line1}M0 ${-line2} v${line2}"` : `"M0 0 h${line1}M${-line2} 0 h${line2}"`;
4871
+ css(el, `--${prefix}-path`, path);
4872
+ }
4873
+ css(this.$el, {
4874
+ [`--${prefix}-duration`]: `${Math.abs(listStart - listEnd) / this.velocity}s`,
4875
+ [`--${prefix}-start`]: this.start,
4876
+ [`--${prefix}-direction`]: this.reverse ? "reverse" : "normal",
4877
+ "--uk-overflow-fade-size": this.fadeSize ? `${toPx(this.fadeSize, vertical ? "height" : "width", this.$el, true)}px` : ""
4878
+ });
4879
+ toggleClass(this.$el, `${prefix}-fade`, this.fadeSize);
4880
+ css(items, "offset", "");
4881
+ },
4882
+ events: ["resize"]
4883
+ }
4884
+ };
4885
+
4795
4886
  var notification = {
4796
4887
  mixins: [Container],
4797
4888
  functional: true,
@@ -4800,6 +4891,7 @@
4800
4891
  message: "",
4801
4892
  status: "",
4802
4893
  timeout: 5e3,
4894
+ duration: 400,
4803
4895
  group: "",
4804
4896
  pos: "top-center",
4805
4897
  clsContainer: "uk-notification",
@@ -4829,10 +4921,11 @@
4829
4921
  },
4830
4922
  async connected() {
4831
4923
  const margin = toFloat(css(this.$el, this.marginProp));
4832
- await Transition.start(css(this.$el, this.startProps), {
4833
- opacity: 1,
4834
- [this.marginProp]: margin
4835
- });
4924
+ await Transition.start(
4925
+ css(this.$el, this.startProps),
4926
+ { opacity: 1, [this.marginProp]: margin },
4927
+ this.duration
4928
+ );
4836
4929
  if (this.timeout) {
4837
4930
  this.timer = setTimeout(this.close, this.timeout);
4838
4931
  }
@@ -4867,7 +4960,7 @@
4867
4960
  clearTimeout(this.timer);
4868
4961
  }
4869
4962
  if (!immediate) {
4870
- await Transition.start(this.$el, this.startProps);
4963
+ await Transition.start(this.$el, this.startProps, this.duration);
4871
4964
  }
4872
4965
  removeFn(this.$el);
4873
4966
  }
@@ -5224,10 +5317,7 @@
5224
5317
  return val;
5225
5318
  }
5226
5319
  function fillObject(keys2, value) {
5227
- return keys2.reduce((data, prop) => {
5228
- data[prop] = value;
5229
- return data;
5230
- }, {});
5320
+ return Object.fromEntries(keys2.map((prop) => [prop, value]));
5231
5321
  }
5232
5322
  function ease(percent, easing) {
5233
5323
  return easing >= 0 ? Math.pow(percent, easing + 1) : 1 - Math.pow(1 - percent, 1 - easing);
@@ -5301,16 +5391,14 @@
5301
5391
  return el ? "offsetTop" in el ? el : getOffsetElement(parent(el)) : document.documentElement;
5302
5392
  }
5303
5393
 
5304
- var SliderParallax = {
5394
+ var ScrollDriven = {
5305
5395
  props: {
5306
- parallax: Boolean,
5307
5396
  parallaxTarget: Boolean,
5308
5397
  parallaxStart: String,
5309
5398
  parallaxEnd: String,
5310
5399
  parallaxEasing: Number
5311
5400
  },
5312
5401
  data: {
5313
- parallax: false,
5314
5402
  parallaxTarget: false,
5315
5403
  parallaxStart: 0,
5316
5404
  parallaxEnd: 0,
@@ -5324,26 +5412,48 @@
5324
5412
  scroll$1({ filter: ({ parallax }) => parallax })
5325
5413
  ],
5326
5414
  computed: {
5415
+ parallaxTargetFallback: ($props, $el) => $el,
5327
5416
  parallaxTarget({ parallaxTarget }, $el) {
5328
- return parallaxTarget && query(parallaxTarget, $el) || this.list;
5417
+ return parallaxTarget && query(parallaxTarget, $el) || this.parallaxTargetFallback;
5329
5418
  }
5330
5419
  },
5331
5420
  update: {
5332
5421
  read() {
5333
5422
  if (!this.parallax) {
5334
- return false;
5423
+ return;
5335
5424
  }
5336
5425
  const target = this.parallaxTarget;
5337
5426
  if (!target) {
5338
- return false;
5427
+ return;
5339
5428
  }
5340
5429
  const start = toPx(this.parallaxStart, "height", target, true);
5341
5430
  const end = toPx(this.parallaxEnd, "height", target, true);
5342
5431
  const percent = ease(scrolledOver(target, start, end), this.parallaxEasing);
5343
- return { parallax: this.getIndexAt(percent) };
5432
+ return { percent };
5344
5433
  },
5345
- write({ parallax }) {
5346
- const [prevIndex, slidePercent] = parallax;
5434
+ events: ["scroll", "resize"]
5435
+ }
5436
+ };
5437
+
5438
+ var SliderParallax = {
5439
+ mixins: [ScrollDriven],
5440
+ props: {
5441
+ parallax: Boolean
5442
+ },
5443
+ data: {
5444
+ parallax: false
5445
+ },
5446
+ computed: {
5447
+ parallaxTargetFallback() {
5448
+ return this.list;
5449
+ }
5450
+ },
5451
+ update: {
5452
+ write({ percent }) {
5453
+ if (!this.parallax) {
5454
+ return;
5455
+ }
5456
+ const [prevIndex, slidePercent] = this.getIndexAt(percent);
5347
5457
  const nextIndex = this.getValidIndex(prevIndex + Math.ceil(slidePercent));
5348
5458
  const prev = this.slides[prevIndex];
5349
5459
  const next = this.slides[nextIndex];
@@ -5435,7 +5545,8 @@
5435
5545
  var SliderPreload = {
5436
5546
  observe: lazyload({
5437
5547
  target: ({ slides }) => slides,
5438
- targets: (instance) => instance.getAdjacentSlides()
5548
+ targets: (instance) => instance.getAdjacentSlides(),
5549
+ media: true
5439
5550
  }),
5440
5551
  methods: {
5441
5552
  getAdjacentSlides() {
@@ -6165,7 +6276,7 @@
6165
6276
  height: element.offsetHeight,
6166
6277
  padding: css(element, "padding")
6167
6278
  });
6168
- height(clone.firstElementChild, height(element.firstElementChild));
6279
+ height$1(clone.firstElementChild, height$1(element.firstElementChild));
6169
6280
  return clone;
6170
6281
  }
6171
6282
  function findTarget(items, point) {
@@ -6248,7 +6359,7 @@
6248
6359
  inset: false
6249
6360
  },
6250
6361
  connected() {
6251
- this.pos = this.$props.pos.split("-").concat("center").slice(0, 2);
6362
+ this.pos = [...this.$props.pos.split("-"), "center"].slice(0, 2);
6252
6363
  [this.dir, this.align] = this.pos;
6253
6364
  this.axis = includes(["top", "bottom"], this.dir) ? "y" : "x";
6254
6365
  },
@@ -6651,6 +6762,7 @@
6651
6762
  Filter: filter,
6652
6763
  Lightbox: lightbox,
6653
6764
  LightboxPanel: LightboxPanel,
6765
+ Marquee: marquee,
6654
6766
  Notification: notification,
6655
6767
  Parallax: parallax,
6656
6768
  Slider: slider,
@@ -6734,29 +6846,100 @@
6734
6846
  globalApi(App);
6735
6847
  instanceApi(App);
6736
6848
 
6849
+ const TogglableComponent = App.extend(Togglable);
6850
+ var Connect = {
6851
+ mixins: [Togglable],
6852
+ props: {
6853
+ connect: String
6854
+ },
6855
+ data: {
6856
+ connect: "",
6857
+ cls: "uk-active"
6858
+ },
6859
+ computed: {
6860
+ connects: {
6861
+ get: ({ connect }, $el) => connect ? queryAll(connect, $el) : [],
6862
+ observe: ({ connect }) => connect
6863
+ },
6864
+ connectChildren() {
6865
+ return this.connects.flatMap((el) => children(el));
6866
+ }
6867
+ },
6868
+ watch: {
6869
+ connects(connects) {
6870
+ for (const el of connects) {
6871
+ if (isTag(el, "ul")) {
6872
+ el.role = "presentation";
6873
+ }
6874
+ }
6875
+ }
6876
+ },
6877
+ observe: lazyload({ targets: ({ connectChildren }) => connectChildren }),
6878
+ update() {
6879
+ for (const index in this.toggles) {
6880
+ const toggle = this.toggles[index];
6881
+ if (!toggle) {
6882
+ continue;
6883
+ }
6884
+ toggle.id = generateId(this, toggle);
6885
+ for (const { children: children2 } of this.connects) {
6886
+ const item = children2[index];
6887
+ if (item) {
6888
+ attr(item, {
6889
+ id: generateId(this, item),
6890
+ role: "tabpanel",
6891
+ "aria-labelledby": toggle.id
6892
+ });
6893
+ }
6894
+ }
6895
+ }
6896
+ },
6897
+ methods: {
6898
+ showConnects(index, animate) {
6899
+ const toggle = async (el) => {
6900
+ const { children: children2 } = el;
6901
+ const animation = data(el, "uk-switcher-animation");
6902
+ let togglable = animation ? new TogglableComponent({ data: { ...this.$props, animation } }) : this;
6903
+ const actives = toArray(children2).filter(
6904
+ (child, i) => i !== index && hasClass(child, this.cls)
6905
+ );
6906
+ if (await togglable.toggleElement(actives, false, animate)) {
6907
+ await togglable.toggleElement(children2[index], true, animate);
6908
+ }
6909
+ };
6910
+ return Promise.all(this.connects.map(toggle));
6911
+ }
6912
+ }
6913
+ };
6914
+
6737
6915
  const wrappers = /* @__PURE__ */ new WeakMap();
6738
6916
  var Accordion = {
6739
- mixins: [Class, Togglable],
6917
+ mixins: [Class, Connect],
6740
6918
  props: {
6741
- animation: Boolean,
6742
6919
  targets: String,
6743
6920
  active: null,
6744
6921
  collapsible: Boolean,
6745
6922
  multiple: Boolean,
6746
6923
  toggle: String,
6747
6924
  content: String,
6748
- offset: Number
6925
+ offset: Number,
6926
+ switcherConnect: String
6749
6927
  },
6750
6928
  data: {
6751
6929
  targets: "> *",
6752
6930
  active: false,
6753
- animation: true,
6931
+ animation: [true],
6754
6932
  collapsible: true,
6755
6933
  multiple: false,
6756
6934
  clsOpen: "uk-open",
6935
+ cls: "uk-active",
6757
6936
  toggle: ".uk-accordion-title",
6758
6937
  content: ".uk-accordion-content",
6759
- offset: 0
6938
+ offset: 0,
6939
+ switcherConnect: ""
6940
+ },
6941
+ beforeConnect() {
6942
+ this.connect = this.$props.connect = this.switcherConnect;
6760
6943
  },
6761
6944
  computed: {
6762
6945
  items: ({ targets }, $el) => $$(targets, $el),
@@ -6782,6 +6965,12 @@
6782
6965
  this.toggle(active, false);
6783
6966
  }
6784
6967
  },
6968
+ connectChildren() {
6969
+ this.showConnects(
6970
+ findIndex(this.items, (el) => hasClass(el, this.clsOpen)),
6971
+ false
6972
+ );
6973
+ },
6785
6974
  toggles() {
6786
6975
  this.$emit();
6787
6976
  },
@@ -6831,44 +7020,57 @@
6831
7020
  if (!toggle || !content) {
6832
7021
  continue;
6833
7022
  }
6834
- toggle.id = generateId(this, toggle);
6835
- content.id = generateId(this, content);
6836
7023
  const active = includes(activeItems, this.items[index2]);
7024
+ attr(content, {
7025
+ id: generateId(this, content),
7026
+ role: "region",
7027
+ "aria-labelledby": toggle.id
7028
+ });
7029
+ if (isTag(content, "ul")) {
7030
+ attr(children(content), "role", "presentation");
7031
+ }
7032
+ const controls = [
7033
+ content.id,
7034
+ ...this.connects.map(({ children: children2 }) => {
7035
+ var _a;
7036
+ return (_a = children2[index2]) == null ? void 0 : _a.id;
7037
+ }).filter(Boolean)
7038
+ ];
6837
7039
  attr(toggle, {
6838
7040
  role: isTag(toggle, "a") ? "button" : null,
6839
- "aria-controls": content.id,
7041
+ "aria-controls": controls.join(" "),
6840
7042
  "aria-expanded": active,
6841
7043
  "aria-disabled": !this.collapsible && activeItems.length < 2 && active
6842
7044
  });
6843
- attr(content, { role: "region", "aria-labelledby": toggle.id });
6844
- if (isTag(content, "ul")) {
6845
- attr(children(content), "role", "presentation");
6846
- }
6847
7045
  }
6848
7046
  },
6849
7047
  methods: {
6850
- toggle(item, animate) {
6851
- item = this.items[getIndex(item, this.items)];
7048
+ async toggle(item, animate) {
7049
+ animate = animate !== false;
7050
+ const next = getIndex(item, this.items);
7051
+ item = this.items[next];
6852
7052
  let items = [item];
6853
7053
  const activeItems = filter$1(this.items, `.${this.clsOpen}`);
6854
- if (!this.multiple && !includes(activeItems, items[0])) {
6855
- items = items.concat(activeItems);
6856
- }
6857
- if (!this.collapsible && activeItems.length < 2 && includes(activeItems, item)) {
6858
- items = [];
6859
- }
6860
- return Promise.all(
6861
- items.map(
6862
- (el) => this.toggleElement(el, !includes(activeItems, el), (el2, show) => {
6863
- toggleClass(el2, this.clsOpen, show);
6864
- if (animate === false || !this.animation) {
6865
- hide($(this.content, el2), !show);
6866
- return;
6867
- }
6868
- return transition(el2, show, this);
6869
- })
6870
- )
6871
- );
7054
+ const isActive = includes(activeItems, item);
7055
+ if (isActive && !this.collapsible && activeItems.length < 2) {
7056
+ return;
7057
+ }
7058
+ if (!isActive && !this.multiple) {
7059
+ items.push(...activeItems);
7060
+ }
7061
+ const toggle = (el) => this.toggleElement(el, !includes(activeItems, el), (el2, show) => {
7062
+ toggleClass(el2, this.clsOpen, show);
7063
+ if (!animate || !this.hasAnimation) {
7064
+ hide($(this.content, el2), !show);
7065
+ return;
7066
+ }
7067
+ return transition(el2, show, this);
7068
+ });
7069
+ const hideIndex = () => findIndex(this.items, (i) => i !== item && includes(activeItems, i));
7070
+ return Promise.all([
7071
+ ...items.map(toggle),
7072
+ this.showConnects(isActive ? hideIndex() : next, animate)
7073
+ ]);
6872
7074
  }
6873
7075
  }
6874
7076
  };
@@ -6934,7 +7136,7 @@
6934
7136
  },
6935
7137
  methods: {
6936
7138
  async close() {
6937
- await this.toggleElement(this.$el, false, animate);
7139
+ await this.toggleElement(this.$el, false, this.animation ? animate : false);
6938
7140
  this.$destroy(true);
6939
7141
  }
6940
7142
  }
@@ -6959,61 +7161,119 @@
6959
7161
  );
6960
7162
  }
6961
7163
 
7164
+ const loopKey = /* @__PURE__ */ Symbol();
6962
7165
  var Video = {
7166
+ mixins: [Media, ScrollDriven],
6963
7167
  args: "autoplay",
6964
7168
  props: {
6965
7169
  automute: Boolean,
6966
7170
  autoplay: Boolean,
6967
7171
  restart: Boolean,
6968
- hoverTarget: Boolean
7172
+ inviewMargin: String,
7173
+ inviewQueued: Number,
7174
+ hoverTarget: Boolean,
7175
+ hoverRewind: Number,
7176
+ reducedMotionTime: Number
6969
7177
  },
6970
7178
  data: {
6971
7179
  automute: false,
6972
7180
  autoplay: true,
6973
7181
  restart: false,
6974
- hoverTarget: false
7182
+ inviewMargin: "0px",
7183
+ inviewQueued: 0,
7184
+ hoverTarget: false,
7185
+ hoverRewind: 0,
7186
+ reducedMotionTime: 0,
7187
+ media: "(prefers-reduced-motion: reduce)"
6975
7188
  },
6976
7189
  beforeConnect() {
6977
- const isVideo = isTag(this.$el, "video");
6978
- if (this.autoplay === "inview" && isVideo && !hasAttr(this.$el, "preload")) {
7190
+ const isVideo = this.isVideo = isTag(this.$el, "video");
7191
+ this.interactionDriven = ["hover", "parallax"].includes(this.autoplay);
7192
+ if (this.interactionDriven && !isVideo) {
7193
+ this.interactionDriven = this.autoplay = false;
7194
+ }
7195
+ this.restart = isVideo && this.restart;
7196
+ this.parallax = this.autoplay === "parallax";
7197
+ this.inviewQueued = isVideo && this.autoplay === "inview" && this.inviewQueued;
7198
+ if (this.inviewQueued) {
7199
+ this.$el[loopKey] = this.$el.loop;
7200
+ this.$el.loop = false;
7201
+ }
7202
+ if (["hover", "inview"].includes(this.autoplay) && isVideo && !hasAttr(this.$el, "preload")) {
6979
7203
  this.$el.preload = "none";
6980
7204
  }
6981
7205
  if (!isVideo && !hasAttr(this.$el, "allow")) {
6982
7206
  this.$el.allow = "autoplay";
6983
7207
  }
6984
7208
  if (this.autoplay === "hover") {
6985
- if (isVideo) {
6986
- this.$el.tabIndex = 0;
6987
- } else {
6988
- this.autoplay = true;
7209
+ this.hoverTarget = query(this.hoverTarget, this.$el) || this.$el;
7210
+ if (!isFocusable(this.hoverTarget)) {
7211
+ this.hoverTarget.tabIndex = 0;
6989
7212
  }
6990
7213
  }
6991
7214
  if (this.automute || hasAttr(this.$el, "muted")) {
6992
7215
  mute(this.$el);
6993
7216
  }
6994
7217
  },
7218
+ connected() {
7219
+ if (!this.$el.controls && !this.$el.poster && (this.interactionDriven || this.inviewQueued)) {
7220
+ this.cancelPreview = preview(this.$el);
7221
+ }
7222
+ },
7223
+ disconnected() {
7224
+ var _a, _b;
7225
+ (_a = this._reverseAbort) == null ? void 0 : _a.abort();
7226
+ (_b = this.cancelPreview) == null ? void 0 : _b.call(this);
7227
+ this.cancelPreview = null;
7228
+ if (this.$el[loopKey]) {
7229
+ this.$el.loop = true;
7230
+ }
7231
+ queue.delete(this.$el);
7232
+ },
6995
7233
  events: [
6996
7234
  {
6997
7235
  name: `${pointerEnter} focusin`,
6998
- el: ({ hoverTarget, $el }) => query(hoverTarget, $el) || $el,
7236
+ el: ({ hoverTarget }) => hoverTarget,
6999
7237
  filter: ({ autoplay }) => autoplay === "hover",
7000
7238
  handler(e) {
7239
+ var _a;
7240
+ (_a = this._reverseAbort) == null ? void 0 : _a.abort();
7001
7241
  if (!isTouch(e) || !isPlaying(this.$el)) {
7002
- play(this.$el);
7242
+ this.play();
7003
7243
  } else {
7004
- pauseHover(this.$el, this.restart);
7244
+ this.pause();
7005
7245
  }
7006
7246
  }
7007
7247
  },
7008
7248
  {
7009
7249
  name: `${pointerLeave} focusout`,
7010
- el: ({ hoverTarget, $el }) => query(hoverTarget, $el) || $el,
7250
+ el: ({ hoverTarget }) => hoverTarget,
7011
7251
  filter: ({ autoplay }) => autoplay === "hover",
7012
7252
  handler(e) {
7013
- if (!isTouch(e)) {
7014
- pauseHover(this.$el, this.restart);
7253
+ var _a;
7254
+ if (!isTouch(e) && !this.matchMedia) {
7255
+ (_a = this._reverseAbort) == null ? void 0 : _a.abort();
7256
+ this.pause();
7257
+ this._reverseAbort = playReverse(this.$el, this.hoverRewind);
7015
7258
  }
7016
7259
  }
7260
+ },
7261
+ {
7262
+ name: "loadedmetadata durationchange",
7263
+ filter: ({ parallax }) => parallax,
7264
+ handler() {
7265
+ this.$emit("resize");
7266
+ }
7267
+ },
7268
+ {
7269
+ name: "error pause ended",
7270
+ filter: ({ inviewQueued }) => inviewQueued,
7271
+ handler(e) {
7272
+ if (e.type === "error" || e.type === "ended" && !this.$el[loopKey]) {
7273
+ queue.delete(this.$el);
7274
+ }
7275
+ playNextQueued();
7276
+ }
7017
7277
  }
7018
7278
  ],
7019
7279
  observe: [
@@ -7025,33 +7285,144 @@
7025
7285
  }
7026
7286
  }),
7027
7287
  intersection({
7028
- filter: ({ $el, autoplay }) => autoplay !== "hover" && $el.preload !== "none",
7029
- handler([{ isIntersecting, target }]) {
7288
+ filter: ({ $el, interactionDriven }) => !interactionDriven && $el.preload !== "none",
7289
+ handler([{ isIntersecting }]) {
7030
7290
  if (!document.fullscreenElement) {
7031
7291
  if (isIntersecting) {
7032
7292
  if (this.autoplay) {
7033
- play(target);
7293
+ this.play();
7034
7294
  }
7035
7295
  } else {
7036
- pauseHover(target, this.restart);
7296
+ this.pause();
7037
7297
  }
7038
7298
  }
7039
7299
  },
7040
7300
  args: { intersecting: false },
7041
- options: ({ $el, autoplay }) => ({
7042
- root: autoplay === "inview" ? null : parent($el).closest(":not(a)")
7301
+ options: ({ $el, autoplay, inviewMargin }) => ({
7302
+ root: autoplay === "inview" ? null : parent($el).closest(":not(a)"),
7303
+ rootMargin: autoplay === "inview" ? inviewMargin : "0px"
7043
7304
  })
7044
7305
  })
7045
- ]
7306
+ ],
7307
+ update: {
7308
+ write({ percent }) {
7309
+ if (!this.parallax) {
7310
+ return;
7311
+ }
7312
+ const { duration, seeking } = this.$el;
7313
+ if (!isNaN(duration) && !seeking) {
7314
+ const value = this.matchMedia ? this.reducedMotionTime : percent * duration;
7315
+ setCurrentTime(this.$el, value);
7316
+ }
7317
+ },
7318
+ events: ["scroll", "resize"]
7319
+ },
7320
+ methods: {
7321
+ play() {
7322
+ var _a;
7323
+ if (this.matchMedia) {
7324
+ this.pause();
7325
+ if (this.isVideo) {
7326
+ setCurrentTime(this.$el, this.reducedMotionTime);
7327
+ }
7328
+ } else if (this.inviewQueued) {
7329
+ queue.set(this.$el, this.inviewQueued);
7330
+ playNextQueued();
7331
+ } else {
7332
+ (_a = this.cancelPreview) == null ? void 0 : _a.call(this);
7333
+ play(this.$el);
7334
+ }
7335
+ },
7336
+ pause() {
7337
+ pause(this.$el);
7338
+ queue.delete(this.$el);
7339
+ if (this.restart) {
7340
+ setCurrentTime(this.$el, 0);
7341
+ }
7342
+ }
7343
+ }
7046
7344
  };
7345
+ function setCurrentTime(videoEl, time) {
7346
+ if (videoEl.currentTime !== time) {
7347
+ videoEl.currentTime = time;
7348
+ }
7349
+ }
7047
7350
  function isPlaying(videoEl) {
7048
7351
  return !videoEl.paused && !videoEl.ended;
7049
7352
  }
7050
- function pauseHover(el, restart) {
7051
- pause(el);
7052
- if (restart && isTag(el, "video")) {
7053
- el.currentTime = 0;
7353
+ function preview($el) {
7354
+ if (!$el.requestVideoFrameCallback) {
7355
+ return;
7356
+ }
7357
+ let frame2;
7358
+ const pausePreview = () => {
7359
+ disconnect();
7360
+ pause($el);
7361
+ };
7362
+ const observer = observeIntersection($el, () => {
7363
+ observer.disconnect();
7364
+ frame2 = $el.requestVideoFrameCallback(pausePreview);
7365
+ play($el);
7366
+ });
7367
+ const disconnect = () => {
7368
+ observer.disconnect();
7369
+ $el.cancelVideoFrameCallback(frame2);
7370
+ };
7371
+ return disconnect;
7372
+ }
7373
+ const queue = /* @__PURE__ */ new Map();
7374
+ const played = /* @__PURE__ */ new WeakMap();
7375
+ let frame;
7376
+ function playNextQueued() {
7377
+ cancelAnimationFrame(frame);
7378
+ frame = requestAnimationFrame(() => {
7379
+ const getPlayed = (el) => {
7380
+ var _a;
7381
+ return (_a = played.get(el)) != null ? _a : 0;
7382
+ };
7383
+ const videos = shuffle(queue.keys()).sort((a, b) => getPlayed(a) - getPlayed(b));
7384
+ let active = videos.filter(isPlaying).length;
7385
+ for (const el of videos) {
7386
+ const maxQueued = queue.get(el);
7387
+ if (isPlaying(el) || active / queue.size >= maxQueued) {
7388
+ continue;
7389
+ }
7390
+ played.set(el, getPlayed(el) + 1);
7391
+ play(el);
7392
+ active++;
7393
+ }
7394
+ });
7395
+ }
7396
+ function shuffle(array) {
7397
+ array = [...array];
7398
+ for (let i = array.length - 1; i > 0; i--) {
7399
+ let j = Math.floor(Math.random() * (i + 1));
7400
+ [array[i], array[j]] = [array[j], array[i]];
7054
7401
  }
7402
+ return array;
7403
+ }
7404
+ function playReverse(el, playbackRate) {
7405
+ const start = el.currentTime;
7406
+ if (isNaN(start) || !playbackRate) {
7407
+ return;
7408
+ }
7409
+ playbackRate *= Math.max(1, start / 10 + 0.5);
7410
+ const controller = new AbortController();
7411
+ const time = Date.now();
7412
+ (function next() {
7413
+ requestAnimationFrame(() => {
7414
+ if (controller.signal.aborted) {
7415
+ return;
7416
+ }
7417
+ if (!el.seeking) {
7418
+ el.currentTime = Math.max(0, start - (Date.now() - time) * playbackRate / 1e3);
7419
+ }
7420
+ if (el.currentTime > 0) {
7421
+ next();
7422
+ }
7423
+ });
7424
+ })();
7425
+ return controller;
7055
7426
  }
7056
7427
 
7057
7428
  var cover = {
@@ -7371,6 +7742,7 @@
7371
7742
  css(this.$el, this._style);
7372
7743
  this.$el.hidden = true;
7373
7744
  const viewports = this.target.map((target) => getViewport$1(this.$el, target));
7745
+ const boundaryOffsets = this.boundary.map((el) => offset(el));
7374
7746
  const viewportOffset = this.getViewportOffset(this.$el);
7375
7747
  const dirs = [
7376
7748
  [0, ["x", "width", "left", "right"]],
@@ -7380,7 +7752,7 @@
7380
7752
  if (this.axis !== axis && includes([axis, true], this.stretch)) {
7381
7753
  css(this.$el, {
7382
7754
  [prop]: Math.min(
7383
- offset(this.boundary[i])[prop],
7755
+ boundaryOffsets[i][prop],
7384
7756
  viewports[i][prop] - 2 * viewportOffset
7385
7757
  ),
7386
7758
  [`overflow-${axis}`]: "auto"
@@ -7402,10 +7774,10 @@
7402
7774
  const elOffset = offset(this.$el);
7403
7775
  css(this.$el, {
7404
7776
  [prop]: (targetOffset[start] > elOffset[start] ? targetOffset[this.inset ? end : start] - Math.max(
7405
- offset(this.boundary[i])[start],
7777
+ boundaryOffsets[i][start],
7406
7778
  viewports[i][start] + viewportOffset
7407
7779
  ) : Math.min(
7408
- offset(this.boundary[i])[end],
7780
+ boundaryOffsets[i][end],
7409
7781
  viewports[i][end] - viewportOffset
7410
7782
  ) - targetOffset[this.inset ? start : end]) - positionOffset,
7411
7783
  [`overflow-${axis}`]: "auto"
@@ -7608,18 +7980,7 @@
7608
7980
  return;
7609
7981
  }
7610
7982
  const active2 = this.getActive();
7611
- let next = -1;
7612
- if (keyCode === keyMap.HOME) {
7613
- next = 0;
7614
- } else if (keyCode === keyMap.END) {
7615
- next = "last";
7616
- } else if (keyCode === keyMap.UP) {
7617
- next = "previous";
7618
- } else if (keyCode === keyMap.DOWN) {
7619
- next = "next";
7620
- } else if (keyCode === keyMap.ESC) {
7621
- (_a = active2.targetEl) == null ? void 0 : _a.focus();
7622
- }
7983
+ const next = getNavigationIndex(keyCode, keyMap.UP, keyMap.DOWN);
7623
7984
  if (~next) {
7624
7985
  e.preventDefault();
7625
7986
  const elements = $$(selFocusable, current);
@@ -7630,6 +7991,9 @@
7630
7991
  )].focus();
7631
7992
  return;
7632
7993
  }
7994
+ if (keyCode === keyMap.ESC) {
7995
+ (_a = active2.targetEl) == null ? void 0 : _a.focus();
7996
+ }
7633
7997
  handleNavItemNavigation(e, this.items, active2);
7634
7998
  }
7635
7999
  },
@@ -7669,7 +8033,9 @@
7669
8033
  const drop = this.getDropdown(target);
7670
8034
  const adjustHeight = () => {
7671
8035
  const maxBottom = Math.max(
7672
- ...parents(target, `.${this.clsDrop}`).concat(target).map((el) => offset(el).bottom)
8036
+ ...[...parents(target, `.${this.clsDrop}`), target].map(
8037
+ (el) => offset(el).bottom
8038
+ )
7673
8039
  );
7674
8040
  offset(this.dropbar, {
7675
8041
  left: offset(this.dropbar).left,
@@ -7719,7 +8085,7 @@
7719
8085
  },
7720
8086
  async transitionTo(newHeight, el) {
7721
8087
  const { dropbar } = this;
7722
- const oldHeight = height(dropbar);
8088
+ const oldHeight = height$1(dropbar);
7723
8089
  el = oldHeight < newHeight && el;
7724
8090
  await Transition.cancel([el, dropbar]);
7725
8091
  if (el) {
@@ -7729,7 +8095,7 @@
7729
8095
  }
7730
8096
  }
7731
8097
  css(el, "clipPath", `polygon(0 0,100% 0,100% ${oldHeight}px,0 ${oldHeight}px)`);
7732
- height(dropbar, oldHeight);
8098
+ height$1(dropbar, oldHeight);
7733
8099
  await Promise.all([
7734
8100
  Transition.start(dropbar, { height: newHeight }, this.duration),
7735
8101
  Transition.start(
@@ -7769,23 +8135,14 @@
7769
8135
  function handleNavItemNavigation(e, toggles, active2) {
7770
8136
  var _a, _b, _c;
7771
8137
  const { current, keyCode } = e;
7772
- let next = -1;
7773
- if (keyCode === keyMap.HOME) {
7774
- next = 0;
7775
- } else if (keyCode === keyMap.END) {
7776
- next = "last";
7777
- } else if (keyCode === keyMap.LEFT) {
7778
- next = "previous";
7779
- } else if (keyCode === keyMap.RIGHT) {
7780
- next = "next";
7781
- } else if (keyCode === keyMap.TAB) {
7782
- (_a = active2.targetEl) == null ? void 0 : _a.focus();
7783
- (_b = active2.hide) == null ? void 0 : _b.call(active2, false);
7784
- }
8138
+ const next = getNavigationIndex(keyCode);
7785
8139
  if (~next) {
7786
8140
  e.preventDefault();
7787
- (_c = active2.hide) == null ? void 0 : _c.call(active2, false);
8141
+ (_a = active2.hide) == null ? void 0 : _a.call(active2, false);
7788
8142
  toggles[getIndex(next, toggles, toggles.indexOf(active2.targetEl || current))].focus();
8143
+ } else if (keyCode === keyMap.TAB) {
8144
+ (_b = active2.targetEl) == null ? void 0 : _b.focus();
8145
+ (_c = active2.hide) == null ? void 0 : _c.call(active2, false);
7789
8146
  }
7790
8147
  }
7791
8148
  function preventInitialPointerEnter(el) {
@@ -7858,7 +8215,8 @@
7858
8215
  parallaxJustify: Boolean
7859
8216
  },
7860
8217
  data: {
7861
- margin: "uk-grid-margin",
8218
+ margin: "",
8219
+ firstRow: "uk-first-row",
7862
8220
  clsStack: "uk-grid-stack",
7863
8221
  masonry: false,
7864
8222
  parallax: 0,
@@ -7880,14 +8238,14 @@
7880
8238
  {
7881
8239
  read(data) {
7882
8240
  const { rows } = data;
7883
- let { masonry, parallax, parallaxJustify, margin } = this;
8241
+ let { masonry, parallax, parallaxJustify } = this;
7884
8242
  parallax = Math.max(0, toPx(parallax));
7885
8243
  if (!(masonry || parallax || parallaxJustify) || positionedAbsolute(rows) || rows[0].some(
7886
8244
  (el, i) => rows.some((row) => row[i] && row[i].offsetWidth !== el.offsetWidth)
7887
8245
  )) {
7888
8246
  return data.translates = data.scrollColumns = false;
7889
8247
  }
7890
- let gutter = getGutter(rows, margin);
8248
+ let gutter = toFloat(css(this.$el, "row-gap"));
7891
8249
  let columns;
7892
8250
  let translates;
7893
8251
  if (masonry) {
@@ -7980,10 +8338,6 @@
7980
8338
  }
7981
8339
  return [columns, translates];
7982
8340
  }
7983
- function getGutter(rows, cls) {
7984
- const node = rows.flat().find((el) => hasClass(el, cls));
7985
- return toFloat(node ? css(node, "marginTop") : css(rows[0][0], "paddingLeft"));
7986
- }
7987
8341
  function transpose(rows) {
7988
8342
  const columns = [];
7989
8343
  for (const row of rows) {
@@ -8667,7 +9021,7 @@
8667
9021
  } else {
8668
9022
  css(this.$el, "display", "block");
8669
9023
  }
8670
- height(this.$el);
9024
+ height$1(this.$el);
8671
9025
  }
8672
9026
  },
8673
9027
  {
@@ -8904,7 +9258,7 @@
8904
9258
  this.clsSidebarAnimation,
8905
9259
  this.mode === "reveal" ? "" : this.clsMode
8906
9260
  );
8907
- height(body);
9261
+ height$1(body);
8908
9262
  addClass(body, this.clsContainerAnimation);
8909
9263
  this.clsContainerAnimation && suppressUserScale();
8910
9264
  }
@@ -8990,6 +9344,9 @@
8990
9344
  events: ["resize"]
8991
9345
  }
8992
9346
  };
9347
+ function height(el) {
9348
+ return dimensions$1(el).height - boxModelAdjust(el, "height", css(el, "boxSizing"));
9349
+ }
8993
9350
 
8994
9351
  var overflowFade = {
8995
9352
  data: {
@@ -9422,12 +9779,12 @@
9422
9779
  ],
9423
9780
  update: [
9424
9781
  {
9425
- read({ height: height$1, width, margin, sticky }, types) {
9782
+ read({ height, width, margin, sticky }, types) {
9426
9783
  this.inactive = !this.matchMedia || !isVisible(this.$el) || !this.$el.offsetHeight;
9427
9784
  if (this.inactive) {
9428
9785
  return;
9429
9786
  }
9430
- const dynamicViewport = height(window);
9787
+ const dynamicViewport = height$1(window);
9431
9788
  const maxScrollHeight = Math.max(
9432
9789
  0,
9433
9790
  document.scrollingElement.scrollHeight - dynamicViewport
@@ -9442,7 +9799,7 @@
9442
9799
  this.hide();
9443
9800
  }
9444
9801
  if (!this.active) {
9445
- ({ height: height$1, width } = dimensions$1(this.$el));
9802
+ ({ height, width } = dimensions$1(this.$el));
9446
9803
  margin = css(this.$el, "margin");
9447
9804
  }
9448
9805
  if (hide) {
@@ -9450,17 +9807,17 @@
9450
9807
  }
9451
9808
  const viewport2 = toPx("100vh", "height");
9452
9809
  let position = this.position;
9453
- if (this.overflowFlip && height$1 > viewport2) {
9810
+ if (this.overflowFlip && height > viewport2) {
9454
9811
  position = position === "top" ? "bottom" : "top";
9455
9812
  }
9456
9813
  const referenceElement = this.isFixed ? this.placeholder : this.$el;
9457
9814
  let [offset$1, offsetEnd] = [this.offset, this.offsetEnd].map(
9458
9815
  (value) => toPx(value, "height", sticky ? this.$el : referenceElement)
9459
9816
  );
9460
- if (position === "bottom" && (height$1 < dynamicViewport || this.overflowFlip)) {
9461
- offset$1 += dynamicViewport - height$1;
9817
+ if (position === "bottom" && (height < dynamicViewport || this.overflowFlip)) {
9818
+ offset$1 += dynamicViewport - height;
9462
9819
  }
9463
- const elementBox = height$1 + offset$1 + offsetEnd;
9820
+ const elementBox = height + offset$1 + offsetEnd;
9464
9821
  const overflow = this.overflowFlip ? 0 : Math.max(0, elementBox - viewport2);
9465
9822
  const topOffset = offset(referenceElement).top - // offset possible `transform: translateY` animation 'uk-animation-slide-top' while hiding
9466
9823
  new DOMMatrix(css(referenceElement, "transform")).m42;
@@ -9468,7 +9825,7 @@
9468
9825
  const start = (this.start === false ? topOffset : parseProp(this.start, this.$el, topOffset)) - offset$1;
9469
9826
  const end = this.end === false ? maxScrollHeight : Math.min(
9470
9827
  maxScrollHeight,
9471
- parseProp(this.end, this.$el, topOffset + height$1, true) - elHeight - offset$1 + overflow
9828
+ parseProp(this.end, this.$el, topOffset + height, true) - elHeight - offset$1 + overflow
9472
9829
  );
9473
9830
  sticky = !this.showOnUp && start + offset$1 === topOffset && end === Math.min(
9474
9831
  maxScrollHeight,
@@ -9479,7 +9836,7 @@
9479
9836
  end,
9480
9837
  offset: offset$1,
9481
9838
  overflow,
9482
- height: height$1,
9839
+ height,
9483
9840
  elHeight,
9484
9841
  width,
9485
9842
  margin,
@@ -9656,7 +10013,7 @@
9656
10013
  if (!value) {
9657
10014
  return 0;
9658
10015
  }
9659
- if (isNumeric(value) || isString(value) && value.match(/^-?\d/)) {
10016
+ if (isNumeric(value) || isString(value) && /^-?\d/.test(value)) {
9660
10017
  return propOffset + toPx(value, "height", el, true);
9661
10018
  } else {
9662
10019
  const refElement = value === true ? getVisibleParent(el) : query(value, el);
@@ -9771,10 +10128,9 @@
9771
10128
 
9772
10129
  const selDisabled = ".uk-disabled *, .uk-disabled, [disabled]";
9773
10130
  var Switcher = {
9774
- mixins: [Togglable],
10131
+ mixins: [Connect],
9775
10132
  args: "connect",
9776
10133
  props: {
9777
- connect: String,
9778
10134
  toggle: String,
9779
10135
  itemNav: String,
9780
10136
  active: Number,
@@ -9786,20 +10142,12 @@
9786
10142
  toggle: "> * > :first-child",
9787
10143
  itemNav: false,
9788
10144
  active: 0,
9789
- cls: "uk-active",
9790
10145
  attrItem: "uk-switcher-item",
9791
10146
  selVertical: ".uk-nav",
9792
10147
  followFocus: false,
9793
10148
  swiping: true
9794
10149
  },
9795
10150
  computed: {
9796
- connects: {
9797
- get: ({ connect }, $el) => queryAll(connect, $el),
9798
- observe: ({ connect }) => connect
9799
- },
9800
- connectChildren() {
9801
- return this.connects.flatMap((el) => children(el));
9802
- },
9803
10151
  toggles: ({ toggle }, $el) => $$(toggle, $el),
9804
10152
  children(_, $el) {
9805
10153
  return children($el).filter(
@@ -9830,10 +10178,7 @@
9830
10178
  connected() {
9831
10179
  this.$el.role = "tablist";
9832
10180
  },
9833
- observe: [
9834
- lazyload({ targets: ({ connectChildren }) => connectChildren }),
9835
- swipe({ target: ({ connects }) => connects, filter: ({ swiping }) => swiping })
9836
- ],
10181
+ observe: swipe({ target: ({ connects }) => connects, filter: ({ swiping }) => swiping }),
9837
10182
  events: [
9838
10183
  {
9839
10184
  name: "click keydown",
@@ -9851,7 +10196,11 @@
9851
10196
  handler(e) {
9852
10197
  const { current, keyCode } = e;
9853
10198
  const isVertical = matches(this.$el, this.selVertical);
9854
- let i = keyCode === keyMap.HOME ? 0 : keyCode === keyMap.END ? "last" : keyCode === keyMap.LEFT && !isVertical || keyCode === keyMap.UP && isVertical ? "previous" : keyCode === keyMap.RIGHT && !isVertical || keyCode === keyMap.DOWN && isVertical ? "next" : -1;
10199
+ const i = getNavigationIndex(
10200
+ keyCode,
10201
+ isVertical ? keyMap.UP : keyMap.LEFT,
10202
+ isVertical ? keyMap.DOWN : keyMap.RIGHT
10203
+ );
9855
10204
  if (~i) {
9856
10205
  e.preventDefault();
9857
10206
  const next = this.toggles[this.next(i, this.toggles.indexOf(current))];
@@ -9883,24 +10232,16 @@
9883
10232
  }
9884
10233
  ],
9885
10234
  update() {
9886
- var _a;
9887
- for (const el of this.connects) {
9888
- if (isTag(el, "ul")) {
9889
- el.role = "presentation";
9890
- }
9891
- }
9892
10235
  attr(children(this.$el), "role", "presentation");
9893
10236
  for (const index in this.toggles) {
9894
- const toggle = this.toggles[index];
9895
- const item = (_a = this.connects[0]) == null ? void 0 : _a.children[index];
9896
- toggle.role = "tab";
9897
- if (!item) {
9898
- continue;
9899
- }
9900
- toggle.id = generateId(this, toggle);
9901
- item.id = generateId(this, item);
9902
- attr(toggle, "aria-controls", item.id);
9903
- attr(item, { role: "tabpanel", "aria-labelledby": toggle.id });
10237
+ const controls = this.connects.map(({ children: children2 }) => {
10238
+ var _a;
10239
+ return (_a = children2[index]) == null ? void 0 : _a.id;
10240
+ }).filter(Boolean);
10241
+ attr(this.toggles[index], {
10242
+ role: "tab",
10243
+ "aria-controls": controls.join(" ")
10244
+ });
9904
10245
  }
9905
10246
  attr(this.$el, "aria-orientation", matches(this.$el, this.selVertical) ? "vertical" : null);
9906
10247
  },
@@ -9933,15 +10274,7 @@
9933
10274
  tabindex: next === i ? null : -1
9934
10275
  });
9935
10276
  });
9936
- const animate = prev >= 0 && prev !== next;
9937
- this.connects.forEach(async ({ children: children2 }) => {
9938
- const actives = toArray(children2).filter(
9939
- (child, i) => i !== next && hasClass(child, this.cls)
9940
- );
9941
- if (await this.toggleElement(actives, false, animate)) {
9942
- await this.toggleElement(children2[next], true, animate);
9943
- }
9944
- });
10277
+ return this.showConnects(next, prev >= 0 && prev !== next);
9945
10278
  }
9946
10279
  }
9947
10280
  };