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')) :
|
|
@@ -45,11 +45,193 @@
|
|
|
45
45
|
return value && uikitUtil.isNumeric(value) ? `(min-width: ${value}px)` : "";
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
+
function startsWith(str, search) {
|
|
49
|
+
var _a;
|
|
50
|
+
return (_a = str == null ? void 0 : str.startsWith) == null ? void 0 : _a.call(str, search);
|
|
51
|
+
}
|
|
52
|
+
function isFunction(obj) {
|
|
53
|
+
return typeof obj === "function";
|
|
54
|
+
}
|
|
55
|
+
function isObject(obj) {
|
|
56
|
+
return obj !== null && typeof obj === "object";
|
|
57
|
+
}
|
|
58
|
+
function isWindow(obj) {
|
|
59
|
+
return isObject(obj) && obj === obj.window;
|
|
60
|
+
}
|
|
61
|
+
function isNode(obj) {
|
|
62
|
+
return nodeType(obj) >= 1;
|
|
63
|
+
}
|
|
64
|
+
function isElement(obj) {
|
|
65
|
+
return nodeType(obj) === 1;
|
|
66
|
+
}
|
|
67
|
+
function nodeType(obj) {
|
|
68
|
+
return !isWindow(obj) && isObject(obj) && obj.nodeType;
|
|
69
|
+
}
|
|
70
|
+
function isString(value) {
|
|
71
|
+
return typeof value === "string";
|
|
72
|
+
}
|
|
73
|
+
function isUndefined(value) {
|
|
74
|
+
return value === void 0;
|
|
75
|
+
}
|
|
76
|
+
function toNode(element) {
|
|
77
|
+
return toNodes(element)[0];
|
|
78
|
+
}
|
|
79
|
+
function toNodes(element) {
|
|
80
|
+
return isNode(element) ? [element] : Array.from(element || []).filter(isNode);
|
|
81
|
+
}
|
|
82
|
+
function memoize(fn) {
|
|
83
|
+
const cache = /* @__PURE__ */ Object.create(null);
|
|
84
|
+
return (key) => cache[key] || (cache[key] = fn(key));
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
function attr(element, name, value) {
|
|
88
|
+
var _a;
|
|
89
|
+
if (isObject(name)) {
|
|
90
|
+
for (const key in name) {
|
|
91
|
+
attr(element, key, name[key]);
|
|
92
|
+
}
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
if (isUndefined(value)) {
|
|
96
|
+
return (_a = toNode(element)) == null ? void 0 : _a.getAttribute(name);
|
|
97
|
+
} else {
|
|
98
|
+
for (const el of toNodes(element)) {
|
|
99
|
+
if (isFunction(value)) {
|
|
100
|
+
value = value.call(el, attr(el, name));
|
|
101
|
+
}
|
|
102
|
+
if (value === null) {
|
|
103
|
+
removeAttr(el, name);
|
|
104
|
+
} else {
|
|
105
|
+
el.setAttribute(name, value);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
function removeAttr(element, name) {
|
|
111
|
+
toNodes(element).forEach((element2) => element2.removeAttribute(name));
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
function parent(element) {
|
|
115
|
+
var _a;
|
|
116
|
+
return (_a = toNode(element)) == null ? void 0 : _a.parentElement;
|
|
117
|
+
}
|
|
118
|
+
function filter(element, selector) {
|
|
119
|
+
return toNodes(element).filter((element2) => matches(element2, selector));
|
|
120
|
+
}
|
|
121
|
+
function matches(element, selector) {
|
|
122
|
+
return toNodes(element).some((element2) => element2.matches(selector));
|
|
123
|
+
}
|
|
124
|
+
function closest(element, selector) {
|
|
125
|
+
return isElement(element) ? element.closest(startsWith(selector, ">") ? selector.slice(1) : selector) : toNodes(element).map((element2) => closest(element2, selector)).filter(Boolean);
|
|
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
|
+
const fragmentRe = /^\s*<(\w+|!)[^>]*>/;
|
|
206
|
+
const singleTagRe = /^<(\w+)\s*\/?>(?:<\/\1>)?$/;
|
|
207
|
+
function fragment(html2) {
|
|
208
|
+
const matches = singleTagRe.exec(html2);
|
|
209
|
+
if (matches) {
|
|
210
|
+
return document.createElement(matches[1]);
|
|
211
|
+
}
|
|
212
|
+
const container = document.createElement("div");
|
|
213
|
+
if (fragmentRe.test(html2)) {
|
|
214
|
+
container.insertAdjacentHTML("beforeend", html2.trim());
|
|
215
|
+
} else {
|
|
216
|
+
container.textContent = html2;
|
|
217
|
+
}
|
|
218
|
+
return unwrapSingle(container.childNodes);
|
|
219
|
+
}
|
|
220
|
+
function unwrapSingle(nodes) {
|
|
221
|
+
return nodes.length > 1 ? nodes : nodes[0];
|
|
222
|
+
}
|
|
223
|
+
function $$(selector, context) {
|
|
224
|
+
return isHtml(selector) ? toNodes(fragment(selector)) : findAll(selector, context);
|
|
225
|
+
}
|
|
226
|
+
function isHtml(str) {
|
|
227
|
+
return isString(str) && startsWith(str.trim(), "<");
|
|
228
|
+
}
|
|
229
|
+
|
|
48
230
|
function getMaxPathLength(el) {
|
|
49
231
|
return Math.ceil(
|
|
50
232
|
Math.max(
|
|
51
233
|
0,
|
|
52
|
-
|
|
234
|
+
...$$("[stroke]", el).map((stroke) => {
|
|
53
235
|
try {
|
|
54
236
|
return stroke.getTotalLength();
|
|
55
237
|
} catch (e) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.16.
|
|
1
|
+
/*! UIkit 3.16.5-dev.dda1f1b31 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(s,b){typeof exports=="object"&&typeof module<"u"?module.exports=b(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslider_parallax",["uikit-util"],b):(s=typeof globalThis<"u"?globalThis:s||self,s.UIkitSlider_parallax=b(s.UIkit.util))})(this,function(s){"use strict";var b={props:{media:Boolean},data:{media:!1},connected(){const n=X(this.media,this.$el);if(this.matchMedia=!0,n){this.mediaObj=window.matchMedia(n);const e=()=>{this.matchMedia=this.mediaObj.matches,s.trigger(this.$el,s.createEvent("mediachange",!1,!0,[this.mediaObj]))};this.offMediaObj=s.on(this.mediaObj,"change",()=>{e(),this.$emit("resize")}),e()}},disconnected(){var n;(n=this.offMediaObj)==null||n.call(this)}};function X(n,e){if(s.isString(n)){if(s.startsWith(n,"@"))n=s.toFloat(s.css(e,`--uk-breakpoint-${n.substr(1)}`));else if(isNaN(n))return n}return n&&s.isNumeric(n)?`(min-width: ${n}px)`:""}function T(n,e){var t;return(t=n==null?void 0:n.startsWith)==null?void 0:t.call(n,e)}function Y(n){return typeof n=="function"}function C(n){return n!==null&&typeof n=="object"}function Z(n){return C(n)&&n===n.window}function E(n){return W(n)>=1}function k(n){return W(n)===1}function W(n){return!Z(n)&&C(n)&&n.nodeType}function M(n){return typeof n=="string"}function U(n){return n===void 0}function x(n){return u(n)[0]}function u(n){return E(n)?[n]:Array.from(n||[]).filter(E)}function j(n){const e=Object.create(null);return t=>e[t]||(e[t]=n(t))}function O(n,e,t){var o;if(C(e)){for(const r in e)O(n,r,e[r]);return}if(U(t))return(o=x(n))==null?void 0:o.getAttribute(e);for(const r of u(n))Y(t)&&(t=t.call(r,O(r,e))),t===null?nn(r,e):r.setAttribute(e,t)}function nn(n,e){u(n).forEach(t=>t.removeAttribute(e))}function A(n){var e;return(e=x(n))==null?void 0:e.parentElement}function tn(n,e){return u(n).filter(t=>_(t,e))}function _(n,e){return u(n).some(t=>t.matches(e))}function R(n,e){return k(n)?n.closest(T(e,">")?e.slice(1):e):u(n).map(t=>R(t,e)).filter(Boolean)}function en(n,e){n=x(n);const t=n?u(n.children):[];return e?tn(t,e):t}function rn(n,e){return e?u(n).indexOf(x(e)):en(A(n)).indexOf(n)}function on(n,e){return u(un(n,x(e),"querySelectorAll"))}const sn=/(^|[^\\],)\s*[!>+~-]/,cn=j(n=>n.match(sn)),an=/([!>+~-])(?=\s+[!>+~-]|\s*$)/g,fn=j(n=>n.replace(an,"$1 *"));function un(n,e=document,t){if(!n||!M(n))return n;if(n=fn(n),cn(n)){const o=hn(n);n="";for(let r of o){let i=e;if(r[0]==="!"){const a=r.substr(1).trim().split(" ");if(i=R(A(e),a[0]),r=a.slice(1).join(" ").trim(),!r.length&&o.length===1)return i}if(r[0]==="-"){const a=r.substr(1).trim().split(" "),c=(i||e).previousElementSibling;i=_(c,r.substr(1))?c:null,r=a.slice(1).join(" ")}i&&(n+=`${n?",":""}${ln(i)} ${r}`)}e=document}try{return e[t](n)}catch{return null}}const dn=/.*?[^\\](?:,|$)/g,hn=j(n=>n.match(dn).map(e=>e.replace(/,$/,"").trim()));function ln(n){const e=[];for(;n.parentNode;){const t=O(n,"id");if(t){e.unshift(`#${gn(t)}`);break}else{let{tagName:o}=n;o!=="HTML"&&(o+=`:nth-child(${rn(n)+1})`),e.unshift(o),n=n.parentNode}}return e.join(" > ")}function gn(n){return M(n)?CSS.escape(n):""}const mn=/^\s*<(\w+|!)[^>]*>/,bn=/^<(\w+)\s*\/?>(?:<\/\1>)?$/;function xn(n){const e=bn.exec(n);if(e)return document.createElement(e[1]);const t=document.createElement("div");return mn.test(n)?t.insertAdjacentHTML("beforeend",n.trim()):t.textContent=n,$n(t.childNodes)}function $n(n){return n.length>1?n:n[0]}function yn(n,e){return wn(n)?u(xn(n)):on(n,e)}function wn(n){return M(n)&&T(n.trim(),"<")}function pn(n){return Math.ceil(Math.max(0,...yn("[stroke]",n).map(e=>{try{return e.getTotalLength()}catch{return 0}})))}const p={x:v,y:v,rotate:v,scale:v,color:I,backgroundColor:I,borderColor:I,blur:g,hue:g,fopacity:g,grayscale:g,invert:g,saturate:g,sepia:g,opacity:Sn,stroke:Cn,bgx:B,bgy:B},{keys:z}=Object;var vn={mixins:[b],props:L(z(p),"list"),data:L(z(p),void 0),computed:{props(n,e){const t={};for(const r in n)r in p&&!s.isUndefined(n[r])&&(t[r]=n[r].slice());const o={};for(const r in t)o[r]=p[r](r,e,t[r],t);return o}},events:{load(){this.$emit()}},methods:{reset(){for(const n in this.getCss(0))s.css(this.$el,n,"")},getCss(n){const e={transform:"",filter:""};for(const t in this.props)this.props[t](e,n);return e.willChange=Object.keys(e).filter(t=>e[t]!=="").join(","),e}}};function v(n,e,t){let o=S(t)||{x:"px",y:"px",rotate:"deg"}[n]||"",r;return n==="x"||n==="y"?(n=`translate${s.ucfirst(n)}`,r=i=>s.toFloat(s.toFloat(i).toFixed(o==="px"?0:6))):n==="scale"&&(o="",r=i=>S([i])?s.toPx(i,"width",e,!0)/e.offsetWidth:i),t.length===1&&t.unshift(n==="scale"?1:0),t=m(t,r),(i,a)=>{i.transform+=` ${n}(${$(t,a)}${o})`}}function I(n,e,t){return t.length===1&&t.unshift(y(e,n,"")),t=m(t,o=>Fn(e,o)),(o,r)=>{const[i,a,c]=q(t,r),h=i.map((l,f)=>(l+=c*(a[f]-l),f===3?s.toFloat(l):parseInt(l,10))).join(",");o[n]=`rgba(${h})`}}function Fn(n,e){return y(n,"color",e).split(/[(),]/g).slice(1,-1).concat(1).slice(0,4).map(s.toFloat)}function g(n,e,t){t.length===1&&t.unshift(0);const o=S(t)||{blur:"px",hue:"deg"}[n]||"%";return n={fopacity:"opacity",hue:"hue-rotate"}[n]||n,t=m(t),(r,i)=>{const a=$(t,i);r.filter+=` ${n}(${a+o})`}}function Sn(n,e,t){return t.length===1&&t.unshift(y(e,n,"")),t=m(t),(o,r)=>{o[n]=$(t,r)}}function Cn(n,e,t){t.length===1&&t.unshift(0);const o=S(t),r=pn(e);return t=m(t.reverse(),i=>(i=s.toFloat(i),o==="%"?i*r/100:i)),t.some(([i])=>i)?(s.css(e,"strokeDasharray",r),(i,a)=>{i.strokeDashoffset=$(t,a)}):s.noop}function B(n,e,t,o){t.length===1&&t.unshift(0);const r=n==="bgy"?"height":"width";o[n]=m(t,c=>s.toPx(c,r,e));const i=["bgx","bgy"].filter(c=>c in o);if(i.length===2&&n==="bgx")return s.noop;if(y(e,"backgroundSize","")==="cover")return Mn(n,e,t,o);const a={};for(const c of i)a[c]=D(e,c);return H(i,a,o)}function Mn(n,e,t,o){const r=jn(e);if(!r.width)return s.noop;const i={width:e.offsetWidth,height:e.offsetHeight},a=["bgx","bgy"].filter(f=>f in o),c={};for(const f of a){const d=o[f].map(([In])=>In),w=Math.min(...d),N=Math.max(...d),K=d.indexOf(w)<d.indexOf(N),Q=N-w;c[f]=`${(K?-Q:0)-(K?w:N)}px`,i[f==="bgy"?"height":"width"]+=Q}const h=s.Dimensions.cover(r,i);for(const f of a){const d=f==="bgy"?"height":"width",w=h[d]-i[d];c[f]=`max(${D(e,f)},-${w}px) + ${c[f]}`}const l=H(a,c,o);return(f,d)=>{l(f,d),f.backgroundSize=`${h.width}px ${h.height}px`,f.backgroundRepeat="no-repeat"}}function D(n,e){return y(n,`background-position-${e.substr(-1)}`,"")}function H(n,e,t){return function(o,r){for(const i of n){const a=$(t[i],r);o[`background-position-${i.substr(-1)}`]=`calc(${e[i]} + ${a}px)`}}}const F={};function jn(n){const e=s.css(n,"backgroundImage").replace(/^none|url\(["']?(.+?)["']?\)$/,"$1");if(F[e])return F[e];const t=new Image;return e&&(t.src=e,!t.naturalWidth)?(t.onload=()=>{F[e]=P(t),s.trigger(n,s.createEvent("load",!1))},P(t)):F[e]=P(t)}function P(n){return{width:n.naturalWidth,height:n.naturalHeight}}function m(n,e=s.toFloat){const t=[],{length:o}=n;let r=0;for(let i=0;i<o;i++){let[a,c]=s.isString(n[i])?n[i].trim().split(" "):[n[i]];if(a=e(a),c=c?s.toFloat(c)/100:null,i===0?c===null?c=0:c&&t.push([a,0]):i===o-1&&(c===null?c=1:c!==1&&(t.push([a,c]),c=1)),t.push([a,c]),c===null)r++;else if(r){const h=t[i-r-1][1],l=(c-h)/(r+1);for(let f=r;f>0;f--)t[i-f][1]=h+l*(r-f+1);r=0}}return t}function q(n,e){const t=s.findIndex(n.slice(1),([,o])=>e<=o)+1;return[n[t-1][0],n[t][0],(e-n[t-1][1])/(n[t][1]-n[t-1][1])]}function $(n,e){const[t,o,r]=q(n,e);return s.isNumber(t)?t+Math.abs(t-o)*r*(t<o?1:-1):+o}const On=/^-?\d+(\S+)?/;function S(n,e){var t;for(const o of n){const r=(t=o.match)==null?void 0:t.call(o,On);if(r)return r[1]}return e}function y(n,e,t){const o=n.style[e],r=s.css(s.css(n,e,t),e);return n.style[e]=o,r}function L(n,e){return n.reduce((t,o)=>(t[o]=e,t),{})}var V={mixins:[vn],data:{selItem:"!li"},beforeConnect(){this.item=s.query(this.selItem,this.$el)},disconnected(){this.item=null},events:[{name:"itemin itemout",self:!0,el(){return this.item},handler({type:n,detail:{percent:e,duration:t,timing:o,dir:r}}){s.fastdom.read(()=>{if(!this.matchMedia)return;const i=this.getCss(J(n,r,e)),a=this.getCss(G(n)?.5:r>0?1:0);s.fastdom.write(()=>{s.css(this.$el,i),s.Transition.start(this.$el,a,t,o).catch(s.noop)})})}},{name:"transitioncanceled transitionend",self:!0,el(){return this.item},handler(){s.Transition.cancel(this.$el)}},{name:"itemtranslatein itemtranslateout",self:!0,el(){return this.item},handler({type:n,detail:{percent:e,dir:t}}){s.fastdom.read(()=>{if(!this.matchMedia){this.reset();return}const o=this.getCss(J(n,t,e));s.fastdom.write(()=>s.css(this.$el,o))})}}]};function G(n){return s.endsWith(n,"in")}function J(n,e,t){return t/=2,G(n)^e<0?t:1-t}return typeof window<"u"&&window.UIkit&&window.UIkit.component("sliderParallax",V),V});
|