uikit 3.19.5-dev.66a60877b → 3.19.5-dev.74c343fa4

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 (62) hide show
  1. package/CHANGELOG.md +2 -1
  2. package/dist/css/uikit-core-rtl.css +2 -2
  3. package/dist/css/uikit-core-rtl.min.css +1 -1
  4. package/dist/css/uikit-core.css +2 -2
  5. package/dist/css/uikit-core.min.css +1 -1
  6. package/dist/css/uikit-rtl.css +2 -2
  7. package/dist/css/uikit-rtl.min.css +1 -1
  8. package/dist/css/uikit.css +2 -2
  9. package/dist/css/uikit.min.css +1 -1
  10. package/dist/js/components/countdown.js +1 -1
  11. package/dist/js/components/countdown.min.js +1 -1
  12. package/dist/js/components/filter.js +87 -87
  13. package/dist/js/components/filter.min.js +1 -1
  14. package/dist/js/components/lightbox-panel.js +1 -1
  15. package/dist/js/components/lightbox-panel.min.js +1 -1
  16. package/dist/js/components/lightbox.js +1 -1
  17. package/dist/js/components/lightbox.min.js +1 -1
  18. package/dist/js/components/notification.js +1 -1
  19. package/dist/js/components/notification.min.js +1 -1
  20. package/dist/js/components/parallax.js +40 -30
  21. package/dist/js/components/parallax.min.js +1 -1
  22. package/dist/js/components/slider-parallax.js +40 -30
  23. package/dist/js/components/slider-parallax.min.js +1 -1
  24. package/dist/js/components/slider.js +40 -30
  25. package/dist/js/components/slider.min.js +1 -1
  26. package/dist/js/components/slideshow-parallax.js +40 -30
  27. package/dist/js/components/slideshow-parallax.min.js +1 -1
  28. package/dist/js/components/slideshow.js +40 -30
  29. package/dist/js/components/slideshow.min.js +1 -1
  30. package/dist/js/components/sortable.js +87 -87
  31. package/dist/js/components/sortable.min.js +1 -1
  32. package/dist/js/components/tooltip.js +1 -1
  33. package/dist/js/components/tooltip.min.js +1 -1
  34. package/dist/js/components/upload.js +1 -1
  35. package/dist/js/components/upload.min.js +1 -1
  36. package/dist/js/uikit-core.js +81 -74
  37. package/dist/js/uikit-core.min.js +1 -1
  38. package/dist/js/uikit-icons.js +1 -1
  39. package/dist/js/uikit-icons.min.js +1 -1
  40. package/dist/js/uikit.js +167 -163
  41. package/dist/js/uikit.min.js +1 -1
  42. package/package.json +1 -1
  43. package/src/js/api/computed.js +20 -26
  44. package/src/js/core/height-placeholder.js +4 -1
  45. package/src/js/core/margin.js +5 -0
  46. package/src/js/core/modal.js +5 -6
  47. package/src/js/core/scrollspy.js +0 -3
  48. package/src/js/core/sticky.js +1 -1
  49. package/src/js/core/switcher.js +4 -1
  50. package/src/js/core/toggle.js +6 -3
  51. package/src/js/mixin/internal/animate-fade.js +2 -7
  52. package/src/js/mixin/internal/animate-slide.js +2 -7
  53. package/src/js/mixin/parallax.js +7 -3
  54. package/src/js/util/fastdom.js +6 -13
  55. package/src/js/util/filter.js +6 -3
  56. package/src/js/util/selector.js +31 -22
  57. package/src/js/util/svg.js +4 -1
  58. package/src/less/components/utility.less +1 -1
  59. package/src/scss/components/utility.scss +1 -1
  60. package/tests/base.html +1 -1
  61. package/tests/js/index.js +12 -10
  62. package/tests/switcher.html +86 -86
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.19.5-dev.66a60877b | https://www.getuikit.com | (c) 2014 - 2024 YOOtheme | MIT License */
1
+ /*! UIkit 3.19.5-dev.74c343fa4 | https://www.getuikit.com | (c) 2014 - 2024 YOOtheme | MIT License */
2
2
 
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
@@ -184,6 +184,12 @@
184
184
  toNodes(element).forEach((element2) => element2.removeAttribute(name));
185
185
  }
186
186
 
187
+ const isVisibleFn = Element.prototype.checkVisibility || function() {
188
+ return this.offsetWidth || this.offsetHeight || this.getClientRects().length;
189
+ };
190
+ function isVisible(element) {
191
+ return toNodes(element).some((element2) => isVisibleFn.call(element2));
192
+ }
187
193
  function parent(element) {
188
194
  var _a;
189
195
  return (_a = toNode(element)) == null ? void 0 : _a.parentElement;
@@ -216,10 +222,7 @@
216
222
  const selectors = [];
217
223
  for (let sel of (_a = selector.match(splitSelectorRe)) != null ? _a : []) {
218
224
  sel = sel.replace(trailingCommaRe, "").trim();
219
- if (sel[0] === ">") {
220
- sel = `:scope ${sel}`;
221
- }
222
- isContextSelector || (isContextSelector = ["!", "+", "~", "-"].includes(sel[0]));
225
+ isContextSelector || (isContextSelector = ["!", "+", "~", "-", ">"].includes(sel[0]));
223
226
  selectors.push(sel);
224
227
  }
225
228
  return {
@@ -228,6 +231,11 @@
228
231
  isContextSelector
229
232
  };
230
233
  });
