@purpurds/modal 8.3.0 → 8.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/LICENSE.txt CHANGED
@@ -627,35 +627,35 @@ SOFTWARE.
627
627
  ---
628
628
 
629
629
  Name: @purpurds/button
630
- Version: 8.2.6
630
+ Version: 8.3.1
631
631
  License: AGPL-3.0-only
632
632
  Private: false
633
633
 
634
634
  ---
635
635
 
636
636
  Name: @purpurds/heading
637
- Version: 8.2.6
637
+ Version: 8.3.1
638
638
  License: AGPL-3.0-only
639
639
  Private: false
640
640
 
641
641
  ---
642
642
 
643
643
  Name: @purpurds/icon
644
- Version: 8.2.6
644
+ Version: 8.3.1
645
645
  License: AGPL-3.0-only
646
646
  Private: false
647
647
 
648
648
  ---
649
649
 
650
650
  Name: @purpurds/paragraph
651
- Version: 8.2.6
651
+ Version: 8.3.1
652
652
  License: AGPL-3.0-only
653
653
  Private: false
654
654
 
655
655
  ---
656
656
 
657
657
  Name: @purpurds/visually-hidden
658
- Version: 8.2.6
658
+ Version: 8.3.1
659
659
  License: AGPL-3.0-only
660
660
  Private: false
661
661
 
