2 lines
35 KiB
JavaScript
2 lines
35 KiB
JavaScript
import{c as A,a as c,h as q,b as ve,r as C,i as Le,o as re,g as J,e as Z,n as Me,f as de,l as $e,j as fe,k as V,m as ie,w as O,p as St,q as Be,s as wt,t as qt,u as _t,v as Ct,x as Tt,y as ze,z as oe,A as pe,B as se,C as ke,D as Qe,E as Se,F as Ot,G as xt,H as lt,I as ot,J as $t,K as we,L as Bt,M as kt,N as Pe,O as Ve,P as Lt,Q as Mt,R as Pt,S as Ht,T as Et,U as Dt,V as Ae,W as nt,X as Qt,Y as qe,Z as ce,_ as Vt,$ as At,a0 as Ft,a1 as M,a2 as It,a3 as _e,a4 as k,a5 as E,a6 as Ce,a7 as Te,a8 as ee,a9 as Fe,aa as Ie,ab as Re,ac as te}from"./index-0B2sgEyA.js";import{Q as Ne,a as je,b as We}from"./QList-CHwmSUjA.js";import{c as Rt,b as j,Q as Xe}from"./LocalStorage-7Uw3xG9P.js";import{u as rt}from"./taxstore-oR45_mFg.js";import{u as Nt}from"./children-ChLzVyp9.js";import{u as jt}from"./vue-i18n.runtime-DPKkE7zN.js";const Wt=A({name:"QToolbarTitle",props:{shrink:Boolean},setup(e,{slots:r}){const n=c(()=>"q-toolbar__title ellipsis"+(e.shrink===!0?" col-shrink":""));return()=>q("div",{class:n.value},ve(r.default))}}),Xt=A({name:"QSpace",setup(){const e=q("div",{class:"q-space"});return()=>e}}),Ue=A({name:"QToolbar",props:{inset:Boolean},setup(e,{slots:r}){const n=c(()=>"q-toolbar row no-wrap items-center"+(e.inset===!0?" q-toolbar--inset":""));return()=>q("div",{class:n.value,role:"toolbar"},ve(r.default))}});function Ut(){const e=C(!Le.value);return e.value===!1&&re(()=>{e.value=!0}),{isHydrated:e}}const it=typeof ResizeObserver<"u",Ye=it===!0?{}:{style:"display:block;position:absolute;top:0;left:0;right:0;bottom:0;height:100%;width:100%;overflow:hidden;pointer-events:none;z-index:-1;",url:"about:blank"},ae=A({name:"QResizeObserver",props:{debounce:{type:[String,Number],default:100}},emits:["resize"],setup(e,{emit:r}){let n=null,s,t={width:-1,height:-1};function a(d){d===!0||e.debounce===0||e.debounce==="0"?o():n===null&&(n=setTimeout(o,e.debounce))}function o(){if(n!==null&&(clearTimeout(n),n=null),s){const{offsetWidth:d,offsetHeight:v}=s;(d!==t.width||v!==t.height)&&(t={width:d,height:v},r("resize",t))}}const{proxy:l}=J();if(l.trigger=a,it===!0){let d;const v=i=>{s=l.$el.parentNode,s?(d=new ResizeObserver(a),d.observe(s),o()):i!==!0&&de(()=>{v(!0)})};return re(()=>{v()}),Z(()=>{n!==null&&clearTimeout(n),d!==void 0&&(d.disconnect!==void 0?d.disconnect():s&&d.unobserve(s))}),Me}else{let d=function(){n!==null&&(clearTimeout(n),n=null),b!==void 0&&(b.removeEventListener!==void 0&&b.removeEventListener("resize",a,$e.passive),b=void 0)},v=function(){d(),s?.contentDocument&&(b=s.contentDocument.defaultView,b.addEventListener("resize",a,$e.passive),o())};const{isHydrated:i}=Ut();let b;return re(()=>{de(()=>{s=l.$el,s&&v()})}),Z(d),()=>{if(i.value===!0)return q("object",{class:"q--avoid-card-border",style:Ye.style,tabindex:-1,type:"text/html",data:Ye.url,"aria-hidden":"true",onLoad:v})}}}}),Yt=A({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:r,emit:n}){const{proxy:{$q:s}}=J(),t=fe(ie,V);if(t===V)return console.error("QHeader needs to be child of QLayout"),V;const a=C(parseInt(e.heightHint,10)),o=C(!0),l=c(()=>e.reveal===!0||t.view.value.indexOf("H")!==-1||s.platform.is.ios&&t.isContainer.value===!0),d=c(()=>{if(e.modelValue!==!0)return 0;if(l.value===!0)return o.value===!0?a.value:0;const g=a.value-t.scroll.value.position;return g>0?g:0}),v=c(()=>e.modelValue!==!0||l.value===!0&&o.value!==!0),i=c(()=>e.modelValue===!0&&v.value===!0&&e.reveal===!0),b=c(()=>"q-header q-layout__section--marginal "+(l.value===!0?"fixed":"absolute")+"-top"+(e.bordered===!0?" q-header--bordered":"")+(v.value===!0?" q-header--hidden":"")+(e.modelValue!==!0?" q-layout--prevent-focus":"")),p=c(()=>{const g=t.rows.value.top,P={};return g[0]==="l"&&t.left.space===!0&&(P[s.lang.rtl===!0?"right":"left"]=`${t.left.size}px`),g[2]==="r"&&t.right.space===!0&&(P[s.lang.rtl===!0?"left":"right"]=`${t.right.size}px`),P});function m(g,P){t.update("header",g,P)}function z(g,P){g.value!==P&&(g.value=P)}function B({height:g}){z(a,g),m("size",g)}function $(g){i.value===!0&&z(o,!0),n("focusin",g)}O(()=>e.modelValue,g=>{m("space",g),z(o,!0),t.animate()}),O(d,g=>{m("offset",g)}),O(()=>e.reveal,g=>{g===!1&&z(o,e.modelValue)}),O(o,g=>{t.animate(),n("reveal",g)}),O(t.scroll,g=>{e.reveal===!0&&z(o,g.direction==="up"||g.position<=e.revealOffset||g.position-g.inflectionPoint<100)});const _={};return t.instances.header=_,e.modelValue===!0&&m("size",a.value),m("space",e.modelValue),m("offset",d.value),Z(()=>{t.instances.header===_&&(t.instances.header=void 0,m("size",0),m("offset",0),m("space",!1))}),()=>{const g=St(r.default,[]);return e.elevated===!0&&g.push(q("div",{class:"q-layout__shadow absolute-full overflow-hidden no-pointer-events"})),g.push(q(ae,{debounce:0,onResize:B})),q("header",{class:b.value,style:p.value,onFocusin:$},g)}}}),Kt=A({props:["store","barStyle","verticalBarStyle","horizontalBarStyle"],setup(e){return()=>[q("div",{class:e.store.scroll.vertical.barClass.value,style:[e.barStyle,e.verticalBarStyle],"aria-hidden":"true",onMousedown:e.store.onVerticalMousedown}),q("div",{class:e.store.scroll.horizontal.barClass.value,style:[e.barStyle,e.horizontalBarStyle],"aria-hidden":"true",onMousedown:e.store.onHorizontalMousedown}),Be(q("div",{ref:e.store.scroll.vertical.ref,class:e.store.scroll.vertical.thumbClass.value,style:e.store.scroll.vertical.style.value,"aria-hidden":"true"}),e.store.thumbVertDir),Be(q("div",{ref:e.store.scroll.horizontal.ref,class:e.store.scroll.horizontal.thumbClass.value,style:e.store.scroll.horizontal.style.value,"aria-hidden":"true"}),e.store.thumbHorizDir)]}}),{passive:Ke}=$e,Jt=["both","horizontal","vertical"],ut=A({name:"QScrollObserver",props:{axis:{type:String,validator:e=>Jt.includes(e),default:"vertical"},debounce:[String,Number],scrollTarget:wt},emits:["scroll"],setup(e,{emit:r}){const n={position:{top:0,left:0},direction:"down",directionChanged:!1,delta:{top:0,left:0},inflectionPoint:{top:0,left:0}};let s=null,t,a;O(()=>e.scrollTarget,()=>{d(),l()});function o(){s?.();const b=Math.max(0,_t(t)),p=Ct(t),m={top:b-n.position.top,left:p-n.position.left};if(e.axis==="vertical"&&m.top===0||e.axis==="horizontal"&&m.left===0)return;const z=Math.abs(m.top)>=Math.abs(m.left)?m.top<0?"up":"down":m.left<0?"left":"right";n.position={top:b,left:p},n.directionChanged=n.direction!==z,n.delta=m,n.directionChanged===!0&&(n.direction=z,n.inflectionPoint=n.position),r("scroll",{...n})}function l(){t=qt(a,e.scrollTarget),t.addEventListener("scroll",v,Ke),v(!0)}function d(){t!==void 0&&(t.removeEventListener("scroll",v,Ke),t=void 0)}function v(b){if(b===!0||e.debounce===0||e.debounce==="0")o();else if(s===null){const[p,m]=e.debounce?[setTimeout(o,e.debounce),clearTimeout]:[requestAnimationFrame(o),cancelAnimationFrame];s=()=>{m(p),s=null}}}const{proxy:i}=J();return O(()=>i.$q.lang.rtl,o),re(()=>{a=i.$el.parentNode,l()}),Z(()=>{s?.(),d()}),Object.assign(i,{trigger:v,getPosition:()=>n}),Me}}),He={left:!0,right:!0,up:!0,down:!0,horizontal:!0,vertical:!0},Gt=Object.keys(He);He.all=!0;function Je(e){const r={};for(const n of Gt)e[n]===!0&&(r[n]=!0);return Object.keys(r).length===0?He:(r.horizontal===!0?r.left=r.right=!0:r.left===!0&&r.right===!0&&(r.horizontal=!0),r.vertical===!0?r.up=r.down=!0:r.up===!0&&r.down===!0&&(r.vertical=!0),r.horizontal===!0&&r.vertical===!0&&(r.all=!0),r)}const Zt=["INPUT","TEXTAREA"];function Ge(e,r){return r.event===void 0&&e.target!==void 0&&e.target.draggable!==!0&&typeof r.handler=="function"&&Zt.includes(e.target.nodeName.toUpperCase())===!1&&(e.qClonedBy===void 0||e.qClonedBy.indexOf(r.uid)===-1)}function Oe(e,r,n){const s=ke(e);let t,a=s.left-r.event.x,o=s.top-r.event.y,l=Math.abs(a),d=Math.abs(o);const v=r.direction;v.horizontal===!0&&v.vertical!==!0?t=a<0?"left":"right":v.horizontal!==!0&&v.vertical===!0?t=o<0?"up":"down":v.up===!0&&o<0?(t="up",l>d&&(v.left===!0&&a<0?t="left":v.right===!0&&a>0&&(t="right"))):v.down===!0&&o>0?(t="down",l>d&&(v.left===!0&&a<0?t="left":v.right===!0&&a>0&&(t="right"))):v.left===!0&&a<0?(t="left",l<d&&(v.up===!0&&o<0?t="up":v.down===!0&&o>0&&(t="down"))):v.right===!0&&a>0&&(t="right",l<d&&(v.up===!0&&o<0?t="up":v.down===!0&&o>0&&(t="down")));let i=!1;if(t===void 0&&n===!1){if(r.event.isFirst===!0||r.event.lastDir===void 0)return{};t=r.event.lastDir,i=!0,t==="left"||t==="right"?(s.left-=a,l=0,a=0):(s.top-=o,d=0,o=0)}return{synthetic:i,payload:{evt:e,touch:r.event.mouse!==!0,mouse:r.event.mouse===!0,position:s,direction:t,isFirst:r.event.isFirst,isFinal:n===!0,duration:Date.now()-r.event.time,distance:{x:l,y:d},offset:{x:a,y:o},delta:{x:s.left-r.event.lastX,y:s.top-r.event.lastY}}}}let ea=0;const ne=Tt({name:"touch-pan",beforeMount(e,{value:r,modifiers:n}){if(n.mouse!==!0&&oe.has.touch!==!0)return;function s(a,o){n.mouse===!0&&o===!0?xt(a):(n.stop===!0&&Se(a),n.prevent===!0&&Qe(a))}const t={uid:"qvtp_"+ea++,handler:r,modifiers:n,direction:Je(n),noop:Me,mouseStart(a){Ge(a,t)&&Ot(a)&&(se(t,"temp",[[document,"mousemove","move","notPassiveCapture"],[document,"mouseup","end","passiveCapture"]]),t.start(a,!0))},touchStart(a){if(Ge(a,t)){const o=a.target;se(t,"temp",[[o,"touchmove","move","notPassiveCapture"],[o,"touchcancel","end","passiveCapture"],[o,"touchend","end","passiveCapture"]]),t.start(a)}},start(a,o){if(oe.is.firefox===!0&&pe(e,!0),t.lastEvt=a,o===!0||n.stop===!0){if(t.direction.all!==!0&&(o!==!0||t.modifiers.mouseAllDir!==!0&&t.modifiers.mousealldir!==!0)){const v=a.type.indexOf("mouse")!==-1?new MouseEvent(a.type,a):new TouchEvent(a.type,a);a.defaultPrevented===!0&&Qe(v),a.cancelBubble===!0&&Se(v),Object.assign(v,{qKeyEvent:a.qKeyEvent,qClickOutside:a.qClickOutside,qAnchorHandled:a.qAnchorHandled,qClonedBy:a.qClonedBy===void 0?[t.uid]:a.qClonedBy.concat(t.uid)}),t.initialEvent={target:a.target,event:v}}Se(a)}const{left:l,top:d}=ke(a);t.event={x:l,y:d,time:Date.now(),mouse:o===!0,detected:!1,isFirst:!0,isFinal:!1,lastX:l,lastY:d}},move(a){if(t.event===void 0)return;const o=ke(a),l=o.left-t.event.x,d=o.top-t.event.y;if(l===0&&d===0)return;t.lastEvt=a;const v=t.event.mouse===!0,i=()=>{s(a,v);let m;n.preserveCursor!==!0&&n.preservecursor!==!0&&(m=document.documentElement.style.cursor||"",document.documentElement.style.cursor="grabbing"),v===!0&&document.body.classList.add("no-pointer-events--children"),document.body.classList.add("non-selectable"),Rt(),t.styleCleanup=z=>{if(t.styleCleanup=void 0,m!==void 0&&(document.documentElement.style.cursor=m),document.body.classList.remove("non-selectable"),v===!0){const B=()=>{document.body.classList.remove("no-pointer-events--children")};z!==void 0?setTimeout(()=>{B(),z()},50):B()}else z!==void 0&&z()}};if(t.event.detected===!0){t.event.isFirst!==!0&&s(a,t.event.mouse);const{payload:m,synthetic:z}=Oe(a,t,!1);m!==void 0&&(t.handler(m)===!1?t.end(a):(t.styleCleanup===void 0&&t.event.isFirst===!0&&i(),t.event.lastX=m.position.left,t.event.lastY=m.position.top,t.event.lastDir=z===!0?void 0:m.direction,t.event.isFirst=!1));return}if(t.direction.all===!0||v===!0&&(t.modifiers.mouseAllDir===!0||t.modifiers.mousealldir===!0)){i(),t.event.detected=!0,t.move(a);return}const b=Math.abs(l),p=Math.abs(d);b!==p&&(t.direction.horizontal===!0&&b>p||t.direction.vertical===!0&&b<p||t.direction.up===!0&&b<p&&d<0||t.direction.down===!0&&b<p&&d>0||t.direction.left===!0&&b>p&&l<0||t.direction.right===!0&&b>p&&l>0?(t.event.detected=!0,t.move(a)):t.end(a,!0))},end(a,o){if(t.event!==void 0){if(ze(t,"temp"),oe.is.firefox===!0&&pe(e,!1),o===!0)t.styleCleanup?.(),t.event.detected!==!0&&t.initialEvent!==void 0&&t.initialEvent.target.dispatchEvent(t.initialEvent.event);else if(t.event.detected===!0){t.event.isFirst===!0&&t.handler(Oe(a===void 0?t.lastEvt:a,t).payload);const{payload:l}=Oe(a===void 0?t.lastEvt:a,t,!0),d=()=>{t.handler(l)};t.styleCleanup!==void 0?t.styleCleanup(d):d()}t.event=void 0,t.initialEvent=void 0,t.lastEvt=void 0}}};if(e.__qtouchpan=t,n.mouse===!0){const a=n.mouseCapture===!0||n.mousecapture===!0?"Capture":"";se(t,"main",[[e,"mousedown","mouseStart",`passive${a}`]])}oe.has.touch===!0&&se(t,"main",[[e,"touchstart","touchStart",`passive${n.capture===!0?"Capture":""}`],[e,"touchmove","noop","notPassiveCapture"]])},updated(e,r){const n=e.__qtouchpan;n!==void 0&&(r.oldValue!==r.value&&(typeof value!="function"&&n.end(),n.handler=r.value),n.direction=Je(r.modifiers))},beforeUnmount(e){const r=e.__qtouchpan;r!==void 0&&(r.event!==void 0&&r.end(),ze(r,"main"),ze(r,"temp"),oe.is.firefox===!0&&pe(e,!1),r.styleCleanup?.(),delete e.__qtouchpan)}}),Ze=["vertical","horizontal"],xe={vertical:{offset:"offsetY",scroll:"scrollTop",dir:"down",dist:"y"},horizontal:{offset:"offsetX",scroll:"scrollLeft",dir:"right",dist:"x"}},et={prevent:!0,mouse:!0,mouseAllDir:!0},tt=e=>e>=250?50:Math.ceil(e/5),ta=A({name:"QScrollArea",props:{...lt,thumbStyle:Object,verticalThumbStyle:Object,horizontalThumbStyle:Object,barStyle:[Array,String,Object],verticalBarStyle:[Array,String,Object],horizontalBarStyle:[Array,String,Object],verticalOffset:{type:Array,default:[0,0]},horizontalOffset:{type:Array,default:[0,0]},contentStyle:[Array,String,Object],contentActiveStyle:[Array,String,Object],delay:{type:[String,Number],default:1e3},visible:{type:Boolean,default:null},tabindex:[String,Number],onScroll:Function},setup(e,{slots:r,emit:n}){const s=C(!1),t=C(!1),a=C(!1),o={vertical:C(0),horizontal:C(0)},l={vertical:{ref:C(null),position:C(0),size:C(0)},horizontal:{ref:C(null),position:C(0),size:C(0)}},{proxy:d}=J(),v=ot(e,d.$q);let i=null,b;const p=C(null),m=c(()=>"q-scrollarea"+(v.value===!0?" q-scrollarea--dark":""));Object.assign(o,{verticalInner:c(()=>o.vertical.value-e.verticalOffset[0]-e.verticalOffset[1]),horizontalInner:c(()=>o.horizontal.value-e.horizontalOffset[0]-e.horizontalOffset[1])}),l.vertical.percentage=c(()=>{const f=l.vertical.size.value-o.vertical.value;if(f<=0)return 0;const y=j(l.vertical.position.value/f,0,1);return Math.round(y*1e4)/1e4}),l.vertical.thumbHidden=c(()=>(e.visible===null?a.value:e.visible)!==!0&&s.value===!1&&t.value===!1||l.vertical.size.value<=o.vertical.value+1),l.vertical.thumbStart=c(()=>e.verticalOffset[0]+l.vertical.percentage.value*(o.verticalInner.value-l.vertical.thumbSize.value)),l.vertical.thumbSize=c(()=>Math.round(j(o.verticalInner.value*o.verticalInner.value/l.vertical.size.value,tt(o.verticalInner.value),o.verticalInner.value))),l.vertical.style=c(()=>({...e.thumbStyle,...e.verticalThumbStyle,top:`${l.vertical.thumbStart.value}px`,height:`${l.vertical.thumbSize.value}px`,right:`${e.horizontalOffset[1]}px`})),l.vertical.thumbClass=c(()=>"q-scrollarea__thumb q-scrollarea__thumb--v absolute-right"+(l.vertical.thumbHidden.value===!0?" q-scrollarea__thumb--invisible":"")),l.vertical.barClass=c(()=>"q-scrollarea__bar q-scrollarea__bar--v absolute-right"+(l.vertical.thumbHidden.value===!0?" q-scrollarea__bar--invisible":"")),l.horizontal.percentage=c(()=>{const f=l.horizontal.size.value-o.horizontal.value;if(f<=0)return 0;const y=j(Math.abs(l.horizontal.position.value)/f,0,1);return Math.round(y*1e4)/1e4}),l.horizontal.thumbHidden=c(()=>(e.visible===null?a.value:e.visible)!==!0&&s.value===!1&&t.value===!1||l.horizontal.size.value<=o.horizontal.value+1),l.horizontal.thumbStart=c(()=>e.horizontalOffset[0]+l.horizontal.percentage.value*(o.horizontalInner.value-l.horizontal.thumbSize.value)),l.horizontal.thumbSize=c(()=>Math.round(j(o.horizontalInner.value*o.horizontalInner.value/l.horizontal.size.value,tt(o.horizontalInner.value),o.horizontalInner.value))),l.horizontal.style=c(()=>({...e.thumbStyle,...e.horizontalThumbStyle,[d.$q.lang.rtl===!0?"right":"left"]:`${l.horizontal.thumbStart.value}px`,width:`${l.horizontal.thumbSize.value}px`,bottom:`${e.verticalOffset[1]}px`})),l.horizontal.thumbClass=c(()=>"q-scrollarea__thumb q-scrollarea__thumb--h absolute-bottom"+(l.horizontal.thumbHidden.value===!0?" q-scrollarea__thumb--invisible":"")),l.horizontal.barClass=c(()=>"q-scrollarea__bar q-scrollarea__bar--h absolute-bottom"+(l.horizontal.thumbHidden.value===!0?" q-scrollarea__bar--invisible":""));const z=c(()=>l.vertical.thumbHidden.value===!0&&l.horizontal.thumbHidden.value===!0?e.contentStyle:e.contentActiveStyle);function B(){const f={};return Ze.forEach(y=>{const T=l[y];Object.assign(f,{[y+"Position"]:T.position.value,[y+"Percentage"]:T.percentage.value,[y+"Size"]:T.size.value,[y+"ContainerSize"]:o[y].value,[y+"ContainerInnerSize"]:o[y+"Inner"].value})}),f}const $=$t(()=>{const f=B();f.ref=d,n("scroll",f)},0);function _(f,y,T){if(Ze.includes(f)===!1){console.error("[QScrollArea]: wrong first param of setScrollPosition (vertical/horizontal)");return}(f==="vertical"?Ve:we)(p.value,y,T)}function g({height:f,width:y}){let T=!1;o.vertical.value!==f&&(o.vertical.value=f,T=!0),o.horizontal.value!==y&&(o.horizontal.value=y,T=!0),T===!0&&L()}function P({position:f}){let y=!1;l.vertical.position.value!==f.top&&(l.vertical.position.value=f.top,y=!0),l.horizontal.position.value!==f.left&&(l.horizontal.position.value=f.left,y=!0),y===!0&&L()}function S({height:f,width:y}){l.horizontal.size.value!==y&&(l.horizontal.size.value=y,L()),l.vertical.size.value!==f&&(l.vertical.size.value=f,L())}function h(f,y){const T=l[y];if(f.isFirst===!0){if(T.thumbHidden.value===!0)return;b=T.position.value,t.value=!0}else if(t.value!==!0)return;f.isFinal===!0&&(t.value=!1);const I=xe[y],N=(T.size.value-o[y].value)/(o[y+"Inner"].value-T.thumbSize.value),R=f.distance[I.dist],le=b+(f.direction===I.dir?1:-1)*R*N;W(le,y)}function x(f,y){const T=l[y];if(T.thumbHidden.value!==!0){const I=y==="vertical"?e.verticalOffset[0]:e.horizontalOffset[0],N=f[xe[y].offset]-I,R=T.thumbStart.value-I;if(N<R||N>R+T.thumbSize.value){const le=N-T.thumbSize.value/2,he=j(le/(o[y+"Inner"].value-T.thumbSize.value),0,1);W(he*Math.max(0,T.size.value-o[y].value),y)}T.ref.value!==null&&T.ref.value.dispatchEvent(new MouseEvent(f.type,f))}}function L(){s.value=!0,i!==null&&clearTimeout(i),i=setTimeout(()=>{i=null,s.value=!1},e.delay),e.onScroll!==void 0&&$()}function W(f,y){p.value[xe[y].scroll]=f}let H=null;function F(){H!==null&&clearTimeout(H),H=setTimeout(()=>{H=null,a.value=!0},d.$q.platform.is.ios?50:0)}function X(){H!==null&&(clearTimeout(H),H=null),a.value=!1}let G=null;O(()=>d.$q.lang.rtl,f=>{p.value!==null&&we(p.value,Math.abs(l.horizontal.position.value)*(f===!0?-1:1))}),Bt(()=>{G={top:l.vertical.position.value,left:l.horizontal.position.value}}),kt(()=>{if(G===null)return;const f=p.value;f!==null&&(we(f,G.left),Ve(f,G.top))}),Z($.cancel),Object.assign(d,{getScrollTarget:()=>p.value,getScroll:B,getScrollPosition:()=>({top:l.vertical.position.value,left:l.horizontal.position.value}),getScrollPercentage:()=>({top:l.vertical.percentage.value,left:l.horizontal.percentage.value}),setScrollPosition:_,setScrollPercentage(f,y,T){_(f,y*(l[f].size.value-o[f].value)*(f==="horizontal"&&d.$q.lang.rtl===!0?-1:1),T)}});const U={scroll:l,thumbVertDir:[[ne,f=>{h(f,"vertical")},void 0,{vertical:!0,...et}]],thumbHorizDir:[[ne,f=>{h(f,"horizontal")},void 0,{horizontal:!0,...et}]],onVerticalMousedown(f){x(f,"vertical")},onHorizontalMousedown(f){x(f,"horizontal")}};return()=>q("div",{class:m.value,onMouseenter:F,onMouseleave:X},[q("div",{ref:p,class:"q-scrollarea__container scroll relative-position fit hide-scrollbar",tabindex:e.tabindex!==void 0?e.tabindex:void 0},[q("div",{class:"q-scrollarea__content absolute",style:z.value},Pe(r.default,[q(ae,{debounce:0,onResize:S})])),q(ut,{axis:"both",onScroll:P})]),q(ae,{debounce:0,onResize:g}),q(Kt,{store:U,barStyle:e.barStyle,verticalBarStyle:e.verticalBarStyle,horizontalBarStyle:e.horizontalBarStyle})])}}),at=150,aa=A({name:"QDrawer",inheritAttrs:!1,props:{...Mt,...lt,side:{type:String,default:"left",validator:e=>["left","right"].includes(e)},width:{type:Number,default:300},mini:Boolean,miniToOverlay:Boolean,miniWidth:{type:Number,default:57},noMiniAnimation:Boolean,breakpoint:{type:Number,default:1023},showIfAbove:Boolean,behavior:{type:String,validator:e=>["default","desktop","mobile"].includes(e),default:"default"},bordered:Boolean,elevated:Boolean,overlay:Boolean,persistent:Boolean,noSwipeOpen:Boolean,noSwipeClose:Boolean,noSwipeBackdrop:Boolean},emits:[...Lt,"onLayout","miniState"],setup(e,{slots:r,emit:n,attrs:s}){const t=J(),{proxy:{$q:a}}=t,o=ot(e,a),{preventBodyScroll:l}=Dt(),{registerTimeout:d,removeTimeout:v}=Pt(),i=fe(ie,V);if(i===V)return console.error("QDrawer needs to be child of QLayout"),V;let b,p=null,m;const z=C(e.behavior==="mobile"||e.behavior!=="desktop"&&i.totalWidth.value<=e.breakpoint),B=c(()=>e.mini===!0&&z.value!==!0),$=c(()=>B.value===!0?e.miniWidth:e.width),_=C(e.showIfAbove===!0&&z.value===!1?!0:e.modelValue===!0),g=c(()=>e.persistent!==!0&&(z.value===!0||le.value===!0));function P(u,w){if(L(),u!==!1&&i.animate(),Q(0),z.value===!0){const D=i.instances[T.value];D?.belowBreakpoint===!0&&D.hide(!1),Y(1),i.isContainer.value!==!0&&l(!0)}else Y(0),u!==!1&&be(!1);d(()=>{u!==!1&&be(!0),w!==!0&&n("show",u)},at)}function S(u,w){W(),u!==!1&&i.animate(),Y(0),Q(X.value*$.value),ge(),w!==!0?d(()=>{n("hide",u)},at):v()}const{show:h,hide:x}=Ht({showing:_,hideOnRouteChange:g,handleShow:P,handleHide:S}),{addToHistory:L,removeFromHistory:W}=Et(_,x,g),H={belowBreakpoint:z,hide:x},F=c(()=>e.side==="right"),X=c(()=>(a.lang.rtl===!0?-1:1)*(F.value===!0?1:-1)),G=C(0),U=C(!1),f=C(!1),y=C($.value*X.value),T=c(()=>F.value===!0?"left":"right"),I=c(()=>_.value===!0&&z.value===!1&&e.overlay===!1?e.miniToOverlay===!0?e.miniWidth:$.value:0),N=c(()=>e.overlay===!0||e.miniToOverlay===!0||i.view.value.indexOf(F.value?"R":"L")!==-1||a.platform.is.ios===!0&&i.isContainer.value===!0),R=c(()=>e.overlay===!1&&_.value===!0&&z.value===!1),le=c(()=>e.overlay===!0&&_.value===!0&&z.value===!1),he=c(()=>"fullscreen q-drawer__backdrop"+(_.value===!1&&U.value===!1?" hidden":"")),st=c(()=>({backgroundColor:`rgba(0,0,0,${G.value*.4})`})),Ee=c(()=>F.value===!0?i.rows.value.top[2]==="r":i.rows.value.top[0]==="l"),ct=c(()=>F.value===!0?i.rows.value.bottom[2]==="r":i.rows.value.bottom[0]==="l"),dt=c(()=>{const u={};return i.header.space===!0&&Ee.value===!1&&(N.value===!0?u.top=`${i.header.offset}px`:i.header.space===!0&&(u.top=`${i.header.size}px`)),i.footer.space===!0&&ct.value===!1&&(N.value===!0?u.bottom=`${i.footer.offset}px`:i.footer.space===!0&&(u.bottom=`${i.footer.size}px`)),u}),vt=c(()=>{const u={width:`${$.value}px`,transform:`translateX(${y.value}px)`};return z.value===!0?u:Object.assign(u,dt.value)}),ft=c(()=>"q-drawer__content fit "+(i.isContainer.value!==!0?"scroll":"overflow-auto")),ht=c(()=>`q-drawer q-drawer--${e.side}`+(f.value===!0?" q-drawer--mini-animate":"")+(e.bordered===!0?" q-drawer--bordered":"")+(o.value===!0?" q-drawer--dark q-dark":"")+(U.value===!0?" no-transition":_.value===!0?"":" q-layout--prevent-focus")+(z.value===!0?" fixed q-drawer--on-top q-drawer--mobile q-drawer--top-padding":` q-drawer--${B.value===!0?"mini":"standard"}`+(N.value===!0||R.value!==!0?" fixed":"")+(e.overlay===!0||e.miniToOverlay===!0?" q-drawer--on-top":"")+(Ee.value===!0?" q-drawer--top-padding":""))),mt=c(()=>{const u=a.lang.rtl===!0?e.side:T.value;return[[ne,zt,void 0,{[u]:!0,mouse:!0}]]}),bt=c(()=>{const u=a.lang.rtl===!0?T.value:e.side;return[[ne,De,void 0,{[u]:!0,mouse:!0}]]}),gt=c(()=>{const u=a.lang.rtl===!0?T.value:e.side;return[[ne,De,void 0,{[u]:!0,mouse:!0,mouseAllDir:!0}]]});function me(){pt(z,e.behavior==="mobile"||e.behavior!=="desktop"&&i.totalWidth.value<=e.breakpoint)}O(z,u=>{u===!0?(b=_.value,_.value===!0&&x(!1)):e.overlay===!1&&e.behavior!=="mobile"&&b!==!1&&(_.value===!0?(Q(0),Y(0),ge()):h(!1))}),O(()=>e.side,(u,w)=>{i.instances[w]===H&&(i.instances[w]=void 0,i[w].space=!1,i[w].offset=0),i.instances[u]=H,i[u].size=$.value,i[u].space=R.value,i[u].offset=I.value}),O(i.totalWidth,()=>{(i.isContainer.value===!0||document.qScrollPrevented!==!0)&&me()}),O(()=>e.behavior+e.breakpoint,me),O(i.isContainer,u=>{_.value===!0&&l(u!==!0),u===!0&&me()}),O(i.scrollbarWidth,()=>{Q(_.value===!0?0:void 0)}),O(I,u=>{K("offset",u)}),O(R,u=>{n("onLayout",u),K("space",u)}),O(F,()=>{Q()}),O($,u=>{Q(),ye(e.miniToOverlay,u)}),O(()=>e.miniToOverlay,u=>{ye(u,$.value)}),O(()=>a.lang.rtl,()=>{Q()}),O(()=>e.mini,()=>{e.noMiniAnimation||e.modelValue===!0&&(yt(),i.animate())}),O(B,u=>{n("miniState",u)});function Q(u){u===void 0?de(()=>{u=_.value===!0?0:$.value,Q(X.value*u)}):(i.isContainer.value===!0&&F.value===!0&&(z.value===!0||Math.abs(u)===$.value)&&(u+=X.value*i.scrollbarWidth.value),y.value=u)}function Y(u){G.value=u}function be(u){const w=u===!0?"remove":i.isContainer.value!==!0?"add":"";w!==""&&document.body.classList[w]("q-body--drawer-toggle")}function yt(){p!==null&&clearTimeout(p),t.proxy&&t.proxy.$el&&t.proxy.$el.classList.add("q-drawer--mini-animate"),f.value=!0,p=setTimeout(()=>{p=null,f.value=!1,t?.proxy?.$el?.classList.remove("q-drawer--mini-animate")},150)}function zt(u){if(_.value!==!1)return;const w=$.value,D=j(u.distance.x,0,w);if(u.isFinal===!0){D>=Math.min(75,w)===!0?h():(i.animate(),Y(0),Q(X.value*w)),U.value=!1;return}Q((a.lang.rtl===!0?F.value!==!0:F.value)?Math.max(w-D,0):Math.min(0,D-w)),Y(j(D/w,0,1)),u.isFirst===!0&&(U.value=!0)}function De(u){if(_.value!==!0)return;const w=$.value,D=u.direction===e.side,ue=(a.lang.rtl===!0?D!==!0:D)?j(u.distance.x,0,w):0;if(u.isFinal===!0){Math.abs(ue)<Math.min(75,w)===!0?(i.animate(),Y(1),Q(0)):x(),U.value=!1;return}Q(X.value*ue),Y(j(1-ue/w,0,1)),u.isFirst===!0&&(U.value=!0)}function ge(){l(!1),be(!0)}function K(u,w){i.update(e.side,u,w)}function pt(u,w){u.value!==w&&(u.value=w)}function ye(u,w){K("size",u===!0?e.miniWidth:w)}return i.instances[e.side]=H,ye(e.miniToOverlay,$.value),K("space",R.value),K("offset",I.value),e.showIfAbove===!0&&e.modelValue!==!0&&_.value===!0&&e["onUpdate:modelValue"]!==void 0&&n("update:modelValue",!0),re(()=>{n("onLayout",R.value),n("miniState",B.value),b=e.showIfAbove===!0;const u=()=>{(_.value===!0?P:S)(!1,!0)};if(i.totalWidth.value!==0){de(u);return}m=O(i.totalWidth,()=>{m(),m=void 0,_.value===!1&&e.showIfAbove===!0&&z.value===!1?h(!1):u()})}),Z(()=>{m?.(),p!==null&&(clearTimeout(p),p=null),_.value===!0&&ge(),i.instances[e.side]===H&&(i.instances[e.side]=void 0,K("size",0),K("offset",0),K("space",!1))}),()=>{const u=[];z.value===!0&&(e.noSwipeOpen===!1&&u.push(Be(q("div",{key:"open",class:`q-drawer__opener fixed-${e.side}`,"aria-hidden":"true"}),mt.value)),u.push(Ae("div",{ref:"backdrop",class:he.value,style:st.value,"aria-hidden":"true",onClick:x},void 0,"backdrop",e.noSwipeBackdrop!==!0&&_.value===!0,()=>gt.value)));const w=B.value===!0&&r.mini!==void 0,D=[q("div",{...s,key:""+w,class:[ft.value,s.class]},w===!0?r.mini():ve(r.default))];return e.elevated===!0&&_.value===!0&&D.push(q("div",{class:"q-layout__shadow absolute-full overflow-hidden no-pointer-events"})),u.push(Ae("aside",{ref:"content",class:ht.value,style:vt.value},D,"contentclose",e.noSwipeClose!==!0&&z.value===!0,()=>bt.value)),q("div",{class:"q-drawer-container"},u)}}}),la=A({name:"QPageContainer",setup(e,{slots:r}){const{proxy:{$q:n}}=J(),s=fe(ie,V);if(s===V)return console.error("QPageContainer needs to be child of QLayout"),V;nt(Qt,!0);const t=c(()=>{const a={};return s.header.space===!0&&(a.paddingTop=`${s.header.size}px`),s.right.space===!0&&(a[`padding${n.lang.rtl===!0?"Left":"Right"}`]=`${s.right.size}px`),s.footer.space===!0&&(a.paddingBottom=`${s.footer.size}px`),s.left.space===!0&&(a[`padding${n.lang.rtl===!0?"Right":"Left"}`]=`${s.left.size}px`),a});return()=>q("div",{class:"q-page-container",style:t.value},ve(r.default))}}),oa=A({name:"QFooter",props:{modelValue:{type:Boolean,default:!0},reveal:Boolean,bordered:Boolean,elevated:Boolean,heightHint:{type:[String,Number],default:50}},emits:["reveal","focusin"],setup(e,{slots:r,emit:n}){const{proxy:{$q:s}}=J(),t=fe(ie,V);if(t===V)return console.error("QFooter needs to be child of QLayout"),V;const a=C(parseInt(e.heightHint,10)),o=C(!0),l=C(Le.value===!0||t.isContainer.value===!0?0:window.innerHeight),d=c(()=>e.reveal===!0||t.view.value.indexOf("F")!==-1||s.platform.is.ios&&t.isContainer.value===!0),v=c(()=>t.isContainer.value===!0?t.containerHeight.value:l.value),i=c(()=>{if(e.modelValue!==!0)return 0;if(d.value===!0)return o.value===!0?a.value:0;const h=t.scroll.value.position+v.value+a.value-t.height.value;return h>0?h:0}),b=c(()=>e.modelValue!==!0||d.value===!0&&o.value!==!0),p=c(()=>e.modelValue===!0&&b.value===!0&&e.reveal===!0),m=c(()=>"q-footer q-layout__section--marginal "+(d.value===!0?"fixed":"absolute")+"-bottom"+(e.bordered===!0?" q-footer--bordered":"")+(b.value===!0?" q-footer--hidden":"")+(e.modelValue!==!0?" q-layout--prevent-focus"+(d.value!==!0?" hidden":""):"")),z=c(()=>{const h=t.rows.value.bottom,x={};return h[0]==="l"&&t.left.space===!0&&(x[s.lang.rtl===!0?"right":"left"]=`${t.left.size}px`),h[2]==="r"&&t.right.space===!0&&(x[s.lang.rtl===!0?"left":"right"]=`${t.right.size}px`),x});function B(h,x){t.update("footer",h,x)}function $(h,x){h.value!==x&&(h.value=x)}function _({height:h}){$(a,h),B("size",h)}function g(){if(e.reveal!==!0)return;const{direction:h,position:x,inflectionPoint:L}=t.scroll.value;$(o,h==="up"||x-L<100||t.height.value-v.value-x-a.value<300)}function P(h){p.value===!0&&$(o,!0),n("focusin",h)}O(()=>e.modelValue,h=>{B("space",h),$(o,!0),t.animate()}),O(i,h=>{B("offset",h)}),O(()=>e.reveal,h=>{h===!1&&$(o,e.modelValue)}),O(o,h=>{t.animate(),n("reveal",h)}),O([a,t.scroll,t.height],g),O(()=>s.screen.height,h=>{t.isContainer.value!==!0&&$(l,h)});const S={};return t.instances.footer=S,e.modelValue===!0&&B("size",a.value),B("space",e.modelValue),B("offset",i.value),Z(()=>{t.instances.footer===S&&(t.instances.footer=void 0,B("size",0),B("offset",0),B("space",!1))}),()=>{const h=Pe(r.default,[q(ae,{debounce:0,onResize:_})]);return e.elevated===!0&&h.push(q("div",{class:"q-layout__shadow absolute-full overflow-hidden no-pointer-events"})),q("footer",{class:m.value,style:z.value,onFocusin:P},h)}}}),na=A({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:r,emit:n}){const{proxy:{$q:s}}=J(),t=C(null),a=C(s.screen.height),o=C(e.container===!0?0:s.screen.width),l=C({position:0,direction:"down",inflectionPoint:0}),d=C(0),v=C(Le.value===!0?0:qe()),i=c(()=>"q-layout q-layout--"+(e.container===!0?"containerized":"standard")),b=c(()=>e.container===!1?{minHeight:s.screen.height+"px"}:null),p=c(()=>v.value!==0?{[s.lang.rtl===!0?"left":"right"]:`${v.value}px`}:null),m=c(()=>v.value!==0?{[s.lang.rtl===!0?"right":"left"]:0,[s.lang.rtl===!0?"left":"right"]:`-${v.value}px`,width:`calc(100% + ${v.value}px)`}:null);function z(S){if(e.container===!0||document.qScrollPrevented!==!0){const h={position:S.position.top,direction:S.direction,directionChanged:S.directionChanged,inflectionPoint:S.inflectionPoint.top,delta:S.delta.top};l.value=h,e.onScroll!==void 0&&n("scroll",h)}}function B(S){const{height:h,width:x}=S;let L=!1;a.value!==h&&(L=!0,a.value=h,e.onScrollHeight!==void 0&&n("scrollHeight",h),_()),o.value!==x&&(L=!0,o.value=x),L===!0&&e.onResize!==void 0&&n("resize",S)}function $({height:S}){d.value!==S&&(d.value=S,_())}function _(){if(e.container===!0){const S=a.value>d.value?qe():0;v.value!==S&&(v.value=S)}}let g=null;const P={instances:{},view:c(()=>e.view),isContainer:c(()=>e.container),rootRef:t,height:a,containerHeight:d,scrollbarWidth:v,totalWidth:c(()=>o.value+v.value),rows:c(()=>{const S=e.view.toLowerCase().split(" ");return{top:S[0].split(""),middle:S[1].split(""),bottom:S[2].split("")}}),header:ce({size:0,offset:0,space:!1}),right:ce({size:300,offset:0,space:!1}),footer:ce({size:0,offset:0,space:!1}),left:ce({size:300,offset:0,space:!1}),scroll:l,animate(){g!==null?clearTimeout(g):document.body.classList.add("q-body--layout-animate"),g=setTimeout(()=>{g=null,document.body.classList.remove("q-body--layout-animate")},155)},update(S,h,x){P[S][h]=x}};if(nt(ie,P),qe()>0){let S=function(){L=null,W.classList.remove("hide-scrollbar")},h=function(){if(L===null){if(W.scrollHeight>s.screen.height)return;W.classList.add("hide-scrollbar")}else clearTimeout(L);L=setTimeout(S,300)},x=function(H){L!==null&&H==="remove"&&(clearTimeout(L),S()),window[`${H}EventListener`]("resize",h)},L=null;const W=document.body;O(()=>e.container!==!0?"add":"remove",x),e.container!==!0&&x("add"),Vt(()=>{x("remove")})}return()=>{const S=Pe(r.default,[q(ut,{onScroll:z}),q(ae,{onResize:B})]),h=q("div",{class:i.value,style:b.value,ref:e.container===!0?void 0:t,tabindex:-1},S);return e.container===!0?q("div",{class:"q-layout-container overflow-hidden",ref:t},[q(ae,{onResize:$}),q("div",{class:"absolute-full",style:p.value},[q("div",{class:"scroll",style:m.value},[h])])]):h}}}),ra=()=>{const e=rt(),r=c(()=>e.getTaxpayer());function n(a){e.setTaxpayer(a)}function s(a){e.replaceTaxpayer(a)}function t(){e.resetTaxpayer()}return{data:r,set:n,replace:s,reset:t}},ia=()=>{const e=rt(),r=c(()=>e.getMarital());function n(a){e.setMarital(a)}function s(a){e.replaceMarital(a)}function t(){e.resetMarital()}return{data:r,set:n,replace:s,reset:t}},ua={class:"row items-center no-wrap"},sa={class:"q-mr-md"},ca={class:"q-pa-md"},da={class:"q-pa-sm bg-grey-2 text-body2",style:{"white-space":"pre-wrap"}},va={class:"q-pa-md"},fa={class:"q-pa-sm bg-grey-2 text-body2",style:{"white-space":"pre-wrap"}},ha={class:"q-pa-md"},ma={class:"q-pa-sm bg-grey-2 text-body2",style:{"white-space":"pre-wrap"}},ba={class:"row items-center no-wrap"},_a=At({__name:"MainLayout",setup(e){const r=C(!1),n=ra(),s=ia(),t=Nt(),{locale:a}=jt(),o=[{code:"it-IT",label:"Italiano"},{code:"en-US",label:"English"},{code:"fr-FR",label:"Français"},{code:"de-DE",label:"Deutsch"}];function l(i){a.value=i}const d=c(()=>{const i=o.find(b=>b.code===a.value);return i?i.label:String(a.value)});function v(){r.value=!r.value}return(i,b)=>{const p=It("router-view");return _e(),Ft(na,{view:"lHh Lpr lFf"},{default:M(()=>[k(Yt,{elevated:""},{default:M(()=>[k(Ue,null,{default:M(()=>[k(Ce,{flat:"",dense:"",round:"",icon:"menu","aria-label":"Menu",onClick:v}),k(Wt,null,{default:M(()=>[...b[1]||(b[1]=[Te(" Quasar App ",-1)])]),_:1}),k(Xt),E("div",ua,[E("div",sa,"Quasar v"+ee(i.$q.version),1),k(Ce,{flat:"",dense:"",icon:"language",label:d.value,"aria-label":"Language"},{default:M(()=>[k(Xe,{"auto-close":""},{default:M(()=>[k(Ne,null,{default:M(()=>[(_e(),Fe(Ie,null,Re(o,m=>k(je,{clickable:"",key:m.code,onClick:z=>l(m.code)},{default:M(()=>[k(We,null,{default:M(()=>[Te(ee(m.label),1)]),_:2},1024)]),_:2},1032,["onClick"])),64))]),_:1})]),_:1})]),_:1},8,["label"])])]),_:1})]),_:1}),k(aa,{modelValue:r.value,"onUpdate:modelValue":b[0]||(b[0]=m=>r.value=m),"show-if-above":"",bordered:""},{default:M(()=>[k(ta,{class:"fit"},{default:M(()=>[E("div",ca,[b[2]||(b[2]=E("div",{class:"text-subtitle2 q-mb-sm"},"Dati contribuente",-1)),E("pre",da,ee(JSON.stringify(te(te(n).data),null,2)),1)]),E("div",va,[b[3]||(b[3]=E("div",{class:"text-subtitle2 q-mb-sm"},"Dati stato civile",-1)),E("pre",fa,ee(JSON.stringify(te(te(s).data),null,2)),1)]),E("div",ha,[b[4]||(b[4]=E("div",{class:"text-subtitle2 q-mb-sm"},"Dati figli",-1)),E("pre",ma,ee(JSON.stringify(te(te(t).data),null,2)),1)])]),_:1})]),_:1},8,["modelValue"]),k(la,null,{default:M(()=>[k(p)]),_:1}),k(oa,{elevated:"",class:"bg-white"},{default:M(()=>[k(Ue,{class:"q-pl-md q-pr-md"},{default:M(()=>[E("div",ba,[b[5]||(b[5]=E("div",{class:"col"},null,-1)),E("div",null,[k(Ce,{flat:"",dense:"",icon:"language",label:d.value,"aria-label":"Language"},{default:M(()=>[k(Xe,{"auto-close":""},{default:M(()=>[k(Ne,null,{default:M(()=>[(_e(),Fe(Ie,null,Re(o,m=>k(je,{clickable:"",key:m.code,onClick:z=>l(m.code)},{default:M(()=>[k(We,null,{default:M(()=>[Te(ee(m.label),1)]),_:2},1024)]),_:2},1032,["onClick"])),64))]),_:1})]),_:1})]),_:1},8,["label"])])])]),_:1})]),_:1})]),_:1})}}});export{_a as default};
|