UNPKG

@watone/wt-cli

Version:

watone tools

324 lines (318 loc) 88.9 kB
import{D as s,O as U,R as F,U as V,Z as N,p as Me,C as Pe,s as Ve}from"./menubar.esm-3fc53af0.js";import{s as H,a as o,x as g,T as Fe,y as m,z as C,c as p,b as h,k as v,n as f,A as _,F as K,j as O,B as A,g as X,C as E,l as k,D as S,E as re,e as de,t as $,q as ce,G as Oe,o as ze,f as Re,r as I,d as D,m as q,p as je,i as He}from"./index-ad22e409.js";import{_ as Ue}from"./_plugin-vue_export-helper-c27b6911.js";function Ge(e,t){const{onFocusIn:i,onFocusOut:l}=t.value||{};e.$_pfocustrap_mutationobserver=new MutationObserver(a=>{a.forEach(n=>{if(n.type==="childList"&&!e.contains(document.activeElement)){const c=r=>{const u=s.isFocusableElement(r)?r:s.getFirstFocusableElement(r);return U.isNotEmpty(u)?u:c(r.nextSibling)};s.focus(c(n.nextSibling))}})}),e.$_pfocustrap_mutationobserver.disconnect(),e.$_pfocustrap_mutationobserver.observe(e,{childList:!0}),e.$_pfocustrap_focusinlistener=a=>i&&i(a),e.$_pfocustrap_focusoutlistener=a=>l&&l(a),e.addEventListener("focusin",e.$_pfocustrap_focusinlistener),e.addEventListener("focusout",e.$_pfocustrap_focusoutlistener)}function se(e){e.$_pfocustrap_mutationobserver&&e.$_pfocustrap_mutationobserver.disconnect(),e.$_pfocustrap_focusinlistener&&e.removeEventListener("focusin",e.$_pfocustrap_focusinlistener)&&(e.$_pfocustrap_focusinlistener=null),e.$_pfocustrap_focusoutlistener&&e.removeEventListener("focusout",e.$_pfocustrap_focusoutlistener)&&(e.$_pfocustrap_focusoutlistener=null)}function We(e,t){const{autoFocusSelector:i="",firstFocusableSelector:l="",autoFocus:a=!1}=t.value||{};let n=s.getFirstFocusableElement(e,`[autofocus]:not(.p-hidden-focusable)${i}`);a&&!n&&(n=s.getFirstFocusableElement(e,`:not(.p-hidden-focusable)${l}`)),s.focus(n)}function Xe(e){const{currentTarget:t,relatedTarget:i}=e,l=i===t.$_pfocustrap_lasthiddenfocusableelement?s.getFirstFocusableElement(t.parentElement,`:not(.p-hidden-focusable)${t.$_pfocustrap_focusableselector}`):t.$_pfocustrap_lasthiddenfocusableelement;s.focus(l)}function Ye(e){const{currentTarget:t,relatedTarget:i}=e,l=i===t.$_pfocustrap_firsthiddenfocusableelement?s.getLastFocusableElement(t.parentElement,`:not(.p-hidden-focusable)${t.$_pfocustrap_focusableselector}`):t.$_pfocustrap_firsthiddenfocusableelement;s.focus(l)}function Ze(e,t){const{tabIndex:i=0,firstFocusableSelector:l="",lastFocusableSelector:a=""}=t.value||{},n=u=>{const d=document.createElement("span");return d.classList="p-hidden-accessible p-hidden-focusable",d.tabIndex=i,d.setAttribute("aria-hidden","true"),d.setAttribute("role","presentation"),d.addEventListener("focus",u),d},c=n(Xe),r=n(Ye);c.$_pfocustrap_lasthiddenfocusableelement=r,c.$_pfocustrap_focusableselector=l,r.$_pfocustrap_firsthiddenfocusableelement=c,r.$_pfocustrap_focusableselector=a,e.prepend(c),e.append(r)}const ue={mounted(e,t){const{disabled:i}=t.value||{};i||(Ze(e,t),Ge(e,t),We(e,t))},updated(e,t){const{disabled:i}=t.value||{};i&&se(e)},unmounted(e){se(e)}};var le={name:"Portal",props:{appendTo:{type:String,default:"body"},disabled:{type:Boolean,default:!1}},data(){return{mounted:!1}},mounted(){this.mounted=s.isClient()},computed:{inline(){return this.disabled||this.appendTo==="self"}}};function qe(e,t,i,l,a,n){return n.inline?H(e.$slots,"default",{key:0}):a.mounted?(o(),g(Fe,{key:1,to:i.appendTo},[H(e.$slots,"default")],8,["to"])):m("",!0)}le.render=qe;var pe={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},id:{type:String,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=this.activeIndex!==0?this.activeIndex-1:0,t=this.circular&&this.activeIndex===0?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,t){switch(e.code){case"Enter":case"Space":this.stopSlideShow(),this.$emit("update:activeIndex",t),e.preventDefault();break;case"ArrowDown":case"ArrowUp":e.preventDefault();break}},isIndicatorItemActive(e){return this.activeIndex===e},isNavBackwardDisabled(){return!this.circular&&this.activeIndex===0},isNavForwardDisabled(){return!this.circular&&this.activeIndex===this.value.length-1},ariaSlideNumber(e){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.slideNumber.replace(/{slideNumber}/g,e):void 0},ariaPageLabel(e){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.pageLabel.replace(/{page}/g,e):void 0}},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()}]},ariaSlideLabel(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.slide:void 0}},directives:{ripple:F}};const Je={class:"p-galleria-item-wrapper"},Qe={class:"p-galleria-item-container"},et=["disabled"],tt=h("span",{class:"p-galleria-item-prev-icon pi pi-chevron-left"},null,-1),it=[tt],nt=["id","aria-label","aria-roledescription"],lt=["disabled"],at=h("span",{class:"p-galleria-item-next-icon pi pi-chevron-right"},null,-1),st=[at],ot={key:2,class:"p-galleria-caption"},rt={key:0,class:"p-galleria-indicators p-reset"},dt=["aria-label","aria-selected","aria-controls","onClick","onMouseenter","onKeydown"],ct={key:0,type:"button",tabindex:"-1",class:"p-link"};function ut(e,t,i,l,a,n){const c=C("ripple");return o(),p("div",Je,[h("div",Qe,[i.showItemNavigators?v((o(),p("button",{key:0,type:"button",class:f(n.navBackwardClass),onClick:t[0]||(t[0]=r=>n.navBackward(r)),disabled:n.isNavBackwardDisabled()},it,10,et)),[[c]]):m("",!0),h("div",{id:i.id+"_item_"+i.activeIndex,class:"p-galleria-item",role:"group","aria-label":n.ariaSlideNumber(i.activeIndex+1),"aria-roledescription":n.ariaSlideLabel},[i.templates.item?(o(),g(_(i.templates.item),{key:0,item:n.activeItem},null,8,["item"])):m("",!0)],8,nt),i.showItemNavigators?v((o(),p("button",{key:1,type:"button",class:f(n.navForwardClass),onClick:t[1]||(t[1]=r=>n.navForward(r)),disabled:n.isNavForwardDisabled()},st,10,lt)),[[c]]):m("",!0),i.templates.caption?(o(),p("div",ot,[i.templates.caption?(o(),g(_(i.templates.caption),{key:0,item:n.activeItem},null,8,["item"])):m("",!0)])):m("",!0)]),i.showIndicators?(o(),p("ul",rt,[(o(!0),p(K,null,O(i.value,(r,u)=>(o(),p("li",{key:`p-galleria-indicator-${u}`,class:f(["p-galleria-indicator",{"p-highlight":n.isIndicatorItemActive(u)}]),tabindex:"0","aria-label":n.ariaPageLabel(u+1),"aria-selected":i.activeIndex===u,"aria-controls":i.id+"_item_"+u,onClick:d=>n.onIndicatorClick(u),onMouseenter:d=>n.onIndicatorMouseEnter(u),onKeydown:d=>n.onIndicatorKeyDown(d,u)},[i.templates.indicator?m("",!0):(o(),p("button",ct)),i.templates.indicator?(o(),g(_(i.templates.indicator),{key:1,index:u},null,8,["index"])):m("",!0)],42,dt))),128))])):m("",!0)])}pe.render=ut;var he={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},prevButtonProps:{type:null,default:null},nextButtonProps:{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 e=this.totalShiftedItems;(this.d_oldNumVisible!==this.d_numVisible||this.d_oldActiveItemIndex!==this.d_activeIndex)&&(this.d_activeIndex<=this.getMedianItemIndex()?e=0:this.value.length-this.d_numVisible+this.getMedianItemIndex()<this.d_activeIndex?e=this.d_numVisible-this.value.length:this.value.length-this.d_numVisible<this.d_activeIndex&&this.d_numVisible%2===0?e=this.d_activeIndex*-1+this.getMedianItemIndex()+1:e=this.d_activeIndex*-1+this.getMedianItemIndex(),e!==this.totalShiftedItems&&(this.totalShiftedItems=e),this.$refs.itemsContainer.style.transform=this.isVertical?`translate3d(0, ${e*(100/this.d_numVisible)}%, 0)`:`translate3d(${e*(100/this.d_numVisible)}%, 0, 0)`,this.d_oldActiveItemIndex!==this.d_activeIndex&&(s.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(e){let 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&&this.d_activeIndex===0&&(t=this.d_numVisible-this.value.length)),this.$refs.itemsContainer&&(s.removeClass(this.$refs.itemsContainer,"p-items-hidden"),this.$refs.itemsContainer.style.transform=this.isVertical?`translate3d(0, ${t*(100/this.d_numVisible)}%, 0)`:`translate3d(${t*(100/this.d_numVisible)}%, 0, 0)`,this.$refs.itemsContainer.style.transition="transform 500ms ease 0s"),this.totalShiftedItems=t},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=this.d_activeIndex!==0?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 l=this.circular&&this.d_activeIndex===0?this.value.length-1:t;this.$emit("update:activeIndex",l),e.cancelable&&e.preventDefault()},navForward(e){this.stopSlideShow();let 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);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 i=t+this.totalShiftedItems;let l=0;t<this.d_activeIndex?(l=this.d_numVisible-i-1-this.getMedianItemIndex(),l>0&&-1*this.totalShiftedItems!==0&&this.step(l)):(l=this.getMedianItemIndex()-i,l<0&&-1*this.totalShiftedItems<this.getTotalPageNumber()-1&&this.step(l)),this.$emit("update:activeIndex",t)}},onThumbnailKeydown(e,t){switch((e.code==="Enter"||e.code==="Space")&&(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();break}},onRightKey(){const e=s.find(this.$refs.itemsContainer,".p-galleria-thumbnail-item"),t=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(t,t+1===e.length?e.length-1:t+1)},onLeftKey(){const e=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(e,e-1<=0?0:e-1)},onHomeKey(){const e=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(e,0)},onEndKey(){const e=s.find(this.$refs.itemsContainer,".p-galleria-thumbnail-item"),t=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(t,e.length-1)},onTabKey(){const e=[...s.find(this.$refs.itemsContainer,".p-galleria-thumbnail-item")],t=e.findIndex(a=>s.hasClass(a,"p-galleria-thumbnail-item-current")),i=s.findSingle(this.$refs.itemsContainer,'.p-galleria-thumbnail-item > [tabindex="0"'),l=e.findIndex(a=>a===i.parentElement);e[l].children[0].tabIndex="-1",e[t].children[0].tabIndex="0"},findFocusedIndicatorIndex(){const e=[...s.find(this.$refs.itemsContainer,".p-galleria-thumbnail-item")],t=s.findSingle(this.$refs.itemsContainer,'.p-galleria-thumbnail-item > [tabindex="0"]');return e.findIndex(i=>i===t.parentElement)},changedFocusedIndicator(e,t){const i=s.find(this.$refs.itemsContainer,".p-galleria-thumbnail-item");i[e].children[0].tabIndex="-1",i[t].children[0].tabIndex="0",i[t].children[0].focus()},onTransitionEnd(){this.$refs.itemsContainer&&(s.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=` #${this.containerId} .p-galleria-thumbnail-item { flex: 1 0 ${100/this.d_numVisible}% } `;if(this.responsiveOptions){this.sortedResponsiveOptions=[...this.responsiveOptions],this.sortedResponsiveOptions.sort((t,i)=>{const l=t.breakpoint,a=i.breakpoint;let n=null;return l==null&&a!=null?n=-1:l!=null&&a==null?n=1:l==null&&a==null?n=0:typeof l=="string"&&typeof a=="string"?n=l.localeCompare(a,void 0,{numeric:!0}):n=l<a?-1:l>a?1:0,-1*n});for(let t=0;t<this.sortedResponsiveOptions.length;t++){let i=this.sortedResponsiveOptions[t];e+=` @media screen and (max-width: ${i.breakpoint}) { #${this.containerId} .p-galleria-thumbnail-item { flex: 1 0 ${100/i.numVisible}% } } `}}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 l=this.sortedResponsiveOptions[i];parseInt(l.breakpoint,10)>=e&&(t=l)}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&&this.d_activeIndex===0||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 this.totalShiftedItems*-1},lastItemActiveIndex(){return this.firstItemAciveIndex()+this.d_numVisible-1},isItemActive(e){return this.firstItemAciveIndex()<=e&&this.lastItemActiveIndex()>=e},ariaPageLabel(e){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.pageLabel.replace(/{page}/g,e):void 0}},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}]},ariaPrevButtonLabel(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.prevPageLabel:void 0},ariaNextButtonLabel(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.nextPageLabel:void 0}},directives:{ripple:F}};const pt={class:"p-galleria-thumbnail-wrapper"},ht={class:"p-galleria-thumbnail-container"},mt=["disabled","aria-label"],ft=["aria-selected","aria-controls","onKeydown"],gt=["tabindex","aria-label","aria-current","onClick"],bt=["disabled","aria-label"];function vt(e,t,i,l,a,n){const c=C("ripple");return o(),p("div",pt,[h("div",ht,[i.showThumbnailNavigators?v((o(),p("button",A({key:0,class:n.navBackwardClass,disabled:n.isNavBackwardDisabled(),type:"button","aria-label":n.ariaPrevButtonLabel,onClick:t[0]||(t[0]=r=>n.navBackward(r))},i.prevButtonProps),[h("span",{class:f(n.navBackwardIconClass)},null,2)],16,mt)),[[c]]):m("",!0),h("div",{class:"p-galleria-thumbnail-items-container",style:X({height:i.isVertical?i.contentHeight:""})},[h("div",{ref:"itemsContainer",class:"p-galleria-thumbnail-items",role:"tablist",onTransitionend:t[1]||(t[1]=(...r)=>n.onTransitionEnd&&n.onTransitionEnd(...r)),onTouchstart:t[2]||(t[2]=r=>n.onTouchStart(r)),onTouchmove:t[3]||(t[3]=r=>n.onTouchMove(r)),onTouchend:t[4]||(t[4]=r=>n.onTouchEnd(r))},[(o(!0),p(K,null,O(i.value,(r,u)=>(o(),p("div",{key:`p-galleria-thumbnail-item-${u}`,class:f(["p-galleria-thumbnail-item",{"p-galleria-thumbnail-item-current":i.activeIndex===u,"p-galleria-thumbnail-item-active":n.isItemActive(u),"p-galleria-thumbnail-item-start":n.firstItemAciveIndex()===u,"p-galleria-thumbnail-item-end":n.lastItemActiveIndex()===u}]),role:"tab","aria-selected":i.activeIndex===u,"aria-controls":i.containerId+"_item_"+u,onKeydown:d=>n.onThumbnailKeydown(d,u)},[h("div",{class:"p-galleria-thumbnail-item-content",tabindex:i.activeIndex===u?"0":"-1","aria-label":n.ariaPageLabel(u+1),"aria-current":i.activeIndex===u?"page":void 0,onClick:d=>n.onItemClick(u)},[i.templates.thumbnail?(o(),g(_(i.templates.thumbnail),{key:0,item:r},null,8,["item"])):m("",!0)],8,gt)],42,ft))),128))],544)],4),i.showThumbnailNavigators?v((o(),p("button",A({key:1,class:n.navForwardClass,disabled:n.isNavForwardDisabled(),type:"button","aria-label":n.ariaNextButtonLabel,onClick:t[5]||(t[5]=r=>n.navForward(r))},i.nextButtonProps),[h("span",{class:f(n.navForwardIconClass)},null,2)],16,bt)),[[c]]):m("",!0)])])}he.render=vt;var me={name:"GalleriaContent",inheritAttrs:!1,interval:null,emits:["activeitem-change","mask-hide"],data(){return{id:this.$attrs.id||V(),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}},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 l=["top","left","bottom","right"].find(a=>a===t);return l?`${e}-${l}`:""},isVertical(){return this.$attrs.thumbnailsPosition==="left"||this.$attrs.thumbnailsPosition==="right"}},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]},closeAriaLabel(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.close:void 0}},components:{GalleriaItem:pe,GalleriaThumbnails:he},directives:{ripple:F}};const yt=["id"],xt=["aria-label"],kt=h("span",{class:"p-galleria-close-icon pi pi-times"},null,-1),It=[kt],wt={key:1,class:"p-galleria-header"},St=["aria-live"],_t={key:2,class:"p-galleria-footer"};function Ct(e,t,i,l,a,n){const c=E("GalleriaItem"),r=E("GalleriaThumbnails"),u=C("ripple");return e.$attrs.value&&e.$attrs.value.length>0?(o(),p("div",A({key:0,id:a.id,class:n.galleriaClass,style:e.$attrs.containerStyle},e.$attrs.containerProps),[e.$attrs.fullScreen?v((o(),p("button",{key:0,autofocus:"",type:"button",class:"p-galleria-close p-link","aria-label":n.closeAriaLabel,onClick:t[0]||(t[0]=d=>e.$emit("mask-hide"))},It,8,xt)),[[u]]):m("",!0),e.$attrs.templates&&e.$attrs.templates.header?(o(),p("div",wt,[(o(),g(_(e.$attrs.templates.header)))])):m("",!0),h("div",{class:"p-galleria-content","aria-live":e.$attrs.autoPlay?"polite":"off"},[k(c,{id:a.id,activeIndex:a.activeIndex,"onUpdate:activeIndex":t[1]||(t[1]=d=>a.activeIndex=d),slideShowActive:a.slideShowActive,"onUpdate:slideShowActive":t[2]||(t[2]=d=>a.slideShowActive=d),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:n.startSlideShow,onStopSlideshow:n.stopSlideShow},null,8,["id","activeIndex","slideShowActive","value","circular","templates","showIndicators","changeItemOnIndicatorHover","showItemNavigators","autoPlay","onStartSlideshow","onStopSlideshow"]),e.$attrs.showThumbnails?(o(),g(r,{key:0,activeIndex:a.activeIndex,"onUpdate:activeIndex":t[3]||(t[3]=d=>a.activeIndex=d),slideShowActive:a.slideShowActive,"onUpdate:slideShowActive":t[4]||(t[4]=d=>a.slideShowActive=d),containerId:a.id,value:e.$attrs.value,templates:e.$attrs.templates,numVisible:a.numVisible,responsiveOptions:e.$attrs.responsiveOptions,circular:e.$attrs.circular,isVertical:n.isVertical(),contentHeight:e.$attrs.verticalThumbnailViewPortHeight,showThumbnailNavigators:e.$attrs.showThumbnailNavigators,prevButtonProps:e.$attrs.prevButtonProps,nextButtonProps:e.$attrs.nextButtonProps,onStopSlideshow:n.stopSlideShow},null,8,["activeIndex","slideShowActive","containerId","value","templates","numVisible","responsiveOptions","circular","isVertical","contentHeight","showThumbnailNavigators","prevButtonProps","nextButtonProps","onStopSlideshow"])):m("",!0)],8,St),e.$attrs.templates&&e.$attrs.templates.footer?(o(),p("div",_t,[(o(),g(_(e.$attrs.templates.footer)))])):m("",!0)],16,yt)):m("",!0)}me.render=Ct;var fe={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:null,default:null},containerClass:{type:null,default:null},containerProps:{type:null,default:null},prevButtonProps:{type:null,default:null},nextButtonProps:{type:null,default:null}},container:null,mask:null,data(){return{containerVisible:this.visible}},updated(){this.fullScreen&&this.visible&&(this.containerVisible=this.visible)},beforeUnmount(){this.fullScreen&&s.removeClass(document.body,"p-overflow-hidden"),this.mask=null,this.container&&(N.clear(this.container),this.container=null)},methods:{onBeforeEnter(e){N.set("modal",e,this.baseZIndex||this.$primevue.config.zIndex.modal)},onEnter(e){this.mask.style.zIndex=String(parseInt(e.style.zIndex,10)-1),s.addClass(document.body,"p-overflow-hidden"),this.focus()},onBeforeLeave(){s.addClass(this.mask,"p-component-overlay-leave")},onAfterLeave(e){N.clear(e),this.containerVisible=!1,s.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},focus(){let e=this.container.$el.querySelector("[autofocus]");e&&e.focus()}},computed:{maskContentClass(){return["p-galleria-mask p-component-overlay p-component-overlay-enter",this.maskClass,{"p-input-filled":this.$primevue.config.inputStyle==="filled","p-ripple-disabled":this.$primevue.config.ripple===!1}]}},components:{GalleriaContent:me,Portal:le},directives:{focustrap:ue}};const Et=["role","aria-modal"];function Tt(e,t,i,l,a,n){const c=E("GalleriaContent"),r=E("Portal"),u=C("focustrap");return i.fullScreen?(o(),g(r,{key:0},{default:S(()=>[a.containerVisible?(o(),p("div",{key:0,ref:n.maskRef,class:f(n.maskContentClass),role:i.fullScreen?"dialog":"region","aria-modal":i.fullScreen?"true":void 0},[k(re,{name:"p-galleria",onBeforeEnter:n.onBeforeEnter,onEnter:n.onEnter,onBeforeLeave:n.onBeforeLeave,onAfterLeave:n.onAfterLeave,appear:""},{default:S(()=>[i.visible?v((o(),g(c,A({key:0,ref:n.containerRef},e.$props,{onMaskHide:n.maskHide,templates:e.$slots,onActiveitemChange:n.onActiveItemChange}),null,16,["onMaskHide","templates","onActiveitemChange"])),[[u]]):m("",!0)]),_:1},8,["onBeforeEnter","onEnter","onBeforeLeave","onAfterLeave"])],10,Et)):m("",!0)]),_:1})):(o(),g(c,A({key:1},e.$props,{templates:e.$slots,onActiveitemChange:n.onActiveItemChange}),null,16,["templates","onActiveitemChange"]))}function Lt(e,t){t===void 0&&(t={});var i=t.insertAt;if(!(!e||typeof document>"u")){var l=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css",i==="top"&&l.firstChild?l.insertBefore(a,l.firstChild):l.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}var Dt=` .p-galleria-content { display: flex; flex-direction: column; } .p-galleria-item-wrapper { display: flex; flex-direction: column; position: relative; } .p-galleria-item-container { position: relative; display: flex; height: 100%; } .p-galleria-item-nav { position: absolute; top: 50%; margin-top: -0.5rem; display: inline-flex; justify-content: center; align-items: center; overflow: hidden; } .p-galleria-item-prev { left: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; } .p-galleria-item-next { right: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; } .p-galleria-item { display: flex; justify-content: center; align-items: center; height: 100%; width: 100%; } .p-galleria-item-nav-onhover .p-galleria-item-nav { pointer-events: none; opacity: 0; transition: opacity 0.2s ease-in-out; } .p-galleria-item-nav-onhover .p-galleria-item-wrapper:hover .p-galleria-item-nav { pointer-events: all; opacity: 1; } .p-galleria-item-nav-onhover .p-galleria-item-wrapper:hover .p-galleria-item-nav.p-disabled { pointer-events: none; } .p-galleria-caption { position: absolute; bottom: 0; left: 0; width: 100%; } /* Thumbnails */ .p-galleria-thumbnail-wrapper { display: flex; flex-direction: column; overflow: auto; flex-shrink: 0; } .p-galleria-thumbnail-prev, .p-galleria-thumbnail-next { align-self: center; flex: 0 0 auto; display: flex; justify-content: center; align-items: center; overflow: hidden; position: relative; } .p-galleria-thumbnail-prev span, .p-galleria-thumbnail-next span { display: flex; justify-content: center; align-items: center; } .p-galleria-thumbnail-container { display: flex; flex-direction: row; } .p-galleria-thumbnail-items-container { overflow: hidden; width: 100%; } .p-galleria-thumbnail-items { display: flex; } .p-galleria-thumbnail-item { overflow: auto; display: flex; align-items: center; justify-content: center; cursor: pointer; opacity: 0.5; } .p-galleria-thumbnail-item:hover { opacity: 1; transition: opacity 0.3s; } .p-galleria-thumbnail-item-current { opacity: 1; } /* Positions */ /* Thumbnails */ .p-galleria-thumbnails-left .p-galleria-content, .p-galleria-thumbnails-right .p-galleria-content { flex-direction: row; } .p-galleria-thumbnails-left .p-galleria-item-wrapper, .p-galleria-thumbnails-right .p-galleria-item-wrapper { flex-direction: row; } .p-galleria-thumbnails-left .p-galleria-item-wrapper, .p-galleria-thumbnails-top .p-galleria-item-wrapper { order: 2; } .p-galleria-thumbnails-left .p-galleria-thumbnail-wrapper, .p-galleria-thumbnails-top .p-galleria-thumbnail-wrapper { order: 1; } .p-galleria-thumbnails-left .p-galleria-thumbnail-container, .p-galleria-thumbnails-right .p-galleria-thumbnail-container { flex-direction: column; flex-grow: 1; } .p-galleria-thumbnails-left .p-galleria-thumbnail-items, .p-galleria-thumbnails-right .p-galleria-thumbnail-items { flex-direction: column; height: 100%; } /* Indicators */ .p-galleria-indicators { display: flex; align-items: center; justify-content: center; } .p-galleria-indicator > button { display: inline-flex; align-items: center; } .p-galleria-indicators-left .p-galleria-item-wrapper, .p-galleria-indicators-right .p-galleria-item-wrapper { flex-direction: row; align-items: center; } .p-galleria-indicators-left .p-galleria-item-container, .p-galleria-indicators-top .p-galleria-item-container { order: 2; } .p-galleria-indicators-left .p-galleria-indicators, .p-galleria-indicators-top .p-galleria-indicators { order: 1; } .p-galleria-indicators-left .p-galleria-indicators, .p-galleria-indicators-right .p-galleria-indicators { flex-direction: column; } .p-galleria-indicator-onitem .p-galleria-indicators { position: absolute; display: flex; } .p-galleria-indicator-onitem.p-galleria-indicators-top .p-galleria-indicators { top: 0; left: 0; width: 100%; align-items: flex-start; } .p-galleria-indicator-onitem.p-galleria-indicators-right .p-galleria-indicators { right: 0; top: 0; height: 100%; align-items: flex-end; } .p-galleria-indicator-onitem.p-galleria-indicators-bottom .p-galleria-indicators { bottom: 0; left: 0; width: 100%; align-items: flex-end; } .p-galleria-indicator-onitem.p-galleria-indicators-left .p-galleria-indicators { left: 0; top: 0; height: 100%; align-items: flex-start; } /* FullScreen */ .p-galleria-mask { position: fixed; top: 0; left: 0; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; } .p-galleria-close { position: absolute; top: 0; right: 0; display: flex; justify-content: center; align-items: center; overflow: hidden; } .p-galleria-mask .p-galleria-item-nav { position: fixed; top: 50%; margin-top: -0.5rem; } /* Animation */ .p-galleria-enter-active { transition: all 150ms cubic-bezier(0, 0, 0.2, 1); } .p-galleria-leave-active { transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1); } .p-galleria-enter-from, .p-galleria-leave-to { opacity: 0; transform: scale(0.7); } .p-galleria-enter-active .p-galleria-item-nav { opacity: 0; } /* Keyboard Support */ .p-items-hidden .p-galleria-thumbnail-item { visibility: hidden; } .p-items-hidden .p-galleria-thumbnail-item.p-galleria-thumbnail-item-active { visibility: visible; } `;Lt(Dt);fe.render=Tt;var ge={name:"TreeNode",emits:["node-toggle","node-click","checkbox-change"],props:{node:{type:null,default:null},expandedKeys:{type:null,default:null},selectionKeys:{type:null,default:null},selectionMode:{type:String,default:null},templates:{type:null,default:null},level:{type:Number,default:null},index:{type:Number,default:null}},nodeTouched:!1,mounted(){this.$refs.currentNode.closest(".p-treeselect-items-wrapper")&&this.setAllNodesTabIndexes()},methods:{toggle(){this.$emit("node-toggle",this.node)},label(e){return typeof e.label=="function"?e.label():e.label},onChildNodeToggle(e){this.$emit("node-toggle",e)},onClick(e){s.hasClass(e.target,"p-tree-toggler")||s.hasClass(e.target.parentElement,"p-tree-toggler")||(this.isCheckboxSelectionMode()?this.toggleCheckbox():this.$emit("node-click",{originalEvent:e,nodeTouched:this.nodeTouched,node:this.node}),this.nodeTouched=!1)},onChildNodeClick(e){this.$emit("node-click",e)},onTouchEnd(){this.nodeTouched=!0},onKeyDown(e){if(this.isSameNode(e))switch(e.code){case"Tab":this.onTabKey(e);break;case"ArrowDown":this.onArrowDown(e);break;case"ArrowUp":this.onArrowUp(e);break;case"ArrowRight":this.onArrowRight(e);break;case"ArrowLeft":this.onArrowLeft(e);break;case"Enter":case"Space":this.onEnterKey(e);break}},onArrowDown(e){const t=e.target,i=t.children[1];if(i)this.focusRowChange(t,i.children[0]);else if(t.nextElementSibling)this.focusRowChange(t,t.nextElementSibling);else{let l=this.findNextSiblingOfAncestor(t);l&&this.focusRowChange(t,l)}e.preventDefault()},onArrowUp(e){const t=e.target;if(t.previousElementSibling)this.focusRowChange(t,t.previousElementSibling,this.findLastVisibleDescendant(t.previousElementSibling));else{let i=this.getParentNodeElement(t);i&&this.focusRowChange(t,i)}e.preventDefault()},onArrowRight(e){this.leaf||this.expanded||(e.currentTarget.tabIndex=-1,this.$emit("node-toggle",this.node),this.$nextTick(()=>{this.onArrowDown(e)}))},onArrowLeft(e){const t=s.findSingle(e.currentTarget,".p-tree-toggler");if(this.level===0&&!this.expanded)return!1;if(this.expanded&&!this.leaf)return t.click(),!1;const i=this.findBeforeClickableNode(e.currentTarget);i&&this.focusRowChange(e.currentTarget,i)},onEnterKey(e){this.setTabIndexForSelectionMode(e,this.nodeTouched),this.onClick(e),e.preventDefault()},onTabKey(){this.setAllNodesTabIndexes()},setAllNodesTabIndexes(){const e=s.find(this.$refs.currentNode.closest(".p-tree-container"),".p-treenode"),t=[...e].some(i=>i.getAttribute("aria-selected")==="true"||i.getAttribute("aria-checked")==="true");if([...e].forEach(i=>{i.tabIndex=-1}),t){const i=[...e].filter(l=>l.getAttribute("aria-selected")==="true"||l.getAttribute("aria-checked")==="true");i[0].tabIndex=0;return}[...e][0].tabIndex=0},setTabIndexForSelectionMode(e,t){if(this.selectionMode!==null){const i=[...s.find(this.$refs.currentNode.parentElement,".p-treenode")];e.currentTarget.tabIndex=t===!1?-1:0,i.every(l=>l.tabIndex===-1)&&(i[0].tabIndex=0)}},focusRowChange(e,t,i){e.tabIndex="-1",t.tabIndex="0",this.focusNode(i||t)},findBeforeClickableNode(e){const t=e.closest("ul").closest("li");if(t){const i=s.findSingle(t,"button");return i&&i.style.visibility!=="hidden"?t:this.findBeforeClickableNode(e.previousElementSibling)}return null},toggleCheckbox(){let e=this.selectionKeys?{...this.selectionKeys}:{};const t=!this.checked;this.propagateDown(this.node,t,e),this.$emit("checkbox-change",{node:this.node,check:t,selectionKeys:e})},propagateDown(e,t,i){if(t?i[e.key]={checked:!0,partialChecked:!1}:delete i[e.key],e.children&&e.children.length)for(let l of e.children)this.propagateDown(l,t,i)},propagateUp(e){let t=e.check,i={...e.selectionKeys},l=0,a=!1;for(let n of this.node.children)i[n.key]&&i[n.key].checked?l++:i[n.key]&&i[n.key].partialChecked&&(a=!0);t&&l===this.node.children.length?i[this.node.key]={checked:!0,partialChecked:!1}:(t||delete i[this.node.key],a||l>0&&l!==this.node.children.length?i[this.node.key]={checked:!1,partialChecked:!0}:delete i[this.node.key]),this.$emit("checkbox-change",{node:e.node,check:e.check,selectionKeys:i})},onChildCheckboxChange(e){this.$emit("checkbox-change",e)},findNextSiblingOfAncestor(e){let t=this.getParentNodeElement(e);return t?t.nextElementSibling?t.nextElementSibling:this.findNextSiblingOfAncestor(t):null},findLastVisibleDescendant(e){const t=e.children[1];if(t){const i=t.children[t.children.length-1];return this.findLastVisibleDescendant(i)}else return e},getParentNodeElement(e){const t=e.parentElement.parentElement;return s.hasClass(t,"p-treenode")?t:null},focusNode(e){e.focus()},isCheckboxSelectionMode(){return this.selectionMode==="checkbox"},isSameNode(e){return e.currentTarget&&(e.currentTarget.isSameNode(e.target)||e.currentTarget.isSameNode(e.target.closest(".p-treenode")))}},computed:{hasChildren(){return this.node.children&&this.node.children.length>0},expanded(){return this.expandedKeys&&this.expandedKeys[this.node.key]===!0},leaf(){return this.node.leaf===!1?!1:!(this.node.children&&this.node.children.length)},selectable(){return this.node.selectable===!1?!1:this.selectionMode!=null},selected(){return this.selectionMode&&this.selectionKeys?this.selectionKeys[this.node.key]===!0:!1},containerClass(){return["p-treenode",{"p-treenode-leaf":this.leaf}]},contentClass(){return["p-treenode-content",this.node.styleClass,{"p-treenode-selectable":this.selectable,"p-highlight":this.checkboxMode?this.checked:this.selected}]},icon(){return["p-treenode-icon",this.node.icon]},toggleIcon(){return["p-tree-toggler-icon pi pi-fw",this.expanded?this.node.expandedIcon||"pi-chevron-down":this.node.collapsedIcon||"pi-chevron-right"]},checkboxClass(){return["p-checkbox-box",{"p-highlight":this.checked,"p-indeterminate":this.partialChecked}]},checkboxIcon(){return["p-checkbox-icon",{"pi pi-check":this.checked,"pi pi-minus":this.partialChecked}]},checkboxMode(){return this.selectionMode==="checkbox"&&this.node.selectable!==!1},checked(){return this.selectionKeys?this.selectionKeys[this.node.key]&&this.selectionKeys[this.node.key].checked:!1},partialChecked(){return this.selectionKeys?this.selectionKeys[this.node.key]&&this.selectionKeys[this.node.key].partialChecked:!1},ariaChecked(){return this.selectionMode==="single"||this.selectionMode==="multiple"?this.selected:void 0},ariaSelected(){return this.checkboxMode?this.checked:void 0}},directives:{ripple:F}};const $t=["aria-label","aria-selected","aria-expanded","aria-setsize","aria-posinset","aria-level","aria-checked","tabindex"],Nt={key:0,class:"p-checkbox p-component","aria-hidden":"true"},At={class:"p-treenode-label"},Kt={key:0,class:"p-treenode-children",role:"group"};function Bt(e,t,i,l,a,n){const c=E("TreeNode",!0),r=C("ripple");return o(),p("li",{ref:"currentNode",class:f(n.containerClass),role:"treeitem","aria-label":n.label(i.node),"aria-selected":n.ariaSelected,"aria-expanded":n.expanded,"aria-setsize":i.node.children?i.node.children.length:0,"aria-posinset":i.index+1,"aria-level":i.level,"aria-checked":n.ariaChecked,tabindex:i.index===0?0:-1,onKeydown:t[3]||(t[3]=(...u)=>n.onKeyDown&&n.onKeyDown(...u))},[h("div",{class:f(n.contentClass),onClick:t[1]||(t[1]=(...u)=>n.onClick&&n.onClick(...u)),onTouchend:t[2]||(t[2]=(...u)=>n.onTouchEnd&&n.onTouchEnd(...u)),style:X(i.node.style)},[v((o(),p("button",{type:"button",class:"p-tree-toggler p-link",onClick:t[0]||(t[0]=(...u)=>n.toggle&&n.toggle(...u)),tabindex:"-1","aria-hidden":"true"},[h("span",{class:f(n.toggleIcon)},null,2)])),[[r]]),n.checkboxMode?(o(),p("div",Nt,[h("div",{class:f(n.checkboxClass),role:"checkbox"},[h("span",{class:f(n.checkboxIcon)},null,2)],2)])):m("",!0),h("span",{class:f(n.icon)},null,2),h("span",At,[i.templates[i.node.type]||i.templates.default?(o(),g(_(i.templates[i.node.type]||i.templates.default),{key:0,node:i.node},null,8,["node"])):(o(),p(K,{key:1},[de($(n.label(i.node)),1)],64))])],38),n.hasChildren&&n.expanded?(o(),p("ul",Kt,[(o(!0),p(K,null,O(i.node.children,u=>(o(),g(c,{key:u.key,node:u,templates:i.templates,level:i.level+1,expandedKeys:i.expandedKeys,onNodeToggle:n.onChildNodeToggle,onNodeClick:n.onChildNodeClick,selectionMode:i.selectionMode,selectionKeys:i.selectionKeys,onCheckboxChange:n.propagateUp},null,8,["node","templates","level","expandedKeys","onNodeToggle","onNodeClick","selectionMode","selectionKeys","onCheckboxChange"]))),128))])):m("",!0)],42,$t)}ge.render=Bt;var be={name:"Tree",emits:["node-expand","node-collapse","update:expandedKeys","update:selectionKeys","node-select","node-unselect"],props:{value:{type:null,default:null},expandedKeys:{type:null,default:null},selectionKeys:{type:null,default:null},selectionMode:{type:String,default:null},metaKeySelection:{type:Boolean,default:!0},loading:{type:Boolean,default:!1},loadingIcon:{type:String,default:"pi pi-spinner"},filter:{type:Boolean,default:!1},filterBy:{type:String,default:"label"},filterMode:{type:String,default:"lenient"},filterPlaceholder:{type:String,default:null},filterLocale:{type:String,default:void 0},scrollHeight:{type:String,default:null},level:{type:Number,default:0},"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},data(){return{d_expandedKeys:this.expandedKeys||{},filterValue:null}},watch:{expandedKeys(e){this.d_expandedKeys=e}},methods:{onNodeToggle(e){const t=e.key;this.d_expandedKeys[t]?(delete this.d_expandedKeys[t],this.$emit("node-collapse",e)):(this.d_expandedKeys[t]=!0,this.$emit("node-expand",e)),this.d_expandedKeys={...this.d_expandedKeys},this.$emit("update:expandedKeys",this.d_expandedKeys)},onNodeClick(e){if(this.selectionMode!=null&&e.node.selectable!==!1){const i=(e.nodeTouched?!1:this.metaKeySelection)?this.handleSelectionWithMetaKey(e):this.handleSelectionWithoutMetaKey(e);this.$emit("update:selectionKeys",i)}},onCheckboxChange(e){this.$emit("update:selectionKeys",e.selectionKeys),e.check?this.$emit("node-select",e.node):this.$emit("node-unselect",e.node)},handleSelectionWithMetaKey(e){const t=e.originalEvent,i=e.node,l=t.metaKey||t.ctrlKey,a=this.isNodeSelected(i);let n;return a&&l?(this.isSingleSelectionMode()?n={}:(n={...this.selectionKeys},delete n[i.key]),this.$emit("node-unselect",i)):(this.isSingleSelectionMode()?n={}:this.isMultipleSelectionMode()&&(n=l?this.selectionKeys?{...this.selectionKeys}:{}:{}),n[i.key]=!0,this.$emit("node-select",i)),n},handleSelectionWithoutMetaKey(e){const t=e.node,i=this.isNodeSelected(t);let l;return this.isSingleSelectionMode()?i?(l={},this.$emit("node-unselect",t)):(l={},l[t.key]=!0,this.$emit("node-select",t)):i?(l={...this.selectionKeys},delete l[t.key],this.$emit("node-unselect",t)):(l=this.selectionKeys?{...this.selectionKeys}:{},l[t.key]=!0,this.$emit("node-select",t)),l},isSingleSelectionMode(){return this.selectionMode==="single"},isMultipleSelectionMode(){return this.selectionMode==="multiple"},isNodeSelected(e){return this.selectionMode&&this.selectionKeys?this.selectionKeys[e.key]===!0:!1},isChecked(e){return this.selectionKeys?this.selectionKeys[e.key]&&this.selectionKeys[e.key].checked:!1},isNodeLeaf(e){return e.leaf===!1?!1:!(e.children&&e.children.length)},onFilterKeydown(e){e.which===13&&e.preventDefault()},findFilteredNodes(e,t){if(e){let i=!1;if(e.children){let l=[...e.children];e.children=[];for(let a of l){let n={...a};this.isFilterMatched(n,t)&&(i=!0,e.children.push(n))}}if(i)return!0}},isFilterMatched(e,{searchFields:t,filterText:i,strict:l}){let a=!1;for(let n of t)String(U.resolveFieldData(e,n)).toLocaleLowerCase(this.filterLocale).indexOf(i)>-1&&(a=!0);return(!a||l&&!this.isNodeLeaf(e))&&(a=this.findFilteredNodes(e,{searchFields:t,filterText:i,strict:l})||a),a}},computed:{containerClass(){return["p-tree p-component",{"p-tree-selectable":this.selectionMode!=null,"p-tree-loading":this.loading,"p-tree-flex-scrollable":this.scrollHeight==="flex"}]},loadingIconClass(){return["p-tree-loading-icon pi-spin",this.loadingIcon]},filteredValue(){let e=[];const t=this.filterBy.split(","),i=this.filterValue.trim().toLocaleLowerCase(this.filterLocale),l=this.filterMode==="strict";for(let a of this.value){let n={...a},c={searchFields:t,filterText:i,strict:l};(l&&(this.findFilteredNodes(n,c)||this.isFilterMatched(n,c))||!l&&(this.isFilterMatched(n,c)||this.findFilteredNodes(n,c)))&&e.push(n)}return e},valueToRender(){return this.filterValue&&this.filterValue.trim().length>0?this.filteredValue:this.value}},components:{TreeNode:ge}};const Mt={key:0,class:"p-tree-loading-overlay p-component-overlay"},Pt={key:1,class:"p-tree-filter-container"},Vt=["placeholder"],Ft=h("span",{class:"p-tree-filter-icon pi pi-search"},null,-1),Ot=["aria-labelledby","aria-label"];function zt(e,t,i,l,a,n){const c=E("TreeNode");return o(),p("div",{class:f(n.containerClass)},[i.loading?(o(),p("div",Mt,[h("i",{class:f(n.loadingIconClass)},null,2)])):m("",!0),i.filter?(o(),p("div",Pt,[v(h("input",{"onUpdate:modelValue":t[0]||(t[0]=r=>a.filterValue=r),type:"text",autocomplete:"off",class:"p-tree-filter p-inputtext p-component",placeholder:i.filterPlaceholder,onKeydown:t[1]||(t[1]=(...r)=>n.onFilterKeydown&&n.onFilterKeydown(...r))},null,40,Vt),[[ce,a.filterValue]]),Ft])):m("",!0),h("div",{class:"p-tree-wrapper",style:X({maxHeight:i.scrollHeight})},[h("ul",{class:"p-tree-container",role:"tree","aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel},[(o(!0),p(K,null,O(n.valueToRender,(r,u)=>(o(),g(c,{key:r.key,node:r,templates:e.$slots,level:i.level+1,index:u,expandedKeys:a.d_expandedKeys,onNodeToggle:n.onNodeToggle,onNodeClick:n.onNodeClick,selectionMode:i.selectionMode,selectionKeys:i.selectionKeys,onCheckboxChange:n.onCheckboxChange},null,8,["node","templates","level","index","expandedKeys","onNodeToggle","onNodeClick","selectionMode","selectionKeys","onCheckboxChange"]))),128))],8,Ot)],4)],2)}function Rt(e,t){t===void 0&&(t={});var i=t.insertAt;if(!(!e||typeof document>"u")){var l=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css",i==="top"&&l.firstChild?l.insertBefore(a,l.firstChild):l.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}var jt=` .p-tree-container { margin: 0; padding: 0; list-style-type: none; overflow: auto; } .p-treenode-children { margin: 0; padding: 0; list-style-type: none; } .p-tree-wrapper { overflow: auto; } .p-treenode-selectable { cursor: pointer; user-select: none; } .p-tree-toggler { cursor: pointer; user-select: none; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; position: relative; flex-shrink: 0; } .p-treenode-leaf > .p-treenode-content .p-tree-toggler { visibility: hidden; } .p-treenode-content { display: flex; align-items: center; } .p-tree-filter { width: 100%; } .p-tree-filter-container { position: relative; display: block; width: 100%; } .p-tree-filter-icon { position: absolute; top: 50%; margin-top: -0.5rem; } .p-tree-loading { position: relative; min-height: 4rem; } .p-tree .p-tree-loading-overlay { position: absolute; z-index: 1; display: flex; align-items: center; justify-content: center; } .p-tree-flex-scrollable { display: flex; flex: 1; height: 100%; flex-direction: column; } .p-tree-flex-scrollable .p-tree-wrapper { flex: 1; } `;Rt(jt);be.render=zt;var ve={name:"Dialog",inheritAttrs:!1,emits:["update:visible","show","hide","after-hide","maximize","unmaximize","dragend"],props:{header:{type:null,default:null},footer:{type:null,default:null},visible:{type:Boolean,default:!1},modal:{type:Boolean,default:null},contentStyle:{type:null,default:null},contentClass:{type:String,default:null},contentProps:{type:null,default:null},rtl:{type:Boolean,default:null},maximizable:{type:Boolean,default:!1},dismissableMask:{type:Boolean,default:!1},closable:{type:Boolean,default:!0},closeOnEscape:{type:Boolean,default:!0},showHeader:{type:Boolean,default:!0},baseZIndex:{type:Number,default:0},autoZIndex:{type:Boolean,default:!0},position:{type:String,default:"center"},breakpoints:{type:Object,default:null},draggable:{type:Boolean,default:!0},keepInViewport:{type:Boolean,default:!0},minX:{type:Number,default:0},minY:{type:Number,default:0},appendTo:{type:String,default:"body"},closeIcon:{type:String,default:"pi pi-times"},maximizeIcon:{type:String,default:"pi pi-window-maximize"},minimizeIcon:{type:String,default:"pi pi-window-minimize"},closeButtonProps:{type:null,default:null},_instance:null},provide(){return{dialogRef:Oe(()=>this._instance)}},data(){return{containerVisible:this.visible,maximized:!1,focusable:!1}},documentKeydownListener:null,container:null,mask:nul