vendor: 18,810 bytes, lines 1-21
1import{c as Le,a,az as Ot,ac as Ze,j as e,aA as cs,a8 as Dt,aB as rt,a9 as J,al as fe,ab as Y,aC as ds,aD as us,ae as V,aj as ps,ah as Lt,af as ms,aE as hs,aF as fs,aG as xs,aH as gs,w as H,a1 as Ft,ad as vs,aI as bs,d as at,X as ys,aJ as _e,B as re,e as ws,f as ot,k as Bt,av as zt,s as ne,p as Ss,as as Cs,L as js,ax as Ns,n as ks,h as Is,t as we,aK as jt,aL as Ps,aM as _s,aN as Ts,aO as Es,aP as Rs,aQ as Ms,aR as As}from"./index-CRPZpX17.js";import{p as Os,j as Ds,q as Ls,r as Fs,s as Bs,t as zs,R as it,P as lt,O as ct,C as dt,T as ut,c as Hs,o as Us,v as Vs,w as $s,x as Ws}from"./popover-5zndvtb5.js";import{_ as qs,L as Nt}from"./label-DewNCvIZ.js";import{C as Ht}from"./chevron-down-C7lCUKQy.js";import{n as Ee,b as Ut}from"./sb-loading-BS93ZLM4.js";import{u as Qs}from"./mobile-pending-C6irSst_.js";import{M as Oe,e as Se}from"./header-CqtDmtDa.js";import{a as Ks,B as Gs,A as Ys,I as Zs}from"./invite-code-page-xhVh6mvp.js";import{T as Xs}from"./search-BenPg9xh.js";import{g as Js}from"./dapposLogo-T2t9YBIw.js";import{F as er}from"./telegram-D_yRa8Ri.js";import{b as tr,g as kt,P as nr,F as sr,B as rr}from"./pricing.config-DRwWTe1Y.js";import{M as ar}from"./minus-C6iqDqBd.js";import"./logo-B8_A0nH6.js";import"./device-status-icons-7iM_qVs6.js";import"./incognito-BoJbb9iM.js";/** 2 * @license lucide-react v0.372.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */const or=Le("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** 7 * @license lucide-react v0.372.0 - ISC 8 * 9 * This source code is licensed under the ISC license. 10 * See the LICENSE file in the root directory of this source tree. 11 */const ir=Le("Headphones",[["path",{d:"M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3",key:"1xhozi"}]]);/** 12 * @license lucide-react v0.372.0 - ISC 13 * 14 * This source code is licensed under the ISC license. 15 * See the LICENSE file in the root directory of this source tree. 16 */const lr=Le("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/** 17 * @license lucide-react v0.372.0 - ISC 18 * 19 * This source code is licensed under the ISC license. 20 * See the LICENSE file in the root directory of this source tree. 21 */const cr=Le("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);function It(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Xe(t,n){return Xe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Xe(t,n)}const dr="/xbubble/assets/background-2zwfpTok.png",ur="/xbubble/assets/business-header-BfxSzboJ.png",pr="/xbubble/assets/individual-header-qI1oU1wG.png";function Pt(t,[n,r]){return Math.min(r,Math.max(n,t))}function Vt(t){const n=a.useRef({value:t,previous:t});return a.useMemo(()=>(n.current.value!==t&&(n.current.previous=n.current.value,n.current.value=t),n.current.previous),[t])}var mr=[" ","Enter","ArrowUp","ArrowDown"],hr=[" ","Enter"],ve="Select",[Fe,Be,fr]=Ds(ve),[Ne,Ra]=Dt(ve,[fr,Ot]),ze=Ot(),[xr,xe]=Ne(ve),[gr,vr]=Ne(ve),$t=t=>{const{__scopeSelect:n,children:r,open:i,defaultOpen:o,onOpenChange:u,value:x,defaultValue:f,onValueChange:d,dir:b,name:S,autoComplete:C,disabled:k,required:N,form:v}=t,s=ze(n),[m,p]=a.useState(null),[l,h]=a.useState(null),[y,w]=a.useState(!1),j=Os(b),[g,P]=Ze({prop:i,defaultProp:o??!1,onChange:u,caller:ve}),[F,Q]=Ze({prop:x,defaultProp:f,onChange:d,caller:ve}),D=a.useRef(null),K=m?v||!!m.closest("form"):!0,[q,G]=a.useState(new Set),$=Array.from(q).map(B=>B.props.value).join(";");return e.jsx(cs,{...s,children:e.jsxs(xr,{required:N,scope:n,trigger:m,onTriggerChange:p,valueNode:l,onValueNodeChange:h,valueNodeHasChildren:y,onValueNodeHasChildrenChange:w,contentId:rt(),value:F,onValueChange:Q,open:g,onOpenChange:P,dir:j,triggerPointerDownPosRef:D,disabled:k,children:[e.jsx(Fe.Provider,{scope:n,children:e.jsx(gr,{scope:t.__scopeSelect,onNativeOptionAdd:a.useCallback(B=>{G(T=>new Set(T).add(B))},[]),onNativeOptionRemove:a.useCallback(B=>{G(T=>{const U=new Set(T);return U.delete(B),U})},[]),children:r})}),K?e.jsxs(fn,{"aria-hidden":!0,required:N,tabIndex:-1,name:S,autoComplete:C,value:F,onChange:B=>Q(B.target.value),disabled:k,form:v,children:[F===void 0?e.jsx("option",{value:""}):null,Array.from(q)]},$):null]})})};$t.displayName=ve;var Wt="SelectTrigger",qt=a.forwardRef((t,n)=>{const{__scopeSelect:r,disabled:i=!1,...o}=t,u=ze(r),x=xe(Wt,r),f=x.disabled||i,d=J(n,x.onTriggerChange),b=Be(r),S=a.useRef("touch"),[C,k,N]=gn(s=>{const m=b().filter(h=>!h.disabled),p=m.find(h=>h.value===x.value),l=vn(m,s,p);l!==void 0&&x.onValueChange(l.value)}),v=s=>{f||(x.onOpenChange(!0),N()),s&&(x.triggerPointerDownPosRef.current={x:Math.round(s.pageX),y:Math.round(s.pageY)})};return e.jsx(us,{asChild:!0,...u,children:e.jsx(Y.button,{type:"button",role:"combobox","aria-controls":x.contentId,"aria-expanded":x.open,"aria-required":x.required,"aria-autocomplete":"none",dir:x.dir,"data-state":x.open?"open":"closed",disabled:f,"data-disabled":f?"":void 0,"data-placeholder":xn(x.value)?"":void 0,...o,ref:d,onClick:V(o.onClick,s=>{s.currentTarget.focus(),S.current!=="mouse"&&v(s)}),onPointerDown:V(o.onPointerDown,s=>{S.current=s.pointerType;const m=s.target;m.hasPointerCapture(s.pointerId)&&m.releasePointerCapture(s.pointerId),s.button===0&&s.ctrlKey===!1&&s.pointerType==="mouse"&&(v(s),s.preventDefault())}),onKeyDown:V(o.onKeyDown,s=>{const m=C.current!=="";!(s.ctrlKey||s.altKey||s.metaKey)&&s.key.length===1&&k(s.key),!(m&&s.key===" ")&&mr.includes(s.key)&&(v(),s.preventDefault())})})})});qt.displayName=Wt;var Qt="SelectValue",Kt=a.forwardRef((t,n)=>{const{__scopeSelect:r,className:i,style:o,children:u,placeholder:x="",...f}=t,d=xe(Qt,r),{onValueNodeHasChildrenChange:b}=d,S=u!==void 0,C=J(n,d.onValueNodeChange);return fe(()=>{b(S)},[b,S]),e.jsx(Y.span,{...f,ref:C,style:{pointerEvents:"none"},children:xn(d.value)?e.jsx(e.Fragment,{children:x}):u})});Kt.displayName=Qt;var br="SelectIcon",Gt=a.forwardRef((t,n)=>{const{__scopeSelect:r,children:i,...o}=t;return e.jsx(Y.span,{"aria-hidden":!0,...o,ref:n,children:i||"â¼"})});Gt.displayName=br;var yr="SelectPortal",Yt=t=>e.jsx(ps,{asChild:!0,...t});Yt.displayName=yr;var be="SelectContent",Zt=a.forwardRef((t,n)=>{const r=xe(be,t.__scopeSelect),[i,o]=a.useState();if(fe(()=>{o(new DocumentFragment)},[]),!r.open){const u=i;return u?Lt.createPortal(e.jsx(Xt,{scope:t.__scopeSelect,children:e.jsx(Fe.Slot,{scope:t.__scopeSelect,children:e.jsx("div",{children:t.children})})}),u):null}return e.jsx(Jt,{...t,ref:n})});Zt.displayName=be;var te=10,[Xt,ge]=Ne(be),wr="SelectContentImpl",Sr=hs("SelectContent.RemoveScroll"),Jt=a.forwardRef((t,n)=>{const{__scopeSelect:r,position:i="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:u,onPointerDownOutside:x,side:f,sideOffset:d,align:b,alignOffset:S,arrowPadding:C,collisionBoundary:k,collisionPadding:N,sticky:v,hideWhenDetached:s,avoidCollisions:m,...p}=t,l=xe(be,r),[h,y]=a.useState(null),[w,j]=a.useState(null),g=J(n,I=>y(I)),[P,F]=a.useState(null),[Q,D]=a.useState(null),K=Be(r),[q,G]=a.useState(!1),$=a.useRef(!1);a.useEffect(()=>{if(h)return Ls(h)},[h]),Fs();const B=a.useCallback(I=>{const[M,...L]=K().map(R=>R.ref.current),[O]=L.slice(-1),E=document.activeElement;for(const R of I)if(R===E||(R==null||R.scrollIntoView({block:"nearest"}),R===M&&w&&(w.scrollTop=0),R===O&&w&&(w.scrollTop=w.scrollHeight),R==null||R.focus(),document.activeElement!==E))return},[K,w]),T=a.useCallback(()=>B([P,h]),[B,P,h]);a.useEffect(()=>{q&&T()},[q,T]);const{onOpenChange:U,triggerPointerDownPosRef:z}=l;a.useEffect(()=>{if(h){let I={x:0,y:0};const M=O=>{var E,R;I={x:Math.abs(Math.round(O.pageX)-(((E=z.current)==null?void 0:E.x)??0)),y:Math.abs(Math.round(O.pageY)-(((R=z.current)==null?void 0:R.y)??0))}},L=O=>{I.x<=10&&I.y<=10?O.preventDefault():h.contains(O.target)||U(!1),document.removeEventListener("pointermove",M),z.current=null};return z.current!==null&&(document.addEventListener("pointermove",M),document.addEventListener("pointerup",L,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",M),document.removeEventListener("pointerup",L,{capture:!0})}}},[h,U,z]),a.useEffect(()=>{const I=()=>U(!1);return window.addEventListener("blur",I),window.addEventListener("resize",I),()=>{window.removeEventListener("blur",I),window.removeEventListener("resize",I)}},[U]);const[ce,de]=gn(I=>{const M=K().filter(E=>!E.disabled),L=M.find(E=>E.ref.current===document.activeElement),O=vn(M,I,L);O&&setTimeout(()=>O.ref.current.focus())}),ue=a.useCallback((I,M,L)=>{const O=!$.current&&!L;(l.value!==void 0&&l.value===M||O)&&(F(I),O&&($.current=!0))},[l.value]),W=a.useCallback(()=>h==null?void 0:h.focus(),[h]),Z=a.useCallback((I,M,L)=>{const O=!$.current&&!L;(l.value!==void 0&&l.value===M||O)&&D(I)},[l.value]),pe=i==="popper"?Je:en,ae=pe===Je?{side:f,sideOffset:d,align:b,alignOffset:S,arrowPadding:C,collisionBoundary:k,collisionPadding:N,sticky:v,hideWhenDetached:s,avoidCollisions:m}:{};return e.jsx(Xt,{scope:r,content:h,viewport:w,onViewportChange:j,itemRefCallback:ue,selectedItem:P,onItemLeave:W,itemTextRefCallback:Z,focusSelectedItem:T,selectedItemText:Q,position:i,isPositioned:q,searchRef:ce,children:e.jsx(Bs,{as:Sr,allowPinchZoom:!0,children:e.jsx(zs,{asChild:!0,trapped:l.open,onMountAutoFocus:I=>{I.preventDefault()},onUnmountAutoFocus:V(o,I=>{var M;(M=l.trigger)==null||M.focus({preventScroll:!0}),I.preventDefault()}),children:e.jsx(fs,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:u,onPointerDownOutside:x,onFocusOutside:I=>I.preventDefault(),onDismiss:()=>l.onOpenChange(!1),children:e.jsx(pe,{role:"listbox",id:l.contentId,"data-state":l.open?"open":"closed",dir:l.dir,onContextMenu:I=>I.preventDefault(),...p,...ae,onPlaced:()=>G(!0),ref:g,style:{display:"flex",flexDirection:"column",outline:"none",...p.style},onKeyDown:V(p.onKeyDown,I=>{const M=I.ctrlKey||I.altKey||I.metaKey;if(I.key==="Tab"&&I.preventDefault(),!M&&I.key.length===1&&de(I.key),["ArrowUp","ArrowDown","Home","End"].includes(I.key)){let O=K().filter(E=>!E.disabled).map(E=>E.ref.current);if(["ArrowUp","End"].includes(I.key)&&(O=O.slice().reverse()),["ArrowUp","ArrowDown"].includes(I.key)){const E=I.target,R=O.indexOf(E);O=O.slice(R+1)}setTimeout(()=>B(O)),I.preventDefault()}})})})})})})});Jt.displayName=wr;var Cr="SelectItemAlignedPosition",en=a.forwardRef((t,n)=>{const{__scopeSelect:r,onPlaced:i,...o}=t,u=xe(be,r),x=ge(be,r),[f,d]=a.useState(null),[b,S]=a.useState(null),C=J(n,g=>S(g)),k=Be(r),N=a.useRef(!1),v=a.useRef(!0),{viewport:s,selectedItem:m,selectedItemText:p,focusSelectedItem:l}=x,h=a.useCallback(()=>{if(u.trigger&&u.valueNode&&f&&b&&s&&m&&p){const g=u.trigger.getBoundingClientRect(),P=b.getBoundingClientRect(),F=u.valueNode.getBoundingClientRect(),Q=p.getBoundingClientRect();if(u.dir!=="rtl"){const E=Q.left-P.left,R=F.left-E,oe=g.left-R,ie=g.width+oe,ye=Math.max(ie,P.width),ke=window.innerWidth-te,Ie=Pt(R,[te,Math.max(te,ke-ye)]);f.style.minWidth=ie+"px",f.style.left=Ie+"px"}else{const E=P.right-Q.right,R=window.innerWidth-F.right-E,oe=window.innerWidth-g.right-R,ie=g.width+oe,ye=Math.max(ie,P.width),ke=window.innerWidth-te,Ie=Pt(R,[te,Math.max(te,ke-ye)]);f.style.minWidth=ie+"px",f.style.right=Ie+"px"}const D=k(),K=window.innerHeight-te*2,q=s.scrollHeight,G=window.getComputedStyle(b),$=parseInt(G.borderTopWidth,10),B=parseInt(G.paddingTop,10),T=parseInt(G.borderBottomWidth,10),U=parseInt(G.paddingBottom,10),z=$+B+q+U+T,ce=Math.min(m.offsetHeight*5,z),de=window.getComputedStyle(s),ue=parseInt(de.paddingTop,10),W=parseInt(de.paddingBottom,10),Z=g.top+g.height/2-te,pe=K-Z,ae=m.offsetHeight/2,I=m.offsetTop+ae,M=$+B+I,L=z-M;if(M<=Z){const E=D.length>0&&m===D[D.length-1].ref.current;f.style.bottom="0px";const R=b.clientHeight-s.offsetTop-s.offsetHeight,oe=Math.max(pe,ae+(E?W:0)+R+T),ie=M+oe;f.style.height=ie+"px"}else{const E=D.length>0&&m===D[0].ref.current;f.style.top="0px";const oe=Math.max(Z,$+s.offsetTop+(E?ue:0)+ae)+L;f.style.height=oe+"px",s.scrollTop=M-Z+s.offsetTop}f.style.margin=`${te}px 0`,f.style.minHeight=ce+"px",f.style.maxHeight=K+"px",i==null||i(),requestAnimationFrame(()=>N.current=!0)}},[k,u.trigger,u.valueNode,f,b,s,m,p,u.dir,i]);fe(()=>h(),[h]);const[y,w]=a.useState();fe(()=>{b&&w(window.getComputedStyle(b).zIndex)},[b]);const j=a.useCallback(g=>{g&&v.current===!0&&(h(),l==null||l(),v.current=!1)},[h,l]);return e.jsx(Nr,{scope:r,contentWrapper:f,shouldExpandOnScrollRef:N,onScrollButtonChange:j,children:e.jsx("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:y},children:e.jsx(Y.div,{...o,ref:C,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});en.displayName=Cr;var jr="SelectPopperPosition",Je=a.forwardRef((t,n)=>{const{__scopeSelect:r,align:i="start",collisionPadding:o=te,...u}=t,x=ze(r);return e.jsx(xs,{...x,...u,ref:n,align:i,collisionPadding:o,style:{boxSizing:"border-box",...u.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)"}})});Je.displayName=jr;var[Nr,pt]=Ne(be,{}),et="SelectViewport",tn=a.forwardRef((t,n)=>{const{__scopeSelect:r,nonce:i,...o}=t,u=ge(et,r),x=pt(et,r),f=J(n,u.onViewportChange),d=a.useRef(0);return e.jsxs(e.Fragment,{children:[e.jsx("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:i}),e.jsx(Fe.Slot,{scope:r,children:e.jsx(Y.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:f,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:V(o.onScroll,b=>{const S=b.currentTarget,{contentWrapper:C,shouldExpandOnScrollRef:k}=x;if(k!=null&&k.current&&C){const N=Math.abs(d.current-S.scrollTop);if(N>0){const v=window.innerHeight-te*2,s=parseFloat(C.style.minHeight),m=parseFloat(C.style.height),p=Math.max(s,m);if(p<v){const l=p+N,h=Math.min(v,l),y=l-h;C.style.height=h+"px",C.style.bottom==="0px"&&(S.scrollTop=y>0?y:0,C.style.justifyContent="flex-end")}}}d.current=S.scrollTop})})})]})});tn.displayName=et;var nn="SelectGroup",[kr,Ir]=Ne(nn),Pr=a.forwardRef((t,n)=>{const{__scopeSelect:r,...i}=t,o=rt();return e.jsx(kr,{scope:r,id:o,children:e.jsx(Y.div,{role:"group","aria-labelledby":o,...i,ref:n})})});Pr.displayName=nn;var sn="SelectLabel",rn=a.forwardRef((t,n)=>{const{__scopeSelect:r,...i}=t,o=Ir(sn,r);return e.jsx(Y.div,{id:o.id,...i,ref:n})});rn.displayName=sn;var De="SelectItem",[_r,an]=Ne(De),on=a.forwardRef((t,n)=>{const{__scopeSelect:r,value:i,disabled:o=!1,textValue:u,...x}=t,f=xe(De,r),d=ge(De,r),b=f.value===i,[S,C]=a.useState(u??""),[k,N]=a.useState(!1),v=J(n,l=>{var h;return(h=d.itemRefCallback)==null?void 0:h.call(d,l,i,o)}),s=rt(),m=a.useRef("touch"),p=()=>{o||(f.onValueChange(i),f.onOpenChange(!1))};if(i==="")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 e.jsx(_r,{scope:r,value:i,disabled:o,textId:s,isSelected:b,onItemTextChange:a.useCallback(l=>{C(h=>h||((l==null?void 0:l.textContent)??"").trim())},[]),children:e.jsx(Fe.ItemSlot,{scope:r,value:i,disabled:o,textValue:S,children:e.jsx(Y.div,{role:"option","aria-labelledby":s,"data-highlighted":k?"":void 0,"aria-selected":b&&k,"data-state":b?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...x,ref:v,onFocus:V(x.onFocus,()=>N(!0)),onBlur:V(x.onBlur,()=>N(!1)),onClick:V(x.onClick,()=>{m.current!=="mouse"&&p()}),onPointerUp:V(x.onPointerUp,()=>{m.current==="mouse"&&p()}),onPointerDown:V(x.onPointerDown,l=>{m.current=l.pointerType}),onPointerMove:V(x.onPointerMove,l=>{var h;m.current=l.pointerType,o?(h=d.onItemLeave)==null||h.call(d):m.current==="mouse"&&l.currentTarget.focus({preventScroll:!0})}),onPointerLeave:V(x.onPointerLeave,l=>{var h;l.currentTarget===document.activeElement&&((h=d.onItemLeave)==null||h.call(d))}),onKeyDown:V(x.onKeyDown,l=>{var y;((y=d.searchRef)==null?void 0:y.current)!==""&&l.key===" "||(hr.includes(l.key)&&p(),l.key===" "&&l.preventDefault())})})})})});on.displayName=De;var Te="SelectItemText",ln=a.forwardRef((t,n)=>{const{__scopeSelect:r,className:i,style:o,...u}=t,x=xe(Te,r),f=ge(Te,r),d=an(Te,r),b=vr(Te,r),[S,C]=a.useState(null),k=J(n,p=>C(p),d.onItemTextChange,p=>{var l;return(l=f.itemTextRefCallback)==null?void 0:l.call(f,p,d.value,d.disabled)}),N=S==null?void 0:S.textContent,v=a.useMemo(()=>e.jsx("option",{value:d.value,disabled:d.disabled,children:N},d.value),[d.disabled,d.value,N]),{onNativeOptionAdd:s,onNativeOptionRemove:m}=b;return fe(()=>(s(v),()=>m(v)),[s,m,v]),e.jsxs(e.Fragment,{children:[e.jsx(Y.span,{id:d.textId,...u,ref:k}),d.isSelected&&x.valueNode&&!x.valueNodeHasChildren?Lt.createPortal(u.children,x.valueNode):null]})});ln.displayName=Te;var cn="SelectItemIndicator",dn=a.forwardRef((t,n)=>{const{__scopeSelect:r,...i}=t;return an(cn,r).isSelected?e.jsx(Y.span,{"aria-hidden":!0,...i,ref:n}):null});dn.displayName=cn;var tt="SelectScrollUpButton",un=a.forwardRef((t,n)=>{const r=ge(tt,t.__scopeSelect),i=pt(tt,t.__scopeSelect),[o,u]=a.useState(!1),x=J(n,i.onScrollButtonChange);return fe(()=>{if(r.viewport&&r.isPositioned){let f=function(){const b=d.scrollTop>0;u(b)};const d=r.viewport;return f(),d.addEventListener("scroll",f),()=>d.removeEventListener("scroll",f)}},[r.viewport,r.isPositioned]),o?e.jsx(mn,{...t,ref:x,onAutoScroll:()=>{const{viewport:f,selectedItem:d}=r;f&&d&&(f.scrollTop=f.scrollTop-d.offsetHeight)}}):null});un.displayName=tt;var nt="SelectScrollDownButton",pn=a.forwardRef((t,n)=>{const r=ge(nt,t.__scopeSelect),i=pt(nt,t.__scopeSelect),[o,u]=a.useState(!1),x=J(n,i.onScrollButtonChange);return fe(()=>{if(r.viewport&&r.isPositioned){let f=function(){const b=d.scrollHeight-d.clientHeight,S=Math.ceil(d.scrollTop)<b;u(S)};const d=r.viewport;return f(),d.addEventListener("scroll",f),()=>d.removeEventListener("scroll",f)}},[r.viewport,r.isPositioned]),o?e.jsx(mn,{...t,ref:x,onAutoScroll:()=>{const{viewport:f,selectedItem:d}=r;f&&d&&(f.scrollTop=f.scrollTop+d.offsetHeight)}}):null});pn.displayName=nt;
21var mn=a.forwardRef((t,n)=>{const{__scopeSelect:r,onAutoScroll:i,...o}=t,u=ge("SelectScrollButton",r),x=a.useRef(null),f=Be(r),d=a.useCallback(()=>{x.current!==null&&(window.clearInterval(x.current),x.current=null)},[]);return a.useEffect(()=>()=>d(),[d]),fe(()=>{var S;const b=f().find(C=>C.ref.current===document.activeElement);(S=b==null?void 0:b.ref.current)==null||S.scrollIntoView({block:"nearest"})},[f]),e.jsx(Y.div,{"aria-hidden":!0,...o,ref:n,style:{flexShrink:0,...o.style},onPointerDown:V(o.onPointerDown,()=>{x.current===null&&(x.current=window.setInterval(i,50))}),onPointerMove:V(o.onPointerMove,()=>{var b;(b=u.onItemLeave)==null||b.call(u),x.current===null&&(x.current=window.setInterval(i,50))}),onPointerLeave:V(o.onPointerLeave,()=>{d()})})}),Tr="SelectSeparator",hn=a.forwardRef((t,n)=>{const{__scopeSelect:r,...i}=t;return e.jsx(Y.div,{"aria-hidden":!0,...i,ref:n})});hn.displayName=Tr;var st="SelectArrow",Er=a.forwardRef((t,n)=>{const{__scopeSelect:r,...i}=t,o=ze(r),u=xe(st,r),x=ge(st,r);return u.open&&x.position==="popper"?e.jsx(gs,{...o,...i,ref:n}):null});Er.displayName=st;var Rr="SelectBubbleInput",fn=a.forwardRef(({__scopeSelect:t,value:n,...r},i)=>{const o=a.useRef(null),u=J(i,o),x=Vt(n);return a.useEffect(()=>{const f=o.current;if(!f)return;const d=window.HTMLSelectElement.prototype,S=Object.getOwnPropertyDescriptor(d,"value").set;if(x!==n&&S){const C=new Event("change",{bubbles:!0});S.call(f,n),f.dispatchEvent(C)}},[x,n]),e.jsx(Y.select,{...r,style:{...ds,...r.style},ref:u,defaultValue:n})});fn.displayName=Rr;function xn(t){return t===""||t===void 0}function gn(t){const n=ms(t),r=a.useRef(""),i=a.useRef(0),o=a.useCallback(x=>{const f=r.current+x;n(f),function d(b){r.current=b,window.clearTimeout(i.current),b!==""&&(i.current=window.setTimeout(()=>d(""),1e3))}(f)},[n]),u=a.useCallback(()=>{r.current="",window.clearTimeout(i.current)},[]);return a.useEffect(()=>()=>window.clearTimeout(i.current),[]),[r,o,u]}function vn(t,n,r){const o=n.length>1&&Array.from(n).every(b=>b===n[0])?n[0]:n,u=r?t.indexOf(r):-1;let x=Mr(t,Math.max(u,0));o.length===1&&(x=x.filter(b=>b!==r));const d=x.find(b=>b.textValue.toLowerCase().startsWith(o.toLowerCase()));return d!==r?d:void 0}function Mr(t,n){return t.map((r,i)=>t[(n+i)%t.length])}var Ar=$t,bn=qt,Or=Kt,Dr=Gt,yn=Yt,He=Zt,wn=tn,Sn=rn,Cn=on,Lr=ln,Fr=dn,jn=un,Nn=pn,kn=hn;function Br(t,n){t.prototype=Object.create(n.prototype),t.prototype.constructor=t,Xe(t,n)}var _t=Number.isNaN||function(n){return typeof n=="number"&&n!==n};function zr(t,n){return!!(t===n||_t(t)&&_t(n))}function Hr(t,n){if(t.length!==n.length)return!1;for(var r=0;r<t.length;r++)if(!zr(t[r],n[r]))return!1;return!0}function Ke(t,n){n===void 0&&(n=Hr);var r,i=[],o,u=!1;function x(){for(var f=[],d=0;d<arguments.length;d++)f[d]=arguments[d];return u&&r===this&&n(f,i)||(o=t.apply(this,f),u=!0,r=this,i=f),o}return x}var Ur=typeof performance=="object"&&typeof performance.now=="function",Tt=Ur?function(){return performance.now()}:function(){return Date.now()};function Et(t){cancelAnimationFrame(t.id)}function Vr(t,n){var r=Tt();function i(){Tt()-r>=n?t.call(null):o.id=requestAnimationFrame(i)}var o={id:requestAnimationFrame(i)};return o}var Ge=-1;function Rt(t){if(t===void 0&&(t=!1),Ge===-1||t){var n=document.createElement("div"),r=n.style;r.width="50px",r.height="50px",r.overflow="scroll",document.body.appendChild(n),Ge=n.offsetWidth-n.clientWidth,document.body.removeChild(n)}return Ge}var Ce=null;function Mt(t){if(t===void 0&&(t=!1),Ce===null||t){var n=document.createElement("div"),r=n.style;r.width="50px",r.height="50px",r.overflow="scroll",r.direction="rtl";var i=document.createElement("div"),o=i.style;return o.width="100px",o.height="100px",n.appendChild(i),document.body.appendChild(n),n.scrollLeft>0?Ce="positive-descending":(n.scrollLeft=1,n.scrollLeft===0?Ce="negative":Ce="positive-ascending"),document.body.removeChild(n),Ce}return Ce}var $r=150,Wr=function(n,r){return n};function qr(t){var n,r=t.getItemOffset,i=t.getEstimatedTotalSize,o=t.getItemSize,u=t.getOffsetForIndexAndAlignment,x=t.getStartIndexForOffset,f=t.getStopIndexForStartIndex,d=t.initInstanceProps,b=t.shouldResetStyleCacheOnItemSizeChange,S=t.validateProps;return n=function(C){Br(k,C);function k(v){var s;return s=C.call(this,v)||this,s._instanceProps=d(s.props,It(s)),s._outerRef=void 0,s._resetIsScrollingTimeoutId=null,s.state={instance:It(s),isScrolling:!1,scrollDirection:"forward",scrollOffset:typeof s.props.initialScrollOffset=="number"?s.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},s._callOnItemsRendered=void 0,s._callOnItemsRendered=Ke(function(m,p,l,h){return s.props.onItemsRendered({overscanStartIndex:m,overscanStopIndex:p,visibleStartIndex:l,visibleStopIndex:h})}),s._callOnScroll=void 0,s._callOnScroll=Ke(function(m,p,l){return s.props.onScroll({scrollDirection:m,scrollOffset:p,scrollUpdateWasRequested:l})}),s._getItemStyle=void 0,s._getItemStyle=function(m){var p=s.props,l=p.direction,h=p.itemSize,y=p.layout,w=s._getItemStyleCache(b&&h,b&&y,b&&l),j;if(w.hasOwnProperty(m))j=w[m];else{var g=r(s.props,m,s._instanceProps),P=o(s.props,m,s._instanceProps),F=l==="horizontal"||y==="horizontal",Q=l==="rtl",D=F?g:0;w[m]=j={position:"absolute",left:Q?void 0:D,right:Q?D:void 0,top:F?0:g,height:F?"100%":P,width:F?P:"100%"}}return j},s._getItemStyleCache=void 0,s._getItemStyleCache=Ke(function(m,p,l){return{}}),s._onScrollHorizontal=function(m){var p=m.currentTarget,l=p.clientWidth,h=p.scrollLeft,y=p.scrollWidth;s.setState(function(w){if(w.scrollOffset===h)return null;var j=s.props.direction,g=h;if(j==="rtl")switch(Mt()){case"negative":g=-h;break;case"positive-descending":g=y-l-h;break}return g=Math.max(0,Math.min(g,y-l)),{isScrolling:!0,scrollDirection:w.scrollOffset<g?"forward":"backward",scrollOffset:g,scrollUpdateWasRequested:!1}},s._resetIsScrollingDebounced)},s._onScrollVertical=function(m){var p=m.currentTarget,l=p.clientHeight,h=p.scrollHeight,y=p.scrollTop;s.setState(function(w){if(w.scrollOffset===y)return null;var j=Math.max(0,Math.min(y,h-l));return{isScrolling:!0,scrollDirection:w.scrollOffset<j?"forward":"backward",scrollOffset:j,scrollUpdateWasRequested:!1}},s._resetIsScrollingDebounced)},s._outerRefSetter=function(m){var p=s.props.outerRef;s._outerRef=m,typeof p=="function"?p(m):p!=null&&typeof p=="object"&&p.hasOwnProperty("current")&&(p.current=m)},s._resetIsScrollingDebounced=function(){s._resetIsScrollingTimeoutId!==null&&Et(s._resetIsScrollingTimeoutId),s._resetIsScrollingTimeoutId=Vr(s._resetIsScrolling,$r)},s._resetIsScrolling=function(){s._resetIsScrollingTimeoutId=null,s.setState({isScrolling:!1},function(){s._getItemStyleCache(-1,null)})},s}k.getDerivedStateFromProps=function(s,m){return Qr(s,m),S(s),null};var N=k.prototype;return N.scrollTo=function(s){s=Math.max(0,s),this.setState(function(m){return m.scrollOffset===s?null:{scrollDirection:m.scrollOffset<s?"forward":"backward",scrollOffset:s,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},N.scrollToItem=function(s,m){m===void 0&&(m="auto");var p=this.props,l=p.itemCount,h=p.layout,y=this.state.scrollOffset;s=Math.max(0,Math.min(s,l-1));var w=0;if(this._outerRef){var j=this._outerRef;h==="vertical"?w=j.scrollWidth>j.clientWidth?Rt():0:w=j.scrollHeight>j.clientHeight?Rt():0}this.scrollTo(u(this.props,s,m,y,this._instanceProps,w))},N.componentDidMount=function(){var s=this.props,m=s.direction,p=s.initialScrollOffset,l=s.layout;if(typeof p=="number"&&this._outerRef!=null){var h=this._outerRef;m==="horizontal"||l==="horizontal"?h.scrollLeft=p:h.scrollTop=p}this._callPropsCallbacks()}
vendor: 2,302 bytes, line 21
21,N.componentDidUpdate=function(){var s=this.props,m=s.direction,p=s.layout,l=this.state,h=l.scrollOffset,y=l.scrollUpdateWasRequested;if(y&&this._outerRef!=null){var w=this._outerRef;if(m==="horizontal"||p==="horizontal")if(m==="rtl")switch(Mt()){case"negative":w.scrollLeft=-h;break;case"positive-ascending":w.scrollLeft=h;break;default:var j=w.clientWidth,g=w.scrollWidth;w.scrollLeft=g-j-h;break}else w.scrollLeft=h;else w.scrollTop=h}this._callPropsCallbacks()},N.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&Et(this._resetIsScrollingTimeoutId)},N.render=function(){var s=this.props,m=s.children,p=s.className,l=s.direction,h=s.height,y=s.innerRef,w=s.innerElementType,j=s.innerTagName,g=s.itemCount,P=s.itemData,F=s.itemKey,Q=F===void 0?Wr:F,D=s.layout,K=s.outerElementType,q=s.outerTagName,G=s.style,$=s.useIsScrolling,B=s.width,T=this.state.isScrolling,U=l==="horizontal"||D==="horizontal",z=U?this._onScrollHorizontal:this._onScrollVertical,ce=this._getRangeToRender(),de=ce[0],ue=ce[1],W=[];if(g>0)for(var Z=de;Z<=ue;Z++)W.push(a.createElement(m,{data:P,key:Q(Z,P),index:Z,isScrolling:$?T:void 0,style:this._getItemStyle(Z)}));var pe=i(this.props,this._instanceProps);return a.createElement(K||q||"div",{className:p,onScroll:z,ref:this._outerRefSetter,style:qs({position:"relative",height:h,width:B,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:l},G)},a.createElement(w||j||"div",{children:W,ref:y,style:{height:U?"100%":pe,pointerEvents:T?"none":void 0,width:U?pe:"100%"}}))},N._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered=="function"){var s=this.props.itemCount;if(s>0){var m=this._getRangeToRender(),p=m[0],l=m[1],h=m[2],y=m[3];this._callOnItemsRendered(p,l,h,y)}}if(typeof this.props.onScroll=="function"){var w=this.state,j=w.scrollDirection,g=w.scrollOffset,P=w.scrollUpdateWasRequested;this._callOnScroll(j,g,P)}},N._getRangeToRender=function(){var s=this.props,m=s.itemCount,p=s.overscanCount,l=this.state,h=l.isScrolling,y=l.scrollDirection,w=l.scrollOffset;if(m===0)return[0,0,0,0];var j=x(this.props,w,this._instanceProps),g=f(this.props,j,w,this._instanceProps),P=!h||y==="backward"?Math.max(1,p):1,F=!h||y==="forward"?Math.max(1,p):1;return[Math.max(0,j-P),Math.max(0,Math.min(m-1,g+F)),j,g]},k}
21(a.PureComponent),n.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},n}var Qr=function(n,r){n.children,n.direction,n.height,n.layout,n.innerTagName,n.outerTagName,n.width,r.instance},Kr=qr({getItemOffset:function(n,r){var i=n.itemSize;return r*i},getItemSize:function(n,r){var i=n.itemSize;return i},getEstimatedTotalSize:function(n){var r=n.itemCount,i=n.itemSize;return i*r},getOffsetForIndexAndAlignment:function(n,r,i,o,u,x){var f=n.direction,d=n.height,b=n.itemCount,S=n.itemSize,C=n.layout,k=n.width,N=f==="horizontal"||C==="horizontal",v=N?k:d,s=Math.max(0,b*S-v),m=Math.min(s,r*S),p=Math.max(0,r*S-v+S+x);switch(i==="smart"&&(o>=p-v&&o<=m+v?i="auto":i="center"),i){case"start":return m;case"end":return p;case"center":{var l=Math.round(p+(m-p)/2);return l<Math.ceil(v/2)?0:l>s+Math.floor(v/2)?s:l}case"auto":default:return o>=p&&o<=m?o:o<p?p:m}},getStartIndexForOffset:function(n,r){var i=n.itemCount,o=n.itemSize;return Math.max(0,Math.min(i-1,Math.floor(r/o)))},getStopIndexForStartIndex:function(n,r,i){var o=n.direction,u=n.height,x=n.itemCount,f=n.itemSize,d=n.layout,b=n.width,S=o==="horizontal"||d==="horizontal",C=r*f,k=S?b:u,N=Math.ceil((k+i-C)/f);return Math.max(0,Math.min(x-1,r+N-1))},initInstanceProps:function(n){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(n){n.itemSize}});const Gr=Ar,Yr=Or,In=a.forwardRef(({className:t,children:n,showIcon:r=!0,...i},o)=>e.jsxs(bn,{ref:o,className:H("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm r
21ing-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),...i,children:[n,r&&e.jsx(Dr,{asChild:!0,children:e.jsx(Ht,{className:"h-4 w-4 opacity-50"})})]}));In.displayName=bn.displayName;const Pn=a.forwardRef(({className:t,...n},r)=>e.jsx(jn,{ref:r,className:H("flex cursor-default items-center justify-center py-1",t),...n,children:e.jsx(or,{className:"h-4 w-4"})}));Pn.displayName=jn.displayName;const _n=a.forwardRef(({className:t,...n},r)=>e.jsx(Nn,{ref:r,className:H("flex cursor-default items-center justify-center py-1",t),...n,children:e.jsx(Ht,{className:"h-4 w-4"})}));_n.displayName=Nn.displayName;const Tn=a.forwardRef(({className:t,children:n,position:r="popper",...i},o)=>e.jsx(yn,{children:e.jsxs(He,{ref:o,className:H("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md 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",r==="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:r,...i,children:[e.jsx(Pn,{}),e.jsx(wn,{className:H("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:n}),e.jsx(_n,{})]})}));Tn.displayName=He.displayName;const Zr=a.forwardRef(({className:t,position:n="popper",itemCount:r,itemSize:i,height:o,data:u,...x},f)=>{const d=a.useRef(null);return e.jsx(yn,{children:e.jsx(He,{ref:f,className:H("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md 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",n==="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:n,...x,children:e.jsx(wn,{className:H("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e.jsx(Kr,{ref:d,height:o,width:"100%",itemCount:r,itemSize:i,children:({index:b,style:S})=>e.jsx(e.Fragment,{children:e.jsx(mt,{value:u[b].value,style:S,children:u[b].label},u[b].value)})})})})})});Zr.displayName=He.displayName;const Xr=a.forwardRef(({className:t,...n},r)=>e.jsx(Sn,{ref:r,className:H("py-1.5 pl-8 pr-2 text-sm font-semibold",t),...n}));Xr.displayName=Sn.displayName;const mt=a.forwardRef(({className:t,children:n,...r},i)=>e.jsxs(Cn,{ref:i,className:H("relative flex w-full cursor-default select-none items-center rounded-sm px-6 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...r,children:[e.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:e.jsx(Fr,{children:e.jsx(Ft,{className:"h-4 w-4"})})}),e.jsx(Lr,{children:n})]}));mt.displayName=Cn.displayName;const Jr=a.forwardRef(({className:t,...n},r)=>e.jsx(kn,{ref:r,className:H("-mx-1 my-1 h-px bg-muted",t),...n}));Jr.displayName=kn.displayName;var Ue="Checkbox",[ea,Ma]=Dt(Ue),[ta,ht]=ea(Ue);function na(t){const{__scopeCheckbox:n,checked:r,children:i,defaultChecked:o,disabled:u,form:x,name:f,onCheckedChange:d,required:b,value:S="on",internal_do_not_use_render:C}=t,[k,N]=Ze({prop:r,defaultProp:o??!1,onChange:d,caller:Ue}),[v,s]=a.useState(null),[m,p]=a.useState(null),l=a.useRef(!1),h=v?!!x||!!v.closest("form"):!0,y={checked:k,disabled:u,setChecked:N,control:v,setControl:s,name:f,form:x,value:S,hasConsumerStoppedPropagationRef:l,required:b,defaultChecked:he(o)?!1:o,isFormControl:h,bubbleInput:m,setBubbleInput:p};return e.jsx(ta,{scope:n,...y,children:sa(C)?C(y):i})}var En="CheckboxTrigger",Rn=a.forwardRef(({__scopeCheckbox:t,onKeyDown:n,onClick:r,...i},o)=>{const{control:u,value:x,disabled:f,checked:d,required:b,setControl:S,setChecked:C,hasConsumerStoppedPropagationRef:k,isFormControl:N,bubbleInput:v}=ht(En,t),s=J(o,S),m=a.useRef(d);return a.useEffect(()=>{const p=u==null?void 0:u.form;if(p){const l=()=>C(m.current);return p.addEventListener("reset",l),()=>p.removeEventListener("reset",l)}},[u,C]),e.jsx(Y.button,{type:"button",role:"checkbox","aria-checked":he(d)?"mixed":d,"aria-required":b,"data-state":Ln(d),"data-disabled":f?"":void 0,disabled:f,value:x,...i,ref:s,onKeyDown:V(n,p=>{p.key==="Enter"&&p.preventDefault()}),onClick:V(r,p=>{C(l=>he(l)?!0:!l),v&&N&&(k.current=p.isPropagationStopped(),k.current||p.stopPropagation())})})});Rn.displayName=En;
21var ft=a.forwardRef((t,n)=>{const{__scopeCheckbox:r,name:i,checked:o,defaultChecked:u,required:x,disabled:f,value:d,onCheckedChange:b,form:S,...C}=t;return e.jsx(na,{__scopeCheckbox:r,checked:o,defaultChecked:u,disabled:f,required:x,onCheckedChange:b,name:i,form:S,value:d,internal_do_not_use_render:({isFormControl:k})=>e.jsxs(e.Fragment,{children:[e.jsx(Rn,{...C,ref:n,__scopeCheckbox:r}),k&&e.jsx(Dn,{__scopeCheckbox:r})]})})});ft.displayName=Ue;var Mn="CheckboxIndicator",An=a.forwardRef((t,n)=>{const{__scopeCheckbox:r,forceMount:i,...o}=t,u=ht(Mn,r);return e.jsx(vs,{present:i||he(u.checked)||u.checked===!0,children:e.jsx(Y.span,{"data-state":Ln(u.checked),"data-disabled":u.disabled?"":void 0,...o,ref:n,style:{pointerEvents:"none",...t.style}})})});An.displayName=Mn;var On="CheckboxBubbleInput",Dn=a.forwardRef(({__scopeCheckbox:t,...n},r)=>{const{control:i,hasConsumerStoppedPropagationRef:o,checked:u,defaultChecked:x,required:f,disabled:d,name:b,value:S,form:C,bubbleInput:k,setBubbleInput:N}=ht(On,t),v=J(r,N),s=Vt(u),m=bs(i);a.useEffect(()=>{const l=k;if(!l)return;const h=window.HTMLInputElement.prototype,w=Object.getOwnPropertyDescriptor(h,"checked").set,j=!o.current;if(s!==u&&w){const g=new Event("click",{bubbles:j});l.indeterminate=he(u),w.call(l,he(u)?!1:u),l.dispatchEvent(g)}},[k,s,u,o]);const p=a.useRef(he(u)?!1:u);return e.jsx(Y.input,{type:"checkbox","aria-hidden":!0,defaultChecked:x??p.current,required:f,disabled:d,name:b,value:S,form:C,...n,tabIndex:-1,ref:v,style:{...n.style,...m,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Dn.displayName=On;function sa(t){return typeof t=="function"}function he(t){return t==="indeterminate"}function Ln(t){return he(t)?"indeterminate":t?"checked":"unchecked"}const Fn=a.forwardRef(({className:t,...n},r)=>e.jsx(ft,{ref:r,className:H("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",t),...n,children:e.jsx(An,{className:H("flex justify-center items-center text-current"),children:e.jsx(Ft,{className:"w-3 h-3"})})}));Fn.displayName=ft.displayName;function ra({open:t,onOpenChange:n,onConfirm:r,isLoading:i,totalPrice:o}){const u=Ee("pricing"),{address:x,packageApi:f}=at(),d=Ee("checkout"),[b,S]=a.useState(!1),[C,k]=a.useState([]),[N,v]=a.useState(""),[s,m]=a.useState(null),[p,l]=a.useState(!0),h=a.useMemo(()=>Array.from(new Set(C.filter(g=>g.isOpen===1).map(g=>g.tokenName.toLowerCase()))),[C]);a.useEffect(()=>{!s&&h.length>0&&m(h[0])},[h,s]);const y=a.useMemo(()=>C.filter(g=>g.isOpen===1&&g.tokenName.toLowerCase()===s),[s,C]);a.useEffect(()=>{if(y.length>0){const g=y[0];v(`${g.chainId}-${g.tokenAddress}`)}},[y]),a.useEffect(()=>{async function g(){S(!0);try{const P=await f.getPaymentChainToken();k(P)}catch(P){console.error("Failed to fetch account info",P)}finally{S(!1)}}t?g():(k([]),v(""),m(null),l(!0))},[t]);const w=()=>{const g=C.find(P=>`${P.chainId}-${P.tokenAddress}`===N);g&&r(g)},j=a.useMemo(()=>y.find(g=>`${g.chainId}-${g.tokenAddress}`===N),[y,N]);return e.jsx(e.Fragment,{children:e.jsx(it,{open:t,onOpenChange:n,children:e.jsxs(lt,{children:[e.jsx(ct,{className:"fixed inset-0 bg-[#05050533] backdrop-blur-[4px] z-80",style:{zIndex:70}}),e.jsxs(dt,{className:"fixed top-1/2 left-1/2 py-2 -translate-x-1/2 -translate-y-1/2 w-[calc(100vw-32px)] px-4 py-4 md:w-[408px] bg-white rounded-[24px] z-80",style:{zIndex:70},onInteractOutside:g=>g.preventDefault(),onEscapeKeyDown:g=>g.preventDefault(),children:[e.jsxs(ut,{className:"flex items-center justify-between text-[#1d1c1b] font-medium text-[18px] leading-[28px] pb-2 border-b border-[#e5e7eb]",children:[d("title"),e.jsx("button",{onClick:()=>n(!1),className:"",children:e.jsx(ys,{size:20,className:"text-[#858481]"})})]}),b||!h.length?e.jsx("div",{className:"h-[300px] flex items-center justify-center",children:e.jsx(Ut,{className:"w-6 h-6 text-[#858481] animate-spin"})}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex items-center mt-4",children:[e.jsx("span",{className:"text-sm text-[#646362]",children:u("totalBill")}),e.jsxs("span",{className:"ml-8 text-[#1d1c1b] font-medium text-[16px]",children:["$",o]})]}),e.jsx("div",{className:"mt-4 text-sm text-[#646362]",children:d("payWith")}),e.jsx("div",{className:"flex gap-3 mt-2",children:h.map(g=>{const P=s===g;return e.jsxs("div",{onClick:()=>m(g),className:` 22 flex-1 flex items-center gap-2 rounded-[12px] py-2 pl-4 cursor-pointer border text-[#1d1c1b] font-medium text-[16px] 23 ${P?"bg-[#2AAE6714] border-[#2aae67]":"border-[#0A0A0A1A]"} 24 `,children:[e.jsx("img",{src:`https://pub-resource.dappos.com/tokenIcon/${g.toLowerCase()}.png`,width:20,height:20,alt:g}),e.jsx("span",{className:"uppercase",children:g})]},g)})}),e.jsxs("div",{className:"py-4 space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(Nt,{htmlFor:"payment",className:"font-normal text-sm text-[#646362]",children:d("paymentNetwork")}),e.jsxs(Gr,{value:N,onValueChange:v,children:[e.jsx(In,{id:"payment",className:"rounded-[12px] px-4 py-2",children:j?e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("img",{src:`https://pub-resource.dappos.com/chainLogo/chain_${Number(j.chainId)}_icon.png`,width:20,height:20,alt:_e[j.chainId]??"Unknown Chain"}),e.jsx("span",{className:"text-[#1d1c1b] font-medium text-[16px]",children:_e[j.chainId]??"Unknown Chain"})]}):e.jsx(Yr,{})}
24),e.jsx(Tn,{className:"rounded-[12px] z-[90]",children:y.map(g=>e.jsx(mt,{value:`${g.chainId}-${g.tokenAddress}`,children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("img",{src:`https://pub-resource.dappos.com/chainLogo/chain_${Number(g.chainId)}_icon.png`,width:20,height:20,alt:_e[g.chainId]??"Unknown Chain"}),e.jsx("span",{children:_e[g.chainId]??"Unknown Chain"})]})},`${g.chainId}-${g.tokenAddress}`))})]})]}),j&&e.jsxs("div",{className:"space-y-2 text-sm",children:[e.jsxs("div",{className:"flex justify-between",children:[e.jsxs("span",{className:"text-muted-foreground",children:[d("paymentNetwork"),":"]}),e.jsx("span",{className:"font-medium",children:_e[j.chainId]??"Unknown Chain"})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsxs("span",{className:"text-muted-foreground",children:[d("payToken"),":"]}),e.jsx("span",{className:"font-medium",children:j.tokenName})]})]})]}),e.jsx("div",{className:"mb-4",children:e.jsxs(Nt,{htmlFor:"payment-agreement",className:"flex items-start gap-2 text-[12px] font-medium text-[#646362] cursor-pointer select-none",children:[e.jsx(Fn,{id:"payment-agreement",className:"mt-0.5 border-[#D6D5D4] rounded-[5px] data-[state=checked]:bg-[#2aae67] data-[state=checked]:border-[#2aae67] text-white",checked:p,onCheckedChange:g=>{l(g===!0)}}),e.jsxs("span",{className:"leading-5",children:[d("agreementPrefix")," ",e.jsx("a",{href:"https://dappos.com/legal/subscriber-statement",onClick:g=>{g.stopPropagation()},target:"_blank",rel:"noopener noreferrer",className:"text-[#2aae67] underline decoration-dotted hover:opacity-80",children:d("termsOfService")})," ",d("agreementAnd")," ",e.jsx("a",{href:"https://dappos.com/legal/privacy-policy",onClick:g=>{g.stopPropagation()},target:"_blank",rel:"noopener noreferrer",className:"text-[#2aae67] underline decoration-dotted hover:opacity-80",children:d("privacyPolicy")}),d("agreementSuffix")]})]})}),e.jsxs("div",{className:"flex gap-3 text-sm font-medium",children:[e.jsx(re,{className:"flex-1 py-3 rounded-[12px] disabled:bg-[#1A1A1980]",onClick:w,disabled:!N||i||!p,children:i?u("processing"):d("toPayment")}),e.jsx(re,{className:"flex-1 py-3 rounded-[12px]",variant:"outline",onClick:()=>n(!1),disabled:i,children:d("cancel")})]})]})]})]})})})}const aa=(t,n)=>e.jsxs("svg",{width:"1.2em",height:"1.2em",viewBox:"0 0 56 56",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,...t,children:[e.jsx("path",{d:"M4.66406 19.8438H51.3307",stroke:"#1D1C1B",strokeWidth:2,strokeMiterlimit:10,strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M14 38.5117H18.6667",stroke:"#1D1C1B",strokeWidth:2,strokeMiterlimit:10,strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M24.5 38.5117H33.8333",stroke:"#1D1C1B",strokeWidth:2,strokeMiterlimit:10,strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M15.0241 8.17969H40.9474C49.2541 8.17969 51.3307 10.233 51.3307 18.423V37.5797C51.3307 45.7697 49.2541 47.823 40.9707 47.823H15.0241C6.74073 47.8464 4.66406 45.793 4.66406 37.603V18.423C4.66406 10.233 6.74073 8.17969 15.0241 8.17969Z",stroke:"#1D1C1B",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})]}),oa=a.forwardRef(aa),ia=(t,n)=>e.jsxs("svg",{width:"1.2em",height:"1.2em",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,...t,children:[e.jsx("path",{d:"M12.6693 10.6667V4.33333C12.6693 3.6 12.0693 3 11.3359 3H8.33594",stroke:"currentColor",strokeWidth:1.33,strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M10 1.33203L8 2.9987L10 4.66536",stroke:"currentColor",strokeWidth:1.33,strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M3.33594 6V10.6667",stroke:"currentColor",strokeWidth:1.33,strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M3.5026 5.66536C4.69922 5.66536 5.66927 4.69531 5.66927 3.4987C5.66927 2.30208 4.69922 1.33203 3.5026 1.33203C2.30599 1.33203 1.33594 2.30208 1.33594 3.4987C1.33594 4.69531 2.30599 5.66536 3.5026 5.66536Z",stroke:"currentColor",strokeWidth:1.33,strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M3.33594 14.668C4.44051 14.668 5.33594 13.7725 5.33594 12.668C5.33594 11.5634 4.44051 10.668 3.33594 10.668C2.23137 10.668 1.33594 11.5634 1.33594 12.668C1.33594 13.7725 2.23137 14.668 3.33594 14.668Z",stroke:"currentColor",strokeWidth:1.33,strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M12.6641 14.668C13.7686 14.668 14.6641 13.7725 14.6641 12.668C14.6641 11.5634 13.7686 10.668 12.6641 10.668C11.5595 10.668 10.6641 11.5634 10.6641 12.668C10.6641 13.7725 11.5595 14.668 12.6641 14.668Z",stroke:"currentColor",strokeWidth:1.33,strokeLinecap:"round",strokeLinejoin:"round"})]}),At=a.forwardRef(ia),la="https://t.me/officialdappos/1",Ye="9i07cz";function ca({className:t,initialCode:n="",onSuccess:r,showDefaultInviteSkip:i=!1}){var G,$,B;const o=Ee("invite"),{address:u,packageApi:x,refreshUserData:f,session:d}
24=at(),b=ws(),S=ot(),[C,k]=a.useState(n||(i?Ye:"")),[N,v]=a.useState(!1),[s,m]=a.useState(null),[p,l]=a.useState(!1),h=C.trim(),y=Bt({mutationFn:async T=>{if(!u)throw new Error("Please connect your wallet first");return await x.acceptInvite({eoa:u,code:T}),T},onSuccess:async()=>{u&&(b.invalidateQueries({queryKey:["accountInfo",u]}),b.invalidateQueries({queryKey:["activationCode",u]}),b.invalidateQueries({queryKey:["pendingOrders",u,0]}),b.invalidateQueries({queryKey:["active-plan",u]}),b.invalidateQueries({queryKey:["purchase-permission",u]}),b.invalidateQueries({queryKey:["user-profile",u]}),await Promise.all([b.refetchQueries({queryKey:["activationCode",u]}),b.refetchQueries({queryKey:["accountInfo",u]})]),f()),k(""),r==null||r()},onError:T=>{if(zt(T)&&T.eCode){ne(T.eMsg??o("invalidCode"));return}ne(T instanceof Error?T.message:o("invalidCode"))}}),w=a.useMemo(()=>!d||!h||y.isPending||p,[d,h,y.isPending,p]),j=((G=s==null?void 0:s.avatarUrl)==null?void 0:G.trim())||Ss,g=(($=s==null?void 0:s.eoaAddress)==null?void 0:$.trim())||o("verifyDialogAddressPlaceholder"),P=(B=s==null?void 0:s.eoaAddress)!=null&&B.trim()&&S?Cs(s.eoaAddress,6,4):g,F=(s?Js({nickname:s.nickname,address:s.eoaAddress}):"")||o("verifyDialogNicknamePlaceholder");async function Q(T=h){const U=T.trim();if(!(!d||!U||y.isPending||p)){l(!0);try{const z=await x.getUserByInviteCode({inviteCode:U});if(!z){ne(o("verifyDialogInvalidInvite"));return}m(z),v(!0)}catch(z){ne(z instanceof Error?z.message:o("verifyDialogFetchError"))}finally{l(!1)}}}function D(){v(!1),y.mutate(h)}function K(){k(Ye),y.mutate(Ye)}const q=e.jsx("div",{className:H(w&&"cursor-not-allowed"),children:e.jsxs(re,{onClick:()=>void Q(),disabled:w,className:H("w-full sm:w-[120px] py-2 rounded-[10px] text-sm h-auto disabled:opacity-50",w?y.isPending?"bg-[#2aae67]":"bg-[#1a1819]":"bg-[#2aae67]","hover:bg-[#1b9658]"),children:[y.isPending||p?e.jsx(js,{className:"mr-2 w-4 h-4 animate-spin"}):null,o("verify")]})});return e.jsxs("div",{className:t,children:[e.jsx("div",{className:"text-[18px] md:text-[28px] text-start md:text-center font-semibold text-[#34322d]",children:o("title_inviteCode")}),e.jsx("div",{className:"mt-2 text-[12px] text-start md:text-center md:text-[18px] text-[#858481]",children:o("completeAccessSubtitle_invite")}),e.jsxs("div",{className:"hidden md:flex mt-4 md:mt-6 flex-col sm:flex-row items-stretch sm:items-center gap-3",children:[e.jsx(Ns,{className:"h-10 px-4 border border-[#e5e7eb] rounded-[10px] text-[#000] font-medium text-sm placeholder:text-[#b9b9b7]",value:C,placeholder:o("enterInviteCodePlaceholder"),onChange:T=>k(T.target.value)}),q,i&&e.jsx(re,{type:"button",onClick:K,disabled:!d||y.isPending||p,className:"w-full sm:w-[120px] py-2 rounded-[10px] border border-[#2aae67] bg-white text-sm h-auto text-[#2aae67] hover:bg-[#2aae670A] disabled:opacity-50",children:o("skip")})]}),e.jsxs("div",{className:"md:hidden mt-4 border border-[#e9ecef] bg-white rounded-3xl pt-4 pl-4 pb-3 pr-3 shadow-[0px_12px_32px_0px_#00000005]",children:[e.jsx(Xs,{value:C,placeholder:o("enterInviteCodePlaceholder"),onChange:T=>k(T.target.value),className:"w-full bg-transparent border-none",rows:1,maxHeight:64,style:{minHeight:"64px"}}),e.jsxs("div",{className:"flex items-center justify-end gap-2 mt-2",children:[q,i&&e.jsx(re,{type:"button",onClick:K,disabled:!d||y.isPending||p,className:"h-9 rounded-[10px] border border-[#2aae67] bg-white px-4 text-sm text-[#2aae67] hover:bg-[#2aae670A] disabled:opacity-50",children:o("skip")})]})]}),e.jsxs("div",{className:"mt-7 md:mt-8 flex flex-wrap items-center justify-center gap-x-1.5 gap-y-1 text-center text-[14px] leading-[22px] text-[#535350] md:text-[16px] md:leading-6",children:[e.jsx("span",{children:o("telegramTrialPrefix")}),e.jsx(er,{className:"h-5 w-5 shrink-0 text-[#2aae67] [&_path]:!stroke-[#2aae67]"}),e.jsx("a",{href:la,target:"_blank",rel:"noopener noreferrer",className:"font-medium text-[#2aae67] underline underline-offset-4",children:o("telegramTrialLink")}),e.jsx("span",{children:o("telegramTrialSuffix")})]}),e.jsx(Ks,{open:N,onOpenChange:v,onConfirm:D,title:o("verifyDialogTitle"),lead:o("verifyDialogLead"),avatarUrl:j,nickname:F,addressDisplay:P,addressCopy:g,cancelText:o("verifyDialogCancel"),confirmText:o("verifyDialogConfirm"),isConfirmDisabled:p,isPending:y.isPending})]})}const je=({children:t,content:n})=>ot()?e.jsxs(Vs,{children:[e.jsx($s,{asChild:!0,children:t}),e.jsx(Ws,{className:"bg-[#34322d] text-white text-[13px] font-medium px-2 py-1 rounded-[8px] z-[9999] max-w-[260px] break-words whitespace-normal",children:n})]}):e.jsx(_s,{delayDuration:100,children:e.jsxs(Ts,{children:[e.jsx(Es,{asChild:!0,children:t}),e.jsx(Rs,{sideOffset:4,side:"top",align:"center",className:"bg-[#34322d] text-white text-[13px] font-medium px-2 py-1 rounded-[8px] z-60 max-w-[260px] break-words whitespace-normal",children:n})]})});function da(){var xt,gt;const t=Ee("pricing"),n=Ee("checkout"),{address:r,packageApi:i,accountInfo:o,activePlan:u,hasBillingHistory:x,session:f,activationCode:d,hasAvailableCredit:b,isActivityPendingStatusLoading:S,isActivityPendingUser:C,isAppleGreenMode:k,purchasePermission:N}=at(),[v,s]=a.useState("yearly"),m=(o==null?void 0:o.currentMultiplier)??0,p=u.some(c=>
24c.packageId===6&&c.packageAmount>=5&&c.expired===0),l=m>0&&p,h=l?1:0,y=100,[w,j]=a.useState(0),g=l?w:w+5,[P,F]=a.useState(null),[Q,D]=a.useState(!1),[K,q]=a.useState(!1),[G,$]=a.useState(!1),[B,T]=a.useState(""),[U,z]=a.useState("0"),[ce,de]=a.useState(0),{enhancedPush:ue}=Hs(),{data:W=[]}=Qs(),[Z,pe]=a.useState({}),ae=ot(),I=ks(),{pendingPricingPurchase:M,setPendingPricingPurchase:L}=I,O="professional",[E,R]=a.useState(O),[oe,ie]=a.useState(!1),ye=Ms({activationCode:d,hasInviteEntry:oe,hasAvailableCredit:b,isActivityPendingStatusLoading:S,isActivityPendingUser:C,purchasePermission:N}),ke=N===1&&!ye,[Ie,Bn]=a.useState(!1),[zn,Pe]=a.useState(!1),[ma,Re]=a.useState("individual"),[Hn,Me]=a.useState(null),ee=l?"business":Hn,Un=c=>c.id==="individualStandard"||c.id==="individualLight"?"individual":"business",{data:Ve,error:$e,isPending:Vn,isFetching:$n}=Is({queryKey:["packages"],queryFn:()=>i.getPackages(),staleTime:300*1e3,gcTime:600*1e3,refetchOnWindowFocus:!1}),We=a.useMemo(()=>Ve?tr(Ve):null,[Ve]),le=a.useMemo(()=>{if(!We||!ee)return null;const c=We.filter(_=>{const A=_.id==="individualStandard"||_.id==="individualLight";return ee==="individual"&&!A||ee==="business"&&A?!1:ee==="business"&&l?_.id==="professional"&&v==="yearly":!(!_.prices[v]||!_._id[v]||_.id==="professional"&&v!=="yearly")});return ee==="individual"?[...c].sort((_,A)=>_.prices[v]-A.prices[v]):v!=="semiannually"?c:[...c].sort((_,A)=>{const se=X=>X==="businessLite"?0:X==="light"?1:X==="starter"?2:3;return se(_.id)-se(A.id)})},[We,ee,v,l]),Wn=Vn||$n;a.useEffect(()=>{$e&&console.error("Failed to fetch packages",$e)},[$e]);const qn=c=>{switch(c){case"monthly":return t("billedMonthly");case"quarterly":return t("billedQuarterly");case"semiannually":return t("billedSemiannually");case"yearly":return t("billedYearly")}};a.useEffect(()=>{l&&s("yearly"),j(l?1:0)},[l]),a.useEffect(()=>{ee==="individual"&&!["monthly","quarterly"].includes(v)&&s("monthly"),ee==="business"&&v==="monthly"&&s("yearly")},[v,ee]),a.useEffect(()=>{z(String(w))},[w]),a.useEffect(()=>{const c=()=>{ie(Ps({search:window.location.search,hash:window.location.hash}))};return c(),window.addEventListener("hashchange",c),()=>window.removeEventListener("hashchange",c)},[]),a.useEffect(()=>{const c=M;(c==null?void 0:c.source)!=="purchaseBindInvite"||c.status!=="restore"||(s(c.billingPeriod),Re(c.audience),Me(c.audience),R(c.planId),Pe(!1),L(null))},[M,L]),a.useEffect(()=>{const c=M;if((c==null?void 0:c.source)==="checkoutBack"){if(l){L(null);return}s(c.billingPeriod),Re(c.audience),Me(c.audience),R(c.planId),Pe(!1),L(null)}},[l,M,L]),a.useEffect(()=>{le!=null&&le.length&&(E&&le.some(c=>c.id===E)||R(le[0].id))},[E,le]);const Ae=Bt({mutationFn:async({plan:c,paymentOption:_})=>{if(!r)throw new Error("Please connect your wallet first");const A=c.id==="professional"?g:c.packageQuantity,se=c._id[v];return i.createPackageOrder({eoa_address:r,package_amount:A,packageId:se,chainId:_.chainId.toString(),tokenAddress:_.tokenAddress,tokenName:_.tokenName})},onSuccess:c=>{D(!1),we.setQueryData(["pendingOrders",r,0],[c]),we.invalidateQueries({queryKey:["pendingOrders",r,0]}),o||we.invalidateQueries({queryKey:["accountInfo",r]}),x||we.invalidateQueries({queryKey:["billing-history",r]}),ue("/checkout",{id:c.id})},onError:c=>{if(zt(c)){c.eCode===2315?q(!0):ne(c.eMsg??"Failed to create order. Please try again.");return}if(c instanceof Error){ne(c.message);return}ne("Failed to create order. Please try again.")}}),Qn=(c,_)=>{if(!r){ne("Please connect your wallet first");return}if(F(c),de(_),ye){L({source:"purchaseBindInvite",status:"binding",planId:c.id,billingPeriod:v,audience:Un(c)}),Pe(!0);return}if(L(null),W.length>0){q(!0);return}D(!0)},Kn=c=>{P&&Ae.mutate({plan:P,paymentOption:c})},Gn=async c=>{if(q(!1),c===1){if(D(!1),W.length>0){const _=W[0].id;ue("/checkout",{id:_})}return}if(c===2&&(D(!1),W.length>0)){const _=W[0];try{await i.cancelOrder(_.id),we.invalidateQueries({queryKey:["pendingOrders",f==null?void 0:f.address,0]}),we.setQueryData(["order",_.id],A=>A&&{...A,status:2}),D(!0)}catch(A){console.error("cancelOrder:",A)}}},Yn=c=>{const _=c.trim();if(!_)return h;const A=Number(_);return!Number.isFinite(A)||A<0?h:(A>y&&ne("Maximum limit of 100 exceeded."),Math.min(y,Math.max(h,Math.floor(A))))},Zn=()=>{ae&&(T(String(w)),$(!0))},Xn=c=>{const _=c.target.value;if(_.trim()===""){T(_);return}const A=Number(_);if(Number.isFinite(A)){if(A>y){T(String(y)),ne("Maximum limit of 100 exceeded.");return}T(_)}},Jn=c=>{const _=c.target.value;if(_===""){z("");return}if(!/^\d+$/.test(_))return;const A=_.replace(/^0+(?=\d)/,""),se=Number(A);
24if(!Number.isFinite(se))return;if(se>y){z(String(y)),j(y),ne("Maximum limit of 100 exceeded.");return}const X=Math.max(h,Math.floor(se));z(String(X)),j(X)},es=c=>{c.target.select()},ts=()=>{U.trim()===""&&(z(String(h)),j(h))},ns=()=>{const c=Yn(B);j(c),$(!1)},ss=c=>{c||($(!1),T(String(w)))};return zn?e.jsxs("div",{className:H("px-4 min-h-[calc(100vh-60px)] pt-4 md:pt-[20vh]"),children:[e.jsx("div",{className:"mb-[60px] md:hidden",children:e.jsx(Oe,{pageName:"pricing",onBack:()=>{L(null),Pe(!1)}})}),e.jsx("div",{className:"w-full max-w-[580px] mx-auto",children:e.jsx(ca,{onSuccess:()=>{const c=M;(c==null?void 0:c.source)==="purchaseBindInvite"&&L({...c,status:"restore"}),Pe(!1)},showDefaultInviteSkip:(P==null?void 0:P.id)==="individualStandard"||(P==null?void 0:P.id)==="individualLight"})})]}):ee?ae&&ke&&!Ie?e.jsxs("div",{className:H("px-4 min-h-[calc(100vh-60px)] pt-4"),children:[e.jsx("div",{className:"block md:hidden mb-[60px]",children:e.jsx(Oe,{pageName:"pricing"})}),e.jsx("div",{className:H("w-full max-w-[520px]"),children:e.jsx(Gs,{placeholderKey:"enterInviteCodePlaceholder",callback:()=>Bn(!0)})})]}):e.jsxs(jt,{children:[e.jsxs("div",{className:"mx-auto max-w-[1120px] pb-5 sm:pb-8 lg:pb-8",children:[e.jsxs("div",{className:"sticky top-0 z-10 bg-[#f8f8f7] pt-5 sm:pt-8 px-4 sm:px-6 lg:px-8",children:[e.jsx("div",{className:"block mb-4 md:hidden",children:e.jsx(Oe,{pageName:"pricing"})}),e.jsxs("div",{className:"mb-4 text-[#34322d] ",children:[e.jsxs("div",{className:"flex gap-1 justify-center items-center px-0",children:[e.jsx("span",{className:"font-semibold text-[20px] md:text-[28px] leading-[28px] md:leading-[34px]",children:t("title")}),e.jsx("span",{className:"bg-[#2AAE6714] px-2 py-[2px] text-[#2aae67] text-[12px] font-medium rounded-full",children:"Beta"})]}),e.jsx("p",{className:"mt-1 md:mt-0 text-[14px] md:text-[20px] text-center",children:t("subtitle")})]}),e.jsx("div",{className:"flex justify-center mb-4",children:e.jsx("div",{className:H("inline-flex gap-1 rounded-[8px] bg-[#37352F0A] border border-[##0000000F]",l?"p-0":"p-[2px]"),children:(ee==="individual"?["monthly","quarterly"]:l?["yearly"]:["quarterly","semiannually","yearly"]).map(c=>e.jsx("button",{onClick:()=>s(c),className:H("px-4 py-1 rounded-[6px] text-[13px] font-medium transition-colors flex items-center",v===c?"bg-white text-[#34322d]":"text-[#858481] hover:text-[#34322d]"),children:t(c)},c))})})]}),Wn||!le?e.jsx("div",{className:"h-[500px] flex items-center justify-center",children:e.jsx(Ut,{className:"w-10 h-10 text-[#858481] animate-spin"})}):e.jsx("div",{className:`grid grid-cols-1 gap-3 px-4 sm:px-6 lg:px-8 25 md:grid-cols-[repeat(auto-fit,340px)] md:justify-center`,children:le.map(c=>{const _=E===c.id,A=le.length===1,se=c.id==="professional"?kt(c,v)*g:kt(c,v),X=c.id==="professional"?w:c.packageQuantity,vt=c.id==="professional"?c.prices[v]*g:c.prices[v],rs=c.isOpen[v]===1;return e.jsxs("div",{onClick:()=>R(c.id),className:H("flex flex-col bg-white rounded-[16px] pt-6 pb-4 md:pb-6 px-4 cursor-pointer transition-all duration-200",A&&"min-h-[618px]","border-2",_?"border-[#2aae67] shadow-[0_8px_24px_rgba(42,174,103,0.18)]":"border-transparent"),children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-[16px] leading-[28px] font-medium text-[#34322d]",children:t(c.nameKey)}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("span",{className:"text-[13px] text-[#858481]",children:t(c.tip)}),e.jsxs("span",{className:"leading-[32px]",children:[e.jsxs("span",{className:"text-[28px] font-semibold text-[#34322d]",children:["$",se.toFixed(2)]}),e.jsxs("span",{className:"text-sm text-[#858481]",children:["/",t("month"),", ",qn(v)]})]})]}),c.id==="professional"&&e.jsxs("div",{className:"mt-4 bg-[#37352F0F] py-4 px-4 rounded-[10px]",children:[!l&&e.jsxs("div",{className:"flex gap-2 justify-between items-center mb-4",children:[e.jsxs("span",{className:"text-sm font-medium text-[#34322d] flex items-center gap-1",children:[e.jsx("span",{children:t("basePackages")}),e.jsx(je,{content:t("base_des"),children:e.jsx(Se,{className:"w-[14px] h-[14px] curs
25or-pointer inline-block"})})]}),e.jsx("span",{className:"font-bold",children:"5"})]}),e.jsxs("div",{className:"flex gap-2 justify-between items-center",children:[e.jsxs("span",{className:"text-sm font-medium text-[#34322d] flex items-center gap-1",children:[e.jsx("span",{children:t("addPackages")}),e.jsx(je,{content:t("add_des"),children:e.jsx(Se,{className:"w-[14px] h-[14px] cursor-pointer inline-block"})})]}),e.jsxs("div",{className:"flex items-center sm:gap-[10px] gap-1",children:[e.jsx("button",{onClick:()=>j(Math.max(h,w-1)),className:"flex justify-center items-center w-6 h-6 bg-white rounded border disabled:cursor-not-allowed","aria-label":t("decreaseQuantity"),title:t("decreaseQuantity"),disabled:w<=h,children:e.jsx(ar,{className:`w-3 h-3 ${w<=h?"text-[#60626680]":"text-[#606266]"}`})}),ae?e.jsx("button",{type:"button",onClick:Zn,className:"h-6 min-w-8 px-2 rounded border bg-white text-sm font-bold text-[#34322d]","aria-label":t("openQuantityDialog"),title:t("openQuantityDialog"),children:X}):e.jsx("input",{type:"number",inputMode:"numeric",min:h,max:y,step:1,value:U,onChange:Jn,onFocus:es,onBlur:ts,className:"h-6 w-10 rounded border bg-white px-1 text-center text-sm font-bold text-[#34322d] outline-none focus:ring-1 focus:ring-[#2aae67] [appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none","aria-label":t("quantityInputLabel"),title:t("quantityInputLabel")}),e.jsx("button",{onClick:()=>j(Math.min(y,w+1)),className:"flex justify-center items-center w-6 h-6 bg-white rounded border disabled:cursor-not-allowed","aria-label":t("increaseQuantity"),title:t("increaseQuantity"),disabled:w>=y,children:e.jsx(Us,{className:`w-3 h-3 ${w>=y?"text-[#60626680]":"text-[#606266]"}`})})]})]})]}),rs?e.jsx(re,{className:"w-full mt-4 rounded-full font-medium bg-[#34322d] hover:bg-[#34322d] [@media(hover:hover)]:hover:bg-[#2aae67] [@media(hover:hover)]:group-hover:bg-[#2aae67]",onClick:()=>Qn(c,vt),disabled:Ae.isPending,children:Ae.isPending?t("processing"):t("purchaseNow")}):e.jsx("button",{className:"h-10 px-4 py-2 cursor-not-allowed text-primary-foreground text-sm w-full mt-4 rounded-full font-medium bg-[#1a1a19] disabled:opacity-50",disabled:!0,children:t("comingSoon")}),e.jsx("div",{className:"mt-4 text-[13px] text-[#858481] flex items-center justify-center",children:`${t("totalBill")}: $${vt}`})]}),e.jsx("div",{className:"flex-1 pt-6",children:e.jsx("div",{className:"relative",children:e.jsx("div",{className:"space-y-3",children:(()=>{const as=nr[c.id]??[];return Z[c.id],as.map((me,fa)=>{const bt=sr[me],os=bt.icon,yt=c.month_credits[v]*(c.id==="professional"?g:X),is=yt*rr[v],wt=c.goldAmount[v]*(c.id==="professional"?g:X),St=c.standardGoldAmount[v]*(c.id==="professional"?g:X),ls=c.refresh_credits[v]*(c.id==="professional"?g:X),Ct=wt!==St;let qe="";return me==="refreshCredits"?qe=`${ls} `:me==="creditsPerMonth"&&(qe=`${yt} `),e.jsxs("div",{className:"flex gap-3 items-start text-sm",children:[e.jsx(os,{className:"flex-shrink-0 w-4 h-4 mt-[3px]"}),e.jsxs("span",{className:"text-[#34322d] leading-relaxed",children:[e.jsx("span",{className:"font-bold text-[14px]",children:qe}),t.rich(bt.i18n,{members:g,credits:is,goldAmount:wt,standardGoldAmount:Ct?St:"",bold:Qe=>e.jsx("span",{className:"font-bold text-[14px] text-[#34322d]",children:Qe}),line:Qe=>Ct?e.jsx("span",{className:"line-through text-xs text-[#5e5e5b]",children:Qe}):null}),me==="goldAmount"&&e.jsx(je,{content:t("gold_des"),children:e.jsx(Se,{className:"w-[14px] h-[14px] cursor-pointer inline-block ml-1"})}),me==="refreshCredits"&&e.jsx(je,{content:t("daily_des"),children:e.jsx(Se,{className:"w-[14px] h-[14px] cursor-pointer inline-block ml-1"})}),me==="creditsPerMonth"&&e.jsx(je,{content:t("monthly_des"),children:e.jsx(Se,{className:"w-[14px] h-[14px] cursor-pointer inline-block ml-1"})}),me==="oneTimeCredits"&&e.jsx(je,{content:t("oneTimeCredits_des"),children:e.jsx(Se,{className:"w-[14px] h-[14px] cursor-pointer inline-block ml-1"})})]})]},me)})})()})})})]},c.id)})})]}),e.jsx(ra,{open:Q,onOpenChange:D,onConfirm:Kn,totalPrice:ce,isLoading:Ae.isPending}),e.jsx(it,{open:G,onOpenChange:ss,children:e.jsxs(lt,{children:[e.jsx(ct,{className:"fixed inset-0 bg-[#05050533] backdrop-blur-[4px]",style:{zIndex:70}}),e.jsxs(dt,{className:"fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[calc(100vw-32px)] md:w-[408px] bg-white rounded-[24px] overflow-hidden flex flex-col items-center text-center pt-8 px-4 pb-4",style:{zIndex:70},children:[e.jsx(ut,{className:"text-[18px] text-[#1d1c1b] font-medium mb-4",children:t("quantityDialogTitle")}),e.jsx("input",{type:"number",inputMode:"numeric",min:h,max:y,step:1,value:B,onChange:Xn,className:"w-full h-10 rounded-[12px] border border-[#d7d6d2] px-3 text-center text-[16px] text-[#34322d] outline-none focus:ring-1 focus:ring-[#2aae67] [appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none","aria-label":t("quantityInput
25Label"),title:t("quantityInputLabel")}),e.jsx(re,{className:"w-full mt-4 py-3 rounded-[12px]",onClick:ns,children:t("quantityConfirm")})]})]})}),e.jsx(ua,{isOpen:K,onClose:Gn,title:n("d_incomplete_title"),description:((xt=W==null?void 0:W[0])==null?void 0:xt.status)===5?n("d_incomplete_des_2"):n("d_incomplete_des"),buttons:((gt=W==null?void 0:W[0])==null?void 0:gt.status)===5?[{label:n("d_incomplete_btn_yes"),value:1}]:[{label:n("d_incomplete_btn_yes"),value:1},{label:n("d_incomplete_btn_no"),value:2}],Icon:oa})]}):e.jsx(jt,{children:e.jsxs("div",{className:"mx-auto max-w-[1100px] min-h-[calc(100vh-60px)] px-4 pb-8 pt-5 sm:px-6 md:pt-0 lg:px-8",children:[e.jsx("div",{className:"sticky top-0 z-20 -mx-4 -mt-5 mb-2 bg-[#f8f8f7] px-4 pb-3 pt-5 md:hidden",children:e.jsx(Oe,{pageName:"pricing",title:t("mobilePlanHeader")})}),e.jsxs("div",{className:"mx-auto mb-0 hidden min-h-[130px] w-full max-w-[758px] flex-col justify-center rounded-[16px] bg-[length:100%_100%] bg-center bg-no-repeat text-left text-[#34322d] md:flex md:aspect-[758/162] md:min-h-0",style:{backgroundImage:`url(${dr})`},children:[e.jsxs("div",{className:"flex gap-2 justify-start items-center",children:[e.jsx("span",{className:"text-[24px] font-semibold leading-[34px] md:text-[24px] md:leading-[34px]",children:t("planChoiceTitle")}),e.jsx("span",{className:"bg-[#2AAE6714] px-2 py-[2px] text-[#2aae67] text-[12px] font-medium rounded-full",children:"Beta"})]}),e.jsx("p",{className:"mt-2 max-w-[430px] text-[16px] text-[#34322d] md:text-[16px]",children:t("planChoiceSubtitle")})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3 md:max-w-[758px] mx-auto",children:[e.jsxs("div",{className:"rounded-[16px] bg-white px-4 pb-4 pt-2 md:pt-4 md:px-8 flex flex-col min-h-[330px] cursor-pointer transition-all duration-200 border-2 border-[#2aae67] shadow-[0_8px_24px_rgba(42,174,103,0.08)]",onClick:()=>Re("individual"),children:[e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"aspect-[618/320] w-full rounded-[12px] bg-[length:100%_100%] bg-center bg-no-repeat",style:{backgroundImage:`url(${pr})`}}),e.jsxs("div",{className:"absolute bottom-2 left-0 md:hidden",children:[e.jsx("div",{className:"text-[18px] font-semibold leading-[28px] text-[#34322d]",children:t("individualPlanTitle")}),e.jsx("div",{className:"mt-0 h-[2px] w-[30px] bg-[#2aae67]"})]})]}),e.jsx("div",{className:"mt-2 hidden text-left md:block",children:e.jsx("div",{className:"text-[18px] leading-[28px] font-semibold text-[#34322d]",children:t("individualPlanTitle")})}),e.jsx("div",{className:"mt-2 mb-2 h-px bg-[#e5e3df]"}),e.jsxs("div",{className:"space-y-4 pt-2 md:pt-6 text-[14px] text-[#5e5e5b]",children:[e.jsxs("div",{className:"flex gap-2 items-start",children:[e.jsx(lr,{className:"mt-0.5 w-4 h-4 shrink-0 text-[#2aae67]",strokeWidth:1.8}),e.jsx("span",{className:"leading-5",children:t("individualFeatureUsers")})]}),e.jsxs("div",{className:"flex gap-2 items-start",children:[e.jsx(At,{className:"mt-0.5 w-4 h-4 shrink-0 text-[#2aae67]"}),e.jsx("span",{className:"leading-5",children:t("individualFeatureRecommendations")})]})]}),e.jsx("div",{className:"pt-4 md:mt-auto md:pt-10",children:e.jsx("button",{type:"button",className:"h-10 w-full rounded-full bg-[#34322d] text-[14px] font-medium text-white hover:bg-[#34322d] [@media(hover:hover)]:hover:bg-[#2aae67]",onClick:c=>{c.stopPropagation(),Me("individual")},children:t("chooseIndividual")})})]}),e.jsxs("div",{className:"rounded-[16px] bg-white px-4 pb-4 pt-2 md:pt-4 md:px-8 flex flex-col min-h-[330px] cursor-pointer transition-all duration-200 border border-transparent",onClick:()=>Re("business"),children:[e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"aspect-[618/320] w-full rounded-[12px] bg-[length:100%_100%] bg-center bg-no-repeat",style:{backgroundImage:`url(${ur})`}}),e.jsxs("div",{className:"absolute bottom-2 left-0 md:hidden",children:[e.jsx("div",{className:"text-[18px] font-semibold leading-[28px] text-[#34322d]",children:t("businessPlanTitle")}),e.jsx("div",{className:"mt-0 h-[2px] w-[30px] bg-[#2aae67]"})]})]}),e.jsx("div",{className:"mt-2 hidden text-left md:block",children:e.jsx("div",{className:"text-[18px] leading-[28px] font-semibold text-[#34322d]",children:t("businessPlanTitle")})}),e.jsx("div",{className:"mt-2 mb-2 h-px bg-[#e5e3df]"}),e.jsxs("div",{className:"space-y-4 pt-2 md:pt-6 text-[14px] text-[#5e5e5b]",children:[e.jsxs("div",{className:"flex gap-2 items-start",children:[e.jsx(cr,{className:"mt-0.5 w-4 h-4 shrink-0 text-[#2aae67]",strokeWidth:1.8}),e.jsx("span",{className:"leading-5",children:t("businessFeatureNeeds")})]}),e.jsxs("div",{className:"flex gap-2 items-start",children:[e.jsx(At,{className:"mt-0.5 w-4 h-4 shrink-0 text-[#2aae67]"}),e.jsx("span",{className:"leading-5",children:t("businessFeatureSop")})]}),e.jsxs("div",{className:"flex gap-2 items-start",children:[e.jsx(ir,{className:"mt-0.5 w-4 h-4 shrink-0 text-[#2aae67]",strokeWidth:1.8}),e.jsx("span",{className:"leading-5",children:t("businessFeatureSupport")})]})]}),e.jsx("div",{className:"pt-4 md:mt-auto md:pt-10",children:e.jsx(re,{type:"button",className:"h-10 w-full rounded-full bg-[#34322d] hover:bg-[#34322d] [@media(hover:hover)]:hover:bg-[#2aae67] text-[14px] font-medium",onClick:c=>{c.stopPropagation(),Me("business")},children:t("chooseBusiness")})})]})]})]})})}function ua({isOpen:t,title:n,description:r,buttons:i,Icon:o,onClose:u}){return t?e.jsx(it,{open:t,onOpenChange:x=>{x||u(0)},children:e.jsxs(lt,{children:[e.jsx(ct,{className:"fixed inset-0 bg-[#05050533] backdrop-blur-[4px]",style:{zIndex:70}}),e.jsxs(dt,{className:"fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[calc(100vw-32px)] md:w-[408px] bg-white rounded-[24px] overflow-hidden flex flex-col items-center text-center pt-10 px-4 pb-4",style:{zIndex:70},children:[e.jsx(o,{className:"mb-4 w-14 h-14"}),e.jsx(ut,{className:"text-[18px] text-[#1d1c1b] font-medium mb-2",children:n}),e.jsx("p",{className:"text-[#1d1c1b] text-[14px] font-medium mb-6 whitespace-pre-line",children:r}),i.length===1?e.jsx(re,{className:"w-full py-3 rounded-[12px]",onClick:()=>
25u(i[0].value),children:i[0].label}):e.jsx("div",{className:"flex gap-2 w-full",children:i.map((x,f)=>e.jsx(re,{className:"flex-1 py-3 rounded-[12px]",variant:f===i.length-1?"outline":"default",onClick:()=>u(x.value),children:x.label},x.label))})]})]})}):null}function pa(){return e.jsx(da,{})}const Aa=function(){const n=As.useSearch();return e.jsx(Ys,{fallback:e.jsx(Zs,{referral:n.referral}),children:e.jsx(pa,{})})};export{Aa as component};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.