1"use strict";(self.webpackChunkinsta_automate=self.webpackChunkinsta_automate||[]).push([[3193,7447],{61247:(e,t,o)=>{o.d(t,{A:()=>g});var n=o(89379),a=o(65043),i=o(85578),r=o(13382),l=o(73216),s=o(51238),d=o(81355),c=o(98796),m=o(89003),p=o(70579);const u=['Create an automation that collects email from whoever replies "join" to my stories, tags them and sends it to my Kit integration',"Make Claude reply to all my incoming DMs \u2014 qualify leads and collect their email",'When someone comments "price" on my reel, DM them the price list and collect their WhatsApp number',"Collect name and email, wait 20 seconds, then send a thank-you message using their name","When someone replies to my story, send a discount code and tag them story-lead",'DM my course link to anyone who comments "learn", and if they don\'t reply in 30 minutes send a reminder'];function g(e){let{style:t,platform:o="instagram"}=e;const g=(0,l.Zp)(),[h,y]=(0,a.useState)(""),[f,x]=(0,a.useState)(0);(0,a.useEffect)((()=>{const e=setInterval((()=>x((e=>(e+1)%u.length))),4500);return()=>clearInterval(e)}),[]);const v=()=>{const e=h.trim();e&&((0,c.A)("flow_editor")?g("/flow-v2/editor?id=".concat((0,s.A)(),"&ai_prompt=").concat(encodeURIComponent(e),"&platform=").concat(o)):(0,m.A)())};return(0,p.jsxs)("div",{style:(0,n.A)({display:"flex",alignItems:"center",gap:10,border:"1px solid transparent",borderRadius:14,padding:"10px 12px",backgroundImage:"linear-gradient(var(--idm-surface, #fff), var(--idm-surface, #fff)), linear-gradient(45deg, #f09433, #dc2743, #bc1888, #4f5bd5)",backgroundOrigin:"border-box",backgroundClip:"padding-box, border-box",boxShadow:"0 2px 10px rgba(79, 91, 213, 0.08)"},t),children:[(0,p.jsx)("span",{style:{width:34,height:34,borderRadius:10,flexShrink:0,background:"#eef2ff",color:"#6366f1",display:"flex",alignItems:"center",justifyContent:"center",fontSize:17},children:(0,p.jsx)(d.zR6,{})}),(0,p.jsx)(i.A.TextArea,{autoSize:{minRows:1,maxRows:3},bordered:!1,value:h,onChange:e=>y(e.target.value),onPressEnter:e=>{e.shiftKey||(e.preventDefault(),v())},placeholder:u[f],style:{fontSize:14,padding:0}}),(0,p.jsx)(r.Ay,{type:"primary",onClick:v,disabled:!h.trim(),style:{flexShrink:0,fontWeight:500},children:"Build with AI"})]})}},51682:(e,t,o)=>{o.d(t,{A:()=>g});var n=o(65043),a=o(31023),i=o(13382),r=o(63942),l=o(76399),s=o(95859),d=o(70579);const{Text:c}=a.A,m="2026-05-28",p="May 28, 2026";function u(){const e=new Date;e.setHours(0,0,0,0);const t=new Date(m);t.setHours(0,0,0,0);const o=Math.round((e-t)/864e5);return 0===o?"Today":1===o?"Yesterday":o<=7?"".concat(o," days ago"):p}const g=e=>{let{setShowPlanModal:t,inline:o}=e;const[a,g]=(0,n.useState)(!1),h=new Date;h.setHours(0,0,0,0);const y=new Date(m);y.setHours(0,0,0,0);const f=Math.round((h-y)/864e5);if(f<0||f>7)return null;const x=(0,d.jsxs)(i.Ay,{type:"text",icon:(0,d.jsx)(s.A,{}),onClick:()=>g(!0),style:{color:"#7c3aed",fontWeight:500,fontSize:13},children:["What's New - ",u()]});return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("div",{style:{display:"flex",justifyContent:"flex-end",marginBottom:12},children:x}),(0,d.jsx)(r.A,{open:a,onCancel:()=>g(!1),footer:null,title:(0,d.jsxs)("span",{children:[(0,d.jsx)(s.A,{style:{marginRight:8,color:"#7c3aed"}}),"What's New - ",p]}),width:580,children:(0,d.jsxs)("div",{style:{padding:"8px 0"},children:[(0,d.jsx)("div",{style:{marginBottom:20},children:(0,d.jsx)(c,{strong:!0,style:{fontSize:15},children:"New Features"})}),(0,d.jsxs)("div",{style:{marginBottom:16,padding:"12px 14px",background:"#fffbe6",borderRadius:8,border:"1px solid #ffe58f"},children:[(0,d.jsx)("div",{style:{fontWeight:600,fontSize:13,marginBottom:4},children:"1. Native Mailchimp, Kit & Klaviyo integrations"}),(0,d.jsx)("p",{style:{margin:0,fontSize:12,color:"#555",lineHeight:1.6},children:"Paste your API key once in Account Settings \u2192 Integrations, then toggle the integration on any flow. Leads sync automatically \u2014 no Make.com or Zapier in the middle."}),(0,d.jsx)(l.A,{color:"gold",style:{marginTop:8,fontSize:11},children:"Settings \u2192 Integrations"})]}),(0,d.jsxs)("div",{style:{marginBottom:16,padding:"12px 14px",background:"#f0f5ff",borderRadius:8,border:"1px solid #d6e4ff"},children:[(0,d.jsx)("div",{style:{fontWeight:600,fontSize:13,marginBottom:4},children:"2. Choose when to push to integrations"}),(0,d.jsxs)("p",{style:{margin:0,fontSize:12,color:"#555",lineHeight:1.6},children:['New "When to push" control in the flow editor\'s Integrations modal. Pick ',(0,d.jsx)("b",{children:"On flow completion"})," for one clean push per lead, or ",(0,d.jsx)("b",{children:"Each answer"})," for real-time updates as the conversation progresses."]}),(0,d.jsx)(l.A,{color:"blue",style:{marginTop:8,fontSize:11},children:"Flow Editor \u2192 Integrations"})]}),(0,d.jsxs)("div",{style:{marginBottom:16,padding:"12px 14px",background:"#f5f0ff",borderRadius:8,border:"1px solid #e8daff"},children:[(0,d.jsx)("div",{style:{fontWeight:600,fontSize:13,marginBottom:4},children:"3. AI Reply now pushes to your integrations"}),(0,d.jsx)("p",{style:{margin:0,fontSize:12,color:"#555",lineHeight:1.6},children:"When the AI Reply node captures a new email, name, or phone from a conversation, the lead is pushed to Mailchimp / Kit / Klaviyo immediately. AI flows auto-lock to per-answer mode (since AI conversations don't have a completion event)."}),(0,d.jsx)(l.A,{color:"purple",style:{marginTop:8,fontSize:11},children:"Flow Editor \u2192 AI Reply Node"})]}),(0,d.jsxs)("div",{style:{marginBottom:16,padding:"12px 14px",background:"#e6f7ff",borderRadius:8,border:"1px solid #b7e4ff"},children:[(0,d.jsx)("div",{style:{fontWeight:600,fontSize:13,marginBottom:4},children:"4. DeepSeek added as an AI provider"}),(0,d.jsxs)("p",{style:{margin:0,fontSize:12,color:"#555",lineHeight:1.6},children:["Connect your DeepSeek API key in Account Settings \u2192 AI Configuration. Pick ",(0,d.jsx)("b",{children:"V4 Flash"})," (fast, dual-mode) or ",(0,d.jsx)("b",{children:"V4 Pro"})," (heavier reasoning) in the AI Reply node. Cheap, fast, and OpenAI-compatible."]}),(0,d.jsx)(l.A,{color:"cyan",style:{marginTop:8,fontSize:11},children:"Settings \u2192 AI Configuration"})]}),(0,d.jsx)("div",{style:{marginTop:24,marginBottom:12},children:(0,d.jsx)(c,{strong:!0,style:{fontSize:15},children:"Bug Fixes & Improvements"})}),(0,d.jsx)("div",{style:{padding:"10px 14px",background:"#f9f9f9",borderRadius:8},children:(0,d.jsxs)("ul",{style:{margin:0,paddingLeft:18,fontSize:12,color:"#555",lineHeight:2},children:[(0,d.jsx)("li",{children:"Mailchimp / Kit / Klaviyo now correctly bundle name and phone when email arrives last in the flow"}),(0,d.jsx)("li",{children:"Per-flow integration toggles in the flow editor now actually gate dispatches (previously they were cosmetic)"}),(0,d.jsx)("li",{children:'"Not connected" badges appear in the flow editor\'s Integrations modal when API keys are missing'}),(0,d.jsx)("li",{children:"Account Settings \u2192 Integrations cleaned up \u2014 only n
1atively supported platforms are shown"})]})})]})})]})}},98796:(e,t,o)=>{o.d(t,{A:()=>n});const n=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],a=localStorage.getItem("planid");if("next_post_automation"==e&&console.log("next_post_automation",a),1==t){let t={trigger_words:{free:3,"starter-one":3,"starter-quart":3,"starter-year":3},reply_comments:{free:3,"starter-one":3,"starter-quart":3,"starter-year":3,"legend-two-month":3},button_template:{"starter-quart":1,"starter-one":1,"starter-year":1,"legend-two-month":2},posts_automation:{free:5,"starter-one":25,"starter-quart":25,"starter-year":25},next_post_automation:{free:0,"starter-one":0,"starter-quart":0,"starter-year":0,"legend-two-month":0,566422:3,"000003":15,428337:25}};return n?((t[e]||{})[a]||1e4)<=o?{limit_reached:!1,current_usage:o,limit:(t[e]||{})[a]||"Unlimited"}:{limit_reached:!0,current_usage:o,limit:(t[e]||{})[a]||"Unlimited"}:((t[e]||{})[a]||1e4)<=o}return!!({story_automation:["legend-two-month","566420","566422","566423","428337","428338","000003","0000031","201","2011","202","2021","203","2031","204","2041","trendsetter-pro-monthly","trendsetter-pro-yearly","multi-starter-monthly","multi-starter-yearly","multi-pro-monthly","multi-pro-yearly","multi-ultra-monthly","multi-ultra-yearly"],next_post_automation:["566422","566423","428337","428338","000003","0000031","202","2021","203","2031","204","2041","trendsetter-pro-monthly","trendsetter-pro-yearly","multi-starter-monthly","multi-starter-yearly","multi-pro-monthly","multi-pro-yearly","multi-ultra-monthly","multi-ultra-yearly"],copy_previous_post:["starter-quart","starter-year","legend-two-month","566422","566423","428337","428338","000003","0000031","201","2011","202","2021","203","2031","204","2041","trendsetter-pro-monthly","trendsetter-pro-yearly","multi-starter-monthly","multi-starter-yearly","multi-pro-monthly","multi-pro-yearly","multi-ultra-monthly","multi-ultra-yearly"],all_comment:["legend-two-month","566420","566421","566422","566423","428337","428338","000003","0000031","202","2021","203","2031","204","2041","trendsetter-pro-monthly","trendsetter-pro-yearly","multi-starter-monthly","multi-starter-yearly","multi-pro-monthly","multi-pro-yearly","multi-ultra-monthly","multi-ultra-yearly"],ai_reply_comments:["free","legend-two-month","566420","566421","566422","566423","428337","428338","000003","0000031","202","2021","203","2031","204","2041","trendsetter-pro-monthly","trendsetter-pro-yearly","multi-starter-monthly","multi-starter-yearly","multi-pro-monthly","multi-pro-yearly","multi-ultra-monthly","multi-ultra-yearly"],post_dm:["428337","428338","202","2021","203","2031","204","2041","428337","428338","000003","0000031","202","2021","203","2031","204","2041","trendsetter-pro-monthly","trendsetter-pro-yearly","multi-starter-monthly","multi-starter-yearly","multi-pro-monthly","multi-pro-yearly","multi-ultra-monthly","multi-ultra-yearly"],smart_mode:["428337","428338","000003","0000031","202","2021","203","2031","204","2041","000003","0000031","202","2021","203","2031","204","2041","trendsetter-pro-monthly","trendsetter-pro-yearly","multi-starter-monthly","multi-starter-yearly","multi-pro-monthly","multi-pro-yearly","multi-ultra-monthly","multi-ultra-yearly"],welcome_message:["starter-quart","starter-year","legend-two-month","566420","566421","566422","566423","428337","428338","000003","0000031","201","2011","202","2021","203","2031","204","2041","trendsetter-pro-monthly","trendsetter-pro-yearly","multi-starter-monthly","multi-starter-yearly","multi-pro-monthly","multi-pro-yearly","multi-ultra-monthly","multi-ultra-yearly"],follow_only:["starter-quart","starter-year","legend-two-month","566422","566423","428337","428338","000003","0000031","202","2021","203","2031","204","2041","trendsetter-pro-monthly","trendsetter-pro-yearly","multi-starter-monthly","multi-starter-yearly","multi-pro-monthly","multi-pro-yearly","multi-ultra-monthly","multi-ultra-yearly"],button_template:["starter-quart","starter-year","legend-two-month","566422","566423","428337","428338","000003","0000031","202","2021","203","2031","204","2041","trendsetter-pro-monthly","trendsetter-pro-yearly","multi-starter-monthly","multi-starter-yearly","multi-pro-monthly","multi-pro-yearly","multi-ultra-monthly","multi-ultra-yearly"],reply_delay:["starter-quart","starter-year","legend-two-month","566420","566421","566422","566423","428337","428338","000003","0000031","201","2011","202","2021","203","2031","204","2041","trendsetter-pro-monthly","trendsetter-pro-yearly","multi-starter-monthly","multi-starter-yearly","multi-pro-monthly","multi-pro-yearly","multi-ultra-monthly","multi-ultra-yearly"],flow_editor:["5052712","566422","566423","428337","428338","000003","0000031","202","2021","203","2031","204","2041","trendsetter-pro-monthly","trendsetter-pro-yearly","multi-starter-monthly","multi-starter-yearly","multi-pro-monthly","multi-pro-yearly","multi-ultra-monthly","multi-ultra-yearly"],fb_automation:["5052712","566422","566423","428337","428338","000003","0000031","202","2021","203","2031","204","2041","trendsetter-pro-monthly","trendsetter-pro-yearly","multi-starter-monthly","multi-starter-yearly","multi-pro-monthly","multi-pro-yearly","multi-ultra-monthly","multi-ultra-yearly"],live_automation:["428337","428338","000003","0000031","201","2011","202","2021","203","2031","204","2041","trendsetter-pro-monthly","trendsetter-pro-yearly","multi-starter-monthly","multi-starter-yearly","multi-pro-monthly","multi-pro-yearly","multi-ultra-monthly","multi-ultra-yearly"],post_schedules:["5052712","566422","566423","428337","428338","000003","0000031","202","2021","203","2031","204","2041","trendsetter-pro-monthly","trendsetter-pro-yearly","multi-starter-monthly","multi-starter-yearly","multi-pro-monthly","multi-pro-yearly","multi-ultra-monthly","multi-ultra-yearly"],comment_polling:["428337","428338","trendsetter_pro","trendsetter_pro_yearly","trendsetter-pro-monthly","trendsetter-pro-yearly","multi-starter-monthly","multi-starter-yearly","multi-pro-monthly","multi-pro-yearly","multi-ultra-monthly","multi-ultra-yearly"]}[e]||[]).includes(a)}},89003:(e,t,o)=>{o.d(t,{A:()=>r});var n=o(63942),a=o(51376),i=o(70579);function r(){n.A.confirm({title:"Upgrade to unlock the Flow Editor",content:"The Flow Editor \u2014 visual flows, templates and the AI flow builder \u2014 is available on the Trendsetter and Multi-Account plans.",icon:(0,i.jsx)(a.A,{style:{color:"#6366f1"}}),okText:"See plans",cancelText:"Not now",onOk:()=>{window.location.href="/?show_plans=true"}})}},75679:(e,t,o)=>{o.d(t,{A:()=>C,I:()=>I});var n=o(65043),a=o(63942),i=o(13382),r=o(29169),l=o(76399),s=o(76965),d=o(41402),c=o(75388),m=o(94220),p=o(81210),u=o(76401),g=o(95859),h=o(59654),y=o(74563),f=o(67407),x=o(51238),v=o(27447),b=o(61247),w=o(70579);const _=(0,n.lazy)((()=>Promise.all([o.e(7692),o.e(9722),o.e(1520),o.e(3606),o.e(9117),o.e(6773),o.e(7961),o.e(1861),o.e(8150)]).then(o.bind(o,28150)))),j={triggerComp:{label:"Trigger",color:"#d62976"},messageReply:{label:"Send Message",color:"#e6683c"},questionNode:{label:"Question",color:"#4f5bd5"},aiReplyNode:{label:"AI Reply",color:"#962fbf"},followersOnly:{label:"Followers Check",color:"#fa7e1e"},tagContact:{label:"Tag Contact",color:"#f59e0b"},triggerFlow:{label:"Trigger Flow",color:"#d62976"},delay:{label:"Delay",color:"#722ed1"},condition:{label:"Condition",color:"#722ed1"},httpRequest:{label:"HTTP Request",color:"#4f5bd5"},setField:{label:"Set Field",color:"#0ea5e9"},notes:{label:"Note",color:"#eab308"}},S=["Leads","Sales","AI","Engagement","Other"],A=(e,t)=>
1{const o=String(e||"").replace(/\s+/g," ");return o.length>t?"".concat(o.slice(0,t),"\u2026"):o},k={"lead-collection":{icon:(0,w.jsx)(s.A,{}),color:"#4f5bd5"},"link-delivery":{icon:(0,w.jsx)(d.A,{}),color:"#e6683c"},"email-collector-story":{icon:(0,w.jsx)(c.A,{}),color:"#d62976"},"ai-receptionist":{icon:(0,w.jsx)(m.A,{}),color:"#962fbf"},"event-registration":{icon:(0,w.jsx)(p.A,{}),color:"#0ea5e9"},"price-inquiry":{icon:(0,w.jsx)(u.A,{}),color:"#16a34a"},"giveaway-followers":{icon:(0,w.jsx)(g.A,{}),color:"#fa7e1e"},"feedback-rating":{icon:(0,w.jsx)(h.A,{}),color:"#f59e0b"}},I=e=>{let{template:t,size:o=34}=e;const n=k[t.id]||{icon:(0,w.jsx)(y.A,{}),color:"#6366f1"};return(0,w.jsx)("span",{style:{width:o,height:o,borderRadius:10,flexShrink:0,background:"".concat(n.color,"1a"),color:n.color,display:"flex",alignItems:"center",justifyContent:"center",fontSize:Math.round(.5*o)},children:n.icon})};function C(e){var t;let{open:o,onClose:s,platform:d="instagram"}=e;const c=v.templates||[],[m,p]=(0,n.useState)((null===(t=c[0])||void 0===t?void 0:t.id)||null),u=c.find((e=>e.id===m))||c[0];return(0,w.jsxs)(a.A,{title:"Create a new automation",open:o,footer:null,width:1020,onCancel:s,children:[(0,w.jsxs)("div",{className:"flex items-center",style:{gap:10,marginBottom:16},children:[(0,w.jsx)(b.A,{platform:d,style:{flex:1,minWidth:0}}),(0,w.jsx)(i.Ay,{size:"large",icon:(0,w.jsx)(f.A,{}),onClick:()=>window.location.href="/flow-v2/editor?id=".concat((0,x.A)(),"&platform=").concat(d),style:{flexShrink:0,borderRadius:12,height:48},children:"Start from scratch"})]}),(0,w.jsx)("div",{style:{fontSize:11,fontWeight:700,textTransform:"uppercase",color:"var(--idm-text-faint)",marginBottom:8},children:"Or start from a template"}),(0,w.jsxs)("div",{className:"flex gap-4",style:{minHeight:430},children:[(0,w.jsx)("div",{style:{width:300,flexShrink:0,overflowY:"auto",maxHeight:460,paddingRight:4},children:S.map((e=>{const t=c.filter((t=>(t.category||"Other")===e));return t.length?(0,w.jsxs)("div",{style:{marginBottom:12},children:[(0,w.jsx)("div",{style:{fontSize:11,fontWeight:700,color:"var(--idm-text-faint)",margin:"4px 0 6px"},children:e}),t.map((e=>{const t=e.id===m;return(0,w.jsxs)("div",{onClick:()=>p(e.id),className:"cursor-pointer",style:{display:"flex",gap:10,alignItems:"center",padding:"9px 10px",marginBottom:6,borderRadius:10,border:"1.5px solid ".concat(t?"var(--idm-brand-500, #6366f1)":"var(--idm-border)"),background:t?"var(--idm-brand-50, #eef2ff)":"var(--idm-surface)"},children:[(0,w.jsx)(I,{template:e,size:32}),(0,w.jsxs)("div",{className:"min-w-0",children:[(0,w.jsx)("div",{style:{fontSize:13,fontWeight:600,color:"var(--idm-text)"},children:e.name}),(0,w.jsx)("div",{style:{fontSize:11,color:"var(--idm-text-muted)",lineHeight:1.35},children:A(e.description,60)})]})]},e.id)}))]},e):null}))}),u&&(0,w.jsxs)("div",{className:"flex-1 min-w-0 flex flex-col",style:{border:"1px solid var(--idm-border)",borderRadius:14,overflow:"hidden"},children:[(0,w.jsx)("div",{style:{background:"var(--idm-bg)"},children:(0,w.jsx)(n.Suspense,{fallback:(0,w.jsx)("div",{className:"flex items-center justify-center",style:{height:320},children:(0,w.jsx)(r.A,{})}),children:(0,w.jsx)(_,{template:u,height:320})})}),(0,w.jsxs)("div",{className:"flex items-center gap-3",style:{padding:"12px 16px",borderTop:"1px solid var(--idm-border)"},children:[(0,w.jsx)(I,{template:u,size:40}),(0,w.jsxs)("div",{className:"min-w-0",style:{flex:1},children:[(0,w.jsx)("div",{style:{fontSize:14,fontWeight:700,color:"var(--idm-text)"},children:u.name}),(0,w.jsx)("div",{style:{fontSize:12,color:"var(--idm-text-muted)"},children:u.description}),(0,w.jsx)("div",{className:"flex gap-1 flex-wrap",style:{marginTop:6},children:[...new Set(u.nodes.map((e=>e.type)))].map((e=>{const t=j[e]||{label:e,color:"#94a3b8"};return(0,w.jsx)(l.A,{style:{margin:0,fontSize:10,color:t.color,borderColor:"".concat(t.color,"59"),background:"".concat(t.color,"14")},children:t.label},e)}))})]}),(0,w.jsx)(i.Ay,{type:"primary",size:"large",onClick:()=>{return e=u,window.location.href="/flow-v2/editor?id=".concat((0,x.A)(),"&template_id=").concat(e.id,"&platform=").concat(d);var e},children:"Use this template"})]})]})]})]})}},63193:(e,t,o)=>{o.r(t),o.d(t,{default:()=>Ce});var n=o(89379),a=o(65043),i=o(31023),r=o(16569),l=o(13382),s=o(97326),d=o(37490),c=o(45964),m=o(76399),p=(o(36282),o(76263)),u=o(63942),g=o(54522),h=o(56597),y=o(96651),f=o(96603),x=o(29169),v=o(73216),b=o(54420),w=o(55472),_=o(52446);const j=o.p+"static/media/undraw_teamwork_zplp.1eecc630e6489728c1c10cf2e9
1024d31.svg";var S=o(42229),A=o(32458),k=o(81210),I=o(1199),C=o(41402),z=o(76401),N=o(95859),R=o(30119),D=o(75929),T=o(49337),H=o(91053),M=o(9025),W=o(24505),F=o(48393),E=o(90617),B=o(94220),P=o(43569),q=o(48663),O=o(40997),L=(o(29315),o(51682)),U=o(68662),Y=o(95240),G=o(39470),K=o(48047),J=o(31814),V=o(70579);const{Text:Z,Title:X}=i.A,$=24,Q="plan_renewal_offer_dismissed",ee="plan_grace_dismissed";function te(e){if(!e)return{hours:0,minutes:0,total:0};const t=new Date(e);if(isNaN(t.getTime()))return{hours:0,minutes:0,total:0};const o=t.getTime()+60*$*60*1e3-Date.now();return o<=0?{hours:0,minutes:0,total:0}:{hours:Math.floor(o/36e5),minutes:Math.floor(o%36e5/6e4),total:o}}function oe(e){let{userPlan:t,userPlanLoading:o,onUpgrade:n}=e;const[i,r]=(0,a.useState)(!1),[s,d]=(0,a.useState)(!1),[c,p]=(0,a.useState)(!1),[g,y]=(0,a.useState)(!1),[f,x]=(0,a.useState)(!1),[v,b]=(0,a.useState)(null),[w,_]=(0,a.useState)(0),[j,S]=(0,a.useState)({hours:0,minutes:0,total:0}),A=(0,a.useRef)(null),k=(null===t||void 0===t?void 0:t.data)||t;(0,a.useEffect)((()=>{var e;if(o||null===k||void 0===k||!k.plan_renew_date)return;if("free"===(null===k||void 0===k||null===(e=k.plan_details)||void 0===e?void 0:e.id))return;const t=function(e){if(!e)return null;const t=new Date(e);return isNaN(t.getTime())?null:Math.ceil((t.getTime()-Date.now())/864e5)}(k.plan_renew_date);if(null!==t){if(b(t),_(function(e){if(!e)return 0;const t=new Date(e);return isNaN(t.getTime())?0:Math.max(0,Math.floor((t.getTime()-Date.now())/36e5))}(k.plan_renew_date)),t<0){const e=te(k.plan_renew_date);if(e.total>0){S(e);localStorage.getItem(ee)||d(!0),p(!0),A.current=setInterval((()=>{const e=te(k.plan_renew_date);S(e),e.total<=0&&(clearInterval(A.current),p(!1),d(!1),r(!0))}),6e4)}else r(!0)}else if(t<=2){localStorage.getItem(Q)||y(!0),x(!0)}return()=>{A.current&&clearInterval(A.current)}}}),[t,o,null===k||void 0===k?void 0:k.plan_renew_date]);const I=()=>{localStorage.setItem(Q,Date.now().toString()),y(!1)},C=()=>{localStorage.setItem(ee,Date.now().toString()),d(!1)},z=0===v?"Only ".concat(w," hour").concat(1!==w?"s":""," left"):1===v?"Expires tomorrow":"Only ".concat(v," days left"),D="".concat(j.hours,"h ").concat(j.minutes,"m"),T=(0,V.jsx)(u.A,{open:i,closable:!1,footer:null,centered:!0,width:420,maskClosable:!1,keyboard:!1,children:(0,V.jsxs)("div",{style:{textAlign:"center",padding:"24px 0 8px"},children:[(0,V.jsx)("div",{style:{width:72,height:72,borderRadius:"50%",background:"#fff1f0",display:"flex",alignItems:"center",justifyContent:"center",margin:"0 auto 20px"},children:(0,V.jsx)(Y.A,{style:{fontSize:36,color:"#ff4d4f"}})}),(0,V.jsx)(X,{level:3,style:{margin:"0 0 8px",color:"#cf1322"},children:"Your Plan Has Expired"}),(0,V.jsx)(Z,{style:{fontSize:15,color:"#595959",lineHeight:1.6},children:"Your auto-renewal failed and your plan has expired. All automations are currently paused. Upgrade now to resume sending DMs and keep your audience engaged."}),(0,V.jsx)("div",{style:{margin:"18px 0 0",padding:"12px 16px",background:"#f6ffed",borderRadius:10,border:"1px solid #b7eb8f"},children:(0,V.jsxs)(Z,{style:{fontSize:13,color:"#389e0d"},children:["\ud83d\udca1 Tip: Switch to a yearly plan to skip monthly renewal headaches and get ",(0,V.jsx)("span",{style:{fontWeight:700},children:"2 months free"}),"."]})}),(0,V.jsx)(l.Ay,{type:"primary",danger:!0,size:"large",block:!0,onClick:()=>{r(!1),n()},style:{marginTop:20,borderRadius:10,height:52,fontWeight:700,fontSize:16},children:"Upgrade Plan to Access"})]})}),H=(0,V.jsx)(u.A,{open:s,closable:!1,footer:null,centered:!0,width:440,maskClosable:!0,onCancel:C,children:(0,V.jsxs)("div",{style:{padding:"16px 0 8px"},children:[(0,V.jsx)("div",{style:{textAlign:"center",marginBottom:16},children:(0,V.jsxs)(m.A,{color:"red",style:{fontSize:14,padding:"5px 16px",fontWeight:700,borderRadius:20},children:[(0,V.jsx)(G.A,{})," Auto-renewal failed"]})}),(0,V.jsxs)("div",{style:{textAlign:"center"},children:[(0,V.jsx)(X,{level:3,style:{margin:"0 0 6px"},children:"\u26a0\ufe0f Automations Will Stop In"}),(0,V.jsxs)("div",{style:{display:"inline-flex",gap:8,margin:"12px 0 8px"},children:[(0,V.jsxs)("div",{style:{background:"#ff4d4f",borderRadius:10,padding:"10px 18px",color:"#fff",minWidth:70,textAlign:"center"},children:[(0,V.jsx)("div",{style:{fontSize:28,fontWeight:800,lineHeight:1},children:j.hours}),(0,V.jsx)("div",{style:{fontSize:11,opacity:.85,marginTop:2},children:"HOURS"})]}),(0,V.jsxs)("div",{style:{background:"#ff4d4f",borderRadius:10,padding:"10px 18px",color:"#fff",minWidth:70,textAlign:"center"},children:[(0,V.jsx)("div",{style:{fontSize:28,fontWeight:800,lineHeight:1},children:j.minutes}),(0,V.jsx)("div",{style:{fontSize:11,opacity:.85,marginTop:2},children:"MINS"})]})]}),(0,V.jsx)(Z,{style:{fontSize:14,color:"#595959",display:"block",marginTop:6},children:"Your payment didn't go through. Renew within the grace peri
1od or all DM automations will be paused."})]}),(0,V.jsx)("div",{style:{margin:"18px 0",padding:"12px 16px",background:"#f6ffed",borderRadius:10,border:"1px solid #b7eb8f"},children:(0,V.jsxs)(Z,{style:{fontSize:13,color:"#389e0d"},children:["\ud83d\udca1 Switch to yearly no more renewal failures and get ",(0,V.jsx)("span",{style:{fontWeight:700},children:"2 months free"}),"."]})}),(0,V.jsx)(l.Ay,{type:"primary",danger:!0,size:"large",block:!0,icon:(0,V.jsx)(K.A,{}),onClick:()=>{d(!1),n()},style:{borderRadius:10,height:52,fontWeight:700,fontSize:16},children:"Renew Now"}),(0,V.jsx)(l.Ay,{type:"text",block:!0,onClick:C,style:{marginTop:8,color:"#bfbfbf",fontSize:13},children:"Dismiss"})]})}),M=c&&!i?(0,V.jsx)(U.A,{style:{marginBottom:16,borderRadius:12,background:"linear-gradient(135deg, #fff1f0 0%, #fff2e8 100%)",border:"1px solid #ffa39e"},styles:{body:{padding:"14px 20px"}},children:(0,V.jsxs)(h.A,{align:"center",justify:"space-between",wrap:"wrap",gap:12,children:[(0,V.jsxs)(h.A,{align:"center",gap:12,style:{flex:1,minWidth:220},children:[(0,V.jsx)("div",{style:{width:40,height:40,borderRadius:"50%",background:"#fff1f0",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:(0,V.jsx)(G.A,{style:{fontSize:20,color:"#ff4d4f"}})}),(0,V.jsxs)("div",{children:[(0,V.jsxs)(Z,{strong:!0,style:{fontSize:14,color:"#cf1322"},children:["\u26a0\ufe0f Renewal failed Automations stop in ",D]}),(0,V.jsx)(Z,{style:{fontSize:12,display:"block",color:"#8c8c8c"},children:"Renew now or switch to yearly to get 2 months free."})]})]}),(0,V.jsx)(l.Ay,{type:"primary",danger:!0,icon:(0,V.jsx)(K.A,{}),onClick:n,style:{borderRadius:8,fontWeight:600},children:"Renew Now"})]})}):null,W=(0,V.jsx)(u.A,{open:g,closable:!1,footer:null,centered:!0,width:440,maskClosable:!0,onCancel:I,children:(0,V.jsxs)("div",{style:{padding:"16px 0 8px"},children:[(0,V.jsx)("div",{style:{textAlign:"center",marginBottom:16},children:(0,V.jsxs)(m.A,{color:"red",style:{fontSize:13,padding:"4px 14px",fontWeight:600,borderRadius:20},children:[(0,V.jsx)(J.A,{})," ",z," Act Now"]})}),(0,V.jsxs)("div",{style:{textAlign:"center"},children:[(0,V.jsx)(X,{level:3,style:{margin:"0 0 4px"},children:"\ud83c\udf81 Special Offer: Go Yearly"}),(0,V.jsx)(Z,{style:{fontSize:15,color:"#595959"},children:"Before your plan renews, lock in the best deal"})]}),(0,V.jsxs)("div",{style:{margin:"20px 0",padding:"20px",background:"linear-gradient(135deg, #f6ffed 0%, #fcffe6 100%)",borderRadius:12,border:"1px solid #b7eb8f",textAlign:"center"},children:[(0,V.jsx)(Z,{style:{fontSize:14,color:"#389e0d"},children:"YEARLY PLAN SAVES YOU"}),(0,V.jsx)("div",{style:{margin:"6px 0"},children:(0,V.jsx)("span",{style:{fontSize:36,fontWeight:800,color:"#52c41a",lineHeight:1},children:"2 Months Free"})}),(0,V.jsx)(Z,{style:{fontSize:13,color:"#595959"},children:"Pay for 10 months, get 12. That's over 16% off."})]}),(0,V.jsx)("div",{style:{padding:"14px 16px",background:"#fff2f0",borderRadius:10,border:"1px solid #ffccc7",marginBottom:20},children:(0,V.jsxs)(Z,{style:{fontSize:13,color:"#cf1322"},children:[(0,V.jsx)(R.A,{style:{marginRight:6}}),"Your plan auto-renews soon. If the renewal fails, all automations will stop and your audience won't receive DMs until you resubscribe."]})}),(0,V.jsx)(l.Ay,{type:"primary",size:"large",block:!0,icon:(0,V.jsx)(K.A,{}),onClick:()=>{y(!1),n()},style:{borderRadius:10,height:52,fontWeight:700,fontSize:16,background:"linear-gradient(135deg, #52c41a 0%, #73d13d 100%)",border:"none"},children:"Claim Yearly Offer Now"}),(0,V.jsx)(l.Ay,{type:"text",block:!0,onClick:I,style:{marginTop:8,color:"#bfbfbf",fontSize:13},children:"I'll risk it, remind me later"})]})}),F=!f||i||c?null:(0,V.jsx)(U.A,{style:{marginBottom:16,borderRadius:12,background:"linear-gradient(135deg, #fff1f0 0%, #fff7e6 100%)",border:"1px solid #ffa39e"},styles:{body:{padding:"14px 20px"}},children:(0,V.jsxs)(h.A,{align:"center",justify:"space-between",wrap:"wrap",gap:12,children:[(0,V.jsxs)(h.A,{align:"center",gap:12,style:{flex:1,minWidth:220},children:[(0,V.jsx)("div",{style:{width:40,height:40,borderRadius:"50%",background:"#fff2e8",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:(0,V.jsx)(J.A,{style:{fontSize:20,color:"#fa541c"}})}),(0,V.jsxs)("div",{children:[(0,V.jsxs)(Z,{strong:!0,style:{fontSize:14,color:"#cf1322"},children:["\u23f0 ",z," Auto-renewal coming up"]}),(0,V.jsx)(Z,{style:{fontSize:12,display:"block",color:"#8c8c8c"},children:"If renewal fails, automations stop. Switch to yearly and get 2 months free."})]})]}),(0,V.jsx)(l.Ay,{type:"primary",icon:(0,V.jsx)(N.A,{}),onClick:n,style:{borderRadius:8,fontWeight:600,background:"#fa541c",border:"none"},children:"Claim Offer"})]})});return(0,V.jsxs)(V.Fragment,{children:[T,H,M,W,F]})}var ne=o(95607),ae=o(78600),ie=o(61247),re=o(94471),le=o(34419),se=o(7730),de=o(43117),ce=o(92252),me=o(4394),pe=o(67177),ue=o(75388),ge=(o(69312),o(28600),o(67407),o(51238),o(27447),o(75679),o(98796),o(89003),o(79722),o(64376),o(7650),o(42261),o(94434),o(57332),o(85578));o(26851),o(89967),o(74563),o(16523),o(83038),o(94733),o(12499),o(24227);re.A,le.A,se.A,de.A,ce.A,ce.A,me.A,me.A,pe.A,pe.A,ue.A,S.A,de.A;var he=o(51753),ye=o(10253),fe=o(225),xe=o(69231);const ve="survey-insights-2026-jul",be=[{value:"sales_reports",label:"Reports that help to understand my sales more",icon:(0,V.jsx)(z.A,{})},{value:"followers_growth",label:"Reports to understand followers increasing",icon:(0,V.jsx)(ye.A,{})},{value:"engagement_reports",label:"Reports to understand engagement",icon:(0,V.jsx)(ce.A,{})},{value:"customer_intent",label:"Reports to understand customers/followers intent",icon:(0,V.jsx)(fe.A,{})},{value:"engagement_metrics_brand",label:"Engagement metrics to share to Brand Collabs",icon:(0,V.jsx)(xe.A,{})}];const we=function(e){let{accountCreatedAt:t}=e;const[o,n]=(0,a.useState)(!1),[i,s]=(0,a.useState)(0),[d,c]=(0,a.useState)([]),[m,p]=(0,a.useState)(""),[g,h]=(0,a.useState)(0),[y,f]=(0,a.useState)(""),[x,v]=(0,a.useState)(!1);(0,a.useEffect)((()=>{b()}),[t]);const b=async()=>
1{if(console.log("[InsightsSurvey] checking... accountCreatedAt:",t,"userId:",(0,ae.A)()),!(0,ae.A)())return void console.log("[InsightsSurvey] no userId");if(!t)return void console.log("[InsightsSurvey] no accountCreatedAt");const e=new Date(t.replace(" ","T")),o=new Date,a=Math.floor((o-e)/864e5);if(console.log("[InsightsSurvey] account age days:",a,"created:",e),isNaN(a)||a<7)return void console.log("[InsightsSurvey] account too new or invalid date");const i=(0,w.H9)(_.fireDB,ve,(0,ae.A)()),r=await(0,w.x7)(i);if(console.log("[InsightsSurvey] firebase doc exists:",r.exists()),r.exists()){if(r.data().completed)return console.log("[InsightsSurvey] already completed"),void v(!0);console.log("[InsightsSurvey] opening modal"),n(!0)}else console.log("[InsightsSurvey] no doc, opening modal"),n(!0)},j=async()=>{const e=(0,w.H9)(_.fireDB,ve,(0,ae.A)());await(0,w.BN)(e,{completed:!0,selected_options:d,free_text:m,rating:g,issue_text:y,submitted_at:new Date,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone}),n(!1),v(!0),r.Ay.success("Thanks for your feedback!")};return(0,V.jsx)(V.Fragment,{children:o&&(0,V.jsx)(u.A,{open:o,footer:null,closable:!1,maskClosable:!1,centered:!0,width:520,title:null,children:(0,V.jsxs)("div",{className:"survey-form",style:{padding:"8px 0"},children:[0===i?(0,V.jsxs)("div",{children:[(0,V.jsx)("p",{style:{fontSize:18,fontWeight:600,marginBottom:4},children:"What kind of insights would help you the most?"}),(0,V.jsx)("p",{style:{color:"#888",marginBottom:20,fontSize:13},children:"Select up to 2 options"}),(0,V.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:10},children:be.map((e=>{const t=d.includes(e.value);return(0,V.jsxs)("div",{onClick:()=>{c((t=>t.includes(e.value)?t.filter((t=>t!==e.value)):t.length>=2?(r.Ay.warning("You can select up to 2 options"),t):[...t,e.value]))},style:{display:"flex",alignItems:"center",gap:12,padding:"14px 16px",background:t?"linear-gradient(135deg, rgba(99,102,241,0.05) 0%, rgba(139,92,246,0.08) 100%)":"#fff",border:"2px solid ".concat(t?"#7c3aed":"#e8ecff"),borderRadius:14,cursor:"pointer",transition:"all 0.2s ease",position:"relative"},children:[(0,V.jsx)("div",{style:{width:40,height:40,borderRadius:10,flexShrink:0,background:t?"linear-gradient(135deg, rgba(99,102,241,0.15) 0%, rgba(139,92,246,0.2) 100%)":"#f8f9ff",display:"flex",alignItems:"center",justifyContent:"center",fontSize:18,color:t?"#7c3aed":"#666"},children:e.icon}),(0,V.jsx)("span",{style:{fontSize:14,fontWeight:500,color:"#333",flex:1},children:e.label}),t&&(0,V.jsx)("div",{style:{width:22,height:22,borderRadius:"50%",flexShrink:0,background:"#7c3aed",display:"flex",alignItems:"center",justifyContent:"center"},children:(0,V.jsx)("span",{style:{color:"#fff",fontSize:12,fontWeight:700},children:"\u2713"})})]},e.value)}))})]}):1===i?(0,V.jsxs)("div",{children:[(0,V.jsx)("p",{style:{fontSize:18,fontWeight:600,marginBottom:4},children:"Share more details"}),(0,V.jsx)("p",{style:{color:"#888",marginBottom:16,fontSize:13},children:"Tell us more about what you selected \u2014 what specific data or reports would help your business?"}),(0,V.jsx)(ge.A.TextArea,{rows:4,value:m,onChange:e=>p(e.target.value),placeholder:"E.g. I want to see which posts drive the most DMs, or a weekly report on follower growth...",style:{borderRadius:10,fontSize:14,padding:12}})]}):2===i?(0,V.jsxs)("div",{style:{textAlign:"center",padding:"24px 0"},children:[(0,V.jsx)("p",{style:{fontSize:18,fontWeight:600,marginBottom:4},children:"How would you rate InstantDM?"}),(0,V.jsx)("p",{style:{color:"#888",marginBottom:24,fontSize:13},children:"Your honest rating helps us improve"}),(0,V.jsx)(he.A,{value:g,onChange:h,style:{fontSize:40}})]}):3===i?(0,V.jsxs)("div",{children:[(0,V.jsx)("p",{style:{fontSize:18,fontWeight:600,marginBottom:4},children:"We're sorry to hear that"}),(0,V.jsx)("p",{style:{color:"#888",marginBottom:16,fontSize:13},children:"What issues are you facing? We'd love to fix them."}),(0,V.jsx)(ge.A.TextArea,{rows:4,value:y,onChange:e=>f(e.target.value),placeholder:"Describe what's not working or what you expected...",style:{borderRadius:10,fontSize:14,padding:12}})]}):void 0,(0,V.jsxs)("div",{style:{marginTop:28,display:"flex",justifyContent:"flex-end",alignItems:"center",gap:8},children:[i>0&&(0,V.jsx)(l.Ay,{onClick:()=>s(i-1),children:"Back"}),(0,V.jsx)(l.Ay,{type:"primary",onClick:()=>
1{if(0===i){if(0===d.length)return void r.Ay.warning("Please select at least one option");s(1)}else if(1===i)s(2);else if(2===i){if(0===g)return void r.Ay.warning("Please give a rating");g<=3?s(3):j()}else 3===i&&j()},style:{borderRadius:6,padding:"4px 24px",height:38},children:2===i&&g>3||3===i?"Submit":"Next"})]})]})})})};var _e;const{Title:je,Text:Se}=i.A,Ae=[{id:"2026-09-16-leadgen-library",date:"Sep 16",tag:"New Feature",text:"Lead Gen Library \u2014 save a published Lead Gen automation and reuse it on any post with Browse Library"},{id:"2026-09-16-fb-contacts",date:"Sep 16",tag:"New Feature",text:"Contacts tab now shows Facebook contacts too \u2014 switch between Instagram and Facebook"},{id:"2026-09-16-human-takeover",date:"Sep 16",tag:"AI Flow",text:"Human takeover switch on each AI reply node \u2014 choose whether the AI steps back when you reply yourself"},{id:"2026-09-09-rerun-pending",date:"Sep 9",tag:"Fix",text:"Re-run missed comments now also picks up comments whose DM was left pending, not only the failed ones"},{id:"2026-09-08-fb-flow",date:"Sep 8",tag:"New Feature",text:"Facebook Flow Automation \u2014 build Messenger flows for your Page in the same Flow Editor, with Quick DM for Facebook"},{id:"2026-09-08-fb-dm",date:"Sep 8",tag:"New Feature",text:"Facebook DM Automation \u2014 reply to Messenger messages automatically"},{id:"2026-09-05-variables",date:"Sep 5",tag:"New Feature",text:"Flow Editor: Custom Variables in button and URLs"},{id:"2026-09-05",date:"Sep 5",tag:"New Feature",text:"Facebook Webhooks, API and MCP"},{id:"2026-08-30",date:"Aug 30",tag:"New Feature",text:"Flow Automation 2.0 \u2014 all-new flow editor with AI builder, templates, new logic nodes & live preview"},{id:"2026-08-30-contacts",date:"Aug 29",tag:"New Feature",text:"Contacts 1.0 tab \u2014 view, tag and manage everyone your automations talk to"},{id:"2026-08-14",date:"Aug 14",tag:"New Feature",text:"Automation Recovery \u2014 Re-send failed automations"},{id:"2026-08-13",date:"Aug 13",tag:"For Agencies",text:"Share Connection Link \u2014 Share Instagram and FB connection links with your clients instead of asking for passwords and OTPs"},{id:"2026-08-08",date:"Aug 8",tag:"For AI users",text:"MCP for AI agents \u2014 Tell Claude / AI agents to reply to comments and DMs"},{id:"2026-08-04",date:"Aug 4",tag:"AI Flow",text:"Understands images and audio notes, based on model capabilities"},{id:"2026-08-02",date:"Aug 2",tag:"New Models",text:"Gemini / DeepSeek support added"}],ke=null===(_e=Ae[0])||void 0===_e?void 0:_e.id,Ie="idm_dismissed_release_note";const Ce=function(){var e,t,o,i,U,Y,G,K;const J=(0,v.Zp)(),[Z,X]=(0,a.useState)(""),$=["Vanakkam","Namaste","Hello","Hola","Bonjour","Ciao","Hallo","Ol\xe1","Konnichiwa","Annyeong","Merhaba","Halo"],[Q]=(0,a.useState)((()=>$[Math.floor(Math.random()*$.length)])),[ee,te]=(0,a.useState)(null),[re,le]=(0,a.useState)(!0),[se,de]=(0,a.useState)(7),[ce,me]=(0,a.useState)(!0),[pe,ue]=(0,a.useState)(!0),[ge,he]=(0,a.useState)(0),[ye,fe]=(0,a.useState)(!1),[xe,ve]=(0,a.useState)(0),[be,_e]=(0,a.useState)("");(0,a.useEffect)((()=>{var e;if(null!==ee&&void 0!==ee&&null!==(e=ee.data)&&void 0!==e&&e.account_created)try{const e=new Date(ee.data.account_created).getTime()+864e5,t=Date.now();if(t>e)return void ve(0);const o=Math.max(0,Math.floor((e-t)/1e3));ve(o);const n=new Date(e);_e(n.toLocaleDateString(void 0,{month:"short",day:"numeric"})+" at "+n.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"}))}catch(t){ve(0)}}),[ee]),(0,a.useEffect)((()=>{if(xe<=0)return;const e=setInterval((()=>ve((e=>Math.max(0,e-1)))),1e3);return()=>clearInterval(e)}),[xe]);const[Ce,ze]=(0,a.useState)([]),[Ne,Re]=(0,a.useState)(!1),[De,Te]=(0,a.useState)(null),[He,Me]=(0,a.useState)(null),[We,Fe]=(0,a.useState)(!1),[Ee,Be]=(0,a.useState)(null),[Pe,qe]=(0,a.useState)("priority"),[Oe,Le]=(0,a.useState)((()=>"collapsed"===localStorage.getItem("idm-welcome-rightbar"))),Ue=()=>Le((e=>(localStorage.setItem("idm-welcome-rightbar",e?"open":"collapsed"),!e))),[Ye,Ge]=(0,a.useState)(null),[Ke,Je]=(0,a.useState)(!0),[Ve,Ze]=(0,a.useState)(!1);(0,a.useEffect)((()=>
1{if(localStorage.getItem("token")){try{const e=JSON.parse(localStorage.getItem("userData"));null!==e&&void 0!==e&&e.name?X(e.name.split(" ")[0]):null!==e&&void 0!==e&&e.username&&X(e.username)}catch(e){console.log("Error parsing user data")}(0,q.A)({url:"user_plan",method:"GET",loadingState:le,dataState:te}),(0,q.A)({url:"account-health",method:"GET",loadingState:Je,dataState:Ge}),(0,q.A)({url:"dm-insights",method:"GET",loadingState:Fe,dataState:e=>{200===(null===e||void 0===e?void 0:e.code)&&Me(e)}})}else J("/login")}),[J]),(0,a.useEffect)((()=>{var e;if(null===ee||void 0===ee||!ee.data)return;const t=ee.data,o=null===(e=t.plan_details)||void 0===e?void 0:e.id;ue("free"===o);let n=0;try{if(t.account_created){const e=t.account_created.replace(" ","T"),o=new Date(e);if(!isNaN(o.getTime())){const e=(new Date).getTime()-o.getTime();n=Math.floor(e/864e5),(n<0||n>3650)&&(n=0)}}}catch(a){console.error("Error calculating days since creation:",a),n=0}he(n),n<8&&"free"===o?(me(!0),de(7-n),localStorage.setItem("og_planID",o),localStorage.setItem("planid","428337")):(me(!1),de(0))}),[ee]),(0,a.useEffect)((()=>{(async()=>{const e=localStorage.getItem("token");if(!e)return;let t="";try{var o;const n=(0,b.s)(e);t=(null===(o=n.default_page)||void 0===o?void 0:o.username)||n.username}catch(a){return void console.error("Token decode error:",a)}if(t)try{const e=(0,w.query)((0,w.collection)(_.fireDB,"collab_invitations"),(0,w._M)("owner_username","==",t),(0,w._M)("status","==","pending")),o=await(0,w.getDocs)(e),a=[];o.forEach((e=>{a.push((0,n.A)({id:e.id},e.data()))})),ze(a)}catch(i){console.error("Error fetching invites:",i)}})();(async()=>{const e=localStorage.getItem("pending_shared_template_id");if(e)try{const t=(0,w.H9)(_.fireDB,"shared_templates",e),o=await(0,w.x7)(t);o.exists()?Te((0,n.A)({id:o.id},o.data())):(localStorage.removeItem("pending_shared_template_id"),localStorage.removeItem("show_pending_shared_template"))}catch(t){console.error("Error fetching pending shared template:",t)}})()}),[]),(0,a.useEffect)((()=>{Ce.length>0&&!Ne&&Re(!0)}),[Ce]);const Xe=[{id:1,title:"Automate Instagram Comments",description:"Learn how to set up comment to DM automation for your posts",gradient:"linear-gradient(135deg, #E1306C 0%, #833AB4 100%)",videoId:"5cdU1e1NAT0",duration:"5:00"},{id:2,title:"Global Automation",description:"Automate all your posts and reels at once",gradient:"linear-gradient(135deg, #11998e 0%, #38ef7d 100%)",videoId:"Fi4NKgzC19w",duration:"2:00"},{id:3,title:"Facebook Automation",description:"Set up Facebook comment to Messenger automation",gradient:"linear-gradient(135deg, #1877F2 0%, #0D47A1 100%)",videoId:"4HE7B23NClY",duration:"2:10"},{id:4,title:"Schedule Instagram Posts with AutoDM",description:"Plan and schedule your content with automation",gradient:"linear-gradient(135deg, #fc4a1a 0%, #f7b733 100%)",videoId:"_28lJKsayLY",duration:"6:00"}],$e=[{key:"instagram",icon:(0,V.jsx)(S.A,{}),title:"Instagram Automation",description:"Comment to DM automation for Instagram posts & reels",path:"/ig"},{key:"facebook",icon:(0,V.jsx)(A.A,{}),title:"Facebook Automation",description:"Automate Facebook page comments to Messenger",path:"/fb"},{key:"later",icon:(0,V.jsx)(k.A,{}),title:"Schedule Posts with AutoDM",description:"Plan and schedule your content with automation",path:"/later"},{key:"dashboard",icon:(0,V.jsx)(I.A,{}),title:"Dashboard",description:"View your automation stats and analytics",path:"/insights"},{key:"oia",icon:(0,V.jsx)(C.A,{}),title:"Open In App",description:"Smart links that open directly in apps",path:"/oia"},{key:"referral",icon:(0,V.jsx)(z.A,{}),title:"Referral Dashboard",description:"Earn up to 50% commission for every referral",path:"/referral-dashboard"}],[Qe,et]=(0,a.useState)(!1),[tt,ot]=(0,a.useState)(localStorage.getItem(Ie)||void 0),[nt,at]=(0,a.useState)(),[it,rt]=(0,a.useState)(),[lt,st]=(0,a.useState)(!1),[dt,ct]=(0,a.useState)(!1),[mt,pt]=(0,a.useState)(!1),[ut,gt]=r.Ay.useMessage();(0,a.useEffect)((()=>{const e=Intl.DateTimeFormat().resolvedOptions().timeZone;st("Asia/Kolkata"===e||"Asia/Calcutta"===e)}),[]),(0,a.useEffect)((()=>
1{if(null!==nt&&void 0!==nt&&nt.open_url)window.location.href=null===nt||void 0===nt?void 0:nt.payment_url;else if(void 0!=(null===nt||void 0===nt?void 0:nt.payment_url)){if(ut.destroy("payment-process"),!lt&&window.LemonSqueezy){const e=nt.payment_url;window.LemonSqueezy.Url.Open(e)}if(lt&&window.Razorpay)try{const e={key:"rzp_live_JtjGCHjkESNzIZ",name:"InstantDM",description:"Affordable Comment to DM automation tool",subscription_id:nt.rzpy_sub_id,handler:function(e){fe(!1),ct(!0),r.Ay.success("Payment completed, Please wait while we're verfiying!");let t=JSON.parse(localStorage.getItem("userData")),o=localStorage.getItem("ig_id");const n="https://api.telegram.org/bot".concat("7109212238:AAEsaFubA66rs0Ib6rgn5K2amKO9rnOkUv0","/sendMessage"),a=sessionStorage.getItem("payment_plan_name")||"unknown",i=sessionStorage.getItem("payment_billing")||"unknown",l=sessionStorage.getItem("payment_currency")||"inr",s=sessionStorage.getItem("payment_gateway")||"razorpay";let d={chat_id:"776956029",text:"[SUBSCRIBED PLAN] - user ".concat(null===t||void 0===t?void 0:t.emailid," - Plan: ").concat(a," ").concat(i,", Gateway: ").concat(s,", Currency: ").concat(l.toUpperCase(),", IG ID = ").concat(o,", user id = ").concat((0,ae.A)(!0),", source = ").concat(sessionStorage.getItem("payment_source")||"unknown")};fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(d)}).then((e=>e.json())).then((e=>{console.log("Message sent successfully:",e)}
1)).catch((e=>{console.error("Error sending message:",e)})),at({})},error:function(e){fe(!1),pt(!0),at({})},prefill:{name:nt.customer_name,email:nt.customer_email},notes:void 0!=nt.notes?(0,n.A)({},nt.notes):{},theme:{color:"#1677ff"},display:{handler:function(){return{offers:[{type:"discount",description:"10% discount on first purchase",amount:100},{type:"coupon",description:"Rs. 100 off on total bill",code:"INSTANT10"}]}}}};new window.Razorpay(e).open()}catch(e){alert("Error loading Razorpay: "+e.message)}else!lt&&window.LemonSqueezy}else if(null!==nt&&void 0!==nt&&nt.code||null!==nt&&void 0!==nt&&nt.message){ut.destroy("payment-process"),r.Ay.error((null===nt||void 0===nt?void 0:nt.message)||"Please logout and login to continue.");try{let e=JSON.parse(localStorage.getItem("userData")),t=localStorage.getItem("ig_id");const o="776956029";fetch("https://api.telegram.org/bot".concat("7109212238:AAEsaFubA66rs0Ib6rgn5K2amKO9rnOkUv0","/sendMessage"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({chat_id:o,text:"[SUBSCRIBE FAILED - Please wait keep loading] - ".concat(null===e||void 0===e?void 0:e.emailid," - IG ID = ").concat(t,", user id = ").concat((0,ae.A)(!0),", error: ").concat((null===nt||void 0===nt?void 0:nt.message)||"unknown",", source = ").concat(sessionStorage.getItem("payment_source")||"unknown")})}).catch((()=>{}))}catch(t){}at({})}}),[nt,lt,ut]);const ht=e=>{J(e.path)};(0,a.useEffect)((()=>{const e=(0,ae.A)(!0);e?(0,w.x7)((0,w.H9)(_.fireDB,"user_prefs",String(e))).then((e=>{var t;const o=e.exists()&&(null===(t=e.data())||void 0===t?void 0:t.dismissed_release_note)||null;ot(o),o?localStorage.setItem(Ie,o):localStorage.removeItem(Ie)})).catch((()=>ot((e=>void 0===e?null:e)))):ot((e=>void 0===e?null:e))}),[]);const yt=()=>{ot(ke),localStorage.setItem(Ie,ke);const e=(0,ae.A)(!0);e&&(0,w.BN)((0,w.H9)(_.fireDB,"user_prefs",String(e)),{dismissed_release_note:ke},{merge:!0}).catch((()=>{}))},ft=ke&&void 0!==tt&&(!tt||ke>tt),xt=(()=>{const e=null===ee||void 0===ee?void 0:ee.data;if(!e||"unlimited"===e.plan_credits)return null;const t=Number(e.plan_credits)+Number(e.topup_credit||0);return Number.isFinite(t)?Math.max(0,t):null})(),vt=()=>(0,V.jsxs)("div",{children:[(0,V.jsxs)("div",{style:{marginBottom:14},children:[(0,V.jsx)("p",{className:"side-mini-label",children:"More features"}),$e.slice(3).map((e=>(0,V.jsxs)("div",{className:"side-mini-row",onClick:()=>ht(e),children:[(0,V.jsx)("div",{className:"side-mini-icon",children:e.icon}),(0,V.jsx)("p",{className:"side-mini-title",children:e.title})]},e.key)))]}),(0,V.jsxs)("div",{style:{marginBottom:4},children:[(0,V.jsx)("p",{className:"side-mini-label",children:"Tutorials"}),Xe.map((e=>(0,V.jsxs)("div",{className:"side-mini-row",onClick:()=>window.open("https://www.youtube.com/watch?v=".concat(e.videoId),"_blank"),children:[(0,V.jsx)("img",{className:"side-mini-thumb",src:"https://img.youtube.com/vi/".concat(e.videoId,"/default.jpg"),alt:e.title}),(0,V.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,V.jsx)("p",{className:"side-mini-video-title",children:e.title}),(0,V.jsx)("span",{className:"side-mini-meta",children:e.duration})]})]},e.id)))]})]});return(0,V.jsxs)("div",{className:"page-layout",children:[gt,(0,V.jsx)(P.A,{}),(0,V.jsxs)("div",{className:"page-content welcome-home-page",children:[(0,V.jsx)(we,{accountCreatedAt:null===ee||void 0===ee||null===(e=ee.data)||void 0===e?void 0:e.account_created}),(0,V.jsx)(oe,{userPlan:ee,userPlanLoading:re,onUpgrade:()=>fe(!0)}),(0,V.jsx)("div",{className:"welcome-header",children:(0,V.jsxs)("div",{className:"welcome-header-content",children:[(0,V.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:12,flexWrap:"wrap",justifyContent:"center"},children:[(0,V.jsx)(je,{level:2,className:"welcome-title",style:{margin:0},children:Z?"".concat(Z):""}),(0,V.jsx)(L.A,{setShowPlanModal:fe,inline:!0})]}),!pe&&(0,V.jsx)(Se,{className:"welcome-subtitle",children:"Facebook + Instagram Comment, stories, DM Automation"})]})}),(null===Ye||void 0===Ye||null===(t=Ye.data)||void 0===t?void 0:t.mismatch)&&(0,V.jsxs)("div",{style:{background:"#fff2f0",border:"1px solid #ffccc7",borderLeft:"4px solid #ff4d4f",borderRadius:"8px",padding:"14px 18px",marginBottom:"16
1px",maxWidth:"500px",margin:"0 auto 16px",display:"flex",alignItems:"flex-start",gap:"12px"},children:[(0,V.jsx)("span",{style:{fontSize:"20px",flexShrink:0},children:"\u26a0\ufe0f"}),(0,V.jsxs)("div",{children:[(0,V.jsx)("h4",{style:{margin:"0 0 4px",fontSize:"14px",fontWeight:600,color:"#cf1322"},children:"Instagram & Facebook Page Mismatch"}),(0,V.jsxs)("p",{style:{margin:"0 0 8px",fontSize:"13px",color:"#8c4646",lineHeight:"1.5"},children:["Your Instagram account ",(0,V.jsxs)("strong",{children:["@",Ye.data.ig_username]})," doesn't match the Instagram linked to your Facebook Page",Ye.data.fb_page_name?' "'.concat(Ye.data.fb_page_name,'"'):""," which is ",(0,V.jsxs)("strong",{children:["@",Ye.data.fb_connected_ig_username]}),". This will cause automations to not work."]}),(0,V.jsxs)("div",{style:{display:"flex",gap:"8px",flexWrap:"wrap"},children:[(0,V.jsx)(l.Ay,{type:"primary",danger:!0,size:"small",onClick:()=>J("/ig-connect"),children:"Reconnect FB Page"}),(0,V.jsx)(l.Ay,{size:"small",danger:!0,ghost:!0,loading:Ve,onClick:()=>{Ze(!0),(0,q.A)({url:"disconnect-fb-page",method:"POST",loadingState:Ze,dataState:e=>{var t;200===(null===e||void 0===e?void 0:e.code)||null!==e&&void 0!==e&&null!==(t=e.message)&&void 0!==t&&t.toLowerCase().includes("success")?(r.Ay.success("Facebook Page disconnected"),Ge(null)):r.Ay.error((null===e||void 0===e?void 0:e.message)||"Failed to disconnect")}})},children:"Disconnect FB Page"})]})]})]}),!re&&pe&&xe>0&&(0,V.jsxs)("div",{style:{background:"radial-gradient(ellipse at top left, #1a0000 0%, #0a0a0a 40%, #1a0000 70%, #cc0000 100%)",borderRadius:14,padding:"28px 32px",marginBottom:16,maxWidth:540,margin:"0 auto 16px",boxShadow:"0 8px 32px rgba(0,0,0,0.4)",textAlign:"center",position:"relative",overflow:"hidden"},children:[(0,V.jsx)("style",{children:".offer-cta-btn{transition:all .2s ease;animation:pulse-btn 2s ease-in-out infinite}.offer-cta-btn:hover{transform:scale(1.03);box-shadow:0 6px 24px rgba(255,255,255,.3)!important;animation:none}@keyframes pulse-btn{0%,100%{transform:scale(1)}50%{transform:scale(1.02)}}"}),(0,V.jsx)("div",{style:{position:"absolute",top:0,right:0,width:200,height:200,background:"radial-gradient(circle, rgba(200,0,0,0.3) 0%, transparent 70%)",borderRadius:"50%"}}),(0,V.jsx)("div",{style:{position:"absolute",inset:0,opacity:.06,backgroundImage:'url("data:image/svg+xml,%3Csvg viewBox=%270 0 200 200%27 xmlns=%27http://www.w3.org/2000/svg%27%3E%3Cfilter id=%27n%27%3E%3CfeTurbulence type=%27fractalNoise%27 baseFrequency=%270.65%27 numOctaves=%273%27 stitchTiles=%27stitch%27/%3E%3C/filter%3E%3Crect width=%27100%25%27 height=%27100%25%27 filter=%27url(%23n)%27/%3E%3C/svg%3E")',backgroundSize:"150px"}}),(0,V.jsxs)("div",{style:{position:"relative",zIndex:1},children:[(0,V.jsxs)("p",{style:{margin:"0 0 8px",fontSize:12,fontWeight:700,color:"#ff4444",textTransform:"uppercase",letterSpacing:1.5},children:["\u26a1 Sale ends ",be]}),(0,V.jsx)("h2",{style:{margin:"0 0 8px",fontSize:24,fontWeight:900,color:"#ffffff",letterSpacing:-.5},children:lt?"Pay 6 Months, Get 1 Full Year":"Pay 4 Months, Get 1 Full Year"}),(0,V.jsx)("p",{style:{margin:"0 0 20px",fontSize:14,color:"rgba(255,255,255,0.7)"},children:"Trendsetter Plan \u2014 Unlimited DMs, AI Agent, Flow Editor, FB + Instagram"}),(0,V.jsxs)("div",{style:{display:"inline-flex",alignItems:"center",gap:8,background:"rgba(255,255,255,0.08)",borderRadius:8,padding:"10px 20px",marginBottom:20,border:"1px solid rgba(255,255,255,0.1)"},children:[(0,V.jsx)("span",{style:{fontSize:13,color:"rgba(255,255,255,0.6)"},children:"Offer ends in"}),(0,V.jsxs)("span",{style:{fontFamily:"monospace",fontSize:20,fontWeight:800,color:"#ff4444"},children:[String(Math.floor(xe/3600)).padStart(2,"0"),":",String(Math.floor(xe%3600/60)).padStart(2,"0"),":",String(xe%60).padStart(2,"0")]})]}),(0,V.jsx)("div",{style:{display:"block"},children:(0,V.jsx)(l.Ay,{className:"offer-cta-btn",type:"primary",size:"large",onClick:()=>{try{const e=JSON.parse(localStorage.getItem("userData")||"{}");fetch("https://api.telegram.org/bot7109212238:AAEsaFubA66rs0Ib6rgn5K2amKO9rnOkUv0/sendMessage",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({chat_id:"776956029",text:"[YEARLY OFFER] ".concat((null===e||void 0===e?void 0:e.emailid)||""," uid:").concat((0,ae.A)(!0)," ").concat(lt?"INR":"USD")}
1)}).catch((()=>{}))}catch(e){}sessionStorage.setItem("payment_source","yearly_offer_card"),(0,ne.A)("428338",lt?"inr":"usd",ut,rt,at,lt?"razorpay":"stripe",!1,lt?"offer_Sn7BIgVtS75pNw":"promo_1TFntmSZZ7x3Jx8pHvelouhI")},loading:it,style:{borderRadius:8,fontWeight:700,height:46,paddingInline:32,background:"#fff",borderColor:"#fff",color:"#0a0a0a",fontSize:15,boxShadow:"0 4px 16px rgba(255,255,255,0.2)"},children:"Claim Offer \u2192"})}),(0,V.jsx)("p",{style:{margin:"12px 0 0",fontSize:11,color:"rgba(255,255,255,0.4)"},children:"Secure checkout \u2022 Cancel anytime"})]})]}),!re&&pe&&(0,V.jsxs)("div",{className:"free-trial-banner ".concat(ce?"":"trial-expired"),children:[(0,V.jsx)("div",{className:"trial-icon",children:ce?(0,V.jsx)(N.A,{}):(0,V.jsx)(R.A,{})}),(0,V.jsxs)("div",{className:"trial-content",children:[(0,V.jsxs)("div",{className:"trial-badge",children:[(0,V.jsx)(D.A,{})," ",ce?"PRO PLAN TRIAL":"FREE PLAN"]}),ce?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)("h3",{children:[se>0?"".concat(se," days").concat(null!=xt?" or ".concat(xt," credits"):""," left"):"Last day"," of your Pro trial"]}),(0,V.jsxs)("p",{children:["Enjoying premium features no credit card required. ",se>0?"Reverts to Free plan in ".concat(se," days").concat(null!=xt?" or when credits run out":"","."):"Reverts to Free plan tomorrow."]})]}):(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)("h3",{children:"Your free trial has ended"}),(0,V.jsx)("p",{children:"Upgrade to Pro for unlimited automations and premium features."})]})]}),(0,V.jsx)("div",{className:"trial-actions",children:(0,V.jsx)(l.Ay,{type:"default",className:"upgrade-btn",onClick:()=>fe(!0),children:ce?"Show Plans":"Upgrade Now"})})]}),(null===He||void 0===He||null===(o=He.data)||void 0===o?void 0:o.length)>0&&(0,V.jsx)("div",{className:"mobile",style:{marginBottom:"16px"},children:(0,V.jsx)(s.A,{ghost:!0,items:[{key:"dm-insights-mobile",label:(0,V.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,V.jsx)("span",{children:"\u2728"}),(0,V.jsx)("span",{style:{fontWeight:600,fontSize:"14px"},children:"DM Insights"}),(null===He||void 0===He||null===(i=He.counts)||void 0===i?void 0:i.unread)>0&&(0,V.jsx)(d.A,{count:He.counts.unread,size:"small"})]}),children:(0,V.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"6px"},children:[He.data.slice(0,10).map((e=>{var t,o,a,i,r;const s="high"===e.priority?"#ff4d4f":"medium"===e.priority?"#faad14":"#52c41a",d=(()=>{const t=Date.now()-new Date(e.last_seen).getTime(),o=Math.floor(t/6e4);if(o<60)return"".concat(o,"m");const n=Math.floor(o/60);return n<24?"".concat(n,"h"):"".concat(Math.floor(n/24),"d")})();return(0,V.jsxs)("div",{onClick:()=>{e.read||((0,q.A)({url:"dm-insights",method:"PUT",body:{sender_id:e.sender_id},loadingState:()=>{},dataState:()=>{}}),Me((t=>{var o;return(0,n.A)((0,n.A)({},t),{},{data:t.data.map((t=>t.sender_id===e.sender_id?(0,n.A)((0,n.A)({},t),{},{read:!0}):t)),counts:(0,n.A)((0,n.A)({},t.counts),{},{unread:Math.max(0,((null===(o=t.counts)||void 0===o?void 0:o.unread)||0)-1)})})}))),e.sender_username&&window.open("https://instagram.com/".concat(e.sender_username),"_blank")},style:{display:"flex",alignItems:"center",gap:"10px",padding:"10px",borderRadius:"8px",cursor:"pointer",background:e.read?"white":"#f6f8ff",border:"1px solid ".concat(e.read?"#f0f0f0":"#e0e8ff")},children:[(0,V.jsx)("div",{style:{width:8,height:8,borderRadius:"50%",background:s,flexShrink:0}}),(0,V.jsx)(c.A,{size:32,src:null===(t=e.sender_detail)||void 0===t?void 0:t.profile_pic,children:null===(o=(e.sender_username||"?")[0])||void 0===o?void 0:o.toUpperCase()}),(0,V.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,V.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"4px"},children:[(0,V.jsx)("span",{style:{fontWeight:e.read?500:700,fontSize:"13px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.sender_username?"@".concat(e.sender_username):null===(a=e.sender_id)||void 0===a?void 0:a.slice(0,10)}),(0,V.jsx)(m.A,{color:"blue",style:{margin:0,fontSize:"10px",padding:"0 4px"},children:e.current_intent})]}),(0,V.jsx)("p",{style:{margin:0,fontSize:"11px",color:"#888",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:(null===(i=e.intent_timeline)||void 0===i||null===(r=i[e.intent_timeline.length-1])||void 0===r?void 0:r.text)||""})]}),(0,V.jsx)("span",{style:{fontSize:"11px",color:"#aaa",flexShrink:0},children:d}),(0,V.jsx)(l.Ay,{size:"small",type:"text",danger:!0,style:{flexShrink:0,fontSize:10,padding:"0 4px",height:18},onClick:t=>{t.stopPropagation(),(0,q.A)({url:"dm-insights",method:"DELETE",body:{sender_id:e.sender_id},loadingState:()=>{},dataState:()=>{}}),Me((t=>{var o;return(0,n.A)((0,n.A)({},t),{},{data:t.data.filter((t=>t.sender_id!==e.sender_id)),counts:(0,n.A)((0,n.A)({},t.counts),{},{total:Math.max(0,((null===(o=t.counts)||void 0===o?void 0:o.total)||0)-1)})})}))},children:"\u2715"})]},e.sender_id)})),(0,V.jsx)(l.Ay,{type:"link",block:!0,onClick:()=>J("/ig?tab=3"),children:"View All \u2192"})]})}]})}),(()=>{const e=(0,V.jsxs)("div",{className:"welcome-section",children:[Ce.length>0&&(0,V.jsxs)("div",{className:"collab-request-banner",onClick:()=>Re(!0),children:[(0,V.jsxs)("div",{className:"collab-banner-content",children:[(0,V.jsx)("img",{src:j,alt:"Collab",style:{height:60}}),(0,V.jsxs)("div",{className:"collab-banner-text",children:[(0,V.jsx)("h4",{children:"Collaboration requests pending"}),(0,V.jsx)("p",{children:"Review and automate posts with your Brands and Collaboration."})]})]}),(0,V.jsx)(l.Ay,{type:"primary",className:"view-now-btn",children:"View Now"})]}),(0,V.jsx)(ie.A,{style:{marginBottom:16}}),(0,V.jsx)("div",{className:"features-grid",children:$e.slice(0,3).map((e=>{const t=(0,V.jsxs)("div",{className:"feature-card",onClick:()=>ht(e),children:[(0,V.jsx)("div",{className:"feature-icon",children:e.icon}),(0,V.jsxs)("div",{className:"feature-content",children:[(0,V.jsxs)("div",{className:"feature-title-row",children:[(0,V.jsx)("h4",{children:e.title}),e.badge&&(0,V.jsx)("span",{className:"feature-badge",children:e.badge})]}),(0,V.jsx)("p",{children:e.description})]})]});return e.key,(0,V.jsx)("span",{style:{display:"contents"},children:t},e.key)}))})]},"features"),t=ft?(0,V.jsx)("div",{className:"welcome-section",children:(0,V.jsxs)("div",{className:"release-notes-card",children:[(0,V.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:6},children:[(0,V.jsx)("p",{className:"side-mini-label",style:{margin:0},children:"Recent updates"}),(0,V.jsx)(l.Ay,{type:"text",size:"small",onClick:yt,style:{color:"var(--idm
1-text-faint)"},children:"\u2715"})]}),(0,V.jsx)(p.A,{style:{marginTop:16},items:(Qe?Ae:Ae.slice(0,7)).map((e=>({color:"var(--idm-brand-500)",children:(0,V.jsxs)("div",{children:[(0,V.jsx)("span",{className:"release-note-date",children:e.date}),e.tag&&(0,V.jsx)("span",{className:"release-note-tag",children:e.tag}),(0,V.jsx)("span",{className:"release-note-text",children:e.text})]})})))}),Ae.length>7&&(0,V.jsx)(l.Ay,{type:"link",size:"small",style:{padding:0,marginTop:-8,color:"var(--idm-text-faint)"},onClick:()=>et((e=>!e)),children:Qe?"Show less":"Load more (".concat(Ae.length-7,")")})]})},"release-notes"):null,o=(0,V.jsx)("div",{className:"mobile welcome-section",children:(0,V.jsx)(s.A,{ghost:!0,items:[{key:"extras",label:(0,V.jsx)("span",{style:{fontWeight:600,fontSize:"14px"},children:"More features & tutorials"}),children:vt()}]})},"mobile-extras"),n=(0,V.jsx)("div",{className:"welcome-home-page",style:{padding:0},children:(0,V.jsxs)("div",{className:"mobile-app-banner",children:[(0,V.jsxs)("div",{className:"mobile-app-content",children:[(0,V.jsx)("h3",{children:"Download InstantDM App"}),(0,V.jsx)("p",{children:"Manage your automations, reply to DMs, and track analytics on the go. Available for iOS and Android."})]}),(0,V.jsxs)("div",{className:"mobile-app-actions",children:[(0,V.jsx)(l.Ay,{href:"https://apps.apple.com/in/app/insta-dm-app-instantdm/id6756658913",target:"_blank",icon:(0,V.jsx)(T.A,{style:{fontSize:18}}),className:"app-store-btn",children:"App Store"}),(0,V.jsx)(l.Ay,{href:"https://play.google.com/store/apps/details?id=com.replbetter.instantdm",target:"_blank",icon:(0,V.jsx)(H.A,{style:{fontSize:18,color:"#3DDC84"}}),className:"app-store-btn",style:{background:"#222 !important",color:"white !important",border:"1px solid #333 !important"},children:"Play Store"})]})]})},"mobile-app");return[De?(0,V.jsx)("div",{className:"welcome-section",style:{marginTop:24},children:(0,V.jsxs)("div",{className:"collab-request-banner",style:{background:"var(--idm-surface)",borderLeft:"4px solid var(--idm-brand-500)",cursor:"default",boxShadow:"var(--idm-shadow-sm)"},children:[(0,V.jsxs)("div",{className:"collab-banner-content",children:[(0,V.jsx)("div",{style:{background:"var(--idm-brand-50)",padding:12,borderRadius:12,display:"flex",alignItems:"center",justifyContent:"center"},children:(0,V.jsx)(N.A,{style:{fontSize:24,color:"var(--idm-brand-600)"}})}),(0,V.jsxs)("div",{className:"collab-banner-text",children:[(0,V.jsx)("h4",{style:{color:"#1a1a2e",fontSize:16,marginBottom:4},children:"Pending Shared Automation"}),(0,V.jsxs)("p",{style:{color:"#666",fontSize:14,margin:0},children:["You have a shared automation ",(0,V.jsxs)("strong",{children:['"',De.name,'"']})," waiting to be copied."]})]})]}),(0,V.jsxs)("div",{style:{display:"flex",gap:12},children:[(0,V.jsx)(l.Ay,{type:"text",onClick:()=>{localStorage.removeItem("pending_shared_template_id"),localStorage.removeItem("show_pending_shared_template"),Te(null)},style:{color:"#888"},children:"Dismiss"}),(0,V.jsx)(l.Ay,{type:"primary",icon:(0,V.jsx)(M.A,{}),style:{borderRadius:8,height:38,padding:"0 20px"},onClick:()=>{localStorage.removeItem("pending_shared_template_id"),localStorage.removeItem("show_pending_shared_template"),J("/flow?shared_id=".concat(De.id))},children:"Copy Now"})]})]})},"shared-template"):null,e,o,n,t]})()]}),(0,V.jsx)(u.A,{title:"Plans",open:ye,destroyOnClose:!0,onCancel:()=>fe(!1),footer:null,width:"100%",children:(0,V.jsx)(O.A,{currentPlan:localStorage.getItem("planid"),messageApi:ut,setPaymentLinkLoading:rt,setPaymentLinkData:at,source:"welcome_page"})}),(0,V.jsxs)(u.A,{open:Ne&&(null===Ce||void 0===Ce?void 0:Ce.length)>0,footer:null,onCancel:()=>Re(!1),centered:!0,title:"Pending Collaboration Requests",children:[(0,V.jsxs)("div",{style:{textAlign:"center",marginBottom:20},children:[(0,V.jsx)("img",{src:j,alt:"Collaboration",style:{height:120,marginBottom:16}}),(0,V.jsx)("p",{style:{color:"#666"},children:"You have pending requests to automate posts. Review them to start collaborating."})]}),(0,V.jsx)(g.A,{itemLayout:"horizontal",dataSource:Ce,renderItem:e=>{var t,o,n,a;return(0,V.jsx)(g.A.Item,{actions:[(0,V.jsx)(l.Ay,{type:"primary",onClick:()=>{window.location.href="/manage-post/".concat(e.post.id,"?invite_id=").concat(e.id,"&action=review")},children:"Review"})],children:(0,V.jsx)(g.A.Item.Meta,{avatar:(0,V.jsx)(c.A,{src:null===(t=e.sender)||void 0===t?void 0:t.picture}),title:(0,V.jsx)("a",{href:"#",children:null===(o=e.sender)||void 0===o?void 0:o.username}),description:(0,V.jsxs)("div",{children:[(0,V.jsx)("p",{style:{margin:0,fontSize:12},children:"Requested to automate post"}),(0,V.jsxs)(h.A,{gap:5,style:{marginTop:5},align:"center",children:[(0,V.jsx)("img",{src:null===(n=e.post)||void 0===n?void 0:n.image,style:{width:30,height:30,borderRadius:4,objectFit:"cover"}}
1),(0,V.jsx)("p",{style:{margin:0,fontSize:10,color:"#999",maxWidth:150,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:null===(a=e.post)||void 0===a?void 0:a.caption})]})]})})})}})]}),window.innerWidth>1e3&&Oe?(0,V.jsx)("div",{className:"desktop",style:{width:"40px",minWidth:"40px",height:"100vh",borderLeft:"1px solid var(--idm-border)",background:"var(--idm-surface)",position:"sticky",top:0,display:"flex",flexDirection:"column",alignItems:"center",paddingTop:"12px",cursor:"pointer"},onClick:Ue,children:(0,V.jsx)(y.A,{title:"Show insights panel",placement:"left",children:(0,V.jsx)(l.Ay,{size:"small",type:"text",icon:(0,V.jsx)(W.A,{})})})}):window.innerWidth>1e3?(0,V.jsxs)("div",{className:"desktop",style:{width:"320px",minWidth:"320px",height:"100vh",borderLeft:"1px solid var(--idm-border)",background:"var(--idm-surface)",display:"flex",flexDirection:"column",position:"sticky",top:0,overflow:"hidden"},children:[(0,V.jsxs)("div",{style:{flex:1,overflowY:"auto",padding:"16px",minHeight:0},children:[(0,V.jsx)("div",{style:{display:"flex",justifyContent:"flex-end",margin:"-6px -6px 2px 0"},children:(0,V.jsx)(y.A,{title:"Hide panel",placement:"left",children:(0,V.jsx)(l.Ay,{size:"small",type:"text",icon:(0,V.jsx)(F.A,{}),onClick:Ue})})}),vt(),(0,V.jsx)("div",{style:{borderTop:"1px solid var(--idm-border)",margin:"12px 0 16px"}}),(0,V.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"16px",position:"sticky",top:0,background:"var(--idm-surface)",zIndex:1,paddingBottom:"8px"},children:[(0,V.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,V.jsx)("span",{style:{fontSize:"16px"},children:"\u2728"}),(0,V.jsx)("h3",{style:{margin:0,fontSize:"15px",fontWeight:600},children:"DM Insights"}),(null===He||void 0===He||null===(U=He.counts)||void 0===U?void 0:U.unread)>0&&(0,V.jsx)(d.A,{count:He.counts.unread,size:"small"})]}),(0,V.jsx)("div",{style:{display:"flex",gap:"4px"},children:(0,V.jsx)(l.Ay,{size:"small",type:"text",icon:(0,V.jsx)(E.A,{}),loading:We,onClick:()=>{(0,q.A)({url:"dm-insights",method:"GET",loadingState:Fe,dataState:e=>{200===(null===e||void 0===e?void 0:e.code)&&Me(e)}})}})})]}),(0,V.jsxs)(f.Ay.Group,{size:"small",value:Pe,onChange:e=>qe(e.target.value),style:{marginBottom:10,width:"100%"},children:[(0,V.jsx)(f.Ay.Button,{value:"priority",style:{width:"50%",textAlign:"center",fontSize:11},children:"Priority"}),(0,V.jsx)(f.Ay.Button,{value:"latest",style:{width:"50%",textAlign:"center",fontSize:11},children:"Latest"})]}),We&&(0,V.jsx)("div",{style:{textAlign:"center",padding:20},children:(0,V.jsx)(x.A,{size:"small"})}),!We&&(null===He||void 0===He||null===(Y=He.data)||void 0===Y?void 0:Y.length)>0&&(()=>{const e={};He.data.forEach((t=>{const o=new Set;(t.intent_timeline||[]).forEach((t=>{o.has(t.intent)||(e[t.intent]=(e[t.intent]||0)+1,o.add(t.intent))}));const n=t.current_intent||"other";o.has(n)||(e[n]=(e[n]||0)+1)}));const t=Object.entries(e).sort(((e,t)=>t[1]-e[1])),o={purchase:"#52c41a",collaboration:"#1677ff",complaint:"#ff4d4f",support:"#ff4d4f",enquiry:"#faad14",partnership:"#722ed1",feedback:"#13c2c2",fan_message:"#eb2f96",brand_deal:"#1677ff",pricing:"#faad14",booking:"#722ed1"};return(0,V.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:"6px",marginBottom:"12px"},children:[(0,V.jsxs)("div",{onClick:()=>Be(null),style:{padding:"4px 10px",borderRadius:"6px",fontSize:"11px",cursor:"pointer",background:Ee?"#f5f5f5":"var(--idm-brand-500)",color:Ee?"#666":"white",fontWeight:600},children:["All (",He.data.length,")"]}),t.map((e=>{let[t,n]=e;return(0,V.jsxs)("div",{onClick:()=>Be(Ee===t?null:t),style:{padding:"4px 10px",borderRadius:"6px",fontSize:"11px",cursor:"pointer",background:Ee===t?o[t]||"#666":"#f5f5f5",color:Ee===t?"white":"#666",fontWeight:500,transition:"all 0.15s"},children:[t," (",n,")"]},t)}))]})})(),!We&&!(null!==He&&void 0!==He&&null!==(G=He.data)&&void 0!==G&&G.length)&&(0,V.jsxs)("div",{style:{textAlign:"center",padding:"40px 10px",color:"#666"},children:[(0,V.jsx)(B.A,{style:{fontSize:"32px",color:"#ccc",marginBottom:"12px"}}),(0,V.jsx)("p",{style:{margin:0,fontSize:"14px",fontWeight:500},children:"No insights yet"}),(0,V.jsx)("p",{style:{margin:"8px 0 16px",fontSize:"12px",color:"#aaa",lineHeight:"1.5"},children:"AI scans your incoming DMs and tags them as purchase, collaboration, complaint, etc. so you can prioritize what matters."}),(0,V.jsx)(l.Ay,{size:"small",type:"primary",ghost:!0,onClick:()=>{(0,q.A)({url:"dm-insights",method:"GET",loadingState:Fe,dataState:e=>{200===(null===e||void 0===e?void 0:e.code)&&Me(e)}})},children:"Refresh"})]}),null===He||void 0===He||null===(K=He.data)||void 0===K?void 0:K.filter((e=>!Ee||e.current_intent===Ee||(e.intent_timeline||[]).some((e=>e.intent===Ee)))).sort(((e,t)=>"latest"===Pe?new Date(t.last_seen||0)-new Date(e.last_seen||0):0)).map((e=>{var t,o,a,i,r,s;const d="high"===e.priority?"#ff4d4f":"medium"===e.priority?"#faad14":"#52c41a",p=(()=>{const t=Date.now()-new Date(e.last_seen).getTime(),o=Math.floor(t/6e4);if(o<60)return"".concat(o,"m");const n=Math.floor(o/60);return n<24?"".concat(n,"h"):"".concat(Math.floor(n/24),"d")})();return(0,V.jsxs)("div",{onClick:()=>{e.read||((0,q.A)({url:"dm-insights",method:"PUT",body:{sender_id:e.sender_id},loadingState:()=>{},dataState:()=>{}}),Me((t=>{var o;return(0,n.A)((0,n.A)({},t),{},{data:t.data.map((t=>t.sender_id===e.sender_id?(0,n.A)((0,n.A)({},t),{},{read:!0}):t)),counts:(0,n.A)((0,n.A)({},t.counts),{},{unread:Math.max(0,((null===(o=t.counts)||void 0===o?void 0:o.unread)||0)-1)})})}))),e.sender_username&&window.open("https://instagram.com/".concat(e.sender_username),"_blank")}
1,style:{display:"flex",alignItems:"flex-start",gap:"10px",padding:"10px",marginBottom:"4px",borderRadius:"8px",cursor:"pointer",transition:"all 0.15s",background:e.read?"transparent":"#f6f8ff"},onMouseEnter:e=>{e.currentTarget.style.background="#f5f5f5"},onMouseLeave:t=>{t.currentTarget.style.background=e.read?"transparent":"#f6f8ff"},children:[(0,V.jsxs)("div",{style:{position:"relative",flexShrink:0},children:[(0,V.jsx)(c.A,{size:36,src:null===(t=e.sender_detail)||void 0===t?void 0:t.profile_pic,children:null===(o=(e.sender_username||"?")[0])||void 0===o?void 0:o.toUpperCase()}),(0,V.jsx)("div",{style:{position:"absolute",bottom:-1,right:-1,width:10,height:10,borderRadius:"50%",background:d,border:"2px solid white"}})]}),(0,V.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,V.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,V.jsx)("span",{style:{fontWeight:e.read?500:700,fontSize:"13px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.sender_username?"@".concat(e.sender_username):null===(a=e.sender_id)||void 0===a?void 0:a.slice(0,10)}),(0,V.jsx)("span",{style:{fontSize:"11px",color:"#aaa",flexShrink:0},children:p})]}),(0,V.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"4px",marginTop:"2px"},children:[(0,V.jsx)(m.A,{color:"blue",style:{margin:0,fontSize:"10px",padding:"0 4px",lineHeight:"18px"},children:e.current_intent}),(null===(i=e.sender_detail)||void 0===i?void 0:i.follower_count)&&(0,V.jsx)("span",{style:{fontSize:"10px",color:"#aaa"},children:Number(e.sender_detail.follower_count).toLocaleString()})]}),(0,V.jsx)("p",{style:{margin:"3px 0 0",fontSize:"12px",color:"#888",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:(null===(r=e.intent_timeline)||void 0===r||null===(s=r[e.intent_timeline.length-1])||void 0===s?void 0:s.text)||""})]}),(0,V.jsx)(l.Ay,{size:"small",type:"text",danger:!0,style:{flexShrink:0,opacity:.4,fontSize:11,padding:"0 4px",height:20},onClick:t=>{t.stopPropagation(),(0,q.A)({url:"dm-insights",method:"DELETE",body:{sender_id:e.sender_id},loadingState:()=>{},dataState:()=>{}}),Me((t=>{var o;return(0,n.A)((0,n.A)({},t),{},{data:t.data.filter((t=>t.sender_id!==e.sender_id)),counts:(0,n.A)((0,n.A)({},t.counts),{},{total:Math.max(0,((null===(o=t.counts)||void 0===o?void 0:o.total)||0)-1)})})}))},children:"\u2715"})]},e.sender_id)}))]}),(0,V.jsxs)("div",{style:{flexShrink:0,background:"var(--idm-surface)",padding:"8px 16px",borderTop:"1px solid var(--idm-border)",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,V.jsx)(l.Ay,{type:"link",size:"small",onClick:()=>J("/ig?tab=3"),children:"View All \u2192"}),(0,V.jsx)(l.Ay,{size:"small",type:"text",icon:(0,V.jsx)(R.A,{}),onClick:()=>{(0,q.A)({url:"dm-insights",method:"GET",loadingState:Fe,dataState:e=>{200===(null===e||void 0===e?void 0:e.code)&&Me(e)}})},children:"Refresh"})]})]}):null]})}},27447:e=>{e.exports=JSON.parse('{"_comment":"Flow templates. WIRE FORMAT RULES: trigger MUST be id node-1 (publish validation + executor key on it); every edge needs sourceHandle \'<sourceId>-right\' (branch handles: \'<msgId>-followup-right\', \'<id>-follow-flow-right\'/\'-not-follow-flow-right\') and targetHandle \'<targetId>-left\'; triger_words spelling and string \'true\'/\'false\' flags are the stored format.","templates":[{"id":"lead-collection","name":"Lead Collection","description":"Comment keyword \u2192 collect name, email and phone \u2192 tag them lead","thumbnail":"\ud83d\udccb","category":"Leads","nodes":[{"id":"node-1","type":"triggerComp","position":{"x":40,"y":40},"data":{"auto_reply":{"comment_reply":{"enabled":true,"automate_all":"false","triger_words":["interested","info","details"],"all_posts":"true","match_exact_word":false},"dm_reply":{"enabled":false},"story_reply":{"enabled":false},"welcome_message":{"title":"","description":"","button":""}}
1}},{"id":"node-2","type":"messageReply","position":{"x":420,"y":40},"data":{"messages":[{"id":"lc-m1","type":"text","text":"Thanks for your interest! \ud83c\udf89 I\'d love to share the details \u2014 just need a few quick things first.","smartReplies":[],"templates":[],"audio_url":"","image_url":"","file_url":"","file_filename":"","track_url":false}]}},{"id":"node-3","type":"questionNode","position":{"x":800,"y":40},"data":{"messages":[{"id":"lc-q-name","question_type":"name","question":"What\'s your full name?","skip_option":{"enable":false,"skip_text":"Skip"},"retry_attempt":{"count":3},"wrong_input":{"message":"oops, it doesn\'t look like proper name here an example Vin diesal"},"smartReplies":[],"custom_variable_name":"name"}]}},{"id":"node-4","type":"questionNode","position":{"x":1180,"y":40},"data":{"messages":[{"id":"lc-q-email","question_type":"email","question":"What\'s the best email to reach you at?","skip_option":{"enable":false,"skip_text":"Skip"},"retry_attempt":{"count":3},"wrong_input":{"message":"oops, it doesn\'t look like proper email here an example [email protected]"},"smartReplies":[],"custom_variable_name":"email","skip_if_known":true}]}},{"id":"node-5","type":"questionNode","position":{"x":1560,"y":40},"data":{"messages":[{"id":"lc-q-phone","question_type":"phone","question":"And your WhatsApp number?","skip_option":{"enable":true,"skip_text":"Skip"},"retry_attempt":{"count":3},"wrong_input":{"message":"oops, it doesn\'t look like proper phone number here an example +919876543210"},"smartReplies":[],"custom_variable_name":"phone"}]}},{"id":"node-6","type":"messageReply","position":{"x":1940,"y":40},"data":{"messages":[{"id":"lc-m2","type":"text","text":"Perfect, {{name|friend}} \u2014 you\'re all set! \u2705 We\'ll be in touch at {{email}} very soon.","smartReplies":[],"templates":[],"audio_url":"","image_url":"","file_url":"","file_filename":"","track_url":false}]}},{"id":"node-7","type":"tagContact","position":{"x":2320,"y":40},"data":{"tags":["lead"],"tagsData":[{"id":"lead","name":"lead"}]}}],"edges":[{"id":"e1","source":"node-1","sourceHandle":"node-1-right","target":"node-2","targetHandle":"node-2-left"},{"id":"e2","source":"node-2","sourceHandle":"node-2-right","target":"node-3","targetHandle":"node-3-left"},{"id":"e3","source":"node-3","sourceHandle":"node-3-right","target":"node-4","targetHandle":"node-4-left"},{"id":"e4","source":"node-4","sourceHandle":"node-4-right","target":"node-5","targetHandle":"node-5-left"},{"id":"e5","source":"node-5","sourceHandle":"node-5-right","target":"node-6","targetHandle":"node-6-left"},{"id":"e6","source":"node-6","sourceHandle":"node-6-right","target":"node-7","targetHandle":"node-7-left"}]},{"id":"link-delivery","name":"Link Delivery + Reminder","description":"Comment keyword \u2192 DM a button with your link \u2192 remind after 30 min if no reply","thumbnail":"\ud83d\udd17","category":"Engagement","nodes":[{"id":"node-1","type":"triggerComp","position":{"x":40,"y":40},"data":{"auto_reply":{"comment_reply":{"enabled":true,"automate_all":"false","triger_words":["link","guide"],"all_posts":"true","match_exact_word":false},"dm_reply":{"enabled":false},"story_reply":{"enabled":false},"welcome_message":{"title":"","description":"","button":""}}
1}},{"id":"node-2","type":"messageReply","position":{"x":420,"y":40},"data":{"messages":[{"id":"ld-m1","type":"button","text":"","smartReplies":[],"templates":[{"id":"ld-t1","title":"Here\'s your link! \ud83d\udd17","description":"Tap below to access it \u2014 replace this link with yours.","buttons":[{"title":"Open Link","type":"web_url","url":"https://example.com/replace-me"}]}],"audio_url":"","image_url":"","file_url":"","file_filename":"","track_url":false,"follow_up_duration":30,"follow_up_duration_type":"m"}]}},{"id":"node-3","type":"messageReply","position":{"x":800,"y":300},"data":{"messages":[{"id":"ld-m2","type":"text","text":"Hey {{username|there}}! Just a quick reminder \u2014 your link is waiting for you. Let me know if you have any questions! \ud83d\udc40","smartReplies":[],"templates":[],"audio_url":"","image_url":"","file_url":"","file_filename":"","track_url":false}]}}],"edges":[{"id":"e1","source":"node-1","sourceHandle":"node-1-right","target":"node-2","targetHandle":"node-2-left"},{"id":"e2","source":"node-2","sourceHandle":"ld-m1-followup-right","target":"node-3","targetHandle":"node-3-left"}]},{"id":"email-collector-story","name":"Story Email Collector","description":"Story reply \u2192 collect email (only if unknown) \u2192 tag email-subscriber","thumbnail":"\ud83d\udce7","category":"Leads","nodes":[{"id":"node-1","type":"triggerComp","position":{"x":40,"y":40},"data":{"auto_reply":{"story_reply":{"enabled":true,"all_stories":"true","automate_all":"false","triger_words":["join"],"match_exact_word":false},"comment_reply":{"enabled":false},"dm_reply":{"enabled":false},"welcome_message":{"title":"","description":"","button":""}}
1}},{"id":"node-2","type":"questionNode","position":{"x":420,"y":40},"data":{"messages":[{"id":"ec-q-email","question_type":"email","question":"Awesome! \ud83d\udc8c Drop your email and I\'ll add you to the list.","skip_option":{"enable":false,"skip_text":"Skip"},"retry_attempt":{"count":3},"wrong_input":{"message":"oops, it doesn\'t look like proper email here an example [email protected]"},"smartReplies":[],"custom_variable_name":"email","skip_if_known":true}]}},{"id":"node-3","type":"messageReply","position":{"x":800,"y":40},"data":{"messages":[{"id":"ec-m1","type":"text","text":"You\'re in! \ud83c\udf89 Keep an eye on {{email}} \u2014 good stuff coming your way.","smartReplies":[],"templates":[],"audio_url":"","image_url":"","file_url":"","file_filename":"","track_url":false}]}},{"id":"node-4","type":"tagContact","position":{"x":1180,"y":40},"data":{"tags":["email-subscriber"],"tagsData":[{"id":"email-subscriber","name":"email-subscriber"}]}}],"edges":[{"id":"e1","source":"node-1","sourceHandle":"node-1-right","target":"node-2","targetHandle":"node-2-left"},{"id":"e2","source":"node-2","sourceHandle":"node-2-right","target":"node-3","targetHandle":"node-3-left"},{"id":"e3","source":"node-3","sourceHandle":"node-3-right","target":"node-4","targetHandle":"node-4-left"}]},{"id":"ai-receptionist","name":"AI Receptionist (Claude)","description":"Claude replies to every incoming DM \u2014 qualifies leads and collects details","thumbnail":"\ud83e\udd16","category":"AI","nodes":[{"id":"node-1","type":"triggerComp","position":{"x":40,"y":40},"data":{"auto_reply":{"dm_reply":{"enabled":true,"automate_all":"true","triger_words":[],"match_exact_word":false,"first_message_only":false},"comment_reply":{"enabled":false},"story_reply":{"enabled":false},"welcome_message":{"title":"","description":"","button":""}}
1}},{"id":"node-2","type":"aiReplyNode","position":{"x":420,"y":40},"data":{"selected_model":"anthropic","model_name":"claude-sonnet-4-6","max_tokens":1024,"output_reply_type":"rich_text","reply_mode":"multi","max_messages":3,"prompt_mode":"guided","custom_prompt":"","business_description":"Describe your business here \u2014 what you sell and who it\'s for.","offer":"","voice_and_tone":"friendly and professional","cta":"","qualification_flow":"Ask what they\'re looking for, then collect their email.","recent_chat_limit":50}}],"edges":[{"id":"e1","source":"node-1","sourceHandle":"node-1-right","target":"node-2","targetHandle":"node-2-left"}]},{"id":"event-registration","name":"Event / Webinar Registration","description":"Comment join \u2192 collect name + email \u2192 confirm and tag registered","thumbnail":"\ud83c\udf9f\ufe0f","category":"Leads","nodes":[{"id":"node-1","type":"triggerComp","position":{"x":40,"y":40},"data":{"auto_reply":{"comment_reply":{"enabled":true,"automate_all":"false","triger_words":["join","register"],"all_posts":"true","match_exact_word":false},"dm_reply":{"enabled":false},"story_reply":{"enabled":false},"welcome_message":{"title":"","description":"","button":""}}
1}},{"id":"node-2","type":"questionNode","position":{"x":420,"y":40},"data":{"messages":[{"id":"ev-q-name","question_type":"name","question":"You\'re almost in! \ud83c\udf9f\ufe0f What\'s your name?","skip_option":{"enable":false,"skip_text":"Skip"},"retry_attempt":{"count":3},"wrong_input":{"message":"oops, it doesn\'t look like proper name here an example Vin diesal"},"smartReplies":[],"custom_variable_name":"name"}]}},{"id":"node-3","type":"questionNode","position":{"x":800,"y":40},"data":{"messages":[{"id":"ev-q-email","question_type":"email","question":"And the email for your invite?","skip_option":{"enable":false,"skip_text":"Skip"},"retry_attempt":{"count":3},"wrong_input":{"message":"oops, it doesn\'t look like proper email here an example [email protected]"},"smartReplies":[],"custom_variable_name":"email","skip_if_known":true}]}},{"id":"node-4","type":"messageReply","position":{"x":1180,"y":40},"data":{"messages":[{"id":"ev-m1","type":"text","text":"You\'re registered, {{name|friend}}! \ud83c\udf89 The invite is on its way to {{email}}. See you there!","smartReplies":[],"templates":[],"audio_url":"","image_url":"","file_url":"","file_filename":"","track_url":false}]}},{"id":"node-5","type":"tagContact","position":{"x":1560,"y":40},"data":{"tags":["registered"],"tagsData":[{"id":"registered","name":"registered"}]}}],"edges":[{"id":"e1","source":"node-1","sourceHandle":"node-1-right","target":"node-2","targetHandle":"node-2-left"},{"id":"e2","source":"node-2","sourceHandle":"node-2-right","target":"node-3","targetHandle":"node-3-left"},{"id":"e3","source":"node-3","sourceHandle":"node-3-right","target":"node-4","targetHandle":"node-4-left"},{"id":"e4","source":"node-4","sourceHandle":"node-4-right","target":"node-5","targetHandle":"node-5-left"}]},{"id":"price-inquiry","name":"Price Inquiry","description":"Comment price \u2192 send price list \u2192 collect WhatsApp number","thumbnail":"\ud83d\udcac","category":"Sales","nodes":[{"id":"node-1","type":"triggerComp","position":{"x":40,"y":40},"data":{"auto_reply":{"comment_reply":{"enabled":true,"automate_all":"false","triger_words":["price","cost"],"all_posts":"true","match_exact_word":false},"dm_reply":{"enabled":false},"story_reply":{"enabled":false},"welcome_message":{"title":"","description":"","button":""}}
1}},{"id":"node-2","type":"messageReply","position":{"x":420,"y":40},"data":{"messages":[{"id":"pi-m1","type":"text","text":"Hey {{username|there}}! \ud83d\udc4b Here\'s our pricing:\\n\\n\u2022 Starter \u2014 $XX\\n\u2022 Pro \u2014 $XX\\n\u2022 Premium \u2014 $XX\\n\\n(Edit this message with your real prices!)","smartReplies":[],"templates":[],"audio_url":"","image_url":"","file_url":"","file_filename":"","track_url":false}]}},{"id":"node-3","type":"questionNode","position":{"x":800,"y":40},"data":{"messages":[{"id":"pi-q-phone","question_type":"phone","question":"Want a personal walkthrough? Drop your WhatsApp number and we\'ll reach out.","skip_option":{"enable":true,"skip_text":"No thanks"},"retry_attempt":{"count":3},"wrong_input":{"message":"oops, it doesn\'t look like proper phone number here an example +919876543210"},"smartReplies":[],"custom_variable_name":"phone"}]}},{"id":"node-4","type":"messageReply","position":{"x":1180,"y":40},"data":{"messages":[{"id":"pi-m2","type":"text","text":"Perfect \u2014 talk soon! \ud83d\ude4c","smartReplies":[],"templates":[],"audio_url":"","image_url":"","file_url":"","file_filename":"","track_url":false}]}}],"edges":[{"id":"e1","source":"node-1","sourceHandle":"node-1-right","target":"node-2","targetHandle":"node-2-left"},{"id":"e2","source":"node-2","sourceHandle":"node-2-right","target":"node-3","targetHandle":"node-3-left"},{"id":"e3","source":"node-3","sourceHandle":"node-3-right","target":"node-4","targetHandle":"node-4-left"}]},{"id":"giveaway-followers","name":"Followers-Only Giveaway","description":"Comment to enter \u2192 followers get confirmed + tagged, others are asked to follow","thumbnail":"\ud83c\udf81","category":"Engagement","nodes":[{"id":"node-1","type":"triggerComp","position":{"x":40,"y":40},"data":{"auto_reply":{"comment_reply":{"enabled":true,"automate_all":"false","triger_words":["giveaway","win"],"all_posts":"true","match_exact_word":false},"dm_reply":{"enabled":false},"story_reply":{"enabled":false},"welcome_message":{"title":"","description":"","button":""}}
1}},{"id":"node-2","type":"followersOnly","position":{"x":420,"y":40},"data":{"followers_only":true,"message_reply":"true","message":{"title":"Follow to enter! \ud83c\udf81","description":"Looks like you\'re not following us yet \u2014 follow and tap below to enter the giveaway.","button":"I started following you."}}},{"id":"node-3","type":"messageReply","position":{"x":800,"y":40},"data":{"messages":[{"id":"gv-m1","type":"text","text":"You\'re entered, {{username|friend}}! \ud83c\udf89 Winners announced soon \u2014 good luck!","smartReplies":[],"templates":[],"audio_url":"","image_url":"","file_url":"","file_filename":"","track_url":false}]}},{"id":"node-4","type":"tagContact","position":{"x":1180,"y":40},"data":{"tags":["giveaway-entry"],"tagsData":[{"id":"giveaway-entry","name":"giveaway-entry"}]}}],"edges":[{"id":"e1","source":"node-1","sourceHandle":"node-1-right","target":"node-2","targetHandle":"node-2-left"},{"id":"e2","source":"node-2","sourceHandle":"node-2-follow-flow-right","target":"node-3","targetHandle":"node-3-left"},{"id":"e3","source":"node-3","sourceHandle":"node-3-right","target":"node-4","targetHandle":"node-4-left"}]},{"id":"feedback-rating","name":"Feedback & Rating","description":"DM keyword \u2192 star rating \u2192 permission to share \u2192 tag reviewed","thumbnail":"\u2b50","category":"Engagement","nodes":[{"id":"node-1","type":"triggerComp","position":{"x":40,"y":40},"data":{"auto_reply":{"dm_reply":{"enabled":true,"automate_all":"false","triger_words":["feedback"],"match_exact_word":false,"first_message_only":false},"comment_reply":{"enabled":false},"story_reply":{"enabled":false},"welcome_message":{"title":"","description":"","button":""}}
1}},{"id":"node-2","type":"questionNode","position":{"x":420,"y":40},"data":{"messages":[{"id":"fb-q-rating","question_type":"rating","question":"We\'d love your feedback! How would you rate your experience?","skip_option":{"enable":false,"skip_text":"Skip"},"retry_attempt":{"count":3},"wrong_input":{"message":"oops, it doesn\'t look like proper rating, Please rate on a scale of 1(poor) to 5(very good)"},"smartReplies":["\u2b50\u2b50\u2b50\u2b50\u2b50","\u2b50\u2b50\u2b50\u2b50","\u2b50\u2b50\u2b50","\u2b50\u2b50","\u2b50"],"custom_variable_name":"rating"}]}},{"id":"node-3","type":"questionNode","position":{"x":800,"y":40},"data":{"messages":[{"id":"fb-q-share","question_type":"bool","question":"Thank you! May we share your review publicly?","skip_option":{"enable":false,"skip_text":"Skip"},"retry_attempt":{"count":3},"wrong_input":{"message":"Please choose from the given option"},"smartReplies":["Yes","No"],"custom_variable_name":"share_permission"}]}},{"id":"node-4","type":"messageReply","position":{"x":1180,"y":40},"data":{"messages":[{"id":"fb-m1","type":"text","text":"Thanks so much, {{username|friend}} \u2014 your feedback means a lot! \ud83d\udc9c","smartReplies":[],"templates":[],"audio_url":"","image_url":"","file_url":"","file_filename":"","track_url":false}]}},{"id":"node-5","type":"tagContact","position":{"x":1560,"y":40},"data":{"tags":["reviewed"],"tagsData":[{"id":"reviewed","name":"reviewed"}]}}],"edges":[{"id":"e1","source":"node-1","sourceHandle":"node-1-right","target":"node-2","targetHandle":"node-2-left"},{"id":"e2","source":"node-2","sourceHandle":"node-2-right","target":"node-3","targetHandle":"node-3-left"},{"id":"e3","source":"node-3","sourceHandle":"node-3-right","target":"node-4","targetHandle":"node-4-left"},{"id":"e4","source":"node-4","sourceHandle":"node-4-right","target":"node-5","targetHandle":"node-5-left"}]}]}')}}]); 2//# sourceMappingURL=3193.59f5fbc4.chunk.js.map
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.