mobile-table-pagination
Version:
A mobile-friendly table component for dynamic data display.
1 lines • 58.9 kB
JavaScript
(function(Z,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(Z=typeof globalThis<"u"?globalThis:Z||self,t(Z["mobile-table-pagination"]={},Z.Vue))})(this,function(Z,t){"use strict";const le={dark:{type:Boolean,default:null}};function oe(e,n){return t.computed(()=>e.dark===null?n.dark.isActive:e.dark)}function be(e,n,o,l){return Object.defineProperty(e,n,{get:o,set:l,enumerable:!0}),e}function Q(e){return t.markRaw(t.defineComponent(e))}function at(e){return t.markRaw(e)}function W(e,n){return e!==void 0&&e()||n}function ne(e,n){return e!==void 0?n.concat(e()):n}const lt=Q({name:"QCard",props:{...le,tag:{type:String,default:"div"},square:Boolean,flat:Boolean,bordered:Boolean},setup(e,{slots:n}){const{proxy:{$q:o}}=t.getCurrentInstance(),l=oe(e,o),a=t.computed(()=>"q-card"+(l.value===!0?" q-card--dark q-dark":"")+(e.bordered===!0?" q-card--bordered":"")+(e.square===!0?" q-card--square no-border-radius":"")+(e.flat===!0?" q-card--flat no-shadow":""));return()=>t.h(e.tag,{class:a.value},W(n.default))}}),ot=Q({name:"QCardSection",props:{tag:{type:String,default:"div"},horizontal:Boolean},setup(e,{slots:n}){const o=t.computed(()=>`q-card__section q-card__section--${e.horizontal===!0?"horiz row no-wrap":"vert"}`);return()=>t.h(e.tag,{class:o.value},W(n.default))}}),pe={xs:18,sm:24,md:32,lg:38,xl:46},Be={size:String};function Me(e,n=pe){return t.computed(()=>e.size!==void 0?{fontSize:e.size in n?`${n[e.size]}px`:e.size}:null)}const rt={size:{type:[String,Number],default:"1em"},color:String};function it(e){return{cSize:t.computed(()=>e.size in pe?`${pe[e.size]}px`:e.size),classes:t.computed(()=>"q-spinner"+(e.color?` text-${e.color}`:""))}}const ye=Q({name:"QSpinner",props:{...rt,thickness:{type:Number,default:5}},setup(e){const{cSize:n,classes:o}=it(e);return()=>t.h("svg",{class:o.value+" q-spinner-mat",width:n.value,height:n.value,viewBox:"25 25 50 50"},[t.h("circle",{class:"path",cx:"50",cy:"50",r:"20",fill:"none",stroke:"currentColor","stroke-width":e.thickness,"stroke-miterlimit":"10"})])}}),ut={transitionShow:{type:String,default:"fade"},transitionHide:{type:String,default:"fade"},transitionDuration:{type:[String,Number],default:300}};function st(e,n=()=>{},o=()=>{}){return{transitionProps:t.computed(()=>{const l=`q-transition--${e.transitionShow||n()}`,a=`q-transition--${e.transitionHide||o()}`;return{appear:!0,enterFromClass:`${l}-enter-from`,enterActiveClass:`${l}-enter-active`,enterToClass:`${l}-enter-to`,leaveFromClass:`${a}-leave-from`,leaveActiveClass:`${a}-leave-active`,leaveToClass:`${a}-leave-to`}}),transitionStyle:t.computed(()=>`--q-transition-duration: ${e.transitionDuration}ms`)}}const ct=Q({name:"QInnerLoading",props:{...le,...ut,showing:Boolean,color:String,size:{type:[String,Number],default:"42px"},label:String,labelClass:String,labelStyle:[String,Array,Object]},setup(e,{slots:n}){const o=t.getCurrentInstance(),l=oe(e,o.proxy.$q),{transitionProps:a,transitionStyle:u}=st(e),i=t.computed(()=>"q-inner-loading q--avoid-card-border absolute-full column flex-center"+(l.value===!0?" q-inner-loading--dark":"")),c=t.computed(()=>"q-inner-loading__label"+(e.labelClass!==void 0?` ${e.labelClass}`:""));function _(){const h=[t.h(ye,{size:e.size,color:e.color})];return e.label!==void 0&&h.push(t.h("div",{class:c.value,style:e.labelStyle},[e.label])),h}function x(){return e.showing===!0?t.h("div",{class:i.value,style:u.value},n.default!==void 0?n.default():_()):null}return()=>t.h(t.Transition,a.value,x)}}),Ee="0 0 24 24",Re=e=>e,ke=e=>`ionicons ${e}`,Pe={"mdi-":e=>`mdi ${e}`,"icon-":Re,"bt-":e=>`bt ${e}`,"eva-":e=>`eva ${e}`,"ion-md":ke,"ion-ios":ke,"ion-logo":ke,"iconfont ":Re,"ti-":e=>`themify-icon ${e}`,"bi-":e=>`bootstrap-icons ${e}`},$e={o_:"-outlined",r_:"-round",s_:"-sharp"},Ve={sym_o_:"-outlined",sym_r_:"-rounded",sym_s_:"-sharp"},dt=new RegExp("^("+Object.keys(Pe).join("|")+")"),ft=new RegExp("^("+Object.keys($e).join("|")+")"),Te=new RegExp("^("+Object.keys(Ve).join("|")+")"),mt=/^[Mm]\s?[-+]?\.?\d/,gt=/^img:/,ht=/^svguse:/,vt=/^ion-/,bt=/^(fa-(classic|sharp|solid|regular|light|brands|duotone|thin)|[lf]a[srlbdk]?) /,re=Q({name:"QIcon",props:{...Be,tag:{type:String,default:"i"},name:String,color:String,left:Boolean,right:Boolean},setup(e,{slots:n}){const{proxy:{$q:o}}=t.getCurrentInstance(),l=Me(e),a=t.computed(()=>"q-icon"+(e.left===!0?" on-left":"")+(e.right===!0?" on-right":"")+(e.color!==void 0?` text-${e.color}`:"")),u=t.computed(()=>{let i,c=e.name;if(c==="none"||!c)return{none:!0};if(o.iconMapFn!==null){const h=o.iconMapFn(c);if(h!==void 0)if(h.icon!==void 0){if(c=h.icon,c==="none"||!c)return{none:!0}}else return{cls:h.cls,content:h.content!==void 0?h.content:" "}}if(mt.test(c)===!0){const[h,y=Ee]=c.split("|");return{svg:!0,viewBox:y,nodes:h.split("&&").map(p=>{const[q,B,V]=p.split("@@");return t.h("path",{style:B,d:q,transform:V})})}}if(gt.test(c)===!0)return{img:!0,src:c.substring(4)};if(ht.test(c)===!0){const[h,y=Ee]=c.split("|");return{svguse:!0,src:h.substring(7),viewBox:y}}let _=" ";const x=c.match(dt);if(x!==null)i=Pe[x[1]](c);else if(bt.test(c)===!0)i=c;else if(vt.test(c)===!0)i=`ionicons ion-${o.platform.is.ios===!0?"ios":"md"}${c.substring(3)}`;else if(Te.test(c)===!0){i="notranslate material-symbols";const h=c.match(Te);h!==null&&(c=c.substring(6),i+=Ve[h[1]]),_=c}else{i="notranslate material-icons";const h=c.match(ft);h!==null&&(c=c.substring(2),i+=$e[h[1]]),_=c}return{cls:i,content:_}});return()=>{const i={class:a.value,style:l.value,"aria-hidden":"true",role:"presentation"};return u.value.none===!0?t.h(e.tag,i,W(n.default)):u.value.img===!0?t.h(e.tag,i,ne(n.default,[t.h("img",{src:u.value.src})])):u.value.svg===!0?t.h(e.tag,i,ne(n.default,[t.h("svg",{viewBox:u.value.viewBox||"0 0 24 24"},u.value.nodes)])):u.value.svguse===!0?t.h(e.tag,i,ne(n.default,[t.h("svg",{viewBox:u.value.viewBox},[t.h("use",{"xlink:href":u.value.src})])])):(u.value.cls!==void 0&&(i.class+=" "+u.value.cls),t.h(e.tag,i,ne(n.default,[u.value.content])))}}});function pt(e,n){const o=e.style;for(const l in n)o[l]=n[l]}const ie={hasPassive:!1,passiveCapture:!0,notPassiveCapture:!0};try{const e=Object.defineProperty({},"passive",{get(){Object.assign(ie,{hasPassive:!0,passive:{passive:!0},notPassive:{passive:!1},passiveCapture:{passive:!0,capture:!0},notPassiveCapture:{passive:!1,capture:!0}})}});window.addEventListener("qtest",null,e),window.removeEventListener("qtest",null,e)}catch{}function yt(e){return e.touches&&e.touches[0]?e=e.touches[0]:e.changedTouches&&e.changedTouches[0]?e=e.changedTouches[0]:e.targetTouches&&e.targetTouches[0]&&(e=e.targetTouches[0]),{top:e.clientY,left:e.clientX}}function ue(e){e.stopPropagation()}function X(e){e.cancelable!==!1&&e.preventDefault()}function Y(e){e.cancelable!==!1&&e.preventDefault(),e.stopPropagation()}function kt(e,n,o){const l=`__q_${n}_evt`;e[l]=e[l]!==void 0?e[l].concat(o):o,o.forEach(a=>{a[0].addEventListener(a[1],e[a[2]],ie[a[3]])})}function wt(e,n){const o=`__q_${n}_evt`;e[o]!==void 0&&(e[o].forEach(l=>{l[0].removeEventListener(l[1],e[l[2]],ie[l[3]])}),e[o]=void 0)}function Fe(e){return e!==Object(e)||e.isComposing===!0||e.qKeyEvent===!0}function se(e,n){return Fe(e)===!0?!1:[].concat(n).includes(e.keyCode)}function xt(e,n=250){let o=!1,l;return function(){return o===!1&&(o=!0,setTimeout(()=>{o=!1},n),l=e.apply(this,arguments)),l}}function Oe(e,n,o,l){o.modifiers.stop===!0&&ue(e);const a=o.modifiers.color;let u=o.modifiers.center;u=u===!0||l===!0;const i=document.createElement("span"),c=document.createElement("span"),_=yt(e),{left:x,top:h,width:y,height:p}=n.getBoundingClientRect(),q=Math.sqrt(y*y+p*p),B=q/2,V=`${(y-q)/2}px`,k=u?V:`${_.left-x-B}px`,F=`${(p-q)/2}px`,M=u?F:`${_.top-h-B}px`;c.className="q-ripple__inner",pt(c,{height:`${q}px`,width:`${q}px`,transform:`translate3d(${k},${M},0) scale3d(.2,.2,1)`,opacity:0}),i.className=`q-ripple${a?" text-"+a:""}`,i.setAttribute("dir","ltr"),i.appendChild(c),n.appendChild(i);const N=()=>{i.remove(),clearTimeout(A)};o.abort.push(N);let A=setTimeout(()=>{c.classList.add("q-ripple__inner--enter"),c.style.transform=`translate3d(${V},${F},0) scale3d(1,1,1)`,c.style.opacity=.2,A=setTimeout(()=>{c.classList.remove("q-ripple__inner--enter"),c.classList.add("q-ripple__inner--leave"),c.style.opacity=0,A=setTimeout(()=>{i.remove(),o.abort.splice(o.abort.indexOf(N),1)},275)},250)},50)}function Ae(e,{modifiers:n,value:o,arg:l}){const a=Object.assign({},e.cfg.ripple,n,o);e.modifiers={early:a.early===!0,stop:a.stop===!0,center:a.center===!0,color:a.color||l,keyCodes:[].concat(a.keyCodes||13)}}const Ct=at({name:"ripple",beforeMount(e,n){const o=n.instance.$.appContext.config.globalProperties.$q.config||{};if(o.ripple===!1)return;const l={cfg:o,enabled:n.value!==!1,modifiers:{},abort:[],start(a){l.enabled===!0&&a.qSkipRipple!==!0&&a.type===(l.modifiers.early===!0?"pointerdown":"click")&&Oe(a,e,l,a.qKeyEvent===!0)},keystart:xt(a=>{l.enabled===!0&&a.qSkipRipple!==!0&&se(a,l.modifiers.keyCodes)===!0&&a.type===`key${l.modifiers.early===!0?"down":"up"}`&&Oe(a,e,l,!0)},300)};Ae(l,n),e.__qripple=l,kt(l,"main",[[e,"pointerdown","start","passive"],[e,"click","start","passive"],[e,"keydown","keystart","passive"],[e,"keyup","keystart","passive"]])},updated(e,n){if(n.oldValue!==n.value){const o=e.__qripple;o!==void 0&&(o.enabled=n.value!==!1,o.enabled===!0&&Object(n.value)===n.value&&Ae(o,n))}},beforeUnmount(e){const n=e.__qripple;n!==void 0&&(n.abort.forEach(o=>{o()}),wt(n,"main"),delete e._qripple)}}),Le={left:"start",center:"center",right:"end",between:"between",around:"around",evenly:"evenly",stretch:"stretch"},St=Object.keys(Le),_t={align:{type:String,validator:e=>St.includes(e)}};function qt(e){return t.computed(()=>{const n=e.align===void 0?e.vertical===!0?"stretch":"left":e.align;return`${e.vertical===!0?"items":"justify"}-${Le[n]}`})}function Bt(e){return e.appContext.config.globalProperties.$router!==void 0}function Ie(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}function je(e,n){return(e.aliasOf||e)===(n.aliasOf||n)}function Mt(e,n){for(const o in n){const l=n[o],a=e[o];if(typeof l=="string"){if(l!==a)return!1}else if(Array.isArray(a)===!1||a.length!==l.length||l.some((u,i)=>u!==a[i]))return!1}return!0}function Ne(e,n){return Array.isArray(n)===!0?e.length===n.length&&e.every((o,l)=>o===n[l]):e.length===1&&e[0]===n}function Et(e,n){return Array.isArray(e)===!0?Ne(e,n):Array.isArray(n)===!0?Ne(n,e):e===n}function Rt(e,n){if(Object.keys(e).length!==Object.keys(n).length)return!1;for(const o in e)if(Et(e[o],n[o])===!1)return!1;return!0}const Pt={to:[String,Object],replace:Boolean,href:String,target:String,disable:Boolean};function $t({fallbackTag:e,useDisableForRouterLinkProps:n=!0}={}){const o=t.getCurrentInstance(),{props:l,proxy:a,emit:u}=o,i=Bt(o),c=t.computed(()=>l.disable!==!0&&l.href!==void 0),_=n===!0?t.computed(()=>i===!0&&l.disable!==!0&&c.value!==!0&&l.to!==void 0&&l.to!==null&&l.to!==""):t.computed(()=>i===!0&&c.value!==!0&&l.to!==void 0&&l.to!==null&&l.to!==""),x=t.computed(()=>_.value===!0?M(l.to):null),h=t.computed(()=>x.value!==null),y=t.computed(()=>c.value===!0||h.value===!0),p=t.computed(()=>l.type==="a"||y.value===!0?"a":l.tag||e||"div"),q=t.computed(()=>c.value===!0?{href:l.href,target:l.target}:h.value===!0?{href:x.value.href,target:l.target}:{}),B=t.computed(()=>{if(h.value===!1)return-1;const{matched:P}=x.value,{length:E}=P,R=P[E-1];if(R===void 0)return-1;const $=a.$route.matched;if($.length===0)return-1;const d=$.findIndex(je.bind(null,R));if(d!==-1)return d;const f=Ie(P[E-2]);return E>1&&Ie(R)===f&&$[$.length-1].path!==f?$.findIndex(je.bind(null,P[E-2])):d}),V=t.computed(()=>h.value===!0&&B.value!==-1&&Mt(a.$route.params,x.value.params)),k=t.computed(()=>V.value===!0&&B.value===a.$route.matched.length-1&&Rt(a.$route.params,x.value.params)),F=t.computed(()=>h.value===!0?k.value===!0?` ${l.exactActiveClass} ${l.activeClass}`:l.exact===!0?"":V.value===!0?` ${l.activeClass}`:"":"");function M(P){try{return a.$router.resolve(P)}catch{}return null}function N(P,{returnRouterError:E,to:R=l.to,replace:$=l.replace}={}){if(l.disable===!0)return P.preventDefault(),Promise.resolve(!1);if(P.metaKey||P.altKey||P.ctrlKey||P.shiftKey||P.button!==void 0&&P.button!==0||l.target==="_blank")return Promise.resolve(!1);P.preventDefault();const d=a.$router[$===!0?"replace":"push"](R);return E===!0?d:d.then(()=>{}).catch(()=>{})}function A(P){if(h.value===!0){const E=R=>N(P,R);u("click",P,E),P.defaultPrevented!==!0&&E()}else u("click",P)}return{hasRouterLink:h,hasHrefLink:c,hasLink:y,linkTag:p,resolvedLink:x,linkIsActive:V,linkIsExactActive:k,linkClass:F,linkAttrs:q,getLink:M,navigateToRouterLink:N,navigateOnClick:A}}const ce={none:0,xs:4,sm:8,md:16,lg:24,xl:32},Vt={xs:8,sm:10,md:14,lg:20,xl:24},Tt=["button","submit","reset"],Ft=/[^\s]\/[^\s]/,De=["flat","outline","push","unelevated"];function ze(e,n){return e.flat===!0?"flat":e.outline===!0?"outline":e.push===!0?"push":e.unelevated===!0?"unelevated":n}const Ot={...{...Be,...Pt,type:{type:String,default:"button"},label:[Number,String],icon:String,iconRight:String,...De.reduce((e,n)=>(e[n]=Boolean)&&e,{}),square:Boolean,rounded:Boolean,glossy:Boolean,size:String,fab:Boolean,fabMini:Boolean,padding:String,color:String,textColor:String,noCaps:Boolean,noWrap:Boolean,dense:Boolean,tabindex:[Number,String],ripple:{type:[Boolean,Object],default:!0},align:{..._t.align,default:"center"},stack:Boolean,stretch:Boolean,loading:{type:Boolean,default:null},disable:Boolean},round:Boolean};function At(e){const n=Me(e,Vt),o=qt(e),{hasRouterLink:l,hasLink:a,linkTag:u,linkAttrs:i,navigateOnClick:c}=$t({fallbackTag:"button"}),_=t.computed(()=>{const k=e.fab===!1&&e.fabMini===!1?n.value:{};return e.padding!==void 0?Object.assign({},k,{padding:e.padding.split(/\s+/).map(F=>F in ce?ce[F]+"px":F).join(" "),minWidth:"0",minHeight:"0"}):k}),x=t.computed(()=>e.rounded===!0||e.fab===!0||e.fabMini===!0),h=t.computed(()=>e.disable!==!0&&e.loading!==!0),y=t.computed(()=>h.value===!0?e.tabindex||0:-1),p=t.computed(()=>ze(e,"standard")),q=t.computed(()=>{const k={tabindex:y.value};return a.value===!0?Object.assign(k,i.value):Tt.includes(e.type)===!0&&(k.type=e.type),u.value==="a"?(e.disable===!0?k["aria-disabled"]="true":k.href===void 0&&(k.role="button"),l.value!==!0&&Ft.test(e.type)===!0&&(k.type=e.type)):e.disable===!0&&(k.disabled="",k["aria-disabled"]="true"),e.loading===!0&&e.percentage!==void 0&&Object.assign(k,{role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":e.percentage}),k}),B=t.computed(()=>{let k;e.color!==void 0?e.flat===!0||e.outline===!0?k=`text-${e.textColor||e.color}`:k=`bg-${e.color} text-${e.textColor||"white"}`:e.textColor&&(k=`text-${e.textColor}`);const F=e.round===!0?"round":`rectangle${x.value===!0?" q-btn--rounded":e.square===!0?" q-btn--square":""}`;return`q-btn--${p.value} q-btn--${F}`+(k!==void 0?" "+k:"")+(h.value===!0?" q-btn--actionable q-focusable q-hoverable":e.disable===!0?" disabled":"")+(e.fab===!0?" q-btn--fab":e.fabMini===!0?" q-btn--fab-mini":"")+(e.noCaps===!0?" q-btn--no-uppercase":"")+(e.dense===!0?" q-btn--dense":"")+(e.stretch===!0?" no-border-radius self-stretch":"")+(e.glossy===!0?" glossy":"")+(e.square?" q-btn--square":"")}),V=t.computed(()=>o.value+(e.stack===!0?" column":" row")+(e.noWrap===!0?" no-wrap text-no-wrap":"")+(e.loading===!0?" q-btn__content--hidden":""));return{classes:B,style:_,innerClasses:V,attributes:q,hasLink:a,linkTag:u,navigateOnClick:c,isActionable:h}}const{passiveCapture:K}=ie;let J=null,G=null,ee=null;const Lt=Q({name:"QBtn",props:{...Ot,percentage:Number,darkPercentage:Boolean,onTouchstart:[Function,Array]},emits:["click","keydown","mousedown","keyup"],setup(e,{slots:n,emit:o}){const{proxy:l}=t.getCurrentInstance(),{classes:a,style:u,innerClasses:i,attributes:c,hasLink:_,linkTag:x,navigateOnClick:h,isActionable:y}=At(e),p=t.ref(null),q=t.ref(null);let B=null,V,k=null;const F=t.computed(()=>e.label!==void 0&&e.label!==null&&e.label!==""),M=t.computed(()=>e.disable===!0||e.ripple===!1?!1:{keyCodes:_.value===!0?[13,32]:[13],...e.ripple===!0?{}:e.ripple}),N=t.computed(()=>({center:e.round})),A=t.computed(()=>{const r=Math.max(0,Math.min(100,e.percentage));return r>0?{transition:"transform 0.6s",transform:`translateX(${r-100}%)`}:{}}),P=t.computed(()=>{if(e.loading===!0)return{onMousedown:g,onTouchstart:g,onClick:g,onKeydown:g,onKeyup:g};if(y.value===!0){const r={onClick:R,onKeydown:$,onMousedown:f};if(l.$q.platform.has.touch===!0){const w=e.onTouchstart!==void 0?"":"Passive";r[`onTouchstart${w}`]=d}return r}return{onClick:Y}}),E=t.computed(()=>({ref:p,class:"q-btn q-btn-item non-selectable no-outline "+a.value,style:u.value,...c.value,...P.value}));function R(r){if(p.value!==null){if(r!==void 0){if(r.defaultPrevented===!0)return;const w=document.activeElement;if(e.type==="submit"&&w!==document.body&&p.value.contains(w)===!1&&w.contains(p.value)===!1){p.value.focus();const C=()=>{document.removeEventListener("keydown",Y,!0),document.removeEventListener("keyup",C,K),p.value!==null&&p.value.removeEventListener("blur",C,K)};document.addEventListener("keydown",Y,!0),document.addEventListener("keyup",C,K),p.value.addEventListener("blur",C,K)}}h(r)}}function $(r){p.value!==null&&(o("keydown",r),se(r,[13,32])===!0&&G!==p.value&&(G!==null&&s(),r.defaultPrevented!==!0&&(p.value.focus(),G=p.value,p.value.classList.add("q-btn--active"),document.addEventListener("keyup",b,!0),p.value.addEventListener("blur",b,K)),Y(r)))}function d(r){p.value!==null&&(o("touchstart",r),r.defaultPrevented!==!0&&(J!==p.value&&(J!==null&&s(),J=p.value,B=r.target,B.addEventListener("touchcancel",b,K),B.addEventListener("touchend",b,K)),V=!0,k!==null&&clearTimeout(k),k=setTimeout(()=>{k=null,V=!1},200)))}function f(r){p.value!==null&&(r.qSkipRipple=V===!0,o("mousedown",r),r.defaultPrevented!==!0&&ee!==p.value&&(ee!==null&&s(),ee=p.value,p.value.classList.add("q-btn--active"),document.addEventListener("mouseup",b,K)))}function b(r){if(p.value!==null&&!(r!==void 0&&r.type==="blur"&&document.activeElement===p.value)){if(r!==void 0&&r.type==="keyup"){if(G===p.value&&se(r,[13,32])===!0){const w=new MouseEvent("click",r);w.qKeyEvent=!0,r.defaultPrevented===!0&&X(w),r.cancelBubble===!0&&ue(w),p.value.dispatchEvent(w),Y(r),r.qKeyEvent=!0}o("keyup",r)}s()}}function s(r){const w=q.value;r!==!0&&(J===p.value||ee===p.value)&&w!==null&&w!==document.activeElement&&(w.setAttribute("tabindex",-1),w.focus()),J===p.value&&(B!==null&&(B.removeEventListener("touchcancel",b,K),B.removeEventListener("touchend",b,K)),J=B=null),ee===p.value&&(document.removeEventListener("mouseup",b,K),ee=null),G===p.value&&(document.removeEventListener("keyup",b,!0),p.value!==null&&p.value.removeEventListener("blur",b,K),G=null),p.value!==null&&p.value.classList.remove("q-btn--active")}function g(r){Y(r),r.qSkipRipple=!0}return t.onBeforeUnmount(()=>{s(!0)}),Object.assign(l,{click:r=>{y.value===!0&&R(r)}}),()=>{let r=[];e.icon!==void 0&&r.push(t.h(re,{name:e.icon,left:e.stack!==!0&&F.value===!0,role:"img"})),F.value===!0&&r.push(t.h("span",{class:"block"},[e.label])),r=ne(n.default,r),e.iconRight!==void 0&&e.round===!1&&r.push(t.h(re,{name:e.iconRight,right:e.stack!==!0&&F.value===!0,role:"img"}));const w=[t.h("span",{class:"q-focus-helper",ref:q})];return e.loading===!0&&e.percentage!==void 0&&w.push(t.h("span",{class:"q-btn__progress absolute-full overflow-hidden"+(e.darkPercentage===!0?" q-btn__progress--dark":"")},[t.h("span",{class:"q-btn__progress-indicator fit block",style:A.value})])),w.push(t.h("span",{class:"q-btn__content text-center col items-center q-anchor--skip "+i.value},r)),e.loading!==null&&w.push(t.h(t.Transition,{name:"q-transition--fade"},()=>e.loading===!0?[t.h("span",{key:"loading",class:"absolute-full flex flex-center"},n.loading!==void 0?n.loading():[t.h(ye)])]:null)),t.withDirectives(t.h(x.value,E.value,w),[[Ct,M.value,void 0,N.value]])}}});let we,de=0;const D=new Array(256);for(let e=0;e<256;e++)D[e]=(e+256).toString(16).substring(1);const It=(()=>{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 n=>{const o=new Uint8Array(n);return e.getRandomValues(o),o}}return n=>{const o=[];for(let l=n;l>0;l--)o.push(Math.floor(Math.random()*256));return o}})(),Ke=4096;function xe(){(we===void 0||de+16>Ke)&&(de=0,we=It(Ke));const e=Array.prototype.slice.call(we,de,de+=16);return e[6]=e[6]&15|64,e[8]=e[8]&63|128,D[e[0]]+D[e[1]]+D[e[2]]+D[e[3]]+"-"+D[e[4]]+D[e[5]]+"-"+D[e[6]]+D[e[7]]+"-"+D[e[8]]+D[e[9]]+"-"+D[e[10]]+D[e[11]]+D[e[12]]+D[e[13]]+D[e[14]]+D[e[15]]}const ae=t.ref(!1);let Ce;function jt(e,n){const o=/(edg|edge|edga|edgios)\/([\w.]+)/.exec(e)||/(opr)[\/]([\w.]+)/.exec(e)||/(vivaldi)[\/]([\w.]+)/.exec(e)||/(chrome|crios)[\/]([\w.]+)/.exec(e)||/(version)(applewebkit)[\/]([\w.]+).*(safari)[\/]([\w.]+)/.exec(e)||/(webkit)[\/]([\w.]+).*(version)[\/]([\w.]+).*(safari)[\/]([\w.]+)/.exec(e)||/(firefox|fxios)[\/]([\w.]+)/.exec(e)||/(webkit)[\/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[\/]([\w.]+)/.exec(e)||[];return{browser:o[5]||o[3]||o[1]||"",version:o[4]||o[2]||"0",platform:n[0]||""}}function Nt(e){return/(ipad)/.exec(e)||/(ipod)/.exec(e)||/(windows phone)/.exec(e)||/(iphone)/.exec(e)||/(kindle)/.exec(e)||/(silk)/.exec(e)||/(android)/.exec(e)||/(win)/.exec(e)||/(mac)/.exec(e)||/(linux)/.exec(e)||/(cros)/.exec(e)||/(playbook)/.exec(e)||/(bb)/.exec(e)||/(blackberry)/.exec(e)||[]}const Ue="ontouchstart"in window||window.navigator.maxTouchPoints>0;function Dt(e){const n=e.toLowerCase(),o=Nt(n),l=jt(n,o),a={mobile:!1,desktop:!1,cordova:!1,capacitor:!1,nativeMobile:!1,electron:!1,bex:!1,linux:!1,mac:!1,win:!1,cros:!1,chrome:!1,firefox:!1,opera:!1,safari:!1,vivaldi:!1,edge:!1,edgeChromium:!1,ie:!1,webkit:!1,android:!1,ios:!1,ipad:!1,iphone:!1,ipod:!1,kindle:!1,winphone:!1,blackberry:!1,playbook:!1,silk:!1};l.browser&&(a[l.browser]=!0,a.version=l.version,a.versionNumber=parseInt(l.version,10)),l.platform&&(a[l.platform]=!0);const u=a.android||a.ios||a.bb||a.blackberry||a.ipad||a.iphone||a.ipod||a.kindle||a.playbook||a.silk||a["windows phone"];if(u===!0||n.indexOf("mobile")!==-1?a.mobile=!0:a.desktop=!0,a["windows phone"]&&(a.winphone=!0,delete a["windows phone"]),a.edga||a.edgios||a.edg?(a.edge=!0,l.browser="edge"):a.crios?(a.chrome=!0,l.browser="chrome"):a.fxios&&(a.firefox=!0,l.browser="firefox"),(a.ipod||a.ipad||a.iphone)&&(a.ios=!0),a.vivaldi&&(l.browser="vivaldi",a.vivaldi=!0),(a.chrome||a.opr||a.safari||a.vivaldi||a.mobile===!0&&a.ios!==!0&&u!==!0)&&(a.webkit=!0),a.opr&&(l.browser="opera",a.opera=!0),a.safari&&(a.blackberry||a.bb?(l.browser="blackberry",a.blackberry=!0):a.playbook?(l.browser="playbook",a.playbook=!0):a.android?(l.browser="android",a.android=!0):a.kindle?(l.browser="kindle",a.kindle=!0):a.silk&&(l.browser="silk",a.silk=!0)),a.name=l.browser,a.platform=l.platform,n.indexOf("electron")!==-1)a.electron=!0;else if(document.location.href.indexOf("-extension://")!==-1)a.bex=!0;else{if(window.Capacitor!==void 0?(a.capacitor=!0,a.nativeMobile=!0,a.nativeMobileWrapper="capacitor"):(window._cordovaNative!==void 0||window.cordova!==void 0)&&(a.cordova=!0,a.nativeMobile=!0,a.nativeMobileWrapper="cordova"),ae.value===!0&&(Ce={is:{...a}}),Ue===!0&&a.mac===!0&&(a.desktop===!0&&a.safari===!0||a.nativeMobile===!0&&a.android!==!0&&a.ios!==!0&&a.ipad!==!0)){delete a.mac,delete a.desktop;const i=Math.min(window.innerHeight,window.innerWidth)>414?"ipad":"iphone";Object.assign(a,{mobile:!0,ios:!0,platform:i,[i]:!0})}a.mobile!==!0&&window.navigator.userAgentData&&window.navigator.userAgentData.mobile&&(delete a.desktop,a.mobile=!0)}return a}const He=navigator.userAgent||navigator.vendor||window.opera,zt={has:{touch:!1,webStorage:!1},within:{iframe:!1}},fe={userAgent:He,is:Dt(He),has:{touch:Ue},within:{iframe:window.self!==window.top}},Qe={install(e){const{$q:n}=e;ae.value===!0?(e.onSSRHydrated.push(()=>{Object.assign(n.platform,fe),ae.value=!1}),n.platform=t.reactive(this)):n.platform=this}};{let e;be(fe.has,"webStorage",()=>{if(e!==void 0)return e;try{if(window.localStorage)return e=!0,!0}catch{}return e=!1,!1}),Object.assign(Qe,fe),ae.value===!0&&(Object.assign(Qe,Ce,zt),Ce=null)}function Kt(e){return e??null}function Ze(e,n){return e??(n===!0?`f_${xe()}`:null)}function Ut({getValue:e,required:n=!0}={}){if(ae.value===!0){const o=e!==void 0?t.ref(Kt(e())):t.ref(null);return n===!0&&o.value===null&&t.onMounted(()=>{o.value=`f_${xe()}`}),e!==void 0&&t.watch(e,l=>{o.value=Ze(l,n)}),o}return e!==void 0?t.computed(()=>Ze(e(),n)):t.ref(`f_${xe()}`)}const We=/^on[A-Z]/;function Ht(){const{attrs:e,vnode:n}=t.getCurrentInstance(),o={listeners:t.ref({}),attributes:t.ref({})};function l(){const a={},u={};for(const i in e)i!=="class"&&i!=="style"&&We.test(i)===!1&&(a[i]=e[i]);for(const i in n.props)We.test(i)===!0&&(u[i]=n.props[i]);o.attributes.value=a,o.listeners.value=u}return t.onBeforeUpdate(l),l(),o}const Qt="_q_fo_";function Zt({validate:e,resetValidation:n,requiresQForm:o}){const l=t.inject(Qt,!1);if(l!==!1){const{props:a,proxy:u}=t.getCurrentInstance();Object.assign(u,{validate:e,resetValidation:n}),t.watch(()=>a.disable,i=>{i===!0?(typeof n=="function"&&n(),l.unbindComponent(u)):l.bindComponent(u)}),t.onMounted(()=>{a.disable!==!0&&l.bindComponent(u)}),t.onBeforeUnmount(()=>{a.disable!==!0&&l.unbindComponent(u)})}else o===!0&&console.error("Parent QForm not found on useFormChild()!")}const Ye=/^#[0-9a-fA-F]{3}([0-9a-fA-F]{3})?$/,Xe=/^#[0-9a-fA-F]{4}([0-9a-fA-F]{4})?$/,Je=/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/,me=/^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])\)$/,ge=/^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)\)$/,Se={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=>Ye.test(e),hexaColor:e=>Xe.test(e),hexOrHexaColor:e=>Je.test(e),rgbColor:e=>me.test(e),rgbaColor:e=>ge.test(e),rgbOrRgbaColor:e=>me.test(e)||ge.test(e),hexOrRgbColor:e=>Ye.test(e)||me.test(e),hexaOrRgbaColor:e=>Xe.test(e)||ge.test(e),anyColor:e=>Je.test(e)||me.test(e)||ge.test(e)};function Wt(e,n=250,o){let l=null;function a(){const u=arguments,i=()=>{l=null,o!==!0&&e.apply(this,u)};l!==null?clearTimeout(l):o===!0&&e.apply(this,u),l=setTimeout(i,n)}return a.cancel=()=>{l!==null&&clearTimeout(l)},a}const Yt=[!0,!1,"ondemand"],Xt={modelValue:{},error:{type:Boolean,default:null},errorMessage:String,noErrorIcon:Boolean,rules:Array,reactiveRules:Boolean,lazyRules:{type:[Boolean,String],default:!1,validator:e=>Yt.includes(e)}};function Jt(e,n){const{props:o,proxy:l}=t.getCurrentInstance(),a=t.ref(!1),u=t.ref(null),i=t.ref(!1);Zt({validate:V,resetValidation:B});let c=0,_;const x=t.computed(()=>o.rules!==void 0&&o.rules!==null&&o.rules.length!==0),h=t.computed(()=>o.disable!==!0&&x.value===!0&&n.value===!1),y=t.computed(()=>o.error===!0||a.value===!0),p=t.computed(()=>typeof o.errorMessage=="string"&&o.errorMessage.length!==0?o.errorMessage:u.value);t.watch(()=>o.modelValue,()=>{i.value=!0,h.value===!0&&o.lazyRules===!1&&k()});function q(){o.lazyRules!=="ondemand"&&h.value===!0&&i.value===!0&&k()}t.watch(()=>o.reactiveRules,F=>{F===!0?_===void 0&&(_=t.watch(()=>o.rules,q,{immediate:!0,deep:!0})):_!==void 0&&(_(),_=void 0)},{immediate:!0}),t.watch(()=>o.lazyRules,q),t.watch(e,F=>{F===!0?i.value=!0:h.value===!0&&o.lazyRules!=="ondemand"&&k()});function B(){c++,n.value=!1,i.value=!1,a.value=!1,u.value=null,k.cancel()}function V(F=o.modelValue){if(o.disable===!0||x.value===!1)return!0;const M=++c,N=n.value!==!0?()=>{i.value=!0}:()=>{},A=(E,R)=>{E===!0&&N(),a.value=E,u.value=R||null,n.value=!1},P=[];for(let E=0;E<o.rules.length;E++){const R=o.rules[E];let $;if(typeof R=="function"?$=R(F,Se):typeof R=="string"&&Se[R]!==void 0&&($=Se[R](F)),$===!1||typeof $=="string")return A(!0,$),!1;$!==!0&&$!==void 0&&P.push($)}return P.length===0?(A(!1),!0):(n.value=!0,Promise.all(P).then(E=>{if(E===void 0||Array.isArray(E)===!1||E.length===0)return M===c&&A(!1),!0;const R=E.find($=>$===!1||typeof $=="string");return M===c&&A(R!==void 0,R),R===void 0},E=>(M===c&&(console.error(E),A(!0)),!1)))}const k=Wt(V,0);return t.onBeforeUnmount(()=>{_!==void 0&&_(),k.cancel()}),Object.assign(l,{resetValidation:B,validate:V}),be(l,"hasError",()=>y.value),{isDirtyModel:i,hasRules:x,hasError:y,errorMessage:p,validate:V,resetValidation:B}}let _e=[],Gt=[];function Ge(e){Gt.length===0?e():_e.push(e)}function en(e){_e=_e.filter(n=>n!==e)}function qe(e){return e!=null&&(""+e).length!==0}const tn={...{...le,...Xt,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},maxlength:[Number,String]},nn=["update:modelValue","clear","focus","blur"];function an({requiredForAttr:e=!0,tagProp:n,changeEvent:o=!1}={}){const{props:l,proxy:a}=t.getCurrentInstance(),u=oe(l,a.$q),i=Ut({required:e,getValue:()=>l.for});return{requiredForAttr:e,changeEvent:o,tag:n===!0?t.computed(()=>l.tag):{value:"label"},isDark:u,editable:t.computed(()=>l.disable!==!0&&l.readonly!==!0),innerLoading:t.ref(!1),focused:t.ref(!1),hasPopupOpen:!1,splitAttrs:Ht(),targetUid:i,rootRef:t.ref(null),targetRef:t.ref(null),controlRef:t.ref(null)}}function ln(e){const{props:n,emit:o,slots:l,attrs:a,proxy:u}=t.getCurrentInstance(),{$q:i}=u;let c=null;e.hasValue===void 0&&(e.hasValue=t.computed(()=>qe(n.modelValue))),e.emitValue===void 0&&(e.emitValue=v=>{o("update:modelValue",v)}),e.controlEvents===void 0&&(e.controlEvents={onFocusin:d,onFocusout:f}),Object.assign(e,{clearValue:b,onControlFocusin:d,onControlFocusout:f,focus:R}),e.computedCounter===void 0&&(e.computedCounter=t.computed(()=>{if(n.counter!==!1){const v=typeof n.modelValue=="string"||typeof n.modelValue=="number"?(""+n.modelValue).length:Array.isArray(n.modelValue)===!0?n.modelValue.length:0,S=n.maxlength!==void 0?n.maxlength:n.maxValues;return v+(S!==void 0?" / "+S:"")}}));const{isDirtyModel:_,hasRules:x,hasError:h,errorMessage:y,resetValidation:p}=Jt(e.focused,e.innerLoading),q=e.floatingLabel!==void 0?t.computed(()=>n.stackLabel===!0||e.focused.value===!0||e.floatingLabel.value===!0):t.computed(()=>n.stackLabel===!0||e.focused.value===!0||e.hasValue.value===!0),B=t.computed(()=>n.bottomSlots===!0||n.hint!==void 0||x.value===!0||n.counter===!0||n.error!==null),V=t.computed(()=>n.filled===!0?"filled":n.outlined===!0?"outlined":n.borderless===!0?"borderless":n.standout?"standout":"standard"),k=t.computed(()=>`q-field row no-wrap items-start q-field--${V.value}`+(e.fieldClass!==void 0?` ${e.fieldClass.value}`:"")+(n.rounded===!0?" q-field--rounded":"")+(n.square===!0?" q-field--square":"")+(q.value===!0?" q-field--float":"")+(M.value===!0?" q-field--labeled":"")+(n.dense===!0?" q-field--dense":"")+(n.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":"")+(h.value===!0?" q-field--error":"")+(h.value===!0||e.focused.value===!0?" q-field--highlighted":"")+(n.hideBottomSpace!==!0&&B.value===!0?" q-field--with-bottom":"")+(n.disable===!0?" q-field--disabled":n.readonly===!0?" q-field--readonly":"")),F=t.computed(()=>"q-field__control relative-position row no-wrap"+(n.bgColor!==void 0?` bg-${n.bgColor}`:"")+(h.value===!0?" text-negative":typeof n.standout=="string"&&n.standout.length!==0&&e.focused.value===!0?` ${n.standout}`:n.color!==void 0?` text-${n.color}`:"")),M=t.computed(()=>n.labelSlot===!0||n.label!==void 0),N=t.computed(()=>"q-field__label no-pointer-events absolute ellipsis"+(n.labelColor!==void 0&&h.value!==!0?` text-${n.labelColor}`:"")),A=t.computed(()=>({id:e.targetUid.value,editable:e.editable.value,focused:e.focused.value,floatingLabel:q.value,modelValue:n.modelValue,emitValue:e.emitValue})),P=t.computed(()=>{const v={};return e.targetUid.value&&(v.for=e.targetUid.value),n.disable===!0&&(v["aria-disabled"]="true"),v});function E(){const v=document.activeElement;let S=e.targetRef!==void 0&&e.targetRef.value;S&&(v===null||v.id!==e.targetUid.value)&&(S.hasAttribute("tabindex")===!0||(S=S.querySelector("[tabindex]")),S&&S!==v&&S.focus({preventScroll:!0}))}function R(){Ge(E)}function $(){en(E);const v=document.activeElement;v!==null&&e.rootRef.value.contains(v)&&v.blur()}function d(v){c!==null&&(clearTimeout(c),c=null),e.editable.value===!0&&e.focused.value===!1&&(e.focused.value=!0,o("focus",v))}function f(v,S){c!==null&&clearTimeout(c),c=setTimeout(()=>{c=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,o("blur",v)),S!==void 0&&S())})}function b(v){Y(v),i.platform.is.mobile!==!0?(e.targetRef!==void 0&&e.targetRef.value||e.rootRef.value).focus():e.rootRef.value.contains(document.activeElement)===!0&&document.activeElement.blur(),n.type==="file"&&(e.inputRef.value.value=null),o("update:modelValue",null),e.changeEvent===!0&&o("change",null),o("clear",n.modelValue),t.nextTick(()=>{const S=_.value;p(),_.value=S})}function s(v){[13,32].includes(v.keyCode)&&b(v)}function g(){const v=[];return l.prepend!==void 0&&v.push(t.h("div",{class:"q-field__prepend q-field__marginal row no-wrap items-center",key:"prepend",onClick:X},l.prepend())),v.push(t.h("div",{class:"q-field__control-container col relative-position row no-wrap q-anchor--skip"},r())),h.value===!0&&n.noErrorIcon===!1&&v.push(C("error",[t.h(re,{name:i.iconSet.field.error,color:"negative"})])),n.loading===!0||e.innerLoading.value===!0?v.push(C("inner-loading-append",l.loading!==void 0?l.loading():[t.h(ye,{color:n.color})])):n.clearable===!0&&e.hasValue.value===!0&&e.editable.value===!0&&v.push(C("inner-clearable-append",[t.h(re,{class:"q-field__focusable-action",name:n.clearIcon||i.iconSet.field.clear,tabindex:0,role:"button","aria-hidden":"false","aria-label":i.lang.label.clear,onKeyup:s,onClick:b})])),l.append!==void 0&&v.push(t.h("div",{class:"q-field__append q-field__marginal row no-wrap items-center",key:"append",onClick:X},l.append())),e.getInnerAppend!==void 0&&v.push(C("inner-append",e.getInnerAppend())),e.getControlChild!==void 0&&v.push(e.getControlChild()),v}function r(){const v=[];return n.prefix!==void 0&&n.prefix!==null&&v.push(t.h("div",{class:"q-field__prefix no-pointer-events row items-center"},n.prefix)),e.getShadowControl!==void 0&&e.hasShadow.value===!0&&v.push(e.getShadowControl()),e.getControl!==void 0?v.push(e.getControl()):l.rawControl!==void 0?v.push(l.rawControl()):l.control!==void 0&&v.push(t.h("div",{ref:e.targetRef,class:"q-field__native row",tabindex:-1,...e.splitAttrs.attributes.value,"data-autofocus":n.autofocus===!0||void 0},l.control(A.value))),M.value===!0&&v.push(t.h("div",{class:N.value},W(l.label,n.label))),n.suffix!==void 0&&n.suffix!==null&&v.push(t.h("div",{class:"q-field__suffix no-pointer-events row items-center"},n.suffix)),v.concat(W(l.default))}function w(){let v,S;h.value===!0?y.value!==null?(v=[t.h("div",{role:"alert"},y.value)],S=`q--slot-error-${y.value}`):(v=W(l.error),S="q--slot-error"):(n.hideHint!==!0||e.focused.value===!0)&&(n.hint!==void 0?(v=[t.h("div",n.hint)],S=`q--slot-hint-${n.hint}`):(v=W(l.hint),S="q--slot-hint"));const O=n.counter===!0||l.counter!==void 0;if(n.hideBottomSpace===!0&&O===!1&&v===void 0)return;const L=t.h("div",{key:S,class:"q-field__messages col"},v);return t.h("div",{class:"q-field__bottom row items-start q-field__bottom--"+(n.hideBottomSpace!==!0?"animated":"stale"),onClick:X},[n.hideBottomSpace===!0?L:t.h(t.Transition,{name:"q-transition--field-message"},()=>L),O===!0?t.h("div",{class:"q-field__counter"},l.counter!==void 0?l.counter():e.computedCounter.value):null])}function C(v,S){return S===null?null:t.h("div",{key:v,class:"q-field__append q-field__marginal row no-wrap items-center q-anchor--skip"},S)}let T=!1;return t.onDeactivated(()=>{T=!0}),t.onActivated(()=>{T===!0&&n.autofocus===!0&&u.focus()}),n.autofocus===!0&&t.onMounted(()=>{u.focus()}),t.onBeforeUnmount(()=>{c!==null&&clearTimeout(c)}),Object.assign(u,{focus:R,blur:$}),function(){const S=e.getControl===void 0&&l.control===void 0?{...e.splitAttrs.attributes.value,"data-autofocus":n.autofocus===!0||void 0,...P.value}:P.value;return t.h(e.tag.value,{ref:e.rootRef,class:[k.value,a.class],style:a.style,...S},[l.before!==void 0?t.h("div",{class:"q-field__before q-field__marginal row no-wrap items-center",onClick:X},l.before()):null,t.h("div",{class:"q-field__inner relative-position col self-stretch"},[t.h("div",{ref:e.controlRef,class:F.value,tabindex:-1,...e.controlEvents},g()),B.value===!0?w():null]),l.after!==void 0?t.h("div",{class:"q-field__after q-field__marginal row no-wrap items-center",onClick:X},l.after()):null])}}const et={date:"####/##/##",datetime:"####/##/## ##:##",time:"##:##",fulltime:"##:##:##",phone:"(###) ### - ####",card:"#### #### #### ####"},he={"#":{pattern:"[\\d]",negate:"[^\\d]"},S:{pattern:"[a-zA-Z]",negate:"[^a-zA-Z]"},N:{pattern:"[0-9a-zA-Z]",negate:"[^0-9a-zA-Z]"},A:{pattern:"[a-zA-Z]",negate:"[^a-zA-Z]",transform:e=>e.toLocaleUpperCase()},a:{pattern:"[a-zA-Z]",negate:"[^a-zA-Z]",transform:e=>e.toLocaleLowerCase()},X:{pattern:"[0-9a-zA-Z]",negate:"[^0-9a-zA-Z]",transform:e=>e.toLocaleUpperCase()},x:{pattern:"[0-9a-zA-Z]",negate:"[^0-9a-zA-Z]",transform:e=>e.toLocaleLowerCase()}},tt=Object.keys(he);tt.forEach(e=>{he[e].regex=new RegExp(he[e].pattern)});const on=new RegExp("\\\\([^.*+?^${}()|([\\]])|([.*+?^${}()|[\\]])|(["+tt.join("")+"])|(.)","g"),nt=/[.*+?^${}()|[\]\\]/g,j=String.fromCharCode(1),rn={mask:String,reverseFillMask:Boolean,fillMask:[Boolean,String],unmaskedValue:Boolean};function un(e,n,o,l){let a,u,i,c,_,x;const h=t.ref(null),y=t.ref(q());function p(){return e.autogrow===!0||["textarea","text","search","url","tel","password"].includes(e.type)}t.watch(()=>e.type+e.autogrow,V),t.watch(()=>e.mask,d=>{if(d!==void 0)k(y.value,!0);else{const f=R(y.value);V(),e.modelValue!==f&&n("update:modelValue",f)}}),t.watch(()=>e.fillMask+e.reverseFillMask,()=>{h.value===!0&&k(y.value,!0)}),t.watch(()=>e.unmaskedValue,()=>{h.value===!0&&k(y.value)});function q(){if(V(),h.value===!0){const d=P(R(e.modelValue));return e.fillMask!==!1?$(d):d}return e.modelValue}function B(d){if(d<a.length)return a.slice(-d);let f="",b=a;const s=b.indexOf(j);if(s!==-1){for(let g=d-b.length;g>0;g--)f+=j;b=b.slice(0,s)+f+b.slice(s)}return b}function V(){if(h.value=e.mask!==void 0&&e.mask.length!==0&&p(),h.value===!1){c=void 0,a="",u="";return}const d=et[e.mask]===void 0?e.mask:et[e.mask],f=typeof e.fillMask=="string"&&e.fillMask.length!==0?e.fillMask.slice(0,1):"_",b=f.replace(nt,"\\$&"),s=[],g=[],r=[];let w=e.reverseFillMask===!0,C="",T="";d.replace(on,(L,m,I,H,U)=>{if(H!==void 0){const z=he[H];r.push(z),T=z.negate,w===!0&&(g.push("(?:"+T+"+)?("+z.pattern+"+)?(?:"+T+"+)?("+z.pattern+"+)?"),w=!1),g.push("(?:"+T+"+)?("+z.pattern+")?")}else if(I!==void 0)C="\\"+(I==="\\"?"":I),r.push(I),s.push("([^"+C+"]+)?"+C+"?");else{const z=m!==void 0?m:U;C=z==="\\"?"\\\\\\\\":z.replace(nt,"\\\\$&"),r.push(z),s.push("([^"+C+"]+)?"+C+"?")}});const v=new RegExp("^"+s.join("")+"("+(C===""?".":"[^"+C+"]")+"+)?"+(C===""?"":"["+C+"]*")+"$"),S=g.length-1,O=g.map((L,m)=>m===0&&e.reverseFillMask===!0?new RegExp("^"+b+"*"+L):m===S?new RegExp("^"+L+"("+(T===""?".":T)+"+)?"+(e.reverseFillMask===!0?"$":b+"*")):new RegExp("^"+L));i=r,c=L=>{const m=v.exec(e.reverseFillMask===!0?L:L.slice(0,r.length+1));m!==null&&(L=m.slice(1).join(""));const I=[],H=O.length;for(let U=0,z=L;U<H;U++){const te=O[U].exec(z);if(te===null)break;z=z.slice(te.shift().length),I.push(...te)}return I.length!==0?I.join(""):L},a=r.map(L=>typeof L=="string"?L:j).join(""),u=a.split(j).join(f)}function k(d,f,b){const s=l.value,g=s.selectionEnd,r=s.value.length-g,w=R(d);f===!0&&V();const C=P(w),T=e.fillMask!==!1?$(C):C,v=y.value!==T;s.value!==T&&(s.value=T),v===!0&&(y.value=T),document.activeElement===s&&t.nextTick(()=>{if(T===u){const O=e.reverseFillMask===!0?u.length:0;s.setSelectionRange(O,O,"forward");return}if(b==="insertFromPaste"&&e.reverseFillMask!==!0){const O=s.selectionEnd;let L=g-1;for(let m=_;m<=L&&m<O;m++)a[m]!==j&&L++;M.right(s,L);return}if(["deleteContentBackward","deleteContentForward"].indexOf(b)!==-1){const O=e.reverseFillMask===!0?g===0?T.length>C.length?1:0:Math.max(0,T.length-(T===u?0:Math.min(C.length,r)+1))+1:g;s.setSelectionRange(O,O,"forward");return}if(e.reverseFillMask===!0)if(v===!0){const O=Math.max(0,T.length-(T===u?0:Math.min(C.length,r+1)));O===1&&g===1?s.setSelectionRange(O,O,"forward"):M.rightReverse(s,O)}else{const O=T.length-r;s.setSelectionRange(O,O,"backward")}else if(v===!0){const O=Math.max(0,a.indexOf(j),Math.min(C.length,g)-1);M.right(s,O)}else{const O=g-1;M.right(s,O)}});const S=e.unmaskedValue===!0?R(T):T;String(e.modelValue)!==S&&(e.modelValue!==null||S!=="")&&o(S,!0)}function F(d,f,b){const s=P(R(d.value));f=Math.max(0,a.indexOf(j),Math.min(s.length,f)),_=f,d.setSelectionRange(f,b,"forward")}const M={left(d,f){const b=a.slice(f-1).indexOf(j)===-1;let s=Math.max(0,f-1);for(;s>=0;s--)if(a[s]===j){f=s,b===!0&&f++;break}if(s<0&&a[f]!==void 0&&a[f]!==j)return M.right(d,0);f>=0&&d.setSelectionRange(f,f,"backward")},right(d,f){const b=d.value.length;let s=Math.min(b,f+1);for(;s<=b;s++)if(a[s]===j){f=s;break}else a[s-1]===j&&(f=s);if(s>b&&a[f-1]!==void 0&&a[f-1]!==j)return M.left(d,b);d.setSelectionRange(f,f,"forward")},leftReverse(d,f){const b=B(d.value.length);let s=Math.max(0,f-1);for(;s>=0;s--)if(b[s-1]===j){f=s;break}else if(b[s]===j&&(f=s,s===0))break;if(s<0&&b[f]!==void 0&&b[f]!==j)return M.rightReverse(d,0);f>=0&&d.setSelectionRange(f,f,"backward")},rightReverse(d,f){const b=d.value.length,s=B(b),g=s.slice(0,f+1).indexOf(j)===-1;let r=Math.min(b,f+1);for(;r<=b;r++)if(s[r-1]===j){f=r,f>0&&g===!0&&f--;break}if(r>b&&s[f-1]!==void 0&&s[f-1]!==j)return M.leftReverse(d,b);d.setSelectionRange(f,f,"forward")}};function N(d){n("click",d),x=void 0}function A(d){if(n("keydown",d),Fe(d)===!0||d.altKey===!0)return;const f=l.value,b=f.selectionStart,s=f.selectionEnd;if(d.shiftKey||(x=void 0),d.keyCode===37||d.keyCode===39){d.shiftKey&&x===void 0&&(x=f.selectionDirection==="forward"?b:s);const g=M[(d.keyCode===39?"right":"left")+(e.reverseFillMask===!0?"Reverse":"")];if(d.preventDefault(),g(f,x===b?s:b),d.shiftKey){const r=f.selectionStart;f.setSelectionRange(Math.min(x,r),Math.max(x,r),"forward")}}else d.keyCode===8&&e.reverseFillMask!==!0&&b===s?(M.left(f,b),f.setSelectionRange(f.selectionStart,s,"backward")):d.keyCode===46&&e.reverseFillMask===!0&&b===s&&(M.rightReverse(f,s),f.setSelectionRange(b,f.selectionEnd,"forward"))}function P(d){if(d==null||d==="")return"";if(e.reverseFillMask===!0)return E(d);const f=i;let b=0,s="";for(let g=0;g<f.length;g++){const r=d[b],w=f[g];if(typeof w=="string")s+=w,r===w&&b++;else if(r!==void 0&&w.regex.test(r))s+=w.transform!==void 0?w.transform(r):r,b++;else return s}return s}function E(d){const f=i,b=a.indexOf(j);let s=d.length-1,g="";for(let r=f.length-1;r>=0&&s!==-1;r--){const w=f[r];let C=d[s];if(typeof w=="string")g=w+g,C===w&&s--;else if(C!==void 0&&w.regex.test(C))do g=(w.transform!==void 0?w.transform(C):C)+g,s--,C=d[s];while(b===r&&C!==void 0&&w.regex.test(C));else return g}return g}function R(d){return typeof d!="string"||c===void 0?typeof d=="number"?c(""+d):d:c(d)}function $(d){return u.length-d.length<=0?d:e.reverseFillMask===!0&&d.length!==0?u.slice(0,-d.length)+d:d+u.slice(d.length)}return{innerValue:y,hasMask:h,moveCursorForPaste:F,updateMaskValue:k,onMaskedKeydown:A,onMaskedClick:N}}const sn={name:String};function cn(e){return t.computed(()=>e.name||e.for)}function dn(e,n){function o(){const l=e.modelValue;try{const a="DataTransfer"in window?new DataTransfer:"ClipboardEvent"in window?new ClipboardEvent("").clipboardData:void 0;return Object(l)===l&&("length"in l?Array.from(l):[l]).forEach(u=>{a.items.add(u)}),{files:a.files}}catch{return{files:void 0}}}return n===!0?t.computed(()=>{if(e.type==="file")return o()}):t.computed(o)}const fn=/[\u3000-\u303f\u3040-\u309f\u30a0-\u30ff\uff00-\uff9f\u4e00-\u9faf\u3400-\u4dbf]/,mn=/[\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,gn=/[\u3131-\u314e\u314f-\u3163\uac00-\ud7a3]/,hn=/[a-z0-9_ -]$/i;function vn(e){return function(o){if(o.type==="compositionend"||o.type==="change"){if(o.target.qComposing!==!0)return;o.target.qComposing=!1,e(o)}else o.type==="compositionupdate"&&o.target.qComposing!==!0&&typeof o.data=="string"&&(fe.is.firefox===!0?hn.test(o.data)===!1:fn.test(o.data)===!0||mn.test(o.data)===!0||gn.test(o.data)===!0)===!0&&(o.target.qComposing=!0)}}const bn=Q({name:"QInput",inheritAttrs:!1,props:{...tn,...rn,...sn,modelValue:[String,Number,FileList],shadowText:String,type:{type:String,default:"text"},debounce:[String,Number],autogrow:Boolean,inputClass:[Array,String,Object],inputStyle:[Array,String,Object]},emits:[...nn,"paste","change","keydown","click","animationend"],setup(e,{emit:n,attrs:o}){const{proxy:l}=t.getCurrentInstance(),{$q:a}=l,u={};let i=NaN,c,_,x=null,h;const y=t.ref(null),p=cn(e),{innerValue:q,hasMask:B,moveCursorForPaste:V,updateMaskValue:k,onMaskedKeydown:F,onMaskedClick:M}=un(e,n,C,y),N=dn(e,!0),A=t.computed(()=>qe(q.value)),P=vn(r),E=an({changeEvent:!0}),R=t.computed(()=>e.type==="textarea"||e.autogrow===!0),$=t.computed(()=>R.value===!0||["text","search","url","tel","password"].includes(e.type)),d=t.computed(()=>{const m={...E.splitAttrs.listeners.value,onInput:r,onPaste:g,onChange:v,onBlur:S,onFocus:ue};return m.onCompositionstart=m.onCompositionupdate=m.onCompositionend=P,B.value===!0&&(m.onKeydown=F,m.onClick=M),e.autogrow===!0&&(m.onAnimationend=w),m}),f=t.computed(()=>{const m={tabindex:0,"data-autofocus":e.autofocus===!0||void 0,rows:e.type==="textarea"?6:void 0,"aria-label":e.label,name:p.value,...E.splitAttrs.attributes.value,id:E.targetUid.value,maxlength:e.maxlength,disabled:e.disable===!0,readonly:e.readonly===!0};return R.value===!1&&(m.type=e.type),e.autogrow===!0&&(m.rows=1),m});t.watch(()=>e.type,()=>{y.value&&(y.value.value=e.modelValue)}),t.watch(()=>e.modelValue,m=>{if(B.value===!0){if(_===!0&&(_=!1,String(m)===i))return;k(m)}else q.value!==m&&(q.value=m,e.type==="number"&&u.hasOwnProperty("value")===!0&&(c===!0?c=!1:delete u.value));e.autogrow===!0&&t.nextTick(T)}),t.watch(()=>e.autogrow,m=>{m===!0?t.nextTick(T):y.value!==null&&o.rows>0&&(y.value.style.height="auto")}),t.watch(()=>e.dense,()=>{e.autogrow===!0&&t.nextTick(T)});function b(){Ge(()=>{const m=document.activeElement;y.value!==null&&y.value!==m&&(m===null||m.id!==E.targetUid.value)&&y.value.focus({preventScroll:!0})})}function s(){y.value!==null&&y.value.select()}function g(m){if(B.value===!0&&e.reverseFillMask!==!0){const I=m.target;V(I,I.selectionStart,I.selectionEnd)}n("paste",m)}function r(m){if(!m||!m.target)return;if(e.type==="file"){n("update:modelValue",m.target.files);return}const I=m.target.value;if(m.target.qComposing===!0){u.value=I;return}if(B.value===!0)k(I,!1,m.inputType);else if(C(I),$.value===!0&&m.target===document.activeElement){const{selectionStart:H,selectionEnd:U}=m.target;H!==void 0&&U!==void 0&&t.nextTick(()=>{m.target===document.activeElement&&I.indexOf(m.target.value)===0&&m.target.setSelectionRange(H,U)})}e.autogrow===!0&&T()}function w(m){n("animationend",m),T()}function C(m,I){h=()=>{x=null,e.type!=="number"&&u.hasOwnProperty("value")===!0&&delete u.value,e.modelValue!==m&&i!==m&&(i=m,I===!0&&(_=!0),n("update:modelValue",m),t.nextTick(()=>{i===m&&(i=NaN)})),h=void 0},e.type==="number"&&(c=!0,u.value=m),e.debounce!==void 0?(x!==null&&clearTimeout(x),u.value=m,x=setTimeout(h,e.debounce)):h()}function T(){requestAnimationFrame(()=>{const m=y.value;if(m!==null){const I=m.parentNode.style,{scrollTop:H}=m,{overflowY:U,maxHeight:z}=a.platform.is.firefox===!0?{}:window.getComputedStyle(m),te=U!==void 0&&U!=="scroll";te===!0&&(m.style.overflowY="hidden"),I.marginBottom=m.scrollHeight-1+"px",m.style.height="1px",m.style.height=m.scrollHeight+"px",te===!0&&(m.style.overflowY=parseInt(z,10)<m.scrollHeight?"auto":"hidden"),I.marginBottom="",m.scrollTop=H}})}function v(m){P(m),x!==null&&(clearTimeout(x),x=null),h!==void 0&&h(),n("change",m.target.value)}function S(m){m!==void 0&&ue(m),x!==null&&(clearTimeout(x),x=null),h!==void 0&&h(),c=!1,_=!1,delete u.value,e.type!=="file"&&setTimeout(()=>{y.value!==null&&(y.value.value=q.value!==void 0?q.value:"")})}function O(){return u.hasOwnProperty("value")===!0?u.value:q.value!==void 0?q.value:""}t.onBeforeUnmount(()=>{S()}),t.onMounted(()=>{e.autogrow===!0&&T()}),Object.assign(E,{innerValue:q,fieldClass:t.computed(()=>`q-${R.value===!0?"textarea":"input"}`+(e.autogrow===!0?" q-textarea--autogrow":"")),hasShadow:t.computed(()=>e.type!=="file"&&typeof e.shadowText=="string"&&e.shadowText.length!==0),inputRef:y,emitValue:C,hasValue:A,floatingLabel:t.computed(()=>A.value===!0&&(e.type!=="number"||isNaN(q.value)===!1)||qe(e.displayValue)),getControl:()=>t.h(R.value===!0?"text