PageSourceSearch

https://medsy.ai/_next/static/chunks/5932.eacf671471d2ee11.js

js medsy.ai collected 2026-10-05 12:17:58 UTC 12,570 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5932],{389:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});let i={src:"/_next/static/media/externalLinkIcon.e82d0c5d.svg",height:17,width:16,blurWidth:0,blurHeight:0}},6599:(e,t,n)=>{"use strict";n.d(t,{KF:()=>o,Mm:()=>a,U$:()=>r,_P:()=>s,jd:()=>c,uP:()=>l});var i=n(71751);async function a(e,t,n){return await fetch("".concat(i.iv).concat(t&&"?course=".concat(t)).concat(n&&"&year=".concat(n)),{method:"GET",headers:{Authorization:e}})}async function r(e,t,n){return await fetch("".concat(i.nI).concat(t&&"?course=".concat(t)).concat(n&&"&year=".concat(n)),{method:"GET",headers:{Authorization:e}})}async function s(e,t){return await fetch("".concat(i.Qm),{method:"POST",body:JSON.stringify(t),headers:{Authorization:e,"Content-Type":"application/json"}})}async function o(e,t){return await fetch("".concat(i.LF),{method:"POST",body:JSON.stringify(t),headers:{Authorization:e,"Content-Type":"application/json"}})}async function c(e,t,n){return await fetch("".concat(i.ut).concat(t&&"?course=".concat(t)).concat(n&&"&year=".concat(n)),{method:"GET",headers:{Authorization:e}})}async function l(e,t,n){return await fetch("".concat(i.R_).concat(t&&"?course=".concat(t)).concat(n&&"&year=".concat(n)),{method:"GET",headers:{Authorization:e}})}},30518:(e,t,n)=>{"use strict";n.d(t,{Ab:()=>c,Af:()=>f,Dm:()=>u,Ig:()=>_,JF:()=>p,Lr:()=>v,MP:()=>h,RY:()=>d,Rx:()=>w,S9:()=>a,Ty:()=>m,Zn:()=>y,_1:()=>o,cQ:()=>S,d$:()=>j,jC:()=>r,ki:()=>b,s:()=>g,yQ:()=>s,zr:()=>l});var i=n(71751);async function a(){return await fetch("".concat(i.AH,"?default=",!0),{method:"GET"})}async function r(e){return await fetch("".concat(i.jI,"?university=").concat(e),{method:"GET"})}async function s(e){return await fetch(i.d8,{method:"POST",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}})}async function o(e){return await fetch(i.N$,{method:"POST",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}})}async function c(e){return await fetch(i.Ai,{method:"POST",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}})}async function l(e,t){return await fetch("".concat(i.vq,"?code=").concat(t),{method:"POST",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}})}async function u(e){return await fetch(i.vX,{method:"POST",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}})}async function d(e){return await fetch(i.Sy,{method:"POST",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}})}async function p(e){return await fetch(i.pI,{method:"POST",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}})}async function h(e){return await fetch(i.qM,{method:"POST",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}})}async function f(e){return await fetch(i.uD,{method:"POST",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}})}async function y(e){return await fetch(i.y9,{method:"POST",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}})}async function m(e){return await fetch(i.Gl,{method:"POST",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}})}async function b(e){return await fetch("".concat(i.NV,"?course=").concat(e),{method:"GET"})}async function v(e){return await fetch("".concat(i.AH,"?key=").concat(e),{method:"GET"})}async function _(e){return await fetch("".concat(i.AH,"?institution=").concat(e),{method:"GET"})}async function g(e){return await fetch(i.dM,{method:"POST",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}})}async function j(e){return await fetch(i.wf,{method:"POST",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}})}async function S(e){return await fetch(i.jn,{method:"POST",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}})}async function w(e){return await fetch(i.YS,{method:"PUT",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}})}},35263:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});let i={src:"/_next/static/media/tickIcon.af676d04.svg",height:16,width:16,blurWidth:0,blurHeight:0}},41983:()=>{},45932:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>_});var i=n(95155),a=n(12115),r=n(56929),s=n(84014),o=n(88907);n(41983);let c={src:"/_next/static/media/longQnsIcon.571165c0.svg",height:16,width:16,blurWidth:0,blurHeight:0};var l=n(389),u=n(35263),d=n(30518),p=n(39200),h=n(6599),f=n(10547),y=n(80946);let m=(0,r.default)(()=>Promise.all([n.e(7736),n.e(3792),n.e(3351),n.e(9451),n.e(4897),n.e(9809),n.e(8469),n.e(8304),n.e(664)]).then(n.bind(n,10664)),{loadableGenerated:{webpack:()=>[require.resolveWeak("./applyCoinsPopUp")]},ssr:!1}),b=(0,r.default)(()=>Promise.all([n.e(1766),n.e(30)]).then(n.bind(n,40030)),{loadableGenerated:{webpack:()=>[require.resolveWeak("./recentTransactions")]},ssr:!1}),v=(0,r.default)(()=>Promise.resolve().then(n.bind(n,2238)),{loadableGenerated:{webpack:()=>[require.resolveWeak("../loading")]},ssr:!1}),_=e=>{var t,n,r,_,g,j,S,w,x,T,N,P,k,O,C,A,J,z,E,G,I,F;let{userData:M,handleRefresh:V,subscriptionOpen:q}=e,H=s.A.get("token"),R=(0,p.usePathname)(),[W,D]=(0,a.useState)([]),[Q,U]=(0,a.useState)([]),[$,K]=(0,a.useState)(),[L,Y]=(0,a.useState)("free"),[X,Z]=(0,a.useState)(!1),[B,ee]=(0,a.useState)(!1),[et,en]=(0,a.useState)(""),[ei,ea]=(0,a.useState)(0),[er,es]=(0,a.useState)(0),[eo,ec]=(0,a.useState)(),[el,eu]=(0,a.useState)((null==M||null==(t=M.user)?void 0:t.year)?null==M||null==(n=M.user)?void 0:n.year:null),ed=null==R?void 0:R.split("/").filter(e=>""!=e),[ep,eh]=(0,a.useState)(!1),[ef,ey]=(0,a.useState)(),em=(null==M||null==(r=M.user)?void 0:r.course)?null==M||null==(_=M.user)?void 0:_.course:s.A.get("course")?s.A.get("course"):(null==(g=localStorage)?void 0:g.getItem("course"))?null==(j=localStorage)?void 0:j.getItem("course"):null,eb=(null==M||null==(S=M.user)?void 0:S.username)?null==M||null==(w=M.user)?void 0:w.username:null==(x=localStorage)?void 0:x.getItem("name"),ev=async()=>{try{let e;e=R.includes("/profile")?await (0,h.Mm)(H,em,el):await (0,h.U$)(H,em,el);let t=await e.json();D(t)}catch(e){console.error("Error fetching subscription data:",e)}finally{eh(!1)}},e_=async(e,t,n)=>{e.preventDefault();try{let e=await (0,h._P)(H,{subscription_tier:t,subscription:n,coupon:er,coins:ei}),i=await e.json(),a={key:i.key,amount:i.amount,currency:i.currency,name:"Medsy",coupon:et,coins:ei,description:"".concat(t," Plan Subscription"),order_id:i.order_id,handler:async function(e){try{if(!e||!e.razorpay_payment_id||!e.razorpay_order_id||!e.razorpay_signature)return void console.log("Invalid payment response data");let t=(null==e?void 0:e.razorpay_payment_method)||"unknown",a=await (0,h.KF)(H,{payment_id:e.razorpay_payment_id,order_id:e.razorpay_order_id,signature:e.razorpay_signature,subscription:n,mode:t,amount_paid:i.amount,coupon:et,status:"success"});await a.json(),200===a.status?(console.log("Payment Successful!"),null==V||V()):console.log("Payment Verification Failed")}catch(e){console.error("Verification error:",e),console.log("Payment Verification Failed")}},prefill:{name:eb},theme:{color:"#3399cc"}};if("undefined"==typeof Razorpay)return void console.log("Razorpay SDK not loaded");a&&new Razorpay(a).open()}catch(e){console.error("Error initiating subscription:",e)}finally{eh(!1)}},eg=async()=>{try{var e,t,n,i;let a=await (0,h.jd)(H,em,el),r=await a.json();K(r),(null==r||null==(t=r.user_subscription)||null==(e=t.subscription)?void 0:e.subscription_tier)?Y(null==r||null==(i=r.user_subscription)||null==(n=i.subscription)?void 0:n.subscription_tier):(null==r?void 0:r.subscription_tier)&&Y(null==r?void 0:r.subscription_tier)}catch(e){return e}finally{eh(!1)}},ej=async()=>{try{var e,t;let n=await (0,d.ki)(em),i=await n.json();ec(i),!(null==M||null==(e=M.user)?void 0:e.year)&&i&&i.length>0&&eu(null==(t=i[0])?void 0:t.key)}catch(e){return e}finally{eh(!1)}},eS=async()=>{try{if((0,y.G6)(H)){let e=await (0,f.sE)(H),t=await e.json();ey(t[0])}else eh(!1)}catch(e){return e}finally{eh(!1)}};return(0,a.useEffect)(()=>{eh(!0),!R.includes("/profile")&&q&&(eu(ed[3]),eS()),R.includes("/profile")&&ej()},[]),(0,a.useEffect)(()=>{em&&el&&(eh(!0),ev(),eg())},[el]),(0,i.jsxs)("div",{className:"billing-subscription w-100 d-flex-col",style:{width:"".concat(R.includes("/profile")?"":"max-content")},children:[ep&&(0,i.jsx)(v,{}
1),X&&(0,i.jsx)(m,{isCardClicked:X,setisCardClicked:Z,coins:(null==M||null==(T=M.user)?void 0:T.coins)?null==M||null==(N=M.user)?void 0:N.coins:(null==ef||null==(P=ef.user)?void 0:P.coins)?null==ef||null==(k=ef.user)?void 0:k.coins:null,couponValue:et,setcouponValue:en,reducedCoins:ei,setreducedCoins:ea,packageData:Q,buyPackage:e_,discountValue:er,setdiscountValue:es}),R.includes("/profile")&&(0,i.jsx)("div",{className:"user-options-selector1 d-flex-jb",children:(0,i.jsx)("div",{className:"opt-box d-flex gap-8",children:eo&&(null==eo?void 0:eo.map((e,t)=>(0,i.jsx)("div",{className:"option-item1",children:(0,i.jsx)("button",{className:"user-option1 cursor-ptr ".concat((null==e?void 0:e.key)===el?"active1":null),value:null==e?void 0:e.name,onClick:()=>eu(null==e?void 0:e.key),children:null==e?void 0:e.name})},t)))})}),B&&R.includes("/profile")&&(0,i.jsx)(b,{previousPopup:B,setPreviousPopup:ee,course:em,year:el}),$&&R.includes("/profile")&&(null==$||null==(C=$.user_subscription)||null==(O=C.subscription)?void 0:O.subscription_tier)&&(null==$||null==(J=$.user_subscription)||null==(A=J.subscription)?void 0:A.subscription_tier)!=="free"&&(null==$||null==(E=$.user_subscription)||null==(z=E.subscription)?void 0:z.subscription_tier)!=="free_trial"?(0,i.jsxs)("div",{className:"subscription-info d-flex-jb d-flex-al",children:[(0,i.jsxs)("div",{className:"d-flex-al gap-8",children:[(0,i.jsx)(o.default,{src:c,alt:"icon",width:24,height:24}),(0,i.jsxs)("div",{className:"d-flex-col ",children:[(0,i.jsxs)("p",{className:"subscribed-plan",children:["You are currently subscribed to"," ",(0,i.jsx)("span",{className:"curr-plan",children:null==$||null==(I=$.user_subscription)||null==(G=I.subscription)?void 0:G.subscription_tier})," ","Plan"," "]}),(0,i.jsxs)("p",{className:"subscription-date",children:["Active till"," ",(0,i.jsx)("span",{children:null==$||null==(F=$.user_subscription)?void 0:F.expiry}),"."]})]})]}),(0,i.jsxs)("button",{className:"previous-payments d-flex-al gap-8 cursor-ptr",onClick:()=>ee(!0),children:[(0,i.jsx)(o.default,{src:l.A,alt:"link",height:16,width:16}),"Previous payments"]})]}):null,(0,i.jsx)("div",{className:"d-flex-al ".concat(R.includes("/profile")?"subscription-cards":"subscription-cards-1"),children:(null==W?void 0:W.length)>0?null==W?void 0:W.map((e,t)=>{var n,a;return(0,i.jsxs)("div",{className:"package-card d-flex-col",children:[(0,i.jsx)("p",{className:"package-type ".concat("free"!==e.subscription_tier?"active":""),children:"free_trial"===e.subscription_tier?"Free Trial":e.subscription_tier}),(0,i.jsx)("p",{className:"material-access",children:"Free access to 1500+ learning materials"}),"free_trial"!==e.subscription_tier&&"free"!==e.subscription_tier&&(0,i.jsx)("p",{className:"active month-text",children:"".concat(e.term_in_months," Month").concat(1==e.term_in_months?"":"s")}),(0,i.jsxs)("p",{className:"price ".concat("free_trial"===e.subscription_tier?"active free-trial-text":"free"!==e.subscription_tier?"active":""),children:["free_trial"===e.subscription_tier?"Free trail ends in ".concat(null==e?void 0:e.remaining_days," ").concat((null==e?void 0:e.remaining_days)>1?"days":"day"):"₹".concat(e.price),"free_trial"!==e.subscription_tier&&"free"!==e.subscription_tier&&(0,i.jsx)("span",{className:"gst-text",children:" Inclusive of 18% GST"})]}),e.id===(null==$||null==(a=$.user_subscription)||null==(n=a.subscription)?void 0:n.id)||"free_trial"===e.subscription_tier?(0,i.jsx)("button",{className:"defualt-plan w-100",disabled:!0,children:e.context||"(Current plan)"}):(0,i.jsx)("button",{disabled:"free"!==L&&"free"===e.subscription_tier,className:"".concat("free"===e.subscription_tier?"defualt-plan":"plan-btn"," w-100"),onClick:()=>{U(e),Z(!0)},children:"free"===e.subscription_tier?"Free":"Upgrade"}),(0,i.jsx)("div",{className:"feature-list d-flex-col",children:e.categories&&e.categories.map((e,t)=>(0,i.jsxs)("p",{className:"feature-item d-flex-al gap-8",children:[(0,i.jsx)(o.default,{src:u.A,alt:"tick",height:16,width:16}),"Mcq"===e.name?"MCQ":"Test_Series"===e.name?"Test Series":e.name]},t))})]},t)}):(0,i.jsx)("div",{className:"subcription-popup-container",children:(0,i.jsx)("p",{className:"subscription-popup-text",children:"No Subscription Packages Available"})})})]})}}}]);

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.