diff --git a/assets/big-shot.umd.js b/assets/big-shot.umd.js index ce94cfb..c21fd7e 100644 --- a/assets/big-shot.umd.js +++ b/assets/big-shot.umd.js @@ -73,4 +73,4 @@ browserWorkerPolyFill(self); `,E.innerHTML=A,L.fillWith(E),L.getChild("closeButton").hide();const U=L.el().querySelector(".vjs-errors-timeout-button-container > button:first-child"),M=L.el().querySelector(".vjs-errors-timeout-button-container > button:last-child");a.on(U,"click",function(){const F=a.currentSource();a.reset(),a.src(F)}),a.on(M,"click",function(){L.close()}),L.one("modalclose",()=>{a.off(U),a.off(M)})}else if(B){A+=`
`,E.innerHTML=A,L.fillWith(E),L.contentEl().firstChild.appendChild(L.getChild("closeButton").el());const U=L.el().querySelector(".vjs-errors-ok-button");a.on(U,"click",function(){L.close()})}else E.innerHTML=A,L.fillWith(E);(a.currentWidth()<=600||a.currentHeight()<=250)&&L.addClass("vjs-xs"),L.one("modalclose",()=>a.error(null))},g=function(){l(),a.removeClass("vjs-errors"),a.off("play",d),a.off(Y,"visibilitychange",d),a.off("play",c),a.off("dispose",g),a.off(["aderror","error"],h)},_=function(T){g(),Nh(a,R.mergeOptions(Rh,T))};_.extend=T=>s(T),_.getAll=()=>R.mergeOptions(t.errors),_.timeout=function(T){if(typeof T>"u")return t.timeout;T!==t.timeout&&(t.timeout=T,a.paused()||d())},_.backgroundTimeout=function(T){if(typeof T>"u")return t.backgroundTimeout;T!==t.backgroundTimeout&&(t.backgroundTimeout=T,a.paused()||d())},_.disableProgress=()=>{},a.on("play",d),a.on("play",c),a.on("dispose",g),a.on(["aderror","contenterror","error"],h),a.ready(()=>{a.addClass("vjs-errors")}),a.paused()||d(),_.VERSION=Lh,a.errors=_},Sl=function(a){Nh(this,R.mergeOptions(Rh,a))};["extend","getAll"].forEach(a=>{Sl[a]=function(){R.log.warn(`The errors.${a}() method is not available until the plugin has been initialized!`)}}),Sl.VERSION=Lh,dS("errors",Sl);const cS={class:"swiper-zoom-container"},fS=G.defineComponent({__name:"VideoSlide",props:{slide:null,active:{type:Boolean}},emits:["playStarted","playFinished"],setup(a,{emit:t}){const i=a,r=G.ref();function e({video:l,player:u}){r.value=u,l.classList.add("swiper-zoom-target"),u.errors()}function n(l){!i.active||!r.value||l.code==="Space"&&(r.value.paused()?r.value.play():r.value.pause())}document.addEventListener("keydown",n),G.onUnmounted(()=>document.removeEventListener("keydown",n)),G.watch(()=>i.active,()=>{i.active&&t("playStarted"),r.value&&(i.active?(r.value.play(),r.value.error()&&setTimeout(()=>t("playFinished"),3e3)):r.value.pause())});const s={userActions:{click:!1,doubleClick:!1},crossorigin:"anonymous",playsinline:!0,controls:!0,sources:[{src:i.slide.src,...i.slide.mimeType?{type:i.slide.mimeType}:{}}],volume:.4,children:["mediaLoader","posterImage","bigPlayButton","loadingSpinner","errorDisplay","controlBar","textTrackDisplay"],controlBar:{volumePanel:!1}};function o(){i.active&&setTimeout(()=>t("playFinished"),3e3)}return(l,u)=>(G.openBlock(),G.createElementBlock("div",cS,[G.createVNode(G.unref(lS),G.mergeProps(s,{class:"video-player vjs-theme-forest vjs-big-play-centered vjs-fluid",onMounted:e,onEnded:u[0]||(u[0]=d=>t("playFinished")),onError:o}),null,16)]))}}),rE="",xl=(a,t)=>{const i=a.__vccOpts||a;for(const[r,e]of t)i[r]=e;return i},hS=xl(fS,[["__scopeId","data-v-c806545e"]]),pS=G.defineComponent({__name:"slide-item",props:{slide:null},setup(a){const t={image:ru,video:hS};return(i,r)=>(G.openBlock(),G.createBlock(G.resolveDynamicComponent(t[a.slide.type??"image"]??ru),{slide:a.slide},null,8,["slide"]))}}),Fh=a=>(G.pushScopeId("data-v-e55f960c"),a=a(),G.popScopeId(),a),mS=["aria-checked","onKeydown"],gS=Fh(()=>G.createElementVNode("span",{class:"label"}," Autoplay Slides ",-1)),vS=Fh(()=>G.createElementVNode("span",{class:"switch"},null,-1)),yS={class:"label"},_S=G.defineComponent({__name:"AutoPlaySwitch",props:{modelValue:{type:Boolean}},emits:["update:modelValue"],setup(a,{emit:t}){const i=a;function r(){t("update:modelValue",!i.modelValue)}return(e,n)=>(G.openBlock(),G.createElementBlock("div",{role:"switch","aria-checked":a.modelValue,tabindex:"0",onClick:r,onKeydown:[G.withKeys(r,["enter"]),G.withKeys(r,["space"])]},[gS,vS,G.createElementVNode("span",yS,G.toDisplayString(a.modelValue?"On":"Off"),1)],40,mS))}}),nE="",TS=xl(_S,[["__scopeId","data-v-e55f960c"]]),bS={class:"big-shot"},SS={class:"toolbar"},xS={class:"text"},ES=G.defineComponent({__name:"big-shot",props:{slideData:null},emits:["beforeSlideChangeHook"],setup(a,{emit:t}){const i=a,r=G.ref(!1),e=G.ref(),n={virtual:!0,slidesPerView:1,modules:[Bm,Um,jm,Vm],keyboard:!0,spaceBetween:50,zoom:!0,loop:!0,autoplay:!1,speed:1},s=G.ref(0);G.watch(e,()=>{if(!e.value)return;r.value||e.value.autoplay.stop(),e.value.on("slideChange",function(){s.value=e.value.realIndex}),e.value.on("autoplayStop",function(){r.value&&(r.value=!1)}),e.value.on("autoplayStart",function(){r.value||(r.value=!0)});let d=0;e.value.on("slideChange",()=>{const c=e.value.realIndex,g=i.slideData.length-1;if(d===c)return;const _=c-d,T=_>0?_:g-d+(c+1),b=_<0?Math.abs(_):d+1+g-c;let E;T{r.value?o.value||e.value.autoplay.start():e.value.autoplay.stop()}),G.watch(o,()=>{e.value&&r.value&&(o.value?r.value&&(e.value.animating?e.value.once("slideChangeTransitionEnd",()=>e.value.autoplay.pause()):e.value.autoplay.pause()):(e.value.slideNext(),e.value.autoplay.start()))}),(d,c)=>(G.openBlock(),G.createElementBlock("div",bS,[G.createVNode(G.unref(Xm),G.mergeProps(n,{ref:"swiperElm",onSwiper:c[1]||(c[1]=h=>e.value=h)}),{"container-start":G.withCtx(()=>[G.createElementVNode("div",SS,[G.createElementVNode("div",null,[G.createElementVNode("span",xS,G.toDisplayString(s.value+1)+" / "+G.toDisplayString(a.slideData.length),1)]),G.createElementVNode("div",null,[G.renderSlot(d.$slots,"center-header",{currentSlide:a.slideData[s.value]},void 0,!0)]),G.createElementVNode("div",null,[G.createVNode(TS,{modelValue:r.value,"onUpdate:modelValue":c[0]||(c[0]=h=>r.value=h)},null,8,["modelValue"])])])]),default:G.withCtx(()=>[(G.openBlock(!0),G.createElementBlock(G.Fragment,null,G.renderList(a.slideData.filter(h=>h),(h,g)=>(G.openBlock(),G.createBlock(G.unref(Km),{key:g,"virtual-index":g},{default:G.withCtx(()=>[G.createVNode(pS,{slide:h,active:s.value===g,onPlayStarted:l,onPlayFinished:u},null,8,["slide","active"])]),_:2},1032,["virtual-index"]))),128))]),_:3},16)]))}}),aE="";return xl(ES,[["__scopeId","data-v-12fa87e4"]])}); + `,E.innerHTML=A,L.fillWith(E),L.contentEl().firstChild.appendChild(L.getChild("closeButton").el());const U=L.el().querySelector(".vjs-errors-ok-button");a.on(U,"click",function(){L.close()})}else E.innerHTML=A,L.fillWith(E);(a.currentWidth()<=600||a.currentHeight()<=250)&&L.addClass("vjs-xs"),L.one("modalclose",()=>a.error(null))},g=function(){l(),a.removeClass("vjs-errors"),a.off("play",d),a.off(Y,"visibilitychange",d),a.off("play",c),a.off("dispose",g),a.off(["aderror","error"],h)},_=function(T){g(),Nh(a,R.mergeOptions(Rh,T))};_.extend=T=>s(T),_.getAll=()=>R.mergeOptions(t.errors),_.timeout=function(T){if(typeof T>"u")return t.timeout;T!==t.timeout&&(t.timeout=T,a.paused()||d())},_.backgroundTimeout=function(T){if(typeof T>"u")return t.backgroundTimeout;T!==t.backgroundTimeout&&(t.backgroundTimeout=T,a.paused()||d())},_.disableProgress=()=>{},a.on("play",d),a.on("play",c),a.on("dispose",g),a.on(["aderror","contenterror","error"],h),a.ready(()=>{a.addClass("vjs-errors")}),a.paused()||d(),_.VERSION=Lh,a.errors=_},Sl=function(a){Nh(this,R.mergeOptions(Rh,a))};["extend","getAll"].forEach(a=>{Sl[a]=function(){R.log.warn(`The errors.${a}() method is not available until the plugin has been initialized!`)}}),Sl.VERSION=Lh,dS("errors",Sl);const cS={class:"swiper-zoom-container"},fS=G.defineComponent({__name:"VideoSlide",props:{slide:null,active:{type:Boolean}},emits:["playStarted","playFinished"],setup(a,{emit:t}){const i=a,r=G.ref();function e({video:l,player:u}){r.value=u,l.classList.add("swiper-zoom-target"),u.errors()}function n(l){!i.active||!r.value||l.code==="Space"&&(r.value.paused()?r.value.play():r.value.pause())}document.addEventListener("keydown",n),G.onUnmounted(()=>document.removeEventListener("keydown",n)),G.watch(()=>i.active,()=>{i.active&&t("playStarted"),r.value&&(i.active?(r.value.play(),r.value.error()&&setTimeout(()=>t("playFinished"),3e3)):r.value.pause())});const s={userActions:{click:!1,doubleClick:!1},crossorigin:"anonymous",playsinline:!0,controls:!0,sources:[{src:i.slide.src,...i.slide.mimeType?{type:i.slide.mimeType}:{}}],volume:.4,children:["mediaLoader","posterImage","bigPlayButton","loadingSpinner","errorDisplay","controlBar","textTrackDisplay"],controlBar:{volumePanel:!1}};function o(){i.active&&setTimeout(()=>t("playFinished"),3e3)}return(l,u)=>(G.openBlock(),G.createElementBlock("div",cS,[G.createVNode(G.unref(lS),G.mergeProps(s,{class:"video-player vjs-theme-forest vjs-big-play-centered vjs-fluid",onMounted:e,onEnded:u[0]||(u[0]=d=>t("playFinished")),onError:o}),null,16)]))}}),rE="",xl=(a,t)=>{const i=a.__vccOpts||a;for(const[r,e]of t)i[r]=e;return i},hS=xl(fS,[["__scopeId","data-v-c806545e"]]),pS=G.defineComponent({__name:"slide-item",props:{slide:null},setup(a){const t={image:ru,video:hS};return(i,r)=>(G.openBlock(),G.createBlock(G.resolveDynamicComponent(t[a.slide.type??"image"]??ru),{slide:a.slide},null,8,["slide"]))}}),Fh=a=>(G.pushScopeId("data-v-e55f960c"),a=a(),G.popScopeId(),a),mS=["aria-checked","onKeydown"],gS=Fh(()=>G.createElementVNode("span",{class:"label"}," Autoplay Slides ",-1)),vS=Fh(()=>G.createElementVNode("span",{class:"switch"},null,-1)),yS={class:"label"},_S=G.defineComponent({__name:"AutoPlaySwitch",props:{modelValue:{type:Boolean}},emits:["update:modelValue"],setup(a,{emit:t}){const i=a;function r(){t("update:modelValue",!i.modelValue)}return(e,n)=>(G.openBlock(),G.createElementBlock("div",{role:"switch","aria-checked":a.modelValue,tabindex:"0",onClick:r,onKeydown:[G.withKeys(r,["enter"]),G.withKeys(r,["space"])]},[gS,vS,G.createElementVNode("span",yS,G.toDisplayString(a.modelValue?"On":"Off"),1)],40,mS))}}),nE="",TS=xl(_S,[["__scopeId","data-v-e55f960c"]]),bS={class:"big-shot"},SS={class:"toolbar"},xS={class:"text"},ES=G.defineComponent({__name:"big-shot",props:{slideData:null},emits:["beforeSlideChangeHook"],setup(a,{emit:t}){const i=a,r=G.ref(!1),e=G.ref(),n={virtual:!0,slidesPerView:1,modules:[Bm,Um,jm,Vm],keyboard:!0,spaceBetween:50,zoom:!0,loop:!0,autoplay:!1,speed:1},s=G.ref(0);G.watch(e,()=>{if(!e.value)return;r.value||e.value.autoplay.stop(),e.value.on("autoplayStop",function(){r.value&&(r.value=!1)}),e.value.on("autoplayStart",function(){r.value||(r.value=!0)});let d=0;e.value.on("slideChange",()=>{s.value=e.value.realIndex;const c=e.value.realIndex,g=i.slideData.length-1;if(d===c)return;const _=c-d,T=_>0?_:g-d+(c+1),b=_<0?Math.abs(_):d+1+g-c;let E;T{r.value?o.value||e.value.autoplay.start():e.value.autoplay.stop()}),G.watch(o,()=>{e.value&&r.value&&(o.value?r.value&&(e.value.animating?e.value.once("slideChangeTransitionEnd",()=>e.value.autoplay.pause()):e.value.autoplay.pause()):(e.value.slideNext(),e.value.autoplay.start()))}),(d,c)=>(G.openBlock(),G.createElementBlock("div",bS,[a.slideData.length>0?(G.openBlock(),G.createBlock(G.unref(Xm),G.mergeProps({key:0},n,{ref:"swiperElm",onSwiper:c[1]||(c[1]=h=>e.value=h)}),{"container-start":G.withCtx(()=>[G.createElementVNode("div",SS,[G.createElementVNode("div",null,[G.createElementVNode("span",xS,G.toDisplayString(s.value+1)+" / "+G.toDisplayString(a.slideData.length),1)]),G.createElementVNode("div",null,[G.renderSlot(d.$slots,"center-header",{currentSlide:a.slideData[s.value]},void 0,!0)]),G.createElementVNode("div",null,[G.createVNode(TS,{modelValue:r.value,"onUpdate:modelValue":c[0]||(c[0]=h=>r.value=h)},null,8,["modelValue"])])])]),default:G.withCtx(()=>[(G.openBlock(!0),G.createElementBlock(G.Fragment,null,G.renderList(a.slideData.filter(h=>h),(h,g)=>(G.openBlock(),G.createBlock(G.unref(Km),{key:g,"virtual-index":g},{default:G.withCtx(()=>[G.createVNode(pS,{slide:h,active:s.value===g,onPlayStarted:l,onPlayFinished:u},null,8,["slide","active"])]),_:2},1032,["virtual-index"]))),128))]),_:3},16)):G.createCommentVNode("",!0)]))}}),aE="";return xl(ES,[["__scopeId","data-v-d9e6fe27"]])}); diff --git a/assets/es-8e828f51.js b/assets/es-501bbd30.js similarity index 89% rename from assets/es-8e828f51.js rename to assets/es-501bbd30.js index c9bf865..b19ba43 100644 --- a/assets/es-8e828f51.js +++ b/assets/es-501bbd30.js @@ -1,26 +1,26 @@ -(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const t of document.querySelectorAll('link[rel="modulepreload"]'))n(t);new MutationObserver(t=>{for(const a of t)if(a.type==="childList")for(const s of a.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&n(s)}).observe(document,{childList:!0,subtree:!0});function r(t){const a={};return t.integrity&&(a.integrity=t.integrity),t.referrerpolicy&&(a.referrerPolicy=t.referrerpolicy),t.crossorigin==="use-credentials"?a.credentials="include":t.crossorigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(t){if(t.ep)return;t.ep=!0;const a=r(t);fetch(t.href,a)}})();function Zu(i,e){const r=Object.create(null),n=i.split(",");for(let t=0;t