import{_ as B}from"./Dn3hksRu.js";import{bt as S,d1 as O,d2 as x,d3 as V,j as g,c as l,H as w,bf as U,bM as j,bp as s,bA as T,bv as E,cd as P,c3 as q,aI as W,aB as K,bG as M,dC as N,bx as I}from"./Co_VNPRB.js";import{Q as A}from"./NW3l-yb7.js";const J=S({name:"QHeader",props:{modelValue:{type:Boolean,default:!0},reveal:Boolean,revealOffset:{type:Number,default:250},bordered:Boolean,elevated:Boolean,heightHint:{type:[String,Number],default:50}},emits:["reveal","focusin"],setup(e,{slots:y,emit:c}){const{proxy:{$q:a}}=T(),o=O(V,x);if(o===x)return x;const i=g(parseInt(e.heightHint,10)),d=g(!0),_=l(()=>e.reveal===!0||o.view.value.indexOf("H")!==-1||a.platform.is.ios&&o.isContainer.value===!0),b=l(()=>{if(e.modelValue!==!0)return 0;if(_.value===!0)return d.value===!0?i.value:0;const t=i.value-o.scroll.value.position;return t>0?t:0}),u=l(()=>e.modelValue!==!0||_.value===!0&&d.value!==!0),$=l(()=>e.modelValue===!0&&u.value===!0&&e.reveal===!0),C=l(()=>"q-header q-layout__section--marginal "+(_.value===!0?"fixed":"absolute")+"-top"+(e.bordered===!0?" q-header--bordered":"")+(u.value===!0?" q-header--hidden":"")+(e.modelValue!==!0?" q-layout--prevent-focus":"")),H=l(()=>{const t=o.rows.value.top,v={};return t[0]==="l"&&o.left.space===!0&&(v[a.lang.rtl===!0?"right":"left"]=`${o.left.size}px`),t[2]==="r"&&o.right.space===!0&&(v[a.lang.rtl===!0?"left":"right"]=`${o.right.size}px`),v});function f(t,v){o.update("header",t,v)}function p(t,v){t.value!==v&&(t.value=v)}function L({height:t}){p(i,t),f("size",t)}function R(t){$.value===!0&&p(d,!0),c("focusin",t)}w(()=>e.modelValue,t=>{f("space",t),p(d,!0),o.animate()}),w(b,t=>{f("offset",t)}),w(()=>e.reveal,t=>{t===!1&&p(d,e.modelValue)}),w(d,t=>{o.animate(),c("reveal",t)}),w(o.scroll,t=>{e.reveal===!0&&p(d,t.direction==="up"||t.position<=e.revealOffset||t.position-t.inflectionPoint<100)});const z={};return o.instances.header=z,e.modelValue===!0&&f("size",i.value),f("space",e.modelValue),f("offset",b.value),U(()=>{o.instances.header===z&&(o.instances.header=void 0,f("size",0),f("offset",0),f("space",!1))}),()=>{const t=j(y.default,[]);return e.elevated===!0&&t.push(s("div",{class:"q-layout__shadow absolute-full overflow-hidden no-pointer-events"})),t.push(s(B,{debounce:0,onResize:L})),s("header",{class:C.value,style:H.value,onFocusin:R},t)}}}),X=S({name:"QLayout",props:{container:Boolean,view:{type:String,default:"hhh lpr fff",validator:e=>/^(h|l)h(h|r) lpr (f|l)f(f|r)$/.test(e.toLowerCase())},onScroll:Function,onScrollHeight:Function,onResize:Function},setup(e,{slots:y,emit:c}){const{proxy:{$q:a}}=T(),o=g(null),i=g(a.screen.height),d=g(e.container===!0?0:a.screen.width),_=g({position:0,direction:"down",inflectionPoint:0}),b=g(0),u=g(E.value===!0?0:P()),$=l(()=>"q-layout q-layout--"+(e.container===!0?"containerized":"standard")),C=l(()=>e.container===!1?{minHeight:a.screen.height+"px"}:null),H=l(()=>u.value!==0?{[a.lang.rtl===!0?"left":"right"]:`${u.value}px`}:null),f=l(()=>u.value!==0?{[a.lang.rtl===!0?"right":"left"]:0,[a.lang.rtl===!0?"left":"right"]:`-${u.value}px`,width:`calc(100% + ${u.value}px)`}:null);function p(n){if(e.container===!0||document.qScrollPrevented!==!0){const r={position:n.position.top,direction:n.direction,directionChanged:n.directionChanged,inflectionPoint:n.inflectionPoint.top,delta:n.delta.top};_.value=r,e.onScroll!==void 0&&c("scroll",r)}}function L(n){const{height:r,width:m}=n;let h=!1;i.value!==r&&(h=!0,i.value=r,e.onScrollHeight!==void 0&&c("scrollHeight",r),z()),d.value!==m&&(h=!0,d.value=m),h===!0&&e.onResize!==void 0&&c("resize",n)}function R({height:n}){b.value!==n&&(b.value=n,z())}function z(){if(e.container===!0){const n=i.value>b.value?P():0;u.value!==n&&(u.value=n)}}let t=null;const v={instances:{},view:l(()=>e.view),isContainer:l(()=>e.container),rootRef:o,height:i,containerHeight:b,scrollbarWidth:u,totalWidth:l(()=>d.value+u.value),rows:l(()=>{const n=e.view.toLowerCase().split(" ");return{top:n[0].split(""),middle:n[1].split(""),bottom:n[2].split("")}}),header:q({size:0,offset:0,space:!1}),right:q({size:300,offset:0,space:!1}),footer:q({size:0,offset:0,space:!1}),left:q({size:300,offset:0,space:!1}),scroll:_,animate(){t!==null?clearTimeout(t):document.body.classList.add("q-body--layout-animate"),t=setTimeout(()=>{t=null,document.body.classList.remove("q-body--layout-animate")},155)},update(n,r,m){v[n][r]=m}};if(W(V,v),P()>0){let n=function(){h=null,Q.classList.remove("hide-scrollbar")},r=function(){if(h===null){if(Q.scrollHeight>a.screen.height)return;Q.classList.add("hide-scrollbar")}else clearTimeout(h);h=setTimeout(n,300)},m=function(F){h!==null&&F==="remove"&&(clearTimeout(h),n()),window[`${F}EventListener`]("resize",r)},h=null;const Q=document.body;w(()=>e.container!==!0?"add":"remove",m),e.container!==!0&&m("add"),K(()=>{m("remove")})}return()=>{const n=M(y.default,[s(A,{onScroll:p}),s(B,{onResize:L})]),r=s("div",{class:$.value,style:C.value,ref:e.container===!0?void 0:o,tabindex:-1},n);return e.container===!0?s("div",{class:"q-layout-container overflow-hidden",ref:o},[s(B,{onResize:R}),s("div",{class:"absolute-full",style:H.value},[s("div",{class:"scroll",style:f.value},[r])])]):r}}}),Y=S({name:"QPageContainer",setup(e,{slots:y}){const{proxy:{$q:c}}=T(),a=O(V,x);if(a===x)return x;W(N,!0);const o=l(()=>{const i={};return a.header.space===!0&&(i.paddingTop=`${a.header.size}px`),a.right.space===!0&&(i[`padding${c.lang.rtl===!0?"Left":"Right"}`]=`${a.right.size}px`),a.footer.space===!0&&(i.paddingBottom=`${a.footer.size}px`),a.left.space===!0&&(i[`padding${c.lang.rtl===!0?"Right":"Left"}`]=`${a.left.size}px`),i});return()=>s("div",{class:"q-page-container",style:o.value},I(y.default))}}),Z=S({name:"QSpace",setup(){const e=s("div",{class:"q-space"});return()=>e}}),ee=S({name:"QToolbar",props:{inset:Boolean},setup(e,{slots:y}){const c=l(()=>"q-toolbar row no-wrap items-center"+(e.inset===!0?" q-toolbar--inset":""));return()=>s("div",{class:c.value,role:"toolbar"},I(y.default))}});export{Z as _,ee as a,J as b,Y as c,X as d};
//# sourceMappingURL=Cfg-q96r.js.map