package/dist/modal.cjs.js CHANGED
@@ -1,5 +1,5 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react/jsx-runtime"),P=require("react"),rt=require("react-dom");function nt(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const s=nt(P),zt=nt(rt);function I(e,t,{checkForDefaultPrevented:r=!0}={}){return function(a){if(e==null||e(a),r===!1||!a.defaultPrevented)return t==null?void 0:t(a)}}function Ce(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ot(...e){return t=>{let r=!1;const o=e.map(a=>{const n=Ce(a,t);return!r&&typeof n=="function"&&(r=!0),n});if(r)return()=>{for(let a=0;a<o.length;a++){const n=o[a];typeof n=="function"?n():Ce(e[a],null)}}}}function k(...e){return s.useCallback(ot(...e),e)}function Gt(e,t){const r=s.createContext(t),o=n=>{const{children:u,...i}=n,p=s.useMemo(()=>i,Object.values(i));return d.jsx(r.Provider,{value:p,children:u})};o.displayName=e+"Provider";function a(n){const u=s.useContext(r);if(u)return u;if(t!==void 0)return t;throw new Error(`\`${n}\` must be used within \`${e}\``)}return[o,a]}function Kt(e,t=[]){let r=[];function o(n,u){const i=s.createContext(u),p=r.length;r=[...r,u];const c=v=>{var _;const{scope:h,children:m,...b}=v,l=((_=h==null?void 0:h[e])==null?void 0:_[p])||i,g=s.useMemo(()=>b,Object.values(b));return d.jsx(l.Provider,{value:g,children:m})};c.displayName=n+"Provider";function f(v,h){var l;const m=((l=h==null?void 0:h[e])==null?void 0:l[p])||i,b=s.useContext(m);if(b)return b;if(u!==void 0)return u;throw new Error(`\`${v}\` must be used within \`${n}\``)}return[c,f]}const a=()=>{const n=r.map(u=>s.createContext(u));return function(i){const p=(i==null?void 0:i[e])||n;return s.useMemo(()=>({[`__scope${e}`]:{...i,[e]:p}}),[i,p])}};return a.scopeName=e,[o,Yt(a,...t)]}function Yt(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const o=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(n){const u=o.reduce((i,{useScope:p,scopeName:c})=>{const v=p(n)[`__scope${c}`];return{...i,...v}},{});return s.useMemo(()=>({[`__scope${t.scopeName}`]:u}),[u])}};return r.scopeName=t.scopeName,r}var K=globalThis!=null&&globalThis.document?s.useLayoutEffect:()=>{},Xt=s[" useId ".trim().toString()]||(()=>{}),Zt=0;function de(e){const[t,r]=s.useState(Xt());return K(()=>{r(o=>o??String(Zt++))},[e]),e||(t?`radix-${t}`:"")}var Qt=s[" useInsertionEffect ".trim().toString()]||K;function Jt({prop:e,defaultProp:t,onChange:r=()=>{},caller:o}){const[a,n,u]=er({defaultProp:t,onChange:r}),i=e!==void 0,p=i?e:a;{const f=s.useRef(e!==void 0);s.useEffect(()=>{const v=f.current;v!==i&&console.warn(`${o} is changing from ${v?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=i},[i,o])}const c=s.useCallback(f=>{var v;if(i){const h=tr(f)?f(e):f;h!==e&&((v=u.current)==null||v.call(u,h))}else n(f)},[i,e,n,u]);return[p,c]}function er({defaultProp:e,onChange:t}){const[r,o]=s.useState(e),a=s.useRef(r),n=s.useRef(t);return Qt(()=>{n.current=t},[t]),s.useEffect(()=>{var u;a.current!==r&&((u=n.current)==null||u.call(n,r),a.current=r)},[r,a]),[r,o,n]}function tr(e){return typeof e=="function"}function at(e){const t=rr(e),r=s.forwardRef((o,a)=>{const{children:n,...u}=o,i=s.Children.toArray(n),p=i.find(or);if(p){const c=p.props.children,f=i.map(v=>v===p?s.Children.count(c)>1?s.Children.only(null):s.isValidElement(c)?c.props.children:null:v);return d.jsx(t,{...u,ref:a,children:s.isValidElement(c)?s.cloneElement(c,void 0,f):null})}return d.jsx(t,{...u,ref:a,children:n})});return r.displayName=`${e}.Slot`,r}function rr(e){const t=s.forwardRef((r,o)=>{const{children:a,...n}=r;if(s.isValidElement(a)){const u=ir(a),i=ar(n,a.props);return a.type!==s.Fragment&&(i.ref=o?ot(o,u):u),s.cloneElement(a,i)}return s.Children.count(a)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var nr=Symbol("radix.slottable");function or(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===nr}function ar(e,t){const r={...t};for(const o in t){const a=e[o],n=t[o];/^on[A-Z]/.test(o)?a&&n?r[o]=(...i)=>{const p=n(...i);return a(...i),p}:a&&(r[o]=a):o==="style"?r[o]={...a,...n}:o==="className"&&(r[o]=[a,n].filter(Boolean).join(" "))}return{...e,...r}}function ir(e){var o,a;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var ur=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],$=ur.reduce((e,t)=>{const r=at(`Primitive.${t}`),o=s.forwardRef((a,n)=>{const{asChild:u,...i}=a,p=u?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(p,{...i,ref:n})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function sr(e,t){e&&zt.flushSync(()=>e.dispatchEvent(t))}function Y(e){const t=s.useRef(e);return s.useEffect(()=>{t.current=e}),s.useMemo(()=>(...r)=>{var o;return(o=t.current)==null?void 0:o.call(t,...r)},[])}function cr(e,t=globalThis==null?void 0:globalThis.document){const r=Y(e);s.useEffect(()=>{const o=a=>{a.key==="Escape"&&r(a)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[r,t])}var lr="DismissableLayer",be="dismissableLayer.update",dr="dismissableLayer.pointerDownOutside",pr="dismissableLayer.focusOutside",Ne,it=s.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ut=s.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:n,onInteractOutside:u,onDismiss:i,...p}=e,c=s.useContext(it),[f,v]=s.useState(null),h=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=s.useState({}),b=k(t,y=>v(y)),l=Array.from(c.layers),[g]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),_=l.indexOf(g),w=f?l.indexOf(f):-1,E=c.layersWithOutsidePointerEventsDisabled.size>0,x=w>=_,S=hr(y=>{const A=y.target,R=[...c.branches].some(q=>q.contains(A));!x||R||(a==null||a(y),u==null||u(y),y.defaultPrevented||i==null||i())},h),N=gr(y=>{const A=y.target;[...c.branches].some(q=>q.contains(A))||(n==null||n(y),u==null||u(y),y.defaultPrevented||i==null||i())},h);return cr(y=>{w===c.layers.size-1&&(o==null||o(y),!y.defaultPrevented&&i&&(y.preventDefault(),i()))},h),s.useEffect(()=>{if(f)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Ne=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(f)),c.layers.add(f),Oe(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Ne)}},[f,h,r,c]),s.useEffect(()=>()=>{f&&(c.layers.delete(f),c.layersWithOutsidePointerEventsDisabled.delete(f),Oe())},[f,c]),s.useEffect(()=>{const y=()=>m({});return document.addEventListener(be,y),()=>document.removeEventListener(be,y)},[]),d.jsx($.div,{...p,ref:b,style:{pointerEvents:E?x?"auto":"none":void 0,...e.style},onFocusCapture:I(e.onFocusCapture,N.onFocusCapture),onBlurCapture:I(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:I(e.onPointerDownCapture,S.onPointerDownCapture)})});ut.displayName=lr;var fr="DismissableLayerBranch",vr=s.forwardRef((e,t)=>{const r=s.useContext(it),o=s.useRef(null),a=k(t,o);return s.useEffect(()=>{const n=o.current;if(n)return r.branches.add(n),()=>{r.branches.delete(n)}},[r.branches]),d.jsx($.div,{...e,ref:a})});vr.displayName=fr;function hr(e,t=globalThis==null?void 0:globalThis.document){const r=Y(e),o=s.useRef(!1),a=s.useRef(()=>{});return s.useEffect(()=>{const n=i=>{if(i.target&&!o.current){let p=function(){st(dr,r,c,{discrete:!0})};const c={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=p,t.addEventListener("click",a.current,{once:!0})):p()}else t.removeEventListener("click",a.current);o.current=!1},u=window.setTimeout(()=>{t.addEventListener("pointerdown",n)},0);return()=>{window.clearTimeout(u),t.removeEventListener("pointerdown",n),t.removeEventListener("click",a.current)}},[t,r]),{onPointerDownCapture:()=>o.current=!0}}function gr(e,t=globalThis==null?void 0:globalThis.document){const r=Y(e),o=s.useRef(!1);return s.useEffect(()=>{const a=n=>{n.target&&!o.current&&st(pr,r,{originalEvent:n},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,r]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Oe(){const e=new CustomEvent(be);document.dispatchEvent(e)}function st(e,t,r,{discrete:o}){const a=r.originalEvent.target,n=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&a.addEventListener(e,t,{once:!0}),o?sr(a,n):a.dispatchEvent(n)}var pe="focusScope.autoFocusOnMount",fe="focusScope.autoFocusOnUnmount",Pe={bubbles:!1,cancelable:!0},mr="FocusScope",ct=s.forwardRef((e,t)=>{const{loop:r=!1,trapped:o=!1,onMountAutoFocus:a,onUnmountAutoFocus:n,...u}=e,[i,p]=s.useState(null),c=Y(a),f=Y(n),v=s.useRef(null),h=k(t,l=>p(l)),m=s.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;s.useEffect(()=>{if(o){let l=function(E){if(m.paused||!i)return;const x=E.target;i.contains(x)?v.current=x:M(v.current,{select:!0})},g=function(E){if(m.paused||!i)return;const x=E.relatedTarget;x!==null&&(i.contains(x)||M(v.current,{select:!0}))},_=function(E){if(document.activeElement===document.body)for(const S of E)S.removedNodes.length>0&&M(i)};document.addEventListener("focusin",l),document.addEventListener("focusout",g);const w=new MutationObserver(_);return i&&w.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",l),document.removeEventListener("focusout",g),w.disconnect()}}},[o,i,m.paused]),s.useEffect(()=>{if(i){Ae.add(m);const l=document.activeElement;if(!i.contains(l)){const _=new CustomEvent(pe,Pe);i.addEventListener(pe,c),i.dispatchEvent(_),_.defaultPrevented||(_r(xr(lt(i)),{select:!0}),document.activeElement===l&&M(i))}return()=>{i.removeEventListener(pe,c),setTimeout(()=>{const _=new CustomEvent(fe,Pe);i.addEventListener(fe,f),i.dispatchEvent(_),_.defaultPrevented||M(l??document.body,{select:!0}),i.removeEventListener(fe,f),Ae.remove(m)},0)}}},[i,c,f,m]);const b=s.useCallback(l=>{if(!r&&!o||m.paused)return;const g=l.key==="Tab"&&!l.altKey&&!l.ctrlKey&&!l.metaKey,_=document.activeElement;if(g&&_){const w=l.currentTarget,[E,x]=yr(w);E&&x?!l.shiftKey&&_===x?(l.preventDefault(),r&&M(E,{select:!0})):l.shiftKey&&_===E&&(l.preventDefault(),r&&M(x,{select:!0})):_===w&&l.preventDefault()}},[r,o,m.paused]);return d.jsx($.div,{tabIndex:-1,...u,ref:h,onKeyDown:b})});ct.displayName=mr;function _r(e,{select:t=!1}={}){const r=document.activeElement;for(const o of e)if(M(o,{select:t}),document.activeElement!==r)return}function yr(e){const t=lt(e),r=Re(t,e),o=Re(t.reverse(),e);return[r,o]}function lt(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const a=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||a?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Re(e,t){for(const r of e)if(!br(r,{upTo:t}))return r}function br(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}function wr(e){return e instanceof HTMLInputElement&&"select"in e}function M(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&wr(e)&&t&&e.select()}}var Ae=Er();function Er(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=De(e,t),e.unshift(t)},remove(t){var r;e=De(e,t),(r=e[0])==null||r.resume()}}}function De(e,t){const r=[...e],o=r.indexOf(t);return o!==-1&&r.splice(o,1),r}function xr(e){return e.filter(t=>t.tagName!=="A")}var Sr="Portal",dt=s.forwardRef((e,t)=>{var i;const{container:r,...o}=e,[a,n]=s.useState(!1);K(()=>n(!0),[]);const u=r||a&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return u?rt.createPortal(d.jsx($.div,{...o,ref:t}),u):null});dt.displayName=Sr;function Cr(e,t){return s.useReducer((r,o)=>t[r][o]??r,e)}var ue=e=>{const{present:t,children:r}=e,o=Nr(t),a=typeof r=="function"?r({present:o.isPresent}):s.Children.only(r),n=k(o.ref,Or(a));return typeof r=="function"||o.isPresent?s.cloneElement(a,{ref:n}):null};ue.displayName="Presence";function Nr(e){const[t,r]=s.useState(),o=s.useRef(null),a=s.useRef(e),n=s.useRef("none"),u=e?"mounted":"unmounted",[i,p]=Cr(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return s.useEffect(()=>{const c=Z(o.current);n.current=i==="mounted"?c:"none"},[i]),K(()=>{const c=o.current,f=a.current;if(f!==e){const h=n.current,m=Z(c);e?p("MOUNT"):m==="none"||(c==null?void 0:c.display)==="none"?p("UNMOUNT"):p(f&&h!==m?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,p]),K(()=>{if(t){let c;const f=t.ownerDocument.defaultView??window,v=m=>{const l=Z(o.current).includes(CSS.escape(m.animationName));if(m.target===t&&l&&(p("ANIMATION_END"),!a.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",c=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},h=m=>{m.target===t&&(n.current=Z(o.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",v),t.addEventListener("animationend",v),()=>{f.clearTimeout(c),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",v),t.removeEventListener("animationend",v)}}else p("ANIMATION_END")},[t,p]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:s.useCallback(c=>{o.current=c?getComputedStyle(c):null,r(c)},[])}}function Z(e){return(e==null?void 0:e.animationName)||"none"}function Or(e){var o,a;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var ve=0;function Pr(){s.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??je()),document.body.insertAdjacentElement("beforeend",e[1]??je()),ve++,()=>{ve===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),ve--}},[])}function je(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var T=function(){return T=Object.assign||function(t){for(var r,o=1,a=arguments.length;o<a;o++){r=arguments[o];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},T.apply(this,arguments)};function pt(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,o=Object.getOwnPropertySymbols(e);a<o.length;a++)t.indexOf(o[a])<0&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(r[o[a]]=e[o[a]]);return r}function Rr(e,t,r){if(r||arguments.length===2)for(var o=0,a=t.length,n;o<a;o++)(n||!(o in t))&&(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}var oe="right-scroll-bar-position",ae="width-before-scroll-bar",Ar="with-scroll-bars-hidden",Dr="--removed-body-scroll-bar-size";function he(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function jr(e,t){var r=P.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(o){var a=r.value;a!==o&&(r.value=o,r.callback(o,a))}}}})[0];return r.callback=t,r.facade}var Tr=typeof window<"u"?s.useLayoutEffect:s.useEffect,Te=new WeakMap;function $r(e,t){var r=jr(null,function(o){return e.forEach(function(a){return he(a,o)})});return Tr(function(){var o=Te.get(r);if(o){var a=new Set(o),n=new Set(e),u=r.current;a.forEach(function(i){n.has(i)||he(i,null)}),n.forEach(function(i){a.has(i)||he(i,u)})}Te.set(r,e)},[e]),r}function Mr(e){return e}function Ir(e,t){t===void 0&&(t=Mr);var r=[],o=!1,a={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(n){var u=t(n,o);return r.push(u),function(){r=r.filter(function(i){return i!==u})}},assignSyncMedium:function(n){for(o=!0;r.length;){var u=r;r=[],u.forEach(n)}r={push:function(i){return n(i)},filter:function(){return r}}},assignMedium:function(n){o=!0;var u=[];if(r.length){var i=r;r=[],i.forEach(n),u=r}var p=function(){var f=u;u=[],f.forEach(n)},c=function(){return Promise.resolve().then(p)};c(),r={push:function(f){u.push(f),c()},filter:function(f){return u=u.filter(f),r}}}};return a}function Lr(e){e===void 0&&(e={});var t=Ir(null);return t.options=T({async:!0,ssr:!1},e),t}var ft=function(e){var t=e.sideCar,r=pt(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return s.createElement(o,T({},r))};ft.isSideCarExport=!0;function Fr(e,t){return e.useMedium(t),ft}var vt=Lr(),ge=function(){},se=s.forwardRef(function(e,t){var r=s.useRef(null),o=s.useState({onScrollCapture:ge,onWheelCapture:ge,onTouchMoveCapture:ge}),a=o[0],n=o[1],u=e.forwardProps,i=e.children,p=e.className,c=e.removeScrollBar,f=e.enabled,v=e.shards,h=e.sideCar,m=e.noRelative,b=e.noIsolation,l=e.inert,g=e.allowPinchZoom,_=e.as,w=_===void 0?"div":_,E=e.gapMode,x=pt(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=h,N=$r([r,t]),y=T(T({},x),a);return s.createElement(s.Fragment,null,f&&s.createElement(S,{sideCar:vt,removeScrollBar:c,shards:v,noRelative:m,noIsolation:b,inert:l,setCallbacks:n,allowPinchZoom:!!g,lockRef:r,gapMode:E}),u?s.cloneElement(s.Children.only(i),T(T({},y),{ref:N})):s.createElement(w,T({},y,{className:p,ref:N}),i))});se.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};se.classNames={fullWidth:ae,zeroRight:oe};var kr=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Wr(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=kr();return t&&e.setAttribute("nonce",t),e}function Br(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Ur(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Vr=function(){var e=0,t=null;return{add:function(r){e==0&&(t=Wr())&&(Br(t,r),Ur(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Hr=function(){var e=Vr();return function(t,r){s.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},ht=function(){var e=Hr(),t=function(r){var o=r.styles,a=r.dynamic;return e(o,a),null};return t},qr={left:0,top:0,right:0,gap:0},me=function(e){return parseInt(e||"",10)||0},zr=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],a=t[e==="padding"?"paddingRight":"marginRight"];return[me(r),me(o),me(a)]},Gr=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return qr;var t=zr(e),r=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-r+t[2]-t[0])}},Kr=ht(),H="data-scroll-locked",Yr=function(e,t,r,o){var a=e.left,n=e.top,u=e.right,i=e.gap;return r===void 0&&(r="margin"),`
2
- .`.concat(Ar,` {
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react/jsx-runtime"),O=require("react"),rt=require("react-dom");function nt(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const s=nt(O),zt=nt(rt);function I(e,t,{checkForDefaultPrevented:r=!0}={}){return function(a){if(e==null||e(a),r===!1||!a.defaultPrevented)return t==null?void 0:t(a)}}function Ce(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ot(...e){return t=>{let r=!1;const o=e.map(a=>{const n=Ce(a,t);return!r&&typeof n=="function"&&(r=!0),n});if(r)return()=>{for(let a=0;a<o.length;a++){const n=o[a];typeof n=="function"?n():Ce(e[a],null)}}}}function k(...e){return s.useCallback(ot(...e),e)}function Gt(e,t){const r=s.createContext(t),o=n=>{const{children:u,...i}=n,p=s.useMemo(()=>i,Object.values(i));return d.jsx(r.Provider,{value:p,children:u})};o.displayName=e+"Provider";function a(n){const u=s.useContext(r);if(u)return u;if(t!==void 0)return t;throw new Error(`\`${n}\` must be used within \`${e}\``)}return[o,a]}function Kt(e,t=[]){let r=[];function o(n,u){const i=s.createContext(u),p=r.length;r=[...r,u];const c=v=>{var _;const{scope:h,children:g,...b}=v,l=((_=h==null?void 0:h[e])==null?void 0:_[p])||i,m=s.useMemo(()=>b,Object.values(b));return d.jsx(l.Provider,{value:m,children:g})};c.displayName=n+"Provider";function f(v,h){var l;const g=((l=h==null?void 0:h[e])==null?void 0:l[p])||i,b=s.useContext(g);if(b)return b;if(u!==void 0)return u;throw new Error(`\`${v}\` must be used within \`${n}\``)}return[c,f]}const a=()=>{const n=r.map(u=>s.createContext(u));return function(i){const p=(i==null?void 0:i[e])||n;return s.useMemo(()=>({[`__scope${e}`]:{...i,[e]:p}}),[i,p])}};return a.scopeName=e,[o,Yt(a,...t)]}function Yt(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const o=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(n){const u=o.reduce((i,{useScope:p,scopeName:c})=>{const v=p(n)[`__scope${c}`];return{...i,...v}},{});return s.useMemo(()=>({[`__scope${t.scopeName}`]:u}),[u])}};return r.scopeName=t.scopeName,r}var K=globalThis!=null&&globalThis.document?s.useLayoutEffect:()=>{},Xt=s[" useId ".trim().toString()]||(()=>{}),Zt=0;function de(e){const[t,r]=s.useState(Xt());return K(()=>{r(o=>o??String(Zt++))},[e]),e||(t?`radix-${t}`:"")}var Qt=s[" useInsertionEffect ".trim().toString()]||K;function Jt({prop:e,defaultProp:t,onChange:r=()=>{},caller:o}){const[a,n,u]=er({defaultProp:t,onChange:r}),i=e!==void 0,p=i?e:a;{const f=s.useRef(e!==void 0);s.useEffect(()=>{const v=f.current;v!==i&&console.warn(`${o} is changing from ${v?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=i},[i,o])}const c=s.useCallback(f=>{var v;if(i){const h=tr(f)?f(e):f;h!==e&&((v=u.current)==null||v.call(u,h))}else n(f)},[i,e,n,u]);return[p,c]}function er({defaultProp:e,onChange:t}){const[r,o]=s.useState(e),a=s.useRef(r),n=s.useRef(t);return Qt(()=>{n.current=t},[t]),s.useEffect(()=>{var u;a.current!==r&&((u=n.current)==null||u.call(n,r),a.current=r)},[r,a]),[r,o,n]}function tr(e){return typeof e=="function"}function at(e){const t=rr(e),r=s.forwardRef((o,a)=>{const{children:n,...u}=o,i=s.Children.toArray(n),p=i.find(or);if(p){const c=p.props.children,f=i.map(v=>v===p?s.Children.count(c)>1?s.Children.only(null):s.isValidElement(c)?c.props.children:null:v);return d.jsx(t,{...u,ref:a,children:s.isValidElement(c)?s.cloneElement(c,void 0,f):null})}return d.jsx(t,{...u,ref:a,children:n})});return r.displayName=`${e}.Slot`,r}function rr(e){const t=s.forwardRef((r,o)=>{const{children:a,...n}=r;if(s.isValidElement(a)){const u=ir(a),i=ar(n,a.props);return a.type!==s.Fragment&&(i.ref=o?ot(o,u):u),s.cloneElement(a,i)}return s.Children.count(a)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var nr=Symbol("radix.slottable");function or(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===nr}function ar(e,t){const r={...t};for(const o in t){const a=e[o],n=t[o];/^on[A-Z]/.test(o)?a&&n?r[o]=(...i)=>{const p=n(...i);return a(...i),p}:a&&(r[o]=a):o==="style"?r[o]={...a,...n}:o==="className"&&(r[o]=[a,n].filter(Boolean).join(" "))}return{...e,...r}}function ir(e){var o,a;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var ur=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],$=ur.reduce((e,t)=>{const r=at(`Primitive.${t}`),o=s.forwardRef((a,n)=>{const{asChild:u,...i}=a,p=u?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(p,{...i,ref:n})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function sr(e,t){e&&zt.flushSync(()=>e.dispatchEvent(t))}function Y(e){const t=s.useRef(e);return s.useEffect(()=>{t.current=e}),s.useMemo(()=>(...r)=>{var o;return(o=t.current)==null?void 0:o.call(t,...r)},[])}function cr(e,t=globalThis==null?void 0:globalThis.document){const r=Y(e);s.useEffect(()=>{const o=a=>{a.key==="Escape"&&r(a)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[r,t])}var lr="DismissableLayer",be="dismissableLayer.update",dr="dismissableLayer.pointerDownOutside",pr="dismissableLayer.focusOutside",Ne,it=s.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ut=s.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:n,onInteractOutside:u,onDismiss:i,...p}=e,c=s.useContext(it),[f,v]=s.useState(null),h=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=s.useState({}),b=k(t,y=>v(y)),l=Array.from(c.layers),[m]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),_=l.indexOf(m),w=f?l.indexOf(f):-1,E=c.layersWithOutsidePointerEventsDisabled.size>0,x=w>=_,S=hr(y=>{const R=y.target,P=[...c.branches].some(q=>q.contains(R));!x||P||(a==null||a(y),u==null||u(y),y.defaultPrevented||i==null||i())},h),N=mr(y=>{const R=y.target;[...c.branches].some(q=>q.contains(R))||(n==null||n(y),u==null||u(y),y.defaultPrevented||i==null||i())},h);return cr(y=>{w===c.layers.size-1&&(o==null||o(y),!y.defaultPrevented&&i&&(y.preventDefault(),i()))},h),s.useEffect(()=>{if(f)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Ne=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(f)),c.layers.add(f),je(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Ne)}},[f,h,r,c]),s.useEffect(()=>()=>{f&&(c.layers.delete(f),c.layersWithOutsidePointerEventsDisabled.delete(f),je())},[f,c]),s.useEffect(()=>{const y=()=>g({});return document.addEventListener(be,y),()=>document.removeEventListener(be,y)},[]),d.jsx($.div,{...p,ref:b,style:{pointerEvents:E?x?"auto":"none":void 0,...e.style},onFocusCapture:I(e.onFocusCapture,N.onFocusCapture),onBlurCapture:I(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:I(e.onPointerDownCapture,S.onPointerDownCapture)})});ut.displayName=lr;var fr="DismissableLayerBranch",vr=s.forwardRef((e,t)=>{const r=s.useContext(it),o=s.useRef(null),a=k(t,o);return s.useEffect(()=>{const n=o.current;if(n)return r.branches.add(n),()=>{r.branches.delete(n)}},[r.branches]),d.jsx($.div,{...e,ref:a})});vr.displayName=fr;function hr(e,t=globalThis==null?void 0:globalThis.document){const r=Y(e),o=s.useRef(!1),a=s.useRef(()=>{});return s.useEffect(()=>{const n=i=>{if(i.target&&!o.current){let p=function(){st(dr,r,c,{discrete:!0})};const c={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=p,t.addEventListener("click",a.current,{once:!0})):p()}else t.removeEventListener("click",a.current);o.current=!1},u=window.setTimeout(()=>{t.addEventListener("pointerdown",n)},0);return()=>{window.clearTimeout(u),t.removeEventListener("pointerdown",n),t.removeEventListener("click",a.current)}},[t,r]),{onPointerDownCapture:()=>o.current=!0}}function mr(e,t=globalThis==null?void 0:globalThis.document){const r=Y(e),o=s.useRef(!1);return s.useEffect(()=>{const a=n=>{n.target&&!o.current&&st(pr,r,{originalEvent:n},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,r]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function je(){const e=new CustomEvent(be);document.dispatchEvent(e)}function st(e,t,r,{discrete:o}){const a=r.originalEvent.target,n=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&a.addEventListener(e,t,{once:!0}),o?sr(a,n):a.dispatchEvent(n)}var pe="focusScope.autoFocusOnMount",fe="focusScope.autoFocusOnUnmount",Oe={bubbles:!1,cancelable:!0},gr="FocusScope",ct=s.forwardRef((e,t)=>{const{loop:r=!1,trapped:o=!1,onMountAutoFocus:a,onUnmountAutoFocus:n,...u}=e,[i,p]=s.useState(null),c=Y(a),f=Y(n),v=s.useRef(null),h=k(t,l=>p(l)),g=s.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;s.useEffect(()=>{if(o){let l=function(E){if(g.paused||!i)return;const x=E.target;i.contains(x)?v.current=x:M(v.current,{select:!0})},m=function(E){if(g.paused||!i)return;const x=E.relatedTarget;x!==null&&(i.contains(x)||M(v.current,{select:!0}))},_=function(E){if(document.activeElement===document.body)for(const S of E)S.removedNodes.length>0&&M(i)};document.addEventListener("focusin",l),document.addEventListener("focusout",m);const w=new MutationObserver(_);return i&&w.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",l),document.removeEventListener("focusout",m),w.disconnect()}}},[o,i,g.paused]),s.useEffect(()=>{if(i){Re.add(g);const l=document.activeElement;if(!i.contains(l)){const _=new CustomEvent(pe,Oe);i.addEventListener(pe,c),i.dispatchEvent(_),_.defaultPrevented||(_r(xr(lt(i)),{select:!0}),document.activeElement===l&&M(i))}return()=>{i.removeEventListener(pe,c),setTimeout(()=>{const _=new CustomEvent(fe,Oe);i.addEventListener(fe,f),i.dispatchEvent(_),_.defaultPrevented||M(l??document.body,{select:!0}),i.removeEventListener(fe,f),Re.remove(g)},0)}}},[i,c,f,g]);const b=s.useCallback(l=>{if(!r&&!o||g.paused)return;const m=l.key==="Tab"&&!l.altKey&&!l.ctrlKey&&!l.metaKey,_=document.activeElement;if(m&&_){const w=l.currentTarget,[E,x]=yr(w);E&&x?!l.shiftKey&&_===x?(l.preventDefault(),r&&M(E,{select:!0})):l.shiftKey&&_===E&&(l.preventDefault(),r&&M(x,{select:!0})):_===w&&l.preventDefault()}},[r,o,g.paused]);return d.jsx($.div,{tabIndex:-1,...u,ref:h,onKeyDown:b})});ct.displayName=gr;function _r(e,{select:t=!1}={}){const r=document.activeElement;for(const o of e)if(M(o,{select:t}),document.activeElement!==r)return}function yr(e){const t=lt(e),r=Pe(t,e),o=Pe(t.reverse(),e);return[r,o]}function lt(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const a=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||a?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Pe(e,t){for(const r of e)if(!br(r,{upTo:t}))return r}function br(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}function wr(e){return e instanceof HTMLInputElement&&"select"in e}function M(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&wr(e)&&t&&e.select()}}var Re=Er();function Er(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=Ae(e,t),e.unshift(t)},remove(t){var r;e=Ae(e,t),(r=e[0])==null||r.resume()}}}function Ae(e,t){const r=[...e],o=r.indexOf(t);return o!==-1&&r.splice(o,1),r}function xr(e){return e.filter(t=>t.tagName!=="A")}var Sr="Portal",dt=s.forwardRef((e,t)=>{var i;const{container:r,...o}=e,[a,n]=s.useState(!1);K(()=>n(!0),[]);const u=r||a&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return u?rt.createPortal(d.jsx($.div,{...o,ref:t}),u):null});dt.displayName=Sr;function Cr(e,t){return s.useReducer((r,o)=>t[r][o]??r,e)}var ue=e=>{const{present:t,children:r}=e,o=Nr(t),a=typeof r=="function"?r({present:o.isPresent}):s.Children.only(r),n=k(o.ref,jr(a));return typeof r=="function"||o.isPresent?s.cloneElement(a,{ref:n}):null};ue.displayName="Presence";function Nr(e){const[t,r]=s.useState(),o=s.useRef(null),a=s.useRef(e),n=s.useRef("none"),u=e?"mounted":"unmounted",[i,p]=Cr(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return s.useEffect(()=>{const c=Z(o.current);n.current=i==="mounted"?c:"none"},[i]),K(()=>{const c=o.current,f=a.current;if(f!==e){const h=n.current,g=Z(c);e?p("MOUNT"):g==="none"||(c==null?void 0:c.display)==="none"?p("UNMOUNT"):p(f&&h!==g?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,p]),K(()=>{if(t){let c;const f=t.ownerDocument.defaultView??window,v=g=>{const l=Z(o.current).includes(CSS.escape(g.animationName));if(g.target===t&&l&&(p("ANIMATION_END"),!a.current)){const m=t.style.animationFillMode;t.style.animationFillMode="forwards",c=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=m)})}},h=g=>{g.target===t&&(n.current=Z(o.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",v),t.addEventListener("animationend",v),()=>{f.clearTimeout(c),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",v),t.removeEventListener("animationend",v)}}else p("ANIMATION_END")},[t,p]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:s.useCallback(c=>{o.current=c?getComputedStyle(c):null,r(c)},[])}}function Z(e){return(e==null?void 0:e.animationName)||"none"}function jr(e){var o,a;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var ve=0;function Or(){s.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??De()),document.body.insertAdjacentElement("beforeend",e[1]??De()),ve++,()=>{ve===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),ve--}},[])}function De(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var T=function(){return T=Object.assign||function(t){for(var r,o=1,a=arguments.length;o<a;o++){r=arguments[o];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},T.apply(this,arguments)};function pt(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,o=Object.getOwnPropertySymbols(e);a<o.length;a++)t.indexOf(o[a])<0&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(r[o[a]]=e[o[a]]);return r}function Pr(e,t,r){if(r||arguments.length===2)for(var o=0,a=t.length,n;o<a;o++)(n||!(o in t))&&(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}var oe="right-scroll-bar-position",ae="width-before-scroll-bar",Rr="with-scroll-bars-hidden",Ar="--removed-body-scroll-bar-size";function he(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Dr(e,t){var r=O.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(o){var a=r.value;a!==o&&(r.value=o,r.callback(o,a))}}}})[0];return r.callback=t,r.facade}var Tr=typeof window<"u"?s.useLayoutEffect:s.useEffect,Te=new WeakMap;function $r(e,t){var r=Dr(null,function(o){return e.forEach(function(a){return he(a,o)})});return Tr(function(){var o=Te.get(r);if(o){var a=new Set(o),n=new Set(e),u=r.current;a.forEach(function(i){n.has(i)||he(i,null)}),n.forEach(function(i){a.has(i)||he(i,u)})}Te.set(r,e)},[e]),r}function Mr(e){return e}function Ir(e,t){t===void 0&&(t=Mr);var r=[],o=!1,a={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(n){var u=t(n,o);return r.push(u),function(){r=r.filter(function(i){return i!==u})}},assignSyncMedium:function(n){for(o=!0;r.length;){var u=r;r=[],u.forEach(n)}r={push:function(i){return n(i)},filter:function(){return r}}},assignMedium:function(n){o=!0;var u=[];if(r.length){var i=r;r=[],i.forEach(n),u=r}var p=function(){var f=u;u=[],f.forEach(n)},c=function(){return Promise.resolve().then(p)};c(),r={push:function(f){u.push(f),c()},filter:function(f){return u=u.filter(f),r}}}};return a}function Lr(e){e===void 0&&(e={});var t=Ir(null);return t.options=T({async:!0,ssr:!1},e),t}var ft=function(e){var t=e.sideCar,r=pt(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return s.createElement(o,T({},r))};ft.isSideCarExport=!0;function Fr(e,t){return e.useMedium(t),ft}var vt=Lr(),me=function(){},se=s.forwardRef(function(e,t){var r=s.useRef(null),o=s.useState({onScrollCapture:me,onWheelCapture:me,onTouchMoveCapture:me}),a=o[0],n=o[1],u=e.forwardProps,i=e.children,p=e.className,c=e.removeScrollBar,f=e.enabled,v=e.shards,h=e.sideCar,g=e.noRelative,b=e.noIsolation,l=e.inert,m=e.allowPinchZoom,_=e.as,w=_===void 0?"div":_,E=e.gapMode,x=pt(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=h,N=$r([r,t]),y=T(T({},x),a);return s.createElement(s.Fragment,null,f&&s.createElement(S,{sideCar:vt,removeScrollBar:c,shards:v,noRelative:g,noIsolation:b,inert:l,setCallbacks:n,allowPinchZoom:!!m,lockRef:r,gapMode:E}),u?s.cloneElement(s.Children.only(i),T(T({},y),{ref:N})):s.createElement(w,T({},y,{className:p,ref:N}),i))});se.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};se.classNames={fullWidth:ae,zeroRight:oe};var kr=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Wr(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=kr();return t&&e.setAttribute("nonce",t),e}function Br(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Ur(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Vr=function(){var e=0,t=null;return{add:function(r){e==0&&(t=Wr())&&(Br(t,r),Ur(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Hr=function(){var e=Vr();return function(t,r){s.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},ht=function(){var e=Hr(),t=function(r){var o=r.styles,a=r.dynamic;return e(o,a),null};return t},qr={left:0,top:0,right:0,gap:0},ge=function(e){return parseInt(e||"",10)||0},zr=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],a=t[e==="padding"?"paddingRight":"marginRight"];return[ge(r),ge(o),ge(a)]},Gr=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return qr;var t=zr(e),r=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-r+t[2]-t[0])}},Kr=ht(),H="data-scroll-locked",Yr=function(e,t,r,o){var a=e.left,n=e.top,u=e.right,i=e.gap;return r===void 0&&(r="margin"),`
2
+ .`.concat(Rr,` {
3
3
  overflow: hidden `).concat(o,`;
4
4
  padding-right: `).concat(i,"px ").concat(o,`;
5
5
  }
@@ -33,16 +33,16 @@
33
33
  }
34
34
 
35
35
  body[`).concat(H,`] {
36
- `).concat(Dr,": ").concat(i,`px;
36
+ `).concat(Ar,": ").concat(i,`px;
37
37
  }
38
- `)},$e=function(){var e=parseInt(document.body.getAttribute(H)||"0",10);return isFinite(e)?e:0},Xr=function(){s.useEffect(function(){return document.body.setAttribute(H,($e()+1).toString()),function(){var e=$e()-1;e<=0?document.body.removeAttribute(H):document.body.setAttribute(H,e.toString())}},[])},Zr=function(e){var t=e.noRelative,r=e.noImportant,o=e.gapMode,a=o===void 0?"margin":o;Xr();var n=s.useMemo(function(){return Gr(a)},[a]);return s.createElement(Kr,{styles:Yr(n,!t,a,r?"":"!important")})},we=!1;if(typeof window<"u")try{var Q=Object.defineProperty({},"passive",{get:function(){return we=!0,!0}});window.addEventListener("test",Q,Q),window.removeEventListener("test",Q,Q)}catch{we=!1}var B=we?{passive:!1}:!1,Qr=function(e){return e.tagName==="TEXTAREA"},gt=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!Qr(e)&&r[t]==="visible")},Jr=function(e){return gt(e,"overflowY")},en=function(e){return gt(e,"overflowX")},Me=function(e,t){var r=t.ownerDocument,o=t;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var a=mt(e,o);if(a){var n=_t(e,o),u=n[1],i=n[2];if(u>i)return!0}o=o.parentNode}while(o&&o!==r.body);return!1},tn=function(e){var t=e.scrollTop,r=e.scrollHeight,o=e.clientHeight;return[t,r,o]},rn=function(e){var t=e.scrollLeft,r=e.scrollWidth,o=e.clientWidth;return[t,r,o]},mt=function(e,t){return e==="v"?Jr(t):en(t)},_t=function(e,t){return e==="v"?tn(t):rn(t)},nn=function(e,t){return e==="h"&&t==="rtl"?-1:1},on=function(e,t,r,o,a){var n=nn(e,window.getComputedStyle(t).direction),u=n*o,i=r.target,p=t.contains(i),c=!1,f=u>0,v=0,h=0;do{if(!i)break;var m=_t(e,i),b=m[0],l=m[1],g=m[2],_=l-g-n*b;(b||_)&&mt(e,i)&&(v+=_,h+=b);var w=i.parentNode;i=w&&w.nodeType===Node.DOCUMENT_FRAGMENT_NODE?w.host:w}while(!p&&i!==document.body||p&&(t.contains(i)||t===i));return(f&&Math.abs(v)<1||!f&&Math.abs(h)<1)&&(c=!0),c},J=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ie=function(e){return[e.deltaX,e.deltaY]},Le=function(e){return e&&"current"in e?e.current:e},an=function(e,t){return e[0]===t[0]&&e[1]===t[1]},un=function(e){return`
38
+ `)},$e=function(){var e=parseInt(document.body.getAttribute(H)||"0",10);return isFinite(e)?e:0},Xr=function(){s.useEffect(function(){return document.body.setAttribute(H,($e()+1).toString()),function(){var e=$e()-1;e<=0?document.body.removeAttribute(H):document.body.setAttribute(H,e.toString())}},[])},Zr=function(e){var t=e.noRelative,r=e.noImportant,o=e.gapMode,a=o===void 0?"margin":o;Xr();var n=s.useMemo(function(){return Gr(a)},[a]);return s.createElement(Kr,{styles:Yr(n,!t,a,r?"":"!important")})},we=!1;if(typeof window<"u")try{var Q=Object.defineProperty({},"passive",{get:function(){return we=!0,!0}});window.addEventListener("test",Q,Q),window.removeEventListener("test",Q,Q)}catch{we=!1}var B=we?{passive:!1}:!1,Qr=function(e){return e.tagName==="TEXTAREA"},mt=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!Qr(e)&&r[t]==="visible")},Jr=function(e){return mt(e,"overflowY")},en=function(e){return mt(e,"overflowX")},Me=function(e,t){var r=t.ownerDocument,o=t;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var a=gt(e,o);if(a){var n=_t(e,o),u=n[1],i=n[2];if(u>i)return!0}o=o.parentNode}while(o&&o!==r.body);return!1},tn=function(e){var t=e.scrollTop,r=e.scrollHeight,o=e.clientHeight;return[t,r,o]},rn=function(e){var t=e.scrollLeft,r=e.scrollWidth,o=e.clientWidth;return[t,r,o]},gt=function(e,t){return e==="v"?Jr(t):en(t)},_t=function(e,t){return e==="v"?tn(t):rn(t)},nn=function(e,t){return e==="h"&&t==="rtl"?-1:1},on=function(e,t,r,o,a){var n=nn(e,window.getComputedStyle(t).direction),u=n*o,i=r.target,p=t.contains(i),c=!1,f=u>0,v=0,h=0;do{if(!i)break;var g=_t(e,i),b=g[0],l=g[1],m=g[2],_=l-m-n*b;(b||_)&&gt(e,i)&&(v+=_,h+=b);var w=i.parentNode;i=w&&w.nodeType===Node.DOCUMENT_FRAGMENT_NODE?w.host:w}while(!p&&i!==document.body||p&&(t.contains(i)||t===i));return(f&&Math.abs(v)<1||!f&&Math.abs(h)<1)&&(c=!0),c},J=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ie=function(e){return[e.deltaX,e.deltaY]},Le=function(e){return e&&"current"in e?e.current:e},an=function(e,t){return e[0]===t[0]&&e[1]===t[1]},un=function(e){return`
39
39
  .block-interactivity-`.concat(e,` {pointer-events: none;}
40
40
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
41
- `)},sn=0,U=[];function cn(e){var t=s.useRef([]),r=s.useRef([0,0]),o=s.useRef(),a=s.useState(sn++)[0],n=s.useState(ht)[0],u=s.useRef(e);s.useEffect(function(){u.current=e},[e]),s.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var l=Rr([e.lockRef.current],(e.shards||[]).map(Le),!0).filter(Boolean);return l.forEach(function(g){return g.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),l.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var i=s.useCallback(function(l,g){if("touches"in l&&l.touches.length===2||l.type==="wheel"&&l.ctrlKey)return!u.current.allowPinchZoom;var _=J(l),w=r.current,E="deltaX"in l?l.deltaX:w[0]-_[0],x="deltaY"in l?l.deltaY:w[1]-_[1],S,N=l.target,y=Math.abs(E)>Math.abs(x)?"h":"v";if("touches"in l&&y==="h"&&N.type==="range")return!1;var A=Me(y,N);if(!A)return!0;if(A?S=y:(S=y==="v"?"h":"v",A=Me(y,N)),!A)return!1;if(!o.current&&"changedTouches"in l&&(E||x)&&(o.current=S),!S)return!0;var R=o.current||S;return on(R,g,l,R==="h"?E:x)},[]),p=s.useCallback(function(l){var g=l;if(!(!U.length||U[U.length-1]!==n)){var _="deltaY"in g?Ie(g):J(g),w=t.current.filter(function(S){return S.name===g.type&&(S.target===g.target||g.target===S.shadowParent)&&an(S.delta,_)})[0];if(w&&w.should){g.cancelable&&g.preventDefault();return}if(!w){var E=(u.current.shards||[]).map(Le).filter(Boolean).filter(function(S){return S.contains(g.target)}),x=E.length>0?i(g,E[0]):!u.current.noIsolation;x&&g.cancelable&&g.preventDefault()}}},[]),c=s.useCallback(function(l,g,_,w){var E={name:l,delta:g,target:_,should:w,shadowParent:ln(_)};t.current.push(E),setTimeout(function(){t.current=t.current.filter(function(x){return x!==E})},1)},[]),f=s.useCallback(function(l){r.current=J(l),o.current=void 0},[]),v=s.useCallback(function(l){c(l.type,Ie(l),l.target,i(l,e.lockRef.current))},[]),h=s.useCallback(function(l){c(l.type,J(l),l.target,i(l,e.lockRef.current))},[]);s.useEffect(function(){return U.push(n),e.setCallbacks({onScrollCapture:v,onWheelCapture:v,onTouchMoveCapture:h}),document.addEventListener("wheel",p,B),document.addEventListener("touchmove",p,B),document.addEventListener("touchstart",f,B),function(){U=U.filter(function(l){return l!==n}),document.removeEventListener("wheel",p,B),document.removeEventListener("touchmove",p,B),document.removeEventListener("touchstart",f,B)}},[]);var m=e.removeScrollBar,b=e.inert;return s.createElement(s.Fragment,null,b?s.createElement(n,{styles:un(a)}):null,m?s.createElement(Zr,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function ln(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const dn=Fr(vt,cn);var yt=s.forwardRef(function(e,t){return s.createElement(se,T({},e,{ref:t,sideCar:dn}))});yt.classNames=se.classNames;var pn=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},V=new WeakMap,ee=new WeakMap,te={},_e=0,bt=function(e){return e&&(e.host||bt(e.parentNode))},fn=function(e,t){return t.map(function(r){if(e.contains(r))return r;var o=bt(r);return o&&e.contains(o)?o:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},vn=function(e,t,r,o){var a=fn(t,Array.isArray(e)?e:[e]);te[r]||(te[r]=new WeakMap);var n=te[r],u=[],i=new Set,p=new Set(a),c=function(v){!v||i.has(v)||(i.add(v),c(v.parentNode))};a.forEach(c);var f=function(v){!v||p.has(v)||Array.prototype.forEach.call(v.children,function(h){if(i.has(h))f(h);else try{var m=h.getAttribute(o),b=m!==null&&m!=="false",l=(V.get(h)||0)+1,g=(n.get(h)||0)+1;V.set(h,l),n.set(h,g),u.push(h),l===1&&b&&ee.set(h,!0),g===1&&h.setAttribute(r,"true"),b||h.setAttribute(o,"true")}catch(_){console.error("aria-hidden: cannot operate on ",h,_)}})};return f(t),i.clear(),_e++,function(){u.forEach(function(v){var h=V.get(v)-1,m=n.get(v)-1;V.set(v,h),n.set(v,m),h||(ee.has(v)||v.removeAttribute(o),ee.delete(v)),m||v.removeAttribute(r)}),_e--,_e||(V=new WeakMap,V=new WeakMap,ee=new WeakMap,te={})}},hn=function(e,t,r){r===void 0&&(r="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),a=pn(e);return a?(o.push.apply(o,Array.from(a.querySelectorAll("[aria-live], script"))),vn(o,a,r,"aria-hidden")):function(){return null}},ce="Dialog",[wt]=Kt(ce),[gn,D]=wt(ce),Et=e=>{const{__scopeDialog:t,children:r,open:o,defaultOpen:a,onOpenChange:n,modal:u=!0}=e,i=s.useRef(null),p=s.useRef(null),[c,f]=Jt({prop:o,defaultProp:a??!1,onChange:n,caller:ce});return d.jsx(gn,{scope:t,triggerRef:i,contentRef:p,contentId:de(),titleId:de(),descriptionId:de(),open:c,onOpenChange:f,onOpenToggle:s.useCallback(()=>f(v=>!v),[f]),modal:u,children:r})};Et.displayName=ce;var xt="DialogTrigger",St=s.forwardRef((e,t)=>{const{__scopeDialog:r,...o}=e,a=D(xt,r),n=k(t,a.triggerRef);return d.jsx($.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":Se(a.open),...o,ref:n,onClick:I(e.onClick,a.onOpenToggle)})});St.displayName=xt;var Ee="DialogPortal",[mn,Ct]=wt(Ee,{forceMount:void 0}),Nt=e=>{const{__scopeDialog:t,forceMount:r,children:o,container:a}=e,n=D(Ee,t);return d.jsx(mn,{scope:t,forceMount:r,children:s.Children.map(o,u=>d.jsx(ue,{present:r||n.open,children:d.jsx(dt,{asChild:!0,container:a,children:u})}))})};Nt.displayName=Ee;var ie="DialogOverlay",Ot=s.forwardRef((e,t)=>{const r=Ct(ie,e.__scopeDialog),{forceMount:o=r.forceMount,...a}=e,n=D(ie,e.__scopeDialog);return n.modal?d.jsx(ue,{present:o||n.open,children:d.jsx(yn,{...a,ref:t})}):null});Ot.displayName=ie;var _n=at("DialogOverlay.RemoveScroll"),yn=s.forwardRef((e,t)=>{const{__scopeDialog:r,...o}=e,a=D(ie,r);return d.jsx(yt,{as:_n,allowPinchZoom:!0,shards:[a.contentRef],children:d.jsx($.div,{"data-state":Se(a.open),...o,ref:t,style:{pointerEvents:"auto",...o.style}})})}),F="DialogContent",Pt=s.forwardRef((e,t)=>{const r=Ct(F,e.__scopeDialog),{forceMount:o=r.forceMount,...a}=e,n=D(F,e.__scopeDialog);return d.jsx(ue,{present:o||n.open,children:n.modal?d.jsx(bn,{...a,ref:t}):d.jsx(wn,{...a,ref:t})})});Pt.displayName=F;var bn=s.forwardRef((e,t)=>{const r=D(F,e.__scopeDialog),o=s.useRef(null),a=k(t,r.contentRef,o);return s.useEffect(()=>{const n=o.current;if(n)return hn(n)},[]),d.jsx(Rt,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:I(e.onCloseAutoFocus,n=>{var u;n.preventDefault(),(u=r.triggerRef.current)==null||u.focus()}),onPointerDownOutside:I(e.onPointerDownOutside,n=>{const u=n.detail.originalEvent,i=u.button===0&&u.ctrlKey===!0;(u.button===2||i)&&n.preventDefault()}),onFocusOutside:I(e.onFocusOutside,n=>n.preventDefault())})}),wn=s.forwardRef((e,t)=>{const r=D(F,e.__scopeDialog),o=s.useRef(!1),a=s.useRef(!1);return d.jsx(Rt,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:n=>{var u,i;(u=e.onCloseAutoFocus)==null||u.call(e,n),n.defaultPrevented||(o.current||(i=r.triggerRef.current)==null||i.focus(),n.preventDefault()),o.current=!1,a.current=!1},onInteractOutside:n=>{var p,c;(p=e.onInteractOutside)==null||p.call(e,n),n.defaultPrevented||(o.current=!0,n.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const u=n.target;((c=r.triggerRef.current)==null?void 0:c.contains(u))&&n.preventDefault(),n.detail.originalEvent.type==="focusin"&&a.current&&n.preventDefault()}})}),Rt=s.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:n,...u}=e,i=D(F,r),p=s.useRef(null),c=k(t,p);return Pr(),d.jsxs(d.Fragment,{children:[d.jsx(ct,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:a,onUnmountAutoFocus:n,children:d.jsx(ut,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":Se(i.open),...u,ref:c,onDismiss:()=>i.onOpenChange(!1)})}),d.jsxs(d.Fragment,{children:[d.jsx(En,{titleId:i.titleId}),d.jsx(Sn,{contentRef:p,descriptionId:i.descriptionId})]})]})}),xe="DialogTitle",At=s.forwardRef((e,t)=>{const{__scopeDialog:r,...o}=e,a=D(xe,r);return d.jsx($.h2,{id:a.titleId,...o,ref:t})});At.displayName=xe;var Dt="DialogDescription",jt=s.forwardRef((e,t)=>{const{__scopeDialog:r,...o}=e,a=D(Dt,r);return d.jsx($.p,{id:a.descriptionId,...o,ref:t})});jt.displayName=Dt;var Tt="DialogClose",$t=s.forwardRef((e,t)=>{const{__scopeDialog:r,...o}=e,a=D(Tt,r);return d.jsx($.button,{type:"button",...o,ref:t,onClick:I(e.onClick,()=>a.onOpenChange(!1))})});$t.displayName=Tt;function Se(e){return e?"open":"closed"}var Mt="DialogTitleWarning",[Fo,It]=Gt(Mt,{contentName:F,titleName:xe,docsSlug:"dialog"}),En=({titleId:e})=>{const t=It(Mt),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
41
+ `)},sn=0,U=[];function cn(e){var t=s.useRef([]),r=s.useRef([0,0]),o=s.useRef(),a=s.useState(sn++)[0],n=s.useState(ht)[0],u=s.useRef(e);s.useEffect(function(){u.current=e},[e]),s.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var l=Pr([e.lockRef.current],(e.shards||[]).map(Le),!0).filter(Boolean);return l.forEach(function(m){return m.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),l.forEach(function(m){return m.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var i=s.useCallback(function(l,m){if("touches"in l&&l.touches.length===2||l.type==="wheel"&&l.ctrlKey)return!u.current.allowPinchZoom;var _=J(l),w=r.current,E="deltaX"in l?l.deltaX:w[0]-_[0],x="deltaY"in l?l.deltaY:w[1]-_[1],S,N=l.target,y=Math.abs(E)>Math.abs(x)?"h":"v";if("touches"in l&&y==="h"&&N.type==="range")return!1;var R=Me(y,N);if(!R)return!0;if(R?S=y:(S=y==="v"?"h":"v",R=Me(y,N)),!R)return!1;if(!o.current&&"changedTouches"in l&&(E||x)&&(o.current=S),!S)return!0;var P=o.current||S;return on(P,m,l,P==="h"?E:x)},[]),p=s.useCallback(function(l){var m=l;if(!(!U.length||U[U.length-1]!==n)){var _="deltaY"in m?Ie(m):J(m),w=t.current.filter(function(S){return S.name===m.type&&(S.target===m.target||m.target===S.shadowParent)&&an(S.delta,_)})[0];if(w&&w.should){m.cancelable&&m.preventDefault();return}if(!w){var E=(u.current.shards||[]).map(Le).filter(Boolean).filter(function(S){return S.contains(m.target)}),x=E.length>0?i(m,E[0]):!u.current.noIsolation;x&&m.cancelable&&m.preventDefault()}}},[]),c=s.useCallback(function(l,m,_,w){var E={name:l,delta:m,target:_,should:w,shadowParent:ln(_)};t.current.push(E),setTimeout(function(){t.current=t.current.filter(function(x){return x!==E})},1)},[]),f=s.useCallback(function(l){r.current=J(l),o.current=void 0},[]),v=s.useCallback(function(l){c(l.type,Ie(l),l.target,i(l,e.lockRef.current))},[]),h=s.useCallback(function(l){c(l.type,J(l),l.target,i(l,e.lockRef.current))},[]);s.useEffect(function(){return U.push(n),e.setCallbacks({onScrollCapture:v,onWheelCapture:v,onTouchMoveCapture:h}),document.addEventListener("wheel",p,B),document.addEventListener("touchmove",p,B),document.addEventListener("touchstart",f,B),function(){U=U.filter(function(l){return l!==n}),document.removeEventListener("wheel",p,B),document.removeEventListener("touchmove",p,B),document.removeEventListener("touchstart",f,B)}},[]);var g=e.removeScrollBar,b=e.inert;return s.createElement(s.Fragment,null,b?s.createElement(n,{styles:un(a)}):null,g?s.createElement(Zr,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function ln(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const dn=Fr(vt,cn);var yt=s.forwardRef(function(e,t){return s.createElement(se,T({},e,{ref:t,sideCar:dn}))});yt.classNames=se.classNames;var pn=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},V=new WeakMap,ee=new WeakMap,te={},_e=0,bt=function(e){return e&&(e.host||bt(e.parentNode))},fn=function(e,t){return t.map(function(r){if(e.contains(r))return r;var o=bt(r);return o&&e.contains(o)?o:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},vn=function(e,t,r,o){var a=fn(t,Array.isArray(e)?e:[e]);te[r]||(te[r]=new WeakMap);var n=te[r],u=[],i=new Set,p=new Set(a),c=function(v){!v||i.has(v)||(i.add(v),c(v.parentNode))};a.forEach(c);var f=function(v){!v||p.has(v)||Array.prototype.forEach.call(v.children,function(h){if(i.has(h))f(h);else try{var g=h.getAttribute(o),b=g!==null&&g!=="false",l=(V.get(h)||0)+1,m=(n.get(h)||0)+1;V.set(h,l),n.set(h,m),u.push(h),l===1&&b&&ee.set(h,!0),m===1&&h.setAttribute(r,"true"),b||h.setAttribute(o,"true")}catch(_){console.error("aria-hidden: cannot operate on ",h,_)}})};return f(t),i.clear(),_e++,function(){u.forEach(function(v){var h=V.get(v)-1,g=n.get(v)-1;V.set(v,h),n.set(v,g),h||(ee.has(v)||v.removeAttribute(o),ee.delete(v)),g||v.removeAttribute(r)}),_e--,_e||(V=new WeakMap,V=new WeakMap,ee=new WeakMap,te={})}},hn=function(e,t,r){r===void 0&&(r="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),a=pn(e);return a?(o.push.apply(o,Array.from(a.querySelectorAll("[aria-live], script"))),vn(o,a,r,"aria-hidden")):function(){return null}},ce="Dialog",[wt]=Kt(ce),[mn,A]=wt(ce),Et=e=>{const{__scopeDialog:t,children:r,open:o,defaultOpen:a,onOpenChange:n,modal:u=!0}=e,i=s.useRef(null),p=s.useRef(null),[c,f]=Jt({prop:o,defaultProp:a??!1,onChange:n,caller:ce});return d.jsx(mn,{scope:t,triggerRef:i,contentRef:p,contentId:de(),titleId:de(),descriptionId:de(),open:c,onOpenChange:f,onOpenToggle:s.useCallback(()=>f(v=>!v),[f]),modal:u,children:r})};Et.displayName=ce;var xt="DialogTrigger",St=s.forwardRef((e,t)=>{const{__scopeDialog:r,...o}=e,a=A(xt,r),n=k(t,a.triggerRef);return d.jsx($.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":Se(a.open),...o,ref:n,onClick:I(e.onClick,a.onOpenToggle)})});St.displayName=xt;var Ee="DialogPortal",[gn,Ct]=wt(Ee,{forceMount:void 0}),Nt=e=>{const{__scopeDialog:t,forceMount:r,children:o,container:a}=e,n=A(Ee,t);return d.jsx(gn,{scope:t,forceMount:r,children:s.Children.map(o,u=>d.jsx(ue,{present:r||n.open,children:d.jsx(dt,{asChild:!0,container:a,children:u})}))})};Nt.displayName=Ee;var ie="DialogOverlay",jt=s.forwardRef((e,t)=>{const r=Ct(ie,e.__scopeDialog),{forceMount:o=r.forceMount,...a}=e,n=A(ie,e.__scopeDialog);return n.modal?d.jsx(ue,{present:o||n.open,children:d.jsx(yn,{...a,ref:t})}):null});jt.displayName=ie;var _n=at("DialogOverlay.RemoveScroll"),yn=s.forwardRef((e,t)=>{const{__scopeDialog:r,...o}=e,a=A(ie,r);return d.jsx(yt,{as:_n,allowPinchZoom:!0,shards:[a.contentRef],children:d.jsx($.div,{"data-state":Se(a.open),...o,ref:t,style:{pointerEvents:"auto",...o.style}})})}),F="DialogContent",Ot=s.forwardRef((e,t)=>{const r=Ct(F,e.__scopeDialog),{forceMount:o=r.forceMount,...a}=e,n=A(F,e.__scopeDialog);return d.jsx(ue,{present:o||n.open,children:n.modal?d.jsx(bn,{...a,ref:t}):d.jsx(wn,{...a,ref:t})})});Ot.displayName=F;var bn=s.forwardRef((e,t)=>{const r=A(F,e.__scopeDialog),o=s.useRef(null),a=k(t,r.contentRef,o);return s.useEffect(()=>{const n=o.current;if(n)return hn(n)},[]),d.jsx(Pt,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:I(e.onCloseAutoFocus,n=>{var u;n.preventDefault(),(u=r.triggerRef.current)==null||u.focus()}),onPointerDownOutside:I(e.onPointerDownOutside,n=>{const u=n.detail.originalEvent,i=u.button===0&&u.ctrlKey===!0;(u.button===2||i)&&n.preventDefault()}),onFocusOutside:I(e.onFocusOutside,n=>n.preventDefault())})}),wn=s.forwardRef((e,t)=>{const r=A(F,e.__scopeDialog),o=s.useRef(!1),a=s.useRef(!1);return d.jsx(Pt,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:n=>{var u,i;(u=e.onCloseAutoFocus)==null||u.call(e,n),n.defaultPrevented||(o.current||(i=r.triggerRef.current)==null||i.focus(),n.preventDefault()),o.current=!1,a.current=!1},onInteractOutside:n=>{var p,c;(p=e.onInteractOutside)==null||p.call(e,n),n.defaultPrevented||(o.current=!0,n.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const u=n.target;((c=r.triggerRef.current)==null?void 0:c.contains(u))&&n.preventDefault(),n.detail.originalEvent.type==="focusin"&&a.current&&n.preventDefault()}})}),Pt=s.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:n,...u}=e,i=A(F,r),p=s.useRef(null),c=k(t,p);return Or(),d.jsxs(d.Fragment,{children:[d.jsx(ct,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:a,onUnmountAutoFocus:n,children:d.jsx(ut,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":Se(i.open),...u,ref:c,onDismiss:()=>i.onOpenChange(!1)})}),d.jsxs(d.Fragment,{children:[d.jsx(En,{titleId:i.titleId}),d.jsx(Sn,{contentRef:p,descriptionId:i.descriptionId})]})]})}),xe="DialogTitle",Rt=s.forwardRef((e,t)=>{const{__scopeDialog:r,...o}=e,a=A(xe,r);return d.jsx($.h2,{id:a.titleId,...o,ref:t})});Rt.displayName=xe;var At="DialogDescription",Dt=s.forwardRef((e,t)=>{const{__scopeDialog:r,...o}=e,a=A(At,r);return d.jsx($.p,{id:a.descriptionId,...o,ref:t})});Dt.displayName=At;var Tt="DialogClose",$t=s.forwardRef((e,t)=>{const{__scopeDialog:r,...o}=e,a=A(Tt,r);return d.jsx($.button,{type:"button",...o,ref:t,onClick:I(e.onClick,()=>a.onOpenChange(!1))})});$t.displayName=Tt;function Se(e){return e?"open":"closed"}var Mt="DialogTitleWarning",[Fo,It]=Gt(Mt,{contentName:F,titleName:xe,docsSlug:"dialog"}),En=({titleId:e})=>{const t=It(Mt),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
42
42
 
43
43
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
44
44
 
45
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return s.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},xn="DialogDescriptionWarning",Sn=({contentRef:e,descriptionId:t})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${It(xn).contentName}}.`;return s.useEffect(()=>{var n;const a=(n=e.current)==null?void 0:n.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(o))},[o,e,t]),null},Cn=Et,Nn=St,On=Nt,Pn=Ot,Rn=Pt,An=At,Fe=jt,Dn=$t;const jn={LG:"lg"};function Tn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ke={exports:{}};/*!
45
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return s.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},xn="DialogDescriptionWarning",Sn=({contentRef:e,descriptionId:t})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${It(xn).contentName}}.`;return s.useEffect(()=>{var n;const a=(n=e.current)==null?void 0:n.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(o))},[o,e,t]),null},Cn=Et,Nn=St,jn=Nt,On=jt,Pn=Ot,Rn=Rt,Fe=Dt,An=$t;const Dn={LG:"lg"};function Tn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ke={exports:{}};/*!
46
46
  Copyright (c) 2018 Jed Watson.
47
47
  Licensed under the MIT License (MIT), see
48
48
  http://jedwatson.github.io/classnames
@@ -50,7 +50,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
50
50
  Copyright (c) 2018 Jed Watson.
51
51
  Licensed under the MIT License (MIT), see
52
52
  http://jedwatson.github.io/classnames
53
- */var Ve;function Vn(){return Ve||(Ve=1,(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var n="",u=0;u<arguments.length;u++){var i=arguments[u];i&&(n=a(n,o.call(this,i)))}return n}function o(n){if(typeof n=="string"||typeof n=="number")return this&&this[n]||n;if(typeof n!="object")return"";if(Array.isArray(n))return r.apply(this,n);if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]"))return n.toString();var u="";for(var i in n)t.call(n,i)&&n[i]&&(u=a(u,this&&this[i]||i));return u}function a(n,u){return u?n?n+" "+u:n+u:n}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(Ue)),Ue.exports}var Hn=Vn();const qn=Un(Hn),zn={"purpur-button":"_purpur-button_1goi7_1","purpur-button--xs":"_purpur-button--xs_1goi7_33","purpur-button--icon-only":"_purpur-button--icon-only_1goi7_36","purpur-button--sm":"_purpur-button--sm_1goi7_39","purpur-button--md":"_purpur-button--md_1goi7_45","purpur-button--lg":"_purpur-button--lg_1goi7_51","purpur-button--full-width":"_purpur-button--full-width_1goi7_57","purpur-button--primary":"_purpur-button--primary_1goi7_60","purpur-button--disabled":"_purpur-button--disabled_1goi7_64","purpur-button--primary-negative":"_purpur-button--primary-negative_1goi7_70","purpur-button--secondary":"_purpur-button--secondary_1goi7_82","purpur-button--secondary-negative":"_purpur-button--secondary-negative_1goi7_93","purpur-button--expressive":"_purpur-button--expressive_1goi7_104","purpur-button--expressive-negative":"_purpur-button--expressive-negative_1goi7_114","purpur-button--negative":"_purpur-button--negative_1goi7_126","purpur-button--destructive":"_purpur-button--destructive_1goi7_133","purpur-button--destructive-negative":"_purpur-button--destructive-negative_1goi7_143","purpur-button--tertiary-purple":"_purpur-button--tertiary-purple_1goi7_153","purpur-button--tertiary-purple-negative":"_purpur-button--tertiary-purple-negative_1goi7_166","purpur-button--text-negative":"_purpur-button--text-negative_1goi7_181","purpur-button--text":"_purpur-button--text_1goi7_181"},Gn=qn.bind(zn),L="purpur-button",Lt=P.forwardRef(({children:e,className:t,disabled:r=!1,fullWidth:o=!1,iconOnly:a,loading:n=!1,negative:u=!1,onClick:i,size:p="md",variant:c,type:f="button",...v},h)=>{if(a&&c==="destructive")return null;const m=Gn([L,`${L}--${u?`${c}-negative`:c}`,`${L}--${p}`],{[`${L}--icon-only`]:a,[`${L}--negative`]:u,[`${L}--full-width`]:o,[`${L}--disabled`]:r||n},t),b=g=>{r||n?g.preventDefault():i&&i(g)},l=!!v["aria-disabled"]||r||n;return d.jsxs("button",{className:m,type:f,ref:h,"aria-disabled":l,onClick:b,...v,children:[n&&d.jsx(Bn,{size:p===jn.LG?"xs":"xxs",negative:u,disabled:l})," ",e]})});Lt.displayName="Button";function Kn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var He={exports:{}};/*!
53
+ */var Ve;function Vn(){return Ve||(Ve=1,(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var n="",u=0;u<arguments.length;u++){var i=arguments[u];i&&(n=a(n,o.call(this,i)))}return n}function o(n){if(typeof n=="string"||typeof n=="number")return this&&this[n]||n;if(typeof n!="object")return"";if(Array.isArray(n))return r.apply(this,n);if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]"))return n.toString();var u="";for(var i in n)t.call(n,i)&&n[i]&&(u=a(u,this&&this[i]||i));return u}function a(n,u){return u?n?n+" "+u:n+u:n}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(Ue)),Ue.exports}var Hn=Vn();const qn=Un(Hn),zn={"purpur-button":"_purpur-button_cjx7j_1","purpur-button--xs":"_purpur-button--xs_cjx7j_22","purpur-button--icon-only":"_purpur-button--icon-only_cjx7j_25","purpur-button--sm":"_purpur-button--sm_cjx7j_28","purpur-button--md":"_purpur-button--md_cjx7j_34","purpur-button--lg":"_purpur-button--lg_cjx7j_40","purpur-button--full-width":"_purpur-button--full-width_cjx7j_46","purpur-button--primary":"_purpur-button--primary_cjx7j_64","purpur-button--disabled":"_purpur-button--disabled_cjx7j_68","purpur-button--primary-negative":"_purpur-button--primary-negative_cjx7j_74","purpur-button--secondary":"_purpur-button--secondary_cjx7j_86","purpur-button--secondary-negative":"_purpur-button--secondary-negative_cjx7j_97","purpur-button--expressive":"_purpur-button--expressive_cjx7j_108","purpur-button--expressive-negative":"_purpur-button--expressive-negative_cjx7j_118","purpur-button--negative":"_purpur-button--negative_cjx7j_130","purpur-button--destructive":"_purpur-button--destructive_cjx7j_137","purpur-button--destructive-negative":"_purpur-button--destructive-negative_cjx7j_147","purpur-button--tertiary-purple":"_purpur-button--tertiary-purple_cjx7j_157","purpur-button--tertiary-purple-negative":"_purpur-button--tertiary-purple-negative_cjx7j_170","purpur-button--text-negative":"_purpur-button--text-negative_cjx7j_185","purpur-button--text":"_purpur-button--text_cjx7j_185"},Gn=qn.bind(zn),L="purpur-button",Lt=O.forwardRef(({children:e,className:t,disabled:r=!1,fullWidth:o=!1,iconOnly:a,loading:n=!1,negative:u=!1,onClick:i,size:p="md",variant:c,type:f="button",...v},h)=>{if(a&&c==="destructive")return null;const g=Gn([L,`${L}--${u?`${c}-negative`:c}`,`${L}--${p}`],{[`${L}--icon-only`]:a,[`${L}--negative`]:u,[`${L}--full-width`]:o,[`${L}--disabled`]:r||n},t),b=m=>{r||n?m.preventDefault():i&&i(m)},l=!!v["aria-disabled"]||r||n;return d.jsxs("button",{className:g,type:f,ref:h,"aria-disabled":l,onClick:b,...v,children:[n&&d.jsx(Bn,{size:p===Dn.LG?"xs":"xxs",negative:u,disabled:l})," ",e]})});Lt.displayName="Button";function Kn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var He={exports:{}};/*!
54
54
  Copyright (c) 2018 Jed Watson.
55
55
  Licensed under the MIT License (MIT), see
56
56
  http://jedwatson.github.io/classnames
@@ -62,9 +62,9 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
62
62
  Copyright (c) 2018 Jed Watson.
63
63
  Licensed under the MIT License (MIT), see
64
64
  http://jedwatson.github.io/classnames
65
- */var Xe;function po(){return Xe||(Xe=1,(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var n="",u=0;u<arguments.length;u++){var i=arguments[u];i&&(n=a(n,o.call(this,i)))}return n}function o(n){if(typeof n=="string"||typeof n=="number")return this&&this[n]||n;if(typeof n!="object")return"";if(Array.isArray(n))return r.apply(this,n);if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]"))return n.toString();var u="";for(var i in n)t.call(n,i)&&n[i]&&(u=a(u,this&&this[i]||i));return u}function a(n,u){return u?n?n+" "+u:n+u:n}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(Ye)),Ye.exports}var fo=po();const vo=lo(fo),ho={"purpur-paragraph":"_purpur-paragraph_1rh57_1","purpur-paragraph--disabled":"_purpur-paragraph--disabled_1rh57_7","purpur-paragraph--hyphens":"_purpur-paragraph--hyphens_1rh57_10","purpur-paragraph--negative":"_purpur-paragraph--negative_1rh57_13","purpur-paragraph--paragraph-100":"_purpur-paragraph--paragraph-100_1rh57_16","purpur-paragraph--paragraph-100-medium":"_purpur-paragraph--paragraph-100-medium_1rh57_22","purpur-paragraph--paragraph-100-bold":"_purpur-paragraph--paragraph-100-bold_1rh57_29","purpur-paragraph--paragraph-200":"_purpur-paragraph--paragraph-200_1rh57_36","purpur-paragraph--preamble-100":"_purpur-paragraph--preamble-100_1rh57_42","purpur-paragraph--preamble-200":"_purpur-paragraph--preamble-200_1rh57_48","purpur-paragraph--additional-100":"_purpur-paragraph--additional-100_1rh57_54","purpur-paragraph--additional-100-medium":"_purpur-paragraph--additional-100-medium_1rh57_60","purpur-paragraph--overline-100":"_purpur-paragraph--overline-100_1rh57_67","purpur-paragraph--overline-200":"_purpur-paragraph--overline-200_1rh57_75"},go=vo.bind(ho),mo={PARAGRAPH100:"paragraph-100"},G="purpur-paragraph",Bt=({children:e,className:t,disabled:r,enableHyphenation:o=!1,negative:a=!1,variant:n=mo.PARAGRAPH100,...u})=>{const i=go(t,G,`${G}--${n}`,{[`${G}--hyphens`]:o,[`${G}--disabled`]:r,[`${G}--negative`]:a});return d.jsx("p",{...u,className:i,children:e})};Bt.displayName="Paragraph";function Ze(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function _o(...e){return t=>{let r=!1;const o=e.map(a=>{const n=Ze(a,t);return!r&&typeof n=="function"&&(r=!0),n});if(r)return()=>{for(let a=0;a<o.length;a++){const n=o[a];typeof n=="function"?n():Ze(e[a],null)}}}}function yo(e){const t=bo(e),r=s.forwardRef((o,a)=>{const{children:n,...u}=o,i=s.Children.toArray(n),p=i.find(Eo);if(p){const c=p.props.children,f=i.map(v=>v===p?s.Children.count(c)>1?s.Children.only(null):s.isValidElement(c)?c.props.children:null:v);return d.jsx(t,{...u,ref:a,children:s.isValidElement(c)?s.cloneElement(c,void 0,f):null})}return d.jsx(t,{...u,ref:a,children:n})});return r.displayName=`${e}.Slot`,r}function bo(e){const t=s.forwardRef((r,o)=>{const{children:a,...n}=r;if(s.isValidElement(a)){const u=So(a),i=xo(n,a.props);return a.type!==s.Fragment&&(i.ref=o?_o(o,u):u),s.cloneElement(a,i)}return s.Children.count(a)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var wo=Symbol("radix.slottable");function Eo(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===wo}function xo(e,t){const r={...t};for(const o in t){const a=e[o],n=t[o];/^on[A-Z]/.test(o)?a&&n?r[o]=(...u)=>{n(...u),a(...u)}:a&&(r[o]=a):o==="style"?r[o]={...a,...n}:o==="className"&&(r[o]=[a,n].filter(Boolean).join(" "))}return{...e,...r}}function So(e){var t,r;let o=(t=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:t.get,a=o&&"isReactWarning"in o&&o.isReactWarning;return a?e.ref:(o=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,a=o&&"isReactWarning"in o&&o.isReactWarning,a?e.props.ref:e.props.ref||e.ref)}var Co=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],No=Co.reduce((e,t)=>{const r=yo(`Primitive.${t}`),o=s.forwardRef((a,n)=>{const{asChild:u,...i}=a,p=u?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(p,{...i,ref:n})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),Oo="VisuallyHidden",Ut=s.forwardRef((e,t)=>d.jsx(No.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));Ut.displayName=Oo;var Po=Ut;const Ro=({asChild:e,children:t,...r})=>d.jsx(Po,{asChild:e,...r,children:t});function Ao(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ye={exports:{}};/*!
65
+ */var Xe;function po(){return Xe||(Xe=1,(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var n="",u=0;u<arguments.length;u++){var i=arguments[u];i&&(n=a(n,o.call(this,i)))}return n}function o(n){if(typeof n=="string"||typeof n=="number")return this&&this[n]||n;if(typeof n!="object")return"";if(Array.isArray(n))return r.apply(this,n);if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]"))return n.toString();var u="";for(var i in n)t.call(n,i)&&n[i]&&(u=a(u,this&&this[i]||i));return u}function a(n,u){return u?n?n+" "+u:n+u:n}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(Ye)),Ye.exports}var fo=po();const vo=lo(fo),ho={"purpur-paragraph":"_purpur-paragraph_1rh57_1","purpur-paragraph--disabled":"_purpur-paragraph--disabled_1rh57_7","purpur-paragraph--hyphens":"_purpur-paragraph--hyphens_1rh57_10","purpur-paragraph--negative":"_purpur-paragraph--negative_1rh57_13","purpur-paragraph--paragraph-100":"_purpur-paragraph--paragraph-100_1rh57_16","purpur-paragraph--paragraph-100-medium":"_purpur-paragraph--paragraph-100-medium_1rh57_22","purpur-paragraph--paragraph-100-bold":"_purpur-paragraph--paragraph-100-bold_1rh57_29","purpur-paragraph--paragraph-200":"_purpur-paragraph--paragraph-200_1rh57_36","purpur-paragraph--preamble-100":"_purpur-paragraph--preamble-100_1rh57_42","purpur-paragraph--preamble-200":"_purpur-paragraph--preamble-200_1rh57_48","purpur-paragraph--additional-100":"_purpur-paragraph--additional-100_1rh57_54","purpur-paragraph--additional-100-medium":"_purpur-paragraph--additional-100-medium_1rh57_60","purpur-paragraph--overline-100":"_purpur-paragraph--overline-100_1rh57_67","purpur-paragraph--overline-200":"_purpur-paragraph--overline-200_1rh57_75"},mo=vo.bind(ho),go={PARAGRAPH100:"paragraph-100"},G="purpur-paragraph",Bt=({children:e,className:t,disabled:r,enableHyphenation:o=!1,negative:a=!1,variant:n=go.PARAGRAPH100,...u})=>{const i=mo(t,G,`${G}--${n}`,{[`${G}--hyphens`]:o,[`${G}--disabled`]:r,[`${G}--negative`]:a});return d.jsx("p",{...u,className:i,children:e})};Bt.displayName="Paragraph";function Ze(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function _o(...e){return t=>{let r=!1;const o=e.map(a=>{const n=Ze(a,t);return!r&&typeof n=="function"&&(r=!0),n});if(r)return()=>{for(let a=0;a<o.length;a++){const n=o[a];typeof n=="function"?n():Ze(e[a],null)}}}}function yo(e){const t=bo(e),r=s.forwardRef((o,a)=>{const{children:n,...u}=o,i=s.Children.toArray(n),p=i.find(Eo);if(p){const c=p.props.children,f=i.map(v=>v===p?s.Children.count(c)>1?s.Children.only(null):s.isValidElement(c)?c.props.children:null:v);return d.jsx(t,{...u,ref:a,children:s.isValidElement(c)?s.cloneElement(c,void 0,f):null})}return d.jsx(t,{...u,ref:a,children:n})});return r.displayName=`${e}.Slot`,r}function bo(e){const t=s.forwardRef((r,o)=>{const{children:a,...n}=r;if(s.isValidElement(a)){const u=So(a),i=xo(n,a.props);return a.type!==s.Fragment&&(i.ref=o?_o(o,u):u),s.cloneElement(a,i)}return s.Children.count(a)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var wo=Symbol("radix.slottable");function Eo(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===wo}function xo(e,t){const r={...t};for(const o in t){const a=e[o],n=t[o];/^on[A-Z]/.test(o)?a&&n?r[o]=(...u)=>{n(...u),a(...u)}:a&&(r[o]=a):o==="style"?r[o]={...a,...n}:o==="className"&&(r[o]=[a,n].filter(Boolean).join(" "))}return{...e,...r}}function So(e){var t,r;let o=(t=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:t.get,a=o&&"isReactWarning"in o&&o.isReactWarning;return a?e.ref:(o=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,a=o&&"isReactWarning"in o&&o.isReactWarning,a?e.props.ref:e.props.ref||e.ref)}var Co=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],No=Co.reduce((e,t)=>{const r=yo(`Primitive.${t}`),o=s.forwardRef((a,n)=>{const{asChild:u,...i}=a,p=u?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(p,{...i,ref:n})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),jo="VisuallyHidden",Ut=s.forwardRef((e,t)=>d.jsx(No.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));Ut.displayName=jo;var Oo=Ut;const Po=({asChild:e,children:t,...r})=>d.jsx(Oo,{asChild:e,...r,children:t});function Ro(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ye={exports:{}};/*!
66
66
  Copyright (c) 2018 Jed Watson.
67
67
  Licensed under the MIT License (MIT), see
68
68
  http://jedwatson.github.io/classnames
69
- */var Qe;function Do(){return Qe||(Qe=1,(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var n="",u=0;u<arguments.length;u++){var i=arguments[u];i&&(n=a(n,o.call(this,i)))}return n}function o(n){if(typeof n=="string"||typeof n=="number")return this&&this[n]||n;if(typeof n!="object")return"";if(Array.isArray(n))return r.apply(this,n);if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]"))return n.toString();var u="";for(var i in n)t.call(n,i)&&n[i]&&(u=a(u,this&&this[i]||i));return u}function a(n,u){return u?n?n+" "+u:n+u:n}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(ye)),ye.exports}var jo=Do();const To=Ao(jo),$o="_fadeIn_4aird_1",Mo={"purpur-modal-content":"_purpur-modal-content_4aird_1",fadeIn:$o,"purpur-modal-content__overlay":"_purpur-modal-content__overlay_4aird_30","purpur-modal-content__close-button":"_purpur-modal-content__close-button_4aird_37","purpur-modal-content__wrapper":"_purpur-modal-content__wrapper_4aird_47","purpur-modal-content__wrapper-inner":"_purpur-modal-content__wrapper-inner_4aird_57","purpur-modal-content__image-wrapper":"_purpur-modal-content__image-wrapper_4aird_61","purpur-modal-content__header":"_purpur-modal-content__header_4aird_84","purpur-modal-content__title":"_purpur-modal-content__title_4aird_97","purpur-modal-content__description":"_purpur-modal-content__description_4aird_100","purpur-modal-content__body":"_purpur-modal-content__body_4aird_103","purpur-modal-content__body-inner":"_purpur-modal-content__body-inner_4aird_111","purpur-modal-content__actions-buttons":"_purpur-modal-content__actions-buttons_4aird_123","purpur-modal-content__notification":"_purpur-modal-content__notification_4aird_141","purpur-modal-content--with-image":"_purpur-modal-content--with-image_4aird_144","purpur-modal-content--overflow":"_purpur-modal-content--overflow_4aird_144","purpur-modal-content__actions":"_purpur-modal-content__actions_4aird_123","purpur-modal-content__actions-separator":"_purpur-modal-content__actions-separator_4aird_175","purpur-modal-content--sticky-footer":"_purpur-modal-content--sticky-footer_4aird_185"},Je=e=>e.showCloseButton===!0,O=To.bind(Mo),C="purpur-modal-content",Io=P.forwardRef(({["data-testid"]:e,actions:t,children:r,className:o,description:a,disableCloseOnClickOutside:n,hideDescription:u,image:i,stickyButtons:p=!0,title:c,notification:f=void 0,zIndex:v,onCloseAutoFocus:h,...m},b)=>{const{closeButtonAriaLabel:l,showCloseButton:g,..._}=m,[w,E]=P.useState(!1),[x,S]=P.useState(0),N=P.useRef(null),y=P.useRef(null),A=O(C,{[`${C}--with-image`]:!!i},{[`${C}--overflow`]:w},{[`${C}--sticky-footer`]:p},o),R=j=>e?`${e} ${j}`:void 0,q=j=>{n&&j.preventDefault()},W=P.useCallback(()=>{if(!N.current||!y.current)return;const j=window.getComputedStyle(N.current,null),X=parseFloat(j.getPropertyValue("height")),qt=y.current.offsetHeight;E(X<qt),S((N.current.offsetWidth??0)-(N.current.clientWidth??0))},[]),Vt=()=>{const j=y.current;if(j){const X=j.querySelector("h2");X&&setTimeout(()=>{X.focus()})}},Ht=j=>{n&&!g&&j.preventDefault()};return P.useEffect(()=>(window.addEventListener("resize",W),()=>{window.removeEventListener("resize",W)}),[W]),P.useEffect(()=>{W()},[f,r,W]),d.jsxs(On,{children:[d.jsx(Pn,{className:O(`${C}__overlay`),style:{zIndex:v}}),d.jsxs(Rn,{..._,className:A,"data-testid":e,ref:b,...!a&&{"aria-describedby":void 0},onPointerDownOutside:q,onOpenAutoFocus:()=>{W(),Vt()},onEscapeKeyDown:Ht,onCloseAutoFocus:h,style:{zIndex:`calc(${v} + 1)`},children:[d.jsxs("div",{ref:N,className:O(`${C}__wrapper`),children:[Je(m)&&l&&i&&d.jsx(et,{"aria-label":l,hasImage:!0,scrollbarWidth:x,"data-testid":R("close-button")}),d.jsxs("div",{ref:y,className:O(`${C}__wrapper-inner`),children:[d.jsxs("div",{className:O(`${C}__header`),children:[Je(m)&&l&&!i&&d.jsx(et,{"aria-label":l,"data-testid":R("close-button")}),d.jsx(An,{asChild:!0,className:O(`${C}__title`),"data-testid":R("title"),children:d.jsx(Ft,{tag:"h2",variant:"title-200",tabIndex:-1,children:c})})]}),i&&d.jsx("div",{className:O(`${C}__image-wrapper`),"data-testid":R("image"),children:i}),d.jsx("div",{className:O(`${C}__body`),children:d.jsxs("div",{className:O(`${C}__body-inner`),children:[a&&u&&d.jsx(Ro,{asChild:!0,children:d.jsx(Fe,{"data-testid":R("description"),children:a})}),a&&!u&&d.jsx(Fe,{asChild:!0,className:O(`${C}__description`),"data-testid":R("description"),children:d.jsx(Bt,{variant:"paragraph-100",children:a})}),d.jsx("div",{children:r}),!p&&d.jsx(tt,{actions:t,notification:f})]})})]})]}),p&&d.jsx(tt,{actions:t,notification:f})]})]})}),et=({["aria-label"]:e,hasImage:t,scrollbarWidth:r,["data-testid"]:o})=>d.jsx(Dn,{asChild:!0,children:d.jsx(Lt,{variant:t?"primary":"tertiary-purple",negative:t,size:"sm",iconOnly:!0,"aria-label":e,className:O(`${C}__close-button`),style:{right:`calc(var(--purpur-spacing-100) + ${r||0}px)`},"data-testid":o,children:d.jsx(Wt,{})})}),tt=({actions:e,notification:t})=>{const r=P.useRef(null);return P.useEffect(()=>{var o,a;t&&((a=(o=r==null?void 0:r.current)==null?void 0:o.scrollIntoView)==null||a.call(o,!1))},[t]),e?d.jsxs("div",{className:O(`${C}__actions`),children:[d.jsx("div",{className:O(`${C}__actions-buttons`),"data-testid":"modal actions",children:e}),t&&d.jsx("div",{className:O(`${C}__notification`),ref:r,children:t}),d.jsx("span",{className:O(`${C}__actions-separator`)})]}):null},Lo=P.forwardRef(({children:e,...t},r)=>d.jsx(Nn,{asChild:!0,ref:r,...t,children:e})),le=({["data-testid"]:e,children:t,open:r,onOpenChange:o})=>d.jsx(Cn,{open:r,onOpenChange:o,"data-testid":e,children:t});le.Trigger=Lo;le.Content=Io;le.displayName="Modal";exports.Modal=le;
69
+ */var Qe;function Ao(){return Qe||(Qe=1,(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var n="",u=0;u<arguments.length;u++){var i=arguments[u];i&&(n=a(n,o.call(this,i)))}return n}function o(n){if(typeof n=="string"||typeof n=="number")return this&&this[n]||n;if(typeof n!="object")return"";if(Array.isArray(n))return r.apply(this,n);if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]"))return n.toString();var u="";for(var i in n)t.call(n,i)&&n[i]&&(u=a(u,this&&this[i]||i));return u}function a(n,u){return u?n?n+" "+u:n+u:n}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(ye)),ye.exports}var Do=Ao();const To=Ro(Do),$o="_fadeIn_4aird_1",Mo={"purpur-modal-content":"_purpur-modal-content_4aird_1",fadeIn:$o,"purpur-modal-content__overlay":"_purpur-modal-content__overlay_4aird_30","purpur-modal-content__close-button":"_purpur-modal-content__close-button_4aird_37","purpur-modal-content__wrapper":"_purpur-modal-content__wrapper_4aird_47","purpur-modal-content__wrapper-inner":"_purpur-modal-content__wrapper-inner_4aird_57","purpur-modal-content__image-wrapper":"_purpur-modal-content__image-wrapper_4aird_61","purpur-modal-content__header":"_purpur-modal-content__header_4aird_84","purpur-modal-content__title":"_purpur-modal-content__title_4aird_97","purpur-modal-content__description":"_purpur-modal-content__description_4aird_100","purpur-modal-content__body":"_purpur-modal-content__body_4aird_103","purpur-modal-content__body-inner":"_purpur-modal-content__body-inner_4aird_111","purpur-modal-content__actions-buttons":"_purpur-modal-content__actions-buttons_4aird_123","purpur-modal-content__notification":"_purpur-modal-content__notification_4aird_141","purpur-modal-content--with-image":"_purpur-modal-content--with-image_4aird_144","purpur-modal-content--overflow":"_purpur-modal-content--overflow_4aird_144","purpur-modal-content__actions":"_purpur-modal-content__actions_4aird_123","purpur-modal-content__actions-separator":"_purpur-modal-content__actions-separator_4aird_175","purpur-modal-content--sticky-footer":"_purpur-modal-content--sticky-footer_4aird_185"},Je=e=>e.showCloseButton===!0,j=To.bind(Mo),C="purpur-modal-content",Io=O.forwardRef(({["data-testid"]:e,actions:t,children:r,className:o,description:a,disableCloseOnClickOutside:n,hideDescription:u,image:i,stickyButtons:p=!0,title:c,notification:f=void 0,zIndex:v,onCloseAutoFocus:h,...g},b)=>{const{closeButtonAriaLabel:l,showCloseButton:m,..._}=g,[w,E]=O.useState(!1),[x,S]=O.useState(0),N=O.useRef(null),y=O.useRef(null),R=j(C,{[`${C}--with-image`]:!!i},{[`${C}--overflow`]:w},{[`${C}--sticky-footer`]:p},o),P=D=>e?`${e} ${D}`:void 0,q=D=>{n&&D.preventDefault()},W=O.useCallback(()=>{if(!N.current||!y.current)return;const D=window.getComputedStyle(N.current,null),X=parseFloat(D.getPropertyValue("height")),qt=y.current.offsetHeight;E(X<qt),S((N.current.offsetWidth??0)-(N.current.clientWidth??0))},[]),Vt=()=>{const D=y.current;if(D){const X=D.querySelector("h2");X&&setTimeout(()=>{X.focus()})}},Ht=D=>{n&&!m&&D.preventDefault()};return O.useEffect(()=>(window.addEventListener("resize",W),()=>{window.removeEventListener("resize",W)}),[W]),O.useEffect(()=>{W()},[f,r,W]),d.jsxs(jn,{children:[d.jsx(On,{className:j(`${C}__overlay`),style:{zIndex:v}}),d.jsxs(Pn,{..._,className:R,"data-testid":e,ref:b,...!a&&{"aria-describedby":void 0},onPointerDownOutside:q,onOpenAutoFocus:()=>{W(),Vt()},onEscapeKeyDown:Ht,onCloseAutoFocus:h,style:{zIndex:`calc(${v} + 1)`},children:[d.jsxs("div",{ref:N,className:j(`${C}__wrapper`),children:[Je(g)&&l&&i&&d.jsx(et,{"aria-label":l,hasImage:!0,scrollbarWidth:x,"data-testid":P("close-button")}),d.jsxs("div",{ref:y,className:j(`${C}__wrapper-inner`),children:[d.jsxs("div",{className:j(`${C}__header`),children:[Je(g)&&l&&!i&&d.jsx(et,{"aria-label":l,"data-testid":P("close-button")}),d.jsx(Rn,{asChild:!0,className:j(`${C}__title`),"data-testid":P("title"),children:d.jsx(Ft,{tag:"h2",variant:"title-200",tabIndex:-1,children:c})})]}),i&&d.jsx("div",{className:j(`${C}__image-wrapper`),"data-testid":P("image"),children:i}),d.jsx("div",{className:j(`${C}__body`),children:d.jsxs("div",{className:j(`${C}__body-inner`),children:[a&&u&&d.jsx(Po,{asChild:!0,children:d.jsx(Fe,{"data-testid":P("description"),children:a})}),a&&!u&&d.jsx(Fe,{asChild:!0,className:j(`${C}__description`),"data-testid":P("description"),children:d.jsx(Bt,{variant:"paragraph-100",children:a})}),d.jsx("div",{children:r}),!p&&d.jsx(tt,{actions:t,notification:f})]})})]})]}),p&&d.jsx(tt,{actions:t,notification:f})]})]})}),et=({["aria-label"]:e,hasImage:t,scrollbarWidth:r,["data-testid"]:o})=>d.jsx(An,{asChild:!0,children:d.jsx(Lt,{variant:t?"primary":"tertiary-purple",negative:t,size:"sm",iconOnly:!0,"aria-label":e,className:j(`${C}__close-button`),style:{right:`calc(var(--purpur-spacing-100) + ${r||0}px)`},"data-testid":o,children:d.jsx(Wt,{})})}),tt=({actions:e,notification:t})=>{const r=O.useRef(null);return O.useEffect(()=>{var o,a;t&&((a=(o=r==null?void 0:r.current)==null?void 0:o.scrollIntoView)==null||a.call(o,!1))},[t]),e?d.jsxs("div",{className:j(`${C}__actions`),children:[d.jsx("div",{className:j(`${C}__actions-buttons`),"data-testid":"modal actions",children:e}),t&&d.jsx("div",{className:j(`${C}__notification`),ref:r,children:t}),d.jsx("span",{className:j(`${C}__actions-separator`)})]}):null},Lo=O.forwardRef(({children:e,...t},r)=>d.jsx(Nn,{asChild:!0,ref:r,...t,children:e})),le=({["data-testid"]:e,children:t,open:r,onOpenChange:o})=>d.jsx(Cn,{open:r,onOpenChange:o,"data-testid":e,children:t});le.Trigger=Lo;le.Content=Io;le.displayName="Modal";exports.Modal=le;
70
70
  //# sourceMappingURL=modal.cjs.js.map