import{E as e,L as t,Q as n,S as r,T as i,X as a,Y as o,Z as s,_t as c,b as l,dt as u,ft as d,ht as f,mt as p,p as m,q as h,w as g,x as _,y as v}from"./vue-i18n-Bp4YYb-2.js";import{$ as y,D as b,Dt as x,Ft as S,G as C,I as w,It as T,K as E,N as D,Ot as O,Pt as k,V as A,Z as j,a as M,k as N,tt as P}from"./index-BOiiIZox.js";import{t as F}from"./blank-8CXb5Snb.js";import{i as I,n as L,r as R,t as z}from"./virtualscroller-DqxgZJZu.js";var B=A.extend({name:`listbox`,style:`
    .p-listbox {
        display: block;
        background: dt('listbox.background');
        color: dt('listbox.color');
        border: 1px solid dt('listbox.border.color');
        border-radius: dt('listbox.border.radius');
        transition:
            background dt('listbox.transition.duration'),
            color dt('listbox.transition.duration'),
            border-color dt('listbox.transition.duration'),
            box-shadow dt('listbox.transition.duration'),
            outline-color dt('listbox.transition.duration');
        outline-color: transparent;
        box-shadow: dt('listbox.shadow');
    }

    .p-listbox.p-disabled {
        opacity: 1;
        background: dt('listbox.disabled.background');
        color: dt('listbox.disabled.color');
    }

    .p-listbox.p-disabled .p-listbox-option {
        color: dt('listbox.disabled.color');
    }

    .p-listbox.p-invalid {
        border-color: dt('listbox.invalid.border.color');
    }

    .p-listbox-header {
        padding: dt('listbox.list.header.padding');
    }

    .p-listbox-filter {
        width: 100%;
    }

    .p-listbox-list-container {
        overflow: auto;
    }

    .p-listbox-list {
        list-style-type: none;
        margin: 0;
        padding: dt('listbox.list.padding');
        outline: 0 none;
        display: flex;
        flex-direction: column;
        gap: dt('listbox.list.gap');
    }

    .p-listbox-option {
        display: flex;
        align-items: center;
        cursor: pointer;
        position: relative;
        overflow: hidden;
        padding: dt('listbox.option.padding');
        border: 0 none;
        border-radius: dt('listbox.option.border.radius');
        color: dt('listbox.option.color');
        transition:
            background dt('listbox.transition.duration'),
            color dt('listbox.transition.duration'),
            border-color dt('listbox.transition.duration'),
            box-shadow dt('listbox.transition.duration'),
            outline-color dt('listbox.transition.duration');
    }

    .p-listbox-striped li:nth-child(even of .p-listbox-option) {
        background: dt('listbox.option.striped.background');
    }

    .p-listbox .p-listbox-list .p-listbox-option.p-listbox-option-selected {
        background: dt('listbox.option.selected.background');
        color: dt('listbox.option.selected.color');
    }

    .p-listbox:not(.p-disabled) .p-listbox-option.p-listbox-option-selected.p-focus {
        background: dt('listbox.option.selected.focus.background');
        color: dt('listbox.option.selected.focus.color');
    }

    .p-listbox:not(.p-disabled) .p-listbox-option:not(.p-listbox-option-selected):not(.p-disabled).p-focus {
        background: dt('listbox.option.focus.background');
        color: dt('listbox.option.focus.color');
    }

    .p-listbox:not(.p-disabled) .p-listbox-option:not(.p-listbox-option-selected):not(.p-disabled):hover {
        background: dt('listbox.option.focus.background');
        color: dt('listbox.option.focus.color');
    }

    .p-listbox-option-blank-icon {
        flex-shrink: 0;
    }

    .p-listbox-option-check-icon {
        position: relative;
        flex-shrink: 0;
        margin-inline-start: dt('listbox.checkmark.gutter.start');
        margin-inline-end: dt('listbox.checkmark.gutter.end');
        color: dt('listbox.checkmark.color');
    }

    .p-listbox-option-group {
        margin: 0;
        padding: dt('listbox.option.group.padding');
        color: dt('listbox.option.group.color');
        background: dt('listbox.option.group.background');
        font-weight: dt('listbox.option.group.font.weight');
    }

    .p-listbox-empty-message {
        padding: dt('listbox.empty.message.padding');
    }

    .p-listbox-fluid {
        width: 100%;
    }
`,classes:{root:function(e){var t=e.instance,n=e.props;return[`p-listbox p-component`,{"p-listbox-striped":n.striped,"p-disabled":n.disabled,"p-listbox-fluid":n.fluid,"p-invalid":t.$invalid}]},header:`p-listbox-header`,pcFilter:`p-listbox-filter`,listContainer:`p-listbox-list-container`,list:`p-listbox-list`,optionGroup:`p-listbox-option-group`,option:function(e){var t=e.instance,n=e.props,r=e.option,i=e.index,a=e.getItemOptions;return[`p-listbox-option`,{"p-listbox-option-selected":t.isSelected(r)&&n.highlightOnSelect,"p-focus":t.focusedOptionIndex===t.getOptionIndex(i,a),"p-disabled":t.isOptionDisabled(r)}]},optionCheckIcon:`p-listbox-option-check-icon`,optionBlankIcon:`p-listbox-option-blank-icon`,emptyMessage:`p-listbox-empty-message`}}),V={name:`BaseListbox`,extends:N,props:{options:Array,optionLabel:null,optionValue:null,optionDisabled:null,optionGroupLabel:null,optionGroupChildren:null,listStyle:null,scrollHeight:{type:String,default:`14rem`},dataKey:null,multiple:{type:Boolean,default:!1},metaKeySelection:{type:Boolean,default:!1},filter:Boolean,filterPlaceholder:String,filterLocale:String,filterMatchMode:{type:String,default:`contains`},filterFields:{type:Array,default:null},virtualScrollerOptions:{type:Object,default:null},autoOptionFocus:{type:Boolean,default:!0},selectOnFocus:{type:Boolean,default:!1},focusOnHover:{type:Boolean,default:!0},highlightOnSelect:{type:Boolean,default:!0},checkmark:{type:Boolean,default:!1},filterMessage:{type:String,default:null},selectionMessage:{type:String,default:null},emptySelectionMessage:{type:String,default:null},emptyFilterMessage:{type:String,default:null},emptyMessage:{type:String,default:null},filterIcon:{type:String,default:void 0},striped:{type:Boolean,default:!1},tabindex:{type:Number,default:0},fluid:{type:Boolean,default:null},ariaLabel:{type:String,default:null},ariaLabelledby:{type:String,default:null}},style:B,provide:function(){return{$pcListbox:this,$parentInstance:this}}};function H(e){return K(e)||G(e)||W(e)||U()}function U(){throw TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function W(e,t){if(e){if(typeof e==`string`)return q(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?q(e,t):void 0}}function G(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function K(e){if(Array.isArray(e))return q(e)}function q(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var J={name:`Listbox`,extends:V,inheritAttrs:!1,emits:[`change`,`focus`,`blur`,`filter`,`item-dblclick`,`option-dblclick`],list:null,virtualScroller:null,optionTouched:!1,startRangeIndex:-1,searchTimeout:null,searchValue:``,data:function(){return{filterValue:null,focused:!1,focusedOptionIndex:-1}},watch:{options:function(){this.autoUpdateModel()}},mounted:function(){this.autoUpdateModel()},methods:{getOptionIndex:function(e,t){return this.virtualScrollerDisabled?e:t&&t(e).index},getOptionLabel:function(e){return this.optionLabel?y(e,this.optionLabel):typeof e==`string`||typeof e==`number`||typeof e==`boolean`?e:null},getOptionValue:function(e){return this.optionValue?y(e,this.optionValue):e},getOptionRenderKey:function(e,t){return(this.dataKey?y(e,this.dataKey):this.getOptionLabel(e))+`_`+t},getPTOptions:function(e,t,n,r){return this.ptm(r,{context:{selected:this.isSelected(e),focused:this.focusedOptionIndex===this.getOptionIndex(n,t),disabled:this.isOptionDisabled(e)}})},isOptionDisabled:function(e){return this.optionDisabled?y(e,this.optionDisabled):!1},isOptionGroup:function(e){return this.optionGroupLabel&&e.optionGroup&&e.group},getOptionGroupLabel:function(e){return y(e,this.optionGroupLabel)},getOptionGroupChildren:function(e){return y(e,this.optionGroupChildren)},getAriaPosInset:function(e){var t=this;return(this.optionGroupLabel?e-this.visibleOptions.slice(0,e).filter(function(e){return t.isOptionGroup(e)}).length:e)+1},onFirstHiddenFocus:function(){x(this.list);var e=k(this.$el,`:not([data-p-hidden-focusable="true"])`);this.$refs.lastHiddenFocusableElement.tabIndex=O(e)?void 0:-1,this.$refs.firstHiddenFocusableElement.tabIndex=-1},onLastHiddenFocus:function(e){e.relatedTarget===this.list?(x(k(this.$el,`:not([data-p-hidden-focusable="true"])`)),this.$refs.firstHiddenFocusableElement.tabIndex=void 0):x(this.$refs.firstHiddenFocusableElement),this.$refs.lastHiddenFocusableElement.tabIndex=-1},onFocusout:function(e){!this.$el.contains(e.relatedTarget)&&this.$refs.lastHiddenFocusableElement&&this.$refs.firstHiddenFocusableElement&&(this.$refs.lastHiddenFocusableElement.tabIndex=this.$refs.firstHiddenFocusableElement.tabIndex=void 0)},onListFocus:function(e){this.focused=!0,this.focusedOptionIndex=this.focusedOptionIndex===-1?this.autoOptionFocus?this.findFirstFocusedOptionIndex():this.findSelectedOptionIndex():this.focusedOptionIndex,this.autoUpdateModel(),this.scrollInView(this.focusedOptionIndex),this.$emit(`focus`,e)},onListBlur:function(e){this.focused=!1,this.focusedOptionIndex=this.startRangeIndex=-1,this.searchValue=``,this.$emit(`blur`,e)},onListKeyDown:function(e){var t=this,n=e.metaKey||e.ctrlKey;switch(e.code){case`ArrowDown`:this.onArrowDownKey(e);break;case`ArrowUp`:this.onArrowUpKey(e);break;case`Home`:this.onHomeKey(e);break;case`End`:this.onEndKey(e);break;case`PageDown`:this.onPageDownKey(e);break;case`PageUp`:this.onPageUpKey(e);break;case`Enter`:case`NumpadEnter`:case`Space`:this.onSpaceKey(e);break;case`Tab`:break;case`ShiftLeft`:case`ShiftRight`:this.onShiftKey(e);break;default:if(this.multiple&&e.code===`KeyA`&&n){var r=this.visibleOptions.filter(function(e){return t.isValidOption(e)}).map(function(e){return t.getOptionValue(e)});this.updateModel(e,r),e.preventDefault();break}!n&&C(e.key)&&(this.searchOptions(e,e.key),e.preventDefault());break}},onOptionSelect:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:-1;this.disabled||this.isOptionDisabled(t)||(this.multiple?this.onOptionSelectMultiple(e,t):this.onOptionSelectSingle(e,t),this.optionTouched=!1,n!==-1&&(this.focusedOptionIndex=n))},onOptionMouseDown:function(e,t){this.changeFocusedOptionIndex(e,t)},onOptionMouseMove:function(e,t){this.focusOnHover&&this.focused&&this.changeFocusedOptionIndex(e,t)},onOptionTouchEnd:function(){this.disabled||(this.optionTouched=!0)},onOptionDblClick:function(e,t){this.$emit(`item-dblclick`,{originalEvent:e,value:t}),this.$emit(`option-dblclick`,{originalEvent:e,value:t})},onOptionSelectSingle:function(e,t){var n=this.isSelected(t),r=!1,i=null;if(!this.optionTouched&&this.metaKeySelection){var a=e&&(e.metaKey||e.ctrlKey);n?a&&(i=null,r=!0):(i=this.getOptionValue(t),r=!0)}else i=n?null:this.getOptionValue(t),r=!0;r&&this.updateModel(e,i)},onOptionSelectMultiple:function(e,t){var n=this.isSelected(t),r=null;if(!this.optionTouched&&this.metaKeySelection){var i=e.metaKey||e.ctrlKey;n?r=i?this.removeOption(t):[this.getOptionValue(t)]:(r=i&&this.d_value||[],r=[].concat(H(r),[this.getOptionValue(t)]))}else r=n?this.removeOption(t):[].concat(H(this.d_value||[]),[this.getOptionValue(t)]);this.updateModel(e,r)},onOptionSelectRange:function(e){var t=this,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:-1,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:-1;if(n===-1&&(n=this.findNearestSelectedOptionIndex(r,!0)),r===-1&&(r=this.findNearestSelectedOptionIndex(n)),n!==-1&&r!==-1){var i=Math.min(n,r),a=Math.max(n,r),o=this.visibleOptions.slice(i,a+1).filter(function(e){return t.isValidOption(e)}).map(function(e){return t.getOptionValue(e)});this.updateModel(e,o)}},onFilterChange:function(e){this.$emit(`filter`,{originalEvent:e,value:e.target.value,filterValue:this.visibleOptions}),this.focusedOptionIndex=this.startRangeIndex=-1},onFilterKeyDown:function(e){switch(e.code){case`ArrowDown`:this.onArrowDownKey(e);break;case`ArrowUp`:this.onArrowUpKey(e);break;case`ArrowLeft`:case`ArrowRight`:this.onArrowLeftKey(e,!0);break;case`Home`:this.onHomeKey(e,!0);break;case`End`:this.onEndKey(e,!0);break;case`Enter`:case`NumpadEnter`:this.onEnterKey(e);break;case`ShiftLeft`:case`ShiftRight`:this.onShiftKey(e);break}},onArrowDownKey:function(e){var t=this.focusedOptionIndex===-1?this.findFirstFocusedOptionIndex():this.findNextOptionIndex(this.focusedOptionIndex);this.multiple&&e.shiftKey&&this.onOptionSelectRange(e,this.startRangeIndex,t),this.changeFocusedOptionIndex(e,t),e.preventDefault()},onArrowUpKey:function(e){var t=this.focusedOptionIndex===-1?this.findLastFocusedOptionIndex():this.findPrevOptionIndex(this.focusedOptionIndex);this.multiple&&e.shiftKey&&this.onOptionSelectRange(e,t,this.startRangeIndex),this.changeFocusedOptionIndex(e,t),e.preventDefault()},onArrowLeftKey:function(e){arguments.length>1&&arguments[1]!==void 0&&arguments[1]&&(this.focusedOptionIndex=-1)},onHomeKey:function(e){if(arguments.length>1&&arguments[1]!==void 0&&arguments[1]){var t=e.currentTarget;e.shiftKey?t.setSelectionRange(0,e.target.selectionStart):(t.setSelectionRange(0,0),this.focusedOptionIndex=-1)}else{var n=e.metaKey||e.ctrlKey,r=this.findFirstOptionIndex();this.multiple&&e.shiftKey&&n&&this.onOptionSelectRange(e,r,this.startRangeIndex),this.changeFocusedOptionIndex(e,r)}e.preventDefault()},onEndKey:function(e){if(arguments.length>1&&arguments[1]!==void 0&&arguments[1]){var t=e.currentTarget;if(e.shiftKey)t.setSelectionRange(e.target.selectionStart,t.value.length);else{var n=t.value.length;t.setSelectionRange(n,n),this.focusedOptionIndex=-1}}else{var r=e.metaKey||e.ctrlKey,i=this.findLastOptionIndex();this.multiple&&e.shiftKey&&r&&this.onOptionSelectRange(e,this.startRangeIndex,i),this.changeFocusedOptionIndex(e,i)}e.preventDefault()},onPageUpKey:function(e){this.scrollInView(0),e.preventDefault()},onPageDownKey:function(e){this.scrollInView(this.visibleOptions.length-1),e.preventDefault()},onEnterKey:function(e){this.focusedOptionIndex!==-1&&(this.multiple&&e.shiftKey?this.onOptionSelectRange(e,this.focusedOptionIndex):this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]))},onSpaceKey:function(e){e.preventDefault(),this.onEnterKey(e)},onShiftKey:function(){this.startRangeIndex=this.focusedOptionIndex},isOptionMatched:function(e){return this.isValidOption(e)&&typeof this.getOptionLabel(e)==`string`&&this.getOptionLabel(e)?.toLocaleLowerCase(this.filterLocale).startsWith(this.searchValue.toLocaleLowerCase(this.filterLocale))},isValidOption:function(e){return P(e)&&!(this.isOptionDisabled(e)||this.isOptionGroup(e))},isValidSelectedOption:function(e){return this.isValidOption(e)&&this.isSelected(e)},isEquals:function(e,t){return j(e,t,this.equalityKey)},isSelected:function(e){var t=this,n=this.getOptionValue(e);return this.multiple?(this.d_value||[]).some(function(e){return t.isEquals(e,n)}):this.isEquals(this.d_value,n)},findFirstOptionIndex:function(){var e=this;return this.visibleOptions.findIndex(function(t){return e.isValidOption(t)})},findLastOptionIndex:function(){var e=this;return E(this.visibleOptions,function(t){return e.isValidOption(t)})},findNextOptionIndex:function(e){var t=this,n=e<this.visibleOptions.length-1?this.visibleOptions.slice(e+1).findIndex(function(e){return t.isValidOption(e)}):-1;return n>-1?n+e+1:e},findPrevOptionIndex:function(e){var t=this,n=e>0?E(this.visibleOptions.slice(0,e),function(e){return t.isValidOption(e)}):-1;return n>-1?n:e},findSelectedOptionIndex:function(){var e=this;if(this.$filled)if(this.multiple){for(var t=function(){var t=e.d_value[r],n=e.visibleOptions.findIndex(function(n){return e.isValidSelectedOption(n)&&e.isEquals(t,e.getOptionValue(n))});if(n>-1)return{v:n}},n,r=this.d_value.length-1;r>=0;r--)if(n=t(),n)return n.v}else return this.visibleOptions.findIndex(function(t){return e.isValidSelectedOption(t)});return-1},findFirstSelectedOptionIndex:function(){var e=this;return this.$filled?this.visibleOptions.findIndex(function(t){return e.isValidSelectedOption(t)}):-1},findLastSelectedOptionIndex:function(){var e=this;return this.$filled?E(this.visibleOptions,function(t){return e.isValidSelectedOption(t)}):-1},findNextSelectedOptionIndex:function(e){var t=this,n=this.$filled&&e<this.visibleOptions.length-1?this.visibleOptions.slice(e+1).findIndex(function(e){return t.isValidSelectedOption(e)}):-1;return n>-1?n+e+1:-1},findPrevSelectedOptionIndex:function(e){var t=this,n=this.$filled&&e>0?E(this.visibleOptions.slice(0,e),function(e){return t.isValidSelectedOption(e)}):-1;return n>-1?n:-1},findNearestSelectedOptionIndex:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=-1;return this.$filled&&(t?(n=this.findPrevSelectedOptionIndex(e),n=n===-1?this.findNextSelectedOptionIndex(e):n):(n=this.findNextSelectedOptionIndex(e),n=n===-1?this.findPrevSelectedOptionIndex(e):n)),n>-1?n:e},findFirstFocusedOptionIndex:function(){var e=this.findFirstSelectedOptionIndex();return e<0?this.findFirstOptionIndex():e},findLastFocusedOptionIndex:function(){var e=this.findLastSelectedOptionIndex();return e<0?this.findLastOptionIndex():e},searchOptions:function(e,t){var n=this;this.searchValue=(this.searchValue||``)+t;var r=-1;P(this.searchValue)&&(this.focusedOptionIndex===-1?r=this.visibleOptions.findIndex(function(e){return n.isOptionMatched(e)}):(r=this.visibleOptions.slice(this.focusedOptionIndex).findIndex(function(e){return n.isOptionMatched(e)}),r=r===-1?this.visibleOptions.slice(0,this.focusedOptionIndex).findIndex(function(e){return n.isOptionMatched(e)}):r+this.focusedOptionIndex),r===-1&&this.focusedOptionIndex===-1&&(r=this.findFirstFocusedOptionIndex()),r!==-1&&this.changeFocusedOptionIndex(e,r)),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(function(){n.searchValue=``,n.searchTimeout=null},500)},removeOption:function(e){var t=this;return this.d_value.filter(function(n){return!j(n,t.getOptionValue(e),t.equalityKey)})},changeFocusedOptionIndex:function(e,t){this.focusedOptionIndex!==t&&(this.focusedOptionIndex=t,this.scrollInView(),this.selectOnFocus&&!this.multiple&&this.onOptionSelect(e,this.visibleOptions[t]))},scrollInView:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:-1;this.$nextTick(function(){var n=t===-1?e.focusedOptionId:`${e.$id}_${t}`,r=S(e.list,`li[id="${n}"]`);r?r.scrollIntoView&&r.scrollIntoView({block:`nearest`,inline:`nearest`,behavior:`smooth`}):e.virtualScrollerDisabled||e.virtualScroller&&e.virtualScroller.scrollToIndex(t===-1?e.focusedOptionIndex:t)})},autoUpdateModel:function(){this.selectOnFocus&&this.autoOptionFocus&&!this.$filled&&!this.multiple&&this.focused&&(this.focusedOptionIndex=this.findFirstFocusedOptionIndex(),this.onOptionSelect(null,this.visibleOptions[this.focusedOptionIndex]))},updateModel:function(e,t){this.writeValue(t,e),this.$emit(`change`,{originalEvent:e,value:t})},listRef:function(e,t){this.list=e,t&&t(e)},virtualScrollerRef:function(e){this.virtualScroller=e}},computed:{optionsListFlat:function(){return this.filterValue?M.filter(this.options,this.searchFields,this.filterValue,this.filterMatchMode,this.filterLocale):this.options},optionsListGroup:function(){var e=this,t=[];return(this.options||[]).forEach(function(n){var r=e.getOptionGroupChildren(n)||[],i=e.filterValue?M.filter(r,e.searchFields,e.filterValue,e.filterMatchMode,e.filterLocale):r;i!=null&&i.length&&t.push.apply(t,[{optionGroup:n,group:!0}].concat(H(i)))}),t},visibleOptions:function(){return this.optionGroupLabel?this.optionsListGroup:this.optionsListFlat},hasSelectedOption:function(){return P(this.d_value)},equalityKey:function(){return this.optionValue?null:this.dataKey},searchFields:function(){return this.filterFields||[this.optionLabel]},filterResultMessageText:function(){return P(this.visibleOptions)?this.filterMessageText.replaceAll(`{0}`,this.visibleOptions.length):this.emptyFilterMessageText},filterMessageText:function(){return this.filterMessage||this.$primevue.config.locale.searchMessage||``},emptyFilterMessageText:function(){return this.emptyFilterMessage||this.$primevue.config.locale.emptySearchMessage||this.$primevue.config.locale.emptyFilterMessage||``},emptyMessageText:function(){return this.emptyMessage||this.$primevue.config.locale.emptyMessage||``},selectionMessageText:function(){return this.selectionMessage||this.$primevue.config.locale.selectionMessage||``},emptySelectionMessageText:function(){return this.emptySelectionMessage||this.$primevue.config.locale.emptySelectionMessage||``},selectedMessageText:function(){return this.$filled?this.selectionMessageText.replaceAll(`{0}`,this.multiple?this.d_value.length:`1`):this.emptySelectionMessageText},focusedOptionId:function(){return this.focusedOptionIndex===-1?null:`${this.$id}_${this.focusedOptionIndex}`},ariaSetSize:function(){var e=this;return this.visibleOptions.filter(function(t){return!e.isOptionGroup(t)}).length},virtualScrollerDisabled:function(){return!this.virtualScrollerOptions},containerDataP:function(){return T({invalid:this.$invalid,disabled:this.disabled})}},directives:{ripple:w},components:{InputText:b,VirtualScroller:z,InputIcon:L,IconField:R,SearchIcon:I,CheckIcon:D,BlankIcon:F}},Y=[`id`,`data-p`],X=[`tabindex`],Z=[`id`,`aria-multiselectable`,`aria-label`,`aria-labelledby`,`aria-activedescendant`,`aria-disabled`],Q=[`id`],$=[`id`,`aria-label`,`aria-selected`,`aria-disabled`,`aria-setsize`,`aria-posinset`,`onClick`,`onMousedown`,`onMousemove`,`onDblclick`,`data-p-selected`,`data-p-focused`,`data-p-disabled`],ee=[`tabindex`];function te(y,b,x,S,C,w){var T=s(`InputText`),E=s(`SearchIcon`),D=s(`InputIcon`),O=s(`IconField`),k=s(`CheckIcon`),A=s(`BlankIcon`),j=s(`VirtualScroller`),M=n(`ripple`);return h(),r(`div`,t({id:y.$id,class:y.cx(`root`),onFocusout:b[7]||(b[7]=function(){return w.onFocusout&&w.onFocusout.apply(w,arguments)}),"data-p":w.containerDataP},y.ptmi(`root`)),[v(`span`,t({ref:`firstHiddenFocusableElement`,role:`presentation`,"aria-hidden":`true`,class:`p-hidden-accessible p-hidden-focusable`,tabindex:y.disabled?-1:y.tabindex,onFocus:b[0]||(b[0]=function(){return w.onFirstHiddenFocus&&w.onFirstHiddenFocus.apply(w,arguments)})},y.ptm(`hiddenFirstFocusableEl`),{"data-p-hidden-accessible":!0,"data-p-hidden-focusable":!0}),null,16,X),y.$slots.header?(h(),r(`div`,t({key:0,class:y.cx(`header`)},y.ptm(`header`)),[a(y.$slots,`header`,{value:y.d_value,options:w.visibleOptions})],16)):_(``,!0),y.filter?(h(),r(`div`,t({key:1,class:y.cx(`header`)},y.ptm(`header`)),[e(O,{unstyled:y.unstyled,pt:y.ptm(`pcFilterContainer`)},{default:u(function(){return[e(T,{modelValue:C.filterValue,"onUpdate:modelValue":b[1]||(b[1]=function(e){return C.filterValue=e}),type:`text`,class:p(y.cx(`pcFilter`)),placeholder:y.filterPlaceholder,role:`searchbox`,autocomplete:`off`,disabled:y.disabled,unstyled:y.unstyled,"aria-owns":y.$id+`_list`,"aria-activedescendant":w.focusedOptionId,tabindex:!y.disabled&&!C.focused?y.tabindex:-1,onInput:w.onFilterChange,onKeydown:w.onFilterKeyDown,pt:y.ptm(`pcFilter`)},null,8,[`modelValue`,`class`,`placeholder`,`disabled`,`unstyled`,`aria-owns`,`aria-activedescendant`,`tabindex`,`onInput`,`onKeydown`,`pt`]),e(D,{unstyled:y.unstyled,pt:y.ptm(`pcFilterIconContainer`)},{default:u(function(){return[a(y.$slots,`filtericon`,{},function(){return[y.filterIcon?(h(),r(`span`,t({key:0,class:y.filterIcon},y.ptm(`filterIcon`)),null,16)):(h(),l(E,f(t({key:1},y.ptm(`filterIcon`))),null,16))]})]}),_:3},8,[`unstyled`,`pt`])]}),_:3},8,[`unstyled`,`pt`]),v(`span`,t({role:`status`,"aria-live":`polite`,class:`p-hidden-accessible`},y.ptm(`hiddenFilterResult`),{"data-p-hidden-accessible":!0}),c(w.filterResultMessageText),17)],16)):_(``,!0),v(`div`,t({class:y.cx(`listContainer`),style:[{"max-height":w.virtualScrollerDisabled?y.scrollHeight:``},y.listStyle]},y.ptm(`listContainer`)),[e(j,t({ref:w.virtualScrollerRef},y.virtualScrollerOptions,{items:w.visibleOptions,style:[{height:y.scrollHeight},y.listStyle],tabindex:-1,disabled:w.virtualScrollerDisabled,pt:y.ptm(`virtualScroller`)}),g({content:u(function(e){var n=e.styleClass,s=e.contentRef,u=e.items,f=e.getItemOptions,p=e.contentStyle,g=e.itemSize;return[v(`ul`,t({ref:function(e){return w.listRef(e,s)},id:y.$id+`_list`,class:[y.cx(`list`),n],style:p,tabindex:-1,role:`listbox`,"aria-multiselectable":y.multiple,"aria-label":y.ariaLabel,"aria-labelledby":y.ariaLabelledby,"aria-activedescendant":C.focused?w.focusedOptionId:void 0,"aria-disabled":y.disabled,onFocus:b[3]||(b[3]=function(){return w.onListFocus&&w.onListFocus.apply(w,arguments)}),onBlur:b[4]||(b[4]=function(){return w.onListBlur&&w.onListBlur.apply(w,arguments)}),onKeydown:b[5]||(b[5]=function(){return w.onListKeyDown&&w.onListKeyDown.apply(w,arguments)})},y.ptm(`list`)),[(h(!0),r(m,null,o(u,function(e,n){return h(),r(m,{key:w.getOptionRenderKey(e,w.getOptionIndex(n,f))},[w.isOptionGroup(e)?(h(),r(`li`,t({key:0,id:y.$id+`_`+w.getOptionIndex(n,f),style:{height:g?g+`px`:void 0},class:y.cx(`optionGroup`),role:`option`},{ref_for:!0},y.ptm(`optionGroup`)),[a(y.$slots,`optiongroup`,{option:e.optionGroup,index:w.getOptionIndex(n,f)},function(){return[i(c(w.getOptionGroupLabel(e.optionGroup)),1)]})],16,Q)):d((h(),r(`li`,t({key:1,id:y.$id+`_`+w.getOptionIndex(n,f),style:{height:g?g+`px`:void 0},class:y.cx(`option`,{option:e,index:n,getItemOptions:f}),role:`option`,"aria-label":w.getOptionLabel(e),"aria-selected":w.isSelected(e),"aria-disabled":w.isOptionDisabled(e),"aria-setsize":w.ariaSetSize,"aria-posinset":w.getAriaPosInset(w.getOptionIndex(n,f)),onClick:function(t){return w.onOptionSelect(t,e,w.getOptionIndex(n,f))},onMousedown:function(e){return w.onOptionMouseDown(e,w.getOptionIndex(n,f))},onMousemove:function(e){return w.onOptionMouseMove(e,w.getOptionIndex(n,f))},onTouchend:b[2]||(b[2]=function(e){return w.onOptionTouchEnd()}),onDblclick:function(t){return w.onOptionDblClick(t,e)}},{ref_for:!0},w.getPTOptions(e,f,n,`option`),{"data-p-selected":!y.checkmark&&w.isSelected(e),"data-p-focused":C.focusedOptionIndex===w.getOptionIndex(n,f),"data-p-disabled":w.isOptionDisabled(e)}),[y.checkmark?(h(),r(m,{key:0},[w.isSelected(e)?(h(),l(k,t({key:0,class:y.cx(`optionCheckIcon`)},{ref_for:!0},y.ptm(`optionCheckIcon`)),null,16,[`class`])):(h(),l(A,t({key:1,class:y.cx(`optionBlankIcon`)},{ref_for:!0},y.ptm(`optionBlankIcon`)),null,16,[`class`]))],64)):_(``,!0),a(y.$slots,`option`,{option:e,selected:w.isSelected(e),index:w.getOptionIndex(n,f)},function(){return[i(c(w.getOptionLabel(e)),1)]})],16,$)),[[M]])],64)}),128)),C.filterValue&&(!u||u&&u.length===0)?(h(),r(`li`,t({key:0,class:y.cx(`emptyMessage`),role:`option`},y.ptm(`emptyMessage`)),[a(y.$slots,`emptyfilter`,{},function(){return[i(c(w.emptyFilterMessageText),1)]})],16)):!y.options||y.options&&y.options.length===0?(h(),r(`li`,t({key:1,class:y.cx(`emptyMessage`),role:`option`},y.ptm(`emptyMessage`)),[a(y.$slots,`empty`,{},function(){return[i(c(w.emptyMessageText),1)]})],16)):_(``,!0)],16,Z)]}),_:2},[y.$slots.loader?{name:`loader`,fn:u(function(e){var t=e.options;return[a(y.$slots,`loader`,{options:t})]}),key:`0`}:void 0]),1040,[`items`,`style`,`disabled`,`pt`])],16),a(y.$slots,`footer`,{value:y.d_value,options:w.visibleOptions}),!y.options||y.options&&y.options.length===0?(h(),r(`span`,t({key:2,role:`status`,"aria-live":`polite`,class:`p-hidden-accessible`},y.ptm(`hiddenEmptyMessage`),{"data-p-hidden-accessible":!0}),c(w.emptyMessageText),17)):_(``,!0),v(`span`,t({role:`status`,"aria-live":`polite`,class:`p-hidden-accessible`},y.ptm(`hiddenSelectedMessage`),{"data-p-hidden-accessible":!0}),c(w.selectedMessageText),17),v(`span`,t({ref:`lastHiddenFocusableElement`,role:`presentation`,"aria-hidden":`true`,class:`p-hidden-accessible p-hidden-focusable`,tabindex:y.disabled?-1:y.tabindex,onFocus:b[6]||(b[6]=function(){return w.onLastHiddenFocus&&w.onLastHiddenFocus.apply(w,arguments)})},y.ptm(`hiddenLastFocusableEl`),{"data-p-hidden-accessible":!0,"data-p-hidden-focusable":!0}),null,16,ee)],16,Y)}J.render=te;export{J as t};