uikit 3.15.11-dev.fd61e70ff → 3.15.12-dev.2299ba0d4

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 (50) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/build/util.js +26 -20
  3. package/dist/css/uikit-core-rtl.css +3 -3
  4. package/dist/css/uikit-core-rtl.min.css +1 -1
  5. package/dist/css/uikit-core.css +1 -1
  6. package/dist/css/uikit-core.min.css +1 -1
  7. package/dist/css/uikit-rtl.css +3 -3
  8. package/dist/css/uikit-rtl.min.css +1 -1
  9. package/dist/css/uikit.css +1 -1
  10. package/dist/css/uikit.min.css +1 -1
  11. package/dist/js/components/countdown.js +14 -13
  12. package/dist/js/components/countdown.min.js +1 -1
  13. package/dist/js/components/filter.js +32 -30
  14. package/dist/js/components/filter.min.js +1 -1
  15. package/dist/js/components/lightbox-panel.js +160 -148
  16. package/dist/js/components/lightbox-panel.min.js +1 -1
  17. package/dist/js/components/lightbox.js +168 -156
  18. package/dist/js/components/lightbox.min.js +1 -1
  19. package/dist/js/components/notification.js +19 -17
  20. package/dist/js/components/notification.min.js +1 -1
  21. package/dist/js/components/parallax.js +37 -36
  22. package/dist/js/components/parallax.min.js +1 -1
  23. package/dist/js/components/slider-parallax.js +38 -29
  24. package/dist/js/components/slider-parallax.min.js +1 -1
  25. package/dist/js/components/slider.js +84 -73
  26. package/dist/js/components/slider.min.js +1 -1
  27. package/dist/js/components/slideshow-parallax.js +38 -29
  28. package/dist/js/components/slideshow-parallax.min.js +1 -1
  29. package/dist/js/components/slideshow.js +95 -78
  30. package/dist/js/components/slideshow.min.js +1 -1
  31. package/dist/js/components/sortable.js +40 -37
  32. package/dist/js/components/sortable.min.js +1 -1
  33. package/dist/js/components/tooltip.js +43 -39
  34. package/dist/js/components/tooltip.min.js +1 -1
  35. package/dist/js/components/upload.js +12 -12
  36. package/dist/js/components/upload.min.js +1 -1
  37. package/dist/js/uikit-core.js +576 -527
  38. package/dist/js/uikit-core.min.js +1 -17
  39. package/dist/js/uikit-icons.js +3 -3
  40. package/dist/js/uikit-icons.min.js +1 -1
  41. package/dist/js/uikit.js +873 -798
  42. package/dist/js/uikit.min.js +1 -17
  43. package/package.json +14 -14
  44. package/src/js/api/boot.js +3 -1
  45. package/src/js/components/slider-parallax.js +9 -0
  46. package/src/js/core/drop.js +5 -1
  47. package/src/js/core/sticky.js +6 -7
  48. package/src/js/util/env.js +1 -3
  49. package/src/js/util/position.js +11 -6
  50. package/tests/navbar.html +1 -1
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.15.11-dev.fd61e70ff | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
1
+ /*! UIkit 3.15.12-dev.2299ba0d4 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
2
2
 
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
@@ -9,7 +9,8 @@
9
9
  var Class = {
10
10
  connected() {
11
11
  uikitUtil.addClass(this.$el, this.$options.id);
12
- } };
12
+ }
13
+ };
13
14
 
14
15
  const units = ['days', 'hours', 'minutes', 'seconds'];
15
16
 
@@ -18,13 +19,13 @@
18
19
 
19
20
  props: {
20
21
  date: String,
21
- clsWrapper: String },
22
-
22
+ clsWrapper: String
23
+ },
23
24
 
24
25
  data: {
25
26
  date: '',
26
- clsWrapper: '.uk-countdown-%unit%' },
27
-
27
+ clsWrapper: '.uk-countdown-%unit%'
28
+ },
28
29
 
29
30
  connected() {
30
31
  this.date = Date.parse(this.$props.date);
@@ -49,8 +50,8 @@
49
50
  } else {
50
51
  this.start();
51
52
  }
52
- } }],
53
-
53
+ }
54
+ }],
54
55
 
55
56
 
56
57
  methods: {
@@ -94,9 +95,9 @@
94
95
  digits.forEach((digit, i) => el.children[i].textContent = digit);
95
96
  }
96
97
  }
97
- } } };
98
-
99
-
98
+ }
99
+ }
100
+ };
100
101
 
101
102
  function getTimeSpan(date) {
102
103
  const total = date - Date.now();
@@ -106,8 +107,8 @@
106
107
  seconds: total / 1000 % 60,
107
108
  minutes: total / 1000 / 60 % 60,
108
109
  hours: total / 1000 / 60 / 60 % 24,
109
- days: total / 1000 / 60 / 60 / 24 };
110
-
110
+ days: total / 1000 / 60 / 60 / 24
111
+ };
111
112
  }
112
113
 
113
114
  if (typeof window !== 'undefined' && window.UIkit) {
@@ -1 +1 @@
1
- /*! UIkit 3.15.11-dev.fd61e70ff | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(e,s){typeof exports=="object"&&typeof module<"u"?module.exports=s(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitcountdown",["uikit-util"],s):(e=typeof globalThis<"u"?globalThis:e||self,e.UIkitCountdown=s(e.UIkit.util))})(this,function(e){"use strict";var s={connected(){e.addClass(this.$el,this.$options.id)}};const a=["days","hours","minutes","seconds"];var d={mixins:[s],props:{date:String,clsWrapper:String},data:{date:"",clsWrapper:".uk-countdown-%unit%"},connected(){this.date=Date.parse(this.$props.date),this.start()},disconnected(){this.stop()},events:[{name:"visibilitychange",el(){return document},handler(){document.hidden?this.stop():this.start()}}],methods:{start(){this.stop(),this.update(),this.timer=setInterval(this.update,1e3)},stop(){clearInterval(this.timer)},update(){const n=r(this.date);(!this.date||n.total<=0)&&(this.stop(),n.days=n.hours=n.minutes=n.seconds=0);for(const i of a){const o=e.$(this.clsWrapper.replace("%unit%",i),this.$el);if(!o)continue;let t=String(Math.trunc(n[i]));t=t.length<2?"0"+t:t,o.textContent!==t&&(t=t.split(""),t.length!==o.children.length&&e.html(o,t.map(()=>"<span></span>").join("")),t.forEach((u,h)=>o.children[h].textContent=u))}}}};function r(n){const i=n-Date.now();return{total:i,seconds:i/1e3%60,minutes:i/1e3/60%60,hours:i/1e3/60/60%24,days:i/1e3/60/60/24}}return typeof window<"u"&&window.UIkit&&window.UIkit.component("countdown",d),d});
1
+ /*! UIkit 3.15.12-dev.2299ba0d4 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(e,s){typeof exports=="object"&&typeof module<"u"?module.exports=s(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitcountdown",["uikit-util"],s):(e=typeof globalThis<"u"?globalThis:e||self,e.UIkitCountdown=s(e.UIkit.util))})(this,function(e){"use strict";var s={connected(){e.addClass(this.$el,this.$options.id)}};const a=["days","hours","minutes","seconds"];var d={mixins:[s],props:{date:String,clsWrapper:String},data:{date:"",clsWrapper:".uk-countdown-%unit%"},connected(){this.date=Date.parse(this.$props.date),this.start()},disconnected(){this.stop()},events:[{name:"visibilitychange",el(){return document},handler(){document.hidden?this.stop():this.start()}}],methods:{start(){this.stop(),this.update(),this.timer=setInterval(this.update,1e3)},stop(){clearInterval(this.timer)},update(){const n=r(this.date);(!this.date||n.total<=0)&&(this.stop(),n.days=n.hours=n.minutes=n.seconds=0);for(const i of a){const o=e.$(this.clsWrapper.replace("%unit%",i),this.$el);if(!o)continue;let t=String(Math.trunc(n[i]));t=t.length<2?"0"+t:t,o.textContent!==t&&(t=t.split(""),t.length!==o.children.length&&e.html(o,t.map(()=>"<span></span>").join("")),t.forEach((u,h)=>o.children[h].textContent=u))}}}};function r(n){const i=n-Date.now();return{total:i,seconds:i/1e3%60,minutes:i/1e3/60%60,hours:i/1e3/60/60%24,days:i/1e3/60/60/24}}return typeof window<"u"&&window.UIkit&&window.UIkit.component("countdown",d),d});
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.15.11-dev.fd61e70ff | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
1
+ /*! UIkit 3.15.12-dev.2299ba0d4 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
2
2
 
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
@@ -67,8 +67,8 @@
67
67
  top: offsetTop,
68
68
  left: offsetLeft,
69
69
  bottom: offsetTop + offsetHeight,
70
- right: offsetLeft + offsetWidth };
71
-
70
+ right: offsetLeft + offsetWidth
71
+ };
72
72
  }
73
73
 
74
74
  const clsLeave = 'uk-transition-leave';
@@ -226,8 +226,8 @@
226
226
  const [propsTo, propsFrom] = getTransitionProps(target, nodes, currentProps);
227
227
  const attrsTo = nodes.map((el) => ({
228
228
  class: uikitUtil.attr(el, 'class'),
229
- style: uikitUtil.attr(el, 'style') }));
230
-
229
+ style: uikitUtil.attr(el, 'style')
230
+ }));
231
231
 
232
232
  // Reset to previous state
233
233
  nodes.forEach((el, i) => propsFrom[i] && uikitUtil.css(el, propsFrom[i]));
@@ -265,8 +265,8 @@
265
265
  pointerEvents: 'none',
266
266
  position: 'absolute',
267
267
  zIndex: zIndex === 'auto' ? uikitUtil.index(el) : zIndex,
268
- ...getPositionWithMargin(el) } :
269
-
268
+ ...getPositionWithMargin(el)
269
+ } :
270
270
  false;
271
271
  }
272
272
 
@@ -320,8 +320,8 @@
320
320
  width,
321
321
  transform: '',
322
322
  ...uikitUtil.position(el),
323
- ...uikitUtil.css(el, ['marginTop', 'marginLeft']) };
324
-
323
+ ...uikitUtil.css(el, ['marginTop', 'marginLeft'])
324
+ };
325
325
  }
326
326
 
327
327
  function awaitFrame() {
@@ -331,13 +331,13 @@
331
331
  var Animate = {
332
332
  props: {
333
333
  duration: Number,
334
- animation: Boolean },
335
-
334
+ animation: Boolean
335
+ },
336
336
 
337
337
  data: {
338
338
  duration: 150,
339
- animation: 'slide' },
340
-
339
+ animation: 'slide'
340
+ },
341
341
 
342
342
  methods: {
343
343
  animate(action, target) {if (target === void 0) {target = this.$el;}
@@ -355,7 +355,9 @@
355
355
  };
356
356
 
357
357
  return animationFn(action, target, this.duration).catch(uikitUtil.noop);
358
- } } };
358
+ }
359
+ }
360
+ };
359
361
 
360
362
  var Component = {
361
363
  mixins: [Animate],
@@ -364,16 +366,16 @@
364
366
 
365
367
  props: {
366
368
  target: Boolean,
367
- selActive: Boolean },
368
-
369
+ selActive: Boolean
370
+ },
369
371
 
370
372
  data: {
371
373
  target: null,
372
374
  selActive: false,
373
375
  attrItem: 'uk-filter-control',
374
376
  cls: 'uk-active',
375
- duration: 250 },
376
-
377
+ duration: 250
378
+ },
377
379
 
378
380
  computed: {
379
381
  toggles: {
@@ -390,8 +392,8 @@
390
392
  }
391
393
  },
392
394
 
393
- immediate: true },
394
-
395
+ immediate: true
396
+ },
395
397
 
396
398
  children: {
397
399
  get(_ref2, $el) {let { target } = _ref2;
@@ -404,9 +406,9 @@
404
406
  }
405
407
  },
406
408
 
407
- immediate: true } },
408
-
409
-
409
+ immediate: true
410
+ }
411
+ },
410
412
 
411
413
  events: [
412
414
  {
@@ -419,8 +421,8 @@
419
421
  handler(e) {
420
422
  e.preventDefault();
421
423
  this.apply(e.current);
422
- } }],
423
-
424
+ }
425
+ }],
424
426
 
425
427
 
426
428
  methods: {
@@ -438,8 +440,8 @@
438
440
  filter((item) => uikitUtil.hasClass(item, this.cls)).
439
441
  reduce((state, el) => mergeState(el, this.attrItem, state), {
440
442
  filter: { '': '' },
441
- sort: [] });
442
-
443
+ sort: []
444
+ });
443
445
  },
444
446
 
445
447
  async setState(state, animate) {if (animate === void 0) {animate = true;}
@@ -466,9 +468,9 @@
466
468
 
467
469
  updateState() {
468
470
  uikitUtil.fastdom.write(() => this.setState(this.getState(), false));
469
- } } };
470
-
471
-
471
+ }
472
+ }
473
+ };
472
474
 
473
475
  function getFilter(el, attr) {
474
476
  return uikitUtil.parseOptions(uikitUtil.data(el, attr), ['filter']);
@@ -1 +1 @@
1
- /*! UIkit 3.15.11-dev.fd61e70ff | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(n,y){typeof exports=="object"&&typeof module<"u"?module.exports=y(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitfilter",["uikit-util"],y):(n=typeof globalThis<"u"?globalThis:n||self,n.UIkitFilter=y(n.UIkit.util))})(this,function(n){"use strict";function y(s){return q(s,"top","bottom")}function q(s,e,t){const o=[[]];for(const c of s){if(!n.isVisible(c))continue;let r=u(c);for(let a=o.length-1;a>=0;a--){const f=o[a];if(!f[0]){f.push(c);break}let h;if(f[0].offsetParent===c.offsetParent?h=u(f[0]):(r=u(c,!0),h=u(f[0],!0)),r[e]>=h[t]-1&&r[e]!==h[e]){o.push([c]);break}if(r[t]-1>h[e]||r[e]===h[e]){f.push(c);break}if(a===0){o.unshift([c]);break}}}return o}function u(s,e){e===void 0&&(e=!1);let{offsetTop:t,offsetLeft:o,offsetHeight:c,offsetWidth:r}=s;return e&&([t,o]=n.offsetPosition(s)),{top:t,left:o,bottom:t+c,right:o+r}}const v="uk-transition-leave",g="uk-transition-enter";function T(s,e,t,o){o===void 0&&(o=0);const c=w(e,!0),r={opacity:1},a={opacity:0},f=m=>()=>c===w(e)?m():Promise.reject(),h=f(async()=>{n.addClass(e,v),await Promise.all(F(e).map((m,l)=>new Promise(d=>setTimeout(()=>n.Transition.start(m,a,t/2,"ease").then(d),l*o)))),n.removeClass(e,v)}),p=f(async()=>{const m=n.height(e);n.addClass(e,g),s(),n.css(n.children(e),{opacity:0}),await A();const l=n.children(e),d=n.height(e);n.css(e,"alignContent","flex-start"),n.height(e,m);const i=F(e);n.css(l,a);const x=i.map(async(R,G)=>{await L(G*o),await n.Transition.start(R,r,t/2,"ease")});m!==d&&x.push(n.Transition.start(e,{height:d},t/2+i.length*o,"ease")),await Promise.all(x).then(()=>{n.removeClass(e,g),c===w(e)&&(n.css(e,{height:"",alignContent:""}),n.css(l,{opacity:""}),delete e.dataset.transition)})});return n.hasClass(e,v)?I(e).then(p):n.hasClass(e,g)?I(e).then(h).then(p):h().then(p)}function w(s,e){return e&&(s.dataset.transition=1+w(s)),n.toNumber(s.dataset.transition)||0}function I(s){return Promise.all(n.children(s).filter(n.Transition.inProgress).map(e=>new Promise(t=>n.once(e,"transitionend transitioncanceled",t))))}function F(s){return y(n.children(s)).reduce((e,t)=>e.concat(n.sortBy(t.filter(o=>n.isInView(o)),"offsetLeft")),[])}function A(){return new Promise(s=>requestAnimationFrame(s))}function L(s){return new Promise(e=>setTimeout(e,s))}async function V(s,e,t){await $();let o=n.children(e);const c=o.map(d=>S(d,!0)),r={...n.css(e,["height","padding"]),display:"block"};await Promise.all(o.concat(e).map(n.Transition.cancel)),s(),o=o.concat(n.children(e).filter(d=>!n.includes(o,d))),await Promise.resolve(),n.fastdom.flush();const a=n.attr(e,"style"),f=n.css(e,["height","padding"]),[h,p]=B(e,o,c),m=o.map(d=>({class:n.attr(d,"class"),style:n.attr(d,"style")}));o.forEach((d,i)=>p[i]&&n.css(d,p[i])),n.css(e,r),await $();const l=o.map((d,i)=>n.parent(d)===e&&n.Transition.start(d,h[i],t,"ease")).concat(n.Transition.start(e,f,t,"ease"));try{await Promise.all(l),o.forEach((d,i)=>{n.attr(d,m[i]),n.parent(d)===e&&n.css(d,"display",h[i].opacity===0?"none":"")}),n.attr(e,"style",a)}catch{n.attr(o,"style",""),N(e,r)}}function S(s,e){const t=n.css(s,"zIndex");return n.isVisible(s)?{display:"",opacity:e?n.css(s,"opacity"):"0",pointerEvents:"none",position:"absolute",zIndex:t==="auto"?n.index(s):t,...P(s)}:!1}function B(s,e,t){const o=e.map((r,a)=>n.parent(r)&&a in t?t[a]?n.isVisible(r)?P(r):{opacity:0}:{opacity:n.isVisible(r)?1:0}:!1),c=o.map((r,a)=>{const f=n.parent(e[a])===s&&(t[a]||S(e[a]));if(!f)return!1;if(!r)delete f.opacity;else if(!("opacity"in r)){const{opacity:h}=f;h%1?r.opacity=1:delete f.opacity}return f});return[o,c]}function N(s,e){for(const t in e)n.css(s,t,"")}function P(s){const{height:e,width:t}=n.offset(s);return{height:e,width:t,transform:"",...n.position(s),...n.css(s,["marginTop","marginLeft"])}}function $(){return new Promise(s=>requestAnimationFrame(s))}var O={props:{duration:Number,animation:Boolean},data:{duration:150,animation:"slide"},methods:{animate(s,e){e===void 0&&(e=this.$el);const t=this.animation;return(t==="fade"?T:t==="delayed-fade"?function(){for(var c=arguments.length,r=new Array(c),a=0;a<c;a++)r[a]=arguments[a];return T(...r,40)}:t?V:()=>(s(),Promise.resolve()))(s,e,this.duration).catch(n.noop)}}},b={mixins:[O],args:"target",props:{target:Boolean,selActive:Boolean},data:{target:null,selActive:!1,attrItem:"uk-filter-control",cls:"uk-active",duration:250},computed:{toggles:{get(s,e){let{attrItem:t}=s;return n.$$("["+t+"],[data-"+t+"]",e)},watch(){if(this.updateState(),this.selActive!==!1){const s=n.$$(this.selActive,this.$el);this.toggles.forEach(e=>n.toggleClass(e,this.cls,n.includes(s,e)))}},immediate:!0},children:{get(s,e){let{target:t}=s;return n.$$(t+" > *",e)},watch(s,e){e&&!D(s,e)&&this.updateState()},immediate:!0}},events:[{name:"click",delegate(){return"["+this.attrItem+"],[data-"+this.attrItem+"]"},handler(s){s.preventDefault(),this.apply(s.current)}}],methods:{apply(s){const e=this.getState(),t=E(s,this.attrItem,this.getState());z(e,t)||this.setState(t)},getState(){return this.toggles.filter(s=>n.hasClass(s,this.cls)).reduce((s,e)=>E(e,this.attrItem,s),{filter:{"":""},sort:[]})},async setState(s,e){e===void 0&&(e=!0),s={filter:{"":""},sort:[],...s},n.trigger(this.$el,"beforeFilter",[this,s]),this.toggles.forEach(t=>n.toggleClass(t,this.cls,!!j(t,this.attrItem,s))),await Promise.all(n.$$(this.target,this.$el).map(t=>{const o=()=>{H(s,t,n.children(t)),this.$update(this.$el)};return e?this.animate(o,t):o()})),n.trigger(this.$el,"afterFilter",[this])},updateState(){n.fastdom.write(()=>this.setState(this.getState(),!1))}}};function C(s,e){return n.parseOptions(n.data(s,e),["filter"])}function z(s,e){return["filter","sort"].every(t=>n.isEqual(s[t],e[t]))}function H(s,e,t){const o=W(s);t.forEach(a=>n.css(a,"display",o&&!n.matches(a,o)?"none":""));const[c,r]=s.sort;if(c){const a=M(t,c,r);n.isEqual(a,t)||n.append(e,a)}}function E(s,e,t){const{filter:o,group:c,sort:r,order:a="asc"}=C(s,e);return(o||n.isUndefined(r))&&(c?o?(delete t.filter[""],t.filter[c]=o):(delete t.filter[c],(n.isEmpty(t.filter)||""in t.filter)&&(t.filter={"":o||""})):t.filter={"":o||""}),n.isUndefined(r)||(t.sort=[r,a]),t}function j(s,e,t){let{filter:o={"":""},sort:[c,r]}=t;const{filter:a="",group:f="",sort:h,order:p="asc"}=C(s,e);return n.isUndefined(h)?f in o&&a===o[f]||!a&&f&&!(f in o)&&!o[""]:c===h&&r===p}function D(s,e){return s.length===e.length&&s.every(t=>e.includes(t))}function W(s){let{filter:e}=s,t="";return n.each(e,o=>t+=o||""),t}function M(s,e,t){return[...s].sort((o,c)=>n.data(o,e).localeCompare(n.data(c,e),void 0,{numeric:!0})*(t==="asc"||-1))}return typeof window<"u"&&window.UIkit&&window.UIkit.component("filter",b),b});
1
+ /*! UIkit 3.15.12-dev.2299ba0d4 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(n,y){typeof exports=="object"&&typeof module<"u"?module.exports=y(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitfilter",["uikit-util"],y):(n=typeof globalThis<"u"?globalThis:n||self,n.UIkitFilter=y(n.UIkit.util))})(this,function(n){"use strict";function y(s){return q(s,"top","bottom")}function q(s,e,t){const o=[[]];for(const c of s){if(!n.isVisible(c))continue;let r=u(c);for(let a=o.length-1;a>=0;a--){const f=o[a];if(!f[0]){f.push(c);break}let h;if(f[0].offsetParent===c.offsetParent?h=u(f[0]):(r=u(c,!0),h=u(f[0],!0)),r[e]>=h[t]-1&&r[e]!==h[e]){o.push([c]);break}if(r[t]-1>h[e]||r[e]===h[e]){f.push(c);break}if(a===0){o.unshift([c]);break}}}return o}function u(s,e){e===void 0&&(e=!1);let{offsetTop:t,offsetLeft:o,offsetHeight:c,offsetWidth:r}=s;return e&&([t,o]=n.offsetPosition(s)),{top:t,left:o,bottom:t+c,right:o+r}}const v="uk-transition-leave",g="uk-transition-enter";function T(s,e,t,o){o===void 0&&(o=0);const c=w(e,!0),r={opacity:1},a={opacity:0},f=m=>()=>c===w(e)?m():Promise.reject(),h=f(async()=>{n.addClass(e,v),await Promise.all(F(e).map((m,l)=>new Promise(d=>setTimeout(()=>n.Transition.start(m,a,t/2,"ease").then(d),l*o)))),n.removeClass(e,v)}),p=f(async()=>{const m=n.height(e);n.addClass(e,g),s(),n.css(n.children(e),{opacity:0}),await A();const l=n.children(e),d=n.height(e);n.css(e,"alignContent","flex-start"),n.height(e,m);const i=F(e);n.css(l,a);const x=i.map(async(R,G)=>{await L(G*o),await n.Transition.start(R,r,t/2,"ease")});m!==d&&x.push(n.Transition.start(e,{height:d},t/2+i.length*o,"ease")),await Promise.all(x).then(()=>{n.removeClass(e,g),c===w(e)&&(n.css(e,{height:"",alignContent:""}),n.css(l,{opacity:""}),delete e.dataset.transition)})});return n.hasClass(e,v)?I(e).then(p):n.hasClass(e,g)?I(e).then(h).then(p):h().then(p)}function w(s,e){return e&&(s.dataset.transition=1+w(s)),n.toNumber(s.dataset.transition)||0}function I(s){return Promise.all(n.children(s).filter(n.Transition.inProgress).map(e=>new Promise(t=>n.once(e,"transitionend transitioncanceled",t))))}function F(s){return y(n.children(s)).reduce((e,t)=>e.concat(n.sortBy(t.filter(o=>n.isInView(o)),"offsetLeft")),[])}function A(){return new Promise(s=>requestAnimationFrame(s))}function L(s){return new Promise(e=>setTimeout(e,s))}async function V(s,e,t){await $();let o=n.children(e);const c=o.map(d=>S(d,!0)),r={...n.css(e,["height","padding"]),display:"block"};await Promise.all(o.concat(e).map(n.Transition.cancel)),s(),o=o.concat(n.children(e).filter(d=>!n.includes(o,d))),await Promise.resolve(),n.fastdom.flush();const a=n.attr(e,"style"),f=n.css(e,["height","padding"]),[h,p]=B(e,o,c),m=o.map(d=>({class:n.attr(d,"class"),style:n.attr(d,"style")}));o.forEach((d,i)=>p[i]&&n.css(d,p[i])),n.css(e,r),await $();const l=o.map((d,i)=>n.parent(d)===e&&n.Transition.start(d,h[i],t,"ease")).concat(n.Transition.start(e,f,t,"ease"));try{await Promise.all(l),o.forEach((d,i)=>{n.attr(d,m[i]),n.parent(d)===e&&n.css(d,"display",h[i].opacity===0?"none":"")}),n.attr(e,"style",a)}catch{n.attr(o,"style",""),N(e,r)}}function S(s,e){const t=n.css(s,"zIndex");return n.isVisible(s)?{display:"",opacity:e?n.css(s,"opacity"):"0",pointerEvents:"none",position:"absolute",zIndex:t==="auto"?n.index(s):t,...P(s)}:!1}function B(s,e,t){const o=e.map((r,a)=>n.parent(r)&&a in t?t[a]?n.isVisible(r)?P(r):{opacity:0}:{opacity:n.isVisible(r)?1:0}:!1),c=o.map((r,a)=>{const f=n.parent(e[a])===s&&(t[a]||S(e[a]));if(!f)return!1;if(!r)delete f.opacity;else if(!("opacity"in r)){const{opacity:h}=f;h%1?r.opacity=1:delete f.opacity}return f});return[o,c]}function N(s,e){for(const t in e)n.css(s,t,"")}function P(s){const{height:e,width:t}=n.offset(s);return{height:e,width:t,transform:"",...n.position(s),...n.css(s,["marginTop","marginLeft"])}}function $(){return new Promise(s=>requestAnimationFrame(s))}var O={props:{duration:Number,animation:Boolean},data:{duration:150,animation:"slide"},methods:{animate(s,e){e===void 0&&(e=this.$el);const t=this.animation;return(t==="fade"?T:t==="delayed-fade"?function(){for(var c=arguments.length,r=new Array(c),a=0;a<c;a++)r[a]=arguments[a];return T(...r,40)}:t?V:()=>(s(),Promise.resolve()))(s,e,this.duration).catch(n.noop)}}},b={mixins:[O],args:"target",props:{target:Boolean,selActive:Boolean},data:{target:null,selActive:!1,attrItem:"uk-filter-control",cls:"uk-active",duration:250},computed:{toggles:{get(s,e){let{attrItem:t}=s;return n.$$("["+t+"],[data-"+t+"]",e)},watch(){if(this.updateState(),this.selActive!==!1){const s=n.$$(this.selActive,this.$el);this.toggles.forEach(e=>n.toggleClass(e,this.cls,n.includes(s,e)))}},immediate:!0},children:{get(s,e){let{target:t}=s;return n.$$(t+" > *",e)},watch(s,e){e&&!D(s,e)&&this.updateState()},immediate:!0}},events:[{name:"click",delegate(){return"["+this.attrItem+"],[data-"+this.attrItem+"]"},handler(s){s.preventDefault(),this.apply(s.current)}}],methods:{apply(s){const e=this.getState(),t=E(s,this.attrItem,this.getState());z(e,t)||this.setState(t)},getState(){return this.toggles.filter(s=>n.hasClass(s,this.cls)).reduce((s,e)=>E(e,this.attrItem,s),{filter:{"":""},sort:[]})},async setState(s,e){e===void 0&&(e=!0),s={filter:{"":""},sort:[],...s},n.trigger(this.$el,"beforeFilter",[this,s]),this.toggles.forEach(t=>n.toggleClass(t,this.cls,!!j(t,this.attrItem,s))),await Promise.all(n.$$(this.target,this.$el).map(t=>{const o=()=>{H(s,t,n.children(t)),this.$update(this.$el)};return e?this.animate(o,t):o()})),n.trigger(this.$el,"afterFilter",[this])},updateState(){n.fastdom.write(()=>this.setState(this.getState(),!1))}}};function C(s,e){return n.parseOptions(n.data(s,e),["filter"])}function z(s,e){return["filter","sort"].every(t=>n.isEqual(s[t],e[t]))}function H(s,e,t){const o=W(s);t.forEach(a=>n.css(a,"display",o&&!n.matches(a,o)?"none":""));const[c,r]=s.sort;if(c){const a=M(t,c,r);n.isEqual(a,t)||n.append(e,a)}}function E(s,e,t){const{filter:o,group:c,sort:r,order:a="asc"}=C(s,e);return(o||n.isUndefined(r))&&(c?o?(delete t.filter[""],t.filter[c]=o):(delete t.filter[c],(n.isEmpty(t.filter)||""in t.filter)&&(t.filter={"":o||""})):t.filter={"":o||""}),n.isUndefined(r)||(t.sort=[r,a]),t}function j(s,e,t){let{filter:o={"":""},sort:[c,r]}=t;const{filter:a="",group:f="",sort:h,order:p="asc"}=C(s,e);return n.isUndefined(h)?f in o&&a===o[f]||!a&&f&&!(f in o)&&!o[""]:c===h&&r===p}function D(s,e){return s.length===e.length&&s.every(t=>e.includes(t))}function W(s){let{filter:e}=s,t="";return n.each(e,o=>t+=o||""),t}function M(s,e,t){return[...s].sort((o,c)=>n.data(o,e).localeCompare(n.data(c,e),void 0,{numeric:!0})*(t==="asc"||-1))}return typeof window<"u"&&window.UIkit&&window.UIkit.component("filter",b),b});