@quidgest/ui 0.18.0 → 0.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +79 -0
- package/dist/json/api.json +136 -129
- package/dist/manifest/components.json +2 -1
- package/dist/ui.css +242 -155
- package/dist/ui.esm.js +365 -343
- package/dist/ui.js +121 -99
- package/dist/ui.min.css +1 -1
- package/dist/ui.min.js +121 -99
- package/dist/ui.scss +225 -151
- package/esm/components/QGrid/QCol.vue.js +1 -1
- package/esm/components/{QGroupBox/QGroupBox.d.ts → QSection/QSection.d.ts} +4 -4
- package/esm/components/QSection/QSection.d.ts.map +1 -0
- package/esm/components/{QGroupBox/QGroupBox.vue.js → QSection/QSection.vue.js} +8 -8
- package/esm/components/QSection/QSection2.vue.js +5 -0
- package/esm/components/{QGroupBox → QSection}/index.d.ts +8 -8
- package/esm/components/QSection/index.d.ts.map +1 -0
- package/esm/components/QSection/index.js +6 -0
- package/esm/components/QSection/types.d.ts +32 -0
- package/esm/components/QSection/types.d.ts.map +1 -0
- package/esm/components/QSidebar/QSidebar.d.ts +53 -6
- package/esm/components/QSidebar/QSidebar.d.ts.map +1 -1
- package/esm/components/QSidebar/QSidebar.vue.js +76 -106
- package/esm/components/QSidebar/QSidebarAnchor.d.ts +24 -210
- package/esm/components/QSidebar/QSidebarAnchor.d.ts.map +1 -1
- package/esm/components/QSidebar/QSidebarAnchor.vue.js +47 -59
- package/esm/components/QSidebar/QSidebarItem.d.ts +213 -0
- package/esm/components/QSidebar/QSidebarItem.d.ts.map +1 -0
- package/esm/components/QSidebar/QSidebarItem.vue.js +130 -0
- package/esm/components/QSidebar/QSidebarItem2.vue.js +5 -0
- package/esm/components/QSidebar/QSidebarPanel.d.ts +1 -7
- package/esm/components/QSidebar/QSidebarPanel.d.ts.map +1 -1
- package/esm/components/QSidebar/QSidebarPanel.vue.js +4 -10
- package/esm/components/QSidebar/context.d.ts +108 -0
- package/esm/components/QSidebar/context.d.ts.map +1 -0
- package/esm/components/QSidebar/context.js +4 -0
- package/esm/components/QSidebar/index.d.ts +166 -8
- package/esm/components/QSidebar/index.d.ts.map +1 -1
- package/esm/components/QSidebar/index.js +3 -2
- package/esm/components/QSidebar/types.d.ts +77 -42
- package/esm/components/QSidebar/types.d.ts.map +1 -1
- package/esm/components/QTabs/QTab.d.ts +1 -0
- package/esm/components/QTabs/QTab.d.ts.map +1 -1
- package/esm/components/QTabs/QTab.vue.js +2 -1
- package/esm/components/QTabs/QTabs.d.ts +2 -0
- package/esm/components/QTabs/QTabs.d.ts.map +1 -1
- package/esm/components/QTabs/QTabs.vue.js +125 -46
- package/esm/components/QTabs/context.d.ts +10 -3
- package/esm/components/QTabs/context.d.ts.map +1 -1
- package/esm/components/QTabs/index.d.ts +2 -0
- package/esm/components/QTabs/index.d.ts.map +1 -1
- package/esm/components/QTabs/types.d.ts +3 -1
- package/esm/components/QTabs/types.d.ts.map +1 -1
- package/esm/components/index.d.ts +1 -1
- package/esm/components/index.d.ts.map +1 -1
- package/esm/components/index.js +41 -40
- package/esm/index.d.ts +2 -1
- package/package.json +7 -6
- package/esm/components/QGroupBox/QGroupBox.d.ts.map +0 -1
- package/esm/components/QGroupBox/QGroupBox2.vue.js +0 -5
- package/esm/components/QGroupBox/index.d.ts.map +0 -1
- package/esm/components/QGroupBox/index.js +0 -6
- package/esm/components/QGroupBox/types.d.ts +0 -32
- package/esm/components/QGroupBox/types.d.ts.map +0 -1
package/dist/ui.esm.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Quidgest UI v0.
|
|
2
|
+
* Quidgest UI v0.19.0
|
|
3
3
|
* (c) 2026 Quidgest - Consultores de Gestão, S.A.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import{Fragment as e,Teleport as t,Transition as l,TransitionGroup as a,computed as n,createBlock as o,createCommentVNode as i,createElementBlock as s,createElementVNode as r,createSlots as u,createTextVNode as d,createVNode as c,defineComponent as v,getCurrentInstance as
|
|
6
|
+
import{Fragment as e,Teleport as t,Transition as l,TransitionGroup as a,computed as n,createBlock as o,createCommentVNode as i,createElementBlock as s,createElementVNode as r,createSlots as u,createTextVNode as d,createVNode as c,defineComponent as v,getCurrentInstance as f,guardReactiveProps as p,h as m,inject as h,isRef as b,mergeModels as g,mergeProps as y,nextTick as k,normalizeClass as _,normalizeProps as q,normalizeStyle as w,onBeforeMount as x,onBeforeUnmount as $,onMounted as M,onUnmounted as B,openBlock as C,provide as L,reactive as D,ref as E,renderList as S,renderSlot as V,resolveComponent as A,resolveDynamicComponent as Q,shallowRef as z,toDisplayString as I,toHandlers as T,toRef as P,toValue as F,unref as R,useAttrs as H,useId as U,useModel as W,useSlots as O,useTemplateRef as N,vModelCheckbox as j,vModelDynamic as Y,vModelText as G,vShow as K,watch as X,watchEffect as Z,withCtx as J,withDirectives as ee,withKeys as te,withModifiers as le}from"vue"
|
|
7
7
|
var ae=Object.defineProperty,ne=(e,t)=>{let l={}
|
|
8
8
|
for(var a in e)ae(l,a,{get:e[a],enumerable:!0})
|
|
9
9
|
return t||ae(l,Symbol.toStringTag,{value:"Module"}),l},oe={primary:"#008ad2",primaryLight:"#cde5ff",primaryDark:"#006398",secondary:"#001d31",secondaryLight:"#e6eef3",secondaryDark:"#001425",highlight:"#ff8241",highlightLight:"#ffe4d6",highlightDark:"#cc4700",info:"#17a2b8",infoLight:"#bceff7",infoDark:"#11798a",success:"#28a745",successLight:"#c2f0cd",successDark:"#1e7d34",warning:"#ffa900",warningLight:"#ffeabf",warningDark:"#bf7f00",danger:"#b71c1c",dangerLight:"#f7cccc",dangerDark:"#891515",background:"#fff",container:"#fff",neutral:"#7c858d",neutralLight:"#c4c5ca",neutralDark:"#40474f",onPrimary:"#fff",onPrimaryLight:"#202428",onPrimaryDark:"#fff",onSecondary:"#fff",onSecondaryLight:"#202428",onSecondaryDark:"#fff",onHighlight:"#fff",onHighlightLight:"#202428",onHighlightDark:"#fff",onInfo:"#fff",onInfoLight:"#202428",onInfoDark:"#fff",onSuccess:"#fff",onSuccessLight:"#202428",onSuccessDark:"#fff",onWarning:"#fff",onWarningLight:"#202428",onWarningDark:"#fff",onDanger:"#fff",onDangerLight:"#202428",onDangerDark:"#fff",onBackground:"#202428",onContainer:"#202428",onNeutral:"#fff",onNeutralLight:"#202428",onNeutralDark:"#fff"},ie={primary:"#4da6e0",primaryLight:"#1a2832",primaryDark:"#87c5f0",secondary:"#b8d4e6",secondaryLight:"#1a2832",secondaryDark:"#e6f2ff",highlight:"#ff9966",highlightLight:"#2d1a0f",highlightDark:"#ffb899",info:"#4cb8d1",infoLight:"#1f2a2d",infoDark:"#7dcce0",success:"#5cb85c",successLight:"#1e2a20",successDark:"#85d085",warning:"#ffcc4d",warningLight:"#332a1a",warningDark:"#ffd966",danger:"#e74c3c",dangerLight:"#2d1a1a",dangerDark:"#f17066",background:"#121212",container:"#1e1e1e",neutral:"#9ca3ab",neutralLight:"#2a2d31",neutralDark:"#c8ced6",onPrimary:"#000",onPrimaryLight:"#e0e0e0",onPrimaryDark:"#000",onSecondary:"#000",onSecondaryLight:"#e0e0e0",onSecondaryDark:"#000",onHighlight:"#000",onHighlightLight:"#e0e0e0",onHighlightDark:"#000",onInfo:"#000",onInfoLight:"#e0e0e0",onInfoDark:"#000",onSuccess:"#000",onSuccessLight:"#e0e0e0",onSuccessDark:"#000",onWarning:"#000",onWarningLight:"#e0e0e0",onWarningDark:"#000",onDanger:"#000",onDangerLight:"#e0e0e0",onDangerDark:"#000",onBackground:"#e0e0e0",onContainer:"#e0e0e0",onNeutral:"#000",onNeutralLight:"#e0e0e0",onNeutralDark:"#000"},se=/* @__PURE__ */ne({defaultDarkColorScheme:()=>ie,defaultLightColorScheme:()=>oe})
|
|
@@ -12,30 +12,30 @@ for(const n of a){if("__proto__"===n||"constructor"===n||"prototype"===n)continu
|
|
|
12
12
|
const a=e[n],o=t[n]
|
|
13
13
|
ue(a)&&ue(o)?l[n]=de(a,o):l[n]=void 0!==o?o:a}return l}var ce="q-defaults"
|
|
14
14
|
function ve(e){if(re(e))return
|
|
15
|
-
const t=
|
|
16
|
-
L(ce,n(()=>re(l.value)?t.value:de(t.value,l.value)))}function
|
|
15
|
+
const t=fe(),l=E(F(e))
|
|
16
|
+
L(ce,n(()=>re(l.value)?t.value:de(t.value,l.value)))}function fe(){const e=h(ce,void 0)
|
|
17
17
|
if(!e)throw new Error("[Quidgest UI] Could not find defaults instance")
|
|
18
|
-
return e}var
|
|
19
|
-
function me(e){const t={active:E(
|
|
20
|
-
return
|
|
18
|
+
return e}var pe=Symbol.for("q-group")
|
|
19
|
+
function me(e){const t={active:E(be(e)),multiple:n(()=>R(e.multiple)||!1),required:n(()=>R(e.required)||!1)}
|
|
20
|
+
return b(e.active)&&X(e.active,e=>{t.active.value=e}),X(()=>t.multiple.value,e=>{e?t.active.value?t.active.value=[t.active.value]:t.active.value=[]:Array.isArray(t.active.value)&&1===t.active.value.length?t.active.value=t.active.value[0]:t.active.value=void 0}),L(pe,t),t}function he(e){const t=h(pe,void 0)
|
|
21
21
|
if(!t)return
|
|
22
|
-
const l=n(()=>{const l=
|
|
22
|
+
const l=n(()=>{const l=R(e)
|
|
23
23
|
return Array.isArray(t.active.value)?t.active.value?.includes(l):t.active.value===l})
|
|
24
|
-
return{isActive:l,toggle:()=>{const a=
|
|
25
|
-
Array.isArray(t.active.value)?l.value?(!t.required?.value||t.active.value.length>1)&&(t.active.value=t.active.value?.filter(e=>e!==a)):t.active.value=[...t.active.value,a]:t.active.value!==a?t.active.value=a:t.required?.value||(t.active.value=void 0)}}}function
|
|
26
|
-
return t?Array.isArray(l)?l:void 0!==l?[l]:[]:Array.isArray(l)?1===l.length?l[0]:void 0:l}var
|
|
24
|
+
return{isActive:l,toggle:()=>{const a=R(e)
|
|
25
|
+
Array.isArray(t.active.value)?l.value?(!t.required?.value||t.active.value.length>1)&&(t.active.value=t.active.value?.filter(e=>e!==a)):t.active.value=[...t.active.value,a]:t.active.value!==a?t.active.value=a:t.required?.value||(t.active.value=void 0)}}}function be(e){const t=R(e.multiple),l=R(e.active)
|
|
26
|
+
return t?Array.isArray(l)?l:void 0!==l?[l]:[]:Array.isArray(l)?1===l.length?l[0]:void 0:l}var ge=["id"],ye=/*@__PURE__*/v({__name:"QAccordion",props:/*@__PURE__*/g({id:{},class:{},variant:{},spacing:{},iconRight:{type:Boolean},multiple:{type:Boolean}},{modelValue:{type:[String,Number,Boolean,Symbol,Array]},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e
|
|
27
27
|
ve({QCollapsible:{iconRight:P(t,"iconRight"),spacing:P(t,"spacing"),variant:P(t,"variant"),width:"block"}})
|
|
28
|
-
const l=
|
|
29
|
-
return X(a,e=>{l.value=e}),(e,l)=>(C(),s("div",{id:t.id,class:_(["q-accordion",t.class])},[
|
|
28
|
+
const l=W(e,"modelValue"),{active:a}=me({active:l,multiple:P(t,"multiple")})
|
|
29
|
+
return X(a,e=>{l.value=e}),(e,l)=>(C(),s("div",{id:t.id,class:_(["q-accordion",t.class])},[V(e.$slots,"default")],10,ge))}}),ke={chevron:{icon:"chevron-down"}},_e={required:"required"},qe={...ke},we={..._e},xe=["id"]
|
|
30
30
|
function $e(e){return function(e){return e.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/([0-9])([a-zA-Z])/g,"$1 $2").replace(/([a-zA-Z])([0-9])/g,"$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1 $2").trim().split(/\s+/)}(e).join("-").toLowerCase()}function Me(e){const t=e,l=t.setup
|
|
31
|
-
return l?(t.setup=(e,t)=>{const a=function(){const e=
|
|
31
|
+
return l?(t.setup=(e,t)=>{const a=function(){const e=f()
|
|
32
32
|
if(!e)throw new Error("[Quidgest UI] useDefaults must be called from inside a setup function")
|
|
33
33
|
const t=e.type.name??e.type.__name
|
|
34
34
|
if(!t)throw new Error("[Quidgest UI] Could not determine component name")
|
|
35
|
-
const l=
|
|
35
|
+
const l=fe(),a=l.value?.Global,o=l.value?.[t]
|
|
36
36
|
return n(()=>de(a,o))}()
|
|
37
37
|
if(re(a.value))return l(e,t)
|
|
38
|
-
const o=
|
|
38
|
+
const o=f()
|
|
39
39
|
return l(null===o?e:new Proxy(e,{get(e,t){const l=Reflect.get(e,t),n=a.value?.[t]
|
|
40
40
|
return"string"!=typeof t||function(e,t){const l=$e(t)
|
|
41
41
|
return!!l&&void 0!==e.props?.[l]}(o.vnode,t)?l:n??l}}),t)},e):e}var Be=Me(/*@__PURE__*/v({__name:"QSpinnerLoader",props:{id:{},class:{},size:{default:48}},setup(e){const t=e,l=n(()=>({"font-size":48!==t.size?`${t.size}px`:void 0}))
|
|
@@ -53,66 +53,66 @@ case a:s=(t-l)/e+4}s/=6}return{h:Math.round(360*s),s:Math.round(100*i),l:Math.ro
|
|
|
53
53
|
let n,o,i
|
|
54
54
|
if(0===l)n=o=i=a
|
|
55
55
|
else{const e=a<.5?a*(1+l):a+l-a*l,s=2*a-e
|
|
56
|
-
n=De(s,e,t+1/3),o=De(s,e,t),i=De(s,e,t-1/3)}return{r:Math.round(255*n),g:Math.round(255*o),b:Math.round(255*i)}}function De(e,t,l){return l<0&&(l+=1),l>1&&(l-=1),l<1/6?e+6*(t-e)*l:l<.5?t:l<2/3?e+(t-e)*(2/3-l)*6:e}function Ee(e){return`#${e.r.toString(16).padStart(2,"0")}${e.g.toString(16).padStart(2,"0")}${e.b.toString(16).padStart(2,"0")}`}function
|
|
57
|
-
if(t)return{r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10)}}function Qe(e){if(
|
|
56
|
+
n=De(s,e,t+1/3),o=De(s,e,t),i=De(s,e,t-1/3)}return{r:Math.round(255*n),g:Math.round(255*o),b:Math.round(255*i)}}function De(e,t,l){return l<0&&(l+=1),l>1&&(l-=1),l<1/6?e+6*(t-e)*l:l<.5?t:l<2/3?e+(t-e)*(2/3-l)*6:e}function Ee(e){return`#${e.r.toString(16).padStart(2,"0")}${e.g.toString(16).padStart(2,"0")}${e.b.toString(16).padStart(2,"0")}`}function Se(e){return`${e.r} ${e.g} ${e.b}`}function Ve(e,t=!1){return t?/^#[a-fA-F0-9]{6}$/.test(e):/^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/.test(e)}function Ae(e){const t=e.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/)
|
|
57
|
+
if(t)return{r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10)}}function Qe(e){if(Ve(e))return 4===e.length&&(e="#"+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]),{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16)}
|
|
58
58
|
{const t=Ae(e)
|
|
59
|
-
if(t)return t}throw new Error("Invalid color format")}function
|
|
60
|
-
return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,Ee(t)}function
|
|
59
|
+
if(t)return t}throw new Error("Invalid color format")}function ze(e){return e>50?"#000":"#fff"}function Ie(e){const t=Qe(e)
|
|
60
|
+
return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,Ee(t)}function Te(e,t){if(t<0||t>100)throw new Error("Amount must be in the range [0, 100]")
|
|
61
61
|
if(0===t)return e
|
|
62
62
|
const l=Ce(e),a=t/100
|
|
63
63
|
return l.l=l.l+a*(100-l.l),Le(l)}function Pe(e,t){if(t<0||t>100)throw new Error("Amount must be in the range [0, 100]")
|
|
64
64
|
if(0===t)return e
|
|
65
65
|
const l=Ce(e),a=t/100
|
|
66
|
-
return l.l=l.l-a*l.l,Le(l)}function Fe(e,t){const l={...e},a=(e,t)=>{const l=Qe(e),a=Ee(
|
|
67
|
-
return{[o]:e,[`${o}Light`]:a,[`${o}Dark`]:n}},n=e=>
|
|
66
|
+
return l.l=l.l-a*l.l,Le(l)}function Fe(e,t){const l={...e},a=(e,t)=>{const l=Qe(e),a=Ee(Te(l,85)),n=Ee(Pe(l,25)),o=t.toString().replace(/(Light|Dark)$/,"")
|
|
67
|
+
return{[o]:e,[`${o}Light`]:a,[`${o}Dark`]:n}},n=e=>ze(Ce(Qe(e)).l)
|
|
68
68
|
for(const o of["primary","secondary","highlight","info","success","warning","danger","neutral"]){const e=o,i=`${o}Light`,s=`${o}Dark`,r=`on${o.charAt(0).toUpperCase()+o.slice(1)}`,u=`on${o.charAt(0).toUpperCase()+o.slice(1)}Light`,d=`on${o.charAt(0).toUpperCase()+o.slice(1)}Dark`
|
|
69
69
|
if(t[e]){const o=a(t[e],e)
|
|
70
70
|
Object.assign(l,o),l[r]=n(t[e]),l[u]=n(o[i]),l[d]=n(o[s])}t[e]||(t[i]&&(l[i]=t[i],t[u]||(l[u]=n(t[i]))),t[s]&&(l[s]=t[s],t[d]||(l[d]=n(t[s])))),t[r]&&(l[r]=t[r]),t[u]&&(l[u]=t[u]),t[d]&&(l[d]=t[d])}if(t.primary&&!t.highlight){const e=Ie(t.primary),o=a(e,"highlight")
|
|
71
71
|
Object.assign(l,o),l.onHighlight=n(e),l.onHighlightLight=n(o.highlightLight),l.onHighlightDark=n(o.highlightDark)}for(const o of["background","container"])if(t[o]){l[o]=t[o]
|
|
72
72
|
const e=`on${o.charAt(0).toUpperCase()+o.slice(1)}`
|
|
73
|
-
t[e]||(l[e]=n(t[o]))}return t.onBackground&&(l.onBackground=t.onBackground),t.onContainer&&(l.onContainer=t.onContainer),l}var
|
|
74
|
-
function
|
|
73
|
+
t[e]||(l[e]=n(t[o]))}return t.onBackground&&(l.onBackground=t.onBackground),t.onContainer&&(l.onContainer=t.onContainer),l}var Re="q-theme"
|
|
74
|
+
function He(e){let t=`.${Ne(e.name)} {\n`
|
|
75
75
|
const l=e.scheme
|
|
76
76
|
let a
|
|
77
77
|
for(a in l){const e=l[a]
|
|
78
|
-
if(e){t+=` ${
|
|
78
|
+
if(e){t+=` ${We(a)}: ${e};\n`
|
|
79
79
|
const l=Qe(e)
|
|
80
|
-
t+=` ${
|
|
81
|
-
return e||(e=document.createElement("style"),e.id=
|
|
80
|
+
t+=` ${We(a)}-rgb: ${l.r} ${l.g} ${l.b};\n`}}return t+="}\n",t}function Ue(e){const t=e.map(He).join("\n");(function(){let e=document.getElementById(Re)
|
|
81
|
+
return e||(e=document.createElement("style"),e.id=Re,document.head.appendChild(e)),e}()).textContent=t}function We(e){return e?`--q-theme-${$e(e)}`:""}function Oe(e,t){const l=n(()=>{const l=t.value.find(t=>t.name===e.value)
|
|
82
82
|
if(!l)throw new Error(`[Quidgest UI] Theme "${e.value}" not found`)
|
|
83
83
|
return l})
|
|
84
|
-
return{name:e,current:l,themes:t,class:n(()=>Ne(l.value.name)),css:n(()=>
|
|
84
|
+
return{name:e,current:l,themes:t,class:n(()=>Ne(l.value.name)),css:n(()=>He(l.value))}}function Ne(e){return`q-theme--${$e(e)}`}var je=Symbol.for("q-theme")
|
|
85
85
|
function Ye(){const e=h(je)
|
|
86
86
|
if(!e)throw new Error("[Quidgest UI] Could not find theme instance")
|
|
87
|
-
return e}function Ge(e){const{themes:t}=Ye(),l=n(()=>F(e)),a=n(()=>"string"!=typeof l.value),o=
|
|
88
|
-
return L(je,o),o}function Ke(e){const t=n(()=>
|
|
87
|
+
return e}function Ge(e){const{themes:t}=Ye(),l=n(()=>F(e)),a=n(()=>"string"!=typeof l.value),o=Oe(n(()=>a.value?l.value.name:l.value),n(()=>a.value?[...t.value,l.value]:t.value))
|
|
88
|
+
return L(je,o),o}function Ke(e){const t=n(()=>R(e)),l=n(()=>!!t.value&&!function(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}(t.value))
|
|
89
89
|
return{isUtilityColor:l,style:n(()=>{const e=t.value
|
|
90
90
|
if(!e)return
|
|
91
91
|
let a=e
|
|
92
92
|
const n=Ye()
|
|
93
93
|
if(l.value){const t=e
|
|
94
94
|
a=n.current.value.scheme[t]??e}let o
|
|
95
|
-
try{if(o=Qe(a),!o)return}catch(u){return void console.error("Failed to parse color:",u)}const i=
|
|
96
|
-
return{mainColor:a,mainColorRgb:
|
|
97
|
-
function u(e){o.value||a("click",e)}const{isUtilityColor:v,style:
|
|
98
|
-
return["q-button",`q-button--${l.variant}`,e,t,a,{"q-button--labeled":l.label,"q-button--borderless":l.borderless,"q-button--elevated":l.elevated,"q-button--block":l.block,"q-button--loading":l.loading,"q-button--pill":l.pill},l.class]}),m=n(()=>{if(!v.value)return{"--q-button-main-color":
|
|
99
|
-
return(e,t)=>(C(),s("button",{id:l.id,type:"button",class:_(
|
|
100
|
-
function
|
|
101
|
-
case"font":return
|
|
95
|
+
try{if(o=Qe(a),!o)return}catch(u){return void console.error("Failed to parse color:",u)}const i=ze(Ce(o).l),s=Pe(o,25),r=Ee(s)
|
|
96
|
+
return{mainColor:a,mainColorRgb:Se(o),onMainColor:i,hoverColor:r,hoverColorRgb:Se(s),onHoverColor:i}})}}var Xe=["id","disabled"],Ze={key:0,class:"q-button__spinner"},Je={class:"q-button__content"},et=Me(/*@__PURE__*/v({__name:"QButton",props:{id:{},class:{},label:{},variant:{default:"outlined"},color:{default:"primary"},borderless:{type:Boolean},elevated:{type:Boolean},block:{type:Boolean},size:{default:"regular"},iconPos:{default:"start"},pill:{type:Boolean},disabled:{type:Boolean},loading:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const l=e,a=t,o=n(()=>l.disabled||l.loading)
|
|
97
|
+
function u(e){o.value||a("click",e)}const{isUtilityColor:v,style:f}=Ke(P(l,"color")),p=n(()=>{const e=v.value?`q-button--${l.color}`:void 0,t="regular"!==l.size?`q-button--${l.size}`:void 0,a="start"!==l.iconPos?`q-button--icon-${l.iconPos}`:void 0
|
|
98
|
+
return["q-button",`q-button--${l.variant}`,e,t,a,{"q-button--labeled":l.label,"q-button--borderless":l.borderless,"q-button--elevated":l.elevated,"q-button--block":l.block,"q-button--loading":l.loading,"q-button--pill":l.pill},l.class]}),m=n(()=>{if(!v.value)return{"--q-button-main-color":f.value?.mainColor,"--q-button-main-color-rgb":f.value?.mainColorRgb,"--q-button-on-main-color":f.value?.onMainColor,"--q-button-hover-color":f.value?.hoverColor,"--q-button-hover-color-rgb":f.value?.hoverColorRgb,"--q-button-on-hover-color":f.value?.onHoverColor}})
|
|
99
|
+
return(e,t)=>(C(),s("button",{id:l.id,type:"button",class:_(p.value),disabled:o.value,style:w(m.value),onClick:le(u,["stop","prevent"])},[l.loading?(C(),s("div",Ze,[c(R(Be))])):i("",!0),r("span",Je,[V(e.$slots,"default"),d(" "+I(l.label)+" ",1),V(e.$slots,"append")])],14,Xe))}})),tt={class:"q-card__header"},lt={key:0,class:"q-card__header-content"},at={class:"q-card__header-text"},nt={key:0,class:"q-card__title",role:"cell"},ot={key:1,class:"q-card__subtitle",role:"cell"},it={class:"q-card__content"},st={key:0,class:"q-card__footer"},rt=Me(/*@__PURE__*/v({__name:"QCard",props:{id:{},class:{},title:{},subtitle:{},href:{},borderless:{type:Boolean},variant:{default:"default"},elevation:{default:"none"},width:{},disabled:{type:Boolean},loading:{type:Boolean}},setup(t){const l=t,a=n(()=>["q-card",l.width?`q-card--${l.width}`:void 0,l.variant&&"default"!==l.variant?`q-card--${l.variant}`:void 0,l.elevation&&"none"!==l.elevation?`q-card--elevation-${l.elevation}`:void 0,{"q-card--clickable":c.value,"q-card--loading":l.loading,"q-card--borderless":l.borderless,"q-card--disabled":l.disabled},l.class]),u=H(),c=n(()=>!!u.onClick||l.href),v=n(()=>l.disabled||l.loading)
|
|
100
|
+
function f(e){v.value&&e.stopImmediatePropagation()}return(t,n)=>(C(),o(Q(l.href?"a":"div"),{id:l.id,class:_(a.value),href:l.href&&!v.value?l.href:void 0,onClick:f},{default:J(()=>[l.loading?(C(),o(R(Be),{key:0,size:36})):(C(),s(e,{key:1},[r("div",tt,[V(t.$slots,"header",{},()=>[V(t.$slots,"header.prepend"),t.$slots.title||l.title||t.$slots.subtitle||l.subtitle?(C(),s("div",lt,[V(t.$slots,"header.content.prepend"),r("div",at,[t.$slots.title||l.title?(C(),s("p",nt,[t.$slots.title?V(t.$slots,"title",{key:0}):(C(),s(e,{key:1},[d(I(t.$props.title),1)],64))])):i("",!0),t.$slots.subtitle||l.subtitle?(C(),s("p",ot,[t.$slots.subtitle?V(t.$slots,"subtitle",{key:0}):(C(),s(e,{key:1},[d(I(t.$props.subtitle),1)],64))])):i("",!0)]),V(t.$slots,"header.content.append")])):i("",!0),V(t.$slots,"header.append")])]),r("div",it,[V(t.$slots,"default")]),t.$slots.footer?(C(),s("div",st,[V(t.$slots,"footer")])):i("",!0)],64))]),_:3},8,["id","class","href"]))}})),ut=/*@__PURE__*/v({__name:"QIcon",props:{id:{},class:{},icon:{},size:{},color:{},type:{default:"svg"}},setup(e){const t=e,l=n(()=>{switch(t.type){case"svg":return _t
|
|
101
|
+
case"font":return yt
|
|
102
102
|
case"img":return kt
|
|
103
103
|
default:return}}),{style:a}=Ke(P(t,"color")),i=n(()=>({"font-size":void 0!==t.size?`${t.size}px`:void 0,color:void 0!==t.color&&"primary"!==t.color?a.value?.mainColor:void 0}))
|
|
104
104
|
return(e,a)=>(C(),o(Q(l.value),{id:t.id,class:_(t.class),icon:t.icon,style:w(i.value)},null,8,["id","class","icon","style"]))}}),dt=["id"],ct=/*@__PURE__*/v({__name:"QIconFont",props:{id:{},class:{},icon:{},variant:{},library:{default:""}},setup(e){const t=e,l=n(()=>t.variant?`${t.library}-${t.variant}`:t.library),a=n(()=>t.library&&t.icon?`${t.library}-${t.icon}`:t.icon)
|
|
105
|
-
return(e,n)=>(C(),s("i",{id:t.id,class:_(["q-icon","q-icon__font",l.value,a.value,t.class])},null,10,dt))}}),vt=["id","src"],
|
|
106
|
-
return(e,l)=>(C(),s("img",{id:t.id,src:t.icon,class:_(["q-icon","q-icon__img",t.class])},null,10,vt))}}),
|
|
105
|
+
return(e,n)=>(C(),s("i",{id:t.id,class:_(["q-icon","q-icon__font",l.value,a.value,t.class])},null,10,dt))}}),vt=["id","src"],ft=/*@__PURE__*/v({__name:"QIconImg",props:{id:{},class:{},icon:{}},setup(e){const t=e
|
|
106
|
+
return(e,l)=>(C(),s("img",{id:t.id,src:t.icon,class:_(["q-icon","q-icon__img",t.class])},null,10,vt))}}),pt={},mt=v({name:"InlineSvg",inheritAttrs:!1,props:{src:{type:String,required:!0},symbol:{type:String,default:""},title:{type:String,default:""},transformSource:{type:Function,default:void 0},keepDuringLoading:{type:Boolean,default:!0}},emits:{loaded:e=>"object"==typeof e,unloaded:()=>!0,error:e=>"object"==typeof e},expose:[],data:()=>({svgElSource:null}),watch:{src(e){this.getSource(e)}},async mounted(){await this.getSource(this.src)},methods:{copySvgAttrs(e,t){const l=t.attributes
|
|
107
107
|
if(l)for(const a of l)e[a.name]=a.value},copyComponentAttrs(e,t){for(const[l,a]of Object.entries(t))!1!==a&&null!=a&&(e[l]=a)},getSvgContent(e){return this.symbol&&!(e=e.getElementById(this.symbol))?null:(this.transformSource&&(e=e.cloneNode(!0),e=this.transformSource(e)),this.title&&(this.transformSource||(e=e.cloneNode(!0)),function(e,t){const l=e.getElementsByTagName("title")
|
|
108
108
|
if(l.length)l[0].textContent=t
|
|
109
109
|
else{const l=document.createElementNS("http://www.w3.org/2000/svg","title")
|
|
110
|
-
l.textContent=t,e.insertBefore(l,e.firstChild)}}(e,this.title)),e)},async getSource(e){try{
|
|
110
|
+
l.textContent=t,e.insertBefore(l,e.firstChild)}}(e,this.title)),e)},async getSource(e){try{pt[e]||(pt[e]=function(e){if(e.getIsPending)return e
|
|
111
111
|
let t=!0
|
|
112
112
|
const l=e.then(e=>(t=!1,e),e=>{throw t=!1,e})
|
|
113
|
-
return l.getIsPending=()=>t,l}(this.download(e))),this.svgElSource&&
|
|
114
|
-
const t=await
|
|
115
|
-
this.svgElSource=t,await this.$nextTick(),this.$emit("loaded",this.$el)}catch(t){this.svgElSource&&(this.svgElSource=null,this.$emit("unloaded")),delete
|
|
113
|
+
return l.getIsPending=()=>t,l}(this.download(e))),this.svgElSource&&pt[e].getIsPending()&&!this.keepDuringLoading&&(this.svgElSource=null,this.$emit("unloaded"))
|
|
114
|
+
const t=await pt[e]
|
|
115
|
+
this.svgElSource=t,await this.$nextTick(),this.$emit("loaded",this.$el)}catch(t){this.svgElSource&&(this.svgElSource=null,this.$emit("unloaded")),delete pt[e],this.$emit("error",t)}},async download(e){const t=await fetch(e)
|
|
116
116
|
if(!t.ok)throw new Error("Error loading SVG")
|
|
117
117
|
const l=await t.text(),a=(new DOMParser).parseFromString(l,"text/xml").getElementsByTagName("svg")[0]
|
|
118
118
|
if(!a)throw new Error("Loaded file is not a valid SVG")
|
|
@@ -121,32 +121,32 @@ const e=this.getSvgContent(this.svgElSource)
|
|
|
121
121
|
if(!e)return m("div",this.$attrs)
|
|
122
122
|
const t={}
|
|
123
123
|
return this.copySvgAttrs(t,this.svgElSource),this.copySvgAttrs(t,e),this.copyComponentAttrs(t,this.$attrs),t.innerHTML=e.innerHTML,this.$attrs.id||delete t.id,m("svg",t)}})
|
|
124
|
-
var ht,
|
|
125
|
-
function n(e){a("loaded",e)}function i(){a("unloaded")}return(e,t)=>(C(),o(
|
|
126
|
-
return(e,l)=>(C(),o(
|
|
127
|
-
return(e,l)=>(C(),s("span",{class:_(["q-required-indicator",t.class])},[l[0]||(l[0]=r("span",{class:"q-required-indicator__mark","aria-hidden":"true"}," * ",-1)),t.announce?(C(),s("span",wt,I(t.texts.required),1)):i("",!0)],2))}})),$t={key:0,class:"q-collapsible__header"},Mt={class:"q-collapsible__title"},Bt={class:"q-collapsible__title-text"},Ct={key:0,class:"q-collapsible__subtitle"},Lt={class:"q-collapsible__content-inner"},Dt={class:"q-collapsible__content"},Et=Me(/*@__PURE__*/v({__name:"QCollapsible",props:/*@__PURE__*/
|
|
128
|
-
function
|
|
124
|
+
var ht,bt=/*@__PURE__*/v({__name:"QIconSvg",props:{id:{},class:{},icon:{},bundle:{default:""}},emits:["loaded","unloaded"],setup(e,{emit:t}){const l=e,a=t
|
|
125
|
+
function n(e){a("loaded",e)}function i(){a("unloaded")}return(e,t)=>(C(),o(R(mt),{id:l.id,class:_(["q-icon","q-icon__svg",l.class]),src:l.bundle,symbol:l.icon,onLoaded:n,onUnloaded:i},null,8,["id","class","src","symbol"]))}}),gt=Me(ut),yt=Me(ct),kt=Me(ft),_t=Me(bt),qt=Me(/*@__PURE__*/v({__name:"QChevron",props:/*@__PURE__*/g({id:{},class:{},icons:{default:()=>ke}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,l=W(e,"modelValue"),a=n(()=>["q-chevron",{"q-chevron--expanded":l.value},t.class])
|
|
126
|
+
return(e,l)=>(C(),o(R(gt),y({id:t.id,class:a.value},t.icons.chevron),null,16,["id","class"]))}})),wt={key:0,class:"q-sr-only"},xt=Me(/*@__PURE__*/v({__name:"QRequiredIndicator",props:{id:{},class:{},announce:{type:Boolean},texts:{default:()=>_e}},setup(e){const t=e
|
|
127
|
+
return(e,l)=>(C(),s("span",{class:_(["q-required-indicator",t.class])},[l[0]||(l[0]=r("span",{class:"q-required-indicator__mark","aria-hidden":"true"}," * ",-1)),t.announce?(C(),s("span",wt,I(t.texts.required),1)):i("",!0)],2))}})),$t={key:0,class:"q-collapsible__header"},Mt={class:"q-collapsible__title"},Bt={class:"q-collapsible__title-text"},Ct={key:0,class:"q-collapsible__subtitle"},Lt={class:"q-collapsible__content-inner"},Dt={class:"q-collapsible__content"},Et=Me(/*@__PURE__*/v({__name:"QCollapsible",props:/*@__PURE__*/g({id:{},class:{},title:{},subtitle:{},variant:{},iconRight:{type:Boolean},spacing:{},width:{default:"fit-content"},required:{type:Boolean},icons:{default:()=>qe},texts:{default:()=>we}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,l=W(e,"modelValue"),a=n(()=>"block"===t.width?"block":void 0),u=n(()=>["q-collapsible",t.spacing&&"comfortable"!==t.spacing?`q-collapsible--${t.spacing}`:void 0,t.variant&&"default"!==t.variant?`q-collapsible--${t.variant}`:void 0,{"q-collapsible--icon-right":t.iconRight},t.class]),v=n(()=>["q-collapsible__content-wrapper",{"q-collapsible__content-show":l.value}])
|
|
128
|
+
function f(){l.value=!l.value}return(n,p)=>(C(),o(R(rt),{id:t.id,class:_(u.value),width:a.value},{header:J(()=>[e.title?(C(),s("div",$t,[c(R(et),{variant:"text",block:"",class:"q-collapsible__btn","aria-expanded":l.value,onClick:f},{default:J(()=>[r("div",Mt,[e.iconRight?i("",!0):V(n.$slots,"icon",{key:0},()=>[c(R(qt),{"model-value":l.value,icons:t.icons},null,8,["model-value","icons"])]),V(n.$slots,"title.prepend"),r("h4",Bt,I(e.title),1),t.required?(C(),o(R(xt),{key:1,announce:"",texts:t.texts},null,8,["texts"])):i("",!0),V(n.$slots,"title.append"),e.iconRight?V(n.$slots,"icon",{key:2},()=>[c(R(qt),{"model-value":l.value,class:"q-collapsible__chevron-right",icons:t.icons},null,8,["model-value","icons"])]):i("",!0)]),n.$slots.subtitle||e.subtitle?(C(),s("div",Ct,[V(n.$slots,"subtitle",{},()=>[d(I(e.subtitle),1)])])):i("",!0)]),_:3},8,["aria-expanded"])])):i("",!0)]),default:J(()=>[r("div",{class:_(v.value)},[r("div",Lt,[r("div",Dt,[V(n.$slots,"default")])])],2)]),_:3},8,["id","class","width"]))}})),St={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)},Vt=/* @__PURE__ */new Uint8Array(16)
|
|
129
129
|
var At=[]
|
|
130
|
-
for(let
|
|
130
|
+
for(let pr=0;pr<256;++pr)At.push((pr+256).toString(16).slice(1))
|
|
131
131
|
function Qt(e,t,l){const a=(e=e||{}).random??e.rng?.()??function(){if(!ht){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported")
|
|
132
|
-
ht=crypto.getRandomValues.bind(crypto)}return ht(
|
|
132
|
+
ht=crypto.getRandomValues.bind(crypto)}return ht(Vt)}()
|
|
133
133
|
if(a.length<16)throw new Error("Random bytes length must be >= 16")
|
|
134
134
|
if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t){if((l=l||0)<0||l+16>t.length)throw new RangeError(`UUID byte range ${l}:${l+15} is out of buffer bounds`)
|
|
135
135
|
for(let e=0;e<16;++e)t[l+e]=a[e]
|
|
136
|
-
return t}return function(e,t=0){return(At[e[t+0]]+At[e[t+1]]+At[e[t+2]]+At[e[t+3]]+"-"+At[e[t+4]]+At[e[t+5]]+"-"+At[e[t+6]]+At[e[t+7]]+"-"+At[e[t+8]]+At[e[t+9]]+"-"+At[e[t+10]]+At[e[t+11]]+At[e[t+12]]+At[e[t+13]]+At[e[t+14]]+At[e[t+15]]).toLowerCase()}(a)}function
|
|
136
|
+
return t}return function(e,t=0){return(At[e[t+0]]+At[e[t+1]]+At[e[t+2]]+At[e[t+3]]+"-"+At[e[t+4]]+At[e[t+5]]+"-"+At[e[t+6]]+At[e[t+7]]+"-"+At[e[t+8]]+At[e[t+9]]+"-"+At[e[t+10]]+At[e[t+11]]+At[e[t+12]]+At[e[t+13]]+At[e[t+14]]+At[e[t+15]]).toLowerCase()}(a)}function zt(e){return E(F(e)??`uid-${function(e,t,l){return!St.randomUUID||t||e?Qt(e,t,l):St.randomUUID()}()}`)}var It=/*@__PURE__*/v({__name:"QAccordionItem",props:{id:{},class:{},title:{},subtitle:{},variant:{},iconRight:{type:Boolean},spacing:{},width:{},required:{type:Boolean},icons:{},texts:{},value:{}},setup(e){const t=e,l=he(zt(P(t,"value")))
|
|
137
137
|
if(!l)throw new Error("QAccordionItem: Failed to retrieve group item. Ensure the component is used within a QAccordion context.")
|
|
138
|
-
return(e,a)=>(C(),o(
|
|
138
|
+
return(e,a)=>(C(),o(R(Et),y(t,{"model-value":R(l).isActive.value,"onUpdate:modelValue":R(l).toggle}),{default:J(()=>[V(e.$slots,"default")]),_:3},16,["model-value","onUpdate:modelValue"]))}}),Tt=Me(ye),Pt=Me(It),Ft=["src","alt"],Rt={key:1,class:"q-avatar-initials"},Ht=Me(/*@__PURE__*/v({__name:"QAvatar",props:{src:{},initials:{},color:{},size:{default:"medium"},shape:{default:"circle"},alt:{default:"Avatar"}},setup(e){const t=e,l=n(()=>["small","large"].includes(t.size)?`q-avatar--${t.size}`:""),a=n(()=>"circle"===t.shape?void 0:"q-avatar--square"),{style:o}=Ke(P(t,"color")),i=n(()=>{const e={}
|
|
139
139
|
return["small","medium","large"].includes(t.size)||(e["--q-avatar-size"]=t.size),o.value&&(e["--q-avatar-color"]=o.value?.mainColor,e["--q-avatar-text-color"]=o.value?.onMainColor),e})
|
|
140
|
-
return(t,n)=>(C(),s("div",{class:_(["q-avatar",l.value,a.value]),style:w(i.value)},[e.src?(C(),s("img",{key:0,src:e.src,alt:e.alt,class:"q-avatar-img"},null,8,Ft)):e.initials?(C(),s("span",
|
|
141
|
-
return ve({QButton:{disabled:P(t,"disabled"),borderless:P(t,"borderless")}}),(e,l)=>(C(),s("div",{id:t.id,class:_(["q-button-group",{"q-button-group--elevated":t.elevated,"q-button-group--block":t.block},t.class]),role:"group"},[
|
|
142
|
-
return[{"q-badge--pill":l.pill},e,l.class]}),
|
|
143
|
-
return["q-badge",`q-badge--${l.variant}`,{"q-badge--removable":l.removable,"q-badge--disabled":l.disabled},e,v.value]}),{isUtilityColor:m,style:h}=Ke(P(l,"color")),
|
|
144
|
-
function x(){a("click:remove")}return(e,t)=>d.value?(C(),o(Q(l.removable?
|
|
145
|
-
return(e,l)=>(C(),s("div",{id:t.id,class:_(["q-badge-indicator__wrapper",t.class])},[
|
|
146
|
-
return(e,n)=>(C(),s("div",{id:t.id,class:_(["q-skeleton-loader",l.value,t.class]),style:w(a.value)},[...n[0]||(n[0]=[r("div",{class:"q-skeleton-loader__bone"},null,-1)])],14,tl))}})),al=["id"],nl={key:0,class:"q-carousel__skeleton"},ol={class:"q-carousel__skeleton-caption"},il={key:0,class:"q-carousel__skeleton-controls"},sl=["onClick"],rl=["src","alt"],ul={key:1,class:"q-carousel__empty-container"},dl={key:2,class:"q-carousel__caption-global"},cl={key:0,class:"q-carousel__title"},vl={key:1,class:"q-carousel__subtitle"},
|
|
147
|
-
let v=!1,
|
|
148
|
-
const h=E(0),
|
|
149
|
-
let
|
|
140
|
+
return(t,n)=>(C(),s("div",{class:_(["q-avatar",l.value,a.value]),style:w(i.value)},[e.src?(C(),s("img",{key:0,src:e.src,alt:e.alt,class:"q-avatar-img"},null,8,Ft)):e.initials?(C(),s("span",Rt,I(e.initials.slice(0,2).toUpperCase()),1)):V(t.$slots,"fallback",{key:2})],6))}})),Ut={remove:{icon:"close"}},Wt={removeText:"Remove"},Ot=["id"],Nt=Me(/*@__PURE__*/v({__name:"QButtonGroup",props:{id:{},class:{},block:{type:Boolean},borderless:{type:Boolean},elevated:{type:Boolean},disabled:{type:Boolean}},setup(e){const t=e
|
|
141
|
+
return ve({QButton:{disabled:P(t,"disabled"),borderless:P(t,"borderless")}}),(e,l)=>(C(),s("div",{id:t.id,class:_(["q-button-group",{"q-button-group--elevated":t.elevated,"q-button-group--block":t.block},t.class]),role:"group"},[V(e.$slots,"default")],10,Ot))}})),jt=["id"],Yt={key:0,class:"q-badge__underlay q-button--background"},Gt={class:"q-badge__content"},Kt=Me(/*@__PURE__*/v({__name:"QBadge",props:{id:{},class:{},variant:{default:"tonal"},color:{default:"primary"},pill:{type:Boolean},size:{default:"default"},disabled:{type:Boolean},removable:{type:Boolean},icons:{default:()=>Ut},texts:{default:()=>Wt}},emits:["click:remove"],setup(e,{emit:t}){const l=e,a=t,u=H(),d=n(()=>!!u.onClick),v=n(()=>{const e="default"!==l.size?`q-badge--${l.size}`:void 0
|
|
142
|
+
return[{"q-badge--pill":l.pill},e,l.class]}),f=n(()=>{const e=m.value?`q-badge--${l.color}`:void 0
|
|
143
|
+
return["q-badge",`q-badge--${l.variant}`,{"q-badge--removable":l.removable,"q-badge--disabled":l.disabled},e,v.value]}),{isUtilityColor:m,style:h}=Ke(P(l,"color")),b=n(()=>{if(!m.value)return{"--q-badge-main-color":h.value?.mainColor,"--q-badge-on-main-color":h.value?.onMainColor,"--q-badge-hover-color":h.value?.hoverColor,"--q-badge-on-hover-color":h.value?.onHoverColor}}),g=n(()=>u.onClick),k=n(()=>({class:"q-badge__remove",variant:l.variant,color:l.color,ariaLabel:l.texts.removeText,title:l.texts.removeText,disabled:l.disabled}))
|
|
144
|
+
function x(){a("click:remove")}return(e,t)=>d.value?(C(),o(Q(l.removable?R(Nt):"span"),{key:1,class:_(v.value)},{default:J(()=>[c(R(et),{class:"q-badge__content",variant:l.variant,color:l.color,disabled:l.disabled,onClick:g.value},{default:J(()=>[V(e.$slots,"default")]),_:3},8,["variant","color","disabled","onClick"]),l.removable?(C(),o(R(et),y({key:0},k.value,{onClick:x}),{default:J(()=>[c(R(gt),q(p(l.icons.remove)),null,16)]),_:1},16)):i("",!0)]),_:3},8,["class"])):(C(),s("span",{key:0,id:l.id,class:_(f.value),style:w(b.value)},["tonal"===l.variant?(C(),s("div",Yt)):i("",!0),r("span",null,[r("div",Gt,[V(e.$slots,"default")]),l.removable?(C(),o(R(et),y({key:0},k.value,{onClick:x}),{default:J(()=>[c(R(gt),q(p(l.icons.remove)),null,16)]),_:1},16)):i("",!0)])],14,jt))}})),Xt=["id"],Zt=Me(/*@__PURE__*/v({__name:"QBadgeIndicator",props:{id:{},class:{},content:{},color:{default:"highlight"},placement:{default:"top-right"},enabled:{type:Boolean,default:!0}},setup(e){const t=e,l=O(),a=n(()=>!t.content&&!l.content),r=n(()=>["q-badge-indicator",`q-badge-indicator--${t.placement}`,{"q-badge-indicator--dot":a.value}])
|
|
145
|
+
return(e,l)=>(C(),s("div",{id:t.id,class:_(["q-badge-indicator__wrapper",t.class])},[V(e.$slots,"default"),t.enabled?(C(),o(R(Kt),{key:0,pill:"",variant:"bold",class:_(r.value),color:t.color},{default:J(()=>[V(e.$slots,"content",{},()=>[d(I(t.content),1)])]),_:3},8,["class","color"])):i("",!0)],10,Xt))}})),Jt={back:{icon:"chevron-left"},forward:{icon:"chevron-right"}},el={previousText:"Previous",nextText:"Next",goToSlide:"Go to slide {0}"},tl=["id"],ll=Me(/*@__PURE__*/v({__name:"QSkeletonLoader",props:{id:{},class:{},width:{},height:{},type:{}},setup(e){const t=e,l=n(()=>t.type?`q-skeleton-loader--${t.type}`:void 0),a=n(()=>({width:"number"==typeof t.width?`${t.width}px`:t.width,height:"number"==typeof t.height?`${t.height}px`:t.height}))
|
|
146
|
+
return(e,n)=>(C(),s("div",{id:t.id,class:_(["q-skeleton-loader",l.value,t.class]),style:w(a.value)},[...n[0]||(n[0]=[r("div",{class:"q-skeleton-loader__bone"},null,-1)])],14,tl))}})),al=["id"],nl={key:0,class:"q-carousel__skeleton"},ol={class:"q-carousel__skeleton-caption"},il={key:0,class:"q-carousel__skeleton-controls"},sl=["onClick"],rl=["src","alt"],ul={key:1,class:"q-carousel__empty-container"},dl={key:2,class:"q-carousel__caption-global"},cl={key:0,class:"q-carousel__title"},vl={key:1,class:"q-carousel__subtitle"},fl={key:3,class:"q-carousel__indicators"},pl=["aria-label","aria-current","onClick"],ml={class:"q-sr-only"},hl={class:"q-sr-only"},bl=Me(/*@__PURE__*/v({__name:"QCarousel",props:/*@__PURE__*/g({id:{},class:{},slides:{default:()=>[]},showIndicators:{type:Boolean},showControls:{type:Boolean},autoCycleInterval:{default:5e3},autoCyclePause:{default:"hover"},ride:{default:"carousel"},swipeThreshold:{default:50},wrap:{type:Boolean,default:!0},animationDuration:{default:500},loading:{type:Boolean},icons:{default:()=>Jt},texts:{default:()=>el}},{currentSlide:{default:0},currentSlideModifiers:{}}),emits:/*@__PURE__*/g(["slide:before-change","slide:after-change","slide:click"],["update:currentSlide"]),setup(t,{emit:l}){const a=t,o=l,u=W(t,"currentSlide"),d=E(0)
|
|
147
|
+
let v=!1,f=!1,p=0,m=0
|
|
148
|
+
const h=E(0),b=E(0)
|
|
149
|
+
let g,q
|
|
150
150
|
const x=n(()=>({transform:`translateX(-${100*d.value}%)`,transition:v?`transform ${a.animationDuration}ms cubic-bezier(0.4, 0, 0.2, 1)`:"none"})),$=n(()=>({"--q-carousel-progress-duration":`${a.autoCycleInterval}ms`,"--q-carousel-progress-width":`${h.value}%`}))
|
|
151
151
|
function L(e){if(e<0||e>=a.slides.length)return
|
|
152
152
|
if(e===d.value||v)return
|
|
@@ -154,61 +154,61 @@ const t=d.value,l=a.slides[t],n=a.slides[e]
|
|
|
154
154
|
o("slide:before-change",n.id,l?.id),d.value=e,u.value=e,a.animationDuration>0?(v=!0,setTimeout(()=>{v=!1,o("slide:after-change",n.id,l?.id)},a.animationDuration)):k(()=>{o("slide:after-change",n.id,l?.id)})}function D(){const e=d.value+1
|
|
155
155
|
e>=a.slides.length?a.wrap&&L(0):L(e)}function A(){const e=d.value-1
|
|
156
156
|
e<0?a.wrap&&L(a.slides.length-1):L(e)}function Q(e){const t={}
|
|
157
|
-
return e?.colorPlaceholder&&(t["background-color"]=e.colorPlaceholder),t}function
|
|
157
|
+
return e?.colorPlaceholder&&(t["background-color"]=e.colorPlaceholder),t}function z(){!a.autoCycleInterval||a.slides.length<=1||(T(),"carousel"!==a.ride||f||(b.value=Date.now(),a.autoCycleInterval&&(q=window.setInterval(()=>{h.value=(Date.now()-b.value)/a.autoCycleInterval*100},50)),g=window.setTimeout(D,a.autoCycleInterval)))}function T(){g&&window.clearTimeout(g),q&&window.clearInterval(q),g=void 0,q=void 0,b.value=0,h.value=0}function P(){"hover"===a.autoCyclePause&&(f=!0,T())}function F(){"hover"===a.autoCyclePause&&(f=!1,z())}function H(e){if(!v)switch(e.key){case"ArrowLeft":e.preventDefault(),A()
|
|
158
158
|
break
|
|
159
159
|
case"ArrowRight":e.preventDefault(),D()
|
|
160
160
|
break
|
|
161
161
|
case"Home":e.preventDefault(),L(0)
|
|
162
162
|
break
|
|
163
|
-
case"End":e.preventDefault(),L(a.slides.length-1)}}function U(e){v||(
|
|
164
|
-
const e=
|
|
165
|
-
Math.abs(e)>a.swipeThreshold&&(e>0?D():A()),
|
|
166
|
-
d.value>=e.length&&L(0)},{immediate:!0,deep:!0}),X(d,function(){
|
|
163
|
+
case"End":e.preventDefault(),L(a.slides.length-1)}}function U(e){v||(p=e.touches[0].clientX,T())}function O(e){v||(m=e.touches[0].clientX)}function N(){if(v)return
|
|
164
|
+
const e=p-m
|
|
165
|
+
Math.abs(e)>a.swipeThreshold&&(e>0?D():A()),p=0,m=0,z()}function j(e){return a.texts.goToSlide.replace("{0}",`${e+1}`)}return X(()=>a.slides,function(e){if(0===e.length)return d.value=0,u.value=0,void T()
|
|
166
|
+
d.value>=e.length&&L(0)},{immediate:!0,deep:!0}),X(d,function(){T(),z()}),X(u,e=>{e!==d.value&&L(e)}),M(z),B(T),(l,n)=>(C(),s("div",{id:a.id,class:_(["q-carousel",a.class]),tabindex:"0",onMouseenter:P,onMouseleave:F,onKeydown:H},[t.loading?(C(),s("div",nl,[c(R(ll),{width:"100%",height:"100%"}),r("div",ol,[c(R(ll),{type:"text",width:"40%",height:"24px",class:"q-carousel__skeleton-title"}),c(R(ll),{type:"text",width:"60%",height:"16px",class:"q-carousel__skeleton-subtitle"})]),a.showControls?(C(),s("div",il,[c(R(ll),{type:"icon",width:"40px",height:"40px",class:"q-carousel__skeleton-control"}),c(R(ll),{type:"icon",width:"40px",height:"40px",class:"q-carousel__skeleton-control"})])):i("",!0)])):(C(),s(e,{key:1},[t.slides?.length?(C(),s("div",{key:0,class:"q-carousel__track",style:w(x.value),onTouchstart:U,onTouchmove:O,onTouchend:N},[(C(!0),s(e,null,S(t.slides,(e,t)=>(C(),s("div",{key:e.id,class:_(["q-carousel__slide",{"q-carousel__slide--active":t===d.value}]),style:w(Q(e)),onClick:le(()=>function(e){if(window.getSelection()?.toString().length)return
|
|
167
167
|
const t=a.slides[e]
|
|
168
|
-
o("slide:click",t.id)}(t),["stop","prevent"])},[e.image?(C(),s("img",{key:0,src:e.image,alt:e.title||`Slide ${t+1}`,class:"q-carousel__image",decoding:"async",loading:"lazy"},null,8,rl)):i("",!0)],14,sl))),128))],36)):(C(),s("div",ul,[
|
|
169
|
-
function
|
|
170
|
-
return(e,a)=>(C(),s("div",{id:t.id,class:_(l.value)},[
|
|
171
|
-
return(e,l)=>(C(),s("div",$l,[c(
|
|
172
|
-
return t({fieldRef:a}),(e,t)=>(C(),s("div",{id:l.id,class:_(d.value)},[l.label?(C(),o(
|
|
173
|
-
function n(e){a("click",e)}return(e,t)=>(C(),o(
|
|
168
|
+
o("slide:click",t.id)}(t),["stop","prevent"])},[e.image?(C(),s("img",{key:0,src:e.image,alt:e.title||`Slide ${t+1}`,class:"q-carousel__image",decoding:"async",loading:"lazy"},null,8,rl)):i("",!0)],14,sl))),128))],36)):(C(),s("div",ul,[V(l.$slots,"empty")])),t.slides[d.value]?(C(),s("div",dl,[t.slides[d.value]?.title?(C(),s("h2",cl,I(t.slides[d.value].title),1)):i("",!0),t.slides[d.value]?.subtitle?(C(),s("p",vl,I(t.slides[d.value].subtitle),1)):i("",!0)])):i("",!0),t.showIndicators&&t.slides.length>1?(C(),s("ol",fl,[(C(!0),s(e,null,S(t.slides,(e,t)=>(C(),s("li",{key:e.id,class:_(["q-carousel__indicator",{"q-carousel__indicator--active":t===d.value}]),"data-testid":"carousel-indicator",style:w(t===d.value?$.value:{}),"aria-label":j(t),"aria-current":t===d.value,onClick:()=>L(t)},null,14,pl))),128))])):i("",!0),t.showControls&&t.slides.length>1?(C(),s(e,{key:4},[c(R(et),{class:"q-carousel__control q-carousel__control--prev","data-testid":"carousel-prev","aria-label":t.texts.previousText,onClick:A},{default:J(()=>[c(R(gt),y({class:"q-carousel__control-icon q-carousel__control-icon--prev"},a.icons.back),null,16),r("span",ml,I(t.texts.previousText),1)]),_:1},8,["aria-label"]),c(R(et),{class:"q-carousel__control q-carousel__control--next","data-testid":"carousel-next","aria-label":t.texts.nextText,onClick:D},{default:J(()=>[c(R(gt),y({class:"q-carousel__control-icon q-carousel__control-icon--next"},a.icons.forward),null,16),r("span",hl,I(t.texts.nextText),1)]),_:1},8,["aria-label"])],64)):i("",!0)],64))],42,al))}})),gl={checked:{icon:"check"},indeterminate:{icon:"minus"}},yl=["checked","disabled","readonly","required","aria-label","aria-readonly"],kl=["id","aria-label","aria-checked","aria-required","disabled","readonly","onKeydown"],_l=/*@__PURE__*/v({inheritAttrs:!1,__name:"QCheckbox",props:/*@__PURE__*/g({id:{},class:{},label:{},required:{type:Boolean},for:{},labelPosition:{},labelPlacement:{default:"right"},color:{default:"primary"},size:{default:"regular"},disabled:{type:Boolean},readonly:{type:Boolean},indeterminate:{type:Boolean},icons:{default:()=>gl},hasFocusOutline:{type:Boolean,default:!0},borderless:{type:Boolean}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,l=W(e,"modelValue"),a=zt(P(t,"id")),d=N("inputEl"),c=N("buttonEl"),v=n(()=>["q-checkbox",`q-checkbox--${t.size}`,`q-checkbox--${t.color}`,{"q-checkbox--readonly":t.readonly,"q-checkbox--disabled":t.disabled,"q-checkbox--checked":l.value,"q-checkbox--indeterminate":t.indeterminate,"q-checkbox--focus-style":t.hasFocusOutline,"q-checkbox--borderless":t.borderless},t.class])
|
|
169
|
+
function f(){t.disabled||t.readonly||(l.value=!l.value)}function p(){c.value?.focus()}return X(l,e=>{d.value&&(d.value.checked=!!e)}),(n,d)=>(C(),s("div",{class:_(v.value),onClick:le(f,["prevent"]),onMousedown:le(p,["prevent"])},[t.label&&"right"!==t.labelPlacement?(C(),o(R(Ll),{key:0,for:R(a),label:t.label,required:t.required},u({_:2},[n.$slots.extras?{name:"extras",fn:J(()=>[V(n.$slots,"extras")]),key:"0"}:void 0]),1032,["for","label","required"])):i("",!0),r("input",{ref:"inputEl",type:"checkbox",class:"q-checkbox__native-input",checked:l.value,disabled:t.disabled,readonly:t.readonly,required:t.required,"aria-label":t.label,"aria-readonly":t.readonly,tabindex:"-1","aria-hidden":"true"},null,8,yl),r("button",y({id:R(a),ref:"buttonEl",role:"checkbox",type:"button",class:"q-checkbox__input","data-testid":"checkbox-button","aria-label":t.label,"aria-checked":t.indeterminate?"mixed":l.value,"aria-required":t.required||void 0,disabled:t.disabled,readonly:t.readonly},n.$attrs,{onClick:le(f,["stop","prevent"]),onKeydown:[te(le(f,["prevent"]),["space"]),d[0]||(d[0]=te(le(()=>{},["prevent"]),["enter"]))]}),[l.value||e.indeterminate?(C(),o(R(gt),y({key:0},l.value?t.icons.checked:t.icons.indeterminate,{class:"q-checkbox__input-icon"}),null,16)):i("",!0)],16,kl),t.label&&"right"===t.labelPlacement?(C(),o(R(Ll),{key:1,for:R(a),label:t.label,required:t.required},u({_:2},[n.$slots.extras?{name:"extras",fn:J(()=>[V(n.$slots,"extras")]),key:"0"}:void 0]),1032,["for","label","required"])):i("",!0)],34))}}),ql=["id"],wl=["for"],xl=Me(/*@__PURE__*/v({__name:"QLabel",props:{id:{},class:{},label:{},required:{type:Boolean},for:{},labelPosition:{}},setup(e){const t=e,l=n(()=>["q-label",t.labelPosition?`q-label--${t.labelPosition}`:"",{"q-label--required":t.required},t.class])
|
|
170
|
+
return(e,a)=>(C(),s("div",{id:t.id,class:_(l.value)},[V(e.$slots,"prepend"),t.label||e.$slots.default?(C(),s("label",{key:0,for:t.for},[V(e.$slots,"default",{},()=>[d(I(t.label),1)])],8,wl)):V(e.$slots,"default",{key:1}),V(e.$slots,"append"),t.required?(C(),o(R(xt),{key:2})):i("",!0)],10,ql))}})),$l={class:"q-checkbox__label-wrapper"},Ml={key:0,class:"q-field__extras"},Bl=/*@__PURE__*/v({__name:"QCheckboxLabel",props:{id:{},class:{},label:{},required:{type:Boolean},for:{},labelPosition:{}},setup(e){const t=e
|
|
171
|
+
return(e,l)=>(C(),s("div",$l,[c(R(xl),{class:"q-checkbox__label",for:t.for,label:t.label,required:t.required},null,8,["for","label","required"]),e.$slots.extras?(C(),s("div",Ml,[V(e.$slots,"extras")])):i("",!0)]))}}),Cl=Me(_l),Ll=Me(Bl),Dl={selectColor:"Select a color"},El=["id"],Sl={key:0,class:"q-field__prepend"},Vl={key:1,class:"q-field__append"},Al={key:1,class:"q-field__extras"},Ql=Me(/*@__PURE__*/v({inheritAttrs:!1,__name:"QField",props:{id:{},class:{},label:{},required:{type:Boolean},for:{},labelPosition:{default:"topleft"},size:{default:"medium"},readonly:{type:Boolean},disabled:{type:Boolean},invalid:{type:Boolean}},setup(e,{expose:t}){const l=e,a=N("field"),u=n(()=>l.required&&!l.readonly&&!l.disabled),d=n(()=>["q-field",`q-field--${l.size}`,`q-field--label-${l.labelPosition}`,{"q-field--readonly":l.readonly,"q-field--disabled":l.disabled,"q-field--required":u.value,"q-field--invalid":l.invalid},l.class])
|
|
172
|
+
return t({fieldRef:a}),(e,t)=>(C(),s("div",{id:l.id,class:_(d.value)},[l.label?(C(),o(R(xl),{key:0,class:"q-field__label",label:l.label,"label-position":l.labelPosition,for:l.for,required:l.required},{prepend:J(()=>[V(e.$slots,"label.prepend")]),append:J(()=>[V(e.$slots,"label.append")]),_:3},8,["label","label-position","for","required"])):i("",!0),V(e.$slots,"control",{},()=>[r("div",y({ref:"field",class:"q-field__control"},e.$attrs),[e.$slots.prepend?(C(),s("div",Sl,[V(e.$slots,"prepend")])):i("",!0),V(e.$slots,"default"),e.$slots.append?(C(),s("div",Vl,[V(e.$slots,"append")])):i("",!0)],16)]),e.$slots.extras?(C(),s("div",Al,[V(e.$slots,"extras")])):i("",!0)],10,El))}})),zl={clearValue:"Clear value"},Il={clear:{icon:"close"}},Tl=Me(/*@__PURE__*/v({__name:"QClearButton",props:{id:{},class:{},icons:{default:()=>Il},texts:{default:()=>zl}},emits:["click"],setup(e,{emit:t}){const l=e,a=t
|
|
173
|
+
function n(e){a("click",e)}return(e,t)=>(C(),o(R(et),{id:l.id,class:_(["q-clear-btn",l.class]),"aria-label":l.texts.clearValue,variant:"ghost",color:"neutral",borderless:"",tabindex:"-1",onClick:n},{default:J(()=>[c(R(gt),q(p(l.icons.clear)),null,16)]),_:1},8,["id","class","aria-label"]))}})),Pl=["id","type","maxlength","required","placeholder","readonly","disabled"],Fl=/*@__PURE__*/v({inheritAttrs:!1,__name:"QTextField",props:/*@__PURE__*/g({id:{},class:{},label:{},required:{type:Boolean},for:{},labelPosition:{},size:{},readonly:{type:Boolean},disabled:{type:Boolean},invalid:{type:Boolean},placeholder:{},maxLength:{},clearable:{type:Boolean},type:{default:"text"},texts:{}},{modelValue:{},modelModifiers:{}}),emits:/*@__PURE__*/g(["click:clear"],["update:modelValue"]),setup(e,{expose:t,emit:l}){const a=e,s=l,d=W(e,"modelValue"),c=n({get:()=>d.value,set:e=>{const t=a.maxLength
|
|
174
174
|
d.value=t?e?.slice(0,t):e}})
|
|
175
175
|
X(d,e=>c.value=e,{immediate:!0})
|
|
176
|
-
const v=
|
|
177
|
-
function
|
|
178
|
-
function d(e){return
|
|
179
|
-
l.value=d(t.value)?t.value:""}function v(){d(i.value)?l.value=i.value:(l.value="",i.value="")}return X(l,function(e){e&&d(e)?a.value=e:a.value="#000000"},{immediate:!0}),X(l,function(e){e&&d(e)?i.value=e:i.value=""},{immediate:!0}),(e,l)=>(C(),o(
|
|
180
|
-
function m(){u.value=!0}function h(){u.value=!1}function
|
|
181
|
-
if(
|
|
176
|
+
const v=zt(P(a,"id")),f=N("field"),p=N("input"),m=n(()=>a.readonly||a.disabled?void 0:a.placeholder),h=n(()=>a.clearable&&!a.readonly&&!a.disabled),b=n(()=>h.value&&d.value)
|
|
177
|
+
function g(e){h.value&&(d.value="",s("click:clear",e))}return t({fieldRef:n(()=>f.value?.fieldRef),inputRef:p}),(e,t)=>(C(),o(R(Ql),{ref:"field",class:_(["q-text-field",a.class]),for:R(v),label:a.label,"label-position":a.labelPosition,size:a.size,readonly:a.readonly,disabled:a.disabled,required:a.required,invalid:a.invalid},u({"label.prepend":J(()=>[V(e.$slots,"label.prepend")]),"label.append":J(()=>[V(e.$slots,"label.append")]),default:J(()=>[ee(r("input",y({id:R(v),ref:"input","onUpdate:modelValue":t[0]||(t[0]=e=>c.value=e),class:"q-text-field__input",type:a.type,maxlength:a.maxLength,required:a.required,placeholder:m.value,readonly:a.readonly,disabled:a.disabled},e.$attrs),null,16,Pl),[[Y,c.value]])]),_:2},[e.$slots.prepend?{name:"prepend",fn:J(()=>[V(e.$slots,"prepend")]),key:"0"}:void 0,e.$slots.append||b.value?{name:"append",fn:J(()=>[V(e.$slots,"append"),b.value?(C(),o(R(Tl),{key:0,"data-testid":"q-text-field__clear-button",texts:a.texts,onClick:g},null,8,["texts"])):i("",!0)]),key:"1"}:void 0,e.$slots.extras?{name:"extras",fn:J(()=>[V(e.$slots,"extras")]),key:"2"}:void 0]),1032,["class","for","label","label-position","size","readonly","disabled","required","invalid"]))}}),Rl={...zl},Hl=Me(Fl),Ul=["readonly","disabled","aria-label"],Wl=Me(/*@__PURE__*/v({inheritAttrs:!1,__name:"QColorPicker",props:/*@__PURE__*/g({id:{},class:{},placeholder:{},label:{},size:{default:"small"},readonly:{type:Boolean},disabled:{type:Boolean},required:{type:Boolean},texts:{default:()=>Dl}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,l=W(e,"modelValue"),a=E(""),i=E(""),s=n(()=>t.readonly||t.disabled)
|
|
178
|
+
function d(e){return Ve(e,!0)}function c(e){const t=e.target
|
|
179
|
+
l.value=d(t.value)?t.value:""}function v(){d(i.value)?l.value=i.value:(l.value="",i.value="")}return X(l,function(e){e&&d(e)?a.value=e:a.value="#000000"},{immediate:!0}),X(l,function(e){e&&d(e)?i.value=e:i.value=""},{immediate:!0}),(e,l)=>(C(),o(R(Hl),{id:t.id,modelValue:i.value,"onUpdate:modelValue":l[2]||(l[2]=e=>i.value=e),"max-length":7,class:_(["q-color-picker",t.class]),label:t.label,size:t.size,readonly:t.readonly,disabled:t.disabled,required:t.required,placeholder:t.placeholder,onChange:v},u({"label.prepend":J(()=>[V(e.$slots,"label.prepend")]),"label.append":J(()=>[V(e.$slots,"label.append")]),prepend:J(()=>[V(e.$slots,"prepend"),ee(r("input",y({"onUpdate:modelValue":l[0]||(l[0]=e=>a.value=e),type:"color",class:"q-color-picker__swatch",readonly:t.readonly,disabled:s.value,"aria-label":t.texts.selectColor},e.$attrs,{onChange:c,onClick:l[1]||(l[1]=le(()=>{},["stop"]))}),null,16,Ul),[[G,a.value]])]),_:2},[e.$slots.append?{name:"append",fn:J(()=>[V(e.$slots,"append")]),key:"0"}:void 0,e.$slots.extras?{name:"extras",fn:J(()=>[V(e.$slots,"extras")]),key:"1"}:void 0]),1032,["id","modelValue","class","label","size","readonly","disabled","required","placeholder"]))}})),Ol={...zl,noData:"No data available",showOptions:"Show options"},Nl={...ke,...Il},jl=/*@__PURE__*/v({__name:"QList",props:{id:{},class:{},modelValue:{},highlighted:{},items:{},groups:{default:()=>[]},selectable:{type:Boolean},selectOnTab:{type:Boolean,default:!0},multiple:{type:Boolean},disabled:{type:Boolean},required:{type:Boolean},itemValue:{default:"key"},itemLabel:{default:"label"}},emits:["update:modelValue","click","mouseenter:item"],setup(t,{expose:l,emit:a}){const i=t,r=a,u=E(!1),d=n(()=>c.value.length>1?"div":"ul"),c=n(()=>i.groups.length?i.groups.filter(e=>i.items?.some(t=>t.group===e.id)):[{id:"",title:""}]),{active:v}=me({active:P(i,"modelValue"),required:P(i,"required"),multiple:P(i,"multiple")}),f=E(null),p=E(null)
|
|
180
|
+
function m(){u.value=!0}function h(){u.value=!1}function b(e){if(!i.items)return
|
|
181
|
+
if(f.value?.contains(e.relatedTarget))return
|
|
182
182
|
let t=-1
|
|
183
183
|
i.multiple?v.value?.length>0&&(t=i.items.findIndex(e=>v.value.includes(e[i.itemValue]))):v.value&&(t=i.items.findIndex(e=>e[i.itemValue]===v.value)),-1===t&&(t=M())
|
|
184
|
-
w(t,u.value)}const
|
|
185
|
-
let
|
|
186
|
-
function k(e){switch(window.clearTimeout(
|
|
184
|
+
w(t,u.value)}const g=E("")
|
|
185
|
+
let y
|
|
186
|
+
function k(e){switch(window.clearTimeout(y),["ArrowDown","ArrowUp","Home","End"].includes(e.key)&&e.preventDefault(),e.key){case"ArrowDown":q("next")
|
|
187
187
|
break
|
|
188
188
|
case"ArrowUp":q("prev")
|
|
189
189
|
break
|
|
190
190
|
case"Home":q("first")
|
|
191
191
|
break
|
|
192
|
-
case"End":q("last")}if(/^[a-z]$/i.test(e.key)){
|
|
192
|
+
case"End":q("last")}if(/^[a-z]$/i.test(e.key)){g.value+=e.key.toLowerCase()
|
|
193
193
|
const t=i.items?.length||0
|
|
194
|
-
for(let e=0;e<t;e++)if(i.items[e][i.itemLabel].toLowerCase().startsWith(
|
|
195
|
-
break}e.preventDefault(),e.stopPropagation()}
|
|
194
|
+
for(let e=0;e<t;e++)if(i.items[e][i.itemLabel].toLowerCase().startsWith(g.value)){w(e)
|
|
195
|
+
break}e.preventDefault(),e.stopPropagation()}y=window.setTimeout(function(){g.value=""},500)}function q(e){switch(e){case"next":case"prev":w(function(e){return D($(),e)}(e))
|
|
196
196
|
break
|
|
197
197
|
case"first":w(M())
|
|
198
198
|
break
|
|
199
|
-
case"last":w(B())}}function w(e,t=!1){x()[e]?.focus({preventScroll:t})}function x(){const e=
|
|
199
|
+
case"last":w(B())}}function w(e,t=!1){x()[e]?.focus({preventScroll:t})}function x(){const e=f.value?.querySelectorAll("li")
|
|
200
200
|
return e?Array.from(e):[]}function $(){return x().indexOf(document.activeElement)}function M(){const e=x(),t=e.find(e=>A(e))
|
|
201
201
|
return t?e.indexOf(t):-1}function B(){const e=x(),t=[...e].reverse().find(e=>A(e))
|
|
202
202
|
return t?e.indexOf(t):-1}function L(e,t,l){return"prev"===t&&e<=0||"next"===t&&e===l.length-1}function D(e,t){const l=x()
|
|
203
203
|
if(L(e,t,l))return e
|
|
204
204
|
let a=e+("next"===t?1:-1)
|
|
205
205
|
for(;!A(l[a]);){if(L(a,t,l))return e
|
|
206
|
-
a+="next"===t?1:-1}return a}function A(e){return-2===e.tabIndex}function
|
|
206
|
+
a+="next"===t?1:-1}return a}function A(e){return-2===e.tabIndex}function z(e){return e?i.items?.filter(t=>t.group===e):i.items}return X(v,e=>{r("update:modelValue",e)}),l({getItem:function(e){return x()[e]},getActiveItemIndex:$,getAdjacentItemIndex:D,getFirstFocusableItemIndex:M,getLastFocusableItemIndex:B}),(t,l)=>(C(),o(Q(d.value),{id:i.id,ref_key:"listRef",ref:f,class:_(["q-list",{"q-list--disabled":i.disabled},i.class]),role:"listbox",tabindex:i.disabled?-1:0,onFocus:b,onMousedown:m,onMouseup:h,onKeydown:k},{default:J(()=>[V(t.$slots,"default",{},()=>[(C(!0),s(e,null,S(c.value,(l,a)=>(C(),o(R(ia),{id:l.id,key:l.id,title:1===c.value.length?void 0:l.title},{default:J(()=>[(C(!0),s(e,null,S(z(l.id),(e,n)=>(C(),o(R(oa),{key:e[i.itemValue],ref_for:!0,ref_key:"listItemsRef",ref:p,value:e[i.itemValue],label:e[i.itemLabel],description:e.description,icon:e.icon,disabled:i.disabled||l.disabled||e.disabled,highlighted:i.highlighted===e[i.itemValue],selectable:i.selectable||i.multiple||e.selectable,checkboxless:!i.multiple,"select-on-tab":i.selectOnTab,onClick:()=>{return t=e[i.itemValue],void r("click",t)
|
|
207
207
|
var t},onMouseenter:()=>{return t=e[i.itemValue],void r("mouseenter:item",t)
|
|
208
|
-
var t}},{append:J(()=>[
|
|
208
|
+
var t}},{append:J(()=>[V(t.$slots,"item.append",{item:e,element:p.value?.[n+a*c.value.length]?.$el})]),default:J(()=>[V(t.$slots,"item",{item:e,element:p.value?.[n+a*c.value.length]?.$el})]),_:2},1032,["value","label","description","icon","disabled","highlighted","selectable","checkboxless","select-on-tab","onClick","onMouseenter"]))),128))]),_:2},1032,["id","title"]))),128))])]),_:3},40,["id","class","tabindex"]))}}),Yl={check:{icon:"check"},description:{icon:"information-outline"}},Gl=["id","data-key","tabindex","aria-label","aria-selected"],Kl={class:"q-list-item__container"},Xl={class:"q-list-item__content"},Zl={key:0,class:"q-list-item__description"},Jl={key:0,class:"q-list-item__check-container"},ea=/*@__PURE__*/v({__name:"QListItem",props:/*@__PURE__*/g({value:{},label:{},icon:{},description:{},selectable:{type:Boolean},selectOnTab:{type:Boolean,default:!0},highlighted:{type:Boolean},disabled:{type:Boolean},icons:{default:()=>Yl},checkboxless:{type:Boolean}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:/*@__PURE__*/g(["click"],["update:modelValue"]),setup(e,{emit:t}){const l=e,a=t,n=W(e,"modelValue"),u=zt(),v=he(l.value)
|
|
209
209
|
if(!v)throw new Error("QListItem: Failed to retrieve group item. Ensure the component is used within a QList context.")
|
|
210
|
-
function
|
|
211
|
-
return(e,a)=>(C(),s("ul",{class:"q-list-item-group",role:"group","data-key":t.id,"aria-labelledby":t.title?
|
|
210
|
+
function f(){l.disabled||(a("click"),l.selectable&&v?.toggle())}function m(e){"Tab"===e.key&&l.selectOnTab&&f(),"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),e.stopPropagation(),f())}return X(v.isActive,e=>{n.value=e},{immediate:!0}),(e,t)=>(C(),s("li",{id:R(u),"data-key":l.value,role:"option",tabindex:l.disabled?void 0:-2,class:_(["q-list-item",{"q-list-item--selected":n.value,"q-list-item--selectable":l.selectable,"q-list-item--disabled":l.disabled,"q-list-item--highlighted":l.highlighted}]),"aria-label":l.label,"aria-selected":l.disabled?void 0:n.value,onKeydown:m,onClick:le(f,["stop","prevent"])},[V(e.$slots,"prepend"),r("div",Kl,[r("div",Xl,[V(e.$slots,"default",{},()=>[l.icon?(C(),o(R(gt),q(y({key:0},l.icon)),null,16)):i("",!0),d(" "+I(l.label),1)])]),l.description?(C(),s("div",Zl,[c(R(gt),q(p(l.icons.description)),null,16),r("span",null,I(l.description),1)])):i("",!0)]),V(e.$slots,"append"),l.selectable?(C(),s("div",Jl,[c(R(Cl),{borderless:l.checkboxless,disabled:l.disabled,"model-value":n.value,"onUpdate:modelValue":f},null,8,["borderless","disabled","model-value"])])):i("",!0)],42,Gl))}}),ta=["data-key","aria-labelledby"],la=["id"],aa=/*@__PURE__*/v({__name:"QListItemGroup",props:{id:{},title:{}},setup(e){const t=e,l=zt()
|
|
211
|
+
return(e,a)=>(C(),s("ul",{class:"q-list-item-group",role:"group","data-key":t.id,"aria-labelledby":t.title?R(l):void 0},[t.title?(C(),s("li",{key:0,id:R(l),class:"q-list-item-group__title",role:"presentation"},I(t.title),9,la)):i("",!0),V(e.$slots,"default")],8,ta))}}),na=Me(jl),oa=Me(ea),ia=Me(aa),sa=Symbol.for("DismissibleLayer")
|
|
212
212
|
var ra={ref:"layer"},ua=Me(/*@__PURE__*/v({__name:"QDismissibleLayer",emits:["escape-key-down","pointer-down-outside","focus-outside","interact-outside","dismiss"],setup(e,{emit:t}){const l=t,a=N("layer"),n=function(e){const t=h(sa)
|
|
213
213
|
if(!t)throw new Error("useDismissibleLayerStackItem must be used within a dismissible layer stack context.")
|
|
214
214
|
return{register:()=>t.register(e),unregister:()=>t.unregister(e),isTop:()=>t.isTop(e)}}(U())
|
|
@@ -219,24 +219,24 @@ if(!a.value.contains(t)&&n?.isTop()){const t=new CustomEvent("focus-outside",{bu
|
|
|
219
219
|
l("focus-outside",t),l("interact-outside",t),t.defaultPrevented||l("dismiss",t)}}function u(e){if(!a.value||!n?.isTop())return
|
|
220
220
|
const t=e.target
|
|
221
221
|
if(!a.value.contains(t)){const t=new CustomEvent("pointer-down-outside",{bubbles:!1,cancelable:!0,detail:{originalEvent:e}})
|
|
222
|
-
l("pointer-down-outside",t),l("interact-outside",t),t.defaultPrevented||l("dismiss",t)}}return M(()=>{n?.register(),document.addEventListener("keydown",i),o.push(()=>{document.removeEventListener("keydown",i)}),document.addEventListener("focusin",r),o.push(()=>{document.removeEventListener("focusin",r)}),["mousedown","touchstart"].forEach(e=>{document.addEventListener(e,u,{passive:!0,capture:!0}),o.push(()=>{document.removeEventListener(e,u,{capture:!0})})})}),B(()=>{n?.unregister(),o.forEach(e=>e()),o=[]}),(e,t)=>(C(),s("div",ra,[
|
|
222
|
+
l("pointer-down-outside",t),l("interact-outside",t),t.defaultPrevented||l("dismiss",t)}}return M(()=>{n?.register(),document.addEventListener("keydown",i),o.push(()=>{document.removeEventListener("keydown",i)}),document.addEventListener("focusin",r),o.push(()=>{document.removeEventListener("focusin",r)}),["mousedown","touchstart"].forEach(e=>{document.addEventListener(e,u,{passive:!0,capture:!0}),o.push(()=>{document.removeEventListener(e,u,{capture:!0})})})}),B(()=>{n?.unregister(),o.forEach(e=>e()),o=[]}),(e,t)=>(C(),s("div",ra,[V(e.$slots,"default")],512))}})),da="data-scroll-locked",ca="right-scroll-bar-position",va="width-before-scroll-bar",fa={left:0,top:0,right:0,gap:0},pa=e=>parseInt(e||"",10)||0,ma=(e="margin")=>{if("undefined"==typeof window)return fa
|
|
223
223
|
const t=(e=>{const t=window.getComputedStyle(document.body),l=t["padding"===e?"paddingLeft":"marginLeft"],a=t["padding"===e?"paddingTop":"marginTop"],n=t["padding"===e?"paddingRight":"marginRight"]
|
|
224
|
-
return[
|
|
224
|
+
return[pa(l),pa(a),pa(n)]})(e),l=document.documentElement.clientWidth,a=window.innerWidth
|
|
225
225
|
return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,a-l+t[2]-t[0])}}
|
|
226
226
|
var ha=()=>{let e=0,t=null
|
|
227
227
|
return{add:l=>{var a
|
|
228
|
-
0===e&&(t=document?document.createElement("style"):null)&&(a=l,t.appendChild(document.createTextNode(a)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:()=>{e--,!e&&t&&(t.parentNode?.removeChild(t),t=null)}}},
|
|
228
|
+
0===e&&(t=document?document.createElement("style"):null)&&(a=l,t.appendChild(document.createTextNode(a)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:()=>{e--,!e&&t&&(t.parentNode?.removeChild(t),t=null)}}},ba=/*@__PURE__*/v({__name:"QRemoveScrollBar",props:{gapMode:{default:"margin"},noRelative:{type:Boolean},noImportant:{type:Boolean}},setup(e){const t=e,l=ha(),a=()=>{const e=parseInt(document.body.getAttribute("data-scroll-locked")||"0",10)
|
|
229
229
|
return isFinite(e)?e:0}
|
|
230
230
|
return M(()=>{document.body.setAttribute(da,(a()+1).toString())
|
|
231
231
|
const e=ma(t.gapMode)
|
|
232
232
|
l.add((({left:e,top:t,right:l,gap:a},n,o="margin",i)=>`\n .with-scroll-bars-hidden {\n overflow: hidden ${i};\n padding-right: ${a}px ${i};\n }\n body[${da}] {\n overflow: hidden ${i};\n overscroll-behavior: contain;\n ${[n&&`position: relative ${i};`,"margin"===o&&`\n padding-left: ${e}px;\n padding-top: ${t}px;\n padding-right: ${l}px;\n margin-left:0;\n margin-top:0;\n margin-right: ${a}px ${i};\n `,"padding"===o&&`padding-right: ${a}px ${i};`].filter(Boolean).join("")}\n }\n\n .${ca} {\n right: ${a}px ${i};\n }\n\n .${va} {\n margin-right: ${a}px ${i};\n }\n\n .${ca} .${ca} {\n right: 0 ${i};\n }\n\n .${va} .${va} {\n margin-right: 0 ${i};\n }\n\n body[${da}] {\n --removed-body-scroll-bar-size: ${a}px;\n }\n`)(e,!t.noRelative,t.gapMode,t.noImportant?"":"!important"))}),B(()=>{const e=a()-1
|
|
233
|
-
e<=0?document.body.removeAttribute(da):document.body.setAttribute(da,e.toString()),l.remove()}),(e,t)=>
|
|
233
|
+
e<=0?document.body.removeAttribute(da):document.body.setAttribute(da,e.toString()),l.remove()}),(e,t)=>V(e.$slots,"default")}}),ga=Me(ba),ya={ref:"container"},ka=Me(/*@__PURE__*/v({__name:"QFocusWrap",props:{id:{},class:{},active:{type:Boolean,default:!0},initialFocus:{},focusWithinOnActivate:{type:Boolean,default:!0},closingFocus:{},returnFocusOnDeactivate:{type:Boolean}},setup(t){const l=t,a=N("container"),n=["a[href]","area[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","iframe","object","embed",'[tabindex]:not([tabindex="-1"])',"[contenteditable]"].join(",")
|
|
234
234
|
let o
|
|
235
235
|
function u(e){const t=function(e){if(e)return Array.prototype.slice.call(e.querySelectorAll(n)).filter(e=>(e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0)&&!e.getAttribute("data-focus-wall"))}(a.value)
|
|
236
236
|
if(!t||0===t.length)return
|
|
237
237
|
const l=t["first"===e?0:t.length-1]
|
|
238
238
|
"function"==typeof l?.focus&&l.focus()}function d(){u("first")}function c(){u("last")}function v(e){let t
|
|
239
|
-
t="string"==typeof e?document.querySelector(e):e,"function"==typeof t?.focus&&t?.focus()}return $(()=>{l.closingFocus?k(()=>{v(l.closingFocus)}):l.returnFocusOnDeactivate&&k(()=>{v(o)})}),X(()=>l.active,()=>{l.active?(l.returnFocusOnDeactivate&&(o=document.activeElement),l.initialFocus?k(()=>{v(l.initialFocus)}):l.focusWithinOnActivate&&k(()=>{d()})):l.closingFocus?k(()=>{v(l.closingFocus)}):l.returnFocusOnDeactivate&&k(()=>{v(o)})},{immediate:!0}),(t,a)=>(C(),s(e,null,[l.active?(C(),s("span",{key:0,class:"q-focus-wrap",tabindex:"0","data-focus-wall":"true",onFocus:c},null,32)):i("",!0),r("span",
|
|
239
|
+
t="string"==typeof e?document.querySelector(e):e,"function"==typeof t?.focus&&t?.focus()}return $(()=>{l.closingFocus?k(()=>{v(l.closingFocus)}):l.returnFocusOnDeactivate&&k(()=>{v(o)})}),X(()=>l.active,()=>{l.active?(l.returnFocusOnDeactivate&&(o=document.activeElement),l.initialFocus?k(()=>{v(l.initialFocus)}):l.focusWithinOnActivate&&k(()=>{d()})):l.closingFocus?k(()=>{v(l.closingFocus)}):l.returnFocusOnDeactivate&&k(()=>{v(o)})},{immediate:!0}),(t,a)=>(C(),s(e,null,[l.active?(C(),s("span",{key:0,class:"q-focus-wrap",tabindex:"0","data-focus-wall":"true",onFocus:c},null,32)):i("",!0),r("span",ya,[V(t.$slots,"default")],512),l.active?(C(),s("span",{key:1,class:"q-focus-wrap",tabindex:"0","data-focus-wall":"true",onFocus:d},null,32)):i("",!0)],64))}}))
|
|
240
240
|
function _a(e,t,l,a){const n=a?.offset??0,o=a?.crossOffset??0,i=a?.placement??"bottom",s=e.getBoundingClientRect(),r=t.getBoundingClientRect(),u=l?.getBoundingClientRect(),d=function(e,t,l,a){if($a(qa(e,t,l,a))){const n={top:"bottom",bottom:"top",left:"right",right:"left"}[xa(l)]
|
|
241
241
|
if($a(qa(e,t,n,a)))return l
|
|
242
242
|
const o=function(e){const[,t]=e.split("-")
|
|
@@ -279,48 +279,48 @@ break
|
|
|
279
279
|
default:throw new Error(`[Quidgest UI] Invalid side value: ${n}`)}return o}function wa(e){return t=function(e){const t=xa(e)
|
|
280
280
|
return["left","right"].includes(t)?"x":"y"}(e),"x"===t?"y":"x"
|
|
281
281
|
var t}function xa(e){const[t]=e.split("-")
|
|
282
|
-
return t}function $a(e){return e<0}function Ma(e){return"string"==typeof e?document.querySelector(e):e}var Ba=["id"],Ca=["role"],La=/*@__PURE__*/v({inheritAttrs:!1,__name:"QOverlay",props:{id:{},class:{},modelValue:{type:Boolean},anchor:{},appearance:{default:"regular"},arrow:{type:Boolean},backdropBlur:{type:Boolean},backdropClass:{},offset:{default:8},crossOffset:{default:0},placement:{default:"right"},transition:{default:"fade"},width:{default:"auto"},centerVertically:{type:Boolean},attach:{default:"body"},inline:{type:Boolean},delay:{default:500},nonModal:{type:Boolean},scrollLock:{type:Boolean},persistent:{type:Boolean},spy:{type:Boolean},trigger:{default:"click"},focusWrap:{type:Boolean},initialFocus:{},focusWithinOnActivate:{type:Boolean,default:!1},closingFocus:{},returnFocusOnDeactivate:{type:Boolean,default:!0}},emits:["update:modelValue","enter","leave"],setup(a,{emit:u}){const d=a,v=u,{class:
|
|
282
|
+
return t}function $a(e){return e<0}function Ma(e){return"string"==typeof e?document.querySelector(e):e}var Ba=["id"],Ca=["role"],La=/*@__PURE__*/v({inheritAttrs:!1,__name:"QOverlay",props:{id:{},class:{},modelValue:{type:Boolean},anchor:{},appearance:{default:"regular"},arrow:{type:Boolean},backdropBlur:{type:Boolean},backdropClass:{},offset:{default:8},crossOffset:{default:0},placement:{default:"right"},transition:{default:"fade"},width:{default:"auto"},centerVertically:{type:Boolean},attach:{default:"body"},inline:{type:Boolean},delay:{default:500},nonModal:{type:Boolean},scrollLock:{type:Boolean},persistent:{type:Boolean},spy:{type:Boolean},trigger:{default:"click"},focusWrap:{type:Boolean},initialFocus:{},focusWithinOnActivate:{type:Boolean,default:!1},closingFocus:{},returnFocusOnDeactivate:{type:Boolean,default:!0}},emits:["update:modelValue","enter","leave"],setup(a,{emit:u}){const d=a,v=u,{class:f}=Ye(),p=n(()=>["q-overlay",`q-overlay--${xa(q.placement)}`,f.value,{"q-overlay--independent":m.value,"q-overlay--inverted":"inverted"===d.appearance,"q-overlay--center":d.centerVertically},d.class]),m=n(()=>void 0===d.anchor),h=n(()=>d.modelValue&&!d.nonModal),b=n(()=>(d.modelValue||q.animating)&&d.scrollLock),g=n(()=>!d.inline&&(d.modelValue||q.animating)),q=D({animating:!1,top:0,left:0,width:0,placement:d.placement}),x=D({top:void 0,left:void 0,hidden:!0})
|
|
283
283
|
X(()=>d.modelValue,function(){q.animating=!0})
|
|
284
284
|
const B=n(()=>{if(m.value)return
|
|
285
285
|
const e=Z(),t="anchor"===d.width?e?.getBoundingClientRect().width:void 0
|
|
286
|
-
return{top:`${q.top}px`,left:`${q.left}px`,width:void 0!==t?`${t}px`:void 0}}),L=n(()=>{if(d.arrow)return{top:void 0!==x.top?`${x.top}px`:void 0,left:void 0!==x.left?`${x.left}px`:void 0,opacity:x.hidden?0:1}}),E=N("arrow"),
|
|
286
|
+
return{top:`${q.top}px`,left:`${q.left}px`,width:void 0!==t?`${t}px`:void 0}}),L=n(()=>{if(d.arrow)return{top:void 0!==x.top?`${x.top}px`:void 0,left:void 0!==x.left?`${x.left}px`:void 0,opacity:x.hidden?0:1}}),E=N("arrow"),S=N("overlay"),A=N("overlayContainer")
|
|
287
287
|
function Q(){const e=Z()
|
|
288
288
|
if(!e||!A.value)return
|
|
289
289
|
const t={placement:d.placement,width:d.width,offset:d.offset,crossOffset:d.crossOffset,arrow:d.arrow},l=_a(e,A.value,E?.value??void 0,t)
|
|
290
|
-
q.left=l.overlayCoords.x,q.top=l.overlayCoords.y,q.placement=l.placement,x.hidden=void 0===l.arrowCoords,l.arrowCoords&&(x.top=l.arrowCoords.y,x.left=l.arrowCoords.x)}let
|
|
291
|
-
function P(){
|
|
292
|
-
k(()=>e?.focus())}}function
|
|
293
|
-
d.spy&&(clearTimeout(
|
|
290
|
+
q.left=l.overlayCoords.x,q.top=l.overlayCoords.y,q.placement=l.placement,x.hidden=void 0===l.arrowCoords,l.arrowCoords&&(x.top=l.arrowCoords.y,x.left=l.arrowCoords.x)}let z,I,T
|
|
291
|
+
function P(){H(0)}function F(){H(d.delay)}function H(e){z&&W(),z=window.setTimeout(()=>{v("update:modelValue",!0)},e)}function U(){if(z&&W(),v("update:modelValue",!1),d.anchor&&"click"===d.trigger){const e=Z()
|
|
292
|
+
k(()=>e?.focus())}}function W(){clearTimeout(z),z=void 0}function O(){k(ie),v("enter")}function j(){K()}function Y(){v("leave")}function G(){K(),function(){m.value||(window.removeEventListener("resize",Q),d.scrollLock||window.removeEventListener("scroll",Q))
|
|
293
|
+
d.spy&&(clearTimeout(T),T=void 0)}()}function K(){q.animating=!1}function Z(){return d.anchor?Ma(d.anchor):null}function ee(e){d.persistent&&e.preventDefault()}function te(e){if(d.persistent)return void e.preventDefault()
|
|
294
294
|
let t=!1
|
|
295
295
|
e.defaultPrevented||"pointerdown"===e.detail.originalEvent.type&&(t=!0)
|
|
296
296
|
const l=e.detail.originalEvent.target;(Z()?.contains(l)||"focusin"===e.detail.originalEvent.type&&t)&&e.preventDefault()}function ae(){U()}function ne(){const e=Z()
|
|
297
297
|
if(e)switch(I=new MutationObserver(Q),I.observe(e,{attributes:!1,childList:!0,characterData:!0,subtree:!0}),d.trigger){case"click":e.addEventListener("click",P)
|
|
298
298
|
break
|
|
299
|
-
case"hover":e.addEventListener("mouseenter",F),e.addEventListener("mouseleave",U),e.addEventListener("focusin",P),e.addEventListener("focusout",U)}}function oe(){Z()?(Q(),
|
|
299
|
+
case"hover":e.addEventListener("mouseenter",F),e.addEventListener("mouseleave",U),e.addEventListener("focusin",P),e.addEventListener("focusout",U)}}function oe(){Z()?(Q(),T=window.setTimeout(oe,100)):U()}function ie(){m.value||(window.addEventListener("resize",Q),d.scrollLock||window.addEventListener("scroll",Q),d.spy?oe():Q()),!m.value&&"click"!==d.trigger||d.initialFocus||d.focusWithinOnActivate||S.value?.focus()}return X(()=>d.placement,()=>k(Q)),M(()=>{k(ne)}),$(function(){const e=Z()
|
|
300
300
|
if(e)switch(I?.disconnect(),d.trigger){case"click":e.removeEventListener("click",P)
|
|
301
301
|
break
|
|
302
|
-
case"hover":e.removeEventListener("mouseenter",F),e.removeEventListener("mouseleave",U),e.removeEventListener("focusin",P),e.removeEventListener("focusout",U)}}),(a,n)=>(C(),s(e,null,[(C(),o(t,{disabled:!
|
|
303
|
-
M(
|
|
304
|
-
const x=n(()=>d.clearable&&!d.readonly&&!d.disabled),$=n(()=>"manual"!==d.filterMode&&A.value?d.items?.filter(e=>e[d.itemLabel].toLowerCase().startsWith(m.value.toLowerCase()))??[]:d.items??[]),B=n(()=>d.items?.find(e=>e[d.itemValue]===
|
|
305
|
-
if(void 0!==e&&$.value[e])return $.value[e]}),
|
|
306
|
-
function Q(e){
|
|
307
|
-
m.value!==e&&(m.value=e)}function
|
|
308
|
-
else if(["ArrowDown","ArrowUp"].includes(e.key))
|
|
302
|
+
case"hover":e.removeEventListener("mouseenter",F),e.removeEventListener("mouseleave",U),e.removeEventListener("focusin",P),e.removeEventListener("focusout",U)}}),(a,n)=>(C(),s(e,null,[(C(),o(t,{disabled:!g.value,to:d.attach},[c(l,{name:"fade",appear:""},{default:J(()=>[h.value?(C(),s("div",{key:0,class:_([d.backdropClass,"q-overlay__underlay",{"q-overlay__underlay--blur":d.backdropBlur}]),onMousedown:n[0]||(n[0]=le(()=>{},["prevent"]))},null,34)):i("",!0)]),_:1}),c(l,{name:d.transition,appear:"",onEnter:O,onAfterEnter:j,onLeave:Y,onAfterLeave:G},{default:J(()=>[d.modelValue?(C(),s("div",{key:0,id:d.id,ref:"overlayContainer",tabindex:"-1",class:_(p.value),style:w(B.value)},[c(R(ua),{onDismiss:ae,onInteractOutside:te,onPointerDownOutside:ee},{default:J(()=>[A.value?(C(),o(R(ka),{key:0,active:!d.nonModal&&d.modelValue&&d.focusWrap,"initial-focus":d.initialFocus,"focus-within-on-activate":d.focusWithinOnActivate,"closing-focus":d.closingFocus,"return-focus-on-deactivate":d.returnFocusOnDeactivate},{default:J(()=>[r("div",y({ref:"overlay",class:"q-overlay__content",tabindex:"-1",role:h.value?"dialog":void 0},a.$attrs),[d.arrow?(C(),s("div",{key:0,ref:"arrow",role:"presentation",class:"q-overlay__arrow",style:w(L.value)},null,4)):i("",!0),V(a.$slots,"default")],16,Ca)]),_:3},8,["active","initial-focus","focus-within-on-activate","closing-focus","return-focus-on-deactivate"])):i("",!0)]),_:3})],14,Ba)):i("",!0)]),_:3},8,["name"])],8,["disabled","to"])),b.value?(C(),o(R(ga),{key:0})):i("",!0)],64))}}),Da=Me(La),Ea=["data-key"],Sa={key:0,class:"q-select__loader"},Va={key:2,class:"q-select__loader"},Aa=/*@__PURE__*/v({inheritAttrs:!1,__name:"QCombobox",props:/*@__PURE__*/g({id:{},class:{},label:{},required:{type:Boolean},for:{},labelPosition:{},size:{},readonly:{type:Boolean},disabled:{type:Boolean},invalid:{type:Boolean},placeholder:{},maxLength:{},clearable:{type:Boolean},texts:{default:()=>Ol},itemValue:{default:"key"},itemLabel:{default:"label"},items:{},groups:{default:()=>[]},selectionMode:{default:"automatic"},filterMode:{default:"builtin"},inline:{type:Boolean},loading:{type:Boolean},emptyValue:{},icons:{default:()=>Nl}},{modelValue:{},modelModifiers:{},open:{type:Boolean},openModifiers:{},search:{default:""},searchModifiers:{}}),emits:/*@__PURE__*/g(["before-show","before-hide","show","hide"],["update:modelValue","update:open","update:search"]),setup(t,{expose:l,emit:a}){const d=t,v=a,f=W(t,"modelValue"),p=W(t,"open"),m=W(t,"search"),h=E(void 0),b=E(null),g=E(null),_=E(null),q=E(null),w=E(null)
|
|
303
|
+
M(z)
|
|
304
|
+
const x=n(()=>d.clearable&&!d.readonly&&!d.disabled),$=n(()=>"manual"!==d.filterMode&&A.value?d.items?.filter(e=>e[d.itemLabel].toLowerCase().startsWith(m.value.toLowerCase()))??[]:d.items??[]),B=n(()=>d.items?.find(e=>e[d.itemValue]===f.value)),L=n(()=>void 0===B.value),D=n(()=>{const e=h.value
|
|
305
|
+
if(void 0!==e&&$.value[e])return $.value[e]}),S=n(()=>{if(void 0!==h.value)return(g.value?.getItem(h.value))?.id}),A=n(()=>m.value.length>0&&m.value!==B.value?.[d.itemLabel])
|
|
306
|
+
function Q(e){f.value=e,P()}function z(){const e=B.value?.[d.itemLabel]||""
|
|
307
|
+
m.value!==e&&(m.value=e)}function T(){p.value||d.readonly||d.disabled||(v("before-show"),p.value=!0,Y())}function P(){p.value&&(v("before-hide"),p.value=!1,h.value=void 0)}function F(){p.value?P():U()}function H(){x.value&&(f.value=d.emptyValue,h.value=void 0,Y())}function U(){if(T(),void 0!==B.value){const e=$.value.indexOf(B.value);-1!==e&&k(()=>ee(e))}}function O(e){if(e.key&&!d.readonly&&!d.disabled)if(["ArrowDown","ArrowUp","Home","End"].includes(e.key)&&(e.preventDefault(),e.stopPropagation()),"Escape"===e.key)z(),p.value&&(e.preventDefault(),e.stopPropagation(),P())
|
|
308
|
+
else if(["ArrowDown","ArrowUp"].includes(e.key))p.value?k(()=>{if(void 0===h.value)N()
|
|
309
309
|
else{const t="ArrowDown"===e.key?"next":"prev"
|
|
310
|
-
!function(e,t){h.value=
|
|
310
|
+
!function(e,t){h.value=g.value?.getAdjacentItemIndex(e,t)}(h.value,t)}}):(T(),k(()=>{"ArrowDown"===e.key?N():h.value=g.value?.getLastFocusableItemIndex()}))
|
|
311
311
|
else if("Enter"===e.key){if(void 0===D.value)return
|
|
312
|
-
Q(D.value[d.itemValue])}else if("Home"===e.key)h.value=
|
|
313
|
-
else if("End"===e.key)h.value=
|
|
312
|
+
Q(D.value[d.itemValue])}else if("Home"===e.key)h.value=g.value?.getFirstFocusableItemIndex()
|
|
313
|
+
else if("End"===e.key)h.value=g.value?.getLastFocusableItemIndex()
|
|
314
314
|
else if("Tab"===e.key){if(void 0===D.value)return
|
|
315
|
-
Q(D.value[d.itemValue])}else(/^[a-z0-9]$/i.test(e.key)||"Backspace"===e.key)&&
|
|
316
|
-
else{const e=$.value.findIndex(e=>e[d.itemValue]===
|
|
317
|
-
h.value=-1===e?
|
|
315
|
+
Q(D.value[d.itemValue])}else(/^[a-z0-9]$/i.test(e.key)||"Backspace"===e.key)&&T()}function N(){if(L.value)h.value=g.value?.getFirstFocusableItemIndex()
|
|
316
|
+
else{const e=$.value.findIndex(e=>e[d.itemValue]===f.value)
|
|
317
|
+
h.value=-1===e?g.value?.getFirstFocusableItemIndex():e}}function j(e){const t=_?.value?.$el===e.relatedTarget,l=q?.value?.$el===e.relatedTarget,a=b?.value?.$el?.contains(e.relatedTarget),n=w?.value?.contains(e.relatedTarget)
|
|
318
318
|
if(t||l||n||a)return e.preventDefault(),void e.stopPropagation()
|
|
319
|
-
P(),x.value&&!m.value&&(
|
|
320
|
-
|
|
321
|
-
m.value===e?.[d.itemLabel]&&
|
|
322
|
-
return(t,n)=>(C(),s("div",{class:"q-switch__container",onClick:n[1]||(n[1]=le(()=>{},["stop"]))},[l.label?(C(),o(
|
|
323
|
-
function
|
|
319
|
+
P(),x.value&&!m.value&&(f.value=d.emptyValue),z()}function Y(){b.value?.inputRef?.focus()}function G(){Y()}function K(){v("show")}function Z(){v("hide")}function ee(e){const t=g.value?.getItem(e)
|
|
320
|
+
g.value&&(g.value.$el.scrollTop=t?.offsetTop)}return X(f,z),X(()=>d.items,(e,t)=>{if(!L.value){const e=t?.find(e=>e[d.itemValue]===f.value)
|
|
321
|
+
m.value===e?.[d.itemLabel]&&z()}},{deep:!0}),X(h,e=>{void 0!==e&&ee(e)}),X(m,e=>{e&&p.value&&"automatic"===d.selectionMode&&k(N)}),X(()=>d.loading,e=>{!e&&p.value&&k(N)}),l({triggerEl:b}),(l,a)=>(C(),s(e,null,[c(R(Hl),y({id:d.id,ref_key:"triggerEl",ref:b,modelValue:m.value,"onUpdate:modelValue":a[0]||(a[0]=e=>m.value=e),label:d.label,required:d.required,role:"combobox",placeholder:d.placeholder,class:["q-combobox",{"q-combobox--readonly":d.readonly,"q-combobox--disabled":d.disabled},d.class],readonly:d.readonly,disabled:d.disabled,"data-loading":d.loading,autocomplete:"off","aria-expanded":p.value,"aria-haspopup":"listbox","aria-autocomplete":"list","aria-activedescendant":S.value,size:d.size},l.$attrs,{onClick:U,onFocusout:j,onKeydown:O}),u({"label.prepend":J(()=>[V(l.$slots,"label.prepend")]),"label.append":J(()=>[V(l.$slots,"label.append")]),append:J(()=>[V(l.$slots,"append"),x.value&&m.value?(C(),o(R(Tl),{key:0,ref_key:"clearRef",ref:q,icons:d.icons,texts:d.texts,onClick:H},null,8,["icons","texts"])):i("",!0),d.readonly?i("",!0):(C(),o(R(et),{key:1,ref_key:"toggleRef",ref:_,class:"q-combobox__chevron","aria-label":d.texts.showOptions,variant:"ghost",color:"neutral",borderless:"",tabindex:"-1",disabled:d.disabled,onMousedown:le(F,["stop","prevent"])},{default:J(()=>[c(R(qt),{"model-value":p.value,icons:d.icons},null,8,["model-value","icons"])]),_:1},8,["aria-label","disabled"]))]),_:2},[l.$slots.prepend?{name:"prepend",fn:J(()=>[V(l.$slots,"prepend")]),key:"0"}:void 0,l.$slots.extras?{name:"extras",fn:J(()=>[V(l.$slots,"extras")]),key:"1"}:void 0]),1040,["id","modelValue","label","required","placeholder","class","readonly","disabled","data-loading","aria-expanded","aria-activedescendant","size"]),c(R(Da),{modelValue:p.value,"onUpdate:modelValue":a[1]||(a[1]=e=>p.value=e),spy:"","non-modal":"",trigger:"manual",placement:"bottom-start",width:"anchor",offset:4,inline:d.inline,anchor:b.value?.$el,onEnter:K,onLeave:Z},{default:J(()=>[r("div",{ref_key:"contentRef",ref:w,class:"q-select__body","data-testid":"combobox-dropdown","data-key":d.id,onFocusout:j},[V(l.$slots,"body.prepend"),d.loading?(C(),s("div",Sa,[c(R(Be),{size:24})])):$.value.length?(C(),o(R(na),{key:1,ref_key:"listRef",ref:g,"model-value":f.value,class:"q-select__items",selectable:"",required:"",highlighted:D.value?.[d.itemValue],items:$.value,groups:t.groups,"item-label":d.itemLabel,"item-value":d.itemValue,onMouseup:G,"onUpdate:modelValue":Q},{item:J(({item:e})=>[V(l.$slots,"item",{item:e})]),_:3},8,["model-value","highlighted","items","groups","item-label","item-value"])):(C(),s("div",Va,I(d.texts.noData),1)),V(l.$slots,"body.append")],40,Ea)]),_:3},8,["modelValue","inline","anchor"])],64))}}),Qa=Me(Aa),za={...Il,calendar:{icon:"calendar"},clock:{icon:"clock"},today:{icon:"calendar-check"},back:{icon:"chevron-left"},forward:{icon:"chevron-right"},up:{icon:"chevron-up"},down:{icon:"chevron-down"},delete:{icon:"delete"}},Ia={...zl,today:"Today",toggleMode:"Toggle view mode",previousYears:"Previous years",nextYears:"Next years",previousMonth:"Previous month",nextMonth:"Next month",pickMonth:"Pick month",pickYear:"Pick year",increaseHour:"Increase hour",decreaseHour:"Decrease hour",increaseMinute:"Increase minute",decreaseMinute:"Decrease minute",increaseSecond:"Increase second",decreaseSecond:"Decrease second",am:"AM",pm:"PM",january:"January",february:"February",march:"March",april:"April",may:"May",june:"June",july:"July",august:"August",september:"September",october:"October",november:"November",december:"December",monday:"Monday",tuesday:"Tuesday",wednesday:"Wednesday",thursday:"Thursday",friday:"Friday",saturday:"Saturday",sunday:"Sunday"},Ta=["january","february","march","april","may","june","july","august","september","october","november","december"],Pa=["monday","tuesday","wednesday","thursday","friday","saturday","sunday"],Fa=["id","aria-checked","disabled"],Ra={class:"q-switch__labels"},Ha={class:"q-switch__label q-switch__label--off","aria-hidden":"true"},Ua={class:"q-switch__label q-switch__label--on","aria-hidden":"true"},Wa=Me(/*@__PURE__*/v({inheritAttrs:!1,__name:"QSwitch",props:/*@__PURE__*/g({id:{},class:{},label:{},required:{type:Boolean},labelPosition:{},trueLabel:{default:"On"},falseLabel:{default:"Off"},showStateLabels:{type:Boolean},checkedColor:{},uncheckedColor:{},size:{default:"medium"},disabled:{type:Boolean},readonly:{type:Boolean}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const l=t,a=W(t,"modelValue"),u=e=>{l.readonly&&(e.preventDefault(),e.stopImmediatePropagation(),e.target.checked=!!a.value)},c=zt(P(l,"id")),{style:v}=Ke(P(l,"checkedColor")),{style:f}=Ke(P(l,"uncheckedColor")),p=n(()=>["q-switch","medium"!==l.size?`q-switch--${l.size}`:void 0,{"q-switch--checked":a.value,"q-switch--disabled":l.disabled,"q-switch--readonly":l.readonly,"q-switch--with-labels":l.showStateLabels&&(l.trueLabel||l.falseLabel)},l.class]),m=n(()=>({"--q-switch-checked-background":v.value?.mainColor,"--q-switch-on-checked-background":v.value?.onMainColor,"--q-switch-unchecked-background":f.value?.mainColor,"--q-switch-on-unchecked-background":f.value?.onMainColor}))
|
|
322
|
+
return(t,n)=>(C(),s("div",{class:"q-switch__container",onClick:n[1]||(n[1]=le(()=>{},["stop"]))},[l.label?(C(),o(R(xl),{key:0,for:R(c),label:l.label,required:l.required},null,8,["for","label","required"])):i("",!0),r("div",{class:_(p.value),style:w(m.value)},[ee(r("input",y({id:R(c),"onUpdate:modelValue":n[0]||(n[0]=e=>a.value=e),class:"q-switch__input",type:"checkbox",role:"switch","aria-checked":a.value,disabled:l.disabled},t.$attrs,{onInput:u}),null,16,Fa),[[j,a.value]]),r("div",Ra,[r("span",Ha,[l.showStateLabels?(C(),s(e,{key:0},[d(I(l.falseLabel),1)],64)):i("",!0)]),r("span",Ua,[l.showStateLabels?(C(),s(e,{key:0},[d(I(l.trueLabel),1)],64)):i("",!0)])])],6)]))}}))
|
|
323
|
+
function Oa(e){let t="",l=0,a=!1
|
|
324
324
|
for(;l<e.length;){const n=e[l]
|
|
325
325
|
if("'"===n){if("'"===e[l+1]){t+="!'",l+=2
|
|
326
326
|
continue}a=!a,l++
|
|
@@ -388,101 +388,101 @@ break}if(e.slice(a,a+i.length)!==i)break
|
|
|
388
388
|
a+=i.length}return!1}function nn(e,t,l){const a=vn(e,t,l)
|
|
389
389
|
if(a)return a
|
|
390
390
|
const n=ln(e,t)
|
|
391
|
-
return n?vn(n,t,l):null}function on(e){return e%4==0&&e%100!=0||e%400==0}function sn(e,t){return 1===e&&on(t)?29:[31,28,31,30,31,30,31,31,30,31,30,31][e]}function rn(e){return e.getDay()}function un(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function dn(e,t,l){return e>t&&e<l}function cn(e,t,l){const a=e.getFullYear(),n=e.getMonth()+1,o=e.getDate(),i=e.getDay(),s=e.getHours(),r=e.getMinutes(),u=e.getSeconds(),d=s%12||12,c=s>=12,v=["January","February","March","April","May","June","July","August","September","October","November","December"],
|
|
392
|
-
return t?l.substring(0,3):l}),m=l?.getWeekdayName??((e,t)=>{const l=
|
|
391
|
+
return n?vn(n,t,l):null}function on(e){return e%4==0&&e%100!=0||e%400==0}function sn(e,t){return 1===e&&on(t)?29:[31,28,31,30,31,30,31,31,30,31,30,31][e]}function rn(e){return e.getDay()}function un(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function dn(e,t,l){return e>t&&e<l}function cn(e,t,l){const a=e.getFullYear(),n=e.getMonth()+1,o=e.getDate(),i=e.getDay(),s=e.getHours(),r=e.getMinutes(),u=e.getSeconds(),d=s%12||12,c=s>=12,v=["January","February","March","April","May","June","July","August","September","October","November","December"],f=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],p=l?.getMonthName??((e,t)=>{const l=v[e]
|
|
392
|
+
return t?l.substring(0,3):l}),m=l?.getWeekdayName??((e,t)=>{const l=f[e]
|
|
393
393
|
return t?l.substring(0,3):l})
|
|
394
|
-
return t.replace(/(yyyy|yy|MMMM|MMM|MM|M|dd|d|EEEE|EEE|HH|H|hh|h|mm|m|ss|s|a|'(?:''|[^'])*'|.)/g,e=>e.startsWith("'")?e.slice(1,-1).replace(/''/g,"'"):"yyyy"===e?String(a):"yy"===e?String(a).slice(-2):"MMMM"===e?
|
|
394
|
+
return t.replace(/(yyyy|yy|MMMM|MMM|MM|M|dd|d|EEEE|EEE|HH|H|hh|h|mm|m|ss|s|a|'(?:''|[^'])*'|.)/g,e=>e.startsWith("'")?e.slice(1,-1).replace(/''/g,"'"):"yyyy"===e?String(a):"yy"===e?String(a).slice(-2):"MMMM"===e?p(n-1,!1):"MMM"===e?p(n-1,!0):"MM"===e?Ka(n):"M"===e?String(n):"dd"===e?Ka(o):"d"===e?String(o):"EEEE"===e?m(i,!1):"EEE"===e?m(i,!0):"HH"===e?Ka(s):"H"===e?String(s):"hh"===e?Ka(d):"h"===e?String(d):"mm"===e?Ka(r):"m"===e?String(r):"ss"===e?Ka(u):"s"===e?String(u):"a"===e?c?"PM":"AM":e)}function vn(e,t,l){if(!e)return null
|
|
395
395
|
const a=["January","February","March","April","May","June","July","August","September","October","November","December"],n=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],o=t.match(Ja)??[],i=o.includes("a")
|
|
396
|
-
let s=0,r=null,u=null,d=null,c=null,v=null,
|
|
397
|
-
const
|
|
396
|
+
let s=0,r=null,u=null,d=null,c=null,v=null,f=null,p=0,m=0,h=0
|
|
397
|
+
const b=(t,l)=>{let a=""
|
|
398
398
|
for(let n=0;n<l&&s+n<e.length;n++){const t=e[s+n]
|
|
399
399
|
if(!/\d/.test(t))break
|
|
400
|
-
a+=t}return a.length<t?null:(s+=a.length,Number.parseInt(a,10))},
|
|
400
|
+
a+=t}return a.length<t?null:(s+=a.length,Number.parseInt(a,10))},g=t=>{const l=[...t].sort((e,t)=>t.length-e.length),a=e.slice(s).toLowerCase()
|
|
401
401
|
for(const e of l)if(a.startsWith(e.toLowerCase()))return s+=e.length,e
|
|
402
402
|
return null}
|
|
403
403
|
for(const _ of o){if(_.startsWith("'")){const t=_.slice(1,-1).replace(/''/g,"'")
|
|
404
404
|
if(!e.slice(s).startsWith(t))return null
|
|
405
405
|
s+=t.length
|
|
406
|
-
continue}if("yyyy"===_){const e=
|
|
406
|
+
continue}if("yyyy"===_){const e=b(4,4)
|
|
407
407
|
if(null===e)return null
|
|
408
408
|
r=e
|
|
409
|
-
continue}if("yy"===_){const e=
|
|
409
|
+
continue}if("yy"===_){const e=b(2,2)
|
|
410
410
|
if(null===e)return null
|
|
411
411
|
r=e<50?2e3+e:1900+e
|
|
412
|
-
continue}if("MMMM"===_||"MMM"===_){const e="MMM"===_,t=e?a.map(e=>e.slice(0,3)):a,n=
|
|
412
|
+
continue}if("MMMM"===_||"MMM"===_){const e="MMM"===_,t=e?a.map(e=>e.slice(0,3)):a,n=g(t)
|
|
413
413
|
if(!n)return null
|
|
414
414
|
if(u=l?.getMonthIndex?.(n,e)??t.findIndex(e=>e.toLowerCase()===n.toLowerCase()),u<0)return null
|
|
415
|
-
continue}if("MM"===_){const e=
|
|
415
|
+
continue}if("MM"===_){const e=b(2,2)
|
|
416
416
|
if(null===e)return null
|
|
417
417
|
u=e-1
|
|
418
|
-
continue}if("M"===_){const e=
|
|
418
|
+
continue}if("M"===_){const e=b(1,2)
|
|
419
419
|
if(null===e)return null
|
|
420
420
|
u=e-1
|
|
421
|
-
continue}if("dd"===_){const e=
|
|
421
|
+
continue}if("dd"===_){const e=b(2,2)
|
|
422
422
|
if(null===e)return null
|
|
423
423
|
d=e
|
|
424
|
-
continue}if("d"===_){const e=
|
|
424
|
+
continue}if("d"===_){const e=b(1,2)
|
|
425
425
|
if(null===e)return null
|
|
426
426
|
d=e
|
|
427
|
-
continue}if("EEEE"===_||"EEE"===_){const e="EEE"===_,t=e?n.map(e=>e.slice(0,3)):n,a=
|
|
427
|
+
continue}if("EEEE"===_||"EEE"===_){const e="EEE"===_,t=e?n.map(e=>e.slice(0,3)):n,a=g(t)
|
|
428
428
|
if(!a)return null
|
|
429
429
|
if((l?.getWeekdayIndex?.(a,e)??t.findIndex(e=>e.toLowerCase()===a.toLowerCase()))<0)return null
|
|
430
|
-
continue}if("HH"===_){const e=
|
|
430
|
+
continue}if("HH"===_){const e=b(2,2)
|
|
431
431
|
if(null===e)return null
|
|
432
432
|
c=e
|
|
433
|
-
continue}if("H"===_){const e=
|
|
433
|
+
continue}if("H"===_){const e=b(1,2)
|
|
434
434
|
if(null===e)return null
|
|
435
435
|
c=e
|
|
436
|
-
continue}if("hh"===_){const e=
|
|
436
|
+
continue}if("hh"===_){const e=b(2,2)
|
|
437
437
|
if(null===e)return null
|
|
438
438
|
v=e
|
|
439
|
-
continue}if("h"===_){const e=
|
|
439
|
+
continue}if("h"===_){const e=b(1,2)
|
|
440
440
|
if(null===e)return null
|
|
441
441
|
v=e
|
|
442
|
-
continue}if("mm"===_){const e=
|
|
442
|
+
continue}if("mm"===_){const e=b(2,2)
|
|
443
443
|
if(null===e)return null
|
|
444
|
-
|
|
445
|
-
continue}if("m"===_){const e=
|
|
444
|
+
p=e
|
|
445
|
+
continue}if("m"===_){const e=b(1,2)
|
|
446
446
|
if(null===e)return null
|
|
447
|
-
|
|
448
|
-
continue}if("ss"===_){const e=
|
|
447
|
+
p=e
|
|
448
|
+
continue}if("ss"===_){const e=b(2,2)
|
|
449
449
|
if(null===e)return null
|
|
450
450
|
m=e
|
|
451
|
-
continue}if("s"===_){const e=
|
|
451
|
+
continue}if("s"===_){const e=b(1,2)
|
|
452
452
|
if(null===e)return null
|
|
453
453
|
m=e
|
|
454
|
-
continue}if("SSS"===_){const e=
|
|
454
|
+
continue}if("SSS"===_){const e=b(3,3)
|
|
455
455
|
if(null===e)return null
|
|
456
456
|
h=e
|
|
457
|
-
continue}if("S"===_){const e=
|
|
457
|
+
continue}if("S"===_){const e=b(1,1)
|
|
458
458
|
if(null===e)return null
|
|
459
459
|
h=e
|
|
460
460
|
continue}if("a"===_){const t=e.slice(s,s+2).toUpperCase()
|
|
461
461
|
if("AM"!==t&&"PM"!==t)return null
|
|
462
|
-
|
|
462
|
+
f=t,s+=2
|
|
463
463
|
continue}if(!e.slice(s).startsWith(_))return null
|
|
464
464
|
s+=_.length}if(s!==e.length)return null
|
|
465
|
-
if(
|
|
466
|
-
let
|
|
465
|
+
if(p<0||p>59||m<0||m>59)return null
|
|
466
|
+
let y=0
|
|
467
467
|
if(null!==c){if(c<0||c>23)return null
|
|
468
|
-
|
|
469
|
-
if(i){if(null===
|
|
470
|
-
|
|
471
|
-
return new Date(e.getFullYear(),e.getMonth(),e.getDate(),
|
|
472
|
-
const k=new Date(r,u,d,
|
|
473
|
-
return k.getFullYear()!==r||k.getMonth()!==u||k.getDate()!==d||k.getHours()!==
|
|
474
|
-
return t.setHours(0,0,0,0),t}function
|
|
468
|
+
y=c}else if(null!==v){if(v<1||v>12)return null
|
|
469
|
+
if(i){if(null===f)return null
|
|
470
|
+
y="PM"===f?12===v?12:v+12:12===v?0:v}else y=v}if(null===r&&null===u&&null===d&&(null!==c||null!==v)){const e=/* @__PURE__ */new Date
|
|
471
|
+
return new Date(e.getFullYear(),e.getMonth(),e.getDate(),y,p,m,h)}if(null===r||null===u||null===d)return null
|
|
472
|
+
const k=new Date(r,u,d,y,p,m,h)
|
|
473
|
+
return k.getFullYear()!==r||k.getMonth()!==u||k.getDate()!==d||k.getHours()!==y||k.getMinutes()!==p||k.getSeconds()!==m?null:k}function fn(e){const t=new Date(e)
|
|
474
|
+
return t.setHours(0,0,0,0),t}function pn(e){const t=new Date(e)
|
|
475
475
|
return t.setHours(23,59,59,999),t}function mn(e,t){const l=new Date(e)
|
|
476
476
|
return l.setDate(l.getDate()+t),l}function hn(e,t){const l=new Date(e)
|
|
477
|
-
return l.setMonth(l.getMonth()+t),l}function
|
|
477
|
+
return l.setMonth(l.getMonth()+t),l}function bn(e){return new Date(e.getFullYear(),e.getMonth(),1)}function gn(e){return new Date(e.getFullYear(),e.getMonth()+1,0)}function yn(e,t,l){if(l.startsWith("'")){const a=l.slice(1,-1).replace(/''/g,"'")
|
|
478
478
|
return e.slice(t).startsWith(a)?t+a.length:null}if("a"===l){const l=e.slice(t),a=l.match(/^\s*(AM|PM)/i)
|
|
479
479
|
return a?t+a[0].length:l.startsWith(" ")?t+1:null}return t>=e.length||e[t]!==l?null:t+1}function kn(e,t,l){let a=l
|
|
480
480
|
return"MM"!==e&&"M"!==e||(a=Math.min(12,Math.max(1,l))),"dd"!==e&&"d"!==e||(a=Math.min(31,Math.max(1,l))),"HH"!==e&&"H"!==e||(a=Math.min(23,Math.max(0,l))),"hh"!==e&&"h"!==e||(a=Math.min(12,Math.max(1,l))),"mm"!==e&&"m"!==e&&"ss"!==e&&"s"!==e||(a=Math.min(59,Math.max(0,l))),t.length>1?Ka(a,t.length):0!==a||"hh"!==e&&"h"!==e&&"MM"!==e&&"M"!==e&&"dd"!==e&&"d"!==e?String(a):"1"}function _n(e,t){let l=null,a=null,n=-1,o=0,i=null,s=0
|
|
481
|
-
for(const d of t){if(d.startsWith("'")){const t=
|
|
481
|
+
for(const d of t){if(d.startsWith("'")){const t=yn(e,s,d)
|
|
482
482
|
if(null===t)break
|
|
483
483
|
s=t
|
|
484
484
|
continue}const t="yyyy"===d?4:"yy"===d||["MM","dd","M","d"].includes(d)?2:0
|
|
485
|
-
if(0===t){const t=
|
|
485
|
+
if(0===t){const t=yn(e,s,d)
|
|
486
486
|
if(null===t)break
|
|
487
487
|
s=t
|
|
488
488
|
continue}const r=e.slice(s).match(/^\d+/)?.[0]?.slice(0,t)??""
|
|
@@ -496,11 +496,11 @@ if(i<=r)return e
|
|
|
496
496
|
const u=o>1?Ka(r,o):String(r)
|
|
497
497
|
return`${e.slice(0,n)}${u}${e.slice(n+o)}`}function qn(e,t,l){const a=t.match(/yyyy|yy|MMMM|MMM|MM|M|dd|d|EEEE|EEE|HH|H|hh|h|mm|m|ss|s|SSS|S|a|'(?:''|[^'])*'|./g)??[]
|
|
498
498
|
let n=e,o=0
|
|
499
|
-
for(const i of a){if(i.startsWith("'")){const e=
|
|
499
|
+
for(const i of a){if(i.startsWith("'")){const e=yn(n,o,i)
|
|
500
500
|
if(null===e)break
|
|
501
501
|
o=e
|
|
502
502
|
continue}const e="yyyy"===i?4:"yy"===i?2:"SSS"===i?3:"S"===i?1:["MM","dd","HH","hh","mm","ss","M","d","H","h","m","s"].includes(i)?2:0
|
|
503
|
-
if(0===e){const e=
|
|
503
|
+
if(0===e){const e=yn(n,o,i)
|
|
504
504
|
if(null===e)break
|
|
505
505
|
o=e
|
|
506
506
|
continue}const t=n.slice(o).match(/^\d+/)?.[0]?.slice(0,e)??""
|
|
@@ -558,80 +558,80 @@ else{if(o&&t===o)break
|
|
|
558
558
|
a++}}}else if(i===o)l+=o,a++
|
|
559
559
|
else if(/\d/.test(i))l+=o
|
|
560
560
|
else{if(Bn(i,t,n+1,e,a)){l+=o,n++
|
|
561
|
-
continue}a++}}n++}return l}var Ln={key:0,ref:"calendar",class:"q-date-time-picker__calendar"},Dn={class:"q-date-time-picker__header"},En={class:"q-date-time-picker__weekdays"},
|
|
562
|
-
let P=null,F=!1,
|
|
561
|
+
continue}a++}}n++}return l}var Ln={key:0,ref:"calendar",class:"q-date-time-picker__calendar"},Dn={class:"q-date-time-picker__header"},En={class:"q-date-time-picker__weekdays"},Sn={key:1,class:"q-date-time-picker__time"},Vn={key:0,class:"q-date-time-picker__time-period"},An={class:"q-date-time-picker__time-inputs"},Qn={class:"q-date-time-picker__time-input-group"},zn={class:"q-date-time-picker__time-input-group"},In={class:"q-date-time-picker__time-input-group"},Tn={key:2,class:"q-date-time-picker__month-grid"},Pn={key:3,class:"q-date-time-picker__year"},Fn={class:"q-date-time-picker__year-change"},Rn={class:"q-date-time-picker__year-interval"},Hn={class:"q-date-time-picker__year-grid"},Un={class:"q-date-time-picker__bottom-bar"},Wn=1001,On=9999,Nn=26,jn=Me(/*@__PURE__*/v({inheritAttrs:!1,__name:"QDateTimePicker",props:/*@__PURE__*/g({id:{},class:{},label:{},required:{type:Boolean},for:{},labelPosition:{},size:{},readonly:{type:Boolean},disabled:{type:Boolean},invalid:{type:Boolean},placeholder:{},inline:{type:Boolean,default:!1},clearable:{type:Boolean},format:{default:"dd/MM/yyyy HH:mm"},range:{type:Boolean},icons:{default:()=>za},texts:{default:()=>Ia}},{modelValue:{},modelModifiers:{}}),emits:/*@__PURE__*/g(["open","close"],["update:modelValue"]),setup(t,{emit:l}){const a=t,d=l,v=W(t,"modelValue"),f=n({get:()=>v.value,set:e=>v.value=e||void 0}),m=n(()=>a.readonly||a.disabled?void 0:a.placeholder),h=n(()=>Na(a.format)),b=n(()=>ja(a.format)),g=n(()=>Ya(a.format)),w=n(()=>Ga(a.format)),x=n(()=>Q.value===/* @__PURE__ */(new Date).getMonth()&&z.value===/* @__PURE__ */(new Date).getFullYear()),M=E(!1),B=E(!1),L=E(""),D=E(null),A=E("date"),Q=E(/* @__PURE__ */(new Date).getMonth()),z=E(/* @__PURE__ */(new Date).getFullYear()),T=E(/* @__PURE__ */(new Date).getFullYear())
|
|
562
|
+
let P=null,F=!1,H=!1,U=!1,O=null
|
|
563
563
|
function j(){queueMicrotask(()=>{requestAnimationFrame(()=>{const e=Lt(),t=document.activeElement
|
|
564
564
|
e&&(t===e||t instanceof Node&&G.value?.contains(t))&&(F=!0)})})}const Y=N("field"),G=N("menu"),K=N("calendar"),Z=N("monthHeader"),ee=N("yearHeader"),te=N("toggleTime"),le=/* @__PURE__ */new Map,ae=/* @__PURE__ */new Map
|
|
565
565
|
function ne(e){if(!e)return null
|
|
566
566
|
if(e instanceof HTMLElement)return e
|
|
567
567
|
if("object"==typeof e&&"$el"in e){const t=e.$el
|
|
568
568
|
return t instanceof HTMLElement?t:null}return null}const oe=n(()=>({getMonthIndex:(e,t)=>{const l=e.toLowerCase()
|
|
569
|
-
return
|
|
569
|
+
return Ta.findIndex(e=>{const n=a.texts[e]??e
|
|
570
570
|
return(t?n.substring(0,3):n).toLowerCase()===l})},getWeekdayIndex:(e,t)=>{const l=e.toLowerCase()
|
|
571
571
|
for(let n=0;n<7;n++){const e=Pa[(n+6)%7],o=a.texts[e]??e
|
|
572
|
-
if((t?o.substring(0,3):o).toLowerCase()===l)return n}return null}})),ie=n(()=>{const e=
|
|
573
|
-
return e?e instanceof Date?e:Array.isArray(e)&&e.length>0?e[0]:"string"==typeof e?vt(e):null:null}),se=n(()=>{const e=
|
|
574
|
-
return Array.isArray(e)&&e.length>1?e[1]:null}),re=E(null),ue=E(null),de=E(null),ce=E(!1),ve=n(()=>ce.value&&re.value?de.value&&de.value<re.value?de.value:re.value:ie.value),
|
|
572
|
+
if((t?o.substring(0,3):o).toLowerCase()===l)return n}return null}})),ie=n(()=>{const e=f.value
|
|
573
|
+
return e?e instanceof Date?e:Array.isArray(e)&&e.length>0?e[0]:"string"==typeof e?vt(e):null:null}),se=n(()=>{const e=f.value
|
|
574
|
+
return Array.isArray(e)&&e.length>1?e[1]:null}),re=E(null),ue=E(null),de=E(null),ce=E(!1),ve=n(()=>ce.value&&re.value?de.value&&de.value<re.value?de.value:re.value:ie.value),fe=n(()=>{if(!a.range)return ie.value
|
|
575
575
|
if(!ce.value||!re.value)return se.value
|
|
576
576
|
const e=de.value??ue.value
|
|
577
|
-
return e?e<re.value?re.value:e:null}),
|
|
577
|
+
return e?e<re.value?re.value:e:null}),pe=n(()=>({getMonthName:(e,t)=>{const l=qe(e)
|
|
578
578
|
return t?l.substring(0,3):l},getWeekdayName:(e,t)=>{const l=Pa[(e+6)%7],n=a.texts[l]??l
|
|
579
|
-
return t?n.substring(0,3):n}})),me=n(()=>{const e=
|
|
579
|
+
return t?n.substring(0,3):n}})),me=n(()=>{const e=f.value
|
|
580
580
|
if(!e)return""
|
|
581
|
-
if(Array.isArray(e))return e.map(e=>e instanceof Date?cn(e,a.format,
|
|
582
|
-
if(e instanceof Date)return cn(e,a.format,
|
|
581
|
+
if(Array.isArray(e))return e.map(e=>e instanceof Date?cn(e,a.format,pe.value):e).join(" - ")
|
|
582
|
+
if(e instanceof Date)return cn(e,a.format,pe.value)
|
|
583
583
|
if("string"==typeof e){const t=vt(e)
|
|
584
|
-
return t?cn(t,a.format,
|
|
585
|
-
function
|
|
586
|
-
const
|
|
587
|
-
for(let u=l-1;u>=0;u--)
|
|
588
|
-
for(let u=1;u<=t;u++)
|
|
584
|
+
return t?cn(t,a.format,pe.value):String(e)}return String(e)}),he=n(()=>D.value??me.value)
|
|
585
|
+
function be(){L.value=he.value}X(he,()=>{B.value||be()},{immediate:!0})
|
|
586
|
+
const ge=n(()=>{const e=bn(new Date(z.value,Q.value,1)),t=sn(Q.value,z.value),l=(e.getDay()+6)%7,a=[],n=0===Q.value?11:Q.value-1,o=0===Q.value?z.value-1:z.value,i=sn(n,o)
|
|
587
|
+
for(let u=l-1;u>=0;u--)ye(a,new Date(o,n,i-u),!1)
|
|
588
|
+
for(let u=1;u<=t;u++)ye(a,new Date(z.value,Q.value,u),!0)
|
|
589
589
|
const s=7-a.length%7,r=7===s?0:s
|
|
590
|
-
for(let u=1;u<=r;u++)
|
|
590
|
+
for(let u=1;u<=r;u++)ye(a,new Date(z.value,Q.value+1,u),!1)
|
|
591
591
|
return a})
|
|
592
|
-
function
|
|
592
|
+
function ye(e,t,l){const a=ve.value,n=fe.value,o=t.getFullYear(),i=o<Wn||o>On
|
|
593
593
|
e.push({date:t,isCurrentMonth:l,isToday:un(t,/* @__PURE__ */new Date),isSelected:!!a&&un(t,a),isRangeStart:!!a&&un(t,a),isRangeEnd:!!n&&un(t,n),isInRange:!(!a||!n)&&dn(t,a,n),isDisabled:i})}const ke=n(()=>Pa.map(e=>{const t=e
|
|
594
594
|
return a.texts[t]?.substring(0,2)??e})),_e=n(()=>Array.from({length:12},(e,t)=>qe(t,3)))
|
|
595
|
-
function qe(e,t=0){const l=
|
|
595
|
+
function qe(e,t=0){const l=Ta[e],n=a.texts[l]??Ta[e]
|
|
596
596
|
return t<=0?n:n.substring(0,t)}function we(e){let t=e-Math.floor(13),l=t+Nn
|
|
597
|
-
return t<
|
|
598
|
-
return Array.from({length:l-t+1},(e,l)=>t+l)}(
|
|
599
|
-
function
|
|
600
|
-
|
|
601
|
-
const Pe=n(()=>a.clearable&&!a.readonly&&!a.disabled&&
|
|
602
|
-
function Fe(){Pe.value&&(Xe(),
|
|
603
|
-
!t||l&&t.contains(l)||
|
|
597
|
+
return t<Wn&&(t=Wn,l=Math.min(t+Nn,On)),l>On&&(l=On,t=Math.max(Wn,l-Nn)),{startYear:t,endYear:l}}function xe(){Be.value&&(T.value-=Nn)}function $e(){Ce.value&&(T.value+=Nn)}const Me=n(()=>we(T.value)),Be=n(()=>Me.value.startYear>Wn),Ce=n(()=>Me.value.endYear<On),Le=n(()=>0===Q.value?z.value-1:z.value),De=n(()=>11===Q.value?z.value+1:z.value),Ee=n(()=>Le.value>=Wn),Se=n(()=>De.value<=On),Ve=n(()=>function(e){const{startYear:t,endYear:l}=we(e)
|
|
598
|
+
return Array.from({length:l-t+1},(e,l)=>t+l)}(T.value)),Ae=n(()=>w.value?a.icons.clock:a.icons.calendar),Qe=n(()=>`${a.format} - ${a.format}`),ze=n(()=>Oa(a.format)),Ie=n(()=>`${ze.value} - ${ze.value}`)
|
|
599
|
+
function Te(e){return void 0!==e&&("string"==typeof e?e.trim().length>0:e instanceof Date||!!Array.isArray(e)&&e.length>0)}X(()=>Y?.value?.inputRef,(e,t,l)=>{const a=Ct(e)
|
|
600
|
+
O=a,a&&(a.addEventListener("click",Mt),l(()=>{O=null,a.removeEventListener("click",Mt)}))},{flush:"post"}),X(f,()=>{D.value=null,be()})
|
|
601
|
+
const Pe=n(()=>a.clearable&&!a.readonly&&!a.disabled&&Te(f.value))
|
|
602
|
+
function Fe(){Pe.value&&(Xe(),f.value=void 0,L.value="",Ht())}function Re(e){a.range&&ce.value&&re.value&&(e.getFullYear()<Wn||e.getFullYear()>On||(de.value=new Date(e)))}function He(){de.value=null}function Ue(e){const t=e.currentTarget,l=e.relatedTarget
|
|
603
|
+
!t||l&&t.contains(l)||He()}function We(e){if(!a.range||!ce.value||!re.value)return
|
|
604
604
|
const t=e.touches.item(0)
|
|
605
605
|
if(!t)return
|
|
606
606
|
const l=document.elementFromPoint(t.clientX,t.clientY)?.closest("[data-day-index]")
|
|
607
607
|
if(!l)return
|
|
608
608
|
const n=Number(l.dataset.dayIndex)
|
|
609
609
|
if(Number.isNaN(n))return
|
|
610
|
-
const o=
|
|
611
|
-
o&&
|
|
612
|
-
const e=
|
|
610
|
+
const o=ge.value[n]
|
|
611
|
+
o&&Re(o.date)}function Oe(e,t){z.value=e,t&&It("year")}function Ne(e,t){Q.value=e,t&&It("month")}function je(){Ee.value&&(0===Q.value?(Ne(11),Oe(z.value-1)):Ne(Q.value-1))}function Ye(){Se.value&&(11===Q.value?(Ne(0),Oe(z.value+1)):Ne(Q.value+1))}function Ge(){Ne(/* @__PURE__ */(new Date).getMonth()),Oe(/* @__PURE__ */(new Date).getFullYear()),zt()}function Ke(e){return a.range?1===e?se.value??ue.value:ie.value??re.value:ie.value}function Xe(){re.value=null,ue.value=null,de.value=null,ce.value=!1}function Ze(){if(!a.range||!w.value)return
|
|
612
|
+
const e=f.value
|
|
613
613
|
if(!Array.isArray(e)||e.length<2)return
|
|
614
614
|
const t=e[0],l=e[1]
|
|
615
|
-
t instanceof Date&&l instanceof Date&&!(l>=t)&&(
|
|
615
|
+
t instanceof Date&&l instanceof Date&&!(l>=t)&&(f.value=function(e,t){return t<e?[new Date(t),new Date(e)]:[new Date(e),new Date(t)]}(t,l))}function Je(e,t){const l=Ke(e)??(()=>{const e=/* @__PURE__ */new Date
|
|
616
616
|
return e.setHours(0,0,0,0),e})(),n=new Date(l)
|
|
617
|
-
t(n),function(e,t){if(!a.range)return void(
|
|
617
|
+
t(n),function(e,t){if(!a.range)return void(f.value=t)
|
|
618
618
|
if(w.value){0===e?re.value=t:ue.value=t
|
|
619
619
|
const l=0===e?t:ie.value??re.value,a=1===e?t:se.value
|
|
620
620
|
if(!l||!a)return
|
|
621
|
-
return
|
|
621
|
+
return f.value=[new Date(l),new Date(a)],void Xe()}if(ce.value)return void(0===e&&(re.value=t))
|
|
622
622
|
const l=ie.value,n=se.value
|
|
623
|
-
l&&n&&(
|
|
624
|
-
if(!t)return
|
|
623
|
+
l&&n&&(f.value=1===e?[l,t]:[t,n])}(e,n)}function tt(e){const t=Ke(e)
|
|
624
|
+
if(!t)return g.value?12:0
|
|
625
625
|
const l=t.getHours()
|
|
626
|
-
return
|
|
626
|
+
return g.value?l%12||12:l}function lt(e){return Ke(e)?.getSeconds()??0}function at(e){const t=Ke(e)
|
|
627
627
|
return!!t&&t.getHours()>=12}function nt(e,t){return t?12===e?12:e+12:12===e?0:e}function ot(e,t){const l=e>=12,a=e%12||12
|
|
628
628
|
return 1===t?a>=12?nt(1,l):11===a?nt(12,!l):nt(a+1,l):a<=1?nt(12,l):12===a?nt(11,!l):nt(a-1,l)}function it(e){return(e??"").replace(/\D/g,"")}function st(e){return Math.min(59,Math.max(0,e))}function rt(e,t){const l=it(e).slice(0,2)
|
|
629
629
|
if(""===l)return
|
|
630
630
|
const a=Number.parseInt(l,10)
|
|
631
631
|
if(Number.isNaN(a))return
|
|
632
|
-
const n=
|
|
632
|
+
const n=g.value?(o=a,Math.min(12,Math.max(1,o))):function(e){return Math.min(23,Math.max(0,e))}(a)
|
|
633
633
|
var o
|
|
634
|
-
Je(t,e=>{
|
|
634
|
+
Je(t,e=>{g.value?e.setHours(nt(n,e.getHours()>=12)):e.setHours(n)})}function ut(e,t){const l=it(e).slice(0,2)
|
|
635
635
|
if(""===l)return
|
|
636
636
|
const a=Number.parseInt(l,10)
|
|
637
637
|
if(Number.isNaN(a))return
|
|
@@ -664,29 +664,29 @@ const l=/[A-Za-z]/.test(e),a=/^\d{4}[-/]\d{1,2}[-/]\d{1,2}(?:[ T]\d{1,2}:\d{2}(?
|
|
|
664
664
|
if(!l&&!a)return null
|
|
665
665
|
const n=new Date(e)
|
|
666
666
|
return Number.isNaN(n.getTime())?null:n}(l)
|
|
667
|
-
return i||(t?.complete?nn(l,a.format,oe.value):null)}function
|
|
667
|
+
return i||(t?.complete?nn(l,a.format,oe.value):null)}function ft(e){if(a.readonly||a.disabled)return void be()
|
|
668
668
|
const t=e??""
|
|
669
|
-
D.value=t,L.value=t}function
|
|
669
|
+
D.value=t,L.value=t}function pt(e,t){const l=e.split(" - ")
|
|
670
670
|
if(2!==l.length)return null
|
|
671
671
|
const a=l[0]?.trim()??"",n=l[1]?.trim()??"",o=vt(a,t),i=vt(n,t)
|
|
672
672
|
return o&&i?(ht(a)&&ht(n)?i<o:Date.UTC(i.getFullYear(),i.getMonth(),i.getDate())<Date.UTC(o.getFullYear(),o.getMonth(),o.getDate()))?{range:[i,o],startSource:n,endSource:a}:{range:[o,i],startSource:a,endSource:n}:null}function mt(){if(a.readonly||a.disabled)return!1
|
|
673
673
|
const e=qn(D.value??L.value,a.range?Qe.value:a.format,{padMaxDigits:!0})
|
|
674
|
-
if(!e)return D.value=null,
|
|
675
|
-
if(a.range){const t=Cn(e,Ie.value),l=
|
|
674
|
+
if(!e)return D.value=null,Te(f.value)&&(f.value=void 0),L.value="",!1
|
|
675
|
+
if(a.range){const t=Cn(e,Ie.value),l=pt(e,{complete:!0})??pt(t,{complete:!0})
|
|
676
676
|
if(l){const e=function(e,t,l){if(!h.value)return e
|
|
677
677
|
const[a,n]=e,o=new Date(a),i=new Date(n)
|
|
678
678
|
ht(t)||o.setHours(0,0,0,0)
|
|
679
|
-
ht(l)||i.setHours(23,59,
|
|
679
|
+
ht(l)||i.setHours(23,59,b.value?59:0,0)
|
|
680
680
|
return[o,i]}(l.range,l.startSource,l.endSource)
|
|
681
|
-
return
|
|
682
|
-
if(!l)return D.value=null,
|
|
681
|
+
return f.value=e,D.value=null,L.value=e.map(e=>cn(e,a.format,pe.value)).join(" - "),!0}return D.value=null,be(),!1}const t=qn(Cn(e,ze.value),a.format),l=vt(e,{complete:!0})??nn(t,a.format,oe.value)
|
|
682
|
+
if(!l)return D.value=null,be(),!1
|
|
683
683
|
const n=function(e,...t){if(!h.value||a.range)return e
|
|
684
684
|
if(t.some(e=>ht(e)))return e
|
|
685
685
|
const l=new Date(e)
|
|
686
|
-
return
|
|
687
|
-
return
|
|
688
|
-
e.setHours(t.getHours(),t.getMinutes(),
|
|
689
|
-
|
|
686
|
+
return bt(l),l}(l,e,t)
|
|
687
|
+
return f.value=n,D.value=null,L.value=cn(n,a.format,pe.value),!0}function ht(e){return!h.value||(!!an(e,a.format)||(/\dT\d/i.test(e)||/\d{1,2}:\d{2}/.test(e)))}function bt(e){const t=/* @__PURE__ */new Date
|
|
688
|
+
e.setHours(t.getHours(),t.getMinutes(),b.value?t.getSeconds():0,b.value?t.getMilliseconds():0)}function yt(e){if(!(e.target instanceof Node&&G.value?.contains(e.target)))return
|
|
689
|
+
H=!0
|
|
690
690
|
const t=function(e){const t=e.target
|
|
691
691
|
if(!(t instanceof Element&&G.value))return null
|
|
692
692
|
const l=t.closest("button, input, select, textarea, a[href], [tabindex], [contenteditable]")
|
|
@@ -697,53 +697,53 @@ if("Tab"===e.key)G.value?.setAttribute("inert",""),U=!0,M.value=!1
|
|
|
697
697
|
else if("ArrowDown"===e.key){M.value=!0,await k()
|
|
698
698
|
const[t]=kt()
|
|
699
699
|
if(!t)return
|
|
700
|
-
e.preventDefault(),
|
|
700
|
+
e.preventDefault(),H=!0,t.focus()}}}function qt(){Ht()}async function wt(e){if("Tab"!==e.key)return
|
|
701
701
|
const t=kt()
|
|
702
702
|
if(!t.length)return
|
|
703
703
|
const l=t[0],a=t[t.length-1],n=document.activeElement
|
|
704
704
|
if(e.shiftKey){if(n!==l)return
|
|
705
|
-
return e.preventDefault(),
|
|
705
|
+
return e.preventDefault(),H=!1,void Ht()}n===a&&(Ht(),U=!1,M.value=!1)}async function xt(e){if(mt(),H)return void(H=!1)
|
|
706
706
|
const t=e?.relatedTarget
|
|
707
707
|
if(t instanceof Node&&G.value?.contains(t))return
|
|
708
708
|
await k()
|
|
709
709
|
const l=Lt(),a=document.activeElement
|
|
710
|
-
l!==a&&(a instanceof Node&&G.value?.contains(a)||(F=!1,M.value=!1,B.value=!1))}function $t(){a.readonly||a.disabled||(B.value=!0,F?F=!1:M.value||(M.value=!0))}function Mt(){a.readonly||a.disabled||(F=!1,M.value=!0)}function Bt(e){e||j(),M.value=e}function Ct(e){return e instanceof HTMLInputElement?e:"object"==typeof e&&null!==e&&"value"in e&&e.value instanceof HTMLInputElement?e.value:null}function Lt(){if(
|
|
710
|
+
l!==a&&(a instanceof Node&&G.value?.contains(a)||(F=!1,M.value=!1,B.value=!1))}function $t(){a.readonly||a.disabled||(B.value=!0,F?F=!1:M.value||(M.value=!0))}function Mt(){a.readonly||a.disabled||(F=!1,M.value=!0)}function Bt(e){e||j(),M.value=e}function Ct(e){return e instanceof HTMLInputElement?e:"object"==typeof e&&null!==e&&"value"in e&&e.value instanceof HTMLInputElement?e.value:null}function Lt(){if(O)return O
|
|
711
711
|
const e=Ct(Y.value?.inputRef)
|
|
712
|
-
if(e)return
|
|
712
|
+
if(e)return O=e,e
|
|
713
713
|
const t=ne(Y.value?.fieldRef)?.querySelector(".q-text-field__input")??null
|
|
714
|
-
return t?(
|
|
715
|
-
G.value?.focus(),
|
|
716
|
-
"date"!==e&&It(e)}async function Pt(){
|
|
714
|
+
return t?(O=t,t):null}function Dt(e){return e.isSelected||e.isRangeStart||e.isRangeEnd?"bold":e.isInRange?"tonal":"ghost"}function Et(e){G.value?.style.setProperty("--q-date-view-height",`${Math.max(0,e)}px`)}async function St(){M.value&&!w.value?"date"===A.value&&(await k(),Et(K.value?.getBoundingClientRect().height??0)):Et(0)}function Vt(){P?.disconnect(),P=null}async function At(){M.value&&!w.value&&"date"===A.value&&(await k(),K.value&&(Vt(),P=new MutationObserver(()=>{St()}),P.observe(K.value,{childList:!0,subtree:!0,attributes:!0,characterData:!0}),St()))}function Qt(){A.value="time",Vt()}function zt(){A.value="date",At()}async function It(e){var t
|
|
715
|
+
G.value?.focus(),zt(),await k(),t="year"===e?ee.value:"month"===e?Z.value:"time"===e?te.value:null,ne(t)?.focus()}function Tt(){const e=A.value
|
|
716
|
+
"date"!==e&&It(e)}async function Pt(){Vt(),A.value="month",await k()
|
|
717
717
|
const e=le.get(Q.value)
|
|
718
|
-
e?.scrollIntoView({block:"center"}),e?.focus()}async function Ft(){
|
|
719
|
-
if(F=!0,"date"===A.value||w.value)return e.preventDefault(),M.value=!1,await k(),void
|
|
718
|
+
e?.scrollIntoView({block:"center"}),e?.focus()}async function Ft(){Vt(),T.value=z.value,A.value="year",await k(),ae.get(T.value)?.scrollIntoView({block:"center"})}async function Rt(e){if("Escape"!==e.key)return
|
|
719
|
+
if(F=!0,"date"===A.value||w.value)return e.preventDefault(),M.value=!1,await k(),void Wt()
|
|
720
720
|
e.preventDefault()
|
|
721
721
|
const t=A.value
|
|
722
|
-
await It(t)}function
|
|
723
|
-
return!!t&&(e===t||(!e||!e.isConnected||(!!function(e){return!e||e===document.body||e===document.documentElement}(e)||(!!G.value?.contains(e)||!function(e,t){return!e.closest(".q-date-time-picker__menu")&&!t.closest(".q-date-time-picker")?.contains(e)&&e instanceof HTMLElement&&(e.tabIndex>=0||e.matches('input, select, textarea, button, a[href], [tabindex]:not([tabindex="-1"])'))}(e,t)))))}function
|
|
722
|
+
await It(t)}function Ht(){Lt()?.focus()}function Ut(e){const t=Lt()
|
|
723
|
+
return!!t&&(e===t||(!e||!e.isConnected||(!!function(e){return!e||e===document.body||e===document.documentElement}(e)||(!!G.value?.contains(e)||!function(e,t){return!e.closest(".q-date-time-picker__menu")&&!t.closest(".q-date-time-picker")?.contains(e)&&e instanceof HTMLElement&&(e.tabIndex>=0||e.matches('input, select, textarea, button, a[href], [tabindex]:not([tabindex="-1"])'))}(e,t)))))}function Wt(){k().then(()=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{!function(){if(U)return
|
|
724
724
|
const e=Lt()
|
|
725
|
-
e&&Ut(document.activeElement)&&(F=!0,e.focus())}()})})})}function
|
|
725
|
+
e&&Ut(document.activeElement)&&(F=!0,e.focus())}()})})})}function Ot(){j()
|
|
726
726
|
const e=U
|
|
727
|
-
U=!1,e||(F=!0,
|
|
728
|
-
Xe(),e?(document.addEventListener("keydown",
|
|
729
|
-
const t=
|
|
727
|
+
U=!1,e||(F=!0,Wt())}return X(f,()=>{ie.value&&(Ne(ie.value.getMonth()),Oe(ie.value.getFullYear()))}),X(M,(e,t)=>{if(e&&!1===t?d("open"):e||!0!==t||d("close"),w.value)return Vt(),Et(0),void(e?(document.addEventListener("keydown",Rt,{capture:!0}),Qt()):(t&&(Ze(),Ot()),document.removeEventListener("keydown",Rt,{capture:!0})))
|
|
728
|
+
Xe(),e?(document.addEventListener("keydown",Rt,{capture:!0}),function(){let e=ie.value
|
|
729
|
+
const t=f.value
|
|
730
730
|
if(a.range&&Array.isArray(t)&&t.length>0){const l=t[0]
|
|
731
|
-
l instanceof Date?e=l:"string"==typeof l&&(e=vn(l,a.format,oe.value))}e=e??/* @__PURE__ */new Date,Ne(e.getMonth()),
|
|
732
|
-
h.value&&n.setHours(23,59,
|
|
731
|
+
l instanceof Date?e=l:"string"==typeof l&&(e=vn(l,a.format,oe.value))}e=e??/* @__PURE__ */new Date,Ne(e.getMonth()),Oe(e.getFullYear()),zt()}(),At()):(t&&Ot(),document.removeEventListener("keydown",Rt,{capture:!0}),Vt(),Et(0))}),X(w,e=>{e&&Vt(),M.value=!1,e&&Et(0),e?Qt():zt()},{immediate:!0}),$(()=>{Vt(),document.removeEventListener("keydown",Rt,{capture:!0})}),(t,l)=>(C(),s(e,null,[c(R(Hl),y({id:a.id,ref:"field","model-value":L.value,class:["q-date-time-picker",a.class],clearable:Pe.value,"aria-label":a.label,label:a.label,"label-position":a.labelPosition,readonly:a.readonly,disabled:a.disabled,placeholder:m.value,required:a.required,size:a.size,invalid:a.invalid},t.$attrs,{onBlur:xt,"onClick:clear":Fe,onDrop:qt,onFocusin:$t,onKeydown:_t,"onUpdate:modelValue":ft}),u({prepend:J(()=>[c(R(gt),y({class:"q-date-time-picker__input-icon"},Ae.value),null,16)]),_:2},[t.$slots.extras?{name:"extras",fn:J(()=>[V(t.$slots,"extras")]),key:"0"}:void 0]),1040,["id","model-value","class","clearable","aria-label","label","label-position","readonly","disabled","placeholder","required","size","invalid"]),a.readonly||a.disabled?i("",!0):(C(),o(R(Da),{key:0,"model-value":M.value,anchor:Y.value?.fieldRef,inline:a.inline,offset:8,placement:"bottom",trigger:"manual",arrow:"","non-modal":"",spy:"","onUpdate:modelValue":Bt},{default:J(()=>[r("div",{ref:"menu",class:"q-date-time-picker__menu",tabindex:"-1",onPointerdownCapture:yt,onKeydown:wt},["date"===A.value?(C(),s("div",Ln,[r("div",Dn,[c(R(et),{variant:"ghost",disabled:!Ee.value,title:a.texts.previousMonth,onClick:je},{default:J(()=>[c(R(gt),q(p(a.icons.back)),null,16)]),_:1},8,["disabled","title"]),c(R(et),{ref:"monthHeader","data-testid":"q-date-time-picker-month-header",variant:"ghost",label:qe(Q.value,3),title:a.texts.pickMonth,onClick:Pt},null,8,["label","title"]),c(R(et),{ref:"yearHeader","data-testid":"q-date-time-picker-year-header",variant:"ghost",label:z.value.toString(),title:a.texts.pickYear,onClick:Ft},null,8,["label","title"]),c(R(et),{variant:"ghost",disabled:!Se.value,title:a.texts.nextMonth,onClick:Ye},{default:J(()=>[c(R(gt),q(p(a.icons.forward)),null,16)]),_:1},8,["disabled","title"])]),r("div",En,[(C(!0),s(e,null,S(ke.value,e=>(C(),s("div",{key:e,class:"q-date-time-picker__weekday"},I(e),1))),128))]),r("div",{class:"q-date-time-picker__days",onMouseleave:He,onFocusout:Ue,onTouchstartPassive:We,onTouchmovePassive:We},[(C(!0),s(e,null,S(ge.value,(e,t)=>(C(),o(R(et),{key:t,"data-day-index":t,class:_(["q-date-time-picker__day",{"q-date-time-picker__day--other-month":!e.isCurrentMonth,"q-date-time-picker__day--today":e.isToday,"q-date-time-picker__day--selected":e.isSelected,"q-date-time-picker__day--in-range":e.isInRange,"q-date-time-picker__day--range-start":e.isRangeStart,"q-date-time-picker__day--range-end":e.isRangeEnd}]),label:e.date.getDate().toString(),variant:Dt(e),disabled:e.isDisabled,onMouseenter:()=>Re(e.date),onFocus:()=>Re(e.date),onClick:()=>function(e){if(!a.readonly&&!a.disabled&&!(e.getFullYear()<Wn||e.getFullYear()>On))if(a.range)if(ce.value){const t=re.value??new Date(e),l=new Date(e),[a,n]=l<t?[l,t]:[t,l]
|
|
732
|
+
h.value&&n.setHours(23,59,b.value?59:0,0),f.value=[a,n],re.value=null,ue.value=null,de.value=null,ce.value=!1}else{const t=new Date(e)
|
|
733
733
|
h.value&&re.value&&t.setHours(re.value.getHours(),re.value.getMinutes(),re.value.getSeconds(),re.value.getMilliseconds()),re.value=t,ue.value=null,de.value=null,ce.value=!0}else{const t=new Date(e)
|
|
734
|
-
ie.value&&!function(e){return 0===e.getHours()&&0===e.getMinutes()&&0===e.getSeconds()&&0===e.getMilliseconds()}(ie.value)?t.setHours(ie.value.getHours(),ie.value.getMinutes(),ie.value.getSeconds()):h.value&&
|
|
735
|
-
t.setHours(nt(l,e))})}(e??!1,t-1)},null,8,["model-value","false-label","true-label","onUpdate:modelValue"])])):i("",!0),r("div",An,[r("div",Qn,[c(
|
|
736
|
-
var n}),128))])):"month"===A.value?(C(),s("div",
|
|
737
|
-
l?le.set(t,l):le.delete(t)}(e,t),"data-testid":"q-date-time-picker-month-option","data-month-index":t,disabled:Q.value===t,label:e,title:qe(t),variant:"ghost",onClick:()=>Ne(t,!0)},null,8,["data-month-index","disabled","label","title","onClick"]))),128))])):"year"===A.value?(C(),s("div",Pn,[r("div",Fn,[c(
|
|
738
|
-
l?ae.set(t,l):ae.delete(t)}(t,e),"data-testid":"q-date-time-picker-year-option","data-year":e,disabled:
|
|
739
|
-
function
|
|
740
|
-
e.action?.(
|
|
741
|
-
function co(){return{...uo,addDialog:function(e,t,l,a){const n=
|
|
734
|
+
ie.value&&!function(e){return 0===e.getHours()&&0===e.getMinutes()&&0===e.getSeconds()&&0===e.getMilliseconds()}(ie.value)?t.setHours(ie.value.getHours(),ie.value.getMinutes(),ie.value.getSeconds()):h.value&&bt(t),f.value=t}}(e.date)},null,8,["data-day-index","class","label","variant","disabled","onMouseenter","onFocus","onClick"]))),128))],32)],512)):"time"===A.value?(C(),s("div",Sn,[(C(!0),s(e,null,S(a.range?2:1,t=>{return C(),s("div",{key:t,class:"q-date-time-picker__time-group"},[g.value?(C(),s("div",Vn,[c(R(Wa),{"model-value":at(t-1),"show-state-labels":"",size:"small","false-label":a.texts.am,"true-label":a.texts.pm,"onUpdate:modelValue":e=>function(e,t){Je(t,t=>{const l=t.getHours()%12||12
|
|
735
|
+
t.setHours(nt(l,e))})}(e??!1,t-1)},null,8,["model-value","false-label","true-label","onUpdate:modelValue"])])):i("",!0),r("div",An,[r("div",Qn,[c(R(et),{variant:"ghost",title:a.texts.increaseHour,onClick:e=>{Je(t-1,e=>{g.value?e.setHours(ot(e.getHours(),1)):e.setHours(e.getHours()>=23?0:e.getHours()+1)})}},{default:J(()=>[c(R(gt),y({ref_for:!0},a.icons.up),null,16)]),_:1},8,["title","onClick"]),c(R(Hl),{class:"q-date-time-picker__time-number",size:"small",inputmode:"numeric","max-length":2,"model-value":R(Ka)(tt(t-1)),onKeydown:e=>ct(e,"hours",t-1),"onUpdate:modelValue":e=>rt(e,t-1)},null,8,["model-value","onKeydown","onUpdate:modelValue"]),c(R(et),{variant:"ghost",title:a.texts.decreaseHour,onClick:e=>{Je(t-1,e=>{g.value?e.setHours(ot(e.getHours(),-1)):e.setHours(e.getHours()<=0?23:e.getHours()-1)})}},{default:J(()=>[c(R(gt),y({ref_for:!0},a.icons.down),null,16)]),_:1},8,["title","onClick"])]),l[1]||(l[1]=r("div",{class:"q-date-time-picker__time-separator"},":",-1)),r("div",zn,[c(R(et),{variant:"ghost",title:a.texts.increaseMinute,onClick:e=>{Je(t-1,e=>{e.setMinutes(e.getMinutes()>=59?0:e.getMinutes()+1)})}},{default:J(()=>[c(R(gt),y({ref_for:!0},a.icons.up),null,16)]),_:1},8,["title","onClick"]),c(R(Hl),{class:"q-date-time-picker__time-number",size:"small",inputmode:"numeric","max-length":2,"model-value":R(Ka)((n=t-1,Ke(n)?.getMinutes()??0)),onKeydown:e=>ct(e,"minutes",t-1),"onUpdate:modelValue":e=>ut(e,t-1)},null,8,["model-value","onKeydown","onUpdate:modelValue"]),c(R(et),{variant:"ghost",title:a.texts.decreaseMinute,onClick:e=>function(e){Je(e,e=>{e.setMinutes(e.getMinutes()<=0?59:e.getMinutes()-1)})}(t-1)},{default:J(()=>[c(R(gt),y({ref_for:!0},a.icons.down),null,16)]),_:1},8,["title","onClick"])]),b.value?(C(),s(e,{key:0},[l[0]||(l[0]=r("div",{class:"q-date-time-picker__time-separator"},":",-1)),r("div",In,[c(R(et),{variant:"ghost",title:a.texts.increaseSecond,onClick:e=>function(e){Je(e,e=>{e.setSeconds(e.getSeconds()>=59?0:e.getSeconds()+1)})}(t-1)},{default:J(()=>[c(R(gt),y({ref_for:!0},a.icons.up),null,16)]),_:1},8,["title","onClick"]),c(R(Hl),{class:"q-date-time-picker__time-number",size:"small",inputmode:"numeric","max-length":2,"model-value":R(Ka)(lt(t-1)),onKeydown:e=>ct(e,"seconds",t-1),"onUpdate:modelValue":e=>dt(e,t-1)},null,8,["model-value","onKeydown","onUpdate:modelValue"]),c(R(et),{variant:"ghost",title:a.texts.decreaseSecond,onClick:e=>function(e){Je(e,e=>{e.setSeconds(e.getSeconds()<=0?59:e.getSeconds()-1)})}(t-1)},{default:J(()=>[c(R(gt),y({ref_for:!0},a.icons.down),null,16)]),_:1},8,["title","onClick"])])],64)):i("",!0)])])
|
|
736
|
+
var n}),128))])):"month"===A.value?(C(),s("div",Tn,[(C(!0),s(e,null,S(_e.value,(e,t)=>(C(),o(R(et),{key:t,ref_for:!0,ref:e=>function(e,t){const l=ne(e)
|
|
737
|
+
l?le.set(t,l):le.delete(t)}(e,t),"data-testid":"q-date-time-picker-month-option","data-month-index":t,disabled:Q.value===t,label:e,title:qe(t),variant:"ghost",onClick:()=>Ne(t,!0)},null,8,["data-month-index","disabled","label","title","onClick"]))),128))])):"year"===A.value?(C(),s("div",Pn,[r("div",Fn,[c(R(et),{variant:"ghost",disabled:!Be.value,title:a.texts.previousYears,onClick:xe},{default:J(()=>[c(R(gt),q(p(a.icons.back)),null,16)]),_:1},8,["disabled","title"]),r("div",Rn,I(Me.value.startYear)+" - "+I(Me.value.endYear),1),c(R(et),{variant:"ghost",disabled:!Ce.value,title:a.texts.nextYears,onClick:$e},{default:J(()=>[c(R(gt),q(p(a.icons.forward)),null,16)]),_:1},8,["disabled","title"])]),r("div",Hn,[(C(!0),s(e,null,S(Ve.value,(e,t)=>(C(),o(R(et),{key:t,ref_for:!0,ref:t=>function(e,t){const l=ne(e)
|
|
738
|
+
l?ae.set(t,l):ae.delete(t)}(t,e),"data-testid":"q-date-time-picker-year-option","data-year":e,disabled:z.value===e,label:e.toString(),title:e,variant:"ghost",onClick:()=>Oe(e,!0)},null,8,["data-year","disabled","label","title","onClick"]))),128))])])):i("",!0),r("div",Un,[w.value?i("",!0):(C(),o(R(et),{key:0,variant:"ghost",disabled:x.value,title:a.texts.today,onClick:Ge},{default:J(()=>[c(R(gt),q(p(a.icons.today)),null,16)]),_:1},8,["disabled","title"])),h.value&&"date"===A.value?(C(),o(R(et),{key:1,ref:"toggleTime","data-testid":"q-date-time-picker-toggle-time",variant:"ghost",title:a.texts.toggleMode,onClick:Qt},{default:J(()=>[c(R(gt),q(p(a.icons.clock)),null,16)]),_:1},8,["title"])):"date"===A.value||w.value?i("",!0):(C(),o(R(et),{key:2,"data-testid":"q-date-time-picker-toggle-date",variant:"ghost",title:a.texts.toggleMode,onClick:Tt},{default:J(()=>[c(R(gt),q(p(a.icons.calendar)),null,16)]),_:1},8,["title"])),a.clearable?(C(),o(R(et),{key:3,"data-testid":"q-date-time-picker-clear",variant:"ghost",disabled:!Pe.value,title:a.texts.clearValue,onClick:Fe},{default:J(()=>[c(R(gt),q(p(a.icons.delete)),null,16)]),_:1},8,["disabled","title"])):i("",!0)])],544)]),_:1},8,["model-value","anchor","inline"]))],64))}})),Yn=Me(/*@__PURE__*/v({__name:"QDefaultsProvider",props:{id:{},class:{},defaults:{}},setup:e=>(ve(P(e,"defaults")),(e,t)=>V(e.$slots,"default"))})),Gn=[{id:"button",icon:{icon:"check"},props:{variant:"bold",label:"Ok"}}],Kn={icon:"check-circle-outline"},Xn={close:{icon:"close"}},Zn={key:0,class:"q-dialog__header"},Jn={key:0,class:"q-dialog__header-title"},eo={key:1,class:"q-dialog__body"},to={key:0,class:"q-dialog__body-icon"},lo={class:"q-dialog__body-text"},ao=["innerHTML"],no={key:1},oo={key:0,class:"q-dialog__input"},io={key:2,class:"q-dialog__footer"},so={key:0,class:"q-dialog__footer-buttons"},ro=/*@__PURE__*/v({__name:"QDialog",props:{id:{},class:{},modelValue:{type:Boolean},title:{},text:{},icon:{default:()=>Kn},buttons:{default:()=>Gn},backdropBlur:{type:Boolean,default:!0},size:{default:"small"},centerVertically:{type:Boolean},attach:{default:"body"},inline:{type:Boolean},focusWrap:{type:Boolean,default:!0},initialFocus:{},focusWithinOnActivate:{type:Boolean,default:!0},closingFocus:{},returnFocusOnDeactivate:{type:Boolean,default:!0},dismissible:{type:Boolean},html:{type:Boolean,default:!0},input:{},icons:{default:()=>Xn}},emits:["update:modelValue","action"],setup(t,{emit:l}){const a=t,u=l,v=E(""),f=E(""),m=n(()=>["q-dialog",a.class]),h=n(()=>`q-overlay--${a.size}`)
|
|
739
|
+
function b(){k(!0)}function g(){k(!1)}function k(e){u("update:modelValue",e)}return(t,l)=>(C(),o(R(Da),{id:a.id,"model-value":a.modelValue,"backdrop-class":"q-dialog__underlay","scroll-lock":"",persistent:"",inline:a.inline,attach:a.attach,"backdrop-blur":a.backdropBlur,"center-vertically":a.centerVertically,"focus-wrap":a.focusWrap,"initial-focus":a.initialFocus,"focus-within-on-activate":a.focusWithinOnActivate,"closing-focus":a.closingFocus,"return-focus-on-deactivate":a.returnFocusOnDeactivate,class:_(h.value),onEnter:b,"onUpdate:modelValue":k},{default:J(()=>[r("div",{class:_(m.value)},[a.title||t.$slots.header||t.$slots["header.prepend"]||t.$slots["header.append"]?(C(),s("div",Zn,[V(t.$slots,"header",{},()=>[V(t.$slots,"header.prepend"),a.title?(C(),s("span",Jn,I(a.title),1)):i("",!0),V(t.$slots,"header.append")])])):i("",!0),a.icon||a.text||t.$slots.body?(C(),s("div",eo,[V(t.$slots,"body",{},()=>[V(t.$slots,"body.icon",{},()=>[a.icon?(C(),s("span",to,[c(R(gt),q(p(a.icon)),null,16)])):i("",!0)]),r("div",lo,[a.html?(C(),s("div",{key:0,innerHTML:a.text},null,8,ao)):(C(),s("div",no,I(a.text),1))]),a.input?(C(),s("div",oo,[c(R(Hl),{modelValue:v.value,"onUpdate:modelValue":l[0]||(l[0]=e=>v.value=e),invalid:!!f.value,placeholder:a.input?.placeholder,size:"block"},{extras:J(()=>[f.value?(C(),o(R(gt),{key:0,icon:"exclamation-sign"})):i("",!0),d(" "+I(f.value),1)]),_:1},8,["modelValue","invalid","placeholder"])])):i("",!0),V(t.$slots,"body.append")])])):i("",!0),a.buttons||t.$slots["footer.append"]?(C(),s("div",io,[a.buttons?(C(),s("span",so,[(C(!0),s(e,null,S(a.buttons,e=>(C(),o(R(et),y({ref_for:!0},e.props,{key:e.id,onClick:()=>function(e){if(u("action",e.id),e.action){if(a.input?.validator&&(f.value=a.input.validator(R(v)),R(f)))return
|
|
740
|
+
e.action?.(R(v))}g()}(e)}),{default:J(()=>[e.icon?(C(),o(R(gt),y({key:0,ref_for:!0},e.icon),null,16)):i("",!0)]),_:2},1040,["onClick"]))),128))])):i("",!0),V(t.$slots,"footer.append")])):i("",!0),a.dismissible?(C(),o(R(et),{key:3,class:"q-dialog__close",variant:"text",onClick:g},{default:J(()=>[c(R(gt),q(p(a.icons.close)),null,16)]),_:1})):i("",!0)],2)]),_:3},8,["id","model-value","inline","attach","backdrop-blur","center-vertically","focus-wrap","initial-focus","focus-within-on-activate","closing-focus","return-focus-on-deactivate","class"]))}}),uo=D({dialogs:[]})
|
|
741
|
+
function co(){return{...uo,addDialog:function(e,t,l,a){const n=zt(t).value
|
|
742
742
|
return uo.dialogs.push({id:n,props:{...e,modelValue:!0},options:l,handlers:a}),a?.onEnter&&a.onEnter(),n},removeDialog:function(e){const t=uo.dialogs.findIndex(t=>t.id===e);-1!==t&&(uo.dialogs[t]?.handlers?.onLeave?.()??1)&&uo.dialogs.splice(t,1)}}}var vo=/*@__PURE__*/v({inheritAttrs:!1,__name:"QDialogProvider",props:{inline:{type:Boolean}},emits:["leave"],setup(t,{emit:l}){const a=t,n=l,{dialogs:i,removeDialog:r}=co()
|
|
743
|
-
return(t,l)=>(C(!0),s(e,null,
|
|
743
|
+
return(t,l)=>(C(!0),s(e,null,S(R(i),e=>(C(),o(R(fo),y({key:e.id},{ref_for:!0},e.props,{inline:a.inline,onAction:e.handlers?.onAction,"onUpdate:modelValue":t=>function(e,t){t||(r(e),n("leave",e))}(e.id,t)}),null,16,["inline","onAction","onUpdate:modelValue"]))),128))}}),fo=Me(ro),po=Me(vo),mo=["id"],ho={class:"q-divider__label"},bo=Me(/*@__PURE__*/v({__name:"QDivider",props:{id:{},class:{},direction:{default:"horizontal"},inset:{type:Boolean},thickness:{default:1},color:{default:"neutral"}},setup(t){const l=t,a=n(()=>!!O().default),o=n(()=>["q-divider",`q-divider--${l.direction}`,{"q-divider--inset":l.inset,"q-divider--labeled":a.value},l.class]),{isUtilityColor:u,style:d}=Ke(P(l,"color")),c=n(()=>{const e={}
|
|
744
744
|
return l.thickness>=0&&1!==l.thickness&&(e["--q-divider-thickness"]=`${l.thickness}px`),"neutral"!==l.color&&(e["--q-divider-color"]=u.value?`var(--q-theme-${l.color})`:d.value?.mainColor),e})
|
|
745
|
-
return(t,n)=>(C(),s("div",{id:l.id,class:_(o.value),style:w(c.value),role:"separator"},[a.value?(C(),s(e,{key:0},[n[0]||(n[0]=r("div",{class:"q-divider__line"},null,-1)),r("span",ho,[
|
|
746
|
-
return(e,n)=>(C(),o(t,{to:"body"},[l.path?(C(),s("svg",{key:0,class:"q-safe-triangle","aria-hidden":"true",style:w(a.value)},[r("path",{class:"q-safe-triangle__path",d:l.path},null,8,
|
|
745
|
+
return(t,n)=>(C(),s("div",{id:l.id,class:_(o.value),style:w(c.value),role:"separator"},[a.value?(C(),s(e,{key:0},[n[0]||(n[0]=r("div",{class:"q-divider__line"},null,-1)),r("span",ho,[V(t.$slots,"default")]),n[1]||(n[1]=r("div",{class:"q-divider__line"},null,-1))],64)):i("",!0)],14,mo))}})),go={expand:{icon:"chevron-right"}},yo=["d"],ko=Me(/*@__PURE__*/v({__name:"QSafeTriangle",props:{top:{default:0},left:{default:0},width:{default:0},height:{default:0},path:{default:""}},setup(e){const l=e,a=n(()=>({top:`${l.top}px`,left:`${l.left}px`,width:`${l.width}px`,height:`${l.height}px`}))
|
|
746
|
+
return(e,n)=>(C(),o(t,{to:"body"},[l.path?(C(),s("svg",{key:0,class:"q-safe-triangle","aria-hidden":"true",style:w(a.value)},[r("path",{class:"q-safe-triangle__path",d:l.path},null,8,yo)],4)):i("",!0)]))}}))
|
|
747
747
|
function _o(e,t,l){return e>=l.left&&e<=l.right&&t>=l.top&&t<=l.bottom}function qo(e,t,l){return!!l&&Array.from(l.querySelectorAll(".q-dropdown-menu__body")).some(l=>_o(e,t,l.getBoundingClientRect()))}function wo(e){const t=E(!1),l=E(0),a=E(0),n=E(0),o=E(0),i=E("")
|
|
748
748
|
let s=!1,r={x:0,y:0},u=null,d=!1
|
|
749
749
|
function c(t,l){return function(e,t,l){if(!t||!l)return e
|
|
@@ -755,7 +755,7 @@ const e=l,n=t.top,o=t.left-l,i=t.height
|
|
|
755
755
|
return o<=0||i<=0?null:{left:e,top:n,width:o,height:i,path:`M 0, ${a-n} L ${o}, ${i} L ${o}, 0 z`}}if("left"===n){if(l<=t.right)return null
|
|
756
756
|
const e=t.right,n=t.top,o=l-t.right,i=t.height
|
|
757
757
|
return o<=0||i<=0?null:{left:e,top:n,width:o,height:i,path:`M ${o}, ${a-n} L 0, ${i} L 0, 0 z`}}return null}(c(r,u),u,e,s)
|
|
758
|
-
d?(t.value=!0,l.value=d.top,a.value=d.left,n.value=d.width,o.value=d.height,i.value=d.path):t.value=!1}function
|
|
758
|
+
d?(t.value=!0,l.value=d.top,a.value=d.left,n.value=d.width,o.value=d.height,i.value=d.path):t.value=!1}function f(l,a){const n=e.getParentRect(),o=e.getContentRect(),i=e.getContentRoot()
|
|
759
759
|
return function(t,l){const a=e.getContentRect(),n=e.getContentRoot()
|
|
760
760
|
return null!==a&&_o(t,l,a)||null!==n&&qo(t,l,n)}(l,a)?(t.value=!1,d||e.onEnterContent?.(l,a),void(d=!0)):(d=!1,n&&_o(l,a,n)?(u={x:l,y:a},void v(l,a,n,o)):o&&u?function(e,t,l,a,n,o,i){if(l&&_o(e,t,l))return!0
|
|
761
761
|
if(a&&_o(e,t,a))return!0
|
|
@@ -765,11 +765,11 @@ const s=function(e,t,l,a){switch(e.split("-")[0]){case"right":return{a:{x:t.left
|
|
|
765
765
|
case"left":return{a:{x:t.right,y:t.top},b:{x:t.right,y:t.bottom},c:{x:l,y:a}}
|
|
766
766
|
default:return null}}(n,a,o.x,o.y)
|
|
767
767
|
return!!s&&function(e,t,l,a,n){const o=(e,t,l,a,n,o)=>(e-n)*(a-o)-(l-n)*(t-o),i=o(e,t,l.x,l.y,a.x,a.y),s=o(e,t,a.x,a.y,n.x,n.y),r=o(e,t,n.x,n.y,l.x,l.y)
|
|
768
|
-
return!((i<0||s<0||r<0)&&(i>0||s>0||r>0))}(e,t,s.a,s.b,s.c)}(l,a,n,o,c(n,o),u,i)?void v(u.x,u.y,n,o):(t.value=!1,void(e.shouldSuppressLeave()||e.onLeave())):void(t.value=!1))}function
|
|
768
|
+
return!((i<0||s<0||r<0)&&(i>0||s>0||r>0))}(e,t,s.a,s.b,s.c)}(l,a,n,o,c(n,o),u,i)?void v(u.x,u.y,n,o):(t.value=!1,void(e.shouldSuppressLeave()||e.onLeave())):void(t.value=!1))}function p(t){r={x:t.clientX,y:t.clientY},e.enabled.value&&f(t.clientX,t.clientY)}function m(t,l){void 0!==t&&void 0!==l&&(r={x:t,y:l}),e.enabled.value&&f(r.x,r.y)}function h(){s&&(s=!1,document.removeEventListener("pointermove",p,!0),t.value=!1,d=!1,u=null)}return X(e.enabled,t=>{if(t){d=!1
|
|
769
769
|
const t=e.getParentRect()
|
|
770
|
-
u=t&&_o(r.x,r.y,t)?{...r}:null,s||(s=!0,document.addEventListener("pointermove",
|
|
771
|
-
const{visible:L,top:D,left:
|
|
772
|
-
function
|
|
770
|
+
u=t&&_o(r.x,r.y,t)?{...r}:null,s||(s=!0,document.addEventListener("pointermove",p,!0)),m()}else h()},{immediate:!0}),$(h),{visible:t,top:l,left:a,width:n,height:o,path:i,refresh:m,getLastPointer:()=>({...r})}}var xo={key:0,class:"q-dropdown-menu__extra"},$o=/*@__PURE__*/v({__name:"QDropdownMenuContent",props:/*@__PURE__*/g({id:{},class:{},activator:{},itemValue:{default:"key"},itemLabel:{default:"label"},items:{},groups:{default:()=>[]},appearance:{default:"regular"},placement:{default:"bottom-start"},transition:{default:"fade"},inline:{type:Boolean},delay:{default:500},trigger:{default:"hover"},depth:{default:0},icons:{default:()=>go},offset:{default:6},crossOffset:{default:-5}},{modelValue:{type:Boolean},modelModifiers:{},highlighted:{},highlightedModifiers:{}}),emits:/*@__PURE__*/g(["select","open","hide","focus-previous"],["update:modelValue","update:highlighted"]),setup(t,{expose:l,emit:a}){const u=t,d=a,v=W(t,"modelValue"),f=W(t,"highlighted"),m=E(void 0),h=E([]),b=n(()=>0!==u.depth?u.offset:4),g=n(()=>0!==u.depth?u.crossOffset:void 0),w=N("list"),x=N("body"),$=E(null),M=n(()=>"right-start"),B=n(()=>"hover"===u.trigger&&void 0!==m.value&&((u.items?.find(e=>e[u.itemValue]===m.value))?.items?.length??0)>0)
|
|
771
|
+
const{visible:L,top:D,left:S,width:Q,height:z,path:T,refresh:P,getLastPointer:F}=wo({enabled:B,placement:M,getParentRect:()=>x.value?.getBoundingClientRect()??null,getContentRect:function(){return $.value?.getMenuRect()??null},getContentRoot:function(){return $.value?.getMenuRoot()??null},shouldSuppressLeave:function(){return $.value?.hasOpenSubmenu()??!1},onLeave:ee,onEnterContent:(e,t)=>{$.value?.syncHoverFromPoint(e,t)}})
|
|
772
|
+
function H(e,t){if("hover"!==u.trigger)return
|
|
773
773
|
const l=function(e,t){const l=x.value
|
|
774
774
|
if(!l)return
|
|
775
775
|
const a=document.elementsFromPoint(e,t)
|
|
@@ -781,171 +781,193 @@ const t=e.getAttribute("data-key")
|
|
|
781
781
|
if(null===t)continue
|
|
782
782
|
const a=u.items?.find(e=>String(e[u.itemValue])===t)
|
|
783
783
|
if(a)return a[u.itemValue]}}(e,t)
|
|
784
|
-
void 0!==l&&G(l)}function U(e){P(e.clientX,e.clientY),
|
|
784
|
+
void 0!==l&&G(l)}function U(e){P(e.clientX,e.clientY),H(e.clientX,e.clientY)}function O(e){B.value&&H(e.clientX,e.clientY),P(e.clientX,e.clientY)}function j(e){h.value=(u.items?.find(t=>t[u.itemValue]===e))?.items??[]
|
|
785
785
|
const t=h.value.length>0
|
|
786
|
-
|
|
787
|
-
u.items&&(e||0===e)&&u.items[e]&&(
|
|
786
|
+
f.value=e,t?ne(e):K(e)}function Y(e){if(e.key)switch(["Enter","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"].includes(e.key)&&(e.preventDefault(),e.stopPropagation()),e.key){case"ArrowRight":const e=w.value?.getActiveItemIndex()
|
|
787
|
+
u.items&&(e||0===e)&&u.items[e]&&(f.value=u.items[e].key,ne(u.items[e].key))
|
|
788
788
|
break
|
|
789
789
|
case"ArrowLeft":te()
|
|
790
790
|
break
|
|
791
|
-
case"Escape":case"Tab":ae()}}function G(e){"hover"===u.trigger&&(
|
|
791
|
+
case"Escape":case"Tab":ae()}}function G(e){"hover"===u.trigger&&(f.value=e,ne(e))}function K(e){d("select",e),ae()}function Z(){te()}function ee(){m.value=void 0,f.value=void 0}function te(){ee(),v.value=!1,d("focus-previous")}function ae(){te(),d("hide")}function ne(e){m.value=(u.items?.find(t=>t[u.itemValue]===e))?.items?.length?e:void 0}function oe(){const e=u.items?.findIndex(e=>e[u.itemValue]===m.value)
|
|
792
792
|
if(!e&&0!==e)return
|
|
793
793
|
const t=w.value?.getItem(e)
|
|
794
|
-
m.value=void 0,
|
|
795
|
-
return e?(e.closest(".q-overlay")??e).getBoundingClientRect():null},getMenuRoot:()=>x.value?.closest(".q-overlay")??x.value,hasOpenSubmenu:()=>void 0!==m.value&&((u.items?.find(e=>e[u.itemValue]===m.value))?.items?.length??0)>0,syncHoverFromPoint:
|
|
796
|
-
return C(),o(
|
|
794
|
+
m.value=void 0,f.value=void 0,t?.focus()}function ie(){d("open"),k(()=>w.value?.$el.focus())}return X(m,()=>{$.value=null}),l({getMenuRect:()=>{const e=x.value
|
|
795
|
+
return e?(e.closest(".q-overlay")??e).getBoundingClientRect():null},getMenuRoot:()=>x.value?.closest(".q-overlay")??x.value,hasOpenSubmenu:()=>void 0!==m.value&&((u.items?.find(e=>e[u.itemValue]===m.value))?.items?.length??0)>0,syncHoverFromPoint:H}),(t,l)=>{const a=A("q-dropdown-menu-content",!0)
|
|
796
|
+
return C(),o(R(Da),{id:u.id,modelValue:v.value,"onUpdate:modelValue":l[0]||(l[0]=e=>v.value=e),anchor:u.activator,appearance:u.appearance,inline:u.inline,delay:u.delay,offset:b.value,"cross-offset":g.value,placement:u.placement,transition:u.transition,class:_(u.class),trigger:"click","scroll-lock":"","non-modal":"",onEnter:ie,onLeave:Z},{default:J(()=>[r("div",{ref:"body",class:"q-dropdown-menu__body","data-testid":"dropdown-content",tabindex:"-1",onPointerenter:U,onPointermove:O,onKeydown:le(Y,["stop"])},[V(t.$slots,"prepend"),c(R(na),{ref:"list",class:"q-dropdown-menu__items",highlighted:f.value,items:u.items,groups:u.groups,"item-label":u.itemLabel,"item-value":u.itemValue,selectable:!1,"select-on-tab":!1,onClick:j,"onMouseenter:item":G},{item:J(({item:e})=>[V(t.$slots,"item",{item:e})]),"item.append":J(({item:l,element:n})=>[V(t.$slots,"item.append",{item:l},()=>[l.extraInfo?(C(),s("span",xo,I(l.extraInfo),1)):i("",!0)]),l.items?.length>0?(C(),s(e,{key:0},[c(R(gt),q(p(u.icons.expand)),null,16),m.value===l.key?(C(),o(a,y({key:0,ref:e=>function(e,t){if(e&&m.value===t&&function(e){return"syncHoverFromPoint"in e&&"getMenuRect"in e&&"getMenuRoot"in e&&"hasOpenSubmenu"in e}(e))return $.value=e,void k(()=>{P()
|
|
797
797
|
const{x:e,y:t}=F()
|
|
798
798
|
$.value?.syncHoverFromPoint(e,t)})
|
|
799
|
-
e||m.value!==t||($.value=null)}(e,l.key),"model-value":""},u,{activator:n,items:l.items,groups:l.groups,depth:u.depth+1,delay:u.delay,placement:"right-start","non-modal":"",inline:"",onHide:ae,onSelect:K,onFocusPrevious:oe}),{item:J(e=>[
|
|
799
|
+
e||m.value!==t||($.value=null)}(e,l.key),"model-value":""},u,{activator:n,items:l.items,groups:l.groups,depth:u.depth+1,delay:u.delay,placement:"right-start","non-modal":"",inline:"",onHide:ae,onSelect:K,onFocusPrevious:oe}),{item:J(e=>[V(t.$slots,"item",q(p(e)))]),"item.append":J(e=>[V(t.$slots,"item.append",q(p(e)))]),_:3},16,["activator","items","groups","depth","delay"])):i("",!0)],64)):i("",!0)]),_:3},8,["highlighted","items","groups","item-label","item-value"]),V(t.$slots,"append")],544),R(L)?(C(),o(R(ko),{key:0,top:R(D),left:R(S),width:R(Q),height:R(z),path:R(T)},null,8,["top","left","width","height","path"])):i("",!0)]),_:3},8,["id","modelValue","anchor","appearance","inline","delay","offset","cross-offset","placement","transition","class"])}}}),Mo=$o,Bo=Me(/*@__PURE__*/v({inheritAttrs:!1,__name:"QDropdownMenu",props:/*@__PURE__*/g({id:{},class:{},activator:{},itemValue:{},itemLabel:{},items:{},groups:{},appearance:{},placement:{},transition:{},inline:{type:Boolean},delay:{},trigger:{},depth:{},icons:{}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:/*@__PURE__*/g(["select"],["update:modelValue"]),setup(e,{emit:t}){const l=e,a=t,n=W(e,"modelValue")
|
|
800
800
|
let i
|
|
801
|
-
function s(e){a("select",e)}function r(){i=document.activeElement}async function u(){await k(),i?.focus()}return(e,t)=>(C(),o(Mo,
|
|
802
|
-
var Do=["id","accept","required","readonly","disabled"],Eo={key:0,class:"q-file-input__drop-area"},
|
|
803
|
-
X(l,e=>{
|
|
801
|
+
function s(e){a("select",e)}function r(){i=document.activeElement}async function u(){await k(),i?.focus()}return(e,t)=>(C(),o(Mo,y(l,{modelValue:n.value,"onUpdate:modelValue":t[0]||(t[0]=e=>n.value=e),onSelect:s,onOpen:r,onFocusPrevious:u}),{prepend:J(()=>[V(e.$slots,"prepend")]),append:J(()=>[V(e.$slots,"append")]),item:J(({item:t})=>[V(e.$slots,"item",{item:t})]),"item.append":J(({item:t})=>[V(e.$slots,"item.append",{item:t})]),_:3},16,["modelValue"]))}})),Co={remove:{icon:"close"},download:{icon:"download"},upload:{icon:"upload"},file:{icon:"file"},empty:{icon:"diameter-variant"}},Lo={dropHereOr:"Drop here or",chooseFile:"Choose file",preview:"Preview",download:"Download attached file",remove:"Remove attached file",empty:"No document attached"}
|
|
802
|
+
var Do=["id","accept","required","readonly","disabled"],Eo={key:0,class:"q-file-input__drop-area"},So={key:1,class:"q-file-input__file-details"},Vo={class:"q-file-input__attached-file"},Ao={key:0,class:"q-file-input__preview q-file-input__image-preview"},Qo=["src","alt"],zo={class:"q-file-input__file-meta"},Io={class:"q-file-input__file-name"},To={class:"q-file-input__file-type"},Po={key:0,class:"q-file-input__action-buttons"},Fo={key:2,class:"q-file-input__empty-container"},Ro=Me(/*@__PURE__*/v({inheritAttrs:!1,__name:"QFileUpload",props:/*@__PURE__*/g({id:{},class:{},label:{},required:{type:Boolean},for:{},labelPosition:{},size:{default:"large"},readonly:{type:Boolean},disabled:{type:Boolean},invalid:{type:Boolean},accept:{},icons:{default:()=>Co},texts:{default:()=>Lo}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,l=W(e,"modelValue"),a=zt(P(t,"id")),v=n(()=>!t.readonly&&!t.disabled),f=E(null)
|
|
803
|
+
X(l,e=>{f.value&&URL.revokeObjectURL(f.value),f.value=e&&e.type.startsWith("image/")?URL.createObjectURL(e):null})
|
|
804
804
|
const m=E(null)
|
|
805
|
-
function h(){m.value?.click()}function
|
|
805
|
+
function h(){m.value?.click()}function g(e){const t=e.target
|
|
806
806
|
t?.files?.[0]&&(l.value=t.files[0])}function k(){l.value&&function(e){const t=new FileReader
|
|
807
807
|
t.onload=()=>{const l=e.type||"application/octet-stream",a=new Blob([t.result],{type:l}),n=Object.assign(document.createElement("a"),{href:URL.createObjectURL(a),download:e.name||"download"})
|
|
808
|
-
document.body.appendChild(n),n.click(),setTimeout(()=>{URL.revokeObjectURL(n.href),n.parentNode?.removeChild(n)},100)},t.readAsArrayBuffer(e)}(l.value)}function w(){l.value=void 0,m.value&&(m.value.value="")}const x=E(null),$=n(()=>Array.isArray(t.accept)?t.accept:t.accept?t.accept.split(",").map(e=>e.trim()):[]),L=n(()=>$.value?.join(",")),{isOverDropZone:D,isValid:
|
|
808
|
+
document.body.appendChild(n),n.click(),setTimeout(()=>{URL.revokeObjectURL(n.href),n.parentNode?.removeChild(n)},100)},t.readAsArrayBuffer(e)}(l.value)}function w(){l.value=void 0,m.value&&(m.value.value="")}const x=E(null),$=n(()=>Array.isArray(t.accept)?t.accept:t.accept?t.accept.split(",").map(e=>e.trim()):[]),L=n(()=>$.value?.join(",")),{isOverDropZone:D,isValid:S}=function(e,t={}){const{onDrop:l,onDragOver:a,onDragLeave:n,accept:o=[],multiple:i,maxSize:s,enabled:r=!0}=t
|
|
809
809
|
let u=0
|
|
810
|
-
const d=E(!1),c=E(!1),v=E(
|
|
811
|
-
return 0===t.length||t.some(t=>e.match(t))},
|
|
810
|
+
const d=E(!1),c=E(!1),v=E(R(r)),f=e=>{const t=R(o)
|
|
811
|
+
return 0===t.length||t.some(t=>e.match(t))},p=e=>!(s&&e.size>s||!f(e.type)),m=()=>{u=0,d.value=!1,c.value=!1},h=e=>{if(!v.value)return
|
|
812
812
|
e.preventDefault(),m()
|
|
813
813
|
const t=Array.from(e.dataTransfer?.files||[])
|
|
814
|
-
if(!
|
|
815
|
-
const a=t.filter(
|
|
816
|
-
a.length&&l&&l(a)},
|
|
817
|
-
return t.enabled&&
|
|
818
|
-
t&&(t.addEventListener("drop",h),t.addEventListener("dragenter",
|
|
819
|
-
t&&(t.removeEventListener("drop",h),t.removeEventListener("dragenter",
|
|
814
|
+
if(!R(i)&&t.length>1)return
|
|
815
|
+
const a=t.filter(p)
|
|
816
|
+
a.length&&l&&l(a)},g=e=>{v.value&&(e.preventDefault(),c.value=Array.from(e.dataTransfer?.items||[]).map(e=>e.type).some(f),u++,1===u&&(d.value=!0,a?.(e)))},y=e=>{v.value&&(e.preventDefault(),u--,0===u&&(d.value=!1,c.value=!1,n?.(e)))},k=e=>{v.value&&e.preventDefault()}
|
|
817
|
+
return t.enabled&&b(t.enabled)&&X(t.enabled,e=>{v.value=e,e||m()}),M(()=>{const t=e.value
|
|
818
|
+
t&&(t.addEventListener("drop",h),t.addEventListener("dragenter",g),t.addEventListener("dragleave",y),t.addEventListener("dragover",k))}),B(()=>{const t=e.value
|
|
819
|
+
t&&(t.removeEventListener("drop",h),t.removeEventListener("dragenter",g),t.removeEventListener("dragleave",y),t.removeEventListener("dragover",k))}),{isOverDropZone:d,isValid:c,isEnabled:v,enable:()=>{v.value=!0},disable:()=>{v.value=!1,m()}}}(x,{onDrop:function(e){if(!v.value)return
|
|
820
820
|
const t=e?.[0]
|
|
821
|
-
t&&(l.value=t)},accept:$,enabled:n(()=>v.value&&!l.value)}),A=n(()=>["q-field__control","q-file-input",{"q-file-input--highlighted":D.value&&
|
|
822
|
-
return(e,n)=>(C(),o(
|
|
823
|
-
function a(e,t){if(t)return"auto"===t?`q-col${e?`-${e}`:""}-auto`:`q-col${e?`-${e}`:""}-${t}`}return ve({
|
|
824
|
-
return(e,t)=>(C(),s("div",{class:_(l.value)},[
|
|
821
|
+
t&&(l.value=t)},accept:$,enabled:n(()=>v.value&&!l.value)}),A=n(()=>["q-field__control","q-file-input",{"q-file-input--highlighted":D.value&&S.value},t.class])
|
|
822
|
+
return(e,n)=>(C(),o(R(Ql),{for:R(a),label:t.label,"label-position":t.labelPosition,size:t.size,readonly:t.readonly,disabled:t.disabled,required:t.required,invalid:t.invalid},u({control:J(()=>[r("div",{ref_key:"dropZoneRef",ref:x,class:_(A.value)},[r("input",y({id:R(a),ref_key:"fileInput",ref:m,type:"file",class:"q-file-input__file-input",accept:L.value,required:t.required,readonly:t.readonly,disabled:t.disabled},e.$attrs,{onChange:g}),null,16,Do),!l.value&&v.value?(C(),s("div",Eo,[c(R(gt),q(p(t.icons.upload)),null,16),r("span",null,I(t.texts.dropHereOr),1),c(R(et),{label:t.texts.chooseFile,onClick:h},null,8,["label"])])):l.value?(C(),s("div",So,[r("div",Vo,[f.value?(C(),s("div",Ao,[r("img",{src:f.value,alt:t.texts.preview},null,8,Qo)])):(C(),o(R(gt),y({key:1,class:"q-file-input__preview"},t.icons.file),null,16)),r("div",zo,[r("span",Io,I(l.value.name),1),r("span",To,I(l.value.type),1)])]),v.value?(C(),s("div",Po,[c(R(et),{title:t.texts.download,borderless:"",onClick:k},{default:J(()=>[c(R(gt),q(p(t.icons.download)),null,16)]),_:1},8,["title"]),c(R(et),{title:t.texts.remove,borderless:"",onClick:w},{default:J(()=>[c(R(gt),q(p(t.icons.remove)),null,16)]),_:1},8,["title"])])):i("",!0)])):(C(),s("div",Fo,[c(R(gt),q(p(t.icons.empty)),null,16),d(" "+I(t.texts.empty),1)]))],2)]),_:2},[e.$slots.extras?{name:"extras",fn:J(()=>[V(e.$slots,"extras")]),key:"0"}:void 0]),1032,["for","label","label-position","size","readonly","disabled","required","invalid"]))}})),Ho=/*@__PURE__*/v({__name:"QCol",props:{cols:{},sm:{},md:{},lg:{},xl:{},xxl:{}},setup(e){const t=e,l=n(()=>["q-col",a("",t.cols),a("sm",t.sm),a("md",t.md),a("lg",t.lg),a("xl",t.xl),a("xxl",t.xxl)].filter(Boolean))
|
|
823
|
+
function a(e,t){if(t)return"auto"===t?`q-col${e?`-${e}`:""}-auto`:`q-col${e?`-${e}`:""}-${t}`}return ve({QSection:{block:n(()=>"auto"!==t.cols||void 0)},QField:{size:n(()=>"auto"===t.cols?void 0:"block")}}),(e,t)=>(C(),s("div",{class:_(l.value)},[V(e.$slots,"default")],2))}}),Uo=/*@__PURE__*/v({__name:"QContainer",props:{fluid:{type:Boolean}},setup(e){const t=e,l=n(()=>["q-container",{"q-container--fluid":t.fluid}])
|
|
824
|
+
return(e,t)=>(C(),s("div",{class:_(l.value)},[V(e.$slots,"default")],2))}}),Wo=/*@__PURE__*/v({__name:"QRow",props:{gutter:{default:16},justify:{default:"start"},align:{default:"stretch"}},setup(e){const t=e,l=n(()=>["q-row",{[`q-row--justify-${t.justify}`]:"start"!==t.justify,[`q-row--align-${t.align}`]:"stretch"!==t.align}]),a=n(()=>{const e={}
|
|
825
825
|
return 16!==t.gutter&&(e["--q-row-gutter"]=`${t.gutter}px`),e})
|
|
826
|
-
return(e,t)=>(C(),s("div",{class:_(l.value),style:w(a.value)},[
|
|
826
|
+
return(e,t)=>(C(),s("div",{class:_(l.value),style:w(a.value)},[V(e.$slots,"default")],6))}}),Oo={class:"q-spacer"}
|
|
827
827
|
var No=/*#__PURE__*/((e,t)=>{const l=e.__vccOpts||e
|
|
828
828
|
for(const[a,n]of t)l[a]=n
|
|
829
|
-
return l})({},[["render",function(e,t){return C(),s("div",
|
|
830
|
-
return(e,
|
|
831
|
-
return
|
|
832
|
-
return(e,
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
return(t,a)=>(C(),s("ul",bi,[(C(!0),s(e,null,V(l.messages,e=>(C(),s("li",{key:e},I(e),1))),128))]))}}),_i={class:"q-password-field__meter"},qi={key:0,class:"q-password-field__meter-score"},wi=/*@__PURE__*/v({inheritAttrs:!1,__name:"QPasswordFieldMeterOverlay",props:/*@__PURE__*/y({id:{},class:{},modelValue:{type:Boolean},anchor:{},appearance:{},arrow:{type:Boolean},backdropBlur:{type:Boolean},backdropClass:{},offset:{},crossOffset:{},placement:{},transition:{},width:{},centerVertically:{type:Boolean},attach:{},inline:{type:Boolean},delay:{},nonModal:{type:Boolean},scrollLock:{type:Boolean},persistent:{type:Boolean},spy:{type:Boolean},trigger:{},focusWrap:{type:Boolean},initialFocus:{},focusWithinOnActivate:{type:Boolean},closingFocus:{},returnFocusOnDeactivate:{type:Boolean},messages:{},score:{},levels:{}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,l=O(e,"modelValue"),a=n(()=>{if(!t.levels.length)return void console.warn("Levels array is empty.")
|
|
829
|
+
return l})({},[["render",function(e,t){return C(),s("div",Oo)}]]),jo=Me(Ho),Yo=Me(Uo),Go=Me(Wo),Ko=Me(No),Xo={key:0,class:"q-input-group__prepend"},Zo={key:0},Jo={key:1,class:"q-input-group__append"},ei={key:0},ti=Me(/*@__PURE__*/v({__name:"QInputGroup",props:{id:{},class:{},label:{},required:{type:Boolean},for:{},labelPosition:{},size:{default:"large"},readonly:{type:Boolean},disabled:{type:Boolean},invalid:{type:Boolean},prependIcon:{},appendIcon:{}},setup(e){const t=e
|
|
830
|
+
return ve({QField:{size:"block"}}),(e,l)=>(C(),o(R(Ql),{id:t.id,class:_(["q-input-group",t.class]),label:t.label,"label-position":t.labelPosition,required:t.required,size:t.size,invalid:t.invalid},u({"label.prepend":J(()=>[V(e.$slots,"label.prepend")]),"label.append":J(()=>[V(e.$slots,"label.append")]),default:J(()=>[e.$slots.prepend||t.prependIcon?(C(),s("div",Xo,[t.prependIcon?(C(),s("span",Zo,[c(R(gt),q(p(t.prependIcon)),null,16)])):i("",!0),V(e.$slots,"prepend")])):i("",!0),V(e.$slots,"default"),e.$slots.append||t.appendIcon?(C(),s("div",Jo,[t.appendIcon?(C(),s("span",ei,[c(R(gt),q(p(t.appendIcon)),null,16)])):i("",!0),V(e.$slots,"append")])):i("",!0)]),_:2},[e.$slots.extras?{name:"extras",fn:J(()=>[V(e.$slots,"extras")]),key:"0"}:void 0]),1032,["id","class","label","label-position","required","size","invalid"]))}})),li=["id"],ai=Me(/*@__PURE__*/v({__name:"QLineLoader",props:{id:{},class:{},height:{},rounded:{type:Boolean}},setup(e){const t=e,l=n(()=>{if(void 0!==t.height)return{"--q-line-loader-height":`${Math.min(12,Math.max(4,t.height))}px`}})
|
|
831
|
+
return(e,a)=>(C(),s("div",{id:t.id,class:_(["q-line-loader",{"q-line-loader--rounded":t.rounded},t.class]),style:w(l.value)},null,14,li))}})),ni=["id"],oi={class:"q-meter__labels"},ii={class:"q-meter__track"},si=Me(/*@__PURE__*/v({__name:"QMeter",props:/*@__PURE__*/g({id:{},class:{},label:{},required:{type:Boolean},for:{},labelPosition:{},valueLabel:{},color:{},max:{default:100}},{modelValue:{default:0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,l=W(e,"modelValue"),a=n(()=>l.value/t.max*100),{style:o}=Ke(P(t,"color")),i=n(()=>({width:`${Math.max(0,Math.min(a.value,100))}%`,backgroundColor:o.value?.mainColor})),u=n(()=>"string"==typeof t.valueLabel?t.valueLabel:t.valueLabel?.(l.value,t.max))
|
|
832
|
+
return(e,l)=>(C(),s("div",{id:t.id,class:_(["q-meter",t.class])},[r("div",oi,[c(R(xl),{label:t.label},null,8,["label"]),c(R(xl),{label:u.value,class:"q-meter__value-label"},null,8,["label"])]),r("div",ii,[r("div",{class:"q-meter__fill",style:w(i.value)},null,4)])],10,ni))}})),ri={restricted:{icon:"lock"},show:{icon:"lock"},hide:{icon:"lock-open-variant"}},ui={restricted:"Restricted",showData:"Show data",hideData:"Hide data"},di=["id"],ci=["id"],vi={key:1,class:"q-obfuscation__mask"},fi=Me(/*@__PURE__*/v({__name:"QObfuscation",props:/*@__PURE__*/g({id:{},class:{},label:{},required:{type:Boolean,default:!1},for:{},labelPosition:{default:"topleft"},size:{default:"medium"},readonly:{type:Boolean},disabled:{type:Boolean},invalid:{type:Boolean},revealable:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},mask:{default:"restricted"},bulletCount:{default:12},icons:{default:()=>ri},texts:{default:()=>ui}},{revealed:{type:Boolean,default:!1},revealedModifiers:{}}),emits:/*@__PURE__*/g(["reveal","hide"],["update:revealed"]),setup(e,{emit:t}){const l=e,a=t,r=W(e,"revealed"),f=zt(),p=E(0),h=E(!1),b=n(()=>({...ui,...l.texts})),g=n(()=>l.revealable&&r.value&&!l.loading),q=n(()=>p.value>0),w=n(()=>{if(!g.value||h.value&&!q.value)return l.label}),M=n(()=>g.value&&h.value&&!q.value),B=n(()=>"bullets"===l.mask?"•".repeat(l.bulletCount):b.value.restricted),L=n(()=>["q-obfuscation",{"q-obfuscation--revealable":l.revealable,"q-obfuscation--revealed":g.value,"q-obfuscation--loading":l.loading},l.class])
|
|
833
|
+
X(g,async e=>{e?(h.value=!1,await k(),h.value=!0):h.value=!1},{immediate:!0})
|
|
834
|
+
const D=v({name:"QObfuscationHideAction",props:{track:{type:Boolean,default:!0}},setup:e=>(e.track&&(x(()=>{p.value++}),$(()=>{p.value--})),()=>m(et,{variant:"text",borderless:!0,size:"small",class:"q-obfuscation__label-action",disabled:l.disabled,title:b.value.hideData,"aria-label":b.value.hideData,"aria-expanded":!0,"aria-controls":f.value,"data-testid":"q-obfuscation__hide",onClick:S},()=>m(gt,{...l.icons.hide,class:"q-obfuscation__icon"})))})
|
|
835
|
+
function S(){l.revealable&&!l.loading&&(r.value=!r.value,r.value?a("reveal"):a("hide"))}return(e,t)=>(C(),o(R(Ql),{id:l.id,class:_(L.value),for:l.for??R(f),label:w.value,"label-position":l.labelPosition,size:l.size,readonly:l.readonly,disabled:l.disabled,required:l.required,invalid:l.invalid},u({"label.prepend":J(()=>[V(e.$slots,"label.prepend")]),"label.append":J(()=>[V(e.$slots,"label.append"),M.value?(C(),o(R(D),{key:0,track:!1})):i("",!0)]),control:J(()=>[g.value?(C(),s("div",{key:0,id:R(f),class:"q-obfuscation__content"},[V(e.$slots,"default",{qObfuscationHideAction:R(D),toggle:S,revealed:r.value,loading:l.loading})],8,di)):(C(),s("div",{key:1,id:R(f),class:"q-field__control q-obfuscation__value"},[l.revealable?V(e.$slots,"reveal",{key:0,revealed:r.value,toggle:S,loading:l.loading},()=>[c(R(et),{variant:"text",borderless:"",block:"",class:"q-obfuscation__action",disabled:l.disabled,loading:l.loading,label:b.value.showData,"aria-expanded":!1,"aria-controls":R(f),"data-testid":"q-obfuscation__reveal",onClick:S},{default:J(()=>[c(R(gt),y(l.icons.show,{class:"q-obfuscation__icon"}),null,16)]),_:1},8,["disabled","loading","label","aria-controls"])]):(C(),s("span",vi,[c(R(gt),y(l.icons.restricted,{class:"q-obfuscation__icon","aria-hidden":"true"}),null,16),V(e.$slots,"mask",{},()=>[d(I(B.value),1)])]))],8,ci))]),_:2},[e.$slots.extras?{name:"extras",fn:J(()=>[V(e.$slots,"extras")]),key:"0"}:void 0]),1032,["id","class","for","label","label-position","size","readonly","disabled","required","invalid"]))}})),pi={show:{icon:"eye"},hide:{icon:"eye-off"}},mi={class:"q-password-field__messages"},hi=/*@__PURE__*/v({__name:"QPasswordFieldMessages",props:{messages:{}},setup(t){const l=t
|
|
836
|
+
return(t,a)=>(C(),s("ul",mi,[(C(!0),s(e,null,S(l.messages,e=>(C(),s("li",{key:e},I(e),1))),128))]))}}),bi={class:"q-password-field__meter"},gi={key:0,class:"q-password-field__meter-score"},yi=/*@__PURE__*/v({inheritAttrs:!1,__name:"QPasswordFieldMeterOverlay",props:/*@__PURE__*/g({id:{},class:{},modelValue:{type:Boolean},anchor:{},appearance:{},arrow:{type:Boolean},backdropBlur:{type:Boolean},backdropClass:{},offset:{},crossOffset:{},placement:{},transition:{},width:{},centerVertically:{type:Boolean},attach:{},inline:{type:Boolean},delay:{},nonModal:{type:Boolean},scrollLock:{type:Boolean},persistent:{type:Boolean},spy:{type:Boolean},trigger:{},focusWrap:{type:Boolean},initialFocus:{},focusWithinOnActivate:{type:Boolean},closingFocus:{},returnFocusOnDeactivate:{type:Boolean},messages:{},score:{},levels:{}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,l=W(e,"modelValue"),a=n(()=>{if(!t.levels.length)return void console.warn("Levels array is empty.")
|
|
838
837
|
const e=[...t.levels].sort((e,t)=>(e.threshold??1/0)-(t.threshold??1/0))
|
|
839
838
|
for(const l of e){const e=l.threshold??1/0
|
|
840
839
|
if(t.score<e)return l}return t.levels[t.levels.length-1]})
|
|
841
|
-
return(n,u)=>(C(),o(
|
|
840
|
+
return(n,u)=>(C(),o(R(Da),{modelValue:l.value,"onUpdate:modelValue":u[0]||(u[0]=e=>l.value=e),trigger:"manual",anchor:t.anchor,width:"anchor","non-modal":"",placement:"bottom"},{default:J(()=>[r("div",bi,[a.value?(C(),s("div",gi,[c(R(si),{"model-value":t.score,max:1,color:a.value.color},null,8,["model-value","color"]),r("span",null,I(a.value.label),1)])):i("",!0),e.messages?.length?(C(),o(hi,{key:1,messages:e.messages},null,8,["messages"])):i("",!0)])]),_:1},8,["modelValue","anchor"]))}}),ki=Me(/*@__PURE__*/v({inheritAttrs:!1,__name:"QPasswordField",props:/*@__PURE__*/g({id:{},class:{},label:{},required:{type:Boolean},for:{},labelPosition:{},size:{},readonly:{type:Boolean},disabled:{type:Boolean},invalid:{type:Boolean},placeholder:{},maxLength:{},toggle:{type:Boolean},meter:{type:Boolean},meterLevels:{},rules:{},icons:{default:()=>pi}},{modelValue:{},modelModifiers:{},masked:{type:Boolean,default:!0},maskedModifiers:{}}),emits:["update:modelValue","update:masked"],setup(t){const l=t,a=W(t,"modelValue"),r=W(t,"masked"),d=E(null),v=E(!1),f=n(()=>r.value?"password":"text"),m=n(()=>l.rules?.reduce((e,t)=>e+t.weight,0)),h=n(()=>function(e,t){if(!e||!t)return
|
|
842
841
|
let l=0
|
|
843
842
|
const a=[]
|
|
844
843
|
return t.forEach(t=>{const n=t.test instanceof RegExp?t.test.test(e):t.test(e)
|
|
845
844
|
!0===n?l+=t.weight:"string"==typeof n&&a.push(n)}),{score:m.value?l/m.value:0,messages:a}}(a.value,l.rules))
|
|
846
|
-
function
|
|
847
|
-
return(t,n)=>(C(),o(
|
|
848
|
-
function m(){v.value?.contains(document.activeElement)||(c.value=void 0)}function h(e){return e?a.fields.filter(t=>t.group===e):a.fields}function
|
|
845
|
+
function b(){r.value=!r.value}function g(){v.value=!0}function k(){v.value=!1}return(t,n)=>(C(),s(e,null,[c(R(Hl),y({id:l.id,ref_key:"fieldRef",ref:d,modelValue:a.value,"onUpdate:modelValue":n[0]||(n[0]=e=>a.value=e),class:l.class,type:f.value,placeholder:l.placeholder,disabled:l.disabled,readonly:l.readonly,required:l.required,label:l.label,size:l.size,invalid:l.invalid||!!h.value?.messages.length},t.$attrs,{onFocusin:g,onFocusout:k}),u({"label.prepend":J(()=>[V(t.$slots,"label.prepend")]),"label.append":J(()=>[V(t.$slots,"label.append")]),_:2},[t.$slots.prepend?{name:"prepend",fn:J(()=>[V(t.$slots,"prepend")]),key:"0"}:void 0,l.toggle?{name:"append",fn:J(()=>[V(t.$slots,"append"),c(R(et),{size:"small",borderless:"","data-testid":"q-password-toggle",disabled:l.disabled,onClick:b},{default:J(()=>[c(R(gt),q(p(r.value?l.icons.show:l.icons.hide)),null,16)]),_:1},8,["disabled"])]),key:"1"}:void 0,t.$slots.extras||l.rules&&!l.meter?{name:"extras",fn:J(()=>[V(t.$slots,"extras",{},()=>[h.value?.messages.length?(C(),o(hi,{key:0,class:"q-password-field__inline-messages",messages:h.value.messages},null,8,["messages"])):i("",!0)])]),key:"2"}:void 0]),1040,["id","modelValue","class","type","placeholder","disabled","readonly","required","label","size","invalid"]),l.meter&&l.meterLevels&&h.value?(C(),o(yi,{key:0,modelValue:v.value,"onUpdate:modelValue":n[1]||(n[1]=e=>v.value=e),score:h.value.score,levels:l.meterLevels,messages:h.value.messages,anchor:d.value?.$el},null,8,["modelValue","score","levels","messages","anchor"])):i("",!0)],64))}})),_i={class:"q-popover__content"},qi={key:0,class:"q-popover__header"},wi=["innerHTML"],xi={key:1},$i=Me(/*@__PURE__*/v({inheritAttrs:!1,__name:"QPopover",props:/*@__PURE__*/g({id:{},class:{},anchor:{},text:{},title:{},headingLevel:{default:2},arrow:{type:Boolean,default:!0},placement:{default:"right"},attach:{default:"body"},inline:{type:Boolean},html:{type:Boolean,default:!0},disabled:{type:Boolean}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const l=t,a=W(t,"modelValue"),u=n(()=>l.headingLevel>=1&&l.headingLevel<=6?"h"+l.headingLevel:"div")
|
|
846
|
+
return(t,n)=>(C(),o(R(Da),{id:l.id,modelValue:a.value,"onUpdate:modelValue":n[0]||(n[0]=e=>a.value=e),class:_(["q-popover",l.class]),trigger:"click",anchor:l.anchor,arrow:l.arrow,attach:l.attach,inline:l.inline,disabled:l.disabled,placement:l.placement},{default:J(()=>[r("div",_i,[l.title||t.$slots.header?(C(),s("div",qi,[t.$slots.header?V(t.$slots,"header",{key:0}):(C(),s(e,{key:1},[V(t.$slots,"header.prepend"),(C(),o(Q(u.value),{class:"q-popover__title"},{default:J(()=>[d(I(l.title),1)]),_:1})),V(t.$slots,"header.append")],64))])):i("",!0),V(t.$slots,"default",{},()=>[l.text?(C(),s(e,{key:0},[l.html?(C(),s("span",{key:0,innerHTML:l.text},null,8,wi)):(C(),s("span",xi,I(l.text),1))],64)):i("",!0)])])]),_:3},8,["id","modelValue","class","anchor","arrow","attach","inline","disabled","placement"]))}})),Mi={emptyMessage:"Select a field to view details."},Bi={open:{icon:"minus-box"},close:{icon:"plus-box"}},Ci=["id"],Li={class:"q-property-list__table"},Di=/*@__PURE__*/v({__name:"QPropertyList",props:{id:{},class:{},fields:{default:()=>[]},groups:{default:()=>[]},panelPosition:{default:"bottom"},block:{type:Boolean},noPanel:{type:Boolean},noToggle:{type:Boolean},readonly:{type:Boolean},icons:{default:()=>Bi},texts:{default:()=>Mi}},emits:["field-change","select-field"],setup(t,{emit:l}){const a=t,u=l,d=E(a.groups.map(e=>e.id)),c=E(void 0),v=E(null),f=n(()=>a.groups.length?a.groups.filter(e=>a.fields.some(t=>t.group===e.id)):[{id:"",title:""}]),p=n(()=>["q-property-list",{"q-property-list--side-panel":"right"===a.panelPosition,"q-property-list--block":a.block},a.class])
|
|
847
|
+
function m(){v.value?.contains(document.activeElement)||(c.value=void 0)}function h(e){return e?a.fields.filter(t=>t.group===e):a.fields}function b(e){return[{"q-property-list__row--selected":c.value?.id===e.id}]}function g(e){c.value=e,u("select-field",c.value.id)}return X(()=>a.block,async e=>{await k(),e?v.value?.removeAttribute("style"):function(){if(!v.value)return
|
|
849
848
|
const e=v.value.offsetWidth
|
|
850
|
-
v.value.style.minWidth=`${e}px`}()},{immediate:!0}),(t,l)=>(C(),s("div",{id:a.id,ref_key:"componentRoot",ref:v,tabindex:"0",class:_(
|
|
851
|
-
function
|
|
852
|
-
function h(){l.noToggle||(u.value=!u.value,a("click"))}return(e,t)=>(C(),s("tr",{id:l.id,class:_(m.value),role:"group","aria-labelledby":
|
|
853
|
-
return(e,l)=>(C(),s("div",{id:t.id,class:_(["q-property-list-panel",t.class])},[t.field?
|
|
849
|
+
v.value.style.minWidth=`${e}px`}()},{immediate:!0}),(t,l)=>(C(),s("div",{id:a.id,ref_key:"componentRoot",ref:v,tabindex:"0",class:_(p.value),onFocusout:m},[r("table",Li,[l[0]||(l[0]=r("thead",{class:"q-property-list__header"},[r("tr",null,[r("th",{colspan:"2"})])],-1)),r("tbody",null,[(C(!0),s(e,null,S(f.value,l=>(C(),s(e,{key:l.id},[l.title?(C(),o(R(Oi),{key:0,"data-key":l.id,title:l.title,icons:a.icons,"no-toggle":a.noToggle,onClick:()=>function(e){const t=d.value.indexOf(e);-1===t?d.value.push(e):d.value.splice(t,1)}(l.id??"")},null,8,["data-key","title","icons","no-toggle","onClick"])):i("",!0),""===l.id||d.value.includes(l.id??"")?(C(!0),s(e,{key:1},S(h(l.id),e=>(C(),o(R(Wi),{key:e.id,class:_(b(e)),field:e,"model-value":e.props.modelValue,readonly:a.readonly,onFocus:g,onFieldChange:t=>function(e,t){a.readonly||e.props.readonly||u("field-change",e,t)}(e,t)},{default:J(()=>[V(t.$slots,e.id,{field:e})]),_:2},1032,["class","field","model-value","readonly","onFieldChange"]))),128)):i("",!0)],64))),128))])]),a.noPanel?i("",!0):(C(),o(R(Ni),{key:0,field:c.value,texts:a.texts},{default:J(()=>[c.value?V(t.$slots,"panel",{key:0,field:c.value}):i("",!0)]),_:3},8,["field","texts"]))],42,Ci))}}),Ei=["id","data-group"],Si={key:0,class:"q-property-list-field__container"},Vi=/*@__PURE__*/v({__name:"QPropertyListRow",props:/*@__PURE__*/g({id:{},class:{},field:{},readonly:{type:Boolean},required:{type:Boolean}},{modelValue:{},modelModifiers:{}}),emits:/*@__PURE__*/g(["focus","field-change"],["update:modelValue"]),setup(e,{emit:t}){const l=e,a=t,u=W(e,"modelValue"),d=n(()=>["q-property-list__row",l.class]),v=n(()=>["q-property-list__cell","q-property-list__cell-label"]),f=n(()=>l.readonly||(l.field.props.readonly??!1)),p=n(()=>l.required||!!l.field.props?.required),m=zt(P(l,"id")),h=n(()=>({id:m.value,...l.field.props,readonly:f.value,required:p.value}))
|
|
850
|
+
function b(){a("focus",l.field)}function g(e){u.value=e,a("field-change",e)}return(e,t)=>(C(),s("tr",{id:l.id,class:_(d.value),"data-group":l.field.group,onFocusin:b},[r("td",{class:_(v.value),onClick:le(b,["prevent","stop"])},[c(R(xl),{for:R(m),label:l.field.label,required:p.value,onClick:t[0]||(t[0]=le(()=>{},["stop"]))},null,8,["for","label","required"])],2),r("td",{class:"q-property-list__cell",onClick:le(b,["prevent","stop"])},[V(e.$slots,"default",{},()=>[l.field.component?(C(),s("div",Si,[(C(),o(Q(l.field.component),y(h.value,{modelValue:u.value,"onUpdate:modelValue":[t[1]||(t[1]=e=>u.value=e),g]}),null,16,["modelValue"]))])):i("",!0)])])],42,Ei))}}),Ai=["id","aria-labelledby"],Qi=["id"],zi={class:"q-property-list-group__content"},Ii=/*@__PURE__*/v({__name:"QPropertyListGroup",props:{id:{},class:{},title:{},noToggle:{type:Boolean},icons:{default:()=>Bi},texts:{}},emits:["click"],setup(e,{emit:t}){const l=e,a=t,u=E(!0),v=zt(),f=n(()=>u.value?l.icons.open:l.icons.close),m=n(()=>["q-property-list-group",{"q-property-list-group--no-toggle":l.noToggle},l.class])
|
|
851
|
+
function h(){l.noToggle||(u.value=!u.value,a("click"))}return(e,t)=>(C(),s("tr",{id:l.id,class:_(m.value),role:"group","aria-labelledby":R(v),onClick:h},[r("td",{id:R(v),colspan:"2"},[r("div",zi,[l.noToggle?i("",!0):(C(),o(R(et),{key:0,variant:"text",onClick:h},{default:J(()=>[c(R(gt),q(p(f.value)),null,16)]),_:1})),d(" "+I(l.title),1)])],8,Qi)],10,Ai))}}),Ti=["id"],Pi={class:"q-property-list-panel__label"},Fi={class:"q-property-list-panel__description"},Ri={key:1,class:"q-property-list-panel__empty"},Hi=/*@__PURE__*/v({__name:"QPropertyListPanel",props:{id:{},class:{},field:{},icons:{},texts:{default:()=>Mi}},setup(e){const t=e
|
|
852
|
+
return(e,l)=>(C(),s("div",{id:t.id,class:_(["q-property-list-panel",t.class])},[t.field?V(e.$slots,"default",{key:0},()=>[r("div",Pi,I(t.field.label),1),r("div",Fi,I(t.field.description),1)]):(C(),s("div",Ri,I(t.texts.emptyMessage),1))],10,Ti))}}),Ui=Me(Di),Wi=Me(Vi),Oi=Me(Ii),Ni=Me(Hi),ji=["id","checked","name","value","disabled","readonly"],Yi=/*@__PURE__*/v({inheritAttrs:!1,__name:"QRadioButton",props:{id:{},class:{},label:{},required:{type:Boolean},for:{},labelPosition:{},value:{},name:{},labelPlacement:{default:"end"},color:{default:"primary"},size:{default:"regular"},disabled:{type:Boolean},readonly:{type:Boolean},invalid:{type:Boolean}},setup(e){const t=e,l=zt(P(t,"id")),a=N("inputEl"),s=he(t.value)
|
|
854
853
|
if(!s)throw new Error("QRadioButton must be used inside a QRadioGroup")
|
|
855
854
|
const d=n(()=>"start"===t.labelPlacement?"append":"prepend"),c=n(()=>["q-radio-button","regular"!==t.size?`q-radio-button--${t.size}`:void 0,"primary"!==t.color?`q-radio-button--${t.color}`:void 0,{"q-radio-button--readonly":t.readonly,"q-radio-button--disabled":t.disabled,"q-radio-button--invalid":t.invalid},t.class])
|
|
856
|
-
function v(e){(t.readonly||t.disabled)&&["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(e.key)&&e.preventDefault()}function
|
|
855
|
+
function v(e){(t.readonly||t.disabled)&&["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(e.key)&&e.preventDefault()}function f(e){(t.readonly||t.disabled)&&e.preventDefault()}function p(e){t.readonly||t.disabled?e.preventDefault():s?.toggle()}function m(){a.value?.focus()}return(a,n)=>(C(),o(R(xl),{for:R(l),class:_(c.value),label:t.label,tabindex:t.disabled?void 0:-1,onMousedown:le(m,["prevent"]),onClick:p},u({[d.value]:J(()=>[r("input",y({id:R(l),ref:"inputEl",checked:R(s).isActive.value,type:"radio",class:"q-radio-button__input",name:t.name,value:e.value,disabled:t.disabled,readonly:t.readonly},a.$attrs,{onChange:n[0]||(n[0]=(...e)=>R(s).toggle&&R(s).toggle(...e)),onClick:le(f,["stop"]),onKeydown:v}),null,16,ji),"end"===t.labelPlacement?V(a.$slots,"default",{key:0}):i("",!0)]),_:2},["start"===t.labelPlacement?{name:"prepend",fn:J(()=>[V(a.$slots,"default")]),key:"0"}:void 0]),1032,["for","class","label","tabindex"]))}}),Gi=["id"],Ki={key:1,class:"q-field__extras"},Xi=/*@__PURE__*/v({inheritAttrs:!1,__name:"QRadioGroup",props:/*@__PURE__*/g({id:{},class:{},label:{},required:{type:Boolean},for:{},labelPosition:{},name:{},orientation:{default:"vertical"},size:{default:"regular"},columns:{default:1},disabled:{type:Boolean},readonly:{type:Boolean},invalid:{type:Boolean},hasFocusOutline:{type:Boolean,default:!0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,l=W(e,"modelValue"),{active:a}=me({active:l,required:!0})
|
|
857
856
|
X(a,e=>{l.value=e})
|
|
858
|
-
const u=
|
|
859
|
-
return ve({QRadioButton:{size:P(t,"size"),disabled:P(t,"disabled"),readonly:P(t,"readonly"),invalid:P(t,"invalid"),name:d}}),(e,l)=>(C(),s("div",{class:_(c.value)},[t.label?(C(),o(
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
e
|
|
864
|
-
|
|
865
|
-
const
|
|
857
|
+
const u=zt(P(t,"id")),d=n(()=>t.name?zt(P(t,"name")).value:u.value),c=n(()=>["q-radio-group",{"q-radio-group--horizontal":"horizontal"===t.orientation,"q-radio-group--focus-style":t.hasFocusOutline},t.class]),v=n(()=>t.columns>1?{"--q-radio-group-columns":t.columns}:{})
|
|
858
|
+
return ve({QRadioButton:{size:P(t,"size"),disabled:P(t,"disabled"),readonly:P(t,"readonly"),invalid:P(t,"invalid"),name:d}}),(e,l)=>(C(),s("div",{class:_(c.value)},[t.label?(C(),o(R(xl),{key:0,for:R(u),label:t.label,required:t.required},null,8,["for","label","required"])):i("",!0),r("div",y({id:R(u),class:["q-radio-group__group",{"q-radio-group--grid":t.columns>1}],role:"radiogroup",style:v.value},e.$attrs),[V(e.$slots,"default")],16,Gi),e.$slots.extras?(C(),s("div",Ki,[V(e.$slots,"extras")])):i("",!0)],2))}}),Zi=Me(Yi),Ji=Me(Xi),es=["id"],ts={key:0,class:"q-section__title"},ls={class:"q-section__content"},as=Me(/*@__PURE__*/v({__name:"QSection",props:{id:{},class:{},title:{},borderless:{type:Boolean},variant:{default:"default"},block:{type:Boolean}},setup(e){const t=e,l=n(()=>["q-section","default"===t.variant?void 0:`q-section--${t.variant}`,{"q-section--block":t.block,"q-section--borderless":t.borderless},t.class])
|
|
859
|
+
return(e,a)=>(C(),s("div",{id:t.id,class:_(l.value)},[t.title?(C(),s("div",ts,I(t.title),1)):i("",!0),r("div",ls,[V(e.$slots,"default")])],10,es))}})),ns={...zl,...Wt,placeholder:"Choose...",showOptions:"Show options"},os={...ke,...Il},is={key:0,ref:"valueContainer",class:"q-select__value-container"},ss={key:1,class:"q-select__multi-value"},rs={key:1,class:"q-select__value"},us={key:1,class:"q-select__placeholder"},ds=["id","tabindex","aria-expanded","aria-keyshortcuts"],cs=["data-key"],vs={key:0,class:"q-select__loader"},fs=/*@__PURE__*/v({inheritAttrs:!1,__name:"QSelect",props:/*@__PURE__*/g({id:{},class:{},label:{},required:{type:Boolean},for:{},labelPosition:{},size:{},readonly:{type:Boolean},disabled:{type:Boolean},invalid:{type:Boolean},items:{},groups:{default:()=>[]},clearable:{type:Boolean},inline:{type:Boolean},multiple:{type:Boolean},badges:{type:Boolean},loading:{type:Boolean},emptyValue:{},itemValue:{default:"key"},itemLabel:{default:"label"},icons:{default:()=>os},texts:{default:()=>ns}},{modelValue:{},modelModifiers:{}}),emits:/*@__PURE__*/g(["before-show","before-hide","show","hide"],["update:modelValue"]),setup(t,{emit:l}){const a=t,v=l,f=W(t,"modelValue"),p=zt(P(a,"id")),{active:m}=me({active:f,required:P(a,"required"),multiple:P(a,"multiple")}),h=E(!1),b=E(0),g=N("trigger"),w=N("input"),x=N("list"),B=N("content"),L=N("valueContainer"),D=N("allBadges"),A=N("allPlainTexts"),Q=N("hiddenItemsCountBadge")
|
|
860
|
+
let z=null,T=null
|
|
861
|
+
M(()=>{pe()
|
|
862
|
+
const e=g.value?.fieldRef
|
|
863
|
+
e&&(z=new ResizeObserver(()=>{T&&clearTimeout(T),T=setTimeout(()=>{pe()},120)}),z.observe(e))}),$(()=>{z?.disconnect(),T&&clearTimeout(T)})
|
|
864
|
+
const F=n(()=>0===H.value.length),H=n(()=>{if(a.multiple)return(f.value??[]).map(e=>Y(e)).filter(e=>Boolean(e))
|
|
865
|
+
const e=void 0!==f.value?Y(f.value):void 0
|
|
866
866
|
return e?[e]:[]}),U=n(()=>{const e=/* @__PURE__ */new Map
|
|
867
|
-
return a.items?.forEach((t,l)=>{e.set(t.key,l)}),e}),
|
|
868
|
-
function Y(e){return a.items?.find(t=>t[a.itemValue]===e)}function K(e){return e?.[a.itemLabel]??""}function Z(e){return e+1<
|
|
867
|
+
return a.items?.forEach((t,l)=>{e.set(t.key,l)}),e}),O=n(()=>H.value?.map(K).filter(Boolean).join(", ")),j=n(()=>a.clearable&&!a.readonly&&!a.disabled&&!a.loading&&!F.value)
|
|
868
|
+
function Y(e){return a.items?.find(t=>t[a.itemValue]===e)}function K(e){return e?.[a.itemLabel]??""}function Z(e){return e+1<H.value.length-b.value?", ":""}function te(e){Array.isArray(e)?f.value=e.sort((e,t)=>U.value.get(e)-U.value.get(t)):(f.value=e,ie())}function ae(){te(a.emptyValue),ve()}function ne(e){B.value?.contains(e.relatedTarget)||g.value?.fieldRef?.contains(e.relatedTarget)||ie()}function oe(){h.value||(v("before-show"),h.value=!0)}function ie(){h.value&&(v("before-hide"),h.value=!1)}function se(){a.readonly||a.disabled||(h.value?ie():oe())}function re(e){!e.key||a.readonly||a.disabled||(["Enter"," ","ArrowDown","ArrowUp","Home","End","Delete"].includes(e.key)&&(e.preventDefault(),e.stopPropagation()),["Enter"," ","ArrowDown"].includes(e.key)&&oe(),["Escape","Tab"].includes(e.key)&&(h.value?ie():j.value&&"Escape"===e.key&&ae()),j.value&&"Delete"===e.key&&ae())}function ue(e){1===e.key.length&&e.preventDefault(),re(e)}async function de(){await k(),a.loading?B.value?.focus():fe(),v("show")}function ce(){ve(),v("hide")}function ve(){w.value?.focus()}function fe(){x.value?.$el.focus()}async function pe(){if(await k(),await k(),!a.multiple||!L.value||F.value)return void(b.value=0)
|
|
869
869
|
const e=L.value.offsetWidth,t=Q.value?.$el.scrollWidth??30
|
|
870
870
|
let l=t,n=0
|
|
871
871
|
if(a.badges)for(const a of D.value??[]){const o=a.$el.scrollWidth+4
|
|
872
872
|
if(!(l+t+o<=e))break
|
|
873
873
|
l+=o,n++}else for(const a of A.value??[]){const o=a.scrollWidth+4
|
|
874
874
|
if(!(l+t+o<=e))break
|
|
875
|
-
l+=o,n++}
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
875
|
+
l+=o,n++}b.value=(a.badges?D.value?.length??0:A.value?.length??0)-n}return X(()=>a.loading,e=>{!e&&h.value&&k(fe)}),X(()=>a.badges,pe),X(H,pe,{deep:!0}),X(()=>a.clearable,pe),X(m,te),(l,n)=>(C(),s(e,null,[c(R(Ql),{id:R(p),ref:"trigger",label:a.label,"label-position":a.labelPosition,required:a.required,class:_(["q-select",{"q-select--readonly":a.readonly,"q-select--disabled":a.disabled},a.class]),readonly:a.readonly,disabled:a.disabled,"data-loading":a.loading,size:a.size,invalid:a.invalid,onClick:se,onKeydown:re},u({append:J(()=>[V(l.$slots,"append"),j.value?(C(),o(R(Tl),{key:0,icons:a.icons,texts:a.texts,onClick:ae},null,8,["icons","texts"])):i("",!0),a.readonly?i("",!0):(C(),o(R(et),{key:1,class:"q-select__chevron","aria-label":a.texts.showOptions,variant:"ghost",color:"neutral",borderless:"",tabindex:"-1",disabled:a.disabled,onClick:se},{default:J(()=>[c(R(qt),{"model-value":h.value,icons:a.icons},null,8,["model-value","icons"])]),_:1},8,["aria-label","disabled"]))]),default:J(()=>[F.value?(C(),s("span",us,[a.readonly||a.disabled?i("",!0):(C(),s(e,{key:0},[d(I(a.texts.placeholder),1)],64))])):(C(),s(e,{key:0},[a.badges||a.multiple?(C(),s("span",is,[a.multiple?(C(),s(e,{key:0},[(C(!0),s(e,null,S(H.value,(t,l)=>(C(),s(e,{key:`visible-${l}`},[l<H.value.length-b.value?(C(),s(e,{key:0},[a.badges?(C(),o(R(Kt),{key:0,pill:"",color:a.readonly||a.disabled?"neutral":void 0,disabled:a.readonly||a.disabled,removable:!a.readonly&&!a.disabled&&(!a.required||H.value.length>1),texts:a.texts,"onClick:remove":()=>function(e){a.multiple&&e<f.value.length&&(!a.required||f.value.length>1)?m.value=f.value.toSpliced(e,1):ae()}(l)},{default:J(()=>[t?.icon?(C(),o(R(gt),y({key:0,ref_for:!0},t.icon),null,16)):i("",!0),d(" "+I(K(t)),1)]),_:2},1032,["color","disabled","removable","texts","onClick:remove"])):a.multiple?(C(),s("span",ss,I(K(t)+Z(l)),1)):i("",!0)],64)):i("",!0)],64))),128)),b.value>0?(C(),s(e,{key:0},[c(R(Kt),{ref:"hiddenItemsCountBadge",pill:"",class:_(["q-select__badge-count",{"q-select__badge-count--clickable":a.readonly||a.disabled}])},{default:J(()=>[d(" +"+I(b.value),1)]),_:1},8,["class"]),a.readonly||a.disabled?(C(),o(R($i),{key:0,anchor:Q.value?.$el,text:O.value,placement:"bottom-start"},{default:J(()=>[d(I(O.value),1)]),_:1},8,["anchor","text"])):i("",!0)],64)):i("",!0),(C(!0),s(e,null,S(H.value,(t,l)=>(C(),s(e,{key:`measure-${l}`},[a.badges?(C(),o(R(Kt),{key:0,ref_for:!0,ref:"allBadges",pill:"",color:a.readonly||a.disabled?"neutral":void 0,disabled:"",class:"q-select__badge-hidden",removable:!a.readonly&&!a.disabled&&(!a.required||H.value.length>1)},{default:J(()=>[t?.icon?(C(),o(R(gt),y({key:0,ref_for:!0},t.icon),null,16)):i("",!0),d(" "+I(K(t)),1)]),_:2},1032,["color","removable"])):a.multiple?(C(),s("span",{key:1,ref_for:!0,ref:"allPlainTexts",class:"q-select__multi-value--hidden"},I(K(t)+Z(l)),513)):i("",!0)],64))),128))],64)):(C(),o(R(Kt),{key:1,pill:"",disabled:a.readonly||a.disabled,removable:!a.readonly&&!a.disabled&&!a.required,texts:a.texts,"onClick:remove":ae},{default:J(()=>[H.value[0]?.icon?(C(),o(R(gt),q(y({key:0},H.value[0].icon)),null,16)):i("",!0),d(" "+I(K(H.value[0])),1)]),_:1},8,["disabled","removable","texts"]))],512)):(C(),s("span",rs,I(O.value),1))],64)),ee(r("input",y({id:`${R(p)}_input`,ref:"input"},l.$attrs,{"onUpdate:modelValue":n[0]||(n[0]=e=>O.value=e),class:"q-select__input",inputmode:"none",type:"text",autocomplete:"off",tabindex:a.disabled?-1:0,role:"combobox","aria-expanded":h.value,"aria-haspopup":"listbox","aria-keyshortcuts":j.value?"Delete":void 0,onKeydown:ue}),null,16,ds),[[G,O.value]])]),_:2},[1===H.value.length&&H.value[0].icon&&!a.badges||l.$slots.prepend?{name:"prepend",fn:J(()=>[V(l.$slots,"prepend"),1===H.value.length&&H.value[0].icon&&!a.badges?(C(),o(R(gt),q(y({key:0},H.value[0].icon)),null,16)):i("",!0)]),key:"0"}:void 0,l.$slots.extras?{name:"extras",fn:J(()=>[V(l.$slots,"extras")]),key:"1"}:void 0]),1032,["id","label","label-position","required","class","readonly","disabled","data-loading","size","invalid"]),c(R(Da),{modelValue:h.value,"onUpdate:modelValue":n[1]||(n[1]=e=>h.value=e),spy:"",trigger:"manual",placement:"bottom-start",width:"anchor","scroll-lock":"",inline:a.inline,anchor:g.value?.fieldRef,offset:2,onEnter:de,onLeave:ce},{default:J(()=>[r("div",{ref:"content","data-testid":"combobox-dropdown","data-key":R(p),class:"q-select__body",tabindex:"-1",onFocusout:ne,onKeydown:le(re,["stop"])},[V(l.$slots,"body.prepend"),a.loading?(C(),s("div",vs,[c(R(Be),{size:24})])):(C(),o(R(na),{key:1,ref:"list",class:"q-select__items",selectable:"",required:a.required,multiple:a.multiple,"model-value":f.value,items:a.items,groups:t.groups,"item-label":a.itemLabel,"item-value":a.itemValue,"onUpdate:modelValue":te},{item:J(({item:e})=>[V(l.$slots,"item",{item:e})]),_:3},8,["required","multiple","model-value","items","groups","item-label","item-value"])),V(l.$slots,"body.append")],40,cs)]),_:3},8,["modelValue","inline","anchor"])],64))}}),ps=Me(fs),ms={ref:"items",class:"q-sidebar__items"},hs=/*@__PURE__*/v({__name:"QSidebarAnchor",props:{anchorWidth:{},modelValue:{},items:{}},setup(e,{expose:t}){const l=e
|
|
876
|
+
t({itemsEl:N("items")})
|
|
877
|
+
const a=n(()=>{if(void 0!==l.anchorWidth)return{width:`${l.anchorWidth}px`}}),o=E({height:"0",transform:"translateY(0)",opacity:"0",transition:"transform 0.3s ease, height 0.3s ease, opacity 0.2s ease"})
|
|
878
|
+
function i(){o.value={...o.value,opacity:"0",height:"0"}}function u(){if(!l.modelValue)return void i()
|
|
879
|
+
const e=l.items.findIndex(e=>e.value===l.modelValue)
|
|
880
|
+
if(-1===e)return void i()
|
|
881
|
+
const t=function(e){const t=e.anchorRef.value
|
|
882
|
+
return t?"$el"in t?t.$el:t:null}(l.items[e])
|
|
883
|
+
if(!t)return void i()
|
|
884
|
+
const a=e===l.items.length-1?t.offsetHeight:t.offsetHeight-1,n=t.offsetTop
|
|
885
|
+
o.value={...o.value,height:`${a}px`,transform:`translateY(${n}px)`,opacity:"1"}}return X(()=>[l.modelValue,l.items.length],()=>k(u),{immediate:!0}),(e,t)=>(C(),s("div",{class:"q-sidebar-anchor",style:w(a.value)},[r("div",ms,[r("div",{class:"q-sidebar__indicator",style:w(o.value)},null,4)],512)],4))}}),bs=Symbol("q-sidebar"),gs=["id"],ys={class:"q-sidebar__panels"},ks=/*@__PURE__*/v({__name:"QSidebar",props:/*@__PURE__*/g({id:{},class:{},anchorWidth:{default:50},showLabels:{type:Boolean},position:{default:"left"}},{modelValue:{},modelModifiers:{}}),emits:/*@__PURE__*/g(["click:item","resize","resize:start","resize:end"],["update:modelValue"]),setup(e,{emit:t}){const l=e,a=t,o=W(e,"modelValue"),{active:i}=me({active:o,required:!1})
|
|
886
|
+
X(i,e=>{o.value=e})
|
|
887
|
+
const u=N("anchor"),d=z([]),v=E(),f=E(!1),p=E()
|
|
888
|
+
function m(){p.value=void 0}X(o,(e,t)=>{f.value=!e||!t,e&&t&&m(),e&&(v.value=e)},{immediate:!0})
|
|
889
|
+
const h=n(()=>d.value.find(e=>e.value===v.value)),b=n(()=>!!h.value),g=n(()=>{if(h.value?.resizable.value&&void 0!==p.value)return{width:`${(l.anchorWidth??0)+p.value}px`}}),y=n(()=>["q-sidebar",`q-sidebar--${h.value?.initialWidth.value??"small"}`,`q-sidebar--${l.position}`,l.class,{"q-sidebar--expanded":b.value,[`q-sidebar--min-${h.value?.minWidth.value}`]:!!h.value?.resizable.value&&void 0!==h.value?.minWidth.value,[`q-sidebar--max-${h.value?.maxWidth.value}`]:!!h.value?.resizable.value&&void 0!==h.value?.maxWidth.value}])
|
|
890
|
+
return X(()=>l.anchorWidth,m),L(bs,{anchorItemsEl:n(()=>u.value?.itemsEl??null),position:n(()=>l.position??"left"),showLabels:n(()=>!!l.showLabels),anchorWidth:n(()=>l.anchorWidth),animatePanel:n(()=>f.value),items:d,register:function(e){d.value=[...d.value,e]},unregister:function(e){d.value=d.value.filter(t=>t.value!==e)},onItemClick:function(e){a("click:item",e)},onResizeStart:function(){a("resize:start")},onPanelResize:function(e){p.value=e,a("resize",e)},onResizeEnd:function(e){a("resize:end",e)},onPanelAfterLeave:function(){o.value||(v.value=void 0,m())}}),(e,t)=>(C(),s("div",{id:l.id,class:_(y.value),style:w(g.value)},[c(hs,{ref:"anchor","anchor-width":l.anchorWidth,"model-value":o.value,items:d.value},null,8,["anchor-width","model-value","items"]),r("div",ys,[V(e.$slots,"default")])],14,gs))}}),_s=Me(/*@__PURE__*/v({__name:"QToggle",props:/*@__PURE__*/g({id:{},class:{},label:{},variant:{},color:{},borderless:{type:Boolean},elevated:{type:Boolean},block:{type:Boolean},size:{},iconPos:{},pill:{type:Boolean},disabled:{type:Boolean},loading:{type:Boolean}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,l=W(e,"modelValue"),a=n(()=>["q-toggle",{"q-toggle--active":l.value}])
|
|
891
|
+
function i(){l.value=!l.value}return(e,n)=>(C(),o(R(et),y({class:a.value},t,{"aria-pressed":l.value,onClick:i}),{default:J(()=>[V(e.$slots,"default")]),_:3},16,["class","aria-pressed"]))}})),qs={ref:"panel",class:"q-sidebar-panel",role:"region"},ws={class:"q-sidebar-panel__header"},xs={key:0,class:"q-sidebar-panel__title"},$s={class:"q-sidebar-panel__content"},Ms={key:0,class:"q-sidebar-panel__footer"},Bs={key:0,class:"q-sidebar-panel__grip"},Cs=/*@__PURE__*/v({__name:"QSidebarPanel",props:{title:{},resizable:{type:Boolean},showGrip:{type:Boolean},resizePosition:{}},emits:["resize","resize:start","resize:end"],setup(e,{emit:t}){const l=e,a=t,n=N("panel"),o=E(!1)
|
|
885
892
|
let u=0,d=0
|
|
886
|
-
function c(e){l.resizable&&(o.value=!0,u=e.clientX,d=n.value.clientWidth,document.addEventListener("mousemove",v),document.addEventListener("mouseup",
|
|
893
|
+
function c(e){l.resizable&&(o.value=!0,u=e.clientX,d=n.value.clientWidth,document.addEventListener("mousemove",v),document.addEventListener("mouseup",f),document.body.style.userSelect="none",a("resize:start"))}function v(e){if(!l.resizable||!o.value)return
|
|
887
894
|
const t="right"===l.resizePosition?e.clientX-u:u-e.clientX
|
|
888
|
-
a("resize",d+t)}function
|
|
889
|
-
|
|
890
|
-
const
|
|
891
|
-
|
|
892
|
-
m
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
895
|
+
a("resize",d+t)}function f(){l.resizable&&(o.value=!1,a("resize:end",n.value.clientWidth),p())}function p(){l.resizable&&(document.removeEventListener("mousemove",v),document.removeEventListener("mouseup",f),document.body.style.userSelect="")}return B(p),(t,a)=>(C(),s("div",qs,[r("div",ws,[V(t.$slots,"header",{},()=>[V(t.$slots,"header.prepend"),l.title?(C(),s("h3",xs,I(l.title),1)):i("",!0),V(t.$slots,"header.append")])]),r("div",$s,[V(t.$slots,"content")]),t.$slots.footer?(C(),s("div",Ms,[V(t.$slots,"footer")])):i("",!0),e.resizable?(C(),s("div",{key:1,class:_(["q-sidebar-panel__handle",`q-sidebar-panel__handle--${e.resizePosition}`]),"data-testid":"q-sidebar-panel-handle",onMousedown:c},[e.showGrip?(C(),s("div",Bs)):i("",!0)],34)):i("",!0)],512))}}),Ls=/*@__PURE__*/v({__name:"QSidebarItem",props:{id:{},class:{},title:{},icon:{},value:{},resizable:{type:Boolean},showGrip:{type:Boolean,default:!0},initialWidth:{default:"medium"},minWidth:{default:"small"},maxWidth:{default:"block"}},setup(a){const r=a,d=h(bs)
|
|
896
|
+
if(!d)throw new Error("QSidebarItem: Failed to retrieve sidebar context. Ensure the component is used within a QSidebar context.")
|
|
897
|
+
const v=zt(P(r,"value")),f=zt(P(r,"id")),p=zt(),m=he(v)
|
|
898
|
+
if(!m)throw new Error("QSidebarItem: Failed to retrieve group item. Ensure the component is used within a QSidebar context.")
|
|
899
|
+
const b=d,g=m,k=N("anchor"),w=n(()=>b.anchorItemsEl.value),M=n(()=>"left"===b.position.value?"right":"left"),B=n(()=>"left"===b.position.value?"slide-right":"slide-left")
|
|
900
|
+
function L(){g.toggle(),b.onItemClick(v.value)}function D(){b.onPanelAfterLeave()}return x(()=>{b.register({value:v.value,resizable:P(r,"resizable"),initialWidth:P(r,"initialWidth"),minWidth:P(r,"minWidth"),maxWidth:P(r,"maxWidth"),anchorRef:k})}),$(()=>{b.unregister(v.value)}),(a,n)=>(C(),s(e,null,[w.value?(C(),o(t,{key:0,to:w.value},[c(R(_s),{id:R(f),ref:"anchor","data-testid":"q-sidebar-panel-button",borderless:"","icon-pos":"top",class:_(["q-sidebar__item",r.class]),"model-value":R(g).isActive.value,"aria-controls":R(p),label:R(b).showLabels.value?r.title:void 0,title:R(b).showLabels.value?void 0:r.title,"onUpdate:modelValue":L},{default:J(()=>[V(a.$slots,"anchor",{},()=>[r.icon?(C(),o(R(gt),q(y({key:0},r.icon)),null,16)):i("",!0)])]),_:3},8,["id","class","model-value","aria-controls","label","title"])],8,["to"])):i("",!0),c(l,{name:B.value,css:R(b).animatePanel.value,onAfterLeave:D},{default:J(()=>[R(g).isActive.value?(C(),o(Cs,{key:0,id:R(p),"aria-labelledby":R(f),title:r.title,resizable:r.resizable,"show-grip":r.showGrip,"resize-position":M.value,"onResize:start":R(b).onResizeStart,onResize:R(b).onPanelResize,"onResize:end":R(b).onResizeEnd},u({content:J(()=>[V(a.$slots,"default")]),_:2},[a.$slots["header.prepend"]?{name:"header.prepend",fn:J(()=>[V(a.$slots,"header.prepend")]),key:"0"}:void 0,a.$slots.header?{name:"header",fn:J(()=>[V(a.$slots,"header")]),key:"1"}:void 0,a.$slots["header.append"]?{name:"header.append",fn:J(()=>[V(a.$slots,"header.append")]),key:"2"}:void 0,a.$slots.footer?{name:"footer",fn:J(()=>[V(a.$slots,"footer")]),key:"3"}:void 0]),1032,["id","aria-labelledby","title","resizable","show-grip","resize-position","onResize:start","onResize","onResize:end"])):i("",!0)]),_:3},8,["name","css"])],64))}}),Ds=Me(ks),Es=Me(Ls),Ss=Symbol("q-tabs"),Vs=["id"],As={ref:"tabListHost",class:"q-tabs__list"},Qs=["aria-orientation"],zs={class:"q-tabs__panels"},Is=/*@__PURE__*/v({__name:"QTabs",props:/*@__PURE__*/g({id:{},class:{},direction:{default:"horizontal"},align:{default:"start"},variant:{default:"line"},disabled:{type:Boolean}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,l=W(e,"modelValue"),a=N("tabListHost"),o=N("tabListEl"),u=z([]),d=E({width:"0",height:"0",transform:"translate(0, 0)",opacity:"0"}),c=E(!1)
|
|
901
|
+
let v=null
|
|
902
|
+
const{active:f}=me({active:l,required:!0})
|
|
903
|
+
X(f,e=>{l.value=e}),ve({QTab:{disabled:P(t,"disabled")}})
|
|
904
|
+
const p=n(()=>["q-tabs",`q-tabs--${t.direction}`,`q-tabs--${t.variant}`,`q-tabs--align-${t.align}`,c.value?"q-tabs--indicator-ready":void 0,t.class])
|
|
905
|
+
function m(e){const t=e.tabRef.value
|
|
906
|
+
return t?"$el"in t?t.$el:t:null}function h(){c.value=!1,d.value={...d.value,opacity:"0",width:"0",height:"0"}}function b(){if("line"!==t.variant||!l.value)return void h()
|
|
907
|
+
const e=u.value.find(e=>e.value===l.value)
|
|
908
|
+
if(!e)return void h()
|
|
909
|
+
const a=m(e)
|
|
910
|
+
if(!a)return void h()
|
|
911
|
+
const n="horizontal"===t.direction,o=c.value
|
|
912
|
+
d.value=n?{width:`${a.offsetWidth}px`,height:"4px",transform:`translate(${a.offsetLeft}px, 0)`,opacity:"1"}:{width:"4px",height:`${a.offsetHeight}px`,transform:`translate(0, ${a.offsetTop}px)`,opacity:"1"},o||k(()=>{"1"===d.value.opacity&&(c.value=!0)})}function g(){if("line"!==t.variant)return void v?.disconnect()
|
|
913
|
+
v?v.disconnect():v=new ResizeObserver(()=>{b()})
|
|
914
|
+
const e=a.value
|
|
915
|
+
e&&v.observe(e)
|
|
916
|
+
for(const t of u.value){const e=m(t)
|
|
917
|
+
e&&v.observe(e)}}function y(){return u.value.filter(e=>!R(e.disabled))}function q(){const e=y()
|
|
918
|
+
e.length&&(e.some(e=>e.value===l.value)||(l.value=e[0].value))}return X(()=>u.value.map(e=>[e.value,R(e.disabled)]),()=>q()),X(()=>[l.value,u.value.length,t.direction,t.variant,t.align],()=>k(b),{immediate:!0}),X(()=>[u.value.length,t.variant],()=>k(g),{immediate:!0}),$(()=>{v?.disconnect(),v=null}),L(Ss,{tabListEl:o,direction:n(()=>t.direction),register:function(e){u.value=[...u.value,e],q()},unregister:function(e){u.value=u.value.filter(t=>t.value!==e)},focusAdjacent:function(e,t){const l=y()
|
|
897
919
|
if(!l.length)return
|
|
898
920
|
const a=l.findIndex(t=>t.value===e),n=l[-1===a?0:(a+t+l.length)%l.length]
|
|
899
|
-
n.select(),n.focus()},focusFirst:function(){const e=
|
|
900
|
-
e&&(e.select(),e.focus())},focusLast:function(){const e=
|
|
901
|
-
t&&(t.select(),t.focus())}}),(e,l)=>(C(),s("div",{id:t.id,class:_(
|
|
921
|
+
n.select(),n.focus()},focusFirst:function(){const e=y()[0]
|
|
922
|
+
e&&(e.select(),e.focus())},focusLast:function(){const e=y(),t=e[e.length-1]
|
|
923
|
+
t&&(t.select(),t.focus())}}),(e,l)=>(C(),s("div",{id:t.id,class:_(p.value)},[r("div",As,[r("div",{ref_key:"tabListEl",ref:o,class:"q-tabs__tablist",role:"tablist","aria-orientation":t.direction},null,8,Qs),"line"===t.variant?(C(),s("div",{key:0,class:"q-tabs__indicator","aria-hidden":"true",style:w(d.value)},null,4)):i("",!0)],512),r("div",zs,[V(e.$slots,"default")])],10,Vs))}}),Ts={class:"q-tab__title"},Ps={class:"q-tab__title-text"},Fs=["id","aria-labelledby","tabindex"],Rs=/*@__PURE__*/v({__name:"QTab",props:{id:{},class:{},title:{},required:{type:Boolean},disabled:{type:Boolean},value:{},texts:{default:()=>_e}},setup(l){const a=l,u=h(Ss,void 0)
|
|
902
924
|
if(!u)throw new Error("QTab: Failed to retrieve tabs context. Ensure the component is used within a QTabs context.")
|
|
903
|
-
const d=
|
|
904
|
-
if(!
|
|
905
|
-
const m=N("tabBtn"),
|
|
906
|
-
function q(){(m.value?.$el)?.focus?.()}function w(){
|
|
907
|
-
return t&&"ArrowRight"===e.key||!t&&"ArrowDown"===e.key?(e.preventDefault(),void u?.focusAdjacent(d.value,1)):t&&"ArrowLeft"===e.key||!t&&"ArrowUp"===e.key?(e.preventDefault(),void u?.focusAdjacent(d.value,-1)):"Home"===e.key?(e.preventDefault(),void u?.focusFirst()):void("End"===e.key&&(e.preventDefault(),u?.focusLast()))}return x(()=>{u.register({value:d.value,disabled:
|
|
908
|
-
var
|
|
925
|
+
const d=zt(P(a,"value")),v=zt(),f=zt(),p=he(d)
|
|
926
|
+
if(!p)throw new Error("QTab: Failed to retrieve group item. Ensure the component is used within a QTabs context.")
|
|
927
|
+
const m=N("tabBtn"),b=n(()=>u.tabListEl.value),g=n(()=>!!a.disabled),y=n(()=>{if(!g.value)return p.isActive.value?0:-1}),k=n(()=>["q-tab",{"q-tab--active":p.isActive.value,"q-tab--disabled":g.value},a.class])
|
|
928
|
+
function q(){(m.value?.$el)?.focus?.()}function w(){g.value||p?.isActive.value||p?.toggle()}function M(){w()}function B(e){const t="horizontal"===u?.direction.value
|
|
929
|
+
return t&&"ArrowRight"===e.key||!t&&"ArrowDown"===e.key?(e.preventDefault(),void u?.focusAdjacent(d.value,1)):t&&"ArrowLeft"===e.key||!t&&"ArrowUp"===e.key?(e.preventDefault(),void u?.focusAdjacent(d.value,-1)):"Home"===e.key?(e.preventDefault(),void u?.focusFirst()):void("End"===e.key&&(e.preventDefault(),u?.focusLast()))}return x(()=>{u.register({value:d.value,disabled:g,tabRef:m,focus:q,select:w})}),$(()=>{u.unregister(d.value)}),(l,n)=>(C(),s(e,null,[b.value?(C(),o(t,{key:0,to:b.value},[c(R(et),{id:R(v),ref:"tabBtn",borderless:"",role:"tab",variant:"text",class:_(k.value),disabled:g.value,"data-value":R(d),"aria-selected":R(p).isActive.value,"aria-controls":R(f),"aria-required":a.required||void 0,tabindex:y.value,onClick:M,onKeydown:B},{default:J(()=>[r("span",Ts,[V(l.$slots,"title.prepend"),V(l.$slots,"title",{},()=>[r("span",Ps,I(a.title),1)]),a.required?(C(),o(R(xt),{key:0,announce:"",texts:a.texts},null,8,["texts"])):i("",!0),V(l.$slots,"title.append")])]),_:3},8,["id","class","disabled","data-value","aria-selected","aria-controls","aria-required","tabindex"])],8,["to"])):i("",!0),ee(r("div",{id:R(f),class:"q-tabs__panel",role:"tabpanel","aria-labelledby":R(v),tabindex:R(p).isActive.value?0:void 0},[V(l.$slots,"default")],8,Fs),[[K,R(p).isActive.value]])],64))}}),Hs=Me(Is),Us=Me(Rs)
|
|
930
|
+
var Ws=["id","required","placeholder","readonly","disabled","maxlength","rows","cols","resize","wrap"],Os=Me(/*@__PURE__*/v({inheritAttrs:!1,__name:"QTextArea",props:/*@__PURE__*/g({id:{},class:{},label:{},required:{type:Boolean},for:{},labelPosition:{},size:{},readonly:{type:Boolean},disabled:{type:Boolean},invalid:{type:Boolean},placeholder:{},maxLength:{},rows:{default:3},cols:{},resize:{default:"vertical"},wrap:{default:"soft"},autosize:{type:Boolean}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,l=W(e,"modelValue"),a=n({get:()=>l.value,set:e=>{const a=t.maxLength
|
|
909
931
|
l.value=a?e?.slice(0,a):e}})
|
|
910
932
|
X(l,e=>a.value=e,{immediate:!0})
|
|
911
|
-
const i=
|
|
933
|
+
const i=zt(P(t,"id")),s=n(()=>t.readonly||t.disabled?void 0:t.placeholder),d=n(()=>({input:t.autosize?v:null})),c=E(),{triggerResize:v,stop:f}=function(e){const{element:t,styleProp:l="height"}=e,a=()=>{const e=t.value
|
|
912
934
|
if(!e)return
|
|
913
935
|
e.style[l]="auto"
|
|
914
936
|
const a=e.scrollHeight
|
|
915
937
|
e.style[l]=`${a}px`},n=X(t,a),o=X(()=>t.value?.value,a)
|
|
916
938
|
return{triggerResize:a,stop:()=>{n(),o()}}}({element:n(()=>t.autosize?c.value:void 0),styleProp:"minHeight"})
|
|
917
|
-
return $(
|
|
918
|
-
function
|
|
939
|
+
return $(f),(e,l)=>(C(),o(R(Ql),{class:_(["q-text-area",t.class]),for:R(i),label:t.label,"label-position":t.labelPosition,size:t.size,readonly:t.readonly,disabled:t.disabled,required:t.required},u({"label.prepend":J(()=>[V(e.$slots,"label.prepend")]),"label.append":J(()=>[V(e.$slots,"label.append")]),default:J(()=>[ee(r("textarea",y({id:R(i),ref_key:"textareaRef",ref:c,"onUpdate:modelValue":l[0]||(l[0]=e=>a.value=e),class:"q-text-area__input",required:t.required,placeholder:s.value,readonly:t.readonly,disabled:t.disabled,maxlength:t.maxLength,rows:t.rows,cols:t.cols,resize:t.resize,wrap:t.wrap},e.$attrs,T(d.value,!0)),null,16,Ws),[[G,a.value]])]),_:2},[e.$slots.prepend?{name:"prepend",fn:J(()=>[V(e.$slots,"prepend")]),key:"0"}:void 0,e.$slots.append?{name:"append",fn:J(()=>[V(e.$slots,"append")]),key:"1"}:void 0,e.$slots.extras?{name:"extras",fn:J(()=>[V(e.$slots,"extras")]),key:"2"}:void 0]),1032,["class","for","label","label-position","size","readonly","disabled","required"]))}})),Ns=Symbol.for("q-toast")
|
|
940
|
+
function js(){const{toasts:e}=function(){const e=h(Ns)
|
|
919
941
|
if(!e)throw new Error("useInjectedToast must be used after provideToast")
|
|
920
942
|
return e}()
|
|
921
|
-
return{toasts:e,addToast:function(t,l){const a=
|
|
922
|
-
return e.value.push({id:a,props:t}),a},removeToast:function(t){const l=e.value.findIndex(e=>e.id===t);-1!==l&&e.value.splice(l,1)}}}var
|
|
943
|
+
return{toasts:e,addToast:function(t,l){const a=zt(l).value
|
|
944
|
+
return e.value.push({id:a,props:t}),a},removeToast:function(t){const l=e.value.findIndex(e=>e.id===t);-1!==l&&e.value.splice(l,1)}}}var Ys=["id"],Gs=Me(/*@__PURE__*/v({__name:"QThemeProvider",props:{id:{},class:{},theme:{}},setup(e){const t=e,{class:l,css:a}=Ge(P(t,"theme")),n=zt(P(t,"id"))
|
|
923
945
|
let o=null,i=null
|
|
924
946
|
return Z(()=>{if(a.value){const e=l.value
|
|
925
|
-
i=e,o=document.getElementById(e),o||(o=document.createElement("style"),o.id=e,document.head.appendChild(o)),o.textContent=a.value}}),$(()=>{o&&i&&!Array.from(document.querySelectorAll(`.q-theme-provider.${l.value}:not(#${n.value})`)).length&&o.parentNode&&o.parentNode.removeChild(o)}),(e,a)=>(C(),s("div",{id:
|
|
947
|
+
i=e,o=document.getElementById(e),o||(o=document.createElement("style"),o.id=e,document.head.appendChild(o)),o.textContent=a.value}}),$(()=>{o&&i&&!Array.from(document.querySelectorAll(`.q-theme-provider.${l.value}:not(#${n.value})`)).length&&o.parentNode&&o.parentNode.removeChild(o)}),(e,a)=>(C(),s("div",{id:R(n),class:_(["q-theme-provider",R(l),t.class])},[V(e.$slots,"default")],10,Ys))}})),Ks={close:{icon:"close"}},Xs={class:"q-toast__title"},Zs=/*@__PURE__*/v({__name:"QToast",props:{id:{},class:{},title:{},text:{},block:{type:Boolean},color:{default:"info"},elevation:{default:"medium"},variant:{default:"tonal"},timeout:{default:5e3},icons:{default:()=>Ks}},emits:["dismiss"],setup(e,{emit:t}){const l=e,a=t,s=Ye(),{isUtilityColor:d,style:v}=Ke(P(l,"color")),f=n(()=>{const e=d.value?`q-toast--${l.color}`:void 0,t=l.block?"q-toast--block":void 0,a=l.title?"q-toast--vertical":void 0
|
|
926
948
|
return["q-toast",`q-toast--${l.variant}`,e,t,a,l.class]}),m=n(()=>{const e=d.value?function(e){const t=s.current.value.scheme
|
|
927
949
|
if(e in t)return t[e]}(l.color):v.value?.mainColor
|
|
928
|
-
if(e)return Ee(
|
|
929
|
-
let
|
|
930
|
-
function
|
|
950
|
+
if(e)return Ee(Te(Qe(e),88))}),h=n(()=>d.value?{"--q-toast-tonal-color":m.value}:{"--q-toast-main-color":v.value?.mainColor,"--q-toast-on-main-color":v.value?.onMainColor,"--q-toast-hover-color":v.value?.hoverColor,"--q-toast-tonal-color":m.value}),b=n(()=>"bold"===l.variant?"bold":"ghost")
|
|
951
|
+
let g
|
|
952
|
+
function y(){void 0!==g&&window.clearTimeout(g),a("dismiss")}return M(()=>{l.timeout>0&&(g=window.setTimeout(y,l.timeout))}),B(()=>{void 0!==g&&window.clearTimeout(g)}),(e,t)=>(C(),o(R(rt),{id:l.id,elevation:l.elevation,width:l.block?"block":void 0,class:_(f.value),style:w(h.value)},u({default:J(()=>[c(R(Yo),{fluid:"",class:"q-toast__body"},{default:J(()=>[c(R(Go),{align:"center",justify:"between"},{default:J(()=>[c(R(jo),null,{default:J(()=>[V(e.$slots,"default",{},()=>[r("span",null,I(l.text),1)])]),_:3}),l.title?i("",!0):(C(),o(R(jo),{key:0,cols:"auto"},{default:J(()=>[V(e.$slots,"dismiss",{},()=>[c(R(et),{class:"q-toast__dismiss",variant:b.value,color:l.color,onClick:y},{default:J(()=>[c(R(gt),q(p(l.icons.close)),null,16)]),_:1},8,["variant","color"])])]),_:3}))]),_:3})]),_:3})]),_:2},[l.title?{name:"header",fn:J(()=>[c(R(Yo),{fluid:""},{default:J(()=>[c(R(Go),{align:"center",justify:"between"},{default:J(()=>[c(R(jo),null,{default:J(()=>[r("div",Xs,[e.$slots["title.prepend"]?V(e.$slots,"title.prepend",{key:0}):i("",!0),r("h4",null,I(l.title),1),e.$slots["title.append"]?V(e.$slots,"title.append",{key:1}):i("",!0)])]),_:3}),c(R(jo),{cols:"auto"},{default:J(()=>[V(e.$slots,"dismiss",{},()=>[c(R(et),{class:"q-toast__dismiss",variant:b.value,color:l.color,onClick:y},{default:J(()=>[c(R(gt),q(p(l.icons.close)),null,16)]),_:1},8,["variant","color"])])]),_:3})]),_:3})]),_:3})]),key:"0"}:void 0]),1032,["id","elevation","width","class","style"]))}}),Js=/*@__PURE__*/v({__name:"QToaster",props:{id:{},class:{},placement:{default:"top-right"},maxToasts:{},reverseOrder:{type:Boolean}},setup(t){const l=t,{toasts:i,removeToast:r}=js(),u=n(()=>{let e=[...i.value]
|
|
931
953
|
return l.reverseOrder&&(e=e.reverse()),e.slice(0,l.maxToasts)})
|
|
932
|
-
return(t,n)=>(C(),o(a,{id:l.id,name:"toast-stack",tag:"div",class:_(["q-toaster",l.class]),"data-placement":l.placement},{default:J(()=>[(C(!0),s(e,null,
|
|
933
|
-
return X(a,e=>{l.value=e}),ve({QToggleGroupItem:{disabled:P(t,"disabled"),borderless:P(t,"borderless")}}),(e,l)=>(C(),o(
|
|
954
|
+
return(t,n)=>(C(),o(a,{id:l.id,name:"toast-stack",tag:"div",class:_(["q-toaster",l.class]),"data-placement":l.placement},{default:J(()=>[(C(!0),s(e,null,S(u.value,e=>(C(),s("div",{key:e.id,class:"q-toast__container"},[c(R(er),y({ref_for:!0},e.props,{onDismiss:()=>R(r)(e.id)}),null,16,["onDismiss"])]))),128))]),_:1},8,["id","class","data-placement"]))}}),er=Me(Zs),tr=Me(Js),lr=/*@__PURE__*/v({__name:"QToggleGroup",props:/*@__PURE__*/g({id:{},class:{},block:{type:Boolean},borderless:{type:Boolean},elevated:{type:Boolean},disabled:{type:Boolean},multiple:{type:Boolean},required:{type:Boolean}},{modelValue:{type:[String,Number,Boolean,Symbol,Array]},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,l=W(e,"modelValue"),{active:a}=me({active:l,required:P(t,"required"),multiple:P(t,"multiple")})
|
|
955
|
+
return X(a,e=>{l.value=e}),ve({QToggleGroupItem:{disabled:P(t,"disabled"),borderless:P(t,"borderless")}}),(e,l)=>(C(),o(R(Nt),{id:t.id,class:_(t.class),block:t.block,elevated:t.elevated},{default:J(()=>[V(e.$slots,"default")]),_:3},8,["id","class","block","elevated"]))}}),ar=/*@__PURE__*/v({__name:"QToggleGroupItem",props:{id:{},class:{},label:{},variant:{},color:{},borderless:{type:Boolean},elevated:{type:Boolean},block:{type:Boolean},size:{},iconPos:{},pill:{type:Boolean},disabled:{type:Boolean},loading:{type:Boolean},value:{}},setup(e){const t=e,l=he(zt(P(t,"value")))
|
|
934
956
|
if(!l)throw new Error("QToggleGroupItem: Failed to retrieve group item. Ensure the component is used within a QToggleGroup context.")
|
|
935
|
-
return(e,a)=>(C(),o(
|
|
936
|
-
function u(){return l.anchor?Ma(l.anchor):void 0}function v(){u()?.setAttribute("aria-describedby",n.value)}function
|
|
937
|
-
function
|
|
957
|
+
return(e,a)=>(C(),o(R(_s),y({"model-value":R(l).isActive.value},t,{"onUpdate:modelValue":R(l).toggle}),{default:J(()=>[V(e.$slots,"default")]),_:3},16,["model-value","onUpdate:modelValue"]))}}),nr=Me(lr),or=Me(ar),ir={class:"q-tooltip__content"},sr=["innerHTML"],rr=Me(/*@__PURE__*/v({__name:"QTooltip",props:/*@__PURE__*/g({id:{},class:{},anchor:{},text:{},icon:{},appearance:{default:"inverted"},placement:{default:"right"},arrow:{type:Boolean,default:!0},attach:{default:"body"},inline:{type:Boolean},delay:{default:500},html:{type:Boolean,default:!0},trigger:{default:"hover"},disabled:{type:Boolean}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const l=t,a=W(t,"modelValue"),n=zt(P(l,"id"))
|
|
958
|
+
function u(){return l.anchor?Ma(l.anchor):void 0}function v(){u()?.setAttribute("aria-describedby",n.value)}function f(){u()?.removeAttribute("aria-describedby")}return B(function(){l.anchor&&f()}),X(()=>l.anchor,function(e,t){t&&f(),e&&a&&v()}),(t,u)=>(C(),s(e,null,[V(t.$slots,"anchor",{props:{"aria-describedby":R(n)}}),c(R(Da),{id:R(n),modelValue:a.value,"onUpdate:modelValue":u[0]||(u[0]=e=>a.value=e),anchor:l.anchor,role:"tooltip","non-modal":"",appearance:l.appearance,arrow:l.arrow,attach:l.attach,inline:l.inline,class:_(["q-tooltip",l.class]),delay:l.delay,disabled:l.disabled,placement:l.placement,trigger:l.trigger,onEnter:v,onLeave:f},{default:J(()=>[r("div",ir,[V(t.$slots,"default",{},()=>[l.icon?(C(),o(R(gt),q(y({key:0},l.icon)),null,16)):i("",!0),l.html?(C(),s("span",{key:1,innerHTML:l.text},null,8,sr)):(C(),s(e,{key:2},[d(I(l.text),1)],64))])])]),_:3},8,["id","modelValue","anchor","appearance","arrow","attach","inline","class","delay","disabled","placement","trigger"])],64))}})),ur=/* @__PURE__ */ne({DEFAULT_TEXTS:()=>Rl,QAccordion:()=>Tt,QAccordionItem:()=>Pt,QAvatar:()=>Ht,QBadge:()=>Kt,QBadgeIndicator:()=>Zt,QButton:()=>et,QButtonGroup:()=>Nt,QCard:()=>rt,QCarousel:()=>bl,QCheckbox:()=>Cl,QCheckboxLabel:()=>Ll,QCol:()=>jo,QCollapsible:()=>Et,QColorPicker:()=>Wl,QCombobox:()=>Qa,QContainer:()=>Yo,QDateTimePicker:()=>jn,QDefaultsProvider:()=>Yn,QDialog:()=>fo,QDialogProvider:()=>po,QDismissibleLayer:()=>ua,QDivider:()=>bo,QDropdownMenu:()=>Bo,QField:()=>Ql,QFileUpload:()=>Ro,QFocusWrap:()=>ka,QIcon:()=>gt,QIconFont:()=>yt,QIconImg:()=>kt,QIconSvg:()=>_t,QInputGroup:()=>ti,QLabel:()=>xl,QLineLoader:()=>ai,QList:()=>na,QListItem:()=>oa,QListItemGroup:()=>ia,QMeter:()=>si,QObfuscation:()=>fi,QOverlay:()=>Da,QPasswordField:()=>ki,QPopover:()=>$i,QPropertyList:()=>Ui,QPropertyListGroup:()=>Oi,QPropertyListPanel:()=>Ni,QPropertyListRow:()=>Wi,QRadioButton:()=>Zi,QRadioGroup:()=>Ji,QRow:()=>Go,QSection:()=>as,QSelect:()=>ps,QSidebar:()=>Ds,QSidebarItem:()=>Es,QSkeletonLoader:()=>ll,QSpacer:()=>Ko,QSpinnerLoader:()=>Be,QSwitch:()=>Wa,QTab:()=>Us,QTabs:()=>Hs,QTextArea:()=>Os,QTextField:()=>Hl,QThemeProvider:()=>Gs,QToast:()=>er,QToaster:()=>tr,QToggle:()=>_s,QToggleGroup:()=>nr,QToggleGroupItem:()=>or,QTooltip:()=>rr}),dr=/* @__PURE__ */ne({addDays:()=>mn,addMonths:()=>hn,advancePastFormatLiteral:()=>yn,applyMask:()=>Cn,clampDayByMonthYear:()=>_n,clampNumericSegments:()=>qn,completePartialDateInput:()=>ln,convertDatePatternToMask:()=>Oa,darken:()=>Pe,formatDate:()=>cn,formatUsesSeconds:()=>ja,formatUsesTime:()=>Na,getComplementaryColor:()=>Ie,getContrastingColor:()=>ze,getDaysInMonth:()=>sn,getEndOfDay:()=>pn,getFirstDayOfMonth:()=>bn,getFirstDayOfWeek:()=>rn,getLastDayOfMonth:()=>gn,getStartOfDay:()=>fn,hslToRgb:()=>Le,hueToRgb:()=>De,inputIncludesTimePortion:()=>an,isBetween:()=>dn,isLeapYear:()=>on,isSameDay:()=>un,isTimeOnlyFormat:()=>Ga,isValidHex:()=>Ve,lighten:()=>Te,mergeColorSchemes:()=>Fe,normalizeNumericToken:()=>kn,padNumber:()=>Ka,parseColor:()=>Qe,parseDate:()=>vn,parseDateWithCompletion:()=>nn,parseIsoDate:()=>Za,rgbToHex:()=>Ee,rgbToHsl:()=>Ce,rgbToVariableString:()=>Se,tryParseRgb:()=>Ae,uses12HourFormat:()=>Ya})
|
|
959
|
+
function cr(e={}){return{install:t=>{const l=e.components||{}
|
|
938
960
|
for(const e in l)t.component(e,l[e])
|
|
939
961
|
const a=e.defaults||{}
|
|
940
962
|
t.provide(ce,E(a)),function(e,t){const l=[]
|
|
941
963
|
let a
|
|
942
964
|
if(t)for(const n of t.themes){const e={..."light"===n.mode?oe:ie,...n.colors}
|
|
943
965
|
l.push({name:n.name,mode:n.mode,scheme:e}),n.name===t.defaultTheme&&(a=n.name)}else{const e=[{name:"light",mode:"light",scheme:oe},{name:"dark",mode:"dark",scheme:ie}]
|
|
944
|
-
l.push(...e),a="light"}if(a){const t=
|
|
945
|
-
Ue(l),X(t.class,
|
|
966
|
+
l.push(...e),a="light"}if(a){const t=Oe(E(a),E(l))
|
|
967
|
+
Ue(l),X(t.class,vr,{immediate:!0}),e.provide(je,t)}}(t,e.themes)
|
|
946
968
|
const n=function(){const e=E([])
|
|
947
969
|
return{layers:e,register:function(t){e.value.push(t)},unregister:function(t){const l=e.value.indexOf(t);-1!==l&&e.value.splice(l,1)},isTop:function(t){return e.value[e.value.length-1]===t}}}()
|
|
948
970
|
t.provide(sa,n),function(e){const t={toasts:E([])}
|
|
949
|
-
e.provide(
|
|
950
|
-
t.className=Array.from(t.classList).filter(e=>!e.startsWith("q-theme")).join(" "),t.classList.add(e)}var
|
|
951
|
-
export{
|
|
971
|
+
e.provide(Ns,t)}(t)}}}function vr(e){const t=document.documentElement
|
|
972
|
+
t.className=Array.from(t.classList).filter(e=>!e.startsWith("q-theme")).join(" "),t.classList.add(e)}var fr=(e={})=>cr({components:ur,...e})
|
|
973
|
+
export{ur as components,fr as createFramework,Ge as provideTheme,se as templates,co as useDialog,Ye as useTheme,js as useToast,dr as utils}
|