PageSourceSearch

https://app.wonderchat.io/_next/static/chunks/pages/plan/basic-old-6c3627d3be02418c.js

js wonderchat.io collected 2026-09-24 17:15:49 UTC 6,962 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7349],{36109:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/plan/basic-old",function(){return n(63044)}])},25244:function(e,t,n){"use strict";n.d(t,{Q:function(){return x}});var r=n(85893),i=n(59007),o=n(27239),a=n(48783),s=n(81136),l=n(71293),c=n(13990),u=n(22757),d=n(33299),h=n(11163),g=n(99893),p=n(67294),f=n(39157);let x=(e,t)=>{let n=t=>{var n;let f=(0,h.useRouter)(),{data:x,status:b}=(0,d.useSession)(),m=(0,p.useRef)(!1),y=i.S.chatbot.claimTrialChatbot.useMutation({onSuccess:e=>{var t;let n="true"===f.query.onboardingV2;try{n||(n="true"===localStorage.getItem("onboardingV2")),localStorage.removeItem("trialChatbotId"),localStorage.removeItem("onboardingV2")}catch(e){}if(n){f.push("/onboarding?surveyOnly=true&onboardingV2=true&chatbotId=".concat(e.chatbotId));return}let r=(null==x?void 0:null===(t=x.user)||void 0===t?void 0:t.isOnboardingCompleted)?"/agents/settings/".concat(e.chatbotId):"/onboarding?surveyOnly=true&chatbotId=".concat(e.chatbotId);f.push(r)},onError:()=>{try{localStorage.removeItem("trialChatbotId")}catch(e){}}});return((0,p.useEffect)(()=>{var e;if(null==x?void 0:null===(e=x.user)||void 0===e?void 0:e.id){g.ZP.get_distinct_id()!==x.user.id&&g.ZP.identify(x.user.id,{email:x.user.email,name:x.user.name,subscription_type:x.user.subscriptionType});try{x.user.createdAt&&!localStorage.getItem("ph_account_created_at_set")&&(g.ZP.setPersonProperties(void 0,{account_created_at:x.user.createdAt}),localStorage.setItem("ph_account_created_at_set","1"))}catch(e){}}},[null==x?void 0:null===(n=x.user)||void 0===n?void 0:n.id]),(0,p.useEffect)(()=>{if(!(null==x?void 0:x.user)||m.current)return;let e=null,t=null,n=f.query.trialChatbotId,r=f.query.claimToken;if("string"==typeof n&&n)e=n,t="string"==typeof r?r:null;else try{e=localStorage.getItem("trialChatbotId"),t=localStorage.getItem("trialClaimToken")}catch(e){}e&&(m.current=!0,y.mutate({chatbotId:e,claimToken:null!=t?t:void 0}))},[x,f.query.trialChatbotId,f.query.claimToken]),(0,p.useEffect)(()=>{var e;x||"loading"===b||f.push("/auth/sign-in");let t=function(e,t){if("string"!=typeof e||!e)return null;try{let n=new URL(e,t);if(n.origin===t&&(n.pathname.startsWith("/workspace-v2/invite/")||n.pathname.startsWith("/workspace-v2/join/")))return"".concat(n.pathname).concat(n.search)}catch(e){}return null}(f.query.callbackUrl,window.location.origin);if(t){f.replace(t);return}let n="string"==typeof f.query.trialChatbotId&&!!f.query.trialChatbotId;if(!n)try{n=!!localStorage.getItem("trialChatbotId")}catch(e){}(!n||null==x||!x.user)&&((null==x?void 0:null===(e=x.user)||void 0===e?void 0:e.isOnboardingCompleted)||"loading"===b||"/onboarding"===f.pathname||f.push("/onboarding"))},[x,b,f]),y.isLoading)?(0,r.jsx)(o.M,{h:"100vh",flexDir:"column",children:(0,r.jsxs)(a.g,{spacing:4,children:[(0,r.jsx)(s.$,{size:"lg",color:"brand.500"}),(0,r.jsx)(l.x,{color:"gray.600",fontWeight:"medium",children:"Setting up your AI agent..."})]})}):x||"loading"!==b?(null==x?void 0:x.user)?x.user.isDisabled?(0,r.jsx)(o.M,{h:"calc(100vh - 60px)",flexDir:"column",children:(0,r.jsxs)(c.Z,{p:8,maxW:"600px",children:[(0,r.jsx)(u.X,{size:"lg",mb:4,color:"red.500",children:"Account Disabled"}),(0,r.jsx)(l.x,{children:"Your account has been disabled due to a late payment. Please contact support to resolve this issue."})]})}):(0,r.jsx)(e,{...t}):(0,r.jsx)(o.M,{h:"calc(100vh - 60px)",flexDir:"column",children:(0,r.jsx)(l.x,{children:"Redirecting you to sign in page ..."})}):(0,r.jsx)(o.M,{h:"calc(100vh - 60px)",flexDir:"column",children:(0,r.jsx)(l.x,{children:"Loading ..."})})};return n.getLayout=function(e){return(null==t?void 0:t.noLayout)?e:(0,r.jsx)(f.Z,{children:e})},n}},63044:function(e,t,n){"use strict";n.r(t);var r=n(85893),i=n(25244),o=n(84790),a=n(59007),s=n(7963),l=n(20967),c=n(81136),u=n(71293),d=n(93717),h=n(48783),g=n(22757),p=n(34292),f=n(93108),x=n(35541),b=n(83589),m=n(14581),y=n(64859),v=n(54346),j=n(14253);t.default=(0,i.Q)(function(){let{data:e,isLoading:t,isError:n,refetch:i}=a.S.user.getUserDetails.useQuery(),S=(0,s.p)(),I=a.S.subscriptions.changeSubscription.useMutation({onSuccess:()=>{i(),w(),S({title:"Subscription updated!",description:"Your subscription has been changed to the Basic plan. Contact us if something seems to have gone wrong.",status:"success",duration:4e3,isClosable:!0})}}),{isOpen:C,onOpen:_,onClose:w}=(0,l.q)(),{data:k,isLoading:E,isError:O}=a.S.subscriptions.getSubscriptionInfo.useQuery();if(t||E)return(0,r.jsx)(c.$,{});if(n||O)return(0,r.jsx)(u.x,{children:"Error, please try again. If this persists, please contact Support"});let{subscriptionType:q,email:z}=e,{subscriptionInfo:D}=k;return(0,r.jsxs)(d.k,{alignItems:"center",justifyContent:"center",h:"full",p:8,children:[(0,r.jsxs)(h.g,{spacing:6,p:10,borderWidth:"1px",borderRadius:"xl",boxShadow:"md",maxW:"420p
1x",w:"full",children:[(0,r.jsxs)(h.g,{spacing:1,children:[(0,r.jsx)(g.X,{size:"lg",children:"Basic"}),(0,r.jsxs)(p.U,{alignItems:"baseline",spacing:1,children:[(0,r.jsx)(g.X,{size:"xl",children:"$".concat(o.JW)}),(0,r.jsx)(u.x,{color:"gray.500",children:"/ month"})]}),(0,r.jsx)(u.x,{color:"gray.500",fontSize:14,textAlign:"center",children:"Our original Basic plan, billed monthly in USD."})]}),(0,r.jsx)(f.z,{w:"full",colorScheme:"brand",onClick:()=>{if(D)_();else{let t="undefined"!=typeof Rewardful?Rewardful.referral:null;Paddle.Checkout.open({product:o.Rf,email:z,passthrough:JSON.stringify({userId:e.id,rewardful:{referral:t}})})}},children:D?"Switch to Basic":"Subscribe to Basic"})]}),(0,r.jsxs)(x.u_,{isOpen:C,onClose:w,children:[(0,r.jsx)(b.Z,{}),(0,r.jsxs)(m.h,{children:[(0,r.jsx)(y.x,{children:"Change subscription plan"}),(0,r.jsx)(v.f,{children:(0,r.jsxs)(h.g,{alignItems:"flex-start",children:[(0,r.jsx)(u.x,{layerStyle:"bigImpt",children:"Plan change: ".concat(q," to Basic monthly")}),(0,r.jsx)(u.x,{fontSize:14,children:"You will be billed ".concat(o.JW," USD immediately, and ").concat(o.JW," USD for all subsequent months.")})]})}),(0,r.jsx)(j.m,{children:(0,r.jsxs)(p.U,{children:[(0,r.jsx)(f.z,{onClick:w,children:"Close"}),(0,r.jsx)(f.z,{isLoading:I.isLoading,colorScheme:"red",onClick:()=>{I.mutate({planId:o.Rf})},children:"Confirm"})]})})]})]})]})})},27239:function(e,t,n){"use strict";n.d(t,{M:function(){return a},u:function(){return l}});var r=n(2169),i=n(16554),o=n(85893),a=(0,r.m)("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}});a.displayName="Center";var s={horizontal:{insetStart:"50%",transform:"translateX(-50%)"},vertical:{top:"50%",transform:"translateY(-50%)"},both:{insetStart:"50%",top:"50%",transform:"translate(-50%, -50%)"}},l=(0,i.G)(function(e,t){let{axis:n="both",...i}=e;return(0,o.jsx)(r.m.div,{ref:t,__css:s[n],...i,position:"absolute"})})}},function(e){e.O(0,[2432,6152,5937,5445,260,2260,2832,512,9562,6057,5145,2553,8237,4790,8100,9157,2888,9774,179],function(){return e(e.s=36109)}),_N_E=e.O()}]);

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.