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]="7dc02a07-5203-3493-8a92-251e48968017")}catch(e){}}(); 2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,2045744,e=>{"use strict";var t=e.i(7473522),r=e.i(4144148),n=e.i(8616523),a=e.i(7792087);function o(){return"u">typeof window}function i(){return"production"}function s(){return"development"===((o()?window.vam:i())||"production")}function l(e){return RegExp(`/${e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(?=[/?#]|$)`)}function d(e){return(0,n.useEffect)(()=>{var t;e.beforeSend&&(null==(t=window.va)||t.call(window,"beforeSend",e.beforeSend))},[e.beforeSend]),(0,n.useEffect)(()=>{!function(e={debug:!0}){var t;if(!o())return;!function(e="auto"){if("auto"===e){window.vam=i();return}window.vam=e}(e.mode),window.va||(window.va=function(...e){(window.vaq=window.vaq||[]).push(e)}),e.beforeSend&&(null==(t=window.va)||t.call(window,"beforeSend",e.beforeSend));let r=e.scriptSrc?e.scriptSrc:s()?"https://va.vercel-scripts.com/v1/script.debug.js":e.basePath?`${e.basePath}/insights/script.js`:"/_vercel/insights/script.js";if(document.head.querySelector(`script[src*="${r}"]`))return;let n=document.createElement("script");n.src=r,n.defer=!0,n.dataset.sdkn="@vercel/analytics"+(e.framework?`/${e.framework}`:""),n.dataset.sdkv="1.6.1",e.disableAutoTrack&&(n.dataset.disableAutoTrack="1"),e.endpoint?n.dataset.endpoint=e.endpoint:e.basePath&&(n.dataset.endpoint=`${e.basePath}/insights`),e.dsn&&(n.dataset.dsn=e.dsn),n.onerror=()=>{let e=s()?"Please check if any ad blockers are enabled and try again.":"Be sure to enable Web Analytics for your project and deploy again. See https://vercel.com/docs/analytics/quickstart for more information.";console.log(`[Vercel Web Analytics] Failed to load script from ${r}. ${e}`)},s()&&!1===e.debug&&(n.dataset.debug="false"),document.head.appendChild(n)}({framework:e.framework||"react",basePath:e.basePath??function(){if(void 0!==r.default&&void 0!==r.default.env)return r.default.env.REACT_APP_VERCEL_OBSERVABILITY_BASEPATH}(),...void 0!==e.route&&{disableAutoTrack:!0},...e})},[]),(0,n.useEffect)(()=>{e.route&&e.path&&function({route:e,path:t}){var r;null==(r=window.va)||r.call(window,"pageview",{route:e,path:t})}({route:e.route,path:e.path})},[e.route,e.path]),null}function c(e){let t,o,i,{route:s,path:c}=(t=(0,a.useParams)(),o=(0,a.useSearchParams)(),i=(0,a.usePathname)(),t?{route:function(e,t){if(!e||!t)return e;let r=e;try{let e=Object.entries(t);for(let[t,n]of e)if(!Array.isArray(n)){let e=l(n);e.test(r)&&(r=r.replace(e,`/[${t}]`))}for(let[t,n]of e)if(Array.isArray(n)){let e=l(n.join("/"));e.test(r)&&(r=r.replace(e,`/[...${t}]`))}return r}catch(t){return e}}(i,Object.keys(t).length?t:Object.fromEntries(o.entries())),path:i}:{route:null,path:i});return n.default.createElement(d,{path:c,route:s,...e,basePath:function(){if(void 0!==r.default&&void 0!==r.default.env)return r.default.env.NEXT_PUBLIC_VERCEL_OBSERVABILITY_BASEPATH}(),framework:"next"})}function u(e){return n.default.createElement(n.Suspense,{fallback:null},n.default.createElement(c,{...e}))}function h(){return false}function m(e){return RegExp(`/${e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(?=[/?#]|$)`)}function f(e){(0,n.useEffect)(()=>{var t;e.beforeSend&&(null==(t=window.si)||t.call(window,"beforeSend",e.beforeSend))},[e.beforeSend]);let t=(0,n.useRef)(null);return(0,n.useEffect)(()=>{if(t.current)e.route&&t.current(e.route);else{let n=function(e={}){var t;if(!("u">typeof window)||null===e.route)return null;window.si||(window.si=function(...e){(window.siq=window.siq||[]).push(e)});let r=e.scriptSrc?e.scriptSrc:h()?"https://va.vercel-scripts.com/v1/speed-insights/script.debug.js":e.dsn?"https://va.vercel-scripts.com/v1/speed-insights/script.js":e.basePath?`${e.basePath}/speed-insights/script.js`:"/_vercel/speed-insights/script.js";if(document.head.querySelector(`script[src*="${r}"]`))return null;e.beforeSend&&(null==(t=window.si)||t.call(window,"beforeSend",e.beforeSend));let n=document.createElement("script");return n.src=r,n.defer=!0,n.dataset.sdkn="@vercel/speed-insights"+(e.framework?`/${e.framework}`:""),n.dataset.sdkv="1.3.1",e.sampleRate&&(n.dataset.sampleRate=e.sampleRate.toString()),e.route&&(n.dataset.route=e.route),e.endpoint?n.dataset.endpoint=e.endpoint:e.basePath&&(n.dataset.endpoint=`${e.basePath}/speed-insights/vitals`),e.dsn&&(n.dataset.dsn=e.dsn),h()&&!1===e.debug&&(n.dataset.debug="false"),n.onerror=()=>{console.log(`[Vercel Speed Insights] Failed to load script from ${r}. Please check if any content blockers are enabled and try again.`)},document.head.appendChild(n),{setRoute:e=>{n.dataset.route=e??void 0}}}({framework:e.framework??"react",basePath:e.basePath??function(){if(void 0!==r.default&&void 0!==r.default.env)return r.default.env.REACT_APP_VERCEL_OBSERVABILITY_BASEPATH}(),...e});n&&(t.current=n.setRoute)}},[e.route]),null}function p(e){let t=(()=>{let e=(0,a.useParams)(),t=(0,a.useSearchParams)()||new URLSearchParams,r=(0,a.usePathname)();if(!e)return null;let n=Object.keys(e).length?e:Object.fromEntries(t.entries());if(!r||!n)return r;let o=r;try{let e=Object.entries(n);for(let[t,r]of e)if(!Array.isArray(r)){let e=m(r);e.test(o)&&(o=o.replace(e,`/[${t}]`))}for(let[t,r]of e)if(Array.isArray(r)){let e=m(r.join("/"));e.test(o)&&(o=o.replace(e,`/[...${t}]`))}return o}catch(e){return r}})();return n.default.createElement(f,{route:t,...e,framework:"next",basePath:function(){if(void 0!==r.default&&void 0!==r.default.env)return r.default.env.NEXT_PUBLIC_VERCEL_OBSERVABILITY_BASEPATH}()})}function v(e){return n.default.createElement(n.Suspense,{fallback:null},n.default.createElement(p,{...e}))}var g=e.i(6582769),b=e.i(3337636);e.i(2097435);var x=e.i(4713575);e.s(["RootProviders",0,function({children:e,partnerConfig:r}){let n=(0,a.usePathname)(),o=n?.startsWith("/dashboard/onboarding")||n?.startsWith("/auth")?"light":void 0;return(0,t.jsxs)(x.ThemeProvider,{attribute:"class",defaultTheme:"system",disableTransitionOnChange:!0,enableSystem:!0,forcedTheme:o,themes:["light","dark"],children:[(0,t.jsx)(b.PartnerThemeProvider,{config:r,children:(0,t.jsx)(g.MotionConfig,{reducedMotion:"user",children:e})}),(0,t.jsx)(u,{}),(0,t.jsx)(v,{})]})}],2045744)},1131141,e=>{"use strict";var t=e.i(7473522),r=e.i(7792087),n=e.i(3930383),a=e.i(4341154);function o(){return{teamId:a.env.NEXT_PUBLIC_JAM_TEAM_ID,enabled:a.env.NEXT_PUBLIC_JAM_ENABLED,recorderScriptUrl:"https://js.jam.dev/recorder.js",captureScriptUrl:"https://js.jam.dev/capture.
2js"}}function i(){let e,r=o();return(e=o()).enabled&&e.teamId&&r.teamId?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.default,{crossOrigin:"anonymous",src:r.captureScriptUrl,type:"module"}),(0,t.jsx)(n.default,{crossOrigin:"anonymous",src:r.recorderScriptUrl,type:"module"})]}):null}var s=e.i(8616523);function l(){return(0,s.useEffect)(()=>{if(!a.env.NEXT_PUBLIC_PRODUKTLY_CLIENT_TOKEN||document.getElementById("produktlyScript"))return;window.Produktly=window.Produktly||new Proxy(()=>{},{get:(e,t)=>(...e)=>{window.ProduktlyQ=(window.ProduktlyQ||[]).concat([[t,e]])},apply(e,t,r){window.ProduktlyQ=(window.ProduktlyQ||[]).concat([["apply",r]])}});let e=document.head||document.getElementsByTagName("head")[0];if(!e)return;let t=document.createElement("script");t.async=!0,t.src="https://public.produktly.com/js/main.js",t.setAttribute("id","produktlyScript"),t.dataset.clientToken=a.env.NEXT_PUBLIC_PRODUKTLY_CLIENT_TOKEN,e.appendChild(t)},[]),null}e.s(["AppSupportScripts",0,function(){var e;if(e=(0,r.usePathname)(),e?.startsWith("/pay/"))return null;let a=o();return(0,t.jsxs)(t.Fragment,{children:[a.teamId?(0,t.jsx)(n.default,{async:!0,defer:!0,src:`https://js.jam.dev/support/${a.teamId}.js`}):null,(0,t.jsx)(i,{}),(0,t.jsx)(l,{})]})}],1131141)},9158908,e=>{"use strict";var t=e.i(7473522),r=e.i(6383665),n=e.i(7792087),a=e.i(8616523),o=e.i(9466691),i=e.i(5300033),s=e.i(6107158),l=e.i(8152236),d=e.i(1996757),c=e.i(6660784),u=e.i(6550388),h=e.i(5636556),m=e.i(9253577),f=e.i(9323621),p=e.i(9282879),v=e.i(9603190),g=e.i(8625289),b=e.i(7259630);function x(e){try{return new URL(e).hostname}catch{return e}}let w=r.default.create(({partnerId:e,partnerName:r})=>{let n=(0,g.useEnhancedModal)(),[s,l]=(0,a.useState)(null),w=b.trpc.previewWhopTesting.getWebhookStatus.useQuery({partnerId:e},{refetchOnWindowFocus:!0}),y=b.trpc.previewWhopTesting.activate.useMutation({onSuccess:()=>{m.toast.success("Webhook activated for this preview"),w.refetch()},onError:e=>{m.toast.error(e.message||"Failed to activate webhook")}}),E=y.isPending||w.isFetching,j=w.data,k=j?.configured?j.webhooks.filter(e=>"v1"===e.apiVersion&&e.events.includes("payment.succeeded")):[],S=s??(1===k.length?k[0].id:null),P=k.find(e=>e.id===S),C=P?.url===j?.thisPreviewWebhookUrl,N=!!P&&!C&&function(e){try{return new URL(e).hostname.includes(".vercel.app")}catch{return!1}}(P.url),T=!!P&&!C&&!N,R=!!P&&!P.enabled;return(0,t.jsx)(p.Dialog,{onOpenChange:n.handleOpenChange,open:n.visible,children:(0,t.jsxs)(p.DialogContent,{className:"max-w-md",onAnimationEndCapture:n.handleAnimationEndCapture,children:[(0,t.jsxs)(p.DialogHeader,{children:[(0,t.jsx)(p.DialogTitle,{children:"Whop Webhook Testing"}),(0,t.jsxs)(p.DialogDescription,{children:["Route Whop webhooks for ",r," to this preview deployment to test the full checkout â payment â webhook flow."]})]}),(0,t.jsxs)("div",{className:"min-w-0 space-y-4",children:[w.isLoading&&(0,t.jsxs)("div",{className:"flex items-center gap-2 py-4",children:[(0,t.jsx)(u.Loader2,{className:"size-4 animate-spin text-muted-foreground"}),(0,t.jsx)("span",{className:"text-muted-foreground text-sm",children:"Loading webhook status from Whop..."})]}),w.isError&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("p",{className:"text-destructive text-sm",children:w.error.message||"Failed to load webhook status"}),(0,t.jsx)(o.Button,{onClick:()=>w.refetch(),size:"sm",variant:"outline",children:"Retry"})]}),j&&!j.configured&&(0,t.jsx)("p",{className:"text-muted-foreground text-sm",children:"Whop is not configured for this partner. Set up Whop credentials in the partner admin panel first."}),j?.configured&&0===k.length&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("p",{className:"text-muted-foreground text-sm",children:"No v1 webhook with payment.succeeded event found on this Whop company."}),j.webhooks.length>0&&(0,t.jsxs)("p",{className:"text-muted-foreground text-xs",children:["Found ",j.webhooks.length," webhook(s) but none match the required criteria (API v1 + payment.succeeded event)."]})]}),j?.configured&&k.length>0&&(0,t.jsxs)(t.Fragment,{children:[k.length>1&&(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("span",{className:"font-medium text-sm",children:"Select webhook"}),(0,t.jsxs)(i.Select,{onValueChange:l,value:S??void 0,children:[(0,t.jsx)(i.SelectTrigger,{className:"w-full",children:(0,t.jsx)(i.SelectValue,{placeholder:"Choose a webhook..."})}),(0,t.jsx)(i.SelectContent,{className:"z-[10000]",children:k.map(e=>(0,t.jsxs)(i.SelectItem,{value:e.id,children:[e.id,!e.enabled&&(0,t.jsx)("span",{className:"ml-1 text-muted-foreground text-xs",children:"(disabled)"})]},e.id))})]}),(0,t.jsx)("p",{className:"text-muted-foreground text-xs",children:"Activating one webhook will route the other billing webhooks to an inactive URL."})]}),P&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[1===k.length&&(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("span",{className:"font-medium text-sm",children:"Webhook"}),(0,t.jsx)("code",{className:"text-muted-foreground text-xs",children:P.id})]}),(0,t.jsx)(v.Separator,{}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-muted-foreground text-xs",children:"Status:"}
2),C&&(0,t.jsx)(f.Badge,{variant:"success",children:"Active on this preview"}),N&&(0,t.jsx)(f.Badge,{variant:"warning",children:"Active on another preview"}),T&&(0,t.jsx)(f.Badge,{variant:"secondary",children:"Inactive"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"shrink-0 text-muted-foreground text-xs",children:"Current URL:"}),(0,t.jsx)("code",{className:"min-w-0 truncate text-xs",children:x(P.url)})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-muted-foreground text-xs",children:"Events:"}),(0,t.jsxs)("span",{className:"text-xs",children:[P.events.length," subscribed"]})]})]}),R&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(v.Separator,{}),(0,t.jsx)("div",{className:"rounded-md border border-ds-red-border bg-ds-red-bg p-3 text-sm",children:(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)(d.AlertTriangle,{className:"mt-0.5 size-4 shrink-0 text-ds-red-text"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"font-medium text-ds-red-text",children:"Webhook is disabled"}),(0,t.jsx)("p",{className:"mt-1 text-muted-foreground text-xs",children:"This webhook is disabled on Whop. You can update the URL, but events won't be delivered until the webhook is enabled in the Whop dashboard."})]})]})})]}),(0,t.jsx)(v.Separator,{}),(0,t.jsxs)("div",{className:"min-w-0 space-y-1",children:[(0,t.jsx)("span",{className:"text-muted-foreground text-xs",children:"This preview's webhook URL:"}),(0,t.jsx)("code",{className:"block whitespace-normal break-all rounded bg-muted px-2 py-1 font-mono text-xs",children:j.thisPreviewWebhookUrl})]}),(0,t.jsx)(v.Separator,{}),C?(0,t.jsxs)("div",{className:"flex items-start gap-2 text-sm",children:[(0,t.jsx)(c.CheckCircle2,{className:"mt-0.5 size-4 shrink-0 text-ds-green-text"}),(0,t.jsxs)("span",{children:["Webhooks are routed to this preview.",R?" However, the webhook is disabled â enable it in the Whop dashboard to receive events.":" You can test the full checkout â payment â webhook flow."]})]}):(0,t.jsxs)("div",{className:"space-y-3",children:[N&&(0,t.jsxs)("div",{className:"rounded-md border border-ds-yellow-border bg-ds-yellow-bg p-3 text-sm",children:[(0,t.jsx)("p",{className:"font-medium text-ds-yellow-text",children:"Another preview owns this webhook"}),(0,t.jsxs)("p",{className:"mt-1 text-muted-foreground text-xs",children:["Currently pointing to"," ",(0,t.jsx)("code",{className:"font-mono",children:x(P.url)}),". Activating will redirect all webhook events to this preview instead."]})]}),(0,t.jsxs)(o.Button,{className:"w-full",disabled:E,loading:y.isPending,onClick:()=>y.mutate({partnerId:e,webhookId:P.id}),variant:"default",children:[(0,t.jsx)(h.Radio,{className:"mr-2 size-4"}),N?"Take over for this preview":"Activate for this preview"]})]})]}),!P&&k.length>1&&(0,t.jsx)("p",{className:"text-muted-foreground text-sm",children:"Select a webhook above to view its status and activate it."})]})]})]})})}),y="partner-switcher-position";function E(e){if("u"<typeof document)return null;let t=`; ${document.cookie}`.split(`; ${e}=`);return 2===t.length?t.pop()?.split(";").shift()??null:null}function j(e){let t="https:"===window.location.protocol?"; Secure":"";document.cookie=`${e}=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; SameSite=Lax${t}`}function k(){return{right:16,bottom:16}}function S(e,t){return{right:Math.max(16,Math.min(e,window.innerWidth-16)),bottom:Math.max(16,Math.min(t,window.innerHeight-16))}}e.s(["PreviewPartnerSwitcher",0,function(){let e=(0,n.usePathname)(),[d,c]=(0,a.useState)(!1),[u,h]=(0,a.useState)([]),[m,f]=(0,a.useState)(null),[p,v]=(0,a.useState)(!1),[g,b]=(0,a.useState)(null),[x,P]=(0,a.useState)(k),[C,N]=(0,a.useState)(!1),[T,R]=(0,a.useState)(!1),A=(0,a.useRef)(null),I=(0,a.useRef)(!1),M=e?.startsWith("/dashboard"),_=e?.includes("/brand-kit/create");(0,a.useEffect)(()=>{P(function(){try{let e=localStorage.getItem(y);if(e){let t=JSON.parse(e);if("number"==typeof t.right&&"number"==typeof t.bottom)return S(t.right,t.bottom)}}catch{}return k()}()),R(!0)},[]),(0,a.useEffect)(()=>{let e=()=>{P(e=>S(e.right,e.bottom))};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),(0,a.useEffect)(()=>{M&&!_&&(f(E(s.PARTNER_PREVIEW_OVERRIDE_COOKIE)),v(!0),fetch("/api/partner/preview-list").then(e=>{if(!e.ok)throw Error("Failed to fetch partners");return e.json()}).then(e=>{let t=e.partners??[];h(t);let r=E(s.PARTNER_PREVIEW_OVERRIDE_COOKIE);r&&!t.some(e=>e.slug===r)&&(j(s.PARTNER_PREVIEW_OVERRIDE_COOKIE),f(null))}).catch(e=>{b(e.message)}).finally(()=>{v(!1)}))},[_,M]);let O=(0,a.useCallback)(e=>{e.currentTarget.setPointerCapture(e.pointerId),A.current={startX:e.clientX,startY:e.clientY,startRight:x.right,startBottom:x.bottom,hasMoved:!1}},[x]),L=(0,a.useCallback)(e=>{if(!A.current)return;let t=e.clientX-A.current.startX,r=e.clientY-A.current.startY;!A.current.hasMoved&&5>Math.abs(t)&&5>Math.abs(r)||(A.current.hasMoved=!0,N(!0),P(S(A.current.startRight-t,A.current.startBottom-r)))},[]),W=(0,a.useCallback)(()=>{A.current=null,N(!1)},[]),D=(0,a.useCallback)(e=>{if(A.current){if(e.currentTarget.hasPointerCapture(e.pointerId)&&e.currentTarget.releasePointerCapture(e.pointerId),A.current.hasMoved){let t=e.clientX-A.current.startX,r=e.clientY-A.current.startY,n=S(A.current.startRight-t,A.current.startBottom-r);P(n);try{localStorage.setItem(y,JSON.stringify(n))}catch{}I.current=!0,setTimeout(()=>{I.current=!1},0)}W()}},[W]),V=(0,a.useCallback)(()=>{W()},[W]),B=(0,a.useCallback)(e=>{I.current?e.preventDefault():c(!0)},[]),$=u.find(e=>e.slug===m);if(!M||_)return null;let U={onPointerDown:O,onPointerMove:L,onPointerUp:D,onLostPointerCapture:V,onPointerCancel:V}
2,H={cursor:C?"grabbing":"grab",userSelect:"none",touchAction:"none"};return(0,t.jsx)("div",{className:"fixed z-[9999] hidden sm:block","data-testid":"preview-partner-switcher-responsive-wrapper",style:{right:x.right,bottom:x.bottom,visibility:T?"visible":"hidden"},children:d?(0,t.jsxs)("div",{className:"rounded-lg border bg-background p-4 shadow-lg",children:[(0,t.jsxs)("div",{className:"mb-3 flex items-center justify-between",style:H,...U,children:[(0,t.jsx)("span",{className:"font-medium text-sm",children:"Partner Preview"}),(0,t.jsx)(o.Button,{className:"h-6 w-6 p-0",onClick:()=>c(!1),onPointerDown:e=>e.stopPropagation(),size:"sm",variant:"ghost",children:"Ã"})]}),g?(0,t.jsx)("p",{className:"text-destructive text-sm",children:g}):p||0!==u.length?(0,t.jsxs)(i.Select,{disabled:p,onValueChange:e=>{"__clear__"===e?(j(s.PARTNER_PREVIEW_OVERRIDE_COOKIE),f(null)):(!function(e,t,r=7){let n=new Date(Date.now()+864e5*r).toUTCString(),a="https:"===window.location.protocol?"; Secure":"";document.cookie=`${e}=${t}; expires=${n}; path=/; SameSite=Lax${a}`}(s.PARTNER_PREVIEW_OVERRIDE_COOKIE,e),f(e)),window.location.pathname.startsWith("/dashboard")?window.location.href="/dashboard":window.location.reload()},value:m??void 0,children:[(0,t.jsx)(i.SelectTrigger,{className:"w-[200px]",children:(0,t.jsx)(i.SelectValue,{placeholder:p?"Loading...":"Select partner"})}),(0,t.jsxs)(i.SelectContent,{className:"z-[10000]",children:[m&&(0,t.jsx)(i.SelectItem,{value:"__clear__",children:(0,t.jsx)("span",{className:"text-muted-foreground",children:"Clear override"})}),u.map(e=>(0,t.jsxs)(i.SelectItem,{value:e.slug,children:[e.name,"active"!==e.status&&(0,t.jsxs)("span",{className:"ml-1 text-muted-foreground text-xs",children:["(",e.status,")"]})]},e.id))]})]}):(0,t.jsx)("p",{className:"max-w-[220px] text-muted-foreground text-sm",children:"No preview partners are available for this account. Sign in with an Acquisity account or a partner admin account to route Whop webhooks."}),$&&(0,t.jsxs)("p",{className:"mt-2 text-muted-foreground text-xs",children:["Active: ",$.name]}),$&&(0,t.jsx)(o.Button,{className:"mt-2 w-full",onClick:()=>r.default.show(w,{partnerId:$.id,partnerName:$.name}),size:"sm",variant:"outline",children:"Whop Webhooks"})]}):(0,t.jsx)(o.Button,{className:(0,l.cn)("bg-background shadow-lg",m&&"border-primary bg-primary/10"),onClick:B,size:"sm",style:H,variant:"outline",...U,children:m?`Partner: ${m}`:"Switch Partner"})})}],9158908)},3337636,e=>{"use strict";var t=e.i(7473522),r=e.i(8616523),n=e.i(6107158);let a="Acquisity",o=r.createContext(null);function i(){let e=r.useContext(o);return e||{partner:null,isWhiteLabel:!1,logo:null,appName:a}}e.s(["PartnerThemeProvider",0,function({config:e,children:i}){let s=r.useMemo(()=>e?e.id===n.DEFAULT_PARTNER_ID?{partner:e,isWhiteLabel:!1,logo:e.logoUrl,appName:a}:{partner:e,isWhiteLabel:!0,logo:e.logoUrl,appName:e.name}:{partner:null,isWhiteLabel:!1,logo:null,appName:a},[e]);return(0,t.jsx)(o.Provider,{value:s,children:i})},"useAppName",0,function(){let{appName:e}=i();return e},"usePartnerTheme",0,i])},9603190,e=>{"use strict";var t=e.i(7473522),r=e.i(8616523),n=e.i(7001528),a="horizontal",o=["horizontal","vertical"],i=r.forwardRef((e,r)=>{var i;let{decorative:s,orientation:l=a,...d}=e,c=(i=l,o.includes(i))?l:a;return(0,t.jsx)(n.Primitive.div,{"data-orientation":c,...s?{role:"none"}:{"aria-orientation":"vertical"===c?c:void 0,role:"separator"},...d,ref:r})});i.displayName="Separator";var s=e.i(8152236);e.s(["Separator",0,function({className:e,orientation:r="horizontal",decorative:n=!0,...a}){return(0,t.jsx)(i,{className:(0,s.cn)("shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=vertical]:h-full data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px",e),"data-slot":"separator",decorative:n,orientation:r,...a})}],9603190)},8625289,e=>{"use strict";var t=e.i(6383665);e.s(["useEnhancedModal",0,function(){let e=t.default.useModal();return{...e,handleAnimationEndCapture:()=>{e.resolveHide(),e.visible||e.keepMounted||e.remove()},handleClose:()=>{e.hide()},handleOpenChange:t=>{!t&&(e.hide(),e.resolveHide(),e.visible||e.keepMounted||e.remove())}}}])},2097435,e=>{"use strict";e.i(4713575),e.s([])},6107158,e=>{"use strict";e.s(["DEFAULT_PARTNER_ID",0,"00000000-0000-0000-0000-000000000001","PARTNER_PREVIEW_OVERRIDE_COOKIE",0,"partner-preview-override"])},6383665,e=>{"use strict";var t=e.i(8616523),r=function(){return(r=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var a in t=arguments[r])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)},n=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)0>t.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r},a=Symbol("NiceModalId"),o={},i=t.default.createContext(o),s=t.default.createContext(null),l={},d={},c=0,u=function(){throw Error("No dispatch method detected, did you embed your app with NiceModal.Provider?")},h=function(){return"_nice_modal_"+c++},m=function(e,t){var n,a,i;switch(void 0===e&&(e=o),t.type){case"nice-modal/show":var s=t.payload,l=s.modalId,c=s.args;return r(r({},e),((n={})[l]=r(r({},e[l]),{id:l,args:c,visible:!!d[l],delayVisible:!d[l]}),n));case"nice-modal/hide":var l=t.payload.modalId;if(!e[l])return e;return r(r({},e),((a={})[l]=r(r({},e[l]),{visible:!1}),a));case"nice-modal/remove":var l=t.payload.modalId,u=r({},e);return delete u[l],u;case"nice-modal/set-flags":var h=t.payload,l=h.modalId,m=h.flags;return r(r({},e),((i={})[l]=r(r({},e[l]),m),i));default:return e}},f={},p={},v=function(e){return"string"==typeof e?e:(e[a]||(e[a]=h()),e[a])};function g(e,t){var r=v(e);if("string"==typeof e||l[r]||E(r,e),u({type:"nice-modal/show",payload:{modalId:r,args:t}}),!f[r]){var n,a,o=new Promise(function(e,t){n=e,a=t});f[r]={resolve:n,reject:a,promise:o}}return f[r].promise}function b(e){var t=v(e);if(u({type:"nice-modal/hide",payload:{modalId:t}}),delete f[t],!p[t]){var r,n,a=new Promise(function(e,t){r=e,n=t});p[t]={resolve:r,reject:n,promise:a}}return p[t].promise}var x=function(e){var t=v(e);u({type:"nice-modal/remove",payload:{modalId:t}}),delete f[t],delete p[t]},w=function(e,t){u({type:"nice-modal/set-flags",payload:{modalId:e,flags:t}})};function y(e,r){var n=(0,t.useContext)(i),a=(0,t.useContext)(s),o=null,d=e&&"string"!=typeof e;if(!(o=e?v(e):a))throw Error("No modal id found in NiceModal.useModal.");var c=o;(0,t.useEffect)(function(){d&&!l[c]&&E(c,e,r)},[d,c,e,r]);var u=n[c],h=(0,t.useCallback)(function(e){return g(c,e)},[c]),m=(0,t.useCallback)(function(){return b(c)},[c]),w=(0,t.useCallback)(function(){return x(c)},[c]),y=(0,t.useCallback)(function(e){var t;null==(t=f[c])||t.resolve(e),delete f[c]},[c]),j=(0,t.useCallback)(function(e){var t;null==(t=f[c])||t.reject(e),delete f[c]},[c]),k=(0,t.useCallback)(function(e){var t;null==(t=p[c])||t.resolve(e),delete p[c]},[c]);return(0,t.useMemo)(function(){return{id:c,args:null==u?void 0:u.args,visible:!!(null==u?void 0:u.visible),keepMounted:!!(null==u?void 0:u.keepMounted),show:h,hide:m,remove:w,resolve:y,reject:j,resolveHide:k}},[c,null==u?void 0:u.args,null==u?void 0:u.visible,null==u?void 0:u.keepMounted,h,m,w,y,j,k])}var E=function(e,t,r){l[e]?l[e].props=r:l[e]={comp:t,props:r}},j=function(e){delete l[e]},k=function(){var e=(0,t.useContext)(i),n=Object.keys(e).filter(function(t){return!!e[t]});
2n.forEach(function(e){if(!l[e]&&!d[e])return void console.warn("No modal found for id: "+e+". Please check the id or if it is registered or declared via JSX.")});var a=n.filter(function(e){return l[e]}).map(function(e){return r({id:e},l[e])});return t.default.createElement(t.default.Fragment,null,a.map(function(e){return t.default.createElement(e.comp,r({key:e.id,id:e.id},e.props))}))},S=function(e){var r=e.children,n=(0,t.useReducer)(m,o),a=n[0];return u=n[1],t.default.createElement(i.Provider,{value:a},r,t.default.createElement(k,null))};e.s(["default",0,{Provider:function(e){var r=e.children,n=e.dispatch,a=e.modals;return n&&a?(u=n,t.default.createElement(i.Provider,{value:a},r,t.default.createElement(k,null))):t.default.createElement(S,null,r)},ModalDef:function(e){var r=e.id,n=e.component;return(0,t.useEffect)(function(){return E(r,n),function(){j(r)}},[r,n]),null},ModalHolder:function(e){var a,o=e.modal,i=e.handler,s=void 0===i?{}:i,d=n(e,["modal","handler"]),c=(0,t.useMemo)(function(){return h()},[]),u="string"==typeof o?null==(a=l[o])?void 0:a.comp:o;if(!s)throw Error("No handler found in NiceModal.ModalHolder.");if(!u)throw Error("No modal found for id: "+o+" in NiceModal.ModalHolder.");return s.show=(0,t.useCallback)(function(e){return g(c,e)},[c]),s.hide=(0,t.useCallback)(function(){return b(c)},[c]),t.default.createElement(u,r({id:c},d))},NiceModalContext:i,create:function(e){return function(a){var o,l=a.defaultVisible,c=a.keepMounted,u=a.id,h=n(a,["defaultVisible","keepMounted","id"]),m=y(u),f=m.args,p=m.show,v=(0,t.useContext)(i),g=!!v[u];(0,t.useEffect)(function(){return l&&p(),d[u]=!0,function(){delete d[u]}},[u,p,l]),(0,t.useEffect)(function(){c&&w(u,{keepMounted:!0})},[u,c]);var b=null==(o=v[u])?void 0:o.delayVisible;return((0,t.useEffect)(function(){b&&p(f)},[b,f,p]),g)?t.default.createElement(s.Provider,{value:u},t.default.createElement(e,r({},h,f))):null}},register:E,getModal:function(e){var t;return null==(t=l[e])?void 0:t.comp},show:g,hide:b,remove:x,useModal:y,reducer:m,antdModal:function(e){return{visible:e.visible,onOk:function(){return e.hide()},onCancel:function(){return e.hide()},afterClose:function(){e.resolveHide(),e.keepMounted||e.remove()}}},antdDrawer:function(e){return{visible:e.visible,onClose:function(){return e.hide()},afterVisibleChange:function(t){t||e.resolveHide(),t||e.keepMounted||e.remove()}}},muiDialog:function(e){return{open:e.visible,onClose:function(){return e.hide()},onExited:function(){e.resolveHide(),e.keepMounted||e.remove()}}},bootstrapDialog:function(e){return{show:e.visible,onHide:function(){return e.hide()},onExited:function(){e.resolveHide(),e.keepMounted||e.remove()}}}},"useModal",0,y])},3069963,e=>{"use strict";let t=(0,e.i(5347488).default)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);e.s(["default",0,t])},6660784,e=>{"use strict";var t=e.i(3069963);e.s(["CheckCircle2",()=>t.default])},6550388,e=>{"use strict";var t=e.i(3158850);e.s(["Loader2",()=>t.default])},3429768,e=>{"use strict";let t=(0,e.i(5347488).default)("radio",[["path",{d:"M4.9 19.1C1 15.2 1 8.8 4.9 4.9",key:"1vaf9d"}],["path",{d:"M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5",key:"u1ii0m"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5",key:"1j5fej"}],["path",{d:"M19.1 4.9C23 8.8 23 15.1 19.1 19",key:"10b0cb"}]]);e.s(["default",0,t])},5636556,e=>{"use strict";var t=e.i(3429768);e.s(["Radio",()=>t.default])},8389291,e=>{"use strict";let t=(0,e.i(5347488).default)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);e.s(["default",0,t])},1996757,e=>{"use strict";var t=e.i(8389291);e.s(["AlertTriangle",()=>t.default])},6582769,e=>{"use strict";var t=e.i(7473522),r=e.i(8616523),n=e.i(8783155),a=e.i(5272788),o=e.i(2341128);e.s(["MotionConfig",0,function({children:e,isValidProp:i,...s}){i&&(0,a.loadExternalIsValidProp)(i),(s={...(0,r.useContext)(n.MotionConfigContext),...s}).isStatic=(0,o.useConstant)(()=>s.isStatic);let l=(0,r.useMemo)(()=>s,[JSON.stringify(s.transition),s.transformPagePoint,s.reducedMotion]);return(0,t.jsx)(n.MotionConfigContext.Provider,{value:l,children:e})}])},8783155,5272788,e=>{"use strict";let t=(0,e.i(8616523).createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});e.s(["MotionConfigContext",0,t],8783155);let r=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","ignoreStrict","viewport"]);function n(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||r.has(e)}let a=e=>!n(e);function o(e){"function"==typeof e&&(a=t=>t.startsWith("on")?!n(t):e(t))}try{o((()=>{let e=Error("Cannot find module '@emotion/is-prop-valid'");throw e.code="MODULE_NOT_FOUND",e})().default)}catch{}e.s(["filterProps",0,function(e,t,r){let o={};for(let i in e)("values"!==i||"object"!=typeof e.values)&&(a(i)||!0===r&&n(i)||!t&&!n(i)||e.draggable&&i.startsWith("onDrag"))&&(o[i]=e[i]);return o},"loadExternalIsValidProp",0,o],5272788)},2341128,e=>{"use strict";var t=e.i(8616523);
2e.s(["useConstant",0,function(e){let r=(0,t.useRef)(null);return null===r.current&&(r.current=e()),r.current}])},4713575,e=>{"use strict";var t=e.i(8616523),r=(e,t,r,n,a,o,i,s)=>{let l=document.documentElement,d=["light","dark"];function c(t){var r;(Array.isArray(e)?e:[e]).forEach(e=>{let r="class"===e,n=r&&o?a.map(e=>o[e]||e):a;r?(l.classList.remove(...n),l.classList.add(o&&o[t]?o[t]:t)):l.setAttribute(e,t)}),r=t,s&&d.includes(r)&&(l.style.colorScheme=r)}if(n)c(n);else try{let e=localStorage.getItem(t)||r,n=i&&"system"===e?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e;c(n)}catch(e){}},n=["light","dark"],a="(prefers-color-scheme: dark)",o="u"<typeof window,i=t.createContext(void 0),s={setTheme:e=>{},themes:[]},l=["light","dark"],d=({forcedTheme:e,disableTransitionOnChange:r=!1,enableSystem:o=!0,enableColorScheme:s=!0,storageKey:d="theme",themes:f=l,defaultTheme:p=o?"system":"light",attribute:v="data-theme",value:g,children:b,nonce:x,scriptProps:w})=>{let[y,E]=t.useState(()=>u(d,p)),[j,k]=t.useState(()=>"system"===y?m():y),S=g?Object.values(g):f,P=t.useCallback(e=>{let t=e;if(!t)return;"system"===e&&o&&(t=m());let a=g?g[t]:t,i=r?h(x):null,l=document.documentElement,d=e=>{"class"===e?(l.classList.remove(...S),a&&l.classList.add(a)):e.startsWith("data-")&&(a?l.setAttribute(e,a):l.removeAttribute(e))};if(Array.isArray(v)?v.forEach(d):d(v),s){let e=n.includes(p)?p:null,r=n.includes(t)?t:e;l.style.colorScheme=r}null==i||i()},[x]),C=t.useCallback(e=>{let t="function"==typeof e?e(y):e;E(t);try{localStorage.setItem(d,t)}catch(e){}},[y]),N=t.useCallback(t=>{k(m(t)),"system"===y&&o&&!e&&P("system")},[y,e]);t.useEffect(()=>{let e=window.matchMedia(a);return e.addListener(N),N(e),()=>e.removeListener(N)},[N]),t.useEffect(()=>{let e=e=>{e.key===d&&(e.newValue?E(e.newValue):C(p))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[C]),t.useEffect(()=>{P(null!=e?e:y)},[e,y]);let T=t.useMemo(()=>({theme:y,setTheme:C,forcedTheme:e,resolvedTheme:"system"===y?j:y,themes:o?[...f,"system"]:f,systemTheme:o?j:void 0}),[y,C,e,j,o,f]);return t.createElement(i.Provider,{value:T},t.createElement(c,{forcedTheme:e,storageKey:d,attribute:v,enableSystem:o,enableColorScheme:s,defaultTheme:p,value:g,themes:f,nonce:x,scriptProps:w}),b)},c=t.memo(({forcedTheme:e,storageKey:n,attribute:a,enableSystem:o,enableColorScheme:i,defaultTheme:s,value:l,themes:d,nonce:c,scriptProps:u})=>{let h=JSON.stringify([a,n,s,e,d,l,o,i]).slice(1,-1);return t.createElement("script",{...u,suppressHydrationWarning:!0,nonce:"u"<typeof window?c:"",dangerouslySetInnerHTML:{__html:`(${r.toString()})(${h}
2)`}})}),u=(e,t)=>{let r;if(!o){try{r=localStorage.getItem(e)||void 0}catch(e){}return r||t}},h=e=>{let t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(t),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(t)},1)}},m=e=>(e||(e=window.matchMedia(a)),e.matches?"dark":"light");e.s(["ThemeProvider",0,e=>t.useContext(i)?t.createElement(t.Fragment,null,e.children):t.createElement(d,{...e}),"useTheme",0,()=>{var e;return null!=(e=t.useContext(i))?e:s}])},7792087,(e,t,r)=>{t.exports=e.r(1123863)},3930383,(e,t,r)=>{t.exports=e.r(724191)}]); 3 4//# debugId=7dc02a07-5203-3493-8a92-251e48968017
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.