1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7221,8548],{7406:(e,t,a)=>{"use strict";a.d(t,{A:()=>f});var r=a(37876),s=a(14232),n=a(11123),i=a(63248),o=a(46768),l=a(65870),c=a(77041),d=a(92161),p=a(23820),m=a(75861),u=a(53292),h=a(27946),x=a(83363),g=a(22373),y=a(89099);let b=()=>{let[e,t]=(0,s.useState)(!1),{authedUser:a}=(0,m.A)(),n=(0,y.useRouter)(),[i,o]=(0,s.useState)(null),[l,b]=(0,s.useState)(0),[f,j]=(0,s.useState)(0),[v,w]=(0,s.useState)(0),N=(0,s.useRef)(!1);(0,s.useEffect)(()=>{a&&setTimeout(()=>{(0,g.k5)(a)&&!N.current&&(N.current=!0,u.o.userLeadsCount().then(e=>{b(e.count),j(e.limit),w(e.pkgLimit);let{count:a,limit:r,pkgLimit:s}=e;a>=r?a>r&&o("over"):a<r&&o("under"),t(!0)}))},1500)},[a]);let A=async e=>{try{await u.o.markMonitorWelcomePromptSeen(),(0,h.M)(),t(!1),n.push(e)}catch(e){console.error("Error:",e)}};return(0,r.jsx)(d.lG,{open:e,onOpenChange:t,children:(0,r.jsxs)(d.Cf,{showCrossButton:!1,onInteractOutside:e=>e.preventDefault(),children:["under"===i&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("h2",{children:"\uD83C\uDF89 Good News! Your Plan Now Includes Weekly Job Change Tracking."}),(0,r.jsxs)("p",{children:["As a free upgrade to your ",(0,r.jsxs)("strong",{className:"capitalize",children:[(0,x.qG)(null==a?void 0:a.subscriptionPlan)," Plan"]}),", we've automatically activated monitoring for ",(0,r.jsxs)("strong",{children:["all ",l," of your contacts."]})]}),(0,r.jsx)("p",{children:"From now on, we will check them weekly to see if they still work at the same company."}),(0,r.jsxs)("p",{children:[(0,r.jsx)("strong",{children:"Note:"})," Only contacts with email addresses are monitored."]}),(0,r.jsx)("p",{children:"You'll get an alert when a contact becomes outdated, so you never miss a critical job change."}),(0,r.jsx)(c.$,{onClick:()=>A(p.A.appMonitor),children:"Explore Monitoring Dashboard"})]}),"over"===i&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("h2",{children:"\uD83C\uDF89 Good News! Your Plan Now Includes Weekly Job Change Tracking."}),(0,r.jsxs)("p",{children:["Your ",(0,r.jsxs)("strong",{className:"capitalize",children:[(0,x.qG)(null==a?void 0:a.subscriptionPlan)," Plan"]})," now includes a ",(0,r.jsxs)("strong",{children:["Monitoring Allowance of ",v," contacts."]})]}),(0,r.jsxs)("p",{children:["To give you immediate value, we've automatically started monitoring your ",(0,r.jsxs)("strong",{children:[v," most recent contacts"]})," to check them weekly for job changes."]}),(0,r.jsxs)("p",{children:["You currently have ",(0,r.jsxs)("strong",{children:[l-v," unmonitored contacts."]})," To monitor your entire list and ensure no opportunity is missed, you can upgrade your plan at any time."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("strong",{children:"Note:"})," Only contacts with email addresses are monitored."]}),(0,r.jsx)("p",{children:"You'll get an alert when a contact becomes outdated."}),(0,r.jsx)(c.$,{onClick:()=>A(p.A.appMonitor),children:"Explore Monitoring Dashboard"})]})]})})};function f(e){let{children:t,title:a,rightActions:c,editableTitle:d,onTitleChange:p,layoutId:m,titleIcon:u,titleRightElement:h,className:x}=e,{state:g}=(0,o.cL)(),[y,f]=(0,s.useState)(!1),[j,v]=(0,s.useState)(a);(0,s.useEffect)(()=>{v(a),f(!1)},[a,m]);let w=(0,s.useCallback)(()=>{d&&f(!0)},[d]),N=(0,s.useCallback)(()=>{f(!1),"string"==typeof j&&a!==j&&j.trim()&&p&&p(j.trim())},[j,a,p]),A=(0,s.useCallback)(e=>{"enter"===e.key.toLocaleLowerCase()&&N()},[N]),k=(0,s.useCallback)(e=>{v(e.target.value)},[]);return(0,r.jsxs)("div",{style:{overflowY:"unset"},className:(0,l.cn)("mb-10 mr-5 flex flex-1 flex-col h-[98%] overflow-y-auto rounded-xl bg-white shadow-md","expanded"===g?"ml-5":"",x),children:[(0,r.jsxs)("div",{className:"mt-5 flex items-center px-8",children:[u&&(0,r.jsx)(u,{className:"mr-3 text-xl"}),(0,r.jsx)("button",{onClick:w,children:"string"==typeof j&&y?(0,r.jsx)("input",{className:"ml-[-5px] w-fit min-w-[50px] max-w-md rounded bg-slate-100 px-[5px] text-xl font-medium",style:{width:12*j.length+"px"},value:j,onBlur:N,onKeyDown:A,autoFocus:!0,onChange:k}):"string"==typeof j?(0,r.jsxs)("h1",{className:(0,i.A)("relative text-xl font-medium group max-w-52 overflow-hidden xl:max-w-xl line-clamp-1 text-pretty text-start text-ellipsis"),children:[j,!!d&&(0,r.jsx)("div",{className:"absolute bottom-0 left-0 right-[-15px] top-[-2px] curs
1or-pointer opacity-0 transition-all hover:opacity-100",children:(0,r.jsx)(n.FT6,{className:"absolute right-0 top-0 text-sm text-slate-800"})})]}):j}),h,(0,r.jsx)("span",{className:"flex-1"}),c]}),t,(0,r.jsx)(b,{})]})}},14550:(e,t,a)=>{"use strict";a.d(t,{A:()=>o});var r=a(37876),s=a(14232),n=a(63248),i=a(68522);let o=s.forwardRef((e,t)=>{let{children:a,variant:s,className:o,...l}=e;return(0,r.jsx)(i.A,{ref:t,...l,className:(0,n.A)("animated-underline custom-link inline-flex items-center font-medium","focus:outline-none focus-visible:rounded focus-visible:ring focus-visible:ring-primary-500 focus-visible:ring-offset-2","border-b border-dotted border-dark hover:border-black/0","primary"===s&&["text-primary-500 hover:text-primary-600 active:text-primary-700","disabled:text-primary-200"],o),children:a})})},16763:(e,t,a)=>{"use strict";a.d(t,{A:()=>c});var r=a(37876),s=a(77328),n=a.n(s),i=a(89099),o=a(55504);let l={title:o.A.appname,siteName:o.A.appname,description:"Export leads from LinkedIn with valid emails to build your email lists in just 1 click.",url:"https://scalelist.com",type:"website",robots:"follow, index",image:"https://scalelist.com/images/global/website-preview.png"};function c(e){let t=(0,i.useRouter)(),a={...l,...e};a.title=e.templateTitle?"".concat(e.templateTitle," | ").concat(a.siteName):a.title;let s="/"===t.asPath?"":t.asPath;return(0,r.jsxs)(n(),{children:[(0,r.jsx)("title",{children:a.title}),(0,r.jsx)("meta",{name:"robots",content:a.robots}),(0,r.jsx)("meta",{content:a.description,name:"description"}),(0,r.jsx)("meta",{property:"og:url",content:"".concat(a.url).concat(s)}),(0,r.jsx)("link",{rel:"canonical",href:"".concat(a.url).concat(s)}),(0,r.jsx)("meta",{property:"og:type",content:a.type}),(0,r.jsx)("meta",{property:"og:site_name",content:a.siteName}),(0,r.jsx)("meta",{property:"og:description",content:a.description}),(0,r.jsx)("meta",{property:"og:title",content:a.title}),(0,r.jsx)("meta",{name:"image",property:"og:image",content:a.image}),(0,r.jsx)("meta",{name:"twitter:card",content:"summary_large_image"}),(0,r.jsx)("meta",{name:"twitter:site",content:"@scalelist"}),(0,r.jsx)("meta",{name:"twitter:title",content:a.title}),(0,r.jsx)("meta",{name:"twitter:description",content:a.description}),(0,r.jsx)("meta",{name:"twitter:image",content:a.image}),a.date&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("meta",{property:"article:published_time",content:a.date}),(0,r.jsx)("meta",{name:"publish_date",property:"og:publish_date",content:a.date})]}),d.map(e=>(0,r.jsx)("link",{...e},e.href)),(0,r.jsx)("meta",{name:"msapplication-TileColor",content:"#ffffff"}),(0,r.jsx)("meta",{name:"msapplication-config",content:"/favicon/browserconfig.xml"}),(0,r.jsx)("meta",{name:"theme-color",content:"#ffffff"})]})}let d=[{rel:"apple-touch-icon",sizes:"180x180",href:"/favicon/apple-touch-icon.png"},{rel:"icon",type:"image/png",sizes:"32x32",href:"/favicon/favicon-32x32.png"},{rel:"icon",type:"image/png",sizes:"16x16",href:"/favicon/favicon-16x16.png"},{rel:"manifest",href:"/favicon/site.webmanifest"},{rel:"mask-icon",href:"/favicon/safari-pinned-tab.svg",color:"#00e887"},{rel:"shortcut icon",href:"/favicon/favicon.ico"}]},19968:(e,t,a)=>{"use strict";a.d(t,{A:()=>o,b:()=>l});var r=a(37876),s=a(14232),n=a(63248),i=a(68522);let o=s.forwardRef((e,t)=>{let{className:a,children:s,variant:o="primary",...l}=e;return(0,r.jsx)(i.A,{ref:t,...l,className:(0,n.A)("inline-flex items-center","focus:outline-none focus-visible:rounded focus-visible:ring focus-visible:ring-primary-500 focus-visible:ring-offset-2","font-medium","primary"===o&&["text-primary-500 hover:text-primary-600 active:text-primary-700","disabled:text-primary-200"],"basic"===o&&["text-black hover:text-gray-600 active:text-gray-800","disabled:text-gray-300"],a),children:s})}),l=s.forwardRef((e,t)=>{let{className:a,children:s,variant:o="primary",href:l,...c}=e,d=l.startsWith("http")?l:"https://".concat(l);return(0,r.jsx)(i.A,{ref:t,...c,href:d,className:(0,n.A)("inline-flex items-center","focus:outline-none focus-visible:rounded focus-visible:ring focus-visible:ring-primary-500 focus-visible:ring-offset-2","font-medium","primary"===o&&["text-primary-500 hover:text-primary-600 active:text-primary-700","disabled:text-primary-200"],"basic"===o&&["text-black hover:text-gray-600 active:text-gray-800","disabled:text-gray-300"],a),children:s})})},20749:(e,t,a)=>{"use strict";a.d(t,{A:()=>n});var r=a(37876);a(14232);var s=a(63248);function n(e){let{className:t,...a}=e;return(0,r.jsx)("span",{className:(0,s.A)("inline-block animate-shimmer bg-[#f6f7f8]",t),style:{backgroundImage:"linear-gradient(to right, #f6f7f8 0%, #edeef1 20%, #f6f7f8 40%, #f6f7f8 100%)",backgroundSize:"700px 100%",backgroundRepeat:"no-repeat"},...a})}},46392:(e,t,a)=>{"use strict";a.d(t,{$2:()=>r,dE:()=>o,sq:()=>n,t5:()=>i});let r=e=>{let t=e,a=Math.floor(t/60),r=Math.floor(a/60);return(t%=60,a=(t>=30?a+1:a)%60,(r%=24)||a)?r?"".concat(r," h ").concat(a.toString().padStart(2,"0")," mins"):"".concat(Math.ceil(a)," mins"):"".concat(Math.ceil(t)," secs")},s=e=>["January","February","March","April","May","June","July","August","September","October","November","December"][e],n=e=>{let t=new Date(e);return"".concat(s(t.getMonth()).substring(0,3)," ").concat(t.getDate(),", ").concat(t.getFullYear())},i=e=>{let t=new Date(e);return"".concat(t.getHours().toString().padStart(2,"0"),"h").concat(t.getMinutes().toString().padStart(2,"0"))},o=e=>"".concat(e.getFullYear()).concat((e.getMonth()+1).toString().padStart(2,"0")).concat(e.getDate().toString().padStart(2,"0")).concat(e.getHours().toString().padStart(2,"0")).concat(e.getMinutes().toString().padStart(2,"0")).concat(e.getSeconds().toString().padStart(2,"0"))},53292:(e,t,a)=>{"use strict";a.d(t,{o:()=>s});let r=a(23729).Ay.create({prefixUrl:"/api/monitor",credentials:"include",timeout:!1}),s={importContacts:async(e,t)=>{try{return(await r.post("import",{json:{listName:e,contacts:t}})).json()}catch(e){throw console.error("Error importing contacts:",e),e}},getContacts:async e=>{let{listId:t}=e;try{return(await r.get("list-view/contacts/".concat(t))).json()}catch(e){throw console.error("Error importing contacts:",e),e}},getListStats:async e=>{try{return(await r.get("list-view/stats/".concat(e))).json()}catch(e){throw console.error("Error importing contacts:",e),e}},getDashboardStats:async()=>{try{return(await r.get("dashboard/stats")).json()}catch(e){throw console.error("Error importing contacts:",e),e}},getDashboardLists:async()=>{try{return(await r.get("dashboard/lists")).json()}catch(e){throw console.error("Error importing contacts:",e),e}},getDashboardLeads:async()=>{try{return(await r.get("dashboard/leads")).json()}catch(e){throw console.error("Error importing contacts:",e),e}},updateListTitle:async e=>{let{listId:t,title:a}=e;try{return(await r.post("list-view/update-title",{json:{listId:t,title:a}})).json()}catch(e){throw console.error("Error updating list title:",e),e}},cancelImportContact:async e=>{let{listId:t}=e;try{return(await r.post("list-view/cancel",{json:{listId:t}})).json()}catch(e){throw console.error("Error importing contacts:",e),e}},markMonitorWelcomePromptSeen:async()=>{try{return(await r.post("mark-monitor-welcome-prompt-seen")).json()}catch(e){throw console.error("Error importing contacts:",e),e}},reactivationStart:async()=>{try{return(await r.post("import/reactivation-start")).json()}catch(e){throw console.error("Error importing contacts:",e),e}},userLeadsCount:async()=>{try{return(await r.get("user-existing-leads-count")).json()}catch(e){throw console.error("Error importing contacts:",e),e}},monitorContactsFromScalelistList:async e=>{let{listId:t}=e;try{return(await r.post("import/export-scalelist-list-to-monitored-list",{json:{listId:t}})).json()}catch(e){throw console.error("Error importing contacts:",e),e}},startMonitoring:async e=>{let{listId:t}=e;try{return(await r.post("list-view/start",{json:{listId:t}})).json()}catch(e){throw console.error("Error importing contacts:",e),e}},stopMonitoring:async e=>{let{listId:t}=e;try{return(await r.post("list-view/stop",{json:{listId:t}})).json()}catch(e){throw console.error("Error importing contacts:",e),e}}}},60452:(e,t,a)=>{"use strict";a.d(t,{C8:()=>n,Y_:()=>d,aS:()=>s,b2:()=>r,g2:()=>o,go:()=>i,jH:()=>c,t4:()=>l});let r=async e=>{await fetch("/api/users/tmp-add-me-credits?amount="+e,{method:"GET",headers:{Accept:"application/json","Content-Type":"application/json"}})},s=async e=>{await fetch("/api/users/update-daily-limit-linkedin-extraction?val="+e,{method:"GET",headers:{Accept:"application/json","Content-Type":"application/json"}})},n=async e=>{await fetch("/api/users/first-time-lead-exported",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(e)})},i=async e=>{await fetch("/api/users/finish-signup",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(e)})},o=async()=>{await fetch("/api/users/ensure-free-trial-has-started",{method:"GET",headers:{Accept:"application/json","Content-Type":"application/json"}})},l=async()=>{let e=await fetch("/api/users/create-portal-link",{method:"GET",headers:{Accept:"application/json","Content-Type":"application/json"}});if(200!==e.status)throw Error((await e.json()).error||"createCustomerPortalLinkApi http ".concat(e.status," error"));return await e.json()};async function c(e){let t=await fetch("/api/users/change-user-profile-image",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({dataUrl:e})});if(200!==t.status)throw Error("Request failed with status code ".concat(t.statusText));return await t.json()}async function d(){let e=await fetch("/api/users/toggle-notification",{method:"GET",headers:{Accept:"application/json","Content-Type":"application/json"}});if(200!==e.status)throw Error("Request failed with status code ".concat(e.statusText));return await e.json()}},68522:(e,t,a)=>{"use strict";a.d(t,{A:()=>l});var r=a(37876),s=a(48230),n=a.n(s),i=a(14232),o=a(63248);let l=i.forwardRef((e,t)=>
1{let{children:a,href:s,openNewTab:i,className:l,nextLinkProps:c,...d}=e;return(void 0!==i?i:s&&!s.startsWith("/")&&!s.startsWith("#"))?(0,r.jsx)("a",{ref:t,target:"_blank",rel:"noopener noreferrer",href:s,...d,className:(0,o.A)("cursor-newtab",l),children:a}):(0,r.jsx)(n(),{href:s,ref:t,className:l,...d,...c,children:a})})},70889:(e,t,a)=>{"use strict";a.d(t,{D3:()=>r,GI:()=>i,Ug:()=>n,W2:()=>s});let r=async(e,t,a)=>await fetch("/api/payments/update-plan",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({plan:e,billingInterval:t,cancelReason:a})}).then(e=>e.json()),s=async e=>{await fetch("/api/payments/cancel-plan",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({cancelReason:e})})},n=async()=>(await fetch("/api/payments/invoices",{method:"GET",headers:{Accept:"application/json","Content-Type":"application/json"}}).then(e=>e.json())).results,i=async(e,t)=>fetch("/api/payments/create-stripe-checkout-session",{method:"POST",body:JSON.stringify({priceId:e,coupon:t}),headers:{Accept:"application/json","Content-Type":"application/json"}}).then(async e=>{if(e.ok)return e.json();throw Error((await e.json()).error||"Failed to create checkout session")})},82102:(e,t,a)=>{"use strict";a.d(t,{A:()=>o});var r=a(37876),s=a(14232),n=a(46318),i=a(63248);let o=s.forwardRef((e,t)=>{let{children:a,className:s,disabled:o,isLoading:l,variant:c="primary",size:d="base",isDarkBg:p=!1,leftIcon:m,rightIcon:u,leftIconClassName:h,rightIconClassName:x,...g}=e,y=l||o;return(0,r.jsxs)("button",{ref:t,type:"button",disabled:y,className:(0,i.A)("inline-flex items-center rounded font-medium disabled:opacity-60","focus:outline-none focus-visible:ring focus-visible:ring-primary-500","shadow-sm","transition-colors duration-75",["base"===d&&["px-3 py-1.5","text-sm md:text-base"],"sm"===d&&["px-2 py-1","text-xs md:text-sm"]],["primary"===c&&["bg-primary-500 text-white","border border-primary-600","hover:bg-primary-600 hover:text-white","active:bg-primary-700","disabled:bg-primary-700"],"outline"===c&&["text-primary-500","border border-primary-500","hover:bg-slate-100 active:bg-slate-200 disabled:bg-slate-200",p&&"hover:bg-gray-900 active:bg-gray-800 disabled:bg-gray-800"],"ghost"===c&&["text-primary-500","shadow-none","hover:bg-primary-50 active:bg-primary-100 disabled:bg-primary-100",p&&"hover:bg-gray-900 active:bg-gray-800 disabled:bg-gray-800"],"light"===c&&["bg-white text-gray-700","border border-gray-300","hover:bg-gray-100 hover:text-dark","active:bg-white/80 disabled:bg-gray-200"],"dark"===c&&["bg-gray-900 text-white","border border-gray-600","hover:bg-gray-800 active:bg-gray-700 disabled:bg-gray-700"]],"disabled:cursor-not-allowed",l&&"relative text-transparent transition-none hover:text-transparent disabled:cursor-wait",s),...g,children:[l&&(0,r.jsx)("div",{className:(0,i.A)("absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2",{"text-white":["primary","dark"].includes(c),"text-black":["light"].includes(c),"text-primary-500":["outline","ghost"].includes(c)}),children:(0,r.jsx)(n.kiM,{className:"animate-spin"})}),m&&(0,r.jsx)("div",{className:(0,i.A)(["base"===d&&"mr-1","sm"===d&&"mr-1.5"]),children:(0,r.jsx)(m,{className:(0,i.A)(["base"===d&&"md:text-md text-md","sm"===d&&"md:text-md text-sm"],h)})}),a,u&&(0,r.jsx)("div",{className:(0,i.A)(["base"===d&&"ml-1","sm"===d&&"ml-1.5"]),children:(0,r.jsx)(u,{className:(0,i.A)(["base"===d&&"text-md md:text-md","sm"===d&&"md:text-md text-sm"],x)})})]})})},83984:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>P});var r=a(37876),s=a(14232),n=a(11123),i=a(75861),o=a(63248),l=a(7406),c=a(98294),d=a(19968),p=a(14550),m=a(16763),u=a(84081),h=a(20749);function x(e){let{cols:t,values:a,onSelect:n,selected:i,isLoading:l,compacted:c,disableSort:d}=e,[p,m]=(0,s.useState)(),[x,g]=(0,s.useState)(a);(0,s.useEffect)(()=>{g(a)},[a]);let y=(0,s.useCallback)(e=>()=>{n&&n((null==i?void 0:i.includes(e))?i.filter(t=>t!==e):[...i||[],e])},[i,n]),b=(0,s.useCallback)(()=>{n&&n((null==i?void 0:i.length)===x.length?[]:x.map(e=>e.id))},[n,i,x]),f=(0,s.useCallback)(e=>()=>{let t=(null==p?void 0:p.colIdx)!==e?"asc":(null==p?void 0:p.order)==="asc"?"desc":"asc",a=[...x||[]].sort((t,a)=>{let r=t.cols[e].sortWeight||t.cols[e].value,s=a.cols[e].sortWeight||a.cols[e].value;return r&&!s?1:!r&&s?-1:r||s?r&&s&&r>s?1:r&&s&&r<s?-1:0:0});
1"desc"===t&&a.reverse(),g(a),m({colIdx:e,order:t})},[p,x]);return(0,r.jsx)("div",{className:"relative",children:(0,r.jsxs)("table",{className:"w-full border-t text-left text-sm text-gray-900",children:[(0,r.jsx)("thead",{className:"sticky top-0 z-10 bg-white",children:(0,r.jsxs)("tr",{className:"outline outline-1 outline-gray-200",children:[!!n&&(0,r.jsx)("th",{scope:"col",className:"pl-3",children:(0,r.jsx)("div",{className:"flex items-center",children:(0,r.jsx)("input",{type:"checkbox",checked:(null==i?void 0:i.length)===x.length,onChange:b,className:"h-4 w-4 rounded border-gray-300 bg-gray-100 text-blue-600 focus:ring-0 focus:ring-offset-0"})})}),t.map((e,t)=>(0,r.jsx)("th",{scope:"col",className:"".concat(t%2==0?"outline outline-1 outline-gray-200":""," font-bold"),children:(0,r.jsxs)("button",{onClick:f(t),disabled:d,className:(0,o.A)("flex items-center px-6 py-3",c&&"px-[5px] py-[3px]"),children:[e.label,!0!==d&&(0,r.jsxs)("div",{className:"ml-1 flex flex-col text-xs text-slate-300",children:[(0,r.jsx)(u.XhJ,{className:(0,o.A)("mb-[-5.5px]",(null==p?void 0:p.colIdx)===t&&(null==p?void 0:p.order)==="desc"&&"text-slate-700")}),(0,r.jsx)(u.GOR,{className:(0,o.A)("mt-[-5.5px]",(null==p?void 0:p.colIdx)===t&&(null==p?void 0:p.order)==="asc"&&"text-slate-700")})]})]})},t))]})}),(0,r.jsxs)("tbody",{children:[l&&(0,r.jsxs)("tr",{className:"border-b",children:[(0,r.jsx)("td",{className:(0,o.A)("px-6 py-3",c&&"px-[5px] py-[3px]"),children:(0,r.jsx)(h.A,{className:"block h-6 rounded"})}),(0,r.jsx)("td",{className:(0,o.A)("px-6 py-3",c&&"px-[5px] py-[3px]"),children:(0,r.jsx)(h.A,{className:"block h-6 rounded"})}),(0,r.jsx)("td",{className:(0,o.A)("px-6 py-3",c&&"px-[5px] py-[3px]"),children:(0,r.jsx)(h.A,{className:"block h-6 rounded"})}),(0,r.jsx)("td",{className:(0,o.A)("px-6 py-3",c&&"px-[5px] py-[3px]"),children:(0,r.jsx)(h.A,{className:"block h-6 rounded"})}),(0,r.jsx)("td",{className:(0,o.A)("px-6 py-3",c&&"px-[5px] py-[3px]"),children:(0,r.jsx)(h.A,{className:"block h-6 rounded"})}),(0,r.jsx)("td",{className:(0,o.A)("px-6 py-3",c&&"px-[5px] py-[3px]"),children:(0,r.jsx)(h.A,{className:"block h-6 rounded"})}),(0,r.jsx)("td",{className:(0,o.A)("px-6 py-3",c&&"px-[5px] py-[3px]"),children:(0,r.jsx)(h.A,{className:"block h-6 rounded"})})]}),x.map((e,t)=>(0,r.jsxs)("tr",{className:"border-b ".concat(t%2==1?"bg-slate-50":""),children:[!!n&&(0,r.jsx)("td",{className:"w-4 pl-3",children:(0,r.jsx)("div",{className:"flex items-center",children:(0,r.jsx)("input",{type:"checkbox",checked:null==i?void 0:i.includes(e.id),onChange:y(e.id),className:"h-4 w-4 rounded border-gray-300 bg-gray-100 text-blue-600 focus:ring-0 focus:ring-offset-0"})})}),e.cols.map((e,a)=>(0,r.jsx)("td",{className:(0,o.A)("px-6 py-3 font-normal",c&&"px-[5px] py-[3px]","number"==typeof e.label?"text-center":""),children:e.label},t+"_"+a))]},t)),l&&(0,r.jsxs)("tr",{className:"border-b",children:[(0,r.jsx)("td",{className:(0,o.A)("px-6 py-3",c&&"px-[5px] py-[3px]"),children:(0,r.jsx)(h.A,{className:"block h-6 rounded"})}),(0,r.jsx)("td",{className:(0,o.A)("px-6 py-3",c&&"px-[5px] py-[3px]"),children:(0,r.jsx)(h.A,{className:"block h-6 rounded"})}),(0,r.jsx)("td",{className:(0,o.A)("px-6 py-3",c&&"px-[5px] py-[3px]"),children:(0,r.jsx)(h.A,{className:"block h-6 rounded"})}),(0,r.jsx)("td",{className:(0,o.A)("px-6 py-3",c&&"px-[5px] py-[3px]"),children:(0,r.jsx)(h.A,{className:"block h-6 rounded"})}),(0,r.jsx)("td",{className:(0,o.A)("px-6 py-3",c&&"px-[5px] py-[3px]"),children:(0,r.jsx)(h.A,{className:"block h-6 rounded"})}),(0,r.jsx)("td",{className:(0,o.A)("px-6 py-3",c&&"px-[5px] py-[3px]"),children:(0,r.jsx)(h.A,{className:"block h-6 rounded"})}),(0,r.jsx)("td",{className:(0,o.A)("px-6 py-3",c&&"px-[5px] py-[3px]"),children:(0,r.jsx)(h.A,{className:"block h-6 rounded"})})]})]})]})})}var g=a(82102),y=a(55504),b=a(23820),f=a(60414),j=a(70889),v=a(60452),w=a(1403),N=a(46392),A=a(29091),k=a(70751),C=a(11052);function S(e,t){let a=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return a<0?-1:a>0?1:a}var E=a(68283),M=a(83363),T=a(65870);function P(){var e;
1let[t,a]=(0,s.useState)(!1),{authedUser:u}=(0,i.A)(),[h,P]=(0,s.useState)({isLoading:!0,list:[]}),D=(0,s.useMemo)(()=>u&&u.subscriptionPlan&&(0,w.r9)(u.subscriptionPlan),[u]),I=(0,s.useCallback)(async()=>{a(!0);try{let e=await (0,v.t4)();window.location.href=e.url}catch(e){}finally{a(!1)}},[]);(0,s.useEffect)(()=>{(0,j.Ug)().then(e=>{P({list:e,isLoading:!1})})},[]);let L=(0,s.useMemo)(()=>(function(e,t,a){let[r,s]=(0,k.x)(void 0,e,t),n=S(r,s),i=Math.abs((0,C.m)(r,s));r.setDate(r.getDate()-n*i);let o=Number(S(r,s)===-n),l=n*(i-o);return 0===l?0:l})(new Date(null==u?void 0:u.creditRolloverMonthlyCycleAt),new Date),[u]);return(0,r.jsxs)(l.A,{title:"Billing",children:[(0,r.jsx)(m.A,{templateTitle:"Billing"}),(0,r.jsx)("main",{children:(0,r.jsxs)("section",{className:"mt-5 border-t px-10 pt-8",children:[(0,r.jsx)("h2",{className:"text-lg font-medium",children:"Subscription"}),(0,r.jsx)("p",{className:"pb-2 text-sm text-slate-500",children:(null==u?void 0:u.subscriptionPlan)?(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)("div",{children:[(0,r.jsxs)("p",{children:["You have currently subscribed to the"," ",(0,r.jsxs)("b",{children:[" ",(0,M.qG)(u.subscriptionPlan)," plan"]}),(null==u?void 0:u.subscriptionBillingInterval)?" (billed ".concat(u.subscriptionBillingInterval,"ly), "):"",u.subscriptionPlan===f.A.enterprise?(0,r.jsxs)(r.Fragment,{children:[". If you need help, please contact your account manager"," ",y.A.defaultAccountManagerName," at"," ",(0,r.jsx)(p.A,{target:"_blank",href:"mailto:".concat(y.A.defaultAccountManagerEmail),children:y.A.defaultAccountManagerEmail})]}):(0,r.jsxs)(r.Fragment,{children:["with"," ",(0,r.jsxs)("b",{children:[(0,A.qP)(null!=(e=null==D?void 0:D.package.maxCredits)?e:0).replace(" ",",")," "]})," ","credits per month."]}),"."]}),u.pendingSubscriptionPlan&&(0,r.jsxs)("p",{className:"mt-1 text-amber-600",children:["Starting from"," ",(0,r.jsx)("b",{children:(0,T.Yq)(u.subscriptionNextMonthlyCycleAt||0)}),", your plan will change to"," ",(0,r.jsx)("b",{children:(0,M.qG)(u.pendingSubscriptionPlan)}),". Your current plan remains active until then."]})]})}):u&&u.creditRolloverMonthlyCycleAt&&u.lastCancelledSubscriptionPlan?(0,r.jsxs)(r.Fragment,{children:["Your",(0,r.jsxs)("b",{children:[" ",(0,M.qG)(u.lastCancelledSubscriptionPlan)," plan"," "]}),"ends on"," ",(0,r.jsxs)("b",{children:[(0,E.GP)(new Date(null==u?void 0:u.creditRolloverMonthlyCycleAt),"MMM dd"),","]})," ","in"," ",(0,r.jsxs)("b",{children:[L," ",1===L?"day":"days"]})]}):"You have no active subscription."}),(0,r.jsxs)("div",{className:"flex gap-x-4",children:[(null==u?void 0:u.subscriptionPlan)&&(0,r.jsx)(c.A,{size:"sm",variant:"light",href:b.A.paymentRetention,children:"Cancel"}),(null==u?void 0:u.subscriptionPlan)!==f.A.enterprise&&(0,r.jsx)("div",{className:"space-x-2",children:(0,r.jsx)(c.A,{href:b.A.paymentPlans,variant:"primary",size:"sm",rightIcon:n.L2n,children:(null==u?void 0:u.subscriptionPlan)||(null==u?void 0:u.creditRolloverMonthlyCycleAt)&&u.lastCancelledSubscriptionPlan?"Change plan":"View our plans"})})]}),(null==u?void 0:u.subscriptionStripeId)&&(0,r.jsxs)("div",{className:"mt-6 border-t pt-5",children:[(0,r.jsx)("h2",{className:"text-lg font-medium",children:"Your Billing Information"}),(0,r.jsx)(g.A,{className:"mt-2",isLoading:t,onClick:I,variant:"light",size:"sm",rightIcon:n.L2n,children:"Edit information"})]}),(0,r.jsxs)("div",{className:"mt-6 border-t py-5",children:[(0,r.jsx)("h2",{className:"text-lg font-medium",children:"Invoices"}),(0,r.jsx)("div",{className:(0,o.A)("mt-2 overflow-hidden rounded",!!h.isLoading||!!h.list.length&&"border-l border-r"),children:h.isLoading||h.list.length?(0,r.jsx)(x,{cols:[{label:"Created at"},{label:"Amount"},{label:"PDF"}],values:h.list.map(e=>({id:e._id,cols:[{label:(0,N.sq)(e.created),value:e.created},{label:(0,A.Ru)(e.priceCurrency)+(0,A.Lq)(e.priceAmount)},{label:(0,r.jsx)(d.A,{href:e.fileUrl,children:"Click to download"})}]})),compacted:!0,isLoading:h.isLoading}):(0,r.jsx)("p",{className:"text-sm text-slate-500",children:"No invoices found."})})]})]})})]})}},89708:(e,t,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/app/billing",function(){return a(83984)}])},98294:(e,t,a)=>{"use strict";a.d(t,{A:()=>
1o});var r=a(37876),s=a(14232),n=a(63248),i=a(68522);let o=s.forwardRef((e,t)=>{let{children:a,className:s,variant:o="primary",size:l="base",isDarkBg:c=!1,leftIcon:d,rightIcon:p,leftIconClassName:m,rightIconClassName:u,...h}=e;return(0,r.jsxs)(i.A,{ref:t,...h,className:(0,n.A)("inline-flex items-center rounded font-medium","focus:outline-none focus-visible:ring focus-visible:ring-primary-500","shadow-sm","transition-colors duration-75",["base"===l&&["px-3 py-1.5","text-sm md:text-base"],"sm"===l&&["px-2 py-1","text-xs md:text-sm"]],["primary"===o&&["bg-primary-500 text-white","border border-primary-600","hover:bg-primary-600 hover:text-white","active:bg-primary-700","disabled:bg-primary-700"],"outline"===o&&["text-primary-500","border border-primary-500","hover:bg-primary-50 active:bg-primary-100 disabled:bg-primary-100",c&&"hover:bg-gray-900 active:bg-gray-800 disabled:bg-gray-800"],"ghost"===o&&["text-primary-500","shadow-none","hover:bg-primary-50 active:bg-primary-100 disabled:bg-primary-100",c&&"hover:bg-gray-900 active:bg-gray-800 disabled:bg-gray-800"],"light"===o&&["bg-white text-gray-700","border border-gray-300","hover:bg-gray-100 hover:text-dark","active:bg-white/80 disabled:bg-gray-200"],"dark"===o&&["bg-gray-900 text-white","border border-gray-600","hover:bg-gray-800 active:bg-gray-700 disabled:bg-gray-700"]],"disabled:cursor-not-allowed",s),children:[d&&(0,r.jsx)("div",{className:(0,n.A)(["base"===l&&"mr-1","sm"===l&&"mr-1.5"]),children:(0,r.jsx)(d,{className:(0,n.A)(["base"===l&&"md:text-md text-md","sm"===l&&"md:text-md text-sm"],m)})}),a,p&&(0,r.jsx)("div",{className:(0,n.A)(["base"===l&&"ml-1","sm"===l&&"ml-1.5"]),children:(0,r.jsx)(p,{className:(0,n.A)(["base"===l&&"text-md md:text-md","sm"===l&&"md:text-md text-sm"],u)})})]})})}},e=>{var t=t=>e(e.s=t);e.O(0,[3729,1265,8283,636,6593,8792],()=>t(89708)),_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.