offsite 0.0.94 → 0.0.96

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 (30) hide show
  1. package/apps/client/dist/assets/{XIcon-CDJz0EhT.js → XIcon-sNE7wlGT.js} +4 -4
  2. package/apps/client/dist/assets/{audio-player-CEvt4CVB.js → audio-player-DosgEDBw.js} +1 -1
  3. package/apps/client/dist/assets/{button-CWFREsRn.js → button-BnzxfmO3.js} +1 -1
  4. package/apps/client/dist/assets/diff-panel-D9sGyf1Y.js +260 -0
  5. package/apps/client/dist/assets/{dist-C_Y10kCd.js → dist-DNx_j6Py.js} +1 -1
  6. package/apps/client/dist/assets/{editor-dialog-CEMtEtdH.js → editor-dialog-De_ijtFY.js} +7 -7
  7. package/apps/client/dist/assets/{image-viewer-3S4rNjFt.js → image-viewer-DuyADV75.js} +1 -1
  8. package/apps/client/dist/assets/index-9ox1jth4.js +72 -0
  9. package/apps/client/dist/assets/index-dtN3QMc8.css +2 -0
  10. package/apps/client/dist/assets/panel-close-button-yIEA8ujQ.js +1 -0
  11. package/apps/client/dist/assets/{preview-dialog-BuSSuMeQ.js → preview-dialog-CPV2cjGd.js} +2 -2
  12. package/apps/client/dist/assets/{react-BgpkckXP.js → react-aDzERmfM.js} +1 -1
  13. package/apps/client/dist/assets/{tooltip-CKPboHje.js → tooltip-CU6Gh-yj.js} +1 -1
  14. package/apps/client/dist/assets/{use-editor-shortcut-auobREOP.js → use-editor-shortcut-BoixVvhO.js} +26 -26
  15. package/apps/client/dist/assets/{utils-U6QfaJBO.js → utils-Cih_T9uV.js} +1 -1
  16. package/apps/client/dist/assets/{video-viewer-gcKzQe3N.js → video-viewer-DbYvGHLh.js} +1 -1
  17. package/apps/client/dist/assets/zoomable-image-D0X1OvmT.js +1 -0
  18. package/apps/client/dist/assets/{zoomable-image-BD-kkiyn.js → zoomable-image-D6TeXYQ9.js} +1 -1
  19. package/apps/client/dist/index.html +10 -10
  20. package/apps/client/dist/sw.js +1 -1
  21. package/apps/server/dist/main.mjs +582 -150
  22. package/apps/server/dist/main.mjs.map +1 -1
  23. package/apps/server/drizzle/20261108212949_last_efforts/migration.sql +6 -0
  24. package/apps/server/drizzle/20261108212949_last_efforts/snapshot.json +495 -0
  25. package/package.json +1 -1
  26. package/apps/client/dist/assets/diff-panel-CeJqpNi8.js +0 -260
  27. package/apps/client/dist/assets/index-B7o5cqzG.js +0 -72
  28. package/apps/client/dist/assets/index-BwL3keyv.css +0 -2
  29. package/apps/client/dist/assets/panel-close-button-Bf-0TdmN.js +0 -1
  30. package/apps/client/dist/assets/zoomable-image-_HGrW8wW.js +0 -1
