text: "use strict";var e=require("primevue/utils"),t=require("primevue/ripple"),n=require("vue");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i={name:"TabMenu",props:{model:{type:Array,default:null},exact:{type:Boolean,default:!0}},timeout:null,mounted(){this.updateInkBar()},updated(){this.updateInkBar()},beforeUnmount(){clearTimeout(this.timeout)},watch:{$route(){this.timeout=setTimeout((()=>this.updateInkBar()),50)}},methods:{onItemClick(e,t,n){this.disabled(t)?e.preventDefault():(t.command&&t.command({originalEvent:e,item:t}),t.to&&n&&n(e))},getItemClass(e){return["p-tabmenuitem",e.class,{"p-disabled":this.disabled(e)}]},getRouteItemClass(e,t,n){return["p-tabmenuitem",e.class,{"p-highlight":this.exact?n:t,"p-disabled":this.disabled(e)}]},getItemIcon:e=>["p-menuitem-icon",e.icon],visible:e=>"function"==typeof e.visible?e.visible():!1!==e.visible,disabled:e=>"function"==typeof e.disabled?e.disabled():e.disabled,updateInkBar(){let t=this.$refs.nav.children,n=!1;for(let l=0;l<t.length;l++){let i=t[l];e.DomHandler.hasClass(i,"p-highlight")&&(this.$refs.inkbar.style.width=e.DomHandler.getWidth(i)+"px",this.$refs.inkbar.style.left=e.DomHandler.getOffset(i).left-e.DomHandler.getOffset(this.$refs.nav).left+"px",n=!0)}n||(this.$refs.inkbar.style.width="0px",this.$refs.inkbar.style.left="0px")}},directives:{ripple:l(t).default}};const o={class:"p-tabmenu p-component"},a={ref:"nav",class:"p-tabmenu-nav p-reset",role:"tablist"},s={class:"p-menuitem-text"},r={class:"p-menuitem-text"},c={ref:"inkbar",class:"p-tabmenu-ink-bar"};!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var l=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&l.firstChild?l.insertBefore(i,l.firstChild):l.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}("\n.p-tabmenu {\n    overflow-x: auto;\n}\n.p-tabmenu-nav {\n    display: -webkit-box;\n    display: -ms-flexbox;\n    display: flex;\n    margin: 0;\n    padding: 0;\n    list-style-type: none;\n    -ms-flex-wrap: nowrap;\n        flex-wrap: nowrap;\n}\n.p-tabmenu-nav a {\n    cursor: pointer;\n    -webkit-user-select: none;\n       -moz-user-select: none;\n        -ms-user-select: none;\n            user-select: none;\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    position: relative;\n    text-decoration: none;\n    text-decoration: none;\n    overflow: hidden;\n}\n.p-tabmenu-nav a:focus {\n    z-index: 1;\n}\n.p-tabmenu-nav .p-menuitem-text {\n    line-height: 1;\n}\n.p-tabmenu-ink-bar {\n    display: none;\n    z-index: 1;\n}\n"),i.render=function(e,t,l,i,m,d){const p=n.resolveComponent("router-link"),u=n.resolveDirective("ripple");return n.openBlock(),n.createBlock("div",o,[n.createVNode("ul",a,[(n.openBlock(!0),n.createBlock(n.Fragment,null,n.renderList(l.model,((t,l)=>(n.openBlock(),n.createBlock(n.Fragment,{key:t.label+"_"+l.toString()},[t.to&&!d.disabled(t)?(n.openBlock(),n.createBlock(p,{key:0,to:t.to,custom:""},{default:n.withCtx((({navigate:l,href:i,isActive:o,isExactActive:a})=>[d.visible(t)?(n.openBlock(),n.createBlock("li",{key:0,class:d.getRouteItemClass(t,o,a),style:t.style,role:"tab"},[e.$slots.item?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.$slots.item),{key:1,item:t},null,8,["item"])):n.withDirectives((n.openBlock(),n.createBlock("a",{key:0,href:i,class:"p-menuitem-link",onClick:e=>d.onItemClick(e,t,l),role:"presentation"},[t.icon?(n.openBlock(),n.createBlock("span",{key:0,class:d.getItemIcon(t)},null,2)):n.createCommentVNode("",!0),n.createVNode("span",s,n.toDisplayString(t.label),1)],8,["href","onClick"])),[[u]])],6)):n.createCommentVNode("",!0)])),_:2},1032,["to"])):d.visible(t)?(n.openBlock(),n.createBlock("li",{key:1,class:d.getItemClass(t),role:"tab"},[e.$slots.item?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.$slots.item),{key:1,item:t},null,8,["item"])):n.withDirectives((n.openBlock(),n.createBlock("a",{key:0,href:t.url,class:"p-menuitem-link",target:t.target,onClick:e=>d.onItemClick(e,t),role:"presentation",tabindex:d.disabled(t)?null:"0"},[t.icon?(n.openBlock(),n.createBlock("span",{key:0,class:d.getItemIcon(t)},null,2)):n.createCommentVNode("",!0),n.createVNode("span",r,n.toDisplayString(t.label),1)],8,["href","target","onClick","tabindex"])),[[u]])],2)):n.createCommentVNode("",!0)],64)))),128)),n.createVNode("li",c,null,512)],512)])},module.exports=i;
  