234
+ const parsePositionSelector = memoize((selector) => {
235
+ selector = selector.substr(1).trim();
236
+ const index2 = selector.indexOf(" ");
237
+ return ~index2 ? [selector.substring(0, index2), selector.substring(index2 + 1)] : [selector, ""];
238
+ });
231
239
  function _query(selector, context = document, queryFn) {
232
240
  if (!selector || !isString(selector)) {
233
241
  return selector;
@@ -239,33 +247,36 @@
239
247
  selector = "";
240
248
  const isSingle = parsed.selectors.length === 1;
241
249
  for (let sel of parsed.selectors) {
250
+ let positionSel;
242
251
  let ctx = context;
243
252
  if (sel[0] === "!") {
244
- const selectors = sel.substr(1).trim().split(" ");
245
- ctx = context.parentElement.closest(selectors[0]);
246
- sel = selectors.slice(1).join(" ").trim();
247
- if (!sel.length && isSingle) {
253
+ [positionSel, sel] = parsePositionSelector(sel);
254
+ ctx = context.parentElement.closest(positionSel);
255
+ if (!sel && isSingle) {
248
256
  return ctx;
249
257
  }
250
258
  }
251
- if (sel[0] === "-") {
252
- const selectors = sel.substr(1).trim().split(" ");
253
- const prev = (ctx || context).previousElementSibling;
254
- ctx = matches(prev, sel.substr(1)) ? prev : null;
255
- sel = selectors.slice(1).join(" ");
256
- if (!sel.length && isSingle) {
259
+ if (ctx && sel[0] === "-") {
260
+ [positionSel, sel] = parsePositionSelector(sel);
261
+ ctx = ctx.previousElementSibling;
262
+ ctx = matches(ctx, positionSel) ? ctx : null;
263
+ if (!sel && isSingle) {
257
264
  return ctx;
258
265
  }
259
- } else if (sel[0] === "~" || sel[0] === "+" && isSingle) {
260
- return _doQuery(
261
- ctx.parentElement,
262
- queryFn,
263
- `:scope :nth-child(${index(ctx) + 1}) ${sel}`
264
- );
265
266
  }
266
- if (ctx) {
267
- selector += `${selector ? "," : ""}${domPath(ctx)} ${sel}`;
267
+ if (!ctx) {
268
+ continue;
268
269
  }
270
+ if (isSingle) {
271
+ if (sel[0] === "~" || sel[0] === "+") {
272
+ sel = `:scope :nth-child(${index(ctx) + 1}) ${sel}`;
273
+ ctx = ctx.parentElement;
274
+ } else if (sel[0] === ">") {
275
+ sel = `:scope ${sel}`;
276
+ }
277
+ return _doQuery(ctx, queryFn, sel);
278
+ }
279
+ selector += `${selector ? "," : ""}${domPath(ctx)} ${sel}`;
269
280
  }
270
281
  if (!isDocument(context)) {
271
282
  context = context.ownerDocument;
@@ -322,10 +333,7 @@
322
333
  }
323
334
 
324
335
  function getMaxPathLength(el) {
325
- return Math.ceil(Math.max(0, ...$$("[stroke]", el).map((stroke) => {
326
- var _a;
327
- return (_a = stroke.getTotalLength) == null ? void 0 : _a.call(stroke);
328
- })));
336
+ return isVisible(el) ? Math.ceil(Math.max(0, ...$$("[stroke]", el).map((stroke) => stroke.getTotalLength()))) : 0;
329
337
  }
330
338
 
331
339
  const props = {
@@ -529,6 +537,7 @@
529
537
  }
530
538
  };
531
539
  }
540
+ const loading = {};
532
541
  const dimensions = {};
533
542
  function getBackgroundImageDimensions(el) {
534
543
  const src = uikitUtil.css(el, "backgroundImage").replace(/^none|url\(["']?(.+?)["']?\)$/, "$1");
@@ -538,11 +547,12 @@
538
547
  const image = new Image();
539
548
  if (src) {
540
549
  image.src = src;
541
- if (!image.naturalWidth) {
542
- image.onload = () => {
550
+ if (!image.naturalWidth && !loading[src]) {
551
+ uikitUtil.once(image, "error load", () => {
543
552
  dimensions[src] = toDimensions(image);
544
553
  uikitUtil.trigger(el, uikitUtil.createEvent("load", false));
545
- };
554
+ });
555
+ loading[src] = true;
546
556
  return toDimensions(image);
547
557
  }
548
558
  }
@@ -1 +1 @@
1
- /*! UIkit 3.19.5-dev.66a60877b | https://www.getuikit.com | (c) 2014 - 2024 YOOtheme | MIT License */(function(i,b){typeof exports=="object"&&typeof module<"u"?module.exports=b(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitparallax",["uikit-util"],b):(i=typeof globalThis<"u"?globalThis:i||self,i.UIkitParallax=b(i.UIkit.util))})(this,function(i){"use strict";function b(n,t="update"){n._connected&&n._updates.length&&(n._queued||(n._queued=new Set,i.fastdom.read(()=>{n._connected&&J(n,n._queued),delete n._queued})),n._queued.add(t.type||t))}function J(n,t){for(const{read:e,write:r,events:o=[]}of n._updates){if(!t.has("update")&&!o.some(c=>t.has(c)))continue;let s;e&&(s=e.call(n,n._data,t),s&&i.isPlainObject(s)&&i.assign(n._data,s)),r&&s!==!1&&i.fastdom.write(()=>{n._connected&&r.call(n,n._data,t)})}}function K(n){return M(i.observeResize,n,"resize")}function X(n){return M((t,e)=>i.observeViewportResize(e),n,"resize")}function Y(n){return M((t,e)=>({disconnect:i.on(Z(t),"scroll",e,{passive:!0})}),n,"scroll")}function M(n,t,e){return{observe:n,handler(){b(this,e)},...t}}function Z(n){return i.toNodes(n).map(t=>{const{ownerDocument:e}=t,r=i.scrollParent(t,!0);return r===e.scrollingElement?e:r})}var k={props:{media:Boolean},data:{media:!1},connected(){const n=U(this.media,this.$el);if(this.matchMedia=!0,n){this.mediaObj=window.matchMedia(n);const t=()=>{this.matchMedia=this.mediaObj.matches,i.trigger(this.$el,i.createEvent("mediachange",!1,!0,[this.mediaObj]))};this.offMediaObj=i.on(this.mediaObj,"change",()=>{t(),this.$emit("resize")}),t()}},disconnected(){var n;(n=this.offMediaObj)==null||n.call(this)}};function U(n,t){if(i.isString(n)){if(i.startsWith(n,"@"))n=i.toFloat(i.css(t,`--uk-breakpoint-${n.substr(1)}`));else if(isNaN(n))return n}return n&&i.isNumeric(n)?`(min-width: ${n}px)`:""}function nn(n,t){var e;return(e=n==null?void 0:n.startsWith)==null?void 0:e.call(n,t)}const{isArray:An,from:tn}=Array;function en(n){return typeof n=="function"}function F(n){return n!==null&&typeof n=="object"}function rn(n){return F(n)&&n===n.window}function on(n){return z(n)===9}function I(n){return z(n)>=1}function z(n){return!rn(n)&&F(n)&&n.nodeType}function O(n){return typeof n=="string"}function sn(n){return n===void 0}function $(n){return n&&l(n)[0]}function l(n){return I(n)?[n]:Array.from(n||[]).filter(I)}function cn(n){const t=Object.create(null);return(e,...r)=>t[e]||(t[e]=n(e,...r))}function P(n,t,e){var r;if(F(t)){for(const o in t)P(n,o,t[o]);return}if(sn(e))return(r=$(n))==null?void 0:r.getAttribute(t);for(const o of l(n))en(e)&&(e=e.call(o,P(o,t))),e===null?an(o,t):o.setAttribute(t,e)}function an(n,t){l(n).forEach(e=>e.removeAttribute(t))}function fn(n){var t;return(t=$(n))==null?void 0:t.parentElement}function un(n,t){return l(n).filter(e=>A(e,t))}function A(n,t){return l(n).some(e=>e.matches(t))}function dn(n,t){n=$(n);const e=n?tn(n.children):[];return t?un(e,t):e}function T(n,t){return t?l(n).indexOf($(t)):dn(fn(n)).indexOf(n)}function ln(n,t){return l($n(n,$(t),"querySelectorAll"))}const hn=/([!>+~-])(?=\s+[!>+~-]|\s*$)/g,gn=/.*?[^\\](?![^(]*\))(?:,|$)/g,mn=/\s*,$/,bn=cn(n=>{var t;n=n.replace(hn,"$1 *");let e=!1;const r=[];for(let o of(t=n.match(gn))!=null?t:[])o=o.replace(mn,"").trim(),o[0]===">"&&(o=`:scope ${o}`),e||(e=["!","+","~","-"].includes(o[0])),r.push(o);return{selector:r.join(","),selectors:r,isContextSelector:e}});function $n(n,t=document,e){if(!n||!O(n))return n;const r=bn(n);if(!r.isContextSelector)return j(t,e,r.selector);n="";const o=r.selectors.length===1;for(let s of r.selectors){let c=t;if(s[0]==="!"){const a=s.substr(1).trim().split(" ");if(c=t.parentElement.closest(a[0]),s=a.slice(1).join(" ").trim(),!s.length&&o)return c}if(s[0]==="-"){const a=s.substr(1).trim().split(" "),u=(c||t).previousElementSibling;if(c=A(u,s.substr(1))?u:null,s=a.slice(1).join(" "),!s.length&&o)return c}else if(s[0]==="~"||s[0]==="+"&&o)return j(c.parentElement,e,`:scope :nth-child(${T(c)+1}) ${s}`);c&&(n+=`${n?",":""}${pn(c)} ${s}`)}return on(t)||(t=t.ownerDocument),j(t,e,n)}function j(n,t,e){try{return n[t](e)}catch{return null}}function pn(n){const t=[];for(;n.parentNode;){const e=P(n,"id");if(e){t.unshift(`#${xn(e)}`);break}else{let{tagName:r}=n;r!=="HTML"&&(r+=`:nth-child(${T(n)+1})`),t.unshift(r),n=n.parentNode}}return t.join(" > ")}function xn(n){return O(n)?CSS.escape(n):""}const vn=/^<(\w+)\s*\/?>(?:<\/\1>)?$/;function wn(n){const t=vn.exec(n);if(t)return document.createElement(t[1]);const e=document.createElement("template");return e.innerHTML=n.trim(),yn(e.content.childNodes)}function yn(n){return n.length>1?n:n[0]}function Sn(n,t){return _n(n)?l(wn(n)):ln(n,t)}function _n(n){return O(n)&&nn(n.trim(),"<")}function Mn(n){return Math.ceil(Math.max(0,...Sn("[stroke]",n).map(t=>{var e;return(e=t.getTotalLength)==null?void 0:e.call(t)})))}const w={x:y,y,rotate:y,scale:y,color:C,backgroundColor:C,borderColor:C,blur:g,hue:g,fopacity:g,grayscale:g,invert:g,saturate:g,sepia:g,opacity:Pn,stroke:jn,bgx:D,bgy:D},{keys:W}=Object;var Fn={mixins:[k],props:B(W(w),"list"),data:B(W(w),void 0),computed:{props(n,t){const e={};for(const o in n)o in w&&!i.isUndefined(n[o])&&(e[o]=n[o].slice());const r={};for(const o in e)r[o]=w[o](o,t,e[o],e);return r}},events:{load(){this.$emit()}},methods:{reset(){for(const n in this.getCss(0))i.css(this.$el,n,"")},getCss(n){const t={};for(const e in this.props)this.props[e](t,i.clamp(n));return t.willChange=Object.keys(t).map(i.propName).join(","),t}}};function y(n,t,e){let r=_(e)||{x:"px",y:"px",rotate:"deg"}[n]||"",o;return n==="x"||n==="y"?(n=`translate${i.ucfirst(n)}`,o=s=>i.toFloat(i.toFloat(s).toFixed(r==="px"?0:6))):n==="scale"&&(r="",o=s=>{var c;return _([s])?i.toPx(s,"width",t,!0)/t[`offset${(c=s.endsWith)!=null&&c.call(s,"vh")?"Height":"Width"}`]:i.toFloat(s)}),e.length===1&&e.unshift(n==="scale"?1:0),e=m(e,o),(s,c)=>{s.transform=`${s.transform||""} ${n}(${p(e,c)}${r})`}}function C(n,t,e){return e.length===1&&e.unshift(x(t,n,"")),e=m(e,r=>On(t,r)),(r,o)=>{const[s,c,a]=H(e,o),u=s.map((h,f)=>(h+=a*(c[f]-h),f===3?i.toFloat(h):parseInt(h,10))).join(",");r[n]=`rgba(${u})`}}function On(n,t){return x(n,"color",t).split(/[(),]/g).slice(1,-1).concat(1).slice(0,4).map(i.toFloat)}function g(n,t,e){e.length===1&&e.unshift(0);const r=_(e)||{blur:"px",hue:"deg"}[n]||"%";return n={fopacity:"opacity",hue:"hue-rotate"}[n]||n,e=m(e),(o,s)=>{const c=p(e,s);o.filter=`${o.filter||""} ${n}(${c+r})`}}function Pn(n,t,e){return e.length===1&&e.unshift(x(t,n,"")),e=m(e),(r,o)=>{r[n]=p(e,o)}}function jn(n,t,e){e.length===1&&e.unshift(0);const r=_(e),o=Mn(t);return e=m(e.reverse(),s=>(s=i.toFloat(s),r==="%"?s*o/100:s)),e.some(([s])=>s)?(i.css(t,"strokeDasharray",o),(s,c)=>{s.strokeDashoffset=p(e,c)}):i.noop}function D(n,t,e,r){e.length===1&&e.unshift(0);const o=n==="bgy"?"height":"width";r[n]=m(e,a=>i.toPx(a,o,t));const s=["bgx","bgy"].filter(a=>a in r);if(s.length===2&&n==="bgx")return i.noop;if(x(t,"backgroundSize","")==="cover")return Cn(n,t,e,r);const c={};for(const a of s)c[a]=R(t,a);return q(s,c,r)}function Cn(n,t,e,r){const o=Nn(t);if(!o.width)return i.noop;const s={width:t.offsetWidth,height:t.offsetHeight},c=["bgx","bgy"].filter(f=>f in r),a={};for(const f of c){const d=r[f].map(([zn])=>zn),v=Math.min(...d),E=Math.max(...d),Q=d.indexOf(v)<d.indexOf(E),G=E-v;a[f]=`${(Q?-G:0)-(Q?v:E)}px`,s[f==="bgy"?"height":"width"]+=G}const u=i.Dimensions.cover(o,s);for(const f of c){const d=f==="bgy"?"height":"width",v=u[d]-s[d];a[f]=`max(${R(t,f)},-${v}px) + ${a[f]}`}const h=q(c,a,r);return(f,d)=>{h(f,d),f.backgroundSize=`${u.width}px ${u.height}px`,f.backgroundRepeat="no-repeat"}}function R(n,t){return x(n,`background-position-${t.substr(-1)}`,"")}function q(n,t,e){return function(r,o){for(const s of n){const c=p(e[s],o);r[`background-position-${s.substr(-1)}`]=`calc(${t[s]} + ${c}px)`}}}const S={};function Nn(n){const t=i.css(n,"backgroundImage").replace(/^none|url\(["']?(.+?)["']?\)$/,"$1");if(S[t])return S[t];const e=new Image;return t&&(e.src=t,!e.naturalWidth)?(e.onload=()=>{S[t]=N(e),i.trigger(n,i.createEvent("load",!1))},N(e)):S[t]=N(e)}function N(n){return{width:n.naturalWidth,height:n.naturalHeight}}function m(n,t=i.toFloat){const e=[],{length:r}=n;let o=0;for(let s=0;s<r;s++){let[c,a]=i.isString(n[s])?n[s].trim().split(/ (?![^(]*\))/):[n[s]];if(c=t(c),a=a?i.toFloat(a)/100:null,s===0?a===null?a=0:a&&e.push([c,0]):s===r-1&&(a===null?a=1:a!==1&&(e.push([c,a]),a=1)),e.push([c,a]),a===null)o++;else if(o){const u=e[s-o-1][1],h=(a-u)/(o+1);for(let f=o;f>0;f--)e[s-f][1]=u+h*(o-f+1);o=0}}return e}function H(n,t){const e=i.findIndex(n.slice(1),([,r])=>t<=r)+1;return[n[e-1][0],n[e][0],(t-n[e-1][1])/(n[e][1]-n[e-1][1])]}function p(n,t){const[e,r,o]=H(n,t);return e+Math.abs(e-r)*o*(e<r?1:-1)}const En=/^-?\d+(?:\.\d+)?(\S+)?/;function _(n,t){var e;for(const r of n){const o=(e=r.match)==null?void 0:e.call(r,En);if(o)return o[1]}return t}function x(n,t,e){const r=n.style[t],o=i.css(i.css(n,t,e),t);return n.style[t]=r,o}function B(n,t){return n.reduce((e,r)=>(e[r]=t,e),{})}function In(n,t){return t>=0?Math.pow(n,t+1):1-Math.pow(1-n,1-t)}var L={mixins:[Fn],props:{target:String,viewport:Number,easing:Number,start:String,end:String},data:{target:!1,viewport:1,easing:1,start:0,end:0},computed:{target:({target:n},t)=>V(n&&i.query(n,t)||t),start({start:n}){return i.toPx(n,"height",this.target,!0)},end({end:n,viewport:t}){return i.toPx(n||(t=(1-t)*100)&&`${t}vh+${t}%`,"height",this.target,!0)}},observe:[X(),Y({target:({target:n})=>n}),K({target:({$el:n,target:t})=>[n,t,i.scrollParent(t,!0)]})],update:{read({percent:n},t){if(t.has("scroll")||(n=!1),!i.isVisible(this.$el))return!1;if(!this.matchMedia)return;const e=n;return n=In(i.scrolledOver(this.target,this.start,this.end),this.easing),{percent:n,style:e===n?!1:this.getCss(n)}},write({style:n}){if(!this.matchMedia){this.reset();return}n&&i.css(this.$el,n)},events:["scroll","resize"]}};function V(n){return n?"offsetTop"in n?n:V(i.parent(n)):document.documentElement}return typeof window<"u"&&window.UIkit&&window.UIkit.component("parallax",L),L});
1
+ /*! UIkit 3.19.5-dev.74c343fa4 | https://www.getuikit.com | (c) 2014 - 2024 YOOtheme | MIT License */(function(s,b){typeof exports=="object"&&typeof module<"u"?module.exports=b(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitparallax",["uikit-util"],b):(s=typeof globalThis<"u"?globalThis:s||self,s.UIkitParallax=b(s.UIkit.util))})(this,function(s){"use strict";function b(n,t="update"){n._connected&&n._updates.length&&(n._queued||(n._queued=new Set,s.fastdom.read(()=>{n._connected&&Y(n,n._queued),delete n._queued})),n._queued.add(t.type||t))}function Y(n,t){for(const{read:e,write:o,events:i=[]}of n._updates){if(!t.has("update")&&!i.some(a=>t.has(a)))continue;let r;e&&(r=e.call(n,n._data,t),r&&s.isPlainObject(r)&&s.assign(n._data,r)),o&&r!==!1&&s.fastdom.write(()=>{n._connected&&o.call(n,n._data,t)})}}function Z(n){return F(s.observeResize,n,"resize")}function k(n){return F((t,e)=>s.observeViewportResize(e),n,"resize")}function U(n){return F((t,e)=>({disconnect:s.on(nn(t),"scroll",e,{passive:!0})}),n,"scroll")}function F(n,t,e){return{observe:n,handler(){b(this,e)},...t}}function nn(n){return s.toNodes(n).map(t=>{const{ownerDocument:e}=t,o=s.scrollParent(t,!0);return o===e.scrollingElement?e:o})}var tn={props:{media:Boolean},data:{media:!1},connected(){const n=en(this.media,this.$el);if(this.matchMedia=!0,n){this.mediaObj=window.matchMedia(n);const t=()=>{this.matchMedia=this.mediaObj.matches,s.trigger(this.$el,s.createEvent("mediachange",!1,!0,[this.mediaObj]))};this.offMediaObj=s.on(this.mediaObj,"change",()=>{t(),this.$emit("resize")}),t()}},disconnected(){var n;(n=this.offMediaObj)==null||n.call(this)}};function en(n,t){if(s.isString(n)){if(s.startsWith(n,"@"))n=s.toFloat(s.css(t,`--uk-breakpoint-${n.substr(1)}`));else if(isNaN(n))return n}return n&&s.isNumeric(n)?`(min-width: ${n}px)`:""}function rn(n,t){var e;return(e=n==null?void 0:n.startsWith)==null?void 0:e.call(n,t)}const{isArray:Dn,from:on}=Array;function sn(n){return typeof n=="function"}function M(n){return n!==null&&typeof n=="object"}function cn(n){return M(n)&&n===n.window}function an(n){return z(n)===9}function I(n){return z(n)>=1}function z(n){return!cn(n)&&M(n)&&n.nodeType}function O(n){return typeof n=="string"}function fn(n){return n===void 0}function $(n){return n&&u(n)[0]}function u(n){return I(n)?[n]:Array.from(n||[]).filter(I)}function A(n){const t=Object.create(null);return(e,...o)=>t[e]||(t[e]=n(e,...o))}function P(n,t,e){var o;if(M(t)){for(const i in t)P(n,i,t[i]);return}if(fn(e))return(o=$(n))==null?void 0:o.getAttribute(t);for(const i of u(n))sn(e)&&(e=e.call(i,P(i,t))),e===null?un(i,t):i.setAttribute(t,e)}function un(n,t){u(n).forEach(e=>e.removeAttribute(t))}const dn=Element.prototype.checkVisibility||function(){return this.offsetWidth||this.offsetHeight||this.getClientRects().length};function hn(n){return u(n).some(t=>dn.call(t))}function ln(n){var t;return(t=$(n))==null?void 0:t.parentElement}function gn(n,t){return u(n).filter(e=>T(e,t))}function T(n,t){return u(n).some(e=>e.matches(t))}function mn(n,t){n=$(n);const e=n?on(n.children):[];return t?gn(e,t):e}function W(n,t){return t?u(n).indexOf($(t)):mn(ln(n)).indexOf(n)}function bn(n,t){return u(vn(n,$(t),"querySelectorAll"))}const $n=/([!>+~-])(?=\s+[!>+~-]|\s*$)/g,pn=/.*?[^\\](?![^(]*\))(?:,|$)/g,xn=/\s*,$/,wn=A(n=>{var t;n=n.replace($n,"$1 *");let e=!1;const o=[];for(let i of(t=n.match(pn))!=null?t:[])i=i.replace(xn,"").trim(),e||(e=["!","+","~","-",">"].includes(i[0])),o.push(i);return{selector:o.join(","),selectors:o,isContextSelector:e}}),R=A(n=>{n=n.substr(1).trim();const t=n.indexOf(" ");return~t?[n.substring(0,t),n.substring(t+1)]:[n,""]});function vn(n,t=document,e){if(!n||!O(n))return n;const o=wn(n);if(!o.isContextSelector)return C(t,e,o.selector);n="";const i=o.selectors.length===1;for(let r of o.selectors){let a,c=t;if(r[0]==="!"&&([a,r]=R(r),c=t.parentElement.closest(a),!r&&i)||c&&r[0]==="-"&&([a,r]=R(r),c=c.previousElementSibling,c=T(c,a)?c:null,!r&&i))return c;if(c){if(i)return r[0]==="~"||r[0]==="+"?(r=`:scope :nth-child(${W(c)+1}) ${r}`,c=c.parentElement):r[0]===">"&&(r=`:scope ${r}`),C(c,e,r);n+=`${n?",":""}${yn(c)} ${r}`}}return an(t)||(t=t.ownerDocument),C(t,e,n)}function C(n,t,e){try{return n[t](e)}catch{return null}}function yn(n){const t=[];for(;n.parentNode;){const e=P(n,"id");if(e){t.unshift(`#${Sn(e)}`);break}else{let{tagName:o}=n;o!=="HTML"&&(o+=`:nth-child(${W(n)+1})`),t.unshift(o),n=n.parentNode}}return t.join(" > ")}function Sn(n){return O(n)?CSS.escape(n):""}const _n=/^<(\w+)\s*\/?>(?:<\/\1>)?$/;function Fn(n){const t=_n.exec(n);if(t)return document.createElement(t[1]);const e=document.createElement("template");return e.innerHTML=n.trim(),Mn(e.content.childNodes)}function Mn(n){return n.length>1?n:n[0]}function On(n,t){return Pn(n)?u(Fn(n)):bn(n,t)}function Pn(n){return O(n)&&rn(n.trim(),"<")}function Cn(n){return hn(n)?Math.ceil(Math.max(0,...On("[stroke]",n).map(t=>t.getTotalLength()))):0}const v={x:y,y,rotate:y,scale:y,color:j,backgroundColor:j,borderColor:j,blur:g,hue:g,fopacity:g,grayscale:g,invert:g,saturate:g,sepia:g,opacity:Nn,stroke:In,bgx:q,bgy:q},{keys:D}=Object;var jn={mixins:[tn],props:Q(D(v),"list"),data:Q(D(v),void 0),computed:{props(n,t){const e={};for(const i in n)i in v&&!s.isUndefined(n[i])&&(e[i]=n[i].slice());const o={};for(const i in e)o[i]=v[i](i,t,e[i],e);return o}},events:{load(){this.$emit()}},methods:{reset(){for(const n in this.getCss(0))s.css(this.$el,n,"")},getCss(n){const t={};for(const e in this.props)this.props[e](t,s.clamp(n));return t.willChange=Object.keys(t).map(s.propName).join(","),t}}};function y(n,t,e){let o=_(e)||{x:"px",y:"px",rotate:"deg"}[n]||"",i;return n==="x"||n==="y"?(n=`translate${s.ucfirst(n)}`,i=r=>s.toFloat(s.toFloat(r).toFixed(o==="px"?0:6))):n==="scale"&&(o="",i=r=>{var a;return _([r])?s.toPx(r,"width",t,!0)/t[`offset${(a=r.endsWith)!=null&&a.call(r,"vh")?"Height":"Width"}`]:s.toFloat(r)}),e.length===1&&e.unshift(n==="scale"?1:0),e=m(e,i),(r,a)=>{r.transform=`${r.transform||""} ${n}(${p(e,a)}${o})`}}function j(n,t,e){return e.length===1&&e.unshift(x(t,n,"")),e=m(e,o=>En(t,o)),(o,i)=>{const[r,a,c]=L(e,i),h=r.map((l,f)=>(l+=c*(a[f]-l),f===3?s.toFloat(l):parseInt(l,10))).join(",");o[n]=`rgba(${h})`}}function En(n,t){return x(n,"color",t).split(/[(),]/g).slice(1,-1).concat(1).slice(0,4).map(s.toFloat)}function g(n,t,e){e.length===1&&e.unshift(0);const o=_(e)||{blur:"px",hue:"deg"}[n]||"%";return n={fopacity:"opacity",hue:"hue-rotate"}[n]||n,e=m(e),(i,r)=>{const a=p(e,r);i.filter=`${i.filter||""} ${n}(${a+o})`}}function Nn(n,t,e){return e.length===1&&e.unshift(x(t,n,"")),e=m(e),(o,i)=>{o[n]=p(e,i)}}function In(n,t,e){e.length===1&&e.unshift(0);const o=_(e),i=Cn(t);return e=m(e.reverse(),r=>(r=s.toFloat(r),o==="%"?r*i/100:r)),e.some(([r])=>r)?(s.css(t,"strokeDasharray",i),(r,a)=>{r.strokeDashoffset=p(e,a)}):s.noop}function q(n,t,e,o){e.length===1&&e.unshift(0);const i=n==="bgy"?"height":"width";o[n]=m(e,c=>s.toPx(c,i,t));const r=["bgx","bgy"].filter(c=>c in o);if(r.length===2&&n==="bgx")return s.noop;if(x(t,"backgroundSize","")==="cover")return zn(n,t,e,o);const a={};for(const c of r)a[c]=H(t,c);return V(r,a,o)}function zn(n,t,e,o){const i=An(t);if(!i.width)return s.noop;const r={width:t.offsetWidth,height:t.offsetHeight},a=["bgx","bgy"].filter(f=>f in o),c={};for(const f of a){const d=o[f].map(([Rn])=>Rn),w=Math.min(...d),N=Math.max(...d),K=d.indexOf(w)<d.indexOf(N),X=N-w;c[f]=`${(K?-X:0)-(K?w:N)}px`,r[f==="bgy"?"height":"width"]+=X}const h=s.Dimensions.cover(i,r);for(const f of a){const d=f==="bgy"?"height":"width",w=h[d]-r[d];c[f]=`max(${H(t,f)},-${w}px) + ${c[f]}`}const l=V(a,c,o);return(f,d)=>{l(f,d),f.backgroundSize=`${h.width}px ${h.height}px`,f.backgroundRepeat="no-repeat"}}function H(n,t){return x(n,`background-position-${t.substr(-1)}`,"")}function V(n,t,e){return function(o,i){for(const r of n){const a=p(e[r],i);o[`background-position-${r.substr(-1)}`]=`calc(${t[r]} + ${a}px)`}}}const B={},S={};function An(n){const t=s.css(n,"backgroundImage").replace(/^none|url\(["']?(.+?)["']?\)$/,"$1");if(S[t])return S[t];const e=new Image;return t&&(e.src=t,!e.naturalWidth&&!B[t])?(s.once(e,"error load",()=>{S[t]=E(e),s.trigger(n,s.createEvent("load",!1))}),B[t]=!0,E(e)):S[t]=E(e)}function E(n){return{width:n.naturalWidth,height:n.naturalHeight}}function m(n,t=s.toFloat){const e=[],{length:o}=n;let i=0;for(let r=0;r<o;r++){let[a,c]=s.isString(n[r])?n[r].trim().split(/ (?![^(]*\))/):[n[r]];if(a=t(a),c=c?s.toFloat(c)/100:null,r===0?c===null?c=0:c&&e.push([a,0]):r===o-1&&(c===null?c=1:c!==1&&(e.push([a,c]),c=1)),e.push([a,c]),c===null)i++;else if(i){const h=e[r-i-1][1],l=(c-h)/(i+1);for(let f=i;f>0;f--)e[r-f][1]=h+l*(i-f+1);i=0}}return e}function L(n,t){const e=s.findIndex(n.slice(1),([,o])=>t<=o)+1;return[n[e-1][0],n[e][0],(t-n[e-1][1])/(n[e][1]-n[e-1][1])]}function p(n,t){const[e,o,i]=L(n,t);return e+Math.abs(e-o)*i*(e<o?1:-1)}const Tn=/^-?\d+(?:\.\d+)?(\S+)?/;function _(n,t){var e;for(const o of n){const i=(e=o.match)==null?void 0:e.call(o,Tn);if(i)return i[1]}return t}function x(n,t,e){const o=n.style[t],i=s.css(s.css(n,t,e),t);return n.style[t]=o,i}function Q(n,t){return n.reduce((e,o)=>(e[o]=t,e),{})}function Wn(n,t){return t>=0?Math.pow(n,t+1):1-Math.pow(1-n,1-t)}var G={mixins:[jn],props:{target:String,viewport:Number,easing:Number,start:String,end:String},data:{target:!1,viewport:1,easing:1,start:0,end:0},computed:{target:({target:n},t)=>J(n&&s.query(n,t)||t),start({start:n}){return s.toPx(n,"height",this.target,!0)},end({end:n,viewport:t}){return s.toPx(n||(t=(1-t)*100)&&`${t}vh+${t}%`,"height",this.target,!0)}},observe:[k(),U({target:({target:n})=>n}),Z({target:({$el:n,target:t})=>[n,t,s.scrollParent(t,!0)]})],update:{read({percent:n},t){if(t.has("scroll")||(n=!1),!s.isVisible(this.$el))return!1;if(!this.matchMedia)return;const e=n;return n=Wn(s.scrolledOver(this.target,this.start,this.end),this.easing),{percent:n,style:e===n?!1:this.getCss(n)}},write({style:n}){if(!this.matchMedia){this.reset();return}n&&s.css(this.$el,n)},events:["scroll","resize"]}};function J(n){return n?"offsetTop"in n?n:J(s.parent(n)):document.documentElement}return typeof window<"u"&&window.UIkit&&window.UIkit.component("parallax",G),G});
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.19.5-dev.66a60877b | https://www.getuikit.com | (c) 2014 - 2024 YOOtheme | MIT License */
1
+ /*! UIkit 3.19.5-dev.74c343fa4 | https://www.getuikit.com | (c) 2014 - 2024 YOOtheme | MIT License */
2
2
 
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
@@ -112,6 +112,12 @@
112
112
  toNodes(element).forEach((element2) => element2.removeAttribute(name));
113
113
  }
114
114
 
115
+ const isVisibleFn = Element.prototype.checkVisibility || function() {
116
+ return this.offsetWidth || this.offsetHeight || this.getClientRects().length;
117
+ };
118
+ function isVisible(element) {
119
+ return toNodes(element).some((element2) => isVisibleFn.call(element2));
120
+ }
115
121
  function parent(element) {
116
122
  var _a;
117
123
  return (_a = toNode(element)) == null ? void 0 : _a.parentElement;
@@ -144,10 +150,7 @@
144
150
  const selectors = [];
145
151
  for (let sel of (_a = selector.match(splitSelectorRe)) != null ? _a : []) {
146
152
  sel = sel.replace(trailingCommaRe, "").trim();
147
- if (sel[0] === ">") {
148
- sel = `:scope ${sel}`;
149
- }
150
- isContextSelector || (isContextSelector = ["!", "+", "~", "-"].includes(sel[0]));
153
+ isContextSelector || (isContextSelector = ["!", "+", "~", "-", ">"].includes(sel[0]));
151
154
  selectors.push(sel);
152
155
  }
153
156
  return {
@@ -156,6 +159,11 @@
156
159
  isContextSelector
157
160
  };
158
161
  });
162
+ const parsePositionSelector = memoize((selector) => {
163
+ selector = selector.substr(1).trim();
164
+ const index2 = selector.indexOf(" ");
165
+ return ~index2 ? [selector.substring(0, index2), selector.substring(index2 + 1)] : [selector, ""];
166
+ });
159
167
  function _query(selector, context = document, queryFn) {
160
168
  if (!selector || !isString(selector)) {
161
169
  return selector;
@@ -167,33 +175,36 @@
167
175
  selector = "";
168
176
  const isSingle = parsed.selectors.length === 1;
169
177
  for (let sel of parsed.selectors) {
178
+ let positionSel;
170
179
  let ctx = context;
171
180
  if (sel[0] === "!") {
172
- const selectors = sel.substr(1).trim().split(" ");
173
- ctx = context.parentElement.closest(selectors[0]);
174
- sel = selectors.slice(1).join(" ").trim();
175
- if (!sel.length && isSingle) {
181
+ [positionSel, sel] = parsePositionSelector(sel);
182
+ ctx = context.parentElement.closest(positionSel);
183
+ if (!sel && isSingle) {
176
184
  return ctx;
177
185
  }
178
186
  }
179
- if (sel[0] === "-") {
180
- const selectors = sel.substr(1).trim().split(" ");
181
- const prev = (ctx || context).previousElementSibling;
182
- ctx = matches(prev, sel.substr(1)) ? prev : null;
183
- sel = selectors.slice(1).join(" ");
184
- if (!sel.length && isSingle) {
187
+ if (ctx && sel[0] === "-") {
188
+ [positionSel, sel] = parsePositionSelector(sel);
189
+ ctx = ctx.previousElementSibling;
190
+ ctx = matches(ctx, positionSel) ? ctx : null;
191
+ if (!sel && isSingle) {
185
192
  return ctx;
186
193
  }
187
- } else if (sel[0] === "~" || sel[0] === "+" && isSingle) {
188
- return _doQuery(
189
- ctx.parentElement,
190
- queryFn,
191
- `:scope :nth-child(${index(ctx) + 1}) ${sel}`
192
- );
193
194
  }
194
- if (ctx) {
195
- selector += `${selector ? "," : ""}${domPath(ctx)} ${sel}`;
195
+ if (!ctx) {
196
+ continue;
196
197
  }
198
+ if (isSingle) {
199
+ if (sel[0] === "~" || sel[0] === "+") {
200
+ sel = `:scope :nth-child(${index(ctx) + 1}) ${sel}`;
201
+ ctx = ctx.parentElement;
202
+ } else if (sel[0] === ">") {
203
+ sel = `:scope ${sel}`;
204
+ }
205
+ return _doQuery(ctx, queryFn, sel);
206
+ }
207
+ selector += `${selector ? "," : ""}${domPath(ctx)} ${sel}`;
197
208
  }
198
209
  if (!isDocument(context)) {
199
210
  context = context.ownerDocument;
@@ -250,10 +261,7 @@
250
261
  }
251
262
 
252
263
  function getMaxPathLength(el) {
253
- return Math.ceil(Math.max(0, ...$$("[stroke]", el).map((stroke) => {
254
- var _a;
255
- return (_a = stroke.getTotalLength) == null ? void 0 : _a.call(stroke);
256
- })));
264
+ return isVisible(el) ? Math.ceil(Math.max(0, ...$$("[stroke]", el).map((stroke) => stroke.getTotalLength()))) : 0;
257
265
  }
258
266
 
259
267
  const props = {
@@ -457,6 +465,7 @@
457
465
  }
458
466
  };
459
467
  }
468
+ const loading = {};
460
469
  const dimensions = {};
461
470
  function getBackgroundImageDimensions(el) {
462
471
  const src = uikitUtil.css(el, "backgroundImage").replace(/^none|url\(["']?(.+?)["']?\)$/, "$1");
@@ -466,11 +475,12 @@
466
475
  const image = new Image();
467
476
  if (src) {
468
477
  image.src = src;
469
- if (!image.naturalWidth) {
470
- image.onload = () => {
478
+ if (!image.naturalWidth && !loading[src]) {
479
+ uikitUtil.once(image, "error load", () => {
471
480
  dimensions[src] = toDimensions(image);
472
481
  uikitUtil.trigger(el, uikitUtil.createEvent("load", false));
473
- };
482
+ });
483
+ loading[src] = true;
474
484
  return toDimensions(image);
475
485
  }
476
486
  }
@@ -1 +1 @@
1
- /*! UIkit 3.19.5-dev.66a60877b | https://www.getuikit.com | (c) 2014 - 2024 YOOtheme | MIT License */(function(s,$){typeof exports=="object"&&typeof module<"u"?module.exports=$(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslider_parallax",["uikit-util"],$):(s=typeof globalThis<"u"?globalThis:s||self,s.UIkitSlider_parallax=$(s.UIkit.util))})(this,function(s){"use strict";var $={props:{media:Boolean},data:{media:!1},connected(){const n=J(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 J(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 K(n,e){var t;return(t=n==null?void 0:n.startsWith)==null?void 0:t.call(n,e)}const{isArray:On,from:X}=Array;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 k(n){return T(n)===9}function N(n){return T(n)>=1}function T(n){return!Z(n)&&C(n)&&n.nodeType}function M(n){return typeof n=="string"}function U(n){return n===void 0}function b(n){return n&&l(n)[0]}function l(n){return N(n)?[n]:Array.from(n||[]).filter(N)}function nn(n){const e=Object.create(null);return(t,...o)=>e[t]||(e[t]=n(t,...o))}function j(n,e,t){var o;if(C(e)){for(const r in e)j(n,r,e[r]);return}if(U(t))return(o=b(n))==null?void 0:o.getAttribute(e);for(const r of l(n))Y(t)&&(t=t.call(r,j(r,e))),t===null?tn(r,e):r.setAttribute(e,t)}function tn(n,e){l(n).forEach(t=>t.removeAttribute(e))}function en(n){var e;return(e=b(n))==null?void 0:e.parentElement}function rn(n,e){return l(n).filter(t=>A(t,e))}function A(n,e){return l(n).some(t=>t.matches(e))}function on(n,e){n=b(n);const t=n?X(n.children):[];return e?rn(t,e):t}function E(n,e){return e?l(n).indexOf(b(e)):on(en(n)).indexOf(n)}function sn(n,e){return l(dn(n,b(e),"querySelectorAll"))}const cn=/([!>+~-])(?=\s+[!>+~-]|\s*$)/g,an=/.*?[^\\](?![^(]*\))(?:,|$)/g,fn=/\s*,$/,un=nn(n=>{var e;n=n.replace(cn,"$1 *");let t=!1;const o=[];for(let r of(e=n.match(an))!=null?e:[])r=r.replace(fn,"").trim(),r[0]===">"&&(r=`:scope ${r}`),t||(t=["!","+","~","-"].includes(r[0])),o.push(r);return{selector:o.join(","),selectors:o,isContextSelector:t}});function dn(n,e=document,t){if(!n||!M(n))return n;const o=un(n);if(!o.isContextSelector)return O(e,t,o.selector);n="";const r=o.selectors.length===1;for(let i of o.selectors){let c=e;if(i[0]==="!"){const a=i.substr(1).trim().split(" ");if(c=e.parentElement.closest(a[0]),i=a.slice(1).join(" ").trim(),!i.length&&r)return c}if(i[0]==="-"){const a=i.substr(1).trim().split(" "),u=(c||e).previousElementSibling;if(c=A(u,i.substr(1))?u:null,i=a.slice(1).join(" "),!i.length&&r)return c}else if(i[0]==="~"||i[0]==="+"&&r)return O(c.parentElement,t,`:scope :nth-child(${E(c)+1}) ${i}`);c&&(n+=`${n?",":""}${ln(c)} ${i}`)}return k(e)||(e=e.ownerDocument),O(e,t,n)}function O(n,e,t){try{return n[e](t)}catch{return null}}function ln(n){const e=[];for(;n.parentNode;){const t=j(n,"id");if(t){e.unshift(`#${hn(t)}`);break}else{let{tagName:o}=n;o!=="HTML"&&(o+=`:nth-child(${E(n)+1})`),e.unshift(o),n=n.parentNode}}return e.join(" > ")}function hn(n){return M(n)?CSS.escape(n):""}const gn=/^<(\w+)\s*\/?>(?:<\/\1>)?$/;function mn(n){const e=gn.exec(n);if(e)return document.createElement(e[1]);const t=document.createElement("template");return t.innerHTML=n.trim(),$n(t.content.childNodes)}function $n(n){return n.length>1?n:n[0]}function bn(n,e){return xn(n)?l(mn(n)):sn(n,e)}function xn(n){return M(n)&&K(n.trim(),"<")}function pn(n){return Math.ceil(Math.max(0,...bn("[stroke]",n).map(e=>{var t;return(t=e.getTotalLength)==null?void 0:t.call(e)})))}const w={x:v,y:v,rotate:v,scale:v,color:P,backgroundColor:P,borderColor:P,blur:g,hue:g,fopacity:g,grayscale:g,invert:g,saturate:g,sepia:g,opacity:vn,stroke:Sn,bgx:D,bgy:D},{keys:W}=Object;var yn={mixins:[$],props:B(W(w),"list"),data:B(W(w),void 0),computed:{props(n,e){const t={};for(const r in n)r in w&&!s.isUndefined(n[r])&&(t[r]=n[r].slice());const o={};for(const r in t)o[r]=w[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={};for(const t in this.props)this.props[t](e,s.clamp(n));return e.willChange=Object.keys(e).map(s.propName).join(","),e}}};function v(n,e,t){let o=F(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=>{var c;return F([i])?s.toPx(i,"width",e,!0)/e[`offset${(c=i.endsWith)!=null&&c.call(i,"vh")?"Height":"Width"}`]:s.toFloat(i)}),t.length===1&&t.unshift(n==="scale"?1:0),t=m(t,r),(i,c)=>{i.transform=`${i.transform||""} ${n}(${x(t,c)}${o})`}}function P(n,e,t){return t.length===1&&t.unshift(p(e,n,"")),t=m(t,o=>wn(e,o)),(o,r)=>{const[i,c,a]=z(t,r),u=i.map((h,f)=>(h+=a*(c[f]-h),f===3?s.toFloat(h):parseInt(h,10))).join(",");o[n]=`rgba(${u})`}}function wn(n,e){return p(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=F(t)||{blur:"px",hue:"deg"}[n]||"%";return n={fopacity:"opacity",hue:"hue-rotate"}[n]||n,t=m(t),(r,i)=>{const c=x(t,i);r.filter=`${r.filter||""} ${n}(${c+o})`}}function vn(n,e,t){return t.length===1&&t.unshift(p(e,n,"")),t=m(t),(o,r)=>{o[n]=x(t,r)}}function Sn(n,e,t){t.length===1&&t.unshift(0);const o=F(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,c)=>{i.strokeDashoffset=x(t,c)}):s.noop}function D(n,e,t,o){t.length===1&&t.unshift(0);const r=n==="bgy"?"height":"width";o[n]=m(t,a=>s.toPx(a,r,e));const i=["bgx","bgy"].filter(a=>a in o);if(i.length===2&&n==="bgx")return s.noop;if(p(e,"backgroundSize","")==="cover")return Fn(n,e,t,o);const c={};for(const a of i)c[a]=H(e,a);return R(i,c,o)}function Fn(n,e,t,o){const r=Cn(e);if(!r.width)return s.noop;const i={width:e.offsetWidth,height:e.offsetHeight},c=["bgx","bgy"].filter(f=>f in o),a={};for(const f of c){const d=o[f].map(([jn])=>jn),y=Math.min(...d),_=Math.max(...d),Q=d.indexOf(y)<d.indexOf(_),G=_-y;a[f]=`${(Q?-G:0)-(Q?y:_)}px`,i[f==="bgy"?"height":"width"]+=G}const u=s.Dimensions.cover(r,i);for(const f of c){const d=f==="bgy"?"height":"width",y=u[d]-i[d];a[f]=`max(${H(e,f)},-${y}px) + ${a[f]}`}const h=R(c,a,o);return(f,d)=>{h(f,d),f.backgroundSize=`${u.width}px ${u.height}px`,f.backgroundRepeat="no-repeat"}}function H(n,e){return p(n,`background-position-${e.substr(-1)}`,"")}function R(n,e,t){return function(o,r){for(const i of n){const c=x(t[i],r);o[`background-position-${i.substr(-1)}`]=`calc(${e[i]} + ${c}px)`}}}const S={};function Cn(n){const e=s.css(n,"backgroundImage").replace(/^none|url\(["']?(.+?)["']?\)$/,"$1");if(S[e])return S[e];const t=new Image;return e&&(t.src=e,!t.naturalWidth)?(t.onload=()=>{S[e]=I(t),s.trigger(n,s.createEvent("load",!1))},I(t)):S[e]=I(t)}function I(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[c,a]=s.isString(n[i])?n[i].trim().split(/ (?![^(]*\))/):[n[i]];if(c=e(c),a=a?s.toFloat(a)/100:null,i===0?a===null?a=0:a&&t.push([c,0]):i===o-1&&(a===null?a=1:a!==1&&(t.push([c,a]),a=1)),t.push([c,a]),a===null)r++;else if(r){const u=t[i-r-1][1],h=(a-u)/(r+1);for(let f=r;f>0;f--)t[i-f][1]=u+h*(r-f+1);r=0}}return t}function z(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 x(n,e){const[t,o,r]=z(n,e);return t+Math.abs(t-o)*r*(t<o?1:-1)}const Mn=/^-?\d+(?:\.\d+)?(\S+)?/;function F(n,e){var t;for(const o of n){const r=(t=o.match)==null?void 0:t.call(o,Mn);if(r)return r[1]}return e}function p(n,e,t){const o=n.style[e],r=s.css(s.css(n,e,t),e);return n.style[e]=o,r}function B(n,e){return n.reduce((t,o)=>(t[o]=e,t),{})}var L={mixins:[yn],beforeConnect(){this.item=this.$el.closest(`.${this.$options.id.replace("parallax","items")} > *`)},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(q(n,r,e)),c=this.getCss(V(n)?.5:r>0?1:0);s.fastdom.write(()=>{s.css(this.$el,i),s.Transition.start(this.$el,c,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(q(n,t,e));s.fastdom.write(()=>s.css(this.$el,o))})}}]};function V(n){return s.endsWith(n,"in")}function q(n,e,t){return t/=2,V(n)^e<0?t:1-t}return typeof window<"u"&&window.UIkit&&window.UIkit.component("sliderParallax",L),L});
1
+ /*! UIkit 3.19.5-dev.74c343fa4 | https://www.getuikit.com | (c) 2014 - 2024 YOOtheme | MIT License */(function(s,$){typeof exports=="object"&&typeof module<"u"?module.exports=$(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslider_parallax",["uikit-util"],$):(s=typeof globalThis<"u"?globalThis:s||self,s.UIkitSlider_parallax=$(s.UIkit.util))})(this,function(s){"use strict";var $={props:{media:Boolean},data:{media:!1},connected(){const n=Y(this.media,this.$el);if(this.matchMedia=!0,n){this.mediaObj=window.matchMedia(n);const t=()=>{this.matchMedia=this.mediaObj.matches,s.trigger(this.$el,s.createEvent("mediachange",!1,!0,[this.mediaObj]))};this.offMediaObj=s.on(this.mediaObj,"change",()=>{t(),this.$emit("resize")}),t()}},disconnected(){var n;(n=this.offMediaObj)==null||n.call(this)}};function Y(n,t){if(s.isString(n)){if(s.startsWith(n,"@"))n=s.toFloat(s.css(t,`--uk-breakpoint-${n.substr(1)}`));else if(isNaN(n))return n}return n&&s.isNumeric(n)?`(min-width: ${n}px)`:""}function Z(n,t){var e;return(e=n==null?void 0:n.startsWith)==null?void 0:e.call(n,t)}const{isArray:Nn,from:k}=Array;function U(n){return typeof n=="function"}function C(n){return n!==null&&typeof n=="object"}function nn(n){return C(n)&&n===n.window}function tn(n){return T(n)===9}function N(n){return T(n)>=1}function T(n){return!nn(n)&&C(n)&&n.nodeType}function M(n){return typeof n=="string"}function en(n){return n===void 0}function b(n){return n&&u(n)[0]}function u(n){return N(n)?[n]:Array.from(n||[]).filter(N)}function W(n){const t=Object.create(null);return(e,...r)=>t[e]||(t[e]=n(e,...r))}function O(n,t,e){var r;if(C(t)){for(const o in t)O(n,o,t[o]);return}if(en(e))return(r=b(n))==null?void 0:r.getAttribute(t);for(const o of u(n))U(e)&&(e=e.call(o,O(o,t))),e===null?rn(o,t):o.setAttribute(t,e)}function rn(n,t){u(n).forEach(e=>e.removeAttribute(t))}const on=Element.prototype.checkVisibility||function(){return this.offsetWidth||this.offsetHeight||this.getClientRects().length};function sn(n){return u(n).some(t=>on.call(t))}function cn(n){var t;return(t=b(n))==null?void 0:t.parentElement}function an(n,t){return u(n).filter(e=>_(e,t))}function _(n,t){return u(n).some(e=>e.matches(t))}function fn(n,t){n=b(n);const e=n?k(n.children):[];return t?an(e,t):e}function A(n,t){return t?u(n).indexOf(b(t)):fn(cn(n)).indexOf(n)}function un(n,t){return u(mn(n,b(t),"querySelectorAll"))}const dn=/([!>+~-])(?=\s+[!>+~-]|\s*$)/g,hn=/.*?[^\\](?![^(]*\))(?:,|$)/g,ln=/\s*,$/,gn=W(n=>{var t;n=n.replace(dn,"$1 *");let e=!1;const r=[];for(let o of(t=n.match(hn))!=null?t:[])o=o.replace(ln,"").trim(),e||(e=["!","+","~","-",">"].includes(o[0])),r.push(o);return{selector:r.join(","),selectors:r,isContextSelector:e}}),D=W(n=>{n=n.substr(1).trim();const t=n.indexOf(" ");return~t?[n.substring(0,t),n.substring(t+1)]:[n,""]});function mn(n,t=document,e){if(!n||!M(n))return n;const r=gn(n);if(!r.isContextSelector)return P(t,e,r.selector);n="";const o=r.selectors.length===1;for(let i of r.selectors){let a,c=t;if(i[0]==="!"&&([a,i]=D(i),c=t.parentElement.closest(a),!i&&o)||c&&i[0]==="-"&&([a,i]=D(i),c=c.previousElementSibling,c=_(c,a)?c:null,!i&&o))return c;if(c){if(o)return i[0]==="~"||i[0]==="+"?(i=`:scope :nth-child(${A(c)+1}) ${i}`,c=c.parentElement):i[0]===">"&&(i=`:scope ${i}`),P(c,e,i);n+=`${n?",":""}${$n(c)} ${i}`}}return tn(t)||(t=t.ownerDocument),P(t,e,n)}function P(n,t,e){try{return n[t](e)}catch{return null}}function $n(n){const t=[];for(;n.parentNode;){const e=O(n,"id");if(e){t.unshift(`#${bn(e)}`);break}else{let{tagName:r}=n;r!=="HTML"&&(r+=`:nth-child(${A(n)+1})`),t.unshift(r),n=n.parentNode}}return t.join(" > ")}function bn(n){return M(n)?CSS.escape(n):""}const xn=/^<(\w+)\s*\/?>(?:<\/\1>)?$/;function pn(n){const t=xn.exec(n);if(t)return document.createElement(t[1]);const e=document.createElement("template");return e.innerHTML=n.trim(),yn(e.content.childNodes)}function yn(n){return n.length>1?n:n[0]}function wn(n,t){return vn(n)?u(pn(n)):un(n,t)}function vn(n){return M(n)&&Z(n.trim(),"<")}function Sn(n){return sn(n)?Math.ceil(Math.max(0,...wn("[stroke]",n).map(t=>t.getTotalLength()))):0}const w={x:v,y:v,rotate:v,scale:v,color:j,backgroundColor:j,borderColor:j,blur:g,hue:g,fopacity:g,grayscale:g,invert:g,saturate:g,sepia:g,opacity:Mn,stroke:On,bgx:R,bgy:R},{keys:H}=Object;var Fn={mixins:[$],props:q(H(w),"list"),data:q(H(w),void 0),computed:{props(n,t){const e={};for(const o in n)o in w&&!s.isUndefined(n[o])&&(e[o]=n[o].slice());const r={};for(const o in e)r[o]=w[o](o,t,e[o],e);return r}},events:{load(){this.$emit()}},methods:{reset(){for(const n in this.getCss(0))s.css(this.$el,n,"")},getCss(n){const t={};for(const e in this.props)this.props[e](t,s.clamp(n));return t.willChange=Object.keys(t).map(s.propName).join(","),t}}};function v(n,t,e){let r=F(e)||{x:"px",y:"px",rotate:"deg"}[n]||"",o;return n==="x"||n==="y"?(n=`translate${s.ucfirst(n)}`,o=i=>s.toFloat(s.toFloat(i).toFixed(r==="px"?0:6))):n==="scale"&&(r="",o=i=>{var a;return F([i])?s.toPx(i,"width",t,!0)/t[`offset${(a=i.endsWith)!=null&&a.call(i,"vh")?"Height":"Width"}`]:s.toFloat(i)}),e.length===1&&e.unshift(n==="scale"?1:0),e=m(e,o),(i,a)=>{i.transform=`${i.transform||""} ${n}(${x(e,a)}${r})`}}function j(n,t,e){return e.length===1&&e.unshift(p(t,n,"")),e=m(e,r=>Cn(t,r)),(r,o)=>{const[i,a,c]=L(e,o),h=i.map((l,f)=>(l+=c*(a[f]-l),f===3?s.toFloat(l):parseInt(l,10))).join(",");r[n]=`rgba(${h})`}}function Cn(n,t){return p(n,"color",t).split(/[(),]/g).slice(1,-1).concat(1).slice(0,4).map(s.toFloat)}function g(n,t,e){e.length===1&&e.unshift(0);const r=F(e)||{blur:"px",hue:"deg"}[n]||"%";return n={fopacity:"opacity",hue:"hue-rotate"}[n]||n,e=m(e),(o,i)=>{const a=x(e,i);o.filter=`${o.filter||""} ${n}(${a+r})`}}function Mn(n,t,e){return e.length===1&&e.unshift(p(t,n,"")),e=m(e),(r,o)=>{r[n]=x(e,o)}}function On(n,t,e){e.length===1&&e.unshift(0);const r=F(e),o=Sn(t);return e=m(e.reverse(),i=>(i=s.toFloat(i),r==="%"?i*o/100:i)),e.some(([i])=>i)?(s.css(t,"strokeDasharray",o),(i,a)=>{i.strokeDashoffset=x(e,a)}):s.noop}function R(n,t,e,r){e.length===1&&e.unshift(0);const o=n==="bgy"?"height":"width";r[n]=m(e,c=>s.toPx(c,o,t));const i=["bgx","bgy"].filter(c=>c in r);if(i.length===2&&n==="bgx")return s.noop;if(p(t,"backgroundSize","")==="cover")return Pn(n,t,e,r);const a={};for(const c of i)a[c]=V(t,c);return z(i,a,r)}function Pn(n,t,e,r){const o=jn(t);if(!o.width)return s.noop;const i={width:t.offsetWidth,height:t.offsetHeight},a=["bgx","bgy"].filter(f=>f in r),c={};for(const f of a){const d=r[f].map(([En])=>En),y=Math.min(...d),E=Math.max(...d),K=d.indexOf(y)<d.indexOf(E),X=E-y;c[f]=`${(K?-X:0)-(K?y:E)}px`,i[f==="bgy"?"height":"width"]+=X}const h=s.Dimensions.cover(o,i);for(const f of a){const d=f==="bgy"?"height":"width",y=h[d]-i[d];c[f]=`max(${V(t,f)},-${y}px) + ${c[f]}`}const l=z(a,c,r);return(f,d)=>{l(f,d),f.backgroundSize=`${h.width}px ${h.height}px`,f.backgroundRepeat="no-repeat"}}function V(n,t){return p(n,`background-position-${t.substr(-1)}`,"")}function z(n,t,e){return function(r,o){for(const i of n){const a=x(e[i],o);r[`background-position-${i.substr(-1)}`]=`calc(${t[i]} + ${a}px)`}}}const B={},S={};function jn(n){const t=s.css(n,"backgroundImage").replace(/^none|url\(["']?(.+?)["']?\)$/,"$1");if(S[t])return S[t];const e=new Image;return t&&(e.src=t,!e.naturalWidth&&!B[t])?(s.once(e,"error load",()=>{S[t]=I(e),s.trigger(n,s.createEvent("load",!1))}),B[t]=!0,I(e)):S[t]=I(e)}function I(n){return{width:n.naturalWidth,height:n.naturalHeight}}function m(n,t=s.toFloat){const e=[],{length:r}=n;let o=0;for(let i=0;i<r;i++){let[a,c]=s.isString(n[i])?n[i].trim().split(/ (?![^(]*\))/):[n[i]];if(a=t(a),c=c?s.toFloat(c)/100:null,i===0?c===null?c=0:c&&e.push([a,0]):i===r-1&&(c===null?c=1:c!==1&&(e.push([a,c]),c=1)),e.push([a,c]),c===null)o++;else if(o){const h=e[i-o-1][1],l=(c-h)/(o+1);for(let f=o;f>0;f--)e[i-f][1]=h+l*(o-f+1);o=0}}return e}function L(n,t){const e=s.findIndex(n.slice(1),([,r])=>t<=r)+1;return[n[e-1][0],n[e][0],(t-n[e-1][1])/(n[e][1]-n[e-1][1])]}function x(n,t){const[e,r,o]=L(n,t);return e+Math.abs(e-r)*o*(e<r?1:-1)}const In=/^-?\d+(?:\.\d+)?(\S+)?/;function F(n,t){var e;for(const r of n){const o=(e=r.match)==null?void 0:e.call(r,In);if(o)return o[1]}return t}function p(n,t,e){const r=n.style[t],o=s.css(s.css(n,t,e),t);return n.style[t]=r,o}function q(n,t){return n.reduce((e,r)=>(e[r]=t,e),{})}var Q={mixins:[Fn],beforeConnect(){this.item=this.$el.closest(`.${this.$options.id.replace("parallax","items")} > *`)},disconnected(){this.item=null},events:[{name:"itemin itemout",self:!0,el(){return this.item},handler({type:n,detail:{percent:t,duration:e,timing:r,dir:o}}){s.fastdom.read(()=>{if(!this.matchMedia)return;const i=this.getCss(J(n,o,t)),a=this.getCss(G(n)?.5:o>0?1:0);s.fastdom.write(()=>{s.css(this.$el,i),s.Transition.start(this.$el,a,e,r).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:t,dir:e}}){s.fastdom.read(()=>{if(!this.matchMedia){this.reset();return}const r=this.getCss(J(n,e,t));s.fastdom.write(()=>s.css(this.$el,r))})}}]};function G(n){return s.endsWith(n,"in")}function J(n,t,e){return e/=2,G(n)^t<0?e:1-e}return typeof window<"u"&&window.UIkit&&window.UIkit.component("sliderParallax",Q),Q});
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.19.5-dev.66a60877b | https://www.getuikit.com | (c) 2014 - 2024 YOOtheme | MIT License */
1
+ /*! UIkit 3.19.5-dev.74c343fa4 | https://www.getuikit.com | (c) 2014 - 2024 YOOtheme | MIT License */
2
2
 
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
@@ -794,6 +794,12 @@
794
794
  toNodes(element).forEach((element2) => element2.removeAttribute(name));
795
795
  }
796
796
 
797
+ const isVisibleFn = Element.prototype.checkVisibility || function() {
798
+ return this.offsetWidth || this.offsetHeight || this.getClientRects().length;
799
+ };
800
+ function isVisible(element) {
801
+ return toNodes(element).some((element2) => isVisibleFn.call(element2));
802
+ }
797
803
  function parent(element) {
798
804
  var _a;
799
805
  return (_a = toNode(element)) == null ? void 0 : _a.parentElement;
@@ -826,10 +832,7 @@
826
832
  const selectors = [];
827
833
  for (let sel of (_a = selector.match(splitSelectorRe)) != null ? _a : []) {
828
834
  sel = sel.replace(trailingCommaRe, "").trim();
829
- if (sel[0] === ">") {
830
- sel = `:scope ${sel}`;
831
- }
832
- isContextSelector || (isContextSelector = ["!", "+", "~", "-"].includes(sel[0]));
835
+ isContextSelector || (isContextSelector = ["!", "+", "~", "-", ">"].includes(sel[0]));
833
836
  selectors.push(sel);
834
837
  }
835
838
  return {
@@ -838,6 +841,11 @@
838
841
  isContextSelector
839
842
  };
840
843
  });
844
+ const parsePositionSelector = memoize((selector) => {
845
+ selector = selector.substr(1).trim();
846
+ const index2 = selector.indexOf(" ");
847
+ return ~index2 ? [selector.substring(0, index2), selector.substring(index2 + 1)] : [selector, ""];
848
+ });
841
849
  function _query(selector, context = document, queryFn) {
842
850
  if (!selector || !isString(selector)) {
843
851
  return selector;
@@ -849,33 +857,36 @@
849
857
  selector = "";
850
858
  const isSingle = parsed.selectors.length === 1;
851
859
  for (let sel of parsed.selectors) {
860
+ let positionSel;
852
861
  let ctx = context;
853
862
  if (sel[0] === "!") {
854
- const selectors = sel.substr(1).trim().split(" ");
855
- ctx = context.parentElement.closest(selectors[0]);
856
- sel = selectors.slice(1).join(" ").trim();
857
- if (!sel.length && isSingle) {
863
+ [positionSel, sel] = parsePositionSelector(sel);
864
+ ctx = context.parentElement.closest(positionSel);
865
+ if (!sel && isSingle) {
858
866
  return ctx;
859
867
  }
860
868
  }
861
- if (sel[0] === "-") {
862
- const selectors = sel.substr(1).trim().split(" ");
863
- const prev = (ctx || context).previousElementSibling;
864
- ctx = matches(prev, sel.substr(1)) ? prev : null;
865
- sel = selectors.slice(1).join(" ");
866
- if (!sel.length && isSingle) {
869
+ if (ctx && sel[0] === "-") {
870
+ [positionSel, sel] = parsePositionSelector(sel);
871
+ ctx = ctx.previousElementSibling;
872
+ ctx = matches(ctx, positionSel) ? ctx : null;
873
+ if (!sel && isSingle) {
867
874
  return ctx;
868
875
  }
869
- } else if (sel[0] === "~" || sel[0] === "+" && isSingle) {
870
- return _doQuery(
871
- ctx.parentElement,
872
- queryFn,
873
- `:scope :nth-child(${index(ctx) + 1}) ${sel}`
874
- );
875
876
  }
876
- if (ctx) {
877
- selector += `${selector ? "," : ""}${domPath(ctx)} ${sel}`;
877
+ if (!ctx) {
878
+ continue;
879
+ }
880
+ if (isSingle) {
881
+ if (sel[0] === "~" || sel[0] === "+") {
882
+ sel = `:scope :nth-child(${index(ctx) + 1}) ${sel}`;
883
+ ctx = ctx.parentElement;
884
+ } else if (sel[0] === ">") {
885
+ sel = `:scope ${sel}`;
886
+ }
887
+ return _doQuery(ctx, queryFn, sel);
878
888
  }
889
+ selector += `${selector ? "," : ""}${domPath(ctx)} ${sel}`;
879
890
  }
880
891
  if (!isDocument(context)) {
881
892
  context = context.ownerDocument;
@@ -932,10 +943,7 @@
932
943
  }
933
944
 
934
945
  function getMaxPathLength(el) {
935
- return Math.ceil(Math.max(0, ...$$("[stroke]", el).map((stroke) => {
936
- var _a;
937
- return (_a = stroke.getTotalLength) == null ? void 0 : _a.call(stroke);
938
- })));
946
+ return isVisible(el) ? Math.ceil(Math.max(0, ...$$("[stroke]", el).map((stroke) => stroke.getTotalLength()))) : 0;
939
947
  }
940
948
 
941
949
  const props = {
@@ -1139,6 +1147,7 @@
1139
1147
  }
1140
1148
  };
1141
1149
  }
1150
+ const loading = {};
1142
1151
  const dimensions = {};
1143
1152
  function getBackgroundImageDimensions(el) {
1144
1153
  const src = util.css(el, "backgroundImage").replace(/^none|url\(["']?(.+?)["']?\)$/, "$1");
@@ -1148,11 +1157,12 @@
1148
1157
  const image = new Image();
1149
1158
  if (src) {
1150
1159
  image.src = src;
1151
- if (!image.naturalWidth) {
1152
- image.onload = () => {
1160
+ if (!image.naturalWidth && !loading[src]) {
1161
+ util.once(image, "error load", () => {
1153
1162
  dimensions[src] = toDimensions(image);
1154
1163
  util.trigger(el, util.createEvent("load", false));
1155
- };
1164
+ });
1165
+ loading[src] = true;
1156
1166
  return toDimensions(image);
1157
1167
  }
1158
1168
  }