uikit 3.16.4-dev.fd2458e3b → 3.16.5-dev.dda1f1b31
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.
- package/.eslintrc.json +1 -0
- package/CHANGELOG.md +9 -1
- package/build/build.js +5 -4
- package/build/icons.js +2 -1
- package/build/less.js +2 -11
- package/build/prefix.js +2 -1
- package/build/release.js +4 -3
- package/build/scope.js +2 -1
- package/build/scss.js +2 -1
- package/build/util.js +3 -3
- package/dist/css/uikit-core-rtl.css +1 -1
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +1 -1
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +1 -1
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +1 -1
- package/dist/css/uikit.min.css +1 -1
- package/dist/js/components/countdown.js +12 -14
- package/dist/js/components/countdown.min.js +1 -1
- package/dist/js/components/filter.js +506 -22
- package/dist/js/components/filter.min.js +1 -1
- package/dist/js/components/lightbox-panel.js +2601 -310
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +2612 -323
- package/dist/js/components/lightbox.min.js +1 -1
- package/dist/js/components/notification.js +1 -1
- package/dist/js/components/notification.min.js +1 -1
- package/dist/js/components/parallax.js +466 -43
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +184 -2
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +2345 -49
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +184 -2
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +2339 -49
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +472 -1
- package/dist/js/components/sortable.min.js +1 -1
- package/dist/js/components/tooltip.js +2298 -11
- package/dist/js/components/tooltip.min.js +1 -1
- package/dist/js/components/upload.js +1 -1
- package/dist/js/components/upload.min.js +1 -1
- package/dist/js/uikit-core.js +951 -931
- package/dist/js/uikit-core.min.js +1 -1
- package/dist/js/uikit-icons.js +153 -152
- package/dist/js/uikit-icons.min.js +1 -1
- package/dist/js/uikit.js +979 -954
- package/dist/js/uikit.min.js +1 -1
- package/package.json +2 -2
- package/src/images/icons/mastodon.svg +3 -0
- package/src/js/api/app.js +12 -0
- package/src/js/api/boot.js +64 -43
- package/src/js/api/component.js +60 -61
- package/src/js/api/computed.js +39 -0
- package/src/js/api/events.js +45 -0
- package/src/js/api/global.js +58 -56
- package/src/js/api/hooks.js +35 -114
- package/src/js/api/index.js +8 -24
- package/src/js/api/instance.js +55 -55
- package/src/js/api/log.js +10 -0
- package/src/js/api/observables.js +125 -0
- package/src/js/api/observer.js +76 -0
- package/src/js/{util → api}/options.js +38 -1
- package/src/js/api/props.js +102 -0
- package/src/js/api/state.js +26 -280
- package/src/js/api/update.js +77 -0
- package/src/js/api/watch.js +34 -0
- package/src/js/components/countdown.js +14 -16
- package/src/js/components/filter.js +18 -24
- package/src/js/components/internal/slider-preload.js +5 -6
- package/src/js/components/lightbox-panel.js +1 -1
- package/src/js/components/lightbox.js +11 -23
- package/src/js/components/parallax.js +8 -6
- package/src/js/components/slider.js +10 -0
- package/src/js/components/tooltip.js +2 -1
- package/src/js/core/accordion.js +5 -6
- package/src/js/core/cover.js +9 -9
- package/src/js/core/drop.js +13 -6
- package/src/js/core/dropnav.js +1 -1
- package/src/js/core/grid.js +2 -5
- package/src/js/core/height-match.js +9 -16
- package/src/js/core/height-viewport.js +5 -7
- package/src/js/core/img.js +12 -19
- package/src/js/core/leader.js +4 -2
- package/src/js/core/margin.js +11 -21
- package/src/js/core/modal.js +1 -1
- package/src/js/core/offcanvas.js +6 -2
- package/src/js/core/overflow-auto.js +5 -5
- package/src/js/core/responsive.js +5 -7
- package/src/js/core/scroll.js +19 -10
- package/src/js/core/scrollspy-nav.js +6 -5
- package/src/js/core/scrollspy.js +27 -36
- package/src/js/core/sticky.js +12 -10
- package/src/js/core/svg.js +4 -2
- package/src/js/core/switcher.js +11 -9
- package/src/js/core/toggle.js +4 -4
- package/src/js/core/video.js +6 -14
- package/src/js/mixin/modal.js +2 -1
- package/src/js/mixin/parallax.js +1 -1
- package/src/js/mixin/slider-nav.js +2 -1
- package/src/js/mixin/slider.js +9 -3
- package/src/js/util/filter.js +13 -0
- package/src/js/util/index.js +0 -1
- package/src/js/util/keys.js +11 -0
- package/src/js/util/lang.js +7 -7
- package/src/js/util/observer.js +4 -2
- package/src/js/util/scroll.js +42 -0
- package/src/js/util/svg.js +16 -0
- package/src/js/util/viewport.js +1 -1
- package/src/scss/mixins-theme.scss +1640 -1596
- package/src/scss/mixins.scss +1370 -1370
- package/src/scss/variables-theme.scss +1255 -1255
- package/src/scss/variables.scss +1113 -1113
- package/src/js/mixin/lazyload.js +0 -27
- package/src/js/mixin/resize.js +0 -11
- package/src/js/mixin/scroll.js +0 -32
- package/src/js/mixin/swipe.js +0 -72
- package/src/js/mixin/utils.js +0 -91
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.16.
|
|
1
|
+
/*! UIkit 3.16.5-dev.dda1f1b31 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
|
|
@@ -34,21 +34,19 @@
|
|
|
34
34
|
disconnected() {
|
|
35
35
|
this.stop();
|
|
36
36
|
},
|
|
37
|
-
events:
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
this.start();
|
|
48
|
-
}
|
|
37
|
+
events: {
|
|
38
|
+
name: "visibilitychange",
|
|
39
|
+
el() {
|
|
40
|
+
return document;
|
|
41
|
+
},
|
|
42
|
+
handler() {
|
|
43
|
+
if (document.hidden) {
|
|
44
|
+
this.stop();
|
|
45
|
+
} else {
|
|
46
|
+
this.start();
|
|
49
47
|
}
|
|
50
48
|
}
|
|
51
|
-
|
|
49
|
+
},
|
|
52
50
|
methods: {
|
|
53
51
|
start() {
|
|
54
52
|
this.stop();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.16.
|
|
1
|
+
/*! UIkit 3.16.5-dev.dda1f1b31 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(t,s){typeof exports=="object"&&typeof module<"u"?module.exports=s(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitcountdown",["uikit-util"],s):(t=typeof globalThis<"u"?globalThis:t||self,t.UIkitCountdown=s(t.UIkit.util))})(this,function(t){"use strict";var s={connected(){t.addClass(this.$el,this.$options.id)}};const d=["days","hours","minutes","seconds"];var r={mixins:[s],props:{date:String,clsWrapper:String,role:String},data:{date:"",clsWrapper:".uk-countdown-%unit%",role:"timer"},connected(){t.attr(this.$el,"role",this.role),this.date=t.toFloat(Date.parse(this.$props.date)),this.end=!1,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||(t.trigger(this.$el,"countdownstart"),this.timer=setInterval(this.update,1e3))},stop(){this.timer&&(clearInterval(this.timer),t.trigger(this.$el,"countdownstop"),this.timer=null)},update(){const o=a(this.date);o.total||(this.stop(),this.end||(t.trigger(this.$el,"countdownend"),this.end=!0));for(const n of d){const i=t.$(this.clsWrapper.replace("%unit%",n),this.$el);if(!i)continue;let e=String(Math.trunc(o[n]));e=e.length<2?`0${e}`:e,i.textContent!==e&&(e=e.split(""),e.length!==i.children.length&&t.html(i,e.map(()=>"<span></span>").join("")),e.forEach((h,u)=>i.children[u].textContent=h))}}}};function a(o){const n=Math.max(0,o-Date.now())/1e3;return{total:n,seconds:n%60,minutes:n/60%60,hours:n/60/60%24,days:n/60/60/24}}return typeof window<"u"&&window.UIkit&&window.UIkit.component("countdown",r),r});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.16.
|
|
1
|
+
/*! UIkit 3.16.5-dev.dda1f1b31 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
|
|
@@ -6,9 +6,484 @@
|
|
|
6
6
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.UIkitFilter = factory(global.UIkit.util));
|
|
7
7
|
})(this, (function (uikitUtil) { 'use strict';
|
|
8
8
|
|
|
9
|
+
const hyphenateRe = /\B([A-Z])/g;
|
|
10
|
+
const hyphenate = memoize((str) => str.replace(hyphenateRe, "-$1").toLowerCase());
|
|
11
|
+
const ucfirst = memoize((str) => str.charAt(0).toUpperCase() + str.slice(1));
|
|
12
|
+
function startsWith(str, search) {
|
|
13
|
+
var _a;
|
|
14
|
+
return (_a = str == null ? void 0 : str.startsWith) == null ? void 0 : _a.call(str, search);
|
|
15
|
+
}
|
|
16
|
+
function includes(obj, search) {
|
|
17
|
+
var _a;
|
|
18
|
+
return (_a = obj == null ? void 0 : obj.includes) == null ? void 0 : _a.call(obj, search);
|
|
19
|
+
}
|
|
20
|
+
const { isArray, from: toArray } = Array;
|
|
21
|
+
function isFunction(obj) {
|
|
22
|
+
return typeof obj === "function";
|
|
23
|
+
}
|
|
24
|
+
function isObject(obj) {
|
|
25
|
+
return obj !== null && typeof obj === "object";
|
|
26
|
+
}
|
|
27
|
+
function isWindow(obj) {
|
|
28
|
+
return isObject(obj) && obj === obj.window;
|
|
29
|
+
}
|
|
30
|
+
function isDocument(obj) {
|
|
31
|
+
return nodeType(obj) === 9;
|
|
32
|
+
}
|
|
33
|
+
function isNode(obj) {
|
|
34
|
+
return nodeType(obj) >= 1;
|
|
35
|
+
}
|
|
36
|
+
function isElement(obj) {
|
|
37
|
+
return nodeType(obj) === 1;
|
|
38
|
+
}
|
|
39
|
+
function nodeType(obj) {
|
|
40
|
+
return !isWindow(obj) && isObject(obj) && obj.nodeType;
|
|
41
|
+
}
|
|
42
|
+
function isString(value) {
|
|
43
|
+
return typeof value === "string";
|
|
44
|
+
}
|
|
45
|
+
function isNumber(value) {
|
|
46
|
+
return typeof value === "number";
|
|
47
|
+
}
|
|
48
|
+
function isNumeric(value) {
|
|
49
|
+
return isNumber(value) || isString(value) && !isNaN(value - parseFloat(value));
|
|
50
|
+
}
|
|
51
|
+
function isUndefined(value) {
|
|
52
|
+
return value === void 0;
|
|
53
|
+
}
|
|
54
|
+
function toFloat(value) {
|
|
55
|
+
return parseFloat(value) || 0;
|
|
56
|
+
}
|
|
57
|
+
function toNode(element) {
|
|
58
|
+
return toNodes(element)[0];
|
|
59
|
+
}
|
|
60
|
+
function toNodes(element) {
|
|
61
|
+
return isNode(element) ? [element] : Array.from(element || []).filter(isNode);
|
|
62
|
+
}
|
|
63
|
+
function each(obj, cb) {
|
|
64
|
+
for (const key in obj) {
|
|
65
|
+
if (false === cb(obj[key], key)) {
|
|
66
|
+
return false;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return true;
|
|
70
|
+
}
|
|
71
|
+
function sumBy(array, iteratee) {
|
|
72
|
+
return array.reduce(
|
|
73
|
+
(sum, item) => sum + toFloat(isFunction(iteratee) ? iteratee(item) : item[iteratee]),
|
|
74
|
+
0
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
function noop() {
|
|
78
|
+
}
|
|
79
|
+
function memoize(fn) {
|
|
80
|
+
const cache = /* @__PURE__ */ Object.create(null);
|
|
81
|
+
return (key) => cache[key] || (cache[key] = fn(key));
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
function attr(element, name, value) {
|
|
85
|
+
var _a;
|
|
86
|
+
if (isObject(name)) {
|
|
87
|
+
for (const key in name) {
|
|
88
|
+
attr(element, key, name[key]);
|
|
89
|
+
}
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
if (isUndefined(value)) {
|
|
93
|
+
return (_a = toNode(element)) == null ? void 0 : _a.getAttribute(name);
|
|
94
|
+
} else {
|
|
95
|
+
for (const el of toNodes(element)) {
|
|
96
|
+
if (isFunction(value)) {
|
|
97
|
+
value = value.call(el, attr(el, name));
|
|
98
|
+
}
|
|
99
|
+
if (value === null) {
|
|
100
|
+
removeAttr(el, name);
|
|
101
|
+
} else {
|
|
102
|
+
el.setAttribute(name, value);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
function removeAttr(element, name) {
|
|
108
|
+
toNodes(element).forEach((element2) => element2.removeAttribute(name));
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
function parent(element) {
|
|
112
|
+
var _a;
|
|
113
|
+
return (_a = toNode(element)) == null ? void 0 : _a.parentElement;
|
|
114
|
+
}
|
|
115
|
+
function filter(element, selector) {
|
|
116
|
+
return toNodes(element).filter((element2) => matches(element2, selector));
|
|
117
|
+
}
|
|
118
|
+
function matches(element, selector) {
|
|
119
|
+
return toNodes(element).some((element2) => element2.matches(selector));
|
|
120
|
+
}
|
|
121
|
+
function closest(element, selector) {
|
|
122
|
+
return isElement(element) ? element.closest(startsWith(selector, ">") ? selector.slice(1) : selector) : toNodes(element).map((element2) => closest(element2, selector)).filter(Boolean);
|
|
123
|
+
}
|
|
124
|
+
function within(element, selector) {
|
|
125
|
+
return isString(selector) ? !!closest(element, selector) : toNode(selector).contains(toNode(element));
|
|
126
|
+
}
|
|
127
|
+
function children(element, selector) {
|
|
128
|
+
element = toNode(element);
|
|
129
|
+
const children2 = element ? toNodes(element.children) : [];
|
|
130
|
+
return selector ? filter(children2, selector) : children2;
|
|
131
|
+
}
|
|
132
|
+
function index(element, ref) {
|
|
133
|
+
return ref ? toNodes(element).indexOf(toNode(ref)) : children(parent(element)).indexOf(element);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
function findAll(selector, context) {
|
|
137
|
+
return toNodes(_query(selector, toNode(context), "querySelectorAll"));
|
|
138
|
+
}
|
|
139
|
+
const contextSelectorRe = /(^|[^\\],)\s*[!>+~-]/;
|
|
140
|
+
const isContextSelector = memoize((selector) => selector.match(contextSelectorRe));
|
|
141
|
+
const contextSanitizeRe = /([!>+~-])(?=\s+[!>+~-]|\s*$)/g;
|
|
142
|
+
const sanatize = memoize((selector) => selector.replace(contextSanitizeRe, "$1 *"));
|
|
143
|
+
function _query(selector, context = document, queryFn) {
|
|
144
|
+
if (!selector || !isString(selector)) {
|
|
145
|
+
return selector;
|
|
146
|
+
}
|
|
147
|
+
selector = sanatize(selector);
|
|
148
|
+
if (isContextSelector(selector)) {
|
|
149
|
+
const split = splitSelector(selector);
|
|
150
|
+
selector = "";
|
|
151
|
+
for (let sel of split) {
|
|
152
|
+
let ctx = context;
|
|
153
|
+
if (sel[0] === "!") {
|
|
154
|
+
const selectors = sel.substr(1).trim().split(" ");
|
|
155
|
+
ctx = closest(parent(context), selectors[0]);
|
|
156
|
+
sel = selectors.slice(1).join(" ").trim();
|
|
157
|
+
if (!sel.length && split.length === 1) {
|
|
158
|
+
return ctx;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
if (sel[0] === "-") {
|
|
162
|
+
const selectors = sel.substr(1).trim().split(" ");
|
|
163
|
+
const prev = (ctx || context).previousElementSibling;
|
|
164
|
+
ctx = matches(prev, sel.substr(1)) ? prev : null;
|
|
165
|
+
sel = selectors.slice(1).join(" ");
|
|
166
|
+
}
|
|
167
|
+
if (ctx) {
|
|
168
|
+
selector += `${selector ? "," : ""}${domPath(ctx)} ${sel}`;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
context = document;
|
|
172
|
+
}
|
|
173
|
+
try {
|
|
174
|
+
return context[queryFn](selector);
|
|
175
|
+
} catch (e) {
|
|
176
|
+
return null;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
const selectorRe = /.*?[^\\](?:,|$)/g;
|
|
180
|
+
const splitSelector = memoize(
|
|
181
|
+
(selector) => selector.match(selectorRe).map((selector2) => selector2.replace(/,$/, "").trim())
|
|
182
|
+
);
|
|
183
|
+
function domPath(element) {
|
|
184
|
+
const names = [];
|
|
185
|
+
while (element.parentNode) {
|
|
186
|
+
const id = attr(element, "id");
|
|
187
|
+
if (id) {
|
|
188
|
+
names.unshift(`#${escape(id)}`);
|
|
189
|
+
break;
|
|
190
|
+
} else {
|
|
191
|
+
let { tagName } = element;
|
|
192
|
+
if (tagName !== "HTML") {
|
|
193
|
+
tagName += `:nth-child(${index(element) + 1})`;
|
|
194
|
+
}
|
|
195
|
+
names.unshift(tagName);
|
|
196
|
+
element = element.parentNode;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
return names.join(" > ");
|
|
200
|
+
}
|
|
201
|
+
function escape(css) {
|
|
202
|
+
return isString(css) ? CSS.escape(css) : "";
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
function on(...args) {
|
|
206
|
+
let [targets, types, selector, listener, useCapture = false] = getArgs(args);
|
|
207
|
+
if (listener.length > 1) {
|
|
208
|
+
listener = detail(listener);
|
|
209
|
+
}
|
|
210
|
+
if (useCapture == null ? void 0 : useCapture.self) {
|
|
211
|
+
listener = selfFilter(listener);
|
|
212
|
+
}
|
|
213
|
+
if (selector) {
|
|
214
|
+
listener = delegate(selector, listener);
|
|
215
|
+
}
|
|
216
|
+
for (const type of types) {
|
|
217
|
+
for (const target of targets) {
|
|
218
|
+
target.addEventListener(type, listener, useCapture);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
return () => off(targets, types, listener, useCapture);
|
|
222
|
+
}
|
|
223
|
+
function off(...args) {
|
|
224
|
+
let [targets, types, , listener, useCapture = false] = getArgs(args);
|
|
225
|
+
for (const type of types) {
|
|
226
|
+
for (const target of targets) {
|
|
227
|
+
target.removeEventListener(type, listener, useCapture);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
function getArgs(args) {
|
|
232
|
+
args[0] = toEventTargets(args[0]);
|
|
233
|
+
if (isString(args[1])) {
|
|
234
|
+
args[1] = args[1].split(" ");
|
|
235
|
+
}
|
|
236
|
+
if (isFunction(args[2])) {
|
|
237
|
+
args.splice(2, 0, false);
|
|
238
|
+
}
|
|
239
|
+
return args;
|
|
240
|
+
}
|
|
241
|
+
function delegate(selector, listener) {
|
|
242
|
+
return (e) => {
|
|
243
|
+
const current = selector[0] === ">" ? findAll(selector, e.currentTarget).reverse().filter((element) => within(e.target, element))[0] : closest(e.target, selector);
|
|
244
|
+
if (current) {
|
|
245
|
+
e.current = current;
|
|
246
|
+
listener.call(this, e);
|
|
247
|
+
delete e.current;
|
|
248
|
+
}
|
|
249
|
+
};
|
|
250
|
+
}
|
|
251
|
+
function detail(listener) {
|
|
252
|
+
return (e) => isArray(e.detail) ? listener(e, ...e.detail) : listener(e);
|
|
253
|
+
}
|
|
254
|
+
function selfFilter(listener) {
|
|
255
|
+
return function(e) {
|
|
256
|
+
if (e.target === e.currentTarget || e.target === e.current) {
|
|
257
|
+
return listener.call(null, e);
|
|
258
|
+
}
|
|
259
|
+
};
|
|
260
|
+
}
|
|
261
|
+
function isEventTarget(target) {
|
|
262
|
+
return target && "addEventListener" in target;
|
|
263
|
+
}
|
|
264
|
+
function toEventTarget(target) {
|
|
265
|
+
return isEventTarget(target) ? target : toNode(target);
|
|
266
|
+
}
|
|
267
|
+
function toEventTargets(target) {
|
|
268
|
+
return isArray(target) ? target.map(toEventTarget).filter(Boolean) : isString(target) ? findAll(target) : isEventTarget(target) ? [target] : toNodes(target);
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
const cssNumber = {
|
|
272
|
+
"animation-iteration-count": true,
|
|
273
|
+
"column-count": true,
|
|
274
|
+
"fill-opacity": true,
|
|
275
|
+
"flex-grow": true,
|
|
276
|
+
"flex-shrink": true,
|
|
277
|
+
"font-weight": true,
|
|
278
|
+
"line-height": true,
|
|
279
|
+
opacity: true,
|
|
280
|
+
order: true,
|
|
281
|
+
orphans: true,
|
|
282
|
+
"stroke-dasharray": true,
|
|
283
|
+
"stroke-dashoffset": true,
|
|
284
|
+
widows: true,
|
|
285
|
+
"z-index": true,
|
|
286
|
+
zoom: true
|
|
287
|
+
};
|
|
288
|
+
function css(element, property, value, priority) {
|
|
289
|
+
const elements = toNodes(element);
|
|
290
|
+
for (const element2 of elements) {
|
|
291
|
+
if (isString(property)) {
|
|
292
|
+
property = propName(property);
|
|
293
|
+
if (isUndefined(value)) {
|
|
294
|
+
return getComputedStyle(element2).getPropertyValue(property);
|
|
295
|
+
} else {
|
|
296
|
+
element2.style.setProperty(
|
|
297
|
+
property,
|
|
298
|
+
isNumeric(value) && !cssNumber[property] ? `${value}px` : value || isNumber(value) ? value : "",
|
|
299
|
+
priority
|
|
300
|
+
);
|
|
301
|
+
}
|
|
302
|
+
} else if (isArray(property)) {
|
|
303
|
+
const props = {};
|
|
304
|
+
for (const prop of property) {
|
|
305
|
+
props[prop] = css(element2, prop);
|
|
306
|
+
}
|
|
307
|
+
return props;
|
|
308
|
+
} else if (isObject(property)) {
|
|
309
|
+
priority = value;
|
|
310
|
+
each(property, (value2, property2) => css(element2, property2, value2, priority));
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
return elements[0];
|
|
314
|
+
}
|
|
315
|
+
const propName = memoize((name) => vendorPropName(name));
|
|
316
|
+
function vendorPropName(name) {
|
|
317
|
+
if (startsWith(name, "--")) {
|
|
318
|
+
return name;
|
|
319
|
+
}
|
|
320
|
+
name = hyphenate(name);
|
|
321
|
+
const { style } = document.documentElement;
|
|
322
|
+
if (name in style) {
|
|
323
|
+
return name;
|
|
324
|
+
}
|
|
325
|
+
for (const prefix of ["webkit", "moz"]) {
|
|
326
|
+
const prefixedName = `-${prefix}-${name}`;
|
|
327
|
+
if (prefixedName in style) {
|
|
328
|
+
return prefixedName;
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
const dirs = {
|
|
334
|
+
width: ["left", "right"],
|
|
335
|
+
height: ["top", "bottom"]
|
|
336
|
+
};
|
|
337
|
+
dimension("height");
|
|
338
|
+
dimension("width");
|
|
339
|
+
function dimension(prop) {
|
|
340
|
+
const propName = ucfirst(prop);
|
|
341
|
+
return (element, value) => {
|
|
342
|
+
if (isUndefined(value)) {
|
|
343
|
+
if (isWindow(element)) {
|
|
344
|
+
return element[`inner${propName}`];
|
|
345
|
+
}
|
|
346
|
+
if (isDocument(element)) {
|
|
347
|
+
const doc = element.documentElement;
|
|
348
|
+
return Math.max(doc[`offset${propName}`], doc[`scroll${propName}`]);
|
|
349
|
+
}
|
|
350
|
+
element = toNode(element);
|
|
351
|
+
value = css(element, prop);
|
|
352
|
+
value = value === "auto" ? element[`offset${propName}`] : toFloat(value) || 0;
|
|
353
|
+
return value - boxModelAdjust(element, prop);
|
|
354
|
+
} else {
|
|
355
|
+
return css(
|
|
356
|
+
element,
|
|
357
|
+
prop,
|
|
358
|
+
!value && value !== 0 ? "" : +value + boxModelAdjust(element, prop) + "px"
|
|
359
|
+
);
|
|
360
|
+
}
|
|
361
|
+
};
|
|
362
|
+
}
|
|
363
|
+
function boxModelAdjust(element, prop, sizing = "border-box") {
|
|
364
|
+
return css(element, "boxSizing") === sizing ? sumBy(
|
|
365
|
+
dirs[prop].map(ucfirst),
|
|
366
|
+
(prop2) => toFloat(css(element, `padding${prop2}`)) + toFloat(css(element, `border${prop2}Width`))
|
|
367
|
+
) : 0;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
const inBrowser = typeof window !== "undefined";
|
|
371
|
+
|
|
372
|
+
const hasResizeObserver = inBrowser && window.ResizeObserver;
|
|
373
|
+
function observeResize(targets, cb, options = { box: "border-box" }) {
|
|
374
|
+
if (hasResizeObserver) {
|
|
375
|
+
return observe$1(ResizeObserver, targets, cb, options);
|
|
376
|
+
}
|
|
377
|
+
initResizeListener();
|
|
378
|
+
listeners.add(cb);
|
|
379
|
+
return {
|
|
380
|
+
observe: noop,
|
|
381
|
+
unobserve: noop,
|
|
382
|
+
disconnect() {
|
|
383
|
+
listeners.delete(cb);
|
|
384
|
+
}
|
|
385
|
+
};
|
|
386
|
+
}
|
|
387
|
+
let listeners;
|
|
388
|
+
function initResizeListener() {
|
|
389
|
+
if (listeners) {
|
|
390
|
+
return;
|
|
391
|
+
}
|
|
392
|
+
listeners = /* @__PURE__ */ new Set();
|
|
393
|
+
let pendingResize;
|
|
394
|
+
const handleResize = () => {
|
|
395
|
+
if (pendingResize) {
|
|
396
|
+
return;
|
|
397
|
+
}
|
|
398
|
+
pendingResize = true;
|
|
399
|
+
requestAnimationFrame(() => pendingResize = false);
|
|
400
|
+
for (const listener of listeners) {
|
|
401
|
+
listener();
|
|
402
|
+
}
|
|
403
|
+
};
|
|
404
|
+
on(window, "load resize", handleResize);
|
|
405
|
+
on(document, "loadedmetadata load", handleResize, true);
|
|
406
|
+
}
|
|
407
|
+
function observeMutation(targets, cb, options) {
|
|
408
|
+
return observe$1(MutationObserver, targets, cb, options);
|
|
409
|
+
}
|
|
410
|
+
function observe$1(Observer, targets, cb, options) {
|
|
411
|
+
const observer = new Observer(cb);
|
|
412
|
+
for (const el of toNodes(targets)) {
|
|
413
|
+
observer.observe(el, options);
|
|
414
|
+
}
|
|
415
|
+
return observer;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
function resize(options) {
|
|
419
|
+
return observe(observeResize, options, "resize");
|
|
420
|
+
}
|
|
421
|
+
function mutation(options) {
|
|
422
|
+
return observe(observeMutation, options);
|
|
423
|
+
}
|
|
424
|
+
function observe(observe2, options, emit) {
|
|
425
|
+
return {
|
|
426
|
+
observe: observe2,
|
|
427
|
+
handler() {
|
|
428
|
+
this.$emit(emit);
|
|
429
|
+
},
|
|
430
|
+
...options
|
|
431
|
+
};
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
({
|
|
435
|
+
props: {
|
|
436
|
+
margin: String,
|
|
437
|
+
firstColumn: Boolean
|
|
438
|
+
},
|
|
439
|
+
data: {
|
|
440
|
+
margin: "uk-margin-small-top",
|
|
441
|
+
firstColumn: "uk-first-column"
|
|
442
|
+
},
|
|
443
|
+
observe: [
|
|
444
|
+
mutation({
|
|
445
|
+
options: {
|
|
446
|
+
childList: true,
|
|
447
|
+
attributes: true,
|
|
448
|
+
attributeFilter: ["style"]
|
|
449
|
+
}
|
|
450
|
+
}),
|
|
451
|
+
resize({
|
|
452
|
+
target: ({ $el }) => [$el, ...uikitUtil.toArray($el.children)]
|
|
453
|
+
})
|
|
454
|
+
],
|
|
455
|
+
update: {
|
|
456
|
+
read() {
|
|
457
|
+
const rows = getRows(this.$el.children);
|
|
458
|
+
return {
|
|
459
|
+
rows,
|
|
460
|
+
columns: getColumns(rows)
|
|
461
|
+
};
|
|
462
|
+
},
|
|
463
|
+
write({ columns, rows }) {
|
|
464
|
+
for (const row of rows) {
|
|
465
|
+
for (const column of row) {
|
|
466
|
+
uikitUtil.toggleClass(column, this.margin, rows[0] !== row);
|
|
467
|
+
uikitUtil.toggleClass(column, this.firstColumn, columns[0].includes(column));
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
},
|
|
471
|
+
events: ["resize"]
|
|
472
|
+
}
|
|
473
|
+
});
|
|
9
474
|
function getRows(items) {
|
|
10
475
|
return sortBy(items, "top", "bottom");
|
|
11
476
|
}
|
|
477
|
+
function getColumns(rows) {
|
|
478
|
+
const columns = [];
|
|
479
|
+
for (const row of rows) {
|
|
480
|
+
const sorted = sortBy(row, "left", "right");
|
|
481
|
+
for (let j = 0; j < sorted.length; j++) {
|
|
482
|
+
columns[j] = columns[j] ? columns[j].concat(sorted[j]) : sorted[j];
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
return uikitUtil.isRtl ? columns.reverse() : columns;
|
|
486
|
+
}
|
|
12
487
|
function sortBy(items, startProp, endProp) {
|
|
13
488
|
const sorted = [[]];
|
|
14
489
|
for (const el of items) {
|
|
@@ -257,6 +732,20 @@
|
|
|
257
732
|
}
|
|
258
733
|
};
|
|
259
734
|
|
|
735
|
+
function parseOptions(options, args = []) {
|
|
736
|
+
try {
|
|
737
|
+
return options ? startsWith(options, "{") ? JSON.parse(options) : args.length && !includes(options, ":") ? { [args[0]]: options } : options.split(";").reduce((options2, option) => {
|
|
738
|
+
const [key, value] = option.split(/:(.*)/);
|
|
739
|
+
if (key && !isUndefined(value)) {
|
|
740
|
+
options2[key.trim()] = value.trim();
|
|
741
|
+
}
|
|
742
|
+
return options2;
|
|
743
|
+
}, {}) : {};
|
|
744
|
+
} catch (e) {
|
|
745
|
+
return {};
|
|
746
|
+
}
|
|
747
|
+
}
|
|
748
|
+
|
|
260
749
|
const keyMap = {
|
|
261
750
|
TAB: 9,
|
|
262
751
|
ESC: 27,
|
|
@@ -307,31 +796,29 @@
|
|
|
307
796
|
get({ target }, $el) {
|
|
308
797
|
return uikitUtil.$$(`${target} > *`, $el);
|
|
309
798
|
},
|
|
310
|
-
watch(list,
|
|
311
|
-
if (
|
|
799
|
+
watch(list, prev) {
|
|
800
|
+
if (prev) {
|
|
312
801
|
this.updateState();
|
|
313
802
|
}
|
|
314
803
|
},
|
|
315
804
|
immediate: true
|
|
316
805
|
}
|
|
317
806
|
},
|
|
318
|
-
events:
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
this.apply(e.current);
|
|
331
|
-
}
|
|
807
|
+
events: {
|
|
808
|
+
name: "click keydown",
|
|
809
|
+
delegate() {
|
|
810
|
+
return `[${this.attrItem}],[data-${this.attrItem}]`;
|
|
811
|
+
},
|
|
812
|
+
handler(e) {
|
|
813
|
+
if (e.type === "keydown" && e.keyCode !== keyMap.SPACE) {
|
|
814
|
+
return;
|
|
815
|
+
}
|
|
816
|
+
if (uikitUtil.closest(e.target, "a,button")) {
|
|
817
|
+
e.preventDefault();
|
|
818
|
+
this.apply(e.current);
|
|
332
819
|
}
|
|
333
820
|
}
|
|
334
|
-
|
|
821
|
+
},
|
|
335
822
|
methods: {
|
|
336
823
|
apply(el) {
|
|
337
824
|
const prevState = this.getState();
|
|
@@ -369,7 +856,7 @@
|
|
|
369
856
|
}
|
|
370
857
|
};
|
|
371
858
|
function getFilter(el, attr2) {
|
|
372
|
-
return
|
|
859
|
+
return parseOptions(uikitUtil.data(el, attr2), ["filter"]);
|
|
373
860
|
}
|
|
374
861
|
function isEqualState(stateA, stateB) {
|
|
375
862
|
return ["filter", "sort"].every((prop) => uikitUtil.isEqual(stateA[prop], stateB[prop]));
|
|
@@ -411,9 +898,6 @@
|
|
|
411
898
|
const { filter = "", group = "", sort, order = "asc" } = getFilter(el, attr2);
|
|
412
899
|
return uikitUtil.isUndefined(sort) ? group in stateFilter && filter === stateFilter[group] || !filter && group && !(group in stateFilter) && !stateFilter[""] : stateSort === sort && stateOrder === order;
|
|
413
900
|
}
|
|
414
|
-
function isEqualList(listA, listB) {
|
|
415
|
-
return listA.length === listB.length && listA.every((el) => listB.includes(el));
|
|
416
|
-
}
|
|
417
901
|
function getSelector({ filter }) {
|
|
418
902
|
let selector = "";
|
|
419
903
|
uikitUtil.each(filter, (value) => selector += value || "");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.16.4-dev.fd2458e3b | https://www.getuikit.com | (c) 2014 - 2023 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 A(s,"top","bottom")}function A(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",T="uk-transition-enter";function v(s,e,o,t=0){const r=w(e,!0),a={opacity:1},c={opacity:0},f=m=>()=>r===w(e)?m():Promise.reject(),h=f(async()=>{n.addClass(e,g),await Promise.all(P(e).map((m,l)=>new Promise(d=>setTimeout(()=>n.Transition.start(m,c,o/2,"ease").then(d),l*t)))),n.removeClass(e,g)}),i=f(async()=>{const m=n.height(e);n.addClass(e,T),s(),n.css(n.children(e),{opacity:0}),await q();const l=n.children(e),d=n.height(e);n.css(e,"alignContent","flex-start"),n.height(e,m);const p=P(e);n.css(l,c);const x=p.map(async(J,K)=>{await B(K*t),await n.Transition.start(J,a,o/2,"ease")});m!==d&&x.push(n.Transition.start(e,{height:d},o/2+p.length*t,"ease")),await Promise.all(x).then(()=>{n.removeClass(e,T),r===w(e)&&(n.css(e,{height:"",alignContent:""}),n.css(l,{opacity:""}),delete e.dataset.transition)})});return n.hasClass(e,g)?$(e).then(i):n.hasClass(e,T)?$(e).then(h).then(i):h().then(i)}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 P(s){return y(n.children(s)).reduce((e,o)=>e.concat(n.sortBy(o.filter(t=>n.isInView(t)),"offsetLeft")),[])}function q(){return new Promise(s=>requestAnimationFrame(s))}function B(s){return new Promise(e=>setTimeout(e,s))}async function L(s,e,o){await I();let t=n.children(e);const r=t.map(d=>S(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,i]=N(e,t,r),m=t.map(d=>({style:n.attr(d,"style")}));t.forEach((d,p)=>i[p]&&n.css(d,i[p])),n.css(e,a),n.trigger(e,"scroll"),n.fastdom.flush(),await I();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,m[p]),n.parent(d)===e&&n.css(d,"display",h[p].opacity===0?"none":"")}),n.attr(e,"style",c)}catch{n.attr(t,"style",""),H(e,a)}}function S(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,...b(s)}:!1}function N(s,e,o){const t=e.map((a,c)=>n.parent(a)&&c in o?o[c]?n.isVisible(a)?b(a):{opacity:0}:{opacity:n.isVisible(a)?1:0}:!1),r=t.map((a,c)=>{const f=n.parent(e[c])===s&&(o[c]||S(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 H(s,e){for(const o in e)n.css(s,o,"")}function b(s){const{height:e,width:o}=n.offset(s);return{height:e,width:o,transform:"",...n.position(s),...n.css(s,["marginTop","marginLeft"])}}function I(){return new Promise(s=>requestAnimationFrame(s))}var O={props:{duration:Number,animation:Boolean},data:{duration:150,animation:"slide"},methods:{animate(s,e=this.$el){const o=this.animation;return(o==="fade"?v:o==="delayed-fade"?(...r)=>v(...r,40):o?L:()=>(s(),Promise.resolve()))(s,e,this.duration).catch(n.noop)}}};const V={TAB:9,ESC:27,SPACE:32,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40};var C={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({attrItem:s},e){return n.$$(`[${s}],[data-${s}]`,e)},watch(s){this.updateState();const e=n.$$(this.selActive,this.$el);for(const o of s){this.selActive!==!1&&n.toggleClass(o,this.cls,n.includes(e,o));const t=G(o);n.isTag(t,"a")&&n.attr(t,"role","button")}},immediate:!0},children:{get({target:s},e){return n.$$(`${s} > *`,e)},watch(s,e){e&&!W(s,e)&&this.updateState()},immediate:!0}},events:[{name:"click keydown",delegate(){return`[${this.attrItem}],[data-${this.attrItem}]`},handler(s){s.type==="keydown"&&s.keyCode!==V.SPACE||n.closest(s.target,"a,button")&&(s.preventDefault(),this.apply(s.current))}}],methods:{apply(s){const e=this.getState(),o=F(s,this.attrItem,this.getState());D(e,o)||this.setState(o)},getState(){return this.toggles.filter(s=>n.hasClass(s,this.cls)).reduce((s,e)=>F(e,this.attrItem,s),{filter:{"":""},sort:[]})},async setState(s,e=!0){s={filter:{"":""},sort:[],...s},n.trigger(this.$el,"beforeFilter",[this,s]);for(const o of this.toggles)n.toggleClass(o,this.cls,M(o,this.attrItem,s));await Promise.all(n.$$(this.target,this.$el).map(o=>{const t=()=>{z(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 E(s,e){return n.parseOptions(n.data(s,e),["filter"])}function D(s,e){return["filter","sort"].every(o=>n.isEqual(s[o],e[o]))}function z(s,e,o){const t=j(s);o.forEach(c=>n.css(c,"display",t&&!n.matches(c,t)?"none":""));const[r,a]=s.sort;if(r){const c=R(o,r,a);n.isEqual(c,o)||n.append(e,c)}}function F(s,e,o){const{filter:t,group:r,sort:a,order:c="asc"}=E(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 M(s,e,{filter:o={"":""},sort:[t,r]}){const{filter:a="",group:c="",sort:f,order:h="asc"}=E(s,e);return n.isUndefined(f)?c in o&&a===o[c]||!a&&c&&!(c in o)&&!o[""]:t===f&&r===h}function W(s,e){return s.length===e.length&&s.every(o=>e.includes(o))}function j({filter:s}){let e="";return n.each(s,o=>e+=o||""),e}function R(s,e,o){return[...s].sort((t,r)=>n.data(t,e).localeCompare(n.data(r,e),void 0,{numeric:!0})*(o==="asc"||-1))}function G(s){return n.$("a,button",s)||s}return typeof window<"u"&&window.UIkit&&window.UIkit.component("filter",C),C});
|
|
1
|
+
/*! UIkit 3.16.5-dev.dda1f1b31 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(o,$){typeof exports=="object"&&typeof module<"u"?module.exports=$(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitfilter",["uikit-util"],$):(o=typeof globalThis<"u"?globalThis:o||self,o.UIkitFilter=$(o.UIkit.util))})(this,function(o){"use strict";const $=/\B([A-Z])/g,an=w(n=>n.replace($,"-$1").toLowerCase()),R=w(n=>n.charAt(0).toUpperCase()+n.slice(1));function P(n,e){var t;return(t=n==null?void 0:n.startsWith)==null?void 0:t.call(n,e)}function un(n,e){var t;return(t=n==null?void 0:n.includes)==null?void 0:t.call(n,e)}const{isArray:F,from:ae}=Array;function N(n){return typeof n=="function"}function S(n){return n!==null&&typeof n=="object"}function L(n){return S(n)&&n===n.window}function dn(n){return z(n)===9}function q(n){return z(n)>=1}function ln(n){return z(n)===1}function z(n){return!L(n)&&S(n)&&n.nodeType}function m(n){return typeof n=="string"}function M(n){return typeof n=="number"}function hn(n){return M(n)||m(n)&&!isNaN(n-parseFloat(n))}function T(n){return n===void 0}function C(n){return parseFloat(n)||0}function h(n){return d(n)[0]}function d(n){return q(n)?[n]:Array.from(n||[]).filter(q)}function pn(n,e){for(const t in n)if(e(n[t],t)===!1)return!1;return!0}function mn(n,e){return n.reduce((t,r)=>t+C(N(e)?e(r):r[e]),0)}function W(){}function w(n){const e=Object.create(null);return t=>e[t]||(e[t]=n(t))}function I(n,e,t){var r;if(S(e)){for(const s in e)I(n,s,e[s]);return}if(T(t))return(r=h(n))==null?void 0:r.getAttribute(e);for(const s of d(n))N(t)&&(t=t.call(s,I(s,e))),t===null?yn(s,e):s.setAttribute(e,t)}function yn(n,e){d(n).forEach(t=>t.removeAttribute(e))}function H(n){var e;return(e=h(n))==null?void 0:e.parentElement}function wn(n,e){return d(n).filter(t=>V(t,e))}function V(n,e){return d(n).some(t=>t.matches(e))}function x(n,e){return ln(n)?n.closest(P(e,">")?e.slice(1):e):d(n).map(t=>x(t,e)).filter(Boolean)}function gn(n,e){return m(e)?!!x(n,e):h(e).contains(h(n))}function bn(n,e){n=h(n);const t=n?d(n.children):[];return e?wn(t,e):t}function $n(n,e){return e?d(n).indexOf(h(e)):bn(H(n)).indexOf(n)}function D(n,e){return d(xn(n,h(e),"querySelectorAll"))}const vn=/(^|[^\\],)\s*[!>+~-]/,Sn=w(n=>n.match(vn)),Tn=/([!>+~-])(?=\s+[!>+~-]|\s*$)/g,Cn=w(n=>n.replace(Tn,"$1 *"));function xn(n,e=document,t){if(!n||!m(n))return n;if(n=Cn(n),Sn(n)){const r=An(n);n="";for(let s of r){let c=e;if(s[0]==="!"){const i=s.substr(1).trim().split(" ");if(c=x(H(e),i[0]),s=i.slice(1).join(" ").trim(),!s.length&&r.length===1)return c}if(s[0]==="-"){const i=s.substr(1).trim().split(" "),f=(c||e).previousElementSibling;c=V(f,s.substr(1))?f:null,s=i.slice(1).join(" ")}c&&(n+=`${n?",":""}${Pn(c)} ${s}`)}e=document}try{return e[t](n)}catch{return null}}const En=/.*?[^\\](?:,|$)/g,An=w(n=>n.match(En).map(e=>e.replace(/,$/,"").trim()));function Pn(n){const e=[];for(;n.parentNode;){const t=I(n,"id");if(t){e.unshift(`#${Fn(t)}`);break}else{let{tagName:r}=n;r!=="HTML"&&(r+=`:nth-child(${$n(n)+1})`),e.unshift(r),n=n.parentNode}}return e.join(" > ")}function Fn(n){return m(n)?CSS.escape(n):""}function _(...n){let[e,t,r,s,c=!1]=j(n);s.length>1&&(s=In(s)),c!=null&&c.self&&(s=Bn(s)),r&&(s=zn(r,s));for(const i of t)for(const f of e)f.addEventListener(i,s,c);return()=>Nn(e,t,s,c)}function Nn(...n){let[e,t,,r,s=!1]=j(n);for(const c of t)for(const i of e)i.removeEventListener(c,r,s)}function j(n){return n[0]=Rn(n[0]),m(n[1])&&(n[1]=n[1].split(" ")),N(n[2])&&n.splice(2,0,!1),n}function zn(n,e){return t=>{const r=n[0]===">"?D(n,t.currentTarget).reverse().filter(s=>gn(t.target,s))[0]:x(t.target,n);r&&(t.current=r,e.call(this,t),delete t.current)}}function In(n){return e=>F(e.detail)?n(e,...e.detail):n(e)}function Bn(n){return function(e){if(e.target===e.currentTarget||e.target===e.current)return n.call(null,e)}}function G(n){return n&&"addEventListener"in n}function On(n){return G(n)?n:h(n)}function Rn(n){return F(n)?n.map(On).filter(Boolean):m(n)?D(n):G(n)?[n]:d(n)}const Ln={"animation-iteration-count":!0,"column-count":!0,"fill-opacity":!0,"flex-grow":!0,"flex-shrink":!0,"font-weight":!0,"line-height":!0,opacity:!0,order:!0,orphans:!0,"stroke-dasharray":!0,"stroke-dashoffset":!0,widows:!0,"z-index":!0,zoom:!0};function y(n,e,t,r){const s=d(n);for(const c of s)if(m(e)){if(e=qn(e),T(t))return getComputedStyle(c).getPropertyValue(e);c.style.setProperty(e,hn(t)&&!Ln[e]?`${t}px`:t||M(t)?t:"",r)}else if(F(e)){const i={};for(const f of e)i[f]=y(c,f);return i}else S(e)&&(r=t,pn(e,(i,f)=>y(c,f,i,r)));return s[0]}const qn=w(n=>Mn(n));function Mn(n){if(P(n,"--"))return n;n=an(n);const{style:e}=document.documentElement;if(n in e)return n;for(const t of["webkit","moz"]){const r=`-${t}-${n}`;if(r in e)return r}}const Wn={width:["left","right"],height:["top","bottom"]};J("height"),J("width");function J(n){const e=R(n);return(t,r)=>{if(T(r)){if(L(t))return t[`inner${e}`];if(dn(t)){const s=t.documentElement;return Math.max(s[`offset${e}`],s[`scroll${e}`])}return t=h(t),r=y(t,n),r=r==="auto"?t[`offset${e}`]:C(r)||0,r-Z(t,n)}else return y(t,n,!r&&r!==0?"":+r+Z(t,n)+"px")}}function Z(n,e,t="border-box"){return y(n,"boxSizing")===t?mn(Wn[e].map(R),r=>C(y(n,`padding${r}`))+C(y(n,`border${r}Width`))):0}const Hn=typeof window<"u"&&window.ResizeObserver;function Vn(n,e,t={box:"border-box"}){return Hn?K(ResizeObserver,n,e,t):(Dn(),v.add(e),{observe:W,unobserve:W,disconnect(){v.delete(e)}})}let v;function Dn(){if(v)return;v=new Set;let n;const e=()=>{if(!n){n=!0,requestAnimationFrame(()=>n=!1);for(const t of v)t()}};_(window,"load resize",e),_(document,"loadedmetadata load",e,!0)}function _n(n,e,t){return K(MutationObserver,n,e,t)}function K(n,e,t,r){const s=new n(t);for(const c of d(e))s.observe(c,r);return s}function jn(n){return Q(Vn,n,"resize")}function Gn(n){return Q(_n,n)}function Q(n,e,t){return{observe:n,handler(){this.$emit(t)},...e}}Gn({options:{childList:!0,attributes:!0,attributeFilter:["style"]}}),jn({target:({$el:n})=>[n,...o.toArray(n.children)]});function X(n){return Y(n,"top","bottom")}function Jn(n){const e=[];for(const t of n){const r=Y(t,"left","right");for(let s=0;s<r.length;s++)e[s]=e[s]?e[s].concat(r[s]):r[s]}return o.isRtl?e.reverse():e}function Y(n,e,t){const r=[[]];for(const s of n){if(!o.isVisible(s))continue;let c=E(s);for(let i=r.length-1;i>=0;i--){const f=r[i];if(!f[0]){f.push(s);break}let u;if(f[0].offsetParent===s.offsetParent?u=E(f[0]):(c=E(s,!0),u=E(f[0],!0)),c[e]>=u[t]-1&&c[e]!==u[e]){r.push([s]);break}if(c[t]-1>u[e]||c[e]===u[e]){f.push(s);break}if(i===0){r.unshift([s]);break}}}return r}function E(n,e=!1){let{offsetTop:t,offsetLeft:r,offsetHeight:s,offsetWidth:c}=n;return e&&([t,r]=o.offsetPosition(n)),{top:t,left:r,bottom:t+s,right:r+c}}const B="uk-transition-leave",O="uk-transition-enter";function k(n,e,t,r=0){const s=A(e,!0),c={opacity:1},i={opacity:0},f=p=>()=>s===A(e)?p():Promise.reject(),u=f(async()=>{o.addClass(e,B),await Promise.all(nn(e).map((p,b)=>new Promise(a=>setTimeout(()=>o.Transition.start(p,i,t/2,"ease").then(a),b*r)))),o.removeClass(e,B)}),g=f(async()=>{const p=o.height(e);o.addClass(e,O),n(),o.css(o.children(e),{opacity:0}),await Zn();const b=o.children(e),a=o.height(e);o.css(e,"alignContent","flex-start"),o.height(e,p);const l=nn(e);o.css(b,i);const fn=l.map(async(ie,fe)=>{await Kn(fe*r),await o.Transition.start(ie,c,t/2,"ease")});p!==a&&fn.push(o.Transition.start(e,{height:a},t/2+l.length*r,"ease")),await Promise.all(fn).then(()=>{o.removeClass(e,O),s===A(e)&&(o.css(e,{height:"",alignContent:""}),o.css(b,{opacity:""}),delete e.dataset.transition)})});return o.hasClass(e,B)?U(e).then(g):o.hasClass(e,O)?U(e).then(u).then(g):u().then(g)}function A(n,e){return e&&(n.dataset.transition=1+A(n)),o.toNumber(n.dataset.transition)||0}function U(n){return Promise.all(o.children(n).filter(o.Transition.inProgress).map(e=>new Promise(t=>o.once(e,"transitionend transitioncanceled",t))))}function nn(n){return X(o.children(n)).reduce((e,t)=>e.concat(o.sortBy(t.filter(r=>o.isInView(r)),"offsetLeft")),[])}function Zn(){return new Promise(n=>requestAnimationFrame(n))}function Kn(n){return new Promise(e=>setTimeout(e,n))}async function Qn(n,e,t){await rn();let r=o.children(e);const s=r.map(a=>en(a,!0)),c={...o.css(e,["height","padding"]),display:"block"};await Promise.all(r.concat(e).map(o.Transition.cancel)),n(),r=r.concat(o.children(e).filter(a=>!o.includes(r,a))),await Promise.resolve(),o.fastdom.flush();const i=o.attr(e,"style"),f=o.css(e,["height","padding"]),[u,g]=Xn(e,r,s),p=r.map(a=>({style:o.attr(a,"style")}));r.forEach((a,l)=>g[l]&&o.css(a,g[l])),o.css(e,c),o.trigger(e,"scroll"),o.fastdom.flush(),await rn();const b=r.map((a,l)=>o.parent(a)===e&&o.Transition.start(a,u[l],t,"ease")).concat(o.Transition.start(e,f,t,"ease"));try{await Promise.all(b),r.forEach((a,l)=>{o.attr(a,p[l]),o.parent(a)===e&&o.css(a,"display",u[l].opacity===0?"none":"")}),o.attr(e,"style",i)}catch{o.attr(r,"style",""),Yn(e,c)}}function en(n,e){const t=o.css(n,"zIndex");return o.isVisible(n)?{display:"",opacity:e?o.css(n,"opacity"):"0",pointerEvents:"none",position:"absolute",zIndex:t==="auto"?o.index(n):t,...tn(n)}:!1}function Xn(n,e,t){const r=e.map((c,i)=>o.parent(c)&&i in t?t[i]?o.isVisible(c)?tn(c):{opacity:0}:{opacity:o.isVisible(c)?1:0}:!1),s=r.map((c,i)=>{const f=o.parent(e[i])===n&&(t[i]||en(e[i]));if(!f)return!1;if(!c)delete f.opacity;else if(!("opacity"in c)){const{opacity:u}=f;u%1?c.opacity=1:delete f.opacity}return f});return[r,s]}function Yn(n,e){for(const t in e)o.css(n,t,"")}function tn(n){const{height:e,width:t}=o.offset(n);return{height:e,width:t,transform:"",...o.position(n),...o.css(n,["marginTop","marginLeft"])}}function rn(){return new Promise(n=>requestAnimationFrame(n))}var kn={props:{duration:Number,animation:Boolean},data:{duration:150,animation:"slide"},methods:{animate(n,e=this.$el){const t=this.animation;return(t==="fade"?k:t==="delayed-fade"?(...s)=>k(...s,40):t?Qn:()=>(n(),Promise.resolve()))(n,e,this.duration).catch(o.noop)}}};function Un(n,e=[]){try{return n?P(n,"{")?JSON.parse(n):e.length&&!un(n,":")?{[e[0]]:n}:n.split(";").reduce((t,r)=>{const[s,c]=r.split(/:(.*)/);return s&&!T(c)&&(t[s.trim()]=c.trim()),t},{}):{}}catch{return{}}}const ne={TAB:9,ESC:27,SPACE:32,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40};var on={mixins:[kn],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:n},e){return o.$$(`[${n}],[data-${n}]`,e)},watch(n){this.updateState();const e=o.$$(this.selActive,this.$el);for(const t of n){this.selActive!==!1&&o.toggleClass(t,this.cls,o.includes(e,t));const r=ce(t);o.isTag(r,"a")&&o.attr(r,"role","button")}},immediate:!0},children:{get({target:n},e){return o.$$(`${n} > *`,e)},watch(n,e){e&&this.updateState()},immediate:!0}},events:{name:"click keydown",delegate(){return`[${this.attrItem}],[data-${this.attrItem}]`},handler(n){n.type==="keydown"&&n.keyCode!==ne.SPACE||o.closest(n.target,"a,button")&&(n.preventDefault(),this.apply(n.current))}},methods:{apply(n){const e=this.getState(),t=cn(n,this.attrItem,this.getState());ee(e,t)||this.setState(t)},getState(){return this.toggles.filter(n=>o.hasClass(n,this.cls)).reduce((n,e)=>cn(e,this.attrItem,n),{filter:{"":""},sort:[]})},async setState(n,e=!0){n={filter:{"":""},sort:[],...n},o.trigger(this.$el,"beforeFilter",[this,n]);for(const t of this.toggles)o.toggleClass(t,this.cls,re(t,this.attrItem,n));await Promise.all(o.$$(this.target,this.$el).map(t=>{const r=()=>{te(n,t,o.children(t)),this.$update(this.$el)};return e?this.animate(r,t):r()})),o.trigger(this.$el,"afterFilter",[this])},updateState(){o.fastdom.write(()=>this.setState(this.getState(),!1))}}};function sn(n,e){return Un(o.data(n,e),["filter"])}function ee(n,e){return["filter","sort"].every(t=>o.isEqual(n[t],e[t]))}function te(n,e,t){const r=oe(n);t.forEach(i=>o.css(i,"display",r&&!o.matches(i,r)?"none":""));const[s,c]=n.sort;if(s){const i=se(t,s,c);o.isEqual(i,t)||o.append(e,i)}}function cn(n,e,t){const{filter:r,group:s,sort:c,order:i="asc"}=sn(n,e);return(r||o.isUndefined(c))&&(s?r?(delete t.filter[""],t.filter[s]=r):(delete t.filter[s],(o.isEmpty(t.filter)||""in t.filter)&&(t.filter={"":r||""})):t.filter={"":r||""}),o.isUndefined(c)||(t.sort=[c,i]),t}function re(n,e,{filter:t={"":""},sort:[r,s]}){const{filter:c="",group:i="",sort:f,order:u="asc"}=sn(n,e);return o.isUndefined(f)?i in t&&c===t[i]||!c&&i&&!(i in t)&&!t[""]:r===f&&s===u}function oe({filter:n}){let e="";return o.each(n,t=>e+=t||""),e}function se(n,e,t){return[...n].sort((r,s)=>o.data(r,e).localeCompare(o.data(s,e),void 0,{numeric:!0})*(t==="asc"||-1))}function ce(n){return o.$("a,button",n)||n}return typeof window<"u"&&window.UIkit&&window.UIkit.component("filter",on),on});
|