@purpurds/modal 8.2.2 → 8.2.3

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/modal.cjs.js CHANGED
@@ -1,70 +1,70 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),O=require("react"),at=require("react-dom");function it(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=it(O),Yt=it(at);function I(e,t,{checkForDefaultPrevented:r=!0}={}){return function(a){if(e==null||e(a),r===!1||!a.defaultPrevented)return t==null?void 0:t(a)}}function Oe(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ut(...e){return t=>{let r=!1;const o=e.map(a=>{const n=Oe(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():Oe(e[a],null)}}}}function W(...e){return s.useCallback(ut(...e),e)}function Xt(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 Zt(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:m,...b}=v,l=((_=h==null?void 0:h[e])==null?void 0:_[p])||u,g=s.useMemo(()=>b,Object.values(b));return c.jsx(l.Provider,{value:g,children:m})};d.displayName=n+"Provider";function f(v,h){var l;const m=((l=h==null?void 0:h[e])==null?void 0:l[p])||u,b=s.useContext(m);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,Qt(a,...t)]}function Qt(...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 ae=globalThis!=null&&globalThis.document?s.useLayoutEffect:()=>{},Jt=s.useId||(()=>{}),er=0;function le(e){const[t,r]=s.useState(Jt());return ae(()=>{r(o=>o??String(er++))},[e]),e||(t?`radix-${t}`:"")}function F(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 tr({prop:e,defaultProp:t,onChange:r=()=>{}}){const[o,a]=rr({defaultProp:t,onChange:r}),n=e!==void 0,i=n?e:o,u=F(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 rr({defaultProp:e,onChange:t}){const r=s.useState(e),[o]=r,a=s.useRef(o),n=F(t);return s.useEffect(()=>{a.current!==o&&(n(o),a.current=o)},[o,a,n]),r}var xe=s.forwardRef((e,t)=>{const{children:r,...o}=e,a=s.Children.toArray(r),n=a.find(or);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(ye,{...o,ref:t,children:s.isValidElement(i)?s.cloneElement(i,void 0,u):null})}return c.jsx(ye,{...o,ref:t,children:r})});xe.displayName="Slot";var ye=s.forwardRef((e,t)=>{const{children:r,...o}=e;if(s.isValidElement(r)){const a=ir(r),n=ar(o,r.props);return r.type!==s.Fragment&&(n.ref=t?ut(t,a):a),s.cloneElement(r,n)}return s.Children.count(r)>1?s.Children.only(null):null});ye.displayName="SlotClone";var nr=({children:e})=>c.jsx(c.Fragment,{children:e});function or(e){return s.isValidElement(e)&&e.type===nr}function ar(e,t){const r={...t};for(const o in t){const a=e[o],n=t[o];/^on[A-Z]/.test(o)?a&&n?r[o]=(...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 ir(e){var o,a;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var ur=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],M=ur.reduce((e,t)=>{const r=s.forwardRef((o,a)=>{const{asChild:n,...i}=o,u=n?xe: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 sr(e,t){e&&Yt.flushSync(()=>e.dispatchEvent(t))}function cr(e,t=globalThis==null?void 0:globalThis.document){const r=F(e);s.useEffect(()=>{const o=a=>{a.key==="Escape"&&r(a)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[r,t])}var lr="DismissableLayer",be="dismissableLayer.update",dr="dismissableLayer.pointerDownOutside",pr="dismissableLayer.focusOutside",Re,st=s.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ct=s.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:n,onInteractOutside:i,onDismiss:u,...p}=e,d=s.useContext(st),[f,v]=s.useState(null),h=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=s.useState({}),b=W(t,y=>v(y)),l=Array.from(d.layers),[g]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),_=l.indexOf(g),S=f?l.indexOf(f):-1,w=d.layersWithOutsidePointerEventsDisabled.size>0,E=S>=_,x=hr(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 cr(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&&(Re=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=Re)}},[f,h,r,d]),s.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),Ae())},[f,d]),s.useEffect(()=>{const y=()=>m({});return document.addEventListener(be,y),()=>document.removeEventListener(be,y)},[]),c.jsx(M.div,{...p,ref:b,style:{pointerEvents:w?E?"auto":"none":void 0,...e.style},onFocusCapture:I(e.onFocusCapture,N.onFocusCapture),onBlurCapture:I(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:I(e.onPointerDownCapture,x.onPointerDownCapture)})});ct.displayName=lr;var fr="DismissableLayerBranch",vr=s.forwardRef((e,t)=>{const r=s.useContext(st),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})});vr.displayName=fr;function hr(e,t=globalThis==null?void 0:globalThis.document){const r=F(e),o=s.useRef(!1),a=s.useRef(()=>{});return s.useEffect(()=>{const n=u=>{if(u.target&&!o.current){let p=function(){lt(dr,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=F(e),o=s.useRef(!1);return s.useEffect(()=>{const a=n=>{n.target&&!o.current&&lt(pr,r,{originalEvent:n},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,r]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Ae(){const e=new CustomEvent(be);document.dispatchEvent(e)}function lt(e,t,r,{discrete:o}){const a=r.originalEvent.target,n=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&a.addEventListener(e,t,{once:!0}),o?sr(a,n):a.dispatchEvent(n)}var de="focusScope.autoFocusOnMount",pe="focusScope.autoFocusOnUnmount",De={bubbles:!1,cancelable:!0},mr="FocusScope",dt=s.forwardRef((e,t)=>{const{loop:r=!1,trapped:o=!1,onMountAutoFocus:a,onUnmountAutoFocus:n,...i}=e,[u,p]=s.useState(null),d=F(a),f=F(n),v=s.useRef(null),h=W(t,l=>p(l)),m=s.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;s.useEffect(()=>{if(o){let l=function(w){if(m.paused||!u)return;const E=w.target;u.contains(E)?v.current=E:$(v.current,{select:!0})},g=function(w){if(m.paused||!u)return;const E=w.relatedTarget;E!==null&&(u.contains(E)||$(v.current,{select:!0}))},_=function(w){if(document.activeElement===document.body)for(const x of w)x.removedNodes.length>0&&$(u)};document.addEventListener("focusin",l),document.addEventListener("focusout",g);const S=new MutationObserver(_);return u&&S.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",l),document.removeEventListener("focusout",g),S.disconnect()}}},[o,u,m.paused]),s.useEffect(()=>{if(u){Te.add(m);const l=document.activeElement;if(!u.contains(l)){const _=new CustomEvent(de,De);u.addEventListener(de,d),u.dispatchEvent(_),_.defaultPrevented||(_r(xr(pt(u)),{select:!0}),document.activeElement===l&&$(u))}return()=>{u.removeEventListener(de,d),setTimeout(()=>{const _=new CustomEvent(pe,De);u.addEventListener(pe,f),u.dispatchEvent(_),_.defaultPrevented||$(l??document.body,{select:!0}),u.removeEventListener(pe,f),Te.remove(m)},0)}}},[u,d,f,m]);const b=s.useCallback(l=>{if(!r&&!o||m.paused)return;const g=l.key==="Tab"&&!l.altKey&&!l.ctrlKey&&!l.metaKey,_=document.activeElement;if(g&&_){const S=l.currentTarget,[w,E]=yr(S);w&&E?!l.shiftKey&&_===E?(l.preventDefault(),r&&$(w,{select:!0})):l.shiftKey&&_===w&&(l.preventDefault(),r&&$(E,{select:!0})):_===S&&l.preventDefault()}},[r,o,m.paused]);return c.jsx(M.div,{tabIndex:-1,...i,ref:h,onKeyDown:b})});dt.displayName=mr;function _r(e,{select:t=!1}={}){const r=document.activeElement;for(const o of e)if($(o,{select:t}),document.activeElement!==r)return}function yr(e){const t=pt(e),r=je(t,e),o=je(t.reverse(),e);return[r,o]}function pt(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 je(e,t){for(const r of e)if(!br(r,{upTo:t}))return r}function br(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function wr(e){return e instanceof HTMLInputElement&&"select"in e}function $(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&wr(e)&&t&&e.select()}}var Te=Er();function Er(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=Me(e,t),e.unshift(t)},remove(t){var r;e=Me(e,t),(r=e[0])==null||r.resume()}}}function Me(e,t){const r=[...e],o=r.indexOf(t);return o!==-1&&r.splice(o,1),r}function xr(e){return e.filter(t=>t.tagName!=="A")}var Sr="Portal",ft=s.forwardRef((e,t)=>{var u;const{container:r,...o}=e,[a,n]=s.useState(!1);ae(()=>n(!0),[]);const i=r||a&&((u=globalThis==null?void 0:globalThis.document)==null?void 0:u.body);return i?at.createPortal(c.jsx(M.div,{...o,ref:t}),i):null});ft.displayName=Sr;function Cr(e,t){return s.useReducer((r,o)=>t[r][o]??r,e)}var ue=e=>{const{present:t,children:r}=e,o=Nr(t),a=typeof r=="function"?r({present:o.isPresent}):s.Children.only(r),n=W(o.ref,Pr(a));return typeof r=="function"||o.isPresent?s.cloneElement(a,{ref:n}):null};ue.displayName="Presence";function Nr(e){const[t,r]=s.useState(),o=s.useRef({}),a=s.useRef(e),n=s.useRef("none"),i=e?"mounted":"unmounted",[u,p]=Cr(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return s.useEffect(()=>{const d=X(o.current);n.current=u==="mounted"?d:"none"},[u]),ae(()=>{const d=o.current,f=a.current;if(f!==e){const h=n.current,m=X(d);e?p("MOUNT"):m==="none"||(d==null?void 0:d.display)==="none"?p("UNMOUNT"):p(f&&h!==m?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,p]),ae(()=>{if(t){let d;const f=t.ownerDocument.defaultView??window,v=m=>{const l=X(o.current).includes(m.animationName);if(m.target===t&&l&&(p("ANIMATION_END"),!a.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",d=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},h=m=>{m.target===t&&(n.current=X(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 X(e){return(e==null?void 0:e.animationName)||"none"}function Pr(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 fe=0;function Or(){s.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??$e()),document.body.insertAdjacentElement("beforeend",e[1]??$e()),fe++,()=>{fe===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),fe--}},[])}function $e(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var T=function(){return T=Object.assign||function(t){for(var r,o=1,a=arguments.length;o<a;o++){r=arguments[o];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},T.apply(this,arguments)};function vt(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,o=Object.getOwnPropertySymbols(e);a<o.length;a++)t.indexOf(o[a])<0&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(r[o[a]]=e[o[a]]);return r}function Rr(e,t,r){if(r||arguments.length===2)for(var o=0,a=t.length,n;o<a;o++)(n||!(o in t))&&(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}var ne="right-scroll-bar-position",oe="width-before-scroll-bar",Ar="with-scroll-bars-hidden",Dr="--removed-body-scroll-bar-size";function ve(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function jr(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,Ie=new WeakMap;function Mr(e,t){var r=jr(null,function(o){return e.forEach(function(a){return ve(a,o)})});return Tr(function(){var o=Ie.get(r);if(o){var a=new Set(o),n=new Set(e),i=r.current;a.forEach(function(u){n.has(u)||ve(u,null)}),n.forEach(function(u){a.has(u)||ve(u,i)})}Ie.set(r,e)},[e]),r}function $r(e){return e}function Ir(e,t){t===void 0&&(t=$r);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 Lr(e){e===void 0&&(e={});var t=Ir(null);return t.options=T({async:!0,ssr:!1},e),t}var ht=function(e){var t=e.sideCar,r=vt(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return s.createElement(o,T({},r))};ht.isSideCarExport=!0;function Fr(e,t){return e.useMedium(t),ht}var gt=Lr(),he=function(){},se=s.forwardRef(function(e,t){var r=s.useRef(null),o=s.useState({onScrollCapture:he,onWheelCapture:he,onTouchMoveCapture:he}),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,m=e.noIsolation,b=e.inert,l=e.allowPinchZoom,g=e.as,_=g===void 0?"div":g,S=e.gapMode,w=vt(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=h,x=Mr([r,t]),N=T(T({},w),a);return s.createElement(s.Fragment,null,f&&s.createElement(E,{sideCar:gt,removeScrollBar:d,shards:v,noIsolation:m,inert:b,setCallbacks:n,allowPinchZoom:!!l,lockRef:r,gapMode:S}),i?s.cloneElement(s.Children.only(u),T(T({},N),{ref:x})):s.createElement(_,T({},N,{className:p,ref:x}),u))});se.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};se.classNames={fullWidth:oe,zeroRight:ne};var kr=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Wr(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=kr();return t&&e.setAttribute("nonce",t),e}function Br(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Ur(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Vr=function(){var e=0,t=null;return{add:function(r){e==0&&(t=Wr())&&(Br(t,r),Ur(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Hr=function(){var e=Vr();return function(t,r){s.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},mt=function(){var e=Hr(),t=function(r){var o=r.styles,a=r.dynamic;return e(o,a),null};return t},qr={left:0,top:0,right:0,gap:0},ge=function(e){return parseInt(e||"",10)||0},zr=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],a=t[e==="padding"?"paddingRight":"marginRight"];return[ge(r),ge(o),ge(a)]},Kr=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return qr;var t=zr(e),r=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-r+t[2]-t[0])}},Gr=mt(),q="data-scroll-locked",Yr=function(e,t,r,o){var a=e.left,n=e.top,i=e.right,u=e.gap;return r===void 0&&(r="margin"),`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react/jsx-runtime"),P=require("react"),rt=require("react-dom");function nt(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const s=nt(P),zt=nt(rt);function I(e,t,{checkForDefaultPrevented:r=!0}={}){return function(a){if(e==null||e(a),r===!1||!a.defaultPrevented)return t==null?void 0:t(a)}}function Ce(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ot(...e){return t=>{let r=!1;const o=e.map(a=>{const n=Ce(a,t);return!r&&typeof n=="function"&&(r=!0),n});if(r)return()=>{for(let a=0;a<o.length;a++){const n=o[a];typeof n=="function"?n():Ce(e[a],null)}}}}function k(...e){return s.useCallback(ot(...e),e)}function Gt(e,t){const r=s.createContext(t),o=n=>{const{children:u,...i}=n,p=s.useMemo(()=>i,Object.values(i));return d.jsx(r.Provider,{value:p,children:u})};o.displayName=e+"Provider";function a(n){const u=s.useContext(r);if(u)return u;if(t!==void 0)return t;throw new Error(`\`${n}\` must be used within \`${e}\``)}return[o,a]}function Kt(e,t=[]){let r=[];function o(n,u){const i=s.createContext(u),p=r.length;r=[...r,u];const c=v=>{var _;const{scope:h,children:m,...b}=v,l=((_=h==null?void 0:h[e])==null?void 0:_[p])||i,g=s.useMemo(()=>b,Object.values(b));return d.jsx(l.Provider,{value:g,children:m})};c.displayName=n+"Provider";function f(v,h){var l;const m=((l=h==null?void 0:h[e])==null?void 0:l[p])||i,b=s.useContext(m);if(b)return b;if(u!==void 0)return u;throw new Error(`\`${v}\` must be used within \`${n}\``)}return[c,f]}const a=()=>{const n=r.map(u=>s.createContext(u));return function(i){const p=(i==null?void 0:i[e])||n;return s.useMemo(()=>({[`__scope${e}`]:{...i,[e]:p}}),[i,p])}};return a.scopeName=e,[o,Yt(a,...t)]}function Yt(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const o=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(n){const u=o.reduce((i,{useScope:p,scopeName:c})=>{const v=p(n)[`__scope${c}`];return{...i,...v}},{});return s.useMemo(()=>({[`__scope${t.scopeName}`]:u}),[u])}};return r.scopeName=t.scopeName,r}var K=globalThis!=null&&globalThis.document?s.useLayoutEffect:()=>{},Xt=s[" useId ".trim().toString()]||(()=>{}),Zt=0;function de(e){const[t,r]=s.useState(Xt());return K(()=>{r(o=>o??String(Zt++))},[e]),e||(t?`radix-${t}`:"")}var Qt=s[" useInsertionEffect ".trim().toString()]||K;function Jt({prop:e,defaultProp:t,onChange:r=()=>{},caller:o}){const[a,n,u]=er({defaultProp:t,onChange:r}),i=e!==void 0,p=i?e:a;{const f=s.useRef(e!==void 0);s.useEffect(()=>{const v=f.current;v!==i&&console.warn(`${o} is changing from ${v?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=i},[i,o])}const c=s.useCallback(f=>{var v;if(i){const h=tr(f)?f(e):f;h!==e&&((v=u.current)==null||v.call(u,h))}else n(f)},[i,e,n,u]);return[p,c]}function er({defaultProp:e,onChange:t}){const[r,o]=s.useState(e),a=s.useRef(r),n=s.useRef(t);return Qt(()=>{n.current=t},[t]),s.useEffect(()=>{var u;a.current!==r&&((u=n.current)==null||u.call(n,r),a.current=r)},[r,a]),[r,o,n]}function tr(e){return typeof e=="function"}function at(e){const t=rr(e),r=s.forwardRef((o,a)=>{const{children:n,...u}=o,i=s.Children.toArray(n),p=i.find(or);if(p){const c=p.props.children,f=i.map(v=>v===p?s.Children.count(c)>1?s.Children.only(null):s.isValidElement(c)?c.props.children:null:v);return d.jsx(t,{...u,ref:a,children:s.isValidElement(c)?s.cloneElement(c,void 0,f):null})}return d.jsx(t,{...u,ref:a,children:n})});return r.displayName=`${e}.Slot`,r}function rr(e){const t=s.forwardRef((r,o)=>{const{children:a,...n}=r;if(s.isValidElement(a)){const u=ir(a),i=ar(n,a.props);return a.type!==s.Fragment&&(i.ref=o?ot(o,u):u),s.cloneElement(a,i)}return s.Children.count(a)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var nr=Symbol("radix.slottable");function or(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===nr}function ar(e,t){const r={...t};for(const o in t){const a=e[o],n=t[o];/^on[A-Z]/.test(o)?a&&n?r[o]=(...i)=>{const p=n(...i);return a(...i),p}:a&&(r[o]=a):o==="style"?r[o]={...a,...n}:o==="className"&&(r[o]=[a,n].filter(Boolean).join(" "))}return{...e,...r}}function ir(e){var o,a;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var ur=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],$=ur.reduce((e,t)=>{const r=at(`Primitive.${t}`),o=s.forwardRef((a,n)=>{const{asChild:u,...i}=a,p=u?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(p,{...i,ref:n})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function sr(e,t){e&&zt.flushSync(()=>e.dispatchEvent(t))}function Y(e){const t=s.useRef(e);return s.useEffect(()=>{t.current=e}),s.useMemo(()=>(...r)=>{var o;return(o=t.current)==null?void 0:o.call(t,...r)},[])}function cr(e,t=globalThis==null?void 0:globalThis.document){const r=Y(e);s.useEffect(()=>{const o=a=>{a.key==="Escape"&&r(a)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[r,t])}var lr="DismissableLayer",be="dismissableLayer.update",dr="dismissableLayer.pointerDownOutside",pr="dismissableLayer.focusOutside",Ne,it=s.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ut=s.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:n,onInteractOutside:u,onDismiss:i,...p}=e,c=s.useContext(it),[f,v]=s.useState(null),h=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=s.useState({}),b=k(t,y=>v(y)),l=Array.from(c.layers),[g]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),_=l.indexOf(g),w=f?l.indexOf(f):-1,E=c.layersWithOutsidePointerEventsDisabled.size>0,x=w>=_,S=hr(y=>{const A=y.target,R=[...c.branches].some(q=>q.contains(A));!x||R||(a==null||a(y),u==null||u(y),y.defaultPrevented||i==null||i())},h),N=gr(y=>{const A=y.target;[...c.branches].some(q=>q.contains(A))||(n==null||n(y),u==null||u(y),y.defaultPrevented||i==null||i())},h);return cr(y=>{w===c.layers.size-1&&(o==null||o(y),!y.defaultPrevented&&i&&(y.preventDefault(),i()))},h),s.useEffect(()=>{if(f)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Ne=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(f)),c.layers.add(f),Oe(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Ne)}},[f,h,r,c]),s.useEffect(()=>()=>{f&&(c.layers.delete(f),c.layersWithOutsidePointerEventsDisabled.delete(f),Oe())},[f,c]),s.useEffect(()=>{const y=()=>m({});return document.addEventListener(be,y),()=>document.removeEventListener(be,y)},[]),d.jsx($.div,{...p,ref:b,style:{pointerEvents:E?x?"auto":"none":void 0,...e.style},onFocusCapture:I(e.onFocusCapture,N.onFocusCapture),onBlurCapture:I(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:I(e.onPointerDownCapture,S.onPointerDownCapture)})});ut.displayName=lr;var fr="DismissableLayerBranch",vr=s.forwardRef((e,t)=>{const r=s.useContext(it),o=s.useRef(null),a=k(t,o);return s.useEffect(()=>{const n=o.current;if(n)return r.branches.add(n),()=>{r.branches.delete(n)}},[r.branches]),d.jsx($.div,{...e,ref:a})});vr.displayName=fr;function hr(e,t=globalThis==null?void 0:globalThis.document){const r=Y(e),o=s.useRef(!1),a=s.useRef(()=>{});return s.useEffect(()=>{const n=i=>{if(i.target&&!o.current){let p=function(){st(dr,r,c,{discrete:!0})};const c={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=p,t.addEventListener("click",a.current,{once:!0})):p()}else t.removeEventListener("click",a.current);o.current=!1},u=window.setTimeout(()=>{t.addEventListener("pointerdown",n)},0);return()=>{window.clearTimeout(u),t.removeEventListener("pointerdown",n),t.removeEventListener("click",a.current)}},[t,r]),{onPointerDownCapture:()=>o.current=!0}}function gr(e,t=globalThis==null?void 0:globalThis.document){const r=Y(e),o=s.useRef(!1);return s.useEffect(()=>{const a=n=>{n.target&&!o.current&&st(pr,r,{originalEvent:n},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,r]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Oe(){const e=new CustomEvent(be);document.dispatchEvent(e)}function st(e,t,r,{discrete:o}){const a=r.originalEvent.target,n=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&a.addEventListener(e,t,{once:!0}),o?sr(a,n):a.dispatchEvent(n)}var pe="focusScope.autoFocusOnMount",fe="focusScope.autoFocusOnUnmount",Pe={bubbles:!1,cancelable:!0},mr="FocusScope",ct=s.forwardRef((e,t)=>{const{loop:r=!1,trapped:o=!1,onMountAutoFocus:a,onUnmountAutoFocus:n,...u}=e,[i,p]=s.useState(null),c=Y(a),f=Y(n),v=s.useRef(null),h=k(t,l=>p(l)),m=s.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;s.useEffect(()=>{if(o){let l=function(E){if(m.paused||!i)return;const x=E.target;i.contains(x)?v.current=x:M(v.current,{select:!0})},g=function(E){if(m.paused||!i)return;const x=E.relatedTarget;x!==null&&(i.contains(x)||M(v.current,{select:!0}))},_=function(E){if(document.activeElement===document.body)for(const S of E)S.removedNodes.length>0&&M(i)};document.addEventListener("focusin",l),document.addEventListener("focusout",g);const w=new MutationObserver(_);return i&&w.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",l),document.removeEventListener("focusout",g),w.disconnect()}}},[o,i,m.paused]),s.useEffect(()=>{if(i){Ae.add(m);const l=document.activeElement;if(!i.contains(l)){const _=new CustomEvent(pe,Pe);i.addEventListener(pe,c),i.dispatchEvent(_),_.defaultPrevented||(_r(xr(lt(i)),{select:!0}),document.activeElement===l&&M(i))}return()=>{i.removeEventListener(pe,c),setTimeout(()=>{const _=new CustomEvent(fe,Pe);i.addEventListener(fe,f),i.dispatchEvent(_),_.defaultPrevented||M(l??document.body,{select:!0}),i.removeEventListener(fe,f),Ae.remove(m)},0)}}},[i,c,f,m]);const b=s.useCallback(l=>{if(!r&&!o||m.paused)return;const g=l.key==="Tab"&&!l.altKey&&!l.ctrlKey&&!l.metaKey,_=document.activeElement;if(g&&_){const w=l.currentTarget,[E,x]=yr(w);E&&x?!l.shiftKey&&_===x?(l.preventDefault(),r&&M(E,{select:!0})):l.shiftKey&&_===E&&(l.preventDefault(),r&&M(x,{select:!0})):_===w&&l.preventDefault()}},[r,o,m.paused]);return d.jsx($.div,{tabIndex:-1,...u,ref:h,onKeyDown:b})});ct.displayName=mr;function _r(e,{select:t=!1}={}){const r=document.activeElement;for(const o of e)if(M(o,{select:t}),document.activeElement!==r)return}function yr(e){const t=lt(e),r=Re(t,e),o=Re(t.reverse(),e);return[r,o]}function lt(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const a=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||a?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Re(e,t){for(const r of e)if(!br(r,{upTo:t}))return r}function br(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function wr(e){return e instanceof HTMLInputElement&&"select"in e}function M(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&wr(e)&&t&&e.select()}}var Ae=Er();function Er(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=De(e,t),e.unshift(t)},remove(t){var r;e=De(e,t),(r=e[0])==null||r.resume()}}}function De(e,t){const r=[...e],o=r.indexOf(t);return o!==-1&&r.splice(o,1),r}function xr(e){return e.filter(t=>t.tagName!=="A")}var Sr="Portal",dt=s.forwardRef((e,t)=>{var i;const{container:r,...o}=e,[a,n]=s.useState(!1);K(()=>n(!0),[]);const u=r||a&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return u?rt.createPortal(d.jsx($.div,{...o,ref:t}),u):null});dt.displayName=Sr;function Cr(e,t){return s.useReducer((r,o)=>t[r][o]??r,e)}var ue=e=>{const{present:t,children:r}=e,o=Nr(t),a=typeof r=="function"?r({present:o.isPresent}):s.Children.only(r),n=k(o.ref,Or(a));return typeof r=="function"||o.isPresent?s.cloneElement(a,{ref:n}):null};ue.displayName="Presence";function Nr(e){const[t,r]=s.useState(),o=s.useRef(null),a=s.useRef(e),n=s.useRef("none"),u=e?"mounted":"unmounted",[i,p]=Cr(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return s.useEffect(()=>{const c=Z(o.current);n.current=i==="mounted"?c:"none"},[i]),K(()=>{const c=o.current,f=a.current;if(f!==e){const h=n.current,m=Z(c);e?p("MOUNT"):m==="none"||(c==null?void 0:c.display)==="none"?p("UNMOUNT"):p(f&&h!==m?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,p]),K(()=>{if(t){let c;const f=t.ownerDocument.defaultView??window,v=m=>{const l=Z(o.current).includes(CSS.escape(m.animationName));if(m.target===t&&l&&(p("ANIMATION_END"),!a.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",c=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},h=m=>{m.target===t&&(n.current=Z(o.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",v),t.addEventListener("animationend",v),()=>{f.clearTimeout(c),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",v),t.removeEventListener("animationend",v)}}else p("ANIMATION_END")},[t,p]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:s.useCallback(c=>{o.current=c?getComputedStyle(c):null,r(c)},[])}}function Z(e){return(e==null?void 0:e.animationName)||"none"}function Or(e){var o,a;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var ve=0;function Pr(){s.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??je()),document.body.insertAdjacentElement("beforeend",e[1]??je()),ve++,()=>{ve===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),ve--}},[])}function je(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var T=function(){return T=Object.assign||function(t){for(var r,o=1,a=arguments.length;o<a;o++){r=arguments[o];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},T.apply(this,arguments)};function pt(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,o=Object.getOwnPropertySymbols(e);a<o.length;a++)t.indexOf(o[a])<0&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(r[o[a]]=e[o[a]]);return r}function Rr(e,t,r){if(r||arguments.length===2)for(var o=0,a=t.length,n;o<a;o++)(n||!(o in t))&&(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}var oe="right-scroll-bar-position",ae="width-before-scroll-bar",Ar="with-scroll-bars-hidden",Dr="--removed-body-scroll-bar-size";function he(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function jr(e,t){var r=P.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(o){var a=r.value;a!==o&&(r.value=o,r.callback(o,a))}}}})[0];return r.callback=t,r.facade}var Tr=typeof window<"u"?s.useLayoutEffect:s.useEffect,Te=new WeakMap;function $r(e,t){var r=jr(null,function(o){return e.forEach(function(a){return he(a,o)})});return Tr(function(){var o=Te.get(r);if(o){var a=new Set(o),n=new Set(e),u=r.current;a.forEach(function(i){n.has(i)||he(i,null)}),n.forEach(function(i){a.has(i)||he(i,u)})}Te.set(r,e)},[e]),r}function Mr(e){return e}function Ir(e,t){t===void 0&&(t=Mr);var r=[],o=!1,a={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(n){var u=t(n,o);return r.push(u),function(){r=r.filter(function(i){return i!==u})}},assignSyncMedium:function(n){for(o=!0;r.length;){var u=r;r=[],u.forEach(n)}r={push:function(i){return n(i)},filter:function(){return r}}},assignMedium:function(n){o=!0;var u=[];if(r.length){var i=r;r=[],i.forEach(n),u=r}var p=function(){var f=u;u=[],f.forEach(n)},c=function(){return Promise.resolve().then(p)};c(),r={push:function(f){u.push(f),c()},filter:function(f){return u=u.filter(f),r}}}};return a}function Lr(e){e===void 0&&(e={});var t=Ir(null);return t.options=T({async:!0,ssr:!1},e),t}var ft=function(e){var t=e.sideCar,r=pt(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return s.createElement(o,T({},r))};ft.isSideCarExport=!0;function Fr(e,t){return e.useMedium(t),ft}var vt=Lr(),ge=function(){},se=s.forwardRef(function(e,t){var r=s.useRef(null),o=s.useState({onScrollCapture:ge,onWheelCapture:ge,onTouchMoveCapture:ge}),a=o[0],n=o[1],u=e.forwardProps,i=e.children,p=e.className,c=e.removeScrollBar,f=e.enabled,v=e.shards,h=e.sideCar,m=e.noRelative,b=e.noIsolation,l=e.inert,g=e.allowPinchZoom,_=e.as,w=_===void 0?"div":_,E=e.gapMode,x=pt(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=h,N=$r([r,t]),y=T(T({},x),a);return s.createElement(s.Fragment,null,f&&s.createElement(S,{sideCar:vt,removeScrollBar:c,shards:v,noRelative:m,noIsolation:b,inert:l,setCallbacks:n,allowPinchZoom:!!g,lockRef:r,gapMode:E}),u?s.cloneElement(s.Children.only(i),T(T({},y),{ref:N})):s.createElement(w,T({},y,{className:p,ref:N}),i))});se.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};se.classNames={fullWidth:ae,zeroRight:oe};var kr=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Wr(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=kr();return t&&e.setAttribute("nonce",t),e}function Br(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Ur(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Vr=function(){var e=0,t=null;return{add:function(r){e==0&&(t=Wr())&&(Br(t,r),Ur(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Hr=function(){var e=Vr();return function(t,r){s.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},ht=function(){var e=Hr(),t=function(r){var o=r.styles,a=r.dynamic;return e(o,a),null};return t},qr={left:0,top:0,right:0,gap:0},me=function(e){return parseInt(e||"",10)||0},zr=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],a=t[e==="padding"?"paddingRight":"marginRight"];return[me(r),me(o),me(a)]},Gr=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return qr;var t=zr(e),r=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-r+t[2]-t[0])}},Kr=ht(),H="data-scroll-locked",Yr=function(e,t,r,o){var a=e.left,n=e.top,u=e.right,i=e.gap;return r===void 0&&(r="margin"),`
2
2
  .`.concat(Ar,` {
3
3
  overflow: hidden `).concat(o,`;
4
- padding-right: `).concat(u,"px ").concat(o,`;
4
+ padding-right: `).concat(i,"px ").concat(o,`;
5
5
  }
6
- body[`).concat(q,`] {
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"&&`
10
10
  padding-left: `.concat(a,`px;
11
11
  padding-top: `).concat(n,`px;
12
- padding-right: `).concat(i,`px;
12
+ padding-right: `).concat(u,`px;
13
13
  margin-left:0;
14
14
  margin-top:0;
15
- margin-right: `).concat(u,"px ").concat(o,`;
16
- `),r==="padding"&&"padding-right: ".concat(u,"px ").concat(o,";")].filter(Boolean).join(""),`
15
+ margin-right: `).concat(i,"px ").concat(o,`;
16
+ `),r==="padding"&&"padding-right: ".concat(i,"px ").concat(o,";")].filter(Boolean).join(""),`
17
17
  }
18
18
 
19
- .`).concat(ne,` {
20
- right: `).concat(u,"px ").concat(o,`;
19
+ .`).concat(oe,` {
20
+ right: `).concat(i,"px ").concat(o,`;
21
21
  }
22
22
 
23
- .`).concat(oe,` {
24
- margin-right: `).concat(u,"px ").concat(o,`;
23
+ .`).concat(ae,` {
24
+ margin-right: `).concat(i,"px ").concat(o,`;
25
25
  }
26
26
 
27
- .`).concat(ne," .").concat(ne,` {
27
+ .`).concat(oe," .").concat(oe,` {
28
28
  right: 0 `).concat(o,`;
29
29
  }
30
30
 
31
- .`).concat(oe," .").concat(oe,` {
31
+ .`).concat(ae," .").concat(ae,` {
32
32
  margin-right: 0 `).concat(o,`;
33
33
  }
34
34
 
35
- body[`).concat(q,`] {
36
- `).concat(Dr,": ").concat(u,`px;
35
+ body[`).concat(H,`] {
36
+ `).concat(Dr,": ").concat(i,`px;
37
37
  }
38
- `)},Le=function(){var e=parseInt(document.body.getAttribute(q)||"0",10);return isFinite(e)?e:0},Xr=function(){s.useEffect(function(){return document.body.setAttribute(q,(Le()+1).toString()),function(){var e=Le()-1;e<=0?document.body.removeAttribute(q):document.body.setAttribute(q,e.toString())}},[])},Zr=function(e){var t=e.noRelative,r=e.noImportant,o=e.gapMode,a=o===void 0?"margin":o;Xr();var n=s.useMemo(function(){return Kr(a)},[a]);return s.createElement(Gr,{styles:Yr(n,!t,a,r?"":"!important")})},we=!1;if(typeof window<"u")try{var Z=Object.defineProperty({},"passive",{get:function(){return we=!0,!0}});window.addEventListener("test",Z,Z),window.removeEventListener("test",Z,Z)}catch{we=!1}var U=we?{passive:!1}:!1,Qr=function(e){return e.tagName==="TEXTAREA"},_t=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!Qr(e)&&r[t]==="visible")},Jr=function(e){return _t(e,"overflowY")},en=function(e){return _t(e,"overflowX")},Fe=function(e,t){var r=t.ownerDocument,o=t;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var a=yt(e,o);if(a){var n=bt(e,o),i=n[1],u=n[2];if(i>u)return!0}o=o.parentNode}while(o&&o!==r.body);return!1},tn=function(e){var t=e.scrollTop,r=e.scrollHeight,o=e.clientHeight;return[t,r,o]},rn=function(e){var t=e.scrollLeft,r=e.scrollWidth,o=e.clientWidth;return[t,r,o]},yt=function(e,t){return e==="v"?Jr(t):en(t)},bt=function(e,t){return e==="v"?tn(t):rn(t)},nn=function(e,t){return e==="h"&&t==="rtl"?-1:1},on=function(e,t,r,o,a){var n=nn(e,window.getComputedStyle(t).direction),i=n*o,u=r.target,p=t.contains(u),d=!1,f=i>0,v=0,h=0;do{var m=bt(e,u),b=m[0],l=m[1],g=m[2],_=l-g-n*b;(b||_)&&yt(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},Q=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ke=function(e){return[e.deltaX,e.deltaY]},We=function(e){return e&&"current"in e?e.current:e},an=function(e,t){return e[0]===t[0]&&e[1]===t[1]},un=function(e){return`
38
+ `)},$e=function(){var e=parseInt(document.body.getAttribute(H)||"0",10);return isFinite(e)?e:0},Xr=function(){s.useEffect(function(){return document.body.setAttribute(H,($e()+1).toString()),function(){var e=$e()-1;e<=0?document.body.removeAttribute(H):document.body.setAttribute(H,e.toString())}},[])},Zr=function(e){var t=e.noRelative,r=e.noImportant,o=e.gapMode,a=o===void 0?"margin":o;Xr();var n=s.useMemo(function(){return Gr(a)},[a]);return s.createElement(Kr,{styles:Yr(n,!t,a,r?"":"!important")})},we=!1;if(typeof window<"u")try{var Q=Object.defineProperty({},"passive",{get:function(){return we=!0,!0}});window.addEventListener("test",Q,Q),window.removeEventListener("test",Q,Q)}catch{we=!1}var B=we?{passive:!1}:!1,Qr=function(e){return e.tagName==="TEXTAREA"},gt=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!Qr(e)&&r[t]==="visible")},Jr=function(e){return gt(e,"overflowY")},en=function(e){return gt(e,"overflowX")},Me=function(e,t){var r=t.ownerDocument,o=t;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var a=mt(e,o);if(a){var n=_t(e,o),u=n[1],i=n[2];if(u>i)return!0}o=o.parentNode}while(o&&o!==r.body);return!1},tn=function(e){var t=e.scrollTop,r=e.scrollHeight,o=e.clientHeight;return[t,r,o]},rn=function(e){var t=e.scrollLeft,r=e.scrollWidth,o=e.clientWidth;return[t,r,o]},mt=function(e,t){return e==="v"?Jr(t):en(t)},_t=function(e,t){return e==="v"?tn(t):rn(t)},nn=function(e,t){return e==="h"&&t==="rtl"?-1:1},on=function(e,t,r,o,a){var n=nn(e,window.getComputedStyle(t).direction),u=n*o,i=r.target,p=t.contains(i),c=!1,f=u>0,v=0,h=0;do{if(!i)break;var m=_t(e,i),b=m[0],l=m[1],g=m[2],_=l-g-n*b;(b||_)&&mt(e,i)&&(v+=_,h+=b);var w=i.parentNode;i=w&&w.nodeType===Node.DOCUMENT_FRAGMENT_NODE?w.host:w}while(!p&&i!==document.body||p&&(t.contains(i)||t===i));return(f&&Math.abs(v)<1||!f&&Math.abs(h)<1)&&(c=!0),c},J=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ie=function(e){return[e.deltaX,e.deltaY]},Le=function(e){return e&&"current"in e?e.current:e},an=function(e,t){return e[0]===t[0]&&e[1]===t[1]},un=function(e){return`
39
39
  .block-interactivity-`.concat(e,` {pointer-events: none;}
40
40
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
41
- `)},sn=0,V=[];function cn(e){var t=s.useRef([]),r=s.useRef([0,0]),o=s.useRef(),a=s.useState(sn++)[0],n=s.useState(mt)[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=Rr([e.lockRef.current],(e.shards||[]).map(We),!0).filter(Boolean);return l.forEach(function(g){return g.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),l.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var u=s.useCallback(function(l,g){if("touches"in l&&l.touches.length===2||l.type==="wheel"&&l.ctrlKey)return!i.current.allowPinchZoom;var _=Q(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 on(R,g,l,R==="h"?w:E)},[]),p=s.useCallback(function(l){var g=l;if(!(!V.length||V[V.length-1]!==n)){var _="deltaY"in g?ke(g):Q(g),S=t.current.filter(function(x){return x.name===g.type&&(x.target===g.target||g.target===x.shadowParent)&&an(x.delta,_)})[0];if(S&&S.should){g.cancelable&&g.preventDefault();return}if(!S){var w=(i.current.shards||[]).map(We).filter(Boolean).filter(function(x){return x.contains(g.target)}),E=w.length>0?u(g,w[0]):!i.current.noIsolation;E&&g.cancelable&&g.preventDefault()}}},[]),d=s.useCallback(function(l,g,_,S){var w={name:l,delta:g,target:_,should:S,shadowParent:ln(_)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(E){return E!==w})},1)},[]),f=s.useCallback(function(l){r.current=Q(l),o.current=void 0},[]),v=s.useCallback(function(l){d(l.type,ke(l),l.target,u(l,e.lockRef.current))},[]),h=s.useCallback(function(l){d(l.type,Q(l),l.target,u(l,e.lockRef.current))},[]);s.useEffect(function(){return V.push(n),e.setCallbacks({onScrollCapture:v,onWheelCapture:v,onTouchMoveCapture:h}),document.addEventListener("wheel",p,U),document.addEventListener("touchmove",p,U),document.addEventListener("touchstart",f,U),function(){V=V.filter(function(l){return l!==n}),document.removeEventListener("wheel",p,U),document.removeEventListener("touchmove",p,U),document.removeEventListener("touchstart",f,U)}},[]);var m=e.removeScrollBar,b=e.inert;return s.createElement(s.Fragment,null,b?s.createElement(n,{styles:un(a)}):null,m?s.createElement(Zr,{gapMode:e.gapMode}):null)}function ln(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const dn=Fr(gt,cn);var wt=s.forwardRef(function(e,t){return s.createElement(se,T({},e,{ref:t,sideCar:dn}))});wt.classNames=se.classNames;var pn=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},H=new WeakMap,J=new WeakMap,ee={},me=0,Et=function(e){return e&&(e.host||Et(e.parentNode))},fn=function(e,t){return t.map(function(r){if(e.contains(r))return r;var o=Et(r);return o&&e.contains(o)?o:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},vn=function(e,t,r,o){var a=fn(t,Array.isArray(e)?e:[e]);ee[r]||(ee[r]=new WeakMap);var n=ee[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 m=h.getAttribute(o),b=m!==null&&m!=="false",l=(H.get(h)||0)+1,g=(n.get(h)||0)+1;H.set(h,l),n.set(h,g),i.push(h),l===1&&b&&J.set(h,!0),g===1&&h.setAttribute(r,"true"),b||h.setAttribute(o,"true")}catch(_){console.error("aria-hidden: cannot operate on ",h,_)}})};return f(t),u.clear(),me++,function(){i.forEach(function(v){var h=H.get(v)-1,m=n.get(v)-1;H.set(v,h),n.set(v,m),h||(J.has(v)||v.removeAttribute(o),J.delete(v)),m||v.removeAttribute(r)}),me--,me||(H=new WeakMap,H=new WeakMap,J=new WeakMap,ee={})}},hn=function(e,t,r){r===void 0&&(r="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),a=pn(e);return a?(o.push.apply(o,Array.from(a.querySelectorAll("[aria-live]"))),vn(o,a,r,"aria-hidden")):function(){return null}},Se="Dialog",[xt,$o]=Zt(Se),[gn,D]=xt(Se),St=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]=tr({prop:o,defaultProp:a,onChange:n});return c.jsx(gn,{scope:t,triggerRef:u,contentRef:p,contentId:le(),titleId:le(),descriptionId:le(),open:d,onOpenChange:f,onOpenToggle:s.useCallback(()=>f(v=>!v),[f]),modal:i,children:r})};St.displayName=Se;var Ct="DialogTrigger",Nt=s.forwardRef((e,t)=>{const{__scopeDialog:r,...o}=e,a=D(Ct,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":Pe(a.open),...o,ref:n,onClick:I(e.onClick,a.onOpenToggle)})});Nt.displayName=Ct;var Ce="DialogPortal",[mn,Pt]=xt(Ce,{forceMount:void 0}),Ot=e=>{const{__scopeDialog:t,forceMount:r,children:o,container:a}=e,n=D(Ce,t);return c.jsx(mn,{scope:t,forceMount:r,children:s.Children.map(o,i=>c.jsx(ue,{present:r||n.open,children:c.jsx(ft,{asChild:!0,container:a,children:i})}))})};Ot.displayName=Ce;var ie="DialogOverlay",Rt=s.forwardRef((e,t)=>{const r=Pt(ie,e.__scopeDialog),{forceMount:o=r.forceMount,...a}=e,n=D(ie,e.__scopeDialog);return n.modal?c.jsx(ue,{present:o||n.open,children:c.jsx(_n,{...a,ref:t})}):null});Rt.displayName=ie;var _n=s.forwardRef((e,t)=>{const{__scopeDialog:r,...o}=e,a=D(ie,r);return c.jsx(wt,{as:xe,allowPinchZoom:!0,shards:[a.contentRef],children:c.jsx(M.div,{"data-state":Pe(a.open),...o,ref:t,style:{pointerEvents:"auto",...o.style}})})}),k="DialogContent",At=s.forwardRef((e,t)=>{const r=Pt(k,e.__scopeDialog),{forceMount:o=r.forceMount,...a}=e,n=D(k,e.__scopeDialog);return c.jsx(ue,{present:o||n.open,children:n.modal?c.jsx(yn,{...a,ref:t}):c.jsx(bn,{...a,ref:t})})});At.displayName=k;var yn=s.forwardRef((e,t)=>{const r=D(k,e.__scopeDialog),o=s.useRef(null),a=W(t,r.contentRef,o);return s.useEffect(()=>{const n=o.current;if(n)return hn(n)},[]),c.jsx(Dt,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:I(e.onCloseAutoFocus,n=>{var i;n.preventDefault(),(i=r.triggerRef.current)==null||i.focus()}),onPointerDownOutside:I(e.onPointerDownOutside,n=>{const i=n.detail.originalEvent,u=i.button===0&&i.ctrlKey===!0;(i.button===2||u)&&n.preventDefault()}),onFocusOutside:I(e.onFocusOutside,n=>n.preventDefault())})}),bn=s.forwardRef((e,t)=>{const r=D(k,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=D(k,r),p=s.useRef(null),d=W(t,p);return Or(),c.jsxs(c.Fragment,{children:[c.jsx(dt,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:a,onUnmountAutoFocus:n,children:c.jsx(ct,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":Pe(u.open),...i,ref:d,onDismiss:()=>u.onOpenChange(!1)})}),c.jsxs(c.Fragment,{children:[c.jsx(wn,{titleId:u.titleId}),c.jsx(xn,{contentRef:p,descriptionId:u.descriptionId})]})]})}),Ne="DialogTitle",jt=s.forwardRef((e,t)=>{const{__scopeDialog:r,...o}=e,a=D(Ne,r);return c.jsx(M.h2,{id:a.titleId,...o,ref:t})});jt.displayName=Ne;var Tt="DialogDescription",Mt=s.forwardRef((e,t)=>{const{__scopeDialog:r,...o}=e,a=D(Tt,r);return c.jsx(M.p,{id:a.descriptionId,...o,ref:t})});Mt.displayName=Tt;var $t="DialogClose",It=s.forwardRef((e,t)=>{const{__scopeDialog:r,...o}=e,a=D($t,r);return c.jsx(M.button,{type:"button",...o,ref:t,onClick:I(e.onClick,()=>a.onOpenChange(!1))})});It.displayName=$t;function Pe(e){return e?"open":"closed"}var Lt="DialogTitleWarning",[Io,Ft]=Xt(Lt,{contentName:k,titleName:Ne,docsSlug:"dialog"}),wn=({titleId:e})=>{const t=Ft(Lt),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
41
+ `)},sn=0,U=[];function cn(e){var t=s.useRef([]),r=s.useRef([0,0]),o=s.useRef(),a=s.useState(sn++)[0],n=s.useState(ht)[0],u=s.useRef(e);s.useEffect(function(){u.current=e},[e]),s.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var l=Rr([e.lockRef.current],(e.shards||[]).map(Le),!0).filter(Boolean);return l.forEach(function(g){return g.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),l.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var i=s.useCallback(function(l,g){if("touches"in l&&l.touches.length===2||l.type==="wheel"&&l.ctrlKey)return!u.current.allowPinchZoom;var _=J(l),w=r.current,E="deltaX"in l?l.deltaX:w[0]-_[0],x="deltaY"in l?l.deltaY:w[1]-_[1],S,N=l.target,y=Math.abs(E)>Math.abs(x)?"h":"v";if("touches"in l&&y==="h"&&N.type==="range")return!1;var A=Me(y,N);if(!A)return!0;if(A?S=y:(S=y==="v"?"h":"v",A=Me(y,N)),!A)return!1;if(!o.current&&"changedTouches"in l&&(E||x)&&(o.current=S),!S)return!0;var R=o.current||S;return on(R,g,l,R==="h"?E:x)},[]),p=s.useCallback(function(l){var g=l;if(!(!U.length||U[U.length-1]!==n)){var _="deltaY"in g?Ie(g):J(g),w=t.current.filter(function(S){return S.name===g.type&&(S.target===g.target||g.target===S.shadowParent)&&an(S.delta,_)})[0];if(w&&w.should){g.cancelable&&g.preventDefault();return}if(!w){var E=(u.current.shards||[]).map(Le).filter(Boolean).filter(function(S){return S.contains(g.target)}),x=E.length>0?i(g,E[0]):!u.current.noIsolation;x&&g.cancelable&&g.preventDefault()}}},[]),c=s.useCallback(function(l,g,_,w){var E={name:l,delta:g,target:_,should:w,shadowParent:ln(_)};t.current.push(E),setTimeout(function(){t.current=t.current.filter(function(x){return x!==E})},1)},[]),f=s.useCallback(function(l){r.current=J(l),o.current=void 0},[]),v=s.useCallback(function(l){c(l.type,Ie(l),l.target,i(l,e.lockRef.current))},[]),h=s.useCallback(function(l){c(l.type,J(l),l.target,i(l,e.lockRef.current))},[]);s.useEffect(function(){return U.push(n),e.setCallbacks({onScrollCapture:v,onWheelCapture:v,onTouchMoveCapture:h}),document.addEventListener("wheel",p,B),document.addEventListener("touchmove",p,B),document.addEventListener("touchstart",f,B),function(){U=U.filter(function(l){return l!==n}),document.removeEventListener("wheel",p,B),document.removeEventListener("touchmove",p,B),document.removeEventListener("touchstart",f,B)}},[]);var m=e.removeScrollBar,b=e.inert;return s.createElement(s.Fragment,null,b?s.createElement(n,{styles:un(a)}):null,m?s.createElement(Zr,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function ln(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const dn=Fr(vt,cn);var yt=s.forwardRef(function(e,t){return s.createElement(se,T({},e,{ref:t,sideCar:dn}))});yt.classNames=se.classNames;var pn=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},V=new WeakMap,ee=new WeakMap,te={},_e=0,bt=function(e){return e&&(e.host||bt(e.parentNode))},fn=function(e,t){return t.map(function(r){if(e.contains(r))return r;var o=bt(r);return o&&e.contains(o)?o:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},vn=function(e,t,r,o){var a=fn(t,Array.isArray(e)?e:[e]);te[r]||(te[r]=new WeakMap);var n=te[r],u=[],i=new Set,p=new Set(a),c=function(v){!v||i.has(v)||(i.add(v),c(v.parentNode))};a.forEach(c);var f=function(v){!v||p.has(v)||Array.prototype.forEach.call(v.children,function(h){if(i.has(h))f(h);else try{var m=h.getAttribute(o),b=m!==null&&m!=="false",l=(V.get(h)||0)+1,g=(n.get(h)||0)+1;V.set(h,l),n.set(h,g),u.push(h),l===1&&b&&ee.set(h,!0),g===1&&h.setAttribute(r,"true"),b||h.setAttribute(o,"true")}catch(_){console.error("aria-hidden: cannot operate on ",h,_)}})};return f(t),i.clear(),_e++,function(){u.forEach(function(v){var h=V.get(v)-1,m=n.get(v)-1;V.set(v,h),n.set(v,m),h||(ee.has(v)||v.removeAttribute(o),ee.delete(v)),m||v.removeAttribute(r)}),_e--,_e||(V=new WeakMap,V=new WeakMap,ee=new WeakMap,te={})}},hn=function(e,t,r){r===void 0&&(r="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),a=pn(e);return a?(o.push.apply(o,Array.from(a.querySelectorAll("[aria-live], script"))),vn(o,a,r,"aria-hidden")):function(){return null}},ce="Dialog",[wt]=Kt(ce),[gn,D]=wt(ce),Et=e=>{const{__scopeDialog:t,children:r,open:o,defaultOpen:a,onOpenChange:n,modal:u=!0}=e,i=s.useRef(null),p=s.useRef(null),[c,f]=Jt({prop:o,defaultProp:a??!1,onChange:n,caller:ce});return d.jsx(gn,{scope:t,triggerRef:i,contentRef:p,contentId:de(),titleId:de(),descriptionId:de(),open:c,onOpenChange:f,onOpenToggle:s.useCallback(()=>f(v=>!v),[f]),modal:u,children:r})};Et.displayName=ce;var xt="DialogTrigger",St=s.forwardRef((e,t)=>{const{__scopeDialog:r,...o}=e,a=D(xt,r),n=k(t,a.triggerRef);return d.jsx($.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":Se(a.open),...o,ref:n,onClick:I(e.onClick,a.onOpenToggle)})});St.displayName=xt;var Ee="DialogPortal",[mn,Ct]=wt(Ee,{forceMount:void 0}),Nt=e=>{const{__scopeDialog:t,forceMount:r,children:o,container:a}=e,n=D(Ee,t);return d.jsx(mn,{scope:t,forceMount:r,children:s.Children.map(o,u=>d.jsx(ue,{present:r||n.open,children:d.jsx(dt,{asChild:!0,container:a,children:u})}))})};Nt.displayName=Ee;var ie="DialogOverlay",Ot=s.forwardRef((e,t)=>{const r=Ct(ie,e.__scopeDialog),{forceMount:o=r.forceMount,...a}=e,n=D(ie,e.__scopeDialog);return n.modal?d.jsx(ue,{present:o||n.open,children:d.jsx(yn,{...a,ref:t})}):null});Ot.displayName=ie;var _n=at("DialogOverlay.RemoveScroll"),yn=s.forwardRef((e,t)=>{const{__scopeDialog:r,...o}=e,a=D(ie,r);return d.jsx(yt,{as:_n,allowPinchZoom:!0,shards:[a.contentRef],children:d.jsx($.div,{"data-state":Se(a.open),...o,ref:t,style:{pointerEvents:"auto",...o.style}})})}),F="DialogContent",Pt=s.forwardRef((e,t)=>{const r=Ct(F,e.__scopeDialog),{forceMount:o=r.forceMount,...a}=e,n=D(F,e.__scopeDialog);return d.jsx(ue,{present:o||n.open,children:n.modal?d.jsx(bn,{...a,ref:t}):d.jsx(wn,{...a,ref:t})})});Pt.displayName=F;var bn=s.forwardRef((e,t)=>{const r=D(F,e.__scopeDialog),o=s.useRef(null),a=k(t,r.contentRef,o);return s.useEffect(()=>{const n=o.current;if(n)return hn(n)},[]),d.jsx(Rt,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:I(e.onCloseAutoFocus,n=>{var u;n.preventDefault(),(u=r.triggerRef.current)==null||u.focus()}),onPointerDownOutside:I(e.onPointerDownOutside,n=>{const u=n.detail.originalEvent,i=u.button===0&&u.ctrlKey===!0;(u.button===2||i)&&n.preventDefault()}),onFocusOutside:I(e.onFocusOutside,n=>n.preventDefault())})}),wn=s.forwardRef((e,t)=>{const r=D(F,e.__scopeDialog),o=s.useRef(!1),a=s.useRef(!1);return d.jsx(Rt,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:n=>{var u,i;(u=e.onCloseAutoFocus)==null||u.call(e,n),n.defaultPrevented||(o.current||(i=r.triggerRef.current)==null||i.focus(),n.preventDefault()),o.current=!1,a.current=!1},onInteractOutside:n=>{var p,c;(p=e.onInteractOutside)==null||p.call(e,n),n.defaultPrevented||(o.current=!0,n.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const u=n.target;((c=r.triggerRef.current)==null?void 0:c.contains(u))&&n.preventDefault(),n.detail.originalEvent.type==="focusin"&&a.current&&n.preventDefault()}})}),Rt=s.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:n,...u}=e,i=D(F,r),p=s.useRef(null),c=k(t,p);return Pr(),d.jsxs(d.Fragment,{children:[d.jsx(ct,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:a,onUnmountAutoFocus:n,children:d.jsx(ut,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":Se(i.open),...u,ref:c,onDismiss:()=>i.onOpenChange(!1)})}),d.jsxs(d.Fragment,{children:[d.jsx(En,{titleId:i.titleId}),d.jsx(Sn,{contentRef:p,descriptionId:i.descriptionId})]})]})}),xe="DialogTitle",At=s.forwardRef((e,t)=>{const{__scopeDialog:r,...o}=e,a=D(xe,r);return d.jsx($.h2,{id:a.titleId,...o,ref:t})});At.displayName=xe;var Dt="DialogDescription",jt=s.forwardRef((e,t)=>{const{__scopeDialog:r,...o}=e,a=D(Dt,r);return d.jsx($.p,{id:a.descriptionId,...o,ref:t})});jt.displayName=Dt;var Tt="DialogClose",$t=s.forwardRef((e,t)=>{const{__scopeDialog:r,...o}=e,a=D(Tt,r);return d.jsx($.button,{type:"button",...o,ref:t,onClick:I(e.onClick,()=>a.onOpenChange(!1))})});$t.displayName=Tt;function Se(e){return e?"open":"closed"}var Mt="DialogTitleWarning",[Fo,It]=Gt(Mt,{contentName:F,titleName:xe,docsSlug:"dialog"}),En=({titleId:e})=>{const t=It(Mt),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
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},En="DialogDescriptionWarning",xn=({contentRef:e,descriptionId:t})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Ft(En).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},Sn=St,Cn=Nt,Nn=Ot,Pn=Rt,On=At,Rn=jt,Be=Mt,An=It;const Dn={LG:"lg"};function jn(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 {${It(xn).contentName}}.`;return s.useEffect(()=>{var n;const a=(n=e.current)==null?void 0:n.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(o))},[o,e,t]),null},Cn=Et,Nn=St,On=Nt,Pn=Ot,Rn=Pt,An=At,Fe=jt,Dn=$t;const jn={LG:"lg"};function Tn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ke={exports:{}};/*!
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 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.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})()}(Ue)),Ue.exports}var Mn=Tn();const $n=jn(Mn),In="_rotate_12t9p_1",Ln="_dash_12t9p_1",Fn={"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"},He=$n.bind(Fn),K="purpur-spinner",kn={SM:"sm"},Wn=({disabled:e=!1,negative:t=!1,size:r=kn.SM,...o})=>c.jsx("div",{className:He(K,`${K}--${r}`),...o,children:c.jsx("svg",{viewBox:"0 0 50 50",children:c.jsx("circle",{className:He(`${K}__circle`,{[`${K}__circle--disabled`]:e,[`${K}__circle--negative`]:t}),cx:"25",cy:"25",r:"20"})})});function Bn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var qe={exports:{}};/*!
49
+ */var We;function $n(){return We||(We=1,(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var n="",u=0;u<arguments.length;u++){var i=arguments[u];i&&(n=a(n,o.call(this,i)))}return n}function o(n){if(typeof n=="string"||typeof n=="number")return this&&this[n]||n;if(typeof n!="object")return"";if(Array.isArray(n))return r.apply(this,n);if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]"))return n.toString();var u="";for(var i in n)t.call(n,i)&&n[i]&&(u=a(u,this&&this[i]||i));return u}function a(n,u){return u?n?n+" "+u:n+u:n}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(ke)),ke.exports}var Mn=$n();const In=Tn(Mn),Ln="_rotate_12t9p_1",Fn="_dash_12t9p_1",kn={"purpur-spinner":"_purpur-spinner_12t9p_2",rotate:Ln,"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:Fn,"purpur-spinner__circle--disabled":"_purpur-spinner__circle--disabled_12t9p_41","purpur-spinner__circle--negative":"_purpur-spinner__circle--negative_12t9p_44"},Be=In.bind(kn),z="purpur-spinner",Wn={SM:"sm"},Bn=({disabled:e=!1,negative:t=!1,size:r=Wn.SM,...o})=>d.jsx("div",{className:Be(z,`${z}--${r}`),...o,children:d.jsx("svg",{viewBox:"0 0 50 50",children:d.jsx("circle",{className:Be(`${z}__circle`,{[`${z}__circle--disabled`]:e,[`${z}__circle--negative`]:t}),cx:"25",cy:"25",r:"20"})})});function Un(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ue={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 ze;function Un(){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.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})()}(qe)),qe.exports}var Vn=Un();const Hn=Bn(Vn),qn={"purpur-button":"_purpur-button_1goi7_1","purpur-button--xs":"_purpur-button--xs_1goi7_33","purpur-button--icon-only":"_purpur-button--icon-only_1goi7_36","purpur-button--sm":"_purpur-button--sm_1goi7_39","purpur-button--md":"_purpur-button--md_1goi7_45","purpur-button--lg":"_purpur-button--lg_1goi7_51","purpur-button--full-width":"_purpur-button--full-width_1goi7_57","purpur-button--primary":"_purpur-button--primary_1goi7_60","purpur-button--disabled":"_purpur-button--disabled_1goi7_64","purpur-button--primary-negative":"_purpur-button--primary-negative_1goi7_70","purpur-button--secondary":"_purpur-button--secondary_1goi7_82","purpur-button--secondary-negative":"_purpur-button--secondary-negative_1goi7_93","purpur-button--expressive":"_purpur-button--expressive_1goi7_104","purpur-button--expressive-negative":"_purpur-button--expressive-negative_1goi7_114","purpur-button--negative":"_purpur-button--negative_1goi7_126","purpur-button--destructive":"_purpur-button--destructive_1goi7_133","purpur-button--destructive-negative":"_purpur-button--destructive-negative_1goi7_143","purpur-button--tertiary-purple":"_purpur-button--tertiary-purple_1goi7_153","purpur-button--tertiary-purple-negative":"_purpur-button--tertiary-purple-negative_1goi7_166","purpur-button--text-negative":"_purpur-button--text-negative_1goi7_181","purpur-button--text":"_purpur-button--text_1goi7_181"},zn=Hn.bind(qn),L="purpur-button",kt=O.forwardRef(({children:e,className:t,disabled:r=!1,fullWidth:o=!1,iconOnly:a,loading:n=!1,negative:i=!1,onClick:u,size:p="md",variant:d,type:f="button",...v},h)=>{if(a&&d==="destructive")return null;const m=zn([L,`${L}--${i?`${d}-negative`:d}`,`${L}--${p}`],{[`${L}--icon-only`]:a,[`${L}--negative`]:i,[`${L}--full-width`]:o,[`${L}--disabled`]:r||n},t),b=g=>{r||n?g.preventDefault():u&&u(g)},l=!!v["aria-disabled"]||r||n;return c.jsxs("button",{className:m,type:f,ref:h,"aria-disabled":l,onClick:b,...v,children:[n&&c.jsx(Wn,{size:p===Dn.LG?"xs":"xxs",negative:i,disabled:l})," ",e]})});kt.displayName="Button";function Kn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ke={exports:{}};/*!
53
+ */var Ve;function Vn(){return Ve||(Ve=1,(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var n="",u=0;u<arguments.length;u++){var i=arguments[u];i&&(n=a(n,o.call(this,i)))}return n}function o(n){if(typeof n=="string"||typeof n=="number")return this&&this[n]||n;if(typeof n!="object")return"";if(Array.isArray(n))return r.apply(this,n);if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]"))return n.toString();var u="";for(var i in n)t.call(n,i)&&n[i]&&(u=a(u,this&&this[i]||i));return u}function a(n,u){return u?n?n+" "+u:n+u:n}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(Ue)),Ue.exports}var Hn=Vn();const qn=Un(Hn),zn={"purpur-button":"_purpur-button_1goi7_1","purpur-button--xs":"_purpur-button--xs_1goi7_33","purpur-button--icon-only":"_purpur-button--icon-only_1goi7_36","purpur-button--sm":"_purpur-button--sm_1goi7_39","purpur-button--md":"_purpur-button--md_1goi7_45","purpur-button--lg":"_purpur-button--lg_1goi7_51","purpur-button--full-width":"_purpur-button--full-width_1goi7_57","purpur-button--primary":"_purpur-button--primary_1goi7_60","purpur-button--disabled":"_purpur-button--disabled_1goi7_64","purpur-button--primary-negative":"_purpur-button--primary-negative_1goi7_70","purpur-button--secondary":"_purpur-button--secondary_1goi7_82","purpur-button--secondary-negative":"_purpur-button--secondary-negative_1goi7_93","purpur-button--expressive":"_purpur-button--expressive_1goi7_104","purpur-button--expressive-negative":"_purpur-button--expressive-negative_1goi7_114","purpur-button--negative":"_purpur-button--negative_1goi7_126","purpur-button--destructive":"_purpur-button--destructive_1goi7_133","purpur-button--destructive-negative":"_purpur-button--destructive-negative_1goi7_143","purpur-button--tertiary-purple":"_purpur-button--tertiary-purple_1goi7_153","purpur-button--tertiary-purple-negative":"_purpur-button--tertiary-purple-negative_1goi7_166","purpur-button--text-negative":"_purpur-button--text-negative_1goi7_181","purpur-button--text":"_purpur-button--text_1goi7_181"},Gn=qn.bind(zn),L="purpur-button",Lt=P.forwardRef(({children:e,className:t,disabled:r=!1,fullWidth:o=!1,iconOnly:a,loading:n=!1,negative:u=!1,onClick:i,size:p="md",variant:c,type:f="button",...v},h)=>{if(a&&c==="destructive")return null;const m=Gn([L,`${L}--${u?`${c}-negative`:c}`,`${L}--${p}`],{[`${L}--icon-only`]:a,[`${L}--negative`]:u,[`${L}--full-width`]:o,[`${L}--disabled`]:r||n},t),b=g=>{r||n?g.preventDefault():i&&i(g)},l=!!v["aria-disabled"]||r||n;return d.jsxs("button",{className:m,type:f,ref:h,"aria-disabled":l,onClick:b,...v,children:[n&&d.jsx(Bn,{size:p===jn.LG?"xs":"xxs",negative:u,disabled:l})," ",e]})});Lt.displayName="Button";function Kn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var He={exports:{}};/*!
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 Ge;function Gn(){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(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=Gn();const Xn=Kn(Yn),te={"purpur-heading":"_purpur-heading_vo751_1","purpur-heading--hyphens":"_purpur-heading--hyphens_vo751_8","purpur-heading--negative":"_purpur-heading--negative_vo751_11","purpur-heading--subsection-100":"_purpur-heading--subsection-100_vo751_14","purpur-heading--title-100":"_purpur-heading--title-100_vo751_20","purpur-heading--title-200":"_purpur-heading--title-200_vo751_26","purpur-heading--title-300":"_purpur-heading--title-300_vo751_32","purpur-heading--title-400":"_purpur-heading--title-400_vo751_38","purpur-heading--title-500":"_purpur-heading--title-500_vo751_44","purpur-heading--title-600":"_purpur-heading--title-600_vo751_50","purpur-heading--title-700":"_purpur-heading--title-700_vo751_56","purpur-heading--display-5":"_purpur-heading--display-5_vo751_62","purpur-heading--display-10":"_purpur-heading--display-10_vo751_68","purpur-heading--display-15":"_purpur-heading--display-15_vo751_74","purpur-heading--display-20":"_purpur-heading--display-20_vo751_80","purpur-heading--display-25":"_purpur-heading--display-25_vo751_86","purpur-heading--display-50":"_purpur-heading--display-50_vo751_92","purpur-heading--display-100":"_purpur-heading--display-100_vo751_98","purpur-heading--display-200":"_purpur-heading--display-200_vo751_104"},Zn={TITLE100:"title-100"},re="purpur-heading",Wt=({children:e,className:t="",enableHyphenation:r=!1,negative:o=!1,tag:a,variant:n=Zn.TITLE100,...i})=>{const u=a,p=Xn([t,te[re],te[`${re}--${n}`],{[te[`${re}--hyphens`]]:r,[te[`${re}--negative`]]:o}]);return c.jsx(u,{className:p,...i,children:e})};Wt.displayName="Heading";function Qn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ye={exports:{}};/*!
57
+ */var qe;function Yn(){return qe||(qe=1,(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var n="",u=0;u<arguments.length;u++){var i=arguments[u];i&&(n=a(n,o(i)))}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 u="";for(var i in n)t.call(n,i)&&n[i]&&(u=a(u,i));return u}function a(n,u){return u?n?n+" "+u:n+u:n}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(He)),He.exports}var Xn=Yn();const Zn=Kn(Xn),re={"purpur-heading":"_purpur-heading_vo751_1","purpur-heading--hyphens":"_purpur-heading--hyphens_vo751_8","purpur-heading--negative":"_purpur-heading--negative_vo751_11","purpur-heading--subsection-100":"_purpur-heading--subsection-100_vo751_14","purpur-heading--title-100":"_purpur-heading--title-100_vo751_20","purpur-heading--title-200":"_purpur-heading--title-200_vo751_26","purpur-heading--title-300":"_purpur-heading--title-300_vo751_32","purpur-heading--title-400":"_purpur-heading--title-400_vo751_38","purpur-heading--title-500":"_purpur-heading--title-500_vo751_44","purpur-heading--title-600":"_purpur-heading--title-600_vo751_50","purpur-heading--title-700":"_purpur-heading--title-700_vo751_56","purpur-heading--display-5":"_purpur-heading--display-5_vo751_62","purpur-heading--display-10":"_purpur-heading--display-10_vo751_68","purpur-heading--display-15":"_purpur-heading--display-15_vo751_74","purpur-heading--display-20":"_purpur-heading--display-20_vo751_80","purpur-heading--display-25":"_purpur-heading--display-25_vo751_86","purpur-heading--display-50":"_purpur-heading--display-50_vo751_92","purpur-heading--display-100":"_purpur-heading--display-100_vo751_98","purpur-heading--display-200":"_purpur-heading--display-200_vo751_104"},Qn={TITLE100:"title-100"},ne="purpur-heading",Ft=({children:e,className:t="",enableHyphenation:r=!1,negative:o=!1,tag:a,variant:n=Qn.TITLE100,...u})=>{const i=a,p=Zn([t,re[ne],re[`${ne}--${n}`],{[re[`${ne}--hyphens`]]:r,[re[`${ne}--negative`]]:o}]);return d.jsx(i,{className:p,...u,children:e})};Ft.displayName="Heading";function Jn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ze={exports:{}};/*!
58
58
  Copyright (c) 2018 Jed Watson.
59
59
  Licensed under the MIT License (MIT), see
60
60
  http://jedwatson.github.io/classnames
61
- */var Xe;function Jn(){return Xe||(Xe=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 eo=Jn();const to=Qn(eo),ro={"purpur-icon":"_purpur-icon_8u1lq_1","purpur-icon--xxs":"_purpur-icon--xxs_8u1lq_4","purpur-icon--xs":"_purpur-icon--xs_8u1lq_8","purpur-icon--sm":"_purpur-icon--sm_8u1lq_12","purpur-icon--md":"_purpur-icon--md_8u1lq_16","purpur-icon--lg":"_purpur-icon--lg_8u1lq_20","purpur-icon--xl":"_purpur-icon--xl_8u1lq_24"},no=to.bind(ro),Ze="purpur-icon",oo="md",ao=e=>e.filter(t=>Object.keys(t).length>=1).map(t=>`${t.name}="${t.value}"`).join(" "),io=({content:e="",title:t}={})=>{const r=[{name:"xmlns",value:"http://www.w3.org/2000/svg"},{name:"fill",value:"currentColor"},{name:"viewBox",value:"0 0 24 24"},t?{name:"role",value:"img"}:{name:"aria-hidden",value:"true"}],o=t?`<title>${t}</title>`:"";return`<svg ${ao(r)}>${o}${e}</svg>`},uo=e=>e.replace(/<(\/?)svg([^>]*)>/g,"").trim(),Bt=({svg:e,allyTitle:t,className:r,size:o=oo,...a})=>{const n=io({content:uo(e.svg),title:t}),i=no(r,Ze,`${Ze}--${o}`);return c.jsx("span",{className:i,dangerouslySetInnerHTML:{__html:n},...a})};Bt.displayName="Icon";const so={name:"close",svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M4.864 4.864a.9.9 0 0 1 1.273 0L12 10.727l5.864-5.863a.9.9 0 0 1 1.272 1.272L13.273 12l5.863 5.864a.9.9 0 1 1-1.272 1.272L12 13.273l-5.863 5.863a.9.9 0 0 1-1.273-1.272L10.727 12 4.864 6.136a.9.9 0 0 1 0-1.272Z" clip-rule="evenodd"/></svg>',keywords:["close"],category:"utility"},Ut=e=>c.jsx(Bt,{...e,svg:so});Ut.displayName="IconClose";function co(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Qe={exports:{}};/*!
61
+ */var Ge;function eo(){return Ge||(Ge=1,(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var n="",u=0;u<arguments.length;u++){var i=arguments[u];i&&(n=a(n,o.call(this,i)))}return n}function o(n){if(typeof n=="string"||typeof n=="number")return this&&this[n]||n;if(typeof n!="object")return"";if(Array.isArray(n))return r.apply(this,n);if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]"))return n.toString();var u="";for(var i in n)t.call(n,i)&&n[i]&&(u=a(u,this&&this[i]||i));return u}function a(n,u){return u?n?n+" "+u:n+u:n}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(ze)),ze.exports}var to=eo();const ro=Jn(to),no={"purpur-icon":"_purpur-icon_8u1lq_1","purpur-icon--xxs":"_purpur-icon--xxs_8u1lq_4","purpur-icon--xs":"_purpur-icon--xs_8u1lq_8","purpur-icon--sm":"_purpur-icon--sm_8u1lq_12","purpur-icon--md":"_purpur-icon--md_8u1lq_16","purpur-icon--lg":"_purpur-icon--lg_8u1lq_20","purpur-icon--xl":"_purpur-icon--xl_8u1lq_24"},oo=ro.bind(no),Ke="purpur-icon",ao="md",io=e=>e.filter(t=>Object.keys(t).length>=1).map(t=>`${t.name}="${t.value}"`).join(" "),uo=({content:e="",title:t}={})=>{const r=[{name:"xmlns",value:"http://www.w3.org/2000/svg"},{name:"fill",value:"currentColor"},{name:"viewBox",value:"0 0 24 24"},t?{name:"role",value:"img"}:{name:"aria-hidden",value:"true"}],o=t?`<title>${t}</title>`:"";return`<svg ${io(r)}>${o}${e}</svg>`},so=e=>e.replace(/<(\/?)svg([^>]*)>/g,"").trim(),kt=({svg:e,allyTitle:t,className:r,size:o=ao,...a})=>{const n=uo({content:so(e.svg),title:t}),u=oo(r,Ke,`${Ke}--${o}`);return d.jsx("span",{className:u,dangerouslySetInnerHTML:{__html:n},...a})};kt.displayName="Icon";const co={name:"close",svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M4.864 4.864a.9.9 0 0 1 1.273 0L12 10.727l5.864-5.863a.9.9 0 0 1 1.272 1.272L13.273 12l5.863 5.864a.9.9 0 1 1-1.272 1.272L12 13.273l-5.863 5.863a.9.9 0 0 1-1.273-1.272L10.727 12 4.864 6.136a.9.9 0 0 1 0-1.272Z" clip-rule="evenodd"/></svg>',keywords:["close"],category:"utility"},Wt=e=>d.jsx(kt,{...e,svg:co});Wt.displayName="IconClose";function lo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ye={exports:{}};/*!
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 Je;function lo(){return Je||(Je=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})()}(Qe)),Qe.exports}var po=lo();const fo=co(po),vo={"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"},ho=fo.bind(vo),go={PARAGRAPH100:"paragraph-100"},G="purpur-paragraph",Vt=({children:e,className:t,disabled:r,enableHyphenation:o=!1,negative:a=!1,variant:n=go.PARAGRAPH100,...i})=>{const u=ho(t,G,`${G}--${n}`,{[`${G}--hyphens`]:o,[`${G}--disabled`]:r,[`${G}--negative`]:a});return c.jsx("p",{...i,className:u,children:e})};Vt.displayName="Paragraph";function et(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function mo(...e){return t=>{let r=!1;const o=e.map(a=>{const n=et(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():et(e[a],null)}}}}var Ht=s.forwardRef((e,t)=>{const{children:r,...o}=e,a=s.Children.toArray(r),n=a.find(yo);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(Ee,{...o,ref:t,children:s.isValidElement(i)?s.cloneElement(i,void 0,u):null})}return c.jsx(Ee,{...o,ref:t,children:r})});Ht.displayName="Slot";var Ee=s.forwardRef((e,t)=>{const{children:r,...o}=e;if(s.isValidElement(r)){const a=wo(r),n=bo(o,r.props);return r.type!==s.Fragment&&(n.ref=t?mo(t,a):a),s.cloneElement(r,n)}return s.Children.count(r)>1?s.Children.only(null):null});Ee.displayName="SlotClone";var _o=({children:e})=>c.jsx(c.Fragment,{children:e});function yo(e){return s.isValidElement(e)&&e.type===_o}function bo(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 wo(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 Eo=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],xo=Eo.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}},{}),So="VisuallyHidden",qt=s.forwardRef((e,t)=>c.jsx(xo.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}}));qt.displayName=So;var Co=qt;const No=({asChild:e,children:t,...r})=>c.jsx(Co,{asChild:e,...r,children:t});function Po(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var _e={exports:{}};/*!
65
+ */var Xe;function po(){return Xe||(Xe=1,(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var n="",u=0;u<arguments.length;u++){var i=arguments[u];i&&(n=a(n,o.call(this,i)))}return n}function o(n){if(typeof n=="string"||typeof n=="number")return this&&this[n]||n;if(typeof n!="object")return"";if(Array.isArray(n))return r.apply(this,n);if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]"))return n.toString();var u="";for(var i in n)t.call(n,i)&&n[i]&&(u=a(u,this&&this[i]||i));return u}function a(n,u){return u?n?n+" "+u:n+u:n}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(Ye)),Ye.exports}var fo=po();const vo=lo(fo),ho={"purpur-paragraph":"_purpur-paragraph_1rh57_1","purpur-paragraph--disabled":"_purpur-paragraph--disabled_1rh57_7","purpur-paragraph--hyphens":"_purpur-paragraph--hyphens_1rh57_10","purpur-paragraph--negative":"_purpur-paragraph--negative_1rh57_13","purpur-paragraph--paragraph-100":"_purpur-paragraph--paragraph-100_1rh57_16","purpur-paragraph--paragraph-100-medium":"_purpur-paragraph--paragraph-100-medium_1rh57_22","purpur-paragraph--paragraph-100-bold":"_purpur-paragraph--paragraph-100-bold_1rh57_29","purpur-paragraph--paragraph-200":"_purpur-paragraph--paragraph-200_1rh57_36","purpur-paragraph--preamble-100":"_purpur-paragraph--preamble-100_1rh57_42","purpur-paragraph--preamble-200":"_purpur-paragraph--preamble-200_1rh57_48","purpur-paragraph--additional-100":"_purpur-paragraph--additional-100_1rh57_54","purpur-paragraph--additional-100-medium":"_purpur-paragraph--additional-100-medium_1rh57_60","purpur-paragraph--overline-100":"_purpur-paragraph--overline-100_1rh57_67","purpur-paragraph--overline-200":"_purpur-paragraph--overline-200_1rh57_75"},go=vo.bind(ho),mo={PARAGRAPH100:"paragraph-100"},G="purpur-paragraph",Bt=({children:e,className:t,disabled:r,enableHyphenation:o=!1,negative:a=!1,variant:n=mo.PARAGRAPH100,...u})=>{const i=go(t,G,`${G}--${n}`,{[`${G}--hyphens`]:o,[`${G}--disabled`]:r,[`${G}--negative`]:a});return d.jsx("p",{...u,className:i,children:e})};Bt.displayName="Paragraph";function Ze(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function _o(...e){return t=>{let r=!1;const o=e.map(a=>{const n=Ze(a,t);return!r&&typeof n=="function"&&(r=!0),n});if(r)return()=>{for(let a=0;a<o.length;a++){const n=o[a];typeof n=="function"?n():Ze(e[a],null)}}}}function yo(e){const t=bo(e),r=s.forwardRef((o,a)=>{const{children:n,...u}=o,i=s.Children.toArray(n),p=i.find(Eo);if(p){const c=p.props.children,f=i.map(v=>v===p?s.Children.count(c)>1?s.Children.only(null):s.isValidElement(c)?c.props.children:null:v);return d.jsx(t,{...u,ref:a,children:s.isValidElement(c)?s.cloneElement(c,void 0,f):null})}return d.jsx(t,{...u,ref:a,children:n})});return r.displayName=`${e}.Slot`,r}function bo(e){const t=s.forwardRef((r,o)=>{const{children:a,...n}=r;if(s.isValidElement(a)){const u=So(a),i=xo(n,a.props);return a.type!==s.Fragment&&(i.ref=o?_o(o,u):u),s.cloneElement(a,i)}return s.Children.count(a)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var wo=Symbol("radix.slottable");function Eo(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===wo}function xo(e,t){const r={...t};for(const o in t){const a=e[o],n=t[o];/^on[A-Z]/.test(o)?a&&n?r[o]=(...u)=>{n(...u),a(...u)}:a&&(r[o]=a):o==="style"?r[o]={...a,...n}:o==="className"&&(r[o]=[a,n].filter(Boolean).join(" "))}return{...e,...r}}function So(e){var t,r;let o=(t=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:t.get,a=o&&"isReactWarning"in o&&o.isReactWarning;return a?e.ref:(o=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,a=o&&"isReactWarning"in o&&o.isReactWarning,a?e.props.ref:e.props.ref||e.ref)}var Co=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],No=Co.reduce((e,t)=>{const r=yo(`Primitive.${t}`),o=s.forwardRef((a,n)=>{const{asChild:u,...i}=a,p=u?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(p,{...i,ref:n})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),Oo="VisuallyHidden",Ut=s.forwardRef((e,t)=>d.jsx(No.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));Ut.displayName=Oo;var Po=Ut;const Ro=({asChild:e,children:t,...r})=>d.jsx(Po,{asChild:e,...r,children:t});function Ao(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ye={exports:{}};/*!
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 tt;function Oo(){return tt||(tt=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})()}(_e)),_e.exports}var Ro=Oo();const Ao=Po(Ro),Do="_fadeIn_4aird_1",jo={"purpur-modal-content":"_purpur-modal-content_4aird_1",fadeIn:Do,"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"},rt=e=>e.showCloseButton===!0,P=Ao.bind(jo),C="purpur-modal-content",To=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,...m},b)=>{const{closeButtonAriaLabel:l,showCloseButton:g,..._}=m,[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=j=>e?`${e} ${j}`:void 0,z=j=>{n&&j.preventDefault()},B=O.useCallback(()=>{if(!N.current||!y.current)return;const j=window.getComputedStyle(N.current,null),Y=parseFloat(j.getPropertyValue("height")),Gt=y.current.offsetHeight;w(Y<Gt),x((N.current.offsetWidth??0)-(N.current.clientWidth??0))},[]),zt=()=>{const j=y.current;if(j){const Y=j.querySelector("h2");Y&&setTimeout(()=>{Y.focus()})}},Kt=j=>{n&&!g&&j.preventDefault()};return O.useEffect(()=>(window.addEventListener("resize",B),()=>{window.removeEventListener("resize",B)}),[B]),O.useEffect(()=>{B()},[f,r,B]),c.jsxs(Nn,{children:[c.jsx(Pn,{className:P(`${C}__overlay`),style:{zIndex:v}}),c.jsxs(On,{..._,className:A,"data-testid":e,ref:b,...!a&&{"aria-describedby":void 0},onPointerDownOutside:z,onOpenAutoFocus:()=>{B(),zt()},onEscapeKeyDown:Kt,onCloseAutoFocus:h,style:{zIndex:`calc(${v} + 1)`},children:[c.jsxs("div",{ref:N,className:P(`${C}__wrapper`),children:[rt(m)&&l&&u&&c.jsx(nt,{"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:[rt(m)&&l&&!u&&c.jsx(nt,{"aria-label":l,"data-testid":R("close-button")}),c.jsx(Rn,{asChild:!0,className:P(`${C}__title`),"data-testid":R("title"),children:c.jsx(Wt,{tag:"h2",variant:"title-200",tabIndex:-1,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(No,{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(ot,{actions:t,notification:f})]})})]})]}),p&&c.jsx(ot,{actions:t,notification:f})]})]})}),nt=({["aria-label"]:e,hasImage:t,scrollbarWidth:r,["data-testid"]:o})=>c.jsx(An,{asChild:!0,children:c.jsx(kt,{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,{})})}),ot=({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},Mo=O.forwardRef(({children:e,...t},r)=>c.jsx(Cn,{asChild:!0,ref:r,...t,children:e})),ce=({["data-testid"]:e,children:t,open:r,onOpenChange:o})=>c.jsx(Sn,{open:r,onOpenChange:o,"data-testid":e,children:t});ce.Trigger=Mo;ce.Content=To;ce.displayName="Modal";exports.Modal=ce;
69
+ */var Qe;function Do(){return Qe||(Qe=1,(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var n="",u=0;u<arguments.length;u++){var i=arguments[u];i&&(n=a(n,o.call(this,i)))}return n}function o(n){if(typeof n=="string"||typeof n=="number")return this&&this[n]||n;if(typeof n!="object")return"";if(Array.isArray(n))return r.apply(this,n);if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]"))return n.toString();var u="";for(var i in n)t.call(n,i)&&n[i]&&(u=a(u,this&&this[i]||i));return u}function a(n,u){return u?n?n+" "+u:n+u:n}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(ye)),ye.exports}var jo=Do();const To=Ao(jo),$o="_fadeIn_4aird_1",Mo={"purpur-modal-content":"_purpur-modal-content_4aird_1",fadeIn:$o,"purpur-modal-content__overlay":"_purpur-modal-content__overlay_4aird_30","purpur-modal-content__close-button":"_purpur-modal-content__close-button_4aird_37","purpur-modal-content__wrapper":"_purpur-modal-content__wrapper_4aird_47","purpur-modal-content__wrapper-inner":"_purpur-modal-content__wrapper-inner_4aird_57","purpur-modal-content__image-wrapper":"_purpur-modal-content__image-wrapper_4aird_61","purpur-modal-content__header":"_purpur-modal-content__header_4aird_84","purpur-modal-content__title":"_purpur-modal-content__title_4aird_97","purpur-modal-content__description":"_purpur-modal-content__description_4aird_100","purpur-modal-content__body":"_purpur-modal-content__body_4aird_103","purpur-modal-content__body-inner":"_purpur-modal-content__body-inner_4aird_111","purpur-modal-content__actions-buttons":"_purpur-modal-content__actions-buttons_4aird_123","purpur-modal-content__notification":"_purpur-modal-content__notification_4aird_141","purpur-modal-content--with-image":"_purpur-modal-content--with-image_4aird_144","purpur-modal-content--overflow":"_purpur-modal-content--overflow_4aird_144","purpur-modal-content__actions":"_purpur-modal-content__actions_4aird_123","purpur-modal-content__actions-separator":"_purpur-modal-content__actions-separator_4aird_175","purpur-modal-content--sticky-footer":"_purpur-modal-content--sticky-footer_4aird_185"},Je=e=>e.showCloseButton===!0,O=To.bind(Mo),C="purpur-modal-content",Io=P.forwardRef(({["data-testid"]:e,actions:t,children:r,className:o,description:a,disableCloseOnClickOutside:n,hideDescription:u,image:i,stickyButtons:p=!0,title:c,notification:f=void 0,zIndex:v,onCloseAutoFocus:h,...m},b)=>{const{closeButtonAriaLabel:l,showCloseButton:g,..._}=m,[w,E]=P.useState(!1),[x,S]=P.useState(0),N=P.useRef(null),y=P.useRef(null),A=O(C,{[`${C}--with-image`]:!!i},{[`${C}--overflow`]:w},{[`${C}--sticky-footer`]:p},o),R=j=>e?`${e} ${j}`:void 0,q=j=>{n&&j.preventDefault()},W=P.useCallback(()=>{if(!N.current||!y.current)return;const j=window.getComputedStyle(N.current,null),X=parseFloat(j.getPropertyValue("height")),qt=y.current.offsetHeight;E(X<qt),S((N.current.offsetWidth??0)-(N.current.clientWidth??0))},[]),Vt=()=>{const j=y.current;if(j){const X=j.querySelector("h2");X&&setTimeout(()=>{X.focus()})}},Ht=j=>{n&&!g&&j.preventDefault()};return P.useEffect(()=>(window.addEventListener("resize",W),()=>{window.removeEventListener("resize",W)}),[W]),P.useEffect(()=>{W()},[f,r,W]),d.jsxs(On,{children:[d.jsx(Pn,{className:O(`${C}__overlay`),style:{zIndex:v}}),d.jsxs(Rn,{..._,className:A,"data-testid":e,ref:b,...!a&&{"aria-describedby":void 0},onPointerDownOutside:q,onOpenAutoFocus:()=>{W(),Vt()},onEscapeKeyDown:Ht,onCloseAutoFocus:h,style:{zIndex:`calc(${v} + 1)`},children:[d.jsxs("div",{ref:N,className:O(`${C}__wrapper`),children:[Je(m)&&l&&i&&d.jsx(et,{"aria-label":l,hasImage:!0,scrollbarWidth:x,"data-testid":R("close-button")}),d.jsxs("div",{ref:y,className:O(`${C}__wrapper-inner`),children:[d.jsxs("div",{className:O(`${C}__header`),children:[Je(m)&&l&&!i&&d.jsx(et,{"aria-label":l,"data-testid":R("close-button")}),d.jsx(An,{asChild:!0,className:O(`${C}__title`),"data-testid":R("title"),children:d.jsx(Ft,{tag:"h2",variant:"title-200",tabIndex:-1,children:c})})]}),i&&d.jsx("div",{className:O(`${C}__image-wrapper`),"data-testid":R("image"),children:i}),d.jsx("div",{className:O(`${C}__body`),children:d.jsxs("div",{className:O(`${C}__body-inner`),children:[a&&u&&d.jsx(Ro,{asChild:!0,children:d.jsx(Fe,{"data-testid":R("description"),children:a})}),a&&!u&&d.jsx(Fe,{asChild:!0,className:O(`${C}__description`),"data-testid":R("description"),children:d.jsx(Bt,{variant:"paragraph-100",children:a})}),d.jsx("div",{children:r}),!p&&d.jsx(tt,{actions:t,notification:f})]})})]})]}),p&&d.jsx(tt,{actions:t,notification:f})]})]})}),et=({["aria-label"]:e,hasImage:t,scrollbarWidth:r,["data-testid"]:o})=>d.jsx(Dn,{asChild:!0,children:d.jsx(Lt,{variant:t?"primary":"tertiary-purple",negative:t,size:"sm",iconOnly:!0,"aria-label":e,className:O(`${C}__close-button`),style:{right:`calc(var(--purpur-spacing-100) + ${r||0}px)`},"data-testid":o,children:d.jsx(Wt,{})})}),tt=({actions:e,notification:t})=>{const r=P.useRef(null);return P.useEffect(()=>{var o,a;t&&((a=(o=r==null?void 0:r.current)==null?void 0:o.scrollIntoView)==null||a.call(o,!1))},[t]),e?d.jsxs("div",{className:O(`${C}__actions`),children:[d.jsx("div",{className:O(`${C}__actions-buttons`),"data-testid":"modal actions",children:e}),t&&d.jsx("div",{className:O(`${C}__notification`),ref:r,children:t}),d.jsx("span",{className:O(`${C}__actions-separator`)})]}):null},Lo=P.forwardRef(({children:e,...t},r)=>d.jsx(Nn,{asChild:!0,ref:r,...t,children:e})),le=({["data-testid"]:e,children:t,open:r,onOpenChange:o})=>d.jsx(Cn,{open:r,onOpenChange:o,"data-testid":e,children:t});le.Trigger=Lo;le.Content=Io;le.displayName="Modal";exports.Modal=le;
70
70
  //# sourceMappingURL=modal.cjs.js.map