PageSourceSearch

https://app.instantdm.com/static/js/2104.8335143f.chunk.js

js instantdm.com collected 2026-09-24 09:28:07 UTC 32,347 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkinsta_automate=self.webpackChunkinsta_automate||[]).push([[2104],{22104:(e,i,l)=>{l.r(i),l.d(i,{default:()=>Fe});var s=l(89379),t=l(65043),n=l(43569),r=l(31023),o=l(10898),a=l(96651),c=l(13382),d=l(63942),u=l(85578),x=l(97326),h=l(68662),p=l(45964),j=l(51753),A=l(26851),m=l(94434),v=l(16569),g=l(60647),y=l(99472),f=l(57692),C=l(8354),b=l(12624),k=l(96603),w=l(97914),T=l(78507),S=l(54522),P=l(76399),I=l(8918),F=l(48677),L=l(44990),U=l(52472),D=l(16727),N=l(3072),V=l(69376),q=l(661),E=l(68409),M=l(51238),R=l(1043),O=l.n(R),z=l(13256),B=l(94008),_=l(12481),Y=l(50849),H=l(41402),W=l(62803),Q=l(75337),G=l(67407),J=l(61966),K=l(7130),Z=l(73139),$=l(68330),X=l(17689),ee=l(94733),ie=l(58168);const le={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"minus-circle",theme:"outlined"};var se=l(22172),te=function(e,i){return t.createElement(se.A,(0,ie.A)({},e,{ref:i,icon:le}))};const ne=t.forwardRef(te);var re=l(10454),oe=l(1919),ae=l(46237),ce=l(91736),de=l(70579);const{Text:ue}=r.A,xe=e=>{let{editor:i}=e;const[l,s]=(0,t.useState)(!1),[n,r]=(0,t.useState)(!1),[x,h]=(0,t.useState)(""),[p,j]=(0,t.useState)("");if(!i)return null;return(0,de.jsxs)(de.Fragment,{children:[(0,de.jsx)("div",{className:"menu-bar",children:(0,de.jsxs)(o.A,{children:[(0,de.jsx)(a.A,{title:"Bold",children:(0,de.jsx)(c.Ay,{type:i.isActive("bold")?"primary":"default",icon:(0,de.jsx)(z.A,{}),onClick:()=>i.chain().focus().toggleBold().run()})}),(0,de.jsx)(a.A,{title:"Italic",children:(0,de.jsx)(c.Ay,{type:i.isActive("italic")?"primary":"default",icon:(0,de.jsx)(B.A,{}),onClick:()=>i.chain().focus().toggleItalic().run()})}),(0,de.jsx)(a.A,{title:"Underline",children:(0,de.jsx)(c.Ay,{type:i.isActive("underline")?"primary":"default",icon:(0,de.jsx)(_.A,{}),onClick:()=>i.chain().focus().toggleUnderline().run()})}),(0,de.jsx)(a.A,{title:"Heading 2",children:(0,de.jsx)(c.Ay,{type:i.isActive("heading",{level:2})?"primary":"default",icon:(0,de.jsx)(Y.A,{}),onClick:()=>i.chain().focus().toggleHeading({level:2}).run()})}),(0,de.jsx)(a.A,{title:"Insert Link",children:(0,de.jsx)(c.Ay,{icon:(0,de.jsx)(H.A,{}),onClick:()=>s(!0)})}),(0,de.jsx)(a.A,{title:"Embed YouTube",children:(0,de.jsx)(c.Ay,{icon:(0,de.jsx)(W.A,{}),onClick:()=>r(!0)})})]})}),(0,de.jsx)(d.A,{title:"Insert Link",open:l,onOk:()=>{x&&(i.chain().focus().setLink({href:x}).run(),s(!1),h(""))},onCancel:()=>s(!1),okText:"Insert",children:(0,de.jsx)(u.A,{placeholder:"https://example.com",value:x,onChange:e=>h(e.target.value)})}),(0,de.jsx)(d.A,{title:"Embed YouTube Video",open:n,onOk:()=>{p&&(i.chain().focus().setYoutubeVideo({src:p}).run(),r(!1),j(""))},onCancel:()=>r(!1),okText:"Embed",children:(0,de.jsx)(u.A,{placeholder:"https://www.youtube.com/watch?v=xyz",value:p,onChange:e=>j(e.target.value)})})]})},he=e=>{let{data:i,onChange:l}=e;const s=(0,L.hG)({extensions:[U.A,D.A,N.Ay.configure({openOnClick:!1}),V.A.configure({width:640,height:360}),q.A.configure({levels:[1,2,3]})],content:i||"Click to add description, youtube video, link to platfrom and more.",onUpdate:e=>{let{editor:i}=e;null===l||void 0===l||l(i.getHTML())}});return(0,de.jsxs)("div",{className:"editor-wrapper",children:[(0,de.jsx)(xe,{editor:s}),(0,de.jsx)(L.$Z,{editor:s})]})},{TextArea:pe}=u.A;function je(e){let{faqs:i,setFaqs:l}=e;const[s,n]=(0,t.useState)(!1),[r,o]=(0,t.useState)(""),[a,h]=(0,t.useState)(""),[p,j]=(0,t.useState)(null),A=()=>{o(""),h(""),j(null)};return(0,de.jsxs)("div",{children:[(0,de.jsx)("p",{children:"FAQ"}),(0,de.jsx)(c.Ay,{type:"dashed",icon:(0,de.jsx)(Q.A,{}),onClick:()=>n(!0),children:"Add FAQ"}),(0,de.jsx)("div",{style:{marginTop:16,display:"flex",flexDirection:"column",gap:12},children:i.map(((e,s)=>(0,de.jsx)("div",{className:"faq-card",children:(0,de.jsx)(x.A,{items:[{key:"1",label:e.question,children:(0,de.jsxs)("div",{children:[" ",(0,de.jsx)("p",{children:e.answer}),(0,de.jsxs)("div",{className:"faq-actions",children:[(0,de.jsx)(c.Ay,{size:"small",type:"text",onClick:()=>(e=>{j(e),o(i[e].question),h(i[e].answer),n(!0)})(s),children:(0,de.jsx)(G.A,{})}),(0,de.jsx)(c.Ay,{size:"small",type:"text",danger:!0,onClick:()=>(e=>{const s=[...i];s.splice(e,1),l(s)})(s),children:(0,de.jsx)(J.A,{})})]})]})}]})},s)))}),(0,de.jsx)(d.A,{title:null!==p?"Edit FAQ":"Add FAQ",open:s,onOk:()=>{const e={question:r,answer:a};if(null!==p){const s=[...i];s[p]=e,l(s)}else l([...i,e]);n(!1),A()},onCancel:()=>{n(!1),A()},okText:null!==p?"Update":"Add",children:(0,de.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:12},children:[(0,de.jsx)(u.A,{placeholder:"Enter question",value:r,onChange:e=>o(e.target.value)}),(0,de.jsx)(pe,{rows:3,placeholder:"Enter answer",value:a,onChange:e=>h(e.target.value)})]})})]})}function Ae(e){let{testimonials:i,setTestimonials:l}=e;const s=[{label:(0,de.jsxs)("p",{children:[(0,de.jsx)(K.A,{style:{color:"skyblue"}})," Twitter"]}),value:"Twitter"},{label:(0,de.jsxs)("p",{children:[(0,de.jsx)(Z.A,{style:{color:"violet"}})," Instagram"]}),value:"Instagram"},{label:(0,de.jsxs)("p",{children:[(0,de.jsx)($.A,{style:{color:"blue"}})," LinkedIn"]}),value:"LinkedIn"},{label:(0,de.jsxs)("p",{children:[(0,de.jsx)(X.A,{style:{color:"red"}})," Youtube"]}),value:"YouTube"}],[n,r]=(0,t.useState)(!1),[a,x]=(0,t.useState)(null),[v,g]=(0,t.useState)(""),[y,f]=(0,t.useState)(""),[C,b]=(0,t.useState)(""),[k,w]=(0,t.useState)(5),[T,S]=(0,t.useState)(0),[P,I]=(0,t.useState)(null),F=()=>{x(null),g(""),f(""),b(""),w(0),I(null)};return(0,de.jsxs)("div",{children:[(0,de.jsx)("p",{children:"Testimonials"}),(0,de.jsx)(c.Ay,{type:"dashed",icon:(0,de.jsx)(Q.A,{}),onClick:()=>r(!0),children:"Add Testimonial"}),(0,de.jsx)("div",{className:"testimonial-cards",children:i.map(((e,s)=>(0,de.jsx)("div",{className:"testimonial-card",children:(0,de.jsx)(h.A,{size:"small",children:(0,de.jsxs)(o.A,{align:"start",children:[(0,de.jsx)(p.A,{src:e.profilePicUrl}),(0,de.jsxs)("div",{style:{flex:1},children:[(0,de.jsx)("strong",{children:e.name})," \u2014 ",e.social,(0,de.jsx)("div",{children:(0,de.jsx)(j.A,{disabled:!0,defaultValue:e.rating})}),(0,de.jsx)("p",{style:{margin:0},children:e.review}),(0,de.jsxs)("div",{className:"testimonial-actions",children:[(0,de.jsx)(c.Ay,{type:"text",size:"small",onClick:()=>(e=>{const l=i[e];f(l.name),b(l.review),g(l.social),w(l.rating),x(l.profilePicUrl),I(e),r(!0)})(s),children:(0,de.jsx)(G.A,{})}),(0,de.jsx)(c.Ay,{type:"text",size:"small",danger:!0,onClick:()=>(e=>{const s=[...i];s.splice(e,1),l(s)})(s),children:(0,de.jsx)(J.A,{})})]})]})]})})},s)))}),(0,de.jsx)(d.A,{title:"Add Testimonial",open:n,onOk:()=>{const e={name:y,review:C,social:v,rating:k,profilePicUrl:null};!function(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(e.profilePicUrl=s,null!==P){const s=[...i];s[P]=e,l(s)}else l([...i,e]);r(!1),x(null),F()}(a?"".concat(a):null)},onCancel:()=>{r(!1),F()},okText:"Add",children:(0,de.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:16},children:[(0,de.jsxs)("div",{children:[(0,de.jsx)("label",{children:"Profile Picture"}),(0,de.jsx)(A.A,{beforeUpload:e=>!1,maxCount:1,onChange:e=>{let{file:i}=e;ve({file:i,product_id:"some-id",uploadStatus:S,setURL:e=>{x((i=>e))}})},listType:"picture",fileList:a?[{uid:"-1",name:"Profile Picture",status:"done",url:a}]:[],onRemove:()=>{x(null)},children:(0,de.jsx)(c.Ay,{icon:(0,de.jsx)(ee.A,{}),children:"Upload"})})]}),(0,de.jsxs)("div",{children:[(0,de.jsx)("label",{children:"Social Media"}
1),(0,de.jsx)(m.A,{options:s,value:v,onChange:g,placeholder:"Select platform",style:{width:"100%"}})]}),(0,de.jsxs)("div",{children:[(0,de.jsx)("label",{children:"Reviewer Name"}),(0,de.jsx)(u.A,{value:y,onChange:e=>f(e.target.value),placeholder:"e.g. John Doe"})]}),(0,de.jsxs)("div",{children:[(0,de.jsx)("label",{children:"Review"}),(0,de.jsx)(pe,{rows:3,value:C,onChange:e=>b(e.target.value),placeholder:"Write the review here..."})]}),(0,de.jsxs)("div",{children:[(0,de.jsx)("label",{children:"Rating"}),(0,de.jsx)(j.A,{value:k,onChange:w})]})]})})]})}function me(e){let{benefits:i,setBenefits:l}=e;return(0,de.jsxs)("div",{style:{width:"100%"},children:[(0,de.jsx)("p",{children:"Course Benefits"}),(0,de.jsxs)(o.A,{direction:"vertical",style:{width:"100%"},children:[i.map(((e,s)=>(0,de.jsxs)("div",{style:{display:"flex",gap:8},children:[(0,de.jsx)(u.A,{placeholder:"Benefit ".concat(s+1),value:e,onChange:e=>((e,s)=>{const t=[...i];t[e]=s,l(t)})(s,e.target.value),style:{flex:1}}),i.length>1&&(0,de.jsx)(ne,{onClick:()=>(e=>{const s=i.filter(((i,l)=>l!==e));l(s)})(s),style:{color:"red",marginTop:8}})]},s))),(0,de.jsx)(c.Ay,{block:!0,type:"dashed",onClick:()=>{l([...i,""])},icon:(0,de.jsx)(Q.A,{}),children:"Add Benefit"})]})]})}const ve=async e=>{let{file:i,product_id:l,messageApi:s,uploadStatus:t,setURL:n}=e,r=(0,M.A)(),o=i.name.split(".").pop(),a=await(0,E.A)(s,i,l,r,o,t);return n&&n(a),a};function ge(e){let{modules:i,setModules:l}=e;const[n,r]=(0,t.useState)(!1),[a,x]=(0,t.useState)(""),[p,j]=(0,t.useState)(!1),[m,k]=(0,t.useState)(null),[w,T]=v.Ay.useMessage(),[S,P]=(0,t.useState)(!1),[I,F]=(0,t.useState)({name:"",videoLink:"",videoFile:null,isFreePreview:!1,description:"",material:null}),[L,U]=(0,t.useState)(null),[D,N]=(0,t.useState)(null),V=()=>{F({name:"",videoLink:"",videoFile:null,isFreePreview:!1,description:"",material:null}),P(!1)},[q,E]=(0,t.useState)(0),M=function(e){let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(k(e),null!==l){const t=i[e].lessons[l];F((0,s.A)({},t)),U(l),P(!1)}else V(),U(null);j(!0)};return(0,de.jsxs)("div",{children:[(0,de.jsxs)("div",{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignContent:"center",justifyItems:"center",alignItems:"center"},children:[(0,de.jsx)("p",{children:"Course Syllabus"}),(0,de.jsx)(c.Ay,{color:"default",variant:"outlined",icon:(0,de.jsx)(Q.A,{}),onClick:()=>r(!0),children:"Add Chapter"})]}),(0,de.jsx)("div",{style:{marginTop:16,display:"flex",flexDirection:"column",gap:16},children:i.map(((e,s)=>(0,de.jsxs)(h.A,{title:e.name,extra:(0,de.jsxs)(o.A,{children:[(0,de.jsxs)(g.A,{title:"Are you sure you want to delete it?",onConfirm:()=>(e=>{const s=[...i];s.splice(e,1),l(s)})(s),children:[" ",(0,de.jsxs)(c.Ay,{color:"default",variant:"text",children:[" ",(0,de.jsx)(J.A,{style:{color:"red"}})," "]})," "]}),(0,de.jsxs)(c.Ay,{color:"default",variant:"text",onClick:()=>{x(e.name),N(s),r(!0)},children:[" ",(0,de.jsx)(G.A,{})," "]}),(0,de.jsxs)(c.Ay,{size:"small",type:"link",onClick:()=>M(s),children:[(0,de.jsx)(Q.A,{})," Lesson"]})]}),children:[0===e.lessons.length&&(0,de.jsx)(y.A,{title:"No Lessons",description:"No lessons yet."}),e.lessons.map(((e,t)=>(0,de.jsxs)(h.A,{size:"small",style:{marginBottom:8},actions:[(0,de.jsx)(c.Ay,{size:"small",type:"link",onClick:()=>M(s,t),children:"Edit"}),(0,de.jsx)(g.A,{title:"Are you sure you want to delete it?",onConfirm:()=>((e,s)=>{const t=[...i];t[e].lessons.splice(s,1),l(t)})(s,t),children:(0,de.jsx)(c.Ay,{size:"small",type:"link",danger:!0,children:"Delete"})})],children:[(0,de.jsx)("strong",{children:e.name})," ",e.isFreePreview?"\u2b50 Free Preview":""]},t)))]},s)))}),(0,de.jsx)(d.A,{open:n,onCancel:()=>{r(!1),N(null),x("")},onOk:()=>{if(""!==a.trim()){if(null!==D){i[D].name=a}else l([...i,{name:a,lessons:[]}]);x(""),r(!1)}},title:null!=D?"Edit Chapter":"Add Chapter",children:(0,de.jsx)(u.A,{placeholder:"Chapter name",value:a,onChange:e=>x(e.target.value)})}),(0,de.jsx)(d.A,{open:p,onCancel:()=>j(!1),onOk:()=>{if(""===I.name.trim())return;const e=[...i];null!==L?e[m].lessons[L]=(0,s.A)({},I):e[m].lessons.push((0,s.A)({},I)),l(e),j(!1),V(),U(null)},title:"Add Lesson",children:(0,de.jsxs)(o.A,{direction:"vertical",style:{width:"100%"},children:[(0,de.jsx)("h3",{children:"Lesson name"}),(0,de.jsx)(u.A,{placeholder:"Lesson name",value:I.name,onChange:e=>F((0,s.A)((0,s.A)({},I),{},{name:e.target.value}))}),!I.videoLink&&(0,de.jsxs)(A.A,{beforeUpload:e=>(F((0,s.A)((0,s.A)({},I),{},{custom_upload:!0})),!1),maxCount:1,onChange:e=>{let{file:i}=e;F((0,s.A)((0,s.A)({},I),{},{url:ve({file:i,product_id:"some-id",messageApi:w,uploadStatus:E,setURL:e=>{F((0,s.A)((0,s.A)({},I),{},{videoLink:e}))}})}))},children:[(0,de.jsx)(c.Ay,{icon:(0,de.jsx)(ee.A,{}),block:!0,color:"purple",variant:"outlined",children:"Upload Video"}),(0,de.jsx)("p",{style:{color:"rgba(0,0,0,.4)",textAlign:"center",margin:"0 auto",marginTop:"10px"},children:"No size Limit"})]}),q>0&&q<100&&(0,de.jsx)(f.A,{percent:q}),!I.videoLink&&(0,de.jsx)(C.A,{children:"or paste video link"}),!I.custom_upload&&(0,de.jsx)(u.A,{prefix:(0,de.jsx)(re.A,{style:{color:"blue"}}),placeholder:"Youtube or video link",value:I.videoLink,onChange:e=>F((0,s.A)((0,s.A)({},I),{},{videoLink:e.target.value}))}),I.videoLink&&(0,de.jsx)(O(),{style:{maxWidth:"100%"},controls:!0,url:I.videoLink}
1),I.videoLink&&(0,de.jsx)(c.Ay,{block:!0,color:"danger",variant:"solid",onClick:()=>{F((0,s.A)((0,s.A)({},I),{},{custom_upload:void 0,videoLink:""}))},children:"Remove Video"}),(0,de.jsx)(C.A,{}),S?(0,de.jsxs)(de.Fragment,{children:[(0,de.jsx)("h3",{children:"Description"}),(0,de.jsx)(he,{data:I.description,onChange:e=>{F((0,s.A)((0,s.A)({},I),{},{description:e}))}}),(0,de.jsx)("h3",{children:"Upload Supporting Material"}),(0,de.jsx)(A.A,{beforeUpload:e=>(F((0,s.A)((0,s.A)({},I),{},{material:e})),!1),maxCount:1,children:(0,de.jsx)(c.Ay,{color:"pink",variant:"outlined",icon:(0,de.jsx)(ee.A,{}),block:!0,children:"Upload Pdf, Docs, Images (50 MB Max)"})}),(0,de.jsxs)("div",{style:{marginBottom:"0px",width:"100%",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between"},children:[(0,de.jsx)("h3",{children:"Free Lesson"}),(0,de.jsx)(b.A,{checked:I.isFreePreview,onChange:e=>F((0,s.A)((0,s.A)({},I),{},{isFreePreview:e}))})]}),(0,de.jsx)("p",{style:{marginTop:"-14px",opacity:".4"},children:"Include this as free lesson for preview"}),(0,de.jsx)(c.Ay,{onClick:()=>{P(!1)},block:!0,children:"Hide Advance option"})]}):(0,de.jsx)(c.Ay,{type:"dashed",block:!0,onClick:()=>{P(!0)},children:"Show Advance option"})]})})]})}const{Option:ye}=m.A;function fe(e){let{validity:i,setValidity:l}=e;return void 0===i||void 0===l?(0,de.jsx)(de.Fragment,{}):(0,de.jsxs)("div",{children:[(0,de.jsx)("p",{children:"Course Validity"}),(0,de.jsxs)(k.Ay.Group,{block:!0,onChange:e=>{l((0,s.A)((0,s.A)({},i),{},{type:e.target.value}))},value:i.type,optionType:"button",children:[(0,de.jsx)(k.Ay,{value:"lifetime",children:"Lifetime Access"}),(0,de.jsx)(k.Ay,{value:"limited",children:"Limited Access"})]}),"limited"===i.type&&(0,de.jsxs)(de.Fragment,{children:[(0,de.jsxs)("div",{style:{marginTop:"10px"},children:[(0,de.jsx)(w.A,{min:1,value:i.limitValue,style:{width:"48%",marginRight:"2%"},onChange:e=>l((0,s.A)((0,s.A)({},i),{},{limitValue:e}))}),(0,de.jsxs)(m.A,{value:i.limitUnit,onChange:e=>l((0,s.A)((0,s.A)({},i),{},{limitUnit:e})),style:{width:"50%"},children:[(0,de.jsx)(ye,{value:"days",children:"Days"}),(0,de.jsx)(ye,{value:"months",children:"Months"})]})]}),(0,de.jsxs)("p",{children:["Students can access the content for only ",(0,de.jsxs)("b",{children:[i.limitValue," ",i.limitUnit]})," from the date of purchase. "]})]})]})}function Ce(e){let{pricing:i,setPricing:l}=e;return(0,de.jsxs)("div",{children:[(0,de.jsx)("p",{children:"Pricing"}),(0,de.jsxs)(k.Ay.Group,{value:i.pricingType,onChange:e=>l((0,s.A)((0,s.A)({},i),{},{pricingType:e.target.value})),optionType:"button",block:!0,children:[(0,de.jsx)(k.Ay,{value:"fixed",children:"Fixed Price"}),(0,de.jsx)(k.Ay,{value:"student",children:"User Decide Price"})]}),"fixed"===i.pricingType&&(0,de.jsxs)(o.A,{direction:"vertical",size:"middle",style:{width:"100%"},children:[(0,de.jsxs)("div",{children:[(0,de.jsx)("p",{children:"Regular Price"}),(0,de.jsx)(w.A,{min:0,style:{width:"100%"},value:i.regularPrice,onChange:e=>l((0,s.A)((0,s.A)({},i),{},{regularPrice:e||0})),prefix:"\u20b9"})]}),(0,de.jsxs)("div",{children:[(0,de.jsx)("p",{children:"Offer Price"}),(0,de.jsx)(w.A,{min:0,style:{width:"100%"},value:i.offerPrice,onChange:e=>l((0,s.A)((0,s.A)({},i),{},{offerPrice:e||0})),prefix:"\u20b9"})]})]}),"student"===i.pricingType&&(0,de.jsxs)(o.A,{direction:"vertical",size:"middle",style:{width:"100%"},children:[(0,de.jsxs)("div",{children:[(0,de.jsx)("p",{children:"Minimum Price"}),(0,de.jsx)(w.A,{min:0,style:{width:"100%"},value:i.minPrice,onChange:e=>l((0,s.A)((0,s.A)({},i),{},{minPrice:e||0})),prefix:"\u20b9"})]}),(0,de.jsxs)("div",{children:[(0,de.jsx)("p",{children:"Suggested Price"}),(0,de.jsx)(w.A,{min:0,style:{width:"100%"},value:i.suggestedPrice,onChange:e=>l((0,s.A)((0,s.A)({},i),{},{suggestedPrice:e||0})),prefix:"\u20b9"})]})]})]})}const be=e=>{let{customFields:i,setCustomFields:l}=e;const[n,r]=(0,t.useState)(!1),[a]=T.A.useForm();return(0,de.jsxs)("div",{children:[(0,de.jsx)(ue,{strong:!0,children:"Student Fields:"}),(0,de.jsx)(ce.JY,{onDragEnd:e=>{if(!e.destination)return;const s=[...i],[t]=s.splice(e.source.index,1);s.splice(e.destination.index,0,t),l(s)},children:(0,de.jsx)(ce.gL,{droppableId:"fields",children:e=>(0,de.jsx)(S.A,(0,s.A)((0,s.A)({bordered:!0,style:{marginTop:12},ref:e.innerRef},e.droppableProps),{},{dataSource:i,renderItem:(e,t)=>
1{e.isDefault;const n=["email","mobile"].includes(e.label.toLowerCase());return(0,de.jsx)(ce.sx,{draggableId:e.label+t,index:t,children:(r,a)=>(0,de.jsx)(S.A.Item,(0,s.A)((0,s.A)({ref:r.innerRef},r.draggableProps),{},{style:(0,s.A)((0,s.A)({},r.draggableProps.style),{},{background:a.isDragging?"#fafafa":"white"}),actions:[(0,de.jsx)(g.A,{title:"Delete this field?",onConfirm:()=>(e=>{const s=[...i];s.splice(e,1),l(s)})(t),okText:"Yes",cancelText:"No",children:(0,de.jsx)(J.A,{})}),n&&(0,de.jsxs)(o.A,{children:[(0,de.jsx)("span",{children:"Verify via OTP"}),(0,de.jsx)(b.A,{checked:e.verifyWithOTP,onChange:e=>((e,s)=>{const t=[...i];t[e].verifyWithOTP=s,l(t)})(t,e)})]})],children:(0,de.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:12,width:"100%"},children:[(0,de.jsx)("div",(0,s.A)((0,s.A)({},r.dragHandleProps),{},{style:{cursor:"grab"},children:(0,de.jsx)(oe.A,{style:{opacity:".4"}})})),(0,de.jsxs)(o.A,{direction:"vertical",style:{width:"100%"},children:[(0,de.jsx)(ue,{strong:!0,children:e.label}),(0,de.jsxs)(ue,{type:"secondary",children:["Type: ",(0,de.jsx)(P.A,{color:"blue",children:e.type})]})]})]})}))},e.label+t)}}))})}),(0,de.jsx)(c.Ay,{icon:(0,de.jsx)(Q.A,{}),type:"primary",style:{marginTop:16},onClick:()=>r(!0),children:"Add Field"}),(0,de.jsx)(d.A,{title:"Add Custom Field",open:n,onCancel:()=>r(!1),footer:null,children:(0,de.jsxs)(T.A,{form:a,layout:"vertical",onFinish:e=>{const s={label:e.label.trim(),type:e.type,options:e.options||[],isDefault:!1};l([...i,s]),a.resetFields(),r(!1)},children:[(0,de.jsx)(T.A.Item,{label:"Field Label",name:"label",rules:[{required:!0,message:"Please enter field name"}],children:(0,de.jsx)(u.A,{})}),(0,de.jsx)(T.A.Item,{label:"Field Type",name:"type",rules:[{required:!0,message:"Please select field type"}],children:(0,de.jsxs)(m.A,{placeholder:"Select a type",children:[(0,de.jsx)(ye,{value:"text",children:"Text"}),(0,de.jsx)(ye,{value:"dropdown",children:"Dropdown (Single choice)"}),(0,de.jsx)(ye,{value:"checkbox",children:"Checkbox (Multiple choices)"})]})}),(0,de.jsx)(T.A.Item,{shouldUpdate:(e,i)=>e.type!==i.type,children:()=>{const e=a.getFieldValue("type");return"dropdown"===e||"checkbox"===e?(0,de.jsx)(T.A.Item,{label:"Options",name:"options",rules:[{required:!0,message:"Please provide at least one option"}],children:(0,de.jsx)(m.A,{mode:"tags",placeholder:"Enter options and press enter",tokenSeparators:[","]})}):null}}),(0,de.jsx)(T.A.Item,{children:(0,de.jsx)(c.Ay,{type:"primary",htmlType:"submit",block:!0,children:"Add Field"})})]})})]})},ke=e=>{let{coupons:i,setCoupons:l}=e;const[s]=T.A.useForm(),[n,r]=(0,t.useState)(!1);return(0,de.jsxs)("div",{style:{marginTop:24},children:[(0,de.jsx)(ue,{strong:!0,children:"Discount Coupons:"}),(0,de.jsx)(S.A,{bordered:!0,style:{marginTop:12},dataSource:i,renderItem:(e,s)=>(0,de.jsx)(S.A.Item,{actions:[(0,de.jsx)(g.A,{title:"Delete this coupon?",onConfirm:()=>(e=>{const s=[...i];s.splice(e,1),l(s)})(s),okText:"Yes",cancelText:"No",children:(0,de.jsx)(J.A,{})})],children:(0,de.jsx)(o.A,{direction:"vertical",style:{width:"100%"},children:(0,de.jsxs)(ue,{strong:!0,children:[e.code," ",(0,de.jsx)(P.A,{color:"percent"===e.type?"blue":"green",children:"percent"===e.type?"".concat(e.value,"%"):"\u20b9".concat(e.value)})]})})})}),(0,de.jsx)(c.Ay,{icon:(0,de.jsx)(Q.A,{}),type:"primary",style:{marginTop:16},onClick:()=>r(!0),children:"Add Coupon"}),(0,de.jsx)(d.A,{title:"Add Discount Coupon",open:n,onCancel:()=>r(!1),footer:null,children:(0,de.jsxs)(T.A,{form:s,layout:"vertical",onFinish:e=>{const t=e.code.trim().toUpperCase();if(i.some((e=>e.code===t)))return void d.A.error({title:"Duplicate Coupon",content:"This coupon code already exists. Try another code."});const n={code:t,type:e.type,value:e.value};l([...i,n]),s.resetFields(),r(!1)},children:[(0,de.jsx)(T.A.Item,{label:"Coupon Code",name:"code",rules:[{required:!0,message:"Please enter a coupon code"}],children:(0,de.jsx)(u.A,{placeholder:"E.g. SAVE10"})}),(0,de.jsx)(T.A.Item,{label:"Discount Type",name:"type",rules:[{required:!0,message:"Please select discount type"}],children:(0,de.jsxs)(m.A,{placeholder:"Select type",children:[(0,de.jsx)(ye,{value:"percent",children:"Percent (%)"}),(0,de.jsx)(ye,{value:"amount",children:"Fixed Amount (\u20b9)"})]})}),(0,de.jsx)(T.A.Item,{label:"Discount Value",name:"value",rules:[{required:!0,message:"Enter discount value"}],children:(0,de.jsx)(w.A,{min:1,max:1e4,style:{width:"100%"},placeholder:"E.g. 10 or 500"})}),(0,de.jsx)(T.A.Item,{children:(0,de.jsx)(c.Ay,{type:"primary",htmlType:"submit",block:!0,children:"Add Coupon"})})]})})]})},we=e=>{var i;let{policies:l,setPolicies:n}=e;const[r,a]=(0,t.useState)(!1),[u,x]=(0,t.useState)(""),[h,p]=(0,t.useState)(""),j={terms:"Terms & Conditions",refund:"Refund Policy",privacy:"Privacy Policy"};return(0,de.jsxs)("div",{style:{marginTop:24},children:[(0,de.jsx)(ue,{strong:!0,children:"Policies:"}),(0,de.jsx)(S.A,{bordered:!0,style:{marginTop:12},dataSource:Object.entries(j),renderItem:e=>{let[i,s]=e;return(0,de.jsx)(S.A.Item,{actions:[(0,de.jsxs)(c.Ay,{type:"link",onClick:()=>(e=>{x(e),p(l[e]),a(!0)})(i),children:[l[i]?"Update":"Set"," Policy"]})],children:(0,de.jsx)(o.A,{direction:"vertical",children:(0,de.jsx)(ue,{strong:!0,children:s})})})}}),(0,de.jsx)(d.A,{title:j[u],open:r,onCancel:()=>a(!1),onOk:()=>{let e=(0,s.A)({},l);e[u]=h,n(e),a(!1)},okText:"Save",children:(0,de.jsx)(pe,{rows:10,value:h,onChange:e=>p(e.target.value),placeholder:"Enter ".concat(null===(i=j[u])||void 0===i?void 0:i.toLowerCase()," here...")})})]})},Te=e=>{let{visible:i,onCreate:l,onCancel:n,initialValues:r}=e;const[o]=T.A.useForm(),[a,x]=(0,t.useState)(null),[h,p]=(0,t.useState)(0);(0,t.useEffect)((()=>
1{if(i&&r){const e=r.imageUrl||null;x(e);const i=e?[{uid:"-1",name:"image.png",status:"done",url:e,thumbUrl:e}]:[];o.setFieldsValue((0,s.A)((0,s.A)({},r),{},{image:i}))}else o.resetFields(),x(null)}),[i,r,o]);return(0,de.jsx)(d.A,{open:i,title:r?"Edit Author":"Add Author",okText:r?"Update":"Add",cancelText:"Cancel",onCancel:()=>{o.resetFields(),x(null),n()},onOk:()=>{o.validateFields().then((e=>{var i,t;const n=a||(null===(i=e.image)||void 0===i||null===(t=i[0])||void 0===t?void 0:t.thumbUrl)||(null===r||void 0===r?void 0:r.imageUrl)||null;o.resetFields(),x(null),l((0,s.A)((0,s.A)({},e),{},{imageUrl:n}))})).catch((()=>{v.Ay.error("Please fix the errors before submitting.")}))},width:600,children:(0,de.jsxs)(T.A,{form:o,layout:"vertical",name:"author_form_modal",children:[(0,de.jsx)(T.A.Item,{label:"Upload Image",name:"image",valuePropName:"fileList",getValueFromEvent:e=>Array.isArray(e)?e:null===e||void 0===e?void 0:e.fileList,children:(0,de.jsx)(A.A,{listType:"picture",maxCount:1,beforeUpload:()=>!1,onChange:e=>{let{file:i}=e;ve({file:i,product_id:"some-id",uploadStatus:p,setURL:e=>x(e)})},fileList:a?[{uid:"-1",name:"Profile Picture",status:"done",url:a}]:[],onRemove:()=>{x(null),o.setFieldsValue({image:[]})},children:(0,de.jsx)(c.Ay,{icon:(0,de.jsx)(ee.A,{}),children:"Upload Image"})})}),(0,de.jsx)(T.A.Item,{label:"Name",name:"name",rules:[{required:!0,message:"Please enter the name"}],children:(0,de.jsx)(u.A,{placeholder:"Author Name"})}),(0,de.jsx)(T.A.Item,{label:"Description",name:"description",rules:[{required:!0,message:"Please enter description"}],children:(0,de.jsx)(u.A.TextArea,{placeholder:"Short bio",rows:3})}),(0,de.jsx)(T.A.Item,{label:"Instagram",name:["socials","instagram"],children:(0,de.jsx)(u.A,{placeholder:"https://instagram.com/..."})}),(0,de.jsx)(T.A.Item,{label:"Facebook",name:["socials","facebook"],children:(0,de.jsx)(u.A,{placeholder:"https://facebook.com/..."})}),(0,de.jsx)(T.A.Item,{label:"LinkedIn",name:["socials","linkedin"],children:(0,de.jsx)(u.A,{placeholder:"https://linkedin.com/in/..."})}),(0,de.jsx)(T.A.Item,{label:"Twitter",name:["socials","twitter"],children:(0,de.jsx)(u.A,{placeholder:"https://twitter.com/..."})})]})})},Se=e=>{let{authors:i,setAuthors:l}=e;const[s,n]=(0,t.useState)(!1),[r,a]=(0,t.useState)(null),[d,u]=(0,t.useState)(null);return(0,de.jsxs)("div",{children:[(0,de.jsx)(c.Ay,{type:"dashed",icon:(0,de.jsx)(Q.A,{}),onClick:()=>{a(null),u(null),n(!0)},children:"Add Author"}),(0,de.jsx)(Te,{visible:s,onCreate:e=>{const s=[...i];null!==r?s[r]=e:s.push(e),l(s),n(!1)},onCancel:()=>n(!1),initialValues:d}),(0,de.jsx)(S.A,{itemLayout:"vertical",dataSource:i,style:{marginTop:24},renderItem:(e,s)=>{var t,n,r,a;return(0,de.jsx)(h.A,{style:{marginBottom:16},extra:(0,de.jsx)(o.A,{children:(0,de.jsx)(g.A,{title:"Are you sure to delete this author?",onConfirm:()=>(e=>{const s=[...i];s.splice(e,1),l(s)})(s),okText:"Yes",cancelText:"No",children:(0,de.jsx)(c.Ay,{type:"link",danger:!0,icon:(0,de.jsx)(J.A,{}),children:"Delete"})})}),children:(0,de.jsxs)(S.A.Item,{children:[(0,de.jsx)(S.A.Item.Meta,{avatar:e.imageUrl?(0,de.jsx)(p.A,{src:e.imageUrl,size:64}):null,title:e.name,description:e.description}),(0,de.jsxs)("div",{style:{marginTop:12},children:[(null===(t=e.socials)||void 0===t?void 0:t.instagram)&&(0,de.jsxs)("div",{children:["\ud83d\udcf8 Instagram:"," ",(0,de.jsx)("a",{href:e.socials.instagram,target:"_blank",rel:"noreferrer",children:e.socials.instagram})]}),(null===(n=e.socials)||void 0===n?void 0:n.facebook)&&(0,de.jsxs)("div",{children:["\ud83d\udcd8 Facebook:"," ",(0,de.jsx)("a",{href:e.socials.facebook,target:"_blank",rel:"noreferrer",children:e.socials.facebook})]}),(null===(r=e.socials)||void 0===r?void 0:r.linkedin)&&(0,de.jsxs)("div",{children:["\ud83d\udcbc LinkedIn:"," ",(0,de.jsx)("a",{href:e.socials.linkedin,target:"_blank",rel:"noreferrer",children:e.socials.linkedin})]}),(null===(a=e.socials)||void 0===a?void 0:a.twitter)&&(0,de.jsxs)("div",{children:["\ud83d\udc26 Twitter:"," ",(0,de.jsx)("a",{href:e.socials.twitter,target:"_blank",rel:"noreferrer",children:e.socials.twitter})]})]})]})})}})]})};function Pe(){const[e,i]=(0,t.useState)("#1890ff"),[l,n]=(0,t.useState)({title:"",coverMedia:null,description:"",cta:"",benefits:[],testimonials:[],faqs:[],gallery:[],authors:[],customSection:"",themeColor:e,modules:[],validity:{type:"lifetime",limitValue:1,limitUnit:"months"},pricing:{pricingType:"fixed",regularPrice:1e3,offerPrice:800,gstEnabled:!1,minPrice:200,suggestedPrice:500},fields:[{label:"Full Name",type:"text",isDefault:!0},{label:"Email",type:"text",isDefault:!0,verifyWithOTP:!1},{label:"Mobile",type:"number",isDefault:!0,verifyWithOTP:!1}],coupons:[],policies:{terms:"",refund:"",privacy:""}}),[r,o]=(0,t.useState)("1"),[a,d]=(0,t.useState)(0),x=[{key:"1",label:"Course Details",children:(0,de.jsxs)("div",{style:{paddingBottom:"20px"},children:[(0,de.jsx)("p",{children:"Course Title"}),(0,de.jsx)(u.A,{placeholder:"Course Title",value:l.title,onChange:e=>n((i=>(0,s.A)((0,s.A)({},i),{},{title:e.target.value})))}),(0,de.jsx)("p",{children:"Cover Image / Video"}),l.coverMedia?(0,de.jsx)("img",{src:l.coverMedia,width:"100%"}):(0,de.jsx)(A.A,{beforeUpload:e=>!1,maxCount:1,onChange:e=>{let{file:i}=e;ve({file:i,product_id:"some-id",uploadStatus:d,setURL:e=>{n((i=>(0,s.A)((0,s.A)({},i),{},{coverMedia:e})))}})},children:(0,de.jsx)(c.Ay,{icon:(0,de.jsx)(ee.A,{}),block:!0,color:"purple",variant:"outlined",children:"Upload Image / Video"})}),a>0&&a<100&&(0,de.jsx)(f.A,{percent:a}),(0,de.jsx)("p",{children:"Description"}),(0,de.jsx)(he,{data:l.description,onChange:e=>n((i=>(0,s.A)((0,s.A)({},i),{},{description:e})))}),(0,de.jsx)("p",{children:"CTA button"}),(0,de.jsx)(u.A,{placeholder:"Join Now",value:l.cta,onChange:e=>n((i=>(0,s.A)((0,s.A)({},i),{},{cta:e.target.value})))}),(0,de.jsx)(C.A,{}),(0,de.jsx)(me,{benefits:l.benefits,setBenefits:e=>{n((i=>(0,s.A)((0,s.A)({},i),{},{benefits:e})))}}),(0,de.jsx)(Ae,{testimonials:l.testimonials,setTestimonials:e=>{n((i=>(0,s.A)((0,s.A)({},i),{},{testimonials:e})))}}),(0,de.jsx)(je,{faqs:l.faqs,setFaqs:e=>{n((i=>(0,s.A)((0,s.A)({},i),{},{faqs:e})))}}),(0,de.jsx)("p",{children:"About Author"}),(0,de.jsx)(Se,{authors:l.authors,setAuthors:e=>{n((i=>(0,s.A)((0,s.A)({},i),{},{authors:e})))}}),(0,de.jsx)(c.Ay,{onClick:()=>o("2"),color:"default",variant:"solid",block:!0,children:"Next Step 
1: Content"})]})},{key:"2",label:"Content & Pricing",children:(0,de.jsxs)("div",{style:{paddingBottom:"20px"},children:[(0,de.jsx)(ge,{modules:l.modules,setModules:e=>{n((i=>(0,s.A)((0,s.A)({},i),{},{modules:e})))}}),(0,de.jsx)(fe,{validity:l.validity,setValidity:e=>{n((i=>(0,s.A)((0,s.A)({},i),{},{validity:e})))}}),(0,de.jsx)(Ce,{pricing:l.pricing,setPricing:e=>{n((i=>(0,s.A)((0,s.A)({},i),{},{pricing:e})))}}),(0,de.jsx)(c.Ay,{style:{marginTop:"20px"},onClick:()=>o("3"),color:"default",variant:"solid",block:!0,children:"Next Step : Settings"})]})},{key:"3",label:"Settings",children:(0,de.jsxs)("div",{style:{paddingBottom:"20px"},children:[(0,de.jsxs)("div",{style:{padding:"10px 0"},children:[(0,de.jsx)("p",{style:{marginBottom:8},children:"Choose Theme Color:"}),(0,de.jsx)("div",{style:{display:"flex",flexDirection:"row",gap:"10px"},children:["#000","#4e95ff","#26c92d","#925eff","#f5222d","#ff51c2"].map((l=>(0,de.jsx)("div",{value:l,style:{backgroundColor:l,border:e===l?"2px solid black":"none",borderRadius:"50%",marginRight:10,borderWidth:2,height:20,width:20,cursor:"pointer"},onClick:()=>(e=>{i(e)})(l)},l)))})]}),(0,de.jsx)("div",{}),(0,de.jsx)(be,{customFields:l.fields,setCustomFields:e=>{n((i=>(0,s.A)((0,s.A)({},i),{},{fields:e})))}}),(0,de.jsx)(ke,{coupons:l.coupons,setCoupons:e=>{n((i=>(0,s.A)((0,s.A)({},i),{},{coupons:e})))}}),(0,de.jsx)(we,{policies:l.policies,setPolicies:e=>{n((i=>(0,s.A)((0,s.A)({},i),{},{policies:e})))}}),(0,de.jsx)(c.Ay,{onClick:()=>console.log(l),icon:(0,de.jsx)(ae.A,{}),style:{marginTop:"20px"},color:"green",variant:"solid",block:!0,children:"Create Course"})]})}];return(0,de.jsx)("div",{className:"course-create-left-side",children:(0,de.jsx)(I.A,{activeKey:r,onChange:e=>o(e),items:x})})}function Ie(){return(0,de.jsx)("div",{className:"course-create-preview desktop"})}function Fe(){const[e,i]=v.Ay.useMessage();return(0,de.jsxs)("div",{className:"page-layout",style:{backgroundImage:"linear-gradient(180deg, #f4e9f9 0%, #e9f0fc 100%)"},children:[i,(0,de.jsx)(n.A,{}),(0,de.jsxs)("div",{className:"page-content",children:[(0,de.jsx)("div",{className:"page-header",children:(0,de.jsx)("p",{children:"Header"})}),(0,de.jsx)("div",{children:(0,de.jsx)("p",{children:"Dashboard"})}),(0,de.jsx)("div",{children:(0,de.jsx)("p",{children:"Course List"})})]}),(0,de.jsx)(F.A,{style:{overflowY:"hidden"},extra:(0,de.jsxs)("div",{children:[(0,de.jsx)(c.Ay,{onClick:()=>{},style:{marginRight:8},children:"Cancel"}),(0,de.jsx)(c.Ay,{type:"primary",onClick:()=>{},children:"Save as Draft"})]}),width:"100%",open:!0,title:"Create New Course",children:(0,de.jsxs)("div",{className:"course-create",children:[(0,de.jsx)(Pe,{}),(0,de.jsx)(Ie,{})]})})]})}}}]);
2//# sourceMappingURL=2104.8335143f.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.