react-big-nepali-calendar
Version:
The Nepali Calendar Package is a lightweight and easy-to-use library that allows users to view the Nepali (Bikram Sambat) calendar and explore events on specific dates. Designed for developers and applications that require localized date management.
129 lines (120 loc) • 167 kB
JavaScript
(function(Fe,J){typeof exports=="object"&&typeof module<"u"?J(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],J):(Fe=typeof globalThis<"u"?globalThis:Fe||self,J(Fe.ReactNepaliCalendar={},Fe.React,Fe.ReactDOM))})(this,function(Fe,J,Or){"use strict";function Dr(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const c=Dr(J),Lt=Dr(Or);function cs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ft={exports:{}},Rt={};/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Mr;function ls(){if(Mr)return Rt;Mr=1;var e=J,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function s(i,l,u){var f,m={},v=null,y=null;u!==void 0&&(v=""+u),l.key!==void 0&&(v=""+l.key),l.ref!==void 0&&(y=l.ref);for(f in l)r.call(l,f)&&!a.hasOwnProperty(f)&&(m[f]=l[f]);if(i&&i.defaultProps)for(f in l=i.defaultProps,l)m[f]===void 0&&(m[f]=l[f]);return{$$typeof:t,type:i,key:v,ref:y,props:m,_owner:o.current}}return Rt.Fragment=n,Rt.jsx=s,Rt.jsxs=s,Rt}var Pt={};/**
* @license React
* react-jsx-runtime.development.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var jr;function us(){return jr||(jr=1,process.env.NODE_ENV!=="production"&&function(){var e=J,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),i=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),y=Symbol.for("react.offscreen"),w=Symbol.iterator,d="@@iterator";function g(h){if(h===null||typeof h!="object")return null;var N=w&&h[w]||h[d];return typeof N=="function"?N:null}var x=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function b(h){{for(var N=arguments.length,j=new Array(N>1?N-1:0),Y=1;Y<N;Y++)j[Y-1]=arguments[Y];S("error",h,j)}}function S(h,N,j){{var Y=x.ReactDebugCurrentFrame,ee=Y.getStackAddendum();ee!==""&&(N+="%s",j=j.concat([ee]));var se=j.map(function(Z){return String(Z)});se.unshift("Warning: "+N),Function.prototype.apply.call(console[h],console,se)}}var R=!1,P=!1,k=!1,A=!1,F=!1,V;V=Symbol.for("react.module.reference");function $(h){return!!(typeof h=="string"||typeof h=="function"||h===r||h===a||F||h===o||h===u||h===f||A||h===y||R||P||k||typeof h=="object"&&h!==null&&(h.$$typeof===v||h.$$typeof===m||h.$$typeof===s||h.$$typeof===i||h.$$typeof===l||h.$$typeof===V||h.getModuleId!==void 0))}function I(h,N,j){var Y=h.displayName;if(Y)return Y;var ee=N.displayName||N.name||"";return ee!==""?j+"("+ee+")":j}function L(h){return h.displayName||"Context"}function H(h){if(h==null)return null;if(typeof h.tag=="number"&&b("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof h=="function")return h.displayName||h.name||null;if(typeof h=="string")return h;switch(h){case r:return"Fragment";case n:return"Portal";case a:return"Profiler";case o:return"StrictMode";case u:return"Suspense";case f:return"SuspenseList"}if(typeof h=="object")switch(h.$$typeof){case i:var N=h;return L(N)+".Consumer";case s:var j=h;return L(j._context)+".Provider";case l:return I(h,h.render,"ForwardRef");case m:var Y=h.displayName||null;return Y!==null?Y:H(h.type)||"Memo";case v:{var ee=h,se=ee._payload,Z=ee._init;try{return H(Z(se))}catch{return null}}}return null}var O=Object.assign,T=0,E,D,C,M,_,B,Q;function ae(){}ae.__reactDisabledLog=!0;function ie(){{if(T===0){E=console.log,D=console.info,C=console.warn,M=console.error,_=console.group,B=console.groupCollapsed,Q=console.groupEnd;var h={configurable:!0,enumerable:!0,value:ae,writable:!0};Object.defineProperties(console,{info:h,log:h,warn:h,error:h,group:h,groupCollapsed:h,groupEnd:h})}T++}}function ue(){{if(T--,T===0){var h={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:O({},h,{value:E}),info:O({},h,{value:D}),warn:O({},h,{value:C}),error:O({},h,{value:M}),group:O({},h,{value:_}),groupCollapsed:O({},h,{value:B}),groupEnd:O({},h,{value:Q})})}T<0&&b("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var me=x.ReactCurrentDispatcher,W;function X(h,N,j){{if(W===void 0)try{throw Error()}catch(ee){var Y=ee.stack.trim().match(/\n( *(at )?)/);W=Y&&Y[1]||""}return`
`+W+h}}var re=!1,z;{var G=typeof WeakMap=="function"?WeakMap:Map;z=new G}function K(h,N){if(!h||re)return"";{var j=z.get(h);if(j!==void 0)return j}var Y;re=!0;var ee=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var se;se=me.current,me.current=null,ie();try{if(N){var Z=function(){throw Error()};if(Object.defineProperty(Z.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Z,[])}catch(ye){Y=ye}Reflect.construct(h,[],Z)}else{try{Z.call()}catch(ye){Y=ye}h.call(Z.prototype)}}else{try{throw Error()}catch(ye){Y=ye}h()}}catch(ye){if(ye&&Y&&typeof ye.stack=="string"){for(var q=ye.stack.split(`
`),ve=Y.stack.split(`
`),de=q.length-1,pe=ve.length-1;de>=1&&pe>=0&&q[de]!==ve[pe];)pe--;for(;de>=1&&pe>=0;de--,pe--)if(q[de]!==ve[pe]){if(de!==1||pe!==1)do if(de--,pe--,pe<0||q[de]!==ve[pe]){var Se=`
`+q[de].replace(" at new "," at ");return h.displayName&&Se.includes("<anonymous>")&&(Se=Se.replace("<anonymous>",h.displayName)),typeof h=="function"&&z.set(h,Se),Se}while(de>=1&&pe>=0);break}}}finally{re=!1,me.current=se,ue(),Error.prepareStackTrace=ee}var Et=h?h.displayName||h.name:"",ot=Et?X(Et):"";return typeof h=="function"&&z.set(h,ot),ot}function fe(h,N,j){return K(h,!1)}function we(h){var N=h.prototype;return!!(N&&N.isReactComponent)}function Me(h,N,j){if(h==null)return"";if(typeof h=="function")return K(h,we(h));if(typeof h=="string")return X(h);switch(h){case u:return X("Suspense");case f:return X("SuspenseList")}if(typeof h=="object")switch(h.$$typeof){case l:return fe(h.render);case m:return Me(h.type,N,j);case v:{var Y=h,ee=Y._payload,se=Y._init;try{return Me(se(ee),N,j)}catch{}}}return""}var Ne=Object.prototype.hasOwnProperty,Xe={},Sn=x.ReactDebugCurrentFrame;function Le(h){if(h){var N=h._owner,j=Me(h.type,h._source,N?N.type:null);Sn.setExtraStackFrame(j)}else Sn.setExtraStackFrame(null)}function kf(h,N,j,Y,ee){{var se=Function.call.bind(Ne);for(var Z in h)if(se(h,Z)){var q=void 0;try{if(typeof h[Z]!="function"){var ve=Error((Y||"React class")+": "+j+" type `"+Z+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof h[Z]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ve.name="Invariant Violation",ve}q=h[Z](N,Z,Y,j,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(de){q=de}q&&!(q instanceof Error)&&(Le(ee),b("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",Y||"React class",j,Z,typeof q),Le(null)),q instanceof Error&&!(q.message in Xe)&&(Xe[q.message]=!0,Le(ee),b("Failed %s type: %s",j,q.message),Le(null))}}}var _f=Array.isArray;function Er(h){return _f(h)}function If(h){{var N=typeof Symbol=="function"&&Symbol.toStringTag,j=N&&h[Symbol.toStringTag]||h.constructor.name||"Object";return j}}function $f(h){try{return Zi(h),!1}catch{return!0}}function Zi(h){return""+h}function Ji(h){if($f(h))return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",If(h)),Zi(h)}var $t=x.ReactCurrentOwner,Lf={key:!0,ref:!0,__self:!0,__source:!0},Qi,es,Rr;Rr={};function Ff(h){if(Ne.call(h,"ref")){var N=Object.getOwnPropertyDescriptor(h,"ref").get;if(N&&N.isReactWarning)return!1}return h.ref!==void 0}function Wf(h){if(Ne.call(h,"key")){var N=Object.getOwnPropertyDescriptor(h,"key").get;if(N&&N.isReactWarning)return!1}return h.key!==void 0}function Bf(h,N){if(typeof h.ref=="string"&&$t.current&&N&&$t.current.stateNode!==N){var j=H($t.current.type);Rr[j]||(b('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',H($t.current.type),h.ref),Rr[j]=!0)}}function Vf(h,N){{var j=function(){Qi||(Qi=!0,b("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",N))};j.isReactWarning=!0,Object.defineProperty(h,"key",{get:j,configurable:!0})}}function zf(h,N){{var j=function(){es||(es=!0,b("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",N))};j.isReactWarning=!0,Object.defineProperty(h,"ref",{get:j,configurable:!0})}}var Yf=function(h,N,j,Y,ee,se,Z){var q={$$typeof:t,type:h,key:N,ref:j,props:Z,_owner:se};return q._store={},Object.defineProperty(q._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(q,"_self",{configurable:!1,enumerable:!1,writable:!1,value:Y}),Object.defineProperty(q,"_source",{configurable:!1,enumerable:!1,writable:!1,value:ee}),Object.freeze&&(Object.freeze(q.props),Object.freeze(q)),q};function Hf(h,N,j,Y,ee){{var se,Z={},q=null,ve=null;j!==void 0&&(Ji(j),q=""+j),Wf(N)&&(Ji(N.key),q=""+N.key),Ff(N)&&(ve=N.ref,Bf(N,ee));for(se in N)Ne.call(N,se)&&!Lf.hasOwnProperty(se)&&(Z[se]=N[se]);if(h&&h.defaultProps){var de=h.defaultProps;for(se in de)Z[se]===void 0&&(Z[se]=de[se])}if(q||ve){var pe=typeof h=="function"?h.displayName||h.name||"Unknown":h;q&&Vf(Z,pe),ve&&zf(Z,pe)}return Yf(h,q,ve,ee,Y,$t.current,Z)}}var Pr=x.ReactCurrentOwner,ts=x.ReactDebugCurrentFrame;function Ct(h){if(h){var N=h._owner,j=Me(h.type,h._source,N?N.type:null);ts.setExtraStackFrame(j)}else ts.setExtraStackFrame(null)}var Tr;Tr=!1;function Nr(h){return typeof h=="object"&&h!==null&&h.$$typeof===t}function ns(){{if(Pr.current){var h=H(Pr.current.type);if(h)return`
Check the render method of \``+h+"`."}return""}}function Uf(h){return""}var rs={};function Gf(h){{var N=ns();if(!N){var j=typeof h=="string"?h:h.displayName||h.name;j&&(N=`
Check the top-level render call using <`+j+">.")}return N}}function os(h,N){{if(!h._store||h._store.validated||h.key!=null)return;h._store.validated=!0;var j=Gf(N);if(rs[j])return;rs[j]=!0;var Y="";h&&h._owner&&h._owner!==Pr.current&&(Y=" It was passed a child from "+H(h._owner.type)+"."),Ct(h),b('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',j,Y),Ct(null)}}function as(h,N){{if(typeof h!="object")return;if(Er(h))for(var j=0;j<h.length;j++){var Y=h[j];Nr(Y)&&os(Y,N)}else if(Nr(h))h._store&&(h._store.validated=!0);else if(h){var ee=g(h);if(typeof ee=="function"&&ee!==h.entries)for(var se=ee.call(h),Z;!(Z=se.next()).done;)Nr(Z.value)&&os(Z.value,N)}}}function Kf(h){{var N=h.type;if(N==null||typeof N=="string")return;var j;if(typeof N=="function")j=N.propTypes;else if(typeof N=="object"&&(N.$$typeof===l||N.$$typeof===m))j=N.propTypes;else return;if(j){var Y=H(N);kf(j,h.props,"prop",Y,h)}else if(N.PropTypes!==void 0&&!Tr){Tr=!0;var ee=H(N);b("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",ee||"Unknown")}typeof N.getDefaultProps=="function"&&!N.getDefaultProps.isReactClassApproved&&b("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Xf(h){{for(var N=Object.keys(h.props),j=0;j<N.length;j++){var Y=N[j];if(Y!=="children"&&Y!=="key"){Ct(h),b("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",Y),Ct(null);break}}h.ref!==null&&(Ct(h),b("Invalid attribute `ref` supplied to `React.Fragment`."),Ct(null))}}var is={};function ss(h,N,j,Y,ee,se){{var Z=$(h);if(!Z){var q="";(h===void 0||typeof h=="object"&&h!==null&&Object.keys(h).length===0)&&(q+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var ve=Uf();ve?q+=ve:q+=ns();var de;h===null?de="null":Er(h)?de="array":h!==void 0&&h.$$typeof===t?(de="<"+(H(h.type)||"Unknown")+" />",q=" Did you accidentally export a JSX literal instead of a component?"):de=typeof h,b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",de,q)}var pe=Hf(h,N,j,ee,se);if(pe==null)return pe;if(Z){var Se=N.children;if(Se!==void 0)if(Y)if(Er(Se)){for(var Et=0;Et<Se.length;Et++)as(Se[Et],h);Object.freeze&&Object.freeze(Se)}else b("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else as(Se,h)}if(Ne.call(N,"key")){var ot=H(h),ye=Object.keys(N).filter(function(tp){return tp!=="key"}),Ar=ye.length>0?"{key: someKey, "+ye.join(": ..., ")+": ...}":"{key: someKey}";if(!is[ot+Ar]){var ep=ye.length>0?"{"+ye.join(": ..., ")+": ...}":"{}";b(`A props object containing a "key" prop is being spread into JSX:
let props = %s;
<%s {...props} />
React keys must be passed directly to JSX without using spread:
let props = %s;
<%s key={someKey} {...props} />`,Ar,ot,ep,ot),is[ot+Ar]=!0}}return h===r?Xf(pe):Kf(pe),pe}}function qf(h,N,j){return ss(h,N,j,!0)}function Zf(h,N,j){return ss(h,N,j,!1)}var Jf=Zf,Qf=qf;Pt.Fragment=r,Pt.jsx=Jf,Pt.jsxs=Qf}()),Pt}var kr;function ds(){return kr||(kr=1,process.env.NODE_ENV==="production"?Ft.exports=ls():Ft.exports=us()),Ft.exports}var p=ds();function te(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function _r(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ir(...e){return t=>{let n=!1;const r=e.map(o=>{const a=_r(o,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let o=0;o<r.length;o++){const a=r[o];typeof a=="function"?a():_r(e[o],null)}}}}function le(...e){return c.useCallback(Ir(...e),e)}function fs(e,t){const n=c.createContext(t),r=a=>{const{children:s,...i}=a,l=c.useMemo(()=>i,Object.values(i));return p.jsx(n.Provider,{value:l,children:s})};r.displayName=e+"Provider";function o(a){const s=c.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,o]}function Wt(e,t=[]){let n=[];function r(a,s){const i=c.createContext(s),l=n.length;n=[...n,s];const u=m=>{var x;const{scope:v,children:y,...w}=m,d=((x=v==null?void 0:v[e])==null?void 0:x[l])||i,g=c.useMemo(()=>w,Object.values(w));return p.jsx(d.Provider,{value:g,children:y})};u.displayName=a+"Provider";function f(m,v){var d;const y=((d=v==null?void 0:v[e])==null?void 0:d[l])||i,w=c.useContext(y);if(w)return w;if(s!==void 0)return s;throw new Error(`\`${m}\` must be used within \`${a}\``)}return[u,f]}const o=()=>{const a=n.map(s=>c.createContext(s));return function(i){const l=(i==null?void 0:i[e])||a;return c.useMemo(()=>({[`__scope${e}`]:{...i,[e]:l}}),[i,l])}};return o.scopeName=e,[r,ps(o,...t)]}function ps(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const s=r.reduce((i,{useScope:l,scopeName:u})=>{const m=l(a)[`__scope${u}`];return{...i,...m}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}var ge=globalThis!=null&&globalThis.document?c.useLayoutEffect:()=>{},hs=c.useId||(()=>{}),ms=0;function at(e){const[t,n]=c.useState(hs());return ge(()=>{n(r=>r??String(ms++))},[e]),t?`radix-${t}`:""}function Ce(e){const t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Cn({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=gs({defaultProp:t,onChange:n}),a=e!==void 0,s=a?e:r,i=Ce(n),l=c.useCallback(u=>{if(a){const m=typeof u=="function"?u(e):u;m!==e&&i(m)}else o(u)},[a,e,o,i]);return[s,l]}function gs({defaultProp:e,onChange:t}){const n=c.useState(e),[r]=n,o=c.useRef(r),a=Ce(t);return c.useEffect(()=>{o.current!==r&&(a(r),o.current=r)},[r,o,a]),n}var qe=c.forwardRef((e,t)=>{const{children:n,...r}=e,o=c.Children.toArray(n),a=o.find(ys);if(a){const s=a.props.children,i=o.map(l=>l===a?c.Children.count(s)>1?c.Children.only(null):c.isValidElement(s)?s.props.children:null:l);return p.jsx(En,{...r,ref:t,children:c.isValidElement(s)?c.cloneElement(s,void 0,i):null})}return p.jsx(En,{...r,ref:t,children:n})});qe.displayName="Slot";var En=c.forwardRef((e,t)=>{const{children:n,...r}=e;if(c.isValidElement(n)){const o=xs(n);return c.cloneElement(n,{...bs(r,n.props),ref:t?Ir(t,o):o})}return c.Children.count(n)>1?c.Children.only(null):null});En.displayName="SlotClone";var vs=({children:e})=>p.jsx(p.Fragment,{children:e});function ys(e){return c.isValidElement(e)&&e.type===vs}function bs(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...i)=>{a(...i),o(...i)}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function xs(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ws=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],ne=ws.reduce((e,t)=>{const n=c.forwardRef((r,o)=>{const{asChild:a,...s}=r,i=a?qe:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(i,{...s,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function $r(e,t){e&&Lt.flushSync(()=>e.dispatchEvent(t))}function Lr(e,t=globalThis==null?void 0:globalThis.document){const n=Ce(e);c.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Ss="DismissableLayer",Rn="dismissableLayer.update",Cs="dismissableLayer.pointerDownOutside",Es="dismissableLayer.focusOutside",Fr,Wr=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Br=c.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:i,...l}=e,u=c.useContext(Wr),[f,m]=c.useState(null),v=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,y]=c.useState({}),w=le(t,A=>m(A)),d=Array.from(u.layers),[g]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),x=d.indexOf(g),b=f?d.indexOf(f):-1,S=u.layersWithOutsidePointerEventsDisabled.size>0,R=b>=x,P=Ts(A=>{const F=A.target,V=[...u.branches].some($=>$.contains(F));!R||V||(o==null||o(A),s==null||s(A),A.defaultPrevented||i==null||i())},v),k=Ns(A=>{const F=A.target;[...u.branches].some($=>$.contains(F))||(a==null||a(A),s==null||s(A),A.defaultPrevented||i==null||i())},v);return Lr(A=>{b===u.layers.size-1&&(r==null||r(A),!A.defaultPrevented&&i&&(A.preventDefault(),i()))},v),c.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Fr=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),Vr(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=Fr)}},[f,v,n,u]),c.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),Vr())},[f,u]),c.useEffect(()=>{const A=()=>y({});return document.addEventListener(Rn,A),()=>document.removeEventListener(Rn,A)},[]),p.jsx(ne.div,{...l,ref:w,style:{pointerEvents:S?R?"auto":"none":void 0,...e.style},onFocusCapture:te(e.onFocusCapture,k.onFocusCapture),onBlurCapture:te(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:te(e.onPointerDownCapture,P.onPointerDownCapture)})});Br.displayName=Ss;var Rs="DismissableLayerBranch",Ps=c.forwardRef((e,t)=>{const n=c.useContext(Wr),r=c.useRef(null),o=le(t,r);return c.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),p.jsx(ne.div,{...e,ref:o})});Ps.displayName=Rs;function Ts(e,t=globalThis==null?void 0:globalThis.document){const n=Ce(e),r=c.useRef(!1),o=c.useRef(()=>{});return c.useEffect(()=>{const a=i=>{if(i.target&&!r.current){let l=function(){zr(Cs,n,u,{discrete:!0})};const u={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Ns(e,t=globalThis==null?void 0:globalThis.document){const n=Ce(e),r=c.useRef(!1);return c.useEffect(()=>{const o=a=>{a.target&&!r.current&&zr(Es,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Vr(){const e=new CustomEvent(Rn);document.dispatchEvent(e)}function zr(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?$r(o,a):o.dispatchEvent(a)}var Pn="focusScope.autoFocusOnMount",Tn="focusScope.autoFocusOnUnmount",Yr={bubbles:!1,cancelable:!0},As="FocusScope",Nn=c.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...s}=e,[i,l]=c.useState(null),u=Ce(o),f=Ce(a),m=c.useRef(null),v=le(t,d=>l(d)),y=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(r){let d=function(S){if(y.paused||!i)return;const R=S.target;i.contains(R)?m.current=R:We(m.current,{select:!0})},g=function(S){if(y.paused||!i)return;const R=S.relatedTarget;R!==null&&(i.contains(R)||We(m.current,{select:!0}))},x=function(S){if(document.activeElement===document.body)for(const P of S)P.removedNodes.length>0&&We(i)};document.addEventListener("focusin",d),document.addEventListener("focusout",g);const b=new MutationObserver(x);return i&&b.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",d),document.removeEventListener("focusout",g),b.disconnect()}}},[r,i,y.paused]),c.useEffect(()=>{if(i){Gr.add(y);const d=document.activeElement;if(!i.contains(d)){const x=new CustomEvent(Pn,Yr);i.addEventListener(Pn,u),i.dispatchEvent(x),x.defaultPrevented||(Os(_s(Hr(i)),{select:!0}),document.activeElement===d&&We(i))}return()=>{i.removeEventListener(Pn,u),setTimeout(()=>{const x=new CustomEvent(Tn,Yr);i.addEventListener(Tn,f),i.dispatchEvent(x),x.defaultPrevented||We(d??document.body,{select:!0}),i.removeEventListener(Tn,f),Gr.remove(y)},0)}}},[i,u,f,y]);const w=c.useCallback(d=>{if(!n&&!r||y.paused)return;const g=d.key==="Tab"&&!d.altKey&&!d.ctrlKey&&!d.metaKey,x=document.activeElement;if(g&&x){const b=d.currentTarget,[S,R]=Ds(b);S&&R?!d.shiftKey&&x===R?(d.preventDefault(),n&&We(S,{select:!0})):d.shiftKey&&x===S&&(d.preventDefault(),n&&We(R,{select:!0})):x===b&&d.preventDefault()}},[n,r,y.paused]);return p.jsx(ne.div,{tabIndex:-1,...s,ref:v,onKeyDown:w})});Nn.displayName=As;function Os(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(We(r,{select:t}),document.activeElement!==n)return}function Ds(e){const t=Hr(e),n=Ur(t,e),r=Ur(t.reverse(),e);return[n,r]}function Hr(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Ur(e,t){for(const n of e)if(!Ms(n,{upTo:t}))return n}function Ms(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 js(e){return e instanceof HTMLInputElement&&"select"in e}function We(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&js(e)&&t&&e.select()}}var Gr=ks();function ks(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Kr(e,t),e.unshift(t)},remove(t){var n;e=Kr(e,t),(n=e[0])==null||n.resume()}}}function Kr(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function _s(e){return e.filter(t=>t.tagName!=="A")}var Is="Portal",An=c.forwardRef((e,t)=>{var i;const{container:n,...r}=e,[o,a]=c.useState(!1);ge(()=>a(!0),[]);const s=n||o&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return s?Or.createPortal(p.jsx(ne.div,{...r,ref:t}),s):null});An.displayName=Is;function $s(e,t){return c.useReducer((n,r)=>t[n][r]??n,e)}var Bt=e=>{const{present:t,children:n}=e,r=Ls(t),o=typeof n=="function"?n({present:r.isPresent}):c.Children.only(n),a=le(r.ref,Fs(o));return typeof n=="function"||r.isPresent?c.cloneElement(o,{ref:a}):null};Bt.displayName="Presence";function Ls(e){const[t,n]=c.useState(),r=c.useRef({}),o=c.useRef(e),a=c.useRef("none"),s=e?"mounted":"unmounted",[i,l]=$s(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const u=Vt(r.current);a.current=i==="mounted"?u:"none"},[i]),ge(()=>{const u=r.current,f=o.current;if(f!==e){const v=a.current,y=Vt(u);e?l("MOUNT"):y==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(f&&v!==y?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),ge(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,m=y=>{const d=Vt(r.current).includes(y.animationName);if(y.target===t&&d&&(l("ANIMATION_END"),!o.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",u=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},v=y=>{y.target===t&&(a.current=Vt(r.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:c.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Vt(e){return(e==null?void 0:e.animationName)||"none"}function Fs(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var On=0;function Xr(){c.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??qr()),document.body.insertAdjacentElement("beforeend",e[1]??qr()),On++,()=>{On===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),On--}},[])}function qr(){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 he=function(){return he=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},he.apply(this,arguments)};function zt(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Zr(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,a;r<o;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Yt="right-scroll-bar-position",Ht="width-before-scroll-bar",Ws="with-scroll-bars-hidden",Bs="--removed-body-scroll-bar-size";function Dn(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Vs(e,t){var n=J.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var zs=typeof window<"u"?c.useLayoutEffect:c.useEffect,Jr=new WeakMap;function Ys(e,t){var n=Vs(null,function(r){return e.forEach(function(o){return Dn(o,r)})});return zs(function(){var r=Jr.get(n);if(r){var o=new Set(r),a=new Set(e),s=n.current;o.forEach(function(i){a.has(i)||Dn(i,null)}),a.forEach(function(i){o.has(i)||Dn(i,s)})}Jr.set(n,e)},[e]),n}function Hs(e){return e}function Us(e,t){t===void 0&&(t=Hs);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var s=t(a,r);return n.push(s),function(){n=n.filter(function(i){return i!==s})}},assignSyncMedium:function(a){for(r=!0;n.length;){var s=n;n=[],s.forEach(a)}n={push:function(i){return a(i)},filter:function(){return n}}},assignMedium:function(a){r=!0;var s=[];if(n.length){var i=n;n=[],i.forEach(a),s=n}var l=function(){var f=s;s=[],f.forEach(a)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(f){s.push(f),u()},filter:function(f){return s=s.filter(f),n}}}};return o}function Gs(e){e===void 0&&(e={});var t=Us(null);return t.options=he({async:!0,ssr:!1},e),t}var Qr=function(e){var t=e.sideCar,n=zt(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return c.createElement(r,he({},n))};Qr.isSideCarExport=!0;function Ks(e,t){return e.useMedium(t),Qr}var eo=Gs(),Mn=function(){},Ut=c.forwardRef(function(e,t){var n=c.useRef(null),r=c.useState({onScrollCapture:Mn,onWheelCapture:Mn,onTouchMoveCapture:Mn}),o=r[0],a=r[1],s=e.forwardProps,i=e.children,l=e.className,u=e.removeScrollBar,f=e.enabled,m=e.shards,v=e.sideCar,y=e.noIsolation,w=e.inert,d=e.allowPinchZoom,g=e.as,x=g===void 0?"div":g,b=e.gapMode,S=zt(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),R=v,P=Ys([n,t]),k=he(he({},S),o);return c.createElement(c.Fragment,null,f&&c.createElement(R,{sideCar:eo,removeScrollBar:u,shards:m,noIsolation:y,inert:w,setCallbacks:a,allowPinchZoom:!!d,lockRef:n,gapMode:b}),s?c.cloneElement(c.Children.only(i),he(he({},k),{ref:P})):c.createElement(x,he({},k,{className:l,ref:P}),i))});Ut.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Ut.classNames={fullWidth:Ht,zeroRight:Yt};var to=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Xs(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=to();return t&&e.setAttribute("nonce",t),e}function qs(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Zs(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Js=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Xs())&&(qs(t,n),Zs(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Qs=function(){var e=Js();return function(t,n){c.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},no=function(){var e=Qs(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},ec={left:0,top:0,right:0,gap:0},jn=function(e){return parseInt(e||"",10)||0},tc=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[jn(n),jn(r),jn(o)]},nc=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return ec;var t=tc(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},rc=no(),it="data-scroll-locked",oc=function(e,t,n,r){var o=e.left,a=e.top,s=e.right,i=e.gap;return n===void 0&&(n="margin"),`
.`.concat(Ws,` {
overflow: hidden `).concat(r,`;
padding-right: `).concat(i,"px ").concat(r,`;
}
body[`).concat(it,`] {
overflow: hidden `).concat(r,`;
overscroll-behavior: contain;
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
padding-left: `.concat(o,`px;
padding-top: `).concat(a,`px;
padding-right: `).concat(s,`px;
margin-left:0;
margin-top:0;
margin-right: `).concat(i,"px ").concat(r,`;
`),n==="padding"&&"padding-right: ".concat(i,"px ").concat(r,";")].filter(Boolean).join(""),`
}
.`).concat(Yt,` {
right: `).concat(i,"px ").concat(r,`;
}
.`).concat(Ht,` {
margin-right: `).concat(i,"px ").concat(r,`;
}
.`).concat(Yt," .").concat(Yt,` {
right: 0 `).concat(r,`;
}
.`).concat(Ht," .").concat(Ht,` {
margin-right: 0 `).concat(r,`;
}
body[`).concat(it,`] {
`).concat(Bs,": ").concat(i,`px;
}
`)},ro=function(){var e=parseInt(document.body.getAttribute(it)||"0",10);return isFinite(e)?e:0},ac=function(){c.useEffect(function(){return document.body.setAttribute(it,(ro()+1).toString()),function(){var e=ro()-1;e<=0?document.body.removeAttribute(it):document.body.setAttribute(it,e.toString())}},[])},ic=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;ac();var a=c.useMemo(function(){return nc(o)},[o]);return c.createElement(rc,{styles:oc(a,!t,o,n?"":"!important")})},kn=!1;if(typeof window<"u")try{var Gt=Object.defineProperty({},"passive",{get:function(){return kn=!0,!0}});window.addEventListener("test",Gt,Gt),window.removeEventListener("test",Gt,Gt)}catch{kn=!1}var st=kn?{passive:!1}:!1,sc=function(e){return e.tagName==="TEXTAREA"},oo=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!sc(e)&&n[t]==="visible")},cc=function(e){return oo(e,"overflowY")},lc=function(e){return oo(e,"overflowX")},ao=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=io(e,r);if(o){var a=so(e,r),s=a[1],i=a[2];if(s>i)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},uc=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},dc=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},io=function(e,t){return e==="v"?cc(t):lc(t)},so=function(e,t){return e==="v"?uc(t):dc(t)},fc=function(e,t){return e==="h"&&t==="rtl"?-1:1},pc=function(e,t,n,r,o){var a=fc(e,window.getComputedStyle(t).direction),s=a*r,i=n.target,l=t.contains(i),u=!1,f=s>0,m=0,v=0;do{var y=so(e,i),w=y[0],d=y[1],g=y[2],x=d-g-a*w;(w||x)&&io(e,i)&&(m+=x,v+=w),i instanceof ShadowRoot?i=i.host:i=i.parentNode}while(!l&&i!==document.body||l&&(t.contains(i)||t===i));return(f&&(Math.abs(m)<1||!o)||!f&&(Math.abs(v)<1||!o))&&(u=!0),u},Kt=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},co=function(e){return[e.deltaX,e.deltaY]},lo=function(e){return e&&"current"in e?e.current:e},hc=function(e,t){return e[0]===t[0]&&e[1]===t[1]},mc=function(e){return`
.block-interactivity-`.concat(e,` {pointer-events: none;}
.allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},gc=0,ct=[];function vc(e){var t=c.useRef([]),n=c.useRef([0,0]),r=c.useRef(),o=c.useState(gc++)[0],a=c.useState(no)[0],s=c.useRef(e);c.useEffect(function(){s.current=e},[e]),c.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var d=Zr([e.lockRef.current],(e.shards||[]).map(lo),!0).filter(Boolean);return d.forEach(function(g){return g.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),d.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var i=c.useCallback(function(d,g){if("touches"in d&&d.touches.length===2||d.type==="wheel"&&d.ctrlKey)return!s.current.allowPinchZoom;var x=Kt(d),b=n.current,S="deltaX"in d?d.deltaX:b[0]-x[0],R="deltaY"in d?d.deltaY:b[1]-x[1],P,k=d.target,A=Math.abs(S)>Math.abs(R)?"h":"v";if("touches"in d&&A==="h"&&k.type==="range")return!1;var F=ao(A,k);if(!F)return!0;if(F?P=A:(P=A==="v"?"h":"v",F=ao(A,k)),!F)return!1;if(!r.current&&"changedTouches"in d&&(S||R)&&(r.current=P),!P)return!0;var V=r.current||P;return pc(V,g,d,V==="h"?S:R,!0)},[]),l=c.useCallback(function(d){var g=d;if(!(!ct.length||ct[ct.length-1]!==a)){var x="deltaY"in g?co(g):Kt(g),b=t.current.filter(function(P){return P.name===g.type&&(P.target===g.target||g.target===P.shadowParent)&&hc(P.delta,x)})[0];if(b&&b.should){g.cancelable&&g.preventDefault();return}if(!b){var S=(s.current.shards||[]).map(lo).filter(Boolean).filter(function(P){return P.contains(g.target)}),R=S.length>0?i(g,S[0]):!s.current.noIsolation;R&&g.cancelable&&g.preventDefault()}}},[]),u=c.useCallback(function(d,g,x,b){var S={name:d,delta:g,target:x,should:b,shadowParent:yc(x)};t.current.push(S),setTimeout(function(){t.current=t.current.filter(function(R){return R!==S})},1)},[]),f=c.useCallback(function(d){n.current=Kt(d),r.current=void 0},[]),m=c.useCallback(function(d){u(d.type,co(d),d.target,i(d,e.lockRef.current))},[]),v=c.useCallback(function(d){u(d.type,Kt(d),d.target,i(d,e.lockRef.current))},[]);c.useEffect(function(){return ct.push(a),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:v}),document.addEventListener("wheel",l,st),document.addEventListener("touchmove",l,st),document.addEventListener("touchstart",f,st),function(){ct=ct.filter(function(d){return d!==a}),document.removeEventListener("wheel",l,st),document.removeEventListener("touchmove",l,st),document.removeEventListener("touchstart",f,st)}},[]);var y=e.removeScrollBar,w=e.inert;return c.createElement(c.Fragment,null,w?c.createElement(a,{styles:mc(o)}):null,y?c.createElement(ic,{gapMode:e.gapMode}):null)}function yc(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const bc=Ks(eo,vc);var uo=c.forwardRef(function(e,t){return c.createElement(Ut,he({},e,{ref:t,sideCar:bc}))});uo.classNames=Ut.classNames;var xc=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},lt=new WeakMap,Xt=new WeakMap,qt={},_n=0,fo=function(e){return e&&(e.host||fo(e.parentNode))},wc=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=fo(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Sc=function(e,t,n,r){var o=wc(t,Array.isArray(e)?e:[e]);qt[n]||(qt[n]=new WeakMap);var a=qt[n],s=[],i=new Set,l=new Set(o),u=function(m){!m||i.has(m)||(i.add(m),u(m.parentNode))};o.forEach(u);var f=function(m){!m||l.has(m)||Array.prototype.forEach.call(m.children,function(v){if(i.has(v))f(v);else try{var y=v.getAttribute(r),w=y!==null&&y!=="false",d=(lt.get(v)||0)+1,g=(a.get(v)||0)+1;lt.set(v,d),a.set(v,g),s.push(v),d===1&&w&&Xt.set(v,!0),g===1&&v.setAttribute(n,"true"),w||v.setAttribute(r,"true")}catch(x){console.error("aria-hidden: cannot operate on ",v,x)}})};return f(t),i.clear(),_n++,function(){s.forEach(function(m){var v=lt.get(m)-1,y=a.get(m)-1;lt.set(m,v),a.set(m,y),v||(Xt.has(m)||m.removeAttribute(r),Xt.delete(m)),y||m.removeAttribute(n)}),_n--,_n||(lt=new WeakMap,lt=new WeakMap,Xt=new WeakMap,qt={})}},po=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=xc(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),Sc(r,o,n,"aria-hidden")):function(){return null}},In="Dialog",[ho,np]=Wt(In),[Cc,Ee]=ho(In),mo=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:s=!0}=e,i=c.useRef(null),l=c.useRef(null),[u=!1,f]=Cn({prop:r,defaultProp:o,onChange:a});return p.jsx(Cc,{scope:t,triggerRef:i,contentRef:l,contentId:at(),titleId:at(),descriptionId:at(),open:u,onOpenChange:f,onOpenToggle:c.useCallback(()=>f(m=>!m),[f]),modal:s,children:n})};mo.displayName=In;var go="DialogTrigger",Ec=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ee(go,n),a=le(t,o.triggerRef);return p.jsx(ne.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Fn(o.open),...r,ref:a,onClick:te(e.onClick,o.onOpenToggle)})});Ec.displayName=go;var $n="DialogPortal",[Rc,vo]=ho($n,{forceMount:void 0}),yo=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=Ee($n,t);return p.jsx(Rc,{scope:t,forceMount:n,children:c.Children.map(r,s=>p.jsx(Bt,{present:n||a.open,children:p.jsx(An,{asChild:!0,container:o,children:s})}))})};yo.displayName=$n;var Zt="DialogOverlay",bo=c.forwardRef((e,t)=>{const n=vo(Zt,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=Ee(Zt,e.__scopeDialog);return a.modal?p.jsx(Bt,{present:r||a.open,children:p.jsx(Pc,{...o,ref:t})}):null});bo.displayName=Zt;var Pc=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ee(Zt,n);return p.jsx(uo,{as:qe,allowPinchZoom:!0,shards:[o.contentRef],children:p.jsx(ne.div,{"data-state":Fn(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Ze="DialogContent",xo=c.forwardRef((e,t)=>{const n=vo(Ze,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=Ee(Ze,e.__scopeDialog);return p.jsx(Bt,{present:r||a.open,children:a.modal?p.jsx(Tc,{...o,ref:t}):p.jsx(Nc,{...o,ref:t})})});xo.displayName=Ze;var Tc=c.forwardRef((e,t)=>{const n=Ee(Ze,e.__scopeDialog),r=c.useRef(null),o=le(t,n.contentRef,r);return c.useEffect(()=>{const a=r.current;if(a)return po(a)},[]),p.jsx(wo,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:te(e.onCloseAutoFocus,a=>{var s;a.preventDefault(),(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:te(e.onPointerDownOutside,a=>{const s=a.detail.originalEvent,i=s.button===0&&s.ctrlKey===!0;(s.button===2||i)&&a.preventDefault()}),onFocusOutside:te(e.onFocusOutside,a=>a.preventDefault())})}),Nc=c.forwardRef((e,t)=>{const n=Ee(Ze,e.__scopeDialog),r=c.useRef(!1),o=c.useRef(!1);return p.jsx(wo,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var s,i;(s=e.onCloseAutoFocus)==null||s.call(e,a),a.defaultPrevented||(r.current||(i=n.triggerRef.current)==null||i.focus(),a.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:a=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=a.target;((u=n.triggerRef.current)==null?void 0:u.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),wo=c.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...s}=e,i=Ee(Ze,n),l=c.useRef(null),u=le(t,l);return Xr(),p.jsxs(p.Fragment,{children:[p.jsx(Nn,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:p.jsx(Br,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":Fn(i.open),...s,ref:u,onDismiss:()=>i.onOpenChange(!1)})}),p.jsxs(p.Fragment,{children:[p.jsx(Ac,{titleId:i.titleId}),p.jsx(Dc,{contentRef:l,descriptionId:i.descriptionId})]})]})}),Ln="DialogTitle",So=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ee(Ln,n);return p.jsx(ne.h2,{id:o.titleId,...r,ref:t})});So.displayName=Ln;var Co="DialogDescription",Eo=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ee(Co,n);return p.jsx(ne.p,{id:o.descriptionId,...r,ref:t})});Eo.displayName=Co;var Ro="DialogClose",Po=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ee(Ro,n);return p.jsx(ne.button,{type:"button",...r,ref:t,onClick:te(e.onClick,()=>o.onOpenChange(!1))})});Po.displayName=Ro;function Fn(e){return e?"open":"closed"}var To="DialogTitleWarning",[rp,No]=fs(To,{contentName:Ze,titleName:Ln,docsSlug:"dialog"}),Ac=({titleId:e})=>{const t=No(To),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return c.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Oc="DialogDescriptionWarning",Dc=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${No(Oc).contentName}}.`;return c.useEffect(()=>{var a;const o=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Mc=mo,jc=yo,Ao=bo,Oo=xo,Do=So,Mo=Eo,jo=Po;/**
* @license lucide-react v0.468.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const kc=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),ko=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
* @license lucide-react v0.468.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/var _c={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
* @license lucide-react v0.468.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ic=J.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:a,iconNode:s,...i},l)=>J.createElement("svg",{ref:l,..._c,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:ko("lucide",o),...i},[...s.map(([u,f])=>J.createElement(u,f)),...Array.isArray(a)?a:[a]]));/**
* @license lucide-react v0.468.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const je=(e,t)=>{const n=J.forwardRef(({className:r,...o},a)=>J.createElement(Ic,{ref:a,iconNode:t,className:ko(`lucide-${kc(e)}`,r),...o}));return n.displayName=`${e}`,n};/**
* @license lucide-react v0.468.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const $c=je("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
* @license lucide-react v0.468.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const _o=je("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
* @license lucide-react v0.468.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Lc=je("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
* @license lucide-react v0.468.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Fc=je("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
* @license lucide-react v0.468.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Wc=je("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
* @license lucide-react v0.468.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Bc=je("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
* @license lucide-react v0.468.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Vc=je("Link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67