@cmmd-center/forge 0.13.128 → 0.13.130

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.
Files changed (57) hide show
  1. package/dist/bin.cjs +3 -2
  2. package/dist/bin.mjs +27 -26
  3. package/dist/client/assets/CanvasPanel-BBU-hosR.js +441 -0
  4. package/dist/client/assets/CompositeItem-DTyKsv13.js +2 -0
  5. package/dist/client/assets/CompositeList-Bc8TYCyy.js +2 -0
  6. package/dist/client/assets/DiffPanel-Mun9aNQu.js +64 -0
  7. package/dist/client/assets/{DiffPanel.logic-CaiJLSzy.js → DiffPanel.logic-64OYDD5i.js} +2 -2
  8. package/dist/client/assets/DiffWorkerPoolProvider-BWe6U2yc.js +74 -0
  9. package/dist/client/assets/PullRequestCodePanel-BB0oFGFq.js +5 -0
  10. package/dist/client/assets/ThemeEditorPanel-DHyAZtjN.js +2 -0
  11. package/dist/client/assets/Virtualizer-IjnQIg2n.js +2 -0
  12. package/dist/client/assets/{WorkerPoolContext-DE6P0yOd.js → WorkerPoolContext-CsSzcB1w.js} +46 -46
  13. package/dist/client/assets/canvasStateStore-DYt9MgFu.js +2 -0
  14. package/dist/client/assets/chevron-left-1XbEOuXj.js +2 -0
  15. package/dist/client/assets/chevron-right-DAF000Jz.js +2 -0
  16. package/dist/client/assets/{cmmdAuthRedirect-BUp02n05.js → cmmdAuthRedirect-B2FNK6pk.js} +2 -2
  17. package/dist/client/assets/{cmmdForgeRuntimeListResource-DokzffFK.js → cmmdForgeRuntimeListResource-Cq3OVsLZ.js} +9 -9
  18. package/dist/client/assets/{currentForgeWorkspaceStore-DANo4KV4.js → currentForgeWorkspaceStore-wQ-H1MIm.js} +2 -2
  19. package/dist/client/assets/debouncer-BEV7Iuwb.js +2 -0
  20. package/dist/client/assets/dialog-mwxYKYq-.js +2 -0
  21. package/dist/client/assets/getPseudoElementBounds-DJTX-eyW.js +2 -0
  22. package/dist/client/assets/index-MArBFUuB.js +301 -0
  23. package/dist/client/assets/index-whRqBJFC.css +1 -0
  24. package/dist/client/assets/minus-_j91i8bf.js +2 -0
  25. package/dist/client/assets/popover-BMHhFoom.js +2 -0
  26. package/dist/client/assets/react-D4GEJ3ir.js +2 -0
  27. package/dist/client/assets/scroll-area-9mmf9iy-.js +2 -0
  28. package/dist/client/assets/sidebarV2CustomSnoozeDialog-vLvqIwRU.js +2 -0
  29. package/dist/client/assets/{src-CFUzoLms.js → src-DICOHE3E.js} +2 -2
  30. package/dist/client/assets/switch-DpGoyzXB.js +2 -0
  31. package/dist/client/assets/themePalette-BII_gGLK.js +5 -0
  32. package/dist/client/assets/{toggle-CYJl9GZL.js → toggle-CiTk7ztA.js} +2 -2
  33. package/dist/client/assets/toggle-group-B0GQb1vL.js +2 -0
  34. package/dist/client/assets/tooltip-DlvXFVEM.js +2 -0
  35. package/dist/client/assets/useOpenInteractionType-KsRrk6uH.js +2 -0
  36. package/dist/client/assets/{utils-BQ72yH0H.js → utils-BWD4ATf-.js} +2 -2
  37. package/dist/client/index.html +29 -20
  38. package/dist/forge-build.json +1 -1
  39. package/dist/{open-yHTUkd2Y.mjs → open-2-reBrpv.mjs} +3 -3
  40. package/package.json +1 -1
  41. package/dist/client/assets/CanvasPanel-j0yQxyEH.js +0 -441
  42. package/dist/client/assets/CompositeItem-BxPZ_9BJ.js +0 -2
  43. package/dist/client/assets/DiffPanel-DW-4nhXm.js +0 -64
  44. package/dist/client/assets/DiffWorkerPoolProvider-DDV64q8E.js +0 -74
  45. package/dist/client/assets/PullRequestCodePanel-CPhvQnl6.js +0 -5
  46. package/dist/client/assets/ThemeEditorPanel-DCsxTx0Q.js +0 -2
  47. package/dist/client/assets/Virtualizer-C5HhtAFY.js +0 -2
  48. package/dist/client/assets/canvasStateStore-DKtQcBVc.js +0 -2
  49. package/dist/client/assets/debouncer-BmyJL8Gi.js +0 -2
  50. package/dist/client/assets/index-Bo3YIsVh.js +0 -169
  51. package/dist/client/assets/index-jrCMls69.css +0 -1
  52. package/dist/client/assets/popover-lOfV58pL.js +0 -2
  53. package/dist/client/assets/scroll-area-BxupGCij.js +0 -2
  54. package/dist/client/assets/switch-wFSVBlXv.js +0 -2
  55. package/dist/client/assets/themePalette-NfQV9Yfl.js +0 -5
  56. package/dist/client/assets/toggle-group-DB8Zelac.js +0 -2
  57. package/dist/client/assets/useOpenInteractionType-B983ff5H.js +0 -2
