@validol4ik/uikit 0.7.1 → 0.7.4

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.
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),s=require("./index-A0f7F3DW.cjs"),U=require("./QMenu-BeQ-7x7q.cjs"),le=require("./focusout-DzWGke-4.cjs"),vt=e=>e?!0:"Обовʼязкове поле",mt=/^on[A-Z]/;function Xt(){const{attrs:e,vnode:l}=t.getCurrentInstance(),n={listeners:t.ref({}),attributes:t.ref({})};function u(){const f={},i={};for(const r in e)r!=="class"&&r!=="style"&&mt.test(r)===!1&&(f[r]=e[r]);for(const r in l.props)mt.test(r)===!0&&(i[r]=l.props[r]);n.attributes.value=f,n.listeners.value=i}return t.onBeforeUpdate(u),u(),n}const Yt="_q_fo_";function Zt({validate:e,resetValidation:l,requiresQForm:n}){const u=t.inject(Yt,!1);if(u!==!1){const{props:f,proxy:i}=t.getCurrentInstance();Object.assign(i,{validate:e,resetValidation:l}),t.watch(()=>f.disable,r=>{r===!0?(typeof l=="function"&&l(),u.unbindComponent(i)):u.bindComponent(i)}),t.onMounted(()=>{f.disable!==!0&&u.bindComponent(i)}),t.onBeforeUnmount(()=>{f.disable!==!0&&u.unbindComponent(i)})}else n===!0&&console.error("Parent QForm not found on useFormChild()!")}const pt=/^#[0-9a-fA-F]{3}([0-9a-fA-F]{3})?$/,ht=/^#[0-9a-fA-F]{4}([0-9a-fA-F]{4})?$/,gt=/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/,Oe=/^rgb\(((0|[1-9][\d]?|1[\d]{0,2}|2[\d]?|2[0-4][\d]|25[0-5]),){2}(0|[1-9][\d]?|1[\d]{0,2}|2[\d]?|2[0-4][\d]|25[0-5])\)$/,Me=/^rgba\(((0|[1-9][\d]?|1[\d]{0,2}|2[\d]?|2[0-4][\d]|25[0-5]),){2}(0|[1-9][\d]?|1[\d]{0,2}|2[\d]?|2[0-4][\d]|25[0-5]),(0|0\.[0-9]+[1-9]|0\.[1-9]+|1)\)$/,Ke={date:e=>/^-?[\d]+\/[0-1]\d\/[0-3]\d$/.test(e),time:e=>/^([0-1]?\d|2[0-3]):[0-5]\d$/.test(e),fulltime:e=>/^([0-1]?\d|2[0-3]):[0-5]\d:[0-5]\d$/.test(e),timeOrFulltime:e=>/^([0-1]?\d|2[0-3]):[0-5]\d(:[0-5]\d)?$/.test(e),email:e=>/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e),hexColor:e=>pt.test(e),hexaColor:e=>ht.test(e),hexOrHexaColor:e=>gt.test(e),rgbColor:e=>Oe.test(e),rgbaColor:e=>Me.test(e),rgbOrRgbaColor:e=>Oe.test(e)||Me.test(e),hexOrRgbColor:e=>pt.test(e)||Oe.test(e),hexaOrRgbaColor:e=>ht.test(e)||Me.test(e),anyColor:e=>gt.test(e)||Oe.test(e)||Me.test(e)};function Bt(e,l=250,n){let u=null;function f(){const i=arguments,r=()=>{u=null,e.apply(this,i)};u!==null?clearTimeout(u):n===!0&&e.apply(this,i),u=setTimeout(r,l)}return f.cancel=()=>{u!==null&&clearTimeout(u)},f}const Jt=[!0,!1,"ondemand"],Gt={modelValue:{},error:{type:Boolean,default:null},errorMessage:String,noErrorIcon:Boolean,rules:Array,reactiveRules:Boolean,lazyRules:{type:[Boolean,String],default:!1,validator:e=>Jt.includes(e)}};function el(e,l){const{props:n,proxy:u}=t.getCurrentInstance(),f=t.ref(!1),i=t.ref(null),r=t.ref(!1);Zt({validate:h,resetValidation:R});let b=0,S;const _=t.computed(()=>n.rules!==void 0&&n.rules!==null&&n.rules.length!==0),v=t.computed(()=>n.disable!==!0&&_.value===!0&&l.value===!1),w=t.computed(()=>n.error===!0||f.value===!0),q=t.computed(()=>typeof n.errorMessage=="string"&&n.errorMessage.length!==0?n.errorMessage:i.value);t.watch(()=>n.modelValue,()=>{r.value=!0,v.value===!0&&n.lazyRules===!1&&p()});function C(){n.lazyRules!=="ondemand"&&v.value===!0&&r.value===!0&&p()}t.watch(()=>n.reactiveRules,k=>{k===!0?S===void 0&&(S=t.watch(()=>n.rules,C,{immediate:!0,deep:!0})):S!==void 0&&(S(),S=void 0)},{immediate:!0}),t.watch(()=>n.lazyRules,C),t.watch(e,k=>{k===!0?r.value=!0:v.value===!0&&n.lazyRules!=="ondemand"&&p()});function R(){b++,l.value=!1,r.value=!1,f.value=!1,i.value=null,p.cancel()}function h(k=n.modelValue){if(n.disable===!0||_.value===!1)return!0;const D=++b,A=l.value!==!0?()=>{r.value=!0}:()=>{},O=(I,P)=>{I===!0&&A(),f.value=I,i.value=P||null,l.value=!1},Y=[];for(let I=0;I<n.rules.length;I++){const P=n.rules[I];let H;if(typeof P=="function"?H=P(k,Ke):typeof P=="string"&&Ke[P]!==void 0&&(H=Ke[P](k)),H===!1||typeof H=="string")return O(!0,H),!1;H!==!0&&H!==void 0&&Y.push(H)}return Y.length===0?(O(!1),!0):(l.value=!0,Promise.all(Y).then(I=>{if(I===void 0||Array.isArray(I)===!1||I.length===0)return D===b&&O(!1),!0;const P=I.find(H=>H===!1||typeof H=="string");return D===b&&O(P!==void 0,P),P===void 0},I=>(D===b&&(console.error(I),O(!0)),!1)))}const p=Bt(h,0);return t.onBeforeUnmount(()=>{S==null||S(),p.cancel()}),Object.assign(u,{resetValidation:R,validate:h}),le.injectProp(u,"hasError",()=>w.value),{isDirtyModel:r,hasRules:_,hasError:w,errorMessage:q,validate:h,resetValidation:R}}function Ze(e){return e!=null&&(""+e).length!==0}const tl={...s.useDarkProps,...Gt,label:String,stackLabel:Boolean,hint:String,hideHint:Boolean,prefix:String,suffix:String,labelColor:String,color:String,bgColor:String,filled:Boolean,outlined:Boolean,borderless:Boolean,standout:[Boolean,String],square:Boolean,loading:Boolean,labelSlot:Boolean,bottomSlots:Boolean,hideBottomSpace:Boolean,rounded:Boolean,dense:Boolean,itemAligned:Boolean,counter:Boolean,clearable:Boolean,clearIcon:String,disable:Boolean,readonly:Boolean,autofocus:Boolean,for:String},Je={...tl,maxlength:[Number,String]},At=["update:modelValue","clear","focus","blur"];function Et({requiredForAttr:e=!0,tagProp:l,changeEvent:n=!1}={}){const{props:u,proxy:f}=t.getCurrentInstance(),i=s.useDark(u,f.$q),r=U.useId({required:e,getValue:()=>u.for});return{requiredForAttr:e,changeEvent:n,tag:l===!0?t.computed(()=>u.tag):{value:"label"},isDark:i,editable:t.computed(()=>u.disable!==!0&&u.readonly!==!0),innerLoading:t.ref(!1),focused:t.ref(!1),hasPopupOpen:!1,splitAttrs:Xt(),targetUid:r,rootRef:t.ref(null),targetRef:t.ref(null),controlRef:t.ref(null)}}function zt(e){const{props:l,emit:n,slots:u,attrs:f,proxy:i}=t.getCurrentInstance(),{$q:r}=i;let b=null;e.hasValue===void 0&&(e.hasValue=t.computed(()=>Ze(l.modelValue))),e.emitValue===void 0&&(e.emitValue=g=>{n("update:modelValue",g)}),e.controlEvents===void 0&&(e.controlEvents={onFocusin:oe,onFocusout:X}),Object.assign(e,{clearValue:ne,onControlFocusin:oe,onControlFocusout:X,focus:P}),e.computedCounter===void 0&&(e.computedCounter=t.computed(()=>{if(l.counter!==!1){const g=typeof l.modelValue=="string"||typeof l.modelValue=="number"?(""+l.modelValue).length:Array.isArray(l.modelValue)===!0?l.modelValue.length:0,V=l.maxlength!==void 0?l.maxlength:l.maxValues;return g+(V!==void 0?" / "+V:"")}}));const{isDirtyModel:S,hasRules:_,hasError:v,errorMessage:w,resetValidation:q}=el(e.focused,e.innerLoading),C=e.floatingLabel!==void 0?t.computed(()=>l.stackLabel===!0||e.focused.value===!0||e.floatingLabel.value===!0):t.computed(()=>l.stackLabel===!0||e.focused.value===!0||e.hasValue.value===!0),R=t.computed(()=>l.bottomSlots===!0||l.hint!==void 0||_.value===!0||l.counter===!0||l.error!==null),h=t.computed(()=>l.filled===!0?"filled":l.outlined===!0?"outlined":l.borderless===!0?"borderless":l.standout?"standout":"standard"),p=t.computed(()=>`q-field row no-wrap items-start q-field--${h.value}`+(e.fieldClass!==void 0?` ${e.fieldClass.value}`:"")+(l.rounded===!0?" q-field--rounded":"")+(l.square===!0?" q-field--square":"")+(C.value===!0?" q-field--float":"")+(D.value===!0?" q-field--labeled":"")+(l.dense===!0?" q-field--dense":"")+(l.itemAligned===!0?" q-field--item-aligned q-item-type":"")+(e.isDark.value===!0?" q-field--dark":"")+(e.getControl===void 0?" q-field--auto-height":"")+(e.focused.value===!0?" q-field--focused":"")+(v.value===!0?" q-field--error":"")+(v.value===!0||e.focused.value===!0?" q-field--highlighted":"")+(l.hideBottomSpace!==!0&&R.value===!0?" q-field--with-bottom":"")+(l.disable===!0?" q-field--disabled":l.readonly===!0?" q-field--readonly":"")),k=t.computed(()=>"q-field__control relative-position row no-wrap"+(l.bgColor!==void 0?` bg-${l.bgColor}`:"")+(v.value===!0?" text-negative":typeof l.standout=="string"&&l.standout.length!==0&&e.focused.value===!0?` ${l.standout}`:l.color!==void 0?` text-${l.color}`:"")),D=t.computed(()=>l.labelSlot===!0||l.label!==void 0),A=t.computed(()=>"q-field__label no-pointer-events absolute ellipsis"+(l.labelColor!==void 0&&v.value!==!0?` text-${l.labelColor}`:"")),O=t.computed(()=>({id:e.targetUid.value,editable:e.editable.value,focused:e.focused.value,floatingLabel:C.value,modelValue:l.modelValue,emitValue:e.emitValue})),Y=t.computed(()=>{const g={};return e.targetUid.value&&(g.for=e.targetUid.value),l.disable===!0&&(g["aria-disabled"]="true"),g});function I(){var W;const g=document.activeElement;let V=(W=e.targetRef)==null?void 0:W.value;V&&(g===null||g.id!==e.targetUid.value)&&(V.hasAttribute("tabindex")===!0||(V=V.querySelector("[tabindex]")),V!==g&&(V==null||V.focus({preventScroll:!0})))}function P(){U.addFocusFn(I)}function H(){U.removeFocusFn(I);const g=document.activeElement;g!==null&&e.rootRef.value.contains(g)&&g.blur()}function oe(g){b!==null&&(clearTimeout(b),b=null),e.editable.value===!0&&e.focused.value===!1&&(e.focused.value=!0,n("focus",g))}function X(g,V){b!==null&&clearTimeout(b),b=setTimeout(()=>{b=null,!(document.hasFocus()===!0&&(e.hasPopupOpen===!0||e.controlRef===void 0||e.controlRef.value===null||e.controlRef.value.contains(document.activeElement)!==!1))&&(e.focused.value===!0&&(e.focused.value=!1,n("blur",g)),V==null||V())})}function ne(g){var V;s.stopAndPrevent(g),r.platform.is.mobile!==!0?(((V=e.targetRef)==null?void 0:V.value)||e.rootRef.value).focus():e.rootRef.value.contains(document.activeElement)===!0&&document.activeElement.blur(),l.type==="file"&&(e.inputRef.value.value=null),n("update:modelValue",null),e.changeEvent===!0&&n("change",null),n("clear",l.modelValue),t.nextTick(()=>{const W=S.value;q(),S.value=W})}function Q(g){[13,32].includes(g.keyCode)&&ne(g)}function ae(){const g=[];return u.prepend!==void 0&&g.push(t.h("div",{class:"q-field__prepend q-field__marginal row no-wrap items-center",key:"prepend",onClick:s.prevent},u.prepend())),g.push(t.h("div",{class:"q-field__control-container col relative-position row no-wrap q-anchor--skip"},re())),v.value===!0&&l.noErrorIcon===!1&&g.push(K("error",[t.h(s.QIcon,{name:r.iconSet.field.error,color:"negative"})])),l.loading===!0||e.innerLoading.value===!0?g.push(K("inner-loading-append",u.loading!==void 0?u.loading():[t.h(s.QSpinner,{color:l.color})])):l.clearable===!0&&e.hasValue.value===!0&&e.editable.value===!0&&g.push(K("inner-clearable-append",[t.h(s.QIcon,{class:"q-field__focusable-action",name:l.clearIcon||r.iconSet.field.clear,tabindex:0,role:"button","aria-hidden":"false","aria-label":r.lang.label.clear,onKeyup:Q,onClick:ne})])),u.append!==void 0&&g.push(t.h("div",{class:"q-field__append q-field__marginal row no-wrap items-center",key:"append",onClick:s.prevent},u.append())),e.getInnerAppend!==void 0&&g.push(K("inner-append",e.getInnerAppend())),e.getControlChild!==void 0&&g.push(e.getControlChild()),g}function re(){const g=[];return l.prefix!==void 0&&l.prefix!==null&&g.push(t.h("div",{class:"q-field__prefix no-pointer-events row items-center"},l.prefix)),e.getShadowControl!==void 0&&e.hasShadow.value===!0&&g.push(e.getShadowControl()),D.value===!0&&g.push(t.h("div",{class:A.value},s.hSlot(u.label,l.label))),e.getControl!==void 0?g.push(e.getControl()):u.rawControl!==void 0?g.push(u.rawControl()):u.control!==void 0&&g.push(t.h("div",{ref:e.targetRef,class:"q-field__native row",tabindex:-1,...e.splitAttrs.attributes.value,"data-autofocus":l.autofocus===!0||void 0},u.control(O.value))),l.suffix!==void 0&&l.suffix!==null&&g.push(t.h("div",{class:"q-field__suffix no-pointer-events row items-center"},l.suffix)),g.concat(s.hSlot(u.default))}function Z(){let g,V;v.value===!0?w.value!==null?(g=[t.h("div",{role:"alert"},w.value)],V=`q--slot-error-${w.value}`):(g=s.hSlot(u.error),V="q--slot-error"):(l.hideHint!==!0||e.focused.value===!0)&&(l.hint!==void 0?(g=[t.h("div",l.hint)],V=`q--slot-hint-${l.hint}`):(g=s.hSlot(u.hint),V="q--slot-hint"));const W=l.counter===!0||u.counter!==void 0;if(l.hideBottomSpace===!0&&W===!1&&g===void 0)return;const a=t.h("div",{key:V,class:"q-field__messages col"},g);return t.h("div",{class:"q-field__bottom row items-start q-field__bottom--"+(l.hideBottomSpace!==!0?"animated":"stale"),onClick:s.prevent},[l.hideBottomSpace===!0?a:t.h(t.Transition,{name:"q-transition--field-message"},()=>a),W===!0?t.h("div",{class:"q-field__counter"},u.counter!==void 0?u.counter():e.computedCounter.value):null])}function K(g,V){return V===null?null:t.h("div",{key:g,class:"q-field__append q-field__marginal row no-wrap items-center q-anchor--skip"},V)}let ue=!1;return t.onDeactivated(()=>{ue=!0}),t.onActivated(()=>{ue===!0&&l.autofocus===!0&&i.focus()}),l.autofocus===!0&&t.onMounted(()=>{i.focus()}),t.onBeforeUnmount(()=>{b!==null&&clearTimeout(b)}),Object.assign(i,{focus:P,blur:H}),function(){const V=e.getControl===void 0&&u.control===void 0?{...e.splitAttrs.attributes.value,"data-autofocus":l.autofocus===!0||void 0,...Y.value}:Y.value;return t.h(e.tag.value,{ref:e.rootRef,class:[p.value,f.class],style:f.style,...V},[u.before!==void 0?t.h("div",{class:"q-field__before q-field__marginal row no-wrap items-center",onClick:s.prevent},u.before()):null,t.h("div",{class:"q-field__inner relative-position col self-stretch"},[t.h("div",{ref:e.controlRef,class:k.value,tabindex:-1,...e.controlEvents},ae()),R.value===!0?Z():null]),u.after!==void 0?t.h("div",{class:"q-field__after q-field__marginal row no-wrap items-center",onClick:s.prevent},u.after()):null])}}const ll=s.createComponent({name:"QField",inheritAttrs:!1,props:{...Je,tag:{type:String,default:"label"}},emits:At,setup(){return zt(Et({tagProp:!0}))}}),ol={xs:8,sm:10,md:14,lg:20,xl:24},nl=s.createComponent({name:"QChip",props:{...s.useDarkProps,...s.useSizeProps,dense:Boolean,icon:String,iconRight:String,iconRemove:String,iconSelected:String,label:[String,Number],color:String,textColor:String,modelValue:{type:Boolean,default:!0},selected:{type:Boolean,default:null},square:Boolean,outline:Boolean,clickable:Boolean,removable:Boolean,removeAriaLabel:String,tabindex:[String,Number],disable:Boolean,ripple:{type:[Boolean,Object],default:!0}},emits:["update:modelValue","update:selected","remove","click"],setup(e,{slots:l,emit:n}){const{proxy:{$q:u}}=t.getCurrentInstance(),f=s.useDark(e,u),i=s.useSize(e,ol),r=t.computed(()=>e.selected===!0||e.icon!==void 0),b=t.computed(()=>e.selected===!0?e.iconSelected||u.iconSet.chip.selected:e.icon),S=t.computed(()=>e.iconRemove||u.iconSet.chip.remove),_=t.computed(()=>e.disable===!1&&(e.clickable===!0||e.selected!==null)),v=t.computed(()=>{const p=e.outline===!0&&e.color||e.textColor;return"q-chip row inline no-wrap items-center"+(e.outline===!1&&e.color!==void 0?` bg-${e.color}`:"")+(p?` text-${p} q-chip--colored`:"")+(e.disable===!0?" disabled":"")+(e.dense===!0?" q-chip--dense":"")+(e.outline===!0?" q-chip--outline":"")+(e.selected===!0?" q-chip--selected":"")+(_.value===!0?" q-chip--clickable cursor-pointer non-selectable q-hoverable":"")+(e.square===!0?" q-chip--square":"")+(f.value===!0?" q-chip--dark q-dark":"")}),w=t.computed(()=>{const p=e.disable===!0?{tabindex:-1,"aria-disabled":"true"}:{tabindex:e.tabindex||0},k={...p,role:"button","aria-hidden":"false","aria-label":e.removeAriaLabel||u.lang.label.remove};return{chip:p,remove:k}});function q(p){p.keyCode===13&&C(p)}function C(p){e.disable||(n("update:selected",!e.selected),n("click",p))}function R(p){(p.keyCode===void 0||p.keyCode===13)&&(s.stopAndPrevent(p),e.disable===!1&&(n("update:modelValue",!1),n("remove")))}function h(){const p=[];_.value===!0&&p.push(t.h("div",{class:"q-focus-helper"})),r.value===!0&&p.push(t.h(s.QIcon,{class:"q-chip__icon q-chip__icon--left",name:b.value}));const k=e.label!==void 0?[t.h("div",{class:"ellipsis"},[e.label])]:void 0;return p.push(t.h("div",{class:"q-chip__content col row no-wrap items-center q-anchor--skip"},s.hMergeSlotSafely(l.default,k))),e.iconRight&&p.push(t.h(s.QIcon,{class:"q-chip__icon q-chip__icon--right",name:e.iconRight})),e.removable===!0&&p.push(t.h(s.QIcon,{class:"q-chip__icon q-chip__icon--remove cursor-pointer",name:S.value,...w.value.remove,onClick:R,onKeyup:R})),p}return()=>{if(e.modelValue===!1)return;const p={class:v.value,style:i.value};return _.value===!0&&Object.assign(p,w.value.chip,{onClick:C,onKeyup:q}),s.hDir("div",p,h(),"ripple",e.ripple!==!1&&e.disable!==!0,()=>[[s.Ripple,e.ripple]])}}}),ul=s.createComponent({name:"QItem",props:{...s.useDarkProps,...s.useRouterLinkProps,tag:{type:String,default:"div"},active:{type:Boolean,default:null},clickable:Boolean,dense:Boolean,insetLevel:Number,tabindex:[String,Number],focused:Boolean,manualFocus:Boolean},emits:["click","keyup"],setup(e,{slots:l,emit:n}){const{proxy:{$q:u}}=t.getCurrentInstance(),f=s.useDark(e,u),{hasLink:i,linkAttrs:r,linkClass:b,linkTag:S,navigateOnClick:_}=s.useRouterLink(),v=t.ref(null),w=t.ref(null),q=t.computed(()=>e.clickable===!0||i.value===!0||e.tag==="label"),C=t.computed(()=>e.disable!==!0&&q.value===!0),R=t.computed(()=>"q-item q-item-type row no-wrap"+(e.dense===!0?" q-item--dense":"")+(f.value===!0?" q-item--dark":"")+(i.value===!0&&e.active===null?b.value:e.active===!0?` q-item--active${e.activeClass!==void 0?` ${e.activeClass}`:""}`:"")+(e.disable===!0?" disabled":"")+(C.value===!0?" q-item--clickable q-link cursor-pointer "+(e.manualFocus===!0?"q-manual-focusable":"q-focusable q-hoverable")+(e.focused===!0?" q-manual-focusable--focused":""):"")),h=t.computed(()=>e.insetLevel===void 0?null:{["padding"+(u.lang.rtl===!0?"Right":"Left")]:16+e.insetLevel*56+"px"});function p(A){C.value===!0&&(w.value!==null&&A.qAvoidFocus!==!0&&(A.qKeyEvent!==!0&&document.activeElement===v.value?w.value.focus():document.activeElement===w.value&&v.value.focus()),_(A))}function k(A){if(C.value===!0&&s.isKeyCode(A,[13,32])===!0){s.stopAndPrevent(A),A.qKeyEvent=!0;const O=new MouseEvent("click",A);O.qKeyEvent=!0,v.value.dispatchEvent(O)}n("keyup",A)}function D(){const A=s.hUniqueSlot(l.default,[]);return C.value===!0&&A.unshift(t.h("div",{class:"q-focus-helper",tabindex:-1,ref:w})),A}return()=>{const A={ref:v,class:R.value,style:h.value,role:"listitem",onClick:p,onKeyup:k};return C.value===!0?(A.tabindex=e.tabindex||"0",Object.assign(A,r.value)):q.value===!0&&(A["aria-disabled"]="true"),t.h(S.value,A,D())}}}),il=s.createComponent({name:"QItemSection",props:{avatar:Boolean,thumbnail:Boolean,side:Boolean,top:Boolean,noWrap:Boolean},setup(e,{slots:l}){const n=t.computed(()=>`q-item__section column q-item__section--${e.avatar===!0||e.side===!0||e.thumbnail===!0?"side":"main"}`+(e.top===!0?" q-item__section--top justify-start":" justify-center")+(e.avatar===!0?" q-item__section--avatar":"")+(e.thumbnail===!0?" q-item__section--thumbnail":"")+(e.noWrap===!0?" q-item__section--nowrap":""));return()=>t.h("div",{class:n.value},s.hSlot(l.default))}}),al=s.createComponent({name:"QItemLabel",props:{overline:Boolean,caption:Boolean,header:Boolean,lines:[Number,String]},setup(e,{slots:l}){const n=t.computed(()=>parseInt(e.lines,10)),u=t.computed(()=>"q-item__label"+(e.overline===!0?" q-item__label--overline text-overline":"")+(e.caption===!0?" q-item__label--caption text-caption":"")+(e.header===!0?" q-item__label--header":"")+(n.value===1?" ellipsis":"")),f=t.computed(()=>e.lines!==void 0&&n.value>1?{overflow:"hidden",display:"-webkit-box","-webkit-box-orient":"vertical","-webkit-line-clamp":n.value}:null);return()=>t.h("div",{style:f.value,class:u.value},s.hSlot(l.default))}});function rl(e,l,n){function u(){}return t.onBeforeUnmount(()=>{e.value===!0&&void 0}),{removeFromHistory:u,addToHistory(){}}}let _e=0,Ue,Qe,Ae,We=!1,bt,St,yt,pe=null;function sl(e){cl(e)&&s.stopAndPrevent(e)}function cl(e){if(e.target===document.body||e.target.classList.contains("q-layout__backdrop"))return!0;const l=s.getEventPath(e),n=e.shiftKey&&!e.deltaX,u=!n&&Math.abs(e.deltaX)<=Math.abs(e.deltaY),f=n||u?e.deltaY:e.deltaX;for(let i=0;i<l.length;i++){const r=l[i];if(U.hasScrollbar(r,u))return u?f<0&&r.scrollTop===0?!0:f>0&&r.scrollTop+r.clientHeight===r.scrollHeight:f<0&&r.scrollLeft===0?!0:f>0&&r.scrollLeft+r.clientWidth===r.scrollWidth}return!0}function wt(e){e.target===document&&(document.scrollingElement.scrollTop=document.scrollingElement.scrollTop)}function Le(e){We!==!0&&(We=!0,requestAnimationFrame(()=>{We=!1;const{height:l}=e.target,{clientHeight:n,scrollTop:u}=document.scrollingElement;(Ae===void 0||l!==window.innerHeight)&&(Ae=n-l,document.scrollingElement.scrollTop=u),u>Ae&&(document.scrollingElement.scrollTop-=Math.ceil((u-Ae)/8))}))}function Ct(e){const l=document.body,n=window.visualViewport!==void 0;if(e==="add"){const{overflowY:u,overflowX:f}=window.getComputedStyle(l);Ue=U.getHorizontalScrollPosition(window),Qe=U.getVerticalScrollPosition(window),bt=l.style.left,St=l.style.top,yt=window.location.href,l.style.left=`-${Ue}px`,l.style.top=`-${Qe}px`,f!=="hidden"&&(f==="scroll"||l.scrollWidth>window.innerWidth)&&l.classList.add("q-body--force-scrollbar-x"),u!=="hidden"&&(u==="scroll"||l.scrollHeight>window.innerHeight)&&l.classList.add("q-body--force-scrollbar-y"),l.classList.add("q-body--prevent-scroll"),document.qScrollPrevented=!0,le.client.is.ios===!0&&(n===!0?(window.scrollTo(0,0),window.visualViewport.addEventListener("resize",Le,s.listenOpts.passiveCapture),window.visualViewport.addEventListener("scroll",Le,s.listenOpts.passiveCapture),window.scrollTo(0,0)):window.addEventListener("scroll",wt,s.listenOpts.passiveCapture))}le.client.is.desktop===!0&&le.client.is.mac===!0&&window[`${e}EventListener`]("wheel",sl,s.listenOpts.notPassive),e==="remove"&&(le.client.is.ios===!0&&(n===!0?(window.visualViewport.removeEventListener("resize",Le,s.listenOpts.passiveCapture),window.visualViewport.removeEventListener("scroll",Le,s.listenOpts.passiveCapture)):window.removeEventListener("scroll",wt,s.listenOpts.passiveCapture)),l.classList.remove("q-body--prevent-scroll"),l.classList.remove("q-body--force-scrollbar-x"),l.classList.remove("q-body--force-scrollbar-y"),document.qScrollPrevented=!1,l.style.left=bt,l.style.top=St,window.location.href===yt&&window.scrollTo(Ue,Qe),Ae=void 0)}function dl(e){let l="add";if(e===!0){if(_e++,pe!==null){clearTimeout(pe),pe=null;return}if(_e>1)return}else{if(_e===0||(_e--,_e>0))return;if(l="remove",le.client.is.ios===!0&&le.client.is.nativeMobile===!0){pe!==null&&clearTimeout(pe),pe=setTimeout(()=>{Ct(l),pe=null},100);return}}Ct(l)}function fl(){let e;return{preventBodyScroll(l){l!==e&&(e!==void 0||l===!0)&&(e=l,dl(l))}}}let Pe=0;const vl={standard:"fixed-full flex-center",top:"fixed-top justify-center",bottom:"fixed-bottom justify-center",right:"fixed-right items-center",left:"fixed-left items-center"},kt={standard:["scale","scale"],top:["slide-down","slide-up"],bottom:["slide-up","slide-down"],right:["slide-left","slide-right"],left:["slide-right","slide-left"]},ml=s.createComponent({name:"QDialog",inheritAttrs:!1,props:{...U.useModelToggleProps,...U.useTransitionProps,transitionShow:String,transitionHide:String,persistent:Boolean,autoClose:Boolean,allowFocusOutside:Boolean,noEscDismiss:Boolean,noBackdropDismiss:Boolean,noRouteDismiss:Boolean,noRefocus:Boolean,noFocus:Boolean,noShake:Boolean,seamless:Boolean,maximized:Boolean,fullWidth:Boolean,fullHeight:Boolean,square:Boolean,backdropFilter:String,position:{type:String,default:"standard",validator:e=>["standard","top","bottom","left","right"].includes(e)}},emits:[...U.useModelToggleEmits,"shake","click","escapeKey"],setup(e,{slots:l,emit:n,attrs:u}){const f=t.getCurrentInstance(),i=t.ref(null),r=t.ref(!1),b=t.ref(!1);let S=null,_=null,v,w;const q=t.computed(()=>e.persistent!==!0&&e.noRouteDismiss!==!0&&e.seamless!==!0),{preventBodyScroll:C}=fl(),{registerTimeout:R}=U.useTimeout(),{registerTick:h,removeTick:p}=U.useTick(),{transitionProps:k,transitionStyle:D}=U.useTransition(e,()=>kt[e.position][0],()=>kt[e.position][1]),A=t.computed(()=>D.value+(e.backdropFilter!==void 0?`;backdrop-filter:${e.backdropFilter};-webkit-backdrop-filter:${e.backdropFilter}`:"")),{showPortal:O,hidePortal:Y,portalIsAccessible:I,renderPortal:P}=U.usePortal(f,i,E,"dialog"),{hide:H}=U.useModelToggle({showing:r,hideOnRouteChange:q,handleShow:ae,handleHide:re,processOnMount:!0});rl(r);const oe=t.computed(()=>`q-dialog__inner flex no-pointer-events q-dialog__inner--${e.maximized===!0?"maximized":"minimized"} q-dialog__inner--${e.position} ${vl[e.position]}`+(b.value===!0?" q-dialog__inner--animating":"")+(e.fullWidth===!0?" q-dialog__inner--fullwidth":"")+(e.fullHeight===!0?" q-dialog__inner--fullheight":"")+(e.square===!0?" q-dialog__inner--square":"")),X=t.computed(()=>r.value===!0&&e.seamless!==!0),ne=t.computed(()=>e.autoClose===!0?{onClick:W}:{}),Q=t.computed(()=>[`q-dialog fullscreen no-pointer-events q-dialog--${X.value===!0?"modal":"seamless"}`,u.class]);t.watch(()=>e.maximized,y=>{r.value===!0&&V(y)}),t.watch(X,y=>{C(y),y===!0?(le.addFocusout(d),U.addEscapeKey(ue)):(le.removeFocusout(d),U.removeEscapeKey(ue))});function ae(y){var z;_=e.noRefocus===!1&&document.activeElement!==null?document.activeElement:null,V(e.maximized),O(),b.value=!0,e.noFocus!==!0?((z=document.activeElement)==null||z.blur(),h(Z)):p(),R(()=>{if(f.proxy.$q.platform.is.ios===!0){if(e.seamless!==!0&&document.activeElement){const{top:T,bottom:B}=document.activeElement.getBoundingClientRect(),{innerHeight:$}=window,x=window.visualViewport!==void 0?window.visualViewport.height:$;T>0&&B>x/2&&(document.scrollingElement.scrollTop=Math.min(document.scrollingElement.scrollHeight-x,B>=$?1/0:Math.ceil(document.scrollingElement.scrollTop+B-x/2))),document.activeElement.scrollIntoView()}w=!0,i.value.click(),w=!1}O(!0),b.value=!1,n("show",y)},e.transitionDuration)}function re(y){p(),g(!0),b.value=!0,Y(),_!==null&&((((y==null?void 0:y.type.indexOf("key"))===0?_.closest('[tabindex]:not([tabindex^="-"])'):void 0)||_).focus(),_=null),R(()=>{Y(!0),b.value=!1,n("hide",y)},e.transitionDuration)}function Z(y){U.addFocusFn(()=>{let z=i.value;if(z!==null){if(y!==void 0){const T=z.querySelector(y);if(T!==null){T.focus({preventScroll:!0});return}}z.contains(document.activeElement)!==!0&&(z=z.querySelector("[autofocus][tabindex], [data-autofocus][tabindex]")||z.querySelector("[autofocus] [tabindex], [data-autofocus] [tabindex]")||z.querySelector("[autofocus], [data-autofocus]")||z,z.focus({preventScroll:!0}))}})}function K(y){y&&typeof y.focus=="function"?y.focus({preventScroll:!0}):Z(),n("shake");const z=i.value;z!==null&&(z.classList.remove("q-animate--scale"),z.classList.add("q-animate--scale"),S!==null&&clearTimeout(S),S=setTimeout(()=>{S=null,i.value!==null&&(z.classList.remove("q-animate--scale"),Z())},170))}function ue(){e.seamless!==!0&&(e.persistent===!0||e.noEscDismiss===!0?e.maximized!==!0&&e.noShake!==!0&&K():(n("escapeKey"),H()))}function g(y){S!==null&&(clearTimeout(S),S=null),(y===!0||r.value===!0)&&(V(!1),e.seamless!==!0&&(C(!1),le.removeFocusout(d),U.removeEscapeKey(ue))),y!==!0&&(_=null)}function V(y){y===!0?v!==!0&&(Pe<1&&document.body.classList.add("q-body--dialog"),Pe++,v=!0):v===!0&&(Pe<2&&document.body.classList.remove("q-body--dialog"),Pe--,v=!1)}function W(y){w!==!0&&(H(y),n("click",y))}function a(y){e.persistent!==!0&&e.noBackdropDismiss!==!0?H(y):e.noShake!==!0&&K()}function d(y){e.allowFocusOutside!==!0&&I.value===!0&&s.childHasFocus(i.value,y.target)!==!0&&Z('[tabindex]:not([tabindex="-1"])')}Object.assign(f.proxy,{focus:Z,shake:K,__updateRefocusTarget(y){_=y||null}}),t.onBeforeUnmount(g);function E(){return t.h("div",{role:"dialog","aria-modal":X.value===!0?"true":"false",...u,class:Q.value},[t.h(t.Transition,{name:"q-transition--fade",appear:!0},()=>X.value===!0?t.h("div",{class:"q-dialog__backdrop fixed-full",style:A.value,"aria-hidden":"true",tabindex:-1,onClick:a}):null),t.h(t.Transition,k.value,()=>r.value===!0?t.h("div",{ref:i,class:oe.value,style:D.value,tabindex:-1,...ne.value},s.hSlot(l.default)):null)])}return P}});let He=!1;{const e=document.createElement("div");e.setAttribute("dir","rtl"),Object.assign(e.style,{width:"1px",height:"1px",overflow:"auto"});const l=document.createElement("div");Object.assign(l.style,{width:"1000px",height:"1px"}),document.body.appendChild(e),e.appendChild(l),e.scrollLeft=-1e3,He=e.scrollLeft>=0,e.remove()}const te=1e3,pl=["start","center","end","start-force","center-force","end-force"],Tt=Array.prototype.filter,hl=window.getComputedStyle(document.body).overflowAnchor===void 0?s.noop:function(e,l){e!==null&&(e._qOverflowAnimationFrame!==void 0&&cancelAnimationFrame(e._qOverflowAnimationFrame),e._qOverflowAnimationFrame=requestAnimationFrame(()=>{if(e===null)return;e._qOverflowAnimationFrame=void 0;const n=e.children||[];Tt.call(n,f=>f.dataset&&f.dataset.qVsAnchor!==void 0).forEach(f=>{delete f.dataset.qVsAnchor});const u=n[l];u!=null&&u.dataset&&(u.dataset.qVsAnchor="")}))};function ke(e,l){return e+l}function Xe(e,l,n,u,f,i,r,b){const S=e===window?document.scrollingElement||document.documentElement:e,_=f===!0?"offsetWidth":"offsetHeight",v={scrollStart:0,scrollViewSize:-r-b,scrollMaxSize:0,offsetStart:-r,offsetEnd:-b};if(f===!0?(e===window?(v.scrollStart=window.pageXOffset||window.scrollX||document.body.scrollLeft||0,v.scrollViewSize+=document.documentElement.clientWidth):(v.scrollStart=S.scrollLeft,v.scrollViewSize+=S.clientWidth),v.scrollMaxSize=S.scrollWidth,i===!0&&(v.scrollStart=(He===!0?v.scrollMaxSize-v.scrollViewSize:0)-v.scrollStart)):(e===window?(v.scrollStart=window.pageYOffset||window.scrollY||document.body.scrollTop||0,v.scrollViewSize+=document.documentElement.clientHeight):(v.scrollStart=S.scrollTop,v.scrollViewSize+=S.clientHeight),v.scrollMaxSize=S.scrollHeight),n!==null)for(let w=n.previousElementSibling;w!==null;w=w.previousElementSibling)w.classList.contains("q-virtual-scroll--skip")===!1&&(v.offsetStart+=w[_]);if(u!==null)for(let w=u.nextElementSibling;w!==null;w=w.nextElementSibling)w.classList.contains("q-virtual-scroll--skip")===!1&&(v.offsetEnd+=w[_]);if(l!==e){const w=S.getBoundingClientRect(),q=l.getBoundingClientRect();f===!0?(v.offsetStart+=q.left-w.left,v.offsetEnd-=q.width):(v.offsetStart+=q.top-w.top,v.offsetEnd-=q.height),e!==window&&(v.offsetStart+=v.scrollStart),v.offsetEnd+=v.scrollMaxSize-v.offsetStart}return v}function qt(e,l,n,u){l==="end"&&(l=(e===window?document.body:e)[n===!0?"scrollWidth":"scrollHeight"]),e===window?n===!0?(u===!0&&(l=(He===!0?document.body.scrollWidth-document.documentElement.clientWidth:0)-l),window.scrollTo(l,window.pageYOffset||window.scrollY||document.body.scrollTop||0)):window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,l):n===!0?(u===!0&&(l=(He===!0?e.scrollWidth-e.offsetWidth:0)-l),e.scrollLeft=l):e.scrollTop=l}function Be(e,l,n,u){if(n>=u)return 0;const f=l.length,i=Math.floor(n/te),r=Math.floor((u-1)/te)+1;let b=e.slice(i,r).reduce(ke,0);return n%te!==0&&(b-=l.slice(i*te,n).reduce(ke,0)),u%te!==0&&u!==f&&(b-=l.slice(u,r*te).reduce(ke,0)),b}const gl={virtualScrollSliceSize:{type:[Number,String],default:10},virtualScrollSliceRatioBefore:{type:[Number,String],default:1},virtualScrollSliceRatioAfter:{type:[Number,String],default:1},virtualScrollItemSize:{type:[Number,String],default:24},virtualScrollStickySizeStart:{type:[Number,String],default:0},virtualScrollStickySizeEnd:{type:[Number,String],default:0},tableColspan:[Number,String]},Vt={virtualScrollHorizontal:Boolean,onVirtualScroll:Function,...gl};function bl({virtualScrollLength:e,getVirtualScrollTarget:l,getVirtualScrollEl:n,virtualScrollItemSizeComputed:u}){const f=t.getCurrentInstance(),{props:i,emit:r,proxy:b}=f,{$q:S}=b;let _,v,w,q=[],C;const R=t.ref(0),h=t.ref(0),p=t.ref({}),k=t.ref(null),D=t.ref(null),A=t.ref(null),O=t.ref({from:0,to:0}),Y=t.computed(()=>i.tableColspan!==void 0?i.tableColspan:100);u===void 0&&(u=t.computed(()=>i.virtualScrollItemSize));const I=t.computed(()=>u.value+";"+i.virtualScrollHorizontal),P=t.computed(()=>I.value+";"+i.virtualScrollSliceRatioBefore+";"+i.virtualScrollSliceRatioAfter);t.watch(P,()=>{K()}),t.watch(I,H);function H(){Z(v,!0)}function oe(a){Z(a===void 0?v:a)}function X(a,d){const E=l();if(E==null||E.nodeType===8)return;const y=Xe(E,n(),k.value,D.value,i.virtualScrollHorizontal,S.lang.rtl,i.virtualScrollStickySizeStart,i.virtualScrollStickySizeEnd);w!==y.scrollViewSize&&K(y.scrollViewSize),Q(E,y,Math.min(e.value-1,Math.max(0,parseInt(a,10)||0)),0,pl.indexOf(d)!==-1?d:v!==-1&&a>v?"end":"start")}function ne(){const a=l();if(a==null||a.nodeType===8)return;const d=Xe(a,n(),k.value,D.value,i.virtualScrollHorizontal,S.lang.rtl,i.virtualScrollStickySizeStart,i.virtualScrollStickySizeEnd),E=e.value-1,y=d.scrollMaxSize-d.offsetStart-d.offsetEnd-h.value;if(_===d.scrollStart)return;if(d.scrollMaxSize<=0){Q(a,d,0,0);return}w!==d.scrollViewSize&&K(d.scrollViewSize),ae(O.value.from);const z=Math.floor(d.scrollMaxSize-Math.max(d.scrollViewSize,d.offsetEnd)-Math.min(C[E],d.scrollViewSize/2));if(z>0&&Math.ceil(d.scrollStart)>=z){Q(a,d,E,d.scrollMaxSize-d.offsetEnd-q.reduce(ke,0));return}let T=0,B=d.scrollStart-d.offsetStart,$=B;if(B<=y&&B+d.scrollViewSize>=R.value)B-=R.value,T=O.value.from,$=B;else for(let x=0;B>=q[x]&&T<E;x++)B-=q[x],T+=te;for(;B>0&&T<E;)B-=C[T],B>-d.scrollViewSize?(T++,$=B):$=C[T]+B;Q(a,d,T,$)}function Q(a,d,E,y,z){const T=typeof z=="string"&&z.indexOf("-force")!==-1,B=T===!0?z.replace("-force",""):z,$=B!==void 0?B:"start";let x=Math.max(0,E-p.value[$]),J=x+p.value.total;J>e.value&&(J=e.value,x=Math.max(0,J-p.value.total)),_=d.scrollStart;const se=x!==O.value.from||J!==O.value.to;if(se===!1&&B===void 0){g(E);return}const{activeElement:Ee}=document,ee=A.value;se===!0&&ee!==null&&ee!==Ee&&ee.contains(Ee)===!0&&(ee.addEventListener("focusout",re),setTimeout(()=>{ee==null||ee.removeEventListener("focusout",re)})),hl(ee,E-x);const ze=B!==void 0?C.slice(x,E).reduce(ke,0):0;if(se===!0){const de=J>=O.value.from&&x<=O.value.to?O.value.to:J;O.value={from:x,to:de},R.value=Be(q,C,0,x),h.value=Be(q,C,J,e.value),requestAnimationFrame(()=>{O.value.to!==J&&_===d.scrollStart&&(O.value={from:O.value.from,to:J},h.value=Be(q,C,J,e.value))})}requestAnimationFrame(()=>{if(_!==d.scrollStart)return;se===!0&&ae(x);const de=C.slice(x,E).reduce(ke,0),fe=de+d.offsetStart+R.value,Te=fe+C[E];let qe=fe+y;if(B!==void 0){const De=de-ze,Ve=d.scrollStart+De;qe=T!==!0&&Ve<fe&&Te<Ve+d.scrollViewSize?Ve:B==="end"?Te-d.scrollViewSize:fe-(B==="start"?0:Math.round((d.scrollViewSize-C[E])/2))}_=qe,qt(a,qe,i.virtualScrollHorizontal,S.lang.rtl),g(E)})}function ae(a){const d=A.value;if(d){const E=Tt.call(d.children,x=>x.classList&&x.classList.contains("q-virtual-scroll--skip")===!1),y=E.length,z=i.virtualScrollHorizontal===!0?x=>x.getBoundingClientRect().width:x=>x.offsetHeight;let T=a,B,$;for(let x=0;x<y;){for(B=z(E[x]),x++;x<y&&E[x].classList.contains("q-virtual-scroll--with-prev")===!0;)B+=z(E[x]),x++;$=B-C[T],$!==0&&(C[T]+=$,q[Math.floor(T/te)]+=$),T++}}}function re(){var a;(a=A.value)==null||a.focus()}function Z(a,d){const E=1*u.value;(d===!0||Array.isArray(C)===!1)&&(C=[]);const y=C.length;C.length=e.value;for(let T=e.value-1;T>=y;T--)C[T]=E;const z=Math.floor((e.value-1)/te);q=[];for(let T=0;T<=z;T++){let B=0;const $=Math.min((T+1)*te,e.value);for(let x=T*te;x<$;x++)B+=C[x];q.push(B)}v=-1,_=void 0,R.value=Be(q,C,0,O.value.from),h.value=Be(q,C,O.value.to,e.value),a>=0?(ae(O.value.from),t.nextTick(()=>{X(a)})):V()}function K(a){if(a===void 0&&typeof window<"u"){const B=l();B!=null&&B.nodeType!==8&&(a=Xe(B,n(),k.value,D.value,i.virtualScrollHorizontal,S.lang.rtl,i.virtualScrollStickySizeStart,i.virtualScrollStickySizeEnd).scrollViewSize)}w=a;const d=parseFloat(i.virtualScrollSliceRatioBefore)||0,E=parseFloat(i.virtualScrollSliceRatioAfter)||0,y=1+d+E,z=a===void 0||a<=0?1:Math.ceil(a/u.value),T=Math.max(1,z,Math.ceil((i.virtualScrollSliceSize>0?i.virtualScrollSliceSize:10)/y));p.value={total:Math.ceil(T*y),start:Math.ceil(T*d),center:Math.ceil(T*(.5+d)),end:Math.ceil(T*(1+d)),view:z}}function ue(a,d){const E=i.virtualScrollHorizontal===!0?"width":"height",y={["--q-virtual-scroll-item-"+E]:u.value+"px"};return[a==="tbody"?t.h(a,{class:"q-virtual-scroll__padding",key:"before",ref:k},[t.h("tr",[t.h("td",{style:{[E]:`${R.value}px`,...y},colspan:Y.value})])]):t.h(a,{class:"q-virtual-scroll__padding",key:"before",ref:k,style:{[E]:`${R.value}px`,...y}}),t.h(a,{class:"q-virtual-scroll__content",key:"content",ref:A,tabindex:-1},d.flat()),a==="tbody"?t.h(a,{class:"q-virtual-scroll__padding",key:"after",ref:D},[t.h("tr",[t.h("td",{style:{[E]:`${h.value}px`,...y},colspan:Y.value})])]):t.h(a,{class:"q-virtual-scroll__padding",key:"after",ref:D,style:{[E]:`${h.value}px`,...y}})]}function g(a){v!==a&&(i.onVirtualScroll!==void 0&&r("virtualScroll",{index:a,from:O.value.from,to:O.value.to-1,direction:a<v?"decrease":"increase",ref:b}),v=a)}K();const V=Bt(ne,S.platform.is.ios===!0?120:35);t.onBeforeMount(()=>{K()});let W=!1;return t.onDeactivated(()=>{W=!0}),t.onActivated(()=>{if(W!==!0)return;const a=l();_!==void 0&&a!==void 0&&a!==null&&a.nodeType!==8?qt(a,_,i.virtualScrollHorizontal,S.lang.rtl):X(v)}),t.onBeforeUnmount(()=>{V.cancel()}),Object.assign(b,{scrollTo:X,reset:H,refresh:oe}),{virtualScrollSliceRange:O,virtualScrollSliceSizeComputed:p,setVirtualScrollSize:K,onVirtualScrollEvt:V,localResetVirtualScroll:Z,padVirtualScroll:ue,scrollTo:X,reset:H,refresh:oe}}const Sl=/[\u3000-\u303f\u3040-\u309f\u30a0-\u30ff\uff00-\uff9f\u4e00-\u9faf\u3400-\u4dbf]/,yl=/[\u4e00-\u9fff\u3400-\u4dbf\u{20000}-\u{2a6df}\u{2a700}-\u{2b73f}\u{2b740}-\u{2b81f}\u{2b820}-\u{2ceaf}\uf900-\ufaff\u3300-\u33ff\ufe30-\ufe4f\uf900-\ufaff\u{2f800}-\u{2fa1f}]/u,wl=/[\u3131-\u314e\u314f-\u3163\uac00-\ud7a3]/,Cl=/[a-z0-9_ -]$/i;function kl(e){return function(n){if(n.type==="compositionend"||n.type==="change"){if(n.target.qComposing!==!0)return;n.target.qComposing=!1,e(n)}else n.type==="compositionupdate"&&n.target.qComposing!==!0&&typeof n.data=="string"&&(le.client.is.firefox===!0?Cl.test(n.data)===!1:Sl.test(n.data)===!0||yl.test(n.data)===!0||wl.test(n.data)===!0)===!0&&(n.target.qComposing=!0)}}function ce(e,l){if(e===l)return!0;if(e!==null&&l!==null&&typeof e=="object"&&typeof l=="object"){if(e.constructor!==l.constructor)return!1;let n,u;if(e.constructor===Array){if(n=e.length,n!==l.length)return!1;for(u=n;u--!==0;)if(ce(e[u],l[u])!==!0)return!1;return!0}if(e.constructor===Map){if(e.size!==l.size)return!1;let i=e.entries();for(u=i.next();u.done!==!0;){if(l.has(u.value[0])!==!0)return!1;u=i.next()}for(i=e.entries(),u=i.next();u.done!==!0;){if(ce(u.value[1],l.get(u.value[0]))!==!0)return!1;u=i.next()}return!0}if(e.constructor===Set){if(e.size!==l.size)return!1;const i=e.entries();for(u=i.next();u.done!==!0;){if(l.has(u.value[0])!==!0)return!1;u=i.next()}return!0}if(e.buffer!=null&&e.buffer.constructor===ArrayBuffer){if(n=e.length,n!==l.length)return!1;for(u=n;u--!==0;)if(e[u]!==l[u])return!1;return!0}if(e.constructor===RegExp)return e.source===l.source&&e.flags===l.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===l.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===l.toString();const f=Object.keys(e).filter(i=>e[i]!==void 0);if(n=f.length,n!==Object.keys(l).filter(i=>l[i]!==void 0).length)return!1;for(u=n;u--!==0;){const i=f[u];if(ce(e[i],l[i])!==!0)return!1}return!0}return e!==e&&l!==l}function xt(e,l,n){if(n<=l)return l;const u=n-l+1;let f=l+(e-l)%u;return f<l&&(f=u+f),f===0?0:f}const _t=e=>["add","add-unique","toggle"].includes(e),ql=".*+?^${}()|[]\\",Vl=Object.keys(Je);function Ye(e,l){if(typeof e=="function")return e;const n=e!==void 0?e:l;return u=>u!==null&&typeof u=="object"&&n in u?u[n]:u}const xl=s.createComponent({name:"QSelect",inheritAttrs:!1,props:{...Vt,...s.useFormProps,...Je,modelValue:{required:!0},multiple:Boolean,displayValue:[String,Number],displayValueHtml:Boolean,dropdownIcon:String,options:{type:Array,default:()=>[]},optionValue:[Function,String],optionLabel:[Function,String],optionDisable:[Function,String],hideSelected:Boolean,hideDropdownIcon:Boolean,fillInput:Boolean,maxValues:[Number,String],optionsDense:Boolean,optionsDark:{type:Boolean,default:null},optionsSelectedClass:String,optionsHtml:Boolean,optionsCover:Boolean,menuShrink:Boolean,menuAnchor:String,menuSelf:String,menuOffset:Array,popupContentClass:String,popupContentStyle:[String,Array,Object],popupNoRouteDismiss:Boolean,useInput:Boolean,useChips:Boolean,newValueMode:{type:String,validator:_t},mapOptions:Boolean,emitValue:Boolean,disableTabSelection:Boolean,inputDebounce:{type:[Number,String],default:500},inputClass:[Array,String,Object],inputStyle:[Array,String,Object],tabindex:{type:[String,Number],default:0},autocomplete:String,transitionShow:{},transitionHide:{},transitionDuration:{},behavior:{type:String,validator:e=>["default","menu","dialog"].includes(e),default:"default"},virtualScrollItemSize:Vt.virtualScrollItemSize.type,onNewValue:Function,onFilter:Function},emits:[...At,"add","remove","inputValue","keyup","keypress","keydown","popupShow","popupHide","filterAbort"],setup(e,{slots:l,emit:n}){const{proxy:u}=t.getCurrentInstance(),{$q:f}=u,i=t.ref(!1),r=t.ref(!1),b=t.ref(-1),S=t.ref(""),_=t.ref(!1),v=t.ref(!1);let w=null,q=null,C,R,h,p=null,k,D,A,O;const Y=t.ref(null),I=t.ref(null),P=t.ref(null),H=t.ref(null),oe=t.ref(null),X=s.useFormInputNameAttr(e),ne=kl(rt),Q=t.computed(()=>Array.isArray(e.options)?e.options.length:0),ae=t.computed(()=>e.virtualScrollItemSize===void 0?e.optionsDense===!0?24:48:e.virtualScrollItemSize),{virtualScrollSliceRange:re,virtualScrollSliceSizeComputed:Z,localResetVirtualScroll:K,padVirtualScroll:ue,onVirtualScrollEvt:g,scrollTo:V,setVirtualScrollSize:W}=bl({virtualScrollLength:Q,getVirtualScrollTarget:Ot,getVirtualScrollEl:it,virtualScrollItemSizeComputed:ae}),a=Et(),d=t.computed(()=>{const o=e.mapOptions===!0&&e.multiple!==!0,c=e.modelValue!==void 0&&(e.modelValue!==null||o===!0)?e.multiple===!0&&Array.isArray(e.modelValue)?e.modelValue:[e.modelValue]:[];if(e.mapOptions===!0&&Array.isArray(e.options)===!0){const m=e.mapOptions===!0&&C!==void 0?C:[],F=c.map(M=>It(M,m));return e.modelValue===null&&o===!0?F.filter(M=>M!==null):F}return c}),E=t.computed(()=>{const o={};return Vl.forEach(c=>{const m=e[c];m!==void 0&&(o[c]=m)}),o}),y=t.computed(()=>e.optionsDark===null?a.isDark.value:e.optionsDark),z=t.computed(()=>Ze(d.value)),T=t.computed(()=>{let o="q-field__input q-placeholder col";return e.hideSelected===!0||d.value.length===0?[o,e.inputClass]:(o+=" q-field__input--padding",e.inputClass===void 0?o:[o,e.inputClass])}),B=t.computed(()=>(e.virtualScrollHorizontal===!0?"q-virtual-scroll--horizontal":"")+(e.popupContentClass?" "+e.popupContentClass:"")),$=t.computed(()=>Q.value===0),x=t.computed(()=>d.value.map(o=>G.value(o)).join(", ")),J=t.computed(()=>e.displayValue!==void 0?e.displayValue:x.value),se=t.computed(()=>e.optionsHtml===!0?()=>!0:o=>(o==null?void 0:o.html)===!0),Ee=t.computed(()=>e.displayValueHtml===!0||e.displayValue===void 0&&(e.optionsHtml===!0||d.value.some(se.value))),ee=t.computed(()=>a.focused.value===!0?e.tabindex:-1),ze=t.computed(()=>{const o={tabindex:e.tabindex,role:"combobox","aria-label":e.label,"aria-readonly":e.readonly===!0?"true":"false","aria-autocomplete":e.useInput===!0?"list":"none","aria-expanded":i.value===!0?"true":"false","aria-controls":`${a.targetUid.value}_lb`};return b.value>=0&&(o["aria-activedescendant"]=`${a.targetUid.value}_${b.value}`),o}),de=t.computed(()=>({id:`${a.targetUid.value}_lb`,role:"listbox","aria-multiselectable":e.multiple===!0?"true":"false"})),fe=t.computed(()=>d.value.map((o,c)=>({index:c,opt:o,html:se.value(o),selected:!0,removeAtIndex:Rt,toggleOption:ve,tabindex:ee.value}))),Te=t.computed(()=>{if(Q.value===0)return[];const{from:o,to:c}=re.value;return e.options.slice(o,c).map((m,F)=>{const M=he.value(m)===!0,j=je(m)===!0,L=o+F,N={clickable:!0,active:j,activeClass:Ve.value,manualFocus:!0,focused:!1,disable:M,tabindex:-1,dense:e.optionsDense,dark:y.value,role:"option","aria-selected":j===!0?"true":"false",id:`${a.targetUid.value}_${L}`,onClick:()=>{ve(m)}};return M!==!0&&(b.value===L&&(N.focused=!0),f.platform.is.desktop===!0&&(N.onMousemove=()=>{i.value===!0&&ge(L)})),{index:L,opt:m,html:se.value(m),label:G.value(m),selected:N.active,focused:N.focused,toggleOption:ve,setOptionIndex:ge,itemProps:N}})}),qe=t.computed(()=>e.dropdownIcon!==void 0?e.dropdownIcon:f.iconSet.arrow.dropdown),De=t.computed(()=>e.optionsCover===!1&&e.outlined!==!0&&e.standout!==!0&&e.borderless!==!0&&e.rounded!==!0),Ve=t.computed(()=>e.optionsSelectedClass!==void 0?e.optionsSelectedClass:e.color!==void 0?`text-${e.color}`:""),ie=t.computed(()=>Ye(e.optionValue,"value")),G=t.computed(()=>Ye(e.optionLabel,"label")),he=t.computed(()=>Ye(e.optionDisable,"disable")),Fe=t.computed(()=>d.value.map(ie.value)),Ft=t.computed(()=>{const o={onInput:rt,onChange:ne,onKeydown:ut,onKeyup:ot,onKeypress:nt,onFocus:tt,onClick(c){R===!0&&s.stop(c)}};return o.onCompositionstart=o.onCompositionupdate=o.onCompositionend=ne,o});t.watch(d,o=>{C=o,e.useInput===!0&&e.fillInput===!0&&e.multiple!==!0&&a.innerLoading.value!==!0&&(r.value!==!0&&i.value!==!0||z.value!==!0)&&(h!==!0&&we(),(r.value===!0||i.value===!0)&&be(""))},{immediate:!0}),t.watch(()=>e.fillInput,we),t.watch(i,Ne),t.watch(Q,Wt);function Ge(o){return e.emitValue===!0?ie.value(o):o}function $e(o){if(o!==-1&&o<d.value.length)if(e.multiple===!0){const c=e.modelValue.slice();n("remove",{index:o,value:c.splice(o,1)[0]}),n("update:modelValue",c)}else n("update:modelValue",null)}function Rt(o){$e(o),a.focus()}function et(o,c){const m=Ge(o);if(e.multiple!==!0){e.fillInput===!0&&xe(G.value(o),!0,!0),n("update:modelValue",m);return}if(d.value.length===0){n("add",{index:0,value:m}),n("update:modelValue",e.multiple===!0?[m]:m);return}if(c===!0&&je(o)===!0||e.maxValues!==void 0&&e.modelValue.length>=e.maxValues)return;const F=e.modelValue.slice();n("add",{index:F.length,value:m}),F.push(m),n("update:modelValue",F)}function ve(o,c){var j;if(a.editable.value!==!0||o===void 0||he.value(o)===!0)return;const m=ie.value(o);if(e.multiple!==!0){c!==!0&&(xe(e.fillInput===!0?G.value(o):"",!0,!0),me()),(j=I.value)==null||j.focus(),(d.value.length===0||ce(ie.value(d.value[0]),m)!==!0)&&n("update:modelValue",e.emitValue===!0?m:o);return}if((R!==!0||_.value===!0)&&a.focus(),tt(),d.value.length===0){const L=e.emitValue===!0?m:o;n("add",{index:0,value:L}),n("update:modelValue",e.multiple===!0?[L]:L);return}const F=e.modelValue.slice(),M=Fe.value.findIndex(L=>ce(L,m));if(M!==-1)n("remove",{index:M,value:F.splice(M,1)[0]});else{if(e.maxValues!==void 0&&F.length>=e.maxValues)return;const L=e.emitValue===!0?m:o;n("add",{index:F.length,value:L}),F.push(L)}n("update:modelValue",F)}function ge(o){if(f.platform.is.desktop!==!0)return;const c=o!==-1&&o<Q.value?o:-1;b.value!==c&&(b.value=c)}function Re(o=1,c){if(i.value===!0){let m=b.value;do m=xt(m+o,-1,Q.value-1);while(m!==-1&&m!==b.value&&he.value(e.options[m])===!0);b.value!==m&&(ge(m),V(m),c!==!0&&e.useInput===!0&&e.fillInput===!0&&Ie(m>=0?G.value(e.options[m]):k,!0))}}function It(o,c){const m=F=>ce(ie.value(F),o);return e.options.find(m)||c.find(m)||o}function je(o){const c=ie.value(o);return Fe.value.find(m=>ce(m,c))!==void 0}function tt(o){e.useInput===!0&&I.value!==null&&(o===void 0||I.value===o.target&&o.target.value===x.value)&&I.value.select()}function lt(o){s.isKeyCode(o,27)===!0&&i.value===!0&&(s.stop(o),me(),we()),n("keyup",o)}function ot(o){const{value:c}=o.target;if(o.keyCode!==void 0){lt(o);return}if(o.target.value="",w!==null&&(clearTimeout(w),w=null),q!==null&&(clearTimeout(q),q=null),we(),typeof c=="string"&&c.length!==0){const m=c.toLocaleLowerCase(),F=j=>{const L=e.options.find(N=>String(j.value(N)).toLocaleLowerCase()===m);return L===void 0?!1:(d.value.indexOf(L)===-1?ve(L):me(),!0)},M=j=>{F(ie)!==!0&&j!==!0&&F(G)!==!0&&be(c,!0,()=>M(!0))};M()}else a.clearValue(o)}function nt(o){n("keypress",o)}function ut(o){if(n("keydown",o),s.shouldIgnoreKey(o)===!0)return;const c=S.value.length!==0&&(e.newValueMode!==void 0||e.onNewValue!==void 0),m=o.shiftKey!==!0&&e.disableTabSelection!==!0&&e.multiple!==!0&&(b.value!==-1||c===!0);if(o.keyCode===27){s.prevent(o);return}if(o.keyCode===9&&m===!1){Se();return}if(o.target===void 0||o.target.id!==a.targetUid.value||a.editable.value!==!0)return;if(o.keyCode===40&&a.innerLoading.value!==!0&&i.value===!1){s.stopAndPrevent(o),ye();return}if(o.keyCode===8&&(e.useChips===!0||e.clearable===!0)&&e.hideSelected!==!0&&S.value.length===0){e.multiple===!0&&Array.isArray(e.modelValue)===!0?$e(e.modelValue.length-1):e.multiple!==!0&&e.modelValue!==null&&n("update:modelValue",null);return}(o.keyCode===35||o.keyCode===36)&&(typeof S.value!="string"||S.value.length===0)&&(s.stopAndPrevent(o),b.value=-1,Re(o.keyCode===36?1:-1,e.multiple)),(o.keyCode===33||o.keyCode===34)&&Z.value!==void 0&&(s.stopAndPrevent(o),b.value=Math.max(-1,Math.min(Q.value,b.value+(o.keyCode===33?-1:1)*Z.value.view)),Re(o.keyCode===33?1:-1,e.multiple)),(o.keyCode===38||o.keyCode===40)&&(s.stopAndPrevent(o),Re(o.keyCode===38?-1:1,e.multiple));const F=Q.value;if((A===void 0||O<Date.now())&&(A=""),F>0&&e.useInput!==!0&&o.key!==void 0&&o.key.length===1&&o.altKey===!1&&o.ctrlKey===!1&&o.metaKey===!1&&(o.keyCode!==32||A.length!==0)){i.value!==!0&&ye(o);const M=o.key.toLocaleLowerCase(),j=A.length===1&&A[0]===M;O=Date.now()+1500,j===!1&&(s.stopAndPrevent(o),A+=M);const L=new RegExp("^"+A.split("").map(Ce=>ql.indexOf(Ce)!==-1?"\\"+Ce:Ce).join(".*"),"i");let N=b.value;if(j===!0||N<0||L.test(G.value(e.options[N]))!==!0)do N=xt(N+1,-1,F-1);while(N!==b.value&&(he.value(e.options[N])===!0||L.test(G.value(e.options[N]))!==!0));b.value!==N&&t.nextTick(()=>{ge(N),V(N),N>=0&&e.useInput===!0&&e.fillInput===!0&&Ie(G.value(e.options[N]),!0)});return}if(!(o.keyCode!==13&&(o.keyCode!==32||e.useInput===!0||A!=="")&&(o.keyCode!==9||m===!1))){if(o.keyCode!==9&&s.stopAndPrevent(o),b.value!==-1&&b.value<F){ve(e.options[b.value]);return}if(c===!0){const M=(j,L)=>{var Ce;if(L){if(_t(L)!==!0)return}else L=e.newValueMode;if(xe("",e.multiple!==!0,!0),j==null)return;(L==="toggle"?ve:et)(j,L==="add-unique"),e.multiple!==!0&&((Ce=I.value)==null||Ce.focus(),me())};if(e.onNewValue!==void 0?n("newValue",S.value,M):M(S.value),e.multiple!==!0)return}i.value===!0?Se():a.innerLoading.value!==!0&&ye()}}function it(){return R===!0?oe.value:P.value!==null&&P.value.contentEl!==null?P.value.contentEl:void 0}function Ot(){return it()}function Mt(){return e.hideSelected===!0?[]:l["selected-item"]!==void 0?fe.value.map(o=>l["selected-item"](o)).slice():l.selected!==void 0?[].concat(l.selected()):e.useChips===!0?fe.value.map((o,c)=>t.h(nl,{key:"option-"+c,removable:a.editable.value===!0&&he.value(o.opt)!==!0,dense:!0,textColor:e.color,tabindex:ee.value,onRemove(){o.removeAtIndex(c)}},()=>t.h("span",{class:"ellipsis",[o.html===!0?"innerHTML":"textContent"]:G.value(o.opt)}))):[t.h("span",{class:"ellipsis",[Ee.value===!0?"innerHTML":"textContent"]:J.value})]}function at(){if($.value===!0)return l["no-option"]!==void 0?l["no-option"]({inputValue:S.value}):void 0;const o=l.option!==void 0?l.option:m=>t.h(ul,{key:m.index,...m.itemProps},()=>t.h(il,()=>t.h(al,()=>t.h("span",{[m.html===!0?"innerHTML":"textContent"]:m.label}))));let c=ue("div",Te.value.map(o));return l["before-options"]!==void 0&&(c=l["before-options"]().concat(c)),s.hMergeSlot(l["after-options"],c)}function Lt(o,c){const m=c===!0?{...ze.value,...a.splitAttrs.attributes.value}:void 0,F={ref:c===!0?I:void 0,key:"i_t",class:T.value,style:e.inputStyle,value:S.value!==void 0?S.value:"",type:"search",...m,id:c===!0?a.targetUid.value:void 0,maxlength:e.maxlength,autocomplete:e.autocomplete,"data-autofocus":o===!0||e.autofocus===!0||void 0,disabled:e.disable===!0,readonly:e.readonly===!0,...Ft.value};return o!==!0&&R===!0&&(Array.isArray(F.class)===!0?F.class=[...F.class,"no-pointer-events"]:F.class+=" no-pointer-events"),t.h("input",F)}function rt(o){w!==null&&(clearTimeout(w),w=null),q!==null&&(clearTimeout(q),q=null),!(o&&o.target&&o.target.qComposing===!0)&&(Ie(o.target.value||""),h=!0,k=S.value,a.focused.value!==!0&&(R!==!0||_.value===!0)&&a.focus(),e.onFilter!==void 0&&(w=setTimeout(()=>{w=null,be(S.value)},e.inputDebounce)))}function Ie(o,c){S.value!==o&&(S.value=o,c===!0||e.inputDebounce===0||e.inputDebounce==="0"?n("inputValue",o):q=setTimeout(()=>{q=null,n("inputValue",o)},e.inputDebounce))}function xe(o,c,m){h=m!==!0,e.useInput===!0&&(Ie(o,!0),(c===!0||m!==!0)&&(k=o),c!==!0&&be(o))}function be(o,c,m){if(e.onFilter===void 0||c!==!0&&a.focused.value!==!0)return;a.innerLoading.value===!0?n("filterAbort"):(a.innerLoading.value=!0,v.value=!0),o!==""&&e.multiple!==!0&&d.value.length!==0&&h!==!0&&o===G.value(d.value[0])&&(o="");const F=setTimeout(()=>{i.value===!0&&(i.value=!1)},10);p!==null&&clearTimeout(p),p=F,n("filter",o,(M,j)=>{(c===!0||a.focused.value===!0)&&p===F&&(clearTimeout(p),typeof M=="function"&&M(),v.value=!1,t.nextTick(()=>{a.innerLoading.value=!1,a.editable.value===!0&&(c===!0?i.value===!0&&me():i.value===!0?Ne(!0):i.value=!0),typeof j=="function"&&t.nextTick(()=>{j(u)}),typeof m=="function"&&t.nextTick(()=>{m(u)})}))},()=>{a.focused.value===!0&&p===F&&(clearTimeout(p),a.innerLoading.value=!1,v.value=!1),i.value===!0&&(i.value=!1)})}function Pt(){return t.h(U.QMenu,{ref:P,class:B.value,style:e.popupContentStyle,modelValue:i.value,fit:e.menuShrink!==!0,cover:e.optionsCover===!0&&$.value!==!0&&e.useInput!==!0,anchor:e.menuAnchor,self:e.menuSelf,offset:e.menuOffset,dark:y.value,noParentEvent:!0,noRefocus:!0,noFocus:!0,noRouteDismiss:e.popupNoRouteDismiss,square:De.value,transitionShow:e.transitionShow,transitionHide:e.transitionHide,transitionDuration:e.transitionDuration,separateClosePopup:!0,...de.value,onScrollPassive:g,onBeforeShow:ct,onBeforeHide:Ht,onShow:Dt},at)}function Ht(o){dt(o),Se()}function Dt(){W()}function $t(o){var c;s.stop(o),(c=I.value)==null||c.focus(),_.value=!0,window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,0)}function jt(o){s.stop(o),t.nextTick(()=>{_.value=!1})}function Nt(){const o=[t.h(ll,{class:`col-auto ${a.fieldClass.value}`,...E.value,for:a.targetUid.value,dark:y.value,square:!0,loading:v.value,itemAligned:!1,filled:!0,stackLabel:S.value.length!==0,...a.splitAttrs.listeners.value,onFocus:$t,onBlur:jt},{...l,rawControl:()=>a.getControl(!0),before:void 0,after:void 0})];return i.value===!0&&o.push(t.h("div",{ref:oe,class:B.value+" scroll",style:e.popupContentStyle,...de.value,onClick:s.prevent,onScrollPassive:g},at())),t.h(ml,{ref:H,modelValue:r.value,position:e.useInput===!0?"top":void 0,transitionShow:D,transitionHide:e.transitionHide,transitionDuration:e.transitionDuration,noRouteDismiss:e.popupNoRouteDismiss,onBeforeShow:ct,onBeforeHide:Kt,onHide:Ut,onShow:Qt},()=>t.h("div",{class:"q-select__dialog"+(y.value===!0?" q-select__dialog--dark q-dark":"")+(_.value===!0?" q-select__dialog--focused":"")},o))}function Kt(o){dt(o),H.value!==null&&H.value.__updateRefocusTarget(a.rootRef.value.querySelector(".q-field__native > [tabindex]:last-child")),a.focused.value=!1}function Ut(o){me(),a.focused.value===!1&&n("blur",o),we()}function Qt(){const o=document.activeElement;(o===null||o.id!==a.targetUid.value)&&I.value!==null&&I.value!==o&&I.value.focus(),W()}function Se(){r.value!==!0&&(b.value=-1,i.value===!0&&(i.value=!1),a.focused.value===!1&&(p!==null&&(clearTimeout(p),p=null),a.innerLoading.value===!0&&(n("filterAbort"),a.innerLoading.value=!1,v.value=!1)))}function ye(o){a.editable.value===!0&&(R===!0?(a.onControlFocusin(o),r.value=!0,t.nextTick(()=>{a.focus()})):a.focus(),e.onFilter!==void 0?be(S.value):($.value!==!0||l["no-option"]!==void 0)&&(i.value=!0))}function me(){r.value=!1,Se()}function we(){e.useInput===!0&&xe(e.multiple!==!0&&e.fillInput===!0&&d.value.length!==0&&G.value(d.value[0])||"",!0,!0)}function Ne(o){let c=-1;if(o===!0){if(d.value.length!==0){const m=ie.value(d.value[0]);c=e.options.findIndex(F=>ce(ie.value(F),m))}K(c)}ge(c)}function Wt(o,c){i.value===!0&&a.innerLoading.value===!1&&(K(-1,!0),t.nextTick(()=>{i.value===!0&&a.innerLoading.value===!1&&(o>c?K():Ne(!0))}))}function st(){r.value===!1&&P.value!==null&&P.value.updatePosition()}function ct(o){o!==void 0&&s.stop(o),n("popupShow",o),a.hasPopupOpen=!0,a.onControlFocusin(o)}function dt(o){o!==void 0&&s.stop(o),n("popupHide",o),a.hasPopupOpen=!1,a.onControlFocusout(o)}function ft(){R=f.platform.is.mobile!==!0&&e.behavior!=="dialog"?!1:e.behavior!=="menu"&&(e.useInput===!0?l["no-option"]!==void 0||e.onFilter!==void 0||$.value===!1:!0),D=f.platform.is.ios===!0&&R===!0&&e.useInput===!0?"fade":e.transitionShow}return t.onBeforeUpdate(ft),t.onUpdated(st),ft(),t.onBeforeUnmount(()=>{w!==null&&clearTimeout(w),q!==null&&clearTimeout(q)}),Object.assign(u,{showPopup:ye,hidePopup:me,removeAtIndex:$e,add:et,toggleOption:ve,getOptionIndex:()=>b.value,setOptionIndex:ge,moveOptionSelection:Re,filter:be,updateMenuPosition:st,updateInputValue:xe,isOptionSelected:je,getEmittingOptionValue:Ge,isOptionDisabled:(...o)=>he.value.apply(null,o)===!0,getOptionValue:(...o)=>ie.value.apply(null,o),getOptionLabel:(...o)=>G.value.apply(null,o)}),Object.assign(a,{innerValue:d,fieldClass:t.computed(()=>`q-select q-field--auto-height q-select--with${e.useInput!==!0?"out":""}-input q-select--with${e.useChips!==!0?"out":""}-chips q-select--${e.multiple===!0?"multiple":"single"}`),inputRef:Y,targetRef:I,hasValue:z,showPopup:ye,floatingLabel:t.computed(()=>e.hideSelected!==!0&&z.value===!0||typeof S.value=="number"||S.value.length!==0||Ze(e.displayValue)),getControlChild:()=>{if(a.editable.value!==!1&&(r.value===!0||$.value!==!0||l["no-option"]!==void 0))return R===!0?Nt():Pt();a.hasPopupOpen===!0&&(a.hasPopupOpen=!1)},controlEvents:{onFocusin(o){a.onControlFocusin(o)},onFocusout(o){a.onControlFocusout(o,()=>{we(),Se()})},onClick(o){var c;if(s.prevent(o),R!==!0&&i.value===!0){Se(),(c=I.value)==null||c.focus();return}ye(o)}},getControl:o=>{const c=Mt(),m=o===!0||r.value!==!0||R!==!0;if(e.useInput===!0)c.push(Lt(o,m));else if(a.editable.value===!0){const M=m===!0?ze.value:void 0;c.push(t.h("input",{ref:m===!0?I:void 0,key:"d_t",class:"q-select__focus-target",id:m===!0?a.targetUid.value:void 0,value:J.value,readonly:!0,"data-autofocus":o===!0||e.autofocus===!0||void 0,...M,onKeydown:ut,onKeyup:lt,onKeypress:nt})),m===!0&&typeof e.autocomplete=="string"&&e.autocomplete.length!==0&&c.push(t.h("input",{class:"q-select__autocomplete-input",autocomplete:e.autocomplete,tabindex:-1,onKeyup:ot}))}if(X.value!==void 0&&e.disable!==!0&&Fe.value.length!==0){const M=Fe.value.map(j=>t.h("option",{value:j,selected:!0}));c.push(t.h("select",{class:"hidden",name:X.value,multiple:e.multiple},M))}const F=e.useInput===!0||m!==!0?void 0:a.splitAttrs.attributes.value;return t.h("div",{class:"q-field__native row items-center",...F,...a.splitAttrs.listeners.value},c)},getInnerAppend:()=>e.loading!==!0&&v.value!==!0&&e.hideDropdownIcon!==!0?[t.h(s.QIcon,{class:"q-select__dropdown-icon"+(i.value===!0?" rotate-180":""),name:qe.value})]:null}),zt(a)}}),_l={class:"app-select__amount"},Bl=t.defineComponent({__name:"AppSelect",props:{modelValue:{},size:{default:s.SIZES.MD},options:{},multiple:{type:Boolean},label:{},placeholder:{},required:{type:Boolean},clearable:{type:Boolean},disabled:{type:Boolean},loading:{type:Boolean},filtering:{type:Boolean},autofocus:{type:Boolean},rules:{},lazyRules:{type:[Boolean,String]},menuClass:{},isMobile:{type:Boolean}},emits:["update:modelValue","popupShow","popupHide"],setup(e,{emit:l}){const n=e,u=l,f=t.ref(!1),i=t.ref(""),r=t.computed({get(){if(n.modelValue){if(n.multiple&&Array.isArray(n.modelValue))return n.options.filter(h=>n.modelValue.includes(h.value));if(!Array.isArray(n.modelValue))return n.options.find(h=>h.value===n.modelValue)}},set(h){if(!h){u("update:modelValue",void 0);return}if(n.multiple&&Array.isArray(h)){const p=h.map(k=>k.value);u("update:modelValue",p)}else Array.isArray(h)||u("update:modelValue",h.value)}}),b=t.computed(()=>{var h;if(Array.isArray(r.value)){if(n.multiple&&r.value.length==0)return n.placeholder}else return((h=r.value)==null?void 0:h.label)||n.placeholder||"";return""}),S=t.computed(()=>!(!n.clearable||!n.modelValue||n.modelValue&&Array.isArray(n.modelValue)&&!n.modelValue.length)),_=t.computed(()=>i.value?n.options.filter(h=>h.label.toLowerCase().includes(i.value.toLowerCase())):n.options),v=t.computed(()=>{if(n.rules)return n.required?[...n.rules,vt]:n.rules;if(n.required)return[vt]}),w=()=>{f.value=!0,u("popupShow")},q=()=>{f.value=!1,u("popupHide")},C=()=>{r.value=void 0},R=(h,p)=>{p(()=>{i.value=h})};return(h,p)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["app-select",[{"app-select_opened":f.value},`app-select_${h.size}`]])},[h.label?(t.openBlock(),t.createElementBlock("label",{key:0,class:t.normalizeClass(["app-select__label",{"app-select__label_bold":h.required}])},t.toDisplayString(h.required?`${h.label} *`:h.label),3)):t.createCommentVNode("",!0),t.createVNode(t.unref(xl),{standout:"","hide-bottom-space":"","hide-dropdown-icon":"","no-error-icon":"",behavior:"menu","popup-no-route-dismiss":"","popup-content-class":`glass-menu app-select-menu app-select-menu_${h.size} ${h.menuClass}`,placeholder:h.filtering&&"Почніть вводити","input-debounce":"50",modelValue:r.value,"onUpdate:modelValue":p[0]||(p[0]=k=>r.value=k),options:_.value,multiple:h.multiple,"use-input":h.filtering&&(Array.isArray(r.value)||!r.value),rules:v.value,"lazy-rules":h.lazyRules,autofocus:h.autofocus,disable:h.disabled,loading:h.loading,onFilter:R,onPopupShow:w,onPopupHide:q},{append:t.withCtx(()=>[S.value?(t.openBlock(),t.createElementBlock("i",{key:0,class:"icon-kl icon-kl-circle-close app-select__clear",onClick:t.withModifiers(C,["stop","prevent"])})):t.createCommentVNode("",!0),p[1]||(p[1]=t.createElementVNode("i",{class:"icon-kl icon-kl-arrow-down app-select__drop-icon"},null,-1))]),selected:t.withCtx(()=>{var k,D;return[Array.isArray(r.value)?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[!h.filtering||r.value.length?(t.openBlock(),t.createElementBlock("span",{key:0,class:t.normalizeClass(["app-select__selected",{"app-select__placeholder":!((k=r.value)!=null&&k.length)&&h.placeholder}])},[(D=r.value)!=null&&D.length?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[p[2]||(p[2]=t.createTextVNode(" Вибрано ",-1)),t.createElementVNode("span",_l,t.toDisplayString(r.value.length),1)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(n.placeholder),1)],64))],2)):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[!h.filtering||r.value?(t.openBlock(),t.createElementBlock("span",{key:0,class:t.normalizeClass(["app-select__selected",{"app-select__placeholder":!r.value&&h.placeholder}])},t.toDisplayString(b.value),3)):t.createCommentVNode("",!0)],64))]}),option:t.withCtx(k=>[t.createVNode(s.PopupItem,t.mergeProps({"no-arrow":"",label:k.opt.label,checked:k.opt.done,active:k.selected,"is-mobile":h.isMobile,checkbox:n.multiple,"model-value":k.selected},k.itemProps,{"onUpdate:modelValue":()=>k.toggleOption(k.opt)}),null,16,["label","checked","active","is-mobile","checkbox","model-value","onUpdate:modelValue"])]),_:1},8,["popup-content-class","placeholder","modelValue","options","multiple","use-input","rules","lazy-rules","autofocus","disable","loading"])],2))}}),Al=s._export_sfc(Bl,[["__scopeId","data-v-500837e5"]]);exports.default=Al;
@@ -1,33 +1,12 @@
1
- import { getCurrentInstance as L, computed as u, h as i, ref as D, watch as M, onMounted as z, defineComponent as _, createBlock as E, openBlock as m, unref as h, normalizeClass as w, withCtx as v, createVNode as j, renderSlot as F, createElementBlock as p, createCommentVNode as S, Fragment as G, createTextVNode as N, toDisplayString as T } from "vue";
2
- import { c as q, a as W, b as x, h as k, S as c, w as $, x as U, Q as X, y, v as Y, C as Z, _ as J } from "./index-BV2qSN9C.js";
3
- import { d as K, u as ee, Q as ne } from "./QMenu-CrcmhT0u.js";
4
- const oe = ["ul", "ol"], te = q({
5
- name: "QList",
6
- props: {
7
- ...W,
8
- bordered: Boolean,
9
- dense: Boolean,
10
- separator: Boolean,
11
- padding: Boolean,
12
- tag: {
13
- type: String,
14
- default: "div"
15
- }
16
- },
17
- setup(e, { slots: l }) {
18
- const t = L(), s = x(e, t.proxy.$q), a = u(
19
- () => oe.includes(e.tag) ? null : "list"
20
- ), d = u(
21
- () => "q-list" + (e.bordered === !0 ? " q-list--bordered" : "") + (e.dense === !0 ? " q-list--dense" : "") + (e.separator === !0 ? " q-list--separator" : "") + (s.value === !0 ? " q-list--dark" : "") + (e.padding === !0 ? " q-list--padding" : "")
22
- );
23
- return () => i(e.tag, { class: d.value, role: a.value }, k(l.default));
24
- }
25
- }), ae = {
1
+ import { computed as u, h as i, getCurrentInstance as P, ref as y, watch as k, onMounted as z, defineComponent as _, createBlock as j, openBlock as m, unref as h, normalizeClass as g, withCtx as q, renderSlot as E, createElementBlock as v, createCommentVNode as p, Fragment as F, createTextVNode as G, toDisplayString as N } from "vue";
2
+ import { S as c, c as M, h as A, y as L, z as T, Q as W, B as S, w as U, C as X, _ as Y } from "./index-B8rGKrFf.js";
3
+ import { d as Z, u as x, Q as J } from "./QMenu-CqwHVhVH.js";
4
+ const K = {
26
5
  [c.SM]: "3px 9px",
27
6
  [c.MD]: "5px 12px",
28
7
  [c.LG]: "6px 15px",
29
8
  [c.XL]: "9px 20px"
30
- }, le = q({
9
+ }, ee = M({
31
10
  name: "QBtnGroup",
32
11
  props: {
33
12
  unelevated: Boolean,
@@ -42,23 +21,23 @@ const oe = ["ul", "ol"], te = q({
42
21
  },
43
22
  setup(e, { slots: l }) {
44
23
  const t = u(() => {
45
- const s = ["unelevated", "outline", "flat", "rounded", "square", "push", "stretch", "glossy"].filter((a) => e[a] === !0).map((a) => `q-btn-group--${a}`).join(" ");
46
- return `q-btn-group row no-wrap${s.length !== 0 ? " " + s : ""}` + (e.spread === !0 ? " q-btn-group--spread" : " inline");
24
+ const r = ["unelevated", "outline", "flat", "rounded", "square", "push", "stretch", "glossy"].filter((a) => e[a] === !0).map((a) => `q-btn-group--${a}`).join(" ");
25
+ return `q-btn-group row no-wrap${r.length !== 0 ? " " + r : ""}` + (e.spread === !0 ? " q-btn-group--spread" : " inline");
47
26
  });
48
- return () => i("div", { class: t.value }, k(l.default));
27
+ return () => i("div", { class: t.value }, A(l.default));
49
28
  }
50
- }), se = Object.keys($);
51
- function re(e) {
52
- return se.reduce((l, t) => {
53
- const s = e[t];
54
- return s !== void 0 && (l[t] = s), l;
29
+ }), ne = Object.keys(L);
30
+ function oe(e) {
31
+ return ne.reduce((l, t) => {
32
+ const r = e[t];
33
+ return r !== void 0 && (l[t] = r), l;
55
34
  }, {});
56
35
  }
57
- const de = q({
36
+ const te = M({
58
37
  name: "QBtnDropdown",
59
38
  props: {
60
- ...$,
61
- ...K,
39
+ ...L,
40
+ ...Z,
62
41
  modelValue: Boolean,
63
42
  split: Boolean,
64
43
  dropdownIcon: String,
@@ -87,66 +66,66 @@ const de = q({
87
66
  },
88
67
  emits: ["update:modelValue", "click", "beforeShow", "show", "beforeHide", "hide"],
89
68
  setup(e, { slots: l, emit: t }) {
90
- const { proxy: s } = L(), a = D(e.modelValue), d = D(null), f = ee(), b = u(() => {
69
+ const { proxy: r } = P(), a = y(e.modelValue), d = y(null), f = x(), b = u(() => {
91
70
  const n = {
92
71
  "aria-expanded": a.value === !0 ? "true" : "false",
93
72
  "aria-haspopup": "true",
94
73
  "aria-controls": f.value,
95
- "aria-label": e.toggleAriaLabel || s.$q.lang.label[a.value === !0 ? "collapse" : "expand"](e.label)
74
+ "aria-label": e.toggleAriaLabel || r.$q.lang.label[a.value === !0 ? "collapse" : "expand"](e.label)
96
75
  };
97
76
  return (e.disable === !0 || e.split === !1 && e.disableMainBtn === !0 || e.disableDropdown === !0) && (n["aria-disabled"] = "true"), n;
98
77
  }), o = u(
99
78
  () => "q-btn-dropdown__arrow" + (a.value === !0 && e.noIconAnimation === !1 ? " rotate-180" : "") + (e.split === !1 ? " q-btn-dropdown__arrow-container" : "")
100
- ), B = u(() => U(e)), C = u(() => re(e));
101
- M(() => e.modelValue, (n) => {
102
- var r;
103
- (r = d.value) == null || r[n ? "show" : "hide"]();
104
- }), M(() => e.split, g);
79
+ ), w = u(() => T(e)), D = u(() => oe(e));
80
+ k(() => e.modelValue, (n) => {
81
+ var s;
82
+ (s = d.value) == null || s[n ? "show" : "hide"]();
83
+ }), k(() => e.split, B);
105
84
  function I(n) {
106
85
  a.value = !0, t("beforeShow", n);
107
86
  }
108
- function Q(n) {
87
+ function R(n) {
109
88
  t("show", n), t("update:modelValue", !0);
110
89
  }
111
- function R(n) {
90
+ function H(n) {
112
91
  a.value = !1, t("beforeHide", n);
113
92
  }
114
- function H(n) {
93
+ function O(n) {
115
94
  t("hide", n), t("update:modelValue", !1);
116
95
  }
117
- function O(n) {
96
+ function $(n) {
118
97
  t("click", n);
119
98
  }
120
- function V(n) {
121
- Y(n), g(), t("click", n);
99
+ function Q(n) {
100
+ U(n), B(), t("click", n);
122
101
  }
123
- function P(n) {
124
- var r;
125
- (r = d.value) == null || r.toggle(n);
102
+ function V(n) {
103
+ var s;
104
+ (s = d.value) == null || s.toggle(n);
126
105
  }
127
- function A(n) {
128
- var r;
129
- (r = d.value) == null || r.show(n);
106
+ function C(n) {
107
+ var s;
108
+ (s = d.value) == null || s.show(n);
130
109
  }
131
- function g(n) {
132
- var r;
133
- (r = d.value) == null || r.hide(n);
110
+ function B(n) {
111
+ var s;
112
+ (s = d.value) == null || s.hide(n);
134
113
  }
135
- return Object.assign(s, {
136
- show: A,
137
- hide: g,
138
- toggle: P
114
+ return Object.assign(r, {
115
+ show: C,
116
+ hide: B,
117
+ toggle: V
139
118
  }), z(() => {
140
- e.modelValue === !0 && A();
119
+ e.modelValue === !0 && C();
141
120
  }), () => {
142
121
  const n = [
143
- i(X, {
122
+ i(W, {
144
123
  class: o.value,
145
- name: e.dropdownIcon || s.$q.iconSet.arrow.dropdown
124
+ name: e.dropdownIcon || r.$q.iconSet.arrow.dropdown
146
125
  })
147
126
  ];
148
127
  return e.disableDropdown !== !0 && n.push(
149
- i(ne, {
128
+ i(J, {
150
129
  ref: d,
151
130
  id: f.value,
152
131
  class: e.contentClass,
@@ -167,44 +146,44 @@ const de = q({
167
146
  transitionHide: e.transitionHide,
168
147
  transitionDuration: e.transitionDuration,
169
148
  onBeforeShow: I,
170
- onShow: Q,
171
- onBeforeHide: R,
172
- onHide: H
149
+ onShow: R,
150
+ onBeforeHide: H,
151
+ onHide: O
173
152
  }, l.default)
174
- ), e.split === !1 ? i(y, {
153
+ ), e.split === !1 ? i(S, {
175
154
  class: "q-btn-dropdown q-btn-dropdown--simple",
176
- ...C.value,
155
+ ...D.value,
177
156
  ...b.value,
178
157
  disable: e.disable === !0 || e.disableMainBtn === !0,
179
158
  noWrap: !0,
180
159
  round: !1,
181
- onClick: O
160
+ onClick: $
182
161
  }, {
183
- default: () => k(l.label, []).concat(n),
162
+ default: () => A(l.label, []).concat(n),
184
163
  loading: l.loading
185
- }) : i(le, {
164
+ }) : i(ee, {
186
165
  class: "q-btn-dropdown q-btn-dropdown--split no-wrap q-btn-item",
187
166
  rounded: e.rounded,
188
167
  square: e.square,
189
- ...B.value,
168
+ ...w.value,
190
169
  glossy: e.glossy,
191
170
  stretch: e.stretch
192
171
  }, () => [
193
- i(y, {
172
+ i(S, {
194
173
  class: "q-btn-dropdown--current",
195
- ...C.value,
174
+ ...D.value,
196
175
  disable: e.disable === !0 || e.disableMainBtn === !0,
197
176
  noWrap: !0,
198
177
  round: !1,
199
- onClick: V
178
+ onClick: Q
200
179
  }, {
201
180
  default: l.label,
202
181
  loading: l.loading
203
182
  }),
204
- i(y, {
183
+ i(S, {
205
184
  class: "q-btn-dropdown__arrow-container q-anchor--skip",
206
185
  ...b.value,
207
- ...B.value,
186
+ ...w.value,
208
187
  disable: e.disable === !0 || e.disableDropdown === !0,
209
188
  rounded: e.rounded,
210
189
  color: e.color,
@@ -217,14 +196,14 @@ const de = q({
217
196
  ]);
218
197
  };
219
198
  }
220
- }), ie = /* @__PURE__ */ _({
199
+ }), ae = /* @__PURE__ */ _({
221
200
  __name: "DropdownButton",
222
201
  props: {
223
202
  size: { default: c.MD },
224
203
  transparent: { type: Boolean },
225
204
  flat: { type: Boolean },
226
205
  rounded: { type: Boolean },
227
- color: { default: Z.PRIMARY },
206
+ color: { default: X.PRIMARY },
228
207
  iconLeft: {},
229
208
  iconMiddle: {},
230
209
  hideDropIcon: { type: Boolean },
@@ -232,14 +211,14 @@ const de = q({
232
211
  loading: { type: Boolean },
233
212
  ariaLabel: {},
234
213
  label: {},
235
- menuClass: {},
236
214
  menuOffset: {},
237
215
  menuAnchor: {},
238
- menuSelf: {}
216
+ menuSelf: {},
217
+ menuClass: {}
239
218
  },
240
219
  emits: ["menuShown", "menuHidden"],
241
220
  setup(e, { emit: l }) {
242
- const t = e, s = l, a = D(!1), d = u(() => [
221
+ const t = e, r = l, a = y(!1), d = u(() => [
243
222
  "dropdown-btn",
244
223
  {
245
224
  "dropdown-btn_default": !t.transparent && !t.flat,
@@ -252,40 +231,41 @@ const de = q({
252
231
  `dropdown-btn_${t.size}`,
253
232
  `dropdown-btn_${t.color}`
254
233
  ]), f = () => {
255
- a.value = !0, s("menuShown");
234
+ a.value = !0, r("menuShown");
256
235
  }, b = () => {
257
- a.value = !1, s("menuHidden");
236
+ a.value = !1, r("menuHidden");
258
237
  };
259
- return (o, B) => (m(), E(h(de), {
238
+ return (o, w) => (m(), j(h(te), {
260
239
  "no-caps": "",
261
240
  unelevated: "",
262
- class: w(d.value),
263
- padding: h(ae)[o.size || h(c).MD],
241
+ class: g(d.value),
242
+ padding: h(K)[o.size || h(c).MD],
264
243
  loading: o.loading,
265
244
  disable: o.disabled || void 0,
266
245
  "aria-label": o.ariaLabel,
267
246
  "menu-offset": o.menuOffset,
268
247
  "menu-anchor": o.menuAnchor,
269
248
  "menu-self": o.menuSelf,
249
+ "content-class": ["glass-menu dropdown-menu", o.menuClass],
270
250
  onBeforeShow: f,
271
251
  onBeforeHide: b
272
252
  }, {
273
- label: v(() => [
274
- o.iconLeft || o.iconMiddle ? (m(), p("i", {
253
+ label: q(() => [
254
+ o.iconLeft || o.iconMiddle ? (m(), v("i", {
275
255
  key: 0,
276
- class: w([
256
+ class: g([
277
257
  "icon-kl",
278
258
  o.iconLeft ? "icon-kl_left" : "icon-kl_middle",
279
259
  `icon-kl-${o.iconLeft || o.iconMiddle}`,
280
260
  o.transparent || o.flat ? `text-${o.color}` : "text-secondary"
281
261
  ])
282
- }, null, 2)) : S("", !0),
283
- o.label ? (m(), p(G, { key: 1 }, [
284
- N(T(o.label), 1)
285
- ], 64)) : S("", !0),
286
- o.hideDropIcon ? S("", !0) : (m(), p("i", {
262
+ }, null, 2)) : p("", !0),
263
+ o.label ? (m(), v(F, { key: 1 }, [
264
+ G(N(o.label), 1)
265
+ ], 64)) : p("", !0),
266
+ o.hideDropIcon ? p("", !0) : (m(), v("i", {
287
267
  key: 2,
288
- class: w([
268
+ class: g([
289
269
  "icon-kl",
290
270
  "icon-kl-arrow-down",
291
271
  { "icon-kl-arrow-down_rotated": a.value },
@@ -293,20 +273,13 @@ const de = q({
293
273
  ])
294
274
  }, null, 2))
295
275
  ]),
296
- default: v(() => [
297
- j(te, {
298
- class: w(["dropdown-btn-menu", `dropdown-btn-menu_${o.size} ${o.menuClass ? o.menuClass : ""}`])
299
- }, {
300
- default: v(() => [
301
- F(o.$slots, "default", {}, void 0, !0)
302
- ]),
303
- _: 3
304
- }, 8, ["class"])
276
+ default: q(() => [
277
+ E(o.$slots, "default", {}, void 0, !0)
305
278
  ]),
306
279
  _: 3
307
- }, 8, ["class", "padding", "loading", "disable", "aria-label", "menu-offset", "menu-anchor", "menu-self"]));
280
+ }, 8, ["class", "padding", "loading", "disable", "aria-label", "menu-offset", "menu-anchor", "menu-self", "content-class"]));
308
281
  }
309
- }), be = /* @__PURE__ */ J(ie, [["__scopeId", "data-v-4019f157"]]);
282
+ }), de = /* @__PURE__ */ Y(ae, [["__scopeId", "data-v-f70155d0"]]);
310
283
  export {
311
- be as default
284
+ de as default
312
285
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue"),l=require("./index-A0f7F3DW.cjs"),w=require("./QMenu-BeQ-7x7q.cjs"),D={[l.SIZES.SM]:"3px 9px",[l.SIZES.MD]:"5px 12px",[l.SIZES.LG]:"6px 15px",[l.SIZES.XL]:"9px 20px"},q=l.createComponent({name:"QBtnGroup",props:{unelevated:Boolean,outline:Boolean,flat:Boolean,rounded:Boolean,square:Boolean,push:Boolean,stretch:Boolean,glossy:Boolean,spread:Boolean},setup(e,{slots:d}){const a=n.computed(()=>{const u=["unelevated","outline","flat","rounded","square","push","stretch","glossy"].filter(r=>e[r]===!0).map(r=>`q-btn-group--${r}`).join(" ");return`q-btn-group row no-wrap${u.length!==0?" "+u:""}`+(e.spread===!0?" q-btn-group--spread":" inline")});return()=>n.h("div",{class:a.value},l.hSlot(d.default))}}),M=Object.keys(l.nonRoundBtnProps);function I(e){return M.reduce((d,a)=>{const u=e[a];return u!==void 0&&(d[a]=u),d},{})}const A=l.createComponent({name:"QBtnDropdown",props:{...l.nonRoundBtnProps,...w.useTransitionProps,modelValue:Boolean,split:Boolean,dropdownIcon:String,contentClass:[Array,String,Object],contentStyle:[Array,String,Object],cover:Boolean,persistent:Boolean,noEscDismiss:Boolean,noRouteDismiss:Boolean,autoClose:Boolean,noRefocus:Boolean,noFocus:Boolean,menuAnchor:{type:String,default:"bottom end"},menuSelf:{type:String,default:"top end"},menuOffset:Array,disableMainBtn:Boolean,disableDropdown:Boolean,noIconAnimation:Boolean,toggleAriaLabel:String},emits:["update:modelValue","click","beforeShow","show","beforeHide","hide"],setup(e,{slots:d,emit:a}){const{proxy:u}=n.getCurrentInstance(),r=n.ref(e.modelValue),s=n.ref(null),c=w.useId(),f=n.computed(()=>{const o={"aria-expanded":r.value===!0?"true":"false","aria-haspopup":"true","aria-controls":c.value,"aria-label":e.toggleAriaLabel||u.$q.lang.label[r.value===!0?"collapse":"expand"](e.label)};return(e.disable===!0||e.split===!1&&e.disableMainBtn===!0||e.disableDropdown===!0)&&(o["aria-disabled"]="true"),o}),t=n.computed(()=>"q-btn-dropdown__arrow"+(r.value===!0&&e.noIconAnimation===!1?" rotate-180":"")+(e.split===!1?" q-btn-dropdown__arrow-container":"")),m=n.computed(()=>l.getBtnDesignAttr(e)),B=n.computed(()=>I(e));n.watch(()=>e.modelValue,o=>{var i;(i=s.value)==null||i[o?"show":"hide"]()}),n.watch(()=>e.split,b);function g(o){r.value=!0,a("beforeShow",o)}function S(o){a("show",o),a("update:modelValue",!0)}function p(o){r.value=!1,a("beforeHide",o)}function v(o){a("hide",o),a("update:modelValue",!1)}function C(o){a("click",o)}function y(o){l.stop(o),b(),a("click",o)}function k(o){var i;(i=s.value)==null||i.toggle(o)}function h(o){var i;(i=s.value)==null||i.show(o)}function b(o){var i;(i=s.value)==null||i.hide(o)}return Object.assign(u,{show:h,hide:b,toggle:k}),n.onMounted(()=>{e.modelValue===!0&&h()}),()=>{const o=[n.h(l.QIcon,{class:t.value,name:e.dropdownIcon||u.$q.iconSet.arrow.dropdown})];return e.disableDropdown!==!0&&o.push(n.h(w.QMenu,{ref:s,id:c.value,class:e.contentClass,style:e.contentStyle,cover:e.cover,fit:!0,persistent:e.persistent,noEscDismiss:e.noEscDismiss,noRouteDismiss:e.noRouteDismiss,autoClose:e.autoClose,noFocus:e.noFocus,noRefocus:e.noRefocus,anchor:e.menuAnchor,self:e.menuSelf,offset:e.menuOffset,separateClosePopup:!0,transitionShow:e.transitionShow,transitionHide:e.transitionHide,transitionDuration:e.transitionDuration,onBeforeShow:g,onShow:S,onBeforeHide:p,onHide:v},d.default)),e.split===!1?n.h(l.QBtn,{class:"q-btn-dropdown q-btn-dropdown--simple",...B.value,...f.value,disable:e.disable===!0||e.disableMainBtn===!0,noWrap:!0,round:!1,onClick:C},{default:()=>l.hSlot(d.label,[]).concat(o),loading:d.loading}):n.h(q,{class:"q-btn-dropdown q-btn-dropdown--split no-wrap q-btn-item",rounded:e.rounded,square:e.square,...m.value,glossy:e.glossy,stretch:e.stretch},()=>[n.h(l.QBtn,{class:"q-btn-dropdown--current",...B.value,disable:e.disable===!0||e.disableMainBtn===!0,noWrap:!0,round:!1,onClick:y},{default:d.label,loading:d.loading}),n.h(l.QBtn,{class:"q-btn-dropdown__arrow-container q-anchor--skip",...f.value,...m.value,disable:e.disable===!0||e.disableDropdown===!0,rounded:e.rounded,color:e.color,textColor:e.textColor,dense:e.dense,size:e.size,padding:e.padding,ripple:e.ripple},()=>o)])}}}),L=n.defineComponent({__name:"DropdownButton",props:{size:{default:l.SIZES.MD},transparent:{type:Boolean},flat:{type:Boolean},rounded:{type:Boolean},color:{default:l.COLORS.PRIMARY},iconLeft:{},iconMiddle:{},hideDropIcon:{type:Boolean},disabled:{type:Boolean},loading:{type:Boolean},ariaLabel:{},label:{},menuOffset:{},menuAnchor:{},menuSelf:{},menuClass:{}},emits:["menuShown","menuHidden"],setup(e,{emit:d}){const a=e,u=d,r=n.ref(!1),s=n.computed(()=>["dropdown-btn",{"dropdown-btn_default":!a.transparent&&!a.flat,"dropdown-btn_trans":a.transparent,"dropdown-btn_flat":a.flat,"dropdown-btn_rounded":a.rounded,"dropdown-btn_icon-left":a.iconLeft,"dropdown-btn_icon-middle":a.iconMiddle},`dropdown-btn_${a.size}`,`dropdown-btn_${a.color}`]),c=()=>{r.value=!0,u("menuShown")},f=()=>{r.value=!1,u("menuHidden")};return(t,m)=>(n.openBlock(),n.createBlock(n.unref(A),{"no-caps":"",unelevated:"",class:n.normalizeClass(s.value),padding:n.unref(D)[t.size||n.unref(l.SIZES).MD],loading:t.loading,disable:t.disabled||void 0,"aria-label":t.ariaLabel,"menu-offset":t.menuOffset,"menu-anchor":t.menuAnchor,"menu-self":t.menuSelf,"content-class":["glass-menu dropdown-menu",t.menuClass],onBeforeShow:c,onBeforeHide:f},{label:n.withCtx(()=>[t.iconLeft||t.iconMiddle?(n.openBlock(),n.createElementBlock("i",{key:0,class:n.normalizeClass(["icon-kl",t.iconLeft?"icon-kl_left":"icon-kl_middle",`icon-kl-${t.iconLeft||t.iconMiddle}`,t.transparent||t.flat?`text-${t.color}`:"text-secondary"])},null,2)):n.createCommentVNode("",!0),t.label?(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[n.createTextVNode(n.toDisplayString(t.label),1)],64)):n.createCommentVNode("",!0),t.hideDropIcon?n.createCommentVNode("",!0):(n.openBlock(),n.createElementBlock("i",{key:2,class:n.normalizeClass(["icon-kl","icon-kl-arrow-down",{"icon-kl-arrow-down_rotated":r.value},t.transparent?`text-${t.color}`:"text-secondary"])},null,2))]),default:n.withCtx(()=>[n.renderSlot(t.$slots,"default",{},void 0,!0)]),_:3},8,["class","padding","loading","disable","aria-label","menu-offset","menu-anchor","menu-self","content-class"]))}}),E=l._export_sfc(L,[["__scopeId","data-v-f70155d0"]]);exports.default=E;
@@ -0,0 +1 @@
1
+ "use strict";const r=require("vue"),L=require("./focusout-DzWGke-4.cjs"),g=require("./index-A0f7F3DW.cjs");let N,D=0;const b=new Array(256);for(let e=0;e<256;e++)b[e]=(e+256).toString(16).substring(1);const Ae=(()=>{const e=typeof crypto<"u"?crypto:typeof window<"u"?window.crypto||window.msCrypto:void 0;if(e!==void 0){if(e.randomBytes!==void 0)return e.randomBytes;if(e.getRandomValues!==void 0)return t=>{const o=new Uint8Array(t);return e.getRandomValues(o),o}}return t=>{const o=[];for(let n=t;n>0;n--)o.push(Math.floor(Math.random()*256));return o}})(),ne=4096;function _(){(N===void 0||D+16>ne)&&(D=0,N=Ae(ne));const e=Array.prototype.slice.call(N,D,D+=16);return e[6]=e[6]&15|64,e[8]=e[8]&63|128,b[e[0]]+b[e[1]]+b[e[2]]+b[e[3]]+"-"+b[e[4]]+b[e[5]]+"-"+b[e[6]]+b[e[7]]+"-"+b[e[8]]+b[e[9]]+"-"+b[e[10]]+b[e[11]]+b[e[12]]+b[e[13]]+b[e[14]]+b[e[15]]}function De(e){return e??null}function le(e,t){return e??(t===!0?`f_${_()}`:null)}function Re({getValue:e,required:t=!0}={}){if(L.isRuntimeSsrPreHydration.value===!0){const o=e!==void 0?r.ref(De(e())):r.ref(null);return t===!0&&o.value===null&&r.onMounted(()=>{o.value=`f_${_()}`}),e!==void 0&&r.watch(e,n=>{o.value=le(n,t)}),o}return e!==void 0?r.computed(()=>le(e(),t)):r.ref(`f_${_()}`)}let k=[],A=[];function me(e){A=A.filter(t=>t!==e)}function Ie(e){me(e),A.push(e)}function ie(e){me(e),A.length===0&&k.length!==0&&(k[k.length-1](),k=[])}function he(e){A.length===0?e():k.push(e)}function ze(e){k=k.filter(t=>t!==e)}function Oe(){if(window.getSelection!==void 0){const e=window.getSelection();e.empty!==void 0?e.empty():e.removeAllRanges!==void 0&&(e.removeAllRanges(),L.Platform.is.mobile!==!0&&e.addRange(document.createRange()))}else document.selection!==void 0&&document.selection.empty()}const Ve={target:{type:[Boolean,String,Element],default:!0},noParentEvent:Boolean},Ke={...Ve,contextMenu:Boolean};function Ue({showing:e,avoidEmit:t,configureAnchorEl:o}){const{props:n,proxy:l,emit:m}=r.getCurrentInstance(),i=r.ref(null);let a=null;function h(u){return i.value===null?!1:u===void 0||u.touches===void 0||u.touches.length<=1}const d={};o===void 0&&(Object.assign(d,{hide(u){l.hide(u)},toggle(u){l.toggle(u),u.qAnchorHandled=!0},toggleKey(u){g.isKeyCode(u,13)===!0&&d.toggle(u)},contextClick(u){l.hide(u),g.prevent(u),r.nextTick(()=>{l.show(u),u.qAnchorHandled=!0})},prevent:g.prevent,mobileTouch(u){if(d.mobileCleanup(u),h(u)!==!0)return;l.hide(u),i.value.classList.add("non-selectable");const f=u.target;g.addEvt(d,"anchor",[[f,"touchmove","mobileCleanup","passive"],[f,"touchend","mobileCleanup","passive"],[f,"touchcancel","mobileCleanup","passive"],[i.value,"contextmenu","prevent","notPassive"]]),a=setTimeout(()=>{a=null,l.show(u),u.qAnchorHandled=!0},300)},mobileCleanup(u){i.value.classList.remove("non-selectable"),a!==null&&(clearTimeout(a),a=null),e.value===!0&&u!==void 0&&Oe()}}),o=function(u=n.contextMenu){if(n.noParentEvent===!0||i.value===null)return;let f;u===!0?l.$q.platform.is.mobile===!0?f=[[i.value,"touchstart","mobileTouch","passive"]]:f=[[i.value,"mousedown","hide","passive"],[i.value,"contextmenu","contextClick","notPassive"]]:f=[[i.value,"click","toggle","passive"],[i.value,"keyup","toggleKey","passive"]],g.addEvt(d,"anchor",f)});function c(){g.cleanEvt(d,"anchor")}function y(u){for(i.value=u;i.value.classList.contains("q-anchor--skip");)i.value=i.value.parentNode;o()}function w(){if(n.target===!1||n.target===""||l.$el.parentNode===null)i.value=null;else if(n.target===!0)y(l.$el.parentNode);else{let u=n.target;if(typeof n.target=="string")try{u=document.querySelector(n.target)}catch{u=void 0}u!=null?(i.value=u.$el||u,o()):(i.value=null,console.error(`Anchor: target "${n.target}" not found`))}}return r.watch(()=>n.contextMenu,u=>{i.value!==null&&(c(),o(u))}),r.watch(()=>n.target,()=>{i.value!==null&&c(),w()}),r.watch(()=>n.noParentEvent,u=>{i.value!==null&&(u===!0?c():o())}),r.onMounted(()=>{w(),t!==!0&&n.modelValue===!0&&i.value===null&&m("update:modelValue",!1)}),r.onBeforeUnmount(()=>{a!==null&&clearTimeout(a),c()}),{anchorEl:i,canShow:h,anchorEvents:d}}function Ne(e,t){const o=r.ref(null);let n;function l(a,h){const d=`${h!==void 0?"add":"remove"}EventListener`,c=h!==void 0?h:n;a!==window&&a[d]("scroll",c,g.listenOpts.passive),window[d]("scroll",c,g.listenOpts.passive),n=h}function m(){o.value!==null&&(l(o.value),o.value=null)}const i=r.watch(()=>e.noParentEvent,()=>{o.value!==null&&(m(),t())});return r.onBeforeUnmount(i),{localScrollTarget:o,unconfigureScrollTarget:m,changeScrollEvent:l}}const ve={modelValue:{type:Boolean,default:null},"onUpdate:modelValue":[Function,Array]},ge=["beforeShow","show","beforeHide","hide"];function pe({showing:e,canShow:t,hideOnRouteChange:o,handleShow:n,handleHide:l,processOnMount:m}){const i=r.getCurrentInstance(),{props:a,emit:h,proxy:d}=i;let c;function y(v){e.value===!0?f(v):w(v)}function w(v){if(a.disable===!0||(v==null?void 0:v.qAnchorHandled)===!0||t!==void 0&&t(v)!==!0)return;const p=a["onUpdate:modelValue"]!==void 0;p===!0&&(h("update:modelValue",!0),c=v,r.nextTick(()=>{c===v&&(c=void 0)})),(a.modelValue===null||p===!1)&&u(v)}function u(v){e.value!==!0&&(e.value=!0,h("beforeShow",v),n!==void 0?n(v):h("show",v))}function f(v){if(a.disable===!0)return;const p=a["onUpdate:modelValue"]!==void 0;p===!0&&(h("update:modelValue",!1),c=v,r.nextTick(()=>{c===v&&(c=void 0)})),(a.modelValue===null||p===!1)&&H(v)}function H(v){e.value!==!1&&(e.value=!1,h("beforeHide",v),l!==void 0?l(v):h("hide",v))}function C(v){a.disable===!0&&v===!0?a["onUpdate:modelValue"]!==void 0&&h("update:modelValue",!1):v===!0!==e.value&&(v===!0?u:H)(c)}r.watch(()=>a.modelValue,C),o!==void 0&&g.vmHasRouter(i)===!0&&r.watch(()=>d.$route.fullPath,()=>{o.value===!0&&e.value===!0&&f()}),r.onMounted(()=>{C(a.modelValue)});const M={show:w,hide:f,toggle:y};return Object.assign(d,M),M}const re={};let Qe=1,_e=document.body;function je(e,t){const o=document.createElement("div");if(o.id=t!==void 0?`q-portal--${t}--${Qe++}`:e,re.globalNodes!==void 0){const n=re.globalNodes.class;n!==void 0&&(o.className=n)}return _e.appendChild(o),o}function Ge(e){e.remove()}const Xe=g.createComponent({name:"QPortal",setup(e,{slots:t}){return()=>t.default()}});function Ye(e){for(e=e.parent;e!=null;){if(e.type.name==="QGlobalDialog")return!0;if(e.type.name==="QDialog"||e.type.name==="QMenu")return!1;e=e.parent}return!1}function ye(e,t,o,n){const l=r.ref(!1),m=r.ref(!1);let i=null;const a={},h=n==="dialog"&&Ye(e);function d(y){if(y===!0){ie(a),m.value=!0;return}m.value=!1,l.value===!1&&(h===!1&&i===null&&(i=je(!1,n)),l.value=!0,g.portalProxyList.push(e.proxy),Ie(a))}function c(y){if(m.value=!1,y!==!0)return;ie(a),l.value=!1;const w=g.portalProxyList.indexOf(e.proxy);w!==-1&&g.portalProxyList.splice(w,1),i!==null&&(Ge(i),i=null)}return r.onUnmounted(()=>{c(!0)}),e.proxy.__qPortal=!0,L.injectProp(e.proxy,"contentEl",()=>t.value),{showPortal:d,hidePortal:c,portalIsActive:l,portalIsAccessible:m,renderPortal:()=>h===!0?o():l.value===!0?[r.h(r.Teleport,{to:i},r.h(Xe,o))]:void 0}}const we={transitionShow:{type:String,default:"fade"},transitionHide:{type:String,default:"fade"},transitionDuration:{type:[String,Number],default:300}};function xe(e,t=()=>{},o=()=>{}){return{transitionProps:r.computed(()=>{const n=`q-transition--${e.transitionShow||t()}`,l=`q-transition--${e.transitionHide||o()}`;return{appear:!0,enterFromClass:`${n}-enter-from`,enterActiveClass:`${n}-enter-active`,enterToClass:`${n}-enter-to`,leaveFromClass:`${l}-leave-from`,leaveActiveClass:`${l}-leave-active`,leaveToClass:`${l}-leave-to`}}),transitionStyle:r.computed(()=>`--q-transition-duration: ${e.transitionDuration}ms`)}}function be(){let e;const t=r.getCurrentInstance();function o(){e=void 0}return r.onDeactivated(o),r.onBeforeUnmount(o),{removeTick:o,registerTick(n){e=n,r.nextTick(()=>{e===n&&(g.vmIsDestroyed(t)===!1&&e(),e=void 0)})}}}function Ee(){let e=null;const t=r.getCurrentInstance();function o(){e!==null&&(clearTimeout(e),e=null)}return r.onDeactivated(o),r.onBeforeUnmount(o),{removeTimeout:o,registerTimeout(n,l){o(),g.vmIsDestroyed(t)===!1&&(e=setTimeout(()=>{e=null,n()},l))}}}const Ze=[Element,String],Je=[null,document,document.body,document.scrollingElement,document.documentElement];function et(e,t){let o=g.getElement(t);if(o===void 0){if(e==null)return window;o=e.closest(".scroll,.scroll-y,.overflow-auto")}return Je.includes(o)?window:o}function tt(e){return e===window?window.pageYOffset||window.scrollY||document.body.scrollTop||0:e.scrollTop}function ot(e){return e===window?window.pageXOffset||window.scrollX||document.body.scrollLeft||0:e.scrollLeft}let R;function nt(){if(R!==void 0)return R;const e=document.createElement("p"),t=document.createElement("div");g.css(e,{width:"100%",height:"200px"}),g.css(t,{position:"absolute",top:"0px",left:"0px",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"}),t.appendChild(e),document.body.appendChild(t);const o=e.offsetWidth;t.style.overflow="scroll";let n=e.offsetWidth;return o===n&&(n=t.clientWidth),t.remove(),R=o-n,R}function lt(e,t=!0){return!e||e.nodeType!==Node.ELEMENT_NODE?!1:t?e.scrollHeight>e.clientHeight&&(e.classList.contains("scroll")||e.classList.contains("overflow-auto")||["auto","scroll"].includes(window.getComputedStyle(e)["overflow-y"])):e.scrollWidth>e.clientWidth&&(e.classList.contains("scroll")||e.classList.contains("overflow-auto")||["auto","scroll"].includes(window.getComputedStyle(e)["overflow-x"]))}const W=[];let F;function it(e){F=e.keyCode===27}function rt(){F===!0&&(F=!1)}function ut(e){F===!0&&(F=!1,g.isKeyCode(e,27)===!0&&W[W.length-1](e))}function Te(e){window[e]("keydown",it),window[e]("blur",rt),window[e]("keyup",ut),F=!1}function Ce(e){L.client.is.desktop===!0&&(W.push(e),W.length===1&&Te("addEventListener"))}function j(e){const t=W.indexOf(e);t!==-1&&(W.splice(t,1),W.length===0&&Te("removeEventListener"))}const{notPassiveCapture:I}=g.listenOpts,q=[];function z(e){const t=e.target;if(t===void 0||t.nodeType===8||t.classList.contains("no-pointer-events")===!0)return;let o=g.portalProxyList.length-1;for(;o>=0;){const n=g.portalProxyList[o].$;if(n.type.name==="QTooltip"){o--;continue}if(n.type.name!=="QDialog")break;if(n.props.seamless!==!0)return;o--}for(let n=q.length-1;n>=0;n--){const l=q[n];if((l.anchorEl.value===null||l.anchorEl.value.contains(t)===!1)&&(t===document.body||l.innerRef.value!==null&&l.innerRef.value.contains(t)===!1))e.qClickOutside=!0,l.onClickOutside(e);else return}}function at(e){q.push(e),q.length===1&&(document.addEventListener("mousedown",z,I),document.addEventListener("touchstart",z,I))}function ue(e){const t=q.findIndex(o=>o===e);t!==-1&&(q.splice(t,1),q.length===0&&(document.removeEventListener("mousedown",z,I),document.removeEventListener("touchstart",z,I)))}let ae,se;function ce(e){const t=e.split(" ");return t.length!==2?!1:["top","center","bottom"].includes(t[0])!==!0?(console.error("Anchor/Self position must start with one of top/center/bottom"),!1):["left","middle","right","start","end"].includes(t[1])!==!0?(console.error("Anchor/Self position must end with one of left/middle/right/start/end"),!1):!0}function st(e){return e?!(e.length!==2||typeof e[0]!="number"||typeof e[1]!="number"):!0}const G={"start#ltr":"left","start#rtl":"right","end#ltr":"right","end#rtl":"left"};["left","middle","right"].forEach(e=>{G[`${e}#ltr`]=e,G[`${e}#rtl`]=e});function de(e,t){const o=e.split(" ");return{vertical:o[0],horizontal:G[`${o[1]}#${t===!0?"rtl":"ltr"}`]}}function ct(e,t){let{top:o,left:n,right:l,bottom:m,width:i,height:a}=e.getBoundingClientRect();return t!==void 0&&(o-=t[1],n-=t[0],m+=t[1],l+=t[0],i+=t[0],a+=t[1]),{top:o,bottom:m,height:a,left:n,right:l,width:i,middle:n+(l-n)/2,center:o+(m-o)/2}}function dt(e,t,o){let{top:n,left:l}=e.getBoundingClientRect();return n+=t.top,l+=t.left,o!==void 0&&(n+=o[1],l+=o[0]),{top:n,bottom:n+1,height:1,left:l,right:l+1,width:1,middle:l,center:n}}function ft(e,t){return{top:0,center:t/2,bottom:t,left:0,middle:e/2,right:e}}function fe(e,t,o,n){return{top:e[o.vertical]-t[n.vertical],left:e[o.horizontal]-t[n.horizontal]}}function Se(e,t=0){if(e.targetEl===null||e.anchorEl===null||t>5)return;if(e.targetEl.offsetHeight===0||e.targetEl.offsetWidth===0){setTimeout(()=>{Se(e,t+1)},10);return}const{targetEl:o,offset:n,anchorEl:l,anchorOrigin:m,selfOrigin:i,absoluteOffset:a,fit:h,cover:d,maxHeight:c,maxWidth:y}=e;if(L.client.is.ios===!0&&window.visualViewport!==void 0){const B=document.body.style,{offsetLeft:E,offsetTop:T}=window.visualViewport;E!==ae&&(B.setProperty("--q-pe-left",E+"px"),ae=E),T!==se&&(B.setProperty("--q-pe-top",T+"px"),se=T)}const{scrollLeft:w,scrollTop:u}=o,f=a===void 0?ct(l,d===!0?[0,0]:n):dt(l,a,n);Object.assign(o.style,{top:0,left:0,minWidth:null,minHeight:null,maxWidth:y,maxHeight:c,visibility:"visible"});const{offsetWidth:H,offsetHeight:C}=o,{elWidth:M,elHeight:v}=h===!0||d===!0?{elWidth:Math.max(f.width,H),elHeight:d===!0?Math.max(f.height,C):C}:{elWidth:H,elHeight:C};let p={maxWidth:y,maxHeight:c};(h===!0||d===!0)&&(p.minWidth=f.width+"px",d===!0&&(p.minHeight=f.height+"px")),Object.assign(o.style,p);const S=ft(M,v);let x=fe(f,S,m,i);if(a===void 0||n===void 0)Q(x,f,S,m,i);else{const{top:B,left:E}=x;Q(x,f,S,m,i);let T=!1;if(x.top!==B){T=!0;const P=2*n[1];f.center=f.top-=P,f.bottom-=P+2}if(x.left!==E){T=!0;const P=2*n[0];f.middle=f.left-=P,f.right-=P+2}T===!0&&(x=fe(f,S,m,i),Q(x,f,S,m,i))}p={top:x.top+"px",left:x.left+"px"},x.maxHeight!==void 0&&(p.maxHeight=x.maxHeight+"px",f.height>x.maxHeight&&(p.minHeight=p.maxHeight)),x.maxWidth!==void 0&&(p.maxWidth=x.maxWidth+"px",f.width>x.maxWidth&&(p.minWidth=p.maxWidth)),Object.assign(o.style,p),o.scrollTop!==u&&(o.scrollTop=u),o.scrollLeft!==w&&(o.scrollLeft=w)}function Q(e,t,o,n,l){const m=o.bottom,i=o.right,a=nt(),h=window.innerHeight-a,d=document.body.clientWidth;if(e.top<0||e.top+m>h)if(l.vertical==="center")e.top=t[n.vertical]>h/2?Math.max(0,h-m):0,e.maxHeight=Math.min(m,h);else if(t[n.vertical]>h/2){const c=Math.min(h,n.vertical==="center"?t.center:n.vertical===l.vertical?t.bottom:t.top);e.maxHeight=Math.min(m,c),e.top=Math.max(0,c-m)}else e.top=Math.max(0,n.vertical==="center"?t.center:n.vertical===l.vertical?t.top:t.bottom),e.maxHeight=Math.min(m,h-e.top);if(e.left<0||e.left+i>d)if(e.maxWidth=Math.min(i,d),l.horizontal==="middle")e.left=t[n.horizontal]>d/2?Math.max(0,d-i):0;else if(t[n.horizontal]>d/2){const c=Math.min(d,n.horizontal==="middle"?t.middle:n.horizontal===l.horizontal?t.right:t.left);e.maxWidth=Math.min(i,c),e.left=Math.max(0,c-e.maxWidth)}else e.left=Math.max(0,n.horizontal==="middle"?t.middle:n.horizontal===l.horizontal?t.left:t.right),e.maxWidth=Math.min(i,d-e.left)}const mt=g.createComponent({name:"QMenu",inheritAttrs:!1,props:{...Ke,...ve,...g.useDarkProps,...we,persistent:Boolean,autoClose:Boolean,separateClosePopup:Boolean,noEscDismiss:Boolean,noRouteDismiss:Boolean,noRefocus:Boolean,noFocus:Boolean,fit:Boolean,cover:Boolean,square:Boolean,anchor:{type:String,validator:ce},self:{type:String,validator:ce},offset:{type:Array,validator:st},scrollTarget:Ze,touchPosition:Boolean,maxHeight:{type:String,default:null},maxWidth:{type:String,default:null}},emits:[...ge,"click","escapeKey"],setup(e,{slots:t,emit:o,attrs:n}){let l=null,m,i,a;const h=r.getCurrentInstance(),{proxy:d}=h,{$q:c}=d,y=r.ref(null),w=r.ref(!1),u=r.computed(()=>e.persistent!==!0&&e.noRouteDismiss!==!0),f=g.useDark(e,c),{registerTick:H,removeTick:C}=be(),{registerTimeout:M}=Ee(),{transitionProps:v,transitionStyle:p}=xe(e),{localScrollTarget:S,changeScrollEvent:x,unconfigureScrollTarget:B}=Ne(e,te),{anchorEl:E,canShow:T}=Ue({showing:w}),{hide:P}=pe({showing:w,canShow:T,handleShow:We,handleHide:qe,hideOnRouteChange:u,processOnMount:!0}),{showPortal:X,hidePortal:Y,renderPortal:Pe}=ye(h,y,Be,"menu"),O={anchorEl:E,innerRef:y,onClickOutside(s){if(e.persistent!==!0&&w.value===!0)return P(s),(s.type==="touchstart"||s.target.classList.contains("q-dialog__backdrop"))&&g.stopAndPrevent(s),!0}},Z=r.computed(()=>de(e.anchor||(e.cover===!0?"center middle":"bottom start"),c.lang.rtl)),He=r.computed(()=>e.cover===!0?Z.value:de(e.self||"top start",c.lang.rtl)),Me=r.computed(()=>(e.square===!0?" q-menu--square":"")+(f.value===!0?" q-menu--dark q-dark":"")),ke=r.computed(()=>e.autoClose===!0?{onClick:Le}:{}),J=r.computed(()=>w.value===!0&&e.persistent!==!0);r.watch(J,s=>{s===!0?(Ce(K),at(O)):(j(K),ue(O))});function V(){he(()=>{let s=y.value;s&&s.contains(document.activeElement)!==!0&&(s=s.querySelector("[autofocus][tabindex], [data-autofocus][tabindex]")||s.querySelector("[autofocus] [tabindex], [data-autofocus] [tabindex]")||s.querySelector("[autofocus], [data-autofocus]")||s,s.focus({preventScroll:!0}))})}function We(s){if(l=e.noRefocus===!1?document.activeElement:null,L.addFocusout(oe),X(),te(),m=void 0,s!==void 0&&(e.touchPosition||e.contextMenu)){const U=g.position(s);if(U.left!==void 0){const{top:Fe,left:$e}=E.value.getBoundingClientRect();m={left:U.left-$e,top:U.top-Fe}}}i===void 0&&(i=r.watch(()=>c.screen.width+"|"+c.screen.height+"|"+e.self+"|"+e.anchor+"|"+c.lang.rtl,$)),e.noFocus!==!0&&document.activeElement.blur(),H(()=>{$(),e.noFocus!==!0&&V()}),M(()=>{c.platform.is.ios===!0&&(a=e.autoClose,y.value.click()),$(),X(!0),o("show",s)},e.transitionDuration)}function qe(s){C(),Y(),ee(!0),l!==null&&(s===void 0||s.qClickOutside!==!0)&&((((s==null?void 0:s.type.indexOf("key"))===0?l.closest('[tabindex]:not([tabindex^="-"])'):void 0)||l).focus(),l=null),M(()=>{Y(!0),o("hide",s)},e.transitionDuration)}function ee(s){m=void 0,i!==void 0&&(i(),i=void 0),(s===!0||w.value===!0)&&(L.removeFocusout(oe),B(),ue(O),j(K)),s!==!0&&(l=null)}function te(){(E.value!==null||e.scrollTarget!==void 0)&&(S.value=et(E.value,e.scrollTarget),x(S.value,$))}function Le(s){a!==!0?(g.closePortalMenus(d,s),o("click",s)):a=!1}function oe(s){J.value===!0&&e.noFocus!==!0&&g.childHasFocus(y.value,s.target)!==!0&&V()}function K(s){e.noEscDismiss!==!0&&(o("escapeKey"),P(s))}function $(){Se({targetEl:y.value,offset:e.offset,anchorEl:E.value,anchorOrigin:Z.value,selfOrigin:He.value,absoluteOffset:m,fit:e.fit,cover:e.cover,maxHeight:e.maxHeight,maxWidth:e.maxWidth})}function Be(){return r.h(r.Transition,v.value,()=>w.value===!0?r.h("div",{role:"menu",...n,ref:y,tabindex:-1,class:["q-menu q-position-engine scroll"+Me.value,n.class],style:[n.style,p.value],...ke.value},g.hSlot(t.default)):null)}return r.onBeforeUnmount(ee),Object.assign(d,{focus:V,updatePosition:$}),Pe}});exports.QMenu=mt;exports.addEscapeKey=Ce;exports.addFocusFn=he;exports.getHorizontalScrollPosition=ot;exports.getVerticalScrollPosition=tt;exports.hasScrollbar=lt;exports.removeEscapeKey=j;exports.removeFocusFn=ze;exports.useId=Re;exports.useModelToggle=pe;exports.useModelToggleEmits=ge;exports.useModelToggleProps=ve;exports.usePortal=ye;exports.useTick=be;exports.useTimeout=Ee;exports.useTransition=xe;exports.useTransitionProps=we;