1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[324],{46332:function(e,a,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/gacha",function(){return t(73114)}])},73114:function(e,a,t){"use strict";t.r(a),t.d(a,{default:function(){return g}});var s=t(85893),l=t(12744),i=t(67294),n=t(58560),c=t(8336),r=t(72),o=t(12307),x=t(26923),d=t(6582),h=t(11865),u=t(76424);var m=t(87960);function g(){const e=(0,x.j)(),{ctxContract:a}=(0,r.tN)(),[t,g]=function(){const e=(0,x.j)(),{ctxContract:a,alert:t,address:s,loadAnitoList:l,calculateGas:i}=(0,r.tN)(),n=(0,o.yy)(!0);return[{PRICE:333,TOTAL_BOXES:1e3,isLoading:n},{onLoad:async()=>{if(a){n.set(!0);try{const t=await a.gacha.totalPurchased(),s=await a.gacha.gachaPrice(),l=await a.gacha.commonGachaRemaining(),i=await a.gacha.epicGachaRemaining(),c=await a.gacha.legendaryGachaRemaining(),r=(await a.gacha.isLakanBakodTaken(),await a.gacha.isLakanDanumTaken()),o=await a.gacha.isTagumBanuaTaken();e.gacha.set((e=>({...e,totalPurchased:Number(t),priceWei:Number(s),isSoldOut:1e3===Number(t),commonRemaining:Number(l),epicRemaining:Number(i),legendaryRemaining:Number(c),isLakanBakodTaken:0,isLakanDanumTaken:r?0:1,isTagumBanuaTaken:o?0:1})))}catch(t){console.error(t)}finally{n.set(!1)}}},onMint:async n=>{if(a)try{if(e.gacha.loading.set(!0),!e.verify.value)return void t.error("Connect your wallet!",{title:"Oops!"});if(e.balance.bnb.readable.value<d.ZP.minGas)return void t.error("You need atleast ".concat(d.ZP.minGas," MATIC balance for the gas fee."),{title:"Insufficient Gas Fee"});if(!(e.balance.laro.readable.value>=333))return void t.error("You have insufficient $LARO in your wallet.",{title:"Insufficient Funds"});const c=await h.ZP.post(h.CV,{quantity:n,voucher_code:""}).then((e=>e.data.data)),r=await i(),o=await a.laro.allowance(s,e.contracts.gacha.address.value);if(e.gacha.priceWei.value>Number(o)){const t=await a.laro.approve(e.contracts.gacha.address.value,u.n1,{...r});await t.wait()}const x=await a.gacha.buyGacha("".concat(c.quantity),"".concat(c.voucherCode),"".concat(c.voucherRate),"".concat(c.voucherType),"".concat(c.maxVoucherCodeUse),"".concat(c.maxVoucherQuantityMode),"".concat(c.partnerAddress),"".concat(c.nonce),"".concat(c.signature));await x.wait();const m=t.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:6e4});setTimeout((async function(){await Promise.all([l()]),e.ui.gachaPopup.set(!1),t.remove(m),t.success("You have successfully purchased a Series 2 Gacha box!",{title:"Purchase Successful!"})}),6e4)}catch(x){var c,r,o;const e=(null===(o=x)||void 0===o||null===(r=o.response)||void 0===r||null===(c=r.data)||void 0===c?void 0:c.message)||x.reason||"Something went wrong! Please try again!";console.error(JSON.stringify(x)),t.error("transaction failed"===e?"Something went wrong! Try increasing your gas fee and try again!":e,{title:"Oops!"})}finally{e.gacha.loading.set(!1)}}}]}(),[f,p]=(0,i.useState)(!1);return(0,i.useEffect)((()=>{g.onLoad()}),[a]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.Z,{name:"Alan Gacha"}),(0,s.jsx)(n.Z,{content:"gacha-buy",active:f,setActive:p,gachaFn:g}),(0,s.jsx)("section",{id:"gacha-main",className:"bg-gacha bg-cover bg-center bg-no-repeat",children:(0,s.jsxs)("div",{className:"relative mx-0 pb-[300px] desktop:pb-0 desktop:h-[640px] desktop:ml-5",children:[(0,s.jsx)("h1",{className:"font-bold text-2xl text-center text-darkest",children:"Gacha boxes"}),(0,s.jsx)("div",{className:" absolute bg-gacha-character bg-[length:auto_300px] bg-center bg-no-repeat h-[300px] w-full top-auto bottom-0 desktop:bg-auto desktop:left-[calc(50%-250px)] desktop:h-[600px] desktop:max-w-[calc(50%+250px)] desktop:bg-left "}),(0,s.jsxs)("div",{className:" text-darkest mx-auto w-full py-2 flex flex-col justify-start gap-3 desktop:h-[600px] desktop:absolute desktop:w-[640px] desktop:justify-start desktop:pt-16 desktop:top-0 desktop:right-1/2 desktop:max-w-[500px] ",children:[(0,s.jsx)("div",{children:(0,s.jsx)("h2",{className:"font-anito text-3xl tracking-wider text-center text-berry",children:"Series 2"})}),(0,s.jsxs)("div",{className:" flex flex-col items-center gap-5 px-5 desktop:px-0 tablet:flex-row ",children:[(0,s.jsx)("img",{className:"mx-auto
1shrink w-full max-w-[310px] tablet:w-1/2",src:"/images/gacha/series-2-box.png",alt:"Series 2 box"}),(0,s.jsxs)("ul",{className:"flex flex-col gap-3 leading-tight list-disc px-5 tablet:px-0 tablet:w-1/2",children:[(0,s.jsxs)("li",{children:["Guaranteed ",(0,s.jsx)("span",{className:"font-bold text-medium-violet",children:"Genesis Anitos"})]}),(0,s.jsxs)("li",{children:["Chance to reveal unique ",(0,s.jsx)("span",{className:"font-bold text-medium-violet",children:"Ancient Anitos"})]}),(0,s.jsxs)("li",{children:["Can be used to ",(0,s.jsx)("span",{className:"font-bold text-medium-violet",children:"summon Anitos"})]}),(0,s.jsxs)("li",{children:["Alan class can only be summoned ",(0,s.jsx)("span",{className:"font-bold text-medium-violet",children:"once sold out"})]}),(0,s.jsxs)("li",{children:["Alan ability: ",(0,s.jsx)("span",{className:"font-bold text-medium-violet",children:"25% Evasion"})]})]})]}),(0,s.jsxs)("div",{className:"text-center flex flex-col gap-1 pt-5 px-5 tablet:pt-0",children:[e.gacha.isSoldOut.value&&(0,s.jsxs)("div",{className:" self-center px-8 py-2 text-2xl text-lightest-gray tracking-wider uppercase font-bold rounded-lg bg-lighter-gray select-none",children:[(0,s.jsx)("div",{children:"Sold out!"}),(0,s.jsxs)("div",{className:"flex tracking-normal justify-center items-center gap-1 text-base",children:[(0,s.jsx)("img",{className:"h-5",src:"/images/token_laro.png",alt:"LARO"}),(0,s.jsx)("span",{children:"333"})]})]}),!e.gacha.isSoldOut.value&&(0,s.jsxs)("button",{className:" self-center px-8 py-2 text-2xl text-white tracking-wider uppercase font-bold rounded-lg bg-berry hover:bg-lighter-berry w-full max-w-[360px] ",onClick:()=>p(!0),children:[(0,s.jsx)("div",{children:"Buy Series 2 box"}),(0,s.jsxs)("div",{className:"flex tracking-normal justify-center items-center gap-1 text-base",children:[(0,s.jsx)("img",{className:"h-5",src:"/images/token_laro.png",alt:"LARO"}),(0,s.jsx)("span",{children:t.PRICE})]})]})]}),(0,s.jsxs)("div",{className:"@container px-5",children:[(0,s.jsx)("div",{className:"text-center pb-1",children:(0,s.jsx)("span",{className:"text-sm italic",children:t.isLoading.value?(0,s.jsx)(m.Z,{}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"font-bold",children:t.TOTAL_BOXES-e.gacha.totalPurchased.value})," / ",(0,s.jsx)("span",{className:"font-bold",children:t.TOTAL_BOXES})," boxes remaining"]})})}),(0,s.jsxs)("div",{className:"flex justify-center max-w-[360px] mx-auto text-xs flex-col items-center gap-1 @[360px]:flex-row @[360px]:gap-0",children:[(0,s.jsx)("div",{className:"flex gap-2 justify-center w-[160px]",children:(0,s.jsxs)("div",{className:"flex flex-col gap-1 grow @[360px]:grow-0",children:[(0,s.jsxs)("div",{className:"flex items-center gap-1 justify-between",children:[(0,s.jsx)("p",{children:"Common"}),(0,s.jsxs)("div",{className:"relative px-1 w-[54px]",children:[t.isLoading.value?(0,s.jsx)(m.Z,{className:"relative z-10 text-center"}):(0,s.jsxs)("p",{className:"relative z-10 text-center",children:[e.gacha.commonRemaining.value,"/100"]}),(0,s.jsx)("div",{className:"absolute top-0 left-0 w-full h-full bg-white/50"}),(0,s.jsx)("div",{className:"absolute top-0 left-0 h-full bg-green-500",style:{width:e.gacha.commonRemaining.value/100*100+"%"}})]})]}),(0,s.jsxs)("div",{className:"flex items-center gap-1 justify-between",children:[(0,s.jsx)("p",{children:"Epic"}),(0,s.jsxs)("div",{className:"relative px-1 w-[54px]",children:[t.isLoading.value?(0,s.jsx)(m.Z,{className:"relative z-10 text-center"}):(0,s.jsxs)("p",{className:"relative z-10 text-center",children:[e.gacha.epicRemaining.value,"/200"]}),(0,s.jsx)("div",{className:"absolute top-0 left-0 w-full h-full bg-white/50"}),(0,s.jsx)("div",{className:"absolute top-0 left-0 h-full bg-lighter-berry",style:{width:e.gacha.epicRemaining.value/200*100+"%"}})]})]}),(0,s.jsxs)("div",{className:"flex items-center gap-1 justify-between",children:[(0,s.jsx)("p",{children:"Legendary"}),(0,s.jsxs)("div",{className:"relative px-1 w-[54px]",children:[t.isLoading.value?(0,s.jsx)(m.Z,{className:"relative z-10 text-center"}):(0,s.jsxs)("p",{className:"relative z-10 text-center",children:[e.gacha.legendaryRemaining.value,"/697"]}),(0,s.jsx)("div",{className:"absolute top-0 left-0 w-full h-full bg-white/50"}),(0,s.jsx)("div",{className:"absolute top-0 left-0 h-full bg-gold",style:{width:e.gacha.legendaryRemaining.value/697*100+"%"}})]})]})]})}),(0,s.jsx)("div",{className:"flex gap-2 justify-center w-[160px]",children:(0,s.jsxs)("div",{className:"flex flex-col gap-1 grow @[360px]:grow-0",children:[(0,s.jsxs)("div",{className:"flex items-center gap-1 justify-between",children:[(0,s.jsx)("p",{children:"Lakan Bakod"}),(0,s.jsxs)("div",{className:"relative px-1 w-[54px]",children:[t.isLoading.value?(0,s.jsx)(m.Z,{className:"relative z-10 text-center"}):(0,s.jsxs)("p",{className:"relative z-10 text-center",children:[e.gacha.isLakanBakodTaken.value,"/1"]}),(0,s.jsx)("div",{className:"absolute top-0 left-0 w-full h-full bg-white/50"}),(0,s.jsx)("div",{className:"absolute top-0 left-0 h-full bg-lighter-blue",style:{width:e.gacha.isLakanBakodTaken.value/1*100+"%"}})]})]}),(0,s.jsxs)("div",{className:"flex items-center gap-1 justify-between",children:[(0,s.jsx)("p",{children:"Lakan Danum"}),(0,s.jsxs)("div",{className:"relative px-1 w-[54px]",children:[t.isLoading.value?(0,s.jsx)(m.Z,{className:"relative z-10 text-center"}):(0,s.jsxs)("p",{className:"relative z-10 text-center",children:[e.gacha.isLakanDanumTaken.value,"/1"]}),(0,s.jsx)("div",{className:"absolute top-0 left-0 w-full h-full bg-white/50"}),(0,s.jsx)("div",{className:"absolute top-0 left-0 h-full bg-lighter-blue",style:{width:e.gacha.isLakanDanumTaken.value/1*100+"%"}})]})]}),(0,s.jsxs)("div",{className:"flex items-center gap-1 justify-between",children:[(0,s.jsx)("p",{children:"Tagum Banua"}),(0,s.jsxs)("div",{className:"relative px-1 w-[54px]",children:[t.isLoading.value?(0,s.jsx)(m.Z,{className:"relative z-10 text-center"}):(0,s.jsxs)("p",{className:"relative z-10 text-center",children:[e.gacha.isTagumBanuaTaken.value,"/1"]}),(0,s.jsx)("div",{className:"absolute top-0 left-0 w-full h-full bg-white/50"}),(0,s.jsx)("div",{className:"absolute top-0 left-0 h-full bg-lighter-blue",style:{width:e.gacha.isTagumBanuaTaken.value/1*100+"%"}})]})]})]})})]})]})]}),(0,s.jsx)("div",{className:"absolute w-full bottom-5 flex justify-center",children:(0,s.jsxs)("div",{className:"flex bg-white/50 items-center gap-3",children:[(0,s.jsx)("span",{className:"text-neutral-gray text-sm pl-3",children:"Anito Legends is on"}),(0,s.jsx)("img",{src:"/images/polygon-badge.png",alt:"MATIC Chain"})]})})]})}),(0,s.jsxs)("section",{id:"gacha-genesis",className:"bg-medium-violet px-5 py-20",children:[(0,s.jsx)("div",{className:"",children:(0,s.jsxs)("h3",{className:"text-center font-bold text-2xl text-white",children:["Guaranteed",(0,s.jsx)("br",{}),(0,s.jsx)("span",{className:"text-4xl",children:"Genesis Anitos!"})]})}),(0,s.jsx)("div",{className:"wide:container mx-auto flex justify-center text-lightest-gray flex-col gap-0 wide:gap-20 wide:flex-row",children:(0,s.jsxs)("div",{className:"max-w-[800px] w-full mx-auto flex-1 flex items-center gap-2 flex-col",children:[(0,s.jsxs)("div",{className:"relative w-[300px] h-[300px] overflow-hidden",children:[(0,s.jsxs)("div",{className:"relative w-[1200px] h-[300px] animate-[slider-genesis_10s_linear_forwards_infinite]",children:[(0,s.jsx)("img",{className:"absolute top-0 left-0 translate-x-[0] h-full w-[300px] object-contain",src:"/video/alan_idle_1.gif",alt:""}),(0,s.jsx)("img",{className:"absolute top-0 left-0 translate-x-[100%] h-full w-[300px] object-contain",src:"/video/alan_idle_2.gif",alt:""}),(0,s.jsx)("img",{className:"absolute top-0 left-0 translate-x-[200%] h-full w-[300px] object-contain",src:"/video/alan_idle_3.gif",alt:""}),(0,s.jsx)("img",{className:"absolute top-0 left-0 translate-x-[300%] h-full w-[300px] object-contain",src:"/video/alan_idle_4.gif",alt:""}),(0,s.jsx)("img",{className:"absolute top-0 left-0 translate-x-[400%] h-full w-[300px] object-contain",src:"/video/alan_idle_1.gif",alt:""})]}),(0,s.jsx)("img",{className:"absolute top-0 left-0 h-full w-full object-contain",src:"/video/genesis.gif",alt:""})]}),(0,s.jsxs)("div",{className:"w-full flex flex-col gap-2",children:[(0,s.jsxs)("p",{className:"italic text-center",children:["Every Alan revealed from the Series 2 Gacha Box is a ",(0,s.jsx)("span",{className:"font-bold",children:"Genesis Anito!"})]}),(0,s.jsx)(l.rU,{className:" mt-4 cursor-pointer self-center px-8 py-2 text-2xl text-white tracking-wider up
1percase font-bold rounded-lg bg-berry hover:bg-lighter-berry ",to:"gacha-main",smooth:!0,offset:-70,duration:500,children:(0,s.jsx)("div",{children:"Buy Series 2 box"})})]})]})})]}),(0,s.jsxs)("section",{id:"gacha-ancients",className:"bg-dark-violet px-5 py-20",children:[(0,s.jsx)("div",{children:(0,s.jsxs)("h3",{className:"text-center font-bold text-2xl text-white",children:["Get a chance to reveal one of three unique",(0,s.jsx)("br",{}),(0,s.jsx)("span",{className:"text-4xl",children:"Ancient Anitos!"})]})}),(0,s.jsxs)("div",{className:"wide:container mx-auto flex justify-center text-lightest-gray flex-col gap-0 wide:gap-20 wide:flex-row",children:[(0,s.jsxs)("div",{className:"max-w-[800px] mx-auto flex-1 flex items-center gap-2 flex-col tablet:flex-row wide:flex-col",children:[(0,s.jsx)("div",{className:"relative h-[300px] w-full",children:(0,s.jsx)("img",{className:"absolute top-0 left-0 h-full w-full object-contain",src:e.gacha.isLakanBakodTaken.value?"/video/ancient_duende_idle.gif":"/video/ancient_duende_taken.png",alt:"Lakan Bakod"})}),(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsx)("h4",{className:"text-white text-xl font-bold wide:text-center",children:"Lakan Bakod"}),(0,s.jsx)("p",{className:"italic",children:"After being rescued from the clutches of the Lagim by a dedicated group of Anito warriors, the guardian of the harvest is back to once again defend Lupa."})]})]}),(0,s.jsxs)("div",{className:"max-w-[800px] mx-auto flex-1 flex items-center gap-2 flex-col tablet:flex-row wide:flex-col",children:[(0,s.jsx)("div",{className:"relative h-[300px] w-full",children:(0,s.jsx)("img",{className:"absolute top-0 left-0 h-full w-full object-contain",src:e.gacha.isLakanDanumTaken.value?"/video/ancient_tiyanak_idle.gif":"/video/ancient_tiyanak_taken.png",alt:"Lakan Danum"})}),(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsx)("h4",{className:"text-white text-xl font-bold wide:text-center",children:"Lakan Danum"}),(0,s.jsx)("p",{className:"italic",children:"The ancient guardian of the seas has risen from a long exile underwater to seek out their fellow Tiyanaks who have been disappearing -- a phenomenon that began when the Rite of Ipa Tawag was rediscovered."})]})]}),(0,s.jsxs)("div",{className:"max-w-[800px] mx-auto flex-1 flex items-center gap-2 flex-col tablet:flex-row wide:flex-col",children:[(0,s.jsx)("div",{className:"relative h-[300px] w-full",children:(0,s.jsx)("img",{className:"absolute top-0 left-0 h-full w-full object-contain",src:e.gacha.isTagumBanuaTaken.value?"/video/ancient_alan_idle.gif":"/video/ancient_alan_taken.png",alt:"Tagum Banua"})}),(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsx)("h4",{className:"text-white text-xl font-bold wide:text-center",children:"Tagum Banua"}),(0,s.jsx)("p",{className:"italic",children:"As a deity of the harvest, Tagum Banua used to work hand in hand with Lakan Bakod to protect fields and crops from predators. Elated at Lakan Bakod's rescue, this ancient Anito now alights to join the battle."})]})]})]}),(0,s.jsx)("div",{className:"flex justify-center pt-10",children:(0,s.jsx)(l.rU,{className:" mt-4 cursor-pointer self-center px-8 py-2 text-2xl text-white tracking-wider uppercase font-bold rounded-lg bg-berry hover:bg-lighter-berry ",to:"gacha-main",smooth:!0,offset:-70,duration:500,children:(0,s.jsx)("div",{children:"Buy Series 2 box"})})})]}),(0,s.jsxs)("section",{id:"gacha-dodge",className:"bg-medium-violet px-5 py-20",children:[(0,s.jsx)("div",{children:(0,s.jsxs)("h3",{className:"text-center font-bold text-2xl text-white",children:["Alan ability",(0,s.jsx)("br",{}),(0,s.jsx)("span",{className:"text-4xl",children:"Elusive: 25% Evasion"})]})}),(0,s.jsx)("div",{className:"wide:container mx-auto flex justify-center text-lightest-gray flex-col gap-0 wide:gap-20 wide:flex-row",children:(0,s.jsxs)("div",{className:"max-w-[800px] mx-auto flex-1 flex items-center gap-2 flex-col",children:[(0,s.jsx)("div",{className:"relative max-h-[500px] h-[300px] tablet:h-[500px] w-full",children:(0,s.jsx)("img",{className:"absolute top-0 left-0 h-full w-full object-contain",src:"/video/alan_dodge.gif",alt:"Dodge"})}),(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsx)("p",{className:"text-center italic",children:"The Alans' physiology and natural agility make them harder to hit than the other Anito classes."}),(0,s.jsx)(l.rU,{className:" mt-4 cursor-pointer self-center px-8 py-2 text-2xl text-white tracking-wider up
1percase font-bold rounded-lg bg-berry hover:bg-lighter-berry ",to:"gacha-main",smooth:!0,offset:-70,duration:500,children:(0,s.jsx)("div",{children:"Buy Series 2 box"})})]})]})})]})]})}},9008:function(e,a,t){e.exports=t(73902)}},function(e){e.O(0,[261,445,774,888,179],(function(){return a=46332,e(e.s=a);var a}));var a=e.O();_N_E=a}]);
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.