PageSourceSearch

https://www.vincino.pt/_next/static/chunks/3790-1ba6f6afd652f6d8.js

js vincino.pt collected 2026-10-06 04:57:45 UTC 14,751 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3790],{5411:(e,t,r)=>{r.d(t,{DU:()=>c,QR:()=>u});var n=r(14979),a=r(66033),o=r(93749);let i=(0,a.pW)(a.Ay).child({feature:"deposit"}),s=new Set,d=new Set(["PENDING","PENDING_REDIRECT","STARTED","APPROVING"]);function u(e){return!!e&&d.has(e)}function c(e,t,r){let a=e.status;if(!a||a===t)return;let d=e.paymentId??e.id,u=d?`${d}:${a}`:void 0;u&&s.has(u)||(u&&s.add(u),queueMicrotask(()=>{Promise.resolve((0,o.kt)(e,r)).catch(t=>{i.error("[DEPOSIT][STATUS_SIDE_EFFECTS][ERROR]",{errorMessage:(0,n.Vy)(t),paymentId:e.paymentId??e.id,status:a},{eventName:"depositStatusSideEffectsFailed",action:"scheduleDepositStatusSideEffects"})})}))}},6026:(e,t,r)=>{r.d(t,{s:()=>s});var n=r(54522);r(83610),r(28516),r(53896);var a=r(49538),o=r(66033);function i(e){return{bankName:e.bankName??"",description:e.label,clearingHouse:e.clearingHouse??"",paymentMethodId:0,storedDetailReference:e.accountId,provider:"TRUSTLY",paymentProviderName:"TRUSTLY"}}var s=new class{setBanksFromPaymentOptions(e){let t=e.find(e=>"TRUSTLY"===e.gateway);this.banks=(t?.accounts??[]).map(i),this.currentBank=this.banks[0]||null}async fetchBanks(){try{let e=(0,a.F6)(),t=await (0,n.JR)({type:"DEPOSIT",userId:e});this.setBanksFromPaymentOptions(t.data?.paymentOptionsV2??[]),o.Ay.info("[TRUSTLY][EXPRESS][STORED][BANKS][FETCH][SUCCESS]",{responseMessage:this.banks})}catch(e){throw o.Ay.error("[TRUSTLY][EXPRESS][STORED][BANKS][FETCH][ERROR]",{errorMessage:e}),e}}dropBankFromCache(e){this.banks=this.banks.filter(t=>t.storedDetailReference!==e.storedDetailReference),this.currentBank?.storedDetailReference===e.storedDetailReference&&(this.currentBank=this.banks[0]||null)}async removeCurrentBank(e){try{let t=await (0,n.Ed)({input:{accountId:e.storedDetailReference,gateway:"TRUSTLY",provider:"TRUSTLY"}});if(!t.data?.removeAccountUsedBy)return o.Ay.error("[TRUSTLY][EXPRESS][STORED][BANKS][REMOVE][FAILED][ERROR]",{errorMessage:t.errors}),!1}catch(e){throw o.Ay.error("[TRUSTLY][EXPRESS][STORED][BANKS][REMOVE][ERROR]",{errorMessage:e}),e}return await this.fetchBanks().catch(()=>void 0),this.dropBankFromCache(e),!0}getCurrentBank(){return this.currentBank}setCurrentBank(e){this.currentBank=e}getBanks(){return this.banks}setBanks(e){this.banks=e}clearCachedBanks(){this.banks=[],this.currentBank=null}constructor(){this.banks=[],this.currentBank=null}}},10130:(e,t,r)=>{r.d(t,{f:()=>a});var n=r(14979);function a(e,t){return e?t??(0,n.nT)()?e:e.filter(e=>"APPLEPAY"!==e.provider):[]}},24173:(e,t,r)=>{r.d(t,{d:()=>N});var n=r(41023),a=r(73201),o=r(858),i=r(20372),s=r(14979),d=r(66033),u=r(15925),c=r(87382);r(32795),r(75882),r(54522),r(83467),r(30324),r(54143),r(83610),r(28516),r(53896);var m=r(98081),l=r(61119),p=r(28387);let h="tma"===l.iD?c.z:p.a,y={isLoading:!0,isSubmitting:!1,paymentMethods:null,selectedPaymentMethod:void 0,lastPayment:null};var f=r(5411),E=r(45080),S=r(10130),P=r(21729);function R(e){let t=!!e.accountId?.trim();return{hasHolderName:!!e.account?.holderName?.trim(),hasAccountId:t,accountType:t?"EXISTING":"NEW"}}var g=r(93749);let v=e=>e?.paymentId??e?.id,I={isMethodPickerOpen:!1,showCardOptions:!0,isAddingNewCard:!1,hasUserSelectedMethod:!1},T={...I,deposit:void 0,iframeSrc:void 0,htmlContent:void 0,depositResultStatus:void 0,depositResultStatusCode:void 0,isFirstDeposit:!1,isIbanVerified:!1,currentPaymentId:void 0,lastDismissedPaymentId:void 0,depositForm:void 0,refreshError:!1,recoveryKey:0,lastRefreshHadError:!1,lastPaymentInputTelemetry:void 0},C=(0,d.pW)(d.Ay).child({feature:"deposit"});function D(e){return{deposit:e,iframeSrc:e?.iframeSrc,htmlContent:e?.htmlContent,depositResultStatus:e?.status,depositResultStatusCode:e?.statusCode,isFirstDeposit:!!e?.firstOfType}}function w(e){return{provider:e?.provider,gateway:e?.gateway,method:e?.method}}let N=(0,o.v)()((0,i.lt)((e,t)=>({...T,...{...y,setSelectedPaymentMethod:t=>{e({selectedPaymentMethod:t})},fetchPaymentInfo:async()=>{e({isLoading:!0});try{let t=await h.fetchPaymentInfo();e({paymentMethods:t.methods,lastPayment:t.lastPayment,selectedPaymentMethod:t.methods.find(e=>e.id===t.lastPayment?.method&&e.providerId===t.lastPayment.provider)||t.methods[0]})}catch(e){d.Ay.error("[DEPOSIT][FETCH_PAYMENT_INFO][ERROR]",{errorMessage:e})}finally{e({isLoading:!1})}}},submitDeposit:async(r,o=!1)=>{let i,m;if(function(e,t,r){let{activeBonusId:n}=a.useTmaBonusStore.getState();return!!r&&!!n&&(u.useModalStore.getState().setOpenModalName(u.OpenModalName.ForfeitPromotion,u.OpenModalName.Deposit),e({depositForm:t}),!0)}(e,r,o))return;let{userId:l}=n.useAuthStore.getState(),p=l??void 0;i=void 0!==t().depositForm,e({isSubmitting:!0,isLoading:i,lastPaymentInputTelemetry:m=R(r)}),(0,d.Pg)({form_name:"deposit",submission_status:"submitted",userId:p,payment_method:r?.method}),C.info("[DEPOSIT][REQUEST]",{amount:r.amount,paymentInfo:w(r),...m},{eventName:"depositRequestStarted",action:"submitDeposit"}),"CARD"!==r.method||m.hasAccountId||m.hasHolderName||C.warn("[DEPOSIT][REQUEST][CARD_HOLDER_NAME_MISSING]",{errorMessage:"card_holder_name_missing",amount:r.amount,paymentInfo:w(r),...m},{eventName:"depositCardHolderNameMissing",action:"submitDeposit"});try{let a,o,i,s,m,l,h,y=await c.z.submitDeposit(r),S=y?.payment,P=y?.redirect;if((0,n.showRestrictedToastIfPayment)(S),!S||S.errorMessage){let n,a,o;return void((0,d.TT)("deposit_failed",r.amount,p,r?.method,{errorCode:S?.statusCode??S?.status??void 0}),n=R(r),C.error("[DEPOSIT][CREATE_PAYMENT_RESPONSE][ERROR]",{errorMessage:S?.errorMessage??"no_payment_info",paymentInfo:w(r),...n},{eventName:"depositCreatePaymentFailed",action:"createPaymentResponse"}),a=S?(0,E.WG)({...S,...(0,g.Tb)(S)}):void 0,(o=v(a))&&e({lastPaymentInputTelemetry:{...n,paymentId:o}}),a&&(0,g.Rg)(a.status)&&(0,f.DU)(a,void 0,n),!a&&(0,u.showToast)("something-went-wrong","error"),e({isSubmitting:!1,isLoading:!1,depositForm:void 0,...D(a),currentPaymentId:v(a)??t().currentPaymentId}))}a=(0,E.kz)((0,E.WG)(S),P,r.method),o=(0,E.WG)({...a,...(0,g.Tb)(a)}),i=S.status,s="SUCCEEDED"===i,m=(0,g.Rg)(i)&&!s,l=R(r),h=v(o),e({...D(o),currentPaymentId:h,isSubmitting:!1,isLoading:!1,depositForm:void 0,lastPaymentInputTelemetry:{...l,paymentId:h}}),(s||m)&&(0,f.DU)(o,void 0,l),o.firstOfType&&s&&t().checkIbanVerified(),(0,d.Pg)({form_name:"deposit",submission_status:"success",userId:p,payment_method:r?.method})}catch(a){let t;t=(0,s.Vy)(a),(0,d.TT)("deposit_failed",r.amount,p,r?.method,{errorCode:(0,s.$p)(a)??t}),C.error("[DEPOSIT][CREATE_PAYMENT_REQUEST][ERROR]",{errorMessage:t,paymentInfo:w(r),...R(r)},{eventName:"depositCreatePaymentRequestFailed",action:"createPaymentRequest"}
1),(0,n.showRestrictedToastIfError)(a)||(0,u.showToast)("something-went-wrong","error"),e({isSubmitting:!1,isLoading:!1,depositForm:void 0})}},checkIbanVerified:async()=>{e({isIbanVerified:await c.z.checkIbanVerified()})},openMethodPicker:()=>{e({isMethodPickerOpen:!0,showCardOptions:!1,isAddingNewCard:!1})},selectPaymentMethodFromPicker:t=>{e({selectedPaymentMethod:t,isMethodPickerOpen:!1,showCardOptions:!1,hasUserSelectedMethod:!0})},setShowCardOptions:t=>{e({showCardOptions:t})},setAddNewCard:t=>{e({isAddingNewCard:t})},receivedPaymentOptions:t=>{var r;let n,a,{paymentMethods:o,lastPayment:i,lastPaymentFetched:s}=(n="paymentOptions"in(r=t)?(r.paymentOptions??[]).filter(e=>"BANK_IBAN"!==e.method).map(e=>{let{label:t,iconSrc:r}=(0,P.h)(e.provider,e.method);return{id:e.method,label:t,iconSrc:r,predefinedAmountList:e.quickOptions,minAmount:Number(e.min),maxAmount:Number(e.max),defaultAmount:Number(e.defaultAmount),accounts:e.accounts,provider:e.provider,providerId:e.provider,fixedFee:e.fixedFee,percentFee:e.percentFee,gateway:e.gateway}}):void 0,{paymentMethods:n,lastPayment:(a="lastPayment"in r)?function(e){if(e)return{amount:e.amount,method:e.method,provider:e.provider}}(r.lastPayment):void 0,lastPaymentFetched:a});e(e=>{let t=o??e.paymentMethods,r=function({methods:e,incomingLastPayment:t,lastPaymentFetched:r,cachedLastPayment:n,hasUserSelectedMethod:a,selectedPaymentMethod:o,isMethodPickerOpen:i,allowApplePay:s}){let d=r?t??null:n??null,u=(0,S.f)(e,s);if(a)return{lastPayment:d,selectedPaymentMethod:o,isMethodPickerOpen:i};let c=function(e,t){if(t)return e.find(e=>e.id===t.method&&e.providerId===t.provider)}(u,d);return c?{lastPayment:d,selectedPaymentMethod:c,isMethodPickerOpen:!1}:1===u.length?{lastPayment:d,selectedPaymentMethod:u[0],isMethodPickerOpen:!1}:{lastPayment:d,selectedPaymentMethod:void 0,isMethodPickerOpen:u.length>1}}({methods:t,incomingLastPayment:i,lastPaymentFetched:s,cachedLastPayment:e.lastPayment,hasUserSelectedMethod:e.hasUserSelectedMethod,selectedPaymentMethod:e.selectedPaymentMethod,isMethodPickerOpen:e.isMethodPickerOpen});return{paymentMethods:t,...r,isLoading:null==t&&e.isLoading}})},handleResetStatus:()=>{let{paymentMethods:r,lastPayment:n,currentPaymentId:a,lastDismissedPaymentId:o}=t(),i=!n&&(0,S.f)(r).length>1;e({...I,isMethodPickerOpen:i,...i?{selectedPaymentMethod:void 0}:{},currentPaymentId:void 0,lastDismissedPaymentId:a??o,depositForm:void 0,...D(void 0)})},resetState:()=>{e({...y,...T})},setDepositPayment:r=>{let n=t().deposit,{currentPaymentId:a,lastDismissedPaymentId:o}=t(),i=n?.status;if(a&&r.paymentId&&r.paymentId!==a||!a&&r.paymentId&&r.paymentId===o)return;let s=(0,E.WG)({...n,...r,iframeSrc:r.iframeSrc??n?.iframeSrc??void 0,htmlContent:r.htmlContent??n?.htmlContent??void 0}),d=(0,E.WG)({...s,...(0,g.Tb)(s)});e({...D(d),currentPaymentId:v(d)??t().currentPaymentId}),(0,f.DU)(d,i,function(e,t){if(!e?.paymentId||!t||e.paymentId!==t)return;let{paymentId:r,...n}=e;return n}(t().lastPaymentInputTelemetry,v(d))),d.firstOfType&&"SUCCEEDED"===d.status&&t().checkIbanVerified()},refreshPendingDepositPayment:async()=>{let{deposit:r,currentPaymentId:a}=t(),o=n.useAuthStore.getState().userId;if(o&&a&&(0,f.QR)(r?.status)){e({lastRefreshHadError:!1});try{let{lastPayment:e}=await (0,m.R_)(o,{paymentId:a}),r=t().deposit?.status;if(!e||e.status===r||(0,g.Rg)(r))return;t().setDepositPayment(e)}catch(t){e({lastRefreshHadError:!0}),C.warn("[DEPOSIT][REFRESH_PENDING][ERROR]",{errorMessage:(0,s.Vy)(t),paymentId:a,userId:o},{eventName:"depositRefreshPendingFailed",action:"refreshPendingDepositPayment"})}}},setRefreshError:()=>{e({refreshError:!0})},retryRecovery:()=>{e(e=>({refreshError:!1,recoveryKey:e.recoveryKey+1}))}}),{name:"tmaDepositStore",store:"deposit"}))},45080:(e,t,r)=>{r.d(t,{QK:()=>u,WG:()=>c,kz:()=>m});var n=r(61119),a=r(51630);let o=new Set(["ABANDONED","APPROVING","CANCELED","CANCELING","CARD_NEEDED","DECLINED","DECLINING","FAILED","PENDING","PENDING_APPROVAL","PENDING_REDIRECT","RETURNED","STARTED","SUCCEEDED"]),i=new URL(n.Kk.envConfig.production.baseUrl).hostname.replace(/^(www\d*\.)?(stg\.)?/,""),s=new Set([n.Kk.envConfig.staging.baseUrl,n.Kk.envConfig.production.baseUrl].map(e=>new URL(e).hostname));function d(e){try{let t=new URL(e,window.location.origin);if("https:"===window.location.protocol&&"http:"===t.protocol)return t.protocol="https:",t.toString();return e}catch{return e}}function u(e){if(!e)return!1;try{let t,r=new URL(e,window.location.origin);return r.origin===window.location.origin&&(t=r.pathname.replace(/\/$/,""),"/pay"===t||n.Kk.languages.some(e=>t===`/${e}/pay`))&&r.searchParams.has("uri")}catch{return!1}}function c(e){let t=e.paymentId??e.id;return t?{...e,paymentId:t}:e}function m(e,t,r){if(!t)return c(e);let{html:u}=t,m=t.uri?d(t.uri):t.uri,l=function(e){if(e)try{let t,r=new URL(e,window.location.origin);if(t=r.pathname.replace(/\/$/,"").replace(/^\/[a-z]{2}(?=\/)/,""),!("/deposit"===t||t.endsWith("/deposit")))return;let n=r.searchParams.get("status")?.toUpperCase(),a=n&&o.has(n)?n:void 0,i=r.searchParams.get("id")??void 0;if(!a&&!i)return null;return{...a?{status:a}:{},...i?{paymentId:i}:{}}}catch{return}}(m);if(void 0!==l)return c({...e,...l??{}});let p=function(e,t){if(!e)return;let r=d(e);if(function(e="live_LWGOTOA6FZHS3IETSNH3UHAJMEJEEXRE"){return!!(n.Kk.customMultibancoVoucherEnabled&&e)}()){let e=function(e){if(e)try{var t;let r=new URL(e);if("http:"!==r.protocol&&"https:"!==r.protocol||r.username||r.password||r.port||(t=r.hostname)!==`api.edge.${i}`&&t!==`stg-api.edge.${i}`||!/^\/pay\/(?:launch|redirect)\/adyen\/?$/.test(r.pathname))return;return r.protocol="https:",r.toString()}catch{return}}(r);if(e){let r,o;return!function(e,t){if(t?.toLowerCase()==="multibanco")return!0;try{return new URL(e).searchParams.get("method")?.toLowerCase()==="multibanco"}catch{return!1}}(e,t)?e:(o=(0,a.e)("/pay",(r="u"<typeof document?"":document.documentElement.lang,n.Kk.languages.includes(r)?r:n.Kk.defaultLanguage)),`${o}?uri=${encodeURIComponent(e)}`)}}return!function(e){if(!e)return!1;try{var t,r,n;let a=new URL(e,window.location.origin);if((n=t=a.hostname)===window.location.hostname||n.endsWith(`.preview.${i}`)||s.has(n)||t.endsWith(`.${i}`))return r=a.pathname,"/pay/launch"===r||r.startsWith("/pay/launch/")||a.hostname===window.location.hostname;return!0}catch{return!1}}(r)?void 0:r}(m,r);return u?c({...e,htmlContent:u,iframeSrc:p}):p?c({...e,iframeSrc:p}):c(e)}},93749:(e,t,r)=>{r.d(t,{Rg:()=>h,Tb:()=>y,kt:()=>m});var n=r(41023),a=r(73201),o=r(83414),i=r(14979),s=r(66033),d=r(79056);let u=["SUCCEEDED","PENDING_APPROVAL",...d.Lg],c=(0,s.pW)(s.Ay).child({feature:"deposit"});async function m(e,t){let{userId:r}=n.useAuthStore.getState();(function(e,t,r){var n;let{paymentId:a,status:o,statusCode:i,errorMessage:u,statusMessage:m,gateway:h,provider:y,method:f,amount:E,firstOfType:S}=e,P={paymentId:a,status:o,errorMessage:u||m,gateway:h,provider:y,method:f,amount:E,...r??{}};p(o)&&(S?c.info("[DEPOSIT][PAYMENT_STATUS_CHANGE][SUCCESS][FIRST]",{amount:E,...(0,s.Yg)(t)}):c.info("[DEPOSIT][PAYMENT_STATUS_CHANGE][SUCCESS]",P,{eventName:"depositStatusSucceeded",action:"paymentStatusChange"})),(n=o)&&d.Lg.includes(n)&&((0,s.TT)("deposit_failed",E,t,l(e),{errorCode:i??o??void 0}),c.error("[DEPOSIT][PAYMENT_STATUS_CHANGE][ERROR]",P,{eventName:"depositStatusFailed",action:"paymentStatusChange"}))})(e,r??void 0,t),(0,o.f)(e.status)&&(0,o.G)(e.status),p(e.status)&&await f(e,r??void 0)}function l(e){return{gateway:e.gateway??"",provider:e.provider??"",method:e.method??"unknown"}}function p(e){return"SUCCEEDED"===e}function h(e){return!!e&&u.includes(e)}function y(e){return h(e.status)?{iframeSrc:void 0,htmlContent:void 0}:{}}async function f(e,t){let{amount:r,firstOfType:n,paymentId:o,id:d,selectedBonusCode:u}=e,c=l(e);i.nk.getInstance().setAttributes({deposit_amount:r,deposit_ID:o??d}),u&&i.nk.getInstance().setAttributes({event_type:"bonus_claimed"}),n?((0,s.TT)("first_deposit",r,t,c,{transactionId:o??d}),await a.useTmaBonusStore.getState().updateCampaign()):(0,s.TT)("purchase",r,t,c,{transactionId:o??d})}}}]);

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.