UNPKG

primevue

Version:

PrimeVue is an open source UI library for Vue featuring a rich set of 80+ components, a theme designer, various theme alternatives such as Material, Bootstrap, Tailwind, premium templates and professional support. In addition, it integrates with PrimeBloc

2 lines (1 loc) 36.6 kB
this.primevue=this.primevue||{},this.primevue.galleria=function(e,t,n,i,a,o,r,s,l,c,d,u){"use strict";function m(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var h=m(e),p=m(t),v=m(i),f=m(a),b=m(o),y=m(r),I=m(s),g=m(l),x=m(d),S=m(u),w={name:"BaseGalleria",extends:v.default,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:null,default:null},containerClass:{type:null,default:null},containerProps:{type:null,default:null},prevButtonProps:{type:null,default:null},nextButtonProps:{type:null,default:null},ariaLabel:{type:String,default:null},ariaRoledescription:{type:String,default:null}},style:f.default,provide:function(){return{$parentInstance:this}}};function k(e){return $(e)||C(e)||P(e)||B()}function B(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function P(e,t){if(e){if("string"==typeof e)return O(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?O(e,t):void 0}}function C(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function $(e){if(Array.isArray(e))return O(e)}function O(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var V={name:"GalleriaItem",hostName:"Galleria",extends:v.default,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},id:{type:String,default:null}},mounted:function(){this.autoPlay&&this.$emit("start-slideshow")},methods:{getIndicatorPTOptions:function(e){return{context:{highlighted:this.activeIndex===e}}},next:function(){this.$emit("update:activeIndex",this.circular&&this.value.length-1===this.activeIndex?0:this.activeIndex+1)},prev:function(){this.$emit("update:activeIndex",this.circular&&0===this.activeIndex?this.value.length-1:0!==this.activeIndex?this.activeIndex-1:0)},stopSlideShow:function(){this.slideShowActive&&this.stopSlideShow&&this.$emit("stop-slideshow")},navBackward:function(e){this.stopSlideShow(),this.prev(),e&&e.cancelable&&e.preventDefault()},navForward:function(e){this.stopSlideShow(),this.next(),e&&e.cancelable&&e.preventDefault()},onIndicatorClick:function(e){this.stopSlideShow(),this.$emit("update:activeIndex",e)},onIndicatorMouseEnter:function(e){this.changeItemOnIndicatorHover&&(this.stopSlideShow(),this.$emit("update:activeIndex",e))},onIndicatorKeyDown:function(e,t){switch(e.code){case"Enter":case"NumpadEnter":case"Space":this.stopSlideShow(),this.$emit("update:activeIndex",t),e.preventDefault();break;case"ArrowRight":this.onRightKey();break;case"ArrowLeft":this.onLeftKey();break;case"Home":this.onHomeKey(),e.preventDefault();break;case"End":this.onEndKey(),e.preventDefault();break;case"Tab":this.onTabKey();break;case"ArrowDown":case"ArrowUp":case"PageUp":case"PageDown":e.preventDefault()}},onRightKey:function(){var e=k(n.DomHandler.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]')),t=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(t,t+1===e.length?e.length-1:t+1)},onLeftKey:function(){var e=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(e,e-1<=0?0:e-1)},onHomeKey:function(){var e=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(e,0)},onEndKey:function(){var e=k(n.DomHandler.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]')),t=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(t,e.length-1)},onTabKey:function(){var e=k(n.DomHandler.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]')),t=e.findIndex((function(e){return!0===n.DomHandler.getAttribute(e,"data-p-highlight")})),i=n.DomHandler.findSingle(this.$refs.indicatorContent,'[data-pc-section="indicator"] > button[tabindex="0"]'),a=e.findIndex((function(e){return e===i.parentElement}));e[a].children[0].tabIndex="-1",e[t].children[0].tabIndex="0"},findFocusedIndicatorIndex:function(){var e=k(n.DomHandler.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]')),t=n.DomHandler.findSingle(this.$refs.indicatorContent,'[data-pc-section="indicator"] > button[tabindex="0"]');return e.findIndex((function(e){return e===t.parentElement}))},changedFocusedIndicator:function(e,t){var i=k(n.DomHandler.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]'));i[e].children[0].tabIndex="-1",i[t].children[0].tabIndex="0",i[t].children[0].focus()},isIndicatorItemActive:function(e){return this.activeIndex===e},isNavBackwardDisabled:function(){return!this.circular&&0===this.activeIndex},isNavForwardDisabled:function(){return!this.circular&&this.activeIndex===this.value.length-1},ariaSlideNumber:function(e){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.slideNumber.replace(/{slideNumber}/g,e):void 0},ariaPageLabel:function(e){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.pageLabel.replace(/{page}/g,e):void 0}},computed:{activeItem:function(){return this.value[this.activeIndex]},ariaSlideLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.slide:void 0}},components:{ChevronLeftIcon:I.default,ChevronRightIcon:g.default},directives:{ripple:y.default}},D=["disabled"],A=["id","aria-label","aria-roledescription"],N=["disabled"],T=["aria-label","aria-selected","aria-controls","onClick","onMouseenter","onKeydown","data-p-highlight"],E=["tabindex"];function _(e){return F(e)||H(e)||L(e)||j()}function j(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function L(e,t){if(e){if("string"==typeof e)return R(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?R(e,t):void 0}}function H(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function F(e){if(Array.isArray(e))return R(e)}function R(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}V.render=function(e,t,n,i,a,o){var r=c.resolveDirective("ripple");return c.openBlock(),c.createElementBlock("div",c.mergeProps({class:e.cx("itemWrapper")},e.ptm("itemWrapper")),[c.createElementVNode("div",c.mergeProps({class:e.cx("itemContainer")},e.ptm("itemContainer")),[n.showItemNavigators?c.withDirectives((c.openBlock(),c.createElementBlock("button",c.mergeProps({key:0,type:"button",class:e.cx("previousItemButton"),onClick:t[0]||(t[0]=function(e){return o.navBackward(e)}),disabled:o.isNavBackwardDisabled()},e.ptm("previousItemButton"),{"data-pc-group-section":"itemnavigator"}),[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(n.templates.previousitemicon||"ChevronLeftIcon"),c.mergeProps({class:e.cx("previousItemIcon")},e.ptm("previousItemIcon")),null,16,["class"]))],16,D)),[[r]]):c.createCommentVNode("",!0),c.createElementVNode("div",c.mergeProps({id:n.id+"_item_"+n.activeIndex,class:e.cx("item"),role:"group","aria-label":o.ariaSlideNumber(n.activeIndex+1),"aria-roledescription":o.ariaSlideLabel},e.ptm("item")),[n.templates.item?(c.openBlock(),c.createBlock(c.resolveDynamicComponent(n.templates.item),{key:0,item:o.activeItem},null,8,["item"])):c.createCommentVNode("",!0)],16,A),n.showItemNavigators?c.withDirectives((c.openBlock(),c.createElementBlock("button",c.mergeProps({key:1,type:"button",class:e.cx("nextItemButton"),onClick:t[1]||(t[1]=function(e){return o.navForward(e)}),disabled:o.isNavForwardDisabled()},e.ptm("nextItemButton"),{"data-pc-group-section":"itemnavigator"}),[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(n.templates.nextitemicon||"ChevronRightIcon"),c.mergeProps({class:e.cx("nextItemIcon")},e.ptm("nextItemIcon")),null,16,["class"]))],16,N)),[[r]]):c.createCommentVNode("",!0),n.templates.caption?(c.openBlock(),c.createElementBlock("div",c.mergeProps({key:2,class:e.cx("caption")},e.ptm("caption")),[n.templates.caption?(c.openBlock(),c.createBlock(c.resolveDynamicComponent(n.templates.caption),{key:0,item:o.activeItem},null,8,["item"])):c.createCommentVNode("",!0)],16)):c.createCommentVNode("",!0)],16),n.showIndicators?(c.openBlock(),c.createElementBlock("ul",c.mergeProps({key:0,ref:"indicatorContent",class:e.cx("indicators")},e.ptm("indicators")),[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(n.value,(function(t,i){return c.openBlock(),c.createElementBlock("li",c.mergeProps({key:"p-galleria-indicator-".concat(i),class:e.cx("indicator",{index:i}),"aria-label":o.ariaPageLabel(i+1),"aria-selected":n.activeIndex===i,"aria-controls":n.id+"_item_"+i,onClick:function(e){return o.onIndicatorClick(i)},onMouseenter:function(e){return o.onIndicatorMouseEnter(i)},onKeydown:function(e){return o.onIndicatorKeyDown(e,i)}},e.ptm("indicator",o.getIndicatorPTOptions(i)),{"data-p-highlight":o.isIndicatorItemActive(i)}),[n.templates.indicator?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("button",c.mergeProps({key:0,type:"button",tabindex:n.activeIndex===i?"0":"-1",class:e.cx("indicatorButton")},e.ptm("indicatorButton",o.getIndicatorPTOptions(i))),null,16,E)),n.templates.indicator?(c.openBlock(),c.createBlock(c.resolveDynamicComponent(n.templates.indicator),{key:1,index:i},null,8,["index"])):c.createCommentVNode("",!0)],16,T)})),128))],16)):c.createCommentVNode("",!0)],16)};var K={name:"GalleriaThumbnails",hostName:"Galleria",extends:v.default,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},prevButtonProps:{type:null,default:null},nextButtonProps:{type:null,default:null}},startPos:null,thumbnailsStyle:null,sortedResponsiveOptions:null,data:function(){return{d_numVisible:this.numVisible,d_oldNumVisible:this.numVisible,d_activeIndex:this.activeIndex,d_oldActiveItemIndex:this.activeIndex,totalShiftedItems:0,page:0}},watch:{numVisible:function(e,t){this.d_numVisible=e,this.d_oldNumVisible=t},activeIndex:function(e,t){this.d_activeIndex=e,this.d_oldActiveItemIndex=t}},mounted:function(){this.createStyle(),this.calculatePosition(),this.responsiveOptions&&this.bindDocumentListeners()},updated:function(){var e=this.totalShiftedItems;this.d_oldNumVisible===this.d_numVisible&&this.d_oldActiveItemIndex===this.d_activeIndex||((e=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())!==this.totalShiftedItems&&(this.totalShiftedItems=e),this.$refs.itemsContainer.style.transform=this.isVertical?"translate3d(0, ".concat(e*(100/this.d_numVisible),"%, 0)"):"translate3d(".concat(e*(100/this.d_numVisible),"%, 0, 0)"),this.d_oldActiveItemIndex!==this.d_activeIndex&&(document.body.setAttribute("data-p-items-hidden","false"),!this.isUnstyled&&n.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:function(){this.responsiveOptions&&this.unbindDocumentListeners(),this.thumbnailsStyle&&this.thumbnailsStyle.parentNode.removeChild(this.thumbnailsStyle)},methods:{step:function(e){var t=this.totalShiftedItems+e;e<0&&-1*t+this.d_numVisible>this.value.length-1?t=this.d_numVisible-this.value.length:e>0&&t>0&&(t=0),this.circular&&(e<0&&this.value.length-1===this.d_activeIndex?t=0:e>0&&0===this.d_activeIndex&&(t=this.d_numVisible-this.value.length)),this.$refs.itemsContainer&&(document.body.setAttribute("data-p-items-hidden","false"),!this.isUnstyled&&n.DomHandler.removeClass(this.$refs.itemsContainer,"p-items-hidden"),this.$refs.itemsContainer.style.transform=this.isVertical?"translate3d(0, ".concat(t*(100/this.d_numVisible),"%, 0)"):"translate3d(".concat(t*(100/this.d_numVisible),"%, 0, 0)"),this.$refs.itemsContainer.style.transition="transform 500ms ease 0s"),this.totalShiftedItems=t},stopSlideShow:function(){this.slideShowActive&&this.stopSlideShow&&this.$emit("stop-slideshow")},getMedianItemIndex:function(){var e=Math.floor(this.d_numVisible/2);return this.d_numVisible%2?e:e-1},navBackward:function(e){this.stopSlideShow();var t=0!==this.d_activeIndex?this.d_activeIndex-1:0;this.d_numVisible-(t+this.totalShiftedItems)-1>this.getMedianItemIndex()&&(-1*this.totalShiftedItems!=0||this.circular)&&this.step(1),this.$emit("update:activeIndex",this.circular&&0===this.d_activeIndex?this.value.length-1:t),e.cancelable&&e.preventDefault()},navForward:function(e){this.stopSlideShow();var t=this.d_activeIndex===this.value.length-1?this.value.length-1:this.d_activeIndex+1;t+this.totalShiftedItems>this.getMedianItemIndex()&&(-1*this.totalShiftedItems<this.getTotalPageNumber()-1||this.circular)&&this.step(-1),this.$emit("update:activeIndex",this.circular&&this.value.length-1===this.d_activeIndex?0:t),e.cancelable&&e.preventDefault()},onItemClick:function(e){this.stopSlideShow();var t=e;if(t!==this.d_activeIndex){var n=t+this.totalShiftedItems,i=0;t<this.d_activeIndex?(i=this.d_numVisible-n-1-this.getMedianItemIndex())>0&&-1*this.totalShiftedItems!=0&&this.step(i):(i=this.getMedianItemIndex()-n)<0&&-1*this.totalShiftedItems<this.getTotalPageNumber()-1&&this.step(i),this.$emit("update:activeIndex",t)}},onThumbnailKeydown:function(e,t){switch("Enter"!==e.code&&"NumpadEnter"!==e.code&&"Space"!==e.code||(this.onItemClick(t),e.preventDefault()),e.code){case"ArrowRight":this.onRightKey();break;case"ArrowLeft":this.onLeftKey();break;case"Home":this.onHomeKey(),e.preventDefault();break;case"End":this.onEndKey(),e.preventDefault();break;case"ArrowUp":case"ArrowDown":e.preventDefault();break;case"Tab":this.onTabKey()}},onRightKey:function(){var e=n.DomHandler.find(this.$refs.itemsContainer,'[data-pc-section="thumbnailitem"]'),t=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(t,t+1===e.length?e.length-1:t+1)},onLeftKey:function(){var e=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(e,e-1<=0?0:e-1)},onHomeKey:function(){var e=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(e,0)},onEndKey:function(){var e=n.DomHandler.find(this.$refs.itemsContainer,'[data-pc-section="thumbnailitem"]'),t=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(t,e.length-1)},onTabKey:function(){var e=_(n.DomHandler.find(this.$refs.itemsContainer,'[data-pc-section="thumbnailitem"]')),t=e.findIndex((function(e){return!0===n.DomHandler.getAttribute(e,"data-p-active")})),i=n.DomHandler.findSingle(this.$refs.itemsContainer,'[tabindex="0"]'),a=e.findIndex((function(e){return e===i.parentElement}));e[a].children[0].tabIndex="-1",e[t].children[0].tabIndex="0"},findFocusedIndicatorIndex:function(){var e=_(n.DomHandler.find(this.$refs.itemsContainer,'[data-pc-section="thumbnailitem"]')),t=n.DomHandler.findSingle(this.$refs.itemsContainer,'[data-pc-section="thumbnailitem"] > [tabindex="0"]');return e.findIndex((function(e){return e===t.parentElement}))},changedFocusedIndicator:function(e,t){var i=n.DomHandler.find(this.$refs.itemsContainer,'[data-pc-section="thumbnailitem"]');i[e].children[0].tabIndex="-1",i[t].children[0].tabIndex="0",i[t].children[0].focus()},onTransitionEnd:function(){this.$refs.itemsContainer&&(document.body.setAttribute("data-p-items-hidden","true"),!this.isUnstyled&&n.DomHandler.addClass(this.$refs.itemsContainer,"p-items-hidden"),this.$refs.itemsContainer.style.transition="")},onTouchStart:function(e){var t=e.changedTouches[0];this.startPos={x:t.pageX,y:t.pageY}},onTouchMove:function(e){e.cancelable&&e.preventDefault()},onTouchEnd:function(e){var t=e.changedTouches[0];this.changePageOnTouch(e,this.isVertical?t.pageY-this.startPos.y:t.pageX-this.startPos.x)},changePageOnTouch:function(e,t){t<0?this.navForward(e):this.navBackward(e)},getTotalPageNumber:function(){return this.value.length>this.d_numVisible?this.value.length-this.d_numVisible+1:0},createStyle:function(){var e;this.thumbnailsStyle||(this.thumbnailsStyle=document.createElement("style"),this.thumbnailsStyle.type="text/css",n.DomHandler.setAttribute(this.thumbnailsStyle,"nonce",null===(e=this.$primevue)||void 0===e||null===(e=e.config)||void 0===e||null===(e=e.csp)||void 0===e?void 0:e.nonce),document.body.appendChild(this.thumbnailsStyle));var t="\n #".concat(this.containerId,' [data-pc-section="thumbnailitem"] {\n flex: 1 0 ').concat(100/this.d_numVisible,"%\n }\n ");if(this.responsiveOptions&&!this.isUnstyled){this.sortedResponsiveOptions=_(this.responsiveOptions);var i=n.ObjectUtils.localeComparator();this.sortedResponsiveOptions.sort((function(e,t){return n.ObjectUtils.sort(e.breakpoint,t.breakpoint,-1,i)}));for(var a=0;a<this.sortedResponsiveOptions.length;a++){var o=this.sortedResponsiveOptions[a];t+="\n @media screen and (max-width: ".concat(o.breakpoint,") {\n #").concat(this.containerId," .p-galleria-thumbnail-item {\n flex: 1 0 ").concat(100/o.numVisible,"%\n }\n }\n ")}}this.thumbnailsStyle.innerHTML=t},calculatePosition:function(){if(this.$refs.itemsContainer&&this.sortedResponsiveOptions){for(var e=window.innerWidth,t={numVisible:this.numVisible},n=0;n<this.sortedResponsiveOptions.length;n++){var i=this.sortedResponsiveOptions[n];parseInt(i.breakpoint,10)>=e&&(t=i)}this.d_numVisible!==t.numVisible&&(this.d_numVisible=t.numVisible)}},bindDocumentListeners:function(){var e=this;this.documentResizeListener||(this.documentResizeListener=function(){e.calculatePosition()},window.addEventListener("resize",this.documentResizeListener))},unbindDocumentListeners:function(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)},isNavBackwardDisabled:function(){return!this.circular&&0===this.d_activeIndex||this.value.length<=this.d_numVisible},isNavForwardDisabled:function(){return!this.circular&&this.d_activeIndex===this.value.length-1||this.value.length<=this.d_numVisible},firstItemAciveIndex:function(){return-1*this.totalShiftedItems},lastItemActiveIndex:function(){return this.firstItemAciveIndex()+this.d_numVisible-1},isItemActive:function(e){return this.firstItemAciveIndex()<=e&&this.lastItemActiveIndex()>=e},ariaPageLabel:function(e){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.pageLabel.replace(/{page}/g,e):void 0}},computed:{ariaPrevButtonLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.prevPageLabel:void 0},ariaNextButtonLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.nextPageLabel:void 0}},components:{ChevronLeftIcon:I.default,ChevronRightIcon:g.default,ChevronUpIcon:S.default,ChevronDownIcon:x.default},directives:{ripple:y.default}};function U(e){return U="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},U(e)}function M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function G(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?M(Object(n),!0).forEach((function(t){z(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function z(e,t,n){var i;return(t="symbol"==U(i=W(t,"string"))?i:String(i))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function W(e,t){if("object"!=U(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=U(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var Z=["disabled","aria-label"],q=["data-p-active","aria-selected","aria-controls","onKeydown","data-p-galleria-thumbnail-item-current","data-p-galleria-thumbnail-item-active","data-p-galleria-thumbnail-item-start","data-p-galleria-thumbnail-item-end"],X=["tabindex","aria-label","aria-current","onClick"],Y=["disabled","aria-label"];function J(e){return J="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},J(e)}function Q(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function ee(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Q(Object(n),!0).forEach((function(t){te(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Q(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function te(e,t,n){var i;return(t="symbol"==J(i=ne(t,"string"))?i:String(i))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ne(e,t){if("object"!=J(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=J(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}K.render=function(e,t,n,i,a,o){var r=c.resolveDirective("ripple");return c.openBlock(),c.createElementBlock("div",c.mergeProps({class:e.cx("thumbnailWrapper")},e.ptm("thumbnailWrapper")),[c.createElementVNode("div",c.mergeProps({class:e.cx("thumbnailContainer")},e.ptm("thumbnailContainer")),[n.showThumbnailNavigators?c.withDirectives((c.openBlock(),c.createElementBlock("button",c.mergeProps({key:0,class:e.cx("previousThumbnailButton"),disabled:o.isNavBackwardDisabled(),type:"button","aria-label":o.ariaPrevButtonLabel,onClick:t[0]||(t[0]=function(e){return o.navBackward(e)})},G(G({},n.prevButtonProps),e.ptm("previousThumbnailButton")),{"data-pc-group-section":"thumbnailnavigator"}),[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(n.templates.previousthumbnailicon||(n.isVertical?"ChevronUpIcon":"ChevronLeftIcon")),c.mergeProps({class:e.cx("previousThumbnailIcon")},e.ptm("previousThumbnailIcon")),null,16,["class"]))],16,Z)),[[r]]):c.createCommentVNode("",!0),c.createElementVNode("div",c.mergeProps({class:e.cx("thumbnailItemsContainer"),style:{height:n.isVertical?n.contentHeight:""}},e.ptm("thumbnailItemsContainer")),[c.createElementVNode("div",c.mergeProps({ref:"itemsContainer",class:e.cx("thumbnailItems"),role:"tablist",onTransitionend:t[1]||(t[1]=function(){return o.onTransitionEnd&&o.onTransitionEnd.apply(o,arguments)}),onTouchstart:t[2]||(t[2]=function(e){return o.onTouchStart(e)}),onTouchmove:t[3]||(t[3]=function(e){return o.onTouchMove(e)}),onTouchend:t[4]||(t[4]=function(e){return o.onTouchEnd(e)})},e.ptm("thumbnailItems")),[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(n.value,(function(t,i){return c.openBlock(),c.createElementBlock("div",c.mergeProps({key:"p-galleria-thumbnail-item-".concat(i),class:e.cx("thumbnailItem",{index:i,activeIndex:n.activeIndex}),role:"tab","data-p-active":n.activeIndex===i,"aria-selected":n.activeIndex===i,"aria-controls":n.containerId+"_item_"+i,onKeydown:function(e){return o.onThumbnailKeydown(e,i)}},e.ptm("thumbnailItem"),{"data-p-galleria-thumbnail-item-current":n.activeIndex===i,"data-p-galleria-thumbnail-item-active":o.isItemActive(i),"data-p-galleria-thumbnail-item-start":o.firstItemAciveIndex()===i,"data-p-galleria-thumbnail-item-end":o.lastItemActiveIndex()===i}),[c.createElementVNode("div",c.mergeProps({class:e.cx("thumbnailItemContent"),tabindex:n.activeIndex===i?"0":"-1","aria-label":o.ariaPageLabel(i+1),"aria-current":n.activeIndex===i?"page":void 0,onClick:function(e){return o.onItemClick(i)}},e.ptm("thumbnailItemContent")),[n.templates.thumbnail?(c.openBlock(),c.createBlock(c.resolveDynamicComponent(n.templates.thumbnail),{key:0,item:t},null,8,["item"])):c.createCommentVNode("",!0)],16,X)],16,q)})),128))],16)],16),n.showThumbnailNavigators?c.withDirectives((c.openBlock(),c.createElementBlock("button",c.mergeProps({key:1,class:e.cx("nextThumbnailButton"),disabled:o.isNavForwardDisabled(),type:"button","aria-label":o.ariaNextButtonLabel,onClick:t[5]||(t[5]=function(e){return o.navForward(e)})},G(G({},n.nextButtonProps),e.ptm("nextThumbnailButton")),{"data-pc-group-section":"thumbnailnavigator"}),[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(n.templates.nextthumbnailicon||(n.isVertical?"ChevronDownIcon":"ChevronRightIcon")),c.mergeProps({class:e.cx("nextThumbnailIcon")},e.ptm("nextThumbnailIcon")),null,16,["class"]))],16,Y)),[[r]]):c.createCommentVNode("",!0)],16)],16)};var ie={name:"GalleriaContent",hostName:"Galleria",extends:v.default,inheritAttrs:!1,interval:null,emits:["activeitem-change","mask-hide"],data:function(){return{id:this.$attrs.id||n.UniqueComponentId(),activeIndex:this.$attrs.activeIndex,numVisible:this.$attrs.numVisible,slideShowActive:!1}},watch:{"$attrs.value":function(e){e&&e.length<this.numVisible&&(this.numVisible=e.length)},"$attrs.activeIndex":function(e){this.activeIndex=e},"$attrs.numVisible":function(e){this.numVisible=e},"$attrs.autoPlay":function(e){e?this.startSlideShow():this.stopSlideShow()}},updated:function(){this.$emit("activeitem-change",this.activeIndex)},beforeUnmount:function(){this.slideShowActive&&this.stopSlideShow()},methods:{getPTOptions:function(e){return this.ptm(e,{props:ee(ee({},this.$attrs),{},{pt:this.pt,unstyled:this.unstyled})})},isAutoPlayActive:function(){return this.slideShowActive},startSlideShow:function(){var e=this;this.interval=setInterval((function(){e.activeIndex=e.$attrs.circular&&e.$attrs.value.length-1===e.activeIndex?0:e.activeIndex+1}),this.$attrs.transitionInterval),this.slideShowActive=!0},stopSlideShow:function(){this.interval&&clearInterval(this.interval),this.slideShowActive=!1},getPositionClass:function(e,t){var n=["top","left","bottom","right"].find((function(e){return e===t}));return n?"".concat(e,"-").concat(n):""},isVertical:function(){return"left"===this.$attrs.thumbnailsPosition||"right"===this.$attrs.thumbnailsPosition}},computed:{closeAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.close:void 0}},components:{GalleriaItem:V,GalleriaThumbnails:K,TimesIcon:b.default},directives:{ripple:y.default}};function ae(e){return ae="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ae(e)}function oe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function re(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?oe(Object(n),!0).forEach((function(t){se(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function se(e,t,n){var i;return(t="symbol"==ae(i=le(t,"string"))?i:String(i))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function le(e,t){if("object"!=ae(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=ae(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var ce=["id","aria-label","aria-roledescription"],de=["aria-label"],ue=["aria-live"];ie.render=function(e,t,n,i,a,o){var r=c.resolveComponent("GalleriaItem"),s=c.resolveComponent("GalleriaThumbnails"),l=c.resolveDirective("ripple");return e.$attrs.value&&e.$attrs.value.length>0?(c.openBlock(),c.createElementBlock("div",c.mergeProps({key:0,id:a.id,role:"region",class:[e.cx("root"),e.$attrs.containerClass],style:e.$attrs.containerStyle,"aria-label":e.$attrs.ariaLabel,"aria-roledescription":e.$attrs.ariaRoledescription},re(re({},e.$attrs.containerProps),o.getPTOptions("root")),{"data-pc-name":"galleria"}),[e.$attrs.fullScreen?c.withDirectives((c.openBlock(),c.createElementBlock("button",c.mergeProps({key:0,autofocus:"",type:"button",class:e.cx("closeButton"),"aria-label":o.closeAriaLabel,onClick:t[0]||(t[0]=function(t){return e.$emit("mask-hide")})},o.getPTOptions("closeButton")),[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(e.$attrs.templates.closeicon||"TimesIcon"),c.mergeProps({class:e.cx("closeIcon")},o.getPTOptions("closeIcon")),null,16,["class"]))],16,de)),[[l]]):c.createCommentVNode("",!0),e.$attrs.templates&&e.$attrs.templates.header?(c.openBlock(),c.createElementBlock("div",c.mergeProps({key:1,class:e.cx("header")},o.getPTOptions("header")),[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(e.$attrs.templates.header)))],16)):c.createCommentVNode("",!0),c.createElementVNode("div",c.mergeProps({class:e.cx("content"),"aria-live":e.$attrs.autoPlay?"polite":"off"},o.getPTOptions("content")),[c.createVNode(r,{id:a.id,activeIndex:a.activeIndex,"onUpdate:activeIndex":t[1]||(t[1]=function(e){return a.activeIndex=e}),slideShowActive:a.slideShowActive,"onUpdate:slideShowActive":t[2]||(t[2]=function(e){return a.slideShowActive=e}),value:e.$attrs.value,circular:e.$attrs.circular,templates:e.$attrs.templates,showIndicators:e.$attrs.showIndicators,changeItemOnIndicatorHover:e.$attrs.changeItemOnIndicatorHover,showItemNavigators:e.$attrs.showItemNavigators,autoPlay:e.$attrs.autoPlay,onStartSlideshow:o.startSlideShow,onStopSlideshow:o.stopSlideShow,pt:e.pt,unstyled:e.unstyled},null,8,["id","activeIndex","slideShowActive","value","circular","templates","showIndicators","changeItemOnIndicatorHover","showItemNavigators","autoPlay","onStartSlideshow","onStopSlideshow","pt","unstyled"]),e.$attrs.showThumbnails?(c.openBlock(),c.createBlock(s,{key:0,activeIndex:a.activeIndex,"onUpdate:activeIndex":t[3]||(t[3]=function(e){return a.activeIndex=e}),slideShowActive:a.slideShowActive,"onUpdate:slideShowActive":t[4]||(t[4]=function(e){return a.slideShowActive=e}),containerId:a.id,value:e.$attrs.value,templates:e.$attrs.templates,numVisible:a.numVisible,responsiveOptions:e.$attrs.responsiveOptions,circular:e.$attrs.circular,isVertical:o.isVertical(),contentHeight:e.$attrs.verticalThumbnailViewPortHeight,showThumbnailNavigators:e.$attrs.showThumbnailNavigators,prevButtonProps:e.$attrs.prevButtonProps,nextButtonProps:e.$attrs.nextButtonProps,onStopSlideshow:o.stopSlideShow,pt:e.pt,unstyled:e.unstyled},null,8,["activeIndex","slideShowActive","containerId","value","templates","numVisible","responsiveOptions","circular","isVertical","contentHeight","showThumbnailNavigators","prevButtonProps","nextButtonProps","onStopSlideshow","pt","unstyled"])):c.createCommentVNode("",!0)],16,ue),e.$attrs.templates&&e.$attrs.templates.footer?(c.openBlock(),c.createElementBlock("div",c.mergeProps({key:2,class:e.cx("footer")},o.getPTOptions("footer")),[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(e.$attrs.templates.footer)))],16)):c.createCommentVNode("",!0)],16,ce)):c.createCommentVNode("",!0)};var me={name:"Galleria",extends:w,inheritAttrs:!1,emits:["update:activeIndex","update:visible"],container:null,mask:null,data:function(){return{containerVisible:this.visible}},updated:function(){this.fullScreen&&this.visible&&(this.containerVisible=this.visible)},beforeUnmount:function(){this.fullScreen&&n.DomHandler.unblockBodyScroll(),this.mask=null,this.container&&(n.ZIndexUtils.clear(this.container),this.container=null)},methods:{onBeforeEnter:function(e){n.ZIndexUtils.set("modal",e,this.baseZIndex||this.$primevue.config.zIndex.modal)},onEnter:function(e){this.mask.style.zIndex=String(parseInt(e.style.zIndex,10)-1),n.DomHandler.blockBodyScroll(),this.focus()},onBeforeLeave:function(){!this.isUnstyled&&n.DomHandler.addClass(this.mask,"p-component-overlay-leave")},onAfterLeave:function(e){n.ZIndexUtils.clear(e),this.containerVisible=!1,n.DomHandler.unblockBodyScroll()},onActiveItemChange:function(e){this.activeIndex!==e&&this.$emit("update:activeIndex",e)},maskHide:function(){this.$emit("update:visible",!1)},containerRef:function(e){this.container=e},maskRef:function(e){this.mask=e},focus:function(){var e=this.container.$el.querySelector("[autofocus]");e&&e.focus()}},components:{GalleriaContent:ie,Portal:p.default},directives:{focustrap:h.default}},he=["aria-modal"];return me.render=function(e,t,n,i,a,o){var r=c.resolveComponent("GalleriaContent"),s=c.resolveComponent("Portal"),l=c.resolveDirective("focustrap");return e.fullScreen?(c.openBlock(),c.createBlock(s,{key:0},{default:c.withCtx((function(){return[a.containerVisible?(c.openBlock(),c.createElementBlock("div",c.mergeProps({key:0,ref:o.maskRef,class:[e.cx("mask"),e.maskClass],role:"dialog","aria-modal":e.fullScreen?"true":void 0},e.ptm("mask")),[c.createVNode(c.Transition,c.mergeProps({name:"p-galleria",onBeforeEnter:o.onBeforeEnter,onEnter:o.onEnter,onBeforeLeave:o.onBeforeLeave,onAfterLeave:o.onAfterLeave,appear:""},e.ptm("transition")),{default:c.withCtx((function(){return[e.visible?c.withDirectives((c.openBlock(),c.createBlock(r,c.mergeProps({key:0,ref:o.containerRef,onMaskHide:o.maskHide,templates:e.$slots,onActiveitemChange:o.onActiveItemChange,pt:e.pt,unstyled:e.unstyled},e.$props),null,16,["onMaskHide","templates","onActiveitemChange","pt","unstyled"])),[[l]]):c.createCommentVNode("",!0)]})),_:1},16,["onBeforeEnter","onEnter","onBeforeLeave","onAfterLeave"])],16,he)):c.createCommentVNode("",!0)]})),_:1})):(c.openBlock(),c.createBlock(r,c.mergeProps({key:1,templates:e.$slots,onActiveitemChange:o.onActiveItemChange,pt:e.pt,unstyled:e.unstyled},e.$props),null,16,["templates","onActiveitemChange","pt","unstyled"]))},me}(primevue.focustrap,primevue.portal,primevue.utils,primevue.basecomponent,primevue.galleria.style,primevue.icons.times,primevue.ripple,primevue.icons.chevronleft,primevue.icons.chevronright,Vue,primevue.icons.chevrondown,primevue.icons.chevronup);