uikit 3.16.11-dev.23226dadb → 3.16.11-dev.85cdca725

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 (44) hide show
  1. package/dist/css/uikit-core-rtl.css +1 -1
  2. package/dist/css/uikit-core-rtl.min.css +1 -1
  3. package/dist/css/uikit-core.css +1 -1
  4. package/dist/css/uikit-core.min.css +1 -1
  5. package/dist/css/uikit-rtl.css +1 -1
  6. package/dist/css/uikit-rtl.min.css +1 -1
  7. package/dist/css/uikit.css +1 -1
  8. package/dist/css/uikit.min.css +1 -1
  9. package/dist/js/components/countdown.js +1 -1
  10. package/dist/js/components/countdown.min.js +1 -1
  11. package/dist/js/components/filter.js +1 -1
  12. package/dist/js/components/filter.min.js +1 -1
  13. package/dist/js/components/lightbox-panel.js +491 -7
  14. package/dist/js/components/lightbox-panel.min.js +1 -1
  15. package/dist/js/components/lightbox.js +491 -7
  16. package/dist/js/components/lightbox.min.js +1 -1
  17. package/dist/js/components/notification.js +1 -1
  18. package/dist/js/components/notification.min.js +1 -1
  19. package/dist/js/components/parallax.js +1 -1
  20. package/dist/js/components/parallax.min.js +1 -1
  21. package/dist/js/components/slider-parallax.js +1 -1
  22. package/dist/js/components/slider-parallax.min.js +1 -1
  23. package/dist/js/components/slider.js +1 -1
  24. package/dist/js/components/slider.min.js +1 -1
  25. package/dist/js/components/slideshow-parallax.js +1 -1
  26. package/dist/js/components/slideshow-parallax.min.js +1 -1
  27. package/dist/js/components/slideshow.js +1 -1
  28. package/dist/js/components/slideshow.min.js +1 -1
  29. package/dist/js/components/sortable.js +1 -1
  30. package/dist/js/components/sortable.min.js +1 -1
  31. package/dist/js/components/tooltip.js +1 -1
  32. package/dist/js/components/tooltip.min.js +1 -1
  33. package/dist/js/components/upload.js +1 -1
  34. package/dist/js/components/upload.min.js +1 -1
  35. package/dist/js/uikit-core.js +2 -2
  36. package/dist/js/uikit-core.min.js +1 -1
  37. package/dist/js/uikit-icons.js +1 -1
  38. package/dist/js/uikit-icons.min.js +1 -1
  39. package/dist/js/uikit.js +2 -2
  40. package/dist/js/uikit.min.js +1 -1
  41. package/package.json +1 -1
  42. package/src/js/core/drop.js +1 -1
  43. package/src/js/mixin/modal.js +1 -1
  44. package/src/js/{mixin/internal → util}/scroll.js +5 -1
