@getruba/checkout 0.3.0 → 0.3.1
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/components/index.cjs +3 -3
- package/dist/components/index.d.cts +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.js +3 -3
- package/dist/guards.d.cts +1 -1
- package/dist/guards.d.ts +1 -1
- package/dist/hooks/index.d.cts +1 -1
- package/dist/hooks/index.d.ts +1 -1
- package/dist/{index.d-DvLuMU7T.d.cts → index.d-DPYkwmIv.d.cts} +4 -4
- package/dist/{index.d-DvLuMU7T.d.ts → index.d-DPYkwmIv.d.ts} +4 -4
- package/dist/providers/index.d.cts +1 -1
- package/dist/providers/index.d.ts +1 -1
- package/package.json +2 -2
package/dist/components/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
|
3
3
|
2. You might be breaking the Rules of Hooks
|
|
4
4
|
3. You might have more than one copy of React in the same app
|
|
5
|
-
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),i}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var l=Gl("react"),u={d:{f:e,r:function(){throw Error("Invalid form element. requestFormReset must be passed a form that was rendered by React.")},D:e,C:e,L:e,m:e,X:e,S:e,M:e},p:0,findDOMNode:null},f=Symbol.for("react.portal"),g=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;typeof Map=="function"&&Map.prototype!=null&&typeof Map.prototype.forEach=="function"&&typeof Set=="function"&&Set.prototype!=null&&typeof Set.prototype.clear=="function"&&typeof Set.prototype.forEach=="function"||console.error("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),ze.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=u,ze.createPortal=function(i,c){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!c||c.nodeType!==1&&c.nodeType!==9&&c.nodeType!==11)throw Error("Target container is not a DOM element.");return a(i,c,null,m)},ze.flushSync=function(i){var c=g.T,m=u.p;try{if(g.T=null,u.p=2,i)return i()}finally{g.T=c,u.p=m,u.d.f()&&console.error("flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task.")}},ze.preconnect=function(i,c){typeof i=="string"&&i?c!=null&&typeof c!="object"?console.error("ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.",n(c)):c!=null&&typeof c.crossOrigin!="string"&&console.error("ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.",r(c.crossOrigin)):console.error("ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",r(i)),typeof i=="string"&&(c?(c=c.crossOrigin,c=typeof c=="string"?c==="use-credentials"?c:"":void 0):c=null,u.d.C(i,c))},ze.prefetchDNS=function(i){if(typeof i!="string"||!i)console.error("ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",r(i));else if(1<arguments.length){var c=arguments[1];typeof c=="object"&&c.hasOwnProperty("crossOrigin")?console.error("ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",n(c)):console.error("ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",n(c))}typeof i=="string"&&u.d.D(i)},ze.preinit=function(i,c){if(typeof i=="string"&&i?c==null||typeof c!="object"?console.error("ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.",n(c)):c.as!=="style"&&c.as!=="script"&&console.error('ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are "style" and "script".',n(c.as)):console.error("ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",r(i)),typeof i=="string"&&c&&typeof c.as=="string"){var m=c.as,h=o(m,c.crossOrigin),d=typeof c.integrity=="string"?c.integrity:void 0,p=typeof c.fetchPriority=="string"?c.fetchPriority:void 0;m==="style"?u.d.S(i,typeof c.precedence=="string"?c.precedence:void 0,{crossOrigin:h,integrity:d,fetchPriority:p}):m==="script"&&u.d.X(i,{crossOrigin:h,integrity:d,fetchPriority:p,nonce:typeof c.nonce=="string"?c.nonce:void 0})}},ze.preinitModule=function(i,c){var m="";if(typeof i=="string"&&i||(m+=" The `href` argument encountered was "+r(i)+"."),c!==void 0&&typeof c!="object"?m+=" The `options` argument encountered was "+r(c)+".":c&&"as"in c&&c.as!=="script"&&(m+=" The `as` option encountered was "+n(c.as)+"."),m)console.error("ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s",m);else switch(m=c&&typeof c.as=="string"?c.as:"script",m){case"script":break;default:m=n(m),console.error('ReactDOM.preinitModule(): Currently the only supported "as" type for this function is "script" but received "%s" instead. This warning was generated for `href` "%s". In the future other module types will be supported, aligning with the import-attributes proposal. Learn more here: (https://github.com/tc39/proposal-import-attributes)',m,i)}typeof i=="string"&&(typeof c=="object"&&c!==null?(c.as==null||c.as==="script")&&(m=o(c.as,c.crossOrigin),u.d.M(i,{crossOrigin:m,integrity:typeof c.integrity=="string"?c.integrity:void 0,nonce:typeof c.nonce=="string"?c.nonce:void 0})):c==null&&u.d.M(i))},ze.preload=function(i,c){var m="";if(typeof i=="string"&&i||(m+=" The `href` argument encountered was "+r(i)+"."),c==null||typeof c!="object"?m+=" The `options` argument encountered was "+r(c)+".":typeof c.as=="string"&&c.as||(m+=" The `as` option encountered was "+r(c.as)+"."),m&&console.error('ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `<link rel="preload" as="..." />` tag.%s',m),typeof i=="string"&&typeof c=="object"&&c!==null&&typeof c.as=="string"){m=c.as;var h=o(m,c.crossOrigin);u.d.L(i,m,{crossOrigin:h,integrity:typeof c.integrity=="string"?c.integrity:void 0,nonce:typeof c.nonce=="string"?c.nonce:void 0,type:typeof c.type=="string"?c.type:void 0,fetchPriority:typeof c.fetchPriority=="string"?c.fetchPriority:void 0,referrerPolicy:typeof c.referrerPolicy=="string"?c.referrerPolicy:void 0,imageSrcSet:typeof c.imageSrcSet=="string"?c.imageSrcSet:void 0,imageSizes:typeof c.imageSizes=="string"?c.imageSizes:void 0,media:typeof c.media=="string"?c.media:void 0})}},ze.preloadModule=function(i,c){var m="";typeof i=="string"&&i||(m+=" The `href` argument encountered was "+r(i)+"."),c!==void 0&&typeof c!="object"?m+=" The `options` argument encountered was "+r(c)+".":c&&"as"in c&&typeof c.as!="string"&&(m+=" The `as` option encountered was "+r(c.as)+"."),m&&console.error('ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `<link rel="modulepreload" as="..." />` tag.%s',m),typeof i=="string"&&(c?(m=o(c.as,c.crossOrigin),u.d.m(i,{as:typeof c.as=="string"&&c.as!=="script"?c.as:void 0,crossOrigin:m,integrity:typeof c.integrity=="string"?c.integrity:void 0})):u.d.m(i))},ze.requestFormReset=function(i){u.d.r(i)},ze.unstable_batchedUpdates=function(i,c){return i(c)},ze.useFormState=function(i,c,m){return s().useFormState(i,c,m)},ze.useFormStatus=function(){return s().useHostTransitionStatus()},ze.version="19.2.5",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var aa=qn((dR,es)=>{"use strict";function td(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function")){if(process.env.NODE_ENV!=="production")throw new Error("^_^");try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(td)}catch(e){console.error(e)}}}process.env.NODE_ENV==="production"?(td(),es.exports=Ju()):es.exports=ed()});import{Fragment as hg,jsx as xg,jsxs as Jl}from"react/jsx-runtime";var Ql="{buyerTermsLink}",ei=({isPaymentRequired:e,isTrial:t,isRecurring:a,buttonLabel:o,locale:r})=>{let n=he(r??Le),s={buttonLabel:o,buyerTermsLink:Ql},l=e?n(t?"checkout.footer.mandateSubscriptionTrial":a?"checkout.footer.mandateSubscription":"checkout.footer.mandateOneTime",s):n("checkout.footer.merchantOfRecord"),u=n("checkout.footer.buyerTermsLink"),[f,g]=l.split(Ql);return Jl("p",{className:"text-center text-xs text-gray-500 dark:text-gray-500",children:[f,g!==void 0&&Jl(hg,{children:[xg("a",{href:"/legal/checkout-buyer-terms",target:"_blank",rel:"noreferrer",className:"underline",children:u}),g]})]})};import{forwardRef as Cg,createElement as Lg}from"react";var sr=(...e)=>e.filter((t,a,o)=>!!t&&t.trim()!==""&&o.indexOf(t)===a).join(" ").trim();var ti=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();var ai=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,a,o)=>o?o.toUpperCase():a.toLowerCase());var Vn=e=>{let t=ai(e);return t.charAt(0).toUpperCase()+t.slice(1)};import{forwardRef as yg,createElement as ni}from"react";var oi={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"};var ri=e=>{for(let t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};var si=yg(({color:e="currentColor",size:t=24,strokeWidth:a=2,absoluteStrokeWidth:o,className:r="",children:n,iconNode:s,...l},u)=>ni("svg",{ref:u,...oi,width:t,height:t,stroke:e,strokeWidth:o?Number(a)*24/Number(t):a,className:sr("lucide",r),...!n&&!ri(l)&&{"aria-hidden":"true"},...l},[...s.map(([f,g])=>ni(f,g)),...Array.isArray(n)?n:[n]]));var vt=(e,t)=>{let a=Cg(({className:o,...r},n)=>Lg(si,{ref:n,iconNode:t,className:sr(`lucide-${ti(Vn(e))}`,`lucide-${e}`,o),...r}));return a.displayName=Vn(e),a};var bg=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],ha=vt("check",bg);var Sg=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Xa=vt("chevron-down",Sg);var vg=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],yo=vt("chevron-up",vg);var Ig=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Co=vt("circle",Ig);var wg=[["path",{d:"M5 12h14",key:"1ays0h"}]],Lo=vt("minus",wg);var bo={},li;function Rg(){if(li)return bo;li=1,Object.defineProperty(bo,"__esModule",{value:!0}),bo.styleq=void 0;var e=new WeakMap,t="$$css";function a(r){var n,s,l;return r!=null&&(n=r.disableCache===!0,s=r.disableMix===!0,l=r.transform),function(){for(var f=[],g="",i=null,c="",m=n?null:e,h=new Array(arguments.length),d=0;d<arguments.length;d++)h[d]=arguments[d];for(;h.length>0;){var p=h.pop();if(!(p==null||p===!1)){if(Array.isArray(p)){for(var x=0;x<p.length;x++)h.push(p[x]);continue}var y=l!=null?l(p):p;if(y.$$css!=null){var C="";if(m!=null&&m.has(y)){var v=m.get(y);v!=null&&(C=v[0],c=v[2],f.push.apply(f,v[1]),m=v[3])}else{var S=[];for(var w in y){var b=y[w];if(w===t){var I=y[w];I!==!0&&(c=c?I+"; "+c:I);continue}typeof b=="string"||b===null?f.includes(w)||(f.push(w),m!=null&&S.push(w),typeof b=="string"&&(C+=C?" "+b:b)):console.error("styleq: ".concat(w," typeof ").concat(String(b),' is not "string" or "null".'))}if(m!=null){var D=new WeakMap;m.set(y,[C,S,c,D]),m=D}}C&&(g=g?C+" "+g:C)}else if(s)i==null&&(i={}),i=Object.assign({},y,i);else{var F=null;for(var k in y){var T=y[k];T!==void 0&&(f.includes(k)||(T!=null&&(i==null&&(i={}),F==null&&(F={}),F[k]=T),f.push(k),m=null))}F!=null&&(i=Object.assign(F,i))}}}var q=[g,i,c];return q}}var o=bo.styleq=a();return o.factory=a,bo}var ii=Rg(),Be=e=>new Error(`Unexpected 'stylex.${e}' call at runtime. Styles must be compiled by '@stylexjs/babel-plugin'.`),at=e=>Be(`types.${e}`),H=function(t){throw Be("create")},Pg=(e,t)=>{throw Be("createTheme")},lr=function(t){throw Be("defineConsts")},Oe=function(t){throw Be("defineVars")},kg=()=>{throw Be("defineMarker")},Tg=(...e)=>{throw Be("firstThatWorks")},Ag=e=>{throw Be("keyframes")},Mg=e=>{throw Be("positionTry")};function ja(...e){let[t,a,o]=ii.styleq(e),r={};return t!=null&&t!==""&&(r.className=t),a!=null&&Object.keys(a).length>0&&(r.style=a),o!=null&&o!==""&&(r["data-style-src"]=o),r}var Dg=e=>e.replace(/([A-Z])/g,"-$1").toLowerCase();function Fg(...e){let{className:t,style:a,"data-style-src":o}=ja.apply(this,e),r={};return t!=null&&(r.class=t),a!=null&&(r.style=Object.entries(a).map(([n,s])=>`${Dg(n)}:${s}`).join(";")),o!=null&&(r["data-style-src"]=o),r}var Eg=e=>{throw Be("viewTransitionClass")},Bg=()=>{throw Be("defaultMarker")},Og={ancestor:e=>{throw Be("when.ancestor")},descendant:e=>{throw Be("when.descendant")},siblingBefore:e=>{throw Be("when.siblingBefore")},siblingAfter:e=>{throw Be("when.siblingAfter")},anySibling:e=>{throw Be("when.anySibling")}},_g=Object.freeze({}),Ng={angle:e=>{throw at("angle")},color:e=>{throw at("color")},url:e=>{throw at("url")},image:e=>{throw at("image")},integer:e=>{throw at("integer")},lengthPercentage:e=>{throw at("lengthPercentage")},length:e=>{throw at("length")},percentage:e=>{throw at("percentage")},number:e=>{throw at("number")},resolution:e=>{throw at("resolution")},time:e=>{throw at("time")},transformFunction:e=>{throw at("transformFunction")},transformList:e=>{throw at("transformList")}};function He(...e){let[t]=ii.styleq(e);return t}He.create=H;He.createTheme=Pg;He.defineConsts=lr;He.defineMarker=kg;He.defineVars=Oe;He.defaultMarker=Bg;He.firstThatWorks=Tg;He.keyframes=Ag;He.positionTry=Mg;He.props=ja;He.attrs=Fg;He.types=Ng;He.when=Og;He.viewTransitionClass=Eg;He.env=_g;import jg,{useId as Kg}from"react";var X=Oe({white:"#ffffff",black:"#000000",gray50:"#fafafa",gray100:"#f5f5f7",gray200:"#e8e8ed",gray300:"#d2d2d7",gray400:"#86868b",gray500:"#6e6e73",gray600:"#5a5a5f",gray700:"#424245",gray800:"#2c2c2e",gray900:"#1d1d1f",gray950:"#111112",polar50:"#f5f9ff",polar100:"#dce7f5",polar200:"#c3d2e3",polar300:"#9db0c8",polar400:"#71869f",polar500:"#5d7189",polar600:"#40526a",polar700:"#263952",polar800:"#101d30",polar900:"#0b1424",polar950:"#07101e",emerald50:"oklch(0.979 0.021 166.113)",emerald100:"oklch(0.95 0.052 163.051)",emerald200:"oklch(0.905 0.093 164.15)",emerald300:"oklch(0.845 0.143 164.978)",emerald400:"oklch(0.765 0.177 163.223)",emerald500:"oklch(0.696 0.17 162.48)",emerald600:"oklch(0.596 0.145 163.225)",emerald700:"oklch(0.508 0.118 165.612)",emerald800:"oklch(0.432 0.095 166.913)",emerald900:"oklch(0.378 0.077 168.94)",emerald950:"oklch(0.262 0.051 172.552)",red50:"oklch(0.971 0.013 17.38)",red100:"oklch(0.936 0.032 17.717)",red200:"oklch(0.885 0.062 18.334)",red300:"oklch(0.808 0.114 19.571)",red400:"oklch(0.704 0.191 22.216)",red500:"oklch(0.637 0.237 25.331)",red600:"oklch(0.577 0.245 27.325)",red700:"oklch(0.505 0.213 27.518)",red800:"oklch(0.444 0.177 26.899)",red900:"oklch(0.396 0.141 25.723)",red950:"oklch(0.258 0.092 26.042)",amber50:"oklch(0.987 0.022 95.277)",amber100:"oklch(0.962 0.059 95.617)",amber200:"oklch(0.924 0.12 95.746)",amber300:"oklch(0.879 0.169 91.605)",amber400:"oklch(0.828 0.189 84.429)",amber500:"oklch(0.769 0.188 70.08)",amber600:"oklch(0.666 0.179 58.318)",amber700:"oklch(0.555 0.163 48.998)",amber800:"oklch(0.473 0.137 46.201)",amber900:"oklch(0.414 0.112 45.904)",amber950:"oklch(0.279 0.077 45.635)",indigo50:"#eaf4ff",indigo100:"#d7ebff",indigo200:"#afd7ff",indigo300:"#78b9f7",indigo400:"#2997ff",indigo500:"#0071e3",indigo600:"#0071e3",indigo700:"#005bb7",indigo800:"#00498f",indigo900:"#00386f",indigo950:"#00264d"}),be=Oe({1:"0.75rem",2:"0.875rem",3:"1rem",4:"1.125rem",5:"1.25rem",6:"1.5rem",7:"1.875rem",8:"2.25rem",9:"3rem",10:"3.75rem",11:"4.5rem",12:"6rem"}),ot=Oe({none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625"}),Gn=Oe({regular:"400",medium:"500",semibold:"600"}),RI=Oe({tight:"-0.02em",normal:"0",wide:"0.025em"}),qe=Oe({sans:"-apple-system, 'SF Pro Display', 'SF Pro Text', 'Inter', sans-serif",display:"-apple-system, 'SF Pro Display', 'SF Pro Text', 'Inter', sans-serif",mono:"'GeistMono', monospace"}),L=Oe({none:"0",xs:"4px",s:"8px",m:"12px",l:"16px",xl:"24px","2xl":"32px","3xl":"48px","4xl":"64px","5xl":"96px"}),te=Oe({none:"0",s:"8px",m:"12px",l:"16px",card:"22px",xl:"32px",full:"9999px"}),Kt=Oe({none:"none",s:"0 1px 2px rgba(0, 0, 0, 0.05)",m:"0 2px 4px rgba(0, 0, 0, 0.04)",l:"0 2px 4px rgba(0, 0, 0, 0.04), 0 24px 48px -30px rgba(0, 0, 0, 0.14)",xl:"0 2px 4px rgba(0, 0, 0, 0.04), 0 30px 60px -30px rgba(0, 0, 0, 0.16)"}),Wn=lr({sm:640,md:768,lg:1024,xl:1280}),rt=Oe({instant:"0ms",fast:"120ms",base:"200ms",slow:"320ms",slower:"480ms"}),ya=lr({standard:"cubic-bezier(0.2, 0, 0, 1)",decelerate:"cubic-bezier(0, 0, 0, 1)",accelerate:"cubic-bezier(0.3, 0, 1, 1)",spring:"cubic-bezier(0.5, 1.25, 0.4, 1)"});var pt=Oe({"background-primary":`light-dark(${X.white}, ${X.polar950})`,"background-secondary":`light-dark(${X.gray100}, ${X.polar900})`,"background-card":`light-dark(${X.white}, ${X.polar800})`,"background-inverse":`light-dark(${X.gray900}, ${X.white})`,"background-brand":`light-dark(${X.indigo500}, ${X.indigo500})`,"background-accent":`light-dark(${X.indigo50}, ${X.indigo950})`,"background-warning":`light-dark(${X.amber50}, ${X.amber950})`,"background-success":`light-dark(${X.emerald50}, ${X.emerald950})`,"background-danger":`light-dark(${X.red50}, ${X.red950})`}),Me=Oe({"text-primary":`light-dark(${X.gray900}, ${X.white})`,"text-secondary":`light-dark(${X.gray500}, ${X.polar400})`,"text-tertiary":`light-dark(${X.gray400}, ${X.polar500})`,"text-disabled":`light-dark(${X.gray300}, ${X.polar600})`,"text-success":`light-dark(${X.emerald500}, ${X.emerald500})`,"text-danger":`light-dark(${X.red500}, ${X.red500})`,"text-warning":`light-dark(${X.amber500}, ${X.amber500})`,"text-accent":`light-dark(${X.indigo500}, ${X.indigo500})`}),Za=Oe({"border-primary":`light-dark(${X.gray200}, ${X.polar700})`,"border-secondary":`light-dark(${X.gray100}, ${X.polar800})`,"border-warning":`light-dark(${X.amber300}, ${X.amber700})`}),Ca="@media (min-width: 768px)",ui=H({default:{fontFamily:qe.sans,fontSize:be[2],lineHeight:ot.normal},title:{fontFamily:qe.sans,fontSize:be[2],lineHeight:ot.normal,fontWeight:Gn.medium},body:{fontFamily:qe.sans,fontSize:be[3],lineHeight:ot.normal},label:{fontFamily:qe.sans,fontSize:be[1],lineHeight:ot.snug,fontWeight:Gn.medium},caption:{fontFamily:qe.sans,fontSize:be[1],lineHeight:ot.snug},"heading-2xl":{fontFamily:qe.display,fontSize:{default:be[10],[Ca]:be[12]},lineHeight:ot.none},"heading-xl":{fontFamily:qe.display,fontSize:{default:be[9],[Ca]:be[11]},lineHeight:ot.none},"heading-l":{fontFamily:qe.display,fontSize:{default:be[8],[Ca]:be[9]},lineHeight:ot.tight},"heading-m":{fontFamily:qe.sans,fontSize:{default:be[7],[Ca]:be[8]},lineHeight:ot.tight},"heading-s":{fontFamily:qe.sans,fontSize:{default:be[6],[Ca]:be[7]},lineHeight:ot.snug},"heading-xs":{fontFamily:qe.sans,fontSize:{default:be[5],[Ca]:be[6]},lineHeight:ot.snug},"heading-xxs":{fontFamily:qe.sans,fontSize:{default:be[4],[Ca]:be[5]},lineHeight:ot.snug}}),di=H({default:{color:Me["text-primary"]},muted:{color:Me["text-secondary"]},disabled:{color:Me["text-disabled"]},accent:{color:Me["text-accent"]},danger:{color:Me["text-danger"]},error:{color:Me["text-danger"]},warning:{color:Me["text-warning"]},success:{color:Me["text-success"]},inverse:{color:`light-dark(${X.white}, ${X.black})`},white:{color:X.white},black:{color:X.black},inherit:{}});var Bt={none:"none",all:"all",common:"color, background-color, border-color, box-shadow, opacity, transform",colors:"color, background-color, border-color",opacity:"opacity",shadow:"box-shadow",transform:"transform"},ci=H({none:{padding:L.none},xs:{padding:L.xs},s:{padding:L.s},m:{padding:L.m},l:{padding:L.l},xl:{padding:L.xl},"2xl":{padding:L["2xl"]},"3xl":{padding:L["3xl"]},"4xl":{padding:L["4xl"]},"5xl":{padding:L["5xl"]}}),fi=H({none:{paddingTop:L.none},xs:{paddingTop:L.xs},s:{paddingTop:L.s},m:{paddingTop:L.m},l:{paddingTop:L.l},xl:{paddingTop:L.xl},"2xl":{paddingTop:L["2xl"]},"3xl":{paddingTop:L["3xl"]},"4xl":{paddingTop:L["4xl"]},"5xl":{paddingTop:L["5xl"]}}),pi=H({none:{paddingRight:L.none},xs:{paddingRight:L.xs},s:{paddingRight:L.s},m:{paddingRight:L.m},l:{paddingRight:L.l},xl:{paddingRight:L.xl},"2xl":{paddingRight:L["2xl"]},"3xl":{paddingRight:L["3xl"]},"4xl":{paddingRight:L["4xl"]},"5xl":{paddingRight:L["5xl"]}}),mi=H({none:{paddingBottom:L.none},xs:{paddingBottom:L.xs},s:{paddingBottom:L.s},m:{paddingBottom:L.m},l:{paddingBottom:L.l},xl:{paddingBottom:L.xl},"2xl":{paddingBottom:L["2xl"]},"3xl":{paddingBottom:L["3xl"]},"4xl":{paddingBottom:L["4xl"]},"5xl":{paddingBottom:L["5xl"]}}),gi=H({none:{paddingLeft:L.none},xs:{paddingLeft:L.xs},s:{paddingLeft:L.s},m:{paddingLeft:L.m},l:{paddingLeft:L.l},xl:{paddingLeft:L.xl},"2xl":{paddingLeft:L["2xl"]},"3xl":{paddingLeft:L["3xl"]},"4xl":{paddingLeft:L["4xl"]},"5xl":{paddingLeft:L["5xl"]}}),xi=H({none:{paddingInline:L.none},xs:{paddingInline:L.xs},s:{paddingInline:L.s},m:{paddingInline:L.m},l:{paddingInline:L.l},xl:{paddingInline:L.xl},"2xl":{paddingInline:L["2xl"]},"3xl":{paddingInline:L["3xl"]},"4xl":{paddingInline:L["4xl"]},"5xl":{paddingInline:L["5xl"]}}),hi=H({none:{paddingBlock:L.none},xs:{paddingBlock:L.xs},s:{paddingBlock:L.s},m:{paddingBlock:L.m},l:{paddingBlock:L.l},xl:{paddingBlock:L.xl},"2xl":{paddingBlock:L["2xl"]},"3xl":{paddingBlock:L["3xl"]},"4xl":{paddingBlock:L["4xl"]},"5xl":{paddingBlock:L["5xl"]}}),yi=H({none:{margin:L.none},xs:{margin:L.xs},s:{margin:L.s},m:{margin:L.m},l:{margin:L.l},xl:{margin:L.xl},"2xl":{margin:L["2xl"]},"3xl":{margin:L["3xl"]},"4xl":{margin:L["4xl"]},"5xl":{margin:L["5xl"]},auto:{margin:"auto"}}),Ci=H({none:{marginTop:L.none},xs:{marginTop:L.xs},s:{marginTop:L.s},m:{marginTop:L.m},l:{marginTop:L.l},xl:{marginTop:L.xl},"2xl":{marginTop:L["2xl"]},"3xl":{marginTop:L["3xl"]},"4xl":{marginTop:L["4xl"]},"5xl":{marginTop:L["5xl"]},auto:{marginTop:"auto"}}),Li=H({none:{marginRight:L.none},xs:{marginRight:L.xs},s:{marginRight:L.s},m:{marginRight:L.m},l:{marginRight:L.l},xl:{marginRight:L.xl},"2xl":{marginRight:L["2xl"]},"3xl":{marginRight:L["3xl"]},"4xl":{marginRight:L["4xl"]},"5xl":{marginRight:L["5xl"]},auto:{marginRight:"auto"}}),bi=H({none:{marginBottom:L.none},xs:{marginBottom:L.xs},s:{marginBottom:L.s},m:{marginBottom:L.m},l:{marginBottom:L.l},xl:{marginBottom:L.xl},"2xl":{marginBottom:L["2xl"]},"3xl":{marginBottom:L["3xl"]},"4xl":{marginBottom:L["4xl"]},"5xl":{marginBottom:L["5xl"]},auto:{marginBottom:"auto"}}),Si=H({none:{marginLeft:L.none},xs:{marginLeft:L.xs},s:{marginLeft:L.s},m:{marginLeft:L.m},l:{marginLeft:L.l},xl:{marginLeft:L.xl},"2xl":{marginLeft:L["2xl"]},"3xl":{marginLeft:L["3xl"]},"4xl":{marginLeft:L["4xl"]},"5xl":{marginLeft:L["5xl"]},auto:{marginLeft:"auto"}}),vi=H({none:{marginInline:L.none},xs:{marginInline:L.xs},s:{marginInline:L.s},m:{marginInline:L.m},l:{marginInline:L.l},xl:{marginInline:L.xl},"2xl":{marginInline:L["2xl"]},"3xl":{marginInline:L["3xl"]},"4xl":{marginInline:L["4xl"]},"5xl":{marginInline:L["5xl"]},auto:{marginInline:"auto"}}),Ii=H({none:{marginBlock:L.none},xs:{marginBlock:L.xs},s:{marginBlock:L.s},m:{marginBlock:L.m},l:{marginBlock:L.l},xl:{marginBlock:L.xl},"2xl":{marginBlock:L["2xl"]},"3xl":{marginBlock:L["3xl"]},"4xl":{marginBlock:L["4xl"]},"5xl":{marginBlock:L["5xl"]},auto:{marginBlock:"auto"}}),wi=H({none:{gap:L.none},xs:{gap:L.xs},s:{gap:L.s},m:{gap:L.m},l:{gap:L.l},xl:{gap:L.xl},"2xl":{gap:L["2xl"]},"3xl":{gap:L["3xl"]},"4xl":{gap:L["4xl"]},"5xl":{gap:L["5xl"]}}),Ri=H({none:{rowGap:L.none},xs:{rowGap:L.xs},s:{rowGap:L.s},m:{rowGap:L.m},l:{rowGap:L.l},xl:{rowGap:L.xl},"2xl":{rowGap:L["2xl"]},"3xl":{rowGap:L["3xl"]},"4xl":{rowGap:L["4xl"]},"5xl":{rowGap:L["5xl"]}}),Pi=H({none:{columnGap:L.none},xs:{columnGap:L.xs},s:{columnGap:L.s},m:{columnGap:L.m},l:{columnGap:L.l},xl:{columnGap:L.xl},"2xl":{columnGap:L["2xl"]},"3xl":{columnGap:L["3xl"]},"4xl":{columnGap:L["4xl"]},"5xl":{columnGap:L["5xl"]}}),ki=H({"background-primary":{backgroundColor:pt["background-primary"]},"background-secondary":{backgroundColor:pt["background-secondary"]},"background-card":{backgroundColor:pt["background-card"]},"background-inverse":{backgroundColor:pt["background-inverse"]},"background-accent":{backgroundColor:pt["background-accent"]},"background-warning":{backgroundColor:pt["background-warning"]},"background-success":{backgroundColor:pt["background-success"]},"background-danger":{backgroundColor:pt["background-danger"]}}),Ti=H({"text-primary":{color:Me["text-primary"]},"text-secondary":{color:Me["text-secondary"]},"text-tertiary":{color:Me["text-tertiary"]},"text-success":{color:Me["text-success"]},"text-danger":{color:Me["text-danger"]},"text-warning":{color:Me["text-warning"]}}),Ai=H({"border-primary":{borderColor:Za["border-primary"]},"border-secondary":{borderColor:Za["border-secondary"]},"border-warning":{borderColor:Za["border-warning"]}}),Mi=H({none:{borderRadius:te.none},s:{borderRadius:te.s},m:{borderRadius:te.m},l:{borderRadius:te.l},xl:{borderRadius:te.xl},card:{borderRadius:te.card},full:{borderRadius:te.full}}),Di=H({none:{borderTopLeftRadius:te.none},s:{borderTopLeftRadius:te.s},m:{borderTopLeftRadius:te.m},l:{borderTopLeftRadius:te.l},xl:{borderTopLeftRadius:te.xl},card:{borderTopLeftRadius:te.card},full:{borderTopLeftRadius:te.full}}),Fi=H({none:{borderTopRightRadius:te.none},s:{borderTopRightRadius:te.s},m:{borderTopRightRadius:te.m},l:{borderTopRightRadius:te.l},xl:{borderTopRightRadius:te.xl},card:{borderTopRightRadius:te.card},full:{borderTopRightRadius:te.full}}),Ei=H({none:{borderBottomLeftRadius:te.none},s:{borderBottomLeftRadius:te.s},m:{borderBottomLeftRadius:te.m},l:{borderBottomLeftRadius:te.l},xl:{borderBottomLeftRadius:te.xl},card:{borderBottomLeftRadius:te.card},full:{borderBottomLeftRadius:te.full}}),Bi=H({none:{borderBottomRightRadius:te.none},s:{borderBottomRightRadius:te.s},m:{borderBottomRightRadius:te.m},l:{borderBottomRightRadius:te.l},xl:{borderBottomRightRadius:te.xl},card:{borderBottomRightRadius:te.card},full:{borderBottomRightRadius:te.full}}),Oi=H({none:{boxShadow:Kt.none},s:{boxShadow:Kt.s},m:{boxShadow:Kt.m},l:{boxShadow:Kt.l},xl:{boxShadow:Kt.xl}}),_i=H({flex:{display:"flex"},grid:{display:"grid"},block:{display:"block"},inline:{display:"inline"},"inline-flex":{display:"inline-flex"},"inline-grid":{display:"inline-grid"},"inline-block":{display:"inline-block"},none:{display:"none"},contents:{display:"contents"}}),Ni=H({hidden:{overflow:"hidden"},auto:{overflow:"auto"},scroll:{overflow:"scroll"},visible:{overflow:"visible"}}),Ui=H({hidden:{overflowX:"hidden"},auto:{overflowX:"auto"},scroll:{overflowX:"scroll"},visible:{overflowX:"visible"}}),Hi=H({hidden:{overflowY:"hidden"},auto:{overflowY:"auto"},scroll:{overflowY:"scroll"},visible:{overflowY:"visible"}}),qi=H({row:{flexDirection:"row"},column:{flexDirection:"column"},"row-reverse":{flexDirection:"row-reverse"},"column-reverse":{flexDirection:"column-reverse"}}),Vi=H({wrap:{flexWrap:"wrap"},nowrap:{flexWrap:"nowrap"},"wrap-reverse":{flexWrap:"wrap-reverse"}}),Gi=H({start:{alignItems:"flex-start"},end:{alignItems:"flex-end"},center:{alignItems:"center"},baseline:{alignItems:"baseline"},stretch:{alignItems:"stretch"}}),Wi=H({start:{alignSelf:"flex-start"},end:{alignSelf:"flex-end"},center:{alignSelf:"center"},baseline:{alignSelf:"baseline"},stretch:{alignSelf:"stretch"},auto:{alignSelf:"auto"}}),zi=H({start:{justifyContent:"flex-start"},end:{justifyContent:"flex-end"},center:{justifyContent:"center"},between:{justifyContent:"space-between"},around:{justifyContent:"space-around"},evenly:{justifyContent:"space-evenly"}}),$i=H({start:{alignContent:"flex-start"},end:{alignContent:"flex-end"},center:{alignContent:"center"},between:{alignContent:"space-between"},around:{alignContent:"space-around"},evenly:{alignContent:"space-evenly"},stretch:{alignContent:"stretch"}}),Xi=H({row:{gridAutoFlow:"row"},column:{gridAutoFlow:"column"},dense:{gridAutoFlow:"dense"},"row-dense":{gridAutoFlow:"row dense"},"column-dense":{gridAutoFlow:"column dense"}}),ji=H({relative:{position:"relative"},absolute:{position:"absolute"},fixed:{position:"fixed"},sticky:{position:"sticky"},static:{position:"static"}}),Ki=H({solid:{borderStyle:"solid"},dashed:{borderStyle:"dashed"},dotted:{borderStyle:"dotted"},none:{borderStyle:"none"}}),Zi=H({pointer:{cursor:"pointer"},default:{cursor:"default"},"not-allowed":{cursor:"not-allowed"},grab:{cursor:"grab"},grabbing:{cursor:"grabbing"},text:{cursor:"text"},move:{cursor:"move"},wait:{cursor:"wait"}}),Yi=H({none:{pointerEvents:"none"},auto:{pointerEvents:"auto"}}),Qi=H({visible:{visibility:"visible"},hidden:{visibility:"hidden"}}),Ji=H({none:{userSelect:"none"},text:{userSelect:"text"},all:{userSelect:"all"},auto:{userSelect:"auto"}}),eu=H({none:{transitionProperty:Bt.none},all:{transitionProperty:Bt.all},common:{transitionProperty:Bt.common},colors:{transitionProperty:Bt.colors},opacity:{transitionProperty:Bt.opacity},shadow:{transitionProperty:Bt.shadow},transform:{transitionProperty:Bt.transform}}),tu=H({instant:{transitionDuration:rt.instant},fast:{transitionDuration:rt.fast},base:{transitionDuration:rt.base},slow:{transitionDuration:rt.slow},slower:{transitionDuration:rt.slower}}),au=H({standard:{transitionTimingFunction:ya.standard},decelerate:{transitionTimingFunction:ya.decelerate},accelerate:{transitionTimingFunction:ya.accelerate},spring:{transitionTimingFunction:ya.spring}}),ou=H({instant:{transitionDelay:rt.instant},fast:{transitionDelay:rt.fast},base:{transitionDelay:rt.base},slow:{transitionDelay:rt.slow},slower:{transitionDelay:rt.slower}});var ir=H({left:{textAlign:"left"},center:{textAlign:"center"},right:{textAlign:"right"},justify:{textAlign:"justify"}}),ru=H({wrap:{textWrap:"wrap"},nowrap:{textWrap:"nowrap"},balance:{textWrap:"balance"},pretty:{textWrap:"pretty"}}),So=H({monospace:{fontFamily:qe.mono},tabularNums:{fontVariantNumeric:"tabular-nums"},lineThrough:{textDecoration:"line-through"},truncate:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}});var zn={hover:":hover",focus:":focus",active:":active",focusVisible:":focus-visible",focusWithin:":focus-within"};function nu(e){return e in zn}function su(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Ug(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}var lu=["padding","margin","gap","padding-inline","margin-inline","padding-block","margin-block","row-gap","column-gap","padding-top","padding-right","padding-bottom","padding-left","margin-top","margin-right","margin-bottom","margin-left","border-width","border-style","border-color","border-radius","border-top-left-radius","border-top-right-radius","border-bottom-left-radius","border-bottom-right-radius","border-top-width","border-right-width","border-bottom-width","border-left-width","overflow","overflow-x","overflow-y","flex","flex-direction","flex-wrap","flex-grow","flex-shrink","flex-basis","inset","top","right","bottom","left"];function dr(e){return e.includes("-")?e:Ug(e)}function iu(e){return Object.entries(e).sort(([t],[a])=>{let o=dr(t),r=dr(a),n=lu.indexOf(o),s=lu.indexOf(r),l=n===-1?1e4:n,u=s===-1?1e4:s;return l!==u?l-u:o.localeCompare(r)})}function Ya(e){return e===0?"0":`${e}px`}function lt(e){return typeof e=="number"?Ya(e):e}function It(e){return L[e]}function La(e){return e==="auto"?"auto":L[e]}function Hg(e){return pt[e]}function qg(e){return Me[e]}function Vg(e){return Za[e]}function vo(e){return te[e]}function Gg(e){return Kt[e]}function uu(e){return rt[e]}function Wg(e){return ya[e]}function zg(e){return Bt[e]}var $g={start:"flex-start",end:"flex-end",between:"space-between",around:"space-around",evenly:"space-evenly"};function ur(e){return $g[e]??e}var Xg={padding:!0,paddingTop:!0,paddingRight:!0,paddingBottom:!0,paddingLeft:!0,paddingHorizontal:!0,paddingVertical:!0,p:!0,pt:!0,pr:!0,pb:!0,pl:!0,px:!0,py:!0,margin:!0,marginTop:!0,marginRight:!0,marginBottom:!0,marginLeft:!0,marginHorizontal:!0,marginVertical:!0,m:!0,mt:!0,mr:!0,mb:!0,ml:!0,mx:!0,my:!0,gap:!0,rowGap:!0,columnGap:!0,g:!0,backgroundColor:!0,color:!0,borderColor:!0,borderRadius:!0,borderTopLeftRadius:!0,borderTopRightRadius:!0,borderBottomLeftRadius:!0,borderBottomRightRadius:!0,borderWidth:!0,borderTopWidth:!0,borderRightWidth:!0,borderBottomWidth:!0,borderLeftWidth:!0,borderStyle:!0,boxShadow:!0,display:!0,overflow:!0,overflowX:!0,overflowY:!0,width:!0,height:!0,minWidth:!0,maxWidth:!0,minHeight:!0,maxHeight:!0,aspectRatio:!0,flex:!0,flexDirection:!0,flexWrap:!0,flexGrow:!0,flexShrink:!0,flexBasis:!0,alignItems:!0,alignSelf:!0,justifyContent:!0,alignContent:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridColumn:!0,gridRow:!0,gridArea:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridAutoRows:!0,position:!0,top:!0,right:!0,bottom:!0,left:!0,inset:!0,zIndex:!0,transitionProperty:!0,transitionDuration:!0,transitionTimingFunction:!0,ease:!0,transitionDelay:!0,transform:!0,transformOrigin:!0,willChange:!0,opacity:!0,cursor:!0,pointerEvents:!0,visibility:!0,userSelect:!0,textAlign:!0},du=new Set(Object.keys(Xg));function cu(e,t){let a=[],o={},r={},n={};function s(i,c,m,h){if(m!==void 0)if(su(m)){for(let[d,p]of Object.entries(m))if(p!==void 0)if(d==="base"){let x=i[p];x&&a.push(x)}else if(nu(d)){let x=zn[d];n[x]||(n[x]={}),n[x][c]=h(p)}else{let x=Wn[d];x!==void 0&&(r[x]||(r[x]={}),r[x][c]=h(p))}}else{let d=i[m];d&&a.push(d)}}function l(i,c,m){if(c!==void 0)if(su(c))for(let[h,d]of Object.entries(c)){if(d===void 0)continue;let p=m(d);if(h==="base")r[0]||(r[0]={}),r[0][i]=p;else if(nu(h)){let x=zn[h];n[x]||(n[x]={}),n[x][i]=p}else{let x=Wn[h];x!==void 0&&(r[x]||(r[x]={}),r[x][i]=p)}}else o[i]=m(c)}s(ci,"padding",e.padding??e.p,It),s(fi,"padding-top",e.paddingTop??e.pt,It),s(pi,"padding-right",e.paddingRight??e.pr,It),s(mi,"padding-bottom",e.paddingBottom??e.pb,It),s(gi,"padding-left",e.paddingLeft??e.pl,It),s(xi,"padding-inline",e.paddingHorizontal??e.px,It),s(hi,"padding-block",e.paddingVertical??e.py,It),s(yi,"margin",e.margin??e.m,La),s(Ci,"margin-top",e.marginTop??e.mt,La),s(Li,"margin-right",e.marginRight??e.mr,La),s(bi,"margin-bottom",e.marginBottom??e.mb,La),s(Si,"margin-left",e.marginLeft??e.ml,La),s(vi,"margin-inline",e.marginHorizontal??e.mx,La),s(Ii,"margin-block",e.marginVertical??e.my,La),s(wi,"gap",e.gap??e.g,It),s(Ri,"row-gap",e.rowGap,It),s(Pi,"column-gap",e.columnGap,It),s(ki,"background-color",e.backgroundColor,Hg),s(Ti,"color",e.color,qg),s(Ai,"border-color",e.borderColor,Vg),s(Mi,"border-radius",e.borderRadius,vo),s(Di,"border-top-left-radius",e.borderTopLeftRadius,vo),s(Fi,"border-top-right-radius",e.borderTopRightRadius,vo),s(Ei,"border-bottom-left-radius",e.borderBottomLeftRadius,vo),s(Bi,"border-bottom-right-radius",e.borderBottomRightRadius,vo),l("borderWidth",e.borderWidth,Ya),l("borderTopWidth",e.borderTopWidth,Ya),l("borderRightWidth",e.borderRightWidth,Ya),l("borderBottomWidth",e.borderBottomWidth,Ya),l("borderLeftWidth",e.borderLeftWidth,Ya),s(Ki,"border-style",e.borderStyle,i=>i),s(Oi,"box-shadow",e.boxShadow,Gg),s(_i,"display",e.display,i=>i),s(Ni,"overflow",e.overflow,i=>i),s(Ui,"overflow-x",e.overflowX,i=>i),s(Hi,"overflow-y",e.overflowY,i=>i),l("width",e.width,lt),l("height",e.height,lt),l("minWidth",e.minWidth,lt),l("maxWidth",e.maxWidth,lt),l("minHeight",e.minHeight,lt),l("maxHeight",e.maxHeight,lt),l("aspectRatio",e.aspectRatio,i=>i),l("flex",e.flex,i=>typeof i=="number"?`${i} ${i} 0%`:i),s(qi,"flex-direction",e.flexDirection,i=>i),s(Vi,"flex-wrap",e.flexWrap,i=>i),l("flexGrow",e.flexGrow,i=>i),l("flexShrink",e.flexShrink,i=>i),l("flexBasis",e.flexBasis,lt),s(Gi,"align-items",e.alignItems,ur),s(Wi,"align-self",e.alignSelf,ur),s(zi,"justify-content",e.justifyContent,ur),s($i,"align-content",e.alignContent,ur),l("gridTemplateColumns",e.gridTemplateColumns,i=>i),l("gridTemplateRows",e.gridTemplateRows,i=>i),l("gridTemplateAreas",e.gridTemplateAreas,i=>i),l("gridColumn",e.gridColumn,i=>i),l("gridRow",e.gridRow,i=>i),l("gridArea",e.gridArea,i=>i),l("gridColumnStart",e.gridColumnStart,i=>i),l("gridColumnEnd",e.gridColumnEnd,i=>i),l("gridRowStart",e.gridRowStart,i=>i),l("gridRowEnd",e.gridRowEnd,i=>i),s(Xi,"grid-auto-flow",e.gridAutoFlow,i=>i),l("gridAutoColumns",e.gridAutoColumns,i=>i),l("gridAutoRows",e.gridAutoRows,i=>i),s(ji,"position",e.position,i=>i),l("top",e.top,lt),l("right",e.right,lt),l("bottom",e.bottom,lt),l("left",e.left,lt),l("inset",e.inset,lt),l("zIndex",e.zIndex,i=>i),s(eu,"transition-property",e.transitionProperty,zg),s(tu,"transition-duration",e.transitionDuration,uu),s(au,"transition-timing-function",e.transitionTimingFunction??e.ease,Wg),s(ou,"transition-delay",e.transitionDelay,uu),l("transform",e.transform,i=>i),l("transformOrigin",e.transformOrigin,i=>i),l("willChange",e.willChange,i=>i),l("opacity",e.opacity,i=>i),s(Zi,"cursor",e.cursor,i=>i),s(Yi,"pointer-events",e.pointerEvents,i=>i),s(Qi,"visibility",e.visibility,i=>i),s(Ji,"user-select",e.userSelect,i=>i),s(ir,"text-align",e.textAlign,i=>i);let u=Object.keys(r).map(Number).sort((i,c)=>i-c),f=Object.keys(n),g=null;if(u.length>0||f.length>0){let i=`.${t}:not(#\\#):not(#\\#):not(#\\#):not(#\\#)`,c=[];for(let m of u){let h=iu(r[m]).map(([d,p])=>`${dr(d)}: ${p}`).join("; ");m===0?c.push(`${i} { ${h} }`):c.push(`@media (min-width: ${m}px) { ${i} { ${h} } }`)}for(let m of f){let h=iu(n[m]).map(([d,p])=>`${dr(d)}: ${p}`).join("; ");c.push(`${i}${m} { ${h} }`)}g=c.join(" ")}return{stylexStyles:a,inlineStyle:o,responsiveCSS:g}}import{Fragment as Qg,jsx as fu,jsxs as Jg}from"react/jsx-runtime";var Zg=new Set(["span","label","li"]);function Yg({as:e,className:t,children:a,style:o,...r},n){let l=`ds${Kg().replace(/:/g,"")}`,u=e||"div",f={},g={};for(let[y,C]of Object.entries(r))du.has(y)?f[y]=C:g[y]=C;f.display===void 0&&!Zg.has(e??"div")&&(f.display="flex");let{stylexStyles:i,inlineStyle:c,responsiveCSS:m}=cu(f,l),h=i.length>0?ja(...i):null,d={...h?.style??{},...c,...o},p=Object.keys(d).length>0,x=[h?.className??null,m?l:null,t].filter(Boolean).join(" ")||void 0;return Jg(Qg,{children:[m&&fu("style",{dangerouslySetInnerHTML:{__html:m}}),fu(u,{ref:n,className:x,style:p?d:void 0,...g,children:a})]})}var ba=jg.forwardRef(Yg);function pu(e){var t,a,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(a=pu(e[t]))&&(o&&(o+=" "),o+=a)}else for(a in e)e[a]&&(o&&(o+=" "),o+=a);return o}function mu(){for(var e,t,a=0,o="",r=arguments.length;a<r;a++)(e=arguments[a])&&(t=pu(e))&&(o&&(o+=" "),o+=t);return o}var gu=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,xu=mu,Ot=(e,t)=>a=>{var o;if(t?.variants==null)return xu(e,a?.class,a?.className);let{variants:r,defaultVariants:n}=t,s=Object.keys(r).map(f=>{let g=a?.[f],i=n?.[f];if(g===null)return null;let c=gu(g)||gu(i);return r[f][c]}),l=a&&Object.entries(a).reduce((f,g)=>{let[i,c]=g;return c===void 0||(f[i]=c),f},{}),u=t==null||(o=t.compoundVariants)===null||o===void 0?void 0:o.reduce((f,g)=>{let{class:i,className:c,...m}=g;return Object.entries(m).every(h=>{let[d,p]=h;return Array.isArray(p)?p.includes({...n,...l}[d]):{...n,...l}[d]===p})?[...f,i,c]:f},[]);return xu(e,s,u,a?.class,a?.className)};var ex=(e,t)=>{let a=new Array(e.length+t.length);for(let o=0;o<e.length;o++)a[o]=e[o];for(let o=0;o<t.length;o++)a[e.length+o]=t[o];return a},tx=(e,t)=>({classGroupId:e,validator:t}),Su=(e=new Map,t=null,a)=>({nextPart:e,validators:t,classGroupId:a});var hu=[],ax="arbitrary..",ox=e=>{let t=nx(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return rx(s);let l=s.split("-"),u=l[0]===""&&l.length>1?1:0;return vu(l,u,t)},getConflictingClassGroupIds:(s,l)=>{if(l){let u=o[s],f=a[s];return u?f?ex(f,u):u:f||hu}return a[s]||hu}}},vu=(e,t,a)=>{if(e.length-t===0)return a.classGroupId;let r=e[t],n=a.nextPart.get(r);if(n){let f=vu(e,t+1,n);if(f)return f}let s=a.validators;if(s===null)return;let l=t===0?e.join("-"):e.slice(t).join("-"),u=s.length;for(let f=0;f<u;f++){let g=s[f];if(g.validator(l))return g.classGroupId}},rx=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{let t=e.slice(1,-1),a=t.indexOf(":"),o=t.slice(0,a);return o?ax+o:void 0})(),nx=e=>{let{theme:t,classGroups:a}=e;return sx(a,t)},sx=(e,t)=>{let a=Su();for(let o in e){let r=e[o];Xn(r,a,o,t)}return a},Xn=(e,t,a,o)=>{let r=e.length;for(let n=0;n<r;n++){let s=e[n];lx(s,t,a,o)}},lx=(e,t,a,o)=>{if(typeof e=="string"){ix(e,t,a);return}if(typeof e=="function"){ux(e,t,a,o);return}dx(e,t,a,o)},ix=(e,t,a)=>{let o=e===""?t:Iu(t,e);o.classGroupId=a},ux=(e,t,a,o)=>{if(cx(e)){Xn(e(o),t,a,o);return}t.validators===null&&(t.validators=[]),t.validators.push(tx(a,e))},dx=(e,t,a,o)=>{let r=Object.entries(e),n=r.length;for(let s=0;s<n;s++){let[l,u]=r[s];Xn(u,Iu(t,l),a,o)}},Iu=(e,t)=>{let a=e,o=t.split("-"),r=o.length;for(let n=0;n<r;n++){let s=o[n],l=a.nextPart.get(s);l||(l=Su(),a.nextPart.set(s,l)),a=l}return a},cx=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,fx=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,a=Object.create(null),o=Object.create(null),r=(n,s)=>{a[n]=s,t++,t>e&&(t=0,o=a,a=Object.create(null))};return{get(n){let s=a[n];if(s!==void 0)return s;if((s=o[n])!==void 0)return r(n,s),s},set(n,s){n in a?a[n]=s:r(n,s)}}};var px=[],yu=(e,t,a,o,r)=>({modifiers:e,hasImportantModifier:t,baseClassName:a,maybePostfixModifierPosition:o,isExternal:r}),mx=e=>{let{prefix:t,experimentalParseClassName:a}=e,o=r=>{let n=[],s=0,l=0,u=0,f,g=r.length;for(let d=0;d<g;d++){let p=r[d];if(s===0&&l===0){if(p===":"){n.push(r.slice(u,d)),u=d+1;continue}if(p==="/"){f=d;continue}}p==="["?s++:p==="]"?s--:p==="("?l++:p===")"&&l--}let i=n.length===0?r:r.slice(u),c=i,m=!1;i.endsWith("!")?(c=i.slice(0,-1),m=!0):i.startsWith("!")&&(c=i.slice(1),m=!0);let h=f&&f>u?f-u:void 0;return yu(n,m,c,h)};if(t){let r=t+":",n=o;o=s=>s.startsWith(r)?n(s.slice(r.length)):yu(px,!1,s,void 0,!0)}if(a){let r=o;o=n=>a({className:n,parseClassName:r})}return o},gx=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((a,o)=>{t.set(a,1e6+o)}),a=>{let o=[],r=[];for(let n=0;n<a.length;n++){let s=a[n],l=s[0]==="[",u=t.has(s);l||u?(r.length>0&&(r.sort(),o.push(...r),r=[]),o.push(s)):r.push(s)}return r.length>0&&(r.sort(),o.push(...r)),o}},xx=e=>({cache:fx(e.cacheSize),parseClassName:mx(e),sortModifiers:gx(e),...ox(e)}),hx=/\s+/,yx=(e,t)=>{let{parseClassName:a,getClassGroupId:o,getConflictingClassGroupIds:r,sortModifiers:n}=t,s=[],l=e.trim().split(hx),u="";for(let f=l.length-1;f>=0;f-=1){let g=l[f],{isExternal:i,modifiers:c,hasImportantModifier:m,baseClassName:h,maybePostfixModifierPosition:d}=a(g);if(i){u=g+(u.length>0?" "+u:u);continue}let p=!!d,x=o(p?h.substring(0,d):h);if(!x){if(!p){u=g+(u.length>0?" "+u:u);continue}if(x=o(h),!x){u=g+(u.length>0?" "+u:u);continue}p=!1}let y=c.length===0?"":c.length===1?c[0]:n(c).join(":"),C=m?y+"!":y,v=C+x;if(s.indexOf(v)>-1)continue;s.push(v);let S=r(x,p);for(let w=0;w<S.length;++w){let b=S[w];s.push(C+b)}u=g+(u.length>0?" "+u:u)}return u},Cx=(...e)=>{let t=0,a,o,r="";for(;t<e.length;)(a=e[t++])&&(o=wu(a))&&(r&&(r+=" "),r+=o);return r},wu=e=>{if(typeof e=="string")return e;let t,a="";for(let o=0;o<e.length;o++)e[o]&&(t=wu(e[o]))&&(a&&(a+=" "),a+=t);return a},Lx=(e,...t)=>{let a,o,r,n,s=u=>{let f=t.reduce((g,i)=>i(g),e());return a=xx(f),o=a.cache.get,r=a.cache.set,n=l,l(u)},l=u=>{let f=o(u);if(f)return f;let g=yx(u,a);return r(u,g),g};return n=s,(...u)=>n(Cx(...u))},bx=[],we=e=>{let t=a=>a[e]||bx;return t.isThemeGetter=!0,t},Ru=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Pu=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Sx=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,vx=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ix=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,wx=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Rx=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Px=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Zt=e=>Sx.test(e),ee=e=>!!e&&!Number.isNaN(Number(e)),Yt=e=>!!e&&Number.isInteger(Number(e)),$n=e=>e.endsWith("%")&&ee(e.slice(0,-1)),_t=e=>vx.test(e),ku=()=>!0,kx=e=>Ix.test(e)&&!wx.test(e),jn=()=>!1,Tx=e=>Rx.test(e),Ax=e=>Px.test(e),Mx=e=>!B(e)&&!O(e),Dx=e=>Qt(e,Mu,jn),B=e=>Ru.test(e),Sa=e=>Qt(e,Du,kx),Cu=e=>Qt(e,Hx,ee),Fx=e=>Qt(e,Eu,ku),Ex=e=>Qt(e,Fu,jn),Lu=e=>Qt(e,Tu,jn),Bx=e=>Qt(e,Au,Ax),cr=e=>Qt(e,Bu,Tx),O=e=>Pu.test(e),Io=e=>va(e,Du),Ox=e=>va(e,Fu),bu=e=>va(e,Tu),_x=e=>va(e,Mu),Nx=e=>va(e,Au),fr=e=>va(e,Bu,!0),Ux=e=>va(e,Eu,!0),Qt=(e,t,a)=>{let o=Ru.exec(e);return o?o[1]?t(o[1]):a(o[2]):!1},va=(e,t,a=!1)=>{let o=Pu.exec(e);return o?o[1]?t(o[1]):a:!1},Tu=e=>e==="position"||e==="percentage",Au=e=>e==="image"||e==="url",Mu=e=>e==="length"||e==="size"||e==="bg-size",Du=e=>e==="length",Hx=e=>e==="number",Fu=e=>e==="family-name",Eu=e=>e==="number"||e==="weight",Bu=e=>e==="shadow";var qx=()=>{let e=we("color"),t=we("font"),a=we("text"),o=we("font-weight"),r=we("tracking"),n=we("leading"),s=we("breakpoint"),l=we("container"),u=we("spacing"),f=we("radius"),g=we("shadow"),i=we("inset-shadow"),c=we("text-shadow"),m=we("drop-shadow"),h=we("blur"),d=we("perspective"),p=we("aspect"),x=we("ease"),y=we("animate"),C=()=>["auto","avoid","all","avoid-page","page","left","right","column"],v=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],S=()=>[...v(),O,B],w=()=>["auto","hidden","clip","visible","scroll"],b=()=>["auto","contain","none"],I=()=>[O,B,u],D=()=>[Zt,"full","auto",...I()],F=()=>[Yt,"none","subgrid",O,B],k=()=>["auto",{span:["full",Yt,O,B]},Yt,O,B],T=()=>[Yt,"auto",O,B],q=()=>["auto","min","max","fr",O,B],z=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],j=()=>["start","end","center","stretch","center-safe","end-safe"],E=()=>["auto",...I()],G=()=>[Zt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...I()],N=()=>[Zt,"screen","full","dvw","lvw","svw","min","max","fit",...I()],P=()=>[Zt,"screen","full","lh","dvh","lvh","svh","min","max","fit",...I()],R=()=>[e,O,B],_=()=>[...v(),bu,Lu,{position:[O,B]}],U=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Z=()=>["auto","cover","contain",_x,Dx,{size:[O,B]}],Ce=()=>[$n,Io,Sa],ce=()=>["","none","full",f,O,B],se=()=>["",ee,Io,Sa],V=()=>["solid","dashed","dotted","double"],le=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Q=()=>[ee,$n,bu,Lu],oe=()=>["","none",h,O,B],ne=()=>["none",ee,O,B],ue=()=>["none",ee,O,B],Ee=()=>[ee,O,B],st=()=>[Zt,"full",...I()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[_t],breakpoint:[_t],color:[ku],container:[_t],"drop-shadow":[_t],ease:["in","out","in-out"],font:[Mx],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[_t],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[_t],shadow:[_t],spacing:["px",ee],text:[_t],"text-shadow":[_t],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Zt,B,O,p]}],container:["container"],columns:[{columns:[ee,B,O,l]}],"break-after":[{"break-after":C()}],"break-before":[{"break-before":C()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:S()}],overflow:[{overflow:w()}],"overflow-x":[{"overflow-x":w()}],"overflow-y":[{"overflow-y":w()}],overscroll:[{overscroll:b()}],"overscroll-x":[{"overscroll-x":b()}],"overscroll-y":[{"overscroll-y":b()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:D()}],"inset-x":[{"inset-x":D()}],"inset-y":[{"inset-y":D()}],start:[{"inset-s":D(),start:D()}],end:[{"inset-e":D(),end:D()}],"inset-bs":[{"inset-bs":D()}],"inset-be":[{"inset-be":D()}],top:[{top:D()}],right:[{right:D()}],bottom:[{bottom:D()}],left:[{left:D()}],visibility:["visible","invisible","collapse"],z:[{z:[Yt,"auto",O,B]}],basis:[{basis:[Zt,"full","auto",l,...I()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ee,Zt,"auto","initial","none",B]}],grow:[{grow:["",ee,O,B]}],shrink:[{shrink:["",ee,O,B]}],order:[{order:[Yt,"first","last","none",O,B]}],"grid-cols":[{"grid-cols":F()}],"col-start-end":[{col:k()}],"col-start":[{"col-start":T()}],"col-end":[{"col-end":T()}],"grid-rows":[{"grid-rows":F()}],"row-start-end":[{row:k()}],"row-start":[{"row-start":T()}],"row-end":[{"row-end":T()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":q()}],"auto-rows":[{"auto-rows":q()}],gap:[{gap:I()}],"gap-x":[{"gap-x":I()}],"gap-y":[{"gap-y":I()}],"justify-content":[{justify:[...z(),"normal"]}],"justify-items":[{"justify-items":[...j(),"normal"]}],"justify-self":[{"justify-self":["auto",...j()]}],"align-content":[{content:["normal",...z()]}],"align-items":[{items:[...j(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...j(),{baseline:["","last"]}]}],"place-content":[{"place-content":z()}],"place-items":[{"place-items":[...j(),"baseline"]}],"place-self":[{"place-self":["auto",...j()]}],p:[{p:I()}],px:[{px:I()}],py:[{py:I()}],ps:[{ps:I()}],pe:[{pe:I()}],pbs:[{pbs:I()}],pbe:[{pbe:I()}],pt:[{pt:I()}],pr:[{pr:I()}],pb:[{pb:I()}],pl:[{pl:I()}],m:[{m:E()}],mx:[{mx:E()}],my:[{my:E()}],ms:[{ms:E()}],me:[{me:E()}],mbs:[{mbs:E()}],mbe:[{mbe:E()}],mt:[{mt:E()}],mr:[{mr:E()}],mb:[{mb:E()}],ml:[{ml:E()}],"space-x":[{"space-x":I()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":I()}],"space-y-reverse":["space-y-reverse"],size:[{size:G()}],"inline-size":[{inline:["auto",...N()]}],"min-inline-size":[{"min-inline":["auto",...N()]}],"max-inline-size":[{"max-inline":["none",...N()]}],"block-size":[{block:["auto",...P()]}],"min-block-size":[{"min-block":["auto",...P()]}],"max-block-size":[{"max-block":["none",...P()]}],w:[{w:[l,"screen",...G()]}],"min-w":[{"min-w":[l,"screen","none",...G()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[s]},...G()]}],h:[{h:["screen","lh",...G()]}],"min-h":[{"min-h":["screen","lh","none",...G()]}],"max-h":[{"max-h":["screen","lh",...G()]}],"font-size":[{text:["base",a,Io,Sa]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,Ux,Fx]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",$n,B]}],"font-family":[{font:[Ox,Ex,t]}],"font-features":[{"font-features":[B]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[r,O,B]}],"line-clamp":[{"line-clamp":[ee,"none",O,Cu]}],leading:[{leading:[n,...I()]}],"list-image":[{"list-image":["none",O,B]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",O,B]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:R()}],"text-color":[{text:R()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...V(),"wavy"]}],"text-decoration-thickness":[{decoration:[ee,"from-font","auto",O,Sa]}],"text-decoration-color":[{decoration:R()}],"underline-offset":[{"underline-offset":[ee,"auto",O,B]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:I()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",O,B]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",O,B]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:_()}],"bg-repeat":[{bg:U()}],"bg-size":[{bg:Z()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Yt,O,B],radial:["",O,B],conic:[Yt,O,B]},Nx,Bx]}],"bg-color":[{bg:R()}],"gradient-from-pos":[{from:Ce()}],"gradient-via-pos":[{via:Ce()}],"gradient-to-pos":[{to:Ce()}],"gradient-from":[{from:R()}],"gradient-via":[{via:R()}],"gradient-to":[{to:R()}],rounded:[{rounded:ce()}],"rounded-s":[{"rounded-s":ce()}],"rounded-e":[{"rounded-e":ce()}],"rounded-t":[{"rounded-t":ce()}],"rounded-r":[{"rounded-r":ce()}],"rounded-b":[{"rounded-b":ce()}],"rounded-l":[{"rounded-l":ce()}],"rounded-ss":[{"rounded-ss":ce()}],"rounded-se":[{"rounded-se":ce()}],"rounded-ee":[{"rounded-ee":ce()}],"rounded-es":[{"rounded-es":ce()}],"rounded-tl":[{"rounded-tl":ce()}],"rounded-tr":[{"rounded-tr":ce()}],"rounded-br":[{"rounded-br":ce()}],"rounded-bl":[{"rounded-bl":ce()}],"border-w":[{border:se()}],"border-w-x":[{"border-x":se()}],"border-w-y":[{"border-y":se()}],"border-w-s":[{"border-s":se()}],"border-w-e":[{"border-e":se()}],"border-w-bs":[{"border-bs":se()}],"border-w-be":[{"border-be":se()}],"border-w-t":[{"border-t":se()}],"border-w-r":[{"border-r":se()}],"border-w-b":[{"border-b":se()}],"border-w-l":[{"border-l":se()}],"divide-x":[{"divide-x":se()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":se()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...V(),"hidden","none"]}],"divide-style":[{divide:[...V(),"hidden","none"]}],"border-color":[{border:R()}],"border-color-x":[{"border-x":R()}],"border-color-y":[{"border-y":R()}],"border-color-s":[{"border-s":R()}],"border-color-e":[{"border-e":R()}],"border-color-bs":[{"border-bs":R()}],"border-color-be":[{"border-be":R()}],"border-color-t":[{"border-t":R()}],"border-color-r":[{"border-r":R()}],"border-color-b":[{"border-b":R()}],"border-color-l":[{"border-l":R()}],"divide-color":[{divide:R()}],"outline-style":[{outline:[...V(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ee,O,B]}],"outline-w":[{outline:["",ee,Io,Sa]}],"outline-color":[{outline:R()}],shadow:[{shadow:["","none",g,fr,cr]}],"shadow-color":[{shadow:R()}],"inset-shadow":[{"inset-shadow":["none",i,fr,cr]}],"inset-shadow-color":[{"inset-shadow":R()}],"ring-w":[{ring:se()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:R()}],"ring-offset-w":[{"ring-offset":[ee,Sa]}],"ring-offset-color":[{"ring-offset":R()}],"inset-ring-w":[{"inset-ring":se()}],"inset-ring-color":[{"inset-ring":R()}],"text-shadow":[{"text-shadow":["none",c,fr,cr]}],"text-shadow-color":[{"text-shadow":R()}],opacity:[{opacity:[ee,O,B]}],"mix-blend":[{"mix-blend":[...le(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":le()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ee]}],"mask-image-linear-from-pos":[{"mask-linear-from":Q()}],"mask-image-linear-to-pos":[{"mask-linear-to":Q()}],"mask-image-linear-from-color":[{"mask-linear-from":R()}],"mask-image-linear-to-color":[{"mask-linear-to":R()}],"mask-image-t-from-pos":[{"mask-t-from":Q()}],"mask-image-t-to-pos":[{"mask-t-to":Q()}],"mask-image-t-from-color":[{"mask-t-from":R()}],"mask-image-t-to-color":[{"mask-t-to":R()}],"mask-image-r-from-pos":[{"mask-r-from":Q()}],"mask-image-r-to-pos":[{"mask-r-to":Q()}],"mask-image-r-from-color":[{"mask-r-from":R()}],"mask-image-r-to-color":[{"mask-r-to":R()}],"mask-image-b-from-pos":[{"mask-b-from":Q()}],"mask-image-b-to-pos":[{"mask-b-to":Q()}],"mask-image-b-from-color":[{"mask-b-from":R()}],"mask-image-b-to-color":[{"mask-b-to":R()}],"mask-image-l-from-pos":[{"mask-l-from":Q()}],"mask-image-l-to-pos":[{"mask-l-to":Q()}],"mask-image-l-from-color":[{"mask-l-from":R()}],"mask-image-l-to-color":[{"mask-l-to":R()}],"mask-image-x-from-pos":[{"mask-x-from":Q()}],"mask-image-x-to-pos":[{"mask-x-to":Q()}],"mask-image-x-from-color":[{"mask-x-from":R()}],"mask-image-x-to-color":[{"mask-x-to":R()}],"mask-image-y-from-pos":[{"mask-y-from":Q()}],"mask-image-y-to-pos":[{"mask-y-to":Q()}],"mask-image-y-from-color":[{"mask-y-from":R()}],"mask-image-y-to-color":[{"mask-y-to":R()}],"mask-image-radial":[{"mask-radial":[O,B]}],"mask-image-radial-from-pos":[{"mask-radial-from":Q()}],"mask-image-radial-to-pos":[{"mask-radial-to":Q()}],"mask-image-radial-from-color":[{"mask-radial-from":R()}],"mask-image-radial-to-color":[{"mask-radial-to":R()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":v()}],"mask-image-conic-pos":[{"mask-conic":[ee]}],"mask-image-conic-from-pos":[{"mask-conic-from":Q()}],"mask-image-conic-to-pos":[{"mask-conic-to":Q()}],"mask-image-conic-from-color":[{"mask-conic-from":R()}],"mask-image-conic-to-color":[{"mask-conic-to":R()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:_()}],"mask-repeat":[{mask:U()}],"mask-size":[{mask:Z()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",O,B]}],filter:[{filter:["","none",O,B]}],blur:[{blur:oe()}],brightness:[{brightness:[ee,O,B]}],contrast:[{contrast:[ee,O,B]}],"drop-shadow":[{"drop-shadow":["","none",m,fr,cr]}],"drop-shadow-color":[{"drop-shadow":R()}],grayscale:[{grayscale:["",ee,O,B]}],"hue-rotate":[{"hue-rotate":[ee,O,B]}],invert:[{invert:["",ee,O,B]}],saturate:[{saturate:[ee,O,B]}],sepia:[{sepia:["",ee,O,B]}],"backdrop-filter":[{"backdrop-filter":["","none",O,B]}],"backdrop-blur":[{"backdrop-blur":oe()}],"backdrop-brightness":[{"backdrop-brightness":[ee,O,B]}],"backdrop-contrast":[{"backdrop-contrast":[ee,O,B]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ee,O,B]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ee,O,B]}],"backdrop-invert":[{"backdrop-invert":["",ee,O,B]}],"backdrop-opacity":[{"backdrop-opacity":[ee,O,B]}],"backdrop-saturate":[{"backdrop-saturate":[ee,O,B]}],"backdrop-sepia":[{"backdrop-sepia":["",ee,O,B]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":I()}],"border-spacing-x":[{"border-spacing-x":I()}],"border-spacing-y":[{"border-spacing-y":I()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",O,B]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ee,"initial",O,B]}],ease:[{ease:["linear","initial",x,O,B]}],delay:[{delay:[ee,O,B]}],animate:[{animate:["none",y,O,B]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[d,O,B]}],"perspective-origin":[{"perspective-origin":S()}],rotate:[{rotate:ne()}],"rotate-x":[{"rotate-x":ne()}],"rotate-y":[{"rotate-y":ne()}],"rotate-z":[{"rotate-z":ne()}],scale:[{scale:ue()}],"scale-x":[{"scale-x":ue()}],"scale-y":[{"scale-y":ue()}],"scale-z":[{"scale-z":ue()}],"scale-3d":["scale-3d"],skew:[{skew:Ee()}],"skew-x":[{"skew-x":Ee()}],"skew-y":[{"skew-y":Ee()}],transform:[{transform:[O,B,"","none","gpu","cpu"]}],"transform-origin":[{origin:S()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:st()}],"translate-x":[{"translate-x":st()}],"translate-y":[{"translate-y":st()}],"translate-z":[{"translate-z":st()}],"translate-none":["translate-none"],accent:[{accent:R()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:R()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",O,B]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":I()}],"scroll-mx":[{"scroll-mx":I()}],"scroll-my":[{"scroll-my":I()}],"scroll-ms":[{"scroll-ms":I()}],"scroll-me":[{"scroll-me":I()}],"scroll-mbs":[{"scroll-mbs":I()}],"scroll-mbe":[{"scroll-mbe":I()}],"scroll-mt":[{"scroll-mt":I()}],"scroll-mr":[{"scroll-mr":I()}],"scroll-mb":[{"scroll-mb":I()}],"scroll-ml":[{"scroll-ml":I()}],"scroll-p":[{"scroll-p":I()}],"scroll-px":[{"scroll-px":I()}],"scroll-py":[{"scroll-py":I()}],"scroll-ps":[{"scroll-ps":I()}],"scroll-pe":[{"scroll-pe":I()}],"scroll-pbs":[{"scroll-pbs":I()}],"scroll-pbe":[{"scroll-pbe":I()}],"scroll-pt":[{"scroll-pt":I()}],"scroll-pr":[{"scroll-pr":I()}],"scroll-pb":[{"scroll-pb":I()}],"scroll-pl":[{"scroll-pl":I()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",O,B]}],fill:[{fill:["none",...R()]}],"stroke-w":[{stroke:[ee,Io,Sa,Cu]}],stroke:[{stroke:["none",...R()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}};var de=Lx(qx);import*as Se from"react";import*as _u from"react";function Ou(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function wo(...e){return t=>{let a=!1,o=e.map(r=>{let n=Ou(r,t);return!a&&typeof n=="function"&&(a=!0),n});if(a)return()=>{for(let r=0;r<o.length;r++){let n=o[r];typeof n=="function"?n():Ou(e[r],null)}}}}function J(...e){return _u.useCallback(wo(...e),e)}import{Fragment as YI,jsx as Nu}from"react/jsx-runtime";var Vx=Symbol.for("react.lazy"),pr=Se[" use ".trim().toString()];function Gx(e){return typeof e=="object"&&e!==null&&"then"in e}function Uu(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Vx&&"_payload"in e&&Gx(e._payload)}function Kn(e){let t=Wx(e),a=Se.forwardRef((o,r)=>{let{children:n,...s}=o;Uu(n)&&typeof pr=="function"&&(n=pr(n._payload));let l=Se.Children.toArray(n),u=l.find($x);if(u){let f=u.props.children,g=l.map(i=>i===u?Se.Children.count(f)>1?Se.Children.only(null):Se.isValidElement(f)?f.props.children:null:i);return Nu(t,{...s,ref:r,children:Se.isValidElement(f)?Se.cloneElement(f,void 0,g):null})}return Nu(t,{...s,ref:r,children:n})});return a.displayName=`${e}.Slot`,a}var mr=Kn("Slot");function Wx(e){let t=Se.forwardRef((a,o)=>{let{children:r,...n}=a;if(Uu(r)&&typeof pr=="function"&&(r=pr(r._payload)),Se.isValidElement(r)){let s=jx(r),l=Xx(n,r.props);return r.type!==Se.Fragment&&(l.ref=o?wo(o,s):s),Se.cloneElement(r,l)}return Se.Children.count(r)>1?Se.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var zx=Symbol("radix.slottable");function $x(e){return Se.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===zx}function Xx(e,t){let a={...t};for(let o in t){let r=e[o],n=t[o];/^on[A-Z]/.test(o)?r&&n?a[o]=(...l)=>{let u=n(...l);return r(...l),u}:r&&(a[o]=r):o==="style"?a[o]={...r,...n}:o==="className"&&(a[o]=[r,n].filter(Boolean).join(" "))}return{...e,...a}}function jx(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,a=t&&"isReactWarning"in t&&t.isReactWarning;return a?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,a=t&&"isReactWarning"in t&&t.isReactWarning,a?e.props.ref:e.props.ref||e.ref)}function re(...e){return de(e)}import{jsx as Zx}from"react/jsx-runtime";var Kx=Ot("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4! [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Ro=({ref:e,className:t,variant:a,size:o,asChild:r=!1,...n})=>Zx(r?mr:"button",{className:re(Kx({variant:a,size:o,className:t})),ref:e,...n});Ro.displayName="Button";import{Fragment as Vu,jsx as wt,jsxs as Qx}from"react/jsx-runtime";var Hu=Ot("relative inline-flex items-center cursor-pointer font-display font-medium select-none justify-center rounded-xl text-sm ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 whitespace-nowrap",{variants:{variant:{default:"bg-blue-500 text-white hover:bg-blue-700 dark:bg-blue-500 dark:text-white dark:hover:bg-blue-700 transition-colors duration-100",destructive:"bg-red-500 dark:bg-red-600 text-white hover:bg-red-400 dark:hover:bg-red-500",outline:"text-black dark:text-white hover:bg-gray-200 dark:bg-transparent dark:hover:bg-polar-700 border-transparent hover:border-gray-200 border dark:border-polar-700 bg-transparent border-gray-100",secondary:"text-black dark:text-white hover:bg-gray-200 dark:bg-polar-700 dark:hover:bg-polar-600 bg-gray-100 border dark:border-white/5 border-black/4",underline:"text-black dark:text-white bg-transparent border-b hover:border-black dark:hover:border-white border-transparent transition-colors duration-300 p-0! hover:bg-transparent rounded-none!",link:"text-blue-400 underline-offset-4 hover:underline bg-transparent hover:bg-transparent",ghost:"bg-transparent hover:bg-gray-200 dark:hover:bg-polar-700 dark:bg-transparent text-black dark:text-white"},size:{default:"h-10 px-5 py-3 text-sm",sm:"h-8 px-3 py-1.5 text-xs",lg:"h-12 px-5 py-4 text-sm",icon:"flex items-center justify-center h-8 w-8 p-2 text-sm"}},defaultVariants:{variant:"default",size:"default"}}),nt=({ref:e,className:t,wrapperClassNames:a,variant:o,size:r,loading:n,fullWidth:s,disabled:l,children:u,type:f="button",...g})=>wt(Ro,{className:de(Hu({variant:o,size:r,className:t}),s?"w-full":""),ref:e,disabled:l||n,type:f,...g,children:n?Qx(Vu,{children:[wt("div",{className:"absolute inset-0 flex h-full w-full items-center justify-center",children:wt(Yx,{disabled:l,size:r})}),wt("span",{className:"flex flex-row items-center opacity-0",children:u})]}):wt("div",{className:de("flex flex-row items-center",a),children:u})});nt.displayName=Ro.displayName;var Yx=e=>{let t=de(e.disabled?"opacity-40":"",e.size==="lg"?"h-4 w-4":"h-2 w-2","animate-spin");return wt(Vu,{children:wt("div",{role:"status",children:wt("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",className:t,children:wt("path",{d:"M12,4a8,8,0,0,1,7.89,6.7A1.53,1.53,0,0,0,21.38,12h0a1.5,1.5,0,0,0,1.48-1.75,11,11,0,0,0-21.72,0A1.5,1.5,0,0,0,2.62,12h0a1.53,1.53,0,0,0,1.49-1.3A8,8,0,0,1,12,4Z",className:"fill-current"})})})})},qu=({ref:e,className:t,variant:a,size:o,children:r,...n})=>wt(Ro,{className:de(Hu({variant:a,size:o,className:t})),ref:e,...n,children:r});qu.displayName="RawButton";import{jsx as gw}from"react/jsx-runtime";import*as Gu from"react";import{jsx as Jx}from"react/jsx-runtime";var Zn=Gu.forwardRef(function({templateColumns:t,templateRows:a,templateAreas:o,autoFlow:r,autoRows:n,autoColumns:s,column:l,row:u,inline:f,...g},i){return Jx(ba,{ref:i,display:f?"inline-grid":"grid",gridTemplateColumns:t,gridTemplateRows:a,gridTemplateAreas:o,gridAutoFlow:r,gridAutoRows:n,gridAutoColumns:s,gridColumn:l,gridRow:u,...g})});Zn.displayName="Grid";import*as $u from"react";import{jsx as eh}from"react/jsx-runtime";function Wu(e){return e==="auto"?"auto":`span ${e} / span ${e}`}function zu(e,t){if(e!==void 0){if(typeof e=="object"&&e!==null&&!Array.isArray(e)){let a={};for(let[o,r]of Object.entries(e))r!==void 0&&(a[o]=t(r));return a}return t(e)}}var Yn=$u.forwardRef(function({area:t,colSpan:a,colStart:o,colEnd:r,rowSpan:n,rowStart:s,rowEnd:l,...u},f){return eh(ba,{ref:f,gridArea:t,gridColumn:zu(a,Wu),gridColumnStart:o,gridColumnEnd:r,gridRow:zu(n,Wu),gridRowStart:s,gridRowEnd:l,...u})});Yn.displayName="GridItem";import{Fragment as uh,jsx as Po,jsxs as dh}from"react/jsx-runtime";var th={default:"p",title:"p",body:"p",label:"p",caption:"p","heading-2xl":"h1","heading-xl":"h2","heading-l":"h3","heading-m":"h4","heading-s":"h5","heading-xs":"h6","heading-xxs":"h6"},ah={body:"pretty","heading-2xl":"balance","heading-xl":"balance","heading-l":"balance"},oh=new Intl.NumberFormat("en-US"),rh=new Intl.NumberFormat("en-US",{notation:"compact"});function nh(e,t){if(typeof e=="function")return e(t);let a=typeof t=="number"?t:Number(t);return Number.isNaN(a)?String(t):e==="compact"?rh.format(a):oh.format(a)}var sh="'ss07' 1, 'ss08' 1, 'zero' 1, 'liga' 0",Xu="dark:bg-polar-700 animate-pulse rounded-sm bg-gray-100",lh=e=>Array.from({length:e},(t,a)=>Po("span",{"aria-hidden":!0,style:{display:"flex",alignItems:"center",height:"1lh"},children:Po("span",{className:Xu,style:{display:"block",height:"1em",width:a===e-1?"60%":"100%"}})},a)),ih=e=>dh(uh,{children:[Po("span",{style:{visibility:"hidden"},children:e}),Po("span",{"aria-hidden":!0,className:Xu,style:{position:"absolute",inset:0}})]});function ju({as:e,variant:t,color:a,align:o,wrap:r,children:n,style:s,loading:l,placeholderText:u,placeholderNumberOfLines:f,lineThrough:g,monospace:i,tabularNums:c,truncate:m,formatter:h,...d}){let p=t??"default",x=e??th[p],y=p.startsWith("heading-"),C=r??(m?void 0:ah[p]),v=h!==void 0&&(typeof n=="string"||typeof n=="number")?nh(h,n):n,S;if(l){let I=f??1;I>1?(v=lh(I),S=void 0):(v=ih(u??n??"Loading..."),S={position:"relative",display:"inline-block"})}let w=ja(ui[p],di[a??"default"],o&&ir[o],C&&ru[C],i&&So.monospace,c&&So.tabularNums,g&&So.lineThrough,m===!0&&So.truncate),b={...w.style,...y&&{fontFeatureSettings:sh},...typeof m=="number"?{display:"-webkit-box",WebkitLineClamp:m,WebkitBoxOrient:"vertical",overflow:"hidden"}:{},...s,...S};return Po(x,{className:w.className,style:b,...d,children:v})}ju.displayName="Text";function Qn(){return ju}var Jn=Qn();import{jsx as Bw,jsxs as Ow}from"react/jsx-runtime";import{useCallback as Hw,useState as qw}from"react";import{Fragment as Ww,jsx as Gw,jsxs as zw}from"react/jsx-runtime";import{createElement as $w}from"react";import*as $e from"react";import*as Nt from"react";import{jsx as fh}from"react/jsx-runtime";function ve(e,t=[]){let a=[];function o(n,s){let l=Nt.createContext(s),u=a.length;a=[...a,s];let f=i=>{let{scope:c,children:m,...h}=i,d=c?.[e]?.[u]||l,p=Nt.useMemo(()=>h,Object.values(h));return fh(d.Provider,{value:p,children:m})};f.displayName=n+"Provider";function g(i,c){let m=c?.[e]?.[u]||l,h=Nt.useContext(m);if(h)return h;if(s!==void 0)return s;throw new Error(`\`${i}\` must be used within \`${n}\``)}return[f,g]}let r=()=>{let n=a.map(s=>Nt.createContext(s));return function(l){let u=l?.[e]||n;return Nt.useMemo(()=>({[`__scope${e}`]:{...l,[e]:u}}),[l,u])}};return r.scopeName=e,[o,ph(r,...t)]}function ph(...e){let t=e[0];if(e.length===1)return t;let a=()=>{let o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(n){let s=o.reduce((l,{useScope:u,scopeName:f})=>{let i=u(n)[`__scope${f}`];return{...l,...i}},{});return Nt.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return a.scopeName=t.scopeName,a}var Yw=!!(typeof window<"u"&&window.document&&window.document.createElement);function $(e,t,{checkForDefaultPrevented:a=!0}={}){return function(r){if(e?.(r),a===!1||!r.defaultPrevented)return t?.(r)}}import*as it from"react";import*as Ku from"react";var me=globalThis?.document?Ku.useLayoutEffect:()=>{};import*as gr from"react";var mh=it[" useInsertionEffect ".trim().toString()]||me;function Ve({prop:e,defaultProp:t,onChange:a=()=>{},caller:o}){let[r,n,s]=gh({defaultProp:t,onChange:a}),l=e!==void 0,u=l?e:r;{let g=it.useRef(e!==void 0);it.useEffect(()=>{let i=g.current;i!==l&&console.warn(`${o} is changing from ${i?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),g.current=l},[l,o])}let f=it.useCallback(g=>{if(l){let i=xh(g)?g(e):g;i!==e&&s.current?.(i)}else n(g)},[l,e,n,s]);return[u,f]}function gh({defaultProp:e,onChange:t}){let[a,o]=it.useState(e),r=it.useRef(a),n=it.useRef(t);return mh(()=>{n.current=t},[t]),it.useEffect(()=>{r.current!==a&&(n.current?.(a),r.current=a)},[a,r]),[a,o,n]}function xh(e){return typeof e=="function"}import*as xr from"react";function Jt(e){let t=xr.useRef({value:e,previous:e});return xr.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}import*as Zu from"react";function ea(e){let[t,a]=Zu.useState(void 0);return me(()=>{if(e){a({width:e.offsetWidth,height:e.offsetHeight});let o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;let n=r[0],s,l;if("borderBoxSize"in n){let u=n.borderBoxSize,f=Array.isArray(u)?u[0]:u;s=f.inlineSize,l=f.blockSize}else s=e.offsetWidth,l=e.offsetHeight;a({width:s,height:l})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else a(void 0)},[e]),t}import*as Ze from"react";import*as Yu from"react";function hh(e,t){return Yu.useReducer((a,o)=>t[a][o]??a,e)}var Rt=e=>{let{present:t,children:a}=e,o=yh(t),r=typeof a=="function"?a({present:o.isPresent}):Ze.Children.only(a),n=J(o.ref,Ch(r));return typeof a=="function"||o.isPresent?Ze.cloneElement(r,{ref:n}):null};Rt.displayName="Presence";function yh(e){let[t,a]=Ze.useState(),o=Ze.useRef(null),r=Ze.useRef(e),n=Ze.useRef("none"),s=e?"mounted":"unmounted",[l,u]=hh(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return Ze.useEffect(()=>{let f=hr(o.current);n.current=l==="mounted"?f:"none"},[l]),me(()=>{let f=o.current,g=r.current;if(g!==e){let c=n.current,m=hr(f);e?u("MOUNT"):m==="none"||f?.display==="none"?u("UNMOUNT"):u(g&&c!==m?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,u]),me(()=>{if(t){let f,g=t.ownerDocument.defaultView??window,i=m=>{let d=hr(o.current).includes(CSS.escape(m.animationName));if(m.target===t&&d&&(u("ANIMATION_END"),!r.current)){let p=t.style.animationFillMode;t.style.animationFillMode="forwards",f=g.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=p)})}},c=m=>{m.target===t&&(n.current=hr(o.current))};return t.addEventListener("animationstart",c),t.addEventListener("animationcancel",i),t.addEventListener("animationend",i),()=>{g.clearTimeout(f),t.removeEventListener("animationstart",c),t.removeEventListener("animationcancel",i),t.removeEventListener("animationend",i)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:Ze.useCallback(f=>{o.current=f?getComputedStyle(f):null,a(f)},[])}}function hr(e){return e?.animationName||"none"}function Ch(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,a=t&&"isReactWarning"in t&&t.isReactWarning;return a?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,a=t&&"isReactWarning"in t&&t.isReactWarning,a?e.props.ref:e.props.ref||e.ref)}var nd=xa(aa(),1);import*as rd from"react";import*as Re from"react";import{Fragment as vh,jsx as ts}from"react/jsx-runtime";function Ia(e){let t=Ih(e),a=Re.forwardRef((o,r)=>{let{children:n,...s}=o,l=Re.Children.toArray(n),u=l.find(wh);if(u){let f=u.props.children,g=l.map(i=>i===u?Re.Children.count(f)>1?Re.Children.only(null):Re.isValidElement(f)?f.props.children:null:i);return ts(t,{...s,ref:r,children:Re.isValidElement(f)?Re.cloneElement(f,void 0,g):null})}return ts(t,{...s,ref:r,children:n})});return a.displayName=`${e}.Slot`,a}function Ih(e){let t=Re.forwardRef((a,o)=>{let{children:r,...n}=a;if(Re.isValidElement(r)){let s=Ph(r),l=Rh(n,r.props);return r.type!==Re.Fragment&&(l.ref=o?wo(o,s):s),Re.cloneElement(r,l)}return Re.Children.count(r)>1?Re.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ad=Symbol("radix.slottable");function od(e){let t=({children:a})=>ts(vh,{children:a});return t.displayName=`${e}.Slottable`,t.__radixId=ad,t}function wh(e){return Re.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ad}function Rh(e,t){let a={...t};for(let o in t){let r=e[o],n=t[o];/^on[A-Z]/.test(o)?r&&n?a[o]=(...l)=>{let u=n(...l);return r(...l),u}:r&&(a[o]=r):o==="style"?a[o]={...r,...n}:o==="className"&&(a[o]=[r,n].filter(Boolean).join(" "))}return{...e,...a}}function Ph(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,a=t&&"isReactWarning"in t&&t.isReactWarning;return a?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,a=t&&"isReactWarning"in t&&t.isReactWarning,a?e.props.ref:e.props.ref||e.ref)}import{jsx as kh}from"react/jsx-runtime";var Th=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],W=Th.reduce((e,t)=>{let a=Ia(`Primitive.${t}`),o=rd.forwardRef((r,n)=>{let{asChild:s,...l}=r,u=s?a:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),kh(u,{...l,ref:n})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function sd(e,t){e&&nd.flushSync(()=>e.dispatchEvent(t))}import{Fragment as Ah,jsx as oa,jsxs as Mh}from"react/jsx-runtime";var Cr="Checkbox",[Dh,RR]=ve(Cr),[Fh,as]=Dh(Cr);function Eh(e){let{__scopeCheckbox:t,checked:a,children:o,defaultChecked:r,disabled:n,form:s,name:l,onCheckedChange:u,required:f,value:g="on",internal_do_not_use_render:i}=e,[c,m]=Ve({prop:a,defaultProp:r??!1,onChange:u,caller:Cr}),[h,d]=$e.useState(null),[p,x]=$e.useState(null),y=$e.useRef(!1),C=h?!!s||!!h.closest("form"):!0,v={checked:c,disabled:n,setChecked:m,control:h,setControl:d,name:l,form:s,value:g,hasConsumerStoppedPropagationRef:y,required:f,defaultChecked:ra(r)?!1:r,isFormControl:C,bubbleInput:p,setBubbleInput:x};return oa(Fh,{scope:t,...v,children:Bh(i)?i(v):o})}var ld="CheckboxTrigger",id=$e.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:a,...o},r)=>{let{control:n,value:s,disabled:l,checked:u,required:f,setControl:g,setChecked:i,hasConsumerStoppedPropagationRef:c,isFormControl:m,bubbleInput:h}=as(ld,e),d=J(r,g),p=$e.useRef(u);return $e.useEffect(()=>{let x=n?.form;if(x){let y=()=>i(p.current);return x.addEventListener("reset",y),()=>x.removeEventListener("reset",y)}},[n,i]),oa(W.button,{type:"button",role:"checkbox","aria-checked":ra(u)?"mixed":u,"aria-required":f,"data-state":fd(u),"data-disabled":l?"":void 0,disabled:l,value:s,...o,ref:d,onKeyDown:$(t,x=>{x.key==="Enter"&&x.preventDefault()}),onClick:$(a,x=>{i(y=>ra(y)?!0:!y),h&&m&&(c.current=x.isPropagationStopped(),c.current||x.stopPropagation())})})});id.displayName=ld;var Lr=$e.forwardRef((e,t)=>{let{__scopeCheckbox:a,name:o,checked:r,defaultChecked:n,required:s,disabled:l,value:u,onCheckedChange:f,form:g,...i}=e;return oa(Eh,{__scopeCheckbox:a,checked:r,defaultChecked:n,disabled:l,required:s,onCheckedChange:f,name:o,form:g,value:u,internal_do_not_use_render:({isFormControl:c})=>Mh(Ah,{children:[oa(id,{...i,ref:t,__scopeCheckbox:a}),c&&oa(cd,{__scopeCheckbox:a})]})})});Lr.displayName=Cr;var ud="CheckboxIndicator",os=$e.forwardRef((e,t)=>{let{__scopeCheckbox:a,forceMount:o,...r}=e,n=as(ud,a);return oa(Rt,{present:o||ra(n.checked)||n.checked===!0,children:oa(W.span,{"data-state":fd(n.checked),"data-disabled":n.disabled?"":void 0,...r,ref:t,style:{pointerEvents:"none",...e.style}})})});os.displayName=ud;var dd="CheckboxBubbleInput",cd=$e.forwardRef(({__scopeCheckbox:e,...t},a)=>{let{control:o,hasConsumerStoppedPropagationRef:r,checked:n,defaultChecked:s,required:l,disabled:u,name:f,value:g,form:i,bubbleInput:c,setBubbleInput:m}=as(dd,e),h=J(a,m),d=Jt(n),p=ea(o);$e.useEffect(()=>{let y=c;if(!y)return;let C=window.HTMLInputElement.prototype,S=Object.getOwnPropertyDescriptor(C,"checked").set,w=!r.current;if(d!==n&&S){let b=new Event("click",{bubbles:w});y.indeterminate=ra(n),S.call(y,ra(n)?!1:n),y.dispatchEvent(b)}},[c,d,n,r]);let x=$e.useRef(ra(n)?!1:n);return oa(W.input,{type:"checkbox","aria-hidden":!0,defaultChecked:s??x.current,required:l,disabled:u,name:f,value:g,form:i,...t,tabIndex:-1,ref:h,style:{...t.style,...p,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});cd.displayName=dd;function Bh(e){return typeof e=="function"}function ra(e){return e==="indeterminate"}function fd(e){return ra(e)?"indeterminate":e?"checked":"unchecked"}import{jsx as rs,jsxs as _h}from"react/jsx-runtime";var wa=({ref:e,className:t,...a})=>rs(Lr,{ref:e,className:re("border-primary ring-offset-background focus-visible:ring-ring data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground peer h-4 w-4 shrink-0 rounded-xs border focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",t),...a,children:_h(os,{className:re("group flex h-full w-full items-center justify-center text-current"),children:[rs(ha,{className:"h-4 w-4 group-data-[state=indeterminate]:hidden"}),rs(Lo,{className:"text-primary hidden h-3 w-3 group-data-[state=indeterminate]:block",strokeWidth:3})]})});wa.displayName=Lr.displayName;import{jsx as Ut}from"react/jsx-runtime";var pd=({ref:e,className:t,...a})=>Ut("div",{className:"relative w-full overflow-auto",children:Ut("table",{ref:e,className:re("w-full caption-bottom text-sm",t),...a})});pd.displayName="Table";var md=({ref:e,className:t,...a})=>Ut("thead",{ref:e,className:re("[&_tr]:border-b",t),...a});md.displayName="TableHeader";var gd=({ref:e,className:t,...a})=>Ut("tbody",{ref:e,className:re("[&_tr:last-child]:border-0",t),...a});gd.displayName="TableBody";var Nh=({ref:e,className:t,...a})=>Ut("tfoot",{ref:e,className:re("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0",t),...a});Nh.displayName="TableFooter";var xd=({ref:e,className:t,...a})=>Ut("tr",{ref:e,className:re("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",t),...a});xd.displayName="TableRow";var hd=({ref:e,className:t,...a})=>Ut("th",{ref:e,className:re("text-muted-foreground h-12 px-4 text-left align-middle font-medium [&:has([role=checkbox])]:pr-0",t),...a});hd.displayName="TableHead";var yd=({ref:e,className:t,...a})=>Ut("td",{ref:e,className:re("p-4 align-middle [&:has([role=checkbox])]:pr-0",t),...a});yd.displayName="TableCell";var Uh=({ref:e,className:t,...a})=>Ut("caption",{ref:e,className:re("text-muted-foreground mt-4 text-sm",t),...a});Uh.displayName="TableCaption";import $0 from"react";var Gs=xa(aa(),1);import*as A from"react";function ns(e,[t,a]){return Math.min(a,Math.max(t,e))}import Ra from"react";import{jsx as ss}from"react/jsx-runtime";import qR from"react";import{jsx as GR}from"react/jsx-runtime";function br(e){let t=e+"CollectionProvider",[a,o]=ve(t),[r,n]=a(t,{collectionRef:{current:null},itemMap:new Map}),s=d=>{let{scope:p,children:x}=d,y=Ra.useRef(null),C=Ra.useRef(new Map).current;return ss(r,{scope:p,itemMap:C,collectionRef:y,children:x})};s.displayName=t;let l=e+"CollectionSlot",u=Ia(l),f=Ra.forwardRef((d,p)=>{let{scope:x,children:y}=d,C=n(l,x),v=J(p,C.collectionRef);return ss(u,{ref:v,children:y})});f.displayName=l;let g=e+"CollectionItemSlot",i="data-radix-collection-item",c=Ia(g),m=Ra.forwardRef((d,p)=>{let{scope:x,children:y,...C}=d,v=Ra.useRef(null),S=J(p,v),w=n(g,x);return Ra.useEffect(()=>(w.itemMap.set(v,{ref:v,...C}),()=>{w.itemMap.delete(v)})),ss(c,{[i]:"",ref:S,children:y})});m.displayName=g;function h(d){let p=n(e+"CollectionConsumer",d);return Ra.useCallback(()=>{let y=p.collectionRef.current;if(!y)return[];let C=Array.from(y.querySelectorAll(`[${i}]`));return Array.from(p.itemMap.values()).sort((w,b)=>C.indexOf(w.ref.current)-C.indexOf(b.ref.current))},[p.collectionRef,p.itemMap])}return[{Provider:s,Slot:f,ItemSlot:m},h,o]}import*as Sr from"react";import{jsx as $R}from"react/jsx-runtime";var Hh=Sr.createContext(void 0);function na(e){let t=Sr.useContext(Hh);return e||t||"ltr"}import*as ge from"react";import*as Qa from"react";function Ye(e){let t=Qa.useRef(e);return Qa.useEffect(()=>{t.current=e}),Qa.useMemo(()=>(...a)=>t.current?.(...a),[])}import*as Cd from"react";function Ld(e,t=globalThis?.document){let a=Ye(e);Cd.useEffect(()=>{let o=r=>{r.key==="Escape"&&a(r)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[a,t])}import{jsx as vd}from"react/jsx-runtime";var qh="DismissableLayer",ls="dismissableLayer.update",Vh="dismissableLayer.pointerDownOutside",Gh="dismissableLayer.focusOutside",bd,Id=ge.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),To=ge.forwardRef((e,t)=>{let{disableOutsidePointerEvents:a=!1,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:n,onInteractOutside:s,onDismiss:l,...u}=e,f=ge.useContext(Id),[g,i]=ge.useState(null),c=g?.ownerDocument??globalThis?.document,[,m]=ge.useState({}),h=J(t,b=>i(b)),d=Array.from(f.layers),[p]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),x=d.indexOf(p),y=g?d.indexOf(g):-1,C=f.layersWithOutsidePointerEventsDisabled.size>0,v=y>=x,S=$h(b=>{let I=b.target,D=[...f.branches].some(F=>F.contains(I));!v||D||(r?.(b),s?.(b),b.defaultPrevented||l?.())},c),w=Xh(b=>{let I=b.target;[...f.branches].some(F=>F.contains(I))||(n?.(b),s?.(b),b.defaultPrevented||l?.())},c);return Ld(b=>{y===f.layers.size-1&&(o?.(b),!b.defaultPrevented&&l&&(b.preventDefault(),l()))},c),ge.useEffect(()=>{if(g)return a&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(bd=c.body.style.pointerEvents,c.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(g)),f.layers.add(g),Sd(),()=>{a&&f.layersWithOutsidePointerEventsDisabled.size===1&&(c.body.style.pointerEvents=bd)}},[g,c,a,f]),ge.useEffect(()=>()=>{g&&(f.layers.delete(g),f.layersWithOutsidePointerEventsDisabled.delete(g),Sd())},[g,f]),ge.useEffect(()=>{let b=()=>m({});return document.addEventListener(ls,b),()=>document.removeEventListener(ls,b)},[]),vd(W.div,{...u,ref:h,style:{pointerEvents:C?v?"auto":"none":void 0,...e.style},onFocusCapture:$(e.onFocusCapture,w.onFocusCapture),onBlurCapture:$(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:$(e.onPointerDownCapture,S.onPointerDownCapture)})});To.displayName=qh;var Wh="DismissableLayerBranch",zh=ge.forwardRef((e,t)=>{let a=ge.useContext(Id),o=ge.useRef(null),r=J(t,o);return ge.useEffect(()=>{let n=o.current;if(n)return a.branches.add(n),()=>{a.branches.delete(n)}},[a.branches]),vd(W.div,{...e,ref:r})});zh.displayName=Wh;function $h(e,t=globalThis?.document){let a=Ye(e),o=ge.useRef(!1),r=ge.useRef(()=>{});return ge.useEffect(()=>{let n=l=>{if(l.target&&!o.current){let f=function(){wd(Vh,a,g,{discrete:!0})};var u=f;let g={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=f,t.addEventListener("click",r.current,{once:!0})):f()}else t.removeEventListener("click",r.current);o.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",n)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",n),t.removeEventListener("click",r.current)}},[t,a]),{onPointerDownCapture:()=>o.current=!0}}function Xh(e,t=globalThis?.document){let a=Ye(e),o=ge.useRef(!1);return ge.useEffect(()=>{let r=n=>{n.target&&!o.current&&wd(Gh,a,{originalEvent:n},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,a]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Sd(){let e=new CustomEvent(ls);document.dispatchEvent(e)}function wd(e,t,a,{discrete:o}){let r=a.originalEvent.target,n=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:a});t&&r.addEventListener(e,t,{once:!0}),o?sd(r,n):r.dispatchEvent(n)}import*as Pd from"react";var is=0;function kd(){Pd.useEffect(()=>{let e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Rd()),document.body.insertAdjacentElement("beforeend",e[1]??Rd()),is++,()=>{is===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),is--}},[])}function Rd(){let 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}import*as ut from"react";import{jsx as jh}from"react/jsx-runtime";var us="focusScope.autoFocusOnMount",ds="focusScope.autoFocusOnUnmount",Td={bubbles:!1,cancelable:!0},Kh="FocusScope",cs=ut.forwardRef((e,t)=>{let{loop:a=!1,trapped:o=!1,onMountAutoFocus:r,onUnmountAutoFocus:n,...s}=e,[l,u]=ut.useState(null),f=Ye(r),g=Ye(n),i=ut.useRef(null),c=J(t,d=>u(d)),m=ut.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;ut.useEffect(()=>{if(o){let y=function(w){if(m.paused||!l)return;let b=w.target;l.contains(b)?i.current=b:sa(i.current,{select:!0})},C=function(w){if(m.paused||!l)return;let b=w.relatedTarget;b!==null&&(l.contains(b)||sa(i.current,{select:!0}))},v=function(w){if(document.activeElement===document.body)for(let I of w)I.removedNodes.length>0&&sa(l)};var d=y,p=C,x=v;document.addEventListener("focusin",y),document.addEventListener("focusout",C);let S=new MutationObserver(v);return l&&S.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",C),S.disconnect()}}},[o,l,m.paused]),ut.useEffect(()=>{if(l){Md.add(m);let d=document.activeElement;if(!l.contains(d)){let x=new CustomEvent(us,Td);l.addEventListener(us,f),l.dispatchEvent(x),x.defaultPrevented||(Zh(ty(Fd(l)),{select:!0}),document.activeElement===d&&sa(l))}return()=>{l.removeEventListener(us,f),setTimeout(()=>{let x=new CustomEvent(ds,Td);l.addEventListener(ds,g),l.dispatchEvent(x),x.defaultPrevented||sa(d??document.body,{select:!0}),l.removeEventListener(ds,g),Md.remove(m)},0)}}},[l,f,g,m]);let h=ut.useCallback(d=>{if(!a&&!o||m.paused)return;let p=d.key==="Tab"&&!d.altKey&&!d.ctrlKey&&!d.metaKey,x=document.activeElement;if(p&&x){let y=d.currentTarget,[C,v]=Yh(y);C&&v?!d.shiftKey&&x===v?(d.preventDefault(),a&&sa(C,{select:!0})):d.shiftKey&&x===C&&(d.preventDefault(),a&&sa(v,{select:!0})):x===y&&d.preventDefault()}},[a,o,m.paused]);return jh(W.div,{tabIndex:-1,...s,ref:c,onKeyDown:h})});cs.displayName=Kh;function Zh(e,{select:t=!1}={}){let a=document.activeElement;for(let o of e)if(sa(o,{select:t}),document.activeElement!==a)return}function Yh(e){let t=Fd(e),a=Ad(t,e),o=Ad(t.reverse(),e);return[a,o]}function Fd(e){let t=[],a=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{let r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;a.nextNode();)t.push(a.currentNode);return t}function Ad(e,t){for(let a of e)if(!Qh(a,{upTo:t}))return a}function Qh(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 Jh(e){return e instanceof HTMLInputElement&&"select"in e}function sa(e,{select:t=!1}={}){if(e&&e.focus){let a=document.activeElement;e.focus({preventScroll:!0}),e!==a&&Jh(e)&&t&&e.select()}}var Md=ey();function ey(){let e=[];return{add(t){let a=e[0];t!==a&&a?.pause(),e=Dd(e,t),e.unshift(t)},remove(t){e=Dd(e,t),e[0]?.resume()}}}function Dd(e,t){let a=[...e],o=a.indexOf(t);return o!==-1&&a.splice(o,1),a}function ty(e){return e.filter(t=>t.tagName!=="A")}import*as fs from"react";var ay=fs[" useId ".trim().toString()]||(()=>{}),oy=0;function Pt(e){let[t,a]=fs.useState(ay());return me(()=>{e||a(o=>o??String(oy++))},[e]),e||(t?`radix-${t}`:"")}import*as Je from"react";var Od=["top","right","bottom","left"];var kt=Math.min,Xe=Math.max,Mo=Math.round,Do=Math.floor,mt=e=>({x:e,y:e}),ry={left:"right",right:"left",bottom:"top",top:"bottom"},ny={start:"end",end:"start"};function Ir(e,t,a){return Xe(e,kt(t,a))}function Tt(e,t){return typeof e=="function"?e(t):e}function At(e){return e.split("-")[0]}function Pa(e){return e.split("-")[1]}function wr(e){return e==="x"?"y":"x"}function Rr(e){return e==="y"?"height":"width"}var sy=new Set(["top","bottom"]);function gt(e){return sy.has(At(e))?"y":"x"}function Pr(e){return wr(gt(e))}function _d(e,t,a){a===void 0&&(a=!1);let o=Pa(e),r=Pr(e),n=Rr(r),s=r==="x"?o===(a?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[n]>t.floating[n]&&(s=Ao(s)),[s,Ao(s)]}function Nd(e){let t=Ao(e);return[vr(e),t,vr(t)]}function vr(e){return e.replace(/start|end/g,t=>ny[t])}var Ed=["left","right"],Bd=["right","left"],ly=["top","bottom"],iy=["bottom","top"];function uy(e,t,a){switch(e){case"top":case"bottom":return a?t?Bd:Ed:t?Ed:Bd;case"left":case"right":return t?ly:iy;default:return[]}}function Ud(e,t,a,o){let r=Pa(e),n=uy(At(e),a==="start",o);return r&&(n=n.map(s=>s+"-"+r),t&&(n=n.concat(n.map(vr)))),n}function Ao(e){return e.replace(/left|right|bottom|top/g,t=>ry[t])}function dy(e){return{top:0,right:0,bottom:0,left:0,...e}}function ps(e){return typeof e!="number"?dy(e):{top:e,right:e,bottom:e,left:e}}function ka(e){let{x:t,y:a,width:o,height:r}=e;return{width:o,height:r,top:a,left:t,right:t+o,bottom:a+r,x:t,y:a}}function Hd(e,t,a){let{reference:o,floating:r}=e,n=gt(t),s=Pr(t),l=Rr(s),u=At(t),f=n==="y",g=o.x+o.width/2-r.width/2,i=o.y+o.height/2-r.height/2,c=o[l]/2-r[l]/2,m;switch(u){case"top":m={x:g,y:o.y-r.height};break;case"bottom":m={x:g,y:o.y+o.height};break;case"right":m={x:o.x+o.width,y:i};break;case"left":m={x:o.x-r.width,y:i};break;default:m={x:o.x,y:o.y}}switch(Pa(t)){case"start":m[s]-=c*(a&&f?-1:1);break;case"end":m[s]+=c*(a&&f?-1:1);break}return m}var Gd=async(e,t,a)=>{let{placement:o="bottom",strategy:r="absolute",middleware:n=[],platform:s}=a,l=n.filter(Boolean),u=await(s.isRTL==null?void 0:s.isRTL(t)),f=await s.getElementRects({reference:e,floating:t,strategy:r}),{x:g,y:i}=Hd(f,o,u),c=o,m={},h=0;for(let d=0;d<l.length;d++){let{name:p,fn:x}=l[d],{x:y,y:C,data:v,reset:S}=await x({x:g,y:i,initialPlacement:o,placement:c,strategy:r,middlewareData:m,rects:f,platform:s,elements:{reference:e,floating:t}});g=y??g,i=C??i,m={...m,[p]:{...m[p],...v}},S&&h<=50&&(h++,typeof S=="object"&&(S.placement&&(c=S.placement),S.rects&&(f=S.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:r}):S.rects),{x:g,y:i}=Hd(f,c,u)),d=-1)}return{x:g,y:i,placement:c,strategy:r,middlewareData:m}};async function Ja(e,t){var a;t===void 0&&(t={});let{x:o,y:r,platform:n,rects:s,elements:l,strategy:u}=e,{boundary:f="clippingAncestors",rootBoundary:g="viewport",elementContext:i="floating",altBoundary:c=!1,padding:m=0}=Tt(t,e),h=ps(m),p=l[c?i==="floating"?"reference":"floating":i],x=ka(await n.getClippingRect({element:(a=await(n.isElement==null?void 0:n.isElement(p)))==null||a?p:p.contextElement||await(n.getDocumentElement==null?void 0:n.getDocumentElement(l.floating)),boundary:f,rootBoundary:g,strategy:u})),y=i==="floating"?{x:o,y:r,width:s.floating.width,height:s.floating.height}:s.reference,C=await(n.getOffsetParent==null?void 0:n.getOffsetParent(l.floating)),v=await(n.isElement==null?void 0:n.isElement(C))?await(n.getScale==null?void 0:n.getScale(C))||{x:1,y:1}:{x:1,y:1},S=ka(n.convertOffsetParentRelativeRectToViewportRelativeRect?await n.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:y,offsetParent:C,strategy:u}):y);return{top:(x.top-S.top+h.top)/v.y,bottom:(S.bottom-x.bottom+h.bottom)/v.y,left:(x.left-S.left+h.left)/v.x,right:(S.right-x.right+h.right)/v.x}}var Wd=e=>({name:"arrow",options:e,async fn(t){let{x:a,y:o,placement:r,rects:n,platform:s,elements:l,middlewareData:u}=t,{element:f,padding:g=0}=Tt(e,t)||{};if(f==null)return{};let i=ps(g),c={x:a,y:o},m=Pr(r),h=Rr(m),d=await s.getDimensions(f),p=m==="y",x=p?"top":"left",y=p?"bottom":"right",C=p?"clientHeight":"clientWidth",v=n.reference[h]+n.reference[m]-c[m]-n.floating[h],S=c[m]-n.reference[m],w=await(s.getOffsetParent==null?void 0:s.getOffsetParent(f)),b=w?w[C]:0;(!b||!await(s.isElement==null?void 0:s.isElement(w)))&&(b=l.floating[C]||n.floating[h]);let I=v/2-S/2,D=b/2-d[h]/2-1,F=kt(i[x],D),k=kt(i[y],D),T=F,q=b-d[h]-k,z=b/2-d[h]/2+I,j=Ir(T,z,q),E=!u.arrow&&Pa(r)!=null&&z!==j&&n.reference[h]/2-(z<T?F:k)-d[h]/2<0,G=E?z<T?z-T:z-q:0;return{[m]:c[m]+G,data:{[m]:j,centerOffset:z-j-G,...E&&{alignmentOffset:G}},reset:E}}});var zd=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var a,o;let{placement:r,middlewareData:n,rects:s,initialPlacement:l,platform:u,elements:f}=t,{mainAxis:g=!0,crossAxis:i=!0,fallbackPlacements:c,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:d=!0,...p}=Tt(e,t);if((a=n.arrow)!=null&&a.alignmentOffset)return{};let x=At(r),y=gt(l),C=At(l)===l,v=await(u.isRTL==null?void 0:u.isRTL(f.floating)),S=c||(C||!d?[Ao(l)]:Nd(l)),w=h!=="none";!c&&w&&S.push(...Ud(l,d,h,v));let b=[l,...S],I=await Ja(t,p),D=[],F=((o=n.flip)==null?void 0:o.overflows)||[];if(g&&D.push(I[x]),i){let z=_d(r,s,v);D.push(I[z[0]],I[z[1]])}if(F=[...F,{placement:r,overflows:D}],!D.every(z=>z<=0)){var k,T;let z=(((k=n.flip)==null?void 0:k.index)||0)+1,j=b[z];if(j&&(!(i==="alignment"?y!==gt(j):!1)||F.every(N=>gt(N.placement)===y?N.overflows[0]>0:!0)))return{data:{index:z,overflows:F},reset:{placement:j}};let E=(T=F.filter(G=>G.overflows[0]<=0).sort((G,N)=>G.overflows[1]-N.overflows[1])[0])==null?void 0:T.placement;if(!E)switch(m){case"bestFit":{var q;let G=(q=F.filter(N=>{if(w){let P=gt(N.placement);return P===y||P==="y"}return!0}).map(N=>[N.placement,N.overflows.filter(P=>P>0).reduce((P,R)=>P+R,0)]).sort((N,P)=>N[1]-P[1])[0])==null?void 0:q[0];G&&(E=G);break}case"initialPlacement":E=l;break}if(r!==E)return{reset:{placement:E}}}return{}}}};function qd(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Vd(e){return Od.some(t=>e[t]>=0)}var $d=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:a}=t,{strategy:o="referenceHidden",...r}=Tt(e,t);switch(o){case"referenceHidden":{let n=await Ja(t,{...r,elementContext:"reference"}),s=qd(n,a.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Vd(s)}}}case"escaped":{let n=await Ja(t,{...r,altBoundary:!0}),s=qd(n,a.floating);return{data:{escapedOffsets:s,escaped:Vd(s)}}}default:return{}}}}};var Xd=new Set(["left","top"]);async function cy(e,t){let{placement:a,platform:o,elements:r}=e,n=await(o.isRTL==null?void 0:o.isRTL(r.floating)),s=At(a),l=Pa(a),u=gt(a)==="y",f=Xd.has(s)?-1:1,g=n&&u?-1:1,i=Tt(t,e),{mainAxis:c,crossAxis:m,alignmentAxis:h}=typeof i=="number"?{mainAxis:i,crossAxis:0,alignmentAxis:null}:{mainAxis:i.mainAxis||0,crossAxis:i.crossAxis||0,alignmentAxis:i.alignmentAxis};return l&&typeof h=="number"&&(m=l==="end"?h*-1:h),u?{x:m*g,y:c*f}:{x:c*f,y:m*g}}var jd=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var a,o;let{x:r,y:n,placement:s,middlewareData:l}=t,u=await cy(t,e);return s===((a=l.offset)==null?void 0:a.placement)&&(o=l.arrow)!=null&&o.alignmentOffset?{}:{x:r+u.x,y:n+u.y,data:{...u,placement:s}}}}},Kd=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:a,y:o,placement:r}=t,{mainAxis:n=!0,crossAxis:s=!1,limiter:l={fn:p=>{let{x,y}=p;return{x,y}}},...u}=Tt(e,t),f={x:a,y:o},g=await Ja(t,u),i=gt(At(r)),c=wr(i),m=f[c],h=f[i];if(n){let p=c==="y"?"top":"left",x=c==="y"?"bottom":"right",y=m+g[p],C=m-g[x];m=Ir(y,m,C)}if(s){let p=i==="y"?"top":"left",x=i==="y"?"bottom":"right",y=h+g[p],C=h-g[x];h=Ir(y,h,C)}let d=l.fn({...t,[c]:m,[i]:h});return{...d,data:{x:d.x-a,y:d.y-o,enabled:{[c]:n,[i]:s}}}}}},Zd=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:a,y:o,placement:r,rects:n,middlewareData:s}=t,{offset:l=0,mainAxis:u=!0,crossAxis:f=!0}=Tt(e,t),g={x:a,y:o},i=gt(r),c=wr(i),m=g[c],h=g[i],d=Tt(l,t),p=typeof d=="number"?{mainAxis:d,crossAxis:0}:{mainAxis:0,crossAxis:0,...d};if(u){let C=c==="y"?"height":"width",v=n.reference[c]-n.floating[C]+p.mainAxis,S=n.reference[c]+n.reference[C]-p.mainAxis;m<v?m=v:m>S&&(m=S)}if(f){var x,y;let C=c==="y"?"width":"height",v=Xd.has(At(r)),S=n.reference[i]-n.floating[C]+(v&&((x=s.offset)==null?void 0:x[i])||0)+(v?0:p.crossAxis),w=n.reference[i]+n.reference[C]+(v?0:((y=s.offset)==null?void 0:y[i])||0)-(v?p.crossAxis:0);h<S?h=S:h>w&&(h=w)}return{[c]:m,[i]:h}}}},Yd=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var a,o;let{placement:r,rects:n,platform:s,elements:l}=t,{apply:u=()=>{},...f}=Tt(e,t),g=await Ja(t,f),i=At(r),c=Pa(r),m=gt(r)==="y",{width:h,height:d}=n.floating,p,x;i==="top"||i==="bottom"?(p=i,x=c===(await(s.isRTL==null?void 0:s.isRTL(l.floating))?"start":"end")?"left":"right"):(x=i,p=c==="end"?"top":"bottom");let y=d-g.top-g.bottom,C=h-g.left-g.right,v=kt(d-g[p],y),S=kt(h-g[x],C),w=!t.middlewareData.shift,b=v,I=S;if((a=t.middlewareData.shift)!=null&&a.enabled.x&&(I=C),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(b=y),w&&!c){let F=Xe(g.left,0),k=Xe(g.right,0),T=Xe(g.top,0),q=Xe(g.bottom,0);m?I=h-2*(F!==0||k!==0?F+k:Xe(g.left,g.right)):b=d-2*(T!==0||q!==0?T+q:Xe(g.top,g.bottom))}await u({...t,availableWidth:I,availableHeight:b});let D=await s.getDimensions(l.floating);return h!==D.width||d!==D.height?{reset:{rects:!0}}:{}}}};function kr(){return typeof window<"u"}function Aa(e){return Jd(e)?(e.nodeName||"").toLowerCase():"#document"}function Qe(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function xt(e){var t;return(t=(Jd(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Jd(e){return kr()?e instanceof Node||e instanceof Qe(e).Node:!1}function dt(e){return kr()?e instanceof Element||e instanceof Qe(e).Element:!1}function ht(e){return kr()?e instanceof HTMLElement||e instanceof Qe(e).HTMLElement:!1}function Qd(e){return!kr()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Qe(e).ShadowRoot}var fy=new Set(["inline","contents"]);function eo(e){let{overflow:t,overflowX:a,overflowY:o,display:r}=ct(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+a)&&!fy.has(r)}var py=new Set(["table","td","th"]);function ec(e){return py.has(Aa(e))}var my=[":popover-open",":modal"];function Fo(e){return my.some(t=>{try{return e.matches(t)}catch{return!1}})}var gy=["transform","translate","scale","rotate","perspective"],xy=["transform","translate","scale","rotate","perspective","filter"],hy=["paint","layout","strict","content"];function Tr(e){let t=Ar(),a=dt(e)?ct(e):e;return gy.some(o=>a[o]?a[o]!=="none":!1)||(a.containerType?a.containerType!=="normal":!1)||!t&&(a.backdropFilter?a.backdropFilter!=="none":!1)||!t&&(a.filter?a.filter!=="none":!1)||xy.some(o=>(a.willChange||"").includes(o))||hy.some(o=>(a.contain||"").includes(o))}function tc(e){let t=Ht(e);for(;ht(t)&&!Ma(t);){if(Tr(t))return t;if(Fo(t))return null;t=Ht(t)}return null}function Ar(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}var yy=new Set(["html","body","#document"]);function Ma(e){return yy.has(Aa(e))}function ct(e){return Qe(e).getComputedStyle(e)}function Eo(e){return dt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ht(e){if(Aa(e)==="html")return e;let t=e.assignedSlot||e.parentNode||Qd(e)&&e.host||xt(e);return Qd(t)?t.host:t}function ac(e){let t=Ht(e);return Ma(t)?e.ownerDocument?e.ownerDocument.body:e.body:ht(t)&&eo(t)?t:ac(t)}function Ta(e,t,a){var o;t===void 0&&(t=[]),a===void 0&&(a=!0);let r=ac(e),n=r===((o=e.ownerDocument)==null?void 0:o.body),s=Qe(r);if(n){let l=Mr(s);return t.concat(s,s.visualViewport||[],eo(r)?r:[],l&&a?Ta(l):[])}return t.concat(r,Ta(r,[],a))}function Mr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function sc(e){let t=ct(e),a=parseFloat(t.width)||0,o=parseFloat(t.height)||0,r=ht(e),n=r?e.offsetWidth:a,s=r?e.offsetHeight:o,l=Mo(a)!==n||Mo(o)!==s;return l&&(a=n,o=s),{width:a,height:o,$:l}}function gs(e){return dt(e)?e:e.contextElement}function to(e){let t=gs(e);if(!ht(t))return mt(1);let a=t.getBoundingClientRect(),{width:o,height:r,$:n}=sc(t),s=(n?Mo(a.width):a.width)/o,l=(n?Mo(a.height):a.height)/r;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}var Cy=mt(0);function lc(e){let t=Qe(e);return!Ar()||!t.visualViewport?Cy:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ly(e,t,a){return t===void 0&&(t=!1),!a||t&&a!==Qe(e)?!1:t}function Da(e,t,a,o){t===void 0&&(t=!1),a===void 0&&(a=!1);let r=e.getBoundingClientRect(),n=gs(e),s=mt(1);t&&(o?dt(o)&&(s=to(o)):s=to(e));let l=Ly(n,a,o)?lc(n):mt(0),u=(r.left+l.x)/s.x,f=(r.top+l.y)/s.y,g=r.width/s.x,i=r.height/s.y;if(n){let c=Qe(n),m=o&&dt(o)?Qe(o):o,h=c,d=Mr(h);for(;d&&o&&m!==h;){let p=to(d),x=d.getBoundingClientRect(),y=ct(d),C=x.left+(d.clientLeft+parseFloat(y.paddingLeft))*p.x,v=x.top+(d.clientTop+parseFloat(y.paddingTop))*p.y;u*=p.x,f*=p.y,g*=p.x,i*=p.y,u+=C,f+=v,h=Qe(d),d=Mr(h)}}return ka({width:g,height:i,x:u,y:f})}function Dr(e,t){let a=Eo(e).scrollLeft;return t?t.left+a:Da(xt(e)).left+a}function ic(e,t){let a=e.getBoundingClientRect(),o=a.left+t.scrollLeft-Dr(e,a),r=a.top+t.scrollTop;return{x:o,y:r}}function by(e){let{elements:t,rect:a,offsetParent:o,strategy:r}=e,n=r==="fixed",s=xt(o),l=t?Fo(t.floating):!1;if(o===s||l&&n)return a;let u={scrollLeft:0,scrollTop:0},f=mt(1),g=mt(0),i=ht(o);if((i||!i&&!n)&&((Aa(o)!=="body"||eo(s))&&(u=Eo(o)),ht(o))){let m=Da(o);f=to(o),g.x=m.x+o.clientLeft,g.y=m.y+o.clientTop}let c=s&&!i&&!n?ic(s,u):mt(0);return{width:a.width*f.x,height:a.height*f.y,x:a.x*f.x-u.scrollLeft*f.x+g.x+c.x,y:a.y*f.y-u.scrollTop*f.y+g.y+c.y}}function Sy(e){return Array.from(e.getClientRects())}function vy(e){let t=xt(e),a=Eo(e),o=e.ownerDocument.body,r=Xe(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),n=Xe(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight),s=-a.scrollLeft+Dr(e),l=-a.scrollTop;return ct(o).direction==="rtl"&&(s+=Xe(t.clientWidth,o.clientWidth)-r),{width:r,height:n,x:s,y:l}}var oc=25;function Iy(e,t){let a=Qe(e),o=xt(e),r=a.visualViewport,n=o.clientWidth,s=o.clientHeight,l=0,u=0;if(r){n=r.width,s=r.height;let g=Ar();(!g||g&&t==="fixed")&&(l=r.offsetLeft,u=r.offsetTop)}let f=Dr(o);if(f<=0){let g=o.ownerDocument,i=g.body,c=getComputedStyle(i),m=g.compatMode==="CSS1Compat"&&parseFloat(c.marginLeft)+parseFloat(c.marginRight)||0,h=Math.abs(o.clientWidth-i.clientWidth-m);h<=oc&&(n-=h)}else f<=oc&&(n+=f);return{width:n,height:s,x:l,y:u}}var wy=new Set(["absolute","fixed"]);function Ry(e,t){let a=Da(e,!0,t==="fixed"),o=a.top+e.clientTop,r=a.left+e.clientLeft,n=ht(e)?to(e):mt(1),s=e.clientWidth*n.x,l=e.clientHeight*n.y,u=r*n.x,f=o*n.y;return{width:s,height:l,x:u,y:f}}function rc(e,t,a){let o;if(t==="viewport")o=Iy(e,a);else if(t==="document")o=vy(xt(e));else if(dt(t))o=Ry(t,a);else{let r=lc(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return ka(o)}function uc(e,t){let a=Ht(e);return a===t||!dt(a)||Ma(a)?!1:ct(a).position==="fixed"||uc(a,t)}function Py(e,t){let a=t.get(e);if(a)return a;let o=Ta(e,[],!1).filter(l=>dt(l)&&Aa(l)!=="body"),r=null,n=ct(e).position==="fixed",s=n?Ht(e):e;for(;dt(s)&&!Ma(s);){let l=ct(s),u=Tr(s);!u&&l.position==="fixed"&&(r=null),(n?!u&&!r:!u&&l.position==="static"&&!!r&&wy.has(r.position)||eo(s)&&!u&&uc(e,s))?o=o.filter(g=>g!==s):r=l,s=Ht(s)}return t.set(e,o),o}function ky(e){let{element:t,boundary:a,rootBoundary:o,strategy:r}=e,s=[...a==="clippingAncestors"?Fo(t)?[]:Py(t,this._c):[].concat(a),o],l=s[0],u=s.reduce((f,g)=>{let i=rc(t,g,r);return f.top=Xe(i.top,f.top),f.right=kt(i.right,f.right),f.bottom=kt(i.bottom,f.bottom),f.left=Xe(i.left,f.left),f},rc(t,l,r));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function Ty(e){let{width:t,height:a}=sc(e);return{width:t,height:a}}function Ay(e,t,a){let o=ht(t),r=xt(t),n=a==="fixed",s=Da(e,!0,n,t),l={scrollLeft:0,scrollTop:0},u=mt(0);function f(){u.x=Dr(r)}if(o||!o&&!n)if((Aa(t)!=="body"||eo(r))&&(l=Eo(t)),o){let m=Da(t,!0,n,t);u.x=m.x+t.clientLeft,u.y=m.y+t.clientTop}else r&&f();n&&!o&&r&&f();let g=r&&!o&&!n?ic(r,l):mt(0),i=s.left+l.scrollLeft-u.x-g.x,c=s.top+l.scrollTop-u.y-g.y;return{x:i,y:c,width:s.width,height:s.height}}function ms(e){return ct(e).position==="static"}function nc(e,t){if(!ht(e)||ct(e).position==="fixed")return null;if(t)return t(e);let a=e.offsetParent;return xt(e)===a&&(a=a.ownerDocument.body),a}function dc(e,t){let a=Qe(e);if(Fo(e))return a;if(!ht(e)){let r=Ht(e);for(;r&&!Ma(r);){if(dt(r)&&!ms(r))return r;r=Ht(r)}return a}let o=nc(e,t);for(;o&&ec(o)&&ms(o);)o=nc(o,t);return o&&Ma(o)&&ms(o)&&!Tr(o)?a:o||tc(e)||a}var My=async function(e){let t=this.getOffsetParent||dc,a=this.getDimensions,o=await a(e.floating);return{reference:Ay(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Dy(e){return ct(e).direction==="rtl"}var cc={convertOffsetParentRelativeRectToViewportRelativeRect:by,getDocumentElement:xt,getClippingRect:ky,getOffsetParent:dc,getElementRects:My,getClientRects:Sy,getDimensions:Ty,getScale:to,isElement:dt,isRTL:Dy};function fc(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Fy(e,t){let a=null,o,r=xt(e);function n(){var l;clearTimeout(o),(l=a)==null||l.disconnect(),a=null}function s(l,u){l===void 0&&(l=!1),u===void 0&&(u=1),n();let f=e.getBoundingClientRect(),{left:g,top:i,width:c,height:m}=f;if(l||t(),!c||!m)return;let h=Do(i),d=Do(r.clientWidth-(g+c)),p=Do(r.clientHeight-(i+m)),x=Do(g),C={rootMargin:-h+"px "+-d+"px "+-p+"px "+-x+"px",threshold:Xe(0,kt(1,u))||1},v=!0;function S(w){let b=w[0].intersectionRatio;if(b!==u){if(!v)return s();b?s(!1,b):o=setTimeout(()=>{s(!1,1e-7)},1e3)}b===1&&!fc(f,e.getBoundingClientRect())&&s(),v=!1}try{a=new IntersectionObserver(S,{...C,root:r.ownerDocument})}catch{a=new IntersectionObserver(S,C)}a.observe(e)}return s(!0),n}function xs(e,t,a,o){o===void 0&&(o={});let{ancestorScroll:r=!0,ancestorResize:n=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:u=!1}=o,f=gs(e),g=r||n?[...f?Ta(f):[],...Ta(t)]:[];g.forEach(x=>{r&&x.addEventListener("scroll",a,{passive:!0}),n&&x.addEventListener("resize",a)});let i=f&&l?Fy(f,a):null,c=-1,m=null;s&&(m=new ResizeObserver(x=>{let[y]=x;y&&y.target===f&&m&&(m.unobserve(t),cancelAnimationFrame(c),c=requestAnimationFrame(()=>{var C;(C=m)==null||C.observe(t)})),a()}),f&&!u&&m.observe(f),m.observe(t));let h,d=u?Da(e):null;u&&p();function p(){let x=Da(e);d&&!fc(d,x)&&a(),d=x,h=requestAnimationFrame(p)}return a(),()=>{var x;g.forEach(y=>{r&&y.removeEventListener("scroll",a),n&&y.removeEventListener("resize",a)}),i?.(),(x=m)==null||x.disconnect(),m=null,u&&cancelAnimationFrame(h)}}var pc=jd;var mc=Kd,gc=zd,xc=Yd,hc=$d,hs=Wd;var yc=Zd,ys=(e,t,a)=>{let o=new Map,r={platform:cc,...a},n={...r.platform,_c:o};return Gd(e,t,{...r,platform:n})};var Lc=xa(aa(),1);import*as Ie from"react";import{useLayoutEffect as Ey}from"react";var By=typeof document<"u",Oy=function(){},Fr=By?Ey:Oy;function Er(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let a,o,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(a=e.length,a!==t.length)return!1;for(o=a;o--!==0;)if(!Er(e[o],t[o]))return!1;return!0}if(r=Object.keys(e),a=r.length,a!==Object.keys(t).length)return!1;for(o=a;o--!==0;)if(!{}.hasOwnProperty.call(t,r[o]))return!1;for(o=a;o--!==0;){let n=r[o];if(!(n==="_owner"&&e.$$typeof)&&!Er(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function bc(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Cc(e,t){let a=bc(e);return Math.round(t*a)/a}function Cs(e){let t=Ie.useRef(e);return Fr(()=>{t.current=e}),t}function Sc(e){e===void 0&&(e={});let{placement:t="bottom",strategy:a="absolute",middleware:o=[],platform:r,elements:{reference:n,floating:s}={},transform:l=!0,whileElementsMounted:u,open:f}=e,[g,i]=Ie.useState({x:0,y:0,strategy:a,placement:t,middlewareData:{},isPositioned:!1}),[c,m]=Ie.useState(o);Er(c,o)||m(o);let[h,d]=Ie.useState(null),[p,x]=Ie.useState(null),y=Ie.useCallback(N=>{N!==w.current&&(w.current=N,d(N))},[]),C=Ie.useCallback(N=>{N!==b.current&&(b.current=N,x(N))},[]),v=n||h,S=s||p,w=Ie.useRef(null),b=Ie.useRef(null),I=Ie.useRef(g),D=u!=null,F=Cs(u),k=Cs(r),T=Cs(f),q=Ie.useCallback(()=>{if(!w.current||!b.current)return;let N={placement:t,strategy:a,middleware:c};k.current&&(N.platform=k.current),ys(w.current,b.current,N).then(P=>{let R={...P,isPositioned:T.current!==!1};z.current&&!Er(I.current,R)&&(I.current=R,Lc.flushSync(()=>{i(R)}))})},[c,t,a,k,T]);Fr(()=>{f===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,i(N=>({...N,isPositioned:!1})))},[f]);let z=Ie.useRef(!1);Fr(()=>(z.current=!0,()=>{z.current=!1}),[]),Fr(()=>{if(v&&(w.current=v),S&&(b.current=S),v&&S){if(F.current)return F.current(v,S,q);q()}},[v,S,q,F,D]);let j=Ie.useMemo(()=>({reference:w,floating:b,setReference:y,setFloating:C}),[y,C]),E=Ie.useMemo(()=>({reference:v,floating:S}),[v,S]),G=Ie.useMemo(()=>{let N={position:a,left:0,top:0};if(!E.floating)return N;let P=Cc(E.floating,g.x),R=Cc(E.floating,g.y);return l?{...N,transform:"translate("+P+"px, "+R+"px)",...bc(E.floating)>=1.5&&{willChange:"transform"}}:{position:a,left:P,top:R}},[a,l,E.floating,g.x,g.y]);return Ie.useMemo(()=>({...g,update:q,refs:j,elements:E,floatingStyles:G}),[g,q,j,E,G])}var _y=e=>{function t(a){return{}.hasOwnProperty.call(a,"current")}return{name:"arrow",options:e,fn(a){let{element:o,padding:r}=typeof e=="function"?e(a):e;return o&&t(o)?o.current!=null?hs({element:o.current,padding:r}).fn(a):{}:o?hs({element:o,padding:r}).fn(a):{}}}},vc=(e,t)=>({...pc(e),options:[e,t]}),Ic=(e,t)=>({...mc(e),options:[e,t]}),wc=(e,t)=>({...yc(e),options:[e,t]}),Rc=(e,t)=>({...gc(e),options:[e,t]}),Pc=(e,t)=>({...xc(e),options:[e,t]});var kc=(e,t)=>({...hc(e),options:[e,t]});var Tc=(e,t)=>({..._y(e),options:[e,t]});import*as Mc from"react";import{jsx as Ac}from"react/jsx-runtime";var Ny="Arrow",Dc=Mc.forwardRef((e,t)=>{let{children:a,width:o=10,height:r=5,...n}=e;return Ac(W.svg,{...n,ref:t,width:o,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?a:Ac("polygon",{points:"0,0 30,0 15,10"})})});Dc.displayName=Ny;var Fc=Dc;import{jsx as Fa}from"react/jsx-runtime";var Ls="Popper",[Ec,ao]=ve(Ls),[Hy,Bc]=Ec(Ls),Oc=e=>{let{__scopePopper:t,children:a}=e,[o,r]=Je.useState(null);return Fa(Hy,{scope:t,anchor:o,onAnchorChange:r,children:a})};Oc.displayName=Ls;var _c="PopperAnchor",Nc=Je.forwardRef((e,t)=>{let{__scopePopper:a,virtualRef:o,...r}=e,n=Bc(_c,a),s=Je.useRef(null),l=J(t,s),u=Je.useRef(null);return Je.useEffect(()=>{let f=u.current;u.current=o?.current||s.current,f!==u.current&&n.onAnchorChange(u.current)}),o?null:Fa(W.div,{...r,ref:l})});Nc.displayName=_c;var bs="PopperContent",[qy,Vy]=Ec(bs),Uc=Je.forwardRef((e,t)=>{let{__scopePopper:a,side:o="bottom",sideOffset:r=0,align:n="center",alignOffset:s=0,arrowPadding:l=0,avoidCollisions:u=!0,collisionBoundary:f=[],collisionPadding:g=0,sticky:i="partial",hideWhenDetached:c=!1,updatePositionStrategy:m="optimized",onPlaced:h,...d}=e,p=Bc(bs,a),[x,y]=Je.useState(null),C=J(t,V=>y(V)),[v,S]=Je.useState(null),w=ea(v),b=w?.width??0,I=w?.height??0,D=o+(n!=="center"?"-"+n:""),F=typeof g=="number"?g:{top:0,right:0,bottom:0,left:0,...g},k=Array.isArray(f)?f:[f],T=k.length>0,q={padding:F,boundary:k.filter(Wy),altBoundary:T},{refs:z,floatingStyles:j,placement:E,isPositioned:G,middlewareData:N}=Sc({strategy:"fixed",placement:D,whileElementsMounted:(...V)=>xs(...V,{animationFrame:m==="always"}),elements:{reference:p.anchor},middleware:[vc({mainAxis:r+I,alignmentAxis:s}),u&&Ic({mainAxis:!0,crossAxis:!1,limiter:i==="partial"?wc():void 0,...q}),u&&Rc({...q}),Pc({...q,apply:({elements:V,rects:le,availableWidth:Q,availableHeight:oe})=>{let{width:ne,height:ue}=le.reference,Ee=V.floating.style;Ee.setProperty("--radix-popper-available-width",`${Q}px`),Ee.setProperty("--radix-popper-available-height",`${oe}px`),Ee.setProperty("--radix-popper-anchor-width",`${ne}px`),Ee.setProperty("--radix-popper-anchor-height",`${ue}px`)}}),v&&Tc({element:v,padding:l}),zy({arrowWidth:b,arrowHeight:I}),c&&kc({strategy:"referenceHidden",...q})]}),[P,R]=Vc(E),_=Ye(h);me(()=>{G&&_?.()},[G,_]);let U=N.arrow?.x,Z=N.arrow?.y,Ce=N.arrow?.centerOffset!==0,[ce,se]=Je.useState();return me(()=>{x&&se(window.getComputedStyle(x).zIndex)},[x]),Fa("div",{ref:z.setFloating,"data-radix-popper-content-wrapper":"",style:{...j,transform:G?j.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ce,"--radix-popper-transform-origin":[N.transformOrigin?.x,N.transformOrigin?.y].join(" "),...N.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:Fa(qy,{scope:a,placedSide:P,onArrowChange:S,arrowX:U,arrowY:Z,shouldHideArrow:Ce,children:Fa(W.div,{"data-side":P,"data-align":R,...d,ref:C,style:{...d.style,animation:G?void 0:"none"}})})})});Uc.displayName=bs;var Hc="PopperArrow",Gy={top:"bottom",right:"left",bottom:"top",left:"right"},qc=Je.forwardRef(function(t,a){let{__scopePopper:o,...r}=t,n=Vy(Hc,o),s=Gy[n.placedSide];return Fa("span",{ref:n.onArrowChange,style:{position:"absolute",left:n.arrowX,top:n.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[n.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[n.placedSide],visibility:n.shouldHideArrow?"hidden":void 0},children:Fa(Fc,{...r,ref:a,style:{...r.style,display:"block"}})})});qc.displayName=Hc;function Wy(e){return e!==null}var zy=e=>({name:"transformOrigin",options:e,fn(t){let{placement:a,rects:o,middlewareData:r}=t,s=r.arrow?.centerOffset!==0,l=s?0:e.arrowWidth,u=s?0:e.arrowHeight,[f,g]=Vc(a),i={start:"0%",center:"50%",end:"100%"}[g],c=(r.arrow?.x??0)+l/2,m=(r.arrow?.y??0)+u/2,h="",d="";return f==="bottom"?(h=s?i:`${c}px`,d=`${-u}px`):f==="top"?(h=s?i:`${c}px`,d=`${o.floating.height+u}px`):f==="right"?(h=`${-u}px`,d=s?i:`${m}px`):f==="left"&&(h=`${o.floating.width+u}px`,d=s?i:`${m}px`),{data:{x:h,y:d}}}});function Vc(e){let[t,a="center"]=e.split("-");return[t,a]}var Br=Oc,Or=Nc,_r=Uc,Nr=qc;var Wc=xa(aa(),1);import*as Ur from"react";import{jsx as $y}from"react/jsx-runtime";var Xy="Portal",Bo=Ur.forwardRef((e,t)=>{let{container:a,...o}=e,[r,n]=Ur.useState(!1);me(()=>n(!0),[]);let s=a||r&&globalThis?.document?.body;return s?Wc.default.createPortal($y(W.div,{...o,ref:t}),s):null});Bo.displayName=Xy;import*as zc from"react";import{jsx as jy}from"react/jsx-runtime";var Ss=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Ky="VisuallyHidden",$c=zc.forwardRef((e,t)=>jy(W.span,{...e,ref:t,style:{...Ss,...e.style}}));$c.displayName=Ky;var Xc=$c;var Yy=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},oo=new WeakMap,Hr=new WeakMap,qr={},vs=0,jc=function(e){return e&&(e.host||jc(e.parentNode))},Qy=function(e,t){return t.map(function(a){if(e.contains(a))return a;var o=jc(a);return o&&e.contains(o)?o:(console.error("aria-hidden",a,"in not contained inside",e,". Doing nothing"),null)}).filter(function(a){return!!a})},Jy=function(e,t,a,o){var r=Qy(t,Array.isArray(e)?e:[e]);qr[a]||(qr[a]=new WeakMap);var n=qr[a],s=[],l=new Set,u=new Set(r),f=function(i){!i||l.has(i)||(l.add(i),f(i.parentNode))};r.forEach(f);var g=function(i){!i||u.has(i)||Array.prototype.forEach.call(i.children,function(c){if(l.has(c))g(c);else try{var m=c.getAttribute(o),h=m!==null&&m!=="false",d=(oo.get(c)||0)+1,p=(n.get(c)||0)+1;oo.set(c,d),n.set(c,p),s.push(c),d===1&&h&&Hr.set(c,!0),p===1&&c.setAttribute(a,"true"),h||c.setAttribute(o,"true")}catch(x){console.error("aria-hidden: cannot operate on ",c,x)}})};return g(t),l.clear(),vs++,function(){s.forEach(function(i){var c=oo.get(i)-1,m=n.get(i)-1;oo.set(i,c),n.set(i,m),c||(Hr.has(i)||i.removeAttribute(o),Hr.delete(i)),m||i.removeAttribute(a)}),vs--,vs||(oo=new WeakMap,oo=new WeakMap,Hr=new WeakMap,qr={})}},Kc=function(e,t,a){a===void 0&&(a="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),r=t||Yy(e);return r?(o.push.apply(o,Array.from(r.querySelectorAll("[aria-live], script"))),Jy(o,r,a,"aria-hidden")):function(){return null}};var et=function(){return et=Object.assign||function(t){for(var a,o=1,r=arguments.length;o<r;o++){a=arguments[o];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(t[n]=a[n])}return t},et.apply(this,arguments)};function Vr(e,t){var a={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(a[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(a[o[r]]=e[o[r]]);return a}function Zc(e,t,a){if(a||arguments.length===2)for(var o=0,r=t.length,n;o<r;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))}import*as Xr from"react";import*as _e from"react";var Ea="right-scroll-bar-position",Ba="width-before-scroll-bar",Is="with-scroll-bars-hidden",ws="--removed-body-scroll-bar-size";function Gr(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}import{useState as eC}from"react";function Yc(e,t){var a=eC(function(){return{value:e,callback:t,facade:{get current(){return a.value},set current(o){var r=a.value;r!==o&&(a.value=o,a.callback(o,r))}}}})[0];return a.callback=t,a.facade}import*as Wr from"react";var tC=typeof window<"u"?Wr.useLayoutEffect:Wr.useEffect,Qc=new WeakMap;function Rs(e,t){var a=Yc(t||null,function(o){return e.forEach(function(r){return Gr(r,o)})});return tC(function(){var o=Qc.get(a);if(o){var r=new Set(o),n=new Set(e),s=a.current;r.forEach(function(l){n.has(l)||Gr(l,null)}),n.forEach(function(l){r.has(l)||Gr(l,s)})}Qc.set(a,e)},[e]),a}function aC(e){return e}function oC(e,t){t===void 0&&(t=aC);var a=[],o=!1,r={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return a.length?a[a.length-1]:e},useMedium:function(n){var s=t(n,o);return a.push(s),function(){a=a.filter(function(l){return l!==s})}},assignSyncMedium:function(n){for(o=!0;a.length;){var s=a;a=[],s.forEach(n)}a={push:function(l){return n(l)},filter:function(){return a}}},assignMedium:function(n){o=!0;var s=[];if(a.length){var l=a;a=[],l.forEach(n),s=a}var u=function(){var g=s;s=[],g.forEach(n)},f=function(){return Promise.resolve().then(u)};f(),a={push:function(g){s.push(g),f()},filter:function(g){return s=s.filter(g),a}}}};return r}function Ps(e){e===void 0&&(e={});var t=oC(null);return t.options=et({async:!0,ssr:!1},e),t}import*as Jc from"react";var ef=function(e){var t=e.sideCar,a=Vr(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 Jc.createElement(o,et({},a))};ef.isSideCarExport=!0;function ks(e,t){return e.useMedium(t),ef}var zr=Ps();var Ts=function(){},Oo=_e.forwardRef(function(e,t){var a=_e.useRef(null),o=_e.useState({onScrollCapture:Ts,onWheelCapture:Ts,onTouchMoveCapture:Ts}),r=o[0],n=o[1],s=e.forwardProps,l=e.children,u=e.className,f=e.removeScrollBar,g=e.enabled,i=e.shards,c=e.sideCar,m=e.noRelative,h=e.noIsolation,d=e.inert,p=e.allowPinchZoom,x=e.as,y=x===void 0?"div":x,C=e.gapMode,v=Vr(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=c,w=Rs([a,t]),b=et(et({},v),r);return _e.createElement(_e.Fragment,null,g&&_e.createElement(S,{sideCar:zr,removeScrollBar:f,shards:i,noRelative:m,noIsolation:h,inert:d,setCallbacks:n,allowPinchZoom:!!p,lockRef:a,gapMode:C}),s?_e.cloneElement(_e.Children.only(l),et(et({},b),{ref:w})):_e.createElement(y,et({},b,{className:u,ref:w}),l))});Oo.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Oo.classNames={fullWidth:Ba,zeroRight:Ea};import*as fe from"react";import*as no from"react";import*as of from"react";var tf;var af=function(){if(tf)return tf;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function rC(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=af();return t&&e.setAttribute("nonce",t),e}function nC(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function sC(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var As=function(){var e=0,t=null;return{add:function(a){e==0&&(t=rC())&&(nC(t,a),sC(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}};var Ms=function(){var e=As();return function(t,a){of.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&a])}};var _o=function(){var e=Ms(),t=function(a){var o=a.styles,r=a.dynamic;return e(o,r),null};return t};var lC={left:0,top:0,right:0,gap:0},Ds=function(e){return parseInt(e||"",10)||0},iC=function(e){var t=window.getComputedStyle(document.body),a=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],r=t[e==="padding"?"paddingRight":"marginRight"];return[Ds(a),Ds(o),Ds(r)]},Fs=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return lC;var t=iC(e),a=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-a+t[2]-t[0])}};var uC=_o(),ro="data-scroll-locked",dC=function(e,t,a,o){var r=e.left,n=e.top,s=e.right,l=e.gap;return a===void 0&&(a="margin"),`
|
|
5
|
+
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),i}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var l=Gl("react"),u={d:{f:e,r:function(){throw Error("Invalid form element. requestFormReset must be passed a form that was rendered by React.")},D:e,C:e,L:e,m:e,X:e,S:e,M:e},p:0,findDOMNode:null},f=Symbol.for("react.portal"),g=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;typeof Map=="function"&&Map.prototype!=null&&typeof Map.prototype.forEach=="function"&&typeof Set=="function"&&Set.prototype!=null&&typeof Set.prototype.clear=="function"&&typeof Set.prototype.forEach=="function"||console.error("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),ze.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=u,ze.createPortal=function(i,c){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!c||c.nodeType!==1&&c.nodeType!==9&&c.nodeType!==11)throw Error("Target container is not a DOM element.");return a(i,c,null,m)},ze.flushSync=function(i){var c=g.T,m=u.p;try{if(g.T=null,u.p=2,i)return i()}finally{g.T=c,u.p=m,u.d.f()&&console.error("flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task.")}},ze.preconnect=function(i,c){typeof i=="string"&&i?c!=null&&typeof c!="object"?console.error("ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.",n(c)):c!=null&&typeof c.crossOrigin!="string"&&console.error("ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.",r(c.crossOrigin)):console.error("ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",r(i)),typeof i=="string"&&(c?(c=c.crossOrigin,c=typeof c=="string"?c==="use-credentials"?c:"":void 0):c=null,u.d.C(i,c))},ze.prefetchDNS=function(i){if(typeof i!="string"||!i)console.error("ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",r(i));else if(1<arguments.length){var c=arguments[1];typeof c=="object"&&c.hasOwnProperty("crossOrigin")?console.error("ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",n(c)):console.error("ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",n(c))}typeof i=="string"&&u.d.D(i)},ze.preinit=function(i,c){if(typeof i=="string"&&i?c==null||typeof c!="object"?console.error("ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.",n(c)):c.as!=="style"&&c.as!=="script"&&console.error('ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are "style" and "script".',n(c.as)):console.error("ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",r(i)),typeof i=="string"&&c&&typeof c.as=="string"){var m=c.as,h=o(m,c.crossOrigin),d=typeof c.integrity=="string"?c.integrity:void 0,p=typeof c.fetchPriority=="string"?c.fetchPriority:void 0;m==="style"?u.d.S(i,typeof c.precedence=="string"?c.precedence:void 0,{crossOrigin:h,integrity:d,fetchPriority:p}):m==="script"&&u.d.X(i,{crossOrigin:h,integrity:d,fetchPriority:p,nonce:typeof c.nonce=="string"?c.nonce:void 0})}},ze.preinitModule=function(i,c){var m="";if(typeof i=="string"&&i||(m+=" The `href` argument encountered was "+r(i)+"."),c!==void 0&&typeof c!="object"?m+=" The `options` argument encountered was "+r(c)+".":c&&"as"in c&&c.as!=="script"&&(m+=" The `as` option encountered was "+n(c.as)+"."),m)console.error("ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s",m);else switch(m=c&&typeof c.as=="string"?c.as:"script",m){case"script":break;default:m=n(m),console.error('ReactDOM.preinitModule(): Currently the only supported "as" type for this function is "script" but received "%s" instead. This warning was generated for `href` "%s". In the future other module types will be supported, aligning with the import-attributes proposal. Learn more here: (https://github.com/tc39/proposal-import-attributes)',m,i)}typeof i=="string"&&(typeof c=="object"&&c!==null?(c.as==null||c.as==="script")&&(m=o(c.as,c.crossOrigin),u.d.M(i,{crossOrigin:m,integrity:typeof c.integrity=="string"?c.integrity:void 0,nonce:typeof c.nonce=="string"?c.nonce:void 0})):c==null&&u.d.M(i))},ze.preload=function(i,c){var m="";if(typeof i=="string"&&i||(m+=" The `href` argument encountered was "+r(i)+"."),c==null||typeof c!="object"?m+=" The `options` argument encountered was "+r(c)+".":typeof c.as=="string"&&c.as||(m+=" The `as` option encountered was "+r(c.as)+"."),m&&console.error('ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `<link rel="preload" as="..." />` tag.%s',m),typeof i=="string"&&typeof c=="object"&&c!==null&&typeof c.as=="string"){m=c.as;var h=o(m,c.crossOrigin);u.d.L(i,m,{crossOrigin:h,integrity:typeof c.integrity=="string"?c.integrity:void 0,nonce:typeof c.nonce=="string"?c.nonce:void 0,type:typeof c.type=="string"?c.type:void 0,fetchPriority:typeof c.fetchPriority=="string"?c.fetchPriority:void 0,referrerPolicy:typeof c.referrerPolicy=="string"?c.referrerPolicy:void 0,imageSrcSet:typeof c.imageSrcSet=="string"?c.imageSrcSet:void 0,imageSizes:typeof c.imageSizes=="string"?c.imageSizes:void 0,media:typeof c.media=="string"?c.media:void 0})}},ze.preloadModule=function(i,c){var m="";typeof i=="string"&&i||(m+=" The `href` argument encountered was "+r(i)+"."),c!==void 0&&typeof c!="object"?m+=" The `options` argument encountered was "+r(c)+".":c&&"as"in c&&typeof c.as!="string"&&(m+=" The `as` option encountered was "+r(c.as)+"."),m&&console.error('ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `<link rel="modulepreload" as="..." />` tag.%s',m),typeof i=="string"&&(c?(m=o(c.as,c.crossOrigin),u.d.m(i,{as:typeof c.as=="string"&&c.as!=="script"?c.as:void 0,crossOrigin:m,integrity:typeof c.integrity=="string"?c.integrity:void 0})):u.d.m(i))},ze.requestFormReset=function(i){u.d.r(i)},ze.unstable_batchedUpdates=function(i,c){return i(c)},ze.useFormState=function(i,c,m){return s().useFormState(i,c,m)},ze.useFormStatus=function(){return s().useHostTransitionStatus()},ze.version="19.2.5",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var aa=qn((dR,es)=>{"use strict";function td(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function")){if(process.env.NODE_ENV!=="production")throw new Error("^_^");try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(td)}catch(e){console.error(e)}}}process.env.NODE_ENV==="production"?(td(),es.exports=Ju()):es.exports=ed()});import{Fragment as hg,jsx as xg,jsxs as Jl}from"react/jsx-runtime";var Ql="{buyerTermsLink}",ei=({isPaymentRequired:e,isTrial:t,isRecurring:a,buttonLabel:o,locale:r})=>{let n=he(r??Le),s={buttonLabel:o,buyerTermsLink:Ql},l=e?n(t?"checkout.footer.mandateSubscriptionTrial":a?"checkout.footer.mandateSubscription":"checkout.footer.mandateOneTime",s):n("checkout.footer.merchantOfRecord"),u=n("checkout.footer.buyerTermsLink"),[f,g]=l.split(Ql);return Jl("p",{className:"text-center text-xs text-gray-500 dark:text-gray-500",children:[f,g!==void 0&&Jl(hg,{children:[xg("a",{href:"/legal/checkout-buyer-terms",target:"_blank",rel:"noreferrer",className:"underline",children:u}),g]})]})};import{forwardRef as Cg,createElement as Lg}from"react";var sr=(...e)=>e.filter((t,a,o)=>!!t&&t.trim()!==""&&o.indexOf(t)===a).join(" ").trim();var ti=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();var ai=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,a,o)=>o?o.toUpperCase():a.toLowerCase());var Vn=e=>{let t=ai(e);return t.charAt(0).toUpperCase()+t.slice(1)};import{forwardRef as yg,createElement as ni}from"react";var oi={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"};var ri=e=>{for(let t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};var si=yg(({color:e="currentColor",size:t=24,strokeWidth:a=2,absoluteStrokeWidth:o,className:r="",children:n,iconNode:s,...l},u)=>ni("svg",{ref:u,...oi,width:t,height:t,stroke:e,strokeWidth:o?Number(a)*24/Number(t):a,className:sr("lucide",r),...!n&&!ri(l)&&{"aria-hidden":"true"},...l},[...s.map(([f,g])=>ni(f,g)),...Array.isArray(n)?n:[n]]));var vt=(e,t)=>{let a=Cg(({className:o,...r},n)=>Lg(si,{ref:n,iconNode:t,className:sr(`lucide-${ti(Vn(e))}`,`lucide-${e}`,o),...r}));return a.displayName=Vn(e),a};var bg=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],ha=vt("check",bg);var Sg=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Xa=vt("chevron-down",Sg);var vg=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],yo=vt("chevron-up",vg);var Ig=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Co=vt("circle",Ig);var wg=[["path",{d:"M5 12h14",key:"1ays0h"}]],Lo=vt("minus",wg);var bo={},li;function Rg(){if(li)return bo;li=1,Object.defineProperty(bo,"__esModule",{value:!0}),bo.styleq=void 0;var e=new WeakMap,t="$$css";function a(r){var n,s,l;return r!=null&&(n=r.disableCache===!0,s=r.disableMix===!0,l=r.transform),function(){for(var f=[],g="",i=null,c="",m=n?null:e,h=new Array(arguments.length),d=0;d<arguments.length;d++)h[d]=arguments[d];for(;h.length>0;){var p=h.pop();if(!(p==null||p===!1)){if(Array.isArray(p)){for(var x=0;x<p.length;x++)h.push(p[x]);continue}var y=l!=null?l(p):p;if(y.$$css!=null){var C="";if(m!=null&&m.has(y)){var v=m.get(y);v!=null&&(C=v[0],c=v[2],f.push.apply(f,v[1]),m=v[3])}else{var S=[];for(var w in y){var b=y[w];if(w===t){var I=y[w];I!==!0&&(c=c?I+"; "+c:I);continue}typeof b=="string"||b===null?f.includes(w)||(f.push(w),m!=null&&S.push(w),typeof b=="string"&&(C+=C?" "+b:b)):console.error("styleq: ".concat(w," typeof ").concat(String(b),' is not "string" or "null".'))}if(m!=null){var D=new WeakMap;m.set(y,[C,S,c,D]),m=D}}C&&(g=g?C+" "+g:C)}else if(s)i==null&&(i={}),i=Object.assign({},y,i);else{var F=null;for(var k in y){var T=y[k];T!==void 0&&(f.includes(k)||(T!=null&&(i==null&&(i={}),F==null&&(F={}),F[k]=T),f.push(k),m=null))}F!=null&&(i=Object.assign(F,i))}}}var q=[g,i,c];return q}}var o=bo.styleq=a();return o.factory=a,bo}var ii=Rg(),Be=e=>new Error(`Unexpected 'stylex.${e}' call at runtime. Styles must be compiled by '@stylexjs/babel-plugin'.`),at=e=>Be(`types.${e}`),H=function(t){throw Be("create")},Pg=(e,t)=>{throw Be("createTheme")},lr=function(t){throw Be("defineConsts")},Oe=function(t){throw Be("defineVars")},kg=()=>{throw Be("defineMarker")},Tg=(...e)=>{throw Be("firstThatWorks")},Ag=e=>{throw Be("keyframes")},Mg=e=>{throw Be("positionTry")};function ja(...e){let[t,a,o]=ii.styleq(e),r={};return t!=null&&t!==""&&(r.className=t),a!=null&&Object.keys(a).length>0&&(r.style=a),o!=null&&o!==""&&(r["data-style-src"]=o),r}var Dg=e=>e.replace(/([A-Z])/g,"-$1").toLowerCase();function Fg(...e){let{className:t,style:a,"data-style-src":o}=ja.apply(this,e),r={};return t!=null&&(r.class=t),a!=null&&(r.style=Object.entries(a).map(([n,s])=>`${Dg(n)}:${s}`).join(";")),o!=null&&(r["data-style-src"]=o),r}var Eg=e=>{throw Be("viewTransitionClass")},Bg=()=>{throw Be("defaultMarker")},Og={ancestor:e=>{throw Be("when.ancestor")},descendant:e=>{throw Be("when.descendant")},siblingBefore:e=>{throw Be("when.siblingBefore")},siblingAfter:e=>{throw Be("when.siblingAfter")},anySibling:e=>{throw Be("when.anySibling")}},_g=Object.freeze({}),Ng={angle:e=>{throw at("angle")},color:e=>{throw at("color")},url:e=>{throw at("url")},image:e=>{throw at("image")},integer:e=>{throw at("integer")},lengthPercentage:e=>{throw at("lengthPercentage")},length:e=>{throw at("length")},percentage:e=>{throw at("percentage")},number:e=>{throw at("number")},resolution:e=>{throw at("resolution")},time:e=>{throw at("time")},transformFunction:e=>{throw at("transformFunction")},transformList:e=>{throw at("transformList")}};function He(...e){let[t]=ii.styleq(e);return t}He.create=H;He.createTheme=Pg;He.defineConsts=lr;He.defineMarker=kg;He.defineVars=Oe;He.defaultMarker=Bg;He.firstThatWorks=Tg;He.keyframes=Ag;He.positionTry=Mg;He.props=ja;He.attrs=Fg;He.types=Ng;He.when=Og;He.viewTransitionClass=Eg;He.env=_g;import jg,{useId as Kg}from"react";var X=Oe({white:"#ffffff",black:"#000000",gray50:"#fafafa",gray100:"#f5f5f7",gray200:"#e8e8ed",gray300:"#d2d2d7",gray400:"#86868b",gray500:"#6e6e73",gray600:"#5a5a5f",gray700:"#424245",gray800:"#2c2c2e",gray900:"#1d1d1f",gray950:"#111112",navy50:"#f5f9ff",navy100:"#dce7f5",navy200:"#c3d2e3",navy300:"#9db0c8",navy400:"#71869f",navy500:"#5d7189",navy600:"#40526a",navy700:"#263952",navy800:"#101d30",navy900:"#0b1424",navy950:"#07101e",emerald50:"oklch(0.979 0.021 166.113)",emerald100:"oklch(0.95 0.052 163.051)",emerald200:"oklch(0.905 0.093 164.15)",emerald300:"oklch(0.845 0.143 164.978)",emerald400:"oklch(0.765 0.177 163.223)",emerald500:"oklch(0.696 0.17 162.48)",emerald600:"oklch(0.596 0.145 163.225)",emerald700:"oklch(0.508 0.118 165.612)",emerald800:"oklch(0.432 0.095 166.913)",emerald900:"oklch(0.378 0.077 168.94)",emerald950:"oklch(0.262 0.051 172.552)",red50:"oklch(0.971 0.013 17.38)",red100:"oklch(0.936 0.032 17.717)",red200:"oklch(0.885 0.062 18.334)",red300:"oklch(0.808 0.114 19.571)",red400:"oklch(0.704 0.191 22.216)",red500:"oklch(0.637 0.237 25.331)",red600:"oklch(0.577 0.245 27.325)",red700:"oklch(0.505 0.213 27.518)",red800:"oklch(0.444 0.177 26.899)",red900:"oklch(0.396 0.141 25.723)",red950:"oklch(0.258 0.092 26.042)",amber50:"oklch(0.987 0.022 95.277)",amber100:"oklch(0.962 0.059 95.617)",amber200:"oklch(0.924 0.12 95.746)",amber300:"oklch(0.879 0.169 91.605)",amber400:"oklch(0.828 0.189 84.429)",amber500:"oklch(0.769 0.188 70.08)",amber600:"oklch(0.666 0.179 58.318)",amber700:"oklch(0.555 0.163 48.998)",amber800:"oklch(0.473 0.137 46.201)",amber900:"oklch(0.414 0.112 45.904)",amber950:"oklch(0.279 0.077 45.635)",indigo50:"#eaf4ff",indigo100:"#d7ebff",indigo200:"#afd7ff",indigo300:"#78b9f7",indigo400:"#2997ff",indigo500:"#0071e3",indigo600:"#0071e3",indigo700:"#005bb7",indigo800:"#00498f",indigo900:"#00386f",indigo950:"#00264d"}),be=Oe({1:"0.75rem",2:"0.875rem",3:"1rem",4:"1.125rem",5:"1.25rem",6:"1.5rem",7:"1.875rem",8:"2.25rem",9:"3rem",10:"3.75rem",11:"4.5rem",12:"6rem"}),ot=Oe({none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625"}),Gn=Oe({regular:"400",medium:"500",semibold:"600"}),RI=Oe({tight:"-0.02em",normal:"0",wide:"0.025em"}),qe=Oe({sans:"-apple-system, 'SF Pro Display', 'SF Pro Text', 'Inter', sans-serif",display:"-apple-system, 'SF Pro Display', 'SF Pro Text', 'Inter', sans-serif",mono:"'GeistMono', monospace"}),L=Oe({none:"0",xs:"4px",s:"8px",m:"12px",l:"16px",xl:"24px","2xl":"32px","3xl":"48px","4xl":"64px","5xl":"96px"}),te=Oe({none:"0",s:"8px",m:"12px",l:"16px",card:"22px",xl:"32px",full:"9999px"}),Kt=Oe({none:"none",s:"0 1px 2px rgba(0, 0, 0, 0.05)",m:"0 2px 4px rgba(0, 0, 0, 0.04)",l:"0 2px 4px rgba(0, 0, 0, 0.04), 0 24px 48px -30px rgba(0, 0, 0, 0.14)",xl:"0 2px 4px rgba(0, 0, 0, 0.04), 0 30px 60px -30px rgba(0, 0, 0, 0.16)"}),Wn=lr({sm:640,md:768,lg:1024,xl:1280}),rt=Oe({instant:"0ms",fast:"120ms",base:"200ms",slow:"320ms",slower:"480ms"}),ya=lr({standard:"cubic-bezier(0.2, 0, 0, 1)",decelerate:"cubic-bezier(0, 0, 0, 1)",accelerate:"cubic-bezier(0.3, 0, 1, 1)",spring:"cubic-bezier(0.5, 1.25, 0.4, 1)"});var lt=Oe({"background-primary":`light-dark(${X.white}, ${X.navy950})`,"background-secondary":`light-dark(${X.gray100}, ${X.navy900})`,"background-card":`light-dark(${X.white}, ${X.navy800})`,"background-inverse":`light-dark(${X.gray900}, ${X.white})`,"background-brand":`light-dark(${X.indigo500}, ${X.indigo500})`,"background-accent":`light-dark(${X.indigo50}, ${X.indigo950})`,"background-warning":`light-dark(${X.amber50}, ${X.amber950})`,"background-success":`light-dark(${X.emerald50}, ${X.emerald950})`,"background-danger":`light-dark(${X.red50}, ${X.red950})`}),Me=Oe({"text-primary":`light-dark(${X.gray900}, ${X.white})`,"text-secondary":`light-dark(${X.gray500}, ${X.navy400})`,"text-tertiary":`light-dark(${X.gray400}, ${X.navy500})`,"text-disabled":`light-dark(${X.gray300}, ${X.navy600})`,"text-success":`light-dark(${X.emerald500}, ${X.emerald500})`,"text-danger":`light-dark(${X.red500}, ${X.red500})`,"text-warning":`light-dark(${X.amber500}, ${X.amber500})`,"text-accent":`light-dark(${X.indigo500}, ${X.indigo500})`}),Za=Oe({"border-primary":`light-dark(${X.gray200}, ${X.navy700})`,"border-secondary":`light-dark(${X.gray100}, ${X.navy800})`,"border-warning":`light-dark(${X.amber300}, ${X.amber700})`}),Ca="@media (min-width: 768px)",ui=H({default:{fontFamily:qe.sans,fontSize:be[2],lineHeight:ot.normal},title:{fontFamily:qe.sans,fontSize:be[2],lineHeight:ot.normal,fontWeight:Gn.medium},body:{fontFamily:qe.sans,fontSize:be[3],lineHeight:ot.normal},label:{fontFamily:qe.sans,fontSize:be[1],lineHeight:ot.snug,fontWeight:Gn.medium},caption:{fontFamily:qe.sans,fontSize:be[1],lineHeight:ot.snug},"heading-2xl":{fontFamily:qe.display,fontSize:{default:be[10],[Ca]:be[12]},lineHeight:ot.none},"heading-xl":{fontFamily:qe.display,fontSize:{default:be[9],[Ca]:be[11]},lineHeight:ot.none},"heading-l":{fontFamily:qe.display,fontSize:{default:be[8],[Ca]:be[9]},lineHeight:ot.tight},"heading-m":{fontFamily:qe.sans,fontSize:{default:be[7],[Ca]:be[8]},lineHeight:ot.tight},"heading-s":{fontFamily:qe.sans,fontSize:{default:be[6],[Ca]:be[7]},lineHeight:ot.snug},"heading-xs":{fontFamily:qe.sans,fontSize:{default:be[5],[Ca]:be[6]},lineHeight:ot.snug},"heading-xxs":{fontFamily:qe.sans,fontSize:{default:be[4],[Ca]:be[5]},lineHeight:ot.snug}}),di=H({default:{color:Me["text-primary"]},muted:{color:Me["text-secondary"]},disabled:{color:Me["text-disabled"]},accent:{color:Me["text-accent"]},danger:{color:Me["text-danger"]},error:{color:Me["text-danger"]},warning:{color:Me["text-warning"]},success:{color:Me["text-success"]},inverse:{color:`light-dark(${X.white}, ${X.black})`},white:{color:X.white},black:{color:X.black},inherit:{}});var Bt={none:"none",all:"all",common:"color, background-color, border-color, box-shadow, opacity, transform",colors:"color, background-color, border-color",opacity:"opacity",shadow:"box-shadow",transform:"transform"},ci=H({none:{padding:L.none},xs:{padding:L.xs},s:{padding:L.s},m:{padding:L.m},l:{padding:L.l},xl:{padding:L.xl},"2xl":{padding:L["2xl"]},"3xl":{padding:L["3xl"]},"4xl":{padding:L["4xl"]},"5xl":{padding:L["5xl"]}}),fi=H({none:{paddingTop:L.none},xs:{paddingTop:L.xs},s:{paddingTop:L.s},m:{paddingTop:L.m},l:{paddingTop:L.l},xl:{paddingTop:L.xl},"2xl":{paddingTop:L["2xl"]},"3xl":{paddingTop:L["3xl"]},"4xl":{paddingTop:L["4xl"]},"5xl":{paddingTop:L["5xl"]}}),pi=H({none:{paddingRight:L.none},xs:{paddingRight:L.xs},s:{paddingRight:L.s},m:{paddingRight:L.m},l:{paddingRight:L.l},xl:{paddingRight:L.xl},"2xl":{paddingRight:L["2xl"]},"3xl":{paddingRight:L["3xl"]},"4xl":{paddingRight:L["4xl"]},"5xl":{paddingRight:L["5xl"]}}),mi=H({none:{paddingBottom:L.none},xs:{paddingBottom:L.xs},s:{paddingBottom:L.s},m:{paddingBottom:L.m},l:{paddingBottom:L.l},xl:{paddingBottom:L.xl},"2xl":{paddingBottom:L["2xl"]},"3xl":{paddingBottom:L["3xl"]},"4xl":{paddingBottom:L["4xl"]},"5xl":{paddingBottom:L["5xl"]}}),gi=H({none:{paddingLeft:L.none},xs:{paddingLeft:L.xs},s:{paddingLeft:L.s},m:{paddingLeft:L.m},l:{paddingLeft:L.l},xl:{paddingLeft:L.xl},"2xl":{paddingLeft:L["2xl"]},"3xl":{paddingLeft:L["3xl"]},"4xl":{paddingLeft:L["4xl"]},"5xl":{paddingLeft:L["5xl"]}}),xi=H({none:{paddingInline:L.none},xs:{paddingInline:L.xs},s:{paddingInline:L.s},m:{paddingInline:L.m},l:{paddingInline:L.l},xl:{paddingInline:L.xl},"2xl":{paddingInline:L["2xl"]},"3xl":{paddingInline:L["3xl"]},"4xl":{paddingInline:L["4xl"]},"5xl":{paddingInline:L["5xl"]}}),hi=H({none:{paddingBlock:L.none},xs:{paddingBlock:L.xs},s:{paddingBlock:L.s},m:{paddingBlock:L.m},l:{paddingBlock:L.l},xl:{paddingBlock:L.xl},"2xl":{paddingBlock:L["2xl"]},"3xl":{paddingBlock:L["3xl"]},"4xl":{paddingBlock:L["4xl"]},"5xl":{paddingBlock:L["5xl"]}}),yi=H({none:{margin:L.none},xs:{margin:L.xs},s:{margin:L.s},m:{margin:L.m},l:{margin:L.l},xl:{margin:L.xl},"2xl":{margin:L["2xl"]},"3xl":{margin:L["3xl"]},"4xl":{margin:L["4xl"]},"5xl":{margin:L["5xl"]},auto:{margin:"auto"}}),Ci=H({none:{marginTop:L.none},xs:{marginTop:L.xs},s:{marginTop:L.s},m:{marginTop:L.m},l:{marginTop:L.l},xl:{marginTop:L.xl},"2xl":{marginTop:L["2xl"]},"3xl":{marginTop:L["3xl"]},"4xl":{marginTop:L["4xl"]},"5xl":{marginTop:L["5xl"]},auto:{marginTop:"auto"}}),Li=H({none:{marginRight:L.none},xs:{marginRight:L.xs},s:{marginRight:L.s},m:{marginRight:L.m},l:{marginRight:L.l},xl:{marginRight:L.xl},"2xl":{marginRight:L["2xl"]},"3xl":{marginRight:L["3xl"]},"4xl":{marginRight:L["4xl"]},"5xl":{marginRight:L["5xl"]},auto:{marginRight:"auto"}}),bi=H({none:{marginBottom:L.none},xs:{marginBottom:L.xs},s:{marginBottom:L.s},m:{marginBottom:L.m},l:{marginBottom:L.l},xl:{marginBottom:L.xl},"2xl":{marginBottom:L["2xl"]},"3xl":{marginBottom:L["3xl"]},"4xl":{marginBottom:L["4xl"]},"5xl":{marginBottom:L["5xl"]},auto:{marginBottom:"auto"}}),Si=H({none:{marginLeft:L.none},xs:{marginLeft:L.xs},s:{marginLeft:L.s},m:{marginLeft:L.m},l:{marginLeft:L.l},xl:{marginLeft:L.xl},"2xl":{marginLeft:L["2xl"]},"3xl":{marginLeft:L["3xl"]},"4xl":{marginLeft:L["4xl"]},"5xl":{marginLeft:L["5xl"]},auto:{marginLeft:"auto"}}),vi=H({none:{marginInline:L.none},xs:{marginInline:L.xs},s:{marginInline:L.s},m:{marginInline:L.m},l:{marginInline:L.l},xl:{marginInline:L.xl},"2xl":{marginInline:L["2xl"]},"3xl":{marginInline:L["3xl"]},"4xl":{marginInline:L["4xl"]},"5xl":{marginInline:L["5xl"]},auto:{marginInline:"auto"}}),Ii=H({none:{marginBlock:L.none},xs:{marginBlock:L.xs},s:{marginBlock:L.s},m:{marginBlock:L.m},l:{marginBlock:L.l},xl:{marginBlock:L.xl},"2xl":{marginBlock:L["2xl"]},"3xl":{marginBlock:L["3xl"]},"4xl":{marginBlock:L["4xl"]},"5xl":{marginBlock:L["5xl"]},auto:{marginBlock:"auto"}}),wi=H({none:{gap:L.none},xs:{gap:L.xs},s:{gap:L.s},m:{gap:L.m},l:{gap:L.l},xl:{gap:L.xl},"2xl":{gap:L["2xl"]},"3xl":{gap:L["3xl"]},"4xl":{gap:L["4xl"]},"5xl":{gap:L["5xl"]}}),Ri=H({none:{rowGap:L.none},xs:{rowGap:L.xs},s:{rowGap:L.s},m:{rowGap:L.m},l:{rowGap:L.l},xl:{rowGap:L.xl},"2xl":{rowGap:L["2xl"]},"3xl":{rowGap:L["3xl"]},"4xl":{rowGap:L["4xl"]},"5xl":{rowGap:L["5xl"]}}),Pi=H({none:{columnGap:L.none},xs:{columnGap:L.xs},s:{columnGap:L.s},m:{columnGap:L.m},l:{columnGap:L.l},xl:{columnGap:L.xl},"2xl":{columnGap:L["2xl"]},"3xl":{columnGap:L["3xl"]},"4xl":{columnGap:L["4xl"]},"5xl":{columnGap:L["5xl"]}}),ki=H({"background-primary":{backgroundColor:lt["background-primary"]},"background-secondary":{backgroundColor:lt["background-secondary"]},"background-card":{backgroundColor:lt["background-card"]},"background-inverse":{backgroundColor:lt["background-inverse"]},"background-brand":{backgroundColor:lt["background-brand"]},"background-accent":{backgroundColor:lt["background-accent"]},"background-warning":{backgroundColor:lt["background-warning"]},"background-success":{backgroundColor:lt["background-success"]},"background-danger":{backgroundColor:lt["background-danger"]}}),Ti=H({"text-primary":{color:Me["text-primary"]},"text-secondary":{color:Me["text-secondary"]},"text-tertiary":{color:Me["text-tertiary"]},"text-success":{color:Me["text-success"]},"text-danger":{color:Me["text-danger"]},"text-warning":{color:Me["text-warning"]}}),Ai=H({"border-primary":{borderColor:Za["border-primary"]},"border-secondary":{borderColor:Za["border-secondary"]},"border-warning":{borderColor:Za["border-warning"]}}),Mi=H({none:{borderRadius:te.none},s:{borderRadius:te.s},m:{borderRadius:te.m},l:{borderRadius:te.l},xl:{borderRadius:te.xl},card:{borderRadius:te.card},full:{borderRadius:te.full}}),Di=H({none:{borderTopLeftRadius:te.none},s:{borderTopLeftRadius:te.s},m:{borderTopLeftRadius:te.m},l:{borderTopLeftRadius:te.l},xl:{borderTopLeftRadius:te.xl},card:{borderTopLeftRadius:te.card},full:{borderTopLeftRadius:te.full}}),Fi=H({none:{borderTopRightRadius:te.none},s:{borderTopRightRadius:te.s},m:{borderTopRightRadius:te.m},l:{borderTopRightRadius:te.l},xl:{borderTopRightRadius:te.xl},card:{borderTopRightRadius:te.card},full:{borderTopRightRadius:te.full}}),Ei=H({none:{borderBottomLeftRadius:te.none},s:{borderBottomLeftRadius:te.s},m:{borderBottomLeftRadius:te.m},l:{borderBottomLeftRadius:te.l},xl:{borderBottomLeftRadius:te.xl},card:{borderBottomLeftRadius:te.card},full:{borderBottomLeftRadius:te.full}}),Bi=H({none:{borderBottomRightRadius:te.none},s:{borderBottomRightRadius:te.s},m:{borderBottomRightRadius:te.m},l:{borderBottomRightRadius:te.l},xl:{borderBottomRightRadius:te.xl},card:{borderBottomRightRadius:te.card},full:{borderBottomRightRadius:te.full}}),Oi=H({none:{boxShadow:Kt.none},s:{boxShadow:Kt.s},m:{boxShadow:Kt.m},l:{boxShadow:Kt.l},xl:{boxShadow:Kt.xl}}),_i=H({flex:{display:"flex"},grid:{display:"grid"},block:{display:"block"},inline:{display:"inline"},"inline-flex":{display:"inline-flex"},"inline-grid":{display:"inline-grid"},"inline-block":{display:"inline-block"},none:{display:"none"},contents:{display:"contents"}}),Ni=H({hidden:{overflow:"hidden"},auto:{overflow:"auto"},scroll:{overflow:"scroll"},visible:{overflow:"visible"}}),Ui=H({hidden:{overflowX:"hidden"},auto:{overflowX:"auto"},scroll:{overflowX:"scroll"},visible:{overflowX:"visible"}}),Hi=H({hidden:{overflowY:"hidden"},auto:{overflowY:"auto"},scroll:{overflowY:"scroll"},visible:{overflowY:"visible"}}),qi=H({row:{flexDirection:"row"},column:{flexDirection:"column"},"row-reverse":{flexDirection:"row-reverse"},"column-reverse":{flexDirection:"column-reverse"}}),Vi=H({wrap:{flexWrap:"wrap"},nowrap:{flexWrap:"nowrap"},"wrap-reverse":{flexWrap:"wrap-reverse"}}),Gi=H({start:{alignItems:"flex-start"},end:{alignItems:"flex-end"},center:{alignItems:"center"},baseline:{alignItems:"baseline"},stretch:{alignItems:"stretch"}}),Wi=H({start:{alignSelf:"flex-start"},end:{alignSelf:"flex-end"},center:{alignSelf:"center"},baseline:{alignSelf:"baseline"},stretch:{alignSelf:"stretch"},auto:{alignSelf:"auto"}}),zi=H({start:{justifyContent:"flex-start"},end:{justifyContent:"flex-end"},center:{justifyContent:"center"},between:{justifyContent:"space-between"},around:{justifyContent:"space-around"},evenly:{justifyContent:"space-evenly"}}),$i=H({start:{alignContent:"flex-start"},end:{alignContent:"flex-end"},center:{alignContent:"center"},between:{alignContent:"space-between"},around:{alignContent:"space-around"},evenly:{alignContent:"space-evenly"},stretch:{alignContent:"stretch"}}),Xi=H({row:{gridAutoFlow:"row"},column:{gridAutoFlow:"column"},dense:{gridAutoFlow:"dense"},"row-dense":{gridAutoFlow:"row dense"},"column-dense":{gridAutoFlow:"column dense"}}),ji=H({relative:{position:"relative"},absolute:{position:"absolute"},fixed:{position:"fixed"},sticky:{position:"sticky"},static:{position:"static"}}),Ki=H({solid:{borderStyle:"solid"},dashed:{borderStyle:"dashed"},dotted:{borderStyle:"dotted"},none:{borderStyle:"none"}}),Zi=H({pointer:{cursor:"pointer"},default:{cursor:"default"},"not-allowed":{cursor:"not-allowed"},grab:{cursor:"grab"},grabbing:{cursor:"grabbing"},text:{cursor:"text"},move:{cursor:"move"},wait:{cursor:"wait"}}),Yi=H({none:{pointerEvents:"none"},auto:{pointerEvents:"auto"}}),Qi=H({visible:{visibility:"visible"},hidden:{visibility:"hidden"}}),Ji=H({none:{userSelect:"none"},text:{userSelect:"text"},all:{userSelect:"all"},auto:{userSelect:"auto"}}),eu=H({none:{transitionProperty:Bt.none},all:{transitionProperty:Bt.all},common:{transitionProperty:Bt.common},colors:{transitionProperty:Bt.colors},opacity:{transitionProperty:Bt.opacity},shadow:{transitionProperty:Bt.shadow},transform:{transitionProperty:Bt.transform}}),tu=H({instant:{transitionDuration:rt.instant},fast:{transitionDuration:rt.fast},base:{transitionDuration:rt.base},slow:{transitionDuration:rt.slow},slower:{transitionDuration:rt.slower}}),au=H({standard:{transitionTimingFunction:ya.standard},decelerate:{transitionTimingFunction:ya.decelerate},accelerate:{transitionTimingFunction:ya.accelerate},spring:{transitionTimingFunction:ya.spring}}),ou=H({instant:{transitionDelay:rt.instant},fast:{transitionDelay:rt.fast},base:{transitionDelay:rt.base},slow:{transitionDelay:rt.slow},slower:{transitionDelay:rt.slower}});var ir=H({left:{textAlign:"left"},center:{textAlign:"center"},right:{textAlign:"right"},justify:{textAlign:"justify"}}),ru=H({wrap:{textWrap:"wrap"},nowrap:{textWrap:"nowrap"},balance:{textWrap:"balance"},pretty:{textWrap:"pretty"}}),So=H({monospace:{fontFamily:qe.mono},tabularNums:{fontVariantNumeric:"tabular-nums"},lineThrough:{textDecoration:"line-through"},truncate:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}});var zn={hover:":hover",focus:":focus",active:":active",focusVisible:":focus-visible",focusWithin:":focus-within"};function nu(e){return e in zn}function su(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Ug(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}var lu=["padding","margin","gap","padding-inline","margin-inline","padding-block","margin-block","row-gap","column-gap","padding-top","padding-right","padding-bottom","padding-left","margin-top","margin-right","margin-bottom","margin-left","border-width","border-style","border-color","border-radius","border-top-left-radius","border-top-right-radius","border-bottom-left-radius","border-bottom-right-radius","border-top-width","border-right-width","border-bottom-width","border-left-width","overflow","overflow-x","overflow-y","flex","flex-direction","flex-wrap","flex-grow","flex-shrink","flex-basis","inset","top","right","bottom","left"];function dr(e){return e.includes("-")?e:Ug(e)}function iu(e){return Object.entries(e).sort(([t],[a])=>{let o=dr(t),r=dr(a),n=lu.indexOf(o),s=lu.indexOf(r),l=n===-1?1e4:n,u=s===-1?1e4:s;return l!==u?l-u:o.localeCompare(r)})}function Ya(e){return e===0?"0":`${e}px`}function it(e){return typeof e=="number"?Ya(e):e}function It(e){return L[e]}function La(e){return e==="auto"?"auto":L[e]}function Hg(e){return lt[e]}function qg(e){return Me[e]}function Vg(e){return Za[e]}function vo(e){return te[e]}function Gg(e){return Kt[e]}function uu(e){return rt[e]}function Wg(e){return ya[e]}function zg(e){return Bt[e]}var $g={start:"flex-start",end:"flex-end",between:"space-between",around:"space-around",evenly:"space-evenly"};function ur(e){return $g[e]??e}var Xg={padding:!0,paddingTop:!0,paddingRight:!0,paddingBottom:!0,paddingLeft:!0,paddingHorizontal:!0,paddingVertical:!0,p:!0,pt:!0,pr:!0,pb:!0,pl:!0,px:!0,py:!0,margin:!0,marginTop:!0,marginRight:!0,marginBottom:!0,marginLeft:!0,marginHorizontal:!0,marginVertical:!0,m:!0,mt:!0,mr:!0,mb:!0,ml:!0,mx:!0,my:!0,gap:!0,rowGap:!0,columnGap:!0,g:!0,backgroundColor:!0,color:!0,borderColor:!0,borderRadius:!0,borderTopLeftRadius:!0,borderTopRightRadius:!0,borderBottomLeftRadius:!0,borderBottomRightRadius:!0,borderWidth:!0,borderTopWidth:!0,borderRightWidth:!0,borderBottomWidth:!0,borderLeftWidth:!0,borderStyle:!0,boxShadow:!0,display:!0,overflow:!0,overflowX:!0,overflowY:!0,width:!0,height:!0,minWidth:!0,maxWidth:!0,minHeight:!0,maxHeight:!0,aspectRatio:!0,flex:!0,flexDirection:!0,flexWrap:!0,flexGrow:!0,flexShrink:!0,flexBasis:!0,alignItems:!0,alignSelf:!0,justifyContent:!0,alignContent:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridColumn:!0,gridRow:!0,gridArea:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridAutoRows:!0,position:!0,top:!0,right:!0,bottom:!0,left:!0,inset:!0,zIndex:!0,transitionProperty:!0,transitionDuration:!0,transitionTimingFunction:!0,ease:!0,transitionDelay:!0,transform:!0,transformOrigin:!0,willChange:!0,opacity:!0,cursor:!0,pointerEvents:!0,visibility:!0,userSelect:!0,textAlign:!0},du=new Set(Object.keys(Xg));function cu(e,t){let a=[],o={},r={},n={};function s(i,c,m,h){if(m!==void 0)if(su(m)){for(let[d,p]of Object.entries(m))if(p!==void 0)if(d==="base"){let x=i[p];x&&a.push(x)}else if(nu(d)){let x=zn[d];n[x]||(n[x]={}),n[x][c]=h(p)}else{let x=Wn[d];x!==void 0&&(r[x]||(r[x]={}),r[x][c]=h(p))}}else{let d=i[m];d&&a.push(d)}}function l(i,c,m){if(c!==void 0)if(su(c))for(let[h,d]of Object.entries(c)){if(d===void 0)continue;let p=m(d);if(h==="base")r[0]||(r[0]={}),r[0][i]=p;else if(nu(h)){let x=zn[h];n[x]||(n[x]={}),n[x][i]=p}else{let x=Wn[h];x!==void 0&&(r[x]||(r[x]={}),r[x][i]=p)}}else o[i]=m(c)}s(ci,"padding",e.padding??e.p,It),s(fi,"padding-top",e.paddingTop??e.pt,It),s(pi,"padding-right",e.paddingRight??e.pr,It),s(mi,"padding-bottom",e.paddingBottom??e.pb,It),s(gi,"padding-left",e.paddingLeft??e.pl,It),s(xi,"padding-inline",e.paddingHorizontal??e.px,It),s(hi,"padding-block",e.paddingVertical??e.py,It),s(yi,"margin",e.margin??e.m,La),s(Ci,"margin-top",e.marginTop??e.mt,La),s(Li,"margin-right",e.marginRight??e.mr,La),s(bi,"margin-bottom",e.marginBottom??e.mb,La),s(Si,"margin-left",e.marginLeft??e.ml,La),s(vi,"margin-inline",e.marginHorizontal??e.mx,La),s(Ii,"margin-block",e.marginVertical??e.my,La),s(wi,"gap",e.gap??e.g,It),s(Ri,"row-gap",e.rowGap,It),s(Pi,"column-gap",e.columnGap,It),s(ki,"background-color",e.backgroundColor,Hg),s(Ti,"color",e.color,qg),s(Ai,"border-color",e.borderColor,Vg),s(Mi,"border-radius",e.borderRadius,vo),s(Di,"border-top-left-radius",e.borderTopLeftRadius,vo),s(Fi,"border-top-right-radius",e.borderTopRightRadius,vo),s(Ei,"border-bottom-left-radius",e.borderBottomLeftRadius,vo),s(Bi,"border-bottom-right-radius",e.borderBottomRightRadius,vo),l("borderWidth",e.borderWidth,Ya),l("borderTopWidth",e.borderTopWidth,Ya),l("borderRightWidth",e.borderRightWidth,Ya),l("borderBottomWidth",e.borderBottomWidth,Ya),l("borderLeftWidth",e.borderLeftWidth,Ya),s(Ki,"border-style",e.borderStyle,i=>i),s(Oi,"box-shadow",e.boxShadow,Gg),s(_i,"display",e.display,i=>i),s(Ni,"overflow",e.overflow,i=>i),s(Ui,"overflow-x",e.overflowX,i=>i),s(Hi,"overflow-y",e.overflowY,i=>i),l("width",e.width,it),l("height",e.height,it),l("minWidth",e.minWidth,it),l("maxWidth",e.maxWidth,it),l("minHeight",e.minHeight,it),l("maxHeight",e.maxHeight,it),l("aspectRatio",e.aspectRatio,i=>i),l("flex",e.flex,i=>typeof i=="number"?`${i} ${i} 0%`:i),s(qi,"flex-direction",e.flexDirection,i=>i),s(Vi,"flex-wrap",e.flexWrap,i=>i),l("flexGrow",e.flexGrow,i=>i),l("flexShrink",e.flexShrink,i=>i),l("flexBasis",e.flexBasis,it),s(Gi,"align-items",e.alignItems,ur),s(Wi,"align-self",e.alignSelf,ur),s(zi,"justify-content",e.justifyContent,ur),s($i,"align-content",e.alignContent,ur),l("gridTemplateColumns",e.gridTemplateColumns,i=>i),l("gridTemplateRows",e.gridTemplateRows,i=>i),l("gridTemplateAreas",e.gridTemplateAreas,i=>i),l("gridColumn",e.gridColumn,i=>i),l("gridRow",e.gridRow,i=>i),l("gridArea",e.gridArea,i=>i),l("gridColumnStart",e.gridColumnStart,i=>i),l("gridColumnEnd",e.gridColumnEnd,i=>i),l("gridRowStart",e.gridRowStart,i=>i),l("gridRowEnd",e.gridRowEnd,i=>i),s(Xi,"grid-auto-flow",e.gridAutoFlow,i=>i),l("gridAutoColumns",e.gridAutoColumns,i=>i),l("gridAutoRows",e.gridAutoRows,i=>i),s(ji,"position",e.position,i=>i),l("top",e.top,it),l("right",e.right,it),l("bottom",e.bottom,it),l("left",e.left,it),l("inset",e.inset,it),l("zIndex",e.zIndex,i=>i),s(eu,"transition-property",e.transitionProperty,zg),s(tu,"transition-duration",e.transitionDuration,uu),s(au,"transition-timing-function",e.transitionTimingFunction??e.ease,Wg),s(ou,"transition-delay",e.transitionDelay,uu),l("transform",e.transform,i=>i),l("transformOrigin",e.transformOrigin,i=>i),l("willChange",e.willChange,i=>i),l("opacity",e.opacity,i=>i),s(Zi,"cursor",e.cursor,i=>i),s(Yi,"pointer-events",e.pointerEvents,i=>i),s(Qi,"visibility",e.visibility,i=>i),s(Ji,"user-select",e.userSelect,i=>i),s(ir,"text-align",e.textAlign,i=>i);let u=Object.keys(r).map(Number).sort((i,c)=>i-c),f=Object.keys(n),g=null;if(u.length>0||f.length>0){let i=`.${t}:not(#\\#):not(#\\#):not(#\\#):not(#\\#)`,c=[];for(let m of u){let h=iu(r[m]).map(([d,p])=>`${dr(d)}: ${p}`).join("; ");m===0?c.push(`${i} { ${h} }`):c.push(`@media (min-width: ${m}px) { ${i} { ${h} } }`)}for(let m of f){let h=iu(n[m]).map(([d,p])=>`${dr(d)}: ${p}`).join("; ");c.push(`${i}${m} { ${h} }`)}g=c.join(" ")}return{stylexStyles:a,inlineStyle:o,responsiveCSS:g}}import{Fragment as Qg,jsx as fu,jsxs as Jg}from"react/jsx-runtime";var Zg=new Set(["span","label","li"]);function Yg({as:e,className:t,children:a,style:o,...r},n){let l=`ds${Kg().replace(/:/g,"")}`,u=e||"div",f={},g={};for(let[y,C]of Object.entries(r))du.has(y)?f[y]=C:g[y]=C;f.display===void 0&&!Zg.has(e??"div")&&(f.display="flex");let{stylexStyles:i,inlineStyle:c,responsiveCSS:m}=cu(f,l),h=i.length>0?ja(...i):null,d={...h?.style??{},...c,...o},p=Object.keys(d).length>0,x=[h?.className??null,m?l:null,t].filter(Boolean).join(" ")||void 0;return Jg(Qg,{children:[m&&fu("style",{dangerouslySetInnerHTML:{__html:m}}),fu(u,{ref:n,className:x,style:p?d:void 0,...g,children:a})]})}var ba=jg.forwardRef(Yg);function pu(e){var t,a,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(a=pu(e[t]))&&(o&&(o+=" "),o+=a)}else for(a in e)e[a]&&(o&&(o+=" "),o+=a);return o}function mu(){for(var e,t,a=0,o="",r=arguments.length;a<r;a++)(e=arguments[a])&&(t=pu(e))&&(o&&(o+=" "),o+=t);return o}var gu=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,xu=mu,Ot=(e,t)=>a=>{var o;if(t?.variants==null)return xu(e,a?.class,a?.className);let{variants:r,defaultVariants:n}=t,s=Object.keys(r).map(f=>{let g=a?.[f],i=n?.[f];if(g===null)return null;let c=gu(g)||gu(i);return r[f][c]}),l=a&&Object.entries(a).reduce((f,g)=>{let[i,c]=g;return c===void 0||(f[i]=c),f},{}),u=t==null||(o=t.compoundVariants)===null||o===void 0?void 0:o.reduce((f,g)=>{let{class:i,className:c,...m}=g;return Object.entries(m).every(h=>{let[d,p]=h;return Array.isArray(p)?p.includes({...n,...l}[d]):{...n,...l}[d]===p})?[...f,i,c]:f},[]);return xu(e,s,u,a?.class,a?.className)};var ex=(e,t)=>{let a=new Array(e.length+t.length);for(let o=0;o<e.length;o++)a[o]=e[o];for(let o=0;o<t.length;o++)a[e.length+o]=t[o];return a},tx=(e,t)=>({classGroupId:e,validator:t}),Su=(e=new Map,t=null,a)=>({nextPart:e,validators:t,classGroupId:a});var hu=[],ax="arbitrary..",ox=e=>{let t=nx(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return rx(s);let l=s.split("-"),u=l[0]===""&&l.length>1?1:0;return vu(l,u,t)},getConflictingClassGroupIds:(s,l)=>{if(l){let u=o[s],f=a[s];return u?f?ex(f,u):u:f||hu}return a[s]||hu}}},vu=(e,t,a)=>{if(e.length-t===0)return a.classGroupId;let r=e[t],n=a.nextPart.get(r);if(n){let f=vu(e,t+1,n);if(f)return f}let s=a.validators;if(s===null)return;let l=t===0?e.join("-"):e.slice(t).join("-"),u=s.length;for(let f=0;f<u;f++){let g=s[f];if(g.validator(l))return g.classGroupId}},rx=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{let t=e.slice(1,-1),a=t.indexOf(":"),o=t.slice(0,a);return o?ax+o:void 0})(),nx=e=>{let{theme:t,classGroups:a}=e;return sx(a,t)},sx=(e,t)=>{let a=Su();for(let o in e){let r=e[o];Xn(r,a,o,t)}return a},Xn=(e,t,a,o)=>{let r=e.length;for(let n=0;n<r;n++){let s=e[n];lx(s,t,a,o)}},lx=(e,t,a,o)=>{if(typeof e=="string"){ix(e,t,a);return}if(typeof e=="function"){ux(e,t,a,o);return}dx(e,t,a,o)},ix=(e,t,a)=>{let o=e===""?t:Iu(t,e);o.classGroupId=a},ux=(e,t,a,o)=>{if(cx(e)){Xn(e(o),t,a,o);return}t.validators===null&&(t.validators=[]),t.validators.push(tx(a,e))},dx=(e,t,a,o)=>{let r=Object.entries(e),n=r.length;for(let s=0;s<n;s++){let[l,u]=r[s];Xn(u,Iu(t,l),a,o)}},Iu=(e,t)=>{let a=e,o=t.split("-"),r=o.length;for(let n=0;n<r;n++){let s=o[n],l=a.nextPart.get(s);l||(l=Su(),a.nextPart.set(s,l)),a=l}return a},cx=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,fx=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,a=Object.create(null),o=Object.create(null),r=(n,s)=>{a[n]=s,t++,t>e&&(t=0,o=a,a=Object.create(null))};return{get(n){let s=a[n];if(s!==void 0)return s;if((s=o[n])!==void 0)return r(n,s),s},set(n,s){n in a?a[n]=s:r(n,s)}}};var px=[],yu=(e,t,a,o,r)=>({modifiers:e,hasImportantModifier:t,baseClassName:a,maybePostfixModifierPosition:o,isExternal:r}),mx=e=>{let{prefix:t,experimentalParseClassName:a}=e,o=r=>{let n=[],s=0,l=0,u=0,f,g=r.length;for(let d=0;d<g;d++){let p=r[d];if(s===0&&l===0){if(p===":"){n.push(r.slice(u,d)),u=d+1;continue}if(p==="/"){f=d;continue}}p==="["?s++:p==="]"?s--:p==="("?l++:p===")"&&l--}let i=n.length===0?r:r.slice(u),c=i,m=!1;i.endsWith("!")?(c=i.slice(0,-1),m=!0):i.startsWith("!")&&(c=i.slice(1),m=!0);let h=f&&f>u?f-u:void 0;return yu(n,m,c,h)};if(t){let r=t+":",n=o;o=s=>s.startsWith(r)?n(s.slice(r.length)):yu(px,!1,s,void 0,!0)}if(a){let r=o;o=n=>a({className:n,parseClassName:r})}return o},gx=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((a,o)=>{t.set(a,1e6+o)}),a=>{let o=[],r=[];for(let n=0;n<a.length;n++){let s=a[n],l=s[0]==="[",u=t.has(s);l||u?(r.length>0&&(r.sort(),o.push(...r),r=[]),o.push(s)):r.push(s)}return r.length>0&&(r.sort(),o.push(...r)),o}},xx=e=>({cache:fx(e.cacheSize),parseClassName:mx(e),sortModifiers:gx(e),...ox(e)}),hx=/\s+/,yx=(e,t)=>{let{parseClassName:a,getClassGroupId:o,getConflictingClassGroupIds:r,sortModifiers:n}=t,s=[],l=e.trim().split(hx),u="";for(let f=l.length-1;f>=0;f-=1){let g=l[f],{isExternal:i,modifiers:c,hasImportantModifier:m,baseClassName:h,maybePostfixModifierPosition:d}=a(g);if(i){u=g+(u.length>0?" "+u:u);continue}let p=!!d,x=o(p?h.substring(0,d):h);if(!x){if(!p){u=g+(u.length>0?" "+u:u);continue}if(x=o(h),!x){u=g+(u.length>0?" "+u:u);continue}p=!1}let y=c.length===0?"":c.length===1?c[0]:n(c).join(":"),C=m?y+"!":y,v=C+x;if(s.indexOf(v)>-1)continue;s.push(v);let S=r(x,p);for(let w=0;w<S.length;++w){let b=S[w];s.push(C+b)}u=g+(u.length>0?" "+u:u)}return u},Cx=(...e)=>{let t=0,a,o,r="";for(;t<e.length;)(a=e[t++])&&(o=wu(a))&&(r&&(r+=" "),r+=o);return r},wu=e=>{if(typeof e=="string")return e;let t,a="";for(let o=0;o<e.length;o++)e[o]&&(t=wu(e[o]))&&(a&&(a+=" "),a+=t);return a},Lx=(e,...t)=>{let a,o,r,n,s=u=>{let f=t.reduce((g,i)=>i(g),e());return a=xx(f),o=a.cache.get,r=a.cache.set,n=l,l(u)},l=u=>{let f=o(u);if(f)return f;let g=yx(u,a);return r(u,g),g};return n=s,(...u)=>n(Cx(...u))},bx=[],we=e=>{let t=a=>a[e]||bx;return t.isThemeGetter=!0,t},Ru=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Pu=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Sx=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,vx=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ix=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,wx=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Rx=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Px=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Zt=e=>Sx.test(e),ee=e=>!!e&&!Number.isNaN(Number(e)),Yt=e=>!!e&&Number.isInteger(Number(e)),$n=e=>e.endsWith("%")&&ee(e.slice(0,-1)),_t=e=>vx.test(e),ku=()=>!0,kx=e=>Ix.test(e)&&!wx.test(e),jn=()=>!1,Tx=e=>Rx.test(e),Ax=e=>Px.test(e),Mx=e=>!B(e)&&!O(e),Dx=e=>Qt(e,Mu,jn),B=e=>Ru.test(e),Sa=e=>Qt(e,Du,kx),Cu=e=>Qt(e,Hx,ee),Fx=e=>Qt(e,Eu,ku),Ex=e=>Qt(e,Fu,jn),Lu=e=>Qt(e,Tu,jn),Bx=e=>Qt(e,Au,Ax),cr=e=>Qt(e,Bu,Tx),O=e=>Pu.test(e),Io=e=>va(e,Du),Ox=e=>va(e,Fu),bu=e=>va(e,Tu),_x=e=>va(e,Mu),Nx=e=>va(e,Au),fr=e=>va(e,Bu,!0),Ux=e=>va(e,Eu,!0),Qt=(e,t,a)=>{let o=Ru.exec(e);return o?o[1]?t(o[1]):a(o[2]):!1},va=(e,t,a=!1)=>{let o=Pu.exec(e);return o?o[1]?t(o[1]):a:!1},Tu=e=>e==="position"||e==="percentage",Au=e=>e==="image"||e==="url",Mu=e=>e==="length"||e==="size"||e==="bg-size",Du=e=>e==="length",Hx=e=>e==="number",Fu=e=>e==="family-name",Eu=e=>e==="number"||e==="weight",Bu=e=>e==="shadow";var qx=()=>{let e=we("color"),t=we("font"),a=we("text"),o=we("font-weight"),r=we("tracking"),n=we("leading"),s=we("breakpoint"),l=we("container"),u=we("spacing"),f=we("radius"),g=we("shadow"),i=we("inset-shadow"),c=we("text-shadow"),m=we("drop-shadow"),h=we("blur"),d=we("perspective"),p=we("aspect"),x=we("ease"),y=we("animate"),C=()=>["auto","avoid","all","avoid-page","page","left","right","column"],v=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],S=()=>[...v(),O,B],w=()=>["auto","hidden","clip","visible","scroll"],b=()=>["auto","contain","none"],I=()=>[O,B,u],D=()=>[Zt,"full","auto",...I()],F=()=>[Yt,"none","subgrid",O,B],k=()=>["auto",{span:["full",Yt,O,B]},Yt,O,B],T=()=>[Yt,"auto",O,B],q=()=>["auto","min","max","fr",O,B],z=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],j=()=>["start","end","center","stretch","center-safe","end-safe"],E=()=>["auto",...I()],G=()=>[Zt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...I()],N=()=>[Zt,"screen","full","dvw","lvw","svw","min","max","fit",...I()],P=()=>[Zt,"screen","full","lh","dvh","lvh","svh","min","max","fit",...I()],R=()=>[e,O,B],_=()=>[...v(),bu,Lu,{position:[O,B]}],U=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Z=()=>["auto","cover","contain",_x,Dx,{size:[O,B]}],Ce=()=>[$n,Io,Sa],ce=()=>["","none","full",f,O,B],se=()=>["",ee,Io,Sa],V=()=>["solid","dashed","dotted","double"],le=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Q=()=>[ee,$n,bu,Lu],oe=()=>["","none",h,O,B],ne=()=>["none",ee,O,B],ue=()=>["none",ee,O,B],Ee=()=>[ee,O,B],st=()=>[Zt,"full",...I()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[_t],breakpoint:[_t],color:[ku],container:[_t],"drop-shadow":[_t],ease:["in","out","in-out"],font:[Mx],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[_t],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[_t],shadow:[_t],spacing:["px",ee],text:[_t],"text-shadow":[_t],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Zt,B,O,p]}],container:["container"],columns:[{columns:[ee,B,O,l]}],"break-after":[{"break-after":C()}],"break-before":[{"break-before":C()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:S()}],overflow:[{overflow:w()}],"overflow-x":[{"overflow-x":w()}],"overflow-y":[{"overflow-y":w()}],overscroll:[{overscroll:b()}],"overscroll-x":[{"overscroll-x":b()}],"overscroll-y":[{"overscroll-y":b()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:D()}],"inset-x":[{"inset-x":D()}],"inset-y":[{"inset-y":D()}],start:[{"inset-s":D(),start:D()}],end:[{"inset-e":D(),end:D()}],"inset-bs":[{"inset-bs":D()}],"inset-be":[{"inset-be":D()}],top:[{top:D()}],right:[{right:D()}],bottom:[{bottom:D()}],left:[{left:D()}],visibility:["visible","invisible","collapse"],z:[{z:[Yt,"auto",O,B]}],basis:[{basis:[Zt,"full","auto",l,...I()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ee,Zt,"auto","initial","none",B]}],grow:[{grow:["",ee,O,B]}],shrink:[{shrink:["",ee,O,B]}],order:[{order:[Yt,"first","last","none",O,B]}],"grid-cols":[{"grid-cols":F()}],"col-start-end":[{col:k()}],"col-start":[{"col-start":T()}],"col-end":[{"col-end":T()}],"grid-rows":[{"grid-rows":F()}],"row-start-end":[{row:k()}],"row-start":[{"row-start":T()}],"row-end":[{"row-end":T()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":q()}],"auto-rows":[{"auto-rows":q()}],gap:[{gap:I()}],"gap-x":[{"gap-x":I()}],"gap-y":[{"gap-y":I()}],"justify-content":[{justify:[...z(),"normal"]}],"justify-items":[{"justify-items":[...j(),"normal"]}],"justify-self":[{"justify-self":["auto",...j()]}],"align-content":[{content:["normal",...z()]}],"align-items":[{items:[...j(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...j(),{baseline:["","last"]}]}],"place-content":[{"place-content":z()}],"place-items":[{"place-items":[...j(),"baseline"]}],"place-self":[{"place-self":["auto",...j()]}],p:[{p:I()}],px:[{px:I()}],py:[{py:I()}],ps:[{ps:I()}],pe:[{pe:I()}],pbs:[{pbs:I()}],pbe:[{pbe:I()}],pt:[{pt:I()}],pr:[{pr:I()}],pb:[{pb:I()}],pl:[{pl:I()}],m:[{m:E()}],mx:[{mx:E()}],my:[{my:E()}],ms:[{ms:E()}],me:[{me:E()}],mbs:[{mbs:E()}],mbe:[{mbe:E()}],mt:[{mt:E()}],mr:[{mr:E()}],mb:[{mb:E()}],ml:[{ml:E()}],"space-x":[{"space-x":I()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":I()}],"space-y-reverse":["space-y-reverse"],size:[{size:G()}],"inline-size":[{inline:["auto",...N()]}],"min-inline-size":[{"min-inline":["auto",...N()]}],"max-inline-size":[{"max-inline":["none",...N()]}],"block-size":[{block:["auto",...P()]}],"min-block-size":[{"min-block":["auto",...P()]}],"max-block-size":[{"max-block":["none",...P()]}],w:[{w:[l,"screen",...G()]}],"min-w":[{"min-w":[l,"screen","none",...G()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[s]},...G()]}],h:[{h:["screen","lh",...G()]}],"min-h":[{"min-h":["screen","lh","none",...G()]}],"max-h":[{"max-h":["screen","lh",...G()]}],"font-size":[{text:["base",a,Io,Sa]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,Ux,Fx]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",$n,B]}],"font-family":[{font:[Ox,Ex,t]}],"font-features":[{"font-features":[B]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[r,O,B]}],"line-clamp":[{"line-clamp":[ee,"none",O,Cu]}],leading:[{leading:[n,...I()]}],"list-image":[{"list-image":["none",O,B]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",O,B]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:R()}],"text-color":[{text:R()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...V(),"wavy"]}],"text-decoration-thickness":[{decoration:[ee,"from-font","auto",O,Sa]}],"text-decoration-color":[{decoration:R()}],"underline-offset":[{"underline-offset":[ee,"auto",O,B]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:I()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",O,B]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",O,B]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:_()}],"bg-repeat":[{bg:U()}],"bg-size":[{bg:Z()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Yt,O,B],radial:["",O,B],conic:[Yt,O,B]},Nx,Bx]}],"bg-color":[{bg:R()}],"gradient-from-pos":[{from:Ce()}],"gradient-via-pos":[{via:Ce()}],"gradient-to-pos":[{to:Ce()}],"gradient-from":[{from:R()}],"gradient-via":[{via:R()}],"gradient-to":[{to:R()}],rounded:[{rounded:ce()}],"rounded-s":[{"rounded-s":ce()}],"rounded-e":[{"rounded-e":ce()}],"rounded-t":[{"rounded-t":ce()}],"rounded-r":[{"rounded-r":ce()}],"rounded-b":[{"rounded-b":ce()}],"rounded-l":[{"rounded-l":ce()}],"rounded-ss":[{"rounded-ss":ce()}],"rounded-se":[{"rounded-se":ce()}],"rounded-ee":[{"rounded-ee":ce()}],"rounded-es":[{"rounded-es":ce()}],"rounded-tl":[{"rounded-tl":ce()}],"rounded-tr":[{"rounded-tr":ce()}],"rounded-br":[{"rounded-br":ce()}],"rounded-bl":[{"rounded-bl":ce()}],"border-w":[{border:se()}],"border-w-x":[{"border-x":se()}],"border-w-y":[{"border-y":se()}],"border-w-s":[{"border-s":se()}],"border-w-e":[{"border-e":se()}],"border-w-bs":[{"border-bs":se()}],"border-w-be":[{"border-be":se()}],"border-w-t":[{"border-t":se()}],"border-w-r":[{"border-r":se()}],"border-w-b":[{"border-b":se()}],"border-w-l":[{"border-l":se()}],"divide-x":[{"divide-x":se()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":se()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...V(),"hidden","none"]}],"divide-style":[{divide:[...V(),"hidden","none"]}],"border-color":[{border:R()}],"border-color-x":[{"border-x":R()}],"border-color-y":[{"border-y":R()}],"border-color-s":[{"border-s":R()}],"border-color-e":[{"border-e":R()}],"border-color-bs":[{"border-bs":R()}],"border-color-be":[{"border-be":R()}],"border-color-t":[{"border-t":R()}],"border-color-r":[{"border-r":R()}],"border-color-b":[{"border-b":R()}],"border-color-l":[{"border-l":R()}],"divide-color":[{divide:R()}],"outline-style":[{outline:[...V(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ee,O,B]}],"outline-w":[{outline:["",ee,Io,Sa]}],"outline-color":[{outline:R()}],shadow:[{shadow:["","none",g,fr,cr]}],"shadow-color":[{shadow:R()}],"inset-shadow":[{"inset-shadow":["none",i,fr,cr]}],"inset-shadow-color":[{"inset-shadow":R()}],"ring-w":[{ring:se()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:R()}],"ring-offset-w":[{"ring-offset":[ee,Sa]}],"ring-offset-color":[{"ring-offset":R()}],"inset-ring-w":[{"inset-ring":se()}],"inset-ring-color":[{"inset-ring":R()}],"text-shadow":[{"text-shadow":["none",c,fr,cr]}],"text-shadow-color":[{"text-shadow":R()}],opacity:[{opacity:[ee,O,B]}],"mix-blend":[{"mix-blend":[...le(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":le()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ee]}],"mask-image-linear-from-pos":[{"mask-linear-from":Q()}],"mask-image-linear-to-pos":[{"mask-linear-to":Q()}],"mask-image-linear-from-color":[{"mask-linear-from":R()}],"mask-image-linear-to-color":[{"mask-linear-to":R()}],"mask-image-t-from-pos":[{"mask-t-from":Q()}],"mask-image-t-to-pos":[{"mask-t-to":Q()}],"mask-image-t-from-color":[{"mask-t-from":R()}],"mask-image-t-to-color":[{"mask-t-to":R()}],"mask-image-r-from-pos":[{"mask-r-from":Q()}],"mask-image-r-to-pos":[{"mask-r-to":Q()}],"mask-image-r-from-color":[{"mask-r-from":R()}],"mask-image-r-to-color":[{"mask-r-to":R()}],"mask-image-b-from-pos":[{"mask-b-from":Q()}],"mask-image-b-to-pos":[{"mask-b-to":Q()}],"mask-image-b-from-color":[{"mask-b-from":R()}],"mask-image-b-to-color":[{"mask-b-to":R()}],"mask-image-l-from-pos":[{"mask-l-from":Q()}],"mask-image-l-to-pos":[{"mask-l-to":Q()}],"mask-image-l-from-color":[{"mask-l-from":R()}],"mask-image-l-to-color":[{"mask-l-to":R()}],"mask-image-x-from-pos":[{"mask-x-from":Q()}],"mask-image-x-to-pos":[{"mask-x-to":Q()}],"mask-image-x-from-color":[{"mask-x-from":R()}],"mask-image-x-to-color":[{"mask-x-to":R()}],"mask-image-y-from-pos":[{"mask-y-from":Q()}],"mask-image-y-to-pos":[{"mask-y-to":Q()}],"mask-image-y-from-color":[{"mask-y-from":R()}],"mask-image-y-to-color":[{"mask-y-to":R()}],"mask-image-radial":[{"mask-radial":[O,B]}],"mask-image-radial-from-pos":[{"mask-radial-from":Q()}],"mask-image-radial-to-pos":[{"mask-radial-to":Q()}],"mask-image-radial-from-color":[{"mask-radial-from":R()}],"mask-image-radial-to-color":[{"mask-radial-to":R()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":v()}],"mask-image-conic-pos":[{"mask-conic":[ee]}],"mask-image-conic-from-pos":[{"mask-conic-from":Q()}],"mask-image-conic-to-pos":[{"mask-conic-to":Q()}],"mask-image-conic-from-color":[{"mask-conic-from":R()}],"mask-image-conic-to-color":[{"mask-conic-to":R()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:_()}],"mask-repeat":[{mask:U()}],"mask-size":[{mask:Z()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",O,B]}],filter:[{filter:["","none",O,B]}],blur:[{blur:oe()}],brightness:[{brightness:[ee,O,B]}],contrast:[{contrast:[ee,O,B]}],"drop-shadow":[{"drop-shadow":["","none",m,fr,cr]}],"drop-shadow-color":[{"drop-shadow":R()}],grayscale:[{grayscale:["",ee,O,B]}],"hue-rotate":[{"hue-rotate":[ee,O,B]}],invert:[{invert:["",ee,O,B]}],saturate:[{saturate:[ee,O,B]}],sepia:[{sepia:["",ee,O,B]}],"backdrop-filter":[{"backdrop-filter":["","none",O,B]}],"backdrop-blur":[{"backdrop-blur":oe()}],"backdrop-brightness":[{"backdrop-brightness":[ee,O,B]}],"backdrop-contrast":[{"backdrop-contrast":[ee,O,B]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ee,O,B]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ee,O,B]}],"backdrop-invert":[{"backdrop-invert":["",ee,O,B]}],"backdrop-opacity":[{"backdrop-opacity":[ee,O,B]}],"backdrop-saturate":[{"backdrop-saturate":[ee,O,B]}],"backdrop-sepia":[{"backdrop-sepia":["",ee,O,B]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":I()}],"border-spacing-x":[{"border-spacing-x":I()}],"border-spacing-y":[{"border-spacing-y":I()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",O,B]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ee,"initial",O,B]}],ease:[{ease:["linear","initial",x,O,B]}],delay:[{delay:[ee,O,B]}],animate:[{animate:["none",y,O,B]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[d,O,B]}],"perspective-origin":[{"perspective-origin":S()}],rotate:[{rotate:ne()}],"rotate-x":[{"rotate-x":ne()}],"rotate-y":[{"rotate-y":ne()}],"rotate-z":[{"rotate-z":ne()}],scale:[{scale:ue()}],"scale-x":[{"scale-x":ue()}],"scale-y":[{"scale-y":ue()}],"scale-z":[{"scale-z":ue()}],"scale-3d":["scale-3d"],skew:[{skew:Ee()}],"skew-x":[{"skew-x":Ee()}],"skew-y":[{"skew-y":Ee()}],transform:[{transform:[O,B,"","none","gpu","cpu"]}],"transform-origin":[{origin:S()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:st()}],"translate-x":[{"translate-x":st()}],"translate-y":[{"translate-y":st()}],"translate-z":[{"translate-z":st()}],"translate-none":["translate-none"],accent:[{accent:R()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:R()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",O,B]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":I()}],"scroll-mx":[{"scroll-mx":I()}],"scroll-my":[{"scroll-my":I()}],"scroll-ms":[{"scroll-ms":I()}],"scroll-me":[{"scroll-me":I()}],"scroll-mbs":[{"scroll-mbs":I()}],"scroll-mbe":[{"scroll-mbe":I()}],"scroll-mt":[{"scroll-mt":I()}],"scroll-mr":[{"scroll-mr":I()}],"scroll-mb":[{"scroll-mb":I()}],"scroll-ml":[{"scroll-ml":I()}],"scroll-p":[{"scroll-p":I()}],"scroll-px":[{"scroll-px":I()}],"scroll-py":[{"scroll-py":I()}],"scroll-ps":[{"scroll-ps":I()}],"scroll-pe":[{"scroll-pe":I()}],"scroll-pbs":[{"scroll-pbs":I()}],"scroll-pbe":[{"scroll-pbe":I()}],"scroll-pt":[{"scroll-pt":I()}],"scroll-pr":[{"scroll-pr":I()}],"scroll-pb":[{"scroll-pb":I()}],"scroll-pl":[{"scroll-pl":I()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",O,B]}],fill:[{fill:["none",...R()]}],"stroke-w":[{stroke:[ee,Io,Sa,Cu]}],stroke:[{stroke:["none",...R()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}};var de=Lx(qx);import*as Se from"react";import*as _u from"react";function Ou(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function wo(...e){return t=>{let a=!1,o=e.map(r=>{let n=Ou(r,t);return!a&&typeof n=="function"&&(a=!0),n});if(a)return()=>{for(let r=0;r<o.length;r++){let n=o[r];typeof n=="function"?n():Ou(e[r],null)}}}}function J(...e){return _u.useCallback(wo(...e),e)}import{Fragment as YI,jsx as Nu}from"react/jsx-runtime";var Vx=Symbol.for("react.lazy"),pr=Se[" use ".trim().toString()];function Gx(e){return typeof e=="object"&&e!==null&&"then"in e}function Uu(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Vx&&"_payload"in e&&Gx(e._payload)}function Kn(e){let t=Wx(e),a=Se.forwardRef((o,r)=>{let{children:n,...s}=o;Uu(n)&&typeof pr=="function"&&(n=pr(n._payload));let l=Se.Children.toArray(n),u=l.find($x);if(u){let f=u.props.children,g=l.map(i=>i===u?Se.Children.count(f)>1?Se.Children.only(null):Se.isValidElement(f)?f.props.children:null:i);return Nu(t,{...s,ref:r,children:Se.isValidElement(f)?Se.cloneElement(f,void 0,g):null})}return Nu(t,{...s,ref:r,children:n})});return a.displayName=`${e}.Slot`,a}var mr=Kn("Slot");function Wx(e){let t=Se.forwardRef((a,o)=>{let{children:r,...n}=a;if(Uu(r)&&typeof pr=="function"&&(r=pr(r._payload)),Se.isValidElement(r)){let s=jx(r),l=Xx(n,r.props);return r.type!==Se.Fragment&&(l.ref=o?wo(o,s):s),Se.cloneElement(r,l)}return Se.Children.count(r)>1?Se.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var zx=Symbol("radix.slottable");function $x(e){return Se.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===zx}function Xx(e,t){let a={...t};for(let o in t){let r=e[o],n=t[o];/^on[A-Z]/.test(o)?r&&n?a[o]=(...l)=>{let u=n(...l);return r(...l),u}:r&&(a[o]=r):o==="style"?a[o]={...r,...n}:o==="className"&&(a[o]=[r,n].filter(Boolean).join(" "))}return{...e,...a}}function jx(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,a=t&&"isReactWarning"in t&&t.isReactWarning;return a?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,a=t&&"isReactWarning"in t&&t.isReactWarning,a?e.props.ref:e.props.ref||e.ref)}function re(...e){return de(e)}import{jsx as Zx}from"react/jsx-runtime";var Kx=Ot("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4! [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Ro=({ref:e,className:t,variant:a,size:o,asChild:r=!1,...n})=>Zx(r?mr:"button",{className:re(Kx({variant:a,size:o,className:t})),ref:e,...n});Ro.displayName="Button";import{Fragment as Vu,jsx as wt,jsxs as Qx}from"react/jsx-runtime";var Hu=Ot("relative inline-flex items-center cursor-pointer font-display font-medium select-none justify-center rounded-xl text-sm ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 whitespace-nowrap",{variants:{variant:{default:"bg-blue-500 text-white hover:bg-blue-700 dark:bg-blue-500 dark:text-white dark:hover:bg-blue-700 transition-colors duration-100",destructive:"bg-red-500 dark:bg-red-600 text-white hover:bg-red-400 dark:hover:bg-red-500",outline:"text-black dark:text-white hover:bg-gray-200 dark:bg-transparent dark:hover:bg-gray-700 border-transparent hover:border-gray-200 border dark:border-gray-700 bg-transparent border-gray-100",secondary:"text-black dark:text-white hover:bg-gray-200 dark:bg-gray-700 dark:hover:bg-gray-600 bg-gray-100 border dark:border-white/5 border-black/4",underline:"text-black dark:text-white bg-transparent border-b hover:border-black dark:hover:border-white border-transparent transition-colors duration-300 p-0! hover:bg-transparent rounded-none!",link:"text-blue-400 underline-offset-4 hover:underline bg-transparent hover:bg-transparent",ghost:"bg-transparent hover:bg-gray-200 dark:hover:bg-gray-700 dark:bg-transparent text-black dark:text-white"},size:{default:"h-10 px-5 py-3 text-sm",sm:"h-8 px-3 py-1.5 text-xs",lg:"h-12 px-5 py-4 text-sm",icon:"flex items-center justify-center h-8 w-8 p-2 text-sm"}},defaultVariants:{variant:"default",size:"default"}}),nt=({ref:e,className:t,wrapperClassNames:a,variant:o,size:r,loading:n,fullWidth:s,disabled:l,children:u,type:f="button",...g})=>wt(Ro,{className:de(Hu({variant:o,size:r,className:t}),s?"w-full":""),ref:e,disabled:l||n,type:f,...g,children:n?Qx(Vu,{children:[wt("div",{className:"absolute inset-0 flex h-full w-full items-center justify-center",children:wt(Yx,{disabled:l,size:r})}),wt("span",{className:"flex flex-row items-center opacity-0",children:u})]}):wt("div",{className:de("flex flex-row items-center",a),children:u})});nt.displayName=Ro.displayName;var Yx=e=>{let t=de(e.disabled?"opacity-40":"",e.size==="lg"?"h-4 w-4":"h-2 w-2","animate-spin");return wt(Vu,{children:wt("div",{role:"status",children:wt("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",className:t,children:wt("path",{d:"M12,4a8,8,0,0,1,7.89,6.7A1.53,1.53,0,0,0,21.38,12h0a1.5,1.5,0,0,0,1.48-1.75,11,11,0,0,0-21.72,0A1.5,1.5,0,0,0,2.62,12h0a1.53,1.53,0,0,0,1.49-1.3A8,8,0,0,1,12,4Z",className:"fill-current"})})})})},qu=({ref:e,className:t,variant:a,size:o,children:r,...n})=>wt(Ro,{className:de(Hu({variant:a,size:o,className:t})),ref:e,...n,children:r});qu.displayName="RawButton";import{jsx as gw}from"react/jsx-runtime";import*as Gu from"react";import{jsx as Jx}from"react/jsx-runtime";var Zn=Gu.forwardRef(function({templateColumns:t,templateRows:a,templateAreas:o,autoFlow:r,autoRows:n,autoColumns:s,column:l,row:u,inline:f,...g},i){return Jx(ba,{ref:i,display:f?"inline-grid":"grid",gridTemplateColumns:t,gridTemplateRows:a,gridTemplateAreas:o,gridAutoFlow:r,gridAutoRows:n,gridAutoColumns:s,gridColumn:l,gridRow:u,...g})});Zn.displayName="Grid";import*as $u from"react";import{jsx as eh}from"react/jsx-runtime";function Wu(e){return e==="auto"?"auto":`span ${e} / span ${e}`}function zu(e,t){if(e!==void 0){if(typeof e=="object"&&e!==null&&!Array.isArray(e)){let a={};for(let[o,r]of Object.entries(e))r!==void 0&&(a[o]=t(r));return a}return t(e)}}var Yn=$u.forwardRef(function({area:t,colSpan:a,colStart:o,colEnd:r,rowSpan:n,rowStart:s,rowEnd:l,...u},f){return eh(ba,{ref:f,gridArea:t,gridColumn:zu(a,Wu),gridColumnStart:o,gridColumnEnd:r,gridRow:zu(n,Wu),gridRowStart:s,gridRowEnd:l,...u})});Yn.displayName="GridItem";import{Fragment as uh,jsx as Po,jsxs as dh}from"react/jsx-runtime";var th={default:"p",title:"p",body:"p",label:"p",caption:"p","heading-2xl":"h1","heading-xl":"h2","heading-l":"h3","heading-m":"h4","heading-s":"h5","heading-xs":"h6","heading-xxs":"h6"},ah={body:"pretty","heading-2xl":"balance","heading-xl":"balance","heading-l":"balance"},oh=new Intl.NumberFormat("en-US"),rh=new Intl.NumberFormat("en-US",{notation:"compact"});function nh(e,t){if(typeof e=="function")return e(t);let a=typeof t=="number"?t:Number(t);return Number.isNaN(a)?String(t):e==="compact"?rh.format(a):oh.format(a)}var sh="'ss07' 1, 'ss08' 1, 'zero' 1, 'liga' 0",Xu="dark:bg-gray-700 animate-pulse rounded-sm bg-gray-100",lh=e=>Array.from({length:e},(t,a)=>Po("span",{"aria-hidden":!0,style:{display:"flex",alignItems:"center",height:"1lh"},children:Po("span",{className:Xu,style:{display:"block",height:"1em",width:a===e-1?"60%":"100%"}})},a)),ih=e=>dh(uh,{children:[Po("span",{style:{visibility:"hidden"},children:e}),Po("span",{"aria-hidden":!0,className:Xu,style:{position:"absolute",inset:0}})]});function ju({as:e,variant:t,color:a,align:o,wrap:r,children:n,style:s,loading:l,placeholderText:u,placeholderNumberOfLines:f,lineThrough:g,monospace:i,tabularNums:c,truncate:m,formatter:h,...d}){let p=t??"default",x=e??th[p],y=p.startsWith("heading-"),C=r??(m?void 0:ah[p]),v=h!==void 0&&(typeof n=="string"||typeof n=="number")?nh(h,n):n,S;if(l){let I=f??1;I>1?(v=lh(I),S=void 0):(v=ih(u??n??"Loading..."),S={position:"relative",display:"inline-block"})}let w=ja(ui[p],di[a??"default"],o&&ir[o],C&&ru[C],i&&So.monospace,c&&So.tabularNums,g&&So.lineThrough,m===!0&&So.truncate),b={...w.style,...y&&{fontFeatureSettings:sh},...typeof m=="number"?{display:"-webkit-box",WebkitLineClamp:m,WebkitBoxOrient:"vertical",overflow:"hidden"}:{},...s,...S};return Po(x,{className:w.className,style:b,...d,children:v})}ju.displayName="Text";function Qn(){return ju}var Jn=Qn();import{jsx as Bw,jsxs as Ow}from"react/jsx-runtime";import{useCallback as Hw,useState as qw}from"react";import{Fragment as Ww,jsx as Gw,jsxs as zw}from"react/jsx-runtime";import{createElement as $w}from"react";import*as $e from"react";import*as Nt from"react";import{jsx as fh}from"react/jsx-runtime";function ve(e,t=[]){let a=[];function o(n,s){let l=Nt.createContext(s),u=a.length;a=[...a,s];let f=i=>{let{scope:c,children:m,...h}=i,d=c?.[e]?.[u]||l,p=Nt.useMemo(()=>h,Object.values(h));return fh(d.Provider,{value:p,children:m})};f.displayName=n+"Provider";function g(i,c){let m=c?.[e]?.[u]||l,h=Nt.useContext(m);if(h)return h;if(s!==void 0)return s;throw new Error(`\`${i}\` must be used within \`${n}\``)}return[f,g]}let r=()=>{let n=a.map(s=>Nt.createContext(s));return function(l){let u=l?.[e]||n;return Nt.useMemo(()=>({[`__scope${e}`]:{...l,[e]:u}}),[l,u])}};return r.scopeName=e,[o,ph(r,...t)]}function ph(...e){let t=e[0];if(e.length===1)return t;let a=()=>{let o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(n){let s=o.reduce((l,{useScope:u,scopeName:f})=>{let i=u(n)[`__scope${f}`];return{...l,...i}},{});return Nt.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return a.scopeName=t.scopeName,a}var Yw=!!(typeof window<"u"&&window.document&&window.document.createElement);function $(e,t,{checkForDefaultPrevented:a=!0}={}){return function(r){if(e?.(r),a===!1||!r.defaultPrevented)return t?.(r)}}import*as ut from"react";import*as Ku from"react";var me=globalThis?.document?Ku.useLayoutEffect:()=>{};import*as gr from"react";var mh=ut[" useInsertionEffect ".trim().toString()]||me;function Ve({prop:e,defaultProp:t,onChange:a=()=>{},caller:o}){let[r,n,s]=gh({defaultProp:t,onChange:a}),l=e!==void 0,u=l?e:r;{let g=ut.useRef(e!==void 0);ut.useEffect(()=>{let i=g.current;i!==l&&console.warn(`${o} is changing from ${i?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),g.current=l},[l,o])}let f=ut.useCallback(g=>{if(l){let i=xh(g)?g(e):g;i!==e&&s.current?.(i)}else n(g)},[l,e,n,s]);return[u,f]}function gh({defaultProp:e,onChange:t}){let[a,o]=ut.useState(e),r=ut.useRef(a),n=ut.useRef(t);return mh(()=>{n.current=t},[t]),ut.useEffect(()=>{r.current!==a&&(n.current?.(a),r.current=a)},[a,r]),[a,o,n]}function xh(e){return typeof e=="function"}import*as xr from"react";function Jt(e){let t=xr.useRef({value:e,previous:e});return xr.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}import*as Zu from"react";function ea(e){let[t,a]=Zu.useState(void 0);return me(()=>{if(e){a({width:e.offsetWidth,height:e.offsetHeight});let o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;let n=r[0],s,l;if("borderBoxSize"in n){let u=n.borderBoxSize,f=Array.isArray(u)?u[0]:u;s=f.inlineSize,l=f.blockSize}else s=e.offsetWidth,l=e.offsetHeight;a({width:s,height:l})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else a(void 0)},[e]),t}import*as Ze from"react";import*as Yu from"react";function hh(e,t){return Yu.useReducer((a,o)=>t[a][o]??a,e)}var Rt=e=>{let{present:t,children:a}=e,o=yh(t),r=typeof a=="function"?a({present:o.isPresent}):Ze.Children.only(a),n=J(o.ref,Ch(r));return typeof a=="function"||o.isPresent?Ze.cloneElement(r,{ref:n}):null};Rt.displayName="Presence";function yh(e){let[t,a]=Ze.useState(),o=Ze.useRef(null),r=Ze.useRef(e),n=Ze.useRef("none"),s=e?"mounted":"unmounted",[l,u]=hh(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return Ze.useEffect(()=>{let f=hr(o.current);n.current=l==="mounted"?f:"none"},[l]),me(()=>{let f=o.current,g=r.current;if(g!==e){let c=n.current,m=hr(f);e?u("MOUNT"):m==="none"||f?.display==="none"?u("UNMOUNT"):u(g&&c!==m?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,u]),me(()=>{if(t){let f,g=t.ownerDocument.defaultView??window,i=m=>{let d=hr(o.current).includes(CSS.escape(m.animationName));if(m.target===t&&d&&(u("ANIMATION_END"),!r.current)){let p=t.style.animationFillMode;t.style.animationFillMode="forwards",f=g.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=p)})}},c=m=>{m.target===t&&(n.current=hr(o.current))};return t.addEventListener("animationstart",c),t.addEventListener("animationcancel",i),t.addEventListener("animationend",i),()=>{g.clearTimeout(f),t.removeEventListener("animationstart",c),t.removeEventListener("animationcancel",i),t.removeEventListener("animationend",i)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:Ze.useCallback(f=>{o.current=f?getComputedStyle(f):null,a(f)},[])}}function hr(e){return e?.animationName||"none"}function Ch(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,a=t&&"isReactWarning"in t&&t.isReactWarning;return a?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,a=t&&"isReactWarning"in t&&t.isReactWarning,a?e.props.ref:e.props.ref||e.ref)}var nd=xa(aa(),1);import*as rd from"react";import*as Re from"react";import{Fragment as vh,jsx as ts}from"react/jsx-runtime";function Ia(e){let t=Ih(e),a=Re.forwardRef((o,r)=>{let{children:n,...s}=o,l=Re.Children.toArray(n),u=l.find(wh);if(u){let f=u.props.children,g=l.map(i=>i===u?Re.Children.count(f)>1?Re.Children.only(null):Re.isValidElement(f)?f.props.children:null:i);return ts(t,{...s,ref:r,children:Re.isValidElement(f)?Re.cloneElement(f,void 0,g):null})}return ts(t,{...s,ref:r,children:n})});return a.displayName=`${e}.Slot`,a}function Ih(e){let t=Re.forwardRef((a,o)=>{let{children:r,...n}=a;if(Re.isValidElement(r)){let s=Ph(r),l=Rh(n,r.props);return r.type!==Re.Fragment&&(l.ref=o?wo(o,s):s),Re.cloneElement(r,l)}return Re.Children.count(r)>1?Re.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ad=Symbol("radix.slottable");function od(e){let t=({children:a})=>ts(vh,{children:a});return t.displayName=`${e}.Slottable`,t.__radixId=ad,t}function wh(e){return Re.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ad}function Rh(e,t){let a={...t};for(let o in t){let r=e[o],n=t[o];/^on[A-Z]/.test(o)?r&&n?a[o]=(...l)=>{let u=n(...l);return r(...l),u}:r&&(a[o]=r):o==="style"?a[o]={...r,...n}:o==="className"&&(a[o]=[r,n].filter(Boolean).join(" "))}return{...e,...a}}function Ph(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,a=t&&"isReactWarning"in t&&t.isReactWarning;return a?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,a=t&&"isReactWarning"in t&&t.isReactWarning,a?e.props.ref:e.props.ref||e.ref)}import{jsx as kh}from"react/jsx-runtime";var Th=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],W=Th.reduce((e,t)=>{let a=Ia(`Primitive.${t}`),o=rd.forwardRef((r,n)=>{let{asChild:s,...l}=r,u=s?a:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),kh(u,{...l,ref:n})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function sd(e,t){e&&nd.flushSync(()=>e.dispatchEvent(t))}import{Fragment as Ah,jsx as oa,jsxs as Mh}from"react/jsx-runtime";var Cr="Checkbox",[Dh,RR]=ve(Cr),[Fh,as]=Dh(Cr);function Eh(e){let{__scopeCheckbox:t,checked:a,children:o,defaultChecked:r,disabled:n,form:s,name:l,onCheckedChange:u,required:f,value:g="on",internal_do_not_use_render:i}=e,[c,m]=Ve({prop:a,defaultProp:r??!1,onChange:u,caller:Cr}),[h,d]=$e.useState(null),[p,x]=$e.useState(null),y=$e.useRef(!1),C=h?!!s||!!h.closest("form"):!0,v={checked:c,disabled:n,setChecked:m,control:h,setControl:d,name:l,form:s,value:g,hasConsumerStoppedPropagationRef:y,required:f,defaultChecked:ra(r)?!1:r,isFormControl:C,bubbleInput:p,setBubbleInput:x};return oa(Fh,{scope:t,...v,children:Bh(i)?i(v):o})}var ld="CheckboxTrigger",id=$e.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:a,...o},r)=>{let{control:n,value:s,disabled:l,checked:u,required:f,setControl:g,setChecked:i,hasConsumerStoppedPropagationRef:c,isFormControl:m,bubbleInput:h}=as(ld,e),d=J(r,g),p=$e.useRef(u);return $e.useEffect(()=>{let x=n?.form;if(x){let y=()=>i(p.current);return x.addEventListener("reset",y),()=>x.removeEventListener("reset",y)}},[n,i]),oa(W.button,{type:"button",role:"checkbox","aria-checked":ra(u)?"mixed":u,"aria-required":f,"data-state":fd(u),"data-disabled":l?"":void 0,disabled:l,value:s,...o,ref:d,onKeyDown:$(t,x=>{x.key==="Enter"&&x.preventDefault()}),onClick:$(a,x=>{i(y=>ra(y)?!0:!y),h&&m&&(c.current=x.isPropagationStopped(),c.current||x.stopPropagation())})})});id.displayName=ld;var Lr=$e.forwardRef((e,t)=>{let{__scopeCheckbox:a,name:o,checked:r,defaultChecked:n,required:s,disabled:l,value:u,onCheckedChange:f,form:g,...i}=e;return oa(Eh,{__scopeCheckbox:a,checked:r,defaultChecked:n,disabled:l,required:s,onCheckedChange:f,name:o,form:g,value:u,internal_do_not_use_render:({isFormControl:c})=>Mh(Ah,{children:[oa(id,{...i,ref:t,__scopeCheckbox:a}),c&&oa(cd,{__scopeCheckbox:a})]})})});Lr.displayName=Cr;var ud="CheckboxIndicator",os=$e.forwardRef((e,t)=>{let{__scopeCheckbox:a,forceMount:o,...r}=e,n=as(ud,a);return oa(Rt,{present:o||ra(n.checked)||n.checked===!0,children:oa(W.span,{"data-state":fd(n.checked),"data-disabled":n.disabled?"":void 0,...r,ref:t,style:{pointerEvents:"none",...e.style}})})});os.displayName=ud;var dd="CheckboxBubbleInput",cd=$e.forwardRef(({__scopeCheckbox:e,...t},a)=>{let{control:o,hasConsumerStoppedPropagationRef:r,checked:n,defaultChecked:s,required:l,disabled:u,name:f,value:g,form:i,bubbleInput:c,setBubbleInput:m}=as(dd,e),h=J(a,m),d=Jt(n),p=ea(o);$e.useEffect(()=>{let y=c;if(!y)return;let C=window.HTMLInputElement.prototype,S=Object.getOwnPropertyDescriptor(C,"checked").set,w=!r.current;if(d!==n&&S){let b=new Event("click",{bubbles:w});y.indeterminate=ra(n),S.call(y,ra(n)?!1:n),y.dispatchEvent(b)}},[c,d,n,r]);let x=$e.useRef(ra(n)?!1:n);return oa(W.input,{type:"checkbox","aria-hidden":!0,defaultChecked:s??x.current,required:l,disabled:u,name:f,value:g,form:i,...t,tabIndex:-1,ref:h,style:{...t.style,...p,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});cd.displayName=dd;function Bh(e){return typeof e=="function"}function ra(e){return e==="indeterminate"}function fd(e){return ra(e)?"indeterminate":e?"checked":"unchecked"}import{jsx as rs,jsxs as _h}from"react/jsx-runtime";var wa=({ref:e,className:t,...a})=>rs(Lr,{ref:e,className:re("border-primary ring-offset-background focus-visible:ring-ring data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground peer h-4 w-4 shrink-0 rounded-xs border focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",t),...a,children:_h(os,{className:re("group flex h-full w-full items-center justify-center text-current"),children:[rs(ha,{className:"h-4 w-4 group-data-[state=indeterminate]:hidden"}),rs(Lo,{className:"text-primary hidden h-3 w-3 group-data-[state=indeterminate]:block",strokeWidth:3})]})});wa.displayName=Lr.displayName;import{jsx as Ut}from"react/jsx-runtime";var pd=({ref:e,className:t,...a})=>Ut("div",{className:"relative w-full overflow-auto",children:Ut("table",{ref:e,className:re("w-full caption-bottom text-sm",t),...a})});pd.displayName="Table";var md=({ref:e,className:t,...a})=>Ut("thead",{ref:e,className:re("[&_tr]:border-b",t),...a});md.displayName="TableHeader";var gd=({ref:e,className:t,...a})=>Ut("tbody",{ref:e,className:re("[&_tr:last-child]:border-0",t),...a});gd.displayName="TableBody";var Nh=({ref:e,className:t,...a})=>Ut("tfoot",{ref:e,className:re("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0",t),...a});Nh.displayName="TableFooter";var xd=({ref:e,className:t,...a})=>Ut("tr",{ref:e,className:re("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",t),...a});xd.displayName="TableRow";var hd=({ref:e,className:t,...a})=>Ut("th",{ref:e,className:re("text-muted-foreground h-12 px-4 text-left align-middle font-medium [&:has([role=checkbox])]:pr-0",t),...a});hd.displayName="TableHead";var yd=({ref:e,className:t,...a})=>Ut("td",{ref:e,className:re("p-4 align-middle [&:has([role=checkbox])]:pr-0",t),...a});yd.displayName="TableCell";var Uh=({ref:e,className:t,...a})=>Ut("caption",{ref:e,className:re("text-muted-foreground mt-4 text-sm",t),...a});Uh.displayName="TableCaption";import $0 from"react";var Gs=xa(aa(),1);import*as A from"react";function ns(e,[t,a]){return Math.min(a,Math.max(t,e))}import Ra from"react";import{jsx as ss}from"react/jsx-runtime";import qR from"react";import{jsx as GR}from"react/jsx-runtime";function br(e){let t=e+"CollectionProvider",[a,o]=ve(t),[r,n]=a(t,{collectionRef:{current:null},itemMap:new Map}),s=d=>{let{scope:p,children:x}=d,y=Ra.useRef(null),C=Ra.useRef(new Map).current;return ss(r,{scope:p,itemMap:C,collectionRef:y,children:x})};s.displayName=t;let l=e+"CollectionSlot",u=Ia(l),f=Ra.forwardRef((d,p)=>{let{scope:x,children:y}=d,C=n(l,x),v=J(p,C.collectionRef);return ss(u,{ref:v,children:y})});f.displayName=l;let g=e+"CollectionItemSlot",i="data-radix-collection-item",c=Ia(g),m=Ra.forwardRef((d,p)=>{let{scope:x,children:y,...C}=d,v=Ra.useRef(null),S=J(p,v),w=n(g,x);return Ra.useEffect(()=>(w.itemMap.set(v,{ref:v,...C}),()=>{w.itemMap.delete(v)})),ss(c,{[i]:"",ref:S,children:y})});m.displayName=g;function h(d){let p=n(e+"CollectionConsumer",d);return Ra.useCallback(()=>{let y=p.collectionRef.current;if(!y)return[];let C=Array.from(y.querySelectorAll(`[${i}]`));return Array.from(p.itemMap.values()).sort((w,b)=>C.indexOf(w.ref.current)-C.indexOf(b.ref.current))},[p.collectionRef,p.itemMap])}return[{Provider:s,Slot:f,ItemSlot:m},h,o]}import*as Sr from"react";import{jsx as $R}from"react/jsx-runtime";var Hh=Sr.createContext(void 0);function na(e){let t=Sr.useContext(Hh);return e||t||"ltr"}import*as ge from"react";import*as Qa from"react";function Ye(e){let t=Qa.useRef(e);return Qa.useEffect(()=>{t.current=e}),Qa.useMemo(()=>(...a)=>t.current?.(...a),[])}import*as Cd from"react";function Ld(e,t=globalThis?.document){let a=Ye(e);Cd.useEffect(()=>{let o=r=>{r.key==="Escape"&&a(r)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[a,t])}import{jsx as vd}from"react/jsx-runtime";var qh="DismissableLayer",ls="dismissableLayer.update",Vh="dismissableLayer.pointerDownOutside",Gh="dismissableLayer.focusOutside",bd,Id=ge.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),To=ge.forwardRef((e,t)=>{let{disableOutsidePointerEvents:a=!1,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:n,onInteractOutside:s,onDismiss:l,...u}=e,f=ge.useContext(Id),[g,i]=ge.useState(null),c=g?.ownerDocument??globalThis?.document,[,m]=ge.useState({}),h=J(t,b=>i(b)),d=Array.from(f.layers),[p]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),x=d.indexOf(p),y=g?d.indexOf(g):-1,C=f.layersWithOutsidePointerEventsDisabled.size>0,v=y>=x,S=$h(b=>{let I=b.target,D=[...f.branches].some(F=>F.contains(I));!v||D||(r?.(b),s?.(b),b.defaultPrevented||l?.())},c),w=Xh(b=>{let I=b.target;[...f.branches].some(F=>F.contains(I))||(n?.(b),s?.(b),b.defaultPrevented||l?.())},c);return Ld(b=>{y===f.layers.size-1&&(o?.(b),!b.defaultPrevented&&l&&(b.preventDefault(),l()))},c),ge.useEffect(()=>{if(g)return a&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(bd=c.body.style.pointerEvents,c.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(g)),f.layers.add(g),Sd(),()=>{a&&f.layersWithOutsidePointerEventsDisabled.size===1&&(c.body.style.pointerEvents=bd)}},[g,c,a,f]),ge.useEffect(()=>()=>{g&&(f.layers.delete(g),f.layersWithOutsidePointerEventsDisabled.delete(g),Sd())},[g,f]),ge.useEffect(()=>{let b=()=>m({});return document.addEventListener(ls,b),()=>document.removeEventListener(ls,b)},[]),vd(W.div,{...u,ref:h,style:{pointerEvents:C?v?"auto":"none":void 0,...e.style},onFocusCapture:$(e.onFocusCapture,w.onFocusCapture),onBlurCapture:$(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:$(e.onPointerDownCapture,S.onPointerDownCapture)})});To.displayName=qh;var Wh="DismissableLayerBranch",zh=ge.forwardRef((e,t)=>{let a=ge.useContext(Id),o=ge.useRef(null),r=J(t,o);return ge.useEffect(()=>{let n=o.current;if(n)return a.branches.add(n),()=>{a.branches.delete(n)}},[a.branches]),vd(W.div,{...e,ref:r})});zh.displayName=Wh;function $h(e,t=globalThis?.document){let a=Ye(e),o=ge.useRef(!1),r=ge.useRef(()=>{});return ge.useEffect(()=>{let n=l=>{if(l.target&&!o.current){let f=function(){wd(Vh,a,g,{discrete:!0})};var u=f;let g={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=f,t.addEventListener("click",r.current,{once:!0})):f()}else t.removeEventListener("click",r.current);o.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",n)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",n),t.removeEventListener("click",r.current)}},[t,a]),{onPointerDownCapture:()=>o.current=!0}}function Xh(e,t=globalThis?.document){let a=Ye(e),o=ge.useRef(!1);return ge.useEffect(()=>{let r=n=>{n.target&&!o.current&&wd(Gh,a,{originalEvent:n},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,a]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Sd(){let e=new CustomEvent(ls);document.dispatchEvent(e)}function wd(e,t,a,{discrete:o}){let r=a.originalEvent.target,n=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:a});t&&r.addEventListener(e,t,{once:!0}),o?sd(r,n):r.dispatchEvent(n)}import*as Pd from"react";var is=0;function kd(){Pd.useEffect(()=>{let e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Rd()),document.body.insertAdjacentElement("beforeend",e[1]??Rd()),is++,()=>{is===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),is--}},[])}function Rd(){let 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}import*as dt from"react";import{jsx as jh}from"react/jsx-runtime";var us="focusScope.autoFocusOnMount",ds="focusScope.autoFocusOnUnmount",Td={bubbles:!1,cancelable:!0},Kh="FocusScope",cs=dt.forwardRef((e,t)=>{let{loop:a=!1,trapped:o=!1,onMountAutoFocus:r,onUnmountAutoFocus:n,...s}=e,[l,u]=dt.useState(null),f=Ye(r),g=Ye(n),i=dt.useRef(null),c=J(t,d=>u(d)),m=dt.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;dt.useEffect(()=>{if(o){let y=function(w){if(m.paused||!l)return;let b=w.target;l.contains(b)?i.current=b:sa(i.current,{select:!0})},C=function(w){if(m.paused||!l)return;let b=w.relatedTarget;b!==null&&(l.contains(b)||sa(i.current,{select:!0}))},v=function(w){if(document.activeElement===document.body)for(let I of w)I.removedNodes.length>0&&sa(l)};var d=y,p=C,x=v;document.addEventListener("focusin",y),document.addEventListener("focusout",C);let S=new MutationObserver(v);return l&&S.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",C),S.disconnect()}}},[o,l,m.paused]),dt.useEffect(()=>{if(l){Md.add(m);let d=document.activeElement;if(!l.contains(d)){let x=new CustomEvent(us,Td);l.addEventListener(us,f),l.dispatchEvent(x),x.defaultPrevented||(Zh(ty(Fd(l)),{select:!0}),document.activeElement===d&&sa(l))}return()=>{l.removeEventListener(us,f),setTimeout(()=>{let x=new CustomEvent(ds,Td);l.addEventListener(ds,g),l.dispatchEvent(x),x.defaultPrevented||sa(d??document.body,{select:!0}),l.removeEventListener(ds,g),Md.remove(m)},0)}}},[l,f,g,m]);let h=dt.useCallback(d=>{if(!a&&!o||m.paused)return;let p=d.key==="Tab"&&!d.altKey&&!d.ctrlKey&&!d.metaKey,x=document.activeElement;if(p&&x){let y=d.currentTarget,[C,v]=Yh(y);C&&v?!d.shiftKey&&x===v?(d.preventDefault(),a&&sa(C,{select:!0})):d.shiftKey&&x===C&&(d.preventDefault(),a&&sa(v,{select:!0})):x===y&&d.preventDefault()}},[a,o,m.paused]);return jh(W.div,{tabIndex:-1,...s,ref:c,onKeyDown:h})});cs.displayName=Kh;function Zh(e,{select:t=!1}={}){let a=document.activeElement;for(let o of e)if(sa(o,{select:t}),document.activeElement!==a)return}function Yh(e){let t=Fd(e),a=Ad(t,e),o=Ad(t.reverse(),e);return[a,o]}function Fd(e){let t=[],a=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{let r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;a.nextNode();)t.push(a.currentNode);return t}function Ad(e,t){for(let a of e)if(!Qh(a,{upTo:t}))return a}function Qh(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 Jh(e){return e instanceof HTMLInputElement&&"select"in e}function sa(e,{select:t=!1}={}){if(e&&e.focus){let a=document.activeElement;e.focus({preventScroll:!0}),e!==a&&Jh(e)&&t&&e.select()}}var Md=ey();function ey(){let e=[];return{add(t){let a=e[0];t!==a&&a?.pause(),e=Dd(e,t),e.unshift(t)},remove(t){e=Dd(e,t),e[0]?.resume()}}}function Dd(e,t){let a=[...e],o=a.indexOf(t);return o!==-1&&a.splice(o,1),a}function ty(e){return e.filter(t=>t.tagName!=="A")}import*as fs from"react";var ay=fs[" useId ".trim().toString()]||(()=>{}),oy=0;function Pt(e){let[t,a]=fs.useState(ay());return me(()=>{e||a(o=>o??String(oy++))},[e]),e||(t?`radix-${t}`:"")}import*as Je from"react";var Od=["top","right","bottom","left"];var kt=Math.min,Xe=Math.max,Mo=Math.round,Do=Math.floor,mt=e=>({x:e,y:e}),ry={left:"right",right:"left",bottom:"top",top:"bottom"},ny={start:"end",end:"start"};function Ir(e,t,a){return Xe(e,kt(t,a))}function Tt(e,t){return typeof e=="function"?e(t):e}function At(e){return e.split("-")[0]}function Pa(e){return e.split("-")[1]}function wr(e){return e==="x"?"y":"x"}function Rr(e){return e==="y"?"height":"width"}var sy=new Set(["top","bottom"]);function gt(e){return sy.has(At(e))?"y":"x"}function Pr(e){return wr(gt(e))}function _d(e,t,a){a===void 0&&(a=!1);let o=Pa(e),r=Pr(e),n=Rr(r),s=r==="x"?o===(a?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[n]>t.floating[n]&&(s=Ao(s)),[s,Ao(s)]}function Nd(e){let t=Ao(e);return[vr(e),t,vr(t)]}function vr(e){return e.replace(/start|end/g,t=>ny[t])}var Ed=["left","right"],Bd=["right","left"],ly=["top","bottom"],iy=["bottom","top"];function uy(e,t,a){switch(e){case"top":case"bottom":return a?t?Bd:Ed:t?Ed:Bd;case"left":case"right":return t?ly:iy;default:return[]}}function Ud(e,t,a,o){let r=Pa(e),n=uy(At(e),a==="start",o);return r&&(n=n.map(s=>s+"-"+r),t&&(n=n.concat(n.map(vr)))),n}function Ao(e){return e.replace(/left|right|bottom|top/g,t=>ry[t])}function dy(e){return{top:0,right:0,bottom:0,left:0,...e}}function ps(e){return typeof e!="number"?dy(e):{top:e,right:e,bottom:e,left:e}}function ka(e){let{x:t,y:a,width:o,height:r}=e;return{width:o,height:r,top:a,left:t,right:t+o,bottom:a+r,x:t,y:a}}function Hd(e,t,a){let{reference:o,floating:r}=e,n=gt(t),s=Pr(t),l=Rr(s),u=At(t),f=n==="y",g=o.x+o.width/2-r.width/2,i=o.y+o.height/2-r.height/2,c=o[l]/2-r[l]/2,m;switch(u){case"top":m={x:g,y:o.y-r.height};break;case"bottom":m={x:g,y:o.y+o.height};break;case"right":m={x:o.x+o.width,y:i};break;case"left":m={x:o.x-r.width,y:i};break;default:m={x:o.x,y:o.y}}switch(Pa(t)){case"start":m[s]-=c*(a&&f?-1:1);break;case"end":m[s]+=c*(a&&f?-1:1);break}return m}var Gd=async(e,t,a)=>{let{placement:o="bottom",strategy:r="absolute",middleware:n=[],platform:s}=a,l=n.filter(Boolean),u=await(s.isRTL==null?void 0:s.isRTL(t)),f=await s.getElementRects({reference:e,floating:t,strategy:r}),{x:g,y:i}=Hd(f,o,u),c=o,m={},h=0;for(let d=0;d<l.length;d++){let{name:p,fn:x}=l[d],{x:y,y:C,data:v,reset:S}=await x({x:g,y:i,initialPlacement:o,placement:c,strategy:r,middlewareData:m,rects:f,platform:s,elements:{reference:e,floating:t}});g=y??g,i=C??i,m={...m,[p]:{...m[p],...v}},S&&h<=50&&(h++,typeof S=="object"&&(S.placement&&(c=S.placement),S.rects&&(f=S.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:r}):S.rects),{x:g,y:i}=Hd(f,c,u)),d=-1)}return{x:g,y:i,placement:c,strategy:r,middlewareData:m}};async function Ja(e,t){var a;t===void 0&&(t={});let{x:o,y:r,platform:n,rects:s,elements:l,strategy:u}=e,{boundary:f="clippingAncestors",rootBoundary:g="viewport",elementContext:i="floating",altBoundary:c=!1,padding:m=0}=Tt(t,e),h=ps(m),p=l[c?i==="floating"?"reference":"floating":i],x=ka(await n.getClippingRect({element:(a=await(n.isElement==null?void 0:n.isElement(p)))==null||a?p:p.contextElement||await(n.getDocumentElement==null?void 0:n.getDocumentElement(l.floating)),boundary:f,rootBoundary:g,strategy:u})),y=i==="floating"?{x:o,y:r,width:s.floating.width,height:s.floating.height}:s.reference,C=await(n.getOffsetParent==null?void 0:n.getOffsetParent(l.floating)),v=await(n.isElement==null?void 0:n.isElement(C))?await(n.getScale==null?void 0:n.getScale(C))||{x:1,y:1}:{x:1,y:1},S=ka(n.convertOffsetParentRelativeRectToViewportRelativeRect?await n.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:y,offsetParent:C,strategy:u}):y);return{top:(x.top-S.top+h.top)/v.y,bottom:(S.bottom-x.bottom+h.bottom)/v.y,left:(x.left-S.left+h.left)/v.x,right:(S.right-x.right+h.right)/v.x}}var Wd=e=>({name:"arrow",options:e,async fn(t){let{x:a,y:o,placement:r,rects:n,platform:s,elements:l,middlewareData:u}=t,{element:f,padding:g=0}=Tt(e,t)||{};if(f==null)return{};let i=ps(g),c={x:a,y:o},m=Pr(r),h=Rr(m),d=await s.getDimensions(f),p=m==="y",x=p?"top":"left",y=p?"bottom":"right",C=p?"clientHeight":"clientWidth",v=n.reference[h]+n.reference[m]-c[m]-n.floating[h],S=c[m]-n.reference[m],w=await(s.getOffsetParent==null?void 0:s.getOffsetParent(f)),b=w?w[C]:0;(!b||!await(s.isElement==null?void 0:s.isElement(w)))&&(b=l.floating[C]||n.floating[h]);let I=v/2-S/2,D=b/2-d[h]/2-1,F=kt(i[x],D),k=kt(i[y],D),T=F,q=b-d[h]-k,z=b/2-d[h]/2+I,j=Ir(T,z,q),E=!u.arrow&&Pa(r)!=null&&z!==j&&n.reference[h]/2-(z<T?F:k)-d[h]/2<0,G=E?z<T?z-T:z-q:0;return{[m]:c[m]+G,data:{[m]:j,centerOffset:z-j-G,...E&&{alignmentOffset:G}},reset:E}}});var zd=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var a,o;let{placement:r,middlewareData:n,rects:s,initialPlacement:l,platform:u,elements:f}=t,{mainAxis:g=!0,crossAxis:i=!0,fallbackPlacements:c,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:d=!0,...p}=Tt(e,t);if((a=n.arrow)!=null&&a.alignmentOffset)return{};let x=At(r),y=gt(l),C=At(l)===l,v=await(u.isRTL==null?void 0:u.isRTL(f.floating)),S=c||(C||!d?[Ao(l)]:Nd(l)),w=h!=="none";!c&&w&&S.push(...Ud(l,d,h,v));let b=[l,...S],I=await Ja(t,p),D=[],F=((o=n.flip)==null?void 0:o.overflows)||[];if(g&&D.push(I[x]),i){let z=_d(r,s,v);D.push(I[z[0]],I[z[1]])}if(F=[...F,{placement:r,overflows:D}],!D.every(z=>z<=0)){var k,T;let z=(((k=n.flip)==null?void 0:k.index)||0)+1,j=b[z];if(j&&(!(i==="alignment"?y!==gt(j):!1)||F.every(N=>gt(N.placement)===y?N.overflows[0]>0:!0)))return{data:{index:z,overflows:F},reset:{placement:j}};let E=(T=F.filter(G=>G.overflows[0]<=0).sort((G,N)=>G.overflows[1]-N.overflows[1])[0])==null?void 0:T.placement;if(!E)switch(m){case"bestFit":{var q;let G=(q=F.filter(N=>{if(w){let P=gt(N.placement);return P===y||P==="y"}return!0}).map(N=>[N.placement,N.overflows.filter(P=>P>0).reduce((P,R)=>P+R,0)]).sort((N,P)=>N[1]-P[1])[0])==null?void 0:q[0];G&&(E=G);break}case"initialPlacement":E=l;break}if(r!==E)return{reset:{placement:E}}}return{}}}};function qd(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Vd(e){return Od.some(t=>e[t]>=0)}var $d=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:a}=t,{strategy:o="referenceHidden",...r}=Tt(e,t);switch(o){case"referenceHidden":{let n=await Ja(t,{...r,elementContext:"reference"}),s=qd(n,a.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Vd(s)}}}case"escaped":{let n=await Ja(t,{...r,altBoundary:!0}),s=qd(n,a.floating);return{data:{escapedOffsets:s,escaped:Vd(s)}}}default:return{}}}}};var Xd=new Set(["left","top"]);async function cy(e,t){let{placement:a,platform:o,elements:r}=e,n=await(o.isRTL==null?void 0:o.isRTL(r.floating)),s=At(a),l=Pa(a),u=gt(a)==="y",f=Xd.has(s)?-1:1,g=n&&u?-1:1,i=Tt(t,e),{mainAxis:c,crossAxis:m,alignmentAxis:h}=typeof i=="number"?{mainAxis:i,crossAxis:0,alignmentAxis:null}:{mainAxis:i.mainAxis||0,crossAxis:i.crossAxis||0,alignmentAxis:i.alignmentAxis};return l&&typeof h=="number"&&(m=l==="end"?h*-1:h),u?{x:m*g,y:c*f}:{x:c*f,y:m*g}}var jd=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var a,o;let{x:r,y:n,placement:s,middlewareData:l}=t,u=await cy(t,e);return s===((a=l.offset)==null?void 0:a.placement)&&(o=l.arrow)!=null&&o.alignmentOffset?{}:{x:r+u.x,y:n+u.y,data:{...u,placement:s}}}}},Kd=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:a,y:o,placement:r}=t,{mainAxis:n=!0,crossAxis:s=!1,limiter:l={fn:p=>{let{x,y}=p;return{x,y}}},...u}=Tt(e,t),f={x:a,y:o},g=await Ja(t,u),i=gt(At(r)),c=wr(i),m=f[c],h=f[i];if(n){let p=c==="y"?"top":"left",x=c==="y"?"bottom":"right",y=m+g[p],C=m-g[x];m=Ir(y,m,C)}if(s){let p=i==="y"?"top":"left",x=i==="y"?"bottom":"right",y=h+g[p],C=h-g[x];h=Ir(y,h,C)}let d=l.fn({...t,[c]:m,[i]:h});return{...d,data:{x:d.x-a,y:d.y-o,enabled:{[c]:n,[i]:s}}}}}},Zd=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:a,y:o,placement:r,rects:n,middlewareData:s}=t,{offset:l=0,mainAxis:u=!0,crossAxis:f=!0}=Tt(e,t),g={x:a,y:o},i=gt(r),c=wr(i),m=g[c],h=g[i],d=Tt(l,t),p=typeof d=="number"?{mainAxis:d,crossAxis:0}:{mainAxis:0,crossAxis:0,...d};if(u){let C=c==="y"?"height":"width",v=n.reference[c]-n.floating[C]+p.mainAxis,S=n.reference[c]+n.reference[C]-p.mainAxis;m<v?m=v:m>S&&(m=S)}if(f){var x,y;let C=c==="y"?"width":"height",v=Xd.has(At(r)),S=n.reference[i]-n.floating[C]+(v&&((x=s.offset)==null?void 0:x[i])||0)+(v?0:p.crossAxis),w=n.reference[i]+n.reference[C]+(v?0:((y=s.offset)==null?void 0:y[i])||0)-(v?p.crossAxis:0);h<S?h=S:h>w&&(h=w)}return{[c]:m,[i]:h}}}},Yd=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var a,o;let{placement:r,rects:n,platform:s,elements:l}=t,{apply:u=()=>{},...f}=Tt(e,t),g=await Ja(t,f),i=At(r),c=Pa(r),m=gt(r)==="y",{width:h,height:d}=n.floating,p,x;i==="top"||i==="bottom"?(p=i,x=c===(await(s.isRTL==null?void 0:s.isRTL(l.floating))?"start":"end")?"left":"right"):(x=i,p=c==="end"?"top":"bottom");let y=d-g.top-g.bottom,C=h-g.left-g.right,v=kt(d-g[p],y),S=kt(h-g[x],C),w=!t.middlewareData.shift,b=v,I=S;if((a=t.middlewareData.shift)!=null&&a.enabled.x&&(I=C),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(b=y),w&&!c){let F=Xe(g.left,0),k=Xe(g.right,0),T=Xe(g.top,0),q=Xe(g.bottom,0);m?I=h-2*(F!==0||k!==0?F+k:Xe(g.left,g.right)):b=d-2*(T!==0||q!==0?T+q:Xe(g.top,g.bottom))}await u({...t,availableWidth:I,availableHeight:b});let D=await s.getDimensions(l.floating);return h!==D.width||d!==D.height?{reset:{rects:!0}}:{}}}};function kr(){return typeof window<"u"}function Aa(e){return Jd(e)?(e.nodeName||"").toLowerCase():"#document"}function Qe(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function xt(e){var t;return(t=(Jd(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Jd(e){return kr()?e instanceof Node||e instanceof Qe(e).Node:!1}function ct(e){return kr()?e instanceof Element||e instanceof Qe(e).Element:!1}function ht(e){return kr()?e instanceof HTMLElement||e instanceof Qe(e).HTMLElement:!1}function Qd(e){return!kr()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Qe(e).ShadowRoot}var fy=new Set(["inline","contents"]);function eo(e){let{overflow:t,overflowX:a,overflowY:o,display:r}=ft(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+a)&&!fy.has(r)}var py=new Set(["table","td","th"]);function ec(e){return py.has(Aa(e))}var my=[":popover-open",":modal"];function Fo(e){return my.some(t=>{try{return e.matches(t)}catch{return!1}})}var gy=["transform","translate","scale","rotate","perspective"],xy=["transform","translate","scale","rotate","perspective","filter"],hy=["paint","layout","strict","content"];function Tr(e){let t=Ar(),a=ct(e)?ft(e):e;return gy.some(o=>a[o]?a[o]!=="none":!1)||(a.containerType?a.containerType!=="normal":!1)||!t&&(a.backdropFilter?a.backdropFilter!=="none":!1)||!t&&(a.filter?a.filter!=="none":!1)||xy.some(o=>(a.willChange||"").includes(o))||hy.some(o=>(a.contain||"").includes(o))}function tc(e){let t=Ht(e);for(;ht(t)&&!Ma(t);){if(Tr(t))return t;if(Fo(t))return null;t=Ht(t)}return null}function Ar(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}var yy=new Set(["html","body","#document"]);function Ma(e){return yy.has(Aa(e))}function ft(e){return Qe(e).getComputedStyle(e)}function Eo(e){return ct(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ht(e){if(Aa(e)==="html")return e;let t=e.assignedSlot||e.parentNode||Qd(e)&&e.host||xt(e);return Qd(t)?t.host:t}function ac(e){let t=Ht(e);return Ma(t)?e.ownerDocument?e.ownerDocument.body:e.body:ht(t)&&eo(t)?t:ac(t)}function Ta(e,t,a){var o;t===void 0&&(t=[]),a===void 0&&(a=!0);let r=ac(e),n=r===((o=e.ownerDocument)==null?void 0:o.body),s=Qe(r);if(n){let l=Mr(s);return t.concat(s,s.visualViewport||[],eo(r)?r:[],l&&a?Ta(l):[])}return t.concat(r,Ta(r,[],a))}function Mr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function sc(e){let t=ft(e),a=parseFloat(t.width)||0,o=parseFloat(t.height)||0,r=ht(e),n=r?e.offsetWidth:a,s=r?e.offsetHeight:o,l=Mo(a)!==n||Mo(o)!==s;return l&&(a=n,o=s),{width:a,height:o,$:l}}function gs(e){return ct(e)?e:e.contextElement}function to(e){let t=gs(e);if(!ht(t))return mt(1);let a=t.getBoundingClientRect(),{width:o,height:r,$:n}=sc(t),s=(n?Mo(a.width):a.width)/o,l=(n?Mo(a.height):a.height)/r;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}var Cy=mt(0);function lc(e){let t=Qe(e);return!Ar()||!t.visualViewport?Cy:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ly(e,t,a){return t===void 0&&(t=!1),!a||t&&a!==Qe(e)?!1:t}function Da(e,t,a,o){t===void 0&&(t=!1),a===void 0&&(a=!1);let r=e.getBoundingClientRect(),n=gs(e),s=mt(1);t&&(o?ct(o)&&(s=to(o)):s=to(e));let l=Ly(n,a,o)?lc(n):mt(0),u=(r.left+l.x)/s.x,f=(r.top+l.y)/s.y,g=r.width/s.x,i=r.height/s.y;if(n){let c=Qe(n),m=o&&ct(o)?Qe(o):o,h=c,d=Mr(h);for(;d&&o&&m!==h;){let p=to(d),x=d.getBoundingClientRect(),y=ft(d),C=x.left+(d.clientLeft+parseFloat(y.paddingLeft))*p.x,v=x.top+(d.clientTop+parseFloat(y.paddingTop))*p.y;u*=p.x,f*=p.y,g*=p.x,i*=p.y,u+=C,f+=v,h=Qe(d),d=Mr(h)}}return ka({width:g,height:i,x:u,y:f})}function Dr(e,t){let a=Eo(e).scrollLeft;return t?t.left+a:Da(xt(e)).left+a}function ic(e,t){let a=e.getBoundingClientRect(),o=a.left+t.scrollLeft-Dr(e,a),r=a.top+t.scrollTop;return{x:o,y:r}}function by(e){let{elements:t,rect:a,offsetParent:o,strategy:r}=e,n=r==="fixed",s=xt(o),l=t?Fo(t.floating):!1;if(o===s||l&&n)return a;let u={scrollLeft:0,scrollTop:0},f=mt(1),g=mt(0),i=ht(o);if((i||!i&&!n)&&((Aa(o)!=="body"||eo(s))&&(u=Eo(o)),ht(o))){let m=Da(o);f=to(o),g.x=m.x+o.clientLeft,g.y=m.y+o.clientTop}let c=s&&!i&&!n?ic(s,u):mt(0);return{width:a.width*f.x,height:a.height*f.y,x:a.x*f.x-u.scrollLeft*f.x+g.x+c.x,y:a.y*f.y-u.scrollTop*f.y+g.y+c.y}}function Sy(e){return Array.from(e.getClientRects())}function vy(e){let t=xt(e),a=Eo(e),o=e.ownerDocument.body,r=Xe(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),n=Xe(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight),s=-a.scrollLeft+Dr(e),l=-a.scrollTop;return ft(o).direction==="rtl"&&(s+=Xe(t.clientWidth,o.clientWidth)-r),{width:r,height:n,x:s,y:l}}var oc=25;function Iy(e,t){let a=Qe(e),o=xt(e),r=a.visualViewport,n=o.clientWidth,s=o.clientHeight,l=0,u=0;if(r){n=r.width,s=r.height;let g=Ar();(!g||g&&t==="fixed")&&(l=r.offsetLeft,u=r.offsetTop)}let f=Dr(o);if(f<=0){let g=o.ownerDocument,i=g.body,c=getComputedStyle(i),m=g.compatMode==="CSS1Compat"&&parseFloat(c.marginLeft)+parseFloat(c.marginRight)||0,h=Math.abs(o.clientWidth-i.clientWidth-m);h<=oc&&(n-=h)}else f<=oc&&(n+=f);return{width:n,height:s,x:l,y:u}}var wy=new Set(["absolute","fixed"]);function Ry(e,t){let a=Da(e,!0,t==="fixed"),o=a.top+e.clientTop,r=a.left+e.clientLeft,n=ht(e)?to(e):mt(1),s=e.clientWidth*n.x,l=e.clientHeight*n.y,u=r*n.x,f=o*n.y;return{width:s,height:l,x:u,y:f}}function rc(e,t,a){let o;if(t==="viewport")o=Iy(e,a);else if(t==="document")o=vy(xt(e));else if(ct(t))o=Ry(t,a);else{let r=lc(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return ka(o)}function uc(e,t){let a=Ht(e);return a===t||!ct(a)||Ma(a)?!1:ft(a).position==="fixed"||uc(a,t)}function Py(e,t){let a=t.get(e);if(a)return a;let o=Ta(e,[],!1).filter(l=>ct(l)&&Aa(l)!=="body"),r=null,n=ft(e).position==="fixed",s=n?Ht(e):e;for(;ct(s)&&!Ma(s);){let l=ft(s),u=Tr(s);!u&&l.position==="fixed"&&(r=null),(n?!u&&!r:!u&&l.position==="static"&&!!r&&wy.has(r.position)||eo(s)&&!u&&uc(e,s))?o=o.filter(g=>g!==s):r=l,s=Ht(s)}return t.set(e,o),o}function ky(e){let{element:t,boundary:a,rootBoundary:o,strategy:r}=e,s=[...a==="clippingAncestors"?Fo(t)?[]:Py(t,this._c):[].concat(a),o],l=s[0],u=s.reduce((f,g)=>{let i=rc(t,g,r);return f.top=Xe(i.top,f.top),f.right=kt(i.right,f.right),f.bottom=kt(i.bottom,f.bottom),f.left=Xe(i.left,f.left),f},rc(t,l,r));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function Ty(e){let{width:t,height:a}=sc(e);return{width:t,height:a}}function Ay(e,t,a){let o=ht(t),r=xt(t),n=a==="fixed",s=Da(e,!0,n,t),l={scrollLeft:0,scrollTop:0},u=mt(0);function f(){u.x=Dr(r)}if(o||!o&&!n)if((Aa(t)!=="body"||eo(r))&&(l=Eo(t)),o){let m=Da(t,!0,n,t);u.x=m.x+t.clientLeft,u.y=m.y+t.clientTop}else r&&f();n&&!o&&r&&f();let g=r&&!o&&!n?ic(r,l):mt(0),i=s.left+l.scrollLeft-u.x-g.x,c=s.top+l.scrollTop-u.y-g.y;return{x:i,y:c,width:s.width,height:s.height}}function ms(e){return ft(e).position==="static"}function nc(e,t){if(!ht(e)||ft(e).position==="fixed")return null;if(t)return t(e);let a=e.offsetParent;return xt(e)===a&&(a=a.ownerDocument.body),a}function dc(e,t){let a=Qe(e);if(Fo(e))return a;if(!ht(e)){let r=Ht(e);for(;r&&!Ma(r);){if(ct(r)&&!ms(r))return r;r=Ht(r)}return a}let o=nc(e,t);for(;o&&ec(o)&&ms(o);)o=nc(o,t);return o&&Ma(o)&&ms(o)&&!Tr(o)?a:o||tc(e)||a}var My=async function(e){let t=this.getOffsetParent||dc,a=this.getDimensions,o=await a(e.floating);return{reference:Ay(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Dy(e){return ft(e).direction==="rtl"}var cc={convertOffsetParentRelativeRectToViewportRelativeRect:by,getDocumentElement:xt,getClippingRect:ky,getOffsetParent:dc,getElementRects:My,getClientRects:Sy,getDimensions:Ty,getScale:to,isElement:ct,isRTL:Dy};function fc(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Fy(e,t){let a=null,o,r=xt(e);function n(){var l;clearTimeout(o),(l=a)==null||l.disconnect(),a=null}function s(l,u){l===void 0&&(l=!1),u===void 0&&(u=1),n();let f=e.getBoundingClientRect(),{left:g,top:i,width:c,height:m}=f;if(l||t(),!c||!m)return;let h=Do(i),d=Do(r.clientWidth-(g+c)),p=Do(r.clientHeight-(i+m)),x=Do(g),C={rootMargin:-h+"px "+-d+"px "+-p+"px "+-x+"px",threshold:Xe(0,kt(1,u))||1},v=!0;function S(w){let b=w[0].intersectionRatio;if(b!==u){if(!v)return s();b?s(!1,b):o=setTimeout(()=>{s(!1,1e-7)},1e3)}b===1&&!fc(f,e.getBoundingClientRect())&&s(),v=!1}try{a=new IntersectionObserver(S,{...C,root:r.ownerDocument})}catch{a=new IntersectionObserver(S,C)}a.observe(e)}return s(!0),n}function xs(e,t,a,o){o===void 0&&(o={});let{ancestorScroll:r=!0,ancestorResize:n=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:u=!1}=o,f=gs(e),g=r||n?[...f?Ta(f):[],...Ta(t)]:[];g.forEach(x=>{r&&x.addEventListener("scroll",a,{passive:!0}),n&&x.addEventListener("resize",a)});let i=f&&l?Fy(f,a):null,c=-1,m=null;s&&(m=new ResizeObserver(x=>{let[y]=x;y&&y.target===f&&m&&(m.unobserve(t),cancelAnimationFrame(c),c=requestAnimationFrame(()=>{var C;(C=m)==null||C.observe(t)})),a()}),f&&!u&&m.observe(f),m.observe(t));let h,d=u?Da(e):null;u&&p();function p(){let x=Da(e);d&&!fc(d,x)&&a(),d=x,h=requestAnimationFrame(p)}return a(),()=>{var x;g.forEach(y=>{r&&y.removeEventListener("scroll",a),n&&y.removeEventListener("resize",a)}),i?.(),(x=m)==null||x.disconnect(),m=null,u&&cancelAnimationFrame(h)}}var pc=jd;var mc=Kd,gc=zd,xc=Yd,hc=$d,hs=Wd;var yc=Zd,ys=(e,t,a)=>{let o=new Map,r={platform:cc,...a},n={...r.platform,_c:o};return Gd(e,t,{...r,platform:n})};var Lc=xa(aa(),1);import*as Ie from"react";import{useLayoutEffect as Ey}from"react";var By=typeof document<"u",Oy=function(){},Fr=By?Ey:Oy;function Er(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let a,o,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(a=e.length,a!==t.length)return!1;for(o=a;o--!==0;)if(!Er(e[o],t[o]))return!1;return!0}if(r=Object.keys(e),a=r.length,a!==Object.keys(t).length)return!1;for(o=a;o--!==0;)if(!{}.hasOwnProperty.call(t,r[o]))return!1;for(o=a;o--!==0;){let n=r[o];if(!(n==="_owner"&&e.$$typeof)&&!Er(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function bc(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Cc(e,t){let a=bc(e);return Math.round(t*a)/a}function Cs(e){let t=Ie.useRef(e);return Fr(()=>{t.current=e}),t}function Sc(e){e===void 0&&(e={});let{placement:t="bottom",strategy:a="absolute",middleware:o=[],platform:r,elements:{reference:n,floating:s}={},transform:l=!0,whileElementsMounted:u,open:f}=e,[g,i]=Ie.useState({x:0,y:0,strategy:a,placement:t,middlewareData:{},isPositioned:!1}),[c,m]=Ie.useState(o);Er(c,o)||m(o);let[h,d]=Ie.useState(null),[p,x]=Ie.useState(null),y=Ie.useCallback(N=>{N!==w.current&&(w.current=N,d(N))},[]),C=Ie.useCallback(N=>{N!==b.current&&(b.current=N,x(N))},[]),v=n||h,S=s||p,w=Ie.useRef(null),b=Ie.useRef(null),I=Ie.useRef(g),D=u!=null,F=Cs(u),k=Cs(r),T=Cs(f),q=Ie.useCallback(()=>{if(!w.current||!b.current)return;let N={placement:t,strategy:a,middleware:c};k.current&&(N.platform=k.current),ys(w.current,b.current,N).then(P=>{let R={...P,isPositioned:T.current!==!1};z.current&&!Er(I.current,R)&&(I.current=R,Lc.flushSync(()=>{i(R)}))})},[c,t,a,k,T]);Fr(()=>{f===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,i(N=>({...N,isPositioned:!1})))},[f]);let z=Ie.useRef(!1);Fr(()=>(z.current=!0,()=>{z.current=!1}),[]),Fr(()=>{if(v&&(w.current=v),S&&(b.current=S),v&&S){if(F.current)return F.current(v,S,q);q()}},[v,S,q,F,D]);let j=Ie.useMemo(()=>({reference:w,floating:b,setReference:y,setFloating:C}),[y,C]),E=Ie.useMemo(()=>({reference:v,floating:S}),[v,S]),G=Ie.useMemo(()=>{let N={position:a,left:0,top:0};if(!E.floating)return N;let P=Cc(E.floating,g.x),R=Cc(E.floating,g.y);return l?{...N,transform:"translate("+P+"px, "+R+"px)",...bc(E.floating)>=1.5&&{willChange:"transform"}}:{position:a,left:P,top:R}},[a,l,E.floating,g.x,g.y]);return Ie.useMemo(()=>({...g,update:q,refs:j,elements:E,floatingStyles:G}),[g,q,j,E,G])}var _y=e=>{function t(a){return{}.hasOwnProperty.call(a,"current")}return{name:"arrow",options:e,fn(a){let{element:o,padding:r}=typeof e=="function"?e(a):e;return o&&t(o)?o.current!=null?hs({element:o.current,padding:r}).fn(a):{}:o?hs({element:o,padding:r}).fn(a):{}}}},vc=(e,t)=>({...pc(e),options:[e,t]}),Ic=(e,t)=>({...mc(e),options:[e,t]}),wc=(e,t)=>({...yc(e),options:[e,t]}),Rc=(e,t)=>({...gc(e),options:[e,t]}),Pc=(e,t)=>({...xc(e),options:[e,t]});var kc=(e,t)=>({...hc(e),options:[e,t]});var Tc=(e,t)=>({..._y(e),options:[e,t]});import*as Mc from"react";import{jsx as Ac}from"react/jsx-runtime";var Ny="Arrow",Dc=Mc.forwardRef((e,t)=>{let{children:a,width:o=10,height:r=5,...n}=e;return Ac(W.svg,{...n,ref:t,width:o,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?a:Ac("polygon",{points:"0,0 30,0 15,10"})})});Dc.displayName=Ny;var Fc=Dc;import{jsx as Fa}from"react/jsx-runtime";var Ls="Popper",[Ec,ao]=ve(Ls),[Hy,Bc]=Ec(Ls),Oc=e=>{let{__scopePopper:t,children:a}=e,[o,r]=Je.useState(null);return Fa(Hy,{scope:t,anchor:o,onAnchorChange:r,children:a})};Oc.displayName=Ls;var _c="PopperAnchor",Nc=Je.forwardRef((e,t)=>{let{__scopePopper:a,virtualRef:o,...r}=e,n=Bc(_c,a),s=Je.useRef(null),l=J(t,s),u=Je.useRef(null);return Je.useEffect(()=>{let f=u.current;u.current=o?.current||s.current,f!==u.current&&n.onAnchorChange(u.current)}),o?null:Fa(W.div,{...r,ref:l})});Nc.displayName=_c;var bs="PopperContent",[qy,Vy]=Ec(bs),Uc=Je.forwardRef((e,t)=>{let{__scopePopper:a,side:o="bottom",sideOffset:r=0,align:n="center",alignOffset:s=0,arrowPadding:l=0,avoidCollisions:u=!0,collisionBoundary:f=[],collisionPadding:g=0,sticky:i="partial",hideWhenDetached:c=!1,updatePositionStrategy:m="optimized",onPlaced:h,...d}=e,p=Bc(bs,a),[x,y]=Je.useState(null),C=J(t,V=>y(V)),[v,S]=Je.useState(null),w=ea(v),b=w?.width??0,I=w?.height??0,D=o+(n!=="center"?"-"+n:""),F=typeof g=="number"?g:{top:0,right:0,bottom:0,left:0,...g},k=Array.isArray(f)?f:[f],T=k.length>0,q={padding:F,boundary:k.filter(Wy),altBoundary:T},{refs:z,floatingStyles:j,placement:E,isPositioned:G,middlewareData:N}=Sc({strategy:"fixed",placement:D,whileElementsMounted:(...V)=>xs(...V,{animationFrame:m==="always"}),elements:{reference:p.anchor},middleware:[vc({mainAxis:r+I,alignmentAxis:s}),u&&Ic({mainAxis:!0,crossAxis:!1,limiter:i==="partial"?wc():void 0,...q}),u&&Rc({...q}),Pc({...q,apply:({elements:V,rects:le,availableWidth:Q,availableHeight:oe})=>{let{width:ne,height:ue}=le.reference,Ee=V.floating.style;Ee.setProperty("--radix-popper-available-width",`${Q}px`),Ee.setProperty("--radix-popper-available-height",`${oe}px`),Ee.setProperty("--radix-popper-anchor-width",`${ne}px`),Ee.setProperty("--radix-popper-anchor-height",`${ue}px`)}}),v&&Tc({element:v,padding:l}),zy({arrowWidth:b,arrowHeight:I}),c&&kc({strategy:"referenceHidden",...q})]}),[P,R]=Vc(E),_=Ye(h);me(()=>{G&&_?.()},[G,_]);let U=N.arrow?.x,Z=N.arrow?.y,Ce=N.arrow?.centerOffset!==0,[ce,se]=Je.useState();return me(()=>{x&&se(window.getComputedStyle(x).zIndex)},[x]),Fa("div",{ref:z.setFloating,"data-radix-popper-content-wrapper":"",style:{...j,transform:G?j.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ce,"--radix-popper-transform-origin":[N.transformOrigin?.x,N.transformOrigin?.y].join(" "),...N.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:Fa(qy,{scope:a,placedSide:P,onArrowChange:S,arrowX:U,arrowY:Z,shouldHideArrow:Ce,children:Fa(W.div,{"data-side":P,"data-align":R,...d,ref:C,style:{...d.style,animation:G?void 0:"none"}})})})});Uc.displayName=bs;var Hc="PopperArrow",Gy={top:"bottom",right:"left",bottom:"top",left:"right"},qc=Je.forwardRef(function(t,a){let{__scopePopper:o,...r}=t,n=Vy(Hc,o),s=Gy[n.placedSide];return Fa("span",{ref:n.onArrowChange,style:{position:"absolute",left:n.arrowX,top:n.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[n.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[n.placedSide],visibility:n.shouldHideArrow?"hidden":void 0},children:Fa(Fc,{...r,ref:a,style:{...r.style,display:"block"}})})});qc.displayName=Hc;function Wy(e){return e!==null}var zy=e=>({name:"transformOrigin",options:e,fn(t){let{placement:a,rects:o,middlewareData:r}=t,s=r.arrow?.centerOffset!==0,l=s?0:e.arrowWidth,u=s?0:e.arrowHeight,[f,g]=Vc(a),i={start:"0%",center:"50%",end:"100%"}[g],c=(r.arrow?.x??0)+l/2,m=(r.arrow?.y??0)+u/2,h="",d="";return f==="bottom"?(h=s?i:`${c}px`,d=`${-u}px`):f==="top"?(h=s?i:`${c}px`,d=`${o.floating.height+u}px`):f==="right"?(h=`${-u}px`,d=s?i:`${m}px`):f==="left"&&(h=`${o.floating.width+u}px`,d=s?i:`${m}px`),{data:{x:h,y:d}}}});function Vc(e){let[t,a="center"]=e.split("-");return[t,a]}var Br=Oc,Or=Nc,_r=Uc,Nr=qc;var Wc=xa(aa(),1);import*as Ur from"react";import{jsx as $y}from"react/jsx-runtime";var Xy="Portal",Bo=Ur.forwardRef((e,t)=>{let{container:a,...o}=e,[r,n]=Ur.useState(!1);me(()=>n(!0),[]);let s=a||r&&globalThis?.document?.body;return s?Wc.default.createPortal($y(W.div,{...o,ref:t}),s):null});Bo.displayName=Xy;import*as zc from"react";import{jsx as jy}from"react/jsx-runtime";var Ss=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Ky="VisuallyHidden",$c=zc.forwardRef((e,t)=>jy(W.span,{...e,ref:t,style:{...Ss,...e.style}}));$c.displayName=Ky;var Xc=$c;var Yy=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},oo=new WeakMap,Hr=new WeakMap,qr={},vs=0,jc=function(e){return e&&(e.host||jc(e.parentNode))},Qy=function(e,t){return t.map(function(a){if(e.contains(a))return a;var o=jc(a);return o&&e.contains(o)?o:(console.error("aria-hidden",a,"in not contained inside",e,". Doing nothing"),null)}).filter(function(a){return!!a})},Jy=function(e,t,a,o){var r=Qy(t,Array.isArray(e)?e:[e]);qr[a]||(qr[a]=new WeakMap);var n=qr[a],s=[],l=new Set,u=new Set(r),f=function(i){!i||l.has(i)||(l.add(i),f(i.parentNode))};r.forEach(f);var g=function(i){!i||u.has(i)||Array.prototype.forEach.call(i.children,function(c){if(l.has(c))g(c);else try{var m=c.getAttribute(o),h=m!==null&&m!=="false",d=(oo.get(c)||0)+1,p=(n.get(c)||0)+1;oo.set(c,d),n.set(c,p),s.push(c),d===1&&h&&Hr.set(c,!0),p===1&&c.setAttribute(a,"true"),h||c.setAttribute(o,"true")}catch(x){console.error("aria-hidden: cannot operate on ",c,x)}})};return g(t),l.clear(),vs++,function(){s.forEach(function(i){var c=oo.get(i)-1,m=n.get(i)-1;oo.set(i,c),n.set(i,m),c||(Hr.has(i)||i.removeAttribute(o),Hr.delete(i)),m||i.removeAttribute(a)}),vs--,vs||(oo=new WeakMap,oo=new WeakMap,Hr=new WeakMap,qr={})}},Kc=function(e,t,a){a===void 0&&(a="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),r=t||Yy(e);return r?(o.push.apply(o,Array.from(r.querySelectorAll("[aria-live], script"))),Jy(o,r,a,"aria-hidden")):function(){return null}};var et=function(){return et=Object.assign||function(t){for(var a,o=1,r=arguments.length;o<r;o++){a=arguments[o];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(t[n]=a[n])}return t},et.apply(this,arguments)};function Vr(e,t){var a={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(a[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(a[o[r]]=e[o[r]]);return a}function Zc(e,t,a){if(a||arguments.length===2)for(var o=0,r=t.length,n;o<r;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))}import*as Xr from"react";import*as _e from"react";var Ea="right-scroll-bar-position",Ba="width-before-scroll-bar",Is="with-scroll-bars-hidden",ws="--removed-body-scroll-bar-size";function Gr(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}import{useState as eC}from"react";function Yc(e,t){var a=eC(function(){return{value:e,callback:t,facade:{get current(){return a.value},set current(o){var r=a.value;r!==o&&(a.value=o,a.callback(o,r))}}}})[0];return a.callback=t,a.facade}import*as Wr from"react";var tC=typeof window<"u"?Wr.useLayoutEffect:Wr.useEffect,Qc=new WeakMap;function Rs(e,t){var a=Yc(t||null,function(o){return e.forEach(function(r){return Gr(r,o)})});return tC(function(){var o=Qc.get(a);if(o){var r=new Set(o),n=new Set(e),s=a.current;r.forEach(function(l){n.has(l)||Gr(l,null)}),n.forEach(function(l){r.has(l)||Gr(l,s)})}Qc.set(a,e)},[e]),a}function aC(e){return e}function oC(e,t){t===void 0&&(t=aC);var a=[],o=!1,r={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return a.length?a[a.length-1]:e},useMedium:function(n){var s=t(n,o);return a.push(s),function(){a=a.filter(function(l){return l!==s})}},assignSyncMedium:function(n){for(o=!0;a.length;){var s=a;a=[],s.forEach(n)}a={push:function(l){return n(l)},filter:function(){return a}}},assignMedium:function(n){o=!0;var s=[];if(a.length){var l=a;a=[],l.forEach(n),s=a}var u=function(){var g=s;s=[],g.forEach(n)},f=function(){return Promise.resolve().then(u)};f(),a={push:function(g){s.push(g),f()},filter:function(g){return s=s.filter(g),a}}}};return r}function Ps(e){e===void 0&&(e={});var t=oC(null);return t.options=et({async:!0,ssr:!1},e),t}import*as Jc from"react";var ef=function(e){var t=e.sideCar,a=Vr(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 Jc.createElement(o,et({},a))};ef.isSideCarExport=!0;function ks(e,t){return e.useMedium(t),ef}var zr=Ps();var Ts=function(){},Oo=_e.forwardRef(function(e,t){var a=_e.useRef(null),o=_e.useState({onScrollCapture:Ts,onWheelCapture:Ts,onTouchMoveCapture:Ts}),r=o[0],n=o[1],s=e.forwardProps,l=e.children,u=e.className,f=e.removeScrollBar,g=e.enabled,i=e.shards,c=e.sideCar,m=e.noRelative,h=e.noIsolation,d=e.inert,p=e.allowPinchZoom,x=e.as,y=x===void 0?"div":x,C=e.gapMode,v=Vr(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=c,w=Rs([a,t]),b=et(et({},v),r);return _e.createElement(_e.Fragment,null,g&&_e.createElement(S,{sideCar:zr,removeScrollBar:f,shards:i,noRelative:m,noIsolation:h,inert:d,setCallbacks:n,allowPinchZoom:!!p,lockRef:a,gapMode:C}),s?_e.cloneElement(_e.Children.only(l),et(et({},b),{ref:w})):_e.createElement(y,et({},b,{className:u,ref:w}),l))});Oo.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Oo.classNames={fullWidth:Ba,zeroRight:Ea};import*as fe from"react";import*as no from"react";import*as of from"react";var tf;var af=function(){if(tf)return tf;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function rC(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=af();return t&&e.setAttribute("nonce",t),e}function nC(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function sC(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var As=function(){var e=0,t=null;return{add:function(a){e==0&&(t=rC())&&(nC(t,a),sC(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}};var Ms=function(){var e=As();return function(t,a){of.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&a])}};var _o=function(){var e=Ms(),t=function(a){var o=a.styles,r=a.dynamic;return e(o,r),null};return t};var lC={left:0,top:0,right:0,gap:0},Ds=function(e){return parseInt(e||"",10)||0},iC=function(e){var t=window.getComputedStyle(document.body),a=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],r=t[e==="padding"?"paddingRight":"marginRight"];return[Ds(a),Ds(o),Ds(r)]},Fs=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return lC;var t=iC(e),a=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-a+t[2]-t[0])}};var uC=_o(),ro="data-scroll-locked",dC=function(e,t,a,o){var r=e.left,n=e.top,s=e.right,l=e.gap;return a===void 0&&(a="margin"),`
|
|
6
6
|
.`.concat(Is,` {
|
|
7
7
|
overflow: hidden `).concat(o,`;
|
|
8
8
|
padding-right: `).concat(l,"px ").concat(o,`;
|
|
@@ -42,7 +42,7 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
|
|
|
42
42
|
`)},rf=function(){var e=parseInt(document.body.getAttribute(ro)||"0",10);return isFinite(e)?e:0},cC=function(){no.useEffect(function(){return document.body.setAttribute(ro,(rf()+1).toString()),function(){var e=rf()-1;e<=0?document.body.removeAttribute(ro):document.body.setAttribute(ro,e.toString())}},[])},Es=function(e){var t=e.noRelative,a=e.noImportant,o=e.gapMode,r=o===void 0?"margin":o;cC();var n=no.useMemo(function(){return Fs(r)},[r]);return no.createElement(uC,{styles:dC(n,!t,r,a?"":"!important")})};var Bs=!1;if(typeof window<"u")try{No=Object.defineProperty({},"passive",{get:function(){return Bs=!0,!0}}),window.addEventListener("test",No,No),window.removeEventListener("test",No,No)}catch{Bs=!1}var No,Oa=Bs?{passive:!1}:!1;var fC=function(e){return e.tagName==="TEXTAREA"},nf=function(e,t){if(!(e instanceof Element))return!1;var a=window.getComputedStyle(e);return a[t]!=="hidden"&&!(a.overflowY===a.overflowX&&!fC(e)&&a[t]==="visible")},pC=function(e){return nf(e,"overflowY")},mC=function(e){return nf(e,"overflowX")},Os=function(e,t){var a=t.ownerDocument,o=t;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var r=sf(e,o);if(r){var n=lf(e,o),s=n[1],l=n[2];if(s>l)return!0}o=o.parentNode}while(o&&o!==a.body);return!1},gC=function(e){var t=e.scrollTop,a=e.scrollHeight,o=e.clientHeight;return[t,a,o]},xC=function(e){var t=e.scrollLeft,a=e.scrollWidth,o=e.clientWidth;return[t,a,o]},sf=function(e,t){return e==="v"?pC(t):mC(t)},lf=function(e,t){return e==="v"?gC(t):xC(t)},hC=function(e,t){return e==="h"&&t==="rtl"?-1:1},uf=function(e,t,a,o,r){var n=hC(e,window.getComputedStyle(t).direction),s=n*o,l=a.target,u=t.contains(l),f=!1,g=s>0,i=0,c=0;do{if(!l)break;var m=lf(e,l),h=m[0],d=m[1],p=m[2],x=d-p-n*h;(h||x)&&sf(e,l)&&(i+=x,c+=h);var y=l.parentNode;l=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!u&&l!==document.body||u&&(t.contains(l)||t===l));return(g&&(r&&Math.abs(i)<1||!r&&s>i)||!g&&(r&&Math.abs(c)<1||!r&&-s>c))&&(f=!0),f};var $r=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},df=function(e){return[e.deltaX,e.deltaY]},cf=function(e){return e&&"current"in e?e.current:e},yC=function(e,t){return e[0]===t[0]&&e[1]===t[1]},CC=function(e){return`
|
|
43
43
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
44
44
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
45
|
-
`)},LC=0,so=[];function ff(e){var t=fe.useRef([]),a=fe.useRef([0,0]),o=fe.useRef(),r=fe.useState(LC++)[0],n=fe.useState(_o)[0],s=fe.useRef(e);fe.useEffect(function(){s.current=e},[e]),fe.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(r));var d=Zc([e.lockRef.current],(e.shards||[]).map(cf),!0).filter(Boolean);return d.forEach(function(p){return p.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),d.forEach(function(p){return p.classList.remove("allow-interactivity-".concat(r))})}}},[e.inert,e.lockRef.current,e.shards]);var l=fe.useCallback(function(d,p){if("touches"in d&&d.touches.length===2||d.type==="wheel"&&d.ctrlKey)return!s.current.allowPinchZoom;var x=$r(d),y=a.current,C="deltaX"in d?d.deltaX:y[0]-x[0],v="deltaY"in d?d.deltaY:y[1]-x[1],S,w=d.target,b=Math.abs(C)>Math.abs(v)?"h":"v";if("touches"in d&&b==="h"&&w.type==="range")return!1;var I=window.getSelection(),D=I&&I.anchorNode,F=D?D===w||D.contains(w):!1;if(F)return!1;var k=Os(b,w);if(!k)return!0;if(k?S=b:(S=b==="v"?"h":"v",k=Os(b,w)),!k)return!1;if(!o.current&&"changedTouches"in d&&(C||v)&&(o.current=S),!S)return!0;var T=o.current||S;return uf(T,p,d,T==="h"?C:v,!0)},[]),u=fe.useCallback(function(d){var p=d;if(!(!so.length||so[so.length-1]!==n)){var x="deltaY"in p?df(p):$r(p),y=t.current.filter(function(S){return S.name===p.type&&(S.target===p.target||p.target===S.shadowParent)&&yC(S.delta,x)})[0];if(y&&y.should){p.cancelable&&p.preventDefault();return}if(!y){var C=(s.current.shards||[]).map(cf).filter(Boolean).filter(function(S){return S.contains(p.target)}),v=C.length>0?l(p,C[0]):!s.current.noIsolation;v&&p.cancelable&&p.preventDefault()}}},[]),f=fe.useCallback(function(d,p,x,y){var C={name:d,delta:p,target:x,should:y,shadowParent:bC(x)};t.current.push(C),setTimeout(function(){t.current=t.current.filter(function(v){return v!==C})},1)},[]),g=fe.useCallback(function(d){a.current=$r(d),o.current=void 0},[]),i=fe.useCallback(function(d){f(d.type,df(d),d.target,l(d,e.lockRef.current))},[]),c=fe.useCallback(function(d){f(d.type,$r(d),d.target,l(d,e.lockRef.current))},[]);fe.useEffect(function(){return so.push(n),e.setCallbacks({onScrollCapture:i,onWheelCapture:i,onTouchMoveCapture:c}),document.addEventListener("wheel",u,Oa),document.addEventListener("touchmove",u,Oa),document.addEventListener("touchstart",g,Oa),function(){so=so.filter(function(d){return d!==n}),document.removeEventListener("wheel",u,Oa),document.removeEventListener("touchmove",u,Oa),document.removeEventListener("touchstart",g,Oa)}},[]);var m=e.removeScrollBar,h=e.inert;return fe.createElement(fe.Fragment,null,h?fe.createElement(n,{styles:CC(r)}):null,m?fe.createElement(Es,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function bC(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var pf=ks(zr,ff);var mf=Xr.forwardRef(function(e,t){return Xr.createElement(Oo,et({},e,{ref:t,sideCar:pf}))});mf.classNames=Oo.classNames;var _s=mf;import{Fragment as Ws,jsx as Y,jsxs as jr}from"react/jsx-runtime";var SC=[" ","Enter","ArrowUp","ArrowDown"],vC=[" ","Enter"],_a="Select",[Zr,Yr,IC]=br(_a),[lo,w0]=ve(_a,[IC,ao]),Qr=ao(),[wC,la]=lo(_a),[RC,PC]=lo(_a),gf=e=>{let{__scopeSelect:t,children:a,open:o,defaultOpen:r,onOpenChange:n,value:s,defaultValue:l,onValueChange:u,dir:f,name:g,autoComplete:i,disabled:c,required:m,form:h}=e,d=Qr(t),[p,x]=A.useState(null),[y,C]=A.useState(null),[v,S]=A.useState(!1),w=na(f),[b,I]=Ve({prop:o,defaultProp:r??!1,onChange:n,caller:_a}),[D,F]=Ve({prop:s,defaultProp:l,onChange:u,caller:_a}),k=A.useRef(null),T=p?h||!!p.closest("form"):!0,[q,z]=A.useState(new Set),j=Array.from(q).map(E=>E.props.value).join(";");return Y(Br,{...d,children:jr(wC,{required:m,scope:t,trigger:p,onTriggerChange:x,valueNode:y,onValueNodeChange:C,valueNodeHasChildren:v,onValueNodeHasChildrenChange:S,contentId:Pt(),value:D,onValueChange:F,open:b,onOpenChange:I,dir:w,triggerPointerDownPosRef:k,disabled:c,children:[Y(Zr.Provider,{scope:t,children:Y(RC,{scope:e.__scopeSelect,onNativeOptionAdd:A.useCallback(E=>{z(G=>new Set(G).add(E))},[]),onNativeOptionRemove:A.useCallback(E=>{z(G=>{let N=new Set(G);return N.delete(E),N})},[]),children:a})}),T?jr(Uf,{"aria-hidden":!0,required:m,tabIndex:-1,name:g,autoComplete:i,value:D,onChange:E=>F(E.target.value),disabled:c,form:h,children:[D===void 0?Y("option",{value:""}):null,Array.from(q)]},j):null]})})};gf.displayName=_a;var xf="SelectTrigger",hf=A.forwardRef((e,t)=>{let{__scopeSelect:a,disabled:o=!1,...r}=e,n=Qr(a),s=la(xf,a),l=s.disabled||o,u=J(t,s.onTriggerChange),f=Yr(a),g=A.useRef("touch"),[i,c,m]=qf(d=>{let p=f().filter(C=>!C.disabled),x=p.find(C=>C.value===s.value),y=Vf(p,d,x);y!==void 0&&s.onValueChange(y.value)}),h=d=>{l||(s.onOpenChange(!0),m()),d&&(s.triggerPointerDownPosRef.current={x:Math.round(d.pageX),y:Math.round(d.pageY)})};return Y(Or,{asChild:!0,...n,children:Y(W.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":Hf(s.value)?"":void 0,...r,ref:u,onClick:$(r.onClick,d=>{d.currentTarget.focus(),g.current!=="mouse"&&h(d)}),onPointerDown:$(r.onPointerDown,d=>{g.current=d.pointerType;let p=d.target;p.hasPointerCapture(d.pointerId)&&p.releasePointerCapture(d.pointerId),d.button===0&&d.ctrlKey===!1&&d.pointerType==="mouse"&&(h(d),d.preventDefault())}),onKeyDown:$(r.onKeyDown,d=>{let p=i.current!=="";!(d.ctrlKey||d.altKey||d.metaKey)&&d.key.length===1&&c(d.key),!(p&&d.key===" ")&&SC.includes(d.key)&&(h(),d.preventDefault())})})})});hf.displayName=xf;var yf="SelectValue",Cf=A.forwardRef((e,t)=>{let{__scopeSelect:a,className:o,style:r,children:n,placeholder:s="",...l}=e,u=la(yf,a),{onValueNodeHasChildrenChange:f}=u,g=n!==void 0,i=J(t,u.onValueNodeChange);return me(()=>{f(g)},[f,g]),Y(W.span,{...l,ref:i,style:{pointerEvents:"none"},children:Hf(u.value)?Y(Ws,{children:s}):n})});Cf.displayName=yf;var kC="SelectIcon",Lf=A.forwardRef((e,t)=>{let{__scopeSelect:a,children:o,...r}=e;return Y(W.span,{"aria-hidden":!0,...r,ref:t,children:o||"\u25BC"})});Lf.displayName=kC;var TC="SelectPortal",bf=e=>Y(Bo,{asChild:!0,...e});bf.displayName=TC;var Na="SelectContent",Sf=A.forwardRef((e,t)=>{let a=la(Na,e.__scopeSelect),[o,r]=A.useState();if(me(()=>{r(new DocumentFragment)},[]),!a.open){let n=o;return n?Gs.createPortal(Y(vf,{scope:e.__scopeSelect,children:Y(Zr.Slot,{scope:e.__scopeSelect,children:Y("div",{children:e.children})})}),n):null}return Y(If,{...e,ref:t})});Sf.displayName=Na;var yt=10,[vf,ia]=lo(Na),AC="SelectContentImpl",MC=Ia("SelectContent.RemoveScroll"),If=A.forwardRef((e,t)=>{let{__scopeSelect:a,position:o="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:n,onPointerDownOutside:s,side:l,sideOffset:u,align:f,alignOffset:g,arrowPadding:i,collisionBoundary:c,collisionPadding:m,sticky:h,hideWhenDetached:d,avoidCollisions:p,...x}=e,y=la(Na,a),[C,v]=A.useState(null),[S,w]=A.useState(null),b=J(t,V=>v(V)),[I,D]=A.useState(null),[F,k]=A.useState(null),T=Yr(a),[q,z]=A.useState(!1),j=A.useRef(!1);A.useEffect(()=>{if(C)return Kc(C)},[C]),kd();let E=A.useCallback(V=>{let[le,...Q]=T().map(ue=>ue.ref.current),[oe]=Q.slice(-1),ne=document.activeElement;for(let ue of V)if(ue===ne||(ue?.scrollIntoView({block:"nearest"}),ue===le&&S&&(S.scrollTop=0),ue===oe&&S&&(S.scrollTop=S.scrollHeight),ue?.focus(),document.activeElement!==ne))return},[T,S]),G=A.useCallback(()=>E([I,C]),[E,I,C]);A.useEffect(()=>{q&&G()},[q,G]);let{onOpenChange:N,triggerPointerDownPosRef:P}=y;A.useEffect(()=>{if(C){let V={x:0,y:0},le=oe=>{V={x:Math.abs(Math.round(oe.pageX)-(P.current?.x??0)),y:Math.abs(Math.round(oe.pageY)-(P.current?.y??0))}},Q=oe=>{V.x<=10&&V.y<=10?oe.preventDefault():C.contains(oe.target)||N(!1),document.removeEventListener("pointermove",le),P.current=null};return P.current!==null&&(document.addEventListener("pointermove",le),document.addEventListener("pointerup",Q,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",le),document.removeEventListener("pointerup",Q,{capture:!0})}}},[C,N,P]),A.useEffect(()=>{let V=()=>N(!1);return window.addEventListener("blur",V),window.addEventListener("resize",V),()=>{window.removeEventListener("blur",V),window.removeEventListener("resize",V)}},[N]);let[R,_]=qf(V=>{let le=T().filter(ne=>!ne.disabled),Q=le.find(ne=>ne.ref.current===document.activeElement),oe=Vf(le,V,Q);oe&&setTimeout(()=>oe.ref.current.focus())}),U=A.useCallback((V,le,Q)=>{let oe=!j.current&&!Q;(y.value!==void 0&&y.value===le||oe)&&(D(V),oe&&(j.current=!0))},[y.value]),Z=A.useCallback(()=>C?.focus(),[C]),Ce=A.useCallback((V,le,Q)=>{let oe=!j.current&&!Q;(y.value!==void 0&&y.value===le||oe)&&k(V)},[y.value]),ce=o==="popper"?Ns:wf,se=ce===Ns?{side:l,sideOffset:u,align:f,alignOffset:g,arrowPadding:i,collisionBoundary:c,collisionPadding:m,sticky:h,hideWhenDetached:d,avoidCollisions:p}:{};return Y(vf,{scope:a,content:C,viewport:S,onViewportChange:w,itemRefCallback:U,selectedItem:I,onItemLeave:Z,itemTextRefCallback:Ce,focusSelectedItem:G,selectedItemText:F,position:o,isPositioned:q,searchRef:R,children:Y(_s,{as:MC,allowPinchZoom:!0,children:Y(cs,{asChild:!0,trapped:y.open,onMountAutoFocus:V=>{V.preventDefault()},onUnmountAutoFocus:$(r,V=>{y.trigger?.focus({preventScroll:!0}),V.preventDefault()}),children:Y(To,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:V=>V.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:Y(ce,{role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:V=>V.preventDefault(),...x,...se,onPlaced:()=>z(!0),ref:b,style:{display:"flex",flexDirection:"column",outline:"none",...x.style},onKeyDown:$(x.onKeyDown,V=>{let le=V.ctrlKey||V.altKey||V.metaKey;if(V.key==="Tab"&&V.preventDefault(),!le&&V.key.length===1&&_(V.key),["ArrowUp","ArrowDown","Home","End"].includes(V.key)){let oe=T().filter(ne=>!ne.disabled).map(ne=>ne.ref.current);if(["ArrowUp","End"].includes(V.key)&&(oe=oe.slice().reverse()),["ArrowUp","ArrowDown"].includes(V.key)){let ne=V.target,ue=oe.indexOf(ne);oe=oe.slice(ue+1)}setTimeout(()=>E(oe)),V.preventDefault()}})})})})})})});If.displayName=AC;var DC="SelectItemAlignedPosition",wf=A.forwardRef((e,t)=>{let{__scopeSelect:a,onPlaced:o,...r}=e,n=la(Na,a),s=ia(Na,a),[l,u]=A.useState(null),[f,g]=A.useState(null),i=J(t,b=>g(b)),c=Yr(a),m=A.useRef(!1),h=A.useRef(!0),{viewport:d,selectedItem:p,selectedItemText:x,focusSelectedItem:y}=s,C=A.useCallback(()=>{if(n.trigger&&n.valueNode&&l&&f&&d&&p&&x){let b=n.trigger.getBoundingClientRect(),I=f.getBoundingClientRect(),D=n.valueNode.getBoundingClientRect(),F=x.getBoundingClientRect();if(n.dir!=="rtl"){let ne=F.left-I.left,ue=D.left-ne,Ee=b.left-ue,st=b.width+Ee,Nn=Math.max(st,I.width),Un=window.innerWidth-yt,Hn=ns(ue,[yt,Math.max(yt,Un-Nn)]);l.style.minWidth=st+"px",l.style.left=Hn+"px"}else{let ne=I.right-F.right,ue=window.innerWidth-D.right-ne,Ee=window.innerWidth-b.right-ue,st=b.width+Ee,Nn=Math.max(st,I.width),Un=window.innerWidth-yt,Hn=ns(ue,[yt,Math.max(yt,Un-Nn)]);l.style.minWidth=st+"px",l.style.right=Hn+"px"}let k=c(),T=window.innerHeight-yt*2,q=d.scrollHeight,z=window.getComputedStyle(f),j=parseInt(z.borderTopWidth,10),E=parseInt(z.paddingTop,10),G=parseInt(z.borderBottomWidth,10),N=parseInt(z.paddingBottom,10),P=j+E+q+N+G,R=Math.min(p.offsetHeight*5,P),_=window.getComputedStyle(d),U=parseInt(_.paddingTop,10),Z=parseInt(_.paddingBottom,10),Ce=b.top+b.height/2-yt,ce=T-Ce,se=p.offsetHeight/2,V=p.offsetTop+se,le=j+E+V,Q=P-le;if(le<=Ce){let ne=k.length>0&&p===k[k.length-1].ref.current;l.style.bottom="0px";let ue=f.clientHeight-d.offsetTop-d.offsetHeight,Ee=Math.max(ce,se+(ne?Z:0)+ue+G),st=le+Ee;l.style.height=st+"px"}else{let ne=k.length>0&&p===k[0].ref.current;l.style.top="0px";let Ee=Math.max(Ce,j+d.offsetTop+(ne?U:0)+se)+Q;l.style.height=Ee+"px",d.scrollTop=le-Ce+d.offsetTop}l.style.margin=`${yt}px 0`,l.style.minHeight=R+"px",l.style.maxHeight=T+"px",o?.(),requestAnimationFrame(()=>m.current=!0)}},[c,n.trigger,n.valueNode,l,f,d,p,x,n.dir,o]);me(()=>C(),[C]);let[v,S]=A.useState();me(()=>{f&&S(window.getComputedStyle(f).zIndex)},[f]);let w=A.useCallback(b=>{b&&h.current===!0&&(C(),y?.(),h.current=!1)},[C,y]);return Y(EC,{scope:a,contentWrapper:l,shouldExpandOnScrollRef:m,onScrollButtonChange:w,children:Y("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:v},children:Y(W.div,{...r,ref:i,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})});wf.displayName=DC;var FC="SelectPopperPosition",Ns=A.forwardRef((e,t)=>{let{__scopeSelect:a,align:o="start",collisionPadding:r=yt,...n}=e,s=Qr(a);return Y(_r,{...s,...n,ref:t,align:o,collisionPadding:r,style:{boxSizing:"border-box",...n.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Ns.displayName=FC;var[EC,zs]=lo(Na,{}),Us="SelectViewport",Rf=A.forwardRef((e,t)=>{let{__scopeSelect:a,nonce:o,...r}=e,n=ia(Us,a),s=zs(Us,a),l=J(t,n.onViewportChange),u=A.useRef(0);return jr(Ws,{children:[Y("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),Y(Zr.Slot,{scope:a,children:Y(W.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:$(r.onScroll,f=>{let g=f.currentTarget,{contentWrapper:i,shouldExpandOnScrollRef:c}=s;if(c?.current&&i){let m=Math.abs(u.current-g.scrollTop);if(m>0){let h=window.innerHeight-yt*2,d=parseFloat(i.style.minHeight),p=parseFloat(i.style.height),x=Math.max(d,p);if(x<h){let y=x+m,C=Math.min(h,y),v=y-C;i.style.height=C+"px",i.style.bottom==="0px"&&(g.scrollTop=v>0?v:0,i.style.justifyContent="flex-end")}}}u.current=g.scrollTop})})})]})});Rf.displayName=Us;var Pf="SelectGroup",[BC,OC]=lo(Pf),_C=A.forwardRef((e,t)=>{let{__scopeSelect:a,...o}=e,r=Pt();return Y(BC,{scope:a,id:r,children:Y(W.div,{role:"group","aria-labelledby":r,...o,ref:t})})});_C.displayName=Pf;var kf="SelectLabel",Tf=A.forwardRef((e,t)=>{let{__scopeSelect:a,...o}=e,r=OC(kf,a);return Y(W.div,{id:r.id,...o,ref:t})});Tf.displayName=kf;var Kr="SelectItem",[NC,Af]=lo(Kr),Mf=A.forwardRef((e,t)=>{let{__scopeSelect:a,value:o,disabled:r=!1,textValue:n,...s}=e,l=la(Kr,a),u=ia(Kr,a),f=l.value===o,[g,i]=A.useState(n??""),[c,m]=A.useState(!1),h=J(t,y=>u.itemRefCallback?.(y,o,r)),d=Pt(),p=A.useRef("touch"),x=()=>{r||(l.onValueChange(o),l.onOpenChange(!1))};if(o==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return Y(NC,{scope:a,value:o,disabled:r,textId:d,isSelected:f,onItemTextChange:A.useCallback(y=>{i(C=>C||(y?.textContent??"").trim())},[]),children:Y(Zr.ItemSlot,{scope:a,value:o,disabled:r,textValue:g,children:Y(W.div,{role:"option","aria-labelledby":d,"data-highlighted":c?"":void 0,"aria-selected":f&&c,"data-state":f?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...s,ref:h,onFocus:$(s.onFocus,()=>m(!0)),onBlur:$(s.onBlur,()=>m(!1)),onClick:$(s.onClick,()=>{p.current!=="mouse"&&x()}),onPointerUp:$(s.onPointerUp,()=>{p.current==="mouse"&&x()}),onPointerDown:$(s.onPointerDown,y=>{p.current=y.pointerType}),onPointerMove:$(s.onPointerMove,y=>{p.current=y.pointerType,r?u.onItemLeave?.():p.current==="mouse"&&y.currentTarget.focus({preventScroll:!0})}),onPointerLeave:$(s.onPointerLeave,y=>{y.currentTarget===document.activeElement&&u.onItemLeave?.()}),onKeyDown:$(s.onKeyDown,y=>{u.searchRef?.current!==""&&y.key===" "||(vC.includes(y.key)&&x(),y.key===" "&&y.preventDefault())})})})})});Mf.displayName=Kr;var Uo="SelectItemText",Df=A.forwardRef((e,t)=>{let{__scopeSelect:a,className:o,style:r,...n}=e,s=la(Uo,a),l=ia(Uo,a),u=Af(Uo,a),f=PC(Uo,a),[g,i]=A.useState(null),c=J(t,x=>i(x),u.onItemTextChange,x=>l.itemTextRefCallback?.(x,u.value,u.disabled)),m=g?.textContent,h=A.useMemo(()=>Y("option",{value:u.value,disabled:u.disabled,children:m},u.value),[u.disabled,u.value,m]),{onNativeOptionAdd:d,onNativeOptionRemove:p}=f;return me(()=>(d(h),()=>p(h)),[d,p,h]),jr(Ws,{children:[Y(W.span,{id:u.textId,...n,ref:c}),u.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Gs.createPortal(n.children,s.valueNode):null]})});Df.displayName=Uo;var Ff="SelectItemIndicator",Ef=A.forwardRef((e,t)=>{let{__scopeSelect:a,...o}=e;return Af(Ff,a).isSelected?Y(W.span,{"aria-hidden":!0,...o,ref:t}):null});Ef.displayName=Ff;var Hs="SelectScrollUpButton",Bf=A.forwardRef((e,t)=>{let a=ia(Hs,e.__scopeSelect),o=zs(Hs,e.__scopeSelect),[r,n]=A.useState(!1),s=J(t,o.onScrollButtonChange);return me(()=>{if(a.viewport&&a.isPositioned){let u=function(){let g=f.scrollTop>0;n(g)};var l=u;let f=a.viewport;return u(),f.addEventListener("scroll",u),()=>f.removeEventListener("scroll",u)}},[a.viewport,a.isPositioned]),r?Y(_f,{...e,ref:s,onAutoScroll:()=>{let{viewport:l,selectedItem:u}=a;l&&u&&(l.scrollTop=l.scrollTop-u.offsetHeight)}}):null});Bf.displayName=Hs;var qs="SelectScrollDownButton",Of=A.forwardRef((e,t)=>{let a=ia(qs,e.__scopeSelect),o=zs(qs,e.__scopeSelect),[r,n]=A.useState(!1),s=J(t,o.onScrollButtonChange);return me(()=>{if(a.viewport&&a.isPositioned){let u=function(){let g=f.scrollHeight-f.clientHeight,i=Math.ceil(f.scrollTop)<g;n(i)};var l=u;let f=a.viewport;return u(),f.addEventListener("scroll",u),()=>f.removeEventListener("scroll",u)}},[a.viewport,a.isPositioned]),r?Y(_f,{...e,ref:s,onAutoScroll:()=>{let{viewport:l,selectedItem:u}=a;l&&u&&(l.scrollTop=l.scrollTop+u.offsetHeight)}}):null});Of.displayName=qs;var _f=A.forwardRef((e,t)=>{let{__scopeSelect:a,onAutoScroll:o,...r}=e,n=ia("SelectScrollButton",a),s=A.useRef(null),l=Yr(a),u=A.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return A.useEffect(()=>()=>u(),[u]),me(()=>{l().find(g=>g.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[l]),Y(W.div,{"aria-hidden":!0,...r,ref:t,style:{flexShrink:0,...r.style},onPointerDown:$(r.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(o,50))}),onPointerMove:$(r.onPointerMove,()=>{n.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(o,50))}),onPointerLeave:$(r.onPointerLeave,()=>{u()})})}),UC="SelectSeparator",Nf=A.forwardRef((e,t)=>{let{__scopeSelect:a,...o}=e;return Y(W.div,{"aria-hidden":!0,...o,ref:t})});Nf.displayName=UC;var Vs="SelectArrow",HC=A.forwardRef((e,t)=>{let{__scopeSelect:a,...o}=e,r=Qr(a),n=la(Vs,a),s=ia(Vs,a);return n.open&&s.position==="popper"?Y(Nr,{...r,...o,ref:t}):null});HC.displayName=Vs;var qC="SelectBubbleInput",Uf=A.forwardRef(({__scopeSelect:e,value:t,...a},o)=>{let r=A.useRef(null),n=J(o,r),s=Jt(t);return A.useEffect(()=>{let l=r.current;if(!l)return;let u=window.HTMLSelectElement.prototype,g=Object.getOwnPropertyDescriptor(u,"value").set;if(s!==t&&g){let i=new Event("change",{bubbles:!0});g.call(l,t),l.dispatchEvent(i)}},[s,t]),Y(W.select,{...a,style:{...Ss,...a.style},ref:n,defaultValue:t})});Uf.displayName=qC;function Hf(e){return e===""||e===void 0}function qf(e){let t=Ye(e),a=A.useRef(""),o=A.useRef(0),r=A.useCallback(s=>{let l=a.current+s;t(l),(function u(f){a.current=f,window.clearTimeout(o.current),f!==""&&(o.current=window.setTimeout(()=>u(""),1e3))})(l)},[t]),n=A.useCallback(()=>{a.current="",window.clearTimeout(o.current)},[]);return A.useEffect(()=>()=>window.clearTimeout(o.current),[]),[a,r,n]}function Vf(e,t,a){let r=t.length>1&&Array.from(t).every(f=>f===t[0])?t[0]:t,n=a?e.indexOf(a):-1,s=VC(e,Math.max(n,0));r.length===1&&(s=s.filter(f=>f!==a));let u=s.find(f=>f.textValue.toLowerCase().startsWith(r.toLowerCase()));return u!==a?u:void 0}function VC(e,t){return e.map((a,o)=>e[(t+o)%e.length])}var Gf=gf,Jr=hf,Wf=Cf,zf=Lf,$f=bf,$s=Sf,Xf=Rf;var Xs=Tf,js=Mf,jf=Df,Kf=Ef,Ks=Bf,Zs=Of,Ys=Nf;import{jsx as Ne,jsxs as Js}from"react/jsx-runtime";var Zf=Gf;var Qs=Wf,en=({ref:e,className:t,children:a,...o})=>Js(Jr,{ref:e,className:re("border-input bg-background ring-offset-background data-placeholder:text-muted-foreground focus:ring-ring flex h-10 w-full items-center justify-between rounded-md border px-3 py-2 md:text-sm focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),...o,children:[a,Ne(zf,{asChild:!0,children:Ne(Xa,{className:"h-4 w-4 opacity-50"})})]});en.displayName=Jr.displayName;var Yf=({ref:e,className:t,...a})=>Ne(Ks,{ref:e,className:re("flex cursor-default items-center justify-center py-1",t),...a,children:Ne(yo,{className:"h-4 w-4"})});Yf.displayName=Ks.displayName;var Qf=({ref:e,className:t,...a})=>Ne(Zs,{ref:e,className:re("flex cursor-default items-center justify-center py-1",t),...a,children:Ne(Xa,{className:"h-4 w-4"})});Qf.displayName=Zs.displayName;var tn=({ref:e,className:t,children:a,position:o="popper",...r})=>Ne($f,{children:Js($s,{ref:e,className:re("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-96 min-w-32 overflow-hidden rounded-md border shadow-md",o==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:o,...r,children:[Ne(Yf,{}),Ne(Xf,{className:re("p-1",o==="popper"&&"h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width)"),children:a}),Ne(Qf,{})]})});tn.displayName=$s.displayName;var an=({ref:e,className:t,...a})=>Ne(Xs,{ref:e,className:re("py-1.5 pr-2 pl-8 text-sm font-semibold",t),...a});an.displayName=Xs.displayName;var on=({ref:e,className:t,children:a,...o})=>Js(js,{ref:e,className:re("focus:bg-accent focus:text-accent-foreground relative flex w-full cursor-default items-center rounded-xs py-1.5 pr-2 pl-8 text-sm outline-none select-none data-disabled:pointer-events-none data-disabled:opacity-50",t),...o,children:[Ne("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:Ne(Kf,{children:Ne(ha,{className:"h-4 w-4"})})}),Ne(jf,{children:a})]});on.displayName=js.displayName;var rn=({ref:e,className:t,...a})=>Ne(Ys,{ref:e,className:re("bg-muted -mx-1 my-1 h-px",t),...a});rn.displayName=Ys.displayName;import{jsx as Ua}from"react/jsx-runtime";var ua=Zf;var qt=({...e})=>Ua(Qs,{translate:"no",...e});qt.displayName=Qs.displayName;var Vt=({ref:e,className:t,children:a,...o})=>Ua(en,{ref:e,className:de("dark:bg-polar-800 dark:hover:bg-polar-700 dark:hover:border-polar-700 dark:border-polar-700 flex cursor-pointer flex-row gap-x-2 rounded-xl border border-gray-200 bg-white px-3 shadow-xs transition-colors hover:border-gray-300 dark:text-white text-black",t),...o,children:a});Vt.displayName=en.displayName;var Gt=({ref:e,className:t,children:a,position:o="popper",...r})=>Ua(tn,{ref:e,position:o,className:de("ruba-app dark:bg-polar-800 rounded-xl border-none",t),translate:"no",...r,children:a});Gt.displayName=tn.displayName;var Jf=({ref:e,className:t,...a})=>Ua(an,{ref:e,className:t,...a});Jf.displayName=an.displayName;var Wt=({ref:e,className:t,children:a,...o})=>Ua(on,{ref:e,className:de(t,"cursor-pointer rounded-lg"),...o,children:Ua("div",{children:a})});Wt.displayName=on.displayName;var ep=({ref:e,className:t,...a})=>Ua(rn,{ref:e,className:de("",t),...a});ep.displayName=rn.displayName;import{Fragment as U0,jsx as H0,jsxs as q0}from"react/jsx-runtime";import{Fragment as Z0,jsx as K0,jsxs as Y0}from"react/jsx-runtime";import{jsx as tT,jsxs as aT}from"react/jsx-runtime";var XC=xa(aa(),1);import{useCallback as pT,useEffect as mT,useRef as gT}from"react";import{jsx as yT,jsxs as CT}from"react/jsx-runtime";import{jsx as jC}from"react/jsx-runtime";var el=({ref:e,className:t,type:a,...o})=>jC("input",{type:a,className:re("border-input bg-background ring-offset-background file:text-foreground placeholder:text-muted-foreground focus-visible:ring-ring flex h-10 w-full rounded-md border px-3 py-2 text-base file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t),ref:e,...o});el.displayName="Input";import{jsx as tl,jsxs as KC}from"react/jsx-runtime";var ye=({ref:e,preSlot:t,postSlot:a,className:o,...r})=>KC("div",{className:"relative flex flex-1 flex-row rounded-full",children:[tl(el,{className:de("dark:placeholder:text-polar-500 dark:border-polar-700 dark:bg-polar-800 h-10 rounded-xl border border-gray-200 bg-white px-3 py-2 text-base text-gray-950 shadow-xs outline-none placeholder:text-gray-400 focus:z-10 focus:border-blue-300 focus:ring-[3px] focus:ring-blue-100 focus-visible:ring-blue-100 md:text-sm dark:text-white dark:ring-offset-transparent dark:focus:border-blue-600 dark:focus:ring-blue-700/40",t?"pl-10":"",a?"pr-10":"",o),ref:e,...r}),t&&tl("div",{className:"dark:text-polar-400 pointer-events-none absolute inset-y-0 left-0 z-10 flex items-center pl-3 text-gray-500",children:t}),a&&tl("div",{className:"dark:text-polar-400 pointer-events-none absolute inset-y-0 right-0 z-10 flex items-center pr-4 text-gray-500",children:a})]});ye.displayName="Input";import{jsx as TT}from"react/jsx-runtime";import{jsx as tp}from"react/jsx-runtime";var ZC=({children:e})=>tp("div",{className:"dark:ring-polar-700 w-full overflow-hidden rounded-2xl bg-transparent ring-1 ring-gray-200 dark:ring-1",children:e}),YC=({children:e})=>tp("div",{className:"dark:border-polar-700 border-t border-gray-200 p-5 first:border-t-0",children:e}),QC=Object.assign(ZC,{Item:YC});var JC=xa(aa(),1);import ET,{useCallback as _T,useEffect as NT}from"react";import{jsx as VT,jsxs as GT}from"react/jsx-runtime";import{jsx as $T}from"react/jsx-runtime";import{jsx as QT}from"react/jsx-runtime";var KT=Ot("flex items-center gap-x-1 p-1",{variants:{size:{sm:"rounded-full",md:"rounded-full",lg:"rounded-full"},variant:{default:"dark:bg-polar-800 bg-gray-50",tabs:"dark:bg-polar-950 w-full bg-gray-100"}},defaultVariants:{size:"md",variant:"default"}}),ZT=Ot("cursor-pointer font-medium transition-colors",{variants:{size:{sm:"px-2.5 py-1 text-xs",md:"px-3 py-1.5 text-xs",lg:"px-4 py-2 text-sm"},variant:{default:"rounded-full",tabs:"grow rounded-full"},active:{true:"",false:"dark:text-polar-500 text-gray-500 hover:text-gray-900 dark:hover:text-white"}},compoundVariants:[{variant:"default",active:!0,className:"dark:bg-polar-700 bg-white text-black shadow-lg dark:text-white"},{variant:"tabs",active:!0,className:"dark:bg-polar-800 bg-white text-black shadow-lg dark:text-white"}],defaultVariants:{size:"md",variant:"default",active:!1}});import{jsx as tA,jsxs as aA}from"react/jsx-runtime";import{jsx as nA}from"react/jsx-runtime";import*as Ct from"react";import{jsx as nn,jsxs as eL}from"react/jsx-runtime";var sn="Switch",[tL,gA]=ve(sn),[aL,oL]=tL(sn),ap=Ct.forwardRef((e,t)=>{let{__scopeSwitch:a,name:o,checked:r,defaultChecked:n,required:s,disabled:l,value:u="on",onCheckedChange:f,form:g,...i}=e,[c,m]=Ct.useState(null),h=J(t,C=>m(C)),d=Ct.useRef(!1),p=c?g||!!c.closest("form"):!0,[x,y]=Ve({prop:r,defaultProp:n??!1,onChange:f,caller:sn});return eL(aL,{scope:a,checked:x,disabled:l,children:[nn(W.button,{type:"button",role:"switch","aria-checked":x,"aria-required":s,"data-state":sp(x),"data-disabled":l?"":void 0,disabled:l,value:u,...i,ref:h,onClick:$(e.onClick,C=>{y(v=>!v),p&&(d.current=C.isPropagationStopped(),d.current||C.stopPropagation())})}),p&&nn(np,{control:c,bubbles:!d.current,name:o,value:u,checked:x,required:s,disabled:l,form:g,style:{transform:"translateX(-100%)"}})]})});ap.displayName=sn;var op="SwitchThumb",rp=Ct.forwardRef((e,t)=>{let{__scopeSwitch:a,...o}=e,r=oL(op,a);return nn(W.span,{"data-state":sp(r.checked),"data-disabled":r.disabled?"":void 0,...o,ref:t})});rp.displayName=op;var rL="SwitchBubbleInput",np=Ct.forwardRef(({__scopeSwitch:e,control:t,checked:a,bubbles:o=!0,...r},n)=>{let s=Ct.useRef(null),l=J(s,n),u=Jt(a),f=ea(t);return Ct.useEffect(()=>{let g=s.current;if(!g)return;let i=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(i,"checked").set;if(u!==a&&m){let h=new Event("click",{bubbles:o});m.call(g,a),g.dispatchEvent(h)}},[u,a,o]),nn("input",{type:"checkbox","aria-hidden":!0,defaultChecked:a,...r,tabIndex:-1,ref:l,style:{...r.style,...f,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});np.displayName=rL;function sp(e){return e?"checked":"unchecked"}var al=ap,lp=rp;import{jsx as ip}from"react/jsx-runtime";var up=({ref:e,className:t,...a})=>ip(al,{className:de("focus-visible:ring-ring focus-visible:ring-offset-background data-[state=checked]:bg-primary dark:data-[state=unchecked]:bg-polar-700 peer inline-flex h-6 w-10 shrink-0 cursor-pointer items-center rounded-full border border-transparent transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 data-[state=unchecked]:bg-gray-200",t),...a,ref:e,children:ip(lp,{className:de("pointer-events-none block h-5 w-5 rounded-full bg-white shadow-md ring-0 transition-transform data-[state=checked]:translate-x-[18px] data-[state=unchecked]:translate-x-px")})});up.displayName=al.displayName;import*as zt from"react";import*as Ae from"react";import{jsx as Ha}from"react/jsx-runtime";var ol="rovingFocusGroup.onEntryFocus",sL={bubbles:!1,cancelable:!0},Ho="RovingFocusGroup",[rl,dp,lL]=br(Ho),[iL,io]=ve(Ho,[lL]),[uL,dL]=iL(Ho),cp=Ae.forwardRef((e,t)=>Ha(rl.Provider,{scope:e.__scopeRovingFocusGroup,children:Ha(rl.Slot,{scope:e.__scopeRovingFocusGroup,children:Ha(cL,{...e,ref:t})})}));cp.displayName=Ho;var cL=Ae.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:a,orientation:o,loop:r=!1,dir:n,currentTabStopId:s,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:u,onEntryFocus:f,preventScrollOnEntryFocus:g=!1,...i}=e,c=Ae.useRef(null),m=J(t,c),h=na(n),[d,p]=Ve({prop:s,defaultProp:l??null,onChange:u,caller:Ho}),[x,y]=Ae.useState(!1),C=Ye(f),v=dp(a),S=Ae.useRef(!1),[w,b]=Ae.useState(0);return Ae.useEffect(()=>{let I=c.current;if(I)return I.addEventListener(ol,C),()=>I.removeEventListener(ol,C)},[C]),Ha(uL,{scope:a,orientation:o,dir:h,loop:r,currentTabStopId:d,onItemFocus:Ae.useCallback(I=>p(I),[p]),onItemShiftTab:Ae.useCallback(()=>y(!0),[]),onFocusableItemAdd:Ae.useCallback(()=>b(I=>I+1),[]),onFocusableItemRemove:Ae.useCallback(()=>b(I=>I-1),[]),children:Ha(W.div,{tabIndex:x||w===0?-1:0,"data-orientation":o,...i,ref:m,style:{outline:"none",...e.style},onMouseDown:$(e.onMouseDown,()=>{S.current=!0}),onFocus:$(e.onFocus,I=>{let D=!S.current;if(I.target===I.currentTarget&&D&&!x){let F=new CustomEvent(ol,sL);if(I.currentTarget.dispatchEvent(F),!F.defaultPrevented){let k=v().filter(E=>E.focusable),T=k.find(E=>E.active),q=k.find(E=>E.id===d),j=[T,q,...k].filter(Boolean).map(E=>E.ref.current);mp(j,g)}}S.current=!1}),onBlur:$(e.onBlur,()=>y(!1))})})}),fp="RovingFocusGroupItem",pp=Ae.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:a,focusable:o=!0,active:r=!1,tabStopId:n,children:s,...l}=e,u=Pt(),f=n||u,g=dL(fp,a),i=g.currentTabStopId===f,c=dp(a),{onFocusableItemAdd:m,onFocusableItemRemove:h,currentTabStopId:d}=g;return Ae.useEffect(()=>{if(o)return m(),()=>h()},[o,m,h]),Ha(rl.ItemSlot,{scope:a,id:f,focusable:o,active:r,children:Ha(W.span,{tabIndex:i?0:-1,"data-orientation":g.orientation,...l,ref:t,onMouseDown:$(e.onMouseDown,p=>{o?g.onItemFocus(f):p.preventDefault()}),onFocus:$(e.onFocus,()=>g.onItemFocus(f)),onKeyDown:$(e.onKeyDown,p=>{if(p.key==="Tab"&&p.shiftKey){g.onItemShiftTab();return}if(p.target!==p.currentTarget)return;let x=mL(p,g.orientation,g.dir);if(x!==void 0){if(p.metaKey||p.ctrlKey||p.altKey||p.shiftKey)return;p.preventDefault();let C=c().filter(v=>v.focusable).map(v=>v.ref.current);if(x==="last")C.reverse();else if(x==="prev"||x==="next"){x==="prev"&&C.reverse();let v=C.indexOf(p.currentTarget);C=g.loop?gL(C,v+1):C.slice(v+1)}setTimeout(()=>mp(C))}}),children:typeof s=="function"?s({isCurrentTabStop:i,hasTabStop:d!=null}):s})})});pp.displayName=fp;var fL={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function pL(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function mL(e,t,a){let o=pL(e.key,a);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return fL[o]}function mp(e,t=!1){let a=document.activeElement;for(let o of e)if(o===a||(o.focus({preventScroll:t}),document.activeElement!==a))return}function gL(e,t){return e.map((a,o)=>e[(t+o)%e.length])}var ln=cp,un=pp;import{jsx as da}from"react/jsx-runtime";var dn="Tabs",[xL,NA]=ve(dn,[io]),xp=io(),[hL,nl]=xL(dn),yL=zt.forwardRef((e,t)=>{let{__scopeTabs:a,value:o,onValueChange:r,defaultValue:n,orientation:s="horizontal",dir:l,activationMode:u="automatic",...f}=e,g=na(l),[i,c]=Ve({prop:o,onChange:r,defaultProp:n??"",caller:dn});return da(hL,{scope:a,baseId:Pt(),value:i,onValueChange:c,orientation:s,dir:g,activationMode:u,children:da(W.div,{dir:g,"data-orientation":s,...f,ref:t})})});yL.displayName=dn;var hp="TabsList",yp=zt.forwardRef((e,t)=>{let{__scopeTabs:a,loop:o=!0,...r}=e,n=nl(hp,a),s=xp(a);return da(ln,{asChild:!0,...s,orientation:n.orientation,dir:n.dir,loop:o,children:da(W.div,{role:"tablist","aria-orientation":n.orientation,...r,ref:t})})});yp.displayName=hp;var Cp="TabsTrigger",Lp=zt.forwardRef((e,t)=>{let{__scopeTabs:a,value:o,disabled:r=!1,...n}=e,s=nl(Cp,a),l=xp(a),u=vp(s.baseId,o),f=Ip(s.baseId,o),g=o===s.value;return da(un,{asChild:!0,...l,focusable:!r,active:g,children:da(W.button,{type:"button",role:"tab","aria-selected":g,"aria-controls":f,"data-state":g?"active":"inactive","data-disabled":r?"":void 0,disabled:r,id:u,...n,ref:t,onMouseDown:$(e.onMouseDown,i=>{!r&&i.button===0&&i.ctrlKey===!1?s.onValueChange(o):i.preventDefault()}),onKeyDown:$(e.onKeyDown,i=>{[" ","Enter"].includes(i.key)&&s.onValueChange(o)}),onFocus:$(e.onFocus,()=>{let i=s.activationMode!=="manual";!g&&!r&&i&&s.onValueChange(o)})})})});Lp.displayName=Cp;var bp="TabsContent",Sp=zt.forwardRef((e,t)=>{let{__scopeTabs:a,value:o,forceMount:r,children:n,...s}=e,l=nl(bp,a),u=vp(l.baseId,o),f=Ip(l.baseId,o),g=o===l.value,i=zt.useRef(g);return zt.useEffect(()=>{let c=requestAnimationFrame(()=>i.current=!1);return()=>cancelAnimationFrame(c)},[]),da(Rt,{present:r||g,children:({present:c})=>da(W.div,{"data-state":g?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":u,hidden:!c,id:f,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:i.current?"0s":void 0},children:c&&n})})});Sp.displayName=bp;function vp(e,t){return`${e}-trigger-${t}`}function Ip(e,t){return`${e}-content-${t}`}var sl=yp,ll=Lp,il=Sp;import{jsx as ul}from"react/jsx-runtime";var cn=({ref:e,className:t,...a})=>ul(sl,{ref:e,className:re("bg-muted text-muted-foreground inline-flex h-10 items-center justify-center rounded-md p-1",t),...a});cn.displayName=sl.displayName;var fn=({ref:e,className:t,...a})=>ul(ll,{ref:e,className:re("ring-offset-background focus-visible:ring-ring data-[state=active]:bg-background data-[state=active]:text-foreground inline-flex items-center justify-center rounded-xl px-3 py-1.5 text-sm font-medium whitespace-nowrap transition-all focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-xs",t),...a});fn.displayName=ll.displayName;var pn=({ref:e,className:t,...a})=>ul(il,{ref:e,className:re("ring-offset-background focus-visible:ring-ring mt-2 focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",t),...a});pn.displayName=il.displayName;import{jsx as dl}from"react/jsx-runtime";var wp=({ref:e,className:t,vertical:a,...o})=>dl(cn,{ref:e,className:de("relative flex h-fit w-fit flex-row items-start gap-2 rounded-2xl bg-transparent ring-0 md:flex-row dark:bg-transparent dark:ring-0",a?"flex-col md:flex-col":"md:flex-row md:items-center md:justify-start",t),...o});wp.displayName=cn.displayName;var Rp=({ref:e,className:t,size:a="default",...o})=>dl(fn,{ref:e,className:de("dark:data-[state=active]:bg-polar-700 dark:hover:text-polar-50 dark:text-polar-500 cursor-pointer px-4 text-gray-400 hover:text-black data-[state=active]:rounded-xl data-[state=active]:bg-gray-100 data-[state=active]:text-black data-[state=active]:shadow-none dark:data-[state=active]:text-white",a==="default"?"text-sm":"text-xs",t),...o});Rp.displayName=fn.displayName;var Pp=({ref:e,className:t,...a})=>dl(pn,{ref:e,className:de(t),...a});Pp.displayName=pn.displayName;import{jsx as LL}from"react/jsx-runtime";var cl=({ref:e,className:t,...a})=>LL("textarea",{className:re("border-input bg-background ring-offset-background placeholder:text-muted-foreground focus-visible:ring-ring flex min-h-[80px] w-full rounded-md border px-3 py-2 text-base focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t),ref:e,...a});cl.displayName="Textarea";import{jsx as bL}from"react/jsx-runtime";var mn=({ref:e,resizable:t=!0,className:a,...o})=>{let r=de("dark:border-polar-700 bg-white shadow-xs dark:bg-polar-800 dark:text-white dark:placeholder:text-polar-500 min-h-[120px] rounded-xl focus-visible:ring-blue-100 p-4 text-sm border-gray-200 outline-none focus:z-10 focus:border-blue-300 focus:ring-[3px] focus:ring-blue-100 dark:ring-offset-transparent dark:focus:border-blue-600 dark:focus:ring-blue-700/40",t?"":"resize-none",a);return bL(cl,{ref:e,className:r,...o})};mn.displayName="TextArea";import*as K from"react";import{jsx as De,jsxs as SL}from"react/jsx-runtime";var[gn,pM]=ve("Tooltip",[ao]),xn=ao(),kp="TooltipProvider",vL=700,fl="tooltip.open",[IL,ml]=gn(kp),Tp=e=>{let{__scopeTooltip:t,delayDuration:a=vL,skipDelayDuration:o=300,disableHoverableContent:r=!1,children:n}=e,s=K.useRef(!0),l=K.useRef(!1),u=K.useRef(0);return K.useEffect(()=>{let f=u.current;return()=>window.clearTimeout(f)},[]),De(IL,{scope:t,isOpenDelayedRef:s,delayDuration:a,onOpen:K.useCallback(()=>{window.clearTimeout(u.current),s.current=!1},[]),onClose:K.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>s.current=!0,o)},[o]),isPointerInTransitRef:l,onPointerInTransitChange:K.useCallback(f=>{l.current=f},[]),disableHoverableContent:r,children:n})};Tp.displayName=kp;var qo="Tooltip",[wL,Vo]=gn(qo),Ap=e=>{let{__scopeTooltip:t,children:a,open:o,defaultOpen:r,onOpenChange:n,disableHoverableContent:s,delayDuration:l}=e,u=ml(qo,e.__scopeTooltip),f=xn(t),[g,i]=K.useState(null),c=Pt(),m=K.useRef(0),h=s??u.disableHoverableContent,d=l??u.delayDuration,p=K.useRef(!1),[x,y]=Ve({prop:o,defaultProp:r??!1,onChange:b=>{b?(u.onOpen(),document.dispatchEvent(new CustomEvent(fl))):u.onClose(),n?.(b)},caller:qo}),C=K.useMemo(()=>x?p.current?"delayed-open":"instant-open":"closed",[x]),v=K.useCallback(()=>{window.clearTimeout(m.current),m.current=0,p.current=!1,y(!0)},[y]),S=K.useCallback(()=>{window.clearTimeout(m.current),m.current=0,y(!1)},[y]),w=K.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{p.current=!0,y(!0),m.current=0},d)},[d,y]);return K.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),De(Br,{...f,children:De(wL,{scope:t,contentId:c,open:x,stateAttribute:C,trigger:g,onTriggerChange:i,onTriggerEnter:K.useCallback(()=>{u.isOpenDelayedRef.current?w():v()},[u.isOpenDelayedRef,w,v]),onTriggerLeave:K.useCallback(()=>{h?S():(window.clearTimeout(m.current),m.current=0)},[S,h]),onOpen:v,onClose:S,disableHoverableContent:h,children:a})})};Ap.displayName=qo;var pl="TooltipTrigger",Mp=K.forwardRef((e,t)=>{let{__scopeTooltip:a,...o}=e,r=Vo(pl,a),n=ml(pl,a),s=xn(a),l=K.useRef(null),u=J(t,l,r.onTriggerChange),f=K.useRef(!1),g=K.useRef(!1),i=K.useCallback(()=>f.current=!1,[]);return K.useEffect(()=>()=>document.removeEventListener("pointerup",i),[i]),De(Or,{asChild:!0,...s,children:De(W.button,{"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute,...o,ref:u,onPointerMove:$(e.onPointerMove,c=>{c.pointerType!=="touch"&&!g.current&&!n.isPointerInTransitRef.current&&(r.onTriggerEnter(),g.current=!0)}),onPointerLeave:$(e.onPointerLeave,()=>{r.onTriggerLeave(),g.current=!1}),onPointerDown:$(e.onPointerDown,()=>{r.open&&r.onClose(),f.current=!0,document.addEventListener("pointerup",i,{once:!0})}),onFocus:$(e.onFocus,()=>{f.current||r.onOpen()}),onBlur:$(e.onBlur,r.onClose),onClick:$(e.onClick,r.onClose)})})});Mp.displayName=pl;var gl="TooltipPortal",[RL,PL]=gn(gl,{forceMount:void 0}),Dp=e=>{let{__scopeTooltip:t,forceMount:a,children:o,container:r}=e,n=Vo(gl,t);return De(RL,{scope:t,forceMount:a,children:De(Rt,{present:a||n.open,children:De(Bo,{asChild:!0,container:r,children:o})})})};Dp.displayName=gl;var uo="TooltipContent",Fp=K.forwardRef((e,t)=>{let a=PL(uo,e.__scopeTooltip),{forceMount:o=a.forceMount,side:r="top",...n}=e,s=Vo(uo,e.__scopeTooltip);return De(Rt,{present:o||s.open,children:s.disableHoverableContent?De(Ep,{side:r,...n,ref:t}):De(kL,{side:r,...n,ref:t})})}),kL=K.forwardRef((e,t)=>{let a=Vo(uo,e.__scopeTooltip),o=ml(uo,e.__scopeTooltip),r=K.useRef(null),n=J(t,r),[s,l]=K.useState(null),{trigger:u,onClose:f}=a,g=r.current,{onPointerInTransitChange:i}=o,c=K.useCallback(()=>{l(null),i(!1)},[i]),m=K.useCallback((h,d)=>{let p=h.currentTarget,x={x:h.clientX,y:h.clientY},y=FL(x,p.getBoundingClientRect()),C=EL(x,y),v=BL(d.getBoundingClientRect()),S=_L([...C,...v]);l(S),i(!0)},[i]);return K.useEffect(()=>()=>c(),[c]),K.useEffect(()=>{if(u&&g){let h=p=>m(p,g),d=p=>m(p,u);return u.addEventListener("pointerleave",h),g.addEventListener("pointerleave",d),()=>{u.removeEventListener("pointerleave",h),g.removeEventListener("pointerleave",d)}}},[u,g,m,c]),K.useEffect(()=>{if(s){let h=d=>{let p=d.target,x={x:d.clientX,y:d.clientY},y=u?.contains(p)||g?.contains(p),C=!OL(x,s);y?c():C&&(c(),f())};return document.addEventListener("pointermove",h),()=>document.removeEventListener("pointermove",h)}},[u,g,s,f,c]),De(Ep,{...e,ref:n})}),[TL,AL]=gn(qo,{isInside:!1}),ML=od("TooltipContent"),Ep=K.forwardRef((e,t)=>{let{__scopeTooltip:a,children:o,"aria-label":r,onEscapeKeyDown:n,onPointerDownOutside:s,...l}=e,u=Vo(uo,a),f=xn(a),{onClose:g}=u;return K.useEffect(()=>(document.addEventListener(fl,g),()=>document.removeEventListener(fl,g)),[g]),K.useEffect(()=>{if(u.trigger){let i=c=>{c.target?.contains(u.trigger)&&g()};return window.addEventListener("scroll",i,{capture:!0}),()=>window.removeEventListener("scroll",i,{capture:!0})}},[u.trigger,g]),De(To,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:i=>i.preventDefault(),onDismiss:g,children:SL(_r,{"data-state":u.stateAttribute,...f,...l,ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[De(ML,{children:o}),De(TL,{scope:a,isInside:!0,children:De(Xc,{id:u.contentId,role:"tooltip",children:r||o})})]})})});Fp.displayName=uo;var Bp="TooltipArrow",DL=K.forwardRef((e,t)=>{let{__scopeTooltip:a,...o}=e,r=xn(a);return AL(Bp,a).isInside?null:De(Nr,{...r,...o,ref:t})});DL.displayName=Bp;function FL(e,t){let a=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),r=Math.abs(t.right-e.x),n=Math.abs(t.left-e.x);switch(Math.min(a,o,r,n)){case n:return"left";case r:return"right";case a:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function EL(e,t,a=5){let o=[];switch(t){case"top":o.push({x:e.x-a,y:e.y+a},{x:e.x+a,y:e.y+a});break;case"bottom":o.push({x:e.x-a,y:e.y-a},{x:e.x+a,y:e.y-a});break;case"left":o.push({x:e.x+a,y:e.y-a},{x:e.x+a,y:e.y+a});break;case"right":o.push({x:e.x-a,y:e.y-a},{x:e.x-a,y:e.y+a});break}return o}function BL(e){let{top:t,right:a,bottom:o,left:r}=e;return[{x:r,y:t},{x:a,y:t},{x:a,y:o},{x:r,y:o}]}function OL(e,t){let{x:a,y:o}=e,r=!1;for(let n=0,s=t.length-1;n<t.length;s=n++){let l=t[n],u=t[s],f=l.x,g=l.y,i=u.x,c=u.y;g>o!=c>o&&a<(i-f)*(o-g)/(c-g)+f&&(r=!r)}return r}function _L(e){let t=e.slice();return t.sort((a,o)=>a.x<o.x?-1:a.x>o.x?1:a.y<o.y?-1:a.y>o.y?1:0),NL(t)}function NL(e){if(e.length<=1)return e.slice();let t=[];for(let o=0;o<e.length;o++){let r=e[o];for(;t.length>=2;){let n=t[t.length-1],s=t[t.length-2];if((n.x-s.x)*(r.y-s.y)>=(n.y-s.y)*(r.x-s.x))t.pop();else break}t.push(r)}t.pop();let a=[];for(let o=e.length-1;o>=0;o--){let r=e[o];for(;a.length>=2;){let n=a[a.length-1],s=a[a.length-2];if((n.x-s.x)*(r.y-s.y)>=(n.y-s.y)*(r.x-s.x))a.pop();else break}a.push(r)}return a.pop(),t.length===1&&a.length===1&&t[0].x===a[0].x&&t[0].y===a[0].y?t:t.concat(a)}var Op=Tp,_p=Ap,Np=Mp,Up=Dp,xl=Fp;import{jsx as Hp}from"react/jsx-runtime";var Go=Op,Wo=_p,zo=Np,co=({ref:e,className:t,sideOffset:a=4,...o})=>Hp(Up,{children:Hp(xl,{ref:e,sideOffset:a,className:re("bg-popover text-popover-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 overflow-hidden rounded-md border px-3 py-1.5 text-sm shadow-md",t),...o})});co.displayName=xl.displayName;import{useEffect as CM,useRef as LM,useState as bM,useId as SM}from"react";import{Fragment as PM,jsx as wM,jsxs as RM}from"react/jsx-runtime";import{useMemo as HL}from"react";import{jsx as $o,jsxs as qL}from"react/jsx-runtime";var VL=({allowedCountries:e,locale:t,value:a,onChange:o,autoComplete:r,disabled:n,className:s,itemClassName:l,contentClassName:u,placeholder:f="Country"})=>{let g=HL(()=>{let i=new Intl.DisplayNames(t?[t]:[],{type:"region"});return e.map(c=>({code:c,name:i.of(c)??c})).sort((c,m)=>c.name.localeCompare(m.name,t))},[e,t]);return qL(ua,{onValueChange:o,value:a,autoComplete:r,disabled:n,children:[$o(Vt,{className:s,children:$o(qt,{placeholder:f,translate:"no"})}),$o(Gt,{className:u,translate:"no",children:g.map(({code:i,name:c})=>$o(Wt,{value:i,textValue:c,className:l,children:$o("div",{children:c})},i))})]})},qp=VL;import{jsx as fo,jsxs as GL}from"react/jsx-runtime";var Vp={US:{"US-AL":"Alabama","US-AK":"Alaska","US-AZ":"Arizona","US-AR":"Arkansas","US-CA":"California","US-CO":"Colorado","US-CT":"Connecticut","US-DE":"Delaware","US-FL":"Florida","US-GA":"Georgia","US-HI":"Hawaii","US-ID":"Idaho","US-IL":"Illinois","US-IN":"Indiana","US-IA":"Iowa","US-KS":"Kansas","US-KY":"Kentucky","US-LA":"Louisiana","US-ME":"Maine","US-MD":"Maryland","US-MA":"Massachusetts","US-MI":"Michigan","US-MN":"Minnesota","US-MS":"Mississippi","US-MO":"Missouri","US-MT":"Montana","US-NE":"Nebraska","US-NV":"Nevada","US-NH":"New Hampshire","US-NJ":"New Jersey","US-NM":"New Mexico","US-NY":"New York","US-NC":"North Carolina","US-ND":"North Dakota","US-OH":"Ohio","US-OK":"Oklahoma","US-OR":"Oregon","US-PA":"Pennsylvania","US-RI":"Rhode Island","US-SC":"South Carolina","US-SD":"South Dakota","US-TN":"Tennessee","US-TX":"Texas","US-UT":"Utah","US-VT":"Vermont","US-VA":"Virginia","US-WA":"Washington","US-WV":"West Virginia","US-WI":"Wisconsin","US-WY":"Wyoming","US-DC":"District of Columbia"},CA:{"CA-AB":"Alberta","CA-BC":"British Columbia","CA-MB":"Manitoba","CA-NB":"New Brunswick","CA-NL":"Newfoundland and Labrador","CA-NS":"Nova Scotia","CA-NT":"Northwest Territories","CA-NU":"Nunavut","CA-ON":"Ontario","CA-PE":"Prince Edward Island","CA-QC":"Quebec","CA-SK":"Saskatchewan","CA-YT":"Yukon"}},hl=Object.keys(Vp),WL=({className:e,value:t,onChange:a,country:o,autoComplete:r,itemClassName:n,contentClassName:s,disabled:l,placeholder:u="State",fallbackPlaceholder:f="State / Province"})=>{let g=o?Vp[o]:void 0;return g?GL(ua,{onValueChange:a,value:t,autoComplete:r,disabled:l,children:[fo(Vt,{className:e,children:fo(qt,{placeholder:u,translate:"no"})}),fo(Gt,{className:s,translate:"no",children:Object.entries(g).map(([i,c])=>fo(Wt,{value:i,textValue:c,className:n,children:fo("div",{children:c})},i))})]}):fo(ye,{type:"text",placeholder:f,value:t,onChange:i=>a(i.target.value),disabled:l})},Gp=WL;function Pe(...e){return de(e)}import*as $p from"react";var zL=xa(aa(),1);import*as Wp from"react";import{jsx as $L}from"react/jsx-runtime";var XL=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],zp=XL.reduce((e,t)=>{let a=Kn(`Primitive.${t}`),o=Wp.forwardRef((r,n)=>{let{asChild:s,...l}=r,u=s?a:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),$L(u,{...l,ref:n})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});import{jsx as jL}from"react/jsx-runtime";var KL="Label",Xp=$p.forwardRef((e,t)=>jL(zp.label,{...e,ref:t,onMouseDown:a=>{a.target.closest("button, input, select, textarea")||(e.onMouseDown?.(a),!a.defaultPrevented&&a.detail>1&&a.preventDefault())}}));Xp.displayName=KL;var yl=Xp;import{jsx as YL}from"react/jsx-runtime";var QL=Ot("block text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Cl=({ref:e,className:t,...a})=>YL(yl,{ref:e,className:Pe(QL(),t),...a});Cl.displayName=yl.displayName;import*as ca from"react";import{jsx as fa}from"react/jsx-runtime";var Xo=Zl,jp=ca.createContext({}),Ue=({...e})=>fa(jp.Provider,{value:{name:e.name},children:fa(jl,{...e})}),jo=()=>{let e=ca.useContext(jp),t=ca.useContext(Kp),{getFieldState:a,formState:o}=Kl(),r=a(e.name,o);if(!e)throw new Error("useFormField should be used within <FormField>");let{id:n}=t;return{id:n,name:e.name,formItemId:`${n}-form-item`,formDescriptionId:`${n}-form-item-description`,formMessageId:`${n}-form-item-message`,...r}},Kp=ca.createContext({}),tt=({ref:e,className:t,...a})=>{let o=ca.useId();return fa(Kp.Provider,{value:{id:o},children:fa("div",{ref:e,className:Pe("space-y-2",t),...a})})};tt.displayName="FormItem";var Lt=({ref:e,className:t,...a})=>{let{error:o,formItemId:r}=jo();return fa(Cl,{ref:e,className:Pe(o&&"text-destructive",t),htmlFor:r,...a})};Lt.displayName="FormLabel";var Fe=({ref:e,...t})=>{let{error:a,formItemId:o,formDescriptionId:r,formMessageId:n}=jo();return fa(mr,{ref:e,id:o,"aria-describedby":a?`${r} ${n}`:`${r}`,"aria-invalid":!!a,...t})};Fe.displayName="FormControl";var hn=({ref:e,className:t,...a})=>{let{formDescriptionId:o}=jo();return fa("p",{ref:e,id:o,className:Pe("text-muted-foreground text-sm",t),...a})};hn.displayName="FormDescription";var ke=({ref:e,className:t,children:a,...o})=>{let{error:r,formMessageId:n}=jo(),s=r?String(r?.message):a;return s?fa("p",{ref:e,id:n,className:Pe("text-destructive text-sm font-medium",t),...o,children:s}):null};ke.displayName="FormMessage";import{Elements as mS,ElementsConsumer as gS,PaymentElement as xS}from"@stripe/react-stripe-js";import{loadStripe as hS}from"@stripe/stripe-js";import{useCallback as In,useEffect as Ml,useMemo as Dl,useState as yS}from"react";import{useCallback as JL,useRef as eb}from"react";var Ll=(e,t,a)=>{let o=eb(null);return JL((...r)=>{o.current!=null&&clearTimeout(o.current),o.current=setTimeout(()=>{e(...r)},t)},[e,t,...a||[]])},Zp=Ll;var $t=e=>e==="required"||e==="optional",qa=e=>e==="required";var Yp=e=>{let t=$l(e)?e:nr(e);switch(t){case"pt-PT":return"pt";default:return t}};import*as gm from"react";function Ft(){return Ft=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var o in a)({}).hasOwnProperty.call(a,o)&&(e[o]=a[o])}return e},Ft.apply(null,arguments)}var yn=["strong","em","del","mark"],Qp=[["**",yn[0]],["__",yn[0]],["~~",yn[2]],["==",yn[3]],["*","em"],["_","em"]];function tb(e,t){for(var a=1,o=t+1;o<e.length&&a>0;)e[o]!=="\\"?(e[o]==="["&&a++,e[o]==="]"&&a--,o++):o+=2;if(a===0&&o<e.length&&(e[o]==="("||e[o]==="[")){var r=e[o]==="("?")":"]",n=1;for(o++;o<e.length&&n>0;)e[o]!=="\\"?(e[o]==="("&&r===")"&&n++,e[o]===r&&n--,o++):o+=2;if(n===0)return o}return-1}function ab(e,t){if(!t||!t.inline&&!t.simple)return null;var a=e[0];if(a!=="*"&&a!=="_"&&a!=="~"&&a!=="=")return null;for(var o="",r=0,n="",s=0;s<6;s++){var l=Qp[s][0];if(e.startsWith(l)&&e.length>=2*l.length){o=l,r=l.length,n=Qp[s][1];break}}if(!o)return null;for(var u=r,f=!1,g=!1,i="",c=0,m="",h=!1,d="";u<e.length;){var p=e[u];if(h)m+=p,h=!1,d=p,u++;else if(p!=="\\")if(p!=="`"||c!==0){if(p==="["&&!f&&c===0){var x=tb(e,u);if(x!==-1){m+=e.slice(u,x),u=x,d=e[x-1];continue}}if(g)m+=p,i?p===i&&(i=""):p==='"'||p==="'"?i=p:p===">"&&(g=!1),d=p,u++;else if(p!=="<"||f){if(p===`
|
|
45
|
+
`)},LC=0,so=[];function ff(e){var t=fe.useRef([]),a=fe.useRef([0,0]),o=fe.useRef(),r=fe.useState(LC++)[0],n=fe.useState(_o)[0],s=fe.useRef(e);fe.useEffect(function(){s.current=e},[e]),fe.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(r));var d=Zc([e.lockRef.current],(e.shards||[]).map(cf),!0).filter(Boolean);return d.forEach(function(p){return p.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),d.forEach(function(p){return p.classList.remove("allow-interactivity-".concat(r))})}}},[e.inert,e.lockRef.current,e.shards]);var l=fe.useCallback(function(d,p){if("touches"in d&&d.touches.length===2||d.type==="wheel"&&d.ctrlKey)return!s.current.allowPinchZoom;var x=$r(d),y=a.current,C="deltaX"in d?d.deltaX:y[0]-x[0],v="deltaY"in d?d.deltaY:y[1]-x[1],S,w=d.target,b=Math.abs(C)>Math.abs(v)?"h":"v";if("touches"in d&&b==="h"&&w.type==="range")return!1;var I=window.getSelection(),D=I&&I.anchorNode,F=D?D===w||D.contains(w):!1;if(F)return!1;var k=Os(b,w);if(!k)return!0;if(k?S=b:(S=b==="v"?"h":"v",k=Os(b,w)),!k)return!1;if(!o.current&&"changedTouches"in d&&(C||v)&&(o.current=S),!S)return!0;var T=o.current||S;return uf(T,p,d,T==="h"?C:v,!0)},[]),u=fe.useCallback(function(d){var p=d;if(!(!so.length||so[so.length-1]!==n)){var x="deltaY"in p?df(p):$r(p),y=t.current.filter(function(S){return S.name===p.type&&(S.target===p.target||p.target===S.shadowParent)&&yC(S.delta,x)})[0];if(y&&y.should){p.cancelable&&p.preventDefault();return}if(!y){var C=(s.current.shards||[]).map(cf).filter(Boolean).filter(function(S){return S.contains(p.target)}),v=C.length>0?l(p,C[0]):!s.current.noIsolation;v&&p.cancelable&&p.preventDefault()}}},[]),f=fe.useCallback(function(d,p,x,y){var C={name:d,delta:p,target:x,should:y,shadowParent:bC(x)};t.current.push(C),setTimeout(function(){t.current=t.current.filter(function(v){return v!==C})},1)},[]),g=fe.useCallback(function(d){a.current=$r(d),o.current=void 0},[]),i=fe.useCallback(function(d){f(d.type,df(d),d.target,l(d,e.lockRef.current))},[]),c=fe.useCallback(function(d){f(d.type,$r(d),d.target,l(d,e.lockRef.current))},[]);fe.useEffect(function(){return so.push(n),e.setCallbacks({onScrollCapture:i,onWheelCapture:i,onTouchMoveCapture:c}),document.addEventListener("wheel",u,Oa),document.addEventListener("touchmove",u,Oa),document.addEventListener("touchstart",g,Oa),function(){so=so.filter(function(d){return d!==n}),document.removeEventListener("wheel",u,Oa),document.removeEventListener("touchmove",u,Oa),document.removeEventListener("touchstart",g,Oa)}},[]);var m=e.removeScrollBar,h=e.inert;return fe.createElement(fe.Fragment,null,h?fe.createElement(n,{styles:CC(r)}):null,m?fe.createElement(Es,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function bC(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var pf=ks(zr,ff);var mf=Xr.forwardRef(function(e,t){return Xr.createElement(Oo,et({},e,{ref:t,sideCar:pf}))});mf.classNames=Oo.classNames;var _s=mf;import{Fragment as Ws,jsx as Y,jsxs as jr}from"react/jsx-runtime";var SC=[" ","Enter","ArrowUp","ArrowDown"],vC=[" ","Enter"],_a="Select",[Zr,Yr,IC]=br(_a),[lo,w0]=ve(_a,[IC,ao]),Qr=ao(),[wC,la]=lo(_a),[RC,PC]=lo(_a),gf=e=>{let{__scopeSelect:t,children:a,open:o,defaultOpen:r,onOpenChange:n,value:s,defaultValue:l,onValueChange:u,dir:f,name:g,autoComplete:i,disabled:c,required:m,form:h}=e,d=Qr(t),[p,x]=A.useState(null),[y,C]=A.useState(null),[v,S]=A.useState(!1),w=na(f),[b,I]=Ve({prop:o,defaultProp:r??!1,onChange:n,caller:_a}),[D,F]=Ve({prop:s,defaultProp:l,onChange:u,caller:_a}),k=A.useRef(null),T=p?h||!!p.closest("form"):!0,[q,z]=A.useState(new Set),j=Array.from(q).map(E=>E.props.value).join(";");return Y(Br,{...d,children:jr(wC,{required:m,scope:t,trigger:p,onTriggerChange:x,valueNode:y,onValueNodeChange:C,valueNodeHasChildren:v,onValueNodeHasChildrenChange:S,contentId:Pt(),value:D,onValueChange:F,open:b,onOpenChange:I,dir:w,triggerPointerDownPosRef:k,disabled:c,children:[Y(Zr.Provider,{scope:t,children:Y(RC,{scope:e.__scopeSelect,onNativeOptionAdd:A.useCallback(E=>{z(G=>new Set(G).add(E))},[]),onNativeOptionRemove:A.useCallback(E=>{z(G=>{let N=new Set(G);return N.delete(E),N})},[]),children:a})}),T?jr(Uf,{"aria-hidden":!0,required:m,tabIndex:-1,name:g,autoComplete:i,value:D,onChange:E=>F(E.target.value),disabled:c,form:h,children:[D===void 0?Y("option",{value:""}):null,Array.from(q)]},j):null]})})};gf.displayName=_a;var xf="SelectTrigger",hf=A.forwardRef((e,t)=>{let{__scopeSelect:a,disabled:o=!1,...r}=e,n=Qr(a),s=la(xf,a),l=s.disabled||o,u=J(t,s.onTriggerChange),f=Yr(a),g=A.useRef("touch"),[i,c,m]=qf(d=>{let p=f().filter(C=>!C.disabled),x=p.find(C=>C.value===s.value),y=Vf(p,d,x);y!==void 0&&s.onValueChange(y.value)}),h=d=>{l||(s.onOpenChange(!0),m()),d&&(s.triggerPointerDownPosRef.current={x:Math.round(d.pageX),y:Math.round(d.pageY)})};return Y(Or,{asChild:!0,...n,children:Y(W.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":Hf(s.value)?"":void 0,...r,ref:u,onClick:$(r.onClick,d=>{d.currentTarget.focus(),g.current!=="mouse"&&h(d)}),onPointerDown:$(r.onPointerDown,d=>{g.current=d.pointerType;let p=d.target;p.hasPointerCapture(d.pointerId)&&p.releasePointerCapture(d.pointerId),d.button===0&&d.ctrlKey===!1&&d.pointerType==="mouse"&&(h(d),d.preventDefault())}),onKeyDown:$(r.onKeyDown,d=>{let p=i.current!=="";!(d.ctrlKey||d.altKey||d.metaKey)&&d.key.length===1&&c(d.key),!(p&&d.key===" ")&&SC.includes(d.key)&&(h(),d.preventDefault())})})})});hf.displayName=xf;var yf="SelectValue",Cf=A.forwardRef((e,t)=>{let{__scopeSelect:a,className:o,style:r,children:n,placeholder:s="",...l}=e,u=la(yf,a),{onValueNodeHasChildrenChange:f}=u,g=n!==void 0,i=J(t,u.onValueNodeChange);return me(()=>{f(g)},[f,g]),Y(W.span,{...l,ref:i,style:{pointerEvents:"none"},children:Hf(u.value)?Y(Ws,{children:s}):n})});Cf.displayName=yf;var kC="SelectIcon",Lf=A.forwardRef((e,t)=>{let{__scopeSelect:a,children:o,...r}=e;return Y(W.span,{"aria-hidden":!0,...r,ref:t,children:o||"\u25BC"})});Lf.displayName=kC;var TC="SelectPortal",bf=e=>Y(Bo,{asChild:!0,...e});bf.displayName=TC;var Na="SelectContent",Sf=A.forwardRef((e,t)=>{let a=la(Na,e.__scopeSelect),[o,r]=A.useState();if(me(()=>{r(new DocumentFragment)},[]),!a.open){let n=o;return n?Gs.createPortal(Y(vf,{scope:e.__scopeSelect,children:Y(Zr.Slot,{scope:e.__scopeSelect,children:Y("div",{children:e.children})})}),n):null}return Y(If,{...e,ref:t})});Sf.displayName=Na;var yt=10,[vf,ia]=lo(Na),AC="SelectContentImpl",MC=Ia("SelectContent.RemoveScroll"),If=A.forwardRef((e,t)=>{let{__scopeSelect:a,position:o="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:n,onPointerDownOutside:s,side:l,sideOffset:u,align:f,alignOffset:g,arrowPadding:i,collisionBoundary:c,collisionPadding:m,sticky:h,hideWhenDetached:d,avoidCollisions:p,...x}=e,y=la(Na,a),[C,v]=A.useState(null),[S,w]=A.useState(null),b=J(t,V=>v(V)),[I,D]=A.useState(null),[F,k]=A.useState(null),T=Yr(a),[q,z]=A.useState(!1),j=A.useRef(!1);A.useEffect(()=>{if(C)return Kc(C)},[C]),kd();let E=A.useCallback(V=>{let[le,...Q]=T().map(ue=>ue.ref.current),[oe]=Q.slice(-1),ne=document.activeElement;for(let ue of V)if(ue===ne||(ue?.scrollIntoView({block:"nearest"}),ue===le&&S&&(S.scrollTop=0),ue===oe&&S&&(S.scrollTop=S.scrollHeight),ue?.focus(),document.activeElement!==ne))return},[T,S]),G=A.useCallback(()=>E([I,C]),[E,I,C]);A.useEffect(()=>{q&&G()},[q,G]);let{onOpenChange:N,triggerPointerDownPosRef:P}=y;A.useEffect(()=>{if(C){let V={x:0,y:0},le=oe=>{V={x:Math.abs(Math.round(oe.pageX)-(P.current?.x??0)),y:Math.abs(Math.round(oe.pageY)-(P.current?.y??0))}},Q=oe=>{V.x<=10&&V.y<=10?oe.preventDefault():C.contains(oe.target)||N(!1),document.removeEventListener("pointermove",le),P.current=null};return P.current!==null&&(document.addEventListener("pointermove",le),document.addEventListener("pointerup",Q,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",le),document.removeEventListener("pointerup",Q,{capture:!0})}}},[C,N,P]),A.useEffect(()=>{let V=()=>N(!1);return window.addEventListener("blur",V),window.addEventListener("resize",V),()=>{window.removeEventListener("blur",V),window.removeEventListener("resize",V)}},[N]);let[R,_]=qf(V=>{let le=T().filter(ne=>!ne.disabled),Q=le.find(ne=>ne.ref.current===document.activeElement),oe=Vf(le,V,Q);oe&&setTimeout(()=>oe.ref.current.focus())}),U=A.useCallback((V,le,Q)=>{let oe=!j.current&&!Q;(y.value!==void 0&&y.value===le||oe)&&(D(V),oe&&(j.current=!0))},[y.value]),Z=A.useCallback(()=>C?.focus(),[C]),Ce=A.useCallback((V,le,Q)=>{let oe=!j.current&&!Q;(y.value!==void 0&&y.value===le||oe)&&k(V)},[y.value]),ce=o==="popper"?Ns:wf,se=ce===Ns?{side:l,sideOffset:u,align:f,alignOffset:g,arrowPadding:i,collisionBoundary:c,collisionPadding:m,sticky:h,hideWhenDetached:d,avoidCollisions:p}:{};return Y(vf,{scope:a,content:C,viewport:S,onViewportChange:w,itemRefCallback:U,selectedItem:I,onItemLeave:Z,itemTextRefCallback:Ce,focusSelectedItem:G,selectedItemText:F,position:o,isPositioned:q,searchRef:R,children:Y(_s,{as:MC,allowPinchZoom:!0,children:Y(cs,{asChild:!0,trapped:y.open,onMountAutoFocus:V=>{V.preventDefault()},onUnmountAutoFocus:$(r,V=>{y.trigger?.focus({preventScroll:!0}),V.preventDefault()}),children:Y(To,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:V=>V.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:Y(ce,{role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:V=>V.preventDefault(),...x,...se,onPlaced:()=>z(!0),ref:b,style:{display:"flex",flexDirection:"column",outline:"none",...x.style},onKeyDown:$(x.onKeyDown,V=>{let le=V.ctrlKey||V.altKey||V.metaKey;if(V.key==="Tab"&&V.preventDefault(),!le&&V.key.length===1&&_(V.key),["ArrowUp","ArrowDown","Home","End"].includes(V.key)){let oe=T().filter(ne=>!ne.disabled).map(ne=>ne.ref.current);if(["ArrowUp","End"].includes(V.key)&&(oe=oe.slice().reverse()),["ArrowUp","ArrowDown"].includes(V.key)){let ne=V.target,ue=oe.indexOf(ne);oe=oe.slice(ue+1)}setTimeout(()=>E(oe)),V.preventDefault()}})})})})})})});If.displayName=AC;var DC="SelectItemAlignedPosition",wf=A.forwardRef((e,t)=>{let{__scopeSelect:a,onPlaced:o,...r}=e,n=la(Na,a),s=ia(Na,a),[l,u]=A.useState(null),[f,g]=A.useState(null),i=J(t,b=>g(b)),c=Yr(a),m=A.useRef(!1),h=A.useRef(!0),{viewport:d,selectedItem:p,selectedItemText:x,focusSelectedItem:y}=s,C=A.useCallback(()=>{if(n.trigger&&n.valueNode&&l&&f&&d&&p&&x){let b=n.trigger.getBoundingClientRect(),I=f.getBoundingClientRect(),D=n.valueNode.getBoundingClientRect(),F=x.getBoundingClientRect();if(n.dir!=="rtl"){let ne=F.left-I.left,ue=D.left-ne,Ee=b.left-ue,st=b.width+Ee,Nn=Math.max(st,I.width),Un=window.innerWidth-yt,Hn=ns(ue,[yt,Math.max(yt,Un-Nn)]);l.style.minWidth=st+"px",l.style.left=Hn+"px"}else{let ne=I.right-F.right,ue=window.innerWidth-D.right-ne,Ee=window.innerWidth-b.right-ue,st=b.width+Ee,Nn=Math.max(st,I.width),Un=window.innerWidth-yt,Hn=ns(ue,[yt,Math.max(yt,Un-Nn)]);l.style.minWidth=st+"px",l.style.right=Hn+"px"}let k=c(),T=window.innerHeight-yt*2,q=d.scrollHeight,z=window.getComputedStyle(f),j=parseInt(z.borderTopWidth,10),E=parseInt(z.paddingTop,10),G=parseInt(z.borderBottomWidth,10),N=parseInt(z.paddingBottom,10),P=j+E+q+N+G,R=Math.min(p.offsetHeight*5,P),_=window.getComputedStyle(d),U=parseInt(_.paddingTop,10),Z=parseInt(_.paddingBottom,10),Ce=b.top+b.height/2-yt,ce=T-Ce,se=p.offsetHeight/2,V=p.offsetTop+se,le=j+E+V,Q=P-le;if(le<=Ce){let ne=k.length>0&&p===k[k.length-1].ref.current;l.style.bottom="0px";let ue=f.clientHeight-d.offsetTop-d.offsetHeight,Ee=Math.max(ce,se+(ne?Z:0)+ue+G),st=le+Ee;l.style.height=st+"px"}else{let ne=k.length>0&&p===k[0].ref.current;l.style.top="0px";let Ee=Math.max(Ce,j+d.offsetTop+(ne?U:0)+se)+Q;l.style.height=Ee+"px",d.scrollTop=le-Ce+d.offsetTop}l.style.margin=`${yt}px 0`,l.style.minHeight=R+"px",l.style.maxHeight=T+"px",o?.(),requestAnimationFrame(()=>m.current=!0)}},[c,n.trigger,n.valueNode,l,f,d,p,x,n.dir,o]);me(()=>C(),[C]);let[v,S]=A.useState();me(()=>{f&&S(window.getComputedStyle(f).zIndex)},[f]);let w=A.useCallback(b=>{b&&h.current===!0&&(C(),y?.(),h.current=!1)},[C,y]);return Y(EC,{scope:a,contentWrapper:l,shouldExpandOnScrollRef:m,onScrollButtonChange:w,children:Y("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:v},children:Y(W.div,{...r,ref:i,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})});wf.displayName=DC;var FC="SelectPopperPosition",Ns=A.forwardRef((e,t)=>{let{__scopeSelect:a,align:o="start",collisionPadding:r=yt,...n}=e,s=Qr(a);return Y(_r,{...s,...n,ref:t,align:o,collisionPadding:r,style:{boxSizing:"border-box",...n.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Ns.displayName=FC;var[EC,zs]=lo(Na,{}),Us="SelectViewport",Rf=A.forwardRef((e,t)=>{let{__scopeSelect:a,nonce:o,...r}=e,n=ia(Us,a),s=zs(Us,a),l=J(t,n.onViewportChange),u=A.useRef(0);return jr(Ws,{children:[Y("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),Y(Zr.Slot,{scope:a,children:Y(W.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:$(r.onScroll,f=>{let g=f.currentTarget,{contentWrapper:i,shouldExpandOnScrollRef:c}=s;if(c?.current&&i){let m=Math.abs(u.current-g.scrollTop);if(m>0){let h=window.innerHeight-yt*2,d=parseFloat(i.style.minHeight),p=parseFloat(i.style.height),x=Math.max(d,p);if(x<h){let y=x+m,C=Math.min(h,y),v=y-C;i.style.height=C+"px",i.style.bottom==="0px"&&(g.scrollTop=v>0?v:0,i.style.justifyContent="flex-end")}}}u.current=g.scrollTop})})})]})});Rf.displayName=Us;var Pf="SelectGroup",[BC,OC]=lo(Pf),_C=A.forwardRef((e,t)=>{let{__scopeSelect:a,...o}=e,r=Pt();return Y(BC,{scope:a,id:r,children:Y(W.div,{role:"group","aria-labelledby":r,...o,ref:t})})});_C.displayName=Pf;var kf="SelectLabel",Tf=A.forwardRef((e,t)=>{let{__scopeSelect:a,...o}=e,r=OC(kf,a);return Y(W.div,{id:r.id,...o,ref:t})});Tf.displayName=kf;var Kr="SelectItem",[NC,Af]=lo(Kr),Mf=A.forwardRef((e,t)=>{let{__scopeSelect:a,value:o,disabled:r=!1,textValue:n,...s}=e,l=la(Kr,a),u=ia(Kr,a),f=l.value===o,[g,i]=A.useState(n??""),[c,m]=A.useState(!1),h=J(t,y=>u.itemRefCallback?.(y,o,r)),d=Pt(),p=A.useRef("touch"),x=()=>{r||(l.onValueChange(o),l.onOpenChange(!1))};if(o==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return Y(NC,{scope:a,value:o,disabled:r,textId:d,isSelected:f,onItemTextChange:A.useCallback(y=>{i(C=>C||(y?.textContent??"").trim())},[]),children:Y(Zr.ItemSlot,{scope:a,value:o,disabled:r,textValue:g,children:Y(W.div,{role:"option","aria-labelledby":d,"data-highlighted":c?"":void 0,"aria-selected":f&&c,"data-state":f?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...s,ref:h,onFocus:$(s.onFocus,()=>m(!0)),onBlur:$(s.onBlur,()=>m(!1)),onClick:$(s.onClick,()=>{p.current!=="mouse"&&x()}),onPointerUp:$(s.onPointerUp,()=>{p.current==="mouse"&&x()}),onPointerDown:$(s.onPointerDown,y=>{p.current=y.pointerType}),onPointerMove:$(s.onPointerMove,y=>{p.current=y.pointerType,r?u.onItemLeave?.():p.current==="mouse"&&y.currentTarget.focus({preventScroll:!0})}),onPointerLeave:$(s.onPointerLeave,y=>{y.currentTarget===document.activeElement&&u.onItemLeave?.()}),onKeyDown:$(s.onKeyDown,y=>{u.searchRef?.current!==""&&y.key===" "||(vC.includes(y.key)&&x(),y.key===" "&&y.preventDefault())})})})})});Mf.displayName=Kr;var Uo="SelectItemText",Df=A.forwardRef((e,t)=>{let{__scopeSelect:a,className:o,style:r,...n}=e,s=la(Uo,a),l=ia(Uo,a),u=Af(Uo,a),f=PC(Uo,a),[g,i]=A.useState(null),c=J(t,x=>i(x),u.onItemTextChange,x=>l.itemTextRefCallback?.(x,u.value,u.disabled)),m=g?.textContent,h=A.useMemo(()=>Y("option",{value:u.value,disabled:u.disabled,children:m},u.value),[u.disabled,u.value,m]),{onNativeOptionAdd:d,onNativeOptionRemove:p}=f;return me(()=>(d(h),()=>p(h)),[d,p,h]),jr(Ws,{children:[Y(W.span,{id:u.textId,...n,ref:c}),u.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Gs.createPortal(n.children,s.valueNode):null]})});Df.displayName=Uo;var Ff="SelectItemIndicator",Ef=A.forwardRef((e,t)=>{let{__scopeSelect:a,...o}=e;return Af(Ff,a).isSelected?Y(W.span,{"aria-hidden":!0,...o,ref:t}):null});Ef.displayName=Ff;var Hs="SelectScrollUpButton",Bf=A.forwardRef((e,t)=>{let a=ia(Hs,e.__scopeSelect),o=zs(Hs,e.__scopeSelect),[r,n]=A.useState(!1),s=J(t,o.onScrollButtonChange);return me(()=>{if(a.viewport&&a.isPositioned){let u=function(){let g=f.scrollTop>0;n(g)};var l=u;let f=a.viewport;return u(),f.addEventListener("scroll",u),()=>f.removeEventListener("scroll",u)}},[a.viewport,a.isPositioned]),r?Y(_f,{...e,ref:s,onAutoScroll:()=>{let{viewport:l,selectedItem:u}=a;l&&u&&(l.scrollTop=l.scrollTop-u.offsetHeight)}}):null});Bf.displayName=Hs;var qs="SelectScrollDownButton",Of=A.forwardRef((e,t)=>{let a=ia(qs,e.__scopeSelect),o=zs(qs,e.__scopeSelect),[r,n]=A.useState(!1),s=J(t,o.onScrollButtonChange);return me(()=>{if(a.viewport&&a.isPositioned){let u=function(){let g=f.scrollHeight-f.clientHeight,i=Math.ceil(f.scrollTop)<g;n(i)};var l=u;let f=a.viewport;return u(),f.addEventListener("scroll",u),()=>f.removeEventListener("scroll",u)}},[a.viewport,a.isPositioned]),r?Y(_f,{...e,ref:s,onAutoScroll:()=>{let{viewport:l,selectedItem:u}=a;l&&u&&(l.scrollTop=l.scrollTop+u.offsetHeight)}}):null});Of.displayName=qs;var _f=A.forwardRef((e,t)=>{let{__scopeSelect:a,onAutoScroll:o,...r}=e,n=ia("SelectScrollButton",a),s=A.useRef(null),l=Yr(a),u=A.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return A.useEffect(()=>()=>u(),[u]),me(()=>{l().find(g=>g.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[l]),Y(W.div,{"aria-hidden":!0,...r,ref:t,style:{flexShrink:0,...r.style},onPointerDown:$(r.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(o,50))}),onPointerMove:$(r.onPointerMove,()=>{n.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(o,50))}),onPointerLeave:$(r.onPointerLeave,()=>{u()})})}),UC="SelectSeparator",Nf=A.forwardRef((e,t)=>{let{__scopeSelect:a,...o}=e;return Y(W.div,{"aria-hidden":!0,...o,ref:t})});Nf.displayName=UC;var Vs="SelectArrow",HC=A.forwardRef((e,t)=>{let{__scopeSelect:a,...o}=e,r=Qr(a),n=la(Vs,a),s=ia(Vs,a);return n.open&&s.position==="popper"?Y(Nr,{...r,...o,ref:t}):null});HC.displayName=Vs;var qC="SelectBubbleInput",Uf=A.forwardRef(({__scopeSelect:e,value:t,...a},o)=>{let r=A.useRef(null),n=J(o,r),s=Jt(t);return A.useEffect(()=>{let l=r.current;if(!l)return;let u=window.HTMLSelectElement.prototype,g=Object.getOwnPropertyDescriptor(u,"value").set;if(s!==t&&g){let i=new Event("change",{bubbles:!0});g.call(l,t),l.dispatchEvent(i)}},[s,t]),Y(W.select,{...a,style:{...Ss,...a.style},ref:n,defaultValue:t})});Uf.displayName=qC;function Hf(e){return e===""||e===void 0}function qf(e){let t=Ye(e),a=A.useRef(""),o=A.useRef(0),r=A.useCallback(s=>{let l=a.current+s;t(l),(function u(f){a.current=f,window.clearTimeout(o.current),f!==""&&(o.current=window.setTimeout(()=>u(""),1e3))})(l)},[t]),n=A.useCallback(()=>{a.current="",window.clearTimeout(o.current)},[]);return A.useEffect(()=>()=>window.clearTimeout(o.current),[]),[a,r,n]}function Vf(e,t,a){let r=t.length>1&&Array.from(t).every(f=>f===t[0])?t[0]:t,n=a?e.indexOf(a):-1,s=VC(e,Math.max(n,0));r.length===1&&(s=s.filter(f=>f!==a));let u=s.find(f=>f.textValue.toLowerCase().startsWith(r.toLowerCase()));return u!==a?u:void 0}function VC(e,t){return e.map((a,o)=>e[(t+o)%e.length])}var Gf=gf,Jr=hf,Wf=Cf,zf=Lf,$f=bf,$s=Sf,Xf=Rf;var Xs=Tf,js=Mf,jf=Df,Kf=Ef,Ks=Bf,Zs=Of,Ys=Nf;import{jsx as Ne,jsxs as Js}from"react/jsx-runtime";var Zf=Gf;var Qs=Wf,en=({ref:e,className:t,children:a,...o})=>Js(Jr,{ref:e,className:re("border-input bg-background ring-offset-background data-placeholder:text-muted-foreground focus:ring-ring flex h-10 w-full items-center justify-between rounded-md border px-3 py-2 md:text-sm focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),...o,children:[a,Ne(zf,{asChild:!0,children:Ne(Xa,{className:"h-4 w-4 opacity-50"})})]});en.displayName=Jr.displayName;var Yf=({ref:e,className:t,...a})=>Ne(Ks,{ref:e,className:re("flex cursor-default items-center justify-center py-1",t),...a,children:Ne(yo,{className:"h-4 w-4"})});Yf.displayName=Ks.displayName;var Qf=({ref:e,className:t,...a})=>Ne(Zs,{ref:e,className:re("flex cursor-default items-center justify-center py-1",t),...a,children:Ne(Xa,{className:"h-4 w-4"})});Qf.displayName=Zs.displayName;var tn=({ref:e,className:t,children:a,position:o="popper",...r})=>Ne($f,{children:Js($s,{ref:e,className:re("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-96 min-w-32 overflow-hidden rounded-md border shadow-md",o==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:o,...r,children:[Ne(Yf,{}),Ne(Xf,{className:re("p-1",o==="popper"&&"h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width)"),children:a}),Ne(Qf,{})]})});tn.displayName=$s.displayName;var an=({ref:e,className:t,...a})=>Ne(Xs,{ref:e,className:re("py-1.5 pr-2 pl-8 text-sm font-semibold",t),...a});an.displayName=Xs.displayName;var on=({ref:e,className:t,children:a,...o})=>Js(js,{ref:e,className:re("focus:bg-accent focus:text-accent-foreground relative flex w-full cursor-default items-center rounded-xs py-1.5 pr-2 pl-8 text-sm outline-none select-none data-disabled:pointer-events-none data-disabled:opacity-50",t),...o,children:[Ne("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:Ne(Kf,{children:Ne(ha,{className:"h-4 w-4"})})}),Ne(jf,{children:a})]});on.displayName=js.displayName;var rn=({ref:e,className:t,...a})=>Ne(Ys,{ref:e,className:re("bg-muted -mx-1 my-1 h-px",t),...a});rn.displayName=Ys.displayName;import{jsx as Ua}from"react/jsx-runtime";var ua=Zf;var qt=({...e})=>Ua(Qs,{translate:"no",...e});qt.displayName=Qs.displayName;var Vt=({ref:e,className:t,children:a,...o})=>Ua(en,{ref:e,className:de("dark:bg-gray-800 dark:hover:bg-gray-700 dark:hover:border-gray-700 dark:border-gray-700 flex cursor-pointer flex-row gap-x-2 rounded-xl border border-gray-200 bg-white px-3 shadow-xs transition-colors hover:border-gray-300 dark:text-white text-black",t),...o,children:a});Vt.displayName=en.displayName;var Gt=({ref:e,className:t,children:a,position:o="popper",...r})=>Ua(tn,{ref:e,position:o,className:de("ruba-app dark:bg-gray-800 rounded-xl border-none",t),translate:"no",...r,children:a});Gt.displayName=tn.displayName;var Jf=({ref:e,className:t,...a})=>Ua(an,{ref:e,className:t,...a});Jf.displayName=an.displayName;var Wt=({ref:e,className:t,children:a,...o})=>Ua(on,{ref:e,className:de(t,"cursor-pointer rounded-lg"),...o,children:Ua("div",{children:a})});Wt.displayName=on.displayName;var ep=({ref:e,className:t,...a})=>Ua(rn,{ref:e,className:de("",t),...a});ep.displayName=rn.displayName;import{Fragment as U0,jsx as H0,jsxs as q0}from"react/jsx-runtime";import{Fragment as Z0,jsx as K0,jsxs as Y0}from"react/jsx-runtime";import{jsx as tT,jsxs as aT}from"react/jsx-runtime";var XC=xa(aa(),1);import{useCallback as pT,useEffect as mT,useRef as gT}from"react";import{jsx as yT,jsxs as CT}from"react/jsx-runtime";import{jsx as jC}from"react/jsx-runtime";var el=({ref:e,className:t,type:a,...o})=>jC("input",{type:a,className:re("border-input bg-background ring-offset-background file:text-foreground placeholder:text-muted-foreground focus-visible:ring-ring flex h-10 w-full rounded-md border px-3 py-2 text-base file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t),ref:e,...o});el.displayName="Input";import{jsx as tl,jsxs as KC}from"react/jsx-runtime";var ye=({ref:e,preSlot:t,postSlot:a,className:o,...r})=>KC("div",{className:"relative flex flex-1 flex-row rounded-full",children:[tl(el,{className:de("dark:placeholder:text-gray-500 dark:border-gray-700 dark:bg-gray-800 h-10 rounded-xl border border-gray-200 bg-white px-3 py-2 text-base text-gray-950 shadow-xs outline-none placeholder:text-gray-400 focus:z-10 focus:border-blue-300 focus:ring-[3px] focus:ring-blue-100 focus-visible:ring-blue-100 md:text-sm dark:text-white dark:ring-offset-transparent dark:focus:border-blue-600 dark:focus:ring-blue-700/40",t?"pl-10":"",a?"pr-10":"",o),ref:e,...r}),t&&tl("div",{className:"dark:text-gray-400 pointer-events-none absolute inset-y-0 left-0 z-10 flex items-center pl-3 text-gray-500",children:t}),a&&tl("div",{className:"dark:text-gray-400 pointer-events-none absolute inset-y-0 right-0 z-10 flex items-center pr-4 text-gray-500",children:a})]});ye.displayName="Input";import{jsx as TT}from"react/jsx-runtime";import{jsx as tp}from"react/jsx-runtime";var ZC=({children:e})=>tp("div",{className:"dark:ring-gray-700 w-full overflow-hidden rounded-2xl bg-transparent ring-1 ring-gray-200 dark:ring-1",children:e}),YC=({children:e})=>tp("div",{className:"dark:border-gray-700 border-t border-gray-200 p-5 first:border-t-0",children:e}),QC=Object.assign(ZC,{Item:YC});var JC=xa(aa(),1);import ET,{useCallback as _T,useEffect as NT}from"react";import{jsx as VT,jsxs as GT}from"react/jsx-runtime";import{jsx as $T}from"react/jsx-runtime";import{jsx as QT}from"react/jsx-runtime";var KT=Ot("flex items-center gap-x-1 p-1",{variants:{size:{sm:"rounded-full",md:"rounded-full",lg:"rounded-full"},variant:{default:"dark:bg-gray-800 bg-gray-50",tabs:"dark:bg-gray-950 w-full bg-gray-100"}},defaultVariants:{size:"md",variant:"default"}}),ZT=Ot("cursor-pointer font-medium transition-colors",{variants:{size:{sm:"px-2.5 py-1 text-xs",md:"px-3 py-1.5 text-xs",lg:"px-4 py-2 text-sm"},variant:{default:"rounded-full",tabs:"grow rounded-full"},active:{true:"",false:"dark:text-gray-500 text-gray-500 hover:text-gray-900 dark:hover:text-white"}},compoundVariants:[{variant:"default",active:!0,className:"dark:bg-gray-700 bg-white text-black shadow-lg dark:text-white"},{variant:"tabs",active:!0,className:"dark:bg-gray-800 bg-white text-black shadow-lg dark:text-white"}],defaultVariants:{size:"md",variant:"default",active:!1}});import{jsx as tA,jsxs as aA}from"react/jsx-runtime";import{jsx as nA}from"react/jsx-runtime";import*as Ct from"react";import{jsx as nn,jsxs as eL}from"react/jsx-runtime";var sn="Switch",[tL,gA]=ve(sn),[aL,oL]=tL(sn),ap=Ct.forwardRef((e,t)=>{let{__scopeSwitch:a,name:o,checked:r,defaultChecked:n,required:s,disabled:l,value:u="on",onCheckedChange:f,form:g,...i}=e,[c,m]=Ct.useState(null),h=J(t,C=>m(C)),d=Ct.useRef(!1),p=c?g||!!c.closest("form"):!0,[x,y]=Ve({prop:r,defaultProp:n??!1,onChange:f,caller:sn});return eL(aL,{scope:a,checked:x,disabled:l,children:[nn(W.button,{type:"button",role:"switch","aria-checked":x,"aria-required":s,"data-state":sp(x),"data-disabled":l?"":void 0,disabled:l,value:u,...i,ref:h,onClick:$(e.onClick,C=>{y(v=>!v),p&&(d.current=C.isPropagationStopped(),d.current||C.stopPropagation())})}),p&&nn(np,{control:c,bubbles:!d.current,name:o,value:u,checked:x,required:s,disabled:l,form:g,style:{transform:"translateX(-100%)"}})]})});ap.displayName=sn;var op="SwitchThumb",rp=Ct.forwardRef((e,t)=>{let{__scopeSwitch:a,...o}=e,r=oL(op,a);return nn(W.span,{"data-state":sp(r.checked),"data-disabled":r.disabled?"":void 0,...o,ref:t})});rp.displayName=op;var rL="SwitchBubbleInput",np=Ct.forwardRef(({__scopeSwitch:e,control:t,checked:a,bubbles:o=!0,...r},n)=>{let s=Ct.useRef(null),l=J(s,n),u=Jt(a),f=ea(t);return Ct.useEffect(()=>{let g=s.current;if(!g)return;let i=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(i,"checked").set;if(u!==a&&m){let h=new Event("click",{bubbles:o});m.call(g,a),g.dispatchEvent(h)}},[u,a,o]),nn("input",{type:"checkbox","aria-hidden":!0,defaultChecked:a,...r,tabIndex:-1,ref:l,style:{...r.style,...f,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});np.displayName=rL;function sp(e){return e?"checked":"unchecked"}var al=ap,lp=rp;import{jsx as ip}from"react/jsx-runtime";var up=({ref:e,className:t,...a})=>ip(al,{className:de("focus-visible:ring-ring focus-visible:ring-offset-background data-[state=checked]:bg-primary dark:data-[state=unchecked]:bg-gray-700 peer inline-flex h-6 w-10 shrink-0 cursor-pointer items-center rounded-full border border-transparent transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 data-[state=unchecked]:bg-gray-200",t),...a,ref:e,children:ip(lp,{className:de("pointer-events-none block h-5 w-5 rounded-full bg-white shadow-md ring-0 transition-transform data-[state=checked]:translate-x-[18px] data-[state=unchecked]:translate-x-px")})});up.displayName=al.displayName;import*as zt from"react";import*as Ae from"react";import{jsx as Ha}from"react/jsx-runtime";var ol="rovingFocusGroup.onEntryFocus",sL={bubbles:!1,cancelable:!0},Ho="RovingFocusGroup",[rl,dp,lL]=br(Ho),[iL,io]=ve(Ho,[lL]),[uL,dL]=iL(Ho),cp=Ae.forwardRef((e,t)=>Ha(rl.Provider,{scope:e.__scopeRovingFocusGroup,children:Ha(rl.Slot,{scope:e.__scopeRovingFocusGroup,children:Ha(cL,{...e,ref:t})})}));cp.displayName=Ho;var cL=Ae.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:a,orientation:o,loop:r=!1,dir:n,currentTabStopId:s,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:u,onEntryFocus:f,preventScrollOnEntryFocus:g=!1,...i}=e,c=Ae.useRef(null),m=J(t,c),h=na(n),[d,p]=Ve({prop:s,defaultProp:l??null,onChange:u,caller:Ho}),[x,y]=Ae.useState(!1),C=Ye(f),v=dp(a),S=Ae.useRef(!1),[w,b]=Ae.useState(0);return Ae.useEffect(()=>{let I=c.current;if(I)return I.addEventListener(ol,C),()=>I.removeEventListener(ol,C)},[C]),Ha(uL,{scope:a,orientation:o,dir:h,loop:r,currentTabStopId:d,onItemFocus:Ae.useCallback(I=>p(I),[p]),onItemShiftTab:Ae.useCallback(()=>y(!0),[]),onFocusableItemAdd:Ae.useCallback(()=>b(I=>I+1),[]),onFocusableItemRemove:Ae.useCallback(()=>b(I=>I-1),[]),children:Ha(W.div,{tabIndex:x||w===0?-1:0,"data-orientation":o,...i,ref:m,style:{outline:"none",...e.style},onMouseDown:$(e.onMouseDown,()=>{S.current=!0}),onFocus:$(e.onFocus,I=>{let D=!S.current;if(I.target===I.currentTarget&&D&&!x){let F=new CustomEvent(ol,sL);if(I.currentTarget.dispatchEvent(F),!F.defaultPrevented){let k=v().filter(E=>E.focusable),T=k.find(E=>E.active),q=k.find(E=>E.id===d),j=[T,q,...k].filter(Boolean).map(E=>E.ref.current);mp(j,g)}}S.current=!1}),onBlur:$(e.onBlur,()=>y(!1))})})}),fp="RovingFocusGroupItem",pp=Ae.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:a,focusable:o=!0,active:r=!1,tabStopId:n,children:s,...l}=e,u=Pt(),f=n||u,g=dL(fp,a),i=g.currentTabStopId===f,c=dp(a),{onFocusableItemAdd:m,onFocusableItemRemove:h,currentTabStopId:d}=g;return Ae.useEffect(()=>{if(o)return m(),()=>h()},[o,m,h]),Ha(rl.ItemSlot,{scope:a,id:f,focusable:o,active:r,children:Ha(W.span,{tabIndex:i?0:-1,"data-orientation":g.orientation,...l,ref:t,onMouseDown:$(e.onMouseDown,p=>{o?g.onItemFocus(f):p.preventDefault()}),onFocus:$(e.onFocus,()=>g.onItemFocus(f)),onKeyDown:$(e.onKeyDown,p=>{if(p.key==="Tab"&&p.shiftKey){g.onItemShiftTab();return}if(p.target!==p.currentTarget)return;let x=mL(p,g.orientation,g.dir);if(x!==void 0){if(p.metaKey||p.ctrlKey||p.altKey||p.shiftKey)return;p.preventDefault();let C=c().filter(v=>v.focusable).map(v=>v.ref.current);if(x==="last")C.reverse();else if(x==="prev"||x==="next"){x==="prev"&&C.reverse();let v=C.indexOf(p.currentTarget);C=g.loop?gL(C,v+1):C.slice(v+1)}setTimeout(()=>mp(C))}}),children:typeof s=="function"?s({isCurrentTabStop:i,hasTabStop:d!=null}):s})})});pp.displayName=fp;var fL={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function pL(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function mL(e,t,a){let o=pL(e.key,a);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return fL[o]}function mp(e,t=!1){let a=document.activeElement;for(let o of e)if(o===a||(o.focus({preventScroll:t}),document.activeElement!==a))return}function gL(e,t){return e.map((a,o)=>e[(t+o)%e.length])}var ln=cp,un=pp;import{jsx as da}from"react/jsx-runtime";var dn="Tabs",[xL,NA]=ve(dn,[io]),xp=io(),[hL,nl]=xL(dn),yL=zt.forwardRef((e,t)=>{let{__scopeTabs:a,value:o,onValueChange:r,defaultValue:n,orientation:s="horizontal",dir:l,activationMode:u="automatic",...f}=e,g=na(l),[i,c]=Ve({prop:o,onChange:r,defaultProp:n??"",caller:dn});return da(hL,{scope:a,baseId:Pt(),value:i,onValueChange:c,orientation:s,dir:g,activationMode:u,children:da(W.div,{dir:g,"data-orientation":s,...f,ref:t})})});yL.displayName=dn;var hp="TabsList",yp=zt.forwardRef((e,t)=>{let{__scopeTabs:a,loop:o=!0,...r}=e,n=nl(hp,a),s=xp(a);return da(ln,{asChild:!0,...s,orientation:n.orientation,dir:n.dir,loop:o,children:da(W.div,{role:"tablist","aria-orientation":n.orientation,...r,ref:t})})});yp.displayName=hp;var Cp="TabsTrigger",Lp=zt.forwardRef((e,t)=>{let{__scopeTabs:a,value:o,disabled:r=!1,...n}=e,s=nl(Cp,a),l=xp(a),u=vp(s.baseId,o),f=Ip(s.baseId,o),g=o===s.value;return da(un,{asChild:!0,...l,focusable:!r,active:g,children:da(W.button,{type:"button",role:"tab","aria-selected":g,"aria-controls":f,"data-state":g?"active":"inactive","data-disabled":r?"":void 0,disabled:r,id:u,...n,ref:t,onMouseDown:$(e.onMouseDown,i=>{!r&&i.button===0&&i.ctrlKey===!1?s.onValueChange(o):i.preventDefault()}),onKeyDown:$(e.onKeyDown,i=>{[" ","Enter"].includes(i.key)&&s.onValueChange(o)}),onFocus:$(e.onFocus,()=>{let i=s.activationMode!=="manual";!g&&!r&&i&&s.onValueChange(o)})})})});Lp.displayName=Cp;var bp="TabsContent",Sp=zt.forwardRef((e,t)=>{let{__scopeTabs:a,value:o,forceMount:r,children:n,...s}=e,l=nl(bp,a),u=vp(l.baseId,o),f=Ip(l.baseId,o),g=o===l.value,i=zt.useRef(g);return zt.useEffect(()=>{let c=requestAnimationFrame(()=>i.current=!1);return()=>cancelAnimationFrame(c)},[]),da(Rt,{present:r||g,children:({present:c})=>da(W.div,{"data-state":g?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":u,hidden:!c,id:f,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:i.current?"0s":void 0},children:c&&n})})});Sp.displayName=bp;function vp(e,t){return`${e}-trigger-${t}`}function Ip(e,t){return`${e}-content-${t}`}var sl=yp,ll=Lp,il=Sp;import{jsx as ul}from"react/jsx-runtime";var cn=({ref:e,className:t,...a})=>ul(sl,{ref:e,className:re("bg-muted text-muted-foreground inline-flex h-10 items-center justify-center rounded-md p-1",t),...a});cn.displayName=sl.displayName;var fn=({ref:e,className:t,...a})=>ul(ll,{ref:e,className:re("ring-offset-background focus-visible:ring-ring data-[state=active]:bg-background data-[state=active]:text-foreground inline-flex items-center justify-center rounded-xl px-3 py-1.5 text-sm font-medium whitespace-nowrap transition-all focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-xs",t),...a});fn.displayName=ll.displayName;var pn=({ref:e,className:t,...a})=>ul(il,{ref:e,className:re("ring-offset-background focus-visible:ring-ring mt-2 focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",t),...a});pn.displayName=il.displayName;import{jsx as dl}from"react/jsx-runtime";var wp=({ref:e,className:t,vertical:a,...o})=>dl(cn,{ref:e,className:de("relative flex h-fit w-fit flex-row items-start gap-2 rounded-2xl bg-transparent ring-0 md:flex-row dark:bg-transparent dark:ring-0",a?"flex-col md:flex-col":"md:flex-row md:items-center md:justify-start",t),...o});wp.displayName=cn.displayName;var Rp=({ref:e,className:t,size:a="default",...o})=>dl(fn,{ref:e,className:de("dark:data-[state=active]:bg-gray-700 dark:hover:text-gray-50 dark:text-gray-500 cursor-pointer px-4 text-gray-400 hover:text-black data-[state=active]:rounded-xl data-[state=active]:bg-gray-100 data-[state=active]:text-black data-[state=active]:shadow-none dark:data-[state=active]:text-white",a==="default"?"text-sm":"text-xs",t),...o});Rp.displayName=fn.displayName;var Pp=({ref:e,className:t,...a})=>dl(pn,{ref:e,className:de(t),...a});Pp.displayName=pn.displayName;import{jsx as LL}from"react/jsx-runtime";var cl=({ref:e,className:t,...a})=>LL("textarea",{className:re("border-input bg-background ring-offset-background placeholder:text-muted-foreground focus-visible:ring-ring flex min-h-[80px] w-full rounded-md border px-3 py-2 text-base focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t),ref:e,...a});cl.displayName="Textarea";import{jsx as bL}from"react/jsx-runtime";var mn=({ref:e,resizable:t=!0,className:a,...o})=>{let r=de("dark:border-gray-700 bg-white shadow-xs dark:bg-gray-800 dark:text-white dark:placeholder:text-gray-500 min-h-[120px] rounded-xl focus-visible:ring-blue-100 p-4 text-sm border-gray-200 outline-none focus:z-10 focus:border-blue-300 focus:ring-[3px] focus:ring-blue-100 dark:ring-offset-transparent dark:focus:border-blue-600 dark:focus:ring-blue-700/40",t?"":"resize-none",a);return bL(cl,{ref:e,className:r,...o})};mn.displayName="TextArea";import*as K from"react";import{jsx as De,jsxs as SL}from"react/jsx-runtime";var[gn,pM]=ve("Tooltip",[ao]),xn=ao(),kp="TooltipProvider",vL=700,fl="tooltip.open",[IL,ml]=gn(kp),Tp=e=>{let{__scopeTooltip:t,delayDuration:a=vL,skipDelayDuration:o=300,disableHoverableContent:r=!1,children:n}=e,s=K.useRef(!0),l=K.useRef(!1),u=K.useRef(0);return K.useEffect(()=>{let f=u.current;return()=>window.clearTimeout(f)},[]),De(IL,{scope:t,isOpenDelayedRef:s,delayDuration:a,onOpen:K.useCallback(()=>{window.clearTimeout(u.current),s.current=!1},[]),onClose:K.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>s.current=!0,o)},[o]),isPointerInTransitRef:l,onPointerInTransitChange:K.useCallback(f=>{l.current=f},[]),disableHoverableContent:r,children:n})};Tp.displayName=kp;var qo="Tooltip",[wL,Vo]=gn(qo),Ap=e=>{let{__scopeTooltip:t,children:a,open:o,defaultOpen:r,onOpenChange:n,disableHoverableContent:s,delayDuration:l}=e,u=ml(qo,e.__scopeTooltip),f=xn(t),[g,i]=K.useState(null),c=Pt(),m=K.useRef(0),h=s??u.disableHoverableContent,d=l??u.delayDuration,p=K.useRef(!1),[x,y]=Ve({prop:o,defaultProp:r??!1,onChange:b=>{b?(u.onOpen(),document.dispatchEvent(new CustomEvent(fl))):u.onClose(),n?.(b)},caller:qo}),C=K.useMemo(()=>x?p.current?"delayed-open":"instant-open":"closed",[x]),v=K.useCallback(()=>{window.clearTimeout(m.current),m.current=0,p.current=!1,y(!0)},[y]),S=K.useCallback(()=>{window.clearTimeout(m.current),m.current=0,y(!1)},[y]),w=K.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{p.current=!0,y(!0),m.current=0},d)},[d,y]);return K.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),De(Br,{...f,children:De(wL,{scope:t,contentId:c,open:x,stateAttribute:C,trigger:g,onTriggerChange:i,onTriggerEnter:K.useCallback(()=>{u.isOpenDelayedRef.current?w():v()},[u.isOpenDelayedRef,w,v]),onTriggerLeave:K.useCallback(()=>{h?S():(window.clearTimeout(m.current),m.current=0)},[S,h]),onOpen:v,onClose:S,disableHoverableContent:h,children:a})})};Ap.displayName=qo;var pl="TooltipTrigger",Mp=K.forwardRef((e,t)=>{let{__scopeTooltip:a,...o}=e,r=Vo(pl,a),n=ml(pl,a),s=xn(a),l=K.useRef(null),u=J(t,l,r.onTriggerChange),f=K.useRef(!1),g=K.useRef(!1),i=K.useCallback(()=>f.current=!1,[]);return K.useEffect(()=>()=>document.removeEventListener("pointerup",i),[i]),De(Or,{asChild:!0,...s,children:De(W.button,{"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute,...o,ref:u,onPointerMove:$(e.onPointerMove,c=>{c.pointerType!=="touch"&&!g.current&&!n.isPointerInTransitRef.current&&(r.onTriggerEnter(),g.current=!0)}),onPointerLeave:$(e.onPointerLeave,()=>{r.onTriggerLeave(),g.current=!1}),onPointerDown:$(e.onPointerDown,()=>{r.open&&r.onClose(),f.current=!0,document.addEventListener("pointerup",i,{once:!0})}),onFocus:$(e.onFocus,()=>{f.current||r.onOpen()}),onBlur:$(e.onBlur,r.onClose),onClick:$(e.onClick,r.onClose)})})});Mp.displayName=pl;var gl="TooltipPortal",[RL,PL]=gn(gl,{forceMount:void 0}),Dp=e=>{let{__scopeTooltip:t,forceMount:a,children:o,container:r}=e,n=Vo(gl,t);return De(RL,{scope:t,forceMount:a,children:De(Rt,{present:a||n.open,children:De(Bo,{asChild:!0,container:r,children:o})})})};Dp.displayName=gl;var uo="TooltipContent",Fp=K.forwardRef((e,t)=>{let a=PL(uo,e.__scopeTooltip),{forceMount:o=a.forceMount,side:r="top",...n}=e,s=Vo(uo,e.__scopeTooltip);return De(Rt,{present:o||s.open,children:s.disableHoverableContent?De(Ep,{side:r,...n,ref:t}):De(kL,{side:r,...n,ref:t})})}),kL=K.forwardRef((e,t)=>{let a=Vo(uo,e.__scopeTooltip),o=ml(uo,e.__scopeTooltip),r=K.useRef(null),n=J(t,r),[s,l]=K.useState(null),{trigger:u,onClose:f}=a,g=r.current,{onPointerInTransitChange:i}=o,c=K.useCallback(()=>{l(null),i(!1)},[i]),m=K.useCallback((h,d)=>{let p=h.currentTarget,x={x:h.clientX,y:h.clientY},y=FL(x,p.getBoundingClientRect()),C=EL(x,y),v=BL(d.getBoundingClientRect()),S=_L([...C,...v]);l(S),i(!0)},[i]);return K.useEffect(()=>()=>c(),[c]),K.useEffect(()=>{if(u&&g){let h=p=>m(p,g),d=p=>m(p,u);return u.addEventListener("pointerleave",h),g.addEventListener("pointerleave",d),()=>{u.removeEventListener("pointerleave",h),g.removeEventListener("pointerleave",d)}}},[u,g,m,c]),K.useEffect(()=>{if(s){let h=d=>{let p=d.target,x={x:d.clientX,y:d.clientY},y=u?.contains(p)||g?.contains(p),C=!OL(x,s);y?c():C&&(c(),f())};return document.addEventListener("pointermove",h),()=>document.removeEventListener("pointermove",h)}},[u,g,s,f,c]),De(Ep,{...e,ref:n})}),[TL,AL]=gn(qo,{isInside:!1}),ML=od("TooltipContent"),Ep=K.forwardRef((e,t)=>{let{__scopeTooltip:a,children:o,"aria-label":r,onEscapeKeyDown:n,onPointerDownOutside:s,...l}=e,u=Vo(uo,a),f=xn(a),{onClose:g}=u;return K.useEffect(()=>(document.addEventListener(fl,g),()=>document.removeEventListener(fl,g)),[g]),K.useEffect(()=>{if(u.trigger){let i=c=>{c.target?.contains(u.trigger)&&g()};return window.addEventListener("scroll",i,{capture:!0}),()=>window.removeEventListener("scroll",i,{capture:!0})}},[u.trigger,g]),De(To,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:i=>i.preventDefault(),onDismiss:g,children:SL(_r,{"data-state":u.stateAttribute,...f,...l,ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[De(ML,{children:o}),De(TL,{scope:a,isInside:!0,children:De(Xc,{id:u.contentId,role:"tooltip",children:r||o})})]})})});Fp.displayName=uo;var Bp="TooltipArrow",DL=K.forwardRef((e,t)=>{let{__scopeTooltip:a,...o}=e,r=xn(a);return AL(Bp,a).isInside?null:De(Nr,{...r,...o,ref:t})});DL.displayName=Bp;function FL(e,t){let a=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),r=Math.abs(t.right-e.x),n=Math.abs(t.left-e.x);switch(Math.min(a,o,r,n)){case n:return"left";case r:return"right";case a:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function EL(e,t,a=5){let o=[];switch(t){case"top":o.push({x:e.x-a,y:e.y+a},{x:e.x+a,y:e.y+a});break;case"bottom":o.push({x:e.x-a,y:e.y-a},{x:e.x+a,y:e.y-a});break;case"left":o.push({x:e.x+a,y:e.y-a},{x:e.x+a,y:e.y+a});break;case"right":o.push({x:e.x-a,y:e.y-a},{x:e.x-a,y:e.y+a});break}return o}function BL(e){let{top:t,right:a,bottom:o,left:r}=e;return[{x:r,y:t},{x:a,y:t},{x:a,y:o},{x:r,y:o}]}function OL(e,t){let{x:a,y:o}=e,r=!1;for(let n=0,s=t.length-1;n<t.length;s=n++){let l=t[n],u=t[s],f=l.x,g=l.y,i=u.x,c=u.y;g>o!=c>o&&a<(i-f)*(o-g)/(c-g)+f&&(r=!r)}return r}function _L(e){let t=e.slice();return t.sort((a,o)=>a.x<o.x?-1:a.x>o.x?1:a.y<o.y?-1:a.y>o.y?1:0),NL(t)}function NL(e){if(e.length<=1)return e.slice();let t=[];for(let o=0;o<e.length;o++){let r=e[o];for(;t.length>=2;){let n=t[t.length-1],s=t[t.length-2];if((n.x-s.x)*(r.y-s.y)>=(n.y-s.y)*(r.x-s.x))t.pop();else break}t.push(r)}t.pop();let a=[];for(let o=e.length-1;o>=0;o--){let r=e[o];for(;a.length>=2;){let n=a[a.length-1],s=a[a.length-2];if((n.x-s.x)*(r.y-s.y)>=(n.y-s.y)*(r.x-s.x))a.pop();else break}a.push(r)}return a.pop(),t.length===1&&a.length===1&&t[0].x===a[0].x&&t[0].y===a[0].y?t:t.concat(a)}var Op=Tp,_p=Ap,Np=Mp,Up=Dp,xl=Fp;import{jsx as Hp}from"react/jsx-runtime";var Go=Op,Wo=_p,zo=Np,co=({ref:e,className:t,sideOffset:a=4,...o})=>Hp(Up,{children:Hp(xl,{ref:e,sideOffset:a,className:re("bg-popover text-popover-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 overflow-hidden rounded-md border px-3 py-1.5 text-sm shadow-md",t),...o})});co.displayName=xl.displayName;import{useEffect as CM,useRef as LM,useState as bM,useId as SM}from"react";import{Fragment as PM,jsx as wM,jsxs as RM}from"react/jsx-runtime";import{useMemo as HL}from"react";import{jsx as $o,jsxs as qL}from"react/jsx-runtime";var VL=({allowedCountries:e,locale:t,value:a,onChange:o,autoComplete:r,disabled:n,className:s,itemClassName:l,contentClassName:u,placeholder:f="Country"})=>{let g=HL(()=>{let i=new Intl.DisplayNames(t?[t]:[],{type:"region"});return e.map(c=>({code:c,name:i.of(c)??c})).sort((c,m)=>c.name.localeCompare(m.name,t))},[e,t]);return qL(ua,{onValueChange:o,value:a,autoComplete:r,disabled:n,children:[$o(Vt,{className:s,children:$o(qt,{placeholder:f,translate:"no"})}),$o(Gt,{className:u,translate:"no",children:g.map(({code:i,name:c})=>$o(Wt,{value:i,textValue:c,className:l,children:$o("div",{children:c})},i))})]})},qp=VL;import{jsx as fo,jsxs as GL}from"react/jsx-runtime";var Vp={US:{"US-AL":"Alabama","US-AK":"Alaska","US-AZ":"Arizona","US-AR":"Arkansas","US-CA":"California","US-CO":"Colorado","US-CT":"Connecticut","US-DE":"Delaware","US-FL":"Florida","US-GA":"Georgia","US-HI":"Hawaii","US-ID":"Idaho","US-IL":"Illinois","US-IN":"Indiana","US-IA":"Iowa","US-KS":"Kansas","US-KY":"Kentucky","US-LA":"Louisiana","US-ME":"Maine","US-MD":"Maryland","US-MA":"Massachusetts","US-MI":"Michigan","US-MN":"Minnesota","US-MS":"Mississippi","US-MO":"Missouri","US-MT":"Montana","US-NE":"Nebraska","US-NV":"Nevada","US-NH":"New Hampshire","US-NJ":"New Jersey","US-NM":"New Mexico","US-NY":"New York","US-NC":"North Carolina","US-ND":"North Dakota","US-OH":"Ohio","US-OK":"Oklahoma","US-OR":"Oregon","US-PA":"Pennsylvania","US-RI":"Rhode Island","US-SC":"South Carolina","US-SD":"South Dakota","US-TN":"Tennessee","US-TX":"Texas","US-UT":"Utah","US-VT":"Vermont","US-VA":"Virginia","US-WA":"Washington","US-WV":"West Virginia","US-WI":"Wisconsin","US-WY":"Wyoming","US-DC":"District of Columbia"},CA:{"CA-AB":"Alberta","CA-BC":"British Columbia","CA-MB":"Manitoba","CA-NB":"New Brunswick","CA-NL":"Newfoundland and Labrador","CA-NS":"Nova Scotia","CA-NT":"Northwest Territories","CA-NU":"Nunavut","CA-ON":"Ontario","CA-PE":"Prince Edward Island","CA-QC":"Quebec","CA-SK":"Saskatchewan","CA-YT":"Yukon"}},hl=Object.keys(Vp),WL=({className:e,value:t,onChange:a,country:o,autoComplete:r,itemClassName:n,contentClassName:s,disabled:l,placeholder:u="State",fallbackPlaceholder:f="State / Province"})=>{let g=o?Vp[o]:void 0;return g?GL(ua,{onValueChange:a,value:t,autoComplete:r,disabled:l,children:[fo(Vt,{className:e,children:fo(qt,{placeholder:u,translate:"no"})}),fo(Gt,{className:s,translate:"no",children:Object.entries(g).map(([i,c])=>fo(Wt,{value:i,textValue:c,className:n,children:fo("div",{children:c})},i))})]}):fo(ye,{type:"text",placeholder:f,value:t,onChange:i=>a(i.target.value),disabled:l})},Gp=WL;function Pe(...e){return de(e)}import*as $p from"react";var zL=xa(aa(),1);import*as Wp from"react";import{jsx as $L}from"react/jsx-runtime";var XL=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],zp=XL.reduce((e,t)=>{let a=Kn(`Primitive.${t}`),o=Wp.forwardRef((r,n)=>{let{asChild:s,...l}=r,u=s?a:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),$L(u,{...l,ref:n})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});import{jsx as jL}from"react/jsx-runtime";var KL="Label",Xp=$p.forwardRef((e,t)=>jL(zp.label,{...e,ref:t,onMouseDown:a=>{a.target.closest("button, input, select, textarea")||(e.onMouseDown?.(a),!a.defaultPrevented&&a.detail>1&&a.preventDefault())}}));Xp.displayName=KL;var yl=Xp;import{jsx as YL}from"react/jsx-runtime";var QL=Ot("block text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Cl=({ref:e,className:t,...a})=>YL(yl,{ref:e,className:Pe(QL(),t),...a});Cl.displayName=yl.displayName;import*as ca from"react";import{jsx as fa}from"react/jsx-runtime";var Xo=Zl,jp=ca.createContext({}),Ue=({...e})=>fa(jp.Provider,{value:{name:e.name},children:fa(jl,{...e})}),jo=()=>{let e=ca.useContext(jp),t=ca.useContext(Kp),{getFieldState:a,formState:o}=Kl(),r=a(e.name,o);if(!e)throw new Error("useFormField should be used within <FormField>");let{id:n}=t;return{id:n,name:e.name,formItemId:`${n}-form-item`,formDescriptionId:`${n}-form-item-description`,formMessageId:`${n}-form-item-message`,...r}},Kp=ca.createContext({}),tt=({ref:e,className:t,...a})=>{let o=ca.useId();return fa(Kp.Provider,{value:{id:o},children:fa("div",{ref:e,className:Pe("space-y-2",t),...a})})};tt.displayName="FormItem";var Lt=({ref:e,className:t,...a})=>{let{error:o,formItemId:r}=jo();return fa(Cl,{ref:e,className:Pe(o&&"text-destructive",t),htmlFor:r,...a})};Lt.displayName="FormLabel";var Fe=({ref:e,...t})=>{let{error:a,formItemId:o,formDescriptionId:r,formMessageId:n}=jo();return fa(mr,{ref:e,id:o,"aria-describedby":a?`${r} ${n}`:`${r}`,"aria-invalid":!!a,...t})};Fe.displayName="FormControl";var hn=({ref:e,className:t,...a})=>{let{formDescriptionId:o}=jo();return fa("p",{ref:e,id:o,className:Pe("text-muted-foreground text-sm",t),...a})};hn.displayName="FormDescription";var ke=({ref:e,className:t,children:a,...o})=>{let{error:r,formMessageId:n}=jo(),s=r?String(r?.message):a;return s?fa("p",{ref:e,id:n,className:Pe("text-destructive text-sm font-medium",t),...o,children:s}):null};ke.displayName="FormMessage";import{Elements as mS,ElementsConsumer as gS,PaymentElement as xS}from"@stripe/react-stripe-js";import{loadStripe as hS}from"@stripe/stripe-js";import{useCallback as In,useEffect as Ml,useMemo as Dl,useState as yS}from"react";import{useCallback as JL,useRef as eb}from"react";var Ll=(e,t,a)=>{let o=eb(null);return JL((...r)=>{o.current!=null&&clearTimeout(o.current),o.current=setTimeout(()=>{e(...r)},t)},[e,t,...a||[]])},Zp=Ll;var $t=e=>e==="required"||e==="optional",qa=e=>e==="required";var Yp=e=>{let t=$l(e)?e:nr(e);switch(t){case"pt-PT":return"pt";default:return t}};import*as gm from"react";function Ft(){return Ft=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var o in a)({}).hasOwnProperty.call(a,o)&&(e[o]=a[o])}return e},Ft.apply(null,arguments)}var yn=["strong","em","del","mark"],Qp=[["**",yn[0]],["__",yn[0]],["~~",yn[2]],["==",yn[3]],["*","em"],["_","em"]];function tb(e,t){for(var a=1,o=t+1;o<e.length&&a>0;)e[o]!=="\\"?(e[o]==="["&&a++,e[o]==="]"&&a--,o++):o+=2;if(a===0&&o<e.length&&(e[o]==="("||e[o]==="[")){var r=e[o]==="("?")":"]",n=1;for(o++;o<e.length&&n>0;)e[o]!=="\\"?(e[o]==="("&&r===")"&&n++,e[o]===r&&n--,o++):o+=2;if(n===0)return o}return-1}function ab(e,t){if(!t||!t.inline&&!t.simple)return null;var a=e[0];if(a!=="*"&&a!=="_"&&a!=="~"&&a!=="=")return null;for(var o="",r=0,n="",s=0;s<6;s++){var l=Qp[s][0];if(e.startsWith(l)&&e.length>=2*l.length){o=l,r=l.length,n=Qp[s][1];break}}if(!o)return null;for(var u=r,f=!1,g=!1,i="",c=0,m="",h=!1,d="";u<e.length;){var p=e[u];if(h)m+=p,h=!1,d=p,u++;else if(p!=="\\")if(p!=="`"||c!==0){if(p==="["&&!f&&c===0){var x=tb(e,u);if(x!==-1){m+=e.slice(u,x),u=x,d=e[x-1];continue}}if(g)m+=p,i?p===i&&(i=""):p==='"'||p==="'"?i=p:p===">"&&(g=!1),d=p,u++;else if(p!=="<"||f){if(p===`
|
|
46
46
|
`&&d===`
|
|
47
47
|
`&&!f&&c===0)return null;if(!f&&c===0){for(var y=0;u+y<e.length&&e[u+y]===o[0];)y++;if(y>=r&&(r!==1||o!=="*"&&o!=="_"||e[u-1]!==o&&e[u+1]!==o)){var C=[e.slice(0,u+y),n,m+e.slice(u+r,u+y)];return C.index=0,C.input=e,C}}m+=p,d=p,u++}else{var v=e[u+1],S=e.indexOf(">",u);if(S!==-1){var w=e.slice(u,S+1).endsWith("/>");v==="/"?c=Math.max(0,c-1):w||c++}g=!0,m+=p,d=p,u++}}else f=!f,m+=p,d=p,u++;else m+=p,h=!0,d=p,u++}return null}var ob=["children","options"];var Jp=["allowFullScreen","allowTransparency","autoComplete","autoFocus","autoPlay","cellPadding","cellSpacing","charSet","classId","colSpan","contentEditable","contextMenu","crossOrigin","encType","formAction","formEncType","formMethod","formNoValidate","formTarget","frameBorder","hrefLang","inputMode","keyParams","keyType","marginHeight","marginWidth","maxLength","mediaGroup","minLength","noValidate","radioGroup","readOnly","rowSpan","spellCheck","srcDoc","srcLang","srcSet","tabIndex","useMap"].reduce(function(e,t){return e[t.toLowerCase()]=t,e},{class:"className",for:"htmlFor"}),em={amp:"&",apos:"'",gt:">",lt:"<",nbsp:"\xA0",quot:"\u201C"},rb=["style","script","pre"],nb=["src","href","data","formAction","srcDoc","action"],sb=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,lb=/\n{2,}$/,tm=/^(\s*>[\s\S]*?)(?=\n\n|$)/,ib=/^ *> ?/gm,ub=/^(?:\[!([^\]]*)\]\n)?([\s\S]*)/,db=/^ {2,}\n/,cb=/^(?:([-*_])( *\1){2,}) *(?:\n *)+\n/,am=/^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/,om=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,fb=/^(`+)((?:\\`|(?!\1)`|[^`])+)\1/,pb=/^(?:\n *)*\n/,mb=/\r\n?/g,gb=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,xb=/^\[\^([^\]]+)]/,hb=/\f/g,yb=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,Cb=/^\[(x|\s)\]/,rm=/^(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,nm=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,sm=/^([^\n]+)\n *(=|-)\2{2,} *\n/,Rl=/^<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>/i;function Lb(e){var t=Rl.exec(e);if(!t)return null;var a=t[1],o=a.toLowerCase(),r=o.length+1,n=t[0].length;e[n]===`
|
|
48
48
|
`&&n++;for(var s=n,l=n,u=1,f=e.length;u>0;){var g=e.indexOf("<",n);if(g===-1)return null;var i=-1,c=-1;if(e[g+1]==="/")c=g;else if(e[g+1]===o[0]||e[g+1]===a[0]){for(var m=!0,h=0;h<o.length;h++){var d=e[g+1+h];if(d!==o[h]&&d!==a[h]){m=!1;break}}!m||e[g+r]!==" "&&e[g+r]!==">"||(i=g)}if(i!==-1||c!==-1)if(i!==-1&&(c===-1||i<c))n=i+r+1,u++;else{for(var p=c+2;p<f;){var x=e[p];if(x!==" "&&x!==" "&&x!==`
|
|
@@ -65,7 +65,7 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
|
|
|
65
65
|
`))return null;for(var x="",y=0;;){var C=d.indexOf(`
|
|
66
66
|
`,y),v=d.slice(y,C===-1?void 0:C+1),S=d[y];if((S===">"||S==="#"||S==="|"||S==="`"||S==="~"||S==="*"||S==="-"||S==="_"||S===" ")&&mm(s,v)||(x+=v,C===-1||!v.trim()))break;y=C+1}var w=Zo(x);return w===""?null:[x,,w]}),i:3,o:oS},a[22]={t:["["],u:pa(kb),i:0,o:function(d){return i[d[1]]={target:d[2],title:d[4]},{}}},a[23]={t:["!["],u:Cn(Tb),i:0,o:function(d){return{alt:d[1]?Dt(d[1]):void 0,ref:d[2]}}},a[24]={t:function(d){return d[0]==="["&&!Mt(d,"](")},u:pa(Ab),i:0,o:function(d,p,x){return{children:p(d[1],x),fallbackChildren:d[0],ref:d[2]}}},a[25]={t:["|"],u:Xt(im),i:1,o:Qb},a[27]={u:ma(function(d,p){var x;return Il(d,":")&&(x=_b.exec(d)),x||Hb.exec(d)}),i:4,o:function(d){var p=d[0];return{text:Mt(p,"&")?p.replace(bb,function(x,y){return t.namedCodesToUnicode[y]||x}):p}}},a[34]={t:["*","_","~","="],u:ma(ab),i:2,o:function(d,p,x){return{children:p(d[2],x),tag:d[1]}}},a[28]={t:["\\"],u:Cn(Nb),i:1,o:function(d){return{text:d[1],type:"27"}}},a);t.disableParsingRawHTML===!0&&(delete c[11],delete c[13]);var m=(function(d){var p=Object.keys(d);function x(y,C){var v=[];if(C.prevCapture=C.prevCapture||"",y.trim())for(;y;)for(var S=0;S<p.length;){var w=p[S],b=d[w];if(!b.t||Zb(y,C,b.t)){var I=b.u(y,C);if(I&&I[0]){y=y.substring(I[0].length);var D=b.o(I,x,C);C.prevCapture+=I[0],D.type||(D.type=w),v.push(D);break}S++}else S++}return C.prevCapture="",v}return p.sort(function(y,C){return d[y].i-d[C].i||(y<C?-1:1)}),function(y,C){return x((function(v){return v.replace(mb,`
|
|
67
67
|
`).replace(hb,"").replace(Db," ")})(y),C)}})(c),h=(function(d,p,x,y,C){function v(S){return Array.isArray(S)?S.map(function(w){return"text"in w?w.text:""}):"text"in S?S.text:""}return function S(w,b){b===void 0&&(b={});var I=(b.renderDepth||0)+1;if(I>2500)return v(w);b.renderDepth=I;try{if(Array.isArray(w)){for(var D=b.key,F=[],k=!1,T=0;T<w.length;T++){b.key=T;var q=S(w[T],b),z=dm(q);z&&k?F[F.length-1]+=q:q!==null&&F.push(q),k=z}return b.key=D,b.renderDepth=I-1,F}var j=(function(E,G,N){var P=function(){return(function(R,_,U,Z,Ce,ce,se){switch(R.type){case"0":var V={key:U.key};return R.alert&&(V.className="markdown-alert-"+ce(R.alert.toLowerCase(),Ko),R.children.unshift({attrs:{},children:[{type:"27",text:R.alert}],noInnerParse:!0,type:"11",tag:"header"})),Z("blockquote",V,_(R.children,U));case"1":return Z("br",{key:U.key});case"2":return Z("hr",{key:U.key});case"3":return Z("pre",{key:U.key},Z("code",Ft({},R.attrs,{className:R.lang?"lang-"+R.lang:""}),R.text));case"5":return Z("code",{key:U.key},R.text);case"7":return Z("a",{key:U.key,href:Ce(R.target,"a","href")},Z("sup",{key:U.key},R.text));case"8":return Z("input",{checked:R.completed,key:U.key,readOnly:!0,type:"checkbox"});case"9":return Z("h"+R.level,{id:R.id,key:U.key},_(R.children,U));case"11":return Z(R.tag,Ft({key:U.key},R.attrs),R.text||(R.children?_(R.children,U):""));case"13":return Z(R.tag,Ft({},R.attrs,{key:U.key}));case"14":return Z("img",{key:U.key,alt:R.alt||void 0,title:R.title||void 0,src:Ce(R.target,"img","src")});case"15":return Z("a",{key:U.key,href:Ce(R.target,"a","href"),title:R.title},_(R.children,U));case"23":return se[R.ref]?Z("img",{key:U.key,alt:R.alt,src:Ce(se[R.ref].target,"img","src"),title:se[R.ref].title}):null;case"24":return se[R.ref]?Z("a",{key:U.key,href:Ce(se[R.ref].target,"a","href"),title:se[R.ref].title},_(R.children,U)):Z("span",{key:U.key},R.fallbackChildren);case"25":var le=R;return Z("table",{key:U.key},Z("thead",null,Z("tr",null,le.header.map(function(Q,oe){return Z("th",{key:oe,style:fm(le,oe)},_(Q,U))}))),Z("tbody",null,le.cells.map(function(Q,oe){return Z("tr",{key:oe},Q.map(function(ne,ue){return Z("td",{key:ue,style:fm(le,ue)},_(ne,U))}))})));case"27":return R.text;case"34":return Z(R.tag,{key:U.key},_(R.children,U));case"20":case"30":return Z(R.ordered?"ol":"ul",{key:U.key,start:R.type==="20"?R.start:void 0},R.items.map(function(Q,oe){return Z("li",{key:oe},_(Q,U))}));case"19":return`
|
|
68
|
-
`;case"21":return Z("p",{key:U.key},_(R.children,U));default:return null}})(E,G,N,p,x,y,C)};return d?d(P,E,G,N):P()})(w,S,b);return b.renderDepth=I-1,j}catch(E){if(E instanceof RangeError&&E.message.includes("Maximum call stack"))return v(w);throw E}}})(t.renderRule,u,r,o,i);return f(e)}var Tl=function(e){var t=e.children,a=e.options,o=(function(r,n){if(r==null)return{};var s={};for(var l in r)if({}.hasOwnProperty.call(r,l)){if(n.indexOf(l)!==-1)continue;s[l]=r[l]}return s})(e,ob);return sS(t??"",Ft({},a,{wrapperProps:Ft({},a?.wrapperProps,o)}))};function bn(e){throw new Error(`Unreachable: ${e}`)}import{Fragment as Al,jsx as ae,jsxs as Sn}from"react/jsx-runtime";var Im={disableParsingRawHTML:!0,forceBlock:!1,overrides:{h1:e=>ae("span",{...e}),h2:e=>ae("span",{...e}),h3:e=>ae("span",{...e}),h4:e=>ae("span",{...e}),h5:e=>ae("span",{...e}),h6:e=>ae("span",{...e}),p:e=>ae("span",{...e}),embed:()=>ae(Al,{}),iframe:()=>ae(Al,{}),img:()=>ae(Al,{}),a:e=>ae("a",{...e,rel:"noopener noreferrer nofollow",target:"_blank",className:"text-blue-400 hover:underline"})}},wm=({customField:e})=>ae(Lt,{children:e.properties.form_label?ae(Tl,{options:Im,children:e.properties.form_label}):e.name}),Rm=({customField:e})=>e.properties.form_help_text?ae(hn,{children:ae(Tl,{options:Im,children:e.properties.form_help_text})}):null,lS=({customField:e,required:t,field:a})=>e.properties.textarea?ae(mn,{...a,placeholder:e.properties.form_placeholder,required:t,minLength:e.properties.min_length,maxLength:e.properties.max_length}):ae(ye,{...a,className:"bg-white shadow-xs",type:"text",placeholder:e.properties.form_placeholder,required:t,minLength:e.properties.min_length,maxLength:e.properties.max_length}),iS=({customField:e,required:t,field:a})=>ae(ye,{...a,type:"number",className:"bg-white shadow-xs",placeholder:e.properties.form_placeholder,required:t,min:e.properties.ge,max:e.properties.le}),uS=({customField:e,required:t,field:a})=>{let{ge:o,le:r}=e.properties,n=o?new Date(o*1e3).toISOString().slice(0,10):void 0,s=r?new Date(r*1e3).toISOString().slice(0,10):void 0;return ae(ye,{...a,type:"date",className:"bg-white shadow-xs",placeholder:e.properties.form_placeholder,required:t,min:n,max:s})},Pm=({customField:e,required:t,field:a})=>Sn(tt,{children:[Sn("div",{className:"flex flex-row items-center space-y-0 space-x-3",children:[ae(Fe,{children:ae(wa,{defaultChecked:a.value,onCheckedChange:a.onChange,required:t})}),ae(wm,{customField:e})]}),ae(ke,{}),ae(Rm,{customField:e})]}),dS=({customField:e,required:t,field:a})=>Sn(ua,{onValueChange:a.onChange,defaultValue:a.value,required:t,children:[ae(Vt,{children:ae(qt,{placeholder:e.properties.form_placeholder})}),ae(Gt,{children:e.properties.options.map(({label:o,value:r})=>ae(Wt,{value:r,textValue:o,children:o},r))})]}),cS=(e,t,a)=>{switch(e.type){case"text":return ae(lS,{customField:e,required:t,field:a});case"number":return ae(iS,{customField:e,required:t,field:a});case"date":return ae(uS,{customField:e,required:t,field:a});case"select":return ae(dS,{customField:e,required:t,field:a});case"checkbox":return ae(Pm,{customField:e,required:t,field:a});default:bn(e)}},fS=({customField:e,required:t,field:a})=>e.type==="checkbox"?ae(Pm,{customField:e,required:t,field:a}):Sn(tt,{children:[ae(wm,{customField:e}),ae(Fe,{children:cS(e,t,a)}),ae(ke,{}),ae(Rm,{customField:e})]}),km=fS;import{jsx as vn,jsxs as Tm}from"react/jsx-runtime";var pS=({className:e,width:t,height:a})=>Tm("svg",{viewBox:"0 0 360 120",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,width:t,height:a,"aria-label":"Ruba",children:[Tm("g",{className:"fill-[#08080c] dark:fill-white",transform:"translate(2.5 0)",children:[vn("path",{d:"M19 25h59L65.43 47H19a4 4 0 0 1-4-4V29a4 4 0 0 1 4-4Z"}),vn("path",{d:"M19 73h31.57L38 95H19a4 4 0 0 1-4-4V77a4 4 0 0 1 4-4Z"}),vn("path",{d:"M85 25h25L70 95H45Z",fill:"#007AFF"})]}),vn("text",{x:"145",y:"83",className:"fill-[#08080c] dark:fill-white",fontFamily:"Inter, -apple-system, BlinkMacSystemFont, sans-serif",fontSize:"76",fontWeight:"600",letterSpacing:"-1.52",children:"Ruba"})]}),Am=pS;import{Fragment as Yo,jsx as M,jsxs as pe}from"react/jsx-runtime";var CS=["apple_pay","google_pay","link"],LS=({className:e})=>pe("svg",{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",className:e,children:[M("path",{d:"M18 6 6 18"}),M("path",{d:"m6 6 12 12"})]}),Mm=({form:e,checkout:t,confirm:a,update:o,loading:r,loadingLabel:n,disabled:s,isUpdatePending:l,children:u,locale:f,isWalletPayment:g,beforeSubmit:i})=>{let c=ho(t)?Wa(t.product_price)?t.product_price.recurring_interval:t.product.recurring_interval:null,{control:m,handleSubmit:h,watch:d,clearErrors:p,resetField:x,formState:{errors:y}}=e,C=t.discount,v=C&&C.code===null,{is_business_customer:S}=t,w=f||"en",b=he(w),I=d("customer_billing_address.country"),D=In(async(P,{name:R})=>{if(!R)return;let _={};if(R==="customer_billing_address.country"){let{customer_billing_address:U}=P;if(U&&U.country){let Z=U.country,Ce=!!I&&hl.includes(I),ce=hl.includes(Z);I!==Z&&(Ce||ce)&&x("customer_billing_address.state",{defaultValue:""}),p("customer_billing_address"),_={..._,customer_billing_address:{country:Z}}}}else if(R.startsWith("customer_billing_address")){let{customer_billing_address:U}=P;U&&U.country&&(_={..._,customer_billing_address:{...U,country:U.country}},p("customer_billing_address"))}if(Object.keys(_).length!==0)try{await o(_)}catch{}},[p,I,x,o]),F=Ll(D,500,[D]),k=d("discount_code");Ml(()=>{!k&&!t.discount&&p("discount_code")},[k,t.discount,p]);let T=In(async P=>{try{await o({is_business_customer:P})}catch{}},[o]);Ml(()=>{let P=d(F);return()=>P.unsubscribe()},[d,F]);let q=d("customer_tax_id"),z=In(async()=>{if(q){p("customer_tax_id");try{await o({customer_tax_id:q})}catch{}}},[o,q,p]),j=In(async()=>{p("customer_tax_id");try{await o({customer_tax_id:null}),x("customer_tax_id")}catch{}},[o,p,x]),E=async P=>{let R=P.custom_field_data?Object.fromEntries(Object.entries(P.custom_field_data).filter(([,_])=>_!=null)):{};(P.discount_code===""||!P.discount_code&&v)&&delete P.discount_code,await a({...P,locale:f,custom_field_data:R})},G=!!t.customer_tax_id;Ml(()=>{t.discount||x("discount_code")},[t,x]);let N=Dl(()=>t.active_trial_interval?b("checkout.cta.startTrial"):t.is_payment_form_required?b(c?"checkout.cta.subscribeNow":"checkout.cta.payNow"):b("checkout.cta.getFree"),[t,c,b]);return pe("div",{className:"flex flex-col justify-between gap-y-8",children:[pe("div",{className:"flex flex-col gap-y-6",children:[M(Xo,{...e,children:pe("form",{onSubmit:h(E),className:"flex flex-col gap-y-6",children:[pe("div",{className:"flex flex-col gap-y-4",children:[M(Ue,{control:m,name:"customer_email",rules:{required:b("checkout.form.fieldRequired")},render:({field:P})=>pe(tt,{children:[M(Lt,{children:b("checkout.form.email")}),M(Fe,{children:M(ye,{type:"email",autoComplete:"email",...P,value:P.value||"",disabled:t.customer_id!==null})}),M(ke,{})]})}),u,t.is_payment_form_required&&!g&&M(Ue,{control:m,name:"customer_name",rules:{required:b("checkout.form.fieldRequired")},render:({field:P})=>pe(tt,{children:[M(Lt,{children:b("checkout.form.cardholderName")}),M(Fe,{children:M(ye,{type:"text",autoComplete:"name",...P,value:P.value||""})}),M(ke,{})]})}),(t.is_payment_form_required||t.require_billing_address)&&pe(Yo,{children:[pe(tt,{children:[M(Lt,{children:b("checkout.form.billingAddress.label")}),$t(t.billing_address_fields.line1)&&M(Fe,{children:M(Ue,{control:m,name:"customer_billing_address.line1",rules:{required:qa(t.billing_address_fields.line1)?b("checkout.form.fieldRequired"):!1},render:({field:P})=>pe(Yo,{children:[M(ye,{type:"text",autoComplete:"billing address-line1",placeholder:b("checkout.form.billingAddress.line1"),...P,value:P.value||""}),M(ke,{})]})})}),$t(t.billing_address_fields.line2)&&M(Fe,{children:M(Ue,{control:m,name:"customer_billing_address.line2",rules:{required:qa(t.billing_address_fields.line2)?b("checkout.form.fieldRequired"):!1},render:({field:P})=>pe(Yo,{children:[M(ye,{type:"text",autoComplete:"billing address-line2",placeholder:b("checkout.form.billingAddress.line2"),...P,value:P.value||""}),M(ke,{})]})})}),($t(t.billing_address_fields.postal_code)||$t(t.billing_address_fields.city))&&pe("div",{className:"grid grid-cols-2 gap-x-2",children:[$t(t.billing_address_fields.postal_code)&&M(Fe,{children:M(Ue,{control:m,name:"customer_billing_address.postal_code",rules:{required:qa(t.billing_address_fields.postal_code)?b("checkout.form.fieldRequired"):!1},render:({field:P})=>pe("div",{children:[M(ye,{type:"text",autoComplete:"billing postal-code",placeholder:b("checkout.form.billingAddress.postalCode"),...P,value:P.value||""}),M(ke,{})]})})}),$t(t.billing_address_fields.city)&&M(Fe,{children:M(Ue,{control:m,name:"customer_billing_address.city",rules:{required:qa(t.billing_address_fields.city)?b("checkout.form.fieldRequired"):!1},render:({field:P})=>pe("div",{children:[M(ye,{type:"text",autoComplete:"billing address-level2",placeholder:b("checkout.form.billingAddress.city"),...P,value:P.value||""}),M(ke,{})]})})})]}),$t(t.billing_address_fields.state)&&M(Fe,{children:M(Ue,{control:m,name:"customer_billing_address.state",rules:{required:qa(t.billing_address_fields.state)?b("checkout.form.fieldRequired"):!1},render:({field:P})=>pe(Yo,{children:[M(Gp,{autoComplete:"billing address-level1",country:I,value:P.value||"",onChange:P.onChange,placeholder:b(I==="US"?"checkout.form.billingAddress.state":"checkout.form.billingAddress.province"),fallbackPlaceholder:b("checkout.form.billingAddress.stateProvince")}),M(ke,{})]})})}),$t(t.billing_address_fields.country)&&M(Fe,{children:M(Ue,{control:m,name:"customer_billing_address.country",rules:{required:qa(t.billing_address_fields.country)?b("checkout.form.fieldRequired"):!1},render:({field:P})=>pe(Yo,{children:[M(qp,{allowedCountries:zl.addressInputCountryValues,autoComplete:"billing country",value:P.value||void 0,onChange:P.onChange,placeholder:b("checkout.form.billingAddress.country"),locale:w}),M(ke,{})]})})}),y.customer_billing_address?.message&&M("p",{className:"text-destructive-foreground text-sm",children:y.customer_billing_address.message})]}),M(Ue,{control:m,name:"is_business_customer",render:({field:P})=>pe(tt,{className:"-mt-4",children:[pe("div",{className:"flex flex-row items-center space-y-0 space-x-2",children:[M(Fe,{children:M(wa,{className:Pe("dark:border-gray-600 cursor-pointer border-gray-300",P.value?"border-primary":""),checked:P.value?P.value:!1,onCheckedChange:R=>{l||(P.onChange(R),T(!!R))}})}),M(Lt,{className:"cursor-pointer font-normal dark:text-gray-400",children:b("checkout.form.purchasingAsBusiness")})]}),M(ke,{})]})}),S&&pe("div",{className:"rounded-card flex flex-col gap-y-4 border border-gray-200 bg-gray-50 p-4",children:[M("span",{className:"text-sm font-medium",children:b("checkout.form.billingDetails")}),M(Ue,{control:m,name:"customer_billing_name",rules:{required:b("checkout.form.fieldRequired")},render:({field:P})=>pe(tt,{children:[M(Fe,{children:M(ye,{type:"text",autoComplete:"billing organization",placeholder:b("checkout.form.businessName"),...P,value:P.value||""})}),M(ke,{})]})}),M(Ue,{control:m,name:"customer_tax_id",render:({field:P})=>pe(tt,{children:[M(Fe,{children:pe("div",{className:"relative",children:[M(ye,{type:"text",autoComplete:"off",placeholder:`${b("checkout.form.taxId")} (${b("checkout.form.optional")})`,...P,value:P.value||"",disabled:G}),pe("div",{className:"absolute inset-y-0 right-1 z-10 flex items-center gap-1",children:[!G&&q&&M(nt,{type:"button",variant:"secondary",size:"sm",onClick:z,children:b("checkout.form.apply")}),G&&M(nt,{type:"button",variant:"secondary",size:"sm",onClick:()=>j(),children:M(LS,{className:"h-4 w-4"})})]})]})}),M(ke,{})]})})]})]}),t.attached_custom_fields&&t.attached_custom_fields.map(({custom_field:P,required:R})=>M(Ue,{control:m,name:`custom_field_data.${P.slug}`,rules:{required:R?b("checkout.form.fieldRequired"):void 0},render:({field:_})=>M(km,{customField:P,required:R,field:_})},P.id))]}),i,pe("div",{className:"flex w-full flex-col items-center justify-center gap-y-2",children:[M(nt,{type:"submit",size:"lg",wrapperClassNames:"text-base",className:"w-full shadow-sm",disabled:s||l,loading:r,children:N}),r&&n&&M("p",{className:"text-sm text-gray-500 dark:text-gray-500",children:n}),s&&!r&&M("p",{className:"text-sm text-red-500 dark:text-red-500",children:b("checkout.cta.paymentsUnavailable")}),y.root&&M("p",{className:"text-destructive-foreground text-sm",children:y.root.message})]})]})}),M("div",{children:M(ei,{isPaymentRequired:t.is_payment_form_required,isTrial:!!t.active_trial_interval,isRecurring:!!c,buttonLabel:N,locale:w})})]}),pe("a",{href:"/",className:"flex w-full flex-row items-center justify-center gap-x-3 text-sm text-gray-400 dark:text-gray-600",target:"_blank",rel:"noreferrer",children:[M("span",{children:b("checkout.footer.poweredBy")}),M(Am,{className:"h-5 w-auto"})]})]})},bS=e=>{let{checkout:t,confirm:a,themePreset:o,locale:r}=e,{payment_processor_metadata:{publishable_key:n}}=t,s=Dl(()=>hS(n,{developerTools:{assistant:{enabled:!1}}}),[n]),[l,u]=yS(),f=l?CS.includes(l):!1,g=Dl(()=>t.is_payment_setup_required&&t.is_payment_required&&t.total_amount?{mode:"subscription",setupFutureUsage:"off_session",paymentMethodCreation:"manual",amount:t.total_amount,currency:t.currency}:t.is_payment_required&&t.total_amount?{mode:"payment",paymentMethodCreation:"manual",amount:t.total_amount,currency:t.currency}:{mode:"setup",paymentMethodCreation:"manual",setupFutureUsage:"off_session",currency:t.currency},[t]);return M(mS,{stripe:s,options:{...g,locale:r?Yp(r):void 0,customerSessionClientSecret:t.payment_processor_metadata.customer_session_client_secret,appearance:o.stripe},children:M(gS,{children:({stripe:i,elements:c})=>M(Mm,{...e,checkout:t,confirm:m=>a(m,i,c),isWalletPayment:f,children:t.is_payment_form_required&&M(xS,{options:{paymentMethodOrder:["apple_pay","google_pay","card"],layout:"tabs",fields:{billingDetails:{name:"never",email:"never",phone:"never",address:"never"}},terms:{applePay:"never",auBecsDebit:"never",bancontact:"never",card:"never",cashapp:"never",googlePay:"never",ideal:"never",paypal:"never",sepaDebit:"never",sofort:"never",usBankAccount:"never"}},onChange:m=>{u(m.value.type)}})})})})},SS=e=>{let{checkout:t,disabled:a}=e;return M(Mm,{...e,confirm:async()=>({...t,status:"confirmed",customer_session_token:""}),update:async()=>t,disabled:a??!0})},vS=e=>{let{checkout:{payment_processor:t}}=e;return t==="stripe"?M(bS,{...e}):M(SS,{...e})},IS=vS;var Et=e=>"legacy"in e,wn=e=>e.some(Et),wS=e=>e.amount_type==="metered_unit",Rn=(e,t)=>e.filter(a=>wS(a)&&(!t||a.price_currency===t));var RS=new Set(["bif","clp","djf","gnf","jpy","kmf","krw","mga","pyg","rwf","vnd","vuv","xaf","xof","xpf"]),ga=e=>RS.has(e.toLowerCase())?1:100,Va=e=>ga(e)===100,Fl=e=>e.replace(/[.,]00([^\d]*)$/,"$1"),PS=(e,t,a)=>{let o=ga(t),r=new Intl.NumberFormat(a,{style:"currency",currency:t,currencyDisplay:"narrowSymbol",minimumFractionDigits:Va(t)?2:0});return Fl(r.format(e/o))},kS=(e,t,a)=>{let o=ga(t),r=new Intl.NumberFormat(a,{style:"currency",currency:t,currencyDisplay:"symbol",minimumFractionDigits:Va(t)?2:0});return Fl(r.format(e/o))},TS=(e,t,a)=>{let o=ga(t);return new Intl.NumberFormat(a,{style:"currency",currency:t,currencyDisplay:"symbol",minimumFractionDigits:Va(t)?2:0}).format(e/o)},AS=(e,t,a)=>{let o=ga(t),r=e/o;return r>=1e6?new Intl.NumberFormat(a,{style:"currency",currency:t,currencyDisplay:"narrowSymbol",notation:"compact",compactDisplay:"short",maximumSignificantDigits:5,maximumFractionDigits:3,roundingPriority:"lessPrecision"}).format(r):r>=1e4?new Intl.NumberFormat(a,{style:"currency",currency:t,currencyDisplay:"narrowSymbol",minimumFractionDigits:0,maximumFractionDigits:0}).format(Math.trunc(r)):Fl(new Intl.NumberFormat(a,{style:"currency",currency:t,currencyDisplay:"narrowSymbol",minimumFractionDigits:Va(t)?2:0,maximumFractionDigits:Va(t)?2:0}).format(r))},MS=(e,t,a)=>{let o=ga(t);return new Intl.NumberFormat(a,{style:"currency",currency:t,currencyDisplay:"narrowSymbol",minimumFractionDigits:2,maximumFractionDigits:6}).format(e/o)},xe=(e,t)=>(a,o)=>{switch(e){case"compact":return PS(a,o,t);case"standard":return kS(a,o,t);case"accounting":return TS(a,o,t);case"statistics":return AS(a,o,t);case"subcent":return MS(a,o,t)}};var Dm=new Map;function DS(e){let t=nr(e),a=Dm.get(t);return a||(a=new Intl.PluralRules(t,{type:"ordinal"}),Dm.set(t,a)),a}function Pn(e,t="en"){let a=DS(t).select(e),o=$a(t),r=o.ordinal[a]??o.ordinal.other,n=typeof r=="object"&&"value"in r?r.value:r;return`${e}${n}`}import{useMemo as FS}from"react";import{jsx as BS,jsxs as OS}from"react/jsx-runtime";var ES=({amount:e,currency:t,interval:a,intervalCount:o,mode:r,locale:n})=>{let s=FS(()=>{if(!a)return"";let l=$a(n??"en"),u=o&&o>1?o:null,g=`${u?`${Pn(u,n??"en")} `:""}${l.intervals.short[a]}`;return g?` / ${g}`:""},[a,o,n]);return OS("div",{className:"flex flex-row items-baseline gap-x-1",children:[xe(r,n)(e,t),s?BS("span",{className:"text-[max(12px,0.5em)]",children:s}):null]})},Te=ES;var Fm=new Map;function _S(e,t){let a=Object.keys(t).sort().reduce((o,r)=>(o[r]=t[r],o),{});return`${e}:${JSON.stringify(a)}`}function NS(e,t){let a=t??{dateStyle:"medium"},o=_S(e,a),r=Fm.get(o);return r||(r=new Intl.DateTimeFormat(e,a),Fm.set(o,r)),r}function kn(e,t="en",a){let o=typeof e=="string"?new Date(e):e;return NS(t,a).format(o)}import{jsx as Bm,jsxs as Om}from"react/jsx-runtime";var US={day:"checkout.trial.hero.free.day",month:"checkout.trial.hero.free.month",year:"checkout.trial.hero.free.year"},Em={day:"checkout.trial.hero.intervalSuffix.day",week:"checkout.trial.hero.intervalSuffix.week",month:"checkout.trial.hero.intervalSuffix.month",year:"checkout.trial.hero.intervalSuffix.year"},HS=({checkout:e,locale:t})=>{let{product:a,product_price:o}=e,r=t??Le,n=he(r),s=Et(o)?o.recurring_interval:a.recurring_interval,l=e.active_trial_interval==="week"?"day":e.active_trial_interval,u=e.active_trial_interval==="week"?e.active_trial_interval_count*7:e.active_trial_interval_count,f=n(US[l],{count:u}),g=e.currency??o.price_currency,i=e.total_amount??e.net_amount??0,c=a.recurring_interval_count,m=(()=>{if(!s||!(s in Em))return"";if(c&&c>1){let x=$a(r).intervals.short[s];return` / ${Pn(c,r)} ${x}`}return n(Em[s])})(),d=`${xe("standard",r)(i,g)}${m}`,p=e.trial_end?kn(e.trial_end,r,{year:"numeric",month:"long",day:"numeric"}):null;return Om("div",{className:"flex flex-col gap-y-1",children:[Bm("span",{children:f}),Om("span",{className:"text-sm font-normal text-gray-500 dark:text-gray-500",children:[n("checkout.trial.hero.then")," ",Bm("strong",{className:"font-semibold",children:d}),p?` ${n("checkout.trial.hero.startingDate",{date:p})}`:""]})]})},_m=HS;import{jsx as Nm}from"react/jsx-runtime";var qS=({checkout:e,locale:t})=>{let{product:a,product_price:o}=e;return e.active_trial_interval&&e.active_trial_interval_count?Nm(_m,{checkout:e,locale:t}):Nm(Te,{amount:e.total_amount??e.net_amount??0,currency:e.currency??o.price_currency,interval:Et(o)?o.recurring_interval:a.recurring_interval,intervalCount:a.recurring_interval_count,mode:"standard",locale:t})},VS=qS;var GS=e=>e.type==="fixed",WS=e=>e.type==="percentage",Tn=(e,t)=>{if(WS(e))return new Intl.NumberFormat(t,{style:"percent",maximumFractionDigits:2}).format(-e.basis_points/1e4);if(GS(e))return xe("compact",t)(-e.amount,e.currency);throw new Error("Unknown discount type")};import{useMemo as KS}from"react";var Um={scalar:{scale:1,label:"unit"},token:{scale:1e6,label:"1M tokens"}};function Hm(e,t){return e==="custom"?{scale:t?.customMultiplier??1,label:t?.customLabel??"unit"}:Um[e]??Um.scalar}import{Fragment as $S,jsx as qm,jsxs as El}from"react/jsx-runtime";var zS=({price:e,locale:t=Le,discount:a})=>{let{scale:o,label:r}=Hm(e.meter.unit??"scalar",{customLabel:e.meter.custom_label,customMultiplier:e.meter.custom_multiplier}),n=xe("subcent",t),s=Number.parseFloat(e.unit_amount)*o,l=a&&"basis_points"in a?s*(1-a.basis_points/1e4):null;return El("div",{className:"flex flex-row items-baseline gap-x-1",children:[l!==null?El($S,{children:[qm("span",{className:"text-gray-400 line-through dark:text-gray-500",children:n(s,e.price_currency)}),qm("span",{children:n(l,e.price_currency)})]}):n(s,e.price_currency),El("span",{className:Pe("dark:text-gray-400 text-[max(12px,0.5em)] text-gray-500",e.meter.unit==="custom"?"lowercase":""),children:["/ ",r]})]})},An=zS;import{jsx as Qo,jsxs as jS}from"react/jsx-runtime";var XS=({product:e,price:t,locale:a=Le,mode:o="compact"})=>{let r=he(a);if(t.amount_type==="fixed"&&t.price_amount!==0)return Qo(Te,{amount:t.price_amount,currency:t.price_currency,interval:Et(t)?t.recurring_interval:e.recurring_interval,intervalCount:e.recurring_interval_count,mode:o,locale:a});if(t.amount_type==="custom")return Qo("div",{className:"text-[min(1em,24px)]",children:r("checkout.pricing.payWhatYouWant")});if(t.amount_type==="fixed"&&t.price_amount===0)return Qo("div",{className:"text-[min(1em,24px)]",children:r("checkout.pricing.free")});if(t.amount_type==="seat_based"){let l=[...t.seat_tiers?.tiers??[]].sort((u,f)=>u.min_seats-f.min_seats)[0]?.price_per_seat??0;return Qo(Te,{amount:l,currency:t.price_currency,interval:e.recurring_interval,intervalCount:e.recurring_interval_count,mode:o,locale:a})}else if(t.amount_type==="metered_unit")return jS("div",{className:"flex flex-row gap-1 text-[min(1em,24px)]",children:[t.meter.name," \u2014 ",Qo(An,{price:t,locale:a})]})},Ga=XS;import{jsx as Dn,jsxs as Mn}from"react/jsx-runtime";var ZS=({className:e})=>Mn("svg",{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",className:e,children:[Dn("path",{d:"m12 14 4-4"}),Dn("path",{d:"M3.34 19a10 10 0 1 1 17.32 0"})]}),YS=({checkout:e,locale:t=Le})=>{let a=he(t),{product:o,prices:r,product_price:n,currency:s}=e,l=KS(()=>Rn(r[o.id],s).filter(u=>u.id!==n.id),[r,o,n,s]);return l.length===0?null:Mn("div",{className:"text-sm",children:[Mn("h2",{className:"mb-2 text-base font-medium",children:["+ ",a("checkout.pricing.additionalMeteredUsage")]}),l.map(u=>Mn("div",{className:"flex flex-row items-center gap-x-2 text-sm text-gray-600 dark:text-gray-100",children:[Dn(ZS,{className:"h-4 w-4"}),Dn(Ga,{product:o,price:u,locale:t})]},u.id))]})},Jo=YS;import{jsx as bt,jsxs as Fn}from"react/jsx-runtime";var QS=({checkout:e,layout:t="default",locale:a})=>{let{product:o,product_price:r,discount:n}=e;return!n||r.amount_type!=="fixed"?bt(Te,{amount:e.total_amount,currency:e.currency??r.price_currency,interval:Et(r)?r.recurring_interval:o.recurring_interval,intervalCount:o.recurring_interval_count,mode:"compact",locale:a}):Fn("div",{className:t==="stacked"?"flex flex-row justify-between md:flex-col md:items-start md:gap-y-2":"flex flex-row justify-between",children:[bt(Te,{amount:e.total_amount,currency:e.currency,interval:Et(r)?r.recurring_interval:o.recurring_interval,intervalCount:o.recurring_interval_count,mode:"compact",locale:a}),Fn("div",{className:"flex flex-row items-center gap-x-2 text-lg",children:[bt("div",{className:"text-gray-400 line-through",children:bt(Ga,{product:o,price:r,locale:a})}),Fn("div",{className:"relative rounded-xs bg-linear-to-br from-gray-400 to-gray-500 px-3 py-0.5 text-center text-sm text-white shadow-md dark:from-gray-600 dark:to-gray-700",children:[bt("span",{children:Tn(n,a)}),bt("div",{className:"absolute top-1/2 left-0 -ml-1 flex h-2 w-2 -translate-y-1/2 transform rounded-full bg-gray-50 dark:bg-gray-800"}),bt("div",{className:"absolute top-1/2 right-0 -mr-1 flex h-2 w-2 -translate-y-1/2 transform rounded-full bg-gray-50 dark:bg-gray-800"})]})]})]})},JS=({checkout:e,layout:t="default",locale:a})=>{let{product_price:o}=e;return bt("div",{className:"flex flex-col gap-6",children:Fn("div",{className:"flex flex-col gap-2",children:[bt("h1",{className:"text-3xl font-light","data-testid":"headline-price",children:o.amount_type!=="custom"?bt(QS,{checkout:e,layout:t,locale:a}):xe("compact",a)(e.total_amount,e.currency??o.price_currency)}),bt(Jo,{checkout:e,locale:a})]})})},ev=JS;import{addDays as uv,addMonths as tr,addWeeks as dv,addYears as cv}from"date-fns";import{useMemo as po}from"react";function Vm(e){let t=za(e);if(!t)return null;let a=e.seats;if(!a)return null;let o=[...t.seat_tiers.tiers].sort((n,s)=>n.min_seats-s.min_seats);if(t.seat_tiers.seat_tier_type==="graduated"){let n=[],s=0;for(let l of o){if(s>=a)break;let u=l.max_seats??a,f=Math.min(a,u)-s;f>0&&n.push({seats:f,pricePerSeat:l.price_per_seat,min:l.min_seats,max:l.max_seats??null}),s+=f}return n}let r=o.find(n=>a>=n.min_seats&&(n.max_seats==null||a<=n.max_seats));return[{seats:a,pricePerSeat:r?.price_per_seat??0,min:r?.min_seats??1,max:r?.max_seats??null}]}import{useEffect as tv,useId as av,useRef as ov,useState as rv}from"react";import{Fragment as sv,jsx as er,jsxs as Gm}from"react/jsx-runtime";var nv=({children:e,lines:t=1,tooltip:a,className:o})=>{let r=ov(null),[n,s]=rv(!1),l=av();tv(()=>{let g=r.current;if(!g||typeof ResizeObserver>"u")return;let i=h=>t===1?h.scrollWidth>h.clientWidth:h.scrollHeight>h.clientHeight,c=()=>{let h=i(g);if(!h){for(let d of Array.from(g.children))if(i(d)){h=!0;break}}s(h)};c();let m=new ResizeObserver(c);return m.observe(g),()=>m.disconnect()},[t,e]);let u=`tr${l.replace(/:/g,"")}`,f=t===1?`.${u},.${u}>*{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}`:`.${u},.${u}>*{display:-webkit-box;-webkit-line-clamp:${t};-webkit-box-orient:vertical;overflow:hidden;min-width:0}`;return Gm(sv,{children:[er("style",{dangerouslySetInnerHTML:{__html:f}}),er(Go,{delayDuration:200,children:Gm(Wo,{children:[er(zo,{asChild:!0,children:er("span",{ref:r,className:o?`${u} ${o}`:u,tabIndex:n?0:void 0,children:e})}),n&&er(co,{className:"max-w-xs",children:a??e})]})})]})},Wm=nv;import{jsx as Bl,jsxs as zm}from"react/jsx-runtime";var lv=({title:e,subtitle:t,emphasis:a,className:o,children:r})=>zm("div",{"data-testid":`detail-row-${e}`,className:Pe("flex flex-row items-start justify-between gap-x-8",a?"font-medium":"dark:text-gray-500 text-gray-500",o),children:[zm("div",{className:"flex min-w-0 flex-row items-baseline gap-x-1",children:[Bl(Wm,{children:e}),t&&Bl("span",{className:"shrink-0 text-gray-400 dark:text-gray-500",children:t})]}),Bl("span",{className:"shrink-0",children:r})]}),ft=lv;import{jsx as Ol}from"react/jsx-runtime";var iv=({row:e,currency:t,interval:a,intervalCount:o,locale:r})=>{let n=he(r);return e.min===1&&e.pricePerSeat===0&&e.max!==null?Ol(ft,{title:n("checkout.pricing.seats.included",{count:e.max}),className:"text-gray-600"}):Ol(ft,{title:n("checkout.pricing.seats.count",{count:e.seats}),subtitle:"\xB7 "+xe("standard",r)(e.pricePerSeat,t)+" "+n("checkout.pricing.perSeat"),className:"text-gray-600",children:Ol(Te,{amount:e.seats*e.pricePerSeat,currency:t,interval:a,intervalCount:o,mode:"standard",locale:r})})},$m=iv;import{Fragment as Xm,jsx as je,jsxs as jm}from"react/jsx-runtime";function fv(e,t){let a=e.getFullYear()===new Date().getFullYear();return kn(e,t,{month:"short",day:"numeric",...a?{}:{year:"numeric"}})}function Km(e,t,a){let o=a??1;switch(t){case"day":return uv(e,o);case"week":return dv(e,o);case"month":return tr(e,o);case"year":return cv(e,o);default:return tr(e,o)}}function pv(e,t,a,o){return t.duration==="once"?a?Km(e,a,o):tr(e,o??1):"duration_in_months"in t&&typeof t.duration_in_months=="number"?tr(e,t.duration_in_months):e}var mv=({checkout:e,locale:t=Le})=>{let a=he(t),o=ho(e)?Wa(e.product_price)?e.product_price.recurring_interval:e.product.recurring_interval:null,r=ho(e)?e.product.recurring_interval_count:null,{product:n,prices:s,currency:l}=e,u=po(()=>n&&s?Rn(s[n.id],l):[],[n,s,l]),f=po(()=>{if(!e.discount||e.discount.duration==="forever"||!o)return"";let d=e.trial_end?new Date(e.trial_end):new Date;if("duration_in_months"in e.discount&&typeof e.discount.duration_in_months=="number"){let x=tr(d,e.discount.duration_in_months),y=Km(d,o,r);if(x<=y)return""}let p=pv(d,e.discount,o,r);return a("checkout.pricing.discount.until",{date:fv(p,t)})},[e.discount,e.trial_end,o,r,a,t]),g=po(()=>{if(!o)return a("checkout.pricing.total");let d=r??1;switch(o){case"day":return a("checkout.pricing.everyInterval.day",{count:d});case"week":return a("checkout.pricing.everyInterval.week",{count:d});case"month":return a("checkout.pricing.everyInterval.month",{count:d});case"year":return a("checkout.pricing.everyInterval.year",{count:d});default:bn(o)}},[o,r,a]),i=po(()=>Vm(e),[e]),c=po(()=>Wl(e),[e]),m=po(()=>za(e),[e]),h=!!(c&&m);return e.is_free_product_price?null:je("div",{className:"flex flex-col gap-y-2",children:e.currency?jm(Xm,{children:[h&&c&&je(ft,{title:a("checkout.pricing.basePrice"),className:"text-gray-600",children:je(Te,{amount:c.price_amount,currency:e.currency,interval:o,intervalCount:r,mode:"standard",locale:t})}),i?.map((d,p)=>je($m,{row:d,currency:e.currency,interval:o,intervalCount:r,locale:t},p)),je(ft,{title:a("checkout.pricing.subtotal"),className:"text-gray-600",children:je(Te,{amount:e.tax_behavior==="inclusive"&&e.tax_amount!==null?e.total_amount-e.tax_amount:e.amount,currency:e.currency,interval:o,intervalCount:r,mode:"standard",locale:t})}),e.discount&&jm(Xm,{children:[je(ft,{title:e.discount.name,subtitle:[e.discount.type==="percentage"?`(${Tn(e.discount,t)})`:null,f].filter(Boolean).join(" ")||void 0,className:"text-gray-600",children:xe("standard",t)(-e.discount_amount,e.currency)}),je(ft,{title:a("checkout.pricing.taxableAmount"),className:"text-gray-600",children:xe("standard",t)(e.net_amount,e.currency)})]}),je(ft,{title:e.tax_behavior==="inclusive"?a("checkout.pricing.inclTax"):a("checkout.pricing.taxes"),className:"text-gray-600",children:e.tax_amount!==null?xe("standard",t)(e.tax_amount,e.currency):"\u2014"}),je(ft,{title:g,emphasis:!0,children:je(Te,{amount:e.total_amount,currency:e.currency,interval:o,intervalCount:r,mode:"standard",locale:t})}),u.length>0&&je(ft,{title:a("checkout.pricing.additionalMeteredUsage"),className:"mt-2 border-t border-gray-200 pt-4 dark:border-gray-700"}),u.map(d=>je(ft,{title:d.meter.name,emphasis:!0,children:je(An,{price:d,locale:t,discount:e.discount})},d.id))]}):je("span",{children:a("checkout.pricing.free")})})},gv=mv;import*as jt from"react";import*as St from"react";import{jsx as ar,jsxs as xv}from"react/jsx-runtime";import{jsx as mo}from"react/jsx-runtime";var _l="Radio",[hv,Zm]=ve(_l),[yv,Cv]=hv(_l),Ym=St.forwardRef((e,t)=>{let{__scopeRadio:a,name:o,checked:r=!1,required:n,disabled:s,value:l="on",onCheck:u,form:f,...g}=e,[i,c]=St.useState(null),m=J(t,p=>c(p)),h=St.useRef(!1),d=i?f||!!i.closest("form"):!0;return xv(yv,{scope:a,checked:r,disabled:s,children:[ar(W.button,{type:"button",role:"radio","aria-checked":r,"data-state":tg(r),"data-disabled":s?"":void 0,disabled:s,value:l,...g,ref:m,onClick:$(e.onClick,p=>{r||u?.(),d&&(h.current=p.isPropagationStopped(),h.current||p.stopPropagation())})}),d&&ar(eg,{control:i,bubbles:!h.current,name:o,value:l,checked:r,required:n,disabled:s,form:f,style:{transform:"translateX(-100%)"}})]})});Ym.displayName=_l;var Qm="RadioIndicator",Jm=St.forwardRef((e,t)=>{let{__scopeRadio:a,forceMount:o,...r}=e,n=Cv(Qm,a);return ar(Rt,{present:o||n.checked,children:ar(W.span,{"data-state":tg(n.checked),"data-disabled":n.disabled?"":void 0,...r,ref:t})})});Jm.displayName=Qm;var Lv="RadioBubbleInput",eg=St.forwardRef(({__scopeRadio:e,control:t,checked:a,bubbles:o=!0,...r},n)=>{let s=St.useRef(null),l=J(s,n),u=Jt(a),f=ea(t);return St.useEffect(()=>{let g=s.current;if(!g)return;let i=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(i,"checked").set;if(u!==a&&m){let h=new Event("click",{bubbles:o});m.call(g,a),g.dispatchEvent(h)}},[u,a,o]),ar(W.input,{type:"radio","aria-hidden":!0,defaultChecked:a,...r,tabIndex:-1,ref:l,style:{...r.style,...f,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});eg.displayName=Lv;function tg(e){return e?"checked":"unchecked"}var bv=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],En="RadioGroup",[Sv,VB]=ve(En,[io,Zm]),ag=io(),og=Zm(),[vv,Iv]=Sv(En),rg=jt.forwardRef((e,t)=>{let{__scopeRadioGroup:a,name:o,defaultValue:r,value:n,required:s=!1,disabled:l=!1,orientation:u,dir:f,loop:g=!0,onValueChange:i,...c}=e,m=ag(a),h=na(f),[d,p]=Ve({prop:n,defaultProp:r??null,onChange:i,caller:En});return mo(vv,{scope:a,name:o,required:s,disabled:l,value:d,onValueChange:p,children:mo(ln,{asChild:!0,...m,orientation:u,dir:h,loop:g,children:mo(W.div,{role:"radiogroup","aria-required":s,"aria-orientation":u,"data-disabled":l?"":void 0,dir:h,...c,ref:t})})})});rg.displayName=En;var ng="RadioGroupItem",sg=jt.forwardRef((e,t)=>{let{__scopeRadioGroup:a,disabled:o,...r}=e,n=Iv(ng,a),s=n.disabled||o,l=ag(a),u=og(a),f=jt.useRef(null),g=J(t,f),i=n.value===r.value,c=jt.useRef(!1);return jt.useEffect(()=>{let m=d=>{bv.includes(d.key)&&(c.current=!0)},h=()=>c.current=!1;return document.addEventListener("keydown",m),document.addEventListener("keyup",h),()=>{document.removeEventListener("keydown",m),document.removeEventListener("keyup",h)}},[]),mo(un,{asChild:!0,...l,focusable:!s,active:i,children:mo(Ym,{disabled:s,required:n.required,checked:i,...u,...r,name:n.name,ref:g,onCheck:()=>n.onValueChange(r.value),onKeyDown:$(m=>{m.key==="Enter"&&m.preventDefault()}),onFocus:$(r.onFocus,()=>{c.current&&f.current?.click()})})})});sg.displayName=ng;var wv="RadioGroupIndicator",lg=jt.forwardRef((e,t)=>{let{__scopeRadioGroup:a,...o}=e,r=og(a);return mo(Jm,{...r,...o,ref:t})});lg.displayName=wv;var Nl=rg,Ul=sg,ig=lg;import{jsx as Bn}from"react/jsx-runtime";var Hl=({ref:e,className:t,...a})=>Bn(Nl,{className:Pe("grid gap-2",t),...a,ref:e});Hl.displayName=Nl.displayName;var ql=({ref:e,className:t,...a})=>Bn(Ul,{ref:e,className:Pe("border-primary text-primary ring-offset-background focus-visible:ring-ring aspect-square h-4 w-4 rounded-full border focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),...a,children:Bn(ig,{className:"flex items-center justify-center",children:Bn(Co,{className:"h-2.5 w-2.5 fill-current text-current"})})});ql.displayName=Ul.displayName;import{useCallback as Pv,useMemo as kv}from"react";var ug=e=>e.charAt(0).toUpperCase()+e.slice(1),dg=e=>e.charAt(0).toLowerCase()+e.slice(1);import{jsx as Ke,jsxs as On}from"react/jsx-runtime";var cg=({isSelected:e,product:t,price:a,checkout:o,locale:r})=>{let n=(o.prices[t.id]??[]).filter(u=>u.price_currency===o.currency),s=n.find(u=>u.amount_type==="fixed"),l=n.find(u=>u.amount_type==="seat_based");if(s&&l)return Ke(Tv,{fixedPrice:s,seatPrice:l,product:t,locale:r});if(a.amount_type==="seat_based"){if(e)return Ke(Te,{amount:o.net_amount||0,currency:a.price_currency,interval:t.recurring_interval,intervalCount:t.recurring_interval_count,mode:"standard",locale:r});let u=(a.seat_tiers?.tiers?.[0]?.price_per_seat??0)*(a.seat_tiers?.minimum_seats??1);return Ke(Av,{amount:u,currency:a.price_currency,interval:t.recurring_interval,intervalCount:t.recurring_interval_count,locale:r})}return Ke(Ga,{product:t,price:a,locale:r,mode:"standard"})},Tv=({fixedPrice:e,seatPrice:t,product:a,locale:o})=>{let r=he(o??Le),s=[...t.seat_tiers?.tiers??[]].sort((l,u)=>l.min_seats-u.min_seats)[0]?.price_per_seat??0;return On("span",{className:"flex flex-wrap items-baseline justify-end gap-x-1",children:[Ke(Te,{amount:e.price_amount,currency:e.price_currency,interval:a.recurring_interval,intervalCount:a.recurring_interval_count,mode:"standard",locale:o}),Ke("span",{children:"+"}),Ke(Te,{amount:s,currency:t.price_currency,mode:"standard",locale:o}),Ke("span",{children:r("checkout.pricing.perSeat")})]})},Av=({amount:e,currency:t,interval:a,intervalCount:o,locale:r})=>{let n=he(r??Le);return On("span",{className:"flex items-baseline",children:[n("checkout.productSwitcher.fromPrefix"),"\xA0",Ke(Te,{amount:e,currency:t,interval:a,intervalCount:o,mode:"standard",locale:r})]})},Mv=({checkout:e,update:t,locale:a=Le})=>{let o=he(a),{product:r,product_price:n,products:s,prices:l,currency:u}=e,f=kv(()=>{let m={};for(let[h,d]of Object.entries(l)){let p=d.filter(x=>x.price_currency===u);m[h]=p.length>0?p:d}return m},[l,u]),g=Pv(m=>{let[h,d]=m.split(":"),p=s.find(x=>x.id===h);p&&(wn(f[p.id])?t?.({product_id:p.id,product_price_id:d}):t?.({product_id:p.id}))},[t,s,f]);if(s.length===1&&!wn(f[s[0].id]))return null;let i=(m,h)=>{let d=Wa(h)?h.recurring_interval:m.recurring_interval,p=m.recurring_interval_count??1;if(d){let x=dg(o(`checkout.pricing.everyInterval.${d}`,{count:p}));return ug(o("checkout.productSwitcher.billedRecurring",{frequency:x}))}return o("checkout.productSwitcher.oneTimePurchase")},c=[];for(let m of s)if(wn(f[m.id]))for(let h of f[m.id])c.push({key:h.id,value:`${m.id}:${h.id}`,productName:m.name,product:m,price:h,isSelected:h.id===n.id});else c.push({key:m.id,value:`${m.id}:${f[m.id][0].id}`,productName:m.name,product:m,price:f[m.id][0],isSelected:m.id===r.id});return Ke(Hl,{value:`${r.id}:${n.id}`,onValueChange:g,className:"gap-0 divide-y divide-gray-200 overflow-hidden rounded-xl border border-gray-200 dark:divide-gray-700 dark:border-gray-700",children:c.map(m=>On("label",{className:Pe("flex cursor-pointer items-center gap-x-3 px-4 py-3 transition-colors",m.isSelected?"bg-blue-50/50 dark:bg-blue-950/20":"dark:hover:bg-gray-800 hover:bg-gray-50"),htmlFor:`product-${m.key}`,children:[Ke(ql,{value:m.value,id:`product-${m.key}`}),On("div",{className:"min-w-0 flex-1",children:[Ke("span",{className:"line-clamp-2 text-sm",children:m.productName}),Ke("span",{className:"block text-xs text-gray-500 dark:text-gray-500",children:i(m.product,m.price)})]}),Ke("span",{className:"shrink-0 text-sm text-gray-500 dark:text-gray-400",children:Ke(cg,{isSelected:m.isSelected,product:m.product,price:m.price,checkout:e,locale:a})})]},m.key))})},Dv=Mv;import{useCallback as go,useMemo as fg,useState as pg}from"react";import{jsx as mg}from"react/jsx-runtime";var Fv=e=>{let{id:t,name:a,value:o,placeholder:r,currency:n,preSlot:s,postSlot:l,onChange:u,onBlur:f,onFocus:g,disabled:i,step:c=.1}=e,m=fg(()=>ga(n),[n]),h=!Va(n),d=go(k=>{if(k!=null)return h?k.toString():(k/m).toFixed(2)},[m,h]),p=go(k=>{let T=Number.parseFloat(k);return isNaN(T)&&(T=0),Math.round(h?T:T*m)},[m,h]),[x,y]=pg(o),[C,v]=pg(d(o));o!==x&&(y(o),v(d(o)));let S=go(k=>{if(u)if(!k||k.trim()==="")y(null),u(null);else{let T=p(k);y(T),u(T)}v(k)},[u,p]),w=go(k=>{let T=k.target.value;if(T===""){S("");return}if(h){let E=T.replace(/[^0-9]/g,"");S(E);return}let q=T.replace(/[^0-9,.]/g,""),z=q.replace(/[,.](?!$)/g,"").replace(/,$/,"."),j=q.match(/([.,])([0-9]+)$/);if(j){let E=j[2],G=q.slice(0,-j[0].length).replace(/[,.]/g,""),N=E.slice(0,2),P=Number.parseFloat(`${G}.${N}`);if(!Number.isNaN(P)){let R=Math.min(2,E.length),_=P.toFixed(R);z=G.length>0?_:_.replace(/^0(?=\.)/,"")}}S(z)},[S,h]),b=go(k=>{if(C){let T=C;h||(T.startsWith(".")&&(T=`0${T}`),T.endsWith(".")&&(T=T.replace(/\.$/,""))),T!==C&&S(T)}f&&f(k)},[f,C,S,h]),I=go(k=>{if(h){!/[0-9]/.test(k.key)&&!["Backspace","Delete","ArrowLeft","ArrowRight","Tab"].includes(k.key)&&!k.ctrlKey&&!k.metaKey&&k.preventDefault();return}if(!/[0-9.,]/.test(k.key)&&!["Backspace","Delete","ArrowLeft","ArrowRight","Tab"].includes(k.key)&&!k.ctrlKey&&!k.metaKey&&k.preventDefault(),k.key==="ArrowUp"){k.preventDefault();let T=Number.parseFloat(k.currentTarget.value),q=(Number.isNaN(T)?c:T+c).toFixed(2);S(q)}if(k.key==="ArrowDown"){let T=Number.parseFloat(k.currentTarget.value),q=Math.max(0,Number.isNaN(T)?-c:T-c).toFixed(2);S(q)}(k.key==="."||k.key===",")&&k.currentTarget.value.includes(".")&&k.preventDefault()},[c,S,h]),D=mg("span",{className:"dark:text-polar-500 text-sm font-medium text-gray-500",children:n.toUpperCase()}),F=fg(()=>{if(r)return h?r.toLocaleString("en-US"):(r/m).toLocaleString("en-US")},[r,m,h]);return mg(ye,{type:"text",inputMode:h?"numeric":"decimal",id:t,name:a,className:de("dark:placeholder:text-polar-500 block w-full px-4 pl-14 text-base font-normal placeholder:text-gray-400",e.className??""),value:C,onChange:w,onKeyDown:I,placeholder:F,preSlot:s||D,postSlot:l,onBlur:b,onFocus:g,disabled:i})},gg=Fv;import{useCallback as Ev,useEffect as Vl,useRef as Bv}from"react";import{Fragment as _v,jsx as rr,jsxs as or}from"react/jsx-runtime";var Ov=({update:e,checkout:t,productPrice:a,locale:o=Le})=>{let r=he(o),{amount:n}=t,s=Yl({defaultValues:{amount:n||0}}),{control:l,trigger:u,reset:f}=s,g=a.minimum_amount??50,i=Ev(p=>g===0&&p>0&&p<50?r("checkout.pwywForm.amountFreeOrMinimum",{min:xe("compact",o)(50,t.currency),zero:xe("compact",o)(0,t.currency)}):p<g?r("checkout.pwywForm.amountMinimum",{min:xe("compact",o)(g,t.currency)}):!0,[g,t.currency,o,r]),c=Bv(n);Vl(()=>{c.current=n},[n]);let m=Zp(async p=>{if(p===c.current)return;await u("amount")&&e?.({amount:p})},600,[e,u]),h=Xl({control:l,name:"amount"});Vl(()=>{h!==void 0&&m(h)},[h,m]),Vl(()=>{f({amount:n||0})},[n,f]);let d=g===0?null:r("checkout.pwywForm.minimum",{amount:xe("compact",o)(g,t.currency)});return rr(Xo,{...s,children:or("form",{className:"flex w-full flex-col gap-3",children:[or(Lt,{children:[r("checkout.pwywForm.label"),d&&or(_v,{children:[" ",or("span",{className:"text-gray-400",children:["(",d,")"]})]})]}),rr("div",{className:"flex flex-row items-center gap-2",children:rr(Ue,{control:l,shouldUnregister:!0,name:"amount",rules:{validate:i},render:({field:p})=>or(tt,{className:"w-full",children:[rr(gg,{className:"bg-white shadow-xs",name:p.name,currency:t.currency,value:p.value||void 0,onChange:p.onChange,placeholder:0,disabled:p.disabled}),rr(ke,{})]})})})]})})};import{useCallback as Nv,useEffect as Uv,useRef as Hv,useState as _n}from"react";import{jsx as ie,jsxs as xo}from"react/jsx-runtime";var qv=({checkout:e,update:t,locale:a=Le,compact:o=!1})=>{let r=he(a),[n,s]=_n(!1),[l,u]=_n(!1),[f,g]=_n(""),[i,c]=_n(null),m=Hv(!1),h=Nv(_=>_&&_.error==="RequestValidationError"?_.detail[0]?.msg:r("checkout.pricing.seats.updateFailed"),[r]),d=za(e),p=d!==null,C=[...(d?.seat_tiers??null)?.tiers??[]].sort((_,U)=>_.min_seats-U.min_seats),v=C[0]?.min_seats??1,S=C[C.length-1]?.max_seats??null,w=e.min_seats??v,b=e.max_seats??S,I=b!==null,D=I&&w===b,F=Math.max(e.seats||w,w),k=e.seats!==null&&e.seats!==void 0&&e.seats<w,T=e.net_amount||0,q=e.currency??"usd";if(Uv(()=>{p&&k&&!D&&!n&&!m.current&&(m.current=!0,t({seats:w}).catch(_=>{c(h(_))}))},[p,k,D,w,n,t,h]),!p)return null;let z=async _=>{_<w||n||I&&_>b||(s(!0),c(null),await t({seats:_}).catch(U=>{c(h(U))}).finally(()=>{s(!1)}))},j=_=>{let U=_.target.value;(U===""||/^\d+$/.test(U))&&g(U)},E=()=>{let _=parseInt(f,10);!isNaN(_)&&_>=w&&(!I||_<=b)&&_!==F&&z(_),u(!1),g("")},G=_=>{_.key==="Enter"?_.currentTarget.blur():_.key==="Escape"&&(u(!1),g(""))},N=()=>{u(!0),g(F.toString())},R=w>1&&I?r("checkout.pricing.seats.range",{min:w,max:b}):w>1?r("checkout.pricing.seats.minimum",{min:w}):I?r("checkout.pricing.seats.maximum",{max:b}):null;return o?xo("div",{className:"flex flex-col gap-3",children:[xo("div",{className:"flex flex-row items-center justify-between",children:[ie("div",{className:"flex flex-col gap-0.5",children:ie("span",{className:"text-sm font-medium dark:text-white",children:r("checkout.pricing.seats.label")})}),D?ie("span",{className:"text-sm font-medium dark:text-white",children:F}):xo("div",{className:"flex items-center gap-0 rounded-lg border border-gray-200 dark:border-gray-700",children:[ie("button",{type:"button",onClick:()=>z(F-1),disabled:F<=w||n||l,className:"flex h-7 w-7 cursor-pointer items-center justify-center rounded-l-lg leading-none text-gray-500 transition-colors hover:bg-gray-100 disabled:cursor-not-allowed disabled:opacity-40 dark:text-gray-400 dark:hover:bg-gray-800","aria-label":"Decrease seats",children:ie("svg",{className:"h-3 w-3",viewBox:"0 0 14 14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:ie("path",{d:"M3 7h8"})})}),l?ie(ye,{type:"text",inputMode:"numeric",value:f,onChange:j,onBlur:E,onKeyDown:G,autoFocus:!0,min:w,max:I?b:void 0,className:"h-7 w-10 cursor-text rounded-none border-x border-y-0 px-1 text-center text-sm font-medium tabular-nums"}):ie("button",{type:"button",onClick:N,disabled:n,className:"h-7 w-10 cursor-pointer border-x border-gray-200 text-center text-sm font-medium tabular-nums transition-colors hover:bg-gray-50 disabled:cursor-not-allowed disabled:opacity-50 dark:border-gray-700 dark:hover:bg-gray-800","aria-label":"Click to edit seat count",title:"Click to edit",children:F}),ie("button",{type:"button",onClick:()=>z(F+1),disabled:I&&F>=b||n||l,className:"flex h-7 w-7 cursor-pointer items-center justify-center rounded-r-lg leading-none text-gray-500 transition-colors hover:bg-gray-100 disabled:cursor-not-allowed disabled:opacity-40 dark:text-gray-400 dark:hover:bg-gray-800","aria-label":"Increase seats",children:ie("svg",{className:"h-3 w-3",viewBox:"0 0 14 14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:ie("path",{d:"M7 3v8M3 7h8"})})})]})]}),!D&&R&&ie("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:R}),i&&ie("p",{className:"text-destructive-foreground text-sm",children:i})]}):xo("div",{className:"flex flex-col gap-6",children:[ie("div",{className:"flex flex-col gap-2",children:ie("h1",{className:"text-3xl font-light text-gray-900 dark:text-white","data-testid":"headline-price",children:xe("compact",a)(T,q)})}),xo("div",{className:"flex flex-col gap-2",children:[ie("label",{className:"text-lg",children:r("checkout.pricing.seats.numberOfSeats")}),D?ie("span",{className:"min-w-[3.5rem] text-2xl font-light text-gray-900 dark:text-white",children:F}):xo("div",{className:"flex items-center gap-3",children:[ie(nt,{variant:"ghost",size:"icon",onClick:()=>z(F-1),disabled:F<=w||n||l,className:"h-10 w-10 rounded-full disabled:opacity-40","aria-label":"Decrease seats",children:ie("svg",{className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,children:ie("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 12h14"})})}),l?ie(ye,{type:"text",inputMode:"numeric",value:f,onChange:j,onBlur:E,onKeyDown:G,autoFocus:!0,min:w,max:I?b:void 0,className:"h-auto max-w-[4.5rem] min-w-[3.5rem] py-1.5 text-center text-2xl font-light tabular-nums"}):ie("button",{type:"button",onClick:N,disabled:n,className:"group relative min-w-[3.5rem] rounded-xl px-3 py-1.5 text-center text-2xl font-light text-gray-900 tabular-nums transition-all hover:bg-gray-100 disabled:cursor-not-allowed disabled:opacity-50 dark:text-white dark:hover:bg-gray-800","aria-label":"Click to edit seat count",title:"Click to edit",children:ie("span",{children:F})}),ie(nt,{variant:"ghost",size:"icon",onClick:()=>z(F+1),disabled:I&&F>=b||n||l,className:"h-10 w-10 rounded-full disabled:opacity-40","aria-label":"Increase seats",children:ie("svg",{className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,children:ie("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 5v14m-7-7h14"})})})]}),!D&&R&&ie("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:R}),i&&ie("p",{className:"text-destructive-foreground text-sm",children:i})]}),ie(Jo,{checkout:e,locale:a})]})},Vv=qv;export{IS as CheckoutForm,VS as CheckoutHeroPrice,Ov as CheckoutPWYWForm,ev as CheckoutPricing,gv as CheckoutPricingBreakdown,Dv as CheckoutProductSwitcher,cg as CheckoutProductSwitcherItemPrice,Vv as CheckoutSeatSelector,Jo as MeteredPricesDisplay,Ga as ProductPriceLabel};
|
|
68
|
+
`;case"21":return Z("p",{key:U.key},_(R.children,U));default:return null}})(E,G,N,p,x,y,C)};return d?d(P,E,G,N):P()})(w,S,b);return b.renderDepth=I-1,j}catch(E){if(E instanceof RangeError&&E.message.includes("Maximum call stack"))return v(w);throw E}}})(t.renderRule,u,r,o,i);return f(e)}var Tl=function(e){var t=e.children,a=e.options,o=(function(r,n){if(r==null)return{};var s={};for(var l in r)if({}.hasOwnProperty.call(r,l)){if(n.indexOf(l)!==-1)continue;s[l]=r[l]}return s})(e,ob);return sS(t??"",Ft({},a,{wrapperProps:Ft({},a?.wrapperProps,o)}))};function bn(e){throw new Error(`Unreachable: ${e}`)}import{Fragment as Al,jsx as ae,jsxs as Sn}from"react/jsx-runtime";var Im={disableParsingRawHTML:!0,forceBlock:!1,overrides:{h1:e=>ae("span",{...e}),h2:e=>ae("span",{...e}),h3:e=>ae("span",{...e}),h4:e=>ae("span",{...e}),h5:e=>ae("span",{...e}),h6:e=>ae("span",{...e}),p:e=>ae("span",{...e}),embed:()=>ae(Al,{}),iframe:()=>ae(Al,{}),img:()=>ae(Al,{}),a:e=>ae("a",{...e,rel:"noopener noreferrer nofollow",target:"_blank",className:"text-blue-400 hover:underline"})}},wm=({customField:e})=>ae(Lt,{children:e.properties.form_label?ae(Tl,{options:Im,children:e.properties.form_label}):e.name}),Rm=({customField:e})=>e.properties.form_help_text?ae(hn,{children:ae(Tl,{options:Im,children:e.properties.form_help_text})}):null,lS=({customField:e,required:t,field:a})=>e.properties.textarea?ae(mn,{...a,placeholder:e.properties.form_placeholder,required:t,minLength:e.properties.min_length,maxLength:e.properties.max_length}):ae(ye,{...a,className:"bg-white shadow-xs",type:"text",placeholder:e.properties.form_placeholder,required:t,minLength:e.properties.min_length,maxLength:e.properties.max_length}),iS=({customField:e,required:t,field:a})=>ae(ye,{...a,type:"number",className:"bg-white shadow-xs",placeholder:e.properties.form_placeholder,required:t,min:e.properties.ge,max:e.properties.le}),uS=({customField:e,required:t,field:a})=>{let{ge:o,le:r}=e.properties,n=o?new Date(o*1e3).toISOString().slice(0,10):void 0,s=r?new Date(r*1e3).toISOString().slice(0,10):void 0;return ae(ye,{...a,type:"date",className:"bg-white shadow-xs",placeholder:e.properties.form_placeholder,required:t,min:n,max:s})},Pm=({customField:e,required:t,field:a})=>Sn(tt,{children:[Sn("div",{className:"flex flex-row items-center space-y-0 space-x-3",children:[ae(Fe,{children:ae(wa,{defaultChecked:a.value,onCheckedChange:a.onChange,required:t})}),ae(wm,{customField:e})]}),ae(ke,{}),ae(Rm,{customField:e})]}),dS=({customField:e,required:t,field:a})=>Sn(ua,{onValueChange:a.onChange,defaultValue:a.value,required:t,children:[ae(Vt,{children:ae(qt,{placeholder:e.properties.form_placeholder})}),ae(Gt,{children:e.properties.options.map(({label:o,value:r})=>ae(Wt,{value:r,textValue:o,children:o},r))})]}),cS=(e,t,a)=>{switch(e.type){case"text":return ae(lS,{customField:e,required:t,field:a});case"number":return ae(iS,{customField:e,required:t,field:a});case"date":return ae(uS,{customField:e,required:t,field:a});case"select":return ae(dS,{customField:e,required:t,field:a});case"checkbox":return ae(Pm,{customField:e,required:t,field:a});default:bn(e)}},fS=({customField:e,required:t,field:a})=>e.type==="checkbox"?ae(Pm,{customField:e,required:t,field:a}):Sn(tt,{children:[ae(wm,{customField:e}),ae(Fe,{children:cS(e,t,a)}),ae(ke,{}),ae(Rm,{customField:e})]}),km=fS;import{jsx as vn,jsxs as Tm}from"react/jsx-runtime";var pS=({className:e,width:t,height:a})=>Tm("svg",{viewBox:"0 0 360 120",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,width:t,height:a,"aria-label":"Ruba",children:[Tm("g",{className:"fill-[#08080c] dark:fill-white",transform:"translate(2.5 0)",children:[vn("path",{d:"M19 25h59L65.43 47H19a4 4 0 0 1-4-4V29a4 4 0 0 1 4-4Z"}),vn("path",{d:"M19 73h31.57L38 95H19a4 4 0 0 1-4-4V77a4 4 0 0 1 4-4Z"}),vn("path",{d:"M85 25h25L70 95H45Z",fill:"#007AFF"})]}),vn("text",{x:"145",y:"83",className:"fill-[#08080c] dark:fill-white",fontFamily:"Inter, -apple-system, BlinkMacSystemFont, sans-serif",fontSize:"76",fontWeight:"600",letterSpacing:"-1.52",children:"Ruba"})]}),Am=pS;import{Fragment as Yo,jsx as M,jsxs as pe}from"react/jsx-runtime";var CS=["apple_pay","google_pay","link"],LS=({className:e})=>pe("svg",{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",className:e,children:[M("path",{d:"M18 6 6 18"}),M("path",{d:"m6 6 12 12"})]}),Mm=({form:e,checkout:t,confirm:a,update:o,loading:r,loadingLabel:n,disabled:s,isUpdatePending:l,children:u,locale:f,isWalletPayment:g,beforeSubmit:i})=>{let c=ho(t)?Wa(t.product_price)?t.product_price.recurring_interval:t.product.recurring_interval:null,{control:m,handleSubmit:h,watch:d,clearErrors:p,resetField:x,formState:{errors:y}}=e,C=t.discount,v=C&&C.code===null,{is_business_customer:S}=t,w=f||"en",b=he(w),I=d("customer_billing_address.country"),D=In(async(P,{name:R})=>{if(!R)return;let _={};if(R==="customer_billing_address.country"){let{customer_billing_address:U}=P;if(U&&U.country){let Z=U.country,Ce=!!I&&hl.includes(I),ce=hl.includes(Z);I!==Z&&(Ce||ce)&&x("customer_billing_address.state",{defaultValue:""}),p("customer_billing_address"),_={..._,customer_billing_address:{country:Z}}}}else if(R.startsWith("customer_billing_address")){let{customer_billing_address:U}=P;U&&U.country&&(_={..._,customer_billing_address:{...U,country:U.country}},p("customer_billing_address"))}if(Object.keys(_).length!==0)try{await o(_)}catch{}},[p,I,x,o]),F=Ll(D,500,[D]),k=d("discount_code");Ml(()=>{!k&&!t.discount&&p("discount_code")},[k,t.discount,p]);let T=In(async P=>{try{await o({is_business_customer:P})}catch{}},[o]);Ml(()=>{let P=d(F);return()=>P.unsubscribe()},[d,F]);let q=d("customer_tax_id"),z=In(async()=>{if(q){p("customer_tax_id");try{await o({customer_tax_id:q})}catch{}}},[o,q,p]),j=In(async()=>{p("customer_tax_id");try{await o({customer_tax_id:null}),x("customer_tax_id")}catch{}},[o,p,x]),E=async P=>{let R=P.custom_field_data?Object.fromEntries(Object.entries(P.custom_field_data).filter(([,_])=>_!=null)):{};(P.discount_code===""||!P.discount_code&&v)&&delete P.discount_code,await a({...P,locale:f,custom_field_data:R})},G=!!t.customer_tax_id;Ml(()=>{t.discount||x("discount_code")},[t,x]);let N=Dl(()=>t.active_trial_interval?b("checkout.cta.startTrial"):t.is_payment_form_required?b(c?"checkout.cta.subscribeNow":"checkout.cta.payNow"):b("checkout.cta.getFree"),[t,c,b]);return pe("div",{className:"flex flex-col justify-between gap-y-8",children:[pe("div",{className:"flex flex-col gap-y-6",children:[M(Xo,{...e,children:pe("form",{onSubmit:h(E),className:"flex flex-col gap-y-6",children:[pe("div",{className:"flex flex-col gap-y-4",children:[M(Ue,{control:m,name:"customer_email",rules:{required:b("checkout.form.fieldRequired")},render:({field:P})=>pe(tt,{children:[M(Lt,{children:b("checkout.form.email")}),M(Fe,{children:M(ye,{type:"email",autoComplete:"email",...P,value:P.value||"",disabled:t.customer_id!==null})}),M(ke,{})]})}),u,t.is_payment_form_required&&!g&&M(Ue,{control:m,name:"customer_name",rules:{required:b("checkout.form.fieldRequired")},render:({field:P})=>pe(tt,{children:[M(Lt,{children:b("checkout.form.cardholderName")}),M(Fe,{children:M(ye,{type:"text",autoComplete:"name",...P,value:P.value||""})}),M(ke,{})]})}),(t.is_payment_form_required||t.require_billing_address)&&pe(Yo,{children:[pe(tt,{children:[M(Lt,{children:b("checkout.form.billingAddress.label")}),$t(t.billing_address_fields.line1)&&M(Fe,{children:M(Ue,{control:m,name:"customer_billing_address.line1",rules:{required:qa(t.billing_address_fields.line1)?b("checkout.form.fieldRequired"):!1},render:({field:P})=>pe(Yo,{children:[M(ye,{type:"text",autoComplete:"billing address-line1",placeholder:b("checkout.form.billingAddress.line1"),...P,value:P.value||""}),M(ke,{})]})})}),$t(t.billing_address_fields.line2)&&M(Fe,{children:M(Ue,{control:m,name:"customer_billing_address.line2",rules:{required:qa(t.billing_address_fields.line2)?b("checkout.form.fieldRequired"):!1},render:({field:P})=>pe(Yo,{children:[M(ye,{type:"text",autoComplete:"billing address-line2",placeholder:b("checkout.form.billingAddress.line2"),...P,value:P.value||""}),M(ke,{})]})})}),($t(t.billing_address_fields.postal_code)||$t(t.billing_address_fields.city))&&pe("div",{className:"grid grid-cols-2 gap-x-2",children:[$t(t.billing_address_fields.postal_code)&&M(Fe,{children:M(Ue,{control:m,name:"customer_billing_address.postal_code",rules:{required:qa(t.billing_address_fields.postal_code)?b("checkout.form.fieldRequired"):!1},render:({field:P})=>pe("div",{children:[M(ye,{type:"text",autoComplete:"billing postal-code",placeholder:b("checkout.form.billingAddress.postalCode"),...P,value:P.value||""}),M(ke,{})]})})}),$t(t.billing_address_fields.city)&&M(Fe,{children:M(Ue,{control:m,name:"customer_billing_address.city",rules:{required:qa(t.billing_address_fields.city)?b("checkout.form.fieldRequired"):!1},render:({field:P})=>pe("div",{children:[M(ye,{type:"text",autoComplete:"billing address-level2",placeholder:b("checkout.form.billingAddress.city"),...P,value:P.value||""}),M(ke,{})]})})})]}),$t(t.billing_address_fields.state)&&M(Fe,{children:M(Ue,{control:m,name:"customer_billing_address.state",rules:{required:qa(t.billing_address_fields.state)?b("checkout.form.fieldRequired"):!1},render:({field:P})=>pe(Yo,{children:[M(Gp,{autoComplete:"billing address-level1",country:I,value:P.value||"",onChange:P.onChange,placeholder:b(I==="US"?"checkout.form.billingAddress.state":"checkout.form.billingAddress.province"),fallbackPlaceholder:b("checkout.form.billingAddress.stateProvince")}),M(ke,{})]})})}),$t(t.billing_address_fields.country)&&M(Fe,{children:M(Ue,{control:m,name:"customer_billing_address.country",rules:{required:qa(t.billing_address_fields.country)?b("checkout.form.fieldRequired"):!1},render:({field:P})=>pe(Yo,{children:[M(qp,{allowedCountries:zl.addressInputCountryValues,autoComplete:"billing country",value:P.value||void 0,onChange:P.onChange,placeholder:b("checkout.form.billingAddress.country"),locale:w}),M(ke,{})]})})}),y.customer_billing_address?.message&&M("p",{className:"text-destructive-foreground text-sm",children:y.customer_billing_address.message})]}),M(Ue,{control:m,name:"is_business_customer",render:({field:P})=>pe(tt,{className:"-mt-4",children:[pe("div",{className:"flex flex-row items-center space-y-0 space-x-2",children:[M(Fe,{children:M(wa,{className:Pe("dark:border-gray-600 cursor-pointer border-gray-300",P.value?"border-primary":""),checked:P.value?P.value:!1,onCheckedChange:R=>{l||(P.onChange(R),T(!!R))}})}),M(Lt,{className:"cursor-pointer font-normal dark:text-gray-400",children:b("checkout.form.purchasingAsBusiness")})]}),M(ke,{})]})}),S&&pe("div",{className:"rounded-card flex flex-col gap-y-4 border border-gray-200 bg-gray-50 p-4",children:[M("span",{className:"text-sm font-medium",children:b("checkout.form.billingDetails")}),M(Ue,{control:m,name:"customer_billing_name",rules:{required:b("checkout.form.fieldRequired")},render:({field:P})=>pe(tt,{children:[M(Fe,{children:M(ye,{type:"text",autoComplete:"billing organization",placeholder:b("checkout.form.businessName"),...P,value:P.value||""})}),M(ke,{})]})}),M(Ue,{control:m,name:"customer_tax_id",render:({field:P})=>pe(tt,{children:[M(Fe,{children:pe("div",{className:"relative",children:[M(ye,{type:"text",autoComplete:"off",placeholder:`${b("checkout.form.taxId")} (${b("checkout.form.optional")})`,...P,value:P.value||"",disabled:G}),pe("div",{className:"absolute inset-y-0 right-1 z-10 flex items-center gap-1",children:[!G&&q&&M(nt,{type:"button",variant:"secondary",size:"sm",onClick:z,children:b("checkout.form.apply")}),G&&M(nt,{type:"button",variant:"secondary",size:"sm",onClick:()=>j(),children:M(LS,{className:"h-4 w-4"})})]})]})}),M(ke,{})]})})]})]}),t.attached_custom_fields&&t.attached_custom_fields.map(({custom_field:P,required:R})=>M(Ue,{control:m,name:`custom_field_data.${P.slug}`,rules:{required:R?b("checkout.form.fieldRequired"):void 0},render:({field:_})=>M(km,{customField:P,required:R,field:_})},P.id))]}),i,pe("div",{className:"flex w-full flex-col items-center justify-center gap-y-2",children:[M(nt,{type:"submit",size:"lg",wrapperClassNames:"text-base",className:"w-full shadow-sm",disabled:s||l,loading:r,children:N}),r&&n&&M("p",{className:"text-sm text-gray-500 dark:text-gray-500",children:n}),s&&!r&&M("p",{className:"text-sm text-red-500 dark:text-red-500",children:b("checkout.cta.paymentsUnavailable")}),y.root&&M("p",{className:"text-destructive-foreground text-sm",children:y.root.message})]})]})}),M("div",{children:M(ei,{isPaymentRequired:t.is_payment_form_required,isTrial:!!t.active_trial_interval,isRecurring:!!c,buttonLabel:N,locale:w})})]}),pe("a",{href:"/",className:"flex w-full flex-row items-center justify-center gap-x-3 text-sm text-gray-400 dark:text-gray-600",target:"_blank",rel:"noreferrer",children:[M("span",{children:b("checkout.footer.poweredBy")}),M(Am,{className:"h-5 w-auto"})]})]})},bS=e=>{let{checkout:t,confirm:a,themePreset:o,locale:r}=e,{payment_processor_metadata:{publishable_key:n}}=t,s=Dl(()=>hS(n,{developerTools:{assistant:{enabled:!1}}}),[n]),[l,u]=yS(),f=l?CS.includes(l):!1,g=Dl(()=>t.is_payment_setup_required&&t.is_payment_required&&t.total_amount?{mode:"subscription",setupFutureUsage:"off_session",paymentMethodCreation:"manual",amount:t.total_amount,currency:t.currency}:t.is_payment_required&&t.total_amount?{mode:"payment",paymentMethodCreation:"manual",amount:t.total_amount,currency:t.currency}:{mode:"setup",paymentMethodCreation:"manual",setupFutureUsage:"off_session",currency:t.currency},[t]);return M(mS,{stripe:s,options:{...g,locale:r?Yp(r):void 0,customerSessionClientSecret:t.payment_processor_metadata.customer_session_client_secret,appearance:o.stripe},children:M(gS,{children:({stripe:i,elements:c})=>M(Mm,{...e,checkout:t,confirm:m=>a(m,i,c),isWalletPayment:f,children:t.is_payment_form_required&&M(xS,{options:{paymentMethodOrder:["apple_pay","google_pay","card"],layout:"tabs",fields:{billingDetails:{name:"never",email:"never",phone:"never",address:"never"}},terms:{applePay:"never",auBecsDebit:"never",bancontact:"never",card:"never",cashapp:"never",googlePay:"never",ideal:"never",paypal:"never",sepaDebit:"never",sofort:"never",usBankAccount:"never"}},onChange:m=>{u(m.value.type)}})})})})},SS=e=>{let{checkout:t,disabled:a}=e;return M(Mm,{...e,confirm:async()=>({...t,status:"confirmed",customer_session_token:""}),update:async()=>t,disabled:a??!0})},vS=e=>{let{checkout:{payment_processor:t}}=e;return t==="stripe"?M(bS,{...e}):M(SS,{...e})},IS=vS;var Et=e=>"legacy"in e,wn=e=>e.some(Et),wS=e=>e.amount_type==="metered_unit",Rn=(e,t)=>e.filter(a=>wS(a)&&(!t||a.price_currency===t));var RS=new Set(["bif","clp","djf","gnf","jpy","kmf","krw","mga","pyg","rwf","vnd","vuv","xaf","xof","xpf"]),ga=e=>RS.has(e.toLowerCase())?1:100,Va=e=>ga(e)===100,Fl=e=>e.replace(/[.,]00([^\d]*)$/,"$1"),PS=(e,t,a)=>{let o=ga(t),r=new Intl.NumberFormat(a,{style:"currency",currency:t,currencyDisplay:"narrowSymbol",minimumFractionDigits:Va(t)?2:0});return Fl(r.format(e/o))},kS=(e,t,a)=>{let o=ga(t),r=new Intl.NumberFormat(a,{style:"currency",currency:t,currencyDisplay:"symbol",minimumFractionDigits:Va(t)?2:0});return Fl(r.format(e/o))},TS=(e,t,a)=>{let o=ga(t);return new Intl.NumberFormat(a,{style:"currency",currency:t,currencyDisplay:"symbol",minimumFractionDigits:Va(t)?2:0}).format(e/o)},AS=(e,t,a)=>{let o=ga(t),r=e/o;return r>=1e6?new Intl.NumberFormat(a,{style:"currency",currency:t,currencyDisplay:"narrowSymbol",notation:"compact",compactDisplay:"short",maximumSignificantDigits:5,maximumFractionDigits:3,roundingPriority:"lessPrecision"}).format(r):r>=1e4?new Intl.NumberFormat(a,{style:"currency",currency:t,currencyDisplay:"narrowSymbol",minimumFractionDigits:0,maximumFractionDigits:0}).format(Math.trunc(r)):Fl(new Intl.NumberFormat(a,{style:"currency",currency:t,currencyDisplay:"narrowSymbol",minimumFractionDigits:Va(t)?2:0,maximumFractionDigits:Va(t)?2:0}).format(r))},MS=(e,t,a)=>{let o=ga(t);return new Intl.NumberFormat(a,{style:"currency",currency:t,currencyDisplay:"narrowSymbol",minimumFractionDigits:2,maximumFractionDigits:6}).format(e/o)},xe=(e,t)=>(a,o)=>{switch(e){case"compact":return PS(a,o,t);case"standard":return kS(a,o,t);case"accounting":return TS(a,o,t);case"statistics":return AS(a,o,t);case"subcent":return MS(a,o,t)}};var Dm=new Map;function DS(e){let t=nr(e),a=Dm.get(t);return a||(a=new Intl.PluralRules(t,{type:"ordinal"}),Dm.set(t,a)),a}function Pn(e,t="en"){let a=DS(t).select(e),o=$a(t),r=o.ordinal[a]??o.ordinal.other,n=typeof r=="object"&&"value"in r?r.value:r;return`${e}${n}`}import{useMemo as FS}from"react";import{jsx as BS,jsxs as OS}from"react/jsx-runtime";var ES=({amount:e,currency:t,interval:a,intervalCount:o,mode:r,locale:n})=>{let s=FS(()=>{if(!a)return"";let l=$a(n??"en"),u=o&&o>1?o:null,g=`${u?`${Pn(u,n??"en")} `:""}${l.intervals.short[a]}`;return g?` / ${g}`:""},[a,o,n]);return OS("div",{className:"flex flex-row items-baseline gap-x-1",children:[xe(r,n)(e,t),s?BS("span",{className:"text-[max(12px,0.5em)]",children:s}):null]})},Te=ES;var Fm=new Map;function _S(e,t){let a=Object.keys(t).sort().reduce((o,r)=>(o[r]=t[r],o),{});return`${e}:${JSON.stringify(a)}`}function NS(e,t){let a=t??{dateStyle:"medium"},o=_S(e,a),r=Fm.get(o);return r||(r=new Intl.DateTimeFormat(e,a),Fm.set(o,r)),r}function kn(e,t="en",a){let o=typeof e=="string"?new Date(e):e;return NS(t,a).format(o)}import{jsx as Bm,jsxs as Om}from"react/jsx-runtime";var US={day:"checkout.trial.hero.free.day",month:"checkout.trial.hero.free.month",year:"checkout.trial.hero.free.year"},Em={day:"checkout.trial.hero.intervalSuffix.day",week:"checkout.trial.hero.intervalSuffix.week",month:"checkout.trial.hero.intervalSuffix.month",year:"checkout.trial.hero.intervalSuffix.year"},HS=({checkout:e,locale:t})=>{let{product:a,product_price:o}=e,r=t??Le,n=he(r),s=Et(o)?o.recurring_interval:a.recurring_interval,l=e.active_trial_interval==="week"?"day":e.active_trial_interval,u=e.active_trial_interval==="week"?e.active_trial_interval_count*7:e.active_trial_interval_count,f=n(US[l],{count:u}),g=e.currency??o.price_currency,i=e.total_amount??e.net_amount??0,c=a.recurring_interval_count,m=(()=>{if(!s||!(s in Em))return"";if(c&&c>1){let x=$a(r).intervals.short[s];return` / ${Pn(c,r)} ${x}`}return n(Em[s])})(),d=`${xe("standard",r)(i,g)}${m}`,p=e.trial_end?kn(e.trial_end,r,{year:"numeric",month:"long",day:"numeric"}):null;return Om("div",{className:"flex flex-col gap-y-1",children:[Bm("span",{children:f}),Om("span",{className:"text-sm font-normal text-gray-500 dark:text-gray-500",children:[n("checkout.trial.hero.then")," ",Bm("strong",{className:"font-semibold",children:d}),p?` ${n("checkout.trial.hero.startingDate",{date:p})}`:""]})]})},_m=HS;import{jsx as Nm}from"react/jsx-runtime";var qS=({checkout:e,locale:t})=>{let{product:a,product_price:o}=e;return e.active_trial_interval&&e.active_trial_interval_count?Nm(_m,{checkout:e,locale:t}):Nm(Te,{amount:e.total_amount??e.net_amount??0,currency:e.currency??o.price_currency,interval:Et(o)?o.recurring_interval:a.recurring_interval,intervalCount:a.recurring_interval_count,mode:"standard",locale:t})},VS=qS;var GS=e=>e.type==="fixed",WS=e=>e.type==="percentage",Tn=(e,t)=>{if(WS(e))return new Intl.NumberFormat(t,{style:"percent",maximumFractionDigits:2}).format(-e.basis_points/1e4);if(GS(e))return xe("compact",t)(-e.amount,e.currency);throw new Error("Unknown discount type")};import{useMemo as KS}from"react";var Um={scalar:{scale:1,label:"unit"},token:{scale:1e6,label:"1M tokens"}};function Hm(e,t){return e==="custom"?{scale:t?.customMultiplier??1,label:t?.customLabel??"unit"}:Um[e]??Um.scalar}import{Fragment as $S,jsx as qm,jsxs as El}from"react/jsx-runtime";var zS=({price:e,locale:t=Le,discount:a})=>{let{scale:o,label:r}=Hm(e.meter.unit??"scalar",{customLabel:e.meter.custom_label,customMultiplier:e.meter.custom_multiplier}),n=xe("subcent",t),s=Number.parseFloat(e.unit_amount)*o,l=a&&"basis_points"in a?s*(1-a.basis_points/1e4):null;return El("div",{className:"flex flex-row items-baseline gap-x-1",children:[l!==null?El($S,{children:[qm("span",{className:"text-gray-400 line-through dark:text-gray-500",children:n(s,e.price_currency)}),qm("span",{children:n(l,e.price_currency)})]}):n(s,e.price_currency),El("span",{className:Pe("dark:text-gray-400 text-[max(12px,0.5em)] text-gray-500",e.meter.unit==="custom"?"lowercase":""),children:["/ ",r]})]})},An=zS;import{jsx as Qo,jsxs as jS}from"react/jsx-runtime";var XS=({product:e,price:t,locale:a=Le,mode:o="compact"})=>{let r=he(a);if(t.amount_type==="fixed"&&t.price_amount!==0)return Qo(Te,{amount:t.price_amount,currency:t.price_currency,interval:Et(t)?t.recurring_interval:e.recurring_interval,intervalCount:e.recurring_interval_count,mode:o,locale:a});if(t.amount_type==="custom")return Qo("div",{className:"text-[min(1em,24px)]",children:r("checkout.pricing.payWhatYouWant")});if(t.amount_type==="fixed"&&t.price_amount===0)return Qo("div",{className:"text-[min(1em,24px)]",children:r("checkout.pricing.free")});if(t.amount_type==="seat_based"){let l=[...t.seat_tiers?.tiers??[]].sort((u,f)=>u.min_seats-f.min_seats)[0]?.price_per_seat??0;return Qo(Te,{amount:l,currency:t.price_currency,interval:e.recurring_interval,intervalCount:e.recurring_interval_count,mode:o,locale:a})}else if(t.amount_type==="metered_unit")return jS("div",{className:"flex flex-row gap-1 text-[min(1em,24px)]",children:[t.meter.name," \u2014 ",Qo(An,{price:t,locale:a})]})},Ga=XS;import{jsx as Dn,jsxs as Mn}from"react/jsx-runtime";var ZS=({className:e})=>Mn("svg",{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",className:e,children:[Dn("path",{d:"m12 14 4-4"}),Dn("path",{d:"M3.34 19a10 10 0 1 1 17.32 0"})]}),YS=({checkout:e,locale:t=Le})=>{let a=he(t),{product:o,prices:r,product_price:n,currency:s}=e,l=KS(()=>Rn(r[o.id],s).filter(u=>u.id!==n.id),[r,o,n,s]);return l.length===0?null:Mn("div",{className:"text-sm",children:[Mn("h2",{className:"mb-2 text-base font-medium",children:["+ ",a("checkout.pricing.additionalMeteredUsage")]}),l.map(u=>Mn("div",{className:"flex flex-row items-center gap-x-2 text-sm text-gray-600 dark:text-gray-100",children:[Dn(ZS,{className:"h-4 w-4"}),Dn(Ga,{product:o,price:u,locale:t})]},u.id))]})},Jo=YS;import{jsx as bt,jsxs as Fn}from"react/jsx-runtime";var QS=({checkout:e,layout:t="default",locale:a})=>{let{product:o,product_price:r,discount:n}=e;return!n||r.amount_type!=="fixed"?bt(Te,{amount:e.total_amount,currency:e.currency??r.price_currency,interval:Et(r)?r.recurring_interval:o.recurring_interval,intervalCount:o.recurring_interval_count,mode:"compact",locale:a}):Fn("div",{className:t==="stacked"?"flex flex-row justify-between md:flex-col md:items-start md:gap-y-2":"flex flex-row justify-between",children:[bt(Te,{amount:e.total_amount,currency:e.currency,interval:Et(r)?r.recurring_interval:o.recurring_interval,intervalCount:o.recurring_interval_count,mode:"compact",locale:a}),Fn("div",{className:"flex flex-row items-center gap-x-2 text-lg",children:[bt("div",{className:"text-gray-400 line-through",children:bt(Ga,{product:o,price:r,locale:a})}),Fn("div",{className:"relative rounded-xs bg-linear-to-br from-gray-400 to-gray-500 px-3 py-0.5 text-center text-sm text-white shadow-md dark:from-gray-600 dark:to-gray-700",children:[bt("span",{children:Tn(n,a)}),bt("div",{className:"absolute top-1/2 left-0 -ml-1 flex h-2 w-2 -translate-y-1/2 transform rounded-full bg-gray-50 dark:bg-gray-800"}),bt("div",{className:"absolute top-1/2 right-0 -mr-1 flex h-2 w-2 -translate-y-1/2 transform rounded-full bg-gray-50 dark:bg-gray-800"})]})]})]})},JS=({checkout:e,layout:t="default",locale:a})=>{let{product_price:o}=e;return bt("div",{className:"flex flex-col gap-6",children:Fn("div",{className:"flex flex-col gap-2",children:[bt("h1",{className:"text-3xl font-light","data-testid":"headline-price",children:o.amount_type!=="custom"?bt(QS,{checkout:e,layout:t,locale:a}):xe("compact",a)(e.total_amount,e.currency??o.price_currency)}),bt(Jo,{checkout:e,locale:a})]})})},ev=JS;import{addDays as uv,addMonths as tr,addWeeks as dv,addYears as cv}from"date-fns";import{useMemo as po}from"react";function Vm(e){let t=za(e);if(!t)return null;let a=e.seats;if(!a)return null;let o=[...t.seat_tiers.tiers].sort((n,s)=>n.min_seats-s.min_seats);if(t.seat_tiers.seat_tier_type==="graduated"){let n=[],s=0;for(let l of o){if(s>=a)break;let u=l.max_seats??a,f=Math.min(a,u)-s;f>0&&n.push({seats:f,pricePerSeat:l.price_per_seat,min:l.min_seats,max:l.max_seats??null}),s+=f}return n}let r=o.find(n=>a>=n.min_seats&&(n.max_seats==null||a<=n.max_seats));return[{seats:a,pricePerSeat:r?.price_per_seat??0,min:r?.min_seats??1,max:r?.max_seats??null}]}import{useEffect as tv,useId as av,useRef as ov,useState as rv}from"react";import{Fragment as sv,jsx as er,jsxs as Gm}from"react/jsx-runtime";var nv=({children:e,lines:t=1,tooltip:a,className:o})=>{let r=ov(null),[n,s]=rv(!1),l=av();tv(()=>{let g=r.current;if(!g||typeof ResizeObserver>"u")return;let i=h=>t===1?h.scrollWidth>h.clientWidth:h.scrollHeight>h.clientHeight,c=()=>{let h=i(g);if(!h){for(let d of Array.from(g.children))if(i(d)){h=!0;break}}s(h)};c();let m=new ResizeObserver(c);return m.observe(g),()=>m.disconnect()},[t,e]);let u=`tr${l.replace(/:/g,"")}`,f=t===1?`.${u},.${u}>*{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}`:`.${u},.${u}>*{display:-webkit-box;-webkit-line-clamp:${t};-webkit-box-orient:vertical;overflow:hidden;min-width:0}`;return Gm(sv,{children:[er("style",{dangerouslySetInnerHTML:{__html:f}}),er(Go,{delayDuration:200,children:Gm(Wo,{children:[er(zo,{asChild:!0,children:er("span",{ref:r,className:o?`${u} ${o}`:u,tabIndex:n?0:void 0,children:e})}),n&&er(co,{className:"max-w-xs",children:a??e})]})})]})},Wm=nv;import{jsx as Bl,jsxs as zm}from"react/jsx-runtime";var lv=({title:e,subtitle:t,emphasis:a,className:o,children:r})=>zm("div",{"data-testid":`detail-row-${e}`,className:Pe("flex flex-row items-start justify-between gap-x-8",a?"font-medium":"dark:text-gray-500 text-gray-500",o),children:[zm("div",{className:"flex min-w-0 flex-row items-baseline gap-x-1",children:[Bl(Wm,{children:e}),t&&Bl("span",{className:"shrink-0 text-gray-400 dark:text-gray-500",children:t})]}),Bl("span",{className:"shrink-0",children:r})]}),pt=lv;import{jsx as Ol}from"react/jsx-runtime";var iv=({row:e,currency:t,interval:a,intervalCount:o,locale:r})=>{let n=he(r);return e.min===1&&e.pricePerSeat===0&&e.max!==null?Ol(pt,{title:n("checkout.pricing.seats.included",{count:e.max}),className:"text-gray-600"}):Ol(pt,{title:n("checkout.pricing.seats.count",{count:e.seats}),subtitle:"\xB7 "+xe("standard",r)(e.pricePerSeat,t)+" "+n("checkout.pricing.perSeat"),className:"text-gray-600",children:Ol(Te,{amount:e.seats*e.pricePerSeat,currency:t,interval:a,intervalCount:o,mode:"standard",locale:r})})},$m=iv;import{Fragment as Xm,jsx as je,jsxs as jm}from"react/jsx-runtime";function fv(e,t){let a=e.getFullYear()===new Date().getFullYear();return kn(e,t,{month:"short",day:"numeric",...a?{}:{year:"numeric"}})}function Km(e,t,a){let o=a??1;switch(t){case"day":return uv(e,o);case"week":return dv(e,o);case"month":return tr(e,o);case"year":return cv(e,o);default:return tr(e,o)}}function pv(e,t,a,o){return t.duration==="once"?a?Km(e,a,o):tr(e,o??1):"duration_in_months"in t&&typeof t.duration_in_months=="number"?tr(e,t.duration_in_months):e}var mv=({checkout:e,locale:t=Le})=>{let a=he(t),o=ho(e)?Wa(e.product_price)?e.product_price.recurring_interval:e.product.recurring_interval:null,r=ho(e)?e.product.recurring_interval_count:null,{product:n,prices:s,currency:l}=e,u=po(()=>n&&s?Rn(s[n.id],l):[],[n,s,l]),f=po(()=>{if(!e.discount||e.discount.duration==="forever"||!o)return"";let d=e.trial_end?new Date(e.trial_end):new Date;if("duration_in_months"in e.discount&&typeof e.discount.duration_in_months=="number"){let x=tr(d,e.discount.duration_in_months),y=Km(d,o,r);if(x<=y)return""}let p=pv(d,e.discount,o,r);return a("checkout.pricing.discount.until",{date:fv(p,t)})},[e.discount,e.trial_end,o,r,a,t]),g=po(()=>{if(!o)return a("checkout.pricing.total");let d=r??1;switch(o){case"day":return a("checkout.pricing.everyInterval.day",{count:d});case"week":return a("checkout.pricing.everyInterval.week",{count:d});case"month":return a("checkout.pricing.everyInterval.month",{count:d});case"year":return a("checkout.pricing.everyInterval.year",{count:d});default:bn(o)}},[o,r,a]),i=po(()=>Vm(e),[e]),c=po(()=>Wl(e),[e]),m=po(()=>za(e),[e]),h=!!(c&&m);return e.is_free_product_price?null:je("div",{className:"flex flex-col gap-y-2",children:e.currency?jm(Xm,{children:[h&&c&&je(pt,{title:a("checkout.pricing.basePrice"),className:"text-gray-600",children:je(Te,{amount:c.price_amount,currency:e.currency,interval:o,intervalCount:r,mode:"standard",locale:t})}),i?.map((d,p)=>je($m,{row:d,currency:e.currency,interval:o,intervalCount:r,locale:t},p)),je(pt,{title:a("checkout.pricing.subtotal"),className:"text-gray-600",children:je(Te,{amount:e.tax_behavior==="inclusive"&&e.tax_amount!==null?e.total_amount-e.tax_amount:e.amount,currency:e.currency,interval:o,intervalCount:r,mode:"standard",locale:t})}),e.discount&&jm(Xm,{children:[je(pt,{title:e.discount.name,subtitle:[e.discount.type==="percentage"?`(${Tn(e.discount,t)})`:null,f].filter(Boolean).join(" ")||void 0,className:"text-gray-600",children:xe("standard",t)(-e.discount_amount,e.currency)}),je(pt,{title:a("checkout.pricing.taxableAmount"),className:"text-gray-600",children:xe("standard",t)(e.net_amount,e.currency)})]}),je(pt,{title:e.tax_behavior==="inclusive"?a("checkout.pricing.inclTax"):a("checkout.pricing.taxes"),className:"text-gray-600",children:e.tax_amount!==null?xe("standard",t)(e.tax_amount,e.currency):"\u2014"}),je(pt,{title:g,emphasis:!0,children:je(Te,{amount:e.total_amount,currency:e.currency,interval:o,intervalCount:r,mode:"standard",locale:t})}),u.length>0&&je(pt,{title:a("checkout.pricing.additionalMeteredUsage"),className:"mt-2 border-t border-gray-200 pt-4 dark:border-gray-700"}),u.map(d=>je(pt,{title:d.meter.name,emphasis:!0,children:je(An,{price:d,locale:t,discount:e.discount})},d.id))]}):je("span",{children:a("checkout.pricing.free")})})},gv=mv;import*as jt from"react";import*as St from"react";import{jsx as ar,jsxs as xv}from"react/jsx-runtime";import{jsx as mo}from"react/jsx-runtime";var _l="Radio",[hv,Zm]=ve(_l),[yv,Cv]=hv(_l),Ym=St.forwardRef((e,t)=>{let{__scopeRadio:a,name:o,checked:r=!1,required:n,disabled:s,value:l="on",onCheck:u,form:f,...g}=e,[i,c]=St.useState(null),m=J(t,p=>c(p)),h=St.useRef(!1),d=i?f||!!i.closest("form"):!0;return xv(yv,{scope:a,checked:r,disabled:s,children:[ar(W.button,{type:"button",role:"radio","aria-checked":r,"data-state":tg(r),"data-disabled":s?"":void 0,disabled:s,value:l,...g,ref:m,onClick:$(e.onClick,p=>{r||u?.(),d&&(h.current=p.isPropagationStopped(),h.current||p.stopPropagation())})}),d&&ar(eg,{control:i,bubbles:!h.current,name:o,value:l,checked:r,required:n,disabled:s,form:f,style:{transform:"translateX(-100%)"}})]})});Ym.displayName=_l;var Qm="RadioIndicator",Jm=St.forwardRef((e,t)=>{let{__scopeRadio:a,forceMount:o,...r}=e,n=Cv(Qm,a);return ar(Rt,{present:o||n.checked,children:ar(W.span,{"data-state":tg(n.checked),"data-disabled":n.disabled?"":void 0,...r,ref:t})})});Jm.displayName=Qm;var Lv="RadioBubbleInput",eg=St.forwardRef(({__scopeRadio:e,control:t,checked:a,bubbles:o=!0,...r},n)=>{let s=St.useRef(null),l=J(s,n),u=Jt(a),f=ea(t);return St.useEffect(()=>{let g=s.current;if(!g)return;let i=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(i,"checked").set;if(u!==a&&m){let h=new Event("click",{bubbles:o});m.call(g,a),g.dispatchEvent(h)}},[u,a,o]),ar(W.input,{type:"radio","aria-hidden":!0,defaultChecked:a,...r,tabIndex:-1,ref:l,style:{...r.style,...f,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});eg.displayName=Lv;function tg(e){return e?"checked":"unchecked"}var bv=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],En="RadioGroup",[Sv,VB]=ve(En,[io,Zm]),ag=io(),og=Zm(),[vv,Iv]=Sv(En),rg=jt.forwardRef((e,t)=>{let{__scopeRadioGroup:a,name:o,defaultValue:r,value:n,required:s=!1,disabled:l=!1,orientation:u,dir:f,loop:g=!0,onValueChange:i,...c}=e,m=ag(a),h=na(f),[d,p]=Ve({prop:n,defaultProp:r??null,onChange:i,caller:En});return mo(vv,{scope:a,name:o,required:s,disabled:l,value:d,onValueChange:p,children:mo(ln,{asChild:!0,...m,orientation:u,dir:h,loop:g,children:mo(W.div,{role:"radiogroup","aria-required":s,"aria-orientation":u,"data-disabled":l?"":void 0,dir:h,...c,ref:t})})})});rg.displayName=En;var ng="RadioGroupItem",sg=jt.forwardRef((e,t)=>{let{__scopeRadioGroup:a,disabled:o,...r}=e,n=Iv(ng,a),s=n.disabled||o,l=ag(a),u=og(a),f=jt.useRef(null),g=J(t,f),i=n.value===r.value,c=jt.useRef(!1);return jt.useEffect(()=>{let m=d=>{bv.includes(d.key)&&(c.current=!0)},h=()=>c.current=!1;return document.addEventListener("keydown",m),document.addEventListener("keyup",h),()=>{document.removeEventListener("keydown",m),document.removeEventListener("keyup",h)}},[]),mo(un,{asChild:!0,...l,focusable:!s,active:i,children:mo(Ym,{disabled:s,required:n.required,checked:i,...u,...r,name:n.name,ref:g,onCheck:()=>n.onValueChange(r.value),onKeyDown:$(m=>{m.key==="Enter"&&m.preventDefault()}),onFocus:$(r.onFocus,()=>{c.current&&f.current?.click()})})})});sg.displayName=ng;var wv="RadioGroupIndicator",lg=jt.forwardRef((e,t)=>{let{__scopeRadioGroup:a,...o}=e,r=og(a);return mo(Jm,{...r,...o,ref:t})});lg.displayName=wv;var Nl=rg,Ul=sg,ig=lg;import{jsx as Bn}from"react/jsx-runtime";var Hl=({ref:e,className:t,...a})=>Bn(Nl,{className:Pe("grid gap-2",t),...a,ref:e});Hl.displayName=Nl.displayName;var ql=({ref:e,className:t,...a})=>Bn(Ul,{ref:e,className:Pe("border-primary text-primary ring-offset-background focus-visible:ring-ring aspect-square h-4 w-4 rounded-full border focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),...a,children:Bn(ig,{className:"flex items-center justify-center",children:Bn(Co,{className:"h-2.5 w-2.5 fill-current text-current"})})});ql.displayName=Ul.displayName;import{useCallback as Pv,useMemo as kv}from"react";var ug=e=>e.charAt(0).toUpperCase()+e.slice(1),dg=e=>e.charAt(0).toLowerCase()+e.slice(1);import{jsx as Ke,jsxs as On}from"react/jsx-runtime";var cg=({isSelected:e,product:t,price:a,checkout:o,locale:r})=>{let n=(o.prices[t.id]??[]).filter(u=>u.price_currency===o.currency),s=n.find(u=>u.amount_type==="fixed"),l=n.find(u=>u.amount_type==="seat_based");if(s&&l)return Ke(Tv,{fixedPrice:s,seatPrice:l,product:t,locale:r});if(a.amount_type==="seat_based"){if(e)return Ke(Te,{amount:o.net_amount||0,currency:a.price_currency,interval:t.recurring_interval,intervalCount:t.recurring_interval_count,mode:"standard",locale:r});let u=(a.seat_tiers?.tiers?.[0]?.price_per_seat??0)*(a.seat_tiers?.minimum_seats??1);return Ke(Av,{amount:u,currency:a.price_currency,interval:t.recurring_interval,intervalCount:t.recurring_interval_count,locale:r})}return Ke(Ga,{product:t,price:a,locale:r,mode:"standard"})},Tv=({fixedPrice:e,seatPrice:t,product:a,locale:o})=>{let r=he(o??Le),s=[...t.seat_tiers?.tiers??[]].sort((l,u)=>l.min_seats-u.min_seats)[0]?.price_per_seat??0;return On("span",{className:"flex flex-wrap items-baseline justify-end gap-x-1",children:[Ke(Te,{amount:e.price_amount,currency:e.price_currency,interval:a.recurring_interval,intervalCount:a.recurring_interval_count,mode:"standard",locale:o}),Ke("span",{children:"+"}),Ke(Te,{amount:s,currency:t.price_currency,mode:"standard",locale:o}),Ke("span",{children:r("checkout.pricing.perSeat")})]})},Av=({amount:e,currency:t,interval:a,intervalCount:o,locale:r})=>{let n=he(r??Le);return On("span",{className:"flex items-baseline",children:[n("checkout.productSwitcher.fromPrefix"),"\xA0",Ke(Te,{amount:e,currency:t,interval:a,intervalCount:o,mode:"standard",locale:r})]})},Mv=({checkout:e,update:t,locale:a=Le})=>{let o=he(a),{product:r,product_price:n,products:s,prices:l,currency:u}=e,f=kv(()=>{let m={};for(let[h,d]of Object.entries(l)){let p=d.filter(x=>x.price_currency===u);m[h]=p.length>0?p:d}return m},[l,u]),g=Pv(m=>{let[h,d]=m.split(":"),p=s.find(x=>x.id===h);p&&(wn(f[p.id])?t?.({product_id:p.id,product_price_id:d}):t?.({product_id:p.id}))},[t,s,f]);if(s.length===1&&!wn(f[s[0].id]))return null;let i=(m,h)=>{let d=Wa(h)?h.recurring_interval:m.recurring_interval,p=m.recurring_interval_count??1;if(d){let x=dg(o(`checkout.pricing.everyInterval.${d}`,{count:p}));return ug(o("checkout.productSwitcher.billedRecurring",{frequency:x}))}return o("checkout.productSwitcher.oneTimePurchase")},c=[];for(let m of s)if(wn(f[m.id]))for(let h of f[m.id])c.push({key:h.id,value:`${m.id}:${h.id}`,productName:m.name,product:m,price:h,isSelected:h.id===n.id});else c.push({key:m.id,value:`${m.id}:${f[m.id][0].id}`,productName:m.name,product:m,price:f[m.id][0],isSelected:m.id===r.id});return Ke(Hl,{value:`${r.id}:${n.id}`,onValueChange:g,className:"gap-0 divide-y divide-gray-200 overflow-hidden rounded-xl border border-gray-200 dark:divide-gray-700 dark:border-gray-700",children:c.map(m=>On("label",{className:Pe("flex cursor-pointer items-center gap-x-3 px-4 py-3 transition-colors",m.isSelected?"bg-blue-50/50 dark:bg-blue-950/20":"dark:hover:bg-gray-800 hover:bg-gray-50"),htmlFor:`product-${m.key}`,children:[Ke(ql,{value:m.value,id:`product-${m.key}`}),On("div",{className:"min-w-0 flex-1",children:[Ke("span",{className:"line-clamp-2 text-sm",children:m.productName}),Ke("span",{className:"block text-xs text-gray-500 dark:text-gray-500",children:i(m.product,m.price)})]}),Ke("span",{className:"shrink-0 text-sm text-gray-500 dark:text-gray-400",children:Ke(cg,{isSelected:m.isSelected,product:m.product,price:m.price,checkout:e,locale:a})})]},m.key))})},Dv=Mv;import{useCallback as go,useMemo as fg,useState as pg}from"react";import{jsx as mg}from"react/jsx-runtime";var Fv=e=>{let{id:t,name:a,value:o,placeholder:r,currency:n,preSlot:s,postSlot:l,onChange:u,onBlur:f,onFocus:g,disabled:i,step:c=.1}=e,m=fg(()=>ga(n),[n]),h=!Va(n),d=go(k=>{if(k!=null)return h?k.toString():(k/m).toFixed(2)},[m,h]),p=go(k=>{let T=Number.parseFloat(k);return isNaN(T)&&(T=0),Math.round(h?T:T*m)},[m,h]),[x,y]=pg(o),[C,v]=pg(d(o));o!==x&&(y(o),v(d(o)));let S=go(k=>{if(u)if(!k||k.trim()==="")y(null),u(null);else{let T=p(k);y(T),u(T)}v(k)},[u,p]),w=go(k=>{let T=k.target.value;if(T===""){S("");return}if(h){let E=T.replace(/[^0-9]/g,"");S(E);return}let q=T.replace(/[^0-9,.]/g,""),z=q.replace(/[,.](?!$)/g,"").replace(/,$/,"."),j=q.match(/([.,])([0-9]+)$/);if(j){let E=j[2],G=q.slice(0,-j[0].length).replace(/[,.]/g,""),N=E.slice(0,2),P=Number.parseFloat(`${G}.${N}`);if(!Number.isNaN(P)){let R=Math.min(2,E.length),_=P.toFixed(R);z=G.length>0?_:_.replace(/^0(?=\.)/,"")}}S(z)},[S,h]),b=go(k=>{if(C){let T=C;h||(T.startsWith(".")&&(T=`0${T}`),T.endsWith(".")&&(T=T.replace(/\.$/,""))),T!==C&&S(T)}f&&f(k)},[f,C,S,h]),I=go(k=>{if(h){!/[0-9]/.test(k.key)&&!["Backspace","Delete","ArrowLeft","ArrowRight","Tab"].includes(k.key)&&!k.ctrlKey&&!k.metaKey&&k.preventDefault();return}if(!/[0-9.,]/.test(k.key)&&!["Backspace","Delete","ArrowLeft","ArrowRight","Tab"].includes(k.key)&&!k.ctrlKey&&!k.metaKey&&k.preventDefault(),k.key==="ArrowUp"){k.preventDefault();let T=Number.parseFloat(k.currentTarget.value),q=(Number.isNaN(T)?c:T+c).toFixed(2);S(q)}if(k.key==="ArrowDown"){let T=Number.parseFloat(k.currentTarget.value),q=Math.max(0,Number.isNaN(T)?-c:T-c).toFixed(2);S(q)}(k.key==="."||k.key===",")&&k.currentTarget.value.includes(".")&&k.preventDefault()},[c,S,h]),D=mg("span",{className:"dark:text-gray-500 text-sm font-medium text-gray-500",children:n.toUpperCase()}),F=fg(()=>{if(r)return h?r.toLocaleString("en-US"):(r/m).toLocaleString("en-US")},[r,m,h]);return mg(ye,{type:"text",inputMode:h?"numeric":"decimal",id:t,name:a,className:de("dark:placeholder:text-gray-500 block w-full px-4 pl-14 text-base font-normal placeholder:text-gray-400",e.className??""),value:C,onChange:w,onKeyDown:I,placeholder:F,preSlot:s||D,postSlot:l,onBlur:b,onFocus:g,disabled:i})},gg=Fv;import{useCallback as Ev,useEffect as Vl,useRef as Bv}from"react";import{Fragment as _v,jsx as rr,jsxs as or}from"react/jsx-runtime";var Ov=({update:e,checkout:t,productPrice:a,locale:o=Le})=>{let r=he(o),{amount:n}=t,s=Yl({defaultValues:{amount:n||0}}),{control:l,trigger:u,reset:f}=s,g=a.minimum_amount??50,i=Ev(p=>g===0&&p>0&&p<50?r("checkout.pwywForm.amountFreeOrMinimum",{min:xe("compact",o)(50,t.currency),zero:xe("compact",o)(0,t.currency)}):p<g?r("checkout.pwywForm.amountMinimum",{min:xe("compact",o)(g,t.currency)}):!0,[g,t.currency,o,r]),c=Bv(n);Vl(()=>{c.current=n},[n]);let m=Zp(async p=>{if(p===c.current)return;await u("amount")&&e?.({amount:p})},600,[e,u]),h=Xl({control:l,name:"amount"});Vl(()=>{h!==void 0&&m(h)},[h,m]),Vl(()=>{f({amount:n||0})},[n,f]);let d=g===0?null:r("checkout.pwywForm.minimum",{amount:xe("compact",o)(g,t.currency)});return rr(Xo,{...s,children:or("form",{className:"flex w-full flex-col gap-3",children:[or(Lt,{children:[r("checkout.pwywForm.label"),d&&or(_v,{children:[" ",or("span",{className:"text-gray-400",children:["(",d,")"]})]})]}),rr("div",{className:"flex flex-row items-center gap-2",children:rr(Ue,{control:l,shouldUnregister:!0,name:"amount",rules:{validate:i},render:({field:p})=>or(tt,{className:"w-full",children:[rr(gg,{className:"bg-white shadow-xs",name:p.name,currency:t.currency,value:p.value||void 0,onChange:p.onChange,placeholder:0,disabled:p.disabled}),rr(ke,{})]})})})]})})};import{useCallback as Nv,useEffect as Uv,useRef as Hv,useState as _n}from"react";import{jsx as ie,jsxs as xo}from"react/jsx-runtime";var qv=({checkout:e,update:t,locale:a=Le,compact:o=!1})=>{let r=he(a),[n,s]=_n(!1),[l,u]=_n(!1),[f,g]=_n(""),[i,c]=_n(null),m=Hv(!1),h=Nv(_=>_&&_.error==="RequestValidationError"?_.detail[0]?.msg:r("checkout.pricing.seats.updateFailed"),[r]),d=za(e),p=d!==null,C=[...(d?.seat_tiers??null)?.tiers??[]].sort((_,U)=>_.min_seats-U.min_seats),v=C[0]?.min_seats??1,S=C[C.length-1]?.max_seats??null,w=e.min_seats??v,b=e.max_seats??S,I=b!==null,D=I&&w===b,F=Math.max(e.seats||w,w),k=e.seats!==null&&e.seats!==void 0&&e.seats<w,T=e.net_amount||0,q=e.currency??"usd";if(Uv(()=>{p&&k&&!D&&!n&&!m.current&&(m.current=!0,t({seats:w}).catch(_=>{c(h(_))}))},[p,k,D,w,n,t,h]),!p)return null;let z=async _=>{_<w||n||I&&_>b||(s(!0),c(null),await t({seats:_}).catch(U=>{c(h(U))}).finally(()=>{s(!1)}))},j=_=>{let U=_.target.value;(U===""||/^\d+$/.test(U))&&g(U)},E=()=>{let _=parseInt(f,10);!isNaN(_)&&_>=w&&(!I||_<=b)&&_!==F&&z(_),u(!1),g("")},G=_=>{_.key==="Enter"?_.currentTarget.blur():_.key==="Escape"&&(u(!1),g(""))},N=()=>{u(!0),g(F.toString())},R=w>1&&I?r("checkout.pricing.seats.range",{min:w,max:b}):w>1?r("checkout.pricing.seats.minimum",{min:w}):I?r("checkout.pricing.seats.maximum",{max:b}):null;return o?xo("div",{className:"flex flex-col gap-3",children:[xo("div",{className:"flex flex-row items-center justify-between",children:[ie("div",{className:"flex flex-col gap-0.5",children:ie("span",{className:"text-sm font-medium dark:text-white",children:r("checkout.pricing.seats.label")})}),D?ie("span",{className:"text-sm font-medium dark:text-white",children:F}):xo("div",{className:"flex items-center gap-0 rounded-lg border border-gray-200 dark:border-gray-700",children:[ie("button",{type:"button",onClick:()=>z(F-1),disabled:F<=w||n||l,className:"flex h-7 w-7 cursor-pointer items-center justify-center rounded-l-lg leading-none text-gray-500 transition-colors hover:bg-gray-100 disabled:cursor-not-allowed disabled:opacity-40 dark:text-gray-400 dark:hover:bg-gray-800","aria-label":"Decrease seats",children:ie("svg",{className:"h-3 w-3",viewBox:"0 0 14 14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:ie("path",{d:"M3 7h8"})})}),l?ie(ye,{type:"text",inputMode:"numeric",value:f,onChange:j,onBlur:E,onKeyDown:G,autoFocus:!0,min:w,max:I?b:void 0,className:"h-7 w-10 cursor-text rounded-none border-x border-y-0 px-1 text-center text-sm font-medium tabular-nums"}):ie("button",{type:"button",onClick:N,disabled:n,className:"h-7 w-10 cursor-pointer border-x border-gray-200 text-center text-sm font-medium tabular-nums transition-colors hover:bg-gray-50 disabled:cursor-not-allowed disabled:opacity-50 dark:border-gray-700 dark:hover:bg-gray-800","aria-label":"Click to edit seat count",title:"Click to edit",children:F}),ie("button",{type:"button",onClick:()=>z(F+1),disabled:I&&F>=b||n||l,className:"flex h-7 w-7 cursor-pointer items-center justify-center rounded-r-lg leading-none text-gray-500 transition-colors hover:bg-gray-100 disabled:cursor-not-allowed disabled:opacity-40 dark:text-gray-400 dark:hover:bg-gray-800","aria-label":"Increase seats",children:ie("svg",{className:"h-3 w-3",viewBox:"0 0 14 14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:ie("path",{d:"M7 3v8M3 7h8"})})})]})]}),!D&&R&&ie("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:R}),i&&ie("p",{className:"text-destructive-foreground text-sm",children:i})]}):xo("div",{className:"flex flex-col gap-6",children:[ie("div",{className:"flex flex-col gap-2",children:ie("h1",{className:"text-3xl font-light text-gray-900 dark:text-white","data-testid":"headline-price",children:xe("compact",a)(T,q)})}),xo("div",{className:"flex flex-col gap-2",children:[ie("label",{className:"text-lg",children:r("checkout.pricing.seats.numberOfSeats")}),D?ie("span",{className:"min-w-[3.5rem] text-2xl font-light text-gray-900 dark:text-white",children:F}):xo("div",{className:"flex items-center gap-3",children:[ie(nt,{variant:"ghost",size:"icon",onClick:()=>z(F-1),disabled:F<=w||n||l,className:"h-10 w-10 rounded-full disabled:opacity-40","aria-label":"Decrease seats",children:ie("svg",{className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,children:ie("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 12h14"})})}),l?ie(ye,{type:"text",inputMode:"numeric",value:f,onChange:j,onBlur:E,onKeyDown:G,autoFocus:!0,min:w,max:I?b:void 0,className:"h-auto max-w-[4.5rem] min-w-[3.5rem] py-1.5 text-center text-2xl font-light tabular-nums"}):ie("button",{type:"button",onClick:N,disabled:n,className:"group relative min-w-[3.5rem] rounded-xl px-3 py-1.5 text-center text-2xl font-light text-gray-900 tabular-nums transition-all hover:bg-gray-100 disabled:cursor-not-allowed disabled:opacity-50 dark:text-white dark:hover:bg-gray-800","aria-label":"Click to edit seat count",title:"Click to edit",children:ie("span",{children:F})}),ie(nt,{variant:"ghost",size:"icon",onClick:()=>z(F+1),disabled:I&&F>=b||n||l,className:"h-10 w-10 rounded-full disabled:opacity-40","aria-label":"Increase seats",children:ie("svg",{className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,children:ie("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 5v14m-7-7h14"})})})]}),!D&&R&&ie("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:R}),i&&ie("p",{className:"text-destructive-foreground text-sm",children:i})]}),ie(Jo,{checkout:e,locale:a})]})},Vv=qv;export{IS as CheckoutForm,VS as CheckoutHeroPrice,Ov as CheckoutPWYWForm,ev as CheckoutPricing,gv as CheckoutPricingBreakdown,Dv as CheckoutProductSwitcher,cg as CheckoutProductSwitcherItemPrice,Vv as CheckoutSeatSelector,Jo as MeteredPricesDisplay,Ga as ProductPriceLabel};
|
|
69
69
|
/*! Bundled license information:
|
|
70
70
|
|
|
71
71
|
react-dom/cjs/react-dom.production.js:
|