primevue
Version:
[](https://opensource.org/licenses/MIT) [](https://badge.fury.io/js/primevue) [ • 32.5 kB
JavaScript
"use strict";var e=require("primevue/utils"),t=require("primevue/ripple"),i=require("vue");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=n(t),l={name:"GalleriaItem",emits:["start-slideshow","stop-slideshow","update:activeIndex"],props:{circular:{type:Boolean,default:!1},activeIndex:{type:Number,default:0},value:{type:Array,default:null},showItemNavigators:{type:Boolean,default:!0},showIndicators:{type:Boolean,default:!0},slideShowActive:{type:Boolean,default:!0},changeItemOnIndicatorHover:{type:Boolean,default:!0},autoPlay:{type:Boolean,default:!1},templates:{type:null,default:null}},mounted(){this.autoPlay&&this.$emit("start-slideshow")},methods:{next(){let e=this.activeIndex+1,t=this.circular&&this.value.length-1===this.activeIndex?0:e;this.$emit("update:activeIndex",t)},prev(){let e=0!==this.activeIndex?this.activeIndex-1:0,t=this.circular&&0===this.activeIndex?this.value.length-1:e;this.$emit("update:activeIndex",t)},stopSlideShow(){this.slideShowActive&&this.stopSlideShow&&this.$emit("stop-slideshow")},navBackward(e){this.stopSlideShow(),this.prev(),e&&e.cancelable&&e.preventDefault()},navForward(e){this.stopSlideShow(),this.next(),e&&e.cancelable&&e.preventDefault()},onIndicatorClick(e){this.stopSlideShow(),this.$emit("update:activeIndex",e)},onIndicatorMouseEnter(e){this.changeItemOnIndicatorHover&&(this.stopSlideShow(),this.$emit("update:activeIndex",e))},onIndicatorKeyDown(e){this.stopSlideShow(),this.$emit("update:activeIndex",e)},isIndicatorItemActive(e){return this.activeIndex===e},isNavBackwardDisabled(){return!this.circular&&0===this.activeIndex},isNavForwardDisabled(){return!this.circular&&this.activeIndex===this.value.length-1}},computed:{activeItem(){return this.value[this.activeIndex]},navBackwardClass(){return["p-galleria-item-prev p-galleria-item-nav p-link",{"p-disabled":this.isNavBackwardDisabled()}]},navForwardClass(){return["p-galleria-item-next p-galleria-item-nav p-link",{"p-disabled":this.isNavForwardDisabled()}]}},directives:{ripple:a.default}};const s={class:"p-galleria-item-wrapper"},o={class:"p-galleria-item-container"},r=i.createVNode("span",{class:"p-galleria-item-prev-icon pi pi-chevron-left"},null,-1),d={class:"p-galleria-item"},c=i.createVNode("span",{class:"p-galleria-item-next-icon pi pi-chevron-right"},null,-1),p={key:2,class:"p-galleria-caption"},m={key:0,class:"p-galleria-indicators p-reset"},h={key:0,type:"button",tabindex:"-1",class:"p-link"};l.render=function(e,t,n,a,l,u){const b=i.resolveDirective("ripple");return i.openBlock(),i.createBlock("div",s,[i.createVNode("div",o,[n.showItemNavigators?i.withDirectives((i.openBlock(),i.createBlock("button",{key:0,type:"button",class:u.navBackwardClass,onClick:t[1]||(t[1]=e=>u.navBackward(e)),disabled:u.isNavBackwardDisabled()},[r],10,["disabled"])),[[b]]):i.createCommentVNode("",!0),i.createVNode("div",d,[n.templates.item?(i.openBlock(),i.createBlock(i.resolveDynamicComponent(n.templates.item),{key:0,item:u.activeItem},null,8,["item"])):i.createCommentVNode("",!0)]),n.showItemNavigators?i.withDirectives((i.openBlock(),i.createBlock("button",{key:1,type:"button",class:u.navForwardClass,onClick:t[2]||(t[2]=e=>u.navForward(e)),disabled:u.isNavForwardDisabled()},[c],10,["disabled"])),[[b]]):i.createCommentVNode("",!0),n.templates.caption?(i.openBlock(),i.createBlock("div",p,[n.templates.caption?(i.openBlock(),i.createBlock(i.resolveDynamicComponent(n.templates.caption),{key:0,item:u.activeItem},null,8,["item"])):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0)]),n.showIndicators?(i.openBlock(),i.createBlock("ul",m,[(i.openBlock(!0),i.createBlock(i.Fragment,null,i.renderList(n.value,((e,t)=>(i.openBlock(),i.createBlock("li",{key:`p-galleria-indicator-${t}`,tabindex:"0",onClick:e=>u.onIndicatorClick(t),onMouseenter:e=>u.onIndicatorMouseEnter(t),onKeydown:i.withKeys((e=>u.onIndicatorKeyDown(t)),["enter"]),class:["p-galleria-indicator",{"p-highlight":u.isIndicatorItemActive(t)}]},[n.templates.indicator?i.createCommentVNode("",!0):(i.openBlock(),i.createBlock("button",h)),n.templates.indicator?(i.openBlock(),i.createBlock(i.resolveDynamicComponent(n.templates.indicator),{key:1,index:t},null,8,["index"])):i.createCommentVNode("",!0)],42,["onClick","onMouseenter","onKeydown"])))),128))])):i.createCommentVNode("",!0)])};var u={name:"GalleriaThumbnails",emits:["stop-slideshow","update:activeIndex"],props:{containerId:{type:String,default:null},value:{type:Array,default:null},numVisible:{type:Number,default:3},activeIndex:{type:Number,default:0},isVertical:{type:Boolean,default:!1},slideShowActive:{type:Boolean,default:!1},circular:{type:Boolean,default:!1},responsiveOptions:{type:Array,default:null},contentHeight:{type:String,default:"300px"},showThumbnailNavigators:{type:Boolean,default:!0},templates:{type:null,default:null}},startPos:null,thumbnailsStyle:null,sortedResponsiveOptions:null,data(){return{d_numVisible:this.numVisible,d_oldNumVisible:this.numVisible,d_activeIndex:this.activeIndex,d_oldActiveItemIndex:this.activeIndex,totalShiftedItems:0,page:0}},watch:{numVisible(e,t){this.d_numVisible=e,this.d_oldNumVisible=t},activeIndex(e,t){this.d_activeIndex=e,this.d_oldActiveItemIndex=t}},mounted(){this.createStyle(),this.calculatePosition(),this.responsiveOptions&&this.bindDocumentListeners()},updated(){let t=this.totalShiftedItems;this.d_oldNumVisible===this.d_numVisible&&this.d_oldActiveItemIndex===this.d_activeIndex||(t=this.d_activeIndex<=this.getMedianItemIndex()?0:this.value.length-this.d_numVisible+this.getMedianItemIndex()<this.d_activeIndex?this.d_numVisible-this.value.length:this.value.length-this.d_numVisible<this.d_activeIndex&&this.d_numVisible%2==0?-1*this.d_activeIndex+this.getMedianItemIndex()+1:-1*this.d_activeIndex+this.getMedianItemIndex(),t!==this.totalShiftedItems&&(this.totalShiftedItems=t),this.$refs.itemsContainer.style.transform=this.isVertical?`translate3d(0, ${t*(100/this.d_numVisible)}%, 0)`:`translate3d(${t*(100/this.d_numVisible)}%, 0, 0)`,this.d_oldActiveItemIndex!==this.d_activeIndex&&(e.DomHandler.removeClass(this.$refs.itemsContainer,"p-items-hidden"),this.$refs.itemsContainer.style.transition="transform 500ms ease 0s"),this.d_oldActiveItemIndex=this.d_activeIndex,this.d_oldNumVisible=this.d_numVisible)},beforeUnmount(){this.responsiveOptions&&this.unbindDocumentListeners(),this.thumbnailsStyle&&this.thumbnailsStyle.parentNode.removeChild(this.thumbnailsStyle)},methods:{step(t){let i=this.totalShiftedItems+t;t<0&&-1*i+this.d_numVisible>this.value.length-1?i=this.d_numVisible-this.value.length:t>0&&i>0&&(i=0),this.circular&&(t<0&&this.value.length-1===this.d_activeIndex?i=0:t>0&&0===this.d_activeIndex&&(i=this.d_numVisible-this.value.length)),this.$refs.itemsContainer&&(e.DomHandler.removeClass(this.$refs.itemsContainer,"p-items-hidden"),this.$refs.itemsContainer.style.transform=this.isVertical?`translate3d(0, ${i*(100/this.d_numVisible)}%, 0)`:`translate3d(${i*(100/this.d_numVisible)}%, 0, 0)`,this.$refs.itemsContainer.style.transition="transform 500ms ease 0s"),this.totalShiftedItems=i},stopSlideShow(){this.slideShowActive&&this.stopSlideShow&&this.$emit("stop-slideshow")},getMedianItemIndex(){let e=Math.floor(this.d_numVisible/2);return this.d_numVisible%2?e:e-1},navBackward(e){this.stopSlideShow();let t=0!==this.d_activeIndex?this.d_activeIndex-1:0,i=t+this.totalShiftedItems;this.d_numVisible-i-1>this.getMedianItemIndex()&&(-1*this.totalShiftedItems!=0||this.circular)&&this.step(1);let n=this.circular&&0===this.d_activeIndex?this.value.length-1:t;this.$emit("update:activeIndex",n),e.cancelable&&e.preventDefault()},navForward(e){this.stopSlideShow();let t=this.d_activeIndex+1;t+this.totalShiftedItems>this.getMedianItemIndex()&&(-1*this.totalShiftedItems<this.getTotalPageNumber()-1||this.circular)&&this.step(-1);let i=this.circular&&this.value.length-1===this.d_activeIndex?0:t;this.$emit("update:activeIndex",i),e.cancelable&&e.preventDefault()},onItemClick(e){this.stopSlideShow();let t=e;if(t!==this.d_activeIndex){const e=t+this.totalShiftedItems;let i=0;t<this.d_activeIndex?(i=this.d_numVisible-e-1-this.getMedianItemIndex(),i>0&&-1*this.totalShiftedItems!=0&&this.step(i)):(i=this.getMedianItemIndex()-e,i<0&&-1*this.totalShiftedItems<this.getTotalPageNumber()-1&&this.step(i)),this.$emit("update:activeIndex",t)}},onTransitionEnd(){this.$refs.itemsContainer&&(e.DomHandler.addClass(this.$refs.itemsContainer,"p-items-hidden"),this.$refs.itemsContainer.style.transition="")},onTouchStart(e){let t=e.changedTouches[0];this.startPos={x:t.pageX,y:t.pageY}},onTouchMove(e){e.cancelable&&e.preventDefault()},onTouchEnd(e){let t=e.changedTouches[0];this.isVertical?this.changePageOnTouch(e,t.pageY-this.startPos.y):this.changePageOnTouch(e,t.pageX-this.startPos.x)},changePageOnTouch(e,t){t<0?this.navForward(e):this.navBackward(e)},getTotalPageNumber(){return this.value.length>this.d_numVisible?this.value.length-this.d_numVisible+1:0},createStyle(){this.thumbnailsStyle||(this.thumbnailsStyle=document.createElement("style"),this.thumbnailsStyle.type="text/css",document.body.appendChild(this.thumbnailsStyle));let e=`\n #${this.containerId} .p-galleria-thumbnail-item {\n flex: 1 0 ${100/this.d_numVisible}%\n }\n `;if(this.responsiveOptions){this.sortedResponsiveOptions=[...this.responsiveOptions],this.sortedResponsiveOptions.sort(((e,t)=>{const i=e.breakpoint,n=t.breakpoint;let a=null;return a=null==i&&null!=n?-1:null!=i&&null==n?1:null==i&&null==n?0:"string"==typeof i&&"string"==typeof n?i.localeCompare(n,void 0,{numeric:!0}):i<n?-1:i>n?1:0,-1*a}));for(let t=0;t<this.sortedResponsiveOptions.length;t++){let i=this.sortedResponsiveOptions[t];e+=`\n screen and (max-width: ${i.breakpoint}) {\n #${this.containerId} .p-galleria-thumbnail-item {\n flex: 1 0 ${100/i.numVisible}%\n }\n }\n `}}this.thumbnailsStyle.innerHTML=e},calculatePosition(){if(this.$refs.itemsContainer&&this.sortedResponsiveOptions){let e=window.innerWidth,t={numVisible:this.numVisible};for(let i=0;i<this.sortedResponsiveOptions.length;i++){let n=this.sortedResponsiveOptions[i];parseInt(n.breakpoint,10)>=e&&(t=n)}this.d_numVisible!==t.numVisible&&(this.d_numVisible=t.numVisible)}},bindDocumentListeners(){this.documentResizeListener||(this.documentResizeListener=()=>{this.calculatePosition()},window.addEventListener("resize",this.documentResizeListener))},unbindDocumentListeners(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)},isNavBackwardDisabled(){return!this.circular&&0===this.d_activeIndex||this.value.length<=this.d_numVisible},isNavForwardDisabled(){return!this.circular&&this.d_activeIndex===this.value.length-1||this.value.length<=this.d_numVisible},firstItemAciveIndex(){return-1*this.totalShiftedItems},lastItemActiveIndex(){return this.firstItemAciveIndex()+this.d_numVisible-1},isItemActive(e){return this.firstItemAciveIndex()<=e&&this.lastItemActiveIndex()>=e}},computed:{navBackwardClass(){return["p-galleria-thumbnail-prev p-link",{"p-disabled":this.isNavBackwardDisabled()}]},navForwardClass(){return["p-galleria-thumbnail-next p-link",{"p-disabled":this.isNavForwardDisabled()}]},navBackwardIconClass(){return["p-galleria-thumbnail-prev-icon pi",{"pi-chevron-left":!this.isVertical,"pi-chevron-up":this.isVertical}]},navForwardIconClass(){return["p-galleria-thumbnail-next-icon pi",{"pi-chevron-right":!this.isVertical,"pi-chevron-down":this.isVertical}]}},directives:{ripple:a.default}};const b={class:"p-galleria-thumbnail-wrapper"},v={class:"p-galleria-thumbnail-container"};u.render=function(e,t,n,a,l,s){const o=i.resolveDirective("ripple");return i.openBlock(),i.createBlock("div",b,[i.createVNode("div",v,[n.showThumbnailNavigators?i.withDirectives((i.openBlock(),i.createBlock("button",{key:0,class:s.navBackwardClass,onClick:t[1]||(t[1]=e=>s.navBackward(e)),disabled:s.isNavBackwardDisabled(),type:"button"},[i.createVNode("span",{class:s.navBackwardIconClass},null,2)],10,["disabled"])),[[o]]):i.createCommentVNode("",!0),i.createVNode("div",{class:"p-galleria-thumbnail-items-container",style:{height:n.isVertical?n.contentHeight:""}},[i.createVNode("div",{ref:"itemsContainer",class:"p-galleria-thumbnail-items",onTransitionend:t[2]||(t[2]=(...e)=>s.onTransitionEnd&&s.onTransitionEnd(...e)),onTouchstart:t[3]||(t[3]=e=>s.onTouchStart(e)),onTouchmove:t[4]||(t[4]=e=>s.onTouchMove(e)),onTouchend:t[5]||(t[5]=e=>s.onTouchEnd(e))},[(i.openBlock(!0),i.createBlock(i.Fragment,null,i.renderList(n.value,((e,t)=>(i.openBlock(),i.createBlock("div",{key:`p-galleria-thumbnail-item-${t}`,class:["p-galleria-thumbnail-item",{"p-galleria-thumbnail-item-current":n.activeIndex===t,"p-galleria-thumbnail-item-active":s.isItemActive(t),"p-galleria-thumbnail-item-start":s.firstItemAciveIndex()===t,"p-galleria-thumbnail-item-end":s.lastItemActiveIndex()===t}]},[i.createVNode("div",{class:"p-galleria-thumbnail-item-content",tabindex:s.isItemActive(t)?0:null,onClick:e=>s.onItemClick(t),onKeydown:i.withKeys((e=>s.onItemClick(t)),["enter"])},[n.templates.thumbnail?(i.openBlock(),i.createBlock(i.resolveDynamicComponent(n.templates.thumbnail),{key:0,item:e},null,8,["item"])):i.createCommentVNode("",!0)],40,["tabindex","onClick","onKeydown"])],2)))),128))],544)],4),n.showThumbnailNavigators?i.withDirectives((i.openBlock(),i.createBlock("button",{key:1,class:s.navForwardClass,onClick:t[6]||(t[6]=e=>s.navForward(e)),disabled:s.isNavForwardDisabled(),type:"button"},[i.createVNode("span",{class:s.navForwardIconClass},null,2)],10,["disabled"])),[[o]]):i.createCommentVNode("",!0)])])};var g={name:"GalleriaContent",inheritAttrs:!1,interval:null,emits:["activeitem-change","mask-hide"],data(){return{id:this.$attrs.id||e.UniqueComponentId(),activeIndex:this.$attrs.activeIndex,slideShowActive:!1}},watch:{"$attrs.activeIndex":function(e){this.activeIndex=e}},updated(){this.$emit("activeitem-change",this.activeIndex)},beforeUnmount(){this.slideShowActive&&this.stopSlideShow()},methods:{isAutoPlayActive(){return this.slideShowActive},startSlideShow(){this.interval=setInterval((()=>{let e=this.$attrs.circular&&this.$attrs.value.length-1===this.activeIndex?0:this.activeIndex+1;this.activeIndex=e}),this.$attrs.transitionInterval),this.slideShowActive=!0},stopSlideShow(){this.interval&&clearInterval(this.interval),this.slideShowActive=!1},getPositionClass(e,t){const i=["top","left","bottom","right"].find((e=>e===t));return i?`${e}-${i}`:""},isVertical(){return"left"===this.$attrs.thumbnailsPosition||"right"===this.$attrs.thumbnailsPosition}},computed:{galleriaClass(){const e=this.$attrs.showThumbnails&&this.getPositionClass("p-galleria-thumbnails",this.$attrs.thumbnailsPosition),t=this.$attrs.showIndicators&&this.getPositionClass("p-galleria-indicators",this.$attrs.indicatorsPosition);return["p-galleria p-component",{"p-galleria-fullscreen":this.$attrs.fullScreen,"p-galleria-indicator-onitem":this.$attrs.showIndicatorsOnItem,"p-galleria-item-nav-onhover":this.$attrs.showItemNavigatorsOnHover&&!this.$attrs.fullScreen},e,t,this.$attrs.containerClass]}},components:{GalleriaItem:l,GalleriaThumbnails:u,GalleriaItemSlot:{functional:!0,props:{item:{type:null,default:null},index:{type:Number,default:0},templates:{type:null,default:null},type:{type:String,default:null}},render(e,t){const{item:i,index:n,templates:a,type:l}=t.props,s=a&&a[l];if(s){let e;switch(l){case"item":case"caption":case"thumbnail":e=s({item:i});break;case"indicator":e=s({index:n});break;default:e=s({})}return e?[e]:null}return null}}},directives:{ripple:a.default}};const x=i.createVNode("span",{class:"p-galleria-close-icon pi pi-times"},null,-1),f={key:1,class:"p-galleria-header"},w={class:"p-galleria-content"},k={key:2,class:"p-galleria-footer"};g.render=function(e,t,n,a,l,s){const o=i.resolveComponent("GalleriaItem"),r=i.resolveComponent("GalleriaThumbnails"),d=i.resolveDirective("ripple");return e.$attrs.value&&e.$attrs.value.length>0?(i.openBlock(),i.createBlock("div",{key:0,id:l.id,class:s.galleriaClass,style:e.$attrs.containerStyle},[e.$attrs.fullScreen?i.withDirectives((i.openBlock(),i.createBlock("button",{key:0,type:"button",class:"p-galleria-close p-link",onClick:t[1]||(t[1]=t=>e.$emit("mask-hide"))},[x],512)),[[d]]):i.createCommentVNode("",!0),e.$attrs.templates&&e.$attrs.templates.header?(i.openBlock(),i.createBlock("div",f,[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(e.$attrs.templates.header)))])):i.createCommentVNode("",!0),i.createVNode("div",w,[i.createVNode(o,{value:e.$attrs.value,activeIndex:l.activeIndex,"onUpdate:activeIndex":t[2]||(t[2]=e=>l.activeIndex=e),circular:e.$attrs.circular,templates:e.$attrs.templates,showIndicators:e.$attrs.showIndicators,changeItemOnIndicatorHover:e.$attrs.changeItemOnIndicatorHover,showItemNavigators:e.$attrs.showItemNavigators,autoPlay:e.$attrs.autoPlay,slideShowActive:l.slideShowActive,"onUpdate:slideShowActive":t[3]||(t[3]=e=>l.slideShowActive=e),onStartSlideshow:s.startSlideShow,onStopSlideshow:s.stopSlideShow},null,8,["value","activeIndex","circular","templates","showIndicators","changeItemOnIndicatorHover","showItemNavigators","autoPlay","slideShowActive","onStartSlideshow","onStopSlideshow"]),e.$attrs.showThumbnails?(i.openBlock(),i.createBlock(r,{key:0,containerId:l.id,value:e.$attrs.value,activeIndex:l.activeIndex,"onUpdate:activeIndex":t[4]||(t[4]=e=>l.activeIndex=e),templates:e.$attrs.templates,numVisible:e.$attrs.numVisible,responsiveOptions:e.$attrs.responsiveOptions,circular:e.$attrs.circular,isVertical:s.isVertical(),contentHeight:e.$attrs.verticalThumbnailViewPortHeight,showThumbnailNavigators:e.$attrs.showThumbnailNavigators,slideShowActive:l.slideShowActive,"onUpdate:slideShowActive":t[5]||(t[5]=e=>l.slideShowActive=e),onStopSlideshow:s.stopSlideShow},null,8,["containerId","value","activeIndex","templates","numVisible","responsiveOptions","circular","isVertical","contentHeight","showThumbnailNavigators","slideShowActive","onStopSlideshow"])):i.createCommentVNode("",!0)]),e.$attrs.templates&&e.$attrs.templates.footer?(i.openBlock(),i.createBlock("div",k,[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(e.$attrs.templates.footer)))])):i.createCommentVNode("",!0)],14,["id"])):i.createCommentVNode("",!0)};var y={name:"Galleria",inheritAttrs:!1,emits:["update:activeIndex","update:visible"],props:{id:{type:String,default:null},value:{type:Array,default:null},activeIndex:{type:Number,default:0},fullScreen:{type:Boolean,default:!1},visible:{type:Boolean,default:!1},numVisible:{type:Number,default:3},responsiveOptions:{type:Array,default:null},showItemNavigators:{type:Boolean,default:!1},showThumbnailNavigators:{type:Boolean,default:!0},showItemNavigatorsOnHover:{type:Boolean,default:!1},changeItemOnIndicatorHover:{type:Boolean,default:!1},circular:{type:Boolean,default:!1},autoPlay:{type:Boolean,default:!1},transitionInterval:{type:Number,default:4e3},showThumbnails:{type:Boolean,default:!0},thumbnailsPosition:{type:String,default:"bottom"},verticalThumbnailViewPortHeight:{type:String,default:"300px"},showIndicators:{type:Boolean,default:!1},showIndicatorsOnItem:{type:Boolean,default:!1},indicatorsPosition:{type:String,default:"bottom"},baseZIndex:{type:Number,default:0},maskClass:{type:String,default:null},containerStyle:{type:String,default:null},containerClass:{type:String,default:null}},container:null,mask:null,data(){return{containerVisible:this.visible}},updated(){this.fullScreen&&this.visible&&(this.containerVisible=this.visible)},beforeUnmount(){this.fullScreen&&e.DomHandler.removeClass(document.body,"p-overflow-hidden"),this.mask=null,this.container&&(e.ZIndexUtils.clear(this.container),this.container=null)},methods:{onBeforeEnter(t){e.ZIndexUtils.set("modal",t,this.baseZIndex||this.$primevue.config.zIndex.modal)},onEnter(t){this.mask.style.zIndex=String(parseInt(t.style.zIndex,10)-1),e.DomHandler.addClass(document.body,"p-overflow-hidden")},onBeforeLeave(){e.DomHandler.addClass(this.mask,"p-galleria-mask-leave")},onAfterLeave(t){e.ZIndexUtils.clear(t),this.containerVisible=!1,e.DomHandler.removeClass(document.body,"p-overflow-hidden")},onActiveItemChange(e){this.activeIndex!==e&&this.$emit("update:activeIndex",e)},maskHide(){this.$emit("update:visible",!1)},containerRef(e){this.container=e},maskRef(e){this.mask=e}},computed:{maskContentClass(){return["p-galleria-mask p-component-overlay",this.maskClass,{"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]}},components:{GalleriaContent:g}};!function(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===i&&n.firstChild?n.insertBefore(a,n.firstChild):n.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}("\n.p-galleria-content {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n.p-galleria-item-wrapper {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n position: relative;\n}\n.p-galleria-item-container {\n position: relative;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n height: 100%;\n}\n.p-galleria-item-nav {\n position: absolute;\n top: 50%;\n margin-top: -.5rem;\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n overflow: hidden;\n}\n.p-galleria-item-prev {\n left: 0;\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n}\n.p-galleria-item-next {\n right: 0;\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n}\n.p-galleria-item {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n height: 100%;\n width: 100%;\n}\n.p-galleria-item-nav-onhover .p-galleria-item-nav {\n pointer-events: none;\n opacity: 0;\n -webkit-transition: opacity .2s ease-in-out;\n transition: opacity .2s ease-in-out;\n}\n.p-galleria-item-nav-onhover .p-galleria-item-wrapper:hover .p-galleria-item-nav {\n pointer-events: all;\n opacity: 1;\n}\n.p-galleria-item-nav-onhover .p-galleria-item-wrapper:hover .p-galleria-item-nav.p-disabled {\n pointer-events: none;\n}\n.p-galleria-caption {\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n}\n\n/* Thumbnails */\n.p-galleria-thumbnail-wrapper {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n overflow: auto;\n -ms-flex-negative: 0;\n flex-shrink: 0;\n}\n.p-galleria-thumbnail-prev,\n.p-galleria-thumbnail-next {\n -ms-flex-item-align: center;\n align-self: center;\n -webkit-box-flex: 0;\n -ms-flex: 0 0 auto;\n flex: 0 0 auto;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n overflow: hidden;\n position: relative;\n}\n.p-galleria-thumbnail-prev span,\n.p-galleria-thumbnail-next span {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n.p-galleria-thumbnail-container {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-direction: row;\n flex-direction: row;\n}\n.p-galleria-thumbnail-items-container {\n overflow: hidden;\n}\n.p-galleria-thumbnail-items {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n}\n.p-galleria-thumbnail-item {\n overflow: auto;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n cursor: pointer;\n opacity: .5;\n}\n.p-galleria-thumbnail-item:hover {\n opacity: 1;\n -webkit-transition: opacity .3s;\n transition: opacity .3s;\n}\n.p-galleria-thumbnail-item-current {\n opacity: 1;\n}\n\n/* Positions */\n/* Thumbnails */\n.p-galleria-thumbnails-left .p-galleria-content,\n.p-galleria-thumbnails-right .p-galleria-content {\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-direction: row;\n flex-direction: row;\n}\n.p-galleria-thumbnails-left .p-galleria-item-wrapper,\n.p-galleria-thumbnails-right .p-galleria-item-wrapper {\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-direction: row;\n flex-direction: row;\n}\n.p-galleria-thumbnails-left .p-galleria-item-wrapper,\n.p-galleria-thumbnails-top .p-galleria-item-wrapper {\n -webkit-box-ordinal-group: 3;\n -ms-flex-order: 2;\n order: 2;\n}\n.p-galleria-thumbnails-left .p-galleria-thumbnail-wrapper,\n.p-galleria-thumbnails-top .p-galleria-thumbnail-wrapper {\n -webkit-box-ordinal-group: 2;\n -ms-flex-order: 1;\n order: 1;\n}\n.p-galleria-thumbnails-left .p-galleria-thumbnail-container,\n.p-galleria-thumbnails-right .p-galleria-thumbnail-container {\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n -webkit-box-flex: 1;\n -ms-flex-positive: 1;\n flex-grow: 1;\n}\n.p-galleria-thumbnails-left .p-galleria-thumbnail-items,\n.p-galleria-thumbnails-right .p-galleria-thumbnail-items {\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n height: 100%;\n}\n\n/* Indicators */\n.p-galleria-indicators {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n.p-galleria-indicator > button {\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n.p-galleria-indicators-left .p-galleria-item-wrapper,\n.p-galleria-indicators-right .p-galleria-item-wrapper {\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-direction: row;\n flex-direction: row;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n.p-galleria-indicators-left .p-galleria-item-container,\n.p-galleria-indicators-top .p-galleria-item-container {\n -webkit-box-ordinal-group: 3;\n -ms-flex-order: 2;\n order: 2;\n}\n.p-galleria-indicators-left .p-galleria-indicators,\n.p-galleria-indicators-top .p-galleria-indicators {\n -webkit-box-ordinal-group: 2;\n -ms-flex-order: 1;\n order: 1;\n}\n.p-galleria-indicators-left .p-galleria-indicators,\n.p-galleria-indicators-right .p-galleria-indicators {\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n.p-galleria-indicator-onitem .p-galleria-indicators {\n position: absolute;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n}\n.p-galleria-indicator-onitem.p-galleria-indicators-top .p-galleria-indicators {\n top: 0;\n left: 0;\n width: 100%;\n -webkit-box-align: start;\n -ms-flex-align: start;\n align-items: flex-start;\n}\n.p-galleria-indicator-onitem.p-galleria-indicators-right .p-galleria-indicators {\n right: 0;\n top: 0;\n height: 100%;\n -webkit-box-align: end;\n -ms-flex-align: end;\n align-items: flex-end;\n}\n.p-galleria-indicator-onitem.p-galleria-indicators-bottom .p-galleria-indicators {\n bottom: 0;\n left: 0;\n width: 100%;\n -webkit-box-align: end;\n -ms-flex-align: end;\n align-items: flex-end;\n}\n.p-galleria-indicator-onitem.p-galleria-indicators-left .p-galleria-indicators {\n left: 0;\n top: 0;\n height: 100%;\n -webkit-box-align: start;\n -ms-flex-align: start;\n align-items: flex-start;\n}\n\n/* FullScreen */\n.p-galleria-mask {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n background-color: transparent;\n -webkit-transition-property: background-color;\n transition-property: background-color;\n}\n.p-galleria-close {\n position: absolute;\n top: 0;\n right: 0;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n overflow: hidden;\n}\n.p-galleria-mask .p-galleria-item-nav {\n position: fixed;\n top: 50%;\n margin-top: -.5rem;\n}\n\n/* Animation */\n.p-galleria-enter-active {\n -webkit-transition: all 150ms cubic-bezier(0, 0, 0.2, 1);\n transition: all 150ms cubic-bezier(0, 0, 0.2, 1);\n}\n.p-galleria-leave-active {\n -webkit-transition: all 150ms cubic-bezier(0.4, 0.0, 0.2, 1);\n transition: all 150ms cubic-bezier(0.4, 0.0, 0.2, 1);\n}\n.p-galleria-enter-from,\n.p-galleria-leave-to {\n opacity: 0;\n -webkit-transform: scale(0.7);\n transform: scale(0.7);\n}\n.p-galleria-enter-active .p-galleria-item-nav {\n opacity: 0;\n}\n.p-galleria-mask.p-galleria-mask-leave {\n background-color: transparent;\n}\n\n/* Keyboard Support */\n.p-items-hidden .p-galleria-thumbnail-item {\n visibility: hidden;\n}\n.p-items-hidden .p-galleria-thumbnail-item.p-galleria-thumbnail-item-active {\n visibility: visible;\n}\n"),y.render=function(e,t,n,a,l,s){const o=i.resolveComponent("GalleriaContent");return n.fullScreen?(i.openBlock(),i.createBlock(i.Teleport,{key:0,to:"body"},[l.containerVisible?(i.openBlock(),i.createBlock("div",{key:0,ref:s.maskRef,class:s.maskContentClass},[i.createVNode(i.Transition,{name:"p-galleria",onBeforeEnter:s.onBeforeEnter,onEnter:s.onEnter,onBeforeLeave:s.onBeforeLeave,onAfterLeave:s.onAfterLeave,appear:""},{default:i.withCtx((()=>[n.visible?(i.openBlock(),i.createBlock(o,i.mergeProps({key:0,ref:s.containerRef},e.$props,{onMaskHide:s.maskHide,templates:e.$slots,onActiveitemChange:s.onActiveItemChange}),null,16,["onMaskHide","templates","onActiveitemChange"])):i.createCommentVNode("",!0)])),_:1},8,["onBeforeEnter","onEnter","onBeforeLeave","onAfterLeave"])],2)):i.createCommentVNode("",!0)])):(i.openBlock(),i.createBlock(o,i.mergeProps({key:1},e.$props,{templates:e.$slots,onActiveitemChange:s.onActiveItemChange}),null,16,["templates","onActiveitemChange"]))},module.exports=y;