@@ -1,2 +1,2 @@
1
- import{n as e,r as t}from"./rolldown-runtime-hePW80VL.js";import{Wa as n}from"./Stream-mUTFnSY9.js";import{E as r,O as i,T as a,l as o,n as s}from"./cmmdForgeRuntimeListResource-DokzffFK.js";import{m as ee}from"./cmmdAuthRedirect-BUp02n05.js";var c=t(n(),1),l=`forge:cmmd-work-intake-cache:v1`,u=`forge:cmmd-work-intake-eviction:v1`,te=`forge:cmmd-work-intake-project-eviction:v1:`,d=1,f=1;function p(){if(typeof window>`u`)return null;try{return window.localStorage}catch{return null}}function m(e){return typeof e==`object`&&!!e}function h(e){return e==null||typeof e==`string`}function g(e){if(!e)return null;try{let t=JSON.parse(e);return t.version!==d||typeof t.cachedAt!=`string`||!m(t.intake)||!h(t.evictionGeneration)?null:t}catch{return null}}function ne(e){let t=Array.isArray(e.projectIds)?e.projectIds.filter(e=>typeof e==`string`&&e.length>0):[],n=e.projectId,r=t.length===0&&typeof n==`string`&&n.length>0?[n]:t;return[...new Set(r)]}function _(e){if(!e)return null;try{let t=JSON.parse(e);if(t.version!==f||typeof t.generation!=`string`||t.generation.length===0)return null;let n=ne(t);return n.length===0?null:{version:f,generation:t.generation,projectIds:[...new Set(n)]}}catch{return null}}function v(e){return`${te}${encodeURIComponent(e)}`}function y(e){if(!e)return null;try{let t=JSON.parse(e);return t.version!==f||typeof t.generation!=`string`||t.generation.length===0||typeof t.projectId!=`string`||t.projectId.length===0?null:t}catch{return null}}function re(e,t){if(e===l&&t===null)return{kind:`cache_removed`};if(e===`forge:cmmd-work-intake-eviction:v1`){let e=_(t);return e?{kind:`projects_removed`,projectIds:e.projectIds}:{kind:`malformed`}}if(e?.startsWith(`forge:cmmd-work-intake-project-eviction:v1:`)){let e=y(t);return e?{kind:`projects_removed`,projectIds:[e.projectId]}:{kind:`malformed`}}return{kind:`unrelated`}}function b(e){let t=new Set(_(e.getItem(`forge:cmmd-work-intake-eviction:v1`))?.projectIds??[]);if(typeof e.length==`number`&&typeof e.key==`function`)for(let n=0;n<e.length;n+=1){let r=e.key(n);if(!r?.startsWith(`forge:cmmd-work-intake-project-eviction:v1:`))continue;let i=y(e.getItem(r));i&&t.add(i.projectId)}return[...t].toSorted()}function x(e,t=p()){if(!t)return e;try{let n=new Set(b(t));return n.size===0?e:{...e,projects:e.projects.filter(e=>!n.has(e.id)),tasks:e.tasks.filter(e=>e.projectId===null||!n.has(e.projectId))}}catch{return e}}function S(e=p()){if(!e)return null;try{let t=_(e.getItem(u)),n=b(e);return!t&&n.length===0?null:`${t?.generation??`project-tombstones`}:${n.join(`,`)}`}catch{return null}}function ie(e,t=p()){if(!(!t||e.length===0))try{let n=new Set(e),r=b(t).filter(e=>!n.has(e));for(let e of n)t.removeItem(v(e));r.length===0?t.removeItem(u):t.setItem(u,JSON.stringify({version:f,generation:C(),projectIds:r}))}catch{}}function C(){return typeof globalThis.crypto?.randomUUID==`function`?globalThis.crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`}function w(e=Date.now(),t=p()){if(!t)return{state:`missing`,record:null};let n=g(t.getItem(l));if(!n||(n.evictionGeneration??null)!==S(t))return{state:`missing`,record:null};let r={...n,intake:x(n.intake,t)},i=Date.parse(r.cachedAt);if(!Number.isFinite(i))return{state:`expired`,record:null};let a=Math.max(0,e-i);return a<=12e4?{state:`fresh`,record:r}:a<=3e5?{state:`stale`,record:r}:{state:`expired`,record:null}}function T(e,t,n=new Date,r=p()){if(!r||S(r)!==t)return!1;let i={version:d,cachedAt:n.toISOString(),intake:x(e,r),evictionGeneration:t};try{return r.setItem(l,JSON.stringify(i)),S(r)===t||(r.removeItem(l),!1)}catch{return!1}}function E(e,t=p()){if(t)try{let n=b(t),r={version:f,generation:C(),projectId:e};for(let e of n){let n=v(e);t.getItem(n)||t.setItem(n,JSON.stringify({version:f,generation:C(),projectId:e}))}t.setItem(v(e),JSON.stringify(r));let i={version:f,generation:C(),projectIds:b(t)};t.setItem(u,JSON.stringify(i));let a=S(t),o=g(t.getItem(l));if(!o)return;t.setItem(l,JSON.stringify({...o,evictionGeneration:a,intake:x(o.intake,t)})),S(t)!==a&&t.removeItem(l)}catch{try{t.removeItem(l)}catch{}}}var D={connected:!1,isLoading:!1,error:null,source:null,fetchedAt:null,workspace:null,identity:null,campaigns:[],projects:[],tasks:[],workspaces:[],refetchRequestedAt:null,authoritativeRefetchRequested:!1},O=D,k=0,A=new Set;function j(e){O=e;for(let e of A)e()}function M(e){j(e(O))}function N(e){j({connected:e.connected,isLoading:!1,error:null,source:e.source,fetchedAt:e.fetchedAt,workspace:e.workspace,identity:e.identity,campaigns:e.campaigns,projects:e.projects,tasks:e.tasks,workspaces:e.workspaces,refetchRequestedAt:O.refetchRequestedAt,authoritativeRefetchRequested:O.authoritativeRefetchRequested??!1})}function P(e){return A.add(e),()=>A.delete(e)}function F(){return O}function ae(){return(0,c.useSyncExternalStore)(P,F,F)}var I={clear(){k+=1,j(D)},beginDataRequest(){return k+=1,k},isDataVersionCurrent(e){return k===e},requestRefetch(e={}){M(t=>({...t,refetchRequestedAt:Math.max(Date.now(),(t.refetchRequestedAt??0)+1),authoritativeRefetchRequested:e.authoritative===!0}))},setBackgroundRefreshError(e){M(t=>({...t,error:e,isLoading:!1}))},setData(e){N(e)},setDataIfCurrent(e,t){return k===t&&(N(e),!0)},setError(e){j({...D,error:e})},setLoading(e){M(t=>({...t,isLoading:e,error:null}))},patchTask(e,t){M(n=>({...n,tasks:n.tasks.map(n=>n.id===e?{...n,...t}:n)}))},patchTasks(e,t){if(e.length===0)return;let n=new Set(e);M(e=>({...e,tasks:e.tasks.map(e=>n.has(e.id)?{...e,...t}:e)}))},replaceTasks(e){M(t=>({...t,tasks:e}))},patchProject(e,t){M(n=>({...n,projects:n.projects.map(n=>n.id===e?{...n,...t}:n)}))},removeProject(e){k+=1,E(e),M(t=>({...t,projects:t.projects.filter(t=>t.id!==e),tasks:t.tasks.filter(t=>t.projectId!==e)}))},applyExternalProjectRemovals(e){k+=1;let t=new Set(e);M(e=>({...e,projects:e.projects.filter(e=>!t.has(e.id)),tasks:e.tasks.filter(e=>e.projectId===null||!t.has(e.projectId))}))}},L=`forge:command-center:workspace-filter`,R=`forge:command-center:workspace-filter-updated`;function z(e){if(typeof e!=`string`)return null;let t=e.trim();return t.length>0?t:null}function B(){return z(a(L))}function V(e){if(typeof window>`u`)return;let t=z(e);t===null?r(L):i(L,t),window.dispatchEvent(new CustomEvent(R,{detail:{workspaceId:t}}))}function H(e){if(typeof window>`u`)return()=>{};let t=t=>{t.key===L&&e(z(t.newValue))},n=t=>{e(z(t.detail?.workspaceId??null))};return window.addEventListener(`storage`,t),window.addEventListener(R,n),()=>{window.removeEventListener(`storage`,t),window.removeEventListener(R,n)}}var U=e({getCurrentForgeWorkspaceId:()=>X,seedCurrentForgeWorkspaceId:()=>Z,switchCurrentForgeWorkspaceId:()=>Q,useCurrentForgeWorkspaceState:()=>$}),W=`forge:current-workspace-id`;function G(){let e=a(W);if(e===null||!/^\d+$/.test(e))return null;let t=Number.parseInt(e,10);return Number.isSafeInteger(t)&&t>0?t:null}var K={workspaceId:G(),switchGeneration:0},q=new Set;function J(e){K=e;for(let e of q)e()}function Y(){return K}function X(){return K.workspaceId}function oe(e){return q.add(e),()=>q.delete(e)}function Z(e){if(K.workspaceId===e)return;let t=K.workspaceId!==null;i(W,String(e)),t&&(o(),s()),J({...K,workspaceId:e})}function Q(e){ee()||K.workspaceId!==e&&(i(W,String(e)),o(),s(),V(null),J({workspaceId:e,switchGeneration:K.switchGeneration+1}),I.requestRefetch({authoritative:!0}))}function $(){return(0,c.useSyncExternalStore)(oe,Y,Y)}export{T as _,$ as a,V as c,P as d,ae as f,S as g,w as h,Q as i,I as l,re as m,X as n,B as o,ie as p,Z as r,H as s,U as t,F as u};
2
- //# sourceMappingURL=currentForgeWorkspaceStore-DANo4KV4.js.map
1
+ import{n as e,r as t}from"./rolldown-runtime-hePW80VL.js";import{Wa as n}from"./Stream-mUTFnSY9.js";import{E as r,O as i,T as a,l as o,n as s}from"./cmmdForgeRuntimeListResource-Cq3OVsLZ.js";import{m as ee}from"./cmmdAuthRedirect-B2FNK6pk.js";var c=t(n(),1),l=`forge:cmmd-work-intake-cache:v1`,u=`forge:cmmd-work-intake-eviction:v1`,te=`forge:cmmd-work-intake-project-eviction:v1:`,d=1,f=1;function p(){if(typeof window>`u`)return null;try{return window.localStorage}catch{return null}}function m(e){return typeof e==`object`&&!!e}function h(e){return e==null||typeof e==`string`}function g(e){if(!e)return null;try{let t=JSON.parse(e);return t.version!==d||typeof t.cachedAt!=`string`||!m(t.intake)||!h(t.evictionGeneration)?null:t}catch{return null}}function ne(e){let t=Array.isArray(e.projectIds)?e.projectIds.filter(e=>typeof e==`string`&&e.length>0):[],n=e.projectId,r=t.length===0&&typeof n==`string`&&n.length>0?[n]:t;return[...new Set(r)]}function _(e){if(!e)return null;try{let t=JSON.parse(e);if(t.version!==f||typeof t.generation!=`string`||t.generation.length===0)return null;let n=ne(t);return n.length===0?null:{version:f,generation:t.generation,projectIds:[...new Set(n)]}}catch{return null}}function v(e){return`${te}${encodeURIComponent(e)}`}function y(e){if(!e)return null;try{let t=JSON.parse(e);return t.version!==f||typeof t.generation!=`string`||t.generation.length===0||typeof t.projectId!=`string`||t.projectId.length===0?null:t}catch{return null}}function re(e,t){if(e===l&&t===null)return{kind:`cache_removed`};if(e===`forge:cmmd-work-intake-eviction:v1`){let e=_(t);return e?{kind:`projects_removed`,projectIds:e.projectIds}:{kind:`malformed`}}if(e?.startsWith(`forge:cmmd-work-intake-project-eviction:v1:`)){let e=y(t);return e?{kind:`projects_removed`,projectIds:[e.projectId]}:{kind:`malformed`}}return{kind:`unrelated`}}function b(e){let t=new Set(_(e.getItem(`forge:cmmd-work-intake-eviction:v1`))?.projectIds??[]);if(typeof e.length==`number`&&typeof e.key==`function`)for(let n=0;n<e.length;n+=1){let r=e.key(n);if(!r?.startsWith(`forge:cmmd-work-intake-project-eviction:v1:`))continue;let i=y(e.getItem(r));i&&t.add(i.projectId)}return[...t].toSorted()}function x(e,t=p()){if(!t)return e;try{let n=new Set(b(t));return n.size===0?e:{...e,projects:e.projects.filter(e=>!n.has(e.id)),tasks:e.tasks.filter(e=>e.projectId===null||!n.has(e.projectId))}}catch{return e}}function S(e=p()){if(!e)return null;try{let t=_(e.getItem(u)),n=b(e);return!t&&n.length===0?null:`${t?.generation??`project-tombstones`}:${n.join(`,`)}`}catch{return null}}function ie(e,t=p()){if(!(!t||e.length===0))try{let n=new Set(e),r=b(t).filter(e=>!n.has(e));for(let e of n)t.removeItem(v(e));r.length===0?t.removeItem(u):t.setItem(u,JSON.stringify({version:f,generation:C(),projectIds:r}))}catch{}}function C(){return typeof globalThis.crypto?.randomUUID==`function`?globalThis.crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`}function w(e=Date.now(),t=p()){if(!t)return{state:`missing`,record:null};let n=g(t.getItem(l));if(!n||(n.evictionGeneration??null)!==S(t))return{state:`missing`,record:null};let r={...n,intake:x(n.intake,t)},i=Date.parse(r.cachedAt);if(!Number.isFinite(i))return{state:`expired`,record:null};let a=Math.max(0,e-i);return a<=12e4?{state:`fresh`,record:r}:a<=3e5?{state:`stale`,record:r}:{state:`expired`,record:null}}function T(e,t,n=new Date,r=p()){if(!r||S(r)!==t)return!1;let i={version:d,cachedAt:n.toISOString(),intake:x(e,r),evictionGeneration:t};try{return r.setItem(l,JSON.stringify(i)),S(r)===t||(r.removeItem(l),!1)}catch{return!1}}function E(e,t=p()){if(t)try{let n=b(t),r={version:f,generation:C(),projectId:e};for(let e of n){let n=v(e);t.getItem(n)||t.setItem(n,JSON.stringify({version:f,generation:C(),projectId:e}))}t.setItem(v(e),JSON.stringify(r));let i={version:f,generation:C(),projectIds:b(t)};t.setItem(u,JSON.stringify(i));let a=S(t),o=g(t.getItem(l));if(!o)return;t.setItem(l,JSON.stringify({...o,evictionGeneration:a,intake:x(o.intake,t)})),S(t)!==a&&t.removeItem(l)}catch{try{t.removeItem(l)}catch{}}}var D={connected:!1,isLoading:!1,error:null,source:null,fetchedAt:null,workspace:null,identity:null,campaigns:[],projects:[],tasks:[],workspaces:[],refetchRequestedAt:null,authoritativeRefetchRequested:!1},O=D,k=0,A=new Set;function j(e){O=e;for(let e of A)e()}function M(e){j(e(O))}function N(e){j({connected:e.connected,isLoading:!1,error:null,source:e.source,fetchedAt:e.fetchedAt,workspace:e.workspace,identity:e.identity,campaigns:e.campaigns,projects:e.projects,tasks:e.tasks,workspaces:e.workspaces,refetchRequestedAt:O.refetchRequestedAt,authoritativeRefetchRequested:O.authoritativeRefetchRequested??!1})}function P(e){return A.add(e),()=>A.delete(e)}function F(){return O}function ae(){return(0,c.useSyncExternalStore)(P,F,F)}var I={clear(){k+=1,j(D)},beginDataRequest(){return k+=1,k},isDataVersionCurrent(e){return k===e},requestRefetch(e={}){M(t=>({...t,refetchRequestedAt:Math.max(Date.now(),(t.refetchRequestedAt??0)+1),authoritativeRefetchRequested:e.authoritative===!0}))},setBackgroundRefreshError(e){M(t=>({...t,error:e,isLoading:!1}))},setData(e){N(e)},setDataIfCurrent(e,t){return k===t&&(N(e),!0)},setError(e){j({...D,error:e})},setLoading(e){M(t=>({...t,isLoading:e,error:null}))},patchTask(e,t){M(n=>({...n,tasks:n.tasks.map(n=>n.id===e?{...n,...t}:n)}))},patchTasks(e,t){if(e.length===0)return;let n=new Set(e);M(e=>({...e,tasks:e.tasks.map(e=>n.has(e.id)?{...e,...t}:e)}))},replaceTasks(e){M(t=>({...t,tasks:e}))},patchProject(e,t){M(n=>({...n,projects:n.projects.map(n=>n.id===e?{...n,...t}:n)}))},removeProject(e){k+=1,E(e),M(t=>({...t,projects:t.projects.filter(t=>t.id!==e),tasks:t.tasks.filter(t=>t.projectId!==e)}))},applyExternalProjectRemovals(e){k+=1;let t=new Set(e);M(e=>({...e,projects:e.projects.filter(e=>!t.has(e.id)),tasks:e.tasks.filter(e=>e.projectId===null||!t.has(e.projectId))}))}},L=`forge:command-center:workspace-filter`,R=`forge:command-center:workspace-filter-updated`;function z(e){if(typeof e!=`string`)return null;let t=e.trim();return t.length>0?t:null}function B(){return z(a(L))}function V(e){if(typeof window>`u`)return;let t=z(e);t===null?r(L):i(L,t),window.dispatchEvent(new CustomEvent(R,{detail:{workspaceId:t}}))}function H(e){if(typeof window>`u`)return()=>{};let t=t=>{t.key===L&&e(z(t.newValue))},n=t=>{e(z(t.detail?.workspaceId??null))};return window.addEventListener(`storage`,t),window.addEventListener(R,n),()=>{window.removeEventListener(`storage`,t),window.removeEventListener(R,n)}}var U=e({getCurrentForgeWorkspaceId:()=>X,seedCurrentForgeWorkspaceId:()=>Z,switchCurrentForgeWorkspaceId:()=>Q,useCurrentForgeWorkspaceState:()=>$}),W=`forge:current-workspace-id`;function G(){let e=a(W);if(e===null||!/^\d+$/.test(e))return null;let t=Number.parseInt(e,10);return Number.isSafeInteger(t)&&t>0?t:null}var K={workspaceId:G(),switchGeneration:0},q=new Set;function J(e){K=e;for(let e of q)e()}function Y(){return K}function X(){return K.workspaceId}function oe(e){return q.add(e),()=>q.delete(e)}function Z(e){if(K.workspaceId===e)return;let t=K.workspaceId!==null;i(W,String(e)),t&&(o(),s()),J({...K,workspaceId:e})}function Q(e){ee()||K.workspaceId!==e&&(i(W,String(e)),o(),s(),V(null),J({workspaceId:e,switchGeneration:K.switchGeneration+1}),I.requestRefetch({authoritative:!0}))}function $(){return(0,c.useSyncExternalStore)(oe,Y,Y)}export{T as _,$ as a,V as c,P as d,ae as f,S as g,w as h,Q as i,I as l,re as m,X as n,B as o,ie as p,Z as r,H as s,U as t,F as u};
2
+ //# sourceMappingURL=currentForgeWorkspaceStore-wQ-H1MIm.js.map
@@ -0,0 +1,2 @@
1
+ function e(e){return typeof e==`function`}function t(t,...n){return e(t)?t(...n):t}function n({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:a,checkDirty:o,shallowPropagate:s};function r(e,t,n){let r=t.depsTail;if(r!==void 0&&r.dep===e)return;let i=r===void 0?t.deps:r.nextDep;if(i!==void 0&&i.dep===e){i.version=n,t.depsTail=i;return}let a=e.subsTail;if(a!==void 0&&a.version===n&&a.sub===t)return;let o=t.depsTail=e.subsTail={version:n,dep:e,sub:t,prevDep:r,nextDep:i,prevSub:a,nextSub:void 0};i!==void 0&&(i.prevDep=o),r===void 0?t.deps=o:r.nextDep=o,a===void 0?e.subs=o:a.nextSub=o}function i(e,t=e.sub){let r=e.dep,i=e.prevDep,a=e.nextDep,o=e.nextSub,s=e.prevSub;return a===void 0?t.depsTail=i:a.prevDep=i,i===void 0?t.deps=a:i.nextDep=a,o===void 0?r.subsTail=s:o.prevSub=s,s===void 0?(r.subs=o)===void 0&&n(r):s.nextSub=o,a}function a(e){let n=e.nextSub,r;top:do{let i=e.sub,a=i.flags;if(a&60?a&12?a&4?!(a&48)&&c(e,i)?(i.flags=a|40,a&=1):a=0:i.flags=a&-9|32:a=0:i.flags=a|32,a&2&&t(i),a&1){let t=i.subs;if(t!==void 0){let i=(e=t).nextSub;i!==void 0&&(r={value:n,prev:r},n=i);continue}}if((e=n)!==void 0){n=e.nextSub;continue}for(;r!==void 0;)if(e=r.value,r=r.prev,e!==void 0){n=e.nextSub;continue top}break}while(!0)}function o(t,n){let r,i=0,a=!1;top:do{let o=t.dep,c=o.flags;if(n.flags&16)a=!0;else if((c&17)==17){if(e(o)){let e=o.subs;e.nextSub!==void 0&&s(e),a=!0}}else if((c&33)==33){(t.nextSub!==void 0||t.prevSub!==void 0)&&(r={value:t,prev:r}),t=o.deps,n=o,++i;continue}if(!a){let e=t.nextDep;if(e!==void 0){t=e;continue}}for(;i--;){let i=n.subs,o=i.nextSub!==void 0;if(o?(t=r.value,r=r.prev):t=i,a){if(e(n)){o&&s(i),n=t.sub;continue}a=!1}else n.flags&=-33;n=t.sub;let c=t.nextDep;if(c!==void 0){t=c;continue top}}return a}while(!0)}function s(e){do{let n=e.sub,r=n.flags;(r&48)==32&&(n.flags=r|16,(r&6)==2&&t(n))}while((e=e.nextSub)!==void 0)}function c(e,t){let n=t.depsTail;for(;n!==void 0;){if(n===e)return!0;n=n.prevDep}return!1}}function r(e,t,n){let r=typeof e==`object`,i=r?e:void 0;return{next:(r?e.next:e)?.bind(i),error:(r?e.error:t)?.bind(i),complete:(r?e.complete:n)?.bind(i)}}var i=[],a=0,{link:o,unlink:s,propagate:c,checkDirty:l,shallowPropagate:u}=n({update(e){return e._update()},notify(e){i[f++]=e,e.flags&=-3},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=17,h(e))}}),d=0,f=0,p,m=0;function h(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=s(n,e)}function g(){if(!(m>0)){for(;d<f;){let e=i[d];i[d++]=void 0,e.notify()}d=0,f=0}}function _(e,t){let n=typeof e==`function`,i=e,s={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:+!n,get(){return p!==void 0&&o(s,p,a),s._snapshot},subscribe(e){let t=r(e),n={current:!1},i=v(()=>{s.get(),n.current?t.next?.(s._snapshot):n.current=!0});return{unsubscribe:()=>{i.stop()}}},_update(e){let r=p,o=t?.compare??Object.is;if(n)p=s,++a,s.depsTail=void 0;else if(e===void 0)return!1;n&&(s.flags=5);try{let t=s._snapshot,r=typeof e==`function`?e(t):e===void 0&&n?i(t):e;return t===void 0||!o(t,r)?(s._snapshot=r,!0):!1}finally{p=r,n&&(s.flags&=-5),h(s)}}};return n?(s.flags=17,s.get=function(){let e=s.flags;if(e&16||e&32&&l(s.deps,s)){if(s._update()){let e=s.subs;e!==void 0&&u(e)}}else e&32&&(s.flags=e&-33);return p!==void 0&&o(s,p,a),s._snapshot}):s.set=function(e){if(s._update(e)){let e=s.subs;e!==void 0&&(c(e),u(e),g())}},s}function v(e){let t=()=>{let t=p;p=n,++a,n.depsTail=void 0,n.flags=6;try{return e()}finally{p=t,n.flags&=-5,h(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:6,notify(){let e=this.flags;e&16||e&32&&l(this.deps,this)?t():this.flags=2},stop(){this.flags=0,this.depsTail=void 0,h(this)}};return t(),n}var y=class{constructor(e,t){this.atom=_(e),this.get=this.get.bind(this),this.setState=this.setState.bind(this),this.subscribe=this.subscribe.bind(this),t&&(this.actions=t(this))}setState(e){this.atom.set(e)}get state(){return this.atom.get()}get(){return this.state}subscribe(e){return this.atom.subscribe(r(e))}},b=class{#e;constructor({pluginId:e}){this.#e=e}getPluginId(){return this.#e}createEventPayload(e,t){return{type:`${this.#e}:${e}`,payload:t,pluginId:this.#e}}emit(e,t){}on(e,t,n){return()=>{}}onAll(e){return()=>{}}onAllPluginEvents(e){return()=>{}}},x=new Map;function S(e,t){x.set(e,t)}function C(e){if(e!==void 0)try{return JSON.parse(JSON.stringify(e))}catch{return null}}function w(e){return typeof e.get==`function`?e.get():e.state}function T(e){return{key:e.key,store:{state:C(w(e.store))},options:C(e.options)}}var E=class extends b{constructor(e){super({pluginId:`pacer`,debug:e?.debug,reconnectEveryMs:1e3})}},D=(e,t)=>{let n=t.key;n&&(S(n,t),O.emit(e,T({...t,key:n})))},O=new E;function k(){return{canLeadingExecute:!0,executionCount:0,isPending:!1,lastArgs:void 0,status:`idle`,maybeExecuteCount:0}}var A={enabled:!0,leading:!1,trailing:!0,wait:0},j=class{#e;constructor(e,n){this.fn=e,this.store=new y(k()),this.setOptions=e=>{this.options={...this.options,...e},this.#n()||this.cancel()},this.#t=e=>{this.store.setState(t=>{let n={...t,...e},{isPending:r}=n;return{...n,status:this.#n()?r?`pending`:`idle`:`disabled`}}),D(`Debouncer`,this)},this.#n=()=>!!t(this.options.enabled,this),this.#r=()=>t(this.options.wait,this),this.maybeExecute=(...e)=>{if(!this.#n())return;this.#t({maybeExecuteCount:this.store.state.maybeExecuteCount+1});let t=!1;this.options.leading&&this.store.state.canLeadingExecute&&(this.#t({canLeadingExecute:!1}),t=!0,this.#i(...e)),this.options.trailing&&this.#t({isPending:!0,lastArgs:e}),this.#e&&clearTimeout(this.#e),this.#e=setTimeout(()=>{this.#t({canLeadingExecute:!0}),this.options.trailing&&!t&&this.#i(...e)},this.#r())},this.#i=(...e)=>{this.#n()&&(this.fn(...e),this.#t({executionCount:this.store.state.executionCount+1,isPending:!1,lastArgs:void 0}),this.options.onExecute?.(e,this))},this.flush=()=>{this.store.state.isPending&&this.store.state.lastArgs&&(this.#a(),this.#i(...this.store.state.lastArgs))},this.#a=()=>{this.#e&&=(clearTimeout(this.#e),void 0)},this.cancel=()=>{this.#a(),this.#t({canLeadingExecute:!0,isPending:!1})},this.reset=()=>{this.#t(k())},this.key=n.key,this.options={...A,...n},this.#t(this.options.initialState??{}),this.key&&O.on(`d-Debouncer`,e=>{e.payload.key===this.key&&(this.#t(e.payload.store.state),this.setOptions(e.payload.options))})}#t;#n;#r;#i;#a};export{t as a,y as i,D as n,O as r,j as t};
2
+ //# sourceMappingURL=debouncer-BEV7Iuwb.js.map
@@ -0,0 +1,2 @@
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{Ha as t,Ua as n,Wa as r}from"./Stream-mUTFnSY9.js";import{$ as i,A as a,B as o,C as s,D as c,E as l,H as u,L as d,M as f,O as p,Pt as m,T as h,U as g,V as _,X as v,_ as y,a as b,b as x,c as S,f as C,g as w,h as T,i as E,k as D,m as O,mt as k,n as A,o as ee,p as j,s as M,u as te,v as ne,w as re,y as ie}from"./useOpenInteractionType-KsRrk6uH.js";import{Et as ae,J as N,Tt as oe,Ut as se,Y as P,at as ce,b as F,bn as I,et as le,fn as L,gn as R,h as z,hn as ue,ht as de,l as fe,m as pe,un as B,wt as me,yn as V}from"./CompositeItem-DTyKsv13.js";import{t as H}from"./utils-BWD4ATf-.js";import{s as he,t as ge}from"./scroll-area-9mmf9iy-.js";var U=e(r(),1),_e={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},W={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},ve={disabled:!1,...W},G={valid(e){return e===null?null:e?{"data-valid":``}:{"data-invalid":``}}},K={invalid:void 0,name:void 0,validityData:{state:_e,errors:[],error:``,value:``,initialValue:null},setValidityData:R,disabled:void 0,setTouched:R,setDirty:R,setFilled:R,setFocused:R,validationMode:`onSubmit`,shouldValidateOnChange:()=>!1,state:ve,registerFieldControl:R,validation:{getValidationProps:(e,t=ue)=>t,inputRef:{current:null},registeredInputs:new Map,registerInput:R,getInputControl:()=>null,commit:async()=>{},change:R}},ye=U.createContext(K);function q(e=!0){let t=U.useContext(ye);if(t.setValidityData===R&&!e)throw Error(I(28));return t}var be=U.createContext({elementRef:{current:null},formRef:{current:{fields:new Map}},errors:{},clearErrors:R,validationMode:`onSubmit`,submitAttemptedRef:{current:!1}});function xe(){return U.useContext(be)}var Se=U.createContext({controlId:void 0,registerControlId:R,labelId:void 0,setLabelId:R,messageIds:[],setMessageIds:R,getDescriptionProps:e=>e});function J(){return U.useContext(Se)}function Ce(e={}){let{id:t,implicit:n=!1,controlRef:r}=e,{controlId:i,registerControlId:a}=J(),o=F(t),s=n?i:void 0,c=V(()=>Symbol()),l=U.useRef(!1),u=U.useRef(t!=null),d=N(()=>{!l.current||a===R||(l.current=!1,a(c.current,void 0))});return B(()=>{if(a===R)return;let e;if(n){let n=r?.current;e=se(n)&&n.closest(`label`)!=null?t??null:s??o}else if(t!=null)u.current=!0,e=t;else if(u.current)e=o;else{d();return}if(e===void 0){d();return}l.current=!0,a(c.current,e)},[t,r,s,a,n,o,c,d]),U.useEffect(()=>d,[d]),i??o}function we(e,t,n,r,i=!0,a){let{registerFieldControl:o}=q(),s=V(()=>Symbol());B(()=>{let c=s.current;if(!i){o(c,void 0);return}o(c,{controlRef:e,getValue:r,id:t,name:a,value:n})},[e,i,r,t,a,o,s,n]),B(()=>{let e=s.current;return()=>{o(e,void 0)}},[o,s])}var Te=U.forwardRef(function(e,t){let{render:n,className:r,id:i,name:a,value:o,disabled:s=!1,onValueChange:c,defaultValue:l,autoFocus:u=!1,style:d,...f}=e,{state:p,name:m,disabled:h,setTouched:g,setDirty:_,validityData:v,setFocused:y,setFilled:b,validationMode:x,validation:S}=q(),{clearErrors:C}=xe(),w=h||s,T=m??a,E={...p,disabled:w},{labelId:D}=J(),O=Ce({id:i});B(()=>{let e=o!=null;S.inputRef.current?.value||e&&o!==``?b(!0):e&&o===``&&b(!1)},[S.inputRef,b,o]);let A=U.useRef(null);B(()=>{u&&A.current===me(k(A.current))&&y(!0)},[u,y]);let[ee]=pe({controlled:o,default:l,name:`FieldControl`,state:`value`}),j=o!==void 0,M=j?ee:void 0,te=N(()=>S.inputRef.current?.value);return we(S.inputRef,O,M,te,!w,a),L(`input`,e,{ref:[t,A],state:E,props:[{id:O,disabled:w,name:T,ref:S.inputRef,"aria-labelledby":D,autoFocus:u,...j?{value:M}:{defaultValue:l},onChange(e){let t=e.currentTarget.value;c?.(t,P(de,e.nativeEvent)),_(t!==(v.initialValue??``)),b(t!==``),e.nativeEvent.defaultPrevented||(C(T),S.change(t))},onFocus(){y(!0)},onBlur(e){g(!0),y(!1),x===`onBlur`&&S.commit(e.currentTarget.value)},onKeyDown(e){e.currentTarget.tagName===`INPUT`&&e.key===`Enter`&&(g(!0),S.commit(e.currentTarget.value))}},f,e=>S.getValidationProps(w,e)],stateAttributesMapping:G})}),Y=n(),Ee=U.forwardRef(function(e,t){return(0,Y.jsx)(Te,{ref:t,...e})}),X=t();function De(e){let t=(0,X.c)(23),n,r,i,a,o;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5]):({className:n,size:i,unstyled:a,nativeInput:o,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o);let s=i===void 0?`default`:i,c=a!==void 0&&a,l=o!==void 0&&o,u=s===`sm`&&`px-[calc(--spacing(2.5)-1px)] md:h-6.5 md:leading-6.5`,d=s===`lg`&&`md:h-8.5 md:leading-8.5`,f=r.type===`search`&&`[&::-webkit-search-cancel-button]:appearance-none [&::-webkit-search-decoration]:appearance-none [&::-webkit-search-results-button]:appearance-none [&::-webkit-search-results-decoration]:appearance-none`,p=r.type===`file`&&`text-muted-foreground file:me-3 file:bg-transparent file:font-medium file:text-foreground file:text-sm`,m;t[6]!==u||t[7]!==d||t[8]!==f||t[9]!==p?(m=H(`min-h-touch w-full min-w-0 rounded-[inherit] px-[calc(--spacing(3)-1px)] leading-(--spacing-touch) outline-none placeholder:text-muted-foreground/72 md:h-7.5 md:min-h-0 md:leading-7.5 [transition:background-color_5000000s_ease-in-out_0s]`,u,d,f,p),t[6]=u,t[7]=d,t[8]=f,t[9]=p,t[10]=m):m=t[10];let h=m,g;t[11]!==n||t[12]!==c?(g=H(!c&&`relative inline-flex w-full rounded-lg border border-input bg-background not-dark:bg-clip-padding text-no-zoom md:text-sm text-foreground shadow-xs/5 ring-ring/24 transition-shadow before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] not-has-disabled:not-has-focus-visible:not-has-aria-invalid:before:shadow-[0_1px_--theme(--color-black/4%)] has-focus-visible:has-aria-invalid:border-destructive/64 has-focus-visible:has-aria-invalid:ring-destructive/16 has-aria-invalid:border-destructive-border has-focus-visible:border-ring has-autofill:bg-foreground/4 has-disabled:opacity-64 has-[:disabled,:focus-visible,[aria-invalid]]:shadow-none has-focus-visible:ring-[3px] dark:bg-input/32 dark:has-autofill:bg-foreground/8 dark:has-aria-invalid:ring-destructive-border dark:not-has-disabled:not-has-focus-visible:not-has-aria-invalid:before:shadow-[0_-1px_--theme(--color-white/6%)]`,n)||void 0,t[11]=n,t[12]=c,t[13]=g):g=t[13];let _;t[14]!==h||t[15]!==l||t[16]!==r||t[17]!==s?(_=l?(0,Y.jsx)(`input`,{className:h,"data-slot":`input`,size:typeof s==`number`?s:void 0,...r,style:typeof r.style==`function`?void 0:r.style}):(0,Y.jsx)(Ee,{className:h,"data-slot":`input`,size:typeof s==`number`?s:void 0,...r}),t[14]=h,t[15]=l,t[16]=r,t[17]=s,t[18]=_):_=t[18];let v;return t[19]!==s||t[20]!==_||t[21]!==g?(v=(0,Y.jsx)(`span`,{className:g,"data-size":s,"data-slot":`input-control`,children:_}),t[19]=s,t[20]=_,t[21]=g,t[22]=v):v=t[22],v}var Oe=U.createContext(void 0);function Z(e){let t=U.useContext(Oe);if(!e&&t===void 0)throw Error(I(27));return t}var ke=U.forwardRef(function(e,t){let{render:n,className:r,style:i,forceRender:a=!1,...o}=e,s=Z(),c=s.useState(`open`),l=s.useState(`nested`),u=s.useState(`mounted`),d={open:c,transitionStatus:s.useState(`transitionStatus`)};return L(`div`,e,{state:d,ref:[s.context.backdropRef,t],stateAttributesMapping:S,props:[{role:`presentation`,hidden:!u,style:{userSelect:`none`,WebkitUserSelect:`none`}},o],enabled:a||!l})}),Q=U.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,...s}=e,c=Z(),l=c.useState(`open`),{getButtonProps:u,buttonRef:d}=z({disabled:a,native:o}),f={disabled:a};function p(e){l&&c.setOpen(!1,P(le,e.nativeEvent))}return L(`button`,e,{state:f,ref:[t,d],props:[{onClick:p},s,u]})}),Ae=U.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,s=Z(),c=F(a);return s.useSyncedValueWithCleanup(`descriptionElementId`,c),L(`p`,e,{ref:t,props:[{id:c},o]})}),je=U.createContext(void 0);function Me(){let e=U.useContext(je);if(e===void 0)throw Error(I(26));return e}var Ne={...M,...C,nestedDialogOpen(e){return e?{"data-nested-dialog-open":``}:null}},Pe=U.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,initialFocus:o,...c}=e,l=Z(),u=l.useState(`descriptionElementId`),d=l.useState(`disablePointerDismissal`),p=l.useState(`floatingRootContext`),m=l.useState(`popupProps`),h=l.useState(`modal`),_=l.useState(`mounted`),v=l.useState(`nested`),y=l.useState(`nestedOpenDialogCount`),b=l.useState(`open`),x=l.useState(`openMethod`),S=l.useState(`titleElementId`),C=l.useState(`transitionStatus`),w=l.useState(`role`),T=p.useState(`floatingId`);Me(),f({open:b,ref:l.context.popupRef,onComplete(){b&&l.context.onOpenChangeComplete?.(!0)}});let E=o===void 0?s(l.context.popupRef):o,D=y>0,O=l.useStateSetter(`popupElement`),k=L(`div`,e,{state:{open:b,nested:v,transitionStatus:C,nestedDialogOpen:D},props:[m,{id:T,"aria-labelledby":S,"aria-describedby":u,role:w,...ie,hidden:!_,onKeyDown(e){fe.has(e.key)&&e.stopPropagation()},style:{"--nested-dialogs":y}},c],ref:[t,l.context.popupRef,O],stateAttributesMapping:Ne});return(0,Y.jsx)(g,{context:p,openInteractionType:x,disabled:!_,closeOnFocusOut:!d,initialFocus:E,returnFocus:a,modal:h!==!1,restoreFocus:`popup`,children:k})}),Fe=U.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,i=Z(),a=i.useState(`mounted`),o=i.useState(`modal`),s=i.useState(`open`);return a||n?(0,Y.jsx)(je.Provider,{value:n,children:(0,Y.jsxs)(v,{ref:t,...r,children:[a&&o===!0&&(0,Y.jsx)(b,{ref:i.context.internalBackdropRef,inert:ee(!s)}),e.children]})}):null});function Ie({store:e,parentContext:t,isDrawer:n}){let r=e.useState(`open`),i=e.useState(`disablePointerDismissal`),a=e.useState(`modal`),o=e.useState(`popupElement`),s=e.useState(`floatingRootContext`),[l,u]=U.useState(0),[d,f]=U.useState(0),p=l===0,m=_(s,{outsidePressEvent(){return e.context.internalBackdropRef.current||e.context.backdropRef.current?`intentional`:{mouse:a===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}},outsidePress(t){if(!e.context.outsidePressEnabledRef.current||`button`in t&&t.button!==0)return!1;if(`touches`in t){if(t.type===`touchend`){if(t.changedTouches.length!==1||t.touches.length!==0)return!1}else if(t.touches.length!==1)return!1}let n=ae(t);if(p&&!i){if(a){let t=e.context.internalBackdropRef.current,r=e.context.backdropRef.current;return t||r?t===n||r===n||oe(n,o)&&!n?.hasAttribute(`data-base-ui-portal`):!0}return!0}return!1},escapeKey:p});return E(r&&a===!0,o),e.useContextCallback(`onNestedDialogOpen`,(e,t)=>{u(e),f(t)}),B(()=>(t?.onNestedDialogOpen&&(r?t.onNestedDialogOpen(l+1,d+ +!!n):t.onNestedDialogOpen(0,0)),()=>{t?.onNestedDialogOpen&&r&&t.onNestedDialogOpen(0,0)}),[n,r,l,d,t]),c(e,{activeTriggerProps:m.reference,inactiveTriggerProps:m.trigger,popupProps:m.floating,nestedOpenDialogCount:l,nestedOpenDrawerCount:d}),null}var Le={...y,modal:e=>e.modal,nested:e=>e.nested,nestedOpenDialogCount:e=>e.nestedOpenDialogCount,nestedOpenDrawerCount:e=>e.nestedOpenDrawerCount,disablePointerDismissal:e=>e.disablePointerDismissal,openMethod:e=>e.openMethod,descriptionElementId:e=>e.descriptionElementId,titleElementId:e=>e.titleElementId,viewportElement:e=>e.viewportElement,role:e=>e.role},Re=class extends d{constructor(e,t,n){let r=new ne,i=Be(e,r,t,n);super(i,Ve(r),Le)}setOpen=(e,t)=>{if(t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},!e&&t.trigger==null&&this.state.activeTriggerId!=null&&(t.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let n={open:e};re(n,e,t.trigger),this.update(n)}};function ze(){let e=new ne;return new j(Object.freeze(Be(void 0,e)),Object.freeze(Ve(e)),Le)}function Be(e,t,n,r=!1){let i={...T(),modal:!0,disablePointerDismissal:!1,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:`dialog`,...e};return i.floatingRootContext=w(t,n,r),i}function Ve(e){return{popupRef:U.createRef(),backdropRef:U.createRef(),internalBackdropRef:U.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:e,onOpenChange:void 0,onOpenChangeComplete:void 0}}function He(e,t){let{children:n,open:r,defaultOpen:i=!1,onOpenChange:a,onOpenChangeComplete:o,disablePointerDismissal:s=!1,modal:c=!0,actionsRef:u,handle:d,triggerId:f,defaultTriggerId:m=null}=t,g=e===`drawer`,_=e===`alert-dialog`,v=_?!0:c,y=_||s,b=_?`alertdialog`:`dialog`,S=Z(!0),C={modal:v,disablePointerDismissal:y,nested:S!=null,role:b},w=p((e,t)=>new Re({open:i,openProp:r,activeTriggerId:m,triggerIdProp:f,...C},e,t),!0);w.useControlledProp(`openProp`,r),w.useControlledProp(`triggerIdProp`,f),w.useSyncedValues(C),w.useContextCallback(`onOpenChange`,a),w.useContextCallback(`onOpenChangeComplete`,o);let T=w.useState(`open`),E=w.useState(`mounted`),O=w.useState(`payload`);D(w,T),h(w);let{forceUnmount:k}=l(T,w);U.useImperativeHandle(u,()=>({unmount:k,close:()=>w.setOpen(!1,P(ce))}),[k,w]);let A=T||E;return(0,Y.jsxs)(Oe.Provider,{value:w,children:[d&&(0,Y.jsx)(x,{handle:d,store:w}),A&&(0,Y.jsx)(Ie,{store:w,parentContext:S?.context,isDrawer:g}),typeof n==`function`?n({payload:O}):n]})}function Ue(e){return He(`dialog`,e)}var We=U.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,...o}=e,s=Me(),c=Z(),l=c.useState(`open`),u=c.useState(`nested`),d=c.useState(`transitionStatus`),f=c.useState(`nestedOpenDialogCount`),p=c.useState(`mounted`),m=c.useStateSetter(`viewportElement`);return L(`div`,e,{enabled:s||p,state:{open:l,nested:u,transitionStatus:d,nestedDialogOpen:f>0},ref:[t,m],stateAttributesMapping:Ne,props:[{role:`presentation`,hidden:!p,style:{pointerEvents:l?void 0:`none`},children:a},o]})}),$=U.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,s=Z(),c=F(a);return s.useSyncedValueWithCleanup(`titleElementId`,c),L(`h2`,e,{ref:t,props:[{id:c},o]})}),Ge=U.forwardRef(function(e,t){let{render:n,className:r,style:o,disabled:s=!1,nativeButton:c=!0,id:l,payload:d,handle:f,...p}=e,m=Z(!0),h=O(f)??m;if(!h)throw Error(I(79));let g=F(l),_=h.useState(`floatingRootContext`),v=h.useState(`isOpenedByTrigger`,g),y=h.useState(`triggerPopupId`,g),b=U.useRef(null),{registerTrigger:x,isMountedByThisTrigger:S}=a(g,b,h,{payload:d}),{getButtonProps:C,buttonRef:w}=z({disabled:s,native:c}),T=u(_),E=A(()=>h.select(`open`),e=>{h.set(`openMethod`,e)}),D={disabled:s,open:v},k=h.useState(`triggerProps`,S);return L(`button`,e,{state:D,ref:[w,t,x,b],props:[T.reference,k,E,{[i]:``,id:g,"aria-haspopup":`dialog`,"aria-expanded":v,"aria-controls":y},p,C],stateAttributesMapping:te})}),Ke=class extends o{constructor(){super(ze(),`Dialog`,!1)}open(e){this.openByTrigger(e)}openWithPayload(e){let t=this.attachedStore;t!==null&&(t.set(`payload`,e),t.setOpen(!0,P(ce)))}close(){this.closePopup()}get isOpen(){return this.attachedStore?.select(`open`)??!1}};function qe(){return new Ke}var Je=`dialog-backdrop fixed inset-0 z-50 transition-all duration-200 data-ending-style:opacity-0 data-starting-style:opacity-0`,Ye=`dialog-glass -translate-y-[calc(1.25rem*var(--nested-dialogs))] relative row-start-2 flex min-h-0 w-full min-w-0 scale-[calc(1-0.1*var(--nested-dialogs))] flex-col rounded-2xl border opacity-[calc(1-0.1*var(--nested-dialogs))] outline-none transition-[scale,opacity,translate] duration-200 ease-in-out will-change-transform data-nested:data-ending-style:translate-y-8 data-nested:data-starting-style:translate-y-8 data-nested-dialog-open:origin-top data-ending-style:scale-98 data-starting-style:scale-98 data-ending-style:opacity-0 data-starting-style:opacity-0`,Xe=Ue,Ze=Fe;function Qe(e){let t=(0,X.c)(2),n;return t[0]===e?n=t[1]:(n=(0,Y.jsx)(Ge,{"data-slot":`dialog-trigger`,...e}),t[0]=e,t[1]=n),n}function $e(e){let t=(0,X.c)(2),n;return t[0]===e?n=t[1]:(n=(0,Y.jsx)(Q,{"data-slot":`dialog-close`,...e}),t[0]=e,t[1]=n),n}function et(e){let t=(0,X.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=H(Je,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Y.jsx)(ke,{className:i,"data-slot":`dialog-backdrop`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function tt(e){let t=(0,X.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=H(`fixed inset-0 z-50 grid grid-rows-[1fr_auto_3fr] justify-items-center p-4`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Y.jsx)(We,{className:i,"data-slot":`dialog-viewport`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function nt(e){let t=(0,X.c)(24),n,r,i,a,o,s;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6]):({className:r,children:n,showCloseButton:a,bottomStickOnMobile:o,viewportClassName:s,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s);let c=a===void 0||a,l=o===void 0||o,u;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,Y.jsx)(et,{}),t[7]=u):u=t[7];let d=l&&`max-sm:grid-rows-[1fr_auto] max-sm:p-0 max-sm:pt-12`,f;t[8]!==d||t[9]!==s?(f=H(d,s),t[8]=d,t[9]=s,t[10]=f):f=t[10];let p=l&&`max-sm:max-w-none max-sm:rounded-none max-sm:border-x-0 max-sm:border-t max-sm:border-b-0 max-sm:opacity-[calc(1-min(var(--nested-dialogs),1))] max-sm:data-ending-style:translate-y-4 max-sm:data-starting-style:translate-y-4`,h;t[11]!==r||t[12]!==p?(h=H(Ye,`max-h-full max-w-lg text-foreground`,p,r),t[11]=r,t[12]=p,t[13]=h):h=t[13];let g;t[14]===c?g=t[15]:(g=c&&(0,Y.jsx)(Q,{"aria-label":`Close`,className:H(`absolute end-2 top-2`,`inline-flex size-touch shrink-0 touch-manipulation items-center justify-center rounded-lg leading-none sm:size-touch md:size-7 md:rounded-md`),render:(0,Y.jsx)(he,{size:`icon`,variant:`ghost`}),children:(0,Y.jsx)(m,{})}),t[14]=c,t[15]=g);let _;t[16]!==n||t[17]!==i||t[18]!==h||t[19]!==g?(_=(0,Y.jsxs)(Pe,{className:h,"data-slot":`dialog-popup`,...i,children:[n,g]}),t[16]=n,t[17]=i,t[18]=h,t[19]=g,t[20]=_):_=t[20];let v;return t[21]!==f||t[22]!==_?(v=(0,Y.jsxs)(Ze,{children:[u,(0,Y.jsx)(tt,{className:f,children:_})]}),t[21]=f,t[22]=_,t[23]=v):v=t[23],v}function rt(e){let t=(0,X.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=H(`flex flex-col gap-2 p-6 in-[[data-slot=dialog-popup]:has([data-slot=dialog-panel])]:pb-3 max-sm:pb-4`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Y.jsx)(`div`,{className:i,"data-slot":`dialog-header`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function it(e){let t=(0,X.c)(11),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,variant:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=i===void 0?`default`:i,o=a==="default"&&`border-t bg-muted/72 py-4`,s=a===`bare`&&`in-[[data-slot=dialog-popup]:has([data-slot=dialog-panel])]:pt-3 pt-4 pb-6`,c;t[4]!==n||t[5]!==o||t[6]!==s?(c=H(`flex flex-col-reverse gap-2 px-6 sm:flex-row sm:justify-end sm:rounded-b-[calc(var(--radius-2xl)-1px)]`,o,s,n),t[4]=n,t[5]=o,t[6]=s,t[7]=c):c=t[7];let l;return t[8]!==r||t[9]!==c?(l=(0,Y.jsx)(`div`,{className:c,"data-slot":`dialog-footer`,...r}),t[8]=r,t[9]=c,t[10]=l):l=t[10],l}function at(e){let t=(0,X.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=H(`font-heading font-semibold text-xl leading-none`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Y.jsx)($,{className:i,"data-slot":`dialog-title`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function ot(e){let t=(0,X.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=H(`text-muted-foreground text-sm`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Y.jsx)(Ae,{className:i,"data-slot":`dialog-description`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function st(e){let t=(0,X.c)(12),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,scrollFade:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=i===void 0||i,o;t[4]===n?o=t[5]:(o=H(`p-6 in-[[data-slot=dialog-popup]:has([data-slot=dialog-header])]:pt-1 in-[[data-slot=dialog-popup]:has([data-slot=dialog-footer]:not(.border-t))]:pb-1`,n),t[4]=n,t[5]=o);let s;t[6]!==r||t[7]!==o?(s=(0,Y.jsx)(`div`,{className:o,"data-slot":`dialog-panel`,...r}),t[6]=r,t[7]=o,t[8]=s):s=t[8];let c;return t[9]!==a||t[10]!==s?(c=(0,Y.jsx)(ge,{scrollFade:a,children:s}),t[9]=a,t[10]=s,t[11]=c):c=t[11],c}export{ye as A,De as C,J as D,Ce as E,W as M,G as N,xe as O,ke as S,we as T,He as _,rt as a,Ae as b,at as c,Ye as d,Ke as f,Ue as g,We as h,it as i,q as j,K as k,Qe as l,$ as m,$e as n,st as o,qe as p,ot as r,nt as s,Xe as t,Je as u,Fe as v,Te as w,Q as x,Pe as y};
2
+ //# sourceMappingURL=dialog-mwxYKYq-.js.map
@@ -0,0 +1,2 @@
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{Wa as t}from"./Stream-mUTFnSY9.js";import{At as n,Ct as r,I as i,J as a,Ot as o,_t as s,bt as c,gt as l,it as ee,mt as u,q as d,v as f}from"./useOpenInteractionType-KsRrk6uH.js";import{At as p,D as m,Dt as h,E as g,Et as _,J as v,O as y,Ot as b,S as x,T as S,Tt as C,Ut as w,Vt as T,Wt as te,Y as ne,in as E,it as re,kt as D,mn as O,mt as ie,nn as ae,rn as k,tn as oe,un as A,w as se,wt as ce,x as j,yn as le}from"./CompositeItem-DTyKsv13.js";function ue(e){let{open:t=!1,onOpenChange:n,elements:r={}}=e,a=j(),o=d()!=null,s=le(()=>new i({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new f,floatingId:a,syncOnly:!1,nested:o})).current;return A(()=>{let e={open:t,floatingId:a};r.reference!==void 0&&(e.referenceElement=r.reference,e.domReferenceElement=w(r.reference)?r.reference:null),r.floating!==void 0&&(e.floatingElement=r.floating),s.update(e)},[t,a,r.reference,r.floating,s]),s.context.onOpenChange=n,s.context.nested=o,s}var M=e(t(),1),de=`Escape`;function fe(e){return o&&e.movementX===0&&e.movementY===0}function N(e,t,n){switch(e){case`vertical`:return t;case`horizontal`:return n;default:return t||n}}function P(e,t){return N(t,e===`ArrowUp`||e===`ArrowDown`,e===`ArrowLeft`||e===`ArrowRight`)}function pe(e,t,n){return N(t,e===`ArrowDown`,n?e===`ArrowLeft`:e===`ArrowRight`)||e===`Enter`||e===` `||e===``}function me(e,t,n){return N(t,n?e===b:e===D,e===h)}function he(e,t,n,r){return t===`both`||t===`horizontal`&&r?e===de:N(t,n?e===D:e===b,e===p)}function F(e,t){let{listRef:n,activeIndex:i,onNavigate:o=()=>{},enabled:f=!0,selectedIndex:p=null,allowEscape:h=!1,loopFocus:g=!1,nested:y=!1,rtl:b=!1,virtual:w=!1,focusItemOnOpen:T=`auto`,focusItemOnHover:E=!0,openOnArrowKeyDown:D=!0,disabledIndices:O=void 0,orientation:j=`vertical`,parentOrientation:le,id:ue,resetOnPointerLeave:de=!0,externalTree:N,grid:F}=t,ge=F!=null,I=`rootStore`in e?e.rootStore:e,L=I.useState(`open`),R=I.useState(`floatingElement`),z=I.useState(`domReferenceElement`),_e=I.context.dataRef,ve=c(R),ye=r(z),B=s(ve),be=d(),V=a(N),H=M.useRef(T),U=M.useRef(p??-1),W=M.useRef(null),G=M.useRef(!0),K=v(e=>{o(U.current===-1?null:U.current,e)}),q=M.useRef(!!R),xe=M.useRef(L),J=M.useRef(!1),Y=M.useRef(!1),Se=M.useRef(null),Ce=s(O),X=s(L),Z=s(p),we=s(de),Te=l(),Ee=l(),De=v(()=>{function e(e){w?V?.events.emit(`virtualfocus`,e):Se.current=ee(e,{sync:J.current,preventScroll:!0})}let t=n.current[U.current],r=Y.current;t&&e(t),(J.current?e=>e():e=>Te.request(e))(()=>{let i=n.current[U.current]||t;i&&(t||e(i),je&&(r||!G.current)&&i.scrollIntoView?.({block:`nearest`,inline:`nearest`}))})});A(()=>{_e.current.orientation=j},[_e,j]),A(()=>{f&&(L&&R?(U.current=p??-1,H.current&&p!=null&&(Y.current=!0,K())):q.current&&(U.current=-1,K()))},[f,L,R,p,K]),A(()=>{if(f){if(!L){J.current=!1;return}if(R)if(i==null){if(J.current=!1,Z.current!=null)return;if(q.current&&(U.current=-1,De()),(!xe.current||!q.current)&&H.current&&(W.current!=null||H.current===!0&&W.current==null)){let e=0,t=()=>{n.current[0]==null?(e<2&&(e?e=>Ee.request(e):queueMicrotask)(t),e+=1):(U.current=W.current==null||pe(W.current,j,b)||y?S(n):se(n),W.current=null,K())};t()}}else m(n.current,i)||(U.current=i,De(),Y.current=!1)}},[f,L,R,i,Z,y,n,j,b,K,De,Ee]),A(()=>{if(!f||R||!V||w||!q.current)return;let e=V.nodesRef.current,t=e.find(e=>e.id===be)?.context?.elements.floating,n=ce(u(z??t??null)),r=e.some(e=>e.context&&C(e.context.elements.floating,n));t&&!r&&G.current&&t.focus({preventScroll:!0})},[f,R,z,V,be,w]),A(()=>{xe.current=L,q.current=!!R}),A(()=>{L||(W.current=null,H.current=T)},[L,T]);let Oe=i!=null,ke=v(e=>{if(!X.current)return;let t=n.current.indexOf(e.currentTarget);t!==-1&&(U.current!==t||i!==t)&&(U.current=t,K(e))}),Q=v(()=>le??V?.nodesRef.current.find(e=>e.id===be)?.context?.dataRef?.current.orientation),Ae=v(()=>S(n,Ce.current)),$=v(e=>{if(G.current=!1,J.current=!0,e.which===229||!X.current&&e.currentTarget===B.current)return;if(y&&he(e.key,j,b,ge)){P(e.key,Q())||k(e),I.setOpen(!1,ne(ie,e.nativeEvent)),te(z)&&(w?V?.events.emit(`virtualfocus`,z):z.focus());return}let t=U.current,r=S(n,O),i=se(n,O);if(ye||(e.key===`Home`&&(k(e),U.current=r,K(e)),e.key===`End`&&(k(e),U.current=i,K(e))),F!=null){let t=F(e,U.current,n,j,g,b,O,r,i);if(t!=null&&(U.current=t,K(e)),j===`both`)return}if(P(e.key,j)){if(k(e),L&&!w&&ce(e.currentTarget.ownerDocument)===e.currentTarget){U.current=pe(e.key,j,b)?r:i,K(e);return}pe(e.key,j,b)?g?t>=i?h&&t!==n.current.length?U.current=-1:(J.current=!1,U.current=r):U.current=x(n.current,{startingIndex:t,disabledIndices:O}):U.current=Math.min(i,x(n.current,{startingIndex:t,disabledIndices:O})):g?t<=r?h&&t!==-1?U.current=n.current.length:(J.current=!1,U.current=i):U.current=x(n.current,{startingIndex:t,decrement:!0,disabledIndices:O}):U.current=Math.max(r,x(n.current,{startingIndex:t,decrement:!0,disabledIndices:O})),m(n.current,U.current)&&(U.current=-1),K(e)}}),je=M.useMemo(()=>({onFocus(e){J.current=!0,ke(e)},onClick:({currentTarget:e})=>e.focus({preventScroll:!0}),onMouseMove(e){fe(e)||(J.current=!0,Y.current=!1,E&&ke(e))},onPointerLeave(e){if(!X.current||!G.current||e.pointerType===`touch`)return;J.current=!0;let t=e.relatedTarget;if(!(!E||n.current.includes(t))&&we.current&&(Se.current?.(),Se.current=null,U.current=-1,K(e),!w)){let e=B.current,t=ce(u(e));e&&C(e,t)&&e.focus({preventScroll:!0})}}}),[ke,X,B,E,n,K,we,w]),Me=M.useMemo(()=>w&&L&&Oe&&{"aria-activedescendant":`${ue}-${i}`},[w,L,Oe,ue,i]),Ne=M.useMemo(()=>({"aria-orientation":j===`both`?void 0:j,...ye?{}:Me,onKeyDown(e){if(e.key===`Tab`&&e.shiftKey&&L&&!w){let t=_(e.nativeEvent);if(t&&!C(B.current,t))return;k(e),I.setOpen(!1,ne(re,e.nativeEvent)),te(z)&&z.focus();return}$(e)},onPointerMove(e){fe(e)||(G.current=!0)}}),[Me,$,B,j,ye,I,L,w,z]),Pe=M.useMemo(()=>{function e(e){I.setOpen(!0,ne(ie,e.nativeEvent,e.currentTarget))}function t(e){T===`auto`&&oe(e.nativeEvent)&&(H.current=!w)}function n(e){H.current=T,T===`auto`&&ae(e.nativeEvent)&&(H.current=!0)}return{onKeyDown(t){let n=I.select(`open`);G.current=!1;let r=t.key.startsWith(`Arrow`),i=me(t.key,Q(),b),a=P(t.key,j),o=(y?i:a)||t.key===`Enter`||t.key.trim()===``;if(w&&n)return $(t);if(!(!n&&!D&&r)){if(o){let e=P(t.key,Q());W.current=y&&e?null:t.key}if(y){i&&(k(t),n?(U.current=Ae(),K(t)):e(t));return}a&&(Z.current!=null&&(U.current=Z.current),k(t),!n&&D?e(t):$(t),n&&K(t))}},onFocus(e){I.select(`open`)&&!w&&(U.current=-1,K(e))},onPointerDown:n,onPointerEnter:n,onMouseDown:t,onClick:t}},[$,T,Ae,y,K,I,D,j,Q,b,Z,w]),Fe=M.useMemo(()=>({...Me,...Pe}),[Me,Pe]);return M.useMemo(()=>f?{reference:Fe,floating:Ne,item:je,trigger:Pe}:{},[f,Fe,Ne,Pe,je])}function ge(e,t){let{listRef:r,elementsRef:i,activeIndex:a,onMatch:o,disabledIndices:s,onTyping:c,enabled:l=!0,resetMs:ee=750,selectedIndex:u=null}=t,d=`rootStore`in e?e.rootStore:e,f=d.useState(`open`),p=n(),m=M.useRef(``),h=M.useRef(u??a??-1),_=M.useRef(null),b=v(e=>{function t(e){return i?.current[e]}function n(e){let n=t(e);return n&&!g(n)||n?.matches(`:disabled`)?!1:s==null||!y(O,e,s)}function l(e,t,r=0){if(e.length===0)return-1;let i=(r%e.length+e.length)%e.length,a=t.toLowerCase();for(let t=0;t<e.length;t+=1){let r=(i+t)%e.length;if(!(!e[r]?.toLowerCase().startsWith(a)||!n(r)))return r}return-1}let d=r.current;if(m.current.length>0&&e.key===` `&&(k(e),c?.(!0)),m.current.length>0&&m.current[0]!==` `&&l(d,m.current)===-1&&e.key!==` `&&c?.(!1),d==null||e.key.length!==1||e.ctrlKey||e.metaKey||e.altKey)return;f&&e.key!==` `&&(k(e),c?.(!0));let v=m.current===``;v&&(h.current=u??a??-1),d.every((e,t)=>e&&n(t)?e[0]?.toLowerCase()!==e[1]?.toLowerCase():!0)&&m.current===e.key&&(m.current=``,h.current=_.current),m.current+=e.key,p.start(ee,()=>{m.current=``,h.current=_.current,c?.(!1)});let b=((v?u??a??-1:h.current)??0)+1,x=l(d,m.current,b);x===-1?e.key!==` `&&(m.current=``,c?.(!1)):(o?.(x),_.current=x)}),x=v(e=>{let t=e.relatedTarget,n=d.select(`domReferenceElement`),r=d.select(`floatingElement`);C(n,t)||C(r,t)||(p.clear(),m.current=``,h.current=_.current,c?.(!1))});A(()=>{!f&&u!==null||(p.clear(),_.current=null,m.current!==``&&(m.current=``))},[f,u,p]);let S=M.useMemo(()=>({onKeyDown:b,onBlur:x}),[b,x]);return M.useMemo(()=>l?{reference:S,floating:S}:{},[l,S])}var I=5;function L(e,t){let n=R(t);return e.clientX>=n.left-I&&e.clientX<=n.right+I&&e.clientY>=n.top-I&&e.clientY<=n.bottom+I}function R(e){let t=e.getBoundingClientRect(),n=T(e);if(E)return t;let r=n.getComputedStyle(e,`::before`),i=n.getComputedStyle(e,`::after`);if(r.content===`none`&&i.content===`none`)return t;let a=parseFloat(r.width)||0,o=parseFloat(r.height)||0,s=parseFloat(i.width)||0,c=parseFloat(i.height)||0,l=Math.max(t.width,a,s),ee=Math.max(t.height,o,c),u=l-t.width,d=ee-t.height;return{left:t.left-u/2,right:t.right+u/2,top:t.top-d/2,bottom:t.bottom+d/2}}export{ue as i,ge as n,F as r,L as t};
2
+ //# sourceMappingURL=getPseudoElementBounds-DJTX-eyW.js.map