@volverjs/ui-vue 0.0.14 → 0.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Volver.d.ts +5 -5
- package/dist/components/VvAction/VvAction.es.js +26 -26
- package/dist/components/VvAction/VvAction.umd.js +1 -1
- package/dist/components/VvAction/index.d.ts +1 -44
- package/dist/components/VvAlert/VvAlert.es.js +43 -44
- package/dist/components/VvAlert/VvAlert.umd.js +1 -1
- package/dist/components/VvAlert/VvAlert.vue.d.ts +1 -1
- package/dist/components/VvAlertGroup/VvAlertGroup.es.js +54 -55
- package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +34 -34
- package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +1 -1
- package/dist/components/VvButton/VvButton.es.js +186 -187
- package/dist/components/VvButton/VvButton.umd.js +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.es.js +215 -217
- package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +235 -237
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +2 -2
- package/dist/components/VvCheckboxGroup/index.d.ts +1 -78
- package/dist/components/VvCombobox/VvCombobox.es.js +810 -813
- package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
- package/dist/components/VvCombobox/VvCombobox.vue.d.ts +1 -1
- package/dist/components/VvCombobox/index.d.ts +2 -2
- package/dist/components/VvDropdown/VvDropdown.es.js +4 -4
- package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
- package/dist/components/VvDropdownAction/VvDropdownAction.es.js +50 -50
- package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -1
- package/dist/components/VvIcon/VvIcon.es.js +30 -31
- package/dist/components/VvIcon/VvIcon.umd.js +1 -1
- package/dist/components/VvInputFile/VvInputFile.es.js +415 -418
- package/dist/components/VvInputFile/VvInputFile.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.es.js +595 -588
- package/dist/components/VvInputText/VvInputText.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.vue.d.ts +6 -6
- package/dist/components/VvInputText/index.d.ts +3 -3
- package/dist/components/VvNav/VvNav.es.js +63 -63
- package/dist/components/VvNav/VvNav.umd.js +1 -1
- package/dist/components/VvNavItem/VvNavItem.es.js +41 -41
- package/dist/components/VvNavItem/VvNavItem.umd.js +1 -1
- package/dist/components/VvRadio/VvRadio.es.js +222 -224
- package/dist/components/VvRadio/VvRadio.umd.js +1 -1
- package/dist/components/VvRadioGroup/VvRadioGroup.es.js +234 -236
- package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
- package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +2 -2
- package/dist/components/VvRadioGroup/index.d.ts +1 -78
- package/dist/components/VvSelect/VvSelect.es.js +200 -203
- package/dist/components/VvSelect/VvSelect.umd.js +1 -1
- package/dist/components/VvSelect/VvSelect.vue.d.ts +1 -1
- package/dist/components/VvSelect/index.d.ts +2 -2
- package/dist/components/VvTab/VvTab.es.js +35 -35
- package/dist/components/VvTab/VvTab.umd.js +1 -1
- package/dist/components/VvTextarea/VvTextarea.es.js +341 -344
- package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
- package/dist/components/index.es.js +1965 -1958
- package/dist/components/index.umd.js +1 -1
- package/dist/composables/index.es.js +34 -34
- package/dist/composables/index.umd.js +2 -2
- package/dist/composables/useModifiers.d.ts +1 -1
- package/dist/constants.d.ts +2 -2
- package/dist/directives/index.es.js +22 -22
- package/dist/directives/index.umd.js +1 -1
- package/dist/directives/v-contextmenu.es.js +13 -13
- package/dist/directives/v-contextmenu.umd.js +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.es.js +19 -19
- package/dist/index.umd.js +1 -1
- package/dist/json-render/index.es.js +1877 -1870
- package/dist/json-render/index.umd.js +1 -1
- package/dist/props/index.d.ts +1 -1
- package/dist/resolvers/unplugin.es.js +28 -28
- package/dist/resolvers/unplugin.umd.js +1 -1
- package/dist/types/alert.d.ts +1 -1
- package/dist/types/nav.d.ts +1 -1
- package/dist/utils/ObjectUtilities.d.ts +0 -6
- package/package.json +1 -1
- package/src/Volver.ts +8 -6
- package/src/components/VvAction/index.ts +1 -3
- package/src/components/VvButton/VvButton.vue +1 -1
- package/src/components/VvCheckboxGroup/index.ts +1 -3
- package/src/components/VvCombobox/VvCombobox.vue +3 -3
- package/src/components/VvDropdown/VvDropdown.vue +8 -8
- package/src/components/VvIcon/VvIcon.vue +3 -6
- package/src/components/VvInputFile/VvInputFile.vue +6 -6
- package/src/components/VvInputText/VvInputText.vue +95 -78
- package/src/components/VvRadioGroup/index.ts +1 -3
- package/src/composables/useBlurhash.ts +1 -1
- package/src/composables/useDebouncedInput.ts +1 -1
- package/src/composables/useDefaults.ts +55 -44
- package/src/composables/useModifiers.ts +1 -1
- package/src/index.ts +2 -2
- package/src/resolvers/unplugin.ts +6 -6
- package/src/types/alert.ts +1 -1
- package/src/types/nav.ts +1 -1
- package/src/utils/DateUtilities.ts +3 -3
- package/src/utils/DomUtilities.ts +7 -1
- package/src/utils/ObjectUtilities.ts +60 -59
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(e,$){typeof exports=="object"&&typeof module<"u"?module.exports=$(require("vue"),require("@vueuse/core"),require("vuedraggable"),require("@iconify/vue")):typeof define=="function"&&define.amd?define(["vue","@vueuse/core","vuedraggable","@iconify/vue"],$):(e=typeof globalThis<"u"?globalThis:e||self,e.VvInputFile=$(e.Vue,e.VueuseCore,e.vuedraggable,e.IconifyVue))})(this,function(e,$,X,R){var Ie=Object.create,pe=Object.defineProperty,Ne=Object.getOwnPropertyDescriptor,Ee=Object.getOwnPropertyNames,$e=Object.getPrototypeOf,Re=Object.prototype.hasOwnProperty,je=(t,r,o,a)=>{if(r&&typeof r=="object"||typeof r=="function")for(var l=Ee(r),i=0,v=l.length,c;i<v;i++)c=l[i],!Re.call(t,c)&&c!==o&&pe(t,c,{get:(p=>r[p]).bind(null,c),enumerable:!(a=Ne(r,c))||a.enumerable});return t},De=(t,r,o)=>(o=t!=null?Ie($e(t)):{},je(r||!t||!t.__esModule?pe(o,"default",{value:t,enumerable:!0}):o,t));X=De(X,1);var z={showPassword:"eye-on",hidePassword:"eye-off",showDatePicker:"calendar",showTimePicker:"time",showColorPicker:"color",clear:"close",add:"add",remove:"trash",edit:"edit",download:"download"},Me={prefix:"normal"},ve=(function(t){return t.local="local",t.session="session",t})({}),Fe=(function(t){return t.absolute="absolute",t.fixed="fixed",t})({}),P=(function(t){return t.left="left",t.right="right",t.top="top",t.bottom="bottom",t})({}),Te=(function(t){return t.topStart="top-start",t.topEnd="top-end",t.bottomStart="bottom-start",t.bottomEnd="bottom-end",t.leftStart="left-start",t.leftEnd="left-end",t.rightStart="right-start",t.rightEnd="right-end",t})({}),U=(function(t){return t.before="before",t.after="after",t})({}),me=(function(t){return t.button="button",t.submit="submit",t.reset="reset",t})({}),k=(function(t){return t.nuxtLink="nuxt-link",t.routerLink="router-link",t.a="a",t.button="button",t})({}),ze=Symbol.for("volver"),Ue=Symbol.for("buttonGroup"),qe=Symbol.for("dropdownTrigger"),Ge=Symbol.for("dropdownAction"),He={to:{type:[String,Object]},href:String,target:String,rel:{type:String,default:"noopener noreferrer"}},q={valid:{type:Boolean,default:!1},validLabel:{type:[String,Array],default:void 0}},G={invalid:{type:Boolean,default:!1},invalidLabel:{type:[String,Array],default:void 0}},j={loading:{type:Boolean,default:!1},loadingLabel:{type:String,default:"Loading..."}},D={disabled:{type:Boolean,default:!1}},ee={required:{type:Boolean,default:!1}},Ke={active:{type:Boolean,default:!1}},xe={current:{type:Boolean,default:!1}},Ht={showClearAction:{type:Boolean,default:!1},iconClear:{type:[String,Object],default:z.clear},labelClear:{type:String,default:"Clear"}},Je={pressed:{type:Boolean,default:!1}},M={label:{type:[String,Number],default:void 0}},H={readonly:{type:Boolean,default:!1}},F={modifiers:{type:[String,Array],default:void 0}},K={hintLabel:{type:String,default:""}},We={options:{type:Array,default:()=>[]},labelKey:{type:[String,Function],default:"label"},valueKey:{type:[String,Function],default:"value"},disabledKey:{type:[String,Function],default:"disabled"}},Ye={count:{type:[Boolean,String],default:!1,validator:t=>[!0,!1,"limit","countdown"].includes(t)}},Ze={debounce:{type:[Number,String],default:void 0}},te={icon:{type:[String,Object],default:void 0},iconPosition:{type:String,default:U.before,validation:t=>Object.values(U).includes(t)}},ge={tabindex:{type:[String,Number],default:0}},Qe={floating:{type:Boolean,default:!1}},Xe={unselectable:{type:Boolean,default:!0}},he={id:[String,Number]},Kt={placement:{type:String,default:P.bottom,validator:t=>Object.values(P).includes(t)||Object.values(Te).includes(t)},strategy:{type:String,default:void 0,validator:t=>Object.values(Fe).includes(t)},transitionName:{type:String,default:void 0},offset:{type:[Number,String,Object],default:0},shift:{type:[Boolean,Object],default:!1},flip:{type:[Boolean,Object],default:!0},size:{type:[Boolean,Object],default:()=>({padding:10})},autoPlacement:{type:[Boolean,Object],default:!1},arrow:{type:Boolean,default:!1},keepOpen:{type:Boolean,default:!1},autofocusFirst:{type:Boolean,default:!0},triggerWidth:{type:Boolean,default:!1}},re={...he,name:{type:String,required:!0}},et={autofocus:{type:Boolean,default:!1}},tt={autocomplete:{type:String,default:"off"}},xt={...re,...et,...tt,...ge,...D,...H,...q,...G,...K,...j,...F,...Ye,...Ze,...te,...Qe,...M,minlength:{type:[String,Number],default:void 0},maxlength:{type:[String,Number],default:void 0},placeholder:{type:String,default:void 0},...ee},Jt={...re,...ge,...q,...G,...K,...D,...H,...F,...M,...j,value:{type:[String,Number,Boolean],default:void 0},modelValue:{type:[Object,Number,Boolean,String],default:void 0}},Wt={...q,...G,...We,...K,...D,...H,...F,...M,...j,...ee,modelValue:{type:[String,Array,Boolean,Number,Symbol],default:void 0},name:{type:String,required:!0},vertical:{type:Boolean,default:!1}},be={...D,...M,...Je,...Ke,...xe,...He,type:{type:String,default:me.button,validator:t=>Object.values(me).includes(t)},ariaLabel:{type:String,default:void 0},defaultTag:{type:String,default:k.button}},Yt={storageType:{type:String,default:ve.local,validator:t=>Object.values(ve).includes(t)},storageKey:String},ye={...re,...F,...q,...G,...K,...M,...j,...H,...D,...ee,...te,modelValue:{type:Object},progress:{type:[Number,String],default:void 0},placeholder:{type:String,default:void 0},accept:{type:String,default:"*"},multiple:{type:Boolean,default:!1},capture:{type:String,default:void 0,validation:t=>t===void 0?!0:["user","environment"].includes(t)},max:{type:[Number,String],default:void 0},dropArea:{type:Boolean,default:!1},sortable:{type:Boolean,default:!1},hidePreview:{type:Boolean,default:!1},labelAdd:{type:String,default:"Add file"},iconAdd:{type:[String,Object],default:z.add},labelReplace:{type:String,default:"Replace file"},iconReplace:{type:[String,Object],default:z.edit},labelDownload:{type:String,default:"Downlaod file"},iconDownload:{type:[String,Object],default:z.download},labelRemove:{type:String,default:"Remove file"}};function rt(t){const r=[],o=[],a=[],l=t?.split(",").map(i=>i.trim().toLowerCase());return l?.length&&l.forEach(i=>{i.startsWith(".")?o.push(i):i.includes("/*")?a.push(i.replace("/*","")):r.push(i)}),{mimeTypes:r,extensions:o,wildcards:a}}function ot(t,r){if(!r||r.trim()===""||r==="*")return[...t];const{mimeTypes:o,extensions:a,wildcards:l}=rt(r);return[...t].filter(i=>{const v=i.type.toLowerCase(),c=`.${i.name.split(".").pop()?.toLowerCase()}`,p=o.includes(v),u=l.some(s=>v.startsWith(`${s}/`)),m=a.some(s=>c===s.toLowerCase());return p||u||m})}function Se(t,r,o){return o?Be(t,o)===Be(r,o):oe(t,r)}function oe(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){const o=Array.isArray(t),a=Array.isArray(r);let l,i,v;if(o&&a){if(i=t.length,i!==r.length)return!1;for(l=i;l--!==0;)if(!oe(t[l],r[l]))return!1;return!0}if(o!==a)return!1;const c=t instanceof Date,p=r instanceof Date;if(c!==p)return!1;if(c&&p)return t.getTime()===r.getTime();const u=t instanceof RegExp,m=r instanceof RegExp;if(u!==m)return!1;if(u&&m)return t.toString()===r.toString();const s=Object.keys(t);if(i=s.length,i!==Object.keys(r).length)return!1;for(l=i;l--!==0;)if(!Object.hasOwn(r,s[l]))return!1;for(l=i;l--!==0;)if(v=s[l],!oe(t[v],r[v]))return!1;return!0}return Number.isNaN(t)&&Number.isNaN(r)}function Be(t,r){if(t&&Object.keys(t).length&&r)if(r.includes(".")){const o=r.split(".");let a=t;for(let l=0,i=o.length;l<i;++l){if(t==null)return null;a=a[o[l]]}return a}else return t[r];else return null}function Pe(t,r){if(t!=null&&r&&r.length){for(const o of r)if(Se(t,o))return!0}return!1}function at(t){return typeof t=="string"}function we(t){return Array.isArray(t)?t.filter(r=>at(r)).join(" "):t}function nt(t,r){const o=(0,e.computed)(()=>(0,e.isRef)(t)?t.value:t),a=(0,e.computed)(()=>we(o.value.invalidLabel)),l=(0,e.computed)(()=>we(o.value.validLabel)),i=(0,e.computed)(()=>o.value.loadingLabel),v=(0,e.computed)(()=>o.value.hintLabel),c=(0,e.computed)(()=>!!(o.value.loading&&(r.loading||i.value))),p=(0,e.computed)(()=>!c.value&&!!(o.value.invalid&&(r.invalid||a.value))),u=(0,e.computed)(()=>!c.value&&!p.value&&!!(o.value.valid&&(r.valid||l.value))),m=(0,e.computed)(()=>!c.value&&!p.value&&!u.value&&!!(r.hint||v.value)),s=(0,e.computed)(()=>p.value||u.value||c.value||m.value);return{hasInvalidLabelOrSlot:p,hasHintLabelOrSlot:m,hasValidLabelOrSlot:u,hasLoadingLabelOrSlot:c,hintSlotScope:(0,e.computed)(()=>({modelValue:o.value.modelValue,valid:o.value.valid,invalid:o.value.invalid,loading:o.value.loading})),HintSlot:(0,e.defineComponent)({name:"HintSlot",props:{tag:{type:String,default:"small"}},setup(){return{isVisible:s,invalidLabel:a,validLabel:l,loadingLabel:i,hintLabel:v,hasInvalidLabelOrSlot:p,hasValidLabelOrSlot:u,hasLoadingLabelOrSlot:c,hasHintLabelOrSlot:m}},render(){if(this.isVisible){let f;return this.hasInvalidLabelOrSlot&&(f="alert"),this.hasValidLabelOrSlot&&(f="status"),this.hasLoadingLabelOrSlot?(0,e.h)(this.tag,{role:f},this.$slots.loading?.()??this.loadingLabel):this.hasInvalidLabelOrSlot?(0,e.h)(this.tag,{role:f},this.$slots.invalid?.()??this.$slots.invalid??this.invalidLabel):this.hasValidLabelOrSlot?(0,e.h)(this.tag,{role:f},this.$slots.valid?.()??this.validLabel):(0,e.h)(this.tag,{role:f},this.$slots.hint?.()??this.$slots.hint??this.hintLabel)}return null}})}}function lt(t){const r=(0,e.inject)(t,void 0),o=(0,e.computed)(()=>r!==void 0);function a(l,i,v){const c=r?.[l];if(c)return(0,e.computed)({get(){return c.value},set(u){c.value=u}});const p=(0,e.toRef)(i,l);return(0,e.computed)({get(){return p.value},set(u){v&&v(`update:${l}`,u)}})}return{group:r,isInGroup:o,getGroupOrLocalRef:a}}var it=["update:modelValue"],st={...be,...he,...F,...Xe,...j,...te,iconPosition:{type:String,default:P.left,validator:t=>Object.values(P).includes(t)},loadingIcon:{type:String,default:"eos-icons:bubble-loading"},toggle:{type:Boolean,default:!1},value:{type:[String,Number,Boolean],default:void 0},uncheckedValue:{type:[String,Number,Boolean],default:void 0},modelValue:{type:[String,Number,Boolean],default:void 0}};function ut(t,r){const{group:o,isInGroup:a,getGroupOrLocalRef:l}=lt(Ue),{id:i,iconPosition:v,icon:c,label:p,pressed:u}=(0,e.toRefs)(t);return{group:o,isInGroup:a,modelValue:l("modelValue",t,r),toggle:l("toggle",t),unselectable:l("unselectable",t),multiple:(0,e.computed)(()=>o?.multiple.value??!1),modifiers:(0,e.computed)(()=>{let m=t.modifiers,s=o?.modifiers.value;const f=new Set;return m&&(Array.isArray(m)||(m=m.split(" ")),m.forEach(y=>f.add(y))),s&&(Array.isArray(s)||(s=s.split(" ")),s.forEach(y=>f.add(y))),[...f]}),disabled:(0,e.computed)(()=>!!(t.disabled||o?.disabled.value)),id:i,pressed:u,iconPosition:v,icon:c,label:p}}var dt=["click","mouseover","mouseleave"],ct=be;function ae(){return(0,e.inject)(ze,void 0)}function ft(){return(0,e.inject)(qe,{})}function pt(){return(0,e.inject)(Ge,{})}var vt={name:"VvAction"},mt=(0,e.defineComponent)({...vt,props:ct,emits:dt,setup(t,{expose:r,emit:o}){const a=t,l=o,i=(0,e.getCurrentInstance)(),v=ae(),c=(0,e.ref)(null);r({$el:c});const{reference:p,bus:u,aria:m,expanded:s}=ft();(0,e.watch)(()=>c.value,g=>{p&&(p.value=g)});const f=(0,e.computed)(()=>a.pressed||s?.value),{role:y}=pt(),w=(0,e.computed)(()=>{switch(!0){case a.disabled:return k.button;case a.to!==void 0:return v?.nuxt?(0,e.resolveComponent)(k.nuxtLink):k.routerLink;case a.href!==void 0:return k.a;default:return a.defaultTag}}),O=(0,e.computed)(()=>{const g={...m?.value,ariaPressed:f.value?!0:void 0,ariaLabel:a.ariaLabel,role:y?.value};switch(w.value){case k.a:return{...g,href:a.href,target:a.target,rel:a.rel};case k.routerLink:case k.nuxtLink:return{...g,to:a.to,target:a.target};case k.button:return{...g,type:a.type,disabled:a.disabled};default:return g}});function A(g){if(a.disabled){g.preventDefault();return}if(i?.vnode.props?.onClick){l("click",g);return}u?.emit("click",g)}function _(g){if(i?.vnode.props?.onMouseover){l("mouseover",g);return}u?.emit("mouseover",g)}function L(g){if(i?.vnode.props?.onMouseleave){l("mouseleave",g);return}u?.emit("mouseleave",g)}return(g,x)=>((0,e.openBlock)(),(0,e.createBlock)((0,e.resolveDynamicComponent)((0,e.unref)(w)),(0,e.mergeProps)((0,e.unref)(O),{ref_key:"rootEl",ref:c,class:{active:g.active,pressed:(0,e.unref)(f),disabled:g.disabled,current:g.current},onClickPassive:A,onMouseoverPassive:_,onMouseleavePassive:L}),{default:(0,e.withCtx)(()=>[(0,e.renderSlot)(g.$slots,"default",{},()=>[(0,e.createTextVNode)((0,e.toDisplayString)(g.label),1)])]),_:3},16,["class"]))}}),gt=mt;function ne(t,r,o){return(0,e.computed)(()=>{const a={[t]:!0},l=typeof r?.value=="string"?r.value.split(" "):r?.value;return l&&Array.isArray(l)&&l.forEach(i=>{i&&(a[`${t}--${i}`]=!0)}),o&&Object.keys(o.value).forEach(i=>{a[`${t}--${i}`]=(0,e.unref)(o.value[i])}),a})}var ht={name:"VvIcon"},bt=(0,e.defineComponent)({...ht,props:(0,e.mergeDefaults)({name:{},color:{},width:{},height:{},provider:{},prefix:{},src:{},horizontalFlip:{type:Boolean},verticalFlip:{type:Boolean},flip:{},mode:{},inline:{type:Boolean},rotate:{},onLoad:{type:Function},svg:{},modifiers:{}},Me),setup(t){const r=t,o=(0,e.computed)(()=>typeof r.rotate=="string"?Number.parseFloat(r.rotate):r.rotate),a=(0,e.ref)(!0),l=ae(),{modifiers:i}=(0,e.toRefs)(r),v=ne("vv-icon",i),c=(0,e.computed)(()=>r.provider||l?.iconsProvider),p=(0,e.computed)(()=>{const s=r.name??"",f=`@${c.value}:${r.prefix}:${s}`;if((0,R.iconLoaded)(f))return f;const y=l?.iconsCollections.find(w=>(0,R.iconLoaded)(`@${c.value}:${w.prefix}:${s}`));return y?`@${c.value}:${y.prefix}:${s}`:s});function u(s){const f=typeof window<"u"?new window.DOMParser:null;return f?f.parseFromString(s,"text/html").querySelector("svg"):null}function m(s){const f=u(s),y=f?.innerHTML.trim()||"";f&&y&&(0,R.addIcon)(`@${c.value}:${r.prefix}:${r.name}`,{body:y,height:f.viewBox.baseVal.height,width:f.viewBox.baseVal.width})}return l&&r.src&&!(0,R.iconLoaded)(`@${c.value}:${r.prefix}:${r.name}`)&&(a.value=!1,l.fetchIcon(r.src).then(s=>{s&&m(s),a.value=!0}).catch(s=>{throw a.value=!0,new Error(`Error during fetch icon: ${s?.message}`)})),r.svg&&m(r.svg),(s,f)=>(0,e.unref)(a)?((0,e.openBlock)(),(0,e.createBlock)((0,e.unref)(R.Icon),(0,e.mergeProps)({key:0,class:(0,e.unref)(v)},{inline:t.inline,width:t.width,height:t.height,horizontalFlip:t.horizontalFlip,verticalFlip:t.verticalFlip,flip:t.flip,rotate:(0,e.unref)(o),color:t.color,icon:(0,e.unref)(p)},{onLoad:t.onLoad}),null,16,["class","onLoad"])):(0,e.createCommentVNode)("v-if",!0)}}),T=bt;function ke(t){return(0,e.computed)(()=>String(t?.value||(0,e.useId)()))}function le(t,r){const o=(0,e.computed)(()=>typeof t?.value=="string"?{name:t?.value}:t?.value),a=(0,e.computed)(()=>r?.value===U.before?o.value:void 0),l=(0,e.computed)(()=>r?.value===U.after?o.value:void 0);return{hasIcon:o,hasIconLeft:(0,e.computed)(()=>r?.value===P.left?o.value:void 0),hasIconRight:(0,e.computed)(()=>r?.value===P.right?o.value:void 0),hasIconTop:(0,e.computed)(()=>r?.value===P.top?o.value:void 0),hasIconBottom:(0,e.computed)(()=>r?.value===P.bottom?o.value:void 0),hasIconBefore:a,hasIconAfter:l}}var yt={key:1,class:"vv-button__label"},St={key:1,class:"vv-button__label"},Bt={name:"VvButton",inheritAttrs:!1},Pt=(0,e.defineComponent)({...Bt,props:st,emits:it,setup(t,{expose:r,emit:o}){const a=t,l=o,i=(0,e.useAttrs)(),v=(0,e.useSlots)(),{id:c,modifiers:p,iconPosition:u,icon:m,label:s,modelValue:f,disabled:y,toggle:w,unselectable:O}=ut(a,l),A=ke(c),_=(0,e.computed)(()=>i?.name||A.value),L=(0,e.ref)(null);r({$el:(0,e.computed)(()=>L.value?.$el)});const g=(0,e.computed)(()=>w.value?Array.isArray(f.value)?Pe(_.value,f.value):Se(_.value,f.value):a.pressed),x=ne("vv-button",p,(0,e.computed)(()=>({reverse:[P.right,P.bottom].includes(u.value),column:[P.top,P.bottom].includes(u.value),"icon-only":!!(m?.value&&!s?.value&&!v.default)}))),{hasIcon:J}=le(m),I=(0,e.computed)(()=>a.value!==void 0?a.value:_.value),ie=(0,e.computed)(()=>{if(w.value)return{onClick:N}});function N(){if(w.value){if(Array.isArray(f.value)){if(Pe(I.value,f.value)){O.value&&(f.value=f.value.filter(d=>d!==I.value));return}f.value.push(I.value);return}if(I.value===f.value&&O.value){f.value=a.uncheckedValue;return}f.value=I.value}}return(d,S)=>((0,e.openBlock)(),(0,e.createBlock)(gt,(0,e.mergeProps)({...(0,e.unref)(i),...(0,e.unref)(ie),disabled:(0,e.unref)(y),pressed:(0,e.unref)(g),active:d.active,type:d.type,to:d.to,href:d.href,target:d.target,rel:d.rel,ariaLabel:d.ariaLabel},{id:(0,e.unref)(A),ref_key:"rootEl",ref:L,class:(0,e.unref)(x)}),{default:(0,e.withCtx)(()=>[(0,e.renderSlot)(d.$slots,"default",{},()=>[d.loading?(0,e.renderSlot)(d.$slots,"loading",{key:0},()=>[d.loadingIcon?((0,e.openBlock)(),(0,e.createBlock)(T,{key:0,class:"vv-button__loading-icon",name:d.loadingIcon},null,8,["name"])):(0,e.createCommentVNode)("v-if",!0),d.loadingLabel?((0,e.openBlock)(),(0,e.createElementBlock)("span",yt,(0,e.toDisplayString)(d.loadingLabel),1)):(0,e.createCommentVNode)("v-if",!0)]):((0,e.openBlock)(),(0,e.createElementBlock)(e.Fragment,{key:1},[(0,e.renderSlot)(d.$slots,"before"),(0,e.unref)(J)?((0,e.openBlock)(),(0,e.createBlock)(T,(0,e.mergeProps)({key:0},(0,e.unref)(J),{class:"vv-button__icon"}),null,16)):(0,e.createCommentVNode)("v-if",!0),(0,e.unref)(s)?((0,e.openBlock)(),(0,e.createElementBlock)("span",St,[(0,e.renderSlot)(d.$slots,"label",{},()=>[(0,e.createTextVNode)((0,e.toDisplayString)((0,e.unref)(s)),1)])])):(0,e.createCommentVNode)("v-if",!0),(0,e.renderSlot)(d.$slots,"after")],64))])]),_:3},16,["id","class"]))}}),wt=Pt;function kt(t,r,o){const a=ae(),l=(0,e.computed)(()=>{if(!(!a||!a.defaults.value?.[t]))return a.defaults.value[t]});return(0,e.computed)(()=>{if(l.value===void 0)return o;const i=l.value,v=r,c=o;return Object.keys(v).reduce((p,u)=>{const m=c[u];if(p[u]=m,u in i){if(Array.isArray(v[u])){const s=v[u];s.length&&s[0]===m&&(p[u]=i[u])}if(typeof v[u]=="function"){const s=v[u];s()===m&&(p[u]=i[u])}if(typeof v[u]=="object"){let s=v[u].default;typeof s=="function"&&(s=s()),typeof s=="object"?JSON.stringify(s)===JSON.stringify(m)&&(p[u]=i[u]):s===m&&(p[u]=i[u])}}return p},{})})}var _t=["for"],Ct={class:"vv-input-file__preview"},Vt=["src","alt"],Ot={class:"vv-input-file__wrapper"},Lt=["id","readonly","disabled","required","placeholder","aria-describedby","aria-invalid","aria-errormessage","multiple","accept","capture","name"],At=["value"],It=["onClick"],Nt=["title","onClick"],Et={class:"vv-input-file__item-name"},$t={class:"vv-input-file__item-info"},Rt=["title","disabled","onClick"],jt={name:"VvInputFile"},Dt=(0,e.defineComponent)({...jt,props:ye,emits:["remove","download","update:modelValue"],setup(t,{emit:r}){const o=t,a=r,l=(0,e.useSlots)(),i=kt("VvInputFile",ye,o),{modifiers:v,id:c,readonly:p,disabled:u,icon:m,iconPosition:s,iconDownload:f,sortable:y}=(0,e.toRefs)(o),w=ke(c),O=(0,e.computed)(()=>`${w.value}-hint`),A=(0,e.computed)(()=>{if(!o.progress)return!1;const n=typeof o.progress=="string"?Number.parseInt(o.progress):o.progress;return n>0&&n<100}),{hasIconBefore:_,hasIconAfter:L}=le(m,s),{hasIcon:g}=le(f),x=ne("vv-input-file",v,(0,e.computed)(()=>({valid:o.valid===!0,invalid:o.invalid===!0,loading:o.loading&&!A.value,disabled:o.disabled,required:o.required,readonly:o.readonly,dragging:Z.value,"icon-before":!!_.value,"icon-after":!!L.value,"drop-area":se.value}))),{HintSlot:J,hasHintLabelOrSlot:I,hasInvalidLabelOrSlot:ie,hintSlotScope:N}=nt(i,l),d=(0,$.useVModel)(o,"modelValue",a),S=(0,e.computed)({get:()=>!d.value||!Array.isArray(d.value)&&!d.value?.name?[]:Array.isArray(d.value)?d.value:[d.value],set:n=>{if(Y.value){d.value=n;return}d.value=n?.[0]}}),_e=(0,e.computed)(()=>o.disabled||o.readonly),W=(0,e.computed)(()=>typeof o.max=="string"?Number.parseInt(o.max):o.max),se=(0,e.computed)(()=>o.dropArea&&!_e.value),Y=(0,e.computed)(()=>o.multiple?W.value?W.value-S.value.length>1:!0:!1),Z=(0,e.ref)(!1),E=(0,e.ref)();function Ft(){Z.value=!0}function Tt(){Z.value=!1}function zt(n){n.dataTransfer?.files&&(Z.value=!1,Ce(n.dataTransfer?.files))}function Ut(){E.value?.files&&(Ce(E.value.files),E.value.value="")}function Ce(n){const b=ot(n,o.accept);if(!o.multiple){if(Array.isArray(d.value)){d.value=b;return}d.value=b[0];return}let h=[];!Array.isArray(d.value)&&d.value?h=[d.value]:h=d.value&&Array.isArray(d.value)?[...d.value]:h;for(const V of b){if(W.value&&h.length>=W.value)break;h.push(V)}d.value=h,B.value=h.length-1}function ue(){E.value&&(_e.value||E.value.click())}function de(n){const b=Array.isArray(d.value)?d.value[n]:d.value;if(!b)return;if(a("remove",b),!Array.isArray(d.value)){d.value=void 0;return}B.value===n&&(B.value=0);const h=[...d.value];h.splice(n,1),d.value=h}const B=(0,e.ref)(0),Ve=["image/jpeg","image/png"],C=(0,e.computed)(()=>{if(o.hidePreview||S.value.length===0||!S.value[B.value])return;if(S.value[B.value]instanceof File){const b=S.value[B.value];return Ve.includes(b.type)?URL.createObjectURL(b):void 0}const n=S.value[B.value];if(n.thumbnailUrl)return n.thumbnailUrl;if(Ve.includes(n.type))return n.url});(0,e.watch)(C,(n,b)=>{b&&URL.revokeObjectURL(b)}),(0,e.onBeforeUnmount)(()=>{C.value&&URL.revokeObjectURL(C.value)});function ce(n,b){if(!n)return;if(n===0)return"0 Bytes";const h=1024,V=b?b<=0?0:b:2,Q=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],Ae=Math.floor(Math.log(n)/Math.log(h));return`${Number.parseFloat((n/h**Ae).toFixed(V))} ${Q[Ae]}`}function fe(n){a("download",n);const b=n instanceof File?URL.createObjectURL(n):n.url;if(!b)return;const h=document.createElement("a");h.href=b,h.setAttribute("download",n.name),document.body.appendChild(h),h.click(),document.body.removeChild(h),URL.revokeObjectURL(h.href)}function Oe(n){B.value=n}const Le=(0,e.computed)(()=>S.value.length===0||Y.value?o.labelAdd:o.labelReplace),qt=(0,e.computed)(()=>S.value.length===0||Y.value?o.iconAdd:o.iconReplace);function Gt({newIndex:n}){n!==null&&(B.value=n)}return(n,b)=>((0,e.openBlock)(),(0,e.createElementBlock)("div",{class:(0,e.normalizeClass)((0,e.unref)(x))},[n.label?((0,e.openBlock)(),(0,e.createElementBlock)("label",{key:0,for:(0,e.unref)(w)},(0,e.toDisplayString)(n.label),9,_t)):(0,e.createCommentVNode)("v-if",!0),se.value?((0,e.openBlock)(),(0,e.createElementBlock)("div",{key:1,class:"vv-input-file__drop-area",onDragenter:(0,e.withModifiers)(Ft,["prevent","stop"]),onDragleave:(0,e.withModifiers)(Tt,["prevent","stop"]),onDrop:(0,e.withModifiers)(zt,["prevent","stop"]),onDragover:b[0]||(b[0]=(0,e.withModifiers)(()=>{},["prevent","stop"])),onClick:(0,e.withModifiers)(ue,["stop"])},[(0,e.renderSlot)(n.$slots,"drop-area",(0,e.normalizeProps)((0,e.guardReactiveProps)({previewSrc:C.value,onClickDropArea:ue})),()=>[(0,e.createElementVNode)("picture",Ct,[C.value?((0,e.openBlock)(),(0,e.createElementBlock)("img",{key:0,src:C.value,alt:S.value[B.value].name},null,8,Vt)):(0,e.createCommentVNode)("v-if",!0)]),(0,e.unref)(p)?(0,e.createCommentVNode)("v-if",!0):((0,e.openBlock)(),(0,e.createBlock)(wt,{key:0,modifiers:"action",label:C.value?void 0:Le.value,title:C.value?Le.value:void 0,disabled:(0,e.unref)(u),class:(0,e.normalizeClass)({"vv-input-file__drop-area-action":C.value}),icon:qt.value,onClick:(0,e.withModifiers)(ue,["stop"])},null,8,["label","title","disabled","class","icon"]))])],32)):(0,e.createCommentVNode)("v-if",!0),(0,e.createElementVNode)("div",Ot,[(0,e.unref)(_)?((0,e.openBlock)(),(0,e.createBlock)(T,(0,e.normalizeProps)((0,e.mergeProps)({key:0},(0,e.unref)(_))),null,16)):(0,e.createCommentVNode)("v-if",!0),(0,e.createElementVNode)("input",{id:(0,e.unref)(w),ref_key:"inputEl",ref:E,type:"file",readonly:(0,e.unref)(p),disabled:(0,e.unref)(u),required:n.required,placeholder:n.placeholder,"aria-describedby":(0,e.unref)(I)?O.value:void 0,"aria-invalid":n.invalid,"aria-errormessage":(0,e.unref)(ie)?O.value:void 0,multiple:Y.value,accept:n.accept,capture:n.capture,name:n.name,onChange:Ut},null,40,Lt),A.value?((0,e.openBlock)(),(0,e.createElementBlock)("progress",{key:1,class:"vv-input-file__progress",value:n.progress,max:"100"},(0,e.toDisplayString)(n.progress)+"% ",9,At)):(0,e.createCommentVNode)("v-if",!0),(0,e.unref)(L)?((0,e.openBlock)(),(0,e.createBlock)(T,(0,e.normalizeProps)((0,e.mergeProps)({key:2},(0,e.unref)(L))),null,16)):(0,e.createCommentVNode)("v-if",!0)]),(0,e.renderSlot)(n.$slots,"file-list",(0,e.normalizeProps)((0,e.guardReactiveProps)({files:S.value,selectedFileIndex:B.value,onSelectIndex:Oe,onRemoveIndex:de,onDownloadFile:fe,formatBytes:ce})),()=>[(0,e.createVNode)((0,e.unref)(X.default),{modelValue:S.value,"onUpdate:modelValue":b[1]||(b[1]=h=>S.value=h),tag:"ul",class:"vv-input-file__list","item-key":"name",move:()=>(0,e.unref)(y),onEnd:Gt},{item:(0,e.withCtx)(({element:h,index:V})=>[(0,e.createElementVNode)("li",{class:(0,e.normalizeClass)(["vv-input-file__item",{active:V===B.value&&se.value&&S.value.length>1,"cursor-move":(0,e.unref)(y)}]),onClick:(0,e.withModifiers)(Q=>Oe(V),["stop"])},[(0,e.renderSlot)(n.$slots,"file-item",(0,e.normalizeProps)((0,e.guardReactiveProps)({file:h,index:V,isSelected:V===B.value,onRemoveIndex:de,onDownloadFile:fe,formatBytes:ce})),()=>[(0,e.unref)(g)?((0,e.openBlock)(),(0,e.createElementBlock)("button",{key:0,type:"button",class:"vv-input-file__item-action",title:n.labelDownload,onClick:(0,e.withModifiers)(Q=>fe(h),["stop"])},[(0,e.createVNode)(T,(0,e.normalizeProps)((0,e.guardReactiveProps)((0,e.unref)(g))),null,16)],8,Nt)):(0,e.createCommentVNode)("v-if",!0),(0,e.createElementVNode)("div",Et,(0,e.toDisplayString)(h.name),1),(0,e.createElementVNode)("small",$t,(0,e.toDisplayString)(ce(h.size)),1),(0,e.unref)(p)?(0,e.createCommentVNode)("v-if",!0):((0,e.openBlock)(),(0,e.createElementBlock)("button",{key:1,type:"button",class:"vv-input-file__item-remove",title:n.labelRemove,disabled:(0,e.unref)(u),onClick:(0,e.withModifiers)(Q=>de(V),["stop"])},null,8,Rt))])],10,It)]),_:3},8,["modelValue","move"])]),(0,e.createVNode)((0,e.unref)(J),{id:O.value,class:"vv-input-file__hint"},(0,e.createSlots)({_:2},[n.$slots.hint?{name:"hint",fn:(0,e.withCtx)(()=>[(0,e.renderSlot)(n.$slots,"hint",(0,e.normalizeProps)((0,e.guardReactiveProps)((0,e.unref)(N))))]),key:"0"}:void 0,n.$slots.loading?{name:"loading",fn:(0,e.withCtx)(()=>[(0,e.renderSlot)(n.$slots,"loading",(0,e.normalizeProps)((0,e.guardReactiveProps)((0,e.unref)(N))))]),key:"1"}:void 0,n.$slots.valid?{name:"valid",fn:(0,e.withCtx)(()=>[(0,e.renderSlot)(n.$slots,"valid",(0,e.normalizeProps)((0,e.guardReactiveProps)((0,e.unref)(N))))]),key:"2"}:void 0,n.$slots.invalid?{name:"invalid",fn:(0,e.withCtx)(()=>[(0,e.renderSlot)(n.$slots,"invalid",(0,e.normalizeProps)((0,e.guardReactiveProps)((0,e.unref)(N))))]),key:"3"}:void 0]),1032,["id"])],2))}}),Mt=Dt;return Mt});
|
|
1
|
+
(function(e,$){typeof exports=="object"&&typeof module<"u"?module.exports=$(require("vue"),require("@vueuse/core"),require("vuedraggable"),require("@iconify/vue")):typeof define=="function"&&define.amd?define(["vue","@vueuse/core","vuedraggable","@iconify/vue"],$):(e=typeof globalThis<"u"?globalThis:e||self,e.VvInputFile=$(e.Vue,e.VueuseCore,e.vuedraggable,e.IconifyVue))})(this,function(e,$,X,R){var Ie=Object.create,pe=Object.defineProperty,Ne=Object.getOwnPropertyDescriptor,Ee=Object.getOwnPropertyNames,$e=Object.getPrototypeOf,Re=Object.prototype.hasOwnProperty,je=(t,o,r,a)=>{if(o&&typeof o=="object"||typeof o=="function")for(var n=Ee(o),i=0,g=n.length,u;i<g;i++)u=n[i],!Re.call(t,u)&&u!==r&&pe(t,u,{get:(p=>o[p]).bind(null,u),enumerable:!(a=Ne(o,u))||a.enumerable});return t},De=(t,o,r)=>(r=t!=null?Ie($e(t)):{},je(o||!t||!t.__esModule?pe(r,"default",{value:t,enumerable:!0}):r,t));X=De(X,1);var q={showPassword:"eye-on",hidePassword:"eye-off",showDatePicker:"calendar",showTimePicker:"time",showColorPicker:"color",clear:"close",add:"add",remove:"trash",edit:"edit",download:"download"},Me={prefix:"normal"},ve=(function(t){return t.local="local",t.session="session",t})({}),Fe=(function(t){return t.absolute="absolute",t.fixed="fixed",t})({}),k=(function(t){return t.left="left",t.right="right",t.top="top",t.bottom="bottom",t})({}),Te=(function(t){return t.topStart="top-start",t.topEnd="top-end",t.bottomStart="bottom-start",t.bottomEnd="bottom-end",t.leftStart="left-start",t.leftEnd="left-end",t.rightStart="right-start",t.rightEnd="right-end",t})({}),z=(function(t){return t.before="before",t.after="after",t})({}),me=(function(t){return t.button="button",t.submit="submit",t.reset="reset",t})({}),w=(function(t){return t.nuxtLink="nuxt-link",t.routerLink="router-link",t.a="a",t.button="button",t})({}),qe=Symbol.for("volver"),ze=Symbol.for("buttonGroup"),Ue=Symbol.for("dropdownTrigger"),Ge=Symbol.for("dropdownAction"),He={to:{type:[String,Object]},href:String,target:String,rel:{type:String,default:"noopener noreferrer"}},U={valid:{type:Boolean,default:!1},validLabel:{type:[String,Array],default:void 0}},G={invalid:{type:Boolean,default:!1},invalidLabel:{type:[String,Array],default:void 0}},j={loading:{type:Boolean,default:!1},loadingLabel:{type:String,default:"Loading..."}},D={disabled:{type:Boolean,default:!1}},ee={required:{type:Boolean,default:!1}},Ke={active:{type:Boolean,default:!1}},xe={current:{type:Boolean,default:!1}},xt={showClearAction:{type:Boolean,default:!1},iconClear:{type:[String,Object],default:q.clear},labelClear:{type:String,default:"Clear"}},Je={pressed:{type:Boolean,default:!1}},M={label:{type:[String,Number],default:void 0}},H={readonly:{type:Boolean,default:!1}},F={modifiers:{type:[String,Array],default:void 0}},K={hintLabel:{type:String,default:""}},We={options:{type:Array,default:()=>[]},labelKey:{type:[String,Function],default:"label"},valueKey:{type:[String,Function],default:"value"},disabledKey:{type:[String,Function],default:"disabled"}},Ye={count:{type:[Boolean,String],default:!1,validator:t=>[!0,!1,"limit","countdown"].includes(t)}},Ze={debounce:{type:[Number,String],default:void 0}},te={icon:{type:[String,Object],default:void 0},iconPosition:{type:String,default:z.before,validation:t=>Object.values(z).includes(t)}},ge={tabindex:{type:[String,Number],default:0}},Qe={floating:{type:Boolean,default:!1}},Xe={unselectable:{type:Boolean,default:!0}},he={id:[String,Number]},Jt={placement:{type:String,default:k.bottom,validator:t=>Object.values(k).includes(t)||Object.values(Te).includes(t)},strategy:{type:String,default:void 0,validator:t=>Object.values(Fe).includes(t)},transitionName:{type:String,default:void 0},offset:{type:[Number,String,Object],default:0},shift:{type:[Boolean,Object],default:!1},flip:{type:[Boolean,Object],default:!0},size:{type:[Boolean,Object],default:()=>({padding:10})},autoPlacement:{type:[Boolean,Object],default:!1},arrow:{type:Boolean,default:!1},keepOpen:{type:Boolean,default:!1},autofocusFirst:{type:Boolean,default:!0},triggerWidth:{type:Boolean,default:!1}},re={...he,name:{type:String,required:!0}},et={autofocus:{type:Boolean,default:!1}},tt={autocomplete:{type:String,default:"off"}},Wt={...re,...et,...tt,...ge,...D,...H,...U,...G,...K,...j,...F,...Ye,...Ze,...te,...Qe,...M,minlength:{type:[String,Number],default:void 0},maxlength:{type:[String,Number],default:void 0},placeholder:{type:String,default:void 0},...ee},Yt={...re,...ge,...U,...G,...K,...D,...H,...F,...M,...j,value:{type:[String,Number,Boolean],default:void 0},modelValue:{type:[Object,Number,Boolean,String],default:void 0}},Zt={...U,...G,...We,...K,...D,...H,...F,...M,...j,...ee,modelValue:{type:[String,Array,Boolean,Number,Symbol],default:void 0},name:{type:String,required:!0},vertical:{type:Boolean,default:!1}},ye={...D,...M,...Je,...Ke,...xe,...He,type:{type:String,default:me.button,validator:t=>Object.values(me).includes(t)},ariaLabel:{type:String,default:void 0},defaultTag:{type:String,default:w.button}},Qt={storageType:{type:String,default:ve.local,validator:t=>Object.values(ve).includes(t)},storageKey:String},be={...re,...F,...U,...G,...K,...M,...j,...H,...D,...ee,...te,modelValue:{type:Object},progress:{type:[Number,String],default:void 0},placeholder:{type:String,default:void 0},accept:{type:String,default:"*"},multiple:{type:Boolean,default:!1},capture:{type:String,default:void 0,validation:t=>t===void 0?!0:["user","environment"].includes(t)},max:{type:[Number,String],default:void 0},dropArea:{type:Boolean,default:!1},sortable:{type:Boolean,default:!1},hidePreview:{type:Boolean,default:!1},labelAdd:{type:String,default:"Add file"},iconAdd:{type:[String,Object],default:q.add},labelReplace:{type:String,default:"Replace file"},iconReplace:{type:[String,Object],default:q.edit},labelDownload:{type:String,default:"Downlaod file"},iconDownload:{type:[String,Object],default:q.download},labelRemove:{type:String,default:"Remove file"}};function rt(t){const o=[],r=[],a=[],n=t?.split(",").map(i=>i.trim().toLowerCase());return n?.length&&n.forEach(i=>{i.startsWith(".")?r.push(i):i.includes("/*")?a.push(i.replace("/*","")):o.push(i)}),{mimeTypes:o,extensions:r,wildcards:a}}function ot(t,o){if(!o||o.trim()===""||o==="*")return[...t];const{mimeTypes:r,extensions:a,wildcards:n}=rt(o);return[...t].filter(i=>{const g=i.type.toLowerCase(),u=`.${i.name.split(".").pop()?.toLowerCase()}`,p=r.includes(g),f=n.some(c=>g.startsWith(`${c}/`)),h=a.some(c=>u===c.toLowerCase());return p||f||h})}function Se(t,o,r){return r?Be(t,r)===Be(o,r):oe(t,o)}function at(t,o){if(t.length!==o.length)return!1;for(let r=t.length;r--!==0;)if(!oe(t[r],o[r]))return!1;return!0}function nt(t,o){const r=Object.keys(t),{length:a}=r;if(a!==Object.keys(o).length)return!1;for(let n=a;n--!==0;)if(!Object.hasOwn(o,r[n]))return!1;for(let n=a;n--!==0;){const i=r[n];if(!oe(t[i],o[i]))return!1}return!0}function oe(t,o){if(t===o)return!0;if(!t||!o||typeof t!="object"||typeof o!="object")return Number.isNaN(t)&&Number.isNaN(o);const r=Array.isArray(t),a=Array.isArray(o);if(r!==a)return!1;if(r&&a)return at(t,o);const n=t instanceof Date,i=o instanceof Date;if(n!==i)return!1;if(n&&i)return t.getTime()===o.getTime();const g=t instanceof RegExp,u=o instanceof RegExp;return g!==u?!1:g&&u?t.toString()===o.toString():nt(t,o)}function Be(t,o){if(t&&Object.keys(t).length&&o){if(!o.includes("."))return t[o];const r=o.split(".");let a=t;for(let n=0,i=r.length;n<i;++n){if(a==null)return null;a=a[r[n]]}return a}else return null}function ke(t,o){if(t!=null&&o?.length){for(const r of o)if(Se(t,r))return!0}return!1}function lt(t){return typeof t=="string"}function Pe(t){return Array.isArray(t)?t.filter(o=>lt(o)).join(" "):t}function it(t,o){const r=(0,e.computed)(()=>(0,e.isRef)(t)?t.value:t),a=(0,e.computed)(()=>Pe(r.value.invalidLabel)),n=(0,e.computed)(()=>Pe(r.value.validLabel)),i=(0,e.computed)(()=>r.value.loadingLabel),g=(0,e.computed)(()=>r.value.hintLabel),u=(0,e.computed)(()=>!!(r.value.loading&&(o.loading||i.value))),p=(0,e.computed)(()=>!u.value&&!!(r.value.invalid&&(o.invalid||a.value))),f=(0,e.computed)(()=>!u.value&&!p.value&&!!(r.value.valid&&(o.valid||n.value))),h=(0,e.computed)(()=>!u.value&&!p.value&&!f.value&&!!(o.hint||g.value)),c=(0,e.computed)(()=>p.value||f.value||u.value||h.value);return{hasInvalidLabelOrSlot:p,hasHintLabelOrSlot:h,hasValidLabelOrSlot:f,hasLoadingLabelOrSlot:u,hintSlotScope:(0,e.computed)(()=>({modelValue:r.value.modelValue,valid:r.value.valid,invalid:r.value.invalid,loading:r.value.loading})),HintSlot:(0,e.defineComponent)({name:"HintSlot",props:{tag:{type:String,default:"small"}},setup(){return{isVisible:c,invalidLabel:a,validLabel:n,loadingLabel:i,hintLabel:g,hasInvalidLabelOrSlot:p,hasValidLabelOrSlot:f,hasLoadingLabelOrSlot:u,hasHintLabelOrSlot:h}},render(){if(this.isVisible){let d;return this.hasInvalidLabelOrSlot&&(d="alert"),this.hasValidLabelOrSlot&&(d="status"),this.hasLoadingLabelOrSlot?(0,e.h)(this.tag,{role:d},this.$slots.loading?.()??this.loadingLabel):this.hasInvalidLabelOrSlot?(0,e.h)(this.tag,{role:d},this.$slots.invalid?.()??this.$slots.invalid??this.invalidLabel):this.hasValidLabelOrSlot?(0,e.h)(this.tag,{role:d},this.$slots.valid?.()??this.validLabel):(0,e.h)(this.tag,{role:d},this.$slots.hint?.()??this.$slots.hint??this.hintLabel)}return null}})}}function st(t){const o=(0,e.inject)(t,void 0),r=(0,e.computed)(()=>o!==void 0);function a(n,i,g){const u=o?.[n];if(u)return(0,e.computed)({get(){return u.value},set(f){u.value=f}});const p=(0,e.toRef)(i,n);return(0,e.computed)({get(){return p.value},set(f){g&&g(`update:${n}`,f)}})}return{group:o,isInGroup:r,getGroupOrLocalRef:a}}var ut=["update:modelValue"],dt={...ye,...he,...F,...Xe,...j,...te,iconPosition:{type:String,default:k.left,validator:t=>Object.values(k).includes(t)},loadingIcon:{type:String,default:"eos-icons:bubble-loading"},toggle:{type:Boolean,default:!1},value:{type:[String,Number,Boolean],default:void 0},uncheckedValue:{type:[String,Number,Boolean],default:void 0},modelValue:{type:[String,Number,Boolean],default:void 0}};function ct(t,o){const{group:r,isInGroup:a,getGroupOrLocalRef:n}=st(ze),{id:i,iconPosition:g,icon:u,label:p,pressed:f}=(0,e.toRefs)(t);return{group:r,isInGroup:a,modelValue:n("modelValue",t,o),toggle:n("toggle",t),unselectable:n("unselectable",t),multiple:(0,e.computed)(()=>r?.multiple.value??!1),modifiers:(0,e.computed)(()=>{let h=t.modifiers,c=r?.modifiers.value;const d=new Set;return h&&(Array.isArray(h)||(h=h.split(" ")),h.forEach(b=>d.add(b))),c&&(Array.isArray(c)||(c=c.split(" ")),c.forEach(b=>d.add(b))),[...d]}),disabled:(0,e.computed)(()=>!!(t.disabled||r?.disabled.value)),id:i,pressed:f,iconPosition:g,icon:u,label:p}}var ft=["click","mouseover","mouseleave"];function ae(){return(0,e.inject)(qe,void 0)}function pt(){return(0,e.inject)(Ue,{})}function vt(){return(0,e.inject)(Ge,{})}var mt={name:"VvAction"},gt=(0,e.defineComponent)({...mt,props:ye,emits:ft,setup(t,{expose:o,emit:r}){const a=t,n=r,i=(0,e.getCurrentInstance)(),g=ae(),u=(0,e.ref)(null);o({$el:u});const{reference:p,bus:f,aria:h,expanded:c}=pt();(0,e.watch)(()=>u.value,v=>{p&&(p.value=v)});const d=(0,e.computed)(()=>a.pressed||c?.value),{role:b}=vt(),P=(0,e.computed)(()=>{switch(!0){case a.disabled:return w.button;case a.to!==void 0:return g?.nuxt?(0,e.resolveComponent)(w.nuxtLink):w.routerLink;case a.href!==void 0:return w.a;default:return a.defaultTag}}),L=(0,e.computed)(()=>{const v={...h?.value,ariaPressed:d.value?!0:void 0,ariaLabel:a.ariaLabel,role:b?.value};switch(P.value){case w.a:return{...v,href:a.href,target:a.target,rel:a.rel};case w.routerLink:case w.nuxtLink:return{...v,to:a.to,target:a.target};case w.button:return{...v,type:a.type,disabled:a.disabled};default:return v}});function A(v){if(a.disabled){v.preventDefault();return}if(i?.vnode.props?.onClick){n("click",v);return}f?.emit("click",v)}function _(v){if(i?.vnode.props?.onMouseover){n("mouseover",v);return}f?.emit("mouseover",v)}function V(v){if(i?.vnode.props?.onMouseleave){n("mouseleave",v);return}f?.emit("mouseleave",v)}return(v,x)=>((0,e.openBlock)(),(0,e.createBlock)((0,e.resolveDynamicComponent)((0,e.unref)(P)),(0,e.mergeProps)((0,e.unref)(L),{ref_key:"rootEl",ref:u,class:{active:v.active,pressed:(0,e.unref)(d),disabled:v.disabled,current:v.current},onClickPassive:A,onMouseoverPassive:_,onMouseleavePassive:V}),{default:(0,e.withCtx)(()=>[(0,e.renderSlot)(v.$slots,"default",{},()=>[(0,e.createTextVNode)((0,e.toDisplayString)(v.label),1)])]),_:3},16,["class"]))}}),ht=gt;function ne(t,o,r){return(0,e.computed)(()=>{const a={[t]:!0},n=typeof o?.value=="string"?o.value.split(" "):o?.value;return n&&Array.isArray(n)&&n.forEach(i=>{i&&(a[`${t}--${i}`]=!0)}),r&&Object.keys(r.value).forEach(i=>{a[`${t}--${i}`]=(0,e.unref)(r.value[i])}),a})}var yt={name:"VvIcon"},bt=(0,e.defineComponent)({...yt,props:(0,e.mergeDefaults)({name:{},color:{},width:{},height:{},provider:{},prefix:{},src:{},horizontalFlip:{type:Boolean},verticalFlip:{type:Boolean},flip:{},mode:{},inline:{type:Boolean},rotate:{},onLoad:{type:Function},svg:{},modifiers:{}},Me),setup(t){const o=t,r=(0,e.computed)(()=>typeof o.rotate=="string"?Number.parseFloat(o.rotate):o.rotate),a=(0,e.ref)(!0),n=ae(),{modifiers:i}=(0,e.toRefs)(o),g=ne("vv-icon",i),u=(0,e.computed)(()=>o.provider||n?.iconsProvider),p=(0,e.computed)(()=>{const c=o.name??"",d=`@${u.value}:${o.prefix}:${c}`;if((0,R.iconLoaded)(d))return d;const b=n?.iconsCollections.find(P=>(0,R.iconLoaded)(`@${u.value}:${P.prefix}:${c}`));return b?`@${u.value}:${b.prefix}:${c}`:c});function f(c){return globalThis.window===void 0?null:new globalThis.DOMParser().parseFromString(c,"text/html").querySelector("svg")}function h(c){const d=f(c),b=d?.innerHTML.trim()||"";d&&b&&(0,R.addIcon)(`@${u.value}:${o.prefix}:${o.name}`,{body:b,height:d.viewBox.baseVal.height,width:d.viewBox.baseVal.width})}return n&&o.src&&!(0,R.iconLoaded)(`@${u.value}:${o.prefix}:${o.name}`)&&(a.value=!1,n.fetchIcon(o.src).then(c=>{c&&h(c),a.value=!0}).catch(c=>{throw a.value=!0,new Error(`Error during fetch icon: ${c?.message}`)})),o.svg&&h(o.svg),(c,d)=>(0,e.unref)(a)?((0,e.openBlock)(),(0,e.createBlock)((0,e.unref)(R.Icon),(0,e.mergeProps)({key:0,class:(0,e.unref)(g)},{inline:t.inline,width:t.width,height:t.height,horizontalFlip:t.horizontalFlip,verticalFlip:t.verticalFlip,flip:t.flip,rotate:(0,e.unref)(r),color:t.color,icon:(0,e.unref)(p)},{onLoad:t.onLoad}),null,16,["class","onLoad"])):(0,e.createCommentVNode)("v-if",!0)}}),T=bt;function we(t){return(0,e.computed)(()=>String(t?.value||(0,e.useId)()))}function le(t,o){const r=(0,e.computed)(()=>typeof t?.value=="string"?{name:t?.value}:t?.value),a=(0,e.computed)(()=>o?.value===z.before?r.value:void 0),n=(0,e.computed)(()=>o?.value===z.after?r.value:void 0);return{hasIcon:r,hasIconLeft:(0,e.computed)(()=>o?.value===k.left?r.value:void 0),hasIconRight:(0,e.computed)(()=>o?.value===k.right?r.value:void 0),hasIconTop:(0,e.computed)(()=>o?.value===k.top?r.value:void 0),hasIconBottom:(0,e.computed)(()=>o?.value===k.bottom?r.value:void 0),hasIconBefore:a,hasIconAfter:n}}var St={key:1,class:"vv-button__label"},Bt={key:1,class:"vv-button__label"},kt={name:"VvButton",inheritAttrs:!1},Pt=(0,e.defineComponent)({...kt,props:dt,emits:ut,setup(t,{expose:o,emit:r}){const a=t,n=r,i=(0,e.useAttrs)(),g=(0,e.useSlots)(),{id:u,modifiers:p,iconPosition:f,icon:h,label:c,modelValue:d,disabled:b,toggle:P,unselectable:L}=ct(a,n),A=we(u),_=(0,e.computed)(()=>i?.name||A.value),V=(0,e.ref)(null);o({$el:(0,e.computed)(()=>V.value?.$el)});const v=(0,e.computed)(()=>P.value?Array.isArray(d.value)?ke(_.value,d.value):Se(_.value,d.value):a.pressed),x=ne("vv-button",p,(0,e.computed)(()=>({reverse:[k.right,k.bottom].includes(f.value),column:[k.top,k.bottom].includes(f.value),"icon-only":!!(h?.value&&!c?.value&&!g.default)}))),{hasIcon:J}=le(h),I=(0,e.computed)(()=>a.value===void 0?_.value:a.value),ie=(0,e.computed)(()=>{if(P.value)return{onClick:N}});function N(){if(P.value){if(Array.isArray(d.value)){if(ke(I.value,d.value)){L.value&&(d.value=d.value.filter(s=>s!==I.value));return}d.value.push(I.value);return}if(I.value===d.value&&L.value){d.value=a.uncheckedValue;return}d.value=I.value}}return(s,S)=>((0,e.openBlock)(),(0,e.createBlock)(ht,(0,e.mergeProps)({...(0,e.unref)(i),...(0,e.unref)(ie),disabled:(0,e.unref)(b),pressed:(0,e.unref)(v),active:s.active,type:s.type,to:s.to,href:s.href,target:s.target,rel:s.rel,ariaLabel:s.ariaLabel},{id:(0,e.unref)(A),ref_key:"rootEl",ref:V,class:(0,e.unref)(x)}),{default:(0,e.withCtx)(()=>[(0,e.renderSlot)(s.$slots,"default",{},()=>[s.loading?(0,e.renderSlot)(s.$slots,"loading",{key:0},()=>[s.loadingIcon?((0,e.openBlock)(),(0,e.createBlock)(T,{key:0,class:"vv-button__loading-icon",name:s.loadingIcon},null,8,["name"])):(0,e.createCommentVNode)("v-if",!0),s.loadingLabel?((0,e.openBlock)(),(0,e.createElementBlock)("span",St,(0,e.toDisplayString)(s.loadingLabel),1)):(0,e.createCommentVNode)("v-if",!0)]):((0,e.openBlock)(),(0,e.createElementBlock)(e.Fragment,{key:1},[(0,e.renderSlot)(s.$slots,"before"),(0,e.unref)(J)?((0,e.openBlock)(),(0,e.createBlock)(T,(0,e.mergeProps)({key:0},(0,e.unref)(J),{class:"vv-button__icon"}),null,16)):(0,e.createCommentVNode)("v-if",!0),(0,e.unref)(c)?((0,e.openBlock)(),(0,e.createElementBlock)("span",Bt,[(0,e.renderSlot)(s.$slots,"label",{},()=>[(0,e.createTextVNode)((0,e.toDisplayString)((0,e.unref)(c)),1)])])):(0,e.createCommentVNode)("v-if",!0),(0,e.renderSlot)(s.$slots,"after")],64))])]),_:3},16,["id","class"]))}}),wt=Pt;function _t(t,o,r){let a=o;if(Array.isArray(t)&&t.length){const n=t[0];n()===o&&(a=r)}if(typeof t=="function"&&t()===o&&(a=r),typeof t=="object"){let n=t.default;typeof n=="function"&&(n=n()),(typeof n=="object"?JSON.stringify(n)===JSON.stringify(o):n===o)&&(a=r)}return a}function Ct(t,o,r){const a=ae(),n=(0,e.computed)(()=>{if(a?.defaults.value?.[t])return a.defaults.value[t]});return(0,e.computed)(()=>{if(n.value===void 0)return r;const i=n.value,g=o,u=r;return Object.keys(g).reduce((p,f)=>{const h=u[f];return p[f]=f in i?_t(g[f],h,i[f]):h,p},{})})}var Ot=["for"],Lt={class:"vv-input-file__preview"},Vt=["src","alt"],At={class:"vv-input-file__wrapper"},It=["id","readonly","disabled","required","placeholder","aria-describedby","aria-invalid","aria-errormessage","multiple","accept","capture","name"],Nt=["value"],Et=["onClick"],$t=["title","onClick"],Rt={class:"vv-input-file__item-name"},jt={class:"vv-input-file__item-info"},Dt=["title","disabled","onClick"],Mt={name:"VvInputFile"},Ft=(0,e.defineComponent)({...Mt,props:be,emits:["remove","download","update:modelValue"],setup(t,{emit:o}){const r=t,a=o,n=(0,e.useSlots)(),i=Ct("VvInputFile",be,r),{modifiers:g,id:u,readonly:p,disabled:f,icon:h,iconPosition:c,iconDownload:d,sortable:b}=(0,e.toRefs)(r),P=we(u),L=(0,e.computed)(()=>`${P.value}-hint`),A=(0,e.computed)(()=>{if(!r.progress)return!1;const l=typeof r.progress=="string"?Number.parseInt(r.progress):r.progress;return l>0&&l<100}),{hasIconBefore:_,hasIconAfter:V}=le(h,c),{hasIcon:v}=le(d),x=ne("vv-input-file",g,(0,e.computed)(()=>({valid:r.valid===!0,invalid:r.invalid===!0,loading:r.loading&&!A.value,disabled:r.disabled,required:r.required,readonly:r.readonly,dragging:Z.value,"icon-before":!!_.value,"icon-after":!!V.value,"drop-area":se.value}))),{HintSlot:J,hasHintLabelOrSlot:I,hasInvalidLabelOrSlot:ie,hintSlotScope:N}=it(i,n),s=(0,$.useVModel)(r,"modelValue",a),S=(0,e.computed)({get:()=>!s.value||!Array.isArray(s.value)&&!s.value?.name?[]:Array.isArray(s.value)?s.value:[s.value],set:l=>{if(Y.value){s.value=l;return}s.value=l?.[0]}}),_e=(0,e.computed)(()=>r.disabled||r.readonly),W=(0,e.computed)(()=>typeof r.max=="string"?Number.parseInt(r.max):r.max),se=(0,e.computed)(()=>r.dropArea&&!_e.value),Y=(0,e.computed)(()=>r.multiple?W.value?W.value-S.value.length>1:!0:!1),Z=(0,e.ref)(!1),E=(0,e.ref)();function qt(){Z.value=!0}function zt(){Z.value=!1}function Ut(l){l.dataTransfer?.files&&(Z.value=!1,Ce(l.dataTransfer?.files))}function Gt(){E.value?.files&&(Ce(E.value.files),E.value.value="")}function Ce(l){const y=ot(l,r.accept);if(!r.multiple){if(Array.isArray(s.value)){s.value=y;return}s.value=y[0];return}let m=[];!Array.isArray(s.value)&&s.value?m=[s.value]:m=s.value&&Array.isArray(s.value)?[...s.value]:m;for(const O of y){if(W.value&&m.length>=W.value)break;m.push(O)}s.value=m,B.value=m.length-1}function ue(){E.value&&(_e.value||E.value.click())}function de(l){const y=Array.isArray(s.value)?s.value[l]:s.value;if(!y)return;if(a("remove",y),!Array.isArray(s.value)){s.value=void 0;return}B.value===l&&(B.value=0);const m=[...s.value];m.splice(l,1),s.value=m}const B=(0,e.ref)(0),Oe=new Set(["image/jpeg","image/png"]),C=(0,e.computed)(()=>{if(r.hidePreview||S.value.length===0||!S.value[B.value])return;if(S.value[B.value]instanceof File){const y=S.value[B.value];return Oe.has(y.type)?URL.createObjectURL(y):void 0}const l=S.value[B.value];if(l.thumbnailUrl)return l.thumbnailUrl;if(Oe.has(l.type))return l.url});(0,e.watch)(C,(l,y)=>{y&&URL.revokeObjectURL(y)}),(0,e.onBeforeUnmount)(()=>{C.value&&URL.revokeObjectURL(C.value)});function ce(l,y){if(!l)return;if(l===0)return"0 Bytes";const m=1024,O=Math.max(0,y??2),Q=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],Ae=Math.floor(Math.log(l)/Math.log(m));return`${Number.parseFloat((l/m**Ae).toFixed(O))} ${Q[Ae]}`}function fe(l){a("download",l);const y=l instanceof File?URL.createObjectURL(l):l.url;if(!y)return;const m=document.createElement("a");m.href=y,m.setAttribute("download",l.name),document.body.appendChild(m),m.click(),m.remove(),URL.revokeObjectURL(m.href)}function Le(l){B.value=l}const Ve=(0,e.computed)(()=>S.value.length===0||Y.value?r.labelAdd:r.labelReplace),Ht=(0,e.computed)(()=>S.value.length===0||Y.value?r.iconAdd:r.iconReplace);function Kt({newIndex:l}){l!==null&&(B.value=l)}return(l,y)=>((0,e.openBlock)(),(0,e.createElementBlock)("div",{class:(0,e.normalizeClass)((0,e.unref)(x))},[l.label?((0,e.openBlock)(),(0,e.createElementBlock)("label",{key:0,for:(0,e.unref)(P)},(0,e.toDisplayString)(l.label),9,Ot)):(0,e.createCommentVNode)("v-if",!0),se.value?((0,e.openBlock)(),(0,e.createElementBlock)("div",{key:1,class:"vv-input-file__drop-area",onDragenter:(0,e.withModifiers)(qt,["prevent","stop"]),onDragleave:(0,e.withModifiers)(zt,["prevent","stop"]),onDrop:(0,e.withModifiers)(Ut,["prevent","stop"]),onDragover:y[0]||(y[0]=(0,e.withModifiers)(()=>{},["prevent","stop"])),onClick:(0,e.withModifiers)(ue,["stop"])},[(0,e.renderSlot)(l.$slots,"drop-area",(0,e.normalizeProps)((0,e.guardReactiveProps)({previewSrc:C.value,onClickDropArea:ue})),()=>[(0,e.createElementVNode)("picture",Lt,[C.value?((0,e.openBlock)(),(0,e.createElementBlock)("img",{key:0,src:C.value,alt:S.value[B.value].name},null,8,Vt)):(0,e.createCommentVNode)("v-if",!0)]),(0,e.unref)(p)?(0,e.createCommentVNode)("v-if",!0):((0,e.openBlock)(),(0,e.createBlock)(wt,{key:0,modifiers:"action",label:C.value?void 0:Ve.value,title:C.value?Ve.value:void 0,disabled:(0,e.unref)(f),class:(0,e.normalizeClass)({"vv-input-file__drop-area-action":C.value}),icon:Ht.value,onClick:(0,e.withModifiers)(ue,["stop"])},null,8,["label","title","disabled","class","icon"]))])],32)):(0,e.createCommentVNode)("v-if",!0),(0,e.createElementVNode)("div",At,[(0,e.unref)(_)?((0,e.openBlock)(),(0,e.createBlock)(T,(0,e.normalizeProps)((0,e.mergeProps)({key:0},(0,e.unref)(_))),null,16)):(0,e.createCommentVNode)("v-if",!0),(0,e.createElementVNode)("input",{id:(0,e.unref)(P),ref_key:"inputEl",ref:E,type:"file",readonly:(0,e.unref)(p),disabled:(0,e.unref)(f),required:l.required,placeholder:l.placeholder,"aria-describedby":(0,e.unref)(I)?L.value:void 0,"aria-invalid":l.invalid,"aria-errormessage":(0,e.unref)(ie)?L.value:void 0,multiple:Y.value,accept:l.accept,capture:l.capture,name:l.name,onChange:Gt},null,40,It),A.value?((0,e.openBlock)(),(0,e.createElementBlock)("progress",{key:1,class:"vv-input-file__progress",value:l.progress,max:"100"},(0,e.toDisplayString)(l.progress)+"% ",9,Nt)):(0,e.createCommentVNode)("v-if",!0),(0,e.unref)(V)?((0,e.openBlock)(),(0,e.createBlock)(T,(0,e.normalizeProps)((0,e.mergeProps)({key:2},(0,e.unref)(V))),null,16)):(0,e.createCommentVNode)("v-if",!0)]),(0,e.renderSlot)(l.$slots,"file-list",(0,e.normalizeProps)((0,e.guardReactiveProps)({files:S.value,selectedFileIndex:B.value,onSelectIndex:Le,onRemoveIndex:de,onDownloadFile:fe,formatBytes:ce})),()=>[(0,e.createVNode)((0,e.unref)(X.default),{modelValue:S.value,"onUpdate:modelValue":y[1]||(y[1]=m=>S.value=m),tag:"ul",class:"vv-input-file__list","item-key":"name",move:()=>(0,e.unref)(b),onEnd:Kt},{item:(0,e.withCtx)(({element:m,index:O})=>[(0,e.createElementVNode)("li",{class:(0,e.normalizeClass)(["vv-input-file__item",{active:O===B.value&&se.value&&S.value.length>1,"cursor-move":(0,e.unref)(b)}]),onClick:(0,e.withModifiers)(Q=>Le(O),["stop"])},[(0,e.renderSlot)(l.$slots,"file-item",(0,e.normalizeProps)((0,e.guardReactiveProps)({file:m,index:O,isSelected:O===B.value,onRemoveIndex:de,onDownloadFile:fe,formatBytes:ce})),()=>[(0,e.unref)(v)?((0,e.openBlock)(),(0,e.createElementBlock)("button",{key:0,type:"button",class:"vv-input-file__item-action",title:l.labelDownload,onClick:(0,e.withModifiers)(Q=>fe(m),["stop"])},[(0,e.createVNode)(T,(0,e.normalizeProps)((0,e.guardReactiveProps)((0,e.unref)(v))),null,16)],8,$t)):(0,e.createCommentVNode)("v-if",!0),(0,e.createElementVNode)("div",Rt,(0,e.toDisplayString)(m.name),1),(0,e.createElementVNode)("small",jt,(0,e.toDisplayString)(ce(m.size)),1),(0,e.unref)(p)?(0,e.createCommentVNode)("v-if",!0):((0,e.openBlock)(),(0,e.createElementBlock)("button",{key:1,type:"button",class:"vv-input-file__item-remove",title:l.labelRemove,disabled:(0,e.unref)(f),onClick:(0,e.withModifiers)(Q=>de(O),["stop"])},null,8,Dt))])],10,Et)]),_:3},8,["modelValue","move"])]),(0,e.createVNode)((0,e.unref)(J),{id:L.value,class:"vv-input-file__hint"},(0,e.createSlots)({_:2},[l.$slots.hint?{name:"hint",fn:(0,e.withCtx)(()=>[(0,e.renderSlot)(l.$slots,"hint",(0,e.normalizeProps)((0,e.guardReactiveProps)((0,e.unref)(N))))]),key:"0"}:void 0,l.$slots.loading?{name:"loading",fn:(0,e.withCtx)(()=>[(0,e.renderSlot)(l.$slots,"loading",(0,e.normalizeProps)((0,e.guardReactiveProps)((0,e.unref)(N))))]),key:"1"}:void 0,l.$slots.valid?{name:"valid",fn:(0,e.withCtx)(()=>[(0,e.renderSlot)(l.$slots,"valid",(0,e.normalizeProps)((0,e.guardReactiveProps)((0,e.unref)(N))))]),key:"2"}:void 0,l.$slots.invalid?{name:"invalid",fn:(0,e.withCtx)(()=>[(0,e.renderSlot)(l.$slots,"invalid",(0,e.normalizeProps)((0,e.guardReactiveProps)((0,e.unref)(N))))]),key:"3"}:void 0]),1032,["id"])],2))}}),Tt=Ft;return Tt});
|