2024-10-28 18:29:38 +00:00
var _ _defProp = Object . defineProperty ;
var _ _name = ( target , value ) => _ _defProp ( target , "name" , { value , configurable : true } ) ;
2025-02-15 09:32:47 +00:00
import { bG as BaseStyle , bH as script$c , cV as getWidth , d9 as getHeight , c2 as getOuterWidth , da as getOuterHeight , d3 as isRTL , cZ as getVNodeProp , db as isArray , o as openBlock , f as createElementBlock , at as mergeProps , F as Fragment , D as renderList , y as createBlock , C as resolveDynamicComponent , m as createBaseVNode , B as createCommentVNode , A as renderSlot , bK as getAttribute , bJ as findSingle , bL as focus , ce as equals , bO as Ripple , r as resolveDirective , i as withDirectives , z as withCtx , aj as normalizeClass , cW as getOffset , cb as script$d , bQ as script$e , cd as isNotEmpty , bY as script$f , bP as UniqueComponentId , bZ as ZIndex , cc as resolveFieldData , c7 as OverlayEventBus , ci as isEmpty , b _ as addStyle , c1 as relativePosition , c3 as absolutePosition , b$ as ConnectedOverlayScrollHandler , c0 as isTouchDevice , cj as findLastIndex , bk as script$g , cM as script$h , ca as script$i , bN as script$j , ck as script$k , a9 as script$l , bR as resolveComponent , n as normalizeStyle , k as createVNode , E as toDisplayString , bI as Transition , cp as createSlots , a8 as createTextVNode , cv as script$m , cr as resolve , dc as nestedPosition , cf as script$n , ch as isPrintableCharacter , l as script$o , cI as script$p , cx as normalizeProps , cC as guardReactiveProps } from "./index-DqXp9vW4.js" ;
import { s as script$q } from "./index-BTHx8UHZ.js" ;
var theme$6 = /* @__PURE__ */ _ _name ( function theme ( _ref ) {
2024-10-28 18:29:38 +00:00
var dt = _ref . dt ;
2025-01-02 21:18:54 +00:00
return "\n.p-splitter {\n display: flex;\n flex-wrap: nowrap;\n border: 1px solid " . concat ( dt ( "splitter.border.color" ) , ";\n background: " ) . concat ( dt ( "splitter.background" ) , ";\n border-radius: " ) . concat ( dt ( "border.radius.md" ) , ";\n color: " ) . concat ( dt ( "splitter.color" ) , ";\n}\n\n.p-splitter-vertical {\n flex-direction: column;\n}\n\n.p-splitter-gutter {\n flex-grow: 0;\n flex-shrink: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 1;\n background: " ) . concat ( dt ( "splitter.gutter.background" ) , ";\n}\n\n.p-splitter-gutter-handle {\n border-radius: " ) . concat ( dt ( "splitter.handle.border.radius" ) , ";\n background: " ) . concat ( dt ( "splitter.handle.background" ) , ";\n transition: outline-color " ) . concat ( dt ( "splitter.transition.duration" ) , ", box-shadow " ) . concat ( dt ( "splitter.transition.duration" ) , ";\n outline-color: transparent;\n}\n\n.p-splitter-gutter-handle:focus-visible {\n box-shadow: " ) . concat ( dt ( "splitter.handle.focus.ring.shadow" ) , ";\n outline: " ) . concat ( dt ( "splitter.handle.focus.ring.width" ) , " " ) . concat ( dt ( "splitter.handle.focus.ring.style" ) , " " ) . concat ( dt ( "splitter.handle.focus.ring.color" ) , ";\n outline-offset: " ) . concat ( dt ( "splitter.handle.focus.ring.offset" ) , ";\n}\n\n.p-splitter-horizontal.p-splitter-resizing {\n cursor: col-resize;\n user-select: none;\n}\n\n.p-splitter-vertical.p-splitter-resizing {\n cursor: row-resize;\n user-select: none;\n}\n\n.p-splitter-horizontal > .p-splitter-gutter > .p-splitter-gutter-handle {\n height: " ) . concat ( dt ( "splitter.handle.size" ) , ";\n width: 100%;\n}\n\n.p-splitter-vertical > .p-splitter-gutter > .p-splitter-gutter-handle {\n width: " ) . concat ( dt ( "splitter.handle.size" ) , ";\n height: 100%;\n}\n\n.p-splitter-horizontal > .p-splitter-gutter {\n cursor: col-resize;\n}\n\n.p-splitter-vertical > .p-splitter-gutter {\n cursor: row-resize;\n}\n\n.p-splitterpanel {\n flex-grow: 1;\n overflow: hidden;\n}\n\n.p-splitterpanel-nested {\n display: flex;\n}\n\n.p-splitterpanel .p-splitter {\n flex-grow: 1;\n border: 0 none;\n}\n" ) ;
2024-10-28 18:29:38 +00:00
} , "theme" ) ;
2025-02-15 09:32:47 +00:00
var classes$9 = {
2025-01-02 21:18:54 +00:00
root : /* @__PURE__ */ _ _name ( function root ( _ref2 ) {
var props = _ref2 . props ;
return [ "p-splitter p-component" , "p-splitter-" + props . layout ] ;
} , "root" ) ,
gutter : "p-splitter-gutter" ,
gutterHandle : "p-splitter-gutter-handle"
2024-10-28 18:29:38 +00:00
} ;
2025-02-15 09:32:47 +00:00
var inlineStyles$3 = {
2025-01-02 21:18:54 +00:00
root : /* @__PURE__ */ _ _name ( function root2 ( _ref3 ) {
var props = _ref3 . props ;
return [ {
display : "flex" ,
"flex-wrap" : "nowrap"
} , props . layout === "vertical" ? {
"flex-direction" : "column"
} : "" ] ;
} , "root" )
} ;
var SplitterStyle = BaseStyle . extend ( {
name : "splitter" ,
2025-02-15 09:32:47 +00:00
theme : theme$6 ,
classes : classes$9 ,
inlineStyles : inlineStyles$3
2024-10-28 18:29:38 +00:00
} ) ;
2025-02-15 09:32:47 +00:00
var script$1$9 = {
2025-01-02 21:18:54 +00:00
name : "BaseSplitter" ,
2025-02-15 09:32:47 +00:00
"extends" : script$c ,
2025-01-02 21:18:54 +00:00
props : {
layout : {
type : String ,
"default" : "horizontal"
} ,
gutterSize : {
type : Number ,
"default" : 4
} ,
stateKey : {
type : String ,
"default" : null
} ,
stateStorage : {
type : String ,
"default" : "session"
} ,
step : {
type : Number ,
"default" : 5
}
} ,
style : SplitterStyle ,
2025-01-31 18:07:37 +00:00
provide : /* @__PURE__ */ _ _name ( function provide ( ) {
2024-10-28 18:29:38 +00:00
return {
2025-01-02 21:18:54 +00:00
$pcSplitter : this ,
2024-10-28 18:29:38 +00:00
$parentInstance : this
} ;
} , "provide" )
} ;
2025-02-15 09:32:47 +00:00
function _toConsumableArray$1 ( r ) {
return _arrayWithoutHoles$1 ( r ) || _iterableToArray$1 ( r ) || _unsupportedIterableToArray$1 ( r ) || _nonIterableSpread$1 ( ) ;
2024-10-28 18:29:38 +00:00
}
2025-02-15 09:32:47 +00:00
_ _name ( _toConsumableArray$1 , "_toConsumableArray$1" ) ;
function _nonIterableSpread$1 ( ) {
2025-01-02 21:18:54 +00:00
throw new TypeError ( "Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method." ) ;
}
2025-02-15 09:32:47 +00:00
_ _name ( _nonIterableSpread$1 , "_nonIterableSpread$1" ) ;
function _unsupportedIterableToArray$1 ( r , a ) {
2025-01-02 21:18:54 +00:00
if ( r ) {
2025-02-15 09:32:47 +00:00
if ( "string" == typeof r ) return _arrayLikeToArray$1 ( r , a ) ;
2025-01-02 21:18:54 +00:00
var t = { } . toString . call ( r ) . slice ( 8 , - 1 ) ;
2025-02-15 09:32:47 +00:00
return "Object" === t && r . constructor && ( t = r . constructor . name ) , "Map" === t || "Set" === t ? Array . from ( r ) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/ . test ( t ) ? _arrayLikeToArray$1 ( r , a ) : void 0 ;
2024-10-28 18:29:38 +00:00
}
2025-01-02 21:18:54 +00:00
}
2025-02-15 09:32:47 +00:00
_ _name ( _unsupportedIterableToArray$1 , "_unsupportedIterableToArray$1" ) ;
function _iterableToArray$1 ( r ) {
2025-01-02 21:18:54 +00:00
if ( "undefined" != typeof Symbol && null != r [ Symbol . iterator ] || null != r [ "@@iterator" ] ) return Array . from ( r ) ;
}
2025-02-15 09:32:47 +00:00
_ _name ( _iterableToArray$1 , "_iterableToArray$1" ) ;
function _arrayWithoutHoles$1 ( r ) {
if ( Array . isArray ( r ) ) return _arrayLikeToArray$1 ( r ) ;
2025-01-02 21:18:54 +00:00
}
2025-02-15 09:32:47 +00:00
_ _name ( _arrayWithoutHoles$1 , "_arrayWithoutHoles$1" ) ;
function _arrayLikeToArray$1 ( r , a ) {
2025-01-02 21:18:54 +00:00
( null == a || a > r . length ) && ( a = r . length ) ;
for ( var e = 0 , n = Array ( a ) ; e < a ; e ++ ) n [ e ] = r [ e ] ;
return n ;
}
2025-02-15 09:32:47 +00:00
_ _name ( _arrayLikeToArray$1 , "_arrayLikeToArray$1" ) ;
var script$b = {
2025-01-02 21:18:54 +00:00
name : "Splitter" ,
2025-02-15 09:32:47 +00:00
"extends" : script$1$9 ,
2024-10-29 18:14:06 +00:00
inheritAttrs : false ,
2025-01-02 21:18:54 +00:00
emits : [ "resizestart" , "resizeend" , "resize" ] ,
dragging : false ,
mouseMoveListener : null ,
mouseUpListener : null ,
touchMoveListener : null ,
touchEndListener : null ,
size : null ,
gutterElement : null ,
startPos : null ,
prevPanelElement : null ,
nextPanelElement : null ,
nextPanelSize : null ,
prevPanelSize : null ,
panelSizes : null ,
prevPanelIndex : null ,
timer : null ,
data : /* @__PURE__ */ _ _name ( function data ( ) {
2024-10-29 18:14:06 +00:00
return {
2025-01-02 21:18:54 +00:00
prevSize : null
2024-10-29 18:14:06 +00:00
} ;
} , "data" ) ,
mounted : /* @__PURE__ */ _ _name ( function mounted ( ) {
2025-01-31 18:07:37 +00:00
this . initializePanels ( ) ;
2024-10-29 18:14:06 +00:00
} , "mounted" ) ,
beforeUnmount : /* @__PURE__ */ _ _name ( function beforeUnmount ( ) {
2025-01-02 21:18:54 +00:00
this . clear ( ) ;
this . unbindMouseListeners ( ) ;
2024-10-29 18:14:06 +00:00
} , "beforeUnmount" ) ,
methods : {
2025-01-02 21:18:54 +00:00
isSplitterPanel : /* @__PURE__ */ _ _name ( function isSplitterPanel ( child ) {
return child . type . name === "SplitterPanel" ;
} , "isSplitterPanel" ) ,
2025-01-31 18:07:37 +00:00
initializePanels : /* @__PURE__ */ _ _name ( function initializePanels ( ) {
var _this = this ;
if ( this . panels && this . panels . length ) {
var initialized = false ;
if ( this . isStateful ( ) ) {
initialized = this . restoreState ( ) ;
}
if ( ! initialized ) {
2025-02-15 09:32:47 +00:00
var children = _toConsumableArray$1 ( this . $el . children ) . filter ( function ( child ) {
2025-01-31 18:07:37 +00:00
return child . getAttribute ( "data-pc-name" ) === "splitterpanel" ;
} ) ;
var _panelSizes = [ ] ;
this . panels . map ( function ( panel , i ) {
var panelInitialSize = panel . props && panel . props . size ? panel . props . size : null ;
var panelSize = panelInitialSize || 100 / _this . panels . length ;
_panelSizes [ i ] = panelSize ;
children [ i ] . style . flexBasis = "calc(" + panelSize + "% - " + ( _this . panels . length - 1 ) * _this . gutterSize + "px)" ;
} ) ;
this . panelSizes = _panelSizes ;
this . prevSize = parseFloat ( _panelSizes [ 0 ] ) . toFixed ( 4 ) ;
}
}
} , "initializePanels" ) ,
2025-01-02 21:18:54 +00:00
onResizeStart : /* @__PURE__ */ _ _name ( function onResizeStart ( event , index , isKeyDown ) {
this . gutterElement = event . currentTarget || event . target . parentElement ;
this . size = this . horizontal ? getWidth ( this . $el ) : getHeight ( this . $el ) ;
if ( ! isKeyDown ) {
this . dragging = true ;
this . startPos = this . layout === "horizontal" ? event . pageX || event . changedTouches [ 0 ] . pageX : event . pageY || event . changedTouches [ 0 ] . pageY ;
}
this . prevPanelElement = this . gutterElement . previousElementSibling ;
this . nextPanelElement = this . gutterElement . nextElementSibling ;
if ( isKeyDown ) {
this . prevPanelSize = this . horizontal ? getOuterWidth ( this . prevPanelElement , true ) : getOuterHeight ( this . prevPanelElement , true ) ;
this . nextPanelSize = this . horizontal ? getOuterWidth ( this . nextPanelElement , true ) : getOuterHeight ( this . nextPanelElement , true ) ;
2024-10-29 18:14:06 +00:00
} else {
2025-01-02 21:18:54 +00:00
this . prevPanelSize = 100 * ( this . horizontal ? getOuterWidth ( this . prevPanelElement , true ) : getOuterHeight ( this . prevPanelElement , true ) ) / this . size ;
this . nextPanelSize = 100 * ( this . horizontal ? getOuterWidth ( this . nextPanelElement , true ) : getOuterHeight ( this . nextPanelElement , true ) ) / this . size ;
2024-10-29 18:14:06 +00:00
}
2025-01-02 21:18:54 +00:00
this . prevPanelIndex = index ;
this . $emit ( "resizestart" , {
originalEvent : event ,
sizes : this . panelSizes
} ) ;
this . $refs . gutter [ index ] . setAttribute ( "data-p-gutter-resizing" , true ) ;
this . $el . setAttribute ( "data-p-resizing" , true ) ;
} , "onResizeStart" ) ,
onResize : /* @__PURE__ */ _ _name ( function onResize ( event , step , isKeyDown ) {
var newPos , newPrevPanelSize , newNextPanelSize ;
if ( isKeyDown ) {
if ( this . horizontal ) {
newPrevPanelSize = 100 * ( this . prevPanelSize + step ) / this . size ;
newNextPanelSize = 100 * ( this . nextPanelSize - step ) / this . size ;
} else {
newPrevPanelSize = 100 * ( this . prevPanelSize - step ) / this . size ;
newNextPanelSize = 100 * ( this . nextPanelSize + step ) / this . size ;
}
2024-10-29 18:14:06 +00:00
} else {
2025-01-31 18:07:37 +00:00
if ( this . horizontal ) {
if ( isRTL ( this . $el ) ) {
newPos = ( this . startPos - event . pageX ) * 100 / this . size ;
} else {
newPos = ( event . pageX - this . startPos ) * 100 / this . size ;
}
} else {
newPos = ( event . pageY - this . startPos ) * 100 / this . size ;
}
2025-01-02 21:18:54 +00:00
newPrevPanelSize = this . prevPanelSize + newPos ;
newNextPanelSize = this . nextPanelSize - newPos ;
2024-10-29 18:14:06 +00:00
}
2025-01-02 21:18:54 +00:00
if ( this . validateResize ( newPrevPanelSize , newNextPanelSize ) ) {
this . prevPanelElement . style . flexBasis = "calc(" + newPrevPanelSize + "% - " + ( this . panels . length - 1 ) * this . gutterSize + "px)" ;
this . nextPanelElement . style . flexBasis = "calc(" + newNextPanelSize + "% - " + ( this . panels . length - 1 ) * this . gutterSize + "px)" ;
this . panelSizes [ this . prevPanelIndex ] = newPrevPanelSize ;
this . panelSizes [ this . prevPanelIndex + 1 ] = newNextPanelSize ;
this . prevSize = parseFloat ( newPrevPanelSize ) . toFixed ( 4 ) ;
}
this . $emit ( "resize" , {
originalEvent : event ,
sizes : this . panelSizes
} ) ;
} , "onResize" ) ,
onResizeEnd : /* @__PURE__ */ _ _name ( function onResizeEnd ( event ) {
if ( this . isStateful ( ) ) {
this . saveState ( ) ;
}
this . $emit ( "resizeend" , {
originalEvent : event ,
sizes : this . panelSizes
} ) ;
this . $refs . gutter . forEach ( function ( gutter ) {
return gutter . setAttribute ( "data-p-gutter-resizing" , false ) ;
} ) ;
this . $el . setAttribute ( "data-p-resizing" , false ) ;
this . clear ( ) ;
} , "onResizeEnd" ) ,
repeat : /* @__PURE__ */ _ _name ( function repeat ( event , index , step ) {
this . onResizeStart ( event , index , true ) ;
this . onResize ( event , step , true ) ;
} , "repeat" ) ,
setTimer : /* @__PURE__ */ _ _name ( function setTimer ( event , index , step ) {
var _this2 = this ;
if ( ! this . timer ) {
this . timer = setInterval ( function ( ) {
_this2 . repeat ( event , index , step ) ;
} , 40 ) ;
}
} , "setTimer" ) ,
clearTimer : /* @__PURE__ */ _ _name ( function clearTimer ( ) {
if ( this . timer ) {
clearInterval ( this . timer ) ;
this . timer = null ;
}
} , "clearTimer" ) ,
onGutterKeyUp : /* @__PURE__ */ _ _name ( function onGutterKeyUp ( ) {
this . clearTimer ( ) ;
this . onResizeEnd ( ) ;
} , "onGutterKeyUp" ) ,
onGutterKeyDown : /* @__PURE__ */ _ _name ( function onGutterKeyDown ( event , index ) {
2024-10-29 18:14:06 +00:00
switch ( event . code ) {
2025-01-02 21:18:54 +00:00
case "ArrowLeft" : {
if ( this . layout === "horizontal" ) {
this . setTimer ( event , index , this . step * - 1 ) ;
}
event . preventDefault ( ) ;
2024-10-29 18:14:06 +00:00
break ;
2025-01-02 21:18:54 +00:00
}
case "ArrowRight" : {
if ( this . layout === "horizontal" ) {
this . setTimer ( event , index , this . step ) ;
}
event . preventDefault ( ) ;
2024-10-29 18:14:06 +00:00
break ;
2025-01-02 21:18:54 +00:00
}
case "ArrowDown" : {
if ( this . layout === "vertical" ) {
this . setTimer ( event , index , this . step * - 1 ) ;
}
event . preventDefault ( ) ;
2024-10-29 18:14:06 +00:00
break ;
2025-01-02 21:18:54 +00:00
}
case "ArrowUp" : {
if ( this . layout === "vertical" ) {
this . setTimer ( event , index , this . step ) ;
}
event . preventDefault ( ) ;
2024-10-29 18:14:06 +00:00
break ;
2025-01-02 21:18:54 +00:00
}
2024-10-29 18:14:06 +00:00
}
2025-01-02 21:18:54 +00:00
} , "onGutterKeyDown" ) ,
onGutterMouseDown : /* @__PURE__ */ _ _name ( function onGutterMouseDown ( event , index ) {
this . onResizeStart ( event , index ) ;
this . bindMouseListeners ( ) ;
} , "onGutterMouseDown" ) ,
onGutterTouchStart : /* @__PURE__ */ _ _name ( function onGutterTouchStart ( event , index ) {
this . onResizeStart ( event , index ) ;
this . bindTouchListeners ( ) ;
2024-10-29 18:14:06 +00:00
event . preventDefault ( ) ;
2025-01-02 21:18:54 +00:00
} , "onGutterTouchStart" ) ,
onGutterTouchMove : /* @__PURE__ */ _ _name ( function onGutterTouchMove ( event ) {
this . onResize ( event ) ;
2024-10-29 18:14:06 +00:00
event . preventDefault ( ) ;
2025-01-02 21:18:54 +00:00
} , "onGutterTouchMove" ) ,
onGutterTouchEnd : /* @__PURE__ */ _ _name ( function onGutterTouchEnd ( event ) {
this . onResizeEnd ( event ) ;
this . unbindTouchListeners ( ) ;
2024-10-29 18:14:06 +00:00
event . preventDefault ( ) ;
2025-01-02 21:18:54 +00:00
} , "onGutterTouchEnd" ) ,
bindMouseListeners : /* @__PURE__ */ _ _name ( function bindMouseListeners ( ) {
var _this3 = this ;
if ( ! this . mouseMoveListener ) {
this . mouseMoveListener = function ( event ) {
return _this3 . onResize ( event ) ;
} ;
document . addEventListener ( "mousemove" , this . mouseMoveListener ) ;
2024-10-28 18:29:38 +00:00
}
2025-01-02 21:18:54 +00:00
if ( ! this . mouseUpListener ) {
this . mouseUpListener = function ( event ) {
_this3 . onResizeEnd ( event ) ;
_this3 . unbindMouseListeners ( ) ;
} ;
document . addEventListener ( "mouseup" , this . mouseUpListener ) ;
2024-10-28 18:29:38 +00:00
}
2025-01-02 21:18:54 +00:00
} , "bindMouseListeners" ) ,
bindTouchListeners : /* @__PURE__ */ _ _name ( function bindTouchListeners ( ) {
var _this4 = this ;
if ( ! this . touchMoveListener ) {
this . touchMoveListener = function ( event ) {
return _this4 . onResize ( event . changedTouches [ 0 ] ) ;
} ;
document . addEventListener ( "touchmove" , this . touchMoveListener ) ;
2024-10-28 18:29:38 +00:00
}
2025-01-02 21:18:54 +00:00
if ( ! this . touchEndListener ) {
this . touchEndListener = function ( event ) {
_this4 . resizeEnd ( event ) ;
_this4 . unbindTouchListeners ( ) ;
} ;
document . addEventListener ( "touchend" , this . touchEndListener ) ;
2024-10-28 18:29:38 +00:00
}
} , "bindTouchListeners" ) ,
validateResize : /* @__PURE__ */ _ _name ( function validateResize ( newPrevPanelSize , newNextPanelSize ) {
if ( newPrevPanelSize > 100 || newPrevPanelSize < 0 ) return false ;
if ( newNextPanelSize > 100 || newNextPanelSize < 0 ) return false ;
var prevPanelMinSize = getVNodeProp ( this . panels [ this . prevPanelIndex ] , "minSize" ) ;
if ( this . panels [ this . prevPanelIndex ] . props && prevPanelMinSize && prevPanelMinSize > newPrevPanelSize ) {
return false ;
}
var newPanelMinSize = getVNodeProp ( this . panels [ this . prevPanelIndex + 1 ] , "minSize" ) ;
if ( this . panels [ this . prevPanelIndex + 1 ] . props && newPanelMinSize && newPanelMinSize > newNextPanelSize ) {
return false ;
}
return true ;
} , "validateResize" ) ,
unbindMouseListeners : /* @__PURE__ */ _ _name ( function unbindMouseListeners ( ) {
if ( this . mouseMoveListener ) {
document . removeEventListener ( "mousemove" , this . mouseMoveListener ) ;
this . mouseMoveListener = null ;
}
if ( this . mouseUpListener ) {
document . removeEventListener ( "mouseup" , this . mouseUpListener ) ;
this . mouseUpListener = null ;
}
} , "unbindMouseListeners" ) ,
unbindTouchListeners : /* @__PURE__ */ _ _name ( function unbindTouchListeners ( ) {
if ( this . touchMoveListener ) {
document . removeEventListener ( "touchmove" , this . touchMoveListener ) ;
this . touchMoveListener = null ;
}
if ( this . touchEndListener ) {
document . removeEventListener ( "touchend" , this . touchEndListener ) ;
this . touchEndListener = null ;
}
} , "unbindTouchListeners" ) ,
clear : /* @__PURE__ */ _ _name ( function clear ( ) {
this . dragging = false ;
this . size = null ;
this . startPos = null ;
this . prevPanelElement = null ;
this . nextPanelElement = null ;
this . prevPanelSize = null ;
this . nextPanelSize = null ;
this . gutterElement = null ;
this . prevPanelIndex = null ;
} , "clear" ) ,
isStateful : /* @__PURE__ */ _ _name ( function isStateful ( ) {
return this . stateKey != null ;
} , "isStateful" ) ,
getStorage : /* @__PURE__ */ _ _name ( function getStorage ( ) {
switch ( this . stateStorage ) {
case "local" :
return window . localStorage ;
case "session" :
return window . sessionStorage ;
default :
throw new Error ( this . stateStorage + ' is not a valid value for the state storage, supported values are "local" and "session".' ) ;
}
} , "getStorage" ) ,
saveState : /* @__PURE__ */ _ _name ( function saveState ( ) {
if ( isArray ( this . panelSizes ) ) {
this . getStorage ( ) . setItem ( this . stateKey , JSON . stringify ( this . panelSizes ) ) ;
}
} , "saveState" ) ,
restoreState : /* @__PURE__ */ _ _name ( function restoreState ( ) {
var _this5 = this ;
var storage = this . getStorage ( ) ;
var stateString = storage . getItem ( this . stateKey ) ;
if ( stateString ) {
this . panelSizes = JSON . parse ( stateString ) ;
2025-02-15 09:32:47 +00:00
var children = _toConsumableArray$1 ( this . $el . children ) . filter ( function ( child ) {
2024-10-28 18:29:38 +00:00
return child . getAttribute ( "data-pc-name" ) === "splitterpanel" ;
} ) ;
children . forEach ( function ( child , i ) {
child . style . flexBasis = "calc(" + _this5 . panelSizes [ i ] + "% - " + ( _this5 . panels . length - 1 ) * _this5 . gutterSize + "px)" ;
} ) ;
return true ;
}
return false ;
2025-01-31 18:07:37 +00:00
} , "restoreState" ) ,
resetState : /* @__PURE__ */ _ _name ( function resetState ( ) {
this . initializePanels ( ) ;
} , "resetState" )
2024-10-28 18:29:38 +00:00
} ,
computed : {
panels : /* @__PURE__ */ _ _name ( function panels ( ) {
var _this6 = this ;
var panels2 = [ ] ;
this . $slots [ "default" ] ( ) . forEach ( function ( child ) {
if ( _this6 . isSplitterPanel ( child ) ) {
panels2 . push ( child ) ;
} else if ( child . children instanceof Array ) {
child . children . forEach ( function ( nestedChild ) {
if ( _this6 . isSplitterPanel ( nestedChild ) ) {
panels2 . push ( nestedChild ) ;
}
} ) ;
}
} ) ;
return panels2 ;
} , "panels" ) ,
gutterStyle : /* @__PURE__ */ _ _name ( function gutterStyle ( ) {
if ( this . horizontal ) return {
width : this . gutterSize + "px"
} ;
else return {
height : this . gutterSize + "px"
} ;
} , "gutterStyle" ) ,
horizontal : /* @__PURE__ */ _ _name ( function horizontal ( ) {
return this . layout === "horizontal" ;
} , "horizontal" ) ,
getPTOptions : /* @__PURE__ */ _ _name ( function getPTOptions ( ) {
var _this$$parentInstance ;
return {
context : {
nested : ( _this$$parentInstance = this . $parentInstance ) === null || _this$$parentInstance === void 0 ? void 0 : _this$$parentInstance . nestedState
}
} ;
} , "getPTOptions" )
}
} ;
2025-02-15 09:32:47 +00:00
var _hoisted _1$6 = [ "onMousedown" , "onTouchstart" , "onTouchmove" , "onTouchend" ] ;
2025-01-31 18:07:37 +00:00
var _hoisted _2$4 = [ "aria-orientation" , "aria-valuenow" , "onKeydown" ] ;
2025-02-15 09:32:47 +00:00
function render$a ( _ctx , _cache , $props , $setup , $data , $options ) {
2024-10-28 18:29:38 +00:00
return openBlock ( ) , createElementBlock ( "div" , mergeProps ( {
"class" : _ctx . cx ( "root" ) ,
style : _ctx . sx ( "root" ) ,
"data-p-resizing" : false
} , _ctx . ptmi ( "root" , $options . getPTOptions ) ) , [ ( openBlock ( true ) , createElementBlock ( Fragment , null , renderList ( $options . panels , function ( panel , i ) {
return openBlock ( ) , createElementBlock ( Fragment , {
key : i
} , [ ( openBlock ( ) , createBlock ( resolveDynamicComponent ( panel ) , {
tabindex : "-1"
} ) ) , i !== $options . panels . length - 1 ? ( openBlock ( ) , createElementBlock ( "div" , mergeProps ( {
key : 0 ,
ref _for : true ,
ref : "gutter" ,
"class" : _ctx . cx ( "gutter" ) ,
role : "separator" ,
tabindex : "-1" ,
onMousedown : /* @__PURE__ */ _ _name ( function onMousedown ( $event ) {
return $options . onGutterMouseDown ( $event , i ) ;
} , "onMousedown" ) ,
onTouchstart : /* @__PURE__ */ _ _name ( function onTouchstart ( $event ) {
return $options . onGutterTouchStart ( $event , i ) ;
} , "onTouchstart" ) ,
onTouchmove : /* @__PURE__ */ _ _name ( function onTouchmove ( $event ) {
return $options . onGutterTouchMove ( $event , i ) ;
} , "onTouchmove" ) ,
onTouchend : /* @__PURE__ */ _ _name ( function onTouchend ( $event ) {
return $options . onGutterTouchEnd ( $event , i ) ;
} , "onTouchend" ) ,
"data-p-gutter-resizing" : false
} , _ctx . ptm ( "gutter" ) ) , [ createBaseVNode ( "div" , mergeProps ( {
"class" : _ctx . cx ( "gutterHandle" ) ,
tabindex : "0" ,
style : [ $options . gutterStyle ] ,
"aria-orientation" : _ctx . layout ,
"aria-valuenow" : $data . prevSize ,
onKeyup : _cache [ 0 ] || ( _cache [ 0 ] = function ( ) {
return $options . onGutterKeyUp && $options . onGutterKeyUp . apply ( $options , arguments ) ;
} ) ,
2024-10-29 18:14:06 +00:00
onKeydown : /* @__PURE__ */ _ _name ( function onKeydown2 ( $event ) {
2024-10-28 18:29:38 +00:00
return $options . onGutterKeyDown ( $event , i ) ;
} , "onKeydown" ) ,
ref _for : true
2025-02-15 09:32:47 +00:00
} , _ctx . ptm ( "gutterHandle" ) ) , null , 16 , _hoisted _2$4 ) ] , 16 , _hoisted _1$6 ) ) : createCommentVNode ( "" , true ) ] , 64 ) ;
2024-10-28 18:29:38 +00:00
} ) , 128 ) ) ] , 16 ) ;
}
2025-02-15 09:32:47 +00:00
_ _name ( render$a , "render$a" ) ;
script$b . render = render$a ;
var classes$8 = {
2025-01-02 21:18:54 +00:00
root : /* @__PURE__ */ _ _name ( function root3 ( _ref ) {
2024-10-28 18:29:38 +00:00
var instance = _ref . instance ;
return [ "p-splitterpanel" , {
"p-splitterpanel-nested" : instance . isNested
} ] ;
} , "root" )
} ;
var SplitterPanelStyle = BaseStyle . extend ( {
name : "splitterpanel" ,
2025-02-15 09:32:47 +00:00
classes : classes$8
2024-10-28 18:29:38 +00:00
} ) ;
2025-02-15 09:32:47 +00:00
var script$1$8 = {
2024-10-28 18:29:38 +00:00
name : "BaseSplitterPanel" ,
2025-02-15 09:32:47 +00:00
"extends" : script$c ,
2024-10-28 18:29:38 +00:00
props : {
size : {
type : Number ,
"default" : null
} ,
minSize : {
type : Number ,
"default" : null
}
} ,
style : SplitterPanelStyle ,
2025-01-31 18:07:37 +00:00
provide : /* @__PURE__ */ _ _name ( function provide2 ( ) {
2024-10-28 18:29:38 +00:00
return {
$pcSplitterPanel : this ,
$parentInstance : this
} ;
} , "provide" )
} ;
2025-02-15 09:32:47 +00:00
var script$a = {
2024-10-28 18:29:38 +00:00
name : "SplitterPanel" ,
2025-02-15 09:32:47 +00:00
"extends" : script$1$8 ,
2024-10-28 18:29:38 +00:00
inheritAttrs : false ,
2025-01-02 21:18:54 +00:00
data : /* @__PURE__ */ _ _name ( function data2 ( ) {
2024-10-28 18:29:38 +00:00
return {
nestedState : null
} ;
} , "data" ) ,
computed : {
isNested : /* @__PURE__ */ _ _name ( function isNested ( ) {
var _this = this ;
return this . $slots [ "default" ] ( ) . some ( function ( child ) {
_this . nestedState = child . type . name === "Splitter" ? true : null ;
return _this . nestedState ;
} ) ;
} , "isNested" ) ,
getPTOptions : /* @__PURE__ */ _ _name ( function getPTOptions2 ( ) {
return {
context : {
nested : this . isNested
}
} ;
} , "getPTOptions" )
}
} ;
2025-02-15 09:32:47 +00:00
function render$9 ( _ctx , _cache , $props , $setup , $data , $options ) {
2024-10-28 18:29:38 +00:00
return openBlock ( ) , createElementBlock ( "div" , mergeProps ( {
ref : "container" ,
"class" : _ctx . cx ( "root" )
} , _ctx . ptmi ( "root" , $options . getPTOptions ) ) , [ renderSlot ( _ctx . $slots , "default" ) ] , 16 ) ;
}
2025-02-15 09:32:47 +00:00
_ _name ( render$9 , "render$9" ) ;
script$a . render = render$9 ;
var classes$7 = {
2025-01-02 21:18:54 +00:00
root : /* @__PURE__ */ _ _name ( function root4 ( _ref ) {
var instance = _ref . instance , props = _ref . props ;
return [ "p-tab" , {
"p-tab-active" : instance . active ,
"p-disabled" : props . disabled
2024-10-28 18:29:38 +00:00
} ] ;
2025-01-02 21:18:54 +00:00
} , "root" )
2024-10-28 18:29:38 +00:00
} ;
2025-01-02 21:18:54 +00:00
var TabStyle = BaseStyle . extend ( {
name : "tab" ,
2025-02-15 09:32:47 +00:00
classes : classes$7
2024-10-28 18:29:38 +00:00
} ) ;
2025-02-15 09:32:47 +00:00
var script$1$7 = {
2025-01-02 21:18:54 +00:00
name : "BaseTab" ,
2025-02-15 09:32:47 +00:00
"extends" : script$c ,
2024-10-28 18:29:38 +00:00
props : {
2025-01-02 21:18:54 +00:00
value : {
type : [ String , Number ] ,
"default" : void 0
2024-10-28 18:29:38 +00:00
} ,
2025-01-02 21:18:54 +00:00
disabled : {
2024-10-28 18:29:38 +00:00
type : Boolean ,
"default" : false
} ,
2025-01-02 21:18:54 +00:00
as : {
type : [ String , Object ] ,
"default" : "BUTTON"
2024-10-28 18:29:38 +00:00
} ,
2025-01-02 21:18:54 +00:00
asChild : {
2024-10-28 18:29:38 +00:00
type : Boolean ,
"default" : false
}
} ,
2025-01-02 21:18:54 +00:00
style : TabStyle ,
2025-01-31 18:07:37 +00:00
provide : /* @__PURE__ */ _ _name ( function provide3 ( ) {
2024-10-28 18:29:38 +00:00
return {
2025-01-02 21:18:54 +00:00
$pcTab : this ,
2024-10-28 18:29:38 +00:00
$parentInstance : this
} ;
} , "provide" )
} ;
2025-02-15 09:32:47 +00:00
var script$9 = {
2025-01-02 21:18:54 +00:00
name : "Tab" ,
2025-02-15 09:32:47 +00:00
"extends" : script$1$7 ,
2024-10-28 18:29:38 +00:00
inheritAttrs : false ,
2025-01-02 21:18:54 +00:00
inject : [ "$pcTabs" , "$pcTabList" ] ,
2024-10-28 18:29:38 +00:00
methods : {
2025-01-02 21:18:54 +00:00
onFocus : /* @__PURE__ */ _ _name ( function onFocus ( ) {
this . $pcTabs . selectOnFocus && this . changeActiveValue ( ) ;
2024-10-28 18:29:38 +00:00
} , "onFocus" ) ,
2025-01-02 21:18:54 +00:00
onClick : /* @__PURE__ */ _ _name ( function onClick ( ) {
this . changeActiveValue ( ) ;
} , "onClick" ) ,
onKeydown : /* @__PURE__ */ _ _name ( function onKeydown ( event ) {
2024-10-28 18:29:38 +00:00
switch ( event . code ) {
2025-01-02 21:18:54 +00:00
case "ArrowRight" :
this . onArrowRightKey ( event ) ;
2024-10-28 18:29:38 +00:00
break ;
case "ArrowLeft" :
this . onArrowLeftKey ( event ) ;
break ;
case "Home" :
this . onHomeKey ( event ) ;
break ;
case "End" :
this . onEndKey ( event ) ;
break ;
case "PageDown" :
this . onPageDownKey ( event ) ;
break ;
case "PageUp" :
this . onPageUpKey ( event ) ;
break ;
case "Enter" :
case "NumpadEnter" :
2025-01-02 21:18:54 +00:00
case "Space" :
2024-10-28 18:29:38 +00:00
this . onEnterKey ( event ) ;
break ;
}
2025-01-02 21:18:54 +00:00
} , "onKeydown" ) ,
onArrowRightKey : /* @__PURE__ */ _ _name ( function onArrowRightKey ( event ) {
var nextTab = this . findNextTab ( event . currentTarget ) ;
nextTab ? this . changeFocusedTab ( event , nextTab ) : this . onHomeKey ( event ) ;
event . preventDefault ( ) ;
} , "onArrowRightKey" ) ,
onArrowLeftKey : /* @__PURE__ */ _ _name ( function onArrowLeftKey ( event ) {
var prevTab = this . findPrevTab ( event . currentTarget ) ;
prevTab ? this . changeFocusedTab ( event , prevTab ) : this . onEndKey ( event ) ;
event . preventDefault ( ) ;
} , "onArrowLeftKey" ) ,
onHomeKey : /* @__PURE__ */ _ _name ( function onHomeKey ( event ) {
var firstTab = this . findFirstTab ( ) ;
this . changeFocusedTab ( event , firstTab ) ;
event . preventDefault ( ) ;
} , "onHomeKey" ) ,
onEndKey : /* @__PURE__ */ _ _name ( function onEndKey ( event ) {
var lastTab = this . findLastTab ( ) ;
this . changeFocusedTab ( event , lastTab ) ;
event . preventDefault ( ) ;
} , "onEndKey" ) ,
onPageDownKey : /* @__PURE__ */ _ _name ( function onPageDownKey ( event ) {
this . scrollInView ( this . findLastTab ( ) ) ;
event . preventDefault ( ) ;
} , "onPageDownKey" ) ,
onPageUpKey : /* @__PURE__ */ _ _name ( function onPageUpKey ( event ) {
this . scrollInView ( this . findFirstTab ( ) ) ;
event . preventDefault ( ) ;
} , "onPageUpKey" ) ,
onEnterKey : /* @__PURE__ */ _ _name ( function onEnterKey ( event ) {
this . changeActiveValue ( ) ;
event . preventDefault ( ) ;
} , "onEnterKey" ) ,
findNextTab : /* @__PURE__ */ _ _name ( function findNextTab ( tabElement ) {
var selfCheck = arguments . length > 1 && arguments [ 1 ] !== void 0 ? arguments [ 1 ] : false ;
var element = selfCheck ? tabElement : tabElement . nextElementSibling ;
return element ? getAttribute ( element , "data-p-disabled" ) || getAttribute ( element , "data-pc-section" ) === "inkbar" ? this . findNextTab ( element ) : findSingle ( element , '[data-pc-name="tab"]' ) : null ;
} , "findNextTab" ) ,
findPrevTab : /* @__PURE__ */ _ _name ( function findPrevTab ( tabElement ) {
var selfCheck = arguments . length > 1 && arguments [ 1 ] !== void 0 ? arguments [ 1 ] : false ;
var element = selfCheck ? tabElement : tabElement . previousElementSibling ;
return element ? getAttribute ( element , "data-p-disabled" ) || getAttribute ( element , "data-pc-section" ) === "inkbar" ? this . findPrevTab ( element ) : findSingle ( element , '[data-pc-name="tab"]' ) : null ;
} , "findPrevTab" ) ,
findFirstTab : /* @__PURE__ */ _ _name ( function findFirstTab ( ) {
return this . findNextTab ( this . $pcTabList . $refs . content . firstElementChild , true ) ;
} , "findFirstTab" ) ,
findLastTab : /* @__PURE__ */ _ _name ( function findLastTab ( ) {
return this . findPrevTab ( this . $pcTabList . $refs . content . lastElementChild , true ) ;
} , "findLastTab" ) ,
changeActiveValue : /* @__PURE__ */ _ _name ( function changeActiveValue ( ) {
this . $pcTabs . updateValue ( this . value ) ;
} , "changeActiveValue" ) ,
changeFocusedTab : /* @__PURE__ */ _ _name ( function changeFocusedTab ( event , element ) {
focus ( element ) ;
this . scrollInView ( element ) ;
} , "changeFocusedTab" ) ,
scrollInView : /* @__PURE__ */ _ _name ( function scrollInView ( element ) {
var _element$scrollIntoVi ;
element === null || element === void 0 || ( _element$scrollIntoVi = element . scrollIntoView ) === null || _element$scrollIntoVi === void 0 || _element$scrollIntoVi . call ( element , {
block : "nearest"
} ) ;
} , "scrollInView" )
} ,
computed : {
active : /* @__PURE__ */ _ _name ( function active ( ) {
var _this$$pcTabs ;
return equals ( ( _this$$pcTabs = this . $pcTabs ) === null || _this$$pcTabs === void 0 ? void 0 : _this$$pcTabs . d _value , this . value ) ;
} , "active" ) ,
id : /* @__PURE__ */ _ _name ( function id ( ) {
var _this$$pcTabs2 ;
return "" . concat ( ( _this$$pcTabs2 = this . $pcTabs ) === null || _this$$pcTabs2 === void 0 ? void 0 : _this$$pcTabs2 . id , "_tab_" ) . concat ( this . value ) ;
} , "id" ) ,
ariaControls : /* @__PURE__ */ _ _name ( function ariaControls ( ) {
var _this$$pcTabs3 ;
return "" . concat ( ( _this$$pcTabs3 = this . $pcTabs ) === null || _this$$pcTabs3 === void 0 ? void 0 : _this$$pcTabs3 . id , "_tabpanel_" ) . concat ( this . value ) ;
} , "ariaControls" ) ,
attrs : /* @__PURE__ */ _ _name ( function attrs ( ) {
return mergeProps ( this . asAttrs , this . a11yAttrs , this . ptmi ( "root" , this . ptParams ) ) ;
} , "attrs" ) ,
asAttrs : /* @__PURE__ */ _ _name ( function asAttrs ( ) {
return this . as === "BUTTON" ? {
type : "button" ,
disabled : this . disabled
} : void 0 ;
} , "asAttrs" ) ,
a11yAttrs : /* @__PURE__ */ _ _name ( function a11yAttrs ( ) {
return {
id : this . id ,
tabindex : this . active ? this . $pcTabs . tabindex : - 1 ,
role : "tab" ,
"aria-selected" : this . active ,
"aria-controls" : this . ariaControls ,
"data-pc-name" : "tab" ,
"data-p-disabled" : this . disabled ,
"data-p-active" : this . active ,
onFocus : this . onFocus ,
onKeydown : this . onKeydown
} ;
} , "a11yAttrs" ) ,
ptParams : /* @__PURE__ */ _ _name ( function ptParams ( ) {
return {
context : {
active : this . active
2024-10-28 18:29:38 +00:00
}
2025-01-02 21:18:54 +00:00
} ;
} , "ptParams" )
} ,
directives : {
ripple : Ripple
}
} ;
2025-02-15 09:32:47 +00:00
function render$8 ( _ctx , _cache , $props , $setup , $data , $options ) {
2025-01-02 21:18:54 +00:00
var _directive _ripple = resolveDirective ( "ripple" ) ;
return ! _ctx . asChild ? withDirectives ( ( openBlock ( ) , createBlock ( resolveDynamicComponent ( _ctx . as ) , mergeProps ( {
key : 0 ,
"class" : _ctx . cx ( "root" ) ,
onClick : $options . onClick
} , $options . attrs ) , {
"default" : withCtx ( function ( ) {
return [ renderSlot ( _ctx . $slots , "default" ) ] ;
} ) ,
_ : 3
} , 16 , [ "class" , "onClick" ] ) ) , [ [ _directive _ripple ] ] ) : renderSlot ( _ctx . $slots , "default" , {
key : 1 ,
"class" : normalizeClass ( _ctx . cx ( "root" ) ) ,
active : $options . active ,
a11yAttrs : $options . a11yAttrs ,
onClick : $options . onClick
} ) ;
}
2025-02-15 09:32:47 +00:00
_ _name ( render$8 , "render$8" ) ;
script$9 . render = render$8 ;
var classes$6 = {
2025-01-02 21:18:54 +00:00
root : "p-tablist" ,
content : /* @__PURE__ */ _ _name ( function content ( _ref ) {
var instance = _ref . instance ;
return [ "p-tablist-content" , {
"p-tablist-viewport" : instance . $pcTabs . scrollable
} ] ;
} , "content" ) ,
tabList : "p-tablist-tab-list" ,
activeBar : "p-tablist-active-bar" ,
prevButton : "p-tablist-prev-button p-tablist-nav-button" ,
nextButton : "p-tablist-next-button p-tablist-nav-button"
} ;
var TabListStyle = BaseStyle . extend ( {
name : "tablist" ,
2025-02-15 09:32:47 +00:00
classes : classes$6
2025-01-02 21:18:54 +00:00
} ) ;
2025-02-15 09:32:47 +00:00
var script$1$6 = {
2025-01-02 21:18:54 +00:00
name : "BaseTabList" ,
2025-02-15 09:32:47 +00:00
"extends" : script$c ,
2025-01-02 21:18:54 +00:00
props : { } ,
style : TabListStyle ,
2025-01-31 18:07:37 +00:00
provide : /* @__PURE__ */ _ _name ( function provide4 ( ) {
2025-01-02 21:18:54 +00:00
return {
$pcTabList : this ,
$parentInstance : this
} ;
} , "provide" )
} ;
2025-02-15 09:32:47 +00:00
var script$8 = {
2025-01-02 21:18:54 +00:00
name : "TabList" ,
2025-02-15 09:32:47 +00:00
"extends" : script$1$6 ,
2025-01-02 21:18:54 +00:00
inheritAttrs : false ,
inject : [ "$pcTabs" ] ,
data : /* @__PURE__ */ _ _name ( function data3 ( ) {
return {
isPrevButtonEnabled : false ,
isNextButtonEnabled : true
} ;
} , "data" ) ,
resizeObserver : void 0 ,
watch : {
showNavigators : /* @__PURE__ */ _ _name ( function showNavigators ( newValue ) {
newValue ? this . bindResizeObserver ( ) : this . unbindResizeObserver ( ) ;
} , "showNavigators" ) ,
activeValue : {
flush : "post" ,
handler : /* @__PURE__ */ _ _name ( function handler ( ) {
this . updateInkBar ( ) ;
} , "handler" )
}
} ,
mounted : /* @__PURE__ */ _ _name ( function mounted2 ( ) {
var _this = this ;
this . $nextTick ( function ( ) {
_this . updateInkBar ( ) ;
} ) ;
if ( this . showNavigators ) {
this . updateButtonState ( ) ;
this . bindResizeObserver ( ) ;
}
} , "mounted" ) ,
updated : /* @__PURE__ */ _ _name ( function updated ( ) {
this . showNavigators && this . updateButtonState ( ) ;
} , "updated" ) ,
beforeUnmount : /* @__PURE__ */ _ _name ( function beforeUnmount2 ( ) {
this . unbindResizeObserver ( ) ;
} , "beforeUnmount" ) ,
methods : {
onScroll : /* @__PURE__ */ _ _name ( function onScroll ( event ) {
this . showNavigators && this . updateButtonState ( ) ;
event . preventDefault ( ) ;
} , "onScroll" ) ,
onPrevButtonClick : /* @__PURE__ */ _ _name ( function onPrevButtonClick ( ) {
var content2 = this . $refs . content ;
2025-01-31 18:07:37 +00:00
var buttonWidths = this . getVisibleButtonWidths ( ) ;
var width = getWidth ( content2 ) - buttonWidths ;
var currentScrollLeft = Math . abs ( content2 . scrollLeft ) ;
var scrollStep = width * 0.8 ;
var targetScrollLeft = currentScrollLeft - scrollStep ;
var scrollLeft = Math . max ( targetScrollLeft , 0 ) ;
content2 . scrollLeft = isRTL ( content2 ) ? - 1 * scrollLeft : scrollLeft ;
2025-01-02 21:18:54 +00:00
} , "onPrevButtonClick" ) ,
onNextButtonClick : /* @__PURE__ */ _ _name ( function onNextButtonClick ( ) {
var content2 = this . $refs . content ;
2025-01-31 18:07:37 +00:00
var buttonWidths = this . getVisibleButtonWidths ( ) ;
var width = getWidth ( content2 ) - buttonWidths ;
var currentScrollLeft = Math . abs ( content2 . scrollLeft ) ;
var scrollStep = width * 0.8 ;
var targetScrollLeft = currentScrollLeft + scrollStep ;
var maxScrollLeft = content2 . scrollWidth - width ;
var scrollLeft = Math . min ( targetScrollLeft , maxScrollLeft ) ;
content2 . scrollLeft = isRTL ( content2 ) ? - 1 * scrollLeft : scrollLeft ;
2025-01-02 21:18:54 +00:00
} , "onNextButtonClick" ) ,
bindResizeObserver : /* @__PURE__ */ _ _name ( function bindResizeObserver ( ) {
var _this2 = this ;
this . resizeObserver = new ResizeObserver ( function ( ) {
return _this2 . updateButtonState ( ) ;
2024-10-28 18:29:38 +00:00
} ) ;
2025-01-02 21:18:54 +00:00
this . resizeObserver . observe ( this . $refs . list ) ;
} , "bindResizeObserver" ) ,
unbindResizeObserver : /* @__PURE__ */ _ _name ( function unbindResizeObserver ( ) {
var _this$resizeObserver ;
( _this$resizeObserver = this . resizeObserver ) === null || _this$resizeObserver === void 0 || _this$resizeObserver . unobserve ( this . $refs . list ) ;
this . resizeObserver = void 0 ;
} , "unbindResizeObserver" ) ,
updateInkBar : /* @__PURE__ */ _ _name ( function updateInkBar ( ) {
var _this$$refs = this . $refs , content2 = _this$$refs . content , inkbar = _this$$refs . inkbar , tabs = _this$$refs . tabs ;
var activeTab = findSingle ( content2 , '[data-pc-name="tab"][data-p-active="true"]' ) ;
if ( this . $pcTabs . isVertical ( ) ) {
inkbar . style . height = getOuterHeight ( activeTab ) + "px" ;
inkbar . style . top = getOffset ( activeTab ) . top - getOffset ( tabs ) . top + "px" ;
2024-10-28 18:29:38 +00:00
} else {
2025-01-02 21:18:54 +00:00
inkbar . style . width = getOuterWidth ( activeTab ) + "px" ;
inkbar . style . left = getOffset ( activeTab ) . left - getOffset ( tabs ) . left + "px" ;
2024-10-28 18:29:38 +00:00
}
2025-01-02 21:18:54 +00:00
} , "updateInkBar" ) ,
updateButtonState : /* @__PURE__ */ _ _name ( function updateButtonState ( ) {
var _this$$refs2 = this . $refs , list = _this$$refs2 . list , content2 = _this$$refs2 . content ;
2025-01-31 18:07:37 +00:00
var scrollTop = content2 . scrollTop , scrollWidth = content2 . scrollWidth , scrollHeight = content2 . scrollHeight , offsetWidth = content2 . offsetWidth , offsetHeight = content2 . offsetHeight ;
var scrollLeft = Math . abs ( content2 . scrollLeft ) ;
2025-01-02 21:18:54 +00:00
var _ref = [ getWidth ( content2 ) , getHeight ( content2 ) ] , width = _ref [ 0 ] , height = _ref [ 1 ] ;
if ( this . $pcTabs . isVertical ( ) ) {
this . isPrevButtonEnabled = scrollTop !== 0 ;
this . isNextButtonEnabled = list . offsetHeight >= offsetHeight && parseInt ( scrollTop ) !== scrollHeight - height ;
2024-10-28 18:29:38 +00:00
} else {
2025-01-02 21:18:54 +00:00
this . isPrevButtonEnabled = scrollLeft !== 0 ;
this . isNextButtonEnabled = list . offsetWidth >= offsetWidth && parseInt ( scrollLeft ) !== scrollWidth - width ;
2024-10-28 18:29:38 +00:00
}
2025-01-02 21:18:54 +00:00
} , "updateButtonState" ) ,
getVisibleButtonWidths : /* @__PURE__ */ _ _name ( function getVisibleButtonWidths ( ) {
2025-01-31 18:07:37 +00:00
var _this$$refs3 = this . $refs , prevButton = _this$$refs3 . prevButton , nextButton = _this$$refs3 . nextButton ;
var width = 0 ;
if ( this . showNavigators ) {
width = ( ( prevButton === null || prevButton === void 0 ? void 0 : prevButton . offsetWidth ) || 0 ) + ( ( nextButton === null || nextButton === void 0 ? void 0 : nextButton . offsetWidth ) || 0 ) ;
}
return width ;
2025-01-02 21:18:54 +00:00
} , "getVisibleButtonWidths" )
} ,
computed : {
templates : /* @__PURE__ */ _ _name ( function templates ( ) {
return this . $pcTabs . $slots ;
} , "templates" ) ,
activeValue : /* @__PURE__ */ _ _name ( function activeValue ( ) {
return this . $pcTabs . d _value ;
} , "activeValue" ) ,
showNavigators : /* @__PURE__ */ _ _name ( function showNavigators2 ( ) {
return this . $pcTabs . scrollable && this . $pcTabs . showNavigators ;
} , "showNavigators" ) ,
prevButtonAriaLabel : /* @__PURE__ */ _ _name ( function prevButtonAriaLabel ( ) {
return this . $primevue . config . locale . aria ? this . $primevue . config . locale . aria . previous : void 0 ;
} , "prevButtonAriaLabel" ) ,
nextButtonAriaLabel : /* @__PURE__ */ _ _name ( function nextButtonAriaLabel ( ) {
return this . $primevue . config . locale . aria ? this . $primevue . config . locale . aria . next : void 0 ;
} , "nextButtonAriaLabel" )
} ,
components : {
2025-02-15 09:32:47 +00:00
ChevronLeftIcon : script$d ,
ChevronRightIcon : script$e
2025-01-02 21:18:54 +00:00
} ,
directives : {
ripple : Ripple
}
} ;
2025-02-15 09:32:47 +00:00
var _hoisted _1$5 = [ "aria-label" , "tabindex" ] ;
2025-01-31 18:07:37 +00:00
var _hoisted _2$3 = [ "aria-orientation" ] ;
var _hoisted _3$3 = [ "aria-label" , "tabindex" ] ;
2025-02-15 09:32:47 +00:00
function render$7 ( _ctx , _cache , $props , $setup , $data , $options ) {
2025-01-02 21:18:54 +00:00
var _directive _ripple = resolveDirective ( "ripple" ) ;
return openBlock ( ) , createElementBlock ( "div" , mergeProps ( {
ref : "list" ,
"class" : _ctx . cx ( "root" )
} , _ctx . ptmi ( "root" ) ) , [ $options . showNavigators && $data . isPrevButtonEnabled ? withDirectives ( ( openBlock ( ) , createElementBlock ( "button" , mergeProps ( {
key : 0 ,
ref : "prevButton" ,
"class" : _ctx . cx ( "prevButton" ) ,
"aria-label" : $options . prevButtonAriaLabel ,
tabindex : $options . $pcTabs . tabindex ,
onClick : _cache [ 0 ] || ( _cache [ 0 ] = function ( ) {
return $options . onPrevButtonClick && $options . onPrevButtonClick . apply ( $options , arguments ) ;
} )
} , _ctx . ptm ( "prevButton" ) , {
"data-pc-group-section" : "navigator"
} ) , [ ( openBlock ( ) , createBlock ( resolveDynamicComponent ( $options . templates . previcon || "ChevronLeftIcon" ) , mergeProps ( {
"aria-hidden" : "true"
2025-02-15 09:32:47 +00:00
} , _ctx . ptm ( "prevIcon" ) ) , null , 16 ) ) ] , 16 , _hoisted _1$5 ) ) , [ [ _directive _ripple ] ] ) : createCommentVNode ( "" , true ) , createBaseVNode ( "div" , mergeProps ( {
2025-01-02 21:18:54 +00:00
ref : "content" ,
"class" : _ctx . cx ( "content" ) ,
onScroll : _cache [ 1 ] || ( _cache [ 1 ] = function ( ) {
return $options . onScroll && $options . onScroll . apply ( $options , arguments ) ;
} )
} , _ctx . ptm ( "content" ) ) , [ createBaseVNode ( "div" , mergeProps ( {
ref : "tabs" ,
"class" : _ctx . cx ( "tabList" ) ,
role : "tablist" ,
"aria-orientation" : $options . $pcTabs . orientation || "horizontal"
} , _ctx . ptm ( "tabList" ) ) , [ renderSlot ( _ctx . $slots , "default" ) , createBaseVNode ( "span" , mergeProps ( {
ref : "inkbar" ,
"class" : _ctx . cx ( "activeBar" ) ,
role : "presentation" ,
"aria-hidden" : "true"
2025-01-31 18:07:37 +00:00
} , _ctx . ptm ( "activeBar" ) ) , null , 16 ) ] , 16 , _hoisted _2$3 ) ] , 16 ) , $options . showNavigators && $data . isNextButtonEnabled ? withDirectives ( ( openBlock ( ) , createElementBlock ( "button" , mergeProps ( {
2025-01-02 21:18:54 +00:00
key : 1 ,
ref : "nextButton" ,
"class" : _ctx . cx ( "nextButton" ) ,
"aria-label" : $options . nextButtonAriaLabel ,
tabindex : $options . $pcTabs . tabindex ,
onClick : _cache [ 2 ] || ( _cache [ 2 ] = function ( ) {
return $options . onNextButtonClick && $options . onNextButtonClick . apply ( $options , arguments ) ;
} )
} , _ctx . ptm ( "nextButton" ) , {
"data-pc-group-section" : "navigator"
} ) , [ ( openBlock ( ) , createBlock ( resolveDynamicComponent ( $options . templates . nexticon || "ChevronRightIcon" ) , mergeProps ( {
"aria-hidden" : "true"
2025-01-31 18:07:37 +00:00
} , _ctx . ptm ( "nextIcon" ) ) , null , 16 ) ) ] , 16 , _hoisted _3$3 ) ) , [ [ _directive _ripple ] ] ) : createCommentVNode ( "" , true ) ] , 16 ) ;
2024-10-28 18:29:38 +00:00
}
2025-02-15 09:32:47 +00:00
_ _name ( render$7 , "render$7" ) ;
script$8 . render = render$7 ;
var theme$5 = /* @__PURE__ */ _ _name ( function theme2 ( _ref ) {
2024-10-28 18:29:38 +00:00
_ref . dt ;
2025-01-31 18:07:37 +00:00
return "\n.p-buttongroup {\n display: inline-flex;\n}\n\n.p-buttongroup .p-button {\n margin: 0;\n}\n\n.p-buttongroup .p-button:not(:last-child),\n.p-buttongroup .p-button:not(:last-child):hover {\n border-inline-end: 0 none;\n}\n\n.p-buttongroup .p-button:not(:first-of-type):not(:last-of-type) {\n border-radius: 0;\n}\n\n.p-buttongroup .p-button:first-of-type:not(:only-of-type) {\n border-start-end-radius: 0;\n border-end-end-radius: 0;\n}\n\n.p-buttongroup .p-button:last-of-type:not(:only-of-type) {\n border-start-start-radius: 0;\n border-end-start-radius: 0;\n}\n\n.p-buttongroup .p-button:focus {\n position: relative;\n z-index: 1;\n}\n" ;
2024-10-28 18:29:38 +00:00
} , "theme" ) ;
2025-02-15 09:32:47 +00:00
var classes$5 = {
2024-10-28 18:29:38 +00:00
root : "p-buttongroup p-component"
} ;
var ButtonGroupStyle = BaseStyle . extend ( {
name : "buttongroup" ,
2025-02-15 09:32:47 +00:00
theme : theme$5 ,
classes : classes$5
2024-10-28 18:29:38 +00:00
} ) ;
2025-02-15 09:32:47 +00:00
var script$1$5 = {
2024-10-28 18:29:38 +00:00
name : "BaseButtonGroup" ,
2025-02-15 09:32:47 +00:00
"extends" : script$c ,
2024-10-28 18:29:38 +00:00
style : ButtonGroupStyle ,
2025-01-31 18:07:37 +00:00
provide : /* @__PURE__ */ _ _name ( function provide5 ( ) {
2024-10-28 18:29:38 +00:00
return {
$pcButtonGroup : this ,
$parentInstance : this
} ;
} , "provide" )
} ;
2025-02-15 09:32:47 +00:00
var script$7 = {
2024-10-28 18:29:38 +00:00
name : "ButtonGroup" ,
2025-02-15 09:32:47 +00:00
"extends" : script$1$5 ,
2024-10-28 18:29:38 +00:00
inheritAttrs : false
} ;
2025-02-15 09:32:47 +00:00
function render$6 ( _ctx , _cache , $props , $setup , $data , $options ) {
2024-10-28 18:29:38 +00:00
return openBlock ( ) , createElementBlock ( "span" , mergeProps ( {
"class" : _ctx . cx ( "root" ) ,
role : "group"
} , _ctx . ptmi ( "root" ) ) , [ renderSlot ( _ctx . $slots , "default" ) ] , 16 ) ;
}
2025-02-15 09:32:47 +00:00
_ _name ( render$6 , "render$6" ) ;
script$7 . render = render$6 ;
var theme$4 = /* @__PURE__ */ _ _name ( function theme3 ( _ref ) {
2024-10-28 18:29:38 +00:00
var dt = _ref . dt ;
2025-01-31 18:07:37 +00:00
return "\n.p-autocomplete {\n display: inline-flex;\n}\n\n.p-autocomplete-loader {\n position: absolute;\n top: 50%;\n margin-top: -0.5rem;\n inset-inline-end: " . concat ( dt ( "autocomplete.padding.x" ) , ";\n}\n\n.p-autocomplete:has(.p-autocomplete-dropdown) .p-autocomplete-loader {\n inset-inline-end: calc(" ) . concat ( dt ( "autocomplete.dropdown.width" ) , " + " ) . concat ( dt ( "autocomplete.padding.x" ) , ");\n}\n\n.p-autocomplete:has(.p-autocomplete-dropdown) .p-autocomplete-input {\n flex: 1 1 auto;\n width: 1%;\n}\n\n.p-autocomplete:has(.p-autocomplete-dropdown) .p-autocomplete-input,\n.p-autocomplete:has(.p-autocomplete-dropdown) .p-autocomplete-input-multiple {\n border-start-end-radius: 0;\n border-end-end-radius: 0;\n}\n\n.p-autocomplete-dropdown {\n cursor: pointer;\n display: inline-flex;\n user-select: none;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n width: " ) . concat ( dt ( "autocomplete.dropdown.width" ) , ";\n border-start-end-radius: " ) . concat ( dt ( "autocomplete.dropdown.border.radius" ) , ";\n border-end-end-radius: " ) . concat ( dt ( "autocomplete.dropdown.border.radius" ) , ";\n background: " ) . concat ( dt ( "autocomplete.dropdown.background" ) , ";\n border: 1px solid " ) . concat ( dt ( "autocomplete.dropdown.border.color" ) , ";\n border-inline-start: 0 none;\n color: " ) . concat ( dt ( "autocomplete.dropdown.color" ) , ";\n transition: background " ) . concat ( dt ( "autocomplete.transition.duration" ) , ", color " ) . concat ( dt ( "autocomplete.transition.duration" ) , ", border-color " ) . concat ( dt ( "autocomplete.transition.duration" ) , ", outline-color " ) . concat ( dt ( "autocomplete.transition.duration" ) , ", box-shadow " ) . concat ( dt ( "autocomplete.transition.duration" ) , ";\n outline-color: transparent;\n}\n\n.p-autocomplete-dropdown:not(:disabled):hover {\n background: " ) . concat ( dt ( "autocomplete.dropdown.hover.background" ) , ";\n border-color: " ) . concat ( dt ( "autocomplete.dropdown.hover.border.color" ) , ";\n color: " ) . concat ( dt ( "autocomplete.dropdown.hover.color" ) , ";\n}\n\n.p-autocomplete-dropdown:not(:disabled):active {\n background: " ) . concat ( dt ( "autocomplete.dropdown.active.background" ) , ";\n border-color: " ) . concat ( dt ( "autocomplete.dropdown.active.border.color" ) , ";\n color: " ) . concat ( dt ( "autocomplete.dropdown.active.color" ) , ";\n}\n\n.p-autocomplete-dropdown:focus-visible {\n box-shadow: " ) . concat ( dt ( "autocomplete.dropdown.focus.ring.shadow" ) , ";\n outline: " ) . concat ( dt ( "autocomplete.dropdown.focus.ring.width" ) , " " ) . concat ( dt ( "autocomplete.dropdown.focus.ring.style" ) , " " ) . concat ( dt ( "autocomplete.dropdown.focus.ring.color" ) , ";\n outline-offset: " ) . concat ( dt ( "autocomplete.dropdown.focus.ring.offset" ) , ";\n}\n\n.p-autocomplete .p-autocomplete-overlay {\n min-width: 100%;\n}\n\n.p-autocomplete-overlay {\n position: absolute;\n top: 0;\n left: 0;\n background: " ) . concat ( dt ( "autocomplete.overlay.background" ) , ";\n color: " ) . concat ( dt ( "autocomplete.overlay.color" ) , ";\n border: 1px solid " ) . concat ( dt ( "autocomplete.overlay.border.color" ) , ";\n border-radius: " ) . concat ( dt ( "autocomplete.overlay.border.radius" ) , ";\n box-shadow: " ) . concat ( dt ( "autocomplete.overlay.shadow" ) , ";\n}\n\n.p-autocomplete-list-container {\n overflow: auto;\n}\n\n.p-autocomplete-list {\n margin: 0;\n list-style-type: none;\n display: flex;\n flex-direction: column;\n gap: " ) . concat ( dt ( "autocomplete.list.gap" ) , ";\n padding: " ) . concat ( dt ( "autocomplete.list.padding" ) , ";\n}\n\n.p-autocomplete-option {\n cursor: pointer;\n white-space: nowrap;\n position: relative;\n overflow: hidden;\n display: flex;\n align-items: center;\n padding: " ) . concat ( dt ( "autocomplete.option.padding" ) , ";\n border: 0 none;\n color: " ) . concat ( dt ( "autocomplete.option.color" ) , ";\n background: transparent;\n transition: background " ) . concat ( dt ( "autocomplete.transition.duration" ) , ", color " ) . concat ( dt ( "autocomplete.transition.duration" ) , ", border-color " ) . concat ( dt ( "autocomplete.transition.duration" ) , " ; \ n
2024-10-28 18:29:38 +00:00
} , "theme" ) ;
2025-02-15 09:32:47 +00:00
var inlineStyles$2 = {
2025-01-02 21:18:54 +00:00
root : {
position : "relative"
}
2024-10-28 18:29:38 +00:00
} ;
2025-02-15 09:32:47 +00:00
var classes$4 = {
2025-01-02 21:18:54 +00:00
root : /* @__PURE__ */ _ _name ( function root5 ( _ref2 ) {
var instance = _ref2 . instance , props = _ref2 . props ;
return [ "p-autocomplete p-component p-inputwrapper" , {
"p-disabled" : props . disabled ,
2025-01-31 18:07:37 +00:00
"p-invalid" : instance . $invalid ,
2025-01-02 21:18:54 +00:00
"p-focus" : instance . focused ,
2025-01-31 18:07:37 +00:00
"p-inputwrapper-filled" : instance . $filled || isNotEmpty ( instance . inputValue ) ,
2025-01-02 21:18:54 +00:00
"p-inputwrapper-focus" : instance . focused ,
"p-autocomplete-open" : instance . overlayVisible ,
2025-01-31 18:07:37 +00:00
"p-autocomplete-fluid" : instance . $fluid
2025-01-02 21:18:54 +00:00
} ] ;
2024-10-28 18:29:38 +00:00
} , "root" ) ,
2025-01-31 18:07:37 +00:00
pcInputText : "p-autocomplete-input" ,
2025-01-02 21:18:54 +00:00
inputMultiple : /* @__PURE__ */ _ _name ( function inputMultiple ( _ref3 ) {
2025-01-31 18:07:37 +00:00
_ref3 . props ;
var instance = _ref3 . instance ;
2025-01-02 21:18:54 +00:00
return [ "p-autocomplete-input-multiple" , {
2025-01-31 18:07:37 +00:00
"p-variant-filled" : instance . $variant === "filled"
2024-10-28 18:29:38 +00:00
} ] ;
2025-01-02 21:18:54 +00:00
} , "inputMultiple" ) ,
chipItem : /* @__PURE__ */ _ _name ( function chipItem ( _ref4 ) {
var instance = _ref4 . instance , i = _ref4 . i ;
return [ "p-autocomplete-chip-item" , {
"p-focus" : instance . focusedMultipleOptionIndex === i
} ] ;
} , "chipItem" ) ,
pcChip : "p-autocomplete-chip" ,
chipIcon : "p-autocomplete-chip-icon" ,
inputChip : "p-autocomplete-input-chip" ,
loader : "p-autocomplete-loader" ,
dropdown : "p-autocomplete-dropdown" ,
overlay : "p-autocomplete-overlay p-component" ,
2025-01-31 18:07:37 +00:00
listContainer : "p-autocomplete-list-container" ,
2025-01-02 21:18:54 +00:00
list : "p-autocomplete-list" ,
optionGroup : "p-autocomplete-option-group" ,
option : /* @__PURE__ */ _ _name ( function option ( _ref5 ) {
var instance = _ref5 . instance , _option = _ref5 . option , i = _ref5 . i , getItemOptions = _ref5 . getItemOptions ;
return [ "p-autocomplete-option" , {
"p-autocomplete-option-selected" : instance . isSelected ( _option ) ,
"p-focus" : instance . focusedOptionIndex === instance . getOptionIndex ( i , getItemOptions ) ,
"p-disabled" : instance . isOptionDisabled ( _option )
} ] ;
} , "option" ) ,
emptyMessage : "p-autocomplete-empty-message"
2024-10-28 18:29:38 +00:00
} ;
2025-01-02 21:18:54 +00:00
var AutoCompleteStyle = BaseStyle . extend ( {
name : "autocomplete" ,
2025-02-15 09:32:47 +00:00
theme : theme$4 ,
classes : classes$4 ,
inlineStyles : inlineStyles$2
2024-10-28 18:29:38 +00:00
} ) ;
2025-02-15 09:32:47 +00:00
var script$1$4 = {
2025-01-02 21:18:54 +00:00
name : "BaseAutoComplete" ,
2025-02-15 09:32:47 +00:00
"extends" : script$f ,
2024-10-28 18:29:38 +00:00
props : {
2025-01-02 21:18:54 +00:00
suggestions : {
type : Array ,
"default" : null
} ,
optionLabel : null ,
optionDisabled : null ,
optionGroupLabel : null ,
optionGroupChildren : null ,
scrollHeight : {
type : String ,
"default" : "14rem"
} ,
dropdown : {
type : Boolean ,
"default" : false
} ,
dropdownMode : {
type : String ,
"default" : "blank"
} ,
multiple : {
type : Boolean ,
"default" : false
} ,
loading : {
type : Boolean ,
"default" : false
} ,
placeholder : {
type : String ,
"default" : null
} ,
dataKey : {
type : String ,
"default" : null
} ,
minLength : {
type : Number ,
"default" : 1
} ,
delay : {
type : Number ,
"default" : 300
} ,
appendTo : {
type : [ String , Object ] ,
"default" : "body"
} ,
forceSelection : {
type : Boolean ,
"default" : false
} ,
completeOnFocus : {
type : Boolean ,
"default" : false
} ,
inputId : {
2024-10-28 18:29:38 +00:00
type : String ,
"default" : null
} ,
2025-01-02 21:18:54 +00:00
inputStyle : {
type : Object ,
"default" : null
2024-10-28 18:29:38 +00:00
} ,
2025-01-02 21:18:54 +00:00
inputClass : {
type : [ String , Object ] ,
"default" : null
2024-10-28 18:29:38 +00:00
} ,
2025-01-02 21:18:54 +00:00
panelStyle : {
type : Object ,
"default" : null
2024-10-28 18:29:38 +00:00
} ,
2025-01-02 21:18:54 +00:00
panelClass : {
type : [ String , Object ] ,
"default" : null
} ,
overlayStyle : {
2024-10-28 18:29:38 +00:00
type : Object ,
"default" : null
} ,
2025-01-02 21:18:54 +00:00
overlayClass : {
type : [ String , Object ] ,
"default" : null
2024-10-28 18:29:38 +00:00
} ,
2025-01-02 21:18:54 +00:00
dropdownIcon : {
2024-10-28 18:29:38 +00:00
type : String ,
2025-01-02 21:18:54 +00:00
"default" : null
2024-10-28 18:29:38 +00:00
} ,
2025-01-02 21:18:54 +00:00
dropdownClass : {
type : [ String , Object ] ,
"default" : null
2024-10-28 18:29:38 +00:00
} ,
2025-01-02 21:18:54 +00:00
loader : {
2024-10-28 18:29:38 +00:00
type : String ,
2025-01-02 21:18:54 +00:00
"default" : null
2024-10-28 18:29:38 +00:00
} ,
2025-01-02 21:18:54 +00:00
loadingIcon : {
2024-10-28 18:29:38 +00:00
type : String ,
2025-01-02 21:18:54 +00:00
"default" : null
2024-10-28 18:29:38 +00:00
} ,
2025-01-02 21:18:54 +00:00
removeTokenIcon : {
type : String ,
2024-10-28 18:29:38 +00:00
"default" : null
2025-01-02 21:18:54 +00:00
} ,
chipIcon : {
type : String ,
2024-10-28 18:29:38 +00:00
"default" : null
} ,
2025-01-02 21:18:54 +00:00
virtualScrollerOptions : {
2024-10-28 18:29:38 +00:00
type : Object ,
"default" : null
} ,
2025-01-02 21:18:54 +00:00
autoOptionFocus : {
type : Boolean ,
"default" : false
} ,
selectOnFocus : {
type : Boolean ,
"default" : false
} ,
focusOnHover : {
type : Boolean ,
"default" : true
} ,
searchLocale : {
2024-10-28 18:29:38 +00:00
type : String ,
2025-01-02 21:18:54 +00:00
"default" : void 0
2024-10-28 18:29:38 +00:00
} ,
2025-01-02 21:18:54 +00:00
searchMessage : {
2024-10-28 18:29:38 +00:00
type : String ,
"default" : null
} ,
2025-01-02 21:18:54 +00:00
selectionMessage : {
2024-10-28 18:29:38 +00:00
type : String ,
"default" : null
} ,
2025-01-02 21:18:54 +00:00
emptySelectionMessage : {
2024-10-28 18:29:38 +00:00
type : String ,
"default" : null
} ,
2025-01-02 21:18:54 +00:00
emptySearchMessage : {
2024-10-28 18:29:38 +00:00
type : String ,
"default" : null
} ,
2025-01-31 18:07:37 +00:00
showEmptyMessage : {
type : Boolean ,
"default" : true
} ,
2025-01-02 21:18:54 +00:00
tabindex : {
type : Number ,
"default" : 0
} ,
typeahead : {
type : Boolean ,
"default" : true
} ,
ariaLabel : {
type : String ,
"default" : null
} ,
ariaLabelledby : {
type : String ,
"default" : null
}
} ,
style : AutoCompleteStyle ,
2025-01-31 18:07:37 +00:00
provide : /* @__PURE__ */ _ _name ( function provide6 ( ) {
2025-01-02 21:18:54 +00:00
return {
$pcAutoComplete : this ,
$parentInstance : this
} ;
} , "provide" )
} ;
2025-02-15 09:32:47 +00:00
function _typeof$1 ( o ) {
2025-01-02 21:18:54 +00:00
"@babel/helpers - typeof" ;
2025-02-15 09:32:47 +00:00
return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol . iterator ? function ( o2 ) {
2025-01-02 21:18:54 +00:00
return typeof o2 ;
} : function ( o2 ) {
return o2 && "function" == typeof Symbol && o2 . constructor === Symbol && o2 !== Symbol . prototype ? "symbol" : typeof o2 ;
2025-02-15 09:32:47 +00:00
} , _typeof$1 ( o ) ;
2024-10-28 18:29:38 +00:00
}
2025-02-15 09:32:47 +00:00
_ _name ( _typeof$1 , "_typeof$1" ) ;
function _toConsumableArray ( r ) {
return _arrayWithoutHoles ( r ) || _iterableToArray ( r ) || _unsupportedIterableToArray ( r ) || _nonIterableSpread ( ) ;
2024-10-28 18:29:38 +00:00
}
2025-02-15 09:32:47 +00:00
_ _name ( _toConsumableArray , "_toConsumableArray" ) ;
function _nonIterableSpread ( ) {
2024-10-28 18:29:38 +00:00
throw new TypeError ( "Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method." ) ;
}
2025-02-15 09:32:47 +00:00
_ _name ( _nonIterableSpread , "_nonIterableSpread" ) ;
function _unsupportedIterableToArray ( r , a ) {
2024-10-28 18:29:38 +00:00
if ( r ) {
2025-02-15 09:32:47 +00:00
if ( "string" == typeof r ) return _arrayLikeToArray ( r , a ) ;
2024-10-28 18:29:38 +00:00
var t = { } . toString . call ( r ) . slice ( 8 , - 1 ) ;
2025-02-15 09:32:47 +00:00
return "Object" === t && r . constructor && ( t = r . constructor . name ) , "Map" === t || "Set" === t ? Array . from ( r ) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/ . test ( t ) ? _arrayLikeToArray ( r , a ) : void 0 ;
2024-10-28 18:29:38 +00:00
}
}
2025-02-15 09:32:47 +00:00
_ _name ( _unsupportedIterableToArray , "_unsupportedIterableToArray" ) ;
function _iterableToArray ( r ) {
2024-10-28 18:29:38 +00:00
if ( "undefined" != typeof Symbol && null != r [ Symbol . iterator ] || null != r [ "@@iterator" ] ) return Array . from ( r ) ;
}
2025-02-15 09:32:47 +00:00
_ _name ( _iterableToArray , "_iterableToArray" ) ;
function _arrayWithoutHoles ( r ) {
if ( Array . isArray ( r ) ) return _arrayLikeToArray ( r ) ;
2024-10-28 18:29:38 +00:00
}
2025-02-15 09:32:47 +00:00
_ _name ( _arrayWithoutHoles , "_arrayWithoutHoles" ) ;
function _arrayLikeToArray ( r , a ) {
2024-10-28 18:29:38 +00:00
( null == a || a > r . length ) && ( a = r . length ) ;
for ( var e = 0 , n = Array ( a ) ; e < a ; e ++ ) n [ e ] = r [ e ] ;
return n ;
}
2025-02-15 09:32:47 +00:00
_ _name ( _arrayLikeToArray , "_arrayLikeToArray" ) ;
var script$6 = {
2025-01-02 21:18:54 +00:00
name : "AutoComplete" ,
2025-02-15 09:32:47 +00:00
"extends" : script$1$4 ,
2024-10-28 18:29:38 +00:00
inheritAttrs : false ,
2025-01-31 18:07:37 +00:00
emits : [ "change" , "focus" , "blur" , "item-select" , "item-unselect" , "option-select" , "option-unselect" , "dropdown-click" , "clear" , "complete" , "before-show" , "before-hide" , "show" , "hide" ] ,
2025-01-02 21:18:54 +00:00
inject : {
$pcFluid : {
"default" : null
}
} ,
outsideClickListener : null ,
resizeListener : null ,
scrollHandler : null ,
overlay : null ,
virtualScroller : null ,
searchTimeout : null ,
dirty : false ,
data : /* @__PURE__ */ _ _name ( function data4 ( ) {
2024-10-28 18:29:38 +00:00
return {
2025-01-02 21:18:54 +00:00
id : this . $attrs . id ,
clicked : false ,
focused : false ,
focusedOptionIndex : - 1 ,
focusedMultipleOptionIndex : - 1 ,
overlayVisible : false ,
searching : false
2024-10-28 18:29:38 +00:00
} ;
} , "data" ) ,
2025-01-02 21:18:54 +00:00
watch : {
"$attrs.id" : /* @__PURE__ */ _ _name ( function $attrsId ( newValue ) {
this . id = newValue || UniqueComponentId ( ) ;
} , "$attrsId" ) ,
suggestions : /* @__PURE__ */ _ _name ( function suggestions ( ) {
if ( this . searching ) {
this . show ( ) ;
this . focusedOptionIndex = this . overlayVisible && this . autoOptionFocus ? this . findFirstFocusedOptionIndex ( ) : - 1 ;
this . searching = false ;
2025-01-31 18:07:37 +00:00
! this . showEmptyMessage && this . visibleOptions . length === 0 && this . hide ( ) ;
2025-01-02 21:18:54 +00:00
}
this . autoUpdateModel ( ) ;
} , "suggestions" )
} ,
mounted : /* @__PURE__ */ _ _name ( function mounted3 ( ) {
this . id = this . id || UniqueComponentId ( ) ;
this . autoUpdateModel ( ) ;
2024-10-28 18:29:38 +00:00
} , "mounted" ) ,
2025-01-02 21:18:54 +00:00
updated : /* @__PURE__ */ _ _name ( function updated2 ( ) {
if ( this . overlayVisible ) {
this . alignOverlay ( ) ;
}
} , "updated" ) ,
beforeUnmount : /* @__PURE__ */ _ _name ( function beforeUnmount3 ( ) {
this . unbindOutsideClickListener ( ) ;
this . unbindResizeListener ( ) ;
if ( this . scrollHandler ) {
this . scrollHandler . destroy ( ) ;
this . scrollHandler = null ;
}
if ( this . overlay ) {
ZIndex . clear ( this . overlay ) ;
this . overlay = null ;
2024-10-28 18:29:38 +00:00
}
} , "beforeUnmount" ) ,
methods : {
2025-01-02 21:18:54 +00:00
getOptionIndex : /* @__PURE__ */ _ _name ( function getOptionIndex ( index , fn ) {
return this . virtualScrollerDisabled ? index : fn && fn ( index ) [ "index" ] ;
} , "getOptionIndex" ) ,
getOptionLabel : /* @__PURE__ */ _ _name ( function getOptionLabel ( option2 ) {
return this . optionLabel ? resolveFieldData ( option2 , this . optionLabel ) : option2 ;
} , "getOptionLabel" ) ,
getOptionValue : /* @__PURE__ */ _ _name ( function getOptionValue ( option2 ) {
return option2 ;
} , "getOptionValue" ) ,
getOptionRenderKey : /* @__PURE__ */ _ _name ( function getOptionRenderKey ( option2 , index ) {
return ( this . dataKey ? resolveFieldData ( option2 , this . dataKey ) : this . getOptionLabel ( option2 ) ) + "_" + index ;
} , "getOptionRenderKey" ) ,
getPTOptions : /* @__PURE__ */ _ _name ( function getPTOptions3 ( option2 , itemOptions , index , key ) {
return this . ptm ( key , {
context : {
selected : this . isSelected ( option2 ) ,
focused : this . focusedOptionIndex === this . getOptionIndex ( index , itemOptions ) ,
disabled : this . isOptionDisabled ( option2 )
}
2024-10-28 18:29:38 +00:00
} ) ;
2025-01-02 21:18:54 +00:00
} , "getPTOptions" ) ,
isOptionDisabled : /* @__PURE__ */ _ _name ( function isOptionDisabled ( option2 ) {
return this . optionDisabled ? resolveFieldData ( option2 , this . optionDisabled ) : false ;
} , "isOptionDisabled" ) ,
isOptionGroup : /* @__PURE__ */ _ _name ( function isOptionGroup ( option2 ) {
return this . optionGroupLabel && option2 . optionGroup && option2 . group ;
} , "isOptionGroup" ) ,
getOptionGroupLabel : /* @__PURE__ */ _ _name ( function getOptionGroupLabel ( optionGroup ) {
return resolveFieldData ( optionGroup , this . optionGroupLabel ) ;
} , "getOptionGroupLabel" ) ,
getOptionGroupChildren : /* @__PURE__ */ _ _name ( function getOptionGroupChildren ( optionGroup ) {
return resolveFieldData ( optionGroup , this . optionGroupChildren ) ;
} , "getOptionGroupChildren" ) ,
getAriaPosInset : /* @__PURE__ */ _ _name ( function getAriaPosInset ( index ) {
var _this = this ;
return ( this . optionGroupLabel ? index - this . visibleOptions . slice ( 0 , index ) . filter ( function ( option2 ) {
return _this . isOptionGroup ( option2 ) ;
} ) . length : index ) + 1 ;
} , "getAriaPosInset" ) ,
show : /* @__PURE__ */ _ _name ( function show ( isFocus ) {
this . $emit ( "before-show" ) ;
this . dirty = true ;
this . overlayVisible = true ;
this . focusedOptionIndex = this . focusedOptionIndex !== - 1 ? this . focusedOptionIndex : this . autoOptionFocus ? this . findFirstFocusedOptionIndex ( ) : - 1 ;
isFocus && focus ( this . multiple ? this . $refs . focusInput : this . $refs . focusInput . $el ) ;
} , "show" ) ,
hide : /* @__PURE__ */ _ _name ( function hide ( isFocus ) {
var _this2 = this ;
var _hide = /* @__PURE__ */ _ _name ( function _hide2 ( ) {
2025-01-31 18:07:37 +00:00
var _this2$$refs$focusInp ;
2025-01-02 21:18:54 +00:00
_this2 . $emit ( "before-hide" ) ;
_this2 . dirty = isFocus ;
_this2 . overlayVisible = false ;
_this2 . clicked = false ;
_this2 . focusedOptionIndex = - 1 ;
2025-01-31 18:07:37 +00:00
isFocus && focus ( _this2 . multiple ? _this2 . $refs . focusInput : ( _this2$$refs$focusInp = _this2 . $refs . focusInput ) === null || _this2$$refs$focusInp === void 0 ? void 0 : _this2$$refs$focusInp . $el ) ;
2025-01-02 21:18:54 +00:00
} , "_hide" ) ;
setTimeout ( function ( ) {
_hide ( ) ;
} , 0 ) ;
} , "hide" ) ,
onFocus : /* @__PURE__ */ _ _name ( function onFocus2 ( event ) {
if ( this . disabled ) {
return ;
2024-10-28 18:29:38 +00:00
}
2025-01-02 21:18:54 +00:00
if ( ! this . dirty && this . completeOnFocus ) {
this . search ( event , event . target . value , "focus" ) ;
2024-10-28 18:29:38 +00:00
}
2025-01-02 21:18:54 +00:00
this . dirty = true ;
this . focused = true ;
if ( this . overlayVisible ) {
this . focusedOptionIndex = this . focusedOptionIndex !== - 1 ? this . focusedOptionIndex : this . overlayVisible && this . autoOptionFocus ? this . findFirstFocusedOptionIndex ( ) : - 1 ;
this . scrollInView ( this . focusedOptionIndex ) ;
2024-10-28 18:29:38 +00:00
}
2025-01-02 21:18:54 +00:00
this . $emit ( "focus" , event ) ;
} , "onFocus" ) ,
onBlur : /* @__PURE__ */ _ _name ( function onBlur ( event ) {
2025-01-31 18:07:37 +00:00
var _this$formField$onBlu , _this$formField ;
2025-01-02 21:18:54 +00:00
this . dirty = false ;
this . focused = false ;
this . focusedOptionIndex = - 1 ;
this . $emit ( "blur" , event ) ;
2025-01-31 18:07:37 +00:00
( _this$formField$onBlu = ( _this$formField = this . formField ) . onBlur ) === null || _this$formField$onBlu === void 0 || _this$formField$onBlu . call ( _this$formField ) ;
2025-01-02 21:18:54 +00:00
} , "onBlur" ) ,
onKeyDown : /* @__PURE__ */ _ _name ( function onKeyDown ( event ) {
if ( this . disabled ) {
event . preventDefault ( ) ;
return ;
2024-10-28 18:29:38 +00:00
}
2025-01-02 21:18:54 +00:00
switch ( event . code ) {
case "ArrowDown" :
this . onArrowDownKey ( event ) ;
break ;
case "ArrowUp" :
this . onArrowUpKey ( event ) ;
break ;
case "ArrowLeft" :
this . onArrowLeftKey ( event ) ;
break ;
case "ArrowRight" :
this . onArrowRightKey ( event ) ;
break ;
case "Home" :
this . onHomeKey ( event ) ;
break ;
case "End" :
this . onEndKey ( event ) ;
break ;
case "PageDown" :
this . onPageDownKey ( event ) ;
break ;
case "PageUp" :
this . onPageUpKey ( event ) ;
break ;
case "Enter" :
case "NumpadEnter" :
this . onEnterKey ( event ) ;
break ;
case "Escape" :
this . onEscapeKey ( event ) ;
break ;
case "Tab" :
this . onTabKey ( event ) ;
break ;
case "Backspace" :
this . onBackspaceKey ( event ) ;
break ;
2024-10-28 18:29:38 +00:00
}
2025-01-02 21:18:54 +00:00
this . clicked = false ;
} , "onKeyDown" ) ,
onInput : /* @__PURE__ */ _ _name ( function onInput ( event ) {
var _this3 = this ;
if ( this . typeahead ) {
if ( this . searchTimeout ) {
clearTimeout ( this . searchTimeout ) ;
}
var query = event . target . value ;
if ( ! this . multiple ) {
this . updateModel ( event , query ) ;
}
if ( query . length === 0 ) {
this . hide ( ) ;
this . $emit ( "clear" ) ;
} else {
if ( query . length >= this . minLength ) {
this . focusedOptionIndex = - 1 ;
this . searchTimeout = setTimeout ( function ( ) {
_this3 . search ( event , query , "input" ) ;
} , this . delay ) ;
} else {
this . hide ( ) ;
2024-10-28 18:29:38 +00:00
}
}
}
2025-01-02 21:18:54 +00:00
} , "onInput" ) ,
onChange : /* @__PURE__ */ _ _name ( function onChange ( event ) {
var _this4 = this ;
if ( this . forceSelection ) {
var valid = false ;
if ( this . visibleOptions && ! this . multiple ) {
var value = this . multiple ? this . $refs . focusInput . value : this . $refs . focusInput . $el . value ;
var matchedValue = this . visibleOptions . find ( function ( option2 ) {
return _this4 . isOptionMatched ( option2 , value || "" ) ;
} ) ;
if ( matchedValue !== void 0 ) {
valid = true ;
! this . isSelected ( matchedValue ) && this . onOptionSelect ( event , matchedValue ) ;
}
2024-10-28 18:29:38 +00:00
}
2025-01-02 21:18:54 +00:00
if ( ! valid ) {
if ( this . multiple ) this . $refs . focusInput . value = "" ;
else this . $refs . focusInput . $el . value = "" ;
this . $emit ( "clear" ) ;
! this . multiple && this . updateModel ( event , null ) ;
2024-10-28 18:29:38 +00:00
}
}
2025-01-02 21:18:54 +00:00
} , "onChange" ) ,
onMultipleContainerFocus : /* @__PURE__ */ _ _name ( function onMultipleContainerFocus ( ) {
if ( this . disabled ) {
return ;
}
this . focused = true ;
} , "onMultipleContainerFocus" ) ,
onMultipleContainerBlur : /* @__PURE__ */ _ _name ( function onMultipleContainerBlur ( ) {
this . focusedMultipleOptionIndex = - 1 ;
this . focused = false ;
} , "onMultipleContainerBlur" ) ,
onMultipleContainerKeyDown : /* @__PURE__ */ _ _name ( function onMultipleContainerKeyDown ( event ) {
if ( this . disabled ) {
2024-10-28 18:29:38 +00:00
event . preventDefault ( ) ;
return ;
}
2025-01-02 21:18:54 +00:00
switch ( event . code ) {
case "ArrowLeft" :
this . onArrowLeftKeyOnMultiple ( event ) ;
break ;
case "ArrowRight" :
this . onArrowRightKeyOnMultiple ( event ) ;
break ;
case "Backspace" :
this . onBackspaceKeyOnMultiple ( event ) ;
break ;
}
} , "onMultipleContainerKeyDown" ) ,
onContainerClick : /* @__PURE__ */ _ _name ( function onContainerClick ( event ) {
this . clicked = true ;
2025-01-31 18:07:37 +00:00
if ( this . disabled || this . searching || this . loading || this . isDropdownClicked ( event ) ) {
2024-10-28 18:29:38 +00:00
return ;
}
2025-01-02 21:18:54 +00:00
if ( ! this . overlay || ! this . overlay . contains ( event . target ) ) {
focus ( this . multiple ? this . $refs . focusInput : this . $refs . focusInput . $el ) ;
}
} , "onContainerClick" ) ,
onDropdownClick : /* @__PURE__ */ _ _name ( function onDropdownClick ( event ) {
var query = void 0 ;
if ( this . overlayVisible ) {
this . hide ( true ) ;
} else {
var target = this . multiple ? this . $refs . focusInput : this . $refs . focusInput . $el ;
focus ( target ) ;
query = target . value ;
if ( this . dropdownMode === "blank" ) this . search ( event , "" , "dropdown" ) ;
else if ( this . dropdownMode === "current" ) this . search ( event , query , "dropdown" ) ;
}
this . $emit ( "dropdown-click" , {
originalEvent : event ,
query
} ) ;
} , "onDropdownClick" ) ,
onOptionSelect : /* @__PURE__ */ _ _name ( function onOptionSelect ( event , option2 ) {
var isHide = arguments . length > 2 && arguments [ 2 ] !== void 0 ? arguments [ 2 ] : true ;
var value = this . getOptionValue ( option2 ) ;
if ( this . multiple ) {
this . $refs . focusInput . value = "" ;
if ( ! this . isSelected ( option2 ) ) {
2025-02-15 09:32:47 +00:00
this . updateModel ( event , [ ] . concat ( _toConsumableArray ( this . d _value || [ ] ) , [ value ] ) ) ;
2025-01-02 21:18:54 +00:00
}
} else {
this . updateModel ( event , value ) ;
}
this . $emit ( "item-select" , {
originalEvent : event ,
value : option2
} ) ;
this . $emit ( "option-select" , {
originalEvent : event ,
value : option2
} ) ;
isHide && this . hide ( true ) ;
} , "onOptionSelect" ) ,
onOptionMouseMove : /* @__PURE__ */ _ _name ( function onOptionMouseMove ( event , index ) {
if ( this . focusOnHover ) {
this . changeFocusedOptionIndex ( event , index ) ;
}
} , "onOptionMouseMove" ) ,
onOverlayClick : /* @__PURE__ */ _ _name ( function onOverlayClick ( event ) {
OverlayEventBus . emit ( "overlay-click" , {
originalEvent : event ,
target : this . $el
} ) ;
} , "onOverlayClick" ) ,
onOverlayKeyDown : /* @__PURE__ */ _ _name ( function onOverlayKeyDown ( event ) {
switch ( event . code ) {
case "Escape" :
this . onEscapeKey ( event ) ;
2024-12-16 19:38:24 +00:00
break ;
2025-01-02 21:18:54 +00:00
}
} , "onOverlayKeyDown" ) ,
onArrowDownKey : /* @__PURE__ */ _ _name ( function onArrowDownKey ( event ) {
if ( ! this . overlayVisible ) {
return ;
}
var optionIndex = this . focusedOptionIndex !== - 1 ? this . findNextOptionIndex ( this . focusedOptionIndex ) : this . clicked ? this . findFirstOptionIndex ( ) : this . findFirstFocusedOptionIndex ( ) ;
this . changeFocusedOptionIndex ( event , optionIndex ) ;
event . preventDefault ( ) ;
} , "onArrowDownKey" ) ,
onArrowUpKey : /* @__PURE__ */ _ _name ( function onArrowUpKey ( event ) {
if ( ! this . overlayVisible ) {
return ;
}
if ( event . altKey ) {
if ( this . focusedOptionIndex !== - 1 ) {
this . onOptionSelect ( event , this . visibleOptions [ this . focusedOptionIndex ] ) ;
}
this . overlayVisible && this . hide ( ) ;
event . preventDefault ( ) ;
} else {
var optionIndex = this . focusedOptionIndex !== - 1 ? this . findPrevOptionIndex ( this . focusedOptionIndex ) : this . clicked ? this . findLastOptionIndex ( ) : this . findLastFocusedOptionIndex ( ) ;
this . changeFocusedOptionIndex ( event , optionIndex ) ;
event . preventDefault ( ) ;
}
} , "onArrowUpKey" ) ,
onArrowLeftKey : /* @__PURE__ */ _ _name ( function onArrowLeftKey2 ( event ) {
var target = event . currentTarget ;
this . focusedOptionIndex = - 1 ;
if ( this . multiple ) {
2025-01-31 18:07:37 +00:00
if ( isEmpty ( target . value ) && this . $filled ) {
2025-01-02 21:18:54 +00:00
focus ( this . $refs . multiContainer ) ;
2025-01-31 18:07:37 +00:00
this . focusedMultipleOptionIndex = this . d _value . length ;
2025-01-02 21:18:54 +00:00
} else {
event . stopPropagation ( ) ;
}
}
} , "onArrowLeftKey" ) ,
onArrowRightKey : /* @__PURE__ */ _ _name ( function onArrowRightKey2 ( event ) {
this . focusedOptionIndex = - 1 ;
this . multiple && event . stopPropagation ( ) ;
} , "onArrowRightKey" ) ,
onHomeKey : /* @__PURE__ */ _ _name ( function onHomeKey2 ( event ) {
var currentTarget = event . currentTarget ;
var len = currentTarget . value . length ;
currentTarget . setSelectionRange ( 0 , event . shiftKey ? len : 0 ) ;
this . focusedOptionIndex = - 1 ;
event . preventDefault ( ) ;
} , "onHomeKey" ) ,
onEndKey : /* @__PURE__ */ _ _name ( function onEndKey2 ( event ) {
var currentTarget = event . currentTarget ;
var len = currentTarget . value . length ;
currentTarget . setSelectionRange ( event . shiftKey ? 0 : len , len ) ;
this . focusedOptionIndex = - 1 ;
event . preventDefault ( ) ;
} , "onEndKey" ) ,
onPageUpKey : /* @__PURE__ */ _ _name ( function onPageUpKey2 ( event ) {
this . scrollInView ( 0 ) ;
event . preventDefault ( ) ;
} , "onPageUpKey" ) ,
onPageDownKey : /* @__PURE__ */ _ _name ( function onPageDownKey2 ( event ) {
this . scrollInView ( this . visibleOptions . length - 1 ) ;
event . preventDefault ( ) ;
} , "onPageDownKey" ) ,
onEnterKey : /* @__PURE__ */ _ _name ( function onEnterKey2 ( event ) {
if ( ! this . typeahead ) {
if ( this . multiple ) {
2025-02-15 09:32:47 +00:00
this . updateModel ( event , [ ] . concat ( _toConsumableArray ( this . d _value || [ ] ) , [ event . target . value ] ) ) ;
2025-01-02 21:18:54 +00:00
this . $refs . focusInput . value = "" ;
2024-12-16 19:38:24 +00:00
}
2025-01-02 21:18:54 +00:00
} else {
if ( ! this . overlayVisible ) {
this . focusedOptionIndex = - 1 ;
this . onArrowDownKey ( event ) ;
} else {
if ( this . focusedOptionIndex !== - 1 ) {
this . onOptionSelect ( event , this . visibleOptions [ this . focusedOptionIndex ] ) ;
}
this . hide ( ) ;
2024-12-16 19:38:24 +00:00
}
2025-01-02 21:18:54 +00:00
}
2025-01-31 18:07:37 +00:00
event . preventDefault ( ) ;
2025-01-02 21:18:54 +00:00
} , "onEnterKey" ) ,
onEscapeKey : /* @__PURE__ */ _ _name ( function onEscapeKey ( event ) {
this . overlayVisible && this . hide ( true ) ;
event . preventDefault ( ) ;
} , "onEscapeKey" ) ,
onTabKey : /* @__PURE__ */ _ _name ( function onTabKey ( event ) {
if ( this . focusedOptionIndex !== - 1 ) {
this . onOptionSelect ( event , this . visibleOptions [ this . focusedOptionIndex ] ) ;
}
this . overlayVisible && this . hide ( ) ;
} , "onTabKey" ) ,
onBackspaceKey : /* @__PURE__ */ _ _name ( function onBackspaceKey ( event ) {
if ( this . multiple ) {
2025-01-31 18:07:37 +00:00
if ( isNotEmpty ( this . d _value ) && ! this . $refs . focusInput . value ) {
var removedValue = this . d _value [ this . d _value . length - 1 ] ;
var newValue = this . d _value . slice ( 0 , - 1 ) ;
this . writeValue ( newValue , event ) ;
2025-01-02 21:18:54 +00:00
this . $emit ( "item-unselect" , {
originalEvent : event ,
value : removedValue
} ) ;
this . $emit ( "option-unselect" , {
originalEvent : event ,
value : removedValue
} ) ;
2024-10-28 18:29:38 +00:00
}
2025-01-02 21:18:54 +00:00
event . stopPropagation ( ) ;
}
} , "onBackspaceKey" ) ,
onArrowLeftKeyOnMultiple : /* @__PURE__ */ _ _name ( function onArrowLeftKeyOnMultiple ( ) {
this . focusedMultipleOptionIndex = this . focusedMultipleOptionIndex < 1 ? 0 : this . focusedMultipleOptionIndex - 1 ;
} , "onArrowLeftKeyOnMultiple" ) ,
onArrowRightKeyOnMultiple : /* @__PURE__ */ _ _name ( function onArrowRightKeyOnMultiple ( ) {
this . focusedMultipleOptionIndex ++ ;
2025-01-31 18:07:37 +00:00
if ( this . focusedMultipleOptionIndex > this . d _value . length - 1 ) {
2025-01-02 21:18:54 +00:00
this . focusedMultipleOptionIndex = - 1 ;
focus ( this . $refs . focusInput ) ;
}
} , "onArrowRightKeyOnMultiple" ) ,
onBackspaceKeyOnMultiple : /* @__PURE__ */ _ _name ( function onBackspaceKeyOnMultiple ( event ) {
if ( this . focusedMultipleOptionIndex !== - 1 ) {
this . removeOption ( event , this . focusedMultipleOptionIndex ) ;
}
} , "onBackspaceKeyOnMultiple" ) ,
onOverlayEnter : /* @__PURE__ */ _ _name ( function onOverlayEnter ( el ) {
ZIndex . set ( "overlay" , el , this . $primevue . config . zIndex . overlay ) ;
addStyle ( el , {
position : "absolute" ,
top : "0" ,
left : "0"
2024-10-28 18:29:38 +00:00
} ) ;
2025-01-02 21:18:54 +00:00
this . alignOverlay ( ) ;
} , "onOverlayEnter" ) ,
onOverlayAfterEnter : /* @__PURE__ */ _ _name ( function onOverlayAfterEnter ( ) {
this . bindOutsideClickListener ( ) ;
this . bindScrollListener ( ) ;
this . bindResizeListener ( ) ;
this . $emit ( "show" ) ;
} , "onOverlayAfterEnter" ) ,
onOverlayLeave : /* @__PURE__ */ _ _name ( function onOverlayLeave ( ) {
this . unbindOutsideClickListener ( ) ;
this . unbindScrollListener ( ) ;
this . unbindResizeListener ( ) ;
this . $emit ( "hide" ) ;
this . overlay = null ;
} , "onOverlayLeave" ) ,
onOverlayAfterLeave : /* @__PURE__ */ _ _name ( function onOverlayAfterLeave ( el ) {
ZIndex . clear ( el ) ;
} , "onOverlayAfterLeave" ) ,
alignOverlay : /* @__PURE__ */ _ _name ( function alignOverlay ( ) {
var target = this . multiple ? this . $refs . multiContainer : this . $refs . focusInput . $el ;
if ( this . appendTo === "self" ) {
relativePosition ( this . overlay , target ) ;
} else {
this . overlay . style . minWidth = getOuterWidth ( target ) + "px" ;
absolutePosition ( this . overlay , target ) ;
}
} , "alignOverlay" ) ,
bindOutsideClickListener : /* @__PURE__ */ _ _name ( function bindOutsideClickListener ( ) {
var _this5 = this ;
if ( ! this . outsideClickListener ) {
this . outsideClickListener = function ( event ) {
if ( _this5 . overlayVisible && _this5 . overlay && _this5 . isOutsideClicked ( event ) ) {
_this5 . hide ( ) ;
}
} ;
document . addEventListener ( "click" , this . outsideClickListener ) ;
}
} , "bindOutsideClickListener" ) ,
unbindOutsideClickListener : /* @__PURE__ */ _ _name ( function unbindOutsideClickListener ( ) {
if ( this . outsideClickListener ) {
document . removeEventListener ( "click" , this . outsideClickListener ) ;
this . outsideClickListener = null ;
}
} , "unbindOutsideClickListener" ) ,
bindScrollListener : /* @__PURE__ */ _ _name ( function bindScrollListener ( ) {
var _this6 = this ;
if ( ! this . scrollHandler ) {
this . scrollHandler = new ConnectedOverlayScrollHandler ( this . $refs . container , function ( ) {
if ( _this6 . overlayVisible ) {
_this6 . hide ( ) ;
}
} ) ;
}
this . scrollHandler . bindScrollListener ( ) ;
} , "bindScrollListener" ) ,
unbindScrollListener : /* @__PURE__ */ _ _name ( function unbindScrollListener ( ) {
if ( this . scrollHandler ) {
this . scrollHandler . unbindScrollListener ( ) ;
}
} , "unbindScrollListener" ) ,
bindResizeListener : /* @__PURE__ */ _ _name ( function bindResizeListener ( ) {
var _this7 = this ;
if ( ! this . resizeListener ) {
this . resizeListener = function ( ) {
if ( _this7 . overlayVisible && ! isTouchDevice ( ) ) {
_this7 . hide ( ) ;
}
} ;
window . addEventListener ( "resize" , this . resizeListener ) ;
}
} , "bindResizeListener" ) ,
unbindResizeListener : /* @__PURE__ */ _ _name ( function unbindResizeListener ( ) {
if ( this . resizeListener ) {
window . removeEventListener ( "resize" , this . resizeListener ) ;
this . resizeListener = null ;
}
} , "unbindResizeListener" ) ,
isOutsideClicked : /* @__PURE__ */ _ _name ( function isOutsideClicked ( event ) {
return ! this . overlay . contains ( event . target ) && ! this . isInputClicked ( event ) && ! this . isDropdownClicked ( event ) ;
} , "isOutsideClicked" ) ,
isInputClicked : /* @__PURE__ */ _ _name ( function isInputClicked ( event ) {
if ( this . multiple ) return event . target === this . $refs . multiContainer || this . $refs . multiContainer . contains ( event . target ) ;
else return event . target === this . $refs . focusInput . $el ;
} , "isInputClicked" ) ,
isDropdownClicked : /* @__PURE__ */ _ _name ( function isDropdownClicked ( event ) {
return this . $refs . dropdownButton ? event . target === this . $refs . dropdownButton || this . $refs . dropdownButton . contains ( event . target ) : false ;
} , "isDropdownClicked" ) ,
isOptionMatched : /* @__PURE__ */ _ _name ( function isOptionMatched ( option2 , value ) {
var _this$getOptionLabel ;
return this . isValidOption ( option2 ) && ( ( _this$getOptionLabel = this . getOptionLabel ( option2 ) ) === null || _this$getOptionLabel === void 0 ? void 0 : _this$getOptionLabel . toLocaleLowerCase ( this . searchLocale ) ) === value . toLocaleLowerCase ( this . searchLocale ) ;
} , "isOptionMatched" ) ,
isValidOption : /* @__PURE__ */ _ _name ( function isValidOption ( option2 ) {
return isNotEmpty ( option2 ) && ! ( this . isOptionDisabled ( option2 ) || this . isOptionGroup ( option2 ) ) ;
} , "isValidOption" ) ,
isValidSelectedOption : /* @__PURE__ */ _ _name ( function isValidSelectedOption ( option2 ) {
return this . isValidOption ( option2 ) && this . isSelected ( option2 ) ;
} , "isValidSelectedOption" ) ,
isEquals : /* @__PURE__ */ _ _name ( function isEquals ( value1 , value2 ) {
return equals ( value1 , value2 , this . equalityKey ) ;
} , "isEquals" ) ,
isSelected : /* @__PURE__ */ _ _name ( function isSelected ( option2 ) {
var _this8 = this ;
var optionValue = this . getOptionValue ( option2 ) ;
2025-01-31 18:07:37 +00:00
return this . multiple ? ( this . d _value || [ ] ) . some ( function ( value ) {
2025-01-02 21:18:54 +00:00
return _this8 . isEquals ( value , optionValue ) ;
2025-01-31 18:07:37 +00:00
} ) : this . isEquals ( this . d _value , this . getOptionValue ( option2 ) ) ;
2025-01-02 21:18:54 +00:00
} , "isSelected" ) ,
findFirstOptionIndex : /* @__PURE__ */ _ _name ( function findFirstOptionIndex ( ) {
var _this9 = this ;
return this . visibleOptions . findIndex ( function ( option2 ) {
return _this9 . isValidOption ( option2 ) ;
2024-10-28 18:29:38 +00:00
} ) ;
2025-01-02 21:18:54 +00:00
} , "findFirstOptionIndex" ) ,
findLastOptionIndex : /* @__PURE__ */ _ _name ( function findLastOptionIndex ( ) {
var _this10 = this ;
return findLastIndex ( this . visibleOptions , function ( option2 ) {
return _this10 . isValidOption ( option2 ) ;
} ) ;
} , "findLastOptionIndex" ) ,
findNextOptionIndex : /* @__PURE__ */ _ _name ( function findNextOptionIndex ( index ) {
var _this11 = this ;
var matchedOptionIndex = index < this . visibleOptions . length - 1 ? this . visibleOptions . slice ( index + 1 ) . findIndex ( function ( option2 ) {
return _this11 . isValidOption ( option2 ) ;
} ) : - 1 ;
return matchedOptionIndex > - 1 ? matchedOptionIndex + index + 1 : index ;
} , "findNextOptionIndex" ) ,
findPrevOptionIndex : /* @__PURE__ */ _ _name ( function findPrevOptionIndex ( index ) {
var _this12 = this ;
var matchedOptionIndex = index > 0 ? findLastIndex ( this . visibleOptions . slice ( 0 , index ) , function ( option2 ) {
return _this12 . isValidOption ( option2 ) ;
} ) : - 1 ;
return matchedOptionIndex > - 1 ? matchedOptionIndex : index ;
} , "findPrevOptionIndex" ) ,
findSelectedOptionIndex : /* @__PURE__ */ _ _name ( function findSelectedOptionIndex ( ) {
var _this13 = this ;
2025-01-31 18:07:37 +00:00
return this . $filled ? this . visibleOptions . findIndex ( function ( option2 ) {
2025-01-02 21:18:54 +00:00
return _this13 . isValidSelectedOption ( option2 ) ;
} ) : - 1 ;
} , "findSelectedOptionIndex" ) ,
findFirstFocusedOptionIndex : /* @__PURE__ */ _ _name ( function findFirstFocusedOptionIndex ( ) {
var selectedIndex = this . findSelectedOptionIndex ( ) ;
return selectedIndex < 0 ? this . findFirstOptionIndex ( ) : selectedIndex ;
} , "findFirstFocusedOptionIndex" ) ,
findLastFocusedOptionIndex : /* @__PURE__ */ _ _name ( function findLastFocusedOptionIndex ( ) {
var selectedIndex = this . findSelectedOptionIndex ( ) ;
return selectedIndex < 0 ? this . findLastOptionIndex ( ) : selectedIndex ;
} , "findLastFocusedOptionIndex" ) ,
search : /* @__PURE__ */ _ _name ( function search ( event , query , source ) {
if ( query === void 0 || query === null ) {
return ;
}
if ( source === "input" && query . trim ( ) . length === 0 ) {
return ;
}
this . searching = true ;
this . $emit ( "complete" , {
2024-10-28 18:29:38 +00:00
originalEvent : event ,
2025-01-02 21:18:54 +00:00
query
2024-10-28 18:29:38 +00:00
} ) ;
2025-01-02 21:18:54 +00:00
} , "search" ) ,
removeOption : /* @__PURE__ */ _ _name ( function removeOption ( event , index ) {
var _this14 = this ;
2025-01-31 18:07:37 +00:00
var removedOption = this . d _value [ index ] ;
var value = this . d _value . filter ( function ( _ , i ) {
2025-01-02 21:18:54 +00:00
return i !== index ;
} ) . map ( function ( option2 ) {
return _this14 . getOptionValue ( option2 ) ;
} ) ;
this . updateModel ( event , value ) ;
this . $emit ( "item-unselect" , {
2024-10-28 18:29:38 +00:00
originalEvent : event ,
2025-01-02 21:18:54 +00:00
value : removedOption
2024-10-28 18:29:38 +00:00
} ) ;
2025-01-02 21:18:54 +00:00
this . $emit ( "option-unselect" , {
2024-10-28 18:29:38 +00:00
originalEvent : event ,
2025-01-02 21:18:54 +00:00
value : removedOption
} ) ;
this . dirty = true ;
focus ( this . multiple ? this . $refs . focusInput : this . $refs . focusInput . $el ) ;
} , "removeOption" ) ,
changeFocusedOptionIndex : /* @__PURE__ */ _ _name ( function changeFocusedOptionIndex ( event , index ) {
if ( this . focusedOptionIndex !== index ) {
this . focusedOptionIndex = index ;
this . scrollInView ( ) ;
if ( this . selectOnFocus ) {
this . onOptionSelect ( event , this . visibleOptions [ index ] , false ) ;
}
}
} , "changeFocusedOptionIndex" ) ,
scrollInView : /* @__PURE__ */ _ _name ( function scrollInView2 ( ) {
var _this15 = this ;
var index = arguments . length > 0 && arguments [ 0 ] !== void 0 ? arguments [ 0 ] : - 1 ;
this . $nextTick ( function ( ) {
var id2 = index !== - 1 ? "" . concat ( _this15 . id , "_" ) . concat ( index ) : _this15 . focusedOptionId ;
var element = findSingle ( _this15 . list , 'li[id="' . concat ( id2 , '"]' ) ) ;
if ( element ) {
element . scrollIntoView && element . scrollIntoView ( {
block : "nearest" ,
inline : "start"
} ) ;
} else if ( ! _this15 . virtualScrollerDisabled ) {
_this15 . virtualScroller && _this15 . virtualScroller . scrollToIndex ( index !== - 1 ? index : _this15 . focusedOptionIndex ) ;
}
2024-10-28 18:29:38 +00:00
} ) ;
2025-01-02 21:18:54 +00:00
} , "scrollInView" ) ,
autoUpdateModel : /* @__PURE__ */ _ _name ( function autoUpdateModel ( ) {
2025-01-31 18:07:37 +00:00
if ( this . selectOnFocus && this . autoOptionFocus && ! this . $filled ) {
2025-01-02 21:18:54 +00:00
this . focusedOptionIndex = this . findFirstFocusedOptionIndex ( ) ;
this . onOptionSelect ( null , this . visibleOptions [ this . focusedOptionIndex ] , false ) ;
}
} , "autoUpdateModel" ) ,
updateModel : /* @__PURE__ */ _ _name ( function updateModel ( event , value ) {
2025-01-31 18:07:37 +00:00
this . writeValue ( value , event ) ;
2025-01-02 21:18:54 +00:00
this . $emit ( "change" , {
2024-10-28 18:29:38 +00:00
originalEvent : event ,
2025-01-02 21:18:54 +00:00
value
2024-10-28 18:29:38 +00:00
} ) ;
2025-01-02 21:18:54 +00:00
} , "updateModel" ) ,
flatOptions : /* @__PURE__ */ _ _name ( function flatOptions ( options ) {
var _this16 = this ;
return ( options || [ ] ) . reduce ( function ( result , option2 , index ) {
result . push ( {
optionGroup : option2 ,
group : true ,
index
} ) ;
var optionGroupChildren = _this16 . getOptionGroupChildren ( option2 ) ;
optionGroupChildren && optionGroupChildren . forEach ( function ( o ) {
return result . push ( o ) ;
} ) ;
return result ;
} , [ ] ) ;
} , "flatOptions" ) ,
overlayRef : /* @__PURE__ */ _ _name ( function overlayRef ( el ) {
this . overlay = el ;
} , "overlayRef" ) ,
listRef : /* @__PURE__ */ _ _name ( function listRef ( el , contentRef ) {
this . list = el ;
contentRef && contentRef ( el ) ;
} , "listRef" ) ,
virtualScrollerRef : /* @__PURE__ */ _ _name ( function virtualScrollerRef ( el ) {
this . virtualScroller = el ;
} , "virtualScrollerRef" )
2024-10-28 18:29:38 +00:00
} ,
computed : {
2025-01-02 21:18:54 +00:00
visibleOptions : /* @__PURE__ */ _ _name ( function visibleOptions ( ) {
return this . optionGroupLabel ? this . flatOptions ( this . suggestions ) : this . suggestions || [ ] ;
} , "visibleOptions" ) ,
inputValue : /* @__PURE__ */ _ _name ( function inputValue ( ) {
2025-01-31 18:07:37 +00:00
if ( this . $filled ) {
2025-02-15 09:32:47 +00:00
if ( _typeof$1 ( this . d _value ) === "object" ) {
2025-01-31 18:07:37 +00:00
var label = this . getOptionLabel ( this . d _value ) ;
return label != null ? label : this . d _value ;
2025-01-02 21:18:54 +00:00
} else {
2025-01-31 18:07:37 +00:00
return this . d _value ;
2025-01-02 21:18:54 +00:00
}
} else {
return "" ;
}
} , "inputValue" ) ,
2025-01-31 18:07:37 +00:00
// @deprecated use $filled instead.
2025-01-02 21:18:54 +00:00
hasSelectedOption : /* @__PURE__ */ _ _name ( function hasSelectedOption ( ) {
2025-01-31 18:07:37 +00:00
return this . $filled ;
2025-01-02 21:18:54 +00:00
} , "hasSelectedOption" ) ,
equalityKey : /* @__PURE__ */ _ _name ( function equalityKey ( ) {
return this . dataKey ;
} , "equalityKey" ) ,
searchResultMessageText : /* @__PURE__ */ _ _name ( function searchResultMessageText ( ) {
return isNotEmpty ( this . visibleOptions ) && this . overlayVisible ? this . searchMessageText . replaceAll ( "{0}" , this . visibleOptions . length ) : this . emptySearchMessageText ;
} , "searchResultMessageText" ) ,
searchMessageText : /* @__PURE__ */ _ _name ( function searchMessageText ( ) {
return this . searchMessage || this . $primevue . config . locale . searchMessage || "" ;
} , "searchMessageText" ) ,
emptySearchMessageText : /* @__PURE__ */ _ _name ( function emptySearchMessageText ( ) {
return this . emptySearchMessage || this . $primevue . config . locale . emptySearchMessage || "" ;
} , "emptySearchMessageText" ) ,
selectionMessageText : /* @__PURE__ */ _ _name ( function selectionMessageText ( ) {
return this . selectionMessage || this . $primevue . config . locale . selectionMessage || "" ;
} , "selectionMessageText" ) ,
emptySelectionMessageText : /* @__PURE__ */ _ _name ( function emptySelectionMessageText ( ) {
return this . emptySelectionMessage || this . $primevue . config . locale . emptySelectionMessage || "" ;
} , "emptySelectionMessageText" ) ,
selectedMessageText : /* @__PURE__ */ _ _name ( function selectedMessageText ( ) {
2025-01-31 18:07:37 +00:00
return this . $filled ? this . selectionMessageText . replaceAll ( "{0}" , this . multiple ? this . d _value . length : "1" ) : this . emptySelectionMessageText ;
2025-01-02 21:18:54 +00:00
} , "selectedMessageText" ) ,
listAriaLabel : /* @__PURE__ */ _ _name ( function listAriaLabel ( ) {
return this . $primevue . config . locale . aria ? this . $primevue . config . locale . aria . listLabel : void 0 ;
} , "listAriaLabel" ) ,
focusedOptionId : /* @__PURE__ */ _ _name ( function focusedOptionId ( ) {
return this . focusedOptionIndex !== - 1 ? "" . concat ( this . id , "_" ) . concat ( this . focusedOptionIndex ) : null ;
} , "focusedOptionId" ) ,
focusedMultipleOptionId : /* @__PURE__ */ _ _name ( function focusedMultipleOptionId ( ) {
return this . focusedMultipleOptionIndex !== - 1 ? "" . concat ( this . id , "_multiple_option_" ) . concat ( this . focusedMultipleOptionIndex ) : null ;
} , "focusedMultipleOptionId" ) ,
ariaSetSize : /* @__PURE__ */ _ _name ( function ariaSetSize ( ) {
var _this17 = this ;
return this . visibleOptions . filter ( function ( option2 ) {
return ! _this17 . isOptionGroup ( option2 ) ;
2024-10-28 18:29:38 +00:00
} ) . length ;
2025-01-02 21:18:54 +00:00
} , "ariaSetSize" ) ,
virtualScrollerDisabled : /* @__PURE__ */ _ _name ( function virtualScrollerDisabled ( ) {
return ! this . virtualScrollerOptions ;
} , "virtualScrollerDisabled" ) ,
panelId : /* @__PURE__ */ _ _name ( function panelId ( ) {
return this . id + "_panel" ;
2025-01-31 18:07:37 +00:00
} , "panelId" )
2024-10-28 18:29:38 +00:00
} ,
components : {
2025-02-15 09:32:47 +00:00
InputText : script$g ,
VirtualScroller : script$h ,
Portal : script$i ,
ChevronDownIcon : script$j ,
SpinnerIcon : script$k ,
Chip : script$l
2024-10-28 18:29:38 +00:00
} ,
directives : {
ripple : Ripple
}
} ;
2025-02-15 09:32:47 +00:00
function _typeof$2 ( o ) {
2025-01-02 21:18:54 +00:00
"@babel/helpers - typeof" ;
2025-02-15 09:32:47 +00:00
return _typeof$2 = "function" == typeof Symbol && "symbol" == typeof Symbol . iterator ? function ( o2 ) {
2025-01-02 21:18:54 +00:00
return typeof o2 ;
} : function ( o2 ) {
return o2 && "function" == typeof Symbol && o2 . constructor === Symbol && o2 !== Symbol . prototype ? "symbol" : typeof o2 ;
2025-02-15 09:32:47 +00:00
} , _typeof$2 ( o ) ;
2025-01-02 21:18:54 +00:00
}
2025-02-15 09:32:47 +00:00
_ _name ( _typeof$2 , "_typeof$2" ) ;
function ownKeys$1 ( e , r ) {
2025-01-02 21:18:54 +00:00
var t = Object . keys ( e ) ;
if ( Object . getOwnPropertySymbols ) {
var o = Object . getOwnPropertySymbols ( e ) ;
r && ( o = o . filter ( function ( r2 ) {
return Object . getOwnPropertyDescriptor ( e , r2 ) . enumerable ;
} ) ) , t . push . apply ( t , o ) ;
}
return t ;
}
2025-02-15 09:32:47 +00:00
_ _name ( ownKeys$1 , "ownKeys$1" ) ;
function _objectSpread$1 ( e ) {
2025-01-02 21:18:54 +00:00
for ( var r = 1 ; r < arguments . length ; r ++ ) {
var t = null != arguments [ r ] ? arguments [ r ] : { } ;
2025-02-15 09:32:47 +00:00
r % 2 ? ownKeys$1 ( Object ( t ) , true ) . forEach ( function ( r2 ) {
_defineProperty$1 ( e , r2 , t [ r2 ] ) ;
} ) : Object . getOwnPropertyDescriptors ? Object . defineProperties ( e , Object . getOwnPropertyDescriptors ( t ) ) : ownKeys$1 ( Object ( t ) ) . forEach ( function ( r2 ) {
2025-01-02 21:18:54 +00:00
Object . defineProperty ( e , r2 , Object . getOwnPropertyDescriptor ( t , r2 ) ) ;
} ) ;
}
return e ;
}
2025-02-15 09:32:47 +00:00
_ _name ( _objectSpread$1 , "_objectSpread$1" ) ;
function _defineProperty$1 ( e , r , t ) {
return ( r = _toPropertyKey$1 ( r ) ) in e ? Object . defineProperty ( e , r , { value : t , enumerable : true , configurable : true , writable : true } ) : e [ r ] = t , e ;
2025-01-02 21:18:54 +00:00
}
2025-02-15 09:32:47 +00:00
_ _name ( _defineProperty$1 , "_defineProperty$1" ) ;
function _toPropertyKey$1 ( t ) {
var i = _toPrimitive$1 ( t , "string" ) ;
return "symbol" == _typeof$2 ( i ) ? i : i + "" ;
2025-01-02 21:18:54 +00:00
}
2025-02-15 09:32:47 +00:00
_ _name ( _toPropertyKey$1 , "_toPropertyKey$1" ) ;
function _toPrimitive$1 ( t , r ) {
if ( "object" != _typeof$2 ( t ) || ! t ) return t ;
2025-01-02 21:18:54 +00:00
var e = t [ Symbol . toPrimitive ] ;
if ( void 0 !== e ) {
var i = e . call ( t , r || "default" ) ;
2025-02-15 09:32:47 +00:00
if ( "object" != _typeof$2 ( i ) ) return i ;
2025-01-02 21:18:54 +00:00
throw new TypeError ( "@@toPrimitive must return a primitive value." ) ;
}
return ( "string" === r ? String : Number ) ( t ) ;
}
2025-02-15 09:32:47 +00:00
_ _name ( _toPrimitive$1 , "_toPrimitive$1" ) ;
var _hoisted _1$4 = [ "aria-activedescendant" ] ;
2025-01-31 18:07:37 +00:00
var _hoisted _2$2 = [ "id" , "aria-label" , "aria-setsize" , "aria-posinset" ] ;
var _hoisted _3$2 = [ "id" , "placeholder" , "tabindex" , "disabled" , "aria-label" , "aria-labelledby" , "aria-expanded" , "aria-controls" , "aria-activedescendant" , "aria-invalid" ] ;
var _hoisted _4$2 = [ "disabled" , "aria-expanded" , "aria-controls" ] ;
var _hoisted _5$2 = [ "id" ] ;
var _hoisted _6$1 = [ "id" , "aria-label" ] ;
var _hoisted _7 = [ "id" ] ;
var _hoisted _8 = [ "id" , "aria-label" , "aria-selected" , "aria-disabled" , "aria-setsize" , "aria-posinset" , "onClick" , "onMousemove" , "data-p-selected" , "data-p-focus" , "data-p-disabled" ] ;
2025-02-15 09:32:47 +00:00
function render$5 ( _ctx , _cache , $props , $setup , $data , $options ) {
2025-01-02 21:18:54 +00:00
var _component _InputText = resolveComponent ( "InputText" ) ;
var _component _Chip = resolveComponent ( "Chip" ) ;
var _component _SpinnerIcon = resolveComponent ( "SpinnerIcon" ) ;
var _component _VirtualScroller = resolveComponent ( "VirtualScroller" ) ;
var _component _Portal = resolveComponent ( "Portal" ) ;
var _directive _ripple = resolveDirective ( "ripple" ) ;
return openBlock ( ) , createElementBlock ( "div" , mergeProps ( {
ref : "container" ,
"class" : _ctx . cx ( "root" ) ,
style : _ctx . sx ( "root" ) ,
onClick : _cache [ 11 ] || ( _cache [ 11 ] = function ( ) {
return $options . onContainerClick && $options . onContainerClick . apply ( $options , arguments ) ;
} )
} , _ctx . ptmi ( "root" ) ) , [ ! _ctx . multiple ? ( openBlock ( ) , createBlock ( _component _InputText , {
key : 0 ,
ref : "focusInput" ,
id : _ctx . inputId ,
type : "text" ,
2025-01-31 18:07:37 +00:00
name : _ctx . $formName ,
"class" : normalizeClass ( [ _ctx . cx ( "pcInputText" ) , _ctx . inputClass ] ) ,
2025-01-02 21:18:54 +00:00
style : normalizeStyle ( _ctx . inputStyle ) ,
value : $options . inputValue ,
placeholder : _ctx . placeholder ,
tabindex : ! _ctx . disabled ? _ctx . tabindex : - 1 ,
2025-01-31 18:07:37 +00:00
fluid : _ctx . $fluid ,
2025-01-02 21:18:54 +00:00
disabled : _ctx . disabled ,
2025-01-31 18:07:37 +00:00
size : _ctx . size ,
2025-01-02 21:18:54 +00:00
invalid : _ctx . invalid ,
variant : _ctx . variant ,
autocomplete : "off" ,
role : "combobox" ,
"aria-label" : _ctx . ariaLabel ,
"aria-labelledby" : _ctx . ariaLabelledby ,
"aria-haspopup" : "listbox" ,
"aria-autocomplete" : "list" ,
"aria-expanded" : $data . overlayVisible ,
"aria-controls" : $options . panelId ,
"aria-activedescendant" : $data . focused ? $options . focusedOptionId : void 0 ,
onFocus : $options . onFocus ,
onBlur : $options . onBlur ,
onKeydown : $options . onKeyDown ,
onInput : $options . onInput ,
onChange : $options . onChange ,
unstyled : _ctx . unstyled ,
2025-01-31 18:07:37 +00:00
pt : _ctx . ptm ( "pcInputText" )
} , null , 8 , [ "id" , "name" , "class" , "style" , "value" , "placeholder" , "tabindex" , "fluid" , "disabled" , "size" , "invalid" , "variant" , "aria-label" , "aria-labelledby" , "aria-expanded" , "aria-controls" , "aria-activedescendant" , "onFocus" , "onBlur" , "onKeydown" , "onInput" , "onChange" , "unstyled" , "pt" ] ) ) : createCommentVNode ( "" , true ) , _ctx . multiple ? ( openBlock ( ) , createElementBlock ( "ul" , mergeProps ( {
2025-01-02 21:18:54 +00:00
key : 1 ,
ref : "multiContainer" ,
"class" : _ctx . cx ( "inputMultiple" ) ,
tabindex : "-1" ,
role : "listbox" ,
"aria-orientation" : "horizontal" ,
"aria-activedescendant" : $data . focused ? $options . focusedMultipleOptionId : void 0 ,
onFocus : _cache [ 5 ] || ( _cache [ 5 ] = function ( ) {
return $options . onMultipleContainerFocus && $options . onMultipleContainerFocus . apply ( $options , arguments ) ;
} ) ,
onBlur : _cache [ 6 ] || ( _cache [ 6 ] = function ( ) {
return $options . onMultipleContainerBlur && $options . onMultipleContainerBlur . apply ( $options , arguments ) ;
} ) ,
onKeydown : _cache [ 7 ] || ( _cache [ 7 ] = function ( ) {
return $options . onMultipleContainerKeyDown && $options . onMultipleContainerKeyDown . apply ( $options , arguments ) ;
} )
2025-01-31 18:07:37 +00:00
} , _ctx . ptm ( "inputMultiple" ) ) , [ ( openBlock ( true ) , createElementBlock ( Fragment , null , renderList ( _ctx . d _value , function ( option2 , i ) {
2025-01-02 21:18:54 +00:00
return openBlock ( ) , createElementBlock ( "li" , mergeProps ( {
key : "" . concat ( i , "_" ) . concat ( $options . getOptionLabel ( option2 ) ) ,
id : $data . id + "_multiple_option_" + i ,
"class" : _ctx . cx ( "chipItem" , {
i
} ) ,
role : "option" ,
"aria-label" : $options . getOptionLabel ( option2 ) ,
"aria-selected" : true ,
2025-01-31 18:07:37 +00:00
"aria-setsize" : _ctx . d _value . length ,
2025-01-02 21:18:54 +00:00
"aria-posinset" : i + 1 ,
2024-10-28 18:29:38 +00:00
ref _for : true
2025-01-02 21:18:54 +00:00
} , _ctx . ptm ( "chipItem" ) ) , [ renderSlot ( _ctx . $slots , "chip" , mergeProps ( {
"class" : _ctx . cx ( "pcChip" ) ,
value : option2 ,
index : i ,
removeCallback : /* @__PURE__ */ _ _name ( function removeCallback ( event ) {
return $options . removeOption ( event , i ) ;
} , "removeCallback" ) ,
2024-10-28 18:29:38 +00:00
ref _for : true
2025-01-02 21:18:54 +00:00
} , _ctx . ptm ( "pcChip" ) ) , function ( ) {
return [ createVNode ( _component _Chip , {
"class" : normalizeClass ( _ctx . cx ( "pcChip" ) ) ,
label : $options . getOptionLabel ( option2 ) ,
removeIcon : _ctx . chipIcon || _ctx . removeTokenIcon ,
removable : "" ,
unstyled : _ctx . unstyled ,
2025-02-15 09:32:47 +00:00
onRemove : /* @__PURE__ */ _ _name ( function onRemove ( $event ) {
2025-01-02 21:18:54 +00:00
return $options . removeOption ( $event , i ) ;
} , "onRemove" ) ,
pt : _ctx . ptm ( "pcChip" )
} , {
removeicon : withCtx ( function ( ) {
return [ renderSlot ( _ctx . $slots , _ctx . $slots . chipicon ? "chipicon" : "removetokenicon" , {
"class" : normalizeClass ( _ctx . cx ( "chipIcon" ) ) ,
index : i ,
removeCallback : /* @__PURE__ */ _ _name ( function removeCallback ( event ) {
return $options . removeOption ( event , i ) ;
} , "removeCallback" )
} ) ] ;
} ) ,
_ : 2
} , 1032 , [ "class" , "label" , "removeIcon" , "unstyled" , "onRemove" , "pt" ] ) ] ;
2025-01-31 18:07:37 +00:00
} ) ] , 16 , _hoisted _2$2 ) ;
2025-01-02 21:18:54 +00:00
} ) , 128 ) ) , createBaseVNode ( "li" , mergeProps ( {
"class" : _ctx . cx ( "inputChip" ) ,
role : "option"
} , _ctx . ptm ( "inputChip" ) ) , [ createBaseVNode ( "input" , mergeProps ( {
ref : "focusInput" ,
id : _ctx . inputId ,
type : "text" ,
style : _ctx . inputStyle ,
"class" : _ctx . inputClass ,
placeholder : _ctx . placeholder ,
tabindex : ! _ctx . disabled ? _ctx . tabindex : - 1 ,
disabled : _ctx . disabled ,
autocomplete : "off" ,
role : "combobox" ,
"aria-label" : _ctx . ariaLabel ,
"aria-labelledby" : _ctx . ariaLabelledby ,
"aria-haspopup" : "listbox" ,
"aria-autocomplete" : "list" ,
"aria-expanded" : $data . overlayVisible ,
"aria-controls" : $data . id + "_list" ,
"aria-activedescendant" : $data . focused ? $options . focusedOptionId : void 0 ,
"aria-invalid" : _ctx . invalid || void 0 ,
onFocus : _cache [ 0 ] || ( _cache [ 0 ] = function ( ) {
return $options . onFocus && $options . onFocus . apply ( $options , arguments ) ;
} ) ,
onBlur : _cache [ 1 ] || ( _cache [ 1 ] = function ( ) {
return $options . onBlur && $options . onBlur . apply ( $options , arguments ) ;
} ) ,
onKeydown : _cache [ 2 ] || ( _cache [ 2 ] = function ( ) {
return $options . onKeyDown && $options . onKeyDown . apply ( $options , arguments ) ;
} ) ,
onInput : _cache [ 3 ] || ( _cache [ 3 ] = function ( ) {
return $options . onInput && $options . onInput . apply ( $options , arguments ) ;
} ) ,
onChange : _cache [ 4 ] || ( _cache [ 4 ] = function ( ) {
return $options . onChange && $options . onChange . apply ( $options , arguments ) ;
} )
2025-02-15 09:32:47 +00:00
} , _ctx . ptm ( "input" ) ) , null , 16 , _hoisted _3$2 ) ] , 16 ) ] , 16 , _hoisted _1$4 ) ) : createCommentVNode ( "" , true ) , $data . searching || _ctx . loading ? renderSlot ( _ctx . $slots , _ctx . $slots . loader ? "loader" : "loadingicon" , {
2025-01-02 21:18:54 +00:00
key : 2 ,
"class" : normalizeClass ( _ctx . cx ( "loader" ) )
} , function ( ) {
return [ _ctx . loader || _ctx . loadingIcon ? ( openBlock ( ) , createElementBlock ( "i" , mergeProps ( {
2024-10-28 18:29:38 +00:00
key : 0 ,
2025-01-02 21:18:54 +00:00
"class" : [ "pi-spin" , _ctx . cx ( "loader" ) , _ctx . loader , _ctx . loadingIcon ] ,
"aria-hidden" : "true"
} , _ctx . ptm ( "loader" ) ) , null , 16 ) ) : ( openBlock ( ) , createBlock ( _component _SpinnerIcon , mergeProps ( {
2024-10-28 18:29:38 +00:00
key : 1 ,
2025-01-02 21:18:54 +00:00
"class" : _ctx . cx ( "loader" ) ,
spin : "" ,
"aria-hidden" : "true"
} , _ctx . ptm ( "loader" ) ) , null , 16 , [ "class" ] ) ) ] ;
} ) : createCommentVNode ( "" , true ) , renderSlot ( _ctx . $slots , _ctx . $slots . dropdown ? "dropdown" : "dropdownbutton" , {
toggleCallback : /* @__PURE__ */ _ _name ( function toggleCallback ( event ) {
return $options . onDropdownClick ( event ) ;
} , "toggleCallback" )
} , function ( ) {
return [ _ctx . dropdown ? ( openBlock ( ) , createElementBlock ( "button" , mergeProps ( {
2024-10-28 18:29:38 +00:00
key : 0 ,
2025-01-02 21:18:54 +00:00
ref : "dropdownButton" ,
type : "button" ,
"class" : [ _ctx . cx ( "dropdown" ) , _ctx . dropdownClass ] ,
disabled : _ctx . disabled ,
"aria-haspopup" : "listbox" ,
"aria-expanded" : $data . overlayVisible ,
"aria-controls" : $options . panelId ,
onClick : _cache [ 8 ] || ( _cache [ 8 ] = function ( ) {
return $options . onDropdownClick && $options . onDropdownClick . apply ( $options , arguments ) ;
2024-10-28 18:29:38 +00:00
} )
2025-01-02 21:18:54 +00:00
} , _ctx . ptm ( "dropdown" ) ) , [ renderSlot ( _ctx . $slots , "dropdownicon" , {
"class" : normalizeClass ( _ctx . dropdownIcon )
} , function ( ) {
return [ ( openBlock ( ) , createBlock ( resolveDynamicComponent ( _ctx . dropdownIcon ? "span" : "ChevronDownIcon" ) , mergeProps ( {
"class" : _ctx . dropdownIcon
} , _ctx . ptm ( "dropdownIcon" ) ) , null , 16 , [ "class" ] ) ) ] ;
2025-01-31 18:07:37 +00:00
} ) ] , 16 , _hoisted _4$2 ) ) : createCommentVNode ( "" , true ) ] ;
2025-01-02 21:18:54 +00:00
} ) , createBaseVNode ( "span" , mergeProps ( {
role : "status" ,
"aria-live" : "polite" ,
"class" : "p-hidden-accessible"
} , _ctx . ptm ( "hiddenSearchResult" ) , {
"data-p-hidden-accessible" : true
} ) , toDisplayString ( $options . searchResultMessageText ) , 17 ) , createVNode ( _component _Portal , {
appendTo : _ctx . appendTo
} , {
"default" : withCtx ( function ( ) {
return [ createVNode ( Transition , mergeProps ( {
name : "p-connected-overlay" ,
onEnter : $options . onOverlayEnter ,
onAfterEnter : $options . onOverlayAfterEnter ,
onLeave : $options . onOverlayLeave ,
onAfterLeave : $options . onOverlayAfterLeave
} , _ctx . ptm ( "transition" ) ) , {
"default" : withCtx ( function ( ) {
return [ $data . overlayVisible ? ( openBlock ( ) , createElementBlock ( "div" , mergeProps ( {
key : 0 ,
ref : $options . overlayRef ,
id : $options . panelId ,
"class" : [ _ctx . cx ( "overlay" ) , _ctx . panelClass , _ctx . overlayClass ] ,
2025-02-15 09:32:47 +00:00
style : _objectSpread$1 ( _objectSpread$1 ( { } , _ctx . panelStyle ) , _ctx . overlayStyle ) ,
2025-01-02 21:18:54 +00:00
onClick : _cache [ 9 ] || ( _cache [ 9 ] = function ( ) {
return $options . onOverlayClick && $options . onOverlayClick . apply ( $options , arguments ) ;
} ) ,
onKeydown : _cache [ 10 ] || ( _cache [ 10 ] = function ( ) {
return $options . onOverlayKeyDown && $options . onOverlayKeyDown . apply ( $options , arguments ) ;
} )
} , _ctx . ptm ( "overlay" ) ) , [ renderSlot ( _ctx . $slots , "header" , {
2025-01-31 18:07:37 +00:00
value : _ctx . d _value ,
2025-01-02 21:18:54 +00:00
suggestions : $options . visibleOptions
2025-01-31 18:07:37 +00:00
} ) , createBaseVNode ( "div" , mergeProps ( {
"class" : _ctx . cx ( "listContainer" ) ,
style : {
"max-height" : $options . virtualScrollerDisabled ? _ctx . scrollHeight : ""
}
} , _ctx . ptm ( "listContainer" ) ) , [ createVNode ( _component _VirtualScroller , mergeProps ( {
2025-01-02 21:18:54 +00:00
ref : $options . virtualScrollerRef
} , _ctx . virtualScrollerOptions , {
style : {
height : _ctx . scrollHeight
} ,
items : $options . visibleOptions ,
tabindex : - 1 ,
disabled : $options . virtualScrollerDisabled ,
pt : _ctx . ptm ( "virtualScroller" )
} ) , createSlots ( {
content : withCtx ( function ( _ref ) {
var styleClass = _ref . styleClass , contentRef = _ref . contentRef , items = _ref . items , getItemOptions = _ref . getItemOptions , contentStyle = _ref . contentStyle , itemSize = _ref . itemSize ;
return [ createBaseVNode ( "ul" , mergeProps ( {
2025-01-31 18:07:37 +00:00
ref : /* @__PURE__ */ _ _name ( function ref ( el ) {
2025-01-02 21:18:54 +00:00
return $options . listRef ( el , contentRef ) ;
} , "ref" ) ,
id : $data . id + "_list" ,
"class" : [ _ctx . cx ( "list" ) , styleClass ] ,
style : contentStyle ,
role : "listbox" ,
"aria-label" : $options . listAriaLabel
} , _ctx . ptm ( "list" ) ) , [ ( openBlock ( true ) , createElementBlock ( Fragment , null , renderList ( items , function ( option2 , i ) {
return openBlock ( ) , createElementBlock ( Fragment , {
key : $options . getOptionRenderKey ( option2 , $options . getOptionIndex ( i , getItemOptions ) )
} , [ $options . isOptionGroup ( option2 ) ? ( openBlock ( ) , createElementBlock ( "li" , mergeProps ( {
key : 0 ,
id : $data . id + "_" + $options . getOptionIndex ( i , getItemOptions ) ,
style : {
height : itemSize ? itemSize + "px" : void 0
} ,
"class" : _ctx . cx ( "optionGroup" ) ,
role : "option" ,
ref _for : true
} , _ctx . ptm ( "optionGroup" ) ) , [ renderSlot ( _ctx . $slots , "optiongroup" , {
option : option2 . optionGroup ,
index : $options . getOptionIndex ( i , getItemOptions )
} , function ( ) {
return [ createTextVNode ( toDisplayString ( $options . getOptionGroupLabel ( option2 . optionGroup ) ) , 1 ) ] ;
2025-01-31 18:07:37 +00:00
} ) ] , 16 , _hoisted _7 ) ) : withDirectives ( ( openBlock ( ) , createElementBlock ( "li" , mergeProps ( {
2025-01-02 21:18:54 +00:00
key : 1 ,
id : $data . id + "_" + $options . getOptionIndex ( i , getItemOptions ) ,
style : {
height : itemSize ? itemSize + "px" : void 0
} ,
"class" : _ctx . cx ( "option" , {
option : option2 ,
i ,
getItemOptions
} ) ,
role : "option" ,
"aria-label" : $options . getOptionLabel ( option2 ) ,
"aria-selected" : $options . isSelected ( option2 ) ,
"aria-disabled" : $options . isOptionDisabled ( option2 ) ,
"aria-setsize" : $options . ariaSetSize ,
"aria-posinset" : $options . getAriaPosInset ( $options . getOptionIndex ( i , getItemOptions ) ) ,
onClick : /* @__PURE__ */ _ _name ( function onClick2 ( $event ) {
return $options . onOptionSelect ( $event , option2 ) ;
} , "onClick" ) ,
onMousemove : /* @__PURE__ */ _ _name ( function onMousemove ( $event ) {
return $options . onOptionMouseMove ( $event , $options . getOptionIndex ( i , getItemOptions ) ) ;
} , "onMousemove" ) ,
"data-p-selected" : $options . isSelected ( option2 ) ,
"data-p-focus" : $data . focusedOptionIndex === $options . getOptionIndex ( i , getItemOptions ) ,
"data-p-disabled" : $options . isOptionDisabled ( option2 ) ,
ref _for : true
} , $options . getPTOptions ( option2 , getItemOptions , i , "option" ) ) , [ renderSlot ( _ctx . $slots , "option" , {
option : option2 ,
index : $options . getOptionIndex ( i , getItemOptions )
} , function ( ) {
return [ createTextVNode ( toDisplayString ( $options . getOptionLabel ( option2 ) ) , 1 ) ] ;
2025-01-31 18:07:37 +00:00
} ) ] , 16 , _hoisted _8 ) ) , [ [ _directive _ripple ] ] ) ] , 64 ) ;
} ) , 128 ) ) , _ctx . showEmptyMessage && ( ! items || items && items . length === 0 ) ? ( openBlock ( ) , createElementBlock ( "li" , mergeProps ( {
2025-01-02 21:18:54 +00:00
key : 0 ,
"class" : _ctx . cx ( "emptyMessage" ) ,
role : "option"
} , _ctx . ptm ( "emptyMessage" ) ) , [ renderSlot ( _ctx . $slots , "empty" , { } , function ( ) {
return [ createTextVNode ( toDisplayString ( $options . searchResultMessageText ) , 1 ) ] ;
2025-01-31 18:07:37 +00:00
} ) ] , 16 ) ) : createCommentVNode ( "" , true ) ] , 16 , _hoisted _6$1 ) ] ;
2025-01-02 21:18:54 +00:00
} ) ,
_ : 2
} , [ _ctx . $slots . loader ? {
name : "loader" ,
fn : withCtx ( function ( _ref2 ) {
var options = _ref2 . options ;
return [ renderSlot ( _ctx . $slots , "loader" , {
options
} ) ] ;
} ) ,
key : "0"
2025-01-31 18:07:37 +00:00
} : void 0 ] ) , 1040 , [ "style" , "items" , "disabled" , "pt" ] ) ] , 16 ) , renderSlot ( _ctx . $slots , "footer" , {
value : _ctx . d _value ,
2025-01-02 21:18:54 +00:00
suggestions : $options . visibleOptions
} ) , createBaseVNode ( "span" , mergeProps ( {
role : "status" ,
"aria-live" : "polite" ,
"class" : "p-hidden-accessible"
} , _ctx . ptm ( "hiddenSelectedMessage" ) , {
"data-p-hidden-accessible" : true
2025-01-31 18:07:37 +00:00
} ) , toDisplayString ( $options . selectedMessageText ) , 17 ) ] , 16 , _hoisted _5$2 ) ) : createCommentVNode ( "" , true ) ] ;
2025-01-02 21:18:54 +00:00
} ) ,
_ : 3
} , 16 , [ "onEnter" , "onAfterEnter" , "onLeave" , "onAfterLeave" ] ) ] ;
} ) ,
_ : 3
} , 8 , [ "appendTo" ] ) ] , 16 ) ;
2024-10-28 18:29:38 +00:00
}
2025-02-15 09:32:47 +00:00
_ _name ( render$5 , "render$5" ) ;
script$6 . render = render$5 ;
var theme$3 = /* @__PURE__ */ _ _name ( function theme4 ( _ref ) {
2025-01-02 21:18:54 +00:00
var dt = _ref . dt ;
2025-01-31 18:07:37 +00:00
return "\n.p-overlaybadge {\n position: relative;\n}\n\n.p-overlaybadge .p-badge {\n position: absolute;\n inset-block-start: 0;\n inset-inline-end: 0;\n transform: translate(50%, -50%);\n transform-origin: 100% 0;\n margin: 0;\n outline-width: " . concat ( dt ( "overlaybadge.outline.width" ) , ";\n outline-style: solid;\n outline-color: " ) . concat ( dt ( "overlaybadge.outline.color" ) , ";\n}\n\n.p-overlaybadge .p-badge:dir(rtl) {\n transform: translate(-50%, -50%);\n}\n" ) ;
2025-01-02 21:18:54 +00:00
} , "theme" ) ;
2025-02-15 09:32:47 +00:00
var classes$3 = {
2025-01-02 21:18:54 +00:00
root : "p-overlaybadge"
} ;
var OverlayBadgeStyle = BaseStyle . extend ( {
name : "overlaybadge" ,
2025-02-15 09:32:47 +00:00
theme : theme$3 ,
classes : classes$3
2025-01-02 21:18:54 +00:00
} ) ;
2025-02-15 09:32:47 +00:00
var script$1$3 = {
2025-01-02 21:18:54 +00:00
name : "OverlayBadge" ,
2025-02-15 09:32:47 +00:00
"extends" : script$m ,
2025-01-02 21:18:54 +00:00
style : OverlayBadgeStyle ,
2025-01-31 18:07:37 +00:00
provide : /* @__PURE__ */ _ _name ( function provide7 ( ) {
2025-01-02 21:18:54 +00:00
return {
$pcOverlayBadge : this ,
$parentInstance : this
} ;
} , "provide" )
} ;
2025-02-15 09:32:47 +00:00
var script$5 = {
2025-01-02 21:18:54 +00:00
name : "OverlayBadge" ,
2025-02-15 09:32:47 +00:00
"extends" : script$1$3 ,
2025-01-02 21:18:54 +00:00
inheritAttrs : false ,
components : {
2025-02-15 09:32:47 +00:00
Badge : script$m
2025-01-02 21:18:54 +00:00
}
} ;
2025-02-15 09:32:47 +00:00
function render$4 ( _ctx , _cache , $props , $setup , $data , $options ) {
2025-01-02 21:18:54 +00:00
var _component _Badge = resolveComponent ( "Badge" ) ;
return openBlock ( ) , createElementBlock ( "div" , mergeProps ( {
"class" : _ctx . cx ( "root" )
} , _ctx . ptmi ( "root" ) ) , [ renderSlot ( _ctx . $slots , "default" ) , createVNode ( _component _Badge , mergeProps ( _ctx . $props , {
pt : _ctx . ptm ( "pcBadge" )
} ) , null , 16 , [ "pt" ] ) ] , 16 ) ;
}
2025-01-31 18:07:37 +00:00
_ _name ( render$4 , "render$4" ) ;
script$5 . render = render$4 ;
2025-02-15 09:32:47 +00:00
var theme$2 = /* @__PURE__ */ _ _name ( function theme5 ( _ref ) {
2024-10-28 18:29:38 +00:00
var dt = _ref . dt ;
2025-01-31 18:07:37 +00:00
return "\n.p-tieredmenu {\n background: " . concat ( dt ( "tieredmenu.background" ) , ";\n color: " ) . concat ( dt ( "tieredmenu.color" ) , ";\n border: 1px solid " ) . concat ( dt ( "tieredmenu.border.color" ) , ";\n border-radius: " ) . concat ( dt ( "tieredmenu.border.radius" ) , ";\n min-width: 12.5rem;\n}\n\n.p-tieredmenu-root-list,\n.p-tieredmenu-submenu {\n margin: 0;\n padding: " ) . concat ( dt ( "tieredmenu.list.padding" ) , ";\n list-style: none;\n outline: 0 none;\n display: flex;\n flex-direction: column;\n gap: " ) . concat ( dt ( "tieredmenu.list.gap" ) , ";\n}\n\n.p-tieredmenu-submenu {\n position: absolute;\n min-width: 100%;\n z-index: 1;\n background: " ) . concat ( dt ( "tieredmenu.background" ) , ";\n color: " ) . concat ( dt ( "tieredmenu.color" ) , ";\n border: 1px solid " ) . concat ( dt ( "tieredmenu.border.color" ) , ";\n border-radius: " ) . concat ( dt ( "tieredmenu.border.radius" ) , ";\n box-shadow: " ) . concat ( dt ( "tieredmenu.shadow" ) , ";\n}\n\n.p-tieredmenu-item {\n position: relative;\n}\n\n.p-tieredmenu-item-content {\n transition: background " ) . concat ( dt ( "tieredmenu.transition.duration" ) , ", color " ) . concat ( dt ( "tieredmenu.transition.duration" ) , ";\n border-radius: " ) . concat ( dt ( "tieredmenu.item.border.radius" ) , ";\n color: " ) . concat ( dt ( "tieredmenu.item.color" ) , ";\n}\n\n.p-tieredmenu-item-link {\n cursor: pointer;\n display: flex;\n align-items: center;\n text-decoration: none;\n overflow: hidden;\n position: relative;\n color: inherit;\n padding: " ) . concat ( dt ( "tieredmenu.item.padding" ) , ";\n gap: " ) . concat ( dt ( "tieredmenu.item.gap" ) , ";\n user-select: none;\n outline: 0 none;\n}\n\n.p-tieredmenu-item-label {\n line-height: 1;\n}\n\n.p-tieredmenu-item-icon {\n color: " ) . concat ( dt ( "tieredmenu.item.icon.color" ) , ";\n}\n\n.p-tieredmenu-submenu-icon {\n color: " ) . concat ( dt ( "tieredmenu.submenu.icon.color" ) , ";\n margin-left: auto;\n font-size: " ) . concat ( dt ( "tieredmenu.submenu.icon.size" ) , ";\n width: " ) . concat ( dt ( "tieredmenu.submenu.icon.size" ) , ";\n height: " ) . concat ( dt ( "tieredmenu.submenu.icon.size" ) , ";\n}\n\n.p-tieredmenu-submenu-icon:dir(rtl) {\n margin-left: 0;\n margin-right: auto;\n}\n\n.p-tieredmenu-item.p-focus > .p-tieredmenu-item-content {\n color: " ) . concat ( dt ( "tieredmenu.item.focus.color" ) , ";\n background: " ) . concat ( dt ( "tieredmenu.item.focus.background" ) , ";\n}\n\n.p-tieredmenu-item.p-focus > .p-tieredmenu-item-content .p-tieredmenu-item-icon {\n color: " ) . concat ( dt ( "tieredmenu.item.icon.focus.color" ) , ";\n}\n\n.p-tieredmenu-item.p-focus > .p-tieredmenu-item-content .p-tieredmenu-submenu-icon {\n color: " ) . concat ( dt ( "tieredmenu.submenu.icon.focus.color" ) , ";\n}\n\n.p-tieredmenu-item:not(.p-disabled) > .p-tieredmenu-item-content:hover {\n color: " ) . concat ( dt ( "tieredmenu.item.focus.color" ) , ";\n background: " ) . concat ( dt ( "tieredmenu.item.focus.background" ) , ";\n}\n\n.p-tieredmenu-item:not(.p-disabled) > .p-tieredmenu-item-content:hover .p-tieredmenu-item-icon {\n color: " ) . concat ( dt ( "tieredmenu.item.icon.focus.color" ) , ";\n}\n\n.p-tieredmenu-item:not(.p-disabled) > .p-tieredmenu-item-content:hover .p-tieredmenu-submenu-icon {\n color: " ) . concat ( dt ( "tieredmenu.submenu.icon.focus.color" ) , ";\n}\n\n.p-tieredmenu-item-active > .p-tieredmenu-item-content {\n color: " ) . concat ( dt ( "tieredmenu.item.active.color" ) , ";\n background: " ) . concat ( dt ( "tieredmenu.item.active.background" ) , ";\n}\n\n.p-tieredmenu-item-active > .p-tieredmenu-item-content .p-tieredmenu-item-icon {\n color: " ) . concat ( dt ( "tieredmenu.item.icon.active.color" ) , ";\n}\n\n.p-tieredmenu-item-active > .p-tieredmenu-item-content .p-tieredmenu-submenu-icon {\n color: " ) . concat ( dt ( "tieredmenu.submenu.icon.active.color" ) , ";\n}\n\n.p-tieredmenu-separator {\n border-block-start: 1px solid " ) . concat ( dt ( "tieredmenu.separator.border.color" ) , ";\n}\n\n.p-tieredmenu-overlay {\n box-shadow: " ) . concat ( dt ( "tieredmenu.shadow" ) , " ; \ n } \ n \ n . p - tieredmenu - enter - from , \ n . p - tieredmenu - leave - active { \ n opacity : 0 ; \ n } \ n \ n . p - tieredmenu - enter - active { \ n transitio
2024-10-28 18:29:38 +00:00
} , "theme" ) ;
2025-01-02 21:18:54 +00:00
var inlineStyles$1 = {
submenu : /* @__PURE__ */ _ _name ( function submenu ( _ref2 ) {
2024-10-28 18:29:38 +00:00
var instance = _ref2 . instance , processedItem = _ref2 . processedItem ;
return {
display : instance . isItemActive ( processedItem ) ? "flex" : "none"
} ;
} , "submenu" )
} ;
2025-01-02 21:18:54 +00:00
var classes$2 = {
2025-02-15 09:32:47 +00:00
root : /* @__PURE__ */ _ _name ( function root6 ( _ref3 ) {
2025-01-31 18:07:37 +00:00
var props = _ref3 . props , instance = _ref3 . instance ;
2024-10-28 18:29:38 +00:00
return [ "p-tieredmenu p-component" , {
2025-01-31 18:07:37 +00:00
"p-tieredmenu-overlay" : props . popup ,
"p-tieredmenu-mobile" : instance . queryMatches
2024-10-28 18:29:38 +00:00
} ] ;
} , "root" ) ,
start : "p-tieredmenu-start" ,
rootList : "p-tieredmenu-root-list" ,
2025-01-02 21:18:54 +00:00
item : /* @__PURE__ */ _ _name ( function item ( _ref4 ) {
2024-10-28 18:29:38 +00:00
var instance = _ref4 . instance , processedItem = _ref4 . processedItem ;
return [ "p-tieredmenu-item" , {
"p-tieredmenu-item-active" : instance . isItemActive ( processedItem ) ,
"p-focus" : instance . isItemFocused ( processedItem ) ,
"p-disabled" : instance . isItemDisabled ( processedItem )
} ] ;
} , "item" ) ,
itemContent : "p-tieredmenu-item-content" ,
itemLink : "p-tieredmenu-item-link" ,
itemIcon : "p-tieredmenu-item-icon" ,
itemLabel : "p-tieredmenu-item-label" ,
submenuIcon : "p-tieredmenu-submenu-icon" ,
submenu : "p-tieredmenu-submenu" ,
separator : "p-tieredmenu-separator" ,
end : "p-tieredmenu-end"
} ;
var TieredMenuStyle = BaseStyle . extend ( {
name : "tieredmenu" ,
2025-01-02 21:18:54 +00:00
theme : theme$2 ,
classes : classes$2 ,
inlineStyles : inlineStyles$1
2024-10-28 18:29:38 +00:00
} ) ;
2025-01-02 21:18:54 +00:00
var script$2$1 = {
2024-10-28 18:29:38 +00:00
name : "BaseTieredMenu" ,
2025-02-15 09:32:47 +00:00
"extends" : script$c ,
2024-10-28 18:29:38 +00:00
props : {
popup : {
type : Boolean ,
"default" : false
} ,
model : {
type : Array ,
"default" : null
} ,
appendTo : {
type : [ String , Object ] ,
"default" : "body"
} ,
2025-01-31 18:07:37 +00:00
breakpoint : {
type : String ,
"default" : "960px"
} ,
2024-10-28 18:29:38 +00:00
autoZIndex : {
type : Boolean ,
"default" : true
} ,
baseZIndex : {
type : Number ,
"default" : 0
} ,
disabled : {
type : Boolean ,
"default" : false
} ,
tabindex : {
type : Number ,
"default" : 0
} ,
ariaLabelledby : {
type : String ,
"default" : null
} ,
ariaLabel : {
type : String ,
"default" : null
}
} ,
style : TieredMenuStyle ,
2025-02-15 09:32:47 +00:00
provide : /* @__PURE__ */ _ _name ( function provide8 ( ) {
2024-10-28 18:29:38 +00:00
return {
$pcTieredMenu : this ,
$parentInstance : this
} ;
} , "provide" )
} ;
2025-01-02 21:18:54 +00:00
var script$1$2 = {
2024-10-28 18:29:38 +00:00
name : "TieredMenuSub" ,
hostName : "TieredMenu" ,
2025-02-15 09:32:47 +00:00
"extends" : script$c ,
2024-10-28 18:29:38 +00:00
emits : [ "item-click" , "item-mouseenter" , "item-mousemove" ] ,
container : null ,
props : {
menuId : {
type : String ,
"default" : null
} ,
focusedItemId : {
type : String ,
"default" : null
} ,
items : {
type : Array ,
"default" : null
} ,
visible : {
type : Boolean ,
"default" : false
} ,
level : {
type : Number ,
"default" : 0
} ,
templates : {
type : Object ,
"default" : null
} ,
activeItemPath : {
type : Object ,
"default" : null
} ,
tabindex : {
type : Number ,
"default" : 0
}
} ,
methods : {
2025-01-02 21:18:54 +00:00
getItemId : /* @__PURE__ */ _ _name ( function getItemId ( processedItem ) {
2024-10-28 18:29:38 +00:00
return "" . concat ( this . menuId , "_" ) . concat ( processedItem . key ) ;
} , "getItemId" ) ,
2025-01-02 21:18:54 +00:00
getItemKey : /* @__PURE__ */ _ _name ( function getItemKey ( processedItem ) {
2024-10-28 18:29:38 +00:00
return this . getItemId ( processedItem ) ;
} , "getItemKey" ) ,
2025-01-02 21:18:54 +00:00
getItemProp : /* @__PURE__ */ _ _name ( function getItemProp ( processedItem , name , params ) {
2024-10-28 18:29:38 +00:00
return processedItem && processedItem . item ? resolve ( processedItem . item [ name ] , params ) : void 0 ;
} , "getItemProp" ) ,
2025-01-02 21:18:54 +00:00
getItemLabel : /* @__PURE__ */ _ _name ( function getItemLabel ( processedItem ) {
2024-10-28 18:29:38 +00:00
return this . getItemProp ( processedItem , "label" ) ;
} , "getItemLabel" ) ,
2025-01-02 21:18:54 +00:00
getItemLabelId : /* @__PURE__ */ _ _name ( function getItemLabelId ( processedItem ) {
2024-10-28 18:29:38 +00:00
return "" . concat ( this . menuId , "_" ) . concat ( processedItem . key , "_label" ) ;
} , "getItemLabelId" ) ,
2025-01-02 21:18:54 +00:00
getPTOptions : /* @__PURE__ */ _ _name ( function getPTOptions4 ( processedItem , index , key ) {
2024-10-28 18:29:38 +00:00
return this . ptm ( key , {
context : {
item : processedItem . item ,
index ,
active : this . isItemActive ( processedItem ) ,
focused : this . isItemFocused ( processedItem ) ,
disabled : this . isItemDisabled ( processedItem )
}
} ) ;
} , "getPTOptions" ) ,
2025-01-02 21:18:54 +00:00
isItemActive : /* @__PURE__ */ _ _name ( function isItemActive ( processedItem ) {
2024-10-28 18:29:38 +00:00
return this . activeItemPath . some ( function ( path ) {
return path . key === processedItem . key ;
} ) ;
} , "isItemActive" ) ,
2025-01-02 21:18:54 +00:00
isItemVisible : /* @__PURE__ */ _ _name ( function isItemVisible ( processedItem ) {
2024-10-28 18:29:38 +00:00
return this . getItemProp ( processedItem , "visible" ) !== false ;
} , "isItemVisible" ) ,
2025-01-02 21:18:54 +00:00
isItemDisabled : /* @__PURE__ */ _ _name ( function isItemDisabled ( processedItem ) {
2024-10-28 18:29:38 +00:00
return this . getItemProp ( processedItem , "disabled" ) ;
} , "isItemDisabled" ) ,
2025-01-02 21:18:54 +00:00
isItemFocused : /* @__PURE__ */ _ _name ( function isItemFocused ( processedItem ) {
2024-10-28 18:29:38 +00:00
return this . focusedItemId === this . getItemId ( processedItem ) ;
} , "isItemFocused" ) ,
2025-01-02 21:18:54 +00:00
isItemGroup : /* @__PURE__ */ _ _name ( function isItemGroup ( processedItem ) {
2024-10-28 18:29:38 +00:00
return isNotEmpty ( processedItem . items ) ;
} , "isItemGroup" ) ,
2025-02-15 09:32:47 +00:00
onEnter : /* @__PURE__ */ _ _name ( function onEnter ( ) {
2024-10-28 18:29:38 +00:00
nestedPosition ( this . container , this . level ) ;
} , "onEnter" ) ,
2025-01-02 21:18:54 +00:00
onItemClick : /* @__PURE__ */ _ _name ( function onItemClick ( event , processedItem ) {
2024-10-28 18:29:38 +00:00
this . getItemProp ( processedItem , "command" , {
originalEvent : event ,
item : processedItem . item
} ) ;
this . $emit ( "item-click" , {
originalEvent : event ,
processedItem ,
isFocus : true
} ) ;
} , "onItemClick" ) ,
2025-01-02 21:18:54 +00:00
onItemMouseEnter : /* @__PURE__ */ _ _name ( function onItemMouseEnter ( event , processedItem ) {
2024-10-28 18:29:38 +00:00
this . $emit ( "item-mouseenter" , {
originalEvent : event ,
processedItem
} ) ;
} , "onItemMouseEnter" ) ,
2025-01-02 21:18:54 +00:00
onItemMouseMove : /* @__PURE__ */ _ _name ( function onItemMouseMove ( event , processedItem ) {
2024-10-28 18:29:38 +00:00
this . $emit ( "item-mousemove" , {
originalEvent : event ,
processedItem
} ) ;
} , "onItemMouseMove" ) ,
2025-01-02 21:18:54 +00:00
getAriaSetSize : /* @__PURE__ */ _ _name ( function getAriaSetSize ( ) {
2024-10-28 18:29:38 +00:00
var _this = this ;
return this . items . filter ( function ( processedItem ) {
return _this . isItemVisible ( processedItem ) && ! _this . getItemProp ( processedItem , "separator" ) ;
} ) . length ;
} , "getAriaSetSize" ) ,
2025-01-02 21:18:54 +00:00
getAriaPosInset : /* @__PURE__ */ _ _name ( function getAriaPosInset2 ( index ) {
2024-10-28 18:29:38 +00:00
var _this2 = this ;
return index - this . items . slice ( 0 , index ) . filter ( function ( processedItem ) {
return _this2 . isItemVisible ( processedItem ) && _this2 . getItemProp ( processedItem , "separator" ) ;
} ) . length + 1 ;
} , "getAriaPosInset" ) ,
2025-01-02 21:18:54 +00:00
getMenuItemProps : /* @__PURE__ */ _ _name ( function getMenuItemProps ( processedItem , index ) {
2024-10-28 18:29:38 +00:00
return {
action : mergeProps ( {
"class" : this . cx ( "itemLink" ) ,
2025-01-31 18:07:37 +00:00
tabindex : - 1
2024-10-28 18:29:38 +00:00
} , this . getPTOptions ( processedItem , index , "itemLink" ) ) ,
icon : mergeProps ( {
"class" : [ this . cx ( "itemIcon" ) , this . getItemProp ( processedItem , "icon" ) ]
} , this . getPTOptions ( processedItem , index , "itemIcon" ) ) ,
label : mergeProps ( {
"class" : this . cx ( "itemLabel" )
} , this . getPTOptions ( processedItem , index , "itemLabel" ) ) ,
submenuicon : mergeProps ( {
"class" : this . cx ( "submenuIcon" )
} , this . getPTOptions ( processedItem , index , "submenuIcon" ) )
} ;
} , "getMenuItemProps" ) ,
2025-01-02 21:18:54 +00:00
containerRef : /* @__PURE__ */ _ _name ( function containerRef ( el ) {
2024-10-28 18:29:38 +00:00
this . container = el ;
} , "containerRef" )
} ,
components : {
2025-02-15 09:32:47 +00:00
AngleRightIcon : script$n
2024-10-28 18:29:38 +00:00
} ,
directives : {
ripple : Ripple
}
} ;
2025-01-31 18:07:37 +00:00
var _hoisted _1$1$1 = [ "tabindex" ] ;
var _hoisted _2$1 = [ "id" , "aria-label" , "aria-disabled" , "aria-expanded" , "aria-haspopup" , "aria-level" , "aria-setsize" , "aria-posinset" , "data-p-active" , "data-p-focused" , "data-p-disabled" ] ;
var _hoisted _3$1 = [ "onClick" , "onMouseenter" , "onMousemove" ] ;
var _hoisted _4$1 = [ "href" , "target" ] ;
2025-01-02 21:18:54 +00:00
var _hoisted _5$1 = [ "id" ] ;
2024-10-28 18:29:38 +00:00
var _hoisted _6 = [ "id" ] ;
2024-10-29 18:14:06 +00:00
function render$1$1 ( _ctx , _cache , $props , $setup , $data , $options ) {
2024-10-28 18:29:38 +00:00
var _component _AngleRightIcon = resolveComponent ( "AngleRightIcon" ) ;
var _component _TieredMenuSub = resolveComponent ( "TieredMenuSub" , true ) ;
var _directive _ripple = resolveDirective ( "ripple" ) ;
return openBlock ( ) , createBlock ( Transition , mergeProps ( {
name : "p-tieredmenu" ,
onEnter : $options . onEnter
} , _ctx . ptm ( "menu.transition" ) ) , {
"default" : withCtx ( function ( ) {
2025-01-31 18:07:37 +00:00
return [ ( $props . level === 0 ? true : $props . visible ) ? ( openBlock ( ) , createElementBlock ( "ul" , {
2024-10-28 18:29:38 +00:00
key : 0 ,
ref : $options . containerRef ,
tabindex : $props . tabindex
2025-01-31 18:07:37 +00:00
} , [ ( openBlock ( true ) , createElementBlock ( Fragment , null , renderList ( $props . items , function ( processedItem , index ) {
2024-10-28 18:29:38 +00:00
return openBlock ( ) , createElementBlock ( Fragment , {
key : $options . getItemKey ( processedItem )
} , [ $options . isItemVisible ( processedItem ) && ! $options . getItemProp ( processedItem , "separator" ) ? ( openBlock ( ) , createElementBlock ( "li" , mergeProps ( {
key : 0 ,
id : $options . getItemId ( processedItem ) ,
style : $options . getItemProp ( processedItem , "style" ) ,
"class" : [ _ctx . cx ( "item" , {
processedItem
} ) , $options . getItemProp ( processedItem , "class" ) ] ,
role : "menuitem" ,
"aria-label" : $options . getItemLabel ( processedItem ) ,
"aria-disabled" : $options . isItemDisabled ( processedItem ) || void 0 ,
"aria-expanded" : $options . isItemGroup ( processedItem ) ? $options . isItemActive ( processedItem ) : void 0 ,
"aria-haspopup" : $options . isItemGroup ( processedItem ) && ! $options . getItemProp ( processedItem , "to" ) ? "menu" : void 0 ,
"aria-level" : $props . level + 1 ,
"aria-setsize" : $options . getAriaSetSize ( ) ,
"aria-posinset" : $options . getAriaPosInset ( index ) ,
ref _for : true
} , $options . getPTOptions ( processedItem , index , "item" ) , {
"data-p-active" : $options . isItemActive ( processedItem ) ,
"data-p-focused" : $options . isItemFocused ( processedItem ) ,
"data-p-disabled" : $options . isItemDisabled ( processedItem )
} ) , [ createBaseVNode ( "div" , mergeProps ( {
"class" : _ctx . cx ( "itemContent" ) ,
2024-10-29 18:14:06 +00:00
onClick : /* @__PURE__ */ _ _name ( function onClick2 ( $event ) {
2024-10-28 18:29:38 +00:00
return $options . onItemClick ( $event , processedItem ) ;
} , "onClick" ) ,
onMouseenter : /* @__PURE__ */ _ _name ( function onMouseenter ( $event ) {
return $options . onItemMouseEnter ( $event , processedItem ) ;
} , "onMouseenter" ) ,
onMousemove : /* @__PURE__ */ _ _name ( function onMousemove ( $event ) {
return $options . onItemMouseMove ( $event , processedItem ) ;
} , "onMousemove" ) ,
ref _for : true
} , $options . getPTOptions ( processedItem , index , "itemContent" ) ) , [ ! $props . templates . item ? withDirectives ( ( openBlock ( ) , createElementBlock ( "a" , mergeProps ( {
key : 0 ,
href : $options . getItemProp ( processedItem , "url" ) ,
"class" : _ctx . cx ( "itemLink" ) ,
target : $options . getItemProp ( processedItem , "target" ) ,
tabindex : "-1" ,
ref _for : true
} , $options . getPTOptions ( processedItem , index , "itemLink" ) ) , [ $props . templates . itemicon ? ( openBlock ( ) , createBlock ( resolveDynamicComponent ( $props . templates . itemicon ) , {
key : 0 ,
item : processedItem . item ,
"class" : normalizeClass ( _ctx . cx ( "itemIcon" ) )
} , null , 8 , [ "item" , "class" ] ) ) : $options . getItemProp ( processedItem , "icon" ) ? ( openBlock ( ) , createElementBlock ( "span" , mergeProps ( {
key : 1 ,
"class" : [ _ctx . cx ( "itemIcon" ) , $options . getItemProp ( processedItem , "icon" ) ] ,
ref _for : true
} , $options . getPTOptions ( processedItem , index , "itemIcon" ) ) , null , 16 ) ) : createCommentVNode ( "" , true ) , createBaseVNode ( "span" , mergeProps ( {
id : $options . getItemLabelId ( processedItem ) ,
"class" : _ctx . cx ( "itemLabel" ) ,
ref _for : true
2025-01-02 21:18:54 +00:00
} , $options . getPTOptions ( processedItem , index , "itemLabel" ) ) , toDisplayString ( $options . getItemLabel ( processedItem ) ) , 17 , _hoisted _5$1 ) , $options . getItemProp ( processedItem , "items" ) ? ( openBlock ( ) , createElementBlock ( Fragment , {
2024-10-28 18:29:38 +00:00
key : 2
} , [ $props . templates . submenuicon ? ( openBlock ( ) , createBlock ( resolveDynamicComponent ( $props . templates . submenuicon ) , mergeProps ( {
key : 0 ,
"class" : _ctx . cx ( "submenuIcon" ) ,
active : $options . isItemActive ( processedItem ) ,
ref _for : true
} , $options . getPTOptions ( processedItem , index , "submenuIcon" ) ) , null , 16 , [ "class" , "active" ] ) ) : ( openBlock ( ) , createBlock ( _component _AngleRightIcon , mergeProps ( {
key : 1 ,
"class" : _ctx . cx ( "submenuIcon" ) ,
ref _for : true
2025-01-31 18:07:37 +00:00
} , $options . getPTOptions ( processedItem , index , "submenuIcon" ) ) , null , 16 , [ "class" ] ) ) ] , 64 ) ) : createCommentVNode ( "" , true ) ] , 16 , _hoisted _4$1 ) ) , [ [ _directive _ripple ] ] ) : ( openBlock ( ) , createBlock ( resolveDynamicComponent ( $props . templates . item ) , {
2024-10-28 18:29:38 +00:00
key : 1 ,
item : processedItem . item ,
hasSubmenu : $options . getItemProp ( processedItem , "items" ) ,
label : $options . getItemLabel ( processedItem ) ,
props : $options . getMenuItemProps ( processedItem , index )
2025-01-31 18:07:37 +00:00
} , null , 8 , [ "item" , "hasSubmenu" , "label" , "props" ] ) ) ] , 16 , _hoisted _3$1 ) , $options . isItemVisible ( processedItem ) && $options . isItemGroup ( processedItem ) ? ( openBlock ( ) , createBlock ( _component _TieredMenuSub , mergeProps ( {
2024-10-28 18:29:38 +00:00
key : 0 ,
id : $options . getItemId ( processedItem ) + "_list" ,
2025-01-31 18:07:37 +00:00
"class" : _ctx . cx ( "submenu" ) ,
style : _ctx . sx ( "submenu" , true , {
2024-10-28 18:29:38 +00:00
processedItem
2025-01-31 18:07:37 +00:00
} ) ,
2024-10-28 18:29:38 +00:00
"aria-labelledby" : $options . getItemLabelId ( processedItem ) ,
role : "menu" ,
menuId : $props . menuId ,
focusedItemId : $props . focusedItemId ,
items : processedItem . items ,
templates : $props . templates ,
activeItemPath : $props . activeItemPath ,
level : $props . level + 1 ,
visible : $options . isItemActive ( processedItem ) && $options . isItemGroup ( processedItem ) ,
pt : _ctx . pt ,
unstyled : _ctx . unstyled ,
onItemClick : _cache [ 0 ] || ( _cache [ 0 ] = function ( $event ) {
return _ctx . $emit ( "item-click" , $event ) ;
} ) ,
onItemMouseenter : _cache [ 1 ] || ( _cache [ 1 ] = function ( $event ) {
return _ctx . $emit ( "item-mouseenter" , $event ) ;
} ) ,
onItemMousemove : _cache [ 2 ] || ( _cache [ 2 ] = function ( $event ) {
return _ctx . $emit ( "item-mousemove" , $event ) ;
2025-01-31 18:07:37 +00:00
} ) ,
ref _for : true
} , _ctx . ptm ( "submenu" ) ) , null , 16 , [ "id" , "class" , "style" , "aria-labelledby" , "menuId" , "focusedItemId" , "items" , "templates" , "activeItemPath" , "level" , "visible" , "pt" , "unstyled" ] ) ) : createCommentVNode ( "" , true ) ] , 16 , _hoisted _2$1 ) ) : createCommentVNode ( "" , true ) , $options . isItemVisible ( processedItem ) && $options . getItemProp ( processedItem , "separator" ) ? ( openBlock ( ) , createElementBlock ( "li" , mergeProps ( {
2024-10-28 18:29:38 +00:00
key : 1 ,
id : $options . getItemId ( processedItem ) ,
style : $options . getItemProp ( processedItem , "style" ) ,
"class" : [ _ctx . cx ( "separator" ) , $options . getItemProp ( processedItem , "class" ) ] ,
role : "separator" ,
ref _for : true
} , _ctx . ptm ( "separator" ) ) , null , 16 , _hoisted _6 ) ) : createCommentVNode ( "" , true ) ] , 64 ) ;
2025-01-31 18:07:37 +00:00
} ) , 128 ) ) ] , 8 , _hoisted _1$1$1 ) ) : createCommentVNode ( "" , true ) ] ;
2024-10-28 18:29:38 +00:00
} ) ,
_ : 1
} , 16 , [ "onEnter" ] ) ;
}
2024-10-29 18:14:06 +00:00
_ _name ( render$1$1 , "render$1$1" ) ;
2025-01-02 21:18:54 +00:00
script$1$2 . render = render$1$1 ;
var script$4 = {
2024-10-28 18:29:38 +00:00
name : "TieredMenu" ,
2025-01-02 21:18:54 +00:00
"extends" : script$2$1 ,
2024-10-28 18:29:38 +00:00
inheritAttrs : false ,
emits : [ "focus" , "blur" , "before-show" , "before-hide" , "hide" , "show" ] ,
outsideClickListener : null ,
2025-01-31 18:07:37 +00:00
matchMediaListener : null ,
2024-10-28 18:29:38 +00:00
scrollHandler : null ,
resizeListener : null ,
target : null ,
container : null ,
menubar : null ,
searchTimeout : null ,
searchValue : null ,
2025-02-15 09:32:47 +00:00
data : /* @__PURE__ */ _ _name ( function data5 ( ) {
2024-10-28 18:29:38 +00:00
return {
id : this . $attrs . id ,
focused : false ,
focusedItemInfo : {
index : - 1 ,
level : 0 ,
parentKey : ""
} ,
activeItemPath : [ ] ,
visible : ! this . popup ,
submenuVisible : false ,
2025-01-31 18:07:37 +00:00
dirty : false ,
query : null ,
queryMatches : false
2024-10-28 18:29:38 +00:00
} ;
} , "data" ) ,
watch : {
2025-01-02 21:18:54 +00:00
"$attrs.id" : /* @__PURE__ */ _ _name ( function $attrsId2 ( newValue ) {
2024-10-28 18:29:38 +00:00
this . id = newValue || UniqueComponentId ( ) ;
} , "$attrsId" ) ,
2025-01-02 21:18:54 +00:00
activeItemPath : /* @__PURE__ */ _ _name ( function activeItemPath ( newPath ) {
2024-10-28 18:29:38 +00:00
if ( ! this . popup ) {
if ( isNotEmpty ( newPath ) ) {
this . bindOutsideClickListener ( ) ;
this . bindResizeListener ( ) ;
} else {
this . unbindOutsideClickListener ( ) ;
this . unbindResizeListener ( ) ;
}
}
} , "activeItemPath" )
} ,
2025-02-15 09:32:47 +00:00
mounted : /* @__PURE__ */ _ _name ( function mounted4 ( ) {
2024-10-28 18:29:38 +00:00
this . id = this . id || UniqueComponentId ( ) ;
2025-01-31 18:07:37 +00:00
this . bindMatchMediaListener ( ) ;
2024-10-28 18:29:38 +00:00
} , "mounted" ) ,
2025-02-15 09:32:47 +00:00
beforeUnmount : /* @__PURE__ */ _ _name ( function beforeUnmount4 ( ) {
2024-10-28 18:29:38 +00:00
this . unbindOutsideClickListener ( ) ;
this . unbindResizeListener ( ) ;
2025-01-31 18:07:37 +00:00
this . unbindMatchMediaListener ( ) ;
2024-10-28 18:29:38 +00:00
if ( this . scrollHandler ) {
this . scrollHandler . destroy ( ) ;
this . scrollHandler = null ;
}
if ( this . container && this . autoZIndex ) {
ZIndex . clear ( this . container ) ;
}
this . target = null ;
this . container = null ;
} , "beforeUnmount" ) ,
methods : {
2025-01-02 21:18:54 +00:00
getItemProp : /* @__PURE__ */ _ _name ( function getItemProp2 ( item3 , name ) {
2024-10-28 18:29:38 +00:00
return item3 ? resolve ( item3 [ name ] ) : void 0 ;
} , "getItemProp" ) ,
2025-01-02 21:18:54 +00:00
getItemLabel : /* @__PURE__ */ _ _name ( function getItemLabel2 ( item3 ) {
2024-10-28 18:29:38 +00:00
return this . getItemProp ( item3 , "label" ) ;
} , "getItemLabel" ) ,
2025-01-02 21:18:54 +00:00
isItemDisabled : /* @__PURE__ */ _ _name ( function isItemDisabled2 ( item3 ) {
2024-10-28 18:29:38 +00:00
return this . getItemProp ( item3 , "disabled" ) ;
} , "isItemDisabled" ) ,
2025-01-02 21:18:54 +00:00
isItemVisible : /* @__PURE__ */ _ _name ( function isItemVisible2 ( item3 ) {
2024-10-28 18:29:38 +00:00
return this . getItemProp ( item3 , "visible" ) !== false ;
} , "isItemVisible" ) ,
2025-01-02 21:18:54 +00:00
isItemGroup : /* @__PURE__ */ _ _name ( function isItemGroup2 ( item3 ) {
2024-10-28 18:29:38 +00:00
return isNotEmpty ( this . getItemProp ( item3 , "items" ) ) ;
} , "isItemGroup" ) ,
2025-01-02 21:18:54 +00:00
isItemSeparator : /* @__PURE__ */ _ _name ( function isItemSeparator ( item3 ) {
2024-10-28 18:29:38 +00:00
return this . getItemProp ( item3 , "separator" ) ;
} , "isItemSeparator" ) ,
2025-01-02 21:18:54 +00:00
getProccessedItemLabel : /* @__PURE__ */ _ _name ( function getProccessedItemLabel ( processedItem ) {
2024-10-28 18:29:38 +00:00
return processedItem ? this . getItemLabel ( processedItem . item ) : void 0 ;
} , "getProccessedItemLabel" ) ,
2025-01-02 21:18:54 +00:00
isProccessedItemGroup : /* @__PURE__ */ _ _name ( function isProccessedItemGroup ( processedItem ) {
2024-10-28 18:29:38 +00:00
return processedItem && isNotEmpty ( processedItem . items ) ;
} , "isProccessedItemGroup" ) ,
2025-01-02 21:18:54 +00:00
toggle : /* @__PURE__ */ _ _name ( function toggle ( event ) {
2024-10-28 18:29:38 +00:00
this . visible ? this . hide ( event , true ) : this . show ( event ) ;
} , "toggle" ) ,
2025-01-02 21:18:54 +00:00
show : /* @__PURE__ */ _ _name ( function show2 ( event , isFocus ) {
2024-10-28 18:29:38 +00:00
if ( this . popup ) {
this . $emit ( "before-show" ) ;
this . visible = true ;
this . target = this . target || event . currentTarget ;
this . relatedTarget = event . relatedTarget || null ;
}
isFocus && focus ( this . menubar ) ;
} , "show" ) ,
2025-01-02 21:18:54 +00:00
hide : /* @__PURE__ */ _ _name ( function hide2 ( event , isFocus ) {
2024-10-28 18:29:38 +00:00
if ( this . popup ) {
this . $emit ( "before-hide" ) ;
this . visible = false ;
}
this . activeItemPath = [ ] ;
this . focusedItemInfo = {
index : - 1 ,
level : 0 ,
parentKey : ""
} ;
isFocus && focus ( this . relatedTarget || this . target || this . menubar ) ;
this . dirty = false ;
} , "hide" ) ,
2025-01-02 21:18:54 +00:00
onFocus : /* @__PURE__ */ _ _name ( function onFocus3 ( event ) {
2024-10-28 18:29:38 +00:00
this . focused = true ;
if ( ! this . popup ) {
this . focusedItemInfo = this . focusedItemInfo . index !== - 1 ? this . focusedItemInfo : {
index : this . findFirstFocusedItemIndex ( ) ,
level : 0 ,
parentKey : ""
} ;
}
this . $emit ( "focus" , event ) ;
} , "onFocus" ) ,
2025-01-02 21:18:54 +00:00
onBlur : /* @__PURE__ */ _ _name ( function onBlur2 ( event ) {
2024-10-28 18:29:38 +00:00
this . focused = false ;
this . focusedItemInfo = {
index : - 1 ,
level : 0 ,
parentKey : ""
} ;
this . searchValue = "" ;
this . dirty = false ;
this . $emit ( "blur" , event ) ;
} , "onBlur" ) ,
2025-01-02 21:18:54 +00:00
onKeyDown : /* @__PURE__ */ _ _name ( function onKeyDown2 ( event ) {
2024-10-28 18:29:38 +00:00
if ( this . disabled ) {
event . preventDefault ( ) ;
return ;
}
var metaKey = event . metaKey || event . ctrlKey ;
switch ( event . code ) {
case "ArrowDown" :
this . onArrowDownKey ( event ) ;
break ;
case "ArrowUp" :
this . onArrowUpKey ( event ) ;
break ;
case "ArrowLeft" :
this . onArrowLeftKey ( event ) ;
break ;
case "ArrowRight" :
this . onArrowRightKey ( event ) ;
break ;
case "Home" :
this . onHomeKey ( event ) ;
break ;
case "End" :
this . onEndKey ( event ) ;
break ;
case "Space" :
this . onSpaceKey ( event ) ;
break ;
case "Enter" :
case "NumpadEnter" :
this . onEnterKey ( event ) ;
break ;
case "Escape" :
this . onEscapeKey ( event ) ;
break ;
case "Tab" :
this . onTabKey ( event ) ;
break ;
case "PageDown" :
case "PageUp" :
case "Backspace" :
case "ShiftLeft" :
case "ShiftRight" :
break ;
default :
if ( ! metaKey && isPrintableCharacter ( event . key ) ) {
this . searchItems ( event , event . key ) ;
}
break ;
}
} , "onKeyDown" ) ,
2025-01-31 18:07:37 +00:00
onItemChange : /* @__PURE__ */ _ _name ( function onItemChange ( event , type ) {
2024-10-28 18:29:38 +00:00
var processedItem = event . processedItem , isFocus = event . isFocus ;
if ( isEmpty ( processedItem ) ) return ;
var index = processedItem . index , key = processedItem . key , level = processedItem . level , parentKey = processedItem . parentKey , items = processedItem . items ;
var grouped = isNotEmpty ( items ) ;
var activeItemPath3 = this . activeItemPath . filter ( function ( p ) {
return p . parentKey !== parentKey && p . parentKey !== key ;
} ) ;
if ( grouped ) {
activeItemPath3 . push ( processedItem ) ;
this . submenuVisible = true ;
}
this . focusedItemInfo = {
index ,
level ,
parentKey
} ;
grouped && ( this . dirty = true ) ;
isFocus && focus ( this . menubar ) ;
2025-01-31 18:07:37 +00:00
if ( type === "hover" && this . queryMatches ) {
return ;
}
this . activeItemPath = activeItemPath3 ;
2024-10-28 18:29:38 +00:00
} , "onItemChange" ) ,
onOverlayClick : /* @__PURE__ */ _ _name ( function onOverlayClick2 ( event ) {
OverlayEventBus . emit ( "overlay-click" , {
originalEvent : event ,
target : this . target
} ) ;
} , "onOverlayClick" ) ,
2025-01-02 21:18:54 +00:00
onItemClick : /* @__PURE__ */ _ _name ( function onItemClick2 ( event ) {
2024-10-28 18:29:38 +00:00
var originalEvent = event . originalEvent , processedItem = event . processedItem ;
var grouped = this . isProccessedItemGroup ( processedItem ) ;
2025-02-15 09:32:47 +00:00
var root9 = isEmpty ( processedItem . parent ) ;
2024-10-28 18:29:38 +00:00
var selected = this . isSelected ( processedItem ) ;
if ( selected ) {
var index = processedItem . index , key = processedItem . key , level = processedItem . level , parentKey = processedItem . parentKey ;
this . activeItemPath = this . activeItemPath . filter ( function ( p ) {
return key !== p . key && key . startsWith ( p . key ) ;
} ) ;
this . focusedItemInfo = {
index ,
level ,
parentKey
} ;
2025-02-15 09:32:47 +00:00
this . dirty = ! root9 ;
2024-10-28 18:29:38 +00:00
focus ( this . menubar ) ;
} else {
if ( grouped ) {
this . onItemChange ( event ) ;
} else {
2025-02-15 09:32:47 +00:00
var rootProcessedItem = root9 ? processedItem : this . activeItemPath . find ( function ( p ) {
2024-10-28 18:29:38 +00:00
return p . parentKey === "" ;
} ) ;
this . hide ( originalEvent ) ;
this . changeFocusedItemIndex ( originalEvent , rootProcessedItem ? rootProcessedItem . index : - 1 ) ;
focus ( this . menubar ) ;
}
}
} , "onItemClick" ) ,
2025-01-02 21:18:54 +00:00
onItemMouseEnter : /* @__PURE__ */ _ _name ( function onItemMouseEnter2 ( event ) {
2024-10-28 18:29:38 +00:00
if ( this . dirty ) {
2025-01-31 18:07:37 +00:00
this . onItemChange ( event , "hover" ) ;
2024-10-28 18:29:38 +00:00
}
} , "onItemMouseEnter" ) ,
2025-01-02 21:18:54 +00:00
onItemMouseMove : /* @__PURE__ */ _ _name ( function onItemMouseMove2 ( event ) {
2024-10-28 18:29:38 +00:00
if ( this . focused ) {
this . changeFocusedItemIndex ( event , event . processedItem . index ) ;
}
} , "onItemMouseMove" ) ,
2025-01-02 21:18:54 +00:00
onArrowDownKey : /* @__PURE__ */ _ _name ( function onArrowDownKey2 ( event ) {
2024-10-28 18:29:38 +00:00
var itemIndex = this . focusedItemInfo . index !== - 1 ? this . findNextItemIndex ( this . focusedItemInfo . index ) : this . findFirstFocusedItemIndex ( ) ;
this . changeFocusedItemIndex ( event , itemIndex ) ;
event . preventDefault ( ) ;
} , "onArrowDownKey" ) ,
2025-01-02 21:18:54 +00:00
onArrowUpKey : /* @__PURE__ */ _ _name ( function onArrowUpKey2 ( event ) {
2024-10-28 18:29:38 +00:00
if ( event . altKey ) {
if ( this . focusedItemInfo . index !== - 1 ) {
var processedItem = this . visibleItems [ this . focusedItemInfo . index ] ;
var grouped = this . isProccessedItemGroup ( processedItem ) ;
! grouped && this . onItemChange ( {
originalEvent : event ,
processedItem
} ) ;
}
this . popup && this . hide ( event , true ) ;
event . preventDefault ( ) ;
} else {
var itemIndex = this . focusedItemInfo . index !== - 1 ? this . findPrevItemIndex ( this . focusedItemInfo . index ) : this . findLastFocusedItemIndex ( ) ;
this . changeFocusedItemIndex ( event , itemIndex ) ;
event . preventDefault ( ) ;
}
} , "onArrowUpKey" ) ,
2025-01-02 21:18:54 +00:00
onArrowLeftKey : /* @__PURE__ */ _ _name ( function onArrowLeftKey3 ( event ) {
2024-10-28 18:29:38 +00:00
var _this = this ;
var processedItem = this . visibleItems [ this . focusedItemInfo . index ] ;
var parentItem = this . activeItemPath . find ( function ( p ) {
return p . key === processedItem . parentKey ;
} ) ;
2025-02-15 09:32:47 +00:00
var root9 = isEmpty ( processedItem . parent ) ;
if ( ! root9 ) {
2024-10-28 18:29:38 +00:00
this . focusedItemInfo = {
index : - 1 ,
parentKey : parentItem ? parentItem . parentKey : ""
} ;
this . searchValue = "" ;
this . onArrowDownKey ( event ) ;
}
this . activeItemPath = this . activeItemPath . filter ( function ( p ) {
return p . parentKey !== _this . focusedItemInfo . parentKey ;
} ) ;
event . preventDefault ( ) ;
} , "onArrowLeftKey" ) ,
2025-01-02 21:18:54 +00:00
onArrowRightKey : /* @__PURE__ */ _ _name ( function onArrowRightKey3 ( event ) {
2024-10-28 18:29:38 +00:00
var processedItem = this . visibleItems [ this . focusedItemInfo . index ] ;
var grouped = this . isProccessedItemGroup ( processedItem ) ;
if ( grouped ) {
this . onItemChange ( {
originalEvent : event ,
processedItem
} ) ;
this . focusedItemInfo = {
index : - 1 ,
parentKey : processedItem . key
} ;
this . searchValue = "" ;
this . onArrowDownKey ( event ) ;
}
event . preventDefault ( ) ;
} , "onArrowRightKey" ) ,
2025-01-02 21:18:54 +00:00
onHomeKey : /* @__PURE__ */ _ _name ( function onHomeKey3 ( event ) {
2024-10-28 18:29:38 +00:00
this . changeFocusedItemIndex ( event , this . findFirstItemIndex ( ) ) ;
event . preventDefault ( ) ;
} , "onHomeKey" ) ,
2025-01-02 21:18:54 +00:00
onEndKey : /* @__PURE__ */ _ _name ( function onEndKey3 ( event ) {
2024-10-28 18:29:38 +00:00
this . changeFocusedItemIndex ( event , this . findLastItemIndex ( ) ) ;
event . preventDefault ( ) ;
} , "onEndKey" ) ,
2025-01-02 21:18:54 +00:00
onEnterKey : /* @__PURE__ */ _ _name ( function onEnterKey3 ( event ) {
2024-10-28 18:29:38 +00:00
if ( this . focusedItemInfo . index !== - 1 ) {
var element = findSingle ( this . menubar , 'li[id="' . concat ( "" . concat ( this . focusedItemId ) , '"]' ) ) ;
var anchorElement = element && findSingle ( element , '[data-pc-section="itemlink"]' ) ;
anchorElement ? anchorElement . click ( ) : element && element . click ( ) ;
if ( ! this . popup ) {
var processedItem = this . visibleItems [ this . focusedItemInfo . index ] ;
var grouped = this . isProccessedItemGroup ( processedItem ) ;
! grouped && ( this . focusedItemInfo . index = this . findFirstFocusedItemIndex ( ) ) ;
}
}
event . preventDefault ( ) ;
} , "onEnterKey" ) ,
2025-01-02 21:18:54 +00:00
onSpaceKey : /* @__PURE__ */ _ _name ( function onSpaceKey ( event ) {
2024-10-28 18:29:38 +00:00
this . onEnterKey ( event ) ;
} , "onSpaceKey" ) ,
2025-01-02 21:18:54 +00:00
onEscapeKey : /* @__PURE__ */ _ _name ( function onEscapeKey2 ( event ) {
2024-10-28 18:29:38 +00:00
if ( this . popup || this . focusedItemInfo . level !== 0 ) {
var _focusedItemInfo = this . focusedItemInfo ;
this . hide ( event , false ) ;
this . focusedItemInfo = {
index : Number ( _focusedItemInfo . parentKey . split ( "_" ) [ 0 ] ) ,
level : 0 ,
parentKey : ""
} ;
this . popup && focus ( this . target ) ;
}
event . preventDefault ( ) ;
} , "onEscapeKey" ) ,
2025-01-02 21:18:54 +00:00
onTabKey : /* @__PURE__ */ _ _name ( function onTabKey2 ( event ) {
2024-10-28 18:29:38 +00:00
if ( this . focusedItemInfo . index !== - 1 ) {
var processedItem = this . visibleItems [ this . focusedItemInfo . index ] ;
var grouped = this . isProccessedItemGroup ( processedItem ) ;
! grouped && this . onItemChange ( {
originalEvent : event ,
processedItem
} ) ;
}
this . hide ( ) ;
} , "onTabKey" ) ,
2025-02-15 09:32:47 +00:00
onEnter : /* @__PURE__ */ _ _name ( function onEnter2 ( el ) {
2024-10-28 18:29:38 +00:00
if ( this . autoZIndex ) {
ZIndex . set ( "menu" , el , this . baseZIndex + this . $primevue . config . zIndex . menu ) ;
}
addStyle ( el , {
position : "absolute" ,
top : "0" ,
left : "0"
} ) ;
this . alignOverlay ( ) ;
focus ( this . menubar ) ;
this . scrollInView ( ) ;
} , "onEnter" ) ,
onAfterEnter : /* @__PURE__ */ _ _name ( function onAfterEnter ( ) {
this . bindOutsideClickListener ( ) ;
this . bindScrollListener ( ) ;
this . bindResizeListener ( ) ;
this . $emit ( "show" ) ;
} , "onAfterEnter" ) ,
2025-02-15 09:32:47 +00:00
onLeave : /* @__PURE__ */ _ _name ( function onLeave ( ) {
2024-10-28 18:29:38 +00:00
this . unbindOutsideClickListener ( ) ;
this . unbindScrollListener ( ) ;
this . unbindResizeListener ( ) ;
this . $emit ( "hide" ) ;
this . container = null ;
this . dirty = false ;
} , "onLeave" ) ,
onAfterLeave : /* @__PURE__ */ _ _name ( function onAfterLeave ( el ) {
if ( this . autoZIndex ) {
ZIndex . clear ( el ) ;
}
} , "onAfterLeave" ) ,
alignOverlay : /* @__PURE__ */ _ _name ( function alignOverlay2 ( ) {
absolutePosition ( this . container , this . target ) ;
var targetWidth = getOuterWidth ( this . target ) ;
if ( targetWidth > getOuterWidth ( this . container ) ) {
this . container . style . minWidth = getOuterWidth ( this . target ) + "px" ;
}
} , "alignOverlay" ) ,
2025-01-02 21:18:54 +00:00
bindOutsideClickListener : /* @__PURE__ */ _ _name ( function bindOutsideClickListener2 ( ) {
2024-10-28 18:29:38 +00:00
var _this2 = this ;
if ( ! this . outsideClickListener ) {
this . outsideClickListener = function ( event ) {
var isOutsideContainer = _this2 . container && ! _this2 . container . contains ( event . target ) ;
var isOutsideTarget = _this2 . popup ? ! ( _this2 . target && ( _this2 . target === event . target || _this2 . target . contains ( event . target ) ) ) : true ;
if ( isOutsideContainer && isOutsideTarget ) {
_this2 . hide ( ) ;
}
} ;
document . addEventListener ( "click" , this . outsideClickListener ) ;
}
} , "bindOutsideClickListener" ) ,
2025-01-02 21:18:54 +00:00
unbindOutsideClickListener : /* @__PURE__ */ _ _name ( function unbindOutsideClickListener2 ( ) {
2024-10-28 18:29:38 +00:00
if ( this . outsideClickListener ) {
document . removeEventListener ( "click" , this . outsideClickListener ) ;
this . outsideClickListener = null ;
}
} , "unbindOutsideClickListener" ) ,
bindScrollListener : /* @__PURE__ */ _ _name ( function bindScrollListener2 ( ) {
var _this3 = this ;
if ( ! this . scrollHandler ) {
this . scrollHandler = new ConnectedOverlayScrollHandler ( this . target , function ( event ) {
_this3 . hide ( event , true ) ;
} ) ;
}
this . scrollHandler . bindScrollListener ( ) ;
} , "bindScrollListener" ) ,
unbindScrollListener : /* @__PURE__ */ _ _name ( function unbindScrollListener2 ( ) {
if ( this . scrollHandler ) {
this . scrollHandler . unbindScrollListener ( ) ;
}
} , "unbindScrollListener" ) ,
2025-01-02 21:18:54 +00:00
bindResizeListener : /* @__PURE__ */ _ _name ( function bindResizeListener2 ( ) {
2024-10-28 18:29:38 +00:00
var _this4 = this ;
if ( ! this . resizeListener ) {
this . resizeListener = function ( event ) {
if ( ! isTouchDevice ( ) ) {
_this4 . hide ( event , true ) ;
}
} ;
2025-01-02 21:18:54 +00:00
window . addEventListener ( "resize" , this . resizeListener ) ;
}
} , "bindResizeListener" ) ,
unbindResizeListener : /* @__PURE__ */ _ _name ( function unbindResizeListener2 ( ) {
if ( this . resizeListener ) {
window . removeEventListener ( "resize" , this . resizeListener ) ;
this . resizeListener = null ;
}
} , "unbindResizeListener" ) ,
2025-01-31 18:07:37 +00:00
bindMatchMediaListener : /* @__PURE__ */ _ _name ( function bindMatchMediaListener ( ) {
var _this5 = this ;
if ( ! this . matchMediaListener ) {
var query = matchMedia ( "(max-width: " . concat ( this . breakpoint , ")" ) ) ;
this . query = query ;
this . queryMatches = query . matches ;
this . matchMediaListener = function ( ) {
_this5 . queryMatches = query . matches ;
} ;
this . query . addEventListener ( "change" , this . matchMediaListener ) ;
}
} , "bindMatchMediaListener" ) ,
unbindMatchMediaListener : /* @__PURE__ */ _ _name ( function unbindMatchMediaListener ( ) {
if ( this . matchMediaListener ) {
this . query . removeEventListener ( "change" , this . matchMediaListener ) ;
this . matchMediaListener = null ;
}
} , "unbindMatchMediaListener" ) ,
2025-01-02 21:18:54 +00:00
isItemMatched : /* @__PURE__ */ _ _name ( function isItemMatched ( processedItem ) {
var _this$getProccessedIt ;
return this . isValidItem ( processedItem ) && ( ( _this$getProccessedIt = this . getProccessedItemLabel ( processedItem ) ) === null || _this$getProccessedIt === void 0 ? void 0 : _this$getProccessedIt . toLocaleLowerCase ( ) . startsWith ( this . searchValue . toLocaleLowerCase ( ) ) ) ;
} , "isItemMatched" ) ,
isValidItem : /* @__PURE__ */ _ _name ( function isValidItem ( processedItem ) {
return ! ! processedItem && ! this . isItemDisabled ( processedItem . item ) && ! this . isItemSeparator ( processedItem . item ) && this . isItemVisible ( processedItem . item ) ;
} , "isValidItem" ) ,
isValidSelectedItem : /* @__PURE__ */ _ _name ( function isValidSelectedItem ( processedItem ) {
return this . isValidItem ( processedItem ) && this . isSelected ( processedItem ) ;
} , "isValidSelectedItem" ) ,
isSelected : /* @__PURE__ */ _ _name ( function isSelected2 ( processedItem ) {
return this . activeItemPath . some ( function ( p ) {
return p . key === processedItem . key ;
} ) ;
} , "isSelected" ) ,
findFirstItemIndex : /* @__PURE__ */ _ _name ( function findFirstItemIndex ( ) {
2025-01-31 18:07:37 +00:00
var _this6 = this ;
2025-01-02 21:18:54 +00:00
return this . visibleItems . findIndex ( function ( processedItem ) {
2025-01-31 18:07:37 +00:00
return _this6 . isValidItem ( processedItem ) ;
2025-01-02 21:18:54 +00:00
} ) ;
} , "findFirstItemIndex" ) ,
findLastItemIndex : /* @__PURE__ */ _ _name ( function findLastItemIndex ( ) {
2025-01-31 18:07:37 +00:00
var _this7 = this ;
2025-01-02 21:18:54 +00:00
return findLastIndex ( this . visibleItems , function ( processedItem ) {
2025-01-31 18:07:37 +00:00
return _this7 . isValidItem ( processedItem ) ;
2025-01-02 21:18:54 +00:00
} ) ;
} , "findLastItemIndex" ) ,
findNextItemIndex : /* @__PURE__ */ _ _name ( function findNextItemIndex ( index ) {
2025-01-31 18:07:37 +00:00
var _this8 = this ;
2025-01-02 21:18:54 +00:00
var matchedItemIndex = index < this . visibleItems . length - 1 ? this . visibleItems . slice ( index + 1 ) . findIndex ( function ( processedItem ) {
2025-01-31 18:07:37 +00:00
return _this8 . isValidItem ( processedItem ) ;
2025-01-02 21:18:54 +00:00
} ) : - 1 ;
return matchedItemIndex > - 1 ? matchedItemIndex + index + 1 : index ;
} , "findNextItemIndex" ) ,
findPrevItemIndex : /* @__PURE__ */ _ _name ( function findPrevItemIndex ( index ) {
2025-01-31 18:07:37 +00:00
var _this9 = this ;
2025-01-02 21:18:54 +00:00
var matchedItemIndex = index > 0 ? findLastIndex ( this . visibleItems . slice ( 0 , index ) , function ( processedItem ) {
2025-01-31 18:07:37 +00:00
return _this9 . isValidItem ( processedItem ) ;
2025-01-02 21:18:54 +00:00
} ) : - 1 ;
return matchedItemIndex > - 1 ? matchedItemIndex : index ;
} , "findPrevItemIndex" ) ,
findSelectedItemIndex : /* @__PURE__ */ _ _name ( function findSelectedItemIndex ( ) {
2025-01-31 18:07:37 +00:00
var _this10 = this ;
2025-01-02 21:18:54 +00:00
return this . visibleItems . findIndex ( function ( processedItem ) {
2025-01-31 18:07:37 +00:00
return _this10 . isValidSelectedItem ( processedItem ) ;
2025-01-02 21:18:54 +00:00
} ) ;
} , "findSelectedItemIndex" ) ,
findFirstFocusedItemIndex : /* @__PURE__ */ _ _name ( function findFirstFocusedItemIndex ( ) {
var selectedIndex = this . findSelectedItemIndex ( ) ;
return selectedIndex < 0 ? this . findFirstItemIndex ( ) : selectedIndex ;
} , "findFirstFocusedItemIndex" ) ,
findLastFocusedItemIndex : /* @__PURE__ */ _ _name ( function findLastFocusedItemIndex ( ) {
var selectedIndex = this . findSelectedItemIndex ( ) ;
return selectedIndex < 0 ? this . findLastItemIndex ( ) : selectedIndex ;
} , "findLastFocusedItemIndex" ) ,
searchItems : /* @__PURE__ */ _ _name ( function searchItems ( event , _char ) {
2025-01-31 18:07:37 +00:00
var _this11 = this ;
2025-01-02 21:18:54 +00:00
this . searchValue = ( this . searchValue || "" ) + _char ;
var itemIndex = - 1 ;
var matched = false ;
if ( this . focusedItemInfo . index !== - 1 ) {
itemIndex = this . visibleItems . slice ( this . focusedItemInfo . index ) . findIndex ( function ( processedItem ) {
2025-01-31 18:07:37 +00:00
return _this11 . isItemMatched ( processedItem ) ;
2025-01-02 21:18:54 +00:00
} ) ;
itemIndex = itemIndex === - 1 ? this . visibleItems . slice ( 0 , this . focusedItemInfo . index ) . findIndex ( function ( processedItem ) {
2025-01-31 18:07:37 +00:00
return _this11 . isItemMatched ( processedItem ) ;
2025-01-02 21:18:54 +00:00
} ) : itemIndex + this . focusedItemInfo . index ;
} else {
itemIndex = this . visibleItems . findIndex ( function ( processedItem ) {
2025-01-31 18:07:37 +00:00
return _this11 . isItemMatched ( processedItem ) ;
2025-01-02 21:18:54 +00:00
} ) ;
}
if ( itemIndex !== - 1 ) {
matched = true ;
}
if ( itemIndex === - 1 && this . focusedItemInfo . index === - 1 ) {
itemIndex = this . findFirstFocusedItemIndex ( ) ;
}
if ( itemIndex !== - 1 ) {
this . changeFocusedItemIndex ( event , itemIndex ) ;
}
if ( this . searchTimeout ) {
clearTimeout ( this . searchTimeout ) ;
}
this . searchTimeout = setTimeout ( function ( ) {
2025-01-31 18:07:37 +00:00
_this11 . searchValue = "" ;
_this11 . searchTimeout = null ;
2025-01-02 21:18:54 +00:00
} , 500 ) ;
return matched ;
} , "searchItems" ) ,
changeFocusedItemIndex : /* @__PURE__ */ _ _name ( function changeFocusedItemIndex ( event , index ) {
if ( this . focusedItemInfo . index !== index ) {
this . focusedItemInfo . index = index ;
this . scrollInView ( ) ;
}
} , "changeFocusedItemIndex" ) ,
scrollInView : /* @__PURE__ */ _ _name ( function scrollInView3 ( ) {
var index = arguments . length > 0 && arguments [ 0 ] !== void 0 ? arguments [ 0 ] : - 1 ;
var id2 = index !== - 1 ? "" . concat ( this . id , "_" ) . concat ( index ) : this . focusedItemId ;
var element = findSingle ( this . menubar , 'li[id="' . concat ( id2 , '"]' ) ) ;
if ( element ) {
element . scrollIntoView && element . scrollIntoView ( {
block : "nearest" ,
inline : "start"
} ) ;
}
} , "scrollInView" ) ,
createProcessedItems : /* @__PURE__ */ _ _name ( function createProcessedItems ( items ) {
2025-01-31 18:07:37 +00:00
var _this12 = this ;
2025-01-02 21:18:54 +00:00
var level = arguments . length > 1 && arguments [ 1 ] !== void 0 ? arguments [ 1 ] : 0 ;
var parent = arguments . length > 2 && arguments [ 2 ] !== void 0 ? arguments [ 2 ] : { } ;
var parentKey = arguments . length > 3 && arguments [ 3 ] !== void 0 ? arguments [ 3 ] : "" ;
var processedItems3 = [ ] ;
items && items . forEach ( function ( item3 , index ) {
var key = ( parentKey !== "" ? parentKey + "_" : "" ) + index ;
var newItem = {
item : item3 ,
index ,
level ,
key ,
parent ,
parentKey
} ;
2025-01-31 18:07:37 +00:00
newItem [ "items" ] = _this12 . createProcessedItems ( item3 . items , level + 1 , newItem , key ) ;
2025-01-02 21:18:54 +00:00
processedItems3 . push ( newItem ) ;
} ) ;
return processedItems3 ;
} , "createProcessedItems" ) ,
containerRef : /* @__PURE__ */ _ _name ( function containerRef2 ( el ) {
this . container = el ;
} , "containerRef" ) ,
menubarRef : /* @__PURE__ */ _ _name ( function menubarRef ( el ) {
this . menubar = el ? el . $el : void 0 ;
} , "menubarRef" )
} ,
computed : {
processedItems : /* @__PURE__ */ _ _name ( function processedItems ( ) {
return this . createProcessedItems ( this . model || [ ] ) ;
} , "processedItems" ) ,
visibleItems : /* @__PURE__ */ _ _name ( function visibleItems ( ) {
2025-01-31 18:07:37 +00:00
var _this13 = this ;
2025-01-02 21:18:54 +00:00
var processedItem = this . activeItemPath . find ( function ( p ) {
2025-01-31 18:07:37 +00:00
return p . key === _this13 . focusedItemInfo . parentKey ;
2025-01-02 21:18:54 +00:00
} ) ;
return processedItem ? processedItem . items : this . processedItems ;
} , "visibleItems" ) ,
focusedItemId : /* @__PURE__ */ _ _name ( function focusedItemId ( ) {
return this . focusedItemInfo . index !== - 1 ? "" . concat ( this . id ) . concat ( isNotEmpty ( this . focusedItemInfo . parentKey ) ? "_" + this . focusedItemInfo . parentKey : "" , "_" ) . concat ( this . focusedItemInfo . index ) : null ;
} , "focusedItemId" )
} ,
components : {
TieredMenuSub : script$1$2 ,
2025-02-15 09:32:47 +00:00
Portal : script$i
2025-01-02 21:18:54 +00:00
}
} ;
2025-01-31 18:07:37 +00:00
var _hoisted _1$3 = [ "id" ] ;
function render$3 ( _ctx , _cache , $props , $setup , $data , $options ) {
2025-01-02 21:18:54 +00:00
var _component _TieredMenuSub = resolveComponent ( "TieredMenuSub" ) ;
var _component _Portal = resolveComponent ( "Portal" ) ;
return openBlock ( ) , createBlock ( _component _Portal , {
appendTo : _ctx . appendTo ,
disabled : ! _ctx . popup
} , {
"default" : withCtx ( function ( ) {
return [ createVNode ( Transition , mergeProps ( {
name : "p-connected-overlay" ,
onEnter : $options . onEnter ,
onAfterEnter : $options . onAfterEnter ,
onLeave : $options . onLeave ,
onAfterLeave : $options . onAfterLeave
} , _ctx . ptm ( "transition" ) ) , {
"default" : withCtx ( function ( ) {
return [ $data . visible ? ( openBlock ( ) , createElementBlock ( "div" , mergeProps ( {
key : 0 ,
ref : $options . containerRef ,
id : $data . id ,
"class" : _ctx . cx ( "root" ) ,
onClick : _cache [ 0 ] || ( _cache [ 0 ] = function ( ) {
return $options . onOverlayClick && $options . onOverlayClick . apply ( $options , arguments ) ;
} )
} , _ctx . ptmi ( "root" ) ) , [ _ctx . $slots . start ? ( openBlock ( ) , createElementBlock ( "div" , mergeProps ( {
key : 0 ,
"class" : _ctx . cx ( "start" )
2025-01-31 18:07:37 +00:00
} , _ctx . ptm ( "start" ) ) , [ renderSlot ( _ctx . $slots , "start" ) ] , 16 ) ) : createCommentVNode ( "" , true ) , createVNode ( _component _TieredMenuSub , mergeProps ( {
2025-01-02 21:18:54 +00:00
ref : $options . menubarRef ,
id : $data . id + "_list" ,
2025-01-31 18:07:37 +00:00
"class" : _ctx . cx ( "rootList" ) ,
2025-01-02 21:18:54 +00:00
tabindex : ! _ctx . disabled ? _ctx . tabindex : - 1 ,
role : "menubar" ,
"aria-label" : _ctx . ariaLabel ,
"aria-labelledby" : _ctx . ariaLabelledby ,
"aria-disabled" : _ctx . disabled || void 0 ,
"aria-orientation" : "vertical" ,
"aria-activedescendant" : $data . focused ? $options . focusedItemId : void 0 ,
menuId : $data . id ,
focusedItemId : $data . focused ? $options . focusedItemId : void 0 ,
items : $options . processedItems ,
templates : _ctx . $slots ,
activeItemPath : $data . activeItemPath ,
level : 0 ,
visible : $data . submenuVisible ,
pt : _ctx . pt ,
unstyled : _ctx . unstyled ,
onFocus : $options . onFocus ,
onBlur : $options . onBlur ,
onKeydown : $options . onKeyDown ,
onItemClick : $options . onItemClick ,
onItemMouseenter : $options . onItemMouseEnter ,
onItemMousemove : $options . onItemMouseMove
2025-01-31 18:07:37 +00:00
} , _ctx . ptm ( "rootList" ) ) , null , 16 , [ "id" , "class" , "tabindex" , "aria-label" , "aria-labelledby" , "aria-disabled" , "aria-activedescendant" , "menuId" , "focusedItemId" , "items" , "templates" , "activeItemPath" , "visible" , "pt" , "unstyled" , "onFocus" , "onBlur" , "onKeydown" , "onItemClick" , "onItemMouseenter" , "onItemMousemove" ] ) , _ctx . $slots . end ? ( openBlock ( ) , createElementBlock ( "div" , mergeProps ( {
2025-01-02 21:18:54 +00:00
key : 1 ,
"class" : _ctx . cx ( "end" )
2025-01-31 18:07:37 +00:00
} , _ctx . ptm ( "end" ) ) , [ renderSlot ( _ctx . $slots , "end" ) ] , 16 ) ) : createCommentVNode ( "" , true ) ] , 16 , _hoisted _1$3 ) ) : createCommentVNode ( "" , true ) ] ;
2025-01-02 21:18:54 +00:00
} ) ,
_ : 3
} , 16 , [ "onEnter" , "onAfterEnter" , "onLeave" , "onAfterLeave" ] ) ] ;
} ) ,
_ : 3
} , 8 , [ "appendTo" , "disabled" ] ) ;
}
2025-01-31 18:07:37 +00:00
_ _name ( render$3 , "render$3" ) ;
script$4 . render = render$3 ;
2025-02-15 09:32:47 +00:00
var theme$1 = /* @__PURE__ */ _ _name ( function theme6 ( _ref ) {
2025-01-02 21:18:54 +00:00
var dt = _ref . dt ;
2025-01-31 18:07:37 +00:00
return "\n.p-splitbutton {\n display: inline-flex;\n position: relative;\n border-radius: " . concat ( dt ( "splitbutton.border.radius" ) , ";\n}\n\n.p-splitbutton-button {\n border-start-end-radius: 0;\n border-end-end-radius: 0;\n border-inline-end: 0 none;\n}\n\n.p-splitbutton-button:focus-visible,\n.p-splitbutton-dropdown:focus-visible {\n z-index: 1;\n}\n\n.p-splitbutton-button:not(:disabled):hover,\n.p-splitbutton-button:not(:disabled):active {\n border-inline-end: 0 none;\n}\n\n.p-splitbutton-dropdown {\n border-start-start-radius: 0;\n border-end-start-radius: 0;\n}\n\n.p-splitbutton .p-menu {\n min-width: 100%;\n}\n\n.p-splitbutton-fluid {\n display: flex;\n}\n\n.p-splitbutton-rounded .p-splitbutton-dropdown {\n border-start-end-radius: " ) . concat ( dt ( "splitbutton.rounded.border.radius" ) , ";\n border-end-end-radius: " ) . concat ( dt ( "splitbutton.rounded.border.radius" ) , ";\n}\n\n.p-splitbutton-rounded .p-splitbutton-button {\n border-start-start-radius: " ) . concat ( dt ( "splitbutton.rounded.border.radius" ) , ";\n border-end-start-radius: " ) . concat ( dt ( "splitbutton.rounded.border.radius" ) , ";\n}\n\n.p-splitbutton-raised {\n box-shadow: " ) . concat ( dt ( "splitbutton.raised.shadow" ) , ";\n}\n" ) ;
2025-01-02 21:18:54 +00:00
} , "theme" ) ;
var classes$1 = {
2025-02-15 09:32:47 +00:00
root : /* @__PURE__ */ _ _name ( function root7 ( _ref2 ) {
2025-01-02 21:18:54 +00:00
var instance = _ref2 . instance , props = _ref2 . props ;
return [ "p-splitbutton p-component" , {
"p-splitbutton-raised" : props . raised ,
"p-splitbutton-rounded" : props . rounded ,
"p-splitbutton-fluid" : instance . hasFluid
} ] ;
} , "root" ) ,
pcButton : "p-splitbutton-button" ,
pcDropdown : "p-splitbutton-dropdown"
} ;
var SplitButtonStyle = BaseStyle . extend ( {
name : "splitbutton" ,
theme : theme$1 ,
classes : classes$1
} ) ;
var script$1$1 = {
name : "BaseSplitButton" ,
2025-02-15 09:32:47 +00:00
"extends" : script$c ,
2025-01-02 21:18:54 +00:00
props : {
label : {
type : String ,
"default" : null
} ,
icon : {
type : String ,
"default" : null
} ,
model : {
type : Array ,
"default" : null
} ,
autoZIndex : {
type : Boolean ,
"default" : true
} ,
baseZIndex : {
type : Number ,
"default" : 0
} ,
appendTo : {
type : [ String , Object ] ,
"default" : "body"
} ,
disabled : {
type : Boolean ,
"default" : false
} ,
fluid : {
type : Boolean ,
"default" : null
} ,
"class" : {
type : null ,
"default" : null
} ,
style : {
type : null ,
"default" : null
} ,
buttonProps : {
type : null ,
"default" : null
} ,
menuButtonProps : {
type : null ,
"default" : null
} ,
menuButtonIcon : {
type : String ,
"default" : void 0
} ,
dropdownIcon : {
type : String ,
"default" : void 0
} ,
severity : {
type : String ,
"default" : null
} ,
raised : {
type : Boolean ,
"default" : false
} ,
rounded : {
type : Boolean ,
"default" : false
} ,
text : {
type : Boolean ,
"default" : false
} ,
outlined : {
type : Boolean ,
"default" : false
} ,
size : {
type : String ,
"default" : null
} ,
plain : {
type : Boolean ,
"default" : false
}
} ,
style : SplitButtonStyle ,
2025-02-15 09:32:47 +00:00
provide : /* @__PURE__ */ _ _name ( function provide9 ( ) {
2025-01-02 21:18:54 +00:00
return {
$pcSplitButton : this ,
$parentInstance : this
} ;
} , "provide" )
} ;
var script$3 = {
name : "SplitButton" ,
"extends" : script$1$1 ,
inheritAttrs : false ,
emits : [ "click" ] ,
inject : {
$pcFluid : {
"default" : null
}
} ,
2025-02-15 09:32:47 +00:00
data : /* @__PURE__ */ _ _name ( function data6 ( ) {
2025-01-02 21:18:54 +00:00
return {
id : this . $attrs . id ,
isExpanded : false
} ;
} , "data" ) ,
watch : {
"$attrs.id" : /* @__PURE__ */ _ _name ( function $attrsId3 ( newValue ) {
this . id = newValue || UniqueComponentId ( ) ;
} , "$attrsId" )
} ,
2025-02-15 09:32:47 +00:00
mounted : /* @__PURE__ */ _ _name ( function mounted5 ( ) {
2025-01-02 21:18:54 +00:00
var _this = this ;
this . id = this . id || UniqueComponentId ( ) ;
this . $watch ( "$refs.menu.visible" , function ( newValue ) {
_this . isExpanded = newValue ;
} ) ;
} , "mounted" ) ,
methods : {
onDropdownButtonClick : /* @__PURE__ */ _ _name ( function onDropdownButtonClick ( event ) {
if ( event ) {
event . preventDefault ( ) ;
2024-10-28 18:29:38 +00:00
}
2025-01-02 21:18:54 +00:00
this . $refs . menu . toggle ( {
currentTarget : this . $el ,
relatedTarget : this . $refs . button . $el
2024-10-28 18:29:38 +00:00
} ) ;
2025-01-02 21:18:54 +00:00
this . isExpanded = this . $refs . menu . visible ;
} , "onDropdownButtonClick" ) ,
onDropdownKeydown : /* @__PURE__ */ _ _name ( function onDropdownKeydown ( event ) {
if ( event . code === "ArrowDown" || event . code === "ArrowUp" ) {
this . onDropdownButtonClick ( ) ;
event . preventDefault ( ) ;
}
} , "onDropdownKeydown" ) ,
onDefaultButtonClick : /* @__PURE__ */ _ _name ( function onDefaultButtonClick ( event ) {
if ( this . isExpanded ) {
this . $refs . menu . hide ( event ) ;
}
this . $emit ( "click" , event ) ;
} , "onDefaultButtonClick" )
} ,
computed : {
containerClass : /* @__PURE__ */ _ _name ( function containerClass ( ) {
return [ this . cx ( "root" ) , this [ "class" ] ] ;
} , "containerClass" ) ,
2025-01-31 18:07:37 +00:00
hasFluid : /* @__PURE__ */ _ _name ( function hasFluid ( ) {
2025-01-02 21:18:54 +00:00
return isEmpty ( this . fluid ) ? ! ! this . $pcFluid : this . fluid ;
} , "hasFluid" )
} ,
components : {
2025-02-15 09:32:47 +00:00
PVSButton : script$o ,
2025-01-02 21:18:54 +00:00
PVSMenu : script$4 ,
2025-02-15 09:32:47 +00:00
ChevronDownIcon : script$j
2025-01-02 21:18:54 +00:00
}
} ;
2025-01-31 18:07:37 +00:00
var _hoisted _1$2 = [ "data-p-severity" ] ;
function render$2 ( _ctx , _cache , $props , $setup , $data , $options ) {
2025-01-02 21:18:54 +00:00
var _component _PVSButton = resolveComponent ( "PVSButton" ) ;
var _component _PVSMenu = resolveComponent ( "PVSMenu" ) ;
return openBlock ( ) , createElementBlock ( "div" , mergeProps ( {
"class" : $options . containerClass ,
style : _ctx . style
} , _ctx . ptmi ( "root" ) , {
"data-p-severity" : _ctx . severity
} ) , [ createVNode ( _component _PVSButton , mergeProps ( {
type : "button" ,
"class" : _ctx . cx ( "pcButton" ) ,
label : _ctx . label ,
disabled : _ctx . disabled ,
severity : _ctx . severity ,
text : _ctx . text ,
icon : _ctx . icon ,
outlined : _ctx . outlined ,
size : _ctx . size ,
fluid : _ctx . fluid ,
"aria-label" : _ctx . label ,
onClick : $options . onDefaultButtonClick
} , _ctx . buttonProps , {
pt : _ctx . ptm ( "pcButton" ) ,
unstyled : _ctx . unstyled
} ) , createSlots ( {
"default" : withCtx ( function ( ) {
return [ renderSlot ( _ctx . $slots , "default" ) ] ;
} ) ,
_ : 2
} , [ _ctx . $slots . icon ? {
name : "icon" ,
fn : withCtx ( function ( slotProps ) {
return [ renderSlot ( _ctx . $slots , "icon" , {
"class" : normalizeClass ( slotProps [ "class" ] )
} , function ( ) {
return [ createBaseVNode ( "span" , mergeProps ( {
"class" : [ _ctx . icon , slotProps [ "class" ] ]
} , _ctx . ptm ( "pcButton" ) [ "icon" ] , {
"data-pc-section" : "buttonicon"
} ) , null , 16 ) ] ;
} ) ] ;
} ) ,
key : "0"
} : void 0 ] ) , 1040 , [ "class" , "label" , "disabled" , "severity" , "text" , "icon" , "outlined" , "size" , "fluid" , "aria-label" , "onClick" , "pt" , "unstyled" ] ) , createVNode ( _component _PVSButton , mergeProps ( {
ref : "button" ,
type : "button" ,
"class" : _ctx . cx ( "pcDropdown" ) ,
disabled : _ctx . disabled ,
"aria-haspopup" : "true" ,
"aria-expanded" : $data . isExpanded ,
"aria-controls" : $data . id + "_overlay" ,
onClick : $options . onDropdownButtonClick ,
onKeydown : $options . onDropdownKeydown ,
severity : _ctx . severity ,
text : _ctx . text ,
outlined : _ctx . outlined ,
size : _ctx . size ,
unstyled : _ctx . unstyled
} , _ctx . menuButtonProps , {
pt : _ctx . ptm ( "pcDropdown" )
} ) , {
icon : withCtx ( function ( slotProps ) {
return [ renderSlot ( _ctx . $slots , _ctx . $slots . dropdownicon ? "dropdownicon" : "menubuttonicon" , {
"class" : normalizeClass ( slotProps [ "class" ] )
} , function ( ) {
return [ ( openBlock ( ) , createBlock ( resolveDynamicComponent ( _ctx . menuButtonIcon || _ctx . dropdownIcon ? "span" : "ChevronDownIcon" ) , mergeProps ( {
"class" : [ _ctx . dropdownIcon || _ctx . menuButtonIcon , slotProps [ "class" ] ]
} , _ctx . ptm ( "pcDropdown" ) [ "icon" ] , {
"data-pc-section" : "menubuttonicon"
} ) , null , 16 , [ "class" ] ) ) ] ;
} ) ] ;
} ) ,
_ : 3
} , 16 , [ "class" , "disabled" , "aria-expanded" , "aria-controls" , "onClick" , "onKeydown" , "severity" , "text" , "outlined" , "size" , "unstyled" , "pt" ] ) , createVNode ( _component _PVSMenu , {
ref : "menu" ,
id : $data . id + "_overlay" ,
model : _ctx . model ,
popup : true ,
autoZIndex : _ctx . autoZIndex ,
baseZIndex : _ctx . baseZIndex ,
appendTo : _ctx . appendTo ,
unstyled : _ctx . unstyled ,
pt : _ctx . ptm ( "pcMenu" )
} , createSlots ( {
_ : 2
} , [ _ctx . $slots . menuitemicon ? {
name : "itemicon" ,
fn : withCtx ( function ( slotProps ) {
return [ renderSlot ( _ctx . $slots , "menuitemicon" , {
item : slotProps . item ,
"class" : normalizeClass ( slotProps [ "class" ] )
} ) ] ;
} ) ,
key : "0"
} : void 0 , _ctx . $slots . item ? {
name : "item" ,
fn : withCtx ( function ( slotProps ) {
return [ renderSlot ( _ctx . $slots , "item" , {
item : slotProps . item ,
hasSubmenu : slotProps . hasSubmenu ,
label : slotProps . label ,
props : slotProps . props
} ) ] ;
} ) ,
key : "1"
2025-01-31 18:07:37 +00:00
} : void 0 ] ) , 1032 , [ "id" , "model" , "autoZIndex" , "baseZIndex" , "appendTo" , "unstyled" , "pt" ] ) ] , 16 , _hoisted _1$2 ) ;
2025-01-02 21:18:54 +00:00
}
_ _name ( render$2 , "render$2" ) ;
2025-01-31 18:07:37 +00:00
script$3 . render = render$2 ;
2025-02-15 09:32:47 +00:00
var theme7 = /* @__PURE__ */ _ _name ( function theme8 ( _ref ) {
2024-10-28 18:29:38 +00:00
var dt = _ref . dt ;
2025-01-31 18:07:37 +00:00
return "\n.p-menubar {\n display: flex;\n align-items: center;\n background: " . concat ( dt ( "menubar.background" ) , ";\n border: 1px solid " ) . concat ( dt ( "menubar.border.color" ) , ";\n border-radius: " ) . concat ( dt ( "menubar.border.radius" ) , ";\n color: " ) . concat ( dt ( "menubar.color" ) , ";\n padding: " ) . concat ( dt ( "menubar.padding" ) , ";\n gap: " ) . concat ( dt ( "menubar.gap" ) , ";\n}\n\n.p-menubar-start,\n.p-megamenu-end {\n display: flex;\n align-items: center;\n}\n\n.p-menubar-root-list,\n.p-menubar-submenu {\n display: flex;\n margin: 0;\n padding: 0;\n list-style: none;\n outline: 0 none;\n}\n\n.p-menubar-root-list {\n align-items: center;\n flex-wrap: wrap;\n gap: " ) . concat ( dt ( "menubar.gap" ) , ";\n}\n\n.p-menubar-root-list > .p-menubar-item > .p-menubar-item-content {\n border-radius: " ) . concat ( dt ( "menubar.base.item.border.radius" ) , ";\n}\n\n.p-menubar-root-list > .p-menubar-item > .p-menubar-item-content > .p-menubar-item-link {\n padding: " ) . concat ( dt ( "menubar.base.item.padding" ) , ";\n}\n\n.p-menubar-item-content {\n transition: background " ) . concat ( dt ( "menubar.transition.duration" ) , ", color " ) . concat ( dt ( "menubar.transition.duration" ) , ";\n border-radius: " ) . concat ( dt ( "menubar.item.border.radius" ) , ";\n color: " ) . concat ( dt ( "menubar.item.color" ) , ";\n}\n\n.p-menubar-item-link {\n cursor: pointer;\n display: flex;\n align-items: center;\n text-decoration: none;\n overflow: hidden;\n position: relative;\n color: inherit;\n padding: " ) . concat ( dt ( "menubar.item.padding" ) , ";\n gap: " ) . concat ( dt ( "menubar.item.gap" ) , ";\n user-select: none;\n outline: 0 none;\n}\n\n.p-menubar-item-label {\n line-height: 1;\n}\n\n.p-menubar-item-icon {\n color: " ) . concat ( dt ( "menubar.item.icon.color" ) , ";\n}\n\n.p-menubar-submenu-icon {\n color: " ) . concat ( dt ( "menubar.submenu.icon.color" ) , ";\n margin-left: auto;\n font-size: " ) . concat ( dt ( "menubar.submenu.icon.size" ) , ";\n width: " ) . concat ( dt ( "menubar.submenu.icon.size" ) , ";\n height: " ) . concat ( dt ( "menubar.submenu.icon.size" ) , ";\n}\n\n.p-menubar-submenu .p-menubar-submenu-icon:dir(rtl) {\n margin-left: 0;\n margin-right: auto;\n}\n\n.p-menubar-item.p-focus > .p-menubar-item-content {\n color: " ) . concat ( dt ( "menubar.item.focus.color" ) , ";\n background: " ) . concat ( dt ( "menubar.item.focus.background" ) , ";\n}\n\n.p-menubar-item.p-focus > .p-menubar-item-content .p-menubar-item-icon {\n color: " ) . concat ( dt ( "menubar.item.icon.focus.color" ) , ";\n}\n\n.p-menubar-item.p-focus > .p-menubar-item-content .p-menubar-submenu-icon {\n color: " ) . concat ( dt ( "menubar.submenu.icon.focus.color" ) , ";\n}\n\n.p-menubar-item:not(.p-disabled) > .p-menubar-item-content:hover {\n color: " ) . concat ( dt ( "menubar.item.focus.color" ) , ";\n background: " ) . concat ( dt ( "menubar.item.focus.background" ) , ";\n}\n\n.p-menubar-item:not(.p-disabled) > .p-menubar-item-content:hover .p-menubar-item-icon {\n color: " ) . concat ( dt ( "menubar.item.icon.focus.color" ) , ";\n}\n\n.p-menubar-item:not(.p-disabled) > .p-menubar-item-content:hover .p-menubar-submenu-icon {\n color: " ) . concat ( dt ( "menubar.submenu.icon.focus.color" ) , ";\n}\n\n.p-menubar-item-active > .p-menubar-item-content {\n color: " ) . concat ( dt ( "menubar.item.active.color" ) , ";\n background: " ) . concat ( dt ( "menubar.item.active.background" ) , ";\n}\n\n.p-menubar-item-active > .p-menubar-item-content .p-menubar-item-icon {\n color: " ) . concat ( dt ( "menubar.item.icon.active.color" ) , ";\n}\n\n.p-menubar-item-active > .p-menubar-item-content .p-menubar-submenu-icon {\n color: " ) . concat ( dt ( "menubar.submenu.icon.active.color" ) , ";\n}\n\n.p-menubar-submenu {\n display: none;\n position: absolute;\n min-width: 12.5rem;\n z-index: 1;\n background: " ) . concat ( dt ( "menubar.submenu.background" ) , ";\n border: 1px solid " ) . concat ( dt ( "menubar.submenu.border.color" ) , ";\n border-radius: " ) . concat ( dt ( "menubar.submenu.border.radius" ) , ";\n box-shadow: " ) . concat ( dt ( "menubar.submenu.shadow" ) , ";\n color: " ) . concat ( dt ( "menubar.submenu.color" ) , " ; \
2024-10-28 18:29:38 +00:00
} , "theme" ) ;
2025-01-02 21:18:54 +00:00
var inlineStyles = {
submenu : /* @__PURE__ */ _ _name ( function submenu2 ( _ref2 ) {
var instance = _ref2 . instance , processedItem = _ref2 . processedItem ;
return {
display : instance . isItemActive ( processedItem ) ? "flex" : "none"
} ;
} , "submenu" )
} ;
2024-10-28 18:29:38 +00:00
var classes = {
2025-02-15 09:32:47 +00:00
root : /* @__PURE__ */ _ _name ( function root8 ( _ref3 ) {
2025-01-02 21:18:54 +00:00
var instance = _ref3 . instance ;
return [ "p-menubar p-component" , {
"p-menubar-mobile" : instance . queryMatches ,
"p-menubar-mobile-active" : instance . mobileActive
2024-10-28 18:29:38 +00:00
} ] ;
} , "root" ) ,
2025-01-02 21:18:54 +00:00
start : "p-menubar-start" ,
button : "p-menubar-button" ,
rootList : "p-menubar-root-list" ,
item : /* @__PURE__ */ _ _name ( function item2 ( _ref4 ) {
var instance = _ref4 . instance , processedItem = _ref4 . processedItem ;
return [ "p-menubar-item" , {
"p-menubar-item-active" : instance . isItemActive ( processedItem ) ,
"p-focus" : instance . isItemFocused ( processedItem ) ,
"p-disabled" : instance . isItemDisabled ( processedItem )
} ] ;
} , "item" ) ,
itemContent : "p-menubar-item-content" ,
itemLink : "p-menubar-item-link" ,
itemIcon : "p-menubar-item-icon" ,
itemLabel : "p-menubar-item-label" ,
submenuIcon : "p-menubar-submenu-icon" ,
submenu : "p-menubar-submenu" ,
separator : "p-menubar-separator" ,
end : "p-menubar-end"
2024-10-28 18:29:38 +00:00
} ;
2025-01-02 21:18:54 +00:00
var MenubarStyle = BaseStyle . extend ( {
name : "menubar" ,
2025-02-15 09:32:47 +00:00
theme : theme7 ,
2025-01-02 21:18:54 +00:00
classes ,
inlineStyles
2024-10-28 18:29:38 +00:00
} ) ;
2025-01-02 21:18:54 +00:00
var script$2 = {
name : "BaseMenubar" ,
2025-02-15 09:32:47 +00:00
"extends" : script$c ,
2024-10-28 18:29:38 +00:00
props : {
model : {
type : Array ,
"default" : null
} ,
buttonProps : {
type : null ,
"default" : null
} ,
2025-01-02 21:18:54 +00:00
breakpoint : {
2024-10-28 18:29:38 +00:00
type : String ,
2025-01-02 21:18:54 +00:00
"default" : "960px"
2024-10-28 18:29:38 +00:00
} ,
2025-01-02 21:18:54 +00:00
ariaLabelledby : {
2024-10-28 18:29:38 +00:00
type : String ,
2025-01-02 21:18:54 +00:00
"default" : null
2024-10-28 18:29:38 +00:00
} ,
2025-01-02 21:18:54 +00:00
ariaLabel : {
2024-10-28 18:29:38 +00:00
type : String ,
"default" : null
2025-01-02 21:18:54 +00:00
}
} ,
style : MenubarStyle ,
2025-02-15 09:32:47 +00:00
provide : /* @__PURE__ */ _ _name ( function provide10 ( ) {
2025-01-02 21:18:54 +00:00
return {
$pcMenubar : this ,
$parentInstance : this
} ;
} , "provide" )
} ;
var script$1 = {
name : "MenubarSub" ,
hostName : "Menubar" ,
2025-02-15 09:32:47 +00:00
"extends" : script$c ,
2025-01-02 21:18:54 +00:00
emits : [ "item-mouseenter" , "item-click" , "item-mousemove" ] ,
props : {
items : {
type : Array ,
"default" : null
2024-10-28 18:29:38 +00:00
} ,
2025-01-02 21:18:54 +00:00
root : {
2024-10-28 18:29:38 +00:00
type : Boolean ,
"default" : false
} ,
2025-01-02 21:18:54 +00:00
popup : {
2024-10-28 18:29:38 +00:00
type : Boolean ,
"default" : false
} ,
2025-01-02 21:18:54 +00:00
mobileActive : {
2024-10-28 18:29:38 +00:00
type : Boolean ,
"default" : false
} ,
2025-01-02 21:18:54 +00:00
templates : {
type : Object ,
"default" : null
2024-10-28 18:29:38 +00:00
} ,
2025-01-02 21:18:54 +00:00
level : {
type : Number ,
"default" : 0
} ,
menuId : {
2024-10-28 18:29:38 +00:00
type : String ,
"default" : null
} ,
2025-01-02 21:18:54 +00:00
focusedItemId : {
type : String ,
"default" : null
} ,
activeItemPath : {
type : Object ,
"default" : null
2024-10-28 18:29:38 +00:00
}
} ,
2025-01-02 21:18:54 +00:00
list : null ,
methods : {
getItemId : /* @__PURE__ */ _ _name ( function getItemId2 ( processedItem ) {
return "" . concat ( this . menuId , "_" ) . concat ( processedItem . key ) ;
} , "getItemId" ) ,
getItemKey : /* @__PURE__ */ _ _name ( function getItemKey2 ( processedItem ) {
return this . getItemId ( processedItem ) ;
} , "getItemKey" ) ,
getItemProp : /* @__PURE__ */ _ _name ( function getItemProp3 ( processedItem , name , params ) {
return processedItem && processedItem . item ? resolve ( processedItem . item [ name ] , params ) : void 0 ;
} , "getItemProp" ) ,
getItemLabel : /* @__PURE__ */ _ _name ( function getItemLabel3 ( processedItem ) {
return this . getItemProp ( processedItem , "label" ) ;
} , "getItemLabel" ) ,
getItemLabelId : /* @__PURE__ */ _ _name ( function getItemLabelId2 ( processedItem ) {
return "" . concat ( this . menuId , "_" ) . concat ( processedItem . key , "_label" ) ;
} , "getItemLabelId" ) ,
getPTOptions : /* @__PURE__ */ _ _name ( function getPTOptions5 ( processedItem , index , key ) {
return this . ptm ( key , {
context : {
item : processedItem . item ,
index ,
active : this . isItemActive ( processedItem ) ,
focused : this . isItemFocused ( processedItem ) ,
disabled : this . isItemDisabled ( processedItem ) ,
level : this . level
}
} ) ;
} , "getPTOptions" ) ,
isItemActive : /* @__PURE__ */ _ _name ( function isItemActive2 ( processedItem ) {
return this . activeItemPath . some ( function ( path ) {
return path . key === processedItem . key ;
} ) ;
} , "isItemActive" ) ,
isItemVisible : /* @__PURE__ */ _ _name ( function isItemVisible3 ( processedItem ) {
return this . getItemProp ( processedItem , "visible" ) !== false ;
} , "isItemVisible" ) ,
isItemDisabled : /* @__PURE__ */ _ _name ( function isItemDisabled3 ( processedItem ) {
return this . getItemProp ( processedItem , "disabled" ) ;
} , "isItemDisabled" ) ,
isItemFocused : /* @__PURE__ */ _ _name ( function isItemFocused2 ( processedItem ) {
return this . focusedItemId === this . getItemId ( processedItem ) ;
} , "isItemFocused" ) ,
isItemGroup : /* @__PURE__ */ _ _name ( function isItemGroup3 ( processedItem ) {
return isNotEmpty ( processedItem . items ) ;
} , "isItemGroup" ) ,
onItemClick : /* @__PURE__ */ _ _name ( function onItemClick3 ( event , processedItem ) {
this . getItemProp ( processedItem , "command" , {
originalEvent : event ,
item : processedItem . item
} ) ;
this . $emit ( "item-click" , {
originalEvent : event ,
processedItem ,
isFocus : true
} ) ;
} , "onItemClick" ) ,
onItemMouseEnter : /* @__PURE__ */ _ _name ( function onItemMouseEnter3 ( event , processedItem ) {
this . $emit ( "item-mouseenter" , {
originalEvent : event ,
processedItem
} ) ;
} , "onItemMouseEnter" ) ,
onItemMouseMove : /* @__PURE__ */ _ _name ( function onItemMouseMove3 ( event , processedItem ) {
this . $emit ( "item-mousemove" , {
originalEvent : event ,
processedItem
} ) ;
} , "onItemMouseMove" ) ,
getAriaPosInset : /* @__PURE__ */ _ _name ( function getAriaPosInset3 ( index ) {
return index - this . calculateAriaSetSize . slice ( 0 , index ) . length + 1 ;
} , "getAriaPosInset" ) ,
getMenuItemProps : /* @__PURE__ */ _ _name ( function getMenuItemProps2 ( processedItem , index ) {
return {
action : mergeProps ( {
"class" : this . cx ( "itemLink" ) ,
2025-01-31 18:07:37 +00:00
tabindex : - 1
2025-01-02 21:18:54 +00:00
} , this . getPTOptions ( processedItem , index , "itemLink" ) ) ,
icon : mergeProps ( {
"class" : [ this . cx ( "itemIcon" ) , this . getItemProp ( processedItem , "icon" ) ]
} , this . getPTOptions ( processedItem , index , "itemIcon" ) ) ,
label : mergeProps ( {
"class" : this . cx ( "itemLabel" )
} , this . getPTOptions ( processedItem , index , "itemLabel" ) ) ,
submenuicon : mergeProps ( {
"class" : this . cx ( "submenuIcon" )
} , this . getPTOptions ( processedItem , index , "submenuIcon" ) )
} ;
} , "getMenuItemProps" )
} ,
computed : {
calculateAriaSetSize : /* @__PURE__ */ _ _name ( function calculateAriaSetSize ( ) {
var _this = this ;
return this . items . filter ( function ( processedItem ) {
return _this . isItemVisible ( processedItem ) && _this . getItemProp ( processedItem , "separator" ) ;
} ) ;
} , "calculateAriaSetSize" ) ,
getAriaSetSize : /* @__PURE__ */ _ _name ( function getAriaSetSize2 ( ) {
var _this2 = this ;
return this . items . filter ( function ( processedItem ) {
return _this2 . isItemVisible ( processedItem ) && ! _this2 . getItemProp ( processedItem , "separator" ) ;
} ) . length ;
} , "getAriaSetSize" )
} ,
components : {
2025-02-15 09:32:47 +00:00
AngleRightIcon : script$n ,
AngleDownIcon : script$p
2025-01-02 21:18:54 +00:00
} ,
directives : {
ripple : Ripple
}
2024-10-28 18:29:38 +00:00
} ;
2025-01-31 18:07:37 +00:00
var _hoisted _1$1 = [ "id" , "aria-label" , "aria-disabled" , "aria-expanded" , "aria-haspopup" , "aria-level" , "aria-setsize" , "aria-posinset" , "data-p-active" , "data-p-focused" , "data-p-disabled" ] ;
var _hoisted _2 = [ "onClick" , "onMouseenter" , "onMousemove" ] ;
var _hoisted _3 = [ "href" , "target" ] ;
var _hoisted _4 = [ "id" ] ;
2025-01-02 21:18:54 +00:00
var _hoisted _5 = [ "id" ] ;
function render$1 ( _ctx , _cache , $props , $setup , $data , $options ) {
var _component _MenubarSub = resolveComponent ( "MenubarSub" , true ) ;
var _directive _ripple = resolveDirective ( "ripple" ) ;
return openBlock ( ) , createElementBlock ( "ul" , mergeProps ( {
"class" : $props . level === 0 ? _ctx . cx ( "rootList" ) : _ctx . cx ( "submenu" )
} , $props . level === 0 ? _ctx . ptm ( "rootList" ) : _ctx . ptm ( "submenu" ) ) , [ ( openBlock ( true ) , createElementBlock ( Fragment , null , renderList ( $props . items , function ( processedItem , index ) {
return openBlock ( ) , createElementBlock ( Fragment , {
key : $options . getItemKey ( processedItem )
} , [ $options . isItemVisible ( processedItem ) && ! $options . getItemProp ( processedItem , "separator" ) ? ( openBlock ( ) , createElementBlock ( "li" , mergeProps ( {
key : 0 ,
id : $options . getItemId ( processedItem ) ,
style : $options . getItemProp ( processedItem , "style" ) ,
"class" : [ _ctx . cx ( "item" , {
processedItem
} ) , $options . getItemProp ( processedItem , "class" ) ] ,
role : "menuitem" ,
"aria-label" : $options . getItemLabel ( processedItem ) ,
"aria-disabled" : $options . isItemDisabled ( processedItem ) || void 0 ,
"aria-expanded" : $options . isItemGroup ( processedItem ) ? $options . isItemActive ( processedItem ) : void 0 ,
"aria-haspopup" : $options . isItemGroup ( processedItem ) && ! $options . getItemProp ( processedItem , "to" ) ? "menu" : void 0 ,
"aria-level" : $props . level + 1 ,
"aria-setsize" : $options . getAriaSetSize ,
"aria-posinset" : $options . getAriaPosInset ( index ) ,
ref _for : true
} , $options . getPTOptions ( processedItem , index , "item" ) , {
"data-p-active" : $options . isItemActive ( processedItem ) ,
"data-p-focused" : $options . isItemFocused ( processedItem ) ,
"data-p-disabled" : $options . isItemDisabled ( processedItem )
} ) , [ createBaseVNode ( "div" , mergeProps ( {
"class" : _ctx . cx ( "itemContent" ) ,
onClick : /* @__PURE__ */ _ _name ( function onClick2 ( $event ) {
return $options . onItemClick ( $event , processedItem ) ;
} , "onClick" ) ,
onMouseenter : /* @__PURE__ */ _ _name ( function onMouseenter ( $event ) {
return $options . onItemMouseEnter ( $event , processedItem ) ;
} , "onMouseenter" ) ,
onMousemove : /* @__PURE__ */ _ _name ( function onMousemove ( $event ) {
return $options . onItemMouseMove ( $event , processedItem ) ;
} , "onMousemove" ) ,
ref _for : true
} , $options . getPTOptions ( processedItem , index , "itemContent" ) ) , [ ! $props . templates . item ? withDirectives ( ( openBlock ( ) , createElementBlock ( "a" , mergeProps ( {
key : 0 ,
href : $options . getItemProp ( processedItem , "url" ) ,
"class" : _ctx . cx ( "itemLink" ) ,
target : $options . getItemProp ( processedItem , "target" ) ,
tabindex : "-1" ,
ref _for : true
} , $options . getPTOptions ( processedItem , index , "itemLink" ) ) , [ $props . templates . itemicon ? ( openBlock ( ) , createBlock ( resolveDynamicComponent ( $props . templates . itemicon ) , {
key : 0 ,
item : processedItem . item ,
"class" : normalizeClass ( _ctx . cx ( "itemIcon" ) )
} , null , 8 , [ "item" , "class" ] ) ) : $options . getItemProp ( processedItem , "icon" ) ? ( openBlock ( ) , createElementBlock ( "span" , mergeProps ( {
key : 1 ,
"class" : [ _ctx . cx ( "itemIcon" ) , $options . getItemProp ( processedItem , "icon" ) ] ,
ref _for : true
} , $options . getPTOptions ( processedItem , index , "itemIcon" ) ) , null , 16 ) ) : createCommentVNode ( "" , true ) , createBaseVNode ( "span" , mergeProps ( {
id : $options . getItemLabelId ( processedItem ) ,
"class" : _ctx . cx ( "itemLabel" ) ,
ref _for : true
2025-01-31 18:07:37 +00:00
} , $options . getPTOptions ( processedItem , index , "itemLabel" ) ) , toDisplayString ( $options . getItemLabel ( processedItem ) ) , 17 , _hoisted _4 ) , $options . getItemProp ( processedItem , "items" ) ? ( openBlock ( ) , createElementBlock ( Fragment , {
2025-01-02 21:18:54 +00:00
key : 2
} , [ $props . templates . submenuicon ? ( openBlock ( ) , createBlock ( resolveDynamicComponent ( $props . templates . submenuicon ) , {
key : 0 ,
root : $props . root ,
active : $options . isItemActive ( processedItem ) ,
"class" : normalizeClass ( _ctx . cx ( "submenuIcon" ) )
} , null , 8 , [ "root" , "active" , "class" ] ) ) : ( openBlock ( ) , createBlock ( resolveDynamicComponent ( $props . root ? "AngleDownIcon" : "AngleRightIcon" ) , mergeProps ( {
key : 1 ,
"class" : _ctx . cx ( "submenuIcon" ) ,
ref _for : true
2025-01-31 18:07:37 +00:00
} , $options . getPTOptions ( processedItem , index , "submenuIcon" ) ) , null , 16 , [ "class" ] ) ) ] , 64 ) ) : createCommentVNode ( "" , true ) ] , 16 , _hoisted _3 ) ) , [ [ _directive _ripple ] ] ) : ( openBlock ( ) , createBlock ( resolveDynamicComponent ( $props . templates . item ) , {
2025-01-02 21:18:54 +00:00
key : 1 ,
item : processedItem . item ,
root : $props . root ,
hasSubmenu : $options . getItemProp ( processedItem , "items" ) ,
label : $options . getItemLabel ( processedItem ) ,
props : $options . getMenuItemProps ( processedItem , index )
2025-01-31 18:07:37 +00:00
} , null , 8 , [ "item" , "root" , "hasSubmenu" , "label" , "props" ] ) ) ] , 16 , _hoisted _2 ) , $options . isItemVisible ( processedItem ) && $options . isItemGroup ( processedItem ) ? ( openBlock ( ) , createBlock ( _component _MenubarSub , {
2025-01-02 21:18:54 +00:00
key : 0 ,
id : $options . getItemId ( processedItem ) + "_list" ,
menuId : $props . menuId ,
role : "menu" ,
style : normalizeStyle ( _ctx . sx ( "submenu" , true , {
processedItem
} ) ) ,
focusedItemId : $props . focusedItemId ,
items : processedItem . items ,
mobileActive : $props . mobileActive ,
activeItemPath : $props . activeItemPath ,
templates : $props . templates ,
level : $props . level + 1 ,
"aria-labelledby" : $options . getItemLabelId ( processedItem ) ,
pt : _ctx . pt ,
unstyled : _ctx . unstyled ,
onItemClick : _cache [ 0 ] || ( _cache [ 0 ] = function ( $event ) {
return _ctx . $emit ( "item-click" , $event ) ;
} ) ,
onItemMouseenter : _cache [ 1 ] || ( _cache [ 1 ] = function ( $event ) {
return _ctx . $emit ( "item-mouseenter" , $event ) ;
} ) ,
onItemMousemove : _cache [ 2 ] || ( _cache [ 2 ] = function ( $event ) {
return _ctx . $emit ( "item-mousemove" , $event ) ;
} )
2025-01-31 18:07:37 +00:00
} , null , 8 , [ "id" , "menuId" , "style" , "focusedItemId" , "items" , "mobileActive" , "activeItemPath" , "templates" , "level" , "aria-labelledby" , "pt" , "unstyled" ] ) ) : createCommentVNode ( "" , true ) ] , 16 , _hoisted _1$1 ) ) : createCommentVNode ( "" , true ) , $options . isItemVisible ( processedItem ) && $options . getItemProp ( processedItem , "separator" ) ? ( openBlock ( ) , createElementBlock ( "li" , mergeProps ( {
2025-01-02 21:18:54 +00:00
key : 1 ,
id : $options . getItemId ( processedItem ) ,
"class" : [ _ctx . cx ( "separator" ) , $options . getItemProp ( processedItem , "class" ) ] ,
style : $options . getItemProp ( processedItem , "style" ) ,
role : "separator" ,
ref _for : true
} , _ctx . ptm ( "separator" ) ) , null , 16 , _hoisted _5 ) ) : createCommentVNode ( "" , true ) ] , 64 ) ;
} ) , 128 ) ) ] , 16 ) ;
}
_ _name ( render$1 , "render$1" ) ;
script$1 . render = render$1 ;
2024-10-28 18:29:38 +00:00
var script = {
2025-01-02 21:18:54 +00:00
name : "Menubar" ,
"extends" : script$2 ,
2024-10-28 18:29:38 +00:00
inheritAttrs : false ,
2025-01-02 21:18:54 +00:00
emits : [ "focus" , "blur" ] ,
matchMediaListener : null ,
2025-02-15 09:32:47 +00:00
data : /* @__PURE__ */ _ _name ( function data7 ( ) {
2024-10-28 18:29:38 +00:00
return {
id : this . $attrs . id ,
2025-01-02 21:18:54 +00:00
mobileActive : false ,
focused : false ,
focusedItemInfo : {
index : - 1 ,
level : 0 ,
parentKey : ""
} ,
activeItemPath : [ ] ,
dirty : false ,
query : null ,
queryMatches : false
2024-10-28 18:29:38 +00:00
} ;
} , "data" ) ,
watch : {
2025-01-02 21:18:54 +00:00
"$attrs.id" : /* @__PURE__ */ _ _name ( function $attrsId4 ( newValue ) {
2024-10-28 18:29:38 +00:00
this . id = newValue || UniqueComponentId ( ) ;
2025-01-02 21:18:54 +00:00
} , "$attrsId" ) ,
activeItemPath : /* @__PURE__ */ _ _name ( function activeItemPath2 ( newPath ) {
if ( isNotEmpty ( newPath ) ) {
this . bindOutsideClickListener ( ) ;
this . bindResizeListener ( ) ;
} else {
this . unbindOutsideClickListener ( ) ;
this . unbindResizeListener ( ) ;
}
} , "activeItemPath" )
2024-10-28 18:29:38 +00:00
} ,
2025-01-02 21:18:54 +00:00
outsideClickListener : null ,
container : null ,
menubar : null ,
2025-02-15 09:32:47 +00:00
mounted : /* @__PURE__ */ _ _name ( function mounted6 ( ) {
2024-10-28 18:29:38 +00:00
this . id = this . id || UniqueComponentId ( ) ;
2025-01-02 21:18:54 +00:00
this . bindMatchMediaListener ( ) ;
2024-10-28 18:29:38 +00:00
} , "mounted" ) ,
2025-02-15 09:32:47 +00:00
beforeUnmount : /* @__PURE__ */ _ _name ( function beforeUnmount5 ( ) {
2025-01-02 21:18:54 +00:00
this . mobileActive = false ;
this . unbindOutsideClickListener ( ) ;
this . unbindResizeListener ( ) ;
this . unbindMatchMediaListener ( ) ;
if ( this . container ) {
ZIndex . clear ( this . container ) ;
}
this . container = null ;
} , "beforeUnmount" ) ,
2024-10-28 18:29:38 +00:00
methods : {
2025-01-02 21:18:54 +00:00
getItemProp : /* @__PURE__ */ _ _name ( function getItemProp4 ( item3 , name ) {
return item3 ? resolve ( item3 [ name ] ) : void 0 ;
} , "getItemProp" ) ,
getItemLabel : /* @__PURE__ */ _ _name ( function getItemLabel4 ( item3 ) {
return this . getItemProp ( item3 , "label" ) ;
} , "getItemLabel" ) ,
isItemDisabled : /* @__PURE__ */ _ _name ( function isItemDisabled4 ( item3 ) {
return this . getItemProp ( item3 , "disabled" ) ;
} , "isItemDisabled" ) ,
isItemVisible : /* @__PURE__ */ _ _name ( function isItemVisible4 ( item3 ) {
return this . getItemProp ( item3 , "visible" ) !== false ;
} , "isItemVisible" ) ,
isItemGroup : /* @__PURE__ */ _ _name ( function isItemGroup4 ( item3 ) {
return isNotEmpty ( this . getItemProp ( item3 , "items" ) ) ;
} , "isItemGroup" ) ,
isItemSeparator : /* @__PURE__ */ _ _name ( function isItemSeparator2 ( item3 ) {
return this . getItemProp ( item3 , "separator" ) ;
} , "isItemSeparator" ) ,
getProccessedItemLabel : /* @__PURE__ */ _ _name ( function getProccessedItemLabel2 ( processedItem ) {
return processedItem ? this . getItemLabel ( processedItem . item ) : void 0 ;
} , "getProccessedItemLabel" ) ,
isProccessedItemGroup : /* @__PURE__ */ _ _name ( function isProccessedItemGroup2 ( processedItem ) {
return processedItem && isNotEmpty ( processedItem . items ) ;
} , "isProccessedItemGroup" ) ,
toggle : /* @__PURE__ */ _ _name ( function toggle2 ( event ) {
var _this = this ;
if ( this . mobileActive ) {
this . mobileActive = false ;
ZIndex . clear ( this . menubar ) ;
this . hide ( ) ;
} else {
this . mobileActive = true ;
ZIndex . set ( "menu" , this . menubar , this . $primevue . config . zIndex . menu ) ;
setTimeout ( function ( ) {
_this . show ( ) ;
} , 1 ) ;
}
this . bindOutsideClickListener ( ) ;
event . preventDefault ( ) ;
} , "toggle" ) ,
show : /* @__PURE__ */ _ _name ( function show3 ( ) {
focus ( this . menubar ) ;
} , "show" ) ,
hide : /* @__PURE__ */ _ _name ( function hide3 ( event , isFocus ) {
var _this2 = this ;
if ( this . mobileActive ) {
this . mobileActive = false ;
setTimeout ( function ( ) {
focus ( _this2 . $refs . menubutton ) ;
} , 0 ) ;
}
this . activeItemPath = [ ] ;
this . focusedItemInfo = {
index : - 1 ,
level : 0 ,
parentKey : ""
} ;
isFocus && focus ( this . menubar ) ;
this . dirty = false ;
} , "hide" ) ,
onFocus : /* @__PURE__ */ _ _name ( function onFocus4 ( event ) {
this . focused = true ;
this . focusedItemInfo = this . focusedItemInfo . index !== - 1 ? this . focusedItemInfo : {
index : this . findFirstFocusedItemIndex ( ) ,
level : 0 ,
parentKey : ""
} ;
this . $emit ( "focus" , event ) ;
} , "onFocus" ) ,
onBlur : /* @__PURE__ */ _ _name ( function onBlur3 ( event ) {
this . focused = false ;
this . focusedItemInfo = {
index : - 1 ,
level : 0 ,
parentKey : ""
} ;
this . searchValue = "" ;
this . dirty = false ;
this . $emit ( "blur" , event ) ;
} , "onBlur" ) ,
onKeyDown : /* @__PURE__ */ _ _name ( function onKeyDown3 ( event ) {
var metaKey = event . metaKey || event . ctrlKey ;
switch ( event . code ) {
case "ArrowDown" :
this . onArrowDownKey ( event ) ;
break ;
case "ArrowUp" :
this . onArrowUpKey ( event ) ;
break ;
case "ArrowLeft" :
this . onArrowLeftKey ( event ) ;
break ;
case "ArrowRight" :
this . onArrowRightKey ( event ) ;
break ;
case "Home" :
this . onHomeKey ( event ) ;
break ;
case "End" :
this . onEndKey ( event ) ;
break ;
case "Space" :
this . onSpaceKey ( event ) ;
break ;
case "Enter" :
case "NumpadEnter" :
this . onEnterKey ( event ) ;
break ;
case "Escape" :
this . onEscapeKey ( event ) ;
break ;
case "Tab" :
this . onTabKey ( event ) ;
break ;
case "PageDown" :
case "PageUp" :
case "Backspace" :
case "ShiftLeft" :
case "ShiftRight" :
break ;
default :
if ( ! metaKey && isPrintableCharacter ( event . key ) ) {
this . searchItems ( event , event . key ) ;
}
break ;
2024-10-28 18:29:38 +00:00
}
2025-01-02 21:18:54 +00:00
} , "onKeyDown" ) ,
2025-01-31 18:07:37 +00:00
onItemChange : /* @__PURE__ */ _ _name ( function onItemChange2 ( event , type ) {
2025-01-02 21:18:54 +00:00
var processedItem = event . processedItem , isFocus = event . isFocus ;
if ( isEmpty ( processedItem ) ) return ;
var index = processedItem . index , key = processedItem . key , level = processedItem . level , parentKey = processedItem . parentKey , items = processedItem . items ;
var grouped = isNotEmpty ( items ) ;
var activeItemPath3 = this . activeItemPath . filter ( function ( p ) {
return p . parentKey !== parentKey && p . parentKey !== key ;
2024-10-28 18:29:38 +00:00
} ) ;
2025-01-02 21:18:54 +00:00
grouped && activeItemPath3 . push ( processedItem ) ;
this . focusedItemInfo = {
index ,
level ,
parentKey
} ;
grouped && ( this . dirty = true ) ;
isFocus && focus ( this . menubar ) ;
2025-01-31 18:07:37 +00:00
if ( type === "hover" && this . queryMatches ) {
return ;
}
this . activeItemPath = activeItemPath3 ;
2025-01-02 21:18:54 +00:00
} , "onItemChange" ) ,
onItemClick : /* @__PURE__ */ _ _name ( function onItemClick4 ( event ) {
var originalEvent = event . originalEvent , processedItem = event . processedItem ;
var grouped = this . isProccessedItemGroup ( processedItem ) ;
2025-02-15 09:32:47 +00:00
var root9 = isEmpty ( processedItem . parent ) ;
2025-01-02 21:18:54 +00:00
var selected = this . isSelected ( processedItem ) ;
if ( selected ) {
var index = processedItem . index , key = processedItem . key , level = processedItem . level , parentKey = processedItem . parentKey ;
this . activeItemPath = this . activeItemPath . filter ( function ( p ) {
return key !== p . key && key . startsWith ( p . key ) ;
} ) ;
this . focusedItemInfo = {
index ,
level ,
parentKey
} ;
2025-02-15 09:32:47 +00:00
this . dirty = ! root9 ;
2025-01-02 21:18:54 +00:00
focus ( this . menubar ) ;
} else {
if ( grouped ) {
this . onItemChange ( event ) ;
} else {
2025-02-15 09:32:47 +00:00
var rootProcessedItem = root9 ? processedItem : this . activeItemPath . find ( function ( p ) {
2025-01-02 21:18:54 +00:00
return p . parentKey === "" ;
} ) ;
this . hide ( originalEvent ) ;
this . changeFocusedItemIndex ( originalEvent , rootProcessedItem ? rootProcessedItem . index : - 1 ) ;
this . mobileActive = false ;
focus ( this . menubar ) ;
}
2024-10-28 18:29:38 +00:00
}
2025-01-02 21:18:54 +00:00
} , "onItemClick" ) ,
onItemMouseEnter : /* @__PURE__ */ _ _name ( function onItemMouseEnter4 ( event ) {
if ( this . dirty ) {
2025-01-31 18:07:37 +00:00
this . onItemChange ( event , "hover" ) ;
2024-10-28 18:29:38 +00:00
}
2025-01-02 21:18:54 +00:00
} , "onItemMouseEnter" ) ,
onItemMouseMove : /* @__PURE__ */ _ _name ( function onItemMouseMove4 ( event ) {
if ( this . focused ) {
this . changeFocusedItemIndex ( event , event . processedItem . index ) ;
}
} , "onItemMouseMove" ) ,
menuButtonClick : /* @__PURE__ */ _ _name ( function menuButtonClick ( event ) {
this . toggle ( event ) ;
} , "menuButtonClick" ) ,
menuButtonKeydown : /* @__PURE__ */ _ _name ( function menuButtonKeydown ( event ) {
( event . code === "Enter" || event . code === "NumpadEnter" || event . code === "Space" ) && this . menuButtonClick ( event ) ;
} , "menuButtonKeydown" ) ,
onArrowDownKey : /* @__PURE__ */ _ _name ( function onArrowDownKey3 ( event ) {
var processedItem = this . visibleItems [ this . focusedItemInfo . index ] ;
2025-02-15 09:32:47 +00:00
var root9 = processedItem ? isEmpty ( processedItem . parent ) : null ;
if ( root9 ) {
2025-01-02 21:18:54 +00:00
var grouped = this . isProccessedItemGroup ( processedItem ) ;
if ( grouped ) {
this . onItemChange ( {
originalEvent : event ,
processedItem
} ) ;
this . focusedItemInfo = {
index : - 1 ,
parentKey : processedItem . key
} ;
this . onArrowRightKey ( event ) ;
}
} else {
var itemIndex = this . focusedItemInfo . index !== - 1 ? this . findNextItemIndex ( this . focusedItemInfo . index ) : this . findFirstFocusedItemIndex ( ) ;
this . changeFocusedItemIndex ( event , itemIndex ) ;
}
event . preventDefault ( ) ;
} , "onArrowDownKey" ) ,
onArrowUpKey : /* @__PURE__ */ _ _name ( function onArrowUpKey3 ( event ) {
var _this3 = this ;
var processedItem = this . visibleItems [ this . focusedItemInfo . index ] ;
2025-02-15 09:32:47 +00:00
var root9 = isEmpty ( processedItem . parent ) ;
if ( root9 ) {
2025-01-02 21:18:54 +00:00
var grouped = this . isProccessedItemGroup ( processedItem ) ;
if ( grouped ) {
this . onItemChange ( {
originalEvent : event ,
processedItem
} ) ;
this . focusedItemInfo = {
index : - 1 ,
parentKey : processedItem . key
} ;
var itemIndex = this . findLastItemIndex ( ) ;
this . changeFocusedItemIndex ( event , itemIndex ) ;
}
} else {
var parentItem = this . activeItemPath . find ( function ( p ) {
return p . key === processedItem . parentKey ;
} ) ;
if ( this . focusedItemInfo . index === 0 ) {
this . focusedItemInfo = {
index : - 1 ,
parentKey : parentItem ? parentItem . parentKey : ""
} ;
this . searchValue = "" ;
this . onArrowLeftKey ( event ) ;
this . activeItemPath = this . activeItemPath . filter ( function ( p ) {
return p . parentKey !== _this3 . focusedItemInfo . parentKey ;
} ) ;
} else {
var _itemIndex = this . focusedItemInfo . index !== - 1 ? this . findPrevItemIndex ( this . focusedItemInfo . index ) : this . findLastFocusedItemIndex ( ) ;
this . changeFocusedItemIndex ( event , _itemIndex ) ;
}
}
event . preventDefault ( ) ;
} , "onArrowUpKey" ) ,
onArrowLeftKey : /* @__PURE__ */ _ _name ( function onArrowLeftKey4 ( event ) {
var _this4 = this ;
var processedItem = this . visibleItems [ this . focusedItemInfo . index ] ;
var parentItem = processedItem ? this . activeItemPath . find ( function ( p ) {
return p . key === processedItem . parentKey ;
} ) : null ;
if ( parentItem ) {
this . onItemChange ( {
originalEvent : event ,
processedItem : parentItem
} ) ;
this . activeItemPath = this . activeItemPath . filter ( function ( p ) {
return p . parentKey !== _this4 . focusedItemInfo . parentKey ;
} ) ;
event . preventDefault ( ) ;
2024-10-28 18:29:38 +00:00
} else {
2025-01-02 21:18:54 +00:00
var itemIndex = this . focusedItemInfo . index !== - 1 ? this . findPrevItemIndex ( this . focusedItemInfo . index ) : this . findLastFocusedItemIndex ( ) ;
this . changeFocusedItemIndex ( event , itemIndex ) ;
event . preventDefault ( ) ;
2024-10-28 18:29:38 +00:00
}
2025-01-02 21:18:54 +00:00
} , "onArrowLeftKey" ) ,
onArrowRightKey : /* @__PURE__ */ _ _name ( function onArrowRightKey4 ( event ) {
var processedItem = this . visibleItems [ this . focusedItemInfo . index ] ;
var parentItem = processedItem ? this . activeItemPath . find ( function ( p ) {
return p . key === processedItem . parentKey ;
} ) : null ;
if ( parentItem ) {
var grouped = this . isProccessedItemGroup ( processedItem ) ;
if ( grouped ) {
this . onItemChange ( {
originalEvent : event ,
processedItem
} ) ;
this . focusedItemInfo = {
index : - 1 ,
parentKey : processedItem . key
} ;
this . onArrowDownKey ( event ) ;
}
} else {
var itemIndex = this . focusedItemInfo . index !== - 1 ? this . findNextItemIndex ( this . focusedItemInfo . index ) : this . findFirstFocusedItemIndex ( ) ;
this . changeFocusedItemIndex ( event , itemIndex ) ;
event . preventDefault ( ) ;
2024-10-28 18:29:38 +00:00
}
2025-01-02 21:18:54 +00:00
} , "onArrowRightKey" ) ,
onHomeKey : /* @__PURE__ */ _ _name ( function onHomeKey4 ( event ) {
this . changeFocusedItemIndex ( event , this . findFirstItemIndex ( ) ) ;
event . preventDefault ( ) ;
} , "onHomeKey" ) ,
onEndKey : /* @__PURE__ */ _ _name ( function onEndKey4 ( event ) {
this . changeFocusedItemIndex ( event , this . findLastItemIndex ( ) ) ;
event . preventDefault ( ) ;
} , "onEndKey" ) ,
onEnterKey : /* @__PURE__ */ _ _name ( function onEnterKey4 ( event ) {
if ( this . focusedItemInfo . index !== - 1 ) {
var element = findSingle ( this . menubar , 'li[id="' . concat ( "" . concat ( this . focusedItemId ) , '"]' ) ) ;
var anchorElement = element && findSingle ( element , 'a[data-pc-section="itemlink"]' ) ;
anchorElement ? anchorElement . click ( ) : element && element . click ( ) ;
var processedItem = this . visibleItems [ this . focusedItemInfo . index ] ;
var grouped = this . isProccessedItemGroup ( processedItem ) ;
! grouped && ( this . focusedItemInfo . index = this . findFirstFocusedItemIndex ( ) ) ;
2024-10-28 18:29:38 +00:00
}
2025-01-02 21:18:54 +00:00
event . preventDefault ( ) ;
} , "onEnterKey" ) ,
onSpaceKey : /* @__PURE__ */ _ _name ( function onSpaceKey2 ( event ) {
this . onEnterKey ( event ) ;
} , "onSpaceKey" ) ,
onEscapeKey : /* @__PURE__ */ _ _name ( function onEscapeKey3 ( event ) {
if ( this . focusedItemInfo . level !== 0 ) {
var _focusedItemInfo = this . focusedItemInfo ;
this . hide ( event , false ) ;
this . focusedItemInfo = {
index : Number ( _focusedItemInfo . parentKey . split ( "_" ) [ 0 ] ) ,
level : 0 ,
parentKey : ""
} ;
2024-10-28 18:29:38 +00:00
}
2025-01-02 21:18:54 +00:00
event . preventDefault ( ) ;
} , "onEscapeKey" ) ,
onTabKey : /* @__PURE__ */ _ _name ( function onTabKey3 ( event ) {
if ( this . focusedItemInfo . index !== - 1 ) {
var processedItem = this . visibleItems [ this . focusedItemInfo . index ] ;
var grouped = this . isProccessedItemGroup ( processedItem ) ;
! grouped && this . onItemChange ( {
originalEvent : event ,
processedItem
} ) ;
2024-10-28 18:29:38 +00:00
}
2025-01-02 21:18:54 +00:00
this . hide ( ) ;
} , "onTabKey" ) ,
bindOutsideClickListener : /* @__PURE__ */ _ _name ( function bindOutsideClickListener3 ( ) {
var _this5 = this ;
if ( ! this . outsideClickListener ) {
this . outsideClickListener = function ( event ) {
var isOutsideContainer = _this5 . container && ! _this5 . container . contains ( event . target ) ;
var isOutsideTarget = ! ( _this5 . target && ( _this5 . target === event . target || _this5 . target . contains ( event . target ) ) ) ;
if ( isOutsideContainer && isOutsideTarget ) {
_this5 . hide ( ) ;
}
} ;
document . addEventListener ( "click" , this . outsideClickListener ) ;
2024-10-28 18:29:38 +00:00
}
2025-01-02 21:18:54 +00:00
} , "bindOutsideClickListener" ) ,
unbindOutsideClickListener : /* @__PURE__ */ _ _name ( function unbindOutsideClickListener3 ( ) {
if ( this . outsideClickListener ) {
document . removeEventListener ( "click" , this . outsideClickListener ) ;
this . outsideClickListener = null ;
2024-10-28 18:29:38 +00:00
}
2025-01-02 21:18:54 +00:00
} , "unbindOutsideClickListener" ) ,
bindResizeListener : /* @__PURE__ */ _ _name ( function bindResizeListener3 ( ) {
var _this6 = this ;
if ( ! this . resizeListener ) {
this . resizeListener = function ( event ) {
if ( ! isTouchDevice ( ) ) {
_this6 . hide ( event , true ) ;
}
_this6 . mobileActive = false ;
} ;
window . addEventListener ( "resize" , this . resizeListener ) ;
}
} , "bindResizeListener" ) ,
unbindResizeListener : /* @__PURE__ */ _ _name ( function unbindResizeListener3 ( ) {
if ( this . resizeListener ) {
window . removeEventListener ( "resize" , this . resizeListener ) ;
this . resizeListener = null ;
}
} , "unbindResizeListener" ) ,
2025-01-31 18:07:37 +00:00
bindMatchMediaListener : /* @__PURE__ */ _ _name ( function bindMatchMediaListener2 ( ) {
2025-01-02 21:18:54 +00:00
var _this7 = this ;
if ( ! this . matchMediaListener ) {
var query = matchMedia ( "(max-width: " . concat ( this . breakpoint , ")" ) ) ;
this . query = query ;
this . queryMatches = query . matches ;
this . matchMediaListener = function ( ) {
_this7 . queryMatches = query . matches ;
_this7 . mobileActive = false ;
} ;
this . query . addEventListener ( "change" , this . matchMediaListener ) ;
}
} , "bindMatchMediaListener" ) ,
2025-01-31 18:07:37 +00:00
unbindMatchMediaListener : /* @__PURE__ */ _ _name ( function unbindMatchMediaListener2 ( ) {
2025-01-02 21:18:54 +00:00
if ( this . matchMediaListener ) {
this . query . removeEventListener ( "change" , this . matchMediaListener ) ;
this . matchMediaListener = null ;
}
} , "unbindMatchMediaListener" ) ,
isItemMatched : /* @__PURE__ */ _ _name ( function isItemMatched2 ( processedItem ) {
var _this$getProccessedIt ;
return this . isValidItem ( processedItem ) && ( ( _this$getProccessedIt = this . getProccessedItemLabel ( processedItem ) ) === null || _this$getProccessedIt === void 0 ? void 0 : _this$getProccessedIt . toLocaleLowerCase ( ) . startsWith ( this . searchValue . toLocaleLowerCase ( ) ) ) ;
} , "isItemMatched" ) ,
isValidItem : /* @__PURE__ */ _ _name ( function isValidItem2 ( processedItem ) {
return ! ! processedItem && ! this . isItemDisabled ( processedItem . item ) && ! this . isItemSeparator ( processedItem . item ) && this . isItemVisible ( processedItem . item ) ;
} , "isValidItem" ) ,
isValidSelectedItem : /* @__PURE__ */ _ _name ( function isValidSelectedItem2 ( processedItem ) {
return this . isValidItem ( processedItem ) && this . isSelected ( processedItem ) ;
} , "isValidSelectedItem" ) ,
isSelected : /* @__PURE__ */ _ _name ( function isSelected3 ( processedItem ) {
return this . activeItemPath . some ( function ( p ) {
return p . key === processedItem . key ;
} ) ;
} , "isSelected" ) ,
findFirstItemIndex : /* @__PURE__ */ _ _name ( function findFirstItemIndex2 ( ) {
var _this8 = this ;
return this . visibleItems . findIndex ( function ( processedItem ) {
return _this8 . isValidItem ( processedItem ) ;
} ) ;
} , "findFirstItemIndex" ) ,
findLastItemIndex : /* @__PURE__ */ _ _name ( function findLastItemIndex2 ( ) {
var _this9 = this ;
return findLastIndex ( this . visibleItems , function ( processedItem ) {
return _this9 . isValidItem ( processedItem ) ;
} ) ;
} , "findLastItemIndex" ) ,
findNextItemIndex : /* @__PURE__ */ _ _name ( function findNextItemIndex2 ( index ) {
var _this10 = this ;
var matchedItemIndex = index < this . visibleItems . length - 1 ? this . visibleItems . slice ( index + 1 ) . findIndex ( function ( processedItem ) {
return _this10 . isValidItem ( processedItem ) ;
} ) : - 1 ;
return matchedItemIndex > - 1 ? matchedItemIndex + index + 1 : index ;
} , "findNextItemIndex" ) ,
findPrevItemIndex : /* @__PURE__ */ _ _name ( function findPrevItemIndex2 ( index ) {
var _this11 = this ;
var matchedItemIndex = index > 0 ? findLastIndex ( this . visibleItems . slice ( 0 , index ) , function ( processedItem ) {
return _this11 . isValidItem ( processedItem ) ;
} ) : - 1 ;
return matchedItemIndex > - 1 ? matchedItemIndex : index ;
} , "findPrevItemIndex" ) ,
findSelectedItemIndex : /* @__PURE__ */ _ _name ( function findSelectedItemIndex2 ( ) {
var _this12 = this ;
return this . visibleItems . findIndex ( function ( processedItem ) {
return _this12 . isValidSelectedItem ( processedItem ) ;
} ) ;
} , "findSelectedItemIndex" ) ,
findFirstFocusedItemIndex : /* @__PURE__ */ _ _name ( function findFirstFocusedItemIndex2 ( ) {
var selectedIndex = this . findSelectedItemIndex ( ) ;
return selectedIndex < 0 ? this . findFirstItemIndex ( ) : selectedIndex ;
} , "findFirstFocusedItemIndex" ) ,
findLastFocusedItemIndex : /* @__PURE__ */ _ _name ( function findLastFocusedItemIndex2 ( ) {
var selectedIndex = this . findSelectedItemIndex ( ) ;
return selectedIndex < 0 ? this . findLastItemIndex ( ) : selectedIndex ;
} , "findLastFocusedItemIndex" ) ,
searchItems : /* @__PURE__ */ _ _name ( function searchItems2 ( event , _char ) {
var _this13 = this ;
this . searchValue = ( this . searchValue || "" ) + _char ;
var itemIndex = - 1 ;
var matched = false ;
if ( this . focusedItemInfo . index !== - 1 ) {
itemIndex = this . visibleItems . slice ( this . focusedItemInfo . index ) . findIndex ( function ( processedItem ) {
return _this13 . isItemMatched ( processedItem ) ;
} ) ;
itemIndex = itemIndex === - 1 ? this . visibleItems . slice ( 0 , this . focusedItemInfo . index ) . findIndex ( function ( processedItem ) {
return _this13 . isItemMatched ( processedItem ) ;
} ) : itemIndex + this . focusedItemInfo . index ;
} else {
itemIndex = this . visibleItems . findIndex ( function ( processedItem ) {
return _this13 . isItemMatched ( processedItem ) ;
} ) ;
}
if ( itemIndex !== - 1 ) {
matched = true ;
}
if ( itemIndex === - 1 && this . focusedItemInfo . index === - 1 ) {
itemIndex = this . findFirstFocusedItemIndex ( ) ;
}
if ( itemIndex !== - 1 ) {
this . changeFocusedItemIndex ( event , itemIndex ) ;
2024-10-28 18:29:38 +00:00
}
2025-01-02 21:18:54 +00:00
if ( this . searchTimeout ) {
clearTimeout ( this . searchTimeout ) ;
2024-10-28 18:29:38 +00:00
}
2025-01-02 21:18:54 +00:00
this . searchTimeout = setTimeout ( function ( ) {
_this13 . searchValue = "" ;
_this13 . searchTimeout = null ;
} , 500 ) ;
return matched ;
} , "searchItems" ) ,
changeFocusedItemIndex : /* @__PURE__ */ _ _name ( function changeFocusedItemIndex2 ( event , index ) {
if ( this . focusedItemInfo . index !== index ) {
this . focusedItemInfo . index = index ;
this . scrollInView ( ) ;
}
} , "changeFocusedItemIndex" ) ,
scrollInView : /* @__PURE__ */ _ _name ( function scrollInView4 ( ) {
var index = arguments . length > 0 && arguments [ 0 ] !== void 0 ? arguments [ 0 ] : - 1 ;
var id2 = index !== - 1 ? "" . concat ( this . id , "_" ) . concat ( index ) : this . focusedItemId ;
var element = findSingle ( this . menubar , 'li[id="' . concat ( id2 , '"]' ) ) ;
if ( element ) {
element . scrollIntoView && element . scrollIntoView ( {
block : "nearest" ,
inline : "start"
} ) ;
}
} , "scrollInView" ) ,
createProcessedItems : /* @__PURE__ */ _ _name ( function createProcessedItems2 ( items ) {
var _this14 = this ;
var level = arguments . length > 1 && arguments [ 1 ] !== void 0 ? arguments [ 1 ] : 0 ;
var parent = arguments . length > 2 && arguments [ 2 ] !== void 0 ? arguments [ 2 ] : { } ;
var parentKey = arguments . length > 3 && arguments [ 3 ] !== void 0 ? arguments [ 3 ] : "" ;
var processedItems3 = [ ] ;
items && items . forEach ( function ( item3 , index ) {
var key = ( parentKey !== "" ? parentKey + "_" : "" ) + index ;
var newItem = {
item : item3 ,
index ,
level ,
key ,
parent ,
parentKey
} ;
newItem [ "items" ] = _this14 . createProcessedItems ( item3 . items , level + 1 , newItem , key ) ;
processedItems3 . push ( newItem ) ;
} ) ;
return processedItems3 ;
} , "createProcessedItems" ) ,
containerRef : /* @__PURE__ */ _ _name ( function containerRef3 ( el ) {
this . container = el ;
} , "containerRef" ) ,
menubarRef : /* @__PURE__ */ _ _name ( function menubarRef2 ( el ) {
this . menubar = el ? el . $el : void 0 ;
} , "menubarRef" )
} ,
computed : {
processedItems : /* @__PURE__ */ _ _name ( function processedItems2 ( ) {
return this . createProcessedItems ( this . model || [ ] ) ;
} , "processedItems" ) ,
visibleItems : /* @__PURE__ */ _ _name ( function visibleItems2 ( ) {
var _this15 = this ;
var processedItem = this . activeItemPath . find ( function ( p ) {
return p . key === _this15 . focusedItemInfo . parentKey ;
2024-10-28 18:29:38 +00:00
} ) ;
2025-01-02 21:18:54 +00:00
return processedItem ? processedItem . items : this . processedItems ;
} , "visibleItems" ) ,
focusedItemId : /* @__PURE__ */ _ _name ( function focusedItemId2 ( ) {
return this . focusedItemInfo . index !== - 1 ? "" . concat ( this . id ) . concat ( isNotEmpty ( this . focusedItemInfo . parentKey ) ? "_" + this . focusedItemInfo . parentKey : "" , "_" ) . concat ( this . focusedItemInfo . index ) : null ;
} , "focusedItemId" )
} ,
components : {
MenubarSub : script$1 ,
2025-02-15 09:32:47 +00:00
BarsIcon : script$q
2025-01-02 21:18:54 +00:00
}
} ;
function _typeof ( o ) {
"@babel/helpers - typeof" ;
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol . iterator ? function ( o2 ) {
return typeof o2 ;
} : function ( o2 ) {
return o2 && "function" == typeof Symbol && o2 . constructor === Symbol && o2 !== Symbol . prototype ? "symbol" : typeof o2 ;
} , _typeof ( o ) ;
}
_ _name ( _typeof , "_typeof" ) ;
function ownKeys ( e , r ) {
var t = Object . keys ( e ) ;
if ( Object . getOwnPropertySymbols ) {
var o = Object . getOwnPropertySymbols ( e ) ;
r && ( o = o . filter ( function ( r2 ) {
return Object . getOwnPropertyDescriptor ( e , r2 ) . enumerable ;
} ) ) , t . push . apply ( t , o ) ;
}
return t ;
}
_ _name ( ownKeys , "ownKeys" ) ;
function _objectSpread ( e ) {
for ( var r = 1 ; r < arguments . length ; r ++ ) {
var t = null != arguments [ r ] ? arguments [ r ] : { } ;
r % 2 ? ownKeys ( Object ( t ) , true ) . forEach ( function ( r2 ) {
_defineProperty ( e , r2 , t [ r2 ] ) ;
} ) : Object . getOwnPropertyDescriptors ? Object . defineProperties ( e , Object . getOwnPropertyDescriptors ( t ) ) : ownKeys ( Object ( t ) ) . forEach ( function ( r2 ) {
Object . defineProperty ( e , r2 , Object . getOwnPropertyDescriptor ( t , r2 ) ) ;
2024-10-28 18:29:38 +00:00
} ) ;
2025-01-02 21:18:54 +00:00
}
return e ;
}
_ _name ( _objectSpread , "_objectSpread" ) ;
function _defineProperty ( e , r , t ) {
return ( r = _toPropertyKey ( r ) ) in e ? Object . defineProperty ( e , r , { value : t , enumerable : true , configurable : true , writable : true } ) : e [ r ] = t , e ;
}
_ _name ( _defineProperty , "_defineProperty" ) ;
function _toPropertyKey ( t ) {
var i = _toPrimitive ( t , "string" ) ;
return "symbol" == _typeof ( i ) ? i : i + "" ;
}
_ _name ( _toPropertyKey , "_toPropertyKey" ) ;
function _toPrimitive ( t , r ) {
if ( "object" != _typeof ( t ) || ! t ) return t ;
var e = t [ Symbol . toPrimitive ] ;
if ( void 0 !== e ) {
var i = e . call ( t , r || "default" ) ;
if ( "object" != _typeof ( i ) ) return i ;
throw new TypeError ( "@@toPrimitive must return a primitive value." ) ;
}
return ( "string" === r ? String : Number ) ( t ) ;
}
_ _name ( _toPrimitive , "_toPrimitive" ) ;
2025-01-31 18:07:37 +00:00
var _hoisted _1 = [ "aria-haspopup" , "aria-expanded" , "aria-controls" , "aria-label" ] ;
2025-01-02 21:18:54 +00:00
function render ( _ctx , _cache , $props , $setup , $data , $options ) {
var _component _BarsIcon = resolveComponent ( "BarsIcon" ) ;
var _component _MenubarSub = resolveComponent ( "MenubarSub" ) ;
return openBlock ( ) , createElementBlock ( "div" , mergeProps ( {
ref : $options . containerRef ,
"class" : _ctx . cx ( "root" )
} , _ctx . ptmi ( "root" ) ) , [ _ctx . $slots . start ? ( openBlock ( ) , createElementBlock ( "div" , mergeProps ( {
key : 0 ,
"class" : _ctx . cx ( "start" )
} , _ctx . ptm ( "start" ) ) , [ renderSlot ( _ctx . $slots , "start" ) ] , 16 ) ) : createCommentVNode ( "" , true ) , renderSlot ( _ctx . $slots , _ctx . $slots . button ? "button" : "menubutton" , {
id : $data . id ,
"class" : normalizeClass ( _ctx . cx ( "button" ) ) ,
toggleCallback : /* @__PURE__ */ _ _name ( function toggleCallback ( event ) {
return $options . menuButtonClick ( event ) ;
} , "toggleCallback" )
} , function ( ) {
var _ctx$$primevue$config ;
return [ _ctx . model && _ctx . model . length > 0 ? ( openBlock ( ) , createElementBlock ( "a" , mergeProps ( {
key : 0 ,
ref : "menubutton" ,
role : "button" ,
tabindex : "0" ,
"class" : _ctx . cx ( "button" ) ,
"aria-haspopup" : _ctx . model . length && _ctx . model . length > 0 ? true : false ,
"aria-expanded" : $data . mobileActive ,
"aria-controls" : $data . id ,
"aria-label" : ( _ctx$$primevue$config = _ctx . $primevue . config . locale . aria ) === null || _ctx$$primevue$config === void 0 ? void 0 : _ctx$$primevue$config . navigation ,
onClick : _cache [ 0 ] || ( _cache [ 0 ] = function ( $event ) {
return $options . menuButtonClick ( $event ) ;
} ) ,
onKeydown : _cache [ 1 ] || ( _cache [ 1 ] = function ( $event ) {
return $options . menuButtonKeydown ( $event ) ;
} )
} , _objectSpread ( _objectSpread ( { } , _ctx . buttonProps ) , _ctx . ptm ( "button" ) ) ) , [ renderSlot ( _ctx . $slots , _ctx . $slots . buttonicon ? "buttonicon" : "menubuttonicon" , { } , function ( ) {
return [ createVNode ( _component _BarsIcon , normalizeProps ( guardReactiveProps ( _ctx . ptm ( "buttonicon" ) ) ) , null , 16 ) ] ;
2025-01-31 18:07:37 +00:00
} ) ] , 16 , _hoisted _1 ) ) : createCommentVNode ( "" , true ) ] ;
2025-01-02 21:18:54 +00:00
} ) , createVNode ( _component _MenubarSub , {
ref : $options . menubarRef ,
id : $data . id + "_list" ,
role : "menubar" ,
items : $options . processedItems ,
templates : _ctx . $slots ,
root : true ,
mobileActive : $data . mobileActive ,
tabindex : "0" ,
"aria-activedescendant" : $data . focused ? $options . focusedItemId : void 0 ,
menuId : $data . id ,
focusedItemId : $data . focused ? $options . focusedItemId : void 0 ,
activeItemPath : $data . activeItemPath ,
level : 0 ,
"aria-labelledby" : _ctx . ariaLabelledby ,
"aria-label" : _ctx . ariaLabel ,
pt : _ctx . pt ,
unstyled : _ctx . unstyled ,
onFocus : $options . onFocus ,
onBlur : $options . onBlur ,
onKeydown : $options . onKeyDown ,
onItemClick : $options . onItemClick ,
onItemMouseenter : $options . onItemMouseEnter ,
onItemMousemove : $options . onItemMouseMove
} , null , 8 , [ "id" , "items" , "templates" , "mobileActive" , "aria-activedescendant" , "menuId" , "focusedItemId" , "activeItemPath" , "aria-labelledby" , "aria-label" , "pt" , "unstyled" , "onFocus" , "onBlur" , "onKeydown" , "onItemClick" , "onItemMouseenter" , "onItemMousemove" ] ) , _ctx . $slots . end ? ( openBlock ( ) , createElementBlock ( "div" , mergeProps ( {
key : 1 ,
"class" : _ctx . cx ( "end" )
} , _ctx . ptm ( "end" ) ) , [ renderSlot ( _ctx . $slots , "end" ) ] , 16 ) ) : createCommentVNode ( "" , true ) ] , 16 ) ;
}
_ _name ( render , "render" ) ;
script . render = render ;
2024-10-28 18:29:38 +00:00
export {
2025-02-15 09:32:47 +00:00
script$b as a ,
script$8 as b ,
script$9 as c ,
script$7 as d ,
script$6 as e ,
script$5 as f ,
script$3 as g ,
script as h ,
script$a as s
2024-10-28 18:29:38 +00:00
} ;
2025-02-15 09:32:47 +00:00
//# sourceMappingURL=index-DSWvxALN.js.map