PageSourceSearch

https://www.delphi.ai/_next/static/chunks/3ovf37gfd82om.js?dpl=dpl_C5e4sgeG5aijLBQVBsjQhVF4yUUx

js delphi.ai collected 2026-09-24 17:42:50 UTC 723,118 bytes, 16 lines download raw bytes

1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="c5bdecb5-d1f1-fb81-cd4e-67d0a7493ff2")}catch(e){}}();
2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,269714,e=>{"use strict";var t=e.i(45113),n=e.i(413701),i=e.i(17772),r=e.i(294237);e.i(182909);var a=e.i(817422),s=e.i(259199),o=e.i(632137);e.i(981831),e.i(183144),e.i(765918),e.i(421061),e.i(670102),e.i(181241),e.i(403773),a.z.string();let l=i.createContext(null);function u(e){return!e}(0,r.cva)("peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-xl px-3 py-2 text-left text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-fg-high focus-visible:ring-2 active:bg-sidebar-accent active:text-fg-high disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-fg-high data-active:bg-sidebar-accent data-active:font-medium data-active:text-fg-high [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-fg-high",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-fg-high hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-9 text-sm",sm:"h-8 text-xs",lg:"h-14 px-3 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}}),e.s(["SidebarProvider",0,function(e){let r,a,c,d,h,p,f,m,g,v,y,b,w,x,C,k,S,T,A=(0,n.c)(39);A[0]!==e?({defaultOpen:f,open:c,onOpenChange:h,className:a,style:p,children:r,...d}=e,A[0]=e,A[1]=r,A[2]=a,A[3]=c,A[4]=d,A[5]=h,A[6]=p,A[7]=f):(r=A[1],a=A[2],c=A[3],d=A[4],h=A[5],p=A[6],f=A[7]);let E=void 0===f||f,M=(0,s.useIsMobile)(),[_,R]=i.useState(!1),[I,j]=i.useState(E),V=c??I;A[8]!==h?(m=e=>{h?h(e):j(e)},A[8]=h,A[9]=m):m=A[9];let O=m;A[10]!==V?(g=()=>{document.cookie=`sidebar_state=${V}; path=/; max-age=604800`},v=[V],A[10]=V,A[11]=g,A[12]=v):(g=A[11],v=A[12]),i.useEffect(g,v),A[13]!==M||A[14]!==V||A[15]!==O?(y=()=>M?R(u):O(!V),A[13]=M,A[14]=V,A[15]=O,A[16]=y):y=A[16];let P=y;A[17]!==P?(b=()=>{let e=e=>{"b"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),P())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},w=[P],A[17]=P,A[18]=b,A[19]=w):(b=A[18],w=A[19]),i.useEffect(b,w);let N=V?"expanded":"collapsed";A[20]!==M||A[21]!==V||A[22]!==_||A[23]!==O||A[24]!==N||A[25]!==P?(x={state:N,open:V,setOpen:O,isMobile:M,openMobile:_,setOpenMobile:R,toggleSidebar:P},A[20]=M,A[21]=V,A[22]=_,A[23]=O,A[24]=N,A[25]=P,A[26]=x):x=A[26];let L=x;A[27]!==p?(C={"--sidebar-width":"16rem","--sidebar-width-icon":"3rem",...p},A[27]=p,A[28]=C):C=A[28];let D=C;return A[29]!==a?(k=(0,o.cn)("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",a),A[29]=a,A[30]=k):k=A[30],A[31]!==r||A[32]!==d||A[33]!==D||A[34]!==k?(S=(0,t.jsx)("div",{"data-slot":"sidebar-wrapper",style:D,className:k,...d,children:r}),A[31]=r,A[32]=d,A[33]=D,A[34]=k,A[35]=S):S=A[35],A[36]!==L||A[37]!==S?(T=(0,t.jsx)(l.Provider,{value:L,children:S}),A[36]=L,A[37]=S,A[38]=T):T=A[38],T},"useSidebar",0,function(){let e=i.use(l);if(!e)throw Error("useSidebar must be used within a SidebarProvider.");return e}])},371441,e=>{"use strict";var t=e.i(413701),n=e.i(968467);e.i(800079);var i=e.i(438659),r=e.i(65880),a=e.i(61053),s=e.i(527302);e.s(["useForceCollapsedSidebar",0,function(){let e,o=(0,t.c)(5),l=(0,n.usePathname)(),u=(0,i.useNavHiddenValue)(),c=(0,r.useNavSuppressedValue)(),d=(0,a.useSidebarForceCollapsedValue)();return o[0]!==u||o[1]!==c||o[2]!==l||o[3]!==d?(e=u||c||(0,s.isCallPath)(l,l?.split("/")[1]??"")||d,o[0]=u,o[1]=c,o[2]=l,o[3]=d,o[4]=e):e=o[4],e}])},210265,e=>{"use strict";var t=e.i(45113),n=e.i(413701),i=e.i(968467),r=e.i(269714),a=e.i(632137);e.i(800079);var s=e.i(538054),o=e.i(438659),l=e.i(65880),u=e.i(527302),c=e.i(17772),d=e.i(309271);function h(){let e=document.documentElement,t=()=>
2{let t=(0,d.resolveVisibleViewportHeightUpdate)({innerHeight:window.innerHeight,visualViewportHeight:window.visualViewport?.height??null,scale:window.visualViewport?.scale??1});switch(t.action){case"skip":return;case"unset":return void e.style.removeProperty("--visible-viewport-height");case"set":return void e.style.setProperty("--visible-viewport-height",`${t.heightPx}px`);default:return t}};return t(),window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t),e.style.removeProperty("--visible-viewport-height")}}var p=e.i(951370),f=e.i(547401),m=e.i(371441);function g(e){let r,a,s,c,d=(0,n.c)(12),{hasSidebar:h,sidebar:p,mobileBar:g,myMindSlot:y,children:b}=e,w=(0,i.usePathname)();d[0]!==w?(r=(0,u.isCallPath)(w,w?.split("/")[1]??""),d[0]=w,d[1]=r):r=d[1];let x=r,C=(0,o.useNavHiddenValue)(),k=(0,l.useNavSuppressedValue)(),S=(0,m.useForceCollapsedSidebar)();d[2]===Symbol.for("react.memo_cache_sentinel")?(a=(0,t.jsx)(f.AppHeader,{homeHref:"/discover"}),d[2]=a):a=d[2];let T=!(C&&!k||x)&&g,A=h&&!k;return d[3]!==b||d[4]!==S||d[5]!==A?(s=(0,t.jsx)(v,{hasSidebar:A,forceCollapsedSidebar:S,children:b}),d[3]=b,d[4]=S,d[5]=A,d[6]=s):s=d[6],d[7]!==y||d[8]!==p||d[9]!==T||d[10]!==s?(c=(0,t.jsxs)(t.Fragment,{children:[a,p,T,s,y]}),d[7]=y,d[8]=p,d[9]=T,d[10]=s,d[11]=c):c=d[11],c}function v(e){let i,s,o=(0,n.c)(5),{hasSidebar:l,forceCollapsedSidebar:u,children:c}=e,{state:d}=(0,r.useSidebar)(),h=l&&!u?"collapsed"===d?"lg:pl-16":"lg:pl-56":"lg:pl-0";return o[0]!==h?(i=(0,a.cn)("relative flex w-full flex-1 flex-col bg-surface-primary","lg:transition-[padding] lg:duration-200 lg:ease-out",h),o[0]=h,o[1]=i):i=o[1],o[2]!==c||o[3]!==i?(s=(0,t.jsx)("main",{className:i,children:c}),o[2]=c,o[3]=i,o[4]=s):s=o[4],s}e.s(["AppShell",0,function(e){let o,l,u,f,m,v,y,b,w,x,C,k,S=(0,n.c)(29),{defaultSidebarOpen:T,hasSidebar:A,impersonating:E,isAuthenticated:M,sidebar:_,mobileBar:R,myMindSlot:I,children:j}=e,V=void 0===A||A,O=void 0!==E&&E,P=(0,i.usePathname)(),N=(0,s.useNavBannerValue)();if((k=(0,n.c)(1))[0]===Symbol.for("react.memo_cache_sentinel")?(C=[],k[0]=C):C=k[0],(0,c.useEffect)(h,C),P?.startsWith("/auth")||P?.startsWith("/onboarding")){let e;return S[0]!==j?(e=(0,t.jsx)(t.Fragment,{children:j}),S[0]=j,S[1]=e):e=S[1],e}S[2]===Symbol.for("react.memo_cache_sentinel")?(o=(0,a.cn)("flex flex-col",d.VISIBLE_VIEWPORT_MIN_HEIGHT_CLASS),S[2]=o):o=S[2],S[3]!==O?(l=O?{"--impersonation-h":"2.5rem"}:void 0,S[3]=O,S[4]=l):l=S[4],S[5]!==N?(u=N?{"--nav-banner-h":"3rem"}:void 0,S[5]=N,S[6]=u):u=S[6],S[7]!==l||S[8]!==u?(f={...l,...u},S[7]=l,S[8]=u,S[9]=f):f=S[9];let L=f;return S[10]!==N?(m=N?(0,t.jsx)("div",{className:"fixed inset-x-0 top-[var(--impersonation-h,0px)] z-50 h-12",children:N}):null,S[10]=N,S[11]=m):m=S[11],S[12]===Symbol.for("react.memo_cache_sentinel")?(v=(0,a.cn)("flex-1",d.VISIBLE_VIEWPORT_MIN_HEIGHT_CLASS),S[12]=v):v=S[12],S[13]!==j||S[14]!==V||S[15]!==R||S[16]!==I||S[17]!==_?(y=(0,t.jsx)(g,{hasSidebar:V,sidebar:_,mobileBar:R,myMindSlot:I,children:j}),S[13]=j,S[14]=V,S[15]=R,S[16]=I,S[17]=_,S[18]=y):y=S[18],S[19]!==M||S[20]!==y?(b=(0,t.jsx)(p.AddKnowledgeDiscoverabilityProvider,{isAuthenticated:M,children:y}),S[19]=M,S[20]=y,S[21]=b):b=S[21],S[22]!==T||S[23]!==b?(w=(0,t.jsx)(r.SidebarProvider,{defaultOpen:T,className:v,children:b}),S[22]=T,S[23]=b,S[24]=w):w=S[24],S[25]!==w||S[26]!==L||S[27]!==m?(x=(0,t.jsxs)("div",{className:o,style:L,children:[m,w]}),S[25]=w,S[26]=L,S[27]=m,S[28]=x):x=S[28],x}],210265)},690437,659752,861560,964865,990912,310653,388991,356220,e=>{"use strict";e.s(["buildAskDaraHref",0,function(e){let t=`Hey! I'm on the ${e} tier and had a quick question.`;return`/dara/chat?q=${encodeURIComponent(t)}`}],690437),e.i(339978),e.i(216501),e.s([],659752);var t=e.i(45113),n=e.i(413701),i=e.i(943594),r=e.i(697228),a=e.i(187014),s=e.i(730684),o=e.i(167922),l=e.i(411881),u=e.i(183144),c=e.i(636273),d=e.i(85114),h=e.i(174139);function p(e){let n=e.state.meta.isTouched&&!e.state.meta.isValid;return(0,t.jsxs)(o.Field,{"data-invalid":n,children:[(0,t.jsx)(o.FieldLabel,{htmlFor:e.name,children:"Details"}),(0,t.jsx)(c.Textarea,{id:e.name,name:e.name,value:e.state.value,className:"min-h-28 resize-none",rows:5,maxLength:h.MAX_FEEDBACK_LENGTH,onBlur:e.handleBlur,onChange:t=>e.handleChange(t.target.value),"aria-invalid":n}),(0,t.jsxs)("div",{className:"self-end text-xs text-fg-mid tabular-nums",children:[e.state.value.length,"/",h.MAX_FEEDBACK_LENGTH]}),n&&(0,t.jsx)(o.FieldError,{errors:e.state.meta.errors})]})}function f(e){let n=e.state.meta.isTouched&&!e.state.meta.isValid;return(0,t.jsxs)(o.Field,{"data-invalid":n,children:[(0,t.jsx)(o.FieldLabel,{htmlFor:e.name,children:"Subject"}),(0,t.jsx)(u.Input,{id:e.name,name:e.name,value:e.state.value,maxLength:h.MAX_FEEDBACK_SUBJECT_LENGTH,onBlur:e.handleBlur,onChange:t=>e.handleChange(t.target.value),autoFocus:!0,"aria-invalid":n}),n&&(0,t.jsx)(o.FieldError,{errors:e.state.meta.errors})]})}e.s(["FeedbackDialog",0,function(e){let o,u,c,m,g,v,y,b,w,x=(0,n.c)(24),{open:C,onOpenChange:k,ownerUsername:S}=e;x[0]===Symbol.for("react.memo_cache_sentinel")?(o=(0,s.postSupportFeedbackMutation)(),x[0]=o):o=x[0];let T=(0,r.useMutation)(o);x[1]===Symbol.for("react.memo_cache_sentinel")?(u={subject:"",feedback:""},c={onSubmit:h.feedbackSchema},x[1]=u,x[2]=c):(u=x[1],c=x[2]);let A=(0,i.useForm)({defaultValues:u,validators:c,onSubmit:async e=>{let{value:t}=e;try{await T.mutateAsync({body:{values:{subject:t.subject.trim(),feedback:t.feedback.trim()},metadata:(0,h.feedbackMetadata)({ownerUsername:S})}})}catch{return}a.toast.success("Feedback sent"),A.reset(),k(!1)}});x[3]!==A||x[4]!==T||x[5]!==k?(m=e=>{e||(A.reset(),T.reset()),k(e)},x[3]=A,x[4]=T,x[5]=k,x[6]=m):m=x[6];let E=m;return x[7]!==T.error||x[8]!==T.isError?(g=T.isError?(0,d.errorMessage)(T.error,"Couldn't send your feedback. Try again."):void 0,x[7]=T.error,x[8]=T.isError,x[9]=g):g=x[9],x[10]!==A?(v=()=>void A.handleSubmit(),x[10]=A,x[11]=v):v=x[11],x[12]!==A.Field?(y=(0,t.jsx)(A.Field,{name:"subject",children:f}),x[12]=A.Field,x[13]=y):y=x[13],x[14]!==A.Field?(b=(0,t.jsx)(A.Field,{name:"feedback",children:p}),x[14]=A.Field,x[15]=b):b=x[15],x[16]!==E||x[17]!==T.isPending||x[18]!==C||x[19]!==g||x[20]!==v||x[21]!==y||x[22]!==b?(w=(0,t.jsxs)(l.FormDialog,{open:C,onOpenChange:E,title:"Send feedback",description:"Something broken, or something you'd change? Tell us.",submitLabel:"Send",pending:T.isPending,error:g,onSubmit:v,children:[y,b]}),x[16]=E,x[17]=T.isPending,x[18]=C,x[19]=g,x[20]=v,x[21]=y,x[22]=b,x[23]=w):w=x[23],w}],861560),e.s([],964865);var m=e.i(403773);function g(e){return e?`/@/${e.ownerUsername}`:"/~"}e.s(["buildMainItems",0,function(e){let t=g(e);return[{id:"discover",href:"/discover",label:"Discover",icon:m.DiscoverIcon,iconActive:m.DiscoverSolidIcon},{id:"dashboard",href:t,label:"Insights",icon:m.InsightsIcon,iconActive:m.InsightsSolidIcon},{id:"conversations",href:`${t}/conversations`,label:"Conversations",icon:m.ConversationsIcon,iconActive:m.ConversationsSolidIcon},{id:"audience",href:`${t}/audience`,label:"Audience",icon:m.AudienceIcon,iconActive:m.AudienceSolidIcon},{id:"knowledge",href:`${t}/knowledge`,label:"Knowledge",icon:m.KnowledgeIcon,iconActive:m.KnowledgeSolidIcon}]},"buildPremiumItems",0,function(e){let t=g(e);return[{id:"integrations",href:`${t}/integrations`,label:"Integrations",icon:m.IntegrationsIcon,iconActive:m.IntegrationsSolidIcon,feature:"integrations"},{id:"broadcasts",href:`${t}/broadcasts`,label:"Broadcasts",icon:m.BroadcastsIcon,iconActive:m.BroadcastsSolidIcon,feature:"broadcasts"},{id:"products",href:`${t}/products`,label:"Products",icon:m.ProductsIcon,iconActive:m.ProductsSolidIcon,feature:"products"}]},"buildProfileItem",0,function(e){return{id:"profile",href:`/${e}`,label:"Profile",icon:m.ProfileIcon,iconActive:m.ProfileSolidIcon}},"insightsHref",0,function(e,t){let n=g(e);return"primary"===t?n:`${n}/insights`},"prefixFor",0,g,"resolveInsightsPlacement",0,function(e){return!e.ownerReady||e.isPaidLoading?"hidden":e.isPaidPlan?"primary":"more"},"resolveNavReadiness",0,function(e){let t=e.mindQuerySucceeded?e.mindExists:e.initialHasMind,n=e.meLoaded?null!=e.onboardingCompletedAt:e.initialOnboardingComplete,i=!!e.scope||t&&n;return{selfHasMind:t,ownerReady:i}},"resolveProfileUser",0,function(e){return e.scope?{username:e.scope.ownerUsername,name:e.scope.ownerName,image:e.scope.ownerImage}:(e.selfHasMind?void 0:e.incomingCollaborators[0]?.user)??e.self}],990912);var v=e.i(783572);let y=(0,v.createServerReference)("40731015903d13d1e8e05acdcdef5f58e
26d5475306",v.callServer,void 0,v.findSourceMapURL,"switchAccount");e.s(["switchAccount",0,y],310653);let b=[{value:"light",label:"Light",icon:m.SunIcon},{value:"dark",label:"Dark",icon:m.MoonIcon},{value:"system",label:"System",icon:m.DisplayIcon}];e.s(["THEME_OPTIONS",0,b],388991);var w=e.i(500478),x=e.i(215571),C=e.i(981831),k=e.i(632137),S=e.i(280855);e.s(["CreateYourDelphiDialog",0,function(e){let i,r,a,s,o,l=(0,n.c)(7),{open:u,onOpenChange:c}=e;return l[0]===Symbol.for("react.memo_cache_sentinel")?(i=(0,k.cn)("gap-0 overflow-hidden rounded-4xl p-0 sm:max-w-lg",S.glass.overlay),r=(0,t.jsx)("div",{"aria-hidden":!0,className:"pointer-events-none absolute bottom-0 left-1/2 h-10 w-2/3 -translate-x-1/2 translate-y-1/4 rounded-full bg-tangerine-9/50 blur-2xl"}),l[0]=i,l[1]=r):(i=l[0],r=l[1]),l[2]===Symbol.for("react.memo_cache_sentinel")?(a=(0,t.jsxs)(x.DialogHeader,{className:"relative z-10 gap-2 px-6 pt-6",children:[(0,t.jsx)(x.DialogTitle,{className:"text-3xl text-fg-high",children:"Create Your Delphi"}),(0,t.jsx)(x.DialogDescription,{className:"text-lg text-pretty text-fg-mid",children:"Keep every relationship alive, future proof your knowledge, and never repeat yourself again."})]}),l[2]=a):a=l[2],l[3]===Symbol.for("react.memo_cache_sentinel")?(s=(0,t.jsxs)(x.DialogContent,{showCloseButton:!1,className:i,children:[r,a,(0,t.jsx)("div",{className:"relative z-10 px-5 pt-16 pb-6",children:(0,t.jsx)(C.Button,{asChild:!0,variant:"brand",size:"lg",className:"h-auto w-full py-4 text-base",children:(0,t.jsxs)(w.default,{href:"/onboarding",children:["Get Started",(0,t.jsx)(m.ArrowUpRightIcon,{})]})})})]}),l[3]=s):s=l[3],l[4]!==c||l[5]!==u?(o=(0,t.jsx)(x.Dialog,{open:u,onOpenChange:c,children:s}),l[4]=c,l[5]=u,l[6]=o):o=l[6],o}],356220)},444221,e=>{"use strict";var t=e.i(45113),n=e.i(413701),i=e.i(17772),r=e.i(500478),a=e.i(968467),s=e.i(779882),o=e.i(591401),l=e.i(917356),u=e.i(403773),c=e.i(432245),d=e.i(981831),h=e.i(421061),p=e.i(992763),f=e.i(765918),m=e.i(196196),g=e.i(632137),v=e.i(593854),y=e.i(730684),b=e.i(669876),w=e.i(690437);e.i(754466);var x=e.i(571758),C=e.i(102653);e.i(829875);var k=e.i(679597);e.i(361273);var S=e.i(501346),T=e.i(402503),A=e.i(273291),E=e.i(328327);e.i(800079);var M=e.i(430056),_=e.i(65880),R=e.i(497686);e.i(659752);var I=e.i(216501);e.i(964865);var j=e.i(861560),V=e.i(990912),O=e.i(310653),P=e.i(388991),N=e.i(951370),L=e.i(356220);let D=e=>e.data,F=new Set(["discover","conversations"]),B={initial:e=>({x:`${65*e}%`,opacity:0}),animate:{x:"0%",opacity:1},exit:e=>({x:`${-65*e}%`,opacity:0})},$={type:"spring",bounce:.1,duration:.5};function U(e){let i,a,s,o,l,u,c,d=(0,n.c)(20),{item:h,active:p}=e,f=p?h.iconActive:h.icon,m=!!h.badge&&h.badge>0,v=h.badge&&h.badge>99?"99+":h.badge,y=h.href,b=h.label,w=p?"bg-sand-9/15 text-fg-high":"text-fg-mid hover:bg-sand-9/7 hover:text-fg-high";return d[0]!==w?(i=(0,g.cn)("flex size-12 items-center justify-center rounded-2xl transition-colors",w),d[0]=w,d[1]=i):i=d[1],d[2]===Symbol.for("react.memo_cache_sentinel")?(a=["nav-lateral"],d[2]=a):a=d[2],d[3]!==h?(s=()=>h.onClear?.(),d[3]=h,d[4]=s):s=d[4],d[5]!==f?(o=(0,t.jsx)(f,{className:"size-5"}),d[5]=f,d[6]=o):o=d[6],d[7]!==v||d[8]!==h.badge||d[9]!==m?(l=m&&(0,t.jsx)("span",{"aria-label":`${h.badge} unread`,className:"pointer-events-none absolute -top-1.5 -right-1.5 flex h-4 min-w-4 items-center justify-center rounded-full bg-red-9 px-1 text-[10px] font-semibold text-white tabular-nums leading-none",children:v}),d[7]=v,d[8]=h.badge,d[9]=m,d[10]=l):l=d[10],d[11]!==o||d[12]!==l?(u=(0,t.jsxs)("span",{className:"relative",children:[o,l]}),d[11]=o,d[12]=l,d[13]=u):u=d[13],d[14]!==h.href||d[15]!==h.label||d[16]!==i||d[17]!==s||d[18]!==u?(c=(0,t.jsx)(r.default,{href:y,"aria-label":b,className:i,transitionTypes:a,onClick:s,children:u}),d[14]=h.href,d[15]=h.label,d[16]=i,d[17]=s,d[18]=u,d[19]=c):c=d[19],c}function W(e){let i,a,s,o,l,d,h,p,f=(0,n.c)(21),{item:m,active:v,image:y,displayName:b}=e;f[0]!==b?(i=b.charAt(0).toUpperCase(),f[0]=b,f[1]=i):i=f[1];let w=i,x=m.href,C=m.label;f[2]===Symbol.for("react.memo_cache_sentinel")?(a=["nav-lateral"],f[2]=a):a=f[2];let k=v&&"ring-2 ring-sand-9/20";return f[3]!==k?(s=(0,g.cn)("shrink-0",k),f[3]=k,f[4]=s):s=f[4],f[5]!==b||f[6]!==y?(o=y?(0,t.jsx)(c.AvatarImage,{src:y,alt:b}):null,f[5]=b,f[6]=y,f[7]=o):o=f[7],f[8]!==b||f[9]!==w?(l=b?w:(0,t.jsx)(u.ProfileSolidIcon,{className:"size-4.5"}),f[8]=b,f[9]=w,f[10]=l):l=f[10],f[11]!==l?(d=(0,t.jsx)(c.AvatarFallback,{className:"rounded-[33%] bg-sand-3 text-[10px] font-semibold text-sand-12",children:l}),f[11]=l,f[12]=d):d=f[12],f[13]!==s||f[14]!==o||f[15]!==d?(h=(0,t.jsxs)(c.Avatar,{size:"4xl",className:s,children:[o,d]}),f[13]=s,f[14]=o,f[15]=d,f[16]=h):h=f[16],f[17]!==m.href||f[18]!==m.label||f[19]!==h?(p=(0,t.jsx)(r.default,{href:x,"aria-label":C,className:"flex size-12 items-center justify-center rounded-2xl transition-colors hover:bg-sand-9/7",transitionTypes:a,children:h}),f[17]=m.href,f[18]=m.label,f[19]=h,f[20]=p):p=f[20],p}let z=(0,g.cn)("flex size-12 items-center justify-center rounded-2xl","border border-tangerine-9/20 bg-transparent transition-colors","text-tangerine-10 drop-shadow-sm","hover:bg-tangerine-9/8 hover:border-tangerine-9/30 hover:text-tangerine-11 hover:shadow-md","active:bg-tangerine-9/5 active:border-tangerine-9/50 active:shadow-none");function H(e){let i,r,a=(0,n.c)(6),{discoverable:s,onClick:o}=e,l=s?"Add Knowledge":"Add to Mind";return a[0]!==s?(i=s?(0,t.jsx)(x.AddKnowledgeMark,{className:"size-5","aria-hidden":!0}):(0,t.jsx)(u.PlusIcon,{className:"size-5"}),a[0]=s,a[1]=i):i=a[1],a[2]!==o||a[3]!==l||a[4]!==i?(r=(0,t.jsx)("button",{type:"button",onClick:o,"aria-label":l,"data-analytics-action":"add-knowledge-navigation",className:z,children:i}),a[2]=o,a[3]=l,a[4]=i,a[5]=r):r=a[5],r}function K(){let e,r,a,s=(0,n.c)(4),[o,l]=(0,i.useState)(!1);return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=()=>l(!0),s[0]=e):e=s[0],s[1]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)("button",{type:"button",onClick:e,"aria-label":"Create Your Delphi",className:z,children:(0,t.jsx)(u.PlusIcon,{className:"size-5"})}),s[1]=r):r=s[1],s[2]!==o?(a=(0,t.jsxs)(t.Fragment,{children:[r,(0,t.jsx)(L.CreateYourDelphiDialog,{open:o,onOpenChange:l})]}),s[2]=o,s[3]=a):a=s[3],a}let q="flex w-full items-center gap-3 rounded-xl px-3 py-3 text-base text-fg-high transition-colors hover:bg-sand-9/8 active:bg-sand-9/15";function Y(e){let i,a,s,o,l,c,d=(0,n.c)(19),{href:h,label:p,icon:f,external:m,onClick:g}=e;d[0]!==f?(i=f&&(0,t.jsx)(f,{className:"size-5 text-fg-mid"}),d[0]=f,d[1]=i):i=d[1],d[2]!==p?(a=(0,t.jsx)("span",{children:p}),d[2]=p,d[3]=a):a=d[3],d[4]!==m?(s=m&&(0,t.jsx)(u.ArrowUpRightIcon,{className:"ml-auto size-3.5 text-fg-low"}),d[4]=m,d[5]=s):s=d[5],d[6]!==i||d[7]!==a||d[8]!==s?(o=(0,t.jsxs)(t.Fragment,{children:[i,a,s]}),d[6]=i,d[7]=a,d[8]=s,d[9]=o):o=d[9];let v=o;if(m){let e;return d[10]!==v||d[11]!==h||d[12]!==g?(e=(0,t.jsx)("a",{href:h,target:"_blank",rel:"noreferrer",className:q,onClick:g,children:v}),d[10]=v,d[11]=h,d[12]=g,d[13]=e):e=d[13],e}return d[14]===Symbol.for("react.memo_cache_sentinel")?(l=["nav-lateral"],d[14]=l):l=d[14],d[15]!==v||d[16]!==h||d[17]!==g?(c=(0,t.jsx)(r.default,{href:h,transitionTypes:l,className:q,onClick:g,children:v}),d[15]=v,d[16]=h,d[17]=g,d[18]=c):c=d[18],c}function G(e){let i,r,a,s,o=(0,n.c)(14),{label:l,icon:u,trailing:c,onClick:d,className:h}=e,p=c&&"justify-between";o[0]!==h||o[1]!==p?(i=(0,g.cn)(q,p,h),o[0]=h,o[1]=p,o[2]=i):i=o[2],o[3]!==u?(r=u&&(0,t.jsx)(u,{className:"size-5 text-fg-mid"}),o[3]=u,o[4]=r):r=o[4];let f=c?"flex-1 text-left":void 0;return o[5]!==l||o[6]!==f?(a=(0,t.jsx)("span",{className:f,children:l}),o[5]=l,o[6]=f,o[7]=a):a=o[7],o[8]!==d||o[9]!==i||o[10]!==r||o[11]!==a||o[12]!==c?(s=(0,t.jsxs)("button",{type:"button",onClick:d,className:i,children:[r,a,c]}),o[8]=d,o[9]=i,o[10]=r,o[11]=a,o[12]=c,o[13]=s):s=o[13],s}function X(e){let i,r,a,s,o=(0,n.c)(8),{label:l,onBack:c}=e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(i=(0,t.jsx)(u.ChevronLeftIcon,{}),o[0]=i):i=o[0],o[1]!==c?(r=(0,t.jsx)(d.Button,{variant:"ghost",size:"icon",onClick:c,"aria-label":"Back",children:i}),o[1]=c,o[2]=r):r=o[2],o[3]!==l?(a=(0,t.jsx)("span",{className:"text-base font-semibold text-fg-high",children:l}),o[3]=l,o[4]=a):a=o[4],o[5]!==r||o[6]!==a?(s=(0,t.jsxs)("div",{className:"flex items-center gap-1 pb-2 pl-1 pt-1",children:[r,a]}),o[5]=r,o[6]=a,o[7]=s):s=o[7],s}function Z(e){let r,a,d,m,g,v,y,x,C,A,E,M,_,R,I,N,L,D,F,U,W,z,H,K,Z,Q,ee,et=(0,n.c)(79),{effectiveUser:en,userEmail:ei,scope:er,ownerReady:ea,insightsPlacement:es,showDevelopers:eo,showIntegrations:el,showBroadcasts:eu,showProducts:ec}=e,[ed,eh]=(0,i.useState)(!1),[ep,ef]=(0,i.useState)(!1),[em,eg]=(0,i.useState)("main"),[ev,ey]=(0,i.useState)(1),[eb,ew]=function(){let e,t,r=(0,n.c)(3),[a,s]=(0,i.useState)(null),o=(0,i.useRef)(null);r[0]===Symbol.for("react.memo_cache_sentinel")?(e=e=>{if(o.current?.disconnect(),!e){o.current=null;return}s(e.getBoundingClientRect().height);let t=new ResizeObserver(()=>{s(e.getBoundingClientRect().height)});t.observe(e),o.current=t},r[0]=e):e=r[0];let l=e;return r[1]!==a?(t=[l,a],r[1]=a,r[2]=t):t=r[2],t}(),{theme:ex,setTheme:eC}=(0,l.useTheme)(),{items:ek}=(0,k.useIncomingCollaborators)(),eS=ek.length>0,eT=el||eu||ec,eA=(ee=(0,V.prefixFor)(er),[{id:"knowledge",label:"Knowledge",href:`${ee}/knowledge`,icon:u.KnowledgeIcon},{id:"audience",label:"Audience",href:`${ee}/audience`,icon:u.AudienceIcon},..."hidden"===es?[]:[{id:"dashboard",label:"Insights",href:(0,V.insightsHref)(er,es),icon:u.InsightsIcon}],{id:"settings",label:"Settings",href:`${ee}/settings`,icon:u.SettingsIcon}]);et[0]!==er?(r=(0,V.prefixFor)(er),et[0]=er,et[1]=r):r=et[1];let eE=r,{plan:eM}=(0,T.useCurrentPlan)(er?.ownerId);et[2]!==eM?(a=(0,w.buildAskDaraHref)((0,S.planLabel)(eM)),et[2]=eM,et[3]=a):a=et[3];let e_=a;et[4]===Symbol.for("react.memo_cache_sentinel")?(d=()=>{eh(!1),setTimeout(()=>{eg("main"),ey(1)},200)},et[4]=d):d=et[4];let eR=d;et[5]===Symbol.for("react.memo_cache_sentinel")?(m=e=>{ey(1),eg(e)},et[5]=m):m=et[5];let eI=m;et[6]===Symbol.for("react.memo_cache_sentinel")?(g=()=>{ey(-1),eg("main")},et[6]=g):g=et[6];let ej=g;et[7]!==eR?(v=()=>{eR(),ef(!0)},et[7]=eR,et[8]=v):v=et[8];let eV=v;et[9]!==eR?(y=async()=>{eR(),await b.authClient.signOut(),window.location.href="/discover"},et[9]=eR,et[10]=y):y=et[10];let eO=y;et[11]===Symbol.for("react.memo_cache_sentinel")?(x=(0,t.jsx)(u.ChevronRightIcon,{className:"size-3 text-fg-mid"}),et[11]=x):x=et[11];let eP=x;et[12]!==eE||et[13]!==el?(C=el&&{id:"integrations",label:"Integrations",icon:u.IntegrationsIcon,href:`${eE}/integrations`}
2,et[12]=eE,et[13]=el,et[14]=C):C=et[14],et[15]!==eE||et[16]!==eu?(A=eu&&{id:"broadcasts",label:"Broadcasts",icon:u.BroadcastsIcon,href:`${eE}/broadcasts`},et[15]=eE,et[16]=eu,et[17]=A):A=et[17],et[18]!==eE||et[19]!==ec?(E=ec&&{id:"products",label:"Products",icon:u.ProductsIcon,href:`${eE}/products`},et[18]=eE,et[19]=ec,et[20]=E):E=et[20],et[21]!==A||et[22]!==E||et[23]!==C?(M=[C,A,E].filter(J),et[21]=A,et[22]=E,et[23]=C,et[24]=M):M=et[24];let eN=M,eL=[],eD=new Set,eF=(e,t)=>{!e||eD.has(e.id)||(eD.add(e.id),eL.push({user:e,href:t}))};for(let e of(en&&eF({...en},"/~"),ek))eF(e.user,`/@/${e.user.username}/knowledge`);let eB=er?.ownerUsername??en?.username;et[25]!==ep||et[26]!==eB?(_=(0,t.jsx)(j.FeedbackDialog,{open:ep,onOpenChange:ef,ownerUsername:eB}),et[25]=ep,et[26]=eB,et[27]=_):_=et[27];let e$=h.Drawer;et[28]===Symbol.for("react.memo_cache_sentinel")?(R=(0,t.jsx)(h.DrawerTrigger,{asChild:!0,children:(0,t.jsx)("button",{type:"button","aria-label":"More",className:"flex size-12 items-center justify-center rounded-2xl text-fg-mid transition-colors hover:bg-sand-9/7 hover:text-fg-high",children:(0,t.jsx)(u.BarsStaggeredIcon,{className:"size-5"})})}),et[28]=R):R=et[28];let eU=h.DrawerContent;et[29]===Symbol.for("react.memo_cache_sentinel")?(I=(0,t.jsxs)("div",{className:"sr-only",children:[(0,t.jsx)(h.DrawerTitle,{children:"More"}),(0,t.jsx)(h.DrawerDescription,{children:"Account and workspace navigation"})]}),et[29]=I):I=et[29];let eW=o.motion,ez=ew??"auto";et[30]!==ez?(N={height:ez},et[30]=ez,et[31]=N):N=et[31],et[32]===Symbol.for("react.memo_cache_sentinel")?(L={duration:.2,ease:"easeInOut"},et[32]=L):L=et[32];let eH=s.AnimatePresence,eK="main"===em&&(0,t.jsxs)(o.motion.div,{custom:ev,variants:B,transition:$,initial:"initial",animate:"animate",exit:"exit",className:"flex flex-col gap-0.5 pt-2",children:[ea?(0,t.jsxs)(t.Fragment,{children:[eA.map(e=>(0,t.jsx)(Y,{href:e.href,label:e.label,icon:e.icon,onClick:eR},e.id)),eo&&(0,t.jsx)(Y,{href:`${eE}/actions`,label:"Actions",icon:u.ActionsIcon,onClick:eR})]}):(0,t.jsx)(Y,{href:"/onboarding",label:"Create Your Delphi",icon:u.PlusIcon,onClick:eR}),(0,t.jsx)(f.Separator,{className:"my-2"}),eT&&(0,t.jsx)(G,{label:"Advanced",trailing:eP,onClick:()=>eI("advanced")}),eS&&(0,t.jsx)(G,{label:"Switch Minds",trailing:eP,onClick:()=>eI("switchMinds")}),(0,t.jsx)(G,{label:"Appearance",trailing:eP,onClick:()=>eI("appearance")}),(0,t.jsx)(G,{label:"Get Help",trailing:eP,onClick:()=>eI("getHelp")}),(0,t.jsx)(f.Separator,{className:"my-2"}),(0,t.jsx)(G,{label:"Give Feedback",icon:u.ThumbsUpIcon,onClick:eV}),(0,t.jsx)(f.Separator,{className:"my-2"}),(0,t.jsxs)("button",{type:"button",onClick:eO,className:q,children:[(0,t.jsx)(u.ArrowRightFromBracketIcon,{className:"size-5 text-fg-mid"}),(0,t.jsx)("span",{className:"shrink-0 whitespace-nowrap",children:"Log Out"}),ei&&(0,t.jsx)("span",{className:"ml-auto min-w-0 truncate text-xs text-fg-low",children:ei})]})]},"main");et[33]!==eN||et[34]!==ej||et[35]!==eR||et[36]!==ev||et[37]!==em?(D="advanced"===em&&(0,t.jsxs)(o.motion.div,{custom:ev,variants:B,transition:$,initial:"initial",animate:"animate",exit:"exit",className:"flex flex-col gap-0.5 pt-2",children:[(0,t.jsx)(X,{label:"Advanced",onBack:ej}),eN.map(e=>(0,t.jsx)(Y,{href:e.href,label:e.label,icon:e.icon,onClick:eR},e.id))]},"advanced"),et[33]=eN,et[34]=ej,et[35]=eR,et[36]=ev,et[37]=em,et[38]=D):D=et[38];let eq="switchMinds"===em&&(0,t.jsxs)(o.motion.div,{custom:ev,variants:B,transition:$,initial:"initial",animate:"animate",exit:"exit",className:"flex flex-col gap-0.5 pt-2",children:[(0,t.jsx)(X,{label:"Switch Minds",onBack:ej}),(0,t.jsx)(p.ScrollArea,{className:"h-[60vh]",children:(0,t.jsx)("div",{className:"flex flex-col gap-0.5 pb-2 pr-2",children:eL.map(e=>{let{user:n,href:i}=e;return(0,t.jsxs)("button",{type:"button",onClick:()=>{var e;return e={username:n.username,destination:i},void(eR(),(0,O.switchAccount)(e))},className:q,children:[(0,t.jsxs)(c.Avatar,{className:"shrink-0 border border-subtle bg-transparent",children:[n.image?(0,t.jsx)(c.AvatarImage,{src:n.image,alt:n.name??n.username}):null,(0,t.jsx)(c.AvatarFallback,{className:"rounded-[33%] bg-sand-3 text-[10px] font-semibold text-sand-12",children:(n.name?.trim()||n.username).charAt(0).toUpperCase()})]}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate text-left",children:n.name?.trim()||n.username}),(0,t.jsx)("span",{className:"max-w-32 shrink-0 truncate text-xs text-fg-mid",children:n.username})]},n.id)})})})]},"switchMinds");return et[39]!==ej||et[40]!==ev||et[41]!==eC||et[42]!==ex||et[43]!==em?(F="appearance"===em&&(0,t.jsxs)(o.motion.div,{custom:ev,variants:B,transition:$,initial:"initial",animate:"animate",exit:"exit",className:"flex flex-col gap-0.5 pt-2",children:[(0,t.jsx)(X,{label:"Appearance",onBack:ej}),P.THEME_OPTIONS.map(e=>{let{value:n,label:i,icon:r}=e;return(0,t.jsx)(G,{label:i,icon:r,trailing:(ex??"system")===n?(0,t.jsx)(u.CheckIcon,{className:"size-4 text-brand-accent"}):null,onClick:()=>eC(n)},n)})]},"appearance"),et[39]=ej,et[40]=ev,et[41]=eC,et[42]=ex,et[43]=em,et[44]=F):F=et[44],et[45]!==e_||et[46]!==ej||et[47]!==eR||et[48]!==ev||et[49]!==em?(U="getHelp"===em&&(0,t.jsxs)(o.motion.div,{custom:ev,variants:B,transition:$,initial:"initial",animate:"animate",exit:"exit",className:"flex flex-col gap-0.5 pt-2",children:[(0,t.jsx)(X,{label:"Get Help",onBack:ej}),(0,t.jsx)(Y,{href:e_,label:"Ask Dara",icon:u.CommentDotsIcon,external:!0,onClick:eR}),(0,t.jsx)(Y,{href:"mailto:[email protected]",label:"Contact Support",icon:u.LifeRingIcon,external:!0,onClick:eR}),(0,t.jsx)(Y,{href:"https://help.delphi.ai/",label:"Help Center",icon:u.BookIcon,external:!0,onClick:eR}),(0,t.jsx)(Y,{href:"/terms",label:"Terms & Privacy",icon:u.ShieldIcon,external:!0,onClick:eR})]},"getHelp"),et[45]=e_,et[46]=ej,et[47]=eR,et[48]=ev,et[49]=em,et[50]=U):U=et[50],et[51]!==eH||et[52]!==ev||et[53]!==eK||et[54]!==D||et[55]!==eq||et[56]!==F||et[57]!==U?(W=(0,t.jsxs)(eH,{mode:"popLayout",custom:ev,initial:!1,children:[eK,D,eq,F,U]}),et[51]=eH,et[52]=ev,et[53]=eK,et[54]=D,et[55]=eq,et[56]=F,et[57]=U,et[58]=W):W=et[58],et[59]!==eb||et[60]!==W?(z=(0,t.jsx)("div",{ref:eb,children:W}),et[59]=eb,et[60]=W,et[61]=z):z=et[61],et[62]!==eW.div||et[63]!==N||et[64]!==L||et[65]!==z?(H=(0,t.jsx)(eW.div,{animate:N,transition:L,className:"relative overflow-x-hidden overflow-y-auto",children:z}),et[62]=eW.div,et[63]=N,et[64]=L,et[65]=z,et[66]=H):H=et[66],et[67]!==eU||et[68]!==I||et[69]!==H?(K=(0,t.jsxs)(eU,{className:"pb-[max(env(safe-area-inset-bottom),1rem)]",children:[I,H]}),et[67]=eU,et[68]=I,et[69]=H,et[70]=K):K=et[70],et[71]!==e$||et[72]!==ed||et[73]!==R||et[74]!==K?(Z=(0,t.jsxs)(e$,{open:ed,onOpenChange:eh,direction:"bottom",children:[R,K]}),et[71]=e$,et[72]=ed,et[73]=R,et[74]=K,et[75]=Z):Z=et[75],et[76]!==_||et[77]!==Z?(Q=(0,t.jsxs)(t.Fragment,{children:[_,Z]}),et[76]=_,et[77]=Z,et[78]=Q):Q=et[78],Q}function J(e){return!!e}function Q(){return(0,C.openAddToMind)("mobile_navigation_add_button")}function ee(){return(0,C.openAddToMind)("mobile_navigation_add_button")}function et(e){return F.has(e.id)}e.s(["AppMobileBar",0,function(e){let i,r,s,o,l,u,c,d,h,p,f=(0,n.c)(35),{initialUsername:w,initialHasMind:x,initialOnboardingComplete:C,initialUserName:S,initialUserImage:T}=e,j=(0,a.usePathname)(),{data:O}=b.authClient.useSession();f[0]===Symbol.for("react.memo_cache_sentinel")?(i={...(0,y.getUsersMeOptions)(),select:D},f[0]=i):i=f[0];let{data:P}=(0,v.useQuery)(i),L=(0,R.useNavScope)(),{items:F}=(0,k.useIncomingCollaborators)(),{unreadCount:B,clearUnread:$}=(0,I.useUnreadConversation)();f[1]===Symbol.for("react.memo_cache_sentinel")?(r=(0,y.getMindMeOptions)(),f[1]=r):r=f[1];let z=(0,v.useQuery)(r),{selfHasMind:q,ownerReady:Y}=(0,V.resolveNavReadiness)({scope:L,mindQuerySucceeded:z.isSuccess,mindExists:!!z.data?.data,initialHasMind:x,meLoaded:null!=P,onboardingCompletedAt:P?.user.onboardingCompletedAt,initialOnboardingComplete:C}),{isPaid:G,isLoading:X}=(0,E.useIsPaidPlan)(L?.ownerId),J=Y&&!X&&G,en=(0,V.resolveInsightsPlacement)({ownerReady:Y,isPaidPlan:G,isPaidLoading:X}),{granted:ei}=(0,A.useFeature)("developerPlatform",L?.ownerId),er=Y&&ei,ea=O?.user?{id:O.user.id,username:O.user.username??"",name:O.user.name??null,image:O.user.image??null}:null,es=P?.user??ea??{id:"",username:w,name:S,image:T},eo=(0,V.buildMainItems)(L).filter(et),el=(0,V.resolveProfileUser)({scope:L,selfHasMind:q,incomingCollaborators:F,self:es}),eu=(0,V.buildProfileItem)(el.username||w),ec=el.name?.trim()||el.username||"",ed=(0,N.useAddKnowledgeDiscoverability)();f[2]!==j?(s=e=>"profile"===e.id?j===e.href:j.startsWith(e.href),f[2]=j,f[3]=s):s=f[3];let eh=s,ep=(0,M.useMobileBarHiddenValue)(),ef=(0,_.useNavSuppressedValue)(),em=(0,_.useNavRestoreClass)();if(ef)return(0,t.jsxs)("nav",{"data-slot":"app-mobile-bar","aria-label":"Primary",className:"fixed right-5 bottom-[max(env(safe-area-inset-bottom),0.375rem)] z-60 flex items-center gap-3 lg:hidden",children:[Y?(0,t.jsx)(H,{discoverable:ed,onClick:ee}):(0,t.jsx)(K,{}),(0,t.jsx)(Z,{effectiveUser:es,userEmail:P?.user.email??null,scope:L,ownerReady:Y,insightsPlacement:en,showDevelopers:er,showIntegrations:J,showBroadcasts:J,showProducts:J})]});let eg=ep||void 0;f[4]!==em?(o=(0,g.cn)("lg:hidden","fixed inset-x-0 bottom-0 z-40","h-20","px-3 pb-[max(env(safe-area-inset-bottom),0.375rem)]","transform-gpu transition-transform duration-250 ease-[
2cubic-bezier(0.23,1,0.32,1)]","data-[hidden]:translate-y-full",em),f[4]=em,f[5]=o):o=f[5],f[6]===Symbol.for("react.memo_cache_sentinel")?(l=(0,t.jsx)(m.ProgressiveBlur,{direction:"bottom",surfaceFade:"none",className:"absolute inset-0 -z-10"}),f[6]=l):l=f[6],f[7]!==$||f[8]!==eh||f[9]!==B?(u=e=>{let n="conversations"===e.id?{...e,badge:B,onClear:$}:e;return(0,t.jsx)(U,{item:n,active:eh(e)},e.id)},f[7]=$,f[8]=eh,f[9]=B,f[10]=u):u=f[10];let ev=eo.map(u),ey=Y?(0,t.jsx)(H,{discoverable:ed,onClick:Q}):(0,t.jsx)(K,{}),eb=eh(eu);f[11]!==W||f[12]!==ec||f[13]!==eu||f[14]!==el.image||f[15]!==eb?(c=(0,t.jsx)(W,{item:eu,active:eb,image:el.image,displayName:ec}),f[11]=W,f[12]=ec,f[13]=eu,f[14]=el.image,f[15]=eb,f[16]=c):c=f[16];let ew=P?.user.email??null;return f[17]!==es||f[18]!==en||f[19]!==Y||f[20]!==L||f[21]!==J||f[22]!==er||f[23]!==ew?(d=(0,t.jsx)(Z,{effectiveUser:es,userEmail:ew,scope:L,ownerReady:Y,insightsPlacement:en,showDevelopers:er,showIntegrations:J,showBroadcasts:J,showProducts:J}),f[17]=es,f[18]=en,f[19]=Y,f[20]=L,f[21]=J,f[22]=er,f[23]=ew,f[24]=d):d=f[24],f[25]!==ev||f[26]!==ey||f[27]!==c||f[28]!==d?(h=(0,t.jsxs)("div",{className:"mx-auto flex h-full w-full max-w-lg items-center justify-around",children:[ev,ey,c,d]}),f[25]=ev,f[26]=ey,f[27]=c,f[28]=d,f[29]=h):h=f[29],f[30]!==h||f[31]!==eg||f[32]!==o||f[33]!==l?(p=(0,t.jsxs)("nav",{"data-slot":"app-mobile-bar","data-hidden":eg,"aria-label":"Primary",className:o,children:[l,h]}),f[30]=h,f[31]=eg,f[32]=o,f[33]=l,f[34]=p):p=f[34],p}])},452933,e=>{"use strict";var t=e.i(45113),n=e.i(413701),i=e.i(17772),r=e.i(500478),a=e.i(968467),s=e.i(917356),o=e.i(403773),l=e.i(432245),u=e.i(622589),c=e.i(181241),d=e.i(269714),h=e.i(632137),p=e.i(593854),f=e.i(730684),m=e.i(669876),g=e.i(690437);e.i(754466);var v=e.i(571758),y=e.i(102653);e.i(829875);var b=e.i(939099),w=e.i(679597);e.i(361273);var x=e.i(501346),C=e.i(402503),k=e.i(273291),S=e.i(328327);e.i(800079);var T=e.i(438659),A=e.i(65880),E=e.i(497686),M=e.i(61053),_=e.i(527302);e.i(659752);var R=e.i(216501);e.i(964865);var I=e.i(861560),j=e.i(990912),V=e.i(310653),O=e.i(388991),P=e.i(951370),N=e.i(356220);let L=e=>e.data;function D(e){let i,a,s,o,l,u,d,p,f,m,g,v=(0,n.c)(32),{item:y,collapsed:b}=e,w=y.active?y.iconActive:y.icon,x=b?"size-10 justify-center p-0":"w-full px-2.5 py-2",C=y.active?"bg-sand-9/15 text-fg-high font-medium":"text-fg-mid font-normal hover:bg-sand-9/7 hover:text-fg-high";v[0]!==x||v[1]!==C?(i=(0,h.cn)("flex items-center gap-3 rounded-xl transition-colors outline-none",x,C),v[0]=x,v[1]=C,v[2]=i):i=v[2];let k=i,S=!!y.badge&&y.badge>0,T=y.badge&&y.badge>99?"99+":y.badge;v[3]===Symbol.for("react.memo_cache_sentinel")?(a=["nav-lateral"],v[3]=a):a=v[3],v[4]!==y?(s=()=>y.onClear?.(),v[4]=y,v[5]=s):s=v[5],v[6]!==w?(o=(0,t.jsx)(w,{className:"h-4.5 w-auto"}),v[6]=w,v[7]=o):o=v[7],v[8]!==T||v[9]!==y.badge||v[10]!==S?(l=S&&(0,t.jsx)("span",{"aria-label":`${y.badge} unread`,className:"pointer-events-none absolute -top-1.5 -right-1.5 flex h-4 min-w-4 items-center justify-center rounded-full bg-red-9 px-1 text-[10px] font-semibold text-white tabular-nums leading-none",children:T}),v[8]=T,v[9]=y.badge,v[10]=S,v[11]=l):l=v[11],v[12]!==o||v[13]!==l?(u=(0,t.jsxs)("span",{className:"relative flex size-5 shrink-0 items-center justify-center",children:[o,l]}),v[12]=o,v[13]=l,v[14]=u):u=v[14],v[15]!==b||v[16]!==y.label?(d=!b&&(0,t.jsx)("span",{className:"text-base whitespace-nowrap",children:y.label}),v[15]=b,v[16]=y.label,v[17]=d):d=v[17],v[18]!==k||v[19]!==y.href||v[20]!==s||v[21]!==u||v[22]!==d?(p=(0,t.jsxs)(r.default,{href:y.href,className:k,transitionTypes:a,onClick:s,children:[u,d]}),v[18]=k,v[19]=y.href,v[20]=s,v[21]=u,v[22]=d,v[23]=p):p=v[23];let A=p,E=b?300:999999;return v[24]!==A?(f=(0,t.jsx)(c.TooltipTrigger,{asChild:!0,children:A}),v[24]=A,v[25]=f):f=v[25],v[26]!==y.label?(m=(0,t.jsx)(c.TooltipContent,{side:"right",sideOffset:8,children:y.label}),v[26]=y.label,v[27]=m):m=v[27],v[28]!==E||v[29]!==f||v[30]!==m?(g=(0,t.jsxs)(c.Tooltip,{delayDuration:E,children:[f,m]}),v[28]=E,v[29]=f,v[30]=m,v[31]=g):g=v[31],g}function F(e){let i,a,s,u,d,p,f,m,g,v,y,b,w,x=(0,n.c)(37),{item:C,collapsed:k,image:S,displayName:T}=e;x[0]!==T?(i=T.charAt(0).toUpperCase(),x[0]=T,x[1]=i):i=x[1];let A=i,E=k?"size-10 justify-center p-0 gap-0":"w-full gap-2 px-[5px] py-1.5",M=C.active?"bg-sand-9/15 text-fg-high font-medium":"text-fg-mid font-normal hover:bg-sand-9/7 hover:text-fg-high";x[2]!==E||x[3]!==M?(a=(0,h.cn)("flex items-center rounded-xl transition-colors outline-none",E,M),x[2]=E,x[3]=M,x[4]=a):a=x[4];let _=a,R=C.href;x[5]===Symbol.for("react.memo_cache_sentinel")?(s=["nav-lateral"],x[5]=s):s=x[5];let I=k?"size-9":"size-7.5",j=C.active&&"ring-2 ring-sand-9/20";x[6]!==I||x[7]!==j?(u=(0,h.cn)("shrink-0 border border-subtle bg-transparent",I,j),x[6]=I,x[7]=j,x[8]=u):u=x[8],x[9]!==T||x[10]!==S?(d=S?(0,t.jsx)(l.AvatarImage,{src:S,alt:T}):null,x[9]=T,x[10]=S,x[11]=d):d=x[11],x[12]!==T||x[13]!==A?(p=T?A:(0,t.jsx)(o.ProfileSolidIcon,{className:"size-4.5"}),x[12]=T,x[13]=A,x[14]=p):p=x[14],x[15]!==p?(f=(0,t.jsx)(l.AvatarFallback,{className:"rounded-[33%] bg-sand-3 text-[10px] font-semibold text-sand-12",children:p}),x[15]=p,x[16]=f):f=x[16],x[17]!==d||x[18]!==f||x[19]!==u?(m=(0,t.jsxs)(l.Avatar,{className:u,children:[d,f]}),x[17]=d,x[18]=f,x[19]=u,x[20]=m):m=x[20],x[21]!==k||x[22]!==C.label?(g=!k&&(0,t.jsx)("span",{className:"text-base whitespace-nowrap",children:C.label}),x[21]=k,x[22]=C.label,x[23]=g):g=x[23],x[24]!==_||x[25]!==C.href||x[26]!==m||x[27]!==g?(v=(0,t.jsxs)(r.default,{href:R,className:_,transitionTypes:s,children:[m,g]}),x[24]=_,x[25]=C.href,x[26]=m,x[27]=g,x[28]=v):v=x[28];let V=v,O=k?300:999999;return x[29]!==V?(y=(0,t.jsx)(c.TooltipTrigger,{asChild:!0,children:V}),x[29]=V,x[30]=y):y=x[30],x[31]!==C.label?(b=(0,t.jsx)(c.TooltipContent,{side:"right",sideOffset:8,children:C.label}),x[31]=C.label,x[32]=b):b=x[32],x[33]!==O||x[34]!==y||x[35]!==b?(w=(0,t.jsxs)(c.Tooltip,{delayDuration:O,children:[y,b]}),x[33]=O,x[34]=y,x[35]=b,x[36]=w):w=x[36],w}function B(e){let i,r,a,s,l,u,d,p=(0,n.c)(17),{collapsed:f,discoverable:m,onClick:g}=e,y=f?"size-10 justify-center p-0":"w-full px-2.5 py-2";p[0]!==y?(i=(0,h.cn)("flex items-center gap-3 rounded-xl transition-colors outline-none",y,"border bg-transparent font-medium","text-tangerine-10 hover:bg-tangerine-9/8 hover:text-tangerine-11","active:bg-tangerine-9/5 active:text-tangerine-10","border-tangerine-9/20 hover:border-tangerine-9/30 active:border-tangerine-9/50","drop-shadow-sm hover:shadow-md active:shadow-none"),p[0]=y,p[1]=i):i=p[1],p[2]!==m?(r=m?(0,t.jsx)(v.AddKnowledgeMark,{className:"size-5","aria-hidden":!0}):(0,t.jsx)(o.PlusIcon,{className:"size-5 shrink-0"}),p[2]=m,p[3]=r):r=p[3],p[4]!==f?(a=!f&&(0,t.jsx)("span",{className:"text-base whitespace-nowrap",children:"Add Knowledge"}),p[4]=f,p[5]=a):a=p[5],p[6]!==g||p[7]!==i||p[8]!==r||p[9]!==a?(s=(0,t.jsxs)("button",{type:"button",onClick:g,"aria-label":"Add Knowledge","data-analytics-action":"add-knowledge-navigation",className:i,children:[r,a]}),p[6]=g,p[7]=i,p[8]=r,p[9]=a,p[10]=s):s=p[10];let b=s,w=f?300:999999;return p[11]!==b?(l=(0,t.jsx)(c.TooltipTrigger,{asChild:!0,children:b}),p[11]=b,p[12]=l):l=p[12],p[13]===Symbol.for("react.memo_cache_sentinel")?(u=(0,t.jsx)(c.TooltipContent,{side:"right",sideOffset:8,children:"Add Knowledge"}),p[13]=u):u=p[13],p[14]!==w||p[15]!==l?(d=(0,t.jsxs)(c.Tooltip,{delayDuration:w,children:[l,u]}),p[14]=w,p[15]=l,p[16]=d):d=p[16],d}function $(e){let r,a,s,l,u,d,p,f,m,g,v=(0,n.c)(20),{collapsed:y}=e,[b,w]=(0,i.useState)(!1);v[0]===Symbol.for("react.memo_cache_sentinel")?(r=()=>w(!0),v[0]=r):r=v[0];let x=y?"size-10 justify-center p-0":"w-full px-2.5 py-2";v[1]!==x?(a=(0,h.cn)("flex items-center gap-3 rounded-xl transition-colors outline-none",x,"border bg-transparent font-medium","text-tangerine-10 hover:bg-tangerine-9/8 hover:text-tangerine-11","active:bg-tangerine-9/5 active:text-tangerine-10","border-tangerine-9/20 hover:border-tangerine-9/30 active:border-tangerine-9/50","drop-shadow-sm hover:shadow-md active:shadow-none"),v[1]=x,v[2]=a):a=v[2],v[3]===Symbol.for("react.memo_cache_sentinel")?(s=(0,t.jsx)(o.PlusIcon,{className:"size-5 shrink-0"}),v[3]=s):s=v[3],v[4]!==y?(l=!y&&(0,t.jsx)("span",{className:"text-base whitespace-nowrap",children:"Create Your Delphi"}),v[4]=y,v[5]=l):l=v[5],v[6]!==a||v[7]!==l?(u=(0,t.jsxs)("button",{type:"button",onClick:r,"aria-label":"Create Your Delphi",className:a,children:[s,l]}),v[6]=a,v[7]=l,v[8]=u):u=v[8];let C=u,k=y?300:999999;return v[9]!==C?(d=(0,t.jsx)(c.TooltipTrigger,{asChild:!0,children:C}
2),v[9]=C,v[10]=d):d=v[10],v[11]===Symbol.for("react.memo_cache_sentinel")?(p=(0,t.jsx)(c.TooltipContent,{side:"right",sideOffset:8,children:"Create Your Delphi"}),v[11]=p):p=v[11],v[12]!==k||v[13]!==d?(f=(0,t.jsxs)(c.Tooltip,{delayDuration:k,children:[d,p]}),v[12]=k,v[13]=d,v[14]=f):f=v[14],v[15]!==b?(m=(0,t.jsx)(N.CreateYourDelphiDialog,{open:b,onOpenChange:w}),v[15]=b,v[16]=m):m=v[16],v[17]!==f||v[18]!==m?(g=(0,t.jsxs)(t.Fragment,{children:[f,m]}),v[17]=f,v[18]=m,v[19]=g):g=v[19],g}function U(e){let a,l,d,p,f,m,g,v,y,w,x,C,k,S,T,A,E,M,_,R,j,P,N,L,D,F,B,$,U,K,q,Y,G,X,Z,J=(0,n.c)(69),{collapsed:Q,effectiveUser:ee,userEmail:et,settingsHref:en,developersHref:ei,moreInsightsHref:er,askDaraHref:ea,showDevelopers:es,activeScope:eo,ownerReady:el}=e,{theme:eu,setTheme:ec}=(0,s.useTheme)(),[ed,eh]=(0,i.useState)(!1),ep=Q?"size-10 justify-center p-0":"w-full px-2.5 py-2";J[0]!==ep?(a=(0,h.cn)("flex items-center gap-3 rounded-xl transition-colors outline-none",ep,"text-fg-mid font-normal hover:bg-sand-9/7 hover:text-fg-high","data-[state=open]:bg-sand-9/15 data-[state=open]:text-fg-high"),J[0]=ep,J[1]=a):a=J[1],J[2]===Symbol.for("react.memo_cache_sentinel")?(l=(0,t.jsx)(o.BarsStaggeredIcon,{className:"size-5 shrink-0"}),J[2]=l):l=J[2],J[3]!==Q?(d=!Q&&(0,t.jsx)("span",{className:"text-base whitespace-nowrap",children:"More"}),J[3]=Q,J[4]=d):d=J[4],J[5]!==a||J[6]!==d?(p=(0,t.jsxs)("button",{type:"button","aria-label":"More",className:a,children:[l,d]}),J[5]=a,J[6]=d,J[7]=p):p=J[7];let ef=p,em=eo?.ownerUsername??ee?.username;J[8]!==ed||J[9]!==em?(f=(0,t.jsx)(I.FeedbackDialog,{open:ed,onOpenChange:eh,ownerUsername:em}),J[8]=ed,J[9]=em,J[10]=f):f=J[10];let eg=Q?300:999999;J[11]!==ef?(m=(0,t.jsx)(c.TooltipTrigger,{asChild:!0,children:(0,t.jsx)(u.DropdownMenuTrigger,{asChild:!0,children:ef})}),J[11]=ef,J[12]=m):m=J[12],J[13]===Symbol.for("react.memo_cache_sentinel")?(g=(0,t.jsx)(c.TooltipContent,{side:"right",sideOffset:8,children:"More"}),J[13]=g):g=J[13],J[14]!==eg||J[15]!==m?(v=(0,t.jsxs)(c.Tooltip,{delayDuration:eg,children:[m,g]}),J[14]=eg,J[15]=m,J[16]=v):v=J[16],J[17]!==er?(y=null!==er&&(0,t.jsx)(u.DropdownMenuItem,{asChild:!0,children:(0,t.jsxs)(r.default,{href:er,transitionTypes:["nav-lateral"],children:[(0,t.jsx)(o.InsightsIcon,{}),(0,t.jsx)("span",{children:"Insights"})]})}),J[17]=er,J[18]=y):y=J[18],J[19]!==el||J[20]!==en?(w=(0,t.jsx)(u.DropdownMenuItem,{asChild:!0,children:el?(0,t.jsxs)(r.default,{href:en,transitionTypes:["nav-lateral"],children:[(0,t.jsx)(o.SettingsIcon,{}),(0,t.jsx)("span",{children:"Settings"})]}):(0,t.jsxs)(r.default,{href:"/onboarding",children:[(0,t.jsx)(o.PlusIcon,{}),(0,t.jsx)("span",{children:"Create Your Delphi"})]})}),J[19]=el,J[20]=en,J[21]=w):w=J[21],J[22]!==ei||J[23]!==el||J[24]!==es?(x=el&&es&&(0,t.jsx)(u.DropdownMenuItem,{asChild:!0,children:(0,t.jsxs)(r.default,{href:ei,transitionTypes:["nav-lateral"],children:[(0,t.jsx)(o.ActionsIcon,{}),(0,t.jsx)("span",{children:"Actions"})]})}),J[22]=ei,J[23]=el,J[24]=es,J[25]=x):x=J[25],J[26]===Symbol.for("react.memo_cache_sentinel")?(C=(0,t.jsx)(u.DropdownMenuSeparator,{}),J[26]=C):C=J[26],J[27]!==eo||J[28]!==ee?(k=(0,t.jsx)(b.SwitchMindsMenu,{currentUser:ee,activeScope:eo,onAccountSelect:V.switchAccount}),J[27]=eo,J[28]=ee,J[29]=k):k=J[29],J[30]===Symbol.for("react.memo_cache_sentinel")?(S=(0,t.jsx)(u.DropdownMenuSubTrigger,{children:(0,t.jsx)("span",{children:"Appearance"})}),J[30]=S):S=J[30];let ev=eu??"system";return J[31]===Symbol.for("react.memo_cache_sentinel")?(T=O.THEME_OPTIONS.map(z),J[31]=T):T=J[31],J[32]!==ec||J[33]!==ev?(A=(0,t.jsxs)(u.DropdownMenuSub,{children:[S,(0,t.jsx)(u.DropdownMenuSubContent,{children:(0,t.jsx)(u.DropdownMenuRadioGroup,{value:ev,onValueChange:ec,children:T})})]}),J[32]=ec,J[33]=ev,J[34]=A):A=J[34],J[35]===Symbol.for("react.memo_cache_sentinel")?(E=(0,t.jsx)(u.DropdownMenuSubTrigger,{children:(0,t.jsx)("span",{children:"Get Help"})}),J[35]=E):E=J[35],J[36]===Symbol.for("react.memo_cache_sentinel")?(M=(0,t.jsx)(o.CommentDotsIcon,{}),_=(0,t.jsx)("span",{children:"Ask Dara"}),R=(0,t.jsx)(o.ArrowUpRightIcon,{className:"ml-auto size-3 text-fg-low"}),J[36]=M,J[37]=_,J[38]=R):(M=J[36],_=J[37],R=J[38]),J[39]!==ea?(j=(0,t.jsx)(u.DropdownMenuItem,{asChild:!0,children:(0,t.jsxs)("a",{href:ea,target:"_blank",rel:"noreferrer",children:[M,_,R]})}),J[39]=ea,J[40]=j):j=J[40],J[41]===Symbol.for("react.memo_cache_sentinel")?(P=(0,t.jsx)(u.DropdownMenuItem,{asChild:!0,children:(0,t.jsxs)("a",{href:"mailto:[email protected]",children:[(0,t.jsx)(o.LifeRingIcon,{}),(0,t.jsx)("span",{children:"Contact Support"}),(0,t.jsx)(o.ArrowUpRightIcon,{className:"ml-auto size-3 text-fg-low"})]})}),J[41]=P):P=J[41],J[42]===Symbol.for("react.memo_cache_sentinel")?(N=(0,t.jsx)(u.DropdownMenuItem,{asChild:!0,children:(0,t.jsxs)("a",{href:"https://help.delphi.ai/",target:"_blank",rel:"noreferrer",children:[(0,t.jsx)(o.BookIcon,{}),(0,t.jsx)("span",{children:"Help Center"}),(0,t.jsx)(o.ArrowUpRightIcon,{className:"ml-auto size-3 text-fg-low"})]})}),J[42]=N):N=J[42],J[43]===Symbol.for("react.memo_cache_sentinel")?(L=(0,t.jsx)(u.DropdownMenuItem,{asChild:!0,children:(0,t.jsxs)("a",{href:"/terms",target:"_blank",rel:"noreferrer",children:[(0,t.jsx)(o.ShieldIcon,{}),(0,t.jsx)("span",{children:"Terms & Privacy"}),(0,t.jsx)(o.ArrowUpRightIcon,{className:"ml-auto size-3 text-fg-low"})]})}),J[43]=L):L=J[43],J[44]!==j?(D=(0,t.jsxs)(u.DropdownMenuSub,{children:[E,(0,t.jsxs)(u.DropdownMenuSubContent,{children:[j,P,N,L]})]}),J[44]=j,J[45]=D):D=J[45],J[46]===Symbol.for("react.memo_cache_sentinel")?(F=(0,t.jsx)(u.DropdownMenuSeparator,{}),J[46]=F):F=J[46],J[47]===Symbol.for("react.memo_cache_sentinel")?(B=(0,t.jsxs)(u.DropdownMenuItem,{onSelect:()=>eh(!0),children:[(0,t.jsx)(o.ThumbsUpIcon,{}),(0,t.jsx)("span",{children:"Give Feedback"})]}),$=(0,t.jsx)(u.DropdownMenuSeparator,{}),J[47]=B,J[48]=$):(B=J[47],$=J[48]),J[49]===Symbol.for("react.memo_cache_sentinel")?(U=(0,t.jsx)(o.ArrowRightFromBracketIcon,{}),K=(0,t.jsx)("span",{className:"shrink-0 whitespace-nowrap",children:"Log Out"}),J[49]=U,J[50]=K):(U=J[49],K=J[50]),J[51]!==et?(q=et&&(0,t.jsx)("span",{className:"ml-auto min-w-0 truncate text-xs text-fg-low",children:et}),J[51]=et,J[52]=q):q=J[52],J[53]!==q?(Y=(0,t.jsxs)(u.DropdownMenuItem,{onClick:W,children:[U,K,q]}),J[53]=q,J[54]=Y):Y=J[54],J[55]!==y||J[56]!==w||J[57]!==x||J[58]!==k||J[59]!==A||J[60]!==D||J[61]!==Y?(G=(0,t.jsxs)(u.DropdownMenuContent,{side:"right",align:"end",className:"w-72",onCloseAutoFocus:H,children:[y,w,x,C,k,A,D,F,B,$,Y]}),J[55]=y,J[56]=w,J[57]=x,J[58]=k,J[59]=A,J[60]=D,J[61]=Y,J[62]=G):G=J[62],J[63]!==v||J[64]!==G?(X=(0,t.jsxs)(u.DropdownMenu,{children:[v,G]}),J[63]=v,J[64]=G,J[65]=X):X=J[65],J[66]!==X||J[67]!==f?(Z=(0,t.jsxs)(t.Fragment,{children:[f,X]}),J[66]=X,J[67]=f,J[68]=Z):Z=J[68],Z}async function W(){await m.authClient.signOut(),window.location.href="/discover"}function z(e){let{value:n,label:i,icon:r}=e;return(0,t.jsxs)(u.DropdownMenuRadioItem,{value:n,children:[(0,t.jsx)(r,{}),(0,t.jsx)("span",{children:i})]},n)}function H(e){return e.preventDefault()}function K(){return(0,y.openAddToMind)("sidebar_add_button")}function q(){return(0,y.openAddToMind)("sidebar_add_button")}e.s(["AppSidebar",0,function(e){let i,r,s,o,l,u,c,v,y,b,I,V,O,N,W,z,H=(0,n.c)(59),{initialUsername:Y,initialHasMind:G,initialOnboardingComplete:X,initialUserName:Z,initialUserImage:J}=e,Q=(0,a.usePathname)(),{state:ee,toggleSidebar:et}=(0,d.useSidebar)(),en=(0,T.useNavHiddenValue)(),ei=(0,A.useNavSuppressedValue)(),er=(0,A.useNavRestoreClass)(),ea=(0,M.useSidebarForceCollapsedValue)();H[0]!==Q?(i=(0,_.isCallPath)(Q,Q?.split("/")[1]??""),H[0]=Q,H[1]=i):i=H[1];let es=i,eo=en||ei||es||ea||"collapsed"===ee,{data:el}=m.authClient.useSession();H[2]===Symbol.for("react.memo_cache_sentinel")?(r={...(0,f.getUsersMeOptions)(),select:L},H[2]=r):r=H[2];let{data:eu}=(0,p.useQuery)(r),ec=(0,E.useNavScope)(),{items:ed}=(0,w.useIncomingCollaborators)(),{unreadCount:eh,clearUnread:ep}=(0,R.useUnreadConversation)();H[3]===Symbol.for("react.memo_cache_sentinel")?(s=(0,f.getMindMeOptions)(),H[3]=s):s=H[3];let ef=(0,p.useQuery)(s),{selfHasMind:em,ownerReady:eg}=(0,j.resolveNavReadiness)({scope:ec,mindQuerySucceeded:ef.isSuccess,mindExists:!!ef.data?.data,initialHasMind:G,meLoaded:null!=eu,onboardingCompletedAt:eu?.user.onboardingCompletedAt,initialOnboardingComplete:X}
2),{isPaid:ev,isLoading:ey}=(0,S.useIsPaidPlan)(ec?.ownerId),{plan:eb}=(0,C.useCurrentPlan)(ec?.ownerId),{granted:ew}=(0,k.useFeature)("developerPlatform",ec?.ownerId),ex=(0,j.buildMainItems)(ec),eC=(0,j.resolveInsightsPlacement)({ownerReady:eg,isPaidPlan:ev,isPaidLoading:ey}),ek=ex.filter(e=>"discover"===e.id||"conversations"===e.id||("dashboard"===e.id?"primary"===eC:eg)),eS="more"===eC?(0,j.insightsHref)(ec,eC):null,eT=(0,j.buildPremiumItems)(ec),eA=eg&&!ey&&ev?eT:[],eE=el?.user?{id:el.user.id,username:el.user.username??"",name:el.user.name??null,image:el.user.image??null}:null,eM=eu?.user??eE??{id:"",username:Y,name:Z,image:J},e_=(0,j.resolveProfileUser)({scope:ec,selfHasMind:em,incomingCollaborators:ed,self:eM}),eR=(0,j.buildProfileItem)(e_.username||Y),eI=e_.name?.trim()||e_.username||"";H[4]!==ec?(o=(0,j.prefixFor)(ec),H[4]=ec,H[5]=o):o=H[5];let ej=o,eV=`${ej}/settings`,eO=`${ej}/actions`;H[6]!==eb?(l=(0,g.buildAskDaraHref)((0,x.planLabel)(eb)),H[6]=eb,H[7]=l):l=H[7];let eP=l,eN=(0,P.useAddKnowledgeDiscoverability)();if(ei)return(0,t.jsxs)("aside",{"data-slot":"sidebar",className:"fixed bottom-3 left-3 z-60 hidden w-12 flex-col items-center gap-4 lg:flex",children:[eg?(0,t.jsx)(B,{collapsed:!0,discoverable:eN,onClick:q}):(0,t.jsx)($,{collapsed:!0}),(0,t.jsx)(U,{collapsed:!0,effectiveUser:eM,userEmail:eu?.user.email??null,settingsHref:eV,developersHref:eO,moreInsightsHref:eS,askDaraHref:eP,showDevelopers:ew,activeScope:ec,ownerReady:eg})]});H[8]!==Q?(u=e=>"profile"===e.id||"dashboard"===e.id?Q===e.href:Q.startsWith(e.href),H[8]=Q,H[9]=u):u=H[9];let eL=u,eD=eo?"w-16":"w-56";H[10]!==er||H[11]!==eD?(c=(0,h.cn)("hidden lg:flex","fixed top-[calc(4rem+var(--impersonation-h,0px))] left-0 z-30","h-[calc(100svh-4rem-var(--impersonation-h,0px))] overflow-hidden","flex-col transition-[width] duration-200 ease-out",eD,er),H[10]=er,H[11]=eD,H[12]=c):c=H[12],H[13]!==ep||H[14]!==eo||H[15]!==eL||H[16]!==eh?(v=e=>{let n="conversations"===e.id?{...e,badge:eh,onClear:ep}:e;return(0,t.jsx)(D,{item:{...n,active:eL(e)},collapsed:eo},e.id)},H[13]=ep,H[14]=eo,H[15]=eL,H[16]=eh,H[17]=v):v=H[17];let eF=ek.map(v),eB=eL(eR);H[18]!==eR||H[19]!==eB?(y={...eR,active:eB},H[18]=eR,H[19]=eB,H[20]=y):y=H[20];let e$=e_?.image??null;H[21]!==eo||H[22]!==eI||H[23]!==y||H[24]!==e$?(b=(0,t.jsx)(F,{item:y,collapsed:eo,image:e$,displayName:eI}),H[21]=eo,H[22]=eI,H[23]=y,H[24]=e$,H[25]=b):b=H[25];let eU=eA.length>0&&(0,t.jsxs)(t.Fragment,{children:[!eo&&(0,t.jsx)("div",{className:"px-1 pt-4 pb-1 text-xs italic whitespace-nowrap text-fg-low",children:"Premium"}),eA.map(e=>(0,t.jsx)(D,{item:{...e,active:eL(e)},collapsed:eo},e.id))]});H[26]!==eF||H[27]!==b||H[28]!==eU?(I=(0,t.jsxs)("nav",{className:"flex flex-1 flex-col items-start justify-center gap-0.5 overflow-x-hidden overflow-y-auto px-3 pt-2 pb-2",children:[eF,b,eU]}),H[26]=eF,H[27]=b,H[28]=eU,H[29]=I):I=H[29],H[30]!==eN||H[31]!==eo||H[32]!==eg?(V=eg?(0,t.jsx)(B,{collapsed:eo,discoverable:eN,onClick:K}):(0,t.jsx)($,{collapsed:eo}),H[30]=eN,H[31]=eo,H[32]=eg,H[33]=V):V=H[33];let eW=eu?.user.email??null;return H[34]!==eP||H[35]!==eo||H[36]!==ew||H[37]!==eO||H[38]!==eM||H[39]!==eS||H[40]!==eg||H[41]!==ec||H[42]!==eV||H[43]!==eW?(O=(0,t.jsx)(U,{collapsed:eo,effectiveUser:eM,userEmail:eW,settingsHref:eV,developersHref:eO,moreInsightsHref:eS,askDaraHref:eP,showDevelopers:ew,activeScope:ec,ownerReady:eg}),H[34]=eP,H[35]=eo,H[36]=ew,H[37]=eO,H[38]=eM,H[39]=eS,H[40]=eg,H[41]=ec,H[42]=eV,H[43]=eW,H[44]=O):O=H[44],H[45]!==V||H[46]!==O?(N=(0,t.jsxs)("div",{className:"flex flex-col items-start gap-0.5 px-3 pb-3",children:[V,O]}),H[45]=V,H[46]=O,H[47]=N):N=H[47],H[48]!==eo||H[49]!==en||H[50]!==ei||H[51]!==ea||H[52]!==et?(W=!en&&!ei&&!ea&&(0,t.jsx)("button",{type:"button",onClick:et,"aria-label":eo?"Expand sidebar":"Collapse sidebar",className:(0,h.cn)("group absolute top-0 right-0 h-full w-1.5",eo?"cursor-e-resize":"cursor-w-resize"),children:(0,t.jsx)("span",{className:(0,h.cn)("absolute top-1/2 right-0 h-12 w-0.5 -translate-y-1/2 rounded-l","bg-sand-9/0 transition-colors group-hover:bg-sand-9/40")})}),H[48]=eo,H[49]=en,H[50]=ei,H[51]=ea,H[52]=et,H[53]=W):W=H[53],H[54]!==I||H[55]!==N||H[56]!==W||H[57]!==c?(z=(0,t.jsxs)("aside",{"data-slot":"sidebar",className:c,children:[I,N,W]}),H[54]=I,H[55]=N,H[56]=W,H[57]=c,H[58]=z):z=H[58],z}])},579950,e=>{"use strict";var t=e.i(413701),n=e.i(17772),i=e.i(968467);e.i(829875);var r=e.i(60183),a=e.i(32116);function s(e){return e.open}e.s(["InviteDeepLink",0,function(){let e,o,l,u,c=(0,t.c)(14),d=(0,i.useSearchParams)();c[0]!==d?(e=d.get("invite"),c[0]=d,c[1]=e):e=c[1];let h=e,{items:p,isLoading:f}=(0,r.usePendingInvites)(),m=(0,a.usePendingInvitesModal)(s),g=(0,i.useRouter)(),v=(0,i.usePathname)();c[2]!==h||c[3]!==p?(o=!!h&&p.some(e=>e.id===h),c[2]=h,c[3]=p,c[4]=o):o=c[4];let y=o;
2return c[5]!==y||c[6]!==h||c[7]!==f||c[8]!==m||c[9]!==v||c[10]!==g||c[11]!==d?(l=()=>{if(!h||f)return;y&&m(h);let e=new URLSearchParams(d.toString());e.delete("invite");let t=e.toString();g.replace(t?`${v}?${t}`:v)},u=[h,f,y,m,v,g,d],c[5]=y,c[6]=h,c[7]=f,c[8]=m,c[9]=v,c[10]=g,c[11]=d,c[12]=l,c[13]=u):(l=c[12],u=c[13]),(0,n.useEffect)(l,u),null}])},28665,(e,t,n)=>{var i=e.i(71042);!function(n){var r=Object.hasOwnProperty,a=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},s="object"==typeof i.default&&"function"==typeof i.default.nextTick,o="function"==typeof Symbol,l="object"==typeof Reflect,u="function"==typeof setImmediate?setImmediate:setTimeout,c=o?l&&"function"==typeof Reflect.ownKeys?Reflect.ownKeys:function(e){var t=Object.getOwnPropertyNames(e);return t.push.apply(t,Object.getOwnPropertySymbols(e)),t}:Object.keys;function d(){this._events={},this._conf&&h.call(this,this._conf)}function h(e){e&&(this._conf=e,e.delimiter&&(this.delimiter=e.delimiter),e.maxListeners!==n&&(this._maxListeners=e.maxListeners),e.wildcard&&(this.wildcard=e.wildcard),e.newListener&&(this._newListener=e.newListener),e.removeListener&&(this._removeListener=e.removeListener),e.verboseMemoryLeak&&(this.verboseMemoryLeak=e.verboseMemoryLeak),e.ignoreErrors&&(this.ignoreErrors=e.ignoreErrors),this.wildcard&&(this.listenerTree={}))}function p(e,t){var n="(node) warning: possible EventEmitter memory leak detected. "+e+" listeners added. Use emitter.setMaxListeners() to increase limit.";if(this.verboseMemoryLeak&&(n+=" Event name: "+t+"."),void 0!==i.default&&i.default.emitWarning){var r=Error(n);r.name="MaxListenersExceededWarning",r.emitter=this,r.count=e,i.default.emitWarning(r)}else console.error(n),console.trace&&console.trace()}var f=function(e,t,n){var i=arguments.length;switch(i){case 0:return[];case 1:return[e];case 2:return[e,t];case 3:return[e,t,n];default:for(var r=Array(i);i--;)r[i]=arguments[i];return r}};function m(e,t){for(var i={},r=e.length,a=t?t.length:0,s=0;s<r;s++)i[e[s]]=s<a?t[s]:n;return i}function g(e,t,n){if(this._emitter=e,this._target=t,this._listeners={},this._listenersCount=0,(n.on||n.off)&&(i=n.on,r=n.off),t.addEventListener?(i=t.addEventListener,r=t.removeEventListener):t.addListener?(i=t.addListener,r=t.removeListener):t.on&&(i=t.on,r=t.off),!i&&!r)throw Error("target does not implement any known event API");if("function"!=typeof i)throw TypeError("on method must be a function");if("function"!=typeof r)throw TypeError("off method must be a function");this._on=i,this._off=r;var i,r,a=e._observers;a?a.push(this):e._observers=[this]}function v(e,t,i,a){var s,o,l,u=Object.assign({},t);if(!e)return u;if("object"!=typeof e)throw TypeError("options must be an object");var c=Object.keys(e),d=c.length;function h(e){throw Error('Invalid "'+s+'" option value'+(e?". Reason: "+e:""))}for(var p=0;p<d;p++){if(s=c[p],!a&&!r.call(t,s))throw Error('Unknown "'+s+'" option');n!==(o=e[s])&&(l=i[s],u[s]=l?l(o,h):o)}return u}function y(e,t){return"function"==typeof e&&e.hasOwnProperty("prototype")||t("value must be a constructor"),e}function b(e){var t="value must be type of "+e.join("|"),n=e.length,i=e[0],r=e[1];return 1===n?function(e,n){if(typeof e===i)return e;n(t)}:2===n?function(e,n){var a=typeof e;if(a===i||a===r)return e;n(t)}:function(i,r){for(var a=typeof i,s=n;s-- >0;)if(a===e[s])return i;r(t)}}Object.assign(g.prototype,{subscribe:function(e,t,n){var i=this,r=this._target,a=this._emitter,s=this._listeners,o=function(){var i=f.apply(null,arguments),s={data:i,name:t,original:e};if(n){!1!==n.call(r,s)&&a.emit.apply(a,[s.name].concat(i));return}a.emit.apply(a,[t].concat(i))};if(s[e])throw Error("Event '"+e+"' is already listening");this._listenersCount++,a._newListener&&a._removeListener&&!i._onNewListener?(this._onNewListener=function(n){n===t&&null===s[e]&&(s[e]=o,i._on.call(r,e,o))},a.on("newListener",this._onNewListener),this._onRemoveListener=function(n){n===t&&!a.hasListeners(n)&&s[e]&&(s[e]=null,i._off.call(r,e,o))},s[e]=null,a.on("removeListener",this._onRemoveListener)):(s[e]=o,i._on.call(r,e,o))},unsubscribe:function(e){var t,n,i,r=this,a=this._listeners,s=this._emitter,o=this._off,l=this._target;if(e&&"string"!=typeof e)throw TypeError("event must be a string");function u(){r._onNewListener&&(s.off("newListener",r._onNewListener),s.off("removeListener",r._onRemoveListener),r._onNewListener=null,r._onRemoveListener=null);var e=k.call(s,r);s._observers.splice(e,1)}if(e){if(!(t=a[e]))return;o.call(l,e,t),delete a[e],--this._listenersCount||u()}else{for(i=(n=c(a)).length;i-- >0;)e=n[i],o.call(l,e,a[e]);this._listeners={},this._listenersCount=0,u()}}});var w=b(["function"]),x=b(["object","function"]);
2function C(e,t,n){var i,r,a,s=0,o=new e(function(l,u,c){function d(){r&&(r=null),s&&(clearTimeout(s),s=0)}i=!(n=v(n,{timeout:0,overload:!1},{timeout:function(e,t){return("number"!=typeof(e*=1)||e<0||!Number.isFinite(e))&&t("timeout must be a positive number"),e}})).overload&&"function"==typeof e.prototype.cancel&&"function"==typeof c;var h=function(e){d(),l(e)},p=function(e){d(),u(e)};i?t(h,p,c):(r=[function(e){p(e||Error("canceled"))}],t(h,p,function(e){if(a)throw Error("Unable to subscribe on cancel event asynchronously");if("function"!=typeof e)throw TypeError("onCancel callback must be a function");r.push(e)}),a=!0),n.timeout>0&&(s=setTimeout(function(){var e=Error("timeout");e.code="ETIMEDOUT",s=0,o.cancel(e),u(e)},n.timeout))});return i||(o.cancel=function(e){if(r){for(var t=r.length,n=1;n<t;n++)r[n](e);r[0](e),r=null}}),o}function k(e){var t=this._observers;if(!t)return -1;for(var n=t.length,i=0;i<n;i++)if(t[i]._target===e)return i;return -1}function S(e,t,n,i,r){if(!n)return null;if(0===i){var a=typeof t;if("string"===a){var s,o,l=0,u=0,d=this.delimiter,h=d.length;if(-1!==(o=t.indexOf(d))){s=[,,,,,];do s[l++]=t.slice(u,o),u=o+h;while(-1!==(o=t.indexOf(d,u)))s[l++]=t.slice(u),t=s,r=l}else t=[t],r=1}else"object"===a?r=t.length:(t=[t],r=1)}var p,f,m,g,v,y,b,w=null,x=t[i],C=t[i+1];if(i===r)n._listeners&&("function"==typeof n._listeners?e&&e.push(n._listeners):e&&e.push.apply(e,n._listeners),w=[n]);else if("*"===x){for(o=(y=c(n)).length;o-- >0;)"_listeners"!==(p=y[o])&&(b=S(e,t,n[p],i+1,r))&&(w?w.push.apply(w,b):w=b);return w}else if("**"===x){for((v=i+1===r||i+2===r&&"*"===C)&&n._listeners&&(w=S(e,t,n,r,r)),o=(y=c(n)).length;o-- >0;)"_listeners"!==(p=y[o])&&("*"===p||"**"===p?(n[p]._listeners&&!v&&(b=S(e,t,n[p],r,r))&&(w?w.push.apply(w,b):w=b),b=S(e,t,n[p],i,r)):b=p===C?S(e,t,n[p],i+2,r):S(e,t,n[p],i,r),b&&(w?w.push.apply(w,b):w=b));return w}else n[x]&&(w=S(e,t,n[x],i+1,r));if((f=n["*"])&&S(e,t,f,i+1,r),m=n["**"])if(i<r)for(m._listeners&&S(e,t,m,r,r),o=(y=c(m)).length;o-- >0;)"_listeners"!==(p=y[o])&&(p===C?S(e,t,m[p],i+2,r):p===x?S(e,t,m[p],i+1,r):((g={})[p]=m[p],S(e,t,{"**":g},i+1,r)));else m._listeners?S(e,t,m,r,r):m["*"]&&m["*"]._listeners&&S(e,t,m["*"],r,r);return w}function T(e,t,n){var i,r,a=0,s=0,o=this.delimiter,l=o.length;if("string"==typeof e)if(-1!==(i=e.indexOf(o))){r=[,,,,,];do r[a++]=e.slice(s,i),s=i+l;while(-1!==(i=e.indexOf(o,s)))r[a++]=e.slice(s)}else r=[e],a=1;else r=e,a=e.length;if(a>1){for(i=0;i+1<a;i++)if("**"===r[i]&&"**"===r[i+1])return}var u,c=this.listenerTree;for(i=0;i<a;i++)if(c=c[u=r[i]]||(c[u]={}),i===a-1){c._listeners?("function"==typeof c._listeners&&(c._listeners=[c._listeners]),n?c._listeners.unshift(t):c._listeners.push(t),!c._listeners.warned&&this._maxListeners>0&&c._listeners.length>this._maxListeners&&(c._listeners.warned=!0,p.call(this,c._listeners.length,u))):c._listeners=t;break}return!0}function A(e,t,n,i){for(var r,a,s,o,l=c(e),u=l.length,d=e._listeners;u-- >0;)r=e[a=l[u]],s="_listeners"===a?n:n?n.concat(a):[a],o=i||"symbol"==typeof a,d&&t.push(o?s:s.join(this.delimiter)),"object"==typeof r&&A.call(this,r,t,s,o);return t}function E(e){for(var t,n,i,r=c(e),a=r.length;a-- >0;)(t=e[n=r[a]])&&(i=!0,"_listeners"===n||E(t)||delete e[n]);return i}function M(e,t,n){this.emitter=e,this.event=t,this.listener=n}function _(e,t,r){if(!0===r)o=!0;else if(!1===r)a=!0;else{if(!r||"object"!=typeof r)throw TypeError("options should be an object or true");var a=r.async,o=r.promisify,l=r.nextTick,c=r.objectify}if(a||l||o){var d=t,h=t._origin||t;if(l&&!s)throw Error("process.nextTick is not supported");n===o&&(o="AsyncFunction"===t.constructor.name),(t=function(){var e=arguments,t=this,n=this.event;return o?l?Promise.resolve():new Promise(function(e){u(e)}).then(function(){return t.event=n,d.apply(t,e)}):(l?i.default.nextTick:u)(function(){t.event=n,d.apply(t,e)})})._async=!0,t._origin=h}return[t,c?new M(this,e,t):this]}function R(e){this._events={},this._newListener=!1,this._removeListener=!1,this.verboseMemoryLeak=!1,h.call(this,e)}M.prototype.off=function(){return this.emitter.off(this.event,this.listener),this},R.EventEmitter2=R,R.prototype.listenTo=function(e,t,i){if("object"!=typeof e)throw TypeError("target musts be an object");var r=this;return i=v(i,{on:n,off:n,reducers:n},{on:w,off:w,reducers:x}),function(t){if("object"!=typeof t)throw TypeError("events must be an object");var n,a,s=i.reducers,o=k.call(r,e);
2n=-1===o?new g(r,e,i):r._observers[o];for(var l=c(t),u=l.length,d="function"==typeof s,h=0;h<u;h++)a=l[h],n.subscribe(a,t[a]||a,d?s:s&&s[a])}(a(t)?m(t):"string"==typeof t?m(t.split(/\s+/)):t),this},R.prototype.stopListeningTo=function(e,t){var n,i=this._observers;if(!i)return!1;var r=i.length,a=!1;if(e&&"object"!=typeof e)throw TypeError("target should be an object");for(;r-- >0;)n=i[r],e&&n._target!==e||(n.unsubscribe(t),a=!0);return a},R.prototype.delimiter=".",R.prototype.setMaxListeners=function(e){n!==e&&(this._maxListeners=e,this._conf||(this._conf={}),this._conf.maxListeners=e)},R.prototype.getMaxListeners=function(){return this._maxListeners},R.prototype.event="",R.prototype.once=function(e,t,n){return this._once(e,t,!1,n)},R.prototype.prependOnceListener=function(e,t,n){return this._once(e,t,!0,n)},R.prototype._once=function(e,t,n,i){return this._many(e,1,t,n,i)},R.prototype.many=function(e,t,n,i){return this._many(e,t,n,!1,i)},R.prototype.prependMany=function(e,t,n,i){return this._many(e,t,n,!0,i)},R.prototype._many=function(e,t,n,i,r){var a=this;if("function"!=typeof n)throw Error("many only accepts instances of Function");function s(){return 0==--t&&a.off(e,s),n.apply(this,arguments)}return s._origin=n,this._on(e,s,i,r)},R.prototype.emit=function(){if(!this._events&&!this._all)return!1;this._events||d.call(this);var e,t,n,i,r,a,s,l=arguments[0],u=this.wildcard;if("newListener"===l&&!this._newListener&&!this._events.newListener)return!1;if(u&&(s=l,"newListener"!==l&&"removeListener"!==l&&"object"==typeof l)){if(t=l.length,o){for(n=0;n<t;n++)if("symbol"==typeof l[n]){r=!0;break}}r||(l=l.join(this.delimiter))}var c=arguments.length;if(this._all&&this._all.length)for(n=0,t=(a=this._all.slice()).length;n<t;n++)switch(this.event=l,c){case 1:a[n].call(this,l);break;case 2:a[n].call(this,l,arguments[1]);break;case 3:a[n].call(this,l,arguments[1],arguments[2]);break;default:a[n].apply(this,arguments)}if(u)a=[],S.call(this,a,s,this.listenerTree,0,t);else{if("function"==typeof(a=this._events[l])){switch(this.event=l,c){case 1:a.call(this);break;case 2:a.call(this,arguments[1]);break;case 3:a.call(this,arguments[1],arguments[2]);break;default:for(i=1,e=Array(c-1);i<c;i++)e[i-1]=arguments[i];a.apply(this,e)}return!0}a&&(a=a.slice())}if(a&&a.length){if(c>3)for(i=1,e=Array(c-1);i<c;i++)e[i-1]=arguments[i];for(n=0,t=a.length;n<t;n++)switch(this.event=l,c){case 1:a[n].call(this);break;case 2:a[n].call(this,arguments[1]);break;case 3:a[n].call(this,arguments[1],arguments[2]);break;default:a[n].apply(this,e)}return!0}if(!this.ignoreErrors&&!this._all&&"error"===l)if(arguments[1]instanceof Error)throw arguments[1];else throw Error("Uncaught, unspecified 'error' event.");return!!this._all},R.prototype.emitAsync=function(){if(!this._events&&!this._all)return!1;this._events||d.call(this);var e,t,n,i,r,a,s,l=arguments[0],u=this.wildcard;if("newListener"===l&&!this._newListener&&!this._events.newListener)return Promise.resolve([!1]);if(u&&(a=l,"newListener"!==l&&"removeListener"!==l&&"object"==typeof l)){if(t=l.length,o){for(n=0;n<t;n++)if("symbol"==typeof l[n]){s=!0;break}}s||(l=l.join(this.delimiter))}var c=[],h=arguments.length;if(this._all)for(n=0,t=this._all.length;n<t;n++)switch(this.event=l,h){case 1:c.push(this._all[n].call(this,l));break;case 2:c.push(this._all[n].call(this,l,arguments[1]));break;case 3:c.push(this._all[n].call(this,l,arguments[1],arguments[2]));break;default:c.push(this._all[n].apply(this,arguments))}if(u?(r=[],S.call(this,r,a,this.listenerTree,0)):r=this._events[l],"function"==typeof r)switch(this.event=l,h){case 1:c.push(r.call(this));break;case 2:c.push(r.call(this,arguments[1]));break;case 3:c.push(r.call(this,arguments[1],arguments[2]));break;default:for(i=1,e=Array(h-1);i<h;i++)e[i-1]=arguments[i];c.push(r.apply(this,e))}else if(r&&r.length){if(r=r.slice(),h>3)for(i=1,e=Array(h-1);i<h;i++)e[i-1]=arguments[i];for(n=0,t=r.length;n<t;n++)switch(this.event=l,h){case 1:c.push(r[n].call(this));break;case 2:c.push(r[n].call(this,arguments[1]));break;case 3:c.push(r[n].call(this,arguments[1],arguments[2]));break;default:c.push(r[n].apply(this,e))}}else if(!this.ignoreErrors&&!this._all&&"error"===l)if(arguments[1]instanceof Error)return Promise.reject(arguments[1]);else return Promise.reject("Uncaught, unspecified 'error' event.");return Promise.all(c)},R.prototype.on=function(e,t,n){return this._on(e,t,!1,n)},R.prototype.prependListener=function(e,t,n){return this._on(e,t,!0,n)},R.prototype.onAny=function(e){return this._onAny(e,!1)},R.prototype.prependAny=function(e){return this._onAny(e,!0)},R.prototype.addListener=R.prototype.on,R.prototype._onAny=function(e,t){if("function"!=typeof e)throw Error("onAny only accepts instances of Function");return this._all||(this._all=[]),t?this._all.unshift(e):this._all.push(e),this},R.prototype._on=function(e,t,i,r){if("function"==typeof e)return this._onAny(e,t),this;if("function"!=typeof t)throw Error("on only accepts instances of Function");this._events||d.call(this);var a,s=this;return(n!==r&&(t=(a=_.call(this,e,t,r))[0],s=a[1]),this._newListener&&this.emit
2("newListener",e,t),this.wildcard)?T.call(this,e,t,i):this._events[e]?("function"==typeof this._events[e]&&(this._events[e]=[this._events[e]]),i?this._events[e].unshift(t):this._events[e].push(t),!this._events[e].warned&&this._maxListeners>0&&this._events[e].length>this._maxListeners&&(this._events[e].warned=!0,p.call(this,this._events[e].length,e))):this._events[e]=t,s},R.prototype.off=function(e,t){if("function"!=typeof t)throw Error("removeListener only takes instances of Function");var n,i=[];if(this.wildcard){var r="string"==typeof e?e.split(this.delimiter):e.slice();if(!(i=S.call(this,null,r,this.listenerTree,0)))return this}else{if(!this._events[e])return this;n=this._events[e],i.push({_listeners:n})}for(var s=0;s<i.length;s++){var o=i[s];if(a(n=o._listeners)){for(var l=-1,u=0,c=n.length;u<c;u++)if(n[u]===t||n[u].listener&&n[u].listener===t||n[u]._origin&&n[u]._origin===t){l=u;break}if(l<0)continue;return this.wildcard?o._listeners.splice(l,1):this._events[e].splice(l,1),0===n.length&&(this.wildcard?delete o._listeners:delete this._events[e]),this._removeListener&&this.emit("removeListener",e,t),this}(n===t||n.listener&&n.listener===t||n._origin&&n._origin===t)&&(this.wildcard?delete o._listeners:delete this._events[e],this._removeListener&&this.emit("removeListener",e,t))}return this.listenerTree&&E(this.listenerTree),this},R.prototype.offAny=function(e){var t,n=0,i=0;if(e&&this._all&&this._all.length>0){for(n=0,i=(t=this._all).length;n<i;n++)if(e===t[n]){t.splice(n,1),this._removeListener&&this.emit("removeListenerAny",e);break}}else{if(t=this._all,this._removeListener)for(n=0,i=t.length;n<i;n++)this.emit("removeListenerAny",t[n]);this._all=[]}return this},R.prototype.removeListener=R.prototype.off,R.prototype.removeAllListeners=function(e){if(n===e)return this._events&&d.call(this),this;if(this.wildcard){var t,i=S.call(this,null,e,this.listenerTree,0);if(!i)return this;for(t=0;t<i.length;t++)i[t]._listeners=null;this.listenerTree&&E(this.listenerTree)}else this._events&&(this._events[e]=null);return this},R.prototype.listeners=function(e){var t,i,r,a,s,o=this._events;if(n===e){if(this.wildcard)throw Error("event name required for wildcard emitter");if(!o)return[];for(a=(t=c(o)).length,r=[];a-- >0;)"function"==typeof(i=o[t[a]])?r.push(i):r.push.apply(r,i);return r}if(this.wildcard){if(!(s=this.listenerTree))return[];var l=[],u="string"==typeof e?e.split(this.delimiter):e.slice();return S.call(this,l,u,s,0),l}return o&&(i=o[e])?"function"==typeof i?[i]:i:[]},R.prototype.eventNames=function(e){var t=this._events;return this.wildcard?A.call(this,this.listenerTree,[],null,e):t?c(t):[]},R.prototype.listenerCount=function(e){return this.listeners(e).length},R.prototype.hasListeners=function(e){if(this.wildcard){var t=[],i="string"==typeof e?e.split(this.delimiter):e.slice();return S.call(this,t,i,this.listenerTree,0),t.length>0}var r=this._events,a=this._all;return!!(a&&a.length||r&&(n===e?c(r).length:r[e]))},R.prototype.listenersAny=function(){return this._all?this._all:[]},R.prototype.waitFor=function(e,t){var i=this,r=typeof t;return"number"===r?t={timeout:t}:"function"===r&&(t={filter:t}),C((t=v(t,{timeout:0,filter:n,handleError:!1,Promise:Promise,overload:!1},{filter:w,Promise:y})).Promise,function(n,r,a){function s(){var a=t.filter;if(!a||a.apply(i,arguments))if(i.off(e,s),t.handleError){var o=arguments[0];o?r(o):n(f.apply(null,arguments).slice(1))}else n(f.apply(null,arguments))}a(function(){i.off(e,s)}),i._on(e,s,!1)},{timeout:t.timeout,overload:t.overload})};var I=R.prototype;if(Object.defineProperties(R,{defaultMaxListeners:{get:function(){return I._maxListeners},set:function(e){if("number"!=typeof e||e<0||Number.isNaN(e))throw TypeError("n must be a non-negative number");I._maxListeners=e},enumerable:!0},once:{value:function(e,t,n){return C((n=v(n,{Promise:Promise,timeout:0,overload:!1},{Promise:y})).Promise,function(n,i,r){if("function"==typeof e.addEventListener){a=function(){n(f.apply(null,arguments))},r(function(){e.removeEventListener(t,a)}),e.addEventListener(t,a,{once:!0});return}var a,s,o=function(){s&&e.removeListener("error",s),n(f.apply(null,arguments))};"error"!==t&&(s=function(n){e.removeListener(t,o),i(n)},e.once("error",s)),r(function(){s&&e.removeListener("error",s),e.removeListener(t,o)}),e.once(t,o)},{timeout:n.timeout,overload:n.overload})},writable:!0,configurable:!0}}),Object.defineProperties(I,{_maxListeners:{value:10,writable:!0,configurable:!0},_observers:{value:null,writable:!0,configurable:!0}}),"function"==typeof define&&define.amd)e.r,n!==R&&e.v(R);
2else t.exports=R}()},660591,(e,t,n)=>{"use strict";let i=new Set(["ENOTFOUND","ENETUNREACH","UNABLE_TO_GET_ISSUER_CERT","UNABLE_TO_GET_CRL","UNABLE_TO_DECRYPT_CERT_SIGNATURE","UNABLE_TO_DECRYPT_CRL_SIGNATURE","UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY","CERT_SIGNATURE_FAILURE","CRL_SIGNATURE_FAILURE","CERT_NOT_YET_VALID","CERT_HAS_EXPIRED","CRL_NOT_YET_VALID","CRL_HAS_EXPIRED","ERROR_IN_CERT_NOT_BEFORE_FIELD","ERROR_IN_CERT_NOT_AFTER_FIELD","ERROR_IN_CRL_LAST_UPDATE_FIELD","ERROR_IN_CRL_NEXT_UPDATE_FIELD","OUT_OF_MEM","DEPTH_ZERO_SELF_SIGNED_CERT","SELF_SIGNED_CERT_IN_CHAIN","UNABLE_TO_GET_ISSUER_CERT_LOCALLY","UNABLE_TO_VERIFY_LEAF_SIGNATURE","CERT_CHAIN_TOO_LONG","CERT_REVOKED","INVALID_CA","PATH_LENGTH_EXCEEDED","INVALID_PURPOSE","CERT_UNTRUSTED","CERT_REJECTED","HOSTNAME_MISMATCH"]);t.exports=e=>!i.has(e&&e.code)},65932,(e,t,n)=>{"use strict";t.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;if(Array.isArray(t)){if((i=t.length)!=n.length)return!1;for(r=i;0!=r--;)if(!e(t[r],n[r]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((i=(a=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(r=i;0!=r--;)if(!Object.prototype.hasOwnProperty.call(n,a[r]))return!1;for(r=i;0!=r--;){var i,r,a,s=a[r];if(!e(t[s],n[s]))return!1}return!0}return t!=t&&n!=n}},351853,(e,t,n)=>{var i=0/0,r=/^\s+|\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,o=/^0o[0-7]+$/i,l=parseInt,u=e.g&&e.g.Object===Object&&e.g,c="object"==typeof self&&self&&self.Object===Object&&self,d=u||c||Function("return this")(),h=Object.prototype.toString,p=Math.max,f=Math.min,m=function(){return d.Date.now()};function g(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function v(e){if("number"==typeof e)return e;if("symbol"==typeof(t=e)||t&&"object"==typeof t&&"[object Symbol]"==h.call(t))return i;if(g(e)){var t,n="function"==typeof e.valueOf?e.valueOf():e;e=g(n)?n+"":n}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(r,"");var u=s.test(e);return u||o.test(e)?l(e.slice(2),u?2:8):a.test(e)?i:+e}t.exports=function(e,t,n){var i,r,a,s,o,l,u=0,c=!1,d=!1,h=!0;if("function"!=typeof e)throw TypeError("Expected a function");function y(t){var n=i,a=r;return i=r=void 0,u=t,s=e.apply(a,n)}function b(e){var n=e-l,i=e-u;return void 0===l||n>=t||n<0||d&&i>=a}function w(){var e,n,i,r=m();if(b(r))return x(r);o=setTimeout(w,(e=r-l,n=r-u,i=t-e,d?f(i,a-n):i))}function x(e){return(o=void 0,h&&i)?y(e):(i=r=void 0,s)}function C(){var e,n=m(),a=b(n);if(i=arguments,r=this,l=n,a){if(void 0===o)return u=e=l,o=setTimeout(w,t),c?y(e):s;if(d)return o=setTimeout(w,t),y(l)}return void 0===o&&(o=setTimeout(w,t)),s}return t=v(t)||0,g(n)&&(c=!!n.leading,a=(d="maxWait"in n)?p(v(n.maxWait)||0,t):a,h="trailing"in n?!!n.trailing:h),C.cancel=function(){void 0!==o&&clearTimeout(o),u=0,i=l=r=o=void 0},C.flush=function(){return void 0===o?s:x(m())},C}},727447,125227,832234,764579,29114,329397,e=>{"use strict";let t,n,i,r,a,s,o,l,u,c,d,h,p,f,m,g;var v,y=e.i(28665);let b=/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/;function w(e,{baseDelayMs:t,maxDelayMs:n,minDelayMs:i=250}){let r=Math.min(n,t*Math.pow(2,Math.max(0,e-1)));return r<=i?i:i+Math.floor(Math.random()*(r-i))}var x=((t=x||{}).loading="loading",t.fetchMore="fetchMore",t.ready="ready",t.error="error",t);function C(e){return["loading","fetchMore"].includes(e)}e.s(["NetworkStatus",0,x,"isRequestInFlight",0,C],125227);class k{constructor(e){this.listeners=new Set,this._subscriptions=[],this.lastSeenDepValues=[],this.getDepVals=()=>{let e=this.options.deps.length,t=Array(e),n=Array(e);for(let i=0;i<e;i++){let e=this.options.deps[i];t[i]=e.prevState,n[i]=e.state}return this.lastSeenDepValues=n,{prevDepVals:t,currDepVals:n,prevVal:this.prevState??void 0}},this.recompute=()=>{var e,t;this.prevState=this.state;let n=this.getDepVals();this.state=this.options.fn(n),null==(t=(e=this.options).onUpdate)||t.call(e)},this.checkIfRecalculationNeededDeeply=()=>{for(let e of this.options.deps)e instanceof k&&e.checkIfRecalculationNeededDeeply();let e=!1,t=this.lastSeenDepValues,{currDepVals:n}=this.getDepVals();for(let i=0;i<n.length;i++)if(n[i]!==t[i]){e=!0;break}e&&this.recompute()},this.mount=()=>(this.registerOnGraph(),this.checkIfRecalculationNeededDeeply(),()=>{for(let e of(this.unregisterFromGraph(),this._subscriptions))e()}),this.subscribe=e=>{var t,n;this.listeners.add(e);let i=null==(n=(t=this.options).onSubscribe)?void 0:n.call(t,e,this);return()=>{this.listeners.delete(e),null==i||i()}},this.options=e,this.state=e.fn({prevDepVals:void 0,prevVal:void 0,currDepVals:this.getDepVals().currDepVals})}registerOnGraph(e=this.options.deps){for(let t of e)if(t instanceof k)t.registerOnGraph(),this.registerOnGraph(t.options.deps);else if(t instanceof R){let e=S.get(t);e||(e=new Set,S.set(t,e)),e.add(this);let n=T.get(this);n||(n=new Set,T.set(this,n)),n.add(t)}}unregisterFromGraph(e=this.options.deps){for(let t of e)if(t instanceof k)this.unregisterFromGraph(t.options.deps);else if(t instanceof R){let e=S.get(t);e&&e.delete(this);let n=T.get(this);n&&n.delete(t)}}}let S=new WeakMap,T=new WeakMap,A={current:[]},E=!1,M=new Set,_=new Map;class R{constructor(e,t){this.listeners=new Set,this.subscribe=e=>{var t,n;this.listeners.add(e);let i=null==(n=null==(t=this.options)?void 0:t.onSubscribe)?void 0:n.call(t,e,this);return()=>{this.listeners.delete(e),null==i||i()}},this.prevState=e,this.state=e,this.options=t}setState(e){var t,n,i;(this.prevState=this.state,null==(t=this.options)?void 0:t.updateFn)?this.state=this.options.updateFn(this.prevState)(e):"function"==typeof e?this.state=e(this.prevState):this.state=e,null==(i=null==(n=this.options)?void 0:n.onUpdate)||i.call(n),function(e){if(M.add(e),
2!E)try{for(E=!0;M.size>0;){let e=Array.from(M);for(let t of(M.clear(),e)){let e=_.get(t)??t.prevState;t.prevState=e,function(e){let t={prevVal:e.prevState,currentVal:e.state};for(let n of e.listeners)n(t)}(t)}for(let t of e){let e=S.get(t);e&&(A.current.push(t),function e(t){for(let n of Array.from(t).sort((e,t)=>e instanceof k&&e.options.deps.includes(t)?1:t instanceof k&&t.options.deps.includes(e)?-1:0)){if(A.current.includes(n))continue;A.current.push(n),n.recompute();let t=T.get(n);if(t)for(let n of t){let t=S.get(n);t&&e(t)}}}(e))}for(let t of e){let e=S.get(t);if(e)for(let t of e)!function(e){let t={prevVal:e.prevState,currentVal:e.state};for(let n of e.listeners)n(t)}(t)}}}finally{E=!1,A.current=[],_.clear()}}(this)}}var I=Object.defineProperty,j=(e,t,n)=>{let i;return(i="symbol"!=typeof t?t+"":t)in e?I(e,i,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[i]=n};let V="new-message",O=[V];class P{constructor(e){j(this,"channels"),j(this,"params"),j(this,"inbox"),this.socket=e,this.channels={},this.params={},this.inbox=new R({})}join(e){let t=e.socketChannelTopic,n=e.referenceId,i=e.defaultOptions;this.socket.isConnected()||this.socket.connect(),this.params[t]||(this.params[t]={});let r=this.params[t][n],a=!r||JSON.stringify(r)!==JSON.stringify(i);if(a&&(this.params[t]={...this.params[t],[n]:i}),!this.channels[t]||a){let e=this.socket.channel(t,this.params[t]);for(let t of O)e.on(t,e=>this.setInbox(e));this.channels[t]=e}let s=this.channels[t];return["closed","errored"].includes(s.state)&&s.join(),this.inbox.subscribe(()=>{let t=this.inbox.state[n];t&&e.handleSocketEvent(t)})}leave(e){var t;null==(t=e.unsubscribeFromSocketEvents)||t.call(e);let n=e.socketChannelTopic,i=e.referenceId,r={...this.params},a=r[n]||{};a[i]&&delete a[i];let s={...this.channels},o=s[n];if(o&&0===Object.keys(a).length){for(let e of O)o.off(e);o.leave(),delete s[n]}this.params=r,this.channels=s}setInbox(e){let{attn:t,...n}=e;this.inbox.setState(()=>t.reduce((e,t)=>({...e,[t]:n}),{}))}}function N(e){let{inserted_at_date_range:t,...n}=e;if(!t)return n;let i={},r=t.inclusive??!1;return t.start&&(i[r?"inserted_at.gte":"inserted_at.gt"]=t.start),t.end&&(i[r?"inserted_at.lte":"inserted_at.lt"]=t.end),{...n,...i}}var L=Object.defineProperty;let D={shouldSetPage:!0,shouldAppend:!1},F={items:[],metadata:{total_count:0,unread_count:0,unseen_count:0},pageInfo:{before:null,after:null,page_size:50},loading:!1,networkStatus:x.ready,setResult:()=>{},setMetadata:()=>{},setNetworkStatus:()=>{},resetStore:()=>{},setItemAttrs:()=>{}};class B{constructor(e){((e,t,n)=>{let i;return(i="symbol"!=typeof t?t+"":t)in e?L(e,i,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[i]=n})(this,"store"),this.store=e}getState(){return this.store.state}setState(e){this.store.setState("function"==typeof e?e:()=>e)}getInitialState(){return F}subscribe(e){return this.store.subscribe(t=>e(t.currentVal))}}var $=Object.defineProperty,U=(e,t,n)=>{let i;return(i="symbol"!=typeof t?t+"":t)in e?$(e,i,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[i]=n};let W={archived:"exclude",mode:"compact"};class z{constructor(e,t,n,i){U(this,"defaultOptions"),U(this,"referenceId"),U(this,"unsubscribeFromSocketEvents"),U(this,"socketManager"),U(this,"userFeedId"),U(this,"broadcaster"),U(this,"broadcastChannel"),U(this,"hasSubscribedToRealTimeUpdates",!1),U(this,"store"),this.knock=e,this.feedId=t,t&&function(e){return b.test(e)}(t)||this.knock.log("[Feed] Invalid or missing feedId provided to the Feed constructor. The feed should be a UUID of an in-app feed channel (`in_app_feed`) found in the Knock dashboard. Please provide a valid feedId to the Feed constructor.",!0),this.feedId=t,this.userFeedId=this.buildUserFeedId(),this.referenceId="client_"+((e=21)=>{let t="",n=0|e;for(;n--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t})(),this.socketManager=i,this.store=function(){let e;return new B(((e=new R(F)).setState(t=>({...t,networkStatus:x.ready,loading:!1,setNetworkStatus:t=>e.setState(e=>({...e,networkStatus:t,loading:t===x.loading})),setResult:({entries:t,meta:n,page_info:i},r=D)=>e.setState(e=>{let a,s=r.shouldAppend?(a={},e.items.concat(t).reduce((e,t)=>
2a[t.id]?e:(a[t.id]=!0,[...e,t]),[])).sort((e,t)=>new Date(t.inserted_at).getTime()-new Date(e.inserted_at).getTime()):t;return{...e,items:s,metadata:n,pageInfo:r.shouldSetPage?i:e.pageInfo,loading:!1,networkStatus:x.ready}}),setMetadata:t=>e.setState(e=>({...e,metadata:t})),resetStore:(t=F.metadata)=>e.setState(()=>({...F,setResult:e.state.setResult,setMetadata:e.state.setMetadata,setNetworkStatus:e.state.setNetworkStatus,resetStore:e.state.resetStore,setItemAttrs:e.state.setItemAttrs,metadata:t})),setItemAttrs:(t,n)=>{let i=t.reduce((e,t)=>({...e,[t]:n}),{});return e.setState(e=>{let t=e.items.map(e=>i[e.id]?{...e,...i[e.id]}:e);return{...e,items:t}})}})),e))}(),this.broadcaster=new y.default({wildcard:!0,delimiter:"."}),this.defaultOptions={...W,...N(n)},this.knock.log(`[Feed] Initialized a feed on channel ${t}`),this.initializeRealtimeConnection(),this.setupBroadcastChannel()}reinitialize(e){this.socketManager=e,this.userFeedId=this.buildUserFeedId(),this.initializeRealtimeConnection(),this.setupBroadcastChannel()}teardown(){var e;this.knock.log("[Feed] Tearing down feed instance"),null==(e=this.socketManager)||e.leave(this),this.broadcastChannel&&this.broadcastChannel.close()}dispose(){this.knock.log("[Feed] Disposing of feed instance"),this.teardown(),this.broadcaster.removeAllListeners(),this.knock.feeds.removeInstance(this)}listenForUpdates(){var e;(this.knock.log("[Feed] Connecting to real-time service"),this.hasSubscribedToRealTimeUpdates=!0,this.knock.isAuthenticated())?this.unsubscribeFromSocketEvents=null==(e=this.socketManager)?void 0:e.join(this):this.knock.log("[Feed] User is not authenticated, skipping listening for updates")}on(e,t){this.broadcaster.on(e,t)}off(e,t){this.broadcaster.off(e,t)}getState(){return this.store.getState()}async markAsSeen(e){let t=new Date().toISOString();return this.optimisticallyPerformStatusUpdate(e,"seen",{seen_at:t},"unseen_count"),this.makeStatusUpdate(e,"seen")}async markAllAsSeen(){let{metadata:e,items:t,...n}=this.store.getState();if("unseen"===this.defaultOptions.status)n.resetStore({...e,total_count:0,unseen_count:0});else{n.setMetadata({...e,unseen_count:0});let i={seen_at:new Date().toISOString()},r=t.map(e=>e.id);n.setItemAttrs(r,i)}let i=await this.makeBulkStatusUpdate("seen");return this.emitEvent("all_seen",t),i}async markAsUnseen(e){return this.optimisticallyPerformStatusUpdate(e,"unseen",{seen_at:null},"unseen_count"),this.makeStatusUpdate(e,"unseen")}async markAsRead(e){let t=new Date().toISOString();return this.optimisticallyPerformStatusUpdate(e,"read",{read_at:t},"unread_count"),this.makeStatusUpdate(e,"read")}async markAllAsRead(){let{metadata:e,items:t,...n}=this.store.getState();if("unread"===this.defaultOptions.status)n.resetStore({...e,total_count:0,unread_count:0});else{n.setMetadata({...e,unread_count:0});let i={read_at:new Date().toISOString()},r=t.map(e=>e.id);n.setItemAttrs(r,i)}let i=await this.makeBulkStatusUpdate("read");return this.emitEvent("all_read",t),i}async markAsUnread(e){return this.optimisticallyPerformStatusUpdate(e,"unread",{read_at:null},"unread_count"),this.makeStatusUpdate(e,"unread")}async markAsInteracted(e,t){let n=new Date().toISOString();return this.optimisticallyPerformStatusUpdate(e,"interacted",{read_at:n,interacted_at:n},"unread_count"),this.makeStatusUpdate(e,"interacted",t)}async markAsArchived(e){let t=this.store.getState(),n="exclude"===this.defaultOptions.archived,i=Array.isArray(e)?e:[e],r=i.map(e=>e.id);if(n){let e=i.filter(e=>!e.seen_at).length,n=i.filter(e=>!e.read_at).length,a={...t.metadata,total_count:Math.max(0,t.metadata.total_count-i.length),unseen_count:Math.max(0,t.metadata.unseen_count-e),unread_count:Math.max(0,t.metadata.unread_count-n)},s=t.items.filter(e=>!r.includes(e.id));t.setResult({entries:s,meta:a,page_info:t.pageInfo})}else t.setItemAttrs(r,{archived_at:new Date().toISOString()});return this.makeStatusUpdate(e,"archived")}async markAllAsArchived(){let{items:e,...t}=this.store.getState();if("exclude"===this.defaultOptions.archived)t.resetStore();else{let n=e.map(e=>e.id);t.setItemAttrs(n,{archived_at:new Date().toISOString()})}let n=await this.makeBulkStatusUpdate("archive");
2return this.emitEvent("all_archived",e),n}async markAllReadAsArchived(){let{items:e,...t}=this.store.getState(),n=e.filter(e=>null===e.read_at).map(e=>e.id);if(t.setItemAttrs(n,{archived_at:new Date().toISOString()}),"exclude"===this.defaultOptions.archived){let i=e.filter(e=>!n.includes(e.id)),r={...t.metadata,total_count:i.length,unread_count:0};t.setResult({entries:i,meta:r,page_info:t.pageInfo})}return await this.makeBulkStatusUpdate("archive")}async markAsUnarchived(e){let t=this.store.getState(),n=Array.isArray(e)?e:[e],i=n.map(e=>e.id);if("only"===this.defaultOptions.archived){let e=n.filter(e=>!e.seen_at).length,r=n.filter(e=>!e.read_at).length,a={...t.metadata,total_count:Math.max(0,t.metadata.total_count-n.length),unseen_count:Math.max(0,t.metadata.unseen_count-e),unread_count:Math.max(0,t.metadata.unread_count-r)},s=t.items.filter(e=>!i.includes(e.id));t.setResult({entries:s,meta:a,page_info:t.pageInfo})}else this.optimisticallyPerformStatusUpdate(e,"unarchived",{archived_at:null});return this.makeStatusUpdate(e,"unarchived")}async fetch(e={}){var t;let{networkStatus:n,...i}=this.store.getState();if(!this.knock.isAuthenticated())return void this.knock.log("[Feed] User is not authenticated, skipping fetch");if(C(n))return void this.knock.log("[Feed] Request is in flight, skipping fetch");i.setNetworkStatus(e.__loadingType??x.loading);let r="object"==typeof(t={...this.defaultOptions,...e}).trigger_data?JSON.stringify(t.trigger_data):"string"==typeof(null==t?void 0:t.trigger_data)?t.trigger_data:void 0,a={...this.defaultOptions,...N(e),trigger_data:r,__loadingType:void 0,__fetchSource:void 0,__experimentalCrossBrowserUpdates:void 0},s=await this.knock.client().makeRequest({method:"GET",url:`/v1/users/${this.knock.userId}/feeds/${this.feedId}`,params:a});if("error"===s.statusCode||!s.body)return i.setNetworkStatus(x.error),{status:s.statusCode,data:s.error||s.body};let o={entries:s.body.entries,meta:s.body.meta,page_info:s.body.page_info};e.before?i.setResult(o,{shouldSetPage:!1,shouldAppend:!0}):e.after?i.setResult(o,{shouldSetPage:!0,shouldAppend:!0}):i.setResult(o),this.broadcast("messages.new",o);let l="socket"===e.__fetchSource?"items.received.realtime":"items.received.page",u={items:o.entries,metadata:o.meta,event:l};return this.broadcast(u.event,u),{data:o,status:s.statusCode}}async fetchNextPage(e={}){let{pageInfo:t}=this.store.getState();t.after&&this.fetch({...e,after:t.after,__loadingType:x.fetchMore})}get socketChannelTopic(){return`feeds:${this.userFeedId}`}broadcast(e,t){this.broadcaster.emit(e,t)}async onNewMessageReceived({data:e}){var t;this.knock.log("[Feed] Received new real-time message");let{items:n,...i}=this.store.getState(),r=n[0],a=null==(t=e[this.referenceId])?void 0:t.metadata;a&&i.setMetadata(a),this.fetch({before:null==r?void 0:r.__cursor,__fetchSource:"socket"})}buildUserFeedId(){return`${this.feedId}:${this.knock.userId}`}optimisticallyPerformStatusUpdate(e,t,n,i){let r=this.store.getState(),a=Array.isArray(e)?e:[e],s=a.map(e=>e.id);if(i){let{metadata:e}=r,n=a.filter(e=>{switch(t){case"seen":return null===e.seen_at;case"unseen":return null!==e.seen_at;case"read":case"interacted":return null===e.read_at;case"unread":return null!==e.read_at;default:return!0}}),s=t.startsWith("un")?n.length:-n.length;r.setMetadata({...e,[i]:Math.max(0,e[i]+s)})}r.setItemAttrs(s,n)}async makeStatusUpdate(e,t,n){let i=Array.isArray(e)?e:[e],r=i.map(e=>e.id),a=await this.knock.messages.batchUpdateStatuses(r,t,{metadata:n});return this.emitEvent(t,i),a}async makeBulkStatusUpdate(e){let t={user_ids:[this.knock.userId],engagement_status:"all"!==this.defaultOptions.status?this.defaultOptions.status:void 0,archived:this.defaultOptions.archived,has_tenant:this.defaultOptions.has_tenant,tenants:this.defaultOptions.tenant?[this.defaultOptions.tenant]:void 0};return await this.knock.messages.bulkUpdateAllStatusesInChannel({channelId:this.feedId,status:e,options:t})}setupBroadcastChannel(){this.broadcastChannel="u">typeof self&&"BroadcastChannel"in self?new BroadcastChannel(`knock:feed:${this.userFeedId}`):null,this.broadcastChannel&&!0===this.defaultOptions.__experimentalCrossBrowserUpdates&&(this.broadcastChannel.onmessage=e=>{switch(e.data.type){case"items:archived":case"items:unarchived":case"items:seen":case"items:unseen":case"items:read":case"items:unread":case"items:all_read":case"items:all_seen":case"items:all_archived":return this.fetch();default:return null}})}broadcastOverChannel(e,t){if(this.broadcastChannel)try{let n=JSON.parse(JSON.stringify(t));this.broadcastChannel.postMessage({type:e,payload:n})}catch(t){console.warn(`Could not broadcast ${e}, got error: ${t}`)}}initializeRealtimeConnection(){var e;this.socketManager&&this.hasSubscribedToRealTimeUpdates&&this.knock.isAuthenticated()&&(this.unsubscribeFromSocketEvents=null==(e=this.socketManager)?void 0:e.join(this))}async handleSocketEvent(e){e.event!==V?e.event:this.onNewMessageReceived(e)}emitEvent(e,t){this.broadcaster.emit(`items.${e}`,{items:t}),this.broadcaster.emit(`items:${e}`,{items:t}),this.broadcastOverChannel(`items:${e}`,{items:t})}}var H=Object.defineProperty,K=(e,t,n)=>{let i;return(i="symbol"!=typeof t?t+"":t)in e?H(e,i,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[i]=n};class q{constructor(e){K(this,"instance"),K(this,"feedInstances",[]),K(this,"socketManager"),this.instance=e}initialize(e,t={}){this.initSocketManager();let n=new z(this.instance,e,t,this.socketManager);return this.feedInstances.push(n),n}removeInstance(e){this.feedInstances=this.feedInstances.filter(t=>t!==e)}teardownInstances(){for(let e of this.feedInstances)e.teardown()}reinitializeInstances(){var e;
2for(let t of this.feedInstances)null==(e=this.socketManager)||e.leave(t);for(let e of(this.socketManager=void 0,this.initSocketManager(),this.feedInstances))e.reinitialize(this.socketManager)}initSocketManager(){let e=this.instance.client().socket;e&&!this.socketManager&&(this.socketManager=new P(e))}}class Y extends Error{}Y.prototype.name="InvalidTokenError";var G=e.i(71042);function X(e,t){return function(){return e.apply(t,arguments)}}let{toString:Z}=Object.prototype,{getPrototypeOf:J}=Object,{iterator:Q,toStringTag:ee}=Symbol,et=(n=Object.create(null),e=>{let t=Z.call(e);return n[t]||(n[t]=t.slice(8,-1).toLowerCase())}),en=e=>(e=e.toLowerCase(),t=>et(t)===e),ei=e=>t=>typeof t===e,{isArray:er}=Array,ea=ei("undefined");function es(e){return null!==e&&!ea(e)&&null!==e.constructor&&!ea(e.constructor)&&eu(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}let eo=en("ArrayBuffer"),el=ei("string"),eu=ei("function"),ec=ei("number"),ed=e=>null!==e&&"object"==typeof e,eh=e=>{if("object"!==et(e))return!1;let t=J(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(ee in e)&&!(Q in e)},ep=en("Date"),ef=en("File"),em=en("Blob"),eg=en("FileList"),ev="u">typeof globalThis?globalThis:"u">typeof self?self:"u">typeof window?window:e.g,ey=void 0!==ev.FormData?ev.FormData:void 0,eb=en("URLSearchParams"),[ew,ex,eC,ek]=["ReadableStream","Request","Response","Headers"].map(en);function eS(e,t,{allOwnKeys:n=!1}={}){let i,r;if(null!=e)if("object"!=typeof e&&(e=[e]),er(e))for(i=0,r=e.length;i<r;i++)t.call(null,e[i],i,e);else{let r;if(es(e))return;let a=n?Object.getOwnPropertyNames(e):Object.keys(e),s=a.length;for(i=0;i<s;i++)r=a[i],t.call(null,e[r],r,e)}}function eT(e,t){let n;if(es(e))return null;t=t.toLowerCase();let i=Object.keys(e),r=i.length;for(;r-- >0;)if(t===(n=i[r]).toLowerCase())return n;return null}let eA="u">typeof globalThis?globalThis:"u">typeof self?self:"u">typeof window?window:e.g,eE=e=>!ea(e)&&e!==eA,eM=(i="u">typeof Uint8Array&&J(Uint8Array),e=>i&&e instanceof i),e_=en("HTMLFormElement"),eR=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),eI=en("RegExp"),ej=(e,t)=>{let n=Object.getOwnPropertyDescriptors(e),i={};eS(n,(n,r)=>{let a;!1!==(a=t(n,r,e))&&(i[r]=a||n)}),Object.defineProperties(e,i)},eV=en("AsyncFunction"),eO=(ox="function"==typeof setImmediate,oC=eu(eA.postMessage),ox?setImmediate:oC?(ok=`axios@${Math.random()}`,oS=[],eA.addEventListener("message",({source:e,data:t})=>{e===eA&&t===ok&&oS.length&&oS.shift()()},!1),e=>{oS.push(e),eA.postMessage(ok,"*")}):e=>setTimeout(e)),eP="u">typeof queueMicrotask?queueMicrotask.bind(eA):void 0!==G.default&&G.default.nextTick||eO,eN={isArray:er,isArrayBuffer:eo,isBuffer:es,isFormData:e=>{let t;return e&&(ey&&e instanceof ey||eu(e.append)&&("formdata"===(t=et(e))||"object"===t&&eu(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){return"u">typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&eo(e.buffer)},isString:el,isNumber:ec,isBoolean:e=>!0===e||!1===e,isObject:ed,isPlainObject:eh,isEmptyObject:e=>{if(!ed(e)||es(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:ew,isRequest:ex,isResponse:eC,isHeaders:ek,isUndefined:ea,isDate:ep,isFile:ef,isReactNativeBlob:e=>!!(e&&void 0!==e.uri),isReactNative:e=>e&&void 0!==e.getParts,isBlob:em,isRegExp:eI,isFunction:eu,isStream:e=>ed(e)&&eu(e.pipe),isURLSearchParams:eb,isTypedArray:eM,isFileList:eg,forEach:eS,merge:function e(){let{caseless:t,skipUndefined:n}=eE(this)&&this||{},i={},r=(r,a)=>{if("__proto__"===a||"constructor"===a||"prototype"===a)return;let s=t&&eT(i,a)||a;eh(i[s])&&eh(r)?i[s]=e(i[s],r):eh(r)?i[s]=e({},r):er(r)?i[s]=r.slice():n&&ea(r)||(i[s]=r)};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&eS(arguments[e],r);return i},extend:(e,t,n,{allOwnKeys:i}={})=>(eS(t,(t,i)=>{n&&eu(t)?Object.defineProperty(e,i,{value:X(t,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,i,{value:t,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:i}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,i)=>
2{e.prototype=Object.create(t.prototype,i),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,i)=>{let r,a,s,o={};if(t=t||{},null==e)return t;do{for(a=(r=Object.getOwnPropertyNames(e)).length;a-- >0;)s=r[a],(!i||i(s,e,t))&&!o[s]&&(t[s]=e[s],o[s]=!0);e=!1!==n&&J(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype)return t},kindOf:et,kindOfTest:en,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;let i=e.indexOf(t,n);return -1!==i&&i===n},toArray:e=>{if(!e)return null;if(er(e))return e;let t=e.length;if(!ec(t))return null;let n=Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{let n,i=(e&&e[Q]).call(e);for(;(n=i.next())&&!n.done;){let i=n.value;t.call(e,i[0],i[1])}},matchAll:(e,t)=>{let n,i=[];for(;null!==(n=e.exec(t));)i.push(n);return i},isHTMLForm:e_,hasOwnProperty:eR,hasOwnProp:eR,reduceDescriptors:ej,freezeMethods:e=>{ej(e,(t,n)=>{if(eu(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;if(eu(e[n])){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},toObjectSet:(e,t)=>{let n={};return(er(e)?e:String(e).split(t)).forEach(e=>{n[e]=!0}),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e*=1)?e:t,findKey:eT,global:eA,isContextDefined:eE,isSpecCompliantForm:function(e){return!!(e&&eu(e.append)&&"FormData"===e[ee]&&e[Q])},toJSONObject:e=>{let t=Array(10),n=(e,i)=>{if(ed(e)){if(t.indexOf(e)>=0)return;if(es(e))return e;if(!("toJSON"in e)){t[i]=e;let r=er(e)?[]:{};return eS(e,(e,t)=>{let a=n(e,i+1);ea(a)||(r[t]=a)}),t[i]=void 0,r}}return e};return n(e,0)},isAsyncFn:eV,isThenable:e=>e&&(ed(e)||eu(e))&&eu(e.then)&&eu(e.catch),setImmediate:eO,asap:eP,isIterable:e=>null!=e&&eu(e[Q])};var eL=e.i(117431);class eD extends Error{static from(e,t,n,i,r,a){let s=new eD(e.message,t||e.code,n,i,r);return s.cause=e,s.name=e.name,null!=e.status&&null==s.status&&(s.status=e.status),a&&Object.assign(s,a),s}constructor(e,t,n,i,r){super(e),Object.defineProperty(this,"message",{value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,t&&(this.code=t),n&&(this.config=n),i&&(this.request=i),r&&(this.response=r,this.status=r.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:eN.toJSONObject(this.config),code:this.code,status:this.status}}}eD.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",eD.ERR_BAD_OPTION="ERR_BAD_OPTION",eD.ECONNABORTED="ECONNABORTED",eD.ETIMEDOUT="ETIMEDOUT",eD.ERR_NETWORK="ERR_NETWORK",eD.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",eD.ERR_DEPRECATED="ERR_DEPRECATED",eD.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",eD.ERR_BAD_REQUEST="ERR_BAD_REQUEST",eD.ERR_CANCELED="ERR_CANCELED",eD.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",eD.ERR_INVALID_URL="ERR_INVALID_URL";let eF=eD;function eB(e){return eN.isPlainObject(e)||eN.isArray(e)}function e$(e){return eN.endsWith(e,"[]")?e.slice(0,-2):e}function eU(e,t,n){return e?e.concat(t).map(function(e,t){return e=e$(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}let eW=eN.toFlatObject(eN,{},null,function(e){return/^is[A-Z]/.test(e)}),ez=function(e,t,n){if(!eN.isObject(e))throw TypeError("target must be an object");t=t||new FormData;let i=(n=eN.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!eN.isUndefined(t[e])})).metaTokens,r=n.visitor||u,a=n.dots,s=n.indexes,o=(n.Blob||"u">typeof Blob&&Blob)&&eN.isSpecCompliantForm(t);if(!eN.isFunction(r))throw TypeError("visitor must be a function");function l(e){if(null===e)return"";if(eN.isDate(e))return e.toISOString();if(eN.isBoolean(e))return e.toString();if(!o&&eN.isBlob(e))throw new eF("Blob is not supported. Use a Buffer instead.");return eN.isArrayBuffer(e)||eN.isTypedArray(e)?o&&"function"==typeof Blob?new Blob([e]):eL.Buffer.from(e):e}function u(e,n,r){let o=e;if(eN.isReactNative(t)&&eN.isReactNativeBlob(e))return t.append(eU(r,n,a),l(e)),!1;if(e&&!r&&"object"==typeof e)if(eN.endsWith(n,"{}"))n=i?n:n.slice(0,-2),e=JSON.stringify(e);else{var u;if(eN.isArray(e)&&(u=e,eN.isArray(u)&&!u.some(eB))||(eN.isFileList(e)||eN.endsWith(n,"[]"))&&(o=eN.toArray(e)))return n=e$(n),o.forEach(function(e,i){eN.isUndefined(e)||null===e||t.append(!0===s?eU([n],i,a):null===s?n:n+"[]",l(e))}),!1}return!!eB(e)||(t.append(eU(r,n,a),l(e)),!1)}let c=[],d=Object.assign(eW,{defaultVisitor:u,convertValue:l,isVisitable:eB});if(!eN.isObject(e))throw TypeError("data must be an object");return!function e(n,i){if(!eN.isUndefined(n)){if(-1!==c.indexOf(n))throw Error("Circular reference detected in "+i.join("."));
2c.push(n),eN.forEach(n,function(n,a){!0===(!(eN.isUndefined(n)||null===n)&&r.call(t,n,eN.isString(a)?a.trim():a,i,d))&&e(n,i?i.concat(a):[a])}),c.pop()}}(e),t};function eH(e){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function eK(e,t){this._pairs=[],e&&ez(e,this,t)}let eq=eK.prototype;function eY(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function eG(e,t,n){let i;if(!t)return e;let r=n&&n.encode||eY,a=eN.isFunction(n)?{serialize:n}:n,s=a&&a.serialize;if(i=s?s(t,a):eN.isURLSearchParams(t)?t.toString():new eK(t,a).toString(r)){let t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}eq.append=function(e,t){this._pairs.push([e,t])},eq.toString=function(e){let t=e?function(t){return e.call(this,t,eH)}:eH;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};let eX=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){eN.forEach(this.handlers,function(t){null!==t&&e(t)})}},eZ={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},eJ="u">typeof URLSearchParams?URLSearchParams:eK,eQ="u">typeof FormData?FormData:null,e0="u">typeof Blob?Blob:null,e1="u">typeof window&&"u">typeof document,e2="object"==typeof navigator&&navigator||void 0,e3=e1&&(!e2||0>["ReactNative","NativeScript","NS"].indexOf(e2.product)),e5="u">typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,e4=e1&&window.location.href||"http://localhost";e.s(["hasBrowserEnv",0,e1,"hasStandardBrowserEnv",0,e3,"hasStandardBrowserWebWorkerEnv",0,e5,"navigator",0,e2,"origin",0,e4],523020);let e9={...e.i(523020),isBrowser:!0,classes:{URLSearchParams:eJ,FormData:eQ,Blob:e0},protocols:["http","https","file","blob","url","data"]},e6=function(e){if(eN.isFormData(e)&&eN.isFunction(e.entries)){let t={};return eN.forEachEntry(e,(e,n)=>{!function e(t,n,i,r){let a=t[r++];if("__proto__"===a)return!0;let s=Number.isFinite(+a),o=r>=t.length;return(a=!a&&eN.isArray(i)?i.length:a,o)?eN.hasOwnProp(i,a)?i[a]=[i[a],n]:i[a]=n:(i[a]&&eN.isObject(i[a])||(i[a]=[]),e(t,n,i[a],r)&&eN.isArray(i[a])&&(i[a]=function(e){let t,n,i={},r=Object.keys(e),a=r.length;for(t=0;t<a;t++)i[n=r[t]]=e[n];return i}(i[a]))),!s}(eN.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0]),n,t,0)}),t}return null},e7={transitional:eZ,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){let n,i=t.getContentType()||"",r=i.indexOf("application/json")>-1,a=eN.isObject(e);if(a&&eN.isHTMLForm(e)&&(e=new FormData(e)),eN.isFormData(e))return r?JSON.stringify(e6(e)):e;if(eN.isArrayBuffer(e)||eN.isBuffer(e)||eN.isStream(e)||eN.isFile(e)||eN.isBlob(e)||eN.isReadableStream(e))return e;if(eN.isArrayBufferView(e))return e.buffer;if(eN.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();if(a){if(i.indexOf("application/x-www-form-urlencoded")>-1){var s,o;return(s=e,o=this.formSerializer,ez(s,new e9.classes.URLSearchParams,{visitor:function(e,t,n,i){return e9.isNode&&eN.isBuffer(e)?(this.append(t,e.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...o})).toString()}if((n=eN.isFileList(e))||i.indexOf("multipart/form-data")>-1){let t=this.env&&this.env.FormData;return ez(n?{"files[]":e}:e,t&&new t,this.formSerializer)}}if(a||r){t.setContentType("application/json",!1);var l=e;if(eN.isString(l))try{return(0,JSON.parse)(l),eN.trim(l)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(l)}return e}],transformResponse:[function(e){let t=this.transitional||e7.transitional,n=t&&t.forcedJSONParsing,i="json"===this.responseType;if(eN.isResponse(e)||eN.isReadableStream(e))return e;if(e&&eN.isString(e)&&(n&&!this.responseType||i)){let n=t&&t.silentJSONParsing;try{return JSON.parse(e,this.parseReviver)}catch(e){if(!n&&i){if("SyntaxError"===e.name)throw eF.from(e,eF.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:e9.classes.FormData,Blob:e9.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};
2eN.forEach(["delete","get","head","post","put","patch"],e=>{e7.headers[e]={}});let e8=eN.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),te=Symbol("internals");function tt(e){return e&&String(e).trim().toLowerCase()}function tn(e){return!1===e||null==e?e:eN.isArray(e)?e.map(tn):String(e).replace(/[\r\n]+$/,"")}function ti(e,t,n,i,r){if(eN.isFunction(i))return i.call(this,t,n);if(r&&(t=n),eN.isString(t)){if(eN.isString(i))return -1!==t.indexOf(i);if(eN.isRegExp(i))return i.test(t)}}class tr{constructor(e){e&&this.set(e)}set(e,t,n){let i=this;function r(e,t,n){let r=tt(t);if(!r)throw Error("header name must be a non-empty string");let a=eN.findKey(i,r);a&&void 0!==i[a]&&!0!==n&&(void 0!==n||!1===i[a])||(i[a||t]=tn(e))}let a=(e,t)=>eN.forEach(e,(e,n)=>r(e,n,t));if(eN.isPlainObject(e)||e instanceof this.constructor)a(e,t);else{let i;if(eN.isString(e)&&(e=e.trim())&&(i=e,!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(i.trim()))){var s;let n,i,r,o;a((o={},(s=e)&&s.split("\n").forEach(function(e){r=e.indexOf(":"),n=e.substring(0,r).trim().toLowerCase(),i=e.substring(r+1).trim(),!n||o[n]&&e8[n]||("set-cookie"===n?o[n]?o[n].push(i):o[n]=[i]:o[n]=o[n]?o[n]+", "+i:i)}),o),t)}else if(eN.isObject(e)&&eN.isIterable(e)){let n={},i,r;for(let t of e){if(!eN.isArray(t))throw TypeError("Object iterator must return a key-value pair");n[r=t[0]]=(i=n[r])?eN.isArray(i)?[...i,t[1]]:[i,t[1]]:t[1]}a(n,t)}else null!=e&&r(t,e,n)}return this}get(e,t){if(e=tt(e)){let n=eN.findKey(this,e);if(n){let e=this[n];if(!t)return e;if(!0===t){let t,n=Object.create(null),i=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
2for(;t=i.exec(e);)n[t[1]]=t[2];return n}if(eN.isFunction(t))return t.call(this,e,n);if(eN.isRegExp(t))return t.exec(e);throw TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=tt(e)){let n=eN.findKey(this,e);return!!(n&&void 0!==this[n]&&(!t||ti(this,this[n],n,t)))}return!1}delete(e,t){let n=this,i=!1;function r(e){if(e=tt(e)){let r=eN.findKey(n,e);r&&(!t||ti(n,n[r],r,t))&&(delete n[r],i=!0)}}return eN.isArray(e)?e.forEach(r):r(e),i}clear(e){let t=Object.keys(this),n=t.length,i=!1;for(;n--;){let r=t[n];(!e||ti(this,this[r],r,e,!0))&&(delete this[r],i=!0)}return i}normalize(e){let t=this,n={};return eN.forEach(this,(i,r)=>{let a=eN.findKey(n,r);if(a){t[a]=tn(i),delete t[r];return}let s=e?r.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n):String(r).trim();s!==r&&delete t[r],t[s]=tn(i),n[s]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let t=Object.create(null);return eN.forEach(this,(n,i)=>{null!=n&&!1!==n&&(t[i]=e&&eN.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){let n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){let t=(this[te]=this[te]={accessors:{}}).accessors,n=this.prototype;function i(e){let i=tt(e);if(!t[i]){let r;r=eN.toCamelCase(" "+e),["get","set","has"].forEach(t=>{Object.defineProperty(n,t+r,{value:function(n,i,r){return this[t].call(this,e,n,i,r)},configurable:!0})}),t[i]=!0}}return eN.isArray(e)?e.forEach(i):i(e),this}}function ta(e,t){let n=this||e7,i=t||n,r=tr.from(i.headers),a=i.data;return eN.forEach(e,function(e){a=e.call(n,a,r.normalize(),t?t.status:void 0)}),r.normalize(),a}function ts(e){return!!(e&&e.__CANCEL__)}tr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),eN.reduceDescriptors(tr.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),eN.freezeMethods(tr);let to=class extends eF{constructor(e,t,n){super(null==e?"canceled":e,eF.ERR_CANCELED,t,n),this.name="CanceledError",this.__CANCEL__=!0}};function tl(e,t,n){let i=n.config.validateStatus;!n.status||!i||i(n.status)?e(n):t(new eF("Request failed with status code "+n.status,[eF.ERR_BAD_REQUEST,eF.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}let tu=function(e,t){let n,i=Array(e=e||10),r=Array(e),a=0,s=0;return t=void 0!==t?t:1e3,function(o){let l=Date.now(),u=r[s];n||(n=l),i[a]=o,r[a]=l;let c=s,d=0;for(;c!==a;)d+=i[c++],c%=e;if((a=(a+1)%e)===s&&(s=(s+1)%e),l-n<t)return;let h=u&&l-u;return h?Math.round(1e3*d/h):void 0}},tc=function(e,t){let n,i,r=0,a=1e3/t,s=(t,a=Date.now())=>{r=a,n=null,i&&(clearTimeout(i),i=null),e(...t)};return[(...e)=>{let t=Date.now(),o=t-r;o>=a?s(e,t):(n=e,i||(i=setTimeout(()=>{i=null,s(n)},a-o)))},()=>n&&s(n)]},td=(e,t,n=3)=>{let i=0,r=tu(50,250);return tc(n=>{let a=n.loaded,s=n.lengthComputable?n.total:void 0,o=a-i,l=r(o);i=a,e({loaded:a,total:s,progress:s?a/s:void 0,bytes:o,rate:l||void 0,estimated:l&&s&&a<=s?(s-a)/l:void 0,event:n,lengthComputable:null!=s,[t?"download":"upload"]:!0})},n)},th=(e,t)=>{let n=null!=e;return[i=>t[0]({lengthComputable:n,total:e,loaded:i}),t[1]]},tp=e=>(...t)=>eN.asap(()=>e(...t)),tf=e9.hasStandardBrowserEnv?(r=new URL(e9.origin),a=e9.navigator&&/(msie|trident)/i.test(e9.navigator.userAgent),e=>(e=new URL(e,e9.origin),r.protocol===e.protocol&&r.host===e.host&&(a||r.port===e.port))):()=>!0,tm=e9.hasStandardBrowserEnv?{write(e,t,n,i,r,a,s){if("u"<typeof document)return;let o=[`${e}=${encodeURIComponent(t)}`];eN.isNumber(n)&&o.push(`expires=${new Date(n).toUTCString()}`),eN.isString(i)&&o.push(`path=${i}`),eN.isString(r)&&o.push(`domain=${r}`),!0===a&&o.push("secure"),eN.isString(s)&&o.push(`SameSite=${s}`),document.cookie=o.join("; ")},read(e){if("u"<typeof document)return null;let t=document.cookie.match(RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};function tg(e,t,n){let i=!("string"==typeof t&&/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t));return e&&(i||!1==n)?t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e:t}let tv=e=>e instanceof tr?{...e}:e;
2function ty(e,t){t=t||{};let n={};function i(e,t,n,i){return eN.isPlainObject(e)&&eN.isPlainObject(t)?eN.merge.call({caseless:i},e,t):eN.isPlainObject(t)?eN.merge({},t):eN.isArray(t)?t.slice():t}function r(e,t,n,r){return eN.isUndefined(t)?eN.isUndefined(e)?void 0:i(void 0,e,n,r):i(e,t,n,r)}function a(e,t){if(!eN.isUndefined(t))return i(void 0,t)}function s(e,t){return eN.isUndefined(t)?eN.isUndefined(e)?void 0:i(void 0,e):i(void 0,t)}function o(n,r,a){return a in t?i(n,r):a in e?i(void 0,n):void 0}let l={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:o,headers:(e,t,n)=>r(tv(e),tv(t),n,!0)};return eN.forEach(Object.keys({...e,...t}),function(i){if("__proto__"===i||"constructor"===i||"prototype"===i)return;let a=eN.hasOwnProp(l,i)?l[i]:r,s=a(e[i],t[i],i);eN.isUndefined(s)&&a!==o||(n[i]=s)}),n}let tb=e=>{let t=ty({},e),{data:n,withXSRFToken:i,xsrfHeaderName:r,xsrfCookieName:a,headers:s,auth:o}=t;if(t.headers=s=tr.from(s),t.url=eG(tg(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),o&&s.set("Authorization","Basic "+btoa((o.username||"")+":"+(o.password?unescape(encodeURIComponent(o.password)):""))),eN.isFormData(n)){if(e9.hasStandardBrowserEnv||e9.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(eN.isFunction(n.getHeaders)){let e=n.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach(([e,n])=>{t.includes(e.toLowerCase())&&s.set(e,n)})}}if(e9.hasStandardBrowserEnv&&(i&&eN.isFunction(i)&&(i=i(t)),i||!1!==i&&tf(t.url))){let e=r&&a&&tm.read(a);e&&s.set(r,e)}return t},tw="u">typeof XMLHttpRequest&&function(e){return new Promise(function(t,n){var i;let r,a,s,o,l,u,c=tb(e),d=c.data,h=tr.from(c.headers).normalize(),{responseType:p,onUploadProgress:f,onDownloadProgress:m}=c;function g(){o&&o(),l&&l(),c.cancelToken&&c.cancelToken.unsubscribe(r),c.signal&&c.signal.removeEventListener("abort",r)}let v=new XMLHttpRequest;function y(){if(!v)return;let i=tr.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders());tl(function(e){t(e),g()},function(e){n(e),g()},{data:p&&"text"!==p&&"json"!==p?v.response:v.responseText,status:v.status,statusText:v.statusText,headers:i,config:e,request:v}),v=null}v.open(c.method.toUpperCase(),c.url,!0),v.timeout=c.timeout,"onloadend"in v?v.onloadend=y:v.onreadystatechange=function(){!v||4!==v.readyState||(0!==v.status||v.responseURL&&0===v.responseURL.indexOf("file:"))&&setTimeout(y)},v.onabort=function(){v&&(n(new eF("Request aborted",eF.ECONNABORTED,e,v)),v=null)},v.onerror=function(t){let i=new eF(t&&t.message?t.message:"Network Error",eF.ERR_NETWORK,e,v);i.event=t||null,n(i),v=null},v.ontimeout=function(){let t=c.timeout?"timeout of "+c.timeout+"ms exceeded":"timeout exceeded",i=c.transitional||eZ;c.timeoutErrorMessage&&(t=c.timeoutErrorMessage),n(new eF(t,i.clarifyTimeoutError?eF.ETIMEDOUT:eF.ECONNABORTED,e,v)),v=null},void 0===d&&h.setContentType(null),"setRequestHeader"in v&&eN.forEach(h.toJSON(),function(e,t){v.setRequestHeader(t,e)}),eN.isUndefined(c.withCredentials)||(v.withCredentials=!!c.withCredentials),p&&"json"!==p&&(v.responseType=c.responseType),m&&([s,l]=td(m,!0),v.addEventListener("progress",s)),f&&v.upload&&([a,o]=td(f),v.upload.addEventListener("progress",a),v.upload.addEventListener("loadend",o)),(c.cancelToken||c.signal)&&(r=t=>{v&&(n(!t||t.type?new to(null,e,v):t),v.abort(),v=null)},c.cancelToken&&c.cancelToken.subscribe(r),c.signal&&(c.signal.aborted?r():c.signal.addEventListener("abort",r)));let b=(i=c.url,(u=/^([-+\w]{1,25})(:?\/\/|:)/.exec(i))&&u[1]||"");b&&-1===e9.protocols.indexOf(b)?n(new eF("Unsupported protocol "+b+":",eF.ERR_BAD_REQUEST,e)):v.send(d||null)})},tx=function*(e,t){let n,i=e.byteLength;if(!t||i<t)return void(yield e);let r=0;for(;r<i;)n=r+t,yield e.slice(r,n),r=n},tC=async function*(e,t){for await(let n of tk(e))yield*tx(n,t)},tk=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);let t=e.getReader();try{for(;;){let{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},tS=(e,t,n,i)=>{let r,a=tC(e,t),s=0,o=e=>{!r&&(r=!0,i&&i(e))};return new ReadableStream({async pull(e){try{let{done:t,value:i}=await a.next();if(t){o(),e.close();return}let r=i.byteLength;if(n){let e=s+=r;n(e)}e.enqueue(new Uint8Array(i))}catch(e){throw o(e),e}},cancel:e=>(o(e),a.return())},{highWaterMark:2})},{isFunction:tT}=eN,tA=(({Request:e,Response:t})=>({Request:e,Response:t}))(eN.global),{ReadableStream:tE,TextEncoder:tM}=eN.global,t_=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},tR=e=>{let t,{fetch:n,Request:i,Response:r}=e=eN.merge.call({skipUndefined:!0},tA,e),a=n?tT(n):"function"==typeof fetch,s=tT(i),o=tT(r);if(!a)return!1;let l=a&&tT(tE),u=a&&("function"==typeof tM?(t=new tM,e=>t.encode(e)):async e=>new Uint8Array(await new i(e).arrayBuffer())),c=s&&l&&t_(()=>{let e=!1,t=new tE,n=new i(e9.origin,{body:t,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return t.cancel(),e&&!n}),d=o&&l&&t_(()=>eN.isReadableStream(new r("").body)),h={stream:d&&(e=>e.body)};
2a&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{h[e]||(h[e]=(t,n)=>{let i=t&&t[e];if(i)return i.call(t);throw new eF(`Response type '${e}' is not supported`,eF.ERR_NOT_SUPPORT,n)})});let p=async e=>{if(null==e)return 0;if(eN.isBlob(e))return e.size;if(eN.isSpecCompliantForm(e)){let t=new i(e9.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return eN.isArrayBufferView(e)||eN.isArrayBuffer(e)?e.byteLength:(eN.isURLSearchParams(e)&&(e+=""),eN.isString(e))?(await u(e)).byteLength:void 0},f=async(e,t)=>{let n=eN.toFiniteNumber(e.getContentLength());return null==n?p(t):n};return async e=>{let t,{url:a,method:o,data:l,signal:u,cancelToken:p,timeout:m,onDownloadProgress:g,onUploadProgress:v,responseType:y,headers:b,withCredentials:w="same-origin",fetchOptions:x}=tb(e),C=n||fetch;y=y?(y+"").toLowerCase():"text";let k=((e,t)=>{let{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,i=new AbortController,r=function(e){if(!n){n=!0,s();let t=e instanceof Error?e:this.reason;i.abort(t instanceof eF?t:new to(t instanceof Error?t.message:t))}},a=t&&setTimeout(()=>{a=null,r(new eF(`timeout of ${t}ms exceeded`,eF.ETIMEDOUT))},t),s=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(r):e.removeEventListener("abort",r)}),e=null)};e.forEach(e=>e.addEventListener("abort",r));let{signal:o}=i;return o.unsubscribe=()=>eN.asap(s),o}})([u,p&&p.toAbortSignal()],m),S=null,T=k&&k.unsubscribe&&(()=>{k.unsubscribe()});try{if(v&&c&&"get"!==o&&"head"!==o&&0!==(t=await f(b,l))){let e,n=new i(a,{method:"POST",body:l,duplex:"half"});if(eN.isFormData(l)&&(e=n.headers.get("content-type"))&&b.setContentType(e),n.body){let[e,i]=th(t,td(tp(v)));l=tS(n.body,65536,e,i)}}eN.isString(w)||(w=w?"include":"omit");let n=s&&"credentials"in i.prototype,u={...x,signal:k,method:o.toUpperCase(),headers:b.normalize().toJSON(),body:l,duplex:"half",credentials:n?w:void 0};S=s&&new i(a,u);let p=await (s?C(S,x):C(a,u)),m=d&&("stream"===y||"response"===y);if(d&&(g||m&&T)){let e={};["status","statusText","headers"].forEach(t=>{e[t]=p[t]});let t=eN.toFiniteNumber(p.headers.get("content-length")),[n,i]=g&&th(t,td(tp(g),!0))||[];p=new r(tS(p.body,65536,n,()=>{i&&i(),T&&T()}),e)}y=y||"text";let A=await h[eN.findKey(h,y)||"text"](p,e);return!m&&T&&T(),await new Promise((t,n)=>{tl(t,n,{data:A,headers:tr.from(p.headers),status:p.status,statusText:p.statusText,config:e,request:S})})}catch(t){if(T&&T(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new eF("Network Error",eF.ERR_NETWORK,e,S,t&&t.response),{cause:t.cause||t});throw eF.from(t,t&&t.code,e,S,t&&t.response)}}},tI=new Map,tj=e=>{let t=e&&e.env||{},{fetch:n,Request:i,Response:r}=t,a=[i,r,n],s=a.length,o,l,u=tI;for(;s--;)o=a[s],void 0===(l=u.get(o))&&u.set(o,l=s?new Map:tR(t)),u=l;return l};tj();let tV={http:null,xhr:tw,fetch:{get:tj}};eN.forEach(tV,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});let tO=e=>`- ${e}`,tP=e=>eN.isFunction(e)||null===e||!1===e,tN=function(e,t){let n,i,{length:r}=e=eN.isArray(e)?e:[e],a={};for(let s=0;s<r;s++){let r;if(i=n=e[s],!tP(n)&&void 0===(i=tV[(r=String(n)).toLowerCase()]))throw new eF(`Unknown adapter '${r}'`);if(i&&(eN.isFunction(i)||(i=i.get(t))))break;a[r||"#"+s]=i}if(!i){let e=Object.entries(a).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));throw new eF("There is no suitable adapter to dispatch the request "+(r?e.length>1?"since :\n"+e.map(tO).join("\n"):" "+tO(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return i};function tL(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new to(null,e)}function tD(e){return tL(e),e.headers=tr.from(e.headers),e.data=ta.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),tN(e.adapter||e7.adapter,e)(e).then(function(t){return tL(e),t.data=ta.call(e,e.transformResponse,t),t.headers=tr.from(t.headers),t},function(t){return!ts(t)&&(tL(e),t&&t.response&&(t.response.data=ta.call(e,e.transformResponse,t.response),t.response.headers=tr.from(t.response.headers))),Promise.reject(t)})}let tF="1.14.0",tB={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{tB[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});let t$={};tB.transitional=function(e,t,n){function i(e,t){return"[Axios v"+tF+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,r,a)=>{if(!1===e)throw new eF(i(r," has been removed"+(t?" in "+t:"")),eF.ERR_DEPRECATED);return t&&!t$[r]&&(t$[r]=!0,console.warn(i(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,a)}},tB.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}
2`),!0)};let tU=function(e,t,n){if("object"!=typeof e)throw new eF("options must be an object",eF.ERR_BAD_OPTION_VALUE);let i=Object.keys(e),r=i.length;for(;r-- >0;){let a=i[r],s=t[a];if(s){let t=e[a],n=void 0===t||s(t,a,e);if(!0!==n)throw new eF("option "+a+" must be "+n,eF.ERR_BAD_OPTION_VALUE);continue}if(!0!==n)throw new eF("Unknown option "+a,eF.ERR_BAD_OPTION)}};class tW{constructor(e){this.defaults=e||{},this.interceptors={request:new eX,response:new eX}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=Error();let n=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}catch(e){}}throw e}}_request(e,t){let n,i;"string"==typeof e?(t=t||{}).url=e:t=e||{};let{transitional:r,paramsSerializer:a,headers:s}=t=ty(this.defaults,t);void 0!==r&&tU(r,{silentJSONParsing:tB.transitional(tB.boolean),forcedJSONParsing:tB.transitional(tB.boolean),clarifyTimeoutError:tB.transitional(tB.boolean),legacyInterceptorReqResOrdering:tB.transitional(tB.boolean)},!1),null!=a&&(eN.isFunction(a)?t.paramsSerializer={serialize:a}:tU(a,{encode:tB.function,serialize:tB.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),tU(t,{baseUrl:tB.spelling("baseURL"),withXsrfToken:tB.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=s&&eN.merge(s.common,s[t.method]);s&&eN.forEach(["delete","get","head","post","put","patch","common"],e=>{delete s[e]}),t.headers=tr.concat(o,s);let l=[],u=!0;this.interceptors.request.forEach(function(e){if("function"==typeof e.runWhen&&!1===e.runWhen(t))return;u=u&&e.synchronous;let n=t.transitional||eZ;n&&n.legacyInterceptorReqResOrdering?l.unshift(e.fulfilled,e.rejected):l.push(e.fulfilled,e.rejected)});let c=[];this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let d=0;if(!u){let e=[tD.bind(this),void 0];for(e.unshift(...l),e.push(...c),i=e.length,n=Promise.resolve(t);d<i;)n=n.then(e[d++],e[d++]);return n}i=l.length;let h=t;for(;d<i;){let e=l[d++],t=l[d++];try{h=e(h)}catch(e){t.call(this,e);break}}try{n=tD.call(this,h)}catch(e){return Promise.reject(e)}for(d=0,i=c.length;d<i;)n=n.then(c[d++],c[d++]);return n}getUri(e){return eG(tg((e=ty(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}eN.forEach(["delete","get","head","options"],function(e){tW.prototype[e]=function(t,n){return this.request(ty(n||{},{method:e,url:t,data:(n||{}).data}))}}),eN.forEach(["post","put","patch"],function(e){function t(t){return function(n,i,r){return this.request(ty(r||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:i}))}}tW.prototype[e]=t(),tW.prototype[e+"Form"]=t(!0)});class tz{constructor(e){let t;if("function"!=typeof e)throw TypeError("executor must be a function.");this.promise=new Promise(function(e){t=e});const n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t,i=new Promise(e=>{n.subscribe(e),t=e}).then(e);return i.cancel=function(){n.unsubscribe(t)},i},e(function(e,i,r){n.reason||(n.reason=new to(e,i,r),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){let e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new tz(function(t){e=t}),cancel:e}}}let tH={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,Parti
2alContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(tH).forEach(([e,t])=>{tH[t]=e});let tK=function e(t){let n=new tW(t),i=X(tW.prototype.request,n);return eN.extend(i,tW.prototype,n,{allOwnKeys:!0}),eN.extend(i,n,null,{allOwnKeys:!0}),i.create=function(n){return e(ty(t,n))},i}(e7);tK.Axios=tW,tK.CanceledError=to,tK.CancelToken=tz,tK.isCancel=ts,tK.VERSION=tF,tK.toFormData=ez,tK.AxiosError=eF,tK.Cancel=tK.CanceledError,tK.all=function(e){return Promise.all(e)},tK.spread=function(e){return function(t){return e.apply(null,t)}},tK.isAxiosError=function(e){return eN.isObject(e)&&!0===e.isAxiosError},tK.mergeConfig=ty,tK.AxiosHeaders=tr,tK.formToJSON=e=>e6(eN.isHTMLForm(e)?new FormData(e):e),tK.getAdapter=tN,tK.HttpStatusCode=tH,tK.default=tK;var tq=e.i(660591);let tY="axios-retry";function tG(e){return!(e.response||!e.code||["ERR_CANCELED","ECONNABORTED"].includes(e.code))&&(0,tq.default)(e)}let tX=["get","head","options"],tZ=tX.concat(["put","delete"]);function tJ(e){return"ECONNABORTED"!==e.code&&(!e.response||429===e.response.status||e.response.status>=500&&e.response.status<=599)}function tQ(e){return!!e.config?.method&&tJ(e)&&-1!==tZ.indexOf(e.config.method)}function t0(e){return tG(e)||tQ(e)}function t1(e){let t=e?.response?.headers["retry-after"];if(!t)return 0;let n=1e3*(Number(t)||0);return 0===n&&(n=(new Date(t).valueOf()||0)-Date.now()),Math.max(0,n)}let t2={retries:3,retryCondition:t0,retryDelay:function(e=0,t){return Math.max(0,t1(t))},shouldResetTimeout:!1,onRetry:()=>{},onMaxRetryTimesExceeded:()=>{},validateResponse:null};function t3(e,t,n=!1){var i;let r=(i=t||{},{...t2,...i,...e[tY]});return r.retryCount=r.retryCount||0,(!r.lastRequestTime||n)&&(r.lastRequestTime=Date.now()),e[tY]=r,r}async function t5(e,t){let{retries:n,retryCondition:i}=e,r=(e.retryCount||0)<n&&i(t);if("object"==typeof r)try{let e=await r;return!1!==e}catch(e){return!1}return r}async function t4(e,t,n,i){t.retryCount+=1;let{retryDelay:r,shouldResetTimeout:a,onRetry:s}=t,o=r(t.retryCount,n);if(e.defaults.agent===i.agent&&delete i.agent,e.defaults.httpAgent===i.httpAgent&&delete i.httpAgent,e.defaults.httpsAgent===i.httpsAgent&&delete i.httpsAgent,!a&&i.timeout&&t.lastRequestTime){let e=Date.now()-t.lastRequestTime,r=i.timeout-e-o;if(r<=0)return Promise.reject(n);i.timeout=r}return(i.transformRequest=[e=>e],await s(t.retryCount,n,i),i.signal?.aborted)?Promise.resolve(e(i)):new Promise(t=>{let n=()=>{clearTimeout(r),t(e(i))},r=setTimeout(()=>{t(e(i)),i.signal?.removeEventListener&&i.signal.removeEventListener("abort",n)},o);i.signal?.addEventListener&&i.signal.addEventListener("abort",n,{once:!0})})}async function t9(e,t){e.retryCount>=e.retries&&await e.onMaxRetryTimesExceeded(t,e.retryCount)}let t6=(e,t)=>({requestInterceptorId:e.interceptors.request.use(e=>(t3(e,t,!0),e[tY]?.validateResponse&&(e.validateStatus=()=>!1),e)),responseInterceptorId:e.interceptors.response.use(null,async n=>{let{config:i}=n;if(!i)return Promise.reject(n);let r=t3(i,t);return n.response&&r.validateResponse?.(n.response)?n.response:await t5(r,n)?t4(e,r,n,i):(await t9(r,n),Promise.reject(n))})});t6.isNetworkError=tG,t6.isSafeRequestError=function(e){return!!e.config?.method&&tJ(e)&&-1!==tX.indexOf(e.config.method)},t6.isIdempotentRequestError=tQ,t6.isNetworkOrIdempotentRequestError=t0,t6.exponentialDelay=function(e=0,t,n=100){let i=Math.max(2**e*n,t1(t)),r=.2*i*Math.random();return i+r},t6.linearDelay=function(e=100){return(t=0,n)=>Math.max(t*e,t1(n))},t6.isRetryableError=tJ;var t7=e=>"function"==typeof e?e:function(){return e},t8="u">typeof window?window:null,ne=("u">typeof self?self:null)||t8||globalThis,nt="closed",nn="errored",ni="joined",nr="joining",na="leaving",ns="phx_close",no="phx_error",nl="phx_reply",nu="phx_leave",nc="websocket",nd="base64url.bearer.phx.",nh=class{constructor(e,t,n,i){this.channel=e,this.event=t,this.payload=n||function(){return{}},this.receivedResp=null,this.timeout=i,this.timeoutTimer=null,this.recHo
2oks=[],this.sent=!1}resend(e){this.timeout=e,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(e,t){return this.hasReceived(e)&&t(this.receivedResp.response),this.recHooks.push({status:e,callback:t}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}matchReceive({status:e,response:t,_ref:n}){this.recHooks.filter(t=>t.status===e).forEach(e=>e.callback(t))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,e=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=e,this.matchReceive(e)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}trigger(e,t){this.channel.trigger(this.refEvent,{status:e,response:t})}},np=class{constructor(e,t){this.callback=e,this.timerCalc=t,this.timer=null,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}},nf=class{constructor(e,t,n){this.state=nt,this.topic=e,this.params=t7(t||{}),this.socket=n,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new nh(this,"phx_join",this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new np(()=>{this.socket.isConnected()&&this.rejoin()},this.socket.rejoinAfterMs),this.stateChangeRefs.push(this.socket.onError(()=>this.rejoinTimer.reset())),this.stateChangeRefs.push(this.socket.onOpen(()=>{this.rejoinTimer.reset(),this.isErrored()&&this.rejoin()})),this.joinPush.receive("ok",()=>{this.state=ni,this.rejoinTimer.reset(),this.pushBuffer.forEach(e=>e.send()),this.pushBuffer=[]}),this.joinPush.receive("error",()=>{this.state=nn,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic} ${this.joinRef()}`),this.state=nt,this.socket.remove(this)}),this.onError(e=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,e),this.isJoining()&&this.joinPush.reset(),this.state=nn,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.joinPush.receive("timeout",()=>{this.socket.hasLogger()&&this.socket.log("channel",`timeout ${this.topic} (${this.joinRef()})`,this.joinPush.timeout),new nh(this,nu,t7({}),this.timeout).send(),this.state=nn,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(nl,(e,t)=>{this.trigger(this.replyEventName(t),e)})}join(e=this.timeout){if(!this.joinedOnce)return this.timeout=e,this.joinedOnce=!0,this.rejoin(),this.joinPush;throw Error("tried to join multiple times. 'join' can only be called a single time per channel instance")}onClose(e){this.on(ns,e)}onError(e){return this.on(no,t=>e(t))}on(e,t){let n=this.bindingRef++;return this.bindings.push({event:e,ref:n,callback:t}),n}off(e,t){this.bindings=this.bindings.filter(n=>n.event!==e||void 0!==t&&t!==n.ref)}canPush(){return this.socket.isConnected()&&this.isJoined()}push(e,t,n=this.timeout){if(t=t||{},!this.joinedOnce)throw Error(`tried to push '${e}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let i=new nh(this,e,function(){return t},n);return this.canPush()?i.send():(i.startTimeout(),this.pushBuffer.push(i)),i}leave(e=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=na;let t=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(ns,"leave")},n=new nh(this,nu,t7({}),e);return n.receive("ok",()=>t()).receive("timeout",()=>t()),n.send(),this.canPush()||n.trigger("ok",{}),n}onMessage(e,t,n){return t}isMember(e,t,n,i){return this.topic===e&&(!i||i===this.joinRef()||(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:e,event:t,payload:n,joinRef:i}),!1))}joinRef(){return this.joinPush.ref}rejoin(e=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=nr,this.joinPush.resend(e))}trigger(e,t,n,i){let r=this.onMessage(e,t,n,i);if(t&&!r)throw Error("channel onMessage callbacks must return the payload, modified or unmodified");let a=this.bindings.filter(t=>t.event===e);for(let e=0;e<a.length;e++)a[e].callback(r,n,i||this.joinRef())}replyEventName(e){return`chan_reply_${e}`}isClosed(){return this.state===nt}isErrored(){return this.state===nn}isJoined(){return this.state===ni}isJoining(){return this.state===nr}isLeaving(){return this.state===na}},nm=class{static request(e,t,n,i,r,a,s){if(ne.XDomainRequest){let n=new ne.XDomainRequest;return this.xdomainRequest(n,e,t,i,r,a,s)}if(ne.XMLHttpRequest){let o=new ne.XMLHttpRequest;return this.xhrRequest(o,e,t,n,i,r,a,s)}if(ne.fetch&&ne.AbortController)return this.fetchRequest(e,t,n,i,r,a,s);throw Error("No suitable XMLHttpRequest implementation found")}static fetchRequest(e,t,n,i,r,a,s){let o={method:e,headers:n,body:i},l=null;return r&&(l=new AbortController,setTimeout(()=>l.abort(),r),o.signal=l.signal),ne.fetch(t,o).then(e=>e.text()).then(e=>this.parseJSON(e)).then(e=>s&&s(e)).catch(e=>{"AbortError"===e.name&&a?a():s&&s(null)}),l}static xdomainRequest(e,t,n,i,r,a,s){return e.timeout=r,e.open(t,n),e.onload=()=>{let t=this.parseJSON(e.responseText);s&&s(t)},a&&(e.ontimeout=a),e.onprogress=()=>{},e.send(i),e}static xhrRequest(e,t,n,i,r,a,s,o){for(let[r,s]of(e.open(t,n,!0),e.t
2imeout=a,Object.entries(i)))e.setRequestHeader(r,s);return e.onerror=()=>o&&o(null),e.onreadystatechange=()=>{4===e.readyState&&o&&o(this.parseJSON(e.responseText))},s&&(e.ontimeout=s),e.send(r),e}static parseJSON(e){if(!e||""===e)return null;try{return JSON.parse(e)}catch{return console&&console.log("failed to parse JSON response",e),null}}static serialize(e,t){let n=[];for(var i in e){if(!Object.prototype.hasOwnProperty.call(e,i))continue;let r=t?`${t}[${i}]`:i,a=e[i];"object"==typeof a?n.push(this.serialize(a,r)):n.push(encodeURIComponent(r)+"="+encodeURIComponent(a))}return n.join("&")}static appendParams(e,t){if(0===Object.keys(t).length)return e;let n=e.match(/\?/)?"&":"?";return`${e}${n}${this.serialize(t)}`}},ng=class{constructor(e,t){t&&2===t.length&&t[1].startsWith(nd)&&(this.authToken=atob(t[1].slice(nd.length))),this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.reqs=new Set,this.awaitingBatchAck=!1,this.currentBatch=null,this.currentBatchTimer=null,this.batchBuffer=[],this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(e),this.readyState=0,setTimeout(()=>this.poll(),0)}normalizeEndpoint(e){return e.replace("ws://","http://").replace("wss://","https://").replace(RegExp("(.*)/"+nc),"$1/longpoll")}endpointURL(){return nm.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(e,t,n){this.close(e,t,n),this.readyState=0}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return 1===this.readyState||0===this.readyState}poll(){let e={Accept:"application/json"};this.authToken&&(e["X-Phoenix-AuthToken"]=this.authToken),this.ajax("GET",e,null,()=>this.ontimeout(),e=>{if(e){var{status:t,token:n,messages:i}=e;if(410===t&&null!==this.token){this.onerror(410),this.closeAndRetry(3410,"session_gone",!1);return}this.token=n}else t=0;switch(t){case 200:i.forEach(e=>{setTimeout(()=>this.onmessage({data:e}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=1,this.onopen({}),this.poll();break;
2case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw Error(`unhandled poll status ${t}`)}})}send(e){"string"!=typeof e&&(e=(e=>{let t="",n=new Uint8Array(e),i=n.byteLength;for(let e=0;e<i;e++)t+=String.fromCharCode(n[e]);return btoa(t)})(e)),this.currentBatch?this.currentBatch.push(e):this.awaitingBatchAck?this.batchBuffer.push(e):(this.currentBatch=[e],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(e){this.awaitingBatchAck=!0,this.ajax("POST",{"Content-Type":"application/x-ndjson"},e.join("\n"),()=>this.onerror("timeout"),e=>{this.awaitingBatchAck=!1,e&&200===e.status?this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[]):(this.onerror(e&&e.status),this.closeAndRetry(1011,"internal server error",!1))})}close(e,t,n){for(let e of this.reqs)e.abort();this.readyState=3;let i=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:e,reason:t,wasClean:n});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,"u">typeof CloseEvent?this.onclose(new CloseEvent("close",i)):this.onclose(i)}ajax(e,t,n,i,r){let a,s=()=>{this.reqs.delete(a),i()};a=nm.request(e,this.endpointURL(),t,n,this.timeout,s,e=>{this.reqs.delete(a),this.isActive()&&r(e)}),this.reqs.add(a)}},nv={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(e,t){return e.payload.constructor===ArrayBuffer?t(this.binaryEncode(e)):t(JSON.stringify([e.join_ref,e.ref,e.topic,e.event,e.payload]))},decode(e,t){if(e.constructor===ArrayBuffer)return t(this.binaryDecode(e));{let[n,i,r,a,s]=JSON.parse(e);return t({join_ref:n,ref:i,topic:r,event:a,payload:s})}},binaryEncode(e){let{join_ref:t,ref:n,event:i,topic:r,payload:a}=e,s=this.META_LENGTH+t.length+n.length+r.length+i.length,o=new ArrayBuffer(this.HEADER_LENGTH+s),l=new DataView(o),u=0;l.setUint8(u++,this.KINDS.push),l.setUint8(u++,t.length),l.setUint8(u++,n.length),l.setUint8(u++,r.length),l.setUint8(u++,i.length),Array.from(t,e=>l.setUint8(u++,e.charCodeAt(0))),Array.from(n,e=>l.setUint8(u++,e.charCodeAt(0))),Array.from(r,e=>l.setUint8(u++,e.charCodeAt(0))),Array.from(i,e=>l.setUint8(u++,e.charCodeAt(0)));var c=new Uint8Array(o.byteLength+a.byteLength);return c.set(new Uint8Array(o),0),c.set(new Uint8Array(a),o.byteLength),c.buffer},binaryDecode(e){let t=new DataView(e),n=t.getUint8(0),i=new TextDecoder;switch(n){case this.KINDS.push:return this.decodePush(e,t,i);case this.KINDS.reply:return this.decodeReply(e,t,i);case this.KINDS.broadcast:return this.decodeBroadcast(e,t,i)}},decodePush(e,t,n){let i=t.getUint8(1),r=t.getUint8(2),a=t.getUint8(3),s=this.HEADER_LENGTH+this.META_LENGTH-1,o=n.decode(e.slice(s,s+i));s+=i;let l=n.decode(e.slice(s,s+r));s+=r;let u=n.decode(e.slice(s,s+a));return s+=a,{join_ref:o,ref:null,topic:l,event:u,payload:e.slice(s,e.byteLength)}},decodeReply(e,t,n){let i=t.getUint8(1),r=t.getUint8(2),a=t.getUint8(3),s=t.getUint8(4),o=this.HEADER_LENGTH+this.META_LENGTH,l=n.decode(e.slice(o,o+i));o+=i;let u=n.decode(e.slice(o,o+r));o+=r;let c=n.decode(e.slice(o,o+a));o+=a;let d=n.decode(e.slice(o,o+s));return o+=s,{join_ref:l,ref:u,topic:c,event:nl,payload:{status:d,response:e.slice(o,e.byteLength)}}},decodeBroadcast(e,t,n){let i=t.getUint8(1),r=t.getUint8(2),a=this.HEADER_LENGTH+2,s=n.decode(e.slice(a,a+i));a+=i;let o=n.decode(e.slice(a,a+r));return a+=r,{join_ref:null,ref:null,topic:s,event:o,payload:e.slice(a,e.byteLength)}}},ny=class{constructor(e,t={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=t.timeout||1e4,this.transport=t.transport||ne.WebSocket||ng,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=t.longPollFallbackMs,this.fallbackTimer=null,this.sessionStore=t.sessionStorage||ne&&ne.sessionStorage,this.establishedConnections=0,this.defaultEncoder=nv.encode.bind(nv),this.defaultDecoder=nv.decode.bind(nv),this.closeWasClean=!0,this.disconnecting=!1,this.binaryType=t.binaryType||"arraybuffer",this.connectClock=1,this.pageHidden=!1,this.transport!==ng?(this.encode=t.encode||this.defaultEncoder,this.decode=t.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let n=null;t8&&t8.addEventListener&&(t8.addEventListener("pagehide",e=>{this.conn&&(this.disconnect(),n=this.connectClock)}),t8.addEventListener("pageshow",e=>{n===this.connectClock&&(n=null,this.connect())}),t8.addEventListener("visibilitychange",()=>{"hidden"===document.visibilityState?this.pageHidden=!0:(this.pageHidden=!1,this.isConnected()||this.closeWasClean||this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=t.heartbeatIntervalMs||3e4,this.rejoinAfterMs=e=>t.rejoinAfterMs?t.rejoinAfterMs(e):[1e3,2e3,5e3][e-1]||1e4,this.reconnectAfterMs=e=>t.reconnectAfterMs?t.reconnectAfterMs(e):[10,50,100,150,200,250,500,1e3,2e3][e-1]||5e3,this.logger=t.logger||null,!this.logger&&t.debug&&(this.logger=(e,t,n)=>{console.log(`${e}: ${t}`,n)}),this.longpollerTimeout=t.longpollerTimeout||2e4,this.params=t7(t.params||{}),this.endPoint=`${e}/${nc}`,this.vsn=t.vsn||"2.0.0",this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new np(()=>
2{if(this.pageHidden){this.log("Not reconnecting as page is hidden!"),this.teardown();return}this.teardown(()=>this.connect())},this.reconnectAfterMs),this.authToken=t.authToken}getLongPollTransport(){return ng}replaceTransport(e){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.close(),this.conn=null),this.transport=e}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let e=nm.appendParams(nm.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return"/"!==e.charAt(0)?e:"/"===e.charAt(1)?`${this.protocol()}:${e}`:`${this.protocol()}://${location.host}${e}`}disconnect(e,t,n){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,e&&e()},t,n)}connect(e){e&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=t7(e)),(!this.conn||this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==ng?this.connectWithF
2allback(ng,this.longPollFallbackMs):this.transportConnect())}log(e,t,n){this.logger&&this.logger(e,t,n)}hasLogger(){return null!==this.logger}onOpen(e){let t=this.makeRef();return this.stateChangeCallbacks.open.push([t,e]),t}onClose(e){let t=this.makeRef();return this.stateChangeCallbacks.close.push([t,e]),t}onError(e){let t=this.makeRef();return this.stateChangeCallbacks.error.push([t,e]),t}onMessage(e){let t=this.makeRef();return this.stateChangeCallbacks.message.push([t,e]),t}ping(e){if(!this.isConnected())return!1;let t=this.makeRef(),n=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:t});let i=this.onMessage(r=>{r.ref===t&&(this.off([i]),e(Date.now()-n))});return!0}transportName(e){return e===ng?"LongPoll":e.name}transportConnect(){let e;this.connectClock++,this.closeWasClean=!1,this.authToken&&(e=["phoenix",`${nd}${btoa(this.authToken).replace(/=/g,"")}`]),this.conn=new this.transport(this.endPointURL(),e),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=e=>this.onConnError(e),this.conn.onmessage=e=>this.onConnMessage(e),this.conn.onclose=e=>this.onConnClose(e)}getSession(e){return this.sessionStore&&this.sessionStore.getItem(e)}storeSession(e,t){this.sessionStore&&this.sessionStore.setItem(e,t)}connectWithFallback(e,t=2500){let n,i;clearTimeout(this.fallbackTimer);let r=!1,a=!0,s=this.transportName(e),o=t=>{this.log("transport",`falling back to ${s}...`,t),this.off([n,i]),a=!1,this.replaceTransport(e),this.transportConnect()};if(this.getSession(`phx:fallback:${s}`))return o("memorized");this.fallbackTimer=setTimeout(o,t),i=this.onError(e=>{this.log("transport","error",e),a&&!r&&(clearTimeout(this.fallbackTimer),o(e))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(r=!0,!a){let t=this.transportName(e);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${t}`,"true"),this.log("transport",`established ${t} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(o,t),this.ping(e=>{this.log("transport","connected to primary after",e),this.primaryPassedHealthCheck=!0,clearTimeout(this.fallbackTimer)})}),this.transportConnect()}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log("transport",`${this.transportName(this.transport)} connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.disconnecting=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.resetHeartbeat(),this.stateChangeCallbacks.open.forEach(([,e])=>e())}heartbeatTimeout(){this.pendingHeartbeatRef&&(this.pendingHeartbeatRef=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection"),this.triggerChanError(),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),1e3,"heartbeat timeout"))}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(e,t,n){if(!this.conn)return e&&e();let i=this.conn;this.waitForBufferDone(i,()=>{t?i.close(t,n||""):i.close(),this.waitForSocketClosed(i,()=>{this.conn===i&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),e&&e()})})}waitForBufferDone(e,t,n=1){5!==n&&e.bufferedAmount?setTimeout(()=>{this.waitForBufferDone(e,t,n+1)},150*n):t()}waitForSocketClosed(e,t,n=1){5===n||3===e.readyState?t():setTimeout(()=>{this.waitForSocketClosed(e,t,n+1)},150*n)}onConnClose(e){this.conn&&(this.conn.onclose=()=>{});let t=e&&e.code;this.hasLogger()&&this.log("transport","close",e),this.triggerChanError(),this.clearHeartbeats(),this.closeWasClean||1e3===t||this.reconnectTimer.scheduleTimeout(),this.stateChangeCallbacks.close.forEach(([,t])=>t(e))}onConnError(e){this.hasLogger()&&this.log("transport",e);let t=this.transport,n=this.establishedConnections;this.stateChangeCallbacks.error.forEach(([,i])=>{i(e,t,n)}),(t===this.transport||n>0)&&this.triggerChanError()}
2triggerChanError(){this.channels.forEach(e=>{e.isErrored()||e.isLeaving()||e.isClosed()||e.trigger(no)})}connectionState(){switch(this.conn&&this.conn.readyState){case 0:return"connecting";case 1:return"open";case 2:return"closing";default:return"closed"}}isConnected(){return"open"===this.connectionState()}remove(e){this.off(e.stateChangeRefs),this.channels=this.channels.filter(t=>t!==e)}off(e){for(let t in this.stateChangeCallbacks)this.stateChangeCallbacks[t]=this.stateChangeCallbacks[t].filter(([t])=>-1===e.indexOf(t))}channel(e,t={}){let n=new nf(e,t,this);return this.channels.push(n),n}push(e){if(this.hasLogger()){let{topic:t,event:n,payload:i,ref:r,join_ref:a}=e;this.log("push",`${t} ${n} (${a}, ${r})`,i)}this.isConnected()?this.encode(e,e=>this.conn.send(e)):this.sendBuffer.push(()=>this.encode(e,e=>this.conn.send(e)))}makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}sendHeartbeat(){(!this.pendingHeartbeatRef||this.isConnected())&&(this.pendingHeartbeatRef=this.makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef}),this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs))}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}onConnMessage(e){this.decode(e.data,e=>{let{topic:t,event:n,payload:i,ref:r,join_ref:a}=e;r&&r===this.pendingHeartbeatRef&&(this.clearHeartbeats(),this.pendingHeartbeatRef=null,this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs)),this.hasLogger()&&this.log("receive",`${i.status||""} ${t} ${n} ${r&&"("+r+")"||""}`,i);for(let e=0;e<this.channels.length;e++){let s=this.channels[e];s.isMember(t,n,i,a)&&s.trigger(n,i,r,a)}for(let t=0;t<this.stateChangeCallbacks.message.length;t++){let[,n]=this.stateChangeCallbacks.message[t];n(e)}})}leaveOpenTopic(e){let t=this.channels.find(t=>t.topic===e&&(t.isJoined()||t.isJoining()));t&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${e}"`),t.leave())}},nb=Object.defineProperty,nw=(e,t,n)=>{let i;return(i="symbol"!=typeof t?t+"":t)in e?nb(e,i,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[i]=n};
2class nx{constructor(e,t=3e4){nw(this,"disconnectTimer",null),nw(this,"wasConnected",!1),nw(this,"onVisibilityChange",()=>{document.hidden?this.scheduleDisconnect():this.reconnect()}),this.socket=e,this.disconnectDelayMs=t,"u">typeof document&&document.addEventListener("visibilitychange",this.onVisibilityChange)}scheduleDisconnect(){this.clearTimer(),this.disconnectTimer=setTimeout(()=>{this.disconnectTimer=null,this.socket.isConnected()&&(this.wasConnected=!0,this.socket.disconnect())},this.disconnectDelayMs)}reconnect(){this.clearTimer(),this.wasConnected&&(this.wasConnected=!1,this.socket.connect())}clearTimer(){this.disconnectTimer&&(clearTimeout(this.disconnectTimer),this.disconnectTimer=null)}teardown(){this.clearTimer(),"u">typeof document&&document.removeEventListener("visibilitychange",this.onVisibilityChange)}}var nC=Object.defineProperty,nk=(e,t,n)=>{let i;return(i="symbol"!=typeof t?t+"":t)in e?nC(e,i,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[i]=n};class nS{constructor(e){nk(this,"host"),nk(this,"apiKey"),nk(this,"userToken"),nk(this,"branch"),nk(this,"axiosClient"),nk(this,"socket"),nk(this,"pageVisibility"),this.host=e.host,this.apiKey=e.apiKey,this.userToken=e.userToken||null,this.branch=e.branch||null,this.axiosClient=tK.create({baseURL:this.host,headers:{Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`,"X-Knock-User-Token":this.userToken,"X-Knock-Client":this.getKnockClientHeader(),"X-Knock-Branch":this.branch}}),"u">typeof window&&(this.socket=new ny(`${this.host.replace("http","ws")}/ws/v1`,{params:{user_token:this.userToken,api_key:this.apiKey,branch_slug:this.branch},reconnectAfterMs:e=>w(e,{baseDelayMs:1e3,maxDelayMs:3e4}),rejoinAfterMs:e=>w(e,{baseDelayMs:1e3,maxDelayMs:6e4})}),!1!==e.disconnectOnPageHidden&&(this.pageVisibility=new nx(this.socket))),t6(this.axiosClient,{retries:3,retryCondition:this.canRetryRequest,retryDelay:t6.exponentialDelay})}async makeRequest(e){try{let t=await this.axiosClient(e);return{statusCode:t.status<300?"ok":"error",body:t.data,error:void 0,status:t.status}}catch(e){return console.error(e),{statusCode:"error",status:500,body:void 0,error:e}}}teardown(){var e,t;null==(e=this.pageVisibility)||e.teardown(),null!=(t=this.socket)&&t.isConnected()&&this.socket.disconnect()}canRetryRequest(e){return!!t6.isNetworkError(e)||!!e.response&&(e.response.status>=500&&e.response.status<=599||429===e.response.status)}getKnockClientHeader(){return"Knock/ClientJS 0.21.10"}}var nT=Object.defineProperty;class nA{constructor(e){((e,t,n)=>{let i;return(i="symbol"!=typeof t?t+"":t)in e?nT(e,i,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[i]=n})(this,"knock"),this.knock=e}async get(e){let t=await this.knock.client().makeRequest({method:"GET",url:`/v1/messages/${e}`});return this.handleResponse(t)}async updateStatus(e,t,n){let i="interacted"===t&&n?{metadata:n.metadata}:void 0,r=await this.knock.client().makeRequest({method:"PUT",url:`/v1/messages/${e}/${t}`,data:i});return this.handleResponse(r)}async removeStatus(e,t){let n=await this.knock.client().makeRequest({method:"DELETE",url:`/v1/messages/${e}/${t}`});return this.handleResponse(n)}async batchUpdateStatuses(e,t,n){let i="interacted"===t&&n?{metadata:n.metadata}:{},r=await this.knock.client().makeRequest({method:"POST",url:`/v1/messages/batch/${t}`,data:{message_ids:e,...i}});return this.handleResponse(r)}async bulkUpdateAllStatusesInChannel({channelId:e,status:t,options:n}){let i=await this.knock.client().makeRequest({method:"POST",url:`/v1/channels/${e}/messages/bulk/${t}`,data:n});return this.handleResponse(i)}handleResponse(e){var t,n;if("error"===e.statusCode){if((null==(n=null==(t=e.error)?void 0:t.response)?void 0:n.status)<500)return e.error||e.body;throw Error(e.error||e.body)}return e.body}}let nE="$tenants";var nM=Object.defineProperty;class n_{constructor(e){((e,t,n)=>{let i;return(i="symbol"!=typeof t?t+"":t)in e?nM(e,i,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[i]=n})(this,"instance"),this.instance=e}async authCheck({tenant:e,knockChannelId:t}
2){let n=await this.instance.client().makeRequest({method:"GET",url:`/v1/providers/ms-teams/${t}/auth_check`,params:{ms_teams_tenant_object:{object_id:e,collection:nE},channel_id:t}});return this.handleResponse(n)}async getTeams(e){let{knockChannelId:t,tenant:n}=e,i=e.queryOptions||{},r=await this.instance.client().makeRequest({method:"GET",url:`/v1/providers/ms-teams/${t}/teams`,params:{ms_teams_tenant_object:{object_id:n,collection:nE},query_options:{$filter:i.$filter,$select:i.$select,$top:i.$top,$skiptoken:i.$skiptoken}}});return this.handleResponse(r)}async getChannels(e){let{knockChannelId:t,teamId:n,tenant:i}=e,r=e.queryOptions||{},a=await this.instance.client().makeRequest({method:"GET",url:`/v1/providers/ms-teams/${t}/channels`,params:{ms_teams_tenant_object:{object_id:i,collection:nE},team_id:n,query_options:{$filter:r.$filter,$select:r.$select}}});return this.handleResponse(a)}async revokeAccessToken({tenant:e,knockChannelId:t}){let n=await this.instance.client().makeRequest({method:"PUT",url:`/v1/providers/ms-teams/${t}/revoke_access`,params:{ms_teams_tenant_object:{object_id:e,collection:nE},channel_id:t}});return this.handleResponse(n)}handleResponse(e){var t,n;if("error"===e.statusCode){if((null==(n=null==(t=e.error)?void 0:t.response)?void 0:n.status)<500)return e.error||e.body;throw Error(e.error||e.body)}return e.body}}var nR=Object.defineProperty;class nI{constructor(e){((e,t,n)=>{let i;return(i="symbol"!=typeof t?t+"":t)in e?nR(e,i,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[i]=n})(this,"instance"),this.instance=e}async getChannelData({collection:e,objectId:t,channelId:n}){let i=await this.instance.client().makeRequest({method:"GET",url:`/v1/objects/${e}/${t}/channel_data/${n}`});return this.handleResponse(i)}async setChannelData({objectId:e,collection:t,channelId:n,data:i}){let r=await this.instance.client().makeRequest({method:"PUT",url:`v1/objects/${t}/${e}/channel_data/${n}`,data:{data:i}});return this.handleResponse(r)}handleResponse(e){if("error"===e.statusCode)throw Error(e.error||e.body);return e.body}}var nj=Object.defineProperty;let nV="default";function nO(e){return"object"==typeof e?e:{subscribed:e}}class nP{constructor(e){((e,t,n)=>{let i;return(i="symbol"!=typeof t?t+"":t)in e?nj(e,i,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[i]=n})(this,"instance"),this.instance=e}async getAll(){this.instance.failIfNotAuthenticated();let e=await this.instance.client().makeRequest({method:"GET",url:`/v1/users/${this.instance.userId}/preferences`});return this.handleResponse(e)}async get(e={}){this.instance.failIfNotAuthenticated();let t=e.preferenceSet||nV,n=await this.instance.client().makeRequest({method:"GET",url:`/v1/users/${this.instance.userId}/preferences/${t}`});return this.handleResponse(n)}async set(e,t={}){this.instance.failIfNotAuthenticated();let n=t.preferenceSet||nV,i=await this.instance.client().makeRequest({method:"PUT",url:`/v1/users/${this.instance.userId}/preferences/${n}`,data:e});return this.handleResponse(i)}async setChannelTypes(e,t={}){this.instance.failIfNotAuthenticated();let n=t.preferenceSet||nV,i=await this.instance.client().makeRequest({method:"PUT",url:`/v1/users/${this.instance.userId}/preferences/${n}/channel_types`,data:e});return this.handleResponse(i)}async setChannelType(e,t,n={}){this.instance.failIfNotAuthenticated();let i=n.preferenceSet||nV,r=await this.instance.client().makeRequest({method:"PUT",url:`/v1/users/${this.instance.userId}/preferences/${i}/channel_types/${e}`,data:{subscribed:t}});return this.handleResponse(r)}async setWorkflows(e,t={}){this.instance.failIfNotAuthenticated();let n=t.preferenceSet||nV,i=await this.instance.client().makeRequest({method:"PUT",url:`/v1/users/${this.instance.userId}/preferences/${n}/workflows`,data:e});return this.handleResponse(i)}async setWorkflow(e,t,n={}){this.instance.failIfNotAuthenticated();let i=n.preferenceSet||nV,r=nO(t),a=await this.instance.client().makeRequest({method:"PUT",url:`/v1/users/${this.instance.userId}/preferences/${i}/workflows/${e}`,data:r});return this.handleResponse(a)}async setCategories(e,t={}){this.instance.failIfNotAuthenticated();let n=t.preferenceSet||nV,i=await this.instance.client().makeRequest
2({method:"PUT",url:`/v1/users/${this.instance.userId}/preferences/${n}/categories`,data:e});return this.handleResponse(i)}async setCategory(e,t,n={}){this.instance.failIfNotAuthenticated();let i=n.preferenceSet||nV,r=nO(t),a=await this.instance.client().makeRequest({method:"PUT",url:`/v1/users/${this.instance.userId}/preferences/${i}/categories/${e}`,data:r});return this.handleResponse(a)}handleResponse(e){if("error"===e.statusCode)throw Error(e.error||e.body);return e.body}}var nN=Object.defineProperty;class nL{constructor(e){((e,t,n)=>{let i;return(i="symbol"!=typeof t?t+"":t)in e?nN(e,i,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[i]=n})(this,"instance"),this.instance=e}async authCheck({tenant:e,knockChannelId:t}){let n=await this.instance.client().makeRequest({method:"GET",url:`/v1/providers/slack/${t}/auth_check`,params:{access_token_object:{object_id:e,collection:nE},channel_id:t}});return this.handleResponse(n)}async getChannels(e){let{knockChannelId:t,tenant:n}=e,i=e.queryOptions||{},r=await this.instance.client().makeRequest({method:"GET",url:`/v1/providers/slack/${t}/channels`,params:{access_token_object:{object_id:n,collection:nE},channel_id:t,query_options:{cursor:i.cursor,limit:i.limit,exclude_archived:i.excludeArchived,team_id:i.teamId,types:i.types}}});return this.handleResponse(r)}async revokeAccessToken({tenant:e,knockChannelId:t}){let n=await this.instance.client().makeRequest({method:"PUT",url:`/v1/providers/slack/${t}/revoke_access`,params:{access_token_object:{object_id:e,collection:nE},channel_id:t}});return this.handleResponse(n)}handleResponse(e){var t,n;if("error"===e.statusCode){if((null==(n=null==(t=e.error)?void 0:t.response)?void 0:n.status)<500)return e.error||e.body;throw Error(e.error||e.body)}return e.body}}var nD=Object.defineProperty,nF=(e,t)=>nD(e,"name",{value:t,configurable:!0}),nB=class{type=3;name="";prefix="";value="";suffix="";modifier=3;constructor(e,t,n,i,r,a){this.type=e,this.name=t,this.prefix=n,this.value=i,this.suffix=r,this.modifier=a}hasCustomName(){return""!==this.name&&"number"!=typeof this.name}};nF(nB,"Part");var n$=/[$_\p{ID_Start}]/u,nU=/[$_\u200C\u200D\p{ID_Continue}]/u;function nW(e,t){return(t?/^[\x00-\xFF]*$/:/^[\x00-\x7F]*$/).test(e)}function nz(e,t=!1){let n=[],i=0;for(;i<e.length;){let r=e[i],a=nF(function(r){if(!t)throw TypeError(r);n.push({type:"INVALID_CHAR",index:i,value:e[i++]})},"ErrorOrInvalid");if("*"===r){n.push({type:"ASTERISK",index:i,value:e[i++]});continue}if("+"===r||"?"===r){n.push({type:"OTHER_MODIFIER",index:i,value:e[i++]});continue}if("\\"===r){n.push({type:"ESCAPED_CHAR",index:i++,value:e[i++]});continue}if("{"===r){n.push({type:"OPEN",index:i,value:e[i++]});continue}if("}"===r){n.push({type:"CLOSE",index:i,value:e[i++]});continue}if(":"===r){let t="",r=i+1;for(;r<e.length;){let n=e.substr(r,1);if(r===i+1&&n$.test(n)||r!==i+1&&nU.test(n)){t+=e[r++];continue}break}if(!t){a(`Missing parameter name at ${i}`);continue}n.push({type:"NAME",index:i,value:t}),i=r;continue}if("("===r){let t=1,r="",s=i+1,o=!1;if("?"===e[s]){a(`Pattern cannot start with "?" at ${s}`);continue}for(;s<e.length;){if(!nW(e[s],!1)){a(`Invalid character '${e[s]}' at ${s}.`),o=!0;break}if("\\"===e[s]){r+=e[s++]+e[s++];continue}
2if(")"===e[s]){if(0==--t){s++;break}}else if("("===e[s]&&(t++,"?"!==e[s+1])){a(`Capturing groups are not allowed at ${s}`),o=!0;break}r+=e[s++]}if(o)continue;if(t){a(`Unbalanced pattern at ${i}`);continue}if(!r){a(`Missing pattern at ${i}`);continue}n.push({type:"REGEX",index:i,value:r}),i=s;continue}n.push({type:"CHAR",index:i,value:e[i++]})}return n.push({type:"END",index:i,value:""}),n}function nH(e,t={}){let n=nz(e);t.delimiter??="/#?",t.prefixes??="./";let i=`[^${nK(t.delimiter)}]+?`,r=[],a=0,s=0,o=new Set,l=nF(e=>{if(s<n.length&&n[s].type===e)return n[s++].value},"tryConsume"),u=nF(()=>l("OTHER_MODIFIER")??l("ASTERISK"),"tryConsumeModifier"),c=nF(e=>{let t=l(e);if(void 0!==t)return t;let{type:i,index:r}=n[s];throw TypeError(`Unexpected ${i} at ${r}, expected ${e}`)},"mustConsume"),d=nF(()=>{let e="",t;for(;t=l("CHAR")??l("ESCAPED_CHAR");)e+=t;return e},"consumeText"),h=nF(e=>e,"DefaultEncodePart"),p=t.encodePart||h,f="",m=nF(e=>{f+=e},"appendToPendingFixedValue"),g=nF(()=>{f.length&&(r.push(new nB(3,"","",p(f),"",3)),f="")},"maybeAddPartFromPendingFixedValue"),v=nF((e,t,n,s,l)=>{let u,c,d=3;switch(l){case"?":d=1;break;case"*":d=0;break;case"+":d=2}if(!t&&!n&&3===d)return void m(e);if(g(),!t&&!n){if(!e)return;r.push(new nB(3,"","",p(e),"",d));return}let h=2;if((u=n?"*"===n?".*":n:i)===i?(h=1,u=""):".*"===u&&(h=0,u=""),t?c=t:n&&(c=a++),o.has(c))throw TypeError(`Duplicate name '${c}'.`);o.add(c),r.push(new nB(h,c,p(e),u,p(s),d))},"addPart");for(;s<n.length;){let e=l("CHAR"),n=l("NAME"),i=l("REGEX");if(n||i||(i=l("ASTERISK")),n||i){let r=e??"";-1===t.prefixes.indexOf(r)&&(m(r),r=""),g(),v(r,n,i,"",u());continue}let r=e??l("ESCAPED_CHAR");if(r){m(r);continue}if(l("OPEN")){let e=d(),t=l("NAME"),n=l("REGEX");t||n||(n=l("ASTERISK"));let i=d();c("CLOSE"),v(e,t,n,i,u());continue}g(),c("END")}return r}function nK(e){return e.replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")}function nq(e){return e&&e.ignoreCase?"ui":"u"}function nY(e,t,n){return nX(nH(e,n),t,n)}function nG(e){switch(e){case 0:return"*";case 1:return"?";case 2:return"+";case 3:return""}}function nX(e,t,n={}){n.delimiter??="/#?",n.prefixes??="./",n.sensitive??=!1,n.strict??=!1,n.end??=!0,n.start??=!0,n.endsWith="";let i=n.start?"^":"";for(let r of e){if(3===r.type){3===r.modifier?i+=nK(r.value):i+=`(?:${nK(r.value)})${nG(r.modifier)}`;continue}t&&t.push(r.name);let e=`[^${nK(n.delimiter)}]+?`,a=r.value;if(1===r.type?a=e:0===r.type&&(a=".*"),!r.prefix.length&&!r.suffix.length){3===r.modifier||1===r.modifier?i+=`(${a})${nG(r.modifier)}`:i+=`((?:${a})${nG(r.modifier)})`;continue}if(3===r.modifier||1===r.modifier){i+=`(?:${nK(r.prefix)}(${a})${nK(r.suffix)})`,i+=nG(r.modifier);continue}i+=`(?:${nK(r.prefix)}`,i+=`((?:${a})(?:`,i+=nK(r.suffix),i+=nK(r.prefix),i+=`(?:${a}))*)${nK(r.suffix)})`,0===r.modifier&&(i+="?")}let r=`[${nK(n.endsWith)}]|$`,a=`[${nK(n.delimiter)}]`;if(n.end)return n.strict||(i+=`${a}?`),n.endsWith.length?i+=`(?=${r})`:i+="$",new RegExp(i,nq(n));n.strict||(i+=`(?:${a}(?=${r}))?`);let s=!1;if(e.length){let t=e[e.length-1];3===t.type&&3===t.modifier&&(s=n.delimiter.indexOf(t)>-1)}return s||(i+=`(?=${a}|${r})`),new RegExp(i,nq(n))}nF(nW,"isASCII"),nF(nz,"lexer"),nF(nH,"parse"),nF(nK,"escapeString"),nF(nq,"flags"),nF(nY,"stringToRegexp"),nF(nG,"modifierToString"),nF(nX,"partsToRegexp");var nZ={delimiter:"",prefixes:"",sensitive:!0,strict:!0},nJ={delimiter:".",prefixes:"",sensitive:!0,strict:!0},nQ={delimiter:"/",prefixes:"/",sensitive:!0,strict:!0};function n0(e,t){return!!e.length&&("/"===e[0]||!!t&&!(e.length<2)&&("\\"==e[0]||"{"==e[0])&&"/"==e[1])}function n1(e,t){return e.startsWith(t)?e.substring(t.length,e.length):e}function n2(e,t){return e.endsWith(t)?e.substr(0,e.length-t.length):e}function n3(e){return!!e&&!(e.length<2)&&("["===e[0]||("\\"===e[0]||"{"===e[0])&&"["===e[1])}nF(n0,"isAbsolutePathname"),nF(n1,"maybeStripPrefix"),nF(n2,"maybeStripSuffix"),nF(n3,"treatAsIPv6Hostname");var n5=["ftp","file","http","https","ws","wss"];function n4(e){if(!e)return!0;for(let t of n5)if(e.test(t))return!0;return!1}function n9(e,t){if(e=n1(e,"#"),t||""===e)return e;let n=new URL("https://example.com");return n.hash=e,n.hash?n.hash.substring(1,n.hash.length):""}function n6(e,t){if(e=n1(e,"?"),t||""===e)return e;let n=new URL("https://example.com");return n.search=e,n.search?n.search.substring(1,n.search.length):""}function n7(e,t){return t||""===e?e:n3(e)?ic(e):iu(e)}function n8(e,t){if(t||""===e)return e;let n=new URL("https://example.com");return n.password=e,n.password}function ie(e,t){if(t||""===e)return e;let n=new URL("https://example.com");return n.username=e,n.username}function it(e,t,n){if(n||""===e)return e;if(t&&!n5.includes(t))return new URL(`${t}:${e}`).pathname;let i="/"==e[0];return e=new URL(i?e:"/-"+e,"https://example.com").pathname,i||(e=e.substring(2,e.length)),e}function ii(e,t,n){return ia(t)===e&&(e=""),n||""===e?e:id(e)}function ir(e,t){return e=n2(e,":"),t||""===e?e:is(e)}function ia(e){switch(e){case"ws":case"http":return"80";case"wws":case"https":return"443";case"ftp":return"21";default:return""}}function is(e){if(""===e)return e;if(/^[-+.A-Za-z0-9]*$/.test(e))return e.toLowerCase();throw TypeError(`Invalid protocol '${e}'.`)}function io(e){if(""===e)return e;let t=new URL("https://example.com");return t.username=e,t.username}function il(e){if(""===e)return e;let t=new URL("https://example.com");return t.password=e,t.password}function iu(e){if(""===e)return e;if(/[\t\n\r #%/:<>?@[\]^\\|]/g.test(e))throw TypeError(`Invalid hostname '${e}'`);let t=new URL("https://example.com");return t.hostname=e,t.hostname}function ic(e){if(""===e)return e;if(/[^0-9a-fA-F[\]:]/g.test(e))throw TypeError(`Invalid IPv6 hostname '${e}'`);return e.toLowerCase()}function id(e){if(""===e||/^[0-9]*$/.test(e)&&65535>=parseInt(e))return e;throw TypeError(`Invalid port '${e}'.`)}function ih(e){if(""===e)return e;let t=new URL("https://example.com");return t.pathname="/"!==e[0]?"/-"+e:e,"/"!==e[0]?t.pathname.substring(2,t.pathname.length):t.pathname}function ip(e){return""===e?e:new URL(`data:${e}`).pathname}function im(e){if(""===e)return e;let t=new URL("https://example.com");return t.search=e,t.search.substring(1,t.search.length)}function ig(e){if(""===e)return e;let t=new URL("https://example.com");return t.hash=e,t.hash.substring(1,t.hash.length)}nF(n4,"isSpecialScheme"),nF(n9,"canonicalizeHash"),nF(n6,"canonicalizeSearch"),nF(n7,"canonicalizeHostname"),nF(n8,"canonicalizePassword"),nF(ie,"canonicalizeUsername"),nF(it,"canonicalizePathname"),nF(ii,"canonicalizePort"),nF(ir,"canonicalizeProtocol"),nF(ia,"defaultPortForProtocol"),nF(is,"protocolEncodeCallback"),nF(io,"usernameEncodeCallback"),nF(il,"passwordEncodeCallback"),nF(iu,"hostnameEncodeCallback"),nF(ic,"ipv6HostnameEncodeCallback"),nF(id,"portEncodeCallback"),nF(ih,"standardURLPathnameEncodeCallback"),nF(ip,"pathURLPathnameEncodeCallback"),nF(im,"searchEncodeCallback"),nF(ig,"hashEncodeCallback");var iv=class{#e;#t=[];#n={};#i=0;#r=1;#a=0;#s=0;#o=0;#l=0;#u=!1;constructor(e){this.#e=e}get result(){return this.#n}parse(){for(this.#t=nz(this.#e,!0);this.#i<this.#t.length;this.#i+=this.#r){if(this.#r=1,"END"===this.#t[this.#i].type){if(0===this.#s){this.#c(),this.#d()?this.#h(9,1):this.#p()?this.#h(8,1):this.#h(7,0);continue}if(2===this.#s){this.#f(5);continue}
2this.#h(10,0);break}if(this.#o>0)if(!this.#m())continue;else this.#o-=1;if(this.#g()){this.#o+=1;continue}switch(this.#s){case 0:this.#v()&&this.#f(1);break;case 1:if(this.#v()){this.#y();let e=7,t=1;this.#b()?(e=2,t=3):this.#u&&(e=2),this.#h(e,t)}break;case 2:this.#w()?this.#f(3):(this.#x()||this.#p()||this.#d())&&this.#f(5);break;case 3:this.#C()?this.#h(4,1):this.#w()&&this.#h(5,1);break;case 4:this.#w()&&this.#h(5,1);break;case 5:this.#k()?this.#l+=1:this.#S()&&(this.#l-=1),this.#T()&&!this.#l?this.#h(6,1):this.#x()?this.#h(7,0):this.#p()?this.#h(8,1):this.#d()&&this.#h(9,1);break;case 6:this.#x()?this.#h(7,0):this.#p()?this.#h(8,1):this.#d()&&this.#h(9,1);break;case 7:this.#p()?this.#h(8,1):this.#d()&&this.#h(9,1);break;case 8:this.#d()&&this.#h(9,1)}}void 0!==this.#n.hostname&&void 0===this.#n.port&&(this.#n.port="")}#h(e,t){switch(this.#s){case 0:case 2:break;case 1:this.#n.protocol=this.#A();break;case 3:this.#n.username=this.#A();break;case 4:this.#n.password=this.#A();break;case 5:this.#n.hostname=this.#A();break;case 6:this.#n.port=this.#A();break;case 7:this.#n.pathname=this.#A();break;case 8:this.#n.search=this.#A();break;case 9:this.#n.hash=this.#A()}0!==this.#s&&10!==e&&([1,2,3,4].includes(this.#s)&&[6,7,8,9].includes(e)&&(this.#n.hostname??=""),[1,2,3,4,5,6].includes(this.#s)&&[8,9].includes(e)&&(this.#n.pathname??=this.#u?"/":""),[1,2,3,4,5,6,7].includes(this.#s)&&9===e&&(this.#n.search??="")),this.#E(e,t)}#E(e,t){this.#s=e,this.#a=this.#i+t,this.#i+=t,this.#r=0}#c(){this.#i=this.#a,this.#r=0}#f(e){this.#c(),this.#s=e}#M(e){return e<0&&(e=this.#t.length-e),e<this.#t.length?this.#t[e]:this.#t[this.#t.length-1]}#_(e,t){let n=this.#M(e);return n.value===t&&("CHAR"===n.type||"ESCAPED_CHAR"===n.type||"INVALID_CHAR"===n.type)}#v(){return this.#_(this.#i,":")}#b(){return this.#_(this.#i+1,"/")&&this.#_(this.#i+2,"/")}#w(){return this.#_(this.#i,"@")}#C(){return this.#_(this.#i,":")}#T(){return this.#_(this.#i,":")}#x(){return this.#_(this.#i,"/")}#p(){if(this.#_(this.#i,"?"))return!0;if("?"!==this.#t[this.#i].value)return!1;let e=this.#M(this.#i-1);return"NAME"!==e.type&&"REGEX"!==e.type&&"CLOSE"!==e.type&&"ASTERISK"!==e.type}#d(){return this.#_(this.#i,"#")}#g(){return"OPEN"==this.#t[this.#i].type}#m(){return"CLOSE"==this.#t[this.#i].type}#k(){return this.#_(this.#i,"[")}#S(){return this.#_(this.#i,"]")}#A(){let e=this.#t[this.#i],t=this.#M(this.#a).index;return this.#e.substring(t,e.index)}#y(){let e={};Object.assign(e,nZ),e.encodePart=is;let t=nY(this.#A(),void 0,e);this.#u=n4(t)}};nF(iv,"Parser");var iy=["protocol","username","password","hostname","port","pathname","search","hash"];function ib(e,t){if("string"!=typeof e)throw TypeError("parameter 1 is not of type 'string'.");let n=new URL(e,t);return{protocol:n.protocol.substring(0,n.protocol.length-1),username:n.username,password:n.password,hostname:n.hostname,port:n.port,pathname:n.pathname,search:""!==n.search?n.search.substring(1,n.search.length):void 0,hash:""!==n.hash?n.hash.substring(1,n.hash.length):void 0}}function iw(e,t){return t?iC(e):e}function ix(e,t,n){let i;if("string"==typeof t.baseURL)try{i=new URL(t.baseURL),void 0===t.protocol&&(e.protocol=iw(i.protocol.substring(0,i.protocol.length-1),n)),n||void 0!==t.protocol||void 0!==t.hostname||void 0!==t.port||void 0!==t.username||(e.username=iw(i.username,n)),n||void 0!==t.protocol||void 0!==t.hostname||void 0!==t.port||void 0!==t.username||void 0!==t.password||(e.password=iw(i.password,n)),void 0===t.protocol&&void 0===t.hostname&&(e.hostname=iw(i.hostname,n)),void 0===t.protocol&&void 0===t.hostname&&void 0===t.port&&(e.port=iw(i.port,n)),void 0===t.protocol&&void 0===t.hostname&&void 0===t.port&&void 0===t.pathname&&(e.pathname=iw(i.pathname,n)),void 0===t.protocol&&void 0===t.hostname&&void 0===t.port&&void 0===t.pathname&&void 0===t.search&&(e.search=iw(i.search.substring(1,i.search.length),n)),void 0===t.protocol&&void 0===t.hostname&&void 0===t.port&&void 0===t.pathname&&void 0===t.search&&void 0===t.hash&&(e.hash=iw(i.hash.substring(1,i.hash.length),n))}catch{throw TypeError(`invalid baseURL '${t.baseURL}'.`)}if("string"==typeof t.protocol&&(e.protocol=ir(t.protocol,n)),"string"==typeof t.username&&(e.username=ie(t.username,n)),"string"==typeof t.password&&(e.password=n8(t.password,n)),"string"==typeof t.hostname&&(e.hostname=n7(t.hostname,n)),"string"==typeof t.port&&(e.port=ii(t.port,e.protocol,n)),"string"==typeof t.pathname){if(e.pathname=t.pathname,i&&!n0(e.pathname,n)){let t=i.pathname.lastIndexOf("/");t>=0&&(e.pathname=iw(i.pathname.substring(0,t+1),n)+e.pathname)}e.pathname=it(e.pathname,e.protocol,n)}return"string"==typeof t.search&&(e.search=n6(t.search,n)),"string"==typeof t.hash&&(e.hash=n9(t.hash,n)),e}function iC(e){return e.replace(/([+*?:{}()\\])/g,"\\$1")}function ik(e){return e.replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")}function iS(e,t){t.delimiter??="/#?",t.prefixes??="./",t.sensitive??=!1,t.strict??=!1,t.end??=!0,t.start??=!0,t.endsWith="";let n=`[^${ik(t.delimiter)}]+?`,i=/[$_\u200C\u200D\p{ID_Continue}]/u,r="";for(let a=0;a<e.length;++a){let s=e[a];if(3===s.type){if(3===s.modifier){r+=iC(s.value);continue}r+=`{${iC(s.value)}}${nG(s.modifier)}`;continue}let o=s.hasCustomName(),l=!!s.suffix.length||!!s.prefix.length&&(1!==s.prefix.length||!t.prefixes.includes(s.prefix)),u=a>0?e[a-1]:null,c=a<e.length-1?e[a+1]:null;if(!l&&o&&1===s.type&&3===s.modifier&&c&&!c.prefix.length&&!c.suffix.length)if(3===c.type){let e=c.value.length>0?c.value[0]:"";l=i.test(e)}else l=!c.hasCustomName();if(!l&&!s.prefix.length&&u&&3===u.type){let e=u.value[u.value.length-1];l=t.prefixes.includes(e)}l&&(r+="{"),r+=iC(s.prefix),o&&(r+=`:${s.name}`),2===s.type?r+=`(${s.value}
2)`:1===s.type?o||(r+=`(${n})`):0===s.type&&(o||u&&3!==u.type&&3===u.modifier&&!l&&""===s.prefix?r+="(.*)":r+="*"),1===s.type&&o&&s.suffix.length&&i.test(s.suffix[0])&&(r+="\\"),r+=iC(s.suffix),l&&(r+="}"),3!==s.modifier&&(r+=nG(s.modifier))}return r}nF(ib,"extractValues"),nF(iw,"processBaseURLString"),nF(ix,"applyInit"),nF(iC,"escapePatternString"),nF(ik,"escapeRegexpString"),nF(iS,"partsToPattern");var iT=class{#e;#t={};#n={};#i={};#r={};#a=!1;constructor(e={},t,n){try{let i,r;if("string"==typeof t?i=t:n=t,"string"==typeof e){let t=new iv(e);if(t.parse(),e=t.result,void 0===i&&"string"!=typeof e.protocol)throw TypeError("A base URL must be provided for a relative constructor string.");e.baseURL=i}else{if(!e||"object"!=typeof e)throw TypeError("parameter 1 is not of type 'string' and cannot convert to dictionary.");if(i)throw TypeError("parameter 1 is not of type 'string'.")}typeof n>"u"&&(n={ignoreCase:!1});let a={ignoreCase:!0===n.ignoreCase};for(r of(this.#e=ix({pathname:"*",protocol:"*",username:"*",password:"*",hostname:"*",port:"*",search:"*",hash:"*"},e,!0),ia(this.#e.protocol)===this.#e.port&&(this.#e.port=""),iy)){if(!(r in this.#e))continue;let e={},t=this.#e[r];switch(this.#n[r]=[],r){case"protocol":Object.assign(e,nZ),e.encodePart=is;break;case"username":Object.assign(e,nZ),e.encodePart=io;break;case"password":Object.assign(e,nZ),e.encodePart=il;break;case"hostname":Object.assign(e,nJ),n3(t)?e.encodePart=ic:e.encodePart=iu;break;case"port":Object.assign(e,nZ),e.encodePart=id;break;case"pathname":n4(this.#t.protocol)?(Object.assign(e,nQ,a),e.encodePart=ih):(Object.assign(e,nZ,a),e.encodePart=ip);break;case"search":Object.assign(e,nZ,a),e.encodePart=im;break;case"hash":Object.assign(e,nZ,a),e.encodePart=ig}try{this.#r[r]=nH(t,e),this.#t[r]=nX(this.#r[r],this.#n[r],e),this.#i[r]=iS(this.#r[r],e),this.#a=this.#a||this.#r[r].some(e=>2===e.type)}catch{throw TypeError(`invalid ${r} pattern '${this.#e[r]}'.`)}}}catch(e){throw TypeError(`Failed to construct 'URLPattern': ${e.message}`)}}get[Symbol.toStringTag](){return"URLPattern"}test(e={},t){let n,i={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if("string"!=typeof e&&t)throw TypeError("parameter 1 is not of type 'string'.");if(typeof e>"u")return!1;try{i="object"==typeof e?ix(i,e,!1):ix(i,ib(e,t),!1)}catch{return!1}for(n of iy)if(!this.#t[n].exec(i[n]))return!1;return!0}exec(e={},t){let n,i={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if("string"!=typeof e&&t)throw TypeError("parameter 1 is not of type 'string'.");if(typeof e>"u")return;try{i="object"==typeof e?ix(i,e,!1):ix(i,ib(e,t),!1)}catch{return null}let r={};for(n of(t?r.inputs=[e,t]:r.inputs=[e],iy)){let e=this.#t[n].exec(i[n]);if(!e)return null;let t={};for(let[i,r]of this.#n[n].entries())if("string"==typeof r||"number"==typeof r){let n=e[i+1];t[r]=n}r[n]={input:i[n]??"",groups:t}}return r}static compareComponent(e,t,n){let i=nF((e,t)=>{for(let n of["type","modifier","prefix","value","suffix"]){if(e[n]<t[n])return -1;if(e[n]!==t[n])return 1}return 0},"comparePart"),r=new nB(3,"","","","",3),a=new nB(0,"","","","",3),s=nF((e,t)=>{let n=0;for(;n<Math.min(e.length,t.length);++n){let r=i(e[n],t[n]);if(r)return r}return e.length===t.length?0:i(e[n]??r,t[n]??r)},"comparePartList");return t.#i[e]||n.#i[e]?t.#i[e]&&!n.#i[e]?s(t.#r[e],[a]):!t.#i[e]&&n.#i[e]?s([a],n.#r[e]):s(t.#r[e],n.#r[e]):0}get protocol(){return this.#i.protocol}get username(){return this.#i.username}get password(){return this.#i.password}get hostname(){return this.#i.hostname}get port(){return this.#i.port}get pathname(){return this.#i.pathname}get search(){return this.#i.search}get hash(){return this.#i.hash}get hasRegExpGroups(){return this.#a}};nF(iT,"URLPattern"),globalThis.URLPattern||(globalThis.URLPattern=iT);let iA=e=>`/v1/users/${e}/guides`;var iE=Object.defineProperty;let iM="default";class i_{constructor(e){((e,t,n)=>{let i;return(i="symbol"!=typeof t?t+"":t)in e?iE(e,i,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[i]=n})(this,"instance"),this.instance=e}async get(){this.instance.failIfNotAuthenticated();
2let e=await this.instance.client().makeRequest({method:"GET",url:`/v1/users/${this.instance.userId}`});return this.handleResponse(e)}async identify(e={}){this.instance.failIfNotAuthenticated();let t=await this.instance.client().makeRequest({method:"PUT",url:`/v1/users/${this.instance.userId}`,data:e});return this.handleResponse(t)}async getAllPreferences(){this.instance.failIfNotAuthenticated();let e=await this.instance.client().makeRequest({method:"GET",url:`/v1/users/${this.instance.userId}/preferences`});return this.handleResponse(e)}async getPreferences(e={}){this.instance.failIfNotAuthenticated();let t=e.preferenceSet||iM,n=await this.instance.client().makeRequest({method:"GET",url:`/v1/users/${this.instance.userId}/preferences/${t}`,params:{tenant:e.tenant}});return this.handleResponse(n)}async setPreferences(e,t={}){this.instance.failIfNotAuthenticated();let n=t.preferenceSet||iM,i=await this.instance.client().makeRequest({method:"PUT",url:`/v1/users/${this.instance.userId}/preferences/${n}`,data:e});return this.handleResponse(i)}async getChannelData(e){this.instance.failIfNotAuthenticated();let t=await this.instance.client().makeRequest({method:"GET",url:`/v1/users/${this.instance.userId}/channel_data/${e.channelId}`});return this.handleResponse(t)}async setChannelData({channelId:e,channelData:t}){this.instance.failIfNotAuthenticated();let n=await this.instance.client().makeRequest({method:"PUT",url:`/v1/users/${this.instance.userId}/channel_data/${e}`,data:{data:t}});return this.handleResponse(n)}async getGuides(e,t){let n=await this.instance.client().makeRequest({method:"GET",url:`${iA(this.instance.userId)}/${e}`,params:t});return this.handleResponse(n)}async markGuideStepAs(e,t){let n=await this.instance.client().makeRequest({method:"PUT",url:`${iA(this.instance.userId)}/messages/${e}`,data:t});return this.handleResponse(n)}async resetGuideEngagement(e){let t=await this.instance.client().makeRequest({method:"PUT",url:`${iA(this.instance.userId)}/engagements/reset`,data:e});return this.handleResponse(t)}handleResponse(e){if("error"===e.statusCode)throw Error(e.error||e.body);return e.body}}var iR=Object.defineProperty,iI=(e,t,n)=>{let i;return(i="symbol"!=typeof t?t+"":t)in e?iR(e,i,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[i]=n};class ij{constructor(e,t={}){if(iI(this,"host"),iI(this,"apiClient",null),iI(this,"userId"),iI(this,"userToken"),iI(this,"logLevel"),iI(this,"branch"),iI(this,"disconnectOnPageHidden"),iI(this,"tokenExpirationTimer",null),iI(this,"feeds",new q(this)),iI(this,"objects",new nI(this)),iI(this,"preferences",new nP(this)),iI(this,"slack",new nL(this)),iI(this,"msTeams",new n_(this)),iI(this,"user",new i_(this)),iI(this,"messages",new nA(this)),this.apiKey=e,this.host=t.host||"https://api.knock.app",this.logLevel=t.logLevel,this.branch=t.branch||void 0,this.disconnectOnPageHidden=t.disconnectOnPageHidden,this.log("Initialized Knock instance"),this.apiKey&&this.apiKey.startsWith("sk_"))throw Error("[Knock] You are using your secret API key on the client. Please use the public key.")}client(){return this.apiClient||(this.apiClient=this.createApiClient()),this.apiClient}authenticate(e,t,n){let i=!1,r=this.apiClient,a=this.getUserId(e),s=(null==n?void 0:n.identificationStrategy)||"inline";if(r&&(this.userId!==a||this.userToken!==t)&&(this.log("userId or userToken changed; reinitializing connections"),this.feeds.teardownInstances(),this.teardown(),i=!0),this.userId=a,this.userToken=t,this.log(`Authenticated with userId ${a}`),this.userToken&&(null==n?void 0:n.onUserTokenExpiring)instanceof Function&&this.maybeScheduleUserTokenExpiration(n.onUserTokenExpiring,n.timeBeforeExpirationInMs),i&&(this.apiClient=this.createApiClient(),this.feeds.reinitializeInstances(),this.log("Reinitialized real-time connections")),"skip"===s)return void this.log("Skipping inline user identification");if("inline"===s&&"object"==typeof e&&null!=e&&e.id){this.log(`Identifying user ${e.id} inline`);let{id:t,...n}=e;this.user.identify(n).catch(t=>{let n=t instanceof Error?t.message:"Unknown error";this.log(`Error identifying user ${e.id} inline:
3${n}`)})}}failIfNotAuthenticated(){if(!this.isAuthenticated())throw Error("Not authenticated. Please call `authenticate` first.")}isAuthenticated(e=!1){return e?!!(this.userId&&this.userToken):!!this.userId}teardown(){var e;this.tokenExpirationTimer&&clearTimeout(this.tokenExpirationTimer),null==(e=this.apiClient)||e.teardown()}log(e,t=!1){("debug"===this.logLevel||t)&&console.log(`[Knock] ${e}`)}createApiClient(){return new nS({apiKey:this.apiKey,host:this.host,userToken:this.userToken,branch:this.branch,disconnectOnPageHidden:this.disconnectOnPageHidden})}async maybeScheduleUserTokenExpiration(e,t=3e4){if(!this.userToken)return;let n=function(e,t){let n;if("string"!=typeof e)throw new Y("Invalid token specified: must be a string");t||(t={});let i=+(!0!==t.header),r=e.split(".")[i];if("string"!=typeof r)throw new Y(`Invalid token specified: missing part #${i+1}`);try{n=function(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw Error("base64 string is not of the correct length")}try{var n;
3return n=t,decodeURIComponent(atob(n).replace(/(.)/g,(e,t)=>{let n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n}))}catch(e){return atob(t)}}(r)}catch(e){throw new Y(`Invalid token specified: invalid base64 for part #${i+1} (${e.message})`)}try{return JSON.parse(n)}catch(e){throw new Y(`Invalid token specified: invalid json for part #${i+1} (${e.message})`)}}(this.userToken),i=(n.exp??0)*1e3,r=Date.now();if(i&&i>r){let a=i-t-r;this.tokenExpirationTimer=setTimeout(async()=>{let i=await e(this.userToken,n);"string"==typeof i&&this.authenticate(this.userId,i,{onUserTokenExpiring:e,timeBeforeExpirationInMs:t})},a)}}getUserId(e){return"string"!=typeof e&&e?null!=e&&e.id?e.id:void 0:e}}e.s([],727447);var iV=e.i(17772);let iO={translations:{archiveNotification:"Archive this notification",archiveRead:"Archive Read",markAllAsRead:"Mark all as read",notifications:"Notifications",emptyFeedTitle:"No notifications yet",emptyFeedBody:"We'll let you know when we've got something new for you.",all:"All",unread:"Unread",read:"Read",unseen:"Unseen",msTeamsChannelSetError:"Error setting channel.",msTeamsConnect:"Connect to Microsoft Teams",msTeamsConnected:"Connected",msTeamsConnecting:"Connecting to Microsoft Teams…",msTeamsConnectionErrorExists:"Try reconnecting to Microsoft Teams to find and select channels from your teams.",msTeamsConnectionErrorOccurred:"There was an error connecting to Microsoft Teams. Try reconnecting to find and select channels from your teams.",msTeamsConnectContainerDescription:"Connect to get notifications in Microsoft Teams",msTeamsDisconnect:"Disconnect",msTeamsDisconnecting:"Disconnecting from Microsoft Teams…",msTeamsError:"Error",msTeamsReconnect:"Reconnect",msTeamsTenantIdNotSet:"Microsoft Teams tenant ID not set.",slackConnectChannel:"Connect channel",slackChannelId:"Slack channel ID",slackConnecting:"Connecting to Slack...",slackDisconnecting:"Disconnecting...",slackConnect:"Connect to Slack",slackConnected:"Connected",slackConnectContainerDescription:"Connect to get notifications in your Slack workspace.",slackSearchbarDisconnected:"Slack is not connected.",slackSearchbarNoChannelsConnected:"Search channels",slackSearchbarNoChannelsFound:"No slack channels.",slackSearchbarChannelsError:"Error fetching channels.",slackSearchChannels:"Search channels",slackConnectionErrorExists:"Try reconnecting to Slack to find and select channels from your workspace.",slackConnectionErrorOccurred:"There was an error connecting to Slack. Try reconnecting to find and select channels from your workspace.",slackChannelAlreadyConnected:"Error: already connected",slackError:"Error",slackDisconnect:"Disconnect",slackChannelSetError:"Error setting channel.",slackAccessTokenNotSet:"Access token not set.",slackReconnect:"Reconnect"},locale:"en"},iP=iV.default.createContext(iO),iN=({i18n:e=iO,...t})=>iV.default.createElement(iP.Provider,{...t,value:e});var iL=e.i(65932);function iD(e){let t=(0,iV.useRef)(void 0);return(0,iV.useMemo)(()=>{let n=t.current;return n&&(0,iL.default)(e,n)?n:(t.current=e,e)},[e])}function iF(e,t,n,i={}){e.authenticate(t,n,{onUserTokenExpiring:null==i?void 0:i.onUserTokenExpiring,timeBeforeExpirationInMs:null==i?void 0:i.timeBeforeExpirationInMs,identificationStrategy:null==i?void 0:i.identificationStrategy})}let iB=iV.createContext(null),i$=({apiKey:e,host:t,logLevel:n,userToken:i,onUserTokenExpiring:r,timeBeforeExpirationInMs:a,children:s,i18n:o,identificationStrategy:l,branch:u,...c})=>{let d=function(e,t,n,i={}){let r=iV.default.useRef(void 0),a=iD(i),s=iD(t);return iV.default.useMemo(()=>{let t="string"==typeof s?s:null==s?void 0:s.id,i=r.current;if(i&&i.isAuthenticated()&&(i.userId!==t||i.userToken!==n))return iF(i,s,n,a),i;i&&i.teardown();let o=new ij(e,{host:a.host,logLevel:a.logLevel,branch:a.branch});return iF(o,s,n,a),r.current=o,o},[e,s,n,a])}(e??"",(null==c?void 0:c.user)||(null==c?void 0:c.userId),i,iV.useMemo(()=>({host:t,onUserTokenExpiring:r,timeBeforeExpirationInMs:a,logLevel:n,identificationStrategy:l,branch:u}),[t,r,a,n,l,u]));return iV.createElement(iB.Provider,{value:{knock:d}},iV.createElement(iN,{i18n:o},s))};var iU=((s=iU||{}).All="all",s.Read="read",s.Unseen="unseen",s.Unread="unread",s),iW=e.i(511518),iz=e.i(487122),iH=e.i(516467);let iK=/[T ]/,iq=/[Z ]/i,iY=/([Z+-].*)$/,iG=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,iX=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}
3(?:[.,]\d*)?))?$/,iZ=/^([+-])(\d{2})(?::?(\d{2}))?$/;function iJ(e){return e?parseInt(e):1}function iQ(e){return e&&parseFloat(e.replace(",","."))||0}let i0=[31,null,31,30,31,30,31,31,30,31,30,31];function i1(e){return e%400==0||e%4==0&&e%100!=0}var i2=e.i(539392),i3=e.i(870429),i5=e.i(731285);function i4(e,t){return Math.trunc((0,iH.toDate)(e,t?.in).getMonth()/3)+1}function i9(e,t,n){let[i,r]=(0,i2.normalizeDates)(n?.in,e,t);return 4*(i.getFullYear()-r.getFullYear())+(i4(i)-i4(r))}var i6=e.i(632713),i7=e.i(954259);function i8(e,t,n){let[i,r]=(0,i2.normalizeDates)(n?.in,e,t),a=(0,i7.startOfWeek)(i,n),s=(0,i7.startOfWeek)(r,n);return Math.round((a-(0,i6.getTimezoneOffsetInMilliseconds)(a)-(s-(0,i6.getTimezoneOffsetInMilliseconds)(s)))/iW.millisecondsInWeek)}function re(e,t,n){let[i,r]=(0,i2.normalizeDates)(n?.in,e,t);return i.getFullYear()-r.getFullYear()}function rt(e){return t=>{let n=(e?Math[e]:Math.trunc)(t);return 0===n?0:n}}function rn(e,t,n){let[i,r]=(0,i2.normalizeDates)(n?.in,e,t),a=(i-r)/iW.millisecondsInHour;return rt(n?.roundingMethod)(a)}function ri(e,t){return(0,iH.toDate)(e)-(0,iH.toDate)(t)}function rr(e,t,n){let i=ri(e,t)/iW.millisecondsInMinute;return rt(n?.roundingMethod)(i)}function ra(e,t,n){let i=ri(e,t)/1e3;return rt(n?.roundingMethod)(i)}function rs(e,t){return void 0!==e?e:t}var ro=e.i(383835);function rl(e,t=e=>e){return(0,ro.useSyncExternalStoreWithSelector)(e.subscribe,()=>e.state,()=>e.state,t,ru)}function ru(e,t){if(Object.is(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(let[n,i]of e)if(!t.has(n)||!Object.is(i,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();let n=rc(e);if(n.length!==rc(t).length)return!1;for(let i=0;i<n.length;i++)if(!Object.prototype.hasOwnProperty.call(t,n[i])||!Object.is(e[n[i]],t[n[i]]))return!1;return!0}function rc(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}function rd(e){return t=>rl(e.store.store,t??(e=>e))}let rh=iV.createContext(void 0),rp=()=>{let e=iV.useContext(rh);if(!e)throw Error("useKnockFeed must be used within a KnockFeedProvider");return e};e.s(["KnockFeedProvider",0,({feedId:e,children:t,defaultFeedOptions:n={},colorMode:i="light"})=>{let r;try{r=(()=>{let e=iV.useContext(iB);if(!e)throw Error("useKnockClient must be used within a KnockProvider");return e.knock})()}catch{throw Error("KnockFeedProvider must be used within a KnockProvider.")}let a=function(e,t,n={}){let i=(0,iV.useCallback)((t,n)=>{let i=e.feeds.initialize(t,n);return i.listenForUpdates(),i},[e]),r=iD(n),[a,s]=(0,iV.useState)(()=>({feedClient:i(t,r),options:r})),o=(0,iV.useRef)(!1);return(0,iV.useEffect)(()=>{let e=o.current;if(a.feedClient.feedId!==t||a.options!==r||e){o.current=!1,s({feedClient:i(t,r),options:r});return}return()=>{o.current=!0,a.feedClient.dispose()}},[i,t,r,a]),a.feedClient}(r,e??"",n),s=rd(a);return iV.createElement(rh.Provider,{key:function(e,t,n={}){return[e,t,n.source,n.tenant,n.has_tenant,n.archived].filter(e=>null!=e).join("-")}(r.userId,e??"",n),value:{knock:r,feedClient:a,useFeedStore:s,colorMode:i}},t)},"useKnockFeed",0,rp],832234);iV.createContext(void 0);function rf(){let{translations:e,locale:t}=(0,iV.useContext)(iP);return{locale:t,t:t=>e[t]||iO.translations[t]}}iV.createContext(null);var rm=e.i(973503),rg=e.i(268114),rv=e.i(182242),ry=e.i(340883),ry=ry,rb=e.i(873859),rw=e.i(131265),rx=e.i(436045),rC=e.i(879839),rk=e.i(142917),rS=e.i(717741),rT=e.i(879151),rA=e.i(3909);let rE=()=>{},rM=rE(),r_=Object,rR=e=>e===rM,rI=new WeakMap,rj=(e,t)=>e===`[object ${t}]`,rV=0,rO=e=>{let t,n,i=typeof e,r=r_.prototype.toString.call(e),a=rj(r,"Date"),s=rj(r,"RegExp"),o=rj(r,"Object");if(r_(e)!==e||a||s)t=a?e.toJSON():"symbol"==i?e.toString():"string"==i?JSON.stringify(e):""+e;else{if(t=rI.get(e))return t;if(t=++rV+"~",rI.set(e,t),Array.isArray(e)){for(n=0,t="@";n<e.length;n++)t+=rO(e[n])+",";rI.set(e,t)}if(o){t="#";let i=r_.keys(e).sort();for(;!rR(n=i.pop());
3)rR(e[n])||(t+=n+":"+rO(e[n])+",");rI.set(e,t)}}return t},rP=Promise.resolve();(0,rg.withMiddleware)(rm.default,e=>(t,n,i)=>{let r,a=(0,iV.useRef)(!1),{cache:s,initialSize:o=1,revalidateAll:l=!1,persistSize:u=!1,revalidateFirstPage:c=!0,revalidateOnMount:d=!1,parallel:h=!1}=i,[,,,p]=rv.SWRGlobalState.get(ry.c);try{(r=(e=>{if("function"==typeof e)try{e=e()}catch(t){e=""}let t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?rO(e):"",t]})(t?t(0,null):null)[0])&&(r=rb.INFINITE_PREFIX+r)}catch(e){}let[f,m,g]=(0,rw.createCacheHelper)(s,r),v=(0,iV.useCallback)(()=>(0,rx.isUndefined)(f()._l)?o:f()._l,[s,r,o]);(0,rA.useSyncExternalStore)((0,iV.useCallback)(e=>r?g(r,()=>{e()}):()=>{},[s,r]),v,v);let y=(0,iV.useCallback)(()=>{let e=f()._l;return(0,rx.isUndefined)(e)?o:e},[r,o]),b=(0,iV.useRef)(y());(0,rC.useIsomorphicLayoutEffect)(()=>{if(!a.current){a.current=!0;return}r&&m({_l:u?b.current:y()})},[r,s]);let w=d&&!a.current,x=e(r,async e=>{let r=f()._i,a=f()._r;m({_r:rk.UNDEFINED});let o=[],u=y(),[d]=(0,rw.createCacheHelper)(s,e),g=d().data,v=[],b=null;for(let e=0;e<u;++e){let[u,d]=(0,rS.serialize)(t(e,h?null:b));if(!u)break;let[f,m]=(0,rw.createCacheHelper)(s,u),y=f().data,x=l||r||(0,rx.isUndefined)(y)||c&&!e&&!(0,rx.isUndefined)(g)||w||g&&!(0,rx.isUndefined)(g[e])&&!i.compare(g[e],y);if(n&&("function"==typeof a?a(y,d):x)){let t=async()=>{if(u in p){let e=p[u];delete p[u],y=await e}else y=await n(d);m({data:y,_k:d}),o[e]=y};h?v.push(t):await t()}else o[e]=y;h||(b=y)}return h&&await Promise.all(v.map(e=>e())),m({_i:rk.UNDEFINED}),o},i),C=(0,iV.useCallback)(function(e,t){let n="boolean"==typeof t?{revalidate:t}:t||{},i=!1!==n.revalidate;return r?(i&&((0,rx.isUndefined)(e)?m({_i:!0,_r:n.revalidate}):m({_i:!1,_r:n.revalidate})),arguments.length?x.mutate(e,{...n,revalidate:i}):x.mutate()):rP},[r,s]),k=(0,iV.useCallback)(e=>{let n;if(!r)return rP;let[,i]=(0,rw.createCacheHelper)(s,r);if((0,rT.isFunction)(e)?n=e(y()):"number"==typeof e&&(n=e),"number"!=typeof n)return rP;i({_l:n}),b.current=n;let a=[],[o]=(0,rw.createCacheHelper)(s,r),l=null;for(let e=0;e<n;++e){let[n]=(0,rS.serialize)(t(e,l)),[i]=(0,rw.createCacheHelper)(s,n),r=n?i().data:rk.UNDEFINED;if((0,rx.isUndefined)(r))return C(o().data);a.push(r),l=r}return C(a)},[r,s,C,y]);return{size:y(),setSize:k,mutate:C,get data(){return x.data},get error(){return x.error},get isValidating(){return x.isValidating},get isLoading(){return x.isLoading}}}),iV.createContext(null);let rN=({color:e="rgba(0,0,0,0.4)",speed:t="medium",gap:n=4,thickness:i=4,size:r="1em",...a})=>iV.default.createElement("svg",{height:r,width:r,...a,style:{animationDuration:`${"fast"===t?600:"slow"===t?900:750}ms`},className:"__react-svg-spinner_circle",role:"img","aria-labelledby":"title desc",viewBox:"0 0 32 32"},iV.default.createElement("title",{id:"title"},"Circle loading spinner"),iV.default.createElement("desc",{id:"desc"},'Image of a partial circle indicating "loading."'),iV.default.createElement("style",{dangerouslySetInnerHTML:{__html:`
4      .__react-svg-spinner_circle{
5          transition-property: transform;
6          animation-name: __react-svg-spinner_infinite-spin;
7          animation-iteration-count: infinite;
8          animation-timing-function: linear;
9      }
10      @keyframes __react-svg-spinner_infinite-spin {
11          from {transform: rotate(0deg)}
12          to {transform: rotate(360deg)}
13      }
14    `}}),iV.default.createElement("circle",{role:"presentation",cx:16,cy:16,r:14-i/2,stroke:e,fill:"none",strokeWidth:i,strokeDasharray:2*Math.PI*(11-n),strokeLinecap:"round"})),rL=({hasLabel:e})=>iV.default.createElement("div",{className:`rnf-button-spinner rnf-button-spinner--${e?"with-label":"without-label"}`},iV.default.createElement(rN,null)),rD=({variant:e="primary",loadingText:t,isLoading:n=!1,isDisabled:i=!1,isFullWidth:r=!1,onClick:a,children:s})=>{let{colorMode:o}=rp(),l=["rnf-button",`rnf-button--${e}`,r?"rnf-button--full-width":"",n?"rnf-button--is-loading":"",`rnf-button--${o}`].join(" "),u=t||iV.default.createElement("span",{className:"rnf-button__button-text-hidden"},s);return iV.default.createElement("button",{onClick:a,className:l,disabled:n||i,type:"button"},n&&iV.default.createElement(rL,{hasLabel:!!t}),n?u:s)},rF=({children:e})=>iV.default.createElement("div",{className:"rnf-button-group"},e),rB=({width:e=24,height:t=24,"aria-hidden":n})=>iV.default.createElement("svg",{width:e,viewBox:"0 0 24 24",fill:"none",height:t,"aria-hidden":n},iV.default.createElement("path",{d:"M20.0474 16.4728C18.8436 14.9996 17.9938 14.2496 17.9938 10.1879C17.9938 6.46832 16.
140944 5.14317 14.5311 4.49957C14.3235 4.41426 14.128 4.21832 14.0647 4.00504C13.7905 3.07176 13.0217 2.24957 11.9999 2.24957C10.978 2.24957 10.2088 3.07223 9.93736 4.00598C9.87408 4.2216 9.67861 4.41426 9.47096 4.49957C7.9058 5.1441 6.0083 6.46457 6.0083 10.1879C6.00596 14.2496 5.15611 14.9996 3.95237 16.4728C3.45362 17.0832 3.89049 17.9996 4.76283 17.9996H19.2416C20.1092 17.9996 20.5433 17.0803 20.0474 16.4728Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),iV.default.createElement("path",{d:"M14.9999 17.9988V18.7488C14.9999 19.5445 14.6838 20.3075 14.1212 20.8701C13.5586 21.4327 12.7955 21.7488 11.9999 21.7488C11.2042 21.7488 10.4412 21.4327 9.87856 20.8701C9.31595 20.3075 8.99988 19.5445 8.99988 18.7488V17.9988",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})),r$=({width:e=14,height:t=14,"aria-hidden":n})=>iV.default.createElement("svg",{width:e,height:t,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":n},iV.default.createElement("path",{d:"M7.00012 0.499939C3.41606 0.499939 0.500122 3.41588 0.500122 6.99994C0.500122 10.584 3.41606 13.4999 7.00012 13.4999C10.5842 13.4999 13.5001 10.584 13.5001 6.99994C13.5001 3.41588 10.5842 0.499939 7.00012 0.499939ZM9.35356 8.6465C9.40194 8.69247 9.44063 8.74766 9.46735 8.80881C9.49407 8.86997 9.50828 8.93585 9.50913 9.00259C9.50999 9.06932 9.49747 9.13555 9.47233 9.19737C9.44718 9.25919 9.40992 9.31535 9.36273 9.36254C9.31553 9.40973 9.25937 9.447 9.19755 9.47214C9.13573 9.49729 9.0695 9.5098 9.00277 9.50895C8.93604 9.50809 8.87015 9.49389 8.809 9.46717C8.74784 9.44045 8.69265 9.40176 8.64668 9.35337L7.00012 7.70712L5.35356 9.35337C5.25903 9.44318 5.13315 9.49251 5.00277 9.49084C4.87239 9.48918 4.74782 9.43664 4.65562 9.34444C4.56342 9.25224 4.51088 9.12767 4.50921 8.99729C4.50755 8.86691 4.55687 8.74103 4.64668 8.6465L6.29293 6.99994L4.64668 5.35338C4.55687 5.25884 4.50755 5.13297 4.50921 5.00259C4.51088 4.87221 4.56342 4.74764 4.65562 4.65544C4.74782 4.56324 4.87239 4.5107 5.00277 4.50903C5.13315 4.50736 5.25903 4.55669 5.35356 4.6465L7.00012 6.29275L8.64668 4.6465C8.74121 4.55669 8.86709 4.50736 8.99747 4.50903C9.12785 4.5107 9.25242 4.56324 9.34462 4.65544C9.43682 4.74764 9.48936 4.87221 9.49103 5.00259C9.4927 5.13297 9.44337 5.25884 9.35356 5.35338L7.70731 6.99994L9.35356 8.6465Z",fill:"currentColor"}));function rU(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function rW(e){var t=rU(e).Element;return e instanceof t||e instanceof Element}function rz(e){var t=rU(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function rH(e){if("u"<typeof ShadowRoot)return!1;var t=rU(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}e.i(351853);var rK=Math.max,rq=Math.min,rY=Math.round;function rG(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function rX(){return!/^((?!chrome|android).)*safari/i.test(rG())}function rZ(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var i=e.getBoundingClientRect(),r=1,a=1;t&&rz(e)&&(r=e.offsetWidth>0&&rY(i.width)/e.offsetWidth||1,a=e.offsetHeight>0&&rY(i.height)/e.offsetHeight||1);var s=(rW(e)?rU(e):window).visualViewport,o=!rX()&&n,l=(i.left+(o&&s?s.offsetLeft:0))/r,u=(i.top+(o&&s?s.offsetTop:0))/a,c=i.width/r,d=i.height/a;return{width:c,height:d,top:u,right:l+c,bottom:u+d,left:l,x:l,y:u}}function rJ(e){var t=rU(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function rQ(e){return e?(e.nodeName||"").toLowerCase():null}function r0(e){return((rW(e)?e.ownerDocument:e.document)||window.document).documentElement}function r1(e){return rZ(r0(e)).left+rJ(e).scrollLeft}function r2(e){return rU(e).getComputedStyle(e)}function r3(e){var t=r2(e),n=t.overflow,i=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+i)}function r5(e){var t=rZ(e),n=e.offsetWidth,i=e.offsetHeight;return 1>=Math.abs(t.width-n)&&(n=t.width),1>=Math.abs(t.height-i)&&(i=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:i}}function r4(e){return"html"===rQ(e)?e:e.assignedSlot||e.parentNode||(rH(e)?e.host:null)||r0(e)}function r9(e,t){void 0===t&&(t=[]);var n,i=function e(t){return["html","body","#document"].indexOf(rQ(t))>=0?t.ownerDocument.body:rz(t)&&r3(t)?t:e(r4(t))}(e),r=i===(null==(n=e.ownerDocument)?void 0:n.body),a=rU(i),s=r?[a].concat(a.visualVie
14wport||[],r3(i)?i:[]):i,o=t.concat(s);return r?o:o.concat(r9(r4(s)))}function r6(e){return rz(e)&&"fixed"!==r2(e).position?e.offsetParent:null}function r7(e){for(var t=rU(e),n=r6(e);n&&["table","td","th"].indexOf(rQ(n))>=0&&"static"===r2(n).position;)n=r6(n);return n&&("html"===rQ(n)||"body"===rQ(n)&&"static"===r2(n).position)?t:n||function(e){var t=/firefox/i.test(rG());if(/Trident/i.test(rG())&&rz(e)&&"fixed"===r2(e).position)return null;var n=r4(e);for(rH(n)&&(n=n.host);rz(n)&&0>["html","body"].indexOf(rQ(n));){var i=r2(n);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||t&&"filter"===i.willChange||t&&i.filter&&"none"!==i.filter)return n;n=n.parentNode}return null}(e)||t}var r8="bottom",ae="right",at="left",an="auto",ai=["top",r8,ae,at],ar="start",aa="viewport",as="popper",ao=ai.reduce(function(e,t){return e.concat([t+"-"+ar,t+"-end"])},[]),al=[].concat(ai,[an]).reduce(function(e,t){return e.concat([t,t+"-"+ar,t+"-end"])},[]),au=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function ac(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&rH(n)){var i=t;do{if(i&&e.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function ad(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function ah(e,t,n){var i,r,a,s,o,l,u,c,d,h;return t===aa?ad(function(e,t){var n=rU(e),i=r0(e),r=n.visualViewport,a=i.clientWidth,s=i.clientHeight,o=0,l=0;if(r){a=r.width,s=r.height;var u=rX();(u||!u&&"fixed"===t)&&(o=r.offsetLeft,l=r.offsetTop)}return{width:a,height:s,x:o+r1(e),y:l}}(e,n)):rW(t)?((i=rZ(t,!1,"fixed"===n)).top=i.top+t.clientTop,i.left=i.left+t.clientLeft,i.bottom=i.top+t.clientHeight,i.right=i.left+t.clientWidth,i.width=t.clientWidth,i.height=t.clientHeight,i.x=i.left,i.y=i.top,i):ad((r=r0(e),s=r0(r),o=rJ(r),l=null==(a=r.ownerDocument)?void 0:a.body,u=rK(s.scrollWidth,s.clientWidth,l?l.scrollWidth:0,l?l.clientWidth:0),c=rK(s.scrollHeight,s.clientHeight,l?l.scrollHeight:0,l?l.clientHeight:0),d=-o.scrollLeft+r1(r),h=-o.scrollTop,"rtl"===r2(l||s).direction&&(d+=rK(s.clientWidth,l?l.clientWidth:0)-u),{width:u,height:c,x:d,y:h}))}function ap(e){return e.split("-")[0]}function af(e){return e.split("-")[1]}function am(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function ag(e){var t,n=e.reference,i=e.element,r=e.placement,a=r?ap(r):null,s=r?af(r):null,o=n.x+n.width/2-i.width/2,l=n.y+n.height/2-i.height/2;switch(a){case"top":t={x:o,y:n.y-i.height};break;case r8:t={x:o,y:n.y+n.height};break;case ae:t={x:n.x+n.width,y:l};break;case at:t={x:n.x-i.width,y:l};break;default:t={x:n.x,y:n.y}}var u=a?am(a):null;if(null!=u){var c="y"===u?"height":"width";switch(s){case ar:t[u]=t[u]-(n[c]/2-i[c]/2);break;case"end":t[u]=t[u]+(n[c]/2-i[c]/2)}}return t}function av(){return{top:0,right:0,bottom:0,left:0}}function ay(e){return Object.assign({},av(),e)}function ab(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}function aw(e,t){void 0===t&&(t={});var n,i,r,a,s,o,l,u,c=t,d=c.placement,h=void 0===d?e.placement:d,p=c.strategy,f=void 0===p?e.strategy:p,m=c.boundary,g=c.rootBoundary,v=c.elementContext,y=void 0===v?as:v,b=c.altBoundary,w=c.padding,x=void 0===w?0:w,C=ay("number"!=typeof x?x:ab(x,ai)),k=e.rects.popper,S=e.elements[void 0!==b&&b?y===as?"reference":as:y],T=(n=rW(S)?S:S.contextElement||r0(e.elements.popper),i=void 0===m?"clippingParents":m,r=void 0===g?aa:g,l=(o=[].concat("clippingParents"===i?(a=r9(r4(n)),!rW(s=["absolute","fixed"].indexOf(r2(n).position)>=0&&rz(n)?r7(n):n)?[]:a.filter(function(e){return rW(e)&&ac(e,s)&&"body"!==rQ(e)})):[].concat(i),[r]))[0],(u=o.reduce(function(e,t){var i=ah(n,t,f);
14return e.top=rK(i.top,e.top),e.right=rq(i.right,e.right),e.bottom=rq(i.bottom,e.bottom),e.left=rK(i.left,e.left),e},ah(n,l,f))).width=u.right-u.left,u.height=u.bottom-u.top,u.x=u.left,u.y=u.top,u),A=rZ(e.elements.reference),E=ag({reference:A,element:k,strategy:"absolute",placement:h}),M=ad(Object.assign({},k,E)),_=y===as?M:A,R={top:T.top-_.top+C.top,bottom:_.bottom-T.bottom+C.bottom,left:T.left-_.left+C.left,right:_.right-T.right+C.right},I=e.modifiersData.offset;if(y===as&&I){var j=I[h];Object.keys(R).forEach(function(e){var t=[ae,r8].indexOf(e)>=0?1:-1,n=["top",r8].indexOf(e)>=0?"y":"x";R[e]+=j[n]*t})}return R}var ax={placement:"bottom",modifiers:[],strategy:"absolute"};function aC(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(e){return!(e&&"function"==typeof e.getBoundingClientRect)})}var ak={passive:!0},aS={top:"auto",right:"auto",bottom:"auto",left:"auto"};function aT(e){var t,n,i,r,a,s,o,l=e.popper,u=e.popperRect,c=e.placement,d=e.variation,h=e.offsets,p=e.position,f=e.gpuAcceleration,m=e.adaptive,g=e.roundOffsets,v=e.isFixed,y=h.x,b=void 0===y?0:y,w=h.y,x=void 0===w?0:w,C="function"==typeof g?g({x:b,y:x}):{x:b,y:x};b=C.x,x=C.y;var k=h.hasOwnProperty("x"),S=h.hasOwnProperty("y"),T=at,A="top",E=window;if(m){var M=r7(l),_="clientHeight",R="clientWidth";M===rU(l)&&"static"!==r2(M=r0(l)).position&&"absolute"===p&&(_="scrollHeight",R="scrollWidth"),("top"===c||(c===at||c===ae)&&"end"===d)&&(A=r8,x-=(v&&M===E&&E.visualViewport?E.visualViewport.height:M[_])-u.height,x*=f?1:-1),(c===at||("top"===c||c===r8)&&"end"===d)&&(T=ae,b-=(v&&M===E&&E.visualViewport?E.visualViewport.width:M[R])-u.width,b*=f?1:-1)}var I=Object.assign({position:p},m&&aS),j=!0===g?(t={x:b,y:x},n=rU(l),i=t.x,r=t.y,{x:rY(i*(a=n.devicePixelRatio||1))/a||0,y:rY(r*a)/a||0}):{x:b,y:x};return(b=j.x,x=j.y,f)?Object.assign({},I,((o={})[A]=S?"0":"",o[T]=k?"0":"",o.transform=1>=(E.devicePixelRatio||1)?"translate("+b+"px, "+x+"px)":"translate3d("+b+"px, "+x+"px, 0)",o)):Object.assign({},I,((s={})[A]=S?x+"px":"",s[T]=k?b+"px":"",s.transform="",s))}var aA={left:"right",right:"left",bottom:"top",top:"bottom"};function aE(e){return e.replace(/left|right|bottom|top/g,function(e){return aA[e]})}var aM={start:"end",end:"start"};function a_(e){return e.replace(/start|end/g,function(e){return aM[e]})}function aR(e,t,n){return rK(e,rq(t,n))}
14function aI(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function aj(e){return["top",ae,r8,at].some(function(t){return e[t]>=0})}var aV=(oE=void 0===(oA=(oT={defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,i=e.options,r=i.scroll,a=void 0===r||r,s=i.resize,o=void 0===s||s,l=rU(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&u.forEach(function(e){e.addEventListener("scroll",n.update,ak)}),o&&l.addEventListener("resize",n.update,ak),function(){a&&u.forEach(function(e){e.removeEventListener("scroll",n.update,ak)}),o&&l.removeEventListener("resize",n.update,ak)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=ag({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,i=n.gpuAcceleration,r=n.adaptive,a=n.roundOffsets,s=void 0===a||a,o={placement:ap(t.placement),variation:af(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:void 0===i||i,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,aT(Object.assign({},o,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:void 0===r||r,roundOffsets:s})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,aT(Object.assign({},o,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:s})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var n=t.styles[e]||{},i=t.attributes[e]||{},r=t.elements[e];
14rz(r)&&rQ(r)&&(Object.assign(r.style,n),Object.keys(i).forEach(function(e){var t=i[e];!1===t?r.removeAttribute(e):r.setAttribute(e,!0===t?"":t)}))})},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(e){var i=t.elements[e],r=t.attributes[e]||{},a=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce(function(e,t){return e[t]="",e},{});rz(i)&&rQ(i)&&(Object.assign(i.style,a),Object.keys(r).forEach(function(e){i.removeAttribute(e)}))})}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,i=e.name,r=n.offset,a=void 0===r?[0,0]:r,s=al.reduce(function(e,n){var i,r,s,o,l,u;return e[n]=(i=t.rects,s=[at,"top"].indexOf(r=ap(n))>=0?-1:1,l=(o="function"==typeof a?a(Object.assign({},i,{placement:n})):a)[0],u=o[1],l=l||0,u=(u||0)*s,[at,ae].indexOf(r)>=0?{x:u,y:l}:{x:l,y:u}),e},{}),o=s[t.placement],l=o.x,u=o.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[i]=s}},{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,i=e.name;if(!t.modifiersData[i]._skip){for(var r=n.mainAxis,a=void 0===r||r,s=n.altAxis,o=void 0===s||s,l=n.fallbackPlacements,u=n.padding,c=n.boundary,d=n.rootBoundary,h=n.altBoundary,p=n.flipVariations,f=void 0===p||p,m=n.allowedAutoPlacements,g=t.options.placement,v=ap(g)===g,y=l||(v||!f?[aE(g)]:function(e){if(ap(e)===an)return[];var t=aE(e);return[a_(e),t,a_(t)]}(g)),b=[g].concat(y).reduce(function(e,n){var i,r,a,s,o,l,h,p,g,v,y,b;return e.concat(ap(n)===an?(r=(i={placement:n,boundary:c,rootBoundary:d,padding:u,flipVariations:f,allowedAutoPlacements:m}).placement,a=i.boundary,s=i.rootBoundary,o=i.padding,l=i.flipVariations,p=void 0===(h=i.allowedAutoPlacements)?al:h,0===(y=(v=(g=af(r))?l?ao:ao.filter(function(e){return af(e)===g}):ai).filter(function(e){return p.indexOf(e)>=0})).length&&(y=v),Object.keys(b=y.reduce(function(e,n){return e[n]=aw(t,{placement:n,boundary:a,rootBoundary:s,padding:o})[ap(n)],e},{})).sort(function(e,t){return b[e]-b[t]})):n)},[]),w=t.rects.reference,x=t.rects.popper,C=new Map,k=!0,S=b[0],T=0;T<b.length;T++){var A=b[T],E=ap(A),M=af(A)===ar,_=["top",r8].indexOf(E)>=0,R=_?"width":"height",I=aw(t,{placement:A,boundary:c,rootBoundary:d,altBoundary:h,padding:u}),j=_?M?ae:at:M?r8:"top";w[R]>x[R]&&(j=aE(j));var V=aE(j),O=[];if(a&&O.push(I[E]<=0),o&&O.push(I[j]<=0,I[V]<=0),O.every(function(e){return e})){S=A,k=!1;break}C.set(A,O)}if(k)for(var P=f?3:1,N=function(e){var t=b.find(function(t){var n=C.get(t);if(n)return n.slice(0,e).every(function(e){return e})});if(t)return S=t,"break"},L=P;L>0&&"break"!==N(L);L--);t.placement!==S&&(t.modifiersData[i]._skip=!0,t.placement=S,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,i=e.name,r=n.mainAxis,a=n.altAxis,s=n.boundary,o=n.rootBoundary,l=n.altBoundary,u=n.padding,c=n.tether,d=void 0===c||c,h=n.tetherOffset,p=void 0===h?0:h,f=aw(t,{boundary:s,rootBoundary:o,padding:u,altBoundary:l}),m=ap(t.placement),g=af(t.placement),v=!g,y=am(m),b="x"===y?"y":"x",w=t.modifiersData.popperOffsets,x=t.rects.reference,C=t.rects.popper,k="function"==typeof p?p(Object.assign({},t.rects,{placement:t.placement})):p,S="number"==typeof k?{mainAxis:k,altAxis:k}:Object.assign({mainAxis:0,altAxis:0},k),T=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,A={x:0,y:0};if(w){if(void 0===r||r){var E,M="y"===y?"top":at,_="y"===y?r8:ae,R="y"===y?"height":"width",I=w[y],j=I+f[M],V=I-f[_],O=d?-C[R]/2:0,P=g===ar?x[R]:C[R],N=g===ar?-C[R]:-x[R],L=t.elements.arrow,D=d&&L?r5(L):{width:0,height:0},F=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:av(),B=F[M],$=F[_],U=aR(0,x[R],D[R]),W=v?x[R]/2-O-U-B-S.mainAxis:P-U-B-S.mainAxis,z=v?-x[R]/2+O+U+$+S.mainAxis:N+U+$+S.mainAxis,H=t.elements.arrow&&r7(t.elements.arrow),K=H?"y"===y?H.clientTop||0:H.clientLeft||0:0,q=null!=(E=null==T?void 0:T[y])?E:0,Y=aR(d?rq(j,I+W-q-K):j,I,d?rK(V,I+z-q):V);w[y]=Y,A[y]=Y-I}if(void 0!==a&&a){var G,X,Z="x"===y?"top":at,J="x"===y?r8:ae,Q=w[b],ee="y"===b?"height":"width",et=Q+f[Z],en=Q-f[J],ei=-1!==["top",at].indexOf(m),er=null!=(X=null==T?void 0:T[b])?X:0,ea=ei?et:Q-x[ee]-C[ee]-er+S.altAxis,es=ei?Q+x[ee]+C[ee]-er-S.altAxis:en,eo=d&&ei?(G=aR(ea,Q,es))>es?es:G:aR(d?ea:et,Q,d?es:en);w[b]=eo,A[b]=eo-Q}t.modifiersData[i]=A}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,i=e.name,r=e.options,a=n.elements.arrow,s=n.modifiersData.popperOffsets,o=ap(n.placement),l=am(o),u=[at,ae].indexOf(o)>=0?"height":"width";if(a&&s){var c,d=(c=r.padding,ay("number"!=typeof(c="function"==typeof c?c(Object.assign({},n.rects,{placement:n.placement})):c)?c:ab(c,ai))),h=r5(a),p="y"===l?"top":at,f="y"===l?r8:ae,m=n.rects.reference[u]+n.rects.reference[l]-s[l]-n.rects.popper[u],g=s[l]-n.rects.reference[l],v=r7(a),y=v?"y"===l?v.clientHeight||0:v.clientWidth||0:0,b=d[p],w=y-h[u]-d[f],x=y/2-h[u]/2+(m/2-g/2),C=aR(b,x,w);n.modifiersData[i]=((t={})[l]=C,t.centerOffset=C-x,t)}},effect:function(e){var t=e.state,n=e.options.element,i=void 0===n?"[data-popper-arrow]":n;null==i||("string"!=typeof i||(i=t.elements.popper.querySelector(i)))&&ac(t.elements.popper,i)&&(t.elements.arrow=i)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,i=t.rects.reference,r=t.rects.popper,a=t.modifiersData.preventOverflow,s=aw(t,{elementContext:"reference"}),o=aw(t,{altBoundary:!0}),l=aI(s,i),u=aI(o,r,a),c=aj(l),d=aj(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}}]}).defaultModifiers)?[]:oA,o_=void 0===(oM=oT.defaultOptions)?ax:oM,function(e,t,n){void 0===n&&(n=o_);var i,r,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},ax,o_),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},s=[],o=!1,l={state:a,setOptions:function(n){var i,r,o,c,d,h,p="function"==typeof n?n(a.options):n;u(),a.options=Object.assign({},o_,a.options,p),a.scrollParents={reference:rW(e)?r9(e):e.contextElement?r9(e.contextElement):[],popper:r9(t)};var f=(r=Object.keys(i=[].concat(oE,a.options.modifiers).reduce(function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e},{})).map(function(e){return i[e]}),o=new Map,c=new Set,d=[],r.forEach(function(e){o.set(e.name,e)}),r.forEach(function(e){c.has(e.name)||function e(t){c.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEac
14h(function(t){if(!c.has(t)){var n=o.get(t);n&&e(n)}}),d.push(t)}(e)}),h=d,au.reduce(function(e,t){return e.concat(h.filter(function(e){return e.phase===t}))},[]));return a.orderedModifiers=f.filter(function(e){return e.enabled}),a.orderedModifiers.forEach(function(e){var t=e.name,n=e.options,i=e.effect;if("function"==typeof i){var r=i({state:a,name:t,instance:l,options:void 0===n?{}:n});s.push(r||function(){})}}),l.update()},forceUpdate:function(){if(!o){var e=a.elements,t=e.reference,n=e.popper;if(aC(t,n)){a.rects={reference:(i=r7(n),r="fixed"===a.options.strategy,s=rz(i),h=rz(i)&&(c=rY((u=i.getBoundingClientRect()).width)/i.offsetWidth||1,d=rY(u.height)/i.offsetHeight||1,1!==c||1!==d),p=r0(i),f=rZ(t,h,r),m={scrollLeft:0,scrollTop:0},g={x:0,y:0},(s||!s&&!r)&&(("body"!==rQ(i)||r3(p))&&(m=function(e){return e!==rU(e)&&rz(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:rJ(e)}(i)),rz(i)?(g=rZ(i,!0),g.x+=i.clientLeft,g.y+=i.clientTop):p&&(g.x=r1(p))),{x:f.left+m.scrollLeft-g.x,y:f.top+m.scrollTop-g.y,width:f.width,height:f.height}),popper:r5(n)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach(function(e){return a.modifiersData[e.name]=Object.assign({},e.data)});for(var i,r,s,u,c,d,h,p,f,m,g,v=0;v<a.orderedModifiers.length;v++){if(!0===a.reset){a.reset=!1,v=-1;continue}var y=a.orderedModifiers[v],b=y.fn,w=y.options,x=void 0===w?{}:w,C=y.name;"function"==typeof b&&(a=b({state:a,options:x,name:C,instance:l})||a)}}}},update:(i=function(){return new Promise(function(e){l.forceUpdate(),e(a)})},function(){return r||(r=new Promise(function(e){Promise.resolve().then(function(){r=void 0,e(i())})})),r}),destroy:function(){u(),o=!0}};if(!aC(e,t))return l;function u(){s.forEach(function(e){return e()}),s=[]}return l.setOptions(n).then(function(e){!o&&n.onFirstUpdate&&n.onFirstUpdate(e)}),l});let aO=({item:e})=>{let{colorMode:t,feedClient:n}=rp(),{t:i}=rf(),[r,a]=(0,iV.useState)(!1),s=(0,iV.useRef)(null),o=(0,iV.useRef)(null),l=(0,iV.useCallback)(t=>{t.preventDefault(),t.stopPropagation(),n.markAsArchived(e)},[e]);return(0,iV.useEffect)(()=>{if(s.current&&o.current&&r){let e=aV(s.current,o.current,{placement:"top-end",modifiers:[{name:"offset",options:{offset:[0,8]}}]});return()=>{e.destroy()}}},[r]),iV.default.createElement("button",{ref:s,onClick:l,onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),type:"button","aria-label":i("archiveNotification"),className:`rnf-archive-notification-btn rnf-archive-notification-btn--${t}`},iV.default.createElement(r$,{"aria-hidden":!0}),r&&iV.default.createElement("div",{ref:o,className:`rnf-tooltip rnf-tooltip--${t}`},i("archiveNotification")))},aP=({name:e,src:t})=>iV.default.createElement("div",{className:"rnf-avatar"},t?iV.default.createElement("img",{src:t,alt:e,className:"rnf-avatar__image"}):iV.default.createElement("span",{className:"rnf-avatar__initials"},function(e){let[t,n]=e.split(" ");return t&&n?`${t.charAt(0)}${n.charAt(0)}`:t?t.charAt(0):""}(e)));function aN(e){e&&""!==e&&setTimeout(()=>window.location.assign(e),200)}iV.default.forwardRef(({item:e,onItemClick:t,onButtonClick:n,avatar:i,children:r,archiveButton:a},s)=>{var o;let{feedClient:l,colorMode:u}=rp(),{locale:c}=rf(),d=(0,iV.useMemo)(()=>e.blocks.reduce((e,t)=>({...e,[t.name]:t}),{}),[e]),h=null==(o=d.action_url)?void 0:o.rendered,p=d.actions,f=iV.default.useCallback(()=>(l.markAsInteracted(e,{type:"cell_click",action:h}),t?t(e):aN(h)),[e,h,t,l]),m=iV.default.useCallback((t,i)=>(l.markAsInteracted(e,{type:"button_click",name:i.name,label:i.label,action:i.action}),n?n(e,i):aN(i.action)),[n,l,e]),g=iV.default.useCallback(e=>{"Enter"===e.key&&(e.stopPropagation(),f())},[f]),v=e.actors[0];return iV.default.createElement("div",{ref:s,className:`rnf-notification-cell rnf-notification-cell--${u}`,onClick:f,onKeyDown:g,tabIndex:0},iV.default.createElement("div",{className:"rnf-notification-cell__inner"},!e.read_at&&iV.default.createElement("div",{className:"rnf-notification-cell__unread-dot"}),rs(i,v&&"name"in v&&v.name&&iV.default.createElement(aP,{name:v.name,src:v.avatar})),iV.default.createElement("div",{className:"rnf-notification-cell__content-outer"},d.body&&iV.default.createElement("div",{className:"rnf-notification-cell__content",dangerouslySetInnerHTML:{__html:d.body.rendered}}),p&&iV.default.createElement("div",{className:"rnf-notification-cell__button-group"},iV.default.createElement(rF,null,p.buttons.map((e,t)=>iV.default.createElement(rD,{variant:0===t?"primary":"secondary",key:e.name,onClick:t=>m(t,e)},e.label)))),r&&iV.default.createElement("div",{className:"rnf-notification-cell__child-content"},r),iV.default.createElement("span",{className:"rnf-notification-cell__timestamp"},function(e,t={}){try{let n=function(e){let t,n,i=()=>(0,iz.constructFrom)(void 0,NaN),r=function(e){let t,n={},i=e.split(iK);if(i.length>2)return n;if(/:/.test(i[0])?t=i[0]:(n.date=i[0],t=i[1],iq.test(n.date)&&(n.date=e.split(iq)[0],t=e.substr(n.date.length,e.length))),t){let e=iY.exec(t);e?(n.time=t.replace(e[1],""),n.timezone=e[1]):n.time=t}return n}(e);if(r.date){let e=function(e,t){let n=RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),i=e.match(n);if(!i)return{year:NaN,restDateString:""};let r=i[1]?parseInt(i[1]):null,a=i[2]?parseInt(i[2]):null;return{year:null===a?r:100*a,restDateString:e.slice((i[1]||i[2]).length)}}(r.date,(void 0)??2);t=function(e,t){if(null===t)return new Date(NaN);let n=e.match(iG);if(!n)return new Date(NaN);let i=!!n[4],r=iJ(n[1]),a=iJ(n[2])-1,s=iJ(n[3]),o=iJ(n[4]),l=iJ(n[5])-1;if(i){let e,n;return o>=1&&o<=53&&l>=0&&l<=6?((e=new Date(0)).setUTCFullYear(t,0,4),n=e.getUTCDay()||7,e.setUTCDate(e.getUTCDate()+((o-1)*7+l+1-n)),e):new Date(NaN)}{let e=new Date(0);return a>=0&&a<=11&&s>=1&&s<=(i0[a]||(i1(t)?29:28))&&r>=1&&r<=(i1(t)?366:365)?(e.setUTCFullYear(t,a,Math.max(r,s)),e):new Date(NaN)}}(e.restDateString,e.year)}if(!t||isNaN(+t))return i();let a=+t,s=0;if(r.time&&isNaN(s=function(e){let t=e.match(iX);if(!t)return NaN;let n=iQ(t[1]),i=iQ(t[2]),r=iQ(t[3]);return(24===n?0===i&&0===r:r>=0&&r<60&&i>=0&&i<60&&n>=0&&n<25)?n*iW.millisecondsInHour+i*iW.millisecondsInMinute+1e3*r:NaN}(r.time)))return i();if(r.timezone){if(isNaN(n=function(e){if("Z"===e)return 0;let t=e.match(iZ);if(!t)return 0;let n="+"===t[1]?-1:1,i=parseInt(t[2]),r=t[3]&&parseInt(t[3])||0;return r>=0&&r<=59?n*(i*iW.millisecondsInHour+r*iW.millisecondsInMinute):NaN}(r.timezone)))return i()}else{let e=new Date(a+s),t=(0,iH.toDate)(0,void 0);return t.setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),t.setHours(e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()),t}return(0,iH.toDate)(a+s+n,void 0)}(e);return function(e,t,n){let i,r=0,[a,s]=(0,i2.normalizeDates)(n?.in,e,t);if(n?.unit)"second"===(i=n?.unit)?r=ra(a,s):"minute"===i?r=rr(a,s):"hour"===i?r=rn(a,s):"day"===i?r=(0,i3.differenceInCalendarDays)(a,s):"week"===i?r=i8(a,s):"month"===i?r=(0,i5.differenceInCalendarMonths)(a,s):"quarter"===i?r=i9(a,s):"year"===i&&(r=re(a,s));else{let e=ra(a,s);Math.abs(e)<iW.secondsInMinute?(r=ra(a,s),i="second"):Math.abs(e)<iW.secondsInHour?(r=rr(a,s),i="minute"):Math.abs(e)<iW.secondsInDay&&1>Math.abs((0,i3.differenceInCalendarDays)(a,s))?(r=rn(a,s),i="hour"):Math.abs(e)<iW.secondsInWeek&&(r=(0,i3.differenceInCalendarDays)(a,s))&&7>Math.abs(r)?i="day":Math.abs(e)<iW.secondsInMonth?(r=i8(a,s),i="week"):Math.abs(e)<iW.secondsInQuarter?(r=(0,i5.differenceInCalendarMonths)(a,s),i="month"):Math.abs(e)<iW.secondsInYear&&4>i9(a,s)?(r=i9(a,s),i="quarter"):(r=re(a,s),i="year")}return new Intl.RelativeTimeFormat(n?.locale,{numeric:"auto",...n}).format(r,i)}(n,new Date,{locale:t.locale})}catch{return e}}(e.inserted_at,{locale:c}))),rs(a,iV.default.createElement(aO,{item:e}))))}),iU.All,iU.Unread,iU.Read;let aL=({badgeCountType:e="unseen"})=>{let t,{useFeedStore:n}=rp(),i=n(t=>(function(e,t){switch(e){case"all":return t.total_count;case"unread":return t.unread_count;case"unseen":return t.unseen_count}})(e,t.metadata));return 0!==i?iV.default.createElement("div",{className:"rnf-unseen-badge",role:"status","aria-label":(t="all"===e?"":`${e} `,`${i} ${t}${1===i?"notification":"notifications"}`)},iV.default.createElement("span",{className:"rnf-unseen-badge__count","aria-hidden":"true"},i>9?"9+":i)):null};iV.default.forwardRef(({onClick:e,badgeCountType:t},n)=>{let{colorMode:i}=rp();return iV.default.createElement("button",{className:`rnf-notification-icon-button rnf-notification-icon-button--${i}`,"aria-label":"Open notification feed",ref:n,onClick:e},iV.default.createElement(rB,{"aria-hidden":!0}),iV.default.createElement(aL,{badgeCountType:t}))});var aD=e.i(7284);let aF=e=>{let t;try{t=new URL(e)}catch{return!1}return"http:"===t.protocol||"https:"===t.protocol},aB=({children:e,className:t,...n})=>iV.default.createElement("div",{className:(0,aD.default)("knock-guide-banner",t),...n},e);aB.displayName="BannerView.Root";let a$=({children:e,className:t,...n})=>iV.default.createElement("div",{className:(0,aD.default)("knock-guide-banner__message",t),...n},e);a$.displayName="BannerView.Content";let aU=({title:e,className:t,...n})=>iV.default.createElement("div",{className:(0,aD.default)("knock-guide-banner__title",t),...n},e);aU.displayName="BannerView.Title";let aW=({body:e,className:t,...n})=>iV.default.createElement("div",{className:(0,aD.default)("knock-guide-banner__body",t),dangerouslySetInnerHTML:{__html:e},...n});aW.displayName="BannerView.Body";let az=({children:e,className:t,...n})=>iV.default.createElement("div",{className:(0,aD.default)("knock-guide-banner__actions",t),...n},e);az.displayName="BannerView.Actions";let aH=({text:e,action:t,className:n,...i})=>iV.default.createElement("button",{className:(0,aD.default)("knock-guide-banner__action",n),...i},e);aH.displayName="BannerView.PrimaryButton";let aK=({text:e,action:t,className:n,...i})=>iV.default.createElement("button",{className:(0,aD.default)("knock-guide-banner__action knock-guide-banner__action--secondary",n),...i},e);aK.displayName="BannerView.SecondaryButton";let aq=({className:e,...t})=>iV.default.createElement("button",{className:(0,aD.default)("knock-guide-banner__close",e),...t},iV.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",fill:"none"},iV.default.createElement("g",{fill:"#60646C",fillRule:"evenodd",clipRule:"evenodd"},iV.default.createElement("path",{d:"M14.03 3.97a.75.75 0 0 1 0 1.06l-9 9a.75.75 0 0 1-1.06-1.06l9-9a.75.75 0 0 1 1.06 0Z"}),iV.default.createElement("path",{d:"M3.97 3.97a.75.75 0 0 1 1.06 0l9 9a.75.75 0 1 1-1.06 1.06l-9-9a.75.75 0 0 1 0-1.06Z"}))));aq.displayName="BannerView.DismissButton";let aY=({content:e,colorMode:t="light",onDismiss:n,onButtonClick:i})=>iV.default.createElement(aB,{"data-knock-color-mode":t},iV.default.createElement(a$,null,iV.default.createElement(aU,{title:e.title}),iV.default.createElement(aW,{body:e.body})),iV.default.createElement(az,null,e.secondary_button&&iV.default.createElement(aK,{text:e.secondary_button.text,action:e.secondary_button.action,onClick:t=>{if(i){let{text:n,action:r}=e.secondary_button;i(t,{name:"secondary_button",text:n,action:r})}}}),e.primary_button&&iV.default.createElement(aH,{text:e.primary_button.text,action:e.primary_button.action,onClick:t=>{if(i){let{text:n,action:r}=e.primary_button;i(t,{name:"primary_button",text:n,action:r})}}}),e.dismissible&&iV.default.createElement(aq,{onClick:n})));aY.displayName="BannerView.Default",Object.assign({},{Default:aY,Root:aB,Content:a$,Title:aU,Body:aW,Actions:az,PrimaryButton:aH,SecondaryButton:aK,DismissButton:aq});let aG=({children:e,className:t,...n})=>iV.default.createElement("div",{className:(0,aD.default)("knock-guide-card",t),...n},e);
14aG.displayName="CardView.Root";let aX=({children:e,className:t,...n})=>iV.default.createElement("div",{className:(0,aD.default)("knock-guide-card__message",t),...n},e);aX.displayName="CardView.Content";let aZ=({children:e,className:t,...n})=>iV.default.createElement("div",{className:(0,aD.default)("knock-guide-card__header",t),...n},e);aZ.displayName="CardView.Header";let aJ=({headline:e,className:t,...n})=>iV.default.createElement("div",{className:(0,aD.default)("knock-guide-card__headline",t),...n},e);aJ.displayName="CardView.Headline";let aQ=({title:e,className:t,...n})=>iV.default.createElement("div",{className:(0,aD.default)("knock-guide-card__title",t),...n},e);aQ.displayName="CardView.Title";let a0=({body:e,className:t,...n})=>iV.default.createElement("div",{className:(0,aD.default)("knock-guide-card__body",t),dangerouslySetInnerHTML:{__html:e},...n});a0.displayName="CardView.Body";let a1=({children:e,className:t,alt:n,...i})=>iV.default.createElement("img",{className:(0,aD.default)("knock-guide-card__img",t),alt:n||"",...i},e);a1.displayName="CardView.Img";let a2=({children:e,className:t,...n})=>iV.default.createElement("div",{className:(0,aD.default)("knock-guide-card__actions",t),...n},e);a2.displayName="CardView.Actions";let a3=({text:e,action:t,className:n,...i})=>iV.default.createElement("button",{className:(0,aD.default)("knock-guide-card__action",n),...i},e);a3.displayName="CardView.PrimaryButton";let a5=({text:e,action:t,className:n,...i})=>iV.default.createElement("button",{className:(0,aD.default)("knock-guide-card__action knock-guide-card__action--secondary",n),...i},e);a5.displayName="CardView.SecondaryButton";let a4=({className:e,...t})=>iV.default.createElement("button",{className:(0,aD.default)("knock-guide-card__close",e),...t},iV.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",fill:"none"},iV.default.createElement("g",{fill:"#60646C",fillRule:"evenodd",clipRule:"evenodd"},iV.default.createElement("path",{d:"M14.03 3.97a.75.75 0 0 1 0 1.06l-9 9a.75.75 0 0 1-1.06-1.06l9-9a.75.75 0 0 1 1.06 0Z"}),iV.default.createElement("path",{d:"M3.97 3.97a.75.75 0 0 1 1.06 0l9 9a.75.75 0 1 1-1.06 1.06l-9-9a.75.75 0 0 1 0-1.06Z"}))));a4.displayName="CardView.DismissButton";let a9=({content:e,colorMode:t="light",onDismiss:n,onButtonClick:i,onImageClick:r})=>iV.default.createElement(aG,{"data-knock-color-mode":t},iV.default.createElement(aX,null,iV.default.createElement(aZ,null,iV.default.createElement(aJ,{headline:e.headline}),e.dismissible&&iV.default.createElement(a4,{onClick:n})),iV.default.createElement(aQ,{title:e.title}),iV.default.createElement(a0,{body:e.body})),e.image&&iV.default.createElement("a",{href:aF(e.image.action)?e.image.action:void 0,target:"_blank"},iV.default.createElement(a1,{src:e.image.url,alt:e.image.alt,onClick:t=>{r&&r(t,e.image)}})),(e.primary_button||e.secondary_button)&&iV.default.createElement(a2,null,e.primary_button&&iV.default.createElement(a3,{text:e.primary_button.text,action:e.primary_button.action,onClick:t=>{if(i){let{text:n,action:r}=e.primary_button;i(t,{name:"primary_button",text:n,action:r})}}}),e.secondary_button&&iV.default.createElement(a5,{text:e.secondary_button.text,action:e.secondary_button.action,onClick:t=>{if(i){let{text:n,action:r}=e.secondary_button;i(t,{name:"secondary_button",text:n,action:r})}}})));a9.displayName="CardView.Default",Object.assign({},{Default:a9,Root:aG,Content:aX,Title:aQ,Body:a0,Img:a1,Actions:a2,PrimaryButton:a3,SecondaryButton:a5,DismissButton:a4}),e.s(["useNotificationStore",0,function(e,t){return rd(e)(t??(e=>e))}],764579);var a6=e.i(45113);let a7=Symbol.for("react.forward_ref"),a8=(e,t)=>{let n={...t};for(let i in t){let r=e[i],a=t[i];/^on[A-Z]/.test(i)?r&&a?n[i]=(...e)=>{a(...e),r(...e)}:r&&(n[i]=r):"style"===i?n[i]={...r,...a}:"className"===i&&(n[i]=[r,a].filter(Boolean).join(" "))}return{...e,...n}},se=iV.default.forwardRef(({children:e,...t},n)=>{let i=iV.default.useRef(n),r=iV.default.useRef(null);iV.default.useEffect(()=>{let e=i.current,t=r.current;e!==n&&t&&("function"==typeof e?e(null):e&&(e.current=null),"function"==typeof n?n(t):n&&(n.current=t)),i.current=n});let a=iV.default.useCallback(e=>{r.current=e;let t=i.current;"function"==typeof t?t(e):t&&(t.current=e)},[]);return(({children:e,...t},n)=>e?iV.default.Children.toArray(e).map(e=>{if(iV.default.isValidElement(e)){let i=e.$$typeof,r=e.type.$$typeof,a=e.props,s=a.tgphRef;return i===a7||r===a7?iV.default.cloneElement(e,{...a8(t,a),tgphRef:s||n,ref:s||n}):iV.default.cloneElement(e,{...a8(t,a),tgphRef:s||n})}return e}):null)({children:e,...t},a)}),st=["_hover","_focus","_active","_focusWithin","_disabled"],sn={_hover:"hover",_focus:"focus",_active:"active",_focusWithin:"focus-within",_disabled:"disabled"},si=(e,t)=>{if("string"==typeof t&&t.startsWith("-")){let n=t.slice(1);return`calc(-1 * ${e.value.replace("VARIABLE",n)})`}return e.value.replace("VARIABLE",t)},sr=(e,t,n,i)=>{let r=i??t.cssVar;if(t.direction){let i=(({currentValueOfCssVar:e="0 0 0 0",value:t,direction:n})=>{let[i,r,a,s]=(e=>{let t=[],n="",i=0;for(let r=0;r<e.length;r++){let a=e[r];"("===a?(i++,n+=a):")"===a?(i--,n+=a):" "===a&&0===i?n&&(t.push(n),n=""):n+=a}for(n&&t.push(n);t.length<4;)t.push("0");return[t[0]||"0",t[1]||"0",t[2]||"0",t[3]||"0"]}
14)(e),o={top:i,right:r,bottom:a,left:s};return"top"===n&&(o.top=t),"right"===n&&(o.right=t),"bottom"===n&&(o.bottom=t),"left"===n&&(o.left=t),"all"===n&&(o.top=t,o.right=t,o.bottom=t,o.left=t),"x"===n&&(o.left=t,o.right=t),"y"===n&&(o.top=t,o.bottom=t),"side-top"===n&&(o.top=t,o.right=t),"side-bottom"===n&&(o.bottom=t,o.left=t),"side-left"===n&&(o.top=t,o.left=t),"side-right"===n&&(o.right=t,o.bottom=t),Object.values(o).join(" ")})({currentValueOfCssVar:null==e?void 0:e[r],value:n,direction:t.direction});return{...e,[r]:i}}if(t.axis){let i=(({currentValueOfCssVar:e="visible visible",value:t,axis:n})=>{let[i,r]=e.split(" ");return"x"===n?`${t} ${r}`:"y"===n?`${i} ${t}`:`${t} ${t}`})({currentValueOfCssVar:null==e?void 0:e[r],value:n,axis:t.axis});return{...e,[r]:i}}return{...e,[r]:n}},sa=e=>iV.default.useMemo(()=>(e=>{let{cssVars:t}=e;if(!(null!=e&&e.props)||0===Object.keys(e.props).length)return{styleProp:{},otherProps:{},interactive:!1};let{style:n={},...i}=e.props,r=n,a={},s=!1;return Object.keys(i).forEach(e=>{if(st.includes(e)&&"object"==typeof i[e]&&null!==i[e]){let n=i[e],o={};if(Object.keys(n).forEach(i=>{var a;let s,l,u=n[i];if(!u)return;let c=null==t?void 0:t[i];if(!c){o[i]=u;return}let d=si(c,u),h=(a=c.cssVar,s=sn[e],l=a.replace(/^--/,""),`--${s}--${l}`);r=sr(r,c,d,h)}),Object.keys(o).length>0){let t=a[e]||{};Object.assign(a,{[e]:{...t,...o}})}Object.keys(n).length>Object.keys(o).length&&(s=!0);return}let n=null==t?void 0:t[e];if(!n)return void Object.assign(a,{[e]:i[e]});let o=null==i?void 0:i[e];if(!o)return void Object.assign(r,{[e]:i[e]});let l=si(n,o);r=sr(r,n,l)}),{styleProp:r,otherProps:a,interactive:s}})(e),[e]),ss={display:{cssVar:"--display",value:"VARIABLE"},backgroundColor:{cssVar:"--background-color",value:"var(--tgph-VARIABLE)"},borderStyle:{cssVar:"--border-style",value:"var(--tgph-border-style-VARIABLE)"},padding:{cssVar:"--padding",value:"var(--tgph-spacing-VARIABLE)",direction:"all"},paddingX:{cssVar:"--padding",value:"var(--tgph-spacing-VARIABLE)",direction:"x"},paddingY:{cssVar:"--padding",value:"var(--tgph-spacing-VARIABLE)",direction:"y"},paddingTop:{cssVar:"--padding",value:"var(--tgph-spacing-VARIABLE)",direction:"top"},paddingBottom:{cssVar:"--padding",value:"var(--tgph-spacing-VARIABLE)",direction:"bottom"},paddingLeft:{cssVar:"--padding",value:"var(--tgph-spacing-VARIABLE)",direction:"left"},paddingRight:{cssVar:"--padding",value:"var(--tgph-spacing-VARIABLE)",direction:"right"},margin:{cssVar:"--margin",value:"var(--tgph-spacing-VARIABLE)",direction:"all"},marginX:{cssVar:"--margin",value:"var(--tgph-spacing-VARIABLE)",direction:"x"},marginY:{cssVar:"--margin",value:"var(--tgph-spacing-VARIABLE)",direction:"y"},marginTop:{cssVar:"--margin",value:"var(--tgph-spacing-VARIABLE)",direction:"top"},marginBottom:{cssVar:"--margin",value:"var(--tgph-spacing-VARIABLE)",direction:"bottom"},marginLeft:{cssVar:"--margin",value:"var(--tgph-spacing-VARIABLE)",direction:"left"},marginRight:{cssVar:"--margin",value:"var(--tgph-spacing-VARIABLE)",direction:"right"},borderColor:{cssVar:"--border-color",value:"var(--tgph-VARIABLE)"},borderTopColor:{cssVar:"--border-color",value:"var(--tgph-VARIABLE)",direction:"top"},borderBottomColor:{cssVar:"--border-color",value:"var(--tgph-VARIABLE)",direction:"bottom"},borderLeftColor:{cssVar:"--border-color",value:"var(--tgph-VARIABLE)",direction:"left"},borderRightColor:{cssVar:"--border-color",value:"var(--tgph-VARIABLE)",direction:"right"},borderWidth:{cssVar:"--border-width",value:"var(--tgph-spacing-VARIABLE)"},borderTopWidth:{cssVar:"--border-width",value:"var(--tgph-spacing-VARIABLE)",direction:"top"},borderBottomWidth:{cssVar:"--border-width",value:"var(--tgph-spacing-VARIABLE)",direction:"bottom"},borderLeftWidth:{cssVar:"--border-width",value:"var(--tgph-spacing-VARIABLE)",direction:"left"},borderRightWidth:{cssVar:"--border-width",value:"var(--tgph-spacing-VARIABLE)",direction:"right"},borderRadius:{cssVar:"--border-radius",value:"var(--tgph-rounded-VARIABLE)"},borderTopLeftRadius:{cssVar:"--border-radius",value:"var(--tgph-rounded-VARIABLE)",direction:"top"},borderTopRightRadius:{cssVar:"--border-radius",value:"var(--tgph-rounded-VARIABLE)",direction:"right"},borderBottomLeftRadius:{cssVar:"--border-radius",value:"var(--tgph-rounded-VARIABLE)",direction:"left"},borderBottomRightRadius:{cssVar:"--border-radius",value:"var(--tgph-rounded-VARIABLE)",direction:"bottom"},borderTopRadius:{cssVar:"--border-radius",value:"var(--tgph-rounded-VARIABLE)",direction:"side-top"},borderBottomRadius:{cssVar:"--border-radius",value:"var(--tgph-rounded-VARIABLE)",direction:"side-bottom"},borderLeftRadius:{cssVar:"--border-radius",value:"var(--tgph-rounded-VARIABLE)",direction:"side-left"},borderRightRadius:{cssVar:"--border-radius",value:"var(--tgph-rounded-VARIABLE)",direction:"side-right"}
14,boxShadow:{cssVar:"--box-shadow",value:"var(--tgph-shadow-VARIABLE)"},width:{cssVar:"--width",value:"var(--tgph-spacing-VARIABLE)"},height:{cssVar:"--height",value:"var(--tgph-spacing-VARIABLE)"},minWidth:{cssVar:"--min-width",value:"var(--tgph-spacing-VARIABLE)"},minHeight:{cssVar:"--min-height",value:"var(--tgph-spacing-VARIABLE)"},maxWidth:{cssVar:"--max-width",value:"var(--tgph-spacing-VARIABLE)"},maxHeight:{cssVar:"--max-height",value:"var(--tgph-spacing-VARIABLE)"},zIndex:{cssVar:"--z-index",value:"var(--tgph-zIndex-VARIABLE)"},position:{cssVar:"--position",value:"VARIABLE"},top:{cssVar:"--top",value:"var(--tgph-spacing-VARIABLE)"},left:{cssVar:"--left",value:"var(--tgph-spacing-VARIABLE)"},right:{cssVar:"--right",value:"var(--tgph-spacing-VARIABLE)"},bottom:{cssVar:"--bottom",value:"var(--tgph-spacing-VARIABLE)"},overflow:{cssVar:"--overflow",value:"VARIABLE",axis:"both"},overflowX:{cssVar:"--overflow",value:"VARIABLE",axis:"x"},overflowY:{cssVar:"--overflow",value:"VARIABLE",axis:"y"},alignSelf:{cssVar:"--align-self",value:"VARIABLE"}},so={border:ss.borderWidth,borderX:ss.borderLeftWidth,borderY:ss.borderTopWidth,bg:ss.backgroundColor,p:ss.padding,m:ss.margin,px:ss.paddingX,py:ss.paddingY,pt:ss.paddingTop,pb:ss.paddingBottom,pl:ss.paddingLeft,pr:ss.paddingRight,mx:ss.marginX,my:ss.marginY,mt:ss.marginTop,mb:ss.marginBottom,ml:ss.marginLeft,mr:ss.marginRight,shadow:ss.boxShadow,w:ss.width,h:ss.height,minW:ss.minWidth,minH:ss.minHeight,maxW:ss.maxWidth,maxH:ss.maxHeight,rounded:ss.borderRadius,roundedTopLeft:ss.borderTopLeftRadius,roundedTopRight:ss.borderTopRightRadius,roundedBottomLeft:ss.borderBottomLeftRadius,roundedBottomRight:ss.borderBottomRightRadius,roundedTop:ss.borderTopRadius,roundedBottom:ss.borderBottomRadius,roundedLeft:ss.borderLeftRadius,roundedRight:ss.borderRightRadius,borderTop:ss.borderTopWidth,borderBottom:ss.borderBottomWidth,borderLeft:ss.borderLeftWidth,borderRight:ss.borderRightWidth},sl={...ss,...so},su=({as:e,className:t,tgphRef:n,children:i,...r})=>{let{styleProp:a,otherProps:s,interactive:o}=sa({props:r,cssVars:sl});return(0,a6.jsx)(e||"div",{className:(0,aD.default)("tgph-box",o&&"tgph-box--interactive",t),style:a,...s,ref:n,children:i})},sc={flexDirection:{cssVar:"--direction",value:"VARIABLE"},flexWrap:{cssVar:"--wrap",value:"VARIABLE"},justifyContent:{cssVar:"--justify",value:"VARIABLE"},alignItems:{cssVar:"--align",value:"VARIABLE"},gap:{cssVar:"--gap",value:"var(--tgph-spacing-VARIABLE)"},direction:{cssVar:"--direction",value:"VARIABLE"},align:{cssVar:"--align",value:"VARIABLE"},justify:{cssVar:"--justify",value:"VARIABLE"},wrap:{cssVar:"--wrap",value:"VARIABLE"}},sd=({className:e,...t})=>{let{styleProp:n,otherProps:i}=sa({props:t,cssVars:sc});return(0,a6.jsx)(su,{className:(0,aD.default)("tgph-stack",e),style:n,...i})},sh={color:{cssVar:"--color",value:"var(--tgph-VARIABLE)"},fontSize:{cssVar:"--font-size",value:"var(--tgph-text-VARIABLE)"},weight:{cssVar:"--weight",value:"var(--tgph-weight-VARIABLE)"},leading:{cssVar:"--leading",value:"var(--tgph-leading-VARIABLE)"},tracking:{cssVar:"--tracking",value:"var(--tgph-tracking-VARIABLE)"},align:{cssVar:"--text-align",value:"VARIABLE"},family:{cssVar:"--font-family",value:"var(--tgph-family-VARIABLE)"},textOverflow:{cssVar:"--text-overflow",value:"VARIABLE"}},sp={default:"gray-12",gray:"gray-11",red:"red-11",beige:"beige-11",blue:"blue-11",green:"green-11",yellow:"yellow-11",purple:"purple-11",accent:"accent-11",white:"white",black:"black",contrast:"gray-1",disabled:"gray-9"},sf=({as:e,size:t="2",weight:n="regular",align:i="left",color:r,className:a,internal_optionalAs:s,...o})=>{if(!e)throw Error("as prop is required");let{styleProp:l,otherProps:u}=sa({props:{color:sp[r],fontSize:t,tracking:t,leading:t,weight:n,align:i,...o},cssVars:sh});return(0,a6.jsx)(su,{as:e,className:(0,aD.default)("tgph-text",a),display:"inline",style:l,...u})},sm=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)},sg=(...e)=>e.filter((e,t,n)=>!!e&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim();var sv={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"};let sy=(0,iV.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:i,className:r="",children:a,iconNode:s,...o},l)=>
14(0,iV.createElement)("svg",{ref:l,...sv,width:t,height:t,stroke:e,strokeWidth:i?24*Number(n)/Number(t):n,className:sg("lucide",r),...!a&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0})(o)&&{"aria-hidden":"true"},...o},[...s.map(([e,t])=>(0,iV.createElement)(e,t)),...Array.isArray(a)?a:[a]])),sb=(e,t)=>{let n=(0,iV.forwardRef)(({className:n,...i},r)=>(0,iV.createElement)(sy,{ref:r,iconNode:t,className:sg(`lucide-${sm(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,n),...i}));return n.displayName=sm(e),n},sw=sb("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),sx={0:"var(--tgph-spacing-3)",1:"var(--tgph-spacing-3_5)",2:"var(--tgph-spacing-4)",3:"1.125rem",4:"var(--tgph-spacing-5)",5:"var(--tgph-spacing-6)",6:"var(--tgph-spacing-7)",7:"var(--tgph-spacing-8)",8:"var(--tgph-spacing-10)",9:"var(--tgph-spacing-12)"},sC={primary:{default:"var(--tgph-gray-12)",gray:"var(--tgph-gray-11)",accent:"var(--tgph-accent-11)",beige:"var(--tgph-beige-11)",blue:"var(--tgph-blue-11)",green:"var(--tgph-green-11)",yellow:"var(--tgph-yellow-11)",purple:"var(--tgph-purple-11)",red:"var(--tgph-red-11)",white:"var(--tgph-white)",disabled:"var(--tgph-gray-9)",black:"var(--tgph-black)",contrast:"var(--tgph-gray-1)"},secondary:{default:"var(--tgph-gray-11)",gray:"var(--tgph-gray-10)",accent:"var(--tgph-accent-10)",beige:"var(--tgph-beige-10)",blue:"var(--tgph-blue-10)",green:"var(--tgph-green-10)",yellow:"var(--tgph-yellow-10)",purple:"var(--tgph-purple-10)",red:"var(--tgph-red-10)",white:"var(--tgph-white)",disabled:"var(--tgph-gray-8)",black:"var(--tgph-black)",contrast:"var(--tgph-gray-1)"}},sk=({as:e,size:t="2",color:n="default",variant:i="primary",animation:r="none",icon:a,alt:s,className:o,style:l,...u})=>(a||console.error("@telegraph/icon: icon prop is required"),s||u["aria-hidden"]||console.error("@telegraph/icon: alt prop is required"),(0,a6.jsx)(sf,{as:e||"span",className:(0,aD.default)("tgph-icon",o),"data-tgph-icon":!0,"data-tgph-icon-animation":r,style:{"--height":sx[t],"--width":sx[t],"--color":sC[i][n],...l},...u,children:a&&(0,a6.jsx)(a,{role:"img","aria-label":s,width:"100%",height:"100%",display:"block","data-tgph-icon-svg":!0})})),sS=({color:e="gray",icon:t=sw,animation:n="spin",alt:i="Loading...",...r})=>(0,a6.jsx)(sk,{color:e,icon:t,animation:n,alt:i,role:"status","aria-live":"polite",...r}),sT={buttonShadowColor:{cssVar:"--box-shadow",value:"inset 0 0 0 1px var(--tgph-VARIABLE)"},buttonTextColor:{cssVar:"--tgph-button-text-color",value:"var(--tgph-VARIABLE)"}},sA={solid:{default:{backgroundColor:"gray-12",_hover:{backgroundColor:"gray-11",buttonTextColor:"gray-1"},_focus:{backgroundColor:"gray-10"},_active:{backgroundColor:"gray-10"}},accent:{backgroundColor:"accent-9",_hover:{backgroundColor:"accent-10",buttonTextColor:"white"},_focus:{backgroundColor:"accent-11"},_active:{backgroundColor:"accent-11"}},red:{backgroundColor:"red-9",_hover:{backgroundColor:"red-10",buttonTextColor:"white"},_focus:{backgroundColor:"red-11"},_active:{backgroundColor:"red-11"}},gray:{backgroundColor:"gray-9",_hover:{backgroundColor:"gray-10",buttonTextColor:"white"},_focus:{backgroundColor:"gray-11"},_active:{backgroundColor:"gray-11"}},green:{backgroundColor:"green-9",_hover:{backgroundColor:"green-10",buttonTextColor:"white"},_focus:{backgroundColor:"green-11"},_active:{backgroundColor:"green-11"}},blue:{backgroundColor:"blue-9",_hover:{backgroundColor:"blue-10",buttonTextColor:"white"},_focus:{backgroundColor:"blue-11"},_active:{backgroundColor:"blue-11"}},yellow:{backgroundColor:"yellow-9",_hover:{backgroundColor:"yellow-10",buttonTextColor:"black"},_focus:{backgroundColor:"yellow-11"},_active:{backgroundColor:"yellow-11"}},purple:{backgroundColor:"purple-9",_hover:{backgroundColor:"purple-10",buttonTextColor:"white"},_focus:{backgroundColor:"purple-11"},_active:{backgroundColor:"purple-11"}}},soft:{default:{backgroundColor:"gray-3",_hover:{backgroundColor:"gray-4",buttonTextColor:"gray-12"},_focus:{backgroundColor:"gray-5"},_active:{backgroundColor:"gray-5"}},gray:{backgroundColor:"gray-3",_hover:{backgroundColor:"gray-4",buttonTextColor:"gray-12"},_focus:{backgroundColor:"gray-5"},_active:{backgroundColor:"gray-5"}},red:{backgroundColor:"red-3",_hover:{backgroundColor:"red-4",buttonTextColor:"red-11"},_focus:{backgroundColor:"red-5"},_active:{backgroundColor:"red-5"}},accent:{backgroundColor:"accent-3",_hover:{backgroundColor:"accent-4",buttonTextColor:"accent-11"},_focus:{backgroundColor:"accent-5"},_active:{backgroundColor:"accent-5"}},green:{backgroundColor:"green-3",_hover:{backgroundColor:"green-4",buttonTextColor:"green-11"},_focus:{backgroundColor:"green-5"},_active:{backgroundColor:"green-5"}},blue:{backgroundColor:"blue-3",_hover:{backgroundColor:"blue-4",buttonTextColor:"blue-11"},_focus:{backgroundColor:"blue-5"},_active:{backgroundColor:"blue-5"}},yellow:{backgroundColor:"yellow-3",_hover:{backgroundColor:"yellow-4",buttonTextColor:"yellow-11"},_focus:{backgroundColor:"yellow-5"},_active:{backgroundColor:"yellow-5"}},purple:{backgroundColor:"purple-3",_hover:{backgroundColor:"purple-4",buttonTextColor:"purple-11"},_focus:{backgroundColor:"purple-5"},_active:{backgroundColor:"purple-5"}}},outline:{default:{backgroundColor:"surface-3",buttonShadowColor:"gray-6",_hover:{backgroundColor:"gray-2",buttonShadowColor:"gray-7",buttonTextColor:"gray-12"},_focus:{backgroundColor:"surface-3",buttonShadowColor:"gray-8"},_active:{backgroundColor:"gray-3",buttonShadowColor:"gray-8"}},gray:{backgroundColor:"surface-3",buttonShadowColor:"gray-6",_hover:{backgroundColor:"gray-2",buttonShadowColor:"gray-7",buttonTextColor:"gray-12"},_focus:{backgroundColor:"surface-3",buttonShadowColor:"gray-8"},_active:{backgroundColor:"gray-3",buttonShadowColor:"gray-8"}},red:{backgroundColor:"surface-3",buttonShadowColor:"red-6",_hover:{backgroundColor:"red-2",buttonShadowColor:"red-7",buttonTextColor:"red-11"},_focus:{backgroundColor:"surface-3",buttonShadowColor:"red-8"},_active:{backgroundColor:"red-3",buttonShadowColor:"red-8"}},accent:{backgroundColor:"surface-3",buttonShadowColor:"accent-6",_hover:{backgroundColor:"accent-2",buttonShadowColor:"accent-7",buttonTextColor:"accent-11"},_focus:{backgroundColor:"surface-3",buttonShadowColor:"accent-8"},_active:{backgroundColor:"accent-3",buttonShadowColor:"accent-8"}},green:{backgroundColor:"surface-3",buttonShadowColor:"green-6",_hover:{backgroundColor:"green-2",buttonShadowColor:"green-7",buttonTextColor:"green-11"},_focus:{backgroundColor:"surface-3",buttonShadowColor:"green-8"},_active:{backgroundColor:"green-3",buttonShadowColor:"green-8"}},blue:{backgroundColor:"surface-3",buttonShadowColor:"blue-6",_hover:{backgroundColor:"blue-2",buttonShadowColor:"blue-7",buttonTextColor:"blue-11"},_focus:{backgroundColor:"surface-3",buttonShadowColor:"blue-8"},_active:{backgroundColor:"blue-3",buttonShadowColor:"blue-8"}},yellow:{backgroundColor:"surface-3",buttonShadowColor:"yellow-6",_hover:{backgroundColor:"yellow-2",buttonShadowColor:"yellow-7",buttonTextColor:"yellow-11"},_focus:{backgroundColor:"surface-3",buttonShadowColor:"yellow-8"},_active:{backgroundColor:"yellow-3",buttonShadowColor:"yellow-8"}},purple:{backgroundColor:"surface-3",buttonShadowColor:"purple-6",_hover:{backgroundColor:"purple-2",buttonShadowColor:"purple-7",buttonTextColor:"purple-11"},_focus:{backgroundColor:"surface-3",buttonShadowColor:"purple-8"},_active:{backgroundColor:"purple-3",buttonShadowColor:"purple-8"}}},ghost:{default:{backgroundColor:"transparent",_hover:{backgroundColor:"gray-3",buttonTextColor:"gray-12"},_focus:{backgroundColor:"gray-4"},_active:{backgroundColor:"gray-4"}},gray:{backgroundColor:"transparent",_hover:{backgroundColor:"gray-3",buttonTextColor:"gray-12"},_focus:{backgroundColor:"gray-4"},_active:{backgroundColor:"gray-4"}},red:{backgroundColor:"transparent",_hover:{backgroundColor:"red-3",buttonTextColor:"red-11"},_focus:{backgroundColor:"red-4"},_active:{backgroundColor:"red-4"}},accent:{backgroundColor:"transparent",_hover:{backgroundColor:"accent-3",buttonTextColor:"accent-11"},_focus:{backgroundColor:"accent-4"},_active:{backgroundColor:"accent-4"}},green:{backgroundColor:"transparent",_hover:{backgroundColor:"green-3",buttonTextColor:"green-11"},_focus:{backgroundColor:"green-4"},_active:{backgroundColor:"green-4"}},blue:{backgroundColor:"transparent",_hover:{backgroundColor:"blue-3",buttonTextColor:"blue-11"},_focus:{backgroundColor:"blue-4"},_active:{backgroundColor:"blue-4"}},yellow:{backgroundColor:"transparent",_hover:{backgroundColor:"yellow-3",buttonTextColor:"yellow-11"},_focus:{backgroundColor:"yellow-4"},_active:{backgroundColor:"yellow-4"}}
14,purple:{backgroundColor:"transparent",_hover:{backgroundColor:"purple-3",buttonTextColor:"purple-11"},_focus:{backgroundColor:"purple-4"},_active:{backgroundColor:"purple-4"}}}},sE={default:{0:{w:"auto",h:"5",gap:"0_5",px:"1",rounded:"2"},1:{w:"auto",h:"6",gap:"1",px:"1_5",rounded:"2"},2:{w:"auto",h:"8",gap:"1_5",px:"2",rounded:"2"},3:{w:"auto",h:"10",gap:"2",px:"3",rounded:"3"}},"icon-only":{0:{w:"5",h:"5",gap:"0",px:"0",rounded:"2"},1:{w:"6",h:"6",gap:"0",px:"0",rounded:"2"},2:{w:"8",h:"8",gap:"0",px:"0",rounded:"2"},3:{w:"10",h:"10",gap:"0",px:"0",rounded:"3"}}},sM={0:"0",1:"1",2:"2",3:"3"},s_={solid:{default:"contrast",gray:"white",red:"white",accent:"white",green:"white",blue:"white",yellow:"black",purple:"white",disabled:"disabled"},soft:{default:"default",gray:"gray",red:"red",accent:"accent",green:"green",blue:"blue",yellow:"yellow",purple:"purple",disabled:"disabled"},outline:{default:"default",gray:"gray",red:"red",accent:"accent",green:"green",blue:"blue",yellow:"yellow",purple:"purple",disabled:"disabled"},ghost:{default:"default",gray:"gray",red:"red",accent:"accent",green:"green",blue:"blue",yellow:"yellow",purple:"purple",disabled:"disabled"}},sR={0:"0",1:"1",2:"2",3:"3"},sI={solid:{default:"contrast",gray:"white",red:"white",accent:"white",green:"white",blue:"white",yellow:"black",purple:"white",disabled:"disabled"},soft:{default:"default",accent:"accent",gray:"gray",red:"red",green:"green",blue:"blue",yellow:"yellow",purple:"purple",disabled:"disabled"},outline:{default:"default",accent:"accent",gray:"gray",red:"red",green:"green",blue:"blue",yellow:"yellow",purple:"purple",disabled:"disabled"},ghost:{default:"gray",accent:"accent",gray:"gray",red:"red",green:"green",blue:"blue",yellow:"yellow",purple:"purple",disabled:"disabled"}},sj={default:"secondary","icon-only":"primary"},sV=iV.default.createContext({variant:"solid",size:"2",color:"default",state:"default",layout:"default",active:!1}),sO=({as:e,variant:t="solid",size:n="2",color:i="default",state:r="default",active:a=!1,type:s="button",disabled:o,className:l,children:u,style:c,...d})=>{let h,p=(({value:e,determinateValue:t,minDurationMs:n=1e3})=>{let[i,r]=iV.default.useState(e),a=iV.default.useRef(null),s=iV.default.useRef(null),o=()=>{a.current&&(clearTimeout(a.current),a.current=null)},l=iV.default.useCallback(()=>{if(e===t)o(),r(t),s.current=Date.now();else if(null!==s.current){let t=n-(Date.now()-s.current);t>0?(o(),a.current=setTimeout(()=>{r(e),s.current=null},t)):(r(e),s.current=null)}else r(e)},[e,t,n]);return iV.default.useEffect(()=>(l(),o),[e,l]),i})({value:(h={state:r,disabled:o,active:a}).disabled?"disabled":"loading"===h.state?"loading":h.active?"active":h.state,determinateValue:"loading",minDurationMs:1200}),{styleProp:f,otherProps:m}=sa({props:{...sA[t][i],style:c},cssVars:sT}),g=o||!e?"button":e,v=iV.default.useMemo(()=>{var e;let t=iV.default.Children.toArray(u);if((null==t?void 0:t.length)===1&&iV.default.isValidElement(t[0])){let n=t[0];if(null!=(e=null==n?void 0:n.props)&&e.icon)return"icon-only"}return"default"},[u]);return(0,a6.jsx)(sV.Provider,{value:{variant:t,size:n,color:i,state:p,layout:v,active:a},children:(0,a6.jsxs)(sd,{as:g,className:(0,aD.default)("tgph-button",l),display:"inline-flex",align:"center",justify:"center",...sE[v][n],style:f,"data-tgph-button":!0,"data-tgph-button-layout":v,"data-tgph-button-state":p,"data-tgph-button-variant":t,"data-tgph-button-color":i,disabled:"disabled"===p||"loading"===p,..."button"===g&&{type:s},...m,...d,children:["loading"===p&&(0,a6.jsx)(sS,{size:sR[n],color:sI[t][i],variant:sj[v],"data-tgph-button-loading-icon":!0}),u]})})},sP=({size:e,color:t,variant:n,icon:i,alt:r,"aria-hidden":a,internal_iconType:s,...o})=>{let l=iV.default.useContext(sV),u={size:e??sR[l.size],color:t??sI[l.variant]["disabled"===l.state?"disabled":l.color],variant:n??sj[l.layout]};return"loading"===l.state&&"leading"===s?null:(0,a6.jsx)(sk,{icon:i,"data-button-icon":!0,"data-button-icon-color":u.color,...r?{alt:r}:{"aria-hidden":a},...u,...o}
14)},sN=({as:e,color:t,size:n,weight:i="medium",style:r,...a})=>{let s=iV.default.useContext(sV),o=t??s_[s.variant]["disabled"===s.state?"disabled":s.color];return(0,a6.jsx)(sf,{as:e||"span",color:o,size:n??sM[s.size],weight:i,internal_optionalAs:!0,"data-button-text":!0,"data-button-text-color":o,style:{textDecoration:"none",whiteSpace:"nowrap",...r},...a})},sL=({leadingIcon:e,trailingIcon:t,icon:n,children:i,...r})=>{let a=e||n;return(0,a6.jsxs)(sO,{...r,children:[a&&(0,a6.jsx)(sP,{...a,internal_iconType:"leading"}),i&&(0,a6.jsx)(sN,{children:i}),t&&(0,a6.jsx)(sP,{...t,internal_iconType:"trailing"})]})};Object.assign(sL,{Root:sO,Icon:sP,Text:sN});var sD=e.i(440685),sF=e.i(417256),sB=e.i(967928),s$=Symbol.for("react.lazy"),sU=iV[" use ".trim().toString()];function sW(e){var t;return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===s$&&"_payload"in e&&"object"==typeof(t=e._payload)&&null!==t&&"then"in t}function sz(e){var t;let n,i=(t=e,(n=iV.forwardRef((e,t)=>{let{children:n,...i}=e;if(sW(n)&&"function"==typeof sU&&(n=sU(n._payload)),iV.isValidElement(n)){var r;let e,a,s=(r=n,(a=(e=Object.getOwnPropertyDescriptor(r.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?r.ref:(a=(e=Object.getOwnPropertyDescriptor(r,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?r.props.ref:r.props.ref||r.ref),o=function(e,t){let n={...t};for(let i in t){let r=e[i],a=t[i];/^on[A-Z]/.test(i)?r&&a?n[i]=(...e)=>{let t=a(...e);return r(...e),t}:r&&(n[i]=r):"style"===i?n[i]={...r,...a}:"className"===i&&(n[i]=[r,a].filter(Boolean).join(" "))}return{...e,...n}}(i,n.props);return n.type!==iV.Fragment&&(o.ref=t?(0,sB.composeRefs)(t,s):s),iV.cloneElement(n,o)}return iV.Children.count(n)>1?iV.Children.only(null):null})).displayName=`${t}.SlotClone`,n),r=iV.forwardRef((e,t)=>{let{children:n,...r}=e;sW(n)&&"function"==typeof sU&&(n=sU(n._payload));let a=iV.Children.toArray(n),s=a.find(sq);if(s){let e=s.props.children,n=a.map(t=>t!==s?t:iV.Children.count(e)>1?iV.Children.only(null):iV.isValidElement(e)?e.props.children:null);return(0,a6.jsx)(i,{...r,ref:t,children:iV.isValidElement(e)?iV.cloneElement(e,void 0,n):null})}return(0,a6.jsx)(i,{...r,ref:t,children:n})});return r.displayName=`${e}.Slot`,r}var sH=sz("Slot"),sK=Symbol("radix.slottable");function sq(e){return iV.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===sK}let sY=({appearance:e,asChild:t,...n})=>{let{lightAppearanceProps:i,darkAppearanceProps:r}=((e={})=>{let[t,n]=iV.default.useState((null==e?void 0:e.appearanceOverride)||"light"),i="light"===t?"dark":"light",r=e=>{document&&(n(e),document.documentElement.setAttribute("data-tgph-appearance",e))};return iV.default.useEffect(()=>{if(!document)return;n(document.documentElement.getAttribute("data-tgph-appearance"));let e=new MutationObserver(e=>{for(let t of e)"attributes"===t.type&&"data-tgph-appearance"===t.attributeName&&n(document.documentElement.getAttribute("data-tgph-appearance"))});return e.observe(document.documentElement,{attributes:!0}),()=>{e&&e.disconnect()}},[]),{setAppearance:r,toggleAppearance:()=>{r("light"===t?"dark":"light")},appearance:t,invertedAppearance:i,appearanceProps:{"data-tgph-appearance":t},invertedAppearanceProps:{"data-tgph-appearance":i},lightAppearanceProps:{"data-tgph-appearance":"light"},darkAppearanceProps:{"data-tgph-appearance":"dark"}}})();return(0,a6.jsx)(t?sH:"div",{..."light"===e?i:r,...n})};var sG=Object.defineProperty,sX=Object.getOwnPropertyDescriptor,sZ=Object.getOwnPropertyNames,sJ=Object.prototype.hasOwnProperty,sQ=(0,iV.createContext)({}),s0="u">typeof window?iV.useLayoutEffect:iV.useEffect,s1=(0,iV.createContext)(null),s2=(e,t,n)=>n>t?t:n<e?e:n,s3=()=>{},s5=()=>{};G.default;var s4={};function s9(e){let t;return()=>(void 0===t&&(t=e()),t)}var s6=e=>e,s7=(e,t)=>n=>t(e(n)),s8=(...e)=>e.reduce(s7),oe=(e,t,n)=>{let i=t-e;return 0===i?1:(n-e)/i},ot=class{constructor(){this.subscriptions=[]}add(e){var t;return t=this.subscriptions,-1===t.indexOf(e)&&t.push(e),()=>{var t;let n;return t=this.subscriptions,void((n=t.indexOf(e))>-1&&t.splice(n,1))}}
14notify(e,t,n){let i=this.subscriptions.length;if(i)if(1===i)this.subscriptions[0](e,t,n);else for(let r=0;r<i;r++){let i=this.subscriptions[r];i&&i(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}},on=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function oi(e,t,n,i){return e===t&&n===i?s6:r=>0===r||1===r?r:on(function(e,t,n,i,r){let a,s,o=0;do(a=on(s=t+(n-t)/2,i,r)-e)>0?n=s:t=s;while(Math.abs(a)>1e-7&&++o<12)return s}(r,0,1,e,n),t,i)}var or=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,oa=e=>t=>1-e(1-t),os=oi(.33,1.53,.69,.99),oo=oa(os),ol=or(oo),ou=e=>e>=1?1:(e*=2)<1?.5*oo(e):.5*(2-2**(-10*(e-1))),oc=e=>1-Math.sin(Math.acos(e)),od=oa(oc),oh=or(oc),op=oi(.42,0,1,1),of=oi(0,0,.58,1),om=oi(.42,0,.58,1),og=e=>Array.isArray(e)&&"number"==typeof e[0],ov={linear:s6,easeIn:op,easeInOut:om,easeOut:of,circIn:oc,circInOut:oh,circOut:od,backIn:oo,backInOut:ol,backOut:os,anticipate:ou},oy=e=>{if(og(e)){s5(4===e.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");let[t,n,i,r]=e;return oi(t,n,i,r)}return"string"==typeof e?(s5(void 0!==ov[e],`Invalid easing type '${e}'`,"invalid-easing-type"),ov[e]):e},ob=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function ow(e,t){let n=!1,i=!0,r={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,s=ob.reduce((e,n)=>(e[n]=function(e,t){let n=new Set,i=new Set,r=!1,a=!1,s=new WeakSet,o={delta:0,timestamp:0,isProcessing:!1},l=0;function u(t){s.has(t)&&(c.schedule(t),e()),l++,t(o)}let c={schedule:(e,t=!1,a=!1)=>{let o=a&&r?n:i;return t&&s.add(e),o.add(e),e},cancel:e=>{i.delete(e),s.delete(e)},process:e=>{if(o=e,r){a=!0;return}r=!0;let s=n;n=i,i=s,n.forEach(u),t,l=0,n.clear(),r=!1,a&&(a=!1,c.process(e))}};return c}(a,t?n:void 0),e),{}),{setup:o,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:h,render:p,postRender:f}=s,m=()=>{let a=s4.useManualTiming,s=a?r.timestamp:performance.now();n=!1,a||(r.delta=i?1e3/60:Math.max(Math.min(s-r.timestamp,40),1)),r.timestamp=s,r.isProcessing=!0,o.process(r),l.process(r),u.process(r),c.process(r),d.process(r),h.process(r),p.process(r),f.process(r),r.isProcessing=!1,n&&t&&(i=!1,e(m))};return{schedule:ob.reduce((t,a)=>{let o=s[a];return t[a]=(t,a=!1,s=!1)=>(n||(n=!0,i=!0,r.isProcessing||e(m)),o.schedule(t,a,s)),t},{}),cancel:e=>{for(let t=0;t<ob.length;t++)s[ob[t]].cancel(e)},state:r,steps:s}}var ox,oC,ok,oS,oT,oA,oE,oM,o_,oR,{schedule:oI,cancel:oj,state:oV}=ow("u">typeof requestAnimationFrame?requestAnimationFrame:s6,!0);function oO(){oR=void 0}var oP={now:()=>(void 0===oR&&oP.set(oV.isProcessing||s4.useManualTiming?oV.timestamp:performance.now()),oR),set:e=>{oR=e,queueMicrotask(oO)}},oN={mainThread:0,waapi:0},oL=e=>t=>"string"==typeof t&&t.startsWith(e),oD=oL("--"),oF=oL("var(--"),oB=e=>!!oF(e)&&o$.test(e.split("/*")[0].trim()),o$=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function oU(e){return"string"==typeof e&&e.split("/*")[0].includes("var(--")}var oW={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},oz={...oW,transform:e=>s2(0,1,e)},oH={...oW,default:1},oK=e=>Math.round(1e5*e)/1e5,oq=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,oY=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,oG=(e,t)=>n=>!!("string"==typeof n&&oY.test(n)&&n.startsWith(e)||t&&null!=n&&Object.prototype.hasOwnProperty.call(n,t)),oX=(e,t,n)=>i=>{if("string"!=typeof i)return i;let[r,a,s,o]=i.match(oq);return{[e]:parseFloat(r),[t]:parseFloat(a),[n]:parseFloat(s),alpha:void 0===o?1:parseFloat(o)}},oZ={...oW,transform:e=>Math.round(s2(0,255,e))},oJ={test:oG("rgb","red"),parse:oX("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:i=1})=>"rgba("+oZ.transform(e)+", "+oZ.transform(t)+", "+oZ.transform(n)+", "+oK(oz.transform(i))+")"},oQ={test:oG("#"),parse:function(e){let t="",n="",i="",r="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),i=e.substring(5,7),r=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),i=e.substring(3,4),r=e.substring(4,5),t+=t,n+=n,i+=i,r+=r),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(i,16),alph
14a:r?parseInt(r,16)/255:1}},transform:oJ.transform},o0=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),o1=o0("deg"),o2=o0("%"),o3=o0("px"),o5=o0("vh"),o4=o0("vw"),o9={...o2,parse:e=>o2.parse(e)/100,transform:e=>o2.transform(100*e)},o6={test:oG("hsl","hue"),parse:oX("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:i=1})=>"hsla("+Math.round(e)+", "+o2.transform(oK(t))+", "+o2.transform(oK(n))+", "+oK(oz.transform(i))+")"},o7={test:e=>oJ.test(e)||oQ.test(e)||o6.test(e),parse:e=>oJ.test(e)?oJ.parse(e):o6.test(e)?o6.parse(e):oQ.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?oJ.transform(e):o6.transform(e),getAnimatableNone:e=>{let t=o7.parse(e);return t.alpha=0,o7.transform(t)}},o8=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,le="number",lt="color",ln=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function li(e){let t=e.toString(),n=[],i={color:[],number:[],var:[]},r=[],a=0;return{values:n,split:t.replace(ln,e=>(o7.test(e)?(i.color.push(a),r.push(lt),n.push(o7.parse(e))):e.startsWith("var(")?(i.var.push(a),r.push("var"),n.push(e)):(i.number.push(a),r.push(le),n.push(parseFloat(e))),++a,"${}")).split("${}"),indexes:i,types:r}}function lr({split:e,types:t}){let n=e.length;return i=>{let r="";for(let a=0;a<n;a++)if(r+=e[a],void 0!==i[a]){let e=t[a];e===le?r+=oK(i[a]):e===lt?r+=o7.transform(i[a]):r+=i[a]}return r}}var la={test:function(e){return isNaN(e)&&"string"==typeof e&&(e.match(oq)?.length||0)+(e.match(o8)?.length||0)>0},parse:function(e){return li(e).values},createTransformer:function(e){return lr(li(e))},getAnimatableNone:function(e){let t=li(e);return lr(t)(t.values.map((e,n)=>{var i;return i=t.split[n],"number"==typeof e?i?.trim().endsWith("/")?e:0:"number"==typeof e?0:o7.test(e)?o7.getAnimatableNone(e):e}))}};function ls(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function lo(e,t){return n=>n>0?t:e}var ll=(e,t,n)=>e+(t-e)*n,lu=(e,t,n)=>{let i=e*e,r=n*(t*t-i)+i;return r<0?0:Math.sqrt(r)},lc=[oQ,oJ,o6];function ld(e){let t=lc.find(t=>t.test(e));if(s3(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===o6&&(n=function({hue:e,saturation:t,lightness:n,alpha:i}){e/=360,t/=100,n/=100;let r=0,a=0,s=0;if(t){let i=n<.5?n*(1+t):n+t-n*t,o=2*n-i;r=ls(o,i,e+1/3),a=ls(o,i,e),s=ls(o,i,e-1/3)}else r=a=s=n;return{red:Math.round(255*r),green:Math.round(255*a),blue:Math.round(255*s),alpha:i}}(n)),n}var lh=(e,t)=>{let n=ld(e),i=ld(t);if(!n||!i)return lo(e,t);let r={...n};return e=>(r.red=lu(n.red,i.red,e),r.green=lu(n.green,i.green,e),r.blue=lu(n.blue,i.blue,e),r.alpha=ll(n.alpha,i.alpha,e),oJ.transform(r))},lp=new Set(["none","hidden"]);function lf(e,t){return n=>ll(e,t,n)}function lm(e){return"number"==typeof e?lf:"string"==typeof e?oB(e)?lo:o7.test(e)?lh:ly:Array.isArray(e)?lg:"object"==typeof e?o7.test(e)?lh:lv:lo}function lg(e,t){let n=[...e],i=n.length,r=e.map((e,n)=>lm(e)(e,t[n]));return e=>{for(let t=0;t<i;t++)n[t]=r[t](e);return n}}function lv(e,t){let n={...e,...t},i={};for(let r in n)void 0!==e[r]&&void 0!==t[r]&&(i[r]=lm(e[r])(e[r],t[r]));return e=>{for(let t in i)n[t]=i[t](e);return n}}var ly=(e,t)=>{let n=la.createTransformer(t),i=li(e),r=li(t);return i.indexes.var.length===r.indexes.var.length&&i.indexes.color.length===r.indexes.color.length&&i.indexes.number.length>=r.indexes.number.length?lp.has(e)&&!r.values.length||lp.has(t)&&!i.values.length?lp.has(e)?n=>n<=0?e:t:n=>n>=1?t:e:s8(lg(function(e,t){let n=[],i={color:0,var:0,number:0};for(let r=0;r<t.values.length;r++){let a=t.types[r],s=e.indexes[a][i[a]];n[r]=e.values[s]??0,i[a]++}return n}(i,r),r.values),n):(s3(!0,`Complex values '${e}' and '${t}
14' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),lo(e,t))};function lb(e,t,n){return"number"==typeof e&&"number"==typeof t&&"number"==typeof n?ll(e,t,n):lm(e)(e,t)}var lw=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>oI.update(t,e),stop:()=>oj(t),now:()=>oV.isProcessing?oV.timestamp:oP.now()}},lx=(e,t,n=10)=>{let i="",r=Math.max(Math.round(t/n),2);for(let t=0;t<r;t++)i+=Math.round(1e4*e(t/(r-1)))/1e4+", ";return`linear(${i.substring(0,i.length-2)})`};function lC(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}var lk=.01,lS=2,lT=.005,lA=.5;function lE(e,t){return e*Math.sqrt(1-t*t)}var lM=["duration","bounce"],l_=["stiffness","damping","mass"];function lR(e,t){return t.some(t=>void 0!==e[t])}function lI(e=.3,t=.3){let n,i,r,a,s,o,l="object"==typeof e?e:{visualDuration:e,keyframes:[0,1],bounce:t},{restSpeed:u,restDelta:c}=l,d=l.keyframes[0],h=l.keyframes[l.keyframes.length-1],p={done:!1,value:d},{stiffness:f,damping:m,mass:g,duration:v,velocity:y,isResolvedFromDuration:b}=function(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!lR(e,l_)&&lR(e,lM))if(t.velocity=0,e.visualDuration){let n=2*Math.PI/(1.2*e.visualDuration),i=n*n,r=2*s2(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:1,stiffness:i,damping:r}}else{let n=function({duration:e=800,bounce:t=.3,velocity:n=0,mass:i=1}){let r,a;s3(e<=1e4,"Spring duration must be 10 seconds or less","spring-duration-limit");let s=1-t;s=s2(.05,1,s),e=s2(.01,10,e/1e3),s<1?(r=t=>{let i=t*s,r=i*e;return .001-(i-n)/lE(t,s)*Math.exp(-r)},a=t=>{let i=t*s*e,a=s**2*t**2*e,o=Math.exp(-i),l=lE(t**2,s);return(-r(t)+.001>0?-1:1)*((i*n+n-a)*o)/l}):(r=t=>-.001+Math.exp(-t*e)*((t-n)*e+1),a=t=>e*e*(n-t)*Math.exp(-t*e));let o=function(e,t,n){let i=n;for(let n=1;n<12;n++)i-=e(i)/t(i);return i}(r,a,5/e);if(e*=1e3,isNaN(o))return{stiffness:100,damping:10,duration:e};{let t=o**2*i;return{stiffness:t,damping:2*s*Math.sqrt(i*t),duration:e}}}({...e,velocity:0});(t={...t,...n,mass:1}).isResolvedFromDuration=!0}return t}({...l,velocity:-((l.velocity||0)/1e3)}),w=y||0,x=m/(2*Math.sqrt(f*g)),C=h-d,k=Math.sqrt(f/g)/1e3,S=5>Math.abs(C);if(u||=S?lk:lS,c||=S?lT:lA,x<1)r=lE(k,x),a=(w+x*k*C)/r,n=e=>h-Math.exp(-x*k*e)*(a*Math.sin(r*e)+C*Math.cos(r*e)),s=x*k*a+C*r,o=x*k*C-a*r,i=e=>Math.exp(-x*k*e)*(s*Math.sin(r*e)+o*Math.cos(r*e));else if(1===x){n=e=>h-Math.exp(-k*e)*(C+(w+k*C)*e);let e=w+k*C;i=t=>Math.exp(-k*t)*(k*e*t-w)}else{let e=k*Math.sqrt(x*x-1);n=t=>{let n=Math.exp(-x*k*t),i=Math.min(e*t,300);return h-n*((w+x*k*C)*Math.sinh(i)+e*C*Math.cosh(i))/e};let t=(w+x*k*C)/e,r=x*k*t-C*e,a=x*k*C-t*e;i=t=>{let n=Math.exp(-x*k*t),i=Math.min(e*t,300);return n*(r*Math.sinh(i)+a*Math.cosh(i))}}let T={calculatedDuration:b&&v||null,velocity:e=>1e3*i(e),next:e=>{if(!b&&x<1){let t=Math.exp(-x*k*e),n=Math.sin(r*e),i=Math.cos(r*e),l=h-t*(a*n+C*i);return p.done=Math.abs(t*(s*n+o*i)*1e3)<=u&&Math.abs(h-l)<=c,p.value=p.done?h:l,p}let t=n(e);return b?p.done=e>=v:p.done=Math.abs(1e3*i(e))<=u&&Math.abs(h-t)<=c,p.value=p.done?h:t,p},toString:()=>{let e=Math.min(lC(T),2e4),t=lx(t=>T.next(e*t).value,e,30);return e+"ms "+t},toTransition:()=>{}};return T}
14function lj(e,t,n){var i,r;let a=Math.max(t-5,0);return i=n-e(a),(r=t-a)?1e3/r*i:0}function lV({keyframes:e,velocity:t=0,power:n=.8,timeConstant:i=325,bounceDamping:r=10,bounceStiffness:a=500,modifyTarget:s,min:o,max:l,restDelta:u=.5,restSpeed:c}){let d=e[0],h={done:!1,value:d},p=n*t,f=d+p,m=void 0===s?f:s(f);m!==f&&(p=m-d);let g=e=>-p*Math.exp(-e/i),v=e=>m+g(e),y=e=>{let t=g(e),n=v(e);h.done=Math.abs(t)<=u,h.value=h.done?m:n},b,w,x=e=>{let t,n;t=h.value,(void 0!==o&&t<o||void 0!==l&&t>l)&&(b=e,w=lI({keyframes:[h.value,(n=h.value,void 0===o?l:void 0===l||Math.abs(o-n)<Math.abs(l-n)?o:l)],velocity:lj(v,e,h.value),damping:r,stiffness:a,restDelta:u,restSpeed:c}))};return x(0),{calculatedDuration:null,next:e=>{let t=!1;return w||void 0!==b||(t=!0,y(e),x(e)),void 0!==b&&e>=b?w.next(e-b):(t||y(e),h)}}}function lO({duration:e=300,keyframes:t,times:n,ease:i="easeInOut"}){var r;let a,s=Array.isArray(i)&&"number"!=typeof i[0]?i.map(oy):oy(i),o={done:!1,value:t[0]},l=function(e,t,{clamp:n=!0,ease:i,mixer:r}={}){let a=e.length;if(s5(a===t.length,"Both input and output ranges must be the same length","range-length"),1===a)return()=>t[0];if(2===a&&t[0]===t[1])return()=>t[1];let s=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let o=function(e,t,n){let i=[],r=n||s4.mix||lb,a=e.length-1;for(let n=0;n<a;n++){let a=r(e[n],e[n+1]);t&&(a=s8(Array.isArray(t)?t[n]||s6:t,a)),i.push(a)}return i}(t,i,r),l=o.length,u=n=>{if(s&&n<e[0])return t[0];let i=0;if(l>1)for(;i<e.length-2&&!(n<e[i+1]);i++);let r=oe(e[i],e[i+1],n);return o[i](r)};return n?t=>u(s2(e[0],e[a-1],t)):u}((r=n&&n.length===t.length?n:(function(e,t){let n=e[e.length-1];for(let i=1;i<=t;i++){let r=oe(0,t,i);e.push(ll(n,1,r))}}(a=[0],t.length-1),a),r.map(t=>t*e)),t,{ease:Array.isArray(s)?s:t.map(()=>s||om).splice(0,t.length-1)});return{calculatedDuration:e,next:t=>(o.value=l(t),o.done=t>=e,o)}}lI.applyToOptions=e=>{let t=function(e,t=100,n){let i=n({...e,keyframes:[0,t]}),r=Math.min(lC(i),2e4);return{type:"keyframes",ease:e=>i.next(r*e).value/t,duration:r/1e3}}(e,100,lI);return e.ease=t.ease,e.duration=1e3*t.duration,e.type="keyframes",e};var lP=e=>null!==e;function lN(e,{repeat:t,repeatType:n="loop"},i,r=1){let a=e.filter(lP),s=r<0||t&&"loop"!==n&&t%2==1?0:a.length-1;return s&&void 0!==i?i:a[s]}var lL={decay:lV,inertia:lV,tween:lO,keyframes:lO,spring:lI};function lD(e){"string"==typeof e.type&&(e.type=lL[e.type])}var lF=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}},lB=e=>e/100,l$=class extends lF{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==oP.now()&&this.tick(oP.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},oN.mainThread++,this.options=e,this.initAnimation(),this.play(),!1===e.autoplay&&this.pause()}initAnimation(){let{options:e}=this;lD(e);let{type:t=lO,repeat:n=0,repeatDelay:i=0,repeatType:r,velocity:a=0}=e,{keyframes:s}=e,o=t||lO;o!==lO&&"number"!=typeof s[0]&&(this.mixKeyframes=s8(lB,lb(s[0],s[1])),s=[0,100]);let l=o({...e,keyframes:s});"mirror"===r&&(this.mirroredGenerator=o({...e,keyframes:[...s].reverse(),velocity:-a})),null===l.calculatedDuration&&(l.calculatedDuration=lC(l));let{calculatedDuration:u}=l;this.calculatedDuration=u,this.resolvedDuration=u+i,this.totalDuration=this.resolvedDuration*(n+1)-i,this.generator=l}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;null===this.holdTime?this.currentTime=t:this.currentTime=this.holdTime}tick(e,t=!1){let n,{generator:i,totalDuration:r,mixKeyframes:a,mirroredGenerator:s,resolvedDuration:o,calculatedDuration:l}=this;if(null===this.startTime)return i.next(0);let{delay:u=0,keyframes:c,repeat:d,repeatType:h,repeatDelay:p,type:f,onUpdate:m,finalKeyframe:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let v=this.currentTime-u*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?v<0:v>r;this.currentTime=Math.max(v,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=r);let b=this.currentTime,w=i;if(d){let e=Math.min(this.currentTime,r)/o,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,(t=Math.min(t,d+1))%2&&("reverse"===h?(n=1-n,p&&(n-=p/o)):"mirror"===h&&(w=s)),b=s2(0,1,n)*o}y?(this.delayState.value=c[0],n=this.delayState):n=w.next(b),a&&!y&&(n.value=a(n.value));let{done:x}=n;y||null===l||(x=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let C=null===this.holdTime&&("finished"===this.state||"running"===this.state&&x);return C&&f!==lV&&(n.value=lN(c,this.options,g,this.speed)),m&&m(n.value),C&&this.finish(),n}then(e,t){return this.finished.then(e,t)}get duration(){return this.calculatedDuration/1e3}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+e/1e3}get time(){return this.currentTime/1e3}set time(e){e*=1e3,this.currentTime=e,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){let e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);let t=this.generator.next(e).value;return lj(e=>this.generator.next(e).value,e,t)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(oP.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=this.currentTime/1e3)}play(){if(this.isStopped)return;let{driver:e=lw,startTime:t}=this.options;this.driver||=e(e=>this.tick(e)),this.options.onPlay?.();let n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null===this.holdTime?this.startTime||=t??n:this.startTime=n-this.holdTime,"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(oP.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null,oN.mainThread--}stopDriver(){this.driver&&=void this.driver.stop()}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}},lU=e=>180*e/Math.PI,lW=e=>lH(lU(Math.atan2(e[1],e[0]))),lz={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:lW,rotateZ:lW,skewX:e=>lU(Math.atan(e[1])),skewY:e=>lU(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2}
14,lH=e=>((e%=360)<0&&(e+=360),e),lK=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),lq=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),lY={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:lK,scaleY:lq,scale:e=>(lK(e)+lq(e))/2,rotateX:e=>lH(lU(Math.atan2(e[6],e[5]))),rotateY:e=>lH(lU(Math.atan2(-e[2],e[0]))),rotateZ:lW,rotate:lW,skewX:e=>lU(Math.atan(e[4])),skewY:e=>lU(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function lG(e){return+!!e.includes("scale")}function lX(e,t){if(!e||"none"===e)return lG(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),i,r;if(n)i=lY,r=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=lz,r=t}if(!r)return lG(t);let a=i[t],s=r[1].split(",").map(lZ);return"function"==typeof a?a(s):s[a]}function lZ(e){return parseFloat(e.trim())}var lJ=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],lQ=new Set(lJ),l0=e=>e===oW||e===o3,l1=new Set(["x","y","z"]),l2=lJ.filter(e=>!l1.has(e)),l3={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:i})=>{let r=e.max-e.min;return"border-box"===i?r:r-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:i})=>{let r=e.max-e.min;return"border-box"===i?r:r-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>lX(t,"x"),y:(e,{transform:t})=>lX(t,"y")};l3.translateX=l3.x,l3.translateY=l3.y;var l5=new Set,l4=!1,l9=!1,l6=!1;function l7(){if(l9){let e=Array.from(l5).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t,i=(t=[],l2.forEach(n=>{let i=e.getValue(n);void 0!==i&&(t.push([n,i.get()]),i.set(+!!n.startsWith("scale")))}),t);i.length&&(n.set(e,i),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)})}l9=!1,l4=!1,l5.forEach(e=>e.complete(l6)),l5.clear()}function l8(){l5.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(l9=!0)})}var ue=class{constructor(e,t,n,i,r,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=i,this.element=r,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(l5.add(this),l4||(l4=!0,oI.read(l8),oI.resolveKeyframes(l7))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:i}=this;if(null===e[0]){let r=i?.get(),a=e[e.length-1];if(void 0!==r)e[0]=r;else if(n&&t){let i=n.readValue(t,a);null!=i&&(e[0]=i)}void 0===e[0]&&(e[0]=a),i&&void 0===r&&i.set(e[0])}for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),l5.delete(this)}cancel(){"scheduled"===this.state&&(l5.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}};function ut(e,t,n){t.startsWith("--")?e.style.setProperty(t,n):e.style[t]=n}var un={};function ui(e,t){let n=s9(e);return()=>un[t]??n()}var ur=ui(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),ua=ui(()=>{try{document.createElement("div").animate({opacity:0}
14,{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),us=([e,t,n,i])=>`cubic-bezier(${e}, ${t}, ${n}, ${i})`,uo={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:us([0,.65,.55,1]),circOut:us([.55,0,1,.45]),backIn:us([.31,.01,.66,-.59]),backOut:us([.33,1.53,.69,.99])};function ul(e){return"function"==typeof e&&"applyToOptions"in e}var uu=class extends lF{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:i,pseudoElement:r,allowFlatten:a=!1,finalKeyframe:s,onComplete:o}=e;this.isPseudoElement=!!r,this.allowFlatten=a,this.options=e,s5("string"!=typeof e.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");let l=function({type:e,...t}){return ul(e)&&ua()?e.applyToOptions(t):(t.duration??=300,t.ease??="easeOut",t)}(e);this.animation=function(e,t,n,{delay:i=0,duration:r=300,repeat:a=0,repeatType:s="loop",ease:o="easeOut",times:l}={},u){let c={[t]:n};l&&(c.offset=l);let d=function e(t,n){if(t)return"function"==typeof t?ua()?lx(t,n):"ease-out":og(t)?us(t):Array.isArray(t)?t.map(t=>e(t,n)||uo.easeOut):uo[t]}(o,r);Array.isArray(d)&&(c.easing=d);let h={delay:i,duration:r,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:a+1,direction:"reverse"===s?"alternate":"normal"};u&&(h.pseudoElement=u);let p=e.animate(c,h);return p}(t,n,i,l,r),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){let e=lN(i,this.options,s,this.speed);this.updateMotionValue&&this.updateMotionValue(e),ut(t,n,e),this.animation.cancel()}o?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;"idle"===e||"finished"===e||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){return Number(this.animation.effect?.getComputedTiming?.().duration||0)/1e3}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+e/1e3}get time(){return(Number(this.animation.currentTime)||0)/1e3}set time(e){let t=null!==this.finishedTime;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=1e3*e,t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return null===this.finishedTime?this.animation.playState:"finished"}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:t,rangeEnd:n,observe:i}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&ur()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),s6):i(this)}},uc={anticipate:ou,backInOut:ol,circInOut:oh},ud=class extends uu{constructor(e){(function(e){"string"==typeof e.ease&&e.ease in uc&&(e.ease=uc[e.ease])})(e),lD(e),super(e),void 0!==e.startTime&&!1!==e.autoplay&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:i,element:r,...a}=this.options;if(!t)return;if(void 0!==e)return void t.set(e);let s=new l$({...a,autoplay:!1}),o=Math.max(10,oP.now()-this.startTime),l=s2(0,10,o-10),u=s.sample(o).value,{name:c}=this.options;r&&c&&ut(r,c,u),t.setWithVelocity(s.sample(Math.max(0,o-l)).value,u,l),s.stop()}},uh=(e,t)=>"zIndex"!==t&&!!("number"==typeof e||Array.isArray(e)||"string"==typeof e&&(la.test(e)||"0"===e)&&!e.startsWith("url("));function up(e){e.duration=0,e.type="keyframes"}var uf=new Set(["opacity","clipPath","filter","transform"]),um=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/,ug=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),uv=s9(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),uy=class extends lF{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:a="loop",keyframes:s,name:o,motionValue:l,element:u,...c}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=oP.now();let d={autoplay:e,delay:t,type:n,repeat:i,repeatDelay:r,repeatType:a,name:o,motionValue:l,element:u,...c};this.keyframeResolver=new(u?.KeyframeResolver||ue)(s,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),o,l,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,i){this.keyframeResolver=void 0;let{name:r,type:a,velocity:s,delay:o,isHandoff:l,onUpdate:u}=n;this.resolvedAt=oP.now();let c=!0;(function(e,t,n,i){let r=e[0];if(null===r)return!1;if("display"===t||"visibility"===t)return!0;let a=e[e.length-1],s=uh(r,t),o=uh(a,t);return s3(s===o,`You are trying to animate ${t} from "${r}" to "${a}". "${s?a:r}" is not an animatable value.`,"value-not-animatable"),!!s&&!!o&&(function(e){let t=e[0];if(1===e.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}(e)||("spring"===n||ul(n))&&i)})(e,r,a,s)||(c=!1,(s4.instantAnimations||!o)&&u?.(lN(e,n,t)),e[0]=e[e.length-1],up(n),n.repeat=0);let d={startTime:i?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},h=c&&!l&&function(e){let{motionValue:t,name:n,repeatDelay:i,repeatType:r,damping:a,type:s,keyframes:o}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;
14let{onUpdate:l,transformTemplate:u}=t.owner.getProps();return uv()&&n&&(uf.has(n)||ug.has(n)&&function(e){for(let t=0;t<e.length;t++)if("string"==typeof e[t]&&um.test(e[t]))return!0;return!1}(o))&&("transform"!==n||!u)&&!l&&!i&&"mirror"!==r&&0!==a&&"inertia"!==s}(d),p=d.motionValue?.owner?.current,f;if(h)try{f=new ud({...d,element:p})}catch{f=new l$(d)}else f=new l$(d);f.finished.then(()=>{this.notifyFinished()}).catch(s6),this.pendingTimeline&&=void(this.stopTimeline=f.attachTimeline(this.pendingTimeline)),this._animation=f}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),l6=!0,l8(),l7(),l6=!1),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}};function ub(e,t,n,i=0,r=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),s=e.size,o=(s-1)*i;return"function"==typeof n?n(a,s):1===r?a*i:o-a*i}var uw=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u,ux={type:"spring",stiffness:500,damping:25,restSpeed:10},uC={type:"keyframes",duration:.8},uk={type:"keyframes",ease:[.25,.1,.35,1],duration:.3};function uS(e,t){if(e?.inherit&&t){let{inherit:n,...i}=e;return{...t,...i}}return e}function uT(e,t){let n=e?.[t]??e?.default??e;return n===e?n:uS(n,e)}var uA=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]),uE=(e,t,n,i={},r,a)=>s=>{let o=uT(i,e)||{},l=o.delay||i.delay||0,{elapsed:u=0}=i;u-=1e3*l;let c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...o,delay:-u,onUpdate:e=>{t.set(e),o.onUpdate&&o.onUpdate(e)},onComplete:()=>{s(),o.onComplete&&o.onComplete()},name:e,motionValue:t,element:a?void 0:r};(function(e){for(let t in e)if(!uA.has(t))return!0;return!1})(o)||Object.assign(c,((e,{keyframes:t})=>t.length>2?uC:lQ.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:ux:uk)(e,c)),c.duration&&=1e3*c.duration,c.repeatDelay&&=1e3*c.repeatDelay,void 0!==c.from&&(c.keyframes[0]=c.from);let d=!1;if(!1!==c.type&&(0!==c.duration||c.repeatDelay)||(up(c),0===c.delay&&(d=!0)),(s4.instantAnimations||s4.skipAnimations||r?.shouldSkipAnimations)&&(d=!0,up(c),c.delay=0),c.allowFlatten=!o.type&&!o.ease,d&&!a&&void 0!==t.get()){let e=lN(c.keyframes,o);if(void 0!==e)return void oI.update(()=>{c.onUpdate(e),c.onComplete()})}return o.isSync?new l$(c):new uy(c)};function uM(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function u_(e,t,n,i){if("function"==typeof t){let[r,a]=uM(i);t=t(void 0===n?e.custom:n,r,a)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){let[r,a]=uM(i);t=t(void 0===n?e.custom:n,r,a)}return t}function uR(e,t,n){let i=e.getProps();return u_(i,t,void 0===n?i.custom:n,e)}var uI=new Set(["width","height","top","left","right","bottom",...lJ]),uj=void 0,uV=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=oP.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=oP.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=!isNaN(parseFloat(this.current)))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new ot);let n=this.events[e].add(t);return"change"===e?()=>{n(),oI.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}
14setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||=new Set,this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return uj&&uj.push(this),this.current}getPrevious(){return this.prev}getVelocity(){var e;let t=oP.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;let n=Math.min(this.updatedAt-this.prevUpdatedAt,30);return e=parseFloat(this.current)-parseFloat(this.prevFrameValue),n?1e3/n*e:0}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function uO(e,t){return new uV(e,t)}var uP=e=>Array.isArray(e),uN=e=>!!(e&&e.getVelocity);function uL(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var uD="data-"+uL("framerAppearId");function uF(e,t,{delay:n=0,transitionOverride:i,type:r}={}){let{transition:a,transitionEnd:s,...o}=t,l=e.getDefaultTransition();a=a?uS(a,l):l;let u=a?.reduceMotion;i&&(a=i);let c=[],d=r&&e.animationState&&e.animationState.getState()[r];for(let t in o){let i=e.getValue(t,e.latestValues[t]??null),r=o[t];if(void 0===r||d&&function({protectedKeys:e,needsAnimating:t},n){let i=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,i}(d,t))continue;let s={delay:n,...uT(a||{},t)},l=i.get();if(void 0!==l&&!i.isAnimating()&&!Array.isArray(r)&&r===l&&!s.velocity){oI.update(()=>i.set(r));continue}let h=!1;if(window.MotionHandoffAnimation){let n=e.props[uD];if(n){let e=window.MotionHandoffAnimation(n,t,oI);null!==e&&(s.startTime=e,h=!0)}}!function(e,t){let n=e.getValue("willChange");if(uN(n)&&n.add)return n.add(t);if(!n&&s4.WillChange){let n=new s4.WillChange("auto");e.addValue("willChange",n),n.add(t)}}(e,t);let p=u??e.shouldReduceMotion;i.start(uE(t,i,r,p&&uI.has(t)?{type:!1}:s,e,h));let f=i.animation;f&&c.push(f)}if(s){let t=()=>oI.update(()=>{s&&function(e,t){let{transitionEnd:n={},transition:i={},...r}=uR(e,t)||{};for(let t in r={...r,...n}){var a,s;s=uP(a=r[t])?a[a.length-1]||0:a,e.hasValue(t)?e.getValue(t).set(s):e.addValue(t,uO(s))}}(e,s)});c.length?Promise.all(c).then(t):t()}return c}function uB(e,t,n={}){let i=uR(e,t,"exit"===n.type?e.presenceContext?.custom:void 0),{transition:r=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(r=n.transitionOverride);let a=i?()=>Promise.all(uF(e,i,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(i=0)=>{let{delayChildren:a=0,staggerChildren:s,staggerDirection:o}=r;return function(e,t,n=0,i=0,r=0,a=1,s){let o=[];for(let l of e.variantChildren)l.notify("AnimationStart",t),o.push(uB(l,t,{...s,delay:n+("function"==typeof i?0:i)+ub(e.variantChildren,l,i,r,a)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(o)}(e,t,i,a,s,o,n)}:()=>Promise.resolve(),{when:o}=r;if(!o)return Promise.all([a(),s(n.delay)]);{let[e,t]="beforeChildren"===o?[a,s]:[s,a];return e().then(()=>t())}}var u$=e=>t=>t.test(e),uU=[oW,o3,o2,o1,o4,o5,{test:e=>"auto"===e,parse:e=>e}],uW=e=>uU.find(u$(e)),uz=new Set(["brightness","contrast","saturate","opacity"]);function uH(e){let[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;let[i]=n.match(oq)||[];if(!i)return e;let r=n.replace(i,""),a=+!!uz.has(t);return i!==n&&(a*=100),t+"("+a+r+")"}var uK=/\b([a-z-]*)\(.*?\)/gu,uq={...la,getAnimatableNone:e=>{let t=e.match(uK);return t?t.map(uH).join(" "):e}},uY={...la,getAnimatableNone:e=>{let t=la.parse(e);return la.createTransformer(e)(t.map(e=>"number"==typeof e?0:"object"==typeof e?{...e,alpha:1}:e))}},uG={...oW,transform:Math.round},uX={borderWidth:o3,borderTopWidth:o3,borderRightWidth:o3,borderBottomWidth:o3,borderLeftWidth:o3,borderRadius:o3,borderTopLeftRadius:o3,borderTopRightRadius:o3,borderBottomRightRadius:o3,borderBottomLeftRadius:o3,width:o3,maxWidth:o3,height:o3,maxHeight:o3,top:o3,right:o3,bottom:o3,left:o3,inset:o3,insetBlock:o3,insetBlockStart:o3,insetBlockEnd:o3,insetInline:o3,insetInlineStart:o3,insetInlineEnd:o3,padding:o3,paddingTop:o3,paddingRight:o3,paddingBottom:o3,paddingLeft:o3,paddingBlock:o3,paddingBlockStart:o3,paddingBlockEnd:o3,paddingInline:o3,paddingInlineStart:o3,paddingInlineEnd:o3,margin:o3,marginTop:o3,marginRight:o3,marginBottom:o3,marginLeft:o3,marginBlock:o3,marginBlockStart:o3,marginBlockEnd:o3,marginInline:o3,marginInlineStart:o3,marginInlineEnd:o3,fontSize:o3,backgroundPositionX:o3,backgroundPositionY:o3,rotate:o1,rotateX:o1,rotateY:o1,rotateZ:o1,scale:oH,scaleX:oH,scaleY:oH,scaleZ:oH,skew:o1,skewX:o1,skewY:o1,distance:o3,translateX:o3,translateY:o3,translateZ:o3,x:o3,y:o3,z:o3,perspective:o3,transformPerspective:o3,opacity:oz,originX:o9,originY:o9,originZ:o3,zIndex:uG,fillOpacity:oz,strokeOpacity:oz,numOctaves:uG},uZ={...uX,color:o7,backgroundColor:o7,outlineColor:o7,fill:o7,stroke:o7,borderColor:o7,borderTopColor:o7,borderRightColor:o7,borderBottomColor:o7,borderLeftColor:o7,filter:uq,WebkitFilter:uq,mask:uY,WebkitMask:uY},uJ=e=>uZ[e],uQ=new Set([uq,uY]);function u0(e,t){let n=uJ(e);return uQ.has(n)||(n=la),n.getAnimatableNone?n.getAnimatableNone(t):void 0}
14var u1=new Set(["auto","none","0"]),u2=class extends ue{constructor(e,t,n,i,r){super(e,t,n,i,r,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let i=e[n];if("string"==typeof i&&oB(i=i.trim())){let r=function e(t,n,i=1){s5(i<=4,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");let[r,a]=function(e){let t=uw.exec(e);if(!t)return[,];let[,n,i,r]=t;return[`--${n??i}`,r]}(t);if(!r)return;let s=window.getComputedStyle(n).getPropertyValue(r);if(s){let e=s.trim();return/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e)?parseFloat(e):e}return oB(a)?e(a,n,i+1):a}(i,t.current);void 0!==r&&(e[n]=r),n===e.length-1&&(this.finalKeyframe=i)}}if(this.resolveNoneKeyframes(),!uI.has(n)||2!==e.length)return;let[i,r]=e,a=uW(i),s=uW(r);if(oU(i)!==oU(r)&&l3[n]){this.needsMeasurement=!0;return}if(a!==s)if(l0(a)&&l0(s))for(let t=0;t<e.length;t++){let n=e[t];"string"==typeof n&&(e[t]=parseFloat(n))}else l3[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(null===e[t]||function(e){return"number"==typeof e?0===e:null===e||"none"===e||"0"===e||/^0[^.\s]+$/u.test(e)}(e[t]))&&n.push(t);n.length&&function(e,t,n){let i=0,r;for(;i<e.length&&!r;){let t=e[i];"string"==typeof t&&!u1.has(t)&&li(t).values.length&&(r=e[i]),i++}if(r&&n)for(let i of t)e[i]=u0(n,r)}(e,n,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=l3[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let i=t[t.length-1];void 0!==i&&e.getValue(n,i).jump(i,!1)}measureEndState(){let{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;let i=e.getValue(t);i&&i.jump(this.measuredOrigin,!1);let r=n.length-1,a=n[r];n[r]=l3[t](e.measureViewportBox(),window.getComputedStyle(e.current)),null!==a&&void 0===this.finalKeyframe&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEac
14h(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}},u3=(e,t)=>t&&"number"==typeof e?t.transform(e):e,{schedule:u5}=ow(queueMicrotask,!1);function u4(e,t){let n=function(e){if(null==e)return[];if(e instanceof EventTarget)return[e];if("string"==typeof e){let t=document,n=(void 0)??t.querySelectorAll(e);return n?Array.from(n):[]}return Array.from(e).filter(e=>null!=e)}(e),i=new AbortController;return[n,{passive:!0,...t,signal:i.signal},()=>i.abort()]}var u9=(e,t)=>!!t&&(e===t||u9(e,t.parentElement)),u6=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]),u7=new WeakSet;function u8(e){return t=>{"Enter"===t.key&&e(t)}}function ce(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}function ct(e){return"mouse"===e.pointerType?"number"!=typeof e.button||!!(e.button<=0):!1!==e.isPrimary}var cn=new WeakSet,ci=[...uU,o7,la],cr=()=>({min:0,max:0}),ca=()=>({x:cr(),y:cr()}),cs=new WeakMap;function co(e){return"object"==typeof e&&!!e&&"function"==typeof e.start}function cl(e){return"string"==typeof e||Array.isArray(e)}var cu=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],cc=["initial",...cu];function cd(e){return co(e.animate)||cc.some(t=>cl(e[t]))}function ch(e){return!!(cd(e)||e.variants)}var cp={current:null},cf={current:!1},cm="u">typeof window,cg=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],cv={},cy=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:i,skipAnimations:r,blockInitialAnimation:a,visualState:s},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=ue,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=oP.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,oI.render(this.render,!1,!0))};let{latestValues:l,renderState:u}=s;this.latestValues=l,this.baseTarget={...l},this.initialValues=t.initial?{...l}:{},this.renderState=u,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=r,this.options=o,this.blockInitialAnimation=!!a,this.isControllingVariants=cd(t),this.isVariantNode=ch(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:c,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in d){let t=d[e];void 0!==l[e]&&uN(t)&&t.set(l[e])}}mount(e){if(this.hasBeenMounted)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];this.current=e,cs.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(cf.current||function(){if(cf.current=!0,cm)if(window.matchMedia){let e=window.matchMedia("(prefers-reduced-motion)"),t=()=>cp.current=e.matches;e.addEventListener("change",t),t()}else cp.current=!1}(),this.shouldReduceMotion=cp.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){for(let e in this.projection&&this.projection.unmount(),oj(this.notifyUpdate),oj(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this),this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??=new Set,this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&uf.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:i,times:r,ease:a,duration:s}=t.accelerate,o=new uu({element:this.current,name:e,keyframes:i,times:r,ease:a,duration:1e3*s}),l=n(o);this.valueSubscriptions.set(e,()=>{l(),o.cancel()});return}let n=lQ.has(e);n&&this.onBindTransform&&this.onBindTransform();let i=t.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&oI.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),r;"u">typeof window&&window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{i(),r&&r(),t.owner&&t.stop()})}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in cv){let t=cv[e];
14if(!t)continue;let{isEnabled:n,Feature:i}=t;if(!this.features[e]&&i&&n(this.props)&&(this.features[e]=new i(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):ca()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<cg.length;t++){let n=cg[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let i=e["on"+n];i&&(this.propEventSubscriptions[n]=this.on(n,i))}this.prevMotionValues=function(e,t,n){for(let i in t){let r=t[i],a=n[i];if(uN(r))e.addValue(i,r);else if(uN(a))e.addValue(i,uO(r,{owner:e}));else if(a!==r)if(e.hasValue(i)){let t=e.getValue(i);!0===t.liveStyle?t.jump(r):t.hasAnimated||t.set(r)}else{let t=e.getStaticValue(i);e.addValue(i,uO(void 0===t?r:t,{owner:e}))}}for(let i in n)void 0===t[i]&&e.removeValue(i);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=uO(null===t?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n,i,r,a=void 0===this.latestValues[e]&&this.current?this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];return null!=a&&("string"==typeof a&&(n=a,/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(n)||(i=a,/^0[^.\s]+$/u.test(i)))?a=parseFloat(a):(r=a,!ci.find(u$(r))&&la.test(t)&&(a=u0(e,t))),this.setBaseTarget(e,uN(a)?a.get():a)),uN(a)?a.get():a}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let{initial:t}=this.props,n;if("string"==typeof t||"object"==typeof t){let i=u_(this.props,t,this.presenceContext?.custom);i&&(n=i[e])}if(t&&void 0!==n)return n;let i=this.getBaseTargetFromProps(this.props,e);return void 0===i||uN(i)?void 0!==this.initialValues[e]&&void 0===n?void 0:this.baseTarget[e]:i}on(e,t){return this.events[e]||(this.events[e]=new ot),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){u5.render(this.render)}},cb=class extends cy{constructor(){super(...arguments),this.KeyframeResolver=u2}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;uN(e)&&(this.childSubscription=e.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}},cw=class{constructor(e){this.isMounted=!1,this.node=e}update(){}},cx={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},cC=lJ.length;function ck(e,t,n){let{style:i,vars:r,transformOrigin:a}=e,s=!1,o=!1;for(let e in t){let n=t[e];if(lQ.has(e)){s=!0;continue}if(oD(e)){r[e]=n;continue}{let t=u3(n,uX[e]);e.startsWith("origin")?(o=!0,a[e]=t):i[e]=t}}if(t.transform||(s||n?i.transform=function(e,t,n){let i="",r=!0;for(let a=0;a<cC;a++){let s=lJ[a],o=e[s];if(void 0===o)continue;let l=!0;if("number"==typeof o)l=o===+!!s.startsWith("scale");else{let e=parseFloat(o);l=s.startsWith("scale")?1===e:0===e}if(!l||n){let e=u3(o,uX[s]);if(!l){r=!1;let t=cx[s]||s;i+=`${t}(${e}) `}n&&(t[s]=e)}}return i=i.trim(),n?i=n(t,r?"":i):r&&(i="none"),i}(t,e.transform,n):i.transform&&="none"),o){let{originX:e="50%",originY:t="50%",originZ:n=0}=a;i.transformOrigin=`${e} ${t} ${n}`}}function cS(e,{style:t,vars:n},i,r){let a=e.style,s;for(s in t)a[s]=t[s];for(s in r?.applyProjectionStyles(a,i),n)a.setProperty(s,n[s])}function cT(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var cA={correct:(e,t)=>
14{if(!t.target)return e;if("string"==typeof e)if(!o3.test(e))return e;else e=parseFloat(e);return`${cT(e,t.target.x)}% ${cT(e,t.target.y)}%`}},cE={borderRadius:{...cA,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:cA,borderTopRightRadius:cA,borderBottomLeftRadius:cA,borderBottomRightRadius:cA,boxShadow:{correct:(e,{treeScale:t,projectionDelta:n})=>{let i=la.parse(e);if(i.length>5)return e;let r=la.createTransformer(e),a=+("number"!=typeof i[0]),s=n.x.scale*t.x,o=n.y.scale*t.y;i[0+a]/=s,i[1+a]/=o;let l=ll(s,o,.5);return"number"==typeof i[2+a]&&(i[2+a]/=l),"number"==typeof i[3+a]&&(i[3+a]/=l),r(i)}}};function cM(e,{layout:t,layoutId:n}){return lQ.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!cE[e]||"opacity"===e)}function c_(e,t,n){let i=e.style,r=t?.style,a={};if(!i)return a;for(let t in i)(uN(i[t])||r&&uN(r[t])||cM(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=i[t]);return a}var cR=class extends cb{constructor(){super(...arguments),this.type="html",this.renderInstance=cS}readValueFromInstance(e,t){if(lQ.has(t))return this.projection?.isProjecting?lG(t):((e,t)=>{let{transform:n="none"}=getComputedStyle(e);return lX(n,t)})(e,t);{let n=window.getComputedStyle(e),i=(oD(t)?n.getPropertyValue(t):n[t])||0;return"string"==typeof i?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:t}){return function({top:e,left:t,right:n,bottom:i}){return{x:{min:t,max:n},y:{min:e,max:i}}}(function(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),i=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}(e.getBoundingClientRect(),t))}build(e,t,n){ck(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return c_(e,t,n)}},cI={offset:"stroke-dashoffset",array:"stroke-dasharray"},cj={offset:"strokeDashoffset",array:"strokeDasharray"},cV=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function cO(e,{attrX:t,attrY:n,attrScale:i,pathLength:r,pathSpacing:a=1,pathOffset:s=0,...o},l,u,c){if(ck(e,o,u),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:h}=e;for(let e of(d.transform&&(h.transform=d.transform,delete d.transform),(h.transform||d.transformOrigin)&&(h.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),h.transform&&(h.transformBox=c?.transformBox??"fill-box",delete d.transformBox),cV))void 0!==d[e]&&(h[e]=d[e],delete d[e]);void 0!==t&&(d.x=t),void 0!==n&&(d.y=n),void 0!==i&&(d.scale=i),void 0!==r&&function(e,t,n=1,i=0,r=!0){e.pathLength=1;let a=r?cI:cj;e[a.offset]=`${-i}`,e[a.array]=`${t} ${n}`}(d,r,a,s,!1)}var cP=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),cN=e=>"string"==typeof e&&"svg"===e.toLowerCase();function cL(e,t,n){let i=c_(e,t,n);for(let n in e)(uN(e[n])||uN(t[n]))&&(i[-1===lJ.indexOf(n)?n:"attr"+n.charAt(0).toUpperCase()+n.substring(1)]=e[n]);return i}var cD=class extends cb{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ca}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(lQ.has(t)){let e=uJ(t);return e&&e.default||0}return t=cP.has(t)?t:uL(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return cL(e,t,n)}
14build(e,t,n){cO(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,i){for(let n in cS(e,t,void 0,i),t.attrs)e.setAttribute(cP.has(n)?n:uL(n),t.attrs[n])}mount(e){this.isSVGTag=cN(e.tagName),super.mount(e)}},cF=cc.length;function cB(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let i=0;i<n;i++)if(t[i]!==e[i])return!1;return!0}var c$=[...cu].reverse(),cU=cu.length;function cW(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function cz(){return{animate:cW(!0),whileInView:cW(),whileHover:cW(),whileTap:cW(),whileDrag:cW(),whileFocus:cW(),exit:cW()}}function cH(e,t,n,i={passive:!0}){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n)}var cK=(0,iV.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),cq=(0,iV.createContext)({strict:!1}),cY={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},cG=!1;function cX(){return function(){if(cG)return;let e={};for(let t in cY)e[t]={isEnabled:e=>cY[t].some(t=>!!e[t])};cv=e,cG=!0}(),cv}function cZ(e){let t=cX();for(let n in e)t[n]={...t[n],...e[n]};cv=t}function cJ({children:e,features:t,strict:n=!1}){let[,i]=(0,iV.useState)(!cQ(t)),r=(0,iV.useRef)(void 0);if(!cQ(t)){let{renderer:e,...n}=t;r.current=e,cZ(n)}return(0,iV.useEffect)(()=>{cQ(t)&&t().then(({renderer:e,...t})=>{cZ(t),r.current=e,i(!0)})},[]),(0,a6.jsx)(cq.Provider,{value:{renderer:r.current,strict:n},children:e})}function cQ(e){return"function"==typeof e}var c0=new Set("animate.exit.variants.initial.style.values.variants.transition.transformTemplate.custom.inherit.onBeforeLayoutMeasure.onAnimationStart.onAnimationComplete.onUpdate.onDragStart.onDrag.onDragEnd.onMeasureDragConstraints.onDirectionLock.onDragTransitionEnd._dragX._dragY.onHoverStart.onHoverEnd.onViewportEnter.onViewportLeave.globalTapTarget.propagate.ignoreStrict.viewport".split("."));function c1(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||c0.has(e)}var c2,c3=((e,t)=>{let n={};for(var i in e)sG(n,i,{get:e[i],enumerable:!0});return t||sG(n,Symbol.toStringTag,{value:"Module"}),n})({default:()=>c2}),c5=(o=()=>{throw c2={},Error('Could not resolve "@emotion/is-prop-valid" imported by "framer-motion". Is it installed?')},()=>(o&&(l=o(o=0)),l)),c4=e=>!c1(e);try{ho=(c5(),sJ.call(c3,"module.exports")?c3["module.exports"]:((e,t,n,i)=>{if(t&&"object"==typeof t||"function"==typeof t)for(var r,a=sZ(t),s=0,o=a.length;s<o;s++)r=a[s],sJ.call(e,r)||r===n||sG(e,r,{get:(e=>t[e]).bind(null,r),enumerable:!(i=sX(t,r))||i.enumerable});return e})(sG({},"__esModule",{value:!0}),c3)).default,"function"==typeof ho&&(c4=e=>e.startsWith("on")?!c1(e):ho(e))}catch{}var c9=(0,iV.createContext)({});function c6(e){return Array.isArray(e)?e.join(" "):e}var c7=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function c8(e,t,n){for(let i in t)uN(t[i])||cM(i,n)||(e[i]=t[i])}var de=()=>({...c7(),attrs:{}}),dt=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function dn(e){return!("string"!=typeof e||e.includes("-"))&&!!(dt.indexOf(e)>-1||/[A-Z]/u.test(e))}var di=e=>(t,n)=>{let i,r=(0,iV.useContext)(c9),a=(0,iV.useContext)(s1),s=()=>(function({scrapeMotionValuesFromProps:e,createRenderState:t},n,i,r){return{latestValues:function(e,t,n,i){let r={},a=i(e,{});for(let e in a){var s;r[e]=uN(s=a[e])?s.get():s}let{initial:o,animate:l}=e,u=cd(e),c=ch(e);t&&c&&!u&&!1!==e.inherit&&(void 0===o&&(o=t.initial),void 0===l&&(l=t.animate));let d=!!n&&!1===n.initial,h=(d||=!1===o)?l:o;if(h&&"boolean"!=typeof h&&!co(h)){let t=Array.isArray(h)?h:[h];for(let n=0;n<t.length;n++){let i=u_(e,t[n]);if(i){let{transitionEnd:e,transition:t,...n}=i;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=d?t.length-1:0;t=t[e]}null!==t&&(r[e]=t)}for(let t in e)r[t]=e[t]}}}return r}(n,i,r,e),renderState:t()}})(e,t,r,a);return n?s():(null===(i=(0,iV.useRef)(null)).current&&(i.current=s()),i.current)},dr=di({scrapeMotionValuesFromProps:c_,createRenderState:c7}),da=di({scrapeMotionValuesFromProps:cL,createRenderState:de}
14),ds=Symbol.for("motionComponentSymbol"),dl=(0,iV.createContext)({}),du=class extends cw{constructor(e){super(e),e.animationState||=function(e){let t=t=>Promise.all(t.map(({animation:t,options:n})=>(function(e,t,n={}){let i;if(e.notify("AnimationStart",t),Array.isArray(t))i=Promise.all(t.map(t=>uB(e,t,n)));else if("string"==typeof t)i=uB(e,t,n);else{let r="function"==typeof t?uR(e,t,n.custom):t;i=Promise.all(uF(e,r,n))}return i.then(()=>{e.notify("AnimationComplete",t)})})(e,t,n))),n=cz(),i=!0,r=!1,a=t=>(n,i)=>{let r=uR(e,i,"exit"===t?e.presenceContext?.custom:void 0);if(r){let{transition:e,transitionEnd:t,...i}=r;n={...n,...i,...t}}return n};function s(s){let{props:o}=e,l=function e(t){if(!t)return;if(!t.isControllingVariants){let n=t.parent&&e(t.parent)||{};return void 0!==t.props.initial&&(n.initial=t.props.initial),n}let n={};for(let e=0;e<cF;e++){let i=cc[e],r=t.props[i];(cl(r)||!1===r)&&(n[i]=r)}return n}(e.parent)||{},u=[],c=new Set,d={},h=1/0;for(let t=0;t<cU;t++){var p,f;let m=c$[t],g=n[m],v=void 0===o[m]?l[m]:o[m],y=cl(v),b=m===s?g.isActive:null;!1===b&&(h=t);let w=v===l[m]&&v!==o[m]&&y;if(w&&(i||r)&&e.manuallyAnimateOnMount&&(w=!1),g.protectedKeys={...d},!g.isActive&&null===b||!v&&!g.prevProp||co(v)||"boolean"==typeof v)continue;if("exit"===m&&g.isActive&&!0!==b){g.prevResolvedValues&&(d={...d,...g.prevResolvedValues});continue}let x=(p=g.prevProp,"string"==typeof(f=v)?f!==p:!!Array.isArray(f)&&!cB(f,p)),C=x||m===s&&g.isActive&&!w&&y||t>h&&y,k=!1,S=Array.isArray(v)?v:[v],T=S.reduce(a(m),{});!1===b&&(T={});let{prevResolvedValues:A={}}=g,E={...A,...T},M=t=>{C=!0,c.has(t)&&(k=!0,c.delete(t)),g.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)};for(let e in E){let t=T[e],n=A[e];if(!d.hasOwnProperty(e))(uP(t)&&uP(n)?cB(t,n):t===n)?void 0!==t&&c.has(e)?M(e):g.protectedKeys[e]=!0:null==t?c.add(e):M(e)}g.prevProp=v,g.prevResolvedValues=T,g.isActive&&(d={...d,...T}),(i||r)&&e.blockInitialAnimation&&(C=!1);let _=w&&x;C&&(!_||k)&&u.push(...S.map(t=>{let n={type:m};if("string"==typeof t&&(i||r)&&!_&&e.manuallyAnimateOnMount&&e.parent){let{parent:i}=e,r=uR(i,t);if(i.enteringChildren&&r){let{delayChildren:t}=r.transition||{};n.delay=ub(i.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(c.size){let t={};if("boolean"!=typeof o.initial){let n=uR(e,Array.isArray(o.initial)?o.initial[0]:o.initial);n&&n.transition&&(t.transition=n.transition)}c.forEach(n=>{let i=e.getBaseTarget(n),r=e.getValue(n);r&&(r.liveStyle=!0),t[n]=i??null}),u.push({animation:t})}let m=!!u.length;return i&&(!1===o.initial||o.initial===o.animate)&&!e.manuallyAnimateOnMount&&(m=!1),i=!1,r=!1,m?t(u):Promise.resolve()}return{animateChanges:s,setActive:function(t,i){if(n[t].isActive===i)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,i)),n[t].isActive=i;let r=s(t);for(let e in n)n[e].protectedKeys={};return r},setAnimateFunction:function(n){t=n(e)},getState:()=>n,reset:()=>{n=cz(),r=!0}}}(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();co(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},dc=0;function dd(e){return{point:{x:e.pageX,y:e.pageY}}}function dh(e,t,n){let{props:i}=e;e.animationState&&i.whileHover&&e.animationState.setActive("whileHover","Start"===n);let r=i["onHover"+n];r&&oI.postRender(()=>r(t,dd(t)))}var dp=class extends cw{mount(){let{current:e}=this.node;e&&(this.unmount=function(e,t,n={}){let[i,r,a]=u4(e,n);return i.forEach(e=>{let n=!1,i=!1,a,s=t=>{a&&=void a(t),e.removeEventListener("pointerleave",l)},o=e=>{n=!1,window.removeEventListener("pointerup",o),window.removeEventListener("pointercancel",o),i&&(i=!1,s(e))},l=e=>{if("touch"!==e.pointerType){if(n){i=!0;return}s(e)}};e.addEventListener("pointerenter",n=>{if("touch"===n.pointerType)return;i=!1;let s=t(e,n);"function"==typeof s&&(a=s,e.addEventListener("pointerleave",l,r))},r),e.addEventListener("pointerdown",()=>{n=!0,window.addEventListener("pointerup",o,r),window.addEventListener("pointercancel",o,r)},r)}),a}(e,(e,t)=>(dh(this.node,t,"Start"),e=>dh(this.node,e,"End"))))}unmount(){}},df=class extends cw{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=s8(cH(this.node.current,"focus",()=>this.onFocus()),cH(this.node.current,"blur",()=>this.onBlur()))}unmount(){}};function dm(e,t,n){let{props:i}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&i.whileTap&&e.animationState.setActive("whileTap","Start"===n);let r=i["onTap"+("End"===n?"":n)];r&&oI.postRender(()=>r(t,dd(t)))}var dg=class extends cw{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=function(e,t,n={}){let[i,r,a]=u4(e,n),s=e=>{let i=e.currentTarget;if(!ct(e)||cn.has(e))return;u7.add(i),n.stopPropagation&&cn.add(e);let a=t(i,e),s=(e,t)=>{window.removeEventListener("pointerup",o),window.removeEventListener("pointercancel",l),u7.has(i)&&u7.delete(i),ct(e)&&"function"==typeof a&&a(e,{success:t})},o=e=>{s(e,i===window||i===document||n.useGlobalTarget||u9(i,e.target))},l=e=>{s(e,!1)};window.addEventListener("pointerup",o,r),window.addEventListener("pointercancel",l,r)};
14return i.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener("pointerdown",s,r),"object"==typeof e&&e&&"offsetHeight"in e&&!("ownerSVGElement"in e)&&(e.addEventListener("focus",e=>((e,t)=>{let n=e.currentTarget;if(!n)return;let i=u8(()=>{if(u7.has(n))return;ce(n,"down");let e=u8(()=>{ce(n,"up")});n.addEventListener("keyup",e,t),n.addEventListener("blur",()=>ce(n,"cancel"),t)});n.addEventListener("keydown",i,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),t)})(e,r)),u6.has(e.tagName)||!0===e.isContentEditable||e.hasAttribute("tabindex")||(e.tabIndex=0))}),a}(e,(e,t)=>(dm(this.node,t,"Start"),(e,{success:t})=>dm(this.node,e,t?"End":"Cancel")),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}},dv=new WeakMap,dy=new WeakMap,db=e=>{let t=dv.get(e.target);t&&t(e)},dw=e=>{e.forEach(db)},dx={some:0,all:1},dC=class extends cw{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var e,t;let n;this.stopObserver?.();let{viewport:i={}}=this.node.getProps(),{root:r,margin:a,amount:s="some",once:o}=i,l={root:r?r.current:void 0,rootMargin:a,threshold:"number"==typeof s?s:dx[s]};this.stopObserver=(e=this.node.current,t=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,o&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);let{onViewportEnter:n,onViewportLeave:i}=this.node.getProps(),r=t?n:i;r&&r(e)},n=function({root:e,...t}){let n=e||document;dy.has(n)||dy.set(n,{});let i=dy.get(n),r=JSON.stringify(t);return i[r]||(i[r]=new IntersectionObserver(dw,{root:e,...t})),i[r]}(l),dv.set(e,t),n.observe(e),()=>{dv.delete(e),n.unobserve(e)})}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;let{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}},dk={renderer:(e,t)=>t.isSVG??dn(e)?new cD(t):new cR(t,{allowProjection:e!==iV.Fragment}),animation:{Feature:du},exit:{Feature:class extends cw{constructor(){super(...arguments),this.id=dc++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;if(e&&!1===n){if(this.isExitComplete){let{initial:e,custom:t}=this.node.getProps();if("string"==typeof e){let n=uR(this.node,e,t);if(n){let{transition:e,transitionEnd:t,...i}=n;for(let e in i)this.node.getValue(e)?.jump(i[e])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}let i=this.node.animationState.setActive("exit",!e);t&&!e&&i.then(()=>{this.isExitComplete=!0,t(this.id)})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}},inView:{Feature:dC},tap:{Feature:dg},focus:{Feature:df},hover:{Feature:dp}},dS=function({forwardMotionProps:e=!1,type:t}={}){let n=t?"svg"===t:dn("div"),i=n?da:dr;function r(t,r){var a;let s,o,l,u={...(0,iV.useContext)(cK),...t,layoutId:function({layoutId:e}){let t=(0,iV.useContext)(sQ).id;return t&&void 0!==e?t+"-"+e:e}(t)},{isStatic:c}=u,d=function(e){let{initial:t,animate:n}=function(e,t){if(cd(e)){let{initial:t,animate:n}=e;return{initial:!1===t||cl(t)?t:void 0,animate:cl(n)?n:void 0}}return!1===e.inherit?{}:t}(e,(0,iV.useContext)(c9));return(0,iV.useMemo)(()=>({initial:t,animate:n}),[c6(t),c6(n)])}(t),h=i(t,c);if(!c&&"u">typeof window){(0,iV.useContext)(cq).strict;let e=function(e){let{drag:t,layout:n}=cX();if(!t&&!n)return{};let i={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}(u);l=e.MeasureLayout,d.visualElement=function(e,t,n,i,r,a){let{visualElement:s}=(0,iV.useContext)(c9),o=(0,iV.useContext)(cq),l=(0,iV.useContext)(s1),u=(0,iV.useContext)(cK),c=u.reducedMotion,d=u.skipAnimations,h=(0,iV.useRef)(null),p=(0,iV.useRef)(!1);i||=o.renderer,!h.current&&i&&(h.current=i(e,{visualState:t,parent:s,props:n,presenceContext:l,blockInitialAnimation:!!l&&!1===l.initial,reducedMotionConfig:c,skipAnimations:d,isSVG:a}),p.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));let f=h.current,m=(0,iV.useContext)(dl);f&&!f.projection&&r&&("html"===f.type||"svg"===f.type)&&function(e,t,n,i){var r;let{layoutId:a,layout:s,drag:o,dragConstraints:l,layoutScroll:u,layoutRoot:c,layoutAnchor:d,layoutCrossfade:h}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:function e(t){if(t)return!1===t.options.allowProjection?e(t.parent):t.projection}(e.parent)),e.projection.setOptions({layoutId:a,layout:s,alwaysMeasureLayout:!!o||l&&(r=l)&&"object"==typeof r&&Object.prototype.hasOwnProperty.call(r,"current"),visualElement:e,animationType:"string"==typeof s?s:"both",initialPromotionConfig:i,crossfade:h,layoutScroll:u,layoutRoot:c,layoutAnchor:d})}(h.current,n,r,m);let g=(0,iV.useRef)(!1);(0,iV.useInsertionEffect)(()=>{f&&g.current&&f.update(n,l)});let v=n[uD],y=(0,iV.useRef)(!!v&&"u">typeof window&&!window.MotionHandoffIsComplete?.(v)&&window.MotionHasOptimisedAnimation?.(v));return s0(()=>{p.current=!0,f&&(g.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),f.scheduleRenderMicrotask(),y.current&&f.animationState&&f.animationState.animateChanges())}),(0,iV.useEffect)(()=>{f&&(!y.current&&f.animationState&&f.animationState.animateChanges(),y.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(v)}),!1),f.enteringChildren=void 0)}),f}("div",h,u,void 0,e.ProjectionNode,n)}return(0,a6.jsxs)(c9.Provider,{value:d,children:[l&&d.visualElement?(0,a6.jsx)(l,{visualElement:d.visualElement,...u}):null,function(e,t,n,{latestValues:i},r,a=!1,s){let o=(s??dn(e)?function(e,t,n,i){let r=(0,iV.useMemo)(()=>{let n=de();return cO(n,t,cN(i),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};c8(t,e.style,e),r.style={...t,...r.style}}return r}:function(e,t){let n,i={},r=(c8(n={},e.style||{},e),Object.assign(n,function({transformTemplate:e},t){return(0,iV.useMemo)(()=>{let n=c7();return ck(n,t,e),Object.assign({},n.vars,n.style)},[t])}(e,t)),n);return e.drag&&!1!==e.dragListener&&(i.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=!0===e.drag?"none":`pan-${"x"===e.drag?"y":"x"}
14`),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(i.tabIndex=0),i.style=r,i})(t,i,r,e),l=function(e,t,n){let i={};for(let r in e)"values"===r&&"object"==typeof e.values||uN(e[r])||(c4(r)||!0===n&&c1(r)||!t&&!c1(r)||e.draggable&&r.startsWith("onDrag"))&&(i[r]=e[r]);return i}(t,"string"==typeof e,a),u=e===iV.Fragment?{}:{...l,...o,ref:n},{children:c}=t,d=(0,iV.useMemo)(()=>uN(c)?c.get():c,[c]);return(0,iV.createElement)(e,{...u,children:d})}("div",t,(a=d.visualElement,s=(0,iV.useRef)(r),(0,iV.useInsertionEffect)(()=>{s.current=r}),o=(0,iV.useRef)(null),(0,iV.useCallback)(e=>{e&&h.onMount?.(e);let t=s.current;if("function"==typeof t)if(e){let n=t(e);"function"==typeof n&&(o.current=n)}else o.current?(o.current(),o.current=null):t(e);else t&&(t.current=e);a&&(e?a.mount(e):a.unmount())},[a])),h,c,e,n)]})}r.displayName="motion.div";let a=(0,iV.forwardRef)(r);return a[ds]="div",a}(void 0),dT={light:{shadow:"2"},dark:{}},dA=iV.default.createContext({groupOpen:!1,setGroupOpen:()=>{}}),dE=({delayDuration:e=400,skipDelayDuration:t,disableHoverableContent:n,defaultOpen:i,open:r,onOpenChange:a,"aria-label":s,onEscapeKeyDown:o,onPointerDownOutside:l,forceMount:u,side:c="bottom",sideOffset:d=4,align:h="center",alignOffset:p,avoidCollisions:f,collisionBoundary:m,collisionPadding:g,arrowPadding:v,sticky:y,hideWhenDetached:b,skipAnimation:w,label:x,labelProps:C,enabled:k=!0,appearance:S="dark",triggerRef:T,children:A})=>{let[E,M]=(0,sF.useControllableState)({prop:r,onChange:a,defaultProp:i??!1}),{groupOpen:_}=(({open:e,delay:t=600})=>{let n=iV.default.useContext(dA);return iV.default.useEffect(()=>{let i=null;return n.setGroupOpen&&(!0===e&&n.setGroupOpen(!0),!1===e&&(i=setTimeout(()=>{n.setGroupOpen&&n.setGroupOpen(!1)},t))),()=>{i&&clearTimeout(i)}},[e,n,t]),{groupOpen:n.groupOpen}})({open:!!E,delay:e}),R=iV.default.Children.toArray(A).some(e=>!!iV.default.isValidElement(e)&&e.props.disabled),I=_||R?0:e,j=!_;return(0,a6.jsx)(cJ,{features:dk,children:(0,a6.jsx)(sD.Provider,{delayDuration:I,skipDelayDuration:t,disableHoverableContent:n,children:(0,a6.jsxs)(sD.Root,{open:!1!==k&&E,onOpenChange:M,children:[(0,a6.jsx)(sD.Trigger,{asChild:!0,ref:T,children:(0,a6.jsx)(se,{children:A})}),(0,a6.jsx)(sD.Portal,{children:(0,a6.jsx)(sD.Content,{"aria-label":s,onEscapeKeyDown:o,onPointerDownOutside:l,forceMount:u,side:c,sideOffset:d,align:h,alignOffset:p,avoidCollisions:f,collisionBoundary:m,collisionPadding:g,arrowPadding:v,sticky:y,hideWhenDetached:b,style:{zIndex:"var(--tgph-zIndex-tooltip)"},children:(0,a6.jsx)(sY,{appearance:S,asChild:!0,children:(0,a6.jsx)(sd,{as:dS,className:"tgph",initial:j&&!w?{opacity:0,scale:.5,..."top"===c?{y:-5}:"bottom"===c?{y:5}:"left"===c?{x:-5}:"right"===c?{x:5}:void 0}:{},animate:{opacity:1,scale:1,x:0,y:0},transition:{duration:.1,type:"spring",bounce:0},bg:"gray-1",rounded:"3",py:"2",px:"3",align:"center",justify:"center",style:{transformOrigin:"var(--radix-tooltip-content-transform-origin)"},...C?{labelProps:C}:{},...dT[S],children:"string"==typeof x?(0,a6.jsx)(sf,{as:"span",size:"1",children:x}):x})})})})]})})})};let dM=sb("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),d_=sb("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]),dR=sb("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);var dI=Object.defineProperty,dj=Object.getOwnPropertyDescriptor,dV=Object.getOwnPropertyNames,dO=Object.prototype.hasOwnProperty,dP=["_hover","_focus","_active","_focusWithin","_disabled"],dN={_hover:"hover",_focus:"focus",_active:"active",_focusWithin:"focus-within",_disabled:"disabled"},dL=(e,t)=>{if("string"==typeof t&&t.startsWith("-")){let n=t.slice(1);return`calc(-1 * ${e.value.replace("VARIABLE",n)})`}return e.value.replace("VARIABLE",t)},dD=(e,t,n,i)=>{let r=i??t.cssVar;if(t.direction){let i=(({currentValueOfCssVar:e="0 0 0 0",value:t,direction:n})=>{let[i,r,a,s]=(e=>{let t=[],n="",i=0;for(let r=0;r<e.length;r++){let a=e[r];"("===a?(i++,n+=a):")"===a?(i--,n+=a):" "===a&&0===i?n&&=(t.push(n),""):n+=a}for(n&&t.push(n);t.length<4;)t.push("0");return[t[0]||"0",t[1]||"0",t[2]||"0",t[3]||"0"]}
14)(e),o={top:i,right:r,bottom:a,left:s};return"top"===n&&(o.top=t),"right"===n&&(o.right=t),"bottom"===n&&(o.bottom=t),"left"===n&&(o.left=t),"all"===n&&(o.top=t,o.right=t,o.bottom=t,o.left=t),"x"===n&&(o.left=t,o.right=t),"y"===n&&(o.top=t,o.bottom=t),"side-top"===n&&(o.top=t,o.right=t),"side-bottom"===n&&(o.bottom=t,o.left=t),"side-left"===n&&(o.top=t,o.left=t),"side-right"===n&&(o.right=t,o.bottom=t),Object.values(o).join(" ")})({currentValueOfCssVar:e?.[r],value:n,direction:t.direction});return{...e,[r]:i}}if(t.axis){let i=(({currentValueOfCssVar:e="visible visible",value:t,axis:n})=>{let[i,r]=e.split(" ");return"x"===n?`${t} ${r}`:"y"===n?`${i} ${t}`:`${t} ${t}`})({currentValueOfCssVar:e?.[r],value:n,axis:t.axis});return{...e,[r]:i}}return{...e,[r]:n}},dF=(0,iV.createContext)({}),dB="u">typeof window?iV.useLayoutEffect:iV.useEffect,d$=(0,iV.createContext)(null),dU=(e,t,n)=>n>t?t:n<e?e:n,dW=()=>{},dz=()=>{};G.default;var dH={};function dK(e){let t;return()=>(void 0===t&&(t=e()),t)}var dq=e=>e,dY=(e,t)=>n=>t(e(n)),dG=(...e)=>e.reduce(dY),dX=(e,t,n)=>{let i=t-e;return 0===i?1:(n-e)/i},dZ=class{constructor(){this.subscriptions=[]}add(e){var t;return t=this.subscriptions,-1===t.indexOf(e)&&t.push(e),()=>{var t;let n;return t=this.subscriptions,void((n=t.indexOf(e))>-1&&t.splice(n,1))}}notify(e,t,n){let i=this.subscriptions.length;if(i)if(1===i)this.subscriptions[0](e,t,n);else for(let r=0;r<i;r++){let i=this.subscriptions[r];i&&i(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}},dJ=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function dQ(e,t,n,i){return e===t&&n===i?dq:r=>0===r||1===r?r:dJ(function(e,t,n,i,r){let a,s,o=0;do(a=dJ(s=t+(n-t)/2,i,r)-e)>0?n=s:t=s;while(Math.abs(a)>1e-7&&++o<12)return s}(r,0,1,e,n),t,i)}var d0=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,d1=e=>t=>1-e(1-t),d2=dQ(.33,1.53,.69,.99),d3=d1(d2),d5=d0(d3),d4=e=>e>=1?1:(e*=2)<1?.5*d3(e):.5*(2-2**(-10*(e-1))),d9=e=>1-Math.sin(Math.acos(e)),d6=d1(d9),d7=d0(d9),d8=dQ(.42,0,1,1),he=dQ(0,0,.58,1),ht=dQ(.42,0,.58,1),hn=e=>Array.isArray(e)&&"number"==typeof e[0],hi={linear:dq,easeIn:d8,easeInOut:ht,easeOut:he,circIn:d9,circInOut:d7,circOut:d6,backIn:d3,backInOut:d5,backOut:d2,anticipate:d4},hr=e=>{if(hn(e)){dz(4===e.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");let[t,n,i,r]=e;return dQ(t,n,i,r)}return"string"==typeof e?(dz(void 0!==hi[e],`Invalid easing type '${e}'`,"invalid-easing-type"),hi[e]):e},ha=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function hs(e,t){let n=!1,i=!0,r={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,s=ha.reduce((e,n)=>(e[n]=function(e,t){let n=new Set,i=new Set,r=!1,a=!1,s=new WeakSet,o={delta:0,timestamp:0,isProcessing:!1},l=0;function u(t){s.has(t)&&(c.schedule(t),e()),l++,t(o)}let c={schedule:(e,t=!1,a=!1)=>{let o=a&&r?n:i;return t&&s.add(e),o.add(e),e},cancel:e=>{i.delete(e),s.delete(e)},process:e=>{if(o=e,r){a=!0;return}r=!0;let s=n;n=i,i=s,n.forEach(u),t,l=0,n.clear(),r=!1,a&&(a=!1,c.process(e))}};return c}(a,t?n:void 0),e),{}),{setup:o,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:h,render:p,postRender:f}=s,m=()=>{let a=dH.useManualTiming,s=a?r.timestamp:performance.now();n=!1,a||(r.delta=i?1e3/60:Math.max(Math.min(s-r.timestamp,40),1)),r.timestamp=s,r.isProcessing=!0,o.process(r),l.process(r),u.process(r),c.process(r),d.process(r),h.process(r),p.process(r),f.process(r),r.isProcessing=!1,n&&t&&(i=!1,e(m))};return{schedule:ha.reduce((t,a)=>{let o=s[a];return t[a]=(t,a=!1,s=!1)=>(n||(n=!0,i=!0,r.isProcessing||e(m)),o.schedule(t,a,s)),t},{}),cancel:e=>{for(let t=0;t<ha.length;t++)s[ha[t]].cancel(e)},state:r,steps:s}}var ho,hl,{schedule:hu,cancel:hc,state:hd}=hs("u">typeof requestAnimationFrame?requestAnimationFrame:dq,!0);function hh(){hl=void 0}var hp={now:()=>(void 0===hl&&hp.set(hd.isProcessing||dH.useManualTiming?hd.timestamp:performance.now()),hl),set:e=>{hl=e,queueMicrotask(hh)}},hf={mainThread:0,waapi:0},hm=e=>t=>"string"==typeof t&&t.startsWith(e),hg=hm("--"),hv=hm("var(--"),hy=e=>!!hv(e)&&hb.test(e.split("/*")[0].trim()),hb=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function hw(e){return"string"==typeof e&&e.split("/*")[0].includes("var(--")}var hx={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},hC={...hx,transform:e=>dU(0,1,e)},hk={...hx,default:1},hS=e=>Math.round(1e5*e)/1e5,hT=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,hA=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,hE=(e,t)=>n=>!!("string"==typeof n&&hA.test(n)&&n.startsWith(e)||t&&null!=n&&Object.prototype.hasOwnProperty.call(n,t)),hM=(e,t,n)=>i=>{if("string"!=typeof i)return i;let[r,a,s,o]=i.match(hT);return{[e]:parseFloat(r),[t]:parseFloat(a),[n]:parseFloat(s),alpha:void 0===o?1:parseFloat(o)}},h_={...hx,transform:e=>Math.round(dU(0,255,e))},hR={test:hE("rgb","red"),parse:hM("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:i=1})=>"rgba("+h_.transform(e)+", "+h_.transform(t)+", "+h_.transform(n)+", "+hS(hC.transform(i))+")"},hI={test:hE("#"),parse:function(e){let t="",n="",i="",r="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),i=e.substring(5,7),r=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),i=e.substring(3,4),r=e.substring(4,5),t+=t,n+=n,i+=i,r+=r),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(i,16),alph
14a:r?parseInt(r,16)/255:1}},transform:hR.transform},hj=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),hV=hj("deg"),hO=hj("%"),hP=hj("px"),hN=hj("vh"),hL=hj("vw"),hD={...hO,parse:e=>hO.parse(e)/100,transform:e=>hO.transform(100*e)},hF={test:hE("hsl","hue"),parse:hM("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:i=1})=>"hsla("+Math.round(e)+", "+hO.transform(hS(t))+", "+hO.transform(hS(n))+", "+hS(hC.transform(i))+")"},hB={test:e=>hR.test(e)||hI.test(e)||hF.test(e),parse:e=>hR.test(e)?hR.parse(e):hF.test(e)?hF.parse(e):hI.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?hR.transform(e):hF.transform(e),getAnimatableNone:e=>{let t=hB.parse(e);return t.alpha=0,hB.transform(t)}},h$=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,hU="number",hW="color",hz=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function hH(e){let t=e.toString(),n=[],i={color:[],number:[],var:[]},r=[],a=0;return{values:n,split:t.replace(hz,e=>(hB.test(e)?(i.color.push(a),r.push(hW),n.push(hB.parse(e))):e.startsWith("var(")?(i.var.push(a),r.push("var"),n.push(e)):(i.number.push(a),r.push(hU),n.push(parseFloat(e))),++a,"${}")).split("${}"),indexes:i,types:r}}function hK({split:e,types:t}){let n=e.length;return i=>{let r="";for(let a=0;a<n;a++)if(r+=e[a],void 0!==i[a]){let e=t[a];e===hU?r+=hS(i[a]):e===hW?r+=hB.transform(i[a]):r+=i[a]}return r}}var hq={test:function(e){return isNaN(e)&&"string"==typeof e&&(e.match(hT)?.length||0)+(e.match(h$)?.length||0)>0},parse:function(e){return hH(e).values},createTransformer:function(e){return hK(hH(e))},getAnimatableNone:function(e){let t=hH(e);return hK(t)(t.values.map((e,n)=>{var i;return i=t.split[n],"number"==typeof e?i?.trim().endsWith("/")?e:0:"number"==typeof e?0:hB.test(e)?hB.getAnimatableNone(e):e}))}};function hY(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function hG(e,t){return n=>n>0?t:e}var hX=(e,t,n)=>e+(t-e)*n,hZ=(e,t,n)=>{let i=e*e,r=n*(t*t-i)+i;return r<0?0:Math.sqrt(r)},hJ=[hI,hR,hF];function hQ(e){let t=hJ.find(t=>t.test(e));if(dW(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===hF&&(n=function({hue:e,saturation:t,lightness:n,alpha:i}){e/=360,t/=100,n/=100;let r=0,a=0,s=0;if(t){let i=n<.5?n*(1+t):n+t-n*t,o=2*n-i;r=hY(o,i,e+1/3),a=hY(o,i,e),s=hY(o,i,e-1/3)}else r=a=s=n;return{red:Math.round(255*r),green:Math.round(255*a),blue:Math.round(255*s),alpha:i}}(n)),n}var h0=(e,t)=>{let n=hQ(e),i=hQ(t);if(!n||!i)return hG(e,t);let r={...n};return e=>(r.red=hZ(n.red,i.red,e),r.green=hZ(n.green,i.green,e),r.blue=hZ(n.blue,i.blue,e),r.alpha=hX(n.alpha,i.alpha,e),hR.transform(r))},h1=new Set(["none","hidden"]);function h2(e,t){return n=>hX(e,t,n)}function h3(e){return"number"==typeof e?h2:"string"==typeof e?hy(e)?hG:hB.test(e)?h0:h9:Array.isArray(e)?h5:"object"==typeof e?hB.test(e)?h0:h4:hG}function h5(e,t){let n=[...e],i=n.length,r=e.map((e,n)=>h3(e)(e,t[n]));return e=>{for(let t=0;t<i;t++)n[t]=r[t](e);return n}}function h4(e,t){let n={...e,...t},i={};for(let r in n)void 0!==e[r]&&void 0!==t[r]&&(i[r]=h3(e[r])(e[r],t[r]));return e=>{for(let t in i)n[t]=i[t](e);return n}}var h9=(e,t)=>{let n=hq.createTransformer(t),i=hH(e),r=hH(t);return i.indexes.var.length===r.indexes.var.length&&i.indexes.color.length===r.indexes.color.length&&i.indexes.number.length>=r.indexes.number.length?h1.has(e)&&!r.values.length||h1.has(t)&&!i.values.length?h1.has(e)?n=>n<=0?e:t:n=>n>=1?t:e:dG(h5(function(e,t){let n=[],i={color:0,var:0,number:0};for(let r=0;r<t.values.length;r++){let a=t.types[r],s=e.indexes[a][i[a]];n[r]=e.values[s]??0,i[a]++}return n}(i,r),r.values),n):(dW(!0,`Complex values '${e}' and '${t}
14' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),hG(e,t))};function h6(e,t,n){return"number"==typeof e&&"number"==typeof t&&"number"==typeof n?hX(e,t,n):h3(e)(e,t)}var h7=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>hu.update(t,e),stop:()=>hc(t),now:()=>hd.isProcessing?hd.timestamp:hp.now()}},h8=(e,t,n=10)=>{let i="",r=Math.max(Math.round(t/n),2);for(let t=0;t<r;t++)i+=Math.round(1e4*e(t/(r-1)))/1e4+", ";return`linear(${i.substring(0,i.length-2)})`};function pe(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}var pt=.01,pn=2,pi=.005,pr=.5;function pa(e,t){return e*Math.sqrt(1-t*t)}var ps=["duration","bounce"],po=["stiffness","damping","mass"];function pl(e,t){return t.some(t=>void 0!==e[t])}function pu(e=.3,t=.3){let n,i,r,a,s,o,l="object"==typeof e?e:{visualDuration:e,keyframes:[0,1],bounce:t},{restSpeed:u,restDelta:c}=l,d=l.keyframes[0],h=l.keyframes[l.keyframes.length-1],p={done:!1,value:d},{stiffness:f,damping:m,mass:g,duration:v,velocity:y,isResolvedFromDuration:b}=function(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!pl(e,po)&&pl(e,ps))if(t.velocity=0,e.visualDuration){let n=2*Math.PI/(1.2*e.visualDuration),i=n*n,r=2*dU(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:1,stiffness:i,damping:r}}else{let n=function({duration:e=800,bounce:t=.3,velocity:n=0,mass:i=1}){let r,a;dW(e<=1e4,"Spring duration must be 10 seconds or less","spring-duration-limit");let s=1-t;s=dU(.05,1,s),e=dU(.01,10,e/1e3),s<1?(r=t=>{let i=t*s,r=i*e;return .001-(i-n)/pa(t,s)*Math.exp(-r)},a=t=>{let i=t*s*e,a=s**2*t**2*e,o=Math.exp(-i),l=pa(t**2,s);return(-r(t)+.001>0?-1:1)*((i*n+n-a)*o)/l}):(r=t=>-.001+Math.exp(-t*e)*((t-n)*e+1),a=t=>e*e*(n-t)*Math.exp(-t*e));let o=function(e,t,n){let i=n;for(let n=1;n<12;n++)i-=e(i)/t(i);return i}(r,a,5/e);if(e*=1e3,isNaN(o))return{stiffness:100,damping:10,duration:e};{let t=o**2*i;return{stiffness:t,damping:2*s*Math.sqrt(i*t),duration:e}}}({...e,velocity:0});(t={...t,...n,mass:1}).isResolvedFromDuration=!0}return t}({...l,velocity:-((l.velocity||0)/1e3)}),w=y||0,x=m/(2*Math.sqrt(f*g)),C=h-d,k=Math.sqrt(f/g)/1e3,S=5>Math.abs(C);if(u||=S?pt:pn,c||=S?pi:pr,x<1)r=pa(k,x),a=(w+x*k*C)/r,n=e=>h-Math.exp(-x*k*e)*(a*Math.sin(r*e)+C*Math.cos(r*e)),s=x*k*a+C*r,o=x*k*C-a*r,i=e=>Math.exp(-x*k*e)*(s*Math.sin(r*e)+o*Math.cos(r*e));else if(1===x){n=e=>h-Math.exp(-k*e)*(C+(w+k*C)*e);let e=w+k*C;i=t=>Math.exp(-k*t)*(k*e*t-w)}else{let e=k*Math.sqrt(x*x-1);n=t=>{let n=Math.exp(-x*k*t),i=Math.min(e*t,300);return h-n*((w+x*k*C)*Math.sinh(i)+e*C*Math.cosh(i))/e};let t=(w+x*k*C)/e,r=x*k*t-C*e,a=x*k*C-t*e;i=t=>{let n=Math.exp(-x*k*t),i=Math.min(e*t,300);return n*(r*Math.sinh(i)+a*Math.cosh(i))}}let T={calculatedDuration:b&&v||null,velocity:e=>1e3*i(e),next:e=>{if(!b&&x<1){let t=Math.exp(-x*k*e),n=Math.sin(r*e),i=Math.cos(r*e),l=h-t*(a*n+C*i);return p.done=Math.abs(t*(s*n+o*i)*1e3)<=u&&Math.abs(h-l)<=c,p.value=p.done?h:l,p}let t=n(e);return b?p.done=e>=v:p.done=Math.abs(1e3*i(e))<=u&&Math.abs(h-t)<=c,p.value=p.done?h:t,p},toString:()=>{let e=Math.min(pe(T),2e4),t=h8(t=>T.next(e*t).value,e,30);return e+"ms "+t},toTransition:()=>{}};return T}function pc(e,t,n){var i,r;let a=Math.max(t-5,0);return i=n-e(a),(r=t-a)?1e3/r*i:0}function pd({keyframes:e,velocity:t=0,power:n=.8,timeConstant:i=325,bounceDamping:r=10,bounceStiffness:a=500,modifyTarget:s,min:o,max:l,restDelta:u=.5,restSpeed:c}){let d=e[0],h={done:!1,value:d},p=n*t,f=d+p,m=void 0===s?f:s(f);m!==f&&(p=m-d);let g=e=>-p*Math.exp(-e/i),v=e=>m+g(e),y=e=>{let t=g(e),n=v(e);h.done=Math.abs(t)<=u,h.value=h.done?m:n},b,w,x=e=>{let t,n;t=h.value,(void 0!==o&&t<o||void 0!==l&&t>l)&&(b=e,w=pu({keyframes:[h.value,(n=h.value,void 0===o?l:void 0===l||Math.abs(o-n)<Math.abs(l-n)?o:l)],velocity:pc(v,e,h.value),damping:r,stiffness:a,restDelta:u,restSpeed:c}))};return x(0),{calculatedDuration:null,next:e=>{let t=!1;return w||void 0!==b||(t=!0,y(e),x(e)),void 0!==b&&e>=b?w.next(e-b):(t||y(e),h)}}}function ph({duration:e=300,keyframes:t,times:n,ease:i="easeInOut"}){var r;let a,s=Array.isArray(i)&&"number"!=typeof i[0]?i.map(hr):hr(i),o={done:!1,value:t[0]},l=function(e,t,{clamp:n=!0,ease:i,mixer:r}={}){let a=e.length;if(dz(a===t.length,"Both input and output ranges must be the same length","range-length"),1===a)return()=>t[0];if(2===a&&t[0]===t[1])return()=>t[1];let s=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let o=function(e,t,n){let i=[],r=n||dH.mix||h6,a=e.length-1;for(let n=0;n<a;n++){let a=r(e[n],e[n+1]);t&&(a=dG(Array.isArray(t)?t[n]||dq:t,a)),i.push(a)}return i}(t,i,r),l=o.length,u=n=>{if(s&&n<e[0])return t[0];let i=0;if(l>1)for(;i<e.length-2&&!(n<e[i+1]);i++);let r=dX(e[i],e[i+1],n);return o[i](r)};return n?t=>u(dU(e[0],e[a-1],t)):u}((r=n&&n.length===t.length?n:(function(e,t){let n=e[e.length-1];for(let i=1;i<=t;i++){let r=dX(0,t,i);e.push(hX(n,1,r))}}(a=[0],t.length-1),a),r.map(t=>t*e)),t,{ease:Array.isArray(s)?s:t.map(()=>s||ht).splice(0,t.length-1)});return{calculatedDuration:e,next:t=>(o.value=l(t),o.done=t>=e,o)}}pu.applyToOptions=e=>{let t=function(e,t=100,n){let i=n({...e,keyframes:[0,t]}),r=Math.min(pe(i),2e4);return{type:"keyframes",ease:e=>i.next(r*e).value/t,duration:r/1e3}}(e,100,pu);return e.ease=t.ease,e.duration=1e3*t.duration,e.type="keyframes",e};var pp=e=>null!==e;function pf(e,{repeat:t,repeatType:n="loop"},i,r=1){let a=e.filter(pp),s=r<0||t&&"loop"!==n&&t%2==1?0:a.length-1;return s&&void 0!==i?i:a[s]}var pm={decay:pd,inertia:pd,tween:ph,keyframes:ph,spring:pu};function pg(e){"string"==typeof e.type&&(e.type=pm[e.type])}var pv=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}},py=e=>e/100,pb=class extends pv{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==hp.now()&&this.tick(hp.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},hf.mainThread++,this.options=e,this.initAnimation(),this.play(),!1===e.autoplay&&this.pause()}initAnimation(){let{options:e}=this;pg(e);let{type:t=ph,repeat:n=0,repeatDelay:i=0,repeatType:r,velocity:a=0}=e,{keyframes:s}=e,o=t||ph;o!==ph&&"number"!=typeof s[0]&&(this.mixKeyframes=dG(py,h6(s[0],s[1])),s=[0,100]);let l=o({...e,keyframes:s}
14);"mirror"===r&&(this.mirroredGenerator=o({...e,keyframes:[...s].reverse(),velocity:-a})),null===l.calculatedDuration&&(l.calculatedDuration=pe(l));let{calculatedDuration:u}=l;this.calculatedDuration=u,this.resolvedDuration=u+i,this.totalDuration=this.resolvedDuration*(n+1)-i,this.generator=l}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;null===this.holdTime?this.currentTime=t:this.currentTime=this.holdTime}tick(e,t=!1){let n,{generator:i,totalDuration:r,mixKeyframes:a,mirroredGenerator:s,resolvedDuration:o,calculatedDuration:l}=this;if(null===this.startTime)return i.next(0);let{delay:u=0,keyframes:c,repeat:d,repeatType:h,repeatDelay:p,type:f,onUpdate:m,finalKeyframe:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let v=this.currentTime-u*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?v<0:v>r;this.currentTime=Math.max(v,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=r);let b=this.currentTime,w=i;if(d){let e=Math.min(this.currentTime,r)/o,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,(t=Math.min(t,d+1))%2&&("reverse"===h?(n=1-n,p&&(n-=p/o)):"mirror"===h&&(w=s)),b=dU(0,1,n)*o}y?(this.delayState.value=c[0],n=this.delayState):n=w.next(b),a&&!y&&(n.value=a(n.value));let{done:x}=n;y||null===l||(x=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let C=null===this.holdTime&&("finished"===this.state||"running"===this.state&&x);return C&&f!==pd&&(n.value=pf(c,this.options,g,this.speed)),m&&m(n.value),C&&this.finish(),n}then(e,t){return this.finished.then(e,t)}get duration(){return this.calculatedDuration/1e3}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+e/1e3}get time(){return this.currentTime/1e3}set time(e){e*=1e3,this.currentTime=e,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){let e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);let t=this.generator.next(e).value;return pc(e=>this.generator.next(e).value,e,t)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(hp.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=this.currentTime/1e3)}play(){if(this.isStopped)return;let{driver:e=h7,startTime:t}=this.options;this.driver||=e(e=>this.tick(e)),this.options.onPlay?.();let n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null===this.holdTime?this.startTime||=t??n:this.startTime=n-this.holdTime,"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(hp.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null,hf.mainThread--}stopDriver(){this.driver&&=void this.driver.stop()}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}},pw=e=>180*e/Math.PI,px=e=>pk(pw(Math.atan2(e[1],e[0]))),pC={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:px,rotateZ:px,skewX:e=>pw(Math.atan(e[1])),skewY:e=>pw(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},pk=e=>((e%=360)<0&&(e+=360),e),pS=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),pT=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),pA={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:pS,scaleY:pT,scale:e=>(pS(e)+pT(e))/2,rotateX:e=>pk(pw(Math.atan2(e[6],e[5]))),rotateY:e=>pk(pw(Math.atan2(-e[2],e[0]))),rotateZ:px,rotate:px,skewX:e=>pw(Math.atan(e[4])),skewY:e=>pw(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function pE(e){return+!!e.includes("scale")}function pM(e,t){if(!e||"none"===e)return pE(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),i,r;if(n)i=pA,r=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=pC,r=t}if(!r)return pE(t);let a=i[t],s=r[1].split(",").map(p_);return"function"==typeof a?a(s):s[a]}function p_(e){return parseFloat(e.trim())}var pR=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],pI=new Set(pR),pj=e=>e===hx||e===hP,pV=new Set(["x","y","z"]),pO=pR.filter(e=>!pV.has(e)),pP={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:i})=>{let r=e.max-e.min;return"border-box"===i?r:r-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:i})=>{let r=e.max-e.min;return"border-box"===i?r:r-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>pM(t,"x"),y:(e,{transform:t})=>pM(t,"y")};pP.translateX=pP.x,pP.translateY=pP.y;var pN=new Set,pL=!1,pD=!1,pF=!1;function pB(){if(pD){let e=Array.from(pN).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;
14t.forEach(e=>{let t,i=(t=[],pO.forEach(n=>{let i=e.getValue(n);void 0!==i&&(t.push([n,i.get()]),i.set(+!!n.startsWith("scale")))}),t);i.length&&(n.set(e,i),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)})}pD=!1,pL=!1,pN.forEach(e=>e.complete(pF)),pN.clear()}function p$(){pN.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(pD=!0)})}var pU=class{constructor(e,t,n,i,r,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=i,this.element=r,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(pN.add(this),pL||(pL=!0,hu.read(p$),hu.resolveKeyframes(pB))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:i}=this;if(null===e[0]){let r=i?.get(),a=e[e.length-1];if(void 0!==r)e[0]=r;else if(n&&t){let i=n.readValue(t,a);null!=i&&(e[0]=i)}void 0===e[0]&&(e[0]=a),i&&void 0===r&&i.set(e[0])}for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),pN.delete(this)}cancel(){"scheduled"===this.state&&(pN.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}};function pW(e,t,n){t.startsWith("--")?e.style.setProperty(t,n):e.style[t]=n}var pz={};function pH(e,t){let n=dK(e);return()=>pz[t]??n()}var pK=pH(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),pq=pH(()=>{try{document.createElement("div").animate({opacity:0}
14,{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),pY=([e,t,n,i])=>`cubic-bezier(${e}, ${t}, ${n}, ${i})`,pG={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:pY([0,.65,.55,1]),circOut:pY([.55,0,1,.45]),backIn:pY([.31,.01,.66,-.59]),backOut:pY([.33,1.53,.69,.99])};function pX(e){return"function"==typeof e&&"applyToOptions"in e}var pZ=class extends pv{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:i,pseudoElement:r,allowFlatten:a=!1,finalKeyframe:s,onComplete:o}=e;this.isPseudoElement=!!r,this.allowFlatten=a,this.options=e,dz("string"!=typeof e.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");let l=function({type:e,...t}){return pX(e)&&pq()?e.applyToOptions(t):(t.duration??=300,t.ease??="easeOut",t)}(e);this.animation=function(e,t,n,{delay:i=0,duration:r=300,repeat:a=0,repeatType:s="loop",ease:o="easeOut",times:l}={},u){let c={[t]:n};l&&(c.offset=l);let d=function e(t,n){if(t)return"function"==typeof t?pq()?h8(t,n):"ease-out":hn(t)?pY(t):Array.isArray(t)?t.map(t=>e(t,n)||pG.easeOut):pG[t]}(o,r);Array.isArray(d)&&(c.easing=d);let h={delay:i,duration:r,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:a+1,direction:"reverse"===s?"alternate":"normal"};u&&(h.pseudoElement=u);let p=e.animate(c,h);return p}(t,n,i,l,r),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){let e=pf(i,this.options,s,this.speed);this.updateMotionValue&&this.updateMotionValue(e),pW(t,n,e),this.animation.cancel()}o?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;"idle"===e||"finished"===e||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){return Number(this.animation.effect?.getComputedTiming?.().duration||0)/1e3}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+e/1e3}get time(){return(Number(this.animation.currentTime)||0)/1e3}set time(e){let t=null!==this.finishedTime;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=1e3*e,t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return null===this.finishedTime?this.animation.playState:"finished"}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:t,rangeEnd:n,observe:i}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&pK()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),dq):i(this)}},pJ={anticipate:d4,backInOut:d5,circInOut:d7},pQ=class extends pZ{constructor(e){(function(e){"string"==typeof e.ease&&e.ease in pJ&&(e.ease=pJ[e.ease])})(e),pg(e),super(e),void 0!==e.startTime&&!1!==e.autoplay&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:i,element:r,...a}=this.options;if(!t)return;if(void 0!==e)return void t.set(e);let s=new pb({...a,autoplay:!1}),o=Math.max(10,hp.now()-this.startTime),l=dU(0,10,o-10),u=s.sample(o).value,{name:c}=this.options;r&&c&&pW(r,c,u),t.setWithVelocity(s.sample(Math.max(0,o-l)).value,u,l),s.stop()}},p0=(e,t)=>"zIndex"!==t&&!!("number"==typeof e||Array.isArray(e)||"string"==typeof e&&(hq.test(e)||"0"===e)&&!e.startsWith("url("));function p1(e){e.duration=0,e.type="keyframes"}var p2=new Set(["opacity","clipPath","filter","transform"]),p3=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/,p5=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),p4=dK(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),p9=class extends pv{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:a="loop",keyframes:s,name:o,motionValue:l,element:u,...c}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=hp.now();let d={autoplay:e,delay:t,type:n,repeat:i,repeatDelay:r,repeatType:a,name:o,motionValue:l,element:u,...c};this.keyframeResolver=new(u?.KeyframeResolver||pU)(s,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),o,l,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,i){this.keyframeResolver=void 0;let{name:r,type:a,velocity:s,delay:o,isHandoff:l,onUpdate:u}=n;this.resolvedAt=hp.now();let c=!0;(function(e,t,n,i){let r=e[0];if(null===r)return!1;if("display"===t||"visibility"===t)return!0;let a=e[e.length-1],s=p0(r,t),o=p0(a,t);return dW(s===o,`You are trying to animate ${t} from "${r}" to "${a}". "${s?a:r}" is not an animatable value.`,"value-not-animatable"),!!s&&!!o&&(function(e){let t=e[0];if(1===e.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}(e)||("spring"===n||pX(n))&&i)})(e,r,a,s)||(c=!1,(dH.instantAnimations||!o)&&u?.(pf(e,n,t)),e[0]=e[e.length-1],p1(n),n.repeat=0);let d={startTime:i?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},h=c&&!l&&function(e){let{motionValue:t,name:n,repeatDelay:i,repeatType:r,damping:a,type:s,keyframes:o}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;
14let{onUpdate:l,transformTemplate:u}=t.owner.getProps();return p4()&&n&&(p2.has(n)||p5.has(n)&&function(e){for(let t=0;t<e.length;t++)if("string"==typeof e[t]&&p3.test(e[t]))return!0;return!1}(o))&&("transform"!==n||!u)&&!l&&!i&&"mirror"!==r&&0!==a&&"inertia"!==s}(d),p=d.motionValue?.owner?.current,f;if(h)try{f=new pQ({...d,element:p})}catch{f=new pb(d)}else f=new pb(d);f.finished.then(()=>{this.notifyFinished()}).catch(dq),this.pendingTimeline&&=void(this.stopTimeline=f.attachTimeline(this.pendingTimeline)),this._animation=f}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),pF=!0,p$(),pB(),pF=!1),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}};function p6(e,t,n,i=0,r=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),s=e.size,o=(s-1)*i;return"function"==typeof n?n(a,s):1===r?a*i:o-a*i}var p7=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u,p8={type:"spring",stiffness:500,damping:25,restSpeed:10},fe={type:"keyframes",duration:.8},ft={type:"keyframes",ease:[.25,.1,.35,1],duration:.3};function fn(e,t){if(e?.inherit&&t){let{inherit:n,...i}=e;return{...t,...i}}return e}function fi(e,t){let n=e?.[t]??e?.default??e;return n===e?n:fn(n,e)}var fr=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]),fa=(e,t,n,i={},r,a)=>s=>{let o=fi(i,e)||{},l=o.delay||i.delay||0,{elapsed:u=0}=i;u-=1e3*l;let c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...o,delay:-u,onUpdate:e=>{t.set(e),o.onUpdate&&o.onUpdate(e)},onComplete:()=>{s(),o.onComplete&&o.onComplete()},name:e,motionValue:t,element:a?void 0:r};(function(e){for(let t in e)if(!fr.has(t))return!0;return!1})(o)||Object.assign(c,((e,{keyframes:t})=>t.length>2?fe:pI.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:p8:ft)(e,c)),c.duration&&=1e3*c.duration,c.repeatDelay&&=1e3*c.repeatDelay,void 0!==c.from&&(c.keyframes[0]=c.from);let d=!1;if(!1!==c.type&&(0!==c.duration||c.repeatDelay)||(p1(c),0===c.delay&&(d=!0)),(dH.instantAnimations||dH.skipAnimations||r?.shouldSkipAnimations)&&(d=!0,p1(c),c.delay=0),c.allowFlatten=!o.type&&!o.ease,d&&!a&&void 0!==t.get()){let e=pf(c.keyframes,o);if(void 0!==e)return void hu.update(()=>{c.onUpdate(e),c.onComplete()})}return o.isSync?new pb(c):new p9(c)};function fs(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function fo(e,t,n,i){if("function"==typeof t){let[r,a]=fs(i);t=t(void 0===n?e.custom:n,r,a)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){let[r,a]=fs(i);t=t(void 0===n?e.custom:n,r,a)}return t}function fl(e,t,n){let i=e.getProps();return fo(i,t,void 0===n?i.custom:n,e)}var fu=new Set(["width","height","top","left","right","bottom",...pR]),fc=void 0,fd=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=hp.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=hp.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=!isNaN(parseFloat(this.current)))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new dZ);let n=this.events[e].add(t);return"change"===e?()=>{n(),hu.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}
14setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||=new Set,this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return fc&&fc.push(this),this.current}getPrevious(){return this.prev}getVelocity(){var e;let t=hp.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;let n=Math.min(this.updatedAt-this.prevUpdatedAt,30);return e=parseFloat(this.current)-parseFloat(this.prevFrameValue),n?1e3/n*e:0}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function fh(e,t){return new fd(e,t)}var fp=e=>Array.isArray(e),ff=e=>!!(e&&e.getVelocity);function fm(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var fg="data-"+fm("framerAppearId");function fv(e,t,{delay:n=0,transitionOverride:i,type:r}={}){let{transition:a,transitionEnd:s,...o}=t,l=e.getDefaultTransition();a=a?fn(a,l):l;let u=a?.reduceMotion;i&&(a=i);let c=[],d=r&&e.animationState&&e.animationState.getState()[r];for(let t in o){let i=e.getValue(t,e.latestValues[t]??null),r=o[t];if(void 0===r||d&&function({protectedKeys:e,needsAnimating:t},n){let i=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,i}(d,t))continue;let s={delay:n,...fi(a||{},t)},l=i.get();if(void 0!==l&&!i.isAnimating()&&!Array.isArray(r)&&r===l&&!s.velocity){hu.update(()=>i.set(r));continue}let h=!1;if(window.MotionHandoffAnimation){let n=e.props[fg];if(n){let e=window.MotionHandoffAnimation(n,t,hu);null!==e&&(s.startTime=e,h=!0)}}!function(e,t){let n=e.getValue("willChange");if(ff(n)&&n.add)return n.add(t);if(!n&&dH.WillChange){let n=new dH.WillChange("auto");e.addValue("willChange",n),n.add(t)}}(e,t);let p=u??e.shouldReduceMotion;i.start(fa(t,i,r,p&&fu.has(t)?{type:!1}:s,e,h));let f=i.animation;f&&c.push(f)}if(s){let t=()=>hu.update(()=>{s&&function(e,t){let{transitionEnd:n={},transition:i={},...r}=fl(e,t)||{};for(let t in r={...r,...n}){var a,s;s=fp(a=r[t])?a[a.length-1]||0:a,e.hasValue(t)?e.getValue(t).set(s):e.addValue(t,fh(s))}}(e,s)});c.length?Promise.all(c).then(t):t()}return c}function fy(e,t,n={}){let i=fl(e,t,"exit"===n.type?e.presenceContext?.custom:void 0),{transition:r=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(r=n.transitionOverride);let a=i?()=>Promise.all(fv(e,i,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(i=0)=>{let{delayChildren:a=0,staggerChildren:s,staggerDirection:o}=r;return function(e,t,n=0,i=0,r=0,a=1,s){let o=[];for(let l of e.variantChildren)l.notify("AnimationStart",t),o.push(fy(l,t,{...s,delay:n+("function"==typeof i?0:i)+p6(e.variantChildren,l,i,r,a)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(o)}(e,t,i,a,s,o,n)}:()=>Promise.resolve(),{when:o}=r;if(!o)return Promise.all([a(),s(n.delay)]);{let[e,t]="beforeChildren"===o?[a,s]:[s,a];return e().then(()=>t())}}var fb=e=>t=>t.test(e),fw=[hx,hP,hO,hV,hL,hN,{test:e=>"auto"===e,parse:e=>e}],fx=e=>fw.find(fb(e)),fC=new Set(["brightness","contrast","saturate","opacity"]);function fk(e){let[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;let[i]=n.match(hT)||[];if(!i)return e;let r=n.replace(i,""),a=+!!fC.has(t);return i!==n&&(a*=100),t+"("+a+r+")"}var fS=/\b([a-z-]*)\(.*?\)/gu,fT={...hq,getAnimatableNone:e=>{let t=e.match(fS);return t?t.map(fk).join(" "):e}},fA={...hq,getAnimatableNone:e=>{let t=hq.parse(e);return hq.createTransformer(e)(t.map(e=>"number"==typeof e?0:"object"==typeof e?{...e,alpha:1}:e))}},fE={...hx,transform:Math.round},fM={borderWidth:hP,borderTopWidth:hP,borderRightWidth:hP,borderBottomWidth:hP,borderLeftWidth:hP,borderRadius:hP,borderTopLeftRadius:hP,borderTopRightRadius:hP,borderBottomRightRadius:hP,borderBottomLeftRadius:hP,width:hP,maxWidth:hP,height:hP,maxHeight:hP,top:hP,right:hP,bottom:hP,left:hP,inset:hP,insetBlock:hP,insetBlockStart:hP,insetBlockEnd:hP,insetInline:hP,insetInlineStart:hP,insetInlineEnd:hP,padding:hP,paddingTop:hP,paddingRight:hP,paddingBottom:hP,paddingLeft:hP,paddingBlock:hP,paddingBlockStart:hP,paddingBlockEnd:hP,paddingInline:hP,paddingInlineStart:hP,paddingInlineEnd:hP,margin:hP,marginTop:hP,marginRight:hP,marginBottom:hP,marginLeft:hP,marginBlock:hP,marginBlockStart:hP,marginBlockEnd:hP,marginInline:hP,marginInlineStart:hP,marginInlineEnd:hP,fontSize:hP,backgroundPositionX:hP,backgroundPositionY:hP,rotate:hV,rotateX:hV,rotateY:hV,rotateZ:hV,scale:hk,scaleX:hk,scaleY:hk,scaleZ:hk,skew:hV,skewX:hV,skewY:hV,distance:hP,translateX:hP,translateY:hP,translateZ:hP,x:hP,y:hP,z:hP,perspective:hP,transformPerspective:hP,opacity:hC,originX:hD,originY:hD,originZ:hP,zIndex:fE,fillOpacity:hC,strokeOpacity:hC,numOctaves:fE},f_={...fM,color:hB,backgroundColor:hB,outlineColor:hB,fill:hB,stroke:hB,borderColor:hB,borderTopColor:hB,borderRightColor:hB,borderBottomColor:hB,borderLeftColor:hB,filter:fT,WebkitFilter:fT,mask:fA,WebkitMask:fA},fR=e=>f_[e],fI=new Set([fT,fA]);function fj(e,t){let n=fR(e);return fI.has(n)||(n=hq),n.getAnimatableNone?n.getAnimatableNone(t):void 0}
14var fV=new Set(["auto","none","0"]),fO=class extends pU{constructor(e,t,n,i,r){super(e,t,n,i,r,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let i=e[n];if("string"==typeof i&&hy(i=i.trim())){let r=function e(t,n,i=1){dz(i<=4,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");let[r,a]=function(e){let t=p7.exec(e);if(!t)return[,];let[,n,i,r]=t;return[`--${n??i}`,r]}(t);if(!r)return;let s=window.getComputedStyle(n).getPropertyValue(r);if(s){let e=s.trim();return/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e)?parseFloat(e):e}return hy(a)?e(a,n,i+1):a}(i,t.current);void 0!==r&&(e[n]=r),n===e.length-1&&(this.finalKeyframe=i)}}if(this.resolveNoneKeyframes(),!fu.has(n)||2!==e.length)return;let[i,r]=e,a=fx(i),s=fx(r);if(hw(i)!==hw(r)&&pP[n]){this.needsMeasurement=!0;return}if(a!==s)if(pj(a)&&pj(s))for(let t=0;t<e.length;t++){let n=e[t];"string"==typeof n&&(e[t]=parseFloat(n))}else pP[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(null===e[t]||function(e){return"number"==typeof e?0===e:null===e||"none"===e||"0"===e||/^0[^.\s]+$/u.test(e)}(e[t]))&&n.push(t);n.length&&function(e,t,n){let i=0,r;for(;i<e.length&&!r;){let t=e[i];"string"==typeof t&&!fV.has(t)&&hH(t).values.length&&(r=e[i]),i++}if(r&&n)for(let i of t)e[i]=fj(n,r)}(e,n,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=pP[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let i=t[t.length-1];void 0!==i&&e.getValue(n,i).jump(i,!1)}measureEndState(){let{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;let i=e.getValue(t);i&&i.jump(this.measuredOrigin,!1);let r=n.length-1,a=n[r];n[r]=pP[t](e.measureViewportBox(),window.getComputedStyle(e.current)),null!==a&&void 0===this.finalKeyframe&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEac
14h(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}},fP=(e,t)=>t&&"number"==typeof e?t.transform(e):e,{schedule:fN}=hs(queueMicrotask,!1);function fL(e,t){let n=function(e){if(null==e)return[];if(e instanceof EventTarget)return[e];if("string"==typeof e){let t=document,n=(void 0)??t.querySelectorAll(e);return n?Array.from(n):[]}return Array.from(e).filter(e=>null!=e)}(e),i=new AbortController;return[n,{passive:!0,...t,signal:i.signal},()=>i.abort()]}var fD=(e,t)=>!!t&&(e===t||fD(e,t.parentElement)),fF=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]),fB=new WeakSet;function f$(e){return t=>{"Enter"===t.key&&e(t)}}function fU(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}function fW(e){return"mouse"===e.pointerType?"number"!=typeof e.button||!!(e.button<=0):!1!==e.isPrimary}var fz=new WeakSet,fH=[...fw,hB,hq],fK=()=>({min:0,max:0}),fq=()=>({x:fK(),y:fK()}),fY=new WeakMap;function fG(e){return"object"==typeof e&&!!e&&"function"==typeof e.start}function fX(e){return"string"==typeof e||Array.isArray(e)}var fZ=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],fJ=["initial",...fZ];function fQ(e){return fG(e.animate)||fJ.some(t=>fX(e[t]))}function f0(e){return!!(fQ(e)||e.variants)}var f1={current:null},f2={current:!1},f3="u">typeof window,f5=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],f4={},f9=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:i,skipAnimations:r,blockInitialAnimation:a,visualState:s},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=pU,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=hp.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,hu.render(this.render,!1,!0))};let{latestValues:l,renderState:u}=s;this.latestValues=l,this.baseTarget={...l},this.initialValues=t.initial?{...l}:{},this.renderState=u,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=r,this.options=o,this.blockInitialAnimation=!!a,this.isControllingVariants=fQ(t),this.isVariantNode=f0(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:c,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in d){let t=d[e];void 0!==l[e]&&ff(t)&&t.set(l[e])}}mount(e){if(this.hasBeenMounted)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];this.current=e,fY.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(f2.current||function(){if(f2.current=!0,f3)if(window.matchMedia){let e=window.matchMedia("(prefers-reduced-motion)"),t=()=>f1.current=e.matches;e.addEventListener("change",t),t()}else f1.current=!1}(),this.shouldReduceMotion=f1.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){for(let e in this.projection&&this.projection.unmount(),hc(this.notifyUpdate),hc(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this),this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??=new Set,this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&p2.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:i,times:r,ease:a,duration:s}=t.accelerate,o=new pZ({element:this.current,name:e,keyframes:i,times:r,ease:a,duration:1e3*s}),l=n(o);this.valueSubscriptions.set(e,()=>{l(),o.cancel()});return}let n=pI.has(e);n&&this.onBindTransform&&this.onBindTransform();let i=t.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&hu.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),r;"u">typeof window&&window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{i(),r&&r(),t.owner&&t.stop()})}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in f4){let t=f4[e];
14if(!t)continue;let{isEnabled:n,Feature:i}=t;if(!this.features[e]&&i&&n(this.props)&&(this.features[e]=new i(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):fq()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<f5.length;t++){let n=f5[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let i=e["on"+n];i&&(this.propEventSubscriptions[n]=this.on(n,i))}this.prevMotionValues=function(e,t,n){for(let i in t){let r=t[i],a=n[i];if(ff(r))e.addValue(i,r);else if(ff(a))e.addValue(i,fh(r,{owner:e}));else if(a!==r)if(e.hasValue(i)){let t=e.getValue(i);!0===t.liveStyle?t.jump(r):t.hasAnimated||t.set(r)}else{let t=e.getStaticValue(i);e.addValue(i,fh(void 0===t?r:t,{owner:e}))}}for(let i in n)void 0===t[i]&&e.removeValue(i);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=fh(null===t?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n,i,r,a=void 0===this.latestValues[e]&&this.current?this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];return null!=a&&("string"==typeof a&&(n=a,/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(n)||(i=a,/^0[^.\s]+$/u.test(i)))?a=parseFloat(a):(r=a,!fH.find(fb(r))&&hq.test(t)&&(a=fj(e,t))),this.setBaseTarget(e,ff(a)?a.get():a)),ff(a)?a.get():a}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let{initial:t}=this.props,n;if("string"==typeof t||"object"==typeof t){let i=fo(this.props,t,this.presenceContext?.custom);i&&(n=i[e])}if(t&&void 0!==n)return n;let i=this.getBaseTargetFromProps(this.props,e);return void 0===i||ff(i)?void 0!==this.initialValues[e]&&void 0===n?void 0:this.baseTarget[e]:i}on(e,t){return this.events[e]||(this.events[e]=new dZ),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){fN.render(this.render)}},f6=class extends f9{constructor(){super(...arguments),this.KeyframeResolver=fO}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;ff(e)&&(this.childSubscription=e.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}},f7=class{constructor(e){this.isMounted=!1,this.node=e}update(){}},f8={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},me=pR.length;function mt(e,t,n){let{style:i,vars:r,transformOrigin:a}=e,s=!1,o=!1;for(let e in t){let n=t[e];if(pI.has(e)){s=!0;continue}if(hg(e)){r[e]=n;continue}{let t=fP(n,fM[e]);e.startsWith("origin")?(o=!0,a[e]=t):i[e]=t}}if(t.transform||(s||n?i.transform=function(e,t,n){let i="",r=!0;for(let a=0;a<me;a++){let s=pR[a],o=e[s];if(void 0===o)continue;let l=!0;if("number"==typeof o)l=o===+!!s.startsWith("scale");else{let e=parseFloat(o);l=s.startsWith("scale")?1===e:0===e}if(!l||n){let e=fP(o,fM[s]);if(!l){r=!1;let t=f8[s]||s;i+=`${t}(${e}) `}n&&(t[s]=e)}}return i=i.trim(),n?i=n(t,r?"":i):r&&(i="none"),i}(t,e.transform,n):i.transform&&="none"),o){let{originX:e="50%",originY:t="50%",originZ:n=0}=a;i.transformOrigin=`${e} ${t} ${n}`}}function mn(e,{style:t,vars:n},i,r){let a=e.style,s;for(s in t)a[s]=t[s];for(s in r?.applyProjectionStyles(a,i),n)a.setProperty(s,n[s])}function mi(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var mr={correct:(e,t)=>
14{if(!t.target)return e;if("string"==typeof e)if(!hP.test(e))return e;else e=parseFloat(e);return`${mi(e,t.target.x)}% ${mi(e,t.target.y)}%`}},ma={borderRadius:{...mr,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:mr,borderTopRightRadius:mr,borderBottomLeftRadius:mr,borderBottomRightRadius:mr,boxShadow:{correct:(e,{treeScale:t,projectionDelta:n})=>{let i=hq.parse(e);if(i.length>5)return e;let r=hq.createTransformer(e),a=+("number"!=typeof i[0]),s=n.x.scale*t.x,o=n.y.scale*t.y;i[0+a]/=s,i[1+a]/=o;let l=hX(s,o,.5);return"number"==typeof i[2+a]&&(i[2+a]/=l),"number"==typeof i[3+a]&&(i[3+a]/=l),r(i)}}};function ms(e,{layout:t,layoutId:n}){return pI.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!ma[e]||"opacity"===e)}function mo(e,t,n){let i=e.style,r=t?.style,a={};if(!i)return a;for(let t in i)(ff(i[t])||r&&ff(r[t])||ms(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=i[t]);return a}var ml=class extends f6{constructor(){super(...arguments),this.type="html",this.renderInstance=mn}readValueFromInstance(e,t){if(pI.has(t))return this.projection?.isProjecting?pE(t):((e,t)=>{let{transform:n="none"}=getComputedStyle(e);return pM(n,t)})(e,t);{let n=window.getComputedStyle(e),i=(hg(t)?n.getPropertyValue(t):n[t])||0;return"string"==typeof i?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:t}){return function({top:e,left:t,right:n,bottom:i}){return{x:{min:t,max:n},y:{min:e,max:i}}}(function(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),i=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}(e.getBoundingClientRect(),t))}build(e,t,n){mt(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return mo(e,t,n)}},mu={offset:"stroke-dashoffset",array:"stroke-dasharray"},mc={offset:"strokeDashoffset",array:"strokeDasharray"},md=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function mh(e,{attrX:t,attrY:n,attrScale:i,pathLength:r,pathSpacing:a=1,pathOffset:s=0,...o},l,u,c){if(mt(e,o,u),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:h}=e;for(let e of(d.transform&&(h.transform=d.transform,delete d.transform),(h.transform||d.transformOrigin)&&(h.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),h.transform&&(h.transformBox=c?.transformBox??"fill-box",delete d.transformBox),md))void 0!==d[e]&&(h[e]=d[e],delete d[e]);void 0!==t&&(d.x=t),void 0!==n&&(d.y=n),void 0!==i&&(d.scale=i),void 0!==r&&function(e,t,n=1,i=0,r=!0){e.pathLength=1;let a=r?mu:mc;e[a.offset]=`${-i}`,e[a.array]=`${t} ${n}`}(d,r,a,s,!1)}var mp=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),mf=e=>"string"==typeof e&&"svg"===e.toLowerCase();function mm(e,t,n){let i=mo(e,t,n);for(let n in e)(ff(e[n])||ff(t[n]))&&(i[-1===pR.indexOf(n)?n:"attr"+n.charAt(0).toUpperCase()+n.substring(1)]=e[n]);return i}var mg=class extends f6{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=fq}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(pI.has(t)){let e=fR(t);return e&&e.default||0}return t=mp.has(t)?t:fm(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return mm(e,t,n)}
14build(e,t,n){mh(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,i){for(let n in mn(e,t,void 0,i),t.attrs)e.setAttribute(mp.has(n)?n:fm(n),t.attrs[n])}mount(e){this.isSVGTag=mf(e.tagName),super.mount(e)}},mv=fJ.length;function my(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let i=0;i<n;i++)if(t[i]!==e[i])return!1;return!0}var mb=[...fZ].reverse(),mw=fZ.length;function mx(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function mC(){return{animate:mx(!0),whileInView:mx(),whileHover:mx(),whileTap:mx(),whileDrag:mx(),whileFocus:mx(),exit:mx()}}function mk(e,t,n,i={passive:!0}){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n)}var mS=(0,iV.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),mT=(0,iV.createContext)({strict:!1}),mA={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},mE=!1;function mM(){return function(){if(mE)return;let e={};for(let t in mA)e[t]={isEnabled:e=>mA[t].some(t=>!!e[t])};f4=e,mE=!0}(),f4}function m_(e){let t=mM();for(let n in e)t[n]={...t[n],...e[n]};f4=t}function mR({children:e,features:t,strict:n=!1}){let[,i]=(0,iV.useState)(!mI(t)),r=(0,iV.useRef)(void 0);if(!mI(t)){let{renderer:e,...n}=t;r.current=e,m_(n)}return(0,iV.useEffect)(()=>{mI(t)&&t().then(({renderer:e,...t})=>{m_(t),r.current=e,i(!0)})},[]),(0,a6.jsx)(mT.Provider,{value:{renderer:r.current,strict:n},children:e})}function mI(e){return"function"==typeof e}var mj=new Set("animate.exit.variants.initial.style.values.variants.transition.transformTemplate.custom.inherit.onBeforeLayoutMeasure.onAnimationStart.onAnimationComplete.onUpdate.onDragStart.onDrag.onDragEnd.onMeasureDragConstraints.onDirectionLock.onDragTransitionEnd._dragX._dragY.onHoverStart.onHoverEnd.onViewportEnter.onViewportLeave.globalTapTarget.propagate.ignoreStrict.viewport".split("."));function mV(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||mj.has(e)}var mO,mP=((e,t)=>{let n={};for(var i in e)dI(n,i,{get:e[i],enumerable:!0});return t||dI(n,Symbol.toStringTag,{value:"Module"}),n})({default:()=>mO}),mN=(u=()=>{throw mO={},Error('Could not resolve "@emotion/is-prop-valid" imported by "framer-motion". Is it installed?')},()=>(u&&(c=u(u=0)),c)),mL=e=>!mV(e);try{g6=(mN(),dO.call(mP,"module.exports")?mP["module.exports"]:((e,t,n,i)=>{if(t&&"object"==typeof t||"function"==typeof t)for(var r,a=dV(t),s=0,o=a.length;s<o;s++)r=a[s],dO.call(e,r)||r===n||dI(e,r,{get:(e=>t[e]).bind(null,r),enumerable:!(i=dj(t,r))||i.enumerable});return e})(dI({},"__esModule",{value:!0}),mP)).default,"function"==typeof g6&&(mL=e=>e.startsWith("on")?!mV(e):g6(e))}catch{}var mD=(0,iV.createContext)({});function mF(e){return Array.isArray(e)?e.join(" "):e}var mB=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function m$(e,t,n){for(let i in t)ff(t[i])||ms(i,n)||(e[i]=t[i])}var mU=()=>({...mB(),attrs:{}}),mW=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function mz(e){return!("string"!=typeof e||e.includes("-"))&&!!(mW.indexOf(e)>-1||/[A-Z]/u.test(e))}var mH=e=>(t,n)=>{let i,r=(0,iV.useContext)(mD),a=(0,iV.useContext)(d$),s=()=>(function({scrapeMotionValuesFromProps:e,createRenderState:t},n,i,r){return{latestValues:function(e,t,n,i){let r={},a=i(e,{});for(let e in a){var s;r[e]=ff(s=a[e])?s.get():s}let{initial:o,animate:l}=e,u=fQ(e),c=f0(e);t&&c&&!u&&!1!==e.inherit&&(void 0===o&&(o=t.initial),void 0===l&&(l=t.animate));let d=!!n&&!1===n.initial,h=(d||=!1===o)?l:o;if(h&&"boolean"!=typeof h&&!fG(h)){let t=Array.isArray(h)?h:[h];for(let n=0;n<t.length;n++){let i=fo(e,t[n]);if(i){let{transitionEnd:e,transition:t,...n}=i;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=d?t.length-1:0;t=t[e]}null!==t&&(r[e]=t)}for(let t in e)r[t]=e[t]}}}return r}(n,i,r,e),renderState:t()}})(e,t,r,a);return n?s():(null===(i=(0,iV.useRef)(null)).current&&(i.current=s()),i.current)},mK=mH({scrapeMotionValuesFromProps:mo,createRenderState:mB}),mq=mH({scrapeMotionValuesFromProps:mm,createRenderState:mU}
14),mY=Symbol.for("motionComponentSymbol"),mG=(0,iV.createContext)({}),mX=class extends f7{constructor(e){super(e),e.animationState||=function(e){let t=t=>Promise.all(t.map(({animation:t,options:n})=>(function(e,t,n={}){let i;if(e.notify("AnimationStart",t),Array.isArray(t))i=Promise.all(t.map(t=>fy(e,t,n)));else if("string"==typeof t)i=fy(e,t,n);else{let r="function"==typeof t?fl(e,t,n.custom):t;i=Promise.all(fv(e,r,n))}return i.then(()=>{e.notify("AnimationComplete",t)})})(e,t,n))),n=mC(),i=!0,r=!1,a=t=>(n,i)=>{let r=fl(e,i,"exit"===t?e.presenceContext?.custom:void 0);if(r){let{transition:e,transitionEnd:t,...i}=r;n={...n,...i,...t}}return n};function s(s){let{props:o}=e,l=function e(t){if(!t)return;if(!t.isControllingVariants){let n=t.parent&&e(t.parent)||{};return void 0!==t.props.initial&&(n.initial=t.props.initial),n}let n={};for(let e=0;e<mv;e++){let i=fJ[e],r=t.props[i];(fX(r)||!1===r)&&(n[i]=r)}return n}(e.parent)||{},u=[],c=new Set,d={},h=1/0;for(let t=0;t<mw;t++){var p,f;let m=mb[t],g=n[m],v=void 0===o[m]?l[m]:o[m],y=fX(v),b=m===s?g.isActive:null;!1===b&&(h=t);let w=v===l[m]&&v!==o[m]&&y;if(w&&(i||r)&&e.manuallyAnimateOnMount&&(w=!1),g.protectedKeys={...d},!g.isActive&&null===b||!v&&!g.prevProp||fG(v)||"boolean"==typeof v)continue;if("exit"===m&&g.isActive&&!0!==b){g.prevResolvedValues&&(d={...d,...g.prevResolvedValues});continue}let x=(p=g.prevProp,"string"==typeof(f=v)?f!==p:!!Array.isArray(f)&&!my(f,p)),C=x||m===s&&g.isActive&&!w&&y||t>h&&y,k=!1,S=Array.isArray(v)?v:[v],T=S.reduce(a(m),{});!1===b&&(T={});let{prevResolvedValues:A={}}=g,E={...A,...T},M=t=>{C=!0,c.has(t)&&(k=!0,c.delete(t)),g.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)};for(let e in E){let t=T[e],n=A[e];if(!d.hasOwnProperty(e))(fp(t)&&fp(n)?my(t,n):t===n)?void 0!==t&&c.has(e)?M(e):g.protectedKeys[e]=!0:null==t?c.add(e):M(e)}g.prevProp=v,g.prevResolvedValues=T,g.isActive&&(d={...d,...T}),(i||r)&&e.blockInitialAnimation&&(C=!1);let _=w&&x;C&&(!_||k)&&u.push(...S.map(t=>{let n={type:m};if("string"==typeof t&&(i||r)&&!_&&e.manuallyAnimateOnMount&&e.parent){let{parent:i}=e,r=fl(i,t);if(i.enteringChildren&&r){let{delayChildren:t}=r.transition||{};n.delay=p6(i.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(c.size){let t={};if("boolean"!=typeof o.initial){let n=fl(e,Array.isArray(o.initial)?o.initial[0]:o.initial);n&&n.transition&&(t.transition=n.transition)}c.forEach(n=>{let i=e.getBaseTarget(n),r=e.getValue(n);r&&(r.liveStyle=!0),t[n]=i??null}),u.push({animation:t})}let m=!!u.length;return i&&(!1===o.initial||o.initial===o.animate)&&!e.manuallyAnimateOnMount&&(m=!1),i=!1,r=!1,m?t(u):Promise.resolve()}return{animateChanges:s,setActive:function(t,i){if(n[t].isActive===i)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,i)),n[t].isActive=i;let r=s(t);for(let e in n)n[e].protectedKeys={};return r},setAnimateFunction:function(n){t=n(e)},getState:()=>n,reset:()=>{n=mC(),r=!0}}}(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();fG(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},mZ=0;function mJ(e){return{point:{x:e.pageX,y:e.pageY}}}function mQ(e,t,n){let{props:i}=e;e.animationState&&i.whileHover&&e.animationState.setActive("whileHover","Start"===n);let r=i["onHover"+n];r&&hu.postRender(()=>r(t,mJ(t)))}var m0=class extends f7{mount(){let{current:e}=this.node;e&&(this.unmount=function(e,t,n={}){let[i,r,a]=fL(e,n);return i.forEach(e=>{let n=!1,i=!1,a,s=t=>{a&&=void a(t),e.removeEventListener("pointerleave",l)},o=e=>{n=!1,window.removeEventListener("pointerup",o),window.removeEventListener("pointercancel",o),i&&(i=!1,s(e))},l=e=>{if("touch"!==e.pointerType){if(n){i=!0;return}s(e)}};e.addEventListener("pointerenter",n=>{if("touch"===n.pointerType)return;i=!1;let s=t(e,n);"function"==typeof s&&(a=s,e.addEventListener("pointerleave",l,r))},r),e.addEventListener("pointerdown",()=>{n=!0,window.addEventListener("pointerup",o,r),window.addEventListener("pointercancel",o,r)},r)}),a}(e,(e,t)=>(mQ(this.node,t,"Start"),e=>mQ(this.node,e,"End"))))}unmount(){}},m1=class extends f7{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=dG(mk(this.node.current,"focus",()=>this.onFocus()),mk(this.node.current,"blur",()=>this.onBlur()))}unmount(){}};function m2(e,t,n){let{props:i}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&i.whileTap&&e.animationState.setActive("whileTap","Start"===n);let r=i["onTap"+("End"===n?"":n)];r&&hu.postRender(()=>r(t,mJ(t)))}var m3=class extends f7{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=function(e,t,n={}
14){let[i,r,a]=fL(e,n),s=e=>{let i=e.currentTarget;if(!fW(e)||fz.has(e))return;fB.add(i),n.stopPropagation&&fz.add(e);let a=t(i,e),s=(e,t)=>{window.removeEventListener("pointerup",o),window.removeEventListener("pointercancel",l),fB.has(i)&&fB.delete(i),fW(e)&&"function"==typeof a&&a(e,{success:t})},o=e=>{s(e,i===window||i===document||n.useGlobalTarget||fD(i,e.target))},l=e=>{s(e,!1)};window.addEventListener("pointerup",o,r),window.addEventListener("pointercancel",l,r)};return i.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener("pointerdown",s,r),"object"==typeof e&&e&&"offsetHeight"in e&&!("ownerSVGElement"in e)&&(e.addEventListener("focus",e=>((e,t)=>{let n=e.currentTarget;if(!n)return;let i=f$(()=>{if(fB.has(n))return;fU(n,"down");let e=f$(()=>{fU(n,"up")});n.addEventListener("keyup",e,t),n.addEventListener("blur",()=>fU(n,"cancel"),t)});n.addEventListener("keydown",i,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),t)})(e,r)),fF.has(e.tagName)||!0===e.isContentEditable||e.hasAttribute("tabindex")||(e.tabIndex=0))}),a}(e,(e,t)=>(m2(this.node,t,"Start"),(e,{success:t})=>m2(this.node,e,t?"End":"Cancel")),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}},m5=new WeakMap,m4=new WeakMap,m9=e=>{let t=m5.get(e.target);t&&t(e)},m6=e=>{e.forEach(m9)},m7={some:0,all:1},m8=class extends f7{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var e,t;let n;this.stopObserver?.();let{viewport:i={}}=this.node.getProps(),{root:r,margin:a,amount:s="some",once:o}=i,l={root:r?r.current:void 0,rootMargin:a,threshold:"number"==typeof s?s:m7[s]};this.stopObserver=(e=this.node.current,t=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,o&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);let{onViewportEnter:n,onViewportLeave:i}=this.node.getProps(),r=t?n:i;r&&r(e)},n=function({root:e,...t}){let n=e||document;m4.has(n)||m4.set(n,{});let i=m4.get(n),r=JSON.stringify(t);return i[r]||(i[r]=new IntersectionObserver(m6,{root:e,...t})),i[r]}(l),m5.set(e,t),n.observe(e),()=>{m5.delete(e),n.unobserve(e)})}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;let{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}},ge={renderer:(e,t)=>t.isSVG??mz(e)?new mg(t):new ml(t,{allowProjection:e!==iV.Fragment}),animation:{Feature:mX},exit:{Feature:class extends f7{constructor(){super(...arguments),this.id=mZ++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;if(e&&!1===n){if(this.isExitComplete){let{initial:e,custom:t}=this.node.getProps();if("string"==typeof e){let n=fl(this.node,e,t);if(n){let{transition:e,transitionEnd:t,...i}=n;for(let e in i)this.node.getValue(e)?.jump(i[e])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}let i=this.node.animationState.setActive("exit",!e);t&&!e&&i.then(()=>{this.isExitComplete=!0,t(this.id)})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}},inView:{Feature:m8},tap:{Feature:m3},focus:{Feature:m1},hover:{Feature:m0}},gt=function(e,{forwardMotionProps:t=!1,type:n}={}){let i=n?"svg"===n:mz(e),r=i?mq:mK;function a(n,a){var s;let o,l,u,c={...(0,iV.useContext)(mS),...n,layoutId:function({layoutId:e}){let t=(0,iV.useContext)(dF).id;return t&&void 0!==e?t+"-"+e:e}(n)},{isStatic:d}=c,h=function(e){let{initial:t,animate:n}=function(e,t){if(fQ(e)){let{initial:t,animate:n}=e;return{initial:!1===t||fX(t)?t:void 0,animate:fX(n)?n:void 0}}return!1===e.inherit?{}:t}(e,(0,iV.useContext)(mD));return(0,iV.useMemo)(()=>({initial:t,animate:n}),[mF(t),mF(n)])}(n),p=r(n,d);if(!d&&"u">typeof window){(0,iV.useContext)(mT).strict;let t=function(e){let{drag:t,layout:n}=mM();if(!t&&!n)return{};let i={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}
14(c);u=t.MeasureLayout,h.visualElement=function(e,t,n,i,r,a){let{visualElement:s}=(0,iV.useContext)(mD),o=(0,iV.useContext)(mT),l=(0,iV.useContext)(d$),u=(0,iV.useContext)(mS),c=u.reducedMotion,d=u.skipAnimations,h=(0,iV.useRef)(null),p=(0,iV.useRef)(!1);i||=o.renderer,!h.current&&i&&(h.current=i(e,{visualState:t,parent:s,props:n,presenceContext:l,blockInitialAnimation:!!l&&!1===l.initial,reducedMotionConfig:c,skipAnimations:d,isSVG:a}),p.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));let f=h.current,m=(0,iV.useContext)(mG);f&&!f.projection&&r&&("html"===f.type||"svg"===f.type)&&function(e,t,n,i){var r;let{layoutId:a,layout:s,drag:o,dragConstraints:l,layoutScroll:u,layoutRoot:c,layoutAnchor:d,layoutCrossfade:h}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:function e(t){if(t)return!1===t.options.allowProjection?e(t.parent):t.projection}(e.parent)),e.projection.setOptions({layoutId:a,layout:s,alwaysMeasureLayout:!!o||l&&(r=l)&&"object"==typeof r&&Object.prototype.hasOwnProperty.call(r,"current"),visualElement:e,animationType:"string"==typeof s?s:"both",initialPromotionConfig:i,crossfade:h,layoutScroll:u,layoutRoot:c,layoutAnchor:d})}(h.current,n,r,m);let g=(0,iV.useRef)(!1);(0,iV.useInsertionEffect)(()=>{f&&g.current&&f.update(n,l)});let v=n[fg],y=(0,iV.useRef)(!!v&&"u">typeof window&&!window.MotionHandoffIsComplete?.(v)&&window.MotionHasOptimisedAnimation?.(v));return dB(()=>{p.current=!0,f&&(g.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),f.scheduleRenderMicrotask(),y.current&&f.animationState&&f.animationState.animateChanges())}),(0,iV.useEffect)(()=>{f&&(!y.current&&f.animationState&&f.animationState.animateChanges(),y.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(v)}),!1),f.enteringChildren=void 0)}),f}(e,p,c,void 0,t.ProjectionNode,i)}return(0,a6.jsxs)(mD.Provider,{value:h,children:[u&&h.visualElement?(0,a6.jsx)(u,{visualElement:h.visualElement,...c}):null,function(e,t,n,{latestValues:i},r,a=!1,s){let o=(s??mz(e)?function(e,t,n,i){let r=(0,iV.useMemo)(()=>{let n=mU();return mh(n,t,mf(i),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};m$(t,e.style,e),r.style={...t,...r.style}}return r}:function(e,t){let n,i={},r=(m$(n={},e.style||{},e),Object.assign(n,function({transformTemplate:e},t){return(0,iV.useMemo)(()=>{let n=mB();return mt(n,t,e),Object.assign({},n.vars,n.style)},[t])}(e,t)),n);return e.drag&&!1!==e.dragListener&&(i.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=!0===e.drag?"none":`pan-${"x"===e.drag?"y":"x"}`),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(i.tabIndex=0),i.style=r,i})(t,i,r,e),l=function(e,t,n){let i={};for(let r in e)"values"===r&&"object"==typeof e.values||ff(e[r])||(mL(r)||!0===n&&mV(r)||!t&&!mV(r)||e.draggable&&r.startsWith("onDrag"))&&(i[r]=e[r]);return i}(t,"string"==typeof e,a),u=e===iV.Fragment?{}:{...l,...o,ref:n},{children:c}=t,d=(0,iV.useMemo)(()=>ff(c)?c.get():c,[c]);return(0,iV.createElement)(e,{...u,children:d})}(e,n,(s=h.visualElement,o=(0,iV.useRef)(a),(0,iV.useInsertionEffect)(()=>{o.current=a}),l=(0,iV.useRef)(null),(0,iV.useCallback)(e=>{e&&p.onMount?.(e);let t=o.current;if("function"==typeof t)if(e){let n=t(e);"function"==typeof n&&(l.current=n)}else l.current?(l.current(),l.current=null):t(e);else t&&(t.current=e);s&&(e?s.mount(e):s.unmount())},[s])),p,d,t,i)]})}a.displayName=`motion.${"string"==typeof e?e:`create(${e.displayName??e.name??""})`}`;let s=(0,iV.forwardRef)(a);return s[mY]=e,s}("span",void 0),gn={0:{h:"5"},1:{h:"6"},2:{h:"8"}},gi={0:{pl:"1_5"},1:{pl:"2"},2:{pl:"2_5"}},gr={0:{mr:"1_5"},1:{mr:"2"},2:{mr:"2_5"}},ga={0:{ml:"0_5"},1:{ml:"1"},2:{ml:"1"}},gs={solid:{default:"gray-12",accent:"accent-9",gray:"gray-9",red:"red-9",blue:"blue-9",green:"green-9",yellow:"yellow-9",purple:"purple-9"},soft:{default:"gray-2",accent:"accent-2",gray:"gray-2",red:"red-2",blue:"blue-2",green:"green-2",yellow:"yellow-2",purple:"purple-2"}},go={default:"gray-4",accent:"accent-4",gray:"gray-4",red:"red-4",blue:"blue-4",green:"green-4",yellow:"yellow-4",purple:"purple-4"},gl={solid:{default:"contrast",gray:"white",red:"white",accent:"white",blue:"white",green:"white",yellow:"black",purple:"white"},soft:{default:"default",gray:"gray",accent:"accent",red:"red",blue:"blue",green:"green",yellow:"yellow",purple:"purple"}},gu={solid:{default:"contrast",gray:"white",accent:"white",red:"white",blue:"white",green:"white",yellow:"black",purple:"white"},soft:{default:"default",gray:"gray",accent:"accent",red:"red",blue:"blue",green:"green",yellow:"yellow",purple:"purple"}},gc={solid:{default:"default",gray:"gray",accent:"accent",red:"red",blue:"blue",green:"green",yellow:"yellow",purple:"purple"},soft:{default:"gray",gray:"gray",accent:"accent",red:"red",blue:"blue",green:"green",yellow:"yellow",purple:"purple"}},gd={solid:"solid",soft:"ghost"}
14,gh={tagBorderColor:{cssVar:"--box-shadow",value:"inset 0 0 0 1px var(--tgph-VARIABLE)"}},gp=iV.default.createContext({size:"1",color:"default",variant:"soft"}),gf=({as:e="span",size:t="1",color:n="default",variant:i="soft",className:r,style:a,...s})=>{let o,{styleProp:l,otherProps:u}=(o={props:{..."soft"===i?{tagBorderColor:go[n]}:{},style:a},cssVars:gh},iV.default.useMemo(()=>(e=>{let{cssVars:t}=e;if(!e?.props||0===Object.keys(e.props).length)return{styleProp:{},otherProps:{},interactive:!1};let{style:n={},...i}=e.props,r=n,a={},s=!1;return Object.keys(i).forEach(e=>{if(dP.includes(e)&&"object"==typeof i[e]&&null!==i[e]){let n=i[e],o={};if(Object.keys(n).forEach(i=>{let a,s=n[i];if(!s)return;let l=t?.[i];if(!l){o[i]=s;return}let u=dL(l,s),c=(a=l.cssVar,`--${dN[e]}--${a.replace(/^--/,"")}`);r=dD(r,l,u,c)}),Object.keys(o).length>0){let t=a[e]||{};Object.assign(a,{[e]:{...t,...o}})}Object.keys(n).length>Object.keys(o).length&&(s=!0);return}let n=t?.[e];if(!n)return void Object.assign(a,{[e]:i[e]});let o=i?.[e];if(!o)return void Object.assign(r,{[e]:i[e]});let l=dL(n,o);r=dD(r,n,l)}),{styleProp:r,otherProps:a,interactive:s}})(o),[o]));return(0,a6.jsx)(gp.Provider,{value:{size:t,color:n,variant:i},children:(0,a6.jsx)(sd,{as:e,align:"center",rounded:"full",display:"inline-flex",pl:gi[t].pl,backgroundColor:gs[i][n],h:gn[t].h,className:(0,aD.clsx)("tgph-tag",r),style:l,...u,...s,"data-tag":!0})})},gm=({as:e="span",maxW:t="40",overflow:n="hidden",style:i,...r})=>{let a=iV.default.useContext(gp);return(0,a6.jsx)(sf,{as:e,size:a.size,color:gu[a.variant][a.color],weight:"medium",mr:gr[a.size].mr,maxW:t,overflow:n,internal_optionalAs:!0,style:{whiteSpace:"nowrap",textOverflow:"ellipsis",...i},...r})},gg=({onClick:e,textToCopy:t,...n})=>{let i=iV.default.useContext(gp),[r,a]=iV.default.useState(!1);return iV.default.useEffect(()=>{if(r){let e=setTimeout(()=>a(!1),2e3);return()=>clearTimeout(e)}},[r]),(0,a6.jsx)(mR,{features:ge,children:(0,a6.jsx)(dE,{label:"Copy text",children:(0,a6.jsxs)(sL.Root,{onClick:n=>{e?.(n),a(!0),t&&navigator.clipboard.writeText(t),n.currentTarget?.blur()},size:i.size,color:gc[i.variant][i.color],variant:gd[i.variant],rounded:"0",position:"relative",overflow:"hidden",borderTopRightRadius:"full",borderBottomRightRadius:"full",ml:ga[i.size].ml,...n,children:[(0,a6.jsx)(sL.Icon,{as:gt,initial:!1,animate:{y:r?0:"150%",opacity:1},transition:{duration:.15,type:"spring",bounce:0},icon:dM,alt:"Copied text","aria-hidden":!r}),(0,a6.jsx)(sL.Icon,{as:gt,initial:!1,animate:{y:r?"-150%":0,opacity:1},transition:{duration:.15,type:"spring",bounce:0},icon:d_,position:"absolute",alt:"Copy text","aria-hidden":r})]})})})},gv=({...e})=>{let t=iV.default.useContext(gp);return(0,a6.jsx)(sL,{size:t.size,color:gc[t.variant][t.color],variant:gd[t.variant],icon:{icon:dR,alt:"close"},rounded:"0",borderTopRightRadius:"full",borderBottomRightRadius:"full",ml:ga[t.size].ml,...e})},gy=({icon:e,alt:t,"aria-hidden":n,...i})=>{let r=iV.default.useContext(gp);return(0,a6.jsx)(sk,{icon:e,size:r.size,color:gl[r.variant][r.color],mr:"1",...t?{alt:t}:{"aria-hidden":n},...i})},gb=({color:e="default",size:t="1",variant:n="soft",icon:i,onRemove:r,onCopy:a,textToCopy:s,textProps:o={maxW:"40"},children:l,...u})=>{let c=!!(r||a),d={...o,...c?{mr:"0"}:{}};return(0,a6.jsxs)(gf,{color:e,size:t,variant:n,...u,children:[i&&(0,a6.jsx)(gy,{...i}),(0,a6.jsx)(gm,{as:"span",...d,children:l}),r&&(0,a6.jsx)(gv,{onClick:r,icon:{icon:dR,alt:"Remove"}}),a&&(0,a6.jsx)(gg,{onClick:a,textToCopy:s})]})};Object.assign(gb,{Root:gf,Button:gv,Text:gm,Icon:gy,CopyButton:gg});var gw=e.i(418429);let gx=({tgphRef:e},t=[])=>{let[n,i]=iV.default.useState(!1);return iV.default.useEffect(()=>{if(!e.current)return i(!1);let t=e.current,n=()=>{i(t.scrollWidth>t.clientWidth)};n();let r=new ResizeObserver(n);return r.observe(t),()=>{r.disconnect()}},[e,...t]),{truncated:n}},gC=({label:e,children:t,...n})=>{let i=iV.default.useRef(null),{truncated:r}=gx({tgphRef:i},[t]),a=iV.default.useMemo(()=>"string"==typeof t?t:iV.default.isValidElement(t)?t.props.children:e,[t,e]);return(0,a6.jsx)(dE,{label:(0,a6.jsx)(sf,{as:"span",size:"1",children:a}),enabled:r,triggerRef:i,...n,children:(0,a6.jsx)(se,{children:t})})},gk=sb("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),gS=sb("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);var gT=Object.defineProperty,gA=Object.getOwnPropertyDescriptor,gE=Object.getOwnPropertyNames,gM=Object.prototype.hasOwnProperty,g_=(0,iV.createContext)({}),gR="u">typeof window?iV.useLayoutEffect:iV.useEffect,gI=(0,iV.createContext)(null),gj=(e,t,n)=>n>t?t:n<e?e:n,gV=()=>{},gO=()=>{};G.default;var gP={};function gN(e){let t;return()=>(void 0===t&&(t=e()),t)}var gL=e=>e,gD=(e,t)=>n=>t(e(n)),gF=(...e)=>e.reduce(gD),gB=(e,t,n)=>{let i=t-e;return 0===i?1:(n-e)/i},g$=class{constructor(){this.subscriptions=[]}add(e){var t;return t=this.subscriptions,-1===t.indexOf(e)&&t.push(e),()=>{var t;let n;return t=this.subscriptions,void((n=t.indexOf(e))>-1&&t.splice(n,1))}}
14notify(e,t,n){let i=this.subscriptions.length;if(i)if(1===i)this.subscriptions[0](e,t,n);else for(let r=0;r<i;r++){let i=this.subscriptions[r];i&&i(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}},gU=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function gW(e,t,n,i){return e===t&&n===i?gL:r=>0===r||1===r?r:gU(function(e,t,n,i,r){let a,s,o=0;do(a=gU(s=t+(n-t)/2,i,r)-e)>0?n=s:t=s;while(Math.abs(a)>1e-7&&++o<12)return s}(r,0,1,e,n),t,i)}var gz=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,gH=e=>t=>1-e(1-t),gK=gW(.33,1.53,.69,.99),gq=gH(gK),gY=gz(gq),gG=e=>e>=1?1:(e*=2)<1?.5*gq(e):.5*(2-2**(-10*(e-1))),gX=e=>1-Math.sin(Math.acos(e)),gZ=gH(gX),gJ=gz(gX),gQ=gW(.42,0,1,1),g0=gW(0,0,.58,1),g1=gW(.42,0,.58,1),g2=e=>Array.isArray(e)&&"number"==typeof e[0],g3={linear:gL,easeIn:gQ,easeInOut:g1,easeOut:g0,circIn:gX,circInOut:gJ,circOut:gZ,backIn:gq,backInOut:gY,backOut:gK,anticipate:gG},g5=e=>{if(g2(e)){gO(4===e.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");let[t,n,i,r]=e;return gW(t,n,i,r)}return"string"==typeof e?(gO(void 0!==g3[e],`Invalid easing type '${e}'`,"invalid-easing-type"),g3[e]):e},g4=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function g9(e,t){let n=!1,i=!0,r={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,s=g4.reduce((e,n)=>(e[n]=function(e,t){let n=new Set,i=new Set,r=!1,a=!1,s=new WeakSet,o={delta:0,timestamp:0,isProcessing:!1},l=0;function u(t){s.has(t)&&(c.schedule(t),e()),l++,t(o)}let c={schedule:(e,t=!1,a=!1)=>{let o=a&&r?n:i;return t&&s.add(e),o.add(e),e},cancel:e=>{i.delete(e),s.delete(e)},process:e=>{if(o=e,r){a=!0;return}r=!0;let s=n;n=i,i=s,n.forEach(u),t,l=0,n.clear(),r=!1,a&&(a=!1,c.process(e))}};return c}(a,t?n:void 0),e),{}),{setup:o,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:h,render:p,postRender:f}=s,m=()=>{let a=gP.useManualTiming,s=a?r.timestamp:performance.now();n=!1,a||(r.delta=i?1e3/60:Math.max(Math.min(s-r.timestamp,40),1)),r.timestamp=s,r.isProcessing=!0,o.process(r),l.process(r),u.process(r),c.process(r),d.process(r),h.process(r),p.process(r),f.process(r),r.isProcessing=!1,n&&t&&(i=!1,e(m))};return{schedule:g4.reduce((t,a)=>{let o=s[a];return t[a]=(t,a=!1,s=!1)=>(n||(n=!0,i=!0,r.isProcessing||e(m)),o.schedule(t,a,s)),t},{}),cancel:e=>{for(let t=0;t<g4.length;t++)s[g4[t]].cancel(e)},state:r,steps:s}}var g6,g7,{schedule:g8,cancel:ve,state:vt}=g9("u">typeof requestAnimationFrame?requestAnimationFrame:gL,!0);function vn(){g7=void 0}var vi={now:()=>(void 0===g7&&vi.set(vt.isProcessing||gP.useManualTiming?vt.timestamp:performance.now()),g7),set:e=>{g7=e,queueMicrotask(vn)}},vr={mainThread:0,waapi:0},va=e=>t=>"string"==typeof t&&t.startsWith(e),vs=va("--"),vo=va("var(--"),vl=e=>!!vo(e)&&vu.test(e.split("/*")[0].trim()),vu=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function vc(e){return"string"==typeof e&&e.split("/*")[0].includes("var(--")}var vd={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},vh={...vd,transform:e=>gj(0,1,e)},vp={...vd,default:1},vf=e=>Math.round(1e5*e)/1e5,vm=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,vg=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,vv=(e,t)=>n=>!!("string"==typeof n&&vg.test(n)&&n.startsWith(e)||t&&null!=n&&Object.prototype.hasOwnProperty.call(n,t)),vy=(e,t,n)=>i=>{if("string"!=typeof i)return i;let[r,a,s,o]=i.match(vm);return{[e]:parseFloat(r),[t]:parseFloat(a),[n]:parseFloat(s),alpha:void 0===o?1:parseFloat(o)}},vb={...vd,transform:e=>Math.round(gj(0,255,e))},vw={test:vv("rgb","red"),parse:vy("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:i=1})=>"rgba("+vb.transform(e)+", "+vb.transform(t)+", "+vb.transform(n)+", "+vf(vh.transform(i))+")"},vx={test:vv("#"),parse:function(e){let t="",n="",i="",r="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),i=e.substring(5,7),r=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),i=e.substring(3,4),r=e.substring(4,5),t+=t,n+=n,i+=i,r+=r),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(i,16),alph
14a:r?parseInt(r,16)/255:1}},transform:vw.transform},vC=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),vk=vC("deg"),vS=vC("%"),vT=vC("px"),vA=vC("vh"),vE=vC("vw"),vM={...vS,parse:e=>vS.parse(e)/100,transform:e=>vS.transform(100*e)},v_={test:vv("hsl","hue"),parse:vy("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:i=1})=>"hsla("+Math.round(e)+", "+vS.transform(vf(t))+", "+vS.transform(vf(n))+", "+vf(vh.transform(i))+")"},vR={test:e=>vw.test(e)||vx.test(e)||v_.test(e),parse:e=>vw.test(e)?vw.parse(e):v_.test(e)?v_.parse(e):vx.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?vw.transform(e):v_.transform(e),getAnimatableNone:e=>{let t=vR.parse(e);return t.alpha=0,vR.transform(t)}},vI=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,vj="number",vV="color",vO=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function vP(e){let t=e.toString(),n=[],i={color:[],number:[],var:[]},r=[],a=0;return{values:n,split:t.replace(vO,e=>(vR.test(e)?(i.color.push(a),r.push(vV),n.push(vR.parse(e))):e.startsWith("var(")?(i.var.push(a),r.push("var"),n.push(e)):(i.number.push(a),r.push(vj),n.push(parseFloat(e))),++a,"${}")).split("${}"),indexes:i,types:r}}function vN({split:e,types:t}){let n=e.length;return i=>{let r="";for(let a=0;a<n;a++)if(r+=e[a],void 0!==i[a]){let e=t[a];e===vj?r+=vf(i[a]):e===vV?r+=vR.transform(i[a]):r+=i[a]}return r}}var vL={test:function(e){return isNaN(e)&&"string"==typeof e&&(e.match(vm)?.length||0)+(e.match(vI)?.length||0)>0},parse:function(e){return vP(e).values},createTransformer:function(e){return vN(vP(e))},getAnimatableNone:function(e){let t=vP(e);return vN(t)(t.values.map((e,n)=>{var i;return i=t.split[n],"number"==typeof e?i?.trim().endsWith("/")?e:0:"number"==typeof e?0:vR.test(e)?vR.getAnimatableNone(e):e}))}};function vD(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function vF(e,t){return n=>n>0?t:e}var vB=(e,t,n)=>e+(t-e)*n,v$=(e,t,n)=>{let i=e*e,r=n*(t*t-i)+i;return r<0?0:Math.sqrt(r)},vU=[vx,vw,v_];function vW(e){let t=vU.find(t=>t.test(e));if(gV(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===v_&&(n=function({hue:e,saturation:t,lightness:n,alpha:i}){e/=360,t/=100,n/=100;let r=0,a=0,s=0;if(t){let i=n<.5?n*(1+t):n+t-n*t,o=2*n-i;r=vD(o,i,e+1/3),a=vD(o,i,e),s=vD(o,i,e-1/3)}else r=a=s=n;return{red:Math.round(255*r),green:Math.round(255*a),blue:Math.round(255*s),alpha:i}}(n)),n}var vz=(e,t)=>{let n=vW(e),i=vW(t);if(!n||!i)return vF(e,t);let r={...n};return e=>(r.red=v$(n.red,i.red,e),r.green=v$(n.green,i.green,e),r.blue=v$(n.blue,i.blue,e),r.alpha=vB(n.alpha,i.alpha,e),vw.transform(r))},vH=new Set(["none","hidden"]);function vK(e,t){return n=>vB(e,t,n)}function vq(e){return"number"==typeof e?vK:"string"==typeof e?vl(e)?vF:vR.test(e)?vz:vX:Array.isArray(e)?vY:"object"==typeof e?vR.test(e)?vz:vG:vF}function vY(e,t){let n=[...e],i=n.length,r=e.map((e,n)=>vq(e)(e,t[n]));return e=>{for(let t=0;t<i;t++)n[t]=r[t](e);return n}}function vG(e,t){let n={...e,...t},i={};for(let r in n)void 0!==e[r]&&void 0!==t[r]&&(i[r]=vq(e[r])(e[r],t[r]));return e=>{for(let t in i)n[t]=i[t](e);return n}}var vX=(e,t)=>{let n=vL.createTransformer(t),i=vP(e),r=vP(t);return i.indexes.var.length===r.indexes.var.length&&i.indexes.color.length===r.indexes.color.length&&i.indexes.number.length>=r.indexes.number.length?vH.has(e)&&!r.values.length||vH.has(t)&&!i.values.length?vH.has(e)?n=>n<=0?e:t:n=>n>=1?t:e:gF(vY(function(e,t){let n=[],i={color:0,var:0,number:0};for(let r=0;r<t.values.length;r++){let a=t.types[r],s=e.indexes[a][i[a]];n[r]=e.values[s]??0,i[a]++}return n}(i,r),r.values),n):(gV(!0,`Complex values '${e}' and '${t}
14' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),vF(e,t))};function vZ(e,t,n){return"number"==typeof e&&"number"==typeof t&&"number"==typeof n?vB(e,t,n):vq(e)(e,t)}var vJ=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>g8.update(t,e),stop:()=>ve(t),now:()=>vt.isProcessing?vt.timestamp:vi.now()}},vQ=(e,t,n=10)=>{let i="",r=Math.max(Math.round(t/n),2);for(let t=0;t<r;t++)i+=Math.round(1e4*e(t/(r-1)))/1e4+", ";return`linear(${i.substring(0,i.length-2)})`};function v0(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}var v1=.01,v2=2,v3=.005,v5=.5;function v4(e,t){return e*Math.sqrt(1-t*t)}var v9=["duration","bounce"],v6=["stiffness","damping","mass"];function v7(e,t){return t.some(t=>void 0!==e[t])}function v8(e=.3,t=.3){let n,i,r,a,s,o,l="object"==typeof e?e:{visualDuration:e,keyframes:[0,1],bounce:t},{restSpeed:u,restDelta:c}=l,d=l.keyframes[0],h=l.keyframes[l.keyframes.length-1],p={done:!1,value:d},{stiffness:f,damping:m,mass:g,duration:v,velocity:y,isResolvedFromDuration:b}=function(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!v7(e,v6)&&v7(e,v9))if(t.velocity=0,e.visualDuration){let n=2*Math.PI/(1.2*e.visualDuration),i=n*n,r=2*gj(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:1,stiffness:i,damping:r}}else{let n=function({duration:e=800,bounce:t=.3,velocity:n=0,mass:i=1}){let r,a;gV(e<=1e4,"Spring duration must be 10 seconds or less","spring-duration-limit");let s=1-t;s=gj(.05,1,s),e=gj(.01,10,e/1e3),s<1?(r=t=>{let i=t*s,r=i*e;return .001-(i-n)/v4(t,s)*Math.exp(-r)},a=t=>{let i=t*s*e,a=s**2*t**2*e,o=Math.exp(-i),l=v4(t**2,s);return(-r(t)+.001>0?-1:1)*((i*n+n-a)*o)/l}):(r=t=>-.001+Math.exp(-t*e)*((t-n)*e+1),a=t=>e*e*(n-t)*Math.exp(-t*e));let o=function(e,t,n){let i=n;for(let n=1;n<12;n++)i-=e(i)/t(i);return i}(r,a,5/e);if(e*=1e3,isNaN(o))return{stiffness:100,damping:10,duration:e};{let t=o**2*i;return{stiffness:t,damping:2*s*Math.sqrt(i*t),duration:e}}}({...e,velocity:0});(t={...t,...n,mass:1}).isResolvedFromDuration=!0}return t}({...l,velocity:-((l.velocity||0)/1e3)}),w=y||0,x=m/(2*Math.sqrt(f*g)),C=h-d,k=Math.sqrt(f/g)/1e3,S=5>Math.abs(C);if(u||=S?v1:v2,c||=S?v3:v5,x<1)r=v4(k,x),a=(w+x*k*C)/r,n=e=>h-Math.exp(-x*k*e)*(a*Math.sin(r*e)+C*Math.cos(r*e)),s=x*k*a+C*r,o=x*k*C-a*r,i=e=>Math.exp(-x*k*e)*(s*Math.sin(r*e)+o*Math.cos(r*e));else if(1===x){n=e=>h-Math.exp(-k*e)*(C+(w+k*C)*e);let e=w+k*C;i=t=>Math.exp(-k*t)*(k*e*t-w)}else{let e=k*Math.sqrt(x*x-1);n=t=>{let n=Math.exp(-x*k*t),i=Math.min(e*t,300);return h-n*((w+x*k*C)*Math.sinh(i)+e*C*Math.cosh(i))/e};let t=(w+x*k*C)/e,r=x*k*t-C*e,a=x*k*C-t*e;i=t=>{let n=Math.exp(-x*k*t),i=Math.min(e*t,300);return n*(r*Math.sinh(i)+a*Math.cosh(i))}}let T={calculatedDuration:b&&v||null,velocity:e=>1e3*i(e),next:e=>{if(!b&&x<1){let t=Math.exp(-x*k*e),n=Math.sin(r*e),i=Math.cos(r*e),l=h-t*(a*n+C*i);return p.done=Math.abs(t*(s*n+o*i)*1e3)<=u&&Math.abs(h-l)<=c,p.value=p.done?h:l,p}let t=n(e);return b?p.done=e>=v:p.done=Math.abs(1e3*i(e))<=u&&Math.abs(h-t)<=c,p.value=p.done?h:t,p},toString:()=>{let e=Math.min(v0(T),2e4),t=vQ(t=>T.next(e*t).value,e,30);return e+"ms "+t},toTransition:()=>{}};return T}function ye(e,t,n){var i,r;let a=Math.max(t-5,0);return i=n-e(a),(r=t-a)?1e3/r*i:0}function yt({keyframes:e,velocity:t=0,power:n=.8,timeConstant:i=325,bounceDamping:r=10,bounceStiffness:a=500,modifyTarget:s,min:o,max:l,restDelta:u=.5,restSpeed:c}){let d=e[0],h={done:!1,value:d},p=n*t,f=d+p,m=void 0===s?f:s(f);m!==f&&(p=m-d);let g=e=>-p*Math.exp(-e/i),v=e=>m+g(e),y=e=>{let t=g(e),n=v(e);h.done=Math.abs(t)<=u,h.value=h.done?m:n},b,w,x=e=>{let t,n;t=h.value,(void 0!==o&&t<o||void 0!==l&&t>l)&&(b=e,w=v8({keyframes:[h.value,(n=h.value,void 0===o?l:void 0===l||Math.abs(o-n)<Math.abs(l-n)?o:l)],velocity:ye(v,e,h.value),damping:r,stiffness:a,restDelta:u,restSpeed:c}))};return x(0),{calculatedDuration:null,next:e=>{let t=!1;return w||void 0!==b||(t=!0,y(e),x(e)),void 0!==b&&e>=b?w.next(e-b):(t||y(e),h)}}}function yn({duration:e=300,keyframes:t,times:n,ease:i="easeInOut"}){var r;let a,s=Array.isArray(i)&&"number"!=typeof i[0]?i.map(g5):g5(i),o={done:!1,value:t[0]},l=function(e,t,{clamp:n=!0,ease:i,mixer:r}={}){let a=e.length;if(gO(a===t.length,"Both input and output ranges must be the same length","range-length"),1===a)return()=>t[0];if(2===a&&t[0]===t[1])return()=>t[1];let s=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let o=function(e,t,n){let i=[],r=n||gP.mix||vZ,a=e.length-1;for(let n=0;n<a;n++){let a=r(e[n],e[n+1]);t&&(a=gF(Array.isArray(t)?t[n]||gL:t,a)),i.push(a)}return i}(t,i,r),l=o.length,u=n=>{if(s&&n<e[0])return t[0];let i=0;if(l>1)for(;i<e.length-2&&!(n<e[i+1]);i++);let r=gB(e[i],e[i+1],n);return o[i](r)};return n?t=>u(gj(e[0],e[a-1],t)):u}((r=n&&n.length===t.length?n:(function(e,t){let n=e[e.length-1];for(let i=1;i<=t;i++){let r=gB(0,t,i);e.push(vB(n,1,r))}}(a=[0],t.length-1),a),r.map(t=>t*e)),t,{ease:Array.isArray(s)?s:t.map(()=>s||g1).splice(0,t.length-1)});return{calculatedDuration:e,next:t=>(o.value=l(t),o.done=t>=e,o)}}v8.applyToOptions=e=>{let t=function(e,t=100,n){let i=n({...e,keyframes:[0,t]}),r=Math.min(v0(i),2e4);return{type:"keyframes",ease:e=>i.next(r*e).value/t,duration:r/1e3}}(e,100,v8);return e.ease=t.ease,e.duration=1e3*t.duration,e.type="keyframes",e};var yi=e=>null!==e;function yr(e,{repeat:t,repeatType:n="loop"},i,r=1){let a=e.filter(yi),s=r<0||t&&"loop"!==n&&t%2==1?0:a.length-1;return s&&void 0!==i?i:a[s]}var ya={decay:yt,inertia:yt,tween:yn,keyframes:yn,spring:v8};function ys(e){"string"==typeof e.type&&(e.type=ya[e.type])}var yo=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}},yl=e=>e/100,yu=class extends yo{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==vi.now()&&this.tick(vi.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},vr.mainThread++,this.options=e,this.initAnimation(),this.play(),!1===e.autoplay&&this.pause()}initAnimation(){let{options:e}=this;ys(e);let{type:t=yn,repeat:n=0,repeatDelay:i=0,repeatType:r,velocity:a=0}=e,{keyframes:s}=e,o=t||yn;o!==yn&&"number"!=typeof s[0]&&(this.mixKeyframes=gF(yl,vZ(s[0],s[1])),s=[0,100]);let l=o({...e,keyframes:s}
14);"mirror"===r&&(this.mirroredGenerator=o({...e,keyframes:[...s].reverse(),velocity:-a})),null===l.calculatedDuration&&(l.calculatedDuration=v0(l));let{calculatedDuration:u}=l;this.calculatedDuration=u,this.resolvedDuration=u+i,this.totalDuration=this.resolvedDuration*(n+1)-i,this.generator=l}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;null===this.holdTime?this.currentTime=t:this.currentTime=this.holdTime}tick(e,t=!1){let n,{generator:i,totalDuration:r,mixKeyframes:a,mirroredGenerator:s,resolvedDuration:o,calculatedDuration:l}=this;if(null===this.startTime)return i.next(0);let{delay:u=0,keyframes:c,repeat:d,repeatType:h,repeatDelay:p,type:f,onUpdate:m,finalKeyframe:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let v=this.currentTime-u*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?v<0:v>r;this.currentTime=Math.max(v,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=r);let b=this.currentTime,w=i;if(d){let e=Math.min(this.currentTime,r)/o,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,(t=Math.min(t,d+1))%2&&("reverse"===h?(n=1-n,p&&(n-=p/o)):"mirror"===h&&(w=s)),b=gj(0,1,n)*o}y?(this.delayState.value=c[0],n=this.delayState):n=w.next(b),a&&!y&&(n.value=a(n.value));let{done:x}=n;y||null===l||(x=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let C=null===this.holdTime&&("finished"===this.state||"running"===this.state&&x);return C&&f!==yt&&(n.value=yr(c,this.options,g,this.speed)),m&&m(n.value),C&&this.finish(),n}then(e,t){return this.finished.then(e,t)}get duration(){return this.calculatedDuration/1e3}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+e/1e3}get time(){return this.currentTime/1e3}set time(e){e*=1e3,this.currentTime=e,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){let e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);let t=this.generator.next(e).value;return ye(e=>this.generator.next(e).value,e,t)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(vi.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=this.currentTime/1e3)}play(){if(this.isStopped)return;let{driver:e=vJ,startTime:t}=this.options;this.driver||=e(e=>this.tick(e)),this.options.onPlay?.();let n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null===this.holdTime?this.startTime||=t??n:this.startTime=n-this.holdTime,"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(vi.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null,vr.mainThread--}stopDriver(){this.driver&&=void this.driver.stop()}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}},yc=e=>180*e/Math.PI,yd=e=>yp(yc(Math.atan2(e[1],e[0]))),yh={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:yd,rotateZ:yd,skewX:e=>yc(Math.atan(e[1])),skewY:e=>yc(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},yp=e=>((e%=360)<0&&(e+=360),e),yf=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),ym=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),yg={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:yf,scaleY:ym,scale:e=>(yf(e)+ym(e))/2,rotateX:e=>yp(yc(Math.atan2(e[6],e[5]))),rotateY:e=>yp(yc(Math.atan2(-e[2],e[0]))),rotateZ:yd,rotate:yd,skewX:e=>yc(Math.atan(e[4])),skewY:e=>yc(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function yv(e){return+!!e.includes("scale")}function yy(e,t){if(!e||"none"===e)return yv(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),i,r;if(n)i=yg,r=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=yh,r=t}if(!r)return yv(t);let a=i[t],s=r[1].split(",").map(yb);return"function"==typeof a?a(s):s[a]}function yb(e){return parseFloat(e.trim())}var yw=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],yx=new Set(yw),yC=e=>e===vd||e===vT,yk=new Set(["x","y","z"]),yS=yw.filter(e=>!yk.has(e)),yT={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:i})=>{let r=e.max-e.min;return"border-box"===i?r:r-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:i})=>{let r=e.max-e.min;return"border-box"===i?r:r-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>yy(t,"x"),y:(e,{transform:t})=>yy(t,"y")};
14yT.translateX=yT.x,yT.translateY=yT.y;var yA=new Set,yE=!1,yM=!1,y_=!1;function yR(){if(yM){let e=Array.from(yA).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t,i=(t=[],yS.forEach(n=>{let i=e.getValue(n);void 0!==i&&(t.push([n,i.get()]),i.set(+!!n.startsWith("scale")))}),t);i.length&&(n.set(e,i),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)})}yM=!1,yE=!1,yA.forEach(e=>e.complete(y_)),yA.clear()}function yI(){yA.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(yM=!0)})}var yj=class{constructor(e,t,n,i,r,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=i,this.element=r,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(yA.add(this),yE||(yE=!0,g8.read(yI),g8.resolveKeyframes(yR))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:i}=this;if(null===e[0]){let r=i?.get(),a=e[e.length-1];if(void 0!==r)e[0]=r;else if(n&&t){let i=n.readValue(t,a);null!=i&&(e[0]=i)}void 0===e[0]&&(e[0]=a),i&&void 0===r&&i.set(e[0])}for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),yA.delete(this)}cancel(){"scheduled"===this.state&&(yA.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}};function yV(e,t,n){t.startsWith("--")?e.style.setProperty(t,n):e.style[t]=n}var yO={};function yP(e,t){let n=gN(e);return()=>yO[t]??n()}var yN=yP(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),yL=yP(()=>{try{document.createElement("div").animate({opacity:0}
14,{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),yD=([e,t,n,i])=>`cubic-bezier(${e}, ${t}, ${n}, ${i})`,yF={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:yD([0,.65,.55,1]),circOut:yD([.55,0,1,.45]),backIn:yD([.31,.01,.66,-.59]),backOut:yD([.33,1.53,.69,.99])};function yB(e){return"function"==typeof e&&"applyToOptions"in e}var y$=class extends yo{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:i,pseudoElement:r,allowFlatten:a=!1,finalKeyframe:s,onComplete:o}=e;this.isPseudoElement=!!r,this.allowFlatten=a,this.options=e,gO("string"!=typeof e.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");let l=function({type:e,...t}){return yB(e)&&yL()?e.applyToOptions(t):(t.duration??=300,t.ease??="easeOut",t)}(e);this.animation=function(e,t,n,{delay:i=0,duration:r=300,repeat:a=0,repeatType:s="loop",ease:o="easeOut",times:l}={},u){let c={[t]:n};l&&(c.offset=l);let d=function e(t,n){if(t)return"function"==typeof t?yL()?vQ(t,n):"ease-out":g2(t)?yD(t):Array.isArray(t)?t.map(t=>e(t,n)||yF.easeOut):yF[t]}(o,r);Array.isArray(d)&&(c.easing=d);let h={delay:i,duration:r,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:a+1,direction:"reverse"===s?"alternate":"normal"};u&&(h.pseudoElement=u);let p=e.animate(c,h);return p}(t,n,i,l,r),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){let e=yr(i,this.options,s,this.speed);this.updateMotionValue&&this.updateMotionValue(e),yV(t,n,e),this.animation.cancel()}o?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;"idle"===e||"finished"===e||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){return Number(this.animation.effect?.getComputedTiming?.().duration||0)/1e3}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+e/1e3}get time(){return(Number(this.animation.currentTime)||0)/1e3}set time(e){let t=null!==this.finishedTime;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=1e3*e,t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return null===this.finishedTime?this.animation.playState:"finished"}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:t,rangeEnd:n,observe:i}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&yN()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),gL):i(this)}},yU={anticipate:gG,backInOut:gY,circInOut:gJ},yW=class extends y${constructor(e){(function(e){"string"==typeof e.ease&&e.ease in yU&&(e.ease=yU[e.ease])})(e),ys(e),super(e),void 0!==e.startTime&&!1!==e.autoplay&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:i,element:r,...a}=this.options;if(!t)return;if(void 0!==e)return void t.set(e);let s=new yu({...a,autoplay:!1}),o=Math.max(10,vi.now()-this.startTime),l=gj(0,10,o-10),u=s.sample(o).value,{name:c}=this.options;r&&c&&yV(r,c,u),t.setWithVelocity(s.sample(Math.max(0,o-l)).value,u,l),s.stop()}},yz=(e,t)=>"zIndex"!==t&&!!("number"==typeof e||Array.isArray(e)||"string"==typeof e&&(vL.test(e)||"0"===e)&&!e.startsWith("url("));function yH(e){e.duration=0,e.type="keyframes"}var yK=new Set(["opacity","clipPath","filter","transform"]),yq=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/,yY=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),yG=gN(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),yX=class extends yo{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:a="loop",keyframes:s,name:o,motionValue:l,element:u,...c}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=vi.now();let d={autoplay:e,delay:t,type:n,repeat:i,repeatDelay:r,repeatType:a,name:o,motionValue:l,element:u,...c};this.keyframeResolver=new(u?.KeyframeResolver||yj)(s,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),o,l,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,i){this.keyframeResolver=void 0;let{name:r,type:a,velocity:s,delay:o,isHandoff:l,onUpdate:u}=n;this.resolvedAt=vi.now();let c=!0;(function(e,t,n,i){let r=e[0];if(null===r)return!1;if("display"===t||"visibility"===t)return!0;let a=e[e.length-1],s=yz(r,t),o=yz(a,t);return gV(s===o,`You are trying to animate ${t} from "${r}" to "${a}". "${s?a:r}" is not an animatable value.`,"value-not-animatable"),!!s&&!!o&&(function(e){let t=e[0];if(1===e.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}(e)||("spring"===n||yB(n))&&i)})(e,r,a,s)||(c=!1,(gP.instantAnimations||!o)&&u?.(yr(e,n,t)),e[0]=e[e.length-1],yH(n),n.repeat=0);let d={startTime:i?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},h=c&&!l&&function(e){let{motionValue:t,name:n,repeatDelay:i,repeatType:r,damping:a,type:s,keyframes:o}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;
14let{onUpdate:l,transformTemplate:u}=t.owner.getProps();return yG()&&n&&(yK.has(n)||yY.has(n)&&function(e){for(let t=0;t<e.length;t++)if("string"==typeof e[t]&&yq.test(e[t]))return!0;return!1}(o))&&("transform"!==n||!u)&&!l&&!i&&"mirror"!==r&&0!==a&&"inertia"!==s}(d),p=d.motionValue?.owner?.current,f;if(h)try{f=new yW({...d,element:p})}catch{f=new yu(d)}else f=new yu(d);f.finished.then(()=>{this.notifyFinished()}).catch(gL),this.pendingTimeline&&=void(this.stopTimeline=f.attachTimeline(this.pendingTimeline)),this._animation=f}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),y_=!0,yI(),yR(),y_=!1),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}};function yZ(e,t,n,i=0,r=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),s=e.size,o=(s-1)*i;return"function"==typeof n?n(a,s):1===r?a*i:o-a*i}var yJ=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u,yQ={type:"spring",stiffness:500,damping:25,restSpeed:10},y0={type:"keyframes",duration:.8},y1={type:"keyframes",ease:[.25,.1,.35,1],duration:.3};function y2(e,t){if(e?.inherit&&t){let{inherit:n,...i}=e;return{...t,...i}}return e}function y3(e,t){let n=e?.[t]??e?.default??e;return n===e?n:y2(n,e)}var y5=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]),y4=(e,t,n,i={},r,a)=>s=>{let o=y3(i,e)||{},l=o.delay||i.delay||0,{elapsed:u=0}=i;u-=1e3*l;let c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...o,delay:-u,onUpdate:e=>{t.set(e),o.onUpdate&&o.onUpdate(e)},onComplete:()=>{s(),o.onComplete&&o.onComplete()},name:e,motionValue:t,element:a?void 0:r};(function(e){for(let t in e)if(!y5.has(t))return!0;return!1})(o)||Object.assign(c,((e,{keyframes:t})=>t.length>2?y0:yx.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:yQ:y1)(e,c)),c.duration&&=1e3*c.duration,c.repeatDelay&&=1e3*c.repeatDelay,void 0!==c.from&&(c.keyframes[0]=c.from);let d=!1;if(!1!==c.type&&(0!==c.duration||c.repeatDelay)||(yH(c),0===c.delay&&(d=!0)),(gP.instantAnimations||gP.skipAnimations||r?.shouldSkipAnimations)&&(d=!0,yH(c),c.delay=0),c.allowFlatten=!o.type&&!o.ease,d&&!a&&void 0!==t.get()){let e=yr(c.keyframes,o);if(void 0!==e)return void g8.update(()=>{c.onUpdate(e),c.onComplete()})}return o.isSync?new yu(c):new yX(c)};function y9(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function y6(e,t,n,i){if("function"==typeof t){let[r,a]=y9(i);t=t(void 0===n?e.custom:n,r,a)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){let[r,a]=y9(i);t=t(void 0===n?e.custom:n,r,a)}return t}function y7(e,t,n){let i=e.getProps();return y6(i,t,void 0===n?i.custom:n,e)}var y8=new Set(["width","height","top","left","right","bottom",...yw]),be=void 0,bt=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=vi.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=vi.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=!isNaN(parseFloat(this.current)))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new g$);let n=this.events[e].add(t);return"change"===e?()=>{n(),g8.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}
14setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||=new Set,this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return be&&be.push(this),this.current}getPrevious(){return this.prev}getVelocity(){var e;let t=vi.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;let n=Math.min(this.updatedAt-this.prevUpdatedAt,30);return e=parseFloat(this.current)-parseFloat(this.prevFrameValue),n?1e3/n*e:0}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function bn(e,t){return new bt(e,t)}var bi=e=>Array.isArray(e),br=e=>!!(e&&e.getVelocity);function ba(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var bs="data-"+ba("framerAppearId");function bo(e,t,{delay:n=0,transitionOverride:i,type:r}={}){let{transition:a,transitionEnd:s,...o}=t,l=e.getDefaultTransition();a=a?y2(a,l):l;let u=a?.reduceMotion;i&&(a=i);let c=[],d=r&&e.animationState&&e.animationState.getState()[r];for(let t in o){let i=e.getValue(t,e.latestValues[t]??null),r=o[t];if(void 0===r||d&&function({protectedKeys:e,needsAnimating:t},n){let i=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,i}(d,t))continue;let s={delay:n,...y3(a||{},t)},l=i.get();if(void 0!==l&&!i.isAnimating()&&!Array.isArray(r)&&r===l&&!s.velocity){g8.update(()=>i.set(r));continue}let h=!1;if(window.MotionHandoffAnimation){let n=e.props[bs];if(n){let e=window.MotionHandoffAnimation(n,t,g8);null!==e&&(s.startTime=e,h=!0)}}!function(e,t){let n=e.getValue("willChange");if(br(n)&&n.add)return n.add(t);if(!n&&gP.WillChange){let n=new gP.WillChange("auto");e.addValue("willChange",n),n.add(t)}}(e,t);let p=u??e.shouldReduceMotion;i.start(y4(t,i,r,p&&y8.has(t)?{type:!1}:s,e,h));let f=i.animation;f&&c.push(f)}if(s){let t=()=>g8.update(()=>{s&&function(e,t){let{transitionEnd:n={},transition:i={},...r}=y7(e,t)||{};for(let t in r={...r,...n}){var a,s;s=bi(a=r[t])?a[a.length-1]||0:a,e.hasValue(t)?e.getValue(t).set(s):e.addValue(t,bn(s))}}(e,s)});c.length?Promise.all(c).then(t):t()}return c}function bl(e,t,n={}){let i=y7(e,t,"exit"===n.type?e.presenceContext?.custom:void 0),{transition:r=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(r=n.transitionOverride);let a=i?()=>Promise.all(bo(e,i,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(i=0)=>{let{delayChildren:a=0,staggerChildren:s,staggerDirection:o}=r;return function(e,t,n=0,i=0,r=0,a=1,s){let o=[];for(let l of e.variantChildren)l.notify("AnimationStart",t),o.push(bl(l,t,{...s,delay:n+("function"==typeof i?0:i)+yZ(e.variantChildren,l,i,r,a)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(o)}(e,t,i,a,s,o,n)}:()=>Promise.resolve(),{when:o}=r;if(!o)return Promise.all([a(),s(n.delay)]);{let[e,t]="beforeChildren"===o?[a,s]:[s,a];return e().then(()=>t())}}var bu=e=>t=>t.test(e),bc=[vd,vT,vS,vk,vE,vA,{test:e=>"auto"===e,parse:e=>e}],bd=e=>
14bc.find(bu(e)),bh=new Set(["brightness","contrast","saturate","opacity"]);function bp(e){let[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;let[i]=n.match(vm)||[];if(!i)return e;let r=n.replace(i,""),a=+!!bh.has(t);return i!==n&&(a*=100),t+"("+a+r+")"}var bf=/\b([a-z-]*)\(.*?\)/gu,bm={...vL,getAnimatableNone:e=>{let t=e.match(bf);return t?t.map(bp).join(" "):e}},bg={...vL,getAnimatableNone:e=>{let t=vL.parse(e);return vL.createTransformer(e)(t.map(e=>"number"==typeof e?0:"object"==typeof e?{...e,alpha:1}:e))}},bv={...vd,transform:Math.round},by={borderWidth:vT,borderTopWidth:vT,borderRightWidth:vT,borderBottomWidth:vT,borderLeftWidth:vT,borderRadius:vT,borderTopLeftRadius:vT,borderTopRightRadius:vT,borderBottomRightRadius:vT,borderBottomLeftRadius:vT,width:vT,maxWidth:vT,height:vT,maxHeight:vT,top:vT,right:vT,bottom:vT,left:vT,inset:vT,insetBlock:vT,insetBlockStart:vT,insetBlockEnd:vT,insetInline:vT,insetInlineStart:vT,insetInlineEnd:vT,padding:vT,paddingTop:vT,paddingRight:vT,paddingBottom:vT,paddingLeft:vT,paddingBlock:vT,paddingBlockStart:vT,paddingBlockEnd:vT,paddingInline:vT,paddingInlineStart:vT,paddingInlineEnd:vT,margin:vT,marginTop:vT,marginRight:vT,marginBottom:vT,marginLeft:vT,marginBlock:vT,marginBlockStart:vT,marginBlockEnd:vT,marginInline:vT,marginInlineStart:vT,marginInlineEnd:vT,fontSize:vT,backgroundPositionX:vT,backgroundPositionY:vT,rotate:vk,rotateX:vk,rotateY:vk,rotateZ:vk,scale:vp,scaleX:vp,scaleY:vp,scaleZ:vp,skew:vk,skewX:vk,skewY:vk,distance:vT,translateX:vT,translateY:vT,translateZ:vT,x:vT,y:vT,z:vT,perspective:vT,transformPerspective:vT,opacity:vh,originX:vM,originY:vM,originZ:vT,zIndex:bv,fillOpacity:vh,strokeOpacity:vh,numOctaves:bv},bb={...by,color:vR,backgroundColor:vR,outlineColor:vR,fill:vR,stroke:vR,borderColor:vR,borderTopColor:vR,borderRightColor:vR,borderBottomColor:vR,borderLeftColor:vR,filter:bm,WebkitFilter:bm,mask:bg,WebkitMask:bg},bw=e=>bb[e],bx=new Set([bm,bg]);function bC(e,t){let n=bw(e);return bx.has(n)||(n=vL),n.getAnimatableNone?n.getAnimatableNone(t):void 0}var bk=new Set(["auto","none","0"]),bS=class extends yj{constructor(e,t,n,i,r){super(e,t,n,i,r,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let i=e[n];if("string"==typeof i&&vl(i=i.trim())){let r=function e(t,n,i=1){gO(i<=4,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");let[r,a]=function(e){let t=yJ.exec(e);if(!t)return[,];let[,n,i,r]=t;return[`--${n??i}`,r]}(t);if(!r)return;let s=window.getComputedStyle(n).getPropertyValue(r);if(s){let e=s.trim();return/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e)?parseFloat(e):e}return vl(a)?e(a,n,i+1):a}(i,t.current);void 0!==r&&(e[n]=r),n===e.length-1&&(this.finalKeyframe=i)}}if(this.resolveNoneKeyframes(),!y8.has(n)||2!==e.length)return;let[i,r]=e,a=bd(i),s=bd(r);if(vc(i)!==vc(r)&&yT[n]){this.needsMeasurement=!0;return}if(a!==s)if(yC(a)&&yC(s))for(let t=0;t<e.length;t++){let n=e[t];"string"==typeof n&&(e[t]=parseFloat(n))}else yT[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(null===e[t]||function(e){return"number"==typeof e?0===e:null===e||"none"===e||"0"===e||/^0[^.\s]+$/u.test(e)}(e[t]))&&n.push(t);n.length&&function(e,t,n){let i=0,r;for(;i<e.length&&!r;){let t=e[i];"string"==typeof t&&!bk.has(t)&&vP(t).values.length&&(r=e[i]),i++}if(r&&n)for(let i of t)e[i]=bC(n,r)}(e,n,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=yT[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let i=t[t.length-1];void 0!==i&&e.getValue(n,i).jump(i,!1)}measureEndState(){let{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;let i=e.getValue(t);i&&i.jump(this.measuredOrigin,!1);let r=n.length-1,a=n[r];n[r]=yT[t](e.measureViewportBox(),window.getComputedStyle(e.current)),null!==a&&void 0===this.finalKeyframe&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEac
14h(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}},bT=(e,t)=>t&&"number"==typeof e?t.transform(e):e,{schedule:bA}=g9(queueMicrotask,!1);function bE(e,t){let n=function(e){if(null==e)return[];if(e instanceof EventTarget)return[e];if("string"==typeof e){let t=document,n=(void 0)??t.querySelectorAll(e);return n?Array.from(n):[]}return Array.from(e).filter(e=>null!=e)}(e),i=new AbortController;return[n,{passive:!0,...t,signal:i.signal},()=>i.abort()]}var bM=(e,t)=>!!t&&(e===t||bM(e,t.parentElement)),b_=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]),bR=new WeakSet;function bI(e){return t=>{"Enter"===t.key&&e(t)}}function bj(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}function bV(e){return"mouse"===e.pointerType?"number"!=typeof e.button||!!(e.button<=0):!1!==e.isPrimary}var bO=new WeakSet,bP=[...bc,vR,vL],bN=()=>({min:0,max:0}),bL=()=>({x:bN(),y:bN()}),bD=new WeakMap;function bF(e){return"object"==typeof e&&!!e&&"function"==typeof e.start}function bB(e){return"string"==typeof e||Array.isArray(e)}var b$=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],bU=["initial",...b$];function bW(e){return bF(e.animate)||bU.some(t=>bB(e[t]))}function bz(e){return!!(bW(e)||e.variants)}var bH={current:null},bK={current:!1},bq="u">typeof window,bY=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],bG={},bX=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:i,skipAnimations:r,blockInitialAnimation:a,visualState:s},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=yj,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=vi.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,g8.render(this.render,!1,!0))};let{latestValues:l,renderState:u}=s;this.latestValues=l,this.baseTarget={...l},this.initialValues=t.initial?{...l}:{},this.renderState=u,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=r,this.options=o,this.blockInitialAnimation=!!a,this.isControllingVariants=bW(t),this.isVariantNode=bz(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:c,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in d){let t=d[e];void 0!==l[e]&&br(t)&&t.set(l[e])}}mount(e){if(this.hasBeenMounted)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];this.current=e,bD.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(bK.current||function(){if(bK.current=!0,bq)if(window.matchMedia){let e=window.matchMedia("(prefers-reduced-motion)"),t=()=>bH.current=e.matches;e.addEventListener("change",t),t()}else bH.current=!1}(),this.shouldReduceMotion=bH.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){for(let e in this.projection&&this.projection.unmount(),ve(this.notifyUpdate),ve(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this),this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??=new Set,this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&yK.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:i,times:r,ease:a,duration:s}=t.accelerate,o=new y$({element:this.current,name:e,keyframes:i,times:r,ease:a,duration:1e3*s}),l=n(o);this.valueSubscriptions.set(e,()=>{l(),o.cancel()});return}let n=yx.has(e);n&&this.onBindTransform&&this.onBindTransform();let i=t.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&g8.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),r;"u">typeof window&&window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{i(),r&&r(),t.owner&&t.stop()})}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in bG){let t=bG[e];if(!t)continue;let{isEnabled:n,Feature:i}=t;if(!this.features[e]&&i&&n(this.props)&&(this.features[e]=new i(this)),this.features[e]){let t=this.features[e];
14t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):bL()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<bY.length;t++){let n=bY[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let i=e["on"+n];i&&(this.propEventSubscriptions[n]=this.on(n,i))}this.prevMotionValues=function(e,t,n){for(let i in t){let r=t[i],a=n[i];if(br(r))e.addValue(i,r);else if(br(a))e.addValue(i,bn(r,{owner:e}));else if(a!==r)if(e.hasValue(i)){let t=e.getValue(i);!0===t.liveStyle?t.jump(r):t.hasAnimated||t.set(r)}else{let t=e.getStaticValue(i);e.addValue(i,bn(void 0===t?r:t,{owner:e}))}}for(let i in n)void 0===t[i]&&e.removeValue(i);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=bn(null===t?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n,i,r,a=void 0===this.latestValues[e]&&this.current?this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];return null!=a&&("string"==typeof a&&(n=a,/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(n)||(i=a,/^0[^.\s]+$/u.test(i)))?a=parseFloat(a):(r=a,!bP.find(bu(r))&&vL.test(t)&&(a=bC(e,t))),this.setBaseTarget(e,br(a)?a.get():a)),br(a)?a.get():a}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let{initial:t}=this.props,n;if("string"==typeof t||"object"==typeof t){let i=y6(this.props,t,this.presenceContext?.custom);i&&(n=i[e])}if(t&&void 0!==n)return n;let i=this.getBaseTargetFromProps(this.props,e);return void 0===i||br(i)?void 0!==this.initialValues[e]&&void 0===n?void 0:this.baseTarget[e]:i}on(e,t){return this.events[e]||(this.events[e]=new g$),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){bA.render(this.render)}},bZ=class extends bX{constructor(){super(...arguments),this.KeyframeResolver=bS}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;br(e)&&(this.childSubscription=e.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}},bJ=class{constructor(e){this.isMounted=!1,this.node=e}update(){}},bQ={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},b0=yw.length;function b1(e,t,n){let{style:i,vars:r,transformOrigin:a}=e,s=!1,o=!1;for(let e in t){let n=t[e];if(yx.has(e)){s=!0;continue}if(vs(e)){r[e]=n;continue}{let t=bT(n,by[e]);e.startsWith("origin")?(o=!0,a[e]=t):i[e]=t}}if(t.transform||(s||n?i.transform=function(e,t,n){let i="",r=!0;for(let a=0;a<b0;a++){let s=yw[a],o=e[s];if(void 0===o)continue;let l=!0;if("number"==typeof o)l=o===+!!s.startsWith("scale");else{let e=parseFloat(o);l=s.startsWith("scale")?1===e:0===e}if(!l||n){let e=bT(o,by[s]);if(!l){r=!1;let t=bQ[s]||s;i+=`${t}(${e}) `}n&&(t[s]=e)}}return i=i.trim(),n?i=n(t,r?"":i):r&&(i="none"),i}(t,e.transform,n):i.transform&&="none"),o){let{originX:e="50%",originY:t="50%",originZ:n=0}=a;i.transformOrigin=`${e} ${t} ${n}`}}function b2(e,{style:t,vars:n},i,r){let a=e.style,s;for(s in t)a[s]=t[s];for(s in r?.applyProjectionStyles(a,i),n)a.setProperty(s,n[s])}function b3(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var b5={correct:(e,t)=>
14{if(!t.target)return e;if("string"==typeof e)if(!vT.test(e))return e;else e=parseFloat(e);return`${b3(e,t.target.x)}% ${b3(e,t.target.y)}%`}},b4={borderRadius:{...b5,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:b5,borderTopRightRadius:b5,borderBottomLeftRadius:b5,borderBottomRightRadius:b5,boxShadow:{correct:(e,{treeScale:t,projectionDelta:n})=>{let i=vL.parse(e);if(i.length>5)return e;let r=vL.createTransformer(e),a=+("number"!=typeof i[0]),s=n.x.scale*t.x,o=n.y.scale*t.y;i[0+a]/=s,i[1+a]/=o;let l=vB(s,o,.5);return"number"==typeof i[2+a]&&(i[2+a]/=l),"number"==typeof i[3+a]&&(i[3+a]/=l),r(i)}}};function b9(e,{layout:t,layoutId:n}){return yx.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!b4[e]||"opacity"===e)}function b6(e,t,n){let i=e.style,r=t?.style,a={};if(!i)return a;for(let t in i)(br(i[t])||r&&br(r[t])||b9(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=i[t]);return a}var b7=class extends bZ{constructor(){super(...arguments),this.type="html",this.renderInstance=b2}readValueFromInstance(e,t){if(yx.has(t))return this.projection?.isProjecting?yv(t):((e,t)=>{let{transform:n="none"}=getComputedStyle(e);return yy(n,t)})(e,t);{let n=window.getComputedStyle(e),i=(vs(t)?n.getPropertyValue(t):n[t])||0;return"string"==typeof i?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:t}){return function({top:e,left:t,right:n,bottom:i}){return{x:{min:t,max:n},y:{min:e,max:i}}}(function(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),i=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}(e.getBoundingClientRect(),t))}build(e,t,n){b1(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return b6(e,t,n)}},b8={offset:"stroke-dashoffset",array:"stroke-dasharray"},we={offset:"strokeDashoffset",array:"strokeDasharray"},wt=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function wn(e,{attrX:t,attrY:n,attrScale:i,pathLength:r,pathSpacing:a=1,pathOffset:s=0,...o},l,u,c){if(b1(e,o,u),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:h}=e;for(let e of(d.transform&&(h.transform=d.transform,delete d.transform),(h.transform||d.transformOrigin)&&(h.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),h.transform&&(h.transformBox=c?.transformBox??"fill-box",delete d.transformBox),wt))void 0!==d[e]&&(h[e]=d[e],delete d[e]);void 0!==t&&(d.x=t),void 0!==n&&(d.y=n),void 0!==i&&(d.scale=i),void 0!==r&&function(e,t,n=1,i=0,r=!0){e.pathLength=1;let a=r?b8:we;e[a.offset]=`${-i}`,e[a.array]=`${t} ${n}`}(d,r,a,s,!1)}var wi=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),wr=e=>"string"==typeof e&&"svg"===e.toLowerCase();function wa(e,t,n){let i=b6(e,t,n);for(let n in e)(br(e[n])||br(t[n]))&&(i[-1===yw.indexOf(n)?n:"attr"+n.charAt(0).toUpperCase()+n.substring(1)]=e[n]);return i}var ws=class extends bZ{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=bL}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(yx.has(t)){let e=bw(t);return e&&e.default||0}return t=wi.has(t)?t:ba(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return wa(e,t,n)}
14build(e,t,n){wn(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,i){for(let n in b2(e,t,void 0,i),t.attrs)e.setAttribute(wi.has(n)?n:ba(n),t.attrs[n])}mount(e){this.isSVGTag=wr(e.tagName),super.mount(e)}},wo=bU.length;function wl(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let i=0;i<n;i++)if(t[i]!==e[i])return!1;return!0}var wu=[...b$].reverse(),wc=b$.length;function wd(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function wh(){return{animate:wd(!0),whileInView:wd(),whileHover:wd(),whileTap:wd(),whileDrag:wd(),whileFocus:wd(),exit:wd()}}function wp(e,t,n,i={passive:!0}){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n)}var wf=(0,iV.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),wm=(0,iV.createContext)({strict:!1}),wg={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},wv=!1;function wy(){return function(){if(wv)return;let e={};for(let t in wg)e[t]={isEnabled:e=>wg[t].some(t=>!!e[t])};bG=e,wv=!0}(),bG}function wb(e){let t=wy();for(let n in e)t[n]={...t[n],...e[n]};bG=t}function ww({children:e,features:t,strict:n=!1}){let[,i]=(0,iV.useState)(!wx(t)),r=(0,iV.useRef)(void 0);if(!wx(t)){let{renderer:e,...n}=t;r.current=e,wb(n)}return(0,iV.useEffect)(()=>{wx(t)&&t().then(({renderer:e,...t})=>{wb(t),r.current=e,i(!0)})},[]),(0,a6.jsx)(wm.Provider,{value:{renderer:r.current,strict:n},children:e})}function wx(e){return"function"==typeof e}var wC=new Set("animate.exit.variants.initial.style.values.variants.transition.transformTemplate.custom.inherit.onBeforeLayoutMeasure.onAnimationStart.onAnimationComplete.onUpdate.onDragStart.onDrag.onDragEnd.onMeasureDragConstraints.onDirectionLock.onDragTransitionEnd._dragX._dragY.onHoverStart.onHoverEnd.onViewportEnter.onViewportLeave.globalTapTarget.propagate.ignoreStrict.viewport".split("."));function wk(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||wC.has(e)}var wS,wT=((e,t)=>{let n={};for(var i in e)gT(n,i,{get:e[i],enumerable:!0});return t||gT(n,Symbol.toStringTag,{value:"Module"}),n})({default:()=>wS}),wA=(d=()=>{throw wS={},Error('Could not resolve "@emotion/is-prop-valid" imported by "framer-motion". Is it installed?')},()=>(d&&(h=d(d=0)),h)),wE=e=>!wk(e);try{x4=(wA(),gM.call(wT,"module.exports")?wT["module.exports"]:((e,t,n,i)=>{if(t&&"object"==typeof t||"function"==typeof t)for(var r,a=gE(t),s=0,o=a.length;s<o;s++)r=a[s],gM.call(e,r)||r===n||gT(e,r,{get:(e=>t[e]).bind(null,r),enumerable:!(i=gA(t,r))||i.enumerable});return e})(gT({},"__esModule",{value:!0}),wT)).default,"function"==typeof x4&&(wE=e=>e.startsWith("on")?!wk(e):x4(e))}catch{}var wM=(0,iV.createContext)({});function w_(e){return Array.isArray(e)?e.join(" "):e}var wR=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function wI(e,t,n){for(let i in t)br(t[i])||b9(i,n)||(e[i]=t[i])}var wj=()=>({...wR(),attrs:{}}),wV=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function wO(e){return!("string"!=typeof e||e.includes("-"))&&!!(wV.indexOf(e)>-1||/[A-Z]/u.test(e))}var wP=e=>(t,n)=>{let i,r=(0,iV.useContext)(wM),a=(0,iV.useContext)(gI),s=()=>(function({scrapeMotionValuesFromProps:e,createRenderState:t},n,i,r){return{latestValues:function(e,t,n,i){let r={},a=i(e,{});for(let e in a){var s;r[e]=br(s=a[e])?s.get():s}let{initial:o,animate:l}=e,u=bW(e),c=bz(e);t&&c&&!u&&!1!==e.inherit&&(void 0===o&&(o=t.initial),void 0===l&&(l=t.animate));let d=!!n&&!1===n.initial,h=(d||=!1===o)?l:o;if(h&&"boolean"!=typeof h&&!bF(h)){let t=Array.isArray(h)?h:[h];for(let n=0;n<t.length;n++){let i=y6(e,t[n]);if(i){let{transitionEnd:e,transition:t,...n}=i;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=d?t.length-1:0;t=t[e]}null!==t&&(r[e]=t)}for(let t in e)r[t]=e[t]}}}return r}(n,i,r,e),renderState:t()}})(e,t,r,a);return n?s():(null===(i=(0,iV.useRef)(null)).current&&(i.current=s()),i.current)},wN=wP({scrapeMotionValuesFromProps:b6,createRenderState:wR}),wL=wP({scrapeMotionValuesFromProps:wa,createRenderState:wj}),wD=Symbol.for("motionComponentSymbol"),wF=(0,iV.createContext)({}),wB=class extends bJ{constructor(e){super(e),e.animationState||=function(e){let t=t=>Promise.all(t.map(({animation:t,options:n})=>(function(e,t,n={}){let i;if(e.notify("AnimationStart",t),Array.isArray(t))i=Promise.all(t.map(t=>bl(e,t,n)));else if("string"==typeof t)i=bl(e,t,n);else{let r="function"==typeof t?y7(e,t,n.custom):t;i=Promise.all(bo(e,r,n))}return i.then(()=>
14{e.notify("AnimationComplete",t)})})(e,t,n))),n=wh(),i=!0,r=!1,a=t=>(n,i)=>{let r=y7(e,i,"exit"===t?e.presenceContext?.custom:void 0);if(r){let{transition:e,transitionEnd:t,...i}=r;n={...n,...i,...t}}return n};function s(s){let{props:o}=e,l=function e(t){if(!t)return;if(!t.isControllingVariants){let n=t.parent&&e(t.parent)||{};return void 0!==t.props.initial&&(n.initial=t.props.initial),n}let n={};for(let e=0;e<wo;e++){let i=bU[e],r=t.props[i];(bB(r)||!1===r)&&(n[i]=r)}return n}(e.parent)||{},u=[],c=new Set,d={},h=1/0;for(let t=0;t<wc;t++){var p,f;let m=wu[t],g=n[m],v=void 0===o[m]?l[m]:o[m],y=bB(v),b=m===s?g.isActive:null;!1===b&&(h=t);let w=v===l[m]&&v!==o[m]&&y;if(w&&(i||r)&&e.manuallyAnimateOnMount&&(w=!1),g.protectedKeys={...d},!g.isActive&&null===b||!v&&!g.prevProp||bF(v)||"boolean"==typeof v)continue;if("exit"===m&&g.isActive&&!0!==b){g.prevResolvedValues&&(d={...d,...g.prevResolvedValues});continue}let x=(p=g.prevProp,"string"==typeof(f=v)?f!==p:!!Array.isArray(f)&&!wl(f,p)),C=x||m===s&&g.isActive&&!w&&y||t>h&&y,k=!1,S=Array.isArray(v)?v:[v],T=S.reduce(a(m),{});!1===b&&(T={});let{prevResolvedValues:A={}}=g,E={...A,...T},M=t=>{C=!0,c.has(t)&&(k=!0,c.delete(t)),g.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)};for(let e in E){let t=T[e],n=A[e];if(!d.hasOwnProperty(e))(bi(t)&&bi(n)?wl(t,n):t===n)?void 0!==t&&c.has(e)?M(e):g.protectedKeys[e]=!0:null==t?c.add(e):M(e)}g.prevProp=v,g.prevResolvedValues=T,g.isActive&&(d={...d,...T}),(i||r)&&e.blockInitialAnimation&&(C=!1);let _=w&&x;C&&(!_||k)&&u.push(...S.map(t=>{let n={type:m};if("string"==typeof t&&(i||r)&&!_&&e.manuallyAnimateOnMount&&e.parent){let{parent:i}=e,r=y7(i,t);if(i.enteringChildren&&r){let{delayChildren:t}=r.transition||{};n.delay=yZ(i.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(c.size){let t={};if("boolean"!=typeof o.initial){let n=y7(e,Array.isArray(o.initial)?o.initial[0]:o.initial);n&&n.transition&&(t.transition=n.transition)}c.forEach(n=>{let i=e.getBaseTarget(n),r=e.getValue(n);r&&(r.liveStyle=!0),t[n]=i??null}),u.push({animation:t})}let m=!!u.length;return i&&(!1===o.initial||o.initial===o.animate)&&!e.manuallyAnimateOnMount&&(m=!1),i=!1,r=!1,m?t(u):Promise.resolve()}return{animateChanges:s,setActive:function(t,i){if(n[t].isActive===i)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,i)),n[t].isActive=i;let r=s(t);for(let e in n)n[e].protectedKeys={};return r},setAnimateFunction:function(n){t=n(e)},getState:()=>n,reset:()=>{n=wh(),r=!0}}}(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();bF(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},w$=0;function wU(e){return{point:{x:e.pageX,y:e.pageY}}}function wW(e,t,n){let{props:i}=e;e.animationState&&i.whileHover&&e.animationState.setActive("whileHover","Start"===n);let r=i["onHover"+n];r&&g8.postRender(()=>r(t,wU(t)))}var wz=class extends bJ{mount(){let{current:e}=this.node;e&&(this.unmount=function(e,t,n={}){let[i,r,a]=bE(e,n);return i.forEach(e=>{let n=!1,i=!1,a,s=t=>{a&&=void a(t),e.removeEventListener("pointerleave",l)},o=e=>{n=!1,window.removeEventListener("pointerup",o),window.removeEventListener("pointercancel",o),i&&(i=!1,s(e))},l=e=>{if("touch"!==e.pointerType){if(n){i=!0;return}s(e)}};e.addEventListener("pointerenter",n=>{if("touch"===n.pointerType)return;i=!1;let s=t(e,n);"function"==typeof s&&(a=s,e.addEventListener("pointerleave",l,r))},r),e.addEventListener("pointerdown",()=>{n=!0,window.addEventListener("pointerup",o,r),window.addEventListener("pointercancel",o,r)},r)}),a}(e,(e,t)=>(wW(this.node,t,"Start"),e=>wW(this.node,e,"End"))))}unmount(){}},wH=class extends bJ{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=gF(wp(this.node.current,"focus",()=>this.onFocus()),wp(this.node.current,"blur",()=>this.onBlur()))}unmount(){}};function wK(e,t,n){let{props:i}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&i.whileTap&&e.animationState.setActive("whileTap","Start"===n);let r=i["onTap"+("End"===n?"":n)];r&&g8.postRender(()=>r(t,wU(t)))}var wq=class extends bJ{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=function(e,t,n={}){let[i,r,a]=bE(e,n),s=e=>{let i=e.currentTarget;if(!bV(e)||bO.has(e))return;bR.add(i),n.stopPropagation&&bO.add(e);let a=t(i,e),s=(e,t)=>{window.removeEventListener("pointerup",o),window.removeEventListener("pointercancel",l),bR.has(i)&&bR.delete(i),bV(e)&&"function"==typeof a&&a(e,{success:t})},o=e=>{s(e,i===window||i===document||n.useGlobalTarget||bM(i,e.target))},l=e=>{s(e,!1)};window.addEventListener("pointerup",o,r),window.addEventListener("pointercancel",l,r)};
14return i.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener("pointerdown",s,r),"object"==typeof e&&e&&"offsetHeight"in e&&!("ownerSVGElement"in e)&&(e.addEventListener("focus",e=>((e,t)=>{let n=e.currentTarget;if(!n)return;let i=bI(()=>{if(bR.has(n))return;bj(n,"down");let e=bI(()=>{bj(n,"up")});n.addEventListener("keyup",e,t),n.addEventListener("blur",()=>bj(n,"cancel"),t)});n.addEventListener("keydown",i,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),t)})(e,r)),b_.has(e.tagName)||!0===e.isContentEditable||e.hasAttribute("tabindex")||(e.tabIndex=0))}),a}(e,(e,t)=>(wK(this.node,t,"Start"),(e,{success:t})=>wK(this.node,e,t?"End":"Cancel")),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}},wY=new WeakMap,wG=new WeakMap,wX=e=>{let t=wY.get(e.target);t&&t(e)},wZ=e=>{e.forEach(wX)},wJ={some:0,all:1},wQ=class extends bJ{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var e,t;let n;this.stopObserver?.();let{viewport:i={}}=this.node.getProps(),{root:r,margin:a,amount:s="some",once:o}=i,l={root:r?r.current:void 0,rootMargin:a,threshold:"number"==typeof s?s:wJ[s]};this.stopObserver=(e=this.node.current,t=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,o&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);let{onViewportEnter:n,onViewportLeave:i}=this.node.getProps(),r=t?n:i;r&&r(e)},n=function({root:e,...t}){let n=e||document;wG.has(n)||wG.set(n,{});let i=wG.get(n),r=JSON.stringify(t);return i[r]||(i[r]=new IntersectionObserver(wZ,{root:e,...t})),i[r]}(l),wY.set(e,t),n.observe(e),()=>{wY.delete(e),n.unobserve(e)})}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;let{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}},w0={renderer:(e,t)=>t.isSVG??wO(e)?new ws(t):new b7(t,{allowProjection:e!==iV.Fragment}),animation:{Feature:wB},exit:{Feature:class extends bJ{constructor(){super(...arguments),this.id=w$++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;if(e&&!1===n){if(this.isExitComplete){let{initial:e,custom:t}=this.node.getProps();if("string"==typeof e){let n=y7(this.node,e,t);if(n){let{transition:e,transitionEnd:t,...i}=n;for(let e in i)this.node.getValue(e)?.jump(i[e])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}let i=this.node.animationState.setActive("exit",!e);t&&!e&&i.then(()=>{this.isExitComplete=!0,t(this.id)})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}},inView:{Feature:wQ},tap:{Feature:wq},focus:{Feature:wH},hover:{Feature:wz}},w1=function({forwardMotionProps:e=!1,type:t}={}){let n=t?"svg"===t:wO("div"),i=n?wL:wN;function r(t,r){var a;let s,o,l,u={...(0,iV.useContext)(wf),...t,layoutId:function({layoutId:e}){let t=(0,iV.useContext)(g_).id;return t&&void 0!==e?t+"-"+e:e}(t)},{isStatic:c}=u,d=function(e){let{initial:t,animate:n}=function(e,t){if(bW(e)){let{initial:t,animate:n}=e;return{initial:!1===t||bB(t)?t:void 0,animate:bB(n)?n:void 0}}return!1===e.inherit?{}:t}(e,(0,iV.useContext)(wM));return(0,iV.useMemo)(()=>({initial:t,animate:n}),[w_(t),w_(n)])}(t),h=i(t,c);if(!c&&"u">typeof window){(0,iV.useContext)(wm).strict;let e=function(e){let{drag:t,layout:n}=wy();if(!t&&!n)return{};let i={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}(u);l=e.MeasureLayout,d.visualElement=function(e,t,n,i,r,a){let{visualElement:s}=(0,iV.useContext)(wM),o=(0,iV.useContext)(wm),l=(0,iV.useContext)(gI),u=(0,iV.useContext)(wf),c=u.reducedMotion,d=u.skipAnimations,h=(0,iV.useRef)(null),p=(0,iV.useRef)(!1);i||=o.renderer,!h.current&&i&&(h.current=i(e,{visualState:t,parent:s,props:n,presenceContext:l,blockInitialAnimation:!!l&&!1===l.initial,reducedMotionConfig:c,skipAnimations:d,isSVG:a}),p.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));let f=h.current,m=(0,iV.useContext)(wF);f&&!f.projection&&r&&("html"===f.type||"svg"===f.type)&&function(e,t,n,i){var r;let{layoutId:a,layout:s,drag:o,dragConstraints:l,layoutScroll:u,layoutRoot:c,layoutAnchor:d,layoutCrossfade:h}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:function e(t){if(t)return!1===t.options.allowProjection?e(t.parent):t.projection}(e.parent)),e.projection.setOptions({layoutId:a,layout:s,alwaysMeasureLayout:!!o||l&&(r=l)&&"object"==typeof r&&Object.prototype.hasOwnProperty.call(r,"current"),visualElement:e,animationType:"string"==typeof s?s:"both",initialPromotionConfig:i,crossfade:h,layoutScroll:u,layoutRoot:c,layoutAnchor:d})}(h.current,n,r,m);let g=(0,iV.useRef)(!1);(0,iV.useInsertionEffect)(()=>{f&&g.current&&f.update(n,l)});let v=n[bs],y=(0,iV.useRef)(!!v&&"u">typeof window&&!window.MotionHandoffIsComplete?.(v)&&window.MotionHasOptimisedAnimation?.(v));return gR(()=>{p.current=!0,f&&(g.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),f.scheduleRenderMicrotask(),y.current&&f.animationState&&f.animationState.animateChanges())}),(0,iV.useEffect)(()=>{f&&(!y.current&&f.animationState&&f.animationState.animateChanges(),y.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(v)}),!1),f.enteringChildren=void 0)}),f}("div",h,u,void 0,e.ProjectionNode,n)}return(0,a6.jsxs)(wM.Provider,{value:d,children:[l&&d.visualElement?(0,a6.jsx)(l,{visualElement:d.visualElement,...u}):null,function(e,t,n,{latestValues:i},r,a=!1,s){let o=(s??wO(e)?function(e,t,n,i){let r=(0,iV.useMemo)(()=>{let n=wj();return wn(n,t,wr(i),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};wI(t,e.style,e),r.style={...t,...r.style}}return r}:function(e,t){let n,i={},r=(wI(n={},e.style||{},e),Object.assign(n,function({transformTemplate:e},t){return(0,iV.useMemo)(()=>{let n=wR();return b1(n,t,e),Object.assign({},n.vars,n.style)},[t])}(e,t)),n);return e.drag&&!1!==e.dragListener&&(i.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=!0===e.drag?"none":`pan-${"x"===e.drag?"y":"x"}
14`),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(i.tabIndex=0),i.style=r,i})(t,i,r,e),l=function(e,t,n){let i={};for(let r in e)"values"===r&&"object"==typeof e.values||br(e[r])||(wE(r)||!0===n&&wk(r)||!t&&!wk(r)||e.draggable&&r.startsWith("onDrag"))&&(i[r]=e[r]);return i}(t,"string"==typeof e,a),u=e===iV.Fragment?{}:{...l,...o,ref:n},{children:c}=t,d=(0,iV.useMemo)(()=>br(c)?c.get():c,[c]);return(0,iV.createElement)(e,{...u,children:d})}("div",t,(a=d.visualElement,s=(0,iV.useRef)(r),(0,iV.useInsertionEffect)(()=>{s.current=r}),o=(0,iV.useRef)(null),(0,iV.useCallback)(e=>{e&&h.onMount?.(e);let t=s.current;if("function"==typeof t)if(e){let n=t(e);"function"==typeof n&&(o.current=n)}else o.current?(o.current(),o.current=null):t(e);else t&&(t.current=e);a&&(e?a.mount(e):a.unmount())},[a])),h,c,e,n)]})}r.displayName="motion.div";let a=(0,iV.forwardRef)(r);return a[wD]="div",a}(void 0),w2=iV.default.createContext({value:"",size:"1",showScrollButtons:!1,activeOptionRef:null,setActiveOptionRef:()=>{}}),w3={active:{variant:"outline",color:"default"},inactive:{variant:"ghost",color:"gray"}};Object.assign({},{Root:({type:e="single",size:t="1",scrollControls:n="arrows",value:i,defaultValue:r,onValueChange:a,disabled:s,rovingFocus:o,orientation:l,dir:u,loop:c,children:d,...h})=>{let p=iV.default.useId(),f=iV.default.useRef(null),{truncated:m}=gx({tgphRef:f}),g=iV.default.useRef(null),v="arrows"===n&&m,[y,b]=iV.default.useState(null),[w,x]=iV.default.useState(null),C=iV.default.useCallback(e=>{if(!f.current)return;let t=f.current.clientWidth,n="left"===e?f.current.scrollLeft-t:f.current.scrollLeft+t;f.current.scrollTo({left:n,behavior:"smooth"})},[]),k=iV.default.useCallback(e=>{if(!f.current)return null;let t=f.current.scrollWidth-f.current.clientWidth;return e<=1?"flushLeft":e>=t-1?"flushRight":"middle"},[]),S=iV.default.useCallback(()=>{f.current&&x(k(f.current.scrollLeft))},[k]);iV.default.useEffect(()=>{if(!f.current)return;let e=f.current;return S(),e.addEventListener("scroll",S),()=>{e?.removeEventListener("scroll",S)}},[S]);let[T,A]=iV.default.useState(!1);return iV.default.useEffect(()=>{if(v&&y){let e=y.offsetLeft,t=k(e),n=(g.current?.clientWidth??0)+24;x(t);let i="flushRight"===t||"middle"===t?e-n:e;f.current?.scrollTo({left:i,behavior:T?"smooth":"instant"}),T||A(!0)}},[v,y,k,T]),(0,a6.jsxs)(su,{position:"relative",overflow:v?"hidden":"visible",rounded:"2",children:[(0,a6.jsx)(w2.Provider,{value:{value:i,size:t,showScrollButtons:v,activeOptionRef:y,setActiveOptionRef:b},children:(0,a6.jsx)(gw.Root,{asChild:!0,type:e,value:i,defaultValue:r,onValueChange:a,disabled:s,rovingFocus:o,orientation:l,dir:u,loop:c,children:(0,a6.jsx)(se,{children:(0,a6.jsx)(sd,{id:p,bg:"gray-3",rounded:"2",align:"center",justify:"space-between",overflow:v?"hidden":"visible",position:"relative",tgphRef:f,...h,children:d})})})}),v&&(0,a6.jsxs)(ww,{features:w0,children:[(0,a6.jsx)(su,{as:w1,animate:{x:"flushRight"===w||"middle"===w?0:"-100%",display:"flushRight"===w||"middle"===w?"flex":"none"},transition:{duration:.2,type:"spring",bounce:0},position:"absolute",left:"0",top:"0",bottom:"0",children:(0,a6.jsx)(sL,{variant:"outline",icon:{icon:gk,alt:"Scroll left"},onClick:()=>C("left"),size:t,"aria-label":"Scroll left to view more options","aria-controls":p})},"left-scroll-button"),(0,a6.jsx)(su,{as:w1,animate:{x:"flushLeft"===w||"middle"===w?0:"100%",display:"flushLeft"===w||"middle"===w?"flex":"none"},transition:{duration:.2,type:"spring",bounce:0},position:"absolute",right:"0",top:"0",bottom:"0",tgphRef:g,children:(0,a6.jsx)(sL,{variant:"outline",icon:{icon:gS,alt:"Scroll right"},onClick:()=>C("right"),size:t,"aria-label":"Scroll right to view more options","aria-controls":p})},"right-scroll-button")]})]})},Option:({value:e,disabled:t,size:n="1",style:i,...r})=>{let a=iV.default.useRef(null),{setActiveOptionRef:s,...o}=iV.default.useContext(w2),l=o.value===e?"active":"inactive",u=o.size??n;return iV.default.useEffect(()=>{"active"===l&&s?.(a.current)},[l,s]),(0,a6.jsx)(gw.Item,{asChild:!0,value:e,disabled:t,children:(0,a6.jsx)(se,{children:(0,a6.jsx)(sL,{size:u,...w3[l],style:{flexGrow:1,...i},"data-tgph-segmented-control-option":!0,"data-tgph-segmented-control-option-status":l,tgphRef:a,...r})})})}}),e.i(533284);var w5=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>
14{let n=sz(`Primitive.${t}`),i=iV.forwardRef((e,i)=>{let{asChild:r,...a}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,a6.jsx)(r?n:t,{...a,ref:i})});return i.displayName=`Primitive.${t}`,{...e,[t]:i}},{}),w4=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"}),w9=iV.forwardRef((e,t)=>(0,a6.jsx)(w5.span,{...e,ref:t,style:{...w4,...e.style}}));w9.displayName="VisuallyHidden",sb("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]),sb("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]),iV.default.createContext({size:"2",value:!1,disabled:!1,id:"",labelId:"",onValueChange:()=>{},required:!1,name:void 0,color:"blue"});var w6=e.i(46951);let w7=({children:e,onOpenChange:t,...n})=>iV.default.createElement(w6.Root,{defaultOpen:!0,onOpenChange:t,...n},iV.default.createElement(w6.Portal,null,e));w7.displayName="ModalView.Root";let w8=iV.default.forwardRef(({className:e,...t},n)=>iV.default.createElement(w6.Overlay,{className:(0,aD.default)("knock-guide-modal__overlay",e),ref:n,...t}));w8.displayName="ModalView.Overlay";let xe=iV.default.forwardRef(({children:e,className:t,...n},i)=>iV.default.createElement(w6.Content,{className:(0,aD.default)("knock-guide-modal",t),ref:i,...n},e));xe.displayName="ModalView.Content";let xt=({children:e,className:t,...n})=>iV.default.createElement("div",{className:(0,aD.default)("knock-guide-modal__header",t),...n},e);xt.displayName="ModalView.Header";let xn=({title:e,className:t,...n})=>iV.default.createElement(w6.Title,{className:(0,aD.default)("knock-guide-modal__title",t),...n},e);xn.displayName="ModalView.Title";let xi=({body:e,className:t,...n})=>iV.default.createElement(w6.Description,{className:(0,aD.default)("knock-guide-modal__body",t),dangerouslySetInnerHTML:{__html:e},...n});xi.displayName="ModalView.Body";let xr=({children:e,className:t,alt:n,...i})=>iV.default.createElement("img",{className:(0,aD.default)("knock-guide-modal__img",t),alt:n||"",...i},e);xr.displayName="ModalView.Img";let xa=({children:e,className:t,...n})=>iV.default.createElement("div",{className:(0,aD.default)("knock-guide-modal__actions",t),...n},e);xa.displayName="ModalView.Actions";let xs=({text:e,action:t,className:n,...i})=>iV.default.createElement("button",{className:(0,aD.default)("knock-guide-modal__action",n),...i},e);xs.displayName="ModalView.PrimaryButton";let xo=({text:e,action:t,className:n,...i})=>iV.default.createElement("button",{className:(0,aD.default)("knock-guide-modal__action knock-guide-modal__action--secondary",n),...i},e);xo.displayName="ModalView.SecondaryButton";let xl=({className:e,...t})=>iV.default.createElement(w6.Close,{className:(0,aD.default)("knock-guide-modal__close",e),...t},iV.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",fill:"none"},iV.default.createElement("g",{fill:"#60646C",fillRule:"evenodd",clipRule:"evenodd"},iV.default.createElement("path",{d:"M14.03 3.97a.75.75 0 0 1 0 1.06l-9 9a.75.75 0 0 1-1.06-1.06l9-9a.75.75 0 0 1 1.06 0Z"}),iV.default.createElement("path",{d:"M3.97 3.97a.75.75 0 0 1 1.06 0l9 9a.75.75 0 1 1-1.06 1.06l-9-9a.75.75 0 0 1 0-1.06Z"}))));xl.displayName="ModalView.Close";let xu=({content:e,colorMode:t="light",onOpenChange:n,onDismiss:i,onButtonClick:r,onImageClick:a})=>iV.default.createElement(w7,{onOpenChange:n},iV.default.createElement(w8,null),iV.default.createElement(xe,{"data-knock-color-mode":t,onPointerDownOutside:i},iV.default.createElement(xt,null,iV.default.createElement(xn,{title:e.title}),e.dismissible&&iV.default.createElement(xl,{onClick:i})),iV.default.createElement(xi,{body:e.body}),e.image&&iV.default.createElement("a",{href:aF(e.image.action)?e.image.action:void 0,target:"_blank"},iV.default.createElement(xr,{src:e.image.url,alt:e.image.alt,onClick:t=>{a&&a(t,e.image)}})),(e.primary_button||e.secondary_button)&&iV.default.createElement(xa,null,e.secondary_button&&iV.default.createElement(xo,{text:e.secondary_button.text,action:e.secondary_button.action,onClick:t=>{if(r){let{text:n,action:i}=e.secondary_button;r(t,{name:"secondary_button",text:n,action:i})}}}),e.primary_button&&iV.default.createElement(xs,{text:e.primary_button.text,action:e.primary_button.action,onClick:t=>{if(r){let{text:n,action:i}=e.primary_button;r(t,{name:"primary_button",text:n,action:i})}}}))));xu.displayName="ModalView.Default",Object.assign({},{Default:xu,Root:w7,Overlay:w8,Content:xe,Title:xn,Body:xi,Img:xr,A
14ctions:xa,PrimaryButton:xs,SecondaryButton:xo,Close:xl}),sb("wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]]),sb("undo-2",[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]]),sb("minimize-2",[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]]),sb("grip-vertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]),sb("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),sb("sliders-horizontal",[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]]),sb("log-out",[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]]),sb("gauge",[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]),sb("corner-down-right",[["path",{d:"m15 10 5 5-5 5",key:"qqa56n"}],["path",{d:"M4 4v7a4 4 0 0 0 4 4h12",key:"z08zvw"}]]);var xc=e.i(348989);function xd(...e){return iV.useCallback(function(...e){return t=>e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}(...e),e)}let xh={1:{h:"6",pl:"0",rounded:"2"},2:{h:"8",pl:"0",rounded:"2"},3:{h:"10",pl:"0",rounded:"2"}},xp={1:{size:"1",px:"1"},2:{size:"2",px:"2"},3:{size:"3",px:"3"}},xf={1:{pl:"1_5"},2:{pl:"2"},3:{pl:"3"}},xm={1:{pr:"1"},2:{pr:"2"},3:{pr:"3"}},xg={default:{outline:{bg:"surface-3",border:"px",borderColor:"gray-6",_hover:{backgroundColor:"surface-2",borderColor:"gray-7"},_focusWithin:{backgroundColor:"surface-3",borderColor:"blue-8"}},ghost:{bg:"transparent",border:"px",borderColor:"transparent",_hover:{backgroundColor:"surface-2",borderColor:"gray-7"},_focusWithin:{backgroundColor:"surface-3",borderColor:"blue-8"}}},disabled:{outline:{bg:"gray-2",border:"px",borderColor:"transparent"},ghost:{bg:"transparent",border:"px",borderColor:"transparent"}},error:{outline:{bg:"surface-3",border:"px",borderColor:"red-6",_hover:{backgroundColor:"surface-2",borderColor:"red-7"},_focusWithin:{backgroundColor:"surface-3",borderColor:"blue-8"}},ghost:{bg:"surface-3",border:"px",borderColor:"red-6",_hover:{backgroundColor:"surface-2",borderColor:"red-7"},_focusWithin:{backgroundColor:"surface-3",borderColor:"blue-8"}}}},xv={default:{color:"default"},disabled:{color:"disabled"},error:{color:"default"}},xy=iV.default.createContext({state:"default",size:"2",variant:"outline"}),xb=({as:e="input",size:t="2",variant:n="outline",textProps:i,stackProps:r,disabled:a,errored:s,children:o,tgphRef:l,...u})=>{let c=iV.default.useRef(null),d=xd(l,c),h=a?"disabled":s?"error":"default";return(0,a6.jsx)(xy.Provider,{value:{size:t,variant:n,state:h},children:(0,a6.jsxs)(sd,{onPointerDown:e=>{if(e.target.closest("button, a"))return void e.preventDefault();let t=c.current;t&&requestAnimationFrame(()=>{t.focus()})},align:"center",...xh[t],...xg[h][n],"data-tgph-input-container":!0,"data-tgph-input-container-variant":n,"data-tgph-input-container-state":h,"data-tgph-input-container-size":t,...r,children:[(0,a6.jsx)(sf,{as:e,bg:"transparent",shadow:"0",h:"full",w:"full",disabled:a,tgphRef:d,...xp[t],...xv[h],...u,...i,"data-tgph-input-field":!0}),o]})})},xw=iV.default.forwardRef(({position:e="leading",...t},n)=>{let i=iV.default.useContext(xy);return(0,a6.jsx)(sd,{align:"center",justify:"center",h:"full","data-tgph-input-slot":!0,"data-tgph-input-slot-position":e,"data-tgph-input-slot-size":t.size??i.size,..."leading"===e&&xf[i.size],..."trailing"===e&&xm[i.size],children:(0,a6.jsx)(sH,{size:i.size,...t,ref:n})})}),xx=({LeadingComponent:e,TrailingComponent:t,...n})=>(0,a6.jsxs)(xb,{...n,children:[e&&(0,a6.jsx)(xw,{position:"leading",children:e}),t&&(0,a6.jsx)(xw,{position:"trailing",children:t})]});Object.assign(xx,{Root:xb,Slot:xw});var xC=e.i(918552),xk=Object.defineProperty,xS=Object.getOwnPropertyDescriptor,xT=Object.getOwnPropertyNames,xA=Object.prototype.hasOwnProperty,xE=(0,iV.createContext)({}),xM="u">
14typeof window?iV.useLayoutEffect:iV.useEffect,x_=(0,iV.createContext)(null),xR=(e,t,n)=>n>t?t:n<e?e:n,xI=()=>{},xj=()=>{};G.default;var xV={};function xO(e){let t;return()=>(void 0===t&&(t=e()),t)}var xP=e=>e,xN=(e,t)=>n=>t(e(n)),xL=(...e)=>e.reduce(xN),xD=(e,t,n)=>{let i=t-e;return 0===i?1:(n-e)/i},xF=class{constructor(){this.subscriptions=[]}add(e){var t;return t=this.subscriptions,-1===t.indexOf(e)&&t.push(e),()=>{var t;let n;return t=this.subscriptions,void((n=t.indexOf(e))>-1&&t.splice(n,1))}}notify(e,t,n){let i=this.subscriptions.length;if(i)if(1===i)this.subscriptions[0](e,t,n);else for(let r=0;r<i;r++){let i=this.subscriptions[r];i&&i(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}},xB=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function x$(e,t,n,i){return e===t&&n===i?xP:r=>0===r||1===r?r:xB(function(e,t,n,i,r){let a,s,o=0;do(a=xB(s=t+(n-t)/2,i,r)-e)>0?n=s:t=s;while(Math.abs(a)>1e-7&&++o<12)return s}(r,0,1,e,n),t,i)}var xU=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,xW=e=>t=>1-e(1-t),xz=x$(.33,1.53,.69,.99),xH=xW(xz),xK=xU(xH),xq=e=>e>=1?1:(e*=2)<1?.5*xH(e):.5*(2-2**(-10*(e-1))),xY=e=>1-Math.sin(Math.acos(e)),xG=xW(xY),xX=xU(xY),xZ=x$(.42,0,1,1),xJ
14=x$(0,0,.58,1),xQ=x$(.42,0,.58,1),x0=e=>Array.isArray(e)&&"number"==typeof e[0],x1={linear:xP,easeIn:xZ,easeInOut:xQ,easeOut:xJ,circIn:xY,circInOut:xX,circOut:xG,backIn:xH,backInOut:xK,backOut:xz,anticipate:xq},x2=e=>{if(x0(e)){xj(4===e.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");let[t,n,i,r]=e;return x$(t,n,i,r)}return"string"==typeof e?(xj(void 0!==x1[e],`Invalid easing type '${e}'`,"invalid-easing-type"),x1[e]):e},x3=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function x5(e,t){let n=!1,i=!0,r={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,s=x3.reduce((e,n)=>(e[n]=function(e,t){let n=new Set,i=new Set,r=!1,a=!1,s=new WeakSet,o={delta:0,timestamp:0,isProcessing:!1},l=0;function u(t){s.has(t)&&(c.schedule(t),e()),l++,t(o)}let c={schedule:(e,t=!1,a=!1)=>{let o=a&&r?n:i;return t&&s.add(e),o.add(e),e},cancel:e=>{i.delete(e),s.delete(e)},process:e=>{if(o=e,r){a=!0;return}r=!0;let s=n;n=i,i=s,n.forEach(u),t,l=0,n.clear(),r=!1,a&&(a=!1,c.process(e))}};return c}(a,t?n:void 0),e),{}),{setup:o,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:h,render:p,postRender:f}=s,m=()=>{let a=xV.useManualTiming,s=a?r.timestamp:performance.now();n=!1,a||(r.delta=i?1e3/60:Math.max(Math.min(s-r.timestamp,40),1)),r.timestamp=s,r.isProcessing=!0,o.process(r),l.process(r),u.process(r),c.process(r),d.process(r),h.process(r),p.process(r),f.process(r),r.isProcessing=!1,n&&t&&(i=!1,e(m))};return{schedule:x3.reduce((t,a)=>{let o=s[a];return t[a]=(t,a=!1,s=!1)=>(n||(n=!0,i=!0,r.isProcessing||e(m)),o.schedule(t,a,s)),t},{}),cancel:e=>{for(let t=0;t<x3.length;t++)s[x3[t]].cancel(e)},state:r,steps:s}}var x4,x9,{schedule:x6,cancel:x7,state:x8}=x5("u">typeof requestAnimationFrame?requestAnimationFrame:xP,!0);function Ce(){x9=void 0}var Ct={now:()=>(void 0===x9&&Ct.set(x8.isProcessing||xV.useManualTiming?x8.timestamp:performance.now()),x9),set:e=>{x9=e,queueMicrotask(Ce)}},Cn={mainThread:0,waapi:0},Ci=e=>t=>"string"==typeof t&&t.startsWith(e),Cr=Ci("--"),Ca=Ci("var(--"),Cs=e=>!!Ca(e)&&Co.test(e.split("/*")[0].trim()),Co=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Cl(e){return"string"==typeof e&&e.split("/*")[0].includes("var(--")}var Cu={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},Cc={...Cu,transform:e=>xR(0,1,e)},Cd={...Cu,default:1},Ch=e=>Math.round(1e5*e)/1e5,Cp=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,Cf=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Cm=(e,t)=>n=>!!("string"==typeof n&&Cf.test(n)&&n.startsWith(e)||t&&null!=n&&Object.prototype.hasOwnProperty.call(n,t)),Cg=(e,t,n)=>i=>{if("string"!=typeof i)return i;let[r,a,s,o]=i.match(Cp);return{[e]:parseFloat(r),[t]:parseFloat(a),[n]:parseFloat(s),alpha:void 0===o?1:parseFloat(o)}},Cv={...Cu,transform:e=>Math.round(xR(0,255,e))},Cy={test:Cm("rgb","red"),parse:Cg("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:i=1})=>"rgba("+Cv.transform(e)+", "+Cv.transform(t)+", "+Cv.transform(n)+", "+Ch(Cc.transform(i))+")"},Cb={test:Cm("#"),parse:function(e){let t="",n="",i="",r="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),i=e.substring(5,7),r=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),i=e.substring(3,4),r=e.substring(4,5),t+=t,n+=n,i+=i,r+=r),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:r?parseInt(r,16)/255:1}},transform:Cy.transform},Cw=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),Cx=Cw("deg"),CC=Cw("%"),Ck=Cw("px"),CS=Cw("vh"),CT=Cw("vw"),CA={...CC,parse:e=>CC.parse(e)/100,transform:e=>CC.transform(100*e)},CE={test:Cm("hsl","hue"),parse:Cg("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:i=1})=>"hsla("+Math.round(e)+", "+CC.transform(Ch(t))+", "+CC.transform(Ch(n))+", "+Ch(Cc.transform(i))+")"},CM={test:e=>Cy.test(e)||Cb.test(e)||CE.test(e),parse:e=>Cy.test(e)?Cy.parse(e):CE.test(e)?CE.parse(e):Cb.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?Cy.transform(e):CE.transform(e),getAnimatableNone:e=>{let t=CM.parse(e);return t.alpha=0,CM.transform(t)}},C_=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,CR="number",CI="color",Cj=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function CV(e){let t=e.toString(),n=[],i={color:[],number:[],var:[]},r=[],a=0;return{values:n,split:t.replace(Cj,e=>(CM.test(e)?(i.color.push(a),r.push(CI),n.push(CM.parse(e))):e.startsWith("var(")?(i.var.push(a),r.push("var"),n.push(e)):(i.number.push(a),r.push(CR),n.push(parseFloat(e))),++a,"${}")).split("${}"),indexes:i,types:r}}function CO({split:e,types:t}){let n=e.length;return i=>{let r="";for(let a=0;a<n;a++)if(r+=e[a],void 0!==i[a]){let e=t[a];e===CR?r+=Ch(i[a]):e===CI?r+=CM.transform(i[a]):r+=i[a]}return r}}var CP={test:function(e){return isNaN(e)&&"string"==typeof e&&(e.match(Cp)?.length||0)+(e.match(C_)?.length||0)>0},parse:function(e){return CV(e).values},createTransformer:function(e){return CO(CV(e))},getAnimatableNone:function(e){let t=CV(e);return CO(t)(t.values.map((e,n)=>{var i;return i=t.split[n],"number"==typeof e?i?.trim().endsWith("/")?e:0:"number"==typeof e?0:CM.test(e)?CM.getAnimatableNone(e):e}))}};function CN(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function CL(e,t){return n=>n>0?t:e}var CD=(e,t,n)=>e+(t-e)*n,CF=(e,t,n)=>{let i=e*e,r=n*(t*t-i)+i;return r<0?0:Math.sqrt(r)},CB=[Cb,Cy,CE];function C$(e){let t=CB.find(t=>t.test(e));if(xI(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===CE&&(n=function({hue:e,saturation:t,lightness:n,alpha:i}
14){e/=360,t/=100,n/=100;let r=0,a=0,s=0;if(t){let i=n<.5?n*(1+t):n+t-n*t,o=2*n-i;r=CN(o,i,e+1/3),a=CN(o,i,e),s=CN(o,i,e-1/3)}else r=a=s=n;return{red:Math.round(255*r),green:Math.round(255*a),blue:Math.round(255*s),alpha:i}}(n)),n}var CU=(e,t)=>{let n=C$(e),i=C$(t);if(!n||!i)return CL(e,t);let r={...n};return e=>(r.red=CF(n.red,i.red,e),r.green=CF(n.green,i.green,e),r.blue=CF(n.blue,i.blue,e),r.alpha=CD(n.alpha,i.alpha,e),Cy.transform(r))},CW=new Set(["none","hidden"]);function Cz(e,t){return n=>CD(e,t,n)}function CH(e){return"number"==typeof e?Cz:"string"==typeof e?Cs(e)?CL:CM.test(e)?CU:CY:Array.isArray(e)?CK:"object"==typeof e?CM.test(e)?CU:Cq:CL}function CK(e,t){let n=[...e],i=n.length,r=e.map((e,n)=>CH(e)(e,t[n]));return e=>{for(let t=0;t<i;t++)n[t]=r[t](e);return n}}function Cq(e,t){let n={...e,...t},i={};for(let r in n)void 0!==e[r]&&void 0!==t[r]&&(i[r]=CH(e[r])(e[r],t[r]));return e=>{for(let t in i)n[t]=i[t](e);return n}}var CY=(e,t)=>{let n=CP.createTransformer(t),i=CV(e),r=CV(t);return i.indexes.var.length===r.indexes.var.length&&i.indexes.color.length===r.indexes.color.length&&i.indexes.number.length>=r.indexes.number.length?CW.has(e)&&!r.values.length||CW.has(t)&&!i.values.length?CW.has(e)?n=>n<=0?e:t:n=>n>=1?t:e:xL(CK(function(e,t){let n=[],i={color:0,var:0,number:0};for(let r=0;r<t.values.length;r++){let a=t.types[r],s=e.indexes[a][i[a]];n[r]=e.values[s]??0,i[a]++}return n}(i,r),r.values),n):(xI(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),CL(e,t))};function CG(e,t,n){return"number"==typeof e&&"number"==typeof t&&"number"==typeof n?CD(e,t,n):CH(e)(e,t)}var CX=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>x6.update(t,e),stop:()=>x7(t),now:()=>x8.isProcessing?x8.timestamp:Ct.now()}},CZ=(e,t,n=10)=>{let i="",r=Math.max(Math.round(t/n),2);for(let t=0;t<r;t++)i+=Math.round(1e4*e(t/(r-1)))/1e4+", ";return`linear(${i.substring(0,i.length-2)})`};function CJ(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}var CQ=.01,C0=2,C1=.005,C2=.5;function C3(e,t){return e*Math.sqrt(1-t*t)}var C5=["duration","bounce"],C4=["stiffness","damping","mass"];function C9(e,t){return t.some(t=>void 0!==e[t])}function C6(e=.3,t=.3){let n,i,r,a,s,o,l="object"==typeof e?e:{visualDuration:e,keyframes:[0,1],bounce:t},{restSpeed:u,restDelta:c}=l,d=l.keyframes[0],h=l.keyframes[l.keyframes.length-1],p={done:!1,value:d},{stiffness:f,damping:m,mass:g,duration:v,velocity:y,isResolvedFromDuration:b}=function(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!C9(e,C4)&&C9(e,C5))if(t.velocity=0,e.visualDuration){let n=2*Math.PI/(1.2*e.visualDuration),i=n*n,r=2*xR(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:1,stiffness:i,damping:r}}else{let n=function({duration:e=800,bounce:t=.3,velocity:n=0,mass:i=1}){let r,a;xI(e<=1e4,"Spring duration must be 10 seconds or less","spring-duration-limit");let s=1-t;s=xR(.05,1,s),e=xR(.01,10,e/1e3),s<1?(r=t=>{let i=t*s,r=i*e;return .001-(i-n)/C3(t,s)*Math.exp(-r)},a=t=>{let i=t*s*e,a=s**2*t**2*e,o=Math.exp(-i),l=C3(t**2,s);return(-r(t)+.001>0?-1:1)*((i*n+n-a)*o)/l}):(r=t=>-.001+Math.exp(-t*e)*((t-n)*e+1),a=t=>e*e*(n-t)*Math.exp(-t*e));let o=function(e,t,n){let i=n;for(let n=1;n<12;n++)i-=e(i)/t(i);return i}(r,a,5/e);if(e*=1e3,isNaN(o))return{stiffness:100,damping:10,duration:e};{let t=o**2*i;return{stiffness:t,damping:2*s*Math.sqrt(i*t),duration:e}}}({...e,velocity:0});(t={...t,...n,mass:1}).isResolvedFromDuration=!0}return t}({...l,velocity:-((l.velocity||0)/1e3)}),w=y||0,x=m/(2*Math.sqrt(f*g)),C=h-d,k=Math.sqrt(f/g)/1e3,S=5>Math.abs(C);if(u||=S?CQ:C0,c||=S?C1:C2,x<1)r=C3(k,x),a=(w+x*k*C)/r,n=e=>h-Math.exp(-x*k*e)*(a*Math.sin(r*e)+C*Math.cos(r*e)),s=x*k*a+C*r,o=x*k*C-a*r,i=e=>Math.exp(-x*k*e)*(s*Math.sin(r*e)+o*Math.cos(r*e));else if(1===x){n=e=>h-Math.exp(-k*e)*(C+(w+k*C)*e);let e=w+k*C;i=t=>Math.exp(-k*t)*(k*e*t-w)}else{let e=k*Math.sqrt(x*x-1);n=t=>
14{let n=Math.exp(-x*k*t),i=Math.min(e*t,300);return h-n*((w+x*k*C)*Math.sinh(i)+e*C*Math.cosh(i))/e};let t=(w+x*k*C)/e,r=x*k*t-C*e,a=x*k*C-t*e;i=t=>{let n=Math.exp(-x*k*t),i=Math.min(e*t,300);return n*(r*Math.sinh(i)+a*Math.cosh(i))}}let T={calculatedDuration:b&&v||null,velocity:e=>1e3*i(e),next:e=>{if(!b&&x<1){let t=Math.exp(-x*k*e),n=Math.sin(r*e),i=Math.cos(r*e),l=h-t*(a*n+C*i);return p.done=Math.abs(t*(s*n+o*i)*1e3)<=u&&Math.abs(h-l)<=c,p.value=p.done?h:l,p}let t=n(e);return b?p.done=e>=v:p.done=Math.abs(1e3*i(e))<=u&&Math.abs(h-t)<=c,p.value=p.done?h:t,p},toString:()=>{let e=Math.min(CJ(T),2e4),t=CZ(t=>T.next(e*t).value,e,30);return e+"ms "+t},toTransition:()=>{}};return T}function C7(e,t,n){var i,r;let a=Math.max(t-5,0);return i=n-e(a),(r=t-a)?1e3/r*i:0}function C8({keyframes:e,velocity:t=0,power:n=.8,timeConstant:i=325,bounceDamping:r=10,bounceStiffness:a=500,modifyTarget:s,min:o,max:l,restDelta:u=.5,restSpeed:c}){let d=e[0],h={done:!1,value:d},p=n*t,f=d+p,m=void 0===s?f:s(f);m!==f&&(p=m-d);let g=e=>-p*Math.exp(-e/i),v=e=>m+g(e),y=e=>{let t=g(e),n=v(e);h.done=Math.abs(t)<=u,h.value=h.done?m:n},b,w,x=e=>{let t,n;t=h.value,(void 0!==o&&t<o||void 0!==l&&t>l)&&(b=e,w=C6({keyframes:[h.value,(n=h.value,void 0===o?l:void 0===l||Math.abs(o-n)<Math.abs(l-n)?o:l)],velocity:C7(v,e,h.value),damping:r,stiffness:a,restDelta:u,restSpeed:c}))};return x(0),{calculatedDuration:null,next:e=>{let t=!1;return w||void 0!==b||(t=!0,y(e),x(e)),void 0!==b&&e>=b?w.next(e-b):(t||y(e),h)}}}function ke({duration:e=300,keyframes:t,times:n,ease:i="easeInOut"}){var r;let a,s=Array.isArray(i)&&"number"!=typeof i[0]?i.map(x2):x2(i),o={done:!1,value:t[0]},l=function(e,t,{clamp:n=!0,ease:i,mixer:r}={}){let a=e.length;if(xj(a===t.length,"Both input and output ranges must be the same length","range-length"),1===a)return()=>t[0];if(2===a&&t[0]===t[1])return()=>t[1];let s=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let o=function(e,t,n){let i=[],r=n||xV.mix||CG,a=e.length-1;for(let n=0;n<a;n++){let a=r(e[n],e[n+1]);t&&(a=xL(Array.isArray(t)?t[n]||xP:t,a)),i.push(a)}return i}(t,i,r),l=o.length,u=n=>{if(s&&n<e[0])return t[0];let i=0;if(l>1)for(;i<e.length-2&&!(n<e[i+1]);i++);let r=xD(e[i],e[i+1],n);return o[i](r)};return n?t=>u(xR(e[0],e[a-1],t)):u}((r=n&&n.length===t.length?n:(function(e,t){let n=e[e.length-1];for(let i=1;i<=t;i++){let r=xD(0,t,i);e.push(CD(n,1,r))}}(a=[0],t.length-1),a),r.map(t=>t*e)),t,{ease:Array.isArray(s)?s:t.map(()=>s||xQ).splice(0,t.length-1)});return{calculatedDuration:e,next:t=>(o.value=l(t),o.done=t>=e,o)}}C6.applyToOptions=e=>{let t=function(e,t=100,n){let i=n({...e,keyframes:[0,t]}),r=Math.min(CJ(i),2e4);return{type:"keyframes",ease:e=>i.next(r*e).value/t,duration:r/1e3}}(e,100,C6);return e.ease=t.ease,e.duration=1e3*t.duration,e.type="keyframes",e};var kt=e=>null!==e;function kn(e,{repeat:t,repeatType:n="loop"},i,r=1){let a=e.filter(kt),s=r<0||t&&"loop"!==n&&t%2==1?0:a.length-1;return s&&void 0!==i?i:a[s]}var ki={decay:C8,inertia:C8,tween:ke,keyframes:ke,spring:C6};function kr(e){"string"==typeof e.type&&(e.type=ki[e.type])}var ka=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}},ks=e=>e/100,ko=class extends ka{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==Ct.now()&&this.tick(Ct.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},Cn.mainThread++,this.options=e,this.initAnimation(),this.play(),!1===e.autoplay&&this.pause()}initAnimation(){let{options:e}=this;kr(e);let{type:t=ke,repeat:n=0,repeatDelay:i=0,repeatType:r,velocity:a=0}=e,{keyframes:s}=e,o=t||ke;o!==ke&&"number"!=typeof s[0]&&(this.mixKeyframes=xL(ks,CG(s[0],s[1])),s=[0,100]);let l=o({...e,keyframes:s});"mirror"===r&&(this.mirroredGenerator=o({...e,keyframes:[...s].reverse(),velocity:-a})),null===l.calculatedDuration&&(l.calculatedDuration=CJ(l));let{calculatedDuration:u}=l;this.calculatedDuration=u,this.resolvedDuration=u+i,this.totalDuration=this.resolvedDuration*(n+1)-i,this.generator=l}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;null===this.holdTime?this.currentTime=t:this.currentTime=this.holdTime}tick(e,t=!1){let n,{generator:i,totalDuration:r,mixKeyframes:a,mirroredGenerator:s,resolvedDuration:o,calculatedDuration:l}=this;if(null===this.startTime)return i.next(0);let{delay:u=0,keyframes:c,repeat:d,repeatType:h,repeatDelay:p,type:f,onUpdate:m,finalKeyframe:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let v=this.currentTime-u*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?v<0:v>r;this.currentTime=Math.max(v,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=r);let b=this.currentTime,w=i;if(d){let e=Math.min(this.currentTime,r)/o,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,(t=Math.min(t,d+1))%2&&("reverse"===h?(n=1-n,p&&(n-=p/o)):"mirror"===h&&(w=s)),b=xR(0,1,n)*o}y?(this.delayState.value=c[0],n=this.delayState):n=w.next(b),a&&!y&&(n.value=a(n.value));let{done:x}=n;y||null===l||(x=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let C=null===this.holdTime&&("finished"===this.state||"running"===this.state&&x);return C&&f!==C8&&(n.value=kn(c,this.options,g,this.speed)),m&&m(n.value),C&&this.finish(),n}then(e,t){return this.finished.then(e,t)}get duration(){return this.calculatedDuration/1e3}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+e/1e3}get time(){return this.currentTime/1e3}set time(e){e*=1e3,this.currentTime=e,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){let e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);let t=this.generator.next(e).value;return C7(e=>this.generator.next(e).value,e,t)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(Ct.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=this.currentTime/1e3)}play(){if(this.isStopped)return;let{driver:e=CX,startTime:t}=this.options;this.driver||=e(e=>this.tick(e)),this.options.onPlay?.();let n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null===this.holdTime?this.startTime||=t??n:this.startTime=n-this.holdTime,"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Ct.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null,Cn.mainThread--}stopDriver(){this.driver&&=void this.driver.stop()}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}},kl=e=>180*e/Math.PI,ku=e=>kd(kl(Math.atan2(e[1],e[0]))),kc={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:ku,rotateZ:ku,skewX:e=>kl(Math.atan(e[1])),skewY:e=>kl(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},kd=e=>((e%=360)<0&&(e+=360),e),kh=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),kp=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),kf={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:kh,scaleY:kp,scale:e=>(kh(e)+kp(e))/2,rotateX:e=>kd(kl(Math.atan2(e[6],e[5]))),rotateY:e=>kd(kl(Math.atan2(-e[2],e[0]))),rotateZ:ku,rotate:ku,skewX:e=>kl(Math.atan(e[4])),skewY:e=>kl(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function km(e){return+!!e.includes("scale")}function kg(e,t){if(!e||"none"===e)return km(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),i,r;if(n)i=kf,r=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=kc,r=t}if(!r)return km(t);let a=i[t],s=r[1].split(",").map(kv);return"function"==typeof a?a(s):s[a]}function kv(e){return parseFloat(e.trim())}var ky=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],kb=new Set(ky),kw=e=>e===Cu||e===Ck,kx=new Set(["x","y","z"]),kC=ky.filter(e=>!kx.has(e)),kk={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:i})=>{let r=e.max-e.min;return"border-box"===i?r:r-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:i})=>{let r=e.max-e.min;return"border-box"===i?r:r-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>kg(t,"x"),y:(e,{transform:t})=>kg(t,"y")};kk.translateX=kk.x,kk.translateY=kk.y;var kS=new Set,kT=!1,kA=!1,kE=!1;function kM(){if(kA){let e=Array.from(kS).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;
14t.forEach(e=>{let t,i=(t=[],kC.forEach(n=>{let i=e.getValue(n);void 0!==i&&(t.push([n,i.get()]),i.set(+!!n.startsWith("scale")))}),t);i.length&&(n.set(e,i),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)})}kA=!1,kT=!1,kS.forEach(e=>e.complete(kE)),kS.clear()}function k_(){kS.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(kA=!0)})}var kR=class{constructor(e,t,n,i,r,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=i,this.element=r,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(kS.add(this),kT||(kT=!0,x6.read(k_),x6.resolveKeyframes(kM))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:i}=this;if(null===e[0]){let r=i?.get(),a=e[e.length-1];if(void 0!==r)e[0]=r;else if(n&&t){let i=n.readValue(t,a);null!=i&&(e[0]=i)}void 0===e[0]&&(e[0]=a),i&&void 0===r&&i.set(e[0])}for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),kS.delete(this)}cancel(){"scheduled"===this.state&&(kS.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}};function kI(e,t,n){t.startsWith("--")?e.style.setProperty(t,n):e.style[t]=n}var kj={};function kV(e,t){let n=xO(e);return()=>kj[t]??n()}var kO=kV(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),kP=kV(()=>{try{document.createElement("div").animate({opacity:0}
14,{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),kN=([e,t,n,i])=>`cubic-bezier(${e}, ${t}, ${n}, ${i})`,kL={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:kN([0,.65,.55,1]),circOut:kN([.55,0,1,.45]),backIn:kN([.31,.01,.66,-.59]),backOut:kN([.33,1.53,.69,.99])};function kD(e){return"function"==typeof e&&"applyToOptions"in e}var kF=class extends ka{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:i,pseudoElement:r,allowFlatten:a=!1,finalKeyframe:s,onComplete:o}=e;this.isPseudoElement=!!r,this.allowFlatten=a,this.options=e,xj("string"!=typeof e.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");let l=function({type:e,...t}){return kD(e)&&kP()?e.applyToOptions(t):(t.duration??=300,t.ease??="easeOut",t)}(e);this.animation=function(e,t,n,{delay:i=0,duration:r=300,repeat:a=0,repeatType:s="loop",ease:o="easeOut",times:l}={},u){let c={[t]:n};l&&(c.offset=l);let d=function e(t,n){if(t)return"function"==typeof t?kP()?CZ(t,n):"ease-out":x0(t)?kN(t):Array.isArray(t)?t.map(t=>e(t,n)||kL.easeOut):kL[t]}(o,r);Array.isArray(d)&&(c.easing=d);let h={delay:i,duration:r,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:a+1,direction:"reverse"===s?"alternate":"normal"};u&&(h.pseudoElement=u);let p=e.animate(c,h);return p}(t,n,i,l,r),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){let e=kn(i,this.options,s,this.speed);this.updateMotionValue&&this.updateMotionValue(e),kI(t,n,e),this.animation.cancel()}o?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;"idle"===e||"finished"===e||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){return Number(this.animation.effect?.getComputedTiming?.().duration||0)/1e3}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+e/1e3}get time(){return(Number(this.animation.currentTime)||0)/1e3}set time(e){let t=null!==this.finishedTime;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=1e3*e,t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return null===this.finishedTime?this.animation.playState:"finished"}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:t,rangeEnd:n,observe:i}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&kO()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),xP):i(this)}},kB={anticipate:xq,backInOut:xK,circInOut:xX},k$=class extends kF{constructor(e){(function(e){"string"==typeof e.ease&&e.ease in kB&&(e.ease=kB[e.ease])})(e),kr(e),super(e),void 0!==e.startTime&&!1!==e.autoplay&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:i,element:r,...a}=this.options;if(!t)return;if(void 0!==e)return void t.set(e);let s=new ko({...a,autoplay:!1}),o=Math.max(10,Ct.now()-this.startTime),l=xR(0,10,o-10),u=s.sample(o).value,{name:c}=this.options;r&&c&&kI(r,c,u),t.setWithVelocity(s.sample(Math.max(0,o-l)).value,u,l),s.stop()}},kU=(e,t)=>"zIndex"!==t&&!!("number"==typeof e||Array.isArray(e)||"string"==typeof e&&(CP.test(e)||"0"===e)&&!e.startsWith("url("));function kW(e){e.duration=0,e.type="keyframes"}var kz=new Set(["opacity","clipPath","filter","transform"]),kH=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/,kK=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),kq=xO(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),kY=class extends ka{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:a="loop",keyframes:s,name:o,motionValue:l,element:u,...c}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Ct.now();let d={autoplay:e,delay:t,type:n,repeat:i,repeatDelay:r,repeatType:a,name:o,motionValue:l,element:u,...c};this.keyframeResolver=new(u?.KeyframeResolver||kR)(s,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),o,l,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,i){this.keyframeResolver=void 0;let{name:r,type:a,velocity:s,delay:o,isHandoff:l,onUpdate:u}=n;this.resolvedAt=Ct.now();let c=!0;(function(e,t,n,i){let r=e[0];if(null===r)return!1;if("display"===t||"visibility"===t)return!0;let a=e[e.length-1],s=kU(r,t),o=kU(a,t);return xI(s===o,`You are trying to animate ${t} from "${r}" to "${a}". "${s?a:r}" is not an animatable value.`,"value-not-animatable"),!!s&&!!o&&(function(e){let t=e[0];if(1===e.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}(e)||("spring"===n||kD(n))&&i)})(e,r,a,s)||(c=!1,(xV.instantAnimations||!o)&&u?.(kn(e,n,t)),e[0]=e[e.length-1],kW(n),n.repeat=0);let d={startTime:i?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},h=c&&!l&&function(e){let{motionValue:t,name:n,repeatDelay:i,repeatType:r,damping:a,type:s,keyframes:o}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;
14let{onUpdate:l,transformTemplate:u}=t.owner.getProps();return kq()&&n&&(kz.has(n)||kK.has(n)&&function(e){for(let t=0;t<e.length;t++)if("string"==typeof e[t]&&kH.test(e[t]))return!0;return!1}(o))&&("transform"!==n||!u)&&!l&&!i&&"mirror"!==r&&0!==a&&"inertia"!==s}(d),p=d.motionValue?.owner?.current,f;if(h)try{f=new k$({...d,element:p})}catch{f=new ko(d)}else f=new ko(d);f.finished.then(()=>{this.notifyFinished()}).catch(xP),this.pendingTimeline&&=void(this.stopTimeline=f.attachTimeline(this.pendingTimeline)),this._animation=f}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),kE=!0,k_(),kM(),kE=!1),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}};function kG(e,t,n,i=0,r=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),s=e.size,o=(s-1)*i;return"function"==typeof n?n(a,s):1===r?a*i:o-a*i}var kX=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u,kZ={type:"spring",stiffness:500,damping:25,restSpeed:10},kJ={type:"keyframes",duration:.8},kQ={type:"keyframes",ease:[.25,.1,.35,1],duration:.3};function k0(e,t){if(e?.inherit&&t){let{inherit:n,...i}=e;return{...t,...i}}return e}function k1(e,t){let n=e?.[t]??e?.default??e;return n===e?n:k0(n,e)}var k2=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]),k3=(e,t,n,i={},r,a)=>s=>{let o=k1(i,e)||{},l=o.delay||i.delay||0,{elapsed:u=0}=i;u-=1e3*l;let c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...o,delay:-u,onUpdate:e=>{t.set(e),o.onUpdate&&o.onUpdate(e)},onComplete:()=>{s(),o.onComplete&&o.onComplete()},name:e,motionValue:t,element:a?void 0:r};(function(e){for(let t in e)if(!k2.has(t))return!0;return!1})(o)||Object.assign(c,((e,{keyframes:t})=>t.length>2?kJ:kb.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:kZ:kQ)(e,c)),c.duration&&=1e3*c.duration,c.repeatDelay&&=1e3*c.repeatDelay,void 0!==c.from&&(c.keyframes[0]=c.from);let d=!1;if(!1!==c.type&&(0!==c.duration||c.repeatDelay)||(kW(c),0===c.delay&&(d=!0)),(xV.instantAnimations||xV.skipAnimations||r?.shouldSkipAnimations)&&(d=!0,kW(c),c.delay=0),c.allowFlatten=!o.type&&!o.ease,d&&!a&&void 0!==t.get()){let e=kn(c.keyframes,o);if(void 0!==e)return void x6.update(()=>{c.onUpdate(e),c.onComplete()})}return o.isSync?new ko(c):new kY(c)};function k5(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function k4(e,t,n,i){if("function"==typeof t){let[r,a]=k5(i);t=t(void 0===n?e.custom:n,r,a)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){let[r,a]=k5(i);t=t(void 0===n?e.custom:n,r,a)}return t}function k9(e,t,n){let i=e.getProps();return k4(i,t,void 0===n?i.custom:n,e)}var k6=new Set(["width","height","top","left","right","bottom",...ky]),k7=void 0,k8=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=Ct.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=Ct.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=!isNaN(parseFloat(this.current)))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new xF);let n=this.events[e].add(t);return"change"===e?()=>{n(),x6.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}
14setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||=new Set,this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return k7&&k7.push(this),this.current}getPrevious(){return this.prev}getVelocity(){var e;let t=Ct.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;let n=Math.min(this.updatedAt-this.prevUpdatedAt,30);return e=parseFloat(this.current)-parseFloat(this.prevFrameValue),n?1e3/n*e:0}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function Se(e,t){return new k8(e,t)}var St=e=>Array.isArray(e),Sn=e=>!!(e&&e.getVelocity);function Si(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var Sr="data-"+Si("framerAppearId");function Sa(e,t,{delay:n=0,transitionOverride:i,type:r}={}){let{transition:a,transitionEnd:s,...o}=t,l=e.getDefaultTransition();a=a?k0(a,l):l;let u=a?.reduceMotion;i&&(a=i);let c=[],d=r&&e.animationState&&e.animationState.getState()[r];for(let t in o){let i=e.getValue(t,e.latestValues[t]??null),r=o[t];if(void 0===r||d&&function({protectedKeys:e,needsAnimating:t},n){let i=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,i}(d,t))continue;let s={delay:n,...k1(a||{},t)},l=i.get();if(void 0!==l&&!i.isAnimating()&&!Array.isArray(r)&&r===l&&!s.velocity){x6.update(()=>i.set(r));continue}let h=!1;if(window.MotionHandoffAnimation){let n=e.props[Sr];if(n){let e=window.MotionHandoffAnimation(n,t,x6);null!==e&&(s.startTime=e,h=!0)}}!function(e,t){let n=e.getValue("willChange");if(Sn(n)&&n.add)return n.add(t);if(!n&&xV.WillChange){let n=new xV.WillChange("auto");e.addValue("willChange",n),n.add(t)}}(e,t);let p=u??e.shouldReduceMotion;i.start(k3(t,i,r,p&&k6.has(t)?{type:!1}:s,e,h));let f=i.animation;f&&c.push(f)}if(s){let t=()=>x6.update(()=>{s&&function(e,t){let{transitionEnd:n={},transition:i={},...r}=k9(e,t)||{};for(let t in r={...r,...n}){var a,s;s=St(a=r[t])?a[a.length-1]||0:a,e.hasValue(t)?e.getValue(t).set(s):e.addValue(t,Se(s))}}(e,s)});c.length?Promise.all(c).then(t):t()}return c}function Ss(e,t,n={}){let i=k9(e,t,"exit"===n.type?e.presenceContext?.custom:void 0),{transition:r=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(r=n.transitionOverride);let a=i?()=>Promise.all(Sa(e,i,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(i=0)=>{let{delayChildren:a=0,staggerChildren:s,staggerDirection:o}=r;return function(e,t,n=0,i=0,r=0,a=1,s){let o=[];for(let l of e.variantChildren)l.notify("AnimationStart",t),o.push(Ss(l,t,{...s,delay:n+("function"==typeof i?0:i)+kG(e.variantChildren,l,i,r,a)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(o)}(e,t,i,a,s,o,n)}:()=>Promise.resolve(),{when:o}=r;if(!o)return Promise.all([a(),s(n.delay)]);{let[e,t]="beforeChildren"===o?[a,s]:[s,a];return e().then(()=>t())}}var So=e=>t=>t.test(e),Sl=[Cu,Ck,CC,Cx,CT,CS,{test:e=>"auto"===e,parse:e=>e}],Su=e=>Sl.find(So(e)),Sc=new Set(["brightness","contrast","saturate","opacity"]);function Sd(e){let[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;let[i]=n.match(Cp)||[];if(!i)return e;let r=n.replace(i,""),a=+!!Sc.has(t);return i!==n&&(a*=100),t+"("+a+r+")"}var Sh=/\b([a-z-]*)\(.*?\)/gu,Sp={...CP,getAnimatableNone:e=>{let t=e.match(Sh);return t?t.map(Sd).join(" "):e}},Sf={...CP,getAnimatableNone:e=>{let t=CP.parse(e);return CP.createTransformer(e)(t.map(e=>"number"==typeof e?0:"object"==typeof e?{...e,alpha:1}:e))}},Sm={...Cu,transform:Math.round},Sg={borderWidth:Ck,borderTopWidth:Ck,borderRightWidth:Ck,borderBottomWidth:Ck,borderLeftWidth:Ck,borderRadius:Ck,borderTopLeftRadius:Ck,borderTopRightRadius:Ck,borderBottomRightRadius:Ck,borderBottomLeftRadius:Ck,width:Ck,maxWidth:Ck,height:Ck,maxHeight:Ck,top:Ck,right:Ck,bottom:Ck,left:Ck,inset:Ck,insetBlock:Ck,insetBlockStart:Ck,insetBlockEnd:Ck,insetInline:Ck,insetInlineStart:Ck,insetInlineEnd:Ck,padding:Ck,paddingTop:Ck,paddingRight:Ck,paddingBottom:Ck,paddingLeft:Ck,paddingBlock:Ck,paddingBlockStart:Ck,paddingBlockEnd:Ck,paddingInline:Ck,paddingInlineStart:Ck,paddingInlineEnd:Ck,margin:Ck,marginTop:Ck,marginRight:Ck,marginBottom:Ck,marginLeft:Ck,marginBlock:Ck,marginBlockStart:Ck,marginBlockEnd:Ck,marginInline:Ck,marginInlineStart:Ck,marginInlineEnd:Ck,fontSize:Ck,backgroundPositionX:Ck,backgroundPositionY:Ck,rotate:Cx,rotateX:Cx,rotateY:Cx,rotateZ:Cx,scale:Cd,scaleX:Cd,scaleY:Cd,scaleZ:Cd,skew:Cx,skewX:Cx,skewY:Cx,distance:Ck,translateX:Ck,translateY:Ck,translateZ:Ck,x:Ck,y:Ck,z:Ck,perspective:Ck,transformPerspective:Ck,opacity:Cc,originX:CA,originY:CA,originZ:Ck,zIndex:Sm,fillOpacity:Cc,strokeOpacity:Cc,numOctaves:Sm},Sv={...Sg,color:CM,backgroundColor:CM,outlineColor:CM,fill:CM,stroke:CM,borderColor:CM,borderTopColor:CM,borderRightColor:CM,borderBottomColor:CM,borderLeftColor:CM,filter:Sp,WebkitFilter:Sp,mask:Sf,WebkitMask:Sf},Sy=e=>Sv[e],Sb=new Set([Sp,Sf]);function Sw(e,t){let n=Sy(e);return Sb.has(n)||(n=CP),n.getAnimatableNone?n.getAnimatableNone(t):void 0}
14var Sx=new Set(["auto","none","0"]),SC=class extends kR{constructor(e,t,n,i,r){super(e,t,n,i,r,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let i=e[n];if("string"==typeof i&&Cs(i=i.trim())){let r=function e(t,n,i=1){xj(i<=4,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");let[r,a]=function(e){let t=kX.exec(e);if(!t)return[,];let[,n,i,r]=t;return[`--${n??i}`,r]}(t);if(!r)return;let s=window.getComputedStyle(n).getPropertyValue(r);if(s){let e=s.trim();return/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e)?parseFloat(e):e}return Cs(a)?e(a,n,i+1):a}(i,t.current);void 0!==r&&(e[n]=r),n===e.length-1&&(this.finalKeyframe=i)}}if(this.resolveNoneKeyframes(),!k6.has(n)||2!==e.length)return;let[i,r]=e,a=Su(i),s=Su(r);if(Cl(i)!==Cl(r)&&kk[n]){this.needsMeasurement=!0;return}if(a!==s)if(kw(a)&&kw(s))for(let t=0;t<e.length;t++){let n=e[t];"string"==typeof n&&(e[t]=parseFloat(n))}else kk[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(null===e[t]||function(e){return"number"==typeof e?0===e:null===e||"none"===e||"0"===e||/^0[^.\s]+$/u.test(e)}(e[t]))&&n.push(t);n.length&&function(e,t,n){let i=0,r;for(;i<e.length&&!r;){let t=e[i];"string"==typeof t&&!Sx.has(t)&&CV(t).values.length&&(r=e[i]),i++}if(r&&n)for(let i of t)e[i]=Sw(n,r)}(e,n,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=kk[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let i=t[t.length-1];void 0!==i&&e.getValue(n,i).jump(i,!1)}measureEndState(){let{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;let i=e.getValue(t);i&&i.jump(this.measuredOrigin,!1);let r=n.length-1,a=n[r];n[r]=kk[t](e.measureViewportBox(),window.getComputedStyle(e.current)),null!==a&&void 0===this.finalKeyframe&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEac
14h(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}},Sk=(e,t)=>t&&"number"==typeof e?t.transform(e):e,{schedule:SS}=x5(queueMicrotask,!1);function ST(e,t){let n=function(e){if(null==e)return[];if(e instanceof EventTarget)return[e];if("string"==typeof e){let t=document,n=(void 0)??t.querySelectorAll(e);return n?Array.from(n):[]}return Array.from(e).filter(e=>null!=e)}(e),i=new AbortController;return[n,{passive:!0,...t,signal:i.signal},()=>i.abort()]}var SA=(e,t)=>!!t&&(e===t||SA(e,t.parentElement)),SE=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]),SM=new WeakSet;function S_(e){return t=>{"Enter"===t.key&&e(t)}}function SR(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}function SI(e){return"mouse"===e.pointerType?"number"!=typeof e.button||!!(e.button<=0):!1!==e.isPrimary}var Sj=new WeakSet,SV=[...Sl,CM,CP],SO=()=>({min:0,max:0}),SP=()=>({x:SO(),y:SO()}),SN=new WeakMap;function SL(e){return"object"==typeof e&&!!e&&"function"==typeof e.start}function SD(e){return"string"==typeof e||Array.isArray(e)}var SF=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],SB=["initial",...SF];function S$(e){return SL(e.animate)||SB.some(t=>SD(e[t]))}function SU(e){return!!(S$(e)||e.variants)}var SW={current:null},Sz={current:!1},SH="u">typeof window,SK=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Sq={},SY=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:i,skipAnimations:r,blockInitialAnimation:a,visualState:s},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=kR,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=Ct.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,x6.render(this.render,!1,!0))};let{latestValues:l,renderState:u}=s;this.latestValues=l,this.baseTarget={...l},this.initialValues=t.initial?{...l}:{},this.renderState=u,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=r,this.options=o,this.blockInitialAnimation=!!a,this.isControllingVariants=S$(t),this.isVariantNode=SU(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:c,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in d){let t=d[e];void 0!==l[e]&&Sn(t)&&t.set(l[e])}}mount(e){if(this.hasBeenMounted)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];this.current=e,SN.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(Sz.current||function(){if(Sz.current=!0,SH)if(window.matchMedia){let e=window.matchMedia("(prefers-reduced-motion)"),t=()=>SW.current=e.matches;e.addEventListener("change",t),t()}else SW.current=!1}(),this.shouldReduceMotion=SW.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){for(let e in this.projection&&this.projection.unmount(),x7(this.notifyUpdate),x7(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this),this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??=new Set,this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&kz.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:i,times:r,ease:a,duration:s}=t.accelerate,o=new kF({element:this.current,name:e,keyframes:i,times:r,ease:a,duration:1e3*s}),l=n(o);this.valueSubscriptions.set(e,()=>{l(),o.cancel()});return}let n=kb.has(e);n&&this.onBindTransform&&this.onBindTransform();let i=t.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&x6.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),r;"u">typeof window&&window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{i(),r&&r(),t.owner&&t.stop()})}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in Sq){let t=Sq[e];if(!t)continue;let{isEnabled:n,Feature:i}=t;if(!this.features[e]&&i&&n(this.props)&&(this.features[e]=new i(this)),this.features[e]){let t=this.features[e];
14t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):SP()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<SK.length;t++){let n=SK[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let i=e["on"+n];i&&(this.propEventSubscriptions[n]=this.on(n,i))}this.prevMotionValues=function(e,t,n){for(let i in t){let r=t[i],a=n[i];if(Sn(r))e.addValue(i,r);else if(Sn(a))e.addValue(i,Se(r,{owner:e}));else if(a!==r)if(e.hasValue(i)){let t=e.getValue(i);!0===t.liveStyle?t.jump(r):t.hasAnimated||t.set(r)}else{let t=e.getStaticValue(i);e.addValue(i,Se(void 0===t?r:t,{owner:e}))}}for(let i in n)void 0===t[i]&&e.removeValue(i);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=Se(null===t?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n,i,r,a=void 0===this.latestValues[e]&&this.current?this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];return null!=a&&("string"==typeof a&&(n=a,/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(n)||(i=a,/^0[^.\s]+$/u.test(i)))?a=parseFloat(a):(r=a,!SV.find(So(r))&&CP.test(t)&&(a=Sw(e,t))),this.setBaseTarget(e,Sn(a)?a.get():a)),Sn(a)?a.get():a}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let{initial:t}=this.props,n;if("string"==typeof t||"object"==typeof t){let i=k4(this.props,t,this.presenceContext?.custom);i&&(n=i[e])}if(t&&void 0!==n)return n;let i=this.getBaseTargetFromProps(this.props,e);return void 0===i||Sn(i)?void 0!==this.initialValues[e]&&void 0===n?void 0:this.baseTarget[e]:i}on(e,t){return this.events[e]||(this.events[e]=new xF),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){SS.render(this.render)}},SG=class extends SY{constructor(){super(...arguments),this.KeyframeResolver=SC}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;Sn(e)&&(this.childSubscription=e.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}},SX=class{constructor(e){this.isMounted=!1,this.node=e}update(){}},SZ={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},SJ=ky.length;function SQ(e,t,n){let{style:i,vars:r,transformOrigin:a}=e,s=!1,o=!1;for(let e in t){let n=t[e];if(kb.has(e)){s=!0;continue}if(Cr(e)){r[e]=n;continue}{let t=Sk(n,Sg[e]);e.startsWith("origin")?(o=!0,a[e]=t):i[e]=t}}if(t.transform||(s||n?i.transform=function(e,t,n){let i="",r=!0;for(let a=0;a<SJ;a++){let s=ky[a],o=e[s];if(void 0===o)continue;let l=!0;if("number"==typeof o)l=o===+!!s.startsWith("scale");else{let e=parseFloat(o);l=s.startsWith("scale")?1===e:0===e}if(!l||n){let e=Sk(o,Sg[s]);if(!l){r=!1;let t=SZ[s]||s;i+=`${t}(${e}) `}n&&(t[s]=e)}}return i=i.trim(),n?i=n(t,r?"":i):r&&(i="none"),i}(t,e.transform,n):i.transform&&="none"),o){let{originX:e="50%",originY:t="50%",originZ:n=0}=a;i.transformOrigin=`${e} ${t} ${n}`}}function S0(e,{style:t,vars:n},i,r){let a=e.style,s;for(s in t)a[s]=t[s];for(s in r?.applyProjectionStyles(a,i),n)a.setProperty(s,n[s])}function S1(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var S2={correct:(e,t)=>
14{if(!t.target)return e;if("string"==typeof e)if(!Ck.test(e))return e;else e=parseFloat(e);return`${S1(e,t.target.x)}% ${S1(e,t.target.y)}%`}},S3={borderRadius:{...S2,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:S2,borderTopRightRadius:S2,borderBottomLeftRadius:S2,borderBottomRightRadius:S2,boxShadow:{correct:(e,{treeScale:t,projectionDelta:n})=>{let i=CP.parse(e);if(i.length>5)return e;let r=CP.createTransformer(e),a=+("number"!=typeof i[0]),s=n.x.scale*t.x,o=n.y.scale*t.y;i[0+a]/=s,i[1+a]/=o;let l=CD(s,o,.5);return"number"==typeof i[2+a]&&(i[2+a]/=l),"number"==typeof i[3+a]&&(i[3+a]/=l),r(i)}}};function S5(e,{layout:t,layoutId:n}){return kb.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!S3[e]||"opacity"===e)}function S4(e,t,n){let i=e.style,r=t?.style,a={};if(!i)return a;for(let t in i)(Sn(i[t])||r&&Sn(r[t])||S5(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=i[t]);return a}var S9=class extends SG{constructor(){super(...arguments),this.type="html",this.renderInstance=S0}readValueFromInstance(e,t){if(kb.has(t))return this.projection?.isProjecting?km(t):((e,t)=>{let{transform:n="none"}=getComputedStyle(e);return kg(n,t)})(e,t);{let n=window.getComputedStyle(e),i=(Cr(t)?n.getPropertyValue(t):n[t])||0;return"string"==typeof i?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:t}){return function({top:e,left:t,right:n,bottom:i}){return{x:{min:t,max:n},y:{min:e,max:i}}}(function(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),i=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}(e.getBoundingClientRect(),t))}build(e,t,n){SQ(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return S4(e,t,n)}},S6={offset:"stroke-dashoffset",array:"stroke-dasharray"},S7={offset:"strokeDashoffset",array:"strokeDasharray"},S8=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Te(e,{attrX:t,attrY:n,attrScale:i,pathLength:r,pathSpacing:a=1,pathOffset:s=0,...o},l,u,c){if(SQ(e,o,u),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:h}=e;for(let e of(d.transform&&(h.transform=d.transform,delete d.transform),(h.transform||d.transformOrigin)&&(h.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),h.transform&&(h.transformBox=c?.transformBox??"fill-box",delete d.transformBox),S8))void 0!==d[e]&&(h[e]=d[e],delete d[e]);void 0!==t&&(d.x=t),void 0!==n&&(d.y=n),void 0!==i&&(d.scale=i),void 0!==r&&function(e,t,n=1,i=0,r=!0){e.pathLength=1;let a=r?S6:S7;e[a.offset]=`${-i}`,e[a.array]=`${t} ${n}`}(d,r,a,s,!1)}var Tt=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),Tn=e=>"string"==typeof e&&"svg"===e.toLowerCase();function Ti(e,t,n){let i=S4(e,t,n);for(let n in e)(Sn(e[n])||Sn(t[n]))&&(i[-1===ky.indexOf(n)?n:"attr"+n.charAt(0).toUpperCase()+n.substring(1)]=e[n]);return i}var Tr=class extends SG{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=SP}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(kb.has(t)){let e=Sy(t);return e&&e.default||0}return t=Tt.has(t)?t:Si(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return Ti(e,t,n)}
14build(e,t,n){Te(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,i){for(let n in S0(e,t,void 0,i),t.attrs)e.setAttribute(Tt.has(n)?n:Si(n),t.attrs[n])}mount(e){this.isSVGTag=Tn(e.tagName),super.mount(e)}},Ta=SB.length;function Ts(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let i=0;i<n;i++)if(t[i]!==e[i])return!1;return!0}var To=[...SF].reverse(),Tl=SF.length;function Tu(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Tc(){return{animate:Tu(!0),whileInView:Tu(),whileHover:Tu(),whileTap:Tu(),whileDrag:Tu(),whileFocus:Tu(),exit:Tu()}}function Td(e,t,n,i={passive:!0}){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n)}var Th=(0,iV.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),Tp=(0,iV.createContext)({strict:!1}),Tf={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Tm=!1;function Tg(){return function(){if(Tm)return;let e={};for(let t in Tf)e[t]={isEnabled:e=>Tf[t].some(t=>!!e[t])};Sq=e,Tm=!0}(),Sq}function Tv(e){let t=Tg();for(let n in e)t[n]={...t[n],...e[n]};Sq=t}function Ty({children:e,features:t,strict:n=!1}){let[,i]=(0,iV.useState)(!Tb(t)),r=(0,iV.useRef)(void 0);if(!Tb(t)){let{renderer:e,...n}=t;r.current=e,Tv(n)}return(0,iV.useEffect)(()=>{Tb(t)&&t().then(({renderer:e,...t})=>{Tv(t),r.current=e,i(!0)})},[]),(0,a6.jsx)(Tp.Provider,{value:{renderer:r.current,strict:n},children:e})}function Tb(e){return"function"==typeof e}var Tw=new Set("animate.exit.variants.initial.style.values.variants.transition.transformTemplate.custom.inherit.onBeforeLayoutMeasure.onAnimationStart.onAnimationComplete.onUpdate.onDragStart.onDrag.onDragEnd.onMeasureDragConstraints.onDirectionLock.onDragTransitionEnd._dragX._dragY.onHoverStart.onHoverEnd.onViewportEnter.onViewportLeave.globalTapTarget.propagate.ignoreStrict.viewport".split("."));function Tx(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Tw.has(e)}var TC,Tk=((e,t)=>{let n={};for(var i in e)xk(n,i,{get:e[i],enumerable:!0});return t||xk(n,Symbol.toStringTag,{value:"Module"}),n})({default:()=>TC}),TS=(p=()=>{throw TC={},Error('Could not resolve "@emotion/is-prop-valid" imported by "framer-motion". Is it installed?')},()=>(p&&(f=p(p=0)),f)),TT=e=>!Tx(e);try{AF=(TS(),xA.call(Tk,"module.exports")?Tk["module.exports"]:((e,t,n,i)=>{if(t&&"object"==typeof t||"function"==typeof t)for(var r,a=xT(t),s=0,o=a.length;s<o;s++)r=a[s],xA.call(e,r)||r===n||xk(e,r,{get:(e=>t[e]).bind(null,r),enumerable:!(i=xS(t,r))||i.enumerable});return e})(xk({},"__esModule",{value:!0}),Tk)).default,"function"==typeof AF&&(TT=e=>e.startsWith("on")?!Tx(e):AF(e))}catch{}var TA=(0,iV.createContext)({});function TE(e){return Array.isArray(e)?e.join(" "):e}var TM=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function T_(e,t,n){for(let i in t)Sn(t[i])||S5(i,n)||(e[i]=t[i])}var TR=()=>({...TM(),attrs:{}}),TI=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Tj(e){return!("string"!=typeof e||e.includes("-"))&&!!(TI.indexOf(e)>-1||/[A-Z]/u.test(e))}var TV=e=>(t,n)=>{let i,r=(0,iV.useContext)(TA),a=(0,iV.useContext)(x_),s=()=>(function({scrapeMotionValuesFromProps:e,createRenderState:t},n,i,r){return{latestValues:function(e,t,n,i){let r={},a=i(e,{});for(let e in a){var s;r[e]=Sn(s=a[e])?s.get():s}let{initial:o,animate:l}=e,u=S$(e),c=SU(e);t&&c&&!u&&!1!==e.inherit&&(void 0===o&&(o=t.initial),void 0===l&&(l=t.animate));let d=!!n&&!1===n.initial,h=(d||=!1===o)?l:o;if(h&&"boolean"!=typeof h&&!SL(h)){let t=Array.isArray(h)?h:[h];for(let n=0;n<t.length;n++){let i=k4(e,t[n]);if(i){let{transitionEnd:e,transition:t,...n}=i;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=d?t.length-1:0;t=t[e]}null!==t&&(r[e]=t)}for(let t in e)r[t]=e[t]}}}return r}(n,i,r,e),renderState:t()}})(e,t,r,a);return n?s():(null===(i=(0,iV.useRef)(null)).current&&(i.current=s()),i.current)},TO=TV({scrapeMotionValuesFromProps:S4,createRenderState:TM}),TP=TV({scrapeMotionValuesFromProps:Ti,createRenderState:TR}),TN=Symbol.for("motionComponentSymbol"),TL=(0,iV.createContext)({}),TD=class extends SX{constructor(e){super(e),e.animationState||=function(e){let t=t=>Promise.all(t.map(({animation:t,options:n})=>(function(e,t,n={}){let i;if(e.notify("AnimationStart",t),Array.isArray(t))i=Promise.all(t.map(t=>Ss(e,t,n)));else if("string"==typeof t)i=Ss(e,t,n);else{let r="function"==typeof t?k9(e,t,n.custom):t;i=Promise.all(Sa(e,r,n))}return i.then(()=>
14{e.notify("AnimationComplete",t)})})(e,t,n))),n=Tc(),i=!0,r=!1,a=t=>(n,i)=>{let r=k9(e,i,"exit"===t?e.presenceContext?.custom:void 0);if(r){let{transition:e,transitionEnd:t,...i}=r;n={...n,...i,...t}}return n};function s(s){let{props:o}=e,l=function e(t){if(!t)return;if(!t.isControllingVariants){let n=t.parent&&e(t.parent)||{};return void 0!==t.props.initial&&(n.initial=t.props.initial),n}let n={};for(let e=0;e<Ta;e++){let i=SB[e],r=t.props[i];(SD(r)||!1===r)&&(n[i]=r)}return n}(e.parent)||{},u=[],c=new Set,d={},h=1/0;for(let t=0;t<Tl;t++){var p,f;let m=To[t],g=n[m],v=void 0===o[m]?l[m]:o[m],y=SD(v),b=m===s?g.isActive:null;!1===b&&(h=t);let w=v===l[m]&&v!==o[m]&&y;if(w&&(i||r)&&e.manuallyAnimateOnMount&&(w=!1),g.protectedKeys={...d},!g.isActive&&null===b||!v&&!g.prevProp||SL(v)||"boolean"==typeof v)continue;if("exit"===m&&g.isActive&&!0!==b){g.prevResolvedValues&&(d={...d,...g.prevResolvedValues});continue}let x=(p=g.prevProp,"string"==typeof(f=v)?f!==p:!!Array.isArray(f)&&!Ts(f,p)),C=x||m===s&&g.isActive&&!w&&y||t>h&&y,k=!1,S=Array.isArray(v)?v:[v],T=S.reduce(a(m),{});!1===b&&(T={});let{prevResolvedValues:A={}}=g,E={...A,...T},M=t=>{C=!0,c.has(t)&&(k=!0,c.delete(t)),g.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)};for(let e in E){let t=T[e],n=A[e];if(!d.hasOwnProperty(e))(St(t)&&St(n)?Ts(t,n):t===n)?void 0!==t&&c.has(e)?M(e):g.protectedKeys[e]=!0:null==t?c.add(e):M(e)}g.prevProp=v,g.prevResolvedValues=T,g.isActive&&(d={...d,...T}),(i||r)&&e.blockInitialAnimation&&(C=!1);let _=w&&x;C&&(!_||k)&&u.push(...S.map(t=>{let n={type:m};if("string"==typeof t&&(i||r)&&!_&&e.manuallyAnimateOnMount&&e.parent){let{parent:i}=e,r=k9(i,t);if(i.enteringChildren&&r){let{delayChildren:t}=r.transition||{};n.delay=kG(i.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(c.size){let t={};if("boolean"!=typeof o.initial){let n=k9(e,Array.isArray(o.initial)?o.initial[0]:o.initial);n&&n.transition&&(t.transition=n.transition)}c.forEach(n=>{let i=e.getBaseTarget(n),r=e.getValue(n);r&&(r.liveStyle=!0),t[n]=i??null}),u.push({animation:t})}let m=!!u.length;return i&&(!1===o.initial||o.initial===o.animate)&&!e.manuallyAnimateOnMount&&(m=!1),i=!1,r=!1,m?t(u):Promise.resolve()}return{animateChanges:s,setActive:function(t,i){if(n[t].isActive===i)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,i)),n[t].isActive=i;let r=s(t);for(let e in n)n[e].protectedKeys={};return r},setAnimateFunction:function(n){t=n(e)},getState:()=>n,reset:()=>{n=Tc(),r=!0}}}(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();SL(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},TF=0;function TB(e){return{point:{x:e.pageX,y:e.pageY}}}function T$(e,t,n){let{props:i}=e;e.animationState&&i.whileHover&&e.animationState.setActive("whileHover","Start"===n);let r=i["onHover"+n];r&&x6.postRender(()=>r(t,TB(t)))}var TU=class extends SX{mount(){let{current:e}=this.node;e&&(this.unmount=function(e,t,n={}){let[i,r,a]=ST(e,n);return i.forEach(e=>{let n=!1,i=!1,a,s=t=>{a&&=void a(t),e.removeEventListener("pointerleave",l)},o=e=>{n=!1,window.removeEventListener("pointerup",o),window.removeEventListener("pointercancel",o),i&&(i=!1,s(e))},l=e=>{if("touch"!==e.pointerType){if(n){i=!0;return}s(e)}};e.addEventListener("pointerenter",n=>{if("touch"===n.pointerType)return;i=!1;let s=t(e,n);"function"==typeof s&&(a=s,e.addEventListener("pointerleave",l,r))},r),e.addEventListener("pointerdown",()=>{n=!0,window.addEventListener("pointerup",o,r),window.addEventListener("pointercancel",o,r)},r)}),a}(e,(e,t)=>(T$(this.node,t,"Start"),e=>T$(this.node,e,"End"))))}unmount(){}},TW=class extends SX{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=xL(Td(this.node.current,"focus",()=>this.onFocus()),Td(this.node.current,"blur",()=>this.onBlur()))}unmount(){}};function Tz(e,t,n){let{props:i}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&i.whileTap&&e.animationState.setActive("whileTap","Start"===n);let r=i["onTap"+("End"===n?"":n)];r&&x6.postRender(()=>r(t,TB(t)))}var TH=class extends SX{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=function(e,t,n={}){let[i,r,a]=ST(e,n),s=e=>{let i=e.currentTarget;if(!SI(e)||Sj.has(e))return;SM.add(i),n.stopPropagation&&Sj.add(e);let a=t(i,e),s=(e,t)=>{window.removeEventListener("pointerup",o),window.removeEventListener("pointercancel",l),SM.has(i)&&SM.delete(i),SI(e)&&"function"==typeof a&&a(e,{success:t})},o=e=>{s(e,i===window||i===document||n.useGlobalTarget||SA(i,e.target))},l=e=>{s(e,!1)};window.addEventListener("pointerup",o,r),window.addEventListener("pointercancel",l,r)};
14return i.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener("pointerdown",s,r),"object"==typeof e&&e&&"offsetHeight"in e&&!("ownerSVGElement"in e)&&(e.addEventListener("focus",e=>((e,t)=>{let n=e.currentTarget;if(!n)return;let i=S_(()=>{if(SM.has(n))return;SR(n,"down");let e=S_(()=>{SR(n,"up")});n.addEventListener("keyup",e,t),n.addEventListener("blur",()=>SR(n,"cancel"),t)});n.addEventListener("keydown",i,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),t)})(e,r)),SE.has(e.tagName)||!0===e.isContentEditable||e.hasAttribute("tabindex")||(e.tabIndex=0))}),a}(e,(e,t)=>(Tz(this.node,t,"Start"),(e,{success:t})=>Tz(this.node,e,t?"End":"Cancel")),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}},TK=new WeakMap,Tq=new WeakMap,TY=e=>{let t=TK.get(e.target);t&&t(e)},TG=e=>{e.forEach(TY)},TX={some:0,all:1},TZ=class extends SX{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var e,t;let n;this.stopObserver?.();let{viewport:i={}}=this.node.getProps(),{root:r,margin:a,amount:s="some",once:o}=i,l={root:r?r.current:void 0,rootMargin:a,threshold:"number"==typeof s?s:TX[s]};this.stopObserver=(e=this.node.current,t=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,o&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);let{onViewportEnter:n,onViewportLeave:i}=this.node.getProps(),r=t?n:i;r&&r(e)},n=function({root:e,...t}){let n=e||document;Tq.has(n)||Tq.set(n,{});let i=Tq.get(n),r=JSON.stringify(t);return i[r]||(i[r]=new IntersectionObserver(TG,{root:e,...t})),i[r]}(l),TK.set(e,t),n.observe(e),()=>{TK.delete(e),n.unobserve(e)})}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;let{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}},TJ={renderer:(e,t)=>t.isSVG??Tj(e)?new Tr(t):new S9(t,{allowProjection:e!==iV.Fragment}),animation:{Feature:TD},exit:{Feature:class extends SX{constructor(){super(...arguments),this.id=TF++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;if(e&&!1===n){if(this.isExitComplete){let{initial:e,custom:t}=this.node.getProps();if("string"==typeof e){let n=k9(this.node,e,t);if(n){let{transition:e,transitionEnd:t,...i}=n;for(let e in i)this.node.getValue(e)?.jump(i[e])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}let i=this.node.animationState.setActive("exit",!e);t&&!e&&i.then(()=>{this.isExitComplete=!0,t(this.id)})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}},inView:{Feature:TZ},tap:{Feature:TH},focus:{Feature:TW},hover:{Feature:TU}},TQ=function(e,{forwardMotionProps:t=!1,type:n}={}){let i=n?"svg"===n:Tj(e),r=i?TP:TO;function a(n,a){var s;let o,l,u,c={...(0,iV.useContext)(Th),...n,layoutId:function({layoutId:e}){let t=(0,iV.useContext)(xE).id;return t&&void 0!==e?t+"-"+e:e}(n)},{isStatic:d}=c,h=function(e){let{initial:t,animate:n}=function(e,t){if(S$(e)){let{initial:t,animate:n}=e;return{initial:!1===t||SD(t)?t:void 0,animate:SD(n)?n:void 0}}return!1===e.inherit?{}:t}(e,(0,iV.useContext)(TA));return(0,iV.useMemo)(()=>({initial:t,animate:n}),[TE(t),TE(n)])}(n),p=r(n,d);if(!d&&"u">typeof window){(0,iV.useContext)(Tp).strict;let t=function(e){let{drag:t,layout:n}=Tg();if(!t&&!n)return{};let i={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}(c);u=t.MeasureLayout,h.visualElement=function(e,t,n,i,r,a){let{visualElement:s}=(0,iV.useContext)(TA),o=(0,iV.useContext)(Tp),l=(0,iV.useContext)(x_),u=(0,iV.useContext)(Th),c=u.reducedMotion,d=u.skipAnimations,h=(0,iV.useRef)(null),p=(0,iV.useRef)(!1);i||=o.renderer,!h.current&&i&&(h.current=i(e,{visualState:t,parent:s,props:n,presenceContext:l,blockInitialAnimation:!!l&&!1===l.initial,reducedMotionConfig:c,skipAnimations:d,isSVG:a}),p.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));let f=h.current,m=(0,iV.useContext)(TL);f&&!f.projection&&r&&("html"===f.type||"svg"===f.type)&&function(e,t,n,i){var r;let{layoutId:a,layout:s,drag:o,dragConstraints:l,layoutScroll:u,layoutRoot:c,layoutAnchor:d,layoutCrossfade:h}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:function e(t){if(t)return!1===t.options.allowProjection?e(t.parent):t.projection}(e.parent)),e.projection.setOptions({layoutId:a,layout:s,alwaysMeasureLayout:!!o||l&&(r=l)&&"object"==typeof r&&Object.prototype.hasOwnProperty.call(r,"current"),visualElement:e,animationType:"string"==typeof s?s:"both",initialPromotionConfig:i,crossfade:h,layoutScroll:u,layoutRoot:c,layoutAnchor:d})}(h.current,n,r,m);let g=(0,iV.useRef)(!1);(0,iV.useInsertionEffect)(()=>{f&&g.current&&f.update(n,l)});let v=n[Sr],y=(0,iV.useRef)(!!v&&"u">typeof window&&!window.MotionHandoffIsComplete?.(v)&&window.MotionHasOptimisedAnimation?.(v));return xM(()=>{p.current=!0,f&&(g.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),f.scheduleRenderMicrotask(),y.current&&f.animationState&&f.animationState.animateChanges())}),(0,iV.useEffect)(()=>{f&&(!y.current&&f.animationState&&f.animationState.animateChanges(),y.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(v)}),!1),f.enteringChildren=void 0)}),f}(e,p,c,void 0,t.ProjectionNode,i)}return(0,a6.jsxs)(TA.Provider,{value:h,children:[u&&h.visualElement?(0,a6.jsx)(u,{visualElement:h.visualElement,...c}):null,function(e,t,n,{latestValues:i},r,a=!1,s){let o=(s??Tj(e)?function(e,t,n,i){let r=(0,iV.useMemo)(()=>{let n=TR();return Te(n,t,Tn(i),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};T_(t,e.style,e),r.style={...t,...r.style}}return r}:function(e,t){let n,i={},r=(T_(n={},e.style||{},e),Object.assign(n,function({transformTemplate:e},t){return(0,iV.useMemo)(()=>{let n=TM();return SQ(n,t,e),Object.assign({},n.vars,n.style)},[t])}(e,t)),n);return e.drag&&!1!==e.dragListener&&(i.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=!0===e.drag?"none":`pan-${"x"===e.drag?"y":"x"}
14`),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(i.tabIndex=0),i.style=r,i})(t,i,r,e),l=function(e,t,n){let i={};for(let r in e)"values"===r&&"object"==typeof e.values||Sn(e[r])||(TT(r)||!0===n&&Tx(r)||!t&&!Tx(r)||e.draggable&&r.startsWith("onDrag"))&&(i[r]=e[r]);return i}(t,"string"==typeof e,a),u=e===iV.Fragment?{}:{...l,...o,ref:n},{children:c}=t,d=(0,iV.useMemo)(()=>Sn(c)?c.get():c,[c]);return(0,iV.createElement)(e,{...u,children:d})}(e,n,(s=h.visualElement,o=(0,iV.useRef)(a),(0,iV.useInsertionEffect)(()=>{o.current=a}),l=(0,iV.useRef)(null),(0,iV.useCallback)(e=>{e&&p.onMount?.(e);let t=o.current;if("function"==typeof t)if(e){let n=t(e);"function"==typeof n&&(l.current=n)}else l.current?(l.current(),l.current=null):t(e);else t&&(t.current=e);s&&(e?s.mount(e):s.unmount())},[s])),p,d,t,i)]})}a.displayName=`motion.${"string"==typeof e?e:`create(${e.displayName??e.name??""})`}`;let s=(0,iV.forwardRef)(a);return s[TN]=e,s}("span",void 0),T0=({variant:e="ghost",size:t="2",px:n="2",gap:i="1_5",justify:r="space-between",w:a="auto",selected:s,icon:o,leadingIcon:l,leadingComponent:u,trailingIcon:c,trailingComponent:d,textProps:h,...p})=>(0,a6.jsxs)(sL.Root,{size:t,variant:e,gap:i,px:n,justify:r,w:a,...p,children:[(0,a6.jsxs)(sd,{gap:i,align:"center",w:"full",children:[(0,a6.jsx)(T1,{icon:o,selected:s,leadingIcon:l,leadingComponent:u}),(0,a6.jsx)(sL.Text,{weight:p?.fontWeight||"medium",w:"full",overflow:"hidden",textOverflow:"ellipsis",...h,children:p.children})]}),(0,a6.jsx)(T2,{trailingIcon:c,trailingComponent:d})]}),T1=({icon:e,selected:t,leadingIcon:n,leadingComponent:i})=>{if(!0===t||!1===t)return(0,a6.jsx)(Ty,{features:TJ,children:(0,a6.jsx)(sL.Icon,{as:TQ,variant:"primary",icon:dM,"aria-hidden":!0,animate:t?{opacity:1,rotate:0,scale:1}:{opacity:0,rotate:-45,scale:.3},transition:{duration:.15,type:"spring",bounce:0},style:{transformOrigin:"center"},display:"block"})});let r=n||e;return r?(0,a6.jsx)(sL.Icon,{variant:"primary",...r}):i||void 0},T2=({trailingIcon:e,trailingComponent:t})=>e?(0,a6.jsx)(sL.Icon,{variant:"primary",...e}):t||void 0,T3=iV.default.createContext({open:!1,setOpen:()=>{}}),T5={};Object.assign(T5,{Root:({open:e,onOpenChange:t,defaultOpen:n,modal:i=!0,children:r,...a})=>{let[s=!1,o]=(0,sF.useControllableState)({prop:e,defaultProp:n??!1,onChange:t});return(0,a6.jsx)(T3.Provider,{value:{open:s,setOpen:o},children:(0,a6.jsx)(xC.Root,{open:s,onOpenChange:o,modal:i,...a,children:r})})},Trigger:({asChild:e=!0,tgphRef:t,children:n,...i})=>{let r=iV.default.useContext(T3);return(0,a6.jsx)(xC.Anchor,{onClick:()=>{r.setOpen(!r.open)},asChild:e,...i,ref:t,children:(0,a6.jsx)(se,{children:n})})},Content:({direction:e="column",gap:t="1",rounded:n="4",py:i="1",shadow:r="2",sideOffset:a=4,children:s,onInteractOutside:o,onKeyDown:l,onCloseAutoFocus:u,tgphRef:c,...d})=>(0,a6.jsx)(xC.Portal,{children:(0,a6.jsx)(xC.Content,{onInteractOutside:o,onKeyDown:l,onCloseAutoFocus:u,asChild:!0,sideOffset:a,...d,ref:c,children:(0,a6.jsx)(se,{children:(0,a6.jsx)(sd,{bg:"surface-1",className:"tgph",direction:e,gap:t,rounded:n,py:i,shadow:r,style:{overflowY:"auto"},zIndex:"popover",children:s})})})}),Button:({mx:e="1",asChild:t=!0,icon:n,leadingIcon:i,trailingIcon:r,leadingComponent:a,trailingComponent:s,selected:o,tgphRef:l,onClick:u,...c})=>(0,a6.jsx)(xC.Item,{...c,asChild:t,ref:l,children:(0,a6.jsx)(se,{children:(0,a6.jsx)(T0,{onClick:u,selected:o,leadingIcon:i||n,trailingIcon:r,leadingComponent:a,trailingComponent:s,"data-tgph-menu-button":!0,mx:e,style:{flexShrink:0},...c})})}),Divider:({w:e="full",borderBottom:t="px",...n})=>(0,a6.jsx)(su,{as:"hr",w:e,borderBottom:t,...n})});let T4=sb("chevrons-up-down",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]),T9=sb("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),T6=sb("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);var T7=Object.defineProperty,T8=Object.getOwnPropertyDescriptor,Ae=Object.getOwnPropertyNames,At=Object.prototype.hasOwnProperty,An={0:"5",1:"6",2:"8",3:"10"},Ai=e=>"object"==typeof e&&!Array.isArray(e)||"string"==typeof e||!e,Ar=(e,t)=>{if(e)return!0===t?e?.value:e},Aa=(e,t,n)=>{if(!e||!t||0===t.length)return;let i=t.find(t=>t.value===Ar(e,n));if(i)return i},As=e=>{let t=iV.default.Children.toArray(e),n=[];
14return t.forEach(e=>{if("string"==typeof e&&n.push(e),iV.default.isValidElement(e)){let t=e.props;t.children&&n.push(...As(t.children))}}),n},Ao=(0,iV.createContext)({}),Al="u">typeof window?iV.useLayoutEffect:iV.useEffect,Au=(0,iV.createContext)(null),Ac=(e,t,n)=>n>t?t:n<e?e:n,Ad=()=>{},Ah=()=>{};G.default;var Ap={};function Af(e){let t;return()=>(void 0===t&&(t=e()),t)}var Am=e=>e,Ag=(e,t)=>n=>t(e(n)),Av=(...e)=>e.reduce(Ag),Ay=(e,t,n)=>{let i=t-e;return 0===i?1:(n-e)/i},Ab=class{constructor(){this.subscriptions=[]}add(e){var t;return t=this.subscriptions,-1===t.indexOf(e)&&t.push(e),()=>{var t;let n;return t=this.subscriptions,void((n=t.indexOf(e))>-1&&t.splice(n,1))}}notify(e,t,n){let i=this.subscriptions.length;if(i)if(1===i)this.subscriptions[0](e,t,n);else for(let r=0;r<i;r++){let i=this.subscriptions[r];i&&i(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}},Aw=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function Ax(e,t,n,i){return e===t&&n===i?Am:r=>0===r||1===r?r:Aw(function(e,t,n,i,r){let a,s,o=0;do(a=Aw(s=t+(n-t)/2,i,r)-e)>0?n=s:t=s;while(Math.abs(a)>1e-7&&++o<12)return s}(r,0,1,e,n),t,i)}var AC=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Ak=e=>t=>1-e(1-t),AS=Ax(.33,1.53,.69,.99),AT=Ak(AS),AA=AC(AT),AE=e=>e>=1?1:(e*=2)<1?.5*AT(e):.5*(2-2**(-10*(e-1))),AM=e=>1-Math.sin(Math.acos(e)),A_=Ak(AM),AR=AC(AM),AI=Ax(.42,0,1,1),Aj=Ax(0,0,.58,1),AV=Ax(.42,0,.58,1),AO=e=>Array.isArray(e)&&"number"==typeof e[0],AP={linear:Am,easeIn:AI,easeInOut:AV,easeOut:Aj,circIn:AM,circInOut:AR,circOut:A_,backIn:AT,backInOut:AA,backOut:AS,anticipate:AE},AN=e=>{if(AO(e)){Ah(4===e.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");let[t,n,i,r]=e;return Ax(t,n,i,r)}return"string"==typeof e?(Ah(void 0!==AP[e],`Invalid easing type '${e}'`,"invalid-easing-type"),AP[e]):e},AL=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function AD(e,t){let n=!1,i=!0,r={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,s=AL.reduce((e,n)=>(e[n]=function(e,t){let n=new Set,i=new Set,r=!1,a=!1,s=new WeakSet,o={delta:0,timestamp:0,isProcessing:!1},l=0;function u(t){s.has(t)&&(c.schedule(t),e()),l++,t(o)}let c={schedule:(e,t=!1,a=!1)=>{let o=a&&r?n:i;return t&&s.add(e),o.add(e),e},cancel:e=>{i.delete(e),s.delete(e)},process:e=>{if(o=e,r){a=!0;return}r=!0;let s=n;n=i,i=s,n.forEach(u),t,l=0,n.clear(),r=!1,a&&(a=!1,c.process(e))}};return c}(a,t?n:void 0),e),{}),{setup:o,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:h,render:p,postRender:f}=s,m=()=>{let a=Ap.useManualTiming,s=a?r.timestamp:performance.now();n=!1,a||(r.delta=i?1e3/60:Math.max(Math.min(s-r.timestamp,40),1)),r.timestamp=s,r.isProcessing=!0,o.process(r),l.process(r),u.process(r),c.process(r),d.process(r),h.process(r),p.process(r),f.process(r),r.isProcessing=!1,n&&t&&(i=!1,e(m))};return{schedule:AL.reduce((t,a)=>{let o=s[a];return t[a]=(t,a=!1,s=!1)=>(n||(n=!0,i=!0,r.isProcessing||e(m)),o.schedule(t,a,s)),t},{}),cancel:e=>{for(let t=0;t<AL.length;t++)s[AL[t]].cancel(e)},state:r,steps:s}}var AF,AB,{schedule:A$,cancel:AU,state:AW}=AD("u">typeof requestAnimationFrame?requestAnimationFrame:Am,!0);function Az(){AB=void 0}var AH={now:()=>(void 0===AB&&AH.set(AW.isProcessing||Ap.useManualTiming?AW.timestamp:performance.now()),AB),set:e=>{AB=e,queueMicrotask(Az)}},AK={mainThread:0,waapi:0},Aq=e=>t=>"string"==typeof t&&t.startsWith(e),AY=Aq("--"),AG=Aq("var(--"),AX=e=>!!AG(e)&&AZ.test(e.split("/*")[0].trim()),AZ=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function AJ(e){return"string"==typeof e&&e.split("/*")[0].includes("var(--")}var AQ={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},A0={...AQ,transform:e=>Ac(0,1,e)},A1={...AQ,default:1},A2=e=>Math.round(1e5*e)/1e5,A3=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,A5=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,A4=(e,t)=>n=>!!("string"==typeof n&&A5.test(n)&&n.startsWith(e)||t&&null!=n&&Object.prototype.hasOwnProperty.call(n,t)),A9=(e,t,n
14)=>i=>{if("string"!=typeof i)return i;let[r,a,s,o]=i.match(A3);return{[e]:parseFloat(r),[t]:parseFloat(a),[n]:parseFloat(s),alpha:void 0===o?1:parseFloat(o)}},A6={...AQ,transform:e=>Math.round(Ac(0,255,e))},A7={test:A4("rgb","red"),parse:A9("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:i=1})=>"rgba("+A6.transform(e)+", "+A6.transform(t)+", "+A6.transform(n)+", "+A2(A0.transform(i))+")"},A8={test:A4("#"),parse:function(e){let t="",n="",i="",r="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),i=e.substring(5,7),r=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),i=e.substring(3,4),r=e.substring(4,5),t+=t,n+=n,i+=i,r+=r),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:r?parseInt(r,16)/255:1}},transform:A7.transform},Ee=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),Et=Ee("deg"),En=Ee("%"),Ei=Ee("px"),Er=Ee("vh"),Ea=Ee("vw"),Es={...En,parse:e=>En.parse(e)/100,transform:e=>En.transform(100*e)},Eo={test:A4("hsl","hue"),parse:A9("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:i=1})=>"hsla("+Math.round(e)+", "+En.transform(A2(t))+", "+En.transform(A2(n))+", "+A2(A0.transform(i))+")"},El={test:e=>A7.test(e)||A8.test(e)||Eo.test(e),parse:e=>A7.test(e)?A7.parse(e):Eo.test(e)?Eo.parse(e):A8.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?A7.transform(e):Eo.transform(e),getAnimatableNone:e=>{let t=El.parse(e);return t.alpha=0,El.transform(t)}},Eu=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,Ec="number",Ed="color",Eh=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Ep(e){let t=e.toString(),n=[],i={color:[],number:[],var:[]},r=[],a=0;return{values:n,split:t.replace(Eh,e=>(El.test(e)?(i.color.push(a),r.push(Ed),n.push(El.parse(e))):e.startsWith("var(")?(i.var.push(a),r.push("var"),n.push(e)):(i.number.push(a),r.push(Ec),n.push(parseFloat(e))),++a,"${}")).split("${}"),indexes:i,types:r}}function Ef({split:e,types:t}){let n=e.length;return i=>{let r="";for(let a=0;a<n;a++)if(r+=e[a],void 0!==i[a]){let e=t[a];e===Ec?r+=A2(i[a]):e===Ed?r+=El.transform(i[a]):r+=i[a]}return r}}var Em={test:function(e){return isNaN(e)&&"string"==typeof e&&(e.match(A3)?.length||0)+(e.match(Eu)?.length||0)>0},parse:function(e){return Ep(e).values},createTransformer:function(e){return Ef(Ep(e))},getAnimatableNone:function(e){let t=Ep(e);return Ef(t)(t.values.map((e,n)=>{var i;return i=t.split[n],"number"==typeof e?i?.trim().endsWith("/")?e:0:"number"==typeof e?0:El.test(e)?El.getAnimatableNone(e):e}))}};function Eg(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Ev(e,t){return n=>n>0?t:e}var Ey=(e,t,n)=>e+(t-e)*n,Eb=(e,t,n)=>{let i=e*e,r=n*(t*t-i)+i;return r<0?0:Math.sqrt(r)},Ew=[A8,A7,Eo];function Ex(e){let t=Ew.find(t=>t.test(e));if(Ad(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===Eo&&(n=function({hue:e,saturation:t,lightness:n,alpha:i}){e/=360,t/=100,n/=100;let r=0,a=0,s=0;if(t){let i=n<.5?n*(1+t):n+t-n*t,o=2*n-i;r=Eg(o,i,e+1/3),a=Eg(o,i,e),s=Eg(o,i,e-1/3)}else r=a=s=n;return{red:Math.round(255*r),green:Math.round(255*a),blue:Math.round(255*s),alpha:i}}(n)),n}var EC=(e,t)=>{let n=Ex(e),i=Ex(t);if(!n||!i)return Ev(e,t);let r={...n};return e=>(r.red=Eb(n.red,i.red,e),r.green=Eb(n.green,i.green,e),r.blue=Eb(n.blue,i.blue,e),r.alpha=Ey(n.alpha,i.alpha,e),A7.transform(r))},Ek=new Set(["none","hidden"]);function ES(e,t){return n=>Ey(e,t,n)}function ET(e){return"number"==typeof e?ES:"string"==typeof e?AX(e)?Ev:El.test(e)?EC:EM:Array.isArray(e)?EA:"object"==typeof e?El.test(e)?EC:EE:Ev}function EA(e,t){let n=[...e],i=n.length,r=e.map((e,n)=>ET(e)(e,t[n]));return e=>{for(let t=0;t<i;t++)n[t]=r[t](e);return n}}function EE(e,t){let n={...e,...t},i={};for(let r in n)void 0!==e[r]&&void 0!==t[r]&&(i[r]=ET(e[r])(e[r],t[r]));return e=>{for(let t in i)n[t]=i[t](e);return n}}var EM=(e,t)=>{let n=Em.createTransformer(t),i=Ep(e),r=Ep(t);return i.indexes.var.length===r.indexes.var.length&&i.indexes.color.length===r.indexes.color.length&&i.indexes.number.length>=r.indexes.number.length?Ek.has(e)&&!r.values.length||Ek.has(t)&&!i.values.length?Ek.has(e)?n=>n<=0?e:t:n=>n>=1?t:e:Av(EA(function(e,t){let n=[],i={color:0,var:0,number:0};for(let r=0;r<t.values.length;r++){let a=t.types[r],s=e.indexes[a][i[a]];n[r]=e.values[s]??0,i[a]++}return n}(i,r),r.values),n):(Ad(!0,`Complex values '${e}' and '${t}
14' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Ev(e,t))};function E_(e,t,n){return"number"==typeof e&&"number"==typeof t&&"number"==typeof n?Ey(e,t,n):ET(e)(e,t)}var ER=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>A$.update(t,e),stop:()=>AU(t),now:()=>AW.isProcessing?AW.timestamp:AH.now()}},EI=(e,t,n=10)=>{let i="",r=Math.max(Math.round(t/n),2);for(let t=0;t<r;t++)i+=Math.round(1e4*e(t/(r-1)))/1e4+", ";return`linear(${i.substring(0,i.length-2)})`};function Ej(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}var EV=.01,EO=2,EP=.005,EN=.5;function EL(e,t){return e*Math.sqrt(1-t*t)}var ED=["duration","bounce"],EF=["stiffness","damping","mass"];function EB(e,t){return t.some(t=>void 0!==e[t])}function E$(e=.3,t=.3){let n,i,r,a,s,o,l="object"==typeof e?e:{visualDuration:e,keyframes:[0,1],bounce:t},{restSpeed:u,restDelta:c}=l,d=l.keyframes[0],h=l.keyframes[l.keyframes.length-1],p={done:!1,value:d},{stiffness:f,damping:m,mass:g,duration:v,velocity:y,isResolvedFromDuration:b}=function(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!EB(e,EF)&&EB(e,ED))if(t.velocity=0,e.visualDuration){let n=2*Math.PI/(1.2*e.visualDuration),i=n*n,r=2*Ac(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:1,stiffness:i,damping:r}}else{let n=function({duration:e=800,bounce:t=.3,velocity:n=0,mass:i=1}){let r,a;Ad(e<=1e4,"Spring duration must be 10 seconds or less","spring-duration-limit");let s=1-t;s=Ac(.05,1,s),e=Ac(.01,10,e/1e3),s<1?(r=t=>{let i=t*s,r=i*e;return .001-(i-n)/EL(t,s)*Math.exp(-r)},a=t=>{let i=t*s*e,a=s**2*t**2*e,o=Math.exp(-i),l=EL(t**2,s);return(-r(t)+.001>0?-1:1)*((i*n+n-a)*o)/l}):(r=t=>-.001+Math.exp(-t*e)*((t-n)*e+1),a=t=>e*e*(n-t)*Math.exp(-t*e));let o=function(e,t,n){let i=n;for(let n=1;n<12;n++)i-=e(i)/t(i);return i}(r,a,5/e);if(e*=1e3,isNaN(o))return{stiffness:100,damping:10,duration:e};{let t=o**2*i;return{stiffness:t,damping:2*s*Math.sqrt(i*t),duration:e}}}({...e,velocity:0});(t={...t,...n,mass:1}).isResolvedFromDuration=!0}return t}({...l,velocity:-((l.velocity||0)/1e3)}),w=y||0,x=m/(2*Math.sqrt(f*g)),C=h-d,k=Math.sqrt(f/g)/1e3,S=5>Math.abs(C);if(u||=S?EV:EO,c||=S?EP:EN,x<1)r=EL(k,x),a=(w+x*k*C)/r,n=e=>h-Math.exp(-x*k*e)*(a*Math.sin(r*e)+C*Math.cos(r*e)),s=x*k*a+C*r,o=x*k*C-a*r,i=e=>Math.exp(-x*k*e)*(s*Math.sin(r*e)+o*Math.cos(r*e));else if(1===x){n=e=>h-Math.exp(-k*e)*(C+(w+k*C)*e);let e=w+k*C;i=t=>Math.exp(-k*t)*(k*e*t-w)}else{let e=k*Math.sqrt(x*x-1);n=t=>{let n=Math.exp(-x*k*t),i=Math.min(e*t,300);return h-n*((w+x*k*C)*Math.sinh(i)+e*C*Math.cosh(i))/e};let t=(w+x*k*C)/e,r=x*k*t-C*e,a=x*k*C-t*e;i=t=>{let n=Math.exp(-x*k*t),i=Math.min(e*t,300);return n*(r*Math.sinh(i)+a*Math.cosh(i))}}let T={calculatedDuration:b&&v||null,velocity:e=>1e3*i(e),next:e=>{if(!b&&x<1){let t=Math.exp(-x*k*e),n=Math.sin(r*e),i=Math.cos(r*e),l=h-t*(a*n+C*i);return p.done=Math.abs(t*(s*n+o*i)*1e3)<=u&&Math.abs(h-l)<=c,p.value=p.done?h:l,p}let t=n(e);return b?p.done=e>=v:p.done=Math.abs(1e3*i(e))<=u&&Math.abs(h-t)<=c,p.value=p.done?h:t,p},toString:()=>{let e=Math.min(Ej(T),2e4),t=EI(t=>T.next(e*t).value,e,30);return e+"ms "+t},toTransition:()=>{}};return T}function EU(e,t,n){var i,r;let a=Math.max(t-5,0);return i=n-e(a),(r=t-a)?1e3/r*i:0}function EW({keyframes:e,velocity:t=0,power:n=.8,timeConstant:i=325,bounceDamping:r=10,bounceStiffness:a=500,modifyTarget:s,min:o,max:l,restDelta:u=.5,restSpeed:c}){let d=e[0],h={done:!1,value:d},p=n*t,f=d+p,m=void 0===s?f:s(f);m!==f&&(p=m-d);let g=e=>-p*Math.exp(-e/i),v=e=>m+g(e),y=e=>{let t=g(e),n=v(e);h.done=Math.abs(t)<=u,h.value=h.done?m:n},b,w,x=e=>{let t,n;t=h.value,(void 0!==o&&t<o||void 0!==l&&t>l)&&(b=e,w=E$({keyframes:[h.value,(n=h.value,void 0===o?l:void 0===l||Math.abs(o-n)<Math.abs(l-n)?o:l)],velocity:EU(v,e,h.value),damping:r,stiffness:a,restDelta:u,restSpeed:c}))};return x(0),{calculatedDuration:null,next:e=>{let t=!1;return w||void 0!==b||(t=!0,y(e),x(e)),void 0!==b&&e>=b?w.next(e-b):(t||y(e),h)}}}function Ez({duration:e=300,keyframes:t,times:n,ease:i="easeInOut"}){var r;let a,s=Array.isArray(i)&&"number"!=typeof i[0]?i.map(AN):AN(i),o={done:!1,value:t[0]},l=function(e,t,{clamp:n=!0,ease:i,mixer:r}={}){let a=e.length;if(Ah(a===t.length,"Both input and output ranges must be the same length","range-length"),1===a)return()=>t[0];if(2===a&&t[0]===t[1])return()=>t[1];let s=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let o=function(e,t,n){let i=[],r=n||Ap.mix||E_,a=e.length-1;for(let n=0;n<a;n++){let a=r(e[n],e[n+1]);t&&(a=Av(Array.isArray(t)?t[n]||Am:t,a)),i.push(a)}return i}(t,i,r),l=o.length,u=n=>{if(s&&n<e[0])return t[0];let i=0;if(l>1)for(;i<e.length-2&&!(n<e[i+1]);i++);let r=Ay(e[i],e[i+1],n);return o[i](r)};return n?t=>u(Ac(e[0],e[a-1],t)):u}((r=n&&n.length===t.length?n:(function(e,t){let n=e[e.length-1];for(let i=1;i<=t;
14i++){let r=Ay(0,t,i);e.push(Ey(n,1,r))}}(a=[0],t.length-1),a),r.map(t=>t*e)),t,{ease:Array.isArray(s)?s:t.map(()=>s||AV).splice(0,t.length-1)});return{calculatedDuration:e,next:t=>(o.value=l(t),o.done=t>=e,o)}}E$.applyToOptions=e=>{let t=function(e,t=100,n){let i=n({...e,keyframes:[0,t]}),r=Math.min(Ej(i),2e4);return{type:"keyframes",ease:e=>i.next(r*e).value/t,duration:r/1e3}}(e,100,E$);return e.ease=t.ease,e.duration=1e3*t.duration,e.type="keyframes",e};var EH=e=>null!==e;function EK(e,{repeat:t,repeatType:n="loop"},i,r=1){let a=e.filter(EH),s=r<0||t&&"loop"!==n&&t%2==1?0:a.length-1;return s&&void 0!==i?i:a[s]}var Eq={decay:EW,inertia:EW,tween:Ez,keyframes:Ez,spring:E$};function EY(e){"string"==typeof e.type&&(e.type=Eq[e.type])}var EG=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}},EX=e=>e/100,EZ=class extends EG{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==AH.now()&&this.tick(AH.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},AK.mainThread++,this.options=e,this.initAnimation(),this.play(),!1===e.autoplay&&this.pause()}initAnimation(){let{options:e}=this;EY(e);let{type:t=Ez,repeat:n=0,repeatDelay:i=0,repeatType:r,velocity:a=0}=e,{keyframes:s}=e,o=t||Ez;o!==Ez&&"number"!=typeof s[0]&&(this.mixKeyframes=Av(EX,E_(s[0],s[1])),s=[0,100]);let l=o({...e,keyframes:s});"mirror"===r&&(this.mirroredGenerator=o({...e,keyframes:[...s].reverse(),velocity:-a})),null===l.calculatedDuration&&(l.calculatedDuration=Ej(l));let{calculatedDuration:u}=l;this.calculatedDuration=u,this.resolvedDuration=u+i,this.totalDuration=this.resolvedDuration*(n+1)-i,this.generator=l}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;null===this.holdTime?this.currentTime=t:this.currentTime=this.holdTime}tick(e,t=!1){let n,{generator:i,totalDuration:r,mixKeyframes:a,mirroredGenerator:s,resolvedDuration:o,calculatedDuration:l}=this;if(null===this.startTime)return i.next(0);let{delay:u=0,keyframes:c,repeat:d,repeatType:h,repeatDelay:p,type:f,onUpdate:m,finalKeyframe:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let v=this.currentTime-u*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?v<0:v>r;this.currentTime=Math.max(v,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=r);let b=this.currentTime,w=i;if(d){let e=Math.min(this.currentTime,r)/o,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,(t=Math.min(t,d+1))%2&&("reverse"===h?(n=1-n,p&&(n-=p/o)):"mirror"===h&&(w=s)),b=Ac(0,1,n)*o}y?(this.delayState.value=c[0],n=this.delayState):n=w.next(b),a&&!y&&(n.value=a(n.value));let{done:x}=n;y||null===l||(x=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let C=null===this.holdTime&&("finished"===this.state||"running"===this.state&&x);return C&&f!==EW&&(n.value=EK(c,this.options,g,this.speed)),m&&m(n.value),C&&this.finish(),n}then(e,t){return this.finished.then(e,t)}get duration(){return this.calculatedDuration/1e3}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+e/1e3}get time(){return this.currentTime/1e3}set time(e){e*=1e3,this.currentTime=e,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){let e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);let t=this.generator.next(e).value;return EU(e=>this.generator.next(e).value,e,t)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(AH.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=this.currentTime/1e3)}play(){if(this.isStopped)return;let{driver:e=ER,startTime:t}=this.options;this.driver||=e(e=>this.tick(e)),this.options.onPlay?.();let n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null===this.holdTime?this.startTime||=t??n:this.startTime=n-this.holdTime,"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(AH.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null,AK.mainThread--}stopDriver(){this.driver&&=void this.driver.stop()}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}},EJ=e=>180*e/Math.PI,EQ=e=>E1(EJ(Math.atan2(e[1],e[0]))),E0={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:EQ,rotateZ:EQ,skewX:e=>EJ(Math.atan(e[1])),skewY:e=>EJ(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},E1=e=>((e%=360)<0&&(e+=360),e),E2=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),E3=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),E5={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:E2,scaleY:E3,scale:e=>(E2(e)+E3(e))/2,rotateX:e=>E1(EJ(Math.atan2(e[6],e[5]))),rotateY:e=>E1(EJ(Math.atan2(-e[2],e[0]))),rotateZ:EQ,rotate:EQ,skewX:e=>EJ(Math.atan(e[4])),skewY:e=>EJ(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function E4(e){return+!!e.includes("scale")}function E9(e,t){if(!e||"none"===e)return E4(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),i,r;if(n)i=E5,r=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=E0,r=t}if(!r)return E4(t);let a=i[t],s=r[1].split(",").map(E6);return"function"==typeof a?a(s):s[a]}function E6(e){return parseFloat(e.trim())}var E7=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],E8=new Set(E7),Me=e=>e===AQ||e===Ei,Mt=new Set(["x","y","z"]),Mn=E7.filter(e=>!Mt.has(e)),Mi={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:i})=>{let r=e.max-e.min;return"border-box"===i?r:r-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:i})=>{let r=e.max-e.min;return"border-box"===i?r:r-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>E9(t,"x"),y:(e,{transform:t})=>E9(t,"y")};Mi.translateX=Mi.x,Mi.translateY=Mi.y;var Mr=new Set,Ma=!1,Ms=!1,Mo=!1;function Ml(){if(Ms){let e=Array.from(Mr).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;
14t.forEach(e=>{let t,i=(t=[],Mn.forEach(n=>{let i=e.getValue(n);void 0!==i&&(t.push([n,i.get()]),i.set(+!!n.startsWith("scale")))}),t);i.length&&(n.set(e,i),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)})}Ms=!1,Ma=!1,Mr.forEach(e=>e.complete(Mo)),Mr.clear()}function Mu(){Mr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Ms=!0)})}var Mc=class{constructor(e,t,n,i,r,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=i,this.element=r,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(Mr.add(this),Ma||(Ma=!0,A$.read(Mu),A$.resolveKeyframes(Ml))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:i}=this;if(null===e[0]){let r=i?.get(),a=e[e.length-1];if(void 0!==r)e[0]=r;else if(n&&t){let i=n.readValue(t,a);null!=i&&(e[0]=i)}void 0===e[0]&&(e[0]=a),i&&void 0===r&&i.set(e[0])}for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Mr.delete(this)}cancel(){"scheduled"===this.state&&(Mr.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}};function Md(e,t,n){t.startsWith("--")?e.style.setProperty(t,n):e.style[t]=n}var Mh={};function Mp(e,t){let n=Af(e);return()=>Mh[t]??n()}var Mf=Mp(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),Mm=Mp(()=>{try{document.createElement("div").animate({opacity:0}
14,{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Mg=([e,t,n,i])=>`cubic-bezier(${e}, ${t}, ${n}, ${i})`,Mv={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Mg([0,.65,.55,1]),circOut:Mg([.55,0,1,.45]),backIn:Mg([.31,.01,.66,-.59]),backOut:Mg([.33,1.53,.69,.99])};function My(e){return"function"==typeof e&&"applyToOptions"in e}var Mb=class extends EG{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:i,pseudoElement:r,allowFlatten:a=!1,finalKeyframe:s,onComplete:o}=e;this.isPseudoElement=!!r,this.allowFlatten=a,this.options=e,Ah("string"!=typeof e.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");let l=function({type:e,...t}){return My(e)&&Mm()?e.applyToOptions(t):(t.duration??=300,t.ease??="easeOut",t)}(e);this.animation=function(e,t,n,{delay:i=0,duration:r=300,repeat:a=0,repeatType:s="loop",ease:o="easeOut",times:l}={},u){let c={[t]:n};l&&(c.offset=l);let d=function e(t,n){if(t)return"function"==typeof t?Mm()?EI(t,n):"ease-out":AO(t)?Mg(t):Array.isArray(t)?t.map(t=>e(t,n)||Mv.easeOut):Mv[t]}(o,r);Array.isArray(d)&&(c.easing=d);let h={delay:i,duration:r,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:a+1,direction:"reverse"===s?"alternate":"normal"};u&&(h.pseudoElement=u);let p=e.animate(c,h);return p}(t,n,i,l,r),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){let e=EK(i,this.options,s,this.speed);this.updateMotionValue&&this.updateMotionValue(e),Md(t,n,e),this.animation.cancel()}o?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;"idle"===e||"finished"===e||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){return Number(this.animation.effect?.getComputedTiming?.().duration||0)/1e3}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+e/1e3}get time(){return(Number(this.animation.currentTime)||0)/1e3}set time(e){let t=null!==this.finishedTime;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=1e3*e,t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return null===this.finishedTime?this.animation.playState:"finished"}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:t,rangeEnd:n,observe:i}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&Mf()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),Am):i(this)}},Mw={anticipate:AE,backInOut:AA,circInOut:AR},Mx=class extends Mb{constructor(e){(function(e){"string"==typeof e.ease&&e.ease in Mw&&(e.ease=Mw[e.ease])})(e),EY(e),super(e),void 0!==e.startTime&&!1!==e.autoplay&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:i,element:r,...a}=this.options;if(!t)return;if(void 0!==e)return void t.set(e);let s=new EZ({...a,autoplay:!1}),o=Math.max(10,AH.now()-this.startTime),l=Ac(0,10,o-10),u=s.sample(o).value,{name:c}=this.options;r&&c&&Md(r,c,u),t.setWithVelocity(s.sample(Math.max(0,o-l)).value,u,l),s.stop()}},MC=(e,t)=>"zIndex"!==t&&!!("number"==typeof e||Array.isArray(e)||"string"==typeof e&&(Em.test(e)||"0"===e)&&!e.startsWith("url("));function Mk(e){e.duration=0,e.type="keyframes"}var MS=new Set(["opacity","clipPath","filter","transform"]),MT=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/,MA=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),ME=Af(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),MM=class extends 
14EG{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:a="loop",keyframes:s,name:o,motionValue:l,element:u,...c}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=AH.now();let d={autoplay:e,delay:t,type:n,repeat:i,repeatDelay:r,repeatType:a,name:o,motionValue:l,element:u,...c};this.keyframeResolver=new(u?.KeyframeResolver||Mc)(s,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),o,l,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,i){this.keyframeResolver=void 0;let{name:r,type:a,velocity:s,delay:o,isHandoff:l,onUpdate:u}=n;this.resolvedAt=AH.now();let c=!0;(function(e,t,n,i){let r=e[0];if(null===r)return!1;if("display"===t||"visibility"===t)return!0;let a=e[e.length-1],s=MC(r,t),o=MC(a,t);return Ad(s===o,`You are trying to animate ${t} from "${r}" to "${a}". "${s?a:r}" is not an animatable value.`,"value-not-animatable"),!!s&&!!o&&(function(e){let t=e[0];if(1===e.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}(e)||("spring"===n||My(n))&&i)})(e,r,a,s)||(c=!1,(Ap.instantAnimations||!o)&&u?.(EK(e,n,t)),e[0]=e[e.length-1],Mk(n),n.repeat=0);let d={startTime:i?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},h=c&&!l&&function(e){let{motionValue:t,name:n,repeatDelay:i,repeatType:r,damping:a,type:s,keyframes:o}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:l,transformTemplate:u}=t.owner.getProps();return ME()&&n&&(MS.has(n)||MA.has(n)&&function(e){for(let t=0;t<e.length;t++)if("string"==typeof e[t]&&MT.test(e[t]))return!0;return!1}(o))&&("transform"!==n||!u)&&!l&&!i&&"mirror"!==r&&0!==a&&"inertia"!==s}(d),p=d.motionValue?.owner?.current,f;if(h)try{f=new Mx({...d,element:p})}catch{f=new EZ(d)}else f=new EZ(d);f.finished.then(()=>{this.notifyFinished()}).catch(Am),this.pendingTimeline&&=void(this.stopTimeline=f.attachTimeline(this.pendingTimeline)),this._animation=f}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Mo=!0,Mu(),Ml(),Mo=!1),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}};function M_(e,t,n,i=0,r=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),s=e.size,o=(s-1)*i;return"function"==typeof n?n(a,s):1===r?a*i:o-a*i}var MR=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u,MI={type:"spring",stiffness:500,damping:25,restSpeed:10},Mj={type:"keyframes",duration:.8},MV={type:"keyframes",ease:[.25,.1,.35,1],duration:.3};function MO(e,t){if(e?.inherit&&t){let{inherit:n,...i}=e;return{...t,...i}}return e}function MP(e,t){let n=e?.[t]??e?.default??e;return n===e?n:MO(n,e)}var MN=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]),ML=(e,t,n,i={},r,a)=>s=>{let o=MP(i,e)||{},l=o.delay||i.delay||0,{elapsed:u=0}=i;u-=1e3*l;let c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...o,delay:-u,onUpdate:e=>{t.set(e),o.onUpdate&&o.onUpdate(e)},onComplete:()=>{s(),o.onComplete&&o.onComplete()},name:e,motionValue:t,element:a?void 0:r};(function(e){for(let t in e)if(!MN.has(t))return!0;return!1})(o)||Object.assign(c,((e,{keyframes:t})=>t.length>2?Mj:E8.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:MI:MV)(e,c)),c.duration&&=1e3*c.duration,c.repeatDelay&&=1e3*c.repeatDelay,void 0!==c.from&&(c.keyframes[0]=c.from);let d=!1;if(!1!==c.type&&(0!==c.duration||c.repeatDelay)||(Mk(c),0===c.delay&&(d=!0)),(Ap.instantAnimations||Ap.skipAnimations||r?.shouldSkipAnimations)&&(d=!0,Mk(c),c.delay=0),c.allowFlatten=!o.type&&!o.ease,d&&!a&&void 0!==t.get()){let e=EK(c.keyframes,o);if(void 0!==e)return void A$.update(()=>{c.onUpdate(e),c.onComplete()})}return o.isSync?new EZ(c):new MM(c)};function MD(e){let t=[{},{}];
14return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function MF(e,t,n,i){if("function"==typeof t){let[r,a]=MD(i);t=t(void 0===n?e.custom:n,r,a)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){let[r,a]=MD(i);t=t(void 0===n?e.custom:n,r,a)}return t}function MB(e,t,n){let i=e.getProps();return MF(i,t,void 0===n?i.custom:n,e)}var M$=new Set(["width","height","top","left","right","bottom",...E7]),MU=void 0,MW=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=AH.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=AH.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=!isNaN(parseFloat(this.current)))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new Ab);let n=this.events[e].add(t);return"change"===e?()=>{n(),A$.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||=new Set,this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return MU&&MU.push(this),this.current}getPrevious(){return this.prev}getVelocity(){var e;let t=AH.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;let n=Math.min(this.updatedAt-this.prevUpdatedAt,30);return e=parseFloat(this.current)-parseFloat(this.prevFrameValue),n?1e3/n*e:0}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function Mz(e,t){return new MW(e,t)}var MH=e=>Array.isArray(e),MK=e=>!!(e&&e.getVelocity);function Mq(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var MY="data-"+Mq("framerAppearId");function MG(e,t,{delay:n=0,transitionOverride:i,type:r}={}){let{transition:a,transitionEnd:s,...o}=t,l=e.getDefaultTransition();a=a?MO(a,l):l;let u=a?.reduceMotion;i&&(a=i);let c=[],d=r&&e.animationState&&e.animationState.getState()[r];for(let t in o){let i=e.getValue(t,e.latestValues[t]??null),r=o[t];if(void 0===r||d&&function({protectedKeys:e,needsAnimating:t},n){let i=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,i}(d,t))continue;let s={delay:n,...MP(a||{},t)},l=i.get();if(void 0!==l&&!i.isAnimating()&&!Array.isArray(r)&&r===l&&!s.velocity){A$.update(()=>i.set(r));continue}let h=!1;if(window.MotionHandoffAnimation){let n=e.props[MY];if(n){let e=window.MotionHandoffAnimation(n,t,A$);null!==e&&(s.startTime=e,h=!0)}}!function(e,t){let n=e.getValue("willChange");if(MK(n)&&n.add)return n.add(t);if(!n&&Ap.WillChange){let n=new Ap.WillChange("auto");e.addValue("willChange",n),n.add(t)}}(e,t);let p=u??e.shouldReduceMotion;i.start(ML(t,i,r,p&&M$.has(t)?{type:!1}:s,e,h));let f=i.animation;f&&c.push(f)}if(s){let t=()=>A$.update(()=>{s&&function(e,t){let{transitionEnd:n={},transition:i={},...r}=MB(e,t)||{};for(let t in r={...r,...n}){var a,s;s=MH(a=r[t])?a[a.length-1]||0:a,e.hasValue(t)?e.getValue(t).set(s):e.addValue(t,Mz(s))}}(e,s)});c.length?Promise.all(c).then(t):t()}return c}function MX(e,t,n={}){let i=MB(e,t,"exit"===n.type?e.presenceContext?.custom:void 0),{transition:r=e.getDefaultTransition()||{}}=i||{};
14n.transitionOverride&&(r=n.transitionOverride);let a=i?()=>Promise.all(MG(e,i,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(i=0)=>{let{delayChildren:a=0,staggerChildren:s,staggerDirection:o}=r;return function(e,t,n=0,i=0,r=0,a=1,s){let o=[];for(let l of e.variantChildren)l.notify("AnimationStart",t),o.push(MX(l,t,{...s,delay:n+("function"==typeof i?0:i)+M_(e.variantChildren,l,i,r,a)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(o)}(e,t,i,a,s,o,n)}:()=>Promise.resolve(),{when:o}=r;if(!o)return Promise.all([a(),s(n.delay)]);{let[e,t]="beforeChildren"===o?[a,s]:[s,a];return e().then(()=>t())}}var MZ=e=>t=>t.test(e),MJ=[AQ,Ei,En,Et,Ea,Er,{test:e=>"auto"===e,parse:e=>e}],MQ=e=>MJ.find(MZ(e)),M0=new Set(["brightness","contrast","saturate","opacity"]);function M1(e){let[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;let[i]=n.match(A3)||[];if(!i)return e;let r=n.replace(i,""),a=+!!M0.has(t);return i!==n&&(a*=100),t+"("+a+r+")"}var M2=/\b([a-z-]*)\(.*?\)/gu,M3={...Em,getAnimatableNone:e=>{let t=e.match(M2);return t?t.map(M1).join(" "):e}},M5={...Em,getAnimatableNone:e=>{let t=Em.parse(e);return Em.createTransformer(e)(t.map(e=>"number"==typeof e?0:"object"==typeof e?{...e,alpha:1}:e))}},M4={...AQ,transform:Math.round},M9={borderWidth:Ei,borderTopWidth:Ei,borderRightWidth:Ei,borderBottomWidth:Ei,borderLeftWidth:Ei,borderRadius:Ei,borderTopLeftRadius:Ei,borderTopRightRadius:Ei,borderBottomRightRadius:Ei,borderBottomLeftRadius:Ei,width:Ei,maxWidth:Ei,height:Ei,maxHeight:Ei,top:Ei,right:Ei,bottom:Ei,left:Ei,inset:Ei,insetBlock:Ei,insetBlockStart:Ei,insetBlockEnd:Ei,insetInline:Ei,insetInlineStart:Ei,insetInlineEnd:Ei,padding:Ei,paddingTop:Ei,paddingRight:Ei,paddingBottom:Ei,paddingLeft:Ei,paddingBlock:Ei,paddingBlockStart:Ei,paddingBlockEnd:Ei,paddingInline:Ei,paddingInlineStart:Ei,paddingInlineEnd:Ei,margin:Ei,marginTop:Ei,marginRight:Ei,marginBottom:Ei,marginLeft:Ei,marginBlock:Ei,marginBlockStart:Ei,marginBlockEnd:Ei,marginInline:Ei,marginInlineStart:Ei,marginInlineEnd:Ei,fontSize:Ei,backgroundPositionX:Ei,backgroundPositionY:Ei,rotate:Et,rotateX:Et,rotateY:Et,rotateZ:Et,scale:A1,scaleX:A1,scaleY:A1,scaleZ:A1,skew:Et,skewX:Et,skewY:Et,distance:Ei,translateX:Ei,translateY:Ei,translateZ:Ei,x:Ei,y:Ei,z:Ei,perspective:Ei,transformPerspective:Ei,opacity:A0,originX:Es,originY:Es,originZ:Ei,zIndex:M4,fillOpacity:A0,strokeOpacity:A0,numOctaves:M4},M6={...M9,color:El,backgroundColor:El,outlineColor:El,fill:El,stroke:El,borderColor:El,borderTopColor:El,borderRightColor:El,borderBottomColor:El,borderLeftColor:El,filter:M3,WebkitFilter:M3,mask:M5,WebkitMask:M5},M7=e=>M6[e],M8=new Set([M3,M5]);function _e(e,t){let n=M7(e);return M8.has(n)||(n=Em),n.getAnimatableNone?n.getAnimatableNone(t):void 0}var _t=new Set(["auto","none","0"]),_n=class extends Mc{constructor(e,t,n,i,r){super(e,t,n,i,r,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let i=e[n];if("string"==typeof i&&AX(i=i.trim())){let r=function e(t,n,i=1){Ah(i<=4,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");let[r,a]=function(e){let t=MR.exec(e);if(!t)return[,];let[,n,i,r]=t;return[`--${n??i}`,r]}(t);if(!r)return;let s=window.getComputedStyle(n).getPropertyValue(r);if(s){let e=s.trim();return/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e)?parseFloat(e):e}return AX(a)?e(a,n,i+1):a}(i,t.current);void 0!==r&&(e[n]=r),n===e.length-1&&(this.finalKeyframe=i)}}if(this.resolveNoneKeyframes(),!M$.has(n)||2!==e.length)return;let[i,r]=e,a=MQ(i),s=MQ(r);if(AJ(i)!==AJ(r)&&Mi[n]){this.needsMeasurement=!0;return}if(a!==s)if(Me(a)&&Me(s))for(let t=0;t<e.length;t++){let n=e[t];"string"==typeof n&&(e[t]=parseFloat(n))}else Mi[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(null===e[t]||function(e){return"number"==typeof e?0===e:null===e||"none"===e||"0"===e||/^0[^.\s]+$/u.test(e)}(e[t]))&&n.push(t);n.length&&function(e,t,n){let i=0,r;for(;i<e.length&&!r;){let t=e[i];"string"==typeof t&&!_t.has(t)&&Ep(t).values.length&&(r=e[i]),i++}if(r&&n)for(let i of t)e[i]=_e(n,r)}(e,n,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Mi[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let i=t[t.length-1];void 0!==i&&e.getValue(n,i).jump(i,!1)}measureEndState(){let{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;let i=e.getValue(t);i&&i.jump(this.measuredOrigin,!1);let r=n.length-1,a=n[r];n[r]=Mi[t](e.measureViewportBox(),window.getComputedStyle(e.current)),null!==a&&void 0===this.finalKeyframe&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEac
14h(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}},_i=(e,t)=>t&&"number"==typeof e?t.transform(e):e,{schedule:_r}=AD(queueMicrotask,!1);function _a(e,t){let n=function(e){if(null==e)return[];if(e instanceof EventTarget)return[e];if("string"==typeof e){let t=document,n=(void 0)??t.querySelectorAll(e);return n?Array.from(n):[]}return Array.from(e).filter(e=>null!=e)}(e),i=new AbortController;return[n,{passive:!0,...t,signal:i.signal},()=>i.abort()]}var _s=(e,t)=>!!t&&(e===t||_s(e,t.parentElement)),_o=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]),_l=new WeakSet;function _u(e){return t=>{"Enter"===t.key&&e(t)}}function _c(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}function _d(e){return"mouse"===e.pointerType?"number"!=typeof e.button||!!(e.button<=0):!1!==e.isPrimary}var _h=new WeakSet,_p=[...MJ,El,Em],_f=()=>({min:0,max:0}),_m=()=>({x:_f(),y:_f()}),_g=new WeakMap;function _v(e){return"object"==typeof e&&!!e&&"function"==typeof e.start}function _y(e){return"string"==typeof e||Array.isArray(e)}var _b=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],_w=["initial",..._b];function _x(e){return _v(e.animate)||_w.some(t=>_y(e[t]))}function _C(e){return!!(_x(e)||e.variants)}var _k={current:null},_S={current:!1},_T="u">typeof window,_A=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],_E={},_M=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:i,skipAnimations:r,blockInitialAnimation:a,visualState:s},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Mc,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=AH.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,A$.render(this.render,!1,!0))};let{latestValues:l,renderState:u}=s;this.latestValues=l,this.baseTarget={...l},this.initialValues=t.initial?{...l}:{},this.renderState=u,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=r,this.options=o,this.blockInitialAnimation=!!a,this.isControllingVariants=_x(t),this.isVariantNode=_C(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:c,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in d){let t=d[e];void 0!==l[e]&&MK(t)&&t.set(l[e])}}mount(e){if(this.hasBeenMounted)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];this.current=e,_g.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(_S.current||function(){if(_S.current=!0,_T)if(window.matchMedia){let e=window.matchMedia("(prefers-reduced-motion)"),t=()=>_k.current=e.matches;e.addEventListener("change",t),t()}else _k.current=!1}(),this.shouldReduceMotion=_k.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){for(let e in this.projection&&this.projection.unmount(),AU(this.notifyUpdate),AU(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this),this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??=new Set,this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&MS.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:i,times:r,ease:a,duration:s}=t.accelerate,o=new Mb({element:this.current,name:e,keyframes:i,times:r,ease:a,duration:1e3*s}),l=n(o);this.valueSubscriptions.set(e,()=>{l(),o.cancel()});return}let n=E8.has(e);n&&this.onBindTransform&&this.onBindTransform();let i=t.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&A$.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),r;"u">typeof window&&window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{i(),r&&r(),t.owner&&t.stop()})}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in _E){let t=_E[e];if(!t)continue;let{isEnabled:n,Feature:i}=t;if(!this.features[e]&&i&&n(this.props)&&(this.features[e]=new i(this)),this.features[e]){let t=this.features[e];
14t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):_m()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<_A.length;t++){let n=_A[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let i=e["on"+n];i&&(this.propEventSubscriptions[n]=this.on(n,i))}this.prevMotionValues=function(e,t,n){for(let i in t){let r=t[i],a=n[i];if(MK(r))e.addValue(i,r);else if(MK(a))e.addValue(i,Mz(r,{owner:e}));else if(a!==r)if(e.hasValue(i)){let t=e.getValue(i);!0===t.liveStyle?t.jump(r):t.hasAnimated||t.set(r)}else{let t=e.getStaticValue(i);e.addValue(i,Mz(void 0===t?r:t,{owner:e}))}}for(let i in n)void 0===t[i]&&e.removeValue(i);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=Mz(null===t?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n,i,r,a=void 0===this.latestValues[e]&&this.current?this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];return null!=a&&("string"==typeof a&&(n=a,/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(n)||(i=a,/^0[^.\s]+$/u.test(i)))?a=parseFloat(a):(r=a,!_p.find(MZ(r))&&Em.test(t)&&(a=_e(e,t))),this.setBaseTarget(e,MK(a)?a.get():a)),MK(a)?a.get():a}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let{initial:t}=this.props,n;if("string"==typeof t||"object"==typeof t){let i=MF(this.props,t,this.presenceContext?.custom);i&&(n=i[e])}if(t&&void 0!==n)return n;let i=this.getBaseTargetFromProps(this.props,e);return void 0===i||MK(i)?void 0!==this.initialValues[e]&&void 0===n?void 0:this.baseTarget[e]:i}on(e,t){return this.events[e]||(this.events[e]=new Ab),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){_r.render(this.render)}},__=class extends _M{constructor(){super(...arguments),this.KeyframeResolver=_n}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;MK(e)&&(this.childSubscription=e.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}},_R=class{constructor(e){this.isMounted=!1,this.node=e}update(){}},_I={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},_j=E7.length;function _V(e,t,n){let{style:i,vars:r,transformOrigin:a}=e,s=!1,o=!1;for(let e in t){let n=t[e];if(E8.has(e)){s=!0;continue}if(AY(e)){r[e]=n;continue}{let t=_i(n,M9[e]);e.startsWith("origin")?(o=!0,a[e]=t):i[e]=t}}if(t.transform||(s||n?i.transform=function(e,t,n){let i="",r=!0;for(let a=0;a<_j;a++){let s=E7[a],o=e[s];if(void 0===o)continue;let l=!0;if("number"==typeof o)l=o===+!!s.startsWith("scale");else{let e=parseFloat(o);l=s.startsWith("scale")?1===e:0===e}if(!l||n){let e=_i(o,M9[s]);if(!l){r=!1;let t=_I[s]||s;i+=`${t}(${e}) `}n&&(t[s]=e)}}return i=i.trim(),n?i=n(t,r?"":i):r&&(i="none"),i}(t,e.transform,n):i.transform&&="none"),o){let{originX:e="50%",originY:t="50%",originZ:n=0}=a;i.transformOrigin=`${e} ${t} ${n}`}}function _O(e,{style:t,vars:n},i,r){let a=e.style,s;for(s in t)a[s]=t[s];for(s in r?.applyProjectionStyles(a,i),n)a.setProperty(s,n[s])}function _P(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var _N={correct:(e,t)=>
14{if(!t.target)return e;if("string"==typeof e)if(!Ei.test(e))return e;else e=parseFloat(e);return`${_P(e,t.target.x)}% ${_P(e,t.target.y)}%`}},_L={borderRadius:{..._N,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:_N,borderTopRightRadius:_N,borderBottomLeftRadius:_N,borderBottomRightRadius:_N,boxShadow:{correct:(e,{treeScale:t,projectionDelta:n})=>{let i=Em.parse(e);if(i.length>5)return e;let r=Em.createTransformer(e),a=+("number"!=typeof i[0]),s=n.x.scale*t.x,o=n.y.scale*t.y;i[0+a]/=s,i[1+a]/=o;let l=Ey(s,o,.5);return"number"==typeof i[2+a]&&(i[2+a]/=l),"number"==typeof i[3+a]&&(i[3+a]/=l),r(i)}}};function _D(e,{layout:t,layoutId:n}){return E8.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!_L[e]||"opacity"===e)}function _F(e,t,n){let i=e.style,r=t?.style,a={};if(!i)return a;for(let t in i)(MK(i[t])||r&&MK(r[t])||_D(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=i[t]);return a}var _B=class extends __{constructor(){super(...arguments),this.type="html",this.renderInstance=_O}readValueFromInstance(e,t){if(E8.has(t))return this.projection?.isProjecting?E4(t):((e,t)=>{let{transform:n="none"}=getComputedStyle(e);return E9(n,t)})(e,t);{let n=window.getComputedStyle(e),i=(AY(t)?n.getPropertyValue(t):n[t])||0;return"string"==typeof i?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:t}){return function({top:e,left:t,right:n,bottom:i}){return{x:{min:t,max:n},y:{min:e,max:i}}}(function(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),i=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}(e.getBoundingClientRect(),t))}build(e,t,n){_V(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return _F(e,t,n)}},_$={offset:"stroke-dashoffset",array:"stroke-dasharray"},_U={offset:"strokeDashoffset",array:"strokeDasharray"},_W=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function _z(e,{attrX:t,attrY:n,attrScale:i,pathLength:r,pathSpacing:a=1,pathOffset:s=0,...o},l,u,c){if(_V(e,o,u),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:h}=e;for(let e of(d.transform&&(h.transform=d.transform,delete d.transform),(h.transform||d.transformOrigin)&&(h.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),h.transform&&(h.transformBox=c?.transformBox??"fill-box",delete d.transformBox),_W))void 0!==d[e]&&(h[e]=d[e],delete d[e]);void 0!==t&&(d.x=t),void 0!==n&&(d.y=n),void 0!==i&&(d.scale=i),void 0!==r&&function(e,t,n=1,i=0,r=!0){e.pathLength=1;let a=r?_$:_U;e[a.offset]=`${-i}`,e[a.array]=`${t} ${n}`}(d,r,a,s,!1)}var _H=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),_K=e=>"string"==typeof e&&"svg"===e.toLowerCase();function _q(e,t,n){let i=_F(e,t,n);for(let n in e)(MK(e[n])||MK(t[n]))&&(i[-1===E7.indexOf(n)?n:"attr"+n.charAt(0).toUpperCase()+n.substring(1)]=e[n]);return i}var _Y=class extends __{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=_m}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(E8.has(t)){let e=M7(t);return e&&e.default||0}return t=_H.has(t)?t:Mq(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return _q(e,t,n)}
14build(e,t,n){_z(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,i){for(let n in _O(e,t,void 0,i),t.attrs)e.setAttribute(_H.has(n)?n:Mq(n),t.attrs[n])}mount(e){this.isSVGTag=_K(e.tagName),super.mount(e)}},_G=_w.length;function _X(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let i=0;i<n;i++)if(t[i]!==e[i])return!1;return!0}var _Z=[..._b].reverse(),_J=_b.length;function _Q(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function _0(){return{animate:_Q(!0),whileInView:_Q(),whileHover:_Q(),whileTap:_Q(),whileDrag:_Q(),whileFocus:_Q(),exit:_Q()}}function _1(e,t,n,i={passive:!0}){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n)}var _2=(0,iV.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),_3=(0,iV.createContext)({strict:!1}),_5={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},_4=!1;function _9(){return function(){if(_4)return;let e={};for(let t in _5)e[t]={isEnabled:e=>_5[t].some(t=>!!e[t])};_E=e,_4=!0}(),_E}function _6(e){let t=_9();for(let n in e)t[n]={...t[n],...e[n]};_E=t}function _7({children:e,features:t,strict:n=!1}){let[,i]=(0,iV.useState)(!_8(t)),r=(0,iV.useRef)(void 0);if(!_8(t)){let{renderer:e,...n}=t;r.current=e,_6(n)}return(0,iV.useEffect)(()=>{_8(t)&&t().then(({renderer:e,...t})=>{_6(t),r.current=e,i(!0)})},[]),(0,a6.jsx)(_3.Provider,{value:{renderer:r.current,strict:n},children:e})}function _8(e){return"function"==typeof e}var Re=new Set("animate.exit.variants.initial.style.values.variants.transition.transformTemplate.custom.inherit.onBeforeLayoutMeasure.onAnimationStart.onAnimationComplete.onUpdate.onDragStart.onDrag.onDragEnd.onMeasureDragConstraints.onDirectionLock.onDragTransitionEnd._dragX._dragY.onHoverStart.onHoverEnd.onViewportEnter.onViewportLeave.globalTapTarget.propagate.ignoreStrict.viewport".split("."));function Rt(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Re.has(e)}var Rn,Ri=((e,t)=>{let n={};for(var i in e)T7(n,i,{get:e[i],enumerable:!0});return t||T7(n,Symbol.toStringTag,{value:"Module"}),n})({default:()=>Rn}),Rr=(m=()=>{throw Rn={},Error('Could not resolve "@emotion/is-prop-valid" imported by "framer-motion". Is it installed?')},()=>(m&&(g=m(m=0)),g)),Ra=e=>!Rt(e);try{v=(Rr(),At.call(Ri,"module.exports")?Ri["module.exports"]:((e,t,n,i)=>{if(t&&"object"==typeof t||"function"==typeof t)for(var r,a=Ae(t),s=0,o=a.length;s<o;s++)r=a[s],At.call(e,r)||r===n||T7(e,r,{get:(e=>t[e]).bind(null,r),enumerable:!(i=T8(t,r))||i.enumerable});return e})(T7({},"__esModule",{value:!0}),Ri)).default,"function"==typeof v&&(Ra=e=>e.startsWith("on")?!Rt(e):v(e))}catch{}var Rs=(0,iV.createContext)({});function Ro(e){return Array.isArray(e)?e.join(" "):e}var Rl=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Ru(e,t,n){for(let i in t)MK(t[i])||_D(i,n)||(e[i]=t[i])}var Rc=()=>({...Rl(),attrs:{}}),Rd=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Rh(e){return!("string"!=typeof e||e.includes("-"))&&!!(Rd.indexOf(e)>-1||/[A-Z]/u.test(e))}var Rp=e=>(t,n)=>{let i,r=(0,iV.useContext)(Rs),a=(0,iV.useContext)(Au),s=()=>(function({scrapeMotionValuesFromProps:e,createRenderState:t},n,i,r){return{latestValues:function(e,t,n,i){let r={},a=i(e,{});for(let e in a){var s;r[e]=MK(s=a[e])?s.get():s}let{initial:o,animate:l}=e,u=_x(e),c=_C(e);t&&c&&!u&&!1!==e.inherit&&(void 0===o&&(o=t.initial),void 0===l&&(l=t.animate));let d=!!n&&!1===n.initial,h=(d||=!1===o)?l:o;if(h&&"boolean"!=typeof h&&!_v(h)){let t=Array.isArray(h)?h:[h];for(let n=0;n<t.length;n++){let i=MF(e,t[n]);if(i){let{transitionEnd:e,transition:t,...n}=i;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=d?t.length-1:0;t=t[e]}null!==t&&(r[e]=t)}for(let t in e)r[t]=e[t]}}}return r}(n,i,r,e),renderState:t()}})(e,t,r,a);return n?s():(null===(i=(0,iV.useRef)(null)).current&&(i.current=s()),i.current)},Rf=Rp({scrapeMotionValuesFromProps:_F,createRenderState:Rl}),Rm=Rp({scrapeMotionValuesFromProps:_q,createRenderState:Rc}
14),Rg=Symbol.for("motionComponentSymbol"),Rv=(0,iV.createContext)({}),Ry=class extends _R{constructor(e){super(e),e.animationState||=function(e){let t=t=>Promise.all(t.map(({animation:t,options:n})=>(function(e,t,n={}){let i;if(e.notify("AnimationStart",t),Array.isArray(t))i=Promise.all(t.map(t=>MX(e,t,n)));else if("string"==typeof t)i=MX(e,t,n);else{let r="function"==typeof t?MB(e,t,n.custom):t;i=Promise.all(MG(e,r,n))}return i.then(()=>{e.notify("AnimationComplete",t)})})(e,t,n))),n=_0(),i=!0,r=!1,a=t=>(n,i)=>{let r=MB(e,i,"exit"===t?e.presenceContext?.custom:void 0);if(r){let{transition:e,transitionEnd:t,...i}=r;n={...n,...i,...t}}return n};function s(s){let{props:o}=e,l=function e(t){if(!t)return;if(!t.isControllingVariants){let n=t.parent&&e(t.parent)||{};return void 0!==t.props.initial&&(n.initial=t.props.initial),n}let n={};for(let e=0;e<_G;e++){let i=_w[e],r=t.props[i];(_y(r)||!1===r)&&(n[i]=r)}return n}(e.parent)||{},u=[],c=new Set,d={},h=1/0;for(let t=0;t<_J;t++){var p,f;let m=_Z[t],g=n[m],v=void 0===o[m]?l[m]:o[m],y=_y(v),b=m===s?g.isActive:null;!1===b&&(h=t);let w=v===l[m]&&v!==o[m]&&y;if(w&&(i||r)&&e.manuallyAnimateOnMount&&(w=!1),g.protectedKeys={...d},!g.isActive&&null===b||!v&&!g.prevProp||_v(v)||"boolean"==typeof v)continue;if("exit"===m&&g.isActive&&!0!==b){g.prevResolvedValues&&(d={...d,...g.prevResolvedValues});continue}let x=(p=g.prevProp,"string"==typeof(f=v)?f!==p:!!Array.isArray(f)&&!_X(f,p)),C=x||m===s&&g.isActive&&!w&&y||t>h&&y,k=!1,S=Array.isArray(v)?v:[v],T=S.reduce(a(m),{});!1===b&&(T={});let{prevResolvedValues:A={}}=g,E={...A,...T},M=t=>{C=!0,c.has(t)&&(k=!0,c.delete(t)),g.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)};for(let e in E){let t=T[e],n=A[e];if(!d.hasOwnProperty(e))(MH(t)&&MH(n)?_X(t,n):t===n)?void 0!==t&&c.has(e)?M(e):g.protectedKeys[e]=!0:null==t?c.add(e):M(e)}g.prevProp=v,g.prevResolvedValues=T,g.isActive&&(d={...d,...T}),(i||r)&&e.blockInitialAnimation&&(C=!1);let _=w&&x;C&&(!_||k)&&u.push(...S.map(t=>{let n={type:m};if("string"==typeof t&&(i||r)&&!_&&e.manuallyAnimateOnMount&&e.parent){let{parent:i}=e,r=MB(i,t);if(i.enteringChildren&&r){let{delayChildren:t}=r.transition||{};n.delay=M_(i.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(c.size){let t={};if("boolean"!=typeof o.initial){let n=MB(e,Array.isArray(o.initial)?o.initial[0]:o.initial);n&&n.transition&&(t.transition=n.transition)}c.forEach(n=>{let i=e.getBaseTarget(n),r=e.getValue(n);r&&(r.liveStyle=!0),t[n]=i??null}),u.push({animation:t})}let m=!!u.length;return i&&(!1===o.initial||o.initial===o.animate)&&!e.manuallyAnimateOnMount&&(m=!1),i=!1,r=!1,m?t(u):Promise.resolve()}return{animateChanges:s,setActive:function(t,i){if(n[t].isActive===i)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,i)),n[t].isActive=i;let r=s(t);for(let e in n)n[e].protectedKeys={};return r},setAnimateFunction:function(n){t=n(e)},getState:()=>n,reset:()=>{n=_0(),r=!0}}}(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();_v(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},Rb=0;function Rw(e){return{point:{x:e.pageX,y:e.pageY}}}function Rx(e,t,n){let{props:i}=e;e.animationState&&i.whileHover&&e.animationState.setActive("whileHover","Start"===n);let r=i["onHover"+n];r&&A$.postRender(()=>r(t,Rw(t)))}var RC=class extends _R{mount(){let{current:e}=this.node;e&&(this.unmount=function(e,t,n={}){let[i,r,a]=_a(e,n);return i.forEach(e=>{let n=!1,i=!1,a,s=t=>{a&&=void a(t),e.removeEventListener("pointerleave",l)},o=e=>{n=!1,window.removeEventListener("pointerup",o),window.removeEventListener("pointercancel",o),i&&(i=!1,s(e))},l=e=>{if("touch"!==e.pointerType){if(n){i=!0;return}s(e)}};e.addEventListener("pointerenter",n=>{if("touch"===n.pointerType)return;i=!1;let s=t(e,n);"function"==typeof s&&(a=s,e.addEventListener("pointerleave",l,r))},r),e.addEventListener("pointerdown",()=>{n=!0,window.addEventListener("pointerup",o,r),window.addEventListener("pointercancel",o,r)},r)}),a}(e,(e,t)=>(Rx(this.node,t,"Start"),e=>Rx(this.node,e,"End"))))}unmount(){}},Rk=class extends _R{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Av(_1(this.node.current,"focus",()=>this.onFocus()),_1(this.node.current,"blur",()=>this.onBlur()))}unmount(){}};function RS(e,t,n){let{props:i}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&i.whileTap&&e.animationState.setActive("whileTap","Start"===n);let r=i["onTap"+("End"===n?"":n)];r&&A$.postRender(()=>r(t,Rw(t)))}var RT=class extends _R{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=function(e,t,n={}){let[i,r,a]=_a(e,n),s=e=>{let i=e.currentTarget;if(!_d(e)||_h.has(e))return;_l.add(i),n.stopPropagation&&_h.add(e);let a=t(i,e),s=(e,t)=>{window.removeEventListener("pointerup",o),window.removeEventListener("pointercancel",l),_l.has(i)&&_l.delete(i),_d(e)&&"function"==typeof a&&a(e,{success:t})},o=e=>{s(e,i===window||i===document||n.useGlobalTarget||_s(i,e.target))},l=e=>{s(e,!1)};window.addEventListener("pointerup",o,r),window.addEventListener("pointercancel",l,r)};
14return i.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener("pointerdown",s,r),"object"==typeof e&&e&&"offsetHeight"in e&&!("ownerSVGElement"in e)&&(e.addEventListener("focus",e=>((e,t)=>{let n=e.currentTarget;if(!n)return;let i=_u(()=>{if(_l.has(n))return;_c(n,"down");let e=_u(()=>{_c(n,"up")});n.addEventListener("keyup",e,t),n.addEventListener("blur",()=>_c(n,"cancel"),t)});n.addEventListener("keydown",i,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),t)})(e,r)),_o.has(e.tagName)||!0===e.isContentEditable||e.hasAttribute("tabindex")||(e.tabIndex=0))}),a}(e,(e,t)=>(RS(this.node,t,"Start"),(e,{success:t})=>RS(this.node,e,t?"End":"Cancel")),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}},RA=new WeakMap,RE=new WeakMap,RM=e=>{let t=RA.get(e.target);t&&t(e)},R_=e=>{e.forEach(RM)},RR={some:0,all:1},RI=class extends _R{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var e,t;let n;this.stopObserver?.();let{viewport:i={}}=this.node.getProps(),{root:r,margin:a,amount:s="some",once:o}=i,l={root:r?r.current:void 0,rootMargin:a,threshold:"number"==typeof s?s:RR[s]};this.stopObserver=(e=this.node.current,t=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,o&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);let{onViewportEnter:n,onViewportLeave:i}=this.node.getProps(),r=t?n:i;r&&r(e)},n=function({root:e,...t}){let n=e||document;RE.has(n)||RE.set(n,{});let i=RE.get(n),r=JSON.stringify(t);return i[r]||(i[r]=new IntersectionObserver(R_,{root:e,...t})),i[r]}(l),RA.set(e,t),n.observe(e),()=>{RA.delete(e),n.unobserve(e)})}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;let{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}},Rj={renderer:(e,t)=>t.isSVG??Rh(e)?new _Y(t):new _B(t,{allowProjection:e!==iV.Fragment}),animation:{Feature:Ry},exit:{Feature:class extends _R{constructor(){super(...arguments),this.id=Rb++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;if(e&&!1===n){if(this.isExitComplete){let{initial:e,custom:t}=this.node.getProps();if("string"==typeof e){let n=MB(this.node,e,t);if(n){let{transition:e,transitionEnd:t,...i}=n;for(let e in i)this.node.getValue(e)?.jump(i[e])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}let i=this.node.animationState.setActive("exit",!e);t&&!e&&i.then(()=>{this.isExitComplete=!0,t(this.id)})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}},inView:{Feature:RI},tap:{Feature:RT},focus:{Feature:Rk},hover:{Feature:RC}};function RV(e,t){return function(e,{forwardMotionProps:t=!1,type:n}={}){let i=n?"svg"===n:Rh(e),r=i?Rm:Rf;function a(n,a){var s;let o,l,u,c={...(0,iV.useContext)(_2),...n,layoutId:function({layoutId:e}){let t=(0,iV.useContext)(Ao).id;return t&&void 0!==e?t+"-"+e:e}(n)},{isStatic:d}=c,h=function(e){let{initial:t,animate:n}=function(e,t){if(_x(e)){let{initial:t,animate:n}=e;return{initial:!1===t||_y(t)?t:void 0,animate:_y(n)?n:void 0}}return!1===e.inherit?{}:t}(e,(0,iV.useContext)(Rs));return(0,iV.useMemo)(()=>({initial:t,animate:n}),[Ro(t),Ro(n)])}(n),p=r(n,d);if(!d&&"u">typeof window){(0,iV.useContext)(_3).strict;let t=function(e){let{drag:t,layout:n}=_9();if(!t&&!n)return{};let i={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}(c);u=t.MeasureLayout,h.visualElement=function(e,t,n,i,r,a){let{visualElement:s}=(0,iV.useContext)(Rs),o=(0,iV.useContext)(_3),l=(0,iV.useContext)(Au),u=(0,iV.useContext)(_2),c=u.reducedMotion,d=u.skipAnimations,h=(0,iV.useRef)(null),p=(0,iV.useRef)(!1);i||=o.renderer,!h.current&&i&&(h.current=i(e,{visualState:t,parent:s,props:n,presenceContext:l,blockInitialAnimation:!!l&&!1===l.initial,reducedMotionConfig:c,skipAnimations:d,isSVG:a}),p.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));let f=h.current,m=(0,iV.useContext)(Rv);f&&!f.projection&&r&&("html"===f.type||"svg"===f.type)&&function(e,t,n,i){var r;let{layoutId:a,layout:s,drag:o,dragConstraints:l,layoutScroll:u,layoutRoot:c,layoutAnchor:d,layoutCrossfade:h}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:function e(t){if(t)return!1===t.options.allowProjection?e(t.parent):t.projection}(e.parent)),e.projection.setOptions({layoutId:a,layout:s,alwaysMeasureLayout:!!o||l&&(r=l)&&"object"==typeof r&&Object.prototype.hasOwnProperty.call(r,"current"),visualElement:e,animationType:"string"==typeof s?s:"both",initialPromotionConfig:i,crossfade:h,layoutScroll:u,layoutRoot:c,layoutAnchor:d})}(h.current,n,r,m);let g=(0,iV.useRef)(!1);(0,iV.useInsertionEffect)(()=>{f&&g.current&&f.update(n,l)});let v=n[MY],y=(0,iV.useRef)(!!v&&"u">typeof window&&!window.MotionHandoffIsComplete?.(v)&&window.MotionHasOptimisedAnimation?.(v));return Al(()=>{p.current=!0,f&&(g.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),f.scheduleRenderMicrotask(),y.current&&f.animationState&&f.animationState.animateChanges())}),(0,iV.useEffect)(()=>{f&&(!y.current&&f.animationState&&f.animationState.animateChanges(),y.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(v)}),!1),f.enteringChildren=void 0)}),f}(e,p,c,void 0,t.ProjectionNode,i)}return(0,a6.jsxs)(Rs.Provider,{value:h,children:[u&&h.visualElement?(0,a6.jsx)(u,{visualElement:h.visualElement,...c}):null,function(e,t,n,{latestValues:i},r,a=!1,s){let o=(s??Rh(e)?function(e,t,n,i){let r=(0,iV.useMemo)(()=>{let n=Rc();return _z(n,t,_K(i),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};Ru(t,e.style,e),r.style={...t,...r.style}}return r}:function(e,t){let n,i={},r=(Ru(n={},e.style||{},e),Object.assign(n,function({transformTemplate:e},t){return(0,iV.useMemo)(()=>{let n=Rl();return _V(n,t,e),Object.assign({},n.vars,n.style)},[t])}(e,t)),n);return e.drag&&!1!==e.dragListener&&(i.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=!0===e.drag?"none":`pan-${"x"===e.drag?"y":"x"}
14`),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(i.tabIndex=0),i.style=r,i})(t,i,r,e),l=function(e,t,n){let i={};for(let r in e)"values"===r&&"object"==typeof e.values||MK(e[r])||(Ra(r)||!0===n&&Rt(r)||!t&&!Rt(r)||e.draggable&&r.startsWith("onDrag"))&&(i[r]=e[r]);return i}(t,"string"==typeof e,a),u=e===iV.Fragment?{}:{...l,...o,ref:n},{children:c}=t,d=(0,iV.useMemo)(()=>MK(c)?c.get():c,[c]);return(0,iV.createElement)(e,{...u,children:d})}(e,n,(s=h.visualElement,o=(0,iV.useRef)(a),(0,iV.useInsertionEffect)(()=>{o.current=a}),l=(0,iV.useRef)(null),(0,iV.useCallback)(e=>{e&&p.onMount?.(e);let t=o.current;if("function"==typeof t)if(e){let n=t(e);"function"==typeof n&&(l.current=n)}else l.current?(l.current(),l.current=null):t(e);else t&&(t.current=e);s&&(e?s.mount(e):s.unmount())},[s])),p,d,t,i)]})}a.displayName=`motion.${"string"==typeof e?e:`create(${e.displayName??e.name??""})`}`;let s=(0,iV.forwardRef)(a);return s[Rg]=e,s}(e,t)}var RO=RV("div"),RP=RV("span"),RN=({children:e,...t})=>{let n=iV.default.useContext(RH),i=iV.default.useMemo(()=>{if(!Ai(n.value))return;let e=Aa(n.value,n.options,n.legacyBehavior),t=e?.label||e?.value||n.placeholder;return n.legacyBehavior&&n?.value?.label||t},[n.value,n.options,n.legacyBehavior,n.placeholder]);return(0,a6.jsx)(gC,{children:(0,a6.jsx)(sL.Text,{color:n.value?"default":"gray",textOverflow:"ellipsis",overflow:"hidden",...t,children:e||i})})},RL=({children:e,...t})=>{let n=iV.default.useContext(RH);return(0,a6.jsx)(gC,{children:(0,a6.jsx)(sL.Text,{color:"gray",textOverflow:"ellipsis",overflow:"hidden",...t,children:e||n.placeholder})})},RD=({children:e})=>{let t=iV.default.useContext(RH);if(!Array.isArray(t.value))return null;let n=t.layout||"truncate",i=(t.value.length-2).toString().split("");return(0,a6.jsxs)(sd,{gap:"0_5",w:"full",wrap:"wrap"===n?"wrap":"nowrap",align:"center",style:{position:"relative",flexGrow:1},children:[e,"truncate"===n&&t.value.length>2&&(0,a6.jsx)(sd,{as:RO,initial:{opacity:0}
14,animate:{opacity:1},exit:{opacity:0},transition:{duration:.1,type:"spring",bounce:0},h:"full",pr:"1",pl:"8",align:"center","aria-label":`${t.value.length-2} more selected`,position:"absolute",right:"0",style:{backgroundImage:"linear-gradient(to left, var(--tgph-surface-1) 0 60%, transparent 90% 100%)"},children:(0,a6.jsxs)(sf,{as:"span",size:"1",style:{whiteSpace:"nowrap"},children:["+",i.map(e=>(0,a6.jsx)(su,{as:RP,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.1,type:"spring",bounce:0},w:"2",display:"inline-block",children:e},e))," ","more"]})})]})},RF=iV.default.createContext({value:""}),RB={Root:({value:e,children:t,...n})=>(0,a6.jsx)(RF.Provider,{value:{value:e},children:(0,a6.jsx)(gb.Root,{as:RP,initial:{opacity:0,scale:.5},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.5},transition:{duration:.1,type:"spring",bounce:0},size:"1",maxH:"5",rounded:"1",layout:"position",...n,children:t})}),Text:({children:e,...t})=>{let n=iV.default.useContext(RH),i=iV.default.useContext(RF),r=iV.default.useMemo(()=>{let e=n.options.find(e=>e.value===i.value);if(e)return e.label||e.value;if(!n.value)return;let t=n.value.find(e=>Ar(e,n.legacyBehavior)===i.value);if(t)return t},[n.options,n.value,i.value,n.legacyBehavior]);return(0,a6.jsx)(gb.Text,{...t,children:e||r})},Button:({children:e,...t})=>{let n=iV.default.useContext(RH),i=iV.default.useContext(RF);return(0,a6.jsx)(gb.Button,{icon:{icon:dR,alt:`Remove ${i.value}`},height:"full",onClick:e=>{if(!n.onValueChange)return;let t=n.onValueChange,r=n.value.filter(e=>Ar(e,n.legacyBehavior)!==i.value);t?.(r),e.stopPropagation(),e.preventDefault()},"data-tgph-combobox-tag-button":!0,...t,children:e})},Default:({value:e,children:t,...n})=>(0,a6.jsxs)(RB.Root,{value:e,...n,children:[(0,a6.jsx)(RB.Text,{children:t}),(0,a6.jsx)(RB.Button,{})]})},R$={TriggerIndicator:({icon:e=T4,"aria-hidden":t=!0,...n})=>{let i=iV.default.useContext(RH);return(0,a6.jsx)(sL.Icon,{as:RP,animate:{rotate:180*!!i.open},transition:{duration:.15,type:"spring",bounce:0},icon:e,"aria-hidden":t,...n})},TriggerClear:({tooltipProps:e,...t})=>{let n=iV.default.useContext(RH),i=()=>
14{if(Array.isArray(n.value)){let e=n.onValueChange;e?.([])}if(Ai(n.value)){let e=n.onValueChange;e?.(void 0)}n.triggerRef?.current?.focus()};return iV.default.useMemo(()=>Ai(n.value)?n.clearable&&n.value:Array.isArray(n.value)?n.clearable&&n.value?.length>0:void 0,[n.clearable,n.value])?(0,a6.jsx)(dE,{label:"Clear field",...e,children:(0,a6.jsx)(sL,{type:"button",icon:{icon:dR,alt:"Clear field"},size:"0",variant:"ghost",onClick:e=>{n.value&&(e.stopPropagation(),i())},onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.stopPropagation(),e.preventDefault(),i())},"data-tgph-combobox-clear":!0,style:{marginTop:"calc(-1 * var(--tgph-spacing-1)",marginBottom:"calc(-1 * var(--tgph-spacing-1)"},...t})}):null},TriggerText:RN,TriggerPlaceholder:RL,TriggerTagsContainer:RD,TriggerActionsContainer:e=>(0,a6.jsx)(sd,{align:"center",gap:"1",...e}),TriggerTag:RB,TriggerValue:()=>{let e=iV.default.useContext(RH);if(e.value&&Array.isArray(e.value)){let t=e.layout||"truncate";return 0===e.value.length?(0,a6.jsx)(RL,{}):(0,a6.jsx)(_7,{features:Rj,children:(0,a6.jsx)(RD,{children:e.value.map((n,i)=>{let r=Ar(n,e.legacyBehavior);if(r&&("truncate"===t&&i<=1||"wrap"===t))return(0,a6.jsx)(se,{children:(0,a6.jsx)(RB.Default,{value:r})},r)})})})}if(e&&Ai(e.value))return e.value?(0,a6.jsx)(RN,{}):(0,a6.jsx)(RL,{})}},RU=["ArrowDown","PageUp","Home"],RW=["ArrowUp","PageDown","End"],Rz=["Enter"," "],RH=iV.default.createContext({value:void 0,onValueChange:()=>{},contentId:"",triggerId:"",open:!1,setOpen:()=>{},onOpenToggle:()=>{},clearable:!1,disabled:!1,options:[],legacyBehavior:!1}),RK=({value:e,label:t,selected:n,onSelect:i,children:r,...a})=>{let s=iV.default.useContext(RH),[o,l]=iV.default.useState(!1),u=s.value,c=!s.searchQuery||(({children:e,value:t,searchQuery:n})=>{let i=As(e);return t?.toLowerCase().includes(n.toLowerCase())||i.some(e=>e.toLowerCase().includes(n.toLowerCase()))})({children:t||r,value:e,searchQuery:s.searchQuery}),d=Array.isArray(u)?u.some(t=>Ar(t,s.legacyBehavior)===e):Ar(u,s.legacyBehavior)===e,h=n=>{if(n.stopPropagation(),!(n.key&&!Rz.includes(n.key))){if(n.preventDefault(),!0===s.closeOnSelect&&s.setOpen(!1),i)return i(n);if(Ai(u)){let n=s.onValueChange;!0===s.legacyBehavior?n?.({value:e,label:t}):n?.(e)}else if(Array.isArray(u)){let n=s.onValueChange,i=s.value,r=d?i.filter(t=>Ar(t,s.legacyBehavior)!==e):[...i,!0===s.legacyBehavior?{value:e,label:t}:e];n?.(r)}s.triggerRef?.current?.focus()}};if(c)return(0,a6.jsx)(T5.Button,{type:"button",onSelect:h,onKeyDown:h,selected:null===n?null:n??d,onFocus:()=>l(!0),onBlur:()=>l(!1),role:"option","aria-selected":d?"true":"false","data-tgph-combobox-option":!0,"data-tgph-combobox-option-focused":o,"data-tgph-combobox-option-value":e,"data-tgph-combobox-option-label":t,...a,children:t||r||e})};Object.assign({},{Root:({modal:e=!0,closeOnSelect:t=!0,clearable:n=!1,disabled:i=!1,legacyBehavior:r=!1,open:a,onOpenChange:s,defaultOpen:o,value:l,defaultValue:u,onValueChange:c,errored:d,placeholder:h,layout:p,defaultScrollToValue:f,children:m,...g})=>{let v=iV.default.useId(),y=iV.default.useId(),b=iV.default.useRef(null),w=iV.default.useRef(null),x=iV.default.useRef(null),C=iV.default.useMemo(()=>{let e;return(e=(t,n=[])=>(iV.default.Children.toArray(t).forEach(t=>{if(iV.default.isValidElement(t)){let i=t.props;i.value?n.push(t):i.children&&e(i.children,n)}}),n))(m).map(e=>({value:e.props.value,label:e.props?.label||e.props.children||e.props.value}))},[m]),[k,S]=iV.default.useState(""),[T=!1,A]=(0,sF.useControllableState)({prop:a,defaultProp:o??!1,onChange:s}),[E,M]=(0,sF.useControllableState)({prop:l,defaultProp:u,onChange:c}),_=iV.default.useCallback(()=>{A(e=>!e)},[A]);return iV.default.useEffect(()=>{T||S("")},[T]),(0,a6.jsx)(RH.Provider,{value:{contentId:v,triggerId:y,value:E,onValueChange:M,placeholder:h,open:T,setOpen:A,onOpenToggle:_,closeOnSelect:t,clearable:n,disabled:i,searchQuery:k,setSearchQuery:S,triggerRef:b,searchRef:w,contentRef:x,errored:d,layout:p,options:C,legacyBehavior:r,defaultScrollToValue:f},children:(0,a6.jsx)(T5.Root,{open:T,onOpenChange:A,modal:e,...g,children:m})})},Trigger:({size:e="1",children:t,...n})=>
14{let i=iV.default.useContext(RH),r=Array.isArray(i.value)&&i.value.length>0,a=iV.default.useMemo(()=>{if(i.value){if(Ai(i.value))return Aa(i.value,i.options,i.legacyBehavior);if(Array.isArray(i.value))return i.value.map(e=>Aa(e,i.options,i.legacyBehavior))}},[i.value,i.options,i.legacyBehavior]),s=iV.default.useCallback(()=>a?Ai(a)?a?.label||a?.value||i.placeholder:Array.isArray(a)&&a.map(e=>e?.label||e?.value).join(", ")||i.placeholder:i.placeholder,[a,i.placeholder]);return(0,a6.jsx)(T5.Trigger,{...n,asChild:!0,onClick:e=>{e.preventDefault(),i.onOpenToggle(),i.triggerRef?.current?.focus()},onKeyDown:e=>{if(e.target===i.triggerRef?.current){if("Tab"===e.key)return void e.stopPropagation();if("ArrowDown"===e.key||Rz.includes(e.key)){e.stopPropagation(),e.preventDefault(),i.onOpenToggle();return}}},tgphRef:i.triggerRef,children:(0,a6.jsx)(sL.Root,{id:i.triggerId,type:"button",bg:"surface-3",variant:"outline",align:"center",minH:An[e],h:"full",w:"full",py:"0_5",pr:"1_5",pl:r?"0_5":"1_5",size:e,color:i.errored?"red":"gray",justify:"space-between",role:"combobox","aria-label":s(),"aria-controls":i.contentId,"aria-expanded":i.open,"aria-haspopup":"listbox","data-tgph-combobox-trigger":!0,"data-tgph-combobox-trigger-open":i.open,disabled:i.disabled,...n,children:t?"function"==typeof t?t({value:a}):t:(0,a6.jsxs)(a6.Fragment,{children:[(0,a6.jsx)(R$.TriggerValue,{}),(0,a6.jsxs)(R$.TriggerActionsContainer,{children:[(0,a6.jsx)(R$.TriggerClear,{}),(0,a6.jsx)(R$.TriggerIndicator,{})]})]})})})},Content:({style:e,children:t,tgphRef:n,...i})=>{let r=iV.default.useContext(RH),a=iV.default.useRef(!1),s=xd(n,r.contentRef),o=iV.default.useRef(null),[l,u]=iV.default.useState(0),[c,d]=iV.default.useState(!1),h=iV.default.useCallback(e=>{let t=e?.getBoundingClientRect();t&&u(t.height),c||d(!0)},[c]);return iV.default.useEffect(()=>{let e=new ResizeObserver(e=>{for(let t of e)h(t.target)});return o.current&&c&&e.observe(o.current),()=>e.disconnect()},[c,h]),iV.default.useEffect(()=>{!0===c&&!1===r.open&&d(!1)},[r.open,c]),iV.default.useEffect(()=>{let e;return r.open&&(e=setTimeout(()=>{h(o.current)},10)),()=>e&&clearTimeout(e)},[r.open,h]),(0,a6.jsx)(xc.DismissableLayer,{onEscapeKeyDown:e=>{r.open&&(e.stopPropagation(),e.preventDefault(),r.setOpen(!1))},children:(0,a6.jsx)(T5.Content,{className:"tgph",mt:"1",onCloseAutoFocus:e=>{a.current||r.triggerRef?.current?.focus(),a.current=!1,e.preventDefault()},bg:"surface-1",style:{width:"var(--tgph-combobox-trigger-width)",transition:"min-height 200ms ease-in-out",minHeight:l?`${l}px`:"0",...e,"--tgph-combobox-content-transform-origin":"var(--radix-popper-transform-origin)","--tgph-combobox-content-available-width":"var(--radix-popper-available-width)","--tgph-combobox-content-available-height":"calc(var(--radix-popper-available-height) - var(--tgph-spacing-8))","--tgph-combobox-trigger-width":"var(--radix-popper-anchor-width)","--tgph-combobox-trigger-height":"var(--radix-popper-anchor-height)"},...i,tgphRef:s,"data-tgph-combobox-content":!0,"data-tgph-combobox-content-open":r.open,role:void 0,"aria-orientation":void 0,onKeyDown:e=>{e.stopPropagation();let t=r.contentRef?.current?.querySelectorAll("[data-tgph-combobox-option]");document.activeElement===t?.[0]&&RW.includes(e.key)&&r.searchRef?.current?.focus()},children:(0,a6.jsx)(sd,{direction:"column",gap:"1",tgphRef:o,children:t})})})},Options:({tgphRef:e,...t})=>{let n=iV.default.useContext(RH),i=iV.default.useRef(null),r=xd(e,i);return iV.default.useEffect(()=>{n.open&&i.current&&requestAnimationFrame(()=>{let e=(Ai(n.value)?Ar(n.value,n.legacyBehavior):Array.isArray(n.value)&&n.value.length>0?Ar(n.value[0],n.legacyBehavior):null)??n.defaultScrollToValue;if(e){let t=Array.from(i.current?.querySelectorAll("[data-tgph-combobox-option]")||[]).find(t=>t.getAttribute("data-tgph-combobox-option-value")===e);t&&"function"==typeof t.scrollIntoView&&t.scrollIntoView({block:"center"})}})},[n.open,n.value,n.legacyBehavior,n.defaultScrollToValue]),(0,a6.jsx)(sd,{id:n.contentId,direction:"column",gap:"1",style:{overflowY:"auto","--max-height":t.maxHeight?void 0:"calc(var(--tgph-combobox-content-available-height) - var(--tgph-spacing-12))"},role:"listbox",tgphRef:r,...t})},Option:RK,Search:({label:e="Search",placeholder:t="Search",tgphRef:n,value:i,onValueChange:r,...a})=>{let s=iV.default.useId(),o=iV.default.useContext(RH),l=xd(n,o.searchRef),u=i??o.searchQuery,c=r??o.setSearchQuery;return iV.default.useEffect(()=>{let e=e=>
14{RU.includes(e.key)&&o.contentRef?.current?.focus({preventScroll:!0}),"Escape"===e.key&&o.setOpen(!1),e.stopPropagation()},t=o.searchRef?.current;if(t)return t.addEventListener("keydown",e),()=>{t.removeEventListener("keydown",e)}},[o]),(0,a6.jsxs)(su,{borderBottom:"px",px:"1",pb:"1",children:[(0,a6.jsx)(w9,{children:(0,a6.jsx)(sf,{as:"label",htmlFor:s,children:e})}),(0,a6.jsx)(xx,{id:s,variant:"ghost",placeholder:t,value:u,onChange:e=>{c(e.target.value)},LeadingComponent:(0,a6.jsx)(sk,{icon:T6,alt:"Search Icon"}),TrailingComponent:o?.searchQuery&&o?.searchQuery?.length>0?(0,a6.jsx)(sL,{variant:"ghost",color:"gray",icon:{icon:dR,alt:"Clear Search Query"},onClick:()=>o.setSearchQuery?.("")}):null,autoFocus:!0,"data-tgph-combobox-search":!0,"aria-controls":o.contentId,...a,tgphRef:l})]})},Empty:({icon:e={icon:T6,alt:"Search Icon"},message:t="No results found",children:n,...i})=>{let r=iV.default.useContext(RH),[a,s]=iV.default.useState(!1);if(iV.default.useEffect(()=>{r.contentRef?.current?.querySelectorAll("[data-tgph-combobox-option]")?.length===0?s(!0):s(!1)},[r.searchQuery,r.contentRef,n]),a)return(0,a6.jsxs)(sd,{gap:"1",align:"center",justify:"center",w:"full",my:"8","data-tgph-combobox-empty":!0,...i,children:[null===e?(0,a6.jsx)(a6.Fragment,{}):(0,a6.jsx)(sk,{...e}),null===t?(0,a6.jsx)(a6.Fragment,{}):(0,a6.jsx)(sf,{as:"span",children:t})]})},Create:({leadingText:e="Create",values:t,onCreate:n,selected:i=null,legacyBehavior:r=!1,...a})=>{let s=iV.default.useContext(RH),o=iV.default.useCallback(e=>!!t&&t?.length!==0&&t.some(t=>Ar(t,r)===e),[t,r]);if(s.searchQuery&&!o(s.searchQuery))return(0,a6.jsx)(RK,{leadingIcon:{icon:T9,"aria-hidden":!0},mx:"1",value:s.searchQuery,label:`${e} "${s.searchQuery}"`,selected:i,onSelect:()=>{n&&s.searchQuery&&(n(!0===r?{value:s.searchQuery}:s.searchQuery),s.setSearchQuery?.(""))},...a})},Primitives:R$}),sb("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]),sb("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]),sb("hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]),e.s([],29114),e.i(735134);var Rq=e.i(693184),RY=e.i(669876);let RG=(0,iV.createContext)(!1);e.s(["KnockAuthProvider",0,function({apiKey:e,initialToken:t,initialUserId:n,children:i}){let r=RY.authClient.useSession(),a=r.data?.user?.id??null,s=r.isPending,[o,l]=(0,iV.useState)(t),[u,c]=(0,iV.useState)(n),d=(0,iV.useRef)(o);(0,iV.useEffect)(()=>{d.current=o},[o]);let h=(0,iV.useRef)(null),p=(0,iV.useRef)(null),f=(0,iV.useRef)(null);(0,iV.useEffect)(()=>{if(s)return;if(null===a){h.current?.abort(),p.current?.abort(),h.current=null,p.current=null,f.current=null;return}if(a===u&&null!==d.current||f.current===a)return;h.current?.abort();let e=new AbortController;return h.current=e,(async()=>{try{let t=await (0,Rq.postNotificationsToken)({throwOnError:!1});if(e.signal.aborted)return;let n=t.data?.data??null;if(t.error||null===n){f.current=a,l(null);return}l(n),c(a),f.current=null}catch{if(e.signal.aborted)return;f.current=a,l(null)}})(),()=>{e.abort()}},[a,u,s]);let m=(0,iV.useCallback)(async()=>{p.current?.abort();let e=new AbortController;p.current=e;try{let t=await (0,Rq.postNotificationsToken)({throwOnError:!1});if(e.signal.aborted)throw Error("Knock token refresh aborted");let n=t.data?.data??null;if(t.error||null===n)throw Error("Knock token refresh failed or returned null");return n}catch(t){throw e.signal.aborted||l(null),t}},[]),g=a??(s?u:null),v=s||null!==a?o:null;return e&&v&&g?(0,a6.jsx)(RG.Provider,{value:!0,children:(0,a6.jsx)(i$,{apiKey:e,user:{id:g},userToken:v,identificationStrategy:"skip",onUserTokenExpiring:m,timeBeforeExpirationInMs:6e4,children:i},g)}):(0,a6.jsx)(RG.Provider,{value:!1,children:i})},"useKnockReady",0,function(){return(0,iV.use)(RG)}],329397)},221559,e=>{"use strict";var t=e.i(45113),n=e.i(413701),i=e.i(533745);function r(e){return console.error("[knock] notifications subtree failed; hiding notifications",e)}e.s(["KnockNotificationsBoundary",0,function(e){let a,s=(0,n.c)(2),{children:o}=e;return s[0]!==o?(a=(0,t.jsx)(i.ErrorBoundary,{fallback:null,onError:r,children:o}),s[0]=o,s[1]=a):a=s[1],a}])},365764,e=>{"use strict";e.i(71042);var t=e.i(45113),n=e.i(413701),i=e.i(952961),r=e.i(591401),a=e.i(968467),s=e.i(17772),o=e.i(593854),l=e.i(730684);e.i(754466);var u=e.i(567039),c=e.i(808224),d=e.i(650938),h=e.i(336911),p=e.i(130574),f=e.i(707683),m=e.i(465473),g=e.i(628908),v=e.i(646615),y=e.i(773180),b=e.i(672724);e.i(727447);var w=e.i(125227);e.i(29114);var x=e.i(832234),C=e.i(764579),k=e.i(403773);e.i(27888);var S=e.i(729659),T=e.i(260284),A=e.i(715978),E=e.i(365274),M=e.i(745493),_=e.i(657071),R=e.i(982854),I=e.i(571505),j=e.i(842869),V=e.i(896770),O=e.i(285720),P=e.i(482914),N=e.i(783029),L=e.i(545957
14),D=e.i(574004),F=e.i(782373),B=e.i(273191),$=e.i(937669),U=e.i(546579);let W={"content-queued":"learning","content-completed":"success","account-connection-completed":"success","content-failed":"failed","failed-document":"failed","account-connection-failed":"failed","content-needs-attention":"attention","unanswered-question":"unanswered","content-deleted":"deleted","max-word-limit-reached":"attention","voice-training-completed":"success","voice-training-failed":"failed","alert-occurrence":"attention","daily-question-results":"success","daily-question-missed":"attention","delphi-finished-training":"success","new-visitor-conversation":"success","answer-updated":"success","upload-your-voice":"activation-suggestion","ways-to-share":"activation-suggestion","try-voice-call":"activation-suggestion"},z={"content-queued":"queued","content-completed":"completed","account-connection-completed":"completed","content-failed":"failed","account-connection-failed":"failed","content-needs-attention":"attention","unanswered-question":"unanswered","content-deleted":"deleted","max-word-limit-reached":"attention","voice-training-completed":"completed","voice-training-failed":"failed","delphi-finished-training":"completed","new-visitor-conversation":"completed","answer-updated":"completed","alert-occurrence":"alert","daily-question-results":"completed","daily-question-missed":"attention","mind-viz-ready":"mind-viz","upload-your-voice":"activation-suggestion","ways-to-share":"activation-suggestion","try-voice-call":"activation-suggestion","account-completed":"completed","failed-document":"failed"},H={YOUTUBE:{prefix:"YouTube Channel",unit:"videos"},PODCAST:{prefix:"Podcast Series",unit:"episodes"},TWITTER:{prefix:"X (Twitter)",unit:"posts"},INSTAGRAM:{prefix:"Instagram",unit:"posts"},LINKEDIN:{prefix:"LinkedIn Profile",unit:"posts"},TIKTOK:{prefix:"TikTok Account",unit:"videos"},SUBSTACK:{prefix:"Substack",unit:"posts"},WEBSITE:{prefix:"Website",unit:"pages"}},K={YOUTUBE:"YouTube account",PODCAST:"Podcast account",TWITTER:"X account",INSTAGRAM:"Instagram account",LINKEDIN:"LinkedIn account",TIKTOK:"TikTok account",SUBSTACK:"Substack account",WEBSITE:"Website account",NOTION:"Notion",SLACK:"Slack",EVERNOTE:"Evernote",FACEBOOK:"Facebook",GITHUB:"GitHub",LOOM:"Loom",VIMEO:"Vimeo",OBSIDIAN:"Obsidian",GRANOLA:"Granola",GOOGLE_DRIVE:"Google Drive"},q={YOUTUBE:"YouTube",PODCAST:"Podcast",TWITTER:"X",INSTAGRAM:"Instagram",LINKEDIN:"LinkedIn",TIKTOK:"TikTok",SUBSTACK:"Substack",NOTION:"Notion",SLACK:"Slack",EVERNOTE:"Evernote",FACEBOOK:"Facebook",VIMEO:"Vimeo",GRANOLA:"Granola"},Y="https://foxifarenmy82tl8.public.blob.vercel-storage.com/anon-avatar.png",G="/~/conversations",X="/~/knowledge/manage",Z="/~/settings/voice";function J(e,t){let n=e?.clone_slug;return n?`/${encodeURIComponent(n)}${t}`:"/~"}function Q(e,t){return t?`/@/${encodeURIComponent(t)}${e.slice(2)}`:e}let ee={"content-queued":"learning","content-completed":"completed","content-failed":"failed","content-needs-attention":"attention","content-deleted":"deleting"};function et(e,t,n){let i=new URLSearchParams;if(t)i.set("contentId",t);else{let t=ee[e];t&&i.set("status",t)}let r=Q(X,n),a=i.toString();return a?`${r}?${a}`:r}let en={YOUTUBE:$.DoctypeYouTubeIcon,PODCAST:O.DoctypePodcastIcon,TWITTER:B.DoctypeXTwitterIcon,INSTAGRAM:_.DoctypeInstagramIcon,LINKEDIN:R.DoctypeLinkedinIcon,TIKTOK:N.DoctypeTikTokIcon,NOTION:j.DoctypeNotionIcon,SLACK:P.DoctypeSlackIcon,EVERNOTE:T.DoctypeEverNoteStickyIcon,FACEBOOK:A.DoctypeFacebookIcon,GRANOLA:E.DoctypeGranolaIcon,WEBSITE:F.DoctypeWebsiteIcon,VIDEO:L.DoctypeVideoIcon,IMAGE:M.DoctypeImageIcon,PDF:V.DoctypePDFIcon,DOC:S.DoctypeDOCIcon,DOCX:S.DoctypeDOCIcon,VOICE:D.DoctypeWaveformIcon,AUDIO:D.DoctypeWaveformIcon};function ei(e){return e?en[e]??I.DoctypeManualIcon:I.DoctypeManualIcon}let er={YOUTUBE:k.YoutubeIcon,PODCAST:k.PodcastIcon,TWITTER:k.XTwitterIcon,INSTAGRAM:k.InstagramIcon,LINKEDIN:k.LinkedInIcon,TIKTOK:k.TikTokIcon,SUBSTACK:k.SubstackIcon,NOTION:k.NotionIcon,SLACK:k.SlackIcon,EVERNOTE:T.DoctypeEverNoteStickyIcon,FACEBOOK:k.FacebookIcon,VIMEO:k.VimeoIcon,GRANOLA:E.DoctypeGranolaIcon};function ea(e){let t=e?.content_type;return t&&K[t]?K[t]:"manual entry"}function es(e){return e?`${e}'s`:"your"}function eo(e,t){if(e?.upload_source==="RSS")return{subtitle:function(e,t){let n=es(t);switch(e?.content_type){case"YOUTUBE":return`Synced from ${n} YouTube channel`;case"PODCAST":return`Synced from ${n} Podcast series`;
14case"WEBSITE":return`Synced from ${n} Website`;default:return`Synced from ${n} ${ea(e)}`}}(e,t)};let n=e?.content_type,i=n?q[n]:void 0,r=n?er[n]:void 0;return i&&r?{subtitle:`From ${es(t)}`,subtitleBrand:i,subtitleBrandIcon:r}:{subtitle:`From ${es(t)} ${ea(e)}`}}function el(e,t){let n=e?.owner_username;if(n&&t&&n!==t)return e?.owner_name??void 0}function eu(e,t){let n,i,r,a,s=e.data??null,o=e.activities?.[0]?.data??null,l=s||o?{...o??{},...s??{}}:null,u=e.source.key,c=z[u]??"other",d=l?.owner_username??l?.clone_slug,h=e.total_activities??0,p=e.activities??[];if("account-connection-completed"===u||"account-connection-failed"===u){let e,t,n=l?.source_name??"Account",i=l?.content_type??"",r=l?.successful_count??0,a=l?.failed_count??0,s=l?.attention_count??0,o=H[i]??{prefix:i||"Account",unit:"items"};"account-connection-completed"===u?(e=a+s>r?"partially connected":"connected",t=a>0||s>0?`${r} ${o.unit} trained, ${a+s} need attention`:`${r} ${o.unit} trained`):(e="failed to connect",t=`${a+s} ${o.unit} could not be trained`);let h=r+a+s||1,p=Math.min(h,5),f=ei(i),m=l?.folder_id,g=Q(X,d);return{status:c,subject:n,subjectSuffix:void 0,title:e,subtitle:t,href:m?`${g}?folderId=${encodeURIComponent(m)}`:g,doctypes:Array.from({length:p},()=>f),doctypeOverflow:Math.max(0,h-5)}}if("unanswered-question"===u){let t=e.activities?.[0]?.data??l,n=t?.message_text??"Unanswered question",i=(t?.visitor_name??"Someone").split(" ")[0],r=t?.visitor_image_url,a=t?.conversation_id,s=t?.message_id,o=Q(G,d),u=`${o}?mode=my-delphi&unanswered=true`,p=void 0!==a?`${o}?mode=my-delphi&threadId=${encodeURIComponent(a)}`+(s?`&messageId=${encodeURIComponent(s)}`:""):u;if(h>1){let e=h-1;return{status:c,subject:n,subjectSuffix:`and ${e} ${1===e?"other":"others"}`,title:"were unanswered",subtitle:"Help your Delphi respond to these",href:u,doctypes:[],doctypeOverflow:0}}return{status:c,subject:i,subjectSuffix:void 0,title:"asked a question your Delphi needs help with",subtitle:`Message: “${n.slice(0,80)}${n.length>80?"...":""}”`,subtitleItalic:!0,expandableMessage:n,href:p,doctypes:[],doctypeOverflow:0,actorImageUrl:r??Y}}if("answer-updated"===u){let e=p[0]?.data??l,t=e?.owner_name??"Someone",n=e?.owner_image_url||void 0,i=e?.chat_url;if(h>1)return{status:c,subject:t,subjectSuffix:void 0,title:`has more on ${h} of your questions`,subtitle:void 0,href:i,doctypes:[],doctypeOverflow:0,actorImageUrl:n};let r=e?.topic??"your question",a=e?.question_text;return{status:c,subject:t,subjectSuffix:void 0,title:e?.had_no_answer?`has an answer on ${r} now`:`has more on ${r}`,subtitle:a?`You asked: “${a.slice(0,80)}${a.length>80?"...":""}”`:void 0,subtitleItalic:!0,expandableMessage:a,href:i,doctypes:[],doctypeOverflow:0,actorImageUrl:n}}if("max-word-limit-reached"===u)return{status:c,subject:"You've hit your plan's word limit for content uploads",subjectSuffix:void 0,title:void 0,subtitle:"Upgrade your plan to continue adding content",href:Q("/~/settings/plan",d),doctypes:[],doctypeOverflow:0};if("voice-training-completed"===u){let e=l?.slug??l?.clone_slug;return{status:c,subject:"Voice training",subjectSuffix:void 0,title:"completed",subtitle:"You've unlocked voice calling",href:e?`/${encodeURIComponent(e)}/call`:Q(Z,d),doctypes:[],doctypeOverflow:0}}if("voice-training-failed"===u)return{status:c,subject:"Voice training",subjectSuffix:void 0,title:"failed",subtitle:"Retry your sample or upload another",href:Q(Z,d),doctypes:[],doctypeOverflow:0};if("mind-viz-ready"===u)return{status:c,subject:"Mind visualization",subjectSuffix:void 0,title:"is ready",subtitle:"Click to view your knowledge, experiences, and ideas in 3D.",href:J(l,"/visualize"),doctypes:[],doctypeOverflow:0};if("upload-your-voice"===u)return{status:c,subject:"Give your Delphi your voice",subjectSuffix:void 0,title:void 0,subtitle:"Upload a 10s voice sample to unlock voice calling",href:Q(Z,d),doctypes:[],doctypeOverflow:0};if("ways-to-share"===u)return{status:c,subject:"Your Delphi is ready to share",subjectSuffix:void 0,title:void 0,subtitle:"Click to see ways to make your Delphi discoverable",href:Q("/~/settings/share",d),doctypes:[],doctypeOverflow:0};if("try-voice-call"===u)return{status:c,subject:"Try calling your Delphi",subjectSuffix:void 0,title:void 0,subtitle:"Click here to try it out",href:J(l,"/call"),doctypes:[],doctypeOverflow:0};if("delphi-finished-training"===u)return{status:c,subject:"Your latest content finished training",subjectSuffix:void 0,title:void 0,subtitle:"It's now part of your mind",href:J(l,"/chat"),doctypes:[],doctypeOverflow:0};if("new-visitor-conversation"===u){let t=e.activities?.[0]?.data??l,n=(t?.visitor_name??"Someone").split(" ")[0],i=t?.visitor_image_url,r=t?.conversation_id,a=Q(G,d),s=`${a}?mode=my-delphi`,o=r?`${a}?mode=my-delphi&threadId=${encodeURIComponent(r)}`:s;if(h>1){let e=h-1;return{status:c,subject:n,subjectSuffix:`and ${e} ${1===e?"other":"others"}`,title:"discovered your Delphi",subtitle:"Click to see what they s
14aid",href:s,doctypes:[],doctypeOverflow:0}}return{status:c,subject:n,subjectSuffix:void 0,title:"just discovered your Delphi",subtitle:"Click to see what they said",href:o,doctypes:[],doctypeOverflow:0,actorImageUrl:i??Y}}if("daily-question-results"===u){let e=l?.prompt?.trim(),t=l?.day,n=l?.questionId;return{status:c,subject:e||"The Daily Question",subjectSuffix:void 0,title:"results are in",subtitle:l?.isSmallRoom?"Short enough to read every answer":"See how the room answered",href:t?`/discover/daily-question/${encodeURIComponent(t)}`:n?`/discover/daily-question?questionId=${encodeURIComponent(n)}`:"/discover/daily-question",doctypes:[],doctypeOverflow:0}}if("daily-question-missed"===u){let e=l?.prompt?.trim(),t=l?.day,n=l?.questionId;return{status:c,subject:e||"The Daily Question",subjectSuffix:void 0,title:"is open",subtitle:"Answers close tonight",href:t?`/discover/daily-question/${encodeURIComponent(t)}`:n?`/discover/daily-question?questionId=${encodeURIComponent(n)}`:"/discover/daily-question",doctypes:[],doctypeOverflow:0}}if("alert-occurrence"===u){let t=e.activities?.[0]?.data??l,n=t?.alertName??"Your alert",i=t?.threadId,r=Q(G,d),a=`${r}?alerts=true`;if(h>1){let e=h-1;return{status:c,subject:n,subjectSuffix:`and ${e} ${1===e?"other":"others"}`,title:"were triggered",subtitle:"Review the matches in Conversations",href:a,doctypes:[],doctypeOverflow:0}}return{status:c,subject:n,subjectSuffix:void 0,title:"was triggered",subtitle:"A conversation matched this alert",href:i?`${r}?mode=my-delphi&threadId=${encodeURIComponent(i)}`:a,doctypes:[],doctypeOverflow:0}}if(h>1){let e=p[0]?.data,n=e?.content_title??"Content",i=h-1,r=`and ${i} ${1===i?"other":"others"}`,a=p.slice(0,5).map(e=>{let t=e.data;return ei(t?.content_type)}),s=Math.max(0,h-5),o=e?.failure_reason,l=e?.content_id,f="content-deleted"===u?et(u,void 0,d):et(u,l,d);switch(u){case"content-queued":return{status:c,subject:n,subjectSuffix:r,title:"started training",...eo(e,el(e,t)),href:f,doctypes:a,doctypeOverflow:s};case"content-completed":return{status:c,subject:n,subjectSuffix:r,title:"completed training",...eo(e,el(e,t)),href:f,doctypes:a,doctypeOverflow:s};case"content-failed":return{status:c,subject:n,subjectSuffix:r,title:"failed training",subtitle:`${o??"unknown error"} and ${i} more`,href:f,doctypes:a,doctypeOverflow:s};case"content-needs-attention":return{status:c,subject:n,subjectSuffix:r,title:"need attention",subtitle:`${o??"unknown error - please try again"} and ${i} more`,href:f,doctypes:a,doctypeOverflow:s};case"content-deleted":return{status:c,subject:n,subjectSuffix:r,title:"were deleted",subtitle:void 0,href:f,doctypes:a,doctypeOverflow:s};default:return{status:c,subject:n,subjectSuffix:r,title:void 0,subtitle:void 0,href:Q(X,d),doctypes:a,doctypeOverflow:s}}}let f=l?.content_type,m=l?.content_title??l?.document_name??"Notification",g=l?.failure_reason;switch(u){case"content-queued":{n="started training";let e=eo(l,el(l,t));i=e.subtitle,r=e.subtitleBrand,a=e.subtitleBrandIcon;break}case"content-completed":{n="completed training";let e=eo(l,el(l,t));i=e.subtitle,r=e.subtitleBrand,a=e.subtitleBrandIcon;break}case"content-failed":case"failed-document":n="failed training",i=g??"unknown error";break;case"content-needs-attention":n="needs attention",i=g??"unknown error - please try again";break;case"content-deleted":n="was deleted",i=void 0;break;default:n=void 0,i=g??l?.message_text??void 0}let v=l?.content_id;return{status:c,subject:m,subjectSuffix:void 0,title:n,subtitle:i,subtitleBrand:r,subtitleBrandIcon:a,href:"content-deleted"===u?et(u,void 0,d):et(u,v,d),doctypes:[ei(f)],doctypeOverflow:0}}function ec(e){let t=eu(e);return{type:"knock-notification",mode:"card",status:W[e.source.key]??null,subject:t.subject,subjectSuffix:t.subjectSuffix,title:t.title,subtitle:t.subtitle,subtitleItalic:t.subtitleItalic,subtitleBold:t.subtitleBold,subtitleBrand:t.subtitleBrand,subtitleBrandIcon:t.subtitleBrandIcon,doctypes:t.doctypes,doctypeOverflow:t.doctypeOverflow,actorImageUrl:t.actorImageUrl,href:t.href}}let ed=globalThis.Intl?.RelativeTimeFormat,eh=null!=ed?new ed("en",{numeric:"auto",style:"long"}):null;function ep(e,t){return`${e} ${t} ${1===e?"update":"updates"}`}function ef(e){let t,i,r,a,o,l,u,c=(0,n.c)(14),{enqueue:d}=e,{feedClient:h}=(0,x.useKnockFeed)(),{items:p,metadata:f,networkStatus:m}=(0,C.useNotificationStore)(h),g=f.unread_count,v=(0,s.useRef)(!1),y=(0,s.useRef)(!1);c[0]!==p?(t=new Set(p.map(eg)),c[0]=p,c[1]=t):t=c[1];let b=(0,s.useRef)(t);return c[2]!==h?(i=()=>{let e=()=>{h.fetch()};e();let t=()=>{"visible"===document.visibilityState&&e()};return document.addEventListener("visibilitychange",t),()=>{document.removeEventListener("visibilitychange",t)}},r=[h],c[2]=h,c[3]=i,c[4]=r):(i=c[3],r=c[4]),(0,s.useEffect)(i,r),c[5]!==d||c[6]!==m||c[7]!==g?(a=()=>
14{if(v.current||y.current||m===w.NetworkStatus.loading||g<=0)return;let e=setTimeout(()=>{v.current||y.current||(v.current=!0,console.log("[amplitude:todo] NOTIFICATION_PILL_SHOWN",{notification_unread_count:g}),d({type:"knock-notification",mode:"summary",status:null,summary:ep(g,"unread")}))},0);return()=>{clearTimeout(e)}},o=[d,m,g],c[5]=d,c[6]=m,c[7]=g,c[8]=a,c[9]=o):(a=c[8],o=c[9]),(0,s.useEffect)(a,o),c[10]!==d||c[11]!==h?(l=()=>{let e=e=>{let{items:t}=e,n=[];for(let e of t)!e.read_at&&(b.current.has(e.id)||(b.current.add(e.id),n.push(e)));if(0!==n.length){if(y.current=!0,console.log("[amplitude:todo] NOTIFICATION_PILL_SHOWN",{notification_new_count:n.length,notification_sources:n.map(em)}),n.length>1)return void d({type:"knock-notification",mode:"summary",status:null,summary:ep(n.length,"new")});d(ec(n[0]))}},t=e=>{let{items:t}=e;for(let e of t)b.current.add(e.id)};return h.on("items.received.realtime",e),h.on("items.received.page",t),()=>{h.off("items.received.realtime",e),h.off("items.received.page",t)}},u=[h,d],c[10]=d,c[11]=h,c[12]=l,c[13]=u):(l=c[12],u=c[13]),(0,s.useEffect)(l,u),null}function em(e){return e.source.key}function eg(e){return e.id}function ev(){let e,i=(0,n.c)(2),{enqueue:r}=(0,b.usePillEvents)();return i[0]!==r?(e=(0,t.jsx)(ef,{enqueue:r}),i[0]=r,i[1]=e):e=i[1],e}var ey=e.i(981831),eb=e.i(992763),ew=e.i(196196);function ex(e){let i,a,s,o,l=(0,n.c)(6),{unreadCount:u}=e;return l[0]===Symbol.for("react.memo_cache_sentinel")?(i=(0,t.jsx)(ew.ProgressiveBlur,{className:"absolute inset-0 -z-10"}),l[0]=i):i=l[0],l[1]===Symbol.for("react.memo_cache_sentinel")?(a=(0,t.jsx)(r.motion.h2,{initial:{opacity:0,x:-4},animate:{opacity:1,x:0},transition:{duration:.2,ease:"easeInOut",delay:.05},className:"line-clamp-1 text-left text-2xl font-medium text-fg-high",children:"Notifications"}),l[1]=a):a=l[1],l[2]!==u?(s=u>0&&(0,t.jsxs)("span",{className:"line-clamp-1 text-left text-xs text-fg-mid",children:[u," unread"]}),l[2]=u,l[3]=s):s=l[3],l[4]!==s?(o=(0,t.jsxs)("div",{className:"pointer-events-none absolute inset-x-0 top-0 z-10 flex flex-col px-6 pt-6 pb-4",children:[i,a,s]}),l[4]=s,l[5]=o):o=l[5],o}var eC=e.i(500478),ek=e.i(432245),eS=e.i(632137);let eT={queued:{Icon:k.KnowledgeSolidIcon,color:"text-blue-9",titleColor:"text-blue-11"},completed:{Icon:k.CircleCheckSolidIcon,color:"text-green-9",titleColor:"text-green-11"},failed:{Icon:k.CircleXmarkSolidIcon,color:"text-sand-9",titleColor:"text-sand-11"},attention:{Icon:k.TriangleExclamationSolidIcon,color:"text-violet-9",titleColor:"text-violet-11"},unanswered:{Icon:k.UnansweredSolidIcon,color:"text-amber-9",titleColor:"text-amber-11"},deleted:{Icon:k.TrashSolidIcon,color:"text-red-9",titleColor:"text-red-11"},"mind-viz":{Icon:k.SparklesSolidIcon,color:"text-violet-9",titleColor:"text-violet-11"},"activation-suggestion":{Icon:k.LightbulbIcon,color:"text-amber-9",titleColor:"text-amber-11"},alert:{Icon:k.BellIcon,color:"text-amber-9",titleColor:"text-amber-11"},other:{Icon:k.InboxIcon,color:"text-fg-mid",titleColor:"text-fg-high"}};function eA(e){var i;let r,a,o,l,u,c,d,h,p,f,m,g=(0,n.c)(16),{item:v,index:y,highlighted:b,ownUsername:w,onClose:C}=e,{feedClient:k}=(0,x.useKnockFeed)(),S=eu(v,w),[T,A]=(0,s.useState)(!1),E=!v.read_at,{status:M,subject:_,subjectSuffix:R,title:I,subtitle:j,href:V,doctypes:O,doctypeOverflow:P,actorImageUrl:N,subtitleItalic:L,subtitleBold:D,subtitleBrand:F,subtitleBrandIcon:B,expandableMessage:$}=S,W=function({href:e,ownUsername:t,currentOrigin:n}){let i,r=e?.trim();if(!r)return"/~";let a=function(e){if(!e)return null;try{return new URL(e).origin}catch{return null}}(n),s=r.startsWith("/")&&!r.startsWith("//");try{i=new URL(r,a??"https://delphi.local")}catch{return r}let o=null!==a&&i.origin===a;if(!s&&!o)return r;let l=function(e,t){if(!t)return e;let n=/^\/@\/([^/]+)(\/.*)?$/.exec(e);if(!n)return e;let i=n[1];if(!i||function(e){try{return decodeURIComponent(e)}catch{return null}}(i)!==t)return e;let r=n[2]??"";return r?`/~${r}`:"/~"}(i.pathname,t);return`${l}${i.search}${i.hash}`}({href:V,ownUsername:w,currentOrigin:globalThis.location?.origin??null}),{Icon:z,color:H,titleColor:K}
14=eT[M],q=`${30*y}ms`;g[0]!==q?(o={"--highlight-delay":q},g[0]=q,g[1]=o):o=g[1];let Y=o;g[2]===Symbol.for("react.memo_cache_sentinel")?(l=e=>{e.preventDefault(),e.stopPropagation(),A(eM)},g[2]=l):l=g[2];let G=l;g[3]===Symbol.for("react.memo_cache_sentinel")?(u=(0,eS.cn)("group/notification-item relative","transition-colors duration-[600ms] [transition-delay:var(--highlight-delay,0ms)]","data-[state=highlighted]:bg-sand-12/10"),g[3]=u):u=g[3],g[4]===Symbol.for("react.memo_cache_sentinel")?(c=(0,eS.cn)("flex w-full flex-row items-start gap-3 p-4 text-left","hover:bg-sand-9/10 focus-visible:bg-surface-secondary focus-visible:outline-none","transition-colors"),g[4]=c):c=g[4],g[5]!==v.inserted_at?(i=v.inserted_at,d=(a=Math.abs(r=Math.round((((0,U.parseDate)(i)??new Date).getTime()-Date.now())/1e3)))<45?"just now":eh?a<3600?eh.format(Math.round(r/60),"minute"):a<86400?eh.format(Math.round(r/3600),"hour"):a<2592e3?eh.format(Math.round(r/86400),"day"):a<31536e3?eh.format(Math.round(r/2592e3),"month"):eh.format(Math.round(r/31536e3),"year"):a<3600?`${Math.round(a/60)} minutes ago`:a<86400?`${Math.round(a/3600)} hours ago`:`${Math.round(a/86400)} days ago`,g[5]=v.inserted_at,g[6]=d):d=g[6],g[7]!==d?(h=(0,t.jsx)("span",{className:"text-[10px] font-normal text-fg-mid",children:d}),g[7]=d,g[8]=h):h=g[8];let X=b&&"bg-red-9";return g[9]!==X?(p=(0,eS.cn)("size-2 rounded-full bg-transparent","transition-colors duration-[600ms] [transition-delay:var(--highlight-delay,0ms)]",X),g[9]=X,g[10]=p):p=g[10],g[11]!==p?(f=(0,t.jsx)("span",{"aria-hidden":"true",className:p}),g[11]=p,g[12]=f):f=g[12],g[13]!==f||g[14]!==h?(m=(0,t.jsxs)("div",{className:"flex shrink-0 items-center gap-2",children:[h,f]}),g[13]=f,g[14]=h,g[15]=m):m=g[15],(0,t.jsx)("li",{"data-state":b?"highlighted":void 0,style:Y,className:u,children:(0,t.jsxs)(eC.default,{href:W,onClick:()=>{console.log("[amplitude:todo] NOTIFICATION_ITEM_CLICKED",{notification_id:v.id,notification_source:v.source.key,notification_status:M,notification_has_href:!!V,notification_is_unread:E}),k.markAsInteracted(v),E&&k.markAsRead(v),C?.()},className:c,children:[N?(0,t.jsxs)(ek.Avatar,{className:"my-1 shrink-0",children:[(0,t.jsx)(ek.AvatarImage,{src:N,alt:""}),(0,t.jsx)(ek.AvatarFallback,{className:"text-xs font-medium uppercase",children:_.slice(0,1)})]}):(0,t.jsx)(z,{className:(0,eS.cn)("mx-1.5 my-2.5 size-4.5 shrink-0",H)}),(0,t.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col items-start gap-1.5 py-1",children:[O.length>0?(0,t.jsxs)("div",{className:"-ml-1.5 flex min-w-0 items-center",children:[O.map(eE),P>0?(0,t.jsxs)("span",{className:"ml-2 flex size-8 items-center justify-center text-xs font-medium text-fg-mid",children:["+",P]}):null]}):null,(0,t.jsxs)("div",{className:"flex w-full min-w-0 flex-col gap-0.5 pr-3",children:[(0,t.jsxs)("p",{className:"line-clamp-2 text-sm",children:[(0,t.jsxs)("span",{className:"font-semibold text-fg-high",children:[_,R?(0,t.jsxs)(t.Fragment,{children:[" ",R]}):null]}),I?(0,t.jsxs)("span",{className:(0,eS.cn)("font-semibold",K),children:[" ",I]}):null]}),$?(0,t.jsx)("div",{className:"text-xs text-fg-mid",children:T?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("p",{className:"whitespace-pre-wrap italic",children:["Message: “",$,"”"]}),(0,t.jsx)("button",{type:"button",onClick:G,className:"mt-0.5 font-medium text-fg-mid",children:"Show less"})]}):(0,t.jsxs)("p",{className:"italic",children:["Message: “",$.slice(0,80),$.length>80?"...":"","”"," ",$.length>80?(0,t.jsx)("button",{type:"button",onClick:G,className:"font-medium text-fg-mid not-italic",children:"Read more"}):null]})}):j?(0,t.jsxs)("p",{className:(0,eS.cn)("flex min-w-0 items-center gap-1.5 text-xs text-fg-mid",L&&"italic"),children:[(0,t.jsx)("span",{className:"min-w-0 truncate",children:j}),B?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(B,{className:"size-3.5 shrink-0"}),F?(0,t.jsx)("span",{className:"sr-only",children:F}):null]}):F?(0,t.jsx)("span",{className:"truncate",children:F}):null,D?(0,t.jsx)("span",{className:"truncate font-semibold text-fg-mid",children:D}):null]}):null]})]}),m]})})}function eE(e,n){return(0,t.jsx)("span",{className:"-mr-3.5 shrink-0",children:(0,t.jsx)(e,{className:"size-8"})},n)}function eM(e){return!e}function e_(){let e,i,r,a=(0,n.c)(3);return a[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)("div",{className:"size-8 shrink-0 animate-pulse rounded-full bg-surface-secondary"}),a[0]=e):e=a[0],a[1]===Symbol.for("react.memo_cache_sentinel")?(i=(0,t.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1.5 py-1",children:[(0,t.jsx)("div",{className:"h-3.5 w-full animate-pulse rounded-sm bg-surface-secondary"}),(0,t.jsx)("div",{className:"h-3 w-3/5 animate-pulse rounded-sm bg-surface-secondary"})]}),a[1]=i):i=a[1],a[2]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsxs)("div",{"aria-hidden":"true",className:"flex w-full flex-row items-start gap-3 p-4",children:[e,i,(0,t.jsx)("div",{className:"shrink-0",children:(0,t.jsx)("div",{className:"h-2.5 w-10 animate-pulse rounded-sm bg-surface-secondary"})})]}),a[2]=r):r=a[2],r}function eR(){let e,i=(0,n.c)(1);return i[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsxs)("div",{className:"flex h-full flex-col items-center justify-center gap-2 px-6 py-12 text-center",children:[(0,t.jsx)(k.BellIcon,{className:"size-8 text-fg-mid"}),(0,t.jsx)("p",{className:"text-sm font-medium text-fg-high",children:"No notifications yet"}),(0,t.jsx)("p",{className:"text-xs text-fg-mid",children:"Activity from your mind will show up here"})]}),i[0]=e):e=i[0],e}function eI(e){let i,r,a,o,l,u,c,d,h,p,f,m,g,v,y,b,k=(0,n.c)(41),{ownUsername:S,open:T,onClose:A}=e,{feedClient:E}=(0,x.useKnockFeed)(),{items:M,metadata:_,networkStatus:R,pageInfo:I}
14=(0,C.useNotificationStore)(E),[j,V]=(0,s.useState)(eP),O=(0,s.useRef)(null),P=(0,s.useRef)(!1),N=(0,s.useRef)(M);k[0]!==M?(i=()=>{N.current=M},r=[M],k[0]=M,k[1]=i,k[2]=r):(i=k[1],r=k[2]),(0,s.useEffect)(i,r),k[3]!==E?(a=()=>{E.fetch()},o=[E],k[3]=E,k[4]=a,k[5]=o):(a=k[4],o=k[5]),(0,s.useEffect)(a,o),!T&&j.size>0&&V(new Set),k[6]!==E||k[7]!==T?(l=()=>{if(!T)return;let e=N.current;if(0===e.length)return;let t=new Set(e.filter(eO).map(eV));if(E.markAllAsSeen(),0!==t.size)return V(t),O.current=setTimeout(()=>{V(new Set),E.markAllAsRead(),O.current=null},3e3),()=>{null!==O.current&&(clearTimeout(O.current),O.current=null,E.markAllAsRead())}},u=[T,E],k[6]=E,k[7]=T,k[8]=l,k[9]=u):(l=k[8],u=k[9]),(0,s.useEffect)(l,u),k[10]!==E||k[11]!==T?(c=()=>{if(!T)return;let e=()=>{E.markAllAsSeen(),E.markAllAsRead()};return E.on("items.received.realtime",e),()=>{E.off("items.received.realtime",e)}},d=[T,E],k[10]=E,k[11]=T,k[12]=c,k[13]=d):(c=k[12],d=k[13]),(0,s.useEffect)(c,d),k[14]!==M.length||k[15]!==_.unread_count||k[16]!==R||k[17]!==T?(p=()=>{if(!T){P.current=!1;return}R===w.NetworkStatus.loading||P.current||(P.current=!0,console.log("[amplitude:todo] NOTIFICATION_FEED_VIEWED",{notification_count:M.length,notification_unread_count:_.unread_count}))},h=[T,R,M.length,_.unread_count],k[14]=M.length,k[15]=_.unread_count,k[16]=R,k[17]=T,k[18]=h,k[19]=p):(h=k[18],p=k[19]),(0,s.useEffect)(p,h);let L=R===w.NetworkStatus.loading&&0===M.length,D=R===w.NetworkStatus.fetchMore,F=!!I?.after;k[20]!==E?(f=()=>{E.fetchNextPage()},k[20]=E,k[21]=f):f=k[21];let B=f;return k[22]!==_.unread_count?(m=(0,t.jsx)(ex,{unreadCount:_.unread_count}),k[22]=_.unread_count,k[23]=m):m=k[23],k[24]!==j||k[25]!==L||k[26]!==M||k[27]!==A||k[28]!==S?(g=L?(0,t.jsx)("ul",{className:"flex flex-col",children:Array.from({length:3}).map(ej)}):0===M.length?(0,t.jsx)(eR,{}):(0,t.jsx)("ul",{className:"flex flex-col divide-y divide-subtle",children:M.map((e,n)=>(0,t.jsx)(eA,{item:e,index:n,highlighted:j.has(e.id),ownUsername:S,onClose:A},e.id))}),k[24]=j,k[25]=L,k[26]=M,k[27]=A,k[28]=S,k[29]=g):g=k[29],k[30]!==B||k[31]!==F||k[32]!==D||k[33]!==M.length?(v=F&&M.length>0?(0,t.jsx)("div",{className:"flex justify-center px-6 py-4",children:(0,t.jsx)(ey.Button,{variant:"outline",size:"sm",onClick:B,disabled:D,children:D?"Loading...":"Load more"})}):null,k[30]=B,k[31]=F,k[32]=D,k[33]=M.length,k[34]=v):v=k[34],k[35]!==g||k[36]!==v?(y=(0,t.jsx)(eb.ScrollArea,{className:"min-h-0 flex-1 [&>[data-slot=scroll-area-viewport]>div]:h-full",children:(0,t.jsxs)("div",{className:"h-full pt-18",children:[g,v]})}),k[35]=g,k[36]=v,k[37]=y):y=k[37],k[38]!==m||k[39]!==y?(b=(0,t.jsxs)("div",{className:"relative flex h-full flex-col",children:[m,y]}),k[38]=m,k[39]=y,k[40]=b):b=k[40],b}function ej(e,n){return(0,t.jsx)("li",{children:(0,t.jsx)(e_,{})},n)}function eV(e){return e.id}function eO(e){return!e.read_at}function eP(){return new Set}function eN(e,t,n){return{id:`debug-${e}-${n?.totalActivities??0}`,source:{key:e},data:t,activities:n?.activities??[],total_activities:n?.totalActivities??0,inserted_at:"2026-05-31T00:00:00.000Z",read_at:null}}let eL="https://i.pravatar.cc/96?img=12",eD=[{label:"Greeting",event:{type:"greeting",name:"Debug User"}},{label:"MindScore +5",event:{type:"mindscore-increase",newScore:14600}},{label:"Summary (3 new)",event:{type:"knock-notification",mode:"summary",status:null,summary:"3 new updates"}}],eF=[{label:"Content: queued (YouTube)",item:eN("content-queued",{content_title:"Welcome video",content_type:"YOUTUBE"})},{label:"Content: completed (Notion)",item:eN("content-completed",{content_title:"Q4 strategy",content_type:"NOTION"})},{label:"Content: completed (manual)",item:eN("content-completed",{content_title:"Meeting notes",content_type:"PDF"})},{label:"Content: failed",item:eN("content-failed",{content_title:"Old presentation",content_type:"PDF",failure_reason:"Could not parse file"})},{label:"Content: needs attention",item:eN("content-needs-attention",{content_title:"Investor deck",content_type:"PDF",failure_reason:"Document is password-protected"})},{label:"Content: deleted",item:eN("content-deleted",{content_title:"Outdated FAQ",content_type:"PDF"})},{label:"Content: failed-document",item:eN("failed-document",{content_title:"Broken file",content_type:"DOC",failure_reason:"unknown error"})},{label:"Content: completed ×8 (+3)",item:eN("content-completed",null,{totalActivities:8,activities:[{data:{content_title:"Q4 strategy",content_type:"PDF"}},{data:{content_title:"Voice memo",content_type:"AUDIO"}},{data:{content_title:"Cover photo",content_type:"IMAGE"}},{data:{content_title:"Spec doc",content_type:"PDF"}},{data:{content_title:"Launch video",content_type:"VIDEO"}}]})},{label:"Content: queued ×3",item:eN("content-queued",null,{totalActivities:3,activities:[{data:{content_title:"Welcome video",content_type:"YOUTUBE"}},{data:{content_title:"Episode 2",content_type:"PODCAST"}},{data:{content_title:"Blog post",content_type:"WEBSITE"}}]})},{label:"Content: failed ×2",item:eN("content-failed",null,{totalActivities:2,activities:[{data:{content_title:"Doc A",content_type:"PDF",failure_reason:"Could not parse"}},{data:{content_title:"Doc B",content_type:"PDF"}}]})},{label:"Content: attention ×2",item:eN("content-needs-attention",null,{totalActivities:2,activities:[{data:{content_title:"Deck A",content_type:"PDF",failure_reason:"Password-protected"}},{data:{content_title:"Deck B",content_type:"PDF"}}]})},{label:"Content: deleted ×2",item:eN("content-deleted",null,{totalActivities:2,activities:[{data:{content_title:"FAQ",content_type:"PDF"}},{data:{content_title:"Old page",content_type:"WEBSITE"}}]})},{label:"Unanswered question",item:eN("unanswered-question",{message_text:"Do you offer enterprise pricing for teams over 50 seats?",visitor_name:"Alex Rivera",visitor_image_url:eL},{totalActivities:1,activities:[{data:{message_text:"Do you offer enterprise pricing for teams over 50 seats?",visitor_name:"Alex Rivera",visitor_image_url:eL}}]})},{label:"Unanswered ×3",item:eN("unanswered-question",null,{totalActivities:3,activities:[{data:{message_text:"How do refunds work?",visitor_name:"Sam"}}]})},{label:"New visitor",item:eN("new-visitor-conversation",{visitor_name:"Taylor Kim",visitor_image_url:eL},{totalActivities:1,activities:[{data:{visitor_name:"Taylor Kim",visitor_image_url:eL}}]})},{label:"New visitors ×4",item:eN("new-visitor-conversation",null,{totalActivities:4,activities:[{data:{visitor_name:"Taylor"}}]})},{label:"Account connected (Drive)",item:eN("account-connection-completed",{source_name:"Google Drive",content_type:"PDF",successful_count:12,failed_count:0,attention_count:0})}
14,{label:"Account connected w/ issues",item:eN("account-connection-completed",{source_name:"YouTube",content_type:"YOUTUBE",successful_count:8,failed_count:2,attention_count:0})},{label:"Account failed",item:eN("account-connection-failed",{source_name:"Notion",content_type:"NOTION",successful_count:0,failed_count:3,attention_count:0})},{label:"Voice training done",item:eN("voice-training-completed",null)},{label:"Voice training failed",item:eN("voice-training-failed",null)},{label:"Mind viz ready",item:eN("mind-viz-ready",null)},{label:"Word limit reached",item:eN("max-word-limit-reached",null)},{label:"Nudge: upload voice",item:eN("upload-your-voice",null)},{label:"Nudge: ways to share",item:eN("ways-to-share",null)},{label:"Nudge: try voice call",item:eN("try-voice-call",null)},{label:"Delphi finished training",item:eN("delphi-finished-training",null)}],eB="rounded-lg bg-surface-secondary px-2 py-1.5 text-left text-xs text-fg-high transition-colors hover:bg-sand-9/10 active:bg-surface-secondary",e$="text-[10px] font-medium tracking-wide text-fg-low uppercase";function eU(){let e,i,a,s,o,l,u,c,d,h,p,f,m,g,v,y,w,x=(0,n.c)(60),{profileName:C,enqueue:S,disableAutoDismiss:T,setDisableAutoDismiss:A}=(0,b.usePillEvents)();if(x[0]!==T||x[1]!==S||x[2]!==C||x[3]!==A){let n,p,f,m,g,v,y,b,w;x[14]!==C?(n=e=>"greeting"===e.event.type?{...e,event:{type:"greeting",name:C}}:e,x[14]=C,x[15]=n):n=x[15];let E=eD.map(n);e=r.motion.div,u=!0,c=!1,d="fixed top-20 right-4 z-[60] flex max-h-[80vh] w-[230px] flex-col gap-2 rounded-2xl border border-subtle bg-surface-primary p-3 shadow-lg backdrop-blur-sm",x[16]===Symbol.for("react.memo_cache_sentinel")?(p=(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(k.GripVerticalIcon,{"aria-label":"Drag handle",className:"size-4 cursor-grab text-fg-mid active:cursor-grabbing"}),(0,t.jsx)("span",{className:"text-xs font-medium text-fg-mid",children:"Pill Debug"})]}),x[16]=p):p=x[16];let M=T?"bg-sand-12/15 text-sand-12":"bg-surface-secondary text-fg-mid hover:bg-sand-9/10";x[17]!==M?(f=(0,eS.cn)("flex w-full items-center gap-2 rounded-lg px-2 py-1.5 text-left text-xs transition-colors",M),x[17]=M,x[18]=f):f=x[18],x[19]!==T||x[20]!==A?(m=()=>A(!T),x[19]=T,x[20]=A,x[21]=m):m=x[21];let _=T?"border-sand-12 bg-sand-12":"border-subtle";x[22]!==_?(g=(0,eS.cn)("flex size-3.5 items-center justify-center rounded border",_),x[22]=_,x[23]=g):g=x[23],x[24]!==T?(v=T?(0,t.jsx)(k.CheckIcon,{className:"size-2.5 text-fg-inverted"}):null,x[24]=T,x[25]=v):v=x[25],x[26]!==g||x[27]!==v?(y=(0,t.jsx)("span",{className:g,children:v}),x[26]=g,x[27]=v,x[28]=y):y=x[28],x[29]===Symbol.for("react.memo_cache_sentinel")?(b=(0,t.jsx)("span",{children:"Disable auto-hide"}),x[29]=b):b=x[29],x[30]!==f||x[31]!==m||x[32]!==y?(h=(0,t.jsxs)("div",{className:"flex flex-col gap-2 border-b border-subtle pb-2",children:[p,(0,t.jsxs)("button",{type:"button",className:f,onClick:m,children:[y,b]})]}),x[30]=f,x[31]=m,x[32]=y,x[33]=h):h=x[33],l="flex flex-col gap-3 overflow-y-auto",s="flex flex-col gap-1.5",x[34]===Symbol.for("react.memo_cache_sentinel")?(o=(0,t.jsx)("span",{className:e$,children:"Pill events"}),x[34]=o):o=x[34],i="flex flex-wrap gap-1.5",x[35]!==S?(w=e=>{let{label:n,event:i}=e;return(0,t.jsx)("button",{type:"button",className:eB,onClick:()=>S(i),children:n},n)},x[35]=S,x[36]=w):w=x[36],a=E.map(w),x[0]=T,x[1]=S,x[2]=C,x[3]=A,x[4]=e,x[5]=i,x[6]=a,x[7]=s,x[8]=o,x[9]=l,x[10]=u,x[11]=c,x[12]=d,x[13]=h}else e=x[4],i=x[5],a=x[6],s=x[7],o=x[8],l=x[9],u=x[10],c=x[11],d=x[12],h=x[13];return x[37]!==i||x[38]!==a?(p=(0,t.jsx)("div",{className:i,children:a}),x[37]=i,x[38]=a,x[39]=p):p=x[39],x[40]!==s||x[41]!==o||x[42]!==p?(f=(0,t.jsxs)("div",{className:s,children:[o,p]}),x[40]=s,x[41]=o,x[42]=p,x[43]=f):f=x[43],x[44]===Symbol.for("react.memo_cache_sentinel")?(m=(0,t.jsx)("span",{className:e$,children:"Notifications"}),x[44]=m):m=x[44],x[45]!==S?(g=eF.map(e=>{let{label:n,item:i}=e;return(0,t.jsx)("button",{type:"button",className:eB,onClick:()=>S(ec(i)),children:n},n)}),x[45]=S,x[46]=g):g=x[46],x[47]!==g?(v=(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[m,(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:g})]}),x[47]=g,x[48]=v):v=x[48],x[49]!==f||x[50]!==v||x[51]!==l?(y=(0,t.jsxs)("div",{className:l,children:[f,v]}),x[49]=f,x[50]=v,x[51]=l,x[52]=y):y=x[52],x[53]!==e||x[54]!==y||x[55]!==u||x[56]!==c||x[57]!==d||x[58]!==h?(w=(0,t.jsxs)(e,{drag:u,dragMomentum:c,className:d,children:[h,y]}),x[53]=e,x[54]=y,x[55]=u,x[56]=c,x[57]=d,x[58]=h,x[59]=w):w=x[59],w}function eW(e){let i,r,a=(0,n.c)(7),{feedId:s,tenantId:o,children:l}=e;return a[0]!==o?(i={mode:"rich",tenant:o,has_tenant:!0},a[0]=o,a[1]=i):i=a[1],a[2]!==l||a[3]!==s||a[4]!==i||a[5]!==o?(r=(0,t.jsx)(x.KnockFeedProvider,{feedId:s,defaultFeedOptions:i,children:l},o),a[2]=l,a[3]=s,a[4]=i,a[5]=o,a[6]=r):r=a[6],r}function ez(){let{feedClient:e}=(0,x.useKnockFeed)(),{metadata:t}=(0,C.useNotificationStore)(e);return t.unread_count??0}function eH(e){let i,r,a=(0,n.c)(6),{className:s}=e,o=ez();if(o<=0)return null;let l=`${o} unread notification${1===o?"":"s"}`;a[0]!==s?(i=(0,eS.cn)("pointer-events-none flex h-4 min-w-4 items-center justify-center rounded-full bg-red-9 px-1 text-[10px] leading-none font-semibold text-white tabular-nums ring-2 ring-surface-primary",s),a[0]=s,a[1]=i):i=a[1];let u=o>99?"99+":o;return a[2]!==l||a[3]!==i||a[4]!==u?(r=(0,t.jsx)("span",{"aria-label":l,className:i,children:u}),a[2]=l,a[3]=i,a[4]=u,a[5]=r):r=a[5],r}e.i(829875);var eK=e.i(117741);e.i(800079);var eq=e.i(61053),eY=e.i(497686);e.i(93345);var eG=e.i(76281),eX=e.i(527302),eZ=e.i(215571),eJ=e.i(269714),eQ=e.i(119302),e0=e.i(449907),e1=e.i(329397),e2=e.i(371441);let e3=e=>e.data;function e5(){let e,i=(0,n.c)(1);return i[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)(f.MyMind.Name,{}),i[0]=e):e=i[0],e}function e4(e){let t,i,r=(0,n.c)(4),{onChange:a}=e,o=ez();return r[0]!==o||r[1]!==a?(t=()=>{a(o)},i=[o,a],r[0]=o,r[1]=a,r[2]=t,r[3]=i):(t=r[2],i=r[3]),(0,s.useEffect)(t,i),null}function e9(){let e,t,i,r,a=(0,n.c)(7),o=ez(),l=(0,y.useNotificationsDrawerStore)(e6);return a[0]!==o||a[1]!==l?(e=()=>{l(o)},t=[o,l],a[0]=o,a[1]=l,a[2]=e,a[3]=t):(e=a[2],t=a[3]),(0,s.useEffect)(e,t),a[4]!==l?(i=()=>()=>l(0),r=[l],a[4]=l,a[5]=i,a[6]=r):(i=a[5],r=a[6]),(0,s.useEffect)(i,r),null}function e6(e){return e.setUnreadCount}function e7(e){return e.hidden}function e8(e){let i,r,a,s,o,l,f=(0,n.c)(15),{description:m,scopeMode:v}=e,y=(0,eY.useNavScope)(),b=(0,p.useAddToMindStore)(tn),w=(0,p.useAddToMindStore)(tt),x=(0,p.useAddToMindStore)(te);f[0]!==w?(i=e=>{e||p.useAddToMindStore.getState().shouldBlockDialogClose()||w()},f[0]=w,f[1]=i):i=f[1];let C=i;f[2]!==y||f[3]!==v?(r=y?y.ownerId?(0,t.jsx)(eK.ScopeProvider,{value:y,children:(0,t.jsx)(u.AddToMindDialogContent,{})}):(0,t.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,t.jsx)(eQ.Spinner,{})}):"required"===v?(0,t.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,t.jsx)(eQ.Spinner,{})}):(0,t.jsx)(u.AddToMindDialogContent,{}),f[2]=y,f[3]=v,f[4]=r):r=f[4];let k=r;f[5]===Symbol.for("react.memo_cache_sentinel")?(a=(0,t.jsx)(h.ModalRestoreClient,{}),f[5]=a):a=f[5];let S=!x;return f[6]===Symbol.for("react.memo_cache_sentinel")?(s=(0,t.jsx)(eZ.DialogTitle,{className:"sr-only",children:"Add Knowledge"}),f[6]=s):s=f[6],f[7]!==m?(o=(0,t.jsx)(eZ.DialogDescription,{className:"sr-only",children:m}),f[7]=m,f[8]=o):o=f[8],f[9]!==b||f[10]!==k||f[11]!==C||f[12]!==S||f[13]!==o?(l=(0,t.jsxs)(t.Fragment,{children:[a,(0,t.jsx)(c.AddToMindSubmitProvider,{children:(0,t.jsx)(d.FileDropzoneProvider,{children:(0,t.jsxs)(g.PillDialog,{open:b,modal:S,onOpenChange:C,children:[s,o,k]})})})]}),f[9]=b,f[10]=k,f[11]=C,f[12]=S,f[13]=o,f[14]=l):l=f[14],l}function te(e){return e.isNonModalPickerOpen}function tt(e){return e.close}function tn(e){return e.isOpen}function ti(e){let i,r=(0,n.c)(27),{userId:s,profileName:o,profileImageUrl:l,initialProfileImageUrl:u,ownUsername:c,notificationsEnabled:d,hidden:h}=e;if((0,a.usePathname)(),h){let e,n,i,a,h,p;return r[0]!==d?(e=d?(0,t.jsx)(ev,{}):null,r[0]=d,r[1]=e):e=r[1],r[2]!==d?(n=d?(0,t.jsx)(e9,{}):null,r[2]=d,r[3]=n):n=r[3],!1!==r[4]?(i=null,r[4]=!1,r[5]=i):i=r[5],r[6]===Symbol.for("react.memo_cache_sentinel")?(a=(0,t.jsx)(e8,{description:"Add content to your mind — upload files, paste URLs, or connect accounts.",scopeMode:"optional"}),r[6]=a):a=r[6],r[7]!==u||r[8]!==d||r[9]!==c||r[10]!==l||r[11]!==o||r[12]!==s?(h=d?(0,t.jsx)(tr,{userId:s,profileName:o,profileImageUrl:l??u??null,ownUsername:c}
14):null,r[7]=u,r[8]=d,r[9]=c,r[10]=l,r[11]=o,r[12]=s,r[13]=h):h=r[13],r[14]!==e||r[15]!==n||r[16]!==i||r[17]!==h?(p=(0,t.jsxs)(t.Fragment,{children:[e,n,i,a,h]}),r[14]=e,r[15]=n,r[16]=i,r[17]=h,r[18]=p):p=r[18],p}return r[19]!==u||r[20]!==d||r[21]!==c||r[22]!==l||r[23]!==o||!1!==r[24]||r[25]!==s?(i=(0,t.jsx)(tu,{userId:s,profileName:o,profileImageUrl:l,initialProfileImageUrl:u,ownUsername:c,notificationsEnabled:d,showDebugMenu:!1}),r[19]=u,r[20]=d,r[21]=c,r[22]=l,r[23]=o,r[24]=!1,r[25]=s,r[26]=i):i=r[26],i}function tr(e){let r,a,o,l,u,c,d,h,p,m,b,w=(0,n.c)(26),{userId:x,profileName:C,profileImageUrl:k,ownUsername:S}=e,T=(0,y.useNotificationsDrawerStore)(tl),A=(0,y.useNotificationsDrawerStore)(to),E=(0,y.useNotificationsDrawerStore)(ts),M=(0,y.useNotificationsDrawerStore)(ta),_=M?.userId??x,R=M?.name??C,I=M?M.image:k;return w[0]!==E?(r=()=>(E(!0),()=>E(!1)),a=[E],w[0]=E,w[1]=r,w[2]=a):(r=w[1],a=w[2]),(0,s.useEffect)(r,a),w[3]===Symbol.for("react.memo_cache_sentinel")?(o=(0,t.jsx)(eH,{className:"absolute -top-1 -right-1 z-10"}),l=(0,t.jsx)(f.MyMind.Name,{}),w[3]=o,w[4]=l):(o=w[3],l=w[4]),w[5]!==T?(u=(0,t.jsx)(v.PillDialogTarget,{open:T,transition:eG.PROFILE_CHAT_DIALOG_TRANSITION,decoration:o,children:l}),w[5]=T,w[6]=u):u=w[6],w[7]!==I||w[8]!==R||w[9]!==_||w[10]!==u?(c=(0,t.jsx)(f.MyMind.Root,{userId:_,profileName:R,profileImageUrl:I,children:u}),w[7]=I,w[8]=R,w[9]=_,w[10]=u,w[11]=c):c=w[11],w[12]===Symbol.for("react.memo_cache_sentinel")?(d=(0,t.jsx)(eZ.DialogTitle,{className:"sr-only",children:"Notifications"}),w[12]=d):d=w[12],w[13]!==A?(h=()=>A(!1),w[13]=A,w[14]=h):h=w[14],w[15]!==T||w[16]!==S||w[17]!==h?(p=(0,t.jsx)(eI,{ownUsername:S,open:T,onClose:h}),w[15]=T,w[16]=S,w[17]=h,w[18]=p):p=w[18],w[19]!==T||w[20]!==A||w[21]!==p?(m=(0,t.jsxs)(g.PillDialog,{open:T,modal:!0,onOpenChange:A,children:[d,p]}),w[19]=T,w[20]=A,w[21]=p,w[22]=m):m=w[22],w[23]!==m||w[24]!==c?(b=(0,t.jsxs)(i.LayoutGroup,{id:"my-mind-pill-morph",children:[c,m]}),w[23]=m,w[24]=c,w[25]=b):b=w[25],b}function ta(e){return e.ownerIdentity}function ts(e){return e.setAvailable}function to(e){return e.setOpen}function tl(e){return e.open}function tu(e){let a,w,x,C,k,S,T,A,E,M,_,R,I,j,V,O,P,N,L,D,F,B,$,U,W=(0,n.c)(71),{userId:z,profileName:H,profileImageUrl:K,initialProfileImageUrl:q,ownUsername:Y,notificationsEnabled:G,showDebugMenu:X}=e,{state:Z}=(0,eJ.useSidebar)(),J=(0,e2.useForceCollapsedSidebar)();W[0]===Symbol.for("react.memo_cache_sentinel")?(a=(0,l.getUsersMeOptions)(),W[0]=a):a=W[0];let Q=void 0===K;W[1]!==Q?(w={...a,select:e3,enabled:Q},W[1]=Q,W[2]=w):w=W[2];let{data:ee}=(0,o.useQuery)(w),{currentEvent:et}=(0,b.usePillEvents)(),en=(0,p.useAddToMindStore)(tm),ei=(0,p.useAddToMindStore)(tf),er=(0,p.useAddToMindStore)(tp),ea=(0,y.useNotificationsDrawerStore)(th),es=(0,y.useNotificationsDrawerStore)(td),eo=(0,y.useNotificationsDrawerStore)(tc);W[3]!==G||W[4]!==eo?(x=()=>{if(G)return eo(!0),()=>eo(!1)},C=[G,eo],W[3]=G,W[4]=eo,W[5]=x,W[6]=C):(x=W[5],C=W[6]),(0,s.useEffect)(x,C);let el=(0,s.useRef)(0);W[7]===Symbol.for("react.memo_cache_sentinel")?(k=e=>{el.current=e},W[7]=k):k=W[7];let eu=k,ec=en||ea;W[8]!==G||W[9]!==es?(S=()=>{G||es(!1)},T=[G,es],W[8]=G,W[9]=es,W[10]=S,W[11]=T):(S=W[10],T=W[11]),(0,s.useEffect)(S,T),W[12]!==en||W[13]!==G||W[14]!==es?(A=()=>{G&&!en&&(console.log("[amplitude:todo] NOTIFICATION_PILL_CLICKED",{notification_unread_count:el.current}),es(!0))},W[12]=en,W[13]=G,W[14]=es,W[15]=A):A=W[15];let ed=A;W[16]!==en||W[17]!==ei||W[18]!==es?(E=e=>{e||p.useAddToMindStore.getState().shouldBlockDialogClose()||(en?ei():es(!1))},W[16]=en,W[17]=ei,W[18]=es,W[19]=E):E=W[19];let eh=E,[ep,ef]=(0,s.useState)("notifications"),em=ec?en?"add":"notifications":ep;ec&&em!==ep&&ef(em);let eg="add"===em,ey=J?void 0:"collapsed"===Z?"lg:left-[calc(50%_+_2rem)]":"lg:left-[calc(50%_+_7rem)]",eb=void 0!==K?K:ee?.user.image??q??null,ew=void 0===K?ee?.user.name??H:H;W[20]!==G?(M=G?(0,t.jsx)(ev,{}):null,W[20]=G,W[21]=M):M=W[21],W[22]!==G?(_=G?(0,t.jsx)(e4,{onChange:eu}):null,W[22]=G,W[23]=_):_=W[23],W[24]!==G?(R=G?(0,t.jsx)(e9,{}):null,W[24]=G,W[25]=R):R=W[25],W[26]!==X?(I=X?(0,t.jsx)(eU,{}):null,W[26]=X,W[27]=I):I=W[27],W[28]===Symbol.for("react.memo_cache_sentinel")?(j=(0,t.jsx)(h.ModalRestoreClient,{}),W[28]=j):j=W[28],W[29]!==ey?(V=(0,eS.cn)("fixed top-1.5 left-1/2 z-50 -translate-x-1/2","lg:transition-[left] lg:duration-200 lg:ease-out",ey),W[29]=ey,W[30]=V):V=W[30],W[31]!==ed||W[32]!==ec||W[33]!==G?(O=!ec&&(0,t.jsxs)("div",{className:"group/my-mind flex flex-col items-center",children:[(0,t.jsx)(r.motion.div,{layoutId:`${f.DEFAULT_PILL_DIALOG_TRANSITION.id}-${f.DEFAULT_PILL_DIALOG_TRANSITION.slots.image}`,transition:f.DEFAULT_PILL_DIALOG_TRANSITION.spring,className:"relative z-10",style:{width:m.MY_MIND_IMAGE_SIZE,height:m.MY_MIND_IMAGE_SIZE},children:(0,t.jsx)(f.MyMind.Image,{onClick:G?ed:void 0})}),(0,t.jsxs)(r.motion.div,{layoutId:`${f.DEFAULT_PILL_DIALOG_TRANSITION.id}-${f.DEFAULT_PILL_DIALOG_TRANSITION.slots.pill}`,transition:f.DEFAULT_PILL_DIALOG_TRANSITION.spring,className:"relative z-0 -mt-0.5",children:[(0,t.jsx)(f.MyMind.Pill,{onClick:G?ed:void 0,className:G?void 0:"cursor-default",children:(0,t.jsx)("div",{className:"flex items-center gap-1.5 px-3 py-1",children:(0,t.jsx)(r.motion.div,{layoutId:`${f.DEFAULT_PILL_DIALOG_TRANSITION.id}-${f.DEFAULT_PILL_DIALOG_TRANSITION.slots.name}`,transition:f.DEFAULT_PILL_DIALOG_TRANSITION.spring,children:(0,t.jsx)(e5,{})})})}),G?(0,t.jsx)(eH,{className:"absolute -top-1 -right-1 z-10"}):null]})]}),W[31]=ed,W[32]=ec,W[33]=G,W[34]=O):O=W[34],W[35]!==G?(P=G?(0,t.jsx)(eH,{className:"absolute -top-1 -right-1 z-10"}):null,W[35]=G,W[36]=P):P=W[36],W[37]===Symbol.for("react.memo_cache_sentinel")?(N=(0,t.jsx)(e5,{}),W[37]=N):N=W[37],W[38]!==ec||W[39]!==ey||W[40]!==P?(L=(0,t.jsx)(v.PillDialogTarget,{open:ec,transition:f.DEFAULT_PILL_DIALOG_TRANSITION,className:ey,decoration:P,children:N}),W[38]=ec,W[39]=ey,W[40]=P,W[41]=L):L=W[41],W[42]!==et||W[43]!==eb||W[44]!==ew||W[45]!==O||W[46]!==L||W[47]!==z?(D=(0,t.jsxs)(f.MyMind.Root,{userId:z,profileName:ew,profileImageUrl:eb,statusEvent:et,children:[O,L]}),W[42]=et,W[43]=eb,W[44]=ew,W[45]=O,W[46]=L,W[47]=z,W[48]=D):D=W[48],W[49]!==V||W[50]!==D?(F=(0,t.jsx)("div",{"data-slot":"my-mind-pill",className:V,children:D}),W[49]=V,W[50]=D,W[51]=F):F=W[51];let ex=!er;return W[52]!==G||W[53]!==ea||W[54]!==Y||W[55]!==es||W[56]!==eg?(B=eg?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(eZ.DialogTitle,{className:"sr-only",children:"Add Knowledge"}),(0,t.jsx)(eZ.DialogDescription,{className:"sr-only",children:"Add content to your mind — upload files, paste URLs, or connect accounts."}),(0,t.jsx)(u.AddToMindDialogContent,{})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(eZ.DialogTitle,{className:"sr-only",children:"Notifications"}),G?(0,t.jsx)(eI,{ownUsername:Y,open:ea,onClose:()=>es(!1)}):(0,t.jsx)("div",{className:"flex h-full items-center justify-center px-6 py-12 text-center text-sm text-fg-mid",children:"Notifications aren't configured for this environment."})]}),W[52]=G,W[53]=ea,W[54]=Y,W[55]=es,W[56]=eg,W[57]=B):B=W[57],W[58]!==eh||W[59]!==ec||W[60]!==ey||W[61]!==ex||W[62]!==B?($=(0,t.jsx)(c.AddToMindSubmitProvider,{children:(0,t.jsx)(d.FileDropzoneProvider,{children:(0,t.jsx)(g.PillDialog,{open:ec,contentClassName:ey,modal:ex,onOpenChange:eh,children:B})})}),W[58]=eh,W[59]=ec,W[60]=ey,W[61]=ex,W[62]=B,W[63]=$):$=W[63],W[64]!==M||W[65]!==_||W[66]!==R||W[67]!==I||W[68]!==F||W[69]!==$?(U=(0,t.jsxs)(i.LayoutGroup,{children:[M,_,R,I,j,F,$]}),W[64]=M,W[65]=_,W[66]=R,W[67]=I,W[68]=F,W[69]=$,W[70]=U):U=W[70],U}function tc(e){return e.setAvailable}function td(e){return e.setOpen}function th(e){return e.open}function tp(e){return e.isNonModalPickerOpen}function tf(e){return e.close}function tm(e){return e.isOpen}e.s(["MyMindSlot",0,function(e){let i,r,s,o=(0,n.c)(29),{userId:l,profileName:u,ownUsername:c,initialProfileImageUrl:d,hasMind:h}=e,p=(0,a.usePathname)(),f=(0,y.useMyMindPillHiddenStore)(e7);o[0]!==c||o[1]!==p||o[2]!==f?(i=f||(0,eq.isOtherProfileRoute)(p,c)||(0,eX.isCallPath)(p,c),o[0]=c,o[1]=p,o[2]=f,o[3]=i):i=o[3];let m=i,g=(0,e1.useKnockReady)(),v=(0,eY.useNavScope)(),b=e0.env.NEXT_PUBLIC_KNOCK_FEED_CHANNEL_ID,w=!!b&&g;if(p?.startsWith("/@/")||p?.startsWith("/at/")){let e,n,i;if(!v?.ownerId){let e;return o[4]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)(e8,{description:"Add content to this mind — upload files, paste URLs, or connect accounts.",scopeMode:"required"}),o[4]=e):e=o[4],e}let r=v.ownerName??v.ownerUsername;o[5]!==m||o[6]!==v.ownerId||o[7]!==v.ownerImage||o[8]!==w||o[9]!==c||o[10]!==r?(e=(0,t.jsx)(ti,{userId:v.ownerId,profileName:r,profileImageUrl:v.ownerImage,ownUsername:c,notificationsEnabled:w,hidden:m}),o[5]=m,o[6]=v.ownerId,o[7]=v.ownerImage,o[8]=w,o[9]=c,o[10]=r,o[11]=e):e=o[11];let a=e;return o[12]!==a||o[13]!==v.ownerId||o[14]!==w?(n=w&&b?(0,t.jsx)(eW,{feedId:b,tenantId:v.ownerId,children:a}):a,o[12]=a,o[13]=v.ownerId,o[14]=w,o[15]=n):n=o[15],o[16]!==v||o[17]!==n?(i=(0,t.jsx)(eK.ScopeProvider,{value:v,children:n}),o[16]=v,o[17]=n,o[18]=i):i=o[18],i}if(!h)return null;o[19]!==m||o[20]!==d||o[21]!==w||o[22]!==c||o[23]!==u||o[24]!==l?(r=(0,t.jsx)(ti,{userId:l,profileName:u,initialProfileImageUrl:d,ownUsername:c,notificationsEnabled:w,hidden:m}),o[19]=m,o[20]=d,o[21]=w,o[22]=c,o[23]=u,o[24]=l,o[25]=r):r=o[25];let x=r;return w&&b?(o[26]!==x||o[27]!==l?(s=(0,t.jsx)(eW,{feedId:b,tenantId:l,children:x}),o[26]=x,o[27]=l,o[28]=s):s=o[28],s):x}],365764)},368845,e=>{"use strict";var t=e.i(45113),n=e.i(413701),i=e.i(17772),r=e.i(187014),a=e.i(981831),s=e.i(669876);e.s(["ImpersonationBannerStop",0,function(){let e,o,l=(0,n.c)(4),[u,c]=(0,i.useState)(!1);l[0]===Symbol.for("react.memo_cache_sentinel")?(e=async function(){c(!0);let{error:e}=await s.authClient.admin.stopImpersonating({});if(e){c(!1),r.toast.error(e.message??"Could not stop impersonating");return}window.location.assign("/~")},l[0]=e):e=l[0];let d=e,h=u?"Stopping…":"Stop Impersonating";return l[1]!==u||l[2]!==h?(o=(0,t.jsx)(a.Button,{size:"sm",variant:"outline",disabled:u,onClick:d,children:h}),l[1]=u,l[2]=h,l[3]=o):o=l[3],o}])}]);
15
16//# debugId=c5bdecb5-d1f1-fb81-cd4e-67d0a7493ff2

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.