PageSourceSearch

https://anitolegends.com/_next/static/chunks/962-92ff586286a77676.js

js anitolegends.com collected 2026-10-06 15:14:15 UTC 9,927 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[962],{26962:function(e,a,n){n.d(a,{J:function(){return m}});var t=n(67294),o=n(11865),r=n(26923),c=n(72),s=n(76424),i=n(44475),u=n(61580),l=n(6582);function m(){const e=(0,r.j)(),{alert:a,address:n,ctxContract:m,loadPlayfabInfo:b,getBalances:d,loadReduceTimerStatus:f,calculateGas:v}=(0,c.tN)(),[h,p]=(0,t.useState)(!1),[w,_]=(0,t.useState)(null),[N,y]=(0,t.useState)(null),[g,P]=(0,t.useState)(!1),[A,I]=(0,t.useState)(null),[C,S]=(0,t.useState)([]);return[{loading:h,consumableAllList:w,consumableInfo:N,showPopup:g,antingInfo:A,timerList:C},{fetchConsumableMarketList:async()=>{if(!m)return;p(!0);const a=[];u.H0.forEach(((n,t)=>{e.filter.consumable["c".concat(t)].value&&a.push(t)})),await o.ZP.get(o.mH,{params:{consumable_category_ids:a,busd:e.filter.currency.busd.value?1:0,laro:e.filter.currency.laro.value?1:0,ginto:e.filter.currency.ginto.value?1:0,blackpearl:e.filter.currency.bp.value?1:0}}).then((async e=>{const a=e.data.data;let n={};u.H0.forEach((e=>{n={...n,[e.replaceAll(" ","").toLowerCase()]:[]}}));for(const t of a)u.H0.length<t.consumable_category_id||n["".concat(u.H0[t.consumable_category_id].replaceAll(" ","").toLowerCase())].push(t);_(n)})),p(!1)},fetchAntingInfo:async()=>{m&&await o.ZP.get(o.mH).then((async e=>{var a,n,t;const o=null===(t=e)||void 0===t||null===(n=t.data)||void 0===n||null===(a=n.data)||void 0===a?void 0:a.find((e=>"02-vc-cashout"==e.consumable_id));I(o)}))},setConsumableInfo:y,setShowPopup:P,purchaseConsumable:async(t,r)=>{if(!t)return;if(!m)return;if(!n)return a.removeAll(),void a.error("Please login wallet first before purchasing.",{title:"Purchase Denied"});let c=a.info("Wallet is busy. Please do not close this window or refresh\n      the browser tab. Please wait until purchase is complete.",{title:"Ongoing Purchase",timeout:3e5});try{if(6==t.consumable_price_type){if(!(e.balance.blackpearl.readable.value>=Number(t.consumable_blackpearl_price)*Number(r)))return a.remove(c),a.removeAll(),void a.error("You have insufficient BLACK PEARLS in your wallet.",{title:"Insufficient Funds"})}const u=await o.ZP.post(o.mN,{id:t.id,quantity:r}).then((e=>e.data.data)).catch((e=>{var n,t,o,r,c,s;console.error(null===(o=e)||void 0===o||null===(t=o.response)||void 0===t||null===(n=t.data)||void 0===n?void 0:n.message),a.removeAll(),a.error("".concat((null===(s=e)||void 0===s||null===(c=s.response)||void 0===c||null===(r=c.data)||void 0===r?void 0:r.message)||e.message),{title:"Oops"})}));if(6==t.consumable_price_type)return;if(Number(e.balance.bnb.readable.value)<l.ZP.minGas)return a.remove(c),void a.error("You need atleast ".concat(l.ZP.minGas," MATIC balance for the gas fee."),{title:"Insufficient Gas Fee"});if([0,3,5].includes(Number(t.consumable_price_type))){if(!(e.balance.laro.readable.value>=Number(t.consumable_laro_price)*Number(r)))return a.remove(c),void a.error("You have insufficient $LARO in your wallet.",{title:"Insufficient Funds"})}if([0,1,4].includes(Number(t.consumable_price_type))){if(!(e.balance.ginto.readable.value>=Number(t.consumable_ginto_price)*Number(r)))return a.remove(c),void a.error("You have insufficient $GINTO in your wallet.",{title:"Insufficient Funds"})}if([1,2,3].includes(Number(t.consumable_price_type))){if(!(e.balance.busd.readable.value>=Number(t.consumable_busd_price)*Number(r)))return a.remove(c),void a.error("You have insufficient $BUSD in your wallet.",{title:"Insufficient Funds"})}const f=await v();if([0,3,5].includes(Number(t.consumable_price_type))){const a=await m.laro.allowance(n,e.contracts.consumable.value.address);if(Number(u.laro_amount)>=Number(a)){const a=await(0,i.$q)({...e.contracts.laro.value,functionName:"approve",args:["".concat(e.contracts.consumable.value.address),"".concat(s.n1),{...f}]}),n=await(0,i.n9)(a);await(0,i.Mn)({hash:n.hash})}}if([0,1,4].includes(Number(t.consumable_price_type))){const a=await m.ginto.allowance(n,e.contracts.consumable.value.address);if(Number(u.ginto_amount)>=Number(a)){const a=await(0,i.$q)({...e.contracts.ginto.value,functionName:"approve",args:["".concat(e.contracts.consumable.value.address),"".concat(s.n1),{...f}]}),n=await(0,i.n9)(a);await(0,i.Mn)({hash:n.hash})}}if([1,2,3].includes(Number(t.consumable_price_type))){const a=await m.busd.allowance(n,e.contracts.consumable.value.address);if(Number(u.busd_amount)>=Number(a)){const a=await(0,i.$q)({...e.contracts.busd.value,functionName:"approve",args:["".concat(e.contracts.consumable.value.address),"".concat(s.n1),{...f}]}),n=await(0,i.n9)(a);await(0,i.Mn)({hash:n.hash})}}const h=await(0,i.$q)({...e.contracts.consumable.value,functionName:"buyConsumable",args:["".concat(u.consumable_id),"".concat(r),"".concat(u.busd_amount),"".concat(u.laro_amount),"".concat(u.ginto_amount),"".concat(u.nonce),"".concat(u.signature),{...f}]}),p=(await(0,s.w0)("consumable"),await(0,i.n9)(h)),w=await(0,i.Mn)({hash:p.hash});await(0,s.uP)(w.blockNumber,"consumable");a.remove(c),a.info("Wallet is busy. Please do not close this window or refresh\n        the browser tab. Your item should reflect within a minute",{title:"Verifying Transaction...",timeout:3e5}),setTimeout((async function(){await b(),await d(),a.removeAll(),a.success("You have successfully purchased ".concat(r," ").concat(t.consumable_name,"!"),{title:"Purchase Successful!"})}),6e4)}catch(p){var u,f,h;a.remove(c),a.error("Transaction failed: ".concat((null===(h=p)||void 0===h||null===(f=h.error)||void 0===f||null===(u=f.data)||void 0===u?void 0:u.message)||p.message),{title:"Purchase failed"})}},fetchTimersList:async()=>{m&&(p(!0),await o.ZP.get(o.tt).then((async e=>{var a;const n=(null===(a=e.data)||void 0===a?void 0:a.data).sort(((e,a)=>Number(e.consumable_id)-Number(a.consumable_id)));S(n)})),p(!1))},purchaseReduceTimer:async(t,r,c,u,h)=>
1{if(!t)return;if(!m)return;if(!n)return a.removeAll(),void a.error("Please login wallet first before purchasing.",{title:"Purchase Denied"});let p=a.info("Wallet is busy. Please do not close this window or refresh\n      the browser tab. Please wait until purchase is complete.",{title:"Ongoing Purchase",timeout:3e5});try{if(6==t.consumable_price_type){if(!(e.balance.blackpearl.readable.value>=Number(t.consumable_blackpearl_price)*Number(r)))return a.remove(p),a.removeAll(),void a.error("You have insufficient BLACK PEARLS in your wallet.",{title:"Insufficient Funds"})}const w=await o.ZP.post(o.mN,{id:t.id,quantity:r,token_id:c,asset_id:u}).then((e=>e.data.data)).catch((e=>{var n,t,o,r,c,s;console.error(null===(o=e)||void 0===o||null===(t=o.response)||void 0===t||null===(n=t.data)||void 0===n?void 0:n.message),a.removeAll(),a.error("".concat((null===(s=e)||void 0===s||null===(c=s.response)||void 0===c||null===(r=c.data)||void 0===r?void 0:r.message)||e.message),{title:"Oops"})}));if(!w)return;if(6==t.consumable_price_type)return;if(Number(e.balance.bnb.readable.value)<l.ZP.minGas)return a.remove(p),void a.error("You need atleast ".concat(l.ZP.minGas," MATIC balance for the gas fee."),{title:"Insufficient Gas Fee"});if([0,3,5].includes(Number(t.consumable_price_type))){if(!(e.balance.laro.readable.value>=Number(t.consumable_laro_price)*Number(r)))return a.remove(p),void a.error("You have insufficient $LARO in your wallet.",{title:"Insufficient Funds"})}if([0,1,4].includes(Number(t.consumable_price_type))){if(!(e.balance.ginto.readable.value>=Number(t.consumable_ginto_price)*Number(r)))return a.remove(p),void a.error("You have insufficient $GINTO in your wallet.",{title:"Insufficient Funds"})}if([1,2,3].includes(Number(t.consumable_price_type))){if(!(e.balance.busd.readable.value>=Number(t.consumable_busd_price)*Number(r)))return a.remove(p),void a.error("You have insufficient $BUSD in your wallet.",{title:"Insufficient Funds"})}const _=await v();if([0,3,5].includes(Number(t.consumable_price_type))){const a=await m.laro.allowance(n,e.contracts.consumable.value.address);if(Number(w.laro_amount)>=Number(a)){const a=await(0,i.$q)({...e.contracts.laro.value,functionName:"approve",args:["".concat(e.contracts.consumable.value.address),"".concat(s.n1),{..._}]}),n=await(0,i.n9)(a);await(0,i.Mn)({hash:n.hash})}}if([0,1,4].includes(Number(t.consumable_price_type))){const a=await m.ginto.allowance(n,e.contracts.consumable.value.address);if(Number(w.ginto_amount)>=Number(a)){const a=await(0,i.$q)({...e.contracts.ginto.value,functionName:"approve",args:["".concat(e.contracts.consumable.value.address),"".concat(s.n1),{..._}]}),n=await(0,i.n9)(a);await(0,i.Mn)({hash:n.hash})}}if([1,2,3].includes(Number(t.consumable_price_type))){const a=await m.busd.allowance(n,e.contracts.consumable.value.address);if(Number(w.busd_amount)>=Number(a)){const a=await(0,i.$q)({...e.contracts.busd.value,functionName:"approve",args:["".concat(e.contracts.consumable.value.address),"".concat(s.n1),{..._}]}),n=await(0,i.n9)(a);await(0,i.Mn)({hash:n.hash})}}const N=await(0,i.$q)({...e.contracts.consumable.value,functionName:"buyConsumable",args:["".concat(w.consumable_id),"".concat(w.quantity),"".concat(w.busd_amount),"".concat(w.laro_amount),"".concat(w.ginto_amount),"".concat(w.nonce),"".concat(w.signature),{..._}]}),y=(await(0,s.w0)("consumable"),await(0,i.n9)(N)),g=await(0,i.Mn)({hash:y.hash});await(0,s.uP)(g.blockNumber,"consumable");a.remove(p),a.info("Wallet is busy. Please do not close this window or refresh\n        the browser tab. Your item should reflect within a minute",{title:"Verifying Transaction...",timeout:3e5}),setTimeout((async function(){await b(),await d(),h(),a.removeAll(),a.success("You have successfully purchased ".concat(t.consumable_name,"!"),{title:"Purchase Successful!"})}),6e4)}catch(g){var w,_,N,y;a.remove(p),a.error("Transaction failed: ".concat((null===(N=g)||void 0===N||null===(_=N.error)||void 0===_||null===(w=_.data)||void 0===w?void 0:w.message)||(null===(y=g)||void 0===y?void 0:y.reason)||g.message),{title:"Purchase failed"})}finally{f()}}}]}}}]);

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.