1(self.rspackChunkryfma=self.rspackChunkryfma||[]).push([[21194],{20181(e,t,r){var n=/^\s+|\s+$/g,s=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,i=/^0o[0-7]+$/i,c=parseInt,o="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,l="object"==typeof self&&self&&self.Object===Object&&self,u=o||l||Function("return this")(),d=Object.prototype.toString,m=Math.max,f=Math.min,p=function(){return u.Date.now()};function y(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function x(e){if("number"==typeof e)return e;if("symbol"==typeof(t=e)||t&&"object"==typeof t&&"[object Symbol]"==d.call(t))return 0/0;if(y(e)){var t,r="function"==typeof e.valueOf?e.valueOf():e;e=y(r)?r+"":r}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(n,"");var o=a.test(e);return o||i.test(e)?c(e.slice(2),o?2:8):s.test(e)?0/0:+e}e.exports=function(e,t,r){var n,s,a,i,c,o,l=0,u=!1,d=!1,h=!0;if("function"!=typeof e)throw TypeError("Expected a function");function j(t){var r=n,a=s;return n=s=void 0,l=t,i=e.apply(a,r)}function g(e){var r=e-o,n=e-l;return void 0===o||r>=t||r<0||d&&n>=a}function v(){var e,r,n,s=p();if(g(s))return b(s);c=setTimeout(v,(e=s-o,r=s-l,n=t-e,d?f(n,a-r):n))}function b(e){return(c=void 0,h&&n)?j(e):(n=s=void 0,i)}function T(){var e,r=p(),a=g(r);if(n=arguments,s=this,o=r,a){if(void 0===c)return l=e=o,c=setTimeout(v,t),u?j(e):i;if(d)return c=setTimeout(v,t),j(o)}return void 0===c&&(c=setTimeout(v,t)),i}return t=x(t)||0,y(r)&&(u=!!r.leading,a=(d="maxWait"in r)?m(x(r.maxWait)||0,t):a,h="trailing"in r?!!r.trailing:h),T.cancel=function(){void 0!==c&&clearTimeout(c),l=0,n=o=s=c=void 0},T.flush=function(){return void 0===c?i:b(p())},T}},18840(e,t,r){"use strict";r.r(t),r.d(t,{default:()=>$});var n=r(74848),s=r(23829),a=r(23105),i=r(93621),c=r(92343),o=r(93979),l=r(69237),u=r(54953),d=r(21540),m=r(38036),f=r(7358),p=r(21438),y=r(54553),x=r(86952),h=r(85137),j=r(41615),g=r(72282),v=r(38784);let b=(0,v.J1)` 2 mutation addCard( 3 $amount: Int 4 $currency: String 5 $paymentToken: String 6 $paymentType: String 7 $objectType: String 8 $orderType: String 9 $userId: String 10 $description: String 11 $isRecurrent: Boolean 12 $returnUrl: String 13 ) { 14 addCard( 15 amount: $amount 16 currency: $currency 17 paymentToken: $paymentToken 18 paymentType: $paymentType 19 objectType: $objectType 20 orderType: $orderType 21 userId: $userId 22 description: $description 23 isRecurrent: $isRecurrent 24 returnUrl: $returnUrl 25 ) 26 } 27`;var T=r(25539),N=r(66501),w=r(37402);let E={bank_card:(0,n.jsx)(o.A,{}),yandex:(0,n.jsx)(g.A,{}),paypal:(0,n.jsx)(j.A,{})},$=function(){let[e]=(0,d.Bd)(["account"]),{currUserId:t}=(0,h.As)(),{staticContext:r}=(0,h.t0)(),[o,j]=(0,u.useState)(null),[g,v]=(0,u.useState)([]),[$,S]=(0,u.useState)(!1),{loading:k,error:C,data:I}=(0,s.I)(N.A,t?{fetchPolicy:"network-only"}:a.h),[A]=(0,i.n)(b),[M]=(0,i.n)(T.A);if(!t){let e="/login?referer=/me/cards";return r?(r.status=301,r.redirectTo=e,null):(0,n.jsx)(m.C5,{to:e})}if(k)return(0,n.jsxs)("div",{children:[(0,n.jsx)(x.E,{className:"mb-4 h-8 w-56 rounded-full"}),(0,n.jsx)(x.E,{className:"h-4 w-full rounded-full"}),(0,n.jsx)(x.E,{className:"mt-2 h-4 w-2/3 rounded-full"}),(0,n.jsx)("div",{className:"mt-4",children:(0,n.jsx)(x.E,{className:"h-10 w-40 rounded-lg"})}),(0,n.jsx)("ul",{className:"mt-8 space-y-4",children:Array.from({length:3}).map((e,t)=>(0,n.jsxs)("li",{className:"flex items-center justify-between rounded-lg px-2 py-1",children:[(0,n.jsxs)("div",{className:"flex min-h-11 items-center space-x-4",children:[(0,n.jsx)(x.E,{className:"size-8 rounded-full"}),(0,n.jsxs)("div",{children:[(0,n.jsx)(x.E,{className:"h-4 w-40 rounded-full"}),(0,n.jsx)(x.E,{className:"mt-2 h-3 w-56 rounded-full"})]})]}),(0,n.jsx)(x.E,{className:"size-6 rounded-full"})]},t))})]});if(C)return(0,n.jsxs)("div",{children:["Error: ",C.message]});let P=async()=>{if(o)try{await M({variables:{_id:o}}),v(e=>[...e,o]),S(!1),j(null),f.Notification.success("ÐлаÑежнÑй меÑод Ñдален ÑÑпеÑно!")}catch(e){f.Notification.error(e)}},O=async()=>{try{let e=await A({variables:{amount:2,currency:"RUB",paymentType:"bank_card",isRecurrent:!0,returnUrl:"https://ryfma.com/me/cards?res=success"}}),t=e?.data?.addCard?.confirmation;t?.type==="redirect"&&window.location.assign(t.confirmation_url)}catch(e){f.Notification.error(e)}},_=I?.getPaymentCards??[];return(0,n.jsxs)(w.A,{seoTitle:e("seoPaymentsTitle"),seoDescription:e("seoPaymentsDesc"),link:"me/payments",headerText:e("paymentsHeader"),subheaderText:e("paymentsSubheader"),children:[(0,n.jsx)("h3",{className:"mb-4 border-b pb-2 text-2xl font-bold",children:e("paymentsMethods")}),(0,n.jsx)("p",{className:"text-sm text-gray-600",children:e("paymentsMethodsText1")}),(0,n.jsx)("p",{className:"text-sm text-gray-600",children:e("paymentsMethodsText2")}),(0,n.jsx)("div",{className:"mt-4",children:(0,n.jsx)(y.$,{type:"button",onClick:O,children:e("addPayment")})}),(0,n.jsxs)("ul",{className:"mt-8 space-y-4",children:[0===_.length&&(0,n.jsx)("p",{className:"flexCenter",children:e("noPaymentMethods")}),_.map(t=>{let r;if(g.includes(t._id))return null;let s=(0,c.GP)(new Date(t.updatedAt),"dd.MM.yyyy");return(0,n.jsxs)("li",{className:"flex items-center justify-between rounded-lg px-2 py-1 hover:bg-gray-100",children:[(0,n.jsxs)("div",{className:"flex min-h-11 items-center justify-between space-x-4",children:[E[t.paymentType]??null,(0,n.jsx)("div",{className:"flex-1",children:"succeeded"===t.status?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("b",{children:t.cardNumberLast}),(0,n.jsxs)("p",{className:"text-sm text-gray-600",children:[e("expires")," ",t.cardExpMonth,"/",t.cardExpYear," ⢠",e("updated")," ",s]})]}):(0,n.jsx)("b",{children:e("pendingCardApprove")})})]}),_.length>1&&(0,n.jsx)("button",{type:"button",onClick:(r=t._id,()=>{j(r),S(!0)}),className:"cursor-pointer rounded-lg hover:bg-gray-300","aria-label":e("common:delete"),children:(0,n.jsx)(l.A,{size:24})})]},t._id)})]}),(0,n.jsx)(p.Lt,{open:$,onOpenChange:S,children:(0,n.jsxs)(p.EO,{className:"max-w-md",children:[(0,n.jsx)(p.wd,{children:(0,n.jsx)(p.r7,{children:e("deletePaymentMethod")})}),(0,n.jsx)("p",{children:e("deletePaymentMethodText")}),(0,n.jsxs)(p.ck,{children:[(0,n.jsx)(p.Zr,{onClick:()=>S(!1),children:e("common:no")}),(0,n.jsx)(p.Rx,{variant:"destructive",onClick:P,children:e("common:yes")})]})]})})]})}},38445(e){"use strict";e.exports={lZ:"YwKUAz",QI:"_6ejKQA",pf:"H5gAyO",ZI:"_2MhWIw",kz:"kqwemF",Zy:"jU5-ao",tV:"ijTAHA",zP:"_71Qsrc",yl:"Xrg8xu"}},93621(e,t,r){"use strict";r.d(t,{n:()=>l});var n=r(15381),s=r(54953),a=r(52404),i=r(2928);
27let c=r(16507).S?s.useLayoutEffect:s.useEffect;var o=r(70111);let l=function(e,t){let r=(0,o.m)(t?.client),[l,d]=s.useState(()=>u(r)),m=s.useRef({result:l,mutationId:0,isMounted:!0,client:r,mutation:e,options:t});c(()=>{Object.assign(m.current,{client:r,options:t,mutation:e})});let f=s.useCallback((e={})=>{let{options:t,mutation:r}=m.current,s={...t,mutation:r},c=e.client||m.current.client,o="function"==typeof e.context?e.context(t?.context):e.context;!m.current.result.loading&&m.current.isMounted&&d(m.current.result={loading:!0,error:void 0,data:void 0,called:!0,client:c});let l=++m.current.mutationId,u=(0,a.l)(s,{...e,context:o});return(0,i.X)(c.mutate(u).then(t=>{let{data:r,error:s}=t,a=e.onError||m.current.options?.onError;if(s&&a&&a(s,u),l===m.current.mutationId){let e={called:!0,loading:!1,data:r,error:s,client:c};m.current.isMounted&&!(0,n.L)(m.current.result,e)&&d(m.current.result=e)}let i=e.onCompleted||m.current.options?.onCompleted;return s||i?.(t.data,u),t},t=>{if(l===m.current.mutationId&&m.current.isMounted){let e={loading:!1,error:t,data:void 0,called:!0,client:c};(0,n.L)(m.current.result,e)||d(m.current.result=e)}let r=e.onError||m.current.options?.onError;throw r&&r(t,u),t}))},[]),p=s.useCallback(()=>{if(m.current.isMounted){let e=u(m.current.client);Object.assign(m.current,{mutationId:0,result:e}),d(e)}},[]);return s.useEffect(()=>{let e=m.current;return e.isMounted=!0,()=>{e.isMounted=!1}},[]),[f,{reset:p,...l}]};function u(e){return{data:void 0,error:void 0,called:!1,loading:!1,client:e}}},70998(e,t,r){"use strict";function n(e,t,r,n){return e.addEventListener(t,r,n),()=>{e.removeEventListener(t,r,n)}}r.d(t,{q:()=>n})},84737(e,t,r){"use strict";var n=r(17424);let s="u">typeof CSS&&!!CSS.supports?.("-webkit-backdrop-filter:none");s||n.ST.includes("firefox"),s||n.ST.includes("chrom"),r.d(t,{},{Fp:s})},17424(e,t,r){"use strict";let{userAgent:n,platform:s,maxTouchPoints:a}="u"<typeof navigator?{userAgent:"",platform:"",maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??0},i=n.toLowerCase(),c=s.toLowerCase();r.d(t,{},{JG:c,RT:a,ST:i})},90799(e,t,r){"use strict";var n=r(92115),s=r(65708);class a{static create(){return new a}currentId=0;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=0,t()},e)}isStarted(){return 0!==this.currentId}clear=()=>{0!==this.currentId&&(clearTimeout(this.currentId),this.currentId=0)};disposeEffect=()=>this.clear}function i(){let e=(0,n.j)(a.create).current;return(0,s.y)(e.disposeEffect),e}r.d(t,{E:()=>a,Z:()=>i})}}]);
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.