@@ -1 +1 @@
1
- import{a as e,c as t,d as n,f as r,n as i,s as a,t as o}from"./react-BgpkckXP.js";import{c as s,t as c}from"./utils-U6QfaJBO.js";var l=s();function u(s){return(0,l.jsx)(`span`,{className:c(`border-border bg-muted inline-flex rounded-lg border align-top`,s.className),children:(0,l.jsxs)(i,{audio:!0,className:`w-full rounded-lg outline-none [--media-background-color:transparent] [--media-control-background:transparent] [--media-control-hover-background:var(--accent)] [--media-font-family:inherit] [--media-primary-color:var(--foreground)] [--media-range-bar-color:var(--primary)] [--media-range-thumb-background:var(--primary)] [--media-range-track-background:var(--border)] [--media-range-track-border-radius:9999px] [--media-secondary-color:transparent] [--media-text-color:var(--muted-foreground)] [--media-time-range-buffered-color:var(--border)]`,children:[(0,l.jsx)(`audio`,{slot:`media`,src:s.src,"aria-label":s.label,preload:`metadata`,onError:s.onError}),(0,l.jsxs)(o,{className:`w-full px-1 pb-1 *:p-2`,children:[(0,l.jsx)(a,{}),(0,l.jsx)(r,{className:`grow`}),(0,l.jsx)(n,{showDuration:!0}),(0,l.jsx)(e,{}),(0,l.jsx)(t,{})]})]})})}export{u as AudioPlayer};
1
+ import{a as e,c as t,d as n,f as r,n as i,s as a,t as o}from"./react-aDzERmfM.js";import{l as s,t as c}from"./utils-Cih_T9uV.js";var l=s();function u(s){return(0,l.jsx)(`span`,{className:c(`border-border bg-muted inline-flex rounded-lg border align-top`,s.className),children:(0,l.jsxs)(i,{audio:!0,className:`w-full rounded-lg outline-none [--media-background-color:transparent] [--media-control-background:transparent] [--media-control-hover-background:var(--accent)] [--media-font-family:inherit] [--media-primary-color:var(--foreground)] [--media-range-bar-color:var(--primary)] [--media-range-thumb-background:var(--primary)] [--media-range-track-background:var(--border)] [--media-range-track-border-radius:9999px] [--media-secondary-color:transparent] [--media-text-color:var(--muted-foreground)] [--media-time-range-buffered-color:var(--border)]`,children:[(0,l.jsx)(`audio`,{slot:`media`,src:s.src,"aria-label":s.label,preload:`metadata`,onError:s.onError}),(0,l.jsxs)(o,{className:`w-full px-1 pb-1 *:p-2`,children:[(0,l.jsx)(a,{}),(0,l.jsx)(r,{className:`grow`}),(0,l.jsx)(n,{showDuration:!0}),(0,l.jsx)(e,{}),(0,l.jsx)(t,{})]})]})})}export{u as AudioPlayer};
@@ -1 +1 @@
1
- import{i as e}from"./rolldown-runtime-COiEfhsA.js";import{c as t,l as n,s as r,t as i}from"./utils-U6QfaJBO.js";var a=e(n()),o={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`},s=(0,a.forwardRef)(({color:e=`currentColor`,size:t=24,strokeWidth:n,absoluteStrokeWidth:r=!1,className:i=``,altIcon:s,showAlt:c=!1,icon:l,primaryColor:u,secondaryColor:d,disableSecondaryOpacity:f=!1,...p},m)=>{let h=n===void 0?void 0:r?Number(n)*24/Number(t):n,g=h===void 0?{}:{strokeWidth:h,stroke:`currentColor`},_={ref:m,...o,width:t,height:t,color:u||e,className:i,...g,...p},v=[...c&&s?s:l].sort(([,e],[,t])=>{let n=e.opacity!==void 0;return t.opacity===void 0?n?-1:0:1}).map(([t,n])=>{let r=n.opacity!==void 0,i=r&&!f?n.opacity:void 0,o=d?{...n.stroke===void 0?{fill:r?d:u||e}:{stroke:r?d:u||e}}:{};return(0,a.createElement)(t,{...n,...g,...o,opacity:i,key:n.key})});return(0,a.createElement)(`svg`,_,v)});s.displayName=`HugeiconsIcon`;var c=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,l=r,u=(e,t)=>n=>{if(t?.variants==null)return l(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=c(t)||c(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return l(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},d=Object.defineProperty,f=(e,t)=>d(e,`name`,{value:t,configurable:!0});function p(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}f(p,`setRef`);function m(...e){return t=>{let n=!1,r=e.map(e=>{let r=p(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():p(e[t],null)}}}}f(m,`composeRefs`);function h(...e){return a.useCallback(m(...e),e)}f(h,`useComposedRefs`);var g=Object.defineProperty,_=(e,t)=>g(e,`name`,{value:t,configurable:!0});function v(e){let t=a.forwardRef((t,n)=>{let{children:r,...i}=t,o=null,s=!1,c=[];r=k(r),a.Children.forEach(r,e=>{if(T(e)){s=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;for(;D(n)&&typeof N==`function`;)n=N(n._payload);o=S(t,n),c.push(o?.props?.children)}else c.push(e)}),o?o=a.cloneElement(o,void 0,c):!s&&a.Children.count(r)===1&&a.isValidElement(r)&&(o=r);let l=o?w(o):void 0,u=h(n,l);if(!o){if(r||r===0)throw Error(s?M(e):j(e));return r}let d=C(i,o.props??{});return o.type!==a.Fragment&&(d.ref=n?u:l),a.cloneElement(o,d)});return t.displayName=`${e}.Slot`,t}_(v,`createSlot`);var y=v(`Slot`),b=Symbol.for(`radix.slottable`);function x(e){let t=_(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=b,t}_(x,`createSlottable`);var S=_((e,t)=>`child`in e.props?a.isValidElement(t)?a.cloneElement(t,void 0,e.props.children(t.props.children)):null:a.isValidElement(t)?t:null,`getSlottableElementFromSlottable`);function C(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`?n[r]=[i,a].filter(Boolean).join(` `):r===`aria-describedby`&&(n[r]=A(a,i))}return{...e,...n}}_(C,`mergeProps`);function w(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}_(w,`getElementRef`);function T(e){return a.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===b}_(T,`isSlottable`);var E=Symbol.for(`react.lazy`);function D(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===E&&`_payload`in e&&O(e._payload)}_(D,`isLazyComponent`);function O(e){return typeof e==`object`&&!!e&&`then`in e}_(O,`isPromiseLike`);function k(e){let t=e;for(;D(t)&&typeof N==`function`;)t=N(t._payload);return t}_(k,`useUnwrappedLazy`);function A(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}_(A,`concatAriaDescribedby`);var j=_(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),M=_(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),N=a.use,P=t(),F=u(`relative inline-flex shrink-0 cursor-pointer items-center justify-center gap-2 rounded-[var(--control-radius)] border text-sm font-medium whitespace-nowrap outline-none transition-[box-shadow,scale] select-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset disabled:pointer-events-none disabled:opacity-64 [&:active:not([aria-haspopup])]:scale-[0.97] [&_svg]:pointer-events-none [&_svg]:-mx-0.5 [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`border-primary bg-primary text-primary-foreground shadow-xs shadow-primary/24 not-disabled:inset-shadow-[0_1px_rgb(255_255_255/16%)] hover:bg-primary/90 active:shadow-none`,outline:`border-input bg-popover text-foreground shadow-xs/5 hover:bg-accent/50 dark:bg-input/32 dark:hover:bg-input/64 [&_svg:not([class*=text-])]:text-muted-foreground`,secondary:`border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/90 dark:bg-input/32 dark:hover:bg-input/64`,ghost:`border-transparent text-foreground hover:bg-accent aria-expanded:bg-accent [&_svg:not([class*=text-])]:text-muted-foreground`,"ghost-muted":`border-transparent text-muted-foreground hover:bg-accent hover:text-foreground aria-expanded:bg-accent`,destructive:`border-transparent bg-destructive/90 text-white shadow-xs shadow-destructive/24 hover:bg-destructive`},size:{default:`h-9 gap-1.5 px-[calc(--spacing(2.5)-1px)]`,sm:`h-8 gap-1.5 px-[calc(--spacing(2.5)-1px)]`,xs:`h-7 gap-1 px-[calc(--spacing(2)-1px)] text-xs [&_svg:not([class*='size-'])]:size-3.5`,icon:`size-9`,"icon-sm":`size-8`,"icon-xs":`size-7 [&_svg:not([class*='size-'])]:size-3.5`,"icon-micro":`size-6 rounded-sm p-0`}},defaultVariants:{variant:`default`,size:`default`}});function I({className:e,variant:t=`default`,size:n=`default`,asChild:r=!1,...a}){let o=r?y:`button`;return(0,P.jsx)(o,{"data-slot":`button`,"data-variant":t,"data-size":n,className:i(F({variant:t,size:n,className:e})),...a})}export{s as a,h as i,v as n,x as r,I as t};
1
+ import{i as e}from"./rolldown-runtime-COiEfhsA.js";import{c as t,l as n,t as r,u as i}from"./utils-Cih_T9uV.js";var a=e(i()),o={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`},s=(0,a.forwardRef)(({color:e=`currentColor`,size:t=24,strokeWidth:n,absoluteStrokeWidth:r=!1,className:i=``,altIcon:s,showAlt:c=!1,icon:l,primaryColor:u,secondaryColor:d,disableSecondaryOpacity:f=!1,...p},m)=>{let h=n===void 0?void 0:r?Number(n)*24/Number(t):n,g=h===void 0?{}:{strokeWidth:h,stroke:`currentColor`},_={ref:m,...o,width:t,height:t,color:u||e,className:i,...g,...p},v=[...c&&s?s:l].sort(([,e],[,t])=>{let n=e.opacity!==void 0;return t.opacity===void 0?n?-1:0:1}).map(([t,n])=>{let r=n.opacity!==void 0,i=r&&!f?n.opacity:void 0,o=d?{...n.stroke===void 0?{fill:r?d:u||e}:{stroke:r?d:u||e}}:{};return(0,a.createElement)(t,{...n,...g,...o,opacity:i,key:n.key})});return(0,a.createElement)(`svg`,_,v)});s.displayName=`HugeiconsIcon`;var c=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,l=t,u=(e,t)=>n=>{if(t?.variants==null)return l(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=c(t)||c(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return l(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},d=Object.defineProperty,f=(e,t)=>d(e,`name`,{value:t,configurable:!0});function p(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}f(p,`setRef`);function m(...e){return t=>{let n=!1,r=e.map(e=>{let r=p(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():p(e[t],null)}}}}f(m,`composeRefs`);function h(...e){return a.useCallback(m(...e),e)}f(h,`useComposedRefs`);var g=Object.defineProperty,_=(e,t)=>g(e,`name`,{value:t,configurable:!0});function v(e){let t=a.forwardRef((t,n)=>{let{children:r,...i}=t,o=null,s=!1,c=[];r=k(r),a.Children.forEach(r,e=>{if(T(e)){s=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;for(;D(n)&&typeof N==`function`;)n=N(n._payload);o=S(t,n),c.push(o?.props?.children)}else c.push(e)}),o?o=a.cloneElement(o,void 0,c):!s&&a.Children.count(r)===1&&a.isValidElement(r)&&(o=r);let l=o?w(o):void 0,u=h(n,l);if(!o){if(r||r===0)throw Error(s?M(e):j(e));return r}let d=C(i,o.props??{});return o.type!==a.Fragment&&(d.ref=n?u:l),a.cloneElement(o,d)});return t.displayName=`${e}.Slot`,t}_(v,`createSlot`);var y=v(`Slot`),b=Symbol.for(`radix.slottable`);function x(e){let t=_(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=b,t}_(x,`createSlottable`);var S=_((e,t)=>`child`in e.props?a.isValidElement(t)?a.cloneElement(t,void 0,e.props.children(t.props.children)):null:a.isValidElement(t)?t:null,`getSlottableElementFromSlottable`);function C(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`?n[r]=[i,a].filter(Boolean).join(` `):r===`aria-describedby`&&(n[r]=A(a,i))}return{...e,...n}}_(C,`mergeProps`);function w(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}_(w,`getElementRef`);function T(e){return a.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===b}_(T,`isSlottable`);var E=Symbol.for(`react.lazy`);function D(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===E&&`_payload`in e&&O(e._payload)}_(D,`isLazyComponent`);function O(e){return typeof e==`object`&&!!e&&`then`in e}_(O,`isPromiseLike`);function k(e){let t=e;for(;D(t)&&typeof N==`function`;)t=N(t._payload);return t}_(k,`useUnwrappedLazy`);function A(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}_(A,`concatAriaDescribedby`);var j=_(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),M=_(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),N=a.use,P=n(),F=u(`relative inline-flex shrink-0 cursor-pointer items-center justify-center gap-2 rounded-[var(--control-radius)] border text-sm font-medium whitespace-nowrap outline-none transition-[box-shadow,scale] select-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset disabled:pointer-events-none disabled:opacity-64 [&:active:not([aria-haspopup])]:scale-[0.97] [&_svg]:pointer-events-none [&_svg]:-mx-0.5 [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`border-primary bg-primary text-primary-foreground shadow-xs shadow-primary/24 not-disabled:inset-shadow-[0_1px_rgb(255_255_255/16%)] hover:bg-primary/90 active:shadow-none`,outline:`border-input bg-popover text-foreground shadow-xs/5 hover:bg-accent/50 dark:bg-input/32 dark:hover:bg-input/64 [&_svg:not([class*=text-])]:text-muted-foreground`,secondary:`border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/90 dark:bg-input/32 dark:hover:bg-input/64`,ghost:`border-transparent text-foreground hover:bg-accent aria-expanded:bg-accent [&_svg:not([class*=text-])]:text-muted-foreground`,"ghost-muted":`border-transparent text-muted-foreground hover:bg-accent hover:text-foreground aria-expanded:bg-accent`,destructive:`border-transparent bg-destructive/90 text-white shadow-xs shadow-destructive/24 hover:bg-destructive`},size:{default:`h-9 gap-1.5 px-[calc(--spacing(2.5)-1px)]`,sm:`h-8 gap-1.5 px-[calc(--spacing(2.5)-1px)]`,xs:`h-7 gap-1 px-[calc(--spacing(2)-1px)] text-xs [&_svg:not([class*='size-'])]:size-3.5`,icon:`size-9`,"icon-sm":`size-8`,"icon-xs":`size-7 [&_svg:not([class*='size-'])]:size-3.5`,"icon-micro":`size-6 rounded-sm p-0`}},defaultVariants:{variant:`default`,size:`default`}});function I({className:e,variant:t=`default`,size:n=`default`,asChild:i=!1,...a}){let o=i?y:`button`;return(0,P.jsx)(o,{"data-slot":`button`,"data-variant":t,"data-size":n,className:r(F({variant:t,size:n,className:e})),...a})}export{s as a,h as i,v as n,x as r,I as t};
@@ -0,0 +1,260 @@
1
+ import{i as e}from"./rolldown-runtime-COiEfhsA.js";import{a as t,c as n,o as r,r as i,t as a}from"./panel-close-button-yIEA8ujQ.js";import{n as o,r as s,t as c}from"./TextWrapIcon-BRhMbXe9.js";import{t as l}from"./ChevronsDownUpIcon-BNVFd2te.js";import{a as u,t as d}from"./button-BnzxfmO3.js";import{An as f,Ft as p,G as m,Gn as h,N as g,P as _,W as v,Wn as y,at as b,cn as x,gt as S,ot as C,zt as w}from"./dist-Jliw2AH0.js";import{l as T,r as E,u as D}from"./utils-Cih_T9uV.js";import{L as O,N as k,P as A,g as j,on as M}from"./XIcon-sNE7wlGT.js";var N=[[`path`,{d:`M18.2505 10.5H19.6403C21.4918 10.5 22.0421 10.7655 21.9975 12.0838C21.9237 14.2674 20.939 16.8047 17 17.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M5.94627 20.6145C2.57185 18.02 2.07468 14.3401 2.00143 10.5001C1.96979 8.8413 2.45126 8.5 4.65919 8.5H15.3408C17.5487 8.5 18.0302 8.8413 17.9986 10.5001C17.9253 14.3401 17.4281 18.02 14.0537 20.6145C13.0934 21.3528 12.2831 21.5 10.9194 21.5H9.08064C7.71686 21.5 6.90658 21.3528 5.94627 20.6145Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M11.3089 2.5C10.7622 2.83861 10.0012 4 10.0012 5.5M7.53971 4C7.53971 4 7 4.5 7 5.5M14.0012 4C13.7279 4.1693 13.5 5 13.5 5.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],P=[[`path`,{d:`M3.89124 3.89124C5.28249 2.5 7.52166 2.5 12 2.5C16.4783 2.5 18.7175 2.5 20.1088 3.89124C21.5 5.28249 21.5 7.52166 21.5 12C21.5 16.4783 21.5 18.7175 20.1088 20.1088C18.7175 21.5 16.4783 21.5 12 21.5C7.52166 21.5 5.28249 21.5 3.89124 20.1088C2.5 18.7175 2.5 16.4783 2.5 12C2.5 7.52166 2.5 5.28249 3.89124 3.89124Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M12 2.5V21.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`1`}]],F=[[`path`,{d:`M2.49219 15.5H21.4922`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M2.49219 8.5H21.4922`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M2.49219 12C2.49219 7.52166 2.49219 5.28249 3.88343 3.89124C5.27467 2.5 7.51384 2.5 11.9922 2.5C16.4705 2.5 18.7097 2.5 20.1009 3.89124C21.4922 5.28249 21.4922 7.52166 21.4922 12C21.4922 16.4783 21.4922 18.7175 20.1009 20.1088C18.7097 21.5 16.4705 21.5 11.9922 21.5C7.51384 21.5 5.27467 21.5 3.88343 20.1088C2.49219 18.7175 2.49219 16.4783 2.49219 12Z`,stroke:`currentColor`,strokeWidth:`1.5`,key:`2`}]],I=e(D(),1);function L(e){let t=(0,I.useRef)(e);return(0,I.useInsertionEffect)(()=>void(t.current=e)),(0,I.useCallback)((...e)=>t.current(...e),[])}var R=T(),z=(0,I.createContext)(void 0);function ee(){return(0,I.useContext)(z)}var B={position:`absolute`,top:0,bottom:0,textAlign:`center`,whiteSpace:`normal`,touchAction:`none`},V={display:`contents`};function H(){return null}function U({fileDiff:e,actions:t,renderCustomHeader:n,renderHeaderPrefix:r,renderHeaderFilenameSuffix:i,renderHeaderMetadata:a,renderAnnotation:o,renderGutterUtility:s,renderMergeConflictUtility:c,lineAnnotations:l,getHoveredLine:u,getInstance:d,getAnnotationSlotName:p=w}){let m=n?.(e),h=r?.(e),g=i?.(e),_=a?.(e);return(0,R.jsxs)(R.Fragment,{children:[m==null?(0,R.jsxs)(R.Fragment,{children:[h!=null&&(0,R.jsx)(`div`,{slot:`header-prefix`,children:h}),g!=null&&(0,R.jsx)(`div`,{slot:`header-filename-suffix`,children:g}),_!=null&&(0,R.jsx)(`div`,{slot:`header-metadata`,children:_})]}):(0,R.jsx)(`div`,{slot:f,children:m}),o!=null&&l?.map((t,n)=>(0,R.jsx)(`div`,{slot:p(t),children:o(t,e)},n)),t!=null&&c!=null&&d!=null&&t.map(t=>{if(t==null)return;let n=W(t,e);return(0,R.jsx)(`div`,{slot:n,style:V,children:c(t,d)},n)}),s!=null&&(0,R.jsx)(`div`,{slot:`gutter-utility-slot`,style:B,children:s(u)})]})}function W(e,t){let n=g(e,t);return n==null?void 0:_({hunkIndex:n.hunkIndex,lineIndex:n.lineIndex,conflictIndex:e.conflictIndex})}var G=(0,I.createContext)(void 0);function K(e,t){return typeof window>`u`&&t!=null?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`template`,{shadowrootmode:`open`,dangerouslySetInnerHTML:{__html:t}}),e]}):(0,R.jsx)(R.Fragment,{children:e})}var q=(0,I.createContext)(void 0);function J(){return(0,I.useContext)(q)}function Y(){let[e]=(0,I.useState)(()=>{let e=0,t;return{getSnapshot:()=>e,subscribe(e){return t=e,()=>{t=void 0}},forceUpdate(){e++,t?.()}}});return(0,I.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot),e.forceUpdate}function te(e,t){"use no memo";return e.current?.__getNextRenderData(t)}var ne=typeof window>`u`?I.useEffect:I.useLayoutEffect;function re({fileDiff:e,oldFile:t,newFile:n,options:r,editorOptions:i,editStateKey:a,lineAnnotations:o,selectedLines:s,prerenderedHTML:c,metrics:l,hasGutterRenderUtility:u,hasCustomHeader:d,disableWorkerPool:f,edit:p,onEditChange:g,onEditComplete:_}){let y=J(),b=s!==void 0,S=(0,I.useContext)(G),C=ee(),[T,E]=(0,I.useState)(),D=L(e=>g?.(e)),O=g==null?void 0:D,k=(0,I.useRef)(null),A=L(r=>{let i=_?.(r)??`reject`;return i===`accept`&&(k.current={fileDiff:{installed:r.fileDiff,stale:r.originalFileDiff},filePair:e==null?{fileDiff:r.fileDiff,installed:{oldFile:r.oldFile,newFile:r.newFile},stale:{oldFile:t??null,newFile:n??null}}:null,annotations:{installed:r.lineAnnotations,stale:r.originalLineAnnotations}}),i}),j=_==null?void 0:A,M=ie({acceptedCache:k,fileDiff:e,newFile:n,oldFile:t,parseDiffOptions:r?.parseDiffOptions}),N=(0,I.useRef)(null),P=Y(),F=te(N,ae(k,M,o))??{fileDiff:M,lineAnnotations:o??h},R=(0,I.useRef)(null),z=(0,I.useRef)(null),B=L(()=>{if(C==null)throw Error(`FileDiff: EditContext is not attached`);return C(`file-diff`,i??{},a)}),V=L(e=>{if(e!=null){if(N.current!=null)throw Error(`useFileDiffInstance: An instance should not already exist when a node is created`);y==null?N.current=new m(Q({controlledSelection:b,hasCustomHeader:d,hasGutterRenderUtility:u,onEditChange:O,onEditComplete:j,options:r}),f?void 0:S,P):N.current=new v(Q({controlledSelection:b,hasCustomHeader:d,hasGutterRenderUtility:u,onEditChange:O,onEditComplete:j,options:r}),y,l,f?void 0:S,P),N.current.hydrate({fileDiff:M,fileContainer:e,lineAnnotations:o,prerenderedHTML:c})}else{if(N.current==null)throw Error(`useFileDiffInstance: A FileDiff instance should exist when unmounting`);z.current=null,N.current.cleanUp(),N.current=null,R.current=null}});ne(()=>{let{current:e}=N;if(e==null)return;let t=Q({controlledSelection:b,hasCustomHeader:d,hasGutterRenderUtility:u,onEditChange:O,onEditComplete:j,options:r}),n=!x(e.options,t);if(e.setOptions(t),!p&&(z.current=null,R.current!=null)){let{current:e}=R;R.current=null,e()}let i=oe(M,o,k);if(e.render({forceRender:n,fileDiff:i.fileDiff,lineAnnotations:i.lineAnnotations}),s!==void 0&&e.setSelectedLines(s),!p||R.current!=null)return;if(C==null)throw Error(`FileDiff: EditContext is not attached`);let a=()=>{N.current===e&&R.current==null&&e.__canAttachEditor()&&(R.current=se(e,B),P())};if(e.__canAttachEditor()){z.current=null,a();return}let c=e.__prepareForEditing();if(c==null){z.current=null;return}if(z.current?.promise===c)return;let l={promise:c};z.current=l,c.then(()=>{z.current===l&&(a(),z.current=null)}).catch(e=>{z.current===l&&(z.current=null,E(e))})});let H=(0,I.useCallback)(()=>N.current?.getHoveredLine(),[]),U=(0,I.useCallback)(e=>N.current?.getAnnotationSlotName(e)??w(e),[]);if(T!=null)throw T;return{...F,ref:V,getHoveredLine:H,getAnnotationSlotName:U}}function ie({acceptedCache:e,fileDiff:t,newFile:n,oldFile:r,parseDiffOptions:i}){return(0,I.useMemo)(()=>{if(t!=null)return t;let{current:a}=e,o=a?.filePair;if(a!=null&&o!=null){if(X(r,n,o.stale)||X(r,n,o.installed))return o.fileDiff;a.filePair=null}return b(r??null,n??null,i)},[e,t,r,n,i])}function X(e,t,n){return p(e??void 0,n.oldFile??void 0)&&p(t??void 0,n.newFile??void 0)}function ae(e,t,n){"use no memo";return Z(t,n,e.current)}function Z(e,t,n){return{fileDiff:n?.fileDiff!=null&&S(e,n.fileDiff.stale)?n.fileDiff.installed:e,lineAnnotations:n?.annotations!=null&&t===n.annotations.stale?n.annotations.installed:t}}function oe(e,t,n){let{current:r}=n,i=Z(e,t,r);return r==null||(r.fileDiff!=null&&!S(e,r.fileDiff.stale)&&(r.fileDiff=null),t!==r.annotations?.stale&&(r.annotations=null),r.fileDiff==null&&r.annotations==null&&r.filePair==null&&(n.current=null)),i}function Q({options:e,controlledSelection:t,hasCustomHeader:n,hasGutterRenderUtility:r,onEditChange:i,onEditComplete:a}){return{...e,controlledSelection:t,renderCustomHeader:n?H:e?.renderCustomHeader,renderGutterUtility:r?H:e?.renderGutterUtility,onEditChange:i,onEditComplete:a}}function se(e,t){let n=t();try{return n.edit(e)}catch(e){throw n.cleanUp(),e}}function ce({fileDiff:e,options:t,editorOptions:n,editStateKey:r,metrics:i,lineAnnotations:a,selectedLines:o,className:s,style:c,prerenderedHTML:l,renderAnnotation:u,renderCustomHeader:d,renderHeaderPrefix:f,renderHeaderFilenameSuffix:p,renderHeaderMetadata:m,renderGutterUtility:h,disableWorkerPool:g=!1,edit:_=!1,onEditChange:v,onEditComplete:b}){let{ref:x,getHoveredLine:S,getAnnotationSlotName:C,fileDiff:w,lineAnnotations:T}=re({fileDiff:e,options:t,editorOptions:n,editStateKey:r,metrics:i,lineAnnotations:a,selectedLines:o,prerenderedHTML:l,hasGutterRenderUtility:h!=null,hasCustomHeader:d!=null,disableWorkerPool:g,edit:_,onEditChange:v,onEditComplete:b}),E=U({fileDiff:w,renderCustomHeader:d,renderHeaderPrefix:f,renderHeaderFilenameSuffix:p,renderHeaderMetadata:m,renderAnnotation:u,renderGutterUtility:h,lineAnnotations:T,getHoveredLine:S,getAnnotationSlotName:C});return(0,R.jsx)(y,{ref:x,className:s,style:c,children:K(E,l)})}var le=3e3,ue=`text-foreground hover:bg-accent aria-pressed:bg-accent inline-flex h-7 min-w-7 cursor-pointer items-center justify-center rounded-lg px-1.5 [&_svg]:opacity-80`,$=`text-muted-foreground hover:text-foreground aria-pressed:bg-background aria-pressed:text-foreground dark:aria-pressed:bg-input/72 inline-flex h-6 cursor-pointer items-center justify-center rounded-md px-2.5 aria-pressed:shadow-xs`;function de(e){let[f,p]=(0,I.useState)(null),[m,h]=(0,I.useState)(null),[g,_]=(0,I.useState)(0),v=(0,I.useRef)({patch:null,count:0}),y=A(e=>e.prefs.diff),b=O(),[x,S]=i(`diffFlipped`,[]);function w(e){k({...j().prefs,diff:{...y,...e}})}(0,I.useEffect)(()=>{let t=!0,n=!1;async function r(){if(!n){n=!0;try{let n=await M(e.machine,`git.diff`,{projectId:e.projectId});if(!t||(h(null),n===v.current.patch))return;v.current={patch:n,count:v.current.count+1},p(n.trim()===``?[]:C(n,`${e.projectId}:${v.current.count}`).flatMap(e=>e.files))}catch(e){t&&h(E(e))}finally{n=!1}}}function i(){document.hidden||r()}r();let a=window.setInterval(i,le);return window.addEventListener(`focus`,i),()=>{t=!1,window.clearInterval(a),window.removeEventListener(`focus`,i)}},[e.machine,e.projectId,e.running,g]);let T=f??[],D=n(T,e=>n(e.hunks,e=>e.additionLines)),L=n(T,e=>n(e.hunks,e=>e.deletionLines));return(0,R.jsxs)(`div`,{className:`bg-background flex h-full min-h-0 min-w-0 flex-col`,children:[(0,R.jsxs)(`div`,{className:`border-border/60 bg-background flex h-(--workspace-topbar-height) shrink-0 items-center justify-between gap-2 border-b pr-3 pl-3`,children:[(0,R.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1`,children:[(0,R.jsx)(a,{mobile:e.mobile,onClick:e.onClose}),(0,R.jsx)(`span`,{className:`text-foreground min-w-0 truncate text-xs font-medium`,children:`Uncommitted changes`})]}),(0,R.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1`,children:[T.length>0&&(0,R.jsxs)(`span`,{className:`text-2xs mr-1 inline-flex items-center gap-1 font-mono tabular-nums`,children:[(0,R.jsxs)(`span`,{className:`text-diff-addition`,children:[`+`,D]}),(0,R.jsxs)(`span`,{className:`text-diff-deletion`,children:[`-`,L]})]}),(0,R.jsx)(d,{size:`icon-sm`,variant:`ghost`,title:`Refresh diff`,"aria-label":`Refresh diff`,onClick:()=>_(g+1),children:(0,R.jsx)(u,{icon:o,className:`size-4`})}),T.length>0&&(0,R.jsx)(d,{size:`icon-sm`,variant:`ghost`,title:y.collapsed?`Expand all files`:`Collapse all files`,onClick:()=>{S([]),w({collapsed:!y.collapsed})},children:(0,R.jsx)(u,{icon:y.collapsed?t:l,className:`size-4`})}),(0,R.jsxs)(`div`,{className:`bg-input/40 flex shrink-0 items-center rounded-lg p-0.5`,children:[(0,R.jsx)(`button`,{className:$,"aria-pressed":!y.split,"aria-label":`Stacked diff view`,onClick:()=>w({split:!1}),children:(0,R.jsx)(u,{icon:F,className:`size-3.5`})}),(0,R.jsx)(`button`,{className:$,"aria-pressed":y.split,"aria-label":`Split diff view`,onClick:()=>w({split:!0}),children:(0,R.jsx)(u,{icon:P,className:`size-3.5`})})]}),(0,R.jsx)(`button`,{className:ue,"aria-pressed":y.wrap,title:y.wrap?`Disable line wrapping`:`Enable line wrapping`,onClick:()=>w({wrap:!y.wrap}),children:(0,R.jsx)(u,{icon:c,className:`size-3.5`})})]})]}),(0,R.jsxs)(`div`,{className:`diff-render-surface min-h-0 flex-1 overflow-y-auto [--code-background:var(--background)]`,children:[m!==null&&(0,R.jsx)(`p`,{className:`text-muted-foreground p-4 text-center text-xs`,children:m}),m===null&&f===null&&(0,R.jsx)(`p`,{className:`text-muted-foreground p-4 text-center text-xs`,children:`Loading…`}),m===null&&f?.length===0&&(0,R.jsxs)(`div`,{className:`flex h-full flex-col items-center justify-center gap-3 p-6 text-center`,children:[(0,R.jsx)(u,{icon:N,className:`text-muted-foreground/40 size-8`}),(0,R.jsxs)(`div`,{className:`grid gap-1`,children:[(0,R.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:`No uncommitted changes`}),(0,R.jsx)(`p`,{className:`text-muted-foreground/50 text-xs italic`,children:`If it works, don’t touch it.`})]})]}),m===null&&T.map(e=>{let t=y.collapsed!==x.includes(e.name);function n(){S(x.includes(e.name)?x.filter(t=>t!==e.name):[...x,e.name])}return(0,R.jsx)(`div`,{onClick:e=>{e.nativeEvent.composedPath().some(e=>e instanceof Element&&e.hasAttribute(`data-title`))&&n()},children:(0,R.jsx)(ce,{fileDiff:e,options:{theme:b,themeType:`dark`,unsafeCSS:`:host,
2
+ [data-diffs-header],
3
+ [data-diff],
4
+ [data-file],
5
+ [data-error-wrapper],
6
+ [data-virtualizer-buffer] {
7
+ --diffs-header-font-family: var(--font-sans) !important;
8
+ --diffs-font-family: var(--font-mono) !important;
9
+ --diffs-bg: var(--code-background) !important;
10
+ --diffs-light-bg: var(--code-background) !important;
11
+ --diffs-dark-bg: var(--code-background) !important;
12
+ --diffs-token-light-bg: transparent;
13
+ --diffs-token-dark-bg: transparent;
14
+
15
+ --diffs-bg-context-override: color-mix(
16
+ in srgb,
17
+ var(--code-background) 97%,
18
+ var(--code-foreground)
19
+ );
20
+ --diffs-bg-hover-override: color-mix(
21
+ in srgb,
22
+ var(--code-background) 94%,
23
+ var(--code-foreground)
24
+ );
25
+ --diffs-bg-separator-override: color-mix(
26
+ in srgb,
27
+ var(--code-background) 95%,
28
+ var(--code-foreground)
29
+ );
30
+ --diffs-bg-buffer-override: color-mix(
31
+ in srgb,
32
+ var(--code-background) 90%,
33
+ var(--code-foreground)
34
+ );
35
+
36
+ --diffs-bg-context-gutter-override: var(--code-background);
37
+ --diffs-addition-color-override: var(--diff-addition);
38
+ --diffs-deletion-color-override: var(--diff-deletion);
39
+ --diffs-bg-addition-hover-override: color-mix(
40
+ in srgb,
41
+ var(--code-background) 85%,
42
+ var(--diff-addition)
43
+ );
44
+ --diffs-bg-addition-emphasis-override: color-mix(
45
+ in srgb,
46
+ var(--code-background) 65%,
47
+ var(--diff-addition)
48
+ );
49
+
50
+ --diffs-bg-deletion-hover-override: color-mix(
51
+ in srgb,
52
+ var(--code-background) 85%,
53
+ var(--diff-deletion)
54
+ );
55
+ --diffs-bg-deletion-emphasis-override: color-mix(
56
+ in srgb,
57
+ var(--code-background) 65%,
58
+ var(--diff-deletion)
59
+ );
60
+
61
+ background-color: var(--diffs-bg) !important;
62
+ color: var(--code-foreground) !important;
63
+ }
64
+
65
+ :is(
66
+ [data-line],
67
+ [data-line-annotation],
68
+ [data-merge-conflict],
69
+ [data-merge-conflict-actions],
70
+ [data-no-newline]
71
+ )[data-selected-line] {
72
+ --diffs-line-bg: light-dark(
73
+ color-mix(
74
+ in lab,
75
+ var(--code-background) 88%,
76
+ color-mix(in srgb, var(--code-background) 50%, var(--diffs-modified-base))
77
+ ),
78
+ color-mix(
79
+ in lab,
80
+ var(--code-background) 80%,
81
+ color-mix(in srgb, var(--code-background) 70%, var(--diffs-modified-base))
82
+ )
83
+ ) !important;
84
+ }
85
+
86
+ :is([data-gutter-buffer], [data-column-number])[data-selected-line] {
87
+ --diffs-line-bg: light-dark(
88
+ color-mix(
89
+ in lab,
90
+ var(--code-background) 91%,
91
+ color-mix(in srgb, var(--code-background) 35%, var(--diffs-modified-base))
92
+ ),
93
+ color-mix(
94
+ in lab,
95
+ var(--code-background) 85%,
96
+ color-mix(in srgb, var(--code-background) 60%, var(--diffs-modified-base))
97
+ )
98
+ ) !important;
99
+ }
100
+
101
+ [data-indicators='bars']
102
+ :is(
103
+ [data-column-number],
104
+ [data-gutter-buffer='annotation']
105
+ )[data-selected-line] {
106
+ position: relative;
107
+ }
108
+
109
+ [data-indicators='bars']
110
+ :is(
111
+ [data-column-number],
112
+ [data-gutter-buffer='annotation']
113
+ )[data-selected-line]::before {
114
+ position: absolute !important;
115
+ inset-block: 0 !important;
116
+ inset-inline-start: 0 !important;
117
+ display: block !important;
118
+ width: 4px !important;
119
+ min-width: 4px !important;
120
+ max-width: 4px !important;
121
+ height: auto !important;
122
+ padding: 0 !important;
123
+ content: '' !important;
124
+ background-color: var(--diffs-modified-base) !important;
125
+ background-image: none !important;
126
+ }
127
+
128
+ [data-file-info] {
129
+ background-color: var(--code-background) !important;
130
+ border-block-color: transparent !important;
131
+ color: var(--code-foreground) !important;
132
+ }
133
+
134
+ [data-diffs-header] {
135
+ position: sticky !important;
136
+ top: 0;
137
+ z-index: 4;
138
+ background-color: var(--code-background) !important;
139
+ border-bottom-color: transparent !important;
140
+ align-items: center !important;
141
+ font-family: var(--font-sans) !important;
142
+ font-size: 12px !important;
143
+ line-height: 1 !important;
144
+ min-height: 32px !important;
145
+ padding-block: 6px !important;
146
+ padding-inline: 8px 12px !important;
147
+ }
148
+
149
+ [data-diffs-header]:hover {
150
+ background-color: var(--code-background) !important;
151
+ box-shadow: inset 3px 0
152
+ color-mix(in srgb, var(--code-foreground) 24%, transparent);
153
+ }
154
+
155
+ :is([data-separator='line-info'], [data-separator='line-info-basic']) {
156
+ height: 24px !important;
157
+ margin-block: 0 !important;
158
+ --diffs-bg-separator: color-mix(
159
+ in srgb,
160
+ var(--code-background) 97%,
161
+ var(--code-foreground)
162
+ );
163
+ }
164
+
165
+ :is([data-separator='line-info'], [data-separator='line-info-basic'])
166
+ [data-separator-content] {
167
+ color: color-mix(
168
+ in srgb,
169
+ var(--code-foreground) 50%,
170
+ var(--code-background)
171
+ ) !important;
172
+ font-family: var(--font-sans) !important;
173
+ font-size: 11px !important;
174
+ text-decoration: none !important;
175
+ }
176
+
177
+ :is([data-separator='line-info'], [data-separator='line-info-basic'])
178
+ [data-expand-button] {
179
+ color: color-mix(
180
+ in srgb,
181
+ var(--code-foreground) 50%,
182
+ var(--code-background)
183
+ ) !important;
184
+ }
185
+
186
+ :is(
187
+ [data-separator='line-info'],
188
+ [data-separator='line-info-basic']
189
+ )[data-expand-index]
190
+ :is([data-separator-content], [data-expand-button]):hover {
191
+ color: var(--code-foreground) !important;
192
+ background-color: color-mix(
193
+ in srgb,
194
+ var(--code-background) 92%,
195
+ var(--code-foreground)
196
+ ) !important;
197
+ }
198
+
199
+ [data-diffs-header] [data-header-content] {
200
+ align-items: center !important;
201
+ line-height: 1 !important;
202
+ }
203
+
204
+ [data-diffs-header] :is([data-title], [data-prev-name]) {
205
+ line-height: 16px !important;
206
+ }
207
+
208
+ [data-diffs-header] [data-metadata] {
209
+ align-items: center !important;
210
+ line-height: 1 !important;
211
+ font-variant-numeric: tabular-nums;
212
+ }
213
+
214
+ [data-diffs-header] [data-additions-count],
215
+ [data-diffs-header] [data-deletions-count] {
216
+ font-family: var(--font-mono) !important;
217
+ font-size: 11px !important;
218
+ font-variant-numeric: tabular-nums;
219
+ line-height: 1 !important;
220
+ }
221
+
222
+ [data-diffs-header] [data-change-icon],
223
+ [data-diffs-header] [data-rename-icon] {
224
+ display: block;
225
+ flex-shrink: 0;
226
+ }
227
+
228
+ [data-title] {
229
+ cursor: pointer;
230
+ transition: color 120ms ease;
231
+ font-family: var(--font-sans) !important;
232
+ }
233
+
234
+ [data-title]:hover {
235
+ color: color-mix(
236
+ in srgb,
237
+ var(--code-foreground) 84%,
238
+ var(--primary)
239
+ ) !important;
240
+ }
241
+
242
+ [data-diff],
243
+ [data-file] {
244
+ transition: opacity 200ms ease-out;
245
+ }
246
+
247
+ @starting-style {
248
+ [data-diff],
249
+ [data-file] {
250
+ opacity: 0;
251
+ }
252
+ }
253
+
254
+ @media (prefers-reduced-motion: reduce) {
255
+ [data-diff],
256
+ [data-file] {
257
+ transition: none;
258
+ }
259
+ }
260
+ `,collapsed:t,lineDiffType:`word-alt`,overflow:y.wrap?`wrap`:`scroll`,diffStyle:y.split?`split`:`unified`},renderHeaderPrefix:()=>(0,R.jsx)(`button`,{className:`text-muted-foreground hover:text-foreground flex size-5 cursor-pointer items-center justify-center`,"aria-label":t?`Expand file`:`Collapse file`,onClick:n,children:(0,R.jsx)(u,{icon:t?s:r,className:`size-3.5`})})})},e.name)})]})]})}export{de as DiffPanel};
@@ -1 +1 @@
1
- import{i as e,t}from"./rolldown-runtime-COiEfhsA.js";import{c as n,l as r}from"./utils-U6QfaJBO.js";import{i,n as a}from"./button-CWFREsRn.js";var o=t((e=>{var t=r();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function i(){}var a={d:{f:i,r:function(){throw Error(n(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for(`react.portal`),s=Symbol.for(`react.recoverable`),c=Symbol.for(`react.optimistic_key`);function l(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:r==null?null:r===c?c:``+r,children:e,containerInfo:t,implementation:n}}var u=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,e.browser=function(e){return{$$typeof:s,_reason:e}},e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return l(e,t,null,r)},e.flushSync=function(e){var t=u.T,n=a.p;try{if(u.T=null,a.p=2,e)return e()}finally{u.T=t,a.p=n,a.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,a.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&a.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=d(n,t.crossOrigin),i=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?a.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:o}):n===`script`&&a.d.X(e,{crossOrigin:r,integrity:i,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=d(t.as,t.crossOrigin);a.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}}else t??a.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=d(n,t.crossOrigin);a.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=d(t.as,t.crossOrigin);a.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}else a.d.m(e)}},e.requestFormReset=function(e){a.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return u.H.useFormState(e,t,n)},e.useFormStatus=function(){return u.H.useHostTransitionStatus()},e.version=`19.3.1`})),s=t(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=o()})),c=e(r(),1),l=e(s(),1),u=n(),d=Object.defineProperty,f=(e,t)=>d(e,`name`,{value:t,configurable:!0}),p=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=a(`Primitive.${t}`),r=c.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,u.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function m(e,t){e&&l.flushSync(()=>e.dispatchEvent(t))}f(m,`dispatchDiscreteCustomEvent`);var h=Object.defineProperty,g=(e,t)=>h(e,`name`,{value:t,configurable:!0});function _(e,t){let n=c.createContext(t);n.displayName=e+`Context`;let r=g(e=>{let{children:t,...r}=e,i=c.useMemo(()=>r,Object.values(r));return(0,u.jsx)(n.Provider,{value:i,children:t})},`Provider`);r.displayName=e+`Provider`;function i(r,i={}){let{optional:a=!1}=i,o=c.useContext(n);if(o)return o;if(t!==void 0)return t;if(!a)throw Error(`\`${r}\` must be used within \`${e}\``)}return g(i,`useContext`),[r,i]}g(_,`createContext`);function v(e,t=[]){let n=[];function r(t,r){let i=c.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=g(t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,l=c.useMemo(()=>o,Object.values(o));return(0,u.jsx)(s.Provider,{value:l,children:r})},`Provider`);o.displayName=t+`Provider`;function s(n,o,s={}){let{optional:l=!1}=s,u=o?.[e]?.[a]||i,d=c.useContext(u);if(d)return d;if(r!==void 0)return r;if(!l)throw Error(`\`${n}\` must be used within \`${t}\``)}return g(s,`useContext`),[o,s]}g(r,`createContext`);let i=g(()=>{let t=n.map(e=>c.createContext(e));return g(function(n){let r=n?.[e]||t;return c.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},`useScope`)},`createScope`);return i.scopeName=e,[r,y(i,...t)]}g(v,`createContextScope`);function y(...e){let t=e[0];if(e.length===1)return t;let n=g(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return g(function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])},`useComposedScopes`)},`createScope`);return n.scopeName=t.scopeName,n}g(y,`composeContextScopes`);var b=globalThis?.document?c.useLayoutEffect:()=>{},x=Object.defineProperty,S=(e,t)=>x(e,`name`,{value:t,configurable:!0}),C=!!(typeof window<`u`&&window.document&&window.document.createElement);function w(e,t,{checkForDefaultPrevented:n=!0}={}){return S(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}S(w,`composeEventHandlers`);function T(e){if(!C)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}S(T,`getOwnerWindow`);function E(e){if(!C)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}S(E,`getOwnerDocument`);function D(e,t=!1){let{activeElement:n}=E(e);if(!n?.nodeName)return null;if(O(n)&&n.contentDocument)return D(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=E(n).getElementById(e);if(t)return t}}return n}S(D,`getActiveElement`);function O(e){return e.tagName===`IFRAME`}S(O,`isFrame`);var k=Object.defineProperty,A=(e,t)=>k(e,`name`,{value:t,configurable:!0}),j=c.useEffectEvent,ee=c.useInsertionEffect;function te(e){if(typeof j==`function`)return j(e);let t=c.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof ee==`function`?ee(()=>{t.current=e}):b(()=>{t.current=e}),c.useMemo(()=>((...e)=>t.current?.(...e)),[])}A(te,`useEffectEvent`);var ne=Object.defineProperty,M=(e,t)=>ne(e,`name`,{value:t,configurable:!0}),re=c.useInsertionEffect||b;function N({prop:e,defaultProp:t,onChange:n=M(()=>{},`onChange`),caller:r}){let[i,a,o]=ie({defaultProp:t,onChange:n}),s=e!==void 0;return[s?e:i,c.useCallback(t=>{if(s){let n=ae(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}M(N,`useControllableState`);function ie({defaultProp:e,onChange:t}){let[n,r]=c.useState(e),i=c.useRef(n),a=c.useRef(t);return re(()=>{a.current=t},[t]),c.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}M(ie,`useUncontrolledState`);function ae(e){return typeof e==`function`}M(ae,`isFunction`);var oe=Symbol(`RADIX:SYNC_STATE`);function se(e,t,n,r){let{prop:i,defaultProp:a,onChange:o,caller:s}=t,l=i!==void 0,u=te(o),d=[{...n,state:a}];r&&d.push(r);let[f,p]=c.useReducer((t,n)=>{if(n.type===oe)return{...t,state:n.state};let r=e(t,n);return l&&!Object.is(r.state,t.state)&&u(r.state),r},...d),m=f.state,h=c.useRef(m);c.useEffect(()=>{h.current!==m&&(h.current=m,l||u(m))},[m,h,l]);let g=c.useMemo(()=>i===void 0?f:{...f,state:i},[f,i]);return c.useEffect(()=>{l&&!Object.is(i,f.state)&&p({type:oe,state:i})},[i,f.state,l]),[g,p]}M(se,`useControllableStateReducer`);var ce=Object.defineProperty,P=(e,t)=>ce(e,`name`,{value:t,configurable:!0});function le(e,t){return c.useReducer((e,n)=>t[e][n]??e,e)}P(le,`useStateMachine`);var ue=P(e=>{let{present:t,children:n}=e,r=de(t),i=typeof n==`function`?n({present:r.isPresent}):c.Children.only(n),a=fe(r.ref,L(i));return typeof n==`function`||r.isPresent?c.cloneElement(i,{ref:a}):null},`Presence`);function de(e){let[t,n]=c.useState(),r=c.useRef(null),i=c.useRef(e),a=c.useRef(`none`),o=c.useRef(void 0),[s,l]=le(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return c.useEffect(()=>{s===`mounted`?(a.current=o.current??I(r.current),o.current=void 0):a.current=`none`},[s]),b(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=I(t);e?(o.current=s,l(`MOUNT`)):s===`none`||t?.display===`none`?l(`UNMOUNT`):l(n&&r!==s?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,l]),b(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=P(a=>{let o=I(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(l(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},`handleAnimationEnd`),s=P(e=>{e.target===t&&(a.current=I(r.current))},`handleAnimationStart`);return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}l(`ANIMATION_END`)},[t,l]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:c.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,o.current=I(t)}else r.current=null;n(e)},[])}}P(de,`usePresence`);function F(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}P(F,`setRef`);function fe(...e){let t=c.useRef(e);return t.current=e,c.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=F(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():F(n[e],null)}}},[])}P(fe,`useStableComposedRefs`);function I(e){return e?.animationName||`none`}P(I,`getAnimationName`);function L(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}P(L,`getElementRef`);var pe=Object.defineProperty,me=(e,t)=>pe(e,`name`,{value:t,configurable:!0}),he=c.useId||(()=>void 0),ge=0;function R(e){let[t,n]=c.useState(he());return b(()=>{e||n(e=>e??String(ge++))},[e]),e||(t?`radix-${t}`:``)}me(R,`useId`);var _e=Object.defineProperty,ve=(e,t)=>_e(e,`name`,{value:t,configurable:!0}),z=c.useInsertionEffect;function B(e){let t=c.useRef(e);return typeof z==`function`?z(()=>{t.current=e}):b(()=>{t.current=e}),c.useMemo(()=>((...e)=>t.current?.(...e)),[])}ve(B,`useCallbackRef`);var ye=Object.defineProperty,V=(e,t)=>ye(e,`name`,{value:t,configurable:!0}),H=`dismissableLayer.update`,be=`dismissableLayer.pointerDownOutside`,xe=`dismissableLayer.focusOutside`,Se,Ce=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),we=c.forwardRef(V(function(e,t){let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:l,onDismiss:d,...f}=e,m=c.useContext(Ce),[h,g]=c.useState(null),_=h?.ownerDocument??globalThis?.document,[,v]=c.useState({}),y=i(t,g),b=Array.from(m.layers),[x]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),S=x?b.indexOf(x):-1,C=h?b.indexOf(h):-1,T=m.layersWithOutsidePointerEventsDisabled.size>0,E=C>=S,D=c.useRef(!1),O=De(e=>{o?.(e),l?.(e),e.defaultPrevented||d?.()},{ownerDocument:_,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:D,dismissableSurfaces:m.dismissableSurfaces,shouldHandlePointerDownOutside:c.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...m.branches].some(t=>t.contains(e));return E&&!t},[m.branches,E])}),k=Oe(e=>{if(r&&D.current)return;let t=e.target;[...m.branches].some(e=>e.contains(t))||(s?.(e),l?.(e),e.defaultPrevented||d?.())},_),A=h?C===b.length-1:!1,j=B(e=>{e.key===`Escape`&&(a?.(e),!e.defaultPrevented&&d&&(e.preventDefault(),d()))});return c.useEffect(()=>{if(A)return _.addEventListener(`keydown`,j,{capture:!0}),()=>_.removeEventListener(`keydown`,j,{capture:!0})},[_,A,j]),c.useEffect(()=>{if(h)return n&&(m.layersWithOutsidePointerEventsDisabled.size===0&&(Se=_.body.style.pointerEvents,_.body.style.pointerEvents=`none`),m.layersWithOutsidePointerEventsDisabled.add(h)),m.layers.add(h),U(),()=>{n&&(m.layersWithOutsidePointerEventsDisabled.delete(h),m.layersWithOutsidePointerEventsDisabled.size===0&&(_.body.style.pointerEvents=Se))}},[h,_,n,m]),c.useEffect(()=>()=>{h&&(m.layers.delete(h),m.layersWithOutsidePointerEventsDisabled.delete(h),U())},[h,m]),c.useEffect(()=>{let e=V(()=>v({}),`handleUpdate`);return document.addEventListener(H,e),()=>document.removeEventListener(H,e)},[]),(0,u.jsx)(p.div,{...f,ref:y,style:{pointerEvents:T?E?`auto`:`none`:void 0,...e.style},onFocusCapture:w(e.onFocusCapture,k.onFocusCapture),onBlurCapture:w(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:w(e.onPointerDownCapture,O.onPointerDownCapture)})},`DismissableLayer`));function Te(){let e=c.useContext(Ce),[t,n]=c.useState(null);return c.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}V(Te,`useDismissableLayerSurface`);var Ee=V(()=>!0,`IS_TRUE`);function De(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=Ee}=t,s=B(e),l=c.useRef(!1),u=c.useRef(!1),d=c.useRef(new Map),f=c.useRef(()=>{});return c.useEffect(()=>{function e(){u.current=!1,i.current=!1,d.current.clear()}V(e,`resetOutsideInteraction`);function t(){return Array.from(d.current.values()).some(Boolean)}V(t,`isOutsideInteractionIntercepted`);function c(e){if(!u.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||d.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{u.current&&f.current()},0)}V(c,`handleInteractionCapture`);function p(e){u.current&&d.current.set(e.type,!1)}V(p,`handleInteractionBubble`);let m=V(a=>{if(a.target&&!l.current){let c=function(){n.removeEventListener(`click`,f.current);let r=t();e(),r||W(be,s,p,{discrete:!0})};if(V(c,`handleAndDispatchPointerDownOutsideEvent`),!o(a.target)){n.removeEventListener(`click`,f.current),e(),l.current=!1;return}let p={originalEvent:a};u.current=!0,i.current=r&&a.button===0,d.current.clear(),!r||a.button!==0?c():(n.removeEventListener(`click`,f.current),f.current=c,n.addEventListener(`click`,f.current,{once:!0}))}else n.removeEventListener(`click`,f.current),e();l.current=!1},`handlePointerDown`),h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)n.addEventListener(e,c,!0),n.addEventListener(e,p);let g=window.setTimeout(()=>{n.addEventListener(`pointerdown`,m)},0);return()=>{window.clearTimeout(g),n.removeEventListener(`pointerdown`,m),n.removeEventListener(`click`,f.current);for(let e of h)n.removeEventListener(e,c,!0),n.removeEventListener(e,p)}},[n,s,r,i,a,o]),{onPointerDownCapture:V(()=>l.current=!0,`onPointerDownCapture`)}}V(De,`usePointerDownOutside`);function Oe(e,t=globalThis?.document){let n=B(e),r=c.useRef(!1);return c.useEffect(()=>{let e=V(e=>{e.target&&!r.current&&W(xe,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:V(()=>r.current=!0,`onFocusCapture`),onBlurCapture:V(()=>r.current=!1,`onBlurCapture`)}}V(Oe,`useFocusOutside`);function U(){let e=new CustomEvent(H);document.dispatchEvent(e)}V(U,`dispatchUpdate`);function W(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?m(i,a):i.dispatchEvent(a)}V(W,`handleAndDispatchCustomEvent`);var ke=Object.defineProperty,G=(e,t)=>ke(e,`name`,{value:t,configurable:!0}),K=`focusScope.autoFocusOnMount`,q=`focusScope.autoFocusOnUnmount`,Ae={bubbles:!1,cancelable:!0},je=c.forwardRef(G(function(e,t){let{loop:n=!1,trapped:r=!1,branches:a,onMountAutoFocus:o,onUnmountAutoFocus:s,...l}=e,[d,f]=c.useState(null),m=B(o),h=B(s),g=c.useRef(null),_=i(t,f),v=c.useRef(a);c.useEffect(()=>{v.current=a});let y=c.useCallback(e=>e?d?.contains(e)?!0:!!v.current?.some(t=>t.contains(e)):!1,[d]),b=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(r){let e=function(e){if(b.paused||!d)return;let t=e.target;y(t)?g.current=t:Z(g.current,{select:!0})},t=function(e){if(b.paused||!d)return;let t=e.relatedTarget;t!==null&&(y(t)||Z(g.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&Z(d)};G(e,`handleFocusIn`),G(t,`handleFocusOut`),G(n,`handleMutations`),document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return d&&r.observe(d,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,d,b.paused,y]),c.useEffect(()=>{if(d){ze.add(b);let e=document.activeElement;if(!d.contains(e)){let t=new CustomEvent(K,Ae);d.addEventListener(K,m),d.dispatchEvent(t),t.defaultPrevented||(Ie($(J(d)),{select:!0}),document.activeElement===e&&Z(d))}return()=>{d.removeEventListener(K,m);let t=d.ownerDocument,n=CustomEvent;setTimeout(()=>{let r=new n(q,Ae);d.addEventListener(q,h),d.dispatchEvent(r),r.defaultPrevented||Z(e??t.body,{select:!0}),d.removeEventListener(q,h),ze.remove(b)},0)}}},[d,m,h,b]);let x=c.useCallback(e=>{if(!n&&!r||b.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=Le(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&Z(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&Z(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,b.paused]);return(0,u.jsx)(p.div,{tabIndex:-1,...l,ref:_,onKeyDown:x})},`FocusScope`)),Me=c.createContext(null);function Ne({registry:e,children:t}){return e?(0,u.jsx)(Me.Provider,{value:e,children:t}):t}G(Ne,`FocusScopeBranchProvider`);function Pe(){let[e,t]=c.useState([]);return{nodes:e,registry:c.useMemo(()=>({add:G(e=>t(t=>t.includes(e)?t:[...t,e]),`add`),remove:G(e=>t(t=>t.filter(t=>t!==e)),`remove`)}),[])}}G(Pe,`useFocusScopeBranchRegistry`);function Fe(e){let t=c.useContext(Me);c.useEffect(()=>{if(e&&t)return t.add(e),()=>t.remove(e)},[e,t])}G(Fe,`useFocusScopeBranch`);function Ie(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(Z(r,{select:t}),document.activeElement!==n)return}G(Ie,`focusFirst`);function Le(e){let t=J(e);return[Y(t,e),Y(t.reverse(),e)]}G(Le,`getTabbableEdges`);function J(e){let t=[],n=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:G(e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},`acceptNode`)});for(;n.nextNode();)t.push(n.currentNode);return t}G(J,`getTabbableCandidates`);function Y(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):X(r,{upTo:t})))return r}G(Y,`findVisible`);function X(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}G(X,`isHidden`);function Re(e){return e.tagName===`INPUT`&&typeof e.select==`function`}G(Re,`isSelectableInput`);function Z(e,{select:t=!1}={}){if(e&&e.focus){let n=(e.ownerDocument??document).activeElement;e.focus({preventScroll:!0}),e!==n&&Re(e)&&t&&e.select()}}G(Z,`focus`);var ze=Be();function Be(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=Q(e,t),e.unshift(t)},remove(t){e=Q(e,t),e[0]?.resume()}}}G(Be,`createFocusScopesStack`);function Q(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}G(Q,`arrayRemove`);function $(e){return e.filter(e=>e.tagName!==`A`)}G($,`removeLinks`);var Ve=Object.defineProperty,He=c.forwardRef(((e,t)=>Ve(e,`name`,{value:t,configurable:!0}))(function(e,t){let{container:n,...r}=e,[i,a]=c.useState(!1);b(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?l.createPortal((0,u.jsx)(p.div,{...r,ref:t}),o):null},`Portal`));export{s as _,Pe as a,B as c,N as d,w as f,m as g,p as h,Fe as i,R as l,v as m,je as n,we as o,b as p,Ne as r,Te as s,He as t,ue as u};
1
+ import{i as e,t}from"./rolldown-runtime-COiEfhsA.js";import{l as n,u as r}from"./utils-Cih_T9uV.js";import{i,n as a}from"./button-BnzxfmO3.js";var o=t((e=>{var t=r();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function i(){}var a={d:{f:i,r:function(){throw Error(n(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for(`react.portal`),s=Symbol.for(`react.recoverable`),c=Symbol.for(`react.optimistic_key`);function l(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:r==null?null:r===c?c:``+r,children:e,containerInfo:t,implementation:n}}var u=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,e.browser=function(e){return{$$typeof:s,_reason:e}},e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return l(e,t,null,r)},e.flushSync=function(e){var t=u.T,n=a.p;try{if(u.T=null,a.p=2,e)return e()}finally{u.T=t,a.p=n,a.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,a.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&a.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=d(n,t.crossOrigin),i=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?a.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:o}):n===`script`&&a.d.X(e,{crossOrigin:r,integrity:i,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=d(t.as,t.crossOrigin);a.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}}else t??a.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=d(n,t.crossOrigin);a.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=d(t.as,t.crossOrigin);a.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}else a.d.m(e)}},e.requestFormReset=function(e){a.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return u.H.useFormState(e,t,n)},e.useFormStatus=function(){return u.H.useHostTransitionStatus()},e.version=`19.3.1`})),s=t(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=o()})),c=e(r(),1),l=e(s(),1),u=n(),d=Object.defineProperty,f=(e,t)=>d(e,`name`,{value:t,configurable:!0}),p=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=a(`Primitive.${t}`),r=c.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,u.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function m(e,t){e&&l.flushSync(()=>e.dispatchEvent(t))}f(m,`dispatchDiscreteCustomEvent`);var h=Object.defineProperty,g=(e,t)=>h(e,`name`,{value:t,configurable:!0});function _(e,t){let n=c.createContext(t);n.displayName=e+`Context`;let r=g(e=>{let{children:t,...r}=e,i=c.useMemo(()=>r,Object.values(r));return(0,u.jsx)(n.Provider,{value:i,children:t})},`Provider`);r.displayName=e+`Provider`;function i(r,i={}){let{optional:a=!1}=i,o=c.useContext(n);if(o)return o;if(t!==void 0)return t;if(!a)throw Error(`\`${r}\` must be used within \`${e}\``)}return g(i,`useContext`),[r,i]}g(_,`createContext`);function v(e,t=[]){let n=[];function r(t,r){let i=c.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=g(t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,l=c.useMemo(()=>o,Object.values(o));return(0,u.jsx)(s.Provider,{value:l,children:r})},`Provider`);o.displayName=t+`Provider`;function s(n,o,s={}){let{optional:l=!1}=s,u=o?.[e]?.[a]||i,d=c.useContext(u);if(d)return d;if(r!==void 0)return r;if(!l)throw Error(`\`${n}\` must be used within \`${t}\``)}return g(s,`useContext`),[o,s]}g(r,`createContext`);let i=g(()=>{let t=n.map(e=>c.createContext(e));return g(function(n){let r=n?.[e]||t;return c.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},`useScope`)},`createScope`);return i.scopeName=e,[r,y(i,...t)]}g(v,`createContextScope`);function y(...e){let t=e[0];if(e.length===1)return t;let n=g(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return g(function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])},`useComposedScopes`)},`createScope`);return n.scopeName=t.scopeName,n}g(y,`composeContextScopes`);var b=globalThis?.document?c.useLayoutEffect:()=>{},x=Object.defineProperty,S=(e,t)=>x(e,`name`,{value:t,configurable:!0}),C=!!(typeof window<`u`&&window.document&&window.document.createElement);function w(e,t,{checkForDefaultPrevented:n=!0}={}){return S(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}S(w,`composeEventHandlers`);function T(e){if(!C)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}S(T,`getOwnerWindow`);function E(e){if(!C)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}S(E,`getOwnerDocument`);function D(e,t=!1){let{activeElement:n}=E(e);if(!n?.nodeName)return null;if(O(n)&&n.contentDocument)return D(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=E(n).getElementById(e);if(t)return t}}return n}S(D,`getActiveElement`);function O(e){return e.tagName===`IFRAME`}S(O,`isFrame`);var k=Object.defineProperty,A=(e,t)=>k(e,`name`,{value:t,configurable:!0}),j=c.useEffectEvent,ee=c.useInsertionEffect;function te(e){if(typeof j==`function`)return j(e);let t=c.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof ee==`function`?ee(()=>{t.current=e}):b(()=>{t.current=e}),c.useMemo(()=>((...e)=>t.current?.(...e)),[])}A(te,`useEffectEvent`);var ne=Object.defineProperty,M=(e,t)=>ne(e,`name`,{value:t,configurable:!0}),re=c.useInsertionEffect||b;function N({prop:e,defaultProp:t,onChange:n=M(()=>{},`onChange`),caller:r}){let[i,a,o]=ie({defaultProp:t,onChange:n}),s=e!==void 0;return[s?e:i,c.useCallback(t=>{if(s){let n=ae(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}M(N,`useControllableState`);function ie({defaultProp:e,onChange:t}){let[n,r]=c.useState(e),i=c.useRef(n),a=c.useRef(t);return re(()=>{a.current=t},[t]),c.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}M(ie,`useUncontrolledState`);function ae(e){return typeof e==`function`}M(ae,`isFunction`);var oe=Symbol(`RADIX:SYNC_STATE`);function se(e,t,n,r){let{prop:i,defaultProp:a,onChange:o,caller:s}=t,l=i!==void 0,u=te(o),d=[{...n,state:a}];r&&d.push(r);let[f,p]=c.useReducer((t,n)=>{if(n.type===oe)return{...t,state:n.state};let r=e(t,n);return l&&!Object.is(r.state,t.state)&&u(r.state),r},...d),m=f.state,h=c.useRef(m);c.useEffect(()=>{h.current!==m&&(h.current=m,l||u(m))},[m,h,l]);let g=c.useMemo(()=>i===void 0?f:{...f,state:i},[f,i]);return c.useEffect(()=>{l&&!Object.is(i,f.state)&&p({type:oe,state:i})},[i,f.state,l]),[g,p]}M(se,`useControllableStateReducer`);var ce=Object.defineProperty,P=(e,t)=>ce(e,`name`,{value:t,configurable:!0});function le(e,t){return c.useReducer((e,n)=>t[e][n]??e,e)}P(le,`useStateMachine`);var ue=P(e=>{let{present:t,children:n}=e,r=de(t),i=typeof n==`function`?n({present:r.isPresent}):c.Children.only(n),a=fe(r.ref,L(i));return typeof n==`function`||r.isPresent?c.cloneElement(i,{ref:a}):null},`Presence`);function de(e){let[t,n]=c.useState(),r=c.useRef(null),i=c.useRef(e),a=c.useRef(`none`),o=c.useRef(void 0),[s,l]=le(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return c.useEffect(()=>{s===`mounted`?(a.current=o.current??I(r.current),o.current=void 0):a.current=`none`},[s]),b(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=I(t);e?(o.current=s,l(`MOUNT`)):s===`none`||t?.display===`none`?l(`UNMOUNT`):l(n&&r!==s?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,l]),b(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=P(a=>{let o=I(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(l(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},`handleAnimationEnd`),s=P(e=>{e.target===t&&(a.current=I(r.current))},`handleAnimationStart`);return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}l(`ANIMATION_END`)},[t,l]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:c.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,o.current=I(t)}else r.current=null;n(e)},[])}}P(de,`usePresence`);function F(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}P(F,`setRef`);function fe(...e){let t=c.useRef(e);return t.current=e,c.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=F(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():F(n[e],null)}}},[])}P(fe,`useStableComposedRefs`);function I(e){return e?.animationName||`none`}P(I,`getAnimationName`);function L(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}P(L,`getElementRef`);var pe=Object.defineProperty,me=(e,t)=>pe(e,`name`,{value:t,configurable:!0}),he=c.useId||(()=>void 0),ge=0;function R(e){let[t,n]=c.useState(he());return b(()=>{e||n(e=>e??String(ge++))},[e]),e||(t?`radix-${t}`:``)}me(R,`useId`);var _e=Object.defineProperty,ve=(e,t)=>_e(e,`name`,{value:t,configurable:!0}),z=c.useInsertionEffect;function B(e){let t=c.useRef(e);return typeof z==`function`?z(()=>{t.current=e}):b(()=>{t.current=e}),c.useMemo(()=>((...e)=>t.current?.(...e)),[])}ve(B,`useCallbackRef`);var ye=Object.defineProperty,V=(e,t)=>ye(e,`name`,{value:t,configurable:!0}),H=`dismissableLayer.update`,be=`dismissableLayer.pointerDownOutside`,xe=`dismissableLayer.focusOutside`,Se,Ce=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),we=c.forwardRef(V(function(e,t){let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:l,onDismiss:d,...f}=e,m=c.useContext(Ce),[h,g]=c.useState(null),_=h?.ownerDocument??globalThis?.document,[,v]=c.useState({}),y=i(t,g),b=Array.from(m.layers),[x]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),S=x?b.indexOf(x):-1,C=h?b.indexOf(h):-1,T=m.layersWithOutsidePointerEventsDisabled.size>0,E=C>=S,D=c.useRef(!1),O=De(e=>{o?.(e),l?.(e),e.defaultPrevented||d?.()},{ownerDocument:_,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:D,dismissableSurfaces:m.dismissableSurfaces,shouldHandlePointerDownOutside:c.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...m.branches].some(t=>t.contains(e));return E&&!t},[m.branches,E])}),k=Oe(e=>{if(r&&D.current)return;let t=e.target;[...m.branches].some(e=>e.contains(t))||(s?.(e),l?.(e),e.defaultPrevented||d?.())},_),A=h?C===b.length-1:!1,j=B(e=>{e.key===`Escape`&&(a?.(e),!e.defaultPrevented&&d&&(e.preventDefault(),d()))});return c.useEffect(()=>{if(A)return _.addEventListener(`keydown`,j,{capture:!0}),()=>_.removeEventListener(`keydown`,j,{capture:!0})},[_,A,j]),c.useEffect(()=>{if(h)return n&&(m.layersWithOutsidePointerEventsDisabled.size===0&&(Se=_.body.style.pointerEvents,_.body.style.pointerEvents=`none`),m.layersWithOutsidePointerEventsDisabled.add(h)),m.layers.add(h),U(),()=>{n&&(m.layersWithOutsidePointerEventsDisabled.delete(h),m.layersWithOutsidePointerEventsDisabled.size===0&&(_.body.style.pointerEvents=Se))}},[h,_,n,m]),c.useEffect(()=>()=>{h&&(m.layers.delete(h),m.layersWithOutsidePointerEventsDisabled.delete(h),U())},[h,m]),c.useEffect(()=>{let e=V(()=>v({}),`handleUpdate`);return document.addEventListener(H,e),()=>document.removeEventListener(H,e)},[]),(0,u.jsx)(p.div,{...f,ref:y,style:{pointerEvents:T?E?`auto`:`none`:void 0,...e.style},onFocusCapture:w(e.onFocusCapture,k.onFocusCapture),onBlurCapture:w(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:w(e.onPointerDownCapture,O.onPointerDownCapture)})},`DismissableLayer`));function Te(){let e=c.useContext(Ce),[t,n]=c.useState(null);return c.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}V(Te,`useDismissableLayerSurface`);var Ee=V(()=>!0,`IS_TRUE`);function De(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=Ee}=t,s=B(e),l=c.useRef(!1),u=c.useRef(!1),d=c.useRef(new Map),f=c.useRef(()=>{});return c.useEffect(()=>{function e(){u.current=!1,i.current=!1,d.current.clear()}V(e,`resetOutsideInteraction`);function t(){return Array.from(d.current.values()).some(Boolean)}V(t,`isOutsideInteractionIntercepted`);function c(e){if(!u.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||d.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{u.current&&f.current()},0)}V(c,`handleInteractionCapture`);function p(e){u.current&&d.current.set(e.type,!1)}V(p,`handleInteractionBubble`);let m=V(a=>{if(a.target&&!l.current){let c=function(){n.removeEventListener(`click`,f.current);let r=t();e(),r||W(be,s,p,{discrete:!0})};if(V(c,`handleAndDispatchPointerDownOutsideEvent`),!o(a.target)){n.removeEventListener(`click`,f.current),e(),l.current=!1;return}let p={originalEvent:a};u.current=!0,i.current=r&&a.button===0,d.current.clear(),!r||a.button!==0?c():(n.removeEventListener(`click`,f.current),f.current=c,n.addEventListener(`click`,f.current,{once:!0}))}else n.removeEventListener(`click`,f.current),e();l.current=!1},`handlePointerDown`),h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)n.addEventListener(e,c,!0),n.addEventListener(e,p);let g=window.setTimeout(()=>{n.addEventListener(`pointerdown`,m)},0);return()=>{window.clearTimeout(g),n.removeEventListener(`pointerdown`,m),n.removeEventListener(`click`,f.current);for(let e of h)n.removeEventListener(e,c,!0),n.removeEventListener(e,p)}},[n,s,r,i,a,o]),{onPointerDownCapture:V(()=>l.current=!0,`onPointerDownCapture`)}}V(De,`usePointerDownOutside`);function Oe(e,t=globalThis?.document){let n=B(e),r=c.useRef(!1);return c.useEffect(()=>{let e=V(e=>{e.target&&!r.current&&W(xe,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:V(()=>r.current=!0,`onFocusCapture`),onBlurCapture:V(()=>r.current=!1,`onBlurCapture`)}}V(Oe,`useFocusOutside`);function U(){let e=new CustomEvent(H);document.dispatchEvent(e)}V(U,`dispatchUpdate`);function W(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?m(i,a):i.dispatchEvent(a)}V(W,`handleAndDispatchCustomEvent`);var ke=Object.defineProperty,G=(e,t)=>ke(e,`name`,{value:t,configurable:!0}),K=`focusScope.autoFocusOnMount`,q=`focusScope.autoFocusOnUnmount`,Ae={bubbles:!1,cancelable:!0},je=c.forwardRef(G(function(e,t){let{loop:n=!1,trapped:r=!1,branches:a,onMountAutoFocus:o,onUnmountAutoFocus:s,...l}=e,[d,f]=c.useState(null),m=B(o),h=B(s),g=c.useRef(null),_=i(t,f),v=c.useRef(a);c.useEffect(()=>{v.current=a});let y=c.useCallback(e=>e?d?.contains(e)?!0:!!v.current?.some(t=>t.contains(e)):!1,[d]),b=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(r){let e=function(e){if(b.paused||!d)return;let t=e.target;y(t)?g.current=t:Z(g.current,{select:!0})},t=function(e){if(b.paused||!d)return;let t=e.relatedTarget;t!==null&&(y(t)||Z(g.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&Z(d)};G(e,`handleFocusIn`),G(t,`handleFocusOut`),G(n,`handleMutations`),document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return d&&r.observe(d,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,d,b.paused,y]),c.useEffect(()=>{if(d){ze.add(b);let e=document.activeElement;if(!d.contains(e)){let t=new CustomEvent(K,Ae);d.addEventListener(K,m),d.dispatchEvent(t),t.defaultPrevented||(Ie($(J(d)),{select:!0}),document.activeElement===e&&Z(d))}return()=>{d.removeEventListener(K,m);let t=d.ownerDocument,n=CustomEvent;setTimeout(()=>{let r=new n(q,Ae);d.addEventListener(q,h),d.dispatchEvent(r),r.defaultPrevented||Z(e??t.body,{select:!0}),d.removeEventListener(q,h),ze.remove(b)},0)}}},[d,m,h,b]);let x=c.useCallback(e=>{if(!n&&!r||b.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=Le(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&Z(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&Z(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,b.paused]);return(0,u.jsx)(p.div,{tabIndex:-1,...l,ref:_,onKeyDown:x})},`FocusScope`)),Me=c.createContext(null);function Ne({registry:e,children:t}){return e?(0,u.jsx)(Me.Provider,{value:e,children:t}):t}G(Ne,`FocusScopeBranchProvider`);function Pe(){let[e,t]=c.useState([]);return{nodes:e,registry:c.useMemo(()=>({add:G(e=>t(t=>t.includes(e)?t:[...t,e]),`add`),remove:G(e=>t(t=>t.filter(t=>t!==e)),`remove`)}),[])}}G(Pe,`useFocusScopeBranchRegistry`);function Fe(e){let t=c.useContext(Me);c.useEffect(()=>{if(e&&t)return t.add(e),()=>t.remove(e)},[e,t])}G(Fe,`useFocusScopeBranch`);function Ie(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(Z(r,{select:t}),document.activeElement!==n)return}G(Ie,`focusFirst`);function Le(e){let t=J(e);return[Y(t,e),Y(t.reverse(),e)]}G(Le,`getTabbableEdges`);function J(e){let t=[],n=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:G(e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},`acceptNode`)});for(;n.nextNode();)t.push(n.currentNode);return t}G(J,`getTabbableCandidates`);function Y(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):X(r,{upTo:t})))return r}G(Y,`findVisible`);function X(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}G(X,`isHidden`);function Re(e){return e.tagName===`INPUT`&&typeof e.select==`function`}G(Re,`isSelectableInput`);function Z(e,{select:t=!1}={}){if(e&&e.focus){let n=(e.ownerDocument??document).activeElement;e.focus({preventScroll:!0}),e!==n&&Re(e)&&t&&e.select()}}G(Z,`focus`);var ze=Be();function Be(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=Q(e,t),e.unshift(t)},remove(t){e=Q(e,t),e[0]?.resume()}}}G(Be,`createFocusScopesStack`);function Q(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}G(Q,`arrayRemove`);function $(e){return e.filter(e=>e.tagName!==`A`)}G($,`removeLinks`);var Ve=Object.defineProperty,He=c.forwardRef(((e,t)=>Ve(e,`name`,{value:t,configurable:!0}))(function(e,t){let{container:n,...r}=e,[i,a]=c.useState(!1);b(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?l.createPortal((0,u.jsx)(p.div,{...r,ref:t}),o):null},`Portal`));export{s as _,Pe as a,B as c,N as d,w as f,m as g,p as h,Fe as i,R as l,v as m,je as n,we as o,b as p,Ne as r,Te as s,He as t,ue as u};