@@ -1 +1 @@
1
- /*! UIkit 3.16.11-dev.23226dadb | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(t,v){typeof exports=="object"&&typeof module<"u"?module.exports=v(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitlightbox_panel",["uikit-util"],v):(t=typeof globalThis<"u"?globalThis:t||self,t.UIkitLightbox_panel=v(t.UIkit.util))})(this,function(t){"use strict";var v={slide:{show(e){return[{transform:I(e*-100)},{transform:I()}]},percent(e){return U(e)},translate(e,s){return[{transform:I(s*-100*e)},{transform:I(s*100*(1-e))}]}}};function U(e){return Math.abs(t.css(e,"transform").split(",")[4]/e.offsetWidth)||0}function I(e=0,s="%"){return e+=e?s:"",`translate3d(${e}, 0, 0)`}function y(e){return`scale3d(${e}, ${e}, 1)`}var O={...v,fade:{show(){return[{opacity:0},{opacity:1}]},percent(e){return 1-t.css(e,"opacity")},translate(e){return[{opacity:1-e},{opacity:e}]}},scale:{show(){return[{opacity:0,transform:y(1-.2)},{opacity:1,transform:y(1)}]},percent(e){return 1-t.css(e,"opacity")},translate(e){return[{opacity:1-e,transform:y(1-.2*e)},{opacity:e,transform:y(1-.2+.2*e)}]}}},W={connected(){t.addClass(this.$el,this.$options.id)}},q={props:{container:Boolean},data:{container:!0},computed:{container({container:e}){return e===!0&&this.$container||e&&t.$(e)}}},V={props:{cls:Boolean,animation:"list",duration:Number,velocity:Number,origin:String,transition:String},data:{cls:!1,animation:[!1],duration:200,velocity:.2,origin:!1,transition:"ease",clsEnter:"uk-togglabe-enter",clsLeave:"uk-togglabe-leave"},computed:{hasAnimation({animation:e}){return!!e[0]},hasTransition({animation:e}){return["slide","reveal"].some(s=>t.startsWith(e[0],s))}},methods:{toggleElement(e,s,i){return new Promise(n=>Promise.all(t.toNodes(e).map(r=>{const a=t.isBoolean(s)?s:!this.isToggled(r);if(!t.trigger(r,`before${a?"show":"hide"}`,[this]))return Promise.reject();const h=(t.isFunction(i)?i:i===!1||!this.hasAnimation?G:this.hasTransition?X:Y)(r,a,this),o=a?this.clsEnter:this.clsLeave;t.addClass(r,o),t.trigger(r,a?"show":"hide",[this]);const l=()=>{t.removeClass(r,o),t.trigger(r,a?"shown":"hidden",[this])};return h?h.then(l,()=>(t.removeClass(r,o),Promise.reject())):l()})).then(n,t.noop))},isToggled(e=this.$el){return[e]=t.toNodes(e),t.hasClass(e,this.clsEnter)?!0:t.hasClass(e,this.clsLeave)?!1:this.cls?t.hasClass(e,this.cls.split(" ")[0]):t.isVisible(e)},_toggle(e,s){if(!e)return;s=!!s;let i;this.cls?(i=t.includes(this.cls," ")||s!==t.hasClass(e,this.cls),i&&t.toggleClass(e,this.cls,t.includes(this.cls," ")?void 0:s)):(i=s===e.hidden,i&&(e.hidden=!s)),t.$$("[autofocus]",e).some(n=>t.isVisible(n)?n.focus()||!0:n.blur()),i&&t.trigger(e,"toggled",[s,this])}}};function G(e,s,{_toggle:i}){return t.Animation.cancel(e),t.Transition.cancel(e),i(e,s)}async function X(e,s,{animation:i,duration:n,velocity:r,transition:a,_toggle:h}){var o;const[l="reveal",c="top"]=((o=i[0])==null?void 0:o.split("-"))||[],d=[["left","right"],["top","bottom"]],p=d[t.includes(d[0],c)?0:1],g=p[1]===c,T=["width","height"][d.indexOf(p)],b=`margin-${p[0]}`,A=`margin-${c}`;let $=t.dimensions(e)[T];const ge=t.Transition.inProgress(e);await t.Transition.cancel(e),s&&h(e,!0);const ue=Object.fromEntries(["padding","border","width","height","minWidth","minHeight","overflowY","overflowX",b,A].map(z=>[z,e.style[z]])),k=t.dimensions(e),D=t.toFloat(t.css(e,b)),H=t.toFloat(t.css(e,A)),u=k[T]+H;!ge&&!s&&($+=H);const[E]=t.wrapInner(e,"<div>");t.css(E,{boxSizing:"border-box",height:k.height,width:k.width,...t.css(e,["overflow","padding","borderTop","borderRight","borderBottom","borderLeft","borderImage",A])}),t.css(e,{padding:0,border:0,minWidth:0,minHeight:0,[A]:0,width:k.width,height:k.height,overflow:"hidden",[T]:$});const j=$/u;n=(r*u+n)*(s?1-j:j);const R={[T]:s?u:0};g&&(t.css(e,b,u-$+D),R[b]=s?D:u+D),!g^l==="reveal"&&(t.css(E,b,-u+$),t.Transition.start(E,{[b]:s?0:-u},n,a));try{await t.Transition.start(e,R,n,a)}finally{t.css(e,ue),t.unwrap(E.firstChild),s||h(e,!1)}}function Y(e,s,i){t.Animation.cancel(e);const{animation:n,duration:r,_toggle:a}=i;return s?(a(e,!0),t.Animation.in(e,n[0],r,i.origin)):t.Animation.out(e,n[1]||n[0],r,i.origin).then(()=>a(e,!1))}let _;function J(e){const s=t.on(e,"touchmove",n=>{if(n.targetTouches.length!==1||t.matches(n.target,'input[type="range"'))return;let[{scrollHeight:r,clientHeight:a}]=t.scrollParents(n.target);a>=r&&n.cancelable&&n.preventDefault()},{passive:!1});if(_)return s;_=!0;const{scrollingElement:i}=document;return t.css(i,{overflowY:CSS.supports("overflow","clip")?"clip":"hidden",touchAction:"none",paddingRight:t.width(window)-i.clientWidth||""}),()=>{_=!1,s(),t.css(i,{overflowY:"",touchAction:"",paddingRight:""})}}const m=[];var K={mixins:[W,q,V],props:{selPanel:String,selClose:String,escClose:Boolean,bgClose:Boolean,stack:Boolean,role:String},data:{cls:"uk-open",escClose:!0,bgClose:!0,overlay:!0,stack:!1,role:"dialog"},computed:{panel({selPanel:e},s){return t.$(e,s)},transitionElement(){return this.panel},bgClose({bgClose:e}){return e&&this.panel}},connected(){t.attr(this.panel||this.$el,"role",this.role),this.overlay&&t.attr(this.panel||this.$el,"aria-modal",!0)},beforeDisconnect(){t.includes(m,this)&&this.toggleElement(this.$el,!1,!1)},events:[{name:"click",delegate(){return`${this.selClose},a[href*="#"]`},handler(e){const{current:s,defaultPrevented:i}=e,{hash:n}=s;!i&&n&&t.isSameSiteAnchor(s)&&!t.within(n,this.$el)&&t.$(n,document.body)?this.hide():t.matches(s,this.selClose)&&(e.preventDefault(),this.hide())}},{name:"toggle",self:!0,handler(e){e.defaultPrevented||(e.preventDefault(),this.isToggled()===t.includes(m,this)&&this.toggle())}},{name:"beforeshow",self:!0,handler(e){if(t.includes(m,this))return!1;!this.stack&&m.length?(Promise.all(m.map(s=>s.hide())).then(this.show),e.preventDefault()):m.push(this)}},{name:"show",self:!0,handler(){this.stack&&t.css(this.$el,"zIndex",t.toFloat(t.css(this.$el,"zIndex"))+m.length);const e=[this.overlay&&Z(this),this.overlay&&J(this.$el),this.bgClose&&ee(this),this.escClose&&te(this)];t.once(this.$el,"hidden",()=>e.forEach(s=>s&&s()),{self:!0}),t.addClass(document.documentElement,this.clsPage)}},{name:"shown",self:!0,handler(){t.isFocusable(this.$el)||t.attr(this.$el,"tabindex","-1"),t.matches(this.$el,":focus-within")||this.$el.focus()}},{name:"hidden",self:!0,handler(){t.includes(m,this)&&m.splice(m.indexOf(this),1),t.css(this.$el,"zIndex",""),m.some(e=>e.clsPage===this.clsPage)||t.removeClass(document.documentElement,this.clsPage)}}],methods:{toggle(){return this.isToggled()?this.hide():this.show()},show(){return this.container&&t.parent(this.$el)!==this.container?(t.append(this.container,this.$el),new Promise(e=>requestAnimationFrame(()=>this.show().then(e)))):this.toggleElement(this.$el,!0,B)},hide(){return this.toggleElement(this.$el,!1,B)}}};function B(e,s,{transitionElement:i,_toggle:n}){return new Promise((r,a)=>t.once(e,"show hide",()=>{var h;(h=e._reject)==null||h.call(e),e._reject=a,n(e,s);const o=t.once(i,"transitionstart",()=>{t.once(i,"transitionend transitioncancel",r,{self:!0}),clearTimeout(l)},{self:!0}),l=setTimeout(()=>{o(),r()},Q(t.css(i,"transitionDuration")))})).then(()=>delete e._reject)}function Q(e){return e?t.endsWith(e,"ms")?t.toFloat(e):t.toFloat(e)*1e3:0}function Z(e){return t.on(document,"focusin",s=>{t.last(m)===e&&!t.within(s.target,e.$el)&&e.$el.focus()})}function ee(e){return t.on(document,t.pointerDown,({target:s})=>{t.last(m)!==e||e.overlay&&!t.within(s,e.$el)||t.within(s,e.panel)||t.once(document,`${t.pointerUp} ${t.pointerCancel} scroll`,({defaultPrevented:i,type:n,target:r})=>{!i&&n===t.pointerUp&&s===r&&e.hide()},!0)})}function te(e){return t.on(document,"keydown",s=>{s.keyCode===27&&t.last(m)===e&&e.hide()})}function se(e,s,i,{animation:n,easing:r}){const{percent:a,translate:h,show:o=t.noop}=n,l=o(i),c=new t.Deferred;return{dir:i,show(d,p=0,g){const x=g?"linear":r;return d-=Math.round(d*t.clamp(p,-1,1)),this.translate(p),C(s,"itemin",{percent:p,duration:d,timing:x,dir:i}),C(e,"itemout",{percent:1-p,duration:d,timing:x,dir:i}),Promise.all([t.Transition.start(s,l[1],d,x),t.Transition.start(e,l[0],d,x)]).then(()=>{this.reset(),c.resolve()},t.noop),c.promise},cancel(){t.Transition.cancel([s,e])},reset(){for(const d in l[0])t.css([s,e],d,"")},forward(d,p=this.percent()){return t.Transition.cancel([s,e]),this.show(d,p,!0)},translate(d){this.reset();const p=h(d,i);t.css(s,p[1]),t.css(e,p[0]),C(s,"itemtranslatein",{percent:d,dir:i}),C(e,"itemtranslateout",{percent:1-d,dir:i})},percent(){return a(e||s,s,i)},getDistance(){return e==null?void 0:e.offsetWidth}}}function C(e,s,i){t.trigger(e,t.createEvent(s,!1,!1,i))}var ie={props:{i18n:Object},data:{i18n:null},methods:{t(e,...s){var i,n,r;let a=0;return((r=((i=this.i18n)==null?void 0:i[e])||((n=this.$options.i18n)==null?void 0:n[e]))==null?void 0:r.replace(/%s/g,()=>s[a++]||""))||""}}};const f={TAB:9,ESC:27,SPACE:32,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40};function P(e,s=e.$el,i=""){if(s.id)return s.id;let n=`${e.$options.id}-${e._uid}${i}`;return t.$(`#${n}`)&&(n=P(e,s,`${i}-2`)),n}var ne={i18n:{next:"Next slide",previous:"Previous slide",slideX:"Slide %s",slideLabel:"%s of %s",role:"String"},data:{selNav:!1,role:"region"},computed:{nav({selNav:e},s){return t.$(e,s)},navChildren(){return t.children(this.nav)},selNavItem({attrItem:e}){return`[${e}],[data-${e}]`},navItems(e,s){return t.$$(this.selNavItem,s)}},watch:{nav(e,s){t.attr(e,"role","tablist"),s&&this.$emit()},list(e){t.attr(e,"role","presentation")},navChildren(e){t.attr(e,"role","presentation")},navItems(e){for(const s of e){const i=t.data(s,this.attrItem),n=t.$("a,button",s)||s;let r,a=null;if(t.isNumeric(i)){const h=t.toNumber(i),o=this.slides[h];o&&(o.id||(o.id=P(this,o,`-item-${i}`)),a=o.id),r=this.t("slideX",t.toFloat(i)+1),t.attr(n,"role","tab")}else this.list&&(this.list.id||(this.list.id=P(this,this.list,"-items")),a=this.list.id),r=this.t(i);t.attr(n,{"aria-controls":a,"aria-label":t.attr(n,"aria-label")||r})}},slides(e){e.forEach((s,i)=>t.attr(s,{role:this.nav?"tabpanel":"group","aria-label":this.t("slideLabel",i+1,this.length),"aria-roledescription":this.nav?null:"slide"}))},length(e){const s=this.navChildren.length;if(this.nav&&e!==s){t.empty(this.nav);for(let i=0;i<e;i++)t.append(this.nav,`<li ${this.attrItem}="${i}"><a href></a></li>`)}}},connected(){t.attr(this.$el,{role:this.role,ariaRoleDescription:"carousel"})},update:[{write(){this.navItems.concat(this.nav).forEach(e=>e&&(e.hidden=!this.maxIndex)),this.updateNav()},events:["resize"]}],events:[{name:"click keydown",delegate(){return this.selNavItem},handler(e){t.closest(e.target,"a,button")&&(e.type==="click"||e.keyCode===f.SPACE)&&(e.preventDefault(),this.show(t.data(e.current,this.attrItem)))}},{name:"itemshow",handler:"updateNav"},{name:"keydown",delegate(){return this.selNavItem},handler(e){const{current:s,keyCode:i}=e,n=t.data(s,this.attrItem);if(!t.isNumeric(n))return;let r=i===f.HOME?0:i===f.END?"last":i===f.LEFT?"previous":i===f.RIGHT?"next":-1;~r&&(e.preventDefault(),this.show(r))}}],methods:{updateNav(){const e=this.getValidIndex();let s,i;for(const n of this.navItems){const r=t.data(n,this.attrItem),a=t.$("a,button",n)||n;if(t.isNumeric(r)){const o=t.toNumber(r)===e;t.toggleClass(n,this.clsActive,o),t.attr(a,{"aria-selected":o,tabindex:o?null:-1}),o&&(i=a),s=s||t.matches(a,":focus")}else t.toggleClass(n,"uk-invisible",this.finite&&(r==="previous"&&e===0||r==="next"&&e>=this.maxIndex));s&&i&&i.focus()}}}};const S={passive:!1,capture:!0},L={passive:!0,capture:!0},re="touchstart mousedown",N="touchmove mousemove",M="touchend touchcancel mouseup click input scroll";var oe={props:{draggable:Boolean},data:{draggable:!0,threshold:10},created(){for(const e of["start","move","end"]){const s=this[e];this[e]=i=>{const n=t.getEventPos(i).x*(t.isRtl?-1:1);this.prevPos=n===this.pos?this.prevPos:this.pos,this.pos=n,s(i)}}},events:[{name:re,passive:!0,delegate(){return`${this.selList} > *`},handler(e){!this.draggable||!t.isTouch(e)&&ae(e.target)||t.closest(e.target,t.selInput)||e.button>0||this.length<2||this.start(e)}},{name:"dragstart",handler(e){e.preventDefault()}},{name:N,el(){return this.list},handler:t.noop,...S}],methods:{start(){this.drag=this.pos,this._transitioner?(this.percent=this._transitioner.percent(),this.drag+=this._transitioner.getDistance()*this.percent*this.dir,this._transitioner.cancel(),this._transitioner.translate(this.percent),this.dragging=!0,this.stack=[]):this.prevIndex=this.index,t.on(document,N,this.move,S),t.on(document,M,this.end,L),t.css(this.list,"userSelect","none")},move(e){const s=this.pos-this.drag;if(s===0||this.prevPos===this.pos||!this.dragging&&Math.abs(s)<this.threshold)return;t.css(this.list,"pointerEvents","none"),e.cancelable&&e.preventDefault(),this.dragging=!0,this.dir=s<0?1:-1;const{slides:i}=this;let{prevIndex:n}=this,r=Math.abs(s),a=this.getIndex(n+this.dir,n),h=this._getDistance(n,a)||i[n].offsetWidth;for(;a!==n&&r>h;)this.drag-=h*this.dir,n=a,r-=h,a=this.getIndex(n+this.dir,n),h=this._getDistance(n,a)||i[n].offsetWidth;this.percent=r/h;const o=i[n],l=i[a],c=this.index!==a,d=n===a;let p;[this.index,this.prevIndex].filter(g=>!t.includes([a,n],g)).forEach(g=>{t.trigger(i[g],"itemhidden",[this]),d&&(p=!0,this.prevIndex=n)}),(this.index===n&&this.prevIndex!==n||p)&&t.trigger(i[this.index],"itemshown",[this]),c&&(this.prevIndex=n,this.index=a,!d&&t.trigger(o,"beforeitemhide",[this]),t.trigger(l,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),o,!d&&l),c&&(!d&&t.trigger(o,"itemhide",[this]),t.trigger(l,"itemshow",[this]))},end(){if(t.off(document,N,this.move,S),t.off(document,M,this.end,L),this.dragging)if(this.dragging=null,this.index===this.prevIndex)this.percent=1-this.percent,this.dir*=-1,this._show(!1,this.index,!0),this._transitioner=null;else{const e=(t.isRtl?this.dir*(t.isRtl?1:-1):this.dir)<0==this.prevPos>this.pos;this.index=e?this.index:this.prevIndex,e&&(this.percent=1-this.percent),this.show(this.dir>0&&!e||this.dir<0&&e?"next":"previous",!0)}t.css(this.list,{userSelect:"",pointerEvents:""}),this.drag=this.percent=null}}};function ae(e){return t.css(e,"userSelect")!=="none"&&t.toNodes(e.childNodes).some(s=>s.nodeType===3&&s.textContent.trim())}var he={props:{autoplay:Boolean,autoplayInterval:Number,pauseOnHover:Boolean},data:{autoplay:!1,autoplayInterval:7e3,pauseOnHover:!0},connected(){t.attr(this.list,"aria-live",this.autoplay?"off":"polite"),this.autoplay&&this.startAutoplay()},disconnected(){this.stopAutoplay()},update(){t.attr(this.slides,"tabindex","-1")},events:[{name:"visibilitychange",el(){return document},filter(){return this.autoplay},handler(){document.hidden?this.stopAutoplay():this.startAutoplay()}}],methods:{startAutoplay(){this.stopAutoplay(),this.interval=setInterval(()=>{this.stack.length||this.draggable&&t.matches(this.$el,":focus-within")||this.pauseOnHover&&t.matches(this.$el,":hover")||this.show("next")},this.autoplayInterval)},stopAutoplay(){clearInterval(this.interval)}}};function de(e){return ce(t.observeResize,e,"resize")}function ce(e,s,i){return{observe:e,handler(){this.$emit(i)},...s}}var le={mixins:[he,oe,ne,ie],props:{clsActivated:Boolean,easing:String,index:Number,finite:Boolean,velocity:Number},data:()=>({easing:"ease",finite:!1,velocity:1,index:0,prevIndex:-1,stack:[],percent:0,clsActive:"uk-active",clsActivated:!1,Transitioner:!1,transitionOptions:{}}),connected(){this.prevIndex=-1,this.index=this.getValidIndex(this.$props.index),this.stack=[]},disconnected(){t.removeClass(this.slides,this.clsActive)},computed:{duration({velocity:e},s){return me(s.offsetWidth/e)},list({selList:e},s){return t.$(e,s)},maxIndex(){return this.length-1},slides(){return t.children(this.list)},length(){return this.slides.length}},watch:{slides(e,s){s&&this.$emit()}},observe:de(),methods:{show(e,s=!1){var i;if(this.dragging||!this.length)return;const{stack:n}=this,r=s?0:n.length,a=()=>{n.splice(r,1),n.length&&this.show(n.shift(),!0)};if(n[s?"unshift":"push"](e),!s&&n.length>1){n.length===2&&((i=this._transitioner)==null||i.forward(Math.min(this.duration,200)));return}const h=this.getIndex(this.index),o=t.hasClass(this.slides,this.clsActive)&&this.slides[h],l=this.getIndex(e,this.index),c=this.slides[l];if(o===c){a();return}if(this.dir=pe(e,h),this.prevIndex=h,this.index=l,o&&!t.trigger(o,"beforeitemhide",[this])||!t.trigger(c,"beforeitemshow",[this,o])){this.index=this.prevIndex,a();return}const d=this._show(o,c,s).then(()=>{o&&t.trigger(o,"itemhidden",[this]),t.trigger(c,"itemshown",[this]),n.shift(),this._transitioner=null,requestAnimationFrame(()=>n.length&&this.show(n.shift(),!0))});return o&&t.trigger(o,"itemhide",[this]),t.trigger(c,"itemshow",[this]),d},getIndex(e=this.index,s=this.index){return t.clamp(t.getIndex(e,this.slides,s,this.finite),0,Math.max(0,this.maxIndex))},getValidIndex(e=this.index,s=this.prevIndex){return this.getIndex(e,s)},_show(e,s,i){if(this._transitioner=this._getTransitioner(e,s,this.dir,{easing:i?s.offsetWidth<600?"cubic-bezier(0.25, 0.46, 0.45, 0.94)":"cubic-bezier(0.165, 0.84, 0.44, 1)":this.easing,...this.transitionOptions}),!i&&!e)return this._translate(1),Promise.resolve();const{length:n}=this.stack;return this._transitioner[n>1?"forward":"show"](n>1?Math.min(this.duration,75+75/(n-1)):this.duration,this.percent)},_getDistance(e,s){return this._getTransitioner(e,e!==s&&s).getDistance()},_translate(e,s=this.prevIndex,i=this.index){const n=this._getTransitioner(s===i?!1:s,i);return n.translate(e),n},_getTransitioner(e=this.prevIndex,s=this.index,i=this.dir||1,n=this.transitionOptions){return new this.Transitioner(t.isNumber(e)?this.slides[e]:e,t.isNumber(s)?this.slides[s]:s,i*(t.isRtl?-1:1),n)}}};function pe(e,s){return e==="next"?1:e==="previous"||e<s?-1:1}function me(e){return .5*e+300}var fe={mixins:[le],props:{animation:String},data:{animation:"slide",clsActivated:"uk-transition-active",Animations:v,Transitioner:se},computed:{animation({animation:e,Animations:s}){return{...s[e]||s.slide,name:e}},transitionOptions(){return{animation:this.animation}}},events:{beforeitemshow({target:e}){t.addClass(e,this.clsActive)},itemshown({target:e}){t.addClass(e,this.clsActivated)},itemhidden({target:e}){t.removeClass(e,this.clsActive,this.clsActivated)}}},F={mixins:[K,fe],functional:!0,props:{delayControls:Number,preload:Number,videoAutoplay:Boolean,template:String},data:()=>({preload:1,videoAutoplay:!1,delayControls:3e3,items:[],cls:"uk-open",clsPage:"uk-lightbox-page",selList:".uk-lightbox-items",attrItem:"uk-lightbox-item",selClose:".uk-close-large",selCaption:".uk-lightbox-caption",pauseOnHover:!1,velocity:2,Animations:O,template:'<div class="uk-lightbox uk-overflow-hidden"> <ul class="uk-lightbox-items"></ul> <div class="uk-lightbox-toolbar uk-position-top uk-text-right uk-transition-slide-top uk-transition-opaque"> <button class="uk-lightbox-toolbar-icon uk-close-large" type="button" uk-close></button> </div> <a class="uk-lightbox-button uk-position-center-left uk-position-medium uk-transition-fade" href uk-slidenav-previous uk-lightbox-item="previous"></a> <a class="uk-lightbox-button uk-position-center-right uk-position-medium uk-transition-fade" href uk-slidenav-next uk-lightbox-item="next"></a> <div class="uk-lightbox-toolbar uk-lightbox-caption uk-position-bottom uk-text-center uk-transition-slide-bottom uk-transition-opaque"></div> </div>'}),created(){const e=t.$(this.template),s=t.$(this.selList,e);this.items.forEach(()=>t.append(s,"<li>"));const i=t.$("[uk-close]",e),n=this.t("close");i&&n&&(i.dataset.i18n=JSON.stringify({label:n})),this.$mount(t.append(this.container,e))},computed:{caption({selCaption:e},s){return t.$(e,s)}},events:[{name:`${t.pointerMove} ${t.pointerDown} keydown`,handler:"showControls"},{name:"click",self:!0,delegate(){return`${this.selList} > *`},handler(e){e.defaultPrevented||this.hide()}},{name:"shown",self:!0,handler(){this.showControls()}},{name:"hide",self:!0,handler(){this.hideControls(),t.removeClass(this.slides,this.clsActive),t.Transition.stop(this.slides)}},{name:"hidden",self:!0,handler(){this.$destroy(!0)}},{name:"keyup",el(){return document},handler({keyCode:e}){if(!this.isToggled(this.$el)||!this.draggable)return;let s=-1;e===f.LEFT?s="previous":e===f.RIGHT?s="next":e===f.HOME?s=0:e===f.END&&(s="last"),~s&&this.show(s)}},{name:"beforeitemshow",handler(e){this.isToggled()||(this.draggable=!1,e.preventDefault(),this.toggleElement(this.$el,!0,!1),this.animation=O.scale,t.removeClass(e.target,this.clsActive),this.stack.splice(1,0,this.index))}},{name:"itemshow",handler(){t.html(this.caption,this.getItem().caption||"");for(let e=-this.preload;e<=this.preload;e++)this.loadItem(this.index+e)}},{name:"itemshown",handler(){this.draggable=this.$props.draggable}},{name:"itemload",async handler(e,s){const{source:i,type:n,alt:r="",poster:a,attrs:h={}}=s;if(this.setItem(s,"<span uk-spinner></span>"),!i)return;let o;const l={allowfullscreen:"",style:"max-width: 100%; box-sizing: border-box;","uk-responsive":"","uk-video":`${this.videoAutoplay}`};if(n==="image"||i.match(/\.(avif|jpe?g|jfif|a?png|gif|svg|webp)($|\?)/i)){const c=w("img",{src:i,alt:r,...h});t.on(c,"load",()=>this.setItem(s,c)),t.on(c,"error",()=>this.setError(s))}else if(n==="video"||i.match(/\.(mp4|webm|ogv)($|\?)/i)){const c=w("video",{src:i,poster:a,controls:"",playsinline:"","uk-video":`${this.videoAutoplay}`,...h});t.on(c,"loadedmetadata",()=>this.setItem(s,c)),t.on(c,"error",()=>this.setError(s))}else if(n==="iframe"||i.match(/\.(html|php)($|\?)/i))this.setItem(s,w("iframe",{src:i,allowfullscreen:"",class:"uk-lightbox-iframe",...h}));else if(o=i.match(/\/\/(?:.*?youtube(-nocookie)?\..*?(?:[?&]v=|\/shorts\/)|youtu\.be\/)([\w-]{11})[&?]?(.*)?/))this.setItem(s,w("iframe",{src:`https://www.youtube${o[1]||""}.com/embed/${o[2]}${o[3]?`?${o[3]}`:""}`,width:1920,height:1080,...l,...h}));else if(o=i.match(/\/\/.*?vimeo\.[a-z]+\/(\d+)[&?]?(.*)?/))try{const{height:c,width:d}=await(await fetch(`https://vimeo.com/api/oembed.json?maxwidth=1920&url=${encodeURI(i)}`,{credentials:"omit"})).json();this.setItem(s,w("iframe",{src:`https://player.vimeo.com/video/${o[1]}${o[2]?`?${o[2]}`:""}`,width:d,height:c,...l,...h}))}catch{this.setError(s)}}}],methods:{loadItem(e=this.index){const s=this.getItem(e);this.getSlide(s).childElementCount||t.trigger(this.$el,"itemload",[s])},getItem(e=this.index){return this.items[t.getIndex(e,this.slides)]},setItem(e,s){t.trigger(this.$el,"itemloaded",[this,t.html(this.getSlide(e),s)])},getSlide(e){return this.slides[this.items.indexOf(e)]},setError(e){this.setItem(e,'<span uk-icon="icon: bolt; ratio: 2"></span>')},showControls(){clearTimeout(this.controlsTimer),this.controlsTimer=setTimeout(this.hideControls,this.delayControls),t.addClass(this.$el,"uk-active","uk-transition-active")},hideControls(){t.removeClass(this.$el,"uk-active","uk-transition-active")}}};function w(e,s){const i=t.fragment(`<${e}>`);return t.attr(i,s),i}return typeof window<"u"&&window.UIkit&&window.UIkit.component("lightboxPanel",F),F});
1
+ /*! UIkit 3.16.11-dev.85cdca725 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(s,y){typeof exports=="object"&&typeof module<"u"?module.exports=y(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitlightbox_panel",["uikit-util"],y):(s=typeof globalThis<"u"?globalThis:s||self,s.UIkitLightbox_panel=y(s.UIkit.util))})(this,function(s){"use strict";var y={slide:{show(t){return[{transform:S(t*-100)},{transform:S()}]},percent(t){return yt(t)},translate(t,e){return[{transform:S(e*-100*t)},{transform:S(e*100*(1-t))}]}}};function yt(t){return Math.abs(s.css(t,"transform").split(",")[4]/t.offsetWidth)||0}function S(t=0,e="%"){return t+=t?e:"",`translate3d(${t}, 0, 0)`}function _(t){return`scale3d(${t}, ${t}, 1)`}var et={...y,fade:{show(){return[{opacity:0},{opacity:1}]},percent(t){return 1-s.css(t,"opacity")},translate(t){return[{opacity:1-t},{opacity:t}]}},scale:{show(){return[{opacity:0,transform:_(1-.2)},{opacity:1,transform:_(1)}]},percent(t){return 1-s.css(t,"opacity")},translate(t){return[{opacity:1-t,transform:_(1-.2*t)},{opacity:t,transform:_(1-.2+.2*t)}]}}},kt={connected(){s.addClass(this.$el,this.$options.id)}},It={props:{container:Boolean},data:{container:!0},computed:{container({container:t}){return t===!0&&this.$container||t&&s.$(t)}}},Ct={props:{cls:Boolean,animation:"list",duration:Number,velocity:Number,origin:String,transition:String},data:{cls:!1,animation:[!1],duration:200,velocity:.2,origin:!1,transition:"ease",clsEnter:"uk-togglabe-enter",clsLeave:"uk-togglabe-leave"},computed:{hasAnimation({animation:t}){return!!t[0]},hasTransition({animation:t}){return["slide","reveal"].some(e=>s.startsWith(t[0],e))}},methods:{toggleElement(t,e,i){return new Promise(n=>Promise.all(s.toNodes(t).map(r=>{const o=s.isBoolean(e)?e:!this.isToggled(r);if(!s.trigger(r,`before${o?"show":"hide"}`,[this]))return Promise.reject();const a=(s.isFunction(i)?i:i===!1||!this.hasAnimation?At:this.hasTransition?Tt:Et)(r,o,this),h=o?this.clsEnter:this.clsLeave;s.addClass(r,h),s.trigger(r,o?"show":"hide",[this]);const l=()=>{s.removeClass(r,h),s.trigger(r,o?"shown":"hidden",[this])};return a?a.then(l,()=>(s.removeClass(r,h),Promise.reject())):l()})).then(n,s.noop))},isToggled(t=this.$el){return[t]=s.toNodes(t),s.hasClass(t,this.clsEnter)?!0:s.hasClass(t,this.clsLeave)?!1:this.cls?s.hasClass(t,this.cls.split(" ")[0]):s.isVisible(t)},_toggle(t,e){if(!t)return;e=!!e;let i;this.cls?(i=s.includes(this.cls," ")||e!==s.hasClass(t,this.cls),i&&s.toggleClass(t,this.cls,s.includes(this.cls," ")?void 0:e)):(i=e===t.hidden,i&&(t.hidden=!e)),s.$$("[autofocus]",t).some(n=>s.isVisible(n)?n.focus()||!0:n.blur()),i&&s.trigger(t,"toggled",[e,this])}}};function At(t,e,{_toggle:i}){return s.Animation.cancel(t),s.Transition.cancel(t),i(t,e)}async function Tt(t,e,{animation:i,duration:n,velocity:r,transition:o,_toggle:a}){var h;const[l="reveal",c="top"]=((h=i[0])==null?void 0:h.split("-"))||[],d=[["left","right"],["top","bottom"]],u=d[s.includes(d[0],c)?0:1],w=u[1]===c,B=["width","height"][d.indexOf(u)],I=`margin-${u[0]}`,M=`margin-${c}`;let E=s.dimensions(t)[B];const Se=s.Transition.inProgress(t);await s.Transition.cancel(t),e&&a(t,!0);const _e=Object.fromEntries(["padding","border","width","height","minWidth","minHeight","overflowY","overflowX",I,M].map($t=>[$t,t.style[$t]])),N=s.dimensions(t),tt=s.toFloat(s.css(t,I)),bt=s.toFloat(s.css(t,M)),$=N[B]+bt;!Se&&!e&&(E+=bt);const[F]=s.wrapInner(t,"<div>");s.css(F,{boxSizing:"border-box",height:N.height,width:N.width,...s.css(t,["overflow","padding","borderTop","borderRight","borderBottom","borderLeft","borderImage",M])}),s.css(t,{padding:0,border:0,minWidth:0,minHeight:0,[M]:0,width:N.width,height:N.height,overflow:"hidden",[B]:E});const wt=E/$;n=(r*$+n)*(e?1-wt:wt);const xt={[B]:e?$:0};w&&(s.css(t,I,$-E+tt),xt[I]=e?tt:$+tt),!w^l==="reveal"&&(s.css(F,I,-$+E),s.Transition.start(F,{[I]:e?0:-$},n,o));try{await s.Transition.start(t,xt,n,o)}finally{s.css(t,_e),s.unwrap(F.firstChild),e||a(t,!1)}}function Et(t,e,i){s.Animation.cancel(t);const{animation:n,duration:r,_toggle:o}=i;return e?(o(t,!0),s.Animation.in(t,n[0],r,i.origin)):s.Animation.out(t,n[1]||n[0],r,i.origin).then(()=>o(t,!1))}const Nt=/\B([A-Z])/g,St=k(t=>t.replace(Nt,"-$1").toLowerCase()),z=k(t=>t.charAt(0).toUpperCase()+t.slice(1));function st(t,e){var i;return(i=t==null?void 0:t.startsWith)==null?void 0:i.call(t,e)}function _t(t,e){var i;return(i=t==null?void 0:t.includes)==null?void 0:i.call(t,e)}function Pt(t,e){var i;return(i=t==null?void 0:t.findIndex)==null?void 0:i.call(t,e)}const{isArray:W,from:Pe}=Array;function R(t){return typeof t=="function"}function P(t){return t!==null&&typeof t=="object"}function C(t){return P(t)&&t===t.window}function it(t){return U(t)===9}function nt(t){return U(t)>=1}function H(t){return U(t)===1}function U(t){return!C(t)&&P(t)&&t.nodeType}function x(t){return typeof t=="string"}function rt(t){return typeof t=="number"}function Dt(t){return rt(t)||x(t)&&!isNaN(t-parseFloat(t))}function j(t){return t===void 0}function v(t){return parseFloat(t)||0}function g(t){return m(t)[0]}function m(t){return nt(t)?[t]:Array.from(t||[]).filter(nt)}function V(t){if(C(t))return t;t=g(t);const e=it(t)?t:t==null?void 0:t.ownerDocument;return(e==null?void 0:e.defaultView)||window}function ot(t,e){for(const i in t)if(e(t[i],i)===!1)return!1;return!0}function Ot(t,e){return t.reduce((i,n)=>i+v(R(e)?e(n):n[e]),0)}function k(t){const e=Object.create(null);return i=>e[i]||(e[i]=t(i))}function q(t,e,i){var n;if(P(e)){for(const r in e)q(t,r,e[r]);return}if(j(i))return(n=g(t))==null?void 0:n.getAttribute(e);for(const r of m(t))R(i)&&(i=i.call(r,q(r,e))),i===null?Lt(r,e):r.setAttribute(e,i)}function Lt(t,e){m(t).forEach(i=>i.removeAttribute(e))}function X(t){var e;return(e=g(t))==null?void 0:e.parentElement}function Bt(t,e){return m(t).filter(i=>D(i,e))}function D(t,e){return m(t).some(i=>i.matches(e))}function O(t,e){return H(t)?t.closest(st(e,">")?e.slice(1):e):m(t).map(i=>O(i,e)).filter(Boolean)}function Mt(t,e){return x(e)?!!O(t,e):g(e).contains(g(t))}function Ft(t,e){const i=[];for(;t=X(t);)(!e||D(t,e))&&i.push(t);return i}function zt(t,e){t=g(t);const i=t?m(t.children):[];return e?Bt(i,e):i}function Wt(t,e){return e?m(t).indexOf(g(e)):zt(X(t)).indexOf(t)}function at(t,e){return m(Vt(t,g(e),"querySelectorAll"))}const Rt=/(^|[^\\],)\s*[!>+~-]/,Ht=k(t=>t.match(Rt)),Ut=/([!>+~-])(?=\s+[!>+~-]|\s*$)/g,jt=k(t=>t.replace(Ut,"$1 *"));function Vt(t,e=document,i){if(!t||!x(t))return t;if(t=jt(t),Ht(t)){const n=Xt(t);t="";for(let r of n){let o=e;if(r[0]==="!"){const a=r.substr(1).trim().split(" ");if(o=O(X(e),a[0]),r=a.slice(1).join(" ").trim(),!r.length&&n.length===1)return o}if(r[0]==="-"){const a=r.substr(1).trim().split(" "),h=(o||e).previousElementSibling;o=D(h,r.substr(1))?h:null,r=a.slice(1).join(" ")}o&&(t+=`${t?",":""}${Yt(o)} ${r}`)}e=document}try{return e[i](t)}catch{return null}}const qt=/.*?[^\\](?:,|$)/g,Xt=k(t=>t.match(qt).map(e=>e.replace(/,$/,"").trim()));function Yt(t){const e=[];for(;t.parentNode;){const i=q(t,"id");if(i){e.unshift(`#${Gt(i)}`);break}else{let{tagName:n}=t;n!=="HTML"&&(n+=`:nth-child(${Wt(t)+1})`),e.unshift(n),t=t.parentNode}}return e.join(" > ")}function Gt(t){return x(t)?CSS.escape(t):""}function Jt(...t){let[e,i,n,r,o=!1]=ht(t);r.length>1&&(r=Qt(r)),o!=null&&o.self&&(r=te(r)),n&&(r=Kt(n,r));for(const a of i)for(const h of e)h.addEventListener(a,r,o);return()=>Zt(e,i,r,o)}function Zt(...t){let[e,i,,n,r=!1]=ht(t);for(const o of i)for(const a of e)a.removeEventListener(o,n,r)}function ht(t){return t[0]=se(t[0]),x(t[1])&&(t[1]=t[1].split(" ")),R(t[2])&&t.splice(2,0,!1),t}function Kt(t,e){return i=>{const n=t[0]===">"?at(t,i.currentTarget).reverse().filter(r=>Mt(i.target,r))[0]:O(i.target,t);n&&(i.current=n,e.call(this,i),delete i.current)}}function Qt(t){return e=>W(e.detail)?t(e,...e.detail):t(e)}function te(t){return function(e){if(e.target===e.currentTarget||e.target===e.current)return t.call(null,e)}}function ct(t){return t&&"addEventListener"in t}function ee(t){return ct(t)?t:g(t)}function se(t){return W(t)?t.map(ee).filter(Boolean):x(t)?at(t):ct(t)?[t]:m(t)}const ie={"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 f(t,e,i,n){const r=m(t);for(const o of r)if(x(e)){if(e=ne(e),j(i))return getComputedStyle(o).getPropertyValue(e);o.style.setProperty(e,Dt(i)&&!ie[e]?`${i}px`:i||rt(i)?i:"",n)}else if(W(e)){const a={};for(const h of e)a[h]=f(o,h);return a}else P(e)&&(n=i,ot(e,(a,h)=>f(o,h,a,n)));return r[0]}const ne=k(t=>re(t));function re(t){if(st(t,"--"))return t;t=St(t);const{style:e}=document.documentElement;if(t in e)return t;for(const i of["webkit","moz"]){const n=`-${i}-${t}`;if(n in e)return n}}const Y={width:["left","right"],height:["top","bottom"]};function oe(t){const e=H(t)?g(t).getBoundingClientRect():{height:he(t),width:dt(t),top:0,left:0};return{height:e.height,width:e.width,top:e.top,left:e.left,bottom:e.top+e.height,right:e.left+e.width}}function G(t,e){const i=oe(t);if(t){const{scrollY:r,scrollX:o}=V(t),a={height:r,width:o};for(const h in Y)for(const l of Y[h])i[l]+=a[h]}if(!e)return i;const n=f(t,"position");ot(f(t,["left","top"]),(r,o)=>f(t,o,e[o]-i[o]+v(n==="absolute"&&r==="auto"?ae(t)[o]:r)))}function ae(t){let{top:e,left:i}=G(t);const{ownerDocument:{body:n,documentElement:r},offsetParent:o}=g(t);let a=o||r;for(;a&&(a===n||a===r)&&f(a,"position")==="static";)a=a.parentNode;if(H(a)){const h=G(a);e-=h.top+v(f(a,"borderTopWidth")),i-=h.left+v(f(a,"borderLeftWidth"))}return{top:e-v(f(t,"marginTop")),left:i-v(f(t,"marginLeft"))}}const he=lt("height"),dt=lt("width");function lt(t){const e=z(t);return(i,n)=>{if(j(n)){if(C(i))return i[`inner${e}`];if(it(i)){const r=i.documentElement;return Math.max(r[`offset${e}`],r[`scroll${e}`])}return i=g(i),n=f(i,t),n=n==="auto"?i[`offset${e}`]:v(n)||0,n-ft(i,t)}else return f(i,t,!n&&n!==0?"":+n+ft(i,t)+"px")}}function ft(t,e,i="border-box"){return f(t,"boxSizing")===i?Ot(Y[e].map(z),n=>v(f(t,`padding${n}`))+v(f(t,`border${n}Width`))):0}function ce(t,e=!1,i=[]){const n=ut(t);let r=Ft(t).reverse();r=r.slice(r.indexOf(n)+1);const o=Pt(r,a=>f(a,"position")==="fixed");return~o&&(r=r.slice(o)),[n].concat(r.filter(a=>f(a,"overflow").split(" ").some(h=>_t(["auto","scroll",...i],h))&&(!e||a.scrollHeight>de(a).height))).reverse()}function de(t){const e=V(t),{visualViewport:i,document:{documentElement:n}}=e;let r=t===ut(t)?e:t;if(C(r)&&i){let{height:a,width:h,scale:l,pageTop:c,pageLeft:d}=i;return a=Math.round(a*l),h=Math.round(h*l),{height:a,width:h,top:c,left:d,bottom:c+a,right:d+h}}let o=G(r);if(f(r,"display")==="inline")return o;for(let[a,h,l,c]of[["width","x","left","right"],["height","y","top","bottom"]])C(r)?r=n:o[l]+=v(f(r,`border-${l}-width`)),o[a]=o[h]=r[`client${z(a)}`],o[c]=o[a]+o[l];return o}function ut(t){return V(t).document.scrollingElement}let J;function le(t){const e=Jt(t,"touchmove",n=>{if(n.targetTouches.length!==1||D(n.target,'input[type="range"'))return;let[{scrollHeight:r,clientHeight:o}]=ce(n.target);o>=r&&n.cancelable&&n.preventDefault()},{passive:!1});if(J)return e;J=!0;const{scrollingElement:i}=document;return f(i,{overflowY:CSS.supports("overflow","clip")?"clip":"hidden",touchAction:"none",paddingRight:dt(window)-i.clientWidth||""}),()=>{J=!1,e(),f(i,{overflowY:"",touchAction:"",paddingRight:""})}}const p=[];var fe={mixins:[kt,It,Ct],props:{selPanel:String,selClose:String,escClose:Boolean,bgClose:Boolean,stack:Boolean,role:String},data:{cls:"uk-open",escClose:!0,bgClose:!0,overlay:!0,stack:!1,role:"dialog"},computed:{panel({selPanel:t},e){return s.$(t,e)},transitionElement(){return this.panel},bgClose({bgClose:t}){return t&&this.panel}},connected(){s.attr(this.panel||this.$el,"role",this.role),this.overlay&&s.attr(this.panel||this.$el,"aria-modal",!0)},beforeDisconnect(){s.includes(p,this)&&this.toggleElement(this.$el,!1,!1)},events:[{name:"click",delegate(){return`${this.selClose},a[href*="#"]`},handler(t){const{current:e,defaultPrevented:i}=t,{hash:n}=e;!i&&n&&s.isSameSiteAnchor(e)&&!s.within(n,this.$el)&&s.$(n,document.body)?this.hide():s.matches(e,this.selClose)&&(t.preventDefault(),this.hide())}},{name:"toggle",self:!0,handler(t){t.defaultPrevented||(t.preventDefault(),this.isToggled()===s.includes(p,this)&&this.toggle())}},{name:"beforeshow",self:!0,handler(t){if(s.includes(p,this))return!1;!this.stack&&p.length?(Promise.all(p.map(e=>e.hide())).then(this.show),t.preventDefault()):p.push(this)}},{name:"show",self:!0,handler(){this.stack&&s.css(this.$el,"zIndex",s.toFloat(s.css(this.$el,"zIndex"))+p.length);const t=[this.overlay&&pe(this),this.overlay&&le(this.$el),this.bgClose&&ge(this),this.escClose&&me(this)];s.once(this.$el,"hidden",()=>t.forEach(e=>e&&e()),{self:!0}),s.addClass(document.documentElement,this.clsPage)}},{name:"shown",self:!0,handler(){s.isFocusable(this.$el)||s.attr(this.$el,"tabindex","-1"),s.matches(this.$el,":focus-within")||this.$el.focus()}},{name:"hidden",self:!0,handler(){s.includes(p,this)&&p.splice(p.indexOf(this),1),s.css(this.$el,"zIndex",""),p.some(t=>t.clsPage===this.clsPage)||s.removeClass(document.documentElement,this.clsPage)}}],methods:{toggle(){return this.isToggled()?this.hide():this.show()},show(){return this.container&&s.parent(this.$el)!==this.container?(s.append(this.container,this.$el),new Promise(t=>requestAnimationFrame(()=>this.show().then(t)))):this.toggleElement(this.$el,!0,pt)},hide(){return this.toggleElement(this.$el,!1,pt)}}};function pt(t,e,{transitionElement:i,_toggle:n}){return new Promise((r,o)=>s.once(t,"show hide",()=>{var a;(a=t._reject)==null||a.call(t),t._reject=o,n(t,e);const h=s.once(i,"transitionstart",()=>{s.once(i,"transitionend transitioncancel",r,{self:!0}),clearTimeout(l)},{self:!0}),l=setTimeout(()=>{h(),r()},ue(s.css(i,"transitionDuration")))})).then(()=>delete t._reject)}function ue(t){return t?s.endsWith(t,"ms")?s.toFloat(t):s.toFloat(t)*1e3:0}function pe(t){return s.on(document,"focusin",e=>{s.last(p)===t&&!s.within(e.target,t.$el)&&t.$el.focus()})}function ge(t){return s.on(document,s.pointerDown,({target:e})=>{s.last(p)!==t||t.overlay&&!s.within(e,t.$el)||s.within(e,t.panel)||s.once(document,`${s.pointerUp} ${s.pointerCancel} scroll`,({defaultPrevented:i,type:n,target:r})=>{!i&&n===s.pointerUp&&e===r&&t.hide()},!0)})}function me(t){return s.on(document,"keydown",e=>{e.keyCode===27&&s.last(p)===t&&t.hide()})}function ve(t,e,i,{animation:n,easing:r}){const{percent:o,translate:a,show:h=s.noop}=n,l=h(i),c=new s.Deferred;return{dir:i,show(d,u=0,w){const T=w?"linear":r;return d-=Math.round(d*s.clamp(u,-1,1)),this.translate(u),L(e,"itemin",{percent:u,duration:d,timing:T,dir:i}),L(t,"itemout",{percent:1-u,duration:d,timing:T,dir:i}),Promise.all([s.Transition.start(e,l[1],d,T),s.Transition.start(t,l[0],d,T)]).then(()=>{this.reset(),c.resolve()},s.noop),c.promise},cancel(){s.Transition.cancel([e,t])},reset(){for(const d in l[0])s.css([e,t],d,"")},forward(d,u=this.percent()){return s.Transition.cancel([e,t]),this.show(d,u,!0)},translate(d){this.reset();const u=a(d,i);s.css(e,u[1]),s.css(t,u[0]),L(e,"itemtranslatein",{percent:d,dir:i}),L(t,"itemtranslateout",{percent:1-d,dir:i})},percent(){return o(t||e,e,i)},getDistance(){return t==null?void 0:t.offsetWidth}}}function L(t,e,i){s.trigger(t,s.createEvent(e,!1,!1,i))}var be={props:{i18n:Object},data:{i18n:null},methods:{t(t,...e){var i,n,r;let o=0;return((r=((i=this.i18n)==null?void 0:i[t])||((n=this.$options.i18n)==null?void 0:n[t]))==null?void 0:r.replace(/%s/g,()=>e[o++]||""))||""}}};const b={TAB:9,ESC:27,SPACE:32,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40};function Z(t,e=t.$el,i=""){if(e.id)return e.id;let n=`${t.$options.id}-${t._uid}${i}`;return s.$(`#${n}`)&&(n=Z(t,e,`${i}-2`)),n}var we={i18n:{next:"Next slide",previous:"Previous slide",slideX:"Slide %s",slideLabel:"%s of %s",role:"String"},data:{selNav:!1,role:"region"},computed:{nav({selNav:t},e){return s.$(t,e)},navChildren(){return s.children(this.nav)},selNavItem({attrItem:t}){return`[${t}],[data-${t}]`},navItems(t,e){return s.$$(this.selNavItem,e)}},watch:{nav(t,e){s.attr(t,"role","tablist"),e&&this.$emit()},list(t){s.attr(t,"role","presentation")},navChildren(t){s.attr(t,"role","presentation")},navItems(t){for(const e of t){const i=s.data(e,this.attrItem),n=s.$("a,button",e)||e;let r,o=null;if(s.isNumeric(i)){const a=s.toNumber(i),h=this.slides[a];h&&(h.id||(h.id=Z(this,h,`-item-${i}`)),o=h.id),r=this.t("slideX",s.toFloat(i)+1),s.attr(n,"role","tab")}else this.list&&(this.list.id||(this.list.id=Z(this,this.list,"-items")),o=this.list.id),r=this.t(i);s.attr(n,{"aria-controls":o,"aria-label":s.attr(n,"aria-label")||r})}},slides(t){t.forEach((e,i)=>s.attr(e,{role:this.nav?"tabpanel":"group","aria-label":this.t("slideLabel",i+1,this.length),"aria-roledescription":this.nav?null:"slide"}))},length(t){const e=this.navChildren.length;if(this.nav&&t!==e){s.empty(this.nav);for(let i=0;i<t;i++)s.append(this.nav,`<li ${this.attrItem}="${i}"><a href></a></li>`)}}},connected(){s.attr(this.$el,{role:this.role,ariaRoleDescription:"carousel"})},update:[{write(){this.navItems.concat(this.nav).forEach(t=>t&&(t.hidden=!this.maxIndex)),this.updateNav()},events:["resize"]}],events:[{name:"click keydown",delegate(){return this.selNavItem},handler(t){s.closest(t.target,"a,button")&&(t.type==="click"||t.keyCode===b.SPACE)&&(t.preventDefault(),this.show(s.data(t.current,this.attrItem)))}},{name:"itemshow",handler:"updateNav"},{name:"keydown",delegate(){return this.selNavItem},handler(t){const{current:e,keyCode:i}=t,n=s.data(e,this.attrItem);if(!s.isNumeric(n))return;let r=i===b.HOME?0:i===b.END?"last":i===b.LEFT?"previous":i===b.RIGHT?"next":-1;~r&&(t.preventDefault(),this.show(r))}}],methods:{updateNav(){const t=this.getValidIndex();let e,i;for(const n of this.navItems){const r=s.data(n,this.attrItem),o=s.$("a,button",n)||n;if(s.isNumeric(r)){const h=s.toNumber(r)===t;s.toggleClass(n,this.clsActive,h),s.attr(o,{"aria-selected":h,tabindex:h?null:-1}),h&&(i=o),e=e||s.matches(o,":focus")}else s.toggleClass(n,"uk-invisible",this.finite&&(r==="previous"&&t===0||r==="next"&&t>=this.maxIndex));e&&i&&i.focus()}}}};const K={passive:!1,capture:!0},gt={passive:!0,capture:!0},xe="touchstart mousedown",Q="touchmove mousemove",mt="touchend touchcancel mouseup click input scroll";var $e={props:{draggable:Boolean},data:{draggable:!0,threshold:10},created(){for(const t of["start","move","end"]){const e=this[t];this[t]=i=>{const n=s.getEventPos(i).x*(s.isRtl?-1:1);this.prevPos=n===this.pos?this.prevPos:this.pos,this.pos=n,e(i)}}},events:[{name:xe,passive:!0,delegate(){return`${this.selList} > *`},handler(t){!this.draggable||!s.isTouch(t)&&ye(t.target)||s.closest(t.target,s.selInput)||t.button>0||this.length<2||this.start(t)}},{name:"dragstart",handler(t){t.preventDefault()}},{name:Q,el(){return this.list},handler:s.noop,...K}],methods:{start(){this.drag=this.pos,this._transitioner?(this.percent=this._transitioner.percent(),this.drag+=this._transitioner.getDistance()*this.percent*this.dir,this._transitioner.cancel(),this._transitioner.translate(this.percent),this.dragging=!0,this.stack=[]):this.prevIndex=this.index,s.on(document,Q,this.move,K),s.on(document,mt,this.end,gt),s.css(this.list,"userSelect","none")},move(t){const e=this.pos-this.drag;if(e===0||this.prevPos===this.pos||!this.dragging&&Math.abs(e)<this.threshold)return;s.css(this.list,"pointerEvents","none"),t.cancelable&&t.preventDefault(),this.dragging=!0,this.dir=e<0?1:-1;const{slides:i}=this;let{prevIndex:n}=this,r=Math.abs(e),o=this.getIndex(n+this.dir,n),a=this._getDistance(n,o)||i[n].offsetWidth;for(;o!==n&&r>a;)this.drag-=a*this.dir,n=o,r-=a,o=this.getIndex(n+this.dir,n),a=this._getDistance(n,o)||i[n].offsetWidth;this.percent=r/a;const h=i[n],l=i[o],c=this.index!==o,d=n===o;let u;[this.index,this.prevIndex].filter(w=>!s.includes([o,n],w)).forEach(w=>{s.trigger(i[w],"itemhidden",[this]),d&&(u=!0,this.prevIndex=n)}),(this.index===n&&this.prevIndex!==n||u)&&s.trigger(i[this.index],"itemshown",[this]),c&&(this.prevIndex=n,this.index=o,!d&&s.trigger(h,"beforeitemhide",[this]),s.trigger(l,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),h,!d&&l),c&&(!d&&s.trigger(h,"itemhide",[this]),s.trigger(l,"itemshow",[this]))},end(){if(s.off(document,Q,this.move,K),s.off(document,mt,this.end,gt),this.dragging)if(this.dragging=null,this.index===this.prevIndex)this.percent=1-this.percent,this.dir*=-1,this._show(!1,this.index,!0),this._transitioner=null;else{const t=(s.isRtl?this.dir*(s.isRtl?1:-1):this.dir)<0==this.prevPos>this.pos;this.index=t?this.index:this.prevIndex,t&&(this.percent=1-this.percent),this.show(this.dir>0&&!t||this.dir<0&&t?"next":"previous",!0)}s.css(this.list,{userSelect:"",pointerEvents:""}),this.drag=this.percent=null}}};function ye(t){return s.css(t,"userSelect")!=="none"&&s.toNodes(t.childNodes).some(e=>e.nodeType===3&&e.textContent.trim())}var ke={props:{autoplay:Boolean,autoplayInterval:Number,pauseOnHover:Boolean},data:{autoplay:!1,autoplayInterval:7e3,pauseOnHover:!0},connected(){s.attr(this.list,"aria-live",this.autoplay?"off":"polite"),this.autoplay&&this.startAutoplay()},disconnected(){this.stopAutoplay()},update(){s.attr(this.slides,"tabindex","-1")},events:[{name:"visibilitychange",el(){return document},filter(){return this.autoplay},handler(){document.hidden?this.stopAutoplay():this.startAutoplay()}}],methods:{startAutoplay(){this.stopAutoplay(),this.interval=setInterval(()=>{this.stack.length||this.draggable&&s.matches(this.$el,":focus-within")||this.pauseOnHover&&s.matches(this.$el,":hover")||this.show("next")},this.autoplayInterval)},stopAutoplay(){clearInterval(this.interval)}}};function Ie(t){return Ce(s.observeResize,t,"resize")}function Ce(t,e,i){return{observe:t,handler(){this.$emit(i)},...e}}var Ae={mixins:[ke,$e,we,be],props:{clsActivated:Boolean,easing:String,index:Number,finite:Boolean,velocity:Number},data:()=>({easing:"ease",finite:!1,velocity:1,index:0,prevIndex:-1,stack:[],percent:0,clsActive:"uk-active",clsActivated:!1,Transitioner:!1,transitionOptions:{}}),connected(){this.prevIndex=-1,this.index=this.getValidIndex(this.$props.index),this.stack=[]},disconnected(){s.removeClass(this.slides,this.clsActive)},computed:{duration({velocity:t},e){return Ee(e.offsetWidth/t)},list({selList:t},e){return s.$(t,e)},maxIndex(){return this.length-1},slides(){return s.children(this.list)},length(){return this.slides.length}},watch:{slides(t,e){e&&this.$emit()}},observe:Ie(),methods:{show(t,e=!1){var i;if(this.dragging||!this.length)return;const{stack:n}=this,r=e?0:n.length,o=()=>{n.splice(r,1),n.length&&this.show(n.shift(),!0)};if(n[e?"unshift":"push"](t),!e&&n.length>1){n.length===2&&((i=this._transitioner)==null||i.forward(Math.min(this.duration,200)));return}const a=this.getIndex(this.index),h=s.hasClass(this.slides,this.clsActive)&&this.slides[a],l=this.getIndex(t,this.index),c=this.slides[l];if(h===c){o();return}if(this.dir=Te(t,a),this.prevIndex=a,this.index=l,h&&!s.trigger(h,"beforeitemhide",[this])||!s.trigger(c,"beforeitemshow",[this,h])){this.index=this.prevIndex,o();return}const d=this._show(h,c,e).then(()=>{h&&s.trigger(h,"itemhidden",[this]),s.trigger(c,"itemshown",[this]),n.shift(),this._transitioner=null,requestAnimationFrame(()=>n.length&&this.show(n.shift(),!0))});return h&&s.trigger(h,"itemhide",[this]),s.trigger(c,"itemshow",[this]),d},getIndex(t=this.index,e=this.index){return s.clamp(s.getIndex(t,this.slides,e,this.finite),0,Math.max(0,this.maxIndex))},getValidIndex(t=this.index,e=this.prevIndex){return this.getIndex(t,e)},_show(t,e,i){if(this._transitioner=this._getTransitioner(t,e,this.dir,{easing:i?e.offsetWidth<600?"cubic-bezier(0.25, 0.46, 0.45, 0.94)":"cubic-bezier(0.165, 0.84, 0.44, 1)":this.easing,...this.transitionOptions}),!i&&!t)return this._translate(1),Promise.resolve();const{length:n}=this.stack;return this._transitioner[n>1?"forward":"show"](n>1?Math.min(this.duration,75+75/(n-1)):this.duration,this.percent)},_getDistance(t,e){return this._getTransitioner(t,t!==e&&e).getDistance()},_translate(t,e=this.prevIndex,i=this.index){const n=this._getTransitioner(e===i?!1:e,i);return n.translate(t),n},_getTransitioner(t=this.prevIndex,e=this.index,i=this.dir||1,n=this.transitionOptions){return new this.Transitioner(s.isNumber(t)?this.slides[t]:t,s.isNumber(e)?this.slides[e]:e,i*(s.isRtl?-1:1),n)}}};function Te(t,e){return t==="next"?1:t==="previous"||t<e?-1:1}function Ee(t){return .5*t+300}var Ne={mixins:[Ae],props:{animation:String},data:{animation:"slide",clsActivated:"uk-transition-active",Animations:y,Transitioner:ve},computed:{animation({animation:t,Animations:e}){return{...e[t]||e.slide,name:t}},transitionOptions(){return{animation:this.animation}}},events:{beforeitemshow({target:t}){s.addClass(t,this.clsActive)},itemshown({target:t}){s.addClass(t,this.clsActivated)},itemhidden({target:t}){s.removeClass(t,this.clsActive,this.clsActivated)}}},vt={mixins:[fe,Ne],functional:!0,props:{delayControls:Number,preload:Number,videoAutoplay:Boolean,template:String},data:()=>({preload:1,videoAutoplay:!1,delayControls:3e3,items:[],cls:"uk-open",clsPage:"uk-lightbox-page",selList:".uk-lightbox-items",attrItem:"uk-lightbox-item",selClose:".uk-close-large",selCaption:".uk-lightbox-caption",pauseOnHover:!1,velocity:2,Animations:et,template:'<div class="uk-lightbox uk-overflow-hidden"> <ul class="uk-lightbox-items"></ul> <div class="uk-lightbox-toolbar uk-position-top uk-text-right uk-transition-slide-top uk-transition-opaque"> <button class="uk-lightbox-toolbar-icon uk-close-large" type="button" uk-close></button> </div> <a class="uk-lightbox-button uk-position-center-left uk-position-medium uk-transition-fade" href uk-slidenav-previous uk-lightbox-item="previous"></a> <a class="uk-lightbox-button uk-position-center-right uk-position-medium uk-transition-fade" href uk-slidenav-next uk-lightbox-item="next"></a> <div class="uk-lightbox-toolbar uk-lightbox-caption uk-position-bottom uk-text-center uk-transition-slide-bottom uk-transition-opaque"></div> </div>'}),created(){const t=s.$(this.template),e=s.$(this.selList,t);this.items.forEach(()=>s.append(e,"<li>"));const i=s.$("[uk-close]",t),n=this.t("close");i&&n&&(i.dataset.i18n=JSON.stringify({label:n})),this.$mount(s.append(this.container,t))},computed:{caption({selCaption:t},e){return s.$(t,e)}},events:[{name:`${s.pointerMove} ${s.pointerDown} keydown`,handler:"showControls"},{name:"click",self:!0,delegate(){return`${this.selList} > *`},handler(t){t.defaultPrevented||this.hide()}},{name:"shown",self:!0,handler(){this.showControls()}},{name:"hide",self:!0,handler(){this.hideControls(),s.removeClass(this.slides,this.clsActive),s.Transition.stop(this.slides)}},{name:"hidden",self:!0,handler(){this.$destroy(!0)}},{name:"keyup",el(){return document},handler({keyCode:t}){if(!this.isToggled(this.$el)||!this.draggable)return;let e=-1;t===b.LEFT?e="previous":t===b.RIGHT?e="next":t===b.HOME?e=0:t===b.END&&(e="last"),~e&&this.show(e)}},{name:"beforeitemshow",handler(t){this.isToggled()||(this.draggable=!1,t.preventDefault(),this.toggleElement(this.$el,!0,!1),this.animation=et.scale,s.removeClass(t.target,this.clsActive),this.stack.splice(1,0,this.index))}},{name:"itemshow",handler(){s.html(this.caption,this.getItem().caption||"");for(let t=-this.preload;t<=this.preload;t++)this.loadItem(this.index+t)}},{name:"itemshown",handler(){this.draggable=this.$props.draggable}},{name:"itemload",async handler(t,e){const{source:i,type:n,alt:r="",poster:o,attrs:a={}}=e;if(this.setItem(e,"<span uk-spinner></span>"),!i)return;let h;const l={allowfullscreen:"",style:"max-width: 100%; box-sizing: border-box;","uk-responsive":"","uk-video":`${this.videoAutoplay}`};if(n==="image"||i.match(/\.(avif|jpe?g|jfif|a?png|gif|svg|webp)($|\?)/i)){const c=A("img",{src:i,alt:r,...a});s.on(c,"load",()=>this.setItem(e,c)),s.on(c,"error",()=>this.setError(e))}else if(n==="video"||i.match(/\.(mp4|webm|ogv)($|\?)/i)){const c=A("video",{src:i,poster:o,controls:"",playsinline:"","uk-video":`${this.videoAutoplay}`,...a});s.on(c,"loadedmetadata",()=>this.setItem(e,c)),s.on(c,"error",()=>this.setError(e))}else if(n==="iframe"||i.match(/\.(html|php)($|\?)/i))this.setItem(e,A("iframe",{src:i,allowfullscreen:"",class:"uk-lightbox-iframe",...a}));else if(h=i.match(/\/\/(?:.*?youtube(-nocookie)?\..*?(?:[?&]v=|\/shorts\/)|youtu\.be\/)([\w-]{11})[&?]?(.*)?/))this.setItem(e,A("iframe",{src:`https://www.youtube${h[1]||""}.com/embed/${h[2]}${h[3]?`?${h[3]}`:""}`,width:1920,height:1080,...l,...a}));else if(h=i.match(/\/\/.*?vimeo\.[a-z]+\/(\d+)[&?]?(.*)?/))try{const{height:c,width:d}=await(await fetch(`https://vimeo.com/api/oembed.json?maxwidth=1920&url=${encodeURI(i)}`,{credentials:"omit"})).json();this.setItem(e,A("iframe",{src:`https://player.vimeo.com/video/${h[1]}${h[2]?`?${h[2]}`:""}`,width:d,height:c,...l,...a}))}catch{this.setError(e)}}}],methods:{loadItem(t=this.index){const e=this.getItem(t);this.getSlide(e).childElementCount||s.trigger(this.$el,"itemload",[e])},getItem(t=this.index){return this.items[s.getIndex(t,this.slides)]},setItem(t,e){s.trigger(this.$el,"itemloaded",[this,s.html(this.getSlide(t),e)])},getSlide(t){return this.slides[this.items.indexOf(t)]},setError(t){this.setItem(t,'<span uk-icon="icon: bolt; ratio: 2"></span>')},showControls(){clearTimeout(this.controlsTimer),this.controlsTimer=setTimeout(this.hideControls,this.delayControls),s.addClass(this.$el,"uk-active","uk-transition-active")},hideControls(){s.removeClass(this.$el,"uk-active","uk-transition-active")}}};function A(t,e){const i=s.fragment(`<${t}>`);return s.attr(i,e),i}return typeof window<"u"&&window.UIkit&&window.UIkit.component("lightboxPanel",vt),vt});
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.16.11-dev.23226dadb | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */
1
+ /*! UIkit 3.16.11-dev.85cdca725 | 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')) :
@@ -266,16 +266,500 @@
266
266
  );
267
267
  }
268
268
 
269
+ const hyphenateRe = /\B([A-Z])/g;
270
+ const hyphenate = memoize((str) => str.replace(hyphenateRe, "-$1").toLowerCase());
271
+ const ucfirst = memoize((str) => str.charAt(0).toUpperCase() + str.slice(1));
272
+ function startsWith(str, search) {
273
+ var _a;
274
+ return (_a = str == null ? void 0 : str.startsWith) == null ? void 0 : _a.call(str, search);
275
+ }
276
+ function includes(obj, search) {
277
+ var _a;
278
+ return (_a = obj == null ? void 0 : obj.includes) == null ? void 0 : _a.call(obj, search);
279
+ }
280
+ function findIndex(array, predicate) {
281
+ var _a;
282
+ return (_a = array == null ? void 0 : array.findIndex) == null ? void 0 : _a.call(array, predicate);
283
+ }
284
+ const { isArray, from: toArray } = Array;
285
+ function isFunction(obj) {
286
+ return typeof obj === "function";
287
+ }
288
+ function isObject(obj) {
289
+ return obj !== null && typeof obj === "object";
290
+ }
291
+ function isWindow(obj) {
292
+ return isObject(obj) && obj === obj.window;
293
+ }
294
+ function isDocument(obj) {
295
+ return nodeType(obj) === 9;
296
+ }
297
+ function isNode(obj) {
298
+ return nodeType(obj) >= 1;
299
+ }
300
+ function isElement(obj) {
301
+ return nodeType(obj) === 1;
302
+ }
303
+ function nodeType(obj) {
304
+ return !isWindow(obj) && isObject(obj) && obj.nodeType;
305
+ }
306
+ function isString(value) {
307
+ return typeof value === "string";
308
+ }
309
+ function isNumber(value) {
310
+ return typeof value === "number";
311
+ }
312
+ function isNumeric(value) {
313
+ return isNumber(value) || isString(value) && !isNaN(value - parseFloat(value));
314
+ }
315
+ function isUndefined(value) {
316
+ return value === void 0;
317
+ }
318
+ function toFloat(value) {
319
+ return parseFloat(value) || 0;
320
+ }
321
+ function toNode(element) {
322
+ return toNodes(element)[0];
323
+ }
324
+ function toNodes(element) {
325
+ return isNode(element) ? [element] : Array.from(element || []).filter(isNode);
326
+ }
327
+ function toWindow(element) {
328
+ if (isWindow(element)) {
329
+ return element;
330
+ }
331
+ element = toNode(element);
332
+ const document = isDocument(element) ? element : element == null ? void 0 : element.ownerDocument;
333
+ return (document == null ? void 0 : document.defaultView) || window;
334
+ }
335
+ function each(obj, cb) {
336
+ for (const key in obj) {
337
+ if (false === cb(obj[key], key)) {
338
+ return false;
339
+ }
340
+ }
341
+ return true;
342
+ }
343
+ function sumBy(array, iteratee) {
344
+ return array.reduce(
345
+ (sum, item) => sum + toFloat(isFunction(iteratee) ? iteratee(item) : item[iteratee]),
346
+ 0
347
+ );
348
+ }
349
+ function memoize(fn) {
350
+ const cache = /* @__PURE__ */ Object.create(null);
351
+ return (key) => cache[key] || (cache[key] = fn(key));
352
+ }
353
+
354
+ function attr(element, name, value) {
355
+ var _a;
356
+ if (isObject(name)) {
357
+ for (const key in name) {
358
+ attr(element, key, name[key]);
359
+ }
360
+ return;
361
+ }
362
+ if (isUndefined(value)) {
363
+ return (_a = toNode(element)) == null ? void 0 : _a.getAttribute(name);
364
+ } else {
365
+ for (const el of toNodes(element)) {
366
+ if (isFunction(value)) {
367
+ value = value.call(el, attr(el, name));
368
+ }
369
+ if (value === null) {
370
+ removeAttr(el, name);
371
+ } else {
372
+ el.setAttribute(name, value);
373
+ }
374
+ }
375
+ }
376
+ }
377
+ function removeAttr(element, name) {
378
+ toNodes(element).forEach((element2) => element2.removeAttribute(name));
379
+ }
380
+
381
+ function parent(element) {
382
+ var _a;
383
+ return (_a = toNode(element)) == null ? void 0 : _a.parentElement;
384
+ }
385
+ function filter(element, selector) {
386
+ return toNodes(element).filter((element2) => matches(element2, selector));
387
+ }
388
+ function matches(element, selector) {
389
+ return toNodes(element).some((element2) => element2.matches(selector));
390
+ }
391
+ function closest(element, selector) {
392
+ return isElement(element) ? element.closest(startsWith(selector, ">") ? selector.slice(1) : selector) : toNodes(element).map((element2) => closest(element2, selector)).filter(Boolean);
393
+ }
394
+ function within(element, selector) {
395
+ return isString(selector) ? !!closest(element, selector) : toNode(selector).contains(toNode(element));
396
+ }
397
+ function parents(element, selector) {
398
+ const elements = [];
399
+ while (element = parent(element)) {
400
+ if (!selector || matches(element, selector)) {
401
+ elements.push(element);
402
+ }
403
+ }
404
+ return elements;
405
+ }
406
+ function children(element, selector) {
407
+ element = toNode(element);
408
+ const children2 = element ? toNodes(element.children) : [];
409
+ return selector ? filter(children2, selector) : children2;
410
+ }
411
+ function index(element, ref) {
412
+ return ref ? toNodes(element).indexOf(toNode(ref)) : children(parent(element)).indexOf(element);
413
+ }
414
+
415
+ function findAll(selector, context) {
416
+ return toNodes(_query(selector, toNode(context), "querySelectorAll"));
417
+ }
418
+ const contextSelectorRe = /(^|[^\\],)\s*[!>+~-]/;
419
+ const isContextSelector = memoize((selector) => selector.match(contextSelectorRe));
420
+ const contextSanitizeRe = /([!>+~-])(?=\s+[!>+~-]|\s*$)/g;
421
+ const sanatize = memoize((selector) => selector.replace(contextSanitizeRe, "$1 *"));
422
+ function _query(selector, context = document, queryFn) {
423
+ if (!selector || !isString(selector)) {
424
+ return selector;
425
+ }
426
+ selector = sanatize(selector);
427
+ if (isContextSelector(selector)) {
428
+ const split = splitSelector(selector);
429
+ selector = "";
430
+ for (let sel of split) {
431
+ let ctx = context;
432
+ if (sel[0] === "!") {
433
+ const selectors = sel.substr(1).trim().split(" ");
434
+ ctx = closest(parent(context), selectors[0]);
435
+ sel = selectors.slice(1).join(" ").trim();
436
+ if (!sel.length && split.length === 1) {
437
+ return ctx;
438
+ }
439
+ }
440
+ if (sel[0] === "-") {
441
+ const selectors = sel.substr(1).trim().split(" ");
442
+ const prev = (ctx || context).previousElementSibling;
443
+ ctx = matches(prev, sel.substr(1)) ? prev : null;
444
+ sel = selectors.slice(1).join(" ");
445
+ }
446
+ if (ctx) {
447
+ selector += `${selector ? "," : ""}${domPath(ctx)} ${sel}`;
448
+ }
449
+ }
450
+ context = document;
451
+ }
452
+ try {
453
+ return context[queryFn](selector);
454
+ } catch (e) {
455
+ return null;
456
+ }
457
+ }
458
+ const selectorRe = /.*?[^\\](?:,|$)/g;
459
+ const splitSelector = memoize(
460
+ (selector) => selector.match(selectorRe).map((selector2) => selector2.replace(/,$/, "").trim())
461
+ );
462
+ function domPath(element) {
463
+ const names = [];
464
+ while (element.parentNode) {
465
+ const id = attr(element, "id");
466
+ if (id) {
467
+ names.unshift(`#${escape(id)}`);
468
+ break;
469
+ } else {
470
+ let { tagName } = element;
471
+ if (tagName !== "HTML") {
472
+ tagName += `:nth-child(${index(element) + 1})`;
473
+ }
474
+ names.unshift(tagName);
475
+ element = element.parentNode;
476
+ }
477
+ }
478
+ return names.join(" > ");
479
+ }
480
+ function escape(css) {
481
+ return isString(css) ? CSS.escape(css) : "";
482
+ }
483
+
484
+ function on(...args) {
485
+ let [targets, types, selector, listener, useCapture = false] = getArgs(args);
486
+ if (listener.length > 1) {
487
+ listener = detail(listener);
488
+ }
489
+ if (useCapture == null ? void 0 : useCapture.self) {
490
+ listener = selfFilter(listener);
491
+ }
492
+ if (selector) {
493
+ listener = delegate(selector, listener);
494
+ }
495
+ for (const type of types) {
496
+ for (const target of targets) {
497
+ target.addEventListener(type, listener, useCapture);
498
+ }
499
+ }
500
+ return () => off(targets, types, listener, useCapture);
501
+ }
502
+ function off(...args) {
503
+ let [targets, types, , listener, useCapture = false] = getArgs(args);
504
+ for (const type of types) {
505
+ for (const target of targets) {
506
+ target.removeEventListener(type, listener, useCapture);
507
+ }
508
+ }
509
+ }
510
+ function getArgs(args) {
511
+ args[0] = toEventTargets(args[0]);
512
+ if (isString(args[1])) {
513
+ args[1] = args[1].split(" ");
514
+ }
515
+ if (isFunction(args[2])) {
516
+ args.splice(2, 0, false);
517
+ }
518
+ return args;
519
+ }
520
+ function delegate(selector, listener) {
521
+ return (e) => {
522
+ const current = selector[0] === ">" ? findAll(selector, e.currentTarget).reverse().filter((element) => within(e.target, element))[0] : closest(e.target, selector);
523
+ if (current) {
524
+ e.current = current;
525
+ listener.call(this, e);
526
+ delete e.current;
527
+ }
528
+ };
529
+ }
530
+ function detail(listener) {
531
+ return (e) => isArray(e.detail) ? listener(e, ...e.detail) : listener(e);
532
+ }
533
+ function selfFilter(listener) {
534
+ return function(e) {
535
+ if (e.target === e.currentTarget || e.target === e.current) {
536
+ return listener.call(null, e);
537
+ }
538
+ };
539
+ }
540
+ function isEventTarget(target) {
541
+ return target && "addEventListener" in target;
542
+ }
543
+ function toEventTarget(target) {
544
+ return isEventTarget(target) ? target : toNode(target);
545
+ }
546
+ function toEventTargets(target) {
547
+ return isArray(target) ? target.map(toEventTarget).filter(Boolean) : isString(target) ? findAll(target) : isEventTarget(target) ? [target] : toNodes(target);
548
+ }
549
+
550
+ const cssNumber = {
551
+ "animation-iteration-count": true,
552
+ "column-count": true,
553
+ "fill-opacity": true,
554
+ "flex-grow": true,
555
+ "flex-shrink": true,
556
+ "font-weight": true,
557
+ "line-height": true,
558
+ opacity: true,
559
+ order: true,
560
+ orphans: true,
561
+ "stroke-dasharray": true,
562
+ "stroke-dashoffset": true,
563
+ widows: true,
564
+ "z-index": true,
565
+ zoom: true
566
+ };
567
+ function css(element, property, value, priority) {
568
+ const elements = toNodes(element);
569
+ for (const element2 of elements) {
570
+ if (isString(property)) {
571
+ property = propName(property);
572
+ if (isUndefined(value)) {
573
+ return getComputedStyle(element2).getPropertyValue(property);
574
+ } else {
575
+ element2.style.setProperty(
576
+ property,
577
+ isNumeric(value) && !cssNumber[property] ? `${value}px` : value || isNumber(value) ? value : "",
578
+ priority
579
+ );
580
+ }
581
+ } else if (isArray(property)) {
582
+ const props = {};
583
+ for (const prop of property) {
584
+ props[prop] = css(element2, prop);
585
+ }
586
+ return props;
587
+ } else if (isObject(property)) {
588
+ priority = value;
589
+ each(property, (value2, property2) => css(element2, property2, value2, priority));
590
+ }
591
+ }
592
+ return elements[0];
593
+ }
594
+ const propName = memoize((name) => vendorPropName(name));
595
+ function vendorPropName(name) {
596
+ if (startsWith(name, "--")) {
597
+ return name;
598
+ }
599
+ name = hyphenate(name);
600
+ const { style } = document.documentElement;
601
+ if (name in style) {
602
+ return name;
603
+ }
604
+ for (const prefix of ["webkit", "moz"]) {
605
+ const prefixedName = `-${prefix}-${name}`;
606
+ if (prefixedName in style) {
607
+ return prefixedName;
608
+ }
609
+ }
610
+ }
611
+
612
+ const dirs = {
613
+ width: ["left", "right"],
614
+ height: ["top", "bottom"]
615
+ };
616
+ function dimensions(element) {
617
+ const rect = isElement(element) ? toNode(element).getBoundingClientRect() : { height: height(element), width: width(element), top: 0, left: 0 };
618
+ return {
619
+ height: rect.height,
620
+ width: rect.width,
621
+ top: rect.top,
622
+ left: rect.left,
623
+ bottom: rect.top + rect.height,
624
+ right: rect.left + rect.width
625
+ };
626
+ }
627
+ function offset(element, coordinates) {
628
+ const currentOffset = dimensions(element);
629
+ if (element) {
630
+ const { scrollY, scrollX } = toWindow(element);
631
+ const offsetBy = { height: scrollY, width: scrollX };
632
+ for (const dir in dirs) {
633
+ for (const prop of dirs[dir]) {
634
+ currentOffset[prop] += offsetBy[dir];
635
+ }
636
+ }
637
+ }
638
+ if (!coordinates) {
639
+ return currentOffset;
640
+ }
641
+ const pos = css(element, "position");
642
+ each(
643
+ css(element, ["left", "top"]),
644
+ (value, prop) => css(
645
+ element,
646
+ prop,
647
+ coordinates[prop] - currentOffset[prop] + toFloat(pos === "absolute" && value === "auto" ? position(element)[prop] : value)
648
+ )
649
+ );
650
+ }
651
+ function position(element) {
652
+ let { top, left } = offset(element);
653
+ const {
654
+ ownerDocument: { body, documentElement },
655
+ offsetParent
656
+ } = toNode(element);
657
+ let parent = offsetParent || documentElement;
658
+ while (parent && (parent === body || parent === documentElement) && css(parent, "position") === "static") {
659
+ parent = parent.parentNode;
660
+ }
661
+ if (isElement(parent)) {
662
+ const parentOffset = offset(parent);
663
+ top -= parentOffset.top + toFloat(css(parent, "borderTopWidth"));
664
+ left -= parentOffset.left + toFloat(css(parent, "borderLeftWidth"));
665
+ }
666
+ return {
667
+ top: top - toFloat(css(element, "marginTop")),
668
+ left: left - toFloat(css(element, "marginLeft"))
669
+ };
670
+ }
671
+ const height = dimension("height");
672
+ const width = dimension("width");
673
+ function dimension(prop) {
674
+ const propName = ucfirst(prop);
675
+ return (element, value) => {
676
+ if (isUndefined(value)) {
677
+ if (isWindow(element)) {
678
+ return element[`inner${propName}`];
679
+ }
680
+ if (isDocument(element)) {
681
+ const doc = element.documentElement;
682
+ return Math.max(doc[`offset${propName}`], doc[`scroll${propName}`]);
683
+ }
684
+ element = toNode(element);
685
+ value = css(element, prop);
686
+ value = value === "auto" ? element[`offset${propName}`] : toFloat(value) || 0;
687
+ return value - boxModelAdjust(element, prop);
688
+ } else {
689
+ return css(
690
+ element,
691
+ prop,
692
+ !value && value !== 0 ? "" : +value + boxModelAdjust(element, prop) + "px"
693
+ );
694
+ }
695
+ };
696
+ }
697
+ function boxModelAdjust(element, prop, sizing = "border-box") {
698
+ return css(element, "boxSizing") === sizing ? sumBy(
699
+ dirs[prop].map(ucfirst),
700
+ (prop2) => toFloat(css(element, `padding${prop2}`)) + toFloat(css(element, `border${prop2}Width`))
701
+ ) : 0;
702
+ }
703
+
704
+ function scrollParents(element, scrollable = false, props = []) {
705
+ const scrollEl = scrollingElement(element);
706
+ let ancestors = parents(element).reverse();
707
+ ancestors = ancestors.slice(ancestors.indexOf(scrollEl) + 1);
708
+ const fixedIndex = findIndex(ancestors, (el) => css(el, "position") === "fixed");
709
+ if (~fixedIndex) {
710
+ ancestors = ancestors.slice(fixedIndex);
711
+ }
712
+ return [scrollEl].concat(
713
+ ancestors.filter(
714
+ (parent) => css(parent, "overflow").split(" ").some((prop) => includes(["auto", "scroll", ...props], prop)) && (!scrollable || parent.scrollHeight > offsetViewport(parent).height)
715
+ )
716
+ ).reverse();
717
+ }
718
+ function offsetViewport(scrollElement) {
719
+ const window = toWindow(scrollElement);
720
+ const {
721
+ visualViewport,
722
+ document: { documentElement }
723
+ } = window;
724
+ let viewportElement = scrollElement === scrollingElement(scrollElement) ? window : scrollElement;
725
+ if (isWindow(viewportElement) && visualViewport) {
726
+ let { height, width, scale, pageTop: top, pageLeft: left } = visualViewport;
727
+ height = Math.round(height * scale);
728
+ width = Math.round(width * scale);
729
+ return { height, width, top, left, bottom: top + height, right: left + width };
730
+ }
731
+ let rect = offset(viewportElement);
732
+ if (css(viewportElement, "display") === "inline") {
733
+ return rect;
734
+ }
735
+ for (let [prop, dir, start, end] of [
736
+ ["width", "x", "left", "right"],
737
+ ["height", "y", "top", "bottom"]
738
+ ]) {
739
+ if (isWindow(viewportElement)) {
740
+ viewportElement = documentElement;
741
+ } else {
742
+ rect[start] += toFloat(css(viewportElement, `border-${start}-width`));
743
+ }
744
+ rect[prop] = rect[dir] = viewportElement[`client${ucfirst(prop)}`];
745
+ rect[end] = rect[prop] + rect[start];
746
+ }
747
+ return rect;
748
+ }
749
+ function scrollingElement(element) {
750
+ return toWindow(element).document.scrollingElement;
751
+ }
752
+
269
753
  let prevented;
