@dubusoft/toodo-linux-arm64 1.11.1-dev.193 → 1.11.1-dev.194
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/toodo +0 -0
- package/bin/toodo-server +0 -0
- package/package.json +1 -1
- package/web/assets/Item-lIxHjWj_.js +2 -0
- package/web/assets/{LayoutChangeSnapshot-Bqg4192Z.js → LayoutChangeSnapshot-D3xatAtC.js} +1 -1
- package/web/assets/{MenuBottomSheet-BJroUUHj.js → MenuBottomSheet-c34lL1NX.js} +1 -1
- package/web/assets/{MenuBottomSheetActionList-CBSD5g2j.js → MenuBottomSheetActionList-vpV_l1kc.js} +1 -1
- package/web/assets/{Selector-DLgfOtoe.js → Selector-C5qvx4hg.js} +2 -2
- package/web/assets/{SwipeActionsLayer-Ckqx5mxc.js → SwipeActionsLayer-DoZybr_Y.js} +1 -1
- package/web/assets/{button-HISRpujD.js → button-BGH43TyY.js} +1 -1
- package/web/assets/{details-sheet-xeOYGWN1.js → details-sheet-CocFq_H_.js} +1 -1
- package/web/assets/focusOutline.stylex-tP8rBkq-.js +1 -0
- package/web/assets/{focusReturn-DgQoALUE.js → focusReturn-CZYsdEBO.js} +1 -1
- package/web/assets/index-Cbw2q6IR.js +69 -0
- package/web/assets/{index-CP08_gh8.css → index-DCOB-S8R.css} +1 -1
- package/web/assets/{inputHold-CZa_Ny55.js → inputHold-Vm2aa67t.js} +1 -1
- package/web/assets/{markdown-CF5mtzHh.js → markdown-Bm09hfWj.js} +1 -1
- package/web/assets/{offline-screen-BFZbD4uz.js → offline-screen-hN5S_H90.js} +1 -1
- package/web/assets/{padding.stylex-DG4aFJ6m.js → padding.stylex-B1SBwjoO.js} +1 -1
- package/web/assets/{primaryClick-88oQu3_u.js → primaryClick-BsGCoCcT.js} +1 -1
- package/web/assets/{queries-BIWwhSPP.js → queries-D7Y7ESQJ.js} +1 -1
- package/web/assets/{reducedMotion-DCkUC6gt.js → reducedMotion-DHbcKoD2.js} +1 -1
- package/web/assets/{resolveSnapPoint-CBS37OcT.js → resolveSnapPoint-Bn5gTeO7.js} +1 -1
- package/web/assets/review-Bjc8qkoS.js +1 -0
- package/web/assets/{server-access-BHLPABjm.js → server-access-iPbJHIgj.js} +1 -1
- package/web/assets/{task-details-BOmp_J1t.js → task-details-BK0aw1hF.js} +2 -2
- package/web/assets/{task-graph-DmsWWo8o.js → task-graph-CXE_z0tI.js} +3 -3
- package/web/assets/{useLayerDismissal-D77qBJbE.js → useLayerDismissal-BVKANkUt.js} +1 -1
- package/web/assets/{useLinkComponent-DLC334Kf.js → useLinkComponent-BjJ-sXiE.js} +3 -3
- package/web/assets/useTooltip-wT5GvIfc.js +1 -0
- package/web/index.html +17 -17
- package/web/sw.js +2 -2
- package/web/version.json +1 -1
- package/web/assets/Item-BoYwvmT7.js +0 -2
- package/web/assets/Tooltip-D2N09Hzl.js +0 -1
- package/web/assets/focusOutline.stylex-ZXdUNMFw.js +0 -1
- package/web/assets/index-Dyu1QOHD.js +0 -69
- package/web/assets/review-CvfkC7xA.js +0 -1
- package/web/assets/useTooltip-Dd70k22y.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{n as t,t as n}from"./jsx-runtime-C3cWAN_r.js";import{A as r,C as i,D as a,E as o,G as s,Ht as c,It as l,J as u,L as d,Lt as f,M as ee,N as p,O as m,P as te,Q as ne,S as re,T as h,Ut as ie,Vt as g,X as _,Z as ae,_ as oe,b as v,c as se,d as ce,dt as le,f as y,g as b,h as x,j as S,k as ue,l as C,m as w,mt as T,p as E,s as de,u as D,ut as fe,v as O,w as pe,x as k,y as A}from"./index-Dyu1QOHD.js";import{t as j}from"./Selector-DLgfOtoe.js";import{n as M,t as N}from"./button-HISRpujD.js";import{$ as P,At as F,C as me,Et as he,Ft as I,G as ge,It as L,K as _e,Ot as R,Tt as ve,Ut as z,W as ye,Y as be,dt as xe,jt as Se,kt as B,q as V,qt as H,r as Ce,s as we}from"./queries-BIWwhSPP.js";import{t as U}from"./opener-DWhHPoCL.js";var W=e(t(),1),G=n(),Te={completed:H.success,opened_for_review:H.review,started:H.progress,worked_on:H.progress,planned:H.neutral},K=`live`,q=`all`,J=`any`,Ee=[{kind:`week`,label:`Week`},{kind:`month`,label:`Month`},{kind:`quarter`,label:`Quarter`},{kind:`year`,label:`Year`},{kind:`custom`,label:`Custom`}];function De({disabled:e,items:t}){return(0,G.jsx)(s,{items:t,alignment:`end`,menuWidth:192,renderTrigger:t=>(0,G.jsx)(N,{...t,size:`sm`,variant:`primary`,icon:(0,G.jsx)(g,{}),label:`Export`,isDisabled:e})})}function Y(e,t){return`${e} ${t}${e===1?``:`s`}`}function Oe(){let e=V(),t=P(),[n,r]=(0,W.useState)(!1),[i,a]=(0,W.useState)(``),[o,s]=(0,W.useState)(null),c=typeof Intl.supportedValuesOf==`function`?Intl.supportedValuesOf(`timeZone`):[];async function l(e){s(null);try{await t.mutateAsync(e),r(!1)}catch(e){s(e instanceof Error?e.message:String(e))}}if(!e.data)return null;let{timeZone:u,configured:d}=e.data;return n?(0,G.jsxs)(`form`,{"aria-label":`Review time zone`,className:`flex flex-wrap items-center gap-2 print:hidden`,onSubmit:e=>{e.preventDefault(),l(i)},children:[(0,G.jsx)(`label`,{htmlFor:`review-time-zone`,className:`text-xs`,children:`Time zone for every device`}),(0,G.jsx)(`input`,{id:`review-time-zone`,list:`review-time-zones`,required:!0,className:T(_,`w-56`),value:i,onChange:e=>a(e.target.value)}),(0,G.jsx)(`datalist`,{id:`review-time-zones`,children:c.map(e=>(0,G.jsx)(`option`,{value:e},e))}),(0,G.jsx)(N,{size:`sm`,variant:`primary`,type:`submit`,label:`Save`,isDisabled:t.isPending}),d!==null&&(0,G.jsx)(N,{size:`sm`,variant:`secondary`,label:`Use the server's`,onClick:()=>void l(null)}),(0,G.jsx)(N,{size:`sm`,variant:`ghost`,label:`Cancel`,onClick:()=>r(!1)}),o&&(0,G.jsx)(`span`,{role:`alert`,className:`w-full text-xs text-destructive`,children:o})]}):(0,G.jsxs)(`span`,{children:[`Days are in `,u,d===null&&` (the server's time zone)`,`.`,` `,(0,G.jsx)(N,{size:`sm`,variant:`ghost`,label:`Change time zone`,className:`print:hidden`,onClick:()=>{a(d??u),r(!0)}})]})}function X({onShowTask:e}){let[t,n]=(0,W.useState)(()=>k(`week`,F(Date.now()/1e3))),[o,s]=(0,W.useState)(null),[l,p]=(0,W.useState)(A),[m,h]=(0,W.useState)(null),[g,_]=(0,W.useState)(null),y=ye(t.from,t.to),b=_e(),x=ge(g),S=be(),C=me(),w=g!==null,E=w?x:y,D=xe(),O=we(),P=w?x.data?.workspaces??[]:[...D.data??[],...O.data?.workspaces??[]],I=new Map(P.map(e=>[e.id,e.name])),L=w?x.data&&{period:{kind:x.data.summary.period,from:x.data.summary.from,to:x.data.summary.to},entries:x.data.entries,start:x.data.summary.start,end:x.data.summary.end,timeZone:x.data.summary.timeZone,now:x.data.summary.savedAt}:y.data&&{period:t,entries:y.data.entries,start:y.data.start,end:y.data.end,timeZone:y.data.timeZone,now:Date.now()/1e3},z=L?.period??t,B=L&&ce(L.entries,l),V=ue(L?.entries??[]);l.label!==null&&!V.includes(l.label)&&V.push(l.label);let H=[l.workspaceId===null?`across all workspaces`:`in ${I.get(l.workspaceId)??`workspace ${l.workspaceId}`}`,l.label!==null&&`labelled ${l.label}`].filter(Boolean).join(`, `),U=i[z.kind];function X(e){s(null),n(e)}function Z(e){s(null),h(null),_(e)}async function Pe(){try{let e=await S.mutateAsync({period:t.kind,from:t.from,to:t.kind===`custom`?t.to:null,workspaceId:l.workspaceId,label:l.label,title:null});s(`Saved "${e.title}" with ${Y(e.entryCount,`task`)}; reopen it from Saved reviews.`)}catch(e){s(`Could not save the review: ${e instanceof Error?e.message:String(e)}`)}}async function Fe(e){try{await C.mutateAsync(e),Z(null),s(`Deleted the saved review.`)}catch(e){s(`Could not delete the saved review: ${e instanceof Error?e.message:String(e)}`)}}function Ie(e){e!==t.kind&&X(e===`custom`?{...t,kind:e}:k(e,t.from))}function Q(e){return w?x.data?Promise.resolve(e===`csv`?x.data.csv:x.data.markdown):Promise.reject(Error(`the saved review is still loading`)):Ce(he.reviewReport({period:t.kind,date:null,from:t.from,to:t.kind===`custom`?t.to:null,format:e,timeZone:null,workspaceId:l.workspaceId,label:l.label}))}async function Le(){try{let e=Q(`markdown`);if(typeof ClipboardItem>`u`)await navigator.clipboard.writeText((await e).contents);else{let t=e.then(({contents:e})=>new Blob([e],{type:`text/plain`}));await navigator.clipboard.write([new ClipboardItem({"text/plain":t})])}s(`Copied as Markdown.`)}catch(e){s(`Could not copy: ${e instanceof Error?e.message:String(e)}`)}}async function $(e){try{let t=await Q(e);ve(t.fileName,new Blob([t.contents],{type:`${t.mediaType};charset=utf-8`})),s(`Downloaded ${t.fileName}`)}catch(e){s(`Could not export: ${e instanceof Error?e.message:String(e)}`)}}return(0,G.jsxs)(`section`,{"aria-labelledby":`review-heading`,className:`flex flex-col gap-4`,children:[(0,G.jsxs)(`header`,{className:`flex flex-col gap-1`,children:[(0,G.jsx)(`h2`,{id:`review-heading`,className:`text-xl font-semibold tracking-tight`,children:w&&x.data?x.data.summary.title:pe[z.kind]}),(0,G.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Work recorded from `,z.from,` to `,z.to,` `,H,`.`,` `,w?x.data&&(0,G.jsxs)(`span`,{children:[`Saved `,Se(x.data.summary.savedAt),`, with days in `,x.data.summary.timeZone,`; it stays as it was when saved.`]}):(0,G.jsx)(Oe,{})]})]}),(w||(b.data?.length??0)>0)&&(0,G.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 print:hidden`,children:[(0,G.jsx)(j,{label:`Saved reviews`,isLabelHidden:!0,size:`sm`,options:[{value:K,label:`Live review`},...(b.data??[]).map(e=>({value:String(e.id),label:`${e.title} (saved ${F(e.savedAt)})`}))],value:g===null?K:String(g),onChange:e=>Z(e===K?null:Number(e))}),g!==null&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(N,{size:`sm`,variant:`secondary`,label:`Back to the live review`,onClick:()=>Z(null)}),(0,G.jsx)(N,{size:`sm`,variant:`ghost`,label:`Delete saved review`,isDisabled:C.isPending,onClick:()=>void Fe(g)})]})]}),(0,G.jsxs)(`div`,{className:`flex flex-wrap items-end gap-2 print:hidden`,children:[!w&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(ne,{label:`Review period`,size:`sm`,value:t.kind,onChange:e=>typeof e==`string`&&Ie(e),children:Ee.map(({kind:e,label:t})=>(0,G.jsx)(ae,{value:e,label:t},e))}),t.kind===`week`&&(0,G.jsx)(d,{label:`Week starting`,size:`sm`,format:`system_date`,value:t.from,onChange:e=>e&&X(ee(e))}),t.kind===`custom`&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(d,{label:`From`,size:`sm`,format:`system_date`,max:t.to,value:t.from,onChange:e=>e&&e<=t.to&&X({...t,from:e})}),(0,G.jsx)(d,{label:`To`,size:`sm`,format:`system_date`,min:t.from,value:t.to,onChange:e=>e&&e>=t.from&&X({...t,to:e})})]}),t.kind!==`week`&&t.kind!==`custom`&&(0,G.jsx)(`span`,{className:`px-1 text-sm font-medium`,children:re(t)}),(0,G.jsx)(M,{size:`sm`,variant:`secondary`,icon:(0,G.jsx)(ie,{}),label:`Previous ${U}`,tooltip:`Previous ${U}`,onClick:()=>X(r(t,-1))}),(0,G.jsx)(M,{size:`sm`,variant:`secondary`,icon:(0,G.jsx)(c,{}),label:`Next ${U}`,tooltip:`Next ${U}`,onClick:()=>X(r(t,1))}),t.kind!==`custom`&&(0,G.jsx)(N,{size:`sm`,variant:`ghost`,label:`This ${U}`,onClick:()=>X(k(t.kind,F(Date.now()/1e3)))})]}),(0,G.jsx)(`div`,{className:`ml-auto`,children:(0,G.jsx)(De,{disabled:!B,items:[...w?[]:[{label:`Save as snapshot`,onClick:()=>void Pe()}],{label:`Copy as Markdown`,onClick:()=>void Le()},{label:`Save as Markdown`,onClick:()=>void $(`markdown`)},{label:`Save as CSV`,onClick:()=>void $(`csv`)},{label:`Print or save as PDF`,onClick:()=>window.print()}]})})]}),(0,G.jsxs)(`div`,{role:`group`,"aria-label":`Review filters`,className:`flex flex-wrap items-center gap-2 print:hidden`,children:[(0,G.jsx)(j,{label:`Workspace`,isLabelHidden:!0,size:`sm`,options:[{value:q,label:`All workspaces`},...P.map(e=>({value:String(e.id),label:e.name}))],value:l.workspaceId===null?q:String(l.workspaceId),onChange:e=>p({...l,workspaceId:e===q?null:Number(e)})}),(0,G.jsx)(j,{label:`Label`,isLabelHidden:!0,size:`sm`,options:[{value:J,label:V.length===0?`No labels in this period`:`Any label`},...V.map(e=>({value:`label:${e}`,label:e}))],value:l.label===null?J:`label:${l.label}`,onChange:e=>p({...l,label:e===J?null:e.slice(6)})}),(l.workspaceId!==null||l.label!==null)&&(0,G.jsx)(N,{size:`sm`,variant:`ghost`,label:`Clear filters`,onClick:()=>p(A)})]}),o&&(0,G.jsx)(`p`,{role:`status`,className:`text-xs text-muted-foreground print:hidden`,children:o}),(0,G.jsx)(`p`,{role:`status`,className:T(`text-sm text-muted-foreground`,!E.isPending&&`sr-only`),children:E.isPending?`Loading the review...`:B?`Showing ${B.length} ${B.length===1?`task`:`tasks`} with activity in this ${U}.`:``}),E.isError&&(0,G.jsxs)(`p`,{role:`alert`,className:`text-sm text-destructive`,children:[`Failed to load the review: `,E.error.message]}),B?.length===0&&(0,G.jsx)(de,{title:L?.entries.length===0?`No recorded activity in this ${U}.`:`No recorded activity in this ${U} matches the filters.`,hint:w?`This saved review keeps the tasks it had when it was saved.`:L?.entries.length===0?`Toodo records each task as it is planned, started, moved to review, and completed, so reviews fill up as you work.`:`Pick another period or change the filters to look at other work.`,action:w?void 0:(0,G.jsx)(`div`,{className:`flex flex-wrap justify-center gap-2 print:hidden`,children:(0,G.jsx)(N,{size:`sm`,variant:`secondary`,label:`Show the ${U} before`,onClick:()=>X(r(t,-1))})})}),L&&B&&B.length>0&&(0,G.jsx)(Ne,{shown:L,entries:B,workspaces:P}),L&&B&&(0,G.jsx)(Me,{shown:L,entries:B,editable:!w}),z.kind===`year`&&B&&(0,G.jsx)(je,{entries:B}),B&&oe(B).map(t=>(0,G.jsxs)(`section`,{"aria-label":v[t.outcome],className:`flex flex-col gap-2`,children:[(0,G.jsxs)(`h3`,{className:T(`text-sm font-semibold`,Te[t.outcome]),children:[v[t.outcome],` `,(0,G.jsxs)(`span`,{className:`font-normal text-muted-foreground`,children:[`(`,t.entries.length,`)`]})]}),(0,G.jsx)(`ul`,{className:`flex flex-col divide-y rounded-lg border`,children:t.entries.map(({task:t,at:n,commits:r,archived:i,pullRequest:o})=>(0,G.jsxs)(`li`,{className:`flex flex-col gap-1 px-3 py-2`,children:[(0,G.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,G.jsx)(u,{type:t.taskType}),(0,G.jsxs)(`span`,{className:`shrink-0 text-xs text-muted-foreground`,children:[`#`,t.id]}),(0,G.jsx)(`button`,{type:`button`,"aria-label":`Open #${t.id} ${t.title}`,title:t.title,onClick:()=>e?.(t.id),className:`min-w-0 flex-1 truncate text-left text-sm font-medium hover:underline max-md:min-h-11`,children:t.title}),t.resolution===`not_adopted`&&(0,G.jsx)(f,{className:`shrink-0`,label:`Not adopted`}),i&&(0,G.jsx)(f,{className:`shrink-0`,label:`Archived`}),t.resolution===`completed`&&(0,G.jsx)(f,{className:`shrink-0`,variant:`green`,label:`Completed`}),a(t)&&(0,G.jsx)(Ae,{url:a(t),stats:o}),(0,G.jsxs)(`span`,{className:`shrink-0 text-xs text-muted-foreground max-md:hidden print:inline`,children:[I.get(t.workspaceId)??`Workspace ${t.workspaceId}`,` · `,(0,G.jsx)(R,{at:n})]})]}),(0,G.jsx)(le,{task:t}),i||w?null:m?.id===t.id?(0,G.jsx)(te,{task:t,focusPlan:m.field,onDone:()=>h(null)}):(0,G.jsx)(`p`,{className:`text-xs text-muted-foreground empty:hidden print:hidden`,children:(0,G.jsx)(fe,{task:t,onEdit:e=>h({id:t.id,field:e})})}),t.completionNote&&(0,G.jsx)(`p`,{"aria-label":`Completion note of #${t.id}`,className:`whitespace-pre-line break-words-keep text-xs`,children:t.completionNote}),L&&(0,G.jsx)(ke,{task:t,shown:L}),r.length>0&&(0,G.jsx)(`ul`,{"aria-label":`Commits of #${t.id} this ${U}`,className:`flex flex-col gap-0.5`,children:r.map(e=>(0,G.jsxs)(`li`,{className:`flex gap-2 text-xs`,title:e.author,children:[(0,G.jsx)(`code`,{className:`shrink-0 text-muted-foreground`,children:e.sha.slice(0,7)}),(0,G.jsx)(`span`,{className:`truncate`,children:se(e.message)})]},e.sha))})]},t.id))})]},t.outcome))]})}function Z(e){return e===0?`0h`:w(e)}function ke({task:e,shown:t}){let{start:n,end:r,now:i}=t,a=B(e.timeline,i),o=I(e.timeline,i);if(a===null||o===null)return null;let s=L(e.timeline).filter(e=>e.state===`paused`&&e.start<r&&(e.end??i)>n);return(0,G.jsxs)(`div`,{"aria-label":`Time of #${e.id}`,className:`flex flex-col gap-0.5 text-xs text-muted-foreground`,children:[(0,G.jsxs)(`p`,{children:[Z(a),` active, `,Z(o),` waiting`]}),s.length>0&&(0,G.jsx)(`ul`,{"aria-label":`Waits of #${e.id}`,className:`flex flex-col gap-0.5`,children:s.map(e=>(0,G.jsxs)(`li`,{className:`break-words-keep`,children:[`Waiting `,Z(Math.max((e.end??i)-e.start,0)),` from `,F(e.start),e.end===null&&`, still waiting`,`: `,e.reason??`no reason recorded`]},e.start))})]})}function Ae({url:e,stats:t}){let n=o(e),r=t=>{t.preventDefault(),U(e).catch(t=>console.error(`Failed to open ${e}`,t))};return(0,G.jsx)(`a`,{href:e,title:t?`${e} \u00b7 ${m(t)}`:e,"aria-label":n?`Pull request #${n}`:`Pull request`,onClick:r,onAuxClick:r,className:`shrink-0 text-xs text-primary underline underline-offset-2 hover:no-underline max-md:inline-flex max-md:min-h-11 max-md:items-center`,children:n?`#${n}`:`PR`})}function je({entries:e}){let t=p(e);return t===null?null:(0,G.jsxs)(`section`,{"aria-labelledby":`year-in-review-heading`,className:`flex flex-col gap-3 rounded-lg border p-3`,children:[(0,G.jsx)(`h3`,{id:`year-in-review-heading`,className:`text-sm font-semibold`,children:`Year in review`}),t.pullRequests&&(0,G.jsxs)(`dl`,{className:`flex flex-wrap gap-x-6 gap-y-2`,children:[(0,G.jsxs)(`div`,{className:`flex flex-col`,children:[(0,G.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Merged pull requests`}),(0,G.jsx)(`dd`,{className:`text-lg font-semibold`,children:t.pullRequests.pullRequests})]}),(0,G.jsxs)(`div`,{className:`flex flex-col`,children:[(0,G.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Lines changed`}),(0,G.jsxs)(`dd`,{className:`text-lg font-semibold`,children:[(0,G.jsxs)(`span`,{children:[`+`,t.pullRequests.additions]}),(0,G.jsx)(`span`,{className:`text-muted-foreground`,children:` / `}),(0,G.jsxs)(`span`,{children:[`-`,t.pullRequests.deletions]})]})]}),(0,G.jsxs)(`div`,{className:`flex flex-col`,children:[(0,G.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Files changed`}),(0,G.jsx)(`dd`,{className:`text-lg font-semibold`,children:t.pullRequests.changedFiles})]}),(0,G.jsxs)(`div`,{className:`flex flex-col`,children:[(0,G.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Reviews`}),(0,G.jsxs)(`dd`,{className:`text-lg font-semibold`,title:b(t.pullRequests),children:[t.pullRequests.reviews,(0,G.jsxs)(`span`,{className:`ml-1 text-xs font-normal text-muted-foreground`,children:[`on `,t.pullRequests.reviewed,` of `,t.pullRequests.pullRequests]})]})]})]}),t.largest.length>0&&(0,G.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,G.jsx)(`h4`,{className:`text-xs text-muted-foreground`,children:`Largest pull requests`}),(0,G.jsx)(`ol`,{"aria-label":`Largest pull requests`,className:`flex flex-col gap-1`,children:t.largest.map(({task:e,pullRequest:t})=>(0,G.jsxs)(`li`,{className:`flex min-w-0 flex-wrap items-center gap-x-2 gap-y-0.5 text-sm`,children:[(0,G.jsx)(u,{type:e.taskType}),(0,G.jsx)(`span`,{className:`truncate font-medium`,children:e.title}),(0,G.jsx)(`span`,{className:`ml-auto shrink-0 text-xs text-muted-foreground`,children:m(t)})]},e.id))})]}),t.research.length>0&&(0,G.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,G.jsx)(`h4`,{className:`text-xs text-muted-foreground`,children:`Research conclusions`}),(0,G.jsx)(`ul`,{"aria-label":`Research conclusions`,className:`flex flex-col divide-y rounded-md border`,children:t.research.map(({task:e,at:t,adopted:n})=>(0,G.jsxs)(`li`,{className:`flex flex-col gap-1 px-2 py-1.5`,children:[(0,G.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-x-2 gap-y-0.5 text-sm`,children:[(0,G.jsx)(`span`,{className:`truncate font-medium`,children:e.title}),(0,G.jsx)(f,{className:`shrink-0`,variant:n?`green`:`neutral`,label:n?`Adopted`:`Not adopted`}),(0,G.jsx)(R,{className:`ml-auto shrink-0 text-xs text-muted-foreground`,at:t})]}),(0,G.jsx)(`p`,{"aria-label":`Research conclusion of #${e.id}`,className:`whitespace-pre-line break-words-keep text-xs`,children:e.completionNote??(0,G.jsx)(`span`,{className:`text-muted-foreground`,children:`No conclusion written.`})})]},e.id))})]}),t.overruns.length>0&&(0,G.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,G.jsx)(`h4`,{className:`text-xs text-muted-foreground`,children:`Largest estimate overruns`}),(0,G.jsx)(`ol`,{"aria-label":`Largest estimate overruns`,className:`flex flex-col gap-1`,children:t.overruns.map(({task:e,estimated:t,actual:n})=>(0,G.jsxs)(`li`,{className:`flex min-w-0 flex-wrap items-center gap-x-2 gap-y-0.5 text-sm`,children:[(0,G.jsx)(u,{type:e.taskType}),(0,G.jsx)(`span`,{className:`truncate font-medium`,children:e.title}),(0,G.jsxs)(`span`,{className:`ml-auto shrink-0 text-xs text-muted-foreground`,children:[`estimated `,w(t),`, `,w(n),` active`]})]},e.id))})]})]})}function Me({shown:e,entries:t,editable:n}){let r=h(e.end,t,e.now),i=n?t.filter(({archived:e})=>!e).map(({task:e})=>l(e)):[],a=i.filter(e=>e.includes(`estimate`)).length,o=i.filter(e=>e.includes(`dueDate`)).length;if(r===null&&a+o===0)return null;let s=(0,G.jsxs)(`div`,{className:`contents`,children:[(0,G.jsx)(`dt`,{className:`text-muted-foreground`,children:`Missing plan`}),(0,G.jsxs)(`dd`,{children:[[a>0&&`${Y(a,`task`)} without an estimate`,o>0&&`${Y(o,`task`)} without a due date`].filter(Boolean).join(`, `),`; add them from the marks on the tasks below`]})]});return(0,G.jsxs)(`section`,{"aria-labelledby":`plan-heading`,className:`flex flex-col gap-3 rounded-lg border p-3`,children:[(0,G.jsx)(`h3`,{id:`plan-heading`,className:`text-sm font-semibold`,children:`Plan vs actual`}),r===null?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`p`,{className:`text-sm`,children:`No reviewed task has an estimate or a due date, so there is nothing to compare yet.`}),(0,G.jsx)(`dl`,{className:`grid gap-x-4 gap-y-1 text-sm sm:grid-cols-[auto_1fr]`,children:s})]}):(0,G.jsxs)(`dl`,{className:`grid gap-x-4 gap-y-1 text-sm sm:grid-cols-[auto_1fr]`,children:[(0,G.jsxs)(`div`,{className:`contents`,children:[(0,G.jsx)(`dt`,{className:`text-muted-foreground`,children:`Estimate vs active time`}),(0,G.jsx)(`dd`,{children:r.time?x(r.time):`No completed task had an estimate`})]}),(0,G.jsxs)(`div`,{className:`contents`,children:[(0,G.jsx)(`dt`,{className:`text-muted-foreground`,children:`Due dates met`}),(0,G.jsx)(`dd`,{children:r.dueDates?E(r.dueDates):`No completed task had a due date`})]}),a+o>0&&s]}),r!==null&&r.late.length>0&&(0,G.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,G.jsx)(`h4`,{className:`text-xs text-muted-foreground`,children:`Late tasks`}),(0,G.jsx)(`ul`,{"aria-label":`Late tasks`,className:`flex flex-col gap-1`,children:r.late.map(e=>(0,G.jsxs)(`li`,{className:`flex min-w-0 flex-wrap items-center gap-x-2 gap-y-0.5 text-sm`,children:[(0,G.jsxs)(`span`,{className:`flex min-w-0 max-w-full items-center gap-2`,children:[(0,G.jsx)(u,{type:e.task.taskType}),(0,G.jsx)(`span`,{className:`truncate font-medium`,children:e.task.title})]}),(0,G.jsx)(`span`,{className:T(`ml-auto shrink-0 text-xs`,H.danger),children:O(e)})]},e.task.id))})]})]})}function Ne({shown:e,entries:t,workspaces:n}){let r=S(e.period,t,n,e.timeZone),i=Math.max(1,...(r.completedPerMonth??[]).map(({count:e})=>e));return(0,G.jsxs)(`section`,{"aria-label":`Summary`,className:`flex flex-col gap-3 rounded-lg border p-3`,children:[(0,G.jsxs)(`dl`,{className:`flex flex-wrap gap-x-6 gap-y-2`,children:[r.outcomes.map(({outcome:e,count:t})=>(0,G.jsxs)(`div`,{className:`flex flex-col`,children:[(0,G.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:v[e]}),(0,G.jsx)(`dd`,{className:`text-lg font-semibold`,children:t})]},e)),r.notAdopted>0&&(0,G.jsxs)(`div`,{className:`flex flex-col`,children:[(0,G.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Not adopted`}),(0,G.jsx)(`dd`,{className:`text-lg font-semibold`,children:r.notAdopted})]}),(0,G.jsxs)(`div`,{className:`flex flex-col`,children:[(0,G.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Commits`}),(0,G.jsx)(`dd`,{className:`text-lg font-semibold`,children:r.commits})]})]}),(0,G.jsxs)(`dl`,{className:`grid gap-x-4 gap-y-1 text-sm sm:grid-cols-[auto_1fr]`,children:[C.map(e=>{let t=r[e];return(0,G.jsxs)(`div`,{className:`contents`,children:[(0,G.jsx)(`dt`,{className:`text-muted-foreground`,children:D[e]}),(0,G.jsx)(`dd`,{children:t===null?`No data`:`${w(t.median)} (${t.tasks} ${t.tasks===1?`task`:`tasks`})`})]},e)}),r.changes&&(0,G.jsxs)(`div`,{className:`contents`,children:[(0,G.jsx)(`dt`,{className:`text-muted-foreground`,children:`Changes in completed pull requests`}),(0,G.jsx)(`dd`,{children:y(r.changes)})]}),r.completedByType.length>0&&(0,G.jsxs)(`div`,{className:`contents`,children:[(0,G.jsx)(`dt`,{className:`text-muted-foreground`,children:`Completed by type`}),(0,G.jsx)(`dd`,{children:r.completedByType.map(({taskType:e,count:t})=>`${e} ${t}`).join(`, `)})]}),r.completedByWorkspace.length>0&&(0,G.jsxs)(`div`,{className:`contents`,children:[(0,G.jsx)(`dt`,{className:`text-muted-foreground`,children:`Completed by workspace`}),(0,G.jsx)(`dd`,{children:r.completedByWorkspace.map(({workspace:e,count:t})=>`${e} ${t}`).join(`, `)})]})]}),r.completedPerMonth&&(0,G.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,G.jsx)(`h3`,{className:`text-xs text-muted-foreground`,children:`Completed per month`}),(0,G.jsx)(`ul`,{"aria-label":`Completed per month`,className:`flex flex-col gap-0.5`,children:r.completedPerMonth.map(({month:e,count:t})=>(0,G.jsxs)(`li`,{className:`flex items-center gap-2 text-xs`,children:[(0,G.jsx)(`span`,{className:`w-16 shrink-0 font-mono text-muted-foreground`,children:e}),(0,G.jsx)(`span`,{"aria-hidden":!0,className:T(`h-2 rounded-sm`,z.success),style:{width:`${t/i*60}%`,minWidth:t>0?4:0}}),(0,G.jsx)(`span`,{children:t})]},e))})]})]})}export{X as Review};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{n as t,t as n}from"./jsx-runtime-C3cWAN_r.js";import{$ as r,$t as i,B as a,Ft as o,G as s,H as c,Ht as l,It as u,J as d,N as f,O as p,Pt as m,Q as h,T as g,U as _,W as v,Wt as y,Y as b,Z as x,_t as S,dt as C,et as w,ht as T,in as E,it as D,k as O,l as k,lt as A,nt as j,o as M,p as ee,pt as N,rn as P,rt as F,ut as te,wt as ne,x as re}from"./focusOutline.stylex-ZXdUNMFw.js";import{A as I,D as ie,F as ae,G as oe,J as se,K as ce,L,M as le,N as R,O as ue,Q as de,S as fe,Y as pe,Z as me,a as z,k as he,n as ge,nt as _e,ot as ve,q as B,rt as ye,tt as be,w as xe,y as V}from"./useLayerDismissal-D77qBJbE.js";import{i as H,o as Se,t as Ce}from"./primaryClick-88oQu3_u.js";var U=e(t(),1),we=be(),Te=_e(`TooltipPresentInterestContext`,1,null);Te.displayName=`TooltipPresentInterestContext`;function W(e){return e.hasAttribute(`tabindex`)?e.tabIndex>=0:[`A`,`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`].includes(e.tagName)?!e.disabled:e.isContentEditable}function Ee(e,t){return G(e.target,e.currentTarget,t)}function G(e,t,n){return n===`always`||n!==`never`&&t!=null&&(e===t||W(t))}function De(){let e=!1;return{focusIn(t,n){return e=Ee(t,n),e},focusOut(t,n){return!e&&!Ee(t,n)?!1:(e=!1,!0)}}}function Oe(e){return(e.style.anchorName??``).split(`,`).map(e=>e.trim()).filter(Boolean)}function K(e,t){e.style.anchorName=t.join(`, `)}function ke(e,t){let n=Oe(e);n.includes(t)||(n.push(t),K(e,n))}function Ae(e,t){let n=Oe(e);n.includes(t)&&K(e,n.filter(e=>e!==t))}var q=m(`layer/gesture-counter/state`,1,()=>({gesture:0,clickedGesture:null,contextMenuGesture:null,pressPointerId:null,releasingGesture:null,isDispatchingRelease:!1,releasingPointerType:``,claimedPress:null,isListening:!1,listenedDocuments:new WeakSet,unsubscribePress:null}));function je(){q.releasingGesture===void 0&&(q.releasingGesture=null),q.isDispatchingRelease===void 0&&(q.isDispatchingRelease=!1),q.releasingPointerType===void 0&&(q.releasingPointerType=``),q.listenedDocuments===void 0&&(q.listenedDocuments=new WeakSet)}function Me(){q.gesture+=1}function Ne(e){je(),q.isDispatchingRelease=!1,F(),Me(),q.pressPointerId=e.pointerId;let t=e.view??document.defaultView;if(q.unsubscribePress!=null||t==null)return;let n=[A(t,`pointerup`,Pe,{first:!0}),A(t,`pointercancel`,Pe,{first:!0}),A(t,`contextmenu`,J,{first:!0})];q.unsubscribePress=()=>{for(let e of n)e()}}function Pe(e){if(je(),e.type===`pointerup`){let t=q.gesture;q.releasingGesture=t,q.releasingPointerType=e.pointerType,q.isDispatchingRelease=!0,setTimeout(()=>{q.releasingGesture===t&&(q.releasingGesture=null)},0)}q.pressPointerId=null,q.unsubscribePress?.(),q.unsubscribePress=null}function J(){q.contextMenuGesture=q.gesture}function Fe(e){je(),q.clickedGesture=q.gesture,q.releasingGesture===q.gesture&&!(q.isDispatchingRelease&&e.detail===0)&&(q.releasingGesture=null)}function Ie(){q.isDispatchingRelease=!1}function Y(){je(),q.isListening||typeof document>`u`||(q.isListening=!0,Le(document))}function Le(e){let t=e.defaultView;t!=null&&(A(t,`pointerdown`,Ne,{first:!0}),t.addEventListener(`pointerup`,Ie)),e.addEventListener(`keydown`,Me,!0),e.addEventListener(`click`,Fe,!0)}function Re(e){Y(),e==null||e===document||q.listenedDocuments.has(e)||(q.listenedDocuments.add(e),Le(e))}function ze(){return Y(),q.gesture}function Be(){return Y(),q.clickedGesture===q.gesture}function Ve(){return Y(),q.releasingGesture===null||q.releasingGesture!==q.gesture?!1:!(q.releasingPointerType===`touch`&&D())}function He(e,t){let n=!1,r=()=>{n||(n=!0,s(),t())},i=e.defaultView,a=i==null?()=>{}:A(i,`click`,e=>{q.isDispatchingRelease&&e.detail===0||(q.releasingGesture===q.gesture&&(q.releasingGesture=null),r())},{first:!0}),o=setTimeout(r,0);function s(){n=!0,a(),clearTimeout(o)}return s}function Ue(){return Y(),q.pressPointerId!==null}function We(e,{releaseTarget:t=null,onRelease:n}={}){Y();let r=q.pressPointerId,i=e.ownerDocument.defaultView;if(r===null||i==null||q.claimedPress!==null&&q.claimedPress.layer===e&&q.claimedPress.pointerId===r&&q.claimedPress.gesture===q.gesture)return;let a={layer:e,pointerId:r,gesture:q.gesture};q.claimedPress=a;let o=n=>{try{if(n!==null){n.setPointerCapture(r);return}for(let n of[e,t])n?.hasPointerCapture(r)===!0&&n.releasePointerCapture(r)}catch{}};o(t??e);let s=null,c=()=>{let t=[];try{t=[...e.querySelectorAll(`:popover-open`)]}catch{}return[e,...t].map(e=>e.getBoundingClientRect())},l=(e,t)=>(s??=c(),s.some(n=>e>=n.left&&e<n.right&&t>=n.top&&t<n.bottom)),u=null,d=(e,n)=>(u??=t?.getBoundingClientRect()??null,u!==null&&e>=u.left&&e<u.right&&n>=u.top&&n<u.bottom),f=()=>{s=null,u=null},p=n=>{if(n.pointerId===r){let{clientX:r,clientY:i}=n;l(r,i)?o(null):t!==null&&d(r,i)?o(t):o(e)}},m=[],h=()=>{for(let e of m)e();m.length=0,q.claimedPress===a&&(q.claimedPress=null)},g=n=>{n.pointerId===r&&n.target!==e&&n.target!==t&&h()},_=e=>{e.pointerId===r&&(h(),e.type===`pointerup`&&n?.())},v=t=>{t.target===e&&t.newState===`closed`?(o(null),h()):f()};e.addEventListener(`toggle`,v,!0),m.push(A(i,`pointermove`,p),A(i,`gotpointercapture`,g),A(i,`pointerup`,_),A(i,`pointercancel`,_),A(i,`scroll`,f),A(i,`resize`,f),()=>e.removeEventListener(`toggle`,v,!0))}function Ge(e){Y(),q.contextMenuGesture===q.gesture&&We(e)}var Ke=new Set([`touch`,`pen`]);function qe(){let[e]=(0,U.useState)(Je);return(0,U.useEffect)(()=>()=>e.forget(),[e]),e}function Je(){let e=null,t=null,n=()=>{e?.(),e=null};return{press(r,i,a){if(n(),!Ke.has(r.pointerType))return!1;if(i==null)return!0;let o=ze();t=o;let s=()=>{i.removeEventListener(`click`,c),i.removeEventListener(`pointercancel`,s),e===s&&(e=null)},c=e=>{s(),ze()===o&&a(e)};return i.addEventListener(`click`,c),i.addEventListener(`pointercancel`,s),e=s,!0},forget:n,isTouchPressCurrent:()=>e!=null&&t===ze()}}var Ye=`data-astryx-layer-portal-boundary`,Xe=`external`;function Ze(e){return e.getAttribute(Ye)===Xe}var Qe=new Set(`p.h1.h2.h3.h4.h5.h6.dt.pre.legend.data.dfn.meter.output.progress.option.optgroup.table.thead.tbody.tfoot.tr.colgroup.ul.ol.menu.dl.select.datalist.picture.hgroup.ruby.rt.rp.a.button.label.summary.span.em.strong.b.i.u.s.small.mark.code.kbd.samp.var.sub.sup.abbr.cite.q.time.bdi.bdo.ins.del`.split(`.`));function $e(e){if(!e)return null;let t=null,n=!1,r=e;for(;r;){let e=r.tagName.toLowerCase();if(e===`dialog`)break;N(r)&&(n=!0),Qe.has(e)?(t=r,n=!1):t!==null&&Ze(r)&&!n&&(t=r),r=r.parentElement}return t?.parentElement??null}var et={gutterBlockStart:`calc(max(var(--spacing-4), env(safe-area-inset-top, 0px)) + var(--astryx-layer-inset-block-start, 0px))`,gutterBlockEnd:`calc(max(var(--spacing-4), env(safe-area-inset-bottom, 0px)) + var(--astryx-layer-inset-block-end, 0px))`,gutterInline:`calc(max(var(--spacing-4), env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px)) + max(var(--astryx-layer-inset-inline-start, 0px), var(--astryx-layer-inset-inline-end, 0px)))`,gutterBlock:`calc(max(var(--spacing-4), env(safe-area-inset-top, 0px), env(safe-area-inset-bottom, 0px)) + max(var(--astryx-layer-inset-block-start, 0px), var(--astryx-layer-inset-block-end, 0px)))`,gutterBlockFallback:`calc(var(--spacing-4) + max(var(--astryx-layer-inset-block-start, 0px), var(--astryx-layer-inset-block-end, 0px)))`,gutterBlockStartFallback:`calc(var(--spacing-4) + var(--astryx-layer-inset-block-start, 0px))`,gutterBlockEndFallback:`calc(var(--spacing-4) + var(--astryx-layer-inset-block-end, 0px))`,gutterInlineFallback:`calc(var(--spacing-4) + max(var(--astryx-layer-inset-inline-start, 0px), var(--astryx-layer-inset-inline-end, 0px)))`,maxInlineSize:`calc(100vi - calc(max(var(--spacing-4), env(safe-area-inset-left, 0px)) + var(--astryx-layer-inset-inline-start, 0px)) - calc(max(var(--spacing-4), env(safe-area-inset-right, 0px)) + var(--astryx-layer-inset-inline-end, 0px)))`,maxInlineSizeFallback:`calc(100vw - var(--spacing-4) - var(--spacing-4) - var(--astryx-layer-inset-inline-start, 0px) - var(--astryx-layer-inset-inline-end, 0px))`,maxBlockSize:`min(calc(100dvb - calc(max(var(--spacing-4), env(safe-area-inset-top, 0px)) + var(--astryx-layer-inset-block-start, 0px)) - calc(max(var(--spacing-4), env(safe-area-inset-bottom, 0px)) + var(--astryx-layer-inset-block-end, 0px))), var(--_layer-keyboard-max-block-size, 100dvb))`,maxBlockSizeFallback:`min(calc(100vh - var(--spacing-4) - var(--spacing-4) - var(--astryx-layer-inset-block-start, 0px) - var(--astryx-layer-inset-block-end, 0px)), var(--_layer-keyboard-max-block-size, 100vh))`},tt=`data-layer-anchored`;function nt(e,t,n){if(n<=0)return null;let r=t-n-10;return e.bottom<=r?null:Math.max(0,r-e.top)}var rt=`--_astryx-layer-clearance`,it=`--_astryx-layer-lift`;function at(e,t){return`--astryx-layer-slide-${e}-${t}`}var ot=`var(${rt}, 0px)`,st=`var(${it}, 0px)`;function ct(e,t,n){return`${e}:${t};${e}:${n};`}function lt(e){return ct(e,et.gutterBlockFallback,et.gutterBlock)}function ut(e){return ct(e,et.gutterInlineFallback,et.gutterInline)}var dt={above:`below`,below:`above`,start:`end`,end:`start`};function ft(e){switch(e){case`above`:return`inset-block-end:calc(anchor(outside) + ${st});inset-block-start:calc(0px - ${st});align-self:self-end;margin-block-end:${ot};${lt(`margin-block-start`)}`;case`below`:return`inset-block-start:calc(anchor(outside) - ${st});inset-block-end:${st};align-self:self-start;margin-block-start:${ot};${lt(`margin-block-end`)}`;case`start`:return`inset-inline-end:anchor(outside);inset-inline-start:0;justify-self:self-end;margin-inline-end:${ot};${ut(`margin-inline-start`)}`;case`end`:return`inset-inline-start:anchor(outside);inset-inline-end:0;justify-self:self-start;margin-inline-start:${ot};${ut(`margin-inline-end`)}`}}function pt(e){return e===`above`||e===`below`?`inset-inline-start:0;inset-inline-end:0;justify-self:anchor-center;${ut(`margin-inline-start`)}${ut(`margin-inline-end`)}`:`inset-block-start:calc(0px - ${st});inset-block-end:${st};align-self:anchor-center;${lt(`margin-block-start`)}${lt(`margin-block-end`)}`}function mt(e,t){let n=t===`same`?e:dt[e];return`@position-try ${at(e,t)}{${ft(n)}${pt(n)}}`}var ht=[`above`,`below`,`start`,`end`];function gt(e){return e===`above`||e===`start`?`unsafe self-end`:`unsafe self-start`}function _t(e){return`--astryx-layer-beside-${e}`}function vt(e){return`--astryx-layer-fit-${e}`}function yt(e){return`@position-try ${_t(e)}{${ft(e)}${pt(e)}inline-size:max-content;justify-self:${gt(e)};}`}function bt(e,t){return`calc((${e} - anchor-size(block)) / 2 - ${ot} - ${t} - 1px)`}function xt(e){let t=ct(`min-block-size`,bt(`100vh`,et.gutterBlockFallback),bt(`100dvb`,et.gutterBlock));return`@position-try ${vt(e)}{${ft(e)}${pt(e)}block-size:-webkit-fill-available;block-size:stretch;${t}align-self:${gt(e)};}`}function St(e){if(e!==`above`&&e!==`below`)return``;let t=e===`above`?`below`:`above`;return`flip-block, ${_t(`end`)}, ${_t(`start`)}, ${vt(e)}, ${vt(t)}`}function Ct(){return[...ht.flatMap(e=>[mt(e,`same`),mt(e,`opposite`)]),yt(`end`),yt(`start`),xt(`above`),xt(`below`)].join(``)}var wt=`astryx-layer-slide-rules`;function Tt(e){if(e.getElementById(`astryx-layer-slide-rules`))return;let t=e.createElement(`style`);t.id=wt,t.textContent=Ct(),e.head.appendChild(t)}var Et=[`transform`,`translate`,`scale`,`rotate`],Dt=[1,0,0,1,0,0],Ot=64,kt=1/2048,At=1/32;function jt(e){return Et.some(t=>{let n=e.getPropertyValue(t);return n!==``&&n!==`none`})}function Mt(e){return e!==``&&e!==`none`}function Nt(e,t){return[e[0]*t[0]+e[2]*t[1],e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],e[0]*t[4]+e[2]*t[5]+e[4],e[1]*t[4]+e[3]*t[5]+e[5]]}function Pt(e){let t=e.getPropertyValue(`translate`),n=e.getPropertyValue(`rotate`),r=e.getPropertyValue(`scale`),i=e.getPropertyValue(`transform`),a=Dt;if(Mt(t)){let[e=`0`,n=`0`,r]=t.split(` `);if(r!=null||!t.split(` `).every(e=>e.endsWith(`px`)))return null;a=Nt(a,[1,0,0,1,parseFloat(e),parseFloat(n)])}if(Mt(n)){if(!/^-?[\d.]+deg$/.test(n))return null;let e=parseFloat(n)*Math.PI/180,t=Math.cos(e),r=Math.sin(e);a=Nt(a,[t,r,-r,t,0,0])}if(Mt(r)){let[e=`1`,t=e,n]=r.split(` `);if(n!=null)return null;a=Nt(a,[parseFloat(e),0,0,parseFloat(t),0,0])}if(Mt(i)){let e=/^matrix\(([^)]*)\)$/.exec(i)?.[1].split(`,`).map(e=>parseFloat(e));if(e?.length!==6||e.some(e=>Number.isNaN(e)))return null;a=Nt(a,e)}return a}function Ft([e,t,n,r]){return t===0&&n===0&&e!==0&&r!==0}function It(e){return(e.currentCSSZoom??1)===1&&!(e.getAnimations?.()??[]).some(e=>e.pending)}function Lt(e){let t=t=>parseFloat(e.getPropertyValue(t))||0,n=e.getPropertyValue(`box-sizing`)!==`border-box`,r=e=>n?e.reduce((e,n)=>e+t(`padding-${n}`)+t(`border-${n}-width`),0):0;return{width:t(`width`)+r([`left`,`right`]),height:t(`height`)+r([`top`,`bottom`])}}function Rt(e,t,[n,,,r]){let{width:i,height:a}=Lt(t);if(!(i>0)||!(a>0))return!1;let o=Math.abs(e.width-i*Math.abs(n))+Math.abs(e.height-a*Math.abs(r)),s=Math.abs(e.width-i)+Math.abs(e.height-a);return o+At<s}function zt(e){let t=Math.round(e*Ot)/Ot;return Math.abs(t-e)<kt?t:e}function Bt(e,t,n,r){let[i,a,o,s,c,l]=r,u=Ft(r),d=u?e.width/Math.abs(i):t.offsetWidth,f=u?e.height/Math.abs(s):t.offsetHeight;if(!u&&d<=0)return e;let[p=0,m=0]=n.getPropertyValue(`transform-origin`).split(` `).map(e=>parseFloat(e)),h=d/2-p,g=f/2-m,_=i*h+o*g+c,v=a*h+s*g+l,y=e.left+e.width/2-_-p,b=e.top+e.height/2-v-m;if(!u)return new DOMRect(y,b,d,f);let x=zt(y),S=zt(b);return new DOMRect(x,S,zt(y+d)-x,zt(b+f)-S)}function Vt(e){let t=e.ownerDocument.defaultView,n=t?.getComputedStyle(e);if(n==null||!jt(n))return e.getBoundingClientRect();let r=Pt(n);if(r!=null&&Ft(r)&&It(e)){let t=e.getBoundingClientRect();if(Rt(t,n,r))return Bt(t,e,n,r)}let i=n.getPropertyValue(`transition-property`).split(`,`).map(e=>e.trim()),a=n.getPropertyValue(`transition-duration`).split(`,`).map(parseFloat);if(i.some((e,t)=>(e===`all`||Et.includes(e))&&(a[t%a.length]??0)>0)){let t=e.getBoundingClientRect();return r==null?t:Bt(t,e,n,r)}let o=Et.map(t=>[t,e.style.getPropertyValue(t),e.style.getPropertyPriority(t)]);for(let t of Et)e.style.setProperty(t,`none`,`important`);let s=e.getBoundingClientRect(),c=t?.getComputedStyle(e),l=c!=null&&jt(c)?Pt(c):null,u=c!=null&&l!=null?Bt(s,e,c,l):s;for(let[t,n,r]of o)n===``?e.style.removeProperty(t):e.style.setProperty(t,n,r);return u}function Ht(e,{onClicked:t,onNoClick:n}){let r=e.ownerDocument.defaultView;if(r==null){let e=!1;return queueMicrotask(()=>{e||n()}),()=>{e=!0}}let i=!1,a=null,o=null,s=null,c=()=>{i=!0,s?.(),s=null,o!=null&&(r.clearTimeout(o),o=null)};return s=A(r,`click`,n=>{!i&&n.isTrusted&&e.contains(n.target)&&(c(),a=r.setTimeout(()=>{a=null,t(n.defaultPrevented)},0))}),o=r.setTimeout(()=>{i||(c(),n())},300),()=>{c(),a!=null&&(r.clearTimeout(a),a=null)}}function Ut(e){let t=e.ownerDocument.defaultView,n=null,r=t=>{n==null&&t.target===e&&(n=t)};t?.addEventListener(`click`,r,!0);try{e.click()}finally{t?.removeEventListener(`click`,r,!0)}return n?.defaultPrevented===!0}function Wt(e){return w(e.ownerDocument),j(()=>Ut(e))}var Gt=`--_layer-keyboard-inset-block-end`;function Kt(e,t){let n=e.ownerDocument.defaultView;for(let r=t.parentElement;r!=null;r=r===e?null:r.parentElement){let e=n?.getComputedStyle(r).overflowY;if(r.scrollHeight>r.clientHeight+1&&(e===`auto`||e===`scroll`)){let e=r.getBoundingClientRect(),n=t.getBoundingClientRect();n.bottom>e.bottom?r.scrollTop+=n.bottom-e.bottom:n.top<e.top&&(r.scrollTop-=e.top-n.top);return}}}function qt(e){return e==null?null:{[it]:`${e}px`}}function Jt(e,t){let[n,r]=(0,U.useState)(null),[i,a]=(0,U.useState)(null),[o,s]=(0,U.useState)(null),c=(0,U.useRef)(null),l=(0,U.useRef)(null),u=(0,U.useRef)(null),d=(0,U.useRef)(null);E(()=>{let n=t.current,i=n?.ownerDocument.defaultView;if(!e||n==null||i==null)return;let o=i,f=!1,p=xe(i),m=n,h=0,_=()=>{h+=1},v=()=>{let e=t.current;return e==null||e===m?!1:(m.removeEventListener(`pointerdown`,M,!0),m.removeEventListener(`touchstart`,_,{capture:!0}),m.removeEventListener(`wheel`,_,{capture:!0}),m=e,m.addEventListener(`pointerdown`,M,!0),m.addEventListener(`touchstart`,_,{capture:!0,passive:!0}),m.addEventListener(`wheel`,_,{capture:!0,passive:!0}),!0)},y=(e,t=u.current,n=null)=>{f||c.current===e&&u.current===t&&l.current===n||(c.current=e,u.current=t,l.current=n,(0,we.flushSync)(()=>{r(e),s(t),a(n)}),v())},b=e=>{let t=e>0?e+10:0,n=Math.max(t,u.current??0);if(y(null,n>0?n:null),e<=0)return!1;let r=se(i),a=Vt(m),o=nt(a,r,e);if(o==null)return!1;y(o);let s=Vt(m);if(s.top>a.top+1&&Math.abs(s.bottom-a.bottom)>1){y(o,u.current,s.top-a.top);let t=Vt(m);if(Math.abs(t.top-a.top)>1){y(o);let t=nt(s,r,e);t!=null&&y(t)}}let c=r-e-10;return Vt(m).bottom>c+1?(y(null),!1):!0},x=e=>{if(v(),!m.hasAttribute(`data-layer-anchored`)){y(null,null);return}if(!b(e))return;let t=m.ownerDocument.activeElement;if(t!=null&&t!==m&&m.contains(t)){let e=h;i.requestAnimationFrame(()=>i.requestAnimationFrame(()=>{!f&&h===e&&Kt(m,t)}))}},S=null,C=()=>{S!=null&&(i.clearTimeout(S),S=null)},w=new Set,T=null,E=null,D=null,O=()=>{let e=[A(o,`pointerup`,ee),A(o,`pointercancel`,ee)];D=()=>{for(let t of e)t()}},k=()=>{D?.(),D=null},j=()=>{E?.(),E=null,w.clear(),k();let e=T;T=null,e?.()};function M(e){_(),w.size===0&&O(),w.add(e.pointerId)}function ee(e){w.has(e.pointerId)&&(e.type===`pointercancel`?j():E??=Ht(m,{onClicked:j,onNoClick:j}))}m.addEventListener(`pointerdown`,M,!0),m.addEventListener(`touchstart`,_,{capture:!0,passive:!0}),m.addEventListener(`wheel`,_,{capture:!0,passive:!0});let N=p.subscribe(e=>{if(C(),e.animated&&e.to>e.from){let t=e.start+(p.profile===`chromium`&&e.curve!=null?e.curve.durationMs:g.keyboardNotificationMs);S=i.setTimeout(()=>{S=null,x(e.to)},Math.max(0,t-i.performance.now()))}else w.size>0?T=()=>x(e.to):x(e.to)});L(i)>0&&i.queueMicrotask(()=>{f||x(L(i))});let P=null;return d.current=()=>{!v()||P!=null||L(i)<=0||(P=i.requestAnimationFrame(()=>{P=null,f||S!=null||(w.size>0?T=()=>x(L(i)):x(L(i)))}))},()=>{f=!0,d.current=null,P!=null&&i.cancelAnimationFrame(P),N(),C(),E?.(),m.removeEventListener(`pointerdown`,M,!0),m.removeEventListener(`touchstart`,_,{capture:!0}),m.removeEventListener(`wheel`,_,{capture:!0}),k(),c.current!=null&&(c.current=null,r(null)),l.current!=null&&(l.current=null,a(null)),u.current!=null&&(u.current=null,s(null))}},[e,t]);let f=(0,U.useCallback)(()=>{d.current?.()},[]);return{cap:e?n:null,lift:e?i:null,inset:e?o:null,followLayerElement:f}}var Yt=`--_astryx-layer-enter-x`,Xt=`--_astryx-layer-enter-y`,Zt=`--_astryx-layer-enter-origin`,Qt=`--_astryx-layer-enter-gap`,$t=(e,t)=>Math.min(t,Math.max(0,e));function en(e,t){if(e.width<=0||e.height<=0)return null;let n=t.left+t.width/2,r=t.top+t.height/2,i=$t(n-e.left,e.width),a=$t(r-e.top,e.height),o=t.width<=1&&t.height<=1;if(i>0&&i<e.width&&a>0&&a<e.height)return{x:0,y:0,originX:i,originY:a,gap:0};let s=(e.left+e.width/2-n)/((e.width+t.width)/2),c=(e.top+e.height/2-r)/((e.height+t.height)/2);if(Math.abs(c)>=Math.abs(s)){let n=c>0;return{x:0,y:n?-1:1,originX:i,originY:n?0:e.height,gap:o?null:Math.max(0,n?e.top-(t.top+t.height):t.top-(e.top+e.height))}}let l=s>0;return{x:l?-1:1,y:0,originX:l?0:e.width,originY:a,gap:o?null:Math.max(0,l?e.left-(t.left+t.width):t.left-(e.left+e.width))}}function tn(e,t){let n=t.getBoundingClientRect();return en(Vt(e),n)}var nn=e=>`${Math.round(e*1e3)/1e3}px`;function rn(e,t){e.style.setProperty(Yt,t==null?`initial`:String(t.x)),e.style.setProperty(Xt,t==null?`initial`:String(t.y)),e.style.setProperty(Zt,t==null?`initial`:`${nn(t.originX)} ${nn(t.originY)}`);let n=t?.gap==null?null:Math.floor(t.gap*1e3)/1e3;e.style.setProperty(Qt,n==null?`initial`:`${n}px`)}var an=[[`blockStart`,`--astryx-layer-inset-block-start`],[`blockEnd`,`--astryx-layer-inset-block-end`],[`inlineStart`,`--astryx-layer-inset-inline-start`],[`inlineEnd`,`--astryx-layer-inset-inline-end`]];function on(e){return typeof e==`number`?`${e}px`:e}function sn(e){let t={};if(e)for(let[n,r]of an){let i=e[n];i!=null&&i!==``&&(t[r]=on(i))}return t}var cn=o(`layer/popover-operations/own-operations-by-document`,1),ln=o(`layer/popover-operations/browser-hides-by-document`,1),un=o(`layer/popover-operations/settled-callbacks-by-document`,1);function dn(e,t,n){e.set(t,Math.max(0,(e.get(t)??0)+n))}function fn(e){return(cn.get(e)??0)>0||(ln.get(e)??0)>0}function pn(e){!fn(e)&&un.has(e)&&queueMicrotask(()=>mn(e))}function mn(e){if(fn(e))return;let t=un.get(e);if(t!=null){un.delete(e);for(let e of t)queueMicrotask(e)}}function hn(e,t){dn(cn,e,1);try{t()}finally{dn(cn,e,-1),pn(e)}}function gn(e){return(cn.get(e)??0)>0}function _n(e){return(ln.get(e)??0)>0}var vn=u(`layer/popover-operations/browser-hides-in-flight`,1);function yn(e){if(vn.has(e))return;vn.add(e);let t=e.ownerDocument;dn(ln,t,1);let n=t.defaultView??globalThis,r=null,i=!1,a=()=>{i||(i=!0,e.removeEventListener(`toggle`,a),r!=null&&(n.clearTimeout(r),r=null),vn.delete(e),dn(ln,t,-1),pn(t))};e.addEventListener(`toggle`,a),r=n.setTimeout(a,0)}function bn(e,t){if(!fn(e)){t();return}let n=un.get(e);n==null?un.set(e,[t]):n.push(t)}var xn=new Set([`effect`,`timeline`,`rangeStart`,`rangeEnd`,`playbackRate`,`startTime`,`currentTime`]);function Sn(e){let t=new Set;for(let n=Object.getPrototypeOf(e);n!=null&&n!==Object.prototype;n=Object.getPrototypeOf(n))for(let[e,r]of Object.entries(Object.getOwnPropertyDescriptors(n)))r.set!=null&&t.add(e);return[...t]}function Cn(e){return typeof CSSNumericValue<`u`&&e instanceof CSSNumericValue?e.toString():typeof e==`object`&&e&&Object.getPrototypeOf(e)===Object.prototype?Object.entries(e).map(([e,t])=>`${e}:${Cn(t)??String(t)}`).join(`;`):null}function wn(e,t){if(e===t)return!1;let n=Cn(e);return n==null||n!==Cn(t)}function Tn(e){let t=e.effect,n={};for(let t of Sn(e))n[t]=e[t];let r={};if(t!=null)for(let e of Sn(t))r[e]=t[e];return{animation:e,name:e.animationName??``,target:t?.target??null,pseudoElement:t?.pseudoElement??null,values:n,effectValues:r,timing:t?.getTiming()??null,keyframes:t?.getKeyframes()??null,playState:e.playState,replaceState:e.replaceState}}function En(e,t,n){e[t]=n}function Dn(e,t){for(let n of Sn(e))n in t.effectValues&&wn(t.effectValues[n],e[n])&&En(e,n,t.effectValues[n]);if(t.timing!=null){let n=e.getTiming(),r={};for(let[e,i]of Object.entries(t.timing))wn(i,n[e])&&(r[e]=i);Object.keys(r).length>0&&e.updateTiming(r)}t.keyframes!=null&&JSON.stringify(t.keyframes)!==JSON.stringify(e.getKeyframes())&&e.setKeyframes(t.keyframes)}function On(e,t){let n=()=>{t.startTime!=null&&e.playState!==`idle`&&(e.startTime=t.startTime)};t.startTime==null?t.ready.then(n,()=>void 0):n()}function kn(e,t){let n=e.effect;n!=null&&Dn(n,t);let r=e;for(let n of[`timeline`,`rangeStart`,`rangeEnd`])n in t.values&&wn(t.values[n],r[n])&&En(e,n,t.values[n]);for(let n of Sn(e))!xn.has(n)&&n in t.values&&wn(t.values[n],r[n])&&En(e,n,t.values[n]);t.replaceState===`persisted`&&e.replaceState!==`persisted`&&e.persist();let i=t.values.playbackRate;typeof i==`number`&&i!==e.playbackRate&&(e.playbackRate=i),t.playState===`paused`&&e.playState!==`paused`?e.pause():t.playState!==`paused`&&e.playState===`paused`&&e.play();let a=t.values.startTime,o=t.values.currentTime;t.playState===`finished`?e.finish():a==null?o!=null&&(e.currentTime=o,t.playState===`running`&&On(e,t.animation)):e.startTime=a}function An(e){e.target!=null&&e.keyframes!=null&&kn(e.target.animate(e.keyframes,{pseudoElement:e.pseudoElement??void 0}),e)}function jn(e){return typeof CSSTransition<`u`&&e instanceof CSSTransition}function Mn(e){return typeof CSSAnimation<`u`&&e instanceof CSSAnimation}function Nn(e){let t=e.effect?.getComputedTiming().endTime;t!=null&&Number.isFinite(Number(t))&&e.playbackRate!==0&&e.finish()}function Pn(e,t,n){let r=e.getAnimations({subtree:!0}),i=new Set(r),a=[];for(let e of t)i.has(e.animation)||(jn(e.animation)?An(e):a.push(e));let o=r.filter(e=>(Mn(e)||jn(e))&&!n.has(e)),s=[];for(let e of o){let t=e.effect,n=e.animationName??``,r=a.findIndex(e=>e.name===n&&e.target===(t?.target??null)&&e.pseudoElement===(t?.pseudoElement??null));r===-1?s.push(e):kn(e,a.splice(r,1)[0])}for(let e of s){let t=e.animationName??``,n=a.findIndex(e=>e.name===t);n===-1?Nn(e):kn(e,a.splice(n,1)[0])}}function Fn(e,t){if(typeof e.getAnimations!=`function`){t();return}let n=e.getAnimations({subtree:!0}),r=n.map(Tn);t(),Pn(e,r,new Set(n))}var In=_e(`LayerContext`,1,null);In.displayName=`LayerContext`;function Ln(){return(0,U.use)(In)}var X=n(),Rn={keoZOQ:`x1vhfslr`,k1K539:`x119uzjn`,$$css:!0},zn={keoZOQ:`x1lhixnp`,k1K539:`xlm3tn6`,$$css:!0},Bn={k71WvV:`xa3ewmy`,$$css:!0},Vn={keTefX:`x1cytvie`,$$css:!0},Z={keyboardCap:(e,t,n)=>[{"--_layer-keyboard-max-block-size":e==null?e:`x1ex41ac`,"--_layer-keyboard-overflow":t==null?t:`xypflj0`,"--_layer-keyboard-inset-block-end":n==null?n:`xihxjaz`,$$css:!0},{"--x---_layer-keyboard-max-block-size":e??void 0,"--x---_layer-keyboard-overflow":t??void 0,"--x---_layer-keyboard-inset-block-end":n??void 0}],scrollsOnOverflow:{kORKVm:`x1odjw0f`,$$css:!0},base:{keoZOQ:`xdj266r`,k1K539:`xat24cr`,keTefX:`x1lziwak`,k71WvV:`x14z9mp`,kLKAdn:`xexx8yu`,kGO01o:`x18d9i69`,kZCmMZ:`x1c1uobl`,kwRFfy:`xyri2b`,kMzoRj:`xc342km`,ksu8eU:`xng3xce`,kVQacm:`x1rea2x4`,kWkggS:`xjbqb8w`,$$css:!0},fixed:{kVAEAm:`xixxii4`,$$css:!0},placementBelow:e=>[Rn,{"--x-marginBlockStart":(e=>typeof e==`number`?e+`px`:e??void 0)(e)}],placementAbove:e=>[zn,{"--x-marginBlockEnd":(e=>typeof e==`number`?e+`px`:e??void 0)(e)}],placementEnd:e=>[Bn,{keTefX:e==null?e:`x4lel18`,$$css:!0},{"--x-marginInlineStart":(e=>typeof e==`number`?e+`px`:e??void 0)(e)}],placementStart:e=>[Vn,{k71WvV:e==null?e:`x1c9tiao`,$$css:!0},{"--x-marginInlineEnd":(e=>typeof e==`number`?e+`px`:e??void 0)(e)}],farBelow:{k1K539:`x119uzjn`,$$css:!0},farAbove:{keoZOQ:`x1lhixnp`,$$css:!0},farEnd:{k71WvV:`xa3ewmy`,$$css:!0},farStart:{keTefX:`x1cytvie`,$$css:!0},viewportFit:{kB7OPa:`x9f619`,ks0D6T:`xc0b1yq`,kskxy:`x3v4n1`,$$css:!0},sideBelow:{k87sOh:`x11qqqwi`,krVfgx:`x1ihzn68`,$$css:!0},sideAbove:{k87sOh:`xs7zcsv`,krVfgx:`x1dkbz8d`,$$css:!0},sideEnd:{kLqNvP:`xgn968y`,kt4wiu:`xtijo5x`,$$css:!0},sideStart:{kLqNvP:`x1o0tod`,kt4wiu:`x1rmahmk`,$$css:!0},alignInlineStart:{kLqNvP:`xjlsgp1`,kt4wiu:`xtijo5x`,k71WvV:`x144kxal`,$$css:!0},alignInlineEnd:{kLqNvP:`x1o0tod`,kt4wiu:`x1sii5lc`,keTefX:`xpdk1p0`,$$css:!0},alignBlockStart:{k87sOh:`x1pex6sq`,krVfgx:`x1ihzn68`,k1K539:`x3z50q0`,$$css:!0},alignBlockEnd:{k87sOh:`xs7zcsv`,krVfgx:`x1lalo65`,keoZOQ:`x1j6tnbc`,$$css:!0},heldInlineStart:{kLqNvP:`x1hirqua`,$$css:!0},heldInlineEnd:{kt4wiu:`xt5bzs0`,$$css:!0},heldBlockStart:{k87sOh:`x2tnmsz`,$$css:!0},heldBlockEnd:{krVfgx:`xbmjlmh`,$$css:!0},centerInline:{kLqNvP:`x1o0tod`,kt4wiu:`xtijo5x`,keTefX:`xpdk1p0`,k71WvV:`x144kxal`,$$css:!0},centerBlock:{k87sOh:`xs7zcsv`,krVfgx:`x1ihzn68`,keoZOQ:`x1j6tnbc`,k1K539:`x3z50q0`,$$css:!0}};function Hn(e){return typeof e==`number`?`${e}px`:e}function Un(e){Fn(e,()=>{let t=e.style.display;e.style.display=`none`,e.getBoundingClientRect(),e.style.display=t})}function Wn(e){return e.playState===`running`&&e.effect?.getComputedTiming().endTime!==1/0}function Gn(e){return e==null||typeof e.getAnimations!=`function`?[]:e.getAnimations({subtree:!0}).filter(Wn)}function Kn(e){let t=e.ownerDocument.defaultView?.getComputedStyle(e);if(t==null)return!1;let n=e=>t.getPropertyValue(e).split(`,`).map(e=>e.trim()),r=n(`transition-behavior`),i=n(`transition-duration`).map(parseFloat),a=n(`transition-delay`).map(parseFloat);return n(`transition-property`).some((e,t)=>{let n=r[t%r.length],o=i[t%i.length]||0,s=a[t%a.length]||0;return(e===`all`||e===`display`)&&n===`allow-discrete`&&o+Math.max(0,s)>0})}function qn(e){return(e.ownerDocument.defaultView?.getComputedStyle(e))?.getPropertyValue(`animation-name`).trim()||`none`}function Jn({layer:e,anchor:t},n){if(e.width<=0||e.height<=0)return!1;let r=e.left<t.right&&t.left<e.right&&e.top<t.bottom&&t.top<e.bottom,i=t.bottom>0&&t.top<n;return r||i&&(e.top<0||e.bottom>n)}function Yn(e,t){if(t==null)return null;let n=t.getBoundingClientRect(),r=e.ownerDocument.documentElement.clientHeight,i={anchor:n,layer:Vt(e)};return Jn(i,r)?(Un(e),null):i}function Xn(e,t,n){t==null||!e.hasAttribute(`data-layer-anchored`)?rn(e,null):rn(e,n==null?tn(e,t):en(n.layer,n.anchor))}var Zn=150;function Qn(e){let t=[];for(let n=e;n;n=c(n)){let e=n.getRootNode();h(e)&&!t.includes(e)&&t.push(e)}return t}function $n(e,t,n){let r=null,i=null,o=()=>{r!==null&&(e.cancelAnimationFrame(r),r=null),i!==null&&(e.clearTimeout(i),i=null)},s=()=>{o(),r=e.requestAnimationFrame(()=>{r=null,i=e.setTimeout(()=>{i=null,r=e.requestAnimationFrame(()=>{r=null,n()})})})},c=e.onscrollend!==void 0,l=e=>a(e.target,t),u=t=>{l(t)&&(o(),c||(i=e.setTimeout(()=>{i=null,s()},Zn)))},d=e=>{l(e)&&s()},f=[A(e,`scroll`,u)];c&&f.push(A(e,`scrollend`,d));let p={capture:!0,passive:!0},m=Qn(t);for(let e of m)e.addEventListener(`scroll`,u,p),c&&e.addEventListener(`scrollend`,d,p);return()=>{for(let e of f)e();for(let e of m)e.removeEventListener(`scroll`,u,p),e.removeEventListener(`scrollend`,d,p);o()}}function er(e,t,n,r,i){let a=e.ownerDocument.defaultView;if(!a)return()=>{};let o=()=>{n()&&Yn(e,t)},s=null;if(typeof ResizeObserver<`u`){s=new ResizeObserver(o),s.observe(e);for(let t of Array.from(e.children))s.observe(t);s.observe(t)}a.addEventListener(`resize`,o);let c=$n(a,t,()=>{n()&&(r()&&e.hasAttribute(`data-layer-anchored`)?(Un(e),i()):Yn(e,t))});return()=>{s?.disconnect(),c(),a.removeEventListener(`resize`,o)}}function tr(e){if(e.getClientRects().length===0)return!1;let t=e.closest(`dialog`);return t==null||s(t)}function nr(e){if(e.getClientRects().length===0)return!1;let t=e.closest(`dialog`);return t!=null&&!s(t)}function rr(e,t){let n=e.ownerDocument,r=n.defaultView;if(typeof n.getAnimations!=`function`||r==null)return t(),()=>{};let i=!1,a=r.requestAnimationFrame(()=>{if(i)return;let r=n.getAnimations().filter(t=>{let r=t.effect,i=r!=null&&`target`in r?r.target:null;return!x(i)||!(i===e||i.contains(e))||t.timeline!==n.timeline?!1:Wn(t)});r.length===0?t():Promise.all(r.map(async e=>e.finished.catch(()=>{}))).then(()=>{i||t()})});return()=>{i=!0,r.cancelAnimationFrame(a)}}function ir(){let e=null,t=new Set;return{get:()=>e,set:n=>{if(n!==e){e=n;for(let e of t)e()}},subscribe:e=>(t.add(e),()=>{t.delete(e)})}}var ar=()=>null;function or({mountStore:e,renderLayer:t,sentinelRef:n}){let r=(0,U.useSyncExternalStore)(e.subscribe,e.get,ar),i=(0,X.jsx)(`template`,{ref:n});if(r===null)return(0,X.jsx)(X.Fragment,{children:i});let a=t(r);return(0,X.jsxs)(X.Fragment,{children:[i,r.portalTarget?(0,we.createPortal)(a,r.portalTarget):a]})}function sr(e,t){let n=e.ownerDocument.defaultView;if(!n)return{};let r=n.getComputedStyle(e),i=n.getComputedStyle(t);return{...r.direction!==i.direction&&{direction:r.direction},...r.writingMode!==i.writingMode&&{writingMode:r.writingMode}}}function cr(e=`above`){return`flip-block, flip-inline, flip-block flip-inline, ${at(e,`same`)}, ${at(e,`opposite`)}`}function lr(e,t,n){let r=e===`above`||e===`below`,i=e===`above`||e===`start`?`self-end`:`self-start`,a=t===`center`?`anchor-center`:`${n?``:`unsafe `}self-${t}`;return r?{alignSelf:i,justifySelf:a}:{justifySelf:i,alignSelf:a}}function ur(e,t,n){let r=e===`above`||e===`below`,i=e===`above`?Z.sideAbove:e===`below`?Z.sideBelow:e===`start`?Z.sideStart:Z.sideEnd;if(t===`center`)return[i,r?Z.centerInline:Z.centerBlock];let a=t===`start`,o=r?a?Z.alignInlineStart:Z.alignInlineEnd:a?Z.alignBlockStart:Z.alignBlockEnd,s=n?null:r?a?Z.heldInlineStart:Z.heldInlineEnd:a?Z.heldBlockStart:Z.heldBlockEnd;return s==null?[i,o]:[i,o,s]}function dr(e,t){return(0,U.useMemo)(()=>({onPointerDown:n=>{let i=n.currentTarget,a=i.ownerDocument,o=i.getRootNode(),s=(h(o)?o:a).getElementById(e);if(!t&&(s==null||!r(s)))return;i.setAttribute(`popovertarget`,e);let c=()=>{a.removeEventListener(`pointerup`,c),a.removeEventListener(`pointercancel`,c),a.defaultView?.setTimeout(()=>{i.removeAttribute(`popovertarget`)},0)};a.addEventListener(`pointerup`,c),a.addEventListener(`pointercancel`,c)},onClickCapture:e=>{let t=e.currentTarget;t.hasAttribute(`popovertarget`)&&(e.preventDefault(),t.removeAttribute(`popovertarget`))}}),[e,t])}function fr(e){let{mode:t,onShow:n,onHide:r,lightDismiss:i=!1}=e,a=t===`context`?e.lazyMount??!1:!1,o=a&&t===`context`?e.keepsMountAfterShow??!1:!1,s=t===`context`?e.keepsAnchorClear??!1:!1,c=t===`context`?e.watchesOutsidePans:void 0,l=t===`context`?e.writesEntranceSide??!1:!1,u=te(t===`context`?e.onPlacedAfresh:void 0),d=t===`context`?e.onCloseStart:void 0,f=t===`context`?e.onOpenPendingChange:void 0,p=te(t===`context`&&e.waitsForAnchor===!0),m=te(d),h=(0,U.useId)(),g=`--astryx-layer-${h.replace(/:/g,``)}`,[_,v]=(0,U.useState)(!1),[y,b]=(0,U.useState)(!0),x=(0,U.useRef)(!0),S=(0,U.useCallback)(e=>{x.current!==e&&(x.current=e,b(e))},[]),w=Ln()?.inset,T=(0,U.useRef)(null),D=(0,U.useRef)(null),O=(0,U.useRef)(null),k=(0,U.useRef)(null),A=(0,U.useRef)(null),j=(0,U.useRef)(null),[M]=(0,U.useState)(ir),[ee,N]=(0,U.useState)(0),F=(0,U.useRef)(!1),ne=(0,U.useRef)(null),I=(0,U.useRef)(!1),ae=(0,U.useRef)(null),oe=(0,U.useRef)(!1),se=(0,U.useCallback)(e=>{let t={};ae.current=t;let n=()=>{if(ae.current!==t)return;ae.current=null;let e=O.current;!I.current&&e!=null&&Ae(e,g)},r=oe.current?Gn(e):[];r.length===0?n():Promise.all(r.map(async e=>e.finished.catch(()=>void 0))).then(n)},[g]),ce=(0,U.useRef)(null),L=(0,U.useRef)(null),le=(0,U.useRef)(null),R=(0,U.useRef)(null),me=(0,U.useRef)(null),z=(0,U.useCallback)(()=>{me.current?.(),me.current=null},[]),he=(0,U.useCallback)(()=>{let e=ze();return ce.current===e},[]),ge=(0,U.useCallback)(e=>{if(typeof e.showPopover==`function`){let t=e.ownerDocument,n=_n(t);try{hn(t,()=>{let t=O.current,n=t?.ownerDocument.defaultView;e.showPopover({source:n!=null&&t instanceof n.HTMLElement?t:void 0})})}catch(e){if(n&&e?.name===`InvalidStateError`)return!1;throw e}}else e.style.display=`block`;return D.current=e,!0},[]),_e=(0,U.useCallback)(e=>{if(t!==`context`)return!0;let n=j.current;if(n===null)return!1;let r=n.portalTarget??A.current?.parentElement??null;return e.parentElement===r},[t]),ve=(0,U.useCallback)(()=>{if(t!==`context`)return;let e=A.current,n=e?.parentElement??null;if(!e||!n)return;Tt(e.ownerDocument);let r=$e(n),i=F.current||I.current,a={portalTarget:r,portalStyle:r==null?{}:i?sr(e,r):null},o=j.current!==null;j.current=a,M.set(a),o&&N(e=>e+1)},[t,M]),B=(0,U.useCallback)(e=>{let t=j.current,n=A.current;if(t===null||t.portalTarget===null||t.portalStyle!==null||n===null)return;let r=sr(n,t.portalTarget);r.direction!=null&&e.style.direction===``&&(e.style.direction=r.direction),r.writingMode!=null&&e.style.writingMode===``&&(e.style.writingMode=r.writingMode);let i={...t,portalStyle:r};j.current=i,M.set(i)},[M]),be=(0,U.useCallback)(()=>{t===`context`&&a&&!o&&(j.current=null,M.set(null))},[t,a,o,M]),xe=(0,U.useCallback)(()=>{if(he()&&L.current===O.current)return;if(i&&!I.current&&Ve()){let e=T.current?.ownerDocument??document;F.current=!0,ne.current?.(),ne.current=He(e,()=>{ne.current=null,F.current&&(F.current=!1,K.current())});return}let e=le.current;e!=null&&I.current&&e.popover===T.current&&e.trigger!==O.current&&(e.moved=!0,D.current=null,I.current=!1,z());let t=T.current,r=t&&_e(t)?t:null;if(!r)F.current=!0,ve();else if(!I.current){let e=()=>{F.current=!0,bn(r.ownerDocument,()=>{F.current&&(F.current=!1,K.current())})};if(gn(r.ownerDocument)){e();return}let t=Kn(r),a=qn(r);B(r);let o=O.current;if(o!=null&&ke(o,g),!ge(r)){o!=null&&ae.current==null&&Ae(o,g),e();return}let u=a!==`none`&&a!==qn(r);oe.current=t||u,i&&(Ge(r),c!=null&&(z(),me.current=c(r)));let d=s?Yn(r,O.current):null;l||Xn(r,O.current,d),I.current=!0,v(!0),n?.()}},[g,n,s,l,i,c,z,ve,B,ge,_e,he]),V=(0,U.useRef)(null),H=(0,U.useRef)(null),Se=(0,U.useRef)(null),Ce=(0,U.useRef)(null),[we,Te]=(0,U.useState)(0);E(()=>{let e=Ce.current;Ce.current=null,e?.()},[we]);let W=(0,U.useCallback)(()=>{let e=V.current!=null;V.current?.(),V.current=null,H.current=null,Se.current&&=(Se.current.cancelled=!0,null),e&&f?.(!1)},[f]),Ee=(0,U.useCallback)(()=>{let e=V.current!=null;V.current=null,H.current=null,e&&f?.(!1)},[f]),G=(0,U.useCallback)(()=>{let e=t===`context`?O.current:null;if(e!=null&&V.current!=null&&H.current===e)return;if(W(),!e){if(p.current){V.current=()=>{},I.current||f?.(!0);return}xe();return}if(tr(e)||typeof ResizeObserver>`u`||typeof document.getAnimations!=`function`){xe();return}let n=e,r=e.getClientRects().length>0,i=e.closest(`dialog`),a=()=>{},o=!1,s=()=>{},c=()=>{},l=()=>{s(),h?.disconnect(),c(),i?.removeEventListener(`toggle`,m)},u=()=>{o=!0,l(),a=rr(e,()=>{Ee(),xe()})},d=()=>{Ce.current=()=>{!o&&nr(n)&&(r?(o=!0,l(),Ee(),xe()):u())},Te(e=>e+1)};function m(){o||(tr(n)?u():nr(n)&&d())}let h=typeof IntersectionObserver>`u`?null:new IntersectionObserver(m);s=ye(e,m),o?l():(h?.observe(e),i&&(c=re(i,{attributes:!0,attributeFilter:[`open`]},m),i.addEventListener(`toggle`,m))),V.current=()=>{o=!0,l(),a()},H.current=e,I.current||f?.(!0)},[t,xe,W,Ee,f,p]),De=(0,U.useCallback)(()=>{if(ne.current?.(),ne.current=null,W(),F.current=!1,I.current){let e=T.current;m.current?.(),D.current=null,I.current=!1,z(),e&&(typeof e.hidePopover==`function`?hn(e.ownerDocument,()=>{e.hidePopover()}):e.style.display=`none`),v(!1),r?.()}se(T.current),be()},[r,be,se,W,z,m]),K=(0,U.useRef)(G);C(K,G);let q=(0,U.useRef)(null),je=(0,U.useCallback)(e=>{if(!e){let e=O.current;if(!e)return;let t={element:e,cancelled:!1};k.current=t;let n=()=>{t.cancelled||O.current!==e||(Ae(e,g),O.current=null,H.current===e&&W(),s&&I.current&&(q.current?.(),q.current=null))};p.current?n():queueMicrotask(n);return}k.current?.element===e&&(k.current.cancelled=!0,k.current=null),O.current&&O.current!==e&&Ae(O.current,g),e&&(I.current||ae.current!=null)&&ke(e,g);let t=O.current;if(O.current=e,Re(e.ownerDocument),s&&I.current&&e!==t){q.current?.(),q.current=null;let t=T.current;t&&(q.current=er(t,e,()=>T.current===t&&O.current===e,()=>x.current,()=>u.current?.()),Yn(t,e))}let n=H.current;if(V.current!=null&&n!==e){W();let t={cancelled:!1};Se.current=t,queueMicrotask(()=>{t.cancelled||(Se.current=null,O.current===e&&!I.current&&K.current())})}},[g,W,s,u,p]),Me=(0,U.useCallback)(e=>{if(R.current?.(),Be())return;ce.current=ze(),L.current=O.current;let t=e.defaultView,n=null,r=()=>{ce.current=null,L.current=null,e.removeEventListener(`click`,i,!0),n!==null&&(t?.clearTimeout(n),n=null),R.current===r&&(R.current=null)},i=()=>{e.removeEventListener(`click`,i,!0),t?n=t.setTimeout(()=>{n=null,R.current===r&&r()},0):r()};e.addEventListener(`click`,i,!0),R.current=r},[]);(0,U.useEffect)(()=>(ze(),()=>{R.current?.(),V.current?.(),ne.current?.(),ne.current=null,z()}),[z]);let Ne=(0,U.useCallback)(e=>{let t=e,n=e.currentTarget;if(t.newState!==`closed`||n==null)return;if(I.current){yn(n),m.current?.(),le.current={popover:n,trigger:O.current,moved:!1};return}let r=O.current;r!=null&&Oe(r).includes(g)&&!oe.current&&(ae.current=null,Ae(r,g))},[g,m]),Pe=(0,U.useCallback)(e=>{let t=e,n=le.current;n!=null&&n.popover===e.currentTarget&&(le.current=null,n.moved)||t.newState===`closed`&&I.current&&(D.current=null,I.current=!1,z(),Me(e.currentTarget?.ownerDocument??document),se(e.currentTarget),v(!1),r?.(),be())},[r,be,Me,se,z]),J=(0,U.useRef)(null),Fe=(0,U.useRef)(null),Ie=(0,U.useCallback)((e,t)=>{J.current&&Fe.current&&(J.current!==e||Fe.current!==t)&&(J.current.removeEventListener(`toggle`,Fe.current),J.current.removeEventListener(`beforetoggle`,Ne),J.current=null,Fe.current=null),e&&J.current!==e&&(e.addEventListener(`toggle`,t),e.addEventListener(`beforetoggle`,Ne),J.current=e,Fe.current=t)},[Ne]),{cap:Y,lift:Le,inset:Ue,followLayerElement:We}=Jt(_&&t===`context`,T),Ke=(0,U.useCallback)(e=>{if(T.current=e,Ie(e,Pe),e&&F.current)F.current=!1,G();else if(e&&I.current&&D.current!==e&&_e(e)){if(We(),ge(e)){let t=s?Yn(e,O.current):null;Xn(e,O.current,t)}else bn(e.ownerDocument,()=>{let t=T.current;if(I.current&&t===e&&D.current!==e&&ge(e)){let t=s?Yn(e,O.current):null;Xn(e,O.current,t)}})}},[Pe,Ie,G,ge,_e,s,We]),qe=(0,U.useCallback)(e=>{A.current=e,e&&(!a||F.current||I.current||o&&j.current!=null)&&ve()},[a,o,ve]);(0,U.useEffect)(()=>(T.current&&Ie(T.current,Pe),()=>{J.current&&Fe.current&&(J.current.removeEventListener(`toggle`,Fe.current),J.current.removeEventListener(`beforetoggle`,Ne),J.current=null,Fe.current=null)}),[Pe,Ie,Ne]),E(()=>{if(!_||t!==`context`)return;let e=O.current;if(!e)return;let n=e.ownerDocument.defaultView;if(n){let t=e.getBoundingClientRect(),r=t.bottom>=0&&t.right>=0&&t.top<=n.innerHeight&&t.left<=n.innerWidth;S(r)}if(typeof IntersectionObserver>`u`)return;let r=new IntersectionObserver(e=>{let t=e[e.length-1];t&&S(t.isIntersecting)});return r.observe(e),()=>r.disconnect()},[_,t,S]),E(()=>{if(!s||!_||t!==`context`)return;let e=T.current,n=O.current;if(e&&n)return q.current?.(),q.current=er(e,n,()=>T.current===e&&O.current===n,()=>x.current,()=>u.current?.()),()=>{q.current?.(),q.current=null}},[s,_,t,ee]),E(()=>{if(!_||t!==`context`||s)return;let e=T.current,n=O.current,r=n?.ownerDocument.defaultView;if(e&&n&&r)return $n(r,n,()=>{x.current&&T.current===e&&e.hasAttribute(`data-layer-anchored`)&&(Un(e),u.current?.())})},[_,t,s,ee,u]);let Je=(0,U.useCallback)((e,t)=>{let{placement:n=`above`,alignment:r=`center`,positioning:a=`anchor`,offset:o,role:c,"aria-label":l,xstyle:u,className:d,style:f,as:p=`div`,onMouseEnter:m,onMouseLeave:_}=t||{},v=cr(n),b=s&&a===`anchor`?St(n):``,x=a===`custom`?{positionAnchor:g}:{positionAnchor:g,positionTryFallbacks:b||v,...lr(n,r,y),...b?{alignSelf:gt(n)}:{}},S=o?Hn(o):null,C=a===`anchor`&&S!=null?{[rt]:S}:{},T=a===`anchor`?S==null?n===`above`?Z.farAbove:n===`below`?Z.farBelow:n===`start`?Z.farStart:Z.farEnd:n===`above`?Z.placementAbove(S):n===`below`?Z.placementBelow(S):n===`start`?Z.placementStart(S):Z.placementEnd(S):null,E=a===`anchor`?[Z.viewportFit,...ur(n,r,y)]:null,D=P(ue.reset,ie.reset,Z.base,fe.reset,Z.keyboardCap(Y==null?`100vh`:`${Y}px`,Y==null?`visible`:`auto`,Ue==null?`initial`:`${Ue}px`),s&&Z.scrollsOnOverflow,E,T,u),O=d?`${d} ${D.className??``}`:D.className;return(0,X.jsx)(or,{mountStore:M,renderLayer:t=>(0,X.jsx)(p,{ref:Ke,id:h,...a===`anchor`?{[tt]:``}:{},role:c,"aria-label":l,popover:i?`auto`:`manual`,className:O,style:{...D.style,...x,...a===`anchor`?qt(Le)??{"--_astryx-layer-lift":`0px`}:null,...C,...sn(w),...t.portalStyle,...f},onMouseEnter:m,onMouseLeave:_,...pe(),children:(0,X.jsx)(de,{children:e})}),sentinelRef:qe})},[g,w,h,y,s,Y,Ue,Le,i,M,Ke,qe]),Ye=(0,U.useCallback)((e,t)=>{let{x:n,y:r,xstyle:a,className:o,style:s}=t,c={top:r,left:n},l=P(ue.reset,ie.reset,Z.base,fe.reset,Z.keyboardCap(`100vh`,`visible`,`initial`),Z.fixed,a),u=o?`${o} ${l.className??``}`:l.className;return(0,X.jsx)(`div`,{ref:Ke,id:h,popover:i?`auto`:`manual`,className:u,style:{...l.style,...c,...s},...pe(),children:(0,X.jsx)(de,{children:e})})},[Ke,h,i]),Xe=(0,U.useMemo)(()=>({ref:je,anchorId:g,show:G,hide:De,isOpen:_,id:h,render:Je}),[je,g,G,De,_,h,Je]),Ze=(0,U.useMemo)(()=>({ref:void 0,show:G,hide:De,isOpen:_,id:h,render:Ye}),[G,De,_,h,Ye]);return t===`context`?Xe:Ze}function pr(e){return fr(e)}function mr(e){return fr(e)}var hr=o(`layer/outside-press/outside-dismissals`,1);function gr(e){hr.set(e,(hr.get(e)??0)+1)}function _r(e){return hr.get(e)??0}function vr(e,t,n,{pointerTypes:r,closesOnPan:i=!1,onPan:a,onPress:o,root:s=null}={}){let c=e.ownerDocument,l=i?void 0:a,u=i||l!=null,f=s==null?[]:v(s),p=!1,m=null,h=e=>r==null||r.includes(e.pointerType),g=()=>{p=!1,m=null,gr(c),n()},_=e=>{h(e)&&(!i||m==null||m.id===e.pointerId||e.isPrimary)&&(p=!t(e.composedPath()),o?.(!p),u&&(m=p?{id:e.pointerId,x:e.clientX,y:e.clientY}:null))},y=e=>{if(m?.id===e.pointerId&&Math.max(Math.abs(e.clientX-m.x),Math.abs(e.clientY-m.y))>=ee.hysteresis.value){if(l!=null){let t=Math.abs(e.clientX-m.x)>=Math.abs(e.clientY-m.y)?`x`:`y`,n=e.composedPath()[0];p=!1,m=null,d(n)&&k(n,t)&&l();return}g()}},b=e=>{if(l!=null||o!=null||!h(e)||i&&m?.id!==e.pointerId)return;let r=p;p=!1,m=null,r&&!t(e.composedPath())&&(gr(c),n())},x=null,S=e=>t=>{t===x||e!=null&&t.composedPath().includes(e)||(x=t,b(t))},C=S(f.at(-1)?.host??null),w=f.map(({root:e,host:t},n)=>({shadow:e,host:t,handleRootUp:S(n===0?null:f[n-1].host),handleHostUp:S(null)})),T=e=>{h(e)&&(i&&m?.id===e.pointerId?g():i||(p=!1,m=null))},E=[c,...f.map(({root:e})=>e)];for(let e of E)e.addEventListener(`pointerdown`,_,!0);let D=c.defaultView,O=u&&D!=null?A(D,`pointermove`,y):null;c.addEventListener(`pointerup`,C,!0);for(let{shadow:e,host:t,handleRootUp:n,handleHostUp:r}of w)e.addEventListener(`pointerup`,n,!0),t.addEventListener(`pointerup`,r);return c.addEventListener(`pointercancel`,T,!0),()=>{for(let e of E)e.removeEventListener(`pointerdown`,_,!0);O?.(),c.removeEventListener(`pointerup`,C,!0);for(let{shadow:e,host:t,handleRootUp:n,handleHostUp:r}of w)e.removeEventListener(`pointerup`,n,!0),t.removeEventListener(`pointerup`,r);c.removeEventListener(`pointercancel`,T,!0)}}function yr(){let e=(0,U.useRef)(null),t=(0,U.useCallback)(()=>{e.current?.(),e.current=null},[]),n=(0,U.useCallback)((t,n,r,i)=>{e.current?.(),e.current=vr(t,n,r,i)},[]);return(0,U.useEffect)(()=>t,[t]),(0,U.useMemo)(()=>({start:n,stop:t}),[n,t])}function br(e,t){for(let n=e;n!=null;n=n.parentNode??_(n))if(d(n)&&n.id===t)return!0;return!1}function xr(e,t,n){return e.some(e=>e===t||n!==``&&x(e)&&d(e)&&e.id===n)}function Sr(e,t,n){return x(e)&&(t?.contains(e)===!0||br(e,n))}var Cr=u(`layer/layer-surface-press/surfaces`,1);function wr(e){if(e==null)return;Cr.add(e);let t=e.parentElement;t?.hasAttribute(`popover`)&&Cr.add(t)}function Tr(e){return Cr.has(e)}function Er(e){return e.replace(/[\x00-\x1f\x7f]/g,``).trim()}function Dr(e){return e.toLowerCase().replace(/^([a-z][a-z\d+.-]*:) +/,`$1`)}function Or(e){let t=Er(e),n=Dr(t);return n.startsWith(`javascript:`)||n.startsWith(`vbscript:`)||n.startsWith(`data:text/html`)?null:t}function kr(e){return Or(e)!==null}function Ar(e){if(e==null)return!0;if(typeof e==`string`)return kr(e);if(typeof e!=`object`)return!1;let{pathname:t,href:n,protocol:r,host:i,hostname:a}=e;for(let e of[t,n,r,i,a])if(e!=null&&typeof e!=`string`)return!1;if(typeof t==`string`&&!kr(t)||typeof n==`string`&&!kr(n))return!1;if(typeof r==`string`&&r!==``){let e=Er(r),n=e.endsWith(`:`)?e:`${e}:`;if(!kr(n)||!kr(`${n}${i||a||``}${typeof t==`string`?t:``}`))return!1}return!0}var jr=`data-astryx-menu-press`,Mr={duration:`200ms`,easing:`cubic-bezier(0.42, 0, 0.58, 1)`},Nr={"--duration-fast-min":`130ms`,"--duration-fast":`175ms`,"--duration-fast-max":`230ms`,"--duration-medium-min":`310ms`,"--duration-medium":`410ms`,"--duration-medium-max":`550ms`,"--duration-slow-min":`730ms`,"--duration-slow":`975ms`,"--duration-slow-max":`1300ms`,"--duration-exit":`var(--duration-fast)`,"--ease-standard":`cubic-bezier(0.24, 1, 0.4, 1)`,"--ease-entrance":`cubic-bezier(0.24, 1, 0.4, 1)`,"--ease-move":`cubic-bezier(0.24, 1, 0.4, 1)`,"--ease-exit":`cubic-bezier(0.3, 0, 0.6, 0.6)`};function Pr(e,t,{jumps:n=!1}={}){let r=n=>e<=0||n>=e?1:t(Math.max(0,n)/e),i=Math.min(.001,e/100);return{duration:e,at:r,velocity:t=>{if(e<=0||t>=e)return 0;let a=Math.max(0,t-i),o=Math.min(e,t+i);if(!n)return(r(o)-r(a))/(o-a);let s=r(t),c=[];return t>a&&c.push((s-r(a))/(t-a)),o>t&&c.push((r(o)-s)/(o-t)),c.reduce((e,t)=>Math.abs(t)<Math.abs(e)?t:e)}}}function Fr(e){return O(`duration`,e.transitionDuration.split(`,`)[0]??``)}function Ir(e){return e.transitionTimingFunction.split(/,(?![^(]*\))/)[0]??``}function Lr(e){return p(Ir(e))}function Rr(e,t){let n=e.defaultView;if(typeof n?.Animation!=`function`||typeof n.KeyframeEffect!=`function`)return null;let r;try{r=new n.Animation(new n.KeyframeEffect(null,null,{duration:1e3,easing:t,fill:`both`}),null)}catch{return null}return e=>(r.currentTime=Math.min(1,Math.max(0,e))*1e3,r.effect?.getComputedTiming().progress??1)}function zr(e,{ms:t,points:n},r){if(t==null||t<=0)return null;if(n!=null)return Pr(t/1e3,f(n));let i=Rr(e,r);return i==null?null:Pr(t/1e3,i,{jumps:!0})}function Br(e,{duration:t,easing:n}){let r=t==null?null:O(`duration`,t),i=n==null?null:p(n),a=e.ownerDocument,o=a.defaultView,s=t!=null&&r==null,c=n!=null&&i==null;if(o==null||!s&&!c)return{ms:r,points:i};let l=a.createElement(`span`);l.style.setProperty(`display`,`none`,`important`);let u=(e,t)=>(l.style.setProperty(e,t,`important`),l.style.getPropertyValue(e)!==``),d=s&&u(`transition-duration`,t),f=c&&u(`transition-timing-function`,n);(a.body??a.documentElement).append(l);try{let e=o.getComputedStyle(l);return{ms:d?Fr(e):r,points:f?Lr(e):i}}finally{l.remove()}}function Vr(e,t){let n=e.getPropertyValue(t).trim();if(n!==``)return n;let r={};for(let[t,n]of Object.entries(Nr))r[t]=e.getPropertyValue(t).trim()||n;return ve(r)[t]??``}function Hr(e,{duration:t,easing:n}){let r=e.ownerDocument.defaultView?.getComputedStyle(e);return r==null?{ms:null,points:null}:Br(e,{duration:t==null?void 0:Vr(r,t),easing:n==null?void 0:Vr(r,n)})}function Ur(e,t){let n=e.ownerDocument.defaultView?.getComputedStyle(e);return n==null?null:Vr(n,t)}function Wr(e,t){let n=e.ownerDocument,r=n.defaultView?.getComputedStyle(e);if(r==null)return null;if(t!=null){let i=Vr(r,t.easing);return zr(n,Br(e,{duration:Vr(r,t.duration),easing:i}),i)}let i=Ir(r);return zr(n,{ms:Fr(r),points:p(i)},i)}var Gr=`data-astryx-press-box`,Kr=`[data-astryx-pressable]`,qr={[Gr]:``};function Jr(e,t){if(!(e instanceof Element))return null;let n=e.closest(`[${Gr}]`);return n instanceof HTMLElement&&t.contains(n)?n:null}function Yr(e){return Array.from(e.querySelectorAll(`[${Gr}]`)).filter(t=>t.closest(Kr)===e)}var Xr=`data-astryx-press-holds-drag`;function Zr(e){return e.hasAttribute(Xr)}var Qr=`data-astryx-press-group-item`;function $r(e){return{[Qr]:e.join(` `)}}function ei(e){return e.hasAttribute(Qr)}function ti(e,t=null){let n=e.closest(`[${Qr}]`);return n==null?!1:t==null||(n.getAttribute(Qr)??``).split(` `).includes(t)}var ni=`data-astryx-pressable`,ri=`data-astryx-press`,ii={[ni]:``},ai=`:disabled, [aria-disabled="true"]`,oi=new Set([`button`,`image`,`reset`,`submit`]),si=`[${jr}]`,Q={live:null},ci=null;function li(e){let t=ci;ci=null,t?.end(e)}var ui=null;function di(e){ui=e}var $={live:null},fi=0,pi=0,mi=null,hi=0,gi=null,_i={fade:oe,flash:100,onset:150};function vi(e){let t=Hr(e,{duration:`--duration-exit`}).ms??oe,n=typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches,r=O(`duration`,Mr.duration);return n&&r!=null?Math.min(t,r):t}function yi(e){return typeof e.getAnimations==`function`?e.getAnimations({subtree:!0}).filter(t=>{let n=t.effect,r=n?.target??null;return n==null||r==null||!(`animationName`in t)||r!==e&&r.closest(`[data-astryx-pressable]`)!==e||!Number.isFinite(Number(n.getComputedTiming().endTime))?!1:t.playState!==`finished`}):[]}function bi(e,t,n){let r=!0,i=setTimeout(()=>{let t=yi(e);t.length===0?n():Promise.allSettled(t.map(async e=>e.finished)).then(()=>{r&&n()})},t);return()=>{r=!1,clearTimeout(i)}}var xi={fade:`fadeEnd`,flash:`flashEnd`,onset:`onset`};function Si(e,t){t===`none`?e.removeAttribute(ri):e.getAttribute(`data-astryx-press`)!==t&&e.setAttribute(ri,t)}function Ci(e){e.live?.timer!=null&&(e.live.timer(),e.live.timer=null)}function wi(e,t,n=0){let r=e.live;if(r==null)return;let i=t.gesture.phase!==r.gesture.phase;if((t.timer!=null||i)&&Ci(e),r.gesture=t.gesture,Si(r.element,t.paint),t.gesture.phase===`idle`)e.live=null;else if(t.timer!=null){let i=t.timer,a=()=>{e.live!=null&&(e.live.timer=null),wi(e,B(e.live?.gesture??ce(),{kind:xi[i]}))};if(i===`fade`)r.timer=bi(r.element,vi(r.element),a);else{let e=i===`onset`?Math.max(0,_i.onset-n):_i[i],t=setTimeout(a,e);r.timer=()=>clearTimeout(t)}}}function Ti(e){if(!(e instanceof Element))return null;let t=e.closest(`[${ni}]`);return!(t instanceof HTMLElement)||t.matches(ai)||Se(t)?null:t}function Ei(e){return Date.now()-pi>=150?!1:mi instanceof Node&&mi.contains(e)}function Di(e){e.live?.gesture.phase===`dead`&&(Ci(e),e.live=null)}function Oi(e){let t=e.live;t!=null&&(Ci(e),t.element.removeAttribute(ri),e.live=null,e===$&&sa(!1))}function ki(e){Q.live?.element===e&&Oi(Q),$.live?.element===e&&Oi($)}function Ai(e,t){e.live?.element===t&&Oi(e)}function ji(){return typeof window.matchMedia==`function`&&window.matchMedia(`(pointer: coarse)`).matches}function Mi(e){let t=Ti(e);return t!=null&&Ni(t)}function Ni(e){return Yr(e).length>0}function Pi(e,t){let n=Ti(e);return n==null||n.closest(si)!=null||t!=null&&ti(n,`mouse`)||t==null&&n!==e?null:n}function Fi(e,t){Oi($);let n=Pi(e,t);n!=null&&(Ai(Q,n),$.live={element:n,gesture:ce(),pointerId:t,timer:null},sa(t==null),wi($,B($.live.gesture,{kind:`buttonDown`})))}function Ii(e){return Ni(e)&&!ji()&&typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function Li(){sa(!1),$.live!=null&&(Ii($.live.element)?Ri():wi($,B($.live.gesture,{kind:`up`})))}function Ri(){sa(!1),$.live!=null&&(wi($,B($.live.gesture,{kind:`cancel`})),Di($))}function zi(e){if(e.pointerType===`mouse`){(ji()?e.button===0:Ce(e)&&Mi(e.target))&&Fi(e.target,e.pointerId);return}if(e.pointerType===`pen`&&!Ce(e)&&Mi(e.target))return;if(ta(),li(!1),Q.live!=null){if(Q.live.gesture.phase!==`fading`&&Q.live.gesture.phase!==`flash`){Oi(Q);return}Oi(Q)}let t=Ti(e.target),n=e.pointerType===`pen`&&t!=null&&Ni(t),r=t!=null&&!n&&Ei(t);if(hi=Date.now(),gi=e.target instanceof Node?e.target:null,t==null||ti(t,e.pointerType))return;let i=ui?.start(t,e.target)??null,a=r?null:{element:t,gesture:ce(),pointerId:e.pointerId,timer:null};i!=null&&(ci={pointerId:e.pointerId,live:a,end:i}),a!=null&&(Ai($,t),Q.live=a,wi(Q,B(a.gesture,{kind:`down`,x:e.clientX,y:e.clientY,delayed:!n&&M(t)}),H(e.timeStamp,e)))}function Bi(e){let t=Q.live;t==null||t.pointerId!=null&&e.pointerId!==t.pointerId||Zr(t.element)||wi(Q,B(t.gesture,{kind:`move`,x:e.clientX,y:e.clientY}))}function Vi(e){if(e.pointerType===`mouse`){$.live!=null&&$.live.pointerId===e.pointerId&&Li();return}if(hi=Date.now(),e.target instanceof Node&&(gi=e.target),ci!=null&&ci.pointerId===e.pointerId){let e=ci.live;li(e!=null&&Q.live===e&&e.gesture.phase!==`dead`)}let t=Q.live;if(t==null||t.pointerId!=null&&e.pointerId!==t.pointerId)return;let n=e.pointerType===`pen`&&Ii(t.element)?`cancel`:`up`;wi(Q,B(t.gesture,{kind:n})),Di(Q)}function Hi(e){let t=e;if(t?.pointerType===`mouse`){$.live!=null&&$.live.pointerId===t.pointerId&&Ri();return}t?.pointerId!=null&&ci?.pointerId===t.pointerId&&li(!1);let n=Q.live;n!=null&&(wi(Q,B(n.gesture,{kind:`cancel`})),Di(Q))}function Ui(){Hi(),Ri()}function Wi(e){let t=e.target instanceof Node?e.target:document;Date.now()-hi<3e3&&gi!=null&&t.contains(gi)&&(pi=Date.now(),mi=t);let n=Q.live;n!=null&&(t===document||t.contains(n.element))&&Hi()}function Gi(e){return e instanceof HTMLButtonElement||e instanceof HTMLInputElement&&oi.has(e.type)}function Ki(e){return e instanceof Element&&ti(e)}function qi(e){e.key!==` `||e.repeat||e.isComposing||e.defaultPrevented||!Gi(e.target)||!(ji()||Ki(e.target))||Fi(e.target,null)}function Ji(e){e.key===` `&&$.live!=null&&$.live.pointerId==null&&Li()}function Yi(){$.live!=null&&$.live.pointerId==null&&Li()}function Xi(){document.visibilityState===`hidden`&&(li(!1),Oi(Q),Oi($))}var Zi=[],Qi=null,$i=null;function ea(e){e!==(Qi!=null)&&(e?Qi=A(window,`touchcancel`,Hi):(Qi?.(),Qi=null))}function ta(){$i??($i=S(window,ea),ea(T(window)))}function na(){Zi=[A(window,`pointerdown`,zi),A(window,`pointermove`,Bi),A(window,`pointerup`,Vi),A(window,`pointercancel`,Hi),A(window,`dragstart`,Ui),A(window,`scroll`,Wi),A(window,`visibilitychange`,Xi)],window.addEventListener(`keydown`,qi,aa)}function ra(){li(!1),ui?.endWaits();for(let e of Zi.splice(0))e();$i?.(),$i=null,ea(!1),window.removeEventListener(`keydown`,qi),sa(!1)}var ia={capture:!0,passive:!0},aa={passive:!0},oa=!1;function sa(e){e!==oa&&(oa=e,e?(window.addEventListener(`keyup`,Ji,aa),window.addEventListener(`blur`,Yi,ia)):(window.removeEventListener(`keyup`,Ji),window.removeEventListener(`blur`,Yi,ia)))}function ca(){if(typeof window>`u`)return()=>void 0;fi===0&&na(),fi+=1;let e=!1;return()=>{e||(e=!0,--fi,fi>0||(ra(),Oi(Q),Oi($),pi=0,mi=null,hi=0,gi=null))}}var la=`data-pressable-container`,ua=[`button`,`a`,`input`,`select`,`textarea`,`[role="button"]`,`[role="link"]`,`[role="checkbox"]`,`[role="radio"]`,`[role="switch"]`,`[role="tab"]`,`[role="menuitem"]`,`[role="option"]`,`[role="combobox"]`,`[role="listbox"]`,`[role="slider"]`,`[role="spinbutton"]`,`[${la}]`].join(`,`),da=`[aria-readonly="true"]`;function fa(e){return e.matches(ua)&&!e.matches(da)}function pa(e,t,n=fa){let r=e;for(;r!=null&&r!==t&&r!==document.body;){if(n(r))return r;r=r.parentElement}return null}function ma(e,t){return pa(e,t,ha)!=null}function ha(e){return fa(e)||Tr(e)}function ga(e,t,n){let r=e.target;t!=null&&(e.pointerType===`touch`||Yr(t).length!==0)&&r instanceof Element&&r!==e.currentTarget&&ma(r,t)&&n?.contains(r)!==!0&&ki(t)}function _a(e){if(typeof document>`u`||!(`getSelection`in document))return!1;let t=document.getSelection();return t==null||t.isCollapsed?!1:e.contains(t.anchorNode)}function va(e){let{containerRef:t}=e;return(0,U.useEffect)(()=>{let e=t.current;e&&e.setAttribute(la,`true`)},[t]),ya(e)}function ya({containerRef:e,interactiveRef:t,onClick:n,href:r,target:i,disabled:a=!1}){return{onClick:(0,U.useCallback)(o=>{if(a)return;let s=e.current;if(!s||_a(s))return;let c=o.target;if(c instanceof Element&&!(c!==o.currentTarget&&ma(c,s))&&(n?.(o),!o.defaultPrevented&&(r!=null&&kr(r)&&(i===`_blank`||o.ctrlKey||o.metaKey?window.open(r,`_blank`,`noopener`):t?.current?t.current.click():window.location.href=r),r==null&&n==null&&t?.current))){let e=new MouseEvent(`click`,{bubbles:o.bubbles,cancelable:o.cancelable,ctrlKey:o.ctrlKey,metaKey:o.metaKey,shiftKey:o.shiftKey,altKey:o.altKey,button:o.button});t.current.dispatchEvent(e),o.stopPropagation()}},[e,t,n,r,i,a]),onMouseUp:(0,U.useCallback)(t=>{if(a)return;let n=e.current;if(!n)return;let i=t.target;i instanceof Element&&t.button===1&&r!=null&&kr(r)&&(i===t.currentTarget||!ma(i,n))&&window.open(r,`_blank`,`noopener`)},[e,r,a]),onPointerDown:(0,U.useCallback)(n=>{a||ga(n,e.current,t?.current??null)},[e,t,a])}}function ba(e){if(e.getAttribute(`aria-disabled`)===`true`)return!0;try{return e.matches(`:disabled`)}catch{return!1}}function xa(e){let t=(0,U.useRef)(!1),n=e=>{t.current=Ke.has(e.pointerType)},r=e=>{t.current&&e.preventDefault(),t.current=!1};return e===`click`?{onPointerDown:n,onClick:r}:{onPointerDown:n,onMouseDown:r}}var Sa=new Set([`button`,`checkbox`,`combobox`,`link`,`menuitem`,`menuitemcheckbox`,`menuitemradio`,`option`,`radio`,`searchbox`,`slider`,`spinbutton`,`switch`,`tab`,`textbox`]);function Ca(e){if(ba(e))return!1;let t=e.getAttribute(`role`);if(t!=null&&t!==``)return Sa.has(t);switch(e.tagName){case`LABEL`:{let t=e.control;return t==null||!ba(t)}case`BUTTON`:case`INPUT`:case`SELECT`:case`SUMMARY`:case`TEXTAREA`:return!0;case`A`:case`AREA`:return e.hasAttribute(`href`);default:return Ea(e)}}function wa(e){if(ba(e))return!0;if(e.tagName===`LABEL`){let t=e.control;return t!=null&&ba(t)}return!1}function Ta(e){let t=pa(e,null,e=>fa(e)||e.tagName===`LABEL`||ba(e));return t!=null&&wa(t)}function Ea(e){if(e.isContentEditable===!0)return!0;let t=e.getAttribute(`contenteditable`);return t!=null&&t!==`false`}function Da(e){let t=Oa(e);return{isTouchPointerRef:t.isTouchPointerRef,isTouchInteraction:t.isTouchInteraction,handlePointerEnter:t.handlePointerEnter,handlePointerDown:t.handlePointerDown,clearTapOpen:t.clearTapOpen}}function Oa(e,t,n=!1){let{touchTrigger:r,isEnabled:i,isControlled:a,isOpen:o,layerId:s,triggerRef:c,show:l,hide:u}=e,f=(0,U.useRef)(!1),p=te(u),m=te(s),h=te(t),g=(0,U.useRef)(!1),_=(0,U.useRef)(null),v=(0,U.useRef)([]),y=qe();le(c);let x=(0,U.useCallback)(()=>{g.current=!1;let e=_.current;if(e!=null){_.current=null;for(let t of v.current)t.removeEventListener(`pointerup`,e,!0),t.removeEventListener(`pointercancel`,e,!0);v.current=[]}},[]),S=(0,U.useCallback)(()=>{if(g.current=!0,_.current!=null)return;let e=c.current?.ownerDocument??document,t=e===document?[document]:[document,e],n=e=>{let n=e.target;if(n!=null){if(e.type===`pointerup`&&c.current?.contains(n)===!0)return;if(t.some(e=>e.getElementById(m.current)?.contains(n)===!0)){e.type===`pointerup`&&h.current?.();return}}x(),n!=null&&gr(n.ownerDocument??document),p.current()};_.current=n,v.current=t;for(let e of t)e.addEventListener(`pointerup`,n,!0),e.addEventListener(`pointercancel`,n,!0)},[c,x,p,m,h]);(0,U.useEffect)(()=>x,[x]);let C=(0,U.useCallback)(()=>f.current&&I(c.current),[c]),w=(0,U.useCallback)(e=>{f.current=e.pointerType===`touch`},[]),T=te(e=>{let t=c.current,a=d(e?.target)?e.target:null;if(n&&a!=null&&b(t)){let e=ae(a,t);if(e!=null&&e!==t&&!Ta(a))return}(r===`auto`?a!=null&&Ta(a)?`tap`:t!=null&&Ca(t)?`none`:`tap`:r)===`none`||!i||o||g.current?(x(),u()):(S(),l())}),E=(0,U.useCallback)(e=>{let t=Ke.has(e.pointerType);if(f.current=t,!t||a)return y.forget(),!1;let n=e.currentTarget instanceof Element?e.currentTarget:c.current;return y.press(e,n,e=>T.current(e)),!0},[a,c,y,T]),D=(0,U.useRef)(o);return(0,U.useEffect)(()=>{D.current&&!o&&x(),D.current=o},[o,x]),{isTouchPointerRef:f,isTouchInteraction:C,handlePointerEnter:w,handlePointerDown:E,clearTapOpen:x,armOutsideDismiss:S,answerTap:(0,U.useCallback)(e=>T.current(e),[T])}}var ka=`[role="log"], [role="status"], [role="alert"], [aria-live="polite"], [aria-live="assertive"]`,Aa=`[aria-hidden="true"], [hidden]`,ja=`p, div, li, br, h1, h2, h3, h4, h5, h6`;function Ma(e,t){return Array.from(e.childNodes).map(e=>{if(e.nodeType===Node.TEXT_NODE)return(e.textContent??``).replace(/\s+/g,` `).trim();if(e.nodeType===Node.ELEMENT_NODE){let n=e;return n.matches(Aa)||t!=null&&n.matches(t)?``:Na(n,t)}return``}).filter(e=>e!==``).join(` `)}function Na(e,t){let n=e.ownerDocument.defaultView,r=e=>n?.getComputedStyle(e).display??``,i=[],a=(e,n)=>{if(e.nodeType===Node.TEXT_NODE){i.push(e.textContent??``);return}if(e.nodeType!==Node.ELEMENT_NODE)return;let o=e;if(o.matches(Aa)||t!=null&&o.matches(t))return;let s=r(o),c=o.matches(ja)||s!==``&&s!==`contents`&&!s.startsWith(`inline`)||/\b(flex|grid)\b/.test(n);c&&i.push(` `),o.childNodes.forEach(e=>a(e,s)),c&&i.push(` `)},o=r(e);return e.childNodes.forEach(e=>a(e,o)),i.join(``).replace(/\s+/g,` `).trim()}function Pa(e,t,n,{skipFirstRender:r=!1,politeness:i=`polite`,fallbackText:a,announce:o,exclude:s}={}){let c=V(),l=o??c,u=(0,U.useRef)(null),d=z(),[f]=(0,U.useState)(()=>d||document.readyState!==`complete`),p=(0,U.useRef)(!0);(0,U.useEffect)(()=>{let o=p.current;p.current=!1;let c=e.current;if(!t||c?.closest(Aa)||c?.checkVisibility?.()===!1){u.current=null;return}if(!c||r&&c.parentElement?.closest(ka))return;let d=r?Ma(c,s):Na(c,s);if(d===``&&a!==void 0&&(d=(c.getAttribute(`aria-labelledby`)??``).split(/\s+/).map(e=>{let t=c.ownerDocument.getElementById(e);return t==null?``:Na(t)}).join(` `).replace(/\s+/g,` `).trim()||a),d===``)return;let m=`${n}\u0000${d}`;if(u.current===m)return;u.current=m;let h=o&&f||document.readyState!==`complete`;r&&h||l(d,i)})}`${i[`--spacing-2`]}${i[`--spacing-2`]}`,l[`--duration-fast-max`],Mr.duration,y[`--ease-standard`];var Fa={below:{kKVMdj:`x1d5jn3a x2g3n7u xaqowwx`,k44tkh:`x9uej1z x10got5w`,kyAemX:`x128ha8g`,kWV6AL:`xskzprw`,k3nNDw:`x9r0mi6`,$$css:!0},above:{kKVMdj:`xksu0ym x2g3n7u xaqowwx`,k44tkh:`x9uej1z x10got5w`,kyAemX:`x128ha8g`,kWV6AL:`xskzprw`,k3nNDw:`x9r0mi6`,$$css:!0},end:{kKVMdj:`xyzx0um xixcm9l x2g3n7u xaqowwx`,k44tkh:`x9uej1z x10got5w`,kyAemX:`x128ha8g`,kWV6AL:`xskzprw`,k3nNDw:`x9r0mi6`,$$css:!0},start:{kKVMdj:`x1qqotkc x1g7o29q x2g3n7u xaqowwx`,k44tkh:`x9uej1z x10got5w`,kyAemX:`x128ha8g`,kWV6AL:`xskzprw`,k3nNDw:`x9r0mi6`,$$css:!0}};function Ia(e){return e.localName===`input`?!R.has((e.getAttribute(`type`)??`text`).toLowerCase()):e.matches(`textarea, [contenteditable]:not([contenteditable="false"])`)}var La=100,Ra={container:{kWkggS:`xenstv7`,kMwMTN:`xrkvqaz`,kaIpWk:`x1hviunn`,kMv6JI:`x9ynric`,kGuDYH:`xjm74w1`,kLWn49:`xw6l6zx`,$$css:!0}};function za(e={}){let{placement:t=`above`,alignment:n=`center`,delay:r=200,hideDelay:a=0,focusTrigger:o=`auto`,touchTrigger:s=`auto`,isEnabled:c=!0,isOpen:l,isDefaultOpen:u=!1,onShow:d,onHide:f}=e,{ref:p,anchorId:m,show:h,hide:g,isOpen:_,id:v,render:y}=mr({mode:`context`,onShow:d,onHide:f,keepsAnchorClear:!0}),b=Ra.container,x=(0,U.useRef)(null),S=(0,U.useRef)(null),C=(0,U.useRef)(null),w=(0,U.use)(Te),T=(0,U.useRef)(0);c||(T.current+=1);let D=(0,U.useCallback)(()=>{x.current&&=(clearTimeout(x.current),null),S.current&&=(clearTimeout(S.current),null)},[]),O=(0,U.useCallback)(()=>{D(),h()},[D,h]),k=(0,U.useCallback)(()=>{D(),g()},[D,g]),A=te({isOpen:l,isLayerOpen:_,onShow:d,onHide:f}),j=(0,U.useRef)(!1),[M,ee]=(0,U.useState)(!1),N=(0,U.useCallback)(e=>{j.current=e,ee(e)},[]),P=(0,U.useRef)(!1),F=(0,U.useRef)(!1),re=(0,U.useCallback)(()=>{P.current&&j.current&&(P.current=!1,N(!1))},[N]),I=(0,U.useCallback)(()=>{if(j.current){N(!1);let e=A.current;if(e.isOpen!==void 0){e.onHide?.();return}}k()},[N,k,A]),{isTouchPointerRef:ie,isTouchInteraction:ae,handlePointerEnter:oe,handlePointerDown:se,clearTapOpen:ce,armOutsideDismiss:L,answerTap:le}=Oa({touchTrigger:s,isEnabled:c,isControlled:l!==void 0,isOpen:_,layerId:v,triggerRef:C,show:O,hide:I},re,!0),R=(0,U.useCallback)(()=>{let e=A.current;return j.current&&e.isLayerOpen&&e.isOpen!==!1},[A]),ue=(0,U.useCallback)(()=>{ce(),N(!1);let e=A.current;e.isOpen===void 0?k():e.onHide?.()},[ce,N,k,A]),de=(0,U.useCallback)(()=>{j.current&&N(!1)},[N]),fe=(0,U.useCallback)(e=>{if(!R())return;let t=e.relatedTarget,n=C.current,r=n?.ownerDocument.defaultView;if(r==null||!(t instanceof r.Node))return;let i=n?.ownerDocument.getElementById(v)??null;n?.contains(t)!==!0&&i?.contains(t)!==!0&&(gr(r.document),ue())},[R,v,ue]),pe=M&&_&&l!==!1,z=(0,U.useRef)(null);Pa(z,pe,`pinned`);let _e=me(z,wr),ve=(0,U.useCallback)(()=>{if(!c||l===!1)return;D();let e=T.current;x.current=setTimeout(()=>{T.current===e&&h()},r)},[c,l,D,h,r]),B=(0,U.useCallback)(()=>{l===!0||R()||(D(),S.current=setTimeout(()=>{g()},a>0?a:La))},[l,R,D,g,a]),ye=(0,U.useCallback)(()=>{S.current&&=(clearTimeout(S.current),null)},[]),be=(0,U.useCallback)(()=>{ie.current||ve()},[ie,ve]),xe=(0,U.useCallback)(e=>{if(ie.current)return;let t=e.relatedTarget,n=t==null?null:t.ownerDocument?.getElementById(v);n!=null&&n.contains(t)||B()},[ie,v,B]),[V]=(0,U.useState)(De),H=(0,U.useCallback)((e,t)=>t!=null&&!G(e,t,o)||!Ia(e)&&he(e)===`pointer`?!1:!ae()&&e.matches(`:focus-visible`),[o,ae]),Se=(0,U.useCallback)(e=>{if(!V.focusIn(e,o)||!c||!H(e.target,null))return;D();let t=A.current;t.isOpen===!1?t.onShow?.():h()},[V,o,c,H,D,h,A]),Ce=(0,U.useCallback)(e=>{V.focusOut(e,o)&&B()},[V,o,B]),we=(0,U.useRef)(!1),W=(0,U.useRef)(null),Ee=(0,U.useCallback)(()=>{W.current?.();let e=C.current?.ownerDocument.defaultView;if(e==null)return;we.current=!0;let t=C.current,n=r=>{r?.type===`pointerup`&&r.target instanceof e.Node&&t?.contains(r.target)===!0&&(P.current=!1),e.removeEventListener(`pointerup`,n,!0),e.removeEventListener(`pointercancel`,n,!0),we.current=!1,W.current=null};e.addEventListener(`pointerup`,n,!0),e.addEventListener(`pointercancel`,n,!0),W.current=n},[]),Oe=(0,U.useCallback)(e=>{Ee(),j.current?F.current&&(P.current=!0):se(e)?x.current&&=(clearTimeout(x.current),null):l===void 0&&(D(),g())},[se,Ee,l,D,g]),K=te({handleMouseEnter:be,handleMouseLeave:xe,handleFocusIn:Se,handleFocusOut:Ce,handleHeldFocusOut:fe,handlePointerEnter:oe,handlePointerDown:Oe,focusTrigger:o,isEnabled:c,isOpen:l,dropHold:de,hideNow:k,showNow:O,opensOnFocus:H,presentInterest:w,answerTap:le}),ke=(0,U.useRef)(null),Ae=(0,U.useRef)(!1),q=(0,U.useRef)(!1),je=(0,U.useCallback)(()=>{if(!q.current)return;q.current=!1;let e=K.current;!e.isEnabled&&e.isOpen===void 0&&(Ae.current=!0,e.dropHold(),e.hideNow())},[K]);E(()=>{je()});let Me=(0,U.useCallback)(e=>{if(e==null){ke.current?.();return}if(e===C.current)return;ke.current?.();let t=()=>K.current,n=e=>t().handlePointerEnter(e),r=()=>t().handleMouseEnter(),i=e=>t().handleMouseLeave(e),a=e=>t().handlePointerDown(e),o=e=>{t().focusTrigger!==`never`&&t().handleFocusIn(e)},s=e=>{t().focusTrigger!==`never`&&t().handleFocusOut(e)},c=e=>t().handleHeldFocusOut(e);e.addEventListener(`pointerenter`,n),e.addEventListener(`mouseenter`,r),e.addEventListener(`mouseleave`,i),e.addEventListener(`pointerdown`,a),e.addEventListener(`focusin`,o),e.addEventListener(`focusout`,s),e.addEventListener(`focusout`,c),C.current=e;let l=e.ownerDocument.activeElement,u=Ae.current;t().isEnabled&&(Ae.current=!1),u&&t().isEnabled&&t().isOpen===void 0&&t().focusTrigger!==`never`&&l instanceof HTMLElement&&e.contains(l)&&t().opensOnFocus(l,e)&&t().showNow();let d=t().presentInterest?.current,f=d==null||d.isRead?null:d.interest,p=d?.tapEvent??null;d!=null&&(d.isRead=!0),t().isEnabled&&t().isOpen===void 0&&(f===`hover`?t().handleMouseEnter():f===`tap`?t().answerTap(p):f===`focus`&&t().focusTrigger!==`never`&&l instanceof HTMLElement&&e.contains(l)&&t().opensOnFocus(l,e)&&t().showNow());let m=()=>{ke.current===m&&(ke.current=null),e.removeEventListener(`pointerenter`,n),e.removeEventListener(`mouseenter`,r),e.removeEventListener(`mouseleave`,i),e.removeEventListener(`pointerdown`,a),e.removeEventListener(`focusin`,o),e.removeEventListener(`focusout`,s),e.removeEventListener(`focusout`,c),W.current?.(),C.current===e&&(C.current=null),q.current=!0,queueMicrotask(je)};return ke.current=m,m},[K,je]),Ne=(0,U.useCallback)(e=>{p(e);let t=Me(e);if(e!=null)return()=>{t?.(),p(null)}},[p,Me]);return(0,U.useEffect)(()=>()=>{D()},[D]),(0,U.useEffect)(()=>{u&&h()},[]),(0,U.useEffect)(()=>{l!==void 0&&(l?(D(),h()):(D(),de(),g()))},[l,D,h,g,de]),ge({isActive:!0,isPresent:()=>{let e=typeof document>`u`?null:document.getElementById(v);if(e==null)return!1;try{return e.matches(`:popover-open`)}catch{return _}},onDismiss:()=>{D(),ce(),de(),l===void 0?g():f?.()}}),{ref:Ne,positionRef:p,interactionRef:Me,anchorId:m,describedBy:v,renderTooltip:(0,U.useCallback)((e,r)=>{let a=r?.placement??t,o={placement:a,alignment:r?.alignment??n,offset:i[`--spacing-1`],role:`tooltip`,xstyle:[b,Fa[a]],className:ne(`tooltip`).className,onMouseEnter:ye,onMouseLeave:B};return y((0,X.jsx)(`div`,{ref:_e,className:`xfsso4q xy143xn x12gdq22 x1djylfy xw5ewwj x13faqbe`,children:e}),o)},[y,t,n,b,ye,B,_e]),show:(0,U.useCallback)(()=>{if(D(),!c)return;N(!0),L(),P.current=we.current,F.current=!0,C.current?.ownerDocument.defaultView?.setTimeout(()=>{F.current=!1},0);let e=A.current;e.isOpen===void 0?h():e.onShow?.()},[D,c,N,L,h,A]),hide:(0,U.useCallback)(()=>{D(),ue()},[D,ue])}}export{_r as A,Ut as B,Mr as C,Sr as D,wr as E,mr as F,Ue as G,et as H,tn as I,Te as J,qe as K,rn as L,vr as M,dr as N,xr as O,pr as P,Gt as R,Ur as S,Ar as T,We as U,Wt as V,ze as W,$r as _,Da as a,Pr as b,va as c,ki as d,di as f,ei as g,ii as h,xa as i,yr as j,gr as k,ya as l,vi as m,Fa as n,la as o,ca as p,De as q,Pa as r,ga as s,za as t,ri as u,Jr as v,jr as w,Wr as x,qr as y,Ht as z};
|