PageSourceSearch

https://www.samayoga.id/_next/static/chunks/6520-887ad38ee5f1bbf5.js

js samayoga.id collected 2026-09-29 02:29:01 UTC 42,062 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6520],{99126:function(e,t,n){"use strict";var a=n(59499),i=n(50029),s=n(87794),r=n.n(s),o=n(67294),l=n(74107),d=n(79701),c=n(7616),p=n(13959),u=n(47300),m=n(3798),x=n(38913),h=n(74614),f=n(87536),y=n(57953),v=n(2064),g=n(81668),b=n(77333),j=(n(88049),n(43195)),w=n(78191),N=n(96486),P=n(68313),O=n(85893);function S(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?S(Object(n),!0).forEach((function(t){(0,a.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.Z=function(e){var t,n,a,s=e.isShowDialog,S=e.toggleShowDialog,D=e.id,I=e.refetch,C=(0,y.Tu)().handleMutate,M=(0,g.l)().setNoti,E=(0,y.Ap)("/accounts/transactions/".concat(D),{shouldFetch:!!D}),T=E.data,F=(E.error,E.isLoading),A=(0,o.useState)(!1),Z=A[0],R=A[1],L=(0,f.cI)(),_=(0,o.useState)(""),z=_[0],U=_[1],W=(0,o.useState)(""),V=W[0],B=W[1],G=(0,o.useState)(""),Y=G[0],q=G[1],H=(0,b.ER)().uploadPaymentProof,J=function(){var e=(0,i.Z)(r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,C({url:"/accounts/transactions/".concat(D,"/resubmit-manual-payment"),data:{paymentProofUrl:V,customFieldValue:Y},onSuccess:function(){null===I||void 0===I||I(),M({type:"success",msg:"Proof of payment submitted."})},onError:function(e){var t;M({type:"fail",msg:null!==(t=null===e||void 0===e?void 0:e.message)&&void 0!==t?t:"Something Wrong"})}});case 2:Q();case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Q=function(){L.resetField("receiptLabel"),U(""),B(""),q(""),S(),setTimeout((function(){R(!1)}),300)};return(0,O.jsx)(O.Fragment,{children:(0,O.jsx)(d.Z,{isOpen:s,maxWidth:"540px",minHeight:"auto",children:(0,O.jsx)("div",{className:"hide-scrollbar  max-h-[700px] overflow-auto",children:(0,O.jsx)(c.Z,{isTrue:F,showBlock:(0,O.jsx)(O.Fragment,{children:(0,O.jsx)(p.Z,{})}),hideBlock:(0,O.jsxs)("div",{className:"p-10 pb-10",children:[(0,O.jsx)("button",{onClick:function(){Q()},className:"flex w-full justify-end",style:{fontSize:"18px",padding:"10px",backgroundColor:"transparent",cursor:"pointer",border:"none",zIndex:"100"},children:(0,O.jsx)(l.gjG,{stroke:"#010101"})}),Z?(0,O.jsxs)("div",{className:"flex flex-col",children:[(0,O.jsx)(u.ZT,{fontSize:"28px",fontWeight:"700",mb:"20px",children:"Resubmit proof of payment"}),(0,O.jsx)("div",{className:"my-5 flex flex-col ",children:(0,O.jsxs)(f.RV,k(k({},L),{},{children:[(0,O.jsx)("div",{className:"mb-3",children:(0,O.jsx)(x.Z,{value:z,onChange:function(){var e=(0,i.Z)(r().mark((function e(t){var n,a,i,s,o,l,d;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,H(t.target.value);case 2:null!==(s=e.sent)&&void 0!==s&&null!==(n=s.data)&&void 0!==n&&null!==(a=n.data)&&void 0!==a&&null!==(i=a.uploadImageResponse)&&void 0!==i&&i.imageUrl?(B(null===s||void 0===s||null===(o=s.data)||void 0===o||null===(l=o.data)||void 0===l||null===(d=l.uploadImageResponse)||void 0===d?void 0:d.imageUrl),U(t.target.value)):(B(""),U(""));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),onDelete:function(){U("")},label:"Proof of payment"})}),T.data.customFieldLabel?(0,O.jsx)(h.Z,{label:"".concat((0,N.capitalize)(T.data.customFieldLabel),"  ").concat(T.data.customFieldRequired?"":"(Optional)"),name:"receiptLabel",onChange:function(e){return q(e.target.value)}}):null,(0,O.jsxs)("div",{className:"mt-5 flex items-center justify-end gap-2",children:[(0,O.jsx)(m.x,{onClick:function(){Q()},size:"lg",variant:"outline",children:"Cancel"}),(0,O.jsx)(m.x,{size:"lg",disabled:!z||T.data.customFieldRequired&&!Y,onClick:function(){return J()},variant:"fill",children:"Submit"})]})]}))})]}):(0,O.jsxs)("div",{className:"flex flex-col",children:[(0,O.jsxs)(u.ZT,{fontSize:"28px",fontWeight:"700",mb:"40px",children:["Payment ",(null===T||void 0===T?void 0:T.data.status)===v.b.WAITING_ON_CUSTOMER?"Declined":"Pending approval"]}),(0,O.jsxs)("div",{className:" flex flex-col",children:[(0,O.jsx)("div",{className:"mb-5",children:(0,O.jsx)(u.ZT,{className:"",children:(null===T||void 0===T?void 0:T.data.status)===v.b.WAITING_ON_CUSTOMER?"Unfortunately, your last payment was declined. Please try resubmitting your payment for approval.":"Your payment is waiting for approval. We will send an email notification once your payment is approved. "})}),(0,O.jsxs)("div",{className:"my-5 flex flex-col gap-3",children:[null!==T&&void 0!==T&&T.data.paidBy?(0,O.jsxs)("div",{className:"flex  text-sm ",children:[(0,O.jsx)("p",{className:"min-w-[180px]  text-[#787878]",children:"Payment method"}),(0,O.jsxs)("p",{children:[" ",(0,O.jsx)(w.Z,{mb:"0px",html:(0,j.N8)((0,j.ZU)(T.data.paidBy),18)})]})]}):null,(null===T||void 0===T?void 0:T.data.paymentProofUrl)&&(0,O.jsxs)("div",{className:"flex  text-sm ",children:[(0,O.jsx)("p",{className:"w-[180px]  text-[#787878]",children:"Proof of payment"}),(0,O.jsx)(P.Z,{url:null===T||void 0===T||null===(t=T.data)||void 0===t?void 0:t.paymentProofFullUrl,downloadUrl:T.data.paymentProofUrl})]}),(null===T||void 0===T?void 0:T.data.customFieldValue)&&(null===T||void 0===T?void 0:T.data.customFieldLabel)&&(0,O.jsxs)("div",{className:"flex  text-sm ",children:[(0,O.jsx)("p",{className:"w-[180px]  text-[#787878]",children:T.data.customFieldLabel}),(0,O.jsx)("p",{children:null!==(n=T.data.customFieldValue)&&void 0!==n?n:"---"})]}),(null===T||void 0===T?void 0:T.data.status)&&(0,O.jsxs)("div",{className:"flex  text-sm ",children:[(0,O.jsx)("p",{className:"w-[180px]  text-[#787878]",children:"Review status"}),(0,O.jsx)("p",{className:"".concat(T.data.status===v.b.DECLINED||T.data.status===v.b.WAITING_ON_CUSTOMER?"text-red":"text-[#E4732B]"),children:T.data.status===v.b.WAITING_APPROVAL?"Pending approval":T.data.status===v.b.WAITING_ON_CUSTOMER?"Declined":T.data.status})]}),(null===T||void 0===T?void 0:T.data.reason)&&(0,O.jsxs)("div",{className:"flex  text-sm ",children:[(0,O.jsx)("p",{className:"w-[180px]  text-[#787878]",children:"Reason"}),(0,O.jsx)("p",{children:T.data.reason})]}),(null===T||void 0===T?void 0:T.data.notes)&&(0,O.jsxs)("div",{className:"flex  text-sm ",children:[(0,O.jsx)("p",{className:"w-[180px]  text-[#787878]",children:"Notes"}),(0,O.jsx)("p",{className:"flex-1 whitespace-pre-wrap  break-words",children:T.data.notes})]})]}),(null===T||void 0===T||null===(a=T.data)||void 0===a?void 0:a.status)===v.b.WAITING_ON_CUSTOMER&&(0,O.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[(0,O.jsx)(m.x,{onClick:function(){return Q()},size:"lg",variant:"outline",children:"Cancel"}),(0,O.jsx)(m.x,{size:"lg",onClick:function(){U(""),B(""),q(""),R(!0)},variant:"fill",children:"Resubmit Proof"})]})]})]})]})})})})})}},29121:function(e,t,n){"use strict";var a=n(59499),i=n(46160),s=n(36266),r=n(67294),o=n(87536),l=n(74107),d=n(58255),c=n(79701),p=n(47300),u=n(72994),m=n(18099),x=n(57953),h=n(7616),f=n(13959),y=n(77333),v=n(96486),g=n(61834),b=n(31096),j=n(74614),w=n(38913),N=n(22096),P=n(85893);function O(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function S(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?O(Object(n),!0).forEach((function(t){(0,a.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.Z=function(e){var t,n,a,O,k=e.formProps,D=e.isShowDialog,I=e.toggleShowDialog,C=e.payloadData,M=e.isShowPayInStore,E=void 0===M||M,T=e.shouldAutoSelect,F=void 0===T||T,A=e.buttonLabel,Z=e.isRecurringPayment,R=void 0!==Z&&Z,L=e.id,_=e.membershipId,z=(0,b.Fg)(),U=(0,r.useRef)(null),W=(0,r.useState)(!1),V=W[0],B=W[1],G=(0,x.Ap)("billings/pay-later-in-store/price/".concat(L),{shouldFetch:!!L&&D}),Y=G.data,q=G.isLoading,H=(0,y.jU)(_).data,J=function(){I(),setTimeout((function(){B(!1)}),300)},Q=(0,x.Ap)("billings/available-payments-v2"),K=Q.data,X=(Q.isLoading,{paymentProofUrl:k.watch("paymentProofUrl"),customFieldValue:k.watch("customFieldValue")}),$=null===K||void 0===K||null===(t=K.data)||void 0===t||null===(n=t.manualPaymentMethods)||void 0===n?void 0:n.find((function(e){return e.manualPaymentMethodId===k.watch("type")})),ee=!$||(0,N.u)(X,$);return $&&(C=S(S(S({},C),X),{},{manualPaymentMethodId:$.manualPaymentMethodId})),(0,P.jsx)(P.Fragment,{children:(0,P.jsx)(c.Z,{isOpen:D,maxWidth:"530px",children:(0,P.jsx)("div",{className:"notranslate max-h-[700px] min-h-[400px] overflow-y-auto",translate:"no",children:(0,P.jsx)(h.Z,{isTrue:q,showBlock:(0,P.jsx)(P.Fragment,{children:(0,P.jsx)(f.Z,{})}),hideBlock:(0,P.jsx)(m.hN,{price:Number(null===Y||void 0===Y||null===(a=Y.data)||void 0===a?void 0:a.totalInUnitAmount),onlyCardPaymentAllowed:R,children:(0,P.jsxs)("div",{className:"p-10 pb-0",children:[(0,P.jsx)("button",{onClick:function(){J()},style:{fontSize:"18px",padding:"10px",backgroundColor:"transparent",cursor:"pointer",border:"none",zIndex:"100",position:"absolute",top:"25px",right:"25px"},children:(0,P.jsx)(l.gjG,{stroke:"#010101"})}),(0,P.jsx)(h.Z,{isTrue:(0,v.isEmpty)(H),showBlock:(0,P.jsx)(P.Fragment,{children:(0,P.jsx)("div",{className:"mt-28",children:(0,P.jsxs)("div",{className:"text-center",children:[(0,P.jsx)(g.FP,{color:z.color.primary,fill:z.color.secondary.text}),(0,P.jsxs)("div",{children:[(0,P.jsx)("p",{className:"text-base font-bold",children:"Payment not available."}),(0,P.jsx)("p",{className:"text-base font-bold",children:"Please contact for more information."})]})]})})}),hideBlock:(0,P.jsxs)("div",{className:"notranslate",translate:"no",children:[V?(0,P.jsxs)(d.Av,{color:"#010101",onClick:function(){B(!1)},className:"z-[100] mb-7 flex h-min items-center gap-1.5 !font-bold",children:[(0,P.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,P.jsx)("path",{d:"M7.2002 3.59961L4.8002 5.99961L7.2002 8.39961",stroke:"#010101",strokeLinecap:"round",strokeLinejoin:"round"})}),"Back"]}):(0,P.jsx)(p.ZT,{fontSize:"28px",fontWeight:"700",mb:"40px",children:"Pay with"}),(0,P.jsx)(s.Z,{children:(0,P.jsx)(o.RV,S(S({},k),{},{children:V?(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(p.ZT,{fontSize:"28px",fontWeight:"700",mb:"40px",children:["Pay with ",null===(O=C)||void 0===O?void 0:O.paymentMetod]}),(0,P.jsxs)("div",{className:"my-5 flex flex-col ",children:[(0,P.jsx)("div",{className:"mb-5 w-full rounded-lg bg-[#F8F6F5] px-6 py-5 text-center",children:(0,P.jsx)(p.ZT,{className:"",children:"Scan this QR code to make payment for your pricing plan. Screenshot your receipt once you have made payment and upload it below."})}),(0,P.jsx)("div",{className:"flex h-[300px] w-full items-center justify-center rounded-lg",children:(0,P.jsx)("img",{src:"https://support.thinkific.com/hc/article_attachments/360042081334/5d37325ea1ff6.png",alt:"qr",className:"h-full w-full"})}),(0,P.jsx)("div",{className:"my-5",children:(0,P.jsx)(w.Z,{value:k.watch("receipt"),onChange:function(e){},onDelete:function(){},label:"Upload proof of payment"})}),(0,P.jsx)(j.Z,{label:"Label for your receipt",name:"receiptLabel"})]})]}):(0,P.jsx)(i.Z,{isPopup:!0,isShowPayInStore:E,shouldAutoSelect:F,membershipId:_||""})}))}),(0,P.jsxs)("div",{className:"flex items-center justify-end gap-3 py-5",children:[(0,P.jsx)("div",{className:"mt-4",children:(0,P.jsx)(d.f5,{onClick:function(){J()},width:"200",children:"Cancel"})}),(0,P.jsx)(o.RV,S(S({},k),{},{children:(0,P.jsx)(u.Z,{buttonLabel:A,payloadData:C,setParentLoading:function(){},ref:U,disabled:!ee})}))]})]})})]})})})})})})}},68313:function(e,t,n){"use strict";n.d(t,{Z:function(){return w}});var a=n(59499),i=n(50029),s=n(87794),r=n.n(s),o=n(67294),l=(n(39359),n(40270),n(79701)),d=n(25391),c=n(74107),p=n(35874),u=n(88049),m=n(57953),x=n(87536),h=n(19198),f=n(62469),y=n(11634),v=n(85893);function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?g(Object(n),!0).forEach((function(t){(0,a.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var j=[{label:"50%",value:"0.5"},{label:"75%",value:"0.75"},{label:"90%",value:"0.9"},{label:"100%",value:"1"},{label:"125%",value:"1.25"},{label:"150%",value:"1.5"},{label:"200%",value:"2"}];function w(e){var t=e.url,n=e.downloadUrl,a=(0,o.useState)(!1),s=a[0],g=a[1],w=(0,o.useState)("100%"),N=w[0],P=w[1],O=(0,o.useState)(N),S=O[0],k=O[1],D=(0,o.useState)(null),I=(D[0],D[1]),C=(0,o.useState)(0),M=(C[0],C[1],(0,o.useState)(1)),E=(M[0],M[1],(0,o.useRef)(null)),T=(0,o.useRef)(null),F="pdf"===t.split(".").pop()?"pdf":"image",A=(0,x.cI)(),Z=function(){var e=(0,i.Z)(r().mark((function e(t){var n,a,i,s;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(0,u.LP)(),e.next=3,(0,m.Yu)("/files/download?fileKey=".concat(t),{responseType:"blob",accessToken:n});case 3:if((a=e.sent)instanceof Blob){e.next=6;break}throw new Error("Returned value is not a Blob");case 6:i=URL.createObjectURL(a),(s=document.createElement("a")).href=i,s.setAttribute("download",t||"downloaded-file"),document.body.appendChild(s),s.click(),s.remove(),URL.revokeObjectURL(i);case 14:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),R=function(){return g(!1)};return(0,v.jsx)(v.Fragment,{children:"image"===F?(0,v.jsxs)(v.Fragment,{children:[(0,v.jsxs)("button",{onClick:function(){return g(!0)},className:"flex cursor-pointer items-center gap-2 text-primary",children:[(0,v.jsx)(d.V5,{})," View File"]}),(0,v.jsx)(l.Z,{isOpen:s,maxWidth:"720px",minHeight:"auto",bgColor:"white",close:R,children:(0,v.jsx)(x.RV,b(b({},A),{},{children:(0,v.jsxs)("div",{className:"p-10",children:[(0,v.jsxs)("div",{className:"flex flex-col justify-between bg-white pb-5  text-[28px] font-bold sm:flex-row sm:items-center",children:["Proof of payment",(0,v.jsxs)("div",{className:"mt-3 flex items-center gap-6 sm:mt-0",children:[(0,v.jsxs)("div",{className:"relative flex w-[124px] items-center rounded-md pr-1 ",style:{border:"1px solid #1F1F1F1A"},children:[(0,v.jsx)("input",{ref:E,value:S,onChange:function(e){var t=e.target.value;if((t=t.replace(/[^\d.%]/g,""))&&!t.endsWith("%")&&!t.includes("%"))return k(t),void P(t);k(t),P(t)},onBlur:function(){var e=S.trim();(e=e.replace(/[^\d.]/g,""))&&(k(e+="%"),P(e))},className:"focus:ring-blue-500 h-[56px] w-full border-0 bg-transparent  px-3 py-2 text-sm focus:outline-none focus:ring-2"}),(0,v.jsxs)(h.fC,{onValueChange:function(e){var t="".concat(100*parseFloat(e),"%");P(t),k(t)},children:[(0,v.jsx)(h.xz,{className:"shadow-sm focus:ring-blue-500   h-9 w-8 items-center justify-center  border border-gray-300   py-[6px] text-sm focus:outline-none focus:ring-2","aria-label":"Select zoom",children:(0,v.jsx)(h.JO,{className:"cursor-pointer",children:(0,v.jsx)(c.LAP,{})})}),(0,v.jsx)(h.h_,{children:(0,v.jsx)(h.VY,{align:"center",sideOffset:6,position:"popper",className:"shadow-lg z-[9999]  w-[120px] overflow-auto rounded-md border border-gray-200 bg-white",children:(0,v.jsx)(h.l_,{className:"p-1",children:j.map((function(e){return(0,v.jsx)(h.ck,{value:e.value,className:"relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none hover:bg-gray-100 ",children:(0,v.jsx)(h.eT,{children:e.label})},e.value)}))})})})]})]}),(0,v.jsx)("button",{type:"button",onClick:function(){return Z(n)},className:"flex h-12  w-12 cursor-pointer  items-center justify-center rounded-full bg-[#2F565E]   text-white",children:(0,v.jsx)(f._8t,{})}),(0,v.jsx)(p.Z,{onClick:R,className:"cursor-pointer "})]})]}),(0,v.jsx)("div",{children:(0,v.jsxs)("div",{className:" relative h-[500px] max-h-[640px] w-full overflow-auto rounded-lg border bg-[#F8F9FA] ",style:{border:"1px solid #1F1F1F1A"},children:["image"===F&&(0,v.jsx)("div",{className:"relative mx-auto w-fit ",children:(0,v.jsx)("img",{src:t,alt:"preview",onError:(0,y.W)(),ref:T,onLoad:function(e){var t=e.currentTarget;
1I({width:t.naturalWidth,height:t.naturalHeight})},className:"mx-auto",style:{maxWidth:"".concat(580*parseFloat(N)/100,"px"),height:"".concat(496*parseFloat(N)/100,"px"),display:"block"}})}),!1]})})]})}))})]}):(0,v.jsxs)("button",{onClick:function(){return Z(n)},className:"flex cursor-pointer items-center gap-2 text-primary",children:[(0,v.jsx)(d.V5,{})," Download File"]})})}},86520:function(e,t,n){"use strict";n.d(t,{Z:function(){return H}});var a=n(59499),i=n(50029),s=n(87794),r=n.n(s),o=n(57953),l=n(58255),d=n(3798),c=n(69707),p=n(81668),u=n(10404),m=n(19907),x=n(36596),h=n(56257),f=n(39773),y=n(60407),v=n(38348),g=n(11163),b=n(67294),j=n(4480),w=n(34232),N=n(31096),P=n(86664),O=n(74107),S=n(67162),k=n(13234),D=n(29121),I=n(87536),C=n(47300),M=n(2064),E=n(99126),T=n(85893);function F(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function A(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?F(Object(n),!0).forEach((function(t){(0,a.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Z=function(e){var t,n,a=e.payment,i=e.handleRetryPayment,s=e.refetch,r=(0,m.Z)(),o=r.showPricing,l=r.data,c=(0,b.useState)(!1),p=c[0],u=c[1],x=(0,b.useState)(!1),y=x[0],v=x[1],g=(0,S.vH)().textColor,j=function(){return v((function(e){return!e}))},w=(0,b.useState)(""),N=w[0],P=w[1],F=null===(t=a.paymentDetails)||void 0===t?void 0:t.find((function(e){return"Membership"===e.description})),Z=null===(n=a.paymentDetails)||void 0===n?void 0:n.find((function(e){return"JoiningFee"===e.description})),_=(0,b.useState)(!1),z=_[0],U=_[1],W=(0,I.cI)({defaultValues:{type:""},mode:"onChange"}),V=function(){U((function(e){return!e}))};return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(D.Z,{payloadData:{paymentMethod:W.watch("type"),idempotencyId:a.transactionId},formProps:W,isShowDialog:z,toggleShowDialog:V,isShowPayInStore:!1,shouldAutoSelect:!1,buttonLabel:"Pay",membershipId:a.membershipId,isRecurringPayment:a.isRecurring,id:a.transactionId}),(0,T.jsx)(E.Z,{isShowDialog:y,toggleShowDialog:j,id:N,refetch:s}),(0,T.jsxs)("tr",{onClick:function(){a.paymentDetails&&u((function(e){return!e}))},children:[(0,T.jsx)("td",{className:"px-4 pt-4",children:(0,T.jsx)(C.ZT,{className:"w-[100px] whitespace-normal",children:"UnPaid"===a.status?(0,h.p6)(a.createdDate,"dd MMM yyyy \nhh:mm a"):(0,h.p6)(a.paymentDate,"dd MMM yyyy \nhh:mm a")})}),(0,T.jsx)("td",{className:"px-4 pt-4",children:a.transactionNo?a.transactionNo:"---"}),(0,T.jsx)("td",{className:"px-4 pt-4",children:a.invoiceNumber?a.invoiceNumber:"---"}),(0,T.jsx)("td",{className:"px-4 pt-4",children:(0,T.jsx)(C.ZT,{className:"w-[150px] whitespace-normal",children:a.product||"--"})}),(0,T.jsx)("td",{className:"px-4 pt-4",children:a.manualPaymentMethodId?a.manualPaymentMethodName:"NA"===(0,k.w)({paymentMethod:a.paymentMethod,paymentProvider:a.paymentProvider,pisPaymentMethod:a.pISPaymentMethod,type:a.type})?"---":(0,k.w)({paymentMethod:a.paymentMethod,paymentProvider:a.paymentProvider,pisPaymentMethod:a.pISPaymentMethod,type:a.type})}),(0,T.jsx)("td",{className:"flex items-center gap-8 px-4 pt-4 text-xs font-bold",children:(0,T.jsx)("span",{style:A(A({},f.LN[a.hasChildTransaction?a.childTransactionStatus:"Completed"===a.status?"Paid":a.status]),{},{borderRadius:"4px"}),className:"p-2",children:a.hasChildTransaction?a.childTransactionStatus:a.status===M.b.COMPLETED?"Paid":a.status===M.b.UNPAID?"Unpaid":a.status===M.b.WAITING_APPROVAL?(0,T.jsx)("div",{className:"status gap-1 rounded ",style:{backgroundColor:"#FFEFC6",color:"#94320C"},children:"Pending approval"}):a.status===M.b.DECLINED?(0,T.jsx)("div",{className:"status gap-1 rounded",style:{backgroundColor:"#FFE3E1",color:"#9F1D15"},children:"Declined"}):a.status===M.b.WAITING_ON_CUSTOMER?(0,T.jsx)("div",{className:"status gap-1 rounded ",style:{backgroundColor:"#EDEDED",color:"#000"},children:"Action required"}):a.status})}),(0,T.jsx)("td",{className:"px-4 pt-4",children:o(a.amount)}),"Overdue"===a.status?(0,T.jsx)("td",{className:"retry pt-4",children:(0,T.jsx)(R,{onClick:function(){return i(a.transactionId)},width:"auto",padding:"6px 27.5px",children:"Pay"})}):"UnPaid"===a.status?(0,T.jsx)("td",{className:"retry pt-4",children:(null===l||void 0===l?void 0:l.enablePayment)&&(0,T.jsx)(L,{onClick:V,width:"auto",padding:"6px 27.5px",children:"Pay"})}):a.status===M.b.WAITING_APPROVAL?(0,T.jsx)("td",{className:" pt-4",children:(0,T.jsx)(d.x,{size:"lg",className:" py-3",onClick:function(){P(a.transactionId),j()},variant:"outline",children:"View"})}):a.status===M.b.DECLINED||a.status===M.b.WAITING_ON_CUSTOMER?(0,T.jsx)("td",{className:" pt-4",children:(0,T.jsx)(d.x,{size:"lg",className:" py-3",onClick:function(){P(a.transactionId),j()},variant:"fill",children:"Review"})}):null,!!a.paymentDetails&&"Manual"!==a.paymentMethod&&(0,T.jsx)("div",{className:"flex w-10 justify-center  ".concat(p?"pb-[14px]":"pt-[30px]"),style:{transform:p?"rotate(-180deg) ":"rotate(0)"},children:(0,T.jsx)(O.tZp,{color:g})})]}),"Manual"!==a.paymentMethod&&(0,T.jsx)("tr",{className:"pt-3 ".concat(p?"tabel my-8 h-full":"hidden h-0"),children:(0,T.jsxs)("td",{colSpan:8,className:"space-y-2 overflow-hidden pt-5 transition duration-200",children:[(0,T.jsxs)("div",{className:"grid grid-cols-7 rounded-lg bg-[#F4F5FA] px-2 text-xs font-bold text-primary",children:[(0,T.jsx)("p",{className:"col-span-4 p-3",children:"Description"}),(0,T.jsx)("p",{className:"p-3",children:"Qty"}),(0,T.jsx)("p",{className:"p-3",children:"Unit price"}),(0,T.jsx)("p",{className:"p-3",children:"Amount"})]}),(0,T.jsxs)("div",{children:[(0,T.jsxs)("div",{className:"grid grid-cols-7 items-center rounded-t-lg border-b border-solid border-[#
1E6E6E6] bg-off-white px-2 text-sm",children:[(0,T.jsxs)("div",{className:"col-span-4 space-y-1 p-3",children:[(0,T.jsx)("p",{children:a.product}),(0,T.jsxs)("p",{className:"text-grey",children:[(0,h.p6)(a.periodStartDate,"dd MMM yyyy")," - ",(0,h.p6)(a.periodEndDate,"dd MMM yyyy")]})]}),(0,T.jsx)("p",{className:"p-3 font-bold",children:null===F||void 0===F?void 0:F.quantity}),(0,T.jsx)("p",{className:"p-3",children:o(null===F||void 0===F?void 0:F.unitPrice)}),(0,T.jsx)("p",{className:"p-3 font-bold",children:o(null===F||void 0===F?void 0:F.amount)})]}),a.hasJoiningFee&&(0,T.jsxs)("div",{className:"grid grid-cols-7 items-center border-b border-solid border-[#E6E6E6] bg-off-white px-2 text-sm",children:[(0,T.jsx)("p",{className:"col-span-4 p-3",children:"Joining fee"}),(0,T.jsx)("p",{className:"p-3 font-bold",children:null===Z||void 0===Z?void 0:Z.quantity}),(0,T.jsx)("p",{className:"p-3",children:o(null===Z||void 0===Z?void 0:Z.unitPrice)}),(0,T.jsx)("p",{className:"p-3 font-bold",children:o(null===Z||void 0===Z?void 0:Z.amount)})]})]}),(0,T.jsxs)("div",{className:"space-y-1",children:[(0,T.jsxs)("div",{className:"grid grid-cols-7 items-center px-2 text-sm",children:[(0,T.jsx)("div",{className:"col-span-4"}),(0,T.jsx)("div",{}),(0,T.jsx)("p",{className:"px-3 py-1 font-bold",children:"Subtotal"}),(0,T.jsx)("p",{className:"px-3 py-1",children:o(a.subTotal)})]}),!!a.discountAmount&&a.discountAmount>0&&(0,T.jsxs)("div",{className:"grid grid-cols-7 items-center px-2 text-sm",children:[(0,T.jsx)("div",{className:"col-span-4"}),(0,T.jsx)("div",{}),(0,T.jsx)("p",{className:"px-3 py-1 font-bold",children:"Discount"}),(0,T.jsxs)("p",{className:"px-3 py-1 text-red",children:["-",o(a.discountAmount)]})]}),a.hasTax&&(0,T.jsxs)("div",{className:"grid grid-cols-7 items-center px-2 text-sm",children:[(0,T.jsx)("div",{className:"col-span-4"}),(0,T.jsx)("div",{}),(0,T.jsxs)("p",{className:"px-3 py-1 font-bold",children:["Tax (",a.taxPercentage,"%)"]}),(0,T.jsx)("p",{className:"px-3 py-1",children:o(a.tax)})]}),(0,T.jsxs)("div",{className:"grid grid-cols-7 items-center px-2 text-sm",children:[(0,T.jsx)("div",{className:"col-span-4"}),(0,T.jsx)("div",{}),(0,T.jsx)("p",{className:"px-3 py-1 font-bold",children:"Total"}),(0,T.jsx)("p",{className:"px-3 py-1 font-bold",children:o(a.amount)})]})]})]})})]})},R=(0,N.ZP)(l.hO).withConfig({displayName:"PaymentSummaryItem___StyledBlackButton",componentId:"sc-1f1duso-0"})({fontSize:"10px"}),L=(0,N.ZP)(l.hO).withConfig({displayName:"PaymentSummaryItem___StyledBlackButton2",componentId:"sc-1f1duso-1"})({fontSize:"10px"}),_=n(44352),z=n(11634);function U(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function W(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?U(Object(n),!0).forEach((function(t){(0,a.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):U(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var V=N.ZP.div.withConfig({displayName:"PaymentSummary__MembershipPmCard",componentId:"sc-e56uve-0"})(["display:flex;align-items:center;gap:16px;background:#ffffff;border-radius:8px;padding:20px 24px;font-size:14px;width:33.333%;@media ","{width:50%;}@media ","{width:100%;}img{width:44px;height:30px;object-fit:cover;border-radius:4px;border:1px solid #ededed;flex-shrink:0;}.pm-info{flex:1;span{font-weight:600;line-height:21px;}p{font-size:12px;color:#787878;margin-top:2px;}}.no-pm{flex:1;color:#787878;}.edit-btn{background:none;border:none;cursor:pointer;padding:4px;display:flex;align-items:center;}.more-btn{background:none;border:none;cursor:pointer;padding:4px 8px;display:flex;align-items:center;}"],y.vb.laptopAndDown,y.vb.mobileThree),B=N.ZP.div.withConfig({displayName:"PaymentSummary__EditPmDialogWrapper",componentId:"sc-e56uve-1"})(["width:550px;max-width:550px;.dialog{padding:0;width:100%;margin:0;border-radius:1.25rem;max-width:550px;}@media ","{max-width:100%;width:calc(100vw - 40px);}"],y.vb.tabletAndDown),G=N.ZP.div.withConfig({displayName:"PaymentSummary__EditPmModal",componentId:"sc-e56uve-2"})(["display:flex;flex-direction:column;gap:20px;h4{font-size:1.75rem;font-weight:700;line-height:35px;}.pm-list{display:flex;flex-direction:column;gap:8px;}
1.pm-option{display:flex;align-items:center;gap:12px;padding:14px 16px;border:1px solid #e6e6e6;border-radius:8px;cursor:pointer;transition:border-color 0.15s;&.selected{border-color:#010101;background:#f8f8f8;}input[type='radio']{width:18px;height:18px;flex-shrink:0;cursor:pointer;accent-color:#010101;}img{width:44px;height:30px;object-fit:cover;border-radius:4px;border:1px solid #ededed;flex-shrink:0;}.pm-details{flex:1;span{font-size:14px;font-weight:600;line-height:21px;}p{font-size:12px;color:#787878;margin-top:2px;}}.default-badge{background:#29339b;border-radius:4px;padding:2px 8px;color:#ffffff;font-size:8px;line-height:18px;font-weight:700;}}.manage-card{display:flex;align-items:center;gap:8px;font-size:14px;font-weight:600;color:#010101;text-decoration:underline;cursor:pointer;width:fit-content;}.actions{display:flex;justify-content:flex-end;gap:12px;margin-top:4px;}"]),Y=N.ZP.div.withConfig({displayName:"PaymentSummary__MobileSummary",componentId:"sc-e56uve-3"})(["font-size:14px;padding-bottom:12px;border-bottom:1px solid #e6e6e6;margin-bottom:40px;.mb-12{margin-bottom:12px;}.mb-8{margin-bottom:8px;}.flex{display:flex;justify-content:space-between;}.info-data{width:145px;text-align:right;.date{line-height:21px;}}.info{line-height:21px;color:#787878;}.date{font-size:14px;line-height:21px;font-weight:700;}.transactionNo{font-weight:400;font-size:12px;line-height:18px;color:#787878;}.status{font-weight:700;font-size:12px;align-self:center;}"]),q=N.ZP.div.withConfig({displayName:"PaymentSummary__Wrapper",componentId:"sc-e56uve-4"})(["display:flex;flex-direction:column;gap:28px;h5{font-weight:bold;margin:0;}overflow:auto;@media ","{max-width:680px;}@media ","{max-width:600px;}@media ","{max-width:550px;}@media ","{max-width:100%;width:100%;}.table{display:grid;
1grid-template-columns:170px 1fr 1fr 1fr 1fr;gap:20px;font-size:14px;align-items:center;.transactionId{min-width:150px;}.date{line-height:21px;}.pack{font-weight:bold;min-width:160px;span{font-weight:normal;display:inline-block;margin-top:8px;}}.status{font-weight:bold;}.type{min-width:100px;white-space:nowrap;}.amount{font-weight:bold;}.retry > button{white-space:nowrap;}@media ","{width:150%;}@media ","{width:180%;}@media ","{width:100%;grid-template-columns:1fr 1fr min-content;row-gap:12px;.date{grid-column:1 / span 3;grid-row:2;}.type{grid-column:span 2;}.pack{grid-row:span 2;line-height:21px;}.status{grid-column:1 / span 3;grid-row:1;}.download{margin-left:auto;cursor:pointer;}}}.header{font-weight:bold;border-bottom:none;padding-bottom:0;font-size:12px;line-height:18px;.transaction-id{min-width:180px;}.description{min-width:150px;}.payment-method{min-width:100px;}.date{min-width:85px;}@media ","{display:none;}}"],y.vb.laptopAndDown,y.vb.laptopAndDownTwo,y.vb.laptopAndDownThree,y.vb.tabletAndDown,y.vb.laptopAndDown,y.vb.laptopAndDownTwo,y.vb.tabletAndDown,y.vb.tabletAndDown),H=function(e){var t,n=e.payments,a=e.status,s=e.isRecurring,y=e.refetch,N=(0,m.Z)(),O=N.showPricing,S=N.data,F=(0,g.useRouter)(),A=(0,u.P)(),R=(A.isLaptopOrMobile,A.isTabletOrMobile),L=(0,p.l)().setNoti,U=(0,j.Zl)(w.d),H=(0,b.useState)(!1),J=H[0],Q=H[1],K=function(){return Q((function(e){return!e}))},X=(0,o.Tu)().handleMutate,$=(0,P.useStripe)(),ee=(0,b.useState)(!1),te=ee[0],ne=ee[1],ae=(0,I.cI)({defaultValues:{type:""},mode:"onChange"}),ie=function(){ne((function(e){return!e}))},se=F.query.id,re=(0,o.Ap)("/accounts/memberships/".concat(se,"/payment-method"),{shouldFetch:!!se}),oe=re.data,le=re.mutate,de=null===oe||void 0===oe?void 0:oe.data,ce=(0,b.useState)(!1),pe=ce[0],ue=ce[1],me=(0,b.useState)(null),xe=me[0],he=me[1],fe=(0,o.Ap)("/payment-methods",{version:2,shouldFetch:pe}).data,ye=null!==(t=null===fe||void 0===fe?void 0:fe.data)&&void 0!==t?t:[];(0,b.useEffect)((function(){var e;pe&&he(null!==(e=null===de||void 0===de?void 0:de.id)&&void 0!==e?e:null)}),[pe]);var ve=(0,o.Tu)(),ge=ve.handleMutate,be=ve.loading,je=function(e){U(!0),X({url:"/accounts/transactions/".concat(e,"/retry"),method:"post",validateUrl:["/accounts/memberships/".concat(F.query.id)],onSuccess:function(){var e=(0,i.Z)(r().mark((function e(t){var n,a,s,o,l,d,c,p,u,m;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null===t||void 0===t||null===(n=t.data)||void 0===n||null===(a=n.data)||void 0===a||!a.needToRedirect){e.next=3;break}return window.location.href=null===t||void 0===t||null===(c=t.data)||void 0===c||null===(p=c.data)||void 0===p?void 0:p.redirectPaymentUrl,e.abrupt("return");case 3:if(u=null===t||void 0===t||null===(s=t.data)||void 0===s||null===(o=s.data)||void 0===o?void 0:o.isNeedToConfirm,m=function(){var e=(0,i.Z)(r().mark((function e(){var n,a,i,s;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null===t||void 0===t||null===(n=t.data)||void 0===n||null===(a=n.data)||void 0===a||!a.clientSecret){e.next=3;break}return e.next=3,$.confirmCardPayment(t.data.data.clientSecret,{payment_method:null===t||void 0===t||null===(i=t.data)||void 0===i||null===(s=i.data)||void 0===s?void 0:s.paymentMethodId}).then((function(e){if(e.error)return U(!1),void L({msg:e.error.message||"Payment failed. We are unable to process your payment.",type:"fail"});e.paymentIntent&&"succeeded"===e.paymentIntent.status&&setTimeout((function(){U(!1),L({msg:"Payment success.",type:"success"})}),3e3)})).catch((function(e){U(!1),L({msg:e.message||"Payment failed. We are unable to process your payment",type:"fail"})}));case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),!u||"paid"===(null===t||void 0===t||null===(l=t.data)||void 0===l||null===(d=l.data)||void 0===d?void 0:d.status)){e.next=10;break}return e.next=8,m();case 8:e.next=11;break;case 10:setTimeout((function(){U(!1),L({msg:"Payment success.",type:"success"})}),3e3);case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),onError:function(e){L({msg:e.data.message||"Payment failed. We are unable to process your payment.",type:"fail"}),console.log("err",e),U(!1)}})};return(0,T.jsxs)(q,{children:[s&&(0,T.jsxs)(V,{children:[de?(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)("img",{onError:(0,z.W)(),src:de.icon,alt:de.brand}),(0,T.jsxs)("div",{className:"pm-info",children:[(0,T.jsxs)("span",{children:["\u2022\u2022\u2022\u2022 ",de.last4]}),(0,T.jsxs)("p",{children:[de.expiryMonth&&de.expiryYear&&"Expires ".concat(String(de.expiryMonth).padStart(2,"0"),"/").concat(4===String(de.expiryYear).length?String(de.expiryYear).slice(-2):de.expiryYear," \u2022 "),de.paymentProviderName]})]})]}):(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(_.IH,{}),(0,T.jsx)("span",{className:"no-pm",children:"No payment method"})]}),("Unpaid"===a||"Freeze"===a||"Active"===a)&&(0,T.jsx)("button",{className:"edit-btn",onClick:function(){return ue(!0)},children:(0,T.jsx)(_.oD,{})})]}),(0,T.jsx)(v.t9,{isOpen:pe,onDismiss:function(){return ue(!1)},style:{background:"hsla(0,0%,10%,0.9)",zIndex:(0,x.V8)({componentType:"overlay",baseIndexNumber:1e4})},children:(0,T.jsx)(B,{children:(0,T.jsx)(v.cZ,{className:"dialog","aria-label":"Edit payment method",children:(0,T.jsx)(c.Z,{dismiss:function(){return ue(!1)},children:(0,T.jsxs)(G,{children:[(0,T.jsx)("h4",{children:"Edit payment method"}),(0,T.jsx)("div",{className:"pm-list",children:ye.map((function(e){return(0,T.jsxs)("label",{className:"pm-option".concat(xe===e.id?" selected":""),children:[(0,T.jsx)("input",{type:"radio",name:"pm",value:e.id,checked:xe===e.id,onChange:function(){return he(e.id)}}),(0,T.jsx)("img",{onError:(0,z.W)(),src:e.icon,alt:e.brand}),(0,T.jsxs)("div",{className:"pm-details",children:[(0,T.jsxs)("span",{children:["\u2022\u2022\u2022\u2022 ",e.last4]}),(0,T.jsxs)("p",{children:[e.expiryMonth&&e.expiryYear&&"Expires ".concat(String(e.expiryMonth).padStart(2,"0"),"/").concat(4===String(e.expiryYear).length?String(e.expiryYear).slice(-2):e.expiryYear," \u2022 "),e.paymentProviderName]})]}),e.isDefault&&(0,T.jsx)("span",{className:"default-badge",children:"Default"})]},e.id)}))}),(0,T.jsxs)("a",{className:"manage-card",href:"/account/billings?tab=2",children:[(0,T.jsx)(_.uC,{}),"Manage card"]}),(0,T.jsxs)("div",{className:"actions",children:[(0,T.jsx)(d.x,{variant:"outline",size:"lg",onClick:function(){return ue(!1)},children:"Cancel"}),(0,T.jsx)(d.x,{variant:"fill",size:"lg",disabled:be||!xe,onClick:function(){xe&&ge({url:"/accounts/memberships/".concat(se,"/payment-method"),method:"patch",data:{customerPaymentMethodId:xe},onSuccess:function(){ue(!1),le(),L({type:"success",msg:"Payment method updated."})},onError:function(e){var t;L({type:"fail",msg:null!==(t=null===e||void 0===e?void 0:e.message)&&void 0!==t?t:"Failed to update payment method."})}})},children:be?"Saving\u2026":"Save"})]})]})})})})}),R?(0,T.jsx)("div",{children:null===n||void 0===n?void 0:n.map((function(e){return(0,T.jsxs)(Y,{children:[(0,T.jsx)(D.Z,{payloadData:{paymentMethod:ae.watch("type"),idempotencyId:e.transactionId},formProps:ae,isShowDialog:te,toggleShowDialog:ie,isShowPayInStore:!1,shouldAutoSelect:!1,buttonLabel:"Pay",membershipId:e.membershipId,isRecurringPayment:e.isRecurring,id:e.transactionId}),(0,T.jsx)(E.Z,{isShowDialog:J,toggleShowDialog:K,id:null===e||void 0===e?void 0:e.transactionId,refetch:y}),(0,T.jsxs)("div",{className:"mb-12 flex",children:[(0,T.jsxs)("div",{children:[(0,T.jsx)("p",{className:"date",children:(0,h.p6)(e.paymentDate,"dd MMM yyyy, hh:mm a")}),(0,T.jsx)("p",{className:"transactionNo",children:e.transactionNo})]}),(0,T.jsx)("div",{className:"status",style:W(W({},f.LN[e.hasChildTransaction?e.childTransactionStatus:"Completed"===e.status?"Paid":e.status]),{},{padding:"6px 10px",borderRadius:"4px"}),children:e.hasChildTransaction?e.childTransactionStatus:e.status===M.b.COMPLETED?"Paid":e.status===M.b.UNPAID?"Unpaid":e.status===M.b.WAITING_APPROVAL?(0,T.jsx)("div",{className:"status gap-1 rounded p-2",style:{backgroundColor:"#FFEFC6",color:"#94320C"},children:"Waiting approval"}):e.status===M.b.DECLINED?(0,T.jsx)("div",{className:"status gap-1 rounded p-2",style:{backgroundColor:"#FFE3E1",color:"#9F1D15"},children:"Declined"}):e.status===M.b.WAITING_ON_CUSTOMER?(0,T.jsx)("div",{className:"status gap-1 rounded p-2",style:{backgroundColor:"#EDEDED",color:"#000"},children:"Action required"}):e.status})]}),(0,T.jsxs)("div",{className:"mb-8 flex",children:[(0,T.jsx)("p",{className:"info",children:"Description"}),(0,T.jsxs)("div",{className:"info-data",children:[(0,T.jsx)("p",{className:"date",children:e.product}),(0,T.jsx)("p",{children:e.pricingType})]})]}),(0,T.jsxs)("div",{className:"mb-8 flex",children:[(0,T.jsx)("p",{className:"info",children:"Payment method"}),(0,T.jsx)("p",{className:"date info-data",children:e.manualPaymentMethodId?e.manualPaymentMethodName:(0,k.w)({paymentMethod:e.paymentMethod,paymentProvider:e.paymentProvider,pisPaymentMethod:e.pISPaymentMethod,type:e.type})})]}),(0,T.jsxs)("div",{className:"mb-8 flex",children:[(0,T.jsx)("p",{className:"info",children:"Total"}),(0,T.jsx)("p",{className:"date info-data",children:O(e.amount)})]}),"Overdue"===e.status||"UnPaid"===e.status?(0,T.jsx)(T.Fragment,{children:(null===S||void 0===S?void 0:S.enablePayment)&&(0,T.jsx)(l.hO,{onClick:function(){"UnPaid"===e.status?ie():"Overdue"===e.status&&je(e.transactionId)},width:"100%",padding:"10px 0px",children:"Pay"})}):e.status===M.b.WAITING_APPROVAL?(0,T.jsx)("div",{className:"w-full pt-4",children:(0,T.jsx)(d.x,{size:"lg",className:"w-full py-3",onClick:function(){Q(!0)},variant:"outline",children:"View"})}):e.status===M.b.DECLINED?(0,T.jsx)("div",{className:"w-full pt-4",children:(0,T.jsx)(d.x,{size:"lg",className:"w-full py-3",onClick:function(){Q(!0)},variant:"fill",children:"Review"})}):null]},e.invoiceNo)}))}):(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(C.ZT,{className:"",children:"All prices stated are inclusive of tax."}),(0,T.jsxs)("div",{children:[(0,T.jsxs)("table",{className:"block max-w-[calc(100vw-500px)] overflow-x-auto whitespace-nowrap pb-5",children:[(0,T.jsx)("thead",{children:(0,T.jsxs)("tr",{children:[(0,T.jsx)("th",{className:"px-4 text-left",children:"Date"}),(0,T.jsx)("th",{className:"px-4 text-left",children:"Transaction Id"}),(0,T.jsx)("th",{className:"px-4 text-left",children:"Invoice No"}),(0,T.jsx)("th",{className:"px-4 text-left",children:"Description"}),(0,T.jsx)("th",{className:"px-4 text-left",children:"Payment method"}),(0,T.jsx)("th",{className:"px-4 text-left",children:"Status"}),(0,T.jsx)("th",{className:"px-4 text-left",children:"Total"}),(0,T.jsx)("th",{className:"px-4 text-left"})]})}),(0,T.jsx)("tbody",{children:null===n||void 0===n?void 0:n.map((function(e,t){return(0,T.jsx)(Z,{refetch:y,payment:e,handleRetryPayment:je},e.transactionId)}))})]}),(0,T.jsx)("div",{className:""})]})]})]})}},36266:function(e,t,n){"use strict";var a=n(67294),i=n(85893),s=a.createContext(null);t.Z=function(e){var t=e.children,n=(0,a.useState)(""),r=n[0],o=n[1];return(0,i.jsx)(s.Provider,{value:{paymentMethod:r,setPaymentMethod:o},children:t})}},35874:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var a=n(59499),i=n(4730),s=n(85893),r=["stroke"];function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?o(Object(n),!0).forEach((function(t){(0,a.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function d(e){var t=e.stroke,n=(0,i.Z)(e,r);return(0,s.jsxs)("svg",l(l({width:"14",height:"15",viewBox:"0 0 14 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),{},{children:[(0,s.jsx)("path",{d:"M1.40039 1.8999L12.6004 13.0999",stroke:null!==t&&void 0!==t?t:"#010101",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,s.jsx)("path",{d:"M1.40039 13.0999L12.6004 1.8999",stroke:null!==t&&void 0!==t?t:"#010101",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}))}},34232:function(e,t,n){"use strict";n.d(t,{d:function(){return a}});var a=(0,n(4480).cn)({key:"payment-loading",default:!1})},13234:function(e,t,n){"use strict";n.d(t,{w:function(){return i}});var a=n(60407),i=function(e){var t,n=e.paymentProvider,i=e.paymentMethod,s=e.type,r=e.pisPaymentMethod;e.storeCreditsAmount;return"Stripe"===n&&"card"!==s?null===s||void 0===s?void 0:s.toUpperCase():"PIS"===n&&"Other"===i?r:null!==(t=a.G[i])&&void 0!==t?t:i}},40270:function(){},39359:function(){}}]);

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.