diff --git a/static/market/assets/ErrorNotFound.c9327b8c.js b/static/market/assets/ErrorNotFound.db68ea1d.js similarity index 88% rename from static/market/assets/ErrorNotFound.c9327b8c.js rename to static/market/assets/ErrorNotFound.db68ea1d.js index 0279cf8..3b62c08 100644 --- a/static/market/assets/ErrorNotFound.c9327b8c.js +++ b/static/market/assets/ErrorNotFound.db68ea1d.js @@ -1 +1 @@ -import{_ as t,n as o,s,aQ as a,v as e,x as n,ap as r}from"./index.ed8b8314.js";const c=o({name:"ErrorNotFound"}),l={class:"fullscreen bg-blue text-white text-center q-pa-md flex flex-center"},d=e("div",{style:{"font-size":"30vh"}}," 404 ",-1),i=e("div",{class:"text-h2",style:{opacity:".4"}}," Oops. Nothing here... ",-1);function _(p,f,u,x,h,m){return s(),a("div",l,[e("div",null,[d,i,n(r,{class:"q-mt-xl",color:"white","text-color":"blue",unelevated:"",to:"/",label:"Go Home","no-caps":""})])])}var N=t(c,[["render",_]]);export{N as default}; +import{_ as t,n as o,s,aQ as a,v as e,x as n,ap as r}from"./index.923cbbf9.js";const c=o({name:"ErrorNotFound"}),l={class:"fullscreen bg-blue text-white text-center q-pa-md flex flex-center"},d=e("div",{style:{"font-size":"30vh"}}," 404 ",-1),i=e("div",{class:"text-h2",style:{opacity:".4"}}," Oops. Nothing here... ",-1);function _(p,f,u,x,h,m){return s(),a("div",l,[e("div",null,[d,i,n(r,{class:"q-mt-xl",color:"white","text-color":"blue",unelevated:"",to:"/",label:"Go Home","no-caps":""})])])}var N=t(c,[["render",_]]);export{N as default}; diff --git a/static/market/assets/MainLayout.543449e8.js b/static/market/assets/MainLayout.8e5caf60.js similarity index 96% rename from static/market/assets/MainLayout.543449e8.js rename to static/market/assets/MainLayout.8e5caf60.js index 9551f92..05920b0 100644 --- a/static/market/assets/MainLayout.543449e8.js +++ b/static/market/assets/MainLayout.8e5caf60.js @@ -1 +1 @@ -import{c as R,i as E,e as _,l as P,p as H,a,h as r,b as K,g as Q,d as N,r as d,f as O,j as b,k as p,w as V,o as I,m as U,_ as A,n as D,q as G,s as J,t as X,u as C,v as y,x as L}from"./index.ed8b8314.js";import{Q as Y,a as q}from"./QResizeObserver.b282d5d7.js";var Z=R({name:"QPageContainer",setup(t,{slots:h}){const{proxy:{$q:s}}=Q(),o=E(P,_);if(o===_)return console.error("QPageContainer needs to be child of QLayout"),_;H(N,!0);const u=a(()=>{const l={};return o.header.space===!0&&(l.paddingTop=`${o.header.size}px`),o.right.space===!0&&(l[`padding${s.lang.rtl===!0?"Left":"Right"}`]=`${o.right.size}px`),o.footer.space===!0&&(l.paddingBottom=`${o.footer.size}px`),o.left.space===!0&&(l[`padding${s.lang.rtl===!0?"Right":"Left"}`]=`${o.left.size}px`),l});return()=>r("div",{class:"q-page-container",style:u.value},K(h.default))}}),ee=R({name:"QLayout",props:{container:Boolean,view:{type:String,default:"hhh lpr fff",validator:t=>/^(h|l)h(h|r) lpr (f|l)f(f|r)$/.test(t.toLowerCase())},onScroll:Function,onScrollHeight:Function,onResize:Function},setup(t,{slots:h,emit:s}){const{proxy:{$q:o}}=Q(),u=d(null),l=d(o.screen.height),f=d(t.container===!0?0:o.screen.width),z=d({position:0,direction:"down",inflectionPoint:0}),m=d(0),i=d(O.value===!0?0:b()),T=a(()=>"q-layout q-layout--"+(t.container===!0?"containerized":"standard")),B=a(()=>t.container===!1?{minHeight:o.screen.height+"px"}:null),F=a(()=>i.value!==0?{[o.lang.rtl===!0?"left":"right"]:`${i.value}px`}:null),W=a(()=>i.value!==0?{[o.lang.rtl===!0?"right":"left"]:0,[o.lang.rtl===!0?"left":"right"]:`-${i.value}px`,width:`calc(100% + ${i.value}px)`}:null);function k(e){if(t.container===!0||document.qScrollPrevented!==!0){const n={position:e.position.top,direction:e.direction,directionChanged:e.directionChanged,inflectionPoint:e.inflectionPoint.top,delta:e.delta.top};z.value=n,t.onScroll!==void 0&&s("scroll",n)}}function M(e){const{height:n,width:c}=e;let v=!1;l.value!==n&&(v=!0,l.value=n,t.onScrollHeight!==void 0&&s("scrollHeight",n),S()),f.value!==c&&(v=!0,f.value=c),v===!0&&t.onResize!==void 0&&s("resize",e)}function j({height:e}){m.value!==e&&(m.value=e,S())}function S(){if(t.container===!0){const e=l.value>m.value?b():0;i.value!==e&&(i.value=e)}}let g=null;const $={instances:{},view:a(()=>t.view),isContainer:a(()=>t.container),rootRef:u,height:l,containerHeight:m,scrollbarWidth:i,totalWidth:a(()=>f.value+i.value),rows:a(()=>{const e=t.view.toLowerCase().split(" ");return{top:e[0].split(""),middle:e[1].split(""),bottom:e[2].split("")}}),header:p({size:0,offset:0,space:!1}),right:p({size:300,offset:0,space:!1}),footer:p({size:0,offset:0,space:!1}),left:p({size:300,offset:0,space:!1}),scroll:z,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(e,n,c){$[e][n]=c}};if(H(P,$),b()>0){let c=function(){e=null,n.classList.remove("hide-scrollbar")},v=function(){if(e===null){if(n.scrollHeight>o.screen.height)return;n.classList.add("hide-scrollbar")}else clearTimeout(e);e=setTimeout(c,300)},w=function(x){e!==null&&x==="remove"&&(clearTimeout(e),c()),window[`${x}EventListener`]("resize",v)},e=null;const n=document.body;V(()=>t.container!==!0?"add":"remove",w),t.container!==!0&&w("add"),I(()=>{w("remove")})}return()=>{const e=U(h.default,[r(Y,{onScroll:k}),r(q,{onResize:M})]),n=r("div",{class:T.value,style:B.value,ref:t.container===!0?void 0:u,tabindex:-1},e);return t.container===!0?r("div",{class:"q-layout-container overflow-hidden",ref:u},[r(q,{onResize:j}),r("div",{class:"absolute-full",style:F.value},[r("div",{class:"scroll",style:W.value},[n])])]):n}}});const te=D({name:"MainLayout",setup(){return{}}}),oe={class:"row q-mb-sm q-mt-md"},ne=y("div",{class:"col-lg-2 col-md-1 col-sm-0"},null,-1),le={class:"col-lg-8 col-md-10 col-sm-12 auto-width q-pl-md q-pr-md"},ie=y("div",{class:"col-lg-2 col-md-1 col-sm-0"},null,-1);function ae(t,h,s,o,u,l){const f=G("router-view");return J(),X(ee,{view:"lHh Lpr lFf"},{default:C(()=>[y("div",oe,[ne,y("div",le,[L(Z,null,{default:C(()=>[L(f)]),_:1})]),ie])]),_:1})}var ce=A(te,[["render",ae]]);export{ce as default}; +import{c as R,i as E,e as _,l as P,p as H,a,h as r,b as K,g as Q,d as N,r as d,f as O,j as b,k as p,w as V,o as I,m as U,_ as A,n as D,q as G,s as J,t as X,u as C,v as y,x as L}from"./index.923cbbf9.js";import{Q as Y,a as q}from"./QResizeObserver.1ffe80c2.js";var Z=R({name:"QPageContainer",setup(t,{slots:h}){const{proxy:{$q:s}}=Q(),o=E(P,_);if(o===_)return console.error("QPageContainer needs to be child of QLayout"),_;H(N,!0);const u=a(()=>{const l={};return o.header.space===!0&&(l.paddingTop=`${o.header.size}px`),o.right.space===!0&&(l[`padding${s.lang.rtl===!0?"Left":"Right"}`]=`${o.right.size}px`),o.footer.space===!0&&(l.paddingBottom=`${o.footer.size}px`),o.left.space===!0&&(l[`padding${s.lang.rtl===!0?"Right":"Left"}`]=`${o.left.size}px`),l});return()=>r("div",{class:"q-page-container",style:u.value},K(h.default))}}),ee=R({name:"QLayout",props:{container:Boolean,view:{type:String,default:"hhh lpr fff",validator:t=>/^(h|l)h(h|r) lpr (f|l)f(f|r)$/.test(t.toLowerCase())},onScroll:Function,onScrollHeight:Function,onResize:Function},setup(t,{slots:h,emit:s}){const{proxy:{$q:o}}=Q(),u=d(null),l=d(o.screen.height),f=d(t.container===!0?0:o.screen.width),z=d({position:0,direction:"down",inflectionPoint:0}),m=d(0),i=d(O.value===!0?0:b()),T=a(()=>"q-layout q-layout--"+(t.container===!0?"containerized":"standard")),B=a(()=>t.container===!1?{minHeight:o.screen.height+"px"}:null),F=a(()=>i.value!==0?{[o.lang.rtl===!0?"left":"right"]:`${i.value}px`}:null),W=a(()=>i.value!==0?{[o.lang.rtl===!0?"right":"left"]:0,[o.lang.rtl===!0?"left":"right"]:`-${i.value}px`,width:`calc(100% + ${i.value}px)`}:null);function k(e){if(t.container===!0||document.qScrollPrevented!==!0){const n={position:e.position.top,direction:e.direction,directionChanged:e.directionChanged,inflectionPoint:e.inflectionPoint.top,delta:e.delta.top};z.value=n,t.onScroll!==void 0&&s("scroll",n)}}function M(e){const{height:n,width:c}=e;let v=!1;l.value!==n&&(v=!0,l.value=n,t.onScrollHeight!==void 0&&s("scrollHeight",n),S()),f.value!==c&&(v=!0,f.value=c),v===!0&&t.onResize!==void 0&&s("resize",e)}function j({height:e}){m.value!==e&&(m.value=e,S())}function S(){if(t.container===!0){const e=l.value>m.value?b():0;i.value!==e&&(i.value=e)}}let g=null;const $={instances:{},view:a(()=>t.view),isContainer:a(()=>t.container),rootRef:u,height:l,containerHeight:m,scrollbarWidth:i,totalWidth:a(()=>f.value+i.value),rows:a(()=>{const e=t.view.toLowerCase().split(" ");return{top:e[0].split(""),middle:e[1].split(""),bottom:e[2].split("")}}),header:p({size:0,offset:0,space:!1}),right:p({size:300,offset:0,space:!1}),footer:p({size:0,offset:0,space:!1}),left:p({size:300,offset:0,space:!1}),scroll:z,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(e,n,c){$[e][n]=c}};if(H(P,$),b()>0){let c=function(){e=null,n.classList.remove("hide-scrollbar")},v=function(){if(e===null){if(n.scrollHeight>o.screen.height)return;n.classList.add("hide-scrollbar")}else clearTimeout(e);e=setTimeout(c,300)},w=function(x){e!==null&&x==="remove"&&(clearTimeout(e),c()),window[`${x}EventListener`]("resize",v)},e=null;const n=document.body;V(()=>t.container!==!0?"add":"remove",w),t.container!==!0&&w("add"),I(()=>{w("remove")})}return()=>{const e=U(h.default,[r(Y,{onScroll:k}),r(q,{onResize:M})]),n=r("div",{class:T.value,style:B.value,ref:t.container===!0?void 0:u,tabindex:-1},e);return t.container===!0?r("div",{class:"q-layout-container overflow-hidden",ref:u},[r(q,{onResize:j}),r("div",{class:"absolute-full",style:F.value},[r("div",{class:"scroll",style:W.value},[n])])]):n}}});const te=D({name:"MainLayout",setup(){return{}}}),oe={class:"row q-mb-sm q-mt-md"},ne=y("div",{class:"col-lg-2 col-md-1 col-sm-0"},null,-1),le={class:"col-lg-8 col-md-10 col-sm-12 auto-width q-pl-md q-pr-md"},ie=y("div",{class:"col-lg-2 col-md-1 col-sm-0"},null,-1);function ae(t,h,s,o,u,l){const f=G("router-view");return J(),X(ee,{view:"lHh Lpr lFf"},{default:C(()=>[y("div",oe,[ne,y("div",le,[L(Z,null,{default:C(()=>[L(f)]),_:1})]),ie])]),_:1})}var ce=A(te,[["render",ae]]);export{ce as default}; diff --git a/static/market/assets/MarketPage.bd1265a2.js b/static/market/assets/MarketPage.e81dd906.js similarity index 73% rename from static/market/assets/MarketPage.bd1265a2.js rename to static/market/assets/MarketPage.e81dd906.js index 838e1dc..96245d3 100644 --- a/static/market/assets/MarketPage.bd1265a2.js +++ b/static/market/assets/MarketPage.e81dd906.js @@ -1,31 +1,31 @@ -import{c as Je,a as $,h as E,m as Si,P as xb,r as se,G as Ka,H as yi,F as Sn,I as Rn,w as Ve,y as ni,z as Ht,g as Dt,J as Pr,C as ta,K as ih,L as Kn,j as Ab,M as Ku,N as Gu,O as Qu,Q as Ra,R as co,S as $h,T as ju,U as Oh,B as xo,V as Ga,b as Mt,W as Rt,X as or,Y as Eb,Z as sr,$ as Ib,a0 as Zu,a1 as Yt,a2 as $b,a3 as Ju,A as Xu,a4 as ec,a5 as tc,a6 as oa,a7 as sa,a8 as Ob,a9 as Rb,aa as Rh,ab as Ao,ac as Lh,ad as Nh,ae as Bh,af as na,ag as Fh,ah,ai as Lb,aj as Nb,ak as Uh,al as Bb,am as zh,an as fo,ao as Fb,ap as ye,aq as ir,ar as Ub,as as zb,at as nc,i as ho,e as Tr,l as Vb,d as Yb,au as rc,av as Wb,aw as Hb,ax as Kb,n as sn,ay as Vh,az as Gn,aA as Yh,aB as Hi,p as Wh,aC as ic,aD as Hh,aE as Kh,aF as Gh,aG as Gb,aH as Qb,aI as lh,aJ as jb,aK as Zb,aL as Jb,aM as go,aN as Qh,aO as ji,aP as Xb,_ as Cn,s as O,aQ as ie,x as y,u as b,aR as Xr,v as S,aS as ge,aT as De,aU as Nt,q as ti,t as oe,aV as $e,aW as ut,aX as Re,aY as It,aZ as lo,a_ as Au,a$ as Wt,b0 as Jt,b1 as hu,b2 as La,b3 as ew,b4 as tw,b5 as wi,b6 as nw,b7 as Xl,D as gu,b8 as oh,b9 as jh,ba as rw,bb as iw,bc as aw,bd as sh,be as lw,bf as ow,bg as sw,bh as uw}from"./index.ed8b8314.js";import{a as Eu,Q as cw}from"./QResizeObserver.b282d5d7.js";const dw=["top","middle","bottom"];var Ln=Je({name:"QBadge",props:{color:String,textColor:String,floating:Boolean,transparent:Boolean,multiLine:Boolean,outline:Boolean,rounded:Boolean,label:[Number,String],align:{type:String,validator:e=>dw.includes(e)}},setup(e,{slots:t}){const r=$(()=>e.align!==void 0?{verticalAlign:e.align}:null),a=$(()=>{const l=e.outline===!0&&e.color||e.textColor;return`q-badge flex inline items-center no-wrap q-badge--${e.multiLine===!0?"multi":"single"}-line`+(e.outline===!0?" q-badge--outline":e.color!==void 0?` bg-${e.color}`:"")+(l!==void 0?` text-${l}`:"")+(e.floating===!0?" q-badge--floating":"")+(e.rounded===!0?" q-badge--rounded":"")+(e.transparent===!0?" q-badge--transparent":"")});return()=>E("div",{class:a.value,style:r.value,role:"status","aria-label":e.label},Si(t.default,e.label!==void 0?[e.label]:[]))}});function Ua(){if(window.getSelection!==void 0){const e=window.getSelection();e.empty!==void 0?e.empty():e.removeAllRanges!==void 0&&(e.removeAllRanges(),xb.is.mobile!==!0&&e.addRange(document.createRange()))}else document.selection!==void 0&&document.selection.empty()}const Zh={target:{default:!0},noParentEvent:Boolean,contextMenu:Boolean};function Jh({showing:e,avoidEmit:t,configureAnchorEl:r}){const{props:a,proxy:l,emit:s}=Dt(),u=se(null);let d=null;function f(_){return u.value===null?!1:_===void 0||_.touches===void 0||_.touches.length<=1}const g={};r===void 0&&(Object.assign(g,{hide(_){l.hide(_)},toggle(_){l.toggle(_),_.qAnchorHandled=!0},toggleKey(_){Ka(_,13)===!0&&g.toggle(_)},contextClick(_){l.hide(_),yi(_),Sn(()=>{l.show(_),_.qAnchorHandled=!0})},prevent:yi,mobileTouch(_){if(g.mobileCleanup(_),f(_)!==!0)return;l.hide(_),u.value.classList.add("non-selectable");const x=_.target;Rn(g,"anchor",[[x,"touchmove","mobileCleanup","passive"],[x,"touchend","mobileCleanup","passive"],[x,"touchcancel","mobileCleanup","passive"],[u.value,"contextmenu","prevent","notPassive"]]),d=setTimeout(()=>{d=null,l.show(_),_.qAnchorHandled=!0},300)},mobileCleanup(_){u.value.classList.remove("non-selectable"),d!==null&&(clearTimeout(d),d=null),e.value===!0&&_!==void 0&&Ua()}}),r=function(_=a.contextMenu){if(a.noParentEvent===!0||u.value===null)return;let x;_===!0?l.$q.platform.is.mobile===!0?x=[[u.value,"touchstart","mobileTouch","passive"]]:x=[[u.value,"mousedown","hide","passive"],[u.value,"contextmenu","contextClick","notPassive"]]:x=[[u.value,"click","toggle","passive"],[u.value,"keyup","toggleKey","passive"]],Rn(g,"anchor",x)});function v(){Pr(g,"anchor")}function C(_){for(u.value=_;u.value.classList.contains("q-anchor--skip");)u.value=u.value.parentNode;r()}function M(){if(a.target===!1||a.target===""||l.$el.parentNode===null)u.value=null;else if(a.target===!0)C(l.$el.parentNode);else{let _=a.target;if(typeof a.target=="string")try{_=document.querySelector(a.target)}catch{_=void 0}_!=null?(u.value=_.$el||_,r()):(u.value=null,console.error(`Anchor: target "${a.target}" not found`))}}return Ve(()=>a.contextMenu,_=>{u.value!==null&&(v(),r(_))}),Ve(()=>a.target,()=>{u.value!==null&&v(),M()}),Ve(()=>a.noParentEvent,_=>{u.value!==null&&(_===!0?v():r())}),ni(()=>{M(),t!==!0&&a.modelValue===!0&&u.value===null&&s("update:modelValue",!1)}),Ht(()=>{d!==null&&clearTimeout(d),v()}),{anchorEl:u,canShow:f,anchorEvents:g}}function Xh(e,t){const r=se(null);let a;function l(d,f){const g=`${f!==void 0?"add":"remove"}EventListener`,v=f!==void 0?f:a;d!==window&&d[g]("scroll",v,ta.passive),window[g]("scroll",v,ta.passive),a=f}function s(){r.value!==null&&(l(r.value),r.value=null)}const u=Ve(()=>e.noParentEvent,()=>{r.value!==null&&(s(),t())});return Ht(u),{localScrollTarget:r,unconfigureScrollTarget:s,changeScrollEvent:l}}const{notPassiveCapture:mo}=ta,_i=[];function vo(e){const t=e.target;if(t===void 0||t.nodeType===8||t.classList.contains("no-pointer-events")===!0)return;let r=ih.length-1;for(;r>=0;){const a=ih[r].$;if(a.type.name==="QTooltip"){r--;continue}if(a.type.name!=="QDialog")break;if(a.props.seamless!==!0)return;r--}for(let a=_i.length-1;a>=0;a--){const l=_i[a];if((l.anchorEl.value===null||l.anchorEl.value.contains(t)===!1)&&(t===document.body||l.innerRef.value!==null&&l.innerRef.value.contains(t)===!1))e.qClickOutside=!0,l.onClickOutside(e);else return}}function eg(e){_i.push(e),_i.length===1&&(document.addEventListener("mousedown",vo,mo),document.addEventListener("touchstart",vo,mo))}function po(e){const t=_i.findIndex(r=>r===e);t>-1&&(_i.splice(t,1),_i.length===0&&(document.removeEventListener("mousedown",vo,mo),document.removeEventListener("touchstart",vo,mo)))}let uh,ch;function yo(e){const t=e.split(" ");return t.length!==2?!1:["top","center","bottom"].includes(t[0])!==!0?(console.error("Anchor/Self position must start with one of top/center/bottom"),!1):["left","middle","right","start","end"].includes(t[1])!==!0?(console.error("Anchor/Self position must end with one of left/middle/right/start/end"),!1):!0}function tg(e){return e?!(e.length!==2||typeof e[0]!="number"||typeof e[1]!="number"):!0}const Iu={"start#ltr":"left","start#rtl":"right","end#ltr":"right","end#rtl":"left"};["left","middle","right"].forEach(e=>{Iu[`${e}#ltr`]=e,Iu[`${e}#rtl`]=e});function _o(e,t){const r=e.split(" ");return{vertical:r[0],horizontal:Iu[`${r[1]}#${t===!0?"rtl":"ltr"}`]}}function fw(e,t){let{top:r,left:a,right:l,bottom:s,width:u,height:d}=e.getBoundingClientRect();return t!==void 0&&(r-=t[1],a-=t[0],s+=t[1],l+=t[0],u+=t[0],d+=t[1]),{top:r,bottom:s,height:d,left:a,right:l,width:u,middle:a+(l-a)/2,center:r+(s-r)/2}}function hw(e,t,r){let{top:a,left:l}=e.getBoundingClientRect();return a+=t.top,l+=t.left,r!==void 0&&(a+=r[1],l+=r[0]),{top:a,bottom:a+1,height:1,left:l,right:l+1,width:1,middle:l,center:a}}function gw(e,t){return{top:0,center:t/2,bottom:t,left:0,middle:e/2,right:e}}function dh(e,t,r,a){return{top:e[r.vertical]-t[a.vertical],left:e[r.horizontal]-t[a.horizontal]}}function ac(e,t=0){if(e.targetEl===null||e.anchorEl===null||t>5)return;if(e.targetEl.offsetHeight===0||e.targetEl.offsetWidth===0){setTimeout(()=>{ac(e,t+1)},10);return}const{targetEl:r,offset:a,anchorEl:l,anchorOrigin:s,selfOrigin:u,absoluteOffset:d,fit:f,cover:g,maxHeight:v,maxWidth:C}=e;if(Kn.is.ios===!0&&window.visualViewport!==void 0){const J=document.body.style,{offsetLeft:V,offsetTop:H}=window.visualViewport;V!==uh&&(J.setProperty("--q-pe-left",V+"px"),uh=V),H!==ch&&(J.setProperty("--q-pe-top",H+"px"),ch=H)}const{scrollLeft:M,scrollTop:_}=r,x=d===void 0?fw(l,g===!0?[0,0]:a):hw(l,d,a);Object.assign(r.style,{top:0,left:0,minWidth:null,minHeight:null,maxWidth:C||"100vw",maxHeight:v||"100vh",visibility:"visible"});const{offsetWidth:I,offsetHeight:L}=r,{elWidth:F,elHeight:Y}=f===!0||g===!0?{elWidth:Math.max(x.width,I),elHeight:g===!0?Math.max(x.height,L):L}:{elWidth:I,elHeight:L};let D={maxWidth:C,maxHeight:v};(f===!0||g===!0)&&(D.minWidth=x.width+"px",g===!0&&(D.minHeight=x.height+"px")),Object.assign(r.style,D);const A=gw(F,Y);let N=dh(x,A,s,u);if(d===void 0||a===void 0)mu(N,x,A,s,u);else{const{top:J,left:V}=N;mu(N,x,A,s,u);let H=!1;if(N.top!==J){H=!0;const pe=2*a[1];x.center=x.top-=pe,x.bottom-=pe+2}if(N.left!==V){H=!0;const pe=2*a[0];x.middle=x.left-=pe,x.right-=pe+2}H===!0&&(N=dh(x,A,s,u),mu(N,x,A,s,u))}D={top:N.top+"px",left:N.left+"px"},N.maxHeight!==void 0&&(D.maxHeight=N.maxHeight+"px",x.height>N.maxHeight&&(D.minHeight=D.maxHeight)),N.maxWidth!==void 0&&(D.maxWidth=N.maxWidth+"px",x.width>N.maxWidth&&(D.minWidth=D.maxWidth)),Object.assign(r.style,D),r.scrollTop!==_&&(r.scrollTop=_),r.scrollLeft!==M&&(r.scrollLeft=M)}function mu(e,t,r,a,l){const s=r.bottom,u=r.right,d=Ab(),f=window.innerHeight-d,g=document.body.clientWidth;if(e.top<0||e.top+s>f)if(l.vertical==="center")e.top=t[a.vertical]>f/2?Math.max(0,f-s):0,e.maxHeight=Math.min(s,f);else if(t[a.vertical]>f/2){const v=Math.min(f,a.vertical==="center"?t.center:a.vertical===l.vertical?t.bottom:t.top);e.maxHeight=Math.min(s,v),e.top=Math.max(0,v-s)}else e.top=Math.max(0,a.vertical==="center"?t.center:a.vertical===l.vertical?t.top:t.bottom),e.maxHeight=Math.min(s,f-e.top);if(e.left<0||e.left+u>g)if(e.maxWidth=Math.min(u,g),l.horizontal==="middle")e.left=t[a.horizontal]>g/2?Math.max(0,g-u):0;else if(t[a.horizontal]>g/2){const v=Math.min(g,a.horizontal==="middle"?t.middle:a.horizontal===l.horizontal?t.right:t.left);e.maxWidth=Math.min(u,v),e.left=Math.max(0,v-e.maxWidth)}else e.left=Math.max(0,a.horizontal==="middle"?t.middle:a.horizontal===l.horizontal?t.left:t.right),e.maxWidth=Math.min(u,g-e.left)}var Qr=Je({name:"QTooltip",inheritAttrs:!1,props:{...Zh,...Ku,...Gu,maxHeight:{type:String,default:null},maxWidth:{type:String,default:null},transitionShow:{default:"jump-down"},transitionHide:{default:"jump-up"},anchor:{type:String,default:"bottom middle",validator:yo},self:{type:String,default:"top middle",validator:yo},offset:{type:Array,default:()=>[14,14],validator:tg},scrollTarget:{default:void 0},delay:{type:Number,default:0},hideDelay:{type:Number,default:0}},emits:[...Qu],setup(e,{slots:t,emit:r,attrs:a}){let l,s;const u=Dt(),{proxy:{$q:d}}=u,f=se(null),g=se(!1),v=$(()=>_o(e.anchor,d.lang.rtl)),C=$(()=>_o(e.self,d.lang.rtl)),M=$(()=>e.persistent!==!0),{registerTick:_,removeTick:x}=Ra(),{registerTimeout:I}=co(),{transitionProps:L,transitionStyle:F}=$h(e),{localScrollTarget:Y,changeScrollEvent:D,unconfigureScrollTarget:A}=Xh(e,X),{anchorEl:N,canShow:J,anchorEvents:V}=Jh({showing:g,configureAnchorEl:rt}),{show:H,hide:pe}=ju({showing:g,canShow:J,handleShow:te,handleHide:Pe,hideOnRouteChange:M,processOnMount:!0});Object.assign(V,{delayShow:G,delayHide:me});const{showPortal:_e,hidePortal:xe,renderPortal:lt}=Oh(u,f,he,"tooltip");if(d.platform.is.mobile===!0){const fe={anchorEl:N,innerRef:f,onClickOutside(ze){return pe(ze),ze.target.classList.contains("q-dialog__backdrop")&&Rt(ze),!0}},Ge=$(()=>e.modelValue===null&&e.persistent!==!0&&g.value===!0);Ve(Ge,ze=>{(ze===!0?eg:po)(fe)}),Ht(()=>{po(fe)})}function te(fe){_e(),_(()=>{s=new MutationObserver(()=>j()),s.observe(f.value,{attributes:!1,childList:!0,characterData:!0,subtree:!0}),j(),X()}),l===void 0&&(l=Ve(()=>d.screen.width+"|"+d.screen.height+"|"+e.self+"|"+e.anchor+"|"+d.lang.rtl,j)),I(()=>{_e(!0),r("show",fe)},e.transitionDuration)}function Pe(fe){x(),xe(),Be(),I(()=>{xe(!0),r("hide",fe)},e.transitionDuration)}function Be(){s!==void 0&&(s.disconnect(),s=void 0),l!==void 0&&(l(),l=void 0),A(),Pr(V,"tooltipTemp")}function j(){ac({targetEl:f.value,offset:e.offset,anchorEl:N.value,anchorOrigin:v.value,selfOrigin:C.value,maxHeight:e.maxHeight,maxWidth:e.maxWidth})}function G(fe){if(d.platform.is.mobile===!0){Ua(),document.body.classList.add("non-selectable");const Ge=N.value,ze=["touchmove","touchcancel","touchend","click"].map(we=>[Ge,we,"delayHide","passiveCapture"]);Rn(V,"tooltipTemp",ze)}I(()=>{H(fe)},e.delay)}function me(fe){d.platform.is.mobile===!0&&(Pr(V,"tooltipTemp"),Ua(),setTimeout(()=>{document.body.classList.remove("non-selectable")},10)),I(()=>{pe(fe)},e.hideDelay)}function rt(){if(e.noParentEvent===!0||N.value===null)return;const fe=d.platform.is.mobile===!0?[[N.value,"touchstart","delayShow","passive"]]:[[N.value,"mouseenter","delayShow","passive"],[N.value,"mouseleave","delayHide","passive"]];Rn(V,"anchor",fe)}function X(){if(N.value!==null||e.scrollTarget!==void 0){Y.value=xo(N.value,e.scrollTarget);const fe=e.noParentEvent===!0?j:pe;D(Y.value,fe)}}function Z(){return g.value===!0?E("div",{...a,ref:f,class:["q-tooltip q-tooltip--style q-position-engine no-pointer-events",a.class],style:[a.style,F.value],role:"tooltip"},Mt(t.default)):null}function he(){return E(Ga,L.value,Z)}return Ht(Be),Object.assign(u.proxy,{updatePosition:j}),lt}});const mw={xs:8,sm:10,md:14,lg:20,xl:24};var Qa=Je({name:"QChip",props:{...or,...Eb,dense:Boolean,icon:String,iconRight:String,iconRemove:String,iconSelected:String,label:[String,Number],color:String,textColor:String,modelValue:{type:Boolean,default:!0},selected:{type:Boolean,default:null},square:Boolean,outline:Boolean,clickable:Boolean,removable:Boolean,removeAriaLabel:String,tabindex:[String,Number],disable:Boolean,ripple:{type:[Boolean,Object],default:!0}},emits:["update:modelValue","update:selected","remove","click"],setup(e,{slots:t,emit:r}){const{proxy:{$q:a}}=Dt(),l=sr(e,a),s=Ib(e,mw),u=$(()=>e.selected===!0||e.icon!==void 0),d=$(()=>e.selected===!0?e.iconSelected||a.iconSet.chip.selected:e.icon),f=$(()=>e.iconRemove||a.iconSet.chip.remove),g=$(()=>e.disable===!1&&(e.clickable===!0||e.selected!==null)),v=$(()=>{const L=e.outline===!0&&e.color||e.textColor;return"q-chip row inline no-wrap items-center"+(e.outline===!1&&e.color!==void 0?` bg-${e.color}`:"")+(L?` text-${L} q-chip--colored`:"")+(e.disable===!0?" disabled":"")+(e.dense===!0?" q-chip--dense":"")+(e.outline===!0?" q-chip--outline":"")+(e.selected===!0?" q-chip--selected":"")+(g.value===!0?" q-chip--clickable cursor-pointer non-selectable q-hoverable":"")+(e.square===!0?" q-chip--square":"")+(l.value===!0?" q-chip--dark q-dark":"")}),C=$(()=>{const L=e.disable===!0?{tabindex:-1,"aria-disabled":"true"}:{tabindex:e.tabindex||0},F={...L,role:"button","aria-hidden":"false","aria-label":e.removeAriaLabel||a.lang.label.remove};return{chip:L,remove:F}});function M(L){L.keyCode===13&&_(L)}function _(L){e.disable||(r("update:selected",!e.selected),r("click",L))}function x(L){(L.keyCode===void 0||L.keyCode===13)&&(Rt(L),e.disable===!1&&(r("update:modelValue",!1),r("remove")))}function I(){const L=[];g.value===!0&&L.push(E("div",{class:"q-focus-helper"})),u.value===!0&&L.push(E(Yt,{class:"q-chip__icon q-chip__icon--left",name:d.value}));const F=e.label!==void 0?[E("div",{class:"ellipsis"},[e.label])]:void 0;return L.push(E("div",{class:"q-chip__content col row no-wrap items-center q-anchor--skip"},$b(t.default,F))),e.iconRight&&L.push(E(Yt,{class:"q-chip__icon q-chip__icon--right",name:e.iconRight})),e.removable===!0&&L.push(E(Yt,{class:"q-chip__icon q-chip__icon--remove cursor-pointer",name:f.value,...C.value.remove,onClick:x,onKeyup:x})),L}return()=>{if(e.modelValue===!1)return;const L={class:v.value,style:s.value};return g.value===!0&&Object.assign(L,C.value.chip,{onClick:_,onKeyup:M}),Zu("div",L,I(),"ripple",e.ripple!==!1&&e.disable!==!0,()=>[[Ju,e.ripple]])}}}),Mr=Je({name:"QList",props:{...or,bordered:Boolean,dense:Boolean,separator:Boolean,padding:Boolean,tag:{type:String,default:"div"}},setup(e,{slots:t}){const r=Dt(),a=sr(e,r.proxy.$q),l=$(()=>"q-list"+(e.bordered===!0?" q-list--bordered":"")+(e.dense===!0?" q-list--dense":"")+(e.separator===!0?" q-list--separator":"")+(a.value===!0?" q-list--dark":"")+(e.padding===!0?" q-list--padding":""));return()=>E(e.tag,{class:l.value},Mt(t.default))}});const vw=["horizontal","vertical","cell","none"];var pw=Je({name:"QMarkupTable",props:{...or,dense:Boolean,flat:Boolean,bordered:Boolean,square:Boolean,wrapCells:Boolean,separator:{type:String,default:"horizontal",validator:e=>vw.includes(e)}},setup(e,{slots:t}){const r=Dt(),a=sr(e,r.proxy.$q),l=$(()=>`q-markup-table q-table__container q-table__card q-table--${e.separator}-separator`+(a.value===!0?" q-table--dark q-table__card--dark q-dark":"")+(e.dense===!0?" q-table--dense":"")+(e.flat===!0?" q-table--flat":"")+(e.bordered===!0?" q-table--bordered":"")+(e.square===!0?" q-table--square":"")+(e.wrapCells===!1?" q-table--no-wrap":""));return()=>E("div",{class:l.value},[E("table",{class:"q-table"},Mt(t.default))])}});function yw(e,t){return E("div",e,[E("table",{class:"q-table"},t)])}let za=!1;{const e=document.createElement("div");e.setAttribute("dir","rtl"),Object.assign(e.style,{width:"1px",height:"1px",overflow:"auto"});const t=document.createElement("div");Object.assign(t.style,{width:"1000px",height:"1px"}),document.body.appendChild(e),e.appendChild(t),e.scrollLeft=-1e3,za=e.scrollLeft>=0,e.remove()}const Hn=1e3,_w=["start","center","end","start-force","center-force","end-force"],ng=Array.prototype.filter,bw=window.getComputedStyle(document.body).overflowAnchor===void 0?Xu:function(e,t){e!==null&&(e._qOverflowAnimationFrame!==void 0&&cancelAnimationFrame(e._qOverflowAnimationFrame),e._qOverflowAnimationFrame=requestAnimationFrame(()=>{if(e===null)return;e._qOverflowAnimationFrame=void 0;const r=e.children||[];ng.call(r,l=>l.dataset&&l.dataset.qVsAnchor!==void 0).forEach(l=>{delete l.dataset.qVsAnchor});const a=r[t];a&&a.dataset&&(a.dataset.qVsAnchor="")}))};function Zi(e,t){return e+t}function vu(e,t,r,a,l,s,u,d){const f=e===window?document.scrollingElement||document.documentElement:e,g=l===!0?"offsetWidth":"offsetHeight",v={scrollStart:0,scrollViewSize:-u-d,scrollMaxSize:0,offsetStart:-u,offsetEnd:-d};if(l===!0?(e===window?(v.scrollStart=window.pageXOffset||window.scrollX||document.body.scrollLeft||0,v.scrollViewSize+=document.documentElement.clientWidth):(v.scrollStart=f.scrollLeft,v.scrollViewSize+=f.clientWidth),v.scrollMaxSize=f.scrollWidth,s===!0&&(v.scrollStart=(za===!0?v.scrollMaxSize-v.scrollViewSize:0)-v.scrollStart)):(e===window?(v.scrollStart=window.pageYOffset||window.scrollY||document.body.scrollTop||0,v.scrollViewSize+=document.documentElement.clientHeight):(v.scrollStart=f.scrollTop,v.scrollViewSize+=f.clientHeight),v.scrollMaxSize=f.scrollHeight),r!==null)for(let C=r.previousElementSibling;C!==null;C=C.previousElementSibling)C.classList.contains("q-virtual-scroll--skip")===!1&&(v.offsetStart+=C[g]);if(a!==null)for(let C=a.nextElementSibling;C!==null;C=C.nextElementSibling)C.classList.contains("q-virtual-scroll--skip")===!1&&(v.offsetEnd+=C[g]);if(t!==e){const C=f.getBoundingClientRect(),M=t.getBoundingClientRect();l===!0?(v.offsetStart+=M.left-C.left,v.offsetEnd-=M.width):(v.offsetStart+=M.top-C.top,v.offsetEnd-=M.height),e!==window&&(v.offsetStart+=v.scrollStart),v.offsetEnd+=v.scrollMaxSize-v.offsetStart}return v}function fh(e,t,r,a){t==="end"&&(t=(e===window?document.body:e)[r===!0?"scrollWidth":"scrollHeight"]),e===window?r===!0?(a===!0&&(t=(za===!0?document.body.scrollWidth-document.documentElement.clientWidth:0)-t),window.scrollTo(t,window.pageYOffset||window.scrollY||document.body.scrollTop||0)):window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,t):r===!0?(a===!0&&(t=(za===!0?e.scrollWidth-e.offsetWidth:0)-t),e.scrollLeft=t):e.scrollTop=t}function qa(e,t,r,a){if(r>=a)return 0;const l=t.length,s=Math.floor(r/Hn),u=Math.floor((a-1)/Hn)+1;let d=e.slice(s,u).reduce(Zi,0);return r%Hn!==0&&(d-=t.slice(s*Hn,r).reduce(Zi,0)),a%Hn!==0&&a!==l&&(d-=t.slice(a,u*Hn).reduce(Zi,0)),d}const ww={virtualScrollSliceSize:{type:[Number,String],default:null},virtualScrollSliceRatioBefore:{type:[Number,String],default:1},virtualScrollSliceRatioAfter:{type:[Number,String],default:1},virtualScrollItemSize:{type:[Number,String],default:24},virtualScrollStickySizeStart:{type:[Number,String],default:0},virtualScrollStickySizeEnd:{type:[Number,String],default:0},tableColspan:[Number,String]},rg={virtualScrollHorizontal:Boolean,onVirtualScroll:Function,...ww};function ig({virtualScrollLength:e,getVirtualScrollTarget:t,getVirtualScrollEl:r,virtualScrollItemSizeComputed:a}){const l=Dt(),{props:s,emit:u,proxy:d}=l,{$q:f}=d;let g,v,C,M=[],_;const x=se(0),I=se(0),L=se({}),F=se(null),Y=se(null),D=se(null),A=se({from:0,to:0}),N=$(()=>s.tableColspan!==void 0?s.tableColspan:100);a===void 0&&(a=$(()=>s.virtualScrollItemSize));const J=$(()=>a.value+";"+s.virtualScrollHorizontal),V=$(()=>J.value+";"+s.virtualScrollSliceRatioBefore+";"+s.virtualScrollSliceRatioAfter);Ve(V,()=>{j()}),Ve(J,H);function H(){Be(v,!0)}function pe(Z){Be(Z===void 0?v:Z)}function _e(Z,he){const fe=t();if(fe==null||fe.nodeType===8)return;const Ge=vu(fe,r(),F.value,Y.value,s.virtualScrollHorizontal,f.lang.rtl,s.virtualScrollStickySizeStart,s.virtualScrollStickySizeEnd);C!==Ge.scrollViewSize&&j(Ge.scrollViewSize),lt(fe,Ge,Math.min(e.value-1,Math.max(0,parseInt(Z,10)||0)),0,_w.indexOf(he)>-1?he:v>-1&&Z>v?"end":"start")}function xe(){const Z=t();if(Z==null||Z.nodeType===8)return;const he=vu(Z,r(),F.value,Y.value,s.virtualScrollHorizontal,f.lang.rtl,s.virtualScrollStickySizeStart,s.virtualScrollStickySizeEnd),fe=e.value-1,Ge=he.scrollMaxSize-he.offsetStart-he.offsetEnd-I.value;if(g===he.scrollStart)return;if(he.scrollMaxSize<=0){lt(Z,he,0,0);return}C!==he.scrollViewSize&&j(he.scrollViewSize),te(A.value.from);const ze=Math.floor(he.scrollMaxSize-Math.max(he.scrollViewSize,he.offsetEnd)-Math.min(_[fe],he.scrollViewSize/2));if(ze>0&&Math.ceil(he.scrollStart)>=ze){lt(Z,he,fe,he.scrollMaxSize-he.offsetEnd-M.reduce(Zi,0));return}let we=0,Te=he.scrollStart-he.offsetStart,ft=Te;if(Te<=Ge&&Te+he.scrollViewSize>=x.value)Te-=x.value,we=A.value.from,ft=Te;else for(let ee=0;Te>=M[ee]&&we0&&we-he.scrollViewSize?(we++,ft=Te):ft=_[we]+Te;lt(Z,he,we,ft)}function lt(Z,he,fe,Ge,ze){const we=typeof ze=="string"&&ze.indexOf("-force")>-1,Te=we===!0?ze.replace("-force",""):ze,ft=Te!==void 0?Te:"start";let ee=Math.max(0,fe-L.value[ft]),wt=ee+L.value.total;wt>e.value&&(wt=e.value,ee=Math.max(0,wt-L.value.total)),g=he.scrollStart;const nn=ee!==A.value.from||wt!==A.value.to;if(nn===!1&&Te===void 0){me(fe);return}const{activeElement:un}=document,rn=D.value;nn===!0&&rn!==null&&rn!==un&&rn.contains(un)===!0&&(rn.addEventListener("focusout",Pe),setTimeout(()=>{rn!==null&&rn.removeEventListener("focusout",Pe)})),bw(rn,fe-ee);const qt=Te!==void 0?_.slice(ee,fe).reduce(Zi,0):0;if(nn===!0){const Kt=wt>=A.value.from&&ee<=A.value.to?A.value.to:wt;A.value={from:ee,to:Kt},x.value=qa(M,_,0,ee),I.value=qa(M,_,wt,e.value),requestAnimationFrame(()=>{A.value.to!==wt&&g===he.scrollStart&&(A.value={from:A.value.from,to:wt},I.value=qa(M,_,wt,e.value))})}requestAnimationFrame(()=>{if(g!==he.scrollStart)return;nn===!0&&te(ee);const Kt=_.slice(ee,fe).reduce(Zi,0),Xn=Kt+he.offsetStart+x.value,Gt=Xn+_[fe];let Fn=Xn+Ge;if(Te!==void 0){const $r=Kt-qt,St=he.scrollStart+$r;Fn=we!==!0&&Stee.classList&&ee.classList.contains("q-virtual-scroll--skip")===!1),Ge=fe.length,ze=s.virtualScrollHorizontal===!0?ee=>ee.getBoundingClientRect().width:ee=>ee.offsetHeight;let we=Z,Te,ft;for(let ee=0;ee=Ge;we--)_[we]=fe;const ze=Math.floor((e.value-1)/Hn);M=[];for(let we=0;we<=ze;we++){let Te=0;const ft=Math.min((we+1)*Hn,e.value);for(let ee=we*Hn;ee=0?(te(A.value.from),Sn(()=>{_e(Z)})):rt()}function j(Z){if(Z===void 0&&typeof window!="undefined"){const Te=t();Te!=null&&Te.nodeType!==8&&(Z=vu(Te,r(),F.value,Y.value,s.virtualScrollHorizontal,f.lang.rtl,s.virtualScrollStickySizeStart,s.virtualScrollStickySizeEnd).scrollViewSize)}C=Z;const he=parseFloat(s.virtualScrollSliceRatioBefore)||0,fe=parseFloat(s.virtualScrollSliceRatioAfter)||0,Ge=1+he+fe,ze=Z===void 0||Z<=0?1:Math.ceil(Z/a.value),we=Math.max(1,ze,Math.ceil((s.virtualScrollSliceSize>0?s.virtualScrollSliceSize:10)/Ge));L.value={total:Math.ceil(we*Ge),start:Math.ceil(we*he),center:Math.ceil(we*(.5+he)),end:Math.ceil(we*(1+he)),view:ze}}function G(Z,he){const fe=s.virtualScrollHorizontal===!0?"width":"height",Ge={["--q-virtual-scroll-item-"+fe]:a.value+"px"};return[Z==="tbody"?E(Z,{class:"q-virtual-scroll__padding",key:"before",ref:F},[E("tr",[E("td",{style:{[fe]:`${x.value}px`,...Ge},colspan:N.value})])]):E(Z,{class:"q-virtual-scroll__padding",key:"before",ref:F,style:{[fe]:`${x.value}px`,...Ge}}),E(Z,{class:"q-virtual-scroll__content",key:"content",ref:D,tabindex:-1},he.flat()),Z==="tbody"?E(Z,{class:"q-virtual-scroll__padding",key:"after",ref:Y},[E("tr",[E("td",{style:{[fe]:`${I.value}px`,...Ge},colspan:N.value})])]):E(Z,{class:"q-virtual-scroll__padding",key:"after",ref:Y,style:{[fe]:`${I.value}px`,...Ge}})]}function me(Z){v!==Z&&(s.onVirtualScroll!==void 0&&u("virtualScroll",{index:Z,from:A.value.from,to:A.value.to-1,direction:Z{j()});let X=!1;return oa(()=>{X=!0}),sa(()=>{if(X!==!0)return;const Z=t();g!==void 0&&Z!==void 0&&Z!==null&&Z.nodeType!==8?fh(Z,g,s.virtualScrollHorizontal,f.lang.rtl):_e(v)}),Ht(()=>{rt.cancel()}),Object.assign(d,{scrollTo:_e,reset:H,refresh:pe}),{virtualScrollSliceRange:A,virtualScrollSliceSizeComputed:L,setVirtualScrollSize:j,onVirtualScrollEvt:rt,localResetVirtualScroll:Be,padVirtualScroll:G,scrollTo:_e,reset:H,refresh:pe}}const Sw={list:Mr,table:pw},kw=["list","table","__qtable"];var lc=Je({name:"QVirtualScroll",props:{...rg,type:{type:String,default:"list",validator:e=>kw.includes(e)},items:{type:Array,default:()=>[]},itemsFn:Function,itemsSize:Number,scrollTarget:{default:void 0}},setup(e,{slots:t,attrs:r}){let a;const l=se(null),s=$(()=>e.itemsSize>=0&&e.itemsFn!==void 0?parseInt(e.itemsSize,10):Array.isArray(e.items)?e.items.length:0),{virtualScrollSliceRange:u,localResetVirtualScroll:d,padVirtualScroll:f,onVirtualScrollEvt:g}=ig({virtualScrollLength:s,getVirtualScrollTarget:x,getVirtualScrollEl:_}),v=$(()=>{if(s.value===0)return[];const Y=(D,A)=>({index:u.value.from+A,item:D});return e.itemsFn===void 0?e.items.slice(u.value.from,u.value.to).map(Y):e.itemsFn(u.value.from,u.value.to-u.value.from).map(Y)}),C=$(()=>"q-virtual-scroll q-virtual-scroll"+(e.virtualScrollHorizontal===!0?"--horizontal":"--vertical")+(e.scrollTarget!==void 0?"":" scroll")),M=$(()=>e.scrollTarget!==void 0?{}:{tabindex:0});Ve(s,()=>{d()}),Ve(()=>e.scrollTarget,()=>{L(),I()});function _(){return l.value.$el||l.value}function x(){return a}function I(){a=xo(_(),e.scrollTarget),a.addEventListener("scroll",g,ta.passive)}function L(){a!==void 0&&(a.removeEventListener("scroll",g,ta.passive),a=void 0)}function F(){let Y=f(e.type==="list"?"div":"tbody",v.value.map(t.default));return t.before!==void 0&&(Y=t.before().concat(Y)),Si(t.after,Y)}return tc(()=>{d()}),ni(()=>{I()}),sa(()=>{I()}),oa(()=>{L()}),Ht(()=>{L()}),()=>{if(t.default===void 0){console.error("QVirtualScroll: default scoped slot is required for rendering");return}return e.type==="__qtable"?yw({ref:l,class:"q-table__middle "+C.value},F()):E(Sw[e.type],{...r,ref:l,class:[r.class,C.value],...M.value},F)}}});const Cw=[E("circle",{cx:"15",cy:"15",r:"15"},[E("animate",{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}),E("animate",{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"})]),E("circle",{cx:"60",cy:"15",r:"9","fill-opacity":".3"},[E("animate",{attributeName:"r",from:"9",to:"9",begin:"0s",dur:"0.8s",values:"9;15;9",calcMode:"linear",repeatCount:"indefinite"}),E("animate",{attributeName:"fill-opacity",from:".5",to:".5",begin:"0s",dur:"0.8s",values:".5;1;.5",calcMode:"linear",repeatCount:"indefinite"})]),E("circle",{cx:"105",cy:"15",r:"15"},[E("animate",{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}),E("animate",{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"})])];var $u=Je({name:"QSpinnerDots",props:Ob,setup(e){const{cSize:t,classes:r}=Rb(e);return()=>E("svg",{class:r.value,fill:"currentColor",width:t.value,height:t.value,viewBox:"0 0 120 30",xmlns:"http://www.w3.org/2000/svg"},Cw)}});const Tw={ratio:[String,Number]};function Mw(e,t){return $(()=>{const r=Number(e.ratio||(t!==void 0?t.value:void 0));return isNaN(r)!==!0&&r>0?{paddingBottom:`${100/r}%`}:null})}const Dw=16/9;var oc=Je({name:"QImg",props:{...Tw,src:String,srcset:String,sizes:String,alt:String,crossorigin:String,decoding:String,referrerpolicy:String,draggable:Boolean,loading:{type:String,default:"lazy"},fetchpriority:{type:String,default:"auto"},width:String,height:String,initialRatio:{type:[Number,String],default:Dw},placeholderSrc:String,fit:{type:String,default:"cover"},position:{type:String,default:"50% 50%"},imgClass:String,imgStyle:Object,noSpinner:Boolean,noNativeMenu:Boolean,noTransition:Boolean,spinnerColor:String,spinnerSize:String},emits:["load","error"],setup(e,{slots:t,emit:r}){const a=se(e.initialRatio),l=Mw(e,a);let s=null,u=!1;const d=[se(null),se(L())],f=se(0),g=se(!1),v=se(!1),C=$(()=>`q-img q-img--${e.noNativeMenu===!0?"no-":""}menu`),M=$(()=>({width:e.width,height:e.height})),_=$(()=>`q-img__image ${e.imgClass!==void 0?e.imgClass+" ":""}q-img__image--with${e.noTransition===!0?"out":""}-transition`),x=$(()=>({...e.imgStyle,objectFit:e.fit,objectPosition:e.position}));Ve(()=>I(),F);function I(){return e.src||e.srcset||e.sizes?{src:e.src,srcset:e.srcset,sizes:e.sizes}:null}function L(){return e.placeholderSrc!==void 0?{src:e.placeholderSrc}:null}function F(H){s!==null&&(clearTimeout(s),s=null),v.value=!1,H===null?(g.value=!1,d[f.value^1].value=L()):g.value=!0,d[f.value].value=H}function Y({target:H}){u!==!0&&(s!==null&&(clearTimeout(s),s=null),a.value=H.naturalHeight===0?.5:H.naturalWidth/H.naturalHeight,D(H,1))}function D(H,pe){u===!0||pe===1e3||(H.complete===!0?A(H):s=setTimeout(()=>{s=null,D(H,pe+1)},50))}function A(H){u!==!0&&(f.value=f.value^1,d[f.value].value=null,g.value=!1,v.value=!1,r("load",H.currentSrc||H.src))}function N(H){s!==null&&(clearTimeout(s),s=null),g.value=!1,v.value=!0,d[f.value].value=null,d[f.value^1].value=L(),r("error",H)}function J(H){const pe=d[H].value,_e={key:"img_"+H,class:_.value,style:x.value,crossorigin:e.crossorigin,decoding:e.decoding,referrerpolicy:e.referrerpolicy,height:e.height,width:e.width,loading:e.loading,fetchpriority:e.fetchpriority,"aria-hidden":"true",draggable:e.draggable,...pe};return f.value===H?(_e.class+=" q-img__image--waiting",Object.assign(_e,{onLoad:Y,onError:N})):_e.class+=" q-img__image--loaded",E("div",{class:"q-img__container absolute-full",key:"img"+H},E("img",_e))}function V(){return g.value!==!0?E("div",{key:"content",class:"q-img__content absolute-full q-anchor--skip"},Mt(t[v.value===!0?"error":"default"])):E("div",{key:"loading",class:"q-img__loading absolute-full flex flex-center"},t.loading!==void 0?t.loading():e.noSpinner===!0?void 0:[E(Rh,{color:e.spinnerColor,size:e.spinnerSize})])}return F(I()),Ht(()=>{u=!0,s!==null&&(clearTimeout(s),s=null)}),()=>{const H=[];return l.value!==null&&H.push(E("div",{key:"filler",style:l.value})),v.value!==!0&&(d[0].value!==null&&H.push(J(0)),d[1].value!==null&&H.push(J(1))),H.push(E(Ga,{name:"q-transition--fade"},V)),E("div",{class:C.value,style:M.value,role:"img","aria-label":e.alt},H)}}}),qw=Je({name:"QBanner",props:{...or,inlineActions:Boolean,dense:Boolean,rounded:Boolean},setup(e,{slots:t}){const{proxy:{$q:r}}=Dt(),a=sr(e,r),l=$(()=>"q-banner row items-center"+(e.dense===!0?" q-banner--dense":"")+(a.value===!0?" q-banner--dark q-dark":"")+(e.rounded===!0?" rounded-borders":"")),s=$(()=>`q-banner__actions row items-center justify-end col-${e.inlineActions===!0?"auto":"all"}`);return()=>{const u=[E("div",{class:"q-banner__avatar col-auto row items-center self-start"},Mt(t.avatar)),E("div",{class:"q-banner__content col text-body2"},Mt(t.default))],d=Mt(t.action);return d!==void 0&&u.push(E("div",{class:s.value},d)),E("div",{class:l.value+(e.inlineActions===!1&&d!==void 0?" q-banner--top-padding":""),role:"alert"},u)}}}),Ie=Je({name:"QItemSection",props:{avatar:Boolean,thumbnail:Boolean,side:Boolean,top:Boolean,noWrap:Boolean},setup(e,{slots:t}){const r=$(()=>`q-item__section column q-item__section--${e.avatar===!0||e.side===!0||e.thumbnail===!0?"side":"main"}`+(e.top===!0?" q-item__section--top justify-start":" justify-center")+(e.avatar===!0?" q-item__section--avatar":"")+(e.thumbnail===!0?" q-item__section--thumbnail":"")+(e.noWrap===!0?" q-item__section--nowrap":""));return()=>E("div",{class:r.value},Mt(t.default))}}),Ke=Je({name:"QItemLabel",props:{overline:Boolean,caption:Boolean,header:Boolean,lines:[Number,String]},setup(e,{slots:t}){const r=$(()=>parseInt(e.lines,10)),a=$(()=>"q-item__label"+(e.overline===!0?" q-item__label--overline text-overline":"")+(e.caption===!0?" q-item__label--caption text-caption":"")+(e.header===!0?" q-item__label--header":"")+(r.value===1?" ellipsis":"")),l=$(()=>e.lines!==void 0&&r.value>1?{overflow:"hidden",display:"-webkit-box","-webkit-box-orient":"vertical","-webkit-line-clamp":r.value}:null);return()=>E("div",{style:l.value,class:a.value},Mt(t.default))}}),Vt=Je({name:"QItem",props:{...or,...Ao,tag:{type:String,default:"div"},active:{type:Boolean,default:null},clickable:Boolean,dense:Boolean,insetLevel:Number,tabindex:[String,Number],focused:Boolean,manualFocus:Boolean},emits:["click","keyup"],setup(e,{slots:t,emit:r}){const{proxy:{$q:a}}=Dt(),l=sr(e,a),{hasLink:s,linkAttrs:u,linkClass:d,linkTag:f,navigateOnClick:g}=Lh(),v=se(null),C=se(null),M=$(()=>e.clickable===!0||s.value===!0||e.tag==="label"),_=$(()=>e.disable!==!0&&M.value===!0),x=$(()=>"q-item q-item-type row no-wrap"+(e.dense===!0?" q-item--dense":"")+(l.value===!0?" q-item--dark":"")+(s.value===!0&&e.active===null?d.value:e.active===!0?` q-item--active${e.activeClass!==void 0?` ${e.activeClass}`:""}`:"")+(e.disable===!0?" disabled":"")+(_.value===!0?" q-item--clickable q-link cursor-pointer "+(e.manualFocus===!0?"q-manual-focusable":"q-focusable q-hoverable")+(e.focused===!0?" q-manual-focusable--focused":""):"")),I=$(()=>{if(e.insetLevel===void 0)return null;const D=a.lang.rtl===!0?"Right":"Left";return{["padding"+D]:16+e.insetLevel*56+"px"}});function L(D){_.value===!0&&(C.value!==null&&(D.qKeyEvent!==!0&&document.activeElement===v.value?C.value.focus():document.activeElement===C.value&&v.value.focus()),g(D))}function F(D){if(_.value===!0&&Ka(D,13)===!0){Rt(D),D.qKeyEvent=!0;const A=new MouseEvent("click",D);A.qKeyEvent=!0,v.value.dispatchEvent(A)}r("keyup",D)}function Y(){const D=Nh(t.default,[]);return _.value===!0&&D.unshift(E("div",{class:"q-focus-helper",tabindex:-1,ref:C})),D}return()=>{const D={ref:v,class:x.value,style:I.value,role:"listitem",onClick:L,onKeyup:F};return _.value===!0?(D.tabindex=e.tabindex||"0",Object.assign(D,u.value)):M.value===!0&&(D["aria-disabled"]="true"),E(f.value,D,Y())}}}),Pw=Je({name:"QBtnGroup",props:{unelevated:Boolean,outline:Boolean,flat:Boolean,rounded:Boolean,square:Boolean,push:Boolean,stretch:Boolean,glossy:Boolean,spread:Boolean},setup(e,{slots:t}){const r=$(()=>{const a=["unelevated","outline","flat","rounded","square","push","stretch","glossy"].filter(l=>e[l]===!0).map(l=>`q-btn-group--${l}`).join(" ");return`q-btn-group row no-wrap${a.length!==0?" "+a:""}`+(e.spread===!0?" q-btn-group--spread":" inline")});return()=>E("div",{class:r.value},Mt(t.default))}}),ag=Je({name:"QMenu",inheritAttrs:!1,props:{...Zh,...Ku,...or,...Gu,persistent:Boolean,autoClose:Boolean,separateClosePopup:Boolean,noRouteDismiss:Boolean,noRefocus:Boolean,noFocus:Boolean,fit:Boolean,cover:Boolean,square:Boolean,anchor:{type:String,validator:yo},self:{type:String,validator:yo},offset:{type:Array,validator:tg},scrollTarget:{default:void 0},touchPosition:Boolean,maxHeight:{type:String,default:null},maxWidth:{type:String,default:null}},emits:[...Qu,"click","escapeKey"],setup(e,{slots:t,emit:r,attrs:a}){let l=null,s,u,d;const f=Dt(),{proxy:g}=f,{$q:v}=g,C=se(null),M=se(!1),_=$(()=>e.persistent!==!0&&e.noRouteDismiss!==!0),x=sr(e,v),{registerTick:I,removeTick:L}=Ra(),{registerTimeout:F}=co(),{transitionProps:Y,transitionStyle:D}=$h(e),{localScrollTarget:A,changeScrollEvent:N,unconfigureScrollTarget:J}=Xh(e,fe),{anchorEl:V,canShow:H}=Jh({showing:M}),{hide:pe}=ju({showing:M,canShow:H,handleShow:X,handleHide:Z,hideOnRouteChange:_,processOnMount:!0}),{showPortal:_e,hidePortal:xe,renderPortal:lt}=Oh(f,C,ft,"menu"),te={anchorEl:V,innerRef:C,onClickOutside(ee){if(e.persistent!==!0&&M.value===!0)return pe(ee),(ee.type==="touchstart"||ee.target.classList.contains("q-dialog__backdrop"))&&Rt(ee),!0}},Pe=$(()=>_o(e.anchor||(e.cover===!0?"center middle":"bottom start"),v.lang.rtl)),Be=$(()=>e.cover===!0?Pe.value:_o(e.self||"top start",v.lang.rtl)),j=$(()=>(e.square===!0?" q-menu--square":"")+(x.value===!0?" q-menu--dark q-dark":"")),G=$(()=>e.autoClose===!0?{onClick:Ge}:{}),me=$(()=>M.value===!0&&e.persistent!==!0);Ve(me,ee=>{ee===!0?(Nb(we),eg(te)):(ah(we),po(te))});function rt(){Uh(()=>{let ee=C.value;ee&&ee.contains(document.activeElement)!==!0&&(ee=ee.querySelector("[autofocus][tabindex], [data-autofocus][tabindex]")||ee.querySelector("[autofocus] [tabindex], [data-autofocus] [tabindex]")||ee.querySelector("[autofocus], [data-autofocus]")||ee,ee.focus({preventScroll:!0}))})}function X(ee){if(l=e.noRefocus===!1?document.activeElement:null,Bh(ze),_e(),fe(),s=void 0,ee!==void 0&&(e.touchPosition||e.contextMenu)){const wt=na(ee);if(wt.left!==void 0){const{top:nn,left:un}=V.value.getBoundingClientRect();s={left:wt.left-un,top:wt.top-nn}}}u===void 0&&(u=Ve(()=>v.screen.width+"|"+v.screen.height+"|"+e.self+"|"+e.anchor+"|"+v.lang.rtl,Te)),e.noFocus!==!0&&document.activeElement.blur(),I(()=>{Te(),e.noFocus!==!0&&rt()}),F(()=>{v.platform.is.ios===!0&&(d=e.autoClose,C.value.click()),Te(),_e(!0),r("show",ee)},e.transitionDuration)}function Z(ee){L(),xe(),he(!0),l!==null&&(ee===void 0||ee.qClickOutside!==!0)&&(((ee&&ee.type.indexOf("key")===0?l.closest('[tabindex]:not([tabindex^="-"])'):void 0)||l).focus(),l=null),F(()=>{xe(!0),r("hide",ee)},e.transitionDuration)}function he(ee){s=void 0,u!==void 0&&(u(),u=void 0),(ee===!0||M.value===!0)&&(Fh(ze),J(),po(te),ah(we)),ee!==!0&&(l=null)}function fe(){(V.value!==null||e.scrollTarget!==void 0)&&(A.value=xo(V.value,e.scrollTarget),N(A.value,Te))}function Ge(ee){d!==!0?(Lb(g,ee),r("click",ee)):d=!1}function ze(ee){me.value===!0&&e.noFocus!==!0&&Bb(C.value,ee.target)!==!0&&rt()}function we(ee){r("escapeKey"),pe(ee)}function Te(){ac({targetEl:C.value,offset:e.offset,anchorEl:V.value,anchorOrigin:Pe.value,selfOrigin:Be.value,absoluteOffset:s,fit:e.fit,cover:e.cover,maxHeight:e.maxHeight,maxWidth:e.maxWidth})}function ft(){return E(Ga,Y.value,()=>M.value===!0?E("div",{role:"menu",...a,ref:C,tabindex:-1,class:["q-menu q-position-engine scroll"+j.value,a.class],style:[a.style,D.value],...G.value},Mt(t.default)):null)}return Ht(he),Object.assign(g,{focus:rt,updatePosition:Te}),lt}});const xw=Object.keys(zh),Aw=e=>xw.reduce((t,r)=>{const a=e[r];return a!==void 0&&(t[r]=a),t},{});var lg=Je({name:"QBtnDropdown",props:{...zh,...Gu,modelValue:Boolean,split:Boolean,dropdownIcon:String,contentClass:[Array,String,Object],contentStyle:[Array,String,Object],cover:Boolean,persistent:Boolean,noRouteDismiss:Boolean,autoClose:Boolean,menuAnchor:{type:String,default:"bottom end"},menuSelf:{type:String,default:"top end"},menuOffset:Array,disableMainBtn:Boolean,disableDropdown:Boolean,noIconAnimation:Boolean,toggleAriaLabel:String},emits:["update:modelValue","click","beforeShow","show","beforeHide","hide"],setup(e,{slots:t,emit:r}){const{proxy:a}=Dt(),l=se(e.modelValue),s=se(null),u=fo(),d=$(()=>{const A={"aria-expanded":l.value===!0?"true":"false","aria-haspopup":"true","aria-controls":u,"aria-label":e.toggleAriaLabel||a.$q.lang.label[l.value===!0?"collapse":"expand"](e.label)};return(e.disable===!0||e.split===!1&&e.disableMainBtn===!0||e.disableDropdown===!0)&&(A["aria-disabled"]="true"),A}),f=$(()=>"q-btn-dropdown__arrow"+(l.value===!0&&e.noIconAnimation===!1?" rotate-180":"")+(e.split===!1?" q-btn-dropdown__arrow-container":"")),g=$(()=>Fb(e)),v=$(()=>Aw(e));Ve(()=>e.modelValue,A=>{s.value!==null&&s.value[A?"show":"hide"]()}),Ve(()=>e.split,D);function C(A){l.value=!0,r("beforeShow",A)}function M(A){r("show",A),r("update:modelValue",!0)}function _(A){l.value=!1,r("beforeHide",A)}function x(A){r("hide",A),r("update:modelValue",!1)}function I(A){r("click",A)}function L(A){ir(A),D(),r("click",A)}function F(A){s.value!==null&&s.value.toggle(A)}function Y(A){s.value!==null&&s.value.show(A)}function D(A){s.value!==null&&s.value.hide(A)}return Object.assign(a,{show:Y,hide:D,toggle:F}),ni(()=>{e.modelValue===!0&&Y()}),()=>{const A=[E(Yt,{class:f.value,name:e.dropdownIcon||a.$q.iconSet.arrow.dropdown})];return e.disableDropdown!==!0&&A.push(E(ag,{ref:s,id:u,class:e.contentClass,style:e.contentStyle,cover:e.cover,fit:!0,persistent:e.persistent,noRouteDismiss:e.noRouteDismiss,autoClose:e.autoClose,anchor:e.menuAnchor,self:e.menuSelf,offset:e.menuOffset,separateClosePopup:!0,transitionShow:e.transitionShow,transitionHide:e.transitionHide,transitionDuration:e.transitionDuration,onBeforeShow:C,onShow:M,onBeforeHide:_,onHide:x},t.default)),e.split===!1?E(ye,{class:"q-btn-dropdown q-btn-dropdown--simple",...v.value,...d.value,disable:e.disable===!0||e.disableMainBtn===!0,noWrap:!0,round:!1,onClick:I},{default:()=>Mt(t.label,[]).concat(A),loading:t.loading}):E(Pw,{class:"q-btn-dropdown q-btn-dropdown--split no-wrap q-btn-item",rounded:e.rounded,square:e.square,...g.value,glossy:e.glossy,stretch:e.stretch},()=>[E(ye,{class:"q-btn-dropdown--current",...v.value,disable:e.disable===!0||e.disableMainBtn===!0,noWrap:!0,round:!1,onClick:L},{default:t.label,loading:t.loading}),E(ye,{class:"q-btn-dropdown__arrow-container q-anchor--skip",...d.value,...g.value,disable:e.disable===!0||e.disableDropdown===!0,rounded:e.rounded,color:e.color,textColor:e.textColor,dense:e.dense,size:e.size,padding:e.padding,ripple:e.ripple},()=>A)])}}}),Sr=Je({name:"QBreadcrumbsEl",props:{...Ao,label:String,icon:String,tag:{type:String,default:"span"}},emits:["click"],setup(e,{slots:t}){const{linkTag:r,linkAttrs:a,linkClass:l,navigateOnClick:s}=Lh(),u=$(()=>({class:"q-breadcrumbs__el q-link flex inline items-center relative-position "+(e.disable!==!0?"q-link--focusable"+l.value:"q-breadcrumbs__el--disable"),...a.value,onClick:s})),d=$(()=>"q-breadcrumbs__el-icon"+(e.label!==void 0?" q-breadcrumbs__el-icon--with-label":""));return()=>{const f=[];return e.icon!==void 0&&f.push(E(Yt,{class:d.value,name:e.icon})),e.label!==void 0&&f.push(e.label),E(r.value,{...u.value},Si(t.default,f))}}});const Ew=["",!0];var Iw=Je({name:"QBreadcrumbs",props:{...Ub,separator:{type:String,default:"/"},separatorColor:String,activeColor:{type:String,default:"primary"},gutter:{type:String,validator:e=>["none","xs","sm","md","lg","xl"].includes(e),default:"sm"}},setup(e,{slots:t}){const r=zb(e),a=$(()=>`flex items-center ${r.value}${e.gutter==="none"?"":` q-gutter-${e.gutter}`}`),l=$(()=>e.separatorColor?` text-${e.separatorColor}`:""),s=$(()=>` text-${e.activeColor}`);return()=>{const u=nc(Mt(t.default));if(u.length===0)return;let d=1;const f=[],g=u.filter(C=>C.type!==void 0&&C.type.name==="QBreadcrumbsEl").length,v=t.separator!==void 0?t.separator:()=>e.separator;return u.forEach(C=>{if(C.type!==void 0&&C.type.name==="QBreadcrumbsEl"){const M=d{const d=(a.header.space===!0?a.header.size:0)+(a.footer.space===!0?a.footer.size:0);if(typeof e.styleFn=="function"){const f=a.isContainer.value===!0?a.containerHeight.value:r.screen.height;return e.styleFn(d,f)}return{minHeight:a.isContainer.value===!0?a.containerHeight.value-d+"px":r.screen.height===0?d!==0?`calc(100vh - ${d}px)`:"100vh":r.screen.height-d+"px"}}),u=$(()=>`q-page${e.padding===!0?" q-layout-padding":""}`);return()=>E("main",{class:u.value,style:s.value},Mt(t.default))}});const Ow=E("div",{class:"q-space"});var Rw=Je({name:"QSpace",setup(){return()=>Ow}});function hh(e){if(e===!1)return 0;if(e===!0||e===void 0)return 1;const t=parseInt(e,10);return isNaN(t)?0:t}var Gi=rc({name:"close-popup",beforeMount(e,{value:t}){const r={depth:hh(t),handler(a){r.depth!==0&&setTimeout(()=>{const l=Wb(e);l!==void 0&&Hb(l,a,r.depth)})},handlerKey(a){Ka(a,13)===!0&&r.handler(a)}};e.__qclosepopup=r,e.addEventListener("click",r.handler),e.addEventListener("keyup",r.handlerKey)},updated(e,{value:t,oldValue:r}){t!==r&&(e.__qclosepopup.depth=hh(t))},beforeUnmount(e){const t=e.__qclosepopup;e.removeEventListener("click",t.handler),e.removeEventListener("keyup",t.handlerKey),delete e.__qclosepopup}});function Lw(){return ho(Kb)}var Pa=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},Nw=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},og={},Tn={};let sc;const Bw=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];Tn.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return t*4+17};Tn.getSymbolTotalCodewords=function(t){return Bw[t]};Tn.getBCHDigit=function(e){let t=0;for(;e!==0;)t++,e>>>=1;return t};Tn.setToSJISFunction=function(t){if(typeof t!="function")throw new Error('"toSJISFunc" is not a valid function.');sc=t};Tn.isKanjiModeEnabled=function(){return typeof sc!="undefined"};Tn.toSJIS=function(t){return sc(t)};var Eo={};(function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(r){if(typeof r!="string")throw new Error("Param is not a string");switch(r.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+r)}}e.isValid=function(a){return a&&typeof a.bit!="undefined"&&a.bit>=0&&a.bit<4},e.from=function(a,l){if(e.isValid(a))return a;try{return t(a)}catch{return l}}})(Eo);function sg(){this.buffer=[],this.length=0}sg.prototype={get:function(e){const t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)===1},put:function(e,t){for(let r=0;r>>t-r-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}};var Fw=sg;function ja(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}ja.prototype.set=function(e,t,r,a){const l=e*this.size+t;this.data[l]=r,a&&(this.reservedBit[l]=!0)};ja.prototype.get=function(e,t){return this.data[e*this.size+t]};ja.prototype.xor=function(e,t,r){this.data[e*this.size+t]^=r};ja.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]};var Uw=ja,ug={};(function(e){const t=Tn.getSymbolSize;e.getRowColCoords=function(a){if(a===1)return[];const l=Math.floor(a/7)+2,s=t(a),u=s===145?26:Math.ceil((s-13)/(2*l-2))*2,d=[s-7];for(let f=1;f=0&&l<=7},e.from=function(l){return e.isValid(l)?parseInt(l,10):void 0},e.getPenaltyN1=function(l){const s=l.size;let u=0,d=0,f=0,g=null,v=null;for(let C=0;C=5&&(u+=t.N1+(d-5)),g=_,d=1),_=l.get(M,C),_===v?f++:(f>=5&&(u+=t.N1+(f-5)),v=_,f=1)}d>=5&&(u+=t.N1+(d-5)),f>=5&&(u+=t.N1+(f-5))}return u},e.getPenaltyN2=function(l){const s=l.size;let u=0;for(let d=0;d=10&&(d===1488||d===93)&&u++,f=f<<1&2047|l.get(v,g),v>=10&&(f===1488||f===93)&&u++}return u*t.N3},e.getPenaltyN4=function(l){let s=0;const u=l.data.length;for(let f=0;f=0;){const u=s[0];for(let f=0;f0){const s=new Uint8Array(this.degree);return s.set(a,l),s}return a};var Vw=uc,gg={},ri={},cc={};cc.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40};var ur={};const mg="[0-9]+",Yw="[A-Z $%*+\\-./:]+";let Va="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";Va=Va.replace(/u/g,"\\u");const Ww="(?:(?![A-Z0-9 $%*+\\-./:]|"+Va+`)(?:.|[\r -]))+`;ur.KANJI=new RegExp(Va,"g");ur.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");ur.BYTE=new RegExp(Ww,"g");ur.NUMERIC=new RegExp(mg,"g");ur.ALPHANUMERIC=new RegExp(Yw,"g");const Hw=new RegExp("^"+Va+"$"),Kw=new RegExp("^"+mg+"$"),Gw=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");ur.testKanji=function(t){return Hw.test(t)};ur.testNumeric=function(t){return Kw.test(t)};ur.testAlphanumeric=function(t){return Gw.test(t)};(function(e){const t=cc,r=ur;e.NUMERIC={id:"Numeric",bit:1<<0,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:1<<1,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:1<<2,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:1<<3,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(s,u){if(!s.ccBits)throw new Error("Invalid mode: "+s);if(!t.isValid(u))throw new Error("Invalid version: "+u);return u>=1&&u<10?s.ccBits[0]:u<27?s.ccBits[1]:s.ccBits[2]},e.getBestModeForData=function(s){return r.testNumeric(s)?e.NUMERIC:r.testAlphanumeric(s)?e.ALPHANUMERIC:r.testKanji(s)?e.KANJI:e.BYTE},e.toString=function(s){if(s&&s.id)return s.id;throw new Error("Invalid mode")},e.isValid=function(s){return s&&s.bit&&s.ccBits};function a(l){if(typeof l!="string")throw new Error("Param is not a string");switch(l.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+l)}}e.from=function(s,u){if(e.isValid(s))return s;try{return a(s)}catch{return u}}})(ri);(function(e){const t=Tn,r=Io,a=Eo,l=ri,s=cc,u=1<<12|1<<11|1<<10|1<<9|1<<8|1<<5|1<<2|1<<0,d=t.getBCHDigit(u);function f(M,_,x){for(let I=1;I<=40;I++)if(_<=e.getCapacity(I,x,M))return I}function g(M,_){return l.getCharCountIndicator(M,_)+4}function v(M,_){let x=0;return M.forEach(function(I){x+=g(I.mode,_)+I.getBitsLength()}),x}function C(M,_){for(let x=1;x<=40;x++)if(v(M,x)<=e.getCapacity(x,_,l.MIXED))return x}e.from=function(_,x){return s.isValid(_)?parseInt(_,10):x},e.getCapacity=function(_,x,I){if(!s.isValid(_))throw new Error("Invalid QR Code version");typeof I=="undefined"&&(I=l.BYTE);const L=t.getSymbolTotalCodewords(_),F=r.getTotalCodewordsCount(_,x),Y=(L-F)*8;if(I===l.MIXED)return Y;const D=Y-g(I,_);switch(I){case l.NUMERIC:return Math.floor(D/10*3);case l.ALPHANUMERIC:return Math.floor(D/11*2);case l.KANJI:return Math.floor(D/13);case l.BYTE:default:return Math.floor(D/8)}},e.getBestVersionForData=function(_,x){let I;const L=a.from(x,a.M);if(Array.isArray(_)){if(_.length>1)return C(_,L);if(_.length===0)return 1;I=_[0]}else I=_;return f(I.mode,I.getLength(),L)},e.getEncodedBits=function(_){if(!s.isValid(_)||_<7)throw new Error("Invalid QR Code version");let x=_<<12;for(;t.getBCHDigit(x)-d>=0;)x^=u<=0;)l^=pg<0&&(a=this.data.substr(r),l=parseInt(a,10),t.put(l,s*3+1))};var Zw=ra;const Jw=ri,pu=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function ia(e){this.mode=Jw.ALPHANUMERIC,this.data=e}ia.getBitsLength=function(t){return 11*Math.floor(t/2)+6*(t%2)};ia.prototype.getLength=function(){return this.data.length};ia.prototype.getBitsLength=function(){return ia.getBitsLength(this.data.length)};ia.prototype.write=function(t){let r;for(r=0;r+2<=this.data.length;r+=2){let a=pu.indexOf(this.data[r])*45;a+=pu.indexOf(this.data[r+1]),t.put(a,11)}this.data.length%2&&t.put(pu.indexOf(this.data[r]),6)};var Xw=ia,eS=function(t){for(var r=[],a=t.length,l=0;l=55296&&s<=56319&&a>l+1){var u=t.charCodeAt(l+1);u>=56320&&u<=57343&&(s=(s-55296)*1024+u-56320+65536,l+=1)}if(s<128){r.push(s);continue}if(s<2048){r.push(s>>6|192),r.push(s&63|128);continue}if(s<55296||s>=57344&&s<65536){r.push(s>>12|224),r.push(s>>6&63|128),r.push(s&63|128);continue}if(s>=65536&&s<=1114111){r.push(s>>18|240),r.push(s>>12&63|128),r.push(s>>6&63|128),r.push(s&63|128);continue}r.push(239,191,189)}return new Uint8Array(r).buffer};const tS=eS,nS=ri;function aa(e){this.mode=nS.BYTE,typeof e=="string"&&(e=tS(e)),this.data=new Uint8Array(e)}aa.getBitsLength=function(t){return t*8};aa.prototype.getLength=function(){return this.data.length};aa.prototype.getBitsLength=function(){return aa.getBitsLength(this.data.length)};aa.prototype.write=function(e){for(let t=0,r=this.data.length;t=33088&&r<=40956)r-=33088;else if(r>=57408&&r<=60351)r-=49472;else throw new Error("Invalid SJIS character: "+this.data[t]+` -Make sure your charset is UTF-8`);r=(r>>>8&255)*192+(r&255),e.put(r,13)}};var lS=la,_g={exports:{}};(function(e){var t={single_source_shortest_paths:function(r,a,l){var s={},u={};u[a]=0;var d=t.PriorityQueue.make();d.push(a,0);for(var f,g,v,C,M,_,x,I,L;!d.empty();){f=d.pop(),g=f.value,C=f.cost,M=r[g]||{};for(v in M)M.hasOwnProperty(v)&&(_=M[v],x=C+_,I=u[v],L=typeof u[v]=="undefined",(L||I>x)&&(u[v]=x,d.push(v,x),s[v]=g))}if(typeof l!="undefined"&&typeof u[l]=="undefined"){var F=["Could not find a path from ",a," to ",l,"."].join("");throw new Error(F)}return s},extract_shortest_path_from_predecessor_list:function(r,a){for(var l=[],s=a;s;)l.push(s),r[s],s=r[s];return l.reverse(),l},find_path:function(r,a,l){var s=t.single_source_shortest_paths(r,a,l);return t.extract_shortest_path_from_predecessor_list(s,l)},PriorityQueue:{make:function(r){var a=t.PriorityQueue,l={},s;r=r||{};for(s in a)a.hasOwnProperty(s)&&(l[s]=a[s]);return l.queue=[],l.sorter=r.sorter||a.default_sorter,l},default_sorter:function(r,a){return r.cost-a.cost},push:function(r,a){var l={value:r,cost:a};this.queue.push(l),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};e.exports=t})(_g);(function(e){const t=ri,r=Zw,a=Xw,l=rS,s=lS,u=ur,d=Tn,f=_g.exports;function g(F){return unescape(encodeURIComponent(F)).length}function v(F,Y,D){const A=[];let N;for(;(N=F.exec(D))!==null;)A.push({data:N[0],index:N.index,mode:Y,length:N[0].length});return A}function C(F){const Y=v(u.NUMERIC,t.NUMERIC,F),D=v(u.ALPHANUMERIC,t.ALPHANUMERIC,F);let A,N;return d.isKanjiModeEnabled()?(A=v(u.BYTE,t.BYTE,F),N=v(u.KANJI,t.KANJI,F)):(A=v(u.BYTE_KANJI,t.BYTE,F),N=[]),Y.concat(D,A,N).sort(function(V,H){return V.index-H.index}).map(function(V){return{data:V.data,mode:V.mode,length:V.length}})}function M(F,Y){switch(Y){case t.NUMERIC:return r.getBitsLength(F);case t.ALPHANUMERIC:return a.getBitsLength(F);case t.KANJI:return s.getBitsLength(F);case t.BYTE:return l.getBitsLength(F)}}function _(F){return F.reduce(function(Y,D){const A=Y.length-1>=0?Y[Y.length-1]:null;return A&&A.mode===D.mode?(Y[Y.length-1].data+=D.data,Y):(Y.push(D),Y)},[])}function x(F){const Y=[];for(let D=0;D=0&&d<=6&&(f===0||f===6)||f>=0&&f<=6&&(d===0||d===6)||d>=2&&d<=4&&f>=2&&f<=4?e.set(s+d,u+f,!0,!0):e.set(s+d,u+f,!1,!0))}}function mS(e){const t=e.size;for(let r=8;r>d&1)===1,e.set(l,s,u,!0),e.set(s,l,u,!0)}function bu(e,t,r){const a=e.size,l=fS.getEncodedBits(t,r);let s,u;for(s=0;s<15;s++)u=(l>>s&1)===1,s<6?e.set(s,8,u,!0):s<8?e.set(s+1,8,u,!0):e.set(a-15+s,8,u,!0),s<8?e.set(8,a-s-1,u,!0):s<9?e.set(8,15-s-1+1,u,!0):e.set(8,15-s-1,u,!0);e.set(a-8,8,1,!0)}function yS(e,t){const r=e.size;let a=-1,l=r-1,s=7,u=0;for(let d=r-1;d>0;d-=2)for(d===6&&d--;;){for(let f=0;f<2;f++)if(!e.isReserved(l,d-f)){let g=!1;u>>s&1)===1),e.set(l,d-f,g),s--,s===-1&&(u++,s=7)}if(l+=a,l<0||r<=l){l-=a,a=-a;break}}}function _S(e,t,r){const a=new oS;r.forEach(function(f){a.put(f.mode.bit,4),a.put(f.getLength(),hS.getCharCountIndicator(f.mode,e)),f.write(a)});const l=Oo.getSymbolTotalCodewords(e),s=Lu.getTotalCodewordsCount(e,t),u=(l-s)*8;for(a.getLengthInBits()+4<=u&&a.put(0,4);a.getLengthInBits()%8!==0;)a.putBit(0);const d=(u-a.getLengthInBits())/8;for(let f=0;fdw.includes(e)}},setup(e,{slots:t}){const r=$(()=>e.align!==void 0?{verticalAlign:e.align}:null),a=$(()=>{const l=e.outline===!0&&e.color||e.textColor;return`q-badge flex inline items-center no-wrap q-badge--${e.multiLine===!0?"multi":"single"}-line`+(e.outline===!0?" q-badge--outline":e.color!==void 0?` bg-${e.color}`:"")+(l!==void 0?` text-${l}`:"")+(e.floating===!0?" q-badge--floating":"")+(e.rounded===!0?" q-badge--rounded":"")+(e.transparent===!0?" q-badge--transparent":"")});return()=>E("div",{class:a.value,style:r.value,role:"status","aria-label":e.label},Si(t.default,e.label!==void 0?[e.label]:[]))}});function Ua(){if(window.getSelection!==void 0){const e=window.getSelection();e.empty!==void 0?e.empty():e.removeAllRanges!==void 0&&(e.removeAllRanges(),xb.is.mobile!==!0&&e.addRange(document.createRange()))}else document.selection!==void 0&&document.selection.empty()}const Zh={target:{default:!0},noParentEvent:Boolean,contextMenu:Boolean};function Jh({showing:e,avoidEmit:t,configureAnchorEl:r}){const{props:a,proxy:l,emit:s}=Dt(),u=se(null);let d=null;function f(_){return u.value===null?!1:_===void 0||_.touches===void 0||_.touches.length<=1}const g={};r===void 0&&(Object.assign(g,{hide(_){l.hide(_)},toggle(_){l.toggle(_),_.qAnchorHandled=!0},toggleKey(_){Ka(_,13)===!0&&g.toggle(_)},contextClick(_){l.hide(_),yi(_),Sn(()=>{l.show(_),_.qAnchorHandled=!0})},prevent:yi,mobileTouch(_){if(g.mobileCleanup(_),f(_)!==!0)return;l.hide(_),u.value.classList.add("non-selectable");const x=_.target;Ln(g,"anchor",[[x,"touchmove","mobileCleanup","passive"],[x,"touchend","mobileCleanup","passive"],[x,"touchcancel","mobileCleanup","passive"],[u.value,"contextmenu","prevent","notPassive"]]),d=setTimeout(()=>{d=null,l.show(_),_.qAnchorHandled=!0},300)},mobileCleanup(_){u.value.classList.remove("non-selectable"),d!==null&&(clearTimeout(d),d=null),e.value===!0&&_!==void 0&&Ua()}}),r=function(_=a.contextMenu){if(a.noParentEvent===!0||u.value===null)return;let x;_===!0?l.$q.platform.is.mobile===!0?x=[[u.value,"touchstart","mobileTouch","passive"]]:x=[[u.value,"mousedown","hide","passive"],[u.value,"contextmenu","contextClick","notPassive"]]:x=[[u.value,"click","toggle","passive"],[u.value,"keyup","toggleKey","passive"]],Ln(g,"anchor",x)});function v(){Pr(g,"anchor")}function C(_){for(u.value=_;u.value.classList.contains("q-anchor--skip");)u.value=u.value.parentNode;r()}function M(){if(a.target===!1||a.target===""||l.$el.parentNode===null)u.value=null;else if(a.target===!0)C(l.$el.parentNode);else{let _=a.target;if(typeof a.target=="string")try{_=document.querySelector(a.target)}catch{_=void 0}_!=null?(u.value=_.$el||_,r()):(u.value=null,console.error(`Anchor: target "${a.target}" not found`))}}return Ve(()=>a.contextMenu,_=>{u.value!==null&&(v(),r(_))}),Ve(()=>a.target,()=>{u.value!==null&&v(),M()}),Ve(()=>a.noParentEvent,_=>{u.value!==null&&(_===!0?v():r())}),ni(()=>{M(),t!==!0&&a.modelValue===!0&&u.value===null&&s("update:modelValue",!1)}),Ht(()=>{d!==null&&clearTimeout(d),v()}),{anchorEl:u,canShow:f,anchorEvents:g}}function Xh(e,t){const r=se(null);let a;function l(d,f){const g=`${f!==void 0?"add":"remove"}EventListener`,v=f!==void 0?f:a;d!==window&&d[g]("scroll",v,ta.passive),window[g]("scroll",v,ta.passive),a=f}function s(){r.value!==null&&(l(r.value),r.value=null)}const u=Ve(()=>e.noParentEvent,()=>{r.value!==null&&(s(),t())});return Ht(u),{localScrollTarget:r,unconfigureScrollTarget:s,changeScrollEvent:l}}const{notPassiveCapture:mo}=ta,_i=[];function vo(e){const t=e.target;if(t===void 0||t.nodeType===8||t.classList.contains("no-pointer-events")===!0)return;let r=ih.length-1;for(;r>=0;){const a=ih[r].$;if(a.type.name==="QTooltip"){r--;continue}if(a.type.name!=="QDialog")break;if(a.props.seamless!==!0)return;r--}for(let a=_i.length-1;a>=0;a--){const l=_i[a];if((l.anchorEl.value===null||l.anchorEl.value.contains(t)===!1)&&(t===document.body||l.innerRef.value!==null&&l.innerRef.value.contains(t)===!1))e.qClickOutside=!0,l.onClickOutside(e);else return}}function eg(e){_i.push(e),_i.length===1&&(document.addEventListener("mousedown",vo,mo),document.addEventListener("touchstart",vo,mo))}function po(e){const t=_i.findIndex(r=>r===e);t>-1&&(_i.splice(t,1),_i.length===0&&(document.removeEventListener("mousedown",vo,mo),document.removeEventListener("touchstart",vo,mo)))}let uh,ch;function yo(e){const t=e.split(" ");return t.length!==2?!1:["top","center","bottom"].includes(t[0])!==!0?(console.error("Anchor/Self position must start with one of top/center/bottom"),!1):["left","middle","right","start","end"].includes(t[1])!==!0?(console.error("Anchor/Self position must end with one of left/middle/right/start/end"),!1):!0}function tg(e){return e?!(e.length!==2||typeof e[0]!="number"||typeof e[1]!="number"):!0}const Iu={"start#ltr":"left","start#rtl":"right","end#ltr":"right","end#rtl":"left"};["left","middle","right"].forEach(e=>{Iu[`${e}#ltr`]=e,Iu[`${e}#rtl`]=e});function _o(e,t){const r=e.split(" ");return{vertical:r[0],horizontal:Iu[`${r[1]}#${t===!0?"rtl":"ltr"}`]}}function fw(e,t){let{top:r,left:a,right:l,bottom:s,width:u,height:d}=e.getBoundingClientRect();return t!==void 0&&(r-=t[1],a-=t[0],s+=t[1],l+=t[0],u+=t[0],d+=t[1]),{top:r,bottom:s,height:d,left:a,right:l,width:u,middle:a+(l-a)/2,center:r+(s-r)/2}}function hw(e,t,r){let{top:a,left:l}=e.getBoundingClientRect();return a+=t.top,l+=t.left,r!==void 0&&(a+=r[1],l+=r[0]),{top:a,bottom:a+1,height:1,left:l,right:l+1,width:1,middle:l,center:a}}function gw(e,t){return{top:0,center:t/2,bottom:t,left:0,middle:e/2,right:e}}function dh(e,t,r,a){return{top:e[r.vertical]-t[a.vertical],left:e[r.horizontal]-t[a.horizontal]}}function ac(e,t=0){if(e.targetEl===null||e.anchorEl===null||t>5)return;if(e.targetEl.offsetHeight===0||e.targetEl.offsetWidth===0){setTimeout(()=>{ac(e,t+1)},10);return}const{targetEl:r,offset:a,anchorEl:l,anchorOrigin:s,selfOrigin:u,absoluteOffset:d,fit:f,cover:g,maxHeight:v,maxWidth:C}=e;if(Kn.is.ios===!0&&window.visualViewport!==void 0){const J=document.body.style,{offsetLeft:V,offsetTop:H}=window.visualViewport;V!==uh&&(J.setProperty("--q-pe-left",V+"px"),uh=V),H!==ch&&(J.setProperty("--q-pe-top",H+"px"),ch=H)}const{scrollLeft:M,scrollTop:_}=r,x=d===void 0?fw(l,g===!0?[0,0]:a):hw(l,d,a);Object.assign(r.style,{top:0,left:0,minWidth:null,minHeight:null,maxWidth:C||"100vw",maxHeight:v||"100vh",visibility:"visible"});const{offsetWidth:I,offsetHeight:L}=r,{elWidth:F,elHeight:Y}=f===!0||g===!0?{elWidth:Math.max(x.width,I),elHeight:g===!0?Math.max(x.height,L):L}:{elWidth:I,elHeight:L};let D={maxWidth:C,maxHeight:v};(f===!0||g===!0)&&(D.minWidth=x.width+"px",g===!0&&(D.minHeight=x.height+"px")),Object.assign(r.style,D);const A=gw(F,Y);let N=dh(x,A,s,u);if(d===void 0||a===void 0)mu(N,x,A,s,u);else{const{top:J,left:V}=N;mu(N,x,A,s,u);let H=!1;if(N.top!==J){H=!0;const pe=2*a[1];x.center=x.top-=pe,x.bottom-=pe+2}if(N.left!==V){H=!0;const pe=2*a[0];x.middle=x.left-=pe,x.right-=pe+2}H===!0&&(N=dh(x,A,s,u),mu(N,x,A,s,u))}D={top:N.top+"px",left:N.left+"px"},N.maxHeight!==void 0&&(D.maxHeight=N.maxHeight+"px",x.height>N.maxHeight&&(D.minHeight=D.maxHeight)),N.maxWidth!==void 0&&(D.maxWidth=N.maxWidth+"px",x.width>N.maxWidth&&(D.minWidth=D.maxWidth)),Object.assign(r.style,D),r.scrollTop!==_&&(r.scrollTop=_),r.scrollLeft!==M&&(r.scrollLeft=M)}function mu(e,t,r,a,l){const s=r.bottom,u=r.right,d=Ab(),f=window.innerHeight-d,g=document.body.clientWidth;if(e.top<0||e.top+s>f)if(l.vertical==="center")e.top=t[a.vertical]>f/2?Math.max(0,f-s):0,e.maxHeight=Math.min(s,f);else if(t[a.vertical]>f/2){const v=Math.min(f,a.vertical==="center"?t.center:a.vertical===l.vertical?t.bottom:t.top);e.maxHeight=Math.min(s,v),e.top=Math.max(0,v-s)}else e.top=Math.max(0,a.vertical==="center"?t.center:a.vertical===l.vertical?t.top:t.bottom),e.maxHeight=Math.min(s,f-e.top);if(e.left<0||e.left+u>g)if(e.maxWidth=Math.min(u,g),l.horizontal==="middle")e.left=t[a.horizontal]>g/2?Math.max(0,g-u):0;else if(t[a.horizontal]>g/2){const v=Math.min(g,a.horizontal==="middle"?t.middle:a.horizontal===l.horizontal?t.right:t.left);e.maxWidth=Math.min(u,v),e.left=Math.max(0,v-e.maxWidth)}else e.left=Math.max(0,a.horizontal==="middle"?t.middle:a.horizontal===l.horizontal?t.left:t.right),e.maxWidth=Math.min(u,g-e.left)}var Qr=Je({name:"QTooltip",inheritAttrs:!1,props:{...Zh,...Ku,...Gu,maxHeight:{type:String,default:null},maxWidth:{type:String,default:null},transitionShow:{default:"jump-down"},transitionHide:{default:"jump-up"},anchor:{type:String,default:"bottom middle",validator:yo},self:{type:String,default:"top middle",validator:yo},offset:{type:Array,default:()=>[14,14],validator:tg},scrollTarget:{default:void 0},delay:{type:Number,default:0},hideDelay:{type:Number,default:0}},emits:[...Qu],setup(e,{slots:t,emit:r,attrs:a}){let l,s;const u=Dt(),{proxy:{$q:d}}=u,f=se(null),g=se(!1),v=$(()=>_o(e.anchor,d.lang.rtl)),C=$(()=>_o(e.self,d.lang.rtl)),M=$(()=>e.persistent!==!0),{registerTick:_,removeTick:x}=Ra(),{registerTimeout:I}=co(),{transitionProps:L,transitionStyle:F}=$h(e),{localScrollTarget:Y,changeScrollEvent:D,unconfigureScrollTarget:A}=Xh(e,X),{anchorEl:N,canShow:J,anchorEvents:V}=Jh({showing:g,configureAnchorEl:rt}),{show:H,hide:pe}=ju({showing:g,canShow:J,handleShow:te,handleHide:Pe,hideOnRouteChange:M,processOnMount:!0});Object.assign(V,{delayShow:G,delayHide:me});const{showPortal:_e,hidePortal:xe,renderPortal:lt}=Oh(u,f,he,"tooltip");if(d.platform.is.mobile===!0){const fe={anchorEl:N,innerRef:f,onClickOutside(ze){return pe(ze),ze.target.classList.contains("q-dialog__backdrop")&&Rt(ze),!0}},Ge=$(()=>e.modelValue===null&&e.persistent!==!0&&g.value===!0);Ve(Ge,ze=>{(ze===!0?eg:po)(fe)}),Ht(()=>{po(fe)})}function te(fe){_e(),_(()=>{s=new MutationObserver(()=>j()),s.observe(f.value,{attributes:!1,childList:!0,characterData:!0,subtree:!0}),j(),X()}),l===void 0&&(l=Ve(()=>d.screen.width+"|"+d.screen.height+"|"+e.self+"|"+e.anchor+"|"+d.lang.rtl,j)),I(()=>{_e(!0),r("show",fe)},e.transitionDuration)}function Pe(fe){x(),xe(),Be(),I(()=>{xe(!0),r("hide",fe)},e.transitionDuration)}function Be(){s!==void 0&&(s.disconnect(),s=void 0),l!==void 0&&(l(),l=void 0),A(),Pr(V,"tooltipTemp")}function j(){ac({targetEl:f.value,offset:e.offset,anchorEl:N.value,anchorOrigin:v.value,selfOrigin:C.value,maxHeight:e.maxHeight,maxWidth:e.maxWidth})}function G(fe){if(d.platform.is.mobile===!0){Ua(),document.body.classList.add("non-selectable");const Ge=N.value,ze=["touchmove","touchcancel","touchend","click"].map(we=>[Ge,we,"delayHide","passiveCapture"]);Ln(V,"tooltipTemp",ze)}I(()=>{H(fe)},e.delay)}function me(fe){d.platform.is.mobile===!0&&(Pr(V,"tooltipTemp"),Ua(),setTimeout(()=>{document.body.classList.remove("non-selectable")},10)),I(()=>{pe(fe)},e.hideDelay)}function rt(){if(e.noParentEvent===!0||N.value===null)return;const fe=d.platform.is.mobile===!0?[[N.value,"touchstart","delayShow","passive"]]:[[N.value,"mouseenter","delayShow","passive"],[N.value,"mouseleave","delayHide","passive"]];Ln(V,"anchor",fe)}function X(){if(N.value!==null||e.scrollTarget!==void 0){Y.value=xo(N.value,e.scrollTarget);const fe=e.noParentEvent===!0?j:pe;D(Y.value,fe)}}function Z(){return g.value===!0?E("div",{...a,ref:f,class:["q-tooltip q-tooltip--style q-position-engine no-pointer-events",a.class],style:[a.style,F.value],role:"tooltip"},Mt(t.default)):null}function he(){return E(Ga,L.value,Z)}return Ht(Be),Object.assign(u.proxy,{updatePosition:j}),lt}});const mw={xs:8,sm:10,md:14,lg:20,xl:24};var Qa=Je({name:"QChip",props:{...or,...Eb,dense:Boolean,icon:String,iconRight:String,iconRemove:String,iconSelected:String,label:[String,Number],color:String,textColor:String,modelValue:{type:Boolean,default:!0},selected:{type:Boolean,default:null},square:Boolean,outline:Boolean,clickable:Boolean,removable:Boolean,removeAriaLabel:String,tabindex:[String,Number],disable:Boolean,ripple:{type:[Boolean,Object],default:!0}},emits:["update:modelValue","update:selected","remove","click"],setup(e,{slots:t,emit:r}){const{proxy:{$q:a}}=Dt(),l=sr(e,a),s=Ib(e,mw),u=$(()=>e.selected===!0||e.icon!==void 0),d=$(()=>e.selected===!0?e.iconSelected||a.iconSet.chip.selected:e.icon),f=$(()=>e.iconRemove||a.iconSet.chip.remove),g=$(()=>e.disable===!1&&(e.clickable===!0||e.selected!==null)),v=$(()=>{const L=e.outline===!0&&e.color||e.textColor;return"q-chip row inline no-wrap items-center"+(e.outline===!1&&e.color!==void 0?` bg-${e.color}`:"")+(L?` text-${L} q-chip--colored`:"")+(e.disable===!0?" disabled":"")+(e.dense===!0?" q-chip--dense":"")+(e.outline===!0?" q-chip--outline":"")+(e.selected===!0?" q-chip--selected":"")+(g.value===!0?" q-chip--clickable cursor-pointer non-selectable q-hoverable":"")+(e.square===!0?" q-chip--square":"")+(l.value===!0?" q-chip--dark q-dark":"")}),C=$(()=>{const L=e.disable===!0?{tabindex:-1,"aria-disabled":"true"}:{tabindex:e.tabindex||0},F={...L,role:"button","aria-hidden":"false","aria-label":e.removeAriaLabel||a.lang.label.remove};return{chip:L,remove:F}});function M(L){L.keyCode===13&&_(L)}function _(L){e.disable||(r("update:selected",!e.selected),r("click",L))}function x(L){(L.keyCode===void 0||L.keyCode===13)&&(Rt(L),e.disable===!1&&(r("update:modelValue",!1),r("remove")))}function I(){const L=[];g.value===!0&&L.push(E("div",{class:"q-focus-helper"})),u.value===!0&&L.push(E(Yt,{class:"q-chip__icon q-chip__icon--left",name:d.value}));const F=e.label!==void 0?[E("div",{class:"ellipsis"},[e.label])]:void 0;return L.push(E("div",{class:"q-chip__content col row no-wrap items-center q-anchor--skip"},$b(t.default,F))),e.iconRight&&L.push(E(Yt,{class:"q-chip__icon q-chip__icon--right",name:e.iconRight})),e.removable===!0&&L.push(E(Yt,{class:"q-chip__icon q-chip__icon--remove cursor-pointer",name:f.value,...C.value.remove,onClick:x,onKeyup:x})),L}return()=>{if(e.modelValue===!1)return;const L={class:v.value,style:s.value};return g.value===!0&&Object.assign(L,C.value.chip,{onClick:_,onKeyup:M}),Zu("div",L,I(),"ripple",e.ripple!==!1&&e.disable!==!0,()=>[[Ju,e.ripple]])}}}),Mr=Je({name:"QList",props:{...or,bordered:Boolean,dense:Boolean,separator:Boolean,padding:Boolean,tag:{type:String,default:"div"}},setup(e,{slots:t}){const r=Dt(),a=sr(e,r.proxy.$q),l=$(()=>"q-list"+(e.bordered===!0?" q-list--bordered":"")+(e.dense===!0?" q-list--dense":"")+(e.separator===!0?" q-list--separator":"")+(a.value===!0?" q-list--dark":"")+(e.padding===!0?" q-list--padding":""));return()=>E(e.tag,{class:l.value},Mt(t.default))}});const vw=["horizontal","vertical","cell","none"];var pw=Je({name:"QMarkupTable",props:{...or,dense:Boolean,flat:Boolean,bordered:Boolean,square:Boolean,wrapCells:Boolean,separator:{type:String,default:"horizontal",validator:e=>vw.includes(e)}},setup(e,{slots:t}){const r=Dt(),a=sr(e,r.proxy.$q),l=$(()=>`q-markup-table q-table__container q-table__card q-table--${e.separator}-separator`+(a.value===!0?" q-table--dark q-table__card--dark q-dark":"")+(e.dense===!0?" q-table--dense":"")+(e.flat===!0?" q-table--flat":"")+(e.bordered===!0?" q-table--bordered":"")+(e.square===!0?" q-table--square":"")+(e.wrapCells===!1?" q-table--no-wrap":""));return()=>E("div",{class:l.value},[E("table",{class:"q-table"},Mt(t.default))])}});function yw(e,t){return E("div",e,[E("table",{class:"q-table"},t)])}let za=!1;{const e=document.createElement("div");e.setAttribute("dir","rtl"),Object.assign(e.style,{width:"1px",height:"1px",overflow:"auto"});const t=document.createElement("div");Object.assign(t.style,{width:"1000px",height:"1px"}),document.body.appendChild(e),e.appendChild(t),e.scrollLeft=-1e3,za=e.scrollLeft>=0,e.remove()}const Hn=1e3,_w=["start","center","end","start-force","center-force","end-force"],ng=Array.prototype.filter,bw=window.getComputedStyle(document.body).overflowAnchor===void 0?Xu:function(e,t){e!==null&&(e._qOverflowAnimationFrame!==void 0&&cancelAnimationFrame(e._qOverflowAnimationFrame),e._qOverflowAnimationFrame=requestAnimationFrame(()=>{if(e===null)return;e._qOverflowAnimationFrame=void 0;const r=e.children||[];ng.call(r,l=>l.dataset&&l.dataset.qVsAnchor!==void 0).forEach(l=>{delete l.dataset.qVsAnchor});const a=r[t];a&&a.dataset&&(a.dataset.qVsAnchor="")}))};function Zi(e,t){return e+t}function vu(e,t,r,a,l,s,u,d){const f=e===window?document.scrollingElement||document.documentElement:e,g=l===!0?"offsetWidth":"offsetHeight",v={scrollStart:0,scrollViewSize:-u-d,scrollMaxSize:0,offsetStart:-u,offsetEnd:-d};if(l===!0?(e===window?(v.scrollStart=window.pageXOffset||window.scrollX||document.body.scrollLeft||0,v.scrollViewSize+=document.documentElement.clientWidth):(v.scrollStart=f.scrollLeft,v.scrollViewSize+=f.clientWidth),v.scrollMaxSize=f.scrollWidth,s===!0&&(v.scrollStart=(za===!0?v.scrollMaxSize-v.scrollViewSize:0)-v.scrollStart)):(e===window?(v.scrollStart=window.pageYOffset||window.scrollY||document.body.scrollTop||0,v.scrollViewSize+=document.documentElement.clientHeight):(v.scrollStart=f.scrollTop,v.scrollViewSize+=f.clientHeight),v.scrollMaxSize=f.scrollHeight),r!==null)for(let C=r.previousElementSibling;C!==null;C=C.previousElementSibling)C.classList.contains("q-virtual-scroll--skip")===!1&&(v.offsetStart+=C[g]);if(a!==null)for(let C=a.nextElementSibling;C!==null;C=C.nextElementSibling)C.classList.contains("q-virtual-scroll--skip")===!1&&(v.offsetEnd+=C[g]);if(t!==e){const C=f.getBoundingClientRect(),M=t.getBoundingClientRect();l===!0?(v.offsetStart+=M.left-C.left,v.offsetEnd-=M.width):(v.offsetStart+=M.top-C.top,v.offsetEnd-=M.height),e!==window&&(v.offsetStart+=v.scrollStart),v.offsetEnd+=v.scrollMaxSize-v.offsetStart}return v}function fh(e,t,r,a){t==="end"&&(t=(e===window?document.body:e)[r===!0?"scrollWidth":"scrollHeight"]),e===window?r===!0?(a===!0&&(t=(za===!0?document.body.scrollWidth-document.documentElement.clientWidth:0)-t),window.scrollTo(t,window.pageYOffset||window.scrollY||document.body.scrollTop||0)):window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,t):r===!0?(a===!0&&(t=(za===!0?e.scrollWidth-e.offsetWidth:0)-t),e.scrollLeft=t):e.scrollTop=t}function qa(e,t,r,a){if(r>=a)return 0;const l=t.length,s=Math.floor(r/Hn),u=Math.floor((a-1)/Hn)+1;let d=e.slice(s,u).reduce(Zi,0);return r%Hn!==0&&(d-=t.slice(s*Hn,r).reduce(Zi,0)),a%Hn!==0&&a!==l&&(d-=t.slice(a,u*Hn).reduce(Zi,0)),d}const ww={virtualScrollSliceSize:{type:[Number,String],default:null},virtualScrollSliceRatioBefore:{type:[Number,String],default:1},virtualScrollSliceRatioAfter:{type:[Number,String],default:1},virtualScrollItemSize:{type:[Number,String],default:24},virtualScrollStickySizeStart:{type:[Number,String],default:0},virtualScrollStickySizeEnd:{type:[Number,String],default:0},tableColspan:[Number,String]},rg={virtualScrollHorizontal:Boolean,onVirtualScroll:Function,...ww};function ig({virtualScrollLength:e,getVirtualScrollTarget:t,getVirtualScrollEl:r,virtualScrollItemSizeComputed:a}){const l=Dt(),{props:s,emit:u,proxy:d}=l,{$q:f}=d;let g,v,C,M=[],_;const x=se(0),I=se(0),L=se({}),F=se(null),Y=se(null),D=se(null),A=se({from:0,to:0}),N=$(()=>s.tableColspan!==void 0?s.tableColspan:100);a===void 0&&(a=$(()=>s.virtualScrollItemSize));const J=$(()=>a.value+";"+s.virtualScrollHorizontal),V=$(()=>J.value+";"+s.virtualScrollSliceRatioBefore+";"+s.virtualScrollSliceRatioAfter);Ve(V,()=>{j()}),Ve(J,H);function H(){Be(v,!0)}function pe(Z){Be(Z===void 0?v:Z)}function _e(Z,he){const fe=t();if(fe==null||fe.nodeType===8)return;const Ge=vu(fe,r(),F.value,Y.value,s.virtualScrollHorizontal,f.lang.rtl,s.virtualScrollStickySizeStart,s.virtualScrollStickySizeEnd);C!==Ge.scrollViewSize&&j(Ge.scrollViewSize),lt(fe,Ge,Math.min(e.value-1,Math.max(0,parseInt(Z,10)||0)),0,_w.indexOf(he)>-1?he:v>-1&&Z>v?"end":"start")}function xe(){const Z=t();if(Z==null||Z.nodeType===8)return;const he=vu(Z,r(),F.value,Y.value,s.virtualScrollHorizontal,f.lang.rtl,s.virtualScrollStickySizeStart,s.virtualScrollStickySizeEnd),fe=e.value-1,Ge=he.scrollMaxSize-he.offsetStart-he.offsetEnd-I.value;if(g===he.scrollStart)return;if(he.scrollMaxSize<=0){lt(Z,he,0,0);return}C!==he.scrollViewSize&&j(he.scrollViewSize),te(A.value.from);const ze=Math.floor(he.scrollMaxSize-Math.max(he.scrollViewSize,he.offsetEnd)-Math.min(_[fe],he.scrollViewSize/2));if(ze>0&&Math.ceil(he.scrollStart)>=ze){lt(Z,he,fe,he.scrollMaxSize-he.offsetEnd-M.reduce(Zi,0));return}let we=0,Me=he.scrollStart-he.offsetStart,ft=Me;if(Me<=Ge&&Me+he.scrollViewSize>=x.value)Me-=x.value,we=A.value.from,ft=Me;else for(let ee=0;Me>=M[ee]&&we0&&we-he.scrollViewSize?(we++,ft=Me):ft=_[we]+Me;lt(Z,he,we,ft)}function lt(Z,he,fe,Ge,ze){const we=typeof ze=="string"&&ze.indexOf("-force")>-1,Me=we===!0?ze.replace("-force",""):ze,ft=Me!==void 0?Me:"start";let ee=Math.max(0,fe-L.value[ft]),wt=ee+L.value.total;wt>e.value&&(wt=e.value,ee=Math.max(0,wt-L.value.total)),g=he.scrollStart;const nn=ee!==A.value.from||wt!==A.value.to;if(nn===!1&&Me===void 0){me(fe);return}const{activeElement:un}=document,rn=D.value;nn===!0&&rn!==null&&rn!==un&&rn.contains(un)===!0&&(rn.addEventListener("focusout",Pe),setTimeout(()=>{rn!==null&&rn.removeEventListener("focusout",Pe)})),bw(rn,fe-ee);const qt=Me!==void 0?_.slice(ee,fe).reduce(Zi,0):0;if(nn===!0){const Kt=wt>=A.value.from&&ee<=A.value.to?A.value.to:wt;A.value={from:ee,to:Kt},x.value=qa(M,_,0,ee),I.value=qa(M,_,wt,e.value),requestAnimationFrame(()=>{A.value.to!==wt&&g===he.scrollStart&&(A.value={from:A.value.from,to:wt},I.value=qa(M,_,wt,e.value))})}requestAnimationFrame(()=>{if(g!==he.scrollStart)return;nn===!0&&te(ee);const Kt=_.slice(ee,fe).reduce(Zi,0),Xn=Kt+he.offsetStart+x.value,Gt=Xn+_[fe];let Fn=Xn+Ge;if(Me!==void 0){const $r=Kt-qt,St=he.scrollStart+$r;Fn=we!==!0&&Stee.classList&&ee.classList.contains("q-virtual-scroll--skip")===!1),Ge=fe.length,ze=s.virtualScrollHorizontal===!0?ee=>ee.getBoundingClientRect().width:ee=>ee.offsetHeight;let we=Z,Me,ft;for(let ee=0;ee=Ge;we--)_[we]=fe;const ze=Math.floor((e.value-1)/Hn);M=[];for(let we=0;we<=ze;we++){let Me=0;const ft=Math.min((we+1)*Hn,e.value);for(let ee=we*Hn;ee=0?(te(A.value.from),Sn(()=>{_e(Z)})):rt()}function j(Z){if(Z===void 0&&typeof window!="undefined"){const Me=t();Me!=null&&Me.nodeType!==8&&(Z=vu(Me,r(),F.value,Y.value,s.virtualScrollHorizontal,f.lang.rtl,s.virtualScrollStickySizeStart,s.virtualScrollStickySizeEnd).scrollViewSize)}C=Z;const he=parseFloat(s.virtualScrollSliceRatioBefore)||0,fe=parseFloat(s.virtualScrollSliceRatioAfter)||0,Ge=1+he+fe,ze=Z===void 0||Z<=0?1:Math.ceil(Z/a.value),we=Math.max(1,ze,Math.ceil((s.virtualScrollSliceSize>0?s.virtualScrollSliceSize:10)/Ge));L.value={total:Math.ceil(we*Ge),start:Math.ceil(we*he),center:Math.ceil(we*(.5+he)),end:Math.ceil(we*(1+he)),view:ze}}function G(Z,he){const fe=s.virtualScrollHorizontal===!0?"width":"height",Ge={["--q-virtual-scroll-item-"+fe]:a.value+"px"};return[Z==="tbody"?E(Z,{class:"q-virtual-scroll__padding",key:"before",ref:F},[E("tr",[E("td",{style:{[fe]:`${x.value}px`,...Ge},colspan:N.value})])]):E(Z,{class:"q-virtual-scroll__padding",key:"before",ref:F,style:{[fe]:`${x.value}px`,...Ge}}),E(Z,{class:"q-virtual-scroll__content",key:"content",ref:D,tabindex:-1},he.flat()),Z==="tbody"?E(Z,{class:"q-virtual-scroll__padding",key:"after",ref:Y},[E("tr",[E("td",{style:{[fe]:`${I.value}px`,...Ge},colspan:N.value})])]):E(Z,{class:"q-virtual-scroll__padding",key:"after",ref:Y,style:{[fe]:`${I.value}px`,...Ge}})]}function me(Z){v!==Z&&(s.onVirtualScroll!==void 0&&u("virtualScroll",{index:Z,from:A.value.from,to:A.value.to-1,direction:Z{j()});let X=!1;return oa(()=>{X=!0}),sa(()=>{if(X!==!0)return;const Z=t();g!==void 0&&Z!==void 0&&Z!==null&&Z.nodeType!==8?fh(Z,g,s.virtualScrollHorizontal,f.lang.rtl):_e(v)}),Ht(()=>{rt.cancel()}),Object.assign(d,{scrollTo:_e,reset:H,refresh:pe}),{virtualScrollSliceRange:A,virtualScrollSliceSizeComputed:L,setVirtualScrollSize:j,onVirtualScrollEvt:rt,localResetVirtualScroll:Be,padVirtualScroll:G,scrollTo:_e,reset:H,refresh:pe}}const Sw={list:Mr,table:pw},kw=["list","table","__qtable"];var lc=Je({name:"QVirtualScroll",props:{...rg,type:{type:String,default:"list",validator:e=>kw.includes(e)},items:{type:Array,default:()=>[]},itemsFn:Function,itemsSize:Number,scrollTarget:{default:void 0}},setup(e,{slots:t,attrs:r}){let a;const l=se(null),s=$(()=>e.itemsSize>=0&&e.itemsFn!==void 0?parseInt(e.itemsSize,10):Array.isArray(e.items)?e.items.length:0),{virtualScrollSliceRange:u,localResetVirtualScroll:d,padVirtualScroll:f,onVirtualScrollEvt:g}=ig({virtualScrollLength:s,getVirtualScrollTarget:x,getVirtualScrollEl:_}),v=$(()=>{if(s.value===0)return[];const Y=(D,A)=>({index:u.value.from+A,item:D});return e.itemsFn===void 0?e.items.slice(u.value.from,u.value.to).map(Y):e.itemsFn(u.value.from,u.value.to-u.value.from).map(Y)}),C=$(()=>"q-virtual-scroll q-virtual-scroll"+(e.virtualScrollHorizontal===!0?"--horizontal":"--vertical")+(e.scrollTarget!==void 0?"":" scroll")),M=$(()=>e.scrollTarget!==void 0?{}:{tabindex:0});Ve(s,()=>{d()}),Ve(()=>e.scrollTarget,()=>{L(),I()});function _(){return l.value.$el||l.value}function x(){return a}function I(){a=xo(_(),e.scrollTarget),a.addEventListener("scroll",g,ta.passive)}function L(){a!==void 0&&(a.removeEventListener("scroll",g,ta.passive),a=void 0)}function F(){let Y=f(e.type==="list"?"div":"tbody",v.value.map(t.default));return t.before!==void 0&&(Y=t.before().concat(Y)),Si(t.after,Y)}return tc(()=>{d()}),ni(()=>{I()}),sa(()=>{I()}),oa(()=>{L()}),Ht(()=>{L()}),()=>{if(t.default===void 0){console.error("QVirtualScroll: default scoped slot is required for rendering");return}return e.type==="__qtable"?yw({ref:l,class:"q-table__middle "+C.value},F()):E(Sw[e.type],{...r,ref:l,class:[r.class,C.value],...M.value},F)}}});const Cw=[E("circle",{cx:"15",cy:"15",r:"15"},[E("animate",{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}),E("animate",{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"})]),E("circle",{cx:"60",cy:"15",r:"9","fill-opacity":".3"},[E("animate",{attributeName:"r",from:"9",to:"9",begin:"0s",dur:"0.8s",values:"9;15;9",calcMode:"linear",repeatCount:"indefinite"}),E("animate",{attributeName:"fill-opacity",from:".5",to:".5",begin:"0s",dur:"0.8s",values:".5;1;.5",calcMode:"linear",repeatCount:"indefinite"})]),E("circle",{cx:"105",cy:"15",r:"15"},[E("animate",{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}),E("animate",{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"})])];var $u=Je({name:"QSpinnerDots",props:Ob,setup(e){const{cSize:t,classes:r}=Rb(e);return()=>E("svg",{class:r.value,fill:"currentColor",width:t.value,height:t.value,viewBox:"0 0 120 30",xmlns:"http://www.w3.org/2000/svg"},Cw)}});const Tw={ratio:[String,Number]};function Mw(e,t){return $(()=>{const r=Number(e.ratio||(t!==void 0?t.value:void 0));return isNaN(r)!==!0&&r>0?{paddingBottom:`${100/r}%`}:null})}const Dw=16/9;var oc=Je({name:"QImg",props:{...Tw,src:String,srcset:String,sizes:String,alt:String,crossorigin:String,decoding:String,referrerpolicy:String,draggable:Boolean,loading:{type:String,default:"lazy"},fetchpriority:{type:String,default:"auto"},width:String,height:String,initialRatio:{type:[Number,String],default:Dw},placeholderSrc:String,fit:{type:String,default:"cover"},position:{type:String,default:"50% 50%"},imgClass:String,imgStyle:Object,noSpinner:Boolean,noNativeMenu:Boolean,noTransition:Boolean,spinnerColor:String,spinnerSize:String},emits:["load","error"],setup(e,{slots:t,emit:r}){const a=se(e.initialRatio),l=Mw(e,a);let s=null,u=!1;const d=[se(null),se(L())],f=se(0),g=se(!1),v=se(!1),C=$(()=>`q-img q-img--${e.noNativeMenu===!0?"no-":""}menu`),M=$(()=>({width:e.width,height:e.height})),_=$(()=>`q-img__image ${e.imgClass!==void 0?e.imgClass+" ":""}q-img__image--with${e.noTransition===!0?"out":""}-transition`),x=$(()=>({...e.imgStyle,objectFit:e.fit,objectPosition:e.position}));Ve(()=>I(),F);function I(){return e.src||e.srcset||e.sizes?{src:e.src,srcset:e.srcset,sizes:e.sizes}:null}function L(){return e.placeholderSrc!==void 0?{src:e.placeholderSrc}:null}function F(H){s!==null&&(clearTimeout(s),s=null),v.value=!1,H===null?(g.value=!1,d[f.value^1].value=L()):g.value=!0,d[f.value].value=H}function Y({target:H}){u!==!0&&(s!==null&&(clearTimeout(s),s=null),a.value=H.naturalHeight===0?.5:H.naturalWidth/H.naturalHeight,D(H,1))}function D(H,pe){u===!0||pe===1e3||(H.complete===!0?A(H):s=setTimeout(()=>{s=null,D(H,pe+1)},50))}function A(H){u!==!0&&(f.value=f.value^1,d[f.value].value=null,g.value=!1,v.value=!1,r("load",H.currentSrc||H.src))}function N(H){s!==null&&(clearTimeout(s),s=null),g.value=!1,v.value=!0,d[f.value].value=null,d[f.value^1].value=L(),r("error",H)}function J(H){const pe=d[H].value,_e={key:"img_"+H,class:_.value,style:x.value,crossorigin:e.crossorigin,decoding:e.decoding,referrerpolicy:e.referrerpolicy,height:e.height,width:e.width,loading:e.loading,fetchpriority:e.fetchpriority,"aria-hidden":"true",draggable:e.draggable,...pe};return f.value===H?(_e.class+=" q-img__image--waiting",Object.assign(_e,{onLoad:Y,onError:N})):_e.class+=" q-img__image--loaded",E("div",{class:"q-img__container absolute-full",key:"img"+H},E("img",_e))}function V(){return g.value!==!0?E("div",{key:"content",class:"q-img__content absolute-full q-anchor--skip"},Mt(t[v.value===!0?"error":"default"])):E("div",{key:"loading",class:"q-img__loading absolute-full flex flex-center"},t.loading!==void 0?t.loading():e.noSpinner===!0?void 0:[E(Rh,{color:e.spinnerColor,size:e.spinnerSize})])}return F(I()),Ht(()=>{u=!0,s!==null&&(clearTimeout(s),s=null)}),()=>{const H=[];return l.value!==null&&H.push(E("div",{key:"filler",style:l.value})),v.value!==!0&&(d[0].value!==null&&H.push(J(0)),d[1].value!==null&&H.push(J(1))),H.push(E(Ga,{name:"q-transition--fade"},V)),E("div",{class:C.value,style:M.value,role:"img","aria-label":e.alt},H)}}}),qw=Je({name:"QBanner",props:{...or,inlineActions:Boolean,dense:Boolean,rounded:Boolean},setup(e,{slots:t}){const{proxy:{$q:r}}=Dt(),a=sr(e,r),l=$(()=>"q-banner row items-center"+(e.dense===!0?" q-banner--dense":"")+(a.value===!0?" q-banner--dark q-dark":"")+(e.rounded===!0?" rounded-borders":"")),s=$(()=>`q-banner__actions row items-center justify-end col-${e.inlineActions===!0?"auto":"all"}`);return()=>{const u=[E("div",{class:"q-banner__avatar col-auto row items-center self-start"},Mt(t.avatar)),E("div",{class:"q-banner__content col text-body2"},Mt(t.default))],d=Mt(t.action);return d!==void 0&&u.push(E("div",{class:s.value},d)),E("div",{class:l.value+(e.inlineActions===!1&&d!==void 0?" q-banner--top-padding":""),role:"alert"},u)}}}),Ie=Je({name:"QItemSection",props:{avatar:Boolean,thumbnail:Boolean,side:Boolean,top:Boolean,noWrap:Boolean},setup(e,{slots:t}){const r=$(()=>`q-item__section column q-item__section--${e.avatar===!0||e.side===!0||e.thumbnail===!0?"side":"main"}`+(e.top===!0?" q-item__section--top justify-start":" justify-center")+(e.avatar===!0?" q-item__section--avatar":"")+(e.thumbnail===!0?" q-item__section--thumbnail":"")+(e.noWrap===!0?" q-item__section--nowrap":""));return()=>E("div",{class:r.value},Mt(t.default))}}),Ke=Je({name:"QItemLabel",props:{overline:Boolean,caption:Boolean,header:Boolean,lines:[Number,String]},setup(e,{slots:t}){const r=$(()=>parseInt(e.lines,10)),a=$(()=>"q-item__label"+(e.overline===!0?" q-item__label--overline text-overline":"")+(e.caption===!0?" q-item__label--caption text-caption":"")+(e.header===!0?" q-item__label--header":"")+(r.value===1?" ellipsis":"")),l=$(()=>e.lines!==void 0&&r.value>1?{overflow:"hidden",display:"-webkit-box","-webkit-box-orient":"vertical","-webkit-line-clamp":r.value}:null);return()=>E("div",{style:l.value,class:a.value},Mt(t.default))}}),Vt=Je({name:"QItem",props:{...or,...Ao,tag:{type:String,default:"div"},active:{type:Boolean,default:null},clickable:Boolean,dense:Boolean,insetLevel:Number,tabindex:[String,Number],focused:Boolean,manualFocus:Boolean},emits:["click","keyup"],setup(e,{slots:t,emit:r}){const{proxy:{$q:a}}=Dt(),l=sr(e,a),{hasLink:s,linkAttrs:u,linkClass:d,linkTag:f,navigateOnClick:g}=Lh(),v=se(null),C=se(null),M=$(()=>e.clickable===!0||s.value===!0||e.tag==="label"),_=$(()=>e.disable!==!0&&M.value===!0),x=$(()=>"q-item q-item-type row no-wrap"+(e.dense===!0?" q-item--dense":"")+(l.value===!0?" q-item--dark":"")+(s.value===!0&&e.active===null?d.value:e.active===!0?` q-item--active${e.activeClass!==void 0?` ${e.activeClass}`:""}`:"")+(e.disable===!0?" disabled":"")+(_.value===!0?" q-item--clickable q-link cursor-pointer "+(e.manualFocus===!0?"q-manual-focusable":"q-focusable q-hoverable")+(e.focused===!0?" q-manual-focusable--focused":""):"")),I=$(()=>{if(e.insetLevel===void 0)return null;const D=a.lang.rtl===!0?"Right":"Left";return{["padding"+D]:16+e.insetLevel*56+"px"}});function L(D){_.value===!0&&(C.value!==null&&(D.qKeyEvent!==!0&&document.activeElement===v.value?C.value.focus():document.activeElement===C.value&&v.value.focus()),g(D))}function F(D){if(_.value===!0&&Ka(D,13)===!0){Rt(D),D.qKeyEvent=!0;const A=new MouseEvent("click",D);A.qKeyEvent=!0,v.value.dispatchEvent(A)}r("keyup",D)}function Y(){const D=Nh(t.default,[]);return _.value===!0&&D.unshift(E("div",{class:"q-focus-helper",tabindex:-1,ref:C})),D}return()=>{const D={ref:v,class:x.value,style:I.value,role:"listitem",onClick:L,onKeyup:F};return _.value===!0?(D.tabindex=e.tabindex||"0",Object.assign(D,u.value)):M.value===!0&&(D["aria-disabled"]="true"),E(f.value,D,Y())}}}),Pw=Je({name:"QBtnGroup",props:{unelevated:Boolean,outline:Boolean,flat:Boolean,rounded:Boolean,square:Boolean,push:Boolean,stretch:Boolean,glossy:Boolean,spread:Boolean},setup(e,{slots:t}){const r=$(()=>{const a=["unelevated","outline","flat","rounded","square","push","stretch","glossy"].filter(l=>e[l]===!0).map(l=>`q-btn-group--${l}`).join(" ");return`q-btn-group row no-wrap${a.length!==0?" "+a:""}`+(e.spread===!0?" q-btn-group--spread":" inline")});return()=>E("div",{class:r.value},Mt(t.default))}}),ag=Je({name:"QMenu",inheritAttrs:!1,props:{...Zh,...Ku,...or,...Gu,persistent:Boolean,autoClose:Boolean,separateClosePopup:Boolean,noRouteDismiss:Boolean,noRefocus:Boolean,noFocus:Boolean,fit:Boolean,cover:Boolean,square:Boolean,anchor:{type:String,validator:yo},self:{type:String,validator:yo},offset:{type:Array,validator:tg},scrollTarget:{default:void 0},touchPosition:Boolean,maxHeight:{type:String,default:null},maxWidth:{type:String,default:null}},emits:[...Qu,"click","escapeKey"],setup(e,{slots:t,emit:r,attrs:a}){let l=null,s,u,d;const f=Dt(),{proxy:g}=f,{$q:v}=g,C=se(null),M=se(!1),_=$(()=>e.persistent!==!0&&e.noRouteDismiss!==!0),x=sr(e,v),{registerTick:I,removeTick:L}=Ra(),{registerTimeout:F}=co(),{transitionProps:Y,transitionStyle:D}=$h(e),{localScrollTarget:A,changeScrollEvent:N,unconfigureScrollTarget:J}=Xh(e,fe),{anchorEl:V,canShow:H}=Jh({showing:M}),{hide:pe}=ju({showing:M,canShow:H,handleShow:X,handleHide:Z,hideOnRouteChange:_,processOnMount:!0}),{showPortal:_e,hidePortal:xe,renderPortal:lt}=Oh(f,C,ft,"menu"),te={anchorEl:V,innerRef:C,onClickOutside(ee){if(e.persistent!==!0&&M.value===!0)return pe(ee),(ee.type==="touchstart"||ee.target.classList.contains("q-dialog__backdrop"))&&Rt(ee),!0}},Pe=$(()=>_o(e.anchor||(e.cover===!0?"center middle":"bottom start"),v.lang.rtl)),Be=$(()=>e.cover===!0?Pe.value:_o(e.self||"top start",v.lang.rtl)),j=$(()=>(e.square===!0?" q-menu--square":"")+(x.value===!0?" q-menu--dark q-dark":"")),G=$(()=>e.autoClose===!0?{onClick:Ge}:{}),me=$(()=>M.value===!0&&e.persistent!==!0);Ve(me,ee=>{ee===!0?(Nb(we),eg(te)):(ah(we),po(te))});function rt(){Uh(()=>{let ee=C.value;ee&&ee.contains(document.activeElement)!==!0&&(ee=ee.querySelector("[autofocus][tabindex], [data-autofocus][tabindex]")||ee.querySelector("[autofocus] [tabindex], [data-autofocus] [tabindex]")||ee.querySelector("[autofocus], [data-autofocus]")||ee,ee.focus({preventScroll:!0}))})}function X(ee){if(l=e.noRefocus===!1?document.activeElement:null,Bh(ze),_e(),fe(),s=void 0,ee!==void 0&&(e.touchPosition||e.contextMenu)){const wt=na(ee);if(wt.left!==void 0){const{top:nn,left:un}=V.value.getBoundingClientRect();s={left:wt.left-un,top:wt.top-nn}}}u===void 0&&(u=Ve(()=>v.screen.width+"|"+v.screen.height+"|"+e.self+"|"+e.anchor+"|"+v.lang.rtl,Me)),e.noFocus!==!0&&document.activeElement.blur(),I(()=>{Me(),e.noFocus!==!0&&rt()}),F(()=>{v.platform.is.ios===!0&&(d=e.autoClose,C.value.click()),Me(),_e(!0),r("show",ee)},e.transitionDuration)}function Z(ee){L(),xe(),he(!0),l!==null&&(ee===void 0||ee.qClickOutside!==!0)&&(((ee&&ee.type.indexOf("key")===0?l.closest('[tabindex]:not([tabindex^="-"])'):void 0)||l).focus(),l=null),F(()=>{xe(!0),r("hide",ee)},e.transitionDuration)}function he(ee){s=void 0,u!==void 0&&(u(),u=void 0),(ee===!0||M.value===!0)&&(Fh(ze),J(),po(te),ah(we)),ee!==!0&&(l=null)}function fe(){(V.value!==null||e.scrollTarget!==void 0)&&(A.value=xo(V.value,e.scrollTarget),N(A.value,Me))}function Ge(ee){d!==!0?(Lb(g,ee),r("click",ee)):d=!1}function ze(ee){me.value===!0&&e.noFocus!==!0&&Bb(C.value,ee.target)!==!0&&rt()}function we(ee){r("escapeKey"),pe(ee)}function Me(){ac({targetEl:C.value,offset:e.offset,anchorEl:V.value,anchorOrigin:Pe.value,selfOrigin:Be.value,absoluteOffset:s,fit:e.fit,cover:e.cover,maxHeight:e.maxHeight,maxWidth:e.maxWidth})}function ft(){return E(Ga,Y.value,()=>M.value===!0?E("div",{role:"menu",...a,ref:C,tabindex:-1,class:["q-menu q-position-engine scroll"+j.value,a.class],style:[a.style,D.value],...G.value},Mt(t.default)):null)}return Ht(he),Object.assign(g,{focus:rt,updatePosition:Me}),lt}});const xw=Object.keys(zh),Aw=e=>xw.reduce((t,r)=>{const a=e[r];return a!==void 0&&(t[r]=a),t},{});var lg=Je({name:"QBtnDropdown",props:{...zh,...Gu,modelValue:Boolean,split:Boolean,dropdownIcon:String,contentClass:[Array,String,Object],contentStyle:[Array,String,Object],cover:Boolean,persistent:Boolean,noRouteDismiss:Boolean,autoClose:Boolean,menuAnchor:{type:String,default:"bottom end"},menuSelf:{type:String,default:"top end"},menuOffset:Array,disableMainBtn:Boolean,disableDropdown:Boolean,noIconAnimation:Boolean,toggleAriaLabel:String},emits:["update:modelValue","click","beforeShow","show","beforeHide","hide"],setup(e,{slots:t,emit:r}){const{proxy:a}=Dt(),l=se(e.modelValue),s=se(null),u=fo(),d=$(()=>{const A={"aria-expanded":l.value===!0?"true":"false","aria-haspopup":"true","aria-controls":u,"aria-label":e.toggleAriaLabel||a.$q.lang.label[l.value===!0?"collapse":"expand"](e.label)};return(e.disable===!0||e.split===!1&&e.disableMainBtn===!0||e.disableDropdown===!0)&&(A["aria-disabled"]="true"),A}),f=$(()=>"q-btn-dropdown__arrow"+(l.value===!0&&e.noIconAnimation===!1?" rotate-180":"")+(e.split===!1?" q-btn-dropdown__arrow-container":"")),g=$(()=>Fb(e)),v=$(()=>Aw(e));Ve(()=>e.modelValue,A=>{s.value!==null&&s.value[A?"show":"hide"]()}),Ve(()=>e.split,D);function C(A){l.value=!0,r("beforeShow",A)}function M(A){r("show",A),r("update:modelValue",!0)}function _(A){l.value=!1,r("beforeHide",A)}function x(A){r("hide",A),r("update:modelValue",!1)}function I(A){r("click",A)}function L(A){ir(A),D(),r("click",A)}function F(A){s.value!==null&&s.value.toggle(A)}function Y(A){s.value!==null&&s.value.show(A)}function D(A){s.value!==null&&s.value.hide(A)}return Object.assign(a,{show:Y,hide:D,toggle:F}),ni(()=>{e.modelValue===!0&&Y()}),()=>{const A=[E(Yt,{class:f.value,name:e.dropdownIcon||a.$q.iconSet.arrow.dropdown})];return e.disableDropdown!==!0&&A.push(E(ag,{ref:s,id:u,class:e.contentClass,style:e.contentStyle,cover:e.cover,fit:!0,persistent:e.persistent,noRouteDismiss:e.noRouteDismiss,autoClose:e.autoClose,anchor:e.menuAnchor,self:e.menuSelf,offset:e.menuOffset,separateClosePopup:!0,transitionShow:e.transitionShow,transitionHide:e.transitionHide,transitionDuration:e.transitionDuration,onBeforeShow:C,onShow:M,onBeforeHide:_,onHide:x},t.default)),e.split===!1?E(ye,{class:"q-btn-dropdown q-btn-dropdown--simple",...v.value,...d.value,disable:e.disable===!0||e.disableMainBtn===!0,noWrap:!0,round:!1,onClick:I},{default:()=>Mt(t.label,[]).concat(A),loading:t.loading}):E(Pw,{class:"q-btn-dropdown q-btn-dropdown--split no-wrap q-btn-item",rounded:e.rounded,square:e.square,...g.value,glossy:e.glossy,stretch:e.stretch},()=>[E(ye,{class:"q-btn-dropdown--current",...v.value,disable:e.disable===!0||e.disableMainBtn===!0,noWrap:!0,round:!1,onClick:L},{default:t.label,loading:t.loading}),E(ye,{class:"q-btn-dropdown__arrow-container q-anchor--skip",...d.value,...g.value,disable:e.disable===!0||e.disableDropdown===!0,rounded:e.rounded,color:e.color,textColor:e.textColor,dense:e.dense,size:e.size,padding:e.padding,ripple:e.ripple},()=>A)])}}}),Sr=Je({name:"QBreadcrumbsEl",props:{...Ao,label:String,icon:String,tag:{type:String,default:"span"}},emits:["click"],setup(e,{slots:t}){const{linkTag:r,linkAttrs:a,linkClass:l,navigateOnClick:s}=Lh(),u=$(()=>({class:"q-breadcrumbs__el q-link flex inline items-center relative-position "+(e.disable!==!0?"q-link--focusable"+l.value:"q-breadcrumbs__el--disable"),...a.value,onClick:s})),d=$(()=>"q-breadcrumbs__el-icon"+(e.label!==void 0?" q-breadcrumbs__el-icon--with-label":""));return()=>{const f=[];return e.icon!==void 0&&f.push(E(Yt,{class:d.value,name:e.icon})),e.label!==void 0&&f.push(e.label),E(r.value,{...u.value},Si(t.default,f))}}});const Ew=["",!0];var Iw=Je({name:"QBreadcrumbs",props:{...Ub,separator:{type:String,default:"/"},separatorColor:String,activeColor:{type:String,default:"primary"},gutter:{type:String,validator:e=>["none","xs","sm","md","lg","xl"].includes(e),default:"sm"}},setup(e,{slots:t}){const r=zb(e),a=$(()=>`flex items-center ${r.value}${e.gutter==="none"?"":` q-gutter-${e.gutter}`}`),l=$(()=>e.separatorColor?` text-${e.separatorColor}`:""),s=$(()=>` text-${e.activeColor}`);return()=>{const u=nc(Mt(t.default));if(u.length===0)return;let d=1;const f=[],g=u.filter(C=>C.type!==void 0&&C.type.name==="QBreadcrumbsEl").length,v=t.separator!==void 0?t.separator:()=>e.separator;return u.forEach(C=>{if(C.type!==void 0&&C.type.name==="QBreadcrumbsEl"){const M=d{const d=(a.header.space===!0?a.header.size:0)+(a.footer.space===!0?a.footer.size:0);if(typeof e.styleFn=="function"){const f=a.isContainer.value===!0?a.containerHeight.value:r.screen.height;return e.styleFn(d,f)}return{minHeight:a.isContainer.value===!0?a.containerHeight.value-d+"px":r.screen.height===0?d!==0?`calc(100vh - ${d}px)`:"100vh":r.screen.height-d+"px"}}),u=$(()=>`q-page${e.padding===!0?" q-layout-padding":""}`);return()=>E("main",{class:u.value,style:s.value},Mt(t.default))}});const Ow=E("div",{class:"q-space"});var Rw=Je({name:"QSpace",setup(){return()=>Ow}});function hh(e){if(e===!1)return 0;if(e===!0||e===void 0)return 1;const t=parseInt(e,10);return isNaN(t)?0:t}var Gi=rc({name:"close-popup",beforeMount(e,{value:t}){const r={depth:hh(t),handler(a){r.depth!==0&&setTimeout(()=>{const l=Wb(e);l!==void 0&&Hb(l,a,r.depth)})},handlerKey(a){Ka(a,13)===!0&&r.handler(a)}};e.__qclosepopup=r,e.addEventListener("click",r.handler),e.addEventListener("keyup",r.handlerKey)},updated(e,{value:t,oldValue:r}){t!==r&&(e.__qclosepopup.depth=hh(t))},beforeUnmount(e){const t=e.__qclosepopup;e.removeEventListener("click",t.handler),e.removeEventListener("keyup",t.handlerKey),delete e.__qclosepopup}});function Lw(){return ho(Kb)}var Pa=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},Nw=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},og={},Mn={};let sc;const Bw=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];Mn.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return t*4+17};Mn.getSymbolTotalCodewords=function(t){return Bw[t]};Mn.getBCHDigit=function(e){let t=0;for(;e!==0;)t++,e>>>=1;return t};Mn.setToSJISFunction=function(t){if(typeof t!="function")throw new Error('"toSJISFunc" is not a valid function.');sc=t};Mn.isKanjiModeEnabled=function(){return typeof sc!="undefined"};Mn.toSJIS=function(t){return sc(t)};var Eo={};(function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(r){if(typeof r!="string")throw new Error("Param is not a string");switch(r.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+r)}}e.isValid=function(a){return a&&typeof a.bit!="undefined"&&a.bit>=0&&a.bit<4},e.from=function(a,l){if(e.isValid(a))return a;try{return t(a)}catch{return l}}})(Eo);function sg(){this.buffer=[],this.length=0}sg.prototype={get:function(e){const t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)===1},put:function(e,t){for(let r=0;r>>t-r-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}};var Fw=sg;function ja(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}ja.prototype.set=function(e,t,r,a){const l=e*this.size+t;this.data[l]=r,a&&(this.reservedBit[l]=!0)};ja.prototype.get=function(e,t){return this.data[e*this.size+t]};ja.prototype.xor=function(e,t,r){this.data[e*this.size+t]^=r};ja.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]};var Uw=ja,ug={};(function(e){const t=Mn.getSymbolSize;e.getRowColCoords=function(a){if(a===1)return[];const l=Math.floor(a/7)+2,s=t(a),u=s===145?26:Math.ceil((s-13)/(2*l-2))*2,d=[s-7];for(let f=1;f=0&&l<=7},e.from=function(l){return e.isValid(l)?parseInt(l,10):void 0},e.getPenaltyN1=function(l){const s=l.size;let u=0,d=0,f=0,g=null,v=null;for(let C=0;C=5&&(u+=t.N1+(d-5)),g=_,d=1),_=l.get(M,C),_===v?f++:(f>=5&&(u+=t.N1+(f-5)),v=_,f=1)}d>=5&&(u+=t.N1+(d-5)),f>=5&&(u+=t.N1+(f-5))}return u},e.getPenaltyN2=function(l){const s=l.size;let u=0;for(let d=0;d=10&&(d===1488||d===93)&&u++,f=f<<1&2047|l.get(v,g),v>=10&&(f===1488||f===93)&&u++}return u*t.N3},e.getPenaltyN4=function(l){let s=0;const u=l.data.length;for(let f=0;f=0;){const u=s[0];for(let f=0;f0){const s=new Uint8Array(this.degree);return s.set(a,l),s}return a};var Vw=uc,gg={},ri={},cc={};cc.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40};var ur={};const mg="[0-9]+",Yw="[A-Z $%*+\\-./:]+";let Va="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";Va=Va.replace(/u/g,"\\u");const Ww="(?:(?![A-Z0-9 $%*+\\-./:]|"+Va+`)(?:.|[\r +]))+`;ur.KANJI=new RegExp(Va,"g");ur.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");ur.BYTE=new RegExp(Ww,"g");ur.NUMERIC=new RegExp(mg,"g");ur.ALPHANUMERIC=new RegExp(Yw,"g");const Hw=new RegExp("^"+Va+"$"),Kw=new RegExp("^"+mg+"$"),Gw=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");ur.testKanji=function(t){return Hw.test(t)};ur.testNumeric=function(t){return Kw.test(t)};ur.testAlphanumeric=function(t){return Gw.test(t)};(function(e){const t=cc,r=ur;e.NUMERIC={id:"Numeric",bit:1<<0,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:1<<1,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:1<<2,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:1<<3,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(s,u){if(!s.ccBits)throw new Error("Invalid mode: "+s);if(!t.isValid(u))throw new Error("Invalid version: "+u);return u>=1&&u<10?s.ccBits[0]:u<27?s.ccBits[1]:s.ccBits[2]},e.getBestModeForData=function(s){return r.testNumeric(s)?e.NUMERIC:r.testAlphanumeric(s)?e.ALPHANUMERIC:r.testKanji(s)?e.KANJI:e.BYTE},e.toString=function(s){if(s&&s.id)return s.id;throw new Error("Invalid mode")},e.isValid=function(s){return s&&s.bit&&s.ccBits};function a(l){if(typeof l!="string")throw new Error("Param is not a string");switch(l.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+l)}}e.from=function(s,u){if(e.isValid(s))return s;try{return a(s)}catch{return u}}})(ri);(function(e){const t=Mn,r=Io,a=Eo,l=ri,s=cc,u=1<<12|1<<11|1<<10|1<<9|1<<8|1<<5|1<<2|1<<0,d=t.getBCHDigit(u);function f(M,_,x){for(let I=1;I<=40;I++)if(_<=e.getCapacity(I,x,M))return I}function g(M,_){return l.getCharCountIndicator(M,_)+4}function v(M,_){let x=0;return M.forEach(function(I){x+=g(I.mode,_)+I.getBitsLength()}),x}function C(M,_){for(let x=1;x<=40;x++)if(v(M,x)<=e.getCapacity(x,_,l.MIXED))return x}e.from=function(_,x){return s.isValid(_)?parseInt(_,10):x},e.getCapacity=function(_,x,I){if(!s.isValid(_))throw new Error("Invalid QR Code version");typeof I=="undefined"&&(I=l.BYTE);const L=t.getSymbolTotalCodewords(_),F=r.getTotalCodewordsCount(_,x),Y=(L-F)*8;if(I===l.MIXED)return Y;const D=Y-g(I,_);switch(I){case l.NUMERIC:return Math.floor(D/10*3);case l.ALPHANUMERIC:return Math.floor(D/11*2);case l.KANJI:return Math.floor(D/13);case l.BYTE:default:return Math.floor(D/8)}},e.getBestVersionForData=function(_,x){let I;const L=a.from(x,a.M);if(Array.isArray(_)){if(_.length>1)return C(_,L);if(_.length===0)return 1;I=_[0]}else I=_;return f(I.mode,I.getLength(),L)},e.getEncodedBits=function(_){if(!s.isValid(_)||_<7)throw new Error("Invalid QR Code version");let x=_<<12;for(;t.getBCHDigit(x)-d>=0;)x^=u<=0;)l^=pg<0&&(a=this.data.substr(r),l=parseInt(a,10),t.put(l,s*3+1))};var Zw=ra;const Jw=ri,pu=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function ia(e){this.mode=Jw.ALPHANUMERIC,this.data=e}ia.getBitsLength=function(t){return 11*Math.floor(t/2)+6*(t%2)};ia.prototype.getLength=function(){return this.data.length};ia.prototype.getBitsLength=function(){return ia.getBitsLength(this.data.length)};ia.prototype.write=function(t){let r;for(r=0;r+2<=this.data.length;r+=2){let a=pu.indexOf(this.data[r])*45;a+=pu.indexOf(this.data[r+1]),t.put(a,11)}this.data.length%2&&t.put(pu.indexOf(this.data[r]),6)};var Xw=ia,eS=function(t){for(var r=[],a=t.length,l=0;l=55296&&s<=56319&&a>l+1){var u=t.charCodeAt(l+1);u>=56320&&u<=57343&&(s=(s-55296)*1024+u-56320+65536,l+=1)}if(s<128){r.push(s);continue}if(s<2048){r.push(s>>6|192),r.push(s&63|128);continue}if(s<55296||s>=57344&&s<65536){r.push(s>>12|224),r.push(s>>6&63|128),r.push(s&63|128);continue}if(s>=65536&&s<=1114111){r.push(s>>18|240),r.push(s>>12&63|128),r.push(s>>6&63|128),r.push(s&63|128);continue}r.push(239,191,189)}return new Uint8Array(r).buffer};const tS=eS,nS=ri;function aa(e){this.mode=nS.BYTE,typeof e=="string"&&(e=tS(e)),this.data=new Uint8Array(e)}aa.getBitsLength=function(t){return t*8};aa.prototype.getLength=function(){return this.data.length};aa.prototype.getBitsLength=function(){return aa.getBitsLength(this.data.length)};aa.prototype.write=function(e){for(let t=0,r=this.data.length;t=33088&&r<=40956)r-=33088;else if(r>=57408&&r<=60351)r-=49472;else throw new Error("Invalid SJIS character: "+this.data[t]+` +Make sure your charset is UTF-8`);r=(r>>>8&255)*192+(r&255),e.put(r,13)}};var lS=la,_g={exports:{}};(function(e){var t={single_source_shortest_paths:function(r,a,l){var s={},u={};u[a]=0;var d=t.PriorityQueue.make();d.push(a,0);for(var f,g,v,C,M,_,x,I,L;!d.empty();){f=d.pop(),g=f.value,C=f.cost,M=r[g]||{};for(v in M)M.hasOwnProperty(v)&&(_=M[v],x=C+_,I=u[v],L=typeof u[v]=="undefined",(L||I>x)&&(u[v]=x,d.push(v,x),s[v]=g))}if(typeof l!="undefined"&&typeof u[l]=="undefined"){var F=["Could not find a path from ",a," to ",l,"."].join("");throw new Error(F)}return s},extract_shortest_path_from_predecessor_list:function(r,a){for(var l=[],s=a;s;)l.push(s),r[s],s=r[s];return l.reverse(),l},find_path:function(r,a,l){var s=t.single_source_shortest_paths(r,a,l);return t.extract_shortest_path_from_predecessor_list(s,l)},PriorityQueue:{make:function(r){var a=t.PriorityQueue,l={},s;r=r||{};for(s in a)a.hasOwnProperty(s)&&(l[s]=a[s]);return l.queue=[],l.sorter=r.sorter||a.default_sorter,l},default_sorter:function(r,a){return r.cost-a.cost},push:function(r,a){var l={value:r,cost:a};this.queue.push(l),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};e.exports=t})(_g);(function(e){const t=ri,r=Zw,a=Xw,l=rS,s=lS,u=ur,d=Mn,f=_g.exports;function g(F){return unescape(encodeURIComponent(F)).length}function v(F,Y,D){const A=[];let N;for(;(N=F.exec(D))!==null;)A.push({data:N[0],index:N.index,mode:Y,length:N[0].length});return A}function C(F){const Y=v(u.NUMERIC,t.NUMERIC,F),D=v(u.ALPHANUMERIC,t.ALPHANUMERIC,F);let A,N;return d.isKanjiModeEnabled()?(A=v(u.BYTE,t.BYTE,F),N=v(u.KANJI,t.KANJI,F)):(A=v(u.BYTE_KANJI,t.BYTE,F),N=[]),Y.concat(D,A,N).sort(function(V,H){return V.index-H.index}).map(function(V){return{data:V.data,mode:V.mode,length:V.length}})}function M(F,Y){switch(Y){case t.NUMERIC:return r.getBitsLength(F);case t.ALPHANUMERIC:return a.getBitsLength(F);case t.KANJI:return s.getBitsLength(F);case t.BYTE:return l.getBitsLength(F)}}function _(F){return F.reduce(function(Y,D){const A=Y.length-1>=0?Y[Y.length-1]:null;return A&&A.mode===D.mode?(Y[Y.length-1].data+=D.data,Y):(Y.push(D),Y)},[])}function x(F){const Y=[];for(let D=0;D=0&&d<=6&&(f===0||f===6)||f>=0&&f<=6&&(d===0||d===6)||d>=2&&d<=4&&f>=2&&f<=4?e.set(s+d,u+f,!0,!0):e.set(s+d,u+f,!1,!0))}}function mS(e){const t=e.size;for(let r=8;r>d&1)===1,e.set(l,s,u,!0),e.set(s,l,u,!0)}function bu(e,t,r){const a=e.size,l=fS.getEncodedBits(t,r);let s,u;for(s=0;s<15;s++)u=(l>>s&1)===1,s<6?e.set(s,8,u,!0):s<8?e.set(s+1,8,u,!0):e.set(a-15+s,8,u,!0),s<8?e.set(8,a-s-1,u,!0):s<9?e.set(8,15-s-1+1,u,!0):e.set(8,15-s-1,u,!0);e.set(a-8,8,1,!0)}function yS(e,t){const r=e.size;let a=-1,l=r-1,s=7,u=0;for(let d=r-1;d>0;d-=2)for(d===6&&d--;;){for(let f=0;f<2;f++)if(!e.isReserved(l,d-f)){let g=!1;u>>s&1)===1),e.set(l,d-f,g),s--,s===-1&&(u++,s=7)}if(l+=a,l<0||r<=l){l-=a,a=-a;break}}}function _S(e,t,r){const a=new oS;r.forEach(function(f){a.put(f.mode.bit,4),a.put(f.getLength(),hS.getCharCountIndicator(f.mode,e)),f.write(a)});const l=Oo.getSymbolTotalCodewords(e),s=Lu.getTotalCodewordsCount(e,t),u=(l-s)*8;for(a.getLengthInBits()+4<=u&&a.put(0,4);a.getLengthInBits()%8!==0;)a.putBit(0);const d=(u-a.getLengthInBits())/8;for(let f=0;f=7&&pS(f,t),yS(f,u),isNaN(a)&&(a=Ru.getBestMask(f,bu.bind(null,f,r))),Ru.applyMask(a,f),bu(f,r,a),{modules:f,version:t,errorCorrectionLevel:r,maskPattern:a,segments:l}}og.create=function(t,r){if(typeof t=="undefined"||t==="")throw new Error("No input text");let a=yu.M,l,s;return typeof r!="undefined"&&(a=yu.from(r.errorCorrectionLevel,yu.M),l=wo.from(r.version),s=Ru.from(r.maskPattern),r.toSJISFunc&&Oo.setToSJISFunction(r.toSJISFunc)),wS(t,l,a,s)};var bg={},dc={};(function(e){function t(r){if(typeof r=="number"&&(r=r.toString()),typeof r!="string")throw new Error("Color should be defined as hex string");let a=r.slice().replace("#","").split("");if(a.length<3||a.length===5||a.length>8)throw new Error("Invalid hex color: "+r);(a.length===3||a.length===4)&&(a=Array.prototype.concat.apply([],a.map(function(s){return[s,s]}))),a.length===6&&a.push("F","F");const l=parseInt(a.join(""),16);return{r:l>>24&255,g:l>>16&255,b:l>>8&255,a:l&255,hex:"#"+a.slice(0,6).join("")}}e.getOptions=function(a){a||(a={}),a.color||(a.color={});const l=typeof a.margin=="undefined"||a.margin===null||a.margin<0?4:a.margin,s=a.width&&a.width>=21?a.width:void 0,u=a.scale||4;return{width:s,scale:s?4:u,margin:l,color:{dark:t(a.color.dark||"#000000ff"),light:t(a.color.light||"#ffffffff")},type:a.type,rendererOpts:a.rendererOpts||{}}},e.getScale=function(a,l){return l.width&&l.width>=a+l.margin*2?l.width/(a+l.margin*2):l.scale},e.getImageWidth=function(a,l){const s=e.getScale(a,l);return Math.floor((a+l.margin*2)*s)},e.qrToImageData=function(a,l,s){const u=l.modules.size,d=l.modules.data,f=e.getScale(u,s),g=Math.floor((u+s.margin*2)*f),v=s.margin*f,C=[s.color.light,s.color.dark];for(let M=0;M=v&&_>=v&&M0&&f>0&&e[d-1]||(a+=s?wu("M",f+r,.5+g+r):wu("m",l,0),l=0,s=!1),f+1':"",g="',v='viewBox="0 0 '+d+" "+d+'"',C=l.width?'width="'+l.width+'" height="'+l.width+'" ':"",M=''+f+g+` -`;return typeof a=="function"&&a(null,M),M};const CS=Nw,Nu=og,Sg=bg,TS=wg;function fc(e,t,r,a,l){const s=[].slice.call(arguments,1),u=s.length,d=typeof s[u-1]=="function";if(!d&&!CS())throw new Error("Callback required as last argument");if(d){if(u<2)throw new Error("Too few arguments provided");u===2?(l=r,r=t,t=a=void 0):u===3&&(t.getContext&&typeof l=="undefined"?(l=a,a=void 0):(l=a,a=r,r=t,t=void 0))}else{if(u<1)throw new Error("Too few arguments provided");return u===1?(r=t,t=a=void 0):u===2&&!t.getContext&&(a=r,r=t,t=void 0),new Promise(function(f,g){try{const v=Nu.create(r,a);f(e(v,t,a))}catch(v){g(v)}})}try{const f=Nu.create(r,a);l(null,e(f,t,a))}catch(f){l(f)}}Nu.create;var MS=fc.bind(null,Sg.render),DS=fc.bind(null,Sg.renderToDataURL),qS=fc.bind(null,function(e,t,r){return TS.render(e,r)});/*! vue-qrcode v2.0.0 | (c) 2018-present Chen Fengyuan | MIT */const ph="ready";var PS=sn({name:"VueQrcode",props:{value:{type:String,default:void 0},options:{type:Object,default:void 0},tag:{type:String,default:"canvas"}},emits:[ph],watch:{$props:{deep:!0,immediate:!0,handler(){this.$el&&this.generate()}}},mounted(){this.generate()},methods:{generate(){const e=this.options||{},t=String(this.value),r=()=>{this.$emit(ph,this.$el)};switch(this.tag){case"canvas":MS(this.$el,t,e,a=>{if(a)throw a;r()});break;case"img":DS(t,e,(a,l)=>{if(a)throw a;this.$el.src=l,this.$el.onload=r});break;case"svg":qS(t,e,(a,l)=>{if(a)throw a;const s=document.createElement("div");s.innerHTML=l;const u=s.querySelector("svg");if(u){const{attributes:d,childNodes:f}=u;Object.keys(d).forEach(g=>{const v=d[Number(g)];this.$el.setAttribute(v.name,v.value)}),Object.keys(f).forEach(g=>{const v=f[Number(g)];this.$el.appendChild(v.cloneNode(!0))}),r()}});break}}},render(){return E(this.tag,this.$slots.default)}});function xS(e){const t=document.createElement("textarea");t.value=e,t.contentEditable="true",t.style.position="fixed";const r=()=>{};Bh(r),document.body.appendChild(t),t.focus(),t.select();const a=document.execCommand("copy");return t.remove(),Fh(r),a}function AS(e){return navigator.clipboard!==void 0?navigator.clipboard.writeText(e):new Promise((t,r)=>{const a=xS(e);a?t(!0):r(a)})}let ES=0;const IS=["click","keydown"],$S={icon:String,label:[Number,String],alert:[Boolean,String],alertIcon:String,name:{type:[Number,String],default:()=>`t_${ES++}`},noCaps:Boolean,tabindex:[String,Number],disable:Boolean,contentClass:String,ripple:{type:[Boolean,Object],default:!0}};function OS(e,t,r,a){const l=ho(Vh,Tr);if(l===Tr)return console.error("QTab/QRouteTab component needs to be child of QTabs"),Tr;const{proxy:s}=Dt(),u=se(null),d=se(null),f=se(null),g=$(()=>e.disable===!0||e.ripple===!1?!1:Object.assign({keyCodes:[13,32],early:!0},e.ripple===!0?{}:e.ripple)),v=$(()=>l.currentModel.value===e.name),C=$(()=>"q-tab relative-position self-stretch flex flex-center text-center"+(v.value===!0?" q-tab--active"+(l.tabProps.value.activeClass?" "+l.tabProps.value.activeClass:"")+(l.tabProps.value.activeColor?` text-${l.tabProps.value.activeColor}`:"")+(l.tabProps.value.activeBgColor?` bg-${l.tabProps.value.activeBgColor}`:""):" q-tab--inactive")+(e.icon&&e.label&&l.tabProps.value.inlineLabel===!1?" q-tab--full":"")+(e.noCaps===!0||l.tabProps.value.noCaps===!0?" q-tab--no-caps":"")+(e.disable===!0?" disabled":" q-focusable q-hoverable cursor-pointer")+(a!==void 0?a.linkClass.value:"")),M=$(()=>"q-tab__content self-stretch flex-center relative-position q-anchor--skip non-selectable "+(l.tabProps.value.inlineLabel===!0?"row no-wrap q-tab__content--inline":"column")+(e.contentClass!==void 0?` ${e.contentClass}`:"")),_=$(()=>e.disable===!0||l.hasFocus.value===!0||v.value===!1&&l.hasActiveTab.value===!0?-1:e.tabindex||0);function x(D,A){if(A!==!0&&u.value!==null&&u.value.focus(),e.disable===!0){a!==void 0&&a.hasRouterLink.value===!0&&Rt(D);return}if(a===void 0){l.updateModel({name:e.name}),r("click",D);return}if(a.hasRouterLink.value===!0){const N=(J={})=>{let V;const H=J.to===void 0||Hi(J.to,e.to)===!0?l.avoidRouteWatcher=fo():null;return a.navigateToRouterLink(D,{...J,returnRouterError:!0}).catch(pe=>{V=pe}).then(pe=>{if(H===l.avoidRouteWatcher&&(l.avoidRouteWatcher=!1,V===void 0&&(pe===void 0||pe.message.startsWith("Avoided redundant navigation")===!0)&&l.updateModel({name:e.name})),J.returnRouterError===!0)return V!==void 0?Promise.reject(V):pe})};r("click",D,N),D.defaultPrevented!==!0&&N();return}r("click",D)}function I(D){Ka(D,[13,32])?x(D,!0):Yh(D)!==!0&&D.keyCode>=35&&D.keyCode<=40&&D.altKey!==!0&&D.metaKey!==!0&&l.onKbdNavigate(D.keyCode,s.$el)===!0&&Rt(D),r("keydown",D)}function L(){const D=l.tabProps.value.narrowIndicator,A=[],N=E("div",{ref:f,class:["q-tab__indicator",l.tabProps.value.indicatorClass]});e.icon!==void 0&&A.push(E(Yt,{class:"q-tab__icon",name:e.icon})),e.label!==void 0&&A.push(E("div",{class:"q-tab__label"},e.label)),e.alert!==!1&&A.push(e.alertIcon!==void 0?E(Yt,{class:"q-tab__alert-icon",color:e.alert!==!0?e.alert:void 0,name:e.alertIcon}):E("div",{class:"q-tab__alert"+(e.alert!==!0?` text-${e.alert}`:"")})),D===!0&&A.push(N);const J=[E("div",{class:"q-focus-helper",tabindex:-1,ref:u}),E("div",{class:M.value},Si(t.default,A))];return D===!1&&J.push(N),J}const F={name:$(()=>e.name),rootRef:d,tabIndicatorRef:f,routeData:a};Ht(()=>{l.unregisterTab(F)}),ni(()=>{l.registerTab(F)});function Y(D,A){const N={ref:d,class:C.value,tabindex:_.value,role:"tab","aria-selected":v.value===!0?"true":"false","aria-disabled":e.disable===!0?"true":void 0,onClick:x,onKeydown:I,...A};return Gn(E(D,N,L()),[[Ju,g.value]])}return{renderTab:Y,$tabs:l}}var Su=Je({name:"QTab",props:$S,emits:IS,setup(e,{slots:t,emit:r}){const{renderTab:a}=OS(e,t,r);return()=>a("div")}});function RS(e,t,r){const a=r===!0?["left","right"]:["top","bottom"];return`absolute-${t===!0?a[0]:a[1]}${e?` text-${e}`:""}`}const LS=["left","center","right","justify"];var NS=Je({name:"QTabs",props:{modelValue:[Number,String],align:{type:String,default:"center",validator:e=>LS.includes(e)},breakpoint:{type:[String,Number],default:600},vertical:Boolean,shrink:Boolean,stretch:Boolean,activeClass:String,activeColor:String,activeBgColor:String,indicatorColor:String,leftIcon:String,rightIcon:String,outsideArrows:Boolean,mobileArrows:Boolean,switchIndicator:Boolean,narrowIndicator:Boolean,inlineLabel:Boolean,noCaps:Boolean,dense:Boolean,contentClass:String,"onUpdate:modelValue":[Function,Array]},setup(e,{slots:t,emit:r}){const{proxy:a}=Dt(),{$q:l}=a,{registerTick:s}=Ra(),{registerTick:u}=Ra(),{registerTick:d}=Ra(),{registerTimeout:f,removeTimeout:g}=co(),{registerTimeout:v,removeTimeout:C}=co(),M=se(null),_=se(null),x=se(e.modelValue),I=se(!1),L=se(!0),F=se(!1),Y=se(!1),D=[],A=se(0),N=se(!1);let J=null,V=null,H;const pe=$(()=>({activeClass:e.activeClass,activeColor:e.activeColor,activeBgColor:e.activeBgColor,indicatorClass:RS(e.indicatorColor,e.switchIndicator,e.vertical),narrowIndicator:e.narrowIndicator,inlineLabel:e.inlineLabel,noCaps:e.noCaps})),_e=$(()=>{const K=A.value,de=x.value;for(let qe=0;qe`q-tabs__content--align-${I.value===!0?"left":Y.value===!0?"justify":e.align}`),lt=$(()=>`q-tabs row no-wrap items-center q-tabs--${I.value===!0?"":"not-"}scrollable q-tabs--${e.vertical===!0?"vertical":"horizontal"} q-tabs__arrows--${e.outsideArrows===!0?"outside":"inside"} q-tabs--mobile-with${e.mobileArrows===!0?"":"out"}-arrows`+(e.dense===!0?" q-tabs--dense":"")+(e.shrink===!0?" col-shrink":"")+(e.stretch===!0?" self-stretch":"")),te=$(()=>"q-tabs__content scroll--mobile row no-wrap items-center self-stretch hide-scrollbar relative-position "+xe.value+(e.contentClass!==void 0?` ${e.contentClass}`:"")),Pe=$(()=>e.vertical===!0?{container:"height",content:"offsetHeight",scroll:"scrollHeight"}:{container:"width",content:"offsetWidth",scroll:"scrollWidth"}),Be=$(()=>e.vertical!==!0&&l.lang.rtl===!0),j=$(()=>za===!1&&Be.value===!0);Ve(Be,he),Ve(()=>e.modelValue,K=>{G({name:K,setCurrent:!0,skipEmit:!0})}),Ve(()=>e.outsideArrows,me);function G({name:K,setCurrent:de,skipEmit:qe}){x.value!==K&&(qe!==!0&&e["onUpdate:modelValue"]!==void 0&&r("update:modelValue",K),(de===!0||e["onUpdate:modelValue"]===void 0)&&(X(x.value,K),x.value=K))}function me(){s(()=>{rt({width:M.value.offsetWidth,height:M.value.offsetHeight})})}function rt(K){if(Pe.value===void 0||_.value===null)return;const de=K[Pe.value.container],qe=Math.min(_.value[Pe.value.scroll],Array.prototype.reduce.call(_.value.children,(it,Ze)=>it+(Ze[Pe.value.content]||0),0)),gt=de>0&&qe>de;I.value=gt,gt===!0&&u(he),Y.value=deit.name.value===K):null,gt=de!=null&&de!==""?D.find(it=>it.name.value===de):null;if(qe&>){const it=qe.tabIndicatorRef.value,Ze=gt.tabIndicatorRef.value;J!==null&&(clearTimeout(J),J=null),it.style.transition="none",it.style.transform="none",Ze.style.transition="none",Ze.style.transform="none";const Fe=it.getBoundingClientRect(),mt=Ze.getBoundingClientRect();Ze.style.transform=e.vertical===!0?`translate3d(0,${Fe.top-mt.top}px,0) scale3d(1,${mt.height?Fe.height/mt.height:1},1)`:`translate3d(${Fe.left-mt.left}px,0,0) scale3d(${mt.width?Fe.width/mt.width:1},1,1)`,d(()=>{J=setTimeout(()=>{J=null,Ze.style.transition="transform .25s cubic-bezier(.4, 0, .2, 1)",Ze.style.transform="none"},70)})}gt&&I.value===!0&&Z(gt.rootRef.value)}function Z(K){const{left:de,width:qe,top:gt,height:it}=_.value.getBoundingClientRect(),Ze=K.getBoundingClientRect();let Fe=e.vertical===!0?Ze.top-gt:Ze.left-de;if(Fe<0){_.value[e.vertical===!0?"scrollTop":"scrollLeft"]+=Math.floor(Fe),he();return}Fe+=e.vertical===!0?Ze.height-it:Ze.width-qe,Fe>0&&(_.value[e.vertical===!0?"scrollTop":"scrollLeft"]+=Math.ceil(Fe),he())}function he(){const K=_.value;if(K===null)return;const de=K.getBoundingClientRect(),qe=e.vertical===!0?K.scrollTop:Math.abs(K.scrollLeft);Be.value===!0?(L.value=Math.ceil(qe+de.width)0):(L.value=qe>0,F.value=e.vertical===!0?Math.ceil(qe+de.height){ee(K)===!0&&we()},5)}function Ge(){fe(j.value===!0?Number.MAX_SAFE_INTEGER:0)}function ze(){fe(j.value===!0?0:Number.MAX_SAFE_INTEGER)}function we(){V!==null&&(clearInterval(V),V=null)}function Te(K,de){const qe=Array.prototype.filter.call(_.value.children,mt=>mt===de||mt.matches&&mt.matches(".q-tab.q-focusable")===!0),gt=qe.length;if(gt===0)return;if(K===36)return Z(qe[0]),qe[0].focus(),!0;if(K===35)return Z(qe[gt-1]),qe[gt-1].focus(),!0;const it=K===(e.vertical===!0?38:37),Ze=K===(e.vertical===!0?40:39),Fe=it===!0?-1:Ze===!0?1:void 0;if(Fe!==void 0){const mt=Be.value===!0?-1:1,Pt=qe.indexOf(de)+Fe*mt;return Pt>=0&&Ptj.value===!0?{get:K=>Math.abs(K.scrollLeft),set:(K,de)=>{K.scrollLeft=-de}}:e.vertical===!0?{get:K=>K.scrollTop,set:(K,de)=>{K.scrollTop=de}}:{get:K=>K.scrollLeft,set:(K,de)=>{K.scrollLeft=de}});function ee(K){const de=_.value,{get:qe,set:gt}=ft.value;let it=!1,Ze=qe(de);const Fe=K=K)&&(it=!0,Ze=K),gt(de,Ze),he(),it}function wt(K,de){for(const qe in K)if(K[qe]!==de[qe])return!1;return!0}function nn(){let K=null,de={matchedLen:0,queryDiff:9999,hrefLen:0};const qe=D.filter(Fe=>Fe.routeData!==void 0&&Fe.routeData.hasRouterLink.value===!0),{hash:gt,query:it}=a.$route,Ze=Object.keys(it).length;for(const Fe of qe){const mt=Fe.routeData.exact.value===!0;if(Fe.routeData[mt===!0?"linkIsExactActive":"linkIsActive"].value!==!0)continue;const{hash:Pt,query:cn,matched:er,href:ii}=Fe.routeData.resolvedLink.value,Un=Object.keys(cn).length;if(mt===!0){if(Pt!==gt||Un!==Ze||wt(it,cn)===!1)continue;K=Fe.name.value;break}if(Pt!==""&&Pt!==gt||Un!==0&&wt(cn,it)===!1)continue;const Qt={matchedLen:er.length,queryDiff:Ze-Un,hrefLen:ii.length-Pt.length};if(Qt.matchedLen>de.matchedLen){K=Fe.name.value,de=Qt;continue}else if(Qt.matchedLen!==de.matchedLen)continue;if(Qt.queryDiffde.hrefLen&&(K=Fe.name.value,de=Qt)}K===null&&D.some(Fe=>Fe.routeData===void 0&&Fe.name.value===x.value)===!0||G({name:K,setCurrent:!0})}function un(K){if(g(),N.value!==!0&&M.value!==null&&K.target&&typeof K.target.closest=="function"){const de=K.target.closest(".q-tab");de&&M.value.contains(de)===!0&&(N.value=!0,I.value===!0&&Z(de))}}function rn(){f(()=>{N.value=!1},30)}function qt(){Fn.avoidRouteWatcher===!1?v(nn):C()}function Kt(){if(H===void 0){const K=Ve(()=>a.$route.fullPath,qt);H=()=>{K(),H=void 0}}}function Xn(K){D.push(K),A.value++,me(),K.routeData===void 0||a.$route===void 0?v(()=>{if(I.value===!0){const de=x.value,qe=de!=null&&de!==""?D.find(gt=>gt.name.value===de):null;qe&&Z(qe.rootRef.value)}}):(Kt(),K.routeData.hasRouterLink.value===!0&&qt())}function Gt(K){D.splice(D.indexOf(K),1),A.value--,me(),H!==void 0&&K.routeData!==void 0&&(D.every(de=>de.routeData===void 0)===!0&&H(),qt())}const Fn={currentModel:x,tabProps:pe,hasFocus:N,hasActiveTab:_e,registerTab:Xn,unregisterTab:Gt,verifyRouteModel:qt,updateModel:G,onKbdNavigate:Te,avoidRouteWatcher:!1};Wh(Vh,Fn);function $r(){J!==null&&clearTimeout(J),we(),H!==void 0&&H()}let St;return Ht($r),oa(()=>{St=H!==void 0,$r()}),sa(()=>{St===!0&&Kt(),me()}),()=>E("div",{ref:M,class:lt.value,role:"tablist",onFocusin:un,onFocusout:rn},[E(Eu,{onResize:rt}),E("div",{ref:_,class:te.value,onScroll:he},Mt(t.default)),E(Yt,{class:"q-tabs__arrow q-tabs__arrow--left absolute q-tab__icon"+(L.value===!0?"":" q-tabs__arrow--faded"),name:e.leftIcon||l.iconSet.tabs[e.vertical===!0?"up":"left"],onMousedownPassive:Ge,onTouchstartPassive:Ge,onMouseupPassive:we,onMouseleavePassive:we,onTouchendPassive:we}),E(Yt,{class:"q-tabs__arrow q-tabs__arrow--right absolute q-tab__icon"+(F.value===!0?"":" q-tabs__arrow--faded"),name:e.rightIcon||l.iconSet.tabs[e.vertical===!0?"down":"right"],onMousedownPassive:ze,onTouchstartPassive:ze,onMouseupPassive:we,onMouseleavePassive:we,onTouchendPassive:we})])}}),BS=Je({name:"QField",inheritAttrs:!1,props:ic,emits:Hh,setup(){return Kh(Gh())}});function no(e,t,r){return r<=t?t:Math.min(r,Math.max(t,e))}function yh(e,t,r){if(r<=t)return t;const a=r-t+1;let l=t+(e-t)%a;return l["add","add-unique","toggle"].includes(e),FS=".*+?^${}()|[]\\",US=Object.keys(ic);var $a=Je({name:"QSelect",inheritAttrs:!1,props:{...rg,...Gb,...ic,modelValue:{required:!0},multiple:Boolean,displayValue:[String,Number],displayValueHtml:Boolean,dropdownIcon:String,options:{type:Array,default:()=>[]},optionValue:[Function,String],optionLabel:[Function,String],optionDisable:[Function,String],hideSelected:Boolean,hideDropdownIcon:Boolean,fillInput:Boolean,maxValues:[Number,String],optionsDense:Boolean,optionsDark:{type:Boolean,default:null},optionsSelectedClass:String,optionsHtml:Boolean,optionsCover:Boolean,menuShrink:Boolean,menuAnchor:String,menuSelf:String,menuOffset:Array,popupContentClass:String,popupContentStyle:[String,Array,Object],useInput:Boolean,useChips:Boolean,newValueMode:{type:String,validator:_h},mapOptions:Boolean,emitValue:Boolean,inputDebounce:{type:[Number,String],default:500},inputClass:[Array,String,Object],inputStyle:[Array,String,Object],tabindex:{type:[String,Number],default:0},autocomplete:String,transitionShow:String,transitionHide:String,transitionDuration:[String,Number],behavior:{type:String,validator:e=>["default","menu","dialog"].includes(e),default:"default"},virtualScrollItemSize:{type:[Number,String],default:void 0},onNewValue:Function,onFilter:Function},emits:[...Hh,"add","remove","inputValue","newValue","keyup","keypress","keydown","filterAbort"],setup(e,{slots:t,emit:r}){const{proxy:a}=Dt(),{$q:l}=a,s=se(!1),u=se(!1),d=se(-1),f=se(""),g=se(!1),v=se(!1);let C=null,M,_,x,I=null,L,F,Y,D;const A=se(null),N=se(null),J=se(null),V=se(null),H=se(null),pe=Qb(e),_e=Jb(sl),xe=$(()=>Array.isArray(e.options)?e.options.length:0),lt=$(()=>e.virtualScrollItemSize===void 0?e.optionsDense===!0?24:48:e.virtualScrollItemSize),{virtualScrollSliceRange:te,virtualScrollSliceSizeComputed:Pe,localResetVirtualScroll:Be,padVirtualScroll:j,onVirtualScrollEvt:G,scrollTo:me,setVirtualScrollSize:rt}=ig({virtualScrollLength:xe,getVirtualScrollTarget:al,getVirtualScrollEl:il,virtualScrollItemSizeComputed:lt}),X=Gh(),Z=$(()=>{const T=e.mapOptions===!0&&e.multiple!==!0,le=e.modelValue!==void 0&&(e.modelValue!==null||T===!0)?e.multiple===!0&&Array.isArray(e.modelValue)?e.modelValue:[e.modelValue]:[];if(e.mapOptions===!0&&Array.isArray(e.options)===!0){const re=e.mapOptions===!0&&M!==void 0?M:[],Me=le.map(st=>ii(st,re));return e.modelValue===null&&T===!0?Me.filter(st=>st!==null):Me}return le}),he=$(()=>{const T={};return US.forEach(le=>{const re=e[le];re!==void 0&&(T[le]=re)}),T}),fe=$(()=>e.optionsDark===null?X.isDark.value:e.optionsDark),Ge=$(()=>lh(Z.value)),ze=$(()=>{let T="q-field__input q-placeholder col";return e.hideSelected===!0||Z.value.length===0?[T,e.inputClass]:(T+=" q-field__input--padding",e.inputClass===void 0?T:[T,e.inputClass])}),we=$(()=>(e.virtualScrollHorizontal===!0?"q-virtual-scroll--horizontal":"")+(e.popupContentClass?" "+e.popupContentClass:"")),Te=$(()=>xe.value===0),ft=$(()=>Z.value.map(T=>K.value(T)).join(", ")),ee=$(()=>e.displayValue!==void 0?e.displayValue:ft.value),wt=$(()=>e.optionsHtml===!0?()=>!0:T=>T!=null&&T.html===!0),nn=$(()=>e.displayValueHtml===!0||e.displayValue===void 0&&(e.optionsHtml===!0||Z.value.some(wt.value))),un=$(()=>X.focused.value===!0?e.tabindex:-1),rn=$(()=>{const T={tabindex:e.tabindex,role:"combobox","aria-label":e.label,"aria-readonly":e.readonly===!0?"true":"false","aria-autocomplete":e.useInput===!0?"list":"none","aria-expanded":s.value===!0?"true":"false","aria-controls":`${X.targetUid.value}_lb`};return d.value>=0&&(T["aria-activedescendant"]=`${X.targetUid.value}_${d.value}`),T}),qt=$(()=>({id:`${X.targetUid.value}_lb`,role:"listbox","aria-multiselectable":e.multiple===!0?"true":"false"})),Kt=$(()=>Z.value.map((T,le)=>({index:le,opt:T,html:wt.value(T),selected:!0,removeAtIndex:Fe,toggleOption:Pt,tabindex:un.value}))),Xn=$(()=>{if(xe.value===0)return[];const{from:T,to:le}=te.value;return e.options.slice(T,le).map((re,Me)=>{const st=de.value(re)===!0,tt=T+Me,kt={clickable:!0,active:!1,activeClass:$r.value,manualFocus:!0,focused:!1,disable:st,tabindex:-1,dense:e.optionsDense,dark:fe.value,role:"option",id:`${X.targetUid.value}_${tt}`,onClick:()=>{Pt(re)}};return st!==!0&&(Qt(re)===!0&&(kt.active=!0),d.value===tt&&(kt.focused=!0),kt["aria-selected"]=kt.active===!0?"true":"false",l.platform.is.desktop===!0&&(kt.onMousemove=()=>{s.value===!0&&cn(tt)})),{index:tt,opt:re,html:wt.value(re),label:K.value(re),selected:kt.active,focused:kt.focused,toggleOption:Pt,setOptionIndex:cn,itemProps:kt}})}),Gt=$(()=>e.dropdownIcon!==void 0?e.dropdownIcon:l.iconSet.arrow.dropdown),Fn=$(()=>e.optionsCover===!1&&e.outlined!==!0&&e.standout!==!0&&e.borderless!==!0&&e.rounded!==!0),$r=$(()=>e.optionsSelectedClass!==void 0?e.optionsSelectedClass:e.color!==void 0?`text-${e.color}`:""),St=$(()=>Un(e.optionValue,"value")),K=$(()=>Un(e.optionLabel,"label")),de=$(()=>Un(e.optionDisable,"disable")),qe=$(()=>Z.value.map(T=>St.value(T))),gt=$(()=>{const T={onInput:sl,onChange:_e,onKeydown:rl,onKeyup:Mi,onKeypress:nl,onFocus:Ci,onClick(le){_===!0&&ir(le)}};return T.onCompositionstart=T.onCompositionupdate=T.onCompositionend=_e,T});Ve(Z,T=>{M=T,e.useInput===!0&&e.fillInput===!0&&e.multiple!==!0&&X.innerLoading.value!==!0&&(u.value!==!0&&s.value!==!0||Ge.value!==!0)&&(x!==!0&&Br(),(u.value===!0||s.value===!0)&&Rr(""))},{immediate:!0}),Ve(()=>e.fillInput,Br),Ve(s,qi),Ve(xe,ns);function it(T){return e.emitValue===!0?St.value(T):T}function Ze(T){if(T>-1&&T=e.maxValues)return;const Me=e.modelValue.slice();r("add",{index:Me.length,value:re}),Me.push(re),r("update:modelValue",Me)}function Pt(T,le){if(X.editable.value!==!0||T===void 0||de.value(T)===!0)return;const re=St.value(T);if(e.multiple!==!0){le!==!0&&(Or(e.fillInput===!0?K.value(T):"",!0,!0),fr()),N.value!==null&&N.value.focus(),(Z.value.length===0||Hi(St.value(Z.value[0]),re)!==!0)&&r("update:modelValue",e.emitValue===!0?re:T);return}if((_!==!0||g.value===!0)&&X.focus(),Ci(),Z.value.length===0){const tt=e.emitValue===!0?re:T;r("add",{index:0,value:tt}),r("update:modelValue",e.multiple===!0?[tt]:tt);return}const Me=e.modelValue.slice(),st=qe.value.findIndex(tt=>Hi(tt,re));if(st>-1)r("remove",{index:st,value:Me.splice(st,1)[0]});else{if(e.maxValues!==void 0&&Me.length>=e.maxValues)return;const tt=e.emitValue===!0?re:T;r("add",{index:Me.length,value:tt}),Me.push(tt)}r("update:modelValue",Me)}function cn(T){if(l.platform.is.desktop!==!0)return;const le=T>-1&&T=0?K.value(e.options[re]):L))}}function ii(T,le){const re=Me=>Hi(St.value(Me),T);return e.options.find(re)||le.find(re)||T}function Un(T,le){const re=T!==void 0?T:le;return typeof re=="function"?re:Me=>Me!==null&&typeof Me=="object"&&re in Me?Me[re]:Me}function Qt(T){const le=St.value(T);return qe.value.find(re=>Hi(re,le))!==void 0}function Ci(T){e.useInput===!0&&N.value!==null&&(T===void 0||N.value===T.target&&T.target.value===ft.value)&&N.value.select()}function Ti(T){Ka(T,27)===!0&&s.value===!0&&(ir(T),fr(),Br()),r("keyup",T)}function Mi(T){const{value:le}=T.target;if(T.keyCode!==void 0){Ti(T);return}if(T.target.value="",C!==null&&(clearTimeout(C),C=null),Br(),typeof le=="string"&&le.length!==0){const re=le.toLocaleLowerCase(),Me=tt=>{const kt=e.options.find(Bt=>tt.value(Bt).toLocaleLowerCase()===re);return kt===void 0?!1:(Z.value.indexOf(kt)===-1?Pt(kt):fr(),!0)},st=tt=>{Me(St)!==!0&&(Me(K)===!0||tt===!0||Rr(le,!0,()=>st(!0)))};st()}else X.clearValue(T)}function nl(T){r("keypress",T)}function rl(T){if(r("keydown",T),Yh(T)===!0)return;const le=f.value.length!==0&&(e.newValueMode!==void 0||e.onNewValue!==void 0),re=T.shiftKey!==!0&&e.multiple!==!0&&(d.value>-1||le===!0);if(T.keyCode===27){yi(T);return}if(T.keyCode===9&&re===!1){Lr();return}if(T.target===void 0||T.target.id!==X.targetUid.value||X.editable.value!==!0)return;if(T.keyCode===40&&X.innerLoading.value!==!0&&s.value===!1){Rt(T),Nr();return}if(T.keyCode===8&&e.hideSelected!==!0&&f.value.length===0){e.multiple===!0&&Array.isArray(e.modelValue)===!0?Ze(e.modelValue.length-1):e.multiple!==!0&&e.modelValue!==null&&r("update:modelValue",null);return}(T.keyCode===35||T.keyCode===36)&&(typeof f.value!="string"||f.value.length===0)&&(Rt(T),d.value=-1,er(T.keyCode===36?1:-1,e.multiple)),(T.keyCode===33||T.keyCode===34)&&Pe.value!==void 0&&(Rt(T),d.value=Math.max(-1,Math.min(xe.value,d.value+(T.keyCode===33?-1:1)*Pe.value.view)),er(T.keyCode===33?1:-1,e.multiple)),(T.keyCode===38||T.keyCode===40)&&(Rt(T),er(T.keyCode===38?-1:1,e.multiple));const Me=xe.value;if((Y===void 0||D0&&e.useInput!==!0&&T.key!==void 0&&T.key.length===1&&T.altKey===!1&&T.ctrlKey===!1&&T.metaKey===!1&&(T.keyCode!==32||Y.length!==0)){s.value!==!0&&Nr(T);const st=T.key.toLocaleLowerCase(),tt=Y.length===1&&Y[0]===st;D=Date.now()+1500,tt===!1&&(Rt(T),Y+=st);const kt=new RegExp("^"+Y.split("").map(Pi=>FS.indexOf(Pi)>-1?"\\"+Pi:Pi).join(".*"),"i");let Bt=d.value;if(tt===!0||Bt<0||kt.test(K.value(e.options[Bt]))!==!0)do Bt=yh(Bt+1,-1,Me-1);while(Bt!==d.value&&(de.value(e.options[Bt])===!0||kt.test(K.value(e.options[Bt]))!==!0));d.value!==Bt&&Sn(()=>{cn(Bt),me(Bt),Bt>=0&&e.useInput===!0&&e.fillInput===!0&&Di(K.value(e.options[Bt]))});return}if(!(T.keyCode!==13&&(T.keyCode!==32||e.useInput===!0||Y!=="")&&(T.keyCode!==9||re===!1))){if(T.keyCode!==9&&Rt(T),d.value>-1&&d.value{if(kt){if(_h(kt)!==!0)return}else kt=e.newValueMode;if(Or("",e.multiple!==!0,!0),tt==null)return;(kt==="toggle"?Pt:mt)(tt,kt==="add-unique"),e.multiple!==!0&&(N.value!==null&&N.value.focus(),fr())};if(e.onNewValue!==void 0?r("newValue",f.value,st):st(f.value),e.multiple!==!0)return}s.value===!0?Lr():X.innerLoading.value!==!0&&Nr()}}function il(){return _===!0?H.value:J.value!==null&&J.value.contentEl!==null?J.value.contentEl:void 0}function al(){return il()}function ll(){return e.hideSelected===!0?[]:t["selected-item"]!==void 0?Kt.value.map(T=>t["selected-item"](T)).slice():t.selected!==void 0?[].concat(t.selected()):e.useChips===!0?Kt.value.map((T,le)=>E(Qa,{key:"option-"+le,removable:X.editable.value===!0&&de.value(T.opt)!==!0,dense:!0,textColor:e.color,tabindex:un.value,onRemove(){T.removeAtIndex(le)}},()=>E("span",{class:"ellipsis",[T.html===!0?"innerHTML":"textContent"]:K.value(T.opt)}))):[E("span",{[nn.value===!0?"innerHTML":"textContent"]:ee.value})]}function ol(){if(Te.value===!0)return t["no-option"]!==void 0?t["no-option"]({inputValue:f.value}):void 0;const T=t.option!==void 0?t.option:re=>E(Vt,{key:re.index,...re.itemProps},()=>E(Ie,()=>E(Ke,()=>E("span",{[re.html===!0?"innerHTML":"textContent"]:re.label}))));let le=j("div",Xn.value.map(T));return t["before-options"]!==void 0&&(le=t["before-options"]().concat(le)),Si(t["after-options"],le)}function Go(T,le){const re=le===!0?{...rn.value,...X.splitAttrs.attributes.value}:void 0,Me={ref:le===!0?N:void 0,key:"i_t",class:ze.value,style:e.inputStyle,value:f.value!==void 0?f.value:"",type:"search",...re,id:le===!0?X.targetUid.value:void 0,maxlength:e.maxlength,autocomplete:e.autocomplete,"data-autofocus":T===!0||e.autofocus===!0||void 0,disabled:e.disable===!0,readonly:e.readonly===!0,...gt.value};return T!==!0&&_===!0&&(Array.isArray(Me.class)===!0?Me.class=[...Me.class,"no-pointer-events"]:Me.class+=" no-pointer-events"),E("input",Me)}function sl(T){C!==null&&(clearTimeout(C),C=null),!(T&&T.target&&T.target.qComposing===!0)&&(Di(T.target.value||""),x=!0,L=f.value,X.focused.value!==!0&&(_!==!0||g.value===!0)&&X.focus(),e.onFilter!==void 0&&(C=setTimeout(()=>{C=null,Rr(f.value)},e.inputDebounce)))}function Di(T){f.value!==T&&(f.value=T,r("inputValue",T))}function Or(T,le,re){x=re!==!0,e.useInput===!0&&(Di(T),(le===!0||re!==!0)&&(L=T),le!==!0&&Rr(T))}function Rr(T,le,re){if(e.onFilter===void 0||le!==!0&&X.focused.value!==!0)return;X.innerLoading.value===!0?r("filterAbort"):(X.innerLoading.value=!0,v.value=!0),T!==""&&e.multiple!==!0&&Z.value.length!==0&&x!==!0&&T===K.value(Z.value[0])&&(T="");const Me=setTimeout(()=>{s.value===!0&&(s.value=!1)},10);I!==null&&clearTimeout(I),I=Me,r("filter",T,(st,tt)=>{(le===!0||X.focused.value===!0)&&I===Me&&(clearTimeout(I),typeof st=="function"&&st(),v.value=!1,Sn(()=>{X.innerLoading.value=!1,X.editable.value===!0&&(le===!0?s.value===!0&&fr():s.value===!0?qi(!0):s.value=!0),typeof tt=="function"&&Sn(()=>{tt(a)}),typeof re=="function"&&Sn(()=>{re(a)})}))},()=>{X.focused.value===!0&&I===Me&&(clearTimeout(I),X.innerLoading.value=!1,v.value=!1),s.value===!0&&(s.value=!1)})}function Qo(){return E(ag,{ref:J,class:we.value,style:e.popupContentStyle,modelValue:s.value,fit:e.menuShrink!==!0,cover:e.optionsCover===!0&&Te.value!==!0&&e.useInput!==!0,anchor:e.menuAnchor,self:e.menuSelf,offset:e.menuOffset,dark:fe.value,noParentEvent:!0,noRefocus:!0,noFocus:!0,square:Fn.value,transitionShow:e.transitionShow,transitionHide:e.transitionHide,transitionDuration:e.transitionDuration,separateClosePopup:!0,...qt.value,onScrollPassive:G,onBeforeShow:cl,onBeforeHide:jo,onShow:da},ol)}function jo(T){dl(T),Lr()}function da(){rt()}function Zo(T){ir(T),N.value!==null&&N.value.focus(),g.value=!0,window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,0)}function fa(T){ir(T),Sn(()=>{g.value=!1})}function Jo(){const T=[E(BS,{class:`col-auto ${X.fieldClass.value}`,...he.value,for:X.targetUid.value,dark:fe.value,square:!0,loading:v.value,itemAligned:!1,filled:!0,stackLabel:f.value.length!==0,...X.splitAttrs.listeners.value,onFocus:Zo,onBlur:fa},{...t,rawControl:()=>X.getControl(!0),before:void 0,after:void 0})];return s.value===!0&&T.push(E("div",{ref:H,class:we.value+" scroll",style:e.popupContentStyle,...qt.value,onClick:yi,onScrollPassive:G},ol())),E(go,{ref:V,modelValue:u.value,position:e.useInput===!0?"top":void 0,transitionShow:F,transitionHide:e.transitionHide,transitionDuration:e.transitionDuration,onBeforeShow:cl,onBeforeHide:Xo,onHide:es,onShow:ts},()=>E("div",{class:"q-select__dialog"+(fe.value===!0?" q-select__dialog--dark q-dark":"")+(g.value===!0?" q-select__dialog--focused":"")},T))}function Xo(T){dl(T),V.value!==null&&V.value.__updateRefocusTarget(X.rootRef.value.querySelector(".q-field__native > [tabindex]:last-child")),X.focused.value=!1}function es(T){fr(),X.focused.value===!1&&r("blur",T),Br()}function ts(){const T=document.activeElement;(T===null||T.id!==X.targetUid.value)&&N.value!==null&&N.value!==T&&N.value.focus(),rt()}function Lr(){u.value!==!0&&(d.value=-1,s.value===!0&&(s.value=!1),X.focused.value===!1&&(I!==null&&(clearTimeout(I),I=null),X.innerLoading.value===!0&&(r("filterAbort"),X.innerLoading.value=!1,v.value=!1)))}function Nr(T){X.editable.value===!0&&(_===!0?(X.onControlFocusin(T),u.value=!0,Sn(()=>{X.focus()})):X.focus(),e.onFilter!==void 0?Rr(f.value):(Te.value!==!0||t["no-option"]!==void 0)&&(s.value=!0))}function fr(){u.value=!1,Lr()}function Br(){e.useInput===!0&&Or(e.multiple!==!0&&e.fillInput===!0&&Z.value.length!==0&&K.value(Z.value[0])||"",!0,!0)}function qi(T){let le=-1;if(T===!0){if(Z.value.length!==0){const re=St.value(Z.value[0]);le=e.options.findIndex(Me=>Hi(St.value(Me),re))}Be(le)}cn(le)}function ns(T,le){s.value===!0&&X.innerLoading.value===!1&&(Be(-1,!0),Sn(()=>{s.value===!0&&X.innerLoading.value===!1&&(T>le?Be():qi(!0))}))}function ul(){u.value===!1&&J.value!==null&&J.value.updatePosition()}function cl(T){T!==void 0&&ir(T),r("popupShow",T),X.hasPopupOpen=!0,X.onControlFocusin(T)}function dl(T){T!==void 0&&ir(T),r("popupHide",T),X.hasPopupOpen=!1,X.onControlFocusout(T)}function fl(){_=l.platform.is.mobile!==!0&&e.behavior!=="dialog"?!1:e.behavior!=="menu"&&(e.useInput===!0?t["no-option"]!==void 0||e.onFilter!==void 0||Te.value===!1:!0),F=l.platform.is.ios===!0&&_===!0&&e.useInput===!0?"fade":e.transitionShow}return jb(fl),Zb(ul),fl(),Ht(()=>{C!==null&&clearTimeout(C)}),Object.assign(a,{showPopup:Nr,hidePopup:fr,removeAtIndex:Ze,add:mt,toggleOption:Pt,getOptionIndex:()=>d.value,setOptionIndex:cn,moveOptionSelection:er,filter:Rr,updateMenuPosition:ul,updateInputValue:Or,isOptionSelected:Qt,getEmittingOptionValue:it,isOptionDisabled:(...T)=>de.value.apply(null,T)===!0,getOptionValue:(...T)=>St.value.apply(null,T),getOptionLabel:(...T)=>K.value.apply(null,T)}),Object.assign(X,{innerValue:Z,fieldClass:$(()=>`q-select q-field--auto-height q-select--with${e.useInput!==!0?"out":""}-input q-select--with${e.useChips!==!0?"out":""}-chips q-select--${e.multiple===!0?"multiple":"single"}`),inputRef:A,targetRef:N,hasValue:Ge,showPopup:Nr,floatingLabel:$(()=>e.hideSelected!==!0&&Ge.value===!0||typeof f.value=="number"||f.value.length!==0||lh(e.displayValue)),getControlChild:()=>{if(X.editable.value!==!1&&(u.value===!0||Te.value!==!0||t["no-option"]!==void 0))return _===!0?Jo():Qo();X.hasPopupOpen===!0&&(X.hasPopupOpen=!1)},controlEvents:{onFocusin(T){X.onControlFocusin(T)},onFocusout(T){X.onControlFocusout(T,()=>{Br(),Lr()})},onClick(T){if(yi(T),_!==!0&&s.value===!0){Lr(),N.value!==null&&N.value.focus();return}Nr(T)}},getControl:T=>{const le=ll(),re=T===!0||u.value!==!0||_!==!0;if(e.useInput===!0)le.push(Go(T,re));else if(X.editable.value===!0){const st=re===!0?rn.value:void 0;le.push(E("input",{ref:re===!0?N:void 0,key:"d_t",class:"q-select__focus-target",id:re===!0?X.targetUid.value:void 0,value:ee.value,readonly:!0,"data-autofocus":T===!0||e.autofocus===!0||void 0,...st,onKeydown:rl,onKeyup:Ti,onKeypress:nl})),re===!0&&typeof e.autocomplete=="string"&&e.autocomplete.length!==0&&le.push(E("input",{class:"q-select__autocomplete-input",autocomplete:e.autocomplete,tabindex:-1,onKeyup:Mi}))}if(pe.value!==void 0&&e.disable!==!0&&qe.value.length!==0){const st=qe.value.map(tt=>E("option",{value:tt,selected:!0}));le.push(E("select",{class:"hidden",name:pe.value,multiple:e.multiple},st))}const Me=e.useInput===!0||re!==!0?void 0:X.splitAttrs.attributes.value;return E("div",{class:"q-field__native row items-center",...Me,...X.splitAttrs.listeners.value},le)},getInnerAppend:()=>e.loading!==!0&&v.value!==!0&&e.hideDropdownIcon!==!0?[E(Yt,{class:"q-select__dropdown-icon"+(s.value===!0?" rotate-180":""),name:Gt.value})]:null}),Kh(X)}});const hc={left:!0,right:!0,up:!0,down:!0,horizontal:!0,vertical:!0},zS=Object.keys(hc);hc.all=!0;function So(e){const t={};for(const r of zS)e[r]===!0&&(t[r]=!0);return Object.keys(t).length===0?hc:(t.horizontal===!0?t.left=t.right=!0:t.left===!0&&t.right===!0&&(t.horizontal=!0),t.vertical===!0?t.up=t.down=!0:t.up===!0&&t.down===!0&&(t.vertical=!0),t.horizontal===!0&&t.vertical===!0&&(t.all=!0),t)}const VS=["INPUT","TEXTAREA"];function ko(e,t){return t.event===void 0&&e.target!==void 0&&e.target.draggable!==!0&&typeof t.handler=="function"&&VS.includes(e.target.nodeName.toUpperCase())===!1&&(e.qClonedBy===void 0||e.qClonedBy.indexOf(t.uid)===-1)}function YS(e){const t=[.06,6,50];return typeof e=="string"&&e.length&&e.split(":").forEach((r,a)=>{const l=parseFloat(r);l&&(t[a]=l)}),t}var WS=rc({name:"touch-swipe",beforeMount(e,{value:t,arg:r,modifiers:a}){if(a.mouse!==!0&&Kn.has.touch!==!0)return;const l=a.mouseCapture===!0?"Capture":"",s={handler:t,sensitivity:YS(r),direction:So(a),noop:Xu,mouseStart(u){ko(u,s)&&Qh(u)&&(Rn(s,"temp",[[document,"mousemove","move",`notPassive${l}`],[document,"mouseup","end","notPassiveCapture"]]),s.start(u,!0))},touchStart(u){if(ko(u,s)){const d=u.target;Rn(s,"temp",[[d,"touchmove","move","notPassiveCapture"],[d,"touchcancel","end","notPassiveCapture"],[d,"touchend","end","notPassiveCapture"]]),s.start(u)}},start(u,d){Kn.is.firefox===!0&&ji(e,!0);const f=na(u);s.event={x:f.left,y:f.top,time:Date.now(),mouse:d===!0,dir:!1}},move(u){if(s.event===void 0)return;if(s.event.dir!==!1){Rt(u);return}const d=Date.now()-s.event.time;if(d===0)return;const f=na(u),g=f.left-s.event.x,v=Math.abs(g),C=f.top-s.event.y,M=Math.abs(C);if(s.event.mouse!==!0){if(vs.sensitivity[0]&&(s.event.dir=C<0?"up":"down"),s.direction.horizontal===!0&&v>M&&M<100&&_>s.sensitivity[0]&&(s.event.dir=g<0?"left":"right"),s.direction.up===!0&&vs.sensitivity[0]&&(s.event.dir="up"),s.direction.down===!0&&v0&&v<100&&x>s.sensitivity[0]&&(s.event.dir="down"),s.direction.left===!0&&v>M&&g<0&&M<100&&_>s.sensitivity[0]&&(s.event.dir="left"),s.direction.right===!0&&v>M&&g>0&&M<100&&_>s.sensitivity[0]&&(s.event.dir="right"),s.event.dir!==!1?(Rt(u),s.event.mouse===!0&&(document.body.classList.add("no-pointer-events--children"),document.body.classList.add("non-selectable"),Ua(),s.styleCleanup=I=>{s.styleCleanup=void 0,document.body.classList.remove("non-selectable");const L=()=>{document.body.classList.remove("no-pointer-events--children")};I===!0?setTimeout(L,50):L()}),s.handler({evt:u,touch:s.event.mouse!==!0,mouse:s.event.mouse,direction:s.event.dir,duration:d,distance:{x:v,y:M}})):s.end(u)},end(u){s.event!==void 0&&(Pr(s,"temp"),Kn.is.firefox===!0&&ji(e,!1),s.styleCleanup!==void 0&&s.styleCleanup(!0),u!==void 0&&s.event.dir!==!1&&Rt(u),s.event=void 0)}};if(e.__qtouchswipe=s,a.mouse===!0){const u=a.mouseCapture===!0||a.mousecapture===!0?"Capture":"";Rn(s,"main",[[e,"mousedown","mouseStart",`passive${u}`]])}Kn.has.touch===!0&&Rn(s,"main",[[e,"touchstart","touchStart",`passive${a.capture===!0?"Capture":""}`],[e,"touchmove","noop","notPassiveCapture"]])},updated(e,t){const r=e.__qtouchswipe;r!==void 0&&(t.oldValue!==t.value&&(typeof t.value!="function"&&r.end(),r.handler=t.value),r.direction=So(t.modifiers))},beforeUnmount(e){const t=e.__qtouchswipe;t!==void 0&&(Pr(t,"main"),Pr(t,"temp"),Kn.is.firefox===!0&&ji(e,!1),t.styleCleanup!==void 0&&t.styleCleanup(),delete e.__qtouchswipe)}});function HS(){const e=new Map;return{getCache:function(t,r){return e[t]===void 0?e[t]=r:e[t]},getCacheWithFn:function(t,r){return e[t]===void 0?e[t]=r():e[t]}}}const kg={name:{required:!0},disable:Boolean},bh={setup(e,{slots:t}){return()=>E("div",{class:"q-panel scroll",role:"tabpanel"},Mt(t.default))}},Cg={modelValue:{required:!0},animated:Boolean,infinite:Boolean,swipeable:Boolean,vertical:Boolean,transitionPrev:String,transitionNext:String,transitionDuration:{type:[String,Number],default:300},keepAlive:Boolean,keepAliveInclude:[String,Array,RegExp],keepAliveExclude:[String,Array,RegExp],keepAliveMax:Number},Tg=["update:modelValue","beforeTransition","transition"];function Mg(){const{props:e,emit:t,proxy:r}=Dt(),{getCacheWithFn:a}=HS();let l,s;const u=se(null),d=se(null);function f(te){const Pe=e.vertical===!0?"up":"left";V((r.$q.lang.rtl===!0?-1:1)*(te.direction===Pe?1:-1))}const g=$(()=>[[WS,f,void 0,{horizontal:e.vertical!==!0,vertical:e.vertical,mouse:!0}]]),v=$(()=>e.transitionPrev||`slide-${e.vertical===!0?"down":"right"}`),C=$(()=>e.transitionNext||`slide-${e.vertical===!0?"up":"left"}`),M=$(()=>`--q-transition-duration: ${e.transitionDuration}ms`),_=$(()=>typeof e.modelValue=="string"||typeof e.modelValue=="number"?e.modelValue:String(e.modelValue)),x=$(()=>({include:e.keepAliveInclude,exclude:e.keepAliveExclude,max:e.keepAliveMax})),I=$(()=>e.keepAliveInclude!==void 0||e.keepAliveExclude!==void 0);Ve(()=>e.modelValue,(te,Pe)=>{const Be=D(te)===!0?A(te):-1;s!==!0&&J(Be===-1?0:Be{t("transition",te,Pe)}))});function L(){V(1)}function F(){V(-1)}function Y(te){t("update:modelValue",te)}function D(te){return te!=null&&te!==""}function A(te){return l.findIndex(Pe=>Pe.props.name===te&&Pe.props.disable!==""&&Pe.props.disable!==!0)}function N(){return l.filter(te=>te.props.disable!==""&&te.props.disable!==!0)}function J(te){const Pe=te!==0&&e.animated===!0&&u.value!==-1?"q-transition--"+(te===-1?v.value:C.value):null;d.value!==Pe&&(d.value=Pe)}function V(te,Pe=u.value){let Be=Pe+te;for(;Be>-1&&Be{s=!1});return}Be+=te}e.infinite===!0&&l.length!==0&&Pe!==-1&&Pe!==l.length&&V(te,te===-1?l.length:-1)}function H(){const te=A(e.modelValue);return u.value!==te&&(u.value=te),!0}function pe(){const te=D(e.modelValue)===!0&&H()&&l[u.value];return e.keepAlive===!0?[E(Xb,x.value,[E(I.value===!0?a(_.value,()=>({...bh,name:_.value})):bh,{key:_.value,style:M.value},()=>te)])]:[E("div",{class:"q-panel scroll",style:M.value,key:_.value,role:"tabpanel"},[te])]}function _e(){if(l.length!==0)return e.animated===!0?[E(Ga,{name:d.value},pe)]:pe()}function xe(te){return l=nc(Mt(te.default,[])).filter(Pe=>Pe.props!==null&&Pe.props.slot===void 0&&D(Pe.props.name)===!0),l.length}function lt(){return l}return Object.assign(r,{next:L,previous:F,goTo:Y}),{panelIndex:u,panelDirectives:g,updatePanelsList:xe,updatePanelIndex:H,getPanelContent:_e,getEnabledPanels:N,getPanels:lt,isValidPanelName:D,keepAliveProps:x,needsUniqueKeepAliveWrapper:I,goToPanelByOffset:V,goToPanel:Y,nextPanel:L,previousPanel:F}}var ku=Je({name:"QTabPanel",props:kg,setup(e,{slots:t}){return()=>E("div",{class:"q-tab-panel",role:"tabpanel"},Mt(t.default))}}),KS=Je({name:"QTabPanels",props:{...Cg,...or},emits:Tg,setup(e,{slots:t}){const r=Dt(),a=sr(e,r.proxy.$q),{updatePanelsList:l,getPanelContent:s,panelDirectives:u}=Mg(),d=$(()=>"q-tab-panels q-panel-parent"+(a.value===!0?" q-tab-panels--dark q-dark":""));return()=>(l(t),Zu("div",{class:d.value},s(),"pan",e.swipeable,()=>u.value))}});const wh=e=>{e=1831565813+(e|=0)|0;let t=Math.imul(e^e>>>15,1|e);return t=t+Math.imul(t^t>>>7,61|t)^t,((t^t>>>14)>>>0)/4294967296};class GS{constructor(t){this.dictionaries=void 0,this.length=void 0,this.separator=void 0,this.style=void 0,this.seed=void 0;const{length:r,separator:a,dictionaries:l,style:s,seed:u}=t;this.dictionaries=l,this.separator=a,this.length=r,this.style=s,this.seed=u}generate(){if(!this.dictionaries)throw new Error('Cannot find any dictionary. Please provide at least one, or leave the "dictionary" field empty in the config object');if(this.length<=0)throw new Error("Invalid length provided");if(this.length>this.dictionaries.length)throw new Error(`The length cannot be bigger than the number of dictionaries. -Length provided: ${this.length}. Number of dictionaries provided: ${this.dictionaries.length}`);let t=this.seed;return this.dictionaries.slice(0,this.length).reduce((r,a)=>{let l;t?(l=(u=>{if(typeof u=="string"){const d=u.split("").map(g=>g.charCodeAt(0)).reduce((g,v)=>g+v,1),f=Math.floor(Number(d));return wh(f)}return wh(u)})(t),t=4294967296*l):l=Math.random();let s=a[Math.floor(l*a.length)]||"";if(this.style==="lowerCase")s=s.toLowerCase();else if(this.style==="capital"){const[u,...d]=s.split("");s=u.toUpperCase()+d.join("")}else this.style==="upperCase"&&(s=s.toUpperCase());return r?`${r}${this.separator}${s}`:`${s}`},"")}}const Sh={separator:"_",dictionaries:[]},Dg=e=>{const t=[...e&&e.dictionaries||Sh.dictionaries],r={...Sh,...e,length:e&&e.length||t.length,dictionaries:t};if(!e||!e.dictionaries||!e.dictionaries.length)throw new Error('A "dictionaries" array must be provided. This is a breaking change introduced starting from Unique Name Generator v4. Read more about the breaking change here: https://github.com/andreasonny83/unique-names-generator#migration-guide');return new GS(r).generate()};var qg=["able","above","absent","absolute","abstract","abundant","academic","acceptable","accepted","accessible","accurate","accused","active","actual","acute","added","additional","adequate","adjacent","administrative","adorable","advanced","adverse","advisory","aesthetic","afraid","aggregate","aggressive","agreeable","agreed","agricultural","alert","alive","alleged","allied","alone","alright","alternative","amateur","amazing","ambitious","amused","ancient","angry","annoyed","annual","anonymous","anxious","appalling","apparent","applicable","appropriate","arbitrary","architectural","armed","arrogant","artificial","artistic","ashamed","asleep","assistant","associated","atomic","attractive","automatic","autonomous","available","average","awake","aware","awful","awkward","back","bad","balanced","bare","basic","beautiful","beneficial","better","bewildered","big","binding","biological","bitter","bizarre","blank","blind","blonde","bloody","blushing","boiling","bold","bored","boring","bottom","brainy","brave","breakable","breezy","brief","bright","brilliant","broad","broken","bumpy","burning","busy","calm","capable","capitalist","careful","casual","causal","cautious","central","certain","changing","characteristic","charming","cheap","cheerful","chemical","chief","chilly","chosen","christian","chronic","chubby","circular","civic","civil","civilian","classic","classical","clean","clear","clever","clinical","close","closed","cloudy","clumsy","coastal","cognitive","coherent","cold","collective","colonial","colorful","colossal","coloured","colourful","combative","combined","comfortable","coming","commercial","common","communist","compact","comparable","comparative","compatible","competent","competitive","complete","complex","complicated","comprehensive","compulsory","conceptual","concerned","concrete","condemned","confident","confidential","confused","conscious","conservation","conservative","considerable","consistent","constant","constitutional","contemporary","content","continental","continued","continuing","continuous","controlled","controversial","convenient","conventional","convinced","convincing","cooing","cool","cooperative","corporate","correct","corresponding","costly","courageous","crazy","creative","creepy","criminal","critical","crooked","crowded","crucial","crude","cruel","cuddly","cultural","curious","curly","current","curved","cute","daily","damaged","damp","dangerous","dark","dead","deaf","deafening","dear","decent","decisive","deep","defeated","defensive","defiant","definite","deliberate","delicate","delicious","delighted","delightful","democratic","dependent","depressed","desirable","desperate","detailed","determined","developed","developing","devoted","different","difficult","digital","diplomatic","direct","dirty","disabled","disappointed","disastrous","disciplinary","disgusted","distant","distinct","distinctive","distinguished","disturbed","disturbing","diverse","divine","dizzy","domestic","dominant","double","doubtful","drab","dramatic","dreadful","driving","drunk","dry","dual","due","dull","dusty","dutch","dying","dynamic","eager","early","eastern","easy","economic","educational","eerie","effective","efficient","elaborate","elated","elderly","eldest","electoral","electric","electrical","electronic","elegant","eligible","embarrassed","embarrassing","emotional","empirical","empty","enchanting","encouraging","endless","energetic","enormous","enthusiastic","entire","entitled","envious","environmental","equal","equivalent","essential","established","estimated","ethical","ethnic","eventual","everyday","evident","evil","evolutionary","exact","excellent","exceptional","excess","excessive","excited","exciting","exclusive","existing","exotic","expected","expensive","experienced","experimental","explicit","extended","extensive","external","extra","extraordinary","extreme","exuberant","faint","fair","faithful","familiar","famous","fancy","fantastic","far","fascinating","fashionable","fast","fat","fatal","favourable","favourite","federal","fellow","female","feminist","few","fierce","filthy","final","financial","fine","firm","fiscal","fit","fixed","flaky","flat","flexible","fluffy","fluttering","flying","following","fond","foolish","foreign","formal","formidable","forthcoming","fortunate","forward","fragile","frail","frantic","free","frequent","fresh","friendly","frightened","front","frozen","full","fun","functional","fundamental","funny","furious","future","fuzzy","gastric","gay","general","generous","genetic","gentle","genuine","geographical","giant","gigantic","given","glad","glamorous","gleaming","global","glorious","golden","good","gorgeous","gothic","governing","graceful","gradual","grand","grateful","greasy","great","grieving","grim","gross","grotesque","growing","grubby","grumpy","guilty","handicapped","handsome","happy","hard","harsh","head","healthy","heavy","helpful","helpless","hidden","high","hilarious","hissing","historic","historical","hollow","holy","homeless","homely","hon","honest","horizontal","horrible","hostile","hot","huge","human","hungry","hurt","hushed","husky","icy","ideal","identical","ideological","ill","illegal","imaginative","immediate","immense","imperial","implicit","important","impossible","impressed","impressive","improved","inadequate","inappropriate","inc","inclined","increased","increasing","incredible","independent","indirect","individual","industrial","inevitable","influential","informal","inherent","initial","injured","inland","inner","innocent","innovative","inquisitive","instant","institutional","insufficient","intact","integral","integrated","intellectual","intelligent","intense","intensive","interested","interesting","interim","interior","intermediate","internal","international","intimate","invisible","involved","irrelevant","isolated","itchy","jealous","jittery","joint","jolly","joyous","judicial","juicy","junior","just","keen","key","kind","known","labour","large","late","latin","lazy","leading","left","legal","legislative","legitimate","lengthy","lesser","level","lexical","liable","liberal","light","like","likely","limited","linear","linguistic","liquid","literary","little","live","lively","living","local","logical","lonely","long","loose","lost","loud","lovely","low","loyal","ltd","lucky","mad","magic","magnetic","magnificent","main","major","male","mammoth","managerial","managing","manual","many","marginal","marine","marked","married","marvellous","marxist","mass","massive","mathematical","mature","maximum","mean","meaningful","mechanical","medical","medieval","melodic","melted","mental","mere","metropolitan","mid","middle","mighty","mild","military","miniature","minimal","minimum","ministerial","minor","miserable","misleading","missing","misty","mixed","moaning","mobile","moderate","modern","modest","molecular","monetary","monthly","moral","motionless","muddy","multiple","mushy","musical","mute","mutual","mysterious","naked","narrow","nasty","national","native","natural","naughty","naval","near","nearby","neat","necessary","negative","neighbouring","nervous","net","neutral","new","nice","noble","noisy","normal","northern","nosy","notable","novel","nuclear","numerous","nursing","nutritious","nutty","obedient","objective","obliged","obnoxious","obvious","occasional","occupational","odd","official","ok","okay","old","olympic","only","open","operational","opposite","optimistic","oral","ordinary","organic","organisational","original","orthodox","other","outdoor","outer","outrageous","outside","outstanding","overall","overseas","overwhelming","painful","pale","panicky","parallel","parental","parliamentary","partial","particular","passing","passive","past","patient","payable","peaceful","peculiar","perfect","permanent","persistent","personal","petite","philosophical","physical","plain","planned","plastic","pleasant","pleased","poised","polite","political","poor","popular","positive","possible","potential","powerful","practical","precious","precise","preferred","pregnant","preliminary","premier","prepared","present","presidential","pretty","previous","prickly","primary","prime","primitive","principal","printed","prior","private","probable","productive","professional","profitable","profound","progressive","prominent","promising","proper","proposed","prospective","protective","protestant","proud","provincial","psychiatric","psychological","public","puny","pure","purring","puzzled","quaint","qualified","quarrelsome","querulous","quick","quickest","quiet","quintessential","quixotic","racial","radical","rainy","random","rapid","rare","raspy","rational","ratty","raw","ready","real","realistic","rear","reasonable","recent","reduced","redundant","regional","registered","regular","regulatory","related","relative","relaxed","relevant","reliable","relieved","religious","reluctant","remaining","remarkable","remote","renewed","representative","repulsive","required","resident","residential","resonant","respectable","respective","responsible","resulting","retail","retired","revolutionary","rich","ridiculous","right","rigid","ripe","rising","rival","roasted","robust","rolling","romantic","rotten","rough","round","royal","rubber","rude","ruling","running","rural","sacred","sad","safe","salty","satisfactory","satisfied","scared","scary","scattered","scientific","scornful","scrawny","screeching","secondary","secret","secure","select","selected","selective","selfish","semantic","senior","sensible","sensitive","separate","serious","severe","sexual","shaggy","shaky","shallow","shared","sharp","sheer","shiny","shivering","shocked","short","shrill","shy","sick","significant","silent","silky","silly","similar","simple","single","skilled","skinny","sleepy","slight","slim","slimy","slippery","slow","small","smart","smiling","smoggy","smooth","social","socialist","soft","solar","sole","solid","sophisticated","sore","sorry","sound","sour","southern","soviet","spare","sparkling","spatial","special","specific","specified","spectacular","spicy","spiritual","splendid","spontaneous","sporting","spotless","spotty","square","squealing","stable","stale","standard","static","statistical","statutory","steady","steep","sticky","stiff","still","stingy","stormy","straight","straightforward","strange","strategic","strict","striking","striped","strong","structural","stuck","stupid","subjective","subsequent","substantial","subtle","successful","successive","sudden","sufficient","suitable","sunny","super","superb","superior","supporting","supposed","supreme","sure","surprised","surprising","surrounding","surviving","suspicious","sweet","swift","symbolic","sympathetic","systematic","tall","tame","tart","tasteless","tasty","technical","technological","teenage","temporary","tender","tense","terrible","territorial","testy","then","theoretical","thick","thin","thirsty","thorough","thoughtful","thoughtless","thundering","tight","tiny","tired","top","tory","total","tough","toxic","traditional","tragic","tremendous","tricky","tropical","troubled","typical","ugliest","ugly","ultimate","unable","unacceptable","unaware","uncertain","unchanged","uncomfortable","unconscious","underground","underlying","unemployed","uneven","unexpected","unfair","unfortunate","unhappy","uniform","uninterested","unique","united","universal","unknown","unlikely","unnecessary","unpleasant","unsightly","unusual","unwilling","upper","upset","uptight","urban","urgent","used","useful","useless","usual","vague","valid","valuable","variable","varied","various","varying","vast","verbal","vertical","very","vicarious","vicious","victorious","violent","visible","visiting","visual","vital","vitreous","vivacious","vivid","vocal","vocational","voiceless","voluminous","voluntary","vulnerable","wandering","warm","wasteful","watery","weak","wealthy","weary","wee","weekly","weird","welcome","well","western","wet","whispering","whole","wicked","wide","widespread","wild","wilful","willing","willowy","wily","wise","wispy","wittering","witty","wonderful","wooden","working","worldwide","worried","worrying","worthwhile","worthy","written","wrong","xenacious","xenial","xenogeneic","xenophobic","xeric","xerothermic","yabbering","yammering","yappiest","yappy","yawning","yearling","yearning","yeasty","yelling","yelping","yielding","yodelling","young","youngest","youthful","ytterbic","yucky","yummy","zany","zealous","zeroth","zestful","zesty","zippy","zonal","zoophagous","zygomorphic","zygotic"],Pg=["aardvark","aardwolf","albatross","alligator","alpaca","amphibian","anaconda","angelfish","anglerfish","ant","anteater","antelope","antlion","ape","aphid","armadillo","asp","baboon","badger","bandicoot","barnacle","barracuda","basilisk","bass","bat","bear","beaver","bedbug","bee","beetle","bird","bison","blackbird","boa","boar","bobcat","bobolink","bonobo","booby","bovid","bug","butterfly","buzzard","camel","canid","canidae","capybara","cardinal","caribou","carp","cat","caterpillar","catfish","catshark","cattle","centipede","cephalopod","chameleon","cheetah","chickadee","chicken","chimpanzee","chinchilla","chipmunk","cicada","clam","clownfish","cobra","cockroach","cod","condor","constrictor","coral","cougar","cow","coyote","crab","crane","crawdad","crayfish","cricket","crocodile","crow","cuckoo","damselfly","deer","dingo","dinosaur","dog","dolphin","donkey","dormouse","dove","dragon","dragonfly","duck","eagle","earthworm","earwig","echidna","eel","egret","elephant","elk","emu","ermine","falcon","felidae","ferret","finch","firefly","fish","flamingo","flea","fly","flyingfish","fowl","fox","frog","galliform","gamefowl","gayal","gazelle","gecko","gerbil","gibbon","giraffe","goat","goldfish","goose","gopher","gorilla","grasshopper","grouse","guan","guanaco","guineafowl","gull","guppy","haddock","halibut","hamster","hare","harrier","hawk","hedgehog","heron","herring","hippopotamus","hookworm","hornet","horse","hoverfly","hummingbird","hyena","iguana","impala","jackal","jaguar","jay","jellyfish","junglefowl","kangaroo","kingfisher","kite","kiwi","koala","koi","krill","ladybug","lamprey","landfowl","lark","leech","lemming","lemur","leopard","leopon","limpet","lion","lizard","llama","lobster","locust","loon","louse","lungfish","lynx","macaw","mackerel","magpie","mammal","manatee","mandrill","marlin","marmoset","marmot","marsupial","marten","mastodon","meadowlark","meerkat","mink","minnow","mite","mockingbird","mole","mollusk","mongoose","monkey","moose","mosquito","moth","mouse","mule","muskox","narwhal","newt","nightingale","ocelot","octopus","opossum","orangutan","orca","ostrich","otter","owl","ox","panda","panther","parakeet","parrot","parrotfish","partridge","peacock","peafowl","pelican","penguin","perch","pheasant","pig","pigeon","pike","pinniped","piranha","planarian","platypus","pony","porcupine","porpoise","possum","prawn","primate","ptarmigan","puffin","puma","python","quail","quelea","quokka","rabbit","raccoon","rat","rattlesnake","raven","reindeer","reptile","rhinoceros","roadrunner","rodent","rook","rooster","roundworm","sailfish","salamander","salmon","sawfish","scallop","scorpion","seahorse","shark","sheep","shrew","shrimp","silkworm","silverfish","skink","skunk","sloth","slug","smelt","snail","snake","snipe","sole","sparrow","spider","spoonbill","squid","squirrel","starfish","stingray","stoat","stork","sturgeon","swallow","swan","swift","swordfish","swordtail","tahr","takin","tapir","tarantula","tarsier","termite","tern","thrush","tick","tiger","tiglon","toad","tortoise","toucan","trout","tuna","turkey","turtle","tyrannosaurus","unicorn","urial","vicuna","viper","vole","vulture","wallaby","walrus","warbler","wasp","weasel","whale","whippet","whitefish","wildcat","wildebeest","wildfowl","wolf","wolverine","wombat","woodpecker","worm","wren","xerinae","yak","zebra"],xg=["amaranth","amber","amethyst","apricot","aqua","aquamarine","azure","beige","black","blue","blush","bronze","brown","chocolate","coffee","copper","coral","crimson","cyan","emerald","fuchsia","gold","gray","green","harlequin","indigo","ivory","jade","lavender","lime","magenta","maroon","moccasin","olive","orange","peach","pink","plum","purple","red","rose","salmon","sapphire","scarlet","silver","tan","teal","tomato","turquoise","violet","white","yellow"];function Oa(e,t,r){return parseInt(e.substr(t,r),16)}function Ag(e){return e|=0,e<0?"00":e<16?"0"+e.toString(16):e<256?e.toString(16):"ff"}function Cu(e,t,r){return r=r<0?r+6:r>6?r-6:r,Ag(255*(r<1?e+(t-e)*r:r<3?t:r<4?e+(t-e)*(4-r):e))}function QS(e){if(/^#[0-9a-f]{3,8}$/i.test(e)){let t;const r=e.length;if(r<6){const a=e[1],l=e[2],s=e[3],u=e[4]||"";t="#"+a+a+l+l+s+s+u+u}return(r==7||r>8)&&(t=e),t}}function jS(e,t,r){let a;if(t==0){const l=Ag(r*255);a=l+l+l}else{const l=r<=.5?r*(t+1):r+t-r*t,s=r*2-l;a=Cu(s,l,e*6+2)+Cu(s,l,e*6)+Cu(s,l,e*6-2)}return"#"+a}function xa(e,t,r){const a=[.55,.5,.5,.46,.6,.55,.55],l=a[e*6+.5|0];return r=r<.5?r*l*2:l+(r-.5)*(1-l)*2,jS(e,t,r)}const ZS=typeof window!="undefined"?window:typeof self!="undefined"?self:typeof global!="undefined"?global:{},kh={V:"jdenticon_config",n:"config"};var JS={};function XS(e,t){const r=typeof e=="object"&&e||JS[kh.n]||ZS[kh.V]||{},a=r.lightness||{},l=r.saturation||{},s="color"in l?l.color:l,u=l.grayscale,d=r.backColor,f=r.padding;function g(C,M){let _=a[C];return _&&_.length>1||(_=M),function(x){return x=_[0]+x*(_[1]-_[0]),x<0?0:x>1?1:x}}function v(C){const M=r.hues;let _;return M&&M.length>0&&(_=M[0|.999*C*M.length]),typeof _=="number"?(_/360%1+1)%1:C}return{W:v,o:typeof s=="number"?s:.5,D:typeof u=="number"?u:0,p:g("color",[.4,.8]),F:g("grayscale",[.3,.9]),G:QS(d),X:typeof e=="number"?e:typeof f=="number"?f:t}}class ro{constructor(t,r){this.x=t,this.y=r}}class Eg{constructor(t,r,a,l){this.q=t,this.t=r,this.H=a,this.Y=l}I(t,r,a,l){const s=this.q+this.H,u=this.t+this.H,d=this.Y;return d===1?new ro(s-r-(l||0),this.t+t):d===2?new ro(s-t-(a||0),u-r-(l||0)):d===3?new ro(this.q+r,u-t-(a||0)):new ro(this.q+t,this.t+r)}}const ek=new Eg(0,0,0,0);class tk{constructor(t){this.J=t,this.u=ek}g(t,r){const a=r?-2:2,l=[];for(let s=r?t.length-2:0;s=0;s+=a)l.push(this.u.I(t[s],t[s+1]));this.J.g(l)}h(t,r,a,l){const s=this.u.I(t,r,a,a);this.J.h(s,a,l)}i(t,r,a,l,s){this.g([t,r,t+a,r,t+a,r+l,t,r+l],s)}j(t,r,a,l,s,u){const d=[t+a,r,t+a,r+l,t,r+l,t,r];d.splice((s||0)%4*2,2),this.g(d,u)}K(t,r,a,l,s){this.g([t+a/2,r,t+a,r+l/2,t+a/2,r+l,t,r+l/2],s)}}function nk(e,t,r,a){e=e%14;let l,s,u,d,f,g;e?e==1?(u=0|r*.5,d=0|r*.8,t.j(r-u,0,u,d,2)):e==2?(u=0|r/3,t.i(u,u,r-u,r-u)):e==3?(f=r*.1,g=r<6?1:r<8?2:0|r*.25,f=f>1?0|f:f>.5?1:f,t.i(g,g,r-f-g,r-f-g)):e==4?(s=0|r*.15,u=0|r*.5,t.h(r-u-s,r-u-s,u)):e==5?(f=r*.1,g=f*4,g>3&&(g=0|g),t.i(0,0,r,r),t.g([g,g,r-f,g,g+(r-g-f)/2,r-f],!0)):e==6?t.g([0,0,r,0,r,r*.7,r*.4,r*.4,r*.7,r,0,r]):e==7?t.j(r/2,r/2,r/2,r/2,3):e==8?(t.i(0,0,r,r/2),t.i(0,r/2,r/2,r/2),t.j(r/2,r/2,r/2,r/2,1)):e==9?(f=r*.14,g=r<4?1:r<6?2:0|r*.35,f=r<8?f:0|f,t.i(0,0,r,r),t.i(g,g,r-g-f,r-g-f,!0)):e==10?(f=r*.12,g=f*3,t.i(0,0,r,r),t.h(g,g,r-f-g,!0)):e==11?t.j(r/2,r/2,r/2,r/2,3):e==12?(s=r*.25,t.i(0,0,r,r),t.K(s,s,r-s,r-s,!0)):!a&&(s=r*.4,u=r*1.2,t.h(s,s,u)):(l=r*.42,t.g([0,0,r,0,r,r-l*2,r-l,r,0,r]))}function Ch(e,t,r){e=e%4;let a;e?e==1?t.j(0,r/2,r,r/2,0):e==2?t.K(0,0,r,r):(a=r/6,t.h(a,a,r-2*a)):t.j(0,0,r,r,0)}function rk(e,t){return e=t.W(e),[xa(e,t.D,t.F(0)),xa(e,t.o,t.p(.5)),xa(e,t.D,t.F(1)),xa(e,t.o,t.p(1)),xa(e,t.o,t.p(0))]}function ik(e,t,r){const a=XS(r,.08);a.G&&e.m(a.G);let l=e.k;const s=.5+l*a.X|0;l-=s*2;const u=new tk(e),d=0|l/4,f=0|s+l/2-d*2,g=0|s+l/2-d*2;function v(L,F,Y,D,A){const N=Oa(t,Y,1);let J=D?Oa(t,D,1):0;e.L(M[_[L]]);for(let V=0;V=0){for(let F=0;F=0)return!0}}for(let L=0;L<3;L++)x=Oa(t,8+L,1)%M.length,(I([0,4])||I([2,3]))&&(x=1),_.push(x);v(0,Ch,2,3,[[1,0],[2,0],[2,3],[1,3],[0,1],[3,1],[3,2],[0,2]]),v(1,Ch,4,5,[[0,0],[3,0],[3,3],[0,3]]),v(2,nk,1,null,[[1,1],[2,1],[2,2],[1,2]]),e.finish()}function ak(e){var a=0,l=0,s=encodeURI(e)+"%80",u=[],d,f=[],g=1732584193,v=4023233417,C=~g,M=~v,_=3285377520,x=[g,v,C,M,_],I=0,L="";function F(Y,D){return Y<>>32-D}for(;a>2]=u[l>>2]|(s[a]=="%"?parseInt(s.substring(a+1,a+=3),16):s.charCodeAt(a++))<<(3-(l&3))*8;for(d=((l+7>>6)+1)*16,u[d-1]=l*8-8;I>3]>>>(7-(a&7))*4&15).toString(16);return L}function lk(e){return/^[0-9a-f]{11,}$/i.test(e)&&e}function ok(e){return ak(e==null?"":""+e)}function Yi(e){return(e*10+.5|0)/10}class sk{constructor(){this.v=""}g(t){let r="";for(let a=0;a'}m(t,r){r&&(this.C+='')}O(t,r){this.C+=''}toString(){return this.C+""}}function fk(e,t,r){const a=new dk(t);return ik(new uk(a),lk(e)||ok(e),r),a.toString()}typeof document!="undefined"&&document.querySelectorAll.bind(document);const hk=sn({name:"UserProfile",props:["pubkey","profiles","description"],data:function(){return{}},methods:{merchantProfile(e){var t;return(t=this.profiles)==null?void 0:t.find(r=>r.pubkey===e)},pubkeyAlias(e){return Dg({dictionaries:[qg,Pg,xg],length:2,separator:" ",style:"capital",seed:e})},pubkeyAvatar(e){return fk(e,100)}},created:async function(){}}),gk=["src"],mk=["innerHTML"],vk={class:"text-caption text-grey ellipsis-2-lines"};function pk(e,t,r,a,l,s){return O(),ie(Nt,null,[y(Ie,{avatar:""},{default:b(()=>[y(Xr,null,{default:b(()=>{var u;return[(u=e.merchantProfile(e.pubkey))!=null&&u.picture?(O(),ie("img",{key:0,src:e.merchantProfile(e.pubkey).picture},null,8,gk)):(O(),ie("div",{key:1,innerHTML:e.pubkeyAvatar(e.pubkey)},null,8,mk))]}),_:1})]),_:1}),y(Ie,{class:"q-mt-sm"},{default:b(()=>[y(Ke,null,{default:b(()=>{var u,d;return[S("strong",null,ge(((u=e.merchantProfile(e.pubkey))==null?void 0:u.name)||((d=e.merchantProfile(e.pubkey))==null?void 0:d.display_name)||e.pubkeyAlias(e.pubkey)),1)]}),_:1}),y(Ke,{class:"gt-sm"},{default:b(()=>[S("div",vk,[S("p",null,ge(e.description||e.pubkey),1)])]),_:1}),y(Qr,null,{default:b(()=>[De(ge(e.pubkey),1)]),_:1})]),_:1})],64)}var Za=Cn(hk,[["render",pk]]);const yk=sn({name:"EssentialLink",props:["market","profiles","relays-data","read-notes"],components:{UserProfile:Za},data:function(){return{tab:"marketplace",merchantPubkey:null,relayUrl:null,marketData:{pubkey:null,relays:[],opts:{identifier:null,name:null,about:null,merchants:[],ui:{picture:null,banner:null,theme:null,darkMode:!1}}},themeOptions:["classic","bitcoin","flamingo","cyber","freedom","mint","autumn","monochrome","salvador"]}},methods:{addMerchant:async function(){if(!isValidKey(this.merchantPubkey,"npub")){$q.notify({message:"Invalid Public Key!",type:"warning"});return}const e=isValidKeyHex(this.merchantPubkey)?this.merchantPubkey:NostrTools.nip19.decode(this.merchantPubkey).data;this.marketData.opts.merchants.push(e),this.updateMarketData(),this.merchantPubkey=null},removeMerchant:async function(e){console.log("### removeMerchant",e),this.marketData.opts.merchants=this.marketData.opts.merchants.filter(t=>t!==e),this.updateMarketData()},addRelay:async function(){const e=(this.relayUrl||"").trim();if(!e.startsWith("wss://")&&!e.startsWith("ws://")){this.relayUrl=null,$q.notify({timeout:5e3,type:"warning",message:"Invalid relay URL.",caption:"Should start with 'wss://'' or 'ws://'"});return}try{new URL(e),this.marketData.relays.push(e),this.updateMarketData()}catch(t){$q.notify({timeout:5e3,type:"warning",message:"Invalid relay URL.",caption:`Error: ${t}`})}this.relayUrl=null},removeRelay:async function(e){this.marketData.relays=this.marketData.relays.filter(t=>t!==e),this.updateMarketData()},updateMarketData:function(){this.$emit("market-update",this.cloneMarketData())},publishNaddr(){this.$emit("publish-naddr",this.cloneMarketData())},deleteMarket(){this.$emit("delete-market",this.cloneMarketData())},applyLookAndFeel(){this.$emit("apply-ui",this.cloneMarketData())},markNoteAsRead(e){this.$emit("note-read",e)},cloneMarketData(){return JSON.parse(JSON.stringify(this.marketData))},relayData(e){return(this.relaysData||[]).find(t=>t.relayUrl===e)||{connected:!1,error:null}}},created:async function(){var e;this.marketData={...this.marketData,...JSON.parse(JSON.stringify(this.market||{}))},(e=this.readNotes)!=null&&e.merchants||(this.tab="merchants")}}),_k={class:"q-pt-md"},bk={class:"q-gutter-y-md"},wk={class:"q-pa-md"},Sk={class:"q-gutter-y-md"},kk=S("strong",null,"Note",-1),Ck=S("div",{class:"text-caption"},[S("ul",null,[S("li",null,[S("span",{class:"text-subtitle1"}," Here one can customize the look and feel of the Market. ")]),S("li",null,[S("span",{class:"text-subtitle1"},[De(" When the Market Profile is shared (via "),S("code",null,"naddr"),De(" ) these customisations will be available to the customers. ")])])])],-1),Tk=S("div",{class:"q-mb-md"},[S("strong",null,"Information")],-1),Mk=S("div",{class:"q-mb-md q-mt-lg"},[S("strong",null,"UI Configurations")],-1),Dk=S("div",{class:"lt-md q-mt-lg"},null,-1),qk=S("strong",null,"Note",-1),Pk=S("div",{class:"text-caption"},[S("ul",null,[S("li",null,[S("span",{class:"text-subtitle1"}," Here all the mercants of the marketplace are listed. ")]),S("li",null,[S("span",{class:"text-subtitle1"}," You can easily add a new merchant by entering its public key in the input below. ")]),S("li",null,[S("span",{class:"text-subtitle1"}," When a merchant is added all its products and stalls will be available in the Market page. ")])])],-1),xk={key:0,class:"text-caption text-grey ellipsis-2-lines"},Ak={class:"float-right"};function Ek(e,t,r,a,l,s){const u=ti("user-profile");return O(),oe(Jt,null,{default:b(()=>[y($e,null,{default:b(()=>[S("div",_k,[S("div",bk,[y(NS,{modelValue:e.tab,"onUpdate:modelValue":t[3]||(t[3]=d=>e.tab=d),"active-color":"primary",align:"justify"},{default:b(()=>[y(Su,{name:"marketplace",label:"Look And Feel",onUpdate:t[0]||(t[0]=d=>e.tab=d.name)}),y(Su,{name:"merchants",label:"Merchants",onUpdate:t[1]||(t[1]=d=>e.tab=d.name)}),y(Su,{name:"relays",label:"Relays",onUpdate:t[2]||(t[2]=d=>e.tab=d.name)})]),_:1},8,["modelValue"])])])]),_:1}),y(ut),y($e,null,{default:b(()=>[S("div",wk,[S("div",Sk,[y(KS,{modelValue:e.tab,"onUpdate:modelValue":t[14]||(t[14]=d=>e.tab=d)},{default:b(()=>[y(ku,{name:"marketplace"},{default:b(()=>{var d;return[(d=e.readNotes)!=null&&d.marketUi?Re("",!0):(O(),oe(Mr,{key:0,class:"q-mb-lg gt-sm",bordered:""},{default:b(()=>[y(Vt,null,{default:b(()=>[y(Ie,{avatar:""},{default:b(()=>[y(Xr,null,{default:b(()=>[y(Yt,{color:"primary",name:"info",size:"xl"})]),_:1})]),_:1}),y(Ie,{class:"q-mt-sm q-ml-lg"},{default:b(()=>[y(Ke,null,{default:b(()=>[kk]),_:1}),y(Ke,null,{default:b(()=>[Ck]),_:1})]),_:1}),y(Ie,{side:""},{default:b(()=>[y(ye,{onClick:t[4]||(t[4]=f=>e.markNoteAsRead("marketUi")),size:"lg",outline:"",color:"primary",label:"Got it!",icon:"check_small"})]),_:1})]),_:1})]),_:1})),Tk,y(It,{onChange:e.updateMarketData,outlined:"",modelValue:e.marketData.opts.name,"onUpdate:modelValue":t[5]||(t[5]=f=>e.marketData.opts.name=f),type:"text",label:"Market Name",hint:"Short name for the market",class:"q-mb-md"},null,8,["onChange","modelValue"]),y(It,{onChange:e.updateMarketData,outlined:"",modelValue:e.marketData.opts.about,"onUpdate:modelValue":t[6]||(t[6]=f=>e.marketData.opts.about=f),type:"textarea",rows:"3",label:"Marketplace Description",hint:"It will be displayed on top of the banner image. Can be a longer text.",class:"q-mb-lg"},null,8,["onChange","modelValue"]),Mk,y(It,{onChange:e.updateMarketData,outlined:"",modelValue:e.marketData.opts.ui.picture,"onUpdate:modelValue":t[7]||(t[7]=f=>e.marketData.opts.ui.picture=f),type:"text",label:"Logo",hint:"It will be displayed next to the search input. Can be png, jpg, ico, gif, svg.",class:"q-mb-md"},null,8,["onChange","modelValue"]),y(It,{onChange:e.updateMarketData,outlined:"",modelValue:e.marketData.opts.ui.banner,"onUpdate:modelValue":t[8]||(t[8]=f=>e.marketData.opts.ui.banner=f),type:"text",label:"Banner",hint:"It represents the visual identity of the market. Can be png, jpg, ico, gif, svg.",class:"q-mb-md"},null,8,["onChange","modelValue"]),y($a,{onInput:e.updateMarketData,"onUpdate:modelValue":[e.updateMarketData,t[9]||(t[9]=f=>e.marketData.opts.ui.theme=f)],filled:"",modelValue:e.marketData.opts.ui.theme,hint:"The colors of the market will vary based on the theme. It applies to all components (buttons, labels, inputs, etc)",options:e.themeOptions,label:"Marketplace Theme"},null,8,["onInput","onUpdate:modelValue","modelValue","options"]),Dk,y(lo,{onInput:e.updateMarketData,onClick:e.updateMarketData,modelValue:e.marketData.opts.ui.darkMode,"onUpdate:modelValue":t[10]||(t[10]=f=>e.marketData.opts.ui.darkMode=f),label:"Dark Mode",size:"sm",class:"q-mt-sm"},null,8,["onInput","onClick","modelValue"])]}),_:1}),y(ku,{name:"merchants"},{default:b(()=>{var d;return[(d=e.readNotes)!=null&&d.merchants?Re("",!0):(O(),oe(Mr,{key:0,class:"q-mb-lg",bordered:""},{default:b(()=>[y(Vt,null,{default:b(()=>[y(Ie,{avatar:""},{default:b(()=>[y(Xr,null,{default:b(()=>[y(Yt,{color:"primary",name:"info",size:"xl"})]),_:1})]),_:1}),y(Ie,{class:"q-mt-sm q-ml-lg"},{default:b(()=>[y(Ke,null,{default:b(()=>[qk]),_:1}),y(Ke,null,{default:b(()=>[Pk]),_:1})]),_:1}),y(Ie,{side:""},{default:b(()=>[y(ye,{onClick:t[11]||(t[11]=f=>e.markNoteAsRead("merchants")),size:"lg",outline:"",color:"primary",label:"Got it!",icon:"check_small"})]),_:1})]),_:1})]),_:1})),S("div",null,[y(It,{outlined:"",modelValue:e.merchantPubkey,"onUpdate:modelValue":t[12]||(t[12]=f=>e.merchantPubkey=f),onKeydown:Au(e.addMerchant,["enter"]),type:"text",label:"Pubkey/Npub",hint:"Add merchants"},{default:b(()=>[y(ye,{onClick:e.addMerchant,dense:"",flat:"",icon:"add"},null,8,["onClick"])]),_:1},8,["modelValue","onKeydown"]),y(Mr,{class:"q-mt-md"},{default:b(()=>[(O(!0),ie(Nt,null,Wt(e.marketData.opts.merchants,f=>(O(),oe(Vt,{key:f},{default:b(()=>[y(u,{pubkey:f,profiles:e.profiles},null,8,["pubkey","profiles"]),y(Ie,{side:""},{default:b(()=>[y(ye,{size:"12px",flat:"",dense:"",round:"",icon:"delete",onClick:g=>e.removeMerchant(f)},null,8,["onClick"])]),_:2},1024)]),_:2},1024))),128))]),_:1})])]}),_:1}),y(ku,{name:"relays"},{default:b(()=>[S("div",null,[S("div",null,[y(It,{outlined:"",modelValue:e.relayUrl,"onUpdate:modelValue":t[13]||(t[13]=d=>e.relayUrl=d),onKeydown:Au(e.addRelay,["enter"]),type:"text",label:"wss://",hint:"Add realays"},{default:b(()=>[y(ye,{onClick:e.addRelay,dense:"",flat:"",icon:"add"},null,8,["onClick"])]),_:1},8,["modelValue","onKeydown"]),y(Mr,{class:"q-mt-md"},{default:b(()=>[(O(!0),ie(Nt,null,Wt(e.marketData.relays,d=>(O(),oe(Vt,{key:d},{default:b(()=>[y(Ie,{avatar:""},{default:b(()=>[y(Xr,null,{default:b(()=>[y(Yt,{name:"router",color:e.relayData(d).connected?"green":"pink"},null,8,["color"])]),_:2},1024)]),_:2},1024),y(Ie,{class:"q-mt-sm"},{default:b(()=>[y(Ke,null,{default:b(()=>[S("strong",null,ge(d),1),e.relayData(d).error?(O(),ie("div",xk,[S("p",null,"Error: "+ge(e.relayData(d).error),1)])):Re("",!0)]),_:2},1024)]),_:2},1024),y(Ie,{side:""},{default:b(()=>[y(ye,{size:"12px",flat:"",dense:"",round:"",icon:"delete",onClick:f=>e.removeRelay(d)},null,8,["onClick"])]),_:2},1024)]),_:2},1024))),128))]),_:1})])])]),_:1})]),_:1},8,["modelValue"])])])]),_:1}),y(ut),y($e,null,{default:b(()=>[S("div",Ak,[y(ye,{onClick:e.deleteMarket,flat:"",label:"Delete Market",icon:"delete",class:"q-ml-lg",color:"negative"},null,8,["onClick"]),y(ye,{onClick:e.applyLookAndFeel,flat:"",label:"Apply Look and Feel",icon:"palette",class:"q-ml-lg",color:"secondary"},null,8,["onClick"]),y(ye,{onClick:e.publishNaddr,flat:"",label:"Share Market Profile",icon:"share",class:"q-ml-lg",color:"primary"},null,8,["onClick"])])]),_:1}),y($e,{class:"lt-md"}),y($e,{class:"lt-md"}),y($e)]),_:1})}var Ig=Cn(yk,[["render",Ek]]);const Ik=sn({name:"UserConfig",props:["account"],data:function(){return{accountData:null}},watch:{account(){this.accountData=this.account&&JSON.parse(JSON.stringify(this.account))}},methods:{logout:async function(){this.$q.dialog(confirm("Please make sure you save your private key! You will not be able to recover it later!")).onOk(async()=>{this.$emit("logout")})},copyText(e){this.$emit("copy-text",e)},clearAllData(){this.$emit("clear-all-data")}},created:async function(){this.accountData=this.account&&JSON.parse(JSON.stringify(this.account))}}),$k={class:"row"},Ok={class:"col-10"},Rk={class:"col-2 auto-width"},Lk={class:"row"},Nk={class:"col-10"},Bk={class:"col-2 auto-width"},Fk=S("div",null,[S("strong",null,"No Account")],-1),Uk={class:"float-right"};function zk(e,t,r,a,l,s){return O(),oe(Jt,null,{default:b(()=>[e.accountData?(O(),oe($e,{key:0},{default:b(()=>[S("div",$k,[S("div",Ok,[y(It,{modelValue:e.accountData.npub,"onUpdate:modelValue":t[1]||(t[1]=u=>e.accountData.npub=u),readonly:"",disbled:"",outlined:"",hint:e.accountData.pubkey,type:"text",label:"Public Key",class:"q-mb-md"},{append:b(()=>[y(ye,{onClick:t[0]||(t[0]=u=>e.copyText(e.accountData.npub)),icon:"content_copy",label:"Npub",flat:"",color:"gray float-right q-mt-sm"})]),_:1},8,["modelValue","hint"])]),S("div",Rk,[y(ye,{onClick:t[2]||(t[2]=u=>e.copyText(e.accountData.pubkey)),icon:"content_copy",label:"Hex",flat:"",color:"gray float-right q-mt-sm"})])]),S("div",Lk,[S("div",Nk,[y(It,{modelValue:e.accountData.nsec,"onUpdate:modelValue":t[4]||(t[4]=u=>e.accountData.nsec=u),readonly:"",disbled:"",outlined:"",type:"password",label:"Private Key",class:"q-mb-md"},{append:b(()=>[y(ye,{onClick:t[3]||(t[3]=u=>e.copyText(e.accountData.nsec)),icon:"content_copy",label:"Nsec",flat:"",color:"gray float-right q-mt-sm"})]),_:1},8,["modelValue"])]),S("div",Bk,[y(ye,{onClick:t[5]||(t[5]=u=>e.copyText(e.accountData.privkey)),icon:"content_copy",label:"Hex",flat:"",color:"gray float-right q-mt-sm"})])])]),_:1})):(O(),oe($e,{key:1},{default:b(()=>[Fk]),_:1})),y(ut),y($e,null,{default:b(()=>[S("div",Uk,[y(ye,{onClick:e.clearAllData,flat:"",label:"Clear All Data",icon:"delete",class:"q-ml-lg",color:"negative"},null,8,["onClick"]),e.accountData?(O(),oe(ye,{key:0,onClick:e.logout,flat:"",label:"Logout",icon:"logout",class:"q-ml-lg",color:"primary"},null,8,["onClick"])):(O(),oe(ye,{key:1,onClick:t[6]||(t[6]=u=>e.$emit("login")),flat:"",label:"Login",icon:"login",class:"q-ml-lg",color:"primary"}))])]),_:1}),y($e)]),_:1})}var Vk=Cn(Ik,[["render",zk]]),Yk=Je({name:"QChatMessage",props:{sent:Boolean,label:String,bgColor:String,textColor:String,name:String,avatar:String,text:Array,stamp:String,size:String,labelHtml:Boolean,nameHtml:Boolean,textHtml:Boolean,stampHtml:Boolean},setup(e,{slots:t}){const r=$(()=>e.sent===!0?"sent":"received"),a=$(()=>`q-message-text-content q-message-text-content--${r.value}`+(e.textColor!==void 0?` text-${e.textColor}`:"")),l=$(()=>`q-message-text q-message-text--${r.value}`+(e.bgColor!==void 0?` text-${e.bgColor}`:"")),s=$(()=>"q-message-container row items-end no-wrap"+(e.sent===!0?" reverse":"")),u=$(()=>e.size!==void 0?`col-${e.size}`:""),d=$(()=>({msg:e.textHtml===!0?"innerHTML":"textContent",stamp:e.stampHtml===!0?"innerHTML":"textContent",name:e.nameHtml===!0?"innerHTML":"textContent",label:e.labelHtml===!0?"innerHTML":"textContent"}));function f(v){return t.stamp!==void 0?[v,E("div",{class:"q-message-stamp"},t.stamp())]:e.stamp?[v,E("div",{class:"q-message-stamp",[d.value.stamp]:e.stamp})]:[v]}function g(v,C){const M=C===!0?v.length>1?_=>_:_=>E("div",[_]):_=>E("div",{[d.value.msg]:_});return v.map((_,x)=>E("div",{key:x,class:l.value},[E("div",{class:a.value},f(M(_)))]))}return()=>{const v=[];t.avatar!==void 0?v.push(t.avatar()):e.avatar!==void 0&&v.push(E("img",{class:`q-message-avatar q-message-avatar--${r.value}`,src:e.avatar,"aria-hidden":"true"}));const C=[];t.name!==void 0?C.push(E("div",{class:`q-message-name q-message-name--${r.value}`},t.name())):e.name!==void 0&&C.push(E("div",{class:`q-message-name q-message-name--${r.value}`,[d.value.name]:e.name})),t.default!==void 0?C.push(g(nc(t.default()),!0)):e.text!==void 0&&C.push(g(e.text)),v.push(E("div",{class:u.value},C));const M=[];return t.label!==void 0?M.push(E("div",{class:"q-message-label"},t.label())):e.label!==void 0&&M.push(E("div",{class:"q-message-label",[d.value.label]:e.label})),M.push(E("div",{class:s.value},v)),E("div",{class:`q-message q-message-${r.value}`},M)}}});function Tu(e,t,r){const a=na(e);let l,s=a.left-t.event.x,u=a.top-t.event.y,d=Math.abs(s),f=Math.abs(u);const g=t.direction;g.horizontal===!0&&g.vertical!==!0?l=s<0?"left":"right":g.horizontal!==!0&&g.vertical===!0?l=u<0?"up":"down":g.up===!0&&u<0?(l="up",d>f&&(g.left===!0&&s<0?l="left":g.right===!0&&s>0&&(l="right"))):g.down===!0&&u>0?(l="down",d>f&&(g.left===!0&&s<0?l="left":g.right===!0&&s>0&&(l="right"))):g.left===!0&&s<0?(l="left",d0&&(l="down"))):g.right===!0&&s>0&&(l="right",d0&&(l="down")));let v=!1;if(l===void 0&&r===!1){if(t.event.isFirst===!0||t.event.lastDir===void 0)return{};l=t.event.lastDir,v=!0,l==="left"||l==="right"?(a.left-=s,d=0,s=0):(a.top-=u,f=0,u=0)}return{synthetic:v,payload:{evt:e,touch:t.event.mouse!==!0,mouse:t.event.mouse===!0,position:a,direction:l,isFirst:t.event.isFirst,isFinal:r===!0,duration:Date.now()-t.event.time,distance:{x:d,y:f},offset:{x:s,y:u},delta:{x:a.left-t.event.lastX,y:a.top-t.event.lastY}}}}let Wk=0;var Th=rc({name:"touch-pan",beforeMount(e,{value:t,modifiers:r}){if(r.mouse!==!0&&Kn.has.touch!==!0)return;function a(s,u){r.mouse===!0&&u===!0?Rt(s):(r.stop===!0&&ir(s),r.prevent===!0&&yi(s))}const l={uid:"qvtp_"+Wk++,handler:t,modifiers:r,direction:So(r),noop:Xu,mouseStart(s){ko(s,l)&&Qh(s)&&(Rn(l,"temp",[[document,"mousemove","move","notPassiveCapture"],[document,"mouseup","end","passiveCapture"]]),l.start(s,!0))},touchStart(s){if(ko(s,l)){const u=s.target;Rn(l,"temp",[[u,"touchmove","move","notPassiveCapture"],[u,"touchcancel","end","passiveCapture"],[u,"touchend","end","passiveCapture"]]),l.start(s)}},start(s,u){if(Kn.is.firefox===!0&&ji(e,!0),l.lastEvt=s,u===!0||r.stop===!0){if(l.direction.all!==!0&&(u!==!0||l.modifiers.mouseAllDir!==!0&&l.modifiers.mousealldir!==!0)){const g=s.type.indexOf("mouse")>-1?new MouseEvent(s.type,s):new TouchEvent(s.type,s);s.defaultPrevented===!0&&yi(g),s.cancelBubble===!0&&ir(g),Object.assign(g,{qKeyEvent:s.qKeyEvent,qClickOutside:s.qClickOutside,qAnchorHandled:s.qAnchorHandled,qClonedBy:s.qClonedBy===void 0?[l.uid]:s.qClonedBy.concat(l.uid)}),l.initialEvent={target:s.target,event:g}}ir(s)}const{left:d,top:f}=na(s);l.event={x:d,y:f,time:Date.now(),mouse:u===!0,detected:!1,isFirst:!0,isFinal:!1,lastX:d,lastY:f}},move(s){if(l.event===void 0)return;const u=na(s),d=u.left-l.event.x,f=u.top-l.event.y;if(d===0&&f===0)return;l.lastEvt=s;const g=l.event.mouse===!0,v=()=>{a(s,g);let _;r.preserveCursor!==!0&&r.preservecursor!==!0&&(_=document.documentElement.style.cursor||"",document.documentElement.style.cursor="grabbing"),g===!0&&document.body.classList.add("no-pointer-events--children"),document.body.classList.add("non-selectable"),Ua(),l.styleCleanup=x=>{if(l.styleCleanup=void 0,_!==void 0&&(document.documentElement.style.cursor=_),document.body.classList.remove("non-selectable"),g===!0){const I=()=>{document.body.classList.remove("no-pointer-events--children")};x!==void 0?setTimeout(()=>{I(),x()},50):I()}else x!==void 0&&x()}};if(l.event.detected===!0){l.event.isFirst!==!0&&a(s,l.event.mouse);const{payload:_,synthetic:x}=Tu(s,l,!1);_!==void 0&&(l.handler(_)===!1?l.end(s):(l.styleCleanup===void 0&&l.event.isFirst===!0&&v(),l.event.lastX=_.position.left,l.event.lastY=_.position.top,l.event.lastDir=x===!0?void 0:_.direction,l.event.isFirst=!1));return}if(l.direction.all===!0||g===!0&&(l.modifiers.mouseAllDir===!0||l.modifiers.mousealldir===!0)){v(),l.event.detected=!0,l.move(s);return}const C=Math.abs(d),M=Math.abs(f);C!==M&&(l.direction.horizontal===!0&&C>M||l.direction.vertical===!0&&C0||l.direction.left===!0&&C>M&&d<0||l.direction.right===!0&&C>M&&d>0?(l.event.detected=!0,l.move(s)):l.end(s,!0))},end(s,u){if(l.event!==void 0){if(Pr(l,"temp"),Kn.is.firefox===!0&&ji(e,!1),u===!0)l.styleCleanup!==void 0&&l.styleCleanup(),l.event.detected!==!0&&l.initialEvent!==void 0&&l.initialEvent.target.dispatchEvent(l.initialEvent.event);else if(l.event.detected===!0){l.event.isFirst===!0&&l.handler(Tu(s===void 0?l.lastEvt:s,l).payload);const{payload:d}=Tu(s===void 0?l.lastEvt:s,l,!0),f=()=>{l.handler(d)};l.styleCleanup!==void 0?l.styleCleanup(f):f()}l.event=void 0,l.initialEvent=void 0,l.lastEvt=void 0}}};if(e.__qtouchpan=l,r.mouse===!0){const s=r.mouseCapture===!0||r.mousecapture===!0?"Capture":"";Rn(l,"main",[[e,"mousedown","mouseStart",`passive${s}`]])}Kn.has.touch===!0&&Rn(l,"main",[[e,"touchstart","touchStart",`passive${r.capture===!0?"Capture":""}`],[e,"touchmove","noop","notPassiveCapture"]])},updated(e,t){const r=e.__qtouchpan;r!==void 0&&(t.oldValue!==t.value&&(typeof value!="function"&&r.end(),r.handler=t.value),r.direction=So(t.modifiers))},beforeUnmount(e){const t=e.__qtouchpan;t!==void 0&&(t.event!==void 0&&t.end(),Pr(t,"main"),Pr(t,"temp"),Kn.is.firefox===!0&&ji(e,!1),t.styleCleanup!==void 0&&t.styleCleanup(),delete e.__qtouchpan)}});const Mh=["vertical","horizontal"],Mu={vertical:{offset:"offsetY",scroll:"scrollTop",dir:"down",dist:"y"},horizontal:{offset:"offsetX",scroll:"scrollLeft",dir:"right",dist:"x"}},Dh={prevent:!0,mouse:!0,mouseAllDir:!0},qh=e=>e>=250?50:Math.ceil(e/5);var Hk=Je({name:"QScrollArea",props:{...or,thumbStyle:Object,verticalThumbStyle:Object,horizontalThumbStyle:Object,barStyle:[Array,String,Object],verticalBarStyle:[Array,String,Object],horizontalBarStyle:[Array,String,Object],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:t,emit:r}){const a=se(!1),l=se(!1),s=se(!1),u={vertical:se(0),horizontal:se(0)},d={vertical:{ref:se(null),position:se(0),size:se(0)},horizontal:{ref:se(null),position:se(0),size:se(0)}},{proxy:f}=Dt(),g=sr(e,f.$q);let v=null,C;const M=se(null),_=$(()=>"q-scrollarea"+(g.value===!0?" q-scrollarea--dark":""));d.vertical.percentage=$(()=>{const j=d.vertical.size.value-u.vertical.value;if(j<=0)return 0;const G=no(d.vertical.position.value/j,0,1);return Math.round(G*1e4)/1e4}),d.vertical.thumbHidden=$(()=>(e.visible===null?s.value:e.visible)!==!0&&a.value===!1&&l.value===!1||d.vertical.size.value<=u.vertical.value+1),d.vertical.thumbStart=$(()=>d.vertical.percentage.value*(u.vertical.value-d.vertical.thumbSize.value)),d.vertical.thumbSize=$(()=>Math.round(no(u.vertical.value*u.vertical.value/d.vertical.size.value,qh(u.vertical.value),u.vertical.value))),d.vertical.style=$(()=>({...e.thumbStyle,...e.verticalThumbStyle,top:`${d.vertical.thumbStart.value}px`,height:`${d.vertical.thumbSize.value}px`})),d.vertical.thumbClass=$(()=>"q-scrollarea__thumb q-scrollarea__thumb--v absolute-right"+(d.vertical.thumbHidden.value===!0?" q-scrollarea__thumb--invisible":"")),d.vertical.barClass=$(()=>"q-scrollarea__bar q-scrollarea__bar--v absolute-right"+(d.vertical.thumbHidden.value===!0?" q-scrollarea__bar--invisible":"")),d.horizontal.percentage=$(()=>{const j=d.horizontal.size.value-u.horizontal.value;if(j<=0)return 0;const G=no(Math.abs(d.horizontal.position.value)/j,0,1);return Math.round(G*1e4)/1e4}),d.horizontal.thumbHidden=$(()=>(e.visible===null?s.value:e.visible)!==!0&&a.value===!1&&l.value===!1||d.horizontal.size.value<=u.horizontal.value+1),d.horizontal.thumbStart=$(()=>d.horizontal.percentage.value*(u.horizontal.value-d.horizontal.thumbSize.value)),d.horizontal.thumbSize=$(()=>Math.round(no(u.horizontal.value*u.horizontal.value/d.horizontal.size.value,qh(u.horizontal.value),u.horizontal.value))),d.horizontal.style=$(()=>({...e.thumbStyle,...e.horizontalThumbStyle,[f.$q.lang.rtl===!0?"right":"left"]:`${d.horizontal.thumbStart.value}px`,width:`${d.horizontal.thumbSize.value}px`})),d.horizontal.thumbClass=$(()=>"q-scrollarea__thumb q-scrollarea__thumb--h absolute-bottom"+(d.horizontal.thumbHidden.value===!0?" q-scrollarea__thumb--invisible":"")),d.horizontal.barClass=$(()=>"q-scrollarea__bar q-scrollarea__bar--h absolute-bottom"+(d.horizontal.thumbHidden.value===!0?" q-scrollarea__bar--invisible":""));const x=$(()=>d.vertical.thumbHidden.value===!0&&d.horizontal.thumbHidden.value===!0?e.contentStyle:e.contentActiveStyle),I=[[Th,j=>{V(j,"vertical")},void 0,{vertical:!0,...Dh}]],L=[[Th,j=>{V(j,"horizontal")},void 0,{horizontal:!0,...Dh}]];function F(){const j={};return Mh.forEach(G=>{const me=d[G];j[G+"Position"]=me.position.value,j[G+"Percentage"]=me.percentage.value,j[G+"Size"]=me.size.value,j[G+"ContainerSize"]=u[G].value}),j}const Y=ec(()=>{const j=F();j.ref=f,r("scroll",j)},0);function D(j,G,me){if(Mh.includes(j)===!1){console.error("[QScrollArea]: wrong first param of setScrollPosition (vertical/horizontal)");return}(j==="vertical"?La:hu)(M.value,G,me)}function A({height:j,width:G}){let me=!1;u.vertical.value!==j&&(u.vertical.value=j,me=!0),u.horizontal.value!==G&&(u.horizontal.value=G,me=!0),me===!0&&xe()}function N({position:j}){let G=!1;d.vertical.position.value!==j.top&&(d.vertical.position.value=j.top,G=!0),d.horizontal.position.value!==j.left&&(d.horizontal.position.value=j.left,G=!0),G===!0&&xe()}function J({height:j,width:G}){d.horizontal.size.value!==G&&(d.horizontal.size.value=G,xe()),d.vertical.size.value!==j&&(d.vertical.size.value=j,xe())}function V(j,G){const me=d[G];if(j.isFirst===!0){if(me.thumbHidden.value===!0)return;C=me.position.value,l.value=!0}else if(l.value!==!0)return;j.isFinal===!0&&(l.value=!1);const rt=Mu[G],X=u[G].value,Z=(me.size.value-X)/(X-me.thumbSize.value),he=j.distance[rt.dist],fe=C+(j.direction===rt.dir?1:-1)*he*Z;lt(fe,G)}function H(j,G){const me=d[G];if(me.thumbHidden.value!==!0){const rt=j[Mu[G].offset];if(rtme.thumbStart.value+me.thumbSize.value){const X=rt-me.thumbSize.value/2;lt(X/u[G].value*me.size.value,G)}me.ref.value!==null&&me.ref.value.dispatchEvent(new MouseEvent(j.type,j))}}function pe(j){H(j,"vertical")}function _e(j){H(j,"horizontal")}function xe(){a.value=!0,v!==null&&clearTimeout(v),v=setTimeout(()=>{v=null,a.value=!1},e.delay),e.onScroll!==void 0&&Y()}function lt(j,G){M.value[Mu[G].scroll]=j}function te(){s.value=!0}function Pe(){s.value=!1}let Be=null;return Ve(()=>f.$q.lang.rtl,j=>{M.value!==null&&hu(M.value,Math.abs(d.horizontal.position.value)*(j===!0?-1:1))}),oa(()=>{Be={top:d.vertical.position.value,left:d.horizontal.position.value}}),sa(()=>{if(Be===null)return;const j=M.value;j!==null&&(hu(j,Be.left),La(j,Be.top))}),Ht(Y.cancel),Object.assign(f,{getScrollTarget:()=>M.value,getScroll:F,getScrollPosition:()=>({top:d.vertical.position.value,left:d.horizontal.position.value}),getScrollPercentage:()=>({top:d.vertical.percentage.value,left:d.horizontal.percentage.value}),setScrollPosition:D,setScrollPercentage(j,G,me){D(j,G*(d[j].size.value-u[j].value)*(j==="horizontal"&&f.$q.lang.rtl===!0?-1:1),me)}}),()=>E("div",{class:_.value,onMouseenter:te,onMouseleave:Pe},[E("div",{ref:M,class:"q-scrollarea__container scroll relative-position fit hide-scrollbar",tabindex:e.tabindex!==void 0?e.tabindex:void 0},[E("div",{class:"q-scrollarea__content absolute",style:x.value},Si(t.default,[E(Eu,{debounce:0,onResize:J})])),E(cw,{axis:"both",onScroll:N})]),E(Eu,{debounce:0,onResize:A}),E("div",{class:d.vertical.barClass.value,style:[e.barStyle,e.verticalBarStyle],"aria-hidden":"true",onMousedown:pe}),E("div",{class:d.horizontal.barClass.value,style:[e.barStyle,e.horizontalBarStyle],"aria-hidden":"true",onMousedown:_e}),Gn(E("div",{ref:d.vertical.ref,class:d.vertical.thumbClass.value,style:d.vertical.style.value,"aria-hidden":"true"}),I),Gn(E("div",{ref:d.horizontal.ref,class:d.horizontal.thumbClass.value,style:d.horizontal.style.value,"aria-hidden":"true"}),L)])}}),Kk=Je({name:"QForm",props:{autofocus:Boolean,noErrorFocus:Boolean,noResetFocus:Boolean,greedy:Boolean,onSubmit:Function},emits:["reset","validationSuccess","validationError"],setup(e,{slots:t,emit:r}){const a=Dt(),l=se(null);let s=0;const u=[];function d(_){const x=typeof _=="boolean"?_:e.noErrorFocus!==!0,I=++s,L=(D,A)=>{r("validation"+(D===!0?"Success":"Error"),A)},F=D=>{const A=D.validate();return typeof A.then=="function"?A.then(N=>({valid:N,comp:D}),N=>({valid:!1,comp:D,err:N})):Promise.resolve({valid:A,comp:D})};return(e.greedy===!0?Promise.all(u.map(F)).then(D=>D.filter(A=>A.valid!==!0)):u.reduce((D,A)=>D.then(()=>F(A).then(N=>{if(N.valid===!1)return Promise.reject(N)})),Promise.resolve()).catch(D=>[D])).then(D=>{if(D===void 0||D.length===0)return I===s&&L(!0),!0;if(I===s){const{comp:A,err:N}=D[0];if(N!==void 0&&console.error(N),L(!1,A),x===!0){const J=D.find(({comp:V})=>typeof V.focus=="function"&&ew(V.$)===!1);J!==void 0&&J.comp.focus()}}return!1})}function f(){s++,u.forEach(_=>{typeof _.resetValidation=="function"&&_.resetValidation()})}function g(_){_!==void 0&&Rt(_);const x=s+1;d().then(I=>{x===s&&I===!0&&(e.onSubmit!==void 0?r("submit",_):_!==void 0&&_.target!==void 0&&typeof _.target.submit=="function"&&_.target.submit())})}function v(_){_!==void 0&&Rt(_),r("reset"),Sn(()=>{f(),e.autofocus===!0&&e.noResetFocus!==!0&&C()})}function C(){Uh(()=>{if(l.value===null)return;const _=l.value.querySelector("[autofocus][tabindex], [data-autofocus][tabindex]")||l.value.querySelector("[autofocus] [tabindex], [data-autofocus] [tabindex]")||l.value.querySelector("[autofocus], [data-autofocus]")||Array.prototype.find.call(l.value.querySelectorAll("[tabindex]"),x=>x.tabIndex>-1);_!=null&&_.focus({preventScroll:!0})})}Wh(tw,{bindComponent(_){u.push(_)},unbindComponent(_){const x=u.indexOf(_);x>-1&&u.splice(x,1)}});let M=!1;return oa(()=>{M=!0}),sa(()=>{M===!0&&e.autofocus===!0&&C()}),ni(()=>{e.autofocus===!0&&C()}),Object.assign(a.proxy,{validate:d,resetValidation:f,submit:g,reset:v,focus:C,getValidationComponents:()=>u}),()=>E("form",{class:"q-form",ref:l,onSubmit:g,onReset:v},Mt(t.default))}});//! moment.js +`;return typeof a=="function"&&a(null,M),M};const CS=Nw,Nu=og,Sg=bg,TS=wg;function fc(e,t,r,a,l){const s=[].slice.call(arguments,1),u=s.length,d=typeof s[u-1]=="function";if(!d&&!CS())throw new Error("Callback required as last argument");if(d){if(u<2)throw new Error("Too few arguments provided");u===2?(l=r,r=t,t=a=void 0):u===3&&(t.getContext&&typeof l=="undefined"?(l=a,a=void 0):(l=a,a=r,r=t,t=void 0))}else{if(u<1)throw new Error("Too few arguments provided");return u===1?(r=t,t=a=void 0):u===2&&!t.getContext&&(a=r,r=t,t=void 0),new Promise(function(f,g){try{const v=Nu.create(r,a);f(e(v,t,a))}catch(v){g(v)}})}try{const f=Nu.create(r,a);l(null,e(f,t,a))}catch(f){l(f)}}Nu.create;var MS=fc.bind(null,Sg.render),DS=fc.bind(null,Sg.renderToDataURL),qS=fc.bind(null,function(e,t,r){return TS.render(e,r)});/*! vue-qrcode v2.0.0 | (c) 2018-present Chen Fengyuan | MIT */const ph="ready";var PS=sn({name:"VueQrcode",props:{value:{type:String,default:void 0},options:{type:Object,default:void 0},tag:{type:String,default:"canvas"}},emits:[ph],watch:{$props:{deep:!0,immediate:!0,handler(){this.$el&&this.generate()}}},mounted(){this.generate()},methods:{generate(){const e=this.options||{},t=String(this.value),r=()=>{this.$emit(ph,this.$el)};switch(this.tag){case"canvas":MS(this.$el,t,e,a=>{if(a)throw a;r()});break;case"img":DS(t,e,(a,l)=>{if(a)throw a;this.$el.src=l,this.$el.onload=r});break;case"svg":qS(t,e,(a,l)=>{if(a)throw a;const s=document.createElement("div");s.innerHTML=l;const u=s.querySelector("svg");if(u){const{attributes:d,childNodes:f}=u;Object.keys(d).forEach(g=>{const v=d[Number(g)];this.$el.setAttribute(v.name,v.value)}),Object.keys(f).forEach(g=>{const v=f[Number(g)];this.$el.appendChild(v.cloneNode(!0))}),r()}});break}}},render(){return E(this.tag,this.$slots.default)}});function xS(e){const t=document.createElement("textarea");t.value=e,t.contentEditable="true",t.style.position="fixed";const r=()=>{};Bh(r),document.body.appendChild(t),t.focus(),t.select();const a=document.execCommand("copy");return t.remove(),Fh(r),a}function AS(e){return navigator.clipboard!==void 0?navigator.clipboard.writeText(e):new Promise((t,r)=>{const a=xS(e);a?t(!0):r(a)})}let ES=0;const IS=["click","keydown"],$S={icon:String,label:[Number,String],alert:[Boolean,String],alertIcon:String,name:{type:[Number,String],default:()=>`t_${ES++}`},noCaps:Boolean,tabindex:[String,Number],disable:Boolean,contentClass:String,ripple:{type:[Boolean,Object],default:!0}};function OS(e,t,r,a){const l=ho(Vh,Tr);if(l===Tr)return console.error("QTab/QRouteTab component needs to be child of QTabs"),Tr;const{proxy:s}=Dt(),u=se(null),d=se(null),f=se(null),g=$(()=>e.disable===!0||e.ripple===!1?!1:Object.assign({keyCodes:[13,32],early:!0},e.ripple===!0?{}:e.ripple)),v=$(()=>l.currentModel.value===e.name),C=$(()=>"q-tab relative-position self-stretch flex flex-center text-center"+(v.value===!0?" q-tab--active"+(l.tabProps.value.activeClass?" "+l.tabProps.value.activeClass:"")+(l.tabProps.value.activeColor?` text-${l.tabProps.value.activeColor}`:"")+(l.tabProps.value.activeBgColor?` bg-${l.tabProps.value.activeBgColor}`:""):" q-tab--inactive")+(e.icon&&e.label&&l.tabProps.value.inlineLabel===!1?" q-tab--full":"")+(e.noCaps===!0||l.tabProps.value.noCaps===!0?" q-tab--no-caps":"")+(e.disable===!0?" disabled":" q-focusable q-hoverable cursor-pointer")+(a!==void 0?a.linkClass.value:"")),M=$(()=>"q-tab__content self-stretch flex-center relative-position q-anchor--skip non-selectable "+(l.tabProps.value.inlineLabel===!0?"row no-wrap q-tab__content--inline":"column")+(e.contentClass!==void 0?` ${e.contentClass}`:"")),_=$(()=>e.disable===!0||l.hasFocus.value===!0||v.value===!1&&l.hasActiveTab.value===!0?-1:e.tabindex||0);function x(D,A){if(A!==!0&&u.value!==null&&u.value.focus(),e.disable===!0){a!==void 0&&a.hasRouterLink.value===!0&&Rt(D);return}if(a===void 0){l.updateModel({name:e.name}),r("click",D);return}if(a.hasRouterLink.value===!0){const N=(J={})=>{let V;const H=J.to===void 0||Hi(J.to,e.to)===!0?l.avoidRouteWatcher=fo():null;return a.navigateToRouterLink(D,{...J,returnRouterError:!0}).catch(pe=>{V=pe}).then(pe=>{if(H===l.avoidRouteWatcher&&(l.avoidRouteWatcher=!1,V===void 0&&(pe===void 0||pe.message.startsWith("Avoided redundant navigation")===!0)&&l.updateModel({name:e.name})),J.returnRouterError===!0)return V!==void 0?Promise.reject(V):pe})};r("click",D,N),D.defaultPrevented!==!0&&N();return}r("click",D)}function I(D){Ka(D,[13,32])?x(D,!0):Yh(D)!==!0&&D.keyCode>=35&&D.keyCode<=40&&D.altKey!==!0&&D.metaKey!==!0&&l.onKbdNavigate(D.keyCode,s.$el)===!0&&Rt(D),r("keydown",D)}function L(){const D=l.tabProps.value.narrowIndicator,A=[],N=E("div",{ref:f,class:["q-tab__indicator",l.tabProps.value.indicatorClass]});e.icon!==void 0&&A.push(E(Yt,{class:"q-tab__icon",name:e.icon})),e.label!==void 0&&A.push(E("div",{class:"q-tab__label"},e.label)),e.alert!==!1&&A.push(e.alertIcon!==void 0?E(Yt,{class:"q-tab__alert-icon",color:e.alert!==!0?e.alert:void 0,name:e.alertIcon}):E("div",{class:"q-tab__alert"+(e.alert!==!0?` text-${e.alert}`:"")})),D===!0&&A.push(N);const J=[E("div",{class:"q-focus-helper",tabindex:-1,ref:u}),E("div",{class:M.value},Si(t.default,A))];return D===!1&&J.push(N),J}const F={name:$(()=>e.name),rootRef:d,tabIndicatorRef:f,routeData:a};Ht(()=>{l.unregisterTab(F)}),ni(()=>{l.registerTab(F)});function Y(D,A){const N={ref:d,class:C.value,tabindex:_.value,role:"tab","aria-selected":v.value===!0?"true":"false","aria-disabled":e.disable===!0?"true":void 0,onClick:x,onKeydown:I,...A};return Gn(E(D,N,L()),[[Ju,g.value]])}return{renderTab:Y,$tabs:l}}var Su=Je({name:"QTab",props:$S,emits:IS,setup(e,{slots:t,emit:r}){const{renderTab:a}=OS(e,t,r);return()=>a("div")}});function RS(e,t,r){const a=r===!0?["left","right"]:["top","bottom"];return`absolute-${t===!0?a[0]:a[1]}${e?` text-${e}`:""}`}const LS=["left","center","right","justify"];var NS=Je({name:"QTabs",props:{modelValue:[Number,String],align:{type:String,default:"center",validator:e=>LS.includes(e)},breakpoint:{type:[String,Number],default:600},vertical:Boolean,shrink:Boolean,stretch:Boolean,activeClass:String,activeColor:String,activeBgColor:String,indicatorColor:String,leftIcon:String,rightIcon:String,outsideArrows:Boolean,mobileArrows:Boolean,switchIndicator:Boolean,narrowIndicator:Boolean,inlineLabel:Boolean,noCaps:Boolean,dense:Boolean,contentClass:String,"onUpdate:modelValue":[Function,Array]},setup(e,{slots:t,emit:r}){const{proxy:a}=Dt(),{$q:l}=a,{registerTick:s}=Ra(),{registerTick:u}=Ra(),{registerTick:d}=Ra(),{registerTimeout:f,removeTimeout:g}=co(),{registerTimeout:v,removeTimeout:C}=co(),M=se(null),_=se(null),x=se(e.modelValue),I=se(!1),L=se(!0),F=se(!1),Y=se(!1),D=[],A=se(0),N=se(!1);let J=null,V=null,H;const pe=$(()=>({activeClass:e.activeClass,activeColor:e.activeColor,activeBgColor:e.activeBgColor,indicatorClass:RS(e.indicatorColor,e.switchIndicator,e.vertical),narrowIndicator:e.narrowIndicator,inlineLabel:e.inlineLabel,noCaps:e.noCaps})),_e=$(()=>{const K=A.value,de=x.value;for(let qe=0;qe`q-tabs__content--align-${I.value===!0?"left":Y.value===!0?"justify":e.align}`),lt=$(()=>`q-tabs row no-wrap items-center q-tabs--${I.value===!0?"":"not-"}scrollable q-tabs--${e.vertical===!0?"vertical":"horizontal"} q-tabs__arrows--${e.outsideArrows===!0?"outside":"inside"} q-tabs--mobile-with${e.mobileArrows===!0?"":"out"}-arrows`+(e.dense===!0?" q-tabs--dense":"")+(e.shrink===!0?" col-shrink":"")+(e.stretch===!0?" self-stretch":"")),te=$(()=>"q-tabs__content scroll--mobile row no-wrap items-center self-stretch hide-scrollbar relative-position "+xe.value+(e.contentClass!==void 0?` ${e.contentClass}`:"")),Pe=$(()=>e.vertical===!0?{container:"height",content:"offsetHeight",scroll:"scrollHeight"}:{container:"width",content:"offsetWidth",scroll:"scrollWidth"}),Be=$(()=>e.vertical!==!0&&l.lang.rtl===!0),j=$(()=>za===!1&&Be.value===!0);Ve(Be,he),Ve(()=>e.modelValue,K=>{G({name:K,setCurrent:!0,skipEmit:!0})}),Ve(()=>e.outsideArrows,me);function G({name:K,setCurrent:de,skipEmit:qe}){x.value!==K&&(qe!==!0&&e["onUpdate:modelValue"]!==void 0&&r("update:modelValue",K),(de===!0||e["onUpdate:modelValue"]===void 0)&&(X(x.value,K),x.value=K))}function me(){s(()=>{rt({width:M.value.offsetWidth,height:M.value.offsetHeight})})}function rt(K){if(Pe.value===void 0||_.value===null)return;const de=K[Pe.value.container],qe=Math.min(_.value[Pe.value.scroll],Array.prototype.reduce.call(_.value.children,(it,Ze)=>it+(Ze[Pe.value.content]||0),0)),gt=de>0&&qe>de;I.value=gt,gt===!0&&u(he),Y.value=deit.name.value===K):null,gt=de!=null&&de!==""?D.find(it=>it.name.value===de):null;if(qe&>){const it=qe.tabIndicatorRef.value,Ze=gt.tabIndicatorRef.value;J!==null&&(clearTimeout(J),J=null),it.style.transition="none",it.style.transform="none",Ze.style.transition="none",Ze.style.transform="none";const Fe=it.getBoundingClientRect(),mt=Ze.getBoundingClientRect();Ze.style.transform=e.vertical===!0?`translate3d(0,${Fe.top-mt.top}px,0) scale3d(1,${mt.height?Fe.height/mt.height:1},1)`:`translate3d(${Fe.left-mt.left}px,0,0) scale3d(${mt.width?Fe.width/mt.width:1},1,1)`,d(()=>{J=setTimeout(()=>{J=null,Ze.style.transition="transform .25s cubic-bezier(.4, 0, .2, 1)",Ze.style.transform="none"},70)})}gt&&I.value===!0&&Z(gt.rootRef.value)}function Z(K){const{left:de,width:qe,top:gt,height:it}=_.value.getBoundingClientRect(),Ze=K.getBoundingClientRect();let Fe=e.vertical===!0?Ze.top-gt:Ze.left-de;if(Fe<0){_.value[e.vertical===!0?"scrollTop":"scrollLeft"]+=Math.floor(Fe),he();return}Fe+=e.vertical===!0?Ze.height-it:Ze.width-qe,Fe>0&&(_.value[e.vertical===!0?"scrollTop":"scrollLeft"]+=Math.ceil(Fe),he())}function he(){const K=_.value;if(K===null)return;const de=K.getBoundingClientRect(),qe=e.vertical===!0?K.scrollTop:Math.abs(K.scrollLeft);Be.value===!0?(L.value=Math.ceil(qe+de.width)0):(L.value=qe>0,F.value=e.vertical===!0?Math.ceil(qe+de.height){ee(K)===!0&&we()},5)}function Ge(){fe(j.value===!0?Number.MAX_SAFE_INTEGER:0)}function ze(){fe(j.value===!0?0:Number.MAX_SAFE_INTEGER)}function we(){V!==null&&(clearInterval(V),V=null)}function Me(K,de){const qe=Array.prototype.filter.call(_.value.children,mt=>mt===de||mt.matches&&mt.matches(".q-tab.q-focusable")===!0),gt=qe.length;if(gt===0)return;if(K===36)return Z(qe[0]),qe[0].focus(),!0;if(K===35)return Z(qe[gt-1]),qe[gt-1].focus(),!0;const it=K===(e.vertical===!0?38:37),Ze=K===(e.vertical===!0?40:39),Fe=it===!0?-1:Ze===!0?1:void 0;if(Fe!==void 0){const mt=Be.value===!0?-1:1,Pt=qe.indexOf(de)+Fe*mt;return Pt>=0&&Ptj.value===!0?{get:K=>Math.abs(K.scrollLeft),set:(K,de)=>{K.scrollLeft=-de}}:e.vertical===!0?{get:K=>K.scrollTop,set:(K,de)=>{K.scrollTop=de}}:{get:K=>K.scrollLeft,set:(K,de)=>{K.scrollLeft=de}});function ee(K){const de=_.value,{get:qe,set:gt}=ft.value;let it=!1,Ze=qe(de);const Fe=K=K)&&(it=!0,Ze=K),gt(de,Ze),he(),it}function wt(K,de){for(const qe in K)if(K[qe]!==de[qe])return!1;return!0}function nn(){let K=null,de={matchedLen:0,queryDiff:9999,hrefLen:0};const qe=D.filter(Fe=>Fe.routeData!==void 0&&Fe.routeData.hasRouterLink.value===!0),{hash:gt,query:it}=a.$route,Ze=Object.keys(it).length;for(const Fe of qe){const mt=Fe.routeData.exact.value===!0;if(Fe.routeData[mt===!0?"linkIsExactActive":"linkIsActive"].value!==!0)continue;const{hash:Pt,query:cn,matched:er,href:ii}=Fe.routeData.resolvedLink.value,Un=Object.keys(cn).length;if(mt===!0){if(Pt!==gt||Un!==Ze||wt(it,cn)===!1)continue;K=Fe.name.value;break}if(Pt!==""&&Pt!==gt||Un!==0&&wt(cn,it)===!1)continue;const Qt={matchedLen:er.length,queryDiff:Ze-Un,hrefLen:ii.length-Pt.length};if(Qt.matchedLen>de.matchedLen){K=Fe.name.value,de=Qt;continue}else if(Qt.matchedLen!==de.matchedLen)continue;if(Qt.queryDiffde.hrefLen&&(K=Fe.name.value,de=Qt)}K===null&&D.some(Fe=>Fe.routeData===void 0&&Fe.name.value===x.value)===!0||G({name:K,setCurrent:!0})}function un(K){if(g(),N.value!==!0&&M.value!==null&&K.target&&typeof K.target.closest=="function"){const de=K.target.closest(".q-tab");de&&M.value.contains(de)===!0&&(N.value=!0,I.value===!0&&Z(de))}}function rn(){f(()=>{N.value=!1},30)}function qt(){Fn.avoidRouteWatcher===!1?v(nn):C()}function Kt(){if(H===void 0){const K=Ve(()=>a.$route.fullPath,qt);H=()=>{K(),H=void 0}}}function Xn(K){D.push(K),A.value++,me(),K.routeData===void 0||a.$route===void 0?v(()=>{if(I.value===!0){const de=x.value,qe=de!=null&&de!==""?D.find(gt=>gt.name.value===de):null;qe&&Z(qe.rootRef.value)}}):(Kt(),K.routeData.hasRouterLink.value===!0&&qt())}function Gt(K){D.splice(D.indexOf(K),1),A.value--,me(),H!==void 0&&K.routeData!==void 0&&(D.every(de=>de.routeData===void 0)===!0&&H(),qt())}const Fn={currentModel:x,tabProps:pe,hasFocus:N,hasActiveTab:_e,registerTab:Xn,unregisterTab:Gt,verifyRouteModel:qt,updateModel:G,onKbdNavigate:Me,avoidRouteWatcher:!1};Wh(Vh,Fn);function $r(){J!==null&&clearTimeout(J),we(),H!==void 0&&H()}let St;return Ht($r),oa(()=>{St=H!==void 0,$r()}),sa(()=>{St===!0&&Kt(),me()}),()=>E("div",{ref:M,class:lt.value,role:"tablist",onFocusin:un,onFocusout:rn},[E(Eu,{onResize:rt}),E("div",{ref:_,class:te.value,onScroll:he},Mt(t.default)),E(Yt,{class:"q-tabs__arrow q-tabs__arrow--left absolute q-tab__icon"+(L.value===!0?"":" q-tabs__arrow--faded"),name:e.leftIcon||l.iconSet.tabs[e.vertical===!0?"up":"left"],onMousedownPassive:Ge,onTouchstartPassive:Ge,onMouseupPassive:we,onMouseleavePassive:we,onTouchendPassive:we}),E(Yt,{class:"q-tabs__arrow q-tabs__arrow--right absolute q-tab__icon"+(F.value===!0?"":" q-tabs__arrow--faded"),name:e.rightIcon||l.iconSet.tabs[e.vertical===!0?"down":"right"],onMousedownPassive:ze,onTouchstartPassive:ze,onMouseupPassive:we,onMouseleavePassive:we,onTouchendPassive:we})])}}),BS=Je({name:"QField",inheritAttrs:!1,props:ic,emits:Hh,setup(){return Kh(Gh())}});function no(e,t,r){return r<=t?t:Math.min(r,Math.max(t,e))}function yh(e,t,r){if(r<=t)return t;const a=r-t+1;let l=t+(e-t)%a;return l["add","add-unique","toggle"].includes(e),FS=".*+?^${}()|[]\\",US=Object.keys(ic);var $a=Je({name:"QSelect",inheritAttrs:!1,props:{...rg,...Gb,...ic,modelValue:{required:!0},multiple:Boolean,displayValue:[String,Number],displayValueHtml:Boolean,dropdownIcon:String,options:{type:Array,default:()=>[]},optionValue:[Function,String],optionLabel:[Function,String],optionDisable:[Function,String],hideSelected:Boolean,hideDropdownIcon:Boolean,fillInput:Boolean,maxValues:[Number,String],optionsDense:Boolean,optionsDark:{type:Boolean,default:null},optionsSelectedClass:String,optionsHtml:Boolean,optionsCover:Boolean,menuShrink:Boolean,menuAnchor:String,menuSelf:String,menuOffset:Array,popupContentClass:String,popupContentStyle:[String,Array,Object],useInput:Boolean,useChips:Boolean,newValueMode:{type:String,validator:_h},mapOptions:Boolean,emitValue:Boolean,inputDebounce:{type:[Number,String],default:500},inputClass:[Array,String,Object],inputStyle:[Array,String,Object],tabindex:{type:[String,Number],default:0},autocomplete:String,transitionShow:String,transitionHide:String,transitionDuration:[String,Number],behavior:{type:String,validator:e=>["default","menu","dialog"].includes(e),default:"default"},virtualScrollItemSize:{type:[Number,String],default:void 0},onNewValue:Function,onFilter:Function},emits:[...Hh,"add","remove","inputValue","newValue","keyup","keypress","keydown","filterAbort"],setup(e,{slots:t,emit:r}){const{proxy:a}=Dt(),{$q:l}=a,s=se(!1),u=se(!1),d=se(-1),f=se(""),g=se(!1),v=se(!1);let C=null,M,_,x,I=null,L,F,Y,D;const A=se(null),N=se(null),J=se(null),V=se(null),H=se(null),pe=Qb(e),_e=Jb(sl),xe=$(()=>Array.isArray(e.options)?e.options.length:0),lt=$(()=>e.virtualScrollItemSize===void 0?e.optionsDense===!0?24:48:e.virtualScrollItemSize),{virtualScrollSliceRange:te,virtualScrollSliceSizeComputed:Pe,localResetVirtualScroll:Be,padVirtualScroll:j,onVirtualScrollEvt:G,scrollTo:me,setVirtualScrollSize:rt}=ig({virtualScrollLength:xe,getVirtualScrollTarget:al,getVirtualScrollEl:il,virtualScrollItemSizeComputed:lt}),X=Gh(),Z=$(()=>{const T=e.mapOptions===!0&&e.multiple!==!0,le=e.modelValue!==void 0&&(e.modelValue!==null||T===!0)?e.multiple===!0&&Array.isArray(e.modelValue)?e.modelValue:[e.modelValue]:[];if(e.mapOptions===!0&&Array.isArray(e.options)===!0){const ie=e.mapOptions===!0&&M!==void 0?M:[],De=le.map(st=>ii(st,ie));return e.modelValue===null&&T===!0?De.filter(st=>st!==null):De}return le}),he=$(()=>{const T={};return US.forEach(le=>{const ie=e[le];ie!==void 0&&(T[le]=ie)}),T}),fe=$(()=>e.optionsDark===null?X.isDark.value:e.optionsDark),Ge=$(()=>lh(Z.value)),ze=$(()=>{let T="q-field__input q-placeholder col";return e.hideSelected===!0||Z.value.length===0?[T,e.inputClass]:(T+=" q-field__input--padding",e.inputClass===void 0?T:[T,e.inputClass])}),we=$(()=>(e.virtualScrollHorizontal===!0?"q-virtual-scroll--horizontal":"")+(e.popupContentClass?" "+e.popupContentClass:"")),Me=$(()=>xe.value===0),ft=$(()=>Z.value.map(T=>K.value(T)).join(", ")),ee=$(()=>e.displayValue!==void 0?e.displayValue:ft.value),wt=$(()=>e.optionsHtml===!0?()=>!0:T=>T!=null&&T.html===!0),nn=$(()=>e.displayValueHtml===!0||e.displayValue===void 0&&(e.optionsHtml===!0||Z.value.some(wt.value))),un=$(()=>X.focused.value===!0?e.tabindex:-1),rn=$(()=>{const T={tabindex:e.tabindex,role:"combobox","aria-label":e.label,"aria-readonly":e.readonly===!0?"true":"false","aria-autocomplete":e.useInput===!0?"list":"none","aria-expanded":s.value===!0?"true":"false","aria-controls":`${X.targetUid.value}_lb`};return d.value>=0&&(T["aria-activedescendant"]=`${X.targetUid.value}_${d.value}`),T}),qt=$(()=>({id:`${X.targetUid.value}_lb`,role:"listbox","aria-multiselectable":e.multiple===!0?"true":"false"})),Kt=$(()=>Z.value.map((T,le)=>({index:le,opt:T,html:wt.value(T),selected:!0,removeAtIndex:Fe,toggleOption:Pt,tabindex:un.value}))),Xn=$(()=>{if(xe.value===0)return[];const{from:T,to:le}=te.value;return e.options.slice(T,le).map((ie,De)=>{const st=de.value(ie)===!0,tt=T+De,kt={clickable:!0,active:!1,activeClass:$r.value,manualFocus:!0,focused:!1,disable:st,tabindex:-1,dense:e.optionsDense,dark:fe.value,role:"option",id:`${X.targetUid.value}_${tt}`,onClick:()=>{Pt(ie)}};return st!==!0&&(Qt(ie)===!0&&(kt.active=!0),d.value===tt&&(kt.focused=!0),kt["aria-selected"]=kt.active===!0?"true":"false",l.platform.is.desktop===!0&&(kt.onMousemove=()=>{s.value===!0&&cn(tt)})),{index:tt,opt:ie,html:wt.value(ie),label:K.value(ie),selected:kt.active,focused:kt.focused,toggleOption:Pt,setOptionIndex:cn,itemProps:kt}})}),Gt=$(()=>e.dropdownIcon!==void 0?e.dropdownIcon:l.iconSet.arrow.dropdown),Fn=$(()=>e.optionsCover===!1&&e.outlined!==!0&&e.standout!==!0&&e.borderless!==!0&&e.rounded!==!0),$r=$(()=>e.optionsSelectedClass!==void 0?e.optionsSelectedClass:e.color!==void 0?`text-${e.color}`:""),St=$(()=>Un(e.optionValue,"value")),K=$(()=>Un(e.optionLabel,"label")),de=$(()=>Un(e.optionDisable,"disable")),qe=$(()=>Z.value.map(T=>St.value(T))),gt=$(()=>{const T={onInput:sl,onChange:_e,onKeydown:rl,onKeyup:Mi,onKeypress:nl,onFocus:Ci,onClick(le){_===!0&&ir(le)}};return T.onCompositionstart=T.onCompositionupdate=T.onCompositionend=_e,T});Ve(Z,T=>{M=T,e.useInput===!0&&e.fillInput===!0&&e.multiple!==!0&&X.innerLoading.value!==!0&&(u.value!==!0&&s.value!==!0||Ge.value!==!0)&&(x!==!0&&Br(),(u.value===!0||s.value===!0)&&Rr(""))},{immediate:!0}),Ve(()=>e.fillInput,Br),Ve(s,qi),Ve(xe,ns);function it(T){return e.emitValue===!0?St.value(T):T}function Ze(T){if(T>-1&&T=e.maxValues)return;const De=e.modelValue.slice();r("add",{index:De.length,value:ie}),De.push(ie),r("update:modelValue",De)}function Pt(T,le){if(X.editable.value!==!0||T===void 0||de.value(T)===!0)return;const ie=St.value(T);if(e.multiple!==!0){le!==!0&&(Or(e.fillInput===!0?K.value(T):"",!0,!0),fr()),N.value!==null&&N.value.focus(),(Z.value.length===0||Hi(St.value(Z.value[0]),ie)!==!0)&&r("update:modelValue",e.emitValue===!0?ie:T);return}if((_!==!0||g.value===!0)&&X.focus(),Ci(),Z.value.length===0){const tt=e.emitValue===!0?ie:T;r("add",{index:0,value:tt}),r("update:modelValue",e.multiple===!0?[tt]:tt);return}const De=e.modelValue.slice(),st=qe.value.findIndex(tt=>Hi(tt,ie));if(st>-1)r("remove",{index:st,value:De.splice(st,1)[0]});else{if(e.maxValues!==void 0&&De.length>=e.maxValues)return;const tt=e.emitValue===!0?ie:T;r("add",{index:De.length,value:tt}),De.push(tt)}r("update:modelValue",De)}function cn(T){if(l.platform.is.desktop!==!0)return;const le=T>-1&&T=0?K.value(e.options[ie]):L))}}function ii(T,le){const ie=De=>Hi(St.value(De),T);return e.options.find(ie)||le.find(ie)||T}function Un(T,le){const ie=T!==void 0?T:le;return typeof ie=="function"?ie:De=>De!==null&&typeof De=="object"&&ie in De?De[ie]:De}function Qt(T){const le=St.value(T);return qe.value.find(ie=>Hi(ie,le))!==void 0}function Ci(T){e.useInput===!0&&N.value!==null&&(T===void 0||N.value===T.target&&T.target.value===ft.value)&&N.value.select()}function Ti(T){Ka(T,27)===!0&&s.value===!0&&(ir(T),fr(),Br()),r("keyup",T)}function Mi(T){const{value:le}=T.target;if(T.keyCode!==void 0){Ti(T);return}if(T.target.value="",C!==null&&(clearTimeout(C),C=null),Br(),typeof le=="string"&&le.length!==0){const ie=le.toLocaleLowerCase(),De=tt=>{const kt=e.options.find(Bt=>tt.value(Bt).toLocaleLowerCase()===ie);return kt===void 0?!1:(Z.value.indexOf(kt)===-1?Pt(kt):fr(),!0)},st=tt=>{De(St)!==!0&&(De(K)===!0||tt===!0||Rr(le,!0,()=>st(!0)))};st()}else X.clearValue(T)}function nl(T){r("keypress",T)}function rl(T){if(r("keydown",T),Yh(T)===!0)return;const le=f.value.length!==0&&(e.newValueMode!==void 0||e.onNewValue!==void 0),ie=T.shiftKey!==!0&&e.multiple!==!0&&(d.value>-1||le===!0);if(T.keyCode===27){yi(T);return}if(T.keyCode===9&&ie===!1){Lr();return}if(T.target===void 0||T.target.id!==X.targetUid.value||X.editable.value!==!0)return;if(T.keyCode===40&&X.innerLoading.value!==!0&&s.value===!1){Rt(T),Nr();return}if(T.keyCode===8&&e.hideSelected!==!0&&f.value.length===0){e.multiple===!0&&Array.isArray(e.modelValue)===!0?Ze(e.modelValue.length-1):e.multiple!==!0&&e.modelValue!==null&&r("update:modelValue",null);return}(T.keyCode===35||T.keyCode===36)&&(typeof f.value!="string"||f.value.length===0)&&(Rt(T),d.value=-1,er(T.keyCode===36?1:-1,e.multiple)),(T.keyCode===33||T.keyCode===34)&&Pe.value!==void 0&&(Rt(T),d.value=Math.max(-1,Math.min(xe.value,d.value+(T.keyCode===33?-1:1)*Pe.value.view)),er(T.keyCode===33?1:-1,e.multiple)),(T.keyCode===38||T.keyCode===40)&&(Rt(T),er(T.keyCode===38?-1:1,e.multiple));const De=xe.value;if((Y===void 0||D0&&e.useInput!==!0&&T.key!==void 0&&T.key.length===1&&T.altKey===!1&&T.ctrlKey===!1&&T.metaKey===!1&&(T.keyCode!==32||Y.length!==0)){s.value!==!0&&Nr(T);const st=T.key.toLocaleLowerCase(),tt=Y.length===1&&Y[0]===st;D=Date.now()+1500,tt===!1&&(Rt(T),Y+=st);const kt=new RegExp("^"+Y.split("").map(Pi=>FS.indexOf(Pi)>-1?"\\"+Pi:Pi).join(".*"),"i");let Bt=d.value;if(tt===!0||Bt<0||kt.test(K.value(e.options[Bt]))!==!0)do Bt=yh(Bt+1,-1,De-1);while(Bt!==d.value&&(de.value(e.options[Bt])===!0||kt.test(K.value(e.options[Bt]))!==!0));d.value!==Bt&&Sn(()=>{cn(Bt),me(Bt),Bt>=0&&e.useInput===!0&&e.fillInput===!0&&Di(K.value(e.options[Bt]))});return}if(!(T.keyCode!==13&&(T.keyCode!==32||e.useInput===!0||Y!=="")&&(T.keyCode!==9||ie===!1))){if(T.keyCode!==9&&Rt(T),d.value>-1&&d.value{if(kt){if(_h(kt)!==!0)return}else kt=e.newValueMode;if(Or("",e.multiple!==!0,!0),tt==null)return;(kt==="toggle"?Pt:mt)(tt,kt==="add-unique"),e.multiple!==!0&&(N.value!==null&&N.value.focus(),fr())};if(e.onNewValue!==void 0?r("newValue",f.value,st):st(f.value),e.multiple!==!0)return}s.value===!0?Lr():X.innerLoading.value!==!0&&Nr()}}function il(){return _===!0?H.value:J.value!==null&&J.value.contentEl!==null?J.value.contentEl:void 0}function al(){return il()}function ll(){return e.hideSelected===!0?[]:t["selected-item"]!==void 0?Kt.value.map(T=>t["selected-item"](T)).slice():t.selected!==void 0?[].concat(t.selected()):e.useChips===!0?Kt.value.map((T,le)=>E(Qa,{key:"option-"+le,removable:X.editable.value===!0&&de.value(T.opt)!==!0,dense:!0,textColor:e.color,tabindex:un.value,onRemove(){T.removeAtIndex(le)}},()=>E("span",{class:"ellipsis",[T.html===!0?"innerHTML":"textContent"]:K.value(T.opt)}))):[E("span",{[nn.value===!0?"innerHTML":"textContent"]:ee.value})]}function ol(){if(Me.value===!0)return t["no-option"]!==void 0?t["no-option"]({inputValue:f.value}):void 0;const T=t.option!==void 0?t.option:ie=>E(Vt,{key:ie.index,...ie.itemProps},()=>E(Ie,()=>E(Ke,()=>E("span",{[ie.html===!0?"innerHTML":"textContent"]:ie.label}))));let le=j("div",Xn.value.map(T));return t["before-options"]!==void 0&&(le=t["before-options"]().concat(le)),Si(t["after-options"],le)}function Go(T,le){const ie=le===!0?{...rn.value,...X.splitAttrs.attributes.value}:void 0,De={ref:le===!0?N:void 0,key:"i_t",class:ze.value,style:e.inputStyle,value:f.value!==void 0?f.value:"",type:"search",...ie,id:le===!0?X.targetUid.value:void 0,maxlength:e.maxlength,autocomplete:e.autocomplete,"data-autofocus":T===!0||e.autofocus===!0||void 0,disabled:e.disable===!0,readonly:e.readonly===!0,...gt.value};return T!==!0&&_===!0&&(Array.isArray(De.class)===!0?De.class=[...De.class,"no-pointer-events"]:De.class+=" no-pointer-events"),E("input",De)}function sl(T){C!==null&&(clearTimeout(C),C=null),!(T&&T.target&&T.target.qComposing===!0)&&(Di(T.target.value||""),x=!0,L=f.value,X.focused.value!==!0&&(_!==!0||g.value===!0)&&X.focus(),e.onFilter!==void 0&&(C=setTimeout(()=>{C=null,Rr(f.value)},e.inputDebounce)))}function Di(T){f.value!==T&&(f.value=T,r("inputValue",T))}function Or(T,le,ie){x=ie!==!0,e.useInput===!0&&(Di(T),(le===!0||ie!==!0)&&(L=T),le!==!0&&Rr(T))}function Rr(T,le,ie){if(e.onFilter===void 0||le!==!0&&X.focused.value!==!0)return;X.innerLoading.value===!0?r("filterAbort"):(X.innerLoading.value=!0,v.value=!0),T!==""&&e.multiple!==!0&&Z.value.length!==0&&x!==!0&&T===K.value(Z.value[0])&&(T="");const De=setTimeout(()=>{s.value===!0&&(s.value=!1)},10);I!==null&&clearTimeout(I),I=De,r("filter",T,(st,tt)=>{(le===!0||X.focused.value===!0)&&I===De&&(clearTimeout(I),typeof st=="function"&&st(),v.value=!1,Sn(()=>{X.innerLoading.value=!1,X.editable.value===!0&&(le===!0?s.value===!0&&fr():s.value===!0?qi(!0):s.value=!0),typeof tt=="function"&&Sn(()=>{tt(a)}),typeof ie=="function"&&Sn(()=>{ie(a)})}))},()=>{X.focused.value===!0&&I===De&&(clearTimeout(I),X.innerLoading.value=!1,v.value=!1),s.value===!0&&(s.value=!1)})}function Qo(){return E(ag,{ref:J,class:we.value,style:e.popupContentStyle,modelValue:s.value,fit:e.menuShrink!==!0,cover:e.optionsCover===!0&&Me.value!==!0&&e.useInput!==!0,anchor:e.menuAnchor,self:e.menuSelf,offset:e.menuOffset,dark:fe.value,noParentEvent:!0,noRefocus:!0,noFocus:!0,square:Fn.value,transitionShow:e.transitionShow,transitionHide:e.transitionHide,transitionDuration:e.transitionDuration,separateClosePopup:!0,...qt.value,onScrollPassive:G,onBeforeShow:cl,onBeforeHide:jo,onShow:da},ol)}function jo(T){dl(T),Lr()}function da(){rt()}function Zo(T){ir(T),N.value!==null&&N.value.focus(),g.value=!0,window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,0)}function fa(T){ir(T),Sn(()=>{g.value=!1})}function Jo(){const T=[E(BS,{class:`col-auto ${X.fieldClass.value}`,...he.value,for:X.targetUid.value,dark:fe.value,square:!0,loading:v.value,itemAligned:!1,filled:!0,stackLabel:f.value.length!==0,...X.splitAttrs.listeners.value,onFocus:Zo,onBlur:fa},{...t,rawControl:()=>X.getControl(!0),before:void 0,after:void 0})];return s.value===!0&&T.push(E("div",{ref:H,class:we.value+" scroll",style:e.popupContentStyle,...qt.value,onClick:yi,onScrollPassive:G},ol())),E(go,{ref:V,modelValue:u.value,position:e.useInput===!0?"top":void 0,transitionShow:F,transitionHide:e.transitionHide,transitionDuration:e.transitionDuration,onBeforeShow:cl,onBeforeHide:Xo,onHide:es,onShow:ts},()=>E("div",{class:"q-select__dialog"+(fe.value===!0?" q-select__dialog--dark q-dark":"")+(g.value===!0?" q-select__dialog--focused":"")},T))}function Xo(T){dl(T),V.value!==null&&V.value.__updateRefocusTarget(X.rootRef.value.querySelector(".q-field__native > [tabindex]:last-child")),X.focused.value=!1}function es(T){fr(),X.focused.value===!1&&r("blur",T),Br()}function ts(){const T=document.activeElement;(T===null||T.id!==X.targetUid.value)&&N.value!==null&&N.value!==T&&N.value.focus(),rt()}function Lr(){u.value!==!0&&(d.value=-1,s.value===!0&&(s.value=!1),X.focused.value===!1&&(I!==null&&(clearTimeout(I),I=null),X.innerLoading.value===!0&&(r("filterAbort"),X.innerLoading.value=!1,v.value=!1)))}function Nr(T){X.editable.value===!0&&(_===!0?(X.onControlFocusin(T),u.value=!0,Sn(()=>{X.focus()})):X.focus(),e.onFilter!==void 0?Rr(f.value):(Me.value!==!0||t["no-option"]!==void 0)&&(s.value=!0))}function fr(){u.value=!1,Lr()}function Br(){e.useInput===!0&&Or(e.multiple!==!0&&e.fillInput===!0&&Z.value.length!==0&&K.value(Z.value[0])||"",!0,!0)}function qi(T){let le=-1;if(T===!0){if(Z.value.length!==0){const ie=St.value(Z.value[0]);le=e.options.findIndex(De=>Hi(St.value(De),ie))}Be(le)}cn(le)}function ns(T,le){s.value===!0&&X.innerLoading.value===!1&&(Be(-1,!0),Sn(()=>{s.value===!0&&X.innerLoading.value===!1&&(T>le?Be():qi(!0))}))}function ul(){u.value===!1&&J.value!==null&&J.value.updatePosition()}function cl(T){T!==void 0&&ir(T),r("popupShow",T),X.hasPopupOpen=!0,X.onControlFocusin(T)}function dl(T){T!==void 0&&ir(T),r("popupHide",T),X.hasPopupOpen=!1,X.onControlFocusout(T)}function fl(){_=l.platform.is.mobile!==!0&&e.behavior!=="dialog"?!1:e.behavior!=="menu"&&(e.useInput===!0?t["no-option"]!==void 0||e.onFilter!==void 0||Me.value===!1:!0),F=l.platform.is.ios===!0&&_===!0&&e.useInput===!0?"fade":e.transitionShow}return jb(fl),Zb(ul),fl(),Ht(()=>{C!==null&&clearTimeout(C)}),Object.assign(a,{showPopup:Nr,hidePopup:fr,removeAtIndex:Ze,add:mt,toggleOption:Pt,getOptionIndex:()=>d.value,setOptionIndex:cn,moveOptionSelection:er,filter:Rr,updateMenuPosition:ul,updateInputValue:Or,isOptionSelected:Qt,getEmittingOptionValue:it,isOptionDisabled:(...T)=>de.value.apply(null,T)===!0,getOptionValue:(...T)=>St.value.apply(null,T),getOptionLabel:(...T)=>K.value.apply(null,T)}),Object.assign(X,{innerValue:Z,fieldClass:$(()=>`q-select q-field--auto-height q-select--with${e.useInput!==!0?"out":""}-input q-select--with${e.useChips!==!0?"out":""}-chips q-select--${e.multiple===!0?"multiple":"single"}`),inputRef:A,targetRef:N,hasValue:Ge,showPopup:Nr,floatingLabel:$(()=>e.hideSelected!==!0&&Ge.value===!0||typeof f.value=="number"||f.value.length!==0||lh(e.displayValue)),getControlChild:()=>{if(X.editable.value!==!1&&(u.value===!0||Me.value!==!0||t["no-option"]!==void 0))return _===!0?Jo():Qo();X.hasPopupOpen===!0&&(X.hasPopupOpen=!1)},controlEvents:{onFocusin(T){X.onControlFocusin(T)},onFocusout(T){X.onControlFocusout(T,()=>{Br(),Lr()})},onClick(T){if(yi(T),_!==!0&&s.value===!0){Lr(),N.value!==null&&N.value.focus();return}Nr(T)}},getControl:T=>{const le=ll(),ie=T===!0||u.value!==!0||_!==!0;if(e.useInput===!0)le.push(Go(T,ie));else if(X.editable.value===!0){const st=ie===!0?rn.value:void 0;le.push(E("input",{ref:ie===!0?N:void 0,key:"d_t",class:"q-select__focus-target",id:ie===!0?X.targetUid.value:void 0,value:ee.value,readonly:!0,"data-autofocus":T===!0||e.autofocus===!0||void 0,...st,onKeydown:rl,onKeyup:Ti,onKeypress:nl})),ie===!0&&typeof e.autocomplete=="string"&&e.autocomplete.length!==0&&le.push(E("input",{class:"q-select__autocomplete-input",autocomplete:e.autocomplete,tabindex:-1,onKeyup:Mi}))}if(pe.value!==void 0&&e.disable!==!0&&qe.value.length!==0){const st=qe.value.map(tt=>E("option",{value:tt,selected:!0}));le.push(E("select",{class:"hidden",name:pe.value,multiple:e.multiple},st))}const De=e.useInput===!0||ie!==!0?void 0:X.splitAttrs.attributes.value;return E("div",{class:"q-field__native row items-center",...De,...X.splitAttrs.listeners.value},le)},getInnerAppend:()=>e.loading!==!0&&v.value!==!0&&e.hideDropdownIcon!==!0?[E(Yt,{class:"q-select__dropdown-icon"+(s.value===!0?" rotate-180":""),name:Gt.value})]:null}),Kh(X)}});const hc={left:!0,right:!0,up:!0,down:!0,horizontal:!0,vertical:!0},zS=Object.keys(hc);hc.all=!0;function So(e){const t={};for(const r of zS)e[r]===!0&&(t[r]=!0);return Object.keys(t).length===0?hc:(t.horizontal===!0?t.left=t.right=!0:t.left===!0&&t.right===!0&&(t.horizontal=!0),t.vertical===!0?t.up=t.down=!0:t.up===!0&&t.down===!0&&(t.vertical=!0),t.horizontal===!0&&t.vertical===!0&&(t.all=!0),t)}const VS=["INPUT","TEXTAREA"];function ko(e,t){return t.event===void 0&&e.target!==void 0&&e.target.draggable!==!0&&typeof t.handler=="function"&&VS.includes(e.target.nodeName.toUpperCase())===!1&&(e.qClonedBy===void 0||e.qClonedBy.indexOf(t.uid)===-1)}function YS(e){const t=[.06,6,50];return typeof e=="string"&&e.length&&e.split(":").forEach((r,a)=>{const l=parseFloat(r);l&&(t[a]=l)}),t}var WS=rc({name:"touch-swipe",beforeMount(e,{value:t,arg:r,modifiers:a}){if(a.mouse!==!0&&Kn.has.touch!==!0)return;const l=a.mouseCapture===!0?"Capture":"",s={handler:t,sensitivity:YS(r),direction:So(a),noop:Xu,mouseStart(u){ko(u,s)&&Qh(u)&&(Ln(s,"temp",[[document,"mousemove","move",`notPassive${l}`],[document,"mouseup","end","notPassiveCapture"]]),s.start(u,!0))},touchStart(u){if(ko(u,s)){const d=u.target;Ln(s,"temp",[[d,"touchmove","move","notPassiveCapture"],[d,"touchcancel","end","notPassiveCapture"],[d,"touchend","end","notPassiveCapture"]]),s.start(u)}},start(u,d){Kn.is.firefox===!0&&ji(e,!0);const f=na(u);s.event={x:f.left,y:f.top,time:Date.now(),mouse:d===!0,dir:!1}},move(u){if(s.event===void 0)return;if(s.event.dir!==!1){Rt(u);return}const d=Date.now()-s.event.time;if(d===0)return;const f=na(u),g=f.left-s.event.x,v=Math.abs(g),C=f.top-s.event.y,M=Math.abs(C);if(s.event.mouse!==!0){if(vs.sensitivity[0]&&(s.event.dir=C<0?"up":"down"),s.direction.horizontal===!0&&v>M&&M<100&&_>s.sensitivity[0]&&(s.event.dir=g<0?"left":"right"),s.direction.up===!0&&vs.sensitivity[0]&&(s.event.dir="up"),s.direction.down===!0&&v0&&v<100&&x>s.sensitivity[0]&&(s.event.dir="down"),s.direction.left===!0&&v>M&&g<0&&M<100&&_>s.sensitivity[0]&&(s.event.dir="left"),s.direction.right===!0&&v>M&&g>0&&M<100&&_>s.sensitivity[0]&&(s.event.dir="right"),s.event.dir!==!1?(Rt(u),s.event.mouse===!0&&(document.body.classList.add("no-pointer-events--children"),document.body.classList.add("non-selectable"),Ua(),s.styleCleanup=I=>{s.styleCleanup=void 0,document.body.classList.remove("non-selectable");const L=()=>{document.body.classList.remove("no-pointer-events--children")};I===!0?setTimeout(L,50):L()}),s.handler({evt:u,touch:s.event.mouse!==!0,mouse:s.event.mouse,direction:s.event.dir,duration:d,distance:{x:v,y:M}})):s.end(u)},end(u){s.event!==void 0&&(Pr(s,"temp"),Kn.is.firefox===!0&&ji(e,!1),s.styleCleanup!==void 0&&s.styleCleanup(!0),u!==void 0&&s.event.dir!==!1&&Rt(u),s.event=void 0)}};if(e.__qtouchswipe=s,a.mouse===!0){const u=a.mouseCapture===!0||a.mousecapture===!0?"Capture":"";Ln(s,"main",[[e,"mousedown","mouseStart",`passive${u}`]])}Kn.has.touch===!0&&Ln(s,"main",[[e,"touchstart","touchStart",`passive${a.capture===!0?"Capture":""}`],[e,"touchmove","noop","notPassiveCapture"]])},updated(e,t){const r=e.__qtouchswipe;r!==void 0&&(t.oldValue!==t.value&&(typeof t.value!="function"&&r.end(),r.handler=t.value),r.direction=So(t.modifiers))},beforeUnmount(e){const t=e.__qtouchswipe;t!==void 0&&(Pr(t,"main"),Pr(t,"temp"),Kn.is.firefox===!0&&ji(e,!1),t.styleCleanup!==void 0&&t.styleCleanup(),delete e.__qtouchswipe)}});function HS(){const e=new Map;return{getCache:function(t,r){return e[t]===void 0?e[t]=r:e[t]},getCacheWithFn:function(t,r){return e[t]===void 0?e[t]=r():e[t]}}}const kg={name:{required:!0},disable:Boolean},bh={setup(e,{slots:t}){return()=>E("div",{class:"q-panel scroll",role:"tabpanel"},Mt(t.default))}},Cg={modelValue:{required:!0},animated:Boolean,infinite:Boolean,swipeable:Boolean,vertical:Boolean,transitionPrev:String,transitionNext:String,transitionDuration:{type:[String,Number],default:300},keepAlive:Boolean,keepAliveInclude:[String,Array,RegExp],keepAliveExclude:[String,Array,RegExp],keepAliveMax:Number},Tg=["update:modelValue","beforeTransition","transition"];function Mg(){const{props:e,emit:t,proxy:r}=Dt(),{getCacheWithFn:a}=HS();let l,s;const u=se(null),d=se(null);function f(te){const Pe=e.vertical===!0?"up":"left";V((r.$q.lang.rtl===!0?-1:1)*(te.direction===Pe?1:-1))}const g=$(()=>[[WS,f,void 0,{horizontal:e.vertical!==!0,vertical:e.vertical,mouse:!0}]]),v=$(()=>e.transitionPrev||`slide-${e.vertical===!0?"down":"right"}`),C=$(()=>e.transitionNext||`slide-${e.vertical===!0?"up":"left"}`),M=$(()=>`--q-transition-duration: ${e.transitionDuration}ms`),_=$(()=>typeof e.modelValue=="string"||typeof e.modelValue=="number"?e.modelValue:String(e.modelValue)),x=$(()=>({include:e.keepAliveInclude,exclude:e.keepAliveExclude,max:e.keepAliveMax})),I=$(()=>e.keepAliveInclude!==void 0||e.keepAliveExclude!==void 0);Ve(()=>e.modelValue,(te,Pe)=>{const Be=D(te)===!0?A(te):-1;s!==!0&&J(Be===-1?0:Be{t("transition",te,Pe)}))});function L(){V(1)}function F(){V(-1)}function Y(te){t("update:modelValue",te)}function D(te){return te!=null&&te!==""}function A(te){return l.findIndex(Pe=>Pe.props.name===te&&Pe.props.disable!==""&&Pe.props.disable!==!0)}function N(){return l.filter(te=>te.props.disable!==""&&te.props.disable!==!0)}function J(te){const Pe=te!==0&&e.animated===!0&&u.value!==-1?"q-transition--"+(te===-1?v.value:C.value):null;d.value!==Pe&&(d.value=Pe)}function V(te,Pe=u.value){let Be=Pe+te;for(;Be>-1&&Be{s=!1});return}Be+=te}e.infinite===!0&&l.length!==0&&Pe!==-1&&Pe!==l.length&&V(te,te===-1?l.length:-1)}function H(){const te=A(e.modelValue);return u.value!==te&&(u.value=te),!0}function pe(){const te=D(e.modelValue)===!0&&H()&&l[u.value];return e.keepAlive===!0?[E(Xb,x.value,[E(I.value===!0?a(_.value,()=>({...bh,name:_.value})):bh,{key:_.value,style:M.value},()=>te)])]:[E("div",{class:"q-panel scroll",style:M.value,key:_.value,role:"tabpanel"},[te])]}function _e(){if(l.length!==0)return e.animated===!0?[E(Ga,{name:d.value},pe)]:pe()}function xe(te){return l=nc(Mt(te.default,[])).filter(Pe=>Pe.props!==null&&Pe.props.slot===void 0&&D(Pe.props.name)===!0),l.length}function lt(){return l}return Object.assign(r,{next:L,previous:F,goTo:Y}),{panelIndex:u,panelDirectives:g,updatePanelsList:xe,updatePanelIndex:H,getPanelContent:_e,getEnabledPanels:N,getPanels:lt,isValidPanelName:D,keepAliveProps:x,needsUniqueKeepAliveWrapper:I,goToPanelByOffset:V,goToPanel:Y,nextPanel:L,previousPanel:F}}var ku=Je({name:"QTabPanel",props:kg,setup(e,{slots:t}){return()=>E("div",{class:"q-tab-panel",role:"tabpanel"},Mt(t.default))}}),KS=Je({name:"QTabPanels",props:{...Cg,...or},emits:Tg,setup(e,{slots:t}){const r=Dt(),a=sr(e,r.proxy.$q),{updatePanelsList:l,getPanelContent:s,panelDirectives:u}=Mg(),d=$(()=>"q-tab-panels q-panel-parent"+(a.value===!0?" q-tab-panels--dark q-dark":""));return()=>(l(t),Zu("div",{class:d.value},s(),"pan",e.swipeable,()=>u.value))}});const wh=e=>{e=1831565813+(e|=0)|0;let t=Math.imul(e^e>>>15,1|e);return t=t+Math.imul(t^t>>>7,61|t)^t,((t^t>>>14)>>>0)/4294967296};class GS{constructor(t){this.dictionaries=void 0,this.length=void 0,this.separator=void 0,this.style=void 0,this.seed=void 0;const{length:r,separator:a,dictionaries:l,style:s,seed:u}=t;this.dictionaries=l,this.separator=a,this.length=r,this.style=s,this.seed=u}generate(){if(!this.dictionaries)throw new Error('Cannot find any dictionary. Please provide at least one, or leave the "dictionary" field empty in the config object');if(this.length<=0)throw new Error("Invalid length provided");if(this.length>this.dictionaries.length)throw new Error(`The length cannot be bigger than the number of dictionaries. +Length provided: ${this.length}. Number of dictionaries provided: ${this.dictionaries.length}`);let t=this.seed;return this.dictionaries.slice(0,this.length).reduce((r,a)=>{let l;t?(l=(u=>{if(typeof u=="string"){const d=u.split("").map(g=>g.charCodeAt(0)).reduce((g,v)=>g+v,1),f=Math.floor(Number(d));return wh(f)}return wh(u)})(t),t=4294967296*l):l=Math.random();let s=a[Math.floor(l*a.length)]||"";if(this.style==="lowerCase")s=s.toLowerCase();else if(this.style==="capital"){const[u,...d]=s.split("");s=u.toUpperCase()+d.join("")}else this.style==="upperCase"&&(s=s.toUpperCase());return r?`${r}${this.separator}${s}`:`${s}`},"")}}const Sh={separator:"_",dictionaries:[]},Dg=e=>{const t=[...e&&e.dictionaries||Sh.dictionaries],r={...Sh,...e,length:e&&e.length||t.length,dictionaries:t};if(!e||!e.dictionaries||!e.dictionaries.length)throw new Error('A "dictionaries" array must be provided. This is a breaking change introduced starting from Unique Name Generator v4. Read more about the breaking change here: https://github.com/andreasonny83/unique-names-generator#migration-guide');return new GS(r).generate()};var qg=["able","above","absent","absolute","abstract","abundant","academic","acceptable","accepted","accessible","accurate","accused","active","actual","acute","added","additional","adequate","adjacent","administrative","adorable","advanced","adverse","advisory","aesthetic","afraid","aggregate","aggressive","agreeable","agreed","agricultural","alert","alive","alleged","allied","alone","alright","alternative","amateur","amazing","ambitious","amused","ancient","angry","annoyed","annual","anonymous","anxious","appalling","apparent","applicable","appropriate","arbitrary","architectural","armed","arrogant","artificial","artistic","ashamed","asleep","assistant","associated","atomic","attractive","automatic","autonomous","available","average","awake","aware","awful","awkward","back","bad","balanced","bare","basic","beautiful","beneficial","better","bewildered","big","binding","biological","bitter","bizarre","blank","blind","blonde","bloody","blushing","boiling","bold","bored","boring","bottom","brainy","brave","breakable","breezy","brief","bright","brilliant","broad","broken","bumpy","burning","busy","calm","capable","capitalist","careful","casual","causal","cautious","central","certain","changing","characteristic","charming","cheap","cheerful","chemical","chief","chilly","chosen","christian","chronic","chubby","circular","civic","civil","civilian","classic","classical","clean","clear","clever","clinical","close","closed","cloudy","clumsy","coastal","cognitive","coherent","cold","collective","colonial","colorful","colossal","coloured","colourful","combative","combined","comfortable","coming","commercial","common","communist","compact","comparable","comparative","compatible","competent","competitive","complete","complex","complicated","comprehensive","compulsory","conceptual","concerned","concrete","condemned","confident","confidential","confused","conscious","conservation","conservative","considerable","consistent","constant","constitutional","contemporary","content","continental","continued","continuing","continuous","controlled","controversial","convenient","conventional","convinced","convincing","cooing","cool","cooperative","corporate","correct","corresponding","costly","courageous","crazy","creative","creepy","criminal","critical","crooked","crowded","crucial","crude","cruel","cuddly","cultural","curious","curly","current","curved","cute","daily","damaged","damp","dangerous","dark","dead","deaf","deafening","dear","decent","decisive","deep","defeated","defensive","defiant","definite","deliberate","delicate","delicious","delighted","delightful","democratic","dependent","depressed","desirable","desperate","detailed","determined","developed","developing","devoted","different","difficult","digital","diplomatic","direct","dirty","disabled","disappointed","disastrous","disciplinary","disgusted","distant","distinct","distinctive","distinguished","disturbed","disturbing","diverse","divine","dizzy","domestic","dominant","double","doubtful","drab","dramatic","dreadful","driving","drunk","dry","dual","due","dull","dusty","dutch","dying","dynamic","eager","early","eastern","easy","economic","educational","eerie","effective","efficient","elaborate","elated","elderly","eldest","electoral","electric","electrical","electronic","elegant","eligible","embarrassed","embarrassing","emotional","empirical","empty","enchanting","encouraging","endless","energetic","enormous","enthusiastic","entire","entitled","envious","environmental","equal","equivalent","essential","established","estimated","ethical","ethnic","eventual","everyday","evident","evil","evolutionary","exact","excellent","exceptional","excess","excessive","excited","exciting","exclusive","existing","exotic","expected","expensive","experienced","experimental","explicit","extended","extensive","external","extra","extraordinary","extreme","exuberant","faint","fair","faithful","familiar","famous","fancy","fantastic","far","fascinating","fashionable","fast","fat","fatal","favourable","favourite","federal","fellow","female","feminist","few","fierce","filthy","final","financial","fine","firm","fiscal","fit","fixed","flaky","flat","flexible","fluffy","fluttering","flying","following","fond","foolish","foreign","formal","formidable","forthcoming","fortunate","forward","fragile","frail","frantic","free","frequent","fresh","friendly","frightened","front","frozen","full","fun","functional","fundamental","funny","furious","future","fuzzy","gastric","gay","general","generous","genetic","gentle","genuine","geographical","giant","gigantic","given","glad","glamorous","gleaming","global","glorious","golden","good","gorgeous","gothic","governing","graceful","gradual","grand","grateful","greasy","great","grieving","grim","gross","grotesque","growing","grubby","grumpy","guilty","handicapped","handsome","happy","hard","harsh","head","healthy","heavy","helpful","helpless","hidden","high","hilarious","hissing","historic","historical","hollow","holy","homeless","homely","hon","honest","horizontal","horrible","hostile","hot","huge","human","hungry","hurt","hushed","husky","icy","ideal","identical","ideological","ill","illegal","imaginative","immediate","immense","imperial","implicit","important","impossible","impressed","impressive","improved","inadequate","inappropriate","inc","inclined","increased","increasing","incredible","independent","indirect","individual","industrial","inevitable","influential","informal","inherent","initial","injured","inland","inner","innocent","innovative","inquisitive","instant","institutional","insufficient","intact","integral","integrated","intellectual","intelligent","intense","intensive","interested","interesting","interim","interior","intermediate","internal","international","intimate","invisible","involved","irrelevant","isolated","itchy","jealous","jittery","joint","jolly","joyous","judicial","juicy","junior","just","keen","key","kind","known","labour","large","late","latin","lazy","leading","left","legal","legislative","legitimate","lengthy","lesser","level","lexical","liable","liberal","light","like","likely","limited","linear","linguistic","liquid","literary","little","live","lively","living","local","logical","lonely","long","loose","lost","loud","lovely","low","loyal","ltd","lucky","mad","magic","magnetic","magnificent","main","major","male","mammoth","managerial","managing","manual","many","marginal","marine","marked","married","marvellous","marxist","mass","massive","mathematical","mature","maximum","mean","meaningful","mechanical","medical","medieval","melodic","melted","mental","mere","metropolitan","mid","middle","mighty","mild","military","miniature","minimal","minimum","ministerial","minor","miserable","misleading","missing","misty","mixed","moaning","mobile","moderate","modern","modest","molecular","monetary","monthly","moral","motionless","muddy","multiple","mushy","musical","mute","mutual","mysterious","naked","narrow","nasty","national","native","natural","naughty","naval","near","nearby","neat","necessary","negative","neighbouring","nervous","net","neutral","new","nice","noble","noisy","normal","northern","nosy","notable","novel","nuclear","numerous","nursing","nutritious","nutty","obedient","objective","obliged","obnoxious","obvious","occasional","occupational","odd","official","ok","okay","old","olympic","only","open","operational","opposite","optimistic","oral","ordinary","organic","organisational","original","orthodox","other","outdoor","outer","outrageous","outside","outstanding","overall","overseas","overwhelming","painful","pale","panicky","parallel","parental","parliamentary","partial","particular","passing","passive","past","patient","payable","peaceful","peculiar","perfect","permanent","persistent","personal","petite","philosophical","physical","plain","planned","plastic","pleasant","pleased","poised","polite","political","poor","popular","positive","possible","potential","powerful","practical","precious","precise","preferred","pregnant","preliminary","premier","prepared","present","presidential","pretty","previous","prickly","primary","prime","primitive","principal","printed","prior","private","probable","productive","professional","profitable","profound","progressive","prominent","promising","proper","proposed","prospective","protective","protestant","proud","provincial","psychiatric","psychological","public","puny","pure","purring","puzzled","quaint","qualified","quarrelsome","querulous","quick","quickest","quiet","quintessential","quixotic","racial","radical","rainy","random","rapid","rare","raspy","rational","ratty","raw","ready","real","realistic","rear","reasonable","recent","reduced","redundant","regional","registered","regular","regulatory","related","relative","relaxed","relevant","reliable","relieved","religious","reluctant","remaining","remarkable","remote","renewed","representative","repulsive","required","resident","residential","resonant","respectable","respective","responsible","resulting","retail","retired","revolutionary","rich","ridiculous","right","rigid","ripe","rising","rival","roasted","robust","rolling","romantic","rotten","rough","round","royal","rubber","rude","ruling","running","rural","sacred","sad","safe","salty","satisfactory","satisfied","scared","scary","scattered","scientific","scornful","scrawny","screeching","secondary","secret","secure","select","selected","selective","selfish","semantic","senior","sensible","sensitive","separate","serious","severe","sexual","shaggy","shaky","shallow","shared","sharp","sheer","shiny","shivering","shocked","short","shrill","shy","sick","significant","silent","silky","silly","similar","simple","single","skilled","skinny","sleepy","slight","slim","slimy","slippery","slow","small","smart","smiling","smoggy","smooth","social","socialist","soft","solar","sole","solid","sophisticated","sore","sorry","sound","sour","southern","soviet","spare","sparkling","spatial","special","specific","specified","spectacular","spicy","spiritual","splendid","spontaneous","sporting","spotless","spotty","square","squealing","stable","stale","standard","static","statistical","statutory","steady","steep","sticky","stiff","still","stingy","stormy","straight","straightforward","strange","strategic","strict","striking","striped","strong","structural","stuck","stupid","subjective","subsequent","substantial","subtle","successful","successive","sudden","sufficient","suitable","sunny","super","superb","superior","supporting","supposed","supreme","sure","surprised","surprising","surrounding","surviving","suspicious","sweet","swift","symbolic","sympathetic","systematic","tall","tame","tart","tasteless","tasty","technical","technological","teenage","temporary","tender","tense","terrible","territorial","testy","then","theoretical","thick","thin","thirsty","thorough","thoughtful","thoughtless","thundering","tight","tiny","tired","top","tory","total","tough","toxic","traditional","tragic","tremendous","tricky","tropical","troubled","typical","ugliest","ugly","ultimate","unable","unacceptable","unaware","uncertain","unchanged","uncomfortable","unconscious","underground","underlying","unemployed","uneven","unexpected","unfair","unfortunate","unhappy","uniform","uninterested","unique","united","universal","unknown","unlikely","unnecessary","unpleasant","unsightly","unusual","unwilling","upper","upset","uptight","urban","urgent","used","useful","useless","usual","vague","valid","valuable","variable","varied","various","varying","vast","verbal","vertical","very","vicarious","vicious","victorious","violent","visible","visiting","visual","vital","vitreous","vivacious","vivid","vocal","vocational","voiceless","voluminous","voluntary","vulnerable","wandering","warm","wasteful","watery","weak","wealthy","weary","wee","weekly","weird","welcome","well","western","wet","whispering","whole","wicked","wide","widespread","wild","wilful","willing","willowy","wily","wise","wispy","wittering","witty","wonderful","wooden","working","worldwide","worried","worrying","worthwhile","worthy","written","wrong","xenacious","xenial","xenogeneic","xenophobic","xeric","xerothermic","yabbering","yammering","yappiest","yappy","yawning","yearling","yearning","yeasty","yelling","yelping","yielding","yodelling","young","youngest","youthful","ytterbic","yucky","yummy","zany","zealous","zeroth","zestful","zesty","zippy","zonal","zoophagous","zygomorphic","zygotic"],Pg=["aardvark","aardwolf","albatross","alligator","alpaca","amphibian","anaconda","angelfish","anglerfish","ant","anteater","antelope","antlion","ape","aphid","armadillo","asp","baboon","badger","bandicoot","barnacle","barracuda","basilisk","bass","bat","bear","beaver","bedbug","bee","beetle","bird","bison","blackbird","boa","boar","bobcat","bobolink","bonobo","booby","bovid","bug","butterfly","buzzard","camel","canid","canidae","capybara","cardinal","caribou","carp","cat","caterpillar","catfish","catshark","cattle","centipede","cephalopod","chameleon","cheetah","chickadee","chicken","chimpanzee","chinchilla","chipmunk","cicada","clam","clownfish","cobra","cockroach","cod","condor","constrictor","coral","cougar","cow","coyote","crab","crane","crawdad","crayfish","cricket","crocodile","crow","cuckoo","damselfly","deer","dingo","dinosaur","dog","dolphin","donkey","dormouse","dove","dragon","dragonfly","duck","eagle","earthworm","earwig","echidna","eel","egret","elephant","elk","emu","ermine","falcon","felidae","ferret","finch","firefly","fish","flamingo","flea","fly","flyingfish","fowl","fox","frog","galliform","gamefowl","gayal","gazelle","gecko","gerbil","gibbon","giraffe","goat","goldfish","goose","gopher","gorilla","grasshopper","grouse","guan","guanaco","guineafowl","gull","guppy","haddock","halibut","hamster","hare","harrier","hawk","hedgehog","heron","herring","hippopotamus","hookworm","hornet","horse","hoverfly","hummingbird","hyena","iguana","impala","jackal","jaguar","jay","jellyfish","junglefowl","kangaroo","kingfisher","kite","kiwi","koala","koi","krill","ladybug","lamprey","landfowl","lark","leech","lemming","lemur","leopard","leopon","limpet","lion","lizard","llama","lobster","locust","loon","louse","lungfish","lynx","macaw","mackerel","magpie","mammal","manatee","mandrill","marlin","marmoset","marmot","marsupial","marten","mastodon","meadowlark","meerkat","mink","minnow","mite","mockingbird","mole","mollusk","mongoose","monkey","moose","mosquito","moth","mouse","mule","muskox","narwhal","newt","nightingale","ocelot","octopus","opossum","orangutan","orca","ostrich","otter","owl","ox","panda","panther","parakeet","parrot","parrotfish","partridge","peacock","peafowl","pelican","penguin","perch","pheasant","pig","pigeon","pike","pinniped","piranha","planarian","platypus","pony","porcupine","porpoise","possum","prawn","primate","ptarmigan","puffin","puma","python","quail","quelea","quokka","rabbit","raccoon","rat","rattlesnake","raven","reindeer","reptile","rhinoceros","roadrunner","rodent","rook","rooster","roundworm","sailfish","salamander","salmon","sawfish","scallop","scorpion","seahorse","shark","sheep","shrew","shrimp","silkworm","silverfish","skink","skunk","sloth","slug","smelt","snail","snake","snipe","sole","sparrow","spider","spoonbill","squid","squirrel","starfish","stingray","stoat","stork","sturgeon","swallow","swan","swift","swordfish","swordtail","tahr","takin","tapir","tarantula","tarsier","termite","tern","thrush","tick","tiger","tiglon","toad","tortoise","toucan","trout","tuna","turkey","turtle","tyrannosaurus","unicorn","urial","vicuna","viper","vole","vulture","wallaby","walrus","warbler","wasp","weasel","whale","whippet","whitefish","wildcat","wildebeest","wildfowl","wolf","wolverine","wombat","woodpecker","worm","wren","xerinae","yak","zebra"],xg=["amaranth","amber","amethyst","apricot","aqua","aquamarine","azure","beige","black","blue","blush","bronze","brown","chocolate","coffee","copper","coral","crimson","cyan","emerald","fuchsia","gold","gray","green","harlequin","indigo","ivory","jade","lavender","lime","magenta","maroon","moccasin","olive","orange","peach","pink","plum","purple","red","rose","salmon","sapphire","scarlet","silver","tan","teal","tomato","turquoise","violet","white","yellow"];function Oa(e,t,r){return parseInt(e.substr(t,r),16)}function Ag(e){return e|=0,e<0?"00":e<16?"0"+e.toString(16):e<256?e.toString(16):"ff"}function Cu(e,t,r){return r=r<0?r+6:r>6?r-6:r,Ag(255*(r<1?e+(t-e)*r:r<3?t:r<4?e+(t-e)*(4-r):e))}function QS(e){if(/^#[0-9a-f]{3,8}$/i.test(e)){let t;const r=e.length;if(r<6){const a=e[1],l=e[2],s=e[3],u=e[4]||"";t="#"+a+a+l+l+s+s+u+u}return(r==7||r>8)&&(t=e),t}}function jS(e,t,r){let a;if(t==0){const l=Ag(r*255);a=l+l+l}else{const l=r<=.5?r*(t+1):r+t-r*t,s=r*2-l;a=Cu(s,l,e*6+2)+Cu(s,l,e*6)+Cu(s,l,e*6-2)}return"#"+a}function xa(e,t,r){const a=[.55,.5,.5,.46,.6,.55,.55],l=a[e*6+.5|0];return r=r<.5?r*l*2:l+(r-.5)*(1-l)*2,jS(e,t,r)}const ZS=typeof window!="undefined"?window:typeof self!="undefined"?self:typeof global!="undefined"?global:{},kh={V:"jdenticon_config",n:"config"};var JS={};function XS(e,t){const r=typeof e=="object"&&e||JS[kh.n]||ZS[kh.V]||{},a=r.lightness||{},l=r.saturation||{},s="color"in l?l.color:l,u=l.grayscale,d=r.backColor,f=r.padding;function g(C,M){let _=a[C];return _&&_.length>1||(_=M),function(x){return x=_[0]+x*(_[1]-_[0]),x<0?0:x>1?1:x}}function v(C){const M=r.hues;let _;return M&&M.length>0&&(_=M[0|.999*C*M.length]),typeof _=="number"?(_/360%1+1)%1:C}return{W:v,o:typeof s=="number"?s:.5,D:typeof u=="number"?u:0,p:g("color",[.4,.8]),F:g("grayscale",[.3,.9]),G:QS(d),X:typeof e=="number"?e:typeof f=="number"?f:t}}class ro{constructor(t,r){this.x=t,this.y=r}}class Eg{constructor(t,r,a,l){this.q=t,this.t=r,this.H=a,this.Y=l}I(t,r,a,l){const s=this.q+this.H,u=this.t+this.H,d=this.Y;return d===1?new ro(s-r-(l||0),this.t+t):d===2?new ro(s-t-(a||0),u-r-(l||0)):d===3?new ro(this.q+r,u-t-(a||0)):new ro(this.q+t,this.t+r)}}const ek=new Eg(0,0,0,0);class tk{constructor(t){this.J=t,this.u=ek}g(t,r){const a=r?-2:2,l=[];for(let s=r?t.length-2:0;s=0;s+=a)l.push(this.u.I(t[s],t[s+1]));this.J.g(l)}h(t,r,a,l){const s=this.u.I(t,r,a,a);this.J.h(s,a,l)}i(t,r,a,l,s){this.g([t,r,t+a,r,t+a,r+l,t,r+l],s)}j(t,r,a,l,s,u){const d=[t+a,r,t+a,r+l,t,r+l,t,r];d.splice((s||0)%4*2,2),this.g(d,u)}K(t,r,a,l,s){this.g([t+a/2,r,t+a,r+l/2,t+a/2,r+l,t,r+l/2],s)}}function nk(e,t,r,a){e=e%14;let l,s,u,d,f,g;e?e==1?(u=0|r*.5,d=0|r*.8,t.j(r-u,0,u,d,2)):e==2?(u=0|r/3,t.i(u,u,r-u,r-u)):e==3?(f=r*.1,g=r<6?1:r<8?2:0|r*.25,f=f>1?0|f:f>.5?1:f,t.i(g,g,r-f-g,r-f-g)):e==4?(s=0|r*.15,u=0|r*.5,t.h(r-u-s,r-u-s,u)):e==5?(f=r*.1,g=f*4,g>3&&(g=0|g),t.i(0,0,r,r),t.g([g,g,r-f,g,g+(r-g-f)/2,r-f],!0)):e==6?t.g([0,0,r,0,r,r*.7,r*.4,r*.4,r*.7,r,0,r]):e==7?t.j(r/2,r/2,r/2,r/2,3):e==8?(t.i(0,0,r,r/2),t.i(0,r/2,r/2,r/2),t.j(r/2,r/2,r/2,r/2,1)):e==9?(f=r*.14,g=r<4?1:r<6?2:0|r*.35,f=r<8?f:0|f,t.i(0,0,r,r),t.i(g,g,r-g-f,r-g-f,!0)):e==10?(f=r*.12,g=f*3,t.i(0,0,r,r),t.h(g,g,r-f-g,!0)):e==11?t.j(r/2,r/2,r/2,r/2,3):e==12?(s=r*.25,t.i(0,0,r,r),t.K(s,s,r-s,r-s,!0)):!a&&(s=r*.4,u=r*1.2,t.h(s,s,u)):(l=r*.42,t.g([0,0,r,0,r,r-l*2,r-l,r,0,r]))}function Ch(e,t,r){e=e%4;let a;e?e==1?t.j(0,r/2,r,r/2,0):e==2?t.K(0,0,r,r):(a=r/6,t.h(a,a,r-2*a)):t.j(0,0,r,r,0)}function rk(e,t){return e=t.W(e),[xa(e,t.D,t.F(0)),xa(e,t.o,t.p(.5)),xa(e,t.D,t.F(1)),xa(e,t.o,t.p(1)),xa(e,t.o,t.p(0))]}function ik(e,t,r){const a=XS(r,.08);a.G&&e.m(a.G);let l=e.k;const s=.5+l*a.X|0;l-=s*2;const u=new tk(e),d=0|l/4,f=0|s+l/2-d*2,g=0|s+l/2-d*2;function v(L,F,Y,D,A){const N=Oa(t,Y,1);let J=D?Oa(t,D,1):0;e.L(M[_[L]]);for(let V=0;V=0){for(let F=0;F=0)return!0}}for(let L=0;L<3;L++)x=Oa(t,8+L,1)%M.length,(I([0,4])||I([2,3]))&&(x=1),_.push(x);v(0,Ch,2,3,[[1,0],[2,0],[2,3],[1,3],[0,1],[3,1],[3,2],[0,2]]),v(1,Ch,4,5,[[0,0],[3,0],[3,3],[0,3]]),v(2,nk,1,null,[[1,1],[2,1],[2,2],[1,2]]),e.finish()}function ak(e){var a=0,l=0,s=encodeURI(e)+"%80",u=[],d,f=[],g=1732584193,v=4023233417,C=~g,M=~v,_=3285377520,x=[g,v,C,M,_],I=0,L="";function F(Y,D){return Y<>>32-D}for(;a>2]=u[l>>2]|(s[a]=="%"?parseInt(s.substring(a+1,a+=3),16):s.charCodeAt(a++))<<(3-(l&3))*8;for(d=((l+7>>6)+1)*16,u[d-1]=l*8-8;I>3]>>>(7-(a&7))*4&15).toString(16);return L}function lk(e){return/^[0-9a-f]{11,}$/i.test(e)&&e}function ok(e){return ak(e==null?"":""+e)}function Yi(e){return(e*10+.5|0)/10}class sk{constructor(){this.v=""}g(t){let r="";for(let a=0;a'}m(t,r){r&&(this.C+='')}O(t,r){this.C+=''}toString(){return this.C+""}}function fk(e,t,r){const a=new dk(t);return ik(new uk(a),lk(e)||ok(e),r),a.toString()}typeof document!="undefined"&&document.querySelectorAll.bind(document);const hk=sn({name:"UserProfile",props:["pubkey","profiles","description"],data:function(){return{}},methods:{merchantProfile(e){var t;return(t=this.profiles)==null?void 0:t.find(r=>r.pubkey===e)},pubkeyAlias(e){return Dg({dictionaries:[qg,Pg,xg],length:2,separator:" ",style:"capital",seed:e})},pubkeyAvatar(e){return fk(e,100)}},created:async function(){}}),gk=["src"],mk=["innerHTML"],vk={class:"text-caption text-grey ellipsis-2-lines"};function pk(e,t,r,a,l,s){return O(),re(Nt,null,[y(Ie,{avatar:""},{default:b(()=>[y(Xr,null,{default:b(()=>{var u;return[(u=e.merchantProfile(e.pubkey))!=null&&u.picture?(O(),re("img",{key:0,src:e.merchantProfile(e.pubkey).picture},null,8,gk)):(O(),re("div",{key:1,innerHTML:e.pubkeyAvatar(e.pubkey)},null,8,mk))]}),_:1})]),_:1}),y(Ie,{class:"q-mt-sm"},{default:b(()=>[y(Ke,null,{default:b(()=>{var u,d;return[S("strong",null,ge(((u=e.merchantProfile(e.pubkey))==null?void 0:u.name)||((d=e.merchantProfile(e.pubkey))==null?void 0:d.display_name)||e.pubkeyAlias(e.pubkey)),1)]}),_:1}),y(Ke,{class:"gt-sm"},{default:b(()=>[S("div",vk,[S("p",null,ge(e.description||e.pubkey),1)])]),_:1}),y(Qr,null,{default:b(()=>[Te(ge(e.pubkey),1)]),_:1})]),_:1})],64)}var Za=Tn(hk,[["render",pk]]);const yk=sn({name:"EssentialLink",props:["market","profiles","relays-data","read-notes"],components:{UserProfile:Za},data:function(){return{tab:"marketplace",merchantPubkey:null,relayUrl:null,marketData:{pubkey:null,relays:[],opts:{identifier:null,name:null,about:null,merchants:[],ui:{picture:null,banner:null,theme:null,darkMode:!1}}},themeOptions:["classic","bitcoin","flamingo","cyber","freedom","mint","autumn","monochrome","salvador"]}},methods:{addMerchant:async function(){if(!isValidKey(this.merchantPubkey,"npub")){$q.notify({message:"Invalid Public Key!",type:"warning"});return}const e=isValidKeyHex(this.merchantPubkey)?this.merchantPubkey:NostrTools.nip19.decode(this.merchantPubkey).data;this.marketData.opts.merchants.push(e),this.updateMarketData(),this.merchantPubkey=null},removeMerchant:async function(e){console.log("### removeMerchant",e),this.marketData.opts.merchants=this.marketData.opts.merchants.filter(t=>t!==e),this.updateMarketData()},addRelay:async function(){const e=(this.relayUrl||"").trim();if(!e.startsWith("wss://")&&!e.startsWith("ws://")){this.relayUrl=null,$q.notify({timeout:5e3,type:"warning",message:"Invalid relay URL.",caption:"Should start with 'wss://'' or 'ws://'"});return}try{new URL(e),this.marketData.relays.push(e),this.updateMarketData()}catch(t){$q.notify({timeout:5e3,type:"warning",message:"Invalid relay URL.",caption:`Error: ${t}`})}this.relayUrl=null},removeRelay:async function(e){this.marketData.relays=this.marketData.relays.filter(t=>t!==e),this.updateMarketData()},updateMarketData:function(){this.$emit("market-update",this.cloneMarketData())},publishNaddr(){this.$emit("publish-naddr",this.cloneMarketData())},deleteMarket(){this.$emit("delete-market",this.cloneMarketData())},applyLookAndFeel(){this.$emit("apply-ui",this.cloneMarketData())},markNoteAsRead(e){this.$emit("note-read",e)},cloneMarketData(){return JSON.parse(JSON.stringify(this.marketData))},relayData(e){return(this.relaysData||[]).find(t=>t.relayUrl===e)||{connected:!1,error:null}}},created:async function(){var e;this.marketData={...this.marketData,...JSON.parse(JSON.stringify(this.market||{}))},(e=this.readNotes)!=null&&e.merchants||(this.tab="merchants")}}),_k={class:"q-pt-md"},bk={class:"q-gutter-y-md"},wk={class:"q-pa-md"},Sk={class:"q-gutter-y-md"},kk=S("strong",null,"Note",-1),Ck=S("div",{class:"text-caption"},[S("ul",null,[S("li",null,[S("span",{class:"text-subtitle1"}," Here one can customize the look and feel of the Market. ")]),S("li",null,[S("span",{class:"text-subtitle1"},[Te(" When the Market Profile is shared (via "),S("code",null,"naddr"),Te(" ) these customisations will be available to the customers. ")])])])],-1),Tk=S("div",{class:"q-mb-md"},[S("strong",null,"Information")],-1),Mk=S("div",{class:"q-mb-md q-mt-lg"},[S("strong",null,"UI Configurations")],-1),Dk=S("div",{class:"lt-md q-mt-lg"},null,-1),qk=S("strong",null,"Note",-1),Pk=S("div",{class:"text-caption"},[S("ul",null,[S("li",null,[S("span",{class:"text-subtitle1"}," Here all the mercants of the marketplace are listed. ")]),S("li",null,[S("span",{class:"text-subtitle1"}," You can easily add a new merchant by entering its public key in the input below. ")]),S("li",null,[S("span",{class:"text-subtitle1"}," When a merchant is added all its products and stalls will be available in the Market page. ")])])],-1),xk={key:0,class:"text-caption text-grey ellipsis-2-lines"},Ak={class:"float-right"};function Ek(e,t,r,a,l,s){const u=ti("user-profile");return O(),oe(Jt,null,{default:b(()=>[y(Ne,null,{default:b(()=>[S("div",_k,[S("div",bk,[y(NS,{modelValue:e.tab,"onUpdate:modelValue":t[3]||(t[3]=d=>e.tab=d),"active-color":"primary",align:"justify"},{default:b(()=>[y(Su,{name:"marketplace",label:"Look And Feel",onUpdate:t[0]||(t[0]=d=>e.tab=d.name)}),y(Su,{name:"merchants",label:"Merchants",onUpdate:t[1]||(t[1]=d=>e.tab=d.name)}),y(Su,{name:"relays",label:"Relays",onUpdate:t[2]||(t[2]=d=>e.tab=d.name)})]),_:1},8,["modelValue"])])])]),_:1}),y(ut),y(Ne,null,{default:b(()=>[S("div",wk,[S("div",Sk,[y(KS,{modelValue:e.tab,"onUpdate:modelValue":t[14]||(t[14]=d=>e.tab=d)},{default:b(()=>[y(ku,{name:"marketplace"},{default:b(()=>{var d;return[(d=e.readNotes)!=null&&d.marketUi?$e("",!0):(O(),oe(Mr,{key:0,class:"q-mb-lg gt-sm",bordered:""},{default:b(()=>[y(Vt,null,{default:b(()=>[y(Ie,{avatar:""},{default:b(()=>[y(Xr,null,{default:b(()=>[y(Yt,{color:"primary",name:"info",size:"xl"})]),_:1})]),_:1}),y(Ie,{class:"q-mt-sm q-ml-lg"},{default:b(()=>[y(Ke,null,{default:b(()=>[kk]),_:1}),y(Ke,null,{default:b(()=>[Ck]),_:1})]),_:1}),y(Ie,{side:""},{default:b(()=>[y(ye,{onClick:t[4]||(t[4]=f=>e.markNoteAsRead("marketUi")),size:"lg",outline:"",color:"primary",label:"Got it!",icon:"check_small"})]),_:1})]),_:1})]),_:1})),Tk,y(It,{onChange:e.updateMarketData,outlined:"",modelValue:e.marketData.opts.name,"onUpdate:modelValue":t[5]||(t[5]=f=>e.marketData.opts.name=f),type:"text",label:"Market Name",hint:"Short name for the market",class:"q-mb-md"},null,8,["onChange","modelValue"]),y(It,{onChange:e.updateMarketData,outlined:"",modelValue:e.marketData.opts.about,"onUpdate:modelValue":t[6]||(t[6]=f=>e.marketData.opts.about=f),type:"textarea",rows:"3",label:"Marketplace Description",hint:"It will be displayed on top of the banner image. Can be a longer text.",class:"q-mb-lg"},null,8,["onChange","modelValue"]),Mk,y(It,{onChange:e.updateMarketData,outlined:"",modelValue:e.marketData.opts.ui.picture,"onUpdate:modelValue":t[7]||(t[7]=f=>e.marketData.opts.ui.picture=f),type:"text",label:"Logo",hint:"It will be displayed next to the search input. Can be png, jpg, ico, gif, svg.",class:"q-mb-md"},null,8,["onChange","modelValue"]),y(It,{onChange:e.updateMarketData,outlined:"",modelValue:e.marketData.opts.ui.banner,"onUpdate:modelValue":t[8]||(t[8]=f=>e.marketData.opts.ui.banner=f),type:"text",label:"Banner",hint:"It represents the visual identity of the market. Can be png, jpg, ico, gif, svg.",class:"q-mb-md"},null,8,["onChange","modelValue"]),y($a,{onInput:e.updateMarketData,"onUpdate:modelValue":[e.updateMarketData,t[9]||(t[9]=f=>e.marketData.opts.ui.theme=f)],filled:"",modelValue:e.marketData.opts.ui.theme,hint:"The colors of the market will vary based on the theme. It applies to all components (buttons, labels, inputs, etc)",options:e.themeOptions,label:"Marketplace Theme"},null,8,["onInput","onUpdate:modelValue","modelValue","options"]),Dk,y(lo,{onInput:e.updateMarketData,onClick:e.updateMarketData,modelValue:e.marketData.opts.ui.darkMode,"onUpdate:modelValue":t[10]||(t[10]=f=>e.marketData.opts.ui.darkMode=f),label:"Dark Mode",size:"sm",class:"q-mt-sm"},null,8,["onInput","onClick","modelValue"])]}),_:1}),y(ku,{name:"merchants"},{default:b(()=>{var d;return[(d=e.readNotes)!=null&&d.merchants?$e("",!0):(O(),oe(Mr,{key:0,class:"q-mb-lg gt-sm",bordered:""},{default:b(()=>[y(Vt,null,{default:b(()=>[y(Ie,{avatar:""},{default:b(()=>[y(Xr,null,{default:b(()=>[y(Yt,{color:"primary",name:"info",size:"xl"})]),_:1})]),_:1}),y(Ie,{class:"q-mt-sm q-ml-lg"},{default:b(()=>[y(Ke,null,{default:b(()=>[qk]),_:1}),y(Ke,null,{default:b(()=>[Pk]),_:1})]),_:1}),y(Ie,{side:""},{default:b(()=>[y(ye,{onClick:t[11]||(t[11]=f=>e.markNoteAsRead("merchants")),size:"lg",outline:"",color:"primary",label:"Got it!",icon:"check_small"})]),_:1})]),_:1})]),_:1})),S("div",null,[y(It,{outlined:"",modelValue:e.merchantPubkey,"onUpdate:modelValue":t[12]||(t[12]=f=>e.merchantPubkey=f),onKeydown:Au(e.addMerchant,["enter"]),type:"text",label:"Pubkey/Npub",hint:"Add merchants"},{default:b(()=>[y(ye,{onClick:e.addMerchant,dense:"",flat:"",icon:"add"},null,8,["onClick"])]),_:1},8,["modelValue","onKeydown"]),y(Mr,{class:"q-mt-md"},{default:b(()=>[(O(!0),re(Nt,null,Wt(e.marketData.opts.merchants,f=>(O(),oe(Vt,{key:f},{default:b(()=>[y(u,{pubkey:f,profiles:e.profiles},null,8,["pubkey","profiles"]),y(Ie,{side:""},{default:b(()=>[y(ye,{size:"12px",flat:"",dense:"",round:"",icon:"delete",onClick:g=>e.removeMerchant(f)},null,8,["onClick"])]),_:2},1024)]),_:2},1024))),128))]),_:1})])]}),_:1}),y(ku,{name:"relays"},{default:b(()=>[S("div",null,[S("div",null,[y(It,{outlined:"",modelValue:e.relayUrl,"onUpdate:modelValue":t[13]||(t[13]=d=>e.relayUrl=d),onKeydown:Au(e.addRelay,["enter"]),type:"text",label:"wss://",hint:"Add realays"},{default:b(()=>[y(ye,{onClick:e.addRelay,dense:"",flat:"",icon:"add"},null,8,["onClick"])]),_:1},8,["modelValue","onKeydown"]),y(Mr,{class:"q-mt-md"},{default:b(()=>[(O(!0),re(Nt,null,Wt(e.marketData.relays,d=>(O(),oe(Vt,{key:d},{default:b(()=>[y(Ie,{avatar:""},{default:b(()=>[y(Xr,null,{default:b(()=>[y(Yt,{name:"router",color:e.relayData(d).connected?"green":"pink"},null,8,["color"])]),_:2},1024)]),_:2},1024),y(Ie,{class:"q-mt-sm"},{default:b(()=>[y(Ke,null,{default:b(()=>[S("strong",null,ge(d),1),e.relayData(d).error?(O(),re("div",xk,[S("p",null,"Error: "+ge(e.relayData(d).error),1)])):$e("",!0)]),_:2},1024)]),_:2},1024),y(Ie,{side:""},{default:b(()=>[y(ye,{size:"12px",flat:"",dense:"",round:"",icon:"delete",onClick:f=>e.removeRelay(d)},null,8,["onClick"])]),_:2},1024)]),_:2},1024))),128))]),_:1})])])]),_:1})]),_:1},8,["modelValue"])])])]),_:1}),y(ut),y(Ne,{class:"q-pb-xl"},{default:b(()=>[S("div",Ak,[y(ye,{onClick:e.deleteMarket,flat:"",label:"Delete Market",icon:"delete",class:"q-ml-lg",color:"negative"},null,8,["onClick"]),y(ye,{onClick:e.applyLookAndFeel,flat:"",label:"Apply Look and Feel",icon:"palette",class:"q-ml-lg",color:"secondary"},null,8,["onClick"]),y(ye,{onClick:e.publishNaddr,flat:"",label:"Share Market Profile",icon:"share",class:"q-ml-lg",color:"primary"},null,8,["onClick"])])]),_:1}),y(Ne,{class:"lt-md"})]),_:1})}var Ig=Tn(yk,[["render",Ek]]);const Ik=sn({name:"UserConfig",props:["account"],data:function(){return{accountData:null}},watch:{account(){this.accountData=this.account&&JSON.parse(JSON.stringify(this.account))}},methods:{logout:async function(){this.$q.dialog(confirm("Please make sure you save your private key! You will not be able to recover it later!")).onOk(async()=>{this.$emit("logout")})},copyText(e){this.$emit("copy-text",e)},clearAllData(){this.$emit("clear-all-data")}},created:async function(){this.accountData=this.account&&JSON.parse(JSON.stringify(this.account))}}),$k={class:"row"},Ok={class:"col-10"},Rk={class:"col-2 auto-width"},Lk={class:"row"},Nk={class:"col-10"},Bk={class:"col-2 auto-width"},Fk=S("div",null,[S("strong",null,"No Account")],-1),Uk={class:"float-right"};function zk(e,t,r,a,l,s){return O(),oe(Jt,null,{default:b(()=>[e.accountData?(O(),oe(Ne,{key:0},{default:b(()=>[S("div",$k,[S("div",Ok,[y(It,{modelValue:e.accountData.npub,"onUpdate:modelValue":t[1]||(t[1]=u=>e.accountData.npub=u),readonly:"",disbled:"",outlined:"",hint:e.accountData.pubkey,type:"text",label:"Public Key",class:"q-mb-md"},{append:b(()=>[y(ye,{onClick:t[0]||(t[0]=u=>e.copyText(e.accountData.npub)),icon:"content_copy",label:"Npub",flat:"",color:"gray float-right q-mt-sm"})]),_:1},8,["modelValue","hint"])]),S("div",Rk,[y(ye,{onClick:t[2]||(t[2]=u=>e.copyText(e.accountData.pubkey)),icon:"content_copy",label:"Hex",flat:"",color:"gray float-right q-mt-sm"})])]),S("div",Lk,[S("div",Nk,[y(It,{modelValue:e.accountData.nsec,"onUpdate:modelValue":t[4]||(t[4]=u=>e.accountData.nsec=u),readonly:"",disbled:"",outlined:"",type:"password",label:"Private Key",class:"q-mb-md"},{append:b(()=>[y(ye,{onClick:t[3]||(t[3]=u=>e.copyText(e.accountData.nsec)),icon:"content_copy",label:"Nsec",flat:"",color:"gray float-right q-mt-sm"})]),_:1},8,["modelValue"])]),S("div",Bk,[y(ye,{onClick:t[5]||(t[5]=u=>e.copyText(e.accountData.privkey)),icon:"content_copy",label:"Hex",flat:"",color:"gray float-right q-mt-sm"})])])]),_:1})):(O(),oe(Ne,{key:1},{default:b(()=>[Fk]),_:1})),y(ut),y(Ne,null,{default:b(()=>[S("div",Uk,[y(ye,{onClick:e.clearAllData,flat:"",label:"Clear All Data",icon:"delete",class:"q-ml-lg",color:"negative"},null,8,["onClick"]),e.accountData?(O(),oe(ye,{key:0,onClick:e.logout,flat:"",label:"Logout",icon:"logout",class:"q-ml-lg",color:"primary"},null,8,["onClick"])):(O(),oe(ye,{key:1,onClick:t[6]||(t[6]=u=>e.$emit("login")),flat:"",label:"Login",icon:"login",class:"q-ml-lg",color:"primary"}))])]),_:1}),y(Ne)]),_:1})}var Vk=Tn(Ik,[["render",zk]]),Yk=Je({name:"QChatMessage",props:{sent:Boolean,label:String,bgColor:String,textColor:String,name:String,avatar:String,text:Array,stamp:String,size:String,labelHtml:Boolean,nameHtml:Boolean,textHtml:Boolean,stampHtml:Boolean},setup(e,{slots:t}){const r=$(()=>e.sent===!0?"sent":"received"),a=$(()=>`q-message-text-content q-message-text-content--${r.value}`+(e.textColor!==void 0?` text-${e.textColor}`:"")),l=$(()=>`q-message-text q-message-text--${r.value}`+(e.bgColor!==void 0?` text-${e.bgColor}`:"")),s=$(()=>"q-message-container row items-end no-wrap"+(e.sent===!0?" reverse":"")),u=$(()=>e.size!==void 0?`col-${e.size}`:""),d=$(()=>({msg:e.textHtml===!0?"innerHTML":"textContent",stamp:e.stampHtml===!0?"innerHTML":"textContent",name:e.nameHtml===!0?"innerHTML":"textContent",label:e.labelHtml===!0?"innerHTML":"textContent"}));function f(v){return t.stamp!==void 0?[v,E("div",{class:"q-message-stamp"},t.stamp())]:e.stamp?[v,E("div",{class:"q-message-stamp",[d.value.stamp]:e.stamp})]:[v]}function g(v,C){const M=C===!0?v.length>1?_=>_:_=>E("div",[_]):_=>E("div",{[d.value.msg]:_});return v.map((_,x)=>E("div",{key:x,class:l.value},[E("div",{class:a.value},f(M(_)))]))}return()=>{const v=[];t.avatar!==void 0?v.push(t.avatar()):e.avatar!==void 0&&v.push(E("img",{class:`q-message-avatar q-message-avatar--${r.value}`,src:e.avatar,"aria-hidden":"true"}));const C=[];t.name!==void 0?C.push(E("div",{class:`q-message-name q-message-name--${r.value}`},t.name())):e.name!==void 0&&C.push(E("div",{class:`q-message-name q-message-name--${r.value}`,[d.value.name]:e.name})),t.default!==void 0?C.push(g(nc(t.default()),!0)):e.text!==void 0&&C.push(g(e.text)),v.push(E("div",{class:u.value},C));const M=[];return t.label!==void 0?M.push(E("div",{class:"q-message-label"},t.label())):e.label!==void 0&&M.push(E("div",{class:"q-message-label",[d.value.label]:e.label})),M.push(E("div",{class:s.value},v)),E("div",{class:`q-message q-message-${r.value}`},M)}}});function Tu(e,t,r){const a=na(e);let l,s=a.left-t.event.x,u=a.top-t.event.y,d=Math.abs(s),f=Math.abs(u);const g=t.direction;g.horizontal===!0&&g.vertical!==!0?l=s<0?"left":"right":g.horizontal!==!0&&g.vertical===!0?l=u<0?"up":"down":g.up===!0&&u<0?(l="up",d>f&&(g.left===!0&&s<0?l="left":g.right===!0&&s>0&&(l="right"))):g.down===!0&&u>0?(l="down",d>f&&(g.left===!0&&s<0?l="left":g.right===!0&&s>0&&(l="right"))):g.left===!0&&s<0?(l="left",d0&&(l="down"))):g.right===!0&&s>0&&(l="right",d0&&(l="down")));let v=!1;if(l===void 0&&r===!1){if(t.event.isFirst===!0||t.event.lastDir===void 0)return{};l=t.event.lastDir,v=!0,l==="left"||l==="right"?(a.left-=s,d=0,s=0):(a.top-=u,f=0,u=0)}return{synthetic:v,payload:{evt:e,touch:t.event.mouse!==!0,mouse:t.event.mouse===!0,position:a,direction:l,isFirst:t.event.isFirst,isFinal:r===!0,duration:Date.now()-t.event.time,distance:{x:d,y:f},offset:{x:s,y:u},delta:{x:a.left-t.event.lastX,y:a.top-t.event.lastY}}}}let Wk=0;var Th=rc({name:"touch-pan",beforeMount(e,{value:t,modifiers:r}){if(r.mouse!==!0&&Kn.has.touch!==!0)return;function a(s,u){r.mouse===!0&&u===!0?Rt(s):(r.stop===!0&&ir(s),r.prevent===!0&&yi(s))}const l={uid:"qvtp_"+Wk++,handler:t,modifiers:r,direction:So(r),noop:Xu,mouseStart(s){ko(s,l)&&Qh(s)&&(Ln(l,"temp",[[document,"mousemove","move","notPassiveCapture"],[document,"mouseup","end","passiveCapture"]]),l.start(s,!0))},touchStart(s){if(ko(s,l)){const u=s.target;Ln(l,"temp",[[u,"touchmove","move","notPassiveCapture"],[u,"touchcancel","end","passiveCapture"],[u,"touchend","end","passiveCapture"]]),l.start(s)}},start(s,u){if(Kn.is.firefox===!0&&ji(e,!0),l.lastEvt=s,u===!0||r.stop===!0){if(l.direction.all!==!0&&(u!==!0||l.modifiers.mouseAllDir!==!0&&l.modifiers.mousealldir!==!0)){const g=s.type.indexOf("mouse")>-1?new MouseEvent(s.type,s):new TouchEvent(s.type,s);s.defaultPrevented===!0&&yi(g),s.cancelBubble===!0&&ir(g),Object.assign(g,{qKeyEvent:s.qKeyEvent,qClickOutside:s.qClickOutside,qAnchorHandled:s.qAnchorHandled,qClonedBy:s.qClonedBy===void 0?[l.uid]:s.qClonedBy.concat(l.uid)}),l.initialEvent={target:s.target,event:g}}ir(s)}const{left:d,top:f}=na(s);l.event={x:d,y:f,time:Date.now(),mouse:u===!0,detected:!1,isFirst:!0,isFinal:!1,lastX:d,lastY:f}},move(s){if(l.event===void 0)return;const u=na(s),d=u.left-l.event.x,f=u.top-l.event.y;if(d===0&&f===0)return;l.lastEvt=s;const g=l.event.mouse===!0,v=()=>{a(s,g);let _;r.preserveCursor!==!0&&r.preservecursor!==!0&&(_=document.documentElement.style.cursor||"",document.documentElement.style.cursor="grabbing"),g===!0&&document.body.classList.add("no-pointer-events--children"),document.body.classList.add("non-selectable"),Ua(),l.styleCleanup=x=>{if(l.styleCleanup=void 0,_!==void 0&&(document.documentElement.style.cursor=_),document.body.classList.remove("non-selectable"),g===!0){const I=()=>{document.body.classList.remove("no-pointer-events--children")};x!==void 0?setTimeout(()=>{I(),x()},50):I()}else x!==void 0&&x()}};if(l.event.detected===!0){l.event.isFirst!==!0&&a(s,l.event.mouse);const{payload:_,synthetic:x}=Tu(s,l,!1);_!==void 0&&(l.handler(_)===!1?l.end(s):(l.styleCleanup===void 0&&l.event.isFirst===!0&&v(),l.event.lastX=_.position.left,l.event.lastY=_.position.top,l.event.lastDir=x===!0?void 0:_.direction,l.event.isFirst=!1));return}if(l.direction.all===!0||g===!0&&(l.modifiers.mouseAllDir===!0||l.modifiers.mousealldir===!0)){v(),l.event.detected=!0,l.move(s);return}const C=Math.abs(d),M=Math.abs(f);C!==M&&(l.direction.horizontal===!0&&C>M||l.direction.vertical===!0&&C0||l.direction.left===!0&&C>M&&d<0||l.direction.right===!0&&C>M&&d>0?(l.event.detected=!0,l.move(s)):l.end(s,!0))},end(s,u){if(l.event!==void 0){if(Pr(l,"temp"),Kn.is.firefox===!0&&ji(e,!1),u===!0)l.styleCleanup!==void 0&&l.styleCleanup(),l.event.detected!==!0&&l.initialEvent!==void 0&&l.initialEvent.target.dispatchEvent(l.initialEvent.event);else if(l.event.detected===!0){l.event.isFirst===!0&&l.handler(Tu(s===void 0?l.lastEvt:s,l).payload);const{payload:d}=Tu(s===void 0?l.lastEvt:s,l,!0),f=()=>{l.handler(d)};l.styleCleanup!==void 0?l.styleCleanup(f):f()}l.event=void 0,l.initialEvent=void 0,l.lastEvt=void 0}}};if(e.__qtouchpan=l,r.mouse===!0){const s=r.mouseCapture===!0||r.mousecapture===!0?"Capture":"";Ln(l,"main",[[e,"mousedown","mouseStart",`passive${s}`]])}Kn.has.touch===!0&&Ln(l,"main",[[e,"touchstart","touchStart",`passive${r.capture===!0?"Capture":""}`],[e,"touchmove","noop","notPassiveCapture"]])},updated(e,t){const r=e.__qtouchpan;r!==void 0&&(t.oldValue!==t.value&&(typeof value!="function"&&r.end(),r.handler=t.value),r.direction=So(t.modifiers))},beforeUnmount(e){const t=e.__qtouchpan;t!==void 0&&(t.event!==void 0&&t.end(),Pr(t,"main"),Pr(t,"temp"),Kn.is.firefox===!0&&ji(e,!1),t.styleCleanup!==void 0&&t.styleCleanup(),delete e.__qtouchpan)}});const Mh=["vertical","horizontal"],Mu={vertical:{offset:"offsetY",scroll:"scrollTop",dir:"down",dist:"y"},horizontal:{offset:"offsetX",scroll:"scrollLeft",dir:"right",dist:"x"}},Dh={prevent:!0,mouse:!0,mouseAllDir:!0},qh=e=>e>=250?50:Math.ceil(e/5);var Hk=Je({name:"QScrollArea",props:{...or,thumbStyle:Object,verticalThumbStyle:Object,horizontalThumbStyle:Object,barStyle:[Array,String,Object],verticalBarStyle:[Array,String,Object],horizontalBarStyle:[Array,String,Object],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:t,emit:r}){const a=se(!1),l=se(!1),s=se(!1),u={vertical:se(0),horizontal:se(0)},d={vertical:{ref:se(null),position:se(0),size:se(0)},horizontal:{ref:se(null),position:se(0),size:se(0)}},{proxy:f}=Dt(),g=sr(e,f.$q);let v=null,C;const M=se(null),_=$(()=>"q-scrollarea"+(g.value===!0?" q-scrollarea--dark":""));d.vertical.percentage=$(()=>{const j=d.vertical.size.value-u.vertical.value;if(j<=0)return 0;const G=no(d.vertical.position.value/j,0,1);return Math.round(G*1e4)/1e4}),d.vertical.thumbHidden=$(()=>(e.visible===null?s.value:e.visible)!==!0&&a.value===!1&&l.value===!1||d.vertical.size.value<=u.vertical.value+1),d.vertical.thumbStart=$(()=>d.vertical.percentage.value*(u.vertical.value-d.vertical.thumbSize.value)),d.vertical.thumbSize=$(()=>Math.round(no(u.vertical.value*u.vertical.value/d.vertical.size.value,qh(u.vertical.value),u.vertical.value))),d.vertical.style=$(()=>({...e.thumbStyle,...e.verticalThumbStyle,top:`${d.vertical.thumbStart.value}px`,height:`${d.vertical.thumbSize.value}px`})),d.vertical.thumbClass=$(()=>"q-scrollarea__thumb q-scrollarea__thumb--v absolute-right"+(d.vertical.thumbHidden.value===!0?" q-scrollarea__thumb--invisible":"")),d.vertical.barClass=$(()=>"q-scrollarea__bar q-scrollarea__bar--v absolute-right"+(d.vertical.thumbHidden.value===!0?" q-scrollarea__bar--invisible":"")),d.horizontal.percentage=$(()=>{const j=d.horizontal.size.value-u.horizontal.value;if(j<=0)return 0;const G=no(Math.abs(d.horizontal.position.value)/j,0,1);return Math.round(G*1e4)/1e4}),d.horizontal.thumbHidden=$(()=>(e.visible===null?s.value:e.visible)!==!0&&a.value===!1&&l.value===!1||d.horizontal.size.value<=u.horizontal.value+1),d.horizontal.thumbStart=$(()=>d.horizontal.percentage.value*(u.horizontal.value-d.horizontal.thumbSize.value)),d.horizontal.thumbSize=$(()=>Math.round(no(u.horizontal.value*u.horizontal.value/d.horizontal.size.value,qh(u.horizontal.value),u.horizontal.value))),d.horizontal.style=$(()=>({...e.thumbStyle,...e.horizontalThumbStyle,[f.$q.lang.rtl===!0?"right":"left"]:`${d.horizontal.thumbStart.value}px`,width:`${d.horizontal.thumbSize.value}px`})),d.horizontal.thumbClass=$(()=>"q-scrollarea__thumb q-scrollarea__thumb--h absolute-bottom"+(d.horizontal.thumbHidden.value===!0?" q-scrollarea__thumb--invisible":"")),d.horizontal.barClass=$(()=>"q-scrollarea__bar q-scrollarea__bar--h absolute-bottom"+(d.horizontal.thumbHidden.value===!0?" q-scrollarea__bar--invisible":""));const x=$(()=>d.vertical.thumbHidden.value===!0&&d.horizontal.thumbHidden.value===!0?e.contentStyle:e.contentActiveStyle),I=[[Th,j=>{V(j,"vertical")},void 0,{vertical:!0,...Dh}]],L=[[Th,j=>{V(j,"horizontal")},void 0,{horizontal:!0,...Dh}]];function F(){const j={};return Mh.forEach(G=>{const me=d[G];j[G+"Position"]=me.position.value,j[G+"Percentage"]=me.percentage.value,j[G+"Size"]=me.size.value,j[G+"ContainerSize"]=u[G].value}),j}const Y=ec(()=>{const j=F();j.ref=f,r("scroll",j)},0);function D(j,G,me){if(Mh.includes(j)===!1){console.error("[QScrollArea]: wrong first param of setScrollPosition (vertical/horizontal)");return}(j==="vertical"?La:hu)(M.value,G,me)}function A({height:j,width:G}){let me=!1;u.vertical.value!==j&&(u.vertical.value=j,me=!0),u.horizontal.value!==G&&(u.horizontal.value=G,me=!0),me===!0&&xe()}function N({position:j}){let G=!1;d.vertical.position.value!==j.top&&(d.vertical.position.value=j.top,G=!0),d.horizontal.position.value!==j.left&&(d.horizontal.position.value=j.left,G=!0),G===!0&&xe()}function J({height:j,width:G}){d.horizontal.size.value!==G&&(d.horizontal.size.value=G,xe()),d.vertical.size.value!==j&&(d.vertical.size.value=j,xe())}function V(j,G){const me=d[G];if(j.isFirst===!0){if(me.thumbHidden.value===!0)return;C=me.position.value,l.value=!0}else if(l.value!==!0)return;j.isFinal===!0&&(l.value=!1);const rt=Mu[G],X=u[G].value,Z=(me.size.value-X)/(X-me.thumbSize.value),he=j.distance[rt.dist],fe=C+(j.direction===rt.dir?1:-1)*he*Z;lt(fe,G)}function H(j,G){const me=d[G];if(me.thumbHidden.value!==!0){const rt=j[Mu[G].offset];if(rtme.thumbStart.value+me.thumbSize.value){const X=rt-me.thumbSize.value/2;lt(X/u[G].value*me.size.value,G)}me.ref.value!==null&&me.ref.value.dispatchEvent(new MouseEvent(j.type,j))}}function pe(j){H(j,"vertical")}function _e(j){H(j,"horizontal")}function xe(){a.value=!0,v!==null&&clearTimeout(v),v=setTimeout(()=>{v=null,a.value=!1},e.delay),e.onScroll!==void 0&&Y()}function lt(j,G){M.value[Mu[G].scroll]=j}function te(){s.value=!0}function Pe(){s.value=!1}let Be=null;return Ve(()=>f.$q.lang.rtl,j=>{M.value!==null&&hu(M.value,Math.abs(d.horizontal.position.value)*(j===!0?-1:1))}),oa(()=>{Be={top:d.vertical.position.value,left:d.horizontal.position.value}}),sa(()=>{if(Be===null)return;const j=M.value;j!==null&&(hu(j,Be.left),La(j,Be.top))}),Ht(Y.cancel),Object.assign(f,{getScrollTarget:()=>M.value,getScroll:F,getScrollPosition:()=>({top:d.vertical.position.value,left:d.horizontal.position.value}),getScrollPercentage:()=>({top:d.vertical.percentage.value,left:d.horizontal.percentage.value}),setScrollPosition:D,setScrollPercentage(j,G,me){D(j,G*(d[j].size.value-u[j].value)*(j==="horizontal"&&f.$q.lang.rtl===!0?-1:1),me)}}),()=>E("div",{class:_.value,onMouseenter:te,onMouseleave:Pe},[E("div",{ref:M,class:"q-scrollarea__container scroll relative-position fit hide-scrollbar",tabindex:e.tabindex!==void 0?e.tabindex:void 0},[E("div",{class:"q-scrollarea__content absolute",style:x.value},Si(t.default,[E(Eu,{debounce:0,onResize:J})])),E(cw,{axis:"both",onScroll:N})]),E(Eu,{debounce:0,onResize:A}),E("div",{class:d.vertical.barClass.value,style:[e.barStyle,e.verticalBarStyle],"aria-hidden":"true",onMousedown:pe}),E("div",{class:d.horizontal.barClass.value,style:[e.barStyle,e.horizontalBarStyle],"aria-hidden":"true",onMousedown:_e}),Gn(E("div",{ref:d.vertical.ref,class:d.vertical.thumbClass.value,style:d.vertical.style.value,"aria-hidden":"true"}),I),Gn(E("div",{ref:d.horizontal.ref,class:d.horizontal.thumbClass.value,style:d.horizontal.style.value,"aria-hidden":"true"}),L)])}}),Kk=Je({name:"QForm",props:{autofocus:Boolean,noErrorFocus:Boolean,noResetFocus:Boolean,greedy:Boolean,onSubmit:Function},emits:["reset","validationSuccess","validationError"],setup(e,{slots:t,emit:r}){const a=Dt(),l=se(null);let s=0;const u=[];function d(_){const x=typeof _=="boolean"?_:e.noErrorFocus!==!0,I=++s,L=(D,A)=>{r("validation"+(D===!0?"Success":"Error"),A)},F=D=>{const A=D.validate();return typeof A.then=="function"?A.then(N=>({valid:N,comp:D}),N=>({valid:!1,comp:D,err:N})):Promise.resolve({valid:A,comp:D})};return(e.greedy===!0?Promise.all(u.map(F)).then(D=>D.filter(A=>A.valid!==!0)):u.reduce((D,A)=>D.then(()=>F(A).then(N=>{if(N.valid===!1)return Promise.reject(N)})),Promise.resolve()).catch(D=>[D])).then(D=>{if(D===void 0||D.length===0)return I===s&&L(!0),!0;if(I===s){const{comp:A,err:N}=D[0];if(N!==void 0&&console.error(N),L(!1,A),x===!0){const J=D.find(({comp:V})=>typeof V.focus=="function"&&ew(V.$)===!1);J!==void 0&&J.comp.focus()}}return!1})}function f(){s++,u.forEach(_=>{typeof _.resetValidation=="function"&&_.resetValidation()})}function g(_){_!==void 0&&Rt(_);const x=s+1;d().then(I=>{x===s&&I===!0&&(e.onSubmit!==void 0?r("submit",_):_!==void 0&&_.target!==void 0&&typeof _.target.submit=="function"&&_.target.submit())})}function v(_){_!==void 0&&Rt(_),r("reset"),Sn(()=>{f(),e.autofocus===!0&&e.noResetFocus!==!0&&C()})}function C(){Uh(()=>{if(l.value===null)return;const _=l.value.querySelector("[autofocus][tabindex], [data-autofocus][tabindex]")||l.value.querySelector("[autofocus] [tabindex], [data-autofocus] [tabindex]")||l.value.querySelector("[autofocus], [data-autofocus]")||Array.prototype.find.call(l.value.querySelectorAll("[tabindex]"),x=>x.tabIndex>-1);_!=null&&_.focus({preventScroll:!0})})}Wh(tw,{bindComponent(_){u.push(_)},unbindComponent(_){const x=u.indexOf(_);x>-1&&u.splice(x,1)}});let M=!1;return oa(()=>{M=!0}),sa(()=>{M===!0&&e.autofocus===!0&&C()}),ni(()=>{e.autofocus===!0&&C()}),Object.assign(a.proxy,{validate:d,resetValidation:f,submit:g,reset:v,focus:C,getValidationComponents:()=>u}),()=>E("form",{class:"q-form",ref:l,onSubmit:g,onReset:v},Mt(t.default))}});//! moment.js //! version : 2.29.4 //! authors : Tim Wood, Iskren Chernev, Moment.js contributors //! license : MIT //! momentjs.com -var $g;function ae(){return $g.apply(null,arguments)}function Gk(e){$g=e}function jn(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function bi(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function Xe(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function gc(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(Xe(e,t))return!1;return!0}function mn(e){return e===void 0}function Ar(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function Ja(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function Og(e,t){var r=[],a,l=e.length;for(a=0;a>>0,a;for(a=0;a0)for(r=0;r>>0,a;for(a=0;a0)for(r=0;r=0;return(s?r?"+":"":"-")+Math.pow(10,Math.max(0,l)).toString().substr(1)+a}var yc=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,io=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,qu={},Ji={};function be(e,t,r,a){var l=a;typeof a=="string"&&(l=function(){return this[a]()}),e&&(Ji[e]=l),t&&(Ji[t[0]]=function(){return lr(l.apply(this,arguments),t[1],t[2])}),r&&(Ji[r]=function(){return this.localeData().ordinal(l.apply(this,arguments),e)})}function Xk(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function eC(e){var t=e.match(yc),r,a;for(r=0,a=t.length;r=0&&io.test(e);)e=e.replace(io,a),io.lastIndex=0,r-=1;return e}var tC={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function nC(e){var t=this._longDateFormat[e],r=this._longDateFormat[e.toUpperCase()];return t||!r?t:(this._longDateFormat[e]=r.match(yc).map(function(a){return a==="MMMM"||a==="MM"||a==="DD"||a==="dddd"?a.slice(1):a}).join(""),this._longDateFormat[e])}var rC="Invalid date";function iC(){return this._invalidDate}var aC="%d",lC=/\d{1,2}/;function oC(e){return this._ordinal.replace("%d",e)}var sC={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function uC(e,t,r,a){var l=this._relativeTime[r];return dr(l)?l(e,t,r,a):l.replace(/%d/i,e)}function cC(e,t){var r=this._relativeTime[e>0?"future":"past"];return dr(r)?r(t):r.replace(/%s/i,t)}var Ba={};function en(e,t){var r=e.toLowerCase();Ba[r]=Ba[r+"s"]=Ba[t]=e}function Bn(e){return typeof e=="string"?Ba[e]||Ba[e.toLowerCase()]:void 0}function _c(e){var t={},r,a;for(a in e)Xe(e,a)&&(r=Bn(a),r&&(t[r]=e[a]));return t}var Bg={};function tn(e,t){Bg[e]=t}function dC(e){var t=[],r;for(r in e)Xe(e,r)&&t.push({unit:r,priority:Bg[r]});return t.sort(function(a,l){return a.priority-l.priority}),t}function Lo(e){return e%4===0&&e%100!==0||e%400===0}function On(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function Ye(e){var t=+e,r=0;return t!==0&&isFinite(t)&&(r=On(t)),r}function ua(e,t){return function(r){return r!=null?(Fg(this,e,r),ae.updateOffset(this,t),this):Co(this,e)}}function Co(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function Fg(e,t,r){e.isValid()&&!isNaN(r)&&(t==="FullYear"&&Lo(e.year())&&e.month()===1&&e.date()===29?(r=Ye(r),e._d["set"+(e._isUTC?"UTC":"")+t](r,e.month(),Vo(r,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](r))}function fC(e){return e=Bn(e),dr(this[e])?this[e]():this}function hC(e,t){if(typeof e=="object"){e=_c(e);var r=dC(e),a,l=r.length;for(a=0;a68?1900:2e3)};var jg=ua("FullYear",!0);function EC(){return Lo(this.year())}function IC(e,t,r,a,l,s,u){var d;return e<100&&e>=0?(d=new Date(e+400,t,r,a,l,s,u),isFinite(d.getFullYear())&&d.setFullYear(e)):d=new Date(e,t,r,a,l,s,u),d}function Ya(e){var t,r;return e<100&&e>=0?(r=Array.prototype.slice.call(arguments),r[0]=e+400,t=new Date(Date.UTC.apply(null,r)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Mo(e,t,r){var a=7+t-r,l=(7+Ya(e,0,a).getUTCDay()-t)%7;return-l+a-1}function Zg(e,t,r,a,l){var s=(7+r-a)%7,u=Mo(e,a,l),d=1+7*(t-1)+s+u,f,g;return d<=0?(f=e-1,g=Fa(f)+d):d>Fa(e)?(f=e+1,g=d-Fa(e)):(f=e,g=d),{year:f,dayOfYear:g}}function Wa(e,t,r){var a=Mo(e.year(),t,r),l=Math.floor((e.dayOfYear()-a-1)/7)+1,s,u;return l<1?(u=e.year()-1,s=l+xr(u,t,r)):l>xr(e.year(),t,r)?(s=l-xr(e.year(),t,r),u=e.year()+1):(u=e.year(),s=l),{week:s,year:u}}function xr(e,t,r){var a=Mo(e,t,r),l=Mo(e+1,t,r);return(Fa(e)-a+l)/7}be("w",["ww",2],"wo","week");be("W",["WW",2],"Wo","isoWeek");en("week","w");en("isoWeek","W");tn("week",5);tn("isoWeek",5);ce("w",yt);ce("ww",yt,Mn);ce("W",yt);ce("WW",yt,Mn);tl(["w","ww","W","WW"],function(e,t,r,a){t[a.substr(0,1)]=Ye(e)});function $C(e){return Wa(e,this._week.dow,this._week.doy).week}var OC={dow:0,doy:6};function RC(){return this._week.dow}function LC(){return this._week.doy}function NC(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function BC(e){var t=Wa(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}be("d",0,"do","day");be("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});be("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});be("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});be("e",0,0,"weekday");be("E",0,0,"isoWeekday");en("day","d");en("weekday","e");en("isoWeekday","E");tn("day",11);tn("weekday",11);tn("isoWeekday",11);ce("d",yt);ce("e",yt);ce("E",yt);ce("dd",function(e,t){return t.weekdaysMinRegex(e)});ce("ddd",function(e,t){return t.weekdaysShortRegex(e)});ce("dddd",function(e,t){return t.weekdaysRegex(e)});tl(["dd","ddd","dddd"],function(e,t,r,a){var l=r._locale.weekdaysParse(e,a,r._strict);l!=null?t.d=l:Le(r).invalidWeekday=e});tl(["d","e","E"],function(e,t,r,a){t[a]=Ye(e)});function FC(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function UC(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Sc(e,t){return e.slice(t,7).concat(e.slice(0,t))}var zC="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Jg="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),VC="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),YC=el,WC=el,HC=el;function KC(e,t){var r=jn(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?Sc(r,this._week.dow):e?r[e.day()]:r}function GC(e){return e===!0?Sc(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function QC(e){return e===!0?Sc(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function jC(e,t,r){var a,l,s,u=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],a=0;a<7;++a)s=cr([2e3,1]).day(a),this._minWeekdaysParse[a]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[a]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[a]=this.weekdays(s,"").toLocaleLowerCase();return r?t==="dddd"?(l=Et.call(this._weekdaysParse,u),l!==-1?l:null):t==="ddd"?(l=Et.call(this._shortWeekdaysParse,u),l!==-1?l:null):(l=Et.call(this._minWeekdaysParse,u),l!==-1?l:null):t==="dddd"?(l=Et.call(this._weekdaysParse,u),l!==-1||(l=Et.call(this._shortWeekdaysParse,u),l!==-1)?l:(l=Et.call(this._minWeekdaysParse,u),l!==-1?l:null)):t==="ddd"?(l=Et.call(this._shortWeekdaysParse,u),l!==-1||(l=Et.call(this._weekdaysParse,u),l!==-1)?l:(l=Et.call(this._minWeekdaysParse,u),l!==-1?l:null)):(l=Et.call(this._minWeekdaysParse,u),l!==-1||(l=Et.call(this._weekdaysParse,u),l!==-1)?l:(l=Et.call(this._shortWeekdaysParse,u),l!==-1?l:null))}function ZC(e,t,r){var a,l,s;if(this._weekdaysParseExact)return jC.call(this,e,t,r);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),a=0;a<7;a++){if(l=cr([2e3,1]).day(a),r&&!this._fullWeekdaysParse[a]&&(this._fullWeekdaysParse[a]=new RegExp("^"+this.weekdays(l,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[a]=new RegExp("^"+this.weekdaysShort(l,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[a]=new RegExp("^"+this.weekdaysMin(l,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[a]||(s="^"+this.weekdays(l,"")+"|^"+this.weekdaysShort(l,"")+"|^"+this.weekdaysMin(l,""),this._weekdaysParse[a]=new RegExp(s.replace(".",""),"i")),r&&t==="dddd"&&this._fullWeekdaysParse[a].test(e))return a;if(r&&t==="ddd"&&this._shortWeekdaysParse[a].test(e))return a;if(r&&t==="dd"&&this._minWeekdaysParse[a].test(e))return a;if(!r&&this._weekdaysParse[a].test(e))return a}}function JC(e){if(!this.isValid())return e!=null?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return e!=null?(e=FC(e,this.localeData()),this.add(e-t,"d")):t}function XC(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function e2(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=UC(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function t2(e){return this._weekdaysParseExact?(Xe(this,"_weekdaysRegex")||kc.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(Xe(this,"_weekdaysRegex")||(this._weekdaysRegex=YC),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function n2(e){return this._weekdaysParseExact?(Xe(this,"_weekdaysRegex")||kc.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(Xe(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=WC),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function r2(e){return this._weekdaysParseExact?(Xe(this,"_weekdaysRegex")||kc.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(Xe(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=HC),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function kc(){function e(v,C){return C.length-v.length}var t=[],r=[],a=[],l=[],s,u,d,f,g;for(s=0;s<7;s++)u=cr([2e3,1]).day(s),d=kn(this.weekdaysMin(u,"")),f=kn(this.weekdaysShort(u,"")),g=kn(this.weekdays(u,"")),t.push(d),r.push(f),a.push(g),l.push(d),l.push(f),l.push(g);t.sort(e),r.sort(e),a.sort(e),l.sort(e),this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function Cc(){return this.hours()%12||12}function i2(){return this.hours()||24}be("H",["HH",2],0,"hour");be("h",["hh",2],0,Cc);be("k",["kk",2],0,i2);be("hmm",0,0,function(){return""+Cc.apply(this)+lr(this.minutes(),2)});be("hmmss",0,0,function(){return""+Cc.apply(this)+lr(this.minutes(),2)+lr(this.seconds(),2)});be("Hmm",0,0,function(){return""+this.hours()+lr(this.minutes(),2)});be("Hmmss",0,0,function(){return""+this.hours()+lr(this.minutes(),2)+lr(this.seconds(),2)});function Xg(e,t){be(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}Xg("a",!0);Xg("A",!1);en("hour","h");tn("hour",13);function em(e,t){return t._meridiemParse}ce("a",em);ce("A",em);ce("H",yt);ce("h",yt);ce("k",yt);ce("HH",yt,Mn);ce("hh",yt,Mn);ce("kk",yt,Mn);ce("hmm",Vg);ce("hmmss",Yg);ce("Hmm",Vg);ce("Hmmss",Yg);ct(["H","HH"],Lt);ct(["k","kk"],function(e,t,r){var a=Ye(e);t[Lt]=a===24?0:a});ct(["a","A"],function(e,t,r){r._isPm=r._locale.isPM(e),r._meridiem=e});ct(["h","hh"],function(e,t,r){t[Lt]=Ye(e),Le(r).bigHour=!0});ct("hmm",function(e,t,r){var a=e.length-2;t[Lt]=Ye(e.substr(0,a)),t[Qn]=Ye(e.substr(a)),Le(r).bigHour=!0});ct("hmmss",function(e,t,r){var a=e.length-4,l=e.length-2;t[Lt]=Ye(e.substr(0,a)),t[Qn]=Ye(e.substr(a,2)),t[qr]=Ye(e.substr(l)),Le(r).bigHour=!0});ct("Hmm",function(e,t,r){var a=e.length-2;t[Lt]=Ye(e.substr(0,a)),t[Qn]=Ye(e.substr(a))});ct("Hmmss",function(e,t,r){var a=e.length-4,l=e.length-2;t[Lt]=Ye(e.substr(0,a)),t[Qn]=Ye(e.substr(a,2)),t[qr]=Ye(e.substr(l))});function a2(e){return(e+"").toLowerCase().charAt(0)==="p"}var l2=/[ap]\.?m?\.?/i,o2=ua("Hours",!0);function s2(e,t,r){return e>11?r?"pm":"PM":r?"am":"AM"}var tm={calendar:Zk,longDateFormat:tC,invalidDate:rC,ordinal:aC,dayOfMonthOrdinalParse:lC,relativeTime:sC,months:SC,monthsShort:Wg,week:OC,weekdays:zC,weekdaysMin:VC,weekdaysShort:Jg,meridiemParse:l2},bt={},Aa={},Ha;function u2(e,t){var r,a=Math.min(e.length,t.length);for(r=0;r0;){if(l=Yo(s.slice(0,r).join("-")),l)return l;if(a&&a.length>=r&&u2(s,a)>=r-1)break;r--}t++}return Ha}function d2(e){return e.match("^[^/\\\\]*$")!=null}function Yo(e){var t=null,r;if(bt[e]===void 0&&typeof module!="undefined"&&module&&module.exports&&d2(e))try{t=Ha._abbr,r=require,r("./locale/"+e),ei(t)}catch{bt[e]=null}return bt[e]}function ei(e,t){var r;return e&&(mn(t)?r=Er(e):r=Tc(e,t),r?Ha=r:typeof console!="undefined"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Ha._abbr}function Tc(e,t){if(t!==null){var r,a=tm;if(t.abbr=e,bt[e]!=null)Lg("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),a=bt[e]._config;else if(t.parentLocale!=null)if(bt[t.parentLocale]!=null)a=bt[t.parentLocale]._config;else if(r=Yo(t.parentLocale),r!=null)a=r._config;else return Aa[t.parentLocale]||(Aa[t.parentLocale]=[]),Aa[t.parentLocale].push({name:e,config:t}),null;return bt[e]=new pc(Fu(a,t)),Aa[e]&&Aa[e].forEach(function(l){Tc(l.name,l.config)}),ei(e),bt[e]}else return delete bt[e],null}function f2(e,t){if(t!=null){var r,a,l=tm;bt[e]!=null&&bt[e].parentLocale!=null?bt[e].set(Fu(bt[e]._config,t)):(a=Yo(e),a!=null&&(l=a._config),t=Fu(l,t),a==null&&(t.abbr=e),r=new pc(t),r.parentLocale=bt[e],bt[e]=r),ei(e)}else bt[e]!=null&&(bt[e].parentLocale!=null?(bt[e]=bt[e].parentLocale,e===ei()&&ei(e)):bt[e]!=null&&delete bt[e]);return bt[e]}function Er(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Ha;if(!jn(e)){if(t=Yo(e),t)return t;e=[e]}return c2(e)}function h2(){return Uu(bt)}function Mc(e){var t,r=e._a;return r&&Le(e).overflow===-2&&(t=r[Dr]<0||r[Dr]>11?Dr:r[ar]<1||r[ar]>Vo(r[Xt],r[Dr])?ar:r[Lt]<0||r[Lt]>24||r[Lt]===24&&(r[Qn]!==0||r[qr]!==0||r[pi]!==0)?Lt:r[Qn]<0||r[Qn]>59?Qn:r[qr]<0||r[qr]>59?qr:r[pi]<0||r[pi]>999?pi:-1,Le(e)._overflowDayOfYear&&(tar)&&(t=ar),Le(e)._overflowWeeks&&t===-1&&(t=_C),Le(e)._overflowWeekday&&t===-1&&(t=bC),Le(e).overflow=t),e}var g2=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,m2=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,v2=/Z|[+-]\d\d(?::?\d\d)?/,ao=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Pu=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],p2=/^\/?Date\((-?\d+)/i,y2=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,_2={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function nm(e){var t,r,a=e._i,l=g2.exec(a)||m2.exec(a),s,u,d,f,g=ao.length,v=Pu.length;if(l){for(Le(e).iso=!0,t=0,r=g;tFa(u)||e._dayOfYear===0)&&(Le(e)._overflowDayOfYear=!0),r=Ya(u,0,e._dayOfYear),e._a[Dr]=r.getUTCMonth(),e._a[ar]=r.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=a[t]=l[t];for(;t<7;t++)e._a[t]=a[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[Lt]===24&&e._a[Qn]===0&&e._a[qr]===0&&e._a[pi]===0&&(e._nextDay=!0,e._a[Lt]=0),e._d=(e._useUTC?Ya:IC).apply(null,a),s=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Lt]=24),e._w&&typeof e._w.d!="undefined"&&e._w.d!==s&&(Le(e).weekdayMismatch=!0)}}function D2(e){var t,r,a,l,s,u,d,f,g;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(s=1,u=4,r=Ki(t.GG,e._a[Xt],Wa(pt(),1,4).year),a=Ki(t.W,1),l=Ki(t.E,1),(l<1||l>7)&&(f=!0)):(s=e._locale._week.dow,u=e._locale._week.doy,g=Wa(pt(),s,u),r=Ki(t.gg,e._a[Xt],g.year),a=Ki(t.w,g.week),t.d!=null?(l=t.d,(l<0||l>6)&&(f=!0)):t.e!=null?(l=t.e+s,(t.e<0||t.e>6)&&(f=!0)):l=s),a<1||a>xr(r,s,u)?Le(e)._overflowWeeks=!0:f!=null?Le(e)._overflowWeekday=!0:(d=Zg(r,a,l,s,u),e._a[Xt]=d.year,e._dayOfYear=d.dayOfYear)}ae.ISO_8601=function(){};ae.RFC_2822=function(){};function qc(e){if(e._f===ae.ISO_8601){nm(e);return}if(e._f===ae.RFC_2822){rm(e);return}e._a=[],Le(e).empty=!0;var t=""+e._i,r,a,l,s,u,d=t.length,f=0,g,v;for(l=Ng(e._f,e._locale).match(yc)||[],v=l.length,r=0;r0&&Le(e).unusedInput.push(u),t=t.slice(t.indexOf(a)+a.length),f+=a.length),Ji[s]?(a?Le(e).empty=!1:Le(e).unusedTokens.push(s),yC(s,a,e)):e._strict&&!a&&Le(e).unusedTokens.push(s);Le(e).charsLeftOver=d-f,t.length>0&&Le(e).unusedInput.push(t),e._a[Lt]<=12&&Le(e).bigHour===!0&&e._a[Lt]>0&&(Le(e).bigHour=void 0),Le(e).parsedDateParts=e._a.slice(0),Le(e).meridiem=e._meridiem,e._a[Lt]=q2(e._locale,e._a[Lt],e._meridiem),g=Le(e).era,g!==null&&(e._a[Xt]=e._locale.erasConvertYear(g,e._a[Xt])),Dc(e),Mc(e)}function q2(e,t,r){var a;return r==null?t:e.meridiemHour!=null?e.meridiemHour(t,r):(e.isPM!=null&&(a=e.isPM(r),a&&t<12&&(t+=12),!a&&t===12&&(t=0)),t)}function P2(e){var t,r,a,l,s,u,d=!1,f=e._f.length;if(f===0){Le(e).invalidFormat=!0,e._d=new Date(NaN);return}for(l=0;lthis?this:e:Ro()});function lm(e,t){var r,a;if(t.length===1&&jn(t[0])&&(t=t[0]),!t.length)return pt();for(r=t[0],a=1;athis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function j2(){if(!mn(this._isDSTShifted))return this._isDSTShifted;var e={},t;return vc(e,this),e=im(e),e._a?(t=e._isUTC?cr(e._a):pt(e._a),this._isDSTShifted=this.isValid()&&U2(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function Z2(){return this.isValid()?!this._isUTC:!1}function J2(){return this.isValid()?this._isUTC:!1}function sm(){return this.isValid()?this._isUTC&&this._offset===0:!1}var X2=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,eT=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Jn(e,t){var r=e,a=null,l,s,u;return so(e)?r={ms:e._milliseconds,d:e._days,M:e._months}:Ar(e)||!isNaN(+e)?(r={},t?r[t]=+e:r.milliseconds=+e):(a=X2.exec(e))?(l=a[1]==="-"?-1:1,r={y:0,d:Ye(a[ar])*l,h:Ye(a[Lt])*l,m:Ye(a[Qn])*l,s:Ye(a[qr])*l,ms:Ye(Vu(a[pi]*1e3))*l}):(a=eT.exec(e))?(l=a[1]==="-"?-1:1,r={y:gi(a[2],l),M:gi(a[3],l),w:gi(a[4],l),d:gi(a[5],l),h:gi(a[6],l),m:gi(a[7],l),s:gi(a[8],l)}):r==null?r={}:typeof r=="object"&&("from"in r||"to"in r)&&(u=tT(pt(r.from),pt(r.to)),r={},r.ms=u.milliseconds,r.M=u.months),s=new Wo(r),so(e)&&Xe(e,"_locale")&&(s._locale=e._locale),so(e)&&Xe(e,"_isValid")&&(s._isValid=e._isValid),s}Jn.fn=Wo.prototype;Jn.invalid=F2;function gi(e,t){var r=e&&parseFloat(e.replace(",","."));return(isNaN(r)?0:r)*t}function Eh(e,t){var r={};return r.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(r.months,"M").isAfter(t)&&--r.months,r.milliseconds=+t-+e.clone().add(r.months,"M"),r}function tT(e,t){var r;return e.isValid()&&t.isValid()?(t=xc(t,e),e.isBefore(t)?r=Eh(e,t):(r=Eh(t,e),r.milliseconds=-r.milliseconds,r.months=-r.months),r):{milliseconds:0,months:0}}function um(e,t){return function(r,a){var l,s;return a!==null&&!isNaN(+a)&&(Lg(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),s=r,r=a,a=s),l=Jn(r,a),cm(this,l,e),this}}function cm(e,t,r,a){var l=t._milliseconds,s=Vu(t._days),u=Vu(t._months);!e.isValid()||(a=a==null?!0:a,u&&Kg(e,Co(e,"Month")+u*r),s&&Fg(e,"Date",Co(e,"Date")+s*r),l&&e._d.setTime(e._d.valueOf()+l*r),a&&ae.updateOffset(e,s||u))}var nT=um(1,"add"),rT=um(-1,"subtract");function dm(e){return typeof e=="string"||e instanceof String}function iT(e){return Zn(e)||Ja(e)||dm(e)||Ar(e)||lT(e)||aT(e)||e===null||e===void 0}function aT(e){var t=bi(e)&&!gc(e),r=!1,a=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],l,s,u=a.length;for(l=0;lr.valueOf():r.valueOf()9999?oo(r,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):dr(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",oo(r,"Z")):oo(r,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function bT(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",r,a,l,s;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),r="["+e+'("]',a=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",l="-MM-DD[T]HH:mm:ss.SSS",s=t+'[")]',this.format(r+a+l+s)}function wT(e){e||(e=this.isUtc()?ae.defaultFormatUtc:ae.defaultFormat);var t=oo(this,e);return this.localeData().postformat(t)}function ST(e,t){return this.isValid()&&(Zn(e)&&e.isValid()||pt(e).isValid())?Jn({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function kT(e){return this.from(pt(),e)}function CT(e,t){return this.isValid()&&(Zn(e)&&e.isValid()||pt(e).isValid())?Jn({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function TT(e){return this.to(pt(),e)}function fm(e){var t;return e===void 0?this._locale._abbr:(t=Er(e),t!=null&&(this._locale=t),this)}var hm=Nn("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function gm(){return this._locale}var Do=1e3,Xi=60*Do,qo=60*Xi,mm=(365*400+97)*24*qo;function ea(e,t){return(e%t+t)%t}function vm(e,t,r){return e<100&&e>=0?new Date(e+400,t,r)-mm:new Date(e,t,r).valueOf()}function pm(e,t,r){return e<100&&e>=0?Date.UTC(e+400,t,r)-mm:Date.UTC(e,t,r)}function MT(e){var t,r;if(e=Bn(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?pm:vm,e){case"year":t=r(this.year(),0,1);break;case"quarter":t=r(this.year(),this.month()-this.month()%3,1);break;case"month":t=r(this.year(),this.month(),1);break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=r(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=ea(t+(this._isUTC?0:this.utcOffset()*Xi),qo);break;case"minute":t=this._d.valueOf(),t-=ea(t,Xi);break;case"second":t=this._d.valueOf(),t-=ea(t,Do);break}return this._d.setTime(t),ae.updateOffset(this,!0),this}function DT(e){var t,r;if(e=Bn(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?pm:vm,e){case"year":t=r(this.year()+1,0,1)-1;break;case"quarter":t=r(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=r(this.year(),this.month()+1,1)-1;break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=r(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=qo-ea(t+(this._isUTC?0:this.utcOffset()*Xi),qo)-1;break;case"minute":t=this._d.valueOf(),t+=Xi-ea(t,Xi)-1;break;case"second":t=this._d.valueOf(),t+=Do-ea(t,Do)-1;break}return this._d.setTime(t),ae.updateOffset(this,!0),this}function qT(){return this._d.valueOf()-(this._offset||0)*6e4}function PT(){return Math.floor(this.valueOf()/1e3)}function xT(){return new Date(this.valueOf())}function AT(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function ET(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function IT(){return this.isValid()?this.toISOString():null}function $T(){return mc(this)}function OT(){return Zr({},Le(this))}function RT(){return Le(this).overflow}function LT(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}be("N",0,0,"eraAbbr");be("NN",0,0,"eraAbbr");be("NNN",0,0,"eraAbbr");be("NNNN",0,0,"eraName");be("NNNNN",0,0,"eraNarrow");be("y",["y",1],"yo","eraYear");be("y",["yy",2],0,"eraYear");be("y",["yyy",3],0,"eraYear");be("y",["yyyy",4],0,"eraYear");ce("N",Ac);ce("NN",Ac);ce("NNN",Ac);ce("NNNN",GT);ce("NNNNN",QT);ct(["N","NN","NNN","NNNN","NNNNN"],function(e,t,r,a){var l=r._locale.erasParse(e,a,r._strict);l?Le(r).era=l:Le(r).invalidEra=e});ce("y",ca);ce("yy",ca);ce("yyy",ca);ce("yyyy",ca);ce("yo",jT);ct(["y","yy","yyy","yyyy"],Xt);ct(["yo"],function(e,t,r,a){var l;r._locale._eraYearOrdinalRegex&&(l=e.match(r._locale._eraYearOrdinalRegex)),r._locale.eraYearOrdinalParse?t[Xt]=r._locale.eraYearOrdinalParse(e,l):t[Xt]=parseInt(e,10)});function NT(e,t){var r,a,l,s=this._eras||Er("en")._eras;for(r=0,a=s.length;r=0)return s[a]}function FT(e,t){var r=e.since<=e.until?1:-1;return t===void 0?ae(e.since).year():ae(e.since).year()+(t-e.offset)*r}function UT(){var e,t,r,a=this.localeData().eras();for(e=0,t=a.length;es&&(t=s),rM.call(this,e,t,r,a,l))}function rM(e,t,r,a,l){var s=Zg(e,t,r,a,l),u=Ya(s.year,0,s.dayOfYear);return this.year(u.getUTCFullYear()),this.month(u.getUTCMonth()),this.date(u.getUTCDate()),this}be("Q",0,"Qo","quarter");en("quarter","Q");tn("quarter",7);ce("Q",Ug);ct("Q",function(e,t){t[Dr]=(Ye(e)-1)*3});function iM(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}be("D",["DD",2],"Do","date");en("date","D");tn("date",9);ce("D",yt);ce("DD",yt,Mn);ce("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});ct(["D","DD"],ar);ct("Do",function(e,t){t[ar]=Ye(e.match(yt)[0])});var _m=ua("Date",!0);be("DDD",["DDDD",3],"DDDo","dayOfYear");en("dayOfYear","DDD");tn("dayOfYear",4);ce("DDD",Bo);ce("DDDD",zg);ct(["DDD","DDDD"],function(e,t,r){r._dayOfYear=Ye(e)});function aM(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}be("m",["mm",2],0,"minute");en("minute","m");tn("minute",14);ce("m",yt);ce("mm",yt,Mn);ct(["m","mm"],Qn);var lM=ua("Minutes",!1);be("s",["ss",2],0,"second");en("second","s");tn("second",15);ce("s",yt);ce("ss",yt,Mn);ct(["s","ss"],qr);var oM=ua("Seconds",!1);be("S",0,0,function(){return~~(this.millisecond()/100)});be(0,["SS",2],0,function(){return~~(this.millisecond()/10)});be(0,["SSS",3],0,"millisecond");be(0,["SSSS",4],0,function(){return this.millisecond()*10});be(0,["SSSSS",5],0,function(){return this.millisecond()*100});be(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});be(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});be(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});be(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});en("millisecond","ms");tn("millisecond",16);ce("S",Bo,Ug);ce("SS",Bo,Mn);ce("SSS",Bo,zg);var Jr,bm;for(Jr="SSSS";Jr.length<=9;Jr+="S")ce(Jr,ca);function sM(e,t){t[pi]=Ye(("0."+e)*1e3)}for(Jr="S";Jr.length<=9;Jr+="S")ct(Jr,sM);bm=ua("Milliseconds",!1);be("z",0,0,"zoneAbbr");be("zz",0,0,"zoneName");function uM(){return this._isUTC?"UTC":""}function cM(){return this._isUTC?"Coordinated Universal Time":""}var Q=Xa.prototype;Q.add=nT;Q.calendar=uT;Q.clone=cT;Q.diff=pT;Q.endOf=DT;Q.format=wT;Q.from=ST;Q.fromNow=kT;Q.to=CT;Q.toNow=TT;Q.get=fC;Q.invalidAt=RT;Q.isAfter=dT;Q.isBefore=fT;Q.isBetween=hT;Q.isSame=gT;Q.isSameOrAfter=mT;Q.isSameOrBefore=vT;Q.isValid=$T;Q.lang=hm;Q.locale=fm;Q.localeData=gm;Q.max=$2;Q.min=I2;Q.parsingFlags=OT;Q.set=hC;Q.startOf=MT;Q.subtract=rT;Q.toArray=AT;Q.toObject=ET;Q.toDate=xT;Q.toISOString=_T;Q.inspect=bT;typeof Symbol!="undefined"&&Symbol.for!=null&&(Q[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});Q.toJSON=IT;Q.toString=yT;Q.unix=PT;Q.valueOf=qT;Q.creationData=LT;Q.eraName=UT;Q.eraNarrow=zT;Q.eraAbbr=VT;Q.eraYear=YT;Q.year=jg;Q.isLeapYear=EC;Q.weekYear=ZT;Q.isoWeekYear=JT;Q.quarter=Q.quarters=iM;Q.month=Gg;Q.daysInMonth=PC;Q.week=Q.weeks=NC;Q.isoWeek=Q.isoWeeks=BC;Q.weeksInYear=tM;Q.weeksInWeekYear=nM;Q.isoWeeksInYear=XT;Q.isoWeeksInISOWeekYear=eM;Q.date=_m;Q.day=Q.days=JC;Q.weekday=XC;Q.isoWeekday=e2;Q.dayOfYear=aM;Q.hour=Q.hours=o2;Q.minute=Q.minutes=lM;Q.second=Q.seconds=oM;Q.millisecond=Q.milliseconds=bm;Q.utcOffset=V2;Q.utc=W2;Q.local=H2;Q.parseZone=K2;Q.hasAlignedHourOffset=G2;Q.isDST=Q2;Q.isLocal=Z2;Q.isUtcOffset=J2;Q.isUtc=sm;Q.isUTC=sm;Q.zoneAbbr=uM;Q.zoneName=cM;Q.dates=Nn("dates accessor is deprecated. Use date instead.",_m);Q.months=Nn("months accessor is deprecated. Use month instead",Gg);Q.years=Nn("years accessor is deprecated. Use year instead",jg);Q.zone=Nn("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Y2);Q.isDSTShifted=Nn("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",j2);function dM(e){return pt(e*1e3)}function fM(){return pt.apply(null,arguments).parseZone()}function wm(e){return e}var et=pc.prototype;et.calendar=Jk;et.longDateFormat=nC;et.invalidDate=iC;et.ordinal=oC;et.preparse=wm;et.postformat=wm;et.relativeTime=uC;et.pastFuture=cC;et.set=jk;et.eras=NT;et.erasParse=BT;et.erasConvertYear=FT;et.erasAbbrRegex=HT;et.erasNameRegex=WT;et.erasNarrowRegex=KT;et.months=TC;et.monthsShort=MC;et.monthsParse=qC;et.monthsRegex=AC;et.monthsShortRegex=xC;et.week=$C;et.firstDayOfYear=LC;et.firstDayOfWeek=RC;et.weekdays=KC;et.weekdaysMin=QC;et.weekdaysShort=GC;et.weekdaysParse=ZC;et.weekdaysRegex=t2;et.weekdaysShortRegex=n2;et.weekdaysMinRegex=r2;et.isPM=a2;et.meridiem=s2;function Po(e,t,r,a){var l=Er(),s=cr().set(a,t);return l[r](s,e)}function Sm(e,t,r){if(Ar(e)&&(t=e,e=void 0),e=e||"",t!=null)return Po(e,t,r,"month");var a,l=[];for(a=0;a<12;a++)l[a]=Po(e,a,r,"month");return l}function Ic(e,t,r,a){typeof e=="boolean"?(Ar(t)&&(r=t,t=void 0),t=t||""):(t=e,r=t,e=!1,Ar(t)&&(r=t,t=void 0),t=t||"");var l=Er(),s=e?l._week.dow:0,u,d=[];if(r!=null)return Po(t,(r+s)%7,a,"day");for(u=0;u<7;u++)d[u]=Po(t,(u+s)%7,a,"day");return d}function hM(e,t){return Sm(e,t,"months")}function gM(e,t){return Sm(e,t,"monthsShort")}function mM(e,t,r){return Ic(e,t,r,"weekdays")}function vM(e,t,r){return Ic(e,t,r,"weekdaysShort")}function pM(e,t,r){return Ic(e,t,r,"weekdaysMin")}ei("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,r=Ye(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+r}});ae.lang=Nn("moment.lang is deprecated. Use moment.locale instead.",ei);ae.langData=Nn("moment.langData is deprecated. Use moment.localeData instead.",Er);var kr=Math.abs;function yM(){var e=this._data;return this._milliseconds=kr(this._milliseconds),this._days=kr(this._days),this._months=kr(this._months),e.milliseconds=kr(e.milliseconds),e.seconds=kr(e.seconds),e.minutes=kr(e.minutes),e.hours=kr(e.hours),e.months=kr(e.months),e.years=kr(e.years),this}function km(e,t,r,a){var l=Jn(t,r);return e._milliseconds+=a*l._milliseconds,e._days+=a*l._days,e._months+=a*l._months,e._bubble()}function _M(e,t){return km(this,e,t,1)}function bM(e,t){return km(this,e,t,-1)}function Ih(e){return e<0?Math.floor(e):Math.ceil(e)}function wM(){var e=this._milliseconds,t=this._days,r=this._months,a=this._data,l,s,u,d,f;return e>=0&&t>=0&&r>=0||e<=0&&t<=0&&r<=0||(e+=Ih(Wu(r)+t)*864e5,t=0,r=0),a.milliseconds=e%1e3,l=On(e/1e3),a.seconds=l%60,s=On(l/60),a.minutes=s%60,u=On(s/60),a.hours=u%24,t+=On(u/24),f=On(Cm(t)),r+=f,t-=Ih(Wu(f)),d=On(r/12),r%=12,a.days=t,a.months=r,a.years=d,this}function Cm(e){return e*4800/146097}function Wu(e){return e*146097/4800}function SM(e){if(!this.isValid())return NaN;var t,r,a=this._milliseconds;if(e=Bn(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+a/864e5,r=this._months+Cm(t),e){case"month":return r;case"quarter":return r/3;case"year":return r/12}else switch(t=this._days+Math.round(Wu(this._months)),e){case"week":return t/7+a/6048e5;case"day":return t+a/864e5;case"hour":return t*24+a/36e5;case"minute":return t*1440+a/6e4;case"second":return t*86400+a/1e3;case"millisecond":return Math.floor(t*864e5)+a;default:throw new Error("Unknown unit "+e)}}function kM(){return this.isValid()?this._milliseconds+this._days*864e5+this._months%12*2592e6+Ye(this._months/12)*31536e6:NaN}function Ir(e){return function(){return this.as(e)}}var CM=Ir("ms"),TM=Ir("s"),MM=Ir("m"),DM=Ir("h"),qM=Ir("d"),PM=Ir("w"),xM=Ir("M"),AM=Ir("Q"),EM=Ir("y");function IM(){return Jn(this)}function $M(e){return e=Bn(e),this.isValid()?this[e+"s"]():NaN}function ki(e){return function(){return this.isValid()?this._data[e]:NaN}}var OM=ki("milliseconds"),RM=ki("seconds"),LM=ki("minutes"),NM=ki("hours"),BM=ki("days"),FM=ki("months"),UM=ki("years");function zM(){return On(this.days()/7)}var Cr=Math.round,Qi={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function VM(e,t,r,a,l){return l.relativeTime(t||1,!!r,e,a)}function YM(e,t,r,a){var l=Jn(e).abs(),s=Cr(l.as("s")),u=Cr(l.as("m")),d=Cr(l.as("h")),f=Cr(l.as("d")),g=Cr(l.as("M")),v=Cr(l.as("w")),C=Cr(l.as("y")),M=s<=r.ss&&["s",s]||s0,M[4]=a,VM.apply(null,M)}function WM(e){return e===void 0?Cr:typeof e=="function"?(Cr=e,!0):!1}function HM(e,t){return Qi[e]===void 0?!1:t===void 0?Qi[e]:(Qi[e]=t,e==="s"&&(Qi.ss=t-1),!0)}function KM(e,t){if(!this.isValid())return this.localeData().invalidDate();var r=!1,a=Qi,l,s;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(r=e),typeof t=="object"&&(a=Object.assign({},Qi,t),t.s!=null&&t.ss==null&&(a.ss=t.s-1)),l=this.localeData(),s=YM(this,!r,a,l),r&&(s=l.pastFuture(+this,s)),l.postformat(s)}var xu=Math.abs;function Wi(e){return(e>0)-(e<0)||+e}function Ko(){if(!this.isValid())return this.localeData().invalidDate();var e=xu(this._milliseconds)/1e3,t=xu(this._days),r=xu(this._months),a,l,s,u,d=this.asSeconds(),f,g,v,C;return d?(a=On(e/60),l=On(a/60),e%=60,a%=60,s=On(r/12),r%=12,u=e?e.toFixed(3).replace(/\.?0+$/,""):"",f=d<0?"-":"",g=Wi(this._months)!==Wi(d)?"-":"",v=Wi(this._days)!==Wi(d)?"-":"",C=Wi(this._milliseconds)!==Wi(d)?"-":"",f+"P"+(s?g+s+"Y":"")+(r?g+r+"M":"")+(t?v+t+"D":"")+(l||a||e?"T":"")+(l?C+l+"H":"")+(a?C+a+"M":"")+(e?C+u+"S":"")):"P0D"}var je=Wo.prototype;je.isValid=B2;je.abs=yM;je.add=_M;je.subtract=bM;je.as=SM;je.asMilliseconds=CM;je.asSeconds=TM;je.asMinutes=MM;je.asHours=DM;je.asDays=qM;je.asWeeks=PM;je.asMonths=xM;je.asQuarters=AM;je.asYears=EM;je.valueOf=kM;je._bubble=wM;je.clone=IM;je.get=$M;je.milliseconds=OM;je.seconds=RM;je.minutes=LM;je.hours=NM;je.days=BM;je.weeks=zM;je.months=FM;je.years=UM;je.humanize=KM;je.toISOString=Ko;je.toString=Ko;je.toJSON=Ko;je.locale=fm;je.localeData=gm;je.toIsoString=Nn("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Ko);je.lang=hm;be("X",0,0,"unix");be("x",0,0,"valueOf");ce("x",Uo);ce("X",mC);ct("X",function(e,t,r){r._d=new Date(parseFloat(e)*1e3)});ct("x",function(e,t,r){r._d=new Date(Ye(e))});//! moment.js -ae.version="2.29.4";Gk(pt);ae.fn=Q;ae.min=O2;ae.max=R2;ae.now=L2;ae.utc=cr;ae.unix=dM;ae.months=hM;ae.isDate=Ja;ae.locale=ei;ae.invalid=Ro;ae.duration=Jn;ae.isMoment=Zn;ae.weekdays=mM;ae.parseZone=fM;ae.localeData=Er;ae.isDuration=so;ae.monthsShort=gM;ae.weekdaysMin=pM;ae.defineLocale=Tc;ae.updateLocale=f2;ae.locales=h2;ae.weekdaysShort=vM;ae.normalizeUnits=Bn;ae.relativeTimeRounding=WM;ae.relativeTimeThreshold=HM;ae.calendarFormat=sT;ae.prototype=Q;ae.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const GM=sn({name:"UserChat",props:["account-pubkey","peer-pubkeys","profiles","events"],components:{UserProfile:Za},data:function(){return{selectedPubkey:null,selectedProfile:null,dmEvents:[],newMessage:null,rawMessage:null,showRawMessage:!1}},watch:{events(e){this.dmEvents=((e==null?void 0:e.events)||[]).map(t=>{var l;const r=this.accountPubkey===t.pubkey,a={isJson:!1,message:t.content,sent:r,avatar:r?$q.config.staticPath+"/images/blank-avatar.webp":((l=this.selectedProfile)==null?void 0:l.picture)||$q.config.staticPath+"/images/blank-avatar.webp",dateFrom:ae(t.created_at*1e3).fromNow()};return isNaN(t.content)&&isJson(t.content)&&(a.isJson=!0,a.message=JSON.parse(t.content)),a}),setTimeout(()=>{document.getElementById("bottom-user-chat").scrollIntoView()},0)}},methods:{pubkeySelected(e){this.selectedPubkey=e,this.selectedProfile=this.profiles.find(t=>t.pubkey===e),this.$emit("chat-selected",e),setTimeout(()=>{document.getElementById("bottom-user-chat").scrollIntoView()},100)},async sendDirectMesage(){this.$emit("send-dm",{to:this.selectedPubkey,message:this.newMessage}),this.newMessage=null},pubkeyAlias(e){return Dg({dictionaries:[qg,Pg,xg],length:2,separator:" ",style:"capital",seed:e})},showMessageRawData:function(e){var t;this.rawMessage=JSON.stringify((t=this.dmEvents[e])==null?void 0:t.message,null,2),this.showRawMessage=!0}},created:async function(){}}),QM={style:{width:"100%"},class:"q-pa-md row justify-center"},jM={style:{width:"100%"}},ZM={key:0},JM={key:0},XM={key:0},eD=S("strong",null,"New order:",-1),tD=[eD],nD={key:1},rD=S("strong",null,"Reply sent for order: ",-1),iD=[rD],aD={key:2},lD=["textContent"],oD=["textContent","onClick"],sD={key:1},uD=["textContent"],cD=S("div",{id:"bottom-user-chat"},null,-1),dD={class:"row q-mt-lg"};function fD(e,t,r,a,l,s){const u=ti("user-profile");return O(),ie("div",null,[y(Jt,{bordered:"",class:"q-mb-md"},{default:b(()=>[y($e,{horizontal:""},{default:b(()=>[y($e,{class:"col-sm-2 col-md-4"},{default:b(()=>[(O(!0),ie(Nt,null,Wt(e.peerPubkeys,d=>(O(),oe(Vt,{key:d,clickable:"",onClick:f=>e.pubkeySelected(d),active:e.selectedPubkey===d,class:"cursor-pointer"},{default:b(()=>[y(u,{pubkey:d,profiles:e.profiles},null,8,["pubkey","profiles"])]),_:2},1032,["onClick","active"]))),128))]),_:1}),y(ut,{vertical:""}),y($e,{style:{width:"100%"}},{default:b(()=>[S("div",QM,[S("div",jM,[y(Hk,{style:{height:"500px"}},{default:b(()=>[e.dmEvents?(O(),ie("div",ZM,[(O(!0),ie(Nt,null,Wt(e.dmEvents,(d,f)=>{var g;return O(),oe(Yk,{key:f,name:d.sent?"me":((g=e.selectedProfile)==null?void 0:g.name)||e.pubkeyAlias(e.selectedPubkey),sent:d.sent,avatar:d.avatar,stamp:d.dateFrom},{default:b(()=>[d.isJson?(O(),ie("div",JM,[d.message.type===0?(O(),ie("div",XM,tD)):d.message.type===1?(O(),ie("div",nD,iD)):d.message.type===2?(O(),ie("div",aD,[d.message.paid?(O(),oe(Ln,{key:0,color:"green"},{default:b(()=>[De("Paid ")]),_:1})):Re("",!0),d.message.shipped?(O(),oe(Ln,{key:1,color:"green"},{default:b(()=>[De("Shipped ")]),_:1})):Re("",!0)])):Re("",!0),S("div",null,[S("span",{textContent:ge(d.message.message)},null,8,lD),y(Ln,{class:"gt-sm",color:"orange"},{default:b(()=>[S("span",{textContent:ge(d.message.id),onClick:v=>e.showOrderDetails(d.message.id),class:"cursor-pointer"},null,8,oD)]),_:2},1024)]),y(Ln,{onClick:v=>e.showMessageRawData(f),class:"cursor-pointer"},{default:b(()=>[De("...")]),_:2},1032,["onClick"])])):(O(),ie("div",sD,[S("span",{textContent:ge(d.message)},null,8,uD)]))]),_:2},1032,["name","sent","avatar","stamp"])}),128))])):Re("",!0),cD]),_:1})])])]),_:1})]),_:1}),y(ut),y($e,{horizontal:""},{default:b(()=>[y($e,{class:"col-sm-2 col-md-4"}),y($e,{style:{width:"100%"}},{default:b(()=>[y(Kk,{onSubmit:e.sendDirectMesage,class:"auto-width"},{default:b(()=>[y(It,{class:"rounded-pill",style:{width:"100%"},rounded:"",outlined:"",clearable:"",modelValue:e.newMessage,"onUpdate:modelValue":t[0]||(t[0]=d=>e.newMessage=d),modelModifiers:{trim:!0},label:"Write a message"},{append:b(()=>[y(Yt,{name:"send",class:"cursor-pointer",color:"secondary",onClick:e.sendDirectMesage},null,8,["onClick"])]),_:1},8,["modelValue"])]),_:1},8,["onSubmit"])]),_:1})]),_:1})]),_:1}),y(go,{modelValue:e.showRawMessage,"onUpdate:modelValue":t[2]||(t[2]=d=>e.showRawMessage=d),position:"top"},{default:b(()=>[y(Jt,{class:"q-pa-lg q-pt-xl",style:{width:"500px"}},{default:b(()=>[y(It,{filled:"",dense:"",type:"textarea",rows:"20",modelValue:e.rawMessage,"onUpdate:modelValue":t[1]||(t[1]=d=>e.rawMessage=d),modelModifiers:{trim:!0},label:"Raw Data"},null,8,["modelValue"]),S("div",dD,[Gn((O(),oe(ye,{flat:"",color:"grey",class:"q-ml-auto"},{default:b(()=>[De("Close")]),_:1})),[[Gi]])])]),_:1})]),_:1},8,["modelValue"])])}var hD=Cn(GM,[["render",fD]]);const gD=sn({name:"ShoppingCartList",props:["carts","profiles"],components:{UserProfile:Za},data:function(){return{}},computed:{},methods:{formatCurrency:function(e,t){return formatCurrency(e,t)},cartTotalFormatted(e){var r;if(!((r=e.products)!=null&&r.length))return"";const t=e.products.reduce((a,l)=>l.price+a,0);return formatCurrency(t,e.products[0].currency)},removeProduct:function(e,t){this.$emit("remove-from-cart",{stallId:e,productId:t})},removeCart:function(e){this.$emit("remove-cart",e)},quantityChanged:function(e){this.$emit("add-to-cart",e)},proceedToCheckout:function(e){this.$emit("checkout-cart",e)}},created(){}}),mD=S("strong",null,"No products in cart!",-1),vD=["src"],pD=["src"],yD={class:"text-caption text-grey ellipsis-2-lines"},_D={class:"q-ma-md"};function bD(e,t,r,a,l,s){var d;const u=ti("user-profile");return O(),ie("div",null,[(d=e.carts)!=null&&d.length?Re("",!0):(O(),oe(Jt,{key:0,bordered:"",class:"q-mb-md"},{default:b(()=>[y($e,null,{default:b(()=>[mD]),_:1})]),_:1})),(O(!0),ie(Nt,null,Wt(e.carts,f=>(O(),ie("div",{key:f.id},[y(Jt,{bordered:"",class:"q-mb-md"},{default:b(()=>[y(Vt,null,{default:b(()=>{var g;return[y(u,{pubkey:f.merchant,profiles:e.profiles,description:(g=f.products[0])==null?void 0:g.stallName},null,8,["pubkey","profiles","description"]),y(Ie,{side:""},{default:b(()=>[S("div",null,[y(ye,{onClick:v=>e.removeCart(f.id),flat:"",color:"pink"},{default:b(()=>[De(" Clear Cart ")]),_:2},1032,["onClick"])])]),_:2},1024)]}),_:2},1024),y(ut),y($e,{horizontal:""},{default:b(()=>[y($e,{class:"col-12"},{default:b(()=>[y(Mr,{class:"q-mt-md"},{default:b(()=>[(O(!0),ie(Nt,null,Wt(f.products,g=>(O(),oe(Vt,{key:g.id},{default:b(()=>[y(Ie,{avatar:""},{default:b(()=>[y(Xr,null,{default:b(()=>[g.images[0]||g.image?(O(),ie("img",{key:0,src:g.images[0]||g.image},null,8,vD)):(O(),ie("img",{key:1,src:e.$q.config.staticPath+"/images/placeholder.png"},null,8,pD))]),_:2},1024)]),_:2},1024),y(Ie,{class:"q-mt-sm"},{default:b(()=>[y(Ke,null,{default:b(()=>[De(ge(g.name),1)]),_:2},1024),y(Ke,{class:"gt-sm"},{default:b(()=>[S("div",yD,[S("p",null,ge(g.description),1)])]),_:2},1024)]),_:2},1024),y(Ie,{class:"q-mt-sm gt-sm"},{default:b(()=>[y(Ke,null,{default:b(()=>[S("strong",null,ge(e.formatCurrency(g.price,g.currency)),1)]),_:2},1024),y(Ke)]),_:2},1024),y(Ie,{class:"q-ma-sm"},{default:b(()=>[y(It,{modelValue:g.orderedQuantity,"onUpdate:modelValue":v=>g.orderedQuantity=v,modelModifiers:{number:!0},onChange:v=>e.quantityChanged(g),type:"number",rounded:"",outlined:"",min:"1",max:g.quantity},null,8,["modelValue","onUpdate:modelValue","onChange","max"])]),_:2},1024),y(Ie,null,{default:b(()=>[y(Ke,null,{default:b(()=>[S("strong",null,ge(e.formatCurrency(g.price*g.orderedQuantity,g.currency)),1)]),_:2},1024)]),_:2},1024),y(Ie,{side:""},{default:b(()=>[S("div",null,[y(ye,{flat:"",dense:"",round:"",icon:"delete",onClick:v=>e.removeProduct(g.stall_id,g.id)},null,8,["onClick"])])]),_:2},1024)]),_:2},1024))),128))]),_:2},1024)]),_:2},1024)]),_:2},1024),y(ut),y(wi,{align:"right"},{default:b(()=>[De(" Total: "),S("strong",_D,ge(e.cartTotalFormatted(f)),1),y(ye,{onClick:g=>e.proceedToCheckout(f),flat:"",color:"primary"},{default:b(()=>[De(" Proceed to Checkout ")]),_:2},1032,["onClick"])]),_:2},1024)]),_:2},1024)]))),128))])}var wD=Cn(gD,[["render",bD]]);const SD=sn({name:"ShoppingCartCheckout",props:["cart","stall","customer-pubkey","profiles"],components:{UserProfile:Za},data:function(){return{orderConfirmed:!1,paymentMethod:"ln",shippingZone:null,contactData:{email:null,npub:null,address:null,message:null},paymentOptions:[{label:"Lightning Network",value:"ln"},{label:"BTC Onchain",value:"btc"},{label:"Cashu",value:"cashu"}]}},computed:{cartTotal(){var e;return(e=this.cart.products)!=null&&e.length?this.cart.products.reduce((t,r)=>r.price+t,0):0},cartTotalWithShipping(){return this.shippingZone?this.cartTotal+this.shippingZone.cost:this.cartTotal},shippingZoneLabel(){if(!this.shippingZone)return"Shipping Zone";let e=this.shippingZone.name||this.shippingZone.id||"Shipping Zone";return e=e.substring(0,10),e.length<10?e:e+"..."}},methods:{formatCurrency:function(e,t){return formatCurrency(e,t)},selectShippingZone:function(e){this.shippingZone=e},confirmOrder:function(){if(!this.shippingZone){this.$q.notify({timeout:5e3,type:"warning",message:"Please select a shipping zone!"});return}this.orderConfirmed=!0},async placeOrder(){if(!this.shippingZone){this.$q.notify({timeout:5e3,type:"warning",message:"Please select a shipping zone!"});return}if(!this.customerPubkey){this.$emit("login-required");return}const e={address:this.contactData.address,message:this.contactData.message,contact:{nostr:this.contactData.npub,email:this.contactData.email},items:Array.from(this.cart.products,a=>({product_id:a.id,quantity:a.orderedQuantity})),shipping_id:this.shippingZone.id,type:0},t=Math.floor(Date.now()/1e3);e.id=await hash([this.customerPubkey,t,JSON.stringify(e)].join(":"));const r={...await NostrTools.getBlankEvent(),kind:4,created_at:t,tags:[["p",this.stall.pubkey]],pubkey:this.customerPubkey};this.$emit("place-order",{event:r,order:e,cartId:this.cart.id})},goToShoppingCart:function(){this.$emit("change-page","shopping-cart-list")},merchantProfile(e){var t;return(t=this.profiles)==null?void 0:t.find(r=>r.pubkey===e)}},created(){var e;((e=this.stall.shipping)==null?void 0:e.length)===1&&(this.shippingZone=this.stall.shipping[0])}}),kD={class:"row q-mt-md q-ml-md q-pr-md"},CD=S("div",{class:"col-xs-12 col-sm-12 col-md-2 q-mt-md"},[S("strong",null,"Message:")],-1),TD={class:"col-xs-12 col-sm-12 col-md-10"},MD={class:"row q-mt-md q-ml-md q-pr-md"},DD=S("div",{class:"col-xs-12 col-sm-12 col-md-2 q-mt-md"},[S("strong",null,"Address:")],-1),qD={class:"col-xs-12 col-sm-12 col-md-10"},PD={class:"row q-mt-md q-ml-md q-pr-md"},xD=S("div",{class:"col-xs-12 col-sm-12 col-md-2 q-mt-md"},[S("strong",null,"Email:")],-1),AD={class:"col-xs-12 col-sm-12 col-md-10"},ED={class:"row q-mt-md q-ml-md q-pr-md"},ID=S("div",{class:"col-xs-12 col-sm-12 col-md-2 q-mt-md"},[S("strong",null,"Npub:")],-1),$D={class:"col-xs-12 col-sm-12 col-md-10"},OD={class:"row q-mt-md"},RD=S("div",{class:"col-xs-12 col-sm-12 col-md-4"},[S("strong",null,"Subtotal:")],-1),LD={class:"col-xs-12 col-sm-12 col-md-4"},ND=S("div",{class:"col-xs-12 col-sm-12 col-md-4"},null,-1),BD={class:"row q-mt-md"},FD=S("div",{class:"col-xs-12 col-sm-12 col-md-4"},[S("strong",null,"Shipping:")],-1),UD={class:"col-xs-12 col-sm-12 col-md-4"},zD={key:0},VD={class:"col-xs-12 col-sm-12 col-md-4"},YD=["textContent"],WD=["textContent"],HD={class:"row q-mt-md"},KD=S("div",{class:"col-xs-12 col-sm-12 col-md-4"},[S("strong",null,"Total:")],-1),GD={class:"col-xs-12 col-sm-12 col-md-4"},QD=S("div",{class:"col-xs-12 col-sm-12 col-md-4"},null,-1),jD=S("strong",null,"Payment Method",-1),ZD={key:0},JD={key:1};function XD(e,t,r,a,l,s){const u=ti("user-profile");return O(),ie("div",null,[e.cart&&e.stall?(O(),oe(Jt,{key:0,bordered:"",class:"q-mb-md"},{default:b(()=>[y(Vt,null,{default:b(()=>{var d;return[y(u,{pubkey:e.cart.merchant,profiles:e.profiles,description:(d=e.cart.products[0])==null?void 0:d.stallName},null,8,["pubkey","profiles","description"]),y(Ie,{side:""})]}),_:1}),y(ut),e.orderConfirmed?(O(),oe($e,{key:0},{default:b(()=>[S("div",kD,[CD,S("div",TD,[y(It,{modelValue:e.contactData.message,"onUpdate:modelValue":t[0]||(t[0]=d=>e.contactData.message=d),modelModifiers:{trim:!0},outlined:"",type:"textarea",rows:"3",label:"Message (optional)",hint:"Message merchant about additional order needs"},null,8,["modelValue"])])]),S("div",MD,[DD,S("div",qD,[y(It,{modelValue:e.contactData.address,"onUpdate:modelValue":t[1]||(t[1]=d=>e.contactData.address=d),modelModifiers:{trim:!0},outlined:"",type:"textarea",rows:"3",label:"Address (optional)",hint:"Must provide for physical shipping"},null,8,["modelValue"])])]),S("div",PD,[xD,S("div",AD,[y(It,{modelValue:e.contactData.email,"onUpdate:modelValue":t[2]||(t[2]=d=>e.contactData.email=d),modelModifiers:{trim:!0},type:"email",outlined:"",label:"Email (optional)",hint:"Merchant may not use email"},null,8,["modelValue"])])]),S("div",ED,[ID,S("div",$D,[y(It,{modelValue:e.contactData.npub,"onUpdate:modelValue":t[3]||(t[3]=d=>e.contactData.npub=d),modelModifiers:{trim:!0},outlined:"",label:"Alternative Npub (optional)",hint:"Use a different Npub to communicate with the merchant"},null,8,["modelValue"])])])]),_:1})):(O(),oe($e,{key:1,horizontal:""},{default:b(()=>[y($e,{class:"col-7"},{default:b(()=>[S("div",OD,[RD,S("div",LD,[S("strong",null,ge(e.formatCurrency(e.cartTotal,e.stall.currency)),1)]),ND]),S("div",BD,[FD,S("div",UD,[e.shippingZone?(O(),ie("strong",zD,ge(e.formatCurrency(e.shippingZone.cost,e.stall.currency)),1)):Re("",!0)]),S("div",VD,[y(lg,{unelevated:"",color:"secondary",rounded:"",label:e.shippingZoneLabel},{default:b(()=>[(O(!0),ie(Nt,null,Wt(e.stall.shipping,d=>Gn((O(),oe(Vt,{onClick:f=>e.selectShippingZone(d),key:d.id,clickable:""},{default:b(()=>[y(Ie,null,{default:b(()=>[y(Ke,null,{default:b(()=>[S("span",{textContent:ge(d.name)},null,8,YD)]),_:2},1024),y(Ke,{caption:""},{default:b(()=>{var f;return[S("span",{textContent:ge((f=d.countries)==null?void 0:f.join(", "))},null,8,WD)]}),_:2},1024)]),_:2},1024)]),_:2},1032,["onClick"])),[[Gi]])),128))]),_:1},8,["label"])])]),y(ut,{class:"q-mt-sm"}),S("div",HD,[KD,S("div",GD,[S("strong",null,ge(e.formatCurrency(e.cartTotalWithShipping,e.stall.currency)),1)]),QD])]),_:1}),y(ut,{vertical:""}),y($e,null,{default:b(()=>[jD,y(nw,{modelValue:e.paymentMethod,"onUpdate:modelValue":t[4]||(t[4]=d=>e.paymentMethod=d),options:e.paymentOptions,color:"green",disable:""},null,8,["modelValue","options"])]),_:1})]),_:1})),y(ut),y(wi,{align:"right"},{default:b(()=>[e.orderConfirmed?(O(),ie("div",ZD,[y(ye,{onClick:t[5]||(t[5]=d=>e.orderConfirmed=!1),flat:"",color:"grey"},{default:b(()=>[De(" Back ")]),_:1}),y(ye,{onClick:t[6]||(t[6]=d=>e.placeOrder()),flat:"",color:"primary"},{default:b(()=>[De(" Place Order ")]),_:1})])):(O(),ie("div",JD,[y(ye,{onClick:e.goToShoppingCart,flat:"",color:"grey"},{default:b(()=>[De(" Back ")]),_:1},8,["onClick"]),y(ye,{onClick:e.confirmOrder,flat:"",color:"primary"},{default:b(()=>[De(" Confirm ")]),_:1},8,["onClick"])]))]),_:1})]),_:1})):Re("",!0)])}var eq=Cn(SD,[["render",XD]]);const{passive:mi}=ta;var tq=Je({name:"QInfiniteScroll",props:{offset:{type:Number,default:500},debounce:{type:[String,Number],default:100},scrollTarget:{default:void 0},initialIndex:Number,disable:Boolean,reverse:Boolean},emits:["load"],setup(e,{slots:t,emit:r}){const a=se(!1),l=se(!0),s=se(null),u=se(null);let d=e.initialIndex||0,f,g;const v=$(()=>"q-infinite-scroll__loading"+(a.value===!0?"":" invisible"));function C(){if(e.disable===!0||a.value===!0||l.value===!1)return;const V=Xl(f),H=gu(f),pe=oh(f);e.reverse===!1?Math.round(H+pe+e.offset)>=Math.round(V)&&M():Math.round(H)<=e.offset&&M()}function M(){if(e.disable===!0||a.value===!0||l.value===!1)return;d++,a.value=!0;const V=Xl(f);r("load",d,H=>{l.value===!0&&(a.value=!1,Sn(()=>{if(e.reverse===!0){const pe=Xl(f),_e=gu(f),xe=pe-V;La(f,_e+xe)}H===!0?I():s.value&&s.value.closest("body")&&g()}))})}function _(){d=0}function x(){l.value===!1&&(l.value=!0,f.addEventListener("scroll",g,mi)),C()}function I(){l.value===!0&&(l.value=!1,a.value=!1,f.removeEventListener("scroll",g,mi),g!==void 0&&g.cancel!==void 0&&g.cancel())}function L(){if(f&&l.value===!0&&f.removeEventListener("scroll",g,mi),f=xo(s.value,e.scrollTarget),l.value===!0){if(f.addEventListener("scroll",g,mi),e.reverse===!0){const V=Xl(f),H=oh(f);La(f,V-H)}C()}}function F(V){d=V}function Y(V){V=parseInt(V,10);const H=g;g=V<=0?C:ec(C,isNaN(V)===!0?100:V),f&&l.value===!0&&(H!==void 0&&f.removeEventListener("scroll",H,mi),f.addEventListener("scroll",g,mi))}function D(V){if(A.value===!0){if(u.value===null){V!==!0&&Sn(()=>{D(!0)});return}const H=`${a.value===!0?"un":""}pauseAnimations`;Array.from(u.value.getElementsByTagName("svg")).forEach(pe=>{pe[H]()})}}const A=$(()=>e.disable!==!0&&l.value===!0);Ve([a,A],()=>{D()}),Ve(()=>e.disable,V=>{V===!0?I():x()}),Ve(()=>e.reverse,()=>{a.value===!1&&l.value===!0&&C()}),Ve(()=>e.scrollTarget,L),Ve(()=>e.debounce,Y);let N=!1;sa(()=>{N!==!1&&f&&La(f,N)}),oa(()=>{N=f?gu(f):!1}),Ht(()=>{l.value===!0&&f.removeEventListener("scroll",g,mi)}),ni(()=>{Y(e.debounce),L(),a.value===!1&&D()});const J=Dt();return Object.assign(J.proxy,{poll:()=>{g!==void 0&&g()},trigger:M,stop:I,reset:_,resume:x,setIndex:F}),()=>{const V=Nh(t.default,[]);return A.value===!0&&V[e.reverse===!1?"push":"unshift"](E("div",{ref:u,class:v.value},Mt(t.loading))),E("div",{class:"q-infinite-scroll",ref:s},V)}}}),Hu={exports:{}};/** +`+new Error().stack),r=!1}return t.apply(this,arguments)},t)}var xh={};function Lg(e,t){ae.deprecationHandler!=null&&ae.deprecationHandler(e,t),xh[e]||(Rg(t),xh[e]=!0)}ae.suppressDeprecationWarnings=!1;ae.deprecationHandler=null;function dr(e){return typeof Function!="undefined"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function jk(e){var t,r;for(r in e)Xe(e,r)&&(t=e[r],dr(t)?this[r]=t:this["_"+r]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function Fu(e,t){var r=Zr({},e),a;for(a in t)Xe(t,a)&&(bi(e[a])&&bi(t[a])?(r[a]={},Zr(r[a],e[a]),Zr(r[a],t[a])):t[a]!=null?r[a]=t[a]:delete r[a]);for(a in e)Xe(e,a)&&!Xe(t,a)&&bi(e[a])&&(r[a]=Zr({},r[a]));return r}function pc(e){e!=null&&this.set(e)}var Uu;Object.keys?Uu=Object.keys:Uu=function(e){var t,r=[];for(t in e)Xe(e,t)&&r.push(t);return r};var Zk={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function Jk(e,t,r){var a=this._calendar[e]||this._calendar.sameElse;return dr(a)?a.call(t,r):a}function lr(e,t,r){var a=""+Math.abs(e),l=t-a.length,s=e>=0;return(s?r?"+":"":"-")+Math.pow(10,Math.max(0,l)).toString().substr(1)+a}var yc=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,io=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,qu={},Ji={};function be(e,t,r,a){var l=a;typeof a=="string"&&(l=function(){return this[a]()}),e&&(Ji[e]=l),t&&(Ji[t[0]]=function(){return lr(l.apply(this,arguments),t[1],t[2])}),r&&(Ji[r]=function(){return this.localeData().ordinal(l.apply(this,arguments),e)})}function Xk(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function eC(e){var t=e.match(yc),r,a;for(r=0,a=t.length;r=0&&io.test(e);)e=e.replace(io,a),io.lastIndex=0,r-=1;return e}var tC={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function nC(e){var t=this._longDateFormat[e],r=this._longDateFormat[e.toUpperCase()];return t||!r?t:(this._longDateFormat[e]=r.match(yc).map(function(a){return a==="MMMM"||a==="MM"||a==="DD"||a==="dddd"?a.slice(1):a}).join(""),this._longDateFormat[e])}var rC="Invalid date";function iC(){return this._invalidDate}var aC="%d",lC=/\d{1,2}/;function oC(e){return this._ordinal.replace("%d",e)}var sC={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function uC(e,t,r,a){var l=this._relativeTime[r];return dr(l)?l(e,t,r,a):l.replace(/%d/i,e)}function cC(e,t){var r=this._relativeTime[e>0?"future":"past"];return dr(r)?r(t):r.replace(/%s/i,t)}var Ba={};function en(e,t){var r=e.toLowerCase();Ba[r]=Ba[r+"s"]=Ba[t]=e}function Bn(e){return typeof e=="string"?Ba[e]||Ba[e.toLowerCase()]:void 0}function _c(e){var t={},r,a;for(a in e)Xe(e,a)&&(r=Bn(a),r&&(t[r]=e[a]));return t}var Bg={};function tn(e,t){Bg[e]=t}function dC(e){var t=[],r;for(r in e)Xe(e,r)&&t.push({unit:r,priority:Bg[r]});return t.sort(function(a,l){return a.priority-l.priority}),t}function Lo(e){return e%4===0&&e%100!==0||e%400===0}function Rn(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function Ye(e){var t=+e,r=0;return t!==0&&isFinite(t)&&(r=Rn(t)),r}function ua(e,t){return function(r){return r!=null?(Fg(this,e,r),ae.updateOffset(this,t),this):Co(this,e)}}function Co(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function Fg(e,t,r){e.isValid()&&!isNaN(r)&&(t==="FullYear"&&Lo(e.year())&&e.month()===1&&e.date()===29?(r=Ye(r),e._d["set"+(e._isUTC?"UTC":"")+t](r,e.month(),Vo(r,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](r))}function fC(e){return e=Bn(e),dr(this[e])?this[e]():this}function hC(e,t){if(typeof e=="object"){e=_c(e);var r=dC(e),a,l=r.length;for(a=0;a68?1900:2e3)};var jg=ua("FullYear",!0);function EC(){return Lo(this.year())}function IC(e,t,r,a,l,s,u){var d;return e<100&&e>=0?(d=new Date(e+400,t,r,a,l,s,u),isFinite(d.getFullYear())&&d.setFullYear(e)):d=new Date(e,t,r,a,l,s,u),d}function Ya(e){var t,r;return e<100&&e>=0?(r=Array.prototype.slice.call(arguments),r[0]=e+400,t=new Date(Date.UTC.apply(null,r)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Mo(e,t,r){var a=7+t-r,l=(7+Ya(e,0,a).getUTCDay()-t)%7;return-l+a-1}function Zg(e,t,r,a,l){var s=(7+r-a)%7,u=Mo(e,a,l),d=1+7*(t-1)+s+u,f,g;return d<=0?(f=e-1,g=Fa(f)+d):d>Fa(e)?(f=e+1,g=d-Fa(e)):(f=e,g=d),{year:f,dayOfYear:g}}function Wa(e,t,r){var a=Mo(e.year(),t,r),l=Math.floor((e.dayOfYear()-a-1)/7)+1,s,u;return l<1?(u=e.year()-1,s=l+xr(u,t,r)):l>xr(e.year(),t,r)?(s=l-xr(e.year(),t,r),u=e.year()+1):(u=e.year(),s=l),{week:s,year:u}}function xr(e,t,r){var a=Mo(e,t,r),l=Mo(e+1,t,r);return(Fa(e)-a+l)/7}be("w",["ww",2],"wo","week");be("W",["WW",2],"Wo","isoWeek");en("week","w");en("isoWeek","W");tn("week",5);tn("isoWeek",5);ce("w",yt);ce("ww",yt,Dn);ce("W",yt);ce("WW",yt,Dn);tl(["w","ww","W","WW"],function(e,t,r,a){t[a.substr(0,1)]=Ye(e)});function $C(e){return Wa(e,this._week.dow,this._week.doy).week}var OC={dow:0,doy:6};function RC(){return this._week.dow}function LC(){return this._week.doy}function NC(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function BC(e){var t=Wa(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}be("d",0,"do","day");be("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});be("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});be("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});be("e",0,0,"weekday");be("E",0,0,"isoWeekday");en("day","d");en("weekday","e");en("isoWeekday","E");tn("day",11);tn("weekday",11);tn("isoWeekday",11);ce("d",yt);ce("e",yt);ce("E",yt);ce("dd",function(e,t){return t.weekdaysMinRegex(e)});ce("ddd",function(e,t){return t.weekdaysShortRegex(e)});ce("dddd",function(e,t){return t.weekdaysRegex(e)});tl(["dd","ddd","dddd"],function(e,t,r,a){var l=r._locale.weekdaysParse(e,a,r._strict);l!=null?t.d=l:Re(r).invalidWeekday=e});tl(["d","e","E"],function(e,t,r,a){t[a]=Ye(e)});function FC(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function UC(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Sc(e,t){return e.slice(t,7).concat(e.slice(0,t))}var zC="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Jg="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),VC="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),YC=el,WC=el,HC=el;function KC(e,t){var r=jn(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?Sc(r,this._week.dow):e?r[e.day()]:r}function GC(e){return e===!0?Sc(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function QC(e){return e===!0?Sc(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function jC(e,t,r){var a,l,s,u=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],a=0;a<7;++a)s=cr([2e3,1]).day(a),this._minWeekdaysParse[a]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[a]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[a]=this.weekdays(s,"").toLocaleLowerCase();return r?t==="dddd"?(l=Et.call(this._weekdaysParse,u),l!==-1?l:null):t==="ddd"?(l=Et.call(this._shortWeekdaysParse,u),l!==-1?l:null):(l=Et.call(this._minWeekdaysParse,u),l!==-1?l:null):t==="dddd"?(l=Et.call(this._weekdaysParse,u),l!==-1||(l=Et.call(this._shortWeekdaysParse,u),l!==-1)?l:(l=Et.call(this._minWeekdaysParse,u),l!==-1?l:null)):t==="ddd"?(l=Et.call(this._shortWeekdaysParse,u),l!==-1||(l=Et.call(this._weekdaysParse,u),l!==-1)?l:(l=Et.call(this._minWeekdaysParse,u),l!==-1?l:null)):(l=Et.call(this._minWeekdaysParse,u),l!==-1||(l=Et.call(this._weekdaysParse,u),l!==-1)?l:(l=Et.call(this._shortWeekdaysParse,u),l!==-1?l:null))}function ZC(e,t,r){var a,l,s;if(this._weekdaysParseExact)return jC.call(this,e,t,r);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),a=0;a<7;a++){if(l=cr([2e3,1]).day(a),r&&!this._fullWeekdaysParse[a]&&(this._fullWeekdaysParse[a]=new RegExp("^"+this.weekdays(l,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[a]=new RegExp("^"+this.weekdaysShort(l,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[a]=new RegExp("^"+this.weekdaysMin(l,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[a]||(s="^"+this.weekdays(l,"")+"|^"+this.weekdaysShort(l,"")+"|^"+this.weekdaysMin(l,""),this._weekdaysParse[a]=new RegExp(s.replace(".",""),"i")),r&&t==="dddd"&&this._fullWeekdaysParse[a].test(e))return a;if(r&&t==="ddd"&&this._shortWeekdaysParse[a].test(e))return a;if(r&&t==="dd"&&this._minWeekdaysParse[a].test(e))return a;if(!r&&this._weekdaysParse[a].test(e))return a}}function JC(e){if(!this.isValid())return e!=null?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return e!=null?(e=FC(e,this.localeData()),this.add(e-t,"d")):t}function XC(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function e2(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=UC(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function t2(e){return this._weekdaysParseExact?(Xe(this,"_weekdaysRegex")||kc.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(Xe(this,"_weekdaysRegex")||(this._weekdaysRegex=YC),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function n2(e){return this._weekdaysParseExact?(Xe(this,"_weekdaysRegex")||kc.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(Xe(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=WC),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function r2(e){return this._weekdaysParseExact?(Xe(this,"_weekdaysRegex")||kc.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(Xe(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=HC),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function kc(){function e(v,C){return C.length-v.length}var t=[],r=[],a=[],l=[],s,u,d,f,g;for(s=0;s<7;s++)u=cr([2e3,1]).day(s),d=kn(this.weekdaysMin(u,"")),f=kn(this.weekdaysShort(u,"")),g=kn(this.weekdays(u,"")),t.push(d),r.push(f),a.push(g),l.push(d),l.push(f),l.push(g);t.sort(e),r.sort(e),a.sort(e),l.sort(e),this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function Cc(){return this.hours()%12||12}function i2(){return this.hours()||24}be("H",["HH",2],0,"hour");be("h",["hh",2],0,Cc);be("k",["kk",2],0,i2);be("hmm",0,0,function(){return""+Cc.apply(this)+lr(this.minutes(),2)});be("hmmss",0,0,function(){return""+Cc.apply(this)+lr(this.minutes(),2)+lr(this.seconds(),2)});be("Hmm",0,0,function(){return""+this.hours()+lr(this.minutes(),2)});be("Hmmss",0,0,function(){return""+this.hours()+lr(this.minutes(),2)+lr(this.seconds(),2)});function Xg(e,t){be(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}Xg("a",!0);Xg("A",!1);en("hour","h");tn("hour",13);function em(e,t){return t._meridiemParse}ce("a",em);ce("A",em);ce("H",yt);ce("h",yt);ce("k",yt);ce("HH",yt,Dn);ce("hh",yt,Dn);ce("kk",yt,Dn);ce("hmm",Vg);ce("hmmss",Yg);ce("Hmm",Vg);ce("Hmmss",Yg);ct(["H","HH"],Lt);ct(["k","kk"],function(e,t,r){var a=Ye(e);t[Lt]=a===24?0:a});ct(["a","A"],function(e,t,r){r._isPm=r._locale.isPM(e),r._meridiem=e});ct(["h","hh"],function(e,t,r){t[Lt]=Ye(e),Re(r).bigHour=!0});ct("hmm",function(e,t,r){var a=e.length-2;t[Lt]=Ye(e.substr(0,a)),t[Qn]=Ye(e.substr(a)),Re(r).bigHour=!0});ct("hmmss",function(e,t,r){var a=e.length-4,l=e.length-2;t[Lt]=Ye(e.substr(0,a)),t[Qn]=Ye(e.substr(a,2)),t[qr]=Ye(e.substr(l)),Re(r).bigHour=!0});ct("Hmm",function(e,t,r){var a=e.length-2;t[Lt]=Ye(e.substr(0,a)),t[Qn]=Ye(e.substr(a))});ct("Hmmss",function(e,t,r){var a=e.length-4,l=e.length-2;t[Lt]=Ye(e.substr(0,a)),t[Qn]=Ye(e.substr(a,2)),t[qr]=Ye(e.substr(l))});function a2(e){return(e+"").toLowerCase().charAt(0)==="p"}var l2=/[ap]\.?m?\.?/i,o2=ua("Hours",!0);function s2(e,t,r){return e>11?r?"pm":"PM":r?"am":"AM"}var tm={calendar:Zk,longDateFormat:tC,invalidDate:rC,ordinal:aC,dayOfMonthOrdinalParse:lC,relativeTime:sC,months:SC,monthsShort:Wg,week:OC,weekdays:zC,weekdaysMin:VC,weekdaysShort:Jg,meridiemParse:l2},bt={},Aa={},Ha;function u2(e,t){var r,a=Math.min(e.length,t.length);for(r=0;r0;){if(l=Yo(s.slice(0,r).join("-")),l)return l;if(a&&a.length>=r&&u2(s,a)>=r-1)break;r--}t++}return Ha}function d2(e){return e.match("^[^/\\\\]*$")!=null}function Yo(e){var t=null,r;if(bt[e]===void 0&&typeof module!="undefined"&&module&&module.exports&&d2(e))try{t=Ha._abbr,r=require,r("./locale/"+e),ei(t)}catch{bt[e]=null}return bt[e]}function ei(e,t){var r;return e&&(mn(t)?r=Er(e):r=Tc(e,t),r?Ha=r:typeof console!="undefined"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Ha._abbr}function Tc(e,t){if(t!==null){var r,a=tm;if(t.abbr=e,bt[e]!=null)Lg("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),a=bt[e]._config;else if(t.parentLocale!=null)if(bt[t.parentLocale]!=null)a=bt[t.parentLocale]._config;else if(r=Yo(t.parentLocale),r!=null)a=r._config;else return Aa[t.parentLocale]||(Aa[t.parentLocale]=[]),Aa[t.parentLocale].push({name:e,config:t}),null;return bt[e]=new pc(Fu(a,t)),Aa[e]&&Aa[e].forEach(function(l){Tc(l.name,l.config)}),ei(e),bt[e]}else return delete bt[e],null}function f2(e,t){if(t!=null){var r,a,l=tm;bt[e]!=null&&bt[e].parentLocale!=null?bt[e].set(Fu(bt[e]._config,t)):(a=Yo(e),a!=null&&(l=a._config),t=Fu(l,t),a==null&&(t.abbr=e),r=new pc(t),r.parentLocale=bt[e],bt[e]=r),ei(e)}else bt[e]!=null&&(bt[e].parentLocale!=null?(bt[e]=bt[e].parentLocale,e===ei()&&ei(e)):bt[e]!=null&&delete bt[e]);return bt[e]}function Er(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Ha;if(!jn(e)){if(t=Yo(e),t)return t;e=[e]}return c2(e)}function h2(){return Uu(bt)}function Mc(e){var t,r=e._a;return r&&Re(e).overflow===-2&&(t=r[Dr]<0||r[Dr]>11?Dr:r[ar]<1||r[ar]>Vo(r[Xt],r[Dr])?ar:r[Lt]<0||r[Lt]>24||r[Lt]===24&&(r[Qn]!==0||r[qr]!==0||r[pi]!==0)?Lt:r[Qn]<0||r[Qn]>59?Qn:r[qr]<0||r[qr]>59?qr:r[pi]<0||r[pi]>999?pi:-1,Re(e)._overflowDayOfYear&&(tar)&&(t=ar),Re(e)._overflowWeeks&&t===-1&&(t=_C),Re(e)._overflowWeekday&&t===-1&&(t=bC),Re(e).overflow=t),e}var g2=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,m2=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,v2=/Z|[+-]\d\d(?::?\d\d)?/,ao=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Pu=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],p2=/^\/?Date\((-?\d+)/i,y2=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,_2={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function nm(e){var t,r,a=e._i,l=g2.exec(a)||m2.exec(a),s,u,d,f,g=ao.length,v=Pu.length;if(l){for(Re(e).iso=!0,t=0,r=g;tFa(u)||e._dayOfYear===0)&&(Re(e)._overflowDayOfYear=!0),r=Ya(u,0,e._dayOfYear),e._a[Dr]=r.getUTCMonth(),e._a[ar]=r.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=a[t]=l[t];for(;t<7;t++)e._a[t]=a[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[Lt]===24&&e._a[Qn]===0&&e._a[qr]===0&&e._a[pi]===0&&(e._nextDay=!0,e._a[Lt]=0),e._d=(e._useUTC?Ya:IC).apply(null,a),s=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Lt]=24),e._w&&typeof e._w.d!="undefined"&&e._w.d!==s&&(Re(e).weekdayMismatch=!0)}}function D2(e){var t,r,a,l,s,u,d,f,g;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(s=1,u=4,r=Ki(t.GG,e._a[Xt],Wa(pt(),1,4).year),a=Ki(t.W,1),l=Ki(t.E,1),(l<1||l>7)&&(f=!0)):(s=e._locale._week.dow,u=e._locale._week.doy,g=Wa(pt(),s,u),r=Ki(t.gg,e._a[Xt],g.year),a=Ki(t.w,g.week),t.d!=null?(l=t.d,(l<0||l>6)&&(f=!0)):t.e!=null?(l=t.e+s,(t.e<0||t.e>6)&&(f=!0)):l=s),a<1||a>xr(r,s,u)?Re(e)._overflowWeeks=!0:f!=null?Re(e)._overflowWeekday=!0:(d=Zg(r,a,l,s,u),e._a[Xt]=d.year,e._dayOfYear=d.dayOfYear)}ae.ISO_8601=function(){};ae.RFC_2822=function(){};function qc(e){if(e._f===ae.ISO_8601){nm(e);return}if(e._f===ae.RFC_2822){rm(e);return}e._a=[],Re(e).empty=!0;var t=""+e._i,r,a,l,s,u,d=t.length,f=0,g,v;for(l=Ng(e._f,e._locale).match(yc)||[],v=l.length,r=0;r0&&Re(e).unusedInput.push(u),t=t.slice(t.indexOf(a)+a.length),f+=a.length),Ji[s]?(a?Re(e).empty=!1:Re(e).unusedTokens.push(s),yC(s,a,e)):e._strict&&!a&&Re(e).unusedTokens.push(s);Re(e).charsLeftOver=d-f,t.length>0&&Re(e).unusedInput.push(t),e._a[Lt]<=12&&Re(e).bigHour===!0&&e._a[Lt]>0&&(Re(e).bigHour=void 0),Re(e).parsedDateParts=e._a.slice(0),Re(e).meridiem=e._meridiem,e._a[Lt]=q2(e._locale,e._a[Lt],e._meridiem),g=Re(e).era,g!==null&&(e._a[Xt]=e._locale.erasConvertYear(g,e._a[Xt])),Dc(e),Mc(e)}function q2(e,t,r){var a;return r==null?t:e.meridiemHour!=null?e.meridiemHour(t,r):(e.isPM!=null&&(a=e.isPM(r),a&&t<12&&(t+=12),!a&&t===12&&(t=0)),t)}function P2(e){var t,r,a,l,s,u,d=!1,f=e._f.length;if(f===0){Re(e).invalidFormat=!0,e._d=new Date(NaN);return}for(l=0;lthis?this:e:Ro()});function lm(e,t){var r,a;if(t.length===1&&jn(t[0])&&(t=t[0]),!t.length)return pt();for(r=t[0],a=1;athis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function j2(){if(!mn(this._isDSTShifted))return this._isDSTShifted;var e={},t;return vc(e,this),e=im(e),e._a?(t=e._isUTC?cr(e._a):pt(e._a),this._isDSTShifted=this.isValid()&&U2(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function Z2(){return this.isValid()?!this._isUTC:!1}function J2(){return this.isValid()?this._isUTC:!1}function sm(){return this.isValid()?this._isUTC&&this._offset===0:!1}var X2=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,eT=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Jn(e,t){var r=e,a=null,l,s,u;return so(e)?r={ms:e._milliseconds,d:e._days,M:e._months}:Ar(e)||!isNaN(+e)?(r={},t?r[t]=+e:r.milliseconds=+e):(a=X2.exec(e))?(l=a[1]==="-"?-1:1,r={y:0,d:Ye(a[ar])*l,h:Ye(a[Lt])*l,m:Ye(a[Qn])*l,s:Ye(a[qr])*l,ms:Ye(Vu(a[pi]*1e3))*l}):(a=eT.exec(e))?(l=a[1]==="-"?-1:1,r={y:gi(a[2],l),M:gi(a[3],l),w:gi(a[4],l),d:gi(a[5],l),h:gi(a[6],l),m:gi(a[7],l),s:gi(a[8],l)}):r==null?r={}:typeof r=="object"&&("from"in r||"to"in r)&&(u=tT(pt(r.from),pt(r.to)),r={},r.ms=u.milliseconds,r.M=u.months),s=new Wo(r),so(e)&&Xe(e,"_locale")&&(s._locale=e._locale),so(e)&&Xe(e,"_isValid")&&(s._isValid=e._isValid),s}Jn.fn=Wo.prototype;Jn.invalid=F2;function gi(e,t){var r=e&&parseFloat(e.replace(",","."));return(isNaN(r)?0:r)*t}function Eh(e,t){var r={};return r.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(r.months,"M").isAfter(t)&&--r.months,r.milliseconds=+t-+e.clone().add(r.months,"M"),r}function tT(e,t){var r;return e.isValid()&&t.isValid()?(t=xc(t,e),e.isBefore(t)?r=Eh(e,t):(r=Eh(t,e),r.milliseconds=-r.milliseconds,r.months=-r.months),r):{milliseconds:0,months:0}}function um(e,t){return function(r,a){var l,s;return a!==null&&!isNaN(+a)&&(Lg(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),s=r,r=a,a=s),l=Jn(r,a),cm(this,l,e),this}}function cm(e,t,r,a){var l=t._milliseconds,s=Vu(t._days),u=Vu(t._months);!e.isValid()||(a=a==null?!0:a,u&&Kg(e,Co(e,"Month")+u*r),s&&Fg(e,"Date",Co(e,"Date")+s*r),l&&e._d.setTime(e._d.valueOf()+l*r),a&&ae.updateOffset(e,s||u))}var nT=um(1,"add"),rT=um(-1,"subtract");function dm(e){return typeof e=="string"||e instanceof String}function iT(e){return Zn(e)||Ja(e)||dm(e)||Ar(e)||lT(e)||aT(e)||e===null||e===void 0}function aT(e){var t=bi(e)&&!gc(e),r=!1,a=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],l,s,u=a.length;for(l=0;lr.valueOf():r.valueOf()9999?oo(r,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):dr(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",oo(r,"Z")):oo(r,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function bT(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",r,a,l,s;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),r="["+e+'("]',a=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",l="-MM-DD[T]HH:mm:ss.SSS",s=t+'[")]',this.format(r+a+l+s)}function wT(e){e||(e=this.isUtc()?ae.defaultFormatUtc:ae.defaultFormat);var t=oo(this,e);return this.localeData().postformat(t)}function ST(e,t){return this.isValid()&&(Zn(e)&&e.isValid()||pt(e).isValid())?Jn({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function kT(e){return this.from(pt(),e)}function CT(e,t){return this.isValid()&&(Zn(e)&&e.isValid()||pt(e).isValid())?Jn({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function TT(e){return this.to(pt(),e)}function fm(e){var t;return e===void 0?this._locale._abbr:(t=Er(e),t!=null&&(this._locale=t),this)}var hm=Nn("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function gm(){return this._locale}var Do=1e3,Xi=60*Do,qo=60*Xi,mm=(365*400+97)*24*qo;function ea(e,t){return(e%t+t)%t}function vm(e,t,r){return e<100&&e>=0?new Date(e+400,t,r)-mm:new Date(e,t,r).valueOf()}function pm(e,t,r){return e<100&&e>=0?Date.UTC(e+400,t,r)-mm:Date.UTC(e,t,r)}function MT(e){var t,r;if(e=Bn(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?pm:vm,e){case"year":t=r(this.year(),0,1);break;case"quarter":t=r(this.year(),this.month()-this.month()%3,1);break;case"month":t=r(this.year(),this.month(),1);break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=r(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=ea(t+(this._isUTC?0:this.utcOffset()*Xi),qo);break;case"minute":t=this._d.valueOf(),t-=ea(t,Xi);break;case"second":t=this._d.valueOf(),t-=ea(t,Do);break}return this._d.setTime(t),ae.updateOffset(this,!0),this}function DT(e){var t,r;if(e=Bn(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?pm:vm,e){case"year":t=r(this.year()+1,0,1)-1;break;case"quarter":t=r(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=r(this.year(),this.month()+1,1)-1;break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=r(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=qo-ea(t+(this._isUTC?0:this.utcOffset()*Xi),qo)-1;break;case"minute":t=this._d.valueOf(),t+=Xi-ea(t,Xi)-1;break;case"second":t=this._d.valueOf(),t+=Do-ea(t,Do)-1;break}return this._d.setTime(t),ae.updateOffset(this,!0),this}function qT(){return this._d.valueOf()-(this._offset||0)*6e4}function PT(){return Math.floor(this.valueOf()/1e3)}function xT(){return new Date(this.valueOf())}function AT(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function ET(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function IT(){return this.isValid()?this.toISOString():null}function $T(){return mc(this)}function OT(){return Zr({},Re(this))}function RT(){return Re(this).overflow}function LT(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}be("N",0,0,"eraAbbr");be("NN",0,0,"eraAbbr");be("NNN",0,0,"eraAbbr");be("NNNN",0,0,"eraName");be("NNNNN",0,0,"eraNarrow");be("y",["y",1],"yo","eraYear");be("y",["yy",2],0,"eraYear");be("y",["yyy",3],0,"eraYear");be("y",["yyyy",4],0,"eraYear");ce("N",Ac);ce("NN",Ac);ce("NNN",Ac);ce("NNNN",GT);ce("NNNNN",QT);ct(["N","NN","NNN","NNNN","NNNNN"],function(e,t,r,a){var l=r._locale.erasParse(e,a,r._strict);l?Re(r).era=l:Re(r).invalidEra=e});ce("y",ca);ce("yy",ca);ce("yyy",ca);ce("yyyy",ca);ce("yo",jT);ct(["y","yy","yyy","yyyy"],Xt);ct(["yo"],function(e,t,r,a){var l;r._locale._eraYearOrdinalRegex&&(l=e.match(r._locale._eraYearOrdinalRegex)),r._locale.eraYearOrdinalParse?t[Xt]=r._locale.eraYearOrdinalParse(e,l):t[Xt]=parseInt(e,10)});function NT(e,t){var r,a,l,s=this._eras||Er("en")._eras;for(r=0,a=s.length;r=0)return s[a]}function FT(e,t){var r=e.since<=e.until?1:-1;return t===void 0?ae(e.since).year():ae(e.since).year()+(t-e.offset)*r}function UT(){var e,t,r,a=this.localeData().eras();for(e=0,t=a.length;es&&(t=s),rM.call(this,e,t,r,a,l))}function rM(e,t,r,a,l){var s=Zg(e,t,r,a,l),u=Ya(s.year,0,s.dayOfYear);return this.year(u.getUTCFullYear()),this.month(u.getUTCMonth()),this.date(u.getUTCDate()),this}be("Q",0,"Qo","quarter");en("quarter","Q");tn("quarter",7);ce("Q",Ug);ct("Q",function(e,t){t[Dr]=(Ye(e)-1)*3});function iM(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}be("D",["DD",2],"Do","date");en("date","D");tn("date",9);ce("D",yt);ce("DD",yt,Dn);ce("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});ct(["D","DD"],ar);ct("Do",function(e,t){t[ar]=Ye(e.match(yt)[0])});var _m=ua("Date",!0);be("DDD",["DDDD",3],"DDDo","dayOfYear");en("dayOfYear","DDD");tn("dayOfYear",4);ce("DDD",Bo);ce("DDDD",zg);ct(["DDD","DDDD"],function(e,t,r){r._dayOfYear=Ye(e)});function aM(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}be("m",["mm",2],0,"minute");en("minute","m");tn("minute",14);ce("m",yt);ce("mm",yt,Dn);ct(["m","mm"],Qn);var lM=ua("Minutes",!1);be("s",["ss",2],0,"second");en("second","s");tn("second",15);ce("s",yt);ce("ss",yt,Dn);ct(["s","ss"],qr);var oM=ua("Seconds",!1);be("S",0,0,function(){return~~(this.millisecond()/100)});be(0,["SS",2],0,function(){return~~(this.millisecond()/10)});be(0,["SSS",3],0,"millisecond");be(0,["SSSS",4],0,function(){return this.millisecond()*10});be(0,["SSSSS",5],0,function(){return this.millisecond()*100});be(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});be(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});be(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});be(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});en("millisecond","ms");tn("millisecond",16);ce("S",Bo,Ug);ce("SS",Bo,Dn);ce("SSS",Bo,zg);var Jr,bm;for(Jr="SSSS";Jr.length<=9;Jr+="S")ce(Jr,ca);function sM(e,t){t[pi]=Ye(("0."+e)*1e3)}for(Jr="S";Jr.length<=9;Jr+="S")ct(Jr,sM);bm=ua("Milliseconds",!1);be("z",0,0,"zoneAbbr");be("zz",0,0,"zoneName");function uM(){return this._isUTC?"UTC":""}function cM(){return this._isUTC?"Coordinated Universal Time":""}var Q=Xa.prototype;Q.add=nT;Q.calendar=uT;Q.clone=cT;Q.diff=pT;Q.endOf=DT;Q.format=wT;Q.from=ST;Q.fromNow=kT;Q.to=CT;Q.toNow=TT;Q.get=fC;Q.invalidAt=RT;Q.isAfter=dT;Q.isBefore=fT;Q.isBetween=hT;Q.isSame=gT;Q.isSameOrAfter=mT;Q.isSameOrBefore=vT;Q.isValid=$T;Q.lang=hm;Q.locale=fm;Q.localeData=gm;Q.max=$2;Q.min=I2;Q.parsingFlags=OT;Q.set=hC;Q.startOf=MT;Q.subtract=rT;Q.toArray=AT;Q.toObject=ET;Q.toDate=xT;Q.toISOString=_T;Q.inspect=bT;typeof Symbol!="undefined"&&Symbol.for!=null&&(Q[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});Q.toJSON=IT;Q.toString=yT;Q.unix=PT;Q.valueOf=qT;Q.creationData=LT;Q.eraName=UT;Q.eraNarrow=zT;Q.eraAbbr=VT;Q.eraYear=YT;Q.year=jg;Q.isLeapYear=EC;Q.weekYear=ZT;Q.isoWeekYear=JT;Q.quarter=Q.quarters=iM;Q.month=Gg;Q.daysInMonth=PC;Q.week=Q.weeks=NC;Q.isoWeek=Q.isoWeeks=BC;Q.weeksInYear=tM;Q.weeksInWeekYear=nM;Q.isoWeeksInYear=XT;Q.isoWeeksInISOWeekYear=eM;Q.date=_m;Q.day=Q.days=JC;Q.weekday=XC;Q.isoWeekday=e2;Q.dayOfYear=aM;Q.hour=Q.hours=o2;Q.minute=Q.minutes=lM;Q.second=Q.seconds=oM;Q.millisecond=Q.milliseconds=bm;Q.utcOffset=V2;Q.utc=W2;Q.local=H2;Q.parseZone=K2;Q.hasAlignedHourOffset=G2;Q.isDST=Q2;Q.isLocal=Z2;Q.isUtcOffset=J2;Q.isUtc=sm;Q.isUTC=sm;Q.zoneAbbr=uM;Q.zoneName=cM;Q.dates=Nn("dates accessor is deprecated. Use date instead.",_m);Q.months=Nn("months accessor is deprecated. Use month instead",Gg);Q.years=Nn("years accessor is deprecated. Use year instead",jg);Q.zone=Nn("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Y2);Q.isDSTShifted=Nn("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",j2);function dM(e){return pt(e*1e3)}function fM(){return pt.apply(null,arguments).parseZone()}function wm(e){return e}var et=pc.prototype;et.calendar=Jk;et.longDateFormat=nC;et.invalidDate=iC;et.ordinal=oC;et.preparse=wm;et.postformat=wm;et.relativeTime=uC;et.pastFuture=cC;et.set=jk;et.eras=NT;et.erasParse=BT;et.erasConvertYear=FT;et.erasAbbrRegex=HT;et.erasNameRegex=WT;et.erasNarrowRegex=KT;et.months=TC;et.monthsShort=MC;et.monthsParse=qC;et.monthsRegex=AC;et.monthsShortRegex=xC;et.week=$C;et.firstDayOfYear=LC;et.firstDayOfWeek=RC;et.weekdays=KC;et.weekdaysMin=QC;et.weekdaysShort=GC;et.weekdaysParse=ZC;et.weekdaysRegex=t2;et.weekdaysShortRegex=n2;et.weekdaysMinRegex=r2;et.isPM=a2;et.meridiem=s2;function Po(e,t,r,a){var l=Er(),s=cr().set(a,t);return l[r](s,e)}function Sm(e,t,r){if(Ar(e)&&(t=e,e=void 0),e=e||"",t!=null)return Po(e,t,r,"month");var a,l=[];for(a=0;a<12;a++)l[a]=Po(e,a,r,"month");return l}function Ic(e,t,r,a){typeof e=="boolean"?(Ar(t)&&(r=t,t=void 0),t=t||""):(t=e,r=t,e=!1,Ar(t)&&(r=t,t=void 0),t=t||"");var l=Er(),s=e?l._week.dow:0,u,d=[];if(r!=null)return Po(t,(r+s)%7,a,"day");for(u=0;u<7;u++)d[u]=Po(t,(u+s)%7,a,"day");return d}function hM(e,t){return Sm(e,t,"months")}function gM(e,t){return Sm(e,t,"monthsShort")}function mM(e,t,r){return Ic(e,t,r,"weekdays")}function vM(e,t,r){return Ic(e,t,r,"weekdaysShort")}function pM(e,t,r){return Ic(e,t,r,"weekdaysMin")}ei("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,r=Ye(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+r}});ae.lang=Nn("moment.lang is deprecated. Use moment.locale instead.",ei);ae.langData=Nn("moment.langData is deprecated. Use moment.localeData instead.",Er);var kr=Math.abs;function yM(){var e=this._data;return this._milliseconds=kr(this._milliseconds),this._days=kr(this._days),this._months=kr(this._months),e.milliseconds=kr(e.milliseconds),e.seconds=kr(e.seconds),e.minutes=kr(e.minutes),e.hours=kr(e.hours),e.months=kr(e.months),e.years=kr(e.years),this}function km(e,t,r,a){var l=Jn(t,r);return e._milliseconds+=a*l._milliseconds,e._days+=a*l._days,e._months+=a*l._months,e._bubble()}function _M(e,t){return km(this,e,t,1)}function bM(e,t){return km(this,e,t,-1)}function Ih(e){return e<0?Math.floor(e):Math.ceil(e)}function wM(){var e=this._milliseconds,t=this._days,r=this._months,a=this._data,l,s,u,d,f;return e>=0&&t>=0&&r>=0||e<=0&&t<=0&&r<=0||(e+=Ih(Wu(r)+t)*864e5,t=0,r=0),a.milliseconds=e%1e3,l=Rn(e/1e3),a.seconds=l%60,s=Rn(l/60),a.minutes=s%60,u=Rn(s/60),a.hours=u%24,t+=Rn(u/24),f=Rn(Cm(t)),r+=f,t-=Ih(Wu(f)),d=Rn(r/12),r%=12,a.days=t,a.months=r,a.years=d,this}function Cm(e){return e*4800/146097}function Wu(e){return e*146097/4800}function SM(e){if(!this.isValid())return NaN;var t,r,a=this._milliseconds;if(e=Bn(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+a/864e5,r=this._months+Cm(t),e){case"month":return r;case"quarter":return r/3;case"year":return r/12}else switch(t=this._days+Math.round(Wu(this._months)),e){case"week":return t/7+a/6048e5;case"day":return t+a/864e5;case"hour":return t*24+a/36e5;case"minute":return t*1440+a/6e4;case"second":return t*86400+a/1e3;case"millisecond":return Math.floor(t*864e5)+a;default:throw new Error("Unknown unit "+e)}}function kM(){return this.isValid()?this._milliseconds+this._days*864e5+this._months%12*2592e6+Ye(this._months/12)*31536e6:NaN}function Ir(e){return function(){return this.as(e)}}var CM=Ir("ms"),TM=Ir("s"),MM=Ir("m"),DM=Ir("h"),qM=Ir("d"),PM=Ir("w"),xM=Ir("M"),AM=Ir("Q"),EM=Ir("y");function IM(){return Jn(this)}function $M(e){return e=Bn(e),this.isValid()?this[e+"s"]():NaN}function ki(e){return function(){return this.isValid()?this._data[e]:NaN}}var OM=ki("milliseconds"),RM=ki("seconds"),LM=ki("minutes"),NM=ki("hours"),BM=ki("days"),FM=ki("months"),UM=ki("years");function zM(){return Rn(this.days()/7)}var Cr=Math.round,Qi={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function VM(e,t,r,a,l){return l.relativeTime(t||1,!!r,e,a)}function YM(e,t,r,a){var l=Jn(e).abs(),s=Cr(l.as("s")),u=Cr(l.as("m")),d=Cr(l.as("h")),f=Cr(l.as("d")),g=Cr(l.as("M")),v=Cr(l.as("w")),C=Cr(l.as("y")),M=s<=r.ss&&["s",s]||s0,M[4]=a,VM.apply(null,M)}function WM(e){return e===void 0?Cr:typeof e=="function"?(Cr=e,!0):!1}function HM(e,t){return Qi[e]===void 0?!1:t===void 0?Qi[e]:(Qi[e]=t,e==="s"&&(Qi.ss=t-1),!0)}function KM(e,t){if(!this.isValid())return this.localeData().invalidDate();var r=!1,a=Qi,l,s;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(r=e),typeof t=="object"&&(a=Object.assign({},Qi,t),t.s!=null&&t.ss==null&&(a.ss=t.s-1)),l=this.localeData(),s=YM(this,!r,a,l),r&&(s=l.pastFuture(+this,s)),l.postformat(s)}var xu=Math.abs;function Wi(e){return(e>0)-(e<0)||+e}function Ko(){if(!this.isValid())return this.localeData().invalidDate();var e=xu(this._milliseconds)/1e3,t=xu(this._days),r=xu(this._months),a,l,s,u,d=this.asSeconds(),f,g,v,C;return d?(a=Rn(e/60),l=Rn(a/60),e%=60,a%=60,s=Rn(r/12),r%=12,u=e?e.toFixed(3).replace(/\.?0+$/,""):"",f=d<0?"-":"",g=Wi(this._months)!==Wi(d)?"-":"",v=Wi(this._days)!==Wi(d)?"-":"",C=Wi(this._milliseconds)!==Wi(d)?"-":"",f+"P"+(s?g+s+"Y":"")+(r?g+r+"M":"")+(t?v+t+"D":"")+(l||a||e?"T":"")+(l?C+l+"H":"")+(a?C+a+"M":"")+(e?C+u+"S":"")):"P0D"}var je=Wo.prototype;je.isValid=B2;je.abs=yM;je.add=_M;je.subtract=bM;je.as=SM;je.asMilliseconds=CM;je.asSeconds=TM;je.asMinutes=MM;je.asHours=DM;je.asDays=qM;je.asWeeks=PM;je.asMonths=xM;je.asQuarters=AM;je.asYears=EM;je.valueOf=kM;je._bubble=wM;je.clone=IM;je.get=$M;je.milliseconds=OM;je.seconds=RM;je.minutes=LM;je.hours=NM;je.days=BM;je.weeks=zM;je.months=FM;je.years=UM;je.humanize=KM;je.toISOString=Ko;je.toString=Ko;je.toJSON=Ko;je.locale=fm;je.localeData=gm;je.toIsoString=Nn("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Ko);je.lang=hm;be("X",0,0,"unix");be("x",0,0,"valueOf");ce("x",Uo);ce("X",mC);ct("X",function(e,t,r){r._d=new Date(parseFloat(e)*1e3)});ct("x",function(e,t,r){r._d=new Date(Ye(e))});//! moment.js +ae.version="2.29.4";Gk(pt);ae.fn=Q;ae.min=O2;ae.max=R2;ae.now=L2;ae.utc=cr;ae.unix=dM;ae.months=hM;ae.isDate=Ja;ae.locale=ei;ae.invalid=Ro;ae.duration=Jn;ae.isMoment=Zn;ae.weekdays=mM;ae.parseZone=fM;ae.localeData=Er;ae.isDuration=so;ae.monthsShort=gM;ae.weekdaysMin=pM;ae.defineLocale=Tc;ae.updateLocale=f2;ae.locales=h2;ae.weekdaysShort=vM;ae.normalizeUnits=Bn;ae.relativeTimeRounding=WM;ae.relativeTimeThreshold=HM;ae.calendarFormat=sT;ae.prototype=Q;ae.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const GM=sn({name:"UserChat",props:["account-pubkey","peer-pubkeys","profiles","events"],components:{UserProfile:Za},data:function(){return{selectedPubkey:null,selectedProfile:null,dmEvents:[],newMessage:null,rawMessage:null,showRawMessage:!1}},watch:{events(e){this.dmEvents=((e==null?void 0:e.events)||[]).map(t=>{var l;const r=this.accountPubkey===t.pubkey,a={isJson:!1,message:t.content,sent:r,avatar:r?$q.config.staticPath+"/images/blank-avatar.webp":((l=this.selectedProfile)==null?void 0:l.picture)||$q.config.staticPath+"/images/blank-avatar.webp",dateFrom:ae(t.created_at*1e3).fromNow()};return isNaN(t.content)&&isJson(t.content)&&(a.isJson=!0,a.message=JSON.parse(t.content)),a}),setTimeout(()=>{document.getElementById("bottom-user-chat").scrollIntoView()},0)}},methods:{pubkeySelected(e){this.selectedPubkey=e,this.selectedProfile=this.profiles.find(t=>t.pubkey===e),this.$emit("chat-selected",e),setTimeout(()=>{document.getElementById("bottom-user-chat").scrollIntoView()},100)},async sendDirectMesage(){this.$emit("send-dm",{to:this.selectedPubkey,message:this.newMessage}),this.newMessage=null},pubkeyAlias(e){return Dg({dictionaries:[qg,Pg,xg],length:2,separator:" ",style:"capital",seed:e})},showMessageRawData:function(e){var t;this.rawMessage=JSON.stringify((t=this.dmEvents[e])==null?void 0:t.message,null,2),this.showRawMessage=!0}},created:async function(){}}),QM={style:{width:"100%"},class:"q-pa-md row justify-center"},jM={style:{width:"100%"}},ZM={key:0},JM={key:0},XM={key:0},eD=S("strong",null,"New order:",-1),tD=[eD],nD={key:1},rD=S("strong",null,"Reply sent for order: ",-1),iD=[rD],aD={key:2},lD=["textContent"],oD=["textContent","onClick"],sD={key:1},uD=["textContent"],cD=S("div",{id:"bottom-user-chat"},null,-1),dD={class:"row q-mt-lg"};function fD(e,t,r,a,l,s){const u=ti("user-profile");return O(),re("div",null,[y(Jt,{bordered:"",class:"q-mb-md"},{default:b(()=>[y(Ne,{horizontal:""},{default:b(()=>[y(Ne,{class:"col-sm-2 col-md-4"},{default:b(()=>[(O(!0),re(Nt,null,Wt(e.peerPubkeys,d=>(O(),oe(Vt,{key:d,clickable:"",onClick:f=>e.pubkeySelected(d),active:e.selectedPubkey===d,class:"cursor-pointer"},{default:b(()=>[y(u,{pubkey:d,profiles:e.profiles},null,8,["pubkey","profiles"])]),_:2},1032,["onClick","active"]))),128))]),_:1}),y(ut,{vertical:""}),y(Ne,{style:{width:"100%"}},{default:b(()=>[S("div",QM,[S("div",jM,[y(Hk,{style:{height:"500px"}},{default:b(()=>[e.dmEvents?(O(),re("div",ZM,[(O(!0),re(Nt,null,Wt(e.dmEvents,(d,f)=>{var g;return O(),oe(Yk,{key:f,name:d.sent?"me":((g=e.selectedProfile)==null?void 0:g.name)||e.pubkeyAlias(e.selectedPubkey),sent:d.sent,avatar:d.avatar,stamp:d.dateFrom},{default:b(()=>[d.isJson?(O(),re("div",JM,[d.message.type===0?(O(),re("div",XM,tD)):d.message.type===1?(O(),re("div",nD,iD)):d.message.type===2?(O(),re("div",aD,[d.message.paid?(O(),oe(Cn,{key:0,color:"green"},{default:b(()=>[Te("Paid ")]),_:1})):$e("",!0),d.message.shipped?(O(),oe(Cn,{key:1,color:"green"},{default:b(()=>[Te("Shipped ")]),_:1})):$e("",!0)])):$e("",!0),S("div",null,[S("span",{textContent:ge(d.message.message)},null,8,lD),y(Cn,{class:"gt-sm",color:"orange"},{default:b(()=>[S("span",{textContent:ge(d.message.id),onClick:v=>e.showOrderDetails(d.message.id),class:"cursor-pointer"},null,8,oD)]),_:2},1024)]),y(Cn,{onClick:v=>e.showMessageRawData(f),class:"cursor-pointer"},{default:b(()=>[Te("...")]),_:2},1032,["onClick"])])):(O(),re("div",sD,[S("span",{textContent:ge(d.message)},null,8,uD)]))]),_:2},1032,["name","sent","avatar","stamp"])}),128))])):$e("",!0),cD]),_:1})])])]),_:1})]),_:1}),y(ut),y(Ne,{horizontal:""},{default:b(()=>[y(Ne,{class:"col-sm-2 col-md-4"}),y(Ne,{style:{width:"100%"}},{default:b(()=>[y(Kk,{onSubmit:e.sendDirectMesage,class:"auto-width"},{default:b(()=>[y(It,{class:"rounded-pill",style:{width:"100%"},rounded:"",outlined:"",clearable:"",modelValue:e.newMessage,"onUpdate:modelValue":t[0]||(t[0]=d=>e.newMessage=d),modelModifiers:{trim:!0},label:"Write a message"},{append:b(()=>[y(Yt,{name:"send",class:"cursor-pointer",color:"secondary",onClick:e.sendDirectMesage},null,8,["onClick"])]),_:1},8,["modelValue"])]),_:1},8,["onSubmit"])]),_:1})]),_:1})]),_:1}),y(go,{modelValue:e.showRawMessage,"onUpdate:modelValue":t[2]||(t[2]=d=>e.showRawMessage=d),position:"top"},{default:b(()=>[y(Jt,{class:"q-pa-lg q-pt-xl",style:{width:"500px"}},{default:b(()=>[y(It,{filled:"",dense:"",type:"textarea",rows:"20",modelValue:e.rawMessage,"onUpdate:modelValue":t[1]||(t[1]=d=>e.rawMessage=d),modelModifiers:{trim:!0},label:"Raw Data"},null,8,["modelValue"]),S("div",dD,[Gn((O(),oe(ye,{flat:"",color:"grey",class:"q-ml-auto"},{default:b(()=>[Te("Close")]),_:1})),[[Gi]])])]),_:1})]),_:1},8,["modelValue"])])}var hD=Tn(GM,[["render",fD]]);const gD=sn({name:"ShoppingCartList",props:["carts","profiles"],components:{UserProfile:Za},data:function(){return{}},computed:{},methods:{formatCurrency:function(e,t){return formatCurrency(e,t)},cartTotalFormatted(e){var r;if(!((r=e.products)!=null&&r.length))return"";const t=e.products.reduce((a,l)=>l.price+a,0);return formatCurrency(t,e.products[0].currency)},removeProduct:function(e,t){this.$emit("remove-from-cart",{stallId:e,productId:t})},removeCart:function(e){this.$emit("remove-cart",e)},quantityChanged:function(e){this.$emit("add-to-cart",e)},proceedToCheckout:function(e){this.$emit("checkout-cart",e)}},created(){}}),mD=S("strong",null,"No products in cart!",-1),vD=["src"],pD=["src"],yD={class:"text-caption text-grey ellipsis-2-lines"},_D={class:"q-ma-md"};function bD(e,t,r,a,l,s){var d;const u=ti("user-profile");return O(),re("div",null,[(d=e.carts)!=null&&d.length?$e("",!0):(O(),oe(Jt,{key:0,bordered:"",class:"q-mb-md"},{default:b(()=>[y(Ne,null,{default:b(()=>[mD]),_:1})]),_:1})),(O(!0),re(Nt,null,Wt(e.carts,f=>(O(),re("div",{key:f.id},[y(Jt,{bordered:"",class:"q-mb-md"},{default:b(()=>[y(Vt,null,{default:b(()=>{var g;return[y(u,{pubkey:f.merchant,profiles:e.profiles,description:(g=f.products[0])==null?void 0:g.stallName},null,8,["pubkey","profiles","description"]),y(Ie,{side:""},{default:b(()=>[S("div",null,[y(ye,{onClick:v=>e.removeCart(f.id),flat:"",color:"pink"},{default:b(()=>[Te(" Clear Cart ")]),_:2},1032,["onClick"])])]),_:2},1024)]}),_:2},1024),y(ut),y(Ne,{horizontal:""},{default:b(()=>[y(Ne,{class:"col-12"},{default:b(()=>[y(Mr,{class:"q-mt-md"},{default:b(()=>[(O(!0),re(Nt,null,Wt(f.products,g=>(O(),oe(Vt,{key:g.id},{default:b(()=>[y(Ie,{avatar:""},{default:b(()=>[y(Xr,null,{default:b(()=>[g.images[0]||g.image?(O(),re("img",{key:0,src:g.images[0]||g.image},null,8,vD)):(O(),re("img",{key:1,src:e.$q.config.staticPath+"/images/placeholder.png"},null,8,pD))]),_:2},1024)]),_:2},1024),y(Ie,{class:"q-mt-sm"},{default:b(()=>[y(Ke,null,{default:b(()=>[Te(ge(g.name),1)]),_:2},1024),y(Ke,{class:"gt-sm"},{default:b(()=>[S("div",yD,[S("p",null,ge(g.description),1)])]),_:2},1024)]),_:2},1024),y(Ie,{class:"q-mt-sm gt-sm"},{default:b(()=>[y(Ke,null,{default:b(()=>[S("strong",null,ge(e.formatCurrency(g.price,g.currency)),1)]),_:2},1024),y(Ke)]),_:2},1024),y(Ie,{class:"q-ma-sm"},{default:b(()=>[y(It,{modelValue:g.orderedQuantity,"onUpdate:modelValue":v=>g.orderedQuantity=v,modelModifiers:{number:!0},onChange:v=>e.quantityChanged(g),type:"number",rounded:"",outlined:"",min:"1",max:g.quantity},null,8,["modelValue","onUpdate:modelValue","onChange","max"])]),_:2},1024),y(Ie,null,{default:b(()=>[y(Ke,null,{default:b(()=>[S("strong",null,ge(e.formatCurrency(g.price*g.orderedQuantity,g.currency)),1)]),_:2},1024)]),_:2},1024),y(Ie,{side:""},{default:b(()=>[S("div",null,[y(ye,{flat:"",dense:"",round:"",icon:"delete",onClick:v=>e.removeProduct(g.stall_id,g.id)},null,8,["onClick"])])]),_:2},1024)]),_:2},1024))),128))]),_:2},1024)]),_:2},1024)]),_:2},1024),y(ut),y(wi,{align:"right"},{default:b(()=>[Te(" Total: "),S("strong",_D,ge(e.cartTotalFormatted(f)),1),y(ye,{onClick:g=>e.proceedToCheckout(f),flat:"",color:"primary"},{default:b(()=>[Te(" Proceed to Checkout ")]),_:2},1032,["onClick"])]),_:2},1024)]),_:2},1024)]))),128))])}var wD=Tn(gD,[["render",bD]]);const SD=sn({name:"ShoppingCartCheckout",props:["cart","stall","customer-pubkey","profiles"],components:{UserProfile:Za},data:function(){return{orderConfirmed:!1,paymentMethod:"ln",shippingZone:null,contactData:{email:null,npub:null,address:null,message:null},paymentOptions:[{label:"Lightning Network",value:"ln"},{label:"BTC Onchain",value:"btc"},{label:"Cashu",value:"cashu"}]}},computed:{cartTotal(){var e;return(e=this.cart.products)!=null&&e.length?this.cart.products.reduce((t,r)=>r.price+t,0):0},cartTotalWithShipping(){return this.shippingZone?this.cartTotal+this.shippingZone.cost:this.cartTotal},shippingZoneLabel(){if(!this.shippingZone)return"Shipping Zone";let e=this.shippingZone.name||this.shippingZone.id||"Shipping Zone";return e=e.substring(0,10),e.length<10?e:e+"..."}},methods:{formatCurrency:function(e,t){return formatCurrency(e,t)},selectShippingZone:function(e){this.shippingZone=e},confirmOrder:function(){if(!this.shippingZone){this.$q.notify({timeout:5e3,type:"warning",message:"Please select a shipping zone!"});return}this.orderConfirmed=!0},async placeOrder(){if(!this.shippingZone){this.$q.notify({timeout:5e3,type:"warning",message:"Please select a shipping zone!"});return}if(!this.customerPubkey){this.$emit("login-required");return}const e={address:this.contactData.address,message:this.contactData.message,contact:{nostr:this.contactData.npub,email:this.contactData.email},items:Array.from(this.cart.products,a=>({product_id:a.id,quantity:a.orderedQuantity})),shipping_id:this.shippingZone.id,type:0},t=Math.floor(Date.now()/1e3);e.id=await hash([this.customerPubkey,t,JSON.stringify(e)].join(":"));const r={...await NostrTools.getBlankEvent(),kind:4,created_at:t,tags:[["p",this.stall.pubkey]],pubkey:this.customerPubkey};this.$emit("place-order",{event:r,order:e,cartId:this.cart.id})},goToShoppingCart:function(){this.$emit("change-page","shopping-cart-list")},merchantProfile(e){var t;return(t=this.profiles)==null?void 0:t.find(r=>r.pubkey===e)}},created(){var e;((e=this.stall.shipping)==null?void 0:e.length)===1&&(this.shippingZone=this.stall.shipping[0])}}),kD={class:"row q-mt-md q-ml-md q-pr-md"},CD=S("div",{class:"col-xs-12 col-sm-12 col-md-2 q-mt-md"},[S("strong",null,"Message:")],-1),TD={class:"col-xs-12 col-sm-12 col-md-10"},MD={class:"row q-mt-md q-ml-md q-pr-md"},DD=S("div",{class:"col-xs-12 col-sm-12 col-md-2 q-mt-md"},[S("strong",null,"Address:")],-1),qD={class:"col-xs-12 col-sm-12 col-md-10"},PD={class:"row q-mt-md q-ml-md q-pr-md"},xD=S("div",{class:"col-xs-12 col-sm-12 col-md-2 q-mt-md"},[S("strong",null,"Email:")],-1),AD={class:"col-xs-12 col-sm-12 col-md-10"},ED={class:"row q-mt-md q-ml-md q-pr-md"},ID=S("div",{class:"col-xs-12 col-sm-12 col-md-2 q-mt-md"},[S("strong",null,"Npub:")],-1),$D={class:"col-xs-12 col-sm-12 col-md-10"},OD={class:"row q-mt-md"},RD=S("div",{class:"col-xs-12 col-sm-12 col-md-4"},[S("strong",null,"Subtotal:")],-1),LD={class:"col-xs-12 col-sm-12 col-md-4"},ND=S("div",{class:"col-xs-12 col-sm-12 col-md-4"},null,-1),BD={class:"row q-mt-md"},FD=S("div",{class:"col-xs-12 col-sm-12 col-md-4"},[S("strong",null,"Shipping:")],-1),UD={class:"col-xs-12 col-sm-12 col-md-4"},zD={key:0},VD={class:"col-xs-12 col-sm-12 col-md-4"},YD=["textContent"],WD=["textContent"],HD={class:"row q-mt-md"},KD=S("div",{class:"col-xs-12 col-sm-12 col-md-4"},[S("strong",null,"Total:")],-1),GD={class:"col-xs-12 col-sm-12 col-md-4"},QD=S("div",{class:"col-xs-12 col-sm-12 col-md-4"},null,-1),jD={key:0,class:"row q-mt-md"},ZD={class:"col"},JD=S("strong",null,"Payment Method",-1),XD={key:0},eq={key:1};function tq(e,t,r,a,l,s){const u=ti("user-profile");return O(),re("div",null,[e.cart&&e.stall?(O(),oe(Jt,{key:0,bordered:"",class:"q-mb-md"},{default:b(()=>[y(Vt,null,{default:b(()=>{var d;return[y(u,{pubkey:e.cart.merchant,profiles:e.profiles,description:(d=e.cart.products[0])==null?void 0:d.stallName},null,8,["pubkey","profiles","description"]),y(Ie,{side:""})]}),_:1}),y(ut),e.orderConfirmed?(O(),oe(Ne,{key:0},{default:b(()=>[S("div",kD,[CD,S("div",TD,[y(It,{modelValue:e.contactData.message,"onUpdate:modelValue":t[0]||(t[0]=d=>e.contactData.message=d),modelModifiers:{trim:!0},outlined:"",type:"textarea",rows:"3",label:"Message (optional)",hint:"Message merchant about additional order needs"},null,8,["modelValue"])])]),S("div",MD,[DD,S("div",qD,[y(It,{modelValue:e.contactData.address,"onUpdate:modelValue":t[1]||(t[1]=d=>e.contactData.address=d),modelModifiers:{trim:!0},outlined:"",type:"textarea",rows:"3",label:"Address (optional)",hint:"Must provide for physical shipping"},null,8,["modelValue"])])]),S("div",PD,[xD,S("div",AD,[y(It,{modelValue:e.contactData.email,"onUpdate:modelValue":t[2]||(t[2]=d=>e.contactData.email=d),modelModifiers:{trim:!0},type:"email",outlined:"",label:"Email (optional)",hint:"Merchant may not use email"},null,8,["modelValue"])])]),S("div",ED,[ID,S("div",$D,[y(It,{modelValue:e.contactData.npub,"onUpdate:modelValue":t[3]||(t[3]=d=>e.contactData.npub=d),modelModifiers:{trim:!0},outlined:"",label:"Alternative Npub (optional)",hint:"Use a different Npub to communicate with the merchant"},null,8,["modelValue"])])])]),_:1})):(O(),oe(Ne,{key:1,horizontal:""},{default:b(()=>[y(Ne,{class:"col-7"},{default:b(()=>[S("div",OD,[RD,S("div",LD,[S("strong",null,ge(e.formatCurrency(e.cartTotal,e.stall.currency)),1)]),ND]),S("div",BD,[FD,S("div",UD,[e.shippingZone?(O(),re("strong",zD,ge(e.formatCurrency(e.shippingZone.cost,e.stall.currency)),1)):$e("",!0)]),S("div",VD,[y(lg,{unelevated:"",color:"secondary",rounded:"",label:e.shippingZoneLabel},{default:b(()=>[(O(!0),re(Nt,null,Wt(e.stall.shipping,d=>Gn((O(),oe(Vt,{onClick:f=>e.selectShippingZone(d),key:d.id,clickable:""},{default:b(()=>[y(Ie,null,{default:b(()=>[y(Ke,null,{default:b(()=>[S("span",{textContent:ge(d.name)},null,8,YD)]),_:2},1024),y(Ke,{caption:""},{default:b(()=>{var f;return[S("span",{textContent:ge((f=d.countries)==null?void 0:f.join(", "))},null,8,WD)]}),_:2},1024)]),_:2},1024)]),_:2},1032,["onClick"])),[[Gi]])),128))]),_:1},8,["label"])])]),y(ut,{class:"q-mt-sm"}),S("div",HD,[KD,S("div",GD,[S("strong",null,ge(e.formatCurrency(e.cartTotalWithShipping,e.stall.currency)),1)]),QD]),e.shippingZone?(O(),re("div",jD,[S("div",ZD,[y(Cn,{color:"secondary"},{default:b(()=>[Te(" Additional per product shipping costs might apply.")]),_:1})])])):$e("",!0)]),_:1}),y(ut,{vertical:""}),y(Ne,null,{default:b(()=>[JD,y(nw,{modelValue:e.paymentMethod,"onUpdate:modelValue":t[4]||(t[4]=d=>e.paymentMethod=d),options:e.paymentOptions,color:"green",disable:""},null,8,["modelValue","options"])]),_:1})]),_:1})),y(ut),y(wi,{align:"right"},{default:b(()=>[e.orderConfirmed?(O(),re("div",XD,[y(ye,{onClick:t[5]||(t[5]=d=>e.orderConfirmed=!1),flat:"",color:"grey"},{default:b(()=>[Te(" Back ")]),_:1}),y(ye,{onClick:t[6]||(t[6]=d=>e.placeOrder()),flat:"",color:"primary"},{default:b(()=>[Te(" Place Order ")]),_:1})])):(O(),re("div",eq,[y(ye,{onClick:e.goToShoppingCart,flat:"",color:"grey"},{default:b(()=>[Te(" Back ")]),_:1},8,["onClick"]),y(ye,{onClick:e.confirmOrder,flat:"",color:"primary"},{default:b(()=>[Te(" Confirm ")]),_:1},8,["onClick"])]))]),_:1})]),_:1})):$e("",!0)])}var nq=Tn(SD,[["render",tq]]);const{passive:mi}=ta;var rq=Je({name:"QInfiniteScroll",props:{offset:{type:Number,default:500},debounce:{type:[String,Number],default:100},scrollTarget:{default:void 0},initialIndex:Number,disable:Boolean,reverse:Boolean},emits:["load"],setup(e,{slots:t,emit:r}){const a=se(!1),l=se(!0),s=se(null),u=se(null);let d=e.initialIndex||0,f,g;const v=$(()=>"q-infinite-scroll__loading"+(a.value===!0?"":" invisible"));function C(){if(e.disable===!0||a.value===!0||l.value===!1)return;const V=Xl(f),H=gu(f),pe=oh(f);e.reverse===!1?Math.round(H+pe+e.offset)>=Math.round(V)&&M():Math.round(H)<=e.offset&&M()}function M(){if(e.disable===!0||a.value===!0||l.value===!1)return;d++,a.value=!0;const V=Xl(f);r("load",d,H=>{l.value===!0&&(a.value=!1,Sn(()=>{if(e.reverse===!0){const pe=Xl(f),_e=gu(f),xe=pe-V;La(f,_e+xe)}H===!0?I():s.value&&s.value.closest("body")&&g()}))})}function _(){d=0}function x(){l.value===!1&&(l.value=!0,f.addEventListener("scroll",g,mi)),C()}function I(){l.value===!0&&(l.value=!1,a.value=!1,f.removeEventListener("scroll",g,mi),g!==void 0&&g.cancel!==void 0&&g.cancel())}function L(){if(f&&l.value===!0&&f.removeEventListener("scroll",g,mi),f=xo(s.value,e.scrollTarget),l.value===!0){if(f.addEventListener("scroll",g,mi),e.reverse===!0){const V=Xl(f),H=oh(f);La(f,V-H)}C()}}function F(V){d=V}function Y(V){V=parseInt(V,10);const H=g;g=V<=0?C:ec(C,isNaN(V)===!0?100:V),f&&l.value===!0&&(H!==void 0&&f.removeEventListener("scroll",H,mi),f.addEventListener("scroll",g,mi))}function D(V){if(A.value===!0){if(u.value===null){V!==!0&&Sn(()=>{D(!0)});return}const H=`${a.value===!0?"un":""}pauseAnimations`;Array.from(u.value.getElementsByTagName("svg")).forEach(pe=>{pe[H]()})}}const A=$(()=>e.disable!==!0&&l.value===!0);Ve([a,A],()=>{D()}),Ve(()=>e.disable,V=>{V===!0?I():x()}),Ve(()=>e.reverse,()=>{a.value===!1&&l.value===!0&&C()}),Ve(()=>e.scrollTarget,L),Ve(()=>e.debounce,Y);let N=!1;sa(()=>{N!==!1&&f&&La(f,N)}),oa(()=>{N=f?gu(f):!1}),Ht(()=>{l.value===!0&&f.removeEventListener("scroll",g,mi)}),ni(()=>{Y(e.debounce),L(),a.value===!1&&D()});const J=Dt();return Object.assign(J.proxy,{poll:()=>{g!==void 0&&g()},trigger:M,stop:I,reset:_,resume:x,setIndex:F}),()=>{const V=Nh(t.default,[]);return A.value===!0&&V[e.reverse===!1?"push":"unshift"](E("div",{ref:u,class:v.value},Mt(t.loading))),E("div",{class:"q-infinite-scroll",ref:s},V)}}}),Hu={exports:{}};/** * @license * Lodash * Copyright OpenJS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */(function(e,t){(function(){var r,a="4.17.21",l=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",u="Expected a function",d="Invalid `variable` option passed into `_.template`",f="__lodash_hash_undefined__",g=500,v="__lodash_placeholder__",C=1,M=2,_=4,x=1,I=2,L=1,F=2,Y=4,D=8,A=16,N=32,J=64,V=128,H=256,pe=512,_e=30,xe="...",lt=800,te=16,Pe=1,Be=2,j=3,G=1/0,me=9007199254740991,rt=17976931348623157e292,X=0/0,Z=4294967295,he=Z-1,fe=Z>>>1,Ge=[["ary",V],["bind",L],["bindKey",F],["curry",D],["curryRight",A],["flip",pe],["partial",N],["partialRight",J],["rearg",H]],ze="[object Arguments]",we="[object Array]",Te="[object AsyncFunction]",ft="[object Boolean]",ee="[object Date]",wt="[object DOMException]",nn="[object Error]",un="[object Function]",rn="[object GeneratorFunction]",qt="[object Map]",Kt="[object Number]",Xn="[object Null]",Gt="[object Object]",Fn="[object Promise]",$r="[object Proxy]",St="[object RegExp]",K="[object Set]",de="[object String]",qe="[object Symbol]",gt="[object Undefined]",it="[object WeakMap]",Ze="[object WeakSet]",Fe="[object ArrayBuffer]",mt="[object DataView]",Pt="[object Float32Array]",cn="[object Float64Array]",er="[object Int8Array]",ii="[object Int16Array]",Un="[object Int32Array]",Qt="[object Uint8Array]",Ci="[object Uint8ClampedArray]",Ti="[object Uint16Array]",Mi="[object Uint32Array]",nl=/\b__p \+= '';/g,rl=/\b(__p \+=) '' \+/g,il=/(__e\(.*?\)|\b__t\)) \+\n'';/g,al=/&(?:amp|lt|gt|quot|#39);/g,ll=/[&<>"']/g,ol=RegExp(al.source),Go=RegExp(ll.source),sl=/<%-([\s\S]+?)%>/g,Di=/<%([\s\S]+?)%>/g,Or=/<%=([\s\S]+?)%>/g,Rr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Qo=/^\w*$/,jo=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,da=/[\\^$.*+?()[\]{}|]/g,Zo=RegExp(da.source),fa=/^\s+/,Jo=/\s/,Xo=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,es=/\{\n\/\* \[wrapped with (.+)\] \*/,ts=/,? & /,Lr=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Nr=/[()=,{}\[\]\/\s]/,fr=/\\(\\)?/g,Br=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,qi=/\w*$/,ns=/^[-+]0x[0-9a-f]+$/i,ul=/^0b[01]+$/i,cl=/^\[object .+?Constructor\]$/,dl=/^0o[0-7]+$/i,fl=/^(?:0|[1-9]\d*)$/,T=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,le=/($^)/,re=/['\n\r\u2028\u2029\\]/g,Me="\\ud800-\\udfff",st="\\u0300-\\u036f",tt="\\ufe20-\\ufe2f",kt="\\u20d0-\\u20ff",Bt=st+tt+kt,Pi="\\u2700-\\u27bf",$c="a-z\\xdf-\\xf6\\xf8-\\xff",Mm="\\xac\\xb1\\xd7\\xf7",Dm="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",qm="\\u2000-\\u206f",Pm=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Oc="A-Z\\xc0-\\xd6\\xd8-\\xde",Rc="\\ufe0e\\ufe0f",Lc=Mm+Dm+qm+Pm,rs="['\u2019]",xm="["+Me+"]",Nc="["+Lc+"]",hl="["+Bt+"]",Bc="\\d+",Am="["+Pi+"]",Fc="["+$c+"]",Uc="[^"+Me+Lc+Bc+Pi+$c+Oc+"]",is="\\ud83c[\\udffb-\\udfff]",Em="(?:"+hl+"|"+is+")",zc="[^"+Me+"]",as="(?:\\ud83c[\\udde6-\\uddff]){2}",ls="[\\ud800-\\udbff][\\udc00-\\udfff]",xi="["+Oc+"]",Vc="\\u200d",Yc="(?:"+Fc+"|"+Uc+")",Im="(?:"+xi+"|"+Uc+")",Wc="(?:"+rs+"(?:d|ll|m|re|s|t|ve))?",Hc="(?:"+rs+"(?:D|LL|M|RE|S|T|VE))?",Kc=Em+"?",Gc="["+Rc+"]?",$m="(?:"+Vc+"(?:"+[zc,as,ls].join("|")+")"+Gc+Kc+")*",Om="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Rm="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Qc=Gc+Kc+$m,Lm="(?:"+[Am,as,ls].join("|")+")"+Qc,Nm="(?:"+[zc+hl+"?",hl,as,ls,xm].join("|")+")",Bm=RegExp(rs,"g"),Fm=RegExp(hl,"g"),os=RegExp(is+"(?="+is+")|"+Nm+Qc,"g"),Um=RegExp([xi+"?"+Fc+"+"+Wc+"(?="+[Nc,xi,"$"].join("|")+")",Im+"+"+Hc+"(?="+[Nc,xi+Yc,"$"].join("|")+")",xi+"?"+Yc+"+"+Wc,xi+"+"+Hc,Rm,Om,Bc,Lm].join("|"),"g"),zm=RegExp("["+Vc+Me+Bt+Rc+"]"),Vm=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ym=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Wm=-1,vt={};vt[Pt]=vt[cn]=vt[er]=vt[ii]=vt[Un]=vt[Qt]=vt[Ci]=vt[Ti]=vt[Mi]=!0,vt[ze]=vt[we]=vt[Fe]=vt[ft]=vt[mt]=vt[ee]=vt[nn]=vt[un]=vt[qt]=vt[Kt]=vt[Gt]=vt[St]=vt[K]=vt[de]=vt[it]=!1;var ht={};ht[ze]=ht[we]=ht[Fe]=ht[mt]=ht[ft]=ht[ee]=ht[Pt]=ht[cn]=ht[er]=ht[ii]=ht[Un]=ht[qt]=ht[Kt]=ht[Gt]=ht[St]=ht[K]=ht[de]=ht[qe]=ht[Qt]=ht[Ci]=ht[Ti]=ht[Mi]=!0,ht[nn]=ht[un]=ht[it]=!1;var Hm={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},Km={"&":"&","<":"<",">":">",'"':""","'":"'"},Gm={"&":"&","<":"<",">":">",""":'"',"'":"'"},Qm={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},jm=parseFloat,Zm=parseInt,jc=typeof Pa=="object"&&Pa&&Pa.Object===Object&&Pa,Jm=typeof self=="object"&&self&&self.Object===Object&&self,Ut=jc||Jm||Function("return this")(),ss=t&&!t.nodeType&&t,ai=ss&&!0&&e&&!e.nodeType&&e,Zc=ai&&ai.exports===ss,us=Zc&&jc.process,Dn=function(){try{var q=ai&&ai.require&&ai.require("util").types;return q||us&&us.binding&&us.binding("util")}catch{}}(),Jc=Dn&&Dn.isArrayBuffer,Xc=Dn&&Dn.isDate,ed=Dn&&Dn.isMap,td=Dn&&Dn.isRegExp,nd=Dn&&Dn.isSet,rd=Dn&&Dn.isTypedArray;function vn(q,B,R){switch(R.length){case 0:return q.call(B);case 1:return q.call(B,R[0]);case 2:return q.call(B,R[0],R[1]);case 3:return q.call(B,R[0],R[1],R[2])}return q.apply(B,R)}function Xm(q,B,R,ue){for(var Ae=-1,nt=q==null?0:q.length;++Ae-1}function cs(q,B,R){for(var ue=-1,Ae=q==null?0:q.length;++ue-1;);return R}function dd(q,B){for(var R=q.length;R--&&Ai(B,q[R],0)>-1;);return R}function sv(q,B){for(var R=q.length,ue=0;R--;)q[R]===B&&++ue;return ue}var uv=gs(Hm),cv=gs(Km);function dv(q){return"\\"+Qm[q]}function fv(q,B){return q==null?r:q[B]}function Ei(q){return zm.test(q)}function hv(q){return Vm.test(q)}function gv(q){for(var B,R=[];!(B=q.next()).done;)R.push(B.value);return R}function ys(q){var B=-1,R=Array(q.size);return q.forEach(function(ue,Ae){R[++B]=[Ae,ue]}),R}function fd(q,B){return function(R){return q(B(R))}}function zr(q,B){for(var R=-1,ue=q.length,Ae=0,nt=[];++R-1}function tp(n,i){var o=this.__data__,c=Al(o,n);return c<0?(++this.size,o.push([n,i])):o[c][1]=i,this}hr.prototype.clear=Zv,hr.prototype.delete=Jv,hr.prototype.get=Xv,hr.prototype.has=ep,hr.prototype.set=tp;function gr(n){var i=-1,o=n==null?0:n.length;for(this.clear();++i=i?n:i)),n}function An(n,i,o,c,h,p){var w,k=i&C,P=i&M,U=i&_;if(o&&(w=h?o(n,c,h,p):o(n)),w!==r)return w;if(!Ct(n))return n;var z=Ee(n);if(z){if(w=a0(n),!k)return dn(n,w)}else{var W=Zt(n),ne=W==un||W==rn;if(Gr(n))return Gd(n,k);if(W==Gt||W==ze||ne&&!h){if(w=P||ne?{}:gf(n),!k)return P?Gp(n,pp(w,n)):Kp(n,Cd(w,n))}else{if(!ht[W])return h?n:{};w=l0(n,W,k)}}p||(p=new Vn);var ve=p.get(n);if(ve)return ve;p.set(n,w),Vf(n)?n.forEach(function(Ce){w.add(An(Ce,i,o,Ce,n,p))}):Uf(n)&&n.forEach(function(Ce,We){w.set(We,An(Ce,i,o,We,n,p))});var ke=U?P?Ys:Vs:P?hn:Ft,Ne=z?r:ke(n);return qn(Ne||n,function(Ce,We){Ne&&(We=Ce,Ce=n[We]),_a(w,We,An(Ce,i,o,We,n,p))}),w}function yp(n){var i=Ft(n);return function(o){return Td(o,n,i)}}function Td(n,i,o){var c=o.length;if(n==null)return!c;for(n=dt(n);c--;){var h=o[c],p=i[h],w=n[h];if(w===r&&!(h in n)||!p(w))return!1}return!0}function Md(n,i,o){if(typeof n!="function")throw new Pn(u);return Ma(function(){n.apply(r,o)},i)}function ba(n,i,o,c){var h=-1,p=gl,w=!0,k=n.length,P=[],U=i.length;if(!k)return P;o&&(i=_t(i,pn(o))),c?(p=cs,w=!1):i.length>=l&&(p=ha,w=!1,i=new si(i));e:for(;++hh?0:h+o),c=c===r||c>h?h:Oe(c),c<0&&(c+=h),c=o>c?0:Wf(c);o0&&o(k)?i>1?zt(k,i-1,o,c,h):Ur(h,k):c||(h[h.length]=k)}return h}var Ts=ef(),Pd=ef(!0);function tr(n,i){return n&&Ts(n,i,Ft)}function Ms(n,i){return n&&Pd(n,i,Ft)}function Il(n,i){return Fr(i,function(o){return _r(n[o])})}function ci(n,i){i=Hr(i,n);for(var o=0,c=i.length;n!=null&&oi}function wp(n,i){return n!=null&&ot.call(n,i)}function Sp(n,i){return n!=null&&i in dt(n)}function kp(n,i,o){return n>=jt(i,o)&&n=120&&z.length>=120)?new si(w&&z):r}z=n[0];var W=-1,ne=k[0];e:for(;++W-1;)k!==n&&Cl.call(k,P,1),Cl.call(n,P,1);return n}function Fd(n,i){for(var o=n?i.length:0,c=o-1;o--;){var h=i[o];if(o==c||h!==p){var p=h;yr(h)?Cl.call(n,h,1):Rs(n,h)}}return n}function Is(n,i){return n+Dl(bd()*(i-n+1))}function Rp(n,i,o,c){for(var h=-1,p=Ot(Ml((i-n)/(o||1)),0),w=R(p);p--;)w[c?p:++h]=n,n+=o;return w}function $s(n,i){var o="";if(!n||i<1||i>me)return o;do i%2&&(o+=n),i=Dl(i/2),i&&(n+=n);while(i);return o}function Ue(n,i){return Zs(pf(n,i,gn),n+"")}function Lp(n){return kd(Vi(n))}function Np(n,i){var o=Vi(n);return Yl(o,ui(i,0,o.length))}function ka(n,i,o,c){if(!Ct(n))return n;i=Hr(i,n);for(var h=-1,p=i.length,w=p-1,k=n;k!=null&&++hh?0:h+i),o=o>h?h:o,o<0&&(o+=h),h=i>o?0:o-i>>>0,i>>>=0;for(var p=R(h);++c>>1,w=n[p];w!==null&&!_n(w)&&(o?w<=i:w=l){var U=i?null:Jp(n);if(U)return vl(U);w=!1,h=ha,P=new si}else P=i?[]:k;e:for(;++c=c?n:En(n,i,o)}var Kd=Pv||function(n){return Ut.clearTimeout(n)};function Gd(n,i){if(i)return n.slice();var o=n.length,c=md?md(o):new n.constructor(o);return n.copy(c),c}function Fs(n){var i=new n.constructor(n.byteLength);return new Sl(i).set(new Sl(n)),i}function Vp(n,i){var o=i?Fs(n.buffer):n.buffer;return new n.constructor(o,n.byteOffset,n.byteLength)}function Yp(n){var i=new n.constructor(n.source,qi.exec(n));return i.lastIndex=n.lastIndex,i}function Wp(n){return ya?dt(ya.call(n)):{}}function Qd(n,i){var o=i?Fs(n.buffer):n.buffer;return new n.constructor(o,n.byteOffset,n.length)}function jd(n,i){if(n!==i){var o=n!==r,c=n===null,h=n===n,p=_n(n),w=i!==r,k=i===null,P=i===i,U=_n(i);if(!k&&!U&&!p&&n>i||p&&w&&P&&!k&&!U||c&&w&&P||!o&&P||!h)return 1;if(!c&&!p&&!U&&n=k)return P;var U=o[c];return P*(U=="desc"?-1:1)}}return n.index-i.index}function Zd(n,i,o,c){for(var h=-1,p=n.length,w=o.length,k=-1,P=i.length,U=Ot(p-w,0),z=R(P+U),W=!c;++k1?o[h-1]:r,w=h>2?o[2]:r;for(p=n.length>3&&typeof p=="function"?(h--,p):r,w&&ln(o[0],o[1],w)&&(p=h<3?r:p,h=1),i=dt(i);++c-1?h[p?i[w]:w]:r}}function rf(n){return pr(function(i){var o=i.length,c=o,h=xn.prototype.thru;for(n&&i.reverse();c--;){var p=i[c];if(typeof p!="function")throw new Pn(u);if(h&&!w&&zl(p)=="wrapper")var w=new xn([],!0)}for(c=w?c:o;++c1&&Qe.reverse(),z&&Pk))return!1;var U=p.get(n),z=p.get(i);if(U&&z)return U==i&&z==n;var W=-1,ne=!0,ve=o&I?new si:r;for(p.set(n,i),p.set(i,n);++W1?"& ":"")+i[c],i=i.join(o>2?", ":" "),n.replace(Xo,`{ + */(function(e,t){(function(){var r,a="4.17.21",l=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",u="Expected a function",d="Invalid `variable` option passed into `_.template`",f="__lodash_hash_undefined__",g=500,v="__lodash_placeholder__",C=1,M=2,_=4,x=1,I=2,L=1,F=2,Y=4,D=8,A=16,N=32,J=64,V=128,H=256,pe=512,_e=30,xe="...",lt=800,te=16,Pe=1,Be=2,j=3,G=1/0,me=9007199254740991,rt=17976931348623157e292,X=0/0,Z=4294967295,he=Z-1,fe=Z>>>1,Ge=[["ary",V],["bind",L],["bindKey",F],["curry",D],["curryRight",A],["flip",pe],["partial",N],["partialRight",J],["rearg",H]],ze="[object Arguments]",we="[object Array]",Me="[object AsyncFunction]",ft="[object Boolean]",ee="[object Date]",wt="[object DOMException]",nn="[object Error]",un="[object Function]",rn="[object GeneratorFunction]",qt="[object Map]",Kt="[object Number]",Xn="[object Null]",Gt="[object Object]",Fn="[object Promise]",$r="[object Proxy]",St="[object RegExp]",K="[object Set]",de="[object String]",qe="[object Symbol]",gt="[object Undefined]",it="[object WeakMap]",Ze="[object WeakSet]",Fe="[object ArrayBuffer]",mt="[object DataView]",Pt="[object Float32Array]",cn="[object Float64Array]",er="[object Int8Array]",ii="[object Int16Array]",Un="[object Int32Array]",Qt="[object Uint8Array]",Ci="[object Uint8ClampedArray]",Ti="[object Uint16Array]",Mi="[object Uint32Array]",nl=/\b__p \+= '';/g,rl=/\b(__p \+=) '' \+/g,il=/(__e\(.*?\)|\b__t\)) \+\n'';/g,al=/&(?:amp|lt|gt|quot|#39);/g,ll=/[&<>"']/g,ol=RegExp(al.source),Go=RegExp(ll.source),sl=/<%-([\s\S]+?)%>/g,Di=/<%([\s\S]+?)%>/g,Or=/<%=([\s\S]+?)%>/g,Rr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Qo=/^\w*$/,jo=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,da=/[\\^$.*+?()[\]{}|]/g,Zo=RegExp(da.source),fa=/^\s+/,Jo=/\s/,Xo=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,es=/\{\n\/\* \[wrapped with (.+)\] \*/,ts=/,? & /,Lr=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Nr=/[()=,{}\[\]\/\s]/,fr=/\\(\\)?/g,Br=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,qi=/\w*$/,ns=/^[-+]0x[0-9a-f]+$/i,ul=/^0b[01]+$/i,cl=/^\[object .+?Constructor\]$/,dl=/^0o[0-7]+$/i,fl=/^(?:0|[1-9]\d*)$/,T=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,le=/($^)/,ie=/['\n\r\u2028\u2029\\]/g,De="\\ud800-\\udfff",st="\\u0300-\\u036f",tt="\\ufe20-\\ufe2f",kt="\\u20d0-\\u20ff",Bt=st+tt+kt,Pi="\\u2700-\\u27bf",$c="a-z\\xdf-\\xf6\\xf8-\\xff",Mm="\\xac\\xb1\\xd7\\xf7",Dm="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",qm="\\u2000-\\u206f",Pm=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Oc="A-Z\\xc0-\\xd6\\xd8-\\xde",Rc="\\ufe0e\\ufe0f",Lc=Mm+Dm+qm+Pm,rs="['\u2019]",xm="["+De+"]",Nc="["+Lc+"]",hl="["+Bt+"]",Bc="\\d+",Am="["+Pi+"]",Fc="["+$c+"]",Uc="[^"+De+Lc+Bc+Pi+$c+Oc+"]",is="\\ud83c[\\udffb-\\udfff]",Em="(?:"+hl+"|"+is+")",zc="[^"+De+"]",as="(?:\\ud83c[\\udde6-\\uddff]){2}",ls="[\\ud800-\\udbff][\\udc00-\\udfff]",xi="["+Oc+"]",Vc="\\u200d",Yc="(?:"+Fc+"|"+Uc+")",Im="(?:"+xi+"|"+Uc+")",Wc="(?:"+rs+"(?:d|ll|m|re|s|t|ve))?",Hc="(?:"+rs+"(?:D|LL|M|RE|S|T|VE))?",Kc=Em+"?",Gc="["+Rc+"]?",$m="(?:"+Vc+"(?:"+[zc,as,ls].join("|")+")"+Gc+Kc+")*",Om="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Rm="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Qc=Gc+Kc+$m,Lm="(?:"+[Am,as,ls].join("|")+")"+Qc,Nm="(?:"+[zc+hl+"?",hl,as,ls,xm].join("|")+")",Bm=RegExp(rs,"g"),Fm=RegExp(hl,"g"),os=RegExp(is+"(?="+is+")|"+Nm+Qc,"g"),Um=RegExp([xi+"?"+Fc+"+"+Wc+"(?="+[Nc,xi,"$"].join("|")+")",Im+"+"+Hc+"(?="+[Nc,xi+Yc,"$"].join("|")+")",xi+"?"+Yc+"+"+Wc,xi+"+"+Hc,Rm,Om,Bc,Lm].join("|"),"g"),zm=RegExp("["+Vc+De+Bt+Rc+"]"),Vm=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ym=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Wm=-1,vt={};vt[Pt]=vt[cn]=vt[er]=vt[ii]=vt[Un]=vt[Qt]=vt[Ci]=vt[Ti]=vt[Mi]=!0,vt[ze]=vt[we]=vt[Fe]=vt[ft]=vt[mt]=vt[ee]=vt[nn]=vt[un]=vt[qt]=vt[Kt]=vt[Gt]=vt[St]=vt[K]=vt[de]=vt[it]=!1;var ht={};ht[ze]=ht[we]=ht[Fe]=ht[mt]=ht[ft]=ht[ee]=ht[Pt]=ht[cn]=ht[er]=ht[ii]=ht[Un]=ht[qt]=ht[Kt]=ht[Gt]=ht[St]=ht[K]=ht[de]=ht[qe]=ht[Qt]=ht[Ci]=ht[Ti]=ht[Mi]=!0,ht[nn]=ht[un]=ht[it]=!1;var Hm={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},Km={"&":"&","<":"<",">":">",'"':""","'":"'"},Gm={"&":"&","<":"<",">":">",""":'"',"'":"'"},Qm={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},jm=parseFloat,Zm=parseInt,jc=typeof Pa=="object"&&Pa&&Pa.Object===Object&&Pa,Jm=typeof self=="object"&&self&&self.Object===Object&&self,Ut=jc||Jm||Function("return this")(),ss=t&&!t.nodeType&&t,ai=ss&&!0&&e&&!e.nodeType&&e,Zc=ai&&ai.exports===ss,us=Zc&&jc.process,qn=function(){try{var q=ai&&ai.require&&ai.require("util").types;return q||us&&us.binding&&us.binding("util")}catch{}}(),Jc=qn&&qn.isArrayBuffer,Xc=qn&&qn.isDate,ed=qn&&qn.isMap,td=qn&&qn.isRegExp,nd=qn&&qn.isSet,rd=qn&&qn.isTypedArray;function vn(q,B,R){switch(R.length){case 0:return q.call(B);case 1:return q.call(B,R[0]);case 2:return q.call(B,R[0],R[1]);case 3:return q.call(B,R[0],R[1],R[2])}return q.apply(B,R)}function Xm(q,B,R,ue){for(var Ae=-1,nt=q==null?0:q.length;++Ae-1}function cs(q,B,R){for(var ue=-1,Ae=q==null?0:q.length;++ue-1;);return R}function dd(q,B){for(var R=q.length;R--&&Ai(B,q[R],0)>-1;);return R}function sv(q,B){for(var R=q.length,ue=0;R--;)q[R]===B&&++ue;return ue}var uv=gs(Hm),cv=gs(Km);function dv(q){return"\\"+Qm[q]}function fv(q,B){return q==null?r:q[B]}function Ei(q){return zm.test(q)}function hv(q){return Vm.test(q)}function gv(q){for(var B,R=[];!(B=q.next()).done;)R.push(B.value);return R}function ys(q){var B=-1,R=Array(q.size);return q.forEach(function(ue,Ae){R[++B]=[Ae,ue]}),R}function fd(q,B){return function(R){return q(B(R))}}function zr(q,B){for(var R=-1,ue=q.length,Ae=0,nt=[];++R-1}function tp(n,i){var o=this.__data__,c=Al(o,n);return c<0?(++this.size,o.push([n,i])):o[c][1]=i,this}hr.prototype.clear=Zv,hr.prototype.delete=Jv,hr.prototype.get=Xv,hr.prototype.has=ep,hr.prototype.set=tp;function gr(n){var i=-1,o=n==null?0:n.length;for(this.clear();++i=i?n:i)),n}function En(n,i,o,c,h,p){var w,k=i&C,P=i&M,U=i&_;if(o&&(w=h?o(n,c,h,p):o(n)),w!==r)return w;if(!Ct(n))return n;var z=Ee(n);if(z){if(w=a0(n),!k)return dn(n,w)}else{var W=Zt(n),ne=W==un||W==rn;if(Gr(n))return Gd(n,k);if(W==Gt||W==ze||ne&&!h){if(w=P||ne?{}:gf(n),!k)return P?Gp(n,pp(w,n)):Kp(n,Cd(w,n))}else{if(!ht[W])return h?n:{};w=l0(n,W,k)}}p||(p=new Vn);var ve=p.get(n);if(ve)return ve;p.set(n,w),Vf(n)?n.forEach(function(Ce){w.add(En(Ce,i,o,Ce,n,p))}):Uf(n)&&n.forEach(function(Ce,We){w.set(We,En(Ce,i,o,We,n,p))});var ke=U?P?Ys:Vs:P?hn:Ft,Le=z?r:ke(n);return Pn(Le||n,function(Ce,We){Le&&(We=Ce,Ce=n[We]),_a(w,We,En(Ce,i,o,We,n,p))}),w}function yp(n){var i=Ft(n);return function(o){return Td(o,n,i)}}function Td(n,i,o){var c=o.length;if(n==null)return!c;for(n=dt(n);c--;){var h=o[c],p=i[h],w=n[h];if(w===r&&!(h in n)||!p(w))return!1}return!0}function Md(n,i,o){if(typeof n!="function")throw new xn(u);return Ma(function(){n.apply(r,o)},i)}function ba(n,i,o,c){var h=-1,p=gl,w=!0,k=n.length,P=[],U=i.length;if(!k)return P;o&&(i=_t(i,pn(o))),c?(p=cs,w=!1):i.length>=l&&(p=ha,w=!1,i=new si(i));e:for(;++hh?0:h+o),c=c===r||c>h?h:Oe(c),c<0&&(c+=h),c=o>c?0:Wf(c);o0&&o(k)?i>1?zt(k,i-1,o,c,h):Ur(h,k):c||(h[h.length]=k)}return h}var Ts=ef(),Pd=ef(!0);function tr(n,i){return n&&Ts(n,i,Ft)}function Ms(n,i){return n&&Pd(n,i,Ft)}function Il(n,i){return Fr(i,function(o){return _r(n[o])})}function ci(n,i){i=Hr(i,n);for(var o=0,c=i.length;n!=null&&oi}function wp(n,i){return n!=null&&ot.call(n,i)}function Sp(n,i){return n!=null&&i in dt(n)}function kp(n,i,o){return n>=jt(i,o)&&n=120&&z.length>=120)?new si(w&&z):r}z=n[0];var W=-1,ne=k[0];e:for(;++W-1;)k!==n&&Cl.call(k,P,1),Cl.call(n,P,1);return n}function Fd(n,i){for(var o=n?i.length:0,c=o-1;o--;){var h=i[o];if(o==c||h!==p){var p=h;yr(h)?Cl.call(n,h,1):Rs(n,h)}}return n}function Is(n,i){return n+Dl(bd()*(i-n+1))}function Rp(n,i,o,c){for(var h=-1,p=Ot(Ml((i-n)/(o||1)),0),w=R(p);p--;)w[c?p:++h]=n,n+=o;return w}function $s(n,i){var o="";if(!n||i<1||i>me)return o;do i%2&&(o+=n),i=Dl(i/2),i&&(n+=n);while(i);return o}function Ue(n,i){return Zs(pf(n,i,gn),n+"")}function Lp(n){return kd(Vi(n))}function Np(n,i){var o=Vi(n);return Yl(o,ui(i,0,o.length))}function ka(n,i,o,c){if(!Ct(n))return n;i=Hr(i,n);for(var h=-1,p=i.length,w=p-1,k=n;k!=null&&++hh?0:h+i),o=o>h?h:o,o<0&&(o+=h),h=i>o?0:o-i>>>0,i>>>=0;for(var p=R(h);++c>>1,w=n[p];w!==null&&!_n(w)&&(o?w<=i:w=l){var U=i?null:Jp(n);if(U)return vl(U);w=!1,h=ha,P=new si}else P=i?[]:k;e:for(;++c=c?n:In(n,i,o)}var Kd=Pv||function(n){return Ut.clearTimeout(n)};function Gd(n,i){if(i)return n.slice();var o=n.length,c=md?md(o):new n.constructor(o);return n.copy(c),c}function Fs(n){var i=new n.constructor(n.byteLength);return new Sl(i).set(new Sl(n)),i}function Vp(n,i){var o=i?Fs(n.buffer):n.buffer;return new n.constructor(o,n.byteOffset,n.byteLength)}function Yp(n){var i=new n.constructor(n.source,qi.exec(n));return i.lastIndex=n.lastIndex,i}function Wp(n){return ya?dt(ya.call(n)):{}}function Qd(n,i){var o=i?Fs(n.buffer):n.buffer;return new n.constructor(o,n.byteOffset,n.length)}function jd(n,i){if(n!==i){var o=n!==r,c=n===null,h=n===n,p=_n(n),w=i!==r,k=i===null,P=i===i,U=_n(i);if(!k&&!U&&!p&&n>i||p&&w&&P&&!k&&!U||c&&w&&P||!o&&P||!h)return 1;if(!c&&!p&&!U&&n=k)return P;var U=o[c];return P*(U=="desc"?-1:1)}}return n.index-i.index}function Zd(n,i,o,c){for(var h=-1,p=n.length,w=o.length,k=-1,P=i.length,U=Ot(p-w,0),z=R(P+U),W=!c;++k1?o[h-1]:r,w=h>2?o[2]:r;for(p=n.length>3&&typeof p=="function"?(h--,p):r,w&&ln(o[0],o[1],w)&&(p=h<3?r:p,h=1),i=dt(i);++c-1?h[p?i[w]:w]:r}}function rf(n){return pr(function(i){var o=i.length,c=o,h=An.prototype.thru;for(n&&i.reverse();c--;){var p=i[c];if(typeof p!="function")throw new xn(u);if(h&&!w&&zl(p)=="wrapper")var w=new An([],!0)}for(c=w?c:o;++c1&&Qe.reverse(),z&&Pk))return!1;var U=p.get(n),z=p.get(i);if(U&&z)return U==i&&z==n;var W=-1,ne=!0,ve=o&I?new si:r;for(p.set(n,i),p.set(i,n);++W1?"& ":"")+i[c],i=i.join(o>2?", ":" "),n.replace(Xo,`{ /* [wrapped with `+i+`] */ -`)}function s0(n){return Ee(n)||hi(n)||!!(yd&&n&&n[yd])}function yr(n,i){var o=typeof n;return i=i==null?me:i,!!i&&(o=="number"||o!="symbol"&&fl.test(n))&&n>-1&&n%1==0&&n0){if(++i>=lt)return arguments[0]}else i=0;return n.apply(r,arguments)}}function Yl(n,i){var o=-1,c=n.length,h=c-1;for(i=i===r?c:i;++o1?n[i-1]:r;return o=typeof o=="function"?(n.pop(),o):r,Pf(n,o)});function xf(n){var i=m(n);return i.__chain__=!0,i}function _y(n,i){return i(n),n}function Wl(n,i){return i(n)}var by=pr(function(n){var i=n.length,o=i?n[0]:0,c=this.__wrapped__,h=function(p){return Cs(p,n)};return i>1||this.__actions__.length||!(c instanceof He)||!yr(o)?this.thru(h):(c=c.slice(o,+o+(i?1:0)),c.__actions__.push({func:Wl,args:[h],thisArg:r}),new xn(c,this.__chain__).thru(function(p){return i&&!p.length&&p.push(r),p}))});function wy(){return xf(this)}function Sy(){return new xn(this.value(),this.__chain__)}function ky(){this.__values__===r&&(this.__values__=Yf(this.value()));var n=this.__index__>=this.__values__.length,i=n?r:this.__values__[this.__index__++];return{done:n,value:i}}function Cy(){return this}function Ty(n){for(var i,o=this;o instanceof xl;){var c=kf(o);c.__index__=0,c.__values__=r,i?h.__wrapped__=c:i=c;var h=c;o=o.__wrapped__}return h.__wrapped__=n,i}function My(){var n=this.__wrapped__;if(n instanceof He){var i=n;return this.__actions__.length&&(i=new He(this)),i=i.reverse(),i.__actions__.push({func:Wl,args:[Js],thisArg:r}),new xn(i,this.__chain__)}return this.thru(Js)}function Dy(){return Wd(this.__wrapped__,this.__actions__)}var qy=Ll(function(n,i,o){ot.call(n,o)?++n[o]:mr(n,o,1)});function Py(n,i,o){var c=Ee(n)?id:_p;return o&&ln(n,i,o)&&(i=r),c(n,Se(i,3))}function xy(n,i){var o=Ee(n)?Fr:qd;return o(n,Se(i,3))}var Ay=nf(Cf),Ey=nf(Tf);function Iy(n,i){return zt(Hl(n,i),1)}function $y(n,i){return zt(Hl(n,i),G)}function Oy(n,i,o){return o=o===r?1:Oe(o),zt(Hl(n,i),o)}function Af(n,i){var o=Ee(n)?qn:Yr;return o(n,Se(i,3))}function Ef(n,i){var o=Ee(n)?ev:Dd;return o(n,Se(i,3))}var Ry=Ll(function(n,i,o){ot.call(n,o)?n[o].push(i):mr(n,o,[i])});function Ly(n,i,o,c){n=fn(n)?n:Vi(n),o=o&&!c?Oe(o):0;var h=n.length;return o<0&&(o=Ot(h+o,0)),Zl(n)?o<=h&&n.indexOf(i,o)>-1:!!h&&Ai(n,i,o)>-1}var Ny=Ue(function(n,i,o){var c=-1,h=typeof i=="function",p=fn(n)?R(n.length):[];return Yr(n,function(w){p[++c]=h?vn(i,w,o):wa(w,i,o)}),p}),By=Ll(function(n,i,o){mr(n,o,i)});function Hl(n,i){var o=Ee(n)?_t:$d;return o(n,Se(i,3))}function Fy(n,i,o,c){return n==null?[]:(Ee(i)||(i=i==null?[]:[i]),o=c?r:o,Ee(o)||(o=o==null?[]:[o]),Nd(n,i,o))}var Uy=Ll(function(n,i,o){n[o?0:1].push(i)},function(){return[[],[]]});function zy(n,i,o){var c=Ee(n)?ds:sd,h=arguments.length<3;return c(n,Se(i,4),o,h,Yr)}function Vy(n,i,o){var c=Ee(n)?tv:sd,h=arguments.length<3;return c(n,Se(i,4),o,h,Dd)}function Yy(n,i){var o=Ee(n)?Fr:qd;return o(n,Ql(Se(i,3)))}function Wy(n){var i=Ee(n)?kd:Lp;return i(n)}function Hy(n,i,o){(o?ln(n,i,o):i===r)?i=1:i=Oe(i);var c=Ee(n)?gp:Np;return c(n,i)}function Ky(n){var i=Ee(n)?mp:Fp;return i(n)}function Gy(n){if(n==null)return 0;if(fn(n))return Zl(n)?Ii(n):n.length;var i=Zt(n);return i==qt||i==K?n.size:xs(n).length}function Qy(n,i,o){var c=Ee(n)?fs:Up;return o&&ln(n,i,o)&&(i=r),c(n,Se(i,3))}var jy=Ue(function(n,i){if(n==null)return[];var o=i.length;return o>1&&ln(n,i[0],i[1])?i=[]:o>2&&ln(i[0],i[1],i[2])&&(i=[i[0]]),Nd(n,zt(i,1),[])}),Kl=xv||function(){return Ut.Date.now()};function Zy(n,i){if(typeof i!="function")throw new Pn(u);return n=Oe(n),function(){if(--n<1)return i.apply(this,arguments)}}function If(n,i,o){return i=o?r:i,i=n&&i==null?n.length:i,vr(n,V,r,r,r,r,i)}function $f(n,i){var o;if(typeof i!="function")throw new Pn(u);return n=Oe(n),function(){return--n>0&&(o=i.apply(this,arguments)),n<=1&&(i=r),o}}var eu=Ue(function(n,i,o){var c=L;if(o.length){var h=zr(o,Ui(eu));c|=N}return vr(n,c,i,o,h)}),Of=Ue(function(n,i,o){var c=L|F;if(o.length){var h=zr(o,Ui(Of));c|=N}return vr(i,c,n,o,h)});function Rf(n,i,o){i=o?r:i;var c=vr(n,D,r,r,r,r,r,i);return c.placeholder=Rf.placeholder,c}function Lf(n,i,o){i=o?r:i;var c=vr(n,A,r,r,r,r,r,i);return c.placeholder=Lf.placeholder,c}function Nf(n,i,o){var c,h,p,w,k,P,U=0,z=!1,W=!1,ne=!0;if(typeof n!="function")throw new Pn(u);i=$n(i)||0,Ct(o)&&(z=!!o.leading,W="maxWait"in o,p=W?Ot($n(o.maxWait)||0,i):p,ne="trailing"in o?!!o.trailing:ne);function ve(At){var Wn=c,wr=h;return c=h=r,U=At,w=n.apply(wr,Wn),w}function ke(At){return U=At,k=Ma(We,i),z?ve(At):w}function Ne(At){var Wn=At-P,wr=At-U,rh=i-Wn;return W?jt(rh,p-wr):rh}function Ce(At){var Wn=At-P,wr=At-U;return P===r||Wn>=i||Wn<0||W&&wr>=p}function We(){var At=Kl();if(Ce(At))return Qe(At);k=Ma(We,Ne(At))}function Qe(At){return k=r,ne&&c?ve(At):(c=h=r,w)}function bn(){k!==r&&Kd(k),U=0,c=P=h=k=r}function on(){return k===r?w:Qe(Kl())}function wn(){var At=Kl(),Wn=Ce(At);if(c=arguments,h=this,P=At,Wn){if(k===r)return ke(P);if(W)return Kd(k),k=Ma(We,i),ve(P)}return k===r&&(k=Ma(We,i)),w}return wn.cancel=bn,wn.flush=on,wn}var Jy=Ue(function(n,i){return Md(n,1,i)}),Xy=Ue(function(n,i,o){return Md(n,$n(i)||0,o)});function e1(n){return vr(n,pe)}function Gl(n,i){if(typeof n!="function"||i!=null&&typeof i!="function")throw new Pn(u);var o=function(){var c=arguments,h=i?i.apply(this,c):c[0],p=o.cache;if(p.has(h))return p.get(h);var w=n.apply(this,c);return o.cache=p.set(h,w)||p,w};return o.cache=new(Gl.Cache||gr),o}Gl.Cache=gr;function Ql(n){if(typeof n!="function")throw new Pn(u);return function(){var i=arguments;switch(i.length){case 0:return!n.call(this);case 1:return!n.call(this,i[0]);case 2:return!n.call(this,i[0],i[1]);case 3:return!n.call(this,i[0],i[1],i[2])}return!n.apply(this,i)}}function t1(n){return $f(2,n)}var n1=zp(function(n,i){i=i.length==1&&Ee(i[0])?_t(i[0],pn(Se())):_t(zt(i,1),pn(Se()));var o=i.length;return Ue(function(c){for(var h=-1,p=jt(c.length,o);++h=i}),hi=Ad(function(){return arguments}())?Ad:function(n){return Tt(n)&&ot.call(n,"callee")&&!pd.call(n,"callee")},Ee=R.isArray,p1=Jc?pn(Jc):Tp;function fn(n){return n!=null&&jl(n.length)&&!_r(n)}function xt(n){return Tt(n)&&fn(n)}function y1(n){return n===!0||n===!1||Tt(n)&&an(n)==ft}var Gr=Ev||fu,_1=Xc?pn(Xc):Mp;function b1(n){return Tt(n)&&n.nodeType===1&&!Da(n)}function w1(n){if(n==null)return!0;if(fn(n)&&(Ee(n)||typeof n=="string"||typeof n.splice=="function"||Gr(n)||zi(n)||hi(n)))return!n.length;var i=Zt(n);if(i==qt||i==K)return!n.size;if(Ta(n))return!xs(n).length;for(var o in n)if(ot.call(n,o))return!1;return!0}function S1(n,i){return Sa(n,i)}function k1(n,i,o){o=typeof o=="function"?o:r;var c=o?o(n,i):r;return c===r?Sa(n,i,r,o):!!c}function nu(n){if(!Tt(n))return!1;var i=an(n);return i==nn||i==wt||typeof n.message=="string"&&typeof n.name=="string"&&!Da(n)}function C1(n){return typeof n=="number"&&_d(n)}function _r(n){if(!Ct(n))return!1;var i=an(n);return i==un||i==rn||i==Te||i==$r}function Ff(n){return typeof n=="number"&&n==Oe(n)}function jl(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=me}function Ct(n){var i=typeof n;return n!=null&&(i=="object"||i=="function")}function Tt(n){return n!=null&&typeof n=="object"}var Uf=ed?pn(ed):qp;function T1(n,i){return n===i||Ps(n,i,Hs(i))}function M1(n,i,o){return o=typeof o=="function"?o:r,Ps(n,i,Hs(i),o)}function D1(n){return zf(n)&&n!=+n}function q1(n){if(d0(n))throw new Ae(s);return Ed(n)}function P1(n){return n===null}function x1(n){return n==null}function zf(n){return typeof n=="number"||Tt(n)&&an(n)==Kt}function Da(n){if(!Tt(n)||an(n)!=Gt)return!1;var i=kl(n);if(i===null)return!0;var o=ot.call(i,"constructor")&&i.constructor;return typeof o=="function"&&o instanceof o&&_l.call(o)==Mv}var ru=td?pn(td):Pp;function A1(n){return Ff(n)&&n>=-me&&n<=me}var Vf=nd?pn(nd):xp;function Zl(n){return typeof n=="string"||!Ee(n)&&Tt(n)&&an(n)==de}function _n(n){return typeof n=="symbol"||Tt(n)&&an(n)==qe}var zi=rd?pn(rd):Ap;function E1(n){return n===r}function I1(n){return Tt(n)&&Zt(n)==it}function $1(n){return Tt(n)&&an(n)==Ze}var O1=Ul(As),R1=Ul(function(n,i){return n<=i});function Yf(n){if(!n)return[];if(fn(n))return Zl(n)?zn(n):dn(n);if(ga&&n[ga])return gv(n[ga]());var i=Zt(n),o=i==qt?ys:i==K?vl:Vi;return o(n)}function br(n){if(!n)return n===0?n:0;if(n=$n(n),n===G||n===-G){var i=n<0?-1:1;return i*rt}return n===n?n:0}function Oe(n){var i=br(n),o=i%1;return i===i?o?i-o:i:0}function Wf(n){return n?ui(Oe(n),0,Z):0}function $n(n){if(typeof n=="number")return n;if(_n(n))return X;if(Ct(n)){var i=typeof n.valueOf=="function"?n.valueOf():n;n=Ct(i)?i+"":i}if(typeof n!="string")return n===0?n:+n;n=ud(n);var o=ul.test(n);return o||dl.test(n)?Zm(n.slice(2),o?2:8):ns.test(n)?X:+n}function Hf(n){return nr(n,hn(n))}function L1(n){return n?ui(Oe(n),-me,me):n===0?n:0}function at(n){return n==null?"":yn(n)}var N1=Bi(function(n,i){if(Ta(i)||fn(i)){nr(i,Ft(i),n);return}for(var o in i)ot.call(i,o)&&_a(n,o,i[o])}),Kf=Bi(function(n,i){nr(i,hn(i),n)}),Jl=Bi(function(n,i,o,c){nr(i,hn(i),n,c)}),B1=Bi(function(n,i,o,c){nr(i,Ft(i),n,c)}),F1=pr(Cs);function U1(n,i){var o=Ni(n);return i==null?o:Cd(o,i)}var z1=Ue(function(n,i){n=dt(n);var o=-1,c=i.length,h=c>2?i[2]:r;for(h&&ln(i[0],i[1],h)&&(c=1);++o1),p}),nr(n,Ys(n),o),c&&(o=An(o,C|M|_,Xp));for(var h=i.length;h--;)Rs(o,i[h]);return o});function l_(n,i){return Qf(n,Ql(Se(i)))}var o_=pr(function(n,i){return n==null?{}:$p(n,i)});function Qf(n,i){if(n==null)return{};var o=_t(Ys(n),function(c){return[c]});return i=Se(i),Bd(n,o,function(c,h){return i(c,h[0])})}function s_(n,i,o){i=Hr(i,n);var c=-1,h=i.length;for(h||(h=1,n=r);++ci){var c=n;n=i,i=c}if(o||n%1||i%1){var h=bd();return jt(n+h*(i-n+jm("1e-"+((h+"").length-1))),i)}return Is(n,i)}var __=Fi(function(n,i,o){return i=i.toLowerCase(),n+(o?Jf(i):i)});function Jf(n){return lu(at(n).toLowerCase())}function Xf(n){return n=at(n),n&&n.replace(T,uv).replace(Fm,"")}function b_(n,i,o){n=at(n),i=yn(i);var c=n.length;o=o===r?c:ui(Oe(o),0,c);var h=o;return o-=i.length,o>=0&&n.slice(o,h)==i}function w_(n){return n=at(n),n&&Go.test(n)?n.replace(ll,cv):n}function S_(n){return n=at(n),n&&Zo.test(n)?n.replace(da,"\\$&"):n}var k_=Fi(function(n,i,o){return n+(o?"-":"")+i.toLowerCase()}),C_=Fi(function(n,i,o){return n+(o?" ":"")+i.toLowerCase()}),T_=tf("toLowerCase");function M_(n,i,o){n=at(n),i=Oe(i);var c=i?Ii(n):0;if(!i||c>=i)return n;var h=(i-c)/2;return Fl(Dl(h),o)+n+Fl(Ml(h),o)}function D_(n,i,o){n=at(n),i=Oe(i);var c=i?Ii(n):0;return i&&c>>0,o?(n=at(n),n&&(typeof i=="string"||i!=null&&!ru(i))&&(i=yn(i),!i&&Ei(n))?Kr(zn(n),0,o):n.split(i,o)):[]}var $_=Fi(function(n,i,o){return n+(o?" ":"")+lu(i)});function O_(n,i,o){return n=at(n),o=o==null?0:ui(Oe(o),0,n.length),i=yn(i),n.slice(o,o+i.length)==i}function R_(n,i,o){var c=m.templateSettings;o&&ln(n,i,o)&&(i=r),n=at(n),i=Jl({},i,c,uf);var h=Jl({},i.imports,c.imports,uf),p=Ft(h),w=ps(h,p),k,P,U=0,z=i.interpolate||le,W="__p += '",ne=_s((i.escape||le).source+"|"+z.source+"|"+(z===Or?Br:le).source+"|"+(i.evaluate||le).source+"|$","g"),ve="//# sourceURL="+(ot.call(i,"sourceURL")?(i.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Wm+"]")+` -`;n.replace(ne,function(Ce,We,Qe,bn,on,wn){return Qe||(Qe=bn),W+=n.slice(U,wn).replace(re,dv),We&&(k=!0,W+=`' + +`)}function s0(n){return Ee(n)||hi(n)||!!(yd&&n&&n[yd])}function yr(n,i){var o=typeof n;return i=i==null?me:i,!!i&&(o=="number"||o!="symbol"&&fl.test(n))&&n>-1&&n%1==0&&n0){if(++i>=lt)return arguments[0]}else i=0;return n.apply(r,arguments)}}function Yl(n,i){var o=-1,c=n.length,h=c-1;for(i=i===r?c:i;++o1?n[i-1]:r;return o=typeof o=="function"?(n.pop(),o):r,Pf(n,o)});function xf(n){var i=m(n);return i.__chain__=!0,i}function _y(n,i){return i(n),n}function Wl(n,i){return i(n)}var by=pr(function(n){var i=n.length,o=i?n[0]:0,c=this.__wrapped__,h=function(p){return Cs(p,n)};return i>1||this.__actions__.length||!(c instanceof He)||!yr(o)?this.thru(h):(c=c.slice(o,+o+(i?1:0)),c.__actions__.push({func:Wl,args:[h],thisArg:r}),new An(c,this.__chain__).thru(function(p){return i&&!p.length&&p.push(r),p}))});function wy(){return xf(this)}function Sy(){return new An(this.value(),this.__chain__)}function ky(){this.__values__===r&&(this.__values__=Yf(this.value()));var n=this.__index__>=this.__values__.length,i=n?r:this.__values__[this.__index__++];return{done:n,value:i}}function Cy(){return this}function Ty(n){for(var i,o=this;o instanceof xl;){var c=kf(o);c.__index__=0,c.__values__=r,i?h.__wrapped__=c:i=c;var h=c;o=o.__wrapped__}return h.__wrapped__=n,i}function My(){var n=this.__wrapped__;if(n instanceof He){var i=n;return this.__actions__.length&&(i=new He(this)),i=i.reverse(),i.__actions__.push({func:Wl,args:[Js],thisArg:r}),new An(i,this.__chain__)}return this.thru(Js)}function Dy(){return Wd(this.__wrapped__,this.__actions__)}var qy=Ll(function(n,i,o){ot.call(n,o)?++n[o]:mr(n,o,1)});function Py(n,i,o){var c=Ee(n)?id:_p;return o&&ln(n,i,o)&&(i=r),c(n,Se(i,3))}function xy(n,i){var o=Ee(n)?Fr:qd;return o(n,Se(i,3))}var Ay=nf(Cf),Ey=nf(Tf);function Iy(n,i){return zt(Hl(n,i),1)}function $y(n,i){return zt(Hl(n,i),G)}function Oy(n,i,o){return o=o===r?1:Oe(o),zt(Hl(n,i),o)}function Af(n,i){var o=Ee(n)?Pn:Yr;return o(n,Se(i,3))}function Ef(n,i){var o=Ee(n)?ev:Dd;return o(n,Se(i,3))}var Ry=Ll(function(n,i,o){ot.call(n,o)?n[o].push(i):mr(n,o,[i])});function Ly(n,i,o,c){n=fn(n)?n:Vi(n),o=o&&!c?Oe(o):0;var h=n.length;return o<0&&(o=Ot(h+o,0)),Zl(n)?o<=h&&n.indexOf(i,o)>-1:!!h&&Ai(n,i,o)>-1}var Ny=Ue(function(n,i,o){var c=-1,h=typeof i=="function",p=fn(n)?R(n.length):[];return Yr(n,function(w){p[++c]=h?vn(i,w,o):wa(w,i,o)}),p}),By=Ll(function(n,i,o){mr(n,o,i)});function Hl(n,i){var o=Ee(n)?_t:$d;return o(n,Se(i,3))}function Fy(n,i,o,c){return n==null?[]:(Ee(i)||(i=i==null?[]:[i]),o=c?r:o,Ee(o)||(o=o==null?[]:[o]),Nd(n,i,o))}var Uy=Ll(function(n,i,o){n[o?0:1].push(i)},function(){return[[],[]]});function zy(n,i,o){var c=Ee(n)?ds:sd,h=arguments.length<3;return c(n,Se(i,4),o,h,Yr)}function Vy(n,i,o){var c=Ee(n)?tv:sd,h=arguments.length<3;return c(n,Se(i,4),o,h,Dd)}function Yy(n,i){var o=Ee(n)?Fr:qd;return o(n,Ql(Se(i,3)))}function Wy(n){var i=Ee(n)?kd:Lp;return i(n)}function Hy(n,i,o){(o?ln(n,i,o):i===r)?i=1:i=Oe(i);var c=Ee(n)?gp:Np;return c(n,i)}function Ky(n){var i=Ee(n)?mp:Fp;return i(n)}function Gy(n){if(n==null)return 0;if(fn(n))return Zl(n)?Ii(n):n.length;var i=Zt(n);return i==qt||i==K?n.size:xs(n).length}function Qy(n,i,o){var c=Ee(n)?fs:Up;return o&&ln(n,i,o)&&(i=r),c(n,Se(i,3))}var jy=Ue(function(n,i){if(n==null)return[];var o=i.length;return o>1&&ln(n,i[0],i[1])?i=[]:o>2&&ln(i[0],i[1],i[2])&&(i=[i[0]]),Nd(n,zt(i,1),[])}),Kl=xv||function(){return Ut.Date.now()};function Zy(n,i){if(typeof i!="function")throw new xn(u);return n=Oe(n),function(){if(--n<1)return i.apply(this,arguments)}}function If(n,i,o){return i=o?r:i,i=n&&i==null?n.length:i,vr(n,V,r,r,r,r,i)}function $f(n,i){var o;if(typeof i!="function")throw new xn(u);return n=Oe(n),function(){return--n>0&&(o=i.apply(this,arguments)),n<=1&&(i=r),o}}var eu=Ue(function(n,i,o){var c=L;if(o.length){var h=zr(o,Ui(eu));c|=N}return vr(n,c,i,o,h)}),Of=Ue(function(n,i,o){var c=L|F;if(o.length){var h=zr(o,Ui(Of));c|=N}return vr(i,c,n,o,h)});function Rf(n,i,o){i=o?r:i;var c=vr(n,D,r,r,r,r,r,i);return c.placeholder=Rf.placeholder,c}function Lf(n,i,o){i=o?r:i;var c=vr(n,A,r,r,r,r,r,i);return c.placeholder=Lf.placeholder,c}function Nf(n,i,o){var c,h,p,w,k,P,U=0,z=!1,W=!1,ne=!0;if(typeof n!="function")throw new xn(u);i=On(i)||0,Ct(o)&&(z=!!o.leading,W="maxWait"in o,p=W?Ot(On(o.maxWait)||0,i):p,ne="trailing"in o?!!o.trailing:ne);function ve(At){var Wn=c,wr=h;return c=h=r,U=At,w=n.apply(wr,Wn),w}function ke(At){return U=At,k=Ma(We,i),z?ve(At):w}function Le(At){var Wn=At-P,wr=At-U,rh=i-Wn;return W?jt(rh,p-wr):rh}function Ce(At){var Wn=At-P,wr=At-U;return P===r||Wn>=i||Wn<0||W&&wr>=p}function We(){var At=Kl();if(Ce(At))return Qe(At);k=Ma(We,Le(At))}function Qe(At){return k=r,ne&&c?ve(At):(c=h=r,w)}function bn(){k!==r&&Kd(k),U=0,c=P=h=k=r}function on(){return k===r?w:Qe(Kl())}function wn(){var At=Kl(),Wn=Ce(At);if(c=arguments,h=this,P=At,Wn){if(k===r)return ke(P);if(W)return Kd(k),k=Ma(We,i),ve(P)}return k===r&&(k=Ma(We,i)),w}return wn.cancel=bn,wn.flush=on,wn}var Jy=Ue(function(n,i){return Md(n,1,i)}),Xy=Ue(function(n,i,o){return Md(n,On(i)||0,o)});function e1(n){return vr(n,pe)}function Gl(n,i){if(typeof n!="function"||i!=null&&typeof i!="function")throw new xn(u);var o=function(){var c=arguments,h=i?i.apply(this,c):c[0],p=o.cache;if(p.has(h))return p.get(h);var w=n.apply(this,c);return o.cache=p.set(h,w)||p,w};return o.cache=new(Gl.Cache||gr),o}Gl.Cache=gr;function Ql(n){if(typeof n!="function")throw new xn(u);return function(){var i=arguments;switch(i.length){case 0:return!n.call(this);case 1:return!n.call(this,i[0]);case 2:return!n.call(this,i[0],i[1]);case 3:return!n.call(this,i[0],i[1],i[2])}return!n.apply(this,i)}}function t1(n){return $f(2,n)}var n1=zp(function(n,i){i=i.length==1&&Ee(i[0])?_t(i[0],pn(Se())):_t(zt(i,1),pn(Se()));var o=i.length;return Ue(function(c){for(var h=-1,p=jt(c.length,o);++h=i}),hi=Ad(function(){return arguments}())?Ad:function(n){return Tt(n)&&ot.call(n,"callee")&&!pd.call(n,"callee")},Ee=R.isArray,p1=Jc?pn(Jc):Tp;function fn(n){return n!=null&&jl(n.length)&&!_r(n)}function xt(n){return Tt(n)&&fn(n)}function y1(n){return n===!0||n===!1||Tt(n)&&an(n)==ft}var Gr=Ev||fu,_1=Xc?pn(Xc):Mp;function b1(n){return Tt(n)&&n.nodeType===1&&!Da(n)}function w1(n){if(n==null)return!0;if(fn(n)&&(Ee(n)||typeof n=="string"||typeof n.splice=="function"||Gr(n)||zi(n)||hi(n)))return!n.length;var i=Zt(n);if(i==qt||i==K)return!n.size;if(Ta(n))return!xs(n).length;for(var o in n)if(ot.call(n,o))return!1;return!0}function S1(n,i){return Sa(n,i)}function k1(n,i,o){o=typeof o=="function"?o:r;var c=o?o(n,i):r;return c===r?Sa(n,i,r,o):!!c}function nu(n){if(!Tt(n))return!1;var i=an(n);return i==nn||i==wt||typeof n.message=="string"&&typeof n.name=="string"&&!Da(n)}function C1(n){return typeof n=="number"&&_d(n)}function _r(n){if(!Ct(n))return!1;var i=an(n);return i==un||i==rn||i==Me||i==$r}function Ff(n){return typeof n=="number"&&n==Oe(n)}function jl(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=me}function Ct(n){var i=typeof n;return n!=null&&(i=="object"||i=="function")}function Tt(n){return n!=null&&typeof n=="object"}var Uf=ed?pn(ed):qp;function T1(n,i){return n===i||Ps(n,i,Hs(i))}function M1(n,i,o){return o=typeof o=="function"?o:r,Ps(n,i,Hs(i),o)}function D1(n){return zf(n)&&n!=+n}function q1(n){if(d0(n))throw new Ae(s);return Ed(n)}function P1(n){return n===null}function x1(n){return n==null}function zf(n){return typeof n=="number"||Tt(n)&&an(n)==Kt}function Da(n){if(!Tt(n)||an(n)!=Gt)return!1;var i=kl(n);if(i===null)return!0;var o=ot.call(i,"constructor")&&i.constructor;return typeof o=="function"&&o instanceof o&&_l.call(o)==Mv}var ru=td?pn(td):Pp;function A1(n){return Ff(n)&&n>=-me&&n<=me}var Vf=nd?pn(nd):xp;function Zl(n){return typeof n=="string"||!Ee(n)&&Tt(n)&&an(n)==de}function _n(n){return typeof n=="symbol"||Tt(n)&&an(n)==qe}var zi=rd?pn(rd):Ap;function E1(n){return n===r}function I1(n){return Tt(n)&&Zt(n)==it}function $1(n){return Tt(n)&&an(n)==Ze}var O1=Ul(As),R1=Ul(function(n,i){return n<=i});function Yf(n){if(!n)return[];if(fn(n))return Zl(n)?zn(n):dn(n);if(ga&&n[ga])return gv(n[ga]());var i=Zt(n),o=i==qt?ys:i==K?vl:Vi;return o(n)}function br(n){if(!n)return n===0?n:0;if(n=On(n),n===G||n===-G){var i=n<0?-1:1;return i*rt}return n===n?n:0}function Oe(n){var i=br(n),o=i%1;return i===i?o?i-o:i:0}function Wf(n){return n?ui(Oe(n),0,Z):0}function On(n){if(typeof n=="number")return n;if(_n(n))return X;if(Ct(n)){var i=typeof n.valueOf=="function"?n.valueOf():n;n=Ct(i)?i+"":i}if(typeof n!="string")return n===0?n:+n;n=ud(n);var o=ul.test(n);return o||dl.test(n)?Zm(n.slice(2),o?2:8):ns.test(n)?X:+n}function Hf(n){return nr(n,hn(n))}function L1(n){return n?ui(Oe(n),-me,me):n===0?n:0}function at(n){return n==null?"":yn(n)}var N1=Bi(function(n,i){if(Ta(i)||fn(i)){nr(i,Ft(i),n);return}for(var o in i)ot.call(i,o)&&_a(n,o,i[o])}),Kf=Bi(function(n,i){nr(i,hn(i),n)}),Jl=Bi(function(n,i,o,c){nr(i,hn(i),n,c)}),B1=Bi(function(n,i,o,c){nr(i,Ft(i),n,c)}),F1=pr(Cs);function U1(n,i){var o=Ni(n);return i==null?o:Cd(o,i)}var z1=Ue(function(n,i){n=dt(n);var o=-1,c=i.length,h=c>2?i[2]:r;for(h&&ln(i[0],i[1],h)&&(c=1);++o1),p}),nr(n,Ys(n),o),c&&(o=En(o,C|M|_,Xp));for(var h=i.length;h--;)Rs(o,i[h]);return o});function l_(n,i){return Qf(n,Ql(Se(i)))}var o_=pr(function(n,i){return n==null?{}:$p(n,i)});function Qf(n,i){if(n==null)return{};var o=_t(Ys(n),function(c){return[c]});return i=Se(i),Bd(n,o,function(c,h){return i(c,h[0])})}function s_(n,i,o){i=Hr(i,n);var c=-1,h=i.length;for(h||(h=1,n=r);++ci){var c=n;n=i,i=c}if(o||n%1||i%1){var h=bd();return jt(n+h*(i-n+jm("1e-"+((h+"").length-1))),i)}return Is(n,i)}var __=Fi(function(n,i,o){return i=i.toLowerCase(),n+(o?Jf(i):i)});function Jf(n){return lu(at(n).toLowerCase())}function Xf(n){return n=at(n),n&&n.replace(T,uv).replace(Fm,"")}function b_(n,i,o){n=at(n),i=yn(i);var c=n.length;o=o===r?c:ui(Oe(o),0,c);var h=o;return o-=i.length,o>=0&&n.slice(o,h)==i}function w_(n){return n=at(n),n&&Go.test(n)?n.replace(ll,cv):n}function S_(n){return n=at(n),n&&Zo.test(n)?n.replace(da,"\\$&"):n}var k_=Fi(function(n,i,o){return n+(o?"-":"")+i.toLowerCase()}),C_=Fi(function(n,i,o){return n+(o?" ":"")+i.toLowerCase()}),T_=tf("toLowerCase");function M_(n,i,o){n=at(n),i=Oe(i);var c=i?Ii(n):0;if(!i||c>=i)return n;var h=(i-c)/2;return Fl(Dl(h),o)+n+Fl(Ml(h),o)}function D_(n,i,o){n=at(n),i=Oe(i);var c=i?Ii(n):0;return i&&c>>0,o?(n=at(n),n&&(typeof i=="string"||i!=null&&!ru(i))&&(i=yn(i),!i&&Ei(n))?Kr(zn(n),0,o):n.split(i,o)):[]}var $_=Fi(function(n,i,o){return n+(o?" ":"")+lu(i)});function O_(n,i,o){return n=at(n),o=o==null?0:ui(Oe(o),0,n.length),i=yn(i),n.slice(o,o+i.length)==i}function R_(n,i,o){var c=m.templateSettings;o&&ln(n,i,o)&&(i=r),n=at(n),i=Jl({},i,c,uf);var h=Jl({},i.imports,c.imports,uf),p=Ft(h),w=ps(h,p),k,P,U=0,z=i.interpolate||le,W="__p += '",ne=_s((i.escape||le).source+"|"+z.source+"|"+(z===Or?Br:le).source+"|"+(i.evaluate||le).source+"|$","g"),ve="//# sourceURL="+(ot.call(i,"sourceURL")?(i.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Wm+"]")+` +`;n.replace(ne,function(Ce,We,Qe,bn,on,wn){return Qe||(Qe=bn),W+=n.slice(U,wn).replace(ie,dv),We&&(k=!0,W+=`' + __e(`+We+`) + '`),on&&(P=!0,W+=`'; `+on+`; @@ -41,5 +41,5 @@ __p += '`),Qe&&(W+=`' + function print() { __p += __j.call(arguments, '') } `:`; `)+W+`return __p -}`;var Ne=th(function(){return nt(p,ve+"return "+W).apply(r,w)});if(Ne.source=W,nu(Ne))throw Ne;return Ne}function L_(n){return at(n).toLowerCase()}function N_(n){return at(n).toUpperCase()}function B_(n,i,o){if(n=at(n),n&&(o||i===r))return ud(n);if(!n||!(i=yn(i)))return n;var c=zn(n),h=zn(i),p=cd(c,h),w=dd(c,h)+1;return Kr(c,p,w).join("")}function F_(n,i,o){if(n=at(n),n&&(o||i===r))return n.slice(0,hd(n)+1);if(!n||!(i=yn(i)))return n;var c=zn(n),h=dd(c,zn(i))+1;return Kr(c,0,h).join("")}function U_(n,i,o){if(n=at(n),n&&(o||i===r))return n.replace(fa,"");if(!n||!(i=yn(i)))return n;var c=zn(n),h=cd(c,zn(i));return Kr(c,h).join("")}function z_(n,i){var o=_e,c=xe;if(Ct(i)){var h="separator"in i?i.separator:h;o="length"in i?Oe(i.length):o,c="omission"in i?yn(i.omission):c}n=at(n);var p=n.length;if(Ei(n)){var w=zn(n);p=w.length}if(o>=p)return n;var k=o-Ii(c);if(k<1)return c;var P=w?Kr(w,0,k).join(""):n.slice(0,k);if(h===r)return P+c;if(w&&(k+=P.length-k),ru(h)){if(n.slice(k).search(h)){var U,z=P;for(h.global||(h=_s(h.source,at(qi.exec(h))+"g")),h.lastIndex=0;U=h.exec(z);)var W=U.index;P=P.slice(0,W===r?k:W)}}else if(n.indexOf(yn(h),k)!=k){var ne=P.lastIndexOf(h);ne>-1&&(P=P.slice(0,ne))}return P+c}function V_(n){return n=at(n),n&&ol.test(n)?n.replace(al,yv):n}var Y_=Fi(function(n,i,o){return n+(o?" ":"")+i.toUpperCase()}),lu=tf("toUpperCase");function eh(n,i,o){return n=at(n),i=o?r:i,i===r?hv(n)?wv(n):iv(n):n.match(i)||[]}var th=Ue(function(n,i){try{return vn(n,r,i)}catch(o){return nu(o)?o:new Ae(o)}}),W_=pr(function(n,i){return qn(i,function(o){o=rr(o),mr(n,o,eu(n[o],n))}),n});function H_(n){var i=n==null?0:n.length,o=Se();return n=i?_t(n,function(c){if(typeof c[1]!="function")throw new Pn(u);return[o(c[0]),c[1]]}):[],Ue(function(c){for(var h=-1;++hme)return[];var o=Z,c=jt(n,Z);i=Se(i),n-=Z;for(var h=vs(c,i);++o0||i<0)?new He(o):(n<0?o=o.takeRight(-n):n&&(o=o.drop(n)),i!==r&&(i=Oe(i),o=i<0?o.dropRight(-i):o.take(i-n)),o)},He.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},He.prototype.toArray=function(){return this.take(Z)},tr(He.prototype,function(n,i){var o=/^(?:filter|find|map|reject)|While$/.test(i),c=/^(?:head|last)$/.test(i),h=m[c?"take"+(i=="last"?"Right":""):i],p=c||/^find/.test(i);!h||(m.prototype[i]=function(){var w=this.__wrapped__,k=c?[1]:arguments,P=w instanceof He,U=k[0],z=P||Ee(w),W=function(We){var Qe=h.apply(m,Ur([We],k));return c&&ne?Qe[0]:Qe};z&&o&&typeof U=="function"&&U.length!=1&&(P=z=!1);var ne=this.__chain__,ve=!!this.__actions__.length,ke=p&&!ne,Ne=P&&!ve;if(!p&&z){w=Ne?w:new He(this);var Ce=n.apply(w,k);return Ce.__actions__.push({func:Wl,args:[W],thisArg:r}),new xn(Ce,ne)}return ke&&Ne?n.apply(this,k):(Ce=this.thru(W),ke?c?Ce.value()[0]:Ce.value():Ce)})}),qn(["pop","push","shift","sort","splice","unshift"],function(n){var i=pl[n],o=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",c=/^(?:pop|shift)$/.test(n);m.prototype[n]=function(){var h=arguments;if(c&&!this.__chain__){var p=this.value();return i.apply(Ee(p)?p:[],h)}return this[o](function(w){return i.apply(Ee(w)?w:[],h)})}}),tr(He.prototype,function(n,i){var o=m[i];if(o){var c=o.name+"";ot.call(Li,c)||(Li[c]=[]),Li[c].push({name:i,func:o})}}),Li[Nl(r,F).name]=[{name:"wrapper",func:r}],He.prototype.clone=Vv,He.prototype.reverse=Yv,He.prototype.value=Wv,m.prototype.at=by,m.prototype.chain=wy,m.prototype.commit=Sy,m.prototype.next=ky,m.prototype.plant=Ty,m.prototype.reverse=My,m.prototype.toJSON=m.prototype.valueOf=m.prototype.value=Dy,m.prototype.first=m.prototype.head,ga&&(m.prototype[ga]=Cy),m},$i=Sv();ai?((ai.exports=$i)._=$i,ss._=$i):Ut._=$i}).call(Pa)})(Hu,Hu.exports);var nq=Hu.exports;const rq=sn({name:"ProductCard",props:["product","is-stall"],data:function(){return{}},methods:{},created(){}}),iq={class:"row no-wrap items-center"},aq={class:"col text-subtitle2 ellipsis-2-lines"},lq={key:0},oq={class:"text-h6"},sq={key:1},uq={class:"text-h6"},cq={class:"q-ml-md text-caption text-green-8 text-weight-bolder q-mt-md"},dq={key:0,class:"text-subtitle1"},fq=["textContent"],hq={key:1,class:"text-subtitle1"},gq={class:"text-caption text-grey ellipsis-2-lines",style:{"min-height":"40px"}},mq={key:0},vq={class:"text-caption text-weight-bolder"},pq={class:"q-ml-auto"};function yq(e,t,r,a,l,s){return O(),oe(Jt,{class:"card--product"},{default:b(()=>[y(oc,{src:e.product.images&&e.product.images.length>0&&e.product.images[0]?e.product.images[0]:e.$q.config.staticPath+"/images/placeholder.png",alt:"Product Image",loading:"lazy","spinner-color":"white",fit:"contain",height:"300px"},null,8,["src"]),y($e,{class:"q-pb-xs q-pt-md"},{default:b(()=>[y(ye,{round:"",disabled:e.product.quantity<1,color:"primary",rounded:"",icon:"shopping_cart",size:"lg",style:{position:"absolute",top:"0",right:"0",transform:"translate(-50%, -50%)"},onClick:t[0]||(t[0]=u=>e.$emit("add-to-cart",e.product))},{default:b(()=>[y(Qr,null,{default:b(()=>[De(" Add to cart ")]),_:1})]),_:1},8,["disabled"]),S("div",iq,[S("div",aq,ge(e.product.name),1)])]),_:1}),y($e,{class:"q-py-sm"},{default:b(()=>[S("div",null,[e.product.currency=="sat"?(O(),ie("span",lq,[S("span",oq,ge(e.product.price)+" sats",1),y(Qr,null,{default:b(()=>[De(" BTC "+ge((e.product.price/1e8).toFixed(8)),1)]),_:1})])):(O(),ie("span",sq,[S("span",uq,ge(e.product.formatedPrice),1)])),S("span",cq,ge(e.product.quantity)+" left",1)]),e.product.categories?(O(),ie("div",dq,[y(lc,{items:e.product.categories||[],"virtual-scroll-horizontal":""},{default:b(({item:u,index:d})=>[(O(),oe(Qa,{key:d,dense:""},{default:b(()=>[S("span",{textContent:ge(u)},null,8,fq)]),_:2},1024))]),_:1},8,["items"])])):(O(),ie("div",hq," \xA0 ")),S("div",gq,[e.product.description?(O(),ie("p",mq,ge(e.product.description),1)):Re("",!0)])]),_:1}),y(ut),y(wi,null,{default:b(()=>[S("div",vq,ge(e.product.stallName),1)]),_:1}),y(ut),y(wi,null,{default:b(()=>[S("div",pq,[e.isStall?Re("",!0):(O(),oe(ye,{key:0,flat:"",class:"text-weight-bold text-capitalize q-ml-auto float-left",dense:"",color:"primary",onClick:t[1]||(t[1]=u=>e.$emit("change-page","stall",{stall:e.product.stall_id}))},{default:b(()=>[De(" Visit Stall ")]),_:1})),y(ye,{flat:"",class:"text-weight-bold text-capitalize q-ml-auto",dense:"",color:"primary",onClick:t[2]||(t[2]=u=>e.$emit("change-page","stall",{stall:e.product.stall_id,product:e.product.id}))},{default:b(()=>[De(" View details ")]),_:1})])]),_:1})]),_:1})}var Tm=Cn(rq,[["render",yq]]);const _q=sn({name:"CustomerMarket",components:{ProductCard:Tm},props:["filtered-products","search-text","filter-categories"],data:function(){return{search:null,partialProducts:[],productsPerPage:12,startIndex:0,lastProductIndex:0,showProducts:!0,debounceRefreshProducts:null}},watch:{searchText:function(){this.debounceRefreshProducts()},filteredProducts:function(){this.debounceRefreshProducts()},filterCategories:function(){this.debounceRefreshProducts()}},methods:{refreshProducts:function(){this.showProducts=!1,this.partialProducts=[],this.startIndex=0,this.lastProductIndex=Math.min(this.filteredProducts.length,this.productsPerPage),this.partialProducts.push(...this.filteredProducts.slice(0,this.lastProductIndex)),setTimeout(()=>{this.showProducts=!0},0)},addToCart(e){this.$emit("add-to-cart",e)},changePageM(e,t){this.$emit("change-page",e,t)},onLoad(e,t){setTimeout(()=>{if(this.startIndex>=this.filteredProducts.length){t();return}this.startIndex=this.lastProductIndex,this.lastProductIndex=Math.min(this.filteredProducts.length,this.lastProductIndex+this.productsPerPage),this.partialProducts.push(...this.filteredProducts.slice(this.startIndex,this.lastProductIndex)),t()},100)}},created(){this.debounceRefreshProducts=nq.debounce(this.refreshProducts,100),this.lastProductIndex=Math.min(this.filteredProducts.length,24),this.partialProducts.push(...this.filteredProducts.slice(0,this.lastProductIndex))}}),bq={class:"row q-col-gutter-md"},wq={class:"row justify-center q-my-md"};function Sq(e,t,r,a,l,s){const u=ti("product-card");return O(),ie("div",null,[e.showProducts?(O(),oe(tq,{key:0,onLoad:e.onLoad,offset:250},jh({default:b(()=>[S("div",bq,[(O(!0),ie(Nt,null,Wt(e.partialProducts,(d,f)=>(O(),ie("div",{class:"col-xs-12 col-sm-6 col-md-4 col-lg-3",key:f},[y(u,{product:d,onChangePage:e.changePageM,onAddToCart:e.addToCart},null,8,["product","onChangePage","onAddToCart"])]))),128))])]),_:2},[e.lastProductIndex[S("div",wq,[y($u,{color:"primary",size:"40px"})])]),key:"0"}:void 0]),1032,["onLoad"])):Re("",!0)])}var kq=Cn(_q,[["render",Sq]]),Cq=Je({name:"QSlideTransition",props:{appear:Boolean,duration:{type:Number,default:300}},emits:["show","hide"],setup(e,{slots:t,emit:r}){let a=!1,l,s,u=null,d=null,f,g;function v(){l&&l(),l=null,a=!1,u!==null&&(clearTimeout(u),u=null),d!==null&&(clearTimeout(d),d=null),s!==void 0&&s.removeEventListener("transitionend",f),f=null}function C(I,L,F){L!==void 0&&(I.style.height=`${L}px`),I.style.transition=`height ${e.duration}ms cubic-bezier(.25, .8, .50, 1)`,a=!0,l=F}function M(I,L){I.style.overflowY=null,I.style.height=null,I.style.transition=null,v(),L!==g&&r(L)}function _(I,L){let F=0;s=I,a===!0?(v(),F=I.offsetHeight===I.scrollHeight?0:void 0):(g="hide",I.style.overflowY="hidden"),C(I,F,L),u=setTimeout(()=>{u=null,I.style.height=`${I.scrollHeight}px`,f=Y=>{d=null,(Object(Y)!==Y||Y.target===I)&&M(I,"show")},I.addEventListener("transitionend",f),d=setTimeout(f,e.duration*1.1)},100)}function x(I,L){let F;s=I,a===!0?v():(g="show",I.style.overflowY="hidden",F=I.scrollHeight),C(I,F,L),u=setTimeout(()=>{u=null,I.style.height=0,f=Y=>{d=null,(Object(Y)!==Y||Y.target===I)&&M(I,"hide")},I.addEventListener("transitionend",f),d=setTimeout(f,e.duration*1.1)},100)}return Ht(()=>{a===!0&&v()}),()=>E(Ga,{css:!1,appear:e.appear,onEnter:_,onLeave:x},t.default)}});const vi=rw({}),Tq=Object.keys(Ao);var Mq=Je({name:"QExpansionItem",props:{...Ao,...Ku,...or,icon:String,label:String,labelLines:[Number,String],caption:String,captionLines:[Number,String],dense:Boolean,toggleAriaLabel:String,expandIcon:String,expandedIcon:String,expandIconClass:[Array,String,Object],duration:Number,headerInsetLevel:Number,contentInsetLevel:Number,expandSeparator:Boolean,defaultOpened:Boolean,hideExpandIcon:Boolean,expandIconToggle:Boolean,switchToggleSide:Boolean,denseToggle:Boolean,group:String,popup:Boolean,headerStyle:[Array,String,Object],headerClass:[Array,String,Object]},emits:[...Qu,"click","afterShow","afterHide"],setup(e,{slots:t,emit:r}){const{proxy:{$q:a}}=Dt(),l=sr(e,a),s=se(e.modelValue!==null?e.modelValue:e.defaultOpened),u=se(null),d=fo(),{show:f,hide:g,toggle:v}=ju({showing:s});let C,M;const _=$(()=>`q-expansion-item q-item-type q-expansion-item--${s.value===!0?"expanded":"collapsed"} q-expansion-item--${e.popup===!0?"popup":"standard"}`),x=$(()=>{if(e.contentInsetLevel===void 0)return null;const G=a.lang.rtl===!0?"Right":"Left";return{["padding"+G]:e.contentInsetLevel*56+"px"}}),I=$(()=>e.disable!==!0&&(e.href!==void 0||e.to!==void 0&&e.to!==null&&e.to!=="")),L=$(()=>{const G={};return Tq.forEach(me=>{G[me]=e[me]}),G}),F=$(()=>I.value===!0||e.expandIconToggle!==!0),Y=$(()=>e.expandedIcon!==void 0&&s.value===!0?e.expandedIcon:e.expandIcon||a.iconSet.expansionItem[e.denseToggle===!0?"denseIcon":"icon"]),D=$(()=>e.disable!==!0&&(I.value===!0||e.expandIconToggle===!0)),A=$(()=>({expanded:s.value===!0,detailsId:e.targetUid,toggle:v,show:f,hide:g})),N=$(()=>{const G=e.toggleAriaLabel!==void 0?e.toggleAriaLabel:a.lang.label[s.value===!0?"collapse":"expand"](e.label);return{role:"button","aria-expanded":s.value===!0?"true":"false","aria-controls":d,"aria-label":G}});Ve(()=>e.group,G=>{M!==void 0&&M(),G!==void 0&&xe()});function J(G){I.value!==!0&&v(G),r("click",G)}function V(G){G.keyCode===13&&H(G,!0)}function H(G,me){me!==!0&&u.value!==null&&u.value.focus(),v(G),Rt(G)}function pe(){r("afterShow")}function _e(){r("afterHide")}function xe(){C===void 0&&(C=fo()),s.value===!0&&(vi[e.group]=C);const G=Ve(s,rt=>{rt===!0?vi[e.group]=C:vi[e.group]===C&&delete vi[e.group]}),me=Ve(()=>vi[e.group],(rt,X)=>{X===C&&rt!==void 0&&rt!==C&&g()});M=()=>{G(),me(),vi[e.group]===C&&delete vi[e.group],M=void 0}}function lt(){const G={class:[`q-focusable relative-position cursor-pointer${e.denseToggle===!0&&e.switchToggleSide===!0?" items-end":""}`,e.expandIconClass],side:e.switchToggleSide!==!0,avatar:e.switchToggleSide},me=[E(Yt,{class:"q-expansion-item__toggle-icon"+(e.expandedIcon===void 0&&s.value===!0?" q-expansion-item__toggle-icon--rotated":""),name:Y.value})];return D.value===!0&&(Object.assign(G,{tabindex:0,...N.value,onClick:H,onKeyup:V}),me.unshift(E("div",{ref:u,class:"q-expansion-item__toggle-focus q-icon q-focus-helper q-focus-helper--rounded",tabindex:-1}))),E(Ie,G,()=>me)}function te(){let G;return t.header!==void 0?G=[].concat(t.header(A.value)):(G=[E(Ie,()=>[E(Ke,{lines:e.labelLines},()=>e.label||""),e.caption?E(Ke,{lines:e.captionLines,caption:!0},()=>e.caption):null])],e.icon&&G[e.switchToggleSide===!0?"push":"unshift"](E(Ie,{side:e.switchToggleSide===!0,avatar:e.switchToggleSide!==!0},()=>E(Yt,{name:e.icon})))),e.disable!==!0&&e.hideExpandIcon!==!0&&G[e.switchToggleSide===!0?"unshift":"push"](lt()),G}function Pe(){const G={ref:"item",style:e.headerStyle,class:e.headerClass,dark:l.value,disable:e.disable,dense:e.dense,insetLevel:e.headerInsetLevel};return F.value===!0&&(G.clickable=!0,G.onClick=J,Object.assign(G,I.value===!0?L.value:N.value)),E(Vt,G,te)}function Be(){return Gn(E("div",{key:"e-content",class:"q-expansion-item__content relative-position",style:x.value,id:d},Mt(t.default)),[[iw,s.value]])}function j(){const G=[Pe(),E(Cq,{duration:e.duration,onShow:pe,onHide:_e},Be)];return e.expandSeparator===!0&&G.push(E(ut,{class:"q-expansion-item__border q-expansion-item__border--top absolute-top",dark:l.value}),E(ut,{class:"q-expansion-item__border q-expansion-item__border--bottom absolute-bottom",dark:l.value})),G}return e.group!==void 0&&xe(),Ht(()=>{M!==void 0&&M()}),()=>E("div",{class:_.value},[E("div",{class:"q-expansion-item__container relative-position"},j())])}});const Dq=sn({name:"CustomerOrders",props:["orders","products","stalls","profiles"],components:{UserProfile:Za},data:function(){return{}},computed:{merchantOrders:function(){return Object.keys(this.orders).map(e=>({pubkey:e,orders:this.orders[e].map(this.enrichOrder)}))}},methods:{enrichOrder:function(e){var r;const t=this.stallForOrder(e);return{...e,stallName:(t==null?void 0:t.name)||"Stall",shippingZone:((r=t==null?void 0:t.shipping)==null?void 0:r.find(a=>a.id===e.shipping_id))||{id:e.shipping_id,name:e.shipping_id},invoice:this.invoiceForOrder(e),products:this.getProductsForOrder(e)}},stallForOrder:function(e){var t;try{const r=e.items&&((t=e.items[0])==null?void 0:t.product_id);if(!r)return;const a=this.products.find(s=>s.id===r);if(!a)return;const l=this.stalls.find(s=>s.id===a.stall_id);return l||void 0}catch(r){console.log(r)}},invoiceForOrder:function(e){var t;try{const r=(t=e==null?void 0:e.payment_options)==null?void 0:t.find(a=>a.type==="ln");return r!=null&&r.link?decode(r.link):void 0}catch(r){console.warn(r)}},getProductsForOrder:function(e){var t;return(t=e==null?void 0:e.items)!=null&&t.length?e.items.map(r=>({...this.products.find(l=>l.id===r.product_id)||{id:r.product_id,name:r.product_id},orderedQuantity:r.quantity})):[]},showInvoice:function(e){var r;if(e.paid)return;const t=(r=e==null?void 0:e.payment_options)==null?void 0:r.find(a=>a.type==="ln").link;!t||this.$emit("show-invoice",t)},formatCurrency:function(e,t){return formatCurrency(e,t)},fromNow:function(e){return e?ae(e*1e3).fromNow():""}},created(){}}),qq=S("strong",null,"No Orders",-1),Pq=["textContent"],xq=["textContent"],Aq={class:"text-caption text-grey ellipsis-2-lines"},Eq={key:0},Iq=["textContent"],Oq=["textContent"],Rq=["textContent"],Lq={class:"text-caption text-grey ellipsis-2-lines"},Nq=["textContent"],Bq=["textContent"],Fq=S("strong",null,"Order ID: ",-1),Uq=["textContent"],zq=S("strong",null,"Products",-1),Vq=["src"],Yq=["src"],Wq={class:"text-caption text-grey ellipsis-2-lines"},Hq=S("strong",null,"Shipping Zone: ",-1),Kq=["textContent"],Gq=S("strong",null,"Message: ",-1),Qq=["textContent"],jq=S("strong",null,"Invoice: ",-1),Zq=["textContent"];function Jq(e,t,r,a,l,s){var d;const u=ti("user-profile");return O(),ie("div",null,[(d=e.merchantOrders)!=null&&d.length?Re("",!0):(O(),oe(Jt,{key:0,bordered:"",class:"q-mb-md"},{default:b(()=>[y($e,null,{default:b(()=>[qq]),_:1})]),_:1})),(O(!0),ie(Nt,null,Wt(e.merchantOrders,f=>(O(),ie("div",{key:f.id},[y(Jt,{bordered:"",class:"q-mb-md"},{default:b(()=>[y(Vt,null,{default:b(()=>[y(u,{pubkey:f.pubkey,profiles:e.profiles},null,8,["pubkey","profiles"])]),_:2},1024),y(ut),y($e,{class:"col-12"},{default:b(()=>[y(Mr,null,{default:b(()=>[(O(!0),ie(Nt,null,Wt(f.orders,g=>(O(),ie("div",{key:g.id,class:"q-mb-md"},[y(Mq,{dense:"","expand-separator":""},{header:b(()=>[y(Ie,{class:"q-mt-sm"},{default:b(()=>[y(Ke,null,{default:b(()=>{var v,C;return[S("strong",null,[S("span",{textContent:ge(g.stallName)},null,8,Pq)]),(C=(v=g.invoice)==null?void 0:v.human_readable_part)!=null&&C.amount?(O(),oe(Ln,{key:0,onClick:M=>e.showInvoice(g),color:"orange",class:"q-ml-lg gt-sm"},{default:b(()=>{var M,_;return[S("span",{textContent:ge(e.formatCurrency(((_=(M=g.invoice)==null?void 0:M.human_readable_part)==null?void 0:_.amount)/1e3,"sat"))},null,8,xq)]}),_:2},1032,["onClick"])):Re("",!0)]}),_:2},1024),y(Ke,null,{default:b(()=>[S("div",Aq,[g.createdAt?(O(),ie("p",Eq,[S("span",{textContent:ge(e.fromNow(g.createdAt))},null,8,Iq)])):Re("",!0)])]),_:2},1024)]),_:2},1024),y(Ie,{side:""},{default:b(()=>[y(Ke,null,{default:b(()=>[y(Ln,{color:g.paid?"green":"grey"},{default:b(()=>[S("span",{textContent:ge(g.paid?"Paid":"Not Paid")},null,8,Oq)]),_:2},1032,["color"]),y(Ln,{color:g.shipped?"green":"grey",class:"q-ml-md"},{default:b(()=>[S("span",{textContent:ge(g.shipped?"Shipped":"Not Shipped")},null,8,Rq)]),_:2},1032,["color"])]),_:2},1024),y(Ke,null,{default:b(()=>{var v,C;return[S("div",Lq,[S("p",null,[S("span",{textContent:ge((v=g.items)==null?void 0:v.length)},null,8,Nq),S("span",{textContent:ge(((C=g.items)==null?void 0:C.length)===1?"product":"products")},null,8,Bq)])])]}),_:2},1024)]),_:2},1024)]),default:b(()=>[y(ut),y($e,{class:"col-12"},{default:b(()=>[y(Ie,null,{default:b(()=>[y(Ke,null,{default:b(()=>[Fq,S("span",{class:"ellipsis-2-lines text-wrap",textContent:ge(g.id)},null,8,Uq)]),_:2},1024)]),_:2},1024)]),_:2},1024),y(ut),y($e,{horizontal:""},{default:b(()=>[y($e,{class:"col-7"},{default:b(()=>[y(Ie,{class:"q-mt-sm"},{default:b(()=>[y(Ke,null,{default:b(()=>[zq]),_:1})]),_:1}),(O(!0),ie(Nt,null,Wt(g.products,v=>(O(),oe(Vt,{key:v.id},{default:b(()=>[y(Ie,{avatar:""},{default:b(()=>[y(Xr,null,{default:b(()=>[v.images&&v.images[0]||v.image?(O(),ie("img",{key:0,src:v.images[0]||v.image},null,8,Vq)):(O(),ie("img",{key:1,src:e.$q.config.staticPath+"/images/placeholder.png"},null,8,Yq))]),_:2},1024)]),_:2},1024),y(Ie,{class:"q-mt-sm"},{default:b(()=>[y(Ke),y(Ke,null,{default:b(()=>[S("strong",null,ge(v.orderedQuantity)+" x "+ge(v.name),1)]),_:2},1024),y(Ke,null,{default:b(()=>[S("div",Wq,[S("p",null,ge(v.description),1)])]),_:2},1024)]),_:2},1024)]),_:2},1024))),128))]),_:2},1024),y(ut,{vertical:""}),y($e,null,{default:b(()=>[y(Ie,{class:"q-mt-md q-ml-sm"},{default:b(()=>[y(Ke,null,{default:b(()=>{var v;return[Hq,S("span",{textContent:ge(((v=g.shippingZone)==null?void 0:v.name)||"")},null,8,Kq)]}),_:2},1024)]),_:2},1024),g.message?(O(),oe(Ie,{key:0,class:"q-mt-md q-ml-sm"},{default:b(()=>[y(Ke,null,{default:b(()=>[Gq,S("span",{textContent:ge(g.message)},null,8,Qq)]),_:2},1024)]),_:2},1024)):Re("",!0),y(Ie,{class:"q-mt-md q-ml-sm"},{default:b(()=>[y(Ke,null,{default:b(()=>{var v,C;return[jq,(C=(v=g.invoice)==null?void 0:v.human_readable_part)!=null&&C.amount?(O(),oe(Ln,{key:0,onClick:M=>e.showInvoice(g),color:"orange",class:"cursor-pointer"},{default:b(()=>{var M,_;return[S("span",{textContent:ge(e.formatCurrency(((_=(M=g.invoice)==null?void 0:M.human_readable_part)==null?void 0:_.amount)/1e3,"sat"))},null,8,Zq)]}),_:2},1032,["onClick"])):Re("",!0)]}),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1024),y(ut,{class:"q-mb-xl"})]),_:2},1024),y(ut)]))),128))]),_:2},1024)]),_:2},1024)]),_:2},1024)]))),128))])}var Xq=Cn(Dq,[["render",Jq]]),eP=Je({name:"QCarouselSlide",props:{...kg,imgSrc:String},setup(e,{slots:t}){const r=$(()=>e.imgSrc?{backgroundImage:`url("${e.imgSrc}")`}:{});return()=>E("div",{class:"q-carousel__slide",style:r.value},Mt(t.default))}});let Ia=0;const tP={fullscreen:Boolean,noRouteFullscreenExit:Boolean},nP=["update:fullscreen","fullscreen"];function rP(){const e=Dt(),{props:t,emit:r,proxy:a}=e;let l,s,u;const d=se(!1);aw(e)===!0&&Ve(()=>a.$route.fullPath,()=>{t.noRouteFullscreenExit!==!0&&v()}),Ve(()=>t.fullscreen,C=>{d.value!==C&&f()}),Ve(d,C=>{r("update:fullscreen",C),r("fullscreen",C)});function f(){d.value===!0?v():g()}function g(){d.value!==!0&&(d.value=!0,u=a.$el.parentNode,u.replaceChild(s,a.$el),document.body.appendChild(a.$el),Ia++,Ia===1&&document.body.classList.add("q-body--fullscreen-mixin"),l={handler:v},sh.add(l))}function v(){d.value===!0&&(l!==void 0&&(sh.remove(l),l=void 0),u.replaceChild(a.$el,s),d.value=!1,Ia=Math.max(0,Ia-1),Ia===0&&(document.body.classList.remove("q-body--fullscreen-mixin"),a.$el.scrollIntoView!==void 0&&setTimeout(()=>{a.$el.scrollIntoView()})))}return tc(()=>{s=document.createElement("span")}),ni(()=>{t.fullscreen===!0&&g()}),Ht(v),Object.assign(a,{toggleFullscreen:f,setFullscreen:g,exitFullscreen:v}),{inFullscreen:d,toggleFullscreen:f}}const iP=["top","right","bottom","left"],aP=["regular","flat","outline","push","unelevated"];var lP=Je({name:"QCarousel",props:{...or,...Cg,...tP,transitionPrev:{type:String,default:"fade"},transitionNext:{type:String,default:"fade"},height:String,padding:Boolean,controlColor:String,controlTextColor:String,controlType:{type:String,validator:e=>aP.includes(e),default:"flat"},autoplay:[Number,Boolean],arrows:Boolean,prevIcon:String,nextIcon:String,navigation:Boolean,navigationPosition:{type:String,validator:e=>iP.includes(e)},navigationIcon:String,navigationActiveIcon:String,thumbnails:Boolean},emits:[...nP,...Tg],setup(e,{slots:t}){const{proxy:{$q:r}}=Dt(),a=sr(e,r);let l=null,s;const{updatePanelsList:u,getPanelContent:d,panelDirectives:f,goToPanel:g,previousPanel:v,nextPanel:C,getEnabledPanels:M,panelIndex:_}=Mg(),{inFullscreen:x}=rP(),I=$(()=>x.value!==!0&&e.height!==void 0?{height:e.height}:{}),L=$(()=>e.vertical===!0?"vertical":"horizontal"),F=$(()=>`q-carousel q-panel-parent q-carousel--with${e.padding===!0?"":"out"}-padding`+(x.value===!0?" fullscreen":"")+(a.value===!0?" q-carousel--dark q-dark":"")+(e.arrows===!0?` q-carousel--arrows-${L.value}`:"")+(e.navigation===!0?` q-carousel--navigation-${N.value}`:"")),Y=$(()=>{const _e=[e.prevIcon||r.iconSet.carousel[e.vertical===!0?"up":"left"],e.nextIcon||r.iconSet.carousel[e.vertical===!0?"down":"right"]];return e.vertical===!1&&r.lang.rtl===!0?_e.reverse():_e}),D=$(()=>e.navigationIcon||r.iconSet.carousel.navigationIcon),A=$(()=>e.navigationActiveIcon||D.value),N=$(()=>e.navigationPosition||(e.vertical===!0?"right":"bottom")),J=$(()=>({color:e.controlColor,textColor:e.controlTextColor,round:!0,[e.controlType]:!0,dense:!0}));Ve(()=>e.modelValue,()=>{e.autoplay&&V()}),Ve(()=>e.autoplay,_e=>{_e?V():l!==null&&(clearTimeout(l),l=null)});function V(){const _e=lw(e.autoplay)===!0?Math.abs(e.autoplay):5e3;l!==null&&clearTimeout(l),l=setTimeout(()=>{l=null,_e>=0?C():v()},_e)}ni(()=>{e.autoplay&&V()}),Ht(()=>{l!==null&&clearTimeout(l)});function H(_e,xe){return E("div",{class:`q-carousel__control q-carousel__navigation no-wrap absolute flex q-carousel__navigation--${_e} q-carousel__navigation--${N.value}`+(e.controlColor!==void 0?` text-${e.controlColor}`:"")},[E("div",{class:"q-carousel__navigation-inner flex flex-center no-wrap"},M().map(xe))])}function pe(){const _e=[];if(e.navigation===!0){const xe=t["navigation-icon"]!==void 0?t["navigation-icon"]:te=>E(ye,{key:"nav"+te.name,class:`q-carousel__navigation-icon q-carousel__navigation-icon--${te.active===!0?"":"in"}active`,...te.btnProps,onClick:te.onClick}),lt=s-1;_e.push(H("buttons",(te,Pe)=>{const Be=te.props.name,j=_.value===Pe;return xe({index:Pe,maxIndex:lt,name:Be,active:j,btnProps:{icon:j===!0?A.value:D.value,size:"sm",...J.value},onClick:()=>{g(Be)}})}))}else if(e.thumbnails===!0){const xe=e.controlColor!==void 0?` text-${e.controlColor}`:"";_e.push(H("thumbnails",lt=>{const te=lt.props;return E("img",{key:"tmb#"+te.name,class:`q-carousel__thumbnail q-carousel__thumbnail--${te.name===e.modelValue?"":"in"}active`+xe,src:te.imgSrc||te["img-src"],onClick:()=>{g(te.name)}})}))}return e.arrows===!0&&_.value>=0&&((e.infinite===!0||_.value>0)&&_e.push(E("div",{key:"prev",class:`q-carousel__control q-carousel__arrow q-carousel__prev-arrow q-carousel__prev-arrow--${L.value} absolute flex flex-center`},[E(ye,{icon:Y.value[0],...J.value,onClick:v})])),(e.infinite===!0||_.value(s=u(t),E("div",{class:F.value,style:I.value},[Zu("div",{class:"q-carousel__slides-container"},d(),"sl-cont",e.swipeable,()=>f.value)].concat(pe())))}});const oP=sn({name:"ProductDetail",props:["product","add-to-cart"],data:function(){return{slide:1}},computed:{},methods:{},created(){}}),sP={class:"row"},uP={class:"col-lg-5 col-md-5 col-sm-12 col-xs-12 q-mt-sm"},cP={key:0,class:"q-pr-md"},dP={key:1,class:"q-pr-md"},fP={class:"col-lg-7 col-md-7 col-sm-12 col-xs-12 q-mt-sm"},hP={class:"row"},gP={class:"text-subtitle1 q-mt-sm q-pt-xs"},mP={key:0,class:"text-subtitle1"},vP={class:"q-mt-sm text-weight-bold"},pP={key:0},yP={class:"text-h6"},_P={class:"q-ml-sm text-grey-6"},bP={key:1},wP={class:"text-h6"},SP={class:"q-ml-md text-caption text-green-8 text-weight-bolder q-mt-md"},kP={class:"q-mt-md"};function CP(e,t,r,a,l,s){return O(),ie("div",sP,[S("div",uP,[e.product.images&&e.product.images[0]?(O(),ie("div",cP,[y(lP,{swipeable:"",animated:"",modelValue:e.slide,"onUpdate:modelValue":t[0]||(t[0]=u=>e.slide=u),thumbnails:"",infinite:"",arrows:"","transition-prev":"slide-right","transition-next":"slide-left","navigation-icon":"radio_button_unchecked","control-type":"regular","control-color":"secondary","control-text-color":"white"},{default:b(()=>[(O(!0),ie(Nt,null,Wt(e.product.images,(u,d)=>(O(),oe(eP,{name:d+1,key:d,"img-src":u},null,8,["name","img-src"]))),128))]),_:1},8,["modelValue"])])):(O(),ie("div",dP,[y(oc,{src:e.$q.config.staticPath+"/images/placeholder.png",ratio:16/9},null,8,["src"])]))]),S("div",fP,[y(Jt,null,{default:b(()=>[y($e,null,{default:b(()=>[S("div",hP,[S("div",{class:ow(["col-12",e.$q.platform.is.desktop?"":"q-px-md"])},[S("div",gP,ge(e.product.name),1),e.product.categories?(O(),ie("div",mP,[(O(!0),ie(Nt,null,Wt(e.product.categories,(u,d)=>(O(),oe(Qa,{key:d,dense:""},{default:b(()=>[De(ge(u),1)]),_:2},1024))),128))])):Re("",!0),S("div",vP,ge(e.product.description),1),S("div",null,[e.product.currency=="sat"?(O(),ie("span",pP,[S("span",yP,ge(e.product.price)+" sats",1),S("span",_P,"BTC "+ge((e.product.price/1e8).toFixed(8)),1)])):(O(),ie("span",bP,[S("span",wP,ge(e.product.formatedPrice),1)])),S("span",SP,ge(e.product.quantity>0?`In - stock. ${e.product.quantity} left.`:"Out of stock."),1)]),S("div",kP,[y(ye,{class:"q-mt-md",color:"primary",rounded:"",icon:"shopping_cart",label:"Add to cart",onClick:t[1]||(t[1]=u=>e.$emit("add-to-cart",e.product))})])],2)])]),_:1})]),_:1})])])}var TP=Cn(oP,[["render",CP]]);const MP=sn({name:"CustomerStall",components:{ProductCard:Tm,ProductDetail:TP},props:["stall","products","product-detail"],data:function(){return{}},computed:{product(){if(this.productDetail)return this.products.find(e=>e.id==this.productDetail)}},methods:{changePageS(e,t){var r;e==="stall"&&(t==null?void 0:t.product)&&((r=document.getElementById("product-focus-area"))==null||r.scrollIntoView()),this.$emit("change-page",e,t)},addToCart(e){this.$emit("add-to-cart",e)}}}),DP=S("div",{id:"product-focus-area"},null,-1),qP={key:0,class:"row"},PP={class:"col-12 auto-width"},xP={class:"col-12 q-my-lg"},AP={class:"row q-col-gutter-md"};function EP(e,t,r,a,l,s){const u=ti("product-detail"),d=ti("product-card");return O(),ie("div",null,[DP,e.productDetail&&e.product?(O(),ie("div",qP,[S("div",PP,[y(u,{product:e.product,onAddToCart:e.addToCart},null,8,["product","onAddToCart"])]),S("div",xP,[y(ut)])])):Re("",!0),S("div",AP,[(O(!0),ie(Nt,null,Wt(e.products,(f,g)=>(O(),ie("div",{class:"col-xs-12 col-sm-6 col-md-4 col-lg-3",key:g},[y(d,{product:f,onChangePage:e.changePageS,onAddToCart:e.addToCart,"is-stall":!0},null,8,["product","onChangePage","onAddToCart"])]))),128))])])}var IP=Cn(MP,[["render",EP]]);const $P=sn({name:"CustomerStallList",props:["stalls"],data:function(){return{showStalls:!0}},watch:{stalls(){this.showProducts=!1,setTimeout(()=>{this.showProducts=!0},0)}},computed:{},methods:{},created(){}}),OP={key:0,class:"row q-col-gutter-md"},RP={class:"q-pa-md q-gutter-sm",style:{height:"80px"}},LP=["src"],NP={class:"row no-wrap items-center"},BP={class:"col text-subtitle2 ellipsis-2-lines"},FP={class:"text-caption text-green-8 text-weight-bolder q-mt-md"},UP=["textContent"],zP=["textContent"],VP={key:0,class:"text-subtitle1"},YP=["textContent"],WP={key:1,class:"text-subtitle1"},HP={class:"text-caption text-grey ellipsis-2-lines",style:{"min-height":"40px"}},KP={class:"q-ml-auto"};function GP(e,t,r,a,l,s){return e.showStalls?(O(),ie("div",OP,[(O(!0),ie(Nt,null,Wt(e.stalls,u=>(O(),ie("div",{key:u.id,class:"col-xs-12 col-sm-6 col-md-4 col-lg-3"},[y(Jt,{class:"card--product"},{default:b(()=>[y($e,{class:"q-pb-xs q-pt-md"},{default:b(()=>[S("div",RP,[(O(!0),ie(Nt,null,Wt(u.images,(d,f)=>(O(),oe(Xr,{key:f,size:"40px",class:"overlapping",style:sw(`left: ${f*25}px; border: 2px solid white; position: absolute`)},{default:b(()=>[S("img",{src:d},null,8,LP)]),_:2},1032,["style"]))),128))])]),_:2},1024),y($e,{class:"q-pb-xs q-pt-md"},{default:b(()=>[S("div",NP,[S("div",BP,ge(u.name),1)])]),_:2},1024),y(ut),y($e,{class:"q-pl-sm"},{default:b(()=>[S("div",null,[S("span",FP,[S("span",{textContent:ge(u.productCount)},null,8,UP),De(" products")]),S("span",{textContent:ge(u.currency),class:"float-right"},null,8,zP)])]),_:2},1024),y($e,{class:"q-pl-sm gt-sm"},{default:b(()=>[u.categories?(O(),ie("div",VP,[y(lc,{items:u.categories||[],"virtual-scroll-horizontal":""},{default:b(({item:d,index:f})=>[(O(),oe(Qa,{key:f,dense:""},{default:b(()=>[S("span",{textContent:ge(d)},null,8,YP)]),_:2},1024))]),_:2},1032,["items"])])):(O(),ie("div",WP," \xA0 ")),S("div",HP,[S("p",null,ge(u.description||""),1)])]),_:2},1024),y(ut),y(wi,null,{default:b(()=>[S("div",KP,[y(ye,{flat:"",class:"text-weight-bold text-capitalize q-ml-auto float-left",dense:"",color:"primary",onClick:d=>e.$emit("change-page","stall",{stall:u.id})},{default:b(()=>[De(" Visit Stall ")]),_:2},1032,["onClick"])])]),_:2},1024)]),_:2},1024)]))),128))])):Re("",!0)}var QP=Cn($P,[["render",GP]]);const jP=sn({name:"ProductFilter",props:["filter","currencies","categories","merchants","profiles","stalls"],data:function(){return{merchantProfiles:[],filterData:{currency:null,priceFrom:0,priceTo:null,categories:[],merchants:[],stalls:[]}}},watch:{categories(e,t){this.filterData.categories=(e||[]).filter(r=>r.selected).map(r=>r.category)}},methods:{clear:function(){this.filterData={currency:null,priceFrom:0,priceTo:null,categories:[],merchants:[],stalls:[]},this.$emit("filter-update",this.filterData)},clearPrice(){this.filterData.currency=null,this.filterData.priceFrom=0,this.filterData.priceTo=null},clearMerchants(){this.filterData.merchants=[]},clearCategories(){this.filterData.categories=[]},clearStalls(){this.filterData.stalls=[]},search:function(){const e={...this.filterData,merchants:this.filterData.merchants.map(t=>t.value),stalls:this.filterData.stalls.map(t=>t.value)};this.$emit("filter-update",e)},mapMerchantProfile(e){const t=this.profiles.find(r=>r.pubkey===e);return t?{label:t.name+` (${e.substring(0,10)}...${e.substring(e.length-10)})`,value:e}:{label:e,value:e}}},created:async function(){console.log("### this.filter",this.filter),this.filterData={...this.filterData,...JSON.parse(JSON.stringify(this.filter||{}))},this.filterData.categories=[...new Set((this.filterData.categories||[]).concat((this.categories||[]).filter(e=>e.selected).map(e=>e.category)))],this.filterData.merchants=(this.filterData.merchants||[]).map(this.mapMerchantProfile),this.filterData.stalls=(this.filterData.stalls||[]).map(e=>{const t=this.stalls.find(r=>r.id===e)||{label:e,value:e};return{label:t.name,value:t.id}}),this.merchantProfiles=this.merchants.map(this.mapMerchantProfile)}}),ZP={class:"row q-mt-md q-ml-md q-pr-md"},JP={class:"col-md-3 col-sm-12 col-xs-12 q-pt-sm"},XP={class:"col-md-3 col-sm-12 col-xs-12 q-pt-sm q-pl-md"},ex={class:"col-md-3 col-sm-12 col-xs-12 q-pt-sm q-pl-lg"},tx={class:"col-md-3 col-sm-12 col-xs-12"},nx={class:"row q-mt-md q-ml-md q-pr-md"},rx={class:"col-9"},ix={class:"col-3"},ax={class:"row q-mt-md q-ml-md q-pr-md"},lx={class:"col-9"},ox={class:"col-3"},sx={class:"row q-mt-md q-ml-md q-pr-md"},ux={class:"col-9"},cx={class:"col-3"};function dx(e,t,r,a,l,s){return O(),oe(Jt,null,{default:b(()=>[y($e,null,{default:b(()=>[S("div",ZP,[S("div",JP,[y($a,{options:[...e.currencies].sort(),modelValue:e.filterData.currency,"onUpdate:modelValue":t[0]||(t[0]=u=>e.filterData.currency=u),filled:"",hint:"Only this Currency",label:"Currency"},null,8,["options","modelValue"])]),S("div",XP,[y(It,{modelValue:e.filterData.priceFrom,"onUpdate:modelValue":t[1]||(t[1]=u=>e.filterData.priceFrom=u),type:"number",label:"Price From",hint:"Price Starting At"},null,8,["modelValue"])]),S("div",ex,[y(It,{modelValue:e.filterData.priceTo,"onUpdate:modelValue":t[2]||(t[2]=u=>e.filterData.priceTo=u),type:"number",label:"Price To",hint:"Maximum Price"},null,8,["modelValue"])]),S("div",tx,[y(ye,{onClick:t[3]||(t[3]=u=>e.clearPrice()),flat:"",color:"grey",class:"float-right q-mt-sm"},{default:b(()=>[De(" Clear")]),_:1})])])]),_:1}),y($e,null,{default:b(()=>[S("div",nx,[S("div",rx,[y($a,{options:[...e.categories.map(u=>u.category).sort()],modelValue:e.filterData.categories,"onUpdate:modelValue":t[4]||(t[4]=u=>e.filterData.categories=u),filled:"",multiple:"","use-chips":"","stack-label":"",hint:"Any of these Categories",label:"Categories"},null,8,["options","modelValue"])]),S("div",ix,[y(ye,{onClick:t[5]||(t[5]=u=>e.clearCategories()),flat:"",color:"grey",class:"float-right q-mt-sm"},{default:b(()=>[De(" Clear")]),_:1})])]),S("div",ax,[S("div",lx,[y($a,{options:e.merchantProfiles,modelValue:e.filterData.merchants,"onUpdate:modelValue":t[6]||(t[6]=u=>e.filterData.merchants=u),filled:"",multiple:"","use-chips":"","stack-label":"",hint:"Only these Merchant",label:"Merchants"},null,8,["options","modelValue"])]),S("div",ox,[y(ye,{onClick:t[7]||(t[7]=u=>e.clearMerchants()),flat:"",color:"grey",class:"float-right q-mt-sm"},{default:b(()=>[De(" Clear")]),_:1})])]),S("div",sx,[S("div",ux,[y($a,{options:e.stalls.map(u=>({label:u.name,value:u.id})),modelValue:e.filterData.stalls,"onUpdate:modelValue":t[8]||(t[8]=u=>e.filterData.stalls=u),filled:"",multiple:"","use-chips":"","stack-label":"",hint:"Only these Stalls",label:"Stalls"},null,8,["options","modelValue"])]),S("div",cx,[y(ye,{onClick:t[9]||(t[9]=u=>e.clearStalls()),flat:"",color:"grey",class:"float-right q-mt-sm"},{default:b(()=>[De(" Clear")]),_:1})])])]),_:1}),y(ut),y(wi,{align:"right"},{default:b(()=>[y(ye,{onClick:t[10]||(t[10]=u=>e.clear()),flat:"",color:"grey"},{default:b(()=>[De(" Clear All Filters")]),_:1}),y(ye,{onClick:t[11]||(t[11]=u=>e.search()),flat:"",icon:"search",color:"primary",class:"q-mr-md"},{default:b(()=>[De(" Search ")]),_:1})]),_:1})]),_:1})}var fx=Cn(jP,[["render",dx]]);const hx={class:"row q-mb-md"},gx={class:"col-lg-1 col-md-1 gt-sm"},mx=["src"],vx={class:"col-lg-7 col-md-5 col-12 auto-width"},px=S("div",{id:"search-text"},null,-1),yx={class:"col-lg-4 col-md-6 col-12"},_x={class:"float-right"},bx=["textContent"],wx=["textContent"],Sx={key:0,class:"gt-sm"},kx=["textContent","onClick"],Cx=["textContent"],Tx=S("div",{class:"text-h6"}," There are no relays configured at this moment. ",-1),Mx=S("div",{class:"text-subtitle2"}," Start by creating or importing a market. ",-1),Dx={key:2,class:"row q-mb-sm"},qx={class:"col-12 text-center"},Px={key:0,class:"absolute-bottom text-subtitle1 text-center"},xx=["textContent"],Ax={class:"row q-mb-sm"},Ex={class:"col-md-10 col-sm-7 auto-width"},Ix=["textContent"],$x=S("strong",null,"All markets",-1),Ox=["textContent"],Rx=["textContent"],Lx={class:"col-md-2 col-sm-5"},Nx={key:3,class:"row q-mb-sm"},Bx={class:"col-12 text-center"},Fx={key:12},Ux=S("strong",{class:"text-h4"},"Welcome to the Nostr Market!",-1),zx=S("strong",{class:"text-h5 q-mt-lg"},"In order to start you can:",-1),Vx={class:"text-h6"},Yx={class:"text-h6"},Wx={class:"text-h6"},Hx=S("code",null,"naddr",-1),Kx={key:13},Gx=S("div",{class:"text-h6"},"Account Setup",-1),Qx=S("p",null,"Enter your Nostr private key or generate a new one.",-1),jx={class:"text-center q-mb-lg"},Zx={key:0,class:"q-my-lg"},Jx=["textContent"],Xx=["href"],eA={key:0,ratio:1},tA={key:1},nA={class:"row q-mt-lg"},rA=sn({name:"MarketPage",components:{MarketConfig:Ig},data:function(){return{account:null,accountMetadata:null,accountDialog:{show:!1,data:{watchOnly:!1,key:null}},relaysData:{},markets:[],shoppingCarts:[],checkoutCart:null,checkoutStall:null,activePage:"market",activeOrderId:null,dmSubscriptions:{},allMarketsSelected:!1,qrCodeDialog:{data:{payment_request:null,message:null},dismissMsg:null,show:!1},groupByStall:!1,relays:new Set,stalls:[],products:[],orders:{},profiles:[],bannerImage:null,logoImage:null,isLoading:!1,showFilterDetails:!1,searchText:null,filterData:{categories:[],merchants:[],stalls:[],currency:null,priceFrom:null,priceTo:null},dmEvents:null,activeMarket:null,activeStall:null,activeProduct:null,pool:null,config:{opts:null},defaultBanner:this.$q.config.staticPath+"/images/nostr-cover.png",defaultLogo:this.$q.config.staticPath+"/images/nostr-avatar.png",defaultMarketNaddr:"naddr1qqjr2e34v3jrzd3e95ensdfn956rywps94snwcmr95crvepexc6kxcfcxqmnvqg5waehxw309aex2mrp0yhxgctdw4eju6t0qyv8wumn8ghj7un9d3shjtnndehhyapwwdhkx6tpdsq36amnwvaz7tmwdaehgu3dwp6kytnhv4kxcmmjv3jhytnwv46qzxthwden5te0dehhxarj9eax2cn9v3jk2tnrd3hh2eqprfmhxue69uhhyetvv9ujummjv9hxwetsd9kxctnyv4mqzrthwden5te0dehhxtnvdakqz9rhwden5te0wfjkccte9ehx7um5wghxyecpzpmhxue69uhkummnw3ezuamfdejsz9thwden5te0v4jx2m3wdehhxarj9ekxzmnyqgstle9w09rt8y7xdlqs33v23vqvdtqx6j6j2wa4984g9n77tppx2tqrqsqqqa2ruusd5z",readNotes:{merchants:!1,marketUi:!1}}},watch:{config(e,t){var r,a,l,s;(a=(r=e==null?void 0:e.opts)==null?void 0:r.ui)!=null&&a.banner?(this.bannerImage=null,setTimeout(()=>{var u,d;this.bannerImage=this.sanitizeImageSrc((d=(u=e==null?void 0:e.opts)==null?void 0:u.ui)==null?void 0:d.banner,this.defaultBanner)})):this.bannerImage=this.defaultBanner,(s=(l=e==null?void 0:e.opts)==null?void 0:l.ui)!=null&&s.picture?(this.logoImage=null,setTimeout(()=>{var u,d;this.logoImage=this.sanitizeImageSrc((d=(u=e==null?void 0:e.opts)==null?void 0:u.ui)==null?void 0:d.picture,this.defaultLogo)})):this.logoImage=this.defaultLogo},searchText(e,t){if(!!e&&e.toLowerCase().startsWith("naddr"))try{const{type:r,data:a}=NostrTools.nip19.decode(e);if(r!=="naddr"||a.kind!==30019)return;this.$q.dialog(confirm("Do you want to import this market profile?")).onOk(async()=>{this.searchText="",await this.addMarket(e)})}catch{}}},computed:{selectedMarketsMerchants(){return[...new Set(this.markets.filter(e=>e.selected).map(e=>e.opts.merchants).flat())]},filteredProducts(){const e=g=>{var v;return!((v=this.filterData.merchants)!=null&&v.length)||this.filterData.merchants.includes(g)},t=g=>this.selectedMarketsMerchants.includes(g),r=g=>{var v;return!((v=this.filterData.stalls)!=null&&v.length)||this.filterData.stalls.includes(g)},a=g=>!this.filterData.currency||this.filterData.currency.toLowerCase()===g.toLowerCase(),l=g=>!this.filterData.priceFrom||g>=this.filterData.priceFrom,s=g=>!this.filterData.priceTo||g<=this.filterData.priceTo,u=g=>!this.activeStall||g==this.activeStall;let d=this.products.filter(g=>this.hasCategory(g.categories)&&u(g.stall_id)&&e(g.pubkey)&&t(g.pubkey)&&r(g.stall_id)&&a(g.currency)&&l(g.price)&&s(g.price));if(!this.searchText||this.searchText.length<2)return d;const f=this.searchText.toLowerCase();return d.filter(g=>g.name.toLowerCase().includes(f)||g.description&&g.description.toLowerCase().includes(f)||g.categories&&g.categories.toString().toLowerCase().includes(f))},filterCount(){let e=0;return this.filterData.currency&&e++,this.filterData.priceFrom&&e++,this.filterData.priceTo&&e++,this.filterData.categories&&(e+=this.filterData.categories.length),this.filterData.merchants&&(e+=this.filterData.merchants.length),this.filterData.stalls&&(e+=this.filterData.stalls.length),e},filterStalls(){const e=this.stalls.map(r=>({...r,categories:this.allStallCatgories(r.id),images:this.allStallImages(r.id).slice(0,8),productCount:this.products.filter(a=>a.stall_id===r.id).length})).filter(r=>this.hasCategory(r.categories));if(!this.searchText||this.searchText.length<2)return e;const t=this.searchText.toLowerCase();return this.stalls.filter(r=>r.name.toLowerCase().includes(t)||r.description&&r.description.toLowerCase().includes(t)||r.categories&&r.categories.toString().toLowerCase().includes(t))},marketsName(){var t,r;if(this.activeMarket)return((t=this.activeMarket.opts)==null?void 0:t.name)||"Market";const e=this.markets.filter(a=>a.selected);return e.length===0?"No Market":e.length===1?((r=e[0].opts)==null?void 0:r.name)||"Market":e.length+" Markets"},stallName(){var e;return((e=this.stalls.find(t=>t.id==this.activeStall))==null?void 0:e.name)||"Stall"},productName(){var e;return((e=this.products.find(t=>t.id==this.activeProduct))==null?void 0:e.name)||"Product"},isValidAccountKey(){return isValidKey(this.accountDialog.data.key)},allCartsItemCount(){return this.shoppingCarts.map(e=>e.products).flat().reduce((e,t)=>e+t.orderedQuantity,0)},allCategories(){const t=this.products.map(r=>r.categories).flat().filter(r=>!!r).map(r=>r.toLowerCase()).reduce((r,a)=>(r[a]=(r[a]||0)+1,r),{});return Object.keys(t).map(r=>({category:r,count:t[r],selected:this.filterData.categories.indexOf(r)!==-1})).sort((r,a)=>a.count-r.count)},allCurrencies(){const e=this.products.map(t=>t.currency.toUpperCase());return[...new Set(e)]},allMerchants(){return[...new Set(this.markets.map(e=>e.opts.merchants).flat())]},allRelays(){return[...new Set(this.markets.map(e=>e.relays).flat())]},processedEventIds(){const e=this.stalls.map(r=>r.eventId),t=this.products.map(r=>r.eventId);return e.concat(t)},activeMarketRelaysData(){return this.activeMarket?Object.values(this.relaysData).filter(e=>e&&this.activeMarket.relays.includes(e.relayUrl)):[]},dmPeers(){this.dmEvents;const e="nostrmarket.dm.";return this.$q.localStorage.getAllKeys().filter(r=>r.startsWith(e)).map(r=>r.substring(e.length))}},async created(){this.bannerImage=this.defaultBanner,this.logoImage=this.defaultLogo,this._restoreFromStorage();const e=new URLSearchParams(window.location.search);await this.addMarket(e.get("naddr")),await this._handleQueryParams(e),this.isLoading=!1,this._loadRelaysData(),this._startRelaysHealtCheck()},methods:{async _handleQueryParams(e){const t=e.get("merchant");console.log("### merchantPubkey",t);const r=e.get("stall"),a=e.get("product");r&&(this.setActivePage("customer-stall"),a&&(this.activeProduct=a),this.activeStall=r),t&&(isValidKey(t)?this.allMerchants.includes(t)?this.$q.notify({message:"Request (URL) merchant already exists!",type:"positive"}):this.$q.dialog(confirm("We found a merchant pubkey in your request. Do you want to add it to the merchants list?")).onOk(async()=>{this.createMarket(!1,[t])}):this.$q.notify({message:"Invalid merchant public key!",icon:"warning"}))},_applyUiConfigs(e={}){const{name:t,about:r,ui:a}=e;this.$q.localStorage.set("nostrmarket.marketplaceConfig",{name:t,about:r,ui:a}),a!=null&&a.theme&&document.body.setAttribute("data-theme",a.theme),this.$q.dark.set(!!(a!=null&&a.darkMode))},handleFilterData(e){console.log("### handleFilterData",e),this.filterData=e,this.setActivePage("market")},async updateUiConfig(e={opts:{}}){var l;const{name:t,about:r,ui:a}=e.opts;this.config={...this.config,opts:{...this.config.opts,name:t,about:r,ui:a}},this._applyUiConfigs((l=this.config)==null?void 0:l.opts)},generateKeyPair(){this.accountDialog.data.key=NostrTools.generatePrivateKey(),this.accountDialog.data.watchOnly=!1},openAccountDialog(){this.accountDialog.show=!0},async createAccount(){if(isValidKey(this.accountDialog.data.key,"nsec")){let{key:e,watchOnly:t}=this.accountDialog.data;if(e.startsWith("n")){let{type:l,data:s}=NostrTools.nip19.decode(e);e=s}const r=t?null:e,a=t?e:NostrTools.getPublicKey(e);this.$q.localStorage.set("nostrmarket.account",{privkey:r,pubkey:a,nsec:NostrTools.nip19.nsecEncode(e),npub:NostrTools.nip19.npubEncode(a),useExtension:!1}),this.accountDialog.data={watchOnly:!1,key:null},this.accountDialog.show=!1,this.account=this.$q.localStorage.getItem("nostrmarket.account"),await this._requeryAllRelays()}this.accountDialog.show=!1},logout(){window.localStorage.removeItem("nostrmarket.account"),this._clearNonAccountData(),window.location.href=window.location.origin+window.location.pathname,this.account=null,this.accountMetadata=null},clearAllData(){this.$q.dialog(confirm("This will remove all information about merchants, products, relays and others. You will NOT be logged out. Do you want to proceed?")).onOk(async()=>{this._clearNonAccountData(),window.location.href=window.location.origin+window.location.pathname})},_clearNonAccountData(){this.$q.localStorage.getAllKeys().filter(e=>e!=="nostrmarket.account").forEach(e=>window.localStorage.removeItem(e)),this.orders=[],this.config={opts:null},this.shoppingCarts=[],this.checkoutCart=null},_startRelaysHealtCheck(){setInterval(()=>{Object.keys(this.relaysData).forEach(e=>{this.relaysData[e].relay.status===WebSocket.CLOSED&&this._connectToRelay(e)})},30*1e3)},async _toRelayKey(e){return"relay_"+await hash(e)},async _loadRelaysData(){for(const e of this.markets)for(const t of e.relays)await this._loadRelayData(t,e.opts.merchants);Object.keys(this.relaysData).forEach(this._connectToRelay)},async _loadRelayData(e,t){const r=await this._toRelayKey(e);this.relaysData[r]=this.relaysData[r]||{relayUrl:e,connected:!1,error:null,merchants:[],lastEventAt:this.getLastEventDateForRelay(e)};const a=this.relaysData[r];a.merchants=[...new Set(a.merchants.concat(t))]},getLastEventDateForRelay(e){const t=(this.$q.localStorage.getItem("nostrmarket.relays")||[]).find(r=>r.relayUrl===e);return console.log("### getLastEventForRelay",e,t),(t==null?void 0:t.lastEventAt)||0},async _connectToRelay(e){const t=this.relaysData[e];try{console.log(`Trying to connect to relay ${t.relayUrl}`),t.relay=NostrTools.relayInit(t.relayUrl),t.relay.on("connect",()=>{t.connected=!0,t.error=null,console.log(`Connected to relay ${t.relayUrl}`),this._queryRelay(e)}),t.relay.on("error",r=>{console.warn(`Error by relay ${t.relayUrl}`),t.connected=!1,t.error=r}),await t.relay.connect()}catch(r){t.connected=!1,t.error=`${r}`,console.warn(`Failed to connect to ${t.relayUrl}`)}},async _requeryAllRelays(){Object.keys(this.relaysData).forEach(async e=>{await this._requeryRelay(e)})},async _requeryRelay(e){var r;const t=this.relaysData[e];t.connected&&((r=t.sub)==null||r.unsub(),this._queryRelay(e))},_buildRelayFilters(e){var a;const t=e.merchants,r=[{kinds:[0,5,30017,30018],authors:t,since:e.lastEventAt+1}];if((a=this.account)!=null&&a.pubkey){const l=this._noDmEvents()?0:e.lastEventAt+1;r.push({kinds:[4],"#p":[this.account.pubkey],since:l},{kinds:[4],authors:[this.account.pubkey],since:l})}return r},async _queryRelay(e){const t=this.relaysData[e],r=this._buildRelayFilters(t),a=await t.relay.list(r);console.log("### _queryRelay.filters",t.relayUrl,r),console.log("### _queryRelay.events",t.relayUrl,a),a!=null&&a.length&&await this._processEvents(a,t),t.sub=t.relay.sub(r),t.sub.on("event",l=>{this._processEvents([l],t)},{id:"masterSub"})},async _publishEventToRelays(e,t){let r=0;for(const a of t)await this._publishEventToRelay(e,a)&&r++;return r},async _publishEventToRelay(e,t){try{const r=await this._toRelayKey(t),a=this.relaysData[r];return a!=null&&a.connected&&await a.relay.publish(e),!0}catch(r){return console.warn(r),!1}},_findRelaysForMerchant(e){const t=this.markets.filter(r=>r.opts.merchants.includes(e)).map(r=>r.relays).flat();return[...new Set(t)]},_processEvents(e,t){if(!(e!=null&&e.length))return;console.log("### _processEvents",t.relayUrl,e);const r=e.sort((a,l)=>l.created_at-a.created_at)[0].created_at;t.lastEventAt=Math.max(r,t.lastEventAt),e=e.filter(a=>!this.processedEventIds.includes(a.id)).map(a=>({...a,relayUrl:t.relayUrl})).map(eventToObj),e.filter(a=>a.kind===0).forEach(this._processProfileEvents),e.filter(a=>a.kind===4).forEach(this._processDmEvents),e.filter(a=>a.kind===5).forEach(this._processDeleteEvents),e.filter(a=>a.kind===30017).forEach(this._processStallEvents),e.filter(a=>a.kind===30018).forEach(this._processProductEvents),this._persistStallsAndProducts(),this._persistRelaysData()},_processProfileEvents(e){try{this.profiles=this.profiles.filter(t=>t.pubkey!==e.pubkey),this.profiles.push({pubkey:e.pubkey,...e.content}),this.$q.localStorage.set("nostrmarket.profiles",this.profiles)}catch(t){console.warn(t)}},_processStallEvents(e){this._processStall({...e.content,id:e.d,pubkey:e.pubkey,createdAt:e.created_at,eventId:e.id,relayUrls:[e.relayUrl]})},_processStall(e){const t=this.stalls.findIndex(a=>a.id===e.id&&a.pubkey===e.pubkey);if(t===-1){this.stalls.push(e);return}this.stalls[t].createdAta.pubkey===e.pubkey&&a.stall_id===e.id).forEach(a=>a.stallName=e.name))},_processProductEvents(e){const t={...e.content},r=this.stalls.find(a=>a.id==t.stall_id);!r||(t.currency!="sat"&&(t.formatedPrice=this.getAmountFormated(t.price,t.currency)),this._processProduct({...t,stallName:r.name,images:t.images||[t.image],pubkey:e.pubkey,id:e.d,categories:e.t,eventId:e.id,createdAt:e.created_at,relayUrls:[e.relayUrl]}))},_processProduct(e){const t=this.products.findIndex(a=>a.id===e.id&&a.pubkey===e.pubkey);if(t===-1){this.products.push(e);return}const r=this.products[t];r.relayUrls=[...new Set(e.relayUrls.concat(r.relayUrls))],r.createdAts==="p"&&u&&u!=="")[1],r=e.pubkey===this.account.pubkey;if(t!==this.account.pubkey&&!r){console.warn("Unexpected DM. Dropped!");return}const a=r?t:e.pubkey;e.content=await NostrTools.nip04.decrypt(this.account.privkey,a,e.content),this._persistDMEvent(e,a),isJson(e.content)&&await this._handleStructuredDm(e,a)},async _processDeleteEvents(e){const t=(e.tags||[]).filter(s=>s[0]==="e").map(s=>s[1]),r=this.stalls.filter(s=>s.pubkey===e.pubkey&&t.includes(s.eventId)).map(s=>s.id),a=s=>s.pubkey===e.pubkey&&(t.includes(s.eventId)||r.includes(s.stall_id));this.products=this.products.filter(s=>!a(s));const l=s=>s.pubkey===e.pubkey&&t.includes(s.eventId);this.stalls=this.stalls.filter(s=>!l(s))},async createMarket(e,t){var r;try{this.setActivePage("loading");const a={d:crypto.randomUUID(),pubkey:((r=this.account)==null?void 0:r.pubkey)||"",relays:[...defaultRelays],selected:!0,opts:{name:"New Market",merchants:t||[],ui:{}}};this.markets.unshift(a),this.$q.localStorage.set("nostrmarket.markets",this.markets);for(const l of a.relays)this._handleNewRelay(l,a);e===!0&&this.showMarketConfig(0)}catch(a){console.warn(a)}finally{this.setActivePage("market-config")}},async addMarket(e){if(!!e)try{this.setActivePage("loading");const{type:t,data:r}=NostrTools.nip19.decode(e);if(t!=="naddr"||r.kind!==30019)return;const a={d:r.identifier,pubkey:r.pubkey,relays:r.relays,selected:!0},s=await new NostrTools.SimplePool().get(a.relays,{kinds:[30019],limit:1,authors:[a.pubkey],"#d":[a.d]});if(!s)return;isJson(s.content)&&(a.opts=JSON.parse(s.content),this.$q.dialog(confirm(`Do you want to use the look and feel of the '${a.opts.name}' market?`)).onOk(async()=>{this.config={...this.config,opts:a.opts},this._applyUiConfigs(a==null?void 0:a.opts)})),this.markets=this.markets.filter(u=>u.d!==a.d||u.pubkey!==a.pubkey),this.markets.unshift(a),this.$q.localStorage.set("nostrmarket.markets",this.markets);for(const u of a.relays)await this._handleNewRelay(u,a)}catch(t){console.warn(t)}finally{this.setActivePage("market")}},updateMarket(e){var t,r;try{this.isLoading=!0;const{d:a,pubkey:l}=e,s=this.markets.find(v=>v.d===a&&v.pubkey===l)||{},u=(t=e.opts)==null?void 0:t.merchants.filter(v=>{var C;return!((C=s.opts)!=null&&C.merchants.includes(v))}),d=(r=s.opts)==null?void 0:r.merchants.filter(v=>{var C;return!((C=e.opts)!=null&&C.merchants.includes(v))}),f=e.relays.filter(v=>!s.relays.includes(v)),g=s.relays.filter(v=>!e.relays.includes(v));this.markets=this.markets.filter(v=>v.d!==a||v.pubkey!==l),this.markets.unshift(e),this.$q.localStorage.set("nostrmarket.markets",this.markets),d==null||d.forEach(this._handleRemoveMerchant),u==null||u.forEach(v=>this._handleNewMerchant(e,v)),console.log("### newRelays",f),console.log("### removedRelays",g),f==null||f.forEach(v=>this._handleNewRelay(v,e)),g==null||g.forEach(this._handleRemovedRelay),this._persistStallsAndProducts(),this._persistRelaysData()}catch(a){console.warn(a)}finally{this.isLoading=!1}},deleteMarket(e){var t,r;try{this.isLoading=!0;const{d:a,pubkey:l}=e;this.markets=this.markets.filter(s=>s.d!==a||s.pubkey!==l),this.$q.localStorage.set("nostrmarket.markets",this.markets),this.activeMarket&&this.activeMarket.d===a&&this.activeMarket.pubkey===l&&(this.activeMarket=null,this.navigateTo("market"),this.updateUiConfig(this.markets[0])),(t=e.opts.merchants)==null||t.forEach(this._handleRemoveMerchant),(r=e.relays)==null||r.forEach(this._handleRemovedRelay),this._persistStallsAndProducts(),this._persistRelaysData()}catch(a){console.warn(a)}finally{this.isLoading=!1}},toggleMarket(){this.allMarketsSelected=!this.markets.find(e=>!e.selected),this.$q.localStorage.set("nostrmarket.markets",this.markets)},toggleAllMarkets(){this.markets.forEach(e=>e.selected=this.allMarketsSelected),this.$q.localStorage.set("nostrmarket.markets",this.markets)},showMarketConfig(e){this.activeMarket=this.markets[e],this.transitToPage("market-config")},async publishNaddr(e){var l,s;if(!((l=this.account)!=null&&l.privkey)){this.openAccountDialog(),this.$q.notify({message:"Login Required!",icon:"warning"});return}console.log("### marketData",e);const t=(s=e.d)!=null?s:crypto.randomUUID(),r={...await NostrTools.getBlankEvent(),kind:30019,content:JSON.stringify(e.opts),created_at:Math.floor(Date.now()/1e3),tags:[["d",t]],pubkey:this.account.pubkey};r.id=NostrTools.getEventHash(r);try{r.sig=await NostrTools.signEvent(r,this.account.privkey);const u=await this._publishEventToRelays(r,e.relays);this.$q.notify({type:u?"positive":"warning",message:u?`The market profile has been published tp (${u} relays)!`:"The market profile could not be published"})}catch(u){console.error(u),this.$q.notify({message:"Cannot publish market profile",caption:`Error: ${u}`,color:"negative"});return}const a=NostrTools.nip19.naddrEncode({pubkey:r.pubkey,kind:30019,identifier:t,relays:e.relays});this.copyText(a)},_handleNewMerchant(e,t){Object.keys(this.relaysData).forEach(async r=>{const a=this.relaysData[r];if(!e.relays.includes(a.relayUrl)||a.merchants.includes(t))return;const l=await a.relay.list([{kinds:[0,30017,30018],authors:[t]}]);await this._processEvents(l,a),a.merchants.push(t),await this._requeryRelay(r)})},async _handleNewRelay(e,t){const r=await this._toRelayKey(e);if(this.relaysData[r]){const a=this.relaysData[r],l=await a.relay.list([{kinds:[0,30017,30018],authors:t.opts.merchants}]);await this._processEvents(l,a),a.merchants=[...new Set(a.merchants.concat(t.opts.merchants))],await this._requeryRelay(r)}else await this._loadRelayData(e,t.opts.merchants),await this._connectToRelay(r)},_handleRemoveMerchant(e){this.markets.find(r=>r.opts.merchants.find(a=>a===e))||(this.products=this.products.filter(r=>r.pubkey!==e),this.stalls=this.stalls.filter(r=>r.pubkey!==e),this._removeSubscriptionsForMerchant(e))},_removeSubscriptionsForMerchant(e){Object.keys(this.relaysData).forEach(async t=>{const r=this.relaysData[t];!r.merchants.includes(e)||(r.merchants=r.merchants.filter(a=>a!==e),await this._requeryRelay(t))})},async _handleRemovedRelay(e){if(!this.markets.find(r=>r.relays.find(a=>a===e))){const r=await this._toRelayKey(e);delete this.relaysData[r],this._persistRelaysData()}},addProductToCart(e){let t=this.shoppingCarts.find(a=>a.id===e.stall_id);t||(t={id:e.stall_id,products:[]},this.shoppingCarts.push(t)),t.merchant=e.pubkey;let r=t.products.find(a=>a.id===e.id);r||(r={...e,orderedQuantity:0},t.products.push(r)),r.orderedQuantity=Math.min(r.quantity,e.orderedQuantity||r.orderedQuantity+1),this.$q.localStorage.set("nostrmarket.shoppingCarts",this.shoppingCarts),this.$q.notify({type:"positive",message:"Product added to cart!"})},removeProductFromCart(e){const t=this.shoppingCarts.find(r=>r.id===e.stallId);t&&(t.products=t.products.filter(r=>r.id!==e.productId),t.products.length||(this.shoppingCarts=this.shoppingCarts.filter(r=>r.id!==e.stallId)),this.$q.localStorage.set("nostrmarket.shoppingCarts",this.shoppingCarts))},removeCart(e){this.shoppingCarts=this.shoppingCarts.filter(t=>t.id!==e),this.$q.localStorage.set("nostrmarket.shoppingCarts",this.shoppingCarts)},checkoutStallCart(e){this.checkoutCart=e,this.checkoutStall=this.stalls.find(t=>t.id===e.id),this.setActivePage("shopping-cart-checkout")},handleDmChatSelected(e){this.dmEvents=this.$q.localStorage.getItem(`nostrmarket.dm.${e}`)||{}},async sendDirectMessage(e){var t;if(!((t=this.account)!=null&&t.pubkey)){this.$q.notify({type:"warning",message:"Cannot send message. No user logged in!"});return}try{const r={...await NostrTools.getBlankEvent(),kind:4,created_at:Math.floor(Date.now()/1e3),tags:[["p",e.to]],pubkey:this.account.pubkey};r.content=await NostrTools.nip04.encrypt(this.account.privkey,e.to,e.message),r.id=NostrTools.getEventHash(r),r.sig=await NostrTools.signEvent(r,this.account.privkey),await this._sendDmEvent(r),r.content=e.message,this._persistDMEvent(r,e.to)}catch{this.$q.notify({type:"warning",message:"Failed to send message!"})}},async _sendDmEvent(e){const t=e.tags.filter(a=>a[0]==="p").map(a=>a[1]);let r=this._findRelaysForMerchant(t[0]);r!=null&&r.length||(r=[...defaultRelays]),await this._publishEventToRelays(e,r)},_noDmEvents(){return this.$q.localStorage.getAllKeys().filter(t=>t.startsWith("nostrmarket.dm")).length===0},async placeOrder({event:e,order:t,cartId:r}){var a;if(!((a=this.account)!=null&&a.privkey)){this.openAccountDialog();return}try{this.activeOrderId=t.id,e.content=await NostrTools.nip04.encrypt(this.account.privkey,this.checkoutStall.pubkey,JSON.stringify(t)),e.id=NostrTools.getEventHash(e),e.sig=await NostrTools.signEvent(e,this.account.privkey),await this._sendOrderEvent(e),this._persistOrderUpdate(this.checkoutStall.pubkey,e.created_at,t),this.removeCart(r),this.setActivePage("shopping-cart-list")}catch(l){console.warn(l),this.$q.notify({type:"warning",message:"Failed to place order!"})}},async _sendOrderEvent(e){const t=e.tags.filter(l=>l[0]==="p").map(l=>l[1]),r=this._findRelaysForMerchant(t[0]),a=await this._publishEventToRelays(e,r);this.$q.notify({type:a?"positive":"warning",message:a?`The order has been placed (${a} relays)!`:"Order could not be placed"}),this.qrCodeDialog={data:{payment_request:null,message:null},dismissMsg:null,show:!!a}},_handlePaymentRequest(e){var r;if(e.id&&e.id!==this.activeOrderId)return;if(!((r=e.payment_options)!=null&&r.length)){this.qrCodeDialog.data.message=e.message||"Unexpected error";return}const t=e.payment_options.find(a=>a.type=="ln").link;!t||(this.qrCodeDialog.data.payment_request=t,this.qrCodeDialog.dismissMsg=this.$q.notify({timeout:1e4,message:"Waiting for payment..."}))},_handleOrderStatusUpdate(e){if(e.id&&e.id!==this.activeOrderId)return;this.qrCodeDialog.dismissMsg&&this.qrCodeDialog.dismissMsg(),this.qrCodeDialog.show=!1;const t=e.shipped?"Order shipped":e.paid?"Order paid":"Order notification";this.$q.notify({type:"positive",message:t,caption:e.message||""})},async _handleStructuredDm(e,t){try{const r=JSON.parse(e.content);[0,1,2].indexOf(r.type)!==-1&&this._persistOrderUpdate(t,e.created_at,r),r.type===1?this._handlePaymentRequest(r):r.type===2&&this._handleOrderStatusUpdate(r)}catch(r){console.warn("Unable to handle incomming DM",r)}},_restoreFromStorage(){this.markets=this.$q.localStorage.getItem("nostrmarket.markets")||[],this.allMarketsSelected=!this.markets.find(l=>!l.selected),this.shoppingCarts=this.$q.localStorage.getItem("nostrmarket.shoppingCarts")||[],this.profiles=this.$q.localStorage.getItem("nostrmarket.profiles")||[],this.account=this.$q.localStorage.getItem("nostrmarket.account")||null,this.stalls=this.$q.localStorage.getItem("nostrmarket.stalls")||[],this.products=this.$q.localStorage.getItem("nostrmarket.products")||[];const e=this.$q.localStorage.getItem("nostrmarket.marketplaceConfig")||{ui:{darkMode:!1}};this.config={...this.config,opts:{...this.config.opts,...e}},this._applyUiConfigs(this.config.opts);const t="nostrmarket.orders.";this.$q.localStorage.getAllKeys().filter(l=>l.startsWith(t)).forEach(l=>{const s=l.substring(t.length);this.orders[s]=this.$q.localStorage.getItem(l)});const a=this.$q.localStorage.getItem("nostrmarket.readNotes")||{};this.readNotes={...this.readNotes,...a}},_persistStallsAndProducts(){this.$q.localStorage.set("nostrmarket.stalls",this.stalls),this.$q.localStorage.set("nostrmarket.products",this.products)},_persistRelaysData(){this.$q.localStorage.set("nostrmarket.relays",Object.values(this.relaysData).filter(e=>!!e).map(e=>({lastEventAt:e.lastEventAt,relayUrl:e.relayUrl})))},_persistDMEvent(e,t){var l;const r=this.$q.localStorage.getItem(`nostrmarket.dm.${t}`)||{events:[],lastCreatedAt:0};r.events.find(s=>s.id===e.id)||(r.events.push(e),r.events.sort((s,u)=>s.created_at-u.created_at),r.lastCreatedAt=r.events[r.events.length-1].created_at,r.peerPubkey=t,this.$q.localStorage.set(`nostrmarket.dm.${t}`,r),((l=this.dmEvents)==null?void 0:l.peerPubkey)===t?this.dmEvents=this.$q.localStorage.getItem(`nostrmarket.dm.${t}`)||{}:this.dmEvents={...this.dmEvents})},_persistOrderUpdate(e,t,r){let a=this.$q.localStorage.getItem(`nostrmarket.orders.${e}`)||[];const l=a.findIndex(u=>u.id===r.id);if(l===-1){a.unshift({...r,eventCreatedAt:t,createdAt:t}),this.orders[e]=a,this.orders={...this.orders},this.$q.localStorage.set(`nostrmarket.orders.${e}`,a);return}let s=a[l];r.type===0?(s.createdAt=t,s={...s,...r,message:s.message||r.message}):s=s.eventCreatedAtf.id==r))==null?void 0:d.pubkey);s.searchParams.set("merchant",u),e==="stall"||e==="product"?r&&(this.activeStall=r,this.setActivePage("customer-stall"),s.searchParams.set("stall",r),this.activeProduct=a,a?s.searchParams.set("product",a):s.searchParams.delete("product")):(this.activeMarket=null,this.activeStall=null,this.activeProduct=null,s.searchParams.delete("merchant"),s.searchParams.delete("stall"),s.searchParams.delete("product"),this.setActivePage(e)),window.history.pushState({},"",s)},copyUrl:function(){this.copyText(window.location)},copyText:function(e){var t=this.$q.notify;AS(e).then(function(){t({message:"Copied to clipboard!",position:"bottom"})})},getAmountFormated(e,t="USD"){return formatCurrency(e,t)},setActivePage(e="market"){this.activePage=e},transitToPage(e){this.activePage="loading",setTimeout(()=>this.setActivePage(e),100)},showInvoiceQr(e){!e||(this.qrCodeDialog={data:{payment_request:e},dismissMsg:null,show:!0})},toggleCategoryFilter(e){const t=this.filterData.categories.indexOf(e);t===-1?this.filterData.categories.push(e):this.filterData.categories.splice(t,1)},hasCategory(e=[]){var t;if(!((t=this.filterData.categories)!=null&&t.length))return!0;for(const r of e)if(this.filterData.categories.indexOf(r.toLowerCase())!==-1)return!0;return!1},allStallCatgories(e){const t=this.products.filter(r=>r.stall_id===e).map(r=>r.categories).flat().filter(r=>!!r);return Array.from(new Set(t))},allStallImages(e){const t=this.products.filter(r=>r.stall_id===e).map(r=>r.images&&r.images[0]).filter(r=>!!r);return Array.from(new Set(t))},sanitizeImageSrc(e,t){try{if(e)return new URL(e),e}catch{}return t},markNoteAsRead(e){this.readNotes[e]=!0,this.$q.localStorage.set("nostrmarket.readNotes",this.readNotes)},focusOnElement(e){var t;(t=document.getElementById(e))==null||t.scrollIntoView(),this.showFilterDetails=!0}}}),lA=Object.assign(rA,{setup(e){return window.$q=Lw(),(t,r)=>(O(),ie(Nt,null,[y($w,null,{default:b(()=>{var a,l,s,u,d;return[S("div",hx,[S("div",gx,[y(Xr,{onClick:r[0]||(r[0]=f=>t.navigateTo("market")),rounded:"",size:"64px",class:"q-ma-none q-pa-none gt-sm cursor-pointer"},{default:b(()=>[t.logoImage?(O(),ie("img",{key:0,src:t.logoImage},null,8,mx)):Re("",!0)]),_:1})]),S("div",vx,[px,y(It,{class:"rounded-pill",style:{width:"100%"},rounded:"",outlined:"",clearable:"",modelValue:t.searchText,"onUpdate:modelValue":r[1]||(r[1]=f=>t.searchText=f),modelModifiers:{trim:!0},label:"Filter products, load market profile..."},jh({append:b(()=>[t.searchText?Re("",!0):(O(),oe(Yt,{key:0,name:"search"}))]),_:2},[t.showFilterDetails?{name:"label",fn:b(()=>[De(" Filter or paste a "),y(Ln,{class:"q-px-sm text-subtitle1",color:"secondary"},{default:b(()=>[De("naddr")]),_:1}),De(" here ")]),key:"0"}:void 0]),1032,["modelValue"])]),S("div",yx,[S("div",_x,[y(ye,{color:"gray",icon:"travel_explore",flat:"",size:"lg",onClick:r[2]||(r[2]=f=>t.navigateTo("product-filter"))},{default:b(()=>[y(Qr,null,{default:b(()=>[De("Search for products on Nostr")]),_:1}),t.filterCount?(O(),oe(Ln,{key:0,color:"secondary",floating:""},{default:b(()=>[S("span",{textContent:ge(t.filterCount)},null,8,bx)]),_:1})):Re("",!0)]),_:1}),y(ye,{onClick:r[3]||(r[3]=f=>t.navigateTo("user-config")),color:"gray",icon:t.account?"perm_identity":"person_add",flat:"",size:"lg"},{default:b(()=>[y(Qr,null,{default:b(()=>[De("User Config")]),_:1})]),_:1},8,["icon"]),y(ye,{onClick:r[4]||(r[4]=f=>t.navigateTo("user-chat")),color:"gray",icon:"chat",flat:"",size:"lg"},{default:b(()=>[y(Qr,null,{default:b(()=>[De("Chat")]),_:1})]),_:1}),y(ye,{onClick:r[5]||(r[5]=f=>t.navigateTo("customer-orders")),color:"gray",icon:"receipt_long",flat:"",size:"lg"},{default:b(()=>[y(Qr,null,{default:b(()=>[De("Orders")]),_:1})]),_:1}),y(ye,{color:"gray",icon:"shopping_cart",dense:"",round:"",flat:"",size:"lg",onClick:r[6]||(r[6]=f=>t.navigateTo("shopping-cart-list"))},{default:b(()=>[y(Qr,null,{default:b(()=>[De("Shopping Cart")]),_:1}),t.allCartsItemCount?(O(),oe(Ln,{key:0,color:"secondary",floating:""},{default:b(()=>[S("span",{textContent:ge(t.allCartsItemCount)},null,8,wx)]),_:1})):Re("",!0)]),_:1})])])]),(a=t.products)!=null&&a.length?(O(),ie("div",Sx,[y(lc,{items:t.allCategories,"virtual-scroll-horizontal":""},{default:b(({item:f,index:g})=>[(O(),oe(Qa,{key:g,color:f.selected?"grey":"",class:"cursor-pointer q-mb-md"},{default:b(()=>[S("span",{textContent:ge(f.category),onClick:v=>t.toggleCategoryFilter(f.category)},null,8,kx),y(Ln,{onClick:v=>t.toggleCategoryFilter(f.category),rounded:"",class:"q-ml-sm",color:"secondary"},{default:b(()=>[S("span",{textContent:ge(f.count)},null,8,Cx)]),_:2},1032,["onClick"])]),_:2},1032,["color"]))]),_:1},8,["items"])])):Re("",!0),t.markets.length?Re("",!0):(O(),oe(Jt,{key:1,class:"q-mb-sm"},{default:b(()=>[y($e,{class:"bg-secondary text-white"},{default:b(()=>[Tx,Mx]),_:1})]),_:1})),t.isLoading?(O(),ie("div",Dx,[S("div",qx,[y($u,{color:"primary",size:"xl"})])])):Re("",!0),y(qw,{class:"row q-pa-none q-mb-lg gt-sm shadow-2"},{default:b(()=>[t.bannerImage?(O(),oe(oc,{key:0,src:t.bannerImage,onClick:r[7]||(r[7]=f=>t.navigateTo("market")),class:"rounded-borders cursor-pointer",style:{width:"100%",height:"250px"},cover:""},{default:b(()=>{var f,g;return[(g=(f=t.config)==null?void 0:f.opts)!=null&&g.about?(O(),ie("div",Px,[S("span",{textContent:ge(t.config.opts.about)},null,8,xx)])):Re("",!0)]}),_:1},8,["src"])):Re("",!0)]),_:1}),S("div",Ax,[S("div",Ex,[y(Iw,{class:"cursor q-mt-sm q-mr-sm"},{default:b(()=>[y(Sr,null,{default:b(()=>[y(ye,{onClick:r[8]||(r[8]=f=>t.navigateTo("market")),icon:"home",flat:"",class:"q-pa-none"},{default:b(()=>[S("span",{textContent:ge(t.marketsName),class:"q-ml-sm"},null,8,Ix)]),_:1}),y(lg,{flat:"",class:"q-pl-xs"},{default:b(()=>[y(Mr,null,{default:b(()=>[Gn((O(),oe(Vt,null,{default:b(()=>[y(Ie,{side:"",top:""},{default:b(()=>[y(lo,{modelValue:t.allMarketsSelected,"onUpdate:modelValue":r[9]||(r[9]=f=>t.allMarketsSelected=f),onClick:t.toggleAllMarkets},null,8,["modelValue","onClick"])]),_:1}),y(Ie,null,{default:b(()=>[y(Ke,null,{default:b(()=>[$x]),_:1}),y(Ke,{caption:""},{default:b(()=>[De("Aggregate all markets into one view")]),_:1})]),_:1}),y(Ie,{side:"",top:""},{default:b(()=>[Gn((O(),oe(ye,{onClick:r[10]||(r[10]=f=>t.createMarket(!0)),color:"green",outline:""},{default:b(()=>[De("New")]),_:1})),[[Gi]])]),_:1})]),_:1})),[[Ju]]),y(ut),(O(!0),ie(Nt,null,Wt(t.markets,(f,g)=>(O(),oe(Vt,{key:g},{default:b(()=>[y(Ie,{side:"",top:""},{default:b(()=>[y(lo,{modelValue:f.selected,"onUpdate:modelValue":v=>f.selected=v,onClick:r[11]||(r[11]=v=>t.toggleMarket())},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),y(Ie,null,{default:b(()=>[y(Ke,null,{default:b(()=>{var v;return[S("span",{textContent:ge(((v=f.opts)==null?void 0:v.name)||"Market")},null,8,Ox)]}),_:2},1024),y(Ke,{caption:""},{default:b(()=>{var v;return[S("span",{textContent:ge((v=f.opts)==null?void 0:v.about),class:"ellipsis-2-lines text-wrap"},null,8,Rx)]}),_:2},1024)]),_:2},1024),y(Ie,{side:"",top:""},{default:b(()=>[Gn(y(ye,{color:"secondary",flat:"",icon:"settings",onClick:v=>t.showMarketConfig(g)},null,8,["onClick"]),[[Gi]])]),_:2},1024)]),_:2},1024))),128))]),_:1})]),_:1})]),_:1}),t.activePage==="customer-stall"?(O(),oe(Sr,{key:0,label:t.stallName,onClick:r[12]||(r[12]=f=>t.navigateTo("stall",{stall:t.activeStall})),icon:"storefront",class:"cursor-pointer"},null,8,["label"])):Re("",!0),t.activePage==="customer-stall"&&t.activeProduct?(O(),oe(Sr,{key:1,label:t.productName,class:"cursor-pointer",icon:"widgets"},null,8,["label"])):Re("",!0),t.activePage==="shopping-cart-list"?(O(),oe(Sr,{key:2,label:"Shoping Cart",icon:"shopping_cart"})):Re("",!0),t.activePage==="customer-orders"?(O(),oe(Sr,{key:3,label:"Orders",icon:"receipt_long"})):Re("",!0),t.activePage==="market-config"?(O(),oe(Sr,{key:4,label:"Settings",icon:"settings"})):Re("",!0),t.activePage==="product-filter"?(O(),oe(Sr,{key:5,label:"Filter",icon:"travel_explore"})):Re("",!0),t.activePage==="user-config"?(O(),oe(Sr,{key:6,label:"User Config",icon:"perm_identity"})):Re("",!0),t.activePage==="user-chat"?(O(),oe(Sr,{key:7,label:"User Chat",icon:"chat"})):Re("",!0)]),_:1})]),S("div",Lx,[t.activePage==="customer-stall"?(O(),oe(ye,{key:0,flat:"",color:"grey",icon:"content_copy",onClick:r[13]||(r[13]=f=>t.copyUrl()),class:"float-right"})):t.activePage==="market"&&((l=t.stalls)==null?void 0:l.length)?(O(),oe(lo,{key:1,modelValue:t.groupByStall,"onUpdate:modelValue":r[14]||(r[14]=f=>t.groupByStall=f),class:"q-pl-md q-mt-sm float-right",size:"xs",val:"xs",label:"Group by stalls"},null,8,["modelValue"])):Re("",!0)])]),y(ut,{class:"q-mt-sm q-mb-md"}),t.activePage==="loading"?(O(),ie("div",Nx,[S("div",Bx,[y($u,{color:"primary",size:"xl"})])])):Re("",!0),t.activePage==="product-filter"?(O(),oe(fx,{key:4,filter:t.filterData,categories:t.allCategories,currencies:t.allCurrencies,merchants:t.allMerchants,stalls:t.stalls,profiles:t.profiles,onFilterUpdate:t.handleFilterData,class:"q-mb-md"},null,8,["filter","categories","currencies","merchants","stalls","profiles","onFilterUpdate"])):t.activeMarket&&t.activePage==="market-config"?(O(),oe(Ig,{key:5,market:t.activeMarket,profiles:t.profiles,"relays-data":t.activeMarketRelaysData,"read-notes":t.readNotes,onApplyUi:t.updateUiConfig,onMarketUpdate:t.updateMarket,onDeleteMarket:t.deleteMarket,onPublishNaddr:t.publishNaddr,onNoteRead:t.markNoteAsRead},null,8,["market","profiles","relays-data","read-notes","onApplyUi","onMarketUpdate","onDeleteMarket","onPublishNaddr","onNoteRead"])):t.activePage==="user-config"?(O(),oe(Vk,{key:6,account:t.account,onLogin:r[15]||(r[15]=f=>t.accountDialog.show=!0),onLogout:t.logout,onClearAllData:t.clearAllData,onCopyText:t.copyText},null,8,["account","onLogout","onClearAllData","onCopyText"])):t.activePage==="user-chat"?(O(),oe(hD,{key:7,"account-pubkey":(s=t.account)==null?void 0:s.pubkey,"peer-pubkeys":t.dmPeers,profiles:t.profiles,events:t.dmEvents,onChatSelected:t.handleDmChatSelected,onSendDm:t.sendDirectMessage},null,8,["account-pubkey","peer-pubkeys","profiles","events","onChatSelected","onSendDm"])):t.activePage==="shopping-cart-list"?(O(),oe(wD,{key:8,carts:t.shoppingCarts,profiles:t.profiles,onAddToCart:t.addProductToCart,onRemoveFromCart:t.removeProductFromCart,onRemoveCart:t.removeCart,onCheckoutCart:t.checkoutStallCart},null,8,["carts","profiles","onAddToCart","onRemoveFromCart","onRemoveCart","onCheckoutCart"])):t.activePage==="shopping-cart-checkout"?(O(),oe(eq,{key:9,cart:t.checkoutCart,stall:t.checkoutStall,"customer-pubkey":(u=t.account)==null?void 0:u.pubkey,profiles:t.profiles,onLoginRequired:t.openAccountDialog,onPlaceOrder:t.placeOrder,onChangePage:t.navigateTo},null,8,["cart","stall","customer-pubkey","profiles","onLoginRequired","onPlaceOrder","onChangePage"])):t.activePage==="customer-orders"?(O(),oe(Xq,{key:10,orders:t.orders,products:t.products,stalls:t.stalls,profiles:t.profiles,onShowInvoice:t.showInvoiceQr},null,8,["orders","products","stalls","profiles","onShowInvoice"])):t.activePage==="customer-stall"?(O(),oe(IP,{key:11,stall:t.stalls.find(f=>f.id==t.activeStall),products:t.filteredProducts,"product-detail":t.activeProduct,onChangePage:t.navigateTo,onAddToCart:t.addProductToCart},null,8,["stall","products","product-detail","onChangePage","onAddToCart"])):(d=t.markets)!=null&&d.length?(O(),ie("div",Kx,[t.groupByStall?(O(),oe(QP,{key:0,stalls:t.filterStalls,onChangePage:t.navigateTo},null,8,["stalls","onChangePage"])):(O(),oe(kq,{key:1,"filtered-products":t.filteredProducts,"search-text":t.searchText,"filter-categories":t.filterData.categories,onChangePage:t.navigateTo,onAddToCart:t.addProductToCart},null,8,["filtered-products","search-text","filter-categories","onChangePage","onAddToCart"]))])):(O(),ie("div",Fx,[y(Mr,{class:"q-mt-md",bordered:""},{default:b(()=>[y(Vt,null,{default:b(()=>[y(Ie,{class:"q-mt-sm q-ml-lg"},{default:b(()=>[y(Ke,null,{default:b(()=>[Ux]),_:1}),y(ut,{class:"q-mb-xl q-mt-md"}),y(Ke,null,{default:b(()=>[zx]),_:1})]),_:1})]),_:1}),y(Vt,null,{default:b(()=>[y(Ie,{class:"q-mt-sm q-ml-lg"},{default:b(()=>[y(Ke,null,{default:b(()=>[S("ul",null,[S("li",null,[S("span",Vx,[y(ye,{onClick:r[16]||(r[16]=f=>t.addMarket(t.defaultMarketNaddr)),size:"xl",flat:"",color:"secondary",class:"q-mb-xs"},{default:b(()=>[De("Import")]),_:1}),De(" a list of popular merchants, or ")])]),S("li",null,[S("span",Yx,[y(ye,{onClick:r[17]||(r[17]=f=>t.createMarket(!0)),flat:"",size:"xl",color:"secondary",class:"q-mb-xs"},{default:b(()=>[De("Add a merchant")]),_:1}),De(" using its public key, or ")])]),S("li",null,[S("span",Wx,[y(ye,{onClick:r[18]||(r[18]=f=>t.focusOnElement("search-text")),flat:"",size:"xl",color:"secondary",class:"q-mb-xs"},{default:b(()=>[De("Add a market profile")]),_:1}),De(" using a shareable "),Hx,De(" identifier ")]),y(It,{class:"rounded-pill",style:{width:"100%"},rounded:"",outlined:"",clearable:"",modelValue:t.searchText,"onUpdate:modelValue":r[19]||(r[19]=f=>t.searchText=f),modelModifiers:{trim:!0},label:"Load market profile (naddr)..."},null,8,["modelValue"])])])]),_:1})]),_:1}),y(Ie,{side:""})]),_:1})]),_:1})]))]}),_:1}),y(go,{modelValue:t.accountDialog.show,"onUpdate:modelValue":r[22]||(r[22]=a=>t.accountDialog.show=a),position:"top"},{default:b(()=>[y(Jt,null,{default:b(()=>[y($e,{class:"row"},{default:b(()=>[Gx,y(Rw)]),_:1}),y($e,null,{default:b(()=>[Qx]),_:1}),y($e,{class:"q-pt-none"},{default:b(()=>[y(It,{dense:"",label:"Nsec/Hex",modelValue:t.accountDialog.data.key,"onUpdate:modelValue":r[20]||(r[20]=a=>t.accountDialog.data.key=a),autofocus:"",onKeyup:Au(t.createAccount,["enter"]),error:t.accountDialog.data.key&&!t.isValidAccountKey,hint:"Enter you private key"},null,8,["modelValue","onKeyup","error"])]),_:1}),y(wi,{align:"right",class:"text-primary"},{default:b(()=>[t.isValidAccountKey?(O(),oe(ye,{key:0,label:"Login",color:"primary",onClick:r[21]||(r[21]=()=>t.createAccount())})):(O(),oe(ye,{key:1,flat:"",label:"Generate",onClick:t.generateKeyPair},null,8,["onClick"])),Gn((O(),oe(ye,{flat:"",color:"grey",class:"q-ml-auto"},{default:b(()=>[De("Close")]),_:1})),[[Gi]])]),_:1})]),_:1})]),_:1},8,["modelValue"]),y(go,{modelValue:t.qrCodeDialog.show,"onUpdate:modelValue":r[24]||(r[24]=a=>t.qrCodeDialog.show=a),position:"top"},{default:b(()=>[y(Jt,{class:"q-pa-md q-pt-xl"},{default:b(()=>{var a;return[S("div",jx,[t.qrCodeDialog.data.message?(O(),ie("div",Zx,[S("strong",null,[S("span",{textContent:ge(t.qrCodeDialog.data.message)},null,8,Jx)])])):(O(),ie("a",{key:1,href:"lightning:"+((a=t.qrCodeDialog.data)==null?void 0:a.payment_request)},[t.qrCodeDialog.data.payment_request?(O(),ie("div",eA,[y(uw(PS),{value:t.qrCodeDialog.data.payment_request,options:{width:340},class:"rounded-borders"},null,8,["value"])])):(O(),ie("div",tA,[y(Rh,{color:"primary",size:"2.55em"})]))],8,Xx))]),S("div",nA,[t.qrCodeDialog.data.payment_request?(O(),oe(ye,{key:0,outline:"",color:"grey",onClick:r[23]||(r[23]=l=>t.copyText(t.qrCodeDialog.data.payment_request))},{default:b(()=>[De("Copy invoice")]),_:1})):Re("",!0),Gn((O(),oe(ye,{flat:"",color:"grey",class:"q-ml-auto"},{default:b(()=>[De("Close")]),_:1})),[[Gi]])])]}),_:1})]),_:1},8,["modelValue"])],64))}});export{lA as default}; +}`;var Le=th(function(){return nt(p,ve+"return "+W).apply(r,w)});if(Le.source=W,nu(Le))throw Le;return Le}function L_(n){return at(n).toLowerCase()}function N_(n){return at(n).toUpperCase()}function B_(n,i,o){if(n=at(n),n&&(o||i===r))return ud(n);if(!n||!(i=yn(i)))return n;var c=zn(n),h=zn(i),p=cd(c,h),w=dd(c,h)+1;return Kr(c,p,w).join("")}function F_(n,i,o){if(n=at(n),n&&(o||i===r))return n.slice(0,hd(n)+1);if(!n||!(i=yn(i)))return n;var c=zn(n),h=dd(c,zn(i))+1;return Kr(c,0,h).join("")}function U_(n,i,o){if(n=at(n),n&&(o||i===r))return n.replace(fa,"");if(!n||!(i=yn(i)))return n;var c=zn(n),h=cd(c,zn(i));return Kr(c,h).join("")}function z_(n,i){var o=_e,c=xe;if(Ct(i)){var h="separator"in i?i.separator:h;o="length"in i?Oe(i.length):o,c="omission"in i?yn(i.omission):c}n=at(n);var p=n.length;if(Ei(n)){var w=zn(n);p=w.length}if(o>=p)return n;var k=o-Ii(c);if(k<1)return c;var P=w?Kr(w,0,k).join(""):n.slice(0,k);if(h===r)return P+c;if(w&&(k+=P.length-k),ru(h)){if(n.slice(k).search(h)){var U,z=P;for(h.global||(h=_s(h.source,at(qi.exec(h))+"g")),h.lastIndex=0;U=h.exec(z);)var W=U.index;P=P.slice(0,W===r?k:W)}}else if(n.indexOf(yn(h),k)!=k){var ne=P.lastIndexOf(h);ne>-1&&(P=P.slice(0,ne))}return P+c}function V_(n){return n=at(n),n&&ol.test(n)?n.replace(al,yv):n}var Y_=Fi(function(n,i,o){return n+(o?" ":"")+i.toUpperCase()}),lu=tf("toUpperCase");function eh(n,i,o){return n=at(n),i=o?r:i,i===r?hv(n)?wv(n):iv(n):n.match(i)||[]}var th=Ue(function(n,i){try{return vn(n,r,i)}catch(o){return nu(o)?o:new Ae(o)}}),W_=pr(function(n,i){return Pn(i,function(o){o=rr(o),mr(n,o,eu(n[o],n))}),n});function H_(n){var i=n==null?0:n.length,o=Se();return n=i?_t(n,function(c){if(typeof c[1]!="function")throw new xn(u);return[o(c[0]),c[1]]}):[],Ue(function(c){for(var h=-1;++hme)return[];var o=Z,c=jt(n,Z);i=Se(i),n-=Z;for(var h=vs(c,i);++o0||i<0)?new He(o):(n<0?o=o.takeRight(-n):n&&(o=o.drop(n)),i!==r&&(i=Oe(i),o=i<0?o.dropRight(-i):o.take(i-n)),o)},He.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},He.prototype.toArray=function(){return this.take(Z)},tr(He.prototype,function(n,i){var o=/^(?:filter|find|map|reject)|While$/.test(i),c=/^(?:head|last)$/.test(i),h=m[c?"take"+(i=="last"?"Right":""):i],p=c||/^find/.test(i);!h||(m.prototype[i]=function(){var w=this.__wrapped__,k=c?[1]:arguments,P=w instanceof He,U=k[0],z=P||Ee(w),W=function(We){var Qe=h.apply(m,Ur([We],k));return c&&ne?Qe[0]:Qe};z&&o&&typeof U=="function"&&U.length!=1&&(P=z=!1);var ne=this.__chain__,ve=!!this.__actions__.length,ke=p&&!ne,Le=P&&!ve;if(!p&&z){w=Le?w:new He(this);var Ce=n.apply(w,k);return Ce.__actions__.push({func:Wl,args:[W],thisArg:r}),new An(Ce,ne)}return ke&&Le?n.apply(this,k):(Ce=this.thru(W),ke?c?Ce.value()[0]:Ce.value():Ce)})}),Pn(["pop","push","shift","sort","splice","unshift"],function(n){var i=pl[n],o=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",c=/^(?:pop|shift)$/.test(n);m.prototype[n]=function(){var h=arguments;if(c&&!this.__chain__){var p=this.value();return i.apply(Ee(p)?p:[],h)}return this[o](function(w){return i.apply(Ee(w)?w:[],h)})}}),tr(He.prototype,function(n,i){var o=m[i];if(o){var c=o.name+"";ot.call(Li,c)||(Li[c]=[]),Li[c].push({name:i,func:o})}}),Li[Nl(r,F).name]=[{name:"wrapper",func:r}],He.prototype.clone=Vv,He.prototype.reverse=Yv,He.prototype.value=Wv,m.prototype.at=by,m.prototype.chain=wy,m.prototype.commit=Sy,m.prototype.next=ky,m.prototype.plant=Ty,m.prototype.reverse=My,m.prototype.toJSON=m.prototype.valueOf=m.prototype.value=Dy,m.prototype.first=m.prototype.head,ga&&(m.prototype[ga]=Cy),m},$i=Sv();ai?((ai.exports=$i)._=$i,ss._=$i):Ut._=$i}).call(Pa)})(Hu,Hu.exports);var iq=Hu.exports;const aq=sn({name:"ProductCard",props:["product","is-stall"],data:function(){return{}},methods:{},created(){}}),lq={class:"row no-wrap items-center"},oq={class:"col text-subtitle2 ellipsis-2-lines"},sq={key:0},uq={class:"text-h6"},cq={key:1},dq={class:"text-h6"},fq={class:"q-ml-md text-caption text-green-8 text-weight-bolder q-mt-md"},hq={key:0,class:"text-subtitle1"},gq=["textContent"],mq={key:1,class:"text-subtitle1"},vq={class:"text-caption text-grey ellipsis-2-lines",style:{"min-height":"40px"}},pq={key:0},yq={class:"text-caption text-weight-bolder"},_q={class:"q-ml-auto"};function bq(e,t,r,a,l,s){return O(),oe(Jt,{class:"card--product"},{default:b(()=>[y(oc,{src:e.product.images&&e.product.images.length>0&&e.product.images[0]?e.product.images[0]:e.$q.config.staticPath+"/images/placeholder.png",alt:"Product Image",loading:"lazy","spinner-color":"white",fit:"contain",height:"300px"},null,8,["src"]),y(Ne,{class:"q-pb-xs q-pt-md"},{default:b(()=>[y(ye,{round:"",disabled:e.product.quantity<1,color:"primary",rounded:"",icon:"shopping_cart",size:"lg",style:{position:"absolute",top:"0",right:"0",transform:"translate(-50%, -50%)"},onClick:t[0]||(t[0]=u=>e.$emit("add-to-cart",e.product))},{default:b(()=>[y(Qr,null,{default:b(()=>[Te(" Add to cart ")]),_:1})]),_:1},8,["disabled"]),S("div",lq,[S("div",oq,ge(e.product.name),1)])]),_:1}),y(Ne,{class:"q-py-sm"},{default:b(()=>[S("div",null,[e.product.currency=="sat"?(O(),re("span",sq,[S("span",uq,ge(e.product.price)+" sats",1),y(Qr,null,{default:b(()=>[Te(" BTC "+ge((e.product.price/1e8).toFixed(8)),1)]),_:1})])):(O(),re("span",cq,[S("span",dq,ge(e.product.formatedPrice),1)])),S("span",fq,ge(e.product.quantity)+" left",1)]),e.product.categories?(O(),re("div",hq,[y(lc,{items:e.product.categories||[],"virtual-scroll-horizontal":""},{default:b(({item:u,index:d})=>[(O(),oe(Qa,{key:d,dense:""},{default:b(()=>[S("span",{textContent:ge(u)},null,8,gq)]),_:2},1024))]),_:1},8,["items"])])):(O(),re("div",mq," \xA0 ")),S("div",vq,[e.product.description?(O(),re("p",pq,ge(e.product.description),1)):$e("",!0)])]),_:1}),y(ut),y(wi,null,{default:b(()=>[S("div",yq,ge(e.product.stallName),1)]),_:1}),y(ut),y(wi,null,{default:b(()=>[S("div",_q,[e.isStall?$e("",!0):(O(),oe(ye,{key:0,flat:"",class:"text-weight-bold text-capitalize q-ml-auto float-left",dense:"",color:"primary",onClick:t[1]||(t[1]=u=>e.$emit("change-page","stall",{stall:e.product.stall_id}))},{default:b(()=>[Te(" Visit Stall ")]),_:1})),y(ye,{flat:"",class:"text-weight-bold text-capitalize q-ml-auto",dense:"",color:"primary",onClick:t[2]||(t[2]=u=>e.$emit("change-page","stall",{stall:e.product.stall_id,product:e.product.id}))},{default:b(()=>[Te(" View details ")]),_:1})])]),_:1})]),_:1})}var Tm=Tn(aq,[["render",bq]]);const wq=sn({name:"CustomerMarket",components:{ProductCard:Tm},props:["filtered-products","search-text","filter-categories"],data:function(){return{search:null,partialProducts:[],productsPerPage:12,startIndex:0,lastProductIndex:0,showProducts:!0,debounceRefreshProducts:null}},watch:{searchText:function(){this.debounceRefreshProducts()},filteredProducts:function(){this.debounceRefreshProducts()},filterCategories:function(){this.debounceRefreshProducts()}},methods:{refreshProducts:function(){this.showProducts=!1,this.partialProducts=[],this.startIndex=0,this.lastProductIndex=Math.min(this.filteredProducts.length,this.productsPerPage),this.partialProducts.push(...this.filteredProducts.slice(0,this.lastProductIndex)),setTimeout(()=>{this.showProducts=!0},0)},addToCart(e){this.$emit("add-to-cart",e)},changePageM(e,t){this.$emit("change-page",e,t)},onLoad(e,t){setTimeout(()=>{if(this.startIndex>=this.filteredProducts.length){t();return}this.startIndex=this.lastProductIndex,this.lastProductIndex=Math.min(this.filteredProducts.length,this.lastProductIndex+this.productsPerPage),this.partialProducts.push(...this.filteredProducts.slice(this.startIndex,this.lastProductIndex)),t()},100)}},created(){this.debounceRefreshProducts=iq.debounce(this.refreshProducts,100),this.lastProductIndex=Math.min(this.filteredProducts.length,24),this.partialProducts.push(...this.filteredProducts.slice(0,this.lastProductIndex))}}),Sq={class:"row q-col-gutter-md"},kq={class:"row justify-center q-my-md"};function Cq(e,t,r,a,l,s){const u=ti("product-card");return O(),re("div",null,[e.showProducts?(O(),oe(rq,{key:0,onLoad:e.onLoad,offset:250},jh({default:b(()=>[S("div",Sq,[(O(!0),re(Nt,null,Wt(e.partialProducts,(d,f)=>(O(),re("div",{class:"col-xs-12 col-sm-6 col-md-4 col-lg-3",key:f},[y(u,{product:d,onChangePage:e.changePageM,onAddToCart:e.addToCart},null,8,["product","onChangePage","onAddToCart"])]))),128))])]),_:2},[e.lastProductIndex[S("div",kq,[y($u,{color:"primary",size:"40px"})])]),key:"0"}:void 0]),1032,["onLoad"])):$e("",!0)])}var Tq=Tn(wq,[["render",Cq]]),Mq=Je({name:"QSlideTransition",props:{appear:Boolean,duration:{type:Number,default:300}},emits:["show","hide"],setup(e,{slots:t,emit:r}){let a=!1,l,s,u=null,d=null,f,g;function v(){l&&l(),l=null,a=!1,u!==null&&(clearTimeout(u),u=null),d!==null&&(clearTimeout(d),d=null),s!==void 0&&s.removeEventListener("transitionend",f),f=null}function C(I,L,F){L!==void 0&&(I.style.height=`${L}px`),I.style.transition=`height ${e.duration}ms cubic-bezier(.25, .8, .50, 1)`,a=!0,l=F}function M(I,L){I.style.overflowY=null,I.style.height=null,I.style.transition=null,v(),L!==g&&r(L)}function _(I,L){let F=0;s=I,a===!0?(v(),F=I.offsetHeight===I.scrollHeight?0:void 0):(g="hide",I.style.overflowY="hidden"),C(I,F,L),u=setTimeout(()=>{u=null,I.style.height=`${I.scrollHeight}px`,f=Y=>{d=null,(Object(Y)!==Y||Y.target===I)&&M(I,"show")},I.addEventListener("transitionend",f),d=setTimeout(f,e.duration*1.1)},100)}function x(I,L){let F;s=I,a===!0?v():(g="show",I.style.overflowY="hidden",F=I.scrollHeight),C(I,F,L),u=setTimeout(()=>{u=null,I.style.height=0,f=Y=>{d=null,(Object(Y)!==Y||Y.target===I)&&M(I,"hide")},I.addEventListener("transitionend",f),d=setTimeout(f,e.duration*1.1)},100)}return Ht(()=>{a===!0&&v()}),()=>E(Ga,{css:!1,appear:e.appear,onEnter:_,onLeave:x},t.default)}});const vi=rw({}),Dq=Object.keys(Ao);var qq=Je({name:"QExpansionItem",props:{...Ao,...Ku,...or,icon:String,label:String,labelLines:[Number,String],caption:String,captionLines:[Number,String],dense:Boolean,toggleAriaLabel:String,expandIcon:String,expandedIcon:String,expandIconClass:[Array,String,Object],duration:Number,headerInsetLevel:Number,contentInsetLevel:Number,expandSeparator:Boolean,defaultOpened:Boolean,hideExpandIcon:Boolean,expandIconToggle:Boolean,switchToggleSide:Boolean,denseToggle:Boolean,group:String,popup:Boolean,headerStyle:[Array,String,Object],headerClass:[Array,String,Object]},emits:[...Qu,"click","afterShow","afterHide"],setup(e,{slots:t,emit:r}){const{proxy:{$q:a}}=Dt(),l=sr(e,a),s=se(e.modelValue!==null?e.modelValue:e.defaultOpened),u=se(null),d=fo(),{show:f,hide:g,toggle:v}=ju({showing:s});let C,M;const _=$(()=>`q-expansion-item q-item-type q-expansion-item--${s.value===!0?"expanded":"collapsed"} q-expansion-item--${e.popup===!0?"popup":"standard"}`),x=$(()=>{if(e.contentInsetLevel===void 0)return null;const G=a.lang.rtl===!0?"Right":"Left";return{["padding"+G]:e.contentInsetLevel*56+"px"}}),I=$(()=>e.disable!==!0&&(e.href!==void 0||e.to!==void 0&&e.to!==null&&e.to!=="")),L=$(()=>{const G={};return Dq.forEach(me=>{G[me]=e[me]}),G}),F=$(()=>I.value===!0||e.expandIconToggle!==!0),Y=$(()=>e.expandedIcon!==void 0&&s.value===!0?e.expandedIcon:e.expandIcon||a.iconSet.expansionItem[e.denseToggle===!0?"denseIcon":"icon"]),D=$(()=>e.disable!==!0&&(I.value===!0||e.expandIconToggle===!0)),A=$(()=>({expanded:s.value===!0,detailsId:e.targetUid,toggle:v,show:f,hide:g})),N=$(()=>{const G=e.toggleAriaLabel!==void 0?e.toggleAriaLabel:a.lang.label[s.value===!0?"collapse":"expand"](e.label);return{role:"button","aria-expanded":s.value===!0?"true":"false","aria-controls":d,"aria-label":G}});Ve(()=>e.group,G=>{M!==void 0&&M(),G!==void 0&&xe()});function J(G){I.value!==!0&&v(G),r("click",G)}function V(G){G.keyCode===13&&H(G,!0)}function H(G,me){me!==!0&&u.value!==null&&u.value.focus(),v(G),Rt(G)}function pe(){r("afterShow")}function _e(){r("afterHide")}function xe(){C===void 0&&(C=fo()),s.value===!0&&(vi[e.group]=C);const G=Ve(s,rt=>{rt===!0?vi[e.group]=C:vi[e.group]===C&&delete vi[e.group]}),me=Ve(()=>vi[e.group],(rt,X)=>{X===C&&rt!==void 0&&rt!==C&&g()});M=()=>{G(),me(),vi[e.group]===C&&delete vi[e.group],M=void 0}}function lt(){const G={class:[`q-focusable relative-position cursor-pointer${e.denseToggle===!0&&e.switchToggleSide===!0?" items-end":""}`,e.expandIconClass],side:e.switchToggleSide!==!0,avatar:e.switchToggleSide},me=[E(Yt,{class:"q-expansion-item__toggle-icon"+(e.expandedIcon===void 0&&s.value===!0?" q-expansion-item__toggle-icon--rotated":""),name:Y.value})];return D.value===!0&&(Object.assign(G,{tabindex:0,...N.value,onClick:H,onKeyup:V}),me.unshift(E("div",{ref:u,class:"q-expansion-item__toggle-focus q-icon q-focus-helper q-focus-helper--rounded",tabindex:-1}))),E(Ie,G,()=>me)}function te(){let G;return t.header!==void 0?G=[].concat(t.header(A.value)):(G=[E(Ie,()=>[E(Ke,{lines:e.labelLines},()=>e.label||""),e.caption?E(Ke,{lines:e.captionLines,caption:!0},()=>e.caption):null])],e.icon&&G[e.switchToggleSide===!0?"push":"unshift"](E(Ie,{side:e.switchToggleSide===!0,avatar:e.switchToggleSide!==!0},()=>E(Yt,{name:e.icon})))),e.disable!==!0&&e.hideExpandIcon!==!0&&G[e.switchToggleSide===!0?"unshift":"push"](lt()),G}function Pe(){const G={ref:"item",style:e.headerStyle,class:e.headerClass,dark:l.value,disable:e.disable,dense:e.dense,insetLevel:e.headerInsetLevel};return F.value===!0&&(G.clickable=!0,G.onClick=J,Object.assign(G,I.value===!0?L.value:N.value)),E(Vt,G,te)}function Be(){return Gn(E("div",{key:"e-content",class:"q-expansion-item__content relative-position",style:x.value,id:d},Mt(t.default)),[[iw,s.value]])}function j(){const G=[Pe(),E(Mq,{duration:e.duration,onShow:pe,onHide:_e},Be)];return e.expandSeparator===!0&&G.push(E(ut,{class:"q-expansion-item__border q-expansion-item__border--top absolute-top",dark:l.value}),E(ut,{class:"q-expansion-item__border q-expansion-item__border--bottom absolute-bottom",dark:l.value})),G}return e.group!==void 0&&xe(),Ht(()=>{M!==void 0&&M()}),()=>E("div",{class:_.value},[E("div",{class:"q-expansion-item__container relative-position"},j())])}});const Pq=sn({name:"CustomerOrders",props:["orders","products","stalls","profiles"],components:{UserProfile:Za},data:function(){return{}},computed:{merchantOrders:function(){return Object.keys(this.orders).map(e=>({pubkey:e,orders:this.orders[e].map(this.enrichOrder)}))}},methods:{enrichOrder:function(e){var r;const t=this.stallForOrder(e);return{...e,stallName:(t==null?void 0:t.name)||"Stall",shippingZone:((r=t==null?void 0:t.shipping)==null?void 0:r.find(a=>a.id===e.shipping_id))||{id:e.shipping_id,name:e.shipping_id},invoice:this.invoiceForOrder(e),products:this.getProductsForOrder(e)}},stallForOrder:function(e){var t;try{const r=e.items&&((t=e.items[0])==null?void 0:t.product_id);if(!r)return;const a=this.products.find(s=>s.id===r);if(!a)return;const l=this.stalls.find(s=>s.id===a.stall_id);return l||void 0}catch(r){console.log(r)}},invoiceForOrder:function(e){var t;try{const r=(t=e==null?void 0:e.payment_options)==null?void 0:t.find(a=>a.type==="ln");return r!=null&&r.link?decode(r.link):void 0}catch(r){console.warn(r)}},getProductsForOrder:function(e){var t;return(t=e==null?void 0:e.items)!=null&&t.length?e.items.map(r=>({...this.products.find(l=>l.id===r.product_id)||{id:r.product_id,name:r.product_id},orderedQuantity:r.quantity})):[]},showInvoice:function(e){var r;if(e.paid)return;const t=(r=e==null?void 0:e.payment_options)==null?void 0:r.find(a=>a.type==="ln").link;!t||this.$emit("show-invoice",t)},formatCurrency:function(e,t){return formatCurrency(e,t)},fromNow:function(e){return e?ae(e*1e3).fromNow():""}},created(){}}),xq=S("strong",null,"No Orders",-1),Aq=["textContent"],Eq=["textContent"],Iq={class:"text-caption text-grey ellipsis-2-lines"},Oq={key:0},Rq=["textContent"],Lq=["textContent"],Nq=["textContent"],Bq={class:"text-caption text-grey ellipsis-2-lines"},Fq=["textContent"],Uq=["textContent"],zq=S("strong",null,"Order ID: ",-1),Vq=["textContent"],Yq=S("strong",null,"Products",-1),Wq=["src"],Hq=["src"],Kq={class:"text-caption text-grey ellipsis-2-lines"},Gq=S("strong",null,"Shipping Zone: ",-1),Qq=["textContent"],jq=S("strong",null,"Message: ",-1),Zq=["textContent"],Jq=S("strong",null,"Invoice: ",-1),Xq=["textContent"];function eP(e,t,r,a,l,s){var d;const u=ti("user-profile");return O(),re("div",null,[(d=e.merchantOrders)!=null&&d.length?$e("",!0):(O(),oe(Jt,{key:0,bordered:"",class:"q-mb-md"},{default:b(()=>[y(Ne,null,{default:b(()=>[xq]),_:1})]),_:1})),(O(!0),re(Nt,null,Wt(e.merchantOrders,f=>(O(),re("div",{key:f.id},[y(Jt,{bordered:"",class:"q-mb-md"},{default:b(()=>[y(Vt,null,{default:b(()=>[y(u,{pubkey:f.pubkey,profiles:e.profiles},null,8,["pubkey","profiles"])]),_:2},1024),y(ut),y(Ne,{class:"col-12"},{default:b(()=>[y(Mr,null,{default:b(()=>[(O(!0),re(Nt,null,Wt(f.orders,g=>(O(),re("div",{key:g.id,class:"q-mb-md"},[y(qq,{dense:"","expand-separator":""},{header:b(()=>[y(Ie,{class:"q-mt-sm"},{default:b(()=>[y(Ke,null,{default:b(()=>{var v,C;return[S("strong",null,[S("span",{textContent:ge(g.stallName)},null,8,Aq)]),(C=(v=g.invoice)==null?void 0:v.human_readable_part)!=null&&C.amount?(O(),oe(Cn,{key:0,onClick:M=>e.showInvoice(g),color:"orange",class:"q-ml-lg gt-sm"},{default:b(()=>{var M,_;return[S("span",{textContent:ge(e.formatCurrency(((_=(M=g.invoice)==null?void 0:M.human_readable_part)==null?void 0:_.amount)/1e3,"sat"))},null,8,Eq)]}),_:2},1032,["onClick"])):$e("",!0)]}),_:2},1024),y(Ke,null,{default:b(()=>[S("div",Iq,[g.createdAt?(O(),re("p",Oq,[S("span",{textContent:ge(e.fromNow(g.createdAt))},null,8,Rq)])):$e("",!0)])]),_:2},1024)]),_:2},1024),y(Ie,{side:""},{default:b(()=>[y(Ke,null,{default:b(()=>[y(Cn,{color:g.paid?"green":"grey"},{default:b(()=>[S("span",{textContent:ge(g.paid?"Paid":"Not Paid")},null,8,Lq)]),_:2},1032,["color"]),y(Cn,{color:g.shipped?"green":"grey",class:"q-ml-md"},{default:b(()=>[S("span",{textContent:ge(g.shipped?"Shipped":"Not Shipped")},null,8,Nq)]),_:2},1032,["color"])]),_:2},1024),y(Ke,null,{default:b(()=>{var v,C;return[S("div",Bq,[S("p",null,[S("span",{textContent:ge((v=g.items)==null?void 0:v.length)},null,8,Fq),S("span",{textContent:ge(((C=g.items)==null?void 0:C.length)===1?"product":"products")},null,8,Uq)])])]}),_:2},1024)]),_:2},1024)]),default:b(()=>[y(ut),y(Ne,{class:"col-12"},{default:b(()=>[y(Ie,null,{default:b(()=>[y(Ke,null,{default:b(()=>[zq,S("span",{class:"ellipsis-2-lines text-wrap",textContent:ge(g.id)},null,8,Vq)]),_:2},1024)]),_:2},1024)]),_:2},1024),y(ut),y(Ne,{horizontal:""},{default:b(()=>[y(Ne,{class:"col-7"},{default:b(()=>[y(Ie,{class:"q-mt-sm"},{default:b(()=>[y(Ke,null,{default:b(()=>[Yq]),_:1})]),_:1}),(O(!0),re(Nt,null,Wt(g.products,v=>(O(),oe(Vt,{key:v.id},{default:b(()=>[y(Ie,{avatar:""},{default:b(()=>[y(Xr,null,{default:b(()=>[v.images&&v.images[0]||v.image?(O(),re("img",{key:0,src:v.images[0]||v.image},null,8,Wq)):(O(),re("img",{key:1,src:e.$q.config.staticPath+"/images/placeholder.png"},null,8,Hq))]),_:2},1024)]),_:2},1024),y(Ie,{class:"q-mt-sm"},{default:b(()=>[y(Ke),y(Ke,null,{default:b(()=>[S("strong",null,ge(v.orderedQuantity)+" x "+ge(v.name),1)]),_:2},1024),y(Ke,null,{default:b(()=>[S("div",Kq,[S("p",null,ge(v.description),1)])]),_:2},1024)]),_:2},1024)]),_:2},1024))),128))]),_:2},1024),y(ut,{vertical:""}),y(Ne,null,{default:b(()=>[y(Ie,{class:"q-mt-md q-ml-sm"},{default:b(()=>[y(Ke,null,{default:b(()=>{var v;return[Gq,S("span",{textContent:ge(((v=g.shippingZone)==null?void 0:v.name)||"")},null,8,Qq)]}),_:2},1024)]),_:2},1024),g.message?(O(),oe(Ie,{key:0,class:"q-mt-md q-ml-sm"},{default:b(()=>[y(Ke,null,{default:b(()=>[jq,S("span",{textContent:ge(g.message)},null,8,Zq)]),_:2},1024)]),_:2},1024)):$e("",!0),y(Ie,{class:"q-mt-md q-ml-sm"},{default:b(()=>[y(Ke,null,{default:b(()=>{var v,C;return[Jq,(C=(v=g.invoice)==null?void 0:v.human_readable_part)!=null&&C.amount?(O(),oe(Cn,{key:0,onClick:M=>e.showInvoice(g),color:"orange",class:"cursor-pointer"},{default:b(()=>{var M,_;return[S("span",{textContent:ge(e.formatCurrency(((_=(M=g.invoice)==null?void 0:M.human_readable_part)==null?void 0:_.amount)/1e3,"sat"))},null,8,Xq)]}),_:2},1032,["onClick"])):$e("",!0)]}),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1024),y(ut,{class:"q-mb-xl"})]),_:2},1024),y(ut)]))),128))]),_:2},1024)]),_:2},1024)]),_:2},1024)]))),128))])}var tP=Tn(Pq,[["render",eP]]),nP=Je({name:"QCarouselSlide",props:{...kg,imgSrc:String},setup(e,{slots:t}){const r=$(()=>e.imgSrc?{backgroundImage:`url("${e.imgSrc}")`}:{});return()=>E("div",{class:"q-carousel__slide",style:r.value},Mt(t.default))}});let Ia=0;const rP={fullscreen:Boolean,noRouteFullscreenExit:Boolean},iP=["update:fullscreen","fullscreen"];function aP(){const e=Dt(),{props:t,emit:r,proxy:a}=e;let l,s,u;const d=se(!1);aw(e)===!0&&Ve(()=>a.$route.fullPath,()=>{t.noRouteFullscreenExit!==!0&&v()}),Ve(()=>t.fullscreen,C=>{d.value!==C&&f()}),Ve(d,C=>{r("update:fullscreen",C),r("fullscreen",C)});function f(){d.value===!0?v():g()}function g(){d.value!==!0&&(d.value=!0,u=a.$el.parentNode,u.replaceChild(s,a.$el),document.body.appendChild(a.$el),Ia++,Ia===1&&document.body.classList.add("q-body--fullscreen-mixin"),l={handler:v},sh.add(l))}function v(){d.value===!0&&(l!==void 0&&(sh.remove(l),l=void 0),u.replaceChild(a.$el,s),d.value=!1,Ia=Math.max(0,Ia-1),Ia===0&&(document.body.classList.remove("q-body--fullscreen-mixin"),a.$el.scrollIntoView!==void 0&&setTimeout(()=>{a.$el.scrollIntoView()})))}return tc(()=>{s=document.createElement("span")}),ni(()=>{t.fullscreen===!0&&g()}),Ht(v),Object.assign(a,{toggleFullscreen:f,setFullscreen:g,exitFullscreen:v}),{inFullscreen:d,toggleFullscreen:f}}const lP=["top","right","bottom","left"],oP=["regular","flat","outline","push","unelevated"];var sP=Je({name:"QCarousel",props:{...or,...Cg,...rP,transitionPrev:{type:String,default:"fade"},transitionNext:{type:String,default:"fade"},height:String,padding:Boolean,controlColor:String,controlTextColor:String,controlType:{type:String,validator:e=>oP.includes(e),default:"flat"},autoplay:[Number,Boolean],arrows:Boolean,prevIcon:String,nextIcon:String,navigation:Boolean,navigationPosition:{type:String,validator:e=>lP.includes(e)},navigationIcon:String,navigationActiveIcon:String,thumbnails:Boolean},emits:[...iP,...Tg],setup(e,{slots:t}){const{proxy:{$q:r}}=Dt(),a=sr(e,r);let l=null,s;const{updatePanelsList:u,getPanelContent:d,panelDirectives:f,goToPanel:g,previousPanel:v,nextPanel:C,getEnabledPanels:M,panelIndex:_}=Mg(),{inFullscreen:x}=aP(),I=$(()=>x.value!==!0&&e.height!==void 0?{height:e.height}:{}),L=$(()=>e.vertical===!0?"vertical":"horizontal"),F=$(()=>`q-carousel q-panel-parent q-carousel--with${e.padding===!0?"":"out"}-padding`+(x.value===!0?" fullscreen":"")+(a.value===!0?" q-carousel--dark q-dark":"")+(e.arrows===!0?` q-carousel--arrows-${L.value}`:"")+(e.navigation===!0?` q-carousel--navigation-${N.value}`:"")),Y=$(()=>{const _e=[e.prevIcon||r.iconSet.carousel[e.vertical===!0?"up":"left"],e.nextIcon||r.iconSet.carousel[e.vertical===!0?"down":"right"]];return e.vertical===!1&&r.lang.rtl===!0?_e.reverse():_e}),D=$(()=>e.navigationIcon||r.iconSet.carousel.navigationIcon),A=$(()=>e.navigationActiveIcon||D.value),N=$(()=>e.navigationPosition||(e.vertical===!0?"right":"bottom")),J=$(()=>({color:e.controlColor,textColor:e.controlTextColor,round:!0,[e.controlType]:!0,dense:!0}));Ve(()=>e.modelValue,()=>{e.autoplay&&V()}),Ve(()=>e.autoplay,_e=>{_e?V():l!==null&&(clearTimeout(l),l=null)});function V(){const _e=lw(e.autoplay)===!0?Math.abs(e.autoplay):5e3;l!==null&&clearTimeout(l),l=setTimeout(()=>{l=null,_e>=0?C():v()},_e)}ni(()=>{e.autoplay&&V()}),Ht(()=>{l!==null&&clearTimeout(l)});function H(_e,xe){return E("div",{class:`q-carousel__control q-carousel__navigation no-wrap absolute flex q-carousel__navigation--${_e} q-carousel__navigation--${N.value}`+(e.controlColor!==void 0?` text-${e.controlColor}`:"")},[E("div",{class:"q-carousel__navigation-inner flex flex-center no-wrap"},M().map(xe))])}function pe(){const _e=[];if(e.navigation===!0){const xe=t["navigation-icon"]!==void 0?t["navigation-icon"]:te=>E(ye,{key:"nav"+te.name,class:`q-carousel__navigation-icon q-carousel__navigation-icon--${te.active===!0?"":"in"}active`,...te.btnProps,onClick:te.onClick}),lt=s-1;_e.push(H("buttons",(te,Pe)=>{const Be=te.props.name,j=_.value===Pe;return xe({index:Pe,maxIndex:lt,name:Be,active:j,btnProps:{icon:j===!0?A.value:D.value,size:"sm",...J.value},onClick:()=>{g(Be)}})}))}else if(e.thumbnails===!0){const xe=e.controlColor!==void 0?` text-${e.controlColor}`:"";_e.push(H("thumbnails",lt=>{const te=lt.props;return E("img",{key:"tmb#"+te.name,class:`q-carousel__thumbnail q-carousel__thumbnail--${te.name===e.modelValue?"":"in"}active`+xe,src:te.imgSrc||te["img-src"],onClick:()=>{g(te.name)}})}))}return e.arrows===!0&&_.value>=0&&((e.infinite===!0||_.value>0)&&_e.push(E("div",{key:"prev",class:`q-carousel__control q-carousel__arrow q-carousel__prev-arrow q-carousel__prev-arrow--${L.value} absolute flex flex-center`},[E(ye,{icon:Y.value[0],...J.value,onClick:v})])),(e.infinite===!0||_.value(s=u(t),E("div",{class:F.value,style:I.value},[Zu("div",{class:"q-carousel__slides-container"},d(),"sl-cont",e.swipeable,()=>f.value)].concat(pe())))}});const uP=sn({name:"ProductDetail",props:["product","add-to-cart"],data:function(){return{slide:1}},computed:{},methods:{},created(){}}),cP={class:"row"},dP={class:"col-lg-5 col-md-5 col-sm-12 col-xs-12 q-mt-sm"},fP={key:0,class:"q-pr-md"},hP={key:1,class:"q-pr-md"},gP={class:"col-lg-7 col-md-7 col-sm-12 col-xs-12 q-mt-sm"},mP={class:"row"},vP={class:"text-subtitle1 q-mt-sm q-pt-xs"},pP={key:0,class:"text-subtitle1"},yP={class:"q-mt-sm text-weight-bold"},_P={key:0},bP={class:"text-h6"},wP={class:"q-ml-sm text-grey-6"},SP={key:1},kP={class:"text-h6"},CP={class:"q-ml-md text-caption text-green-8 text-weight-bolder q-mt-md"},TP={class:"q-mt-md"};function MP(e,t,r,a,l,s){return O(),re("div",cP,[S("div",dP,[e.product.images&&e.product.images[0]?(O(),re("div",fP,[y(sP,{swipeable:"",animated:"",modelValue:e.slide,"onUpdate:modelValue":t[0]||(t[0]=u=>e.slide=u),thumbnails:"",infinite:"",arrows:"","transition-prev":"slide-right","transition-next":"slide-left","navigation-icon":"radio_button_unchecked","control-type":"regular","control-color":"secondary","control-text-color":"white"},{default:b(()=>[(O(!0),re(Nt,null,Wt(e.product.images,(u,d)=>(O(),oe(nP,{name:d+1,key:d,"img-src":u},null,8,["name","img-src"]))),128))]),_:1},8,["modelValue"])])):(O(),re("div",hP,[y(oc,{src:e.$q.config.staticPath+"/images/placeholder.png",ratio:16/9},null,8,["src"])]))]),S("div",gP,[y(Jt,null,{default:b(()=>[y(Ne,null,{default:b(()=>[S("div",mP,[S("div",{class:ow(["col-12",e.$q.platform.is.desktop?"":"q-px-md"])},[S("div",vP,ge(e.product.name),1),e.product.categories?(O(),re("div",pP,[(O(!0),re(Nt,null,Wt(e.product.categories,(u,d)=>(O(),oe(Qa,{key:d,dense:""},{default:b(()=>[Te(ge(u),1)]),_:2},1024))),128))])):$e("",!0),S("div",yP,ge(e.product.description),1),S("div",null,[e.product.currency=="sat"?(O(),re("span",_P,[S("span",bP,ge(e.product.price)+" sats",1),S("span",wP,"BTC "+ge((e.product.price/1e8).toFixed(8)),1)])):(O(),re("span",SP,[S("span",kP,ge(e.product.formatedPrice),1)])),S("span",CP,ge(e.product.quantity>0?`In + stock. ${e.product.quantity} left.`:"Out of stock."),1)]),S("div",TP,[y(ye,{class:"q-mt-md",color:"primary",rounded:"",icon:"shopping_cart",label:"Add to cart",onClick:t[1]||(t[1]=u=>e.$emit("add-to-cart",e.product))})])],2)])]),_:1})]),_:1})])])}var DP=Tn(uP,[["render",MP]]);const qP=sn({name:"CustomerStall",components:{ProductCard:Tm,ProductDetail:DP},props:["stall","products","product-detail"],data:function(){return{}},computed:{product(){if(this.productDetail)return this.products.find(e=>e.id==this.productDetail)}},methods:{changePageS(e,t){var r;e==="stall"&&(t==null?void 0:t.product)&&((r=document.getElementById("product-focus-area"))==null||r.scrollIntoView()),this.$emit("change-page",e,t)},addToCart(e){this.$emit("add-to-cart",e)}}}),PP=S("div",{id:"product-focus-area"},null,-1),xP={key:0,class:"row"},AP={class:"col-12 auto-width"},EP={class:"col-12 q-my-lg"},IP={class:"row q-col-gutter-md"};function $P(e,t,r,a,l,s){const u=ti("product-detail"),d=ti("product-card");return O(),re("div",null,[PP,e.productDetail&&e.product?(O(),re("div",xP,[S("div",AP,[y(u,{product:e.product,onAddToCart:e.addToCart},null,8,["product","onAddToCart"])]),S("div",EP,[y(ut)])])):$e("",!0),S("div",IP,[(O(!0),re(Nt,null,Wt(e.products,(f,g)=>(O(),re("div",{class:"col-xs-12 col-sm-6 col-md-4 col-lg-3",key:g},[y(d,{product:f,onChangePage:e.changePageS,onAddToCart:e.addToCart,"is-stall":!0},null,8,["product","onChangePage","onAddToCart"])]))),128))])])}var OP=Tn(qP,[["render",$P]]);const RP=sn({name:"CustomerStallList",props:["stalls"],data:function(){return{showStalls:!0}},watch:{stalls(){this.showProducts=!1,setTimeout(()=>{this.showProducts=!0},0)}},computed:{},methods:{},created(){}}),LP={key:0,class:"row q-col-gutter-md"},NP={class:"q-pa-md q-gutter-sm",style:{height:"80px"}},BP=["src"],FP={class:"row no-wrap items-center"},UP={class:"col text-subtitle2 ellipsis-2-lines"},zP={class:"text-caption text-green-8 text-weight-bolder q-mt-md"},VP=["textContent"],YP=["textContent"],WP={key:0,class:"text-subtitle1"},HP=["textContent"],KP={key:1,class:"text-subtitle1"},GP={class:"text-caption text-grey ellipsis-2-lines",style:{"min-height":"40px"}},QP={class:"q-ml-auto"};function jP(e,t,r,a,l,s){return e.showStalls?(O(),re("div",LP,[(O(!0),re(Nt,null,Wt(e.stalls,u=>(O(),re("div",{key:u.id,class:"col-xs-12 col-sm-6 col-md-4 col-lg-3"},[y(Jt,{class:"card--product"},{default:b(()=>[y(Ne,{class:"q-pb-xs q-pt-md"},{default:b(()=>[S("div",NP,[(O(!0),re(Nt,null,Wt(u.images,(d,f)=>(O(),oe(Xr,{key:f,size:"40px",class:"overlapping",style:sw(`left: ${f*25}px; border: 2px solid white; position: absolute`)},{default:b(()=>[S("img",{src:d},null,8,BP)]),_:2},1032,["style"]))),128))])]),_:2},1024),y(Ne,{class:"q-pb-xs q-pt-md"},{default:b(()=>[S("div",FP,[S("div",UP,ge(u.name),1)])]),_:2},1024),y(ut),y(Ne,{class:"q-pl-sm"},{default:b(()=>[S("div",null,[S("span",zP,[S("span",{textContent:ge(u.productCount)},null,8,VP),Te(" products")]),S("span",{textContent:ge(u.currency),class:"float-right"},null,8,YP)])]),_:2},1024),y(Ne,{class:"q-pl-sm gt-sm"},{default:b(()=>[u.categories?(O(),re("div",WP,[y(lc,{items:u.categories||[],"virtual-scroll-horizontal":""},{default:b(({item:d,index:f})=>[(O(),oe(Qa,{key:f,dense:""},{default:b(()=>[S("span",{textContent:ge(d)},null,8,HP)]),_:2},1024))]),_:2},1032,["items"])])):(O(),re("div",KP," \xA0 ")),S("div",GP,[S("p",null,ge(u.description||""),1)])]),_:2},1024),y(ut),y(wi,null,{default:b(()=>[S("div",QP,[y(ye,{flat:"",class:"text-weight-bold text-capitalize q-ml-auto float-left",dense:"",color:"primary",onClick:d=>e.$emit("change-page","stall",{stall:u.id})},{default:b(()=>[Te(" Visit Stall ")]),_:2},1032,["onClick"])])]),_:2},1024)]),_:2},1024)]))),128))])):$e("",!0)}var ZP=Tn(RP,[["render",jP]]);const JP=sn({name:"ProductFilter",props:["filter","currencies","categories","merchants","profiles","stalls"],data:function(){return{merchantProfiles:[],filterData:{currency:null,priceFrom:0,priceTo:null,categories:[],merchants:[],stalls:[]}}},watch:{categories(e,t){this.filterData.categories=(e||[]).filter(r=>r.selected).map(r=>r.category)}},methods:{clear:function(){this.filterData={currency:null,priceFrom:0,priceTo:null,categories:[],merchants:[],stalls:[]},this.$emit("filter-update",this.filterData)},clearPrice(){this.filterData.currency=null,this.filterData.priceFrom=0,this.filterData.priceTo=null},clearMerchants(){this.filterData.merchants=[]},clearCategories(){this.filterData.categories=[]},clearStalls(){this.filterData.stalls=[]},search:function(){const e={...this.filterData,merchants:this.filterData.merchants.map(t=>t.value),stalls:this.filterData.stalls.map(t=>t.value)};this.$emit("filter-update",e)},mapMerchantProfile(e){const t=this.profiles.find(r=>r.pubkey===e);return t?{label:t.name+` (${e.substring(0,10)}...${e.substring(e.length-10)})`,value:e}:{label:e,value:e}}},created:async function(){console.log("### this.filter",this.filter),this.filterData={...this.filterData,...JSON.parse(JSON.stringify(this.filter||{}))},this.filterData.categories=[...new Set((this.filterData.categories||[]).concat((this.categories||[]).filter(e=>e.selected).map(e=>e.category)))],this.filterData.merchants=(this.filterData.merchants||[]).map(this.mapMerchantProfile),this.filterData.stalls=(this.filterData.stalls||[]).map(e=>{const t=this.stalls.find(r=>r.id===e)||{label:e,value:e};return{label:t.name,value:t.id}}),this.merchantProfiles=this.merchants.map(this.mapMerchantProfile)}}),XP={class:"row q-mt-md q-ml-md q-pr-md"},ex={class:"col-md-3 col-sm-12 col-xs-12 q-pt-sm"},tx={class:"col-md-3 col-sm-12 col-xs-12 q-pt-sm q-pl-md"},nx={class:"col-md-3 col-sm-12 col-xs-12 q-pt-sm q-pl-lg"},rx={class:"col-md-3 col-sm-12 col-xs-12"},ix={class:"row q-mt-md q-ml-md q-pr-md"},ax={class:"col-9"},lx={class:"col-3"},ox={class:"row q-mt-md q-ml-md q-pr-md"},sx={class:"col-9"},ux={class:"col-3"},cx={class:"row q-mt-md q-ml-md q-pr-md"},dx={class:"col-9"},fx={class:"col-3"};function hx(e,t,r,a,l,s){return O(),oe(Jt,null,{default:b(()=>[y(Ne,null,{default:b(()=>[S("div",XP,[S("div",ex,[y($a,{options:[...e.currencies].sort(),modelValue:e.filterData.currency,"onUpdate:modelValue":t[0]||(t[0]=u=>e.filterData.currency=u),filled:"",hint:"Only this Currency",label:"Currency"},null,8,["options","modelValue"])]),S("div",tx,[y(It,{modelValue:e.filterData.priceFrom,"onUpdate:modelValue":t[1]||(t[1]=u=>e.filterData.priceFrom=u),type:"number",label:"Price From",hint:"Price Starting At"},null,8,["modelValue"])]),S("div",nx,[y(It,{modelValue:e.filterData.priceTo,"onUpdate:modelValue":t[2]||(t[2]=u=>e.filterData.priceTo=u),type:"number",label:"Price To",hint:"Maximum Price"},null,8,["modelValue"])]),S("div",rx,[y(ye,{onClick:t[3]||(t[3]=u=>e.clearPrice()),flat:"",color:"grey",class:"float-right q-mt-sm"},{default:b(()=>[Te(" Clear")]),_:1})])])]),_:1}),y(Ne,null,{default:b(()=>[S("div",ix,[S("div",ax,[y($a,{options:[...e.categories.map(u=>u.category).sort()],modelValue:e.filterData.categories,"onUpdate:modelValue":t[4]||(t[4]=u=>e.filterData.categories=u),filled:"",multiple:"","use-chips":"","stack-label":"",hint:"Any of these Categories",label:"Categories"},null,8,["options","modelValue"])]),S("div",lx,[y(ye,{onClick:t[5]||(t[5]=u=>e.clearCategories()),flat:"",color:"grey",class:"float-right q-mt-sm"},{default:b(()=>[Te(" Clear")]),_:1})])]),S("div",ox,[S("div",sx,[y($a,{options:e.merchantProfiles,modelValue:e.filterData.merchants,"onUpdate:modelValue":t[6]||(t[6]=u=>e.filterData.merchants=u),filled:"",multiple:"","use-chips":"","stack-label":"",hint:"Only these Merchant",label:"Merchants"},null,8,["options","modelValue"])]),S("div",ux,[y(ye,{onClick:t[7]||(t[7]=u=>e.clearMerchants()),flat:"",color:"grey",class:"float-right q-mt-sm"},{default:b(()=>[Te(" Clear")]),_:1})])]),S("div",cx,[S("div",dx,[y($a,{options:e.stalls.map(u=>({label:u.name,value:u.id})),modelValue:e.filterData.stalls,"onUpdate:modelValue":t[8]||(t[8]=u=>e.filterData.stalls=u),filled:"",multiple:"","use-chips":"","stack-label":"",hint:"Only these Stalls",label:"Stalls"},null,8,["options","modelValue"])]),S("div",fx,[y(ye,{onClick:t[9]||(t[9]=u=>e.clearStalls()),flat:"",color:"grey",class:"float-right q-mt-sm"},{default:b(()=>[Te(" Clear")]),_:1})])])]),_:1}),y(ut),y(wi,{align:"right"},{default:b(()=>[y(ye,{onClick:t[10]||(t[10]=u=>e.clear()),flat:"",color:"grey"},{default:b(()=>[Te(" Clear All Filters")]),_:1}),y(ye,{onClick:t[11]||(t[11]=u=>e.search()),flat:"",icon:"search",color:"primary",class:"q-mr-md"},{default:b(()=>[Te(" Search ")]),_:1})]),_:1})]),_:1})}var gx=Tn(JP,[["render",hx]]);const mx={class:"row q-mb-md"},vx={class:"col-lg-1 col-md-1 gt-sm"},px=["src"],yx={class:"col-lg-7 col-md-5 col-12 auto-width"},_x=S("div",{id:"search-text"},null,-1),bx={class:"col-lg-4 col-md-6 col-12"},wx={class:"float-right"},Sx=["textContent"],kx=["textContent"],Cx={key:0,class:"gt-sm"},Tx=["textContent","onClick"],Mx=["textContent"],Dx=S("div",{class:"text-h6"}," There are no relays configured at this moment. ",-1),qx=S("div",{class:"text-subtitle2"}," Start by creating or importing a market. ",-1),Px={key:2,class:"row q-mb-sm"},xx={class:"col-12 text-center"},Ax={key:0,class:"absolute-bottom text-subtitle1 text-center"},Ex=["textContent"],Ix={class:"row q-mb-sm"},$x={class:"col-md-10 col-sm-7 auto-width"},Ox=["textContent"],Rx=S("strong",null,"All markets",-1),Lx=["textContent"],Nx=["textContent"],Bx={class:"col-md-2 col-sm-5"},Fx={key:3,class:"row q-mb-sm"},Ux={class:"col-12 text-center"},zx={key:12},Vx=S("strong",{class:"text-h4"},"Welcome to the Nostr Market!",-1),Yx=S("strong",{class:"text-h5 q-mt-lg"},"In order to start you can:",-1),Wx={class:"text-h6"},Hx={class:"text-h6"},Kx={class:"text-h6"},Gx=S("code",null,"naddr",-1),Qx={key:13},jx=S("div",{class:"text-h6"},"Account Setup",-1),Zx=S("p",null,"Enter your Nostr private key or generate a new one.",-1),Jx={class:"text-center q-mb-lg"},Xx={key:0,class:"q-my-lg"},eA=["textContent"],tA=["href"],nA={key:0,ratio:1},rA={key:1},iA={class:"row q-mt-lg"},aA=sn({name:"MarketPage",components:{MarketConfig:Ig},data:function(){return{account:null,accountMetadata:null,accountDialog:{show:!1,data:{watchOnly:!1,key:null}},relaysData:{},markets:[],shoppingCarts:[],checkoutCart:null,checkoutStall:null,activePage:"market",activeOrderId:null,dmSubscriptions:{},allMarketsSelected:!1,qrCodeDialog:{data:{payment_request:null,message:null},dismissMsg:null,show:!1},groupByStall:!1,relays:new Set,stalls:[],products:[],orders:{},profiles:[],bannerImage:null,logoImage:null,isLoading:!1,showFilterDetails:!1,searchText:null,filterData:{categories:[],merchants:[],stalls:[],currency:null,priceFrom:null,priceTo:null},dmEvents:null,activeMarket:null,activeStall:null,activeProduct:null,pool:null,config:{opts:null},defaultBanner:this.$q.config.staticPath+"images/nostr-cover.png",defaultLogo:this.$q.config.staticPath+"images/nostr-avatar.png",defaultMarketNaddr:"naddr1qqjr2e34v3jrzd3e95ensdfn956rywps94snwcmr95crvepexc6kxcfcxqmnvqg5waehxw309aex2mrp0yhxgctdw4eju6t0qyv8wumn8ghj7un9d3shjtnndehhyapwwdhkx6tpdsq36amnwvaz7tmwdaehgu3dwp6kytnhv4kxcmmjv3jhytnwv46qzxthwden5te0dehhxarj9eax2cn9v3jk2tnrd3hh2eqprfmhxue69uhhyetvv9ujummjv9hxwetsd9kxctnyv4mqzrthwden5te0dehhxtnvdakqz9rhwden5te0wfjkccte9ehx7um5wghxyecpzpmhxue69uhkummnw3ezuamfdejsz9thwden5te0v4jx2m3wdehhxarj9ekxzmnyqgstle9w09rt8y7xdlqs33v23vqvdtqx6j6j2wa4984g9n77tppx2tqrqsqqqa2ruusd5z",readNotes:{merchants:!1,marketUi:!1}}},watch:{config(e,t){var r,a,l,s;(a=(r=e==null?void 0:e.opts)==null?void 0:r.ui)!=null&&a.banner?(this.bannerImage=null,setTimeout(()=>{var u,d;this.bannerImage=this.sanitizeImageSrc((d=(u=e==null?void 0:e.opts)==null?void 0:u.ui)==null?void 0:d.banner,this.defaultBanner)})):this.bannerImage=this.defaultBanner,(s=(l=e==null?void 0:e.opts)==null?void 0:l.ui)!=null&&s.picture?(this.logoImage=null,setTimeout(()=>{var u,d;this.logoImage=this.sanitizeImageSrc((d=(u=e==null?void 0:e.opts)==null?void 0:u.ui)==null?void 0:d.picture,this.defaultLogo)})):this.logoImage=this.defaultLogo},searchText(e,t){if(!!e&&e.toLowerCase().startsWith("naddr"))try{const{type:r,data:a}=NostrTools.nip19.decode(e);if(r!=="naddr"||a.kind!==30019)return;this.$q.dialog(confirm("Do you want to import this market profile?")).onOk(async()=>{this.searchText="",await this.addMarket(e)})}catch{}}},computed:{selectedMarketsMerchants(){return[...new Set(this.markets.filter(e=>e.selected).map(e=>e.opts.merchants).flat())]},filteredProducts(){const e=g=>{var v;return!((v=this.filterData.merchants)!=null&&v.length)||this.filterData.merchants.includes(g)},t=g=>this.selectedMarketsMerchants.includes(g),r=g=>{var v;return!((v=this.filterData.stalls)!=null&&v.length)||this.filterData.stalls.includes(g)},a=g=>!this.filterData.currency||this.filterData.currency.toLowerCase()===g.toLowerCase(),l=g=>!this.filterData.priceFrom||g>=this.filterData.priceFrom,s=g=>!this.filterData.priceTo||g<=this.filterData.priceTo,u=g=>!this.activeStall||g==this.activeStall;let d=this.products.filter(g=>this.hasCategory(g.categories)&&u(g.stall_id)&&e(g.pubkey)&&t(g.pubkey)&&r(g.stall_id)&&a(g.currency)&&l(g.price)&&s(g.price));if(!this.searchText||this.searchText.length<2)return d;const f=this.searchText.toLowerCase();return d.filter(g=>g.name.toLowerCase().includes(f)||g.description&&g.description.toLowerCase().includes(f)||g.categories&&g.categories.toString().toLowerCase().includes(f))},filterCount(){let e=0;return this.filterData.currency&&e++,this.filterData.priceFrom&&e++,this.filterData.priceTo&&e++,this.filterData.categories&&(e+=this.filterData.categories.length),this.filterData.merchants&&(e+=this.filterData.merchants.length),this.filterData.stalls&&(e+=this.filterData.stalls.length),e},filterStalls(){const e=this.stalls.map(r=>({...r,categories:this.allStallCatgories(r.id),images:this.allStallImages(r.id).slice(0,8),productCount:this.products.filter(a=>a.stall_id===r.id).length})).filter(r=>this.hasCategory(r.categories));if(!this.searchText||this.searchText.length<2)return e;const t=this.searchText.toLowerCase();return this.stalls.filter(r=>r.name.toLowerCase().includes(t)||r.description&&r.description.toLowerCase().includes(t)||r.categories&&r.categories.toString().toLowerCase().includes(t))},marketsName(){var t,r;if(this.activeMarket)return((t=this.activeMarket.opts)==null?void 0:t.name)||"Market";const e=this.markets.filter(a=>a.selected);return e.length===0?"No Market":e.length===1?((r=e[0].opts)==null?void 0:r.name)||"Market":e.length+" Markets"},stallName(){var e;return((e=this.stalls.find(t=>t.id==this.activeStall))==null?void 0:e.name)||"Stall"},productName(){var e;return((e=this.products.find(t=>t.id==this.activeProduct))==null?void 0:e.name)||"Product"},isValidAccountKey(){return isValidKey(this.accountDialog.data.key)},allCartsItemCount(){return this.shoppingCarts.map(e=>e.products).flat().reduce((e,t)=>e+t.orderedQuantity,0)},allCategories(){const t=this.products.map(r=>r.categories).flat().filter(r=>!!r).map(r=>r.toLowerCase()).reduce((r,a)=>(r[a]=(r[a]||0)+1,r),{});return Object.keys(t).map(r=>({category:r,count:t[r],selected:this.filterData.categories.indexOf(r)!==-1})).sort((r,a)=>a.count-r.count)},allCurrencies(){const e=this.products.map(t=>t.currency.toUpperCase());return[...new Set(e)]},allMerchants(){return[...new Set(this.markets.map(e=>e.opts.merchants).flat())]},allRelays(){return[...new Set(this.markets.map(e=>e.relays).flat())]},processedEventIds(){const e=this.stalls.map(r=>r.eventId),t=this.products.map(r=>r.eventId);return e.concat(t)},activeMarketRelaysData(){return this.activeMarket?Object.values(this.relaysData).filter(e=>e&&this.activeMarket.relays.includes(e.relayUrl)):[]},dmPeers(){this.dmEvents;const e="nostrmarket.dm.";return this.$q.localStorage.getAllKeys().filter(r=>r.startsWith(e)).map(r=>r.substring(e.length))}},async created(){this.bannerImage=this.defaultBanner,this.logoImage=this.defaultLogo,this._restoreFromStorage();const e=new URLSearchParams(window.location.search);await this.addMarket(e.get("naddr")),await this._handleQueryParams(e),this.isLoading=!1,this._loadRelaysData(),this._startRelaysHealtCheck()},methods:{async _handleQueryParams(e){const t=e.get("merchant");console.log("### merchantPubkey",t);const r=e.get("stall"),a=e.get("product");r&&(this.setActivePage("customer-stall"),a&&(this.activeProduct=a),this.activeStall=r),t&&(isValidKey(t)?this.allMerchants.includes(t)?this.$q.notify({message:"Request (URL) merchant already exists!",type:"positive"}):this.$q.dialog(confirm("We found a merchant pubkey in your request. Do you want to add it to the merchants list?")).onOk(async()=>{this.createMarket(!1,[t])}):this.$q.notify({message:"Invalid merchant public key!",icon:"warning"}))},_applyUiConfigs(e={}){const{name:t,about:r,ui:a}=e;this.$q.localStorage.set("nostrmarket.marketplaceConfig",{name:t,about:r,ui:a}),a!=null&&a.theme&&document.body.setAttribute("data-theme",a.theme),this.$q.dark.set(!!(a!=null&&a.darkMode))},handleFilterData(e){console.log("### handleFilterData",e),this.filterData=e,this.setActivePage("market")},async updateUiConfig(e={opts:{}}){var l;const{name:t,about:r,ui:a}=e.opts;this.config={...this.config,opts:{...this.config.opts,name:t,about:r,ui:a}},this._applyUiConfigs((l=this.config)==null?void 0:l.opts)},generateKeyPair(){this.accountDialog.data.key=NostrTools.generatePrivateKey(),this.accountDialog.data.watchOnly=!1},openAccountDialog(){this.accountDialog.show=!0},async createAccount(){if(isValidKey(this.accountDialog.data.key,"nsec")){let{key:e,watchOnly:t}=this.accountDialog.data;if(e.startsWith("n")){let{type:l,data:s}=NostrTools.nip19.decode(e);e=s}const r=t?null:e,a=t?e:NostrTools.getPublicKey(e);this.$q.localStorage.set("nostrmarket.account",{privkey:r,pubkey:a,nsec:NostrTools.nip19.nsecEncode(e),npub:NostrTools.nip19.npubEncode(a),useExtension:!1}),this.accountDialog.data={watchOnly:!1,key:null},this.accountDialog.show=!1,this.account=this.$q.localStorage.getItem("nostrmarket.account"),await this._requeryAllRelays()}this.accountDialog.show=!1},logout(){window.localStorage.removeItem("nostrmarket.account"),this._clearNonAccountData(),window.location.href=window.location.origin+window.location.pathname,this.account=null,this.accountMetadata=null},clearAllData(){this.$q.dialog(confirm("This will remove all information about merchants, products, relays and others. You will NOT be logged out. Do you want to proceed?")).onOk(async()=>{this._clearNonAccountData(),window.location.href=window.location.origin+window.location.pathname})},_clearNonAccountData(){this.$q.localStorage.getAllKeys().filter(e=>e!=="nostrmarket.account").forEach(e=>window.localStorage.removeItem(e)),this.orders=[],this.config={opts:null},this.shoppingCarts=[],this.checkoutCart=null},_startRelaysHealtCheck(){setInterval(()=>{Object.keys(this.relaysData).forEach(e=>{this.relaysData[e].relay.status===WebSocket.CLOSED&&this._connectToRelay(e)})},30*1e3)},async _toRelayKey(e){return"relay_"+await hash(e)},async _loadRelaysData(){for(const e of this.markets)for(const t of e.relays)await this._loadRelayData(t,e.opts.merchants);Object.keys(this.relaysData).forEach(this._connectToRelay)},async _loadRelayData(e,t){const r=await this._toRelayKey(e);this.relaysData[r]=this.relaysData[r]||{relayUrl:e,connected:!1,error:null,merchants:[],lastEventAt:this.getLastEventDateForRelay(e)};const a=this.relaysData[r];a.merchants=[...new Set(a.merchants.concat(t))]},getLastEventDateForRelay(e){const t=(this.$q.localStorage.getItem("nostrmarket.relays")||[]).find(r=>r.relayUrl===e);return console.log("### getLastEventForRelay",e,t),(t==null?void 0:t.lastEventAt)||0},async _connectToRelay(e){const t=this.relaysData[e];try{console.log(`Trying to connect to relay ${t.relayUrl}`),t.relay=NostrTools.relayInit(t.relayUrl),t.relay.on("connect",()=>{t.connected=!0,t.error=null,console.log(`Connected to relay ${t.relayUrl}`),this._queryRelay(e)}),t.relay.on("error",r=>{console.warn(`Error by relay ${t.relayUrl}`),t.connected=!1,t.error=r}),await t.relay.connect()}catch(r){t.connected=!1,t.error=`${r}`,console.warn(`Failed to connect to ${t.relayUrl}`)}},async _requeryAllRelays(){Object.keys(this.relaysData).forEach(async e=>{await this._requeryRelay(e)})},async _requeryRelay(e){var r;const t=this.relaysData[e];t.connected&&((r=t.sub)==null||r.unsub(),this._queryRelay(e))},_buildRelayFilters(e){var a;const t=e.merchants,r=[{kinds:[0,5,30017,30018],authors:t,since:e.lastEventAt+1}];if((a=this.account)!=null&&a.pubkey){const l=this._noDmEvents()?0:e.lastEventAt+1;r.push({kinds:[4],"#p":[this.account.pubkey],since:l},{kinds:[4],authors:[this.account.pubkey],since:l})}return r},async _queryRelay(e){const t=this.relaysData[e],r=this._buildRelayFilters(t),a=await t.relay.list(r);console.log("### _queryRelay.filters",t.relayUrl,r),console.log("### _queryRelay.events",t.relayUrl,a),a!=null&&a.length&&await this._processEvents(a,t),t.sub=t.relay.sub(r),t.sub.on("event",l=>{this._processEvents([l],t)},{id:"masterSub"})},async _publishEventToRelays(e,t){let r=0;for(const a of t)await this._publishEventToRelay(e,a)&&r++;return r},async _publishEventToRelay(e,t){try{const r=await this._toRelayKey(t),a=this.relaysData[r];return a!=null&&a.connected&&await a.relay.publish(e),!0}catch(r){return console.warn(r),!1}},_findRelaysForMerchant(e){const t=this.markets.filter(r=>r.opts.merchants.includes(e)).map(r=>r.relays).flat();return[...new Set(t)]},_processEvents(e,t){if(!(e!=null&&e.length))return;console.log("### _processEvents",t.relayUrl,e);const r=e.sort((a,l)=>l.created_at-a.created_at)[0].created_at;t.lastEventAt=Math.max(r,t.lastEventAt),e=e.filter(a=>!this.processedEventIds.includes(a.id)).map(a=>({...a,relayUrl:t.relayUrl})).map(eventToObj),e.filter(a=>a.kind===0).forEach(this._processProfileEvents),e.filter(a=>a.kind===4).forEach(this._processDmEvents),e.filter(a=>a.kind===5).forEach(this._processDeleteEvents),e.filter(a=>a.kind===30017).forEach(this._processStallEvents),e.filter(a=>a.kind===30018).forEach(this._processProductEvents),this._persistStallsAndProducts(),this._persistRelaysData()},_processProfileEvents(e){try{this.profiles=this.profiles.filter(t=>t.pubkey!==e.pubkey),this.profiles.push({pubkey:e.pubkey,...e.content}),this.$q.localStorage.set("nostrmarket.profiles",this.profiles)}catch(t){console.warn(t)}},_processStallEvents(e){this._processStall({...e.content,id:e.d,pubkey:e.pubkey,createdAt:e.created_at,eventId:e.id,relayUrls:[e.relayUrl]})},_processStall(e){const t=this.stalls.findIndex(a=>a.id===e.id&&a.pubkey===e.pubkey);if(t===-1){this.stalls.push(e);return}this.stalls[t].createdAta.pubkey===e.pubkey&&a.stall_id===e.id).forEach(a=>a.stallName=e.name))},_processProductEvents(e){const t={...e.content},r=this.stalls.find(a=>a.id==t.stall_id);!r||(t.currency!="sat"&&(t.formatedPrice=this.getAmountFormated(t.price,t.currency)),this._processProduct({...t,stallName:r.name,images:t.images||[t.image],pubkey:e.pubkey,id:e.d,categories:e.t,eventId:e.id,createdAt:e.created_at,relayUrls:[e.relayUrl]}))},_processProduct(e){const t=this.products.findIndex(a=>a.id===e.id&&a.pubkey===e.pubkey);if(t===-1){this.products.push(e);return}const r=this.products[t];r.relayUrls=[...new Set(e.relayUrls.concat(r.relayUrls))],r.createdAts==="p"&&u&&u!=="")[1],r=e.pubkey===this.account.pubkey;if(t!==this.account.pubkey&&!r){console.warn("Unexpected DM. Dropped!");return}const a=r?t:e.pubkey;e.content=await NostrTools.nip04.decrypt(this.account.privkey,a,e.content),this._persistDMEvent(e,a),isJson(e.content)&&await this._handleStructuredDm(e,a)},async _processDeleteEvents(e){const t=(e.tags||[]).filter(s=>s[0]==="e").map(s=>s[1]),r=this.stalls.filter(s=>s.pubkey===e.pubkey&&t.includes(s.eventId)).map(s=>s.id),a=s=>s.pubkey===e.pubkey&&(t.includes(s.eventId)||r.includes(s.stall_id));this.products=this.products.filter(s=>!a(s));const l=s=>s.pubkey===e.pubkey&&t.includes(s.eventId);this.stalls=this.stalls.filter(s=>!l(s))},async createMarket(e,t){var r;try{this.setActivePage("loading");const a={d:crypto.randomUUID(),pubkey:((r=this.account)==null?void 0:r.pubkey)||"",relays:[...defaultRelays],selected:!0,opts:{name:"New Market",merchants:t||[],ui:{}}};this.markets.unshift(a),this.$q.localStorage.set("nostrmarket.markets",this.markets);for(const l of a.relays)this._handleNewRelay(l,a);e===!0&&this.showMarketConfig(0)}catch(a){console.warn(a)}finally{this.setActivePage("market-config")}},async addMarket(e){if(!!e)try{this.setActivePage("loading");const{type:t,data:r}=NostrTools.nip19.decode(e);if(t!=="naddr"||r.kind!==30019)return;const a={d:r.identifier,pubkey:r.pubkey,relays:r.relays,selected:!0},s=await new NostrTools.SimplePool().get(a.relays,{kinds:[30019],limit:1,authors:[a.pubkey],"#d":[a.d]});if(!s)return;isJson(s.content)&&(a.opts=JSON.parse(s.content),this.$q.dialog(confirm(`Do you want to use the look and feel of the '${a.opts.name}' market?`)).onOk(async()=>{this.config={...this.config,opts:a.opts},this._applyUiConfigs(a==null?void 0:a.opts)})),this.markets=this.markets.filter(u=>u.d!==a.d||u.pubkey!==a.pubkey),this.markets.unshift(a),this.$q.localStorage.set("nostrmarket.markets",this.markets);for(const u of a.relays)await this._handleNewRelay(u,a)}catch(t){console.warn(t)}finally{this.setActivePage("market")}},updateMarket(e){var t,r;try{this.isLoading=!0;const{d:a,pubkey:l}=e,s=this.markets.find(v=>v.d===a&&v.pubkey===l)||{},u=(t=e.opts)==null?void 0:t.merchants.filter(v=>{var C;return!((C=s.opts)!=null&&C.merchants.includes(v))}),d=(r=s.opts)==null?void 0:r.merchants.filter(v=>{var C;return!((C=e.opts)!=null&&C.merchants.includes(v))}),f=e.relays.filter(v=>!s.relays.includes(v)),g=s.relays.filter(v=>!e.relays.includes(v));this.markets=this.markets.filter(v=>v.d!==a||v.pubkey!==l),this.markets.unshift(e),this.$q.localStorage.set("nostrmarket.markets",this.markets),d==null||d.forEach(this._handleRemoveMerchant),u==null||u.forEach(v=>this._handleNewMerchant(e,v)),console.log("### newRelays",f),console.log("### removedRelays",g),f==null||f.forEach(v=>this._handleNewRelay(v,e)),g==null||g.forEach(this._handleRemovedRelay),this._persistStallsAndProducts(),this._persistRelaysData()}catch(a){console.warn(a)}finally{this.isLoading=!1}},deleteMarket(e){var t,r;try{this.isLoading=!0;const{d:a,pubkey:l}=e;this.markets=this.markets.filter(s=>s.d!==a||s.pubkey!==l),this.$q.localStorage.set("nostrmarket.markets",this.markets),this.activeMarket&&this.activeMarket.d===a&&this.activeMarket.pubkey===l&&(this.activeMarket=null,this.navigateTo("market"),this.updateUiConfig(this.markets[0])),(t=e.opts.merchants)==null||t.forEach(this._handleRemoveMerchant),(r=e.relays)==null||r.forEach(this._handleRemovedRelay),this._persistStallsAndProducts(),this._persistRelaysData()}catch(a){console.warn(a)}finally{this.isLoading=!1}},toggleMarket(){this.allMarketsSelected=!this.markets.find(e=>!e.selected),this.$q.localStorage.set("nostrmarket.markets",this.markets)},toggleAllMarkets(){this.markets.forEach(e=>e.selected=this.allMarketsSelected),this.$q.localStorage.set("nostrmarket.markets",this.markets)},showMarketConfig(e){this.activeMarket=this.markets[e],this.transitToPage("market-config")},async publishNaddr(e){var l,s;if(!((l=this.account)!=null&&l.privkey)){this.openAccountDialog(),this.$q.notify({message:"Login Required!",icon:"warning"});return}console.log("### marketData",e);const t=(s=e.d)!=null?s:crypto.randomUUID(),r={...await NostrTools.getBlankEvent(),kind:30019,content:JSON.stringify(e.opts),created_at:Math.floor(Date.now()/1e3),tags:[["d",t]],pubkey:this.account.pubkey};r.id=NostrTools.getEventHash(r);try{r.sig=await NostrTools.signEvent(r,this.account.privkey);const u=await this._publishEventToRelays(r,e.relays);this.$q.notify({type:u?"positive":"warning",message:u?`The market profile has been published tp (${u} relays)!`:"The market profile could not be published"})}catch(u){console.error(u),this.$q.notify({message:"Cannot publish market profile",caption:`Error: ${u}`,color:"negative"});return}const a=NostrTools.nip19.naddrEncode({pubkey:r.pubkey,kind:30019,identifier:t,relays:e.relays});this.copyText(a)},_handleNewMerchant(e,t){Object.keys(this.relaysData).forEach(async r=>{const a=this.relaysData[r];if(!e.relays.includes(a.relayUrl)||a.merchants.includes(t))return;const l=await a.relay.list([{kinds:[0,30017,30018],authors:[t]}]);await this._processEvents(l,a),a.merchants.push(t),await this._requeryRelay(r)})},async _handleNewRelay(e,t){const r=await this._toRelayKey(e);if(this.relaysData[r]){const a=this.relaysData[r],l=await a.relay.list([{kinds:[0,30017,30018],authors:t.opts.merchants}]);await this._processEvents(l,a),a.merchants=[...new Set(a.merchants.concat(t.opts.merchants))],await this._requeryRelay(r)}else await this._loadRelayData(e,t.opts.merchants),await this._connectToRelay(r)},_handleRemoveMerchant(e){this.markets.find(r=>r.opts.merchants.find(a=>a===e))||(this.products=this.products.filter(r=>r.pubkey!==e),this.stalls=this.stalls.filter(r=>r.pubkey!==e),this._removeSubscriptionsForMerchant(e))},_removeSubscriptionsForMerchant(e){Object.keys(this.relaysData).forEach(async t=>{const r=this.relaysData[t];!r.merchants.includes(e)||(r.merchants=r.merchants.filter(a=>a!==e),await this._requeryRelay(t))})},async _handleRemovedRelay(e){if(!this.markets.find(r=>r.relays.find(a=>a===e))){const r=await this._toRelayKey(e);delete this.relaysData[r],this._persistRelaysData()}},addProductToCart(e){let t=this.shoppingCarts.find(a=>a.id===e.stall_id);t||(t={id:e.stall_id,products:[]},this.shoppingCarts.push(t)),t.merchant=e.pubkey;let r=t.products.find(a=>a.id===e.id);r||(r={...e,orderedQuantity:0},t.products.push(r)),r.orderedQuantity=Math.min(r.quantity,e.orderedQuantity||r.orderedQuantity+1),this.$q.localStorage.set("nostrmarket.shoppingCarts",this.shoppingCarts),this.$q.notify({type:"positive",message:"Product added to cart!"})},removeProductFromCart(e){const t=this.shoppingCarts.find(r=>r.id===e.stallId);t&&(t.products=t.products.filter(r=>r.id!==e.productId),t.products.length||(this.shoppingCarts=this.shoppingCarts.filter(r=>r.id!==e.stallId)),this.$q.localStorage.set("nostrmarket.shoppingCarts",this.shoppingCarts))},removeCart(e){this.shoppingCarts=this.shoppingCarts.filter(t=>t.id!==e),this.$q.localStorage.set("nostrmarket.shoppingCarts",this.shoppingCarts)},checkoutStallCart(e){this.checkoutCart=e,this.checkoutStall=this.stalls.find(t=>t.id===e.id),this.setActivePage("shopping-cart-checkout")},handleDmChatSelected(e){this.dmEvents=this.$q.localStorage.getItem(`nostrmarket.dm.${e}`)||{}},async sendDirectMessage(e){var t;if(!((t=this.account)!=null&&t.pubkey)){this.$q.notify({type:"warning",message:"Cannot send message. No user logged in!"});return}try{const r={...await NostrTools.getBlankEvent(),kind:4,created_at:Math.floor(Date.now()/1e3),tags:[["p",e.to]],pubkey:this.account.pubkey};r.content=await NostrTools.nip04.encrypt(this.account.privkey,e.to,e.message),r.id=NostrTools.getEventHash(r),r.sig=await NostrTools.signEvent(r,this.account.privkey),await this._sendDmEvent(r),r.content=e.message,this._persistDMEvent(r,e.to)}catch{this.$q.notify({type:"warning",message:"Failed to send message!"})}},async _sendDmEvent(e){const t=e.tags.filter(a=>a[0]==="p").map(a=>a[1]);let r=this._findRelaysForMerchant(t[0]);r!=null&&r.length||(r=[...defaultRelays]),await this._publishEventToRelays(e,r)},_noDmEvents(){return this.$q.localStorage.getAllKeys().filter(t=>t.startsWith("nostrmarket.dm")).length===0},async placeOrder({event:e,order:t,cartId:r}){var a;if(!((a=this.account)!=null&&a.privkey)){this.openAccountDialog();return}try{this.activeOrderId=t.id,e.content=await NostrTools.nip04.encrypt(this.account.privkey,this.checkoutStall.pubkey,JSON.stringify(t)),e.id=NostrTools.getEventHash(e),e.sig=await NostrTools.signEvent(e,this.account.privkey),await this._sendOrderEvent(e),this._persistOrderUpdate(this.checkoutStall.pubkey,e.created_at,t),this.removeCart(r),this.setActivePage("shopping-cart-list")}catch(l){console.warn(l),this.$q.notify({type:"warning",message:"Failed to place order!"})}},async _sendOrderEvent(e){const t=e.tags.filter(l=>l[0]==="p").map(l=>l[1]),r=this._findRelaysForMerchant(t[0]),a=await this._publishEventToRelays(e,r);this.$q.notify({type:a?"positive":"warning",message:a?`The order has been placed (${a} relays)!`:"Order could not be placed"}),this.qrCodeDialog={data:{payment_request:null,message:null},dismissMsg:null,show:!!a}},_handlePaymentRequest(e){var r;if(e.id&&e.id!==this.activeOrderId)return;if(!((r=e.payment_options)!=null&&r.length)){this.qrCodeDialog.data.message=e.message||"Unexpected error";return}const t=e.payment_options.find(a=>a.type=="ln").link;!t||(this.qrCodeDialog.data.payment_request=t,this.qrCodeDialog.dismissMsg=this.$q.notify({timeout:1e4,message:"Waiting for payment..."}))},_handleOrderStatusUpdate(e){if(e.id&&e.id!==this.activeOrderId)return;this.qrCodeDialog.dismissMsg&&this.qrCodeDialog.dismissMsg(),this.qrCodeDialog.show=!1;const t=e.shipped?"Order shipped":e.paid?"Order paid":"Order notification";this.$q.notify({type:"positive",message:t,caption:e.message||""})},async _handleStructuredDm(e,t){try{const r=JSON.parse(e.content);[0,1,2].indexOf(r.type)!==-1&&this._persistOrderUpdate(t,e.created_at,r),r.type===1?this._handlePaymentRequest(r):r.type===2&&this._handleOrderStatusUpdate(r)}catch(r){console.warn("Unable to handle incomming DM",r)}},_restoreFromStorage(){this.markets=this.$q.localStorage.getItem("nostrmarket.markets")||[],this.allMarketsSelected=!this.markets.find(l=>!l.selected),this.shoppingCarts=this.$q.localStorage.getItem("nostrmarket.shoppingCarts")||[],this.profiles=this.$q.localStorage.getItem("nostrmarket.profiles")||[],this.account=this.$q.localStorage.getItem("nostrmarket.account")||null,this.stalls=this.$q.localStorage.getItem("nostrmarket.stalls")||[],this.products=this.$q.localStorage.getItem("nostrmarket.products")||[];const e=this.$q.localStorage.getItem("nostrmarket.marketplaceConfig")||{ui:{darkMode:!1}};this.config={...this.config,opts:{...this.config.opts,...e}},this._applyUiConfigs(this.config.opts);const t="nostrmarket.orders.";this.$q.localStorage.getAllKeys().filter(l=>l.startsWith(t)).forEach(l=>{const s=l.substring(t.length);this.orders[s]=this.$q.localStorage.getItem(l)});const a=this.$q.localStorage.getItem("nostrmarket.readNotes")||{};this.readNotes={...this.readNotes,...a}},_persistStallsAndProducts(){this.$q.localStorage.set("nostrmarket.stalls",this.stalls),this.$q.localStorage.set("nostrmarket.products",this.products)},_persistRelaysData(){this.$q.localStorage.set("nostrmarket.relays",Object.values(this.relaysData).filter(e=>!!e).map(e=>({lastEventAt:e.lastEventAt,relayUrl:e.relayUrl})))},_persistDMEvent(e,t){var l;const r=this.$q.localStorage.getItem(`nostrmarket.dm.${t}`)||{events:[],lastCreatedAt:0};r.events.find(s=>s.id===e.id)||(r.events.push(e),r.events.sort((s,u)=>s.created_at-u.created_at),r.lastCreatedAt=r.events[r.events.length-1].created_at,r.peerPubkey=t,this.$q.localStorage.set(`nostrmarket.dm.${t}`,r),((l=this.dmEvents)==null?void 0:l.peerPubkey)===t?this.dmEvents=this.$q.localStorage.getItem(`nostrmarket.dm.${t}`)||{}:this.dmEvents={...this.dmEvents})},_persistOrderUpdate(e,t,r){let a=this.$q.localStorage.getItem(`nostrmarket.orders.${e}`)||[];const l=a.findIndex(u=>u.id===r.id);if(l===-1){a.unshift({...r,eventCreatedAt:t,createdAt:t}),this.orders[e]=a,this.orders={...this.orders},this.$q.localStorage.set(`nostrmarket.orders.${e}`,a);return}let s=a[l];r.type===0?(s.createdAt=t,s={...s,...r,message:s.message||r.message}):s=s.eventCreatedAtf.id==r))==null?void 0:d.pubkey);s.searchParams.set("merchant",u),e==="stall"||e==="product"?r&&(this.activeStall=r,this.setActivePage("customer-stall"),s.searchParams.set("stall",r),this.activeProduct=a,a?s.searchParams.set("product",a):s.searchParams.delete("product")):(this.activeMarket=null,this.activeStall=null,this.activeProduct=null,s.searchParams.delete("merchant"),s.searchParams.delete("stall"),s.searchParams.delete("product"),this.setActivePage(e)),window.history.pushState({},"",s)},copyUrl:function(){this.copyText(window.location)},copyText:function(e){var t=this.$q.notify;AS(e).then(function(){t({message:"Copied to clipboard!",position:"bottom"})})},getAmountFormated(e,t="USD"){return formatCurrency(e,t)},setActivePage(e="market"){this.activePage=e},transitToPage(e){this.activePage="loading",setTimeout(()=>this.setActivePage(e),100)},showInvoiceQr(e){!e||(this.qrCodeDialog={data:{payment_request:e},dismissMsg:null,show:!0})},toggleCategoryFilter(e){const t=this.filterData.categories.indexOf(e);t===-1?this.filterData.categories.push(e):this.filterData.categories.splice(t,1)},hasCategory(e=[]){var t;if(!((t=this.filterData.categories)!=null&&t.length))return!0;for(const r of e)if(this.filterData.categories.indexOf(r.toLowerCase())!==-1)return!0;return!1},allStallCatgories(e){const t=this.products.filter(r=>r.stall_id===e).map(r=>r.categories).flat().filter(r=>!!r);return Array.from(new Set(t))},allStallImages(e){const t=this.products.filter(r=>r.stall_id===e).map(r=>r.images&&r.images[0]).filter(r=>!!r);return Array.from(new Set(t))},sanitizeImageSrc(e,t){try{if(e)return new URL(e),e}catch{}return t},markNoteAsRead(e){this.readNotes[e]=!0,this.$q.localStorage.set("nostrmarket.readNotes",this.readNotes)},focusOnElement(e){var t;(t=document.getElementById(e))==null||t.scrollIntoView(),this.showFilterDetails=!0}}}),sA=Object.assign(aA,{setup(e){return window.$q=Lw(),(t,r)=>(O(),re(Nt,null,[y($w,null,{default:b(()=>{var a,l,s,u,d;return[S("div",mx,[S("div",vx,[y(Xr,{onClick:r[0]||(r[0]=f=>t.navigateTo("market")),rounded:"",size:"64px",class:"q-ma-none q-pa-none gt-sm cursor-pointer"},{default:b(()=>[t.logoImage?(O(),re("img",{key:0,src:t.logoImage},null,8,px)):$e("",!0)]),_:1})]),S("div",yx,[_x,y(It,{class:"rounded-pill",style:{width:"100%"},rounded:"",outlined:"",clearable:"",modelValue:t.searchText,"onUpdate:modelValue":r[1]||(r[1]=f=>t.searchText=f),modelModifiers:{trim:!0},label:"Filter products, load market profile..."},jh({append:b(()=>[t.searchText?$e("",!0):(O(),oe(Yt,{key:0,name:"search"}))]),_:2},[t.showFilterDetails?{name:"label",fn:b(()=>[Te(" Filter or paste a "),y(Cn,{class:"q-px-sm text-subtitle1",color:"secondary"},{default:b(()=>[Te("naddr")]),_:1}),Te(" here ")]),key:"0"}:void 0]),1032,["modelValue"])]),S("div",bx,[S("div",wx,[y(ye,{color:"gray",icon:"travel_explore",flat:"",size:"lg",onClick:r[2]||(r[2]=f=>t.navigateTo("product-filter"))},{default:b(()=>[y(Qr,null,{default:b(()=>[Te("Search for products on Nostr")]),_:1}),t.filterCount?(O(),oe(Cn,{key:0,color:"secondary",floating:""},{default:b(()=>[S("span",{textContent:ge(t.filterCount)},null,8,Sx)]),_:1})):$e("",!0)]),_:1}),y(ye,{onClick:r[3]||(r[3]=f=>t.navigateTo("user-config")),color:"gray",icon:t.account?"perm_identity":"person_add",flat:"",size:"lg"},{default:b(()=>[y(Qr,null,{default:b(()=>[Te("User Config")]),_:1})]),_:1},8,["icon"]),y(ye,{onClick:r[4]||(r[4]=f=>t.navigateTo("user-chat")),color:"gray",icon:"chat",flat:"",size:"lg"},{default:b(()=>[y(Qr,null,{default:b(()=>[Te("Chat")]),_:1})]),_:1}),y(ye,{onClick:r[5]||(r[5]=f=>t.navigateTo("customer-orders")),color:"gray",icon:"receipt_long",flat:"",size:"lg"},{default:b(()=>[y(Qr,null,{default:b(()=>[Te("Orders")]),_:1})]),_:1}),y(ye,{color:"gray",icon:"shopping_cart",dense:"",round:"",flat:"",size:"lg",onClick:r[6]||(r[6]=f=>t.navigateTo("shopping-cart-list"))},{default:b(()=>[y(Qr,null,{default:b(()=>[Te("Shopping Cart")]),_:1}),t.allCartsItemCount?(O(),oe(Cn,{key:0,color:"secondary",floating:""},{default:b(()=>[S("span",{textContent:ge(t.allCartsItemCount)},null,8,kx)]),_:1})):$e("",!0)]),_:1})])])]),(a=t.products)!=null&&a.length?(O(),re("div",Cx,[y(lc,{items:t.allCategories,"virtual-scroll-horizontal":""},{default:b(({item:f,index:g})=>[(O(),oe(Qa,{key:g,color:f.selected?"grey":"",class:"cursor-pointer q-mb-md"},{default:b(()=>[S("span",{textContent:ge(f.category),onClick:v=>t.toggleCategoryFilter(f.category)},null,8,Tx),y(Cn,{onClick:v=>t.toggleCategoryFilter(f.category),rounded:"",class:"q-ml-sm",color:"secondary"},{default:b(()=>[S("span",{textContent:ge(f.count)},null,8,Mx)]),_:2},1032,["onClick"])]),_:2},1032,["color"]))]),_:1},8,["items"])])):$e("",!0),t.markets.length?$e("",!0):(O(),oe(Jt,{key:1,class:"q-mb-sm"},{default:b(()=>[y(Ne,{class:"bg-secondary text-white"},{default:b(()=>[Dx,qx]),_:1})]),_:1})),t.isLoading?(O(),re("div",Px,[S("div",xx,[y($u,{color:"primary",size:"xl"})])])):$e("",!0),y(qw,{class:"row q-pa-none q-mb-lg gt-sm shadow-2"},{default:b(()=>[t.bannerImage?(O(),oe(oc,{key:0,src:t.bannerImage,onClick:r[7]||(r[7]=f=>t.navigateTo("market")),class:"rounded-borders cursor-pointer",style:{width:"100%",height:"250px"},cover:""},{default:b(()=>{var f,g;return[(g=(f=t.config)==null?void 0:f.opts)!=null&&g.about?(O(),re("div",Ax,[S("span",{textContent:ge(t.config.opts.about)},null,8,Ex)])):$e("",!0)]}),_:1},8,["src"])):$e("",!0)]),_:1}),S("div",Ix,[S("div",$x,[y(Iw,{class:"cursor q-mt-sm q-mr-sm"},{default:b(()=>[y(Sr,null,{default:b(()=>[y(ye,{onClick:r[8]||(r[8]=f=>t.navigateTo("market")),icon:"home",flat:"",class:"q-pa-none"},{default:b(()=>[S("span",{textContent:ge(t.marketsName),class:"q-ml-sm"},null,8,Ox)]),_:1}),y(lg,{flat:"",class:"q-pl-xs"},{default:b(()=>[y(Mr,null,{default:b(()=>[Gn((O(),oe(Vt,null,{default:b(()=>[y(Ie,{side:"",top:""},{default:b(()=>[y(lo,{modelValue:t.allMarketsSelected,"onUpdate:modelValue":r[9]||(r[9]=f=>t.allMarketsSelected=f),onClick:t.toggleAllMarkets},null,8,["modelValue","onClick"])]),_:1}),y(Ie,null,{default:b(()=>[y(Ke,null,{default:b(()=>[Rx]),_:1}),y(Ke,{caption:""},{default:b(()=>[Te("Aggregate all markets into one view")]),_:1})]),_:1}),y(Ie,{side:"",top:""},{default:b(()=>[Gn((O(),oe(ye,{onClick:r[10]||(r[10]=f=>t.createMarket(!0)),color:"green",outline:""},{default:b(()=>[Te("New")]),_:1})),[[Gi]])]),_:1})]),_:1})),[[Ju]]),y(ut),(O(!0),re(Nt,null,Wt(t.markets,(f,g)=>(O(),oe(Vt,{key:g},{default:b(()=>[y(Ie,{side:"",top:""},{default:b(()=>[y(lo,{modelValue:f.selected,"onUpdate:modelValue":v=>f.selected=v,onClick:r[11]||(r[11]=v=>t.toggleMarket())},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),y(Ie,null,{default:b(()=>[y(Ke,null,{default:b(()=>{var v;return[S("span",{textContent:ge(((v=f.opts)==null?void 0:v.name)||"Market")},null,8,Lx)]}),_:2},1024),y(Ke,{caption:""},{default:b(()=>{var v;return[S("span",{textContent:ge((v=f.opts)==null?void 0:v.about),class:"ellipsis-2-lines text-wrap"},null,8,Nx)]}),_:2},1024)]),_:2},1024),y(Ie,{side:"",top:""},{default:b(()=>[Gn(y(ye,{color:"secondary",flat:"",icon:"settings",onClick:v=>t.showMarketConfig(g)},null,8,["onClick"]),[[Gi]])]),_:2},1024)]),_:2},1024))),128))]),_:1})]),_:1})]),_:1}),t.activePage==="customer-stall"?(O(),oe(Sr,{key:0,label:t.stallName,onClick:r[12]||(r[12]=f=>t.navigateTo("stall",{stall:t.activeStall})),icon:"storefront",class:"cursor-pointer"},null,8,["label"])):$e("",!0),t.activePage==="customer-stall"&&t.activeProduct?(O(),oe(Sr,{key:1,label:t.productName,class:"cursor-pointer",icon:"widgets"},null,8,["label"])):$e("",!0),t.activePage==="shopping-cart-list"?(O(),oe(Sr,{key:2,label:"Shoping Cart",icon:"shopping_cart"})):$e("",!0),t.activePage==="customer-orders"?(O(),oe(Sr,{key:3,label:"Orders",icon:"receipt_long"})):$e("",!0),t.activePage==="market-config"?(O(),oe(Sr,{key:4,label:"Settings",icon:"settings"})):$e("",!0),t.activePage==="product-filter"?(O(),oe(Sr,{key:5,label:"Filter",icon:"travel_explore"})):$e("",!0),t.activePage==="user-config"?(O(),oe(Sr,{key:6,label:"User Config",icon:"perm_identity"})):$e("",!0),t.activePage==="user-chat"?(O(),oe(Sr,{key:7,label:"User Chat",icon:"chat"})):$e("",!0)]),_:1})]),S("div",Bx,[t.activePage==="customer-stall"?(O(),oe(ye,{key:0,flat:"",color:"grey",icon:"content_copy",onClick:r[13]||(r[13]=f=>t.copyUrl()),class:"float-right"})):t.activePage==="market"&&((l=t.stalls)==null?void 0:l.length)?(O(),oe(lo,{key:1,modelValue:t.groupByStall,"onUpdate:modelValue":r[14]||(r[14]=f=>t.groupByStall=f),class:"q-pl-md q-mt-sm float-right",size:"xs",val:"xs",label:"Group by stalls"},null,8,["modelValue"])):$e("",!0)])]),y(ut,{class:"q-mt-sm q-mb-md"}),t.activePage==="loading"?(O(),re("div",Fx,[S("div",Ux,[y($u,{color:"primary",size:"xl"})])])):$e("",!0),t.activePage==="product-filter"?(O(),oe(gx,{key:4,filter:t.filterData,categories:t.allCategories,currencies:t.allCurrencies,merchants:t.allMerchants,stalls:t.stalls,profiles:t.profiles,onFilterUpdate:t.handleFilterData,class:"q-mb-md"},null,8,["filter","categories","currencies","merchants","stalls","profiles","onFilterUpdate"])):t.activeMarket&&t.activePage==="market-config"?(O(),oe(Ig,{key:5,market:t.activeMarket,profiles:t.profiles,"relays-data":t.activeMarketRelaysData,"read-notes":t.readNotes,onApplyUi:t.updateUiConfig,onMarketUpdate:t.updateMarket,onDeleteMarket:t.deleteMarket,onPublishNaddr:t.publishNaddr,onNoteRead:t.markNoteAsRead},null,8,["market","profiles","relays-data","read-notes","onApplyUi","onMarketUpdate","onDeleteMarket","onPublishNaddr","onNoteRead"])):t.activePage==="user-config"?(O(),oe(Vk,{key:6,account:t.account,onLogin:r[15]||(r[15]=f=>t.accountDialog.show=!0),onLogout:t.logout,onClearAllData:t.clearAllData,onCopyText:t.copyText},null,8,["account","onLogout","onClearAllData","onCopyText"])):t.activePage==="user-chat"?(O(),oe(hD,{key:7,"account-pubkey":(s=t.account)==null?void 0:s.pubkey,"peer-pubkeys":t.dmPeers,profiles:t.profiles,events:t.dmEvents,onChatSelected:t.handleDmChatSelected,onSendDm:t.sendDirectMessage},null,8,["account-pubkey","peer-pubkeys","profiles","events","onChatSelected","onSendDm"])):t.activePage==="shopping-cart-list"?(O(),oe(wD,{key:8,carts:t.shoppingCarts,profiles:t.profiles,onAddToCart:t.addProductToCart,onRemoveFromCart:t.removeProductFromCart,onRemoveCart:t.removeCart,onCheckoutCart:t.checkoutStallCart},null,8,["carts","profiles","onAddToCart","onRemoveFromCart","onRemoveCart","onCheckoutCart"])):t.activePage==="shopping-cart-checkout"?(O(),oe(nq,{key:9,cart:t.checkoutCart,stall:t.checkoutStall,"customer-pubkey":(u=t.account)==null?void 0:u.pubkey,profiles:t.profiles,onLoginRequired:t.openAccountDialog,onPlaceOrder:t.placeOrder,onChangePage:t.navigateTo},null,8,["cart","stall","customer-pubkey","profiles","onLoginRequired","onPlaceOrder","onChangePage"])):t.activePage==="customer-orders"?(O(),oe(tP,{key:10,orders:t.orders,products:t.products,stalls:t.stalls,profiles:t.profiles,onShowInvoice:t.showInvoiceQr},null,8,["orders","products","stalls","profiles","onShowInvoice"])):t.activePage==="customer-stall"?(O(),oe(OP,{key:11,stall:t.stalls.find(f=>f.id==t.activeStall),products:t.filteredProducts,"product-detail":t.activeProduct,onChangePage:t.navigateTo,onAddToCart:t.addProductToCart},null,8,["stall","products","product-detail","onChangePage","onAddToCart"])):(d=t.markets)!=null&&d.length?(O(),re("div",Qx,[t.groupByStall?(O(),oe(ZP,{key:0,stalls:t.filterStalls,onChangePage:t.navigateTo},null,8,["stalls","onChangePage"])):(O(),oe(Tq,{key:1,"filtered-products":t.filteredProducts,"search-text":t.searchText,"filter-categories":t.filterData.categories,onChangePage:t.navigateTo,onAddToCart:t.addProductToCart},null,8,["filtered-products","search-text","filter-categories","onChangePage","onAddToCart"]))])):(O(),re("div",zx,[y(Mr,{class:"q-mt-md",bordered:""},{default:b(()=>[y(Vt,null,{default:b(()=>[y(Ie,{class:"q-mt-sm q-ml-lg"},{default:b(()=>[y(Ke,null,{default:b(()=>[Vx]),_:1}),y(ut,{class:"q-mb-xl q-mt-md"}),y(Ke,null,{default:b(()=>[Yx]),_:1})]),_:1})]),_:1}),y(Vt,null,{default:b(()=>[y(Ie,{class:"q-mt-sm q-ml-lg"},{default:b(()=>[y(Ke,null,{default:b(()=>[S("ul",null,[S("li",null,[S("span",Wx,[y(ye,{onClick:r[16]||(r[16]=f=>t.addMarket(t.defaultMarketNaddr)),size:"xl",flat:"",color:"secondary",class:"q-mb-xs"},{default:b(()=>[Te("Import")]),_:1}),Te(" a list of popular merchants, or ")])]),S("li",null,[S("span",Hx,[y(ye,{onClick:r[17]||(r[17]=f=>t.createMarket(!0)),flat:"",size:"xl",color:"secondary",class:"q-mb-xs"},{default:b(()=>[Te("Add a merchant")]),_:1}),Te(" using its public key, or ")])]),S("li",null,[S("span",Kx,[y(ye,{onClick:r[18]||(r[18]=f=>t.focusOnElement("search-text")),flat:"",size:"xl",color:"secondary",class:"q-mb-xs"},{default:b(()=>[Te("Add a market profile")]),_:1}),Te(" using a shareable "),Gx,Te(" identifier ")]),y(It,{class:"rounded-pill",style:{width:"100%"},rounded:"",outlined:"",clearable:"",modelValue:t.searchText,"onUpdate:modelValue":r[19]||(r[19]=f=>t.searchText=f),modelModifiers:{trim:!0},label:"Load market profile (naddr)..."},null,8,["modelValue"])])])]),_:1})]),_:1}),y(Ie,{side:""})]),_:1})]),_:1})]))]}),_:1}),y(go,{modelValue:t.accountDialog.show,"onUpdate:modelValue":r[22]||(r[22]=a=>t.accountDialog.show=a),position:"top"},{default:b(()=>[y(Jt,null,{default:b(()=>[y(Ne,{class:"row"},{default:b(()=>[jx,y(Rw)]),_:1}),y(Ne,null,{default:b(()=>[Zx]),_:1}),y(Ne,{class:"q-pt-none"},{default:b(()=>[y(It,{dense:"",label:"Nsec/Hex",modelValue:t.accountDialog.data.key,"onUpdate:modelValue":r[20]||(r[20]=a=>t.accountDialog.data.key=a),autofocus:"",onKeyup:Au(t.createAccount,["enter"]),error:t.accountDialog.data.key&&!t.isValidAccountKey,hint:"Enter you private key"},null,8,["modelValue","onKeyup","error"])]),_:1}),y(wi,{align:"right",class:"text-primary"},{default:b(()=>[t.isValidAccountKey?(O(),oe(ye,{key:0,label:"Login",color:"primary",onClick:r[21]||(r[21]=()=>t.createAccount())})):(O(),oe(ye,{key:1,flat:"",label:"Generate",onClick:t.generateKeyPair},null,8,["onClick"])),Gn((O(),oe(ye,{flat:"",color:"grey",class:"q-ml-auto"},{default:b(()=>[Te("Close")]),_:1})),[[Gi]])]),_:1})]),_:1})]),_:1},8,["modelValue"]),y(go,{modelValue:t.qrCodeDialog.show,"onUpdate:modelValue":r[24]||(r[24]=a=>t.qrCodeDialog.show=a),position:"top"},{default:b(()=>[y(Jt,{class:"q-pa-md q-pt-xl"},{default:b(()=>{var a;return[S("div",Jx,[t.qrCodeDialog.data.message?(O(),re("div",Xx,[S("strong",null,[S("span",{textContent:ge(t.qrCodeDialog.data.message)},null,8,eA)])])):(O(),re("a",{key:1,href:"lightning:"+((a=t.qrCodeDialog.data)==null?void 0:a.payment_request)},[t.qrCodeDialog.data.payment_request?(O(),re("div",nA,[y(uw(PS),{value:t.qrCodeDialog.data.payment_request,options:{width:340},class:"rounded-borders"},null,8,["value"])])):(O(),re("div",rA,[y(Rh,{color:"primary",size:"2.55em"})]))],8,tA))]),S("div",iA,[t.qrCodeDialog.data.payment_request?(O(),oe(ye,{key:0,outline:"",color:"grey",onClick:r[23]||(r[23]=l=>t.copyText(t.qrCodeDialog.data.payment_request))},{default:b(()=>[Te("Copy invoice")]),_:1})):$e("",!0),Gn((O(),oe(ye,{flat:"",color:"grey",class:"q-ml-auto"},{default:b(()=>[Te("Close")]),_:1})),[[Gi]])])]}),_:1})]),_:1},8,["modelValue"])],64))}});export{sA as default}; diff --git a/static/market/assets/QResizeObserver.b282d5d7.js b/static/market/assets/QResizeObserver.1ffe80c2.js similarity index 97% rename from static/market/assets/QResizeObserver.b282d5d7.js rename to static/market/assets/QResizeObserver.1ffe80c2.js index f3fed98..e0c2e39 100644 --- a/static/market/assets/QResizeObserver.b282d5d7.js +++ b/static/market/assets/QResizeObserver.1ffe80c2.js @@ -1 +1 @@ -import{c as x,w as p,y as v,z as m,A as y,B as O,g as S,C as b,D as R,E as C,r as L,f as P,F as z,h as D}from"./index.ed8b8314.js";const{passive:T}=b,Q=["both","horizontal","vertical"];var V=x({name:"QScrollObserver",props:{axis:{type:String,validator:n=>Q.includes(n),default:"vertical"},debounce:[String,Number],scrollTarget:{default:void 0}},emits:["scroll"],setup(n,{emit:g}){const e={position:{top:0,left:0},direction:"down",directionChanged:!1,delta:{top:0,left:0},inflectionPoint:{top:0,left:0}};let t=null,r,c;p(()=>n.scrollTarget,()=>{o(),d()});function l(){t!==null&&t();const u=Math.max(0,R(r)),f=C(r),s={top:u-e.position.top,left:f-e.position.left};if(n.axis==="vertical"&&s.top===0||n.axis==="horizontal"&&s.left===0)return;const h=Math.abs(s.top)>=Math.abs(s.left)?s.top<0?"up":"down":s.left<0?"left":"right";e.position={top:u,left:f},e.directionChanged=e.direction!==h,e.delta=s,e.directionChanged===!0&&(e.direction=h,e.inflectionPoint=e.position),g("scroll",{...e})}function d(){r=O(c,n.scrollTarget),r.addEventListener("scroll",i,T),i(!0)}function o(){r!==void 0&&(r.removeEventListener("scroll",i,T),r=void 0)}function i(u){if(u===!0||n.debounce===0||n.debounce==="0")l();else if(t===null){const[f,s]=n.debounce?[setTimeout(l,n.debounce),clearTimeout]:[requestAnimationFrame(l),cancelAnimationFrame];t=()=>{s(f),t=null}}}const{proxy:a}=S();return p(()=>a.$q.lang.rtl,l),v(()=>{c=a.$el.parentNode,d()}),m(()=>{t!==null&&t(),o()}),Object.assign(a,{trigger:i,getPosition:()=>e}),y}});function M(){const n=L(!P.value);return n.value===!1&&v(()=>{n.value=!0}),n}const E=typeof ResizeObserver!="undefined",w=E===!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"};var $=x({name:"QResizeObserver",props:{debounce:{type:[String,Number],default:100}},emits:["resize"],setup(n,{emit:g}){let e=null,t,r={width:-1,height:-1};function c(o){o===!0||n.debounce===0||n.debounce==="0"?l():e===null&&(e=setTimeout(l,n.debounce))}function l(){if(e!==null&&(clearTimeout(e),e=null),t){const{offsetWidth:o,offsetHeight:i}=t;(o!==r.width||i!==r.height)&&(r={width:o,height:i},g("resize",r))}}const{proxy:d}=S();if(E===!0){let o;const i=a=>{t=d.$el.parentNode,t?(o=new ResizeObserver(c),o.observe(t),l()):a!==!0&&z(()=>{i(!0)})};return v(()=>{i()}),m(()=>{e!==null&&clearTimeout(e),o!==void 0&&(o.disconnect!==void 0?o.disconnect():t&&o.unobserve(t))}),y}else{let a=function(){e!==null&&(clearTimeout(e),e=null),i!==void 0&&(i.removeEventListener!==void 0&&i.removeEventListener("resize",c,b.passive),i=void 0)},u=function(){a(),t&&t.contentDocument&&(i=t.contentDocument.defaultView,i.addEventListener("resize",c,b.passive),l())};const o=M();let i;return v(()=>{z(()=>{t=d.$el,t&&u()})}),m(a),d.trigger=c,()=>{if(o.value===!0)return D("object",{style:w.style,tabindex:-1,type:"text/html",data:w.url,"aria-hidden":"true",onLoad:u})}}}});export{V as Q,$ as a}; +import{c as x,w as p,y as v,z as m,A as y,B as O,g as S,C as b,D as R,E as C,r as L,f as P,F as z,h as D}from"./index.923cbbf9.js";const{passive:T}=b,Q=["both","horizontal","vertical"];var V=x({name:"QScrollObserver",props:{axis:{type:String,validator:n=>Q.includes(n),default:"vertical"},debounce:[String,Number],scrollTarget:{default:void 0}},emits:["scroll"],setup(n,{emit:g}){const e={position:{top:0,left:0},direction:"down",directionChanged:!1,delta:{top:0,left:0},inflectionPoint:{top:0,left:0}};let t=null,r,c;p(()=>n.scrollTarget,()=>{o(),d()});function l(){t!==null&&t();const u=Math.max(0,R(r)),f=C(r),s={top:u-e.position.top,left:f-e.position.left};if(n.axis==="vertical"&&s.top===0||n.axis==="horizontal"&&s.left===0)return;const h=Math.abs(s.top)>=Math.abs(s.left)?s.top<0?"up":"down":s.left<0?"left":"right";e.position={top:u,left:f},e.directionChanged=e.direction!==h,e.delta=s,e.directionChanged===!0&&(e.direction=h,e.inflectionPoint=e.position),g("scroll",{...e})}function d(){r=O(c,n.scrollTarget),r.addEventListener("scroll",i,T),i(!0)}function o(){r!==void 0&&(r.removeEventListener("scroll",i,T),r=void 0)}function i(u){if(u===!0||n.debounce===0||n.debounce==="0")l();else if(t===null){const[f,s]=n.debounce?[setTimeout(l,n.debounce),clearTimeout]:[requestAnimationFrame(l),cancelAnimationFrame];t=()=>{s(f),t=null}}}const{proxy:a}=S();return p(()=>a.$q.lang.rtl,l),v(()=>{c=a.$el.parentNode,d()}),m(()=>{t!==null&&t(),o()}),Object.assign(a,{trigger:i,getPosition:()=>e}),y}});function M(){const n=L(!P.value);return n.value===!1&&v(()=>{n.value=!0}),n}const E=typeof ResizeObserver!="undefined",w=E===!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"};var $=x({name:"QResizeObserver",props:{debounce:{type:[String,Number],default:100}},emits:["resize"],setup(n,{emit:g}){let e=null,t,r={width:-1,height:-1};function c(o){o===!0||n.debounce===0||n.debounce==="0"?l():e===null&&(e=setTimeout(l,n.debounce))}function l(){if(e!==null&&(clearTimeout(e),e=null),t){const{offsetWidth:o,offsetHeight:i}=t;(o!==r.width||i!==r.height)&&(r={width:o,height:i},g("resize",r))}}const{proxy:d}=S();if(E===!0){let o;const i=a=>{t=d.$el.parentNode,t?(o=new ResizeObserver(c),o.observe(t),l()):a!==!0&&z(()=>{i(!0)})};return v(()=>{i()}),m(()=>{e!==null&&clearTimeout(e),o!==void 0&&(o.disconnect!==void 0?o.disconnect():t&&o.unobserve(t))}),y}else{let a=function(){e!==null&&(clearTimeout(e),e=null),i!==void 0&&(i.removeEventListener!==void 0&&i.removeEventListener("resize",c,b.passive),i=void 0)},u=function(){a(),t&&t.contentDocument&&(i=t.contentDocument.defaultView,i.addEventListener("resize",c,b.passive),l())};const o=M();let i;return v(()=>{z(()=>{t=d.$el,t&&u()})}),m(a),d.trigger=c,()=>{if(o.value===!0)return D("object",{style:w.style,tabindex:-1,type:"text/html",data:w.url,"aria-hidden":"true",onLoad:u})}}}});export{V as Q,$ as a}; diff --git a/static/market/assets/index.ed8b8314.js b/static/market/assets/index.923cbbf9.js similarity index 99% rename from static/market/assets/index.ed8b8314.js rename to static/market/assets/index.923cbbf9.js index 866c353..8abf8c7 100644 --- a/static/market/assets/index.ed8b8314.js +++ b/static/market/assets/index.923cbbf9.js @@ -2,4 +2,4 @@ function Vr(e,t){const n=Object.create(null),o=e.split(",");for(let r=0;r{},rt=Array.isArray,vd=/\/$/,bd=e=>e.replace(vd,"");function rr(e,t,n="/"){let o,r={},i="",s="";const l=t.indexOf("#");let a=t.indexOf("?");return l=0&&(a=-1),a>-1&&(o=t.slice(0,a),i=t.slice(a+1,l>-1?l:t.length),r=e(i)),l>-1&&(o=o||t.slice(0,l),s=t.slice(l,t.length)),o=xd(o!=null?o:t,n),{fullPath:o+(i&&"?")+i+s,path:o,query:r,hash:s}}function yd(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function us(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function _d(e,t,n){const o=t.matched.length-1,r=n.matched.length-1;return o>-1&&o===r&&fn(t.matched[o],n.matched[r])&&pa(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function fn(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function pa(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!wd(e[n],t[n]))return!1;return!0}function wd(e,t){return rt(e)?cs(e,t):rt(t)?cs(t,e):e===t}function cs(e,t){return rt(t)?e.length===t.length&&e.every((n,o)=>n===t[o]):e.length===1&&e[0]===t}function xd(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),o=e.split("/"),r=o[o.length-1];(r===".."||r===".")&&o.push("");let i=n.length-1,s,l;for(s=0;s1&&i--;else break;return n.slice(0,i).join("/")+"/"+o.slice(s-(s===o.length?1:0)).join("/")}var Kn;(function(e){e.pop="pop",e.push="push"})(Kn||(Kn={}));var Bn;(function(e){e.back="back",e.forward="forward",e.unknown=""})(Bn||(Bn={}));function Cd(e){if(!e)if(en){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),bd(e)}const kd=/^[^#]+#/;function Ed(e,t){return e.replace(kd,"#")+t}function Sd(e,t){const n=document.documentElement.getBoundingClientRect(),o=e.getBoundingClientRect();return{behavior:t.behavior,left:o.left-n.left-(t.left||0),top:o.top-n.top-(t.top||0)}}const zo=()=>({left:window.pageXOffset,top:window.pageYOffset});function Rd(e){let t;if("el"in e){const n=e.el,o=typeof n=="string"&&n.startsWith("#"),r=typeof n=="string"?o?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r)return;t=Sd(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.pageXOffset,t.top!=null?t.top:window.pageYOffset)}function fs(e,t){return(history.state?history.state.position-t:-1)+e}const Ar=new Map;function Pd(e,t){Ar.set(e,t)}function Td(e){const t=Ar.get(e);return Ar.delete(e),t}let qd=()=>location.protocol+"//"+location.host;function va(e,t){const{pathname:n,search:o,hash:r}=t,i=e.indexOf("#");if(i>-1){let l=r.includes(e.slice(i))?e.slice(i).length:1,a=r.slice(l);return a[0]!=="/"&&(a="/"+a),us(a,"")}return us(n,e)+o+r}function Ad(e,t,n,o){let r=[],i=[],s=null;const l=({state:f})=>{const p=va(e,location),y=n.value,T=t.value;let q=0;if(f){if(n.value=p,t.value=f,s&&s===y){s=null;return}q=T?f.position-T.position:0}else o(p);r.forEach(M=>{M(n.value,y,{delta:q,type:Kn.pop,direction:q?q>0?Bn.forward:Bn.back:Bn.unknown})})};function a(){s=n.value}function c(f){r.push(f);const p=()=>{const y=r.indexOf(f);y>-1&&r.splice(y,1)};return i.push(p),p}function u(){const{history:f}=window;!f.state||f.replaceState(ge({},f.state,{scroll:zo()}),"")}function d(){for(const f of i)f();i=[],window.removeEventListener("popstate",l),window.removeEventListener("beforeunload",u)}return window.addEventListener("popstate",l),window.addEventListener("beforeunload",u,{passive:!0}),{pauseListeners:a,listen:c,destroy:d}}function ds(e,t,n,o=!1,r=!1){return{back:e,current:t,forward:n,replaced:o,position:window.history.length,scroll:r?zo():null}}function Md(e){const{history:t,location:n}=window,o={value:va(e,n)},r={value:t.state};r.value||i(o.value,{back:null,current:o.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function i(a,c,u){const d=e.indexOf("#"),f=d>-1?(n.host&&document.querySelector("base")?e:e.slice(d))+a:qd()+e+a;try{t[u?"replaceState":"pushState"](c,"",f),r.value=c}catch(p){console.error(p),n[u?"replace":"assign"](f)}}function s(a,c){const u=ge({},t.state,ds(r.value.back,a,r.value.forward,!0),c,{position:r.value.position});i(a,u,!0),o.value=a}function l(a,c){const u=ge({},r.value,t.state,{forward:a,scroll:zo()});i(u.current,u,!0);const d=ge({},ds(o.value,a,null),{position:u.position+1},c);i(a,d,!1),o.value=a}return{location:o,state:r,push:l,replace:s}}function Od(e){e=Cd(e);const t=Md(e),n=Ad(e,t.state,t.location,t.replace);function o(i,s=!0){s||n.pauseListeners(),history.go(i)}const r=ge({location:"",base:e,go:o,createHref:Ed.bind(null,e)},t,n);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>t.state.value}),r}function $d(e){return e=location.host?e||location.pathname+location.search:"",e.includes("#")||(e+="#"),Od(e)}function Ld(e){return typeof e=="string"||e&&typeof e=="object"}function ba(e){return typeof e=="string"||typeof e=="symbol"}const _t={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},ya=Symbol("");var hs;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(hs||(hs={}));function dn(e,t){return ge(new Error,{type:e,[ya]:!0},t)}function ft(e,t){return e instanceof Error&&ya in e&&(t==null||!!(e.type&t))}const gs="[^/]+?",Bd={sensitive:!1,strict:!1,start:!0,end:!0},Fd=/[.+*?^${}()[\]/\\]/g;function Id(e,t){const n=ge({},Bd,t),o=[];let r=n.start?"^":"";const i=[];for(const c of e){const u=c.length?[]:[90];n.strict&&!c.length&&(r+="/");for(let d=0;dt.length?t.length===1&&t[0]===40+40?1:-1:0}function jd(e,t){let n=0;const o=e.score,r=t.score;for(;n0&&t[t.length-1]<0}const Vd={type:0,value:""},Dd=/[a-zA-Z0-9_]/;function Hd(e){if(!e)return[[]];if(e==="/")return[[Vd]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(p){throw new Error(`ERR (${n})/"${c}": ${p}`)}let n=0,o=n;const r=[];let i;function s(){i&&r.push(i),i=[]}let l=0,a,c="",u="";function d(){!c||(n===0?i.push({type:0,value:c}):n===1||n===2||n===3?(i.length>1&&(a==="*"||a==="+")&&t(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),i.push({type:1,value:c,regexp:u,repeatable:a==="*"||a==="+",optional:a==="*"||a==="?"})):t("Invalid state to consume buffer"),c="")}function f(){c+=a}for(;l{s(m)}:Ln}function s(u){if(ba(u)){const d=o.get(u);d&&(o.delete(u),n.splice(n.indexOf(d),1),d.children.forEach(s),d.alias.forEach(s))}else{const d=n.indexOf(u);d>-1&&(n.splice(d,1),u.record.name&&o.delete(u.record.name),u.children.forEach(s),u.alias.forEach(s))}}function l(){return n}function a(u){let d=0;for(;d=0&&(u.record.path!==n[d].record.path||!_a(u,n[d]));)d++;n.splice(d,0,u),u.record.name&&!vs(u)&&o.set(u.record.name,u)}function c(u,d){let f,p={},y,T;if("name"in u&&u.name){if(f=o.get(u.name),!f)throw dn(1,{location:u});T=f.record.name,p=ge(ps(d.params,f.keys.filter(m=>!m.optional).map(m=>m.name)),u.params&&ps(u.params,f.keys.map(m=>m.name))),y=f.stringify(p)}else if("path"in u)y=u.path,f=n.find(m=>m.re.test(y)),f&&(p=f.parse(y),T=f.record.name);else{if(f=d.name?o.get(d.name):n.find(m=>m.re.test(d.path)),!f)throw dn(1,{location:u,currentLocation:d});T=f.record.name,p=ge({},d.params,u.params),y=f.stringify(p)}const q=[];let M=f;for(;M;)q.unshift(M.record),M=M.parent;return{name:T,path:y,params:p,matched:q,meta:Qd(q)}}return e.forEach(u=>i(u)),{addRoute:i,resolve:c,removeRoute:s,getRoutes:l,getRecordMatcher:r}}function ps(e,t){const n={};for(const o of t)o in e&&(n[o]=e[o]);return n}function Ud(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:Wd(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}}}function Wd(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const o in e.components)t[o]=typeof n=="object"?n[o]:n;return t}function vs(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Qd(e){return e.reduce((t,n)=>ge(t,n.meta),{})}function bs(e,t){const n={};for(const o in e)n[o]=o in t?t[o]:e[o];return n}function _a(e,t){return t.children.some(n=>n===e||_a(e,n))}const wa=/#/g,Yd=/&/g,Zd=/\//g,Jd=/=/g,Xd=/\?/g,xa=/\+/g,Gd=/%5B/g,eh=/%5D/g,Ca=/%5E/g,th=/%60/g,ka=/%7B/g,nh=/%7C/g,Ea=/%7D/g,oh=/%20/g;function fi(e){return encodeURI(""+e).replace(nh,"|").replace(Gd,"[").replace(eh,"]")}function rh(e){return fi(e).replace(ka,"{").replace(Ea,"}").replace(Ca,"^")}function Mr(e){return fi(e).replace(xa,"%2B").replace(oh,"+").replace(wa,"%23").replace(Yd,"%26").replace(th,"`").replace(ka,"{").replace(Ea,"}").replace(Ca,"^")}function ih(e){return Mr(e).replace(Jd,"%3D")}function sh(e){return fi(e).replace(wa,"%23").replace(Xd,"%3F")}function lh(e){return e==null?"":sh(e).replace(Zd,"%2F")}function Ro(e){try{return decodeURIComponent(""+e)}catch{}return""+e}function ah(e){const t={};if(e===""||e==="?")return t;const o=(e[0]==="?"?e.slice(1):e).split("&");for(let r=0;ri&&Mr(i)):[o&&Mr(o)]).forEach(i=>{i!==void 0&&(t+=(t.length?"&":"")+n,i!=null&&(t+="="+i))})}return t}function uh(e){const t={};for(const n in e){const o=e[n];o!==void 0&&(t[n]=rt(o)?o.map(r=>r==null?null:""+r):o==null?o:""+o)}return t}const ch=Symbol(""),_s=Symbol(""),di=Symbol(""),Sa=Symbol(""),Or=Symbol("");function xn(){let e=[];function t(o){return e.push(o),()=>{const r=e.indexOf(o);r>-1&&e.splice(r,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function Ct(e,t,n,o,r){const i=o&&(o.enterCallbacks[r]=o.enterCallbacks[r]||[]);return()=>new Promise((s,l)=>{const a=d=>{d===!1?l(dn(4,{from:n,to:t})):d instanceof Error?l(d):Ld(d)?l(dn(2,{from:t,to:d})):(i&&o.enterCallbacks[r]===i&&typeof d=="function"&&i.push(d),s())},c=e.call(o&&o.instances[r],t,n,a);let u=Promise.resolve(c);e.length<3&&(u=u.then(a)),u.catch(d=>l(d))})}function ir(e,t,n,o){const r=[];for(const i of e)for(const s in i.components){let l=i.components[s];if(!(t!=="beforeRouteEnter"&&!i.instances[s]))if(fh(l)){const c=(l.__vccOpts||l)[t];c&&r.push(Ct(c,n,o,i,s))}else{let a=l();r.push(()=>a.then(c=>{if(!c)return Promise.reject(new Error(`Couldn't resolve component "${s}" at "${i.path}"`));const u=pd(c)?c.default:c;i.components[s]=u;const f=(u.__vccOpts||u)[t];return f&&Ct(f,n,o,i,s)()}))}}return r}function fh(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function ws(e){const t=ut(di),n=ut(Sa),o=R(()=>t.resolve(Vt(e.to))),r=R(()=>{const{matched:a}=o.value,{length:c}=a,u=a[c-1],d=n.matched;if(!u||!d.length)return-1;const f=d.findIndex(fn.bind(null,u));if(f>-1)return f;const p=xs(a[c-2]);return c>1&&xs(u)===p&&d[d.length-1].path!==p?d.findIndex(fn.bind(null,a[c-2])):f}),i=R(()=>r.value>-1&&mh(n.params,o.value.params)),s=R(()=>r.value>-1&&r.value===n.matched.length-1&&pa(n.params,o.value.params));function l(a={}){return gh(a)?t[Vt(e.replace)?"replace":"push"](Vt(e.to)).catch(Ln):Promise.resolve()}return{route:o,href:R(()=>o.value.href),isActive:i,isExactActive:s,navigate:l}}const dh=Lo({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:ws,setup(e,{slots:t}){const n=pn(ws(e)),{options:o}=ut(di),r=R(()=>({[Cs(e.activeClass,o.linkActiveClass,"router-link-active")]:n.isActive,[Cs(e.exactActiveClass,o.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const i=t.default&&t.default(n);return e.custom?i:E("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},i)}}}),hh=dh;function gh(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function mh(e,t){for(const n in t){const o=t[n],r=e[n];if(typeof o=="string"){if(o!==r)return!1}else if(!rt(r)||r.length!==o.length||o.some((i,s)=>i!==r[s]))return!1}return!0}function xs(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Cs=(e,t,n)=>e!=null?e:t!=null?t:n,ph=Lo({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const o=ut(Or),r=R(()=>e.route||o.value),i=ut(_s,0),s=R(()=>{let c=Vt(i);const{matched:u}=r.value;let d;for(;(d=u[c])&&!d.components;)c++;return c}),l=R(()=>r.value.matched[s.value]);fo(_s,R(()=>s.value+1)),fo(ch,l),fo(Or,r);const a=he();return be(()=>[a.value,l.value,e.name],([c,u,d],[f,p,y])=>{u&&(u.instances[d]=c,p&&p!==u&&c&&c===f&&(u.leaveGuards.size||(u.leaveGuards=p.leaveGuards),u.updateGuards.size||(u.updateGuards=p.updateGuards))),c&&u&&(!p||!fn(u,p)||!f)&&(u.enterCallbacks[d]||[]).forEach(T=>T(c))},{flush:"post"}),()=>{const c=r.value,u=e.name,d=l.value,f=d&&d.components[u];if(!f)return ks(n.default,{Component:f,route:c});const p=d.props[u],y=p?p===!0?c.params:typeof p=="function"?p(c):p:null,q=E(f,ge({},y,t,{onVnodeUnmounted:M=>{M.component.isUnmounted&&(d.instances[u]=null)},ref:a}));return ks(n.default,{Component:q,route:c})||q}}});function ks(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const vh=ph;function bh(e){const t=Kd(e.routes,e),n=e.parseQuery||ah,o=e.stringifyQuery||ys,r=e.history,i=xn(),s=xn(),l=xn(),a=Yu(_t);let c=_t;en&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=or.bind(null,S=>""+S),d=or.bind(null,lh),f=or.bind(null,Ro);function p(S,Q){let z,X;return ba(S)?(z=t.getRecordMatcher(S),X=Q):X=S,t.addRoute(X,z)}function y(S){const Q=t.getRecordMatcher(S);Q&&t.removeRoute(Q)}function T(){return t.getRoutes().map(S=>S.record)}function q(S){return!!t.getRecordMatcher(S)}function M(S,Q){if(Q=ge({},Q||a.value),typeof S=="string"){const b=rr(n,S,Q.path),P=t.resolve({path:b.path},Q),O=r.createHref(b.fullPath);return ge(b,P,{params:f(P.params),hash:Ro(b.hash),redirectedFrom:void 0,href:O})}let z;if("path"in S)z=ge({},S,{path:rr(n,S.path,Q.path).path});else{const b=ge({},S.params);for(const P in b)b[P]==null&&delete b[P];z=ge({},S,{params:d(b)}),Q.params=d(Q.params)}const X=t.resolve(z,Q),de=S.hash||"";X.params=u(f(X.params));const h=yd(o,ge({},S,{hash:rh(de),path:X.path})),g=r.createHref(h);return ge({fullPath:h,hash:de,query:o===ys?uh(S.query):S.query||{}},X,{redirectedFrom:void 0,href:g})}function m(S){return typeof S=="string"?rr(n,S,a.value.path):ge({},S)}function _(S,Q){if(c!==S)return dn(8,{from:Q,to:S})}function w(S){return V(S)}function F(S){return w(ge(m(S),{replace:!0}))}function j(S){const Q=S.matched[S.matched.length-1];if(Q&&Q.redirect){const{redirect:z}=Q;let X=typeof z=="function"?z(S):z;return typeof X=="string"&&(X=X.includes("?")||X.includes("#")?X=m(X):{path:X},X.params={}),ge({query:S.query,hash:S.hash,params:"path"in X?{}:S.params},X)}}function V(S,Q){const z=c=M(S),X=a.value,de=S.state,h=S.force,g=S.replace===!0,b=j(z);if(b)return V(ge(m(b),{state:typeof b=="object"?ge({},de,b.state):de,force:h,replace:g}),Q||z);const P=z;P.redirectedFrom=Q;let O;return!h&&_d(o,X,z)&&(O=dn(16,{to:P,from:X}),fe(X,X,!0,!1)),(O?Promise.resolve(O):x(P,X)).catch(B=>ft(B)?ft(B,2)?B:se(B):W(B,P,X)).then(B=>{if(B){if(ft(B,2))return V(ge({replace:g},m(B.to),{state:typeof B.to=="object"?ge({},de,B.to.state):de,force:h}),Q||P)}else B=v(P,X,!0,g,de);return $(P,X,B),B})}function N(S,Q){const z=_(S,Q);return z?Promise.reject(z):Promise.resolve()}function C(S){const Q=Re.values().next().value;return Q&&typeof Q.runWithContext=="function"?Q.runWithContext(S):S()}function x(S,Q){let z;const[X,de,h]=yh(S,Q);z=ir(X.reverse(),"beforeRouteLeave",S,Q);for(const b of X)b.leaveGuards.forEach(P=>{z.push(Ct(P,S,Q))});const g=N.bind(null,S,Q);return z.push(g),ne(z).then(()=>{z=[];for(const b of i.list())z.push(Ct(b,S,Q));return z.push(g),ne(z)}).then(()=>{z=ir(de,"beforeRouteUpdate",S,Q);for(const b of de)b.updateGuards.forEach(P=>{z.push(Ct(P,S,Q))});return z.push(g),ne(z)}).then(()=>{z=[];for(const b of h)if(b.beforeEnter)if(rt(b.beforeEnter))for(const P of b.beforeEnter)z.push(Ct(P,S,Q));else z.push(Ct(b.beforeEnter,S,Q));return z.push(g),ne(z)}).then(()=>(S.matched.forEach(b=>b.enterCallbacks={}),z=ir(h,"beforeRouteEnter",S,Q),z.push(g),ne(z))).then(()=>{z=[];for(const b of s.list())z.push(Ct(b,S,Q));return z.push(g),ne(z)}).catch(b=>ft(b,8)?b:Promise.reject(b))}function $(S,Q,z){l.list().forEach(X=>C(()=>X(S,Q,z)))}function v(S,Q,z,X,de){const h=_(S,Q);if(h)return h;const g=Q===_t,b=en?history.state:{};z&&(X||g?r.replace(S.fullPath,ge({scroll:g&&b&&b.scroll},de)):r.push(S.fullPath,de)),a.value=S,fe(S,Q,z,g),se()}let H;function k(){H||(H=r.listen((S,Q,z)=>{if(!oe.listening)return;const X=M(S),de=j(X);if(de){V(ge(de,{replace:!0}),X).catch(Ln);return}c=X;const h=a.value;en&&Pd(fs(h.fullPath,z.delta),zo()),x(X,h).catch(g=>ft(g,12)?g:ft(g,2)?(V(g.to,X).then(b=>{ft(b,20)&&!z.delta&&z.type===Kn.pop&&r.go(-1,!1)}).catch(Ln),Promise.reject()):(z.delta&&r.go(-z.delta,!1),W(g,X,h))).then(g=>{g=g||v(X,h,!1),g&&(z.delta&&!ft(g,8)?r.go(-z.delta,!1):z.type===Kn.pop&&ft(g,20)&&r.go(-1,!1)),$(X,h,g)}).catch(Ln)}))}let Z=xn(),Y=xn(),A;function W(S,Q,z){se(S);const X=Y.list();return X.length?X.forEach(de=>de(S,Q,z)):console.error(S),Promise.reject(S)}function _e(){return A&&a.value!==_t?Promise.resolve():new Promise((S,Q)=>{Z.add([S,Q])})}function se(S){return A||(A=!S,k(),Z.list().forEach(([Q,z])=>S?z(S):Q()),Z.reset()),S}function fe(S,Q,z,X){const{scrollBehavior:de}=e;if(!en||!de)return Promise.resolve();const h=!z&&Td(fs(S.fullPath,0))||(X||!z)&&history.state&&history.state.scroll||null;return je().then(()=>de(S,Q,h)).then(g=>g&&Rd(g)).catch(g=>W(g,S,Q))}const L=S=>r.go(S);let ue;const Re=new Set,oe={currentRoute:a,listening:!0,addRoute:p,removeRoute:y,hasRoute:q,getRoutes:T,resolve:M,options:e,push:w,replace:F,go:L,back:()=>L(-1),forward:()=>L(1),beforeEach:i.add,beforeResolve:s.add,afterEach:l.add,onError:Y.add,isReady:_e,install(S){const Q=this;S.component("RouterLink",hh),S.component("RouterView",vh),S.config.globalProperties.$router=Q,Object.defineProperty(S.config.globalProperties,"$route",{enumerable:!0,get:()=>Vt(a)}),en&&!ue&&a.value===_t&&(ue=!0,w(r.location).catch(de=>{}));const z={};for(const de in _t)Object.defineProperty(z,de,{get:()=>a.value[de],enumerable:!0});S.provide(di,Q),S.provide(Sa,ml(z)),S.provide(Or,a);const X=S.unmount;Re.add(S),S.unmount=function(){Re.delete(S),Re.size<1&&(c=_t,H&&H(),H=null,a.value=_t,ue=!1,A=!1),X()}}};function ne(S){return S.reduce((Q,z)=>Q.then(()=>C(z)),Promise.resolve())}return oe}function yh(e,t){const n=[],o=[],r=[],i=Math.max(t.matched.length,e.matched.length);for(let s=0;sfn(c,l))?o.push(l):n.push(l));const a=e.matched[s];a&&(t.matched.find(c=>fn(c,a))||r.push(a))}return[n,o,r]}const _h=function(){const t=document.createElement("link").relList;return t&&t.supports&&t.supports("modulepreload")?"modulepreload":"preload"}(),Es={},wh="/nostrmarket/static/market/",sr=function(t,n){return!n||n.length===0?t():Promise.all(n.map(o=>{if(o=`${wh}${o}`,o in Es)return;Es[o]=!0;const r=o.endsWith(".css"),i=r?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${o}"]${i}`))return;const s=document.createElement("link");if(s.rel=r?"stylesheet":_h,r||(s.as="script",s.crossOrigin=""),s.href=o,document.head.appendChild(s),r)return new Promise((l,a)=>{s.addEventListener("load",l),s.addEventListener("error",()=>a(new Error(`Unable to preload CSS for ${o}`)))})})).then(()=>t())},xh=[{path:"/",component:()=>sr(()=>import("./MainLayout.543449e8.js"),["assets/MainLayout.543449e8.js","assets/QResizeObserver.b282d5d7.js"]),children:[{path:"",component:()=>sr(()=>import("./MarketPage.bd1265a2.js"),["assets/MarketPage.bd1265a2.js","assets/QResizeObserver.b282d5d7.js"])}]},{path:"/:catchAll(.*)*",component:()=>sr(()=>import("./ErrorNotFound.c9327b8c.js"),[])}];var lr=function(){return bh({scrollBehavior:()=>({left:0,top:0}),routes:xh,history:$d("/nostrmarket/static/market/")})};async function Ch(e,t){const n=e(md);n.use(fd,t);const o=vn(typeof lr=="function"?await lr({}):lr);return{app:n,router:o}}const $r={xs:18,sm:24,md:32,lg:38,xl:46},Yn={size:String};function Zn(e,t=$r){return R(()=>e.size!==void 0?{fontSize:e.size in t?`${t[e.size]}px`:e.size}:null)}const $e=e=>vn(Lo(e)),kh=e=>vn(e);function tt(e,t){return e!==void 0&&e()||t}function $m(e,t){if(e!==void 0){const n=e();if(n!=null)return n.slice()}return t}function It(e,t){return e!==void 0?t.concat(e()):t}function Eh(e,t){return e===void 0?t:t!==void 0?t.concat(e()):e()}function Lm(e,t,n,o,r,i){t.key=o+r;const s=E(e,t,n);return r===!0?Al(s,i()):s}const Ss="0 0 24 24",Rs=e=>e,ar=e=>`ionicons ${e}`,Ra={"mdi-":e=>`mdi ${e}`,"icon-":Rs,"bt-":e=>`bt ${e}`,"eva-":e=>`eva ${e}`,"ion-md":ar,"ion-ios":ar,"ion-logo":ar,"iconfont ":Rs,"ti-":e=>`themify-icon ${e}`,"bi-":e=>`bootstrap-icons ${e}`},Pa={o_:"-outlined",r_:"-round",s_:"-sharp"},Ta={sym_o_:"-outlined",sym_r_:"-rounded",sym_s_:"-sharp"},Sh=new RegExp("^("+Object.keys(Ra).join("|")+")"),Rh=new RegExp("^("+Object.keys(Pa).join("|")+")"),Ps=new RegExp("^("+Object.keys(Ta).join("|")+")"),Ph=/^[Mm]\s?[-+]?\.?\d/,Th=/^img:/,qh=/^svguse:/,Ah=/^ion-/,Mh=/^(fa-(sharp|solid|regular|light|brands|duotone|thin)|[lf]a[srlbdk]?) /;var pt=$e({name:"QIcon",props:{...Yn,tag:{type:String,default:"i"},name:String,color:String,left:Boolean,right:Boolean},setup(e,{slots:t}){const{proxy:{$q:n}}=ke(),o=Zn(e),r=R(()=>"q-icon"+(e.left===!0?" on-left":"")+(e.right===!0?" on-right":"")+(e.color!==void 0?` text-${e.color}`:"")),i=R(()=>{let s,l=e.name;if(l==="none"||!l)return{none:!0};if(n.iconMapFn!==null){const u=n.iconMapFn(l);if(u!==void 0)if(u.icon!==void 0){if(l=u.icon,l==="none"||!l)return{none:!0}}else return{cls:u.cls,content:u.content!==void 0?u.content:" "}}if(Ph.test(l)===!0){const[u,d=Ss]=l.split("|");return{svg:!0,viewBox:d,nodes:u.split("&&").map(f=>{const[p,y,T]=f.split("@@");return E("path",{style:y,d:p,transform:T})})}}if(Th.test(l)===!0)return{img:!0,src:l.substring(4)};if(qh.test(l)===!0){const[u,d=Ss]=l.split("|");return{svguse:!0,src:u.substring(7),viewBox:d}}let a=" ";const c=l.match(Sh);if(c!==null)s=Ra[c[1]](l);else if(Mh.test(l)===!0)s=l;else if(Ah.test(l)===!0)s=`ionicons ion-${n.platform.is.ios===!0?"ios":"md"}${l.substring(3)}`;else if(Ps.test(l)===!0){s="notranslate material-symbols";const u=l.match(Ps);u!==null&&(l=l.substring(6),s+=Ta[u[1]]),a=l}else{s="notranslate material-icons";const u=l.match(Rh);u!==null&&(l=l.substring(2),s+=Pa[u[1]]),a=l}return{cls:s,content:a}});return()=>{const s={class:r.value,style:o.value,"aria-hidden":"true",role:"presentation"};return i.value.none===!0?E(e.tag,s,tt(t.default)):i.value.img===!0?E("span",s,It(t.default,[E("img",{src:i.value.src})])):i.value.svg===!0?E("span",s,It(t.default,[E("svg",{viewBox:i.value.viewBox||"0 0 24 24"},i.value.nodes)])):i.value.svguse===!0?E("span",s,It(t.default,[E("svg",{viewBox:i.value.viewBox},[E("use",{"xlink:href":i.value.src})])])):(i.value.cls!==void 0&&(s.class+=" "+i.value.cls),E(e.tag,s,It(t.default,[i.value.content])))}}}),Oh=$e({name:"QAvatar",props:{...Yn,fontSize:String,color:String,textColor:String,icon:String,square:Boolean,rounded:Boolean},setup(e,{slots:t}){const n=Zn(e),o=R(()=>"q-avatar"+(e.color?` bg-${e.color}`:"")+(e.textColor?` text-${e.textColor} q-chip--colored`:"")+(e.square===!0?" q-avatar--square":e.rounded===!0?" rounded-borders":"")),r=R(()=>e.fontSize?{fontSize:e.fontSize}:null);return()=>{const i=e.icon!==void 0?[E(pt,{name:e.icon})]:void 0;return E("div",{class:o.value,style:n.value},[E("div",{class:"q-avatar__content row flex-center overflow-hidden",style:r.value},Eh(t.default,i))])}}});const $h={size:{type:[Number,String],default:"1em"},color:String};function Lh(e){return{cSize:R(()=>e.size in $r?`${$r[e.size]}px`:e.size),classes:R(()=>"q-spinner"+(e.color?` text-${e.color}`:""))}}var Un=$e({name:"QSpinner",props:{...$h,thickness:{type:Number,default:5}},setup(e){const{cSize:t,classes:n}=Lh(e);return()=>E("svg",{class:n.value+" q-spinner-mat",width:t.value,height:t.value,viewBox:"25 25 50 50"},[E("circle",{class:"path",cx:"50",cy:"50",r:"20",fill:"none",stroke:"currentColor","stroke-width":e.thickness,"stroke-miterlimit":"10"})])}});function Bm(e){return e===window?window.innerHeight:e.getBoundingClientRect().height}function Lr(e,t){const n=e.style;for(const o in t)n[o]=t[o]}function Bh(e){if(e==null)return;if(typeof e=="string")try{return document.querySelector(e)||void 0}catch{return}const t=Vt(e);if(t)return t.$el||t}function Fh(e,t){if(e==null||e.contains(t)===!0)return!0;for(let n=e.nextElementSibling;n!==null;n=n.nextElementSibling)if(n.contains(t))return!0;return!1}function Ih(e,t=250){let n=!1,o;return function(){return n===!1&&(n=!0,setTimeout(()=>{n=!1},t),o=e.apply(this,arguments)),o}}function Ts(e,t,n,o){n.modifiers.stop===!0&&ko(e);const r=n.modifiers.color;let i=n.modifiers.center;i=i===!0||o===!0;const s=document.createElement("span"),l=document.createElement("span"),a=Hf(e),{left:c,top:u,width:d,height:f}=t.getBoundingClientRect(),p=Math.sqrt(d*d+f*f),y=p/2,T=`${(d-p)/2}px`,q=i?T:`${a.left-c-y}px`,M=`${(f-p)/2}px`,m=i?M:`${a.top-u-y}px`;l.className="q-ripple__inner",Lr(l,{height:`${p}px`,width:`${p}px`,transform:`translate3d(${q},${m},0) scale3d(.2,.2,1)`,opacity:0}),s.className=`q-ripple${r?" text-"+r:""}`,s.setAttribute("dir","ltr"),s.appendChild(l),t.appendChild(s);const _=()=>{s.remove(),clearTimeout(w)};n.abort.push(_);let w=setTimeout(()=>{l.classList.add("q-ripple__inner--enter"),l.style.transform=`translate3d(${T},${M},0) scale3d(1,1,1)`,l.style.opacity=.2,w=setTimeout(()=>{l.classList.remove("q-ripple__inner--enter"),l.classList.add("q-ripple__inner--leave"),l.style.opacity=0,w=setTimeout(()=>{s.remove(),n.abort.splice(n.abort.indexOf(_),1)},275)},250)},50)}function qs(e,{modifiers:t,value:n,arg:o}){const r=Object.assign({},e.cfg.ripple,t,n);e.modifiers={early:r.early===!0,stop:r.stop===!0,center:r.center===!0,color:r.color||o,keyCodes:[].concat(r.keyCodes||13)}}var Nh=kh({name:"ripple",beforeMount(e,t){const n=t.instance.$.appContext.config.globalProperties.$q.config||{};if(n.ripple===!1)return;const o={cfg:n,enabled:t.value!==!1,modifiers:{},abort:[],start(r){o.enabled===!0&&r.qSkipRipple!==!0&&r.type===(o.modifiers.early===!0?"pointerdown":"click")&&Ts(r,e,o,r.qKeyEvent===!0)},keystart:Ih(r=>{o.enabled===!0&&r.qSkipRipple!==!0&&zn(r,o.modifiers.keyCodes)===!0&&r.type===`key${o.modifiers.early===!0?"down":"up"}`&&Ts(r,e,o,!0)},300)};qs(o,t),e.__qripple=o,Kf(o,"main",[[e,"pointerdown","start","passive"],[e,"click","start","passive"],[e,"keydown","keystart","passive"],[e,"keyup","keystart","passive"]])},updated(e,t){if(t.oldValue!==t.value){const n=e.__qripple;n!==void 0&&(n.enabled=t.value!==!1,n.enabled===!0&&Object(t.value)===t.value&&qs(n,t))}},beforeUnmount(e){const t=e.__qripple;t!==void 0&&(t.abort.forEach(n=>{n()}),Uf(t,"main"),delete e._qripple)}});const qa={left:"start",center:"center",right:"end",between:"between",around:"around",evenly:"evenly",stretch:"stretch"},jh=Object.keys(qa),Aa={align:{type:String,validator:e=>jh.includes(e)}};function Ma(e){return R(()=>{const t=e.align===void 0?e.vertical===!0?"stretch":"left":e.align;return`${e.vertical===!0?"items":"justify"}-${qa[t]}`})}function go(e){if(Object(e.$parent)===e.$parent)return e.$parent;let{parent:t}=e.$;for(;Object(t)===t;){if(Object(t.proxy)===t.proxy)return t.proxy;t=t.parent}}function Oa(e,t){typeof t.type=="symbol"?Array.isArray(t.children)===!0&&t.children.forEach(n=>{Oa(e,n)}):e.add(t)}function Fm(e){const t=new Set;return e.forEach(n=>{Oa(t,n)}),Array.from(t)}function $a(e){return e.appContext.config.globalProperties.$router!==void 0}function La(e){return e.isUnmounted===!0||e.isDeactivated===!0}function As(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}function Ms(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Vh(e,t){for(const n in t){const o=t[n],r=e[n];if(typeof o=="string"){if(o!==r)return!1}else if(Array.isArray(r)===!1||r.length!==o.length||o.some((i,s)=>i!==r[s]))return!1}return!0}function Os(e,t){return Array.isArray(t)===!0?e.length===t.length&&e.every((n,o)=>n===t[o]):e.length===1&&e[0]===t}function Dh(e,t){return Array.isArray(e)===!0?Os(e,t):Array.isArray(t)===!0?Os(t,e):e===t}function Hh(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(Dh(e[n],t[n])===!1)return!1;return!0}const zh={to:[String,Object],replace:Boolean,exact:Boolean,activeClass:{type:String,default:"q-router-link--active"},exactActiveClass:{type:String,default:"q-router-link--exact-active"},href:String,target:String,disable:Boolean};function Kh({fallbackTag:e,useDisableForRouterLinkProps:t=!0}={}){const n=ke(),{props:o,proxy:r,emit:i}=n,s=$a(n),l=R(()=>o.disable!==!0&&o.href!==void 0),a=R(t===!0?()=>s===!0&&o.disable!==!0&&l.value!==!0&&o.to!==void 0&&o.to!==null&&o.to!=="":()=>s===!0&&l.value!==!0&&o.to!==void 0&&o.to!==null&&o.to!==""),c=R(()=>a.value===!0?m(o.to):null),u=R(()=>c.value!==null),d=R(()=>l.value===!0||u.value===!0),f=R(()=>o.type==="a"||d.value===!0?"a":o.tag||e||"div"),p=R(()=>l.value===!0?{href:o.href,target:o.target}:u.value===!0?{href:c.value.href,target:o.target}:{}),y=R(()=>{if(u.value===!1)return-1;const{matched:F}=c.value,{length:j}=F,V=F[j-1];if(V===void 0)return-1;const N=r.$route.matched;if(N.length===0)return-1;const C=N.findIndex(Ms.bind(null,V));if(C>-1)return C;const x=As(F[j-2]);return j>1&&As(V)===x&&N[N.length-1].path!==x?N.findIndex(Ms.bind(null,F[j-2])):C}),T=R(()=>u.value===!0&&y.value!==-1&&Vh(r.$route.params,c.value.params)),q=R(()=>T.value===!0&&y.value===r.$route.matched.length-1&&Hh(r.$route.params,c.value.params)),M=R(()=>u.value===!0?q.value===!0?` ${o.exactActiveClass} ${o.activeClass}`:o.exact===!0?"":T.value===!0?` ${o.activeClass}`:"":"");function m(F){try{return r.$router.resolve(F)}catch{}return null}function _(F,{returnRouterError:j,to:V=o.to,replace:N=o.replace}={}){if(o.disable===!0)return F.preventDefault(),Promise.resolve(!1);if(F.metaKey||F.altKey||F.ctrlKey||F.shiftKey||F.button!==void 0&&F.button!==0||o.target==="_blank")return Promise.resolve(!1);F.preventDefault();const C=r.$router[N===!0?"replace":"push"](V);return j===!0?C:C.then(()=>{}).catch(()=>{})}function w(F){if(u.value===!0){const j=V=>_(F,V);i("click",F,j),F.defaultPrevented!==!0&&j()}else i("click",F)}return{hasRouterLink:u,hasHrefLink:l,hasLink:d,linkTag:f,resolvedLink:c,linkIsActive:T,linkIsExactActive:q,linkClass:M,linkAttrs:p,getLink:m,navigateToRouterLink:_,navigateOnClick:w}}const $s={none:0,xs:4,sm:8,md:16,lg:24,xl:32},Uh={xs:8,sm:10,md:14,lg:20,xl:24},Wh=["button","submit","reset"],Qh=/[^\s]\/[^\s]/,Yh=["flat","outline","push","unelevated"],Ba=(e,t)=>e.flat===!0?"flat":e.outline===!0?"outline":e.push===!0?"push":e.unelevated===!0?"unelevated":t,Im=e=>{const t=Ba(e);return t!==void 0?{[t]:!0}:{}},Zh={...Yn,...zh,type:{type:String,default:"button"},label:[Number,String],icon:String,iconRight:String,...Yh.reduce((e,t)=>(e[t]=Boolean)&&e,{}),square:Boolean,round:Boolean,rounded:Boolean,glossy:Boolean,size:String,fab:Boolean,fabMini:Boolean,padding:String,color:String,textColor:String,noCaps:Boolean,noWrap:Boolean,dense:Boolean,tabindex:[Number,String],ripple:{type:[Boolean,Object],default:!0},align:{...Aa.align,default:"center"},stack:Boolean,stretch:Boolean,loading:{type:Boolean,default:null},disable:Boolean};function Jh(e){const t=Zn(e,Uh),n=Ma(e),{hasRouterLink:o,hasLink:r,linkTag:i,linkAttrs:s,navigateOnClick:l}=Kh({fallbackTag:"button"}),a=R(()=>{const q=e.fab===!1&&e.fabMini===!1?t.value:{};return e.padding!==void 0?Object.assign({},q,{padding:e.padding.split(/\s+/).map(M=>M in $s?$s[M]+"px":M).join(" "),minWidth:"0",minHeight:"0"}):q}),c=R(()=>e.rounded===!0||e.fab===!0||e.fabMini===!0),u=R(()=>e.disable!==!0&&e.loading!==!0),d=R(()=>u.value===!0?e.tabindex||0:-1),f=R(()=>Ba(e,"standard")),p=R(()=>{const q={tabindex:d.value};return r.value===!0?Object.assign(q,s.value):Wh.includes(e.type)===!0&&(q.type=e.type),i.value==="a"?(e.disable===!0?q["aria-disabled"]="true":q.href===void 0&&(q.role="button"),o.value!==!0&&Qh.test(e.type)===!0&&(q.type=e.type)):e.disable===!0&&(q.disabled="",q["aria-disabled"]="true"),e.loading===!0&&e.percentage!==void 0&&Object.assign(q,{role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":e.percentage}),q}),y=R(()=>{let q;e.color!==void 0?e.flat===!0||e.outline===!0?q=`text-${e.textColor||e.color}`:q=`bg-${e.color} text-${e.textColor||"white"}`:e.textColor&&(q=`text-${e.textColor}`);const M=e.round===!0?"round":`rectangle${c.value===!0?" q-btn--rounded":e.square===!0?" q-btn--square":""}`;return`q-btn--${f.value} q-btn--${M}`+(q!==void 0?" "+q:"")+(u.value===!0?" q-btn--actionable q-focusable q-hoverable":e.disable===!0?" disabled":"")+(e.fab===!0?" q-btn--fab":e.fabMini===!0?" q-btn--fab-mini":"")+(e.noCaps===!0?" q-btn--no-uppercase":"")+(e.dense===!0?" q-btn--dense":"")+(e.stretch===!0?" no-border-radius self-stretch":"")+(e.glossy===!0?" glossy":"")+(e.square?" q-btn--square":"")}),T=R(()=>n.value+(e.stack===!0?" column":" row")+(e.noWrap===!0?" no-wrap text-no-wrap":"")+(e.loading===!0?" q-btn__content--hidden":""));return{classes:y,style:a,innerClasses:T,attributes:p,hasLink:r,linkTag:i,navigateOnClick:l,isActionable:u}}const{passiveCapture:He}=Be;let Jt=null,Xt=null,Gt=null;var Br=$e({name:"QBtn",props:{...Zh,percentage:Number,darkPercentage:Boolean,onTouchstart:[Function,Array]},emits:["click","keydown","mousedown","keyup"],setup(e,{slots:t,emit:n}){const{proxy:o}=ke(),{classes:r,style:i,innerClasses:s,attributes:l,hasLink:a,linkTag:c,navigateOnClick:u,isActionable:d}=Jh(e),f=he(null),p=he(null);let y=null,T,q=null;const M=R(()=>e.label!==void 0&&e.label!==null&&e.label!==""),m=R(()=>e.disable===!0||e.ripple===!1?!1:{keyCodes:a.value===!0?[13,32]:[13],...e.ripple===!0?{}:e.ripple}),_=R(()=>({center:e.round})),w=R(()=>{const k=Math.max(0,Math.min(100,e.percentage));return k>0?{transition:"transform 0.6s",transform:`translateX(${k-100}%)`}:{}}),F=R(()=>{if(e.loading===!0)return{onMousedown:H,onTouchstart:H,onClick:H,onKeydown:H,onKeyup:H};if(d.value===!0){const k={onClick:V,onKeydown:N,onMousedown:x};if(o.$q.platform.has.touch===!0){const Z=e.onTouchstart!==void 0?"":"Passive";k[`onTouchstart${Z}`]=C}return k}return{onClick:Ke}}),j=R(()=>({ref:f,class:"q-btn q-btn-item non-selectable no-outline "+r.value,style:i.value,...l.value,...F.value}));function V(k){if(f.value!==null){if(k!==void 0){if(k.defaultPrevented===!0)return;const Z=document.activeElement;if(e.type==="submit"&&Z!==document.body&&f.value.contains(Z)===!1&&Z.contains(f.value)===!1){f.value.focus();const Y=()=>{document.removeEventListener("keydown",Ke,!0),document.removeEventListener("keyup",Y,He),f.value!==null&&f.value.removeEventListener("blur",Y,He)};document.addEventListener("keydown",Ke,!0),document.addEventListener("keyup",Y,He),f.value.addEventListener("blur",Y,He)}}u(k)}}function N(k){f.value!==null&&(n("keydown",k),zn(k,[13,32])===!0&&Xt!==f.value&&(Xt!==null&&v(),k.defaultPrevented!==!0&&(f.value.focus(),Xt=f.value,f.value.classList.add("q-btn--active"),document.addEventListener("keyup",$,!0),f.value.addEventListener("blur",$,He)),Ke(k)))}function C(k){f.value!==null&&(n("touchstart",k),k.defaultPrevented!==!0&&(Jt!==f.value&&(Jt!==null&&v(),Jt=f.value,y=k.target,y.addEventListener("touchcancel",$,He),y.addEventListener("touchend",$,He)),T=!0,q!==null&&clearTimeout(q),q=setTimeout(()=>{q=null,T=!1},200)))}function x(k){f.value!==null&&(k.qSkipRipple=T===!0,n("mousedown",k),k.defaultPrevented!==!0&&Gt!==f.value&&(Gt!==null&&v(),Gt=f.value,f.value.classList.add("q-btn--active"),document.addEventListener("mouseup",$,He)))}function $(k){if(f.value!==null&&!(k!==void 0&&k.type==="blur"&&document.activeElement===f.value)){if(k!==void 0&&k.type==="keyup"){if(Xt===f.value&&zn(k,[13,32])===!0){const Z=new MouseEvent("click",k);Z.qKeyEvent=!0,k.defaultPrevented===!0&&Et(Z),k.cancelBubble===!0&&ko(Z),f.value.dispatchEvent(Z),Ke(k),k.qKeyEvent=!0}n("keyup",k)}v()}}function v(k){const Z=p.value;k!==!0&&(Jt===f.value||Gt===f.value)&&Z!==null&&Z!==document.activeElement&&(Z.setAttribute("tabindex",-1),Z.focus()),Jt===f.value&&(y!==null&&(y.removeEventListener("touchcancel",$,He),y.removeEventListener("touchend",$,He)),Jt=y=null),Gt===f.value&&(document.removeEventListener("mouseup",$,He),Gt=null),Xt===f.value&&(document.removeEventListener("keyup",$,!0),f.value!==null&&f.value.removeEventListener("blur",$,He),Xt=null),f.value!==null&&f.value.classList.remove("q-btn--active")}function H(k){Ke(k),k.qSkipRipple=!0}return We(()=>{v(!0)}),Object.assign(o,{click:V}),()=>{let k=[];e.icon!==void 0&&k.push(E(pt,{name:e.icon,left:e.stack===!1&&M.value===!0,role:"img","aria-hidden":"true"})),M.value===!0&&k.push(E("span",{class:"block"},[e.label])),k=It(t.default,k),e.iconRight!==void 0&&e.round===!1&&k.push(E(pt,{name:e.iconRight,right:e.stack===!1&&M.value===!0,role:"img","aria-hidden":"true"}));const Z=[E("span",{class:"q-focus-helper",ref:p})];return e.loading===!0&&e.percentage!==void 0&&Z.push(E("span",{class:"q-btn__progress absolute-full overflow-hidden"+(e.darkPercentage===!0?" q-btn__progress--dark":"")},[E("span",{class:"q-btn__progress-indicator fit block",style:w.value})])),Z.push(E("span",{class:"q-btn__content text-center col items-center q-anchor--skip "+s.value},k)),e.loading!==null&&Z.push(E(cn,{name:"q-transition--fade"},()=>e.loading===!0?[E("span",{key:"loading",class:"absolute-full flex flex-center"},t.loading!==void 0?t.loading():[E(Un)])]:null)),Al(E(c.value,j.value,Z),[[Nh,m.value,void 0,_.value]])}}});let Xh=1,Gh=document.body;function hi(e,t){const n=document.createElement("div");if(n.id=t!==void 0?`q-portal--${t}--${Xh++}`:e,So.globalNodes!==void 0){const o=So.globalNodes.class;o!==void 0&&(n.className=o)}return Gh.appendChild(n),n}function Fa(e){e.remove()}let eg=0;const mo={},po={},Je={},Ia={},tg=/^\s*$/,Na=[],gi=["top-left","top-right","bottom-left","bottom-right","top","bottom","left","right","center"],ng=["top-left","top-right","bottom-left","bottom-right"],tn={positive:{icon:e=>e.iconSet.type.positive,color:"positive"},negative:{icon:e=>e.iconSet.type.negative,color:"negative"},warning:{icon:e=>e.iconSet.type.warning,color:"warning",textColor:"dark"},info:{icon:e=>e.iconSet.type.info,color:"info"},ongoing:{group:!1,timeout:0,spinner:!0,color:"grey-8"}};function ja(e,t,n){if(!e)return Cn("parameter required");let o;const r={textColor:"white"};if(e.ignoreDefaults!==!0&&Object.assign(r,mo),at(e)===!1&&(r.type&&Object.assign(r,tn[r.type]),e={message:e}),Object.assign(r,tn[e.type||r.type],e),typeof r.icon=="function"&&(r.icon=r.icon(t)),r.spinner?(r.spinner===!0&&(r.spinner=Un),r.spinner=vn(r.spinner)):r.spinner=!1,r.meta={hasMedia:Boolean(r.spinner!==!1||r.icon||r.avatar),hasText:Ls(r.message)||Ls(r.caption)},r.position){if(gi.includes(r.position)===!1)return Cn("wrong position",e)}else r.position="bottom";if(r.timeout===void 0)r.timeout=5e3;else{const a=parseInt(r.timeout,10);if(isNaN(a)||a<0)return Cn("wrong timeout",e);r.timeout=a}r.timeout===0?r.progress=!1:r.progress===!0&&(r.meta.progressClass="q-notification__progress"+(r.progressClass?` ${r.progressClass}`:""),r.meta.progressStyle={animationDuration:`${r.timeout+1e3}ms`});const i=(Array.isArray(e.actions)===!0?e.actions:[]).concat(e.ignoreDefaults!==!0&&Array.isArray(mo.actions)===!0?mo.actions:[]).concat(tn[e.type]!==void 0&&Array.isArray(tn[e.type].actions)===!0?tn[e.type].actions:[]),{closeBtn:s}=r;if(s&&i.push({label:typeof s=="string"?s:t.lang.label.close}),r.actions=i.map(({handler:a,noDismiss:c,...u})=>({flat:!0,...u,onClick:typeof a=="function"?()=>{a(),c!==!0&&l()}:()=>{l()}})),r.multiLine===void 0&&(r.multiLine=r.actions.length>1),Object.assign(r.meta,{class:`q-notification row items-stretch q-notification--${r.multiLine===!0?"multi-line":"standard"}`+(r.color!==void 0?` bg-${r.color}`:"")+(r.textColor!==void 0?` text-${r.textColor}`:"")+(r.classes!==void 0?` ${r.classes}`:""),wrapperClass:"q-notification__wrapper col relative-position border-radius-inherit "+(r.multiLine===!0?"column no-wrap justify-center":"row items-center"),contentClass:"q-notification__content row items-center"+(r.multiLine===!0?"":" col"),leftClass:r.meta.hasText===!0?"additional":"single",attrs:{role:"alert",...r.attrs}}),r.group===!1?(r.group=void 0,r.meta.group=void 0):((r.group===void 0||r.group===!0)&&(r.group=[r.message,r.caption,r.multiline].concat(r.actions.map(a=>`${a.label}*${a.icon}`)).join("|")),r.meta.group=r.group+"|"+r.position),r.actions.length===0?r.actions=void 0:r.meta.actionsClass="q-notification__actions row items-center "+(r.multiLine===!0?"justify-end":"col-auto")+(r.meta.hasMedia===!0?" q-notification__actions--with-media":""),n!==void 0){n.notif.meta.timer&&(clearTimeout(n.notif.meta.timer),n.notif.meta.timer=void 0),r.meta.uid=n.notif.meta.uid;const a=Je[r.position].value.indexOf(n.notif);Je[r.position].value[a]=r}else{const a=po[r.meta.group];if(a===void 0){if(r.meta.uid=eg++,r.meta.badge=1,["left","right","center"].indexOf(r.position)!==-1)Je[r.position].value.splice(Math.floor(Je[r.position].value.length/2),0,r);else{const c=r.position.indexOf("top")>-1?"unshift":"push";Je[r.position].value[c](r)}r.group!==void 0&&(po[r.meta.group]=r)}else{if(a.meta.timer&&(clearTimeout(a.meta.timer),a.meta.timer=void 0),r.badgePosition!==void 0){if(ng.includes(r.badgePosition)===!1)return Cn("wrong badgePosition",e)}else r.badgePosition=`top-${r.position.indexOf("left")>-1?"right":"left"}`;r.meta.uid=a.meta.uid,r.meta.badge=a.meta.badge+1,r.meta.badgeClass=`q-notification__badge q-notification__badge--${r.badgePosition}`+(r.badgeColor!==void 0?` bg-${r.badgeColor}`:"")+(r.badgeTextColor!==void 0?` text-${r.badgeTextColor}`:"")+(r.badgeClass?` ${r.badgeClass}`:"");const c=Je[r.position].value.indexOf(a);Je[r.position].value[c]=po[r.meta.group]=r}}const l=()=>{og(r),o=void 0};if(r.timeout>0&&(r.meta.timer=setTimeout(()=>{r.meta.timer=void 0,l()},r.timeout+1e3)),r.group!==void 0)return a=>{a!==void 0?Cn("trying to update a grouped one which is forbidden",e):l()};if(o={dismiss:l,config:e,notif:r},n!==void 0){Object.assign(n,o);return}return a=>{if(o!==void 0)if(a===void 0)o.dismiss();else{const c=Object.assign({},o.config,a,{group:!1,position:r.position});ja(c,t,o)}}}function og(e){e.meta.timer&&(clearTimeout(e.meta.timer),e.meta.timer=void 0);const t=Je[e.position].value.indexOf(e);if(t!==-1){e.group!==void 0&&delete po[e.meta.group];const n=Na[""+e.meta.uid];if(n){const{width:o,height:r}=getComputedStyle(n);n.style.left=`${n.offsetLeft}px`,n.style.width=o,n.style.height=r}Je[e.position].value.splice(t,1),typeof e.onDismiss=="function"&&e.onDismiss()}}function Ls(e){return e!=null&&tg.test(e)!==!0}function Cn(e,t){return console.error(`Notify: ${e}`,t),!1}function rg(){return $e({name:"QNotifications",devtools:{hide:!0},setup(){return()=>E("div",{class:"q-notifications"},gi.map(e=>E(Tf,{key:e,class:Ia[e],tag:"div",name:`q-notification--${e}`},()=>Je[e].value.map(t=>{const n=t.meta,o=[];if(n.hasMedia===!0&&(t.spinner!==!1?o.push(E(t.spinner,{class:"q-notification__spinner q-notification__spinner--"+n.leftClass,color:t.spinnerColor,size:t.spinnerSize})):t.icon?o.push(E(pt,{class:"q-notification__icon q-notification__icon--"+n.leftClass,name:t.icon,color:t.iconColor,size:t.iconSize,role:"img"})):t.avatar&&o.push(E(Oh,{class:"q-notification__avatar q-notification__avatar--"+n.leftClass},()=>E("img",{src:t.avatar,"aria-hidden":"true"})))),n.hasText===!0){let i;const s={class:"q-notification__message col"};if(t.html===!0)s.innerHTML=t.caption?`
${t.message}
${t.caption}
`:t.message;else{const l=[t.message];i=t.caption?[E("div",l),E("div",{class:"q-notification__caption"},[t.caption])]:l}o.push(E("div",s,i))}const r=[E("div",{class:n.contentClass},o)];return t.progress===!0&&r.push(E("div",{key:`${n.uid}|p|${n.badge}`,class:n.progressClass,style:n.progressStyle})),t.actions!==void 0&&r.push(E("div",{class:n.actionsClass},t.actions.map(i=>E(Br,i)))),n.badge>1&&r.push(E("div",{key:`${n.uid}|${n.badge}`,class:t.meta.badgeClass,style:t.badgeStyle},[n.badge])),E("div",{ref:i=>{Na[""+n.uid]=i},key:n.uid,class:n.class,...n.attrs},[E("div",{class:n.wrapperClass},r)])}))))}})}var ig={setDefaults(e){at(e)===!0&&Object.assign(mo,e)},registerType(e,t){at(t)===!0&&(tn[e]=t)},install({$q:e,parentApp:t}){if(e.notify=this.create=n=>ja(n,e),e.notify.setDefaults=this.setDefaults,e.notify.registerType=this.registerType,e.config.notify!==void 0&&this.setDefaults(e.config.notify),this.__installed!==!0){gi.forEach(o=>{Je[o]=he([]);const r=["left","center","right"].includes(o)===!0?"center":o.indexOf("top")>-1?"top":"bottom",i=o.indexOf("left")>-1?"start":o.indexOf("right")>-1?"end":"center",s=["left","right"].includes(o)?`items-${o==="left"?"start":"end"} justify-center`:o==="center"?"flex-center":`items-${i}`;Ia[o]=`q-notifications__list q-notifications__list--${r} fixed column no-wrap ${s}`});const n=hi("q-notify");ma(rg(),t).mount(n)}}};function sg(e){return ld(e)===!0?"__q_date|"+e.toUTCString():ad(e)===!0?"__q_expr|"+e.source:typeof e=="number"?"__q_numb|"+e:typeof e=="boolean"?"__q_bool|"+(e?"1":"0"):typeof e=="string"?"__q_strn|"+e:typeof e=="function"?"__q_strn|"+e.toString():e===Object(e)?"__q_objt|"+JSON.stringify(e):e}function lg(e){if(e.length<9)return e;const n=e.substring(0,8),o=e.substring(9);switch(n){case"__q_date":return new Date(o);case"__q_expr":return new RegExp(o);case"__q_numb":return Number(o);case"__q_bool":return Boolean(o==="1");case"__q_strn":return""+o;case"__q_objt":return JSON.parse(o);default:return e}}function ag(){const e=()=>null;return{has:()=>!1,getLength:()=>0,getItem:e,getIndex:e,getKey:e,getAll:()=>{},getAllKeys:()=>[],set:Pt,remove:Pt,clear:Pt,isEmpty:()=>!0}}function ug(e){const t=window[e+"Storage"],n=o=>{const r=t.getItem(o);return r?lg(r):null};return{has:o=>t.getItem(o)!==null,getLength:()=>t.length,getItem:n,getIndex:o=>oo{let o;const r={},i=t.length;for(let s=0;s{const o=[],r=t.length;for(let i=0;i{t.setItem(o,sg(r))},remove:o=>{t.removeItem(o)},clear:()=>{t.clear()},isEmpty:()=>t.length===0}}const Va=we.has.webStorage===!1?ag():ug("local"),Da={install({$q:e}){e.localStorage=Va}};Object.assign(Da,Va);function cg(e,t,n){let o;function r(){o!==void 0&&(qr.remove(o),o=void 0)}return We(()=>{e.value===!0&&r()}),{removeFromHistory:r,addToHistory(){o={condition:()=>n.value===!0,handler:t},qr.add(o)}}}function fg(){let e=null;const t=ke();function n(){e!==null&&(clearTimeout(e),e=null)}return Fo(n),We(n),{removeTimeout:n,registerTimeout(o,r){n(),La(t)===!1&&(e=setTimeout(o,r))}}}function dg(){let e;const t=ke();function n(){e=void 0}return Fo(n),We(n),{removeTick:n,registerTick(o){e=o,je(()=>{e===o&&(La(t)===!1&&e(),e=void 0)})}}}const hg={modelValue:{type:Boolean,default:null},"onUpdate:modelValue":[Function,Array]},gg=["beforeShow","show","beforeHide","hide"];function mg({showing:e,canShow:t,hideOnRouteChange:n,handleShow:o,handleHide:r,processOnMount:i}){const s=ke(),{props:l,emit:a,proxy:c}=s;let u;function d(m){e.value===!0?y(m):f(m)}function f(m){if(l.disable===!0||m!==void 0&&m.qAnchorHandled===!0||t!==void 0&&t(m)!==!0)return;const _=l["onUpdate:modelValue"]!==void 0;_===!0&&(a("update:modelValue",!0),u=m,je(()=>{u===m&&(u=void 0)})),(l.modelValue===null||_===!1)&&p(m)}function p(m){e.value!==!0&&(e.value=!0,a("beforeShow",m),o!==void 0?o(m):a("show",m))}function y(m){if(l.disable===!0)return;const _=l["onUpdate:modelValue"]!==void 0;_===!0&&(a("update:modelValue",!1),u=m,je(()=>{u===m&&(u=void 0)})),(l.modelValue===null||_===!1)&&T(m)}function T(m){e.value!==!1&&(e.value=!1,a("beforeHide",m),r!==void 0?r(m):a("hide",m))}function q(m){l.disable===!0&&m===!0?l["onUpdate:modelValue"]!==void 0&&a("update:modelValue",!1):m===!0!==e.value&&(m===!0?p:T)(u)}be(()=>l.modelValue,q),n!==void 0&&$a(s)===!0&&be(()=>c.$route.fullPath,()=>{n.value===!0&&e.value===!0&&y()}),i===!0&&Ut(()=>{q(l.modelValue)});const M={show:f,hide:y,toggle:d};return Object.assign(c,M),M}const pg={transitionShow:{type:String,default:"fade"},transitionHide:{type:String,default:"fade"},transitionDuration:{type:[String,Number],default:300}};function vg(e,t=()=>{},n=()=>{}){return{transitionProps:R(()=>{const o=`q-transition--${e.transitionShow||t()}`,r=`q-transition--${e.transitionHide||n()}`;return{appear:!0,enterFromClass:`${o}-enter-from`,enterActiveClass:`${o}-enter-active`,enterToClass:`${o}-enter-to`,leaveFromClass:`${r}-leave-from`,leaveActiveClass:`${r}-leave-active`,leaveToClass:`${r}-leave-to`}}),transitionStyle:R(()=>`--q-transition-duration: ${e.transitionDuration}ms`)}}let Nt=[],Wn=[];function Ha(e){Wn=Wn.filter(t=>t!==e)}function bg(e){Ha(e),Wn.push(e)}function Bs(e){Ha(e),Wn.length===0&&Nt.length!==0&&(Nt[Nt.length-1](),Nt=[])}function mi(e){Wn.length===0?e():Nt.push(e)}function yg(e){Nt=Nt.filter(t=>t!==e)}const vo=[];function Nm(e){return vo.find(t=>t.contentEl!==null&&t.contentEl.contains(e))}function _g(e,t){do{if(e.$options.name==="QMenu"){if(e.hide(t),e.$props.separateClosePopup===!0)return go(e)}else if(e.__qPortal===!0){const n=go(e);return n!==void 0&&n.$options.name==="QPopupProxy"?(e.hide(t),n):e}e=go(e)}while(e!=null)}function jm(e,t,n){for(;n!==0&&e!==void 0&&e!==null;){if(e.__qPortal===!0){if(n--,e.$options.name==="QMenu"){e=_g(e,t);continue}e.hide(t)}e=go(e)}}function wg(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 xg(e,t,n,o){const r=he(!1),i=he(!1);let s=null;const l={},a=o==="dialog"&&wg(e);function c(d){if(d===!0){Bs(l),i.value=!0;return}i.value=!1,r.value===!1&&(a===!1&&s===null&&(s=hi(!1,o)),r.value=!0,vo.push(e.proxy),bg(l))}function u(d){if(i.value=!1,d!==!0)return;Bs(l),r.value=!1;const f=vo.indexOf(e.proxy);f!==-1&&vo.splice(f,1),s!==null&&(Fa(s),s=null)}return ii(()=>{u(!0)}),e.proxy.__qPortal=!0,bn(e.proxy,"contentEl",()=>t.value),{showPortal:c,hidePortal:u,portalIsActive:r,portalIsAccessible:i,renderPortal:()=>a===!0?n():r.value===!0?[E(zc,{to:s},n())]:void 0}}const Cg=[null,document,document.body,document.scrollingElement,document.documentElement];function Vm(e,t){let n=Bh(t);if(n===void 0){if(e==null)return window;n=e.closest(".scroll,.scroll-y,.overflow-auto")}return Cg.includes(n)?window:n}function Dm(e){return(e===window?document.body:e).scrollHeight}function za(e){return e===window?window.pageYOffset||window.scrollY||document.body.scrollTop||0:e.scrollTop}function Ka(e){return e===window?window.pageXOffset||window.scrollX||document.body.scrollLeft||0:e.scrollLeft}function Ua(e,t,n=0){const o=arguments[3]===void 0?performance.now():arguments[3],r=za(e);if(n<=0){r!==t&&Fr(e,t);return}requestAnimationFrame(i=>{const s=i-o,l=r+(t-r)/Math.max(s,n)*s;Fr(e,l),l!==t&&Ua(e,t,n-s,i)})}function Wa(e,t,n=0){const o=arguments[3]===void 0?performance.now():arguments[3],r=Ka(e);if(n<=0){r!==t&&Ir(e,t);return}requestAnimationFrame(i=>{const s=i-o,l=r+(t-r)/Math.max(s,n)*s;Ir(e,l),l!==t&&Wa(e,t,n-s,i)})}function Fr(e,t){if(e===window){window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,t);return}e.scrollTop=t}function Ir(e,t){if(e===window){window.scrollTo(t,window.pageYOffset||window.scrollY||document.body.scrollTop||0);return}e.scrollLeft=t}function Hm(e,t,n){if(n){Ua(e,t,n);return}Fr(e,t)}function zm(e,t,n){if(n){Wa(e,t,n);return}Ir(e,t)}let ro;function Km(){if(ro!==void 0)return ro;const e=document.createElement("p"),t=document.createElement("div");Lr(e,{width:"100%",height:"200px"}),Lr(t,{position:"absolute",top:"0px",left:"0px",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"}),t.appendChild(e),document.body.appendChild(t);const n=e.offsetWidth;t.style.overflow="scroll";let o=e.offsetWidth;return n===o&&(o=t.clientWidth),t.remove(),ro=n-o,ro}function kg(e,t=!0){return!e||e.nodeType!==Node.ELEMENT_NODE?!1:t?e.scrollHeight>e.clientHeight&&(e.classList.contains("scroll")||e.classList.contains("overflow-auto")||["auto","scroll"].includes(window.getComputedStyle(e)["overflow-y"])):e.scrollWidth>e.clientWidth&&(e.classList.contains("scroll")||e.classList.contains("overflow-auto")||["auto","scroll"].includes(window.getComputedStyle(e)["overflow-x"]))}let kn=0,ur,cr,Tn,fr=!1,Fs,Is,Ns,$t=null;function Eg(e){Sg(e)&&Ke(e)}function Sg(e){if(e.target===document.body||e.target.classList.contains("q-layout__backdrop"))return!0;const t=zf(e),n=e.shiftKey&&!e.deltaX,o=!n&&Math.abs(e.deltaX)<=Math.abs(e.deltaY),r=n||o?e.deltaY:e.deltaX;for(let i=0;i0&&s.scrollTop+s.clientHeight===s.scrollHeight:r<0&&s.scrollLeft===0?!0:r>0&&s.scrollLeft+s.clientWidth===s.scrollWidth}return!0}function js(e){e.target===document&&(document.scrollingElement.scrollTop=document.scrollingElement.scrollTop)}function io(e){fr!==!0&&(fr=!0,requestAnimationFrame(()=>{fr=!1;const{height:t}=e.target,{clientHeight:n,scrollTop:o}=document.scrollingElement;(Tn===void 0||t!==window.innerHeight)&&(Tn=n-t,document.scrollingElement.scrollTop=o),o>Tn&&(document.scrollingElement.scrollTop-=Math.ceil((o-Tn)/8))}))}function Vs(e){const t=document.body,n=window.visualViewport!==void 0;if(e==="add"){const{overflowY:o,overflowX:r}=window.getComputedStyle(t);ur=Ka(window),cr=za(window),Fs=t.style.left,Is=t.style.top,Ns=window.location.href,t.style.left=`-${ur}px`,t.style.top=`-${cr}px`,r!=="hidden"&&(r==="scroll"||t.scrollWidth>window.innerWidth)&&t.classList.add("q-body--force-scrollbar-x"),o!=="hidden"&&(o==="scroll"||t.scrollHeight>window.innerHeight)&&t.classList.add("q-body--force-scrollbar-y"),t.classList.add("q-body--prevent-scroll"),document.qScrollPrevented=!0,we.is.ios===!0&&(n===!0?(window.scrollTo(0,0),window.visualViewport.addEventListener("resize",io,Be.passiveCapture),window.visualViewport.addEventListener("scroll",io,Be.passiveCapture),window.scrollTo(0,0)):window.addEventListener("scroll",js,Be.passiveCapture))}we.is.desktop===!0&&we.is.mac===!0&&window[`${e}EventListener`]("wheel",Eg,Be.notPassive),e==="remove"&&(we.is.ios===!0&&(n===!0?(window.visualViewport.removeEventListener("resize",io,Be.passiveCapture),window.visualViewport.removeEventListener("scroll",io,Be.passiveCapture)):window.removeEventListener("scroll",js,Be.passiveCapture)),t.classList.remove("q-body--prevent-scroll"),t.classList.remove("q-body--force-scrollbar-x"),t.classList.remove("q-body--force-scrollbar-y"),document.qScrollPrevented=!1,t.style.left=Fs,t.style.top=Is,window.location.href===Ns&&window.scrollTo(ur,cr),Tn=void 0)}function Rg(e){let t="add";if(e===!0){if(kn++,$t!==null){clearTimeout($t),$t=null;return}if(kn>1)return}else{if(kn===0||(kn--,kn>0))return;if(t="remove",we.is.ios===!0&&we.is.nativeMobile===!0){$t!==null&&clearTimeout($t),$t=setTimeout(()=>{Vs(t),$t=null},100);return}}Vs(t)}function Pg(){let e;return{preventBodyScroll(t){t!==e&&(e!==void 0||t===!0)&&(e=t,Rg(t))}}}const Ht=[];let hn;function Tg(e){hn=e.keyCode===27}function qg(){hn===!0&&(hn=!1)}function Ag(e){hn===!0&&(hn=!1,zn(e,27)===!0&&Ht[Ht.length-1](e))}function Qa(e){window[e]("keydown",Tg),window[e]("blur",qg),window[e]("keyup",Ag),hn=!1}function Mg(e){we.is.desktop===!0&&(Ht.push(e),Ht.length===1&&Qa("addEventListener"))}function Ds(e){const t=Ht.indexOf(e);t>-1&&(Ht.splice(t,1),Ht.length===0&&Qa("removeEventListener"))}const zt=[];function Ya(e){zt[zt.length-1](e)}function Og(e){we.is.desktop===!0&&(zt.push(e),zt.length===1&&document.body.addEventListener("focusin",Ya))}function Hs(e){const t=zt.indexOf(e);t>-1&&(zt.splice(t,1),zt.length===0&&document.body.removeEventListener("focusin",Ya))}let so=0;const $g={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"},zs={standard:["scale","scale"],top:["slide-down","slide-up"],bottom:["slide-up","slide-down"],right:["slide-left","slide-right"],left:["slide-right","slide-left"]};var Lg=$e({name:"QDialog",inheritAttrs:!1,props:{...hg,...pg,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,position:{type:String,default:"standard",validator:e=>e==="standard"||["top","bottom","left","right"].includes(e)}},emits:[...gg,"shake","click","escapeKey"],setup(e,{slots:t,emit:n,attrs:o}){const r=ke(),i=he(null),s=he(!1),l=he(!1);let a=null,c=null,u,d;const f=R(()=>e.persistent!==!0&&e.noRouteDismiss!==!0&&e.seamless!==!0),{preventBodyScroll:p}=Pg(),{registerTimeout:y}=fg(),{registerTick:T,removeTick:q}=dg(),{transitionProps:M,transitionStyle:m}=vg(e,()=>zs[e.position][0],()=>zs[e.position][1]),{showPortal:_,hidePortal:w,portalIsAccessible:F,renderPortal:j}=xg(r,i,Re,"dialog"),{hide:V}=mg({showing:s,hideOnRouteChange:f,handleShow:k,handleHide:Z,processOnMount:!0}),{addToHistory:N,removeFromHistory:C}=cg(s,V,f),x=R(()=>`q-dialog__inner flex no-pointer-events q-dialog__inner--${e.maximized===!0?"maximized":"minimized"} q-dialog__inner--${e.position} ${$g[e.position]}`+(l.value===!0?" q-dialog__inner--animating":"")+(e.fullWidth===!0?" q-dialog__inner--fullwidth":"")+(e.fullHeight===!0?" q-dialog__inner--fullheight":"")+(e.square===!0?" q-dialog__inner--square":"")),$=R(()=>s.value===!0&&e.seamless!==!0),v=R(()=>e.autoClose===!0?{onClick:fe}:{}),H=R(()=>[`q-dialog fullscreen no-pointer-events q-dialog--${$.value===!0?"modal":"seamless"}`,o.class]);be(()=>e.maximized,oe=>{s.value===!0&&se(oe)}),be($,oe=>{p(oe),oe===!0?(Og(ue),Mg(W)):(Hs(ue),Ds(W))});function k(oe){N(),c=e.noRefocus===!1&&document.activeElement!==null?document.activeElement:null,se(e.maximized),_(),l.value=!0,e.noFocus!==!0?(document.activeElement!==null&&document.activeElement.blur(),T(Y)):q(),y(()=>{if(r.proxy.$q.platform.is.ios===!0){if(e.seamless!==!0&&document.activeElement){const{top:ne,bottom:S}=document.activeElement.getBoundingClientRect(),{innerHeight:Q}=window,z=window.visualViewport!==void 0?window.visualViewport.height:Q;ne>0&&S>z/2&&(document.scrollingElement.scrollTop=Math.min(document.scrollingElement.scrollHeight-z,S>=Q?1/0:Math.ceil(document.scrollingElement.scrollTop+S-z/2))),document.activeElement.scrollIntoView()}d=!0,i.value.click(),d=!1}_(!0),l.value=!1,n("show",oe)},e.transitionDuration)}function Z(oe){q(),C(),_e(!0),l.value=!0,w(),c!==null&&(((oe&&oe.type.indexOf("key")===0?c.closest('[tabindex]:not([tabindex^="-"])'):void 0)||c).focus(),c=null),y(()=>{w(!0),l.value=!1,n("hide",oe)},e.transitionDuration)}function Y(oe){mi(()=>{let ne=i.value;ne===null||ne.contains(document.activeElement)===!0||(ne=(oe!==""?ne.querySelector(oe):null)||ne.querySelector("[autofocus][tabindex], [data-autofocus][tabindex]")||ne.querySelector("[autofocus] [tabindex], [data-autofocus] [tabindex]")||ne.querySelector("[autofocus], [data-autofocus]")||ne,ne.focus({preventScroll:!0}))})}function A(oe){oe&&typeof oe.focus=="function"?oe.focus({preventScroll:!0}):Y(),n("shake");const ne=i.value;ne!==null&&(ne.classList.remove("q-animate--scale"),ne.classList.add("q-animate--scale"),a!==null&&clearTimeout(a),a=setTimeout(()=>{a=null,i.value!==null&&(ne.classList.remove("q-animate--scale"),Y())},170))}function W(){e.seamless!==!0&&(e.persistent===!0||e.noEscDismiss===!0?e.maximized!==!0&&e.noShake!==!0&&A():(n("escapeKey"),V()))}function _e(oe){a!==null&&(clearTimeout(a),a=null),(oe===!0||s.value===!0)&&(se(!1),e.seamless!==!0&&(p(!1),Hs(ue),Ds(W))),oe!==!0&&(c=null)}function se(oe){oe===!0?u!==!0&&(so<1&&document.body.classList.add("q-body--dialog"),so++,u=!0):u===!0&&(so<2&&document.body.classList.remove("q-body--dialog"),so--,u=!1)}function fe(oe){d!==!0&&(V(oe),n("click",oe))}function L(oe){e.persistent!==!0&&e.noBackdropDismiss!==!0?V(oe):e.noShake!==!0&&A()}function ue(oe){e.allowFocusOutside!==!0&&F.value===!0&&Fh(i.value,oe.target)!==!0&&Y('[tabindex]:not([tabindex="-1"])')}Object.assign(r.proxy,{focus:Y,shake:A,__updateRefocusTarget(oe){c=oe||null}}),We(_e);function Re(){return E("div",{role:"dialog","aria-modal":$.value===!0?"true":"false",...o,class:H.value},[E(cn,{name:"q-transition--fade",appear:!0},()=>$.value===!0?E("div",{class:"q-dialog__backdrop fixed-full",style:m.value,"aria-hidden":"true",tabindex:-1,onClick:L}):null),E(cn,M.value,()=>s.value===!0?E("div",{ref:i,class:x.value,style:m.value,tabindex:-1,...v.value},tt(t.default)):null)])}return j}});const Wt={dark:{type:Boolean,default:null}};function Qt(e,t){return R(()=>e.dark===null?t.dark.isActive:e.dark)}var Bg=$e({name:"QCard",props:{...Wt,tag:{type:String,default:"div"},square:Boolean,flat:Boolean,bordered:Boolean},setup(e,{slots:t}){const{proxy:{$q:n}}=ke(),o=Qt(e,n),r=R(()=>"q-card"+(o.value===!0?" q-card--dark q-dark":"")+(e.bordered===!0?" q-card--bordered":"")+(e.square===!0?" q-card--square no-border-radius":"")+(e.flat===!0?" q-card--flat no-shadow":""));return()=>E(e.tag,{class:r.value},tt(t.default))}}),En=$e({name:"QCardSection",props:{tag:{type:String,default:"div"},horizontal:Boolean},setup(e,{slots:t}){const n=R(()=>`q-card__section q-card__section--${e.horizontal===!0?"horiz row no-wrap":"vert"}`);return()=>E(e.tag,{class:n.value},tt(t.default))}}),Fg=$e({name:"QCardActions",props:{...Aa,vertical:Boolean},setup(e,{slots:t}){const n=Ma(e),o=R(()=>`q-card__actions ${n.value} q-card__actions--${e.vertical===!0?"vert column":"horiz row"}`);return()=>E("div",{class:o.value},tt(t.default))}});const Ig={true:"inset",item:"item-inset","item-thumbnail":"item-thumbnail-inset"},dr={xs:2,sm:4,md:8,lg:16,xl:24};var Ks=$e({name:"QSeparator",props:{...Wt,spaced:[Boolean,String],inset:[Boolean,String],vertical:Boolean,color:String,size:String},setup(e){const t=ke(),n=Qt(e,t.proxy.$q),o=R(()=>e.vertical===!0?"vertical":"horizontal"),r=R(()=>` q-separator--${o.value}`),i=R(()=>e.inset!==!1?`${r.value}-${Ig[e.inset]}`:""),s=R(()=>`q-separator${r.value}${i.value}`+(e.color!==void 0?` bg-${e.color}`:"")+(n.value===!0?" q-separator--dark":"")),l=R(()=>{const a={};if(e.size!==void 0&&(a[e.vertical===!0?"width":"height"]=e.size),e.spaced!==!1){const c=e.spaced===!0?`${dr.md}px`:e.spaced in dr?`${dr[e.spaced]}px`:e.spaced,u=e.vertical===!0?["Left","Right"]:["Top","Bottom"];a[`margin${u[0]}`]=a[`margin${u[1]}`]=c}return a});return()=>E("hr",{class:s.value,style:l.value,"aria-orientation":o.value})}});function Ng({validate:e,resetValidation:t,requiresQForm:n}){const o=ut(id,!1);if(o!==!1){const{props:r,proxy:i}=ke();Object.assign(i,{validate:e,resetValidation:t}),be(()=>r.disable,s=>{s===!0?(typeof t=="function"&&t(),o.unbindComponent(i)):o.bindComponent(i)}),Ut(()=>{r.disable!==!0&&o.bindComponent(i)}),We(()=>{r.disable!==!0&&o.unbindComponent(i)})}else n===!0&&console.error("Parent QForm not found on useFormChild()!")}const Us=/^#[0-9a-fA-F]{3}([0-9a-fA-F]{3})?$/,Ws=/^#[0-9a-fA-F]{4}([0-9a-fA-F]{4})?$/,Qs=/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/,lo=/^rgb\(((0|[1-9][\d]?|1[\d]{0,2}|2[\d]?|2[0-4][\d]|25[0-5]),){2}(0|[1-9][\d]?|1[\d]{0,2}|2[\d]?|2[0-4][\d]|25[0-5])\)$/,ao=/^rgba\(((0|[1-9][\d]?|1[\d]{0,2}|2[\d]?|2[0-4][\d]|25[0-5]),){2}(0|[1-9][\d]?|1[\d]{0,2}|2[\d]?|2[0-4][\d]|25[0-5]),(0|0\.[0-9]+[1-9]|0\.[1-9]+|1)\)$/,hr={date:e=>/^-?[\d]+\/[0-1]\d\/[0-3]\d$/.test(e),time:e=>/^([0-1]?\d|2[0-3]):[0-5]\d$/.test(e),fulltime:e=>/^([0-1]?\d|2[0-3]):[0-5]\d:[0-5]\d$/.test(e),timeOrFulltime:e=>/^([0-1]?\d|2[0-3]):[0-5]\d(:[0-5]\d)?$/.test(e),email:e=>/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e),hexColor:e=>Us.test(e),hexaColor:e=>Ws.test(e),hexOrHexaColor:e=>Qs.test(e),rgbColor:e=>lo.test(e),rgbaColor:e=>ao.test(e),rgbOrRgbaColor:e=>lo.test(e)||ao.test(e),hexOrRgbColor:e=>Us.test(e)||lo.test(e),hexaOrRgbaColor:e=>Ws.test(e)||ao.test(e),anyColor:e=>Qs.test(e)||lo.test(e)||ao.test(e)},jg=[!0,!1,"ondemand"],Vg={modelValue:{},error:{type:Boolean,default:null},errorMessage:String,noErrorIcon:Boolean,rules:Array,reactiveRules:Boolean,lazyRules:{type:[Boolean,String],validator:e=>jg.includes(e)}};function Dg(e,t){const{props:n,proxy:o}=ke(),r=he(!1),i=he(null),s=he(null);Ng({validate:y,resetValidation:p});let l=0,a;const c=R(()=>n.rules!==void 0&&n.rules!==null&&n.rules.length!==0),u=R(()=>n.disable!==!0&&c.value===!0),d=R(()=>n.error===!0||r.value===!0),f=R(()=>typeof n.errorMessage=="string"&&n.errorMessage.length!==0?n.errorMessage:i.value);be(()=>n.modelValue,()=>{T()}),be(()=>n.reactiveRules,M=>{M===!0?a===void 0&&(a=be(()=>n.rules,()=>{T(!0)})):a!==void 0&&(a(),a=void 0)},{immediate:!0}),be(e,M=>{M===!0?s.value===null&&(s.value=!1):s.value===!1&&(s.value=!0,u.value===!0&&n.lazyRules!=="ondemand"&&t.value===!1&&q())});function p(){l++,t.value=!1,s.value=null,r.value=!1,i.value=null,q.cancel()}function y(M=n.modelValue){if(u.value!==!0)return!0;const m=++l,_=t.value!==!0?()=>{s.value=!0}:()=>{},w=(j,V)=>{j===!0&&_(),r.value=j,i.value=V||null,t.value=!1},F=[];for(let j=0;j{if(j===void 0||Array.isArray(j)===!1||j.length===0)return m===l&&w(!1),!0;const V=j.find(N=>N===!1||typeof N=="string");return m===l&&w(V!==void 0,V),V===void 0},j=>(m===l&&(console.error(j),w(!0)),!1)))}function T(M){u.value===!0&&n.lazyRules!=="ondemand"&&(s.value===!0||n.lazyRules!==!0&&M!==!0)&&q()}const q=ua(y,0);return We(()=>{a!==void 0&&a(),q.cancel()}),Object.assign(o,{resetValidation:p,validate:y}),bn(o,"hasError",()=>d.value),{isDirtyModel:s,hasRules:c,hasError:d,errorMessage:f,validate:y,resetValidation:p}}const Ys=/^on[A-Z]/;function Hg(e,t){const n={listeners:he({}),attributes:he({})};function o(){const r={},i={};for(const s in e)s!=="class"&&s!=="style"&&Ys.test(s)===!1&&(r[s]=e[s]);for(const s in t.props)Ys.test(s)===!0&&(i[s]=t.props[s]);n.attributes.value=r,n.listeners.value=i}return Fl(o),o(),n}let gr,uo=0;const Te=new Array(256);for(let e=0;e<256;e++)Te[e]=(e+256).toString(16).substring(1);const zg=(()=>{const e=typeof crypto!="undefined"?crypto:typeof window!="undefined"?window.crypto||window.msCrypto:void 0;if(e!==void 0){if(e.randomBytes!==void 0)return e.randomBytes;if(e.getRandomValues!==void 0)return t=>{const n=new Uint8Array(t);return e.getRandomValues(n),n}}return t=>{const n=[];for(let o=t;o>0;o--)n.push(Math.floor(Math.random()*256));return n}})(),Zs=4096;function Kg(){(gr===void 0||uo+16>Zs)&&(uo=0,gr=zg(Zs));const e=Array.prototype.slice.call(gr,uo,uo+=16);return e[6]=e[6]&15|64,e[8]=e[8]&63|128,Te[e[0]]+Te[e[1]]+Te[e[2]]+Te[e[3]]+"-"+Te[e[4]]+Te[e[5]]+"-"+Te[e[6]]+Te[e[7]]+"-"+Te[e[8]]+Te[e[9]]+"-"+Te[e[10]]+Te[e[11]]+Te[e[12]]+Te[e[13]]+Te[e[14]]+Te[e[15]]}function Nr(e){return e===void 0?`f_${Kg()}`:e}function jr(e){return e!=null&&(""+e).length!==0}const Ug={...Wt,...Vg,label:String,stackLabel:Boolean,hint:String,hideHint:Boolean,prefix:String,suffix:String,labelColor:String,color:String,bgColor:String,filled:Boolean,outlined:Boolean,borderless:Boolean,standout:[Boolean,String],square:Boolean,loading:Boolean,labelSlot:Boolean,bottomSlots:Boolean,hideBottomSpace:Boolean,rounded:Boolean,dense:Boolean,itemAligned:Boolean,counter:Boolean,clearable:Boolean,clearIcon:String,disable:Boolean,readonly:Boolean,autofocus:Boolean,for:String,maxlength:[Number,String]},Wg=["update:modelValue","clear","focus","blur","popupShow","popupHide"];function Qg(){const{props:e,attrs:t,proxy:n,vnode:o}=ke();return{isDark:Qt(e,n.$q),editable:R(()=>e.disable!==!0&&e.readonly!==!0),innerLoading:he(!1),focused:he(!1),hasPopupOpen:!1,splitAttrs:Hg(t,o),targetUid:he(Nr(e.for)),rootRef:he(null),targetRef:he(null),controlRef:he(null)}}function Yg(e){const{props:t,emit:n,slots:o,attrs:r,proxy:i}=ke(),{$q:s}=i;let l=null;e.hasValue===void 0&&(e.hasValue=R(()=>jr(t.modelValue))),e.emitValue===void 0&&(e.emitValue=A=>{n("update:modelValue",A)}),e.controlEvents===void 0&&(e.controlEvents={onFocusin:C,onFocusout:x}),Object.assign(e,{clearValue:$,onControlFocusin:C,onControlFocusout:x,focus:V}),e.computedCounter===void 0&&(e.computedCounter=R(()=>{if(t.counter!==!1){const A=typeof t.modelValue=="string"||typeof t.modelValue=="number"?(""+t.modelValue).length:Array.isArray(t.modelValue)===!0?t.modelValue.length:0,W=t.maxlength!==void 0?t.maxlength:t.maxValues;return A+(W!==void 0?" / "+W:"")}}));const{isDirtyModel:a,hasRules:c,hasError:u,errorMessage:d,resetValidation:f}=Dg(e.focused,e.innerLoading),p=e.floatingLabel!==void 0?R(()=>t.stackLabel===!0||e.focused.value===!0||e.floatingLabel.value===!0):R(()=>t.stackLabel===!0||e.focused.value===!0||e.hasValue.value===!0),y=R(()=>t.bottomSlots===!0||t.hint!==void 0||c.value===!0||t.counter===!0||t.error!==null),T=R(()=>t.filled===!0?"filled":t.outlined===!0?"outlined":t.borderless===!0?"borderless":t.standout?"standout":"standard"),q=R(()=>`q-field row no-wrap items-start q-field--${T.value}`+(e.fieldClass!==void 0?` ${e.fieldClass.value}`:"")+(t.rounded===!0?" q-field--rounded":"")+(t.square===!0?" q-field--square":"")+(p.value===!0?" q-field--float":"")+(m.value===!0?" q-field--labeled":"")+(t.dense===!0?" q-field--dense":"")+(t.itemAligned===!0?" q-field--item-aligned q-item-type":"")+(e.isDark.value===!0?" q-field--dark":"")+(e.getControl===void 0?" q-field--auto-height":"")+(e.focused.value===!0?" q-field--focused":"")+(u.value===!0?" q-field--error":"")+(u.value===!0||e.focused.value===!0?" q-field--highlighted":"")+(t.hideBottomSpace!==!0&&y.value===!0?" q-field--with-bottom":"")+(t.disable===!0?" q-field--disabled":t.readonly===!0?" q-field--readonly":"")),M=R(()=>"q-field__control relative-position row no-wrap"+(t.bgColor!==void 0?` bg-${t.bgColor}`:"")+(u.value===!0?" text-negative":typeof t.standout=="string"&&t.standout.length!==0&&e.focused.value===!0?` ${t.standout}`:t.color!==void 0?` text-${t.color}`:"")),m=R(()=>t.labelSlot===!0||t.label!==void 0),_=R(()=>"q-field__label no-pointer-events absolute ellipsis"+(t.labelColor!==void 0&&u.value!==!0?` text-${t.labelColor}`:"")),w=R(()=>({id:e.targetUid.value,editable:e.editable.value,focused:e.focused.value,floatingLabel:p.value,modelValue:t.modelValue,emitValue:e.emitValue})),F=R(()=>{const A={for:e.targetUid.value};return t.disable===!0?A["aria-disabled"]="true":t.readonly===!0&&(A["aria-readonly"]="true"),A});be(()=>t.for,A=>{e.targetUid.value=Nr(A)});function j(){const A=document.activeElement;let W=e.targetRef!==void 0&&e.targetRef.value;W&&(A===null||A.id!==e.targetUid.value)&&(W.hasAttribute("tabindex")===!0||(W=W.querySelector("[tabindex]")),W&&W!==A&&W.focus({preventScroll:!0}))}function V(){mi(j)}function N(){yg(j);const A=document.activeElement;A!==null&&e.rootRef.value.contains(A)&&A.blur()}function C(A){l!==null&&(clearTimeout(l),l=null),e.editable.value===!0&&e.focused.value===!1&&(e.focused.value=!0,n("focus",A))}function x(A,W){l!==null&&clearTimeout(l),l=setTimeout(()=>{l=null,!(document.hasFocus()===!0&&(e.hasPopupOpen===!0||e.controlRef===void 0||e.controlRef.value===null||e.controlRef.value.contains(document.activeElement)!==!1))&&(e.focused.value===!0&&(e.focused.value=!1,n("blur",A)),W!==void 0&&W())})}function $(A){Ke(A),s.platform.is.mobile!==!0?(e.targetRef!==void 0&&e.targetRef.value||e.rootRef.value).focus():e.rootRef.value.contains(document.activeElement)===!0&&document.activeElement.blur(),t.type==="file"&&(e.inputRef.value.value=null),n("update:modelValue",null),n("clear",t.modelValue),je(()=>{f(),s.platform.is.mobile!==!0&&(a.value=!1)})}function v(){const A=[];return o.prepend!==void 0&&A.push(E("div",{class:"q-field__prepend q-field__marginal row no-wrap items-center",key:"prepend",onClick:Et},o.prepend())),A.push(E("div",{class:"q-field__control-container col relative-position row no-wrap q-anchor--skip"},H())),u.value===!0&&t.noErrorIcon===!1&&A.push(Z("error",[E(pt,{name:s.iconSet.field.error,color:"negative"})])),t.loading===!0||e.innerLoading.value===!0?A.push(Z("inner-loading-append",o.loading!==void 0?o.loading():[E(Un,{color:t.color})])):t.clearable===!0&&e.hasValue.value===!0&&e.editable.value===!0&&A.push(Z("inner-clearable-append",[E(pt,{class:"q-field__focusable-action",tag:"button",name:t.clearIcon||s.iconSet.field.clear,tabindex:0,type:"button","aria-hidden":null,role:null,onClick:$})])),o.append!==void 0&&A.push(E("div",{class:"q-field__append q-field__marginal row no-wrap items-center",key:"append",onClick:Et},o.append())),e.getInnerAppend!==void 0&&A.push(Z("inner-append",e.getInnerAppend())),e.getControlChild!==void 0&&A.push(e.getControlChild()),A}function H(){const A=[];return t.prefix!==void 0&&t.prefix!==null&&A.push(E("div",{class:"q-field__prefix no-pointer-events row items-center"},t.prefix)),e.getShadowControl!==void 0&&e.hasShadow.value===!0&&A.push(e.getShadowControl()),e.getControl!==void 0?A.push(e.getControl()):o.rawControl!==void 0?A.push(o.rawControl()):o.control!==void 0&&A.push(E("div",{ref:e.targetRef,class:"q-field__native row",tabindex:-1,...e.splitAttrs.attributes.value,"data-autofocus":t.autofocus===!0||void 0},o.control(w.value))),m.value===!0&&A.push(E("div",{class:_.value},tt(o.label,t.label))),t.suffix!==void 0&&t.suffix!==null&&A.push(E("div",{class:"q-field__suffix no-pointer-events row items-center"},t.suffix)),A.concat(tt(o.default))}function k(){let A,W;u.value===!0?d.value!==null?(A=[E("div",{role:"alert"},d.value)],W=`q--slot-error-${d.value}`):(A=tt(o.error),W="q--slot-error"):(t.hideHint!==!0||e.focused.value===!0)&&(t.hint!==void 0?(A=[E("div",t.hint)],W=`q--slot-hint-${t.hint}`):(A=tt(o.hint),W="q--slot-hint"));const _e=t.counter===!0||o.counter!==void 0;if(t.hideBottomSpace===!0&&_e===!1&&A===void 0)return;const se=E("div",{key:W,class:"q-field__messages col"},A);return E("div",{class:"q-field__bottom row items-start q-field__bottom--"+(t.hideBottomSpace!==!0?"animated":"stale"),onClick:Et},[t.hideBottomSpace===!0?se:E(cn,{name:"q-transition--field-message"},()=>se),_e===!0?E("div",{class:"q-field__counter"},o.counter!==void 0?o.counter():e.computedCounter.value):null])}function Z(A,W){return W===null?null:E("div",{key:A,class:"q-field__append q-field__marginal row no-wrap items-center q-anchor--skip"},W)}let Y=!1;return Fo(()=>{Y=!0}),Ll(()=>{Y===!0&&t.autofocus===!0&&i.focus()}),Ut(()=>{qt.value===!0&&t.for===void 0&&(e.targetUid.value=Nr()),t.autofocus===!0&&i.focus()}),We(()=>{l!==null&&clearTimeout(l)}),Object.assign(i,{focus:V,blur:N}),function(){const W=e.getControl===void 0&&o.control===void 0?{...e.splitAttrs.attributes.value,"data-autofocus":t.autofocus===!0||void 0,...F.value}:F.value;return E("label",{ref:e.rootRef,class:[q.value,r.class],style:r.style,...W},[o.before!==void 0?E("div",{class:"q-field__before q-field__marginal row no-wrap items-center",onClick:Et},o.before()):null,E("div",{class:"q-field__inner relative-position col self-stretch"},[E("div",{ref:e.controlRef,class:M.value,tabindex:-1,...e.controlEvents},v()),y.value===!0?k():null]),o.after!==void 0?E("div",{class:"q-field__after q-field__marginal row no-wrap items-center",onClick:Et},o.after()):null])}}const Js={date:"####/##/##",datetime:"####/##/## ##:##",time:"##:##",fulltime:"##:##:##",phone:"(###) ### - ####",card:"#### #### #### ####"},Po={"#":{pattern:"[\\d]",negate:"[^\\d]"},S:{pattern:"[a-zA-Z]",negate:"[^a-zA-Z]"},N:{pattern:"[0-9a-zA-Z]",negate:"[^0-9a-zA-Z]"},A:{pattern:"[a-zA-Z]",negate:"[^a-zA-Z]",transform:e=>e.toLocaleUpperCase()},a:{pattern:"[a-zA-Z]",negate:"[^a-zA-Z]",transform:e=>e.toLocaleLowerCase()},X:{pattern:"[0-9a-zA-Z]",negate:"[^0-9a-zA-Z]",transform:e=>e.toLocaleUpperCase()},x:{pattern:"[0-9a-zA-Z]",negate:"[^0-9a-zA-Z]",transform:e=>e.toLocaleLowerCase()}},Za=Object.keys(Po);Za.forEach(e=>{Po[e].regex=new RegExp(Po[e].pattern)});const Zg=new RegExp("\\\\([^.*+?^${}()|([\\]])|([.*+?^${}()|[\\]])|(["+Za.join("")+"])|(.)","g"),Xs=/[.*+?^${}()|[\]\\]/g,Se=String.fromCharCode(1),Jg={mask:String,reverseFillMask:Boolean,fillMask:[Boolean,String],unmaskedValue:Boolean};function Xg(e,t,n,o){let r,i,s,l,a,c;const u=he(null),d=he(p());function f(){return e.autogrow===!0||["textarea","text","search","url","tel","password"].includes(e.type)}be(()=>e.type+e.autogrow,T),be(()=>e.mask,C=>{if(C!==void 0)q(d.value,!0);else{const x=V(d.value);T(),e.modelValue!==x&&t("update:modelValue",x)}}),be(()=>e.fillMask+e.reverseFillMask,()=>{u.value===!0&&q(d.value,!0)}),be(()=>e.unmaskedValue,()=>{u.value===!0&&q(d.value)});function p(){if(T(),u.value===!0){const C=F(V(e.modelValue));return e.fillMask!==!1?N(C):C}return e.modelValue}function y(C){if(C-1){for(let H=C-$.length;H>0;H--)x+=Se;$=$.slice(0,v)+x+$.slice(v)}return $}function T(){if(u.value=e.mask!==void 0&&e.mask.length!==0&&f(),u.value===!1){l=void 0,r="",i="";return}const C=Js[e.mask]===void 0?e.mask:Js[e.mask],x=typeof e.fillMask=="string"&&e.fillMask.length!==0?e.fillMask.slice(0,1):"_",$=x.replace(Xs,"\\$&"),v=[],H=[],k=[];let Z=e.reverseFillMask===!0,Y="",A="";C.replace(Zg,(fe,L,ue,Re,oe)=>{if(Re!==void 0){const ne=Po[Re];k.push(ne),A=ne.negate,Z===!0&&(H.push("(?:"+A+"+)?("+ne.pattern+"+)?(?:"+A+"+)?("+ne.pattern+"+)?"),Z=!1),H.push("(?:"+A+"+)?("+ne.pattern+")?")}else if(ue!==void 0)Y="\\"+(ue==="\\"?"":ue),k.push(ue),v.push("([^"+Y+"]+)?"+Y+"?");else{const ne=L!==void 0?L:oe;Y=ne==="\\"?"\\\\\\\\":ne.replace(Xs,"\\\\$&"),k.push(ne),v.push("([^"+Y+"]+)?"+Y+"?")}});const W=new RegExp("^"+v.join("")+"("+(Y===""?".":"[^"+Y+"]")+"+)?"+(Y===""?"":"["+Y+"]*")+"$"),_e=H.length-1,se=H.map((fe,L)=>L===0&&e.reverseFillMask===!0?new RegExp("^"+$+"*"+fe):L===_e?new RegExp("^"+fe+"("+(A===""?".":A)+"+)?"+(e.reverseFillMask===!0?"$":$+"*")):new RegExp("^"+fe));s=k,l=fe=>{const L=W.exec(e.reverseFillMask===!0?fe:fe.slice(0,k.length+1));L!==null&&(fe=L.slice(1).join(""));const ue=[],Re=se.length;for(let oe=0,ne=fe;oetypeof fe=="string"?fe:Se).join(""),i=r.split(Se).join(x)}function q(C,x,$){const v=o.value,H=v.selectionEnd,k=v.value.length-H,Z=V(C);x===!0&&T();const Y=F(Z),A=e.fillMask!==!1?N(Y):Y,W=d.value!==A;v.value!==A&&(v.value=A),W===!0&&(d.value=A),document.activeElement===v&&je(()=>{if(A===i){const se=e.reverseFillMask===!0?i.length:0;v.setSelectionRange(se,se,"forward");return}if($==="insertFromPaste"&&e.reverseFillMask!==!0){const se=v.selectionEnd;let fe=H-1;for(let L=a;L<=fe&&L-1){const se=e.reverseFillMask===!0?H===0?A.length>Y.length?1:0:Math.max(0,A.length-(A===i?0:Math.min(Y.length,k)+1))+1:H;v.setSelectionRange(se,se,"forward");return}if(e.reverseFillMask===!0)if(W===!0){const se=Math.max(0,A.length-(A===i?0:Math.min(Y.length,k+1)));se===1&&H===1?v.setSelectionRange(se,se,"forward"):m.rightReverse(v,se)}else{const se=A.length-k;v.setSelectionRange(se,se,"backward")}else if(W===!0){const se=Math.max(0,r.indexOf(Se),Math.min(Y.length,H)-1);m.right(v,se)}else{const se=H-1;m.right(v,se)}});const _e=e.unmaskedValue===!0?V(A):A;String(e.modelValue)!==_e&&n(_e,!0)}function M(C,x,$){const v=F(V(C.value));x=Math.max(0,r.indexOf(Se),Math.min(v.length,x)),a=x,C.setSelectionRange(x,$,"forward")}const m={left(C,x){const $=r.slice(x-1).indexOf(Se)===-1;let v=Math.max(0,x-1);for(;v>=0;v--)if(r[v]===Se){x=v,$===!0&&x++;break}if(v<0&&r[x]!==void 0&&r[x]!==Se)return m.right(C,0);x>=0&&C.setSelectionRange(x,x,"backward")},right(C,x){const $=C.value.length;let v=Math.min($,x+1);for(;v<=$;v++)if(r[v]===Se){x=v;break}else r[v-1]===Se&&(x=v);if(v>$&&r[x-1]!==void 0&&r[x-1]!==Se)return m.left(C,$);C.setSelectionRange(x,x,"forward")},leftReverse(C,x){const $=y(C.value.length);let v=Math.max(0,x-1);for(;v>=0;v--)if($[v-1]===Se){x=v;break}else if($[v]===Se&&(x=v,v===0))break;if(v<0&&$[x]!==void 0&&$[x]!==Se)return m.rightReverse(C,0);x>=0&&C.setSelectionRange(x,x,"backward")},rightReverse(C,x){const $=C.value.length,v=y($),H=v.slice(0,x+1).indexOf(Se)===-1;let k=Math.min($,x+1);for(;k<=$;k++)if(v[k-1]===Se){x=k,x>0&&H===!0&&x--;break}if(k>$&&v[x-1]!==void 0&&v[x-1]!==Se)return m.leftReverse(C,$);C.setSelectionRange(x,x,"forward")}};function _(C){t("click",C),c=void 0}function w(C){if(t("keydown",C),da(C)===!0||C.altKey===!0)return;const x=o.value,$=x.selectionStart,v=x.selectionEnd;if(C.shiftKey||(c=void 0),C.keyCode===37||C.keyCode===39){C.shiftKey&&c===void 0&&(c=x.selectionDirection==="forward"?$:v);const H=m[(C.keyCode===39?"right":"left")+(e.reverseFillMask===!0?"Reverse":"")];if(C.preventDefault(),H(x,c===$?v:$),C.shiftKey){const k=x.selectionStart;x.setSelectionRange(Math.min(c,k),Math.max(c,k),"forward")}}else C.keyCode===8&&e.reverseFillMask!==!0&&$===v?(m.left(x,$),x.setSelectionRange(x.selectionStart,v,"backward")):C.keyCode===46&&e.reverseFillMask===!0&&$===v&&(m.rightReverse(x,v),x.setSelectionRange($,x.selectionEnd,"forward"))}function F(C){if(C==null||C==="")return"";if(e.reverseFillMask===!0)return j(C);const x=s;let $=0,v="";for(let H=0;H=0&&v>-1;k--){const Z=x[k];let Y=C[v];if(typeof Z=="string")H=Z+H,Y===Z&&v--;else if(Y!==void 0&&Z.regex.test(Y))do H=(Z.transform!==void 0?Z.transform(Y):Y)+H,v--,Y=C[v];while($===k&&Y!==void 0&&Z.regex.test(Y));else return H}return H}function V(C){return typeof C!="string"||l===void 0?typeof C=="number"?l(""+C):C:l(C)}function N(C){return i.length-C.length<=0?C:e.reverseFillMask===!0&&C.length!==0?i.slice(0,-C.length)+C:C+i.slice(C.length)}return{innerValue:d,hasMask:u,moveCursorForPaste:M,updateMaskValue:q,onMaskedKeydown:w,onMaskedClick:_}}const pi={name:String};function Ja(e={}){return(t,n,o)=>{t[n](E("input",{class:"hidden"+(o||""),...e.value}))}}function Gg(e){return R(()=>e.name||e.for)}function em(e,t){function n(){const o=e.modelValue;try{const r="DataTransfer"in window?new DataTransfer:"ClipboardEvent"in window?new ClipboardEvent("").clipboardData:void 0;return Object(o)===o&&("length"in o?Array.from(o):[o]).forEach(i=>{r.items.add(i)}),{files:r.files}}catch{return{files:void 0}}}return R(t===!0?()=>{if(e.type==="file")return n()}:n)}const tm=/[\u3000-\u303f\u3040-\u309f\u30a0-\u30ff\uff00-\uff9f\u4e00-\u9faf\u3400-\u4dbf]/,nm=/[\u4e00-\u9fff\u3400-\u4dbf\u{20000}-\u{2a6df}\u{2a700}-\u{2b73f}\u{2b740}-\u{2b81f}\u{2b820}-\u{2ceaf}\uf900-\ufaff\u3300-\u33ff\ufe30-\ufe4f\uf900-\ufaff\u{2f800}-\u{2fa1f}]/u,om=/[\u3131-\u314e\u314f-\u3163\uac00-\ud7a3]/,rm=/[a-z0-9_ -]$/i;function im(e){return function(n){if(n.type==="compositionend"||n.type==="change"){if(n.target.qComposing!==!0)return;n.target.qComposing=!1,e(n)}else n.type==="compositionupdate"&&n.target.qComposing!==!0&&typeof n.data=="string"&&(we.is.firefox===!0?rm.test(n.data)===!1:tm.test(n.data)===!0||nm.test(n.data)===!0||om.test(n.data)===!0)===!0&&(n.target.qComposing=!0)}}var sm=$e({name:"QInput",inheritAttrs:!1,props:{...Ug,...Jg,...pi,modelValue:{required:!1},shadowText:String,type:{type:String,default:"text"},debounce:[String,Number],autogrow:Boolean,inputClass:[Array,String,Object],inputStyle:[Array,String,Object]},emits:[...Wg,"paste","change","keydown","click","animationend"],setup(e,{emit:t,attrs:n}){const{proxy:o}=ke(),{$q:r}=o,i={};let s=NaN,l,a,c=null,u;const d=he(null),f=Gg(e),{innerValue:p,hasMask:y,moveCursorForPaste:T,updateMaskValue:q,onMaskedKeydown:M,onMaskedClick:m}=Xg(e,t,Y,d),_=em(e,!0),w=R(()=>jr(p.value)),F=im(k),j=Qg(),V=R(()=>e.type==="textarea"||e.autogrow===!0),N=R(()=>V.value===!0||["text","search","url","tel","password"].includes(e.type)),C=R(()=>{const L={...j.splitAttrs.listeners.value,onInput:k,onPaste:H,onChange:W,onBlur:_e,onFocus:ko};return L.onCompositionstart=L.onCompositionupdate=L.onCompositionend=F,y.value===!0&&(L.onKeydown=M,L.onClick=m),e.autogrow===!0&&(L.onAnimationend=Z),L}),x=R(()=>{const L={tabindex:0,"data-autofocus":e.autofocus===!0||void 0,rows:e.type==="textarea"?6:void 0,"aria-label":e.label,name:f.value,...j.splitAttrs.attributes.value,id:j.targetUid.value,maxlength:e.maxlength,disabled:e.disable===!0,readonly:e.readonly===!0};return V.value===!1&&(L.type=e.type),e.autogrow===!0&&(L.rows=1),L});be(()=>e.type,()=>{d.value&&(d.value.value=e.modelValue)}),be(()=>e.modelValue,L=>{if(y.value===!0){if(a===!0&&(a=!1,String(L)===s))return;q(L)}else p.value!==L&&(p.value=L,e.type==="number"&&i.hasOwnProperty("value")===!0&&(l===!0?l=!1:delete i.value));e.autogrow===!0&&je(A)}),be(()=>e.autogrow,L=>{L===!0?je(A):d.value!==null&&n.rows>0&&(d.value.style.height="auto")}),be(()=>e.dense,()=>{e.autogrow===!0&&je(A)});function $(){mi(()=>{const L=document.activeElement;d.value!==null&&d.value!==L&&(L===null||L.id!==j.targetUid.value)&&d.value.focus({preventScroll:!0})})}function v(){d.value!==null&&d.value.select()}function H(L){if(y.value===!0&&e.reverseFillMask!==!0){const ue=L.target;T(ue,ue.selectionStart,ue.selectionEnd)}t("paste",L)}function k(L){if(!L||!L.target)return;if(e.type==="file"){t("update:modelValue",L.target.files);return}const ue=L.target.value;if(L.target.qComposing===!0){i.value=ue;return}if(y.value===!0)q(ue,!1,L.inputType);else if(Y(ue),N.value===!0&&L.target===document.activeElement){const{selectionStart:Re,selectionEnd:oe}=L.target;Re!==void 0&&oe!==void 0&&je(()=>{L.target===document.activeElement&&ue.indexOf(L.target.value)===0&&L.target.setSelectionRange(Re,oe)})}e.autogrow===!0&&A()}function Z(L){t("animationend",L),A()}function Y(L,ue){u=()=>{c=null,e.type!=="number"&&i.hasOwnProperty("value")===!0&&delete i.value,e.modelValue!==L&&s!==L&&(s=L,ue===!0&&(a=!0),t("update:modelValue",L),je(()=>{s===L&&(s=NaN)})),u=void 0},e.type==="number"&&(l=!0,i.value=L),e.debounce!==void 0?(c!==null&&clearTimeout(c),i.value=L,c=setTimeout(u,e.debounce)):u()}function A(){requestAnimationFrame(()=>{const L=d.value;if(L!==null){const ue=L.parentNode.style,{scrollTop:Re}=L,{overflowY:oe,maxHeight:ne}=r.platform.is.firefox===!0?{}:window.getComputedStyle(L),S=oe!==void 0&&oe!=="scroll";S===!0&&(L.style.overflowY="hidden"),ue.marginBottom=L.scrollHeight-1+"px",L.style.height="1px",L.style.height=L.scrollHeight+"px",S===!0&&(L.style.overflowY=parseInt(ne,10){d.value!==null&&(d.value.value=p.value!==void 0?p.value:"")})}function se(){return i.hasOwnProperty("value")===!0?i.value:p.value!==void 0?p.value:""}We(()=>{_e()}),Ut(()=>{e.autogrow===!0&&A()}),Object.assign(j,{innerValue:p,fieldClass:R(()=>`q-${V.value===!0?"textarea":"input"}`+(e.autogrow===!0?" q-textarea--autogrow":"")),hasShadow:R(()=>e.type!=="file"&&typeof e.shadowText=="string"&&e.shadowText.length!==0),inputRef:d,emitValue:Y,hasValue:w,floatingLabel:R(()=>w.value===!0&&(e.type!=="number"||isNaN(p.value)===!1)||jr(e.displayValue)),getControl:()=>E(V.value===!0?"textarea":"input",{ref:d,class:["q-field__native q-placeholder",e.inputClass],style:e.inputStyle,...x.value,...C.value,...e.type!=="file"?{value:se()}:_.value}),getShadowControl:()=>E("div",{class:"q-field__native q-field__shadow absolute-bottom no-pointer-events"+(V.value===!0?"":" text-no-wrap")},[E("span",{class:"invisible"},se()),E("span",e.shadowText)])});const fe=Yg(j);return Object.assign(o,{focus:$,select:v,getNativeElement:()=>d.value}),bn(o,"nativeEl",()=>d.value),fe}});function Xa(e,t){const n=he(null),o=R(()=>e.disable===!0?null:E("span",{ref:n,class:"no-outline",tabindex:-1}));function r(i){const s=t.value;i!==void 0&&i.type.indexOf("key")===0?s!==null&&document.activeElement!==s&&s.contains(document.activeElement)===!0&&s.focus():n.value!==null&&(i===void 0||s!==null&&s.contains(i.target)===!0)&&n.value.focus()}return{refocusTargetEl:o,refocusTarget:r}}var Ga={xs:30,sm:35,md:40,lg:50,xl:60};const lm=E("svg",{key:"svg",class:"q-radio__bg absolute non-selectable",viewBox:"0 0 24 24"},[E("path",{d:"M12,22a10,10 0 0 1 -10,-10a10,10 0 0 1 10,-10a10,10 0 0 1 10,10a10,10 0 0 1 -10,10m0,-22a12,12 0 0 0 -12,12a12,12 0 0 0 12,12a12,12 0 0 0 12,-12a12,12 0 0 0 -12,-12"}),E("path",{class:"q-radio__check",d:"M12,6a6,6 0 0 0 -6,6a6,6 0 0 0 6,6a6,6 0 0 0 6,-6a6,6 0 0 0 -6,-6"})]);var am=$e({name:"QRadio",props:{...Wt,...Yn,...pi,modelValue:{required:!0},val:{required:!0},label:String,leftLabel:Boolean,checkedIcon:String,uncheckedIcon:String,color:String,keepColor:Boolean,dense:Boolean,disable:Boolean,tabindex:[String,Number]},emits:["update:modelValue"],setup(e,{slots:t,emit:n}){const{proxy:o}=ke(),r=Qt(e,o.$q),i=Zn(e,Ga),s=he(null),{refocusTargetEl:l,refocusTarget:a}=Xa(e,s),c=R(()=>ie(e.modelValue)===ie(e.val)),u=R(()=>"q-radio cursor-pointer no-outline row inline no-wrap items-center"+(e.disable===!0?" disabled":"")+(r.value===!0?" q-radio--dark":"")+(e.dense===!0?" q-radio--dense":"")+(e.leftLabel===!0?" reverse":"")),d=R(()=>{const _=e.color!==void 0&&(e.keepColor===!0||c.value===!0)?` text-${e.color}`:"";return`q-radio__inner relative-position q-radio__inner--${c.value===!0?"truthy":"falsy"}${_}`}),f=R(()=>(c.value===!0?e.checkedIcon:e.uncheckedIcon)||null),p=R(()=>e.disable===!0?-1:e.tabindex||0),y=R(()=>{const _={type:"radio"};return e.name!==void 0&&Object.assign(_,{".checked":c.value===!0,"^checked":c.value===!0?"checked":void 0,name:e.name,value:e.val}),_}),T=Ja(y);function q(_){_!==void 0&&(Ke(_),a(_)),e.disable!==!0&&c.value!==!0&&n("update:modelValue",e.val,_)}function M(_){(_.keyCode===13||_.keyCode===32)&&Ke(_)}function m(_){(_.keyCode===13||_.keyCode===32)&&q(_)}return Object.assign(o,{set:q}),()=>{const _=f.value!==null?[E("div",{key:"icon",class:"q-radio__icon-container absolute-full flex flex-center no-wrap"},[E(pt,{class:"q-radio__icon",name:f.value})])]:[lm];e.disable!==!0&&T(_,"unshift"," q-radio__native q-ma-none q-pa-none");const w=[E("div",{class:d.value,style:i.value,"aria-hidden":"true"},_)];l.value!==null&&w.push(l.value);const F=e.label!==void 0?It(t.default,[e.label]):tt(t.default);return F!==void 0&&w.push(E("div",{class:"q-radio__label q-anchor--skip"},F)),E("div",{ref:s,class:u.value,tabindex:p.value,role:"radio","aria-label":e.label,"aria-checked":c.value===!0?"true":"false","aria-disabled":e.disable===!0?"true":void 0,onClick:q,onKeydown:M,onKeyup:m},w)}}});const eu={...Wt,...Yn,...pi,modelValue:{required:!0,default:null},val:{},trueValue:{default:!0},falseValue:{default:!1},indeterminateValue:{default:null},checkedIcon:String,uncheckedIcon:String,indeterminateIcon:String,toggleOrder:{type:String,validator:e=>e==="tf"||e==="ft"},toggleIndeterminate:Boolean,label:String,leftLabel:Boolean,color:String,keepColor:Boolean,dense:Boolean,disable:Boolean,tabindex:[String,Number]},tu=["update:modelValue"];function nu(e,t){const{props:n,slots:o,emit:r,proxy:i}=ke(),{$q:s}=i,l=Qt(n,s),a=he(null),{refocusTargetEl:c,refocusTarget:u}=Xa(n,a),d=Zn(n,Ga),f=R(()=>n.val!==void 0&&Array.isArray(n.modelValue)),p=R(()=>{const v=ie(n.val);return f.value===!0?n.modelValue.findIndex(H=>ie(H)===v):-1}),y=R(()=>f.value===!0?p.value>-1:ie(n.modelValue)===ie(n.trueValue)),T=R(()=>f.value===!0?p.value===-1:ie(n.modelValue)===ie(n.falseValue)),q=R(()=>y.value===!1&&T.value===!1),M=R(()=>n.disable===!0?-1:n.tabindex||0),m=R(()=>`q-${e} cursor-pointer no-outline row inline no-wrap items-center`+(n.disable===!0?" disabled":"")+(l.value===!0?` q-${e}--dark`:"")+(n.dense===!0?` q-${e}--dense`:"")+(n.leftLabel===!0?" reverse":"")),_=R(()=>{const v=y.value===!0?"truthy":T.value===!0?"falsy":"indet",H=n.color!==void 0&&(n.keepColor===!0||(e==="toggle"?y.value===!0:T.value!==!0))?` text-${n.color}`:"";return`q-${e}__inner relative-position non-selectable q-${e}__inner--${v}${H}`}),w=R(()=>{const v={type:"checkbox"};return n.name!==void 0&&Object.assign(v,{".checked":y.value,"^checked":y.value===!0?"checked":void 0,name:n.name,value:f.value===!0?n.val:n.trueValue}),v}),F=Ja(w),j=R(()=>{const v={tabindex:M.value,role:e==="toggle"?"switch":"checkbox","aria-label":n.label,"aria-checked":q.value===!0?"mixed":y.value===!0?"true":"false"};return n.disable===!0&&(v["aria-disabled"]="true"),v});function V(v){v!==void 0&&(Ke(v),u(v)),n.disable!==!0&&r("update:modelValue",N(),v)}function N(){if(f.value===!0){if(y.value===!0){const v=n.modelValue.slice();return v.splice(p.value,1),v}return n.modelValue.concat([n.val])}if(y.value===!0){if(n.toggleOrder!=="ft"||n.toggleIndeterminate===!1)return n.falseValue}else if(T.value===!0){if(n.toggleOrder==="ft"||n.toggleIndeterminate===!1)return n.trueValue}else return n.toggleOrder!=="ft"?n.trueValue:n.falseValue;return n.indeterminateValue}function C(v){(v.keyCode===13||v.keyCode===32)&&Ke(v)}function x(v){(v.keyCode===13||v.keyCode===32)&&V(v)}const $=t(y,q);return Object.assign(i,{toggle:V}),()=>{const v=$();n.disable!==!0&&F(v,"unshift",` q-${e}__native absolute q-ma-none q-pa-none`);const H=[E("div",{class:_.value,style:d.value,"aria-hidden":"true"},v)];c.value!==null&&H.push(c.value);const k=n.label!==void 0?It(o.default,[n.label]):tt(o.default);return k!==void 0&&H.push(E("div",{class:`q-${e}__label q-anchor--skip`},k)),E("div",{ref:a,class:m.value,...j.value,onClick:V,onKeydown:C,onKeyup:x},H)}}const um=E("div",{key:"svg",class:"q-checkbox__bg absolute"},[E("svg",{class:"q-checkbox__svg fit absolute-full",viewBox:"0 0 24 24"},[E("path",{class:"q-checkbox__truthy",fill:"none",d:"M1.73,12.91 8.1,19.28 22.79,4.59"}),E("path",{class:"q-checkbox__indet",d:"M4,14H20V10H4"})])]);var cm=$e({name:"QCheckbox",props:eu,emits:tu,setup(e){function t(n,o){const r=R(()=>(n.value===!0?e.checkedIcon:o.value===!0?e.indeterminateIcon:e.uncheckedIcon)||null);return()=>r.value!==null?[E("div",{key:"icon",class:"q-checkbox__icon-container absolute-full flex flex-center no-wrap"},[E(pt,{class:"q-checkbox__icon",name:r.value})])]:[um]}return nu("checkbox",t)}}),fm=$e({name:"QToggle",props:{...eu,icon:String,iconColor:String},emits:tu,setup(e){function t(n,o){const r=R(()=>(n.value===!0?e.checkedIcon:o.value===!0?e.indeterminateIcon:e.uncheckedIcon)||e.icon),i=R(()=>n.value===!0?e.iconColor:null);return()=>[E("div",{class:"q-toggle__track"}),E("div",{class:"q-toggle__thumb absolute flex flex-center no-wrap"},r.value!==void 0?[E(pt,{name:r.value,color:i.value})]:void 0)]}return nu("toggle",t)}});const ou={radio:am,checkbox:cm,toggle:fm},dm=Object.keys(ou);var hm=$e({name:"QOptionGroup",props:{...Wt,modelValue:{required:!0},options:{type:Array,validator:e=>e.every(t=>"value"in t&&"label"in t)},name:String,type:{default:"radio",validator:e=>dm.includes(e)},color:String,keepColor:Boolean,dense:Boolean,size:String,leftLabel:Boolean,inline:Boolean,disable:Boolean},emits:["update:modelValue"],setup(e,{emit:t,slots:n}){const{proxy:{$q:o}}=ke(),r=Array.isArray(e.modelValue);e.type==="radio"?r===!0&&console.error("q-option-group: model should not be array"):r===!1&&console.error("q-option-group: model should be array in your case");const i=Qt(e,o),s=R(()=>ou[e.type]),l=R(()=>"q-option-group q-gutter-x-sm"+(e.inline===!0?" q-option-group--inline":"")),a=R(()=>{const u={role:"group"};return e.type==="radio"&&(u.role="radiogroup",e.disable===!0&&(u["aria-disabled"]="true")),u});function c(u){t("update:modelValue",u)}return()=>E("div",{class:l.value,...a.value},e.options.map((u,d)=>{const f=n["label-"+d]!==void 0?()=>n["label-"+d](u):n.label!==void 0?()=>n.label(u):void 0;return E("div",[E(s.value,{modelValue:e.modelValue,val:u.value,name:u.name===void 0?e.name:u.name,disable:e.disable||u.disable,label:f===void 0?u.label:null,leftLabel:u.leftLabel===void 0?e.leftLabel:u.leftLabel,color:u.color===void 0?e.color:u.color,checkedIcon:u.checkedIcon,uncheckedIcon:u.uncheckedIcon,dark:u.dark||i.value,size:u.size===void 0?e.size:u.size,dense:e.dense,keepColor:u.keepColor===void 0?e.keepColor:u.keepColor,"onUpdate:modelValue":c},f)])}))}}),gm=$e({name:"DialogPlugin",props:{...Wt,title:String,message:String,prompt:Object,options:Object,progress:[Boolean,Object],html:Boolean,ok:{type:[String,Object,Boolean],default:!0},cancel:[String,Object,Boolean],focus:{type:String,default:"ok",validator:e=>["ok","cancel","none"].includes(e)},stackButtons:Boolean,color:String,cardClass:[String,Array,Object],cardStyle:[String,Array,Object]},emits:["ok","hide"],setup(e,{emit:t}){const{proxy:n}=ke(),{$q:o}=n,r=Qt(e,o),i=he(null),s=he(e.prompt!==void 0?e.prompt.model:e.options!==void 0?e.options.model:void 0),l=R(()=>"q-dialog-plugin"+(r.value===!0?" q-dialog-plugin--dark q-dark":"")+(e.progress!==!1?" q-dialog-plugin--progress":"")),a=R(()=>e.color||(r.value===!0?"amber":"primary")),c=R(()=>e.progress===!1?null:at(e.progress)===!0?{component:e.progress.spinner||Un,props:{color:e.progress.color||a.value}}:{component:Un,props:{color:a.value}}),u=R(()=>e.prompt!==void 0||e.options!==void 0),d=R(()=>{if(u.value!==!0)return{};const{model:k,isValid:Z,items:Y,...A}=e.prompt!==void 0?e.prompt:e.options;return A}),f=R(()=>at(e.ok)===!0||e.ok===!0?o.lang.label.ok:e.ok),p=R(()=>at(e.cancel)===!0||e.cancel===!0?o.lang.label.cancel:e.cancel),y=R(()=>e.prompt!==void 0?e.prompt.isValid!==void 0&&e.prompt.isValid(s.value)!==!0:e.options!==void 0?e.options.isValid!==void 0&&e.options.isValid(s.value)!==!0:!1),T=R(()=>({color:a.value,label:f.value,ripple:!1,disable:y.value,...at(e.ok)===!0?e.ok:{flat:!0},"data-autofocus":e.focus==="ok"&&u.value!==!0||void 0,onClick:_})),q=R(()=>({color:a.value,label:p.value,ripple:!1,...at(e.cancel)===!0?e.cancel:{flat:!0},"data-autofocus":e.focus==="cancel"&&u.value!==!0||void 0,onClick:w}));be(()=>e.prompt&&e.prompt.model,j),be(()=>e.options&&e.options.model,j);function M(){i.value.show()}function m(){i.value.hide()}function _(){t("ok",ie(s.value)),m()}function w(){m()}function F(){t("hide")}function j(k){s.value=k}function V(k){y.value!==!0&&e.prompt.type!=="textarea"&&zn(k,13)===!0&&_()}function N(k,Z){return e.html===!0?E(En,{class:k,innerHTML:Z}):E(En,{class:k},()=>Z)}function C(){return[E(sm,{color:a.value,dense:!0,autofocus:!0,dark:r.value,...d.value,modelValue:s.value,"onUpdate:modelValue":j,onKeyup:V})]}function x(){return[E(hm,{color:a.value,options:e.options.items,dark:r.value,...d.value,modelValue:s.value,"onUpdate:modelValue":j})]}function $(){const k=[];return e.cancel&&k.push(E(Br,q.value)),e.ok&&k.push(E(Br,T.value)),E(Fg,{class:e.stackButtons===!0?"items-end":"",vertical:e.stackButtons,align:"right"},()=>k)}function v(){const k=[];return e.title&&k.push(N("q-dialog__title",e.title)),e.progress!==!1&&k.push(E(En,{class:"q-dialog__progress"},()=>E(c.value.component,c.value.props))),e.message&&k.push(N("q-dialog__message",e.message)),e.prompt!==void 0?k.push(E(En,{class:"scroll q-dialog-plugin__form"},C)):e.options!==void 0&&k.push(E(Ks,{dark:r.value}),E(En,{class:"scroll q-dialog-plugin__form"},x),E(Ks,{dark:r.value})),(e.ok||e.cancel)&&k.push($()),k}function H(){return[E(Bg,{class:[l.value,e.cardClass],style:e.cardStyle,dark:r.value},v)]}return Object.assign(n,{show:M,hide:m}),()=>E(Lg,{ref:i,onHide:F},H)}});function ru(e,t){for(const n in t)n!=="spinner"&&Object(t[n])===t[n]?(e[n]=Object(e[n])!==e[n]?{}:{...e[n]},ru(e[n],t[n])):e[n]=t[n]}function mm(e,t,n){return o=>{let r,i;const s=t===!0&&o.component!==void 0;if(s===!0){const{component:m,componentProps:_}=o;r=typeof m=="string"?n.component(m):m,i=_||{}}else{const{class:m,style:_,...w}=o;r=e,i=w,m!==void 0&&(w.cardClass=m),_!==void 0&&(w.cardStyle=_)}let l,a=!1;const c=he(null),u=hi(!1,"dialog"),d=m=>{if(c.value!==null&&c.value[m]!==void 0){c.value[m]();return}const _=l.$.subTree;if(_&&_.component){if(_.component.proxy&&_.component.proxy[m]){_.component.proxy[m]();return}if(_.component.subTree&&_.component.subTree.component&&_.component.subTree.component.proxy&&_.component.subTree.component.proxy[m]){_.component.subTree.component.proxy[m]();return}}console.error("[Quasar] Incorrectly defined Dialog component")},f=[],p=[],y={onOk(m){return f.push(m),y},onCancel(m){return p.push(m),y},onDismiss(m){return f.push(m),p.push(m),y},hide(){return d("hide"),y},update(m){if(l!==null){if(s===!0)Object.assign(i,m);else{const{class:_,style:w,...F}=m;_!==void 0&&(F.cardClass=_),w!==void 0&&(F.cardStyle=w),ru(i,F)}l.$forceUpdate()}return y}},T=m=>{a=!0,f.forEach(_=>{_(m)})},q=()=>{M.unmount(u),Fa(u),M=null,l=null,a!==!0&&p.forEach(m=>{m()})};let M=ma({name:"QGlobalDialog",setup:()=>()=>E(r,{...i,ref:c,onOk:T,onHide:q,onVnodeMounted(...m){typeof i.onVnodeMounted=="function"&&i.onVnodeMounted(...m),je(()=>d("show"))}})},n);return l=M.mount(u),y}}var pm={install({$q:e,parentApp:t}){e.dialog=mm(gm,!0,t),this.__installed!==!0&&(this.create=e.dialog)}},vm={config:{staticPath:"/nostrmarket/static/market/"},plugins:{Notify:ig,LocalStorage:Da,Dialog:pm}};async function bm({app:e,router:t}){e.use(t),e.mount("#q-app")}Ch(la,vm).then(bm);export{Zn as $,Pt as A,Vm as B,Be as C,za as D,Ka as E,je as F,zn as G,Et as H,Kf as I,Uf as J,vo as K,we as L,hg as M,pg as N,gg as O,Tr as P,dg as Q,fg as R,vg as S,mg as T,xg as U,cn as V,Ke as W,Wt as X,Yn as Y,Qt as Z,dd as _,R as a,wm as a$,Lm as a0,pt as a1,Eh as a2,Nh as a3,ua as a4,vc as a5,Fo as a6,Ll as a7,$h as a8,Lh as a9,da as aA,nr as aB,Ug as aC,Wg as aD,Yg as aE,Qg as aF,pi as aG,Gg as aH,jr as aI,Fl as aJ,ri as aK,im as aL,Lg as aM,Rm as aN,Pm as aO,_m as aP,Cm as aQ,Oh as aR,ym as aS,Qc as aT,Xe as aU,En as aV,Ks as aW,km as aX,sm as aY,cm as aZ,Em as a_,Un as aa,zh as ab,Kh as ac,$m as ad,Og as ae,Hf as af,Hs as ag,Ds as ah,_g as ai,Mg as aj,mi as ak,Fh as al,Zh as am,Kg as an,Im as ao,Br as ap,ko as aq,Aa as ar,Ma as as,Fm as at,kh as au,Nm as av,jm as aw,rd as ax,Am as ay,Al as az,tt as b,Bg as b0,zm as b1,Hm as b2,La as b3,id as b4,Fg as b5,hm as b6,Dm as b7,Bm as b8,xm as b9,ml as ba,Sm as bb,$a as bc,qr as bd,Om as be,Wr as bf,Ur as bg,Vt as bh,$e as c,qm as d,Mm as e,qt as f,ke as g,E as h,ut as i,Km as j,pn as k,Tm as l,It as m,Lo as n,ii as o,fo as p,xc as q,he as r,Wl as s,Yl as t,sc as u,Jl as v,be as w,Fe as x,Ut as y,We as z}; + */const en=typeof window!="undefined";function pd(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const ge=Object.assign;function or(e,t){const n={};for(const o in t){const r=t[o];n[o]=rt(r)?r.map(e):e(r)}return n}const Ln=()=>{},rt=Array.isArray,vd=/\/$/,bd=e=>e.replace(vd,"");function rr(e,t,n="/"){let o,r={},i="",s="";const l=t.indexOf("#");let a=t.indexOf("?");return l=0&&(a=-1),a>-1&&(o=t.slice(0,a),i=t.slice(a+1,l>-1?l:t.length),r=e(i)),l>-1&&(o=o||t.slice(0,l),s=t.slice(l,t.length)),o=xd(o!=null?o:t,n),{fullPath:o+(i&&"?")+i+s,path:o,query:r,hash:s}}function yd(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function us(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function _d(e,t,n){const o=t.matched.length-1,r=n.matched.length-1;return o>-1&&o===r&&fn(t.matched[o],n.matched[r])&&pa(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function fn(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function pa(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!wd(e[n],t[n]))return!1;return!0}function wd(e,t){return rt(e)?cs(e,t):rt(t)?cs(t,e):e===t}function cs(e,t){return rt(t)?e.length===t.length&&e.every((n,o)=>n===t[o]):e.length===1&&e[0]===t}function xd(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),o=e.split("/"),r=o[o.length-1];(r===".."||r===".")&&o.push("");let i=n.length-1,s,l;for(s=0;s1&&i--;else break;return n.slice(0,i).join("/")+"/"+o.slice(s-(s===o.length?1:0)).join("/")}var Kn;(function(e){e.pop="pop",e.push="push"})(Kn||(Kn={}));var Bn;(function(e){e.back="back",e.forward="forward",e.unknown=""})(Bn||(Bn={}));function Cd(e){if(!e)if(en){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),bd(e)}const kd=/^[^#]+#/;function Ed(e,t){return e.replace(kd,"#")+t}function Sd(e,t){const n=document.documentElement.getBoundingClientRect(),o=e.getBoundingClientRect();return{behavior:t.behavior,left:o.left-n.left-(t.left||0),top:o.top-n.top-(t.top||0)}}const zo=()=>({left:window.pageXOffset,top:window.pageYOffset});function Rd(e){let t;if("el"in e){const n=e.el,o=typeof n=="string"&&n.startsWith("#"),r=typeof n=="string"?o?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r)return;t=Sd(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.pageXOffset,t.top!=null?t.top:window.pageYOffset)}function fs(e,t){return(history.state?history.state.position-t:-1)+e}const Ar=new Map;function Pd(e,t){Ar.set(e,t)}function Td(e){const t=Ar.get(e);return Ar.delete(e),t}let qd=()=>location.protocol+"//"+location.host;function va(e,t){const{pathname:n,search:o,hash:r}=t,i=e.indexOf("#");if(i>-1){let l=r.includes(e.slice(i))?e.slice(i).length:1,a=r.slice(l);return a[0]!=="/"&&(a="/"+a),us(a,"")}return us(n,e)+o+r}function Ad(e,t,n,o){let r=[],i=[],s=null;const l=({state:f})=>{const p=va(e,location),y=n.value,T=t.value;let q=0;if(f){if(n.value=p,t.value=f,s&&s===y){s=null;return}q=T?f.position-T.position:0}else o(p);r.forEach(M=>{M(n.value,y,{delta:q,type:Kn.pop,direction:q?q>0?Bn.forward:Bn.back:Bn.unknown})})};function a(){s=n.value}function c(f){r.push(f);const p=()=>{const y=r.indexOf(f);y>-1&&r.splice(y,1)};return i.push(p),p}function u(){const{history:f}=window;!f.state||f.replaceState(ge({},f.state,{scroll:zo()}),"")}function d(){for(const f of i)f();i=[],window.removeEventListener("popstate",l),window.removeEventListener("beforeunload",u)}return window.addEventListener("popstate",l),window.addEventListener("beforeunload",u,{passive:!0}),{pauseListeners:a,listen:c,destroy:d}}function ds(e,t,n,o=!1,r=!1){return{back:e,current:t,forward:n,replaced:o,position:window.history.length,scroll:r?zo():null}}function Md(e){const{history:t,location:n}=window,o={value:va(e,n)},r={value:t.state};r.value||i(o.value,{back:null,current:o.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function i(a,c,u){const d=e.indexOf("#"),f=d>-1?(n.host&&document.querySelector("base")?e:e.slice(d))+a:qd()+e+a;try{t[u?"replaceState":"pushState"](c,"",f),r.value=c}catch(p){console.error(p),n[u?"replace":"assign"](f)}}function s(a,c){const u=ge({},t.state,ds(r.value.back,a,r.value.forward,!0),c,{position:r.value.position});i(a,u,!0),o.value=a}function l(a,c){const u=ge({},r.value,t.state,{forward:a,scroll:zo()});i(u.current,u,!0);const d=ge({},ds(o.value,a,null),{position:u.position+1},c);i(a,d,!1),o.value=a}return{location:o,state:r,push:l,replace:s}}function Od(e){e=Cd(e);const t=Md(e),n=Ad(e,t.state,t.location,t.replace);function o(i,s=!0){s||n.pauseListeners(),history.go(i)}const r=ge({location:"",base:e,go:o,createHref:Ed.bind(null,e)},t,n);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>t.state.value}),r}function $d(e){return e=location.host?e||location.pathname+location.search:"",e.includes("#")||(e+="#"),Od(e)}function Ld(e){return typeof e=="string"||e&&typeof e=="object"}function ba(e){return typeof e=="string"||typeof e=="symbol"}const _t={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},ya=Symbol("");var hs;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(hs||(hs={}));function dn(e,t){return ge(new Error,{type:e,[ya]:!0},t)}function ft(e,t){return e instanceof Error&&ya in e&&(t==null||!!(e.type&t))}const gs="[^/]+?",Bd={sensitive:!1,strict:!1,start:!0,end:!0},Fd=/[.+*?^${}()[\]/\\]/g;function Id(e,t){const n=ge({},Bd,t),o=[];let r=n.start?"^":"";const i=[];for(const c of e){const u=c.length?[]:[90];n.strict&&!c.length&&(r+="/");for(let d=0;dt.length?t.length===1&&t[0]===40+40?1:-1:0}function jd(e,t){let n=0;const o=e.score,r=t.score;for(;n0&&t[t.length-1]<0}const Vd={type:0,value:""},Dd=/[a-zA-Z0-9_]/;function Hd(e){if(!e)return[[]];if(e==="/")return[[Vd]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(p){throw new Error(`ERR (${n})/"${c}": ${p}`)}let n=0,o=n;const r=[];let i;function s(){i&&r.push(i),i=[]}let l=0,a,c="",u="";function d(){!c||(n===0?i.push({type:0,value:c}):n===1||n===2||n===3?(i.length>1&&(a==="*"||a==="+")&&t(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),i.push({type:1,value:c,regexp:u,repeatable:a==="*"||a==="+",optional:a==="*"||a==="?"})):t("Invalid state to consume buffer"),c="")}function f(){c+=a}for(;l{s(m)}:Ln}function s(u){if(ba(u)){const d=o.get(u);d&&(o.delete(u),n.splice(n.indexOf(d),1),d.children.forEach(s),d.alias.forEach(s))}else{const d=n.indexOf(u);d>-1&&(n.splice(d,1),u.record.name&&o.delete(u.record.name),u.children.forEach(s),u.alias.forEach(s))}}function l(){return n}function a(u){let d=0;for(;d=0&&(u.record.path!==n[d].record.path||!_a(u,n[d]));)d++;n.splice(d,0,u),u.record.name&&!vs(u)&&o.set(u.record.name,u)}function c(u,d){let f,p={},y,T;if("name"in u&&u.name){if(f=o.get(u.name),!f)throw dn(1,{location:u});T=f.record.name,p=ge(ps(d.params,f.keys.filter(m=>!m.optional).map(m=>m.name)),u.params&&ps(u.params,f.keys.map(m=>m.name))),y=f.stringify(p)}else if("path"in u)y=u.path,f=n.find(m=>m.re.test(y)),f&&(p=f.parse(y),T=f.record.name);else{if(f=d.name?o.get(d.name):n.find(m=>m.re.test(d.path)),!f)throw dn(1,{location:u,currentLocation:d});T=f.record.name,p=ge({},d.params,u.params),y=f.stringify(p)}const q=[];let M=f;for(;M;)q.unshift(M.record),M=M.parent;return{name:T,path:y,params:p,matched:q,meta:Qd(q)}}return e.forEach(u=>i(u)),{addRoute:i,resolve:c,removeRoute:s,getRoutes:l,getRecordMatcher:r}}function ps(e,t){const n={};for(const o of t)o in e&&(n[o]=e[o]);return n}function Ud(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:Wd(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}}}function Wd(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const o in e.components)t[o]=typeof n=="object"?n[o]:n;return t}function vs(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Qd(e){return e.reduce((t,n)=>ge(t,n.meta),{})}function bs(e,t){const n={};for(const o in e)n[o]=o in t?t[o]:e[o];return n}function _a(e,t){return t.children.some(n=>n===e||_a(e,n))}const wa=/#/g,Yd=/&/g,Zd=/\//g,Jd=/=/g,Xd=/\?/g,xa=/\+/g,Gd=/%5B/g,eh=/%5D/g,Ca=/%5E/g,th=/%60/g,ka=/%7B/g,nh=/%7C/g,Ea=/%7D/g,oh=/%20/g;function fi(e){return encodeURI(""+e).replace(nh,"|").replace(Gd,"[").replace(eh,"]")}function rh(e){return fi(e).replace(ka,"{").replace(Ea,"}").replace(Ca,"^")}function Mr(e){return fi(e).replace(xa,"%2B").replace(oh,"+").replace(wa,"%23").replace(Yd,"%26").replace(th,"`").replace(ka,"{").replace(Ea,"}").replace(Ca,"^")}function ih(e){return Mr(e).replace(Jd,"%3D")}function sh(e){return fi(e).replace(wa,"%23").replace(Xd,"%3F")}function lh(e){return e==null?"":sh(e).replace(Zd,"%2F")}function Ro(e){try{return decodeURIComponent(""+e)}catch{}return""+e}function ah(e){const t={};if(e===""||e==="?")return t;const o=(e[0]==="?"?e.slice(1):e).split("&");for(let r=0;ri&&Mr(i)):[o&&Mr(o)]).forEach(i=>{i!==void 0&&(t+=(t.length?"&":"")+n,i!=null&&(t+="="+i))})}return t}function uh(e){const t={};for(const n in e){const o=e[n];o!==void 0&&(t[n]=rt(o)?o.map(r=>r==null?null:""+r):o==null?o:""+o)}return t}const ch=Symbol(""),_s=Symbol(""),di=Symbol(""),Sa=Symbol(""),Or=Symbol("");function xn(){let e=[];function t(o){return e.push(o),()=>{const r=e.indexOf(o);r>-1&&e.splice(r,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function Ct(e,t,n,o,r){const i=o&&(o.enterCallbacks[r]=o.enterCallbacks[r]||[]);return()=>new Promise((s,l)=>{const a=d=>{d===!1?l(dn(4,{from:n,to:t})):d instanceof Error?l(d):Ld(d)?l(dn(2,{from:t,to:d})):(i&&o.enterCallbacks[r]===i&&typeof d=="function"&&i.push(d),s())},c=e.call(o&&o.instances[r],t,n,a);let u=Promise.resolve(c);e.length<3&&(u=u.then(a)),u.catch(d=>l(d))})}function ir(e,t,n,o){const r=[];for(const i of e)for(const s in i.components){let l=i.components[s];if(!(t!=="beforeRouteEnter"&&!i.instances[s]))if(fh(l)){const c=(l.__vccOpts||l)[t];c&&r.push(Ct(c,n,o,i,s))}else{let a=l();r.push(()=>a.then(c=>{if(!c)return Promise.reject(new Error(`Couldn't resolve component "${s}" at "${i.path}"`));const u=pd(c)?c.default:c;i.components[s]=u;const f=(u.__vccOpts||u)[t];return f&&Ct(f,n,o,i,s)()}))}}return r}function fh(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function ws(e){const t=ut(di),n=ut(Sa),o=R(()=>t.resolve(Vt(e.to))),r=R(()=>{const{matched:a}=o.value,{length:c}=a,u=a[c-1],d=n.matched;if(!u||!d.length)return-1;const f=d.findIndex(fn.bind(null,u));if(f>-1)return f;const p=xs(a[c-2]);return c>1&&xs(u)===p&&d[d.length-1].path!==p?d.findIndex(fn.bind(null,a[c-2])):f}),i=R(()=>r.value>-1&&mh(n.params,o.value.params)),s=R(()=>r.value>-1&&r.value===n.matched.length-1&&pa(n.params,o.value.params));function l(a={}){return gh(a)?t[Vt(e.replace)?"replace":"push"](Vt(e.to)).catch(Ln):Promise.resolve()}return{route:o,href:R(()=>o.value.href),isActive:i,isExactActive:s,navigate:l}}const dh=Lo({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:ws,setup(e,{slots:t}){const n=pn(ws(e)),{options:o}=ut(di),r=R(()=>({[Cs(e.activeClass,o.linkActiveClass,"router-link-active")]:n.isActive,[Cs(e.exactActiveClass,o.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const i=t.default&&t.default(n);return e.custom?i:E("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},i)}}}),hh=dh;function gh(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function mh(e,t){for(const n in t){const o=t[n],r=e[n];if(typeof o=="string"){if(o!==r)return!1}else if(!rt(r)||r.length!==o.length||o.some((i,s)=>i!==r[s]))return!1}return!0}function xs(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Cs=(e,t,n)=>e!=null?e:t!=null?t:n,ph=Lo({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const o=ut(Or),r=R(()=>e.route||o.value),i=ut(_s,0),s=R(()=>{let c=Vt(i);const{matched:u}=r.value;let d;for(;(d=u[c])&&!d.components;)c++;return c}),l=R(()=>r.value.matched[s.value]);fo(_s,R(()=>s.value+1)),fo(ch,l),fo(Or,r);const a=he();return be(()=>[a.value,l.value,e.name],([c,u,d],[f,p,y])=>{u&&(u.instances[d]=c,p&&p!==u&&c&&c===f&&(u.leaveGuards.size||(u.leaveGuards=p.leaveGuards),u.updateGuards.size||(u.updateGuards=p.updateGuards))),c&&u&&(!p||!fn(u,p)||!f)&&(u.enterCallbacks[d]||[]).forEach(T=>T(c))},{flush:"post"}),()=>{const c=r.value,u=e.name,d=l.value,f=d&&d.components[u];if(!f)return ks(n.default,{Component:f,route:c});const p=d.props[u],y=p?p===!0?c.params:typeof p=="function"?p(c):p:null,q=E(f,ge({},y,t,{onVnodeUnmounted:M=>{M.component.isUnmounted&&(d.instances[u]=null)},ref:a}));return ks(n.default,{Component:q,route:c})||q}}});function ks(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const vh=ph;function bh(e){const t=Kd(e.routes,e),n=e.parseQuery||ah,o=e.stringifyQuery||ys,r=e.history,i=xn(),s=xn(),l=xn(),a=Yu(_t);let c=_t;en&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=or.bind(null,S=>""+S),d=or.bind(null,lh),f=or.bind(null,Ro);function p(S,Q){let z,X;return ba(S)?(z=t.getRecordMatcher(S),X=Q):X=S,t.addRoute(X,z)}function y(S){const Q=t.getRecordMatcher(S);Q&&t.removeRoute(Q)}function T(){return t.getRoutes().map(S=>S.record)}function q(S){return!!t.getRecordMatcher(S)}function M(S,Q){if(Q=ge({},Q||a.value),typeof S=="string"){const b=rr(n,S,Q.path),P=t.resolve({path:b.path},Q),O=r.createHref(b.fullPath);return ge(b,P,{params:f(P.params),hash:Ro(b.hash),redirectedFrom:void 0,href:O})}let z;if("path"in S)z=ge({},S,{path:rr(n,S.path,Q.path).path});else{const b=ge({},S.params);for(const P in b)b[P]==null&&delete b[P];z=ge({},S,{params:d(b)}),Q.params=d(Q.params)}const X=t.resolve(z,Q),de=S.hash||"";X.params=u(f(X.params));const h=yd(o,ge({},S,{hash:rh(de),path:X.path})),g=r.createHref(h);return ge({fullPath:h,hash:de,query:o===ys?uh(S.query):S.query||{}},X,{redirectedFrom:void 0,href:g})}function m(S){return typeof S=="string"?rr(n,S,a.value.path):ge({},S)}function _(S,Q){if(c!==S)return dn(8,{from:Q,to:S})}function w(S){return V(S)}function F(S){return w(ge(m(S),{replace:!0}))}function j(S){const Q=S.matched[S.matched.length-1];if(Q&&Q.redirect){const{redirect:z}=Q;let X=typeof z=="function"?z(S):z;return typeof X=="string"&&(X=X.includes("?")||X.includes("#")?X=m(X):{path:X},X.params={}),ge({query:S.query,hash:S.hash,params:"path"in X?{}:S.params},X)}}function V(S,Q){const z=c=M(S),X=a.value,de=S.state,h=S.force,g=S.replace===!0,b=j(z);if(b)return V(ge(m(b),{state:typeof b=="object"?ge({},de,b.state):de,force:h,replace:g}),Q||z);const P=z;P.redirectedFrom=Q;let O;return!h&&_d(o,X,z)&&(O=dn(16,{to:P,from:X}),fe(X,X,!0,!1)),(O?Promise.resolve(O):x(P,X)).catch(B=>ft(B)?ft(B,2)?B:se(B):W(B,P,X)).then(B=>{if(B){if(ft(B,2))return V(ge({replace:g},m(B.to),{state:typeof B.to=="object"?ge({},de,B.to.state):de,force:h}),Q||P)}else B=v(P,X,!0,g,de);return $(P,X,B),B})}function N(S,Q){const z=_(S,Q);return z?Promise.reject(z):Promise.resolve()}function C(S){const Q=Re.values().next().value;return Q&&typeof Q.runWithContext=="function"?Q.runWithContext(S):S()}function x(S,Q){let z;const[X,de,h]=yh(S,Q);z=ir(X.reverse(),"beforeRouteLeave",S,Q);for(const b of X)b.leaveGuards.forEach(P=>{z.push(Ct(P,S,Q))});const g=N.bind(null,S,Q);return z.push(g),ne(z).then(()=>{z=[];for(const b of i.list())z.push(Ct(b,S,Q));return z.push(g),ne(z)}).then(()=>{z=ir(de,"beforeRouteUpdate",S,Q);for(const b of de)b.updateGuards.forEach(P=>{z.push(Ct(P,S,Q))});return z.push(g),ne(z)}).then(()=>{z=[];for(const b of h)if(b.beforeEnter)if(rt(b.beforeEnter))for(const P of b.beforeEnter)z.push(Ct(P,S,Q));else z.push(Ct(b.beforeEnter,S,Q));return z.push(g),ne(z)}).then(()=>(S.matched.forEach(b=>b.enterCallbacks={}),z=ir(h,"beforeRouteEnter",S,Q),z.push(g),ne(z))).then(()=>{z=[];for(const b of s.list())z.push(Ct(b,S,Q));return z.push(g),ne(z)}).catch(b=>ft(b,8)?b:Promise.reject(b))}function $(S,Q,z){l.list().forEach(X=>C(()=>X(S,Q,z)))}function v(S,Q,z,X,de){const h=_(S,Q);if(h)return h;const g=Q===_t,b=en?history.state:{};z&&(X||g?r.replace(S.fullPath,ge({scroll:g&&b&&b.scroll},de)):r.push(S.fullPath,de)),a.value=S,fe(S,Q,z,g),se()}let H;function k(){H||(H=r.listen((S,Q,z)=>{if(!oe.listening)return;const X=M(S),de=j(X);if(de){V(ge(de,{replace:!0}),X).catch(Ln);return}c=X;const h=a.value;en&&Pd(fs(h.fullPath,z.delta),zo()),x(X,h).catch(g=>ft(g,12)?g:ft(g,2)?(V(g.to,X).then(b=>{ft(b,20)&&!z.delta&&z.type===Kn.pop&&r.go(-1,!1)}).catch(Ln),Promise.reject()):(z.delta&&r.go(-z.delta,!1),W(g,X,h))).then(g=>{g=g||v(X,h,!1),g&&(z.delta&&!ft(g,8)?r.go(-z.delta,!1):z.type===Kn.pop&&ft(g,20)&&r.go(-1,!1)),$(X,h,g)}).catch(Ln)}))}let Z=xn(),Y=xn(),A;function W(S,Q,z){se(S);const X=Y.list();return X.length?X.forEach(de=>de(S,Q,z)):console.error(S),Promise.reject(S)}function _e(){return A&&a.value!==_t?Promise.resolve():new Promise((S,Q)=>{Z.add([S,Q])})}function se(S){return A||(A=!S,k(),Z.list().forEach(([Q,z])=>S?z(S):Q()),Z.reset()),S}function fe(S,Q,z,X){const{scrollBehavior:de}=e;if(!en||!de)return Promise.resolve();const h=!z&&Td(fs(S.fullPath,0))||(X||!z)&&history.state&&history.state.scroll||null;return je().then(()=>de(S,Q,h)).then(g=>g&&Rd(g)).catch(g=>W(g,S,Q))}const L=S=>r.go(S);let ue;const Re=new Set,oe={currentRoute:a,listening:!0,addRoute:p,removeRoute:y,hasRoute:q,getRoutes:T,resolve:M,options:e,push:w,replace:F,go:L,back:()=>L(-1),forward:()=>L(1),beforeEach:i.add,beforeResolve:s.add,afterEach:l.add,onError:Y.add,isReady:_e,install(S){const Q=this;S.component("RouterLink",hh),S.component("RouterView",vh),S.config.globalProperties.$router=Q,Object.defineProperty(S.config.globalProperties,"$route",{enumerable:!0,get:()=>Vt(a)}),en&&!ue&&a.value===_t&&(ue=!0,w(r.location).catch(de=>{}));const z={};for(const de in _t)Object.defineProperty(z,de,{get:()=>a.value[de],enumerable:!0});S.provide(di,Q),S.provide(Sa,ml(z)),S.provide(Or,a);const X=S.unmount;Re.add(S),S.unmount=function(){Re.delete(S),Re.size<1&&(c=_t,H&&H(),H=null,a.value=_t,ue=!1,A=!1),X()}}};function ne(S){return S.reduce((Q,z)=>Q.then(()=>C(z)),Promise.resolve())}return oe}function yh(e,t){const n=[],o=[],r=[],i=Math.max(t.matched.length,e.matched.length);for(let s=0;sfn(c,l))?o.push(l):n.push(l));const a=e.matched[s];a&&(t.matched.find(c=>fn(c,a))||r.push(a))}return[n,o,r]}const _h=function(){const t=document.createElement("link").relList;return t&&t.supports&&t.supports("modulepreload")?"modulepreload":"preload"}(),Es={},wh="/nostrmarket/static/market/",sr=function(t,n){return!n||n.length===0?t():Promise.all(n.map(o=>{if(o=`${wh}${o}`,o in Es)return;Es[o]=!0;const r=o.endsWith(".css"),i=r?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${o}"]${i}`))return;const s=document.createElement("link");if(s.rel=r?"stylesheet":_h,r||(s.as="script",s.crossOrigin=""),s.href=o,document.head.appendChild(s),r)return new Promise((l,a)=>{s.addEventListener("load",l),s.addEventListener("error",()=>a(new Error(`Unable to preload CSS for ${o}`)))})})).then(()=>t())},xh=[{path:"/",component:()=>sr(()=>import("./MainLayout.8e5caf60.js"),["assets/MainLayout.8e5caf60.js","assets/QResizeObserver.1ffe80c2.js"]),children:[{path:"",component:()=>sr(()=>import("./MarketPage.e81dd906.js"),["assets/MarketPage.e81dd906.js","assets/QResizeObserver.1ffe80c2.js"])}]},{path:"/:catchAll(.*)*",component:()=>sr(()=>import("./ErrorNotFound.db68ea1d.js"),[])}];var lr=function(){return bh({scrollBehavior:()=>({left:0,top:0}),routes:xh,history:$d("/nostrmarket/static/market/")})};async function Ch(e,t){const n=e(md);n.use(fd,t);const o=vn(typeof lr=="function"?await lr({}):lr);return{app:n,router:o}}const $r={xs:18,sm:24,md:32,lg:38,xl:46},Yn={size:String};function Zn(e,t=$r){return R(()=>e.size!==void 0?{fontSize:e.size in t?`${t[e.size]}px`:e.size}:null)}const $e=e=>vn(Lo(e)),kh=e=>vn(e);function tt(e,t){return e!==void 0&&e()||t}function $m(e,t){if(e!==void 0){const n=e();if(n!=null)return n.slice()}return t}function It(e,t){return e!==void 0?t.concat(e()):t}function Eh(e,t){return e===void 0?t:t!==void 0?t.concat(e()):e()}function Lm(e,t,n,o,r,i){t.key=o+r;const s=E(e,t,n);return r===!0?Al(s,i()):s}const Ss="0 0 24 24",Rs=e=>e,ar=e=>`ionicons ${e}`,Ra={"mdi-":e=>`mdi ${e}`,"icon-":Rs,"bt-":e=>`bt ${e}`,"eva-":e=>`eva ${e}`,"ion-md":ar,"ion-ios":ar,"ion-logo":ar,"iconfont ":Rs,"ti-":e=>`themify-icon ${e}`,"bi-":e=>`bootstrap-icons ${e}`},Pa={o_:"-outlined",r_:"-round",s_:"-sharp"},Ta={sym_o_:"-outlined",sym_r_:"-rounded",sym_s_:"-sharp"},Sh=new RegExp("^("+Object.keys(Ra).join("|")+")"),Rh=new RegExp("^("+Object.keys(Pa).join("|")+")"),Ps=new RegExp("^("+Object.keys(Ta).join("|")+")"),Ph=/^[Mm]\s?[-+]?\.?\d/,Th=/^img:/,qh=/^svguse:/,Ah=/^ion-/,Mh=/^(fa-(sharp|solid|regular|light|brands|duotone|thin)|[lf]a[srlbdk]?) /;var pt=$e({name:"QIcon",props:{...Yn,tag:{type:String,default:"i"},name:String,color:String,left:Boolean,right:Boolean},setup(e,{slots:t}){const{proxy:{$q:n}}=ke(),o=Zn(e),r=R(()=>"q-icon"+(e.left===!0?" on-left":"")+(e.right===!0?" on-right":"")+(e.color!==void 0?` text-${e.color}`:"")),i=R(()=>{let s,l=e.name;if(l==="none"||!l)return{none:!0};if(n.iconMapFn!==null){const u=n.iconMapFn(l);if(u!==void 0)if(u.icon!==void 0){if(l=u.icon,l==="none"||!l)return{none:!0}}else return{cls:u.cls,content:u.content!==void 0?u.content:" "}}if(Ph.test(l)===!0){const[u,d=Ss]=l.split("|");return{svg:!0,viewBox:d,nodes:u.split("&&").map(f=>{const[p,y,T]=f.split("@@");return E("path",{style:y,d:p,transform:T})})}}if(Th.test(l)===!0)return{img:!0,src:l.substring(4)};if(qh.test(l)===!0){const[u,d=Ss]=l.split("|");return{svguse:!0,src:u.substring(7),viewBox:d}}let a=" ";const c=l.match(Sh);if(c!==null)s=Ra[c[1]](l);else if(Mh.test(l)===!0)s=l;else if(Ah.test(l)===!0)s=`ionicons ion-${n.platform.is.ios===!0?"ios":"md"}${l.substring(3)}`;else if(Ps.test(l)===!0){s="notranslate material-symbols";const u=l.match(Ps);u!==null&&(l=l.substring(6),s+=Ta[u[1]]),a=l}else{s="notranslate material-icons";const u=l.match(Rh);u!==null&&(l=l.substring(2),s+=Pa[u[1]]),a=l}return{cls:s,content:a}});return()=>{const s={class:r.value,style:o.value,"aria-hidden":"true",role:"presentation"};return i.value.none===!0?E(e.tag,s,tt(t.default)):i.value.img===!0?E("span",s,It(t.default,[E("img",{src:i.value.src})])):i.value.svg===!0?E("span",s,It(t.default,[E("svg",{viewBox:i.value.viewBox||"0 0 24 24"},i.value.nodes)])):i.value.svguse===!0?E("span",s,It(t.default,[E("svg",{viewBox:i.value.viewBox},[E("use",{"xlink:href":i.value.src})])])):(i.value.cls!==void 0&&(s.class+=" "+i.value.cls),E(e.tag,s,It(t.default,[i.value.content])))}}}),Oh=$e({name:"QAvatar",props:{...Yn,fontSize:String,color:String,textColor:String,icon:String,square:Boolean,rounded:Boolean},setup(e,{slots:t}){const n=Zn(e),o=R(()=>"q-avatar"+(e.color?` bg-${e.color}`:"")+(e.textColor?` text-${e.textColor} q-chip--colored`:"")+(e.square===!0?" q-avatar--square":e.rounded===!0?" rounded-borders":"")),r=R(()=>e.fontSize?{fontSize:e.fontSize}:null);return()=>{const i=e.icon!==void 0?[E(pt,{name:e.icon})]:void 0;return E("div",{class:o.value,style:n.value},[E("div",{class:"q-avatar__content row flex-center overflow-hidden",style:r.value},Eh(t.default,i))])}}});const $h={size:{type:[Number,String],default:"1em"},color:String};function Lh(e){return{cSize:R(()=>e.size in $r?`${$r[e.size]}px`:e.size),classes:R(()=>"q-spinner"+(e.color?` text-${e.color}`:""))}}var Un=$e({name:"QSpinner",props:{...$h,thickness:{type:Number,default:5}},setup(e){const{cSize:t,classes:n}=Lh(e);return()=>E("svg",{class:n.value+" q-spinner-mat",width:t.value,height:t.value,viewBox:"25 25 50 50"},[E("circle",{class:"path",cx:"50",cy:"50",r:"20",fill:"none",stroke:"currentColor","stroke-width":e.thickness,"stroke-miterlimit":"10"})])}});function Bm(e){return e===window?window.innerHeight:e.getBoundingClientRect().height}function Lr(e,t){const n=e.style;for(const o in t)n[o]=t[o]}function Bh(e){if(e==null)return;if(typeof e=="string")try{return document.querySelector(e)||void 0}catch{return}const t=Vt(e);if(t)return t.$el||t}function Fh(e,t){if(e==null||e.contains(t)===!0)return!0;for(let n=e.nextElementSibling;n!==null;n=n.nextElementSibling)if(n.contains(t))return!0;return!1}function Ih(e,t=250){let n=!1,o;return function(){return n===!1&&(n=!0,setTimeout(()=>{n=!1},t),o=e.apply(this,arguments)),o}}function Ts(e,t,n,o){n.modifiers.stop===!0&&ko(e);const r=n.modifiers.color;let i=n.modifiers.center;i=i===!0||o===!0;const s=document.createElement("span"),l=document.createElement("span"),a=Hf(e),{left:c,top:u,width:d,height:f}=t.getBoundingClientRect(),p=Math.sqrt(d*d+f*f),y=p/2,T=`${(d-p)/2}px`,q=i?T:`${a.left-c-y}px`,M=`${(f-p)/2}px`,m=i?M:`${a.top-u-y}px`;l.className="q-ripple__inner",Lr(l,{height:`${p}px`,width:`${p}px`,transform:`translate3d(${q},${m},0) scale3d(.2,.2,1)`,opacity:0}),s.className=`q-ripple${r?" text-"+r:""}`,s.setAttribute("dir","ltr"),s.appendChild(l),t.appendChild(s);const _=()=>{s.remove(),clearTimeout(w)};n.abort.push(_);let w=setTimeout(()=>{l.classList.add("q-ripple__inner--enter"),l.style.transform=`translate3d(${T},${M},0) scale3d(1,1,1)`,l.style.opacity=.2,w=setTimeout(()=>{l.classList.remove("q-ripple__inner--enter"),l.classList.add("q-ripple__inner--leave"),l.style.opacity=0,w=setTimeout(()=>{s.remove(),n.abort.splice(n.abort.indexOf(_),1)},275)},250)},50)}function qs(e,{modifiers:t,value:n,arg:o}){const r=Object.assign({},e.cfg.ripple,t,n);e.modifiers={early:r.early===!0,stop:r.stop===!0,center:r.center===!0,color:r.color||o,keyCodes:[].concat(r.keyCodes||13)}}var Nh=kh({name:"ripple",beforeMount(e,t){const n=t.instance.$.appContext.config.globalProperties.$q.config||{};if(n.ripple===!1)return;const o={cfg:n,enabled:t.value!==!1,modifiers:{},abort:[],start(r){o.enabled===!0&&r.qSkipRipple!==!0&&r.type===(o.modifiers.early===!0?"pointerdown":"click")&&Ts(r,e,o,r.qKeyEvent===!0)},keystart:Ih(r=>{o.enabled===!0&&r.qSkipRipple!==!0&&zn(r,o.modifiers.keyCodes)===!0&&r.type===`key${o.modifiers.early===!0?"down":"up"}`&&Ts(r,e,o,!0)},300)};qs(o,t),e.__qripple=o,Kf(o,"main",[[e,"pointerdown","start","passive"],[e,"click","start","passive"],[e,"keydown","keystart","passive"],[e,"keyup","keystart","passive"]])},updated(e,t){if(t.oldValue!==t.value){const n=e.__qripple;n!==void 0&&(n.enabled=t.value!==!1,n.enabled===!0&&Object(t.value)===t.value&&qs(n,t))}},beforeUnmount(e){const t=e.__qripple;t!==void 0&&(t.abort.forEach(n=>{n()}),Uf(t,"main"),delete e._qripple)}});const qa={left:"start",center:"center",right:"end",between:"between",around:"around",evenly:"evenly",stretch:"stretch"},jh=Object.keys(qa),Aa={align:{type:String,validator:e=>jh.includes(e)}};function Ma(e){return R(()=>{const t=e.align===void 0?e.vertical===!0?"stretch":"left":e.align;return`${e.vertical===!0?"items":"justify"}-${qa[t]}`})}function go(e){if(Object(e.$parent)===e.$parent)return e.$parent;let{parent:t}=e.$;for(;Object(t)===t;){if(Object(t.proxy)===t.proxy)return t.proxy;t=t.parent}}function Oa(e,t){typeof t.type=="symbol"?Array.isArray(t.children)===!0&&t.children.forEach(n=>{Oa(e,n)}):e.add(t)}function Fm(e){const t=new Set;return e.forEach(n=>{Oa(t,n)}),Array.from(t)}function $a(e){return e.appContext.config.globalProperties.$router!==void 0}function La(e){return e.isUnmounted===!0||e.isDeactivated===!0}function As(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}function Ms(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Vh(e,t){for(const n in t){const o=t[n],r=e[n];if(typeof o=="string"){if(o!==r)return!1}else if(Array.isArray(r)===!1||r.length!==o.length||o.some((i,s)=>i!==r[s]))return!1}return!0}function Os(e,t){return Array.isArray(t)===!0?e.length===t.length&&e.every((n,o)=>n===t[o]):e.length===1&&e[0]===t}function Dh(e,t){return Array.isArray(e)===!0?Os(e,t):Array.isArray(t)===!0?Os(t,e):e===t}function Hh(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(Dh(e[n],t[n])===!1)return!1;return!0}const zh={to:[String,Object],replace:Boolean,exact:Boolean,activeClass:{type:String,default:"q-router-link--active"},exactActiveClass:{type:String,default:"q-router-link--exact-active"},href:String,target:String,disable:Boolean};function Kh({fallbackTag:e,useDisableForRouterLinkProps:t=!0}={}){const n=ke(),{props:o,proxy:r,emit:i}=n,s=$a(n),l=R(()=>o.disable!==!0&&o.href!==void 0),a=R(t===!0?()=>s===!0&&o.disable!==!0&&l.value!==!0&&o.to!==void 0&&o.to!==null&&o.to!=="":()=>s===!0&&l.value!==!0&&o.to!==void 0&&o.to!==null&&o.to!==""),c=R(()=>a.value===!0?m(o.to):null),u=R(()=>c.value!==null),d=R(()=>l.value===!0||u.value===!0),f=R(()=>o.type==="a"||d.value===!0?"a":o.tag||e||"div"),p=R(()=>l.value===!0?{href:o.href,target:o.target}:u.value===!0?{href:c.value.href,target:o.target}:{}),y=R(()=>{if(u.value===!1)return-1;const{matched:F}=c.value,{length:j}=F,V=F[j-1];if(V===void 0)return-1;const N=r.$route.matched;if(N.length===0)return-1;const C=N.findIndex(Ms.bind(null,V));if(C>-1)return C;const x=As(F[j-2]);return j>1&&As(V)===x&&N[N.length-1].path!==x?N.findIndex(Ms.bind(null,F[j-2])):C}),T=R(()=>u.value===!0&&y.value!==-1&&Vh(r.$route.params,c.value.params)),q=R(()=>T.value===!0&&y.value===r.$route.matched.length-1&&Hh(r.$route.params,c.value.params)),M=R(()=>u.value===!0?q.value===!0?` ${o.exactActiveClass} ${o.activeClass}`:o.exact===!0?"":T.value===!0?` ${o.activeClass}`:"":"");function m(F){try{return r.$router.resolve(F)}catch{}return null}function _(F,{returnRouterError:j,to:V=o.to,replace:N=o.replace}={}){if(o.disable===!0)return F.preventDefault(),Promise.resolve(!1);if(F.metaKey||F.altKey||F.ctrlKey||F.shiftKey||F.button!==void 0&&F.button!==0||o.target==="_blank")return Promise.resolve(!1);F.preventDefault();const C=r.$router[N===!0?"replace":"push"](V);return j===!0?C:C.then(()=>{}).catch(()=>{})}function w(F){if(u.value===!0){const j=V=>_(F,V);i("click",F,j),F.defaultPrevented!==!0&&j()}else i("click",F)}return{hasRouterLink:u,hasHrefLink:l,hasLink:d,linkTag:f,resolvedLink:c,linkIsActive:T,linkIsExactActive:q,linkClass:M,linkAttrs:p,getLink:m,navigateToRouterLink:_,navigateOnClick:w}}const $s={none:0,xs:4,sm:8,md:16,lg:24,xl:32},Uh={xs:8,sm:10,md:14,lg:20,xl:24},Wh=["button","submit","reset"],Qh=/[^\s]\/[^\s]/,Yh=["flat","outline","push","unelevated"],Ba=(e,t)=>e.flat===!0?"flat":e.outline===!0?"outline":e.push===!0?"push":e.unelevated===!0?"unelevated":t,Im=e=>{const t=Ba(e);return t!==void 0?{[t]:!0}:{}},Zh={...Yn,...zh,type:{type:String,default:"button"},label:[Number,String],icon:String,iconRight:String,...Yh.reduce((e,t)=>(e[t]=Boolean)&&e,{}),square:Boolean,round:Boolean,rounded:Boolean,glossy:Boolean,size:String,fab:Boolean,fabMini:Boolean,padding:String,color:String,textColor:String,noCaps:Boolean,noWrap:Boolean,dense:Boolean,tabindex:[Number,String],ripple:{type:[Boolean,Object],default:!0},align:{...Aa.align,default:"center"},stack:Boolean,stretch:Boolean,loading:{type:Boolean,default:null},disable:Boolean};function Jh(e){const t=Zn(e,Uh),n=Ma(e),{hasRouterLink:o,hasLink:r,linkTag:i,linkAttrs:s,navigateOnClick:l}=Kh({fallbackTag:"button"}),a=R(()=>{const q=e.fab===!1&&e.fabMini===!1?t.value:{};return e.padding!==void 0?Object.assign({},q,{padding:e.padding.split(/\s+/).map(M=>M in $s?$s[M]+"px":M).join(" "),minWidth:"0",minHeight:"0"}):q}),c=R(()=>e.rounded===!0||e.fab===!0||e.fabMini===!0),u=R(()=>e.disable!==!0&&e.loading!==!0),d=R(()=>u.value===!0?e.tabindex||0:-1),f=R(()=>Ba(e,"standard")),p=R(()=>{const q={tabindex:d.value};return r.value===!0?Object.assign(q,s.value):Wh.includes(e.type)===!0&&(q.type=e.type),i.value==="a"?(e.disable===!0?q["aria-disabled"]="true":q.href===void 0&&(q.role="button"),o.value!==!0&&Qh.test(e.type)===!0&&(q.type=e.type)):e.disable===!0&&(q.disabled="",q["aria-disabled"]="true"),e.loading===!0&&e.percentage!==void 0&&Object.assign(q,{role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":e.percentage}),q}),y=R(()=>{let q;e.color!==void 0?e.flat===!0||e.outline===!0?q=`text-${e.textColor||e.color}`:q=`bg-${e.color} text-${e.textColor||"white"}`:e.textColor&&(q=`text-${e.textColor}`);const M=e.round===!0?"round":`rectangle${c.value===!0?" q-btn--rounded":e.square===!0?" q-btn--square":""}`;return`q-btn--${f.value} q-btn--${M}`+(q!==void 0?" "+q:"")+(u.value===!0?" q-btn--actionable q-focusable q-hoverable":e.disable===!0?" disabled":"")+(e.fab===!0?" q-btn--fab":e.fabMini===!0?" q-btn--fab-mini":"")+(e.noCaps===!0?" q-btn--no-uppercase":"")+(e.dense===!0?" q-btn--dense":"")+(e.stretch===!0?" no-border-radius self-stretch":"")+(e.glossy===!0?" glossy":"")+(e.square?" q-btn--square":"")}),T=R(()=>n.value+(e.stack===!0?" column":" row")+(e.noWrap===!0?" no-wrap text-no-wrap":"")+(e.loading===!0?" q-btn__content--hidden":""));return{classes:y,style:a,innerClasses:T,attributes:p,hasLink:r,linkTag:i,navigateOnClick:l,isActionable:u}}const{passiveCapture:He}=Be;let Jt=null,Xt=null,Gt=null;var Br=$e({name:"QBtn",props:{...Zh,percentage:Number,darkPercentage:Boolean,onTouchstart:[Function,Array]},emits:["click","keydown","mousedown","keyup"],setup(e,{slots:t,emit:n}){const{proxy:o}=ke(),{classes:r,style:i,innerClasses:s,attributes:l,hasLink:a,linkTag:c,navigateOnClick:u,isActionable:d}=Jh(e),f=he(null),p=he(null);let y=null,T,q=null;const M=R(()=>e.label!==void 0&&e.label!==null&&e.label!==""),m=R(()=>e.disable===!0||e.ripple===!1?!1:{keyCodes:a.value===!0?[13,32]:[13],...e.ripple===!0?{}:e.ripple}),_=R(()=>({center:e.round})),w=R(()=>{const k=Math.max(0,Math.min(100,e.percentage));return k>0?{transition:"transform 0.6s",transform:`translateX(${k-100}%)`}:{}}),F=R(()=>{if(e.loading===!0)return{onMousedown:H,onTouchstart:H,onClick:H,onKeydown:H,onKeyup:H};if(d.value===!0){const k={onClick:V,onKeydown:N,onMousedown:x};if(o.$q.platform.has.touch===!0){const Z=e.onTouchstart!==void 0?"":"Passive";k[`onTouchstart${Z}`]=C}return k}return{onClick:Ke}}),j=R(()=>({ref:f,class:"q-btn q-btn-item non-selectable no-outline "+r.value,style:i.value,...l.value,...F.value}));function V(k){if(f.value!==null){if(k!==void 0){if(k.defaultPrevented===!0)return;const Z=document.activeElement;if(e.type==="submit"&&Z!==document.body&&f.value.contains(Z)===!1&&Z.contains(f.value)===!1){f.value.focus();const Y=()=>{document.removeEventListener("keydown",Ke,!0),document.removeEventListener("keyup",Y,He),f.value!==null&&f.value.removeEventListener("blur",Y,He)};document.addEventListener("keydown",Ke,!0),document.addEventListener("keyup",Y,He),f.value.addEventListener("blur",Y,He)}}u(k)}}function N(k){f.value!==null&&(n("keydown",k),zn(k,[13,32])===!0&&Xt!==f.value&&(Xt!==null&&v(),k.defaultPrevented!==!0&&(f.value.focus(),Xt=f.value,f.value.classList.add("q-btn--active"),document.addEventListener("keyup",$,!0),f.value.addEventListener("blur",$,He)),Ke(k)))}function C(k){f.value!==null&&(n("touchstart",k),k.defaultPrevented!==!0&&(Jt!==f.value&&(Jt!==null&&v(),Jt=f.value,y=k.target,y.addEventListener("touchcancel",$,He),y.addEventListener("touchend",$,He)),T=!0,q!==null&&clearTimeout(q),q=setTimeout(()=>{q=null,T=!1},200)))}function x(k){f.value!==null&&(k.qSkipRipple=T===!0,n("mousedown",k),k.defaultPrevented!==!0&&Gt!==f.value&&(Gt!==null&&v(),Gt=f.value,f.value.classList.add("q-btn--active"),document.addEventListener("mouseup",$,He)))}function $(k){if(f.value!==null&&!(k!==void 0&&k.type==="blur"&&document.activeElement===f.value)){if(k!==void 0&&k.type==="keyup"){if(Xt===f.value&&zn(k,[13,32])===!0){const Z=new MouseEvent("click",k);Z.qKeyEvent=!0,k.defaultPrevented===!0&&Et(Z),k.cancelBubble===!0&&ko(Z),f.value.dispatchEvent(Z),Ke(k),k.qKeyEvent=!0}n("keyup",k)}v()}}function v(k){const Z=p.value;k!==!0&&(Jt===f.value||Gt===f.value)&&Z!==null&&Z!==document.activeElement&&(Z.setAttribute("tabindex",-1),Z.focus()),Jt===f.value&&(y!==null&&(y.removeEventListener("touchcancel",$,He),y.removeEventListener("touchend",$,He)),Jt=y=null),Gt===f.value&&(document.removeEventListener("mouseup",$,He),Gt=null),Xt===f.value&&(document.removeEventListener("keyup",$,!0),f.value!==null&&f.value.removeEventListener("blur",$,He),Xt=null),f.value!==null&&f.value.classList.remove("q-btn--active")}function H(k){Ke(k),k.qSkipRipple=!0}return We(()=>{v(!0)}),Object.assign(o,{click:V}),()=>{let k=[];e.icon!==void 0&&k.push(E(pt,{name:e.icon,left:e.stack===!1&&M.value===!0,role:"img","aria-hidden":"true"})),M.value===!0&&k.push(E("span",{class:"block"},[e.label])),k=It(t.default,k),e.iconRight!==void 0&&e.round===!1&&k.push(E(pt,{name:e.iconRight,right:e.stack===!1&&M.value===!0,role:"img","aria-hidden":"true"}));const Z=[E("span",{class:"q-focus-helper",ref:p})];return e.loading===!0&&e.percentage!==void 0&&Z.push(E("span",{class:"q-btn__progress absolute-full overflow-hidden"+(e.darkPercentage===!0?" q-btn__progress--dark":"")},[E("span",{class:"q-btn__progress-indicator fit block",style:w.value})])),Z.push(E("span",{class:"q-btn__content text-center col items-center q-anchor--skip "+s.value},k)),e.loading!==null&&Z.push(E(cn,{name:"q-transition--fade"},()=>e.loading===!0?[E("span",{key:"loading",class:"absolute-full flex flex-center"},t.loading!==void 0?t.loading():[E(Un)])]:null)),Al(E(c.value,j.value,Z),[[Nh,m.value,void 0,_.value]])}}});let Xh=1,Gh=document.body;function hi(e,t){const n=document.createElement("div");if(n.id=t!==void 0?`q-portal--${t}--${Xh++}`:e,So.globalNodes!==void 0){const o=So.globalNodes.class;o!==void 0&&(n.className=o)}return Gh.appendChild(n),n}function Fa(e){e.remove()}let eg=0;const mo={},po={},Je={},Ia={},tg=/^\s*$/,Na=[],gi=["top-left","top-right","bottom-left","bottom-right","top","bottom","left","right","center"],ng=["top-left","top-right","bottom-left","bottom-right"],tn={positive:{icon:e=>e.iconSet.type.positive,color:"positive"},negative:{icon:e=>e.iconSet.type.negative,color:"negative"},warning:{icon:e=>e.iconSet.type.warning,color:"warning",textColor:"dark"},info:{icon:e=>e.iconSet.type.info,color:"info"},ongoing:{group:!1,timeout:0,spinner:!0,color:"grey-8"}};function ja(e,t,n){if(!e)return Cn("parameter required");let o;const r={textColor:"white"};if(e.ignoreDefaults!==!0&&Object.assign(r,mo),at(e)===!1&&(r.type&&Object.assign(r,tn[r.type]),e={message:e}),Object.assign(r,tn[e.type||r.type],e),typeof r.icon=="function"&&(r.icon=r.icon(t)),r.spinner?(r.spinner===!0&&(r.spinner=Un),r.spinner=vn(r.spinner)):r.spinner=!1,r.meta={hasMedia:Boolean(r.spinner!==!1||r.icon||r.avatar),hasText:Ls(r.message)||Ls(r.caption)},r.position){if(gi.includes(r.position)===!1)return Cn("wrong position",e)}else r.position="bottom";if(r.timeout===void 0)r.timeout=5e3;else{const a=parseInt(r.timeout,10);if(isNaN(a)||a<0)return Cn("wrong timeout",e);r.timeout=a}r.timeout===0?r.progress=!1:r.progress===!0&&(r.meta.progressClass="q-notification__progress"+(r.progressClass?` ${r.progressClass}`:""),r.meta.progressStyle={animationDuration:`${r.timeout+1e3}ms`});const i=(Array.isArray(e.actions)===!0?e.actions:[]).concat(e.ignoreDefaults!==!0&&Array.isArray(mo.actions)===!0?mo.actions:[]).concat(tn[e.type]!==void 0&&Array.isArray(tn[e.type].actions)===!0?tn[e.type].actions:[]),{closeBtn:s}=r;if(s&&i.push({label:typeof s=="string"?s:t.lang.label.close}),r.actions=i.map(({handler:a,noDismiss:c,...u})=>({flat:!0,...u,onClick:typeof a=="function"?()=>{a(),c!==!0&&l()}:()=>{l()}})),r.multiLine===void 0&&(r.multiLine=r.actions.length>1),Object.assign(r.meta,{class:`q-notification row items-stretch q-notification--${r.multiLine===!0?"multi-line":"standard"}`+(r.color!==void 0?` bg-${r.color}`:"")+(r.textColor!==void 0?` text-${r.textColor}`:"")+(r.classes!==void 0?` ${r.classes}`:""),wrapperClass:"q-notification__wrapper col relative-position border-radius-inherit "+(r.multiLine===!0?"column no-wrap justify-center":"row items-center"),contentClass:"q-notification__content row items-center"+(r.multiLine===!0?"":" col"),leftClass:r.meta.hasText===!0?"additional":"single",attrs:{role:"alert",...r.attrs}}),r.group===!1?(r.group=void 0,r.meta.group=void 0):((r.group===void 0||r.group===!0)&&(r.group=[r.message,r.caption,r.multiline].concat(r.actions.map(a=>`${a.label}*${a.icon}`)).join("|")),r.meta.group=r.group+"|"+r.position),r.actions.length===0?r.actions=void 0:r.meta.actionsClass="q-notification__actions row items-center "+(r.multiLine===!0?"justify-end":"col-auto")+(r.meta.hasMedia===!0?" q-notification__actions--with-media":""),n!==void 0){n.notif.meta.timer&&(clearTimeout(n.notif.meta.timer),n.notif.meta.timer=void 0),r.meta.uid=n.notif.meta.uid;const a=Je[r.position].value.indexOf(n.notif);Je[r.position].value[a]=r}else{const a=po[r.meta.group];if(a===void 0){if(r.meta.uid=eg++,r.meta.badge=1,["left","right","center"].indexOf(r.position)!==-1)Je[r.position].value.splice(Math.floor(Je[r.position].value.length/2),0,r);else{const c=r.position.indexOf("top")>-1?"unshift":"push";Je[r.position].value[c](r)}r.group!==void 0&&(po[r.meta.group]=r)}else{if(a.meta.timer&&(clearTimeout(a.meta.timer),a.meta.timer=void 0),r.badgePosition!==void 0){if(ng.includes(r.badgePosition)===!1)return Cn("wrong badgePosition",e)}else r.badgePosition=`top-${r.position.indexOf("left")>-1?"right":"left"}`;r.meta.uid=a.meta.uid,r.meta.badge=a.meta.badge+1,r.meta.badgeClass=`q-notification__badge q-notification__badge--${r.badgePosition}`+(r.badgeColor!==void 0?` bg-${r.badgeColor}`:"")+(r.badgeTextColor!==void 0?` text-${r.badgeTextColor}`:"")+(r.badgeClass?` ${r.badgeClass}`:"");const c=Je[r.position].value.indexOf(a);Je[r.position].value[c]=po[r.meta.group]=r}}const l=()=>{og(r),o=void 0};if(r.timeout>0&&(r.meta.timer=setTimeout(()=>{r.meta.timer=void 0,l()},r.timeout+1e3)),r.group!==void 0)return a=>{a!==void 0?Cn("trying to update a grouped one which is forbidden",e):l()};if(o={dismiss:l,config:e,notif:r},n!==void 0){Object.assign(n,o);return}return a=>{if(o!==void 0)if(a===void 0)o.dismiss();else{const c=Object.assign({},o.config,a,{group:!1,position:r.position});ja(c,t,o)}}}function og(e){e.meta.timer&&(clearTimeout(e.meta.timer),e.meta.timer=void 0);const t=Je[e.position].value.indexOf(e);if(t!==-1){e.group!==void 0&&delete po[e.meta.group];const n=Na[""+e.meta.uid];if(n){const{width:o,height:r}=getComputedStyle(n);n.style.left=`${n.offsetLeft}px`,n.style.width=o,n.style.height=r}Je[e.position].value.splice(t,1),typeof e.onDismiss=="function"&&e.onDismiss()}}function Ls(e){return e!=null&&tg.test(e)!==!0}function Cn(e,t){return console.error(`Notify: ${e}`,t),!1}function rg(){return $e({name:"QNotifications",devtools:{hide:!0},setup(){return()=>E("div",{class:"q-notifications"},gi.map(e=>E(Tf,{key:e,class:Ia[e],tag:"div",name:`q-notification--${e}`},()=>Je[e].value.map(t=>{const n=t.meta,o=[];if(n.hasMedia===!0&&(t.spinner!==!1?o.push(E(t.spinner,{class:"q-notification__spinner q-notification__spinner--"+n.leftClass,color:t.spinnerColor,size:t.spinnerSize})):t.icon?o.push(E(pt,{class:"q-notification__icon q-notification__icon--"+n.leftClass,name:t.icon,color:t.iconColor,size:t.iconSize,role:"img"})):t.avatar&&o.push(E(Oh,{class:"q-notification__avatar q-notification__avatar--"+n.leftClass},()=>E("img",{src:t.avatar,"aria-hidden":"true"})))),n.hasText===!0){let i;const s={class:"q-notification__message col"};if(t.html===!0)s.innerHTML=t.caption?`
${t.message}
${t.caption}
`:t.message;else{const l=[t.message];i=t.caption?[E("div",l),E("div",{class:"q-notification__caption"},[t.caption])]:l}o.push(E("div",s,i))}const r=[E("div",{class:n.contentClass},o)];return t.progress===!0&&r.push(E("div",{key:`${n.uid}|p|${n.badge}`,class:n.progressClass,style:n.progressStyle})),t.actions!==void 0&&r.push(E("div",{class:n.actionsClass},t.actions.map(i=>E(Br,i)))),n.badge>1&&r.push(E("div",{key:`${n.uid}|${n.badge}`,class:t.meta.badgeClass,style:t.badgeStyle},[n.badge])),E("div",{ref:i=>{Na[""+n.uid]=i},key:n.uid,class:n.class,...n.attrs},[E("div",{class:n.wrapperClass},r)])}))))}})}var ig={setDefaults(e){at(e)===!0&&Object.assign(mo,e)},registerType(e,t){at(t)===!0&&(tn[e]=t)},install({$q:e,parentApp:t}){if(e.notify=this.create=n=>ja(n,e),e.notify.setDefaults=this.setDefaults,e.notify.registerType=this.registerType,e.config.notify!==void 0&&this.setDefaults(e.config.notify),this.__installed!==!0){gi.forEach(o=>{Je[o]=he([]);const r=["left","center","right"].includes(o)===!0?"center":o.indexOf("top")>-1?"top":"bottom",i=o.indexOf("left")>-1?"start":o.indexOf("right")>-1?"end":"center",s=["left","right"].includes(o)?`items-${o==="left"?"start":"end"} justify-center`:o==="center"?"flex-center":`items-${i}`;Ia[o]=`q-notifications__list q-notifications__list--${r} fixed column no-wrap ${s}`});const n=hi("q-notify");ma(rg(),t).mount(n)}}};function sg(e){return ld(e)===!0?"__q_date|"+e.toUTCString():ad(e)===!0?"__q_expr|"+e.source:typeof e=="number"?"__q_numb|"+e:typeof e=="boolean"?"__q_bool|"+(e?"1":"0"):typeof e=="string"?"__q_strn|"+e:typeof e=="function"?"__q_strn|"+e.toString():e===Object(e)?"__q_objt|"+JSON.stringify(e):e}function lg(e){if(e.length<9)return e;const n=e.substring(0,8),o=e.substring(9);switch(n){case"__q_date":return new Date(o);case"__q_expr":return new RegExp(o);case"__q_numb":return Number(o);case"__q_bool":return Boolean(o==="1");case"__q_strn":return""+o;case"__q_objt":return JSON.parse(o);default:return e}}function ag(){const e=()=>null;return{has:()=>!1,getLength:()=>0,getItem:e,getIndex:e,getKey:e,getAll:()=>{},getAllKeys:()=>[],set:Pt,remove:Pt,clear:Pt,isEmpty:()=>!0}}function ug(e){const t=window[e+"Storage"],n=o=>{const r=t.getItem(o);return r?lg(r):null};return{has:o=>t.getItem(o)!==null,getLength:()=>t.length,getItem:n,getIndex:o=>oo{let o;const r={},i=t.length;for(let s=0;s{const o=[],r=t.length;for(let i=0;i{t.setItem(o,sg(r))},remove:o=>{t.removeItem(o)},clear:()=>{t.clear()},isEmpty:()=>t.length===0}}const Va=we.has.webStorage===!1?ag():ug("local"),Da={install({$q:e}){e.localStorage=Va}};Object.assign(Da,Va);function cg(e,t,n){let o;function r(){o!==void 0&&(qr.remove(o),o=void 0)}return We(()=>{e.value===!0&&r()}),{removeFromHistory:r,addToHistory(){o={condition:()=>n.value===!0,handler:t},qr.add(o)}}}function fg(){let e=null;const t=ke();function n(){e!==null&&(clearTimeout(e),e=null)}return Fo(n),We(n),{removeTimeout:n,registerTimeout(o,r){n(),La(t)===!1&&(e=setTimeout(o,r))}}}function dg(){let e;const t=ke();function n(){e=void 0}return Fo(n),We(n),{removeTick:n,registerTick(o){e=o,je(()=>{e===o&&(La(t)===!1&&e(),e=void 0)})}}}const hg={modelValue:{type:Boolean,default:null},"onUpdate:modelValue":[Function,Array]},gg=["beforeShow","show","beforeHide","hide"];function mg({showing:e,canShow:t,hideOnRouteChange:n,handleShow:o,handleHide:r,processOnMount:i}){const s=ke(),{props:l,emit:a,proxy:c}=s;let u;function d(m){e.value===!0?y(m):f(m)}function f(m){if(l.disable===!0||m!==void 0&&m.qAnchorHandled===!0||t!==void 0&&t(m)!==!0)return;const _=l["onUpdate:modelValue"]!==void 0;_===!0&&(a("update:modelValue",!0),u=m,je(()=>{u===m&&(u=void 0)})),(l.modelValue===null||_===!1)&&p(m)}function p(m){e.value!==!0&&(e.value=!0,a("beforeShow",m),o!==void 0?o(m):a("show",m))}function y(m){if(l.disable===!0)return;const _=l["onUpdate:modelValue"]!==void 0;_===!0&&(a("update:modelValue",!1),u=m,je(()=>{u===m&&(u=void 0)})),(l.modelValue===null||_===!1)&&T(m)}function T(m){e.value!==!1&&(e.value=!1,a("beforeHide",m),r!==void 0?r(m):a("hide",m))}function q(m){l.disable===!0&&m===!0?l["onUpdate:modelValue"]!==void 0&&a("update:modelValue",!1):m===!0!==e.value&&(m===!0?p:T)(u)}be(()=>l.modelValue,q),n!==void 0&&$a(s)===!0&&be(()=>c.$route.fullPath,()=>{n.value===!0&&e.value===!0&&y()}),i===!0&&Ut(()=>{q(l.modelValue)});const M={show:f,hide:y,toggle:d};return Object.assign(c,M),M}const pg={transitionShow:{type:String,default:"fade"},transitionHide:{type:String,default:"fade"},transitionDuration:{type:[String,Number],default:300}};function vg(e,t=()=>{},n=()=>{}){return{transitionProps:R(()=>{const o=`q-transition--${e.transitionShow||t()}`,r=`q-transition--${e.transitionHide||n()}`;return{appear:!0,enterFromClass:`${o}-enter-from`,enterActiveClass:`${o}-enter-active`,enterToClass:`${o}-enter-to`,leaveFromClass:`${r}-leave-from`,leaveActiveClass:`${r}-leave-active`,leaveToClass:`${r}-leave-to`}}),transitionStyle:R(()=>`--q-transition-duration: ${e.transitionDuration}ms`)}}let Nt=[],Wn=[];function Ha(e){Wn=Wn.filter(t=>t!==e)}function bg(e){Ha(e),Wn.push(e)}function Bs(e){Ha(e),Wn.length===0&&Nt.length!==0&&(Nt[Nt.length-1](),Nt=[])}function mi(e){Wn.length===0?e():Nt.push(e)}function yg(e){Nt=Nt.filter(t=>t!==e)}const vo=[];function Nm(e){return vo.find(t=>t.contentEl!==null&&t.contentEl.contains(e))}function _g(e,t){do{if(e.$options.name==="QMenu"){if(e.hide(t),e.$props.separateClosePopup===!0)return go(e)}else if(e.__qPortal===!0){const n=go(e);return n!==void 0&&n.$options.name==="QPopupProxy"?(e.hide(t),n):e}e=go(e)}while(e!=null)}function jm(e,t,n){for(;n!==0&&e!==void 0&&e!==null;){if(e.__qPortal===!0){if(n--,e.$options.name==="QMenu"){e=_g(e,t);continue}e.hide(t)}e=go(e)}}function wg(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 xg(e,t,n,o){const r=he(!1),i=he(!1);let s=null;const l={},a=o==="dialog"&&wg(e);function c(d){if(d===!0){Bs(l),i.value=!0;return}i.value=!1,r.value===!1&&(a===!1&&s===null&&(s=hi(!1,o)),r.value=!0,vo.push(e.proxy),bg(l))}function u(d){if(i.value=!1,d!==!0)return;Bs(l),r.value=!1;const f=vo.indexOf(e.proxy);f!==-1&&vo.splice(f,1),s!==null&&(Fa(s),s=null)}return ii(()=>{u(!0)}),e.proxy.__qPortal=!0,bn(e.proxy,"contentEl",()=>t.value),{showPortal:c,hidePortal:u,portalIsActive:r,portalIsAccessible:i,renderPortal:()=>a===!0?n():r.value===!0?[E(zc,{to:s},n())]:void 0}}const Cg=[null,document,document.body,document.scrollingElement,document.documentElement];function Vm(e,t){let n=Bh(t);if(n===void 0){if(e==null)return window;n=e.closest(".scroll,.scroll-y,.overflow-auto")}return Cg.includes(n)?window:n}function Dm(e){return(e===window?document.body:e).scrollHeight}function za(e){return e===window?window.pageYOffset||window.scrollY||document.body.scrollTop||0:e.scrollTop}function Ka(e){return e===window?window.pageXOffset||window.scrollX||document.body.scrollLeft||0:e.scrollLeft}function Ua(e,t,n=0){const o=arguments[3]===void 0?performance.now():arguments[3],r=za(e);if(n<=0){r!==t&&Fr(e,t);return}requestAnimationFrame(i=>{const s=i-o,l=r+(t-r)/Math.max(s,n)*s;Fr(e,l),l!==t&&Ua(e,t,n-s,i)})}function Wa(e,t,n=0){const o=arguments[3]===void 0?performance.now():arguments[3],r=Ka(e);if(n<=0){r!==t&&Ir(e,t);return}requestAnimationFrame(i=>{const s=i-o,l=r+(t-r)/Math.max(s,n)*s;Ir(e,l),l!==t&&Wa(e,t,n-s,i)})}function Fr(e,t){if(e===window){window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,t);return}e.scrollTop=t}function Ir(e,t){if(e===window){window.scrollTo(t,window.pageYOffset||window.scrollY||document.body.scrollTop||0);return}e.scrollLeft=t}function Hm(e,t,n){if(n){Ua(e,t,n);return}Fr(e,t)}function zm(e,t,n){if(n){Wa(e,t,n);return}Ir(e,t)}let ro;function Km(){if(ro!==void 0)return ro;const e=document.createElement("p"),t=document.createElement("div");Lr(e,{width:"100%",height:"200px"}),Lr(t,{position:"absolute",top:"0px",left:"0px",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"}),t.appendChild(e),document.body.appendChild(t);const n=e.offsetWidth;t.style.overflow="scroll";let o=e.offsetWidth;return n===o&&(o=t.clientWidth),t.remove(),ro=n-o,ro}function kg(e,t=!0){return!e||e.nodeType!==Node.ELEMENT_NODE?!1:t?e.scrollHeight>e.clientHeight&&(e.classList.contains("scroll")||e.classList.contains("overflow-auto")||["auto","scroll"].includes(window.getComputedStyle(e)["overflow-y"])):e.scrollWidth>e.clientWidth&&(e.classList.contains("scroll")||e.classList.contains("overflow-auto")||["auto","scroll"].includes(window.getComputedStyle(e)["overflow-x"]))}let kn=0,ur,cr,Tn,fr=!1,Fs,Is,Ns,$t=null;function Eg(e){Sg(e)&&Ke(e)}function Sg(e){if(e.target===document.body||e.target.classList.contains("q-layout__backdrop"))return!0;const t=zf(e),n=e.shiftKey&&!e.deltaX,o=!n&&Math.abs(e.deltaX)<=Math.abs(e.deltaY),r=n||o?e.deltaY:e.deltaX;for(let i=0;i0&&s.scrollTop+s.clientHeight===s.scrollHeight:r<0&&s.scrollLeft===0?!0:r>0&&s.scrollLeft+s.clientWidth===s.scrollWidth}return!0}function js(e){e.target===document&&(document.scrollingElement.scrollTop=document.scrollingElement.scrollTop)}function io(e){fr!==!0&&(fr=!0,requestAnimationFrame(()=>{fr=!1;const{height:t}=e.target,{clientHeight:n,scrollTop:o}=document.scrollingElement;(Tn===void 0||t!==window.innerHeight)&&(Tn=n-t,document.scrollingElement.scrollTop=o),o>Tn&&(document.scrollingElement.scrollTop-=Math.ceil((o-Tn)/8))}))}function Vs(e){const t=document.body,n=window.visualViewport!==void 0;if(e==="add"){const{overflowY:o,overflowX:r}=window.getComputedStyle(t);ur=Ka(window),cr=za(window),Fs=t.style.left,Is=t.style.top,Ns=window.location.href,t.style.left=`-${ur}px`,t.style.top=`-${cr}px`,r!=="hidden"&&(r==="scroll"||t.scrollWidth>window.innerWidth)&&t.classList.add("q-body--force-scrollbar-x"),o!=="hidden"&&(o==="scroll"||t.scrollHeight>window.innerHeight)&&t.classList.add("q-body--force-scrollbar-y"),t.classList.add("q-body--prevent-scroll"),document.qScrollPrevented=!0,we.is.ios===!0&&(n===!0?(window.scrollTo(0,0),window.visualViewport.addEventListener("resize",io,Be.passiveCapture),window.visualViewport.addEventListener("scroll",io,Be.passiveCapture),window.scrollTo(0,0)):window.addEventListener("scroll",js,Be.passiveCapture))}we.is.desktop===!0&&we.is.mac===!0&&window[`${e}EventListener`]("wheel",Eg,Be.notPassive),e==="remove"&&(we.is.ios===!0&&(n===!0?(window.visualViewport.removeEventListener("resize",io,Be.passiveCapture),window.visualViewport.removeEventListener("scroll",io,Be.passiveCapture)):window.removeEventListener("scroll",js,Be.passiveCapture)),t.classList.remove("q-body--prevent-scroll"),t.classList.remove("q-body--force-scrollbar-x"),t.classList.remove("q-body--force-scrollbar-y"),document.qScrollPrevented=!1,t.style.left=Fs,t.style.top=Is,window.location.href===Ns&&window.scrollTo(ur,cr),Tn=void 0)}function Rg(e){let t="add";if(e===!0){if(kn++,$t!==null){clearTimeout($t),$t=null;return}if(kn>1)return}else{if(kn===0||(kn--,kn>0))return;if(t="remove",we.is.ios===!0&&we.is.nativeMobile===!0){$t!==null&&clearTimeout($t),$t=setTimeout(()=>{Vs(t),$t=null},100);return}}Vs(t)}function Pg(){let e;return{preventBodyScroll(t){t!==e&&(e!==void 0||t===!0)&&(e=t,Rg(t))}}}const Ht=[];let hn;function Tg(e){hn=e.keyCode===27}function qg(){hn===!0&&(hn=!1)}function Ag(e){hn===!0&&(hn=!1,zn(e,27)===!0&&Ht[Ht.length-1](e))}function Qa(e){window[e]("keydown",Tg),window[e]("blur",qg),window[e]("keyup",Ag),hn=!1}function Mg(e){we.is.desktop===!0&&(Ht.push(e),Ht.length===1&&Qa("addEventListener"))}function Ds(e){const t=Ht.indexOf(e);t>-1&&(Ht.splice(t,1),Ht.length===0&&Qa("removeEventListener"))}const zt=[];function Ya(e){zt[zt.length-1](e)}function Og(e){we.is.desktop===!0&&(zt.push(e),zt.length===1&&document.body.addEventListener("focusin",Ya))}function Hs(e){const t=zt.indexOf(e);t>-1&&(zt.splice(t,1),zt.length===0&&document.body.removeEventListener("focusin",Ya))}let so=0;const $g={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"},zs={standard:["scale","scale"],top:["slide-down","slide-up"],bottom:["slide-up","slide-down"],right:["slide-left","slide-right"],left:["slide-right","slide-left"]};var Lg=$e({name:"QDialog",inheritAttrs:!1,props:{...hg,...pg,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,position:{type:String,default:"standard",validator:e=>e==="standard"||["top","bottom","left","right"].includes(e)}},emits:[...gg,"shake","click","escapeKey"],setup(e,{slots:t,emit:n,attrs:o}){const r=ke(),i=he(null),s=he(!1),l=he(!1);let a=null,c=null,u,d;const f=R(()=>e.persistent!==!0&&e.noRouteDismiss!==!0&&e.seamless!==!0),{preventBodyScroll:p}=Pg(),{registerTimeout:y}=fg(),{registerTick:T,removeTick:q}=dg(),{transitionProps:M,transitionStyle:m}=vg(e,()=>zs[e.position][0],()=>zs[e.position][1]),{showPortal:_,hidePortal:w,portalIsAccessible:F,renderPortal:j}=xg(r,i,Re,"dialog"),{hide:V}=mg({showing:s,hideOnRouteChange:f,handleShow:k,handleHide:Z,processOnMount:!0}),{addToHistory:N,removeFromHistory:C}=cg(s,V,f),x=R(()=>`q-dialog__inner flex no-pointer-events q-dialog__inner--${e.maximized===!0?"maximized":"minimized"} q-dialog__inner--${e.position} ${$g[e.position]}`+(l.value===!0?" q-dialog__inner--animating":"")+(e.fullWidth===!0?" q-dialog__inner--fullwidth":"")+(e.fullHeight===!0?" q-dialog__inner--fullheight":"")+(e.square===!0?" q-dialog__inner--square":"")),$=R(()=>s.value===!0&&e.seamless!==!0),v=R(()=>e.autoClose===!0?{onClick:fe}:{}),H=R(()=>[`q-dialog fullscreen no-pointer-events q-dialog--${$.value===!0?"modal":"seamless"}`,o.class]);be(()=>e.maximized,oe=>{s.value===!0&&se(oe)}),be($,oe=>{p(oe),oe===!0?(Og(ue),Mg(W)):(Hs(ue),Ds(W))});function k(oe){N(),c=e.noRefocus===!1&&document.activeElement!==null?document.activeElement:null,se(e.maximized),_(),l.value=!0,e.noFocus!==!0?(document.activeElement!==null&&document.activeElement.blur(),T(Y)):q(),y(()=>{if(r.proxy.$q.platform.is.ios===!0){if(e.seamless!==!0&&document.activeElement){const{top:ne,bottom:S}=document.activeElement.getBoundingClientRect(),{innerHeight:Q}=window,z=window.visualViewport!==void 0?window.visualViewport.height:Q;ne>0&&S>z/2&&(document.scrollingElement.scrollTop=Math.min(document.scrollingElement.scrollHeight-z,S>=Q?1/0:Math.ceil(document.scrollingElement.scrollTop+S-z/2))),document.activeElement.scrollIntoView()}d=!0,i.value.click(),d=!1}_(!0),l.value=!1,n("show",oe)},e.transitionDuration)}function Z(oe){q(),C(),_e(!0),l.value=!0,w(),c!==null&&(((oe&&oe.type.indexOf("key")===0?c.closest('[tabindex]:not([tabindex^="-"])'):void 0)||c).focus(),c=null),y(()=>{w(!0),l.value=!1,n("hide",oe)},e.transitionDuration)}function Y(oe){mi(()=>{let ne=i.value;ne===null||ne.contains(document.activeElement)===!0||(ne=(oe!==""?ne.querySelector(oe):null)||ne.querySelector("[autofocus][tabindex], [data-autofocus][tabindex]")||ne.querySelector("[autofocus] [tabindex], [data-autofocus] [tabindex]")||ne.querySelector("[autofocus], [data-autofocus]")||ne,ne.focus({preventScroll:!0}))})}function A(oe){oe&&typeof oe.focus=="function"?oe.focus({preventScroll:!0}):Y(),n("shake");const ne=i.value;ne!==null&&(ne.classList.remove("q-animate--scale"),ne.classList.add("q-animate--scale"),a!==null&&clearTimeout(a),a=setTimeout(()=>{a=null,i.value!==null&&(ne.classList.remove("q-animate--scale"),Y())},170))}function W(){e.seamless!==!0&&(e.persistent===!0||e.noEscDismiss===!0?e.maximized!==!0&&e.noShake!==!0&&A():(n("escapeKey"),V()))}function _e(oe){a!==null&&(clearTimeout(a),a=null),(oe===!0||s.value===!0)&&(se(!1),e.seamless!==!0&&(p(!1),Hs(ue),Ds(W))),oe!==!0&&(c=null)}function se(oe){oe===!0?u!==!0&&(so<1&&document.body.classList.add("q-body--dialog"),so++,u=!0):u===!0&&(so<2&&document.body.classList.remove("q-body--dialog"),so--,u=!1)}function fe(oe){d!==!0&&(V(oe),n("click",oe))}function L(oe){e.persistent!==!0&&e.noBackdropDismiss!==!0?V(oe):e.noShake!==!0&&A()}function ue(oe){e.allowFocusOutside!==!0&&F.value===!0&&Fh(i.value,oe.target)!==!0&&Y('[tabindex]:not([tabindex="-1"])')}Object.assign(r.proxy,{focus:Y,shake:A,__updateRefocusTarget(oe){c=oe||null}}),We(_e);function Re(){return E("div",{role:"dialog","aria-modal":$.value===!0?"true":"false",...o,class:H.value},[E(cn,{name:"q-transition--fade",appear:!0},()=>$.value===!0?E("div",{class:"q-dialog__backdrop fixed-full",style:m.value,"aria-hidden":"true",tabindex:-1,onClick:L}):null),E(cn,M.value,()=>s.value===!0?E("div",{ref:i,class:x.value,style:m.value,tabindex:-1,...v.value},tt(t.default)):null)])}return j}});const Wt={dark:{type:Boolean,default:null}};function Qt(e,t){return R(()=>e.dark===null?t.dark.isActive:e.dark)}var Bg=$e({name:"QCard",props:{...Wt,tag:{type:String,default:"div"},square:Boolean,flat:Boolean,bordered:Boolean},setup(e,{slots:t}){const{proxy:{$q:n}}=ke(),o=Qt(e,n),r=R(()=>"q-card"+(o.value===!0?" q-card--dark q-dark":"")+(e.bordered===!0?" q-card--bordered":"")+(e.square===!0?" q-card--square no-border-radius":"")+(e.flat===!0?" q-card--flat no-shadow":""));return()=>E(e.tag,{class:r.value},tt(t.default))}}),En=$e({name:"QCardSection",props:{tag:{type:String,default:"div"},horizontal:Boolean},setup(e,{slots:t}){const n=R(()=>`q-card__section q-card__section--${e.horizontal===!0?"horiz row no-wrap":"vert"}`);return()=>E(e.tag,{class:n.value},tt(t.default))}}),Fg=$e({name:"QCardActions",props:{...Aa,vertical:Boolean},setup(e,{slots:t}){const n=Ma(e),o=R(()=>`q-card__actions ${n.value} q-card__actions--${e.vertical===!0?"vert column":"horiz row"}`);return()=>E("div",{class:o.value},tt(t.default))}});const Ig={true:"inset",item:"item-inset","item-thumbnail":"item-thumbnail-inset"},dr={xs:2,sm:4,md:8,lg:16,xl:24};var Ks=$e({name:"QSeparator",props:{...Wt,spaced:[Boolean,String],inset:[Boolean,String],vertical:Boolean,color:String,size:String},setup(e){const t=ke(),n=Qt(e,t.proxy.$q),o=R(()=>e.vertical===!0?"vertical":"horizontal"),r=R(()=>` q-separator--${o.value}`),i=R(()=>e.inset!==!1?`${r.value}-${Ig[e.inset]}`:""),s=R(()=>`q-separator${r.value}${i.value}`+(e.color!==void 0?` bg-${e.color}`:"")+(n.value===!0?" q-separator--dark":"")),l=R(()=>{const a={};if(e.size!==void 0&&(a[e.vertical===!0?"width":"height"]=e.size),e.spaced!==!1){const c=e.spaced===!0?`${dr.md}px`:e.spaced in dr?`${dr[e.spaced]}px`:e.spaced,u=e.vertical===!0?["Left","Right"]:["Top","Bottom"];a[`margin${u[0]}`]=a[`margin${u[1]}`]=c}return a});return()=>E("hr",{class:s.value,style:l.value,"aria-orientation":o.value})}});function Ng({validate:e,resetValidation:t,requiresQForm:n}){const o=ut(id,!1);if(o!==!1){const{props:r,proxy:i}=ke();Object.assign(i,{validate:e,resetValidation:t}),be(()=>r.disable,s=>{s===!0?(typeof t=="function"&&t(),o.unbindComponent(i)):o.bindComponent(i)}),Ut(()=>{r.disable!==!0&&o.bindComponent(i)}),We(()=>{r.disable!==!0&&o.unbindComponent(i)})}else n===!0&&console.error("Parent QForm not found on useFormChild()!")}const Us=/^#[0-9a-fA-F]{3}([0-9a-fA-F]{3})?$/,Ws=/^#[0-9a-fA-F]{4}([0-9a-fA-F]{4})?$/,Qs=/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/,lo=/^rgb\(((0|[1-9][\d]?|1[\d]{0,2}|2[\d]?|2[0-4][\d]|25[0-5]),){2}(0|[1-9][\d]?|1[\d]{0,2}|2[\d]?|2[0-4][\d]|25[0-5])\)$/,ao=/^rgba\(((0|[1-9][\d]?|1[\d]{0,2}|2[\d]?|2[0-4][\d]|25[0-5]),){2}(0|[1-9][\d]?|1[\d]{0,2}|2[\d]?|2[0-4][\d]|25[0-5]),(0|0\.[0-9]+[1-9]|0\.[1-9]+|1)\)$/,hr={date:e=>/^-?[\d]+\/[0-1]\d\/[0-3]\d$/.test(e),time:e=>/^([0-1]?\d|2[0-3]):[0-5]\d$/.test(e),fulltime:e=>/^([0-1]?\d|2[0-3]):[0-5]\d:[0-5]\d$/.test(e),timeOrFulltime:e=>/^([0-1]?\d|2[0-3]):[0-5]\d(:[0-5]\d)?$/.test(e),email:e=>/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e),hexColor:e=>Us.test(e),hexaColor:e=>Ws.test(e),hexOrHexaColor:e=>Qs.test(e),rgbColor:e=>lo.test(e),rgbaColor:e=>ao.test(e),rgbOrRgbaColor:e=>lo.test(e)||ao.test(e),hexOrRgbColor:e=>Us.test(e)||lo.test(e),hexaOrRgbaColor:e=>Ws.test(e)||ao.test(e),anyColor:e=>Qs.test(e)||lo.test(e)||ao.test(e)},jg=[!0,!1,"ondemand"],Vg={modelValue:{},error:{type:Boolean,default:null},errorMessage:String,noErrorIcon:Boolean,rules:Array,reactiveRules:Boolean,lazyRules:{type:[Boolean,String],validator:e=>jg.includes(e)}};function Dg(e,t){const{props:n,proxy:o}=ke(),r=he(!1),i=he(null),s=he(null);Ng({validate:y,resetValidation:p});let l=0,a;const c=R(()=>n.rules!==void 0&&n.rules!==null&&n.rules.length!==0),u=R(()=>n.disable!==!0&&c.value===!0),d=R(()=>n.error===!0||r.value===!0),f=R(()=>typeof n.errorMessage=="string"&&n.errorMessage.length!==0?n.errorMessage:i.value);be(()=>n.modelValue,()=>{T()}),be(()=>n.reactiveRules,M=>{M===!0?a===void 0&&(a=be(()=>n.rules,()=>{T(!0)})):a!==void 0&&(a(),a=void 0)},{immediate:!0}),be(e,M=>{M===!0?s.value===null&&(s.value=!1):s.value===!1&&(s.value=!0,u.value===!0&&n.lazyRules!=="ondemand"&&t.value===!1&&q())});function p(){l++,t.value=!1,s.value=null,r.value=!1,i.value=null,q.cancel()}function y(M=n.modelValue){if(u.value!==!0)return!0;const m=++l,_=t.value!==!0?()=>{s.value=!0}:()=>{},w=(j,V)=>{j===!0&&_(),r.value=j,i.value=V||null,t.value=!1},F=[];for(let j=0;j{if(j===void 0||Array.isArray(j)===!1||j.length===0)return m===l&&w(!1),!0;const V=j.find(N=>N===!1||typeof N=="string");return m===l&&w(V!==void 0,V),V===void 0},j=>(m===l&&(console.error(j),w(!0)),!1)))}function T(M){u.value===!0&&n.lazyRules!=="ondemand"&&(s.value===!0||n.lazyRules!==!0&&M!==!0)&&q()}const q=ua(y,0);return We(()=>{a!==void 0&&a(),q.cancel()}),Object.assign(o,{resetValidation:p,validate:y}),bn(o,"hasError",()=>d.value),{isDirtyModel:s,hasRules:c,hasError:d,errorMessage:f,validate:y,resetValidation:p}}const Ys=/^on[A-Z]/;function Hg(e,t){const n={listeners:he({}),attributes:he({})};function o(){const r={},i={};for(const s in e)s!=="class"&&s!=="style"&&Ys.test(s)===!1&&(r[s]=e[s]);for(const s in t.props)Ys.test(s)===!0&&(i[s]=t.props[s]);n.attributes.value=r,n.listeners.value=i}return Fl(o),o(),n}let gr,uo=0;const Te=new Array(256);for(let e=0;e<256;e++)Te[e]=(e+256).toString(16).substring(1);const zg=(()=>{const e=typeof crypto!="undefined"?crypto:typeof window!="undefined"?window.crypto||window.msCrypto:void 0;if(e!==void 0){if(e.randomBytes!==void 0)return e.randomBytes;if(e.getRandomValues!==void 0)return t=>{const n=new Uint8Array(t);return e.getRandomValues(n),n}}return t=>{const n=[];for(let o=t;o>0;o--)n.push(Math.floor(Math.random()*256));return n}})(),Zs=4096;function Kg(){(gr===void 0||uo+16>Zs)&&(uo=0,gr=zg(Zs));const e=Array.prototype.slice.call(gr,uo,uo+=16);return e[6]=e[6]&15|64,e[8]=e[8]&63|128,Te[e[0]]+Te[e[1]]+Te[e[2]]+Te[e[3]]+"-"+Te[e[4]]+Te[e[5]]+"-"+Te[e[6]]+Te[e[7]]+"-"+Te[e[8]]+Te[e[9]]+"-"+Te[e[10]]+Te[e[11]]+Te[e[12]]+Te[e[13]]+Te[e[14]]+Te[e[15]]}function Nr(e){return e===void 0?`f_${Kg()}`:e}function jr(e){return e!=null&&(""+e).length!==0}const Ug={...Wt,...Vg,label:String,stackLabel:Boolean,hint:String,hideHint:Boolean,prefix:String,suffix:String,labelColor:String,color:String,bgColor:String,filled:Boolean,outlined:Boolean,borderless:Boolean,standout:[Boolean,String],square:Boolean,loading:Boolean,labelSlot:Boolean,bottomSlots:Boolean,hideBottomSpace:Boolean,rounded:Boolean,dense:Boolean,itemAligned:Boolean,counter:Boolean,clearable:Boolean,clearIcon:String,disable:Boolean,readonly:Boolean,autofocus:Boolean,for:String,maxlength:[Number,String]},Wg=["update:modelValue","clear","focus","blur","popupShow","popupHide"];function Qg(){const{props:e,attrs:t,proxy:n,vnode:o}=ke();return{isDark:Qt(e,n.$q),editable:R(()=>e.disable!==!0&&e.readonly!==!0),innerLoading:he(!1),focused:he(!1),hasPopupOpen:!1,splitAttrs:Hg(t,o),targetUid:he(Nr(e.for)),rootRef:he(null),targetRef:he(null),controlRef:he(null)}}function Yg(e){const{props:t,emit:n,slots:o,attrs:r,proxy:i}=ke(),{$q:s}=i;let l=null;e.hasValue===void 0&&(e.hasValue=R(()=>jr(t.modelValue))),e.emitValue===void 0&&(e.emitValue=A=>{n("update:modelValue",A)}),e.controlEvents===void 0&&(e.controlEvents={onFocusin:C,onFocusout:x}),Object.assign(e,{clearValue:$,onControlFocusin:C,onControlFocusout:x,focus:V}),e.computedCounter===void 0&&(e.computedCounter=R(()=>{if(t.counter!==!1){const A=typeof t.modelValue=="string"||typeof t.modelValue=="number"?(""+t.modelValue).length:Array.isArray(t.modelValue)===!0?t.modelValue.length:0,W=t.maxlength!==void 0?t.maxlength:t.maxValues;return A+(W!==void 0?" / "+W:"")}}));const{isDirtyModel:a,hasRules:c,hasError:u,errorMessage:d,resetValidation:f}=Dg(e.focused,e.innerLoading),p=e.floatingLabel!==void 0?R(()=>t.stackLabel===!0||e.focused.value===!0||e.floatingLabel.value===!0):R(()=>t.stackLabel===!0||e.focused.value===!0||e.hasValue.value===!0),y=R(()=>t.bottomSlots===!0||t.hint!==void 0||c.value===!0||t.counter===!0||t.error!==null),T=R(()=>t.filled===!0?"filled":t.outlined===!0?"outlined":t.borderless===!0?"borderless":t.standout?"standout":"standard"),q=R(()=>`q-field row no-wrap items-start q-field--${T.value}`+(e.fieldClass!==void 0?` ${e.fieldClass.value}`:"")+(t.rounded===!0?" q-field--rounded":"")+(t.square===!0?" q-field--square":"")+(p.value===!0?" q-field--float":"")+(m.value===!0?" q-field--labeled":"")+(t.dense===!0?" q-field--dense":"")+(t.itemAligned===!0?" q-field--item-aligned q-item-type":"")+(e.isDark.value===!0?" q-field--dark":"")+(e.getControl===void 0?" q-field--auto-height":"")+(e.focused.value===!0?" q-field--focused":"")+(u.value===!0?" q-field--error":"")+(u.value===!0||e.focused.value===!0?" q-field--highlighted":"")+(t.hideBottomSpace!==!0&&y.value===!0?" q-field--with-bottom":"")+(t.disable===!0?" q-field--disabled":t.readonly===!0?" q-field--readonly":"")),M=R(()=>"q-field__control relative-position row no-wrap"+(t.bgColor!==void 0?` bg-${t.bgColor}`:"")+(u.value===!0?" text-negative":typeof t.standout=="string"&&t.standout.length!==0&&e.focused.value===!0?` ${t.standout}`:t.color!==void 0?` text-${t.color}`:"")),m=R(()=>t.labelSlot===!0||t.label!==void 0),_=R(()=>"q-field__label no-pointer-events absolute ellipsis"+(t.labelColor!==void 0&&u.value!==!0?` text-${t.labelColor}`:"")),w=R(()=>({id:e.targetUid.value,editable:e.editable.value,focused:e.focused.value,floatingLabel:p.value,modelValue:t.modelValue,emitValue:e.emitValue})),F=R(()=>{const A={for:e.targetUid.value};return t.disable===!0?A["aria-disabled"]="true":t.readonly===!0&&(A["aria-readonly"]="true"),A});be(()=>t.for,A=>{e.targetUid.value=Nr(A)});function j(){const A=document.activeElement;let W=e.targetRef!==void 0&&e.targetRef.value;W&&(A===null||A.id!==e.targetUid.value)&&(W.hasAttribute("tabindex")===!0||(W=W.querySelector("[tabindex]")),W&&W!==A&&W.focus({preventScroll:!0}))}function V(){mi(j)}function N(){yg(j);const A=document.activeElement;A!==null&&e.rootRef.value.contains(A)&&A.blur()}function C(A){l!==null&&(clearTimeout(l),l=null),e.editable.value===!0&&e.focused.value===!1&&(e.focused.value=!0,n("focus",A))}function x(A,W){l!==null&&clearTimeout(l),l=setTimeout(()=>{l=null,!(document.hasFocus()===!0&&(e.hasPopupOpen===!0||e.controlRef===void 0||e.controlRef.value===null||e.controlRef.value.contains(document.activeElement)!==!1))&&(e.focused.value===!0&&(e.focused.value=!1,n("blur",A)),W!==void 0&&W())})}function $(A){Ke(A),s.platform.is.mobile!==!0?(e.targetRef!==void 0&&e.targetRef.value||e.rootRef.value).focus():e.rootRef.value.contains(document.activeElement)===!0&&document.activeElement.blur(),t.type==="file"&&(e.inputRef.value.value=null),n("update:modelValue",null),n("clear",t.modelValue),je(()=>{f(),s.platform.is.mobile!==!0&&(a.value=!1)})}function v(){const A=[];return o.prepend!==void 0&&A.push(E("div",{class:"q-field__prepend q-field__marginal row no-wrap items-center",key:"prepend",onClick:Et},o.prepend())),A.push(E("div",{class:"q-field__control-container col relative-position row no-wrap q-anchor--skip"},H())),u.value===!0&&t.noErrorIcon===!1&&A.push(Z("error",[E(pt,{name:s.iconSet.field.error,color:"negative"})])),t.loading===!0||e.innerLoading.value===!0?A.push(Z("inner-loading-append",o.loading!==void 0?o.loading():[E(Un,{color:t.color})])):t.clearable===!0&&e.hasValue.value===!0&&e.editable.value===!0&&A.push(Z("inner-clearable-append",[E(pt,{class:"q-field__focusable-action",tag:"button",name:t.clearIcon||s.iconSet.field.clear,tabindex:0,type:"button","aria-hidden":null,role:null,onClick:$})])),o.append!==void 0&&A.push(E("div",{class:"q-field__append q-field__marginal row no-wrap items-center",key:"append",onClick:Et},o.append())),e.getInnerAppend!==void 0&&A.push(Z("inner-append",e.getInnerAppend())),e.getControlChild!==void 0&&A.push(e.getControlChild()),A}function H(){const A=[];return t.prefix!==void 0&&t.prefix!==null&&A.push(E("div",{class:"q-field__prefix no-pointer-events row items-center"},t.prefix)),e.getShadowControl!==void 0&&e.hasShadow.value===!0&&A.push(e.getShadowControl()),e.getControl!==void 0?A.push(e.getControl()):o.rawControl!==void 0?A.push(o.rawControl()):o.control!==void 0&&A.push(E("div",{ref:e.targetRef,class:"q-field__native row",tabindex:-1,...e.splitAttrs.attributes.value,"data-autofocus":t.autofocus===!0||void 0},o.control(w.value))),m.value===!0&&A.push(E("div",{class:_.value},tt(o.label,t.label))),t.suffix!==void 0&&t.suffix!==null&&A.push(E("div",{class:"q-field__suffix no-pointer-events row items-center"},t.suffix)),A.concat(tt(o.default))}function k(){let A,W;u.value===!0?d.value!==null?(A=[E("div",{role:"alert"},d.value)],W=`q--slot-error-${d.value}`):(A=tt(o.error),W="q--slot-error"):(t.hideHint!==!0||e.focused.value===!0)&&(t.hint!==void 0?(A=[E("div",t.hint)],W=`q--slot-hint-${t.hint}`):(A=tt(o.hint),W="q--slot-hint"));const _e=t.counter===!0||o.counter!==void 0;if(t.hideBottomSpace===!0&&_e===!1&&A===void 0)return;const se=E("div",{key:W,class:"q-field__messages col"},A);return E("div",{class:"q-field__bottom row items-start q-field__bottom--"+(t.hideBottomSpace!==!0?"animated":"stale"),onClick:Et},[t.hideBottomSpace===!0?se:E(cn,{name:"q-transition--field-message"},()=>se),_e===!0?E("div",{class:"q-field__counter"},o.counter!==void 0?o.counter():e.computedCounter.value):null])}function Z(A,W){return W===null?null:E("div",{key:A,class:"q-field__append q-field__marginal row no-wrap items-center q-anchor--skip"},W)}let Y=!1;return Fo(()=>{Y=!0}),Ll(()=>{Y===!0&&t.autofocus===!0&&i.focus()}),Ut(()=>{qt.value===!0&&t.for===void 0&&(e.targetUid.value=Nr()),t.autofocus===!0&&i.focus()}),We(()=>{l!==null&&clearTimeout(l)}),Object.assign(i,{focus:V,blur:N}),function(){const W=e.getControl===void 0&&o.control===void 0?{...e.splitAttrs.attributes.value,"data-autofocus":t.autofocus===!0||void 0,...F.value}:F.value;return E("label",{ref:e.rootRef,class:[q.value,r.class],style:r.style,...W},[o.before!==void 0?E("div",{class:"q-field__before q-field__marginal row no-wrap items-center",onClick:Et},o.before()):null,E("div",{class:"q-field__inner relative-position col self-stretch"},[E("div",{ref:e.controlRef,class:M.value,tabindex:-1,...e.controlEvents},v()),y.value===!0?k():null]),o.after!==void 0?E("div",{class:"q-field__after q-field__marginal row no-wrap items-center",onClick:Et},o.after()):null])}}const Js={date:"####/##/##",datetime:"####/##/## ##:##",time:"##:##",fulltime:"##:##:##",phone:"(###) ### - ####",card:"#### #### #### ####"},Po={"#":{pattern:"[\\d]",negate:"[^\\d]"},S:{pattern:"[a-zA-Z]",negate:"[^a-zA-Z]"},N:{pattern:"[0-9a-zA-Z]",negate:"[^0-9a-zA-Z]"},A:{pattern:"[a-zA-Z]",negate:"[^a-zA-Z]",transform:e=>e.toLocaleUpperCase()},a:{pattern:"[a-zA-Z]",negate:"[^a-zA-Z]",transform:e=>e.toLocaleLowerCase()},X:{pattern:"[0-9a-zA-Z]",negate:"[^0-9a-zA-Z]",transform:e=>e.toLocaleUpperCase()},x:{pattern:"[0-9a-zA-Z]",negate:"[^0-9a-zA-Z]",transform:e=>e.toLocaleLowerCase()}},Za=Object.keys(Po);Za.forEach(e=>{Po[e].regex=new RegExp(Po[e].pattern)});const Zg=new RegExp("\\\\([^.*+?^${}()|([\\]])|([.*+?^${}()|[\\]])|(["+Za.join("")+"])|(.)","g"),Xs=/[.*+?^${}()|[\]\\]/g,Se=String.fromCharCode(1),Jg={mask:String,reverseFillMask:Boolean,fillMask:[Boolean,String],unmaskedValue:Boolean};function Xg(e,t,n,o){let r,i,s,l,a,c;const u=he(null),d=he(p());function f(){return e.autogrow===!0||["textarea","text","search","url","tel","password"].includes(e.type)}be(()=>e.type+e.autogrow,T),be(()=>e.mask,C=>{if(C!==void 0)q(d.value,!0);else{const x=V(d.value);T(),e.modelValue!==x&&t("update:modelValue",x)}}),be(()=>e.fillMask+e.reverseFillMask,()=>{u.value===!0&&q(d.value,!0)}),be(()=>e.unmaskedValue,()=>{u.value===!0&&q(d.value)});function p(){if(T(),u.value===!0){const C=F(V(e.modelValue));return e.fillMask!==!1?N(C):C}return e.modelValue}function y(C){if(C-1){for(let H=C-$.length;H>0;H--)x+=Se;$=$.slice(0,v)+x+$.slice(v)}return $}function T(){if(u.value=e.mask!==void 0&&e.mask.length!==0&&f(),u.value===!1){l=void 0,r="",i="";return}const C=Js[e.mask]===void 0?e.mask:Js[e.mask],x=typeof e.fillMask=="string"&&e.fillMask.length!==0?e.fillMask.slice(0,1):"_",$=x.replace(Xs,"\\$&"),v=[],H=[],k=[];let Z=e.reverseFillMask===!0,Y="",A="";C.replace(Zg,(fe,L,ue,Re,oe)=>{if(Re!==void 0){const ne=Po[Re];k.push(ne),A=ne.negate,Z===!0&&(H.push("(?:"+A+"+)?("+ne.pattern+"+)?(?:"+A+"+)?("+ne.pattern+"+)?"),Z=!1),H.push("(?:"+A+"+)?("+ne.pattern+")?")}else if(ue!==void 0)Y="\\"+(ue==="\\"?"":ue),k.push(ue),v.push("([^"+Y+"]+)?"+Y+"?");else{const ne=L!==void 0?L:oe;Y=ne==="\\"?"\\\\\\\\":ne.replace(Xs,"\\\\$&"),k.push(ne),v.push("([^"+Y+"]+)?"+Y+"?")}});const W=new RegExp("^"+v.join("")+"("+(Y===""?".":"[^"+Y+"]")+"+)?"+(Y===""?"":"["+Y+"]*")+"$"),_e=H.length-1,se=H.map((fe,L)=>L===0&&e.reverseFillMask===!0?new RegExp("^"+$+"*"+fe):L===_e?new RegExp("^"+fe+"("+(A===""?".":A)+"+)?"+(e.reverseFillMask===!0?"$":$+"*")):new RegExp("^"+fe));s=k,l=fe=>{const L=W.exec(e.reverseFillMask===!0?fe:fe.slice(0,k.length+1));L!==null&&(fe=L.slice(1).join(""));const ue=[],Re=se.length;for(let oe=0,ne=fe;oetypeof fe=="string"?fe:Se).join(""),i=r.split(Se).join(x)}function q(C,x,$){const v=o.value,H=v.selectionEnd,k=v.value.length-H,Z=V(C);x===!0&&T();const Y=F(Z),A=e.fillMask!==!1?N(Y):Y,W=d.value!==A;v.value!==A&&(v.value=A),W===!0&&(d.value=A),document.activeElement===v&&je(()=>{if(A===i){const se=e.reverseFillMask===!0?i.length:0;v.setSelectionRange(se,se,"forward");return}if($==="insertFromPaste"&&e.reverseFillMask!==!0){const se=v.selectionEnd;let fe=H-1;for(let L=a;L<=fe&&L-1){const se=e.reverseFillMask===!0?H===0?A.length>Y.length?1:0:Math.max(0,A.length-(A===i?0:Math.min(Y.length,k)+1))+1:H;v.setSelectionRange(se,se,"forward");return}if(e.reverseFillMask===!0)if(W===!0){const se=Math.max(0,A.length-(A===i?0:Math.min(Y.length,k+1)));se===1&&H===1?v.setSelectionRange(se,se,"forward"):m.rightReverse(v,se)}else{const se=A.length-k;v.setSelectionRange(se,se,"backward")}else if(W===!0){const se=Math.max(0,r.indexOf(Se),Math.min(Y.length,H)-1);m.right(v,se)}else{const se=H-1;m.right(v,se)}});const _e=e.unmaskedValue===!0?V(A):A;String(e.modelValue)!==_e&&n(_e,!0)}function M(C,x,$){const v=F(V(C.value));x=Math.max(0,r.indexOf(Se),Math.min(v.length,x)),a=x,C.setSelectionRange(x,$,"forward")}const m={left(C,x){const $=r.slice(x-1).indexOf(Se)===-1;let v=Math.max(0,x-1);for(;v>=0;v--)if(r[v]===Se){x=v,$===!0&&x++;break}if(v<0&&r[x]!==void 0&&r[x]!==Se)return m.right(C,0);x>=0&&C.setSelectionRange(x,x,"backward")},right(C,x){const $=C.value.length;let v=Math.min($,x+1);for(;v<=$;v++)if(r[v]===Se){x=v;break}else r[v-1]===Se&&(x=v);if(v>$&&r[x-1]!==void 0&&r[x-1]!==Se)return m.left(C,$);C.setSelectionRange(x,x,"forward")},leftReverse(C,x){const $=y(C.value.length);let v=Math.max(0,x-1);for(;v>=0;v--)if($[v-1]===Se){x=v;break}else if($[v]===Se&&(x=v,v===0))break;if(v<0&&$[x]!==void 0&&$[x]!==Se)return m.rightReverse(C,0);x>=0&&C.setSelectionRange(x,x,"backward")},rightReverse(C,x){const $=C.value.length,v=y($),H=v.slice(0,x+1).indexOf(Se)===-1;let k=Math.min($,x+1);for(;k<=$;k++)if(v[k-1]===Se){x=k,x>0&&H===!0&&x--;break}if(k>$&&v[x-1]!==void 0&&v[x-1]!==Se)return m.leftReverse(C,$);C.setSelectionRange(x,x,"forward")}};function _(C){t("click",C),c=void 0}function w(C){if(t("keydown",C),da(C)===!0||C.altKey===!0)return;const x=o.value,$=x.selectionStart,v=x.selectionEnd;if(C.shiftKey||(c=void 0),C.keyCode===37||C.keyCode===39){C.shiftKey&&c===void 0&&(c=x.selectionDirection==="forward"?$:v);const H=m[(C.keyCode===39?"right":"left")+(e.reverseFillMask===!0?"Reverse":"")];if(C.preventDefault(),H(x,c===$?v:$),C.shiftKey){const k=x.selectionStart;x.setSelectionRange(Math.min(c,k),Math.max(c,k),"forward")}}else C.keyCode===8&&e.reverseFillMask!==!0&&$===v?(m.left(x,$),x.setSelectionRange(x.selectionStart,v,"backward")):C.keyCode===46&&e.reverseFillMask===!0&&$===v&&(m.rightReverse(x,v),x.setSelectionRange($,x.selectionEnd,"forward"))}function F(C){if(C==null||C==="")return"";if(e.reverseFillMask===!0)return j(C);const x=s;let $=0,v="";for(let H=0;H=0&&v>-1;k--){const Z=x[k];let Y=C[v];if(typeof Z=="string")H=Z+H,Y===Z&&v--;else if(Y!==void 0&&Z.regex.test(Y))do H=(Z.transform!==void 0?Z.transform(Y):Y)+H,v--,Y=C[v];while($===k&&Y!==void 0&&Z.regex.test(Y));else return H}return H}function V(C){return typeof C!="string"||l===void 0?typeof C=="number"?l(""+C):C:l(C)}function N(C){return i.length-C.length<=0?C:e.reverseFillMask===!0&&C.length!==0?i.slice(0,-C.length)+C:C+i.slice(C.length)}return{innerValue:d,hasMask:u,moveCursorForPaste:M,updateMaskValue:q,onMaskedKeydown:w,onMaskedClick:_}}const pi={name:String};function Ja(e={}){return(t,n,o)=>{t[n](E("input",{class:"hidden"+(o||""),...e.value}))}}function Gg(e){return R(()=>e.name||e.for)}function em(e,t){function n(){const o=e.modelValue;try{const r="DataTransfer"in window?new DataTransfer:"ClipboardEvent"in window?new ClipboardEvent("").clipboardData:void 0;return Object(o)===o&&("length"in o?Array.from(o):[o]).forEach(i=>{r.items.add(i)}),{files:r.files}}catch{return{files:void 0}}}return R(t===!0?()=>{if(e.type==="file")return n()}:n)}const tm=/[\u3000-\u303f\u3040-\u309f\u30a0-\u30ff\uff00-\uff9f\u4e00-\u9faf\u3400-\u4dbf]/,nm=/[\u4e00-\u9fff\u3400-\u4dbf\u{20000}-\u{2a6df}\u{2a700}-\u{2b73f}\u{2b740}-\u{2b81f}\u{2b820}-\u{2ceaf}\uf900-\ufaff\u3300-\u33ff\ufe30-\ufe4f\uf900-\ufaff\u{2f800}-\u{2fa1f}]/u,om=/[\u3131-\u314e\u314f-\u3163\uac00-\ud7a3]/,rm=/[a-z0-9_ -]$/i;function im(e){return function(n){if(n.type==="compositionend"||n.type==="change"){if(n.target.qComposing!==!0)return;n.target.qComposing=!1,e(n)}else n.type==="compositionupdate"&&n.target.qComposing!==!0&&typeof n.data=="string"&&(we.is.firefox===!0?rm.test(n.data)===!1:tm.test(n.data)===!0||nm.test(n.data)===!0||om.test(n.data)===!0)===!0&&(n.target.qComposing=!0)}}var sm=$e({name:"QInput",inheritAttrs:!1,props:{...Ug,...Jg,...pi,modelValue:{required:!1},shadowText:String,type:{type:String,default:"text"},debounce:[String,Number],autogrow:Boolean,inputClass:[Array,String,Object],inputStyle:[Array,String,Object]},emits:[...Wg,"paste","change","keydown","click","animationend"],setup(e,{emit:t,attrs:n}){const{proxy:o}=ke(),{$q:r}=o,i={};let s=NaN,l,a,c=null,u;const d=he(null),f=Gg(e),{innerValue:p,hasMask:y,moveCursorForPaste:T,updateMaskValue:q,onMaskedKeydown:M,onMaskedClick:m}=Xg(e,t,Y,d),_=em(e,!0),w=R(()=>jr(p.value)),F=im(k),j=Qg(),V=R(()=>e.type==="textarea"||e.autogrow===!0),N=R(()=>V.value===!0||["text","search","url","tel","password"].includes(e.type)),C=R(()=>{const L={...j.splitAttrs.listeners.value,onInput:k,onPaste:H,onChange:W,onBlur:_e,onFocus:ko};return L.onCompositionstart=L.onCompositionupdate=L.onCompositionend=F,y.value===!0&&(L.onKeydown=M,L.onClick=m),e.autogrow===!0&&(L.onAnimationend=Z),L}),x=R(()=>{const L={tabindex:0,"data-autofocus":e.autofocus===!0||void 0,rows:e.type==="textarea"?6:void 0,"aria-label":e.label,name:f.value,...j.splitAttrs.attributes.value,id:j.targetUid.value,maxlength:e.maxlength,disabled:e.disable===!0,readonly:e.readonly===!0};return V.value===!1&&(L.type=e.type),e.autogrow===!0&&(L.rows=1),L});be(()=>e.type,()=>{d.value&&(d.value.value=e.modelValue)}),be(()=>e.modelValue,L=>{if(y.value===!0){if(a===!0&&(a=!1,String(L)===s))return;q(L)}else p.value!==L&&(p.value=L,e.type==="number"&&i.hasOwnProperty("value")===!0&&(l===!0?l=!1:delete i.value));e.autogrow===!0&&je(A)}),be(()=>e.autogrow,L=>{L===!0?je(A):d.value!==null&&n.rows>0&&(d.value.style.height="auto")}),be(()=>e.dense,()=>{e.autogrow===!0&&je(A)});function $(){mi(()=>{const L=document.activeElement;d.value!==null&&d.value!==L&&(L===null||L.id!==j.targetUid.value)&&d.value.focus({preventScroll:!0})})}function v(){d.value!==null&&d.value.select()}function H(L){if(y.value===!0&&e.reverseFillMask!==!0){const ue=L.target;T(ue,ue.selectionStart,ue.selectionEnd)}t("paste",L)}function k(L){if(!L||!L.target)return;if(e.type==="file"){t("update:modelValue",L.target.files);return}const ue=L.target.value;if(L.target.qComposing===!0){i.value=ue;return}if(y.value===!0)q(ue,!1,L.inputType);else if(Y(ue),N.value===!0&&L.target===document.activeElement){const{selectionStart:Re,selectionEnd:oe}=L.target;Re!==void 0&&oe!==void 0&&je(()=>{L.target===document.activeElement&&ue.indexOf(L.target.value)===0&&L.target.setSelectionRange(Re,oe)})}e.autogrow===!0&&A()}function Z(L){t("animationend",L),A()}function Y(L,ue){u=()=>{c=null,e.type!=="number"&&i.hasOwnProperty("value")===!0&&delete i.value,e.modelValue!==L&&s!==L&&(s=L,ue===!0&&(a=!0),t("update:modelValue",L),je(()=>{s===L&&(s=NaN)})),u=void 0},e.type==="number"&&(l=!0,i.value=L),e.debounce!==void 0?(c!==null&&clearTimeout(c),i.value=L,c=setTimeout(u,e.debounce)):u()}function A(){requestAnimationFrame(()=>{const L=d.value;if(L!==null){const ue=L.parentNode.style,{scrollTop:Re}=L,{overflowY:oe,maxHeight:ne}=r.platform.is.firefox===!0?{}:window.getComputedStyle(L),S=oe!==void 0&&oe!=="scroll";S===!0&&(L.style.overflowY="hidden"),ue.marginBottom=L.scrollHeight-1+"px",L.style.height="1px",L.style.height=L.scrollHeight+"px",S===!0&&(L.style.overflowY=parseInt(ne,10){d.value!==null&&(d.value.value=p.value!==void 0?p.value:"")})}function se(){return i.hasOwnProperty("value")===!0?i.value:p.value!==void 0?p.value:""}We(()=>{_e()}),Ut(()=>{e.autogrow===!0&&A()}),Object.assign(j,{innerValue:p,fieldClass:R(()=>`q-${V.value===!0?"textarea":"input"}`+(e.autogrow===!0?" q-textarea--autogrow":"")),hasShadow:R(()=>e.type!=="file"&&typeof e.shadowText=="string"&&e.shadowText.length!==0),inputRef:d,emitValue:Y,hasValue:w,floatingLabel:R(()=>w.value===!0&&(e.type!=="number"||isNaN(p.value)===!1)||jr(e.displayValue)),getControl:()=>E(V.value===!0?"textarea":"input",{ref:d,class:["q-field__native q-placeholder",e.inputClass],style:e.inputStyle,...x.value,...C.value,...e.type!=="file"?{value:se()}:_.value}),getShadowControl:()=>E("div",{class:"q-field__native q-field__shadow absolute-bottom no-pointer-events"+(V.value===!0?"":" text-no-wrap")},[E("span",{class:"invisible"},se()),E("span",e.shadowText)])});const fe=Yg(j);return Object.assign(o,{focus:$,select:v,getNativeElement:()=>d.value}),bn(o,"nativeEl",()=>d.value),fe}});function Xa(e,t){const n=he(null),o=R(()=>e.disable===!0?null:E("span",{ref:n,class:"no-outline",tabindex:-1}));function r(i){const s=t.value;i!==void 0&&i.type.indexOf("key")===0?s!==null&&document.activeElement!==s&&s.contains(document.activeElement)===!0&&s.focus():n.value!==null&&(i===void 0||s!==null&&s.contains(i.target)===!0)&&n.value.focus()}return{refocusTargetEl:o,refocusTarget:r}}var Ga={xs:30,sm:35,md:40,lg:50,xl:60};const lm=E("svg",{key:"svg",class:"q-radio__bg absolute non-selectable",viewBox:"0 0 24 24"},[E("path",{d:"M12,22a10,10 0 0 1 -10,-10a10,10 0 0 1 10,-10a10,10 0 0 1 10,10a10,10 0 0 1 -10,10m0,-22a12,12 0 0 0 -12,12a12,12 0 0 0 12,12a12,12 0 0 0 12,-12a12,12 0 0 0 -12,-12"}),E("path",{class:"q-radio__check",d:"M12,6a6,6 0 0 0 -6,6a6,6 0 0 0 6,6a6,6 0 0 0 6,-6a6,6 0 0 0 -6,-6"})]);var am=$e({name:"QRadio",props:{...Wt,...Yn,...pi,modelValue:{required:!0},val:{required:!0},label:String,leftLabel:Boolean,checkedIcon:String,uncheckedIcon:String,color:String,keepColor:Boolean,dense:Boolean,disable:Boolean,tabindex:[String,Number]},emits:["update:modelValue"],setup(e,{slots:t,emit:n}){const{proxy:o}=ke(),r=Qt(e,o.$q),i=Zn(e,Ga),s=he(null),{refocusTargetEl:l,refocusTarget:a}=Xa(e,s),c=R(()=>ie(e.modelValue)===ie(e.val)),u=R(()=>"q-radio cursor-pointer no-outline row inline no-wrap items-center"+(e.disable===!0?" disabled":"")+(r.value===!0?" q-radio--dark":"")+(e.dense===!0?" q-radio--dense":"")+(e.leftLabel===!0?" reverse":"")),d=R(()=>{const _=e.color!==void 0&&(e.keepColor===!0||c.value===!0)?` text-${e.color}`:"";return`q-radio__inner relative-position q-radio__inner--${c.value===!0?"truthy":"falsy"}${_}`}),f=R(()=>(c.value===!0?e.checkedIcon:e.uncheckedIcon)||null),p=R(()=>e.disable===!0?-1:e.tabindex||0),y=R(()=>{const _={type:"radio"};return e.name!==void 0&&Object.assign(_,{".checked":c.value===!0,"^checked":c.value===!0?"checked":void 0,name:e.name,value:e.val}),_}),T=Ja(y);function q(_){_!==void 0&&(Ke(_),a(_)),e.disable!==!0&&c.value!==!0&&n("update:modelValue",e.val,_)}function M(_){(_.keyCode===13||_.keyCode===32)&&Ke(_)}function m(_){(_.keyCode===13||_.keyCode===32)&&q(_)}return Object.assign(o,{set:q}),()=>{const _=f.value!==null?[E("div",{key:"icon",class:"q-radio__icon-container absolute-full flex flex-center no-wrap"},[E(pt,{class:"q-radio__icon",name:f.value})])]:[lm];e.disable!==!0&&T(_,"unshift"," q-radio__native q-ma-none q-pa-none");const w=[E("div",{class:d.value,style:i.value,"aria-hidden":"true"},_)];l.value!==null&&w.push(l.value);const F=e.label!==void 0?It(t.default,[e.label]):tt(t.default);return F!==void 0&&w.push(E("div",{class:"q-radio__label q-anchor--skip"},F)),E("div",{ref:s,class:u.value,tabindex:p.value,role:"radio","aria-label":e.label,"aria-checked":c.value===!0?"true":"false","aria-disabled":e.disable===!0?"true":void 0,onClick:q,onKeydown:M,onKeyup:m},w)}}});const eu={...Wt,...Yn,...pi,modelValue:{required:!0,default:null},val:{},trueValue:{default:!0},falseValue:{default:!1},indeterminateValue:{default:null},checkedIcon:String,uncheckedIcon:String,indeterminateIcon:String,toggleOrder:{type:String,validator:e=>e==="tf"||e==="ft"},toggleIndeterminate:Boolean,label:String,leftLabel:Boolean,color:String,keepColor:Boolean,dense:Boolean,disable:Boolean,tabindex:[String,Number]},tu=["update:modelValue"];function nu(e,t){const{props:n,slots:o,emit:r,proxy:i}=ke(),{$q:s}=i,l=Qt(n,s),a=he(null),{refocusTargetEl:c,refocusTarget:u}=Xa(n,a),d=Zn(n,Ga),f=R(()=>n.val!==void 0&&Array.isArray(n.modelValue)),p=R(()=>{const v=ie(n.val);return f.value===!0?n.modelValue.findIndex(H=>ie(H)===v):-1}),y=R(()=>f.value===!0?p.value>-1:ie(n.modelValue)===ie(n.trueValue)),T=R(()=>f.value===!0?p.value===-1:ie(n.modelValue)===ie(n.falseValue)),q=R(()=>y.value===!1&&T.value===!1),M=R(()=>n.disable===!0?-1:n.tabindex||0),m=R(()=>`q-${e} cursor-pointer no-outline row inline no-wrap items-center`+(n.disable===!0?" disabled":"")+(l.value===!0?` q-${e}--dark`:"")+(n.dense===!0?` q-${e}--dense`:"")+(n.leftLabel===!0?" reverse":"")),_=R(()=>{const v=y.value===!0?"truthy":T.value===!0?"falsy":"indet",H=n.color!==void 0&&(n.keepColor===!0||(e==="toggle"?y.value===!0:T.value!==!0))?` text-${n.color}`:"";return`q-${e}__inner relative-position non-selectable q-${e}__inner--${v}${H}`}),w=R(()=>{const v={type:"checkbox"};return n.name!==void 0&&Object.assign(v,{".checked":y.value,"^checked":y.value===!0?"checked":void 0,name:n.name,value:f.value===!0?n.val:n.trueValue}),v}),F=Ja(w),j=R(()=>{const v={tabindex:M.value,role:e==="toggle"?"switch":"checkbox","aria-label":n.label,"aria-checked":q.value===!0?"mixed":y.value===!0?"true":"false"};return n.disable===!0&&(v["aria-disabled"]="true"),v});function V(v){v!==void 0&&(Ke(v),u(v)),n.disable!==!0&&r("update:modelValue",N(),v)}function N(){if(f.value===!0){if(y.value===!0){const v=n.modelValue.slice();return v.splice(p.value,1),v}return n.modelValue.concat([n.val])}if(y.value===!0){if(n.toggleOrder!=="ft"||n.toggleIndeterminate===!1)return n.falseValue}else if(T.value===!0){if(n.toggleOrder==="ft"||n.toggleIndeterminate===!1)return n.trueValue}else return n.toggleOrder!=="ft"?n.trueValue:n.falseValue;return n.indeterminateValue}function C(v){(v.keyCode===13||v.keyCode===32)&&Ke(v)}function x(v){(v.keyCode===13||v.keyCode===32)&&V(v)}const $=t(y,q);return Object.assign(i,{toggle:V}),()=>{const v=$();n.disable!==!0&&F(v,"unshift",` q-${e}__native absolute q-ma-none q-pa-none`);const H=[E("div",{class:_.value,style:d.value,"aria-hidden":"true"},v)];c.value!==null&&H.push(c.value);const k=n.label!==void 0?It(o.default,[n.label]):tt(o.default);return k!==void 0&&H.push(E("div",{class:`q-${e}__label q-anchor--skip`},k)),E("div",{ref:a,class:m.value,...j.value,onClick:V,onKeydown:C,onKeyup:x},H)}}const um=E("div",{key:"svg",class:"q-checkbox__bg absolute"},[E("svg",{class:"q-checkbox__svg fit absolute-full",viewBox:"0 0 24 24"},[E("path",{class:"q-checkbox__truthy",fill:"none",d:"M1.73,12.91 8.1,19.28 22.79,4.59"}),E("path",{class:"q-checkbox__indet",d:"M4,14H20V10H4"})])]);var cm=$e({name:"QCheckbox",props:eu,emits:tu,setup(e){function t(n,o){const r=R(()=>(n.value===!0?e.checkedIcon:o.value===!0?e.indeterminateIcon:e.uncheckedIcon)||null);return()=>r.value!==null?[E("div",{key:"icon",class:"q-checkbox__icon-container absolute-full flex flex-center no-wrap"},[E(pt,{class:"q-checkbox__icon",name:r.value})])]:[um]}return nu("checkbox",t)}}),fm=$e({name:"QToggle",props:{...eu,icon:String,iconColor:String},emits:tu,setup(e){function t(n,o){const r=R(()=>(n.value===!0?e.checkedIcon:o.value===!0?e.indeterminateIcon:e.uncheckedIcon)||e.icon),i=R(()=>n.value===!0?e.iconColor:null);return()=>[E("div",{class:"q-toggle__track"}),E("div",{class:"q-toggle__thumb absolute flex flex-center no-wrap"},r.value!==void 0?[E(pt,{name:r.value,color:i.value})]:void 0)]}return nu("toggle",t)}});const ou={radio:am,checkbox:cm,toggle:fm},dm=Object.keys(ou);var hm=$e({name:"QOptionGroup",props:{...Wt,modelValue:{required:!0},options:{type:Array,validator:e=>e.every(t=>"value"in t&&"label"in t)},name:String,type:{default:"radio",validator:e=>dm.includes(e)},color:String,keepColor:Boolean,dense:Boolean,size:String,leftLabel:Boolean,inline:Boolean,disable:Boolean},emits:["update:modelValue"],setup(e,{emit:t,slots:n}){const{proxy:{$q:o}}=ke(),r=Array.isArray(e.modelValue);e.type==="radio"?r===!0&&console.error("q-option-group: model should not be array"):r===!1&&console.error("q-option-group: model should be array in your case");const i=Qt(e,o),s=R(()=>ou[e.type]),l=R(()=>"q-option-group q-gutter-x-sm"+(e.inline===!0?" q-option-group--inline":"")),a=R(()=>{const u={role:"group"};return e.type==="radio"&&(u.role="radiogroup",e.disable===!0&&(u["aria-disabled"]="true")),u});function c(u){t("update:modelValue",u)}return()=>E("div",{class:l.value,...a.value},e.options.map((u,d)=>{const f=n["label-"+d]!==void 0?()=>n["label-"+d](u):n.label!==void 0?()=>n.label(u):void 0;return E("div",[E(s.value,{modelValue:e.modelValue,val:u.value,name:u.name===void 0?e.name:u.name,disable:e.disable||u.disable,label:f===void 0?u.label:null,leftLabel:u.leftLabel===void 0?e.leftLabel:u.leftLabel,color:u.color===void 0?e.color:u.color,checkedIcon:u.checkedIcon,uncheckedIcon:u.uncheckedIcon,dark:u.dark||i.value,size:u.size===void 0?e.size:u.size,dense:e.dense,keepColor:u.keepColor===void 0?e.keepColor:u.keepColor,"onUpdate:modelValue":c},f)])}))}}),gm=$e({name:"DialogPlugin",props:{...Wt,title:String,message:String,prompt:Object,options:Object,progress:[Boolean,Object],html:Boolean,ok:{type:[String,Object,Boolean],default:!0},cancel:[String,Object,Boolean],focus:{type:String,default:"ok",validator:e=>["ok","cancel","none"].includes(e)},stackButtons:Boolean,color:String,cardClass:[String,Array,Object],cardStyle:[String,Array,Object]},emits:["ok","hide"],setup(e,{emit:t}){const{proxy:n}=ke(),{$q:o}=n,r=Qt(e,o),i=he(null),s=he(e.prompt!==void 0?e.prompt.model:e.options!==void 0?e.options.model:void 0),l=R(()=>"q-dialog-plugin"+(r.value===!0?" q-dialog-plugin--dark q-dark":"")+(e.progress!==!1?" q-dialog-plugin--progress":"")),a=R(()=>e.color||(r.value===!0?"amber":"primary")),c=R(()=>e.progress===!1?null:at(e.progress)===!0?{component:e.progress.spinner||Un,props:{color:e.progress.color||a.value}}:{component:Un,props:{color:a.value}}),u=R(()=>e.prompt!==void 0||e.options!==void 0),d=R(()=>{if(u.value!==!0)return{};const{model:k,isValid:Z,items:Y,...A}=e.prompt!==void 0?e.prompt:e.options;return A}),f=R(()=>at(e.ok)===!0||e.ok===!0?o.lang.label.ok:e.ok),p=R(()=>at(e.cancel)===!0||e.cancel===!0?o.lang.label.cancel:e.cancel),y=R(()=>e.prompt!==void 0?e.prompt.isValid!==void 0&&e.prompt.isValid(s.value)!==!0:e.options!==void 0?e.options.isValid!==void 0&&e.options.isValid(s.value)!==!0:!1),T=R(()=>({color:a.value,label:f.value,ripple:!1,disable:y.value,...at(e.ok)===!0?e.ok:{flat:!0},"data-autofocus":e.focus==="ok"&&u.value!==!0||void 0,onClick:_})),q=R(()=>({color:a.value,label:p.value,ripple:!1,...at(e.cancel)===!0?e.cancel:{flat:!0},"data-autofocus":e.focus==="cancel"&&u.value!==!0||void 0,onClick:w}));be(()=>e.prompt&&e.prompt.model,j),be(()=>e.options&&e.options.model,j);function M(){i.value.show()}function m(){i.value.hide()}function _(){t("ok",ie(s.value)),m()}function w(){m()}function F(){t("hide")}function j(k){s.value=k}function V(k){y.value!==!0&&e.prompt.type!=="textarea"&&zn(k,13)===!0&&_()}function N(k,Z){return e.html===!0?E(En,{class:k,innerHTML:Z}):E(En,{class:k},()=>Z)}function C(){return[E(sm,{color:a.value,dense:!0,autofocus:!0,dark:r.value,...d.value,modelValue:s.value,"onUpdate:modelValue":j,onKeyup:V})]}function x(){return[E(hm,{color:a.value,options:e.options.items,dark:r.value,...d.value,modelValue:s.value,"onUpdate:modelValue":j})]}function $(){const k=[];return e.cancel&&k.push(E(Br,q.value)),e.ok&&k.push(E(Br,T.value)),E(Fg,{class:e.stackButtons===!0?"items-end":"",vertical:e.stackButtons,align:"right"},()=>k)}function v(){const k=[];return e.title&&k.push(N("q-dialog__title",e.title)),e.progress!==!1&&k.push(E(En,{class:"q-dialog__progress"},()=>E(c.value.component,c.value.props))),e.message&&k.push(N("q-dialog__message",e.message)),e.prompt!==void 0?k.push(E(En,{class:"scroll q-dialog-plugin__form"},C)):e.options!==void 0&&k.push(E(Ks,{dark:r.value}),E(En,{class:"scroll q-dialog-plugin__form"},x),E(Ks,{dark:r.value})),(e.ok||e.cancel)&&k.push($()),k}function H(){return[E(Bg,{class:[l.value,e.cardClass],style:e.cardStyle,dark:r.value},v)]}return Object.assign(n,{show:M,hide:m}),()=>E(Lg,{ref:i,onHide:F},H)}});function ru(e,t){for(const n in t)n!=="spinner"&&Object(t[n])===t[n]?(e[n]=Object(e[n])!==e[n]?{}:{...e[n]},ru(e[n],t[n])):e[n]=t[n]}function mm(e,t,n){return o=>{let r,i;const s=t===!0&&o.component!==void 0;if(s===!0){const{component:m,componentProps:_}=o;r=typeof m=="string"?n.component(m):m,i=_||{}}else{const{class:m,style:_,...w}=o;r=e,i=w,m!==void 0&&(w.cardClass=m),_!==void 0&&(w.cardStyle=_)}let l,a=!1;const c=he(null),u=hi(!1,"dialog"),d=m=>{if(c.value!==null&&c.value[m]!==void 0){c.value[m]();return}const _=l.$.subTree;if(_&&_.component){if(_.component.proxy&&_.component.proxy[m]){_.component.proxy[m]();return}if(_.component.subTree&&_.component.subTree.component&&_.component.subTree.component.proxy&&_.component.subTree.component.proxy[m]){_.component.subTree.component.proxy[m]();return}}console.error("[Quasar] Incorrectly defined Dialog component")},f=[],p=[],y={onOk(m){return f.push(m),y},onCancel(m){return p.push(m),y},onDismiss(m){return f.push(m),p.push(m),y},hide(){return d("hide"),y},update(m){if(l!==null){if(s===!0)Object.assign(i,m);else{const{class:_,style:w,...F}=m;_!==void 0&&(F.cardClass=_),w!==void 0&&(F.cardStyle=w),ru(i,F)}l.$forceUpdate()}return y}},T=m=>{a=!0,f.forEach(_=>{_(m)})},q=()=>{M.unmount(u),Fa(u),M=null,l=null,a!==!0&&p.forEach(m=>{m()})};let M=ma({name:"QGlobalDialog",setup:()=>()=>E(r,{...i,ref:c,onOk:T,onHide:q,onVnodeMounted(...m){typeof i.onVnodeMounted=="function"&&i.onVnodeMounted(...m),je(()=>d("show"))}})},n);return l=M.mount(u),y}}var pm={install({$q:e,parentApp:t}){e.dialog=mm(gm,!0,t),this.__installed!==!0&&(this.create=e.dialog)}},vm={config:{staticPath:"/nostrmarket/static/market/"},plugins:{Notify:ig,LocalStorage:Da,Dialog:pm}};async function bm({app:e,router:t}){e.use(t),e.mount("#q-app")}Ch(la,vm).then(bm);export{Zn as $,Pt as A,Vm as B,Be as C,za as D,Ka as E,je as F,zn as G,Et as H,Kf as I,Uf as J,vo as K,we as L,hg as M,pg as N,gg as O,Tr as P,dg as Q,fg as R,vg as S,mg as T,xg as U,cn as V,Ke as W,Wt as X,Yn as Y,Qt as Z,dd as _,R as a,wm as a$,Lm as a0,pt as a1,Eh as a2,Nh as a3,ua as a4,vc as a5,Fo as a6,Ll as a7,$h as a8,Lh as a9,da as aA,nr as aB,Ug as aC,Wg as aD,Yg as aE,Qg as aF,pi as aG,Gg as aH,jr as aI,Fl as aJ,ri as aK,im as aL,Lg as aM,Rm as aN,Pm as aO,_m as aP,Cm as aQ,Oh as aR,ym as aS,Qc as aT,Xe as aU,En as aV,Ks as aW,km as aX,sm as aY,cm as aZ,Em as a_,Un as aa,zh as ab,Kh as ac,$m as ad,Og as ae,Hf as af,Hs as ag,Ds as ah,_g as ai,Mg as aj,mi as ak,Fh as al,Zh as am,Kg as an,Im as ao,Br as ap,ko as aq,Aa as ar,Ma as as,Fm as at,kh as au,Nm as av,jm as aw,rd as ax,Am as ay,Al as az,tt as b,Bg as b0,zm as b1,Hm as b2,La as b3,id as b4,Fg as b5,hm as b6,Dm as b7,Bm as b8,xm as b9,ml as ba,Sm as bb,$a as bc,qr as bd,Om as be,Wr as bf,Ur as bg,Vt as bh,$e as c,qm as d,Mm as e,qt as f,ke as g,E as h,ut as i,Km as j,pn as k,Tm as l,It as m,Lo as n,ii as o,fo as p,xc as q,he as r,Wl as s,Yl as t,sc as u,Jl as v,be as w,Fe as x,Ut as y,We as z}; diff --git a/static/market/index.html b/static/market/index.html index b9c962e..4b4e656 100644 --- a/static/market/index.html +++ b/static/market/index.html @@ -16,7 +16,7 @@ - + diff --git a/templates/nostrmarket/market.html b/templates/nostrmarket/market.html index 24e7463..b03a7a4 100644 --- a/templates/nostrmarket/market.html +++ b/templates/nostrmarket/market.html @@ -25,7 +25,7 @@ + src="{{ url_for('nostrmarket_static', path='market/assets/index.923cbbf9.js')}}">