1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3318],{10973:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});var s=r(37876),n=r(89099),o=r(85825),a=r(81340);function l({tab:e}){let t=(0,n.useRouter)(),{t:r}=(0,o.Bd)(),i=[{value:"tokens",label:r("token-tabs.tokens")},{value:"amms",label:r("token-tabs.amms")},{value:"mpts",label:r("token-tabs.mpts")}];return(0,s.jsx)("div",{className:"center",children:(0,s.jsx)(a.A,{tabList:i,tab:e,setTab:e=>{t.push("/"+e)},name:"tokenTabs"})})}},25870:(e,t,r)=>{"use strict";r.r(t),r.d(t,{__N_SSP:()=>R,default:()=>Y});var s=r(37876),n=r(85825),o=r(14232),a=r(87320),l=r(78028),i=r(48230),c=r.n(i),d=r(15041),u=r(77281),h=r(51086),m=r(90035),p=r(93906),g=r(18847),f=r.n(g),x=r(43366),b=r(55453),y=r(76515),v=r(6446);let j=f()(()=>Promise.all([r.e(7144),r.e(8971)]).then(r.bind(r,21352)),{loadableGenerated:{webpack:()=>[21352]},ssr:!1}),w=e=>{let t=Number(e);return Number.isFinite(t)?t:null},T={week:"this week",month:"last 30 days",year:"this year",all:"all time"};function k({rows:e,period:t="month",selectedPeriod:r=t,onPeriodChange:l}){var i;let c,d,{i18n:u}=(0,n.Bd)(),{theme:h}=(0,x.D)(),p=(0,a.QC)(u.language),g=(0,o.useMemo)(()=>Array.isArray(e)?e.map(e=>{let t;return{...e,timestamp:Number.isFinite(t=Number(e.time))?t<1e12?1e3*t:t:null}}).filter(e=>e.timestamp).sort((e,t)=>e.timestamp-t.timestamp):[],[e]),f=(0,o.useMemo)(()=>(0,b._w)(h),[h]),S=(0,o.useMemo)(()=>[{name:"Active pools",type:"line",data:g.map(e=>[e.timestamp,w(e.activePools)])},{name:"Created pools",type:"column",data:g.map(e=>[e.timestamp,w(e.createdPools)])}],[g]),N=(0,o.useMemo)(()=>({chart:{id:"amm-pools-chart",animations:{enabled:!1},parentHeightOffset:0,toolbar:{show:!1},foreColor:f.textColor,stacked:!1},colors:["#2f80ed","#00a676","#f2994a"],dataLabels:{enabled:!1},grid:{borderColor:f.gridColor,padding:{top:-8,right:6,bottom:4,left:0},strokeDashArray:4},legend:{position:"top",horizontalAlign:"left",fontSize:"12px",offsetY:5,labels:{colors:f.labelColor},markers:{radius:12}},plotOptions:{bar:{borderRadius:3,columnWidth:"48%"}},stroke:{curve:"smooth",width:[3,0]},tooltip:{shared:!0,intersect:!1,theme:h,custom:({series:e,dataPointIndex:t,w:r})=>{let s=r?.globals?.seriesX?.[0]?.[t],n=s?new Date(s).toLocaleDateString(p,{day:"numeric",month:"short",year:"numeric"}):"",o=S.map((s,n)=>({color:r?.globals?.colors?.[n]||s.color||"#2f80ed",label:s.name,value:e?.[n]?.[t]})).filter(e=>null!==e.value&&void 0!==e.value);return(0,v.R)({date:n,rows:o,minWidth:214,maxWidth:330,valueFormatter:e=>(0,m.FS)(e,0,0)})},x:{formatter:e=>new Date(e).toLocaleDateString(p,{day:"numeric",month:"short",year:"numeric"})},y:{formatter:e=>(0,m.FS)(e,0,0)}},xaxis:{type:"datetime",labels:{datetimeUTC:!0,style:(0,b.DA)(h,{fontSize:"11px"}),datetimeFormatter:{day:"d MMM"}},axisBorder:{color:f.gridColor},axisTicks:{color:f.gridColor}},yaxis:[{seriesName:"Active pools",labels:{style:(0,b.DA)(h,{fontSize:"11px"}),formatter:e=>(0,m.Fu)(e,0)},tickAmount:3},{seriesName:"Created pools",opposite:!0,labels:{style:(0,b.DA)(h,{fontSize:"11px"}),formatter:e=>(0,m.Fu)(e,0)},tickAmount:3}]}),[f,p,S,h]);if(!g.length)return null;let E=g[0],A=g[g.length-1],C=g.reduce((e,t)=>e+(w(t.createdPools)||0),0),_=(i="totalPools",c=w(A?.[i]),d=w(E?.[i]),null===c||null===d?null:c-d),L=T[t]||T.month;return(0,s.jsxs)("section",{className:"chartPanel",children:[(0,s.jsxs)("div",{className:"metricGrid",children:[l&&(0,s.jsx)(y.A,{value:r,onChange:l}),(0,s.jsxs)("div",{className:"metric",children:[(0,s.jsx)("span",{children:"Total pools"}),(0,s.jsx)("strong",{children:(0,m.Fu)(A.totalPools,0)}),(0,s.jsxs)("small",{children:[null===_?"":(_>0?"+":"")+(0,m.Fu)(_,0)," ",L]})]}),(0,s.jsxs)("div",{className:"metric",children:[(0,s.jsx)("span",{children:"New pools"}),(0,s.jsx)("strong",{children:(0,m.Fu)(C,0)}),(0,s.jsx)("small",{children:L})]})]}),(0,s.jsx)("div",{className:"chartArea",children:(0,s.jsx)("div",{className:"chartWrap",children:(0,s.jsx)(j,{type:"line",series:S,options:N,height:165})})})]})}var S=r(89099),N=r(64992),E=r(67221),A=r(99037),C=r(49249),_=r(10973),L=r(32820);let D=({amount:e,fiatRate:t,selectedCurrency:r})=>{let n=!!e?.issuer;return(0,s.jsxs)(m.AE,{address:e?.issuer,children:[n?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{suppressHydrationWarning:!0,children:(0,m.Fu)(e.value,6,2)}
1)," ",(0,s.jsx)("span",{children:(0,m.PU)(e.currency)})]}):(0,m.C$)(e,{short:!0,maxFractionDigits:6}),(0,s.jsx)("br",{}),t>0&&(0,m.Dw)({amount:e,selectedCurrency:r,fiatRate:t})]})},M=({a:e})=>(0,s.jsx)(m.TO,{options:{disableTokenLink:!0},token:{...e.lpTokenBalance,currencyDetails:{type:"lp_token",ammID:e.ammID,asset:e.amount,asset2:e.amount2,currency:(0,m.PU)(e.amount?.currency||a.Vk)+"/"+(0,m.PU)(e.amount2?.currency||a.Vk)}}}),F=e=>e?.mpt_issuance_id?{mpt_issuance_id:e.mpt_issuance_id}:e?.issuer||e?.mpt_issuance_id?{currency:e.currency,issuer:e.issuer}:{currency:a.Vk},P=e=>e.map(e=>({...e,amountFormated:(0,m.Cj)(e.amount),amount2Formated:(0,m.Cj)(e.amount2),createdAtFormated:(0,m.gt)(e.createdAt,null,{asText:!0}),updatedAtFormated:(0,m.gt)(e.updatedAt,null,{asText:!0}),tradingFeeFormated:(0,m.t$)(e.tradingFee)}));var R=!0;function Y({initialData:e,initialChartData:t,initialChartUrl:r,initialErrorMessage:i,orderQuery:g,selectedCurrency:f,sessionToken:x,subscriptionExpired:b,fiatRate:y,currencyQuery:v,currencyIssuerQuery:j,fiatRateServer:w,selectedCurrencyServer:T,setSelectedCurrency:R,openEmailLogin:B,signOutPro:O,setSignRequest:H}){let{t:I,i18n:U}=(0,n.Bd)(),W=(0,S.useRouter)(),$=w,V=T;y&&($=y,V=f);let z=(0,a.uc)(),[Q,G]=(0,o.useState)(e?.amms||[]),[q,J]=(0,o.useState)(e||{}),[X,K]=(0,o.useState)(g),[Z,ee]=(0,o.useState)(!1),[et,er]=(0,o.useState)(t||[]),es=(0,o.useRef)(t?.length?r:""),[en,eo]=(0,o.useState)(h.J3),[ea,el]=(0,o.useState)(h.J3),[ei,ec]=(0,o.useState)(I(`error.${i}`,{defaultValue:i})||""),[ed,eu]=(0,o.useState)(e?.marker),[eh,em]=(0,o.useState)({currency:(0,a.mV)(v),issuer:(0,a.mV)(j)}),ep=eh?.currency,eg=eh?.issuer,ef=(0,o.useMemo)(()=>((e,t=h.J3)=>{let r=(0,a.mV)(e?.currency),s=(0,a.mV)(e?.issuer);return r?s?`v2/amms/token/${encodeURIComponent(s)}/${encodeURIComponent(r)}/chart?${(0,h.ww)(t)}`:`v2/amms/token/${encodeURIComponent(r)}/chart?${(0,h.ww)(t)}`:""})({currency:ep,issuer:eg},en),[en,ep,eg]),ex=new AbortController;(0,o.useEffect)(()=>{e?.amms?.length>0&&G(P(e.amms))},[e]),(0,o.useEffect)(()=>()=>{ex.abort()},[]),(0,o.useEffect)(()=>{if(!ef){er([]),el((0,h.xy)(en)),es.current="";return}if(es.current===ef)return;let e=new AbortController;return l.A.get(ef,{signal:e.signal}).then(e=>{er(Array.isArray(e?.data?.chart)?e.data.chart:[]),el(en),es.current=ef}).catch(e=>{e?.message!=="canceled"&&(er([]),el(en),es.current="")}),()=>e.abort()},[en,ef]);let eb=async()=>{let e=q?.order,t=q?.currency,r=q?.currencyIssuer;if(!e||!X)return;let s=(X?e.toString()===X.toString():!e)&&(eh?.currency?t===eh.currency:!t)&&(eh?.issuer?r===eh.issuer:!r);if(s&&(!x||x&&b))return;let n="";if(s){if(!q?.marker)return;n="&marker="+q?.marker}let o="";eh?.currency?(o="¤cy="+eh.currency,eh.issuer&&(o+="¤cyIssuer="+eh.issuer)):o="&sortCurrency="+a.Vk;let i="v2/amms?order="+X+"&limit=100&voteSlots=false&auctionSlot=false&holders=true&priceNativeCurrencySpot=true"+n+o;n||ee(!0),J({});let c=await l.A.get(i,{signal:ex.signal}).catch(e=>{e&&"canceled"!==e.message&&(ec(I("error."+e.message)),ee(!1))}),d=c?.data;if(d)if(J(d),ee(!1),d.amms){let e=d.amms;if(e.length>0){ec(""),eu(d.marker);let t=P(e);s?G([...Q,...t]):G(t)}else ec(I("general.no-data"))}else"This endpoint/query is available only within bithomp pro subscription"===d.error?O():ec(I("error-api."+d.error))};(0,o.useEffect)(()=>{X&&(q.order!==X||q.currency!==eh?.currency||q.currencyIssuer!==eh?.issuer)&&eb()},[X,eh,b]);let ey=(e,t)=>{if(!H||!e?.amount||!e?.amount2)return;let r={asset1:e.amount,asset2:e.amount2,tradingFee:e.tradingFee,lpToken:e?.lpTokenBalance?.currency?{currency:e.lpTokenBalance.currency,issuer:e.lpTokenBalance.issuer||e.account,value:e.lpTokenBalance.value}:null};H({action:t,request:{TransactionType:"ammWithdraw"===t?"AMMWithdraw":"AMMDeposit",Asset:F(r.asset1),Asset2:F(r.asset2)},data:r})};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(N.A,{noindexQuery:!0,title:I("menu.amm.pools"),image:a.QG?null:{width:1200,height:630,file:"previews/1200x630/amms.png"}}),(0,s.jsxs)("div",{className:L.amms,children:[(0,s.jsx)("h1",{className:"center",children:I("menu.amm.pools")}),!a.QG&&(0,s.jsx)(_.A,{tab:"amms"}),(0,s.jsx)(A.A,{order:X,setOrder:K,orderList:[{value:"currencyHigh",label:"Currency: High to Low"},{value:"createdOld",label:"Creation: Earliest"},{value:"createdNew",label:"Creation: Latest"},{value:"updatedNew",label:"Updated: Recent"},{value:"updatedOld",label:"Updated: Old"},{value:"tradingFeeLow",label:"Trading fee: Low to High"},{value:"tradingFeeHigh",label:"Trading fee: High to Low"}],count:Q?.length,hasMore:ed,data:Q||[],csvHeaders:[{label:"Asset 1",key:"amountFormated"},{label:"Asset 1, issuer",key:"amount.issuer"},{label:"Asset 2",key:"amount2Formated"},{label:"Asset 2, issuer",key:"amount2.issuer"},{label:"Currency code",key:"lpTokenBalance.currency"},{label:"AMM address",key:"account"},{label:"AMM ID",key:"ammID"},{label:"Created",key:"createdAtFormated"},{label:"Updated",key:"updatedAtFormated"}],selectedCurrency:V,setSelectedCurrency:R,withoutLeftFilters:!0,showCsvInNav:!0,navExtra:(0,s.jsx)(p.A,{value:eh,onChange:em,allOrOne:"currencyHigh"!==X,
1currencyQueryName:"currency"}),children:(0,s.jsxs)("div",{className:"page",children:[(0,s.jsx)(k,{rows:et,period:ea,selectedPeriod:en,onPeriodChange:e=>eo((0,h.xy)(e))}),(0,s.jsx)(C.A,{dataLength:Q.length,loadMore:eb,hasMore:ed,errorMessage:ei,subscriptionExpired:b,sessionToken:x,openEmailLogin:B,children:!z||z>860?(0,s.jsxs)("table",{className:"table-large expand clickable",children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{className:"center",children:I("table.index")}),(0,s.jsx)("th",{children:"LP Token"}),(0,s.jsx)("th",{children:"Asset 1"}),(0,s.jsx)("th",{children:"Asset 2"}),(0,s.jsx)("th",{className:"right",children:"Holders"}),(0,s.jsx)("th",{className:"right",children:"Created"}),(0,s.jsx)("th",{className:"right",children:"Trading fee"}),(0,s.jsx)("th",{className:"center",children:"Actions"})]})}),(0,s.jsx)("tbody",{children:Z?(0,s.jsx)("tr",{className:"center",children:(0,s.jsxs)("td",{colSpan:"100",children:[(0,s.jsx)("br",{}),(0,s.jsx)("span",{className:"waiting"}),(0,s.jsx)("br",{}),I("general.loading"),(0,s.jsx)("br",{}),(0,s.jsx)("br",{})]})}):(0,s.jsx)(s.Fragment,{children:!ei&&Q?(0,s.jsx)(s.Fragment,{children:Q.length>0&&Q.map((e,t)=>(0,s.jsxs)("tr",{onClick:()=>W.push("/amm/"+e.ammID),children:[(0,s.jsx)("td",{className:"center",children:t+1}),(0,s.jsx)("td",{children:(0,s.jsx)(M,{a:e})}),(0,s.jsx)("td",{children:(0,s.jsx)(D,{amount:e.amount,fiatRate:$,selectedCurrency:V})}),(0,s.jsx)("td",{children:(0,s.jsx)(D,{amount:e.amount2,fiatRate:$,selectedCurrency:V})}),(0,s.jsx)("td",{className:"right",onClick:e=>e.stopPropagation(),children:(0,s.jsx)(c(),{href:"/distribution?currency="+e.lpTokenBalance.currency+"¤cyIssuer="+e.account,children:e.holders})}),(0,s.jsx)("td",{className:"right",children:(0,m.g5)(e.createdAt,U)}),(0,s.jsx)("td",{className:"right",children:(0,m.t$)(e.tradingFee)}),(0,s.jsx)("td",{className:"center",onClick:e=>e.stopPropagation(),children:(0,s.jsxs)("div",{className:"amm-row-actions",children:[(0,s.jsxs)(c(),{href:`/amm/${e.ammID}`,target:"_blank",rel:"noreferrer",className:"amm-row-action tooltip","aria-label":I("amm:actions.poolPage"),children:[(0,s.jsx)(d.EQc,{}),(0,s.jsx)("span",{className:"tooltiptext left no-brake token-action-tooltip",children:I("amm:actions.poolPage")})]}),(0,s.jsxs)("button",{type:"button",className:"amm-row-action tooltip",disabled:!H,onClick:()=>ey(e,"ammDeposit"),"aria-label":I("menu.amm.deposit"),children:[(0,s.jsx)(u.T7V,{}),(0,s.jsx)("span",{className:"tooltiptext left no-brake token-action-tooltip",children:I("menu.amm.deposit")})]}),(0,s.jsxs)("button",{type:"button",className:"amm-row-action withdraw tooltip",disabled:!H,onClick:()=>ey(e,"ammWithdraw"),"aria-label":I("menu.amm.withdraw"),children:[(0,s.jsx)(u.LWY,{}),(0,s.jsx)("span",{className:"tooltiptext left no-brake token-action-tooltip",children:I("menu.amm.withdraw")})]})]})})]},t))}):(0,s.jsx)("tr",{children:(0,s.jsx)("td",{colSpan:"100",className:"center orange bold",children:ei})})})})]}):(0,s.jsxs)("table",{className:"table-mobile",children:[(0,s.jsx)("thead",{}),(0,s.jsx)("tbody",{children:Z?(0,s.jsx)("tr",{className:"center",children:(0,s.jsxs)("td",{colSpan:"100",children:[(0,s.jsx)("br",{}),(0,s.jsx)("span",{className:"waiting"}),(0,s.jsx)("br",{}),I("general.loading"),(0,s.jsx)("br",{}),(0,s.jsx)("br",{})]})}):(0,s.jsx)(s.Fragment,{children:ei?(0,s.jsx)("tr",{children:(0,s.jsx)("td",{colSpan:"100",className:"center orange bold",children:ei})}):Q?.map((e,t)=>(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{style:{padding:"5px"},className:"center",children:(0,s.jsx)("b",{children:t+1})}),(0,s.jsxs)("td",{children:[(0,s.jsx)("br",{}),(0,s.jsx)(M,{a:e}),(0,s.jsxs)("p",{children:["AMM ID: ",(0,s.jsx)(E.cW,{ammId:e.ammID,hash:12})]}),(0,s.jsxs)("p",{children:["Holders:"," ",(0,s.jsx)(c(),{href:"/distribution?currency="+e.lpTokenBalance.currency+"¤cyIssuer="+e.account,children:e.holders})]}),"Assets:",(0,s.jsx)("div",{style:{height:10}}),(0,s.jsxs)("table",{children:[(0,s.jsx)("thead",{}),(0,s.jsx)("tbody",{children:(0,s.jsxs)("tr",{className:"no-border",children:[(0,s.jsx)("td",{children:(0,s.jsx)(D,{amount:e.amount,fiatRate:$,selectedCurrency:V})}),(0,s.jsx)("td",{style:{paddingLeft:10},children:(0,s.jsx)(D,{amount:e.amount2,fiatRate:$,selectedCurrency:V})})]})})]}),(0,s.jsxs)("p",{children:["Trading fee: ",(0,m.t$)(e.tradingFee)]}),(0,s.jsxs)("p",{children:["Created: ",(0,m.g5)(e.createdAt,U)]}),(0,s.jsx)("button",{type:"button",className:"button-action thin narrow",disabled:!H,onClick:()=>ey(e,"ammDeposit"),children:I("menu.amm.deposit")})," ",(0,s.jsx)("button",{type:"button",className:"button-action thin narrow",disabled:!H,onClick:()=>ey(e,"ammWithdraw"),children:I("menu.amm.withdraw")})," ",(0,s.jsx)("button",{className:"button-action thin narrow",onClick:()=>W.push("/amm/"+e.ammID),children:"AMM Page"}),(0,s.jsx)("br",{}),(0,s.jsx)("br",{})]})]},t))})})]})})]})})]})]})}},32820:e=>{e.exports={amms:"amms_amms__o0Sku"}},49249:(e,t,r)=>{"use strict";r.d(t,{A:()=>c});var s=r(37876),n=r(14232),o=r(85825),a=r(48230),l=r.n(a),i=r(65422);function c({dataLength:e,loadMore:t,hasMore:r,errorMessage:a,errorInContent:d=!1,subscriptionExpired:u,sessionToken:h,noSessionTokenMessage:m,height:p,endMessage:g,loadMoreMessage:f,children:x,openEmailLogin:b}){let{t:y}
1=(0,o.Bd)(),[v,j]=(0,n.useState)(!1),w=(0,n.useRef)(t),T=(0,n.useRef)(!1),k=!!r,S=k&&"first"!==r&&(!h||u),N=k&&!S,E=!a&&v&&S&&(0,s.jsx)("p",{className:"center",children:h?(0,s.jsxs)(o.x6,{i18nKey:"general.renew-bithomp-pro",children:["Your Bithomp Pro subscription has expired.",(0,s.jsx)(l(),{href:"/admin#bithomp-pro-subscription",children:"Renew your subscription"}),"."]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(o.x6,{i18nKey:"general.login-to-bithomp-pro",children:["Loading more data is available to"," ",(0,s.jsx)("span",{className:"link",onClick:()=>b?.(),children:"logged-in"})," ","Bithomp Pro subscribers."]}),m&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("br",{}),m]})]})});return(0,n.useEffect)(()=>{j(!0)},[]),(0,n.useEffect)(()=>{w.current=t},[t]),(0,n.useEffect)(()=>{v&&T.current&&N&&w.current?.(),T.current=S},[N,S,v]),(0,s.jsx)(i.A,{dataLength:e,next:t,hasMore:N,height:p,loader:!a&&v&&N&&(0,s.jsx)("p",{className:"center",children:f||y("general.loading")}),endMessage:a&&d?null:E||(0,s.jsx)("p",{className:"center",children:a||g||"End of list."}),children:x})}},65422:(e,t,r)=>{"use strict";r.d(t,{A:()=>d});var s=r(14232),n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},o=function(){return(o=Object.assign||function(e){for(var t,r=1,s=arguments.length;r<s;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}).apply(this,arguments)},a="Pixel",l="Percent",i={unit:l,value:.8};function c(e){return"number"==typeof e?{unit:l,value:100*e}:"string"==typeof e?e.match(/^(\d*(\.\d+)?)px$/)?{unit:a,value:parseFloat(e)}:e.match(/^(\d*(\.\d+)?)%$/)?{unit:l,value:parseFloat(e)}:(console.warn('scrollThreshold format is invalid. Valid formats: "120px", "50%"...'),i):(console.warn("scrollThreshold should be string or number"),i)}let d=function(e){function t(){this.constructor=r}function r(t){var r=e.call(this,t)||this;return r.lastScrollTop=0,r.actionTriggered=!1,r.startY=0,r.currentY=0,r.dragging=!1,r.maxPullDownDistance=0,r.getScrollableTarget=function(){return r.props.scrollableTarget instanceof HTMLElement?r.props.scrollableTarget:"string"==typeof r.props.scrollableTarget?document.getElementById(r.props.scrollableTarget):(null===r.props.scrollableTarget&&console.warn("You are trying to pass scrollableTarget but it is null. This might\n happen because the element may not have been added to DOM yet.\n See https://github.com/ankeetmaini/react-infinite-scroll-component/issues/59 for more info.\n "),null)},r.onStart=function(e){!r.lastScrollTop&&(r.dragging=!0,e instanceof MouseEvent?r.startY=e.pageY:e instanceof TouchEvent&&(r.startY=e.touches[0].pageY),r.currentY=r.startY,r._infScroll&&(r._infScroll.style.willChange="transform",r._infScroll.style.transition="transform 0.2s cubic-bezier(0,0,0.31,1)"))},r.onMove=function(e){!r.dragging||(e instanceof MouseEvent?r.currentY=e.pageY:e instanceof TouchEvent&&(r.currentY=e.touches[0].pageY),r.currentY<r.startY||(r.currentY-r.startY>=Number(r.props.pullDownToRefreshThreshold)&&r.setState({pullToRefreshThresholdBreached:!0}),!(r.currentY-r.startY>1.5*r.maxPullDownDistance)&&r._infScroll&&(r._infScroll.style.overflow="visible",r._infScroll.style.transform="translate3d(0px, "+(r.currentY-r.startY)+"px, 0px)")))},r.onEnd=function(){r.startY=0,r.currentY=0,r.dragging=!1,r.state.pullToRefreshThresholdBreached&&(r.props.refreshFunction&&r.props.refreshFunction(),r.setState({pullToRefreshThresholdBreached:!1})),requestAnimationFrame(function(){r._infScroll&&(r._infScroll.style.overflow="auto",r._infScroll.style.transform="none",r._infScroll.style.willChange="unset")})},r.onScrollListener=function(e){"function"==typeof r.props.onScroll&&setTimeout(function(){return r.props.onScroll&&r.props.onScroll(e)},0);var t=r.props.height||r._scrollableNode?e.target:document.documentElement.scrollTop?document.documentElement:document.body;r.actionTriggered||((r.props.inverse?r.isElementAtTop(t,r.props.scrollThreshold):r.isElementAtBottom(t,r.props.scrollThreshold))&&r.props.hasMore&&(r.actionTriggered=!0,r.setState({showLoader:!0}),r.props.next&&r.props.next()),r.lastScrollTop=t.scrollTop)},r.state={showLoader:!1,pullToRefreshThresholdBreached:!1,prevDataLength:t.dataLength},r.throttledOnScrollListener=(function(e,t,r){var s,n=!1,o=0;function a(){s&&clearTimeout(s)}function l(){var l=this,i=Date.now()-o,c=arguments;function d(){o=Date.now(),t.apply(l,c)}n||(r&&!s&&d(),a(),void 0===r&&i>150?d():!0!==e&&(s=setTimeout(r?function(){s=void 0}:d,void 0===r?150-i:150)))}return"boolean"!=typeof e&&(r=t,t=e,e=void 0),l.cancel=function(){a(),n=!0},l})(r.onScrollListener).bind(r),r.onStart=r.onStart.bind(r),r.onMove=r.onMove.bind(r),r.onEnd=r.onEnd.bind(r),r}return n(r,e),r.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t),r.prototype.componentDidMount=function(){if(void 0===this.props.dataLength)throw Error('mandatory prop "dataLength" is missing. The prop is needed when loading more content. Check README.md for usage');
1if(this._scrollableNode=this.getScrollableTarget(),this.el=this.props.height?this._infScroll:this._scrollableNode||window,this.el&&this.el.addEventListener("scroll",this.throttledOnScrollListener),"number"==typeof this.props.initialScrollY&&this.el&&this.el instanceof HTMLElement&&this.el.scrollHeight>this.props.initialScrollY&&this.el.scrollTo(0,this.props.initialScrollY),this.props.pullDownToRefresh&&this.el&&(this.el.addEventListener("touchstart",this.onStart),this.el.addEventListener("touchmove",this.onMove),this.el.addEventListener("touchend",this.onEnd),this.el.addEventListener("mousedown",this.onStart),this.el.addEventListener("mousemove",this.onMove),this.el.addEventListener("mouseup",this.onEnd),this.maxPullDownDistance=this._pullDown&&this._pullDown.firstChild&&this._pullDown.firstChild.getBoundingClientRect().height||0,this.forceUpdate(),"function"!=typeof this.props.refreshFunction))throw Error('Mandatory prop "refreshFunction" missing.\n Pull Down To Refresh functionality will not work\n as expected. Check README.md for usage\'')},r.prototype.componentWillUnmount=function(){this.el&&(this.el.removeEventListener("scroll",this.throttledOnScrollListener),this.props.pullDownToRefresh&&(this.el.removeEventListener("touchstart",this.onStart),this.el.removeEventListener("touchmove",this.onMove),this.el.removeEventListener("touchend",this.onEnd),this.el.removeEventListener("mousedown",this.onStart),this.el.removeEventListener("mousemove",this.onMove),this.el.removeEventListener("mouseup",this.onEnd)))},r.prototype.componentDidUpdate=function(e){this.props.dataLength!==e.dataLength&&(this.actionTriggered=!1,this.setState({showLoader:!1}))},r.getDerivedStateFromProps=function(e,t){return e.dataLength!==t.prevDataLength?o(o({},t),{prevDataLength:e.dataLength}):null},r.prototype.isElementAtTop=function(e,t){void 0===t&&(t=.8);var r=e===document.body||e===document.documentElement?window.screen.availHeight:e.clientHeight,s=c(t);return s.unit===a?e.scrollTop<=s.value+r-e.scrollHeight+1:e.scrollTop<=s.value/100+r-e.scrollHeight+1},r.prototype.isElementAtBottom=function(e,t){void 0===t&&(t=.8);var r=e===document.body||e===document.documentElement?window.screen.availHeight:e.clientHeight,s=c(t);return s.unit===a?e.scrollTop+r>=e.scrollHeight-s.value:e.scrollTop+r>=s.value/100*e.scrollHeight},r.prototype.render=function(){var e=this,t=o({height:this.props.height||"auto",overflow:"auto",WebkitOverflowScrolling:"touch"},this.props.style),r=this.props.hasChildren||!!(this.props.children&&this.props.children instanceof Array&&this.props.children.length),n=this.props.pullDownToRefresh&&this.props.height?{overflow:"auto"}:{};return s.createElement("div",{style:n,className:"infinite-scroll-component__outerdiv"},s.createElement("div",{className:"infinite-scroll-component "+(this.props.className||""),ref:function(t){return e._infScroll=t},style:t},this.props.pullDownToRefresh&&s.createElement("div",{style:{position:"relative"},ref:function(t){return e._pullDown=t}},s.createElement("div",{style:{position:"absolute",left:0,right:0,top:-1*this.maxPullDownDistance}},this.state.pullToRefreshThresholdBreached?this.props.releaseToRefreshContent:this.props.pullDownToRefreshContent)),this.props.children,!this.state.showLoader&&!r&&this.props.hasMore&&this.props.loader,this.state.showLoader&&this.props.hasMore&&this.props.loader,!this.props.hasMore&&this.props.endMessage))},r}(s.Component)},93304:(e,t,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/amms",function(){return r(25870)}])}},e=>{e.O(0,[2517,241,2867,5143,9747,3906,9037,8128,636,6593,8792],()=>e(e.s=93304)),_N_E=e.O()}]);
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.