1import{aJ as $,P as me,a as De,aC as He,h as w,al as Me,r as x,aK as ze,aL as Oe,D as f,a1 as ve,e as H,n as Ae,aF as ge,S as K,aM as Z,aN as Qe,ap as T,a7 as Re,aO as ee,ah as p,w as te,ar as Ve,T as oe,Y as We}from"./index-CcrG2OFL.js";import{u as Ke,a as Ie,b as je}from"./use-model-toggle-fst9xBe7.js";import{b as ne,c as Ge,a as ie}from"./focus-manager-CVuBXJZ4.js";const D=[];function ht(e){return D.find(t=>t.contentEl!==null&&t.contentEl.contains(e))}function Ye(e,t){do{if(e.$options.name==="QMenu"){if(e.hide(t),e.$props.separateClosePopup)return $(e)}else if(e.__qPortal){const o=$(e);return o?.$options.name==="QPopupProxy"?(e.hide(t),o):e}e=$(e)}while(e!=null)}function pt(e,t,o){for(;o!==0&&e!==void 0&&e!==null;){if(e.__qPortal){if(o--,e.$options.name==="QMenu"){e=Ye(e,t);continue}e.hide(t)}e=$(e)}}const Ne=me({name:"QPortal",setup(e,{slots:t}){return()=>t.default()}});function Xe(e){for(e=e.parent;e!=null;){if(e.type.name==="QGlobalDialog")return!0;if(e.type.name==="QDialog"||e.type.name==="QMenu")return!1;e=e.parent}return!1}function Ue(e,t,o,n){const l=x(!1),r=x(!1);let a=null;const d={},u=n==="dialog"&&Xe(e);function c(v){if(v){ne(d),r.value=!0;return}r.value=!1,l.value||(!u&&a===null&&(a=ze(!1,n)),l.value=!0,D.push(e.proxy),Ge(d))}function m(v){if(r.value=!1,!v)return;ne(d),l.value=!1;const S=D.indexOf(e.proxy);S!==-1&&D.splice(S,1),a!==null&&(Oe(a),a=null)}return De(()=>{m(!0)}),e.proxy.__qPortal=!0,He(e.proxy,"contentEl",()=>t.value),{showPortal:c,hidePortal:m,portalIsActive:l,portalIsAccessible:r,renderPortal:()=>u?o():l.value?[w(Me,{to:a},w(Ne,o))]:void 0}}const Je={transitionShow:{type:String,default:"fade"},transitionHide:{type:String,default:"fade"},transitionDuration:{type:[String,Number],default:300}};function Ze(e,t=()=>{},o=()=>{}){return{transitionProps:f(()=>{const n=`q-transition--${e.transitionShow||t()}`,l=`q-transition--${e.transitionHide||o()}`;return{appear:!0,enterFromClass:`${n}-enter-from`,enterActiveClass:`${n}-enter-active`,enterToClass:`${n}-enter-to`,leaveFromClass:`${l}-leave-from`,leaveActiveClass:`${l}-leave-active`,leaveToClass:`${l}-leave-to`}}),transitionStyle:f(()=>`--q-transition-duration: ${e.transitionDuration}ms`)}}function et(){let e;const t=K();function o(){e=void 0}return ve(o),H(o),{removeTick:o,registerTick(n){e=n,Ae(()=>{e===n&&(ge(t)||e(),e=void 0)})}}}function tt(){let e=null;const t=K();function o(){e!==null&&(clearTimeout(e),e=null)}return ve(o),H(o),{removeTimeout:o,registerTimeout(n,l){o(),ge(t)||(e=setTimeout(()=>{e=null,n()},l))}}}const bt=[Element,String],ot=[null,document,document.body,document.scrollingElement,document.documentElement];function yt(e,t){let o=Qe(t);if(o===void 0){if(e==null)return window;o=e.closest(".scroll,.scroll-y,.overflow-auto")}return ot.includes(o)?window:o}function nt(e){return e===window?window.pageYOffset||window.scrollY||document.body.scrollTop||0:e.scrollTop}function it(e){return e===window?window.pageXOffset||window.scrollX||document.body.scrollLeft||0:e.scrollLeft}let L;function Tt(){if(L!==void 0)return L;const e=document.createElement("p"),t=document.createElement("div");Z(e,{width:"100%",height:"200px"}),Z(t,{position:"absolute",top:"0px",left:"0px",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"}),t.append(e),document.body.append(t);const o=e.offsetWidth;t.style.overflow="scroll";let n=e.offsetWidth;return o===n&&(n=t.clientWidth),t.remove(),L=o-n,L}const b=[];let E;function lt(e){E=e.keyCode===27}function st(){E&&(E=!1)}function at(e){E&&(E=!1,Re(e,27)&&b.at(-1)(e))}function we(e){window[e]("keydown",lt),window[e]("blur",st),window[e]("keyup",at),E=!1}function rt(e){T.is.desktop&&(b.push(e),b.length===1&&we("addEventListener"))}function le(e){const t=b.indexOf(e);t!==-1&&(b.splice(t,1),b.length===0&&we("removeEventListener"))}const y=[];function he(e){y.at(-1)(e)}function ut(e){T.is.desktop&&(y.push(e),y.length===1&&document.body.addEventListener("focusin",he))}function se(e){const t=y.indexOf(e);t!==-1&&(y.splice(t,1),y.length===0&&document.body.removeEventListener("focusin",he))}function ct(e,t,o){let n;function l(){n!==void 0&&(ee.remove(n),n=void 0)}return H(()=>{e.value&&l()}),{removeFromHistory:l,addToHistory(){n={condition:()=>o.value,handler:t},ee.add(n)}}}let q=0,R,V,P,W=!1,ae,re,ue,g=null;function ce(e){e.target===document&&(document.scrollingElement.scrollTop=document.scrollingElement.scrollTop)}function _(e){W||(W=!0,requestAnimationFrame(()=>{W=!1;const{height:t}=e.target,{clientHeight:o,scrollTop:n}=document.scrollingElement;(P===void 0||t!==window.innerHeight)&&(P=o-t,document.scrollingElement.scrollTop=n),n>P&&(document.scrollingElement.scrollTop-=Math.ceil((n-P)/8))}))}
1function de(e){const t=document.body,o=window.visualViewport!==void 0;if(e==="add"){const{overflowY:n,overflowX:l}=window.getComputedStyle(t);R=it(window),V=nt(window),ae=t.style.left,re=t.style.top,ue=window.location.pathname,t.style.left=`-${R}px`,t.style.top=`-${V}px`,l!=="hidden"&&(l==="scroll"||t.scrollWidth>window.innerWidth)&&t.classList.add("q-body--force-scrollbar-x"),n!=="hidden"&&(n==="scroll"||t.scrollHeight>window.innerHeight)&&t.classList.add("q-body--force-scrollbar-y"),document.documentElement.classList.add("q-document--prevent-scroll"),document.qScrollPrevented=!0,T.is.ios&&(o?(window.scrollTo(0,0),window.visualViewport.addEventListener("resize",_,p.passiveCapture),window.visualViewport.addEventListener("scroll",_,p.passiveCapture),window.scrollTo(0,0)):window.addEventListener("scroll",ce,p.passiveCapture))}else T.is.ios&&(o?(window.visualViewport.removeEventListener("resize",_,p.passiveCapture),window.visualViewport.removeEventListener("scroll",_,p.passiveCapture)):window.removeEventListener("scroll",ce,p.passiveCapture)),document.documentElement.classList.remove("q-document--prevent-scroll"),t.classList.remove("q-body--force-scrollbar-x","q-body--force-scrollbar-y"),document.qScrollPrevented=!1,t.style.left=ae,t.style.top=re,window.location.pathname===ue&&window.scrollTo(R,V),P=void 0}function dt(e){let t="add";if(e===!0){if(q++,g!==null){clearTimeout(g),g=null;return}if(q>1)return}else{if(q===0||(q--,q>0))return;if(t="remove",T.is.ios&&T.is.nativeMobile){g!==null&&clearTimeout(g),g=setTimeout(()=>{de(t),g=null},100);return}}de(t)}function ft(){let e;return{preventBodyScroll(t){t!==e&&(e!==void 0||t)&&(e=t,dt(t))}}}let B=0;const mt={standard:"fixed-full flex-center",top:"fixed-top justify-center",bottom:"fixed-bottom justify-center",right:"fixed-right items-center",left:"fixed-left items-center"},fe={standard:["scale","scale"],top:["slide-down","slide-up"],bottom:["slide-up","slide-down"],right:["slide-left","slide-right"],left:["slide-right","slide-left"]},Et=me({name:"QDialog",inheritAttrs:!1,props:{...Ie,...Je,transitionShow:String,transitionHide:String,persistent:Boolean,autoClose:Boolean,allowFocusOutside:Boolean,noEscDismiss:Boolean,noBackdropDismiss:Boolean,noRouteDismiss:Boolean,noRefocus:Boolean,noFocus:Boolean,noShake:Boolean,seamless:Boolean,maximized:Boolean,fullWidth:Boolean,fullHeight:Boolean,square:Boolean,backdropFilter:String,position:{type:String,default:"standard",validator:e=>["standard","top","bottom","left","right"].includes(e)}},emits:[...Ke,"shake","click","escapeKey"],setup(e,{slots:t,emit:o,attrs:n}){const l=K(),r=x(null),a=x(!1),d=x(!1);let u=null,c=null,m=!1,v=!1;const S=f(()=>!e.persistent&&!e.noRouteDismiss&&!e.seamless),{preventBodyScroll:I}=ft(),{registerTimeout:j}=tt(),{registerTick:pe,removeTick:G}=et(),{transitionProps:be,transitionStyle:Y}=Ze(e,()=>fe[e.position][0],()=>fe[e.position][1]),ye=f(()=>Y.value+(e.backdropFilter!==void 0?`;backdrop-filter:${e.backdropFilter};-webkit-backdrop-filter:${e.backdropFilter}`:"")),{showPortal:N,hidePortal:X,portalIsAccessible:Te,renderPortal:Ee}=Ue(l,r,$e,"dialog"),{hide:C}=je({showing:a,hideOnRouteChange:S,handleShow:Ce,handleHide:Fe,handleRouteChange:Le,processOnMount:!0}),{addToHistory:Se,removeFromHistory:ke}=ct(a,C,S),qe=f(()=>`q-dialog__inner flex no-pointer-events q-dialog__inner--${e.maximized?"maximized":"minimized"} q-dialog__inner--${e.position} ${mt[e.position]}`+(d.value?" q-dialog__inner--animating":"")+(e.fullWidth?" q-dialog__inner--fullwidth":"")+(e.fullHeight?" q-dialog__inner--fullheight":"")+(e.square?" q-dialog__inner--square":"")),F=f(()=>a.value&&!e.seamless),Pe=f(()=>e.autoClose?{onClick:_e}:{}),xe=f(()=>[`q-dialog fullscreen no-pointer-events q-dialog--${F.value?"modal":"seamless"}`,n.class]);te(()=>e.maximized,i=>{a.value&&O(i)}),te(F,i=>{I(i),i?(ut(A),rt(z)):(se(A),le(z))});function Ce(i){Se(),c=!e.noRefocus&&document.activeElement!==null?document.activeElement:null,O(e.maximized),N(),d.value=!0,e.noFocus?G():(document.activeElement?.blur(),pe(k)),j(()=>{if(l.proxy.$q.platform.is.ios){if(!e.seamless&&document.activeElement){const{top:s,bottom:h}=document.activeElement.getBoundingClientRect(),{innerHeight:J}
1=window,Q=window.visualViewport!==void 0?window.visualViewport.height:J;s>0&&h>Q/2&&(document.scrollingElement.scrollTop=Math.min(document.scrollingElement.scrollHeight-Q,h>=J?1/0:Math.ceil(document.scrollingElement.scrollTop+h-Q/2))),document.activeElement.scrollIntoView()}v=!0,r.value.click(),v=!1}N(!0),d.value=!1,o("show",i)},e.transitionDuration)}function Fe(i){if(G(),ke(),U(!0),d.value=!0,X(),c!==null){const s=(i?.type.indexOf("key")===0?c.closest('[tabindex]:not([tabindex^="-"])'):void 0)||c;c=null,ie(()=>{s.isConnected&&s.focus()})}j(()=>{X(!0),d.value=!1,o("hide",i)},e.transitionDuration)}function Le(){c=null}function k(i){ie(()=>{let s=r.value;if(s!==null){if(i!==void 0){const h=s.querySelector(i);if(h!==null){h.focus({preventScroll:!0});return}}s.contains(document.activeElement)||(s=s.querySelector("[autofocus][tabindex], [data-autofocus][tabindex]")||s.querySelector("[autofocus] [tabindex], [data-autofocus] [tabindex]")||s.querySelector("[autofocus], [data-autofocus]")||s,s.focus({preventScroll:!0}))}})}function M(i){i&&typeof i.focus=="function"?i.focus({preventScroll:!0}):k(),o("shake");const s=r.value;s!==null&&(s.classList.remove("q-animate--scale"),s.classList.add("q-animate--scale"),u!==null&&clearTimeout(u),u=setTimeout(()=>{u=null,r.value!==null&&(s.classList.remove("q-animate--scale"),k())},170))}function z(){e.seamless||(e.persistent||e.noEscDismiss?!e.maximized&&!e.noShake&&M():(o("escapeKey"),C()))}function U(i){u!==null&&(clearTimeout(u),u=null),(i||a.value)&&(O(!1),e.seamless||(I(!1),se(A),le(z))),i||(c=null)}function O(i){i?m||(B<1&&document.body.classList.add("q-body--dialog"),B++,m=!0):m&&(B<2&&document.body.classList.remove("q-body--dialog"),B--,m=!1)}function _e(i){v||(C(i),o("click",i))}function Be(i){!e.persistent&&!e.noBackdropDismiss?C(i):e.noShake||M()}function A(i){!e.allowFocusOutside&&Te.value&&!Ve(r.value,i.target)&&k('[tabindex]:not([tabindex="-1"])')}Object.assign(l.proxy,{focus:k,shake:M,__updateRefocusTarget(i){c=i||null}}),H(U);function $e(){return w("div",{role:"dialog","aria-modal":F.value?"true":"false",...n,class:xe.value},[w(oe,{name:"q-transition--fade",appear:!0},()=>F.value?w("div",{class:"q-dialog__backdrop fixed-full",style:ye.value,"aria-hidden":"true",onClick:Be}):null),w(oe,be.value,()=>a.value?w("div",{ref:r,class:qe.value,style:Y.value,tabindex:-1,...Pe.value},We(t.default)):null)])}return Ee}});export{Et as Q,nt as a,it as b,Tt as c,et as d,tt as e,Ue as f,yt as g,rt as h,ut as i,se as j,Ze as k,Ye as l,ht as m,pt as n,D as p,le as r,bt as s,Je as u};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.