PageSourceSearch

https://aff.wifly.co.il/static/IGamingReportsPage-BRzJ0aVa.js

js wifly.co.il collected 2026-09-24 12:42:57 UTC 9,235 bytes, 1 lines download raw bytes

1import{c as m,bo as ne,a9 as s,E as q,b3 as C,bg as ue,a8 as de,a$ as le,bj as H,aQ as ce,f as me,b0 as O,b1 as $,iX as f,iY as fe,iZ as ge,j as u,P as he,B as L,aY as V,K as Y,j0 as ve,i_ as pe}from"./index-C0j1_6-p.js";import{D as be}from"./DimensionPicker-CHLFojSw.js";import{n as b}from"./NumberFormat-0afgYrX4.js";import{p as d}from"./PriceFromat-D9fM9JHi.js";import{D as Me}from"./DataGrid-CUfiO2CX.js";import{D as ye}from"./datagridUtils-DYXdvUgE.js";import{S as Fe}from"./CampaignStatFilters-DpVhqjqM.js";import{H as Be}from"./Header-Tlr5M85Z.js";import"./sortable.esm-Blnoimim.js";import"./index-DxOCYmLd.js";import"./Tabs-BzbU2f7N.js";import"./LastPage-CNids9YC.js";import"./TableCell-B2Hnx-yf.js";import"./debugUtils-ByMxgS5z.js";import"./HelperToolTip-BkDI-sYL.js";import"./Header-C5_ygwd9.js";const A=[{value:f.campaign.value,label:f.campaign.key},{value:f.month.value,label:f.month.key}];function qe(){var G,k,P,U;const R=m(ne),[K,Q]=s.useState([]),[X,Z]=s.useState(0),[z,w]=s.useState(!0),{currency:j,additionalCurrencies:J}=m(q),[t,W]=s.useState(j),[n,M]=s.useState({startDate:R?ue(R):(G=C)==null?void 0:G.CURRENT_MONTH.getValue()[0],endDate:(k=C)==null?void 0:k.CURRENT_MONTH.getValue()[1],groupBys:[],currencyCode:J.length>0?j:null}),o=de(),y=m(le),ee=!((P=m(H))!=null&&P.conversionAmount),F=!((U=m(H))!=null&&U.conversionAffiliateCommission),{hideAmountAdmin:te}=m(q),B=ee||te,{groupBy:a}=ce(),x=me(),g=s.useMemo(()=>!O(y,$.FTD.value),[y]),h=s.useMemo(()=>!O(y,$.FINANCIAL_DEPOSITS.value),[y]),S=s.useMemo(()=>{if(!a||a==="custom"||!a.includes("-"))return null;const e=a.split("-");return e.length!==2?null:e.map(i=>{var r;return{value:i,label:((r=f[i])==null?void 0:r.key)??i}})},[a]),D=s.useMemo(()=>{var e,i;return a==="custom"?((e=n.groupBys)==null?void 0:e.length)>0?n.groupBys:A:((i=n.groupBys)==null?void 0:i.length)>0?n.groupBys:S??A},[a,n.groupBys,S]),oe=e=>{switch(e){case"day":case"month":case"year":return o.formatMessage({id:"date"});case"campaign":return o.formatMessage({id:"campaign"});case"affiliate":return o.formatMessage({id:"affiliate"});case"sub1":return o.formatMessage({id:"SUB1"});case"sub2":return o.formatMessage({id:"SUB2"});case"sub3":return o.formatMessage({id:"SUB3"});case"utmSource":return o.formatMessage({id:"utm_source"});case"utmMedium":return o.formatMessage({id:"utm_medium"});case"utmContent":return o.formatMessage({id:"utm_content"});case"countryCode":case"country":return o.formatMessage({id:"countryCode"});default:return e||""}},ie=s.useMemo(()=>[...D.map((e,i)=>{const r=(e==null?void 0:e.value)||(e==null?void 0:e.label);return{field:`dim${i}`,headerName:oe(r),width:180}}),{field:"clicks",headerName:o.formatMessage({id:"clicks"}),width:180,type:"number",description:"Total Clicks.",valueFormatter:e=>b(e.value)},{field:"ftd",headerName:o.formatMessage({id:"FTD"}),width:180,type:"number",description:"Total Ftd Count.",valueFormatter:e=>b(e.value),delete:g},{field:"ftdAmount",headerName:o.formatMessage({id:"ftd_amount"}),width:180,type:"number",valueFormatter:e=>d({value:e==null?void 0:e.value,currency:t==null?void 0:t.code}),delete:g},{field:"deposits",headerName:o.formatMessage({id:"deposits"}),width:180,type:"number",valueFormatter:e=>b(e==null?void 0:e.value),delete:h},{field:"depositsAmount",headerName:o.formatMessage({id:"deposits_amount"}),width:180,type:"number",valueFormatter:e=>d({value:e==null?void 0:e.value,currency:t==null?void 0:t.code}),delete:h},{field:"registrations",headerName:o.formatMessage({id:"registrations"}),width:180,type:"number",valueFormatter:e=>b(e==null?void 0:e.value)},{field:"qftd",headerName:o.formatMessage({id:"qftd"}),width:100,type:"number",valueFormatter:e=>b(e==null?void 0:e.value),delete:g},{field:"qftdAmount",headerName:o.formatMessage({id:"qftd_amount"}),width:100,type:"number",delete:g,valueFormatter:e=>d({value:e==null?void 0:e.value,currency:t==null?void 0:t.code})},{field:"totalCpa",headerName:o.formatMessage({id:"CPA"}),width:180,type:"number",valueFormatter:e=>d({value:e==null?void 0:e.value,currency:t==null?void 0:t.code})},{field:"totalRevShare",headerName:o.formatMessage({id:"RevShare"}),width:180,type:"number",valueFormatter:e=>d({value:e==null?void 0:e.value,currency:t==null?void 0:t.code})},{field:"clicksToRegistrations",headerName:o.formatMessage({id:"clicks_to_registrations"}),width:180,type:"number",valueFormatter:e=>d({value:e==null?void 0:e.value,currency:"%",oppsiteSide:!0})},{field:"registrationsToDeposits",headerName:o.formatMessage({id:"registrations_to_deposits"}),width:180,type:"number",valueFormatter:e=>d({value:e==null?void 0:e.value,currency:"%",oppsiteSide:!0}),delete:h},{field:"clicksToDeposits",headerName:o.formatMessage({id:"clicks_to_deposits"}),width:180,type:"number",valueFormatter:e=>d({value:e==null?void 0:e.value,currency:"%",oppsiteSide:!0}),delete:h},{field:"holdAmount",headerName:o.formatMessage({id:"hold"}),width:180,type:"number",valueFormatter:e=>d({value:e==null?void 0:e.value,currency:t==null?void 0:t.code}),delete:B},{field:"pendingAmount",headerName:o.formatMessage({id:"pending"}),width:180,type:"number",valueFormatter:e=>d({value:e==null?void 0:e.value,currency:t==null?void 0:t.code}),delete:B},{field:"approvedAmount",headerName:o.formatMessage({id:"approved"}),width:180,type:"number",valueFormatter:e=>d({value:e==null?void 0:e.value,currency:t==null?void 0:t.code}),delete:B}
1,{field:"holdAffiliateCommission",headerName:o.formatMessage({id:"hold"}),width:180,type:"number",delete:F,valueFormatter:e=>d({value:e==null?void 0:e.value,currency:t==null?void 0:t.code})},{field:"pendingAffiliateCommission",headerName:o.formatMessage({id:"pending"}),width:180,type:"number",delete:F,valueFormatter:e=>d({value:e==null?void 0:e.value,currency:t==null?void 0:t.code})},{field:"approvedAffiliateCommission",headerName:o.formatMessage({id:"approved"}),width:180,type:"number",delete:F,valueFormatter:e=>d({value:e==null?void 0:e.value,currency:t==null?void 0:t.code})}].filter(e=>!(e!=null&&e.delete)),[o,D,t==null?void 0:t.code,g,h,B,F]),_=s.useMemo(()=>[{groupId:"General",children:D.map((e,i)=>({field:`dim${i}`}))},{groupId:"Total",children:[{field:"clicks"},{field:"ftd"},{field:"ftdAmount"},{field:"deposits"},{field:"depositsAmount"},{field:"registrations"},{field:"qftd"},{field:"qftdAmount"},{field:"totalCpa"},{field:"totalRevShare"}]},{groupId:"Ratio",children:[{field:"clicksToRegistrations"},{field:"registrationsToDeposits"},{field:"clicksToDeposits"}]},{groupId:"Amount",children:[{field:"holdAmount"},{field:"pendingAmount"},{field:"approvedAmount"}]},{groupId:"Affiliate Revenue",children:[{field:"holdAffiliateCommission"},{field:"pendingAffiliateCommission"},{field:"approvedAffiliateCommission"}]}],[D]),ae=s.useMemo(()=>_.reduce((e,i)=>(i.groupId!=="General"&&i.children.forEach(r=>{i.groupId!=="Ratio"?e[r.field]="sum":e[r.field]="avg"}),e),{}),[_]);s.useEffect(()=>{if(!a){x.replace("/app/affiliate/statistics/igaming-reports/campaign-month");return}if(a==="custom"||!a.includes("-"))return;const e=a.split("-");e.length===2&&M(i=>{var l,c,v;const r=e.map(p=>{var N;return{value:p,label:((N=f[p])==null?void 0:N.key)??p}});return((l=i.groupBys)==null?void 0:l.length)===2&&((c=i.groupBys[0])==null?void 0:c.value)===e[0]&&((v=i.groupBys[1])==null?void 0:v.value)===e[1]?i:{...i,groupBys:r}})},[a,x]),s.useEffect(()=>{a==="custom"&&M(e=>{var i;return((i=e.groupBys)==null?void 0:i.length)>0?e:{...e,groupBys:A}})},[a]);const I=async e=>{var T;const i=((T=e.groupBys)==null?void 0:T.length)>0?e.groupBys:S??A,r=await ve({...e,groupBys:i});Array.isArray(r)&&(Q(r.map(l=>{let c;l.dims&&l.dims.length>0?c=l.dims.join("�"):c=pe();const v={};return l.dims&&l.dims.forEach((p,N)=>{v[`dim${N}`]=p}),{...l,...v,id:c}})),Z(r.length),W(e==null?void 0:e.currencyCode))},E=()=>{var i,r;const e=a==="custom"?(((i=n==null?void 0:n.groupBys)==null?void 0:i.length)??0)>0:!!(S||((r=n==null?void 0:n.groupBys)==null?void 0:r.length)>0);if(!a||!e){w(!1);return}w(!0),I(n).catch(()=>{}).finally(()=>w(!1))};s.useEffect(()=>{E()},[n.groupBys,a]);const re=(e,i)=>{x.push(`/app/affiliate/statistics/igaming-reports/${i}`)},se=s.useMemo(()=>{var e;return(e=Object.values(fe))==null?void 0:e.map(i=>ge(i,"",re,a,o))},[a,o]);return u.jsxs(he,{title:"Igaming Reports",activeValue:a,style:{paddingTop:"0!important"},subBarItems:[{subheader:!0,label:o.formatMessage({id:"group_by"})},...se],subBarPrefix:"igaming_reports_",children:[u.jsx(L,{sx:{mt:3},children:u.jsx(Be,{statsTitle:"igaming_reports"})}),u.jsxs(L,{mt:3,children:[a==="custom"&&u.jsxs(u.Fragment,{children:[u.jsx(be,{value:n.groupBys||[],onChange:e=>M(i=>({...i,groupBys:e})),type:"igaming"}),u.jsx("br",{})]}),u.jsx(V,{id:"igaming-reports-filters-card",children:u.jsx(Y,{children:u.jsx(Fe,{header:"campaigns",fetchFilteredData:I,filters:n,setFilters:M,submitFilters:E})})}),u.jsx("br",{}),u.jsx(V,{id:"igaming-reports-table-card",children:u.jsx(Y,{sx:{py:1},children:u.jsx(Me,{experimentalFeatures:{columnGrouping:!0},name:ye.iGamingStats,loading:z,rows:K,exportDisplayRowsLabel:o.formatMessage({id:"export"}),columns:ie,paginationMode:"client",rowCount:X,pagination:!0,columnGroupingModel:_,aggregationModal:ae},(t==null?void 0:t.code)||"default")})})]})]})}export{qe as default};

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.