@purpurds/modal 7.0.0 → 7.2.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
@@ -387,35 +387,35 @@ Homepage: https://radix-ui.com/primitives
387
387
  ---
388
388
 
389
389
  Name: @purpurds/button
390
- Version: 6.12.5
390
+ Version: 7.1.0
391
391
  License: AGPL-3.0-only
392
392
  Private: false
393
393
 
394
394
  ---
395
395
 
396
396
  Name: @purpurds/heading
397
- Version: 6.12.5
397
+ Version: 7.1.0
398
398
  License: AGPL-3.0-only
399
399
  Private: false
400
400
 
401
401
  ---
402
402
 
403
403
  Name: @purpurds/icon
404
- Version: 6.12.5
404
+ Version: 7.1.0
405
405
  License: AGPL-3.0-only
406
406
  Private: false
407
407
 
408
408
  ---
409
409
 
410
410
  Name: @purpurds/paragraph
411
- Version: 6.12.5
411
+ Version: 7.1.0
412
412
  License: AGPL-3.0-only
413
413
  Private: false
414
414
 
415
415
  ---
416
416
 
417
417
  Name: @purpurds/visually-hidden
418
- Version: 6.12.5
418
+ Version: 7.1.0
419
419
  License: AGPL-3.0-only
420
420
  Private: false
421
421
 
