uikit 3.15.18-dev.9cbbb510d → 3.15.19-dev.699ab5a7f

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 (52) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/build/util.js +4 -4
  3. package/dist/css/uikit-core-rtl.css +5 -2
  4. package/dist/css/uikit-core-rtl.min.css +1 -1
  5. package/dist/css/uikit-core.css +5 -2
  6. package/dist/css/uikit-core.min.css +1 -1
  7. package/dist/css/uikit-rtl.css +5 -2
  8. package/dist/css/uikit-rtl.min.css +1 -1
  9. package/dist/css/uikit.css +5 -2
  10. package/dist/css/uikit.min.css +1 -1
  11. package/dist/js/components/countdown.js +2 -2
  12. package/dist/js/components/countdown.min.js +2 -1
  13. package/dist/js/components/filter.js +22 -30
  14. package/dist/js/components/filter.min.js +2 -1
  15. package/dist/js/components/lightbox-panel.js +75 -96
  16. package/dist/js/components/lightbox-panel.min.js +2 -1
  17. package/dist/js/components/lightbox.js +78 -99
  18. package/dist/js/components/lightbox.min.js +2 -1
  19. package/dist/js/components/notification.js +11 -14
  20. package/dist/js/components/notification.min.js +2 -1
  21. package/dist/js/components/parallax.js +24 -26
  22. package/dist/js/components/parallax.min.js +2 -1
  23. package/dist/js/components/slider-parallax.js +19 -20
  24. package/dist/js/components/slider-parallax.min.js +2 -1
  25. package/dist/js/components/slider.js +95 -51
  26. package/dist/js/components/slider.min.js +2 -1
  27. package/dist/js/components/slideshow-parallax.js +19 -20
  28. package/dist/js/components/slideshow-parallax.min.js +2 -1
  29. package/dist/js/components/slideshow.js +35 -42
  30. package/dist/js/components/slideshow.min.js +2 -1
  31. package/dist/js/components/sortable.js +12 -18
  32. package/dist/js/components/sortable.min.js +2 -1
  33. package/dist/js/components/tooltip.js +25 -30
  34. package/dist/js/components/tooltip.min.js +2 -1
  35. package/dist/js/components/upload.js +7 -7
  36. package/dist/js/components/upload.min.js +2 -1
  37. package/dist/js/uikit-core.js +277 -330
  38. package/dist/js/uikit-core.min.js +2 -1
  39. package/dist/js/uikit-icons.js +1 -1
  40. package/dist/js/uikit-icons.min.js +2 -1
  41. package/dist/js/uikit.js +470 -503
  42. package/dist/js/uikit.min.js +2 -1
  43. package/package.json +2 -2
  44. package/src/js/components/lightbox-panel.js +3 -5
  45. package/src/js/components/slider.js +62 -7
  46. package/src/js/core/accordion.js +5 -4
  47. package/src/js/core/sticky.js +6 -7
  48. package/src/js/mixin/slider-drag.js +1 -1
  49. package/src/js/mixin/slider.js +2 -7
  50. package/src/js/util/attr.js +1 -6
  51. package/src/less/components/sticky.less +4 -1
  52. package/src/scss/components/sticky.scss +4 -1
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.15.18-dev.9cbbb510d | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
1
+ /*! UIkit 3.15.19-dev.699ab5a7f | 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')) :
@@ -83,7 +83,7 @@
83
83
 
84
84
  let digits = String(Math.trunc(timespan[unit]));
85
85
 
86
- digits = digits.length < 2 ? "0" + digits : digits;
86
+ digits = digits.length < 2 ? `0${digits}` : digits;
87
87
 
88
88
  if (el.textContent !== digits) {
89
89
  digits = digits.split('');
@@ -1 +1,2 @@
1
- /*! UIkit 3.15.18-dev.9cbbb510d | 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.19-dev.699ab5a7f | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
2
+ (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.18-dev.9cbbb510d | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
1
+ /*! UIkit 3.15.19-dev.699ab5a7f | 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')) :
@@ -56,7 +56,7 @@
56
56
  return sorted;
57
57
  }
58
58
 
59
- function getOffset(element, offset) {if (offset === void 0) {offset = false;}
59
+ function getOffset(element, offset = false) {
60
60
  let { offsetTop, offsetLeft, offsetHeight, offsetWidth } = element;
61
61
 
62
62
  if (offset) {
@@ -74,7 +74,7 @@
74
74
  const clsLeave = 'uk-transition-leave';
75
75
  const clsEnter = 'uk-transition-enter';
76
76
 
77
- function fade(action, target, duration, stagger) {if (stagger === void 0) {stagger = 0;}
77
+ function fade(action, target, duration, stagger = 0) {
78
78
  const index = transitionIndex(target, true);
79
79
  const propsIn = { opacity: 1 };
80
80
  const propsOut = { opacity: 0 };
@@ -86,11 +86,8 @@
86
86
 
87
87
  await Promise.all(
88
88
  getTransitionNodes(target).map(
89
- (child, i) =>
90
- new Promise((resolve) =>
91
- setTimeout(
92
- () =>
93
- uikitUtil.Transition.start(child, propsOut, duration / 2, 'ease').then(
89
+ (child, i) => new Promise((resolve) => setTimeout(
90
+ () => uikitUtil.Transition.start(child, propsOut, duration / 2, 'ease').then(
94
91
  resolve),
95
92
 
96
93
  i * stagger))));
@@ -169,16 +166,14 @@
169
166
  uikitUtil.children(target).
170
167
  filter(uikitUtil.Transition.inProgress).
171
168
  map(
172
- (el) =>
173
- new Promise((resolve) => uikitUtil.once(el, 'transitionend transitioncanceled', resolve))));
169
+ (el) => new Promise((resolve) => uikitUtil.once(el, 'transitionend transitioncanceled', resolve))));
174
170
 
175
171
 
176
172
  }
177
173
 
178
174
  function getTransitionNodes(target) {
179
175
  return getRows(uikitUtil.children(target)).reduce(
180
- (nodes, row) =>
181
- nodes.concat(
176
+ (nodes, row) => nodes.concat(
182
177
  uikitUtil.sortBy(
183
178
  row.filter((el) => uikitUtil.isInView(el)),
184
179
  'offsetLeft')),
@@ -268,8 +263,7 @@
268
263
  }
269
264
 
270
265
  function getTransitionProps(target, nodes, currentProps) {
271
- const propsTo = nodes.map((el, i) =>
272
- uikitUtil.parent(el) && i in currentProps ?
266
+ const propsTo = nodes.map((el, i) => uikitUtil.parent(el) && i in currentProps ?
273
267
  currentProps[i] ?
274
268
  uikitUtil.isVisible(el) ?
275
269
  getPositionWithMargin(el) :
@@ -337,13 +331,13 @@
337
331
  },
338
332
 
339
333
  methods: {
340
- animate(action, target) {if (target === void 0) {target = this.$el;}
334
+ animate(action, target = this.$el) {
341
335
  const name = this.animation;
342
336
  const animationFn =
343
337
  name === 'fade' ?
344
338
  fade :
345
339
  name === 'delayed-fade' ?
346
- function () {for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {args[_key] = arguments[_key];}return fade(...args, 40);} :
340
+ (...args) => fade(...args, 40) :
347
341
  name ?
348
342
  slide :
349
343
  () => {
@@ -376,8 +370,8 @@
376
370
 
377
371
  computed: {
378
372
  toggles: {
379
- get(_ref, $el) {let { attrItem } = _ref;
380
- return uikitUtil.$$("[" + attrItem + "],[data-" + attrItem + "]", $el);
373
+ get({ attrItem }, $el) {
374
+ return uikitUtil.$$(`[${attrItem}],[data-${attrItem}]`, $el);
381
375
  },
382
376
 
383
377
  watch() {
@@ -393,8 +387,8 @@
393
387
  },
394
388
 
395
389
  children: {
396
- get(_ref2, $el) {let { target } = _ref2;
397
- return uikitUtil.$$(target + " > *", $el);
390
+ get({ target }, $el) {
391
+ return uikitUtil.$$(`${target} > *`, $el);
398
392
  },
399
393
 
400
394
  watch(list, old) {
@@ -412,7 +406,7 @@
412
406
  name: 'click',
413
407
 
414
408
  delegate() {
415
- return "[" + this.attrItem + "],[data-" + this.attrItem + "]";
409
+ return `[${this.attrItem}],[data-${this.attrItem}]`;
416
410
  },
417
411
 
418
412
  handler(e) {
@@ -441,13 +435,12 @@
441
435
  });
442
436
  },
443
437
 
444
- async setState(state, animate) {if (animate === void 0) {animate = true;}
438
+ async setState(state, animate = true) {
445
439
  state = { filter: { '': '' }, sort: [], ...state };
446
440
 
447
441
  uikitUtil.trigger(this.$el, 'beforeFilter', [this, state]);
448
442
 
449
- this.toggles.forEach((el) =>
450
- uikitUtil.toggleClass(el, this.cls, !!matchFilter(el, this.attrItem, state)));
443
+ this.toggles.forEach((el) => uikitUtil.toggleClass(el, this.cls, !!matchFilter(el, this.attrItem, state)));
451
444
 
452
445
 
453
446
  await Promise.all(
@@ -521,9 +514,9 @@
521
514
 
522
515
  function matchFilter(
523
516
  el,
524
- attr, _ref3)
525
-
526
- {let { filter: stateFilter = { '': '' }, sort: [stateSort, stateOrder] } = _ref3;
517
+ attr,
518
+ { filter: stateFilter = { '': '' }, sort: [stateSort, stateOrder] })
519
+ {
527
520
  const { filter = '', group = '', sort, order = 'asc' } = getFilter(el, attr);
528
521
 
529
522
  return uikitUtil.isUndefined(sort) ?
@@ -536,7 +529,7 @@
536
529
  return listA.length === listB.length && listA.every((el) => listB.includes(el));
537
530
  }
538
531
 
539
- function getSelector(_ref4) {let { filter } = _ref4;
532
+ function getSelector({ filter }) {
540
533
  let selector = '';
541
534
  uikitUtil.each(filter, (value) => selector += value || '');
542
535
  return selector;
@@ -544,8 +537,7 @@
544
537
 
545
538
  function sortItems(nodes, sort, order) {
546
539
  return [...nodes].sort(
547
- (a, b) =>
548
- uikitUtil.data(a, sort).localeCompare(uikitUtil.data(b, sort), undefined, { numeric: true }) * (
540
+ (a, b) => uikitUtil.data(a, sort).localeCompare(uikitUtil.data(b, sort), undefined, { numeric: true }) * (
549
541
  order === 'asc' || -1));
550
542
 
551
543
  }
@@ -1 +1,2 @@
1
- /*! UIkit 3.15.18-dev.9cbbb510d | 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=>({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.19-dev.699ab5a7f | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
2
+ (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,o){const t=[[]];for(const r of s){if(!n.isVisible(r))continue;let a=u(r);for(let c=t.length-1;c>=0;c--){const f=t[c];if(!f[0]){f.push(r);break}let h;if(f[0].offsetParent===r.offsetParent?h=u(f[0]):(a=u(r,!0),h=u(f[0],!0)),a[e]>=h[o]-1&&a[e]!==h[e]){t.push([r]);break}if(a[o]-1>h[e]||a[e]===h[e]){f.push(r);break}if(c===0){t.unshift([r]);break}}}return t}function u(s,e=!1){let{offsetTop:o,offsetLeft:t,offsetHeight:r,offsetWidth:a}=s;return e&&([o,t]=n.offsetPosition(s)),{top:o,left:t,bottom:o+r,right:t+a}}const g="uk-transition-leave",v="uk-transition-enter";function T(s,e,o,t=0){const r=w(e,!0),a={opacity:1},c={opacity:0},f=i=>()=>r===w(e)?i():Promise.reject(),h=f(async()=>{n.addClass(e,g),await Promise.all(I(e).map((i,l)=>new Promise(d=>setTimeout(()=>n.Transition.start(i,c,o/2,"ease").then(d),l*t)))),n.removeClass(e,g)}),m=f(async()=>{const i=n.height(e);n.addClass(e,v),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,i);const p=I(e);n.css(l,c);const x=p.map(async(R,G)=>{await L(G*t),await n.Transition.start(R,a,o/2,"ease")});i!==d&&x.push(n.Transition.start(e,{height:d},o/2+p.length*t,"ease")),await Promise.all(x).then(()=>{n.removeClass(e,v),r===w(e)&&(n.css(e,{height:"",alignContent:""}),n.css(l,{opacity:""}),delete e.dataset.transition)})});return n.hasClass(e,g)?$(e).then(m):n.hasClass(e,v)?$(e).then(h).then(m):h().then(m)}function w(s,e){return e&&(s.dataset.transition=1+w(s)),n.toNumber(s.dataset.transition)||0}function $(s){return Promise.all(n.children(s).filter(n.Transition.inProgress).map(e=>new Promise(o=>n.once(e,"transitionend transitioncanceled",o))))}function I(s){return y(n.children(s)).reduce((e,o)=>e.concat(n.sortBy(o.filter(t=>n.isInView(t)),"offsetLeft")),[])}function A(){return new Promise(s=>requestAnimationFrame(s))}function L(s){return new Promise(e=>setTimeout(e,s))}async function V(s,e,o){await b();let t=n.children(e);const r=t.map(d=>P(d,!0)),a={...n.css(e,["height","padding"]),display:"block"};await Promise.all(t.concat(e).map(n.Transition.cancel)),s(),t=t.concat(n.children(e).filter(d=>!n.includes(t,d))),await Promise.resolve(),n.fastdom.flush();const c=n.attr(e,"style"),f=n.css(e,["height","padding"]),[h,m]=B(e,t,r),i=t.map(d=>({style:n.attr(d,"style")}));t.forEach((d,p)=>m[p]&&n.css(d,m[p])),n.css(e,a),await b();const l=t.map((d,p)=>n.parent(d)===e&&n.Transition.start(d,h[p],o,"ease")).concat(n.Transition.start(e,f,o,"ease"));try{await Promise.all(l),t.forEach((d,p)=>{n.attr(d,i[p]),n.parent(d)===e&&n.css(d,"display",h[p].opacity===0?"none":"")}),n.attr(e,"style",c)}catch{n.attr(t,"style",""),N(e,a)}}function P(s,e){const o=n.css(s,"zIndex");return n.isVisible(s)?{display:"",opacity:e?n.css(s,"opacity"):"0",pointerEvents:"none",position:"absolute",zIndex:o==="auto"?n.index(s):o,...S(s)}:!1}function B(s,e,o){const t=e.map((a,c)=>n.parent(a)&&c in o?o[c]?n.isVisible(a)?S(a):{opacity:0}:{opacity:n.isVisible(a)?1:0}:!1),r=t.map((a,c)=>{const f=n.parent(e[c])===s&&(o[c]||P(e[c]));if(!f)return!1;if(!a)delete f.opacity;else if(!("opacity"in a)){const{opacity:h}=f;h%1?a.opacity=1:delete f.opacity}return f});return[t,r]}function N(s,e){for(const o in e)n.css(s,o,"")}function S(s){const{height:e,width:o}=n.offset(s);return{height:e,width:o,transform:"",...n.position(s),...n.css(s,["marginTop","marginLeft"])}}function b(){return new Promise(s=>requestAnimationFrame(s))}var z={props:{duration:Number,animation:Boolean},data:{duration:150,animation:"slide"},methods:{animate(s,e=this.$el){const o=this.animation;return(o==="fade"?T:o==="delayed-fade"?(...r)=>T(...r,40):o?V:()=>(s(),Promise.resolve()))(s,e,this.duration).catch(n.noop)}}},F={mixins:[z],args:"target",props:{target:Boolean,selActive:Boolean},data:{target:null,selActive:!1,attrItem:"uk-filter-control",cls:"uk-active",duration:250},computed:{toggles:{get({attrItem:s},e){return n.$$(`[${s}],[data-${s}]`,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({target:s},e){return n.$$(`${s} > *`,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(),o=E(s,this.attrItem,this.getState());H(e,o)||this.setState(o)},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=!0){s={filter:{"":""},sort:[],...s},n.trigger(this.$el,"beforeFilter",[this,s]),this.toggles.forEach(o=>n.toggleClass(o,this.cls,!!j(o,this.attrItem,s))),await Promise.all(n.$$(this.target,this.$el).map(o=>{const t=()=>{O(s,o,n.children(o)),this.$update(this.$el)};return e?this.animate(t,o):t()})),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 H(s,e){return["filter","sort"].every(o=>n.isEqual(s[o],e[o]))}function O(s,e,o){const t=W(s);o.forEach(c=>n.css(c,"display",t&&!n.matches(c,t)?"none":""));const[r,a]=s.sort;if(r){const c=M(o,r,a);n.isEqual(c,o)||n.append(e,c)}}function E(s,e,o){const{filter:t,group:r,sort:a,order:c="asc"}=C(s,e);return(t||n.isUndefined(a))&&(r?t?(delete o.filter[""],o.filter[r]=t):(delete o.filter[r],(n.isEmpty(o.filter)||""in o.filter)&&(o.filter={"":t||""})):o.filter={"":t||""}),n.isUndefined(a)||(o.sort=[a,c]),o}function j(s,e,{filter:o={"":""},sort:[t,r]}){const{filter:a="",group:c="",sort:f,order:h="asc"}=C(s,e);return n.isUndefined(f)?c in o&&a===o[c]||!a&&c&&!(c in o)&&!o[""]:t===f&&r===h}function D(s,e){return s.length===e.length&&s.every(o=>e.includes(o))}function W({filter:s}){let e="";return n.each(s,o=>e+=o||""),e}function M(s,e,o){return[...s].sort((t,r)=>n.data(t,e).localeCompare(n.data(r,e),void 0,{numeric:!0})*(o==="asc"||-1))}return typeof window<"u"&&window.UIkit&&window.UIkit.component("filter",F),F});