mirror of
https://github.com/ZeroCatDev/Classworks.git
synced 2026-06-27 19:35:07 +00:00
2 lines
20 KiB
JavaScript
2 lines
20 KiB
JavaScript
import{e as lt,l as nt,h as at,V as Oe,i as ot}from"./VTextField-CtuWRDTq.js";import{f as Pe,y as ze,u as Re,p as ue,k as He,a0 as ut,z as ke,aN as rt,ai as Ne,E as Ue,l as st,C as it,a3 as ct,s as he,$ as je,w as Ce,an as ft,n as Ve,aO as dt,aJ as vt,o as ge,aK as _e,_ as Le,a5 as mt,I as ht}from"./vendor-vuetify-95axeNJO.js";import{o as oe,k as C,F as se,m as U,w as Fe,s as j,q as Ge,b as J,e as $,I as We,D as gt,j as T,N as pt,n as pe,t as ye,l as xe,u as ie,E as yt,a1 as bt}from"./vendor-vue-28M5UGz3.js";import{b as wt,a as kt,aB as Vt,f as Be,p as It,q as Ke,i as St,a6 as Ct,o as Ft,ag as xt,E as Pt,Q as Rt,aD as Tt,aE as At}from"./index-BxeI5EAR.js";import{V as Mt,a as Dt}from"./VSheet-BGbWEv9p.js";import{V as Et}from"./VCheckboxBtn-DpYnatkN.js";import{V as $e}from"./VChip-CY3PUswk.js";const Ot=ue({renderless:Boolean,...He()},"VVirtualScrollItem"),_t=Pe()({name:"VVirtualScrollItem",inheritAttrs:!1,props:Ot(),emits:{"update:height":e=>!0},setup(e,n){let{attrs:t,emit:s,slots:a}=n;const{resizeRef:c,contentRect:d}=ze(void 0,"border");oe(()=>{var o;return(o=d.value)==null?void 0:o.height},o=>{o!=null&&s("update:height",o)}),Re(()=>{var o,r;return e.renderless?C(se,null,[(o=a.default)==null?void 0:o.call(a,{itemRef:c})]):C("div",U({ref:c,class:["v-virtual-scroll__item",e.class],style:e.style},t),[(r=a.default)==null?void 0:r.call(a)])})}}),Lt=-1,Bt=1,Ie=100,Kt=ue({itemHeight:{type:[Number,String],default:null},itemKey:{type:[String,Array,Function],default:null},height:[Number,String]},"virtual");function $t(e,n){const t=ut(),s=j(0);Fe(()=>{s.value=parseFloat(e.itemHeight||0)});const a=j(0),c=j(Math.ceil((parseInt(e.height)||t.height.value)/(s.value||16))||1),d=j(0),o=j(0),r=J(),h=J();let k=0;const{resizeRef:y,contentRect:p}=ze();Fe(()=>{y.value=r.value});const g=$(()=>{var f;return r.value===document.documentElement?t.height.value:((f=p.value)==null?void 0:f.height)||parseInt(e.height)||0}),v=$(()=>!!(r.value&&h.value&&g.value&&s.value));let u=Array.from({length:n.value.length}),S=Array.from({length:n.value.length});const b=j(0);let A=-1;function z(f){return u[f]||s.value}const x=rt(()=>{const f=performance.now();S[0]=0;const V=n.value.length;for(let P=1;P<=V;P++)S[P]=(S[P-1]||0)+z(P-1);b.value=Math.max(b.value,performance.now()-f)},b),X=oe(v,f=>{f&&(X(),k=h.value.offsetTop,x.immediate(),G(),~A&&We(()=>{Ue&&window.requestAnimationFrame(()=>{_(A),A=-1})}))});Ge(()=>{x.clear()});function Y(f,V){const P=u[f],D=s.value;s.value=D?Math.min(s.value,V):V,(P!==V||D!==s.value)&&(u[f]=V,x())}function R(f){f=ke(f,0,n.value.length);const V=Math.floor(f),P=f%1,D=V+1,te=S[V]||0,H=S[D]||te;return te+(H-te)*P}function W(f){return zt(S,f)}let q=0,M=0,Z=0;oe(g,(f,V)=>{G(),f<V&&requestAnimationFrame(()=>{M=0,G()})});let ee=-1;function F(){if(!r.value||!h.value)return;const f=r.value.scrollTop,V=performance.now();V-Z>500?(M=Math.sign(f-q),k=h.value.offsetTop):M=f-q,q=f,Z=V,window.clearTimeout(ee),ee=window.setTimeout(ce,500),G()}function ce(){!r.value||!h.value||(M=0,Z=0,window.clearTimeout(ee),G())}let fe=-1;function G(){cancelAnimationFrame(fe),fe=requestAnimationFrame(de)}function de(){if(!r.value||!g.value||!s.value)return;const f=q-k,V=Math.sign(M),P=Math.max(0,f-Ie),D=ke(W(P),0,n.value.length),te=f+g.value+Ie,H=ke(W(te)+1,D+1,n.value.length);if((V!==Lt||D<a.value)&&(V!==Bt||H>c.value)){const re=R(a.value)-R(D),we=R(H)-R(c.value);Math.max(re,we)>Ie?(a.value=D,c.value=H):(D<=0&&(a.value=D),H>=n.value.length&&(c.value=H))}d.value=R(a.value),o.value=R(n.value.length)-R(c.value)}function _(f){const V=R(f);!r.value||f&&!V?A=f:r.value.scrollTop=V}const be=$(()=>n.value.slice(a.value,c.value).map((f,V)=>{const P=V+a.value;return{raw:f,index:P,key:Ne(f,e.itemKey,P)}}));return oe(n,()=>{u=Array.from({length:n.value.length}),S=Array.from({length:n.value.length}),x.immediate(),G()},{deep:1}),{calculateVisibleItems:G,containerRef:r,markerRef:h,computedItems:be,paddingTop:d,paddingBottom:o,scrollToIndex:_,handleScroll:F,handleScrollend:ce,handleItemResize:Y}}function zt(e,n){let t=e.length-1,s=0,a=0,c=null,d=-1;if(e[t]<n)return t;for(;s<=t;)if(a=s+t>>1,c=e[a],c>n)t=a-1;else if(c<n)d=a,s=a+1;else return c===n?a:s;return d}const Ht=ue({items:{type:Array,default:()=>[]},renderless:Boolean,...Kt(),...He(),...kt()},"VVirtualScroll"),Nt=Pe()({name:"VVirtualScroll",props:Ht(),setup(e,n){let{slots:t}=n;const s=st("VVirtualScroll"),{dimensionStyles:a}=wt(e),{calculateVisibleItems:c,containerRef:d,markerRef:o,handleScroll:r,handleScrollend:h,handleItemResize:k,scrollToIndex:y,paddingTop:p,paddingBottom:g,computedItems:v}=$t(e,ye(()=>e.items));return it(()=>e.renderless,()=>{function u(){var A,z;const b=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1)?"addEventListener":"removeEventListener";d.value===document.documentElement?(document[b]("scroll",r,{passive:!0}),document[b]("scrollend",h)):((A=d.value)==null||A[b]("scroll",r,{passive:!0}),(z=d.value)==null||z[b]("scrollend",h))}gt(()=>{d.value=ct(s.vnode.el,!0),u(!0)}),Ge(u)}),Re(()=>{const u=v.value.map(S=>T(_t,{key:S.key,renderless:e.renderless,"onUpdate:height":b=>k(S.index,b)},{default:b=>{var A;return(A=t.default)==null?void 0:A.call(t,{item:S.raw,index:S.index,...b})}}));return e.renderless?C(se,null,[C("div",{ref:o,class:"v-virtual-scroll__spacer",style:{paddingTop:he(p.value)}},null),u,C("div",{class:"v-virtual-scroll__spacer",style:{paddingBottom:he(g.value)}},null)]):C("div",{ref:d,class:pe(["v-virtual-scroll",e.class]),onScrollPassive:r,onScrollend:h,style:pt([a.value,e.style])},[C("div",{ref:o,class:"v-virtual-scroll__container",style:{paddingTop:he(p.value),paddingBottom:he(g.value)}},[u])])}),{calculateVisibleItems:c,scrollToIndex:y}}});function Ut(e,n,t){return function(a){return!a.relatedTarget&&document.activeElement===document.body&&e.value?(requestAnimationFrame(()=>{if(!e.value)return;const c=n(),d=(c&&je(c)[0])??t();d==null||d.focus({preventScroll:!0})}),!0):!1}}function jt(e,n){const t=j(!1);let s;function a(o){cancelAnimationFrame(s),t.value=!0,s=requestAnimationFrame(()=>{s=requestAnimationFrame(()=>{t.value=!1})})}async function c(){await new Promise(o=>requestAnimationFrame(o)),await new Promise(o=>requestAnimationFrame(o)),await new Promise(o=>requestAnimationFrame(o)),await new Promise(o=>{if(t.value){const r=oe(t,()=>{r(),o()})}else o()})}async function d(o){var k,y;if(o.key==="Tab"&&((k=n.value)==null||k.focus()),!["PageDown","PageUp","Home","End"].includes(o.key))return;const r=(y=e.value)==null?void 0:y.$el;if(!r)return;(o.key==="Home"||o.key==="End")&&r.scrollTo({top:o.key==="Home"?0:r.scrollHeight,behavior:"smooth"}),await c();const h=r.querySelectorAll(":scope > :not(.v-virtual-scroll__spacer)");if(o.key==="PageDown"||o.key==="Home"){const p=r.getBoundingClientRect().top;for(const g of h)if(g.getBoundingClientRect().top>=p){g.focus();break}}else{const p=r.getBoundingClientRect().bottom;for(const g of[...h].reverse())if(g.getBoundingClientRect().bottom<=p){g.focus();break}}}return{onScrollPassive:a,onKeydown:d}}function Gt(e){let{groups:n,onLeave:t}=e;function s(o){var r;return o.type==="list"?(r=o.contentRef.value)==null?void 0:r.$el:o.contentRef.value}function a(o){const r=s(o);return r?je(r):[]}function c(o){var g;const r=o.target,h=o.shiftKey?"backward":"forward",k=n.map(a),y=n.map(v=>{var u;return v.type==="list"?(u=v.contentRef.value)==null?void 0:u.$el:v.contentRef.value}).findIndex(v=>v==null?void 0:v.contains(r)),p=d(k,y,h,r);if(p===null){const v=n[y],u=k[y];(v.type==="list"||(h==="forward"?u.at(-1)===o.target:u.at(0)===o.target))&&t()}else{o.preventDefault(),o.stopImmediatePropagation();const v=n[p];if(v.type==="list"&&xe(v.displayItemsCount)>0)(g=v.contentRef.value)==null||g.focus(0);else{const u=h==="forward";k[p].at(u?0:-1).focus()}}}function d(o,r,h,k){const y=n[r],p=o[r];if(y.type!=="list"&&!(h==="forward"?p.at(-1)===k:p.at(0)===k))return null;const g=h==="forward"?1:-1;for(let v=r+g;v>=0&&v<n.length;v+=g){const u=n[v];if(o[v].length>0||u.type==="list"&&xe(u.displayItemsCount)>0)return v}return null}return{onTabKeydown:c}}const Wt=(e,n,t)=>{if(e==null||n==null)return-1;if(!n.length)return 0;e=e.toString().toLocaleLowerCase(),n=n.toString().toLocaleLowerCase();const s=[];let a=e.indexOf(n);for(;~a;)s.push([a,a+n.length]),a=e.indexOf(n,a+n.length);return s.length?s:-1};function Se(e,n){if(!(e==null||typeof e=="boolean"||e===-1))return typeof e=="number"?[[e,e+n.length]]:Array.isArray(e[0])?e:[e]}const Qt=ue({customFilter:Function,customKeyFilter:Object,filterKeys:[Array,String],filterMode:{type:String,default:"intersection"},noFilter:Boolean},"filter");function Jt(e,n,t){var r,h;const s=[],a=(t==null?void 0:t.default)??Wt,c=t!=null&&t.filterKeys?Ce(t.filterKeys):!1,d=Object.keys((t==null?void 0:t.customKeyFilter)??{}).length;if(!(e!=null&&e.length))return s;let o=[];e:for(let k=0;k<e.length;k++){const[y,p=y]=Ce(e[k]),g={},v={};let u=-1;if((n||d>0)&&!(t!=null&&t.noFilter)){let S=!1;if(typeof y=="object"){if(y.type==="divider"||y.type==="subheader"){(((r=o.at(-1))==null?void 0:r.type)!=="divider"||y.type!=="subheader")&&(o=[]),o.push({index:k,matches:{},type:y.type});continue}const z=c||Object.keys(p);S=z.length===d;for(const x of z){const X=Ne(p,x),Y=(h=t==null?void 0:t.customKeyFilter)==null?void 0:h[x];if(u=Y?Y(X,n,y):a(X,n,y),u!==-1&&u!==!1)Y?g[x]=Se(u,n):v[x]=Se(u,n);else if((t==null?void 0:t.filterMode)==="every")continue e}}else u=a(y,n,y),u!==-1&&u!==!1&&(v.title=Se(u,n));const b=Object.keys(v).length,A=Object.keys(g).length;if(!b&&!A||(t==null?void 0:t.filterMode)==="union"&&A!==d&&!b||(t==null?void 0:t.filterMode)==="intersection"&&(A!==d||!b&&d>0&&!S))continue}o.length&&(s.push(...o),o=[]),s.push({index:k,matches:{...v,...g}})}return s}function Xt(e,n,t,s){const a=j([]),c=j(new Map),d=$(()=>s!=null&&s.transform?ie(n).map(r=>[r,s.transform(r)]):ie(n));Fe(()=>{const r=typeof t=="function"?t():ie(t),h=typeof r!="string"&&typeof r!="number"?"":String(r),k=Jt(d.value,h,{customKeyFilter:{...e.customKeyFilter,...ie(s==null?void 0:s.customKeyFilter)},default:e.customFilter,filterKeys:e.filterKeys,filterMode:e.filterMode,noFilter:e.noFilter}),y=ie(n),p=[],g=new Map;k.forEach(v=>{let{index:u,matches:S}=v;const b=y[u];p.push(b),g.set(b.value,S)}),a.value=p,c.value=g});function o(r){return c.value.get(r.value)}return{filteredItems:a,filteredMatches:c,getMatches:o}}function Yt(e,n,t){return t==null||!t.length?n:t.map((s,a)=>{const c=a===0?0:t[a-1][1],d=[C("span",{class:pe(`${e}__unmask`)},[n.slice(c,s[0])]),C("span",{class:pe(`${e}__mask`)},[n.slice(s[0],s[1])])];return a===t.length-1&&d.push(C("span",{class:pe(`${e}__unmask`)},[n.slice(s[1])])),C(se,null,[d])})}const qt=ue({closeText:{type:String,default:"$vuetify.close"},openText:{type:String,default:"$vuetify.open"}},"autocomplete");function Zt(e,n){const t=yt(),s=$(()=>`menu-${t}`),a=ye(()=>xe(n)),c=ye(()=>s.value);return{menuId:s,ariaExpanded:a,ariaControls:c}}const el=ue({chips:Boolean,closableChips:Boolean,eager:Boolean,hideNoData:Boolean,hideSelected:Boolean,listProps:{type:Object},menu:Boolean,menuIcon:{type:ht,default:"$dropdown"},menuProps:{type:Object},multiple:Boolean,noDataText:{type:String,default:"$vuetify.noDataText"},openOnClear:Boolean,itemColor:String,noAutoScroll:Boolean,...qt(),...At({itemChildren:!1})},"Select"),tl=ue({search:String,...Qt({filterKeys:["title"]}),...el(),...mt(ot({modelValue:null,role:"combobox"}),["validationValue","dirty"]),...Rt({transition:{component:Tt}})},"VSelect"),il=Pe()({name:"VSelect",props:tl(),emits:{"update:focused":e=>!0,"update:modelValue":e=>!0,"update:menu":e=>!0,"update:search":e=>!0},setup(e,n){let{slots:t}=n;const{t:s}=ft(),a=J(),c=J(),d=J(),o=J(),r=J(),{items:h,transformIn:k,transformOut:y}=Vt(e),p=Ve(e,"search",""),{filteredItems:g,getMatches:v}=Xt(e,h,()=>p.value),u=Ve(e,"modelValue",[],l=>k(l===null?[null]:Ce(l)),l=>{const i=y(l);return e.multiple?i:i[0]??null}),S=$(()=>typeof e.counterValue=="function"?e.counterValue(u.value):typeof e.counterValue=="number"?e.counterValue:u.value.length),b=lt(e),A=nt(e),z=$(()=>u.value.map(l=>l.value)),x=j(!1),X=ye(()=>e.closableChips&&!b.isReadonly.value&&!b.isDisabled.value),{InputIcon:Y}=at(e);let R="",W=0,q;const M=$(()=>{const l=p.value?g.value:h.value;return e.hideSelected?l.filter(i=>!u.value.some(I=>(e.valueComparator||ge)(I,i))):l}),Z=$(()=>e.hideNoData&&!M.value.length||b.isReadonly.value||b.isDisabled.value),ee=Ve(e,"menu"),F=$({get:()=>ee.value,set:l=>{var i;ee.value&&!l&&((i=c.value)!=null&&i.ΨopenChildren.size)||l&&Z.value||(ee.value=l)}}),{menuId:ce,ariaExpanded:fe,ariaControls:G}=Zt(e,F),de=$(()=>{var l;return{...e.menuProps,activatorProps:{...((l=e.menuProps)==null?void 0:l.activatorProps)||{},"aria-haspopup":"listbox"}}}),_=J(),be=jt(_,a),f=Ut(F,()=>{var l;return(l=c.value)==null?void 0:l.contentEl},()=>{var l;return(l=a.value)==null?void 0:l.controlRef}),{onTabKeydown:V}=Gt({groups:[{type:"element",contentRef:d},{type:"list",contentRef:_,displayItemsCount:()=>M.value.length},{type:"element",contentRef:o}],onLeave:()=>{var l;F.value=!1,(l=a.value)==null||l.focus()}});function P(l){e.openOnClear&&(F.value=!0)}function D(){Z.value||(F.value=!F.value)}function te(l){var i;l.key==="Tab"&&V(l),(i=_.value)!=null&&i.$el.contains(l.target)&&_e(l)&&H(l)}function H(l){var L,K,ae;if(!l.key||b.isReadonly.value)return;if(["Enter"," ","ArrowDown","ArrowUp","Home","End"].includes(l.key)&&l.preventDefault(),["Enter","ArrowDown"," "].includes(l.key)&&(F.value=!0),["Escape","Tab"].includes(l.key)&&(F.value=!1),e.clearable&&l.key==="Backspace"){l.preventDefault(),u.value=[],P();return}l.key==="Home"?(L=_.value)==null||L.focus("first"):l.key==="End"&&((K=_.value)==null||K.focus("last"));const i=1e3;if(!_e(l))return;const I=performance.now();I-q>i&&(R="",W=0),R+=l.key.toLowerCase(),q=I;const Q=M.value;function N(){let m=le();return m||R.at(-1)===R.at(-2)&&(R=R.slice(0,-1),W++,m=le(),m)||(W=0,m=le(),m)?m:(R=l.key.toLowerCase(),le())}function le(){for(let m=W;m<Q.length;m++){const E=Q[m];if(E.title.toLowerCase().startsWith(R))return[E,m]}}const B=N();if(!B)return;const[ne,w]=B;W=w,(ae=_.value)==null||ae.focus(w),e.multiple||(u.value=[ne])}function re(l){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(!l.props.disabled)if(e.multiple){const I=u.value.findIndex(N=>(e.valueComparator||ge)(N.value,l.value)),Q=i??!~I;if(~I){const N=Q?[...u.value,l]:[...u.value];N.splice(I,1),u.value=N}else Q&&(u.value=[...u.value,l])}else{const I=i!==!1;u.value=I?[l]:[],We(()=>{F.value=!1})}}function we(l){var I;const i=l.target;(I=a.value)!=null&&I.$el.contains(i)||(F.value=!1)}function Te(){return M.value.findIndex(l=>u.value.some(i=>(e.valueComparator||ge)(i.value,l.value)))}function Qe(){if(!u.value.length)return-1;const l=e.valueComparator||ge;let i=0;for(const I of M.value){if(u.value.some(N=>l(N.value,I.value)))return I.props.disabled?-1:i;I.props.disabled||i++}return-1}function Je(){var l;if(e.eager&&((l=r.value)==null||l.calculateVisibleItems()),_.value&&x.value){const i=Qe();_.value.focus(i>=0?i:"first",{focusVisible:!1})}}function Xe(){var l;p.value="",x.value&&((l=a.value)==null||l.focus())}function Ye(l){x.value=!0}function qe(l){var i;if(!((i=a.value)!=null&&i.$el.contains(l.relatedTarget))){if(f(l))return;x.value=!1}}function Ze(l){if(l==null)u.value=[];else if(Le(a.value,":autofill")||Le(a.value,":-webkit-autofill")){const i=h.value.find(I=>I.title===l);i&&re(i)}else a.value&&(a.value.value="")}return oe(F,()=>{if(!e.hideSelected&&F.value&&u.value.length){const l=Te();Ue&&!e.noAutoScroll&&window.requestAnimationFrame(()=>{var i;l>=0&&((i=r.value)==null||i.scrollToIndex(l))})}}),oe(h,(l,i)=>{F.value||x.value&&e.hideNoData&&!i.length&&l.length&&(F.value=!0)}),Re(()=>{const l=!!(e.chips||t.chip),i=!!(!e.hideNoData||M.value.length||t["prepend-item"]||t["append-item"]||t["no-data"]),I=u.value.length>0,Q=Oe.filterProps(e),N=I||!x.value&&e.label&&!e.persistentPlaceholder?void 0:e.placeholder,le={search:p,filteredItems:g.value};return T(Oe,U({ref:a},Q,{modelValue:u.value.map(B=>B.props.title).join(", "),name:void 0,"onUpdate:modelValue":Ze,focused:x.value,"onUpdate:focused":B=>x.value=B,validationValue:u.externalValue,counterValue:S.value,dirty:I,class:["v-select",{"v-select--active-menu":F.value,"v-select--chips":!!e.chips,[`v-select--${e.multiple?"multiple":"single"}`]:!0,"v-select--selected":u.value.length,"v-select--selection-slot":!!t.selection},e.class],style:e.style,inputmode:"none",placeholder:N,"onClick:clear":P,"onMousedown:control":D,onBlur:we,onKeydown:H,"aria-expanded":fe.value,"aria-controls":G.value}),{...t,default:B=>{let{id:ne}=B;return C(se,null,[C("select",{hidden:!0,multiple:e.multiple,name:A.fieldName.value},[h.value.map(w=>C("option",{key:w.value,value:w.value,selected:z.value.includes(w.value)},null))]),T(Mt,U({id:ce.value,ref:c,modelValue:F.value,"onUpdate:modelValue":w=>F.value=w,activator:"parent",disabled:Z.value,eager:e.eager,maxHeight:310,openOnClick:!1,closeOnContentClick:!1,transition:e.transition,onAfterEnter:Je,onAfterLeave:Xe},de.value,{contentClass:["v-select__content",de.value.contentClass]}),{default:()=>[T(Dt,{onFocusin:Ye,onFocusout:qe,onKeydown:te},{default:()=>[t["menu-header"]&&C("header",{ref:d},[t["menu-header"](le)]),i&&T(It,U({key:"select-list",ref:_,selected:z.value,selectStrategy:e.multiple?"independent":"single-independent",tabindex:"-1",selectable:!!M.value.length,"aria-live":"polite","aria-labelledby":`${ne.value}-label`,"aria-multiselectable":e.multiple,color:e.itemColor??e.color},be,e.listProps),{default:()=>{var w,L,K;return[(w=t["prepend-item"])==null?void 0:w.call(t),!M.value.length&&!e.hideNoData&&(((L=t["no-data"])==null?void 0:L.call(t))??T(Ke,{key:"no-data",title:s(e.noDataText)},null)),T(Nt,{ref:r,renderless:!0,items:M.value,itemKey:"value"},{default:ae=>{var Me,De,Ee;let{item:m,index:E,itemRef:O}=ae;const ve=dt(m.props),Ae=U(m.props,{ref:O,key:m.value,onClick:()=>re(m,null),"aria-posinset":E+1,"aria-setsize":M.value.length});return m.type==="divider"?((Me=t.divider)==null?void 0:Me.call(t,{props:m.raw,index:E}))??T(St,U(m.props,{key:`divider-${E}`}),null):m.type==="subheader"?((De=t.subheader)==null?void 0:De.call(t,{props:m.raw,index:E}))??T(Ct,U(m.props,{key:`subheader-${E}`}),null):((Ee=t.item)==null?void 0:Ee.call(t,{item:m,index:E,props:Ae}))??T(Ke,U(Ae,{role:"option"}),{prepend:me=>{let{isSelected:et}=me;return C(se,null,[e.multiple&&!e.hideSelected?T(Et,{key:m.value,modelValue:et,ripple:!1,tabindex:"-1","aria-hidden":!0,onClick:tt=>tt.preventDefault()},null):void 0,ve.prependAvatar&&T(Ft,{image:ve.prependAvatar},null),ve.prependIcon&&T(Be,{icon:ve.prependIcon},null)])},title:()=>{var me;return p.value?Yt("v-select",m.title,(me=v(m))==null?void 0:me.title):m.title}})}}),(K=t["append-item"])==null?void 0:K.call(t)]}}),t["menu-footer"]&&C("footer",{ref:o},[t["menu-footer"](le)])]})]}),u.value.map((w,L)=>{function K(O){O.stopPropagation(),O.preventDefault(),re(w,!1)}const ae=U($e.filterProps(w.props),{"onClick:close":K,onKeydown(O){O.key!=="Enter"&&O.key!==" "||(O.preventDefault(),O.stopPropagation(),K(O))},onMousedown(O){O.preventDefault(),O.stopPropagation()},modelValue:!0,"onUpdate:modelValue":void 0}),m=l?!!t.chip:!!t.selection,E=m?vt(l?t.chip({item:w,index:L,props:ae}):t.selection({item:w,index:L})):void 0;if(!(m&&!E))return C("div",{key:w.value,class:"v-select__selection"},[l?t.chip?T(xt,{key:"chip-defaults",defaults:{VChip:{closable:X.value,size:"small",text:w.title}}},{default:()=>[E]}):T($e,U({key:"chip",closable:X.value,size:"small",text:w.title,disabled:w.props.disabled},ae),null):E??C("span",{class:"v-select__selection-text"},[w.title,e.multiple&&L<u.value.length-1&&C("span",{class:"v-select__selection-comma"},[bt(",")])])])})])},"append-inner":function(){var L,K;for(var B=arguments.length,ne=new Array(B),w=0;w<B;w++)ne[w]=arguments[w];return C(se,null,[(L=t["append-inner"])==null?void 0:L.call(t,...ne),e.menuIcon?T(Be,{class:"v-select__menu-icon",color:(K=a.value)==null?void 0:K.fieldIconColor,icon:e.menuIcon,"aria-hidden":!0},null):void 0,e.appendInnerIcon&&T(Y,{key:"append-icon",name:"appendInner",color:ne[0].iconColor.value},null)])}})}),Pt({isFocused:x,menu:F,search:p,filteredItems:g,select:re},a)}});export{il as V,Zt as a,Gt as b,Nt as c,jt as d,el as e,Ut as f,Yt as h,Qt as m,Xt as u};
|