package/dist/modal.cjs.js CHANGED
@@ -1,9 +1,9 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),O=require("react"),it=require("react-dom");function ut(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=ut(O),Xt=ut(it);function $(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 Re(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function st(...e){return t=>{let r=!1;const o=e.map(a=>{const n=Re(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():Re(e[a],null)}}}}function W(...e){return s.useCallback(st(...e),e)}function Zt(e,t){const r=s.createContext(t),o=n=>{const{children:i,...u}=n,p=s.useMemo(()=>u,Object.values(u));return c.jsx(r.Provider,{value:p,children:i})};o.displayName=e+"Provider";function a(n){const i=s.useContext(r);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${n}\` must be used within \`${e}\``)}return[o,a]}function Qt(e,t=[]){let r=[];function o(n,i){const u=s.createContext(i),p=r.length;r=[...r,i];const d=v=>{var _;const{scope:h,children:g,...b}=v,l=((_=h==null?void 0:h[e])==null?void 0:_[p])||u,m=s.useMemo(()=>b,Object.values(b));return c.jsx(l.Provider,{value:m,children:g})};d.displayName=n+"Provider";function f(v,h){var l;const g=((l=h==null?void 0:h[e])==null?void 0:l[p])||u,b=s.useContext(g);if(b)return b;if(i!==void 0)return i;throw new Error(`\`${v}\` must be used within \`${n}\``)}return[d,f]}const a=()=>{const n=r.map(i=>s.createContext(i));return function(u){const p=(u==null?void 0:u[e])||n;return s.useMemo(()=>({[`__scope${e}`]:{...u,[e]:p}}),[u,p])}};return a.scopeName=e,[o,Jt(a,...t)]}function Jt(...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 i=o.reduce((u,{useScope:p,scopeName:d})=>{const v=p(n)[`__scope${d}`];return{...u,...v}},{});return s.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}var ie=globalThis!=null&&globalThis.document?s.useLayoutEffect:()=>{},er=s.useId||(()=>{}),tr=0;function de(e){const[t,r]=s.useState(er());return ie(()=>{r(o=>o??String(tr++))},[e]),e||(t?`radix-${t}`:"")}function k(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 rr({prop:e,defaultProp:t,onChange:r=()=>{}}){const[o,a]=nr({defaultProp:t,onChange:r}),n=e!==void 0,i=n?e:o,u=k(r),p=s.useCallback(d=>{if(n){const v=typeof d=="function"?d(e):d;v!==e&&u(v)}else a(d)},[n,e,a,u]);return[i,p]}function nr({defaultProp:e,onChange:t}){const r=s.useState(e),[o]=r,a=s.useRef(o),n=k(t);return s.useEffect(()=>{a.current!==o&&(n(o),a.current=o)},[o,a,n]),r}var Se=s.forwardRef((e,t)=>{const{children:r,...o}=e,a=s.Children.toArray(r),n=a.find(ar);if(n){const i=n.props.children,u=a.map(p=>p===n?s.Children.count(i)>1?s.Children.only(null):s.isValidElement(i)?i.props.children:null:p);return c.jsx(be,{...o,ref:t,children:s.isValidElement(i)?s.cloneElement(i,void 0,u):null})}return c.jsx(be,{...o,ref:t,children:r})});Se.displayName="Slot";var be=s.forwardRef((e,t)=>{const{children:r,...o}=e;if(s.isValidElement(r)){const a=ur(r),n=ir(o,r.props);return r.type!==s.Fragment&&(n.ref=t?st(t,a):a),s.cloneElement(r,n)}return s.Children.count(r)>1?s.Children.only(null):null});be.displayName="SlotClone";var or=({children:e})=>c.jsx(c.Fragment,{children:e});function ar(e){return s.isValidElement(e)&&e.type===or}function ir(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 ur(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 sr=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],T=sr.reduce((e,t)=>{const r=s.forwardRef((o,a)=>{const{asChild:n,...i}=o,u=n?Se:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(u,{...i,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function cr(e,t){e&&Xt.flushSync(()=>e.dispatchEvent(t))}function lr(e,t=globalThis==null?void 0:globalThis.document){const r=k(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 dr="DismissableLayer",we="dismissableLayer.update",pr="dismissableLayer.pointerDownOutside",fr="dismissableLayer.focusOutside",je,ct=s.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),lt=s.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:n,onInteractOutside:i,onDismiss:u,...p}=e,d=s.useContext(ct),[f,v]=s.useState(null),h=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=s.useState({}),b=W(t,y=>v(y)),l=Array.from(d.layers),[m]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),_=l.indexOf(m),S=f?l.indexOf(f):-1,w=d.layersWithOutsidePointerEventsDisabled.size>0,E=S>=_,x=mr(y=>{const j=y.target,R=[...d.branches].some(H=>H.contains(j));!E||R||(a==null||a(y),i==null||i(y),y.defaultPrevented||u==null||u())},h),N=gr(y=>{const j=y.target;[...d.branches].some(H=>H.contains(j))||(n==null||n(y),i==null||i(y),y.defaultPrevented||u==null||u())},h);return lr(y=>{S===d.layers.size-1&&(o==null||o(y),!y.defaultPrevented&&u&&(y.preventDefault(),u()))},h),s.useEffect(()=>{if(f)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(je=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),Ae(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=je)}},[f,h,r,d]),s.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),Ae())},[f,d]),s.useEffect(()=>{const y=()=>g({});return document.addEventListener(we,y),()=>document.removeEventListener(we,y)},[]),c.jsx(T.div,{...p,ref:b,style:{pointerEvents:w?E?"auto":"none":void 0,...e.style},onFocusCapture:$(e.onFocusCapture,N.onFocusCapture),onBlurCapture:$(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:$(e.onPointerDownCapture,x.onPointerDownCapture)})});lt.displayName=dr;var vr="DismissableLayerBranch",hr=s.forwardRef((e,t)=>{const r=s.useContext(ct),o=s.useRef(null),a=W(t,o);return s.useEffect(()=>{const n=o.current;if(n)return r.branches.add(n),()=>{r.branches.delete(n)}},[r.branches]),c.jsx(T.div,{...e,ref:a})});hr.displayName=vr;function mr(e,t=globalThis==null?void 0:globalThis.document){const r=k(e),o=s.useRef(!1),a=s.useRef(()=>{});return s.useEffect(()=>{const n=u=>{if(u.target&&!o.current){let p=function(){dt(pr,r,d,{discrete:!0})};const d={originalEvent:u};u.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},i=window.setTimeout(()=>{t.addEventListener("pointerdown",n)},0);return()=>{window.clearTimeout(i),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=k(e),o=s.useRef(!1);return s.useEffect(()=>{const a=n=>{n.target&&!o.current&&dt(fr,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 Ae(){const e=new CustomEvent(we);document.dispatchEvent(e)}function dt(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?cr(a,n):a.dispatchEvent(n)}var pe="focusScope.autoFocusOnMount",fe="focusScope.autoFocusOnUnmount",De={bubbles:!1,cancelable:!0},_r="FocusScope",pt=s.forwardRef((e,t)=>{const{loop:r=!1,trapped:o=!1,onMountAutoFocus:a,onUnmountAutoFocus:n,...i}=e,[u,p]=s.useState(null),d=k(a),f=k(n),v=s.useRef(null),h=W(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(w){if(g.paused||!u)return;const E=w.target;u.contains(E)?v.current=E:M(v.current,{select:!0})},m=function(w){if(g.paused||!u)return;const E=w.relatedTarget;E!==null&&(u.contains(E)||M(v.current,{select:!0}))},_=function(w){if(document.activeElement===document.body)for(const x of w)x.removedNodes.length>0&&M(u)};document.addEventListener("focusin",l),document.addEventListener("focusout",m);const S=new MutationObserver(_);return u&&S.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",l),document.removeEventListener("focusout",m),S.disconnect()}}},[o,u,g.paused]),s.useEffect(()=>{if(u){Me.add(g);const l=document.activeElement;if(!u.contains(l)){const _=new CustomEvent(pe,De);u.addEventListener(pe,d),u.dispatchEvent(_),_.defaultPrevented||(yr(Sr(ft(u)),{select:!0}),document.activeElement===l&&M(u))}return()=>{u.removeEventListener(pe,d),setTimeout(()=>{const _=new CustomEvent(fe,De);u.addEventListener(fe,f),u.dispatchEvent(_),_.defaultPrevented||M(l??document.body,{select:!0}),u.removeEventListener(fe,f),Me.remove(g)},0)}}},[u,d,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 S=l.currentTarget,[w,E]=br(S);w&&E?!l.shiftKey&&_===E?(l.preventDefault(),r&&M(w,{select:!0})):l.shiftKey&&_===w&&(l.preventDefault(),r&&M(E,{select:!0})):_===S&&l.preventDefault()}},[r,o,g.paused]);return c.jsx(T.div,{tabIndex:-1,...i,ref:h,onKeyDown:b})});pt.displayName=_r;function yr(e,{select:t=!1}={}){const r=document.activeElement;for(const o of e)if(M(o,{select:t}),document.activeElement!==r)return}function br(e){const t=ft(e),r=Te(t,e),o=Te(t.reverse(),e);return[r,o]}function ft(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 Te(e,t){for(const r of e)if(!wr(r,{upTo:t}))return r}function wr(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 Er(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&&Er(e)&&t&&e.select()}}var Me=xr();function xr(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=$e(e,t),e.unshift(t)},remove(t){var r;e=$e(e,t),(r=e[0])==null||r.resume()}}}function $e(e,t){const r=[...e],o=r.indexOf(t);return o!==-1&&r.splice(o,1),r}function Sr(e){return e.filter(t=>t.tagName!=="A")}var Cr="Portal",vt=s.forwardRef((e,t)=>{var u;const{container:r,...o}=e,[a,n]=s.useState(!1);ie(()=>n(!0),[]);const i=r||a&&((u=globalThis==null?void 0:globalThis.document)==null?void 0:u.body);return i?it.createPortal(c.jsx(T.div,{...o,ref:t}),i):null});vt.displayName=Cr;function Nr(e,t){return s.useReducer((r,o)=>t[r][o]??r,e)}var se=e=>{const{present:t,children:r}=e,o=Pr(t),a=typeof r=="function"?r({present:o.isPresent}):s.Children.only(r),n=W(o.ref,Or(a));return typeof r=="function"||o.isPresent?s.cloneElement(a,{ref:n}):null};se.displayName="Presence";function Pr(e){const[t,r]=s.useState(),o=s.useRef({}),a=s.useRef(e),n=s.useRef("none"),i=e?"mounted":"unmounted",[u,p]=Nr(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return s.useEffect(()=>{const d=Z(o.current);n.current=u==="mounted"?d:"none"},[u]),ie(()=>{const d=o.current,f=a.current;if(f!==e){const h=n.current,g=Z(d);e?p("MOUNT"):g==="none"||(d==null?void 0:d.display)==="none"?p("UNMOUNT"):p(f&&h!==g?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,p]),ie(()=>{if(t){let d;const f=t.ownerDocument.defaultView??window,v=g=>{const l=Z(o.current).includes(g.animationName);if(g.target===t&&l&&(p("ANIMATION_END"),!a.current)){const m=t.style.animationFillMode;t.style.animationFillMode="forwards",d=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(d),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",v),t.removeEventListener("animationend",v)}}else p("ANIMATION_END")},[t,p]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:s.useCallback(d=>{d&&(o.current=getComputedStyle(d)),r(d)},[])}}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 Rr(){s.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Ie()),document.body.insertAdjacentElement("beforeend",e[1]??Ie()),ve++,()=>{ve===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),ve--}},[])}function Ie(){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 D=function(){return D=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},D.apply(this,arguments)};function ht(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 jr(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 Tr(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 Mr=typeof window<"u"?s.useLayoutEffect:s.useEffect,Le=new WeakMap;function $r(e,t){var r=Tr(null,function(o){return e.forEach(function(a){return he(a,o)})});return Mr(function(){var o=Le.get(r);if(o){var a=new Set(o),n=new Set(e),i=r.current;a.forEach(function(u){n.has(u)||he(u,null)}),n.forEach(function(u){a.has(u)||he(u,i)})}Le.set(r,e)},[e]),r}function Ir(e){return e}function Lr(e,t){t===void 0&&(t=Ir);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 i=t(n,o);return r.push(i),function(){r=r.filter(function(u){return u!==i})}},assignSyncMedium:function(n){for(o=!0;r.length;){var i=r;r=[],i.forEach(n)}r={push:function(u){return n(u)},filter:function(){return r}}},assignMedium:function(n){o=!0;var i=[];if(r.length){var u=r;r=[],u.forEach(n),i=r}var p=function(){var f=i;i=[],f.forEach(n)},d=function(){return Promise.resolve().then(p)};d(),r={push:function(f){i.push(f),d()},filter:function(f){return i=i.filter(f),r}}}};return a}function kr(e){e===void 0&&(e={});var t=Lr(null);return t.options=D({async:!0,ssr:!1},e),t}var mt=function(e){var t=e.sideCar,r=ht(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,D({},r))};mt.isSideCarExport=!0;function Fr(e,t){return e.useMedium(t),mt}var gt=kr(),me=function(){},ce=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],i=e.forwardProps,u=e.children,p=e.className,d=e.removeScrollBar,f=e.enabled,v=e.shards,h=e.sideCar,g=e.noIsolation,b=e.inert,l=e.allowPinchZoom,m=e.as,_=m===void 0?"div":m,S=e.gapMode,w=ht(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=h,x=$r([r,t]),N=D(D({},w),a);return s.createElement(s.Fragment,null,f&&s.createElement(E,{sideCar:gt,removeScrollBar:d,shards:v,noIsolation:g,inert:b,setCallbacks:n,allowPinchZoom:!!l,lockRef:r,gapMode:S}),i?s.cloneElement(s.Children.only(u),D(D({},N),{ref:x})):s.createElement(_,D({},N,{className:p,ref:x}),u))});ce.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ce.classNames={fullWidth:ae,zeroRight:oe};var Wr=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function qr(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Wr();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 zr=function(){var e=0,t=null;return{add:function(r){e==0&&(t=qr())&&(Br(t,r),Ur(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Vr=function(){var e=zr();return function(t,r){s.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},_t=function(){var e=Vr(),t=function(r){var o=r.styles,a=r.dynamic;return e(o,a),null};return t},Hr={left:0,top:0,right:0,gap:0},ge=function(e){return parseInt(e||"",10)||0},Gr=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)]},Kr=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Hr;var t=Gr(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])}},Yr=_t(),V="data-scroll-locked",Xr=function(e,t,r,o){var a=e.left,n=e.top,i=e.right,u=e.gap;return r===void 0&&(r="margin"),`
2
- .`.concat(Ar,` {
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),O=require("react"),it=require("react-dom");function ut(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=ut(O),Xt=ut(it);function $(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 Re(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function st(...e){return t=>{let r=!1;const o=e.map(a=>{const n=Re(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():Re(e[a],null)}}}}function W(...e){return s.useCallback(st(...e),e)}function Zt(e,t){const r=s.createContext(t),o=n=>{const{children:i,...u}=n,p=s.useMemo(()=>u,Object.values(u));return c.jsx(r.Provider,{value:p,children:i})};o.displayName=e+"Provider";function a(n){const i=s.useContext(r);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${n}\` must be used within \`${e}\``)}return[o,a]}function Qt(e,t=[]){let r=[];function o(n,i){const u=s.createContext(i),p=r.length;r=[...r,i];const d=v=>{var _;const{scope:h,children:g,...b}=v,l=((_=h==null?void 0:h[e])==null?void 0:_[p])||u,m=s.useMemo(()=>b,Object.values(b));return c.jsx(l.Provider,{value:m,children:g})};d.displayName=n+"Provider";function f(v,h){var l;const g=((l=h==null?void 0:h[e])==null?void 0:l[p])||u,b=s.useContext(g);if(b)return b;if(i!==void 0)return i;throw new Error(`\`${v}\` must be used within \`${n}\``)}return[d,f]}const a=()=>{const n=r.map(i=>s.createContext(i));return function(u){const p=(u==null?void 0:u[e])||n;return s.useMemo(()=>({[`__scope${e}`]:{...u,[e]:p}}),[u,p])}};return a.scopeName=e,[o,Jt(a,...t)]}function Jt(...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 i=o.reduce((u,{useScope:p,scopeName:d})=>{const v=p(n)[`__scope${d}`];return{...u,...v}},{});return s.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}var ie=globalThis!=null&&globalThis.document?s.useLayoutEffect:()=>{},er=s.useId||(()=>{}),tr=0;function de(e){const[t,r]=s.useState(er());return ie(()=>{r(o=>o??String(tr++))},[e]),e||(t?`radix-${t}`:"")}function k(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 rr({prop:e,defaultProp:t,onChange:r=()=>{}}){const[o,a]=nr({defaultProp:t,onChange:r}),n=e!==void 0,i=n?e:o,u=k(r),p=s.useCallback(d=>{if(n){const v=typeof d=="function"?d(e):d;v!==e&&u(v)}else a(d)},[n,e,a,u]);return[i,p]}function nr({defaultProp:e,onChange:t}){const r=s.useState(e),[o]=r,a=s.useRef(o),n=k(t);return s.useEffect(()=>{a.current!==o&&(n(o),a.current=o)},[o,a,n]),r}var Se=s.forwardRef((e,t)=>{const{children:r,...o}=e,a=s.Children.toArray(r),n=a.find(ar);if(n){const i=n.props.children,u=a.map(p=>p===n?s.Children.count(i)>1?s.Children.only(null):s.isValidElement(i)?i.props.children:null:p);return c.jsx(be,{...o,ref:t,children:s.isValidElement(i)?s.cloneElement(i,void 0,u):null})}return c.jsx(be,{...o,ref:t,children:r})});Se.displayName="Slot";var be=s.forwardRef((e,t)=>{const{children:r,...o}=e;if(s.isValidElement(r)){const a=ur(r),n=ir(o,r.props);return r.type!==s.Fragment&&(n.ref=t?st(t,a):a),s.cloneElement(r,n)}return s.Children.count(r)>1?s.Children.only(null):null});be.displayName="SlotClone";var or=({children:e})=>c.jsx(c.Fragment,{children:e});function ar(e){return s.isValidElement(e)&&e.type===or}function ir(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 ur(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 sr=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],M=sr.reduce((e,t)=>{const r=s.forwardRef((o,a)=>{const{asChild:n,...i}=o,u=n?Se:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(u,{...i,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function cr(e,t){e&&Xt.flushSync(()=>e.dispatchEvent(t))}function lr(e,t=globalThis==null?void 0:globalThis.document){const r=k(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 dr="DismissableLayer",we="dismissableLayer.update",pr="dismissableLayer.pointerDownOutside",fr="dismissableLayer.focusOutside",Ae,ct=s.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),lt=s.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:n,onInteractOutside:i,onDismiss:u,...p}=e,d=s.useContext(ct),[f,v]=s.useState(null),h=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=s.useState({}),b=W(t,y=>v(y)),l=Array.from(d.layers),[m]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),_=l.indexOf(m),S=f?l.indexOf(f):-1,w=d.layersWithOutsidePointerEventsDisabled.size>0,E=S>=_,x=mr(y=>{const A=y.target,R=[...d.branches].some(z=>z.contains(A));!E||R||(a==null||a(y),i==null||i(y),y.defaultPrevented||u==null||u())},h),N=gr(y=>{const A=y.target;[...d.branches].some(z=>z.contains(A))||(n==null||n(y),i==null||i(y),y.defaultPrevented||u==null||u())},h);return lr(y=>{S===d.layers.size-1&&(o==null||o(y),!y.defaultPrevented&&u&&(y.preventDefault(),u()))},h),s.useEffect(()=>{if(f)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(Ae=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),De(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Ae)}},[f,h,r,d]),s.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),De())},[f,d]),s.useEffect(()=>{const y=()=>g({});return document.addEventListener(we,y),()=>document.removeEventListener(we,y)},[]),c.jsx(M.div,{...p,ref:b,style:{pointerEvents:w?E?"auto":"none":void 0,...e.style},onFocusCapture:$(e.onFocusCapture,N.onFocusCapture),onBlurCapture:$(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:$(e.onPointerDownCapture,x.onPointerDownCapture)})});lt.displayName=dr;var vr="DismissableLayerBranch",hr=s.forwardRef((e,t)=>{const r=s.useContext(ct),o=s.useRef(null),a=W(t,o);return s.useEffect(()=>{const n=o.current;if(n)return r.branches.add(n),()=>{r.branches.delete(n)}},[r.branches]),c.jsx(M.div,{...e,ref:a})});hr.displayName=vr;function mr(e,t=globalThis==null?void 0:globalThis.document){const r=k(e),o=s.useRef(!1),a=s.useRef(()=>{});return s.useEffect(()=>{const n=u=>{if(u.target&&!o.current){let p=function(){dt(pr,r,d,{discrete:!0})};const d={originalEvent:u};u.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},i=window.setTimeout(()=>{t.addEventListener("pointerdown",n)},0);return()=>{window.clearTimeout(i),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=k(e),o=s.useRef(!1);return s.useEffect(()=>{const a=n=>{n.target&&!o.current&&dt(fr,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 De(){const e=new CustomEvent(we);document.dispatchEvent(e)}function dt(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?cr(a,n):a.dispatchEvent(n)}var pe="focusScope.autoFocusOnMount",fe="focusScope.autoFocusOnUnmount",je={bubbles:!1,cancelable:!0},_r="FocusScope",pt=s.forwardRef((e,t)=>{const{loop:r=!1,trapped:o=!1,onMountAutoFocus:a,onUnmountAutoFocus:n,...i}=e,[u,p]=s.useState(null),d=k(a),f=k(n),v=s.useRef(null),h=W(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(w){if(g.paused||!u)return;const E=w.target;u.contains(E)?v.current=E:T(v.current,{select:!0})},m=function(w){if(g.paused||!u)return;const E=w.relatedTarget;E!==null&&(u.contains(E)||T(v.current,{select:!0}))},_=function(w){if(document.activeElement===document.body)for(const x of w)x.removedNodes.length>0&&T(u)};document.addEventListener("focusin",l),document.addEventListener("focusout",m);const S=new MutationObserver(_);return u&&S.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",l),document.removeEventListener("focusout",m),S.disconnect()}}},[o,u,g.paused]),s.useEffect(()=>{if(u){Te.add(g);const l=document.activeElement;if(!u.contains(l)){const _=new CustomEvent(pe,je);u.addEventListener(pe,d),u.dispatchEvent(_),_.defaultPrevented||(yr(Sr(ft(u)),{select:!0}),document.activeElement===l&&T(u))}return()=>{u.removeEventListener(pe,d),setTimeout(()=>{const _=new CustomEvent(fe,je);u.addEventListener(fe,f),u.dispatchEvent(_),_.defaultPrevented||T(l??document.body,{select:!0}),u.removeEventListener(fe,f),Te.remove(g)},0)}}},[u,d,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 S=l.currentTarget,[w,E]=br(S);w&&E?!l.shiftKey&&_===E?(l.preventDefault(),r&&T(w,{select:!0})):l.shiftKey&&_===w&&(l.preventDefault(),r&&T(E,{select:!0})):_===S&&l.preventDefault()}},[r,o,g.paused]);return c.jsx(M.div,{tabIndex:-1,...i,ref:h,onKeyDown:b})});pt.displayName=_r;function yr(e,{select:t=!1}={}){const r=document.activeElement;for(const o of e)if(T(o,{select:t}),document.activeElement!==r)return}function br(e){const t=ft(e),r=Me(t,e),o=Me(t.reverse(),e);return[r,o]}function ft(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 Me(e,t){for(const r of e)if(!wr(r,{upTo:t}))return r}function wr(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 Er(e){return e instanceof HTMLInputElement&&"select"in e}function T(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Er(e)&&t&&e.select()}}var Te=xr();function xr(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=$e(e,t),e.unshift(t)},remove(t){var r;e=$e(e,t),(r=e[0])==null||r.resume()}}}function $e(e,t){const r=[...e],o=r.indexOf(t);return o!==-1&&r.splice(o,1),r}function Sr(e){return e.filter(t=>t.tagName!=="A")}var Cr="Portal",vt=s.forwardRef((e,t)=>{var u;const{container:r,...o}=e,[a,n]=s.useState(!1);ie(()=>n(!0),[]);const i=r||a&&((u=globalThis==null?void 0:globalThis.document)==null?void 0:u.body);return i?it.createPortal(c.jsx(M.div,{...o,ref:t}),i):null});vt.displayName=Cr;function Nr(e,t){return s.useReducer((r,o)=>t[r][o]??r,e)}var se=e=>{const{present:t,children:r}=e,o=Pr(t),a=typeof r=="function"?r({present:o.isPresent}):s.Children.only(r),n=W(o.ref,Or(a));return typeof r=="function"||o.isPresent?s.cloneElement(a,{ref:n}):null};se.displayName="Presence";function Pr(e){const[t,r]=s.useState(),o=s.useRef({}),a=s.useRef(e),n=s.useRef("none"),i=e?"mounted":"unmounted",[u,p]=Nr(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return s.useEffect(()=>{const d=Z(o.current);n.current=u==="mounted"?d:"none"},[u]),ie(()=>{const d=o.current,f=a.current;if(f!==e){const h=n.current,g=Z(d);e?p("MOUNT"):g==="none"||(d==null?void 0:d.display)==="none"?p("UNMOUNT"):p(f&&h!==g?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,p]),ie(()=>{if(t){let d;const f=t.ownerDocument.defaultView??window,v=g=>{const l=Z(o.current).includes(g.animationName);if(g.target===t&&l&&(p("ANIMATION_END"),!a.current)){const m=t.style.animationFillMode;t.style.animationFillMode="forwards",d=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(d),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",v),t.removeEventListener("animationend",v)}}else p("ANIMATION_END")},[t,p]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:s.useCallback(d=>{d&&(o.current=getComputedStyle(d)),r(d)},[])}}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 Rr(){s.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Ie()),document.body.insertAdjacentElement("beforeend",e[1]??Ie()),ve++,()=>{ve===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),ve--}},[])}function Ie(){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 j=function(){return j=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},j.apply(this,arguments)};function ht(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 Ar(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",Dr="with-scroll-bars-hidden",jr="--removed-body-scroll-bar-size";function he(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Mr(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,Le=new WeakMap;function $r(e,t){var r=Mr(null,function(o){return e.forEach(function(a){return he(a,o)})});return Tr(function(){var o=Le.get(r);if(o){var a=new Set(o),n=new Set(e),i=r.current;a.forEach(function(u){n.has(u)||he(u,null)}),n.forEach(function(u){a.has(u)||he(u,i)})}Le.set(r,e)},[e]),r}function Ir(e){return e}function Lr(e,t){t===void 0&&(t=Ir);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 i=t(n,o);return r.push(i),function(){r=r.filter(function(u){return u!==i})}},assignSyncMedium:function(n){for(o=!0;r.length;){var i=r;r=[],i.forEach(n)}r={push:function(u){return n(u)},filter:function(){return r}}},assignMedium:function(n){o=!0;var i=[];if(r.length){var u=r;r=[],u.forEach(n),i=r}var p=function(){var f=i;i=[],f.forEach(n)},d=function(){return Promise.resolve().then(p)};d(),r={push:function(f){i.push(f),d()},filter:function(f){return i=i.filter(f),r}}}};return a}function kr(e){e===void 0&&(e={});var t=Lr(null);return t.options=j({async:!0,ssr:!1},e),t}var mt=function(e){var t=e.sideCar,r=ht(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,j({},r))};mt.isSideCarExport=!0;function Fr(e,t){return e.useMedium(t),mt}var gt=kr(),me=function(){},ce=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],i=e.forwardProps,u=e.children,p=e.className,d=e.removeScrollBar,f=e.enabled,v=e.shards,h=e.sideCar,g=e.noIsolation,b=e.inert,l=e.allowPinchZoom,m=e.as,_=m===void 0?"div":m,S=e.gapMode,w=ht(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=h,x=$r([r,t]),N=j(j({},w),a);return s.createElement(s.Fragment,null,f&&s.createElement(E,{sideCar:gt,removeScrollBar:d,shards:v,noIsolation:g,inert:b,setCallbacks:n,allowPinchZoom:!!l,lockRef:r,gapMode:S}),i?s.cloneElement(s.Children.only(u),j(j({},N),{ref:x})):s.createElement(_,j({},N,{className:p,ref:x}),u))});ce.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ce.classNames={fullWidth:ae,zeroRight:oe};var Wr=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function qr(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Wr();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=qr())&&(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])}},_t=function(){var e=Hr(),t=function(r){var o=r.styles,a=r.dynamic;return e(o,a),null};return t},zr={left:0,top:0,right:0,gap:0},ge=function(e){return parseInt(e||"",10)||0},Kr=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 zr;var t=Kr(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])}},Yr=_t(),H="data-scroll-locked",Xr=function(e,t,r,o){var a=e.left,n=e.top,i=e.right,u=e.gap;return r===void 0&&(r="margin"),`
2
+ .`.concat(Dr,` {
3
3
  overflow: hidden `).concat(o,`;
4
4
  padding-right: `).concat(u,"px ").concat(o,`;
5
5
  }
6
- body[`).concat(V,`] {
6
+ body[`).concat(H,`] {
7
7
  overflow: hidden `).concat(o,`;
8
8
  overscroll-behavior: contain;
9
9
  `).concat([t&&"position: relative ".concat(o,";"),r==="margin"&&`
@@ -32,29 +32,29 @@
32
32
  margin-right: 0 `).concat(o,`;
33
33
  }
34
34
 
35
- body[`).concat(V,`] {
36
- `).concat(Dr,": ").concat(u,`px;
35
+ body[`).concat(H,`] {
36
+ `).concat(jr,": ").concat(u,`px;
37
37
  }
38
- `)},ke=function(){var e=parseInt(document.body.getAttribute(V)||"0",10);return isFinite(e)?e:0},Zr=function(){s.useEffect(function(){return document.body.setAttribute(V,(ke()+1).toString()),function(){var e=ke()-1;e<=0?document.body.removeAttribute(V):document.body.setAttribute(V,e.toString())}},[])},Qr=function(e){var t=e.noRelative,r=e.noImportant,o=e.gapMode,a=o===void 0?"margin":o;Zr();var n=s.useMemo(function(){return Kr(a)},[a]);return s.createElement(Yr,{styles:Xr(n,!t,a,r?"":"!important")})},Ee=!1;if(typeof window<"u")try{var Q=Object.defineProperty({},"passive",{get:function(){return Ee=!0,!0}});window.addEventListener("test",Q,Q),window.removeEventListener("test",Q,Q)}catch{Ee=!1}var B=Ee?{passive:!1}:!1,Jr=function(e){return e.tagName==="TEXTAREA"},yt=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!Jr(e)&&r[t]==="visible")},en=function(e){return yt(e,"overflowY")},tn=function(e){return yt(e,"overflowX")},Fe=function(e,t){var r=t.ownerDocument,o=t;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var a=bt(e,o);if(a){var n=wt(e,o),i=n[1],u=n[2];if(i>u)return!0}o=o.parentNode}while(o&&o!==r.body);return!1},rn=function(e){var t=e.scrollTop,r=e.scrollHeight,o=e.clientHeight;return[t,r,o]},nn=function(e){var t=e.scrollLeft,r=e.scrollWidth,o=e.clientWidth;return[t,r,o]},bt=function(e,t){return e==="v"?en(t):tn(t)},wt=function(e,t){return e==="v"?rn(t):nn(t)},on=function(e,t){return e==="h"&&t==="rtl"?-1:1},an=function(e,t,r,o,a){var n=on(e,window.getComputedStyle(t).direction),i=n*o,u=r.target,p=t.contains(u),d=!1,f=i>0,v=0,h=0;do{var g=wt(e,u),b=g[0],l=g[1],m=g[2],_=l-m-n*b;(b||_)&&bt(e,u)&&(v+=_,h+=b),u instanceof ShadowRoot?u=u.host:u=u.parentNode}while(!p&&u!==document.body||p&&(t.contains(u)||t===u));return(f&&Math.abs(v)<1||!f&&Math.abs(h)<1)&&(d=!0),d},J=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},We=function(e){return[e.deltaX,e.deltaY]},qe=function(e){return e&&"current"in e?e.current:e},un=function(e,t){return e[0]===t[0]&&e[1]===t[1]},sn=function(e){return`
38
+ `)},ke=function(){var e=parseInt(document.body.getAttribute(H)||"0",10);return isFinite(e)?e:0},Zr=function(){s.useEffect(function(){return document.body.setAttribute(H,(ke()+1).toString()),function(){var e=ke()-1;e<=0?document.body.removeAttribute(H):document.body.setAttribute(H,e.toString())}},[])},Qr=function(e){var t=e.noRelative,r=e.noImportant,o=e.gapMode,a=o===void 0?"margin":o;Zr();var n=s.useMemo(function(){return Gr(a)},[a]);return s.createElement(Yr,{styles:Xr(n,!t,a,r?"":"!important")})},Ee=!1;if(typeof window<"u")try{var Q=Object.defineProperty({},"passive",{get:function(){return Ee=!0,!0}});window.addEventListener("test",Q,Q),window.removeEventListener("test",Q,Q)}catch{Ee=!1}var B=Ee?{passive:!1}:!1,Jr=function(e){return e.tagName==="TEXTAREA"},yt=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!Jr(e)&&r[t]==="visible")},en=function(e){return yt(e,"overflowY")},tn=function(e){return yt(e,"overflowX")},Fe=function(e,t){var r=t.ownerDocument,o=t;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var a=bt(e,o);if(a){var n=wt(e,o),i=n[1],u=n[2];if(i>u)return!0}o=o.parentNode}while(o&&o!==r.body);return!1},rn=function(e){var t=e.scrollTop,r=e.scrollHeight,o=e.clientHeight;return[t,r,o]},nn=function(e){var t=e.scrollLeft,r=e.scrollWidth,o=e.clientWidth;return[t,r,o]},bt=function(e,t){return e==="v"?en(t):tn(t)},wt=function(e,t){return e==="v"?rn(t):nn(t)},on=function(e,t){return e==="h"&&t==="rtl"?-1:1},an=function(e,t,r,o,a){var n=on(e,window.getComputedStyle(t).direction),i=n*o,u=r.target,p=t.contains(u),d=!1,f=i>0,v=0,h=0;do{var g=wt(e,u),b=g[0],l=g[1],m=g[2],_=l-m-n*b;(b||_)&&bt(e,u)&&(v+=_,h+=b),u instanceof ShadowRoot?u=u.host:u=u.parentNode}while(!p&&u!==document.body||p&&(t.contains(u)||t===u));return(f&&Math.abs(v)<1||!f&&Math.abs(h)<1)&&(d=!0),d},J=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},We=function(e){return[e.deltaX,e.deltaY]},qe=function(e){return e&&"current"in e?e.current:e},un=function(e,t){return e[0]===t[0]&&e[1]===t[1]},sn=function(e){return`
39
39
  .block-interactivity-`.concat(e,` {pointer-events: none;}
40
40
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
41
- `)},cn=0,U=[];function ln(e){var t=s.useRef([]),r=s.useRef([0,0]),o=s.useRef(),a=s.useState(cn++)[0],n=s.useState(_t)[0],i=s.useRef(e);s.useEffect(function(){i.current=e},[e]),s.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var l=jr([e.lockRef.current],(e.shards||[]).map(qe),!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 u=s.useCallback(function(l,m){if("touches"in l&&l.touches.length===2||l.type==="wheel"&&l.ctrlKey)return!i.current.allowPinchZoom;var _=J(l),S=r.current,w="deltaX"in l?l.deltaX:S[0]-_[0],E="deltaY"in l?l.deltaY:S[1]-_[1],x,N=l.target,y=Math.abs(w)>Math.abs(E)?"h":"v";if("touches"in l&&y==="h"&&N.type==="range")return!1;var j=Fe(y,N);if(!j)return!0;if(j?x=y:(x=y==="v"?"h":"v",j=Fe(y,N)),!j)return!1;if(!o.current&&"changedTouches"in l&&(w||E)&&(o.current=x),!x)return!0;var R=o.current||x;return an(R,m,l,R==="h"?w:E)},[]),p=s.useCallback(function(l){var m=l;if(!(!U.length||U[U.length-1]!==n)){var _="deltaY"in m?We(m):J(m),S=t.current.filter(function(x){return x.name===m.type&&(x.target===m.target||m.target===x.shadowParent)&&un(x.delta,_)})[0];if(S&&S.should){m.cancelable&&m.preventDefault();return}if(!S){var w=(i.current.shards||[]).map(qe).filter(Boolean).filter(function(x){return x.contains(m.target)}),E=w.length>0?u(m,w[0]):!i.current.noIsolation;E&&m.cancelable&&m.preventDefault()}}},[]),d=s.useCallback(function(l,m,_,S){var w={name:l,delta:m,target:_,should:S,shadowParent:dn(_)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(E){return E!==w})},1)},[]),f=s.useCallback(function(l){r.current=J(l),o.current=void 0},[]),v=s.useCallback(function(l){d(l.type,We(l),l.target,u(l,e.lockRef.current))},[]),h=s.useCallback(function(l){d(l.type,J(l),l.target,u(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:sn(a)}):null,g?s.createElement(Qr,{gapMode:e.gapMode}):null)}function dn(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const pn=Fr(gt,ln);var Et=s.forwardRef(function(e,t){return s.createElement(ce,D({},e,{ref:t,sideCar:pn}))});Et.classNames=ce.classNames;var fn=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},z=new WeakMap,ee=new WeakMap,te={},_e=0,xt=function(e){return e&&(e.host||xt(e.parentNode))},vn=function(e,t){return t.map(function(r){if(e.contains(r))return r;var o=xt(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})},hn=function(e,t,r,o){var a=vn(t,Array.isArray(e)?e:[e]);te[r]||(te[r]=new WeakMap);var n=te[r],i=[],u=new Set,p=new Set(a),d=function(v){!v||u.has(v)||(u.add(v),d(v.parentNode))};a.forEach(d);var f=function(v){!v||p.has(v)||Array.prototype.forEach.call(v.children,function(h){if(u.has(h))f(h);else try{var g=h.getAttribute(o),b=g!==null&&g!=="false",l=(z.get(h)||0)+1,m=(n.get(h)||0)+1;z.set(h,l),n.set(h,m),i.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),u.clear(),_e++,function(){i.forEach(function(v){var h=z.get(v)-1,g=n.get(v)-1;z.set(v,h),n.set(v,g),h||(ee.has(v)||v.removeAttribute(o),ee.delete(v)),g||v.removeAttribute(r)}),_e--,_e||(z=new WeakMap,z=new WeakMap,ee=new WeakMap,te={})}},mn=function(e,t,r){r===void 0&&(r="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),a=fn(e);return a?(o.push.apply(o,Array.from(a.querySelectorAll("[aria-live]"))),hn(o,a,r,"aria-hidden")):function(){return null}},Ce="Dialog",[St,To]=Qt(Ce),[gn,A]=St(Ce),Ct=e=>{const{__scopeDialog:t,children:r,open:o,defaultOpen:a,onOpenChange:n,modal:i=!0}=e,u=s.useRef(null),p=s.useRef(null),[d=!1,f]=rr({prop:o,defaultProp:a,onChange:n});return c.jsx(gn,{scope:t,triggerRef:u,contentRef:p,contentId:de(),titleId:de(),descriptionId:de(),open:d,onOpenChange:f,onOpenToggle:s.useCallback(()=>f(v=>!v),[f]),modal:i,children:r})};Ct.displayName=Ce;var Nt="DialogTrigger",Pt=s.forwardRef((e,t)=>{const{__scopeDialog:r,...o}=e,a=A(Nt,r),n=W(t,a.triggerRef);return c.jsx(T.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":Oe(a.open),...o,ref:n,onClick:$(e.onClick,a.onOpenToggle)})});Pt.displayName=Nt;var Ne="DialogPortal",[_n,Ot]=St(Ne,{forceMount:void 0}),Rt=e=>{const{__scopeDialog:t,forceMount:r,children:o,container:a}=e,n=A(Ne,t);return c.jsx(_n,{scope:t,forceMount:r,children:s.Children.map(o,i=>c.jsx(se,{present:r||n.open,children:c.jsx(vt,{asChild:!0,container:a,children:i})}))})};Rt.displayName=Ne;var ue="DialogOverlay",jt=s.forwardRef((e,t)=>{const r=Ot(ue,e.__scopeDialog),{forceMount:o=r.forceMount,...a}=e,n=A(ue,e.__scopeDialog);return n.modal?c.jsx(se,{present:o||n.open,children:c.jsx(yn,{...a,ref:t})}):null});jt.displayName=ue;var yn=s.forwardRef((e,t)=>{const{__scopeDialog:r,...o}=e,a=A(ue,r);return c.jsx(Et,{as:Se,allowPinchZoom:!0,shards:[a.contentRef],children:c.jsx(T.div,{"data-state":Oe(a.open),...o,ref:t,style:{pointerEvents:"auto",...o.style}})})}),F="DialogContent",At=s.forwardRef((e,t)=>{const r=Ot(F,e.__scopeDialog),{forceMount:o=r.forceMount,...a}=e,n=A(F,e.__scopeDialog);return c.jsx(se,{present:o||n.open,children:n.modal?c.jsx(bn,{...a,ref:t}):c.jsx(wn,{...a,ref:t})})});At.displayName=F;var bn=s.forwardRef((e,t)=>{const r=A(F,e.__scopeDialog),o=s.useRef(null),a=W(t,r.contentRef,o);return s.useEffect(()=>{const n=o.current;if(n)return mn(n)},[]),c.jsx(Dt,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:$(e.onCloseAutoFocus,n=>{var i;n.preventDefault(),(i=r.triggerRef.current)==null||i.focus()}),onPointerDownOutside:$(e.onPointerDownOutside,n=>{const i=n.detail.originalEvent,u=i.button===0&&i.ctrlKey===!0;(i.button===2||u)&&n.preventDefault()}),onFocusOutside:$(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 c.jsx(Dt,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:n=>{var i,u;(i=e.onCloseAutoFocus)==null||i.call(e,n),n.defaultPrevented||(o.current||(u=r.triggerRef.current)==null||u.focus(),n.preventDefault()),o.current=!1,a.current=!1},onInteractOutside:n=>{var p,d;(p=e.onInteractOutside)==null||p.call(e,n),n.defaultPrevented||(o.current=!0,n.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const i=n.target;((d=r.triggerRef.current)==null?void 0:d.contains(i))&&n.preventDefault(),n.detail.originalEvent.type==="focusin"&&a.current&&n.preventDefault()}})}),Dt=s.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:n,...i}=e,u=A(F,r),p=s.useRef(null),d=W(t,p);return Rr(),c.jsxs(c.Fragment,{children:[c.jsx(pt,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:a,onUnmountAutoFocus:n,children:c.jsx(lt,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":Oe(u.open),...i,ref:d,onDismiss:()=>u.onOpenChange(!1)})}),c.jsxs(c.Fragment,{children:[c.jsx(En,{titleId:u.titleId}),c.jsx(Sn,{contentRef:p,descriptionId:u.descriptionId})]})]})}),Pe="DialogTitle",Tt=s.forwardRef((e,t)=>{const{__scopeDialog:r,...o}=e,a=A(Pe,r);return c.jsx(T.h2,{id:a.titleId,...o,ref:t})});Tt.displayName=Pe;var Mt="DialogDescription",$t=s.forwardRef((e,t)=>{const{__scopeDialog:r,...o}=e,a=A(Mt,r);return c.jsx(T.p,{id:a.descriptionId,...o,ref:t})});$t.displayName=Mt;var It="DialogClose",Lt=s.forwardRef((e,t)=>{const{__scopeDialog:r,...o}=e,a=A(It,r);return c.jsx(T.button,{type:"button",...o,ref:t,onClick:$(e.onClick,()=>a.onOpenChange(!1))})});Lt.displayName=It;function Oe(e){return e?"open":"closed"}var kt="DialogTitleWarning",[Mo,Ft]=Zt(kt,{contentName:F,titleName:Pe,docsSlug:"dialog"}),En=({titleId:e})=>{const t=Ft(kt),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
41
+ `)},cn=0,U=[];function ln(e){var t=s.useRef([]),r=s.useRef([0,0]),o=s.useRef(),a=s.useState(cn++)[0],n=s.useState(_t)[0],i=s.useRef(e);s.useEffect(function(){i.current=e},[e]),s.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var l=Ar([e.lockRef.current],(e.shards||[]).map(qe),!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 u=s.useCallback(function(l,m){if("touches"in l&&l.touches.length===2||l.type==="wheel"&&l.ctrlKey)return!i.current.allowPinchZoom;var _=J(l),S=r.current,w="deltaX"in l?l.deltaX:S[0]-_[0],E="deltaY"in l?l.deltaY:S[1]-_[1],x,N=l.target,y=Math.abs(w)>Math.abs(E)?"h":"v";if("touches"in l&&y==="h"&&N.type==="range")return!1;var A=Fe(y,N);if(!A)return!0;if(A?x=y:(x=y==="v"?"h":"v",A=Fe(y,N)),!A)return!1;if(!o.current&&"changedTouches"in l&&(w||E)&&(o.current=x),!x)return!0;var R=o.current||x;return an(R,m,l,R==="h"?w:E)},[]),p=s.useCallback(function(l){var m=l;if(!(!U.length||U[U.length-1]!==n)){var _="deltaY"in m?We(m):J(m),S=t.current.filter(function(x){return x.name===m.type&&(x.target===m.target||m.target===x.shadowParent)&&un(x.delta,_)})[0];if(S&&S.should){m.cancelable&&m.preventDefault();return}if(!S){var w=(i.current.shards||[]).map(qe).filter(Boolean).filter(function(x){return x.contains(m.target)}),E=w.length>0?u(m,w[0]):!i.current.noIsolation;E&&m.cancelable&&m.preventDefault()}}},[]),d=s.useCallback(function(l,m,_,S){var w={name:l,delta:m,target:_,should:S,shadowParent:dn(_)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(E){return E!==w})},1)},[]),f=s.useCallback(function(l){r.current=J(l),o.current=void 0},[]),v=s.useCallback(function(l){d(l.type,We(l),l.target,u(l,e.lockRef.current))},[]),h=s.useCallback(function(l){d(l.type,J(l),l.target,u(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:sn(a)}):null,g?s.createElement(Qr,{gapMode:e.gapMode}):null)}function dn(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const pn=Fr(gt,ln);var Et=s.forwardRef(function(e,t){return s.createElement(ce,j({},e,{ref:t,sideCar:pn}))});Et.classNames=ce.classNames;var fn=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,xt=function(e){return e&&(e.host||xt(e.parentNode))},vn=function(e,t){return t.map(function(r){if(e.contains(r))return r;var o=xt(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})},hn=function(e,t,r,o){var a=vn(t,Array.isArray(e)?e:[e]);te[r]||(te[r]=new WeakMap);var n=te[r],i=[],u=new Set,p=new Set(a),d=function(v){!v||u.has(v)||(u.add(v),d(v.parentNode))};a.forEach(d);var f=function(v){!v||p.has(v)||Array.prototype.forEach.call(v.children,function(h){if(u.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),i.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),u.clear(),_e++,function(){i.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={})}},mn=function(e,t,r){r===void 0&&(r="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),a=fn(e);return a?(o.push.apply(o,Array.from(a.querySelectorAll("[aria-live]"))),hn(o,a,r,"aria-hidden")):function(){return null}},Ce="Dialog",[St,Mo]=Qt(Ce),[gn,D]=St(Ce),Ct=e=>{const{__scopeDialog:t,children:r,open:o,defaultOpen:a,onOpenChange:n,modal:i=!0}=e,u=s.useRef(null),p=s.useRef(null),[d=!1,f]=rr({prop:o,defaultProp:a,onChange:n});return c.jsx(gn,{scope:t,triggerRef:u,contentRef:p,contentId:de(),titleId:de(),descriptionId:de(),open:d,onOpenChange:f,onOpenToggle:s.useCallback(()=>f(v=>!v),[f]),modal:i,children:r})};Ct.displayName=Ce;var Nt="DialogTrigger",Pt=s.forwardRef((e,t)=>{const{__scopeDialog:r,...o}=e,a=D(Nt,r),n=W(t,a.triggerRef);return c.jsx(M.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":Oe(a.open),...o,ref:n,onClick:$(e.onClick,a.onOpenToggle)})});Pt.displayName=Nt;var Ne="DialogPortal",[_n,Ot]=St(Ne,{forceMount:void 0}),Rt=e=>{const{__scopeDialog:t,forceMount:r,children:o,container:a}=e,n=D(Ne,t);return c.jsx(_n,{scope:t,forceMount:r,children:s.Children.map(o,i=>c.jsx(se,{present:r||n.open,children:c.jsx(vt,{asChild:!0,container:a,children:i})}))})};Rt.displayName=Ne;var ue="DialogOverlay",At=s.forwardRef((e,t)=>{const r=Ot(ue,e.__scopeDialog),{forceMount:o=r.forceMount,...a}=e,n=D(ue,e.__scopeDialog);return n.modal?c.jsx(se,{present:o||n.open,children:c.jsx(yn,{...a,ref:t})}):null});At.displayName=ue;var yn=s.forwardRef((e,t)=>{const{__scopeDialog:r,...o}=e,a=D(ue,r);return c.jsx(Et,{as:Se,allowPinchZoom:!0,shards:[a.contentRef],children:c.jsx(M.div,{"data-state":Oe(a.open),...o,ref:t,style:{pointerEvents:"auto",...o.style}})})}),F="DialogContent",Dt=s.forwardRef((e,t)=>{const r=Ot(F,e.__scopeDialog),{forceMount:o=r.forceMount,...a}=e,n=D(F,e.__scopeDialog);return c.jsx(se,{present:o||n.open,children:n.modal?c.jsx(bn,{...a,ref:t}):c.jsx(wn,{...a,ref:t})})});Dt.displayName=F;var bn=s.forwardRef((e,t)=>{const r=D(F,e.__scopeDialog),o=s.useRef(null),a=W(t,r.contentRef,o);return s.useEffect(()=>{const n=o.current;if(n)return mn(n)},[]),c.jsx(jt,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:$(e.onCloseAutoFocus,n=>{var i;n.preventDefault(),(i=r.triggerRef.current)==null||i.focus()}),onPointerDownOutside:$(e.onPointerDownOutside,n=>{const i=n.detail.originalEvent,u=i.button===0&&i.ctrlKey===!0;(i.button===2||u)&&n.preventDefault()}),onFocusOutside:$(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 c.jsx(jt,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:n=>{var i,u;(i=e.onCloseAutoFocus)==null||i.call(e,n),n.defaultPrevented||(o.current||(u=r.triggerRef.current)==null||u.focus(),n.preventDefault()),o.current=!1,a.current=!1},onInteractOutside:n=>{var p,d;(p=e.onInteractOutside)==null||p.call(e,n),n.defaultPrevented||(o.current=!0,n.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const i=n.target;((d=r.triggerRef.current)==null?void 0:d.contains(i))&&n.preventDefault(),n.detail.originalEvent.type==="focusin"&&a.current&&n.preventDefault()}})}),jt=s.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:n,...i}=e,u=D(F,r),p=s.useRef(null),d=W(t,p);return Rr(),c.jsxs(c.Fragment,{children:[c.jsx(pt,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:a,onUnmountAutoFocus:n,children:c.jsx(lt,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":Oe(u.open),...i,ref:d,onDismiss:()=>u.onOpenChange(!1)})}),c.jsxs(c.Fragment,{children:[c.jsx(En,{titleId:u.titleId}),c.jsx(Sn,{contentRef:p,descriptionId:u.descriptionId})]})]})}),Pe="DialogTitle",Mt=s.forwardRef((e,t)=>{const{__scopeDialog:r,...o}=e,a=D(Pe,r);return c.jsx(M.h2,{id:a.titleId,...o,ref:t})});Mt.displayName=Pe;var Tt="DialogDescription",$t=s.forwardRef((e,t)=>{const{__scopeDialog:r,...o}=e,a=D(Tt,r);return c.jsx(M.p,{id:a.descriptionId,...o,ref:t})});$t.displayName=Tt;var It="DialogClose",Lt=s.forwardRef((e,t)=>{const{__scopeDialog:r,...o}=e,a=D(It,r);return c.jsx(M.button,{type:"button",...o,ref:t,onClick:$(e.onClick,()=>a.onOpenChange(!1))})});Lt.displayName=It;function Oe(e){return e?"open":"closed"}var kt="DialogTitleWarning",[To,Ft]=Zt(kt,{contentName:F,titleName:Pe,docsSlug:"dialog"}),En=({titleId:e})=>{const t=Ft(kt),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 {${Ft(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=Ct,Nn=Pt,Pn=Rt,On=jt,Rn=At,jn=Tt,Be=$t,An=Lt;const Dn={LG:"lg"};function Tn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ue={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 {${Ft(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=Ct,Nn=Pt,Pn=Rt,On=At,Rn=Dt,An=Mt,Be=$t,Dn=Lt;const jn={LG:"lg"};function Mn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ue={exports:{}};/*!
46
46
  Copyright (c) 2018 Jed Watson.
47
47
  Licensed under the MIT License (MIT), see
48
48
  http://jedwatson.github.io/classnames
49
- */var ze;function Mn(){return ze||(ze=1,function(e){(function(){var t={}.hasOwnProperty;function r(){for(var n="",i=0;i<arguments.length;i++){var u=arguments[i];u&&(n=a(n,o(u)))}return n}function o(n){if(typeof n=="string"||typeof n=="number")return n;if(typeof n!="object")return"";if(Array.isArray(n))return r.apply(null,n);if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]"))return n.toString();var i="";for(var u in n)t.call(n,u)&&n[u]&&(i=a(i,u));return i}function a(n,i){return i?n?n+" "+i:n+i:n}e.exports?(r.default=r,e.exports=r):window.classNames=r})()}(Ue)),Ue.exports}var $n=Mn();const Ve=Tn($n),In="_rotate_1xozj_1",Ln="_dash_1xozj_1",G={"purpur-spinner":"_purpur-spinner_1xozj_1",rotate:In,"purpur-spinner--xxs":"_purpur-spinner--xxs_1xozj_4","purpur-spinner--xs":"_purpur-spinner--xs_1xozj_8","purpur-spinner--sm":"_purpur-spinner--sm_1xozj_12","purpur-spinner--md":"_purpur-spinner--md_1xozj_16","purpur-spinner--lg":"_purpur-spinner--lg_1xozj_20","purpur-spinner__circle":"_purpur-spinner__circle_1xozj_24",dash:Ln,"purpur-spinner__circle--disabled":"_purpur-spinner__circle--disabled_1xozj_33","purpur-spinner__circle--negative":"_purpur-spinner__circle--negative_1xozj_36"},K="purpur-spinner",kn={SM:"sm"},Fn=({["data-testid"]:e,disabled:t=!1,negative:r=!1,size:o=kn.SM,...a})=>c.jsx("div",{className:Ve([G[K],G[`${K}--${o}`]]),"data-testid":e,...a,children:c.jsx("svg",{viewBox:"0 0 50 50",children:c.jsx("circle",{className:Ve(G[`${K}__circle`],{[G[`${K}__circle--disabled`]]:t,[G[`${K}__circle--negative`]]:r}),cx:"25",cy:"25",r:"20"})})});function Wn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var He={exports:{}};/*!
49
+ */var Ve;function Tn(){return Ve||(Ve=1,function(e){(function(){var t={}.hasOwnProperty;function r(){for(var n="",i=0;i<arguments.length;i++){var u=arguments[i];u&&(n=a(n,o(u)))}return n}function o(n){if(typeof n=="string"||typeof n=="number")return n;if(typeof n!="object")return"";if(Array.isArray(n))return r.apply(null,n);if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]"))return n.toString();var i="";for(var u in n)t.call(n,u)&&n[u]&&(i=a(i,u));return i}function a(n,i){return i?n?n+" "+i:n+i:n}e.exports?(r.default=r,e.exports=r):window.classNames=r})()}(Ue)),Ue.exports}var $n=Tn();const He=Mn($n),In="_rotate_12t9p_1",Ln="_dash_12t9p_1",K={"purpur-spinner":"_purpur-spinner_12t9p_2",rotate:In,"purpur-spinner--xxs":"_purpur-spinner--xxs_12t9p_6","purpur-spinner--xs":"_purpur-spinner--xs_12t9p_10","purpur-spinner--sm":"_purpur-spinner--sm_12t9p_14","purpur-spinner--md":"_purpur-spinner--md_12t9p_18","purpur-spinner--lg":"_purpur-spinner--lg_12t9p_22","purpur-spinner__circle":"_purpur-spinner__circle_12t9p_26",dash:Ln,"purpur-spinner__circle--disabled":"_purpur-spinner__circle--disabled_12t9p_41","purpur-spinner__circle--negative":"_purpur-spinner__circle--negative_12t9p_44"},G="purpur-spinner",kn={SM:"sm"},Fn=({["data-testid"]:e,disabled:t=!1,negative:r=!1,size:o=kn.SM,...a})=>c.jsx("div",{className:He([K[G],K[`${G}--${o}`]]),"data-testid":e,...a,children:c.jsx("svg",{viewBox:"0 0 50 50",children:c.jsx("circle",{className:He(K[`${G}__circle`],{[K[`${G}__circle--disabled`]]:t,[K[`${G}__circle--negative`]]:r}),cx:"25",cy:"25",r:"20"})})});function Wn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ze={exports:{}};/*!
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 Ge;function qn(){return Ge||(Ge=1,function(e){(function(){var t={}.hasOwnProperty;function r(){for(var n="",i=0;i<arguments.length;i++){var u=arguments[i];u&&(n=a(n,o.call(this,u)))}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 i="";for(var u in n)t.call(n,u)&&n[u]&&(i=a(i,this&&this[u]||u));return i}function a(n,i){return i?n?n+" "+i:n+i:n}e.exports?(r.default=r,e.exports=r):window.classNames=r})()}(He)),He.exports}var Bn=qn();const Un=Wn(Bn),zn={"purpur-button":"_purpur-button_w455q_1","purpur-button--xs":"_purpur-button--xs_w455q_33","purpur-button--icon-only":"_purpur-button--icon-only_w455q_36","purpur-button--sm":"_purpur-button--sm_w455q_39","purpur-button--md":"_purpur-button--md_w455q_45","purpur-button--lg":"_purpur-button--lg_w455q_51","purpur-button--full-width":"_purpur-button--full-width_w455q_57","purpur-button--primary":"_purpur-button--primary_w455q_60","purpur-button--disabled":"_purpur-button--disabled_w455q_64","purpur-button--primary-negative":"_purpur-button--primary-negative_w455q_70","purpur-button--secondary":"_purpur-button--secondary_w455q_82","purpur-button--secondary-negative":"_purpur-button--secondary-negative_w455q_93","purpur-button--expressive":"_purpur-button--expressive_w455q_104","purpur-button--expressive-negative":"_purpur-button--expressive-negative_w455q_114","purpur-button--negative":"_purpur-button--negative_w455q_126","purpur-button--destructive":"_purpur-button--destructive_w455q_133","purpur-button--destructive-negative":"_purpur-button--destructive-negative_w455q_143","purpur-button--tertiary-purple":"_purpur-button--tertiary-purple_w455q_153","purpur-button--tertiary-purple-negative":"_purpur-button--tertiary-purple-negative_w455q_166","purpur-button--text-negative":"_purpur-button--text-negative_w455q_181","purpur-button--text":"_purpur-button--text_w455q_181"},Vn=Un.bind(zn),L="purpur-button",Hn=({children:e,className:t,["data-testid"]:r,disabled:o=!1,fullWidth:a=!1,iconOnly:n,loading:i=!1,negative:u=!1,onClick:p,size:d="md",variant:f,type:v="button",...h},g)=>{if(n&&f==="destructive")return null;const b=Vn([L,`${L}--${u?`${f}-negative`:f}`,`${L}--${d}`],{[`${L}--icon-only`]:n,[`${L}--negative`]:u,[`${L}--full-width`]:a,[`${L}--disabled`]:o||i},t),l=_=>{o||i?_.preventDefault():p&&p(_)},m=!!h["aria-disabled"]||o||i;return c.jsxs("button",{className:b,"data-testid":r,type:v,ref:g,"aria-disabled":m,onClick:l,...h,children:[i&&c.jsx(Fn,{size:d===Dn.LG?"xs":"xxs",negative:u,disabled:m})," ",e]})},Wt=O.forwardRef(Hn);Wt.displayName="Button";function Gn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ke={exports:{}};/*!
53
+ */var Ke;function qn(){return Ke||(Ke=1,function(e){(function(){var t={}.hasOwnProperty;function r(){for(var n="",i=0;i<arguments.length;i++){var u=arguments[i];u&&(n=a(n,o.call(this,u)))}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 i="";for(var u in n)t.call(n,u)&&n[u]&&(i=a(i,this&&this[u]||u));return i}function a(n,i){return i?n?n+" "+i:n+i:n}e.exports?(r.default=r,e.exports=r):window.classNames=r})()}(ze)),ze.exports}var Bn=qn();const Un=Wn(Bn),Vn={"purpur-button":"_purpur-button_w455q_1","purpur-button--xs":"_purpur-button--xs_w455q_33","purpur-button--icon-only":"_purpur-button--icon-only_w455q_36","purpur-button--sm":"_purpur-button--sm_w455q_39","purpur-button--md":"_purpur-button--md_w455q_45","purpur-button--lg":"_purpur-button--lg_w455q_51","purpur-button--full-width":"_purpur-button--full-width_w455q_57","purpur-button--primary":"_purpur-button--primary_w455q_60","purpur-button--disabled":"_purpur-button--disabled_w455q_64","purpur-button--primary-negative":"_purpur-button--primary-negative_w455q_70","purpur-button--secondary":"_purpur-button--secondary_w455q_82","purpur-button--secondary-negative":"_purpur-button--secondary-negative_w455q_93","purpur-button--expressive":"_purpur-button--expressive_w455q_104","purpur-button--expressive-negative":"_purpur-button--expressive-negative_w455q_114","purpur-button--negative":"_purpur-button--negative_w455q_126","purpur-button--destructive":"_purpur-button--destructive_w455q_133","purpur-button--destructive-negative":"_purpur-button--destructive-negative_w455q_143","purpur-button--tertiary-purple":"_purpur-button--tertiary-purple_w455q_153","purpur-button--tertiary-purple-negative":"_purpur-button--tertiary-purple-negative_w455q_166","purpur-button--text-negative":"_purpur-button--text-negative_w455q_181","purpur-button--text":"_purpur-button--text_w455q_181"},Hn=Un.bind(Vn),L="purpur-button",zn=({children:e,className:t,["data-testid"]:r,disabled:o=!1,fullWidth:a=!1,iconOnly:n,loading:i=!1,negative:u=!1,onClick:p,size:d="md",variant:f,type:v="button",...h},g)=>{if(n&&f==="destructive")return null;const b=Hn([L,`${L}--${u?`${f}-negative`:f}`,`${L}--${d}`],{[`${L}--icon-only`]:n,[`${L}--negative`]:u,[`${L}--full-width`]:a,[`${L}--disabled`]:o||i},t),l=_=>{o||i?_.preventDefault():p&&p(_)},m=!!h["aria-disabled"]||o||i;return c.jsxs("button",{className:b,"data-testid":r,type:v,ref:g,"aria-disabled":m,onClick:l,...h,children:[i&&c.jsx(Fn,{size:d===jn.LG?"xs":"xxs",negative:u,disabled:m})," ",e]})},Wt=O.forwardRef(zn);Wt.displayName="Button";function Kn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ge={exports:{}};/*!
54
54
  Copyright (c) 2018 Jed Watson.
55
55
  Licensed under the MIT License (MIT), see
56
56
  http://jedwatson.github.io/classnames
57
- */var Ye;function Kn(){return Ye||(Ye=1,function(e){(function(){var t={}.hasOwnProperty;function r(){for(var n="",i=0;i<arguments.length;i++){var u=arguments[i];u&&(n=a(n,o(u)))}return n}function o(n){if(typeof n=="string"||typeof n=="number")return n;if(typeof n!="object")return"";if(Array.isArray(n))return r.apply(null,n);if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]"))return n.toString();var i="";for(var u in n)t.call(n,u)&&n[u]&&(i=a(i,u));return i}function a(n,i){return i?n?n+" "+i:n+i:n}e.exports?(r.default=r,e.exports=r):window.classNames=r})()}(Ke)),Ke.exports}var Yn=Kn();const Xn=Gn(Yn),re={"purpur-heading":"_purpur-heading_k9fhq_1","purpur-heading--hyphens":"_purpur-heading--hyphens_k9fhq_8","purpur-heading--negative":"_purpur-heading--negative_k9fhq_11","purpur-heading--subsection-100":"_purpur-heading--subsection-100_k9fhq_14","purpur-heading--title-100":"_purpur-heading--title-100_k9fhq_20","purpur-heading--title-200":"_purpur-heading--title-200_k9fhq_26","purpur-heading--title-300":"_purpur-heading--title-300_k9fhq_32","purpur-heading--title-400":"_purpur-heading--title-400_k9fhq_38","purpur-heading--title-500":"_purpur-heading--title-500_k9fhq_44","purpur-heading--title-600":"_purpur-heading--title-600_k9fhq_50","purpur-heading--title-700":"_purpur-heading--title-700_k9fhq_56","purpur-heading--display-25":"_purpur-heading--display-25_k9fhq_62","purpur-heading--display-50":"_purpur-heading--display-50_k9fhq_68","purpur-heading--display-100":"_purpur-heading--display-100_k9fhq_74","purpur-heading--display-200":"_purpur-heading--display-200_k9fhq_80"},Zn={TITLE100:"title-100"},ne="purpur-heading",qt=({children:e,className:t="",enableHyphenation:r=!1,negative:o=!1,tag:a,variant:n=Zn.TITLE100,...i})=>{const u=a,p=Xn([t,re[ne],re[`${ne}--${n}`],{[re[`${ne}--hyphens`]]:r,[re[`${ne}--negative`]]:o}]);return c.jsx(u,{className:p,...i,children:e})};qt.displayName="Heading";function Qn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Xe={exports:{}};/*!
57
+ */var Ye;function Gn(){return Ye||(Ye=1,function(e){(function(){var t={}.hasOwnProperty;function r(){for(var n="",i=0;i<arguments.length;i++){var u=arguments[i];u&&(n=a(n,o(u)))}return n}function o(n){if(typeof n=="string"||typeof n=="number")return n;if(typeof n!="object")return"";if(Array.isArray(n))return r.apply(null,n);if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]"))return n.toString();var i="";for(var u in n)t.call(n,u)&&n[u]&&(i=a(i,u));return i}function a(n,i){return i?n?n+" "+i:n+i:n}e.exports?(r.default=r,e.exports=r):window.classNames=r})()}(Ge)),Ge.exports}var Yn=Gn();const Xn=Kn(Yn),re={"purpur-heading":"_purpur-heading_k9fhq_1","purpur-heading--hyphens":"_purpur-heading--hyphens_k9fhq_8","purpur-heading--negative":"_purpur-heading--negative_k9fhq_11","purpur-heading--subsection-100":"_purpur-heading--subsection-100_k9fhq_14","purpur-heading--title-100":"_purpur-heading--title-100_k9fhq_20","purpur-heading--title-200":"_purpur-heading--title-200_k9fhq_26","purpur-heading--title-300":"_purpur-heading--title-300_k9fhq_32","purpur-heading--title-400":"_purpur-heading--title-400_k9fhq_38","purpur-heading--title-500":"_purpur-heading--title-500_k9fhq_44","purpur-heading--title-600":"_purpur-heading--title-600_k9fhq_50","purpur-heading--title-700":"_purpur-heading--title-700_k9fhq_56","purpur-heading--display-25":"_purpur-heading--display-25_k9fhq_62","purpur-heading--display-50":"_purpur-heading--display-50_k9fhq_68","purpur-heading--display-100":"_purpur-heading--display-100_k9fhq_74","purpur-heading--display-200":"_purpur-heading--display-200_k9fhq_80"},Zn={TITLE100:"title-100"},ne="purpur-heading",qt=({children:e,className:t="",enableHyphenation:r=!1,negative:o=!1,tag:a,variant:n=Zn.TITLE100,...i})=>{const u=a,p=Xn([t,re[ne],re[`${ne}--${n}`],{[re[`${ne}--hyphens`]]:r,[re[`${ne}--negative`]]:o}]);return c.jsx(u,{className:p,...i,children:e})};qt.displayName="Heading";function Qn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Xe={exports:{}};/*!
58
58
  Copyright (c) 2018 Jed Watson.
59
59
  Licensed under the MIT License (MIT), see
60
60
  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 et;function lo(){return et||(et=1,function(e){(function(){var t={}.hasOwnProperty;function r(){for(var n="",i=0;i<arguments.length;i++){var u=arguments[i];u&&(n=a(n,o(u)))}return n}function o(n){if(typeof n=="string"||typeof n=="number")return n;if(typeof n!="object")return"";if(Array.isArray(n))return r.apply(null,n);if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]"))return n.toString();var i="";for(var u in n)t.call(n,u)&&n[u]&&(i=a(i,u));return i}function a(n,i){return i?n?n+" "+i:n+i:n}e.exports?(r.default=r,e.exports=r):window.classNames=r})()}(Je)),Je.exports}var po=lo();const fo=co(po),Y={"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"},vo={PARAGRAPH100:"paragraph-100"},X="purpur-paragraph",zt=({["data-testid"]:e,children:t,className:r,disabled:o,enableHyphenation:a=!1,negative:n=!1,variant:i=vo.PARAGRAPH100,...u})=>{const p=fo([r,Y[X],Y[`${X}--${i}`],{[Y[`${X}--hyphens`]]:a,[Y[`${X}--disabled`]]:o,[Y[`${X}--negative`]]:n}]);return c.jsx("p",{...u,className:p,"data-testid":e,children:t})};zt.displayName="Paragraph";function tt(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ho(...e){return t=>{let r=!1;const o=e.map(a=>{const n=tt(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():tt(e[a],null)}}}}var Vt=s.forwardRef((e,t)=>{const{children:r,...o}=e,a=s.Children.toArray(r),n=a.find(go);if(n){const i=n.props.children,u=a.map(p=>p===n?s.Children.count(i)>1?s.Children.only(null):s.isValidElement(i)?i.props.children:null:p);return c.jsx(xe,{...o,ref:t,children:s.isValidElement(i)?s.cloneElement(i,void 0,u):null})}return c.jsx(xe,{...o,ref:t,children:r})});Vt.displayName="Slot";var xe=s.forwardRef((e,t)=>{const{children:r,...o}=e;if(s.isValidElement(r)){const a=yo(r),n=_o(o,r.props);return r.type!==s.Fragment&&(n.ref=t?ho(t,a):a),s.cloneElement(r,n)}return s.Children.count(r)>1?s.Children.only(null):null});xe.displayName="SlotClone";var mo=({children:e})=>c.jsx(c.Fragment,{children:e});function go(e){return s.isValidElement(e)&&e.type===mo}function _o(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)=>{n(...i),a(...i)}:a&&(r[o]=a):o==="style"?r[o]={...a,...n}:o==="className"&&(r[o]=[a,n].filter(Boolean).join(" "))}return{...e,...r}}function yo(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 bo=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],wo=bo.reduce((e,t)=>{const r=s.forwardRef((o,a)=>{const{asChild:n,...i}=o,u=n?Vt:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(u,{...i,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Eo="VisuallyHidden",Ht=s.forwardRef((e,t)=>c.jsx(wo.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}}));Ht.displayName=Eo;var xo=Ht;const So=({asChild:e,children:t,className:r="",["data-testid"]:o})=>c.jsx(xo,{asChild:e,"data-testid":o,className:r,children:t});function Co(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ye={exports:{}};/*!
65
+ */var et;function lo(){return et||(et=1,function(e){(function(){var t={}.hasOwnProperty;function r(){for(var n="",i=0;i<arguments.length;i++){var u=arguments[i];u&&(n=a(n,o(u)))}return n}function o(n){if(typeof n=="string"||typeof n=="number")return n;if(typeof n!="object")return"";if(Array.isArray(n))return r.apply(null,n);if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]"))return n.toString();var i="";for(var u in n)t.call(n,u)&&n[u]&&(i=a(i,u));return i}function a(n,i){return i?n?n+" "+i:n+i:n}e.exports?(r.default=r,e.exports=r):window.classNames=r})()}(Je)),Je.exports}var po=lo();const fo=co(po),Y={"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"},vo={PARAGRAPH100:"paragraph-100"},X="purpur-paragraph",Vt=({["data-testid"]:e,children:t,className:r,disabled:o,enableHyphenation:a=!1,negative:n=!1,variant:i=vo.PARAGRAPH100,...u})=>{const p=fo([r,Y[X],Y[`${X}--${i}`],{[Y[`${X}--hyphens`]]:a,[Y[`${X}--disabled`]]:o,[Y[`${X}--negative`]]:n}]);return c.jsx("p",{...u,className:p,"data-testid":e,children:t})};Vt.displayName="Paragraph";function tt(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ho(...e){return t=>{let r=!1;const o=e.map(a=>{const n=tt(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():tt(e[a],null)}}}}var Ht=s.forwardRef((e,t)=>{const{children:r,...o}=e,a=s.Children.toArray(r),n=a.find(go);if(n){const i=n.props.children,u=a.map(p=>p===n?s.Children.count(i)>1?s.Children.only(null):s.isValidElement(i)?i.props.children:null:p);return c.jsx(xe,{...o,ref:t,children:s.isValidElement(i)?s.cloneElement(i,void 0,u):null})}return c.jsx(xe,{...o,ref:t,children:r})});Ht.displayName="Slot";var xe=s.forwardRef((e,t)=>{const{children:r,...o}=e;if(s.isValidElement(r)){const a=yo(r),n=_o(o,r.props);return r.type!==s.Fragment&&(n.ref=t?ho(t,a):a),s.cloneElement(r,n)}return s.Children.count(r)>1?s.Children.only(null):null});xe.displayName="SlotClone";var mo=({children:e})=>c.jsx(c.Fragment,{children:e});function go(e){return s.isValidElement(e)&&e.type===mo}function _o(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)=>{n(...i),a(...i)}:a&&(r[o]=a):o==="style"?r[o]={...a,...n}:o==="className"&&(r[o]=[a,n].filter(Boolean).join(" "))}return{...e,...r}}function yo(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 bo=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],wo=bo.reduce((e,t)=>{const r=s.forwardRef((o,a)=>{const{asChild:n,...i}=o,u=n?Ht:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(u,{...i,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Eo="VisuallyHidden",zt=s.forwardRef((e,t)=>c.jsx(wo.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}}));zt.displayName=Eo;var xo=zt;const So=({asChild:e,children:t,className:r="",["data-testid"]:o})=>c.jsx(xo,{asChild:e,"data-testid":o,className:r,children:t});function Co(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 rt;function No(){return rt||(rt=1,function(e){(function(){var t={}.hasOwnProperty;function r(){for(var n="",i=0;i<arguments.length;i++){var u=arguments[i];u&&(n=a(n,o.call(this,u)))}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 i="";for(var u in n)t.call(n,u)&&n[u]&&(i=a(i,this&&this[u]||u));return i}function a(n,i){return i?n?n+" "+i:n+i:n}e.exports?(r.default=r,e.exports=r):window.classNames=r})()}(ye)),ye.exports}var Po=No();const Oo=Co(Po),Ro="_fadeIn_4aird_1",jo={"purpur-modal-content":"_purpur-modal-content_4aird_1",fadeIn:Ro,"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"},nt=e=>e.showCloseButton===!0,P=Oo.bind(jo),C="purpur-modal-content",Ao=O.forwardRef(({["data-testid"]:e,actions:t,children:r,className:o,description:a,disableCloseOnClickOutside:n,hideDescription:i,image:u,stickyButtons:p=!0,title:d,notification:f=void 0,zIndex:v,onCloseAutoFocus:h,...g},b)=>{const{closeButtonAriaLabel:l,showCloseButton:m,..._}=g,[S,w]=O.useState(!1),[E,x]=O.useState(0),N=O.useRef(null),y=O.useRef(null),j=P([C,{[`${C}--with-image`]:!!u},{[`${C}--overflow`]:S},{[`${C}--sticky-footer`]:p},o]),R=I=>e?`${e} ${I}`:void 0,H=I=>{n&&I.preventDefault()},q=O.useCallback(()=>{if(!N.current||!y.current)return;const I=window.getComputedStyle(N.current,null),Kt=parseFloat(I.getPropertyValue("height")),Yt=y.current.offsetHeight;w(Kt<Yt),x((N.current.offsetWidth??0)-(N.current.clientWidth??0))},[]),Gt=I=>{n&&!m&&I.preventDefault()};return O.useEffect(()=>(window.addEventListener("resize",q),()=>{window.removeEventListener("resize",q)}),[q]),O.useEffect(()=>{q()},[f,r,q]),c.jsxs(Pn,{children:[c.jsx(On,{className:P(`${C}__overlay`),style:{zIndex:v}}),c.jsxs(Rn,{..._,className:j,"data-testid":e,ref:b,...!a&&{"aria-describedby":void 0},onPointerDownOutside:H,onOpenAutoFocus:q,onEscapeKeyDown:Gt,onCloseAutoFocus:h,style:{zIndex:`calc(${v} + 1)`},children:[c.jsxs("div",{ref:N,className:P(`${C}__wrapper`),children:[nt(g)&&l&&u&&c.jsx(ot,{"aria-label":l,hasImage:!0,scrollbarWidth:E,"data-testid":R("close-button")}),c.jsxs("div",{ref:y,className:P(`${C}__wrapper-inner`),children:[c.jsxs("div",{className:P(`${C}__header`),children:[nt(g)&&l&&!u&&c.jsx(ot,{"aria-label":l,"data-testid":R("close-button")}),c.jsx(jn,{asChild:!0,className:P(`${C}__title`),"data-testid":R("title"),children:c.jsx(qt,{tag:"h2",variant:"title-200",children:d})})]}),u&&c.jsx("div",{className:P(`${C}__image-wrapper`),"data-testid":R("image"),children:u}),c.jsx("div",{className:P(`${C}__body`),children:c.jsxs("div",{className:P(`${C}__body-inner`),children:[a&&i&&c.jsx(So,{asChild:!0,children:c.jsx(Be,{"data-testid":R("description"),children:a})}),a&&!i&&c.jsx(Be,{asChild:!0,className:P(`${C}__description`),"data-testid":R("description"),children:c.jsx(zt,{variant:"paragraph-100",children:a})}),c.jsx("div",{children:r}),!p&&c.jsx(at,{actions:t,notification:f})]})})]})]}),p&&c.jsx(at,{actions:t,notification:f})]})]})}),ot=({["aria-label"]:e,hasImage:t,scrollbarWidth:r,["data-testid"]:o})=>c.jsx(An,{asChild:!0,children:c.jsx(Wt,{variant:t?"primary":"tertiary-purple",negative:t,size:"sm",iconOnly:!0,"aria-label":e,className:P(`${C}__close-button`),style:{right:`calc(var(--purpur-spacing-100) + ${r||0}px)`},"data-testid":o,children:c.jsx(Ut,{})})}),at=({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?c.jsxs("div",{className:P(`${C}__actions`),children:[c.jsx("div",{className:P(`${C}__actions-buttons`),"data-testid":"modal actions",children:e}),t&&c.jsx("div",{className:P(`${C}__notification`),ref:r,children:t}),c.jsx("span",{className:P(`${C}__actions-separator`)})]}):null},Do=O.forwardRef(({["data-testid"]:e,children:t,className:r,...o},a)=>c.jsx(Nn,{asChild:!0,ref:a,"data-testid":e,className:r,...o,children:t})),le=({["data-testid"]:e,children:t,open:r,onOpenChange:o})=>c.jsx(Cn,{open:r,onOpenChange:o,"data-testid":e,children:t});le.Trigger=Do;le.Content=Ao;le.displayName="Modal";exports.Modal=le;
69
+ */var rt;function No(){return rt||(rt=1,function(e){(function(){var t={}.hasOwnProperty;function r(){for(var n="",i=0;i<arguments.length;i++){var u=arguments[i];u&&(n=a(n,o.call(this,u)))}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 i="";for(var u in n)t.call(n,u)&&n[u]&&(i=a(i,this&&this[u]||u));return i}function a(n,i){return i?n?n+" "+i:n+i:n}e.exports?(r.default=r,e.exports=r):window.classNames=r})()}(ye)),ye.exports}var Po=No();const Oo=Co(Po),Ro="_fadeIn_4aird_1",Ao={"purpur-modal-content":"_purpur-modal-content_4aird_1",fadeIn:Ro,"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"},nt=e=>e.showCloseButton===!0,P=Oo.bind(Ao),C="purpur-modal-content",Do=O.forwardRef(({["data-testid"]:e,actions:t,children:r,className:o,description:a,disableCloseOnClickOutside:n,hideDescription:i,image:u,stickyButtons:p=!0,title:d,notification:f=void 0,zIndex:v,onCloseAutoFocus:h,...g},b)=>{const{closeButtonAriaLabel:l,showCloseButton:m,..._}=g,[S,w]=O.useState(!1),[E,x]=O.useState(0),N=O.useRef(null),y=O.useRef(null),A=P([C,{[`${C}--with-image`]:!!u},{[`${C}--overflow`]:S},{[`${C}--sticky-footer`]:p},o]),R=I=>e?`${e} ${I}`:void 0,z=I=>{n&&I.preventDefault()},q=O.useCallback(()=>{if(!N.current||!y.current)return;const I=window.getComputedStyle(N.current,null),Gt=parseFloat(I.getPropertyValue("height")),Yt=y.current.offsetHeight;w(Gt<Yt),x((N.current.offsetWidth??0)-(N.current.clientWidth??0))},[]),Kt=I=>{n&&!m&&I.preventDefault()};return O.useEffect(()=>(window.addEventListener("resize",q),()=>{window.removeEventListener("resize",q)}),[q]),O.useEffect(()=>{q()},[f,r,q]),c.jsxs(Pn,{children:[c.jsx(On,{className:P(`${C}__overlay`),style:{zIndex:v}}),c.jsxs(Rn,{..._,className:A,"data-testid":e,ref:b,...!a&&{"aria-describedby":void 0},onPointerDownOutside:z,onOpenAutoFocus:q,onEscapeKeyDown:Kt,onCloseAutoFocus:h,style:{zIndex:`calc(${v} + 1)`},children:[c.jsxs("div",{ref:N,className:P(`${C}__wrapper`),children:[nt(g)&&l&&u&&c.jsx(ot,{"aria-label":l,hasImage:!0,scrollbarWidth:E,"data-testid":R("close-button")}),c.jsxs("div",{ref:y,className:P(`${C}__wrapper-inner`),children:[c.jsxs("div",{className:P(`${C}__header`),children:[nt(g)&&l&&!u&&c.jsx(ot,{"aria-label":l,"data-testid":R("close-button")}),c.jsx(An,{asChild:!0,className:P(`${C}__title`),"data-testid":R("title"),children:c.jsx(qt,{tag:"h2",variant:"title-200",children:d})})]}),u&&c.jsx("div",{className:P(`${C}__image-wrapper`),"data-testid":R("image"),children:u}),c.jsx("div",{className:P(`${C}__body`),children:c.jsxs("div",{className:P(`${C}__body-inner`),children:[a&&i&&c.jsx(So,{asChild:!0,children:c.jsx(Be,{"data-testid":R("description"),children:a})}),a&&!i&&c.jsx(Be,{asChild:!0,className:P(`${C}__description`),"data-testid":R("description"),children:c.jsx(Vt,{variant:"paragraph-100",children:a})}),c.jsx("div",{children:r}),!p&&c.jsx(at,{actions:t,notification:f})]})})]})]}),p&&c.jsx(at,{actions:t,notification:f})]})]})}),ot=({["aria-label"]:e,hasImage:t,scrollbarWidth:r,["data-testid"]:o})=>c.jsx(Dn,{asChild:!0,children:c.jsx(Wt,{variant:t?"primary":"tertiary-purple",negative:t,size:"sm",iconOnly:!0,"aria-label":e,className:P(`${C}__close-button`),style:{right:`calc(var(--purpur-spacing-100) + ${r||0}px)`},"data-testid":o,children:c.jsx(Ut,{})})}),at=({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?c.jsxs("div",{className:P(`${C}__actions`),children:[c.jsx("div",{className:P(`${C}__actions-buttons`),"data-testid":"modal actions",children:e}),t&&c.jsx("div",{className:P(`${C}__notification`),ref:r,children:t}),c.jsx("span",{className:P(`${C}__actions-separator`)})]}):null},jo=O.forwardRef(({["data-testid"]:e,children:t,className:r,...o},a)=>c.jsx(Nn,{asChild:!0,ref:a,"data-testid":e,className:r,...o,children:t})),le=({["data-testid"]:e,children:t,open:r,onOpenChange:o})=>c.jsx(Cn,{open:r,onOpenChange:o,"data-testid":e,children:t});le.Trigger=jo;le.Content=Do;le.displayName="Modal";exports.Modal=le;
70
70
  //# sourceMappingURL=modal.cjs.js.map