@purpurds/modal 6.1.2 → 6.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/LICENSE.txt +5 -5
- package/dist/modal-content.d.ts +6 -2
- package/dist/modal-content.d.ts.map +1 -1
- package/dist/modal-trigger.d.ts.map +1 -1
- package/dist/modal.cjs.js +14 -14
- package/dist/modal.cjs.js.map +1 -1
- package/dist/modal.d.ts.map +1 -1
- package/dist/modal.es.js +360 -368
- package/dist/modal.es.js.map +1 -1
- package/package.json +9 -9
- package/src/modal-content.tsx +29 -16
- package/src/modal-trigger.tsx +3 -9
- package/src/modal.tsx +6 -8
package/dist/LICENSE.txt
CHANGED
|
@@ -387,35 +387,35 @@ Homepage: https://radix-ui.com/primitives
|
|
|
387
387
|
---
|
|
388
388
|
|
|
389
389
|
Name: @purpurds/button
|
|
390
|
-
Version: 6.1.
|
|
390
|
+
Version: 6.1.3
|
|
391
391
|
License: AGPL-3.0-only
|
|
392
392
|
Private: false
|
|
393
393
|
|
|
394
394
|
---
|
|
395
395
|
|
|
396
396
|
Name: @purpurds/heading
|
|
397
|
-
Version: 6.1.
|
|
397
|
+
Version: 6.1.3
|
|
398
398
|
License: AGPL-3.0-only
|
|
399
399
|
Private: false
|
|
400
400
|
|
|
401
401
|
---
|
|
402
402
|
|
|
403
403
|
Name: @purpurds/icon
|
|
404
|
-
Version: 6.1.
|
|
404
|
+
Version: 6.1.3
|
|
405
405
|
License: AGPL-3.0-only
|
|
406
406
|
Private: false
|
|
407
407
|
|
|
408
408
|
---
|
|
409
409
|
|
|
410
410
|
Name: @purpurds/paragraph
|
|
411
|
-
Version: 6.1.
|
|
411
|
+
Version: 6.1.3
|
|
412
412
|
License: AGPL-3.0-only
|
|
413
413
|
Private: false
|
|
414
414
|
|
|
415
415
|
---
|
|
416
416
|
|
|
417
417
|
Name: @purpurds/visually-hidden
|
|
418
|
-
Version: 6.1.
|
|
418
|
+
Version: 6.1.3
|
|
419
419
|
License: AGPL-3.0-only
|
|
420
420
|
Private: false
|
|
421
421
|
|
package/dist/modal-content.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode, default as React } from 'react';
|
|
1
|
+
import { MouseEventHandler, ReactNode, default as React } from 'react';
|
|
2
2
|
import { DataAttributes } from './types';
|
|
3
3
|
|
|
4
4
|
export declare const primaryActionVariants: readonly ["primary", "expressive", "destructive"];
|
|
@@ -10,7 +10,7 @@ export type DefaultProps = {
|
|
|
10
10
|
* */
|
|
11
11
|
actions?: ({
|
|
12
12
|
label: string;
|
|
13
|
-
onClick:
|
|
13
|
+
onClick: MouseEventHandler<HTMLButtonElement>;
|
|
14
14
|
disabled?: boolean;
|
|
15
15
|
loading?: boolean;
|
|
16
16
|
icon?: ReactNode;
|
|
@@ -55,6 +55,10 @@ export type DefaultProps = {
|
|
|
55
55
|
* z-index of the modal
|
|
56
56
|
* */
|
|
57
57
|
zIndex?: number;
|
|
58
|
+
/**
|
|
59
|
+
* Event handler called when focus moves to the trigger after closing.
|
|
60
|
+
* */
|
|
61
|
+
onCloseAutoFocus?: (e: Event) => void;
|
|
58
62
|
};
|
|
59
63
|
type NoCloseButtonProps = {
|
|
60
64
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modal-content.d.ts","sourceRoot":"","sources":["../src/modal-content.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAgB,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"modal-content.d.ts","sourceRoot":"","sources":["../src/modal-content.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAgB,iBAAiB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACxE,OAAO,KAA+D,MAAM,OAAO,CAAC;AAgBpF,OAAO,+BAA+B,CAAC;AAEvC,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzC,eAAO,MAAM,qBAAqB,mDAAoD,CAAC;AACvF,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1E,MAAM,MAAM,YAAY,GAAG;IACzB,CAAC,aAAa,CAAC,CAAC,EAAE,MAAM,CAAC;IACzB;;SAEK;IACL,OAAO,CAAC,EAAE,CAAC;QACT,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;QAC9C,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,IAAI,CAAC,EAAE,SAAS,CAAC;QACjB,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;KACjC,GAAG,cAAc,CAAC,EAAE,CAAC;IACtB,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;SAEK;IACL,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;SAEK;IACL,0BAA0B,CAAC,EAAE,OAAO,CAAC;IACrC;;SAEK;IACL,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;SAEK;IACL,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;SAEK;IACL,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB;;;SAGK;IACL,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;IAC5C;;SAEK;IACL,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;SAEK;IACL,KAAK,EAAE,MAAM,CAAC;IACd;;SAEK;IACL,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;SAEK;IACL,gBAAgB,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,KAAK,IAAI,CAAC;CACvC,CAAC;AAEF,KAAK,kBAAkB,GAAG;IACxB;;SAEK;IACL,oBAAoB,CAAC,EAAE,KAAK,CAAC;IAC7B;;SAEK;IACL,eAAe,CAAC,EAAE,KAAK,CAAC;CACzB,CAAC;AAEF,KAAK,gBAAgB,GAAG;IACtB;;SAEK;IACL,oBAAoB,EAAE,MAAM,CAAC;IAC7B;;SAEK;IACL,eAAe,EAAE,IAAI,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,YAAY,GAAG,CAAC,gBAAgB,GAAG,kBAAkB,CAAC,CAAC;AASvF,eAAO,MAAM,YAAY;2BAkB2B,SAAS,GAAG,YAAY,GAAG,aAAa;yCAiJ3F,CAAC;AA0BF,eAAO,MAAM,qBAAqB,IAAI,CAAC;AAEvC,eAAO,MAAM,YAAY,qDAItB,IAAI,CAAC,iBAAiB,EAAE,SAAS,GAAG,cAAc,CAAC,GAAG;IACvD,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;CAC7C,6BA6CA,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modal-trigger.d.ts","sourceRoot":"","sources":["../src/modal-trigger.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAA4B,SAAS,EAAE,MAAM,OAAO,CAAC;AAGnE,MAAM,MAAM,iBAAiB,GAAG;IAC9B,CAAC,aAAa,CAAC,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"modal-trigger.d.ts","sourceRoot":"","sources":["../src/modal-trigger.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAA4B,SAAS,EAAE,MAAM,OAAO,CAAC;AAGnE,MAAM,MAAM,iBAAiB,GAAG;IAC9B,CAAC,aAAa,CAAC,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,YAAY,6FAWxB,CAAC"}
|
package/dist/modal.cjs.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),O=require("react"),Ke=require("react-dom");function Xe(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=Xe(O),qt=Xe(Ke);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 Pe(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ye(...e){return t=>{let r=!1;const o=e.map(a=>{const n=Pe(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():Pe(e[a],null)}}}}function W(...e){return s.useCallback(Ye(...e),e)}function Ut(e,t){const r=s.createContext(t),o=n=>{const{children:i,...u}=n,f=s.useMemo(()=>u,Object.values(u));return c.jsx(r.Provider,{value:f,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 Vt(e,t=[]){let r=[];function o(n,i){const u=s.createContext(i),f=r.length;r=[...r,i];const l=v=>{var _;const{scope:h,children:g,...w}=v,d=((_=h==null?void 0:h[e])==null?void 0:_[f])||u,m=s.useMemo(()=>w,Object.values(w));return c.jsx(d.Provider,{value:m,children:g})};l.displayName=n+"Provider";function p(v,h){var d;const g=((d=h==null?void 0:h[e])==null?void 0:d[f])||u,w=s.useContext(g);if(w)return w;if(i!==void 0)return i;throw new Error(`\`${v}\` must be used within \`${n}\``)}return[l,p]}const a=()=>{const n=r.map(i=>s.createContext(i));return function(u){const f=(u==null?void 0:u[e])||n;return s.useMemo(()=>({[`__scope${e}`]:{...u,[e]:f}}),[u,f])}};return a.scopeName=e,[o,zt(a,...t)]}function zt(...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:f,scopeName:l})=>{const v=f(n)[`__scope${l}`];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:()=>{},Ht=s.useId||(()=>{}),Gt=0;function le(e){const[t,r]=s.useState(Ht());return ae(()=>{e||r(o=>o??String(Gt++))},[e]),e||(t?`radix-${t}`:"")}function k(e){const t=s.useRef(e);return s.useEffect(()=>{t.current=e}),s.useMemo(()=>(...r)=>{var o;return(o=t.current)==null?void 0:o.call(t,...r)},[])}function Kt({prop:e,defaultProp:t,onChange:r=()=>{}}){const[o,a]=Xt({defaultProp:t,onChange:r}),n=e!==void 0,i=n?e:o,u=k(r),f=s.useCallback(l=>{if(n){const v=typeof l=="function"?l(e):l;v!==e&&u(v)}else a(l)},[n,e,a,u]);return[i,f]}function Xt({defaultProp:e,onChange:t}){const r=s.useState(e),[o]=r,a=s.useRef(o),n=k(t);return s.useEffect(()=>{a.current!==o&&(n(o),a.current=o)},[o,a,n]),r}var Ee=s.forwardRef((e,t)=>{const{children:r,...o}=e,a=s.Children.toArray(r),n=a.find(Zt);if(n){const i=n.props.children,u=a.map(f=>f===n?s.Children.count(i)>1?s.Children.only(null):s.isValidElement(i)?i.props.children:null:f);return c.jsx(_e,{...o,ref:t,children:s.isValidElement(i)?s.cloneElement(i,void 0,u):null})}return c.jsx(_e,{...o,ref:t,children:r})});Ee.displayName="Slot";var _e=s.forwardRef((e,t)=>{const{children:r,...o}=e;if(s.isValidElement(r)){const a=Jt(r),n=Qt(o,r.props);return r.type!==s.Fragment&&(n.ref=t?Ye(t,a):a),s.cloneElement(r,n)}return s.Children.count(r)>1?s.Children.only(null):null});_e.displayName="SlotClone";var Yt=({children:e})=>c.jsx(c.Fragment,{children:e});function Zt(e){return s.isValidElement(e)&&e.type===Yt}function Qt(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 Jt(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 er=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],T=er.reduce((e,t)=>{const r=s.forwardRef((o,a)=>{const{asChild:n,...i}=o,u=n?Ee: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 tr(e,t){e&&qt.flushSync(()=>e.dispatchEvent(t))}function rr(e,t=globalThis==null?void 0:globalThis.document){const r=k(e);s.useEffect(()=>{const o=a=>{a.key==="Escape"&&r(a)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[r,t])}var nr="DismissableLayer",ye="dismissableLayer.update",or="dismissableLayer.pointerDownOutside",ar="dismissableLayer.focusOutside",Re,Ze=s.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Qe=s.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:n,onInteractOutside:i,onDismiss:u,...f}=e,l=s.useContext(Ze),[p,v]=s.useState(null),h=(p==null?void 0:p.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=s.useState({}),w=W(t,y=>v(y)),d=Array.from(l.layers),[m]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),_=d.indexOf(m),S=p?d.indexOf(p):-1,E=l.layersWithOutsidePointerEventsDisabled.size>0,b=S>=_,x=sr(y=>{const A=y.target,P=[...l.branches].some(z=>z.contains(A));!b||P||(a==null||a(y),i==null||i(y),y.defaultPrevented||u==null||u())},h),R=cr(y=>{const A=y.target;[...l.branches].some(z=>z.contains(A))||(n==null||n(y),i==null||i(y),y.defaultPrevented||u==null||u())},h);return rr(y=>{S===l.layers.size-1&&(o==null||o(y),!y.defaultPrevented&&u&&(y.preventDefault(),u()))},h),s.useEffect(()=>{if(p)return r&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(Re=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(p)),l.layers.add(p),Ae(),()=>{r&&l.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Re)}},[p,h,r,l]),s.useEffect(()=>()=>{p&&(l.layers.delete(p),l.layersWithOutsidePointerEventsDisabled.delete(p),Ae())},[p,l]),s.useEffect(()=>{const y=()=>g({});return document.addEventListener(ye,y),()=>document.removeEventListener(ye,y)},[]),c.jsx(T.div,{...f,ref:w,style:{pointerEvents:E?b?"auto":"none":void 0,...e.style},onFocusCapture:I(e.onFocusCapture,R.onFocusCapture),onBlurCapture:I(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:I(e.onPointerDownCapture,x.onPointerDownCapture)})});Qe.displayName=nr;var ir="DismissableLayerBranch",ur=s.forwardRef((e,t)=>{const r=s.useContext(Ze),o=s.useRef(null),a=W(t,o);return s.useEffect(()=>{const n=o.current;if(n)return r.branches.add(n),()=>{r.branches.delete(n)}},[r.branches]),c.jsx(T.div,{...e,ref:a})});ur.displayName=ir;function sr(e,t=globalThis==null?void 0:globalThis.document){const r=k(e),o=s.useRef(!1),a=s.useRef(()=>{});return s.useEffect(()=>{const n=u=>{if(u.target&&!o.current){let f=function(){Je(or,r,l,{discrete:!0})};const l={originalEvent:u};u.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=f,t.addEventListener("click",a.current,{once:!0})):f()}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 cr(e,t=globalThis==null?void 0:globalThis.document){const r=k(e),o=s.useRef(!1);return s.useEffect(()=>{const a=n=>{n.target&&!o.current&&Je(ar,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(ye);document.dispatchEvent(e)}function Je(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?tr(a,n):a.dispatchEvent(n)}var de="focusScope.autoFocusOnMount",fe="focusScope.autoFocusOnUnmount",je={bubbles:!1,cancelable:!0},lr="FocusScope",et=s.forwardRef((e,t)=>{const{loop:r=!1,trapped:o=!1,onMountAutoFocus:a,onUnmountAutoFocus:n,...i}=e,[u,f]=s.useState(null),l=k(a),p=k(n),v=s.useRef(null),h=W(t,d=>f(d)),g=s.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;s.useEffect(()=>{if(o){let d=function(E){if(g.paused||!u)return;const b=E.target;u.contains(b)?v.current=b:M(v.current,{select:!0})},m=function(E){if(g.paused||!u)return;const b=E.relatedTarget;b!==null&&(u.contains(b)||M(v.current,{select:!0}))},_=function(E){if(document.activeElement===document.body)for(const x of E)x.removedNodes.length>0&&M(u)};document.addEventListener("focusin",d),document.addEventListener("focusout",m);const S=new MutationObserver(_);return u&&S.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",d),document.removeEventListener("focusout",m),S.disconnect()}}},[o,u,g.paused]),s.useEffect(()=>{if(u){Te.add(g);const d=document.activeElement;if(!u.contains(d)){const _=new CustomEvent(de,je);u.addEventListener(de,l),u.dispatchEvent(_),_.defaultPrevented||(dr(mr(tt(u)),{select:!0}),document.activeElement===d&&M(u))}return()=>{u.removeEventListener(de,l),setTimeout(()=>{const _=new CustomEvent(fe,je);u.addEventListener(fe,p),u.dispatchEvent(_),_.defaultPrevented||M(d??document.body,{select:!0}),u.removeEventListener(fe,p),Te.remove(g)},0)}}},[u,l,p,g]);const w=s.useCallback(d=>{if(!r&&!o||g.paused)return;const m=d.key==="Tab"&&!d.altKey&&!d.ctrlKey&&!d.metaKey,_=document.activeElement;if(m&&_){const S=d.currentTarget,[E,b]=fr(S);E&&b?!d.shiftKey&&_===b?(d.preventDefault(),r&&M(E,{select:!0})):d.shiftKey&&_===E&&(d.preventDefault(),r&&M(b,{select:!0})):_===S&&d.preventDefault()}},[r,o,g.paused]);return c.jsx(T.div,{tabIndex:-1,...i,ref:h,onKeyDown:w})});et.displayName=lr;function dr(e,{select:t=!1}={}){const r=document.activeElement;for(const o of e)if(M(o,{select:t}),document.activeElement!==r)return}function fr(e){const t=tt(e),r=De(t,e),o=De(t.reverse(),e);return[r,o]}function tt(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 De(e,t){for(const r of e)if(!pr(r,{upTo:t}))return r}function pr(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 vr(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&&vr(e)&&t&&e.select()}}var Te=hr();function hr(){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 mr(e){return e.filter(t=>t.tagName!=="A")}var gr="Portal",rt=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?Ke.createPortal(c.jsx(T.div,{...o,ref:t}),i):null});rt.displayName=gr;function _r(e,t){return s.useReducer((r,o)=>t[r][o]??r,e)}var ue=e=>{const{present:t,children:r}=e,o=yr(t),a=typeof r=="function"?r({present:o.isPresent}):s.Children.only(r),n=W(o.ref,br(a));return typeof r=="function"||o.isPresent?s.cloneElement(a,{ref:n}):null};ue.displayName="Presence";function yr(e){const[t,r]=s.useState(),o=s.useRef({}),a=s.useRef(e),n=s.useRef("none"),i=e?"mounted":"unmounted",[u,f]=_r(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return s.useEffect(()=>{const l=Y(o.current);n.current=u==="mounted"?l:"none"},[u]),ae(()=>{const l=o.current,p=a.current;if(p!==e){const h=n.current,g=Y(l);e?f("MOUNT"):g==="none"||(l==null?void 0:l.display)==="none"?f("UNMOUNT"):f(p&&h!==g?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,f]),ae(()=>{if(t){let l;const p=t.ownerDocument.defaultView??window,v=g=>{const d=Y(o.current).includes(g.animationName);if(g.target===t&&d&&(f("ANIMATION_END"),!a.current)){const m=t.style.animationFillMode;t.style.animationFillMode="forwards",l=p.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=m)})}},h=g=>{g.target===t&&(n.current=Y(o.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",v),t.addEventListener("animationend",v),()=>{p.clearTimeout(l),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",v),t.removeEventListener("animationend",v)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:s.useCallback(l=>{l&&(o.current=getComputedStyle(l)),r(l)},[])}}function Y(e){return(e==null?void 0:e.animationName)||"none"}function br(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 pe=0;function wr(){s.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Ie()),document.body.insertAdjacentElement("beforeend",e[1]??Ie()),pe++,()=>{pe===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),pe--}},[])}function Ie(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var D=function(){return D=Object.assign||function(t){for(var r,o=1,a=arguments.length;o<a;o++){r=arguments[o];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},D.apply(this,arguments)};function nt(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 Er(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",xr="with-scroll-bars-hidden",Sr="--removed-body-scroll-bar-size";function ve(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Cr(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 Nr=typeof window<"u"?s.useLayoutEffect:s.useEffect,Le=new WeakMap;function Or(e,t){var r=Cr(null,function(o){return e.forEach(function(a){return ve(a,o)})});return Nr(function(){var o=Le.get(r);if(o){var a=new Set(o),n=new Set(e),i=r.current;a.forEach(function(u){n.has(u)||ve(u,null)}),n.forEach(function(u){a.has(u)||ve(u,i)})}Le.set(r,e)},[e]),r}function Pr(e){return e}function Rr(e,t){t===void 0&&(t=Pr);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 f=function(){var p=i;i=[],p.forEach(n)},l=function(){return Promise.resolve().then(f)};l(),r={push:function(p){i.push(p),l()},filter:function(p){return i=i.filter(p),r}}}};return a}function Ar(e){e===void 0&&(e={});var t=Rr(null);return t.options=D({async:!0,ssr:!1},e),t}var ot=function(e){var t=e.sideCar,r=nt(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return s.createElement(o,D({},r))};ot.isSideCarExport=!0;function jr(e,t){return e.useMedium(t),ot}var at=Ar(),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,f=e.className,l=e.removeScrollBar,p=e.enabled,v=e.shards,h=e.sideCar,g=e.noIsolation,w=e.inert,d=e.allowPinchZoom,m=e.as,_=m===void 0?"div":m,S=e.gapMode,E=nt(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),b=h,x=Or([r,t]),R=D(D({},E),a);return s.createElement(s.Fragment,null,p&&s.createElement(b,{sideCar:at,removeScrollBar:l,shards:v,noIsolation:g,inert:w,setCallbacks:n,allowPinchZoom:!!d,lockRef:r,gapMode:S}),i?s.cloneElement(s.Children.only(u),D(D({},R),{ref:x})):s.createElement(_,D({},R,{className:f,ref:x}),u))});se.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};se.classNames={fullWidth:oe,zeroRight:ne};var Dr=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Tr(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Dr();return t&&e.setAttribute("nonce",t),e}function Mr(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Ir(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Lr=function(){var e=0,t=null;return{add:function(r){e==0&&(t=Tr())&&(Mr(t,r),Ir(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},$r=function(){var e=Lr();return function(t,r){s.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},it=function(){var e=$r(),t=function(r){var o=r.styles,a=r.dynamic;return e(o,a),null};return t},kr={left:0,top:0,right:0,gap:0},me=function(e){return parseInt(e||"",10)||0},Fr=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)]},Wr=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return kr;var t=Fr(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])}},Br=it(),V="data-scroll-locked",qr=function(e,t,r,o){var a=e.left,n=e.top,i=e.right,u=e.gap;return r===void 0&&(r="margin"),`
|
|
2
|
-
.`.concat(
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),R=require("react"),Ke=require("react-dom");function Xe(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=Xe(R),Ut=Xe(Ke);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 Pe(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ye(...e){return t=>{let r=!1;const o=e.map(a=>{const n=Pe(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():Pe(e[a],null)}}}}function B(...e){return s.useCallback(Ye(...e),e)}function Vt(e,t){const r=s.createContext(t),o=n=>{const{children:i,...u}=n,f=s.useMemo(()=>u,Object.values(u));return c.jsx(r.Provider,{value:f,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),f=r.length;r=[...r,i];const l=v=>{var _;const{scope:h,children:g,...y}=v,d=((_=h==null?void 0:h[e])==null?void 0:_[f])||u,m=s.useMemo(()=>y,Object.values(y));return c.jsx(d.Provider,{value:m,children:g})};l.displayName=n+"Provider";function p(v,h){var d;const g=((d=h==null?void 0:h[e])==null?void 0:d[f])||u,y=s.useContext(g);if(y)return y;if(i!==void 0)return i;throw new Error(`\`${v}\` must be used within \`${n}\``)}return[l,p]}const a=()=>{const n=r.map(i=>s.createContext(i));return function(u){const f=(u==null?void 0:u[e])||n;return s.useMemo(()=>({[`__scope${e}`]:{...u,[e]:f}}),[u,f])}};return a.scopeName=e,[o,Ht(a,...t)]}function Ht(...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:f,scopeName:l})=>{const v=f(n)[`__scope${l}`];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:()=>{},Gt=s.useId||(()=>{}),Kt=0;function le(e){const[t,r]=s.useState(Gt());return ae(()=>{e||r(o=>o??String(Kt++))},[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 Xt({prop:e,defaultProp:t,onChange:r=()=>{}}){const[o,a]=Yt({defaultProp:t,onChange:r}),n=e!==void 0,i=n?e:o,u=F(r),f=s.useCallback(l=>{if(n){const v=typeof l=="function"?l(e):l;v!==e&&u(v)}else a(l)},[n,e,a,u]);return[i,f]}function Yt({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 Ee=s.forwardRef((e,t)=>{const{children:r,...o}=e,a=s.Children.toArray(r),n=a.find(Qt);if(n){const i=n.props.children,u=a.map(f=>f===n?s.Children.count(i)>1?s.Children.only(null):s.isValidElement(i)?i.props.children:null:f);return c.jsx(_e,{...o,ref:t,children:s.isValidElement(i)?s.cloneElement(i,void 0,u):null})}return c.jsx(_e,{...o,ref:t,children:r})});Ee.displayName="Slot";var _e=s.forwardRef((e,t)=>{const{children:r,...o}=e;if(s.isValidElement(r)){const a=er(r),n=Jt(o,r.props);return r.type!==s.Fragment&&(n.ref=t?Ye(t,a):a),s.cloneElement(r,n)}return s.Children.count(r)>1?s.Children.only(null):null});_e.displayName="SlotClone";var Zt=({children:e})=>c.jsx(c.Fragment,{children:e});function Qt(e){return s.isValidElement(e)&&e.type===Zt}function Jt(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 er(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 tr=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],T=tr.reduce((e,t)=>{const r=s.forwardRef((o,a)=>{const{asChild:n,...i}=o,u=n?Ee: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 rr(e,t){e&&Ut.flushSync(()=>e.dispatchEvent(t))}function nr(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 or="DismissableLayer",ye="dismissableLayer.update",ar="dismissableLayer.pointerDownOutside",ir="dismissableLayer.focusOutside",Re,Ze=s.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Qe=s.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:n,onInteractOutside:i,onDismiss:u,...f}=e,l=s.useContext(Ze),[p,v]=s.useState(null),h=(p==null?void 0:p.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=s.useState({}),y=B(t,b=>v(b)),d=Array.from(l.layers),[m]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),_=d.indexOf(m),S=p?d.indexOf(p):-1,w=l.layersWithOutsidePointerEventsDisabled.size>0,E=S>=_,x=cr(b=>{const N=b.target,L=[...l.branches].some(j=>j.contains(N));!E||L||(a==null||a(b),i==null||i(b),b.defaultPrevented||u==null||u())},h),P=lr(b=>{const N=b.target;[...l.branches].some(j=>j.contains(N))||(n==null||n(b),i==null||i(b),b.defaultPrevented||u==null||u())},h);return nr(b=>{S===l.layers.size-1&&(o==null||o(b),!b.defaultPrevented&&u&&(b.preventDefault(),u()))},h),s.useEffect(()=>{if(p)return r&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(Re=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(p)),l.layers.add(p),Ae(),()=>{r&&l.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Re)}},[p,h,r,l]),s.useEffect(()=>()=>{p&&(l.layers.delete(p),l.layersWithOutsidePointerEventsDisabled.delete(p),Ae())},[p,l]),s.useEffect(()=>{const b=()=>g({});return document.addEventListener(ye,b),()=>document.removeEventListener(ye,b)},[]),c.jsx(T.div,{...f,ref:y,style:{pointerEvents:w?E?"auto":"none":void 0,...e.style},onFocusCapture:I(e.onFocusCapture,P.onFocusCapture),onBlurCapture:I(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:I(e.onPointerDownCapture,x.onPointerDownCapture)})});Qe.displayName=or;var ur="DismissableLayerBranch",sr=s.forwardRef((e,t)=>{const r=s.useContext(Ze),o=s.useRef(null),a=B(t,o);return s.useEffect(()=>{const n=o.current;if(n)return r.branches.add(n),()=>{r.branches.delete(n)}},[r.branches]),c.jsx(T.div,{...e,ref:a})});sr.displayName=ur;function cr(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 f=function(){Je(ar,r,l,{discrete:!0})};const l={originalEvent:u};u.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=f,t.addEventListener("click",a.current,{once:!0})):f()}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 lr(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&&Je(ir,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(ye);document.dispatchEvent(e)}function Je(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?rr(a,n):a.dispatchEvent(n)}var de="focusScope.autoFocusOnMount",fe="focusScope.autoFocusOnUnmount",je={bubbles:!1,cancelable:!0},dr="FocusScope",et=s.forwardRef((e,t)=>{const{loop:r=!1,trapped:o=!1,onMountAutoFocus:a,onUnmountAutoFocus:n,...i}=e,[u,f]=s.useState(null),l=F(a),p=F(n),v=s.useRef(null),h=B(t,d=>f(d)),g=s.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;s.useEffect(()=>{if(o){let d=function(w){if(g.paused||!u)return;const E=w.target;u.contains(E)?v.current=E:M(v.current,{select:!0})},m=function(w){if(g.paused||!u)return;const E=w.relatedTarget;E!==null&&(u.contains(E)||M(v.current,{select:!0}))},_=function(w){if(document.activeElement===document.body)for(const x of w)x.removedNodes.length>0&&M(u)};document.addEventListener("focusin",d),document.addEventListener("focusout",m);const S=new MutationObserver(_);return u&&S.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",d),document.removeEventListener("focusout",m),S.disconnect()}}},[o,u,g.paused]),s.useEffect(()=>{if(u){Te.add(g);const d=document.activeElement;if(!u.contains(d)){const _=new CustomEvent(de,je);u.addEventListener(de,l),u.dispatchEvent(_),_.defaultPrevented||(fr(gr(tt(u)),{select:!0}),document.activeElement===d&&M(u))}return()=>{u.removeEventListener(de,l),setTimeout(()=>{const _=new CustomEvent(fe,je);u.addEventListener(fe,p),u.dispatchEvent(_),_.defaultPrevented||M(d??document.body,{select:!0}),u.removeEventListener(fe,p),Te.remove(g)},0)}}},[u,l,p,g]);const y=s.useCallback(d=>{if(!r&&!o||g.paused)return;const m=d.key==="Tab"&&!d.altKey&&!d.ctrlKey&&!d.metaKey,_=document.activeElement;if(m&&_){const S=d.currentTarget,[w,E]=pr(S);w&&E?!d.shiftKey&&_===E?(d.preventDefault(),r&&M(w,{select:!0})):d.shiftKey&&_===w&&(d.preventDefault(),r&&M(E,{select:!0})):_===S&&d.preventDefault()}},[r,o,g.paused]);return c.jsx(T.div,{tabIndex:-1,...i,ref:h,onKeyDown:y})});et.displayName=dr;function fr(e,{select:t=!1}={}){const r=document.activeElement;for(const o of e)if(M(o,{select:t}),document.activeElement!==r)return}function pr(e){const t=tt(e),r=De(t,e),o=De(t.reverse(),e);return[r,o]}function tt(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 De(e,t){for(const r of e)if(!vr(r,{upTo:t}))return r}function vr(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 hr(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&&hr(e)&&t&&e.select()}}var Te=mr();function mr(){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 gr(e){return e.filter(t=>t.tagName!=="A")}var _r="Portal",rt=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?Ke.createPortal(c.jsx(T.div,{...o,ref:t}),i):null});rt.displayName=_r;function yr(e,t){return s.useReducer((r,o)=>t[r][o]??r,e)}var ue=e=>{const{present:t,children:r}=e,o=br(t),a=typeof r=="function"?r({present:o.isPresent}):s.Children.only(r),n=B(o.ref,wr(a));return typeof r=="function"||o.isPresent?s.cloneElement(a,{ref:n}):null};ue.displayName="Presence";function br(e){const[t,r]=s.useState(),o=s.useRef({}),a=s.useRef(e),n=s.useRef("none"),i=e?"mounted":"unmounted",[u,f]=yr(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return s.useEffect(()=>{const l=Y(o.current);n.current=u==="mounted"?l:"none"},[u]),ae(()=>{const l=o.current,p=a.current;if(p!==e){const h=n.current,g=Y(l);e?f("MOUNT"):g==="none"||(l==null?void 0:l.display)==="none"?f("UNMOUNT"):f(p&&h!==g?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,f]),ae(()=>{if(t){let l;const p=t.ownerDocument.defaultView??window,v=g=>{const d=Y(o.current).includes(g.animationName);if(g.target===t&&d&&(f("ANIMATION_END"),!a.current)){const m=t.style.animationFillMode;t.style.animationFillMode="forwards",l=p.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=m)})}},h=g=>{g.target===t&&(n.current=Y(o.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",v),t.addEventListener("animationend",v),()=>{p.clearTimeout(l),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",v),t.removeEventListener("animationend",v)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:s.useCallback(l=>{l&&(o.current=getComputedStyle(l)),r(l)},[])}}function Y(e){return(e==null?void 0:e.animationName)||"none"}function wr(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 pe=0;function Er(){s.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Ie()),document.body.insertAdjacentElement("beforeend",e[1]??Ie()),pe++,()=>{pe===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),pe--}},[])}function Ie(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var D=function(){return D=Object.assign||function(t){for(var r,o=1,a=arguments.length;o<a;o++){r=arguments[o];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},D.apply(this,arguments)};function nt(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 xr(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",Sr="with-scroll-bars-hidden",Cr="--removed-body-scroll-bar-size";function ve(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Nr(e,t){var r=R.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 Or=typeof window<"u"?s.useLayoutEffect:s.useEffect,Le=new WeakMap;function Pr(e,t){var r=Nr(null,function(o){return e.forEach(function(a){return ve(a,o)})});return Or(function(){var o=Le.get(r);if(o){var a=new Set(o),n=new Set(e),i=r.current;a.forEach(function(u){n.has(u)||ve(u,null)}),n.forEach(function(u){a.has(u)||ve(u,i)})}Le.set(r,e)},[e]),r}function Rr(e){return e}function Ar(e,t){t===void 0&&(t=Rr);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 f=function(){var p=i;i=[],p.forEach(n)},l=function(){return Promise.resolve().then(f)};l(),r={push:function(p){i.push(p),l()},filter:function(p){return i=i.filter(p),r}}}};return a}function jr(e){e===void 0&&(e={});var t=Ar(null);return t.options=D({async:!0,ssr:!1},e),t}var ot=function(e){var t=e.sideCar,r=nt(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return s.createElement(o,D({},r))};ot.isSideCarExport=!0;function Dr(e,t){return e.useMedium(t),ot}var at=jr(),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,f=e.className,l=e.removeScrollBar,p=e.enabled,v=e.shards,h=e.sideCar,g=e.noIsolation,y=e.inert,d=e.allowPinchZoom,m=e.as,_=m===void 0?"div":m,S=e.gapMode,w=nt(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=h,x=Pr([r,t]),P=D(D({},w),a);return s.createElement(s.Fragment,null,p&&s.createElement(E,{sideCar:at,removeScrollBar:l,shards:v,noIsolation:g,inert:y,setCallbacks:n,allowPinchZoom:!!d,lockRef:r,gapMode:S}),i?s.cloneElement(s.Children.only(u),D(D({},P),{ref:x})):s.createElement(_,D({},P,{className:f,ref:x}),u))});se.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};se.classNames={fullWidth:oe,zeroRight:ne};var Tr=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Mr(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Tr();return t&&e.setAttribute("nonce",t),e}function Ir(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Lr(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var $r=function(){var e=0,t=null;return{add:function(r){e==0&&(t=Mr())&&(Ir(t,r),Lr(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},kr=function(){var e=$r();return function(t,r){s.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},it=function(){var e=kr(),t=function(r){var o=r.styles,a=r.dynamic;return e(o,a),null};return t},Fr={left:0,top:0,right:0,gap:0},me=function(e){return parseInt(e||"",10)||0},Wr=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)]},Br=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Fr;var t=Wr(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])}},qr=it(),z="data-scroll-locked",Ur=function(e,t,r,o){var a=e.left,n=e.top,i=e.right,u=e.gap;return r===void 0&&(r="margin"),`
|
|
2
|
+
.`.concat(Sr,` {
|
|
3
3
|
overflow: hidden `).concat(o,`;
|
|
4
4
|
padding-right: `).concat(u,"px ").concat(o,`;
|
|
5
5
|
}
|
|
6
|
-
body[`).concat(
|
|
6
|
+
body[`).concat(z,`] {
|
|
7
7
|
overflow: hidden `).concat(o,`;
|
|
8
8
|
overscroll-behavior: contain;
|
|
9
9
|
`).concat([t&&"position: relative ".concat(o,";"),r==="margin"&&`
|
|
@@ -32,39 +32,39 @@
|
|
|
32
32
|
margin-right: 0 `).concat(o,`;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
body[`).concat(
|
|
36
|
-
`).concat(
|
|
35
|
+
body[`).concat(z,`] {
|
|
36
|
+
`).concat(Cr,": ").concat(u,`px;
|
|
37
37
|
}
|
|
38
|
-
`)},$e=function(){var e=parseInt(document.body.getAttribute(
|
|
38
|
+
`)},$e=function(){var e=parseInt(document.body.getAttribute(z)||"0",10);return isFinite(e)?e:0},Vr=function(){s.useEffect(function(){return document.body.setAttribute(z,($e()+1).toString()),function(){var e=$e()-1;e<=0?document.body.removeAttribute(z):document.body.setAttribute(z,e.toString())}},[])},zr=function(e){var t=e.noRelative,r=e.noImportant,o=e.gapMode,a=o===void 0?"margin":o;Vr();var n=s.useMemo(function(){return Br(a)},[a]);return s.createElement(qr,{styles:Ur(n,!t,a,r?"":"!important")})},be=!1;if(typeof window<"u")try{var Z=Object.defineProperty({},"passive",{get:function(){return be=!0,!0}});window.addEventListener("test",Z,Z),window.removeEventListener("test",Z,Z)}catch{be=!1}var q=be?{passive:!1}:!1,Hr=function(e){return e.tagName==="TEXTAREA"},ut=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!Hr(e)&&r[t]==="visible")},Gr=function(e){return ut(e,"overflowY")},Kr=function(e){return ut(e,"overflowX")},ke=function(e,t){var r=t.ownerDocument,o=t;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var a=st(e,o);if(a){var n=ct(e,o),i=n[1],u=n[2];if(i>u)return!0}o=o.parentNode}while(o&&o!==r.body);return!1},Xr=function(e){var t=e.scrollTop,r=e.scrollHeight,o=e.clientHeight;return[t,r,o]},Yr=function(e){var t=e.scrollLeft,r=e.scrollWidth,o=e.clientWidth;return[t,r,o]},st=function(e,t){return e==="v"?Gr(t):Kr(t)},ct=function(e,t){return e==="v"?Xr(t):Yr(t)},Zr=function(e,t){return e==="h"&&t==="rtl"?-1:1},Qr=function(e,t,r,o,a){var n=Zr(e,window.getComputedStyle(t).direction),i=n*o,u=r.target,f=t.contains(u),l=!1,p=i>0,v=0,h=0;do{var g=ct(e,u),y=g[0],d=g[1],m=g[2],_=d-m-n*y;(y||_)&&st(e,u)&&(v+=_,h+=y),u instanceof ShadowRoot?u=u.host:u=u.parentNode}while(!f&&u!==document.body||f&&(t.contains(u)||t===u));return(p&&Math.abs(v)<1||!p&&Math.abs(h)<1)&&(l=!0),l},Q=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Fe=function(e){return[e.deltaX,e.deltaY]},We=function(e){return e&&"current"in e?e.current:e},Jr=function(e,t){return e[0]===t[0]&&e[1]===t[1]},en=function(e){return`
|
|
39
39
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
40
40
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
41
|
-
`)},
|
|
41
|
+
`)},tn=0,U=[];function rn(e){var t=s.useRef([]),r=s.useRef([0,0]),o=s.useRef(),a=s.useState(tn++)[0],n=s.useState(it)[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 d=xr([e.lockRef.current],(e.shards||[]).map(We),!0).filter(Boolean);return d.forEach(function(m){return m.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),d.forEach(function(m){return m.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var u=s.useCallback(function(d,m){if("touches"in d&&d.touches.length===2||d.type==="wheel"&&d.ctrlKey)return!i.current.allowPinchZoom;var _=Q(d),S=r.current,w="deltaX"in d?d.deltaX:S[0]-_[0],E="deltaY"in d?d.deltaY:S[1]-_[1],x,P=d.target,b=Math.abs(w)>Math.abs(E)?"h":"v";if("touches"in d&&b==="h"&&P.type==="range")return!1;var N=ke(b,P);if(!N)return!0;if(N?x=b:(x=b==="v"?"h":"v",N=ke(b,P)),!N)return!1;if(!o.current&&"changedTouches"in d&&(w||E)&&(o.current=x),!x)return!0;var L=o.current||x;return Qr(L,m,d,L==="h"?w:E)},[]),f=s.useCallback(function(d){var m=d;if(!(!U.length||U[U.length-1]!==n)){var _="deltaY"in m?Fe(m):Q(m),S=t.current.filter(function(x){return x.name===m.type&&(x.target===m.target||m.target===x.shadowParent)&&Jr(x.delta,_)})[0];if(S&&S.should){m.cancelable&&m.preventDefault();return}if(!S){var w=(i.current.shards||[]).map(We).filter(Boolean).filter(function(x){return x.contains(m.target)}),E=w.length>0?u(m,w[0]):!i.current.noIsolation;E&&m.cancelable&&m.preventDefault()}}},[]),l=s.useCallback(function(d,m,_,S){var w={name:d,delta:m,target:_,should:S,shadowParent:nn(_)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(E){return E!==w})},1)},[]),p=s.useCallback(function(d){r.current=Q(d),o.current=void 0},[]),v=s.useCallback(function(d){l(d.type,Fe(d),d.target,u(d,e.lockRef.current))},[]),h=s.useCallback(function(d){l(d.type,Q(d),d.target,u(d,e.lockRef.current))},[]);s.useEffect(function(){return U.push(n),e.setCallbacks({onScrollCapture:v,onWheelCapture:v,onTouchMoveCapture:h}),document.addEventListener("wheel",f,q),document.addEventListener("touchmove",f,q),document.addEventListener("touchstart",p,q),function(){U=U.filter(function(d){return d!==n}),document.removeEventListener("wheel",f,q),document.removeEventListener("touchmove",f,q),document.removeEventListener("touchstart",p,q)}},[]);var g=e.removeScrollBar,y=e.inert;return s.createElement(s.Fragment,null,y?s.createElement(n,{styles:en(a)}):null,g?s.createElement(zr,{gapMode:e.gapMode}):null)}function nn(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const on=Dr(at,rn);var lt=s.forwardRef(function(e,t){return s.createElement(se,D({},e,{ref:t,sideCar:on}))});lt.classNames=se.classNames;var an=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},V=new WeakMap,J=new WeakMap,ee={},ge=0,dt=function(e){return e&&(e.host||dt(e.parentNode))},un=function(e,t){return t.map(function(r){if(e.contains(r))return r;var o=dt(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})},sn=function(e,t,r,o){var a=un(t,Array.isArray(e)?e:[e]);ee[r]||(ee[r]=new WeakMap);var n=ee[r],i=[],u=new Set,f=new Set(a),l=function(v){!v||u.has(v)||(u.add(v),l(v.parentNode))};a.forEach(l);var p=function(v){!v||f.has(v)||Array.prototype.forEach.call(v.children,function(h){if(u.has(h))p(h);else try{var g=h.getAttribute(o),y=g!==null&&g!=="false",d=(V.get(h)||0)+1,m=(n.get(h)||0)+1;V.set(h,d),n.set(h,m),i.push(h),d===1&&y&&J.set(h,!0),m===1&&h.setAttribute(r,"true"),y||h.setAttribute(o,"true")}catch(_){console.error("aria-hidden: cannot operate on ",h,_)}})};return p(t),u.clear(),ge++,function(){i.forEach(function(v){var h=V.get(v)-1,g=n.get(v)-1;V.set(v,h),n.set(v,g),h||(J.has(v)||v.removeAttribute(o),J.delete(v)),g||v.removeAttribute(r)}),ge--,ge||(V=new WeakMap,V=new WeakMap,J=new WeakMap,ee={})}},cn=function(e,t,r){r===void 0&&(r="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),a=an(e);return a?(o.push.apply(o,Array.from(a.querySelectorAll("[aria-live]"))),sn(o,a,r,"aria-hidden")):function(){return null}},xe="Dialog",[ft,wo]=zt(xe),[ln,A]=ft(xe),pt=e=>{const{__scopeDialog:t,children:r,open:o,defaultOpen:a,onOpenChange:n,modal:i=!0}=e,u=s.useRef(null),f=s.useRef(null),[l=!1,p]=Xt({prop:o,defaultProp:a,onChange:n});return c.jsx(ln,{scope:t,triggerRef:u,contentRef:f,contentId:le(),titleId:le(),descriptionId:le(),open:l,onOpenChange:p,onOpenToggle:s.useCallback(()=>p(v=>!v),[p]),modal:i,children:r})};pt.displayName=xe;var vt="DialogTrigger",ht=s.forwardRef((e,t)=>{const{__scopeDialog:r,...o}=e,a=A(vt,r),n=B(t,a.triggerRef);return c.jsx(T.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":Ne(a.open),...o,ref:n,onClick:I(e.onClick,a.onOpenToggle)})});ht.displayName=vt;var Se="DialogPortal",[dn,mt]=ft(Se,{forceMount:void 0}),gt=e=>{const{__scopeDialog:t,forceMount:r,children:o,container:a}=e,n=A(Se,t);return c.jsx(dn,{scope:t,forceMount:r,children:s.Children.map(o,i=>c.jsx(ue,{present:r||n.open,children:c.jsx(rt,{asChild:!0,container:a,children:i})}))})};gt.displayName=Se;var ie="DialogOverlay",_t=s.forwardRef((e,t)=>{const r=mt(ie,e.__scopeDialog),{forceMount:o=r.forceMount,...a}=e,n=A(ie,e.__scopeDialog);return n.modal?c.jsx(ue,{present:o||n.open,children:c.jsx(fn,{...a,ref:t})}):null});_t.displayName=ie;var fn=s.forwardRef((e,t)=>{const{__scopeDialog:r,...o}=e,a=A(ie,r);return c.jsx(lt,{as:Ee,allowPinchZoom:!0,shards:[a.contentRef],children:c.jsx(T.div,{"data-state":Ne(a.open),...o,ref:t,style:{pointerEvents:"auto",...o.style}})})}),W="DialogContent",yt=s.forwardRef((e,t)=>{const r=mt(W,e.__scopeDialog),{forceMount:o=r.forceMount,...a}=e,n=A(W,e.__scopeDialog);return c.jsx(ue,{present:o||n.open,children:n.modal?c.jsx(pn,{...a,ref:t}):c.jsx(vn,{...a,ref:t})})});yt.displayName=W;var pn=s.forwardRef((e,t)=>{const r=A(W,e.__scopeDialog),o=s.useRef(null),a=B(t,r.contentRef,o);return s.useEffect(()=>{const n=o.current;if(n)return cn(n)},[]),c.jsx(bt,{...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())})}),vn=s.forwardRef((e,t)=>{const r=A(W,e.__scopeDialog),o=s.useRef(!1),a=s.useRef(!1);return c.jsx(bt,{...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 f,l;(f=e.onInteractOutside)==null||f.call(e,n),n.defaultPrevented||(o.current=!0,n.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const i=n.target;((l=r.triggerRef.current)==null?void 0:l.contains(i))&&n.preventDefault(),n.detail.originalEvent.type==="focusin"&&a.current&&n.preventDefault()}})}),bt=s.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:n,...i}=e,u=A(W,r),f=s.useRef(null),l=B(t,f);return Er(),c.jsxs(c.Fragment,{children:[c.jsx(et,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:a,onUnmountAutoFocus:n,children:c.jsx(Qe,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":Ne(u.open),...i,ref:l,onDismiss:()=>u.onOpenChange(!1)})}),c.jsxs(c.Fragment,{children:[c.jsx(hn,{titleId:u.titleId}),c.jsx(gn,{contentRef:f,descriptionId:u.descriptionId})]})]})}),Ce="DialogTitle",wt=s.forwardRef((e,t)=>{const{__scopeDialog:r,...o}=e,a=A(Ce,r);return c.jsx(T.h2,{id:a.titleId,...o,ref:t})});wt.displayName=Ce;var Et="DialogDescription",xt=s.forwardRef((e,t)=>{const{__scopeDialog:r,...o}=e,a=A(Et,r);return c.jsx(T.p,{id:a.descriptionId,...o,ref:t})});xt.displayName=Et;var St="DialogClose",Ct=s.forwardRef((e,t)=>{const{__scopeDialog:r,...o}=e,a=A(St,r);return c.jsx(T.button,{type:"button",...o,ref:t,onClick:I(e.onClick,()=>a.onOpenChange(!1))})});Ct.displayName=St;function Ne(e){return e?"open":"closed"}var Nt="DialogTitleWarning",[Eo,Ot]=Vt(Nt,{contentName:W,titleName:Ce,docsSlug:"dialog"}),hn=({titleId:e})=>{const t=Ot(Nt),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},
|
|
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},mn="DialogDescriptionWarning",gn=({contentRef:e,descriptionId:t})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Ot(mn).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},_n=pt,yn=ht,bn=gt,wn=_t,En=yt,xn=wt,Be=xt,Sn=Ct;const Cn={XS:"xs",SM:"sm",MD:"md",LG:"lg"};function Nn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Pt={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
|
-
*/(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})()})(Pt);var
|
|
49
|
+
*/(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})()})(Pt);var On=Pt.exports;const qe=Nn(On),Pn="_rotate_1xozj_1",Rn="_dash_1xozj_1",H={"purpur-spinner":"_purpur-spinner_1xozj_1",rotate:Pn,"purpur-spinner--xxs":"_purpur-spinner--xxs_1xozj_4","purpur-spinner--xs":"_purpur-spinner--xs_1xozj_8","purpur-spinner--sm":"_purpur-spinner--sm_1xozj_12","purpur-spinner--md":"_purpur-spinner--md_1xozj_16","purpur-spinner--lg":"_purpur-spinner--lg_1xozj_20","purpur-spinner__circle":"_purpur-spinner__circle_1xozj_24",dash:Rn,"purpur-spinner__circle--disabled":"_purpur-spinner__circle--disabled_1xozj_33","purpur-spinner__circle--negative":"_purpur-spinner__circle--negative_1xozj_36"},G="purpur-spinner",An={XXS:"xxs",XS:"xs",SM:"sm",MD:"md",LG:"lg"},jn=({["data-testid"]:e,disabled:t=!1,negative:r=!1,size:o=An.SM,...a})=>c.jsx("div",{className:qe([H[G],H[`${G}--${o}`]]),"data-testid":e,...a,children:c.jsx("svg",{viewBox:"0 0 50 50",children:c.jsx("circle",{className:qe(H[`${G}__circle`],{[H[`${G}__circle--disabled`]]:t,[H[`${G}__circle--negative`]]:r}),cx:"25",cy:"25",r:"20"})})});function Dn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Rt={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
|
-
*/(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})()})(Rt);var
|
|
53
|
+
*/(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})()})(Rt);var Tn=Rt.exports;const Mn=Dn(Tn),In={"purpur-button":"_purpur-button_w455q_1","purpur-button--xs":"_purpur-button--xs_w455q_33","purpur-button--icon-only":"_purpur-button--icon-only_w455q_36","purpur-button--sm":"_purpur-button--sm_w455q_39","purpur-button--md":"_purpur-button--md_w455q_45","purpur-button--lg":"_purpur-button--lg_w455q_51","purpur-button--full-width":"_purpur-button--full-width_w455q_57","purpur-button--primary":"_purpur-button--primary_w455q_60","purpur-button--disabled":"_purpur-button--disabled_w455q_64","purpur-button--primary-negative":"_purpur-button--primary-negative_w455q_70","purpur-button--secondary":"_purpur-button--secondary_w455q_82","purpur-button--secondary-negative":"_purpur-button--secondary-negative_w455q_93","purpur-button--expressive":"_purpur-button--expressive_w455q_104","purpur-button--expressive-negative":"_purpur-button--expressive-negative_w455q_114","purpur-button--negative":"_purpur-button--negative_w455q_126","purpur-button--destructive":"_purpur-button--destructive_w455q_133","purpur-button--destructive-negative":"_purpur-button--destructive-negative_w455q_143","purpur-button--tertiary-purple":"_purpur-button--tertiary-purple_w455q_153","purpur-button--tertiary-purple-negative":"_purpur-button--tertiary-purple-negative_w455q_166","purpur-button--text-negative":"_purpur-button--text-negative_w455q_181","purpur-button--text":"_purpur-button--text_w455q_181"},Ln=Mn.bind(In),k="purpur-button",$n=({children:e,className:t,["data-testid"]:r,disabled:o=!1,fullWidth:a=!1,iconOnly:n,loading:i=!1,negative:u=!1,onClick:f,size:l="md",variant:p,type:v="button",...h},g)=>{if(n&&p==="destructive")return null;const y=Ln([k,`${k}--${u?`${p}-negative`:p}`,`${k}--${l}`],{[`${k}--icon-only`]:n,[`${k}--negative`]:u,[`${k}--full-width`]:a,[`${k}--disabled`]:o||i},t),d=_=>{o||i?_.preventDefault():f&&f(_)},m=!!h["aria-disabled"]||o||i;return c.jsxs("button",{className:y,"data-testid":r,type:v,ref:g,"aria-disabled":m,onClick:d,...h,children:[i&&c.jsx(jn,{size:l===Cn.LG?"xs":"xxs",negative:u,disabled:m})," ",e]})},Oe=R.forwardRef($n);Oe.displayName="Button";function kn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var At={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
|
-
*/(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})()})(At);var
|
|
57
|
+
*/(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})()})(At);var Fn=At.exports;const Wn=kn(Fn),te={"purpur-heading":"_purpur-heading_k9fhq_1","purpur-heading--hyphens":"_purpur-heading--hyphens_k9fhq_8","purpur-heading--negative":"_purpur-heading--negative_k9fhq_11","purpur-heading--subsection-100":"_purpur-heading--subsection-100_k9fhq_14","purpur-heading--title-100":"_purpur-heading--title-100_k9fhq_20","purpur-heading--title-200":"_purpur-heading--title-200_k9fhq_26","purpur-heading--title-300":"_purpur-heading--title-300_k9fhq_32","purpur-heading--title-400":"_purpur-heading--title-400_k9fhq_38","purpur-heading--title-500":"_purpur-heading--title-500_k9fhq_44","purpur-heading--title-600":"_purpur-heading--title-600_k9fhq_50","purpur-heading--title-700":"_purpur-heading--title-700_k9fhq_56","purpur-heading--display-25":"_purpur-heading--display-25_k9fhq_62","purpur-heading--display-50":"_purpur-heading--display-50_k9fhq_68","purpur-heading--display-100":"_purpur-heading--display-100_k9fhq_74","purpur-heading--display-200":"_purpur-heading--display-200_k9fhq_80"},Bn={TITLE100:"title-100",TITLE200:"title-200",TITLE300:"title-300",TITLE400:"title-400",TITLE500:"title-500",TITLE600:"title-600",TITLE700:"title-700",SUBSECTION100:"subsection-100"},re="purpur-heading",jt=({["data-testid"]:e,children:t,className:r="",enableHyphenation:o=!1,negative:a=!1,tag:n,variant:i=Bn.TITLE100,...u})=>{const f=n,l=Wn([r,te[re],te[`${re}--${i}`],{[te[`${re}--hyphens`]]:o,[te[`${re}--negative`]]:a}]);return c.jsx(f,{...u,className:l,"data-testid":e,children:t})};jt.displayName="Heading";function qn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Dt={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
|
-
*/(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})()})(Dt);var
|
|
61
|
+
*/(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})()})(Dt);var Un=Dt.exports;const Vn=qn(Un),zn={"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"},Hn=Vn.bind(zn),Ue="purpur-icon",Gn="md",Kn=e=>e.filter(t=>Object.keys(t).length>=1).map(t=>`${t.name}="${t.value}"`).join(" "),Xn=({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 ${Kn(r)}>${o}${e}</svg>`},Yn=e=>e.replace(/<(\/?)svg([^>]*)>/g,"").trim(),Tt=({["data-testid"]:e,svg:t,allyTitle:r,className:o,size:a=Gn,...n})=>{const i=Xn({content:Yn(t.svg),title:r}),u=Hn(o,Ue,`${Ue}--${a}`);return c.jsx("span",{"aria-label":r,className:u,"data-testid":e,dangerouslySetInnerHTML:{__html:i},...n})};Tt.displayName="Icon";const Zn={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"},Mt=e=>c.jsx(Tt,{...e,svg:Zn});Mt.displayName="IconClose";function Qn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var It={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
|
-
*/(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})()})(It);var
|
|
65
|
+
*/(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})()})(It);var Jn=It.exports;const eo=Qn(Jn),K={"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"},to={PARAGRAPH100:"paragraph-100",PARAGRAPH100MEDIUM:"paragraph-100-medium",PARAGRAPH100BOLD:"paragraph-100-bold",PARAGRAPH200:"paragraph-200",PREAMBLE100:"preamble-100",PREAMBLE200:"preamble-200",ADDITIONAL100:"additional-100",ADDITIONAL100MEDIUM:"additional-100-medium",OVERLINE100:"overline-100",OVERLINE200:"overline-200"},X="purpur-paragraph",Lt=({["data-testid"]:e,children:t,className:r,disabled:o,enableHyphenation:a=!1,negative:n=!1,variant:i=to.PARAGRAPH100,...u})=>{const f=eo([r,K[X],K[`${X}--${i}`],{[K[`${X}--hyphens`]]:a,[K[`${X}--disabled`]]:o,[K[`${X}--negative`]]:n}]);return c.jsx("p",{...u,className:f,"data-testid":e,children:t})};Lt.displayName="Paragraph";function Ve(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ro(...e){return t=>{let r=!1;const o=e.map(a=>{const n=Ve(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():Ve(e[a],null)}}}}var $t=s.forwardRef((e,t)=>{const{children:r,...o}=e,a=s.Children.toArray(r),n=a.find(oo);if(n){const i=n.props.children,u=a.map(f=>f===n?s.Children.count(i)>1?s.Children.only(null):s.isValidElement(i)?i.props.children:null:f);return c.jsx(we,{...o,ref:t,children:s.isValidElement(i)?s.cloneElement(i,void 0,u):null})}return c.jsx(we,{...o,ref:t,children:r})});$t.displayName="Slot";var we=s.forwardRef((e,t)=>{const{children:r,...o}=e;if(s.isValidElement(r)){const a=io(r),n=ao(o,r.props);return r.type!==s.Fragment&&(n.ref=t?ro(t,a):a),s.cloneElement(r,n)}return s.Children.count(r)>1?s.Children.only(null):null});we.displayName="SlotClone";var no=({children:e})=>c.jsx(c.Fragment,{children:e});function oo(e){return s.isValidElement(e)&&e.type===no}function ao(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 io(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 uo=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],so=uo.reduce((e,t)=>{const r=s.forwardRef((o,a)=>{const{asChild:n,...i}=o,u=n?$t: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}},{}),co="VisuallyHidden",kt=s.forwardRef((e,t)=>c.jsx(so.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}}));kt.displayName=co;var lo=kt;const fo=({asChild:e,children:t,className:r="",["data-testid"]:o})=>c.jsx(lo,{asChild:e,"data-testid":o,className:r,children:t});function po(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ft={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
|
-
*/(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})()})(Ft);var
|
|
69
|
+
*/(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})()})(Ft);var vo=Ft.exports;const ho=po(vo),mo="_fadeIn_1ifm3_1",go={"purpur-modal-content":"_purpur-modal-content_1ifm3_1",fadeIn:mo,"purpur-modal-content__overlay":"_purpur-modal-content__overlay_1ifm3_30","purpur-modal-content__close-button":"_purpur-modal-content__close-button_1ifm3_37","purpur-modal-content__wrapper":"_purpur-modal-content__wrapper_1ifm3_48","purpur-modal-content__wrapper-inner":"_purpur-modal-content__wrapper-inner_1ifm3_58","purpur-modal-content__image-wrapper":"_purpur-modal-content__image-wrapper_1ifm3_62","purpur-modal-content__header":"_purpur-modal-content__header_1ifm3_85","purpur-modal-content__title":"_purpur-modal-content__title_1ifm3_98","purpur-modal-content__description":"_purpur-modal-content__description_1ifm3_101","purpur-modal-content__body":"_purpur-modal-content__body_1ifm3_104","purpur-modal-content__body-inner":"_purpur-modal-content__body-inner_1ifm3_112","purpur-modal-content__actions-buttons":"_purpur-modal-content__actions-buttons_1ifm3_124","purpur-modal-content__actions-button":"_purpur-modal-content__actions-button_1ifm3_124","purpur-modal-content__notification":"_purpur-modal-content__notification_1ifm3_147","purpur-modal-content--with-image":"_purpur-modal-content--with-image_1ifm3_150","purpur-modal-content--overflow":"_purpur-modal-content--overflow_1ifm3_150","purpur-modal-content__actions":"_purpur-modal-content__actions_1ifm3_124","purpur-modal-content__actions-separator":"_purpur-modal-content__actions-separator_1ifm3_181","purpur-modal-content--sticky-footer":"_purpur-modal-content--sticky-footer_1ifm3_191"},ze=e=>e.showCloseButton===!0,O=ho.bind(go),C="purpur-modal-content",_o=R.forwardRef(({["data-testid"]:e,actions:t,children:r,className:o,description:a,disableCloseOnClickOutside:n,hideDescription:i,image:u,primaryActionVariant:f="primary",stickyButtons:l=!0,title:p,notification:v=void 0,zIndex:h,onCloseAutoFocus:g,...y},d)=>{const{closeButtonAllyLabel:m,showCloseButton:_,...S}=y,[w,E]=R.useState(!1),x=R.useRef(null),P=R.useRef(null),b=O([C,{[`${C}--with-image`]:!!u},{[`${C}--overflow`]:w},{[`${C}--sticky-footer`]:l},o]),N=$=>e?`${e} ${$}`:void 0,L=$=>{n&&$.preventDefault()},j=R.useCallback(()=>{if(!x.current||!P.current)return;const $=window.getComputedStyle(x.current,null),Bt=parseFloat($.getPropertyValue("height")),qt=P.current.offsetHeight;E(Bt<qt)},[]),Wt=$=>{n&&!_&&$.preventDefault()};return R.useEffect(()=>(window.addEventListener("resize",j),()=>{window.removeEventListener("resize",j)}),[j]),R.useEffect(()=>{j()},[v,r,j]),c.jsxs(bn,{children:[c.jsx(wn,{className:O(`${C}__overlay`),style:{zIndex:h}}),c.jsxs(En,{...S,className:b,"data-testid":e,ref:d,...!a&&{"aria-describedby":void 0},onPointerDownOutside:L,onOpenAutoFocus:j,onEscapeKeyDown:Wt,onCloseAutoFocus:g,style:{zIndex:`calc(${h} + 1)`},children:[c.jsxs("div",{ref:x,className:O(`${C}__wrapper`),children:[ze(y)&&m&&u&&c.jsx(He,{allyLabel:m,hasImage:!0,"data-testid":N("close-button")}),c.jsxs("div",{ref:P,className:O(`${C}__wrapper-inner`),children:[c.jsxs("div",{className:O(`${C}__header`),children:[ze(y)&&m&&!u&&c.jsx(He,{allyLabel:m,"data-testid":N("close-button")}),c.jsx(xn,{asChild:!0,className:O(`${C}__title`),"data-testid":N("title"),children:c.jsx(jt,{tag:"h2",variant:"title-200",children:p})})]}),u&&c.jsx("div",{className:O(`${C}__image-wrapper`),"data-testid":N("image"),children:u}),c.jsx("div",{className:O(`${C}__body`),children:c.jsxs("div",{className:O(`${C}__body-inner`),children:[a&&i&&c.jsx(fo,{asChild:!0,children:c.jsx(Be,{"data-testid":N("description"),children:a})}),a&&!i&&c.jsx(Be,{asChild:!0,className:O(`${C}__description`),"data-testid":N("description"),children:c.jsx(Lt,{variant:"paragraph-100",children:a})}),c.jsx("div",{children:r}),!l&&c.jsx(Ge,{actions:t,primaryActionVariant:f,notification:v})]})})]})]}),l&&c.jsx(Ge,{actions:t,primaryActionVariant:f,notification:v})]})]})}),He=({allyLabel:e,hasImage:t,["data-testid"]:r})=>c.jsx(Sn,{asChild:!0,children:c.jsx(Oe,{variant:t?"primary":"tertiary-purple",negative:t,size:"sm",iconOnly:!0,"aria-label":e,className:O(`${C}__close-button`),"data-testid":r,children:c.jsx(Mt,{})})}),yo=3,Ge=({actions:e,primaryActionVariant:t,notification:r})=>{const o=R.useRef(null),a=[t,"secondary","text"];return R.useEffect(()=>{var n,i;r&&((i=(n=o==null?void 0:o.current)==null?void 0:n.scrollIntoView)==null||i.call(n,!1))},[r]),e&&e.length>0?c.jsxs("div",{className:O(`${C}__actions`),children:[c.jsx("div",{className:O(`${C}__actions-buttons`),"data-testid":"modal actions",children:e.slice(0,yo).map(({label:n,onClick:i,disabled:u,loading:f,iconPosition:l="right",icon:p,...v},h)=>c.jsxs(Oe,{"data-testid":"modal actions button",variant:a[h]||"",onClick:i,disabled:u,loading:f,className:O(`${C}__actions-button`),...v,children:[l==="left"&&p&&p,n,l==="right"&&p&&p]},n))}),r&&c.jsx("div",{className:O(`${C}__notification`),ref:o,children:r}),c.jsx("span",{className:O(`${C}__actions-separator`)})]}):null},bo=R.forwardRef(({["data-testid"]:e,children:t,className:r,...o},a)=>c.jsx(yn,{asChild:!0,ref:a,"data-testid":e,className:r,...o,children:t})),ce=({["data-testid"]:e,children:t,open:r,onOpenChange:o})=>c.jsx(_n,{open:r,onOpenChange:o,"data-testid":e,children:t});ce.Trigger=bo;ce.Content=_o;ce.displayName="Modal";exports.Modal=ce;
|
|
70
70
|
//# sourceMappingURL=modal.cjs.js.map
|