270
754
  function preventBackgroundScroll(el) {
271
- const off = util.on(
755
+ const off = on(
272
756
  el,
273
757
  "touchmove",
274
758
  (e) => {
275
- if (e.targetTouches.length !== 1 || util.matches(e.target, 'input[type="range"')) {
759
+ if (e.targetTouches.length !== 1 || matches(e.target, 'input[type="range"')) {
276
760
  return;
277
761
  }
278
- let [{ scrollHeight, clientHeight }] = util.scrollParents(e.target);
762
+ let [{ scrollHeight, clientHeight }] = scrollParents(e.target);
279
763
  if (clientHeight >= scrollHeight && e.cancelable) {
280
764
  e.preventDefault();
281
765
  }
@@ -287,15 +771,15 @@
287
771
  }
288
772
  prevented = true;
289
773
  const { scrollingElement } = document;
290
- util.css(scrollingElement, {
774
+ css(scrollingElement, {
291
775
  overflowY: CSS.supports("overflow", "clip") ? "clip" : "hidden",
292
776
  touchAction: "none",
293
- paddingRight: util.width(window) - scrollingElement.clientWidth || ""
777
+ paddingRight: width(window) - scrollingElement.clientWidth || ""
294
778
  });
295
779
  return () => {
296
780
  prevented = false;
297
781
  off();
298
- util.css(scrollingElement, { overflowY: "", touchAction: "", paddingRight: "" });
782
+ css(scrollingElement, { overflowY: "", touchAction: "", paddingRight: "" });
299
783
  };
300
784
  }
301
785