1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[574],{1883:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/creator/dashboard",function(){return a(46430)}])},46430:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return J}});var s=a(85893),r=a(35484),n=a(51478),l=a(2664),i=a(67294),o=a(21e3),d=a(3920),c=a(75012),x=a(10581),m=a(35871),u=a(24186),p=a(38590),g=a(96614),f=a(21751),h=a(27197),y=a(17649),b=a(15030),j=a(45485),v=a(44414);let N=i.forwardRef(function({title:e,titleId:t,...a},s){return i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},a),e?i.createElement("title",{id:t},e):null,i.createElement("path",{d:"M12 11.993a.75.75 0 0 0-.75.75v.006c0 .414.336.75.75.75h.006a.75.75 0 0 0 .75-.75v-.006a.75.75 0 0 0-.75-.75H12ZM12 16.494a.75.75 0 0 0-.75.75v.005c0 .414.335.75.75.75h.005a.75.75 0 0 0 .75-.75v-.005a.75.75 0 0 0-.75-.75H12ZM8.999 17.244a.75.75 0 0 1 .75-.75h.006a.75.75 0 0 1 .75.75v.006a.75.75 0 0 1-.75.75h-.006a.75.75 0 0 1-.75-.75v-.006ZM7.499 16.494a.75.75 0 0 0-.75.75v.005c0 .414.336.75.75.75h.005a.75.75 0 0 0 .75-.75v-.005a.75.75 0 0 0-.75-.75H7.5ZM13.499 14.997a.75.75 0 0 1 .75-.75h.006a.75.75 0 0 1 .75.75v.005a.75.75 0 0 1-.75.75h-.006a.75.75 0 0 1-.75-.75v-.005ZM14.25 16.494a.75.75 0 0 0-.75.75v.006c0 .414.335.75.75.75h.005a.75.75 0 0 0 .75-.75v-.006a.75.75 0 0 0-.75-.75h-.005ZM15.75 14.995a.75.75 0 0 1 .75-.75h.005a.75.75 0 0 1 .75.75v.006a.75.75 0 0 1-.75.75H16.5a.75.75 0 0 1-.75-.75v-.006ZM13.498 12.743a.75.75 0 0 1 .75-.75h2.25a.75.75 0 1 1 0 1.5h-2.25a.75.75 0 0 1-.75-.75ZM6.748 14.993a.75.75 0 0 1 .75-.75h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1-.75-.75Z"}),i.createElement("path",{fillRule:"evenodd",d:"M18 2.993a.75.75 0 0 0-1.5 0v1.5h-9V2.994a.75.75 0 1 0-1.5 0v1.497h-.752a3 3 0 0 0-3 3v11.252a3 3 0 0 0 3 3h13.5a3 3 0 0 0 3-3V7.492a3 3 0 0 0-3-3H18V2.993ZM3.748 18.743v-7.5a1.5 1.5 0 0 1 1.5-1.5h13.5a1.5 1.5 0 0 1 1.5 1.5v7.5a1.5 1.5 0 0 1-1.5 1.5h-13.5a1.5 1.5 0 0 1-1.5-1.5Z",clipRule:"evenodd"}))});var w=a(53634),k=a(23148);a(54439);var P=a(26495),Z=a(93967),D=a.n(Z),S=a(47354),M=a(76017),C=a(13245),A=a(31038),E=a(1825),refund_policy_drawer=function({open:e,onClose:t}){return(0,s.jsx)(E.Z,{open:e,onClose:t,placement:"bottom",height:"auto",closable:!1,rootClassName:"[&_.ant-drawer-content-wrapper]:!max-w-[500px] [&_.ant-drawer-content-wrapper]:mx-auto [&_.ant-drawer-content]:rounded-t-2xl [&_.ant-drawer-body]:!p-0",children:(0,s.jsxs)("div",{className:"px-6 pt-4 pb-8",children:[(0,s.jsx)("div",{className:"w-10 h-1 bg-gray-300 rounded-full mx-auto mb-5"}),(0,s.jsx)("h3",{className:"text-lg font-medium text-gray-900 mb-3",children:"Refunds and processing"}),(0,s.jsxs)("div",{className:"text-sm text-gray-600 space-y-3 leading-relaxed",children:[(0,s.jsx)("p",{children:"We maintain a flexible refund policy to minimize costly chargebacks and disputes from banks and card issuersâwhich carry much higher fees and can impact your account standing."}),(0,s.jsx)("p",{children:"Refunds are handled the same way for all creators. When a refund is issued, the original charge is removed from your earnings."}),(0,s.jsx)("p",{children:"Payment processing, settlement, and any chargeback or dispute fees are all covered by a small fee included in each transactionâpaid by the customer at checkout, not by you."})]}),(0,s.jsx)("button",{type:"button",onClick:t,className:"mt-5 w-full py-2.5 bg-gray-900 text-white text-sm font-medium rounded-xl hover:bg-gray-800 transition-colors",children:"Got it"})]})})};function CardAdditionalEarningsDetail(e){let{stats:t,displayPeriodStart:a,displayPeriodEnd:r,totalNetEarnings:n,minimumGuarantee:l,additionalEarnings:o,currentAgencyFeeSettingPercent:d}=e,[c,x]=(0,i.useState)(!1),[m,u]=(0,i.useState)(!1),[p,f]=(0,i.useState)(null),[h,y]=(0,i.useState)(null),[b,j]=(0,i.useState)(!1),[v,N]=(0,i.useState)(!1),w=Math.round(100*(t.performerCommission||0)),k=Math.round(100*(t.agencyFeePercentage||0)),P=d!==k&&d>0&&k>0;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("button",{type:"button",onClick:()=>x(!c),className:"flex items-center gap-1 text-gray-500 text-sm mt-4 font-medium hover:text-gray-700 transition-colors",children:[(0,s.jsx)("span",{children:c?"Hide breakdown":"View breakdown"}),(0,s.jsx)(C.Z,{className:`w-4 h-4 transition-transform ${c?"rotate-180":""}`})]}),c&&(0,s.jsxs)("div",{className:"mt-4 mb-2 bg-[#f5f5f7] rounded-2xl px-4 pb-4 pt-3",children:[(0,s.jsx)("div",{className:"flex items-center justify-between mb-2",children:(0,s.jsxs)("button",{type:"button",onClick:()=>f("details"===p?null:"details"),className:"flex items-center gap-1 text-gray-500 text-sm font-normal hover:text-gray-600 transition-colors",children:[(0,s.jsx)("span",{children:"details"===p?"Hide":"Show details"}),(0,s.jsx)(C.Z,{className:`w-4 h-4 transition-transform ${"details"===p?"rotate-180":""}`})]})}
1),"details"===p&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"flex justify-between items-center py-1",children:[(0,s.jsx)("span",{className:"text-[15px] text-gray-500",children:"Total transactions"}),(0,s.jsx)("span",{className:"text-[15px] text-gray-400 tabular-nums",children:(0,g.st)(t.totalPrice)})]}),(0,s.jsxs)("button",{type:"button",onClick:e=>{e.stopPropagation(),y("vat"===h?null:"vat")},className:"w-full text-left",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center py-1 group cursor-pointer",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(A.Z,{className:`w-3.5 h-3.5 text-gray-400 transition-transform duration-200 ${"vat"===h?"rotate-90":""}`}),(0,s.jsx)("span",{className:"text-[15px] text-gray-500 group-hover:text-gray-700 transition-colors",children:"Taxes (VAT)"})]}),(0,s.jsxs)("span",{className:"text-[15px] text-gray-400 tabular-nums",children:["â",(0,g.st)(t.totalTaxPrice)]})]}),"vat"===h&&(0,s.jsx)("p",{className:"text-sm text-gray-500 ml-[22px] pb-3 pr-3 leading-relaxed",children:"VAT is collected based on customer location and remitted directly to tax authorities."})]}),(0,s.jsxs)("button",{type:"button",onClick:e=>{e.stopPropagation(),y("platform"===h?null:"platform")},className:"w-full text-left",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center py-1 group cursor-pointer",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(A.Z,{className:`w-3.5 h-3.5 text-gray-400 transition-transform duration-200 ${"platform"===h?"rotate-90":""}`}),(0,s.jsx)("span",{className:"text-[15px] text-gray-500 group-hover:text-gray-700 transition-colors",children:"Platform fee"})]}),(0,s.jsxs)("span",{className:"text-[15px] text-gray-400 tabular-nums",children:["â",(0,g.st)(t.totalSiteEarning)]})]}),"platform"===h&&(0,s.jsxs)("p",{className:"text-sm text-gray-500 ml-[22px] pb-3 pr-3 leading-relaxed",children:["Dmlink charges"," ",w,"% of all transactions."," ",(0,s.jsx)("button",{type:"button",onClick:e=>{e.stopPropagation(),j(!0)},className:"text-black underline cursor-pointer",children:"Show calculation"}),"."]})]}),(0,s.jsxs)("button",{type:"button",onClick:e=>{e.stopPropagation(),y("processing"===h?null:"processing")},className:"w-full text-left",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center py-1 group cursor-pointer",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(A.Z,{className:`w-3.5 h-3.5 text-gray-400 transition-transform duration-200 ${"processing"===h?"rotate-90":""}`}),(0,s.jsx)("span",{className:"text-[15px] text-gray-500 group-hover:text-gray-700 transition-colors",children:"Refunds & processing"})]}),(0,s.jsxs)("span",{className:"text-[15px] text-gray-400 tabular-nums",children:["â",(0,g.st)(t.totalProcessingFee)]})]}),"processing"===h&&(0,s.jsxs)("p",{className:"text-sm text-gray-500 ml-[22px] pb-3 pr-3 leading-relaxed",children:["Payment processing, chargeback and settlement fees paid by the customer."," ",(0,s.jsx)("button",{type:"button",onClick:e=>{e.stopPropagation(),u(!0)},className:"text-gray-600 underline underline-offset-2 hover:text-gray-800 transition-colors",children:"Learn more"})," ","about refunds and processing."]})]}),(0,s.jsx)(refund_policy_drawer,{open:m,onClose:()=>u(!1)}),t.totalAgencyFee>0&&(0,s.jsxs)("button",{type:"button",onClick:e=>{e.stopPropagation(),y("agency"===h?null:"agency")},className:"w-full text-left",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center py-1 group cursor-pointer",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(A.Z,{className:`w-3.5 h-3.5 text-gray-400 transition-transform duration-200 ${"agency"===h?"rotate-90":""}`}),(0,s.jsxs)("span",{className:"text-[15px] text-gray-500 group-hover:text-gray-700 transition-colors",children:["Agency share",P?` (current ${d}%, avg ${k}%)`:k>0&&` (${k}%)`]})]}),(0,s.jsxs)("span",{className:"text-[15px] text-gray-400 tabular-nums",children:["â",(0,g.st)(t.totalAgencyFee)]})]}
1),"agency"===h&&(0,s.jsxs)("p",{className:"text-sm text-gray-500 ml-[22px] pb-3 pr-3 leading-relaxed",children:[P?`Agency share is currently ${d}% (average for period: ${k}%).`:"Agency share based on your agreement."," ",(0,s.jsx)("span",{role:"button",tabIndex:0,className:"text-black underline cursor-pointer",onClick:e=>{e.stopPropagation(),N(!0)},onKeyDown:e=>{"Enter"===e.key&&(e.stopPropagation(),N(!0))},children:"Show calculation"})]})]})]}),(0,s.jsxs)("button",{type:"button",onClick:()=>y("earnings"===h?null:"earnings"),className:"w-full text-left",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center py-1 group cursor-pointer",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(A.Z,{className:`w-3.5 h-3.5 text-gray-400 transition-transform duration-200 ${"earnings"===h?"rotate-90":""}`}),(0,s.jsxs)("span",{className:"text-[15px] text-gray-500 group-hover:text-gray-700 transition-colors",children:["Your earnings"," ",a&&r?`(${a.format("MMM D")} â ${r.format("MMM D")})`:""]})]}),(0,s.jsx)("span",{className:"text-[15px] text-gray-400 tabular-nums",children:(0,g.st)(n)})]}),"earnings"===h&&(0,s.jsx)("p",{className:"text-sm text-gray-500 ml-[22px] pb-3 pr-3 leading-relaxed",children:"Your net earnings after all fees and deductions for this period."})]}),(0,s.jsxs)("button",{type:"button",onClick:()=>y("threshold"===h?null:"threshold"),className:"w-full text-left",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center py-1 group cursor-pointer",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(A.Z,{className:`w-3.5 h-3.5 text-gray-400 transition-transform duration-200 ${"threshold"===h?"rotate-90":""}`}),(0,s.jsx)("span",{className:"text-[15px] text-gray-500 group-hover:text-gray-700 transition-colors",children:"Minimum payout"})]}),(0,s.jsxs)("span",{className:"text-[15px] text-gray-400 tabular-nums",children:["â",(0,g.st)(l||0)]})]}),"threshold"===h&&(0,s.jsx)("p",{className:"text-sm text-gray-500 ml-[22px] pb-3 pr-3 leading-relaxed",children:"Your monthly minimum guarantee amount. You'll receive additional earnings only when your net earnings exceed this threshold."})]}),(0,s.jsxs)("button",{type:"button",onClick:()=>y("additional"===h?null:"additional"),className:"w-full text-left pt-0 pb-1",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center group cursor-pointer",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(A.Z,{className:`w-3.5 h-3.5 text-gray-400 transition-transform duration-200 ${"additional"===h?"rotate-90":""}`}),(0,s.jsx)("span",{className:"text-[17px] font-medium text-gray-900 group-hover:text-gray-700 transition-colors",children:"Additional earnings"})]}),(0,s.jsx)("span",{className:"text-[21px] font-bold text-green-500 tabular-nums",children:(0,g.st)(o)})]}),"additional"===h&&(0,s.jsx)("p",{className:"text-sm text-gray-500 ml-[22px] pt-2 pb-1 leading-relaxed",children:"This is the bonus amount you've earned above your minimum guarantee this period. It will be paid out at the end of the period."})]})]}),b&&(0,s.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[(0,s.jsx)("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-sm",onClick:()=>j(!1),onKeyDown:e=>"Escape"===e.key&&j(!1),role:"button",tabIndex:0,"aria-label":"Close modal"}),(0,s.jsxs)("div",{className:"relative bg-[#f5f5f7] rounded-2xl shadow-xl max-w-sm w-full px-4 py-4 animate-in fade-in zoom-in-95 duration-200",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center py-1",children:[(0,s.jsx)("span",{className:"text-[15px] font-medium text-gray-900",children:"Total transactions"}),(0,s.jsx)("span",{className:"text-[15px] font-medium text-gray-900 tabular-nums",children:(0,g.st)(t.totalPrice)})]}),(0,s.jsxs)("div",{className:"flex justify-between items-center py-1",children:[(0,s.jsx)("span",{className:"text-[15px] text-gray-500",children:"Taxes (VAT)"}),(0,s.jsx)("span",{className:"text-[15px] text-gray-400 tabular-nums",children:(0,g.st)(t.totalTaxPrice)})]}),(0,s.jsxs)("div",{className:"flex justify-between items-center py-1",children:[(0,s.jsx)("span",{className:"text-[15px] text-gray-500",children:"Payment processing"}),(0,s.jsx)("span",{className:"text-[15px] text-gray-400 tabular-nums",children:(0,g.st)(t.totalProcessingFee)})]}),(0,s.jsxs)("div",{className:"flex justify-between items-center py-1",children:[(0,s.jsx)("span",{className:"text-[15px] text-gray-500",children:"Sales"}),(0,s.jsx)("span",{className:"text-[15px] text-gray-400 tabular-nums",children:(0,g.st)(t.totalPrice-t.totalTaxPrice-t.totalProcessingFee)})]}),(0,s.jsxs)("div",{className:"flex justify-between items-center py-2 mt-2 border-t border-gray-300",children:[(0,s.jsx)("span",{className:"text-[15px] font-medium text-gray-900",children:"Platform fee"}),(0,s.jsx)("span",{className:"text-[15px] font-medium text-gray-900 tabular-nums",children:(0,g.st)(t.totalSiteEarning)})]}),(0,s.jsxs)("p",{className:"text-sm -mt-1 text-gray-500 leading-relaxed",children:[(0,s.jsxs)("span",{className:"font-medium text-black",children:[" ",Math.round(100*(t.performerCommission||0)),"%"," "]})," ","of all transactions (",(0,g.st)(t.totalPrice),")"]}),(0,s.jsx)("button",{type:"button",onClick:()=>j(!1),className:"mt-4 w-full py-2.5 bg-gray-900 text-white text-sm font-medium rounded-xl hover:bg-gray-800 transition-colors",children:"Got it"})]})]}),v&&(0,s.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[(0,s.jsx)("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-sm",onClick:()=>N(!1),onKeyDown:e=>"Escape"===e.key&&N(!1),role:"button",tabIndex:0,"aria-label":"Close modal"}),(0,s.jsxs)("div",{className:"relative bg-[#f5f5f7] rounded-2xl shadow-xl max-w-sm w-full px-4 py-4 animate-in fade-in zoom-in-95 duration-200",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center py-1",children:[(0,s.jsx)("span",{className:"text-[15px] font-medium text-gray-900",children:"Total transactions"}),(0,s.jsx)("span",{className:"text-[15px] font-medium text-gray-900 tabular-nums",children:(0,g.st)(t.totalPrice)})]}),(0,s.jsxs)("div",{className:"flex justify-between items-center py-1",children:[(0,s.jsx)("span",{className:"text-[15px] text-gray-500",children:"Taxes (VAT)"}),(0,s.jsx)("span",{className:"text-[15px] text-gray-400 tabular-nums",children:(0,g.st)(t.totalTaxPrice)})]}),(0,s.jsxs)("div",{className:"flex justify-between items-center py-1",children:[(0,s.jsx)("span",{className:"text-[15px] text-gray-500",children:"Payment processing"}),(0,s.jsx)("span",{className:"text-[15px] text-gray-400 tabular-nums",children:(0,g.st)(t.totalProcessingFee)})]}),(0,s.jsxs)("div",{className:"flex justify-between items-center py-1",children:[(0,s.jsx)("span",{className:"text-[15px] text-gray-500",children:"Sales"}),(0,s.jsx)("span",{className:"text-[15px] text-gray-400 tabular-nums",children:(0,g.st)(t.totalPrice-t.totalTaxPrice-t.totalProcessingFee)})]}),(0,s.jsxs)("div",{className:"flex justify-between items-center py-2 mt-2 border-t border-gray-300",children:[(0,s.jsx)("span",{className:"text-[15px] font-medium text-gray-900",children:"Agency share"}),(0,s.jsx)("span",{className:"text-[15px] font-medium text-gray-900 tabular-nums",children:(0,g.st)(t.totalAgencyFee)})]}),(0,s.jsx)("p",{className:"text-sm -mt-1 text-gray-500 leading-relaxed",children:P?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("span",{className:"font-medium text-black",children:[k,"%"]})," ","average for period (current:"," ",d,"%) of all transactions (",(0,g.st)(t.totalPrice),")"]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("span",{className:"font-medium text-black",children:[k,"%"]})," ","of all transactions (",(0,g.st)(t.totalPrice),")"]})}),(0,s.jsx)("button",{type:"button",onClick:()=>N(!1),className:"mt-4 w-full py-2.5 bg-gray-900 text-white text-sm font-medium rounded-xl hover:bg-gray-800 transition-colors",children:"Got it"})]})]})]})}function getNextMonthSameDay(e,t){let a=e.date(),s=e.add(t,"month"),r=s.daysInMonth(),n=Math.min(a,r);return s.date(n)}k.kL.register(k.f$,k.od,k.jn,k.u,k.Gu,k.FB);var card_additional_earnings=function({embedded:e=!1}){let t=(0,l.v9)(e=>e.user.current),[a,r]=(0,i.useState)(!1),[n,o]=(0,i.useState)(!1),[d,x]=(0,i.useState)(0),u=(0,S.lY)(),Z=(0,i.useMemo)(()=>f.u.buildUrl("/performers/dashboard/summary",{fromDate:(0,y.Z)().subtract(365,"days").startOf("day").toISOString(),toDate:(0,y.Z)().add(30,"days").endOf("day").toISOString(),timezone:(0,p.Nh)((0,y.Z)().utcOffset())}),[]),{data:C,isLoading:A}=(0,h.KK)(Z),E=(0,i.useMemo)(()=>
1{if(!C)return null;let e=C?.minimumGuarantee,t=C?.minimumGuaranteeStartDate,a=C?.minimumGuaranteeEndDate,s=C?.allGuaranteeSessions||[];if(0===s.length&&("number"!=typeof e||e<=0||!t))return{minimumGuarantee:null,allGuaranteeSessions:[],totalPeriods:1,filter:null,guaranteeSession:null};let r=[...s].sort((e,t)=>(0,y.Z)(e.startDate).valueOf()-(0,y.Z)(t.startDate).valueOf()),n=r[0],l=r[r.length-1],i=n?.startDate||t;if(!i)return{minimumGuarantee:null,allGuaranteeSessions:s,totalPeriods:1,filter:null,guaranteeSession:null};let o={minimumGuaranteeAmount:e||n?.minimumGuaranteeAmount||0,startDate:i,endDate:l?.endDate||a||null},c=(0,y.Z)(i),x=l?.endDate?(0,y.Z)(l.endDate):null,m=(0,y.Z)(),u=x&&x.isBefore(m)?x:m,g=0;for(;;){let e=getNextMonthSameDay(c,g+1);if(e.isAfter(u)||(g+=1)>120)break}let f=g+1,h=g-d;if(h<0)return{minimumGuarantee:null,allGuaranteeSessions:s,totalPeriods:f,filter:null,guaranteeSession:o};let b=0===h?c:getNextMonthSameDay(c,h),j=getNextMonthSameDay(c,h+1).subtract(1,"day");x&&j.isAfter(x)&&(j=x);let v={fromDate:b.toISOString(),toDate:j.toISOString(),timezone:(0,p.Nh)((0,y.Z)().utcOffset()),displayGraphBy:"day"},N=b.add(j.diff(b,"day")/2,"day"),w=r.find(e=>{let t=(0,y.Z)(e.startDate),a=e.endDate?(0,y.Z)(e.endDate):null,s=N.isAfter(t)||N.isSame(t,"day"),r=!a||N.isBefore(a)||N.isSame(a,"day");return s&&r}),k=w?.minimumGuaranteeAmount||o.minimumGuaranteeAmount;return{minimumGuarantee:k,allGuaranteeSessions:s,totalPeriods:f,filter:v,guaranteeSession:o}},[C,d]),F=E?.filter||null,{data:T,isLoading:O}=(0,h.KK)(F?f.u.buildUrl("/performers/dashboard/revenue",{...F,revenueGraphType:"all"}):null),{data:$,isLoading:B}=(0,h.KK)(F?w.K.buildUrl("/earning/performer/stats",{fromDate:F.fromDate,toDate:F.toDate}):null),R=A||O||B,G=E?.guaranteeSession||null,_=E?.allGuaranteeSessions||[],L=E?.minimumGuarantee!==void 0?E.minimumGuarantee:null,Y=E?.totalPeriods||1,H=$?.totalNetPrice||0,I=$?.totalAgencyFee||0,K=(T?.valueByDate||[]).map(e=>({date:e.date,netEarnings:e.extraInfo?.netPrice||0,agencyFee:e.extraInfo?.agencyFee||0})),V=(0,i.useMemo)(()=>K.reduce((e,t,a)=>{let s=a>0?e[a-1].netEarnings:0,r=a>0?e[a-1].agencyFee:0;return e.push({date:t.date,netEarnings:s+t.netEarnings,agencyFee:r+t.agencyFee,dailyNet:t.netEarnings,dailyAgency:t.agencyFee}),e},[]),[K]),W=null!==L;if(!W&&R||null===L||L<=0)return null;let z=Math.max(0,H-L),q=(0,y.Z)().startOf("day"),U=V.findIndex(e=>(0,y.Z)(e.date).isAfter(q,"day")),X=-1===U?V.length:U;k.kL.defaults.font.family="GT-America, system-ui, sans-serif";let J=Math.round(100*(t?.agencyFeePercentage||0)),getGuaranteeAmountForDate=e=>{let t=[..._].sort((e,t)=>(0,y.Z)(e.startDate).valueOf()-(0,y.Z)(t.startDate).valueOf()),a=t.find(t=>{let a=(0,y.Z)(t.startDate),s=t.endDate?(0,y.Z)(t.endDate):null,r=e.isAfter(a)||e.isSame(a,"day"),n=!s||e.isBefore(s)||e.isSame(s,"day");return r&&n});return a?.minimumGuaranteeAmount||L||0},Q={datasets:(()=>{let e=V.length<=3,t=[],a="#22c55e";return n&&I>0&&t.push({label:"Agency share",data:V.map(e=>({x:e.date,y:e.agencyFee,daily:e.dailyAgency})),borderWidth:0,tension:.25,backgroundColor:"#e2ffa3",clip:100,pointRadius:e?5:0,pointBackgroun
1dColor:a,pointBorderWidth:e?2:0,pointBorderColor:"#ffffff",pointHoverRadius:5,pointHoverBackgroundColor:a,pointHoverBorderWidth:2,pointHoverBorderColor:"#ffffff",fill:!0,stack:"main",order:2}),t.push({label:"Your earnings",data:V.map(e=>({x:e.date,y:e.netEarnings,daily:e.dailyNet})),borderWidth:0,tension:.25,backgroundColor:a,clip:100,pointRadius:e?5:0,pointBackgroundColor:a,pointBorderWidth:e?2:0,pointBorderColor:"#ffffff",pointHoverRadius:5,pointHoverBackgroundColor:a,pointHoverBorderWidth:2,pointHoverBorderColor:"#ffffff",fill:!0,stack:"main",order:1}),t.push({label:"Guarantee",data:V.map(e=>({x:e.date,y:getGuaranteeAmountForDate((0,y.Z)(e.date))})),borderWidth:1.5,borderColor:"#000000",borderDash:[4,4],pointRadius:0,pointHoverRadius:0,fill:!1,stepped:!0,order:0}),t})()},ee={responsive:!0,maintainAspectRatio:!1,...u,plugins:{legend:{display:!0,position:"bottom",onClick:()=>{},labels:{usePointStyle:!0,pointStyle:"circle",boxWidth:8,boxHeight:8,padding:16,color:"#555",font:{size:14,weight:400},generateLabels:e=>{let{datasets:t}=e.data;return t.filter(e=>"Guarantee"!==e.label).map((t,a)=>({text:t.label,fillStyle:"Your earnings"===t.label?"#22c55e":"#e2ffa3",fontColor:"#555",strokeStyle:t.borderColor,lineWidth:0,hidden:!e.isDatasetVisible(a),index:a,pointStyle:"circle"}))}}},tooltip:{enabled:!1,mode:"index",intersect:!1,external:e=>{let{chart:t,tooltip:a}=e,s=(0,M.cA)(t,"position:absolute;background:#fff;border:1px solid rgba(0,0,0,0.1);border-radius:8px;padding:12px 16px;pointer-events:none;box-shadow:0 2px 8px rgba(0,0,0,0.08);font-family:GT-America,sans-serif;z-index:100;");if(0===a.opacity){(0,M.am)(t);return}let r=a.dataPoints?.find(e=>"Your earnings"===e.dataset.label),n=a.dataPoints?.find(e=>"Agency share"===e.dataset.label),l="";if(n&&(l+=`<div style="display:flex;align-items:center;justify-content:space-between;gap:24px;margin-bottom:4px;"> 2 <span style="display:flex;align-items:center;gap:6px;color:#000;font-weight:400;"> 3 <span style="width:8px;height:8px;flex-shrink:0;background:#e2ffa3;border-radius:50%;"></span>Agency share 4 </span> 5 <span style="color:#000;font-weight:500;font-variant-numeric:tabular-nums;">-${(0,g.st)(n.parsed.y)}</span> 6 </div>`),r&&(l+=`<div style="display:flex;align-items:center;justify-content:space-between;gap:24px;margin-bottom:6px;"> 7 <span style="display:flex;align-items:center;gap:6px;color:#000;font-weight:400;"> 8 <span style="width:8px;height:8px;flex-shrink:0;background:#22c55e;border-radius:50%;"></span>Your earnings 9 </span> 10 <span style="color:#000;font-weight:500;font-variant-numeric:tabular-nums;">${(0,g.st)(r.parsed.y)}</span> 11 </div>`),a.dataPoints?.length>0){let e=(0,y.Z)(a.dataPoints[0].label).format("MMM D, YYYY");l+=`<div style="text-align:center;color:#555;font-size:11px;margin-top:4px;">${e}</div>`}s.innerHTML=l,s.style.opacity="1",(0,M.tn)(s,t,a.caretX,a.caretY,{placement:"above"})}}},scales:{x:{type:"time",time:{unit:"day",displayFormats:{day:"MMM D"}},border:{display:!1},grid:{display:!1},ticks:{maxTicksLimit:8,color:"#9ca3af",font:{size:11,family:"GT-America, system-ui, sans-serif"}},stacked:!0},y:{stacked:!0,min:0,beginAtZero:!0,border:{display:!1,dash:[2,2]},grid:{drawTicks:!1},ticks:{crossAlign:"near",maxTicksLimit:5,color:"#9ca3af",font:{size:11,family:"GT-America, system-ui, sans-serif"},callback:e=>`$${e}`}}}},et=G?(0,y.Z)(G.startDate):null,ea=G?.endDate?(0,y.Z)(G.endDate):null,es=null,er=null,en=ea&&ea.isBefore((0,y.Z)()),el=0===d&&!en;if(et){let e=(0,y.Z)(),t=ea&&ea.isBefore(e)?ea:e,a=0;for(;;){let e=getNextMonthSameDay(et,a+1);if(e.isAfter(t)||(a+=1)>120)break}let s=a-d;s>=0&&(es=0===s?et:getNextMonthSameDay(et,s),er=getNextMonthSameDay(et,s+1).subtract(1,"day")),ea&&er&&er.isAfter(ea)&&(er=ea)}let ei=(0,y.Z)();if(et&&er&&z>0){let e=er.add(1,"day");el&&e.isBefore(ei,"day")}return(0,s.jsxs)("div",{className:D()("transition-opacity duration-200",R?"opacity-60":"opacity-100",{card:e}),children:[(0,s.jsxs)("div",{className:`flex flex-row justify-between items-start gap-2 ${e?"pt-6 pb-6":"pt-3 pb-3"}`,children:[(0,s.jsx)(b.Z,{headerText:"Additional earnings"}),es&&er&&(0,s.jsxs)("div",{className:"flex items-center gap-1 -mt-2",children:[(0,s.jsx)("button",{type:"button",onClick:()=>x(e=>Math.min(e+1,Y-1)),disabled:d>=Y-1||R,className:"p-1 rounded-full hover:bg-gray-100 transition-colors disabled:opacity-30 disabled:cursor-not-allowed","aria-label":"Previous period",children:(0,s.jsx)(j.Z,{className:"w-4 h-4 text-gray-600"})}),(0,s.jsxs)("div",{className:"text-xs text-gray-600 bg-gray-100 px-3 py-1.5 rounded-full min-w-[120px] text-center",children:[es.format("MMM D")," â ",er.format("MMM D")]}),(0,s.jsx)("button",{type:"button",onClick:()=>x(e=>Math.max(e-1,0)),disabled:d<=0||R,className:"p-1 rounded-full hover:bg-gray-100 transition-colors disabled:opacity-30 disabled:cursor-not-allowed","aria-label":"Next period",children:(0,s.jsx)(v.Z,{className:"w-4 h-4 text-gray-600"})})]})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-1 -mt-7",children:[(0,s.jsx)("div",{className:"flex flex-row items-baseline gap-0",children:(0,s.jsx)("span",{className:"text-3xl font-bold text-black",children:(0,g.st)(z)})}),er&&(()=>{let e=er.diff((0,y.Z)(),"day"),t=er.add(1,"day");return!el||e<=0?(0,s.jsxs)("div",{className:"text-sm flex flex-row items-center text-gray-500 font-normal -mt-1",children:[(0,s.jsx)(c.Z,{className:"w-3 h-3 text-gray-400 mr-1.5"}),(0,s.jsxs)("span",{className:"text-gray-500",children:["Period ended"," ",er.format("MMM D, YYYY")]})]}):(0,s.jsxs)("div",{className:"text-sm flex flex-row items-center text-gray-500 font-normal -mt-1",children:[(0,s.jsx)(N,{className:"w-3 h-3 text-green-600 mr-1.5"}),(0,s.jsxs)("span",{className:"mr-1 font-medium text-gray-900",children:[e," ",1===e?"day":"days"]})," ","left",(0,s.jsx)("span",{className:"mx-1 text-gray-500",children:"\xb7"}),(0,s.jsxs)("span",{children:["Next payout"," ",(0,s.jsx)("span",{className:"font-medium text-gray-900",children:t.format("MMM D")})]})]})})(),a&&I>0&&(0,s.jsxs)("div",{className:"flex items-center gap-0 mt-2 text-sm bg-gray-100 rounded-full p-0.5 w-fit mx-auto",children:[(0,s.jsx)("button",{type:"button",onClick:()=>o(!0),className:`px-3 py-1 rounded-full transition-all ${n?"bg-white text-gray-900 font-medium shadow-sm":"text-gray-500 hover:text-gray-700"}`,children:"Subtotal"}),(0,s.jsx)("button",{type:"button",onClick:()=>o(!1),className:`px-3 py-1 rounded-full transition-all ${n?"text-gray-500 hover:text-gray-700":"bg-white text-gray-900 font-medium shadow-sm"}`,children:"Your earnings"})]})]}),(0,s.jsxs)("div",{className:"mt-3",children:[(0,s.jsxs)("button",{type:"button",onClick:()=>r(!a),className:"flex items-center gap-1 text-sm text-gray-500 hover:text-gray-700 font-medium transition-colors",children:[(0,s.jsx)("span",{children:a?"Hide details":"Show more"}),(0,s.jsx)(m.Z,{className:`w-4 h-4 transition-transform duration-200 ${a?"rotate-180":""}`})]}),a&&(0,s.jsxs)("div",{className:"mt-3",children:[(0,s.jsx)("div",{className:"h-56",children:(0,s.jsx)(P.x1,{data:Q,options:ee,plugins:[{id:"hoverLine",afterDatasetsDraw(e){let{ctx:t,tooltip:a,chartArea:{bottom:s},scales:{x:r,y:n}}=e;if(a?.opacity>.25&&a.dataPoints?.length>0){let e=r.getPixelForValue(a.dataPoints[0].parsed.x),l=n.getPixelForValue(a.dataPoints[0].parsed.y)+7;if(l>s)return;t.beginPath(),t.lineWidth=1,t.strokeStyle="#8b5cf6",t.moveTo(e,l),t.lineTo(e,s),t.stroke(),t.closePath()}}},{id:"incompletePattern",afterDatasetsDraw(e){let{ctx:t,chartArea:a,scales:{x:s}}=e;if(!a||!V.length||X<=0||X>=V.length)return;let r=V[X-1];if(!r)return;let n=s.getPixelForValue(new Date(r.date).getTime());t.save(),t.beginPath(),t.rect(n,a.top,a.right-n,a.bottom-a.top),t.clip(),t.strokeStyle="rgba(255, 255, 255, 0.4)",t.lineWidth=2;for(let e=-a.height;e<a.right-n+a.height;e+=8)t.beginPath(),t.moveTo(n+e,a.bottom),t.lineTo(n+e+a.height,a.top),t.stroke();
11t.restore()}}]})}),(0,s.jsxs)("div",{className:"flex items-center justify-center gap-2 text-xs text-gray-500 mt-1",children:[(0,s.jsx)("div",{className:"w-4 h-0.5 bg-black rounded-full"}),(0,s.jsxs)("span",{children:["Minimum guarantee (",(0,g.st)(L||0),"/mo)"]})]}),(0,s.jsx)(CardAdditionalEarningsDetail,{stats:$||{totalNetPrice:0,totalPrice:0,totalTaxPrice:0,totalProcessingFee:0,totalSiteCommission:0,totalSiteEarning:0,totalAgencyFee:0,performerCommission:0,agencyFeePercentage:0},displayPeriodStart:es,displayPeriodEnd:er,totalNetEarnings:H,minimumGuarantee:L,additionalEarnings:z,currentAgencyFeeSettingPercent:J})]})]})]})},card_minimum_guarantee=function({onActiveGuaranteeChange:e}){let[t,a]=(0,i.useState)(!1),[r,n]=(0,i.useState)(new Set),l=(0,i.useMemo)(()=>f.u.buildUrl("/performers/dashboard/summary",{fromDate:(0,y.Z)().subtract(365,"days").startOf("day").toISOString(),toDate:(0,y.Z)().add(30,"days").endOf("day").toISOString(),timezone:(0,p.Nh)((0,y.Z)().utcOffset())}),[]),{data:o,isLoading:d}=(0,h.KK)(l),j=o?.minimumGuarantee,v=o?.minimumGuaranteeStartDate||null,N=o?.minimumGuaranteeEndDate||null,w=o?.minimumGuaranteeStatus||null,k=o?.allGuaranteeSessions||[],P=(0,y.Z)(),Z=k.find(e=>{let t=(0,y.Z)(e.startDate),a=P.isAfter(t)||P.isSame(t,"day");if(!e.endDate)return a;let s=(0,y.Z)(e.endDate);return a&&(P.isBefore(s)||P.isSame(s,"day"))}),D=!!Z,S=k.length>0;if((0,i.useEffect)(()=>{!d&&e&&e(D)},[d,D,e]),d||!S&&(null===j||j<=0))return null;let M=Z||(k.length>0?k[0]:null),C=M?.minimumGuaranteeAmount||j||0,renderPayoutHistory=()=>{let e=v?(0,y.Z)(v):(0,y.Z)(),t=N?(0,y.Z)(N):null,a=(0,y.Z)(),l=a.add(12,"week"),i=(0,y.Z)("2026-02-11"),o=[];if(k.length>0){let e=[...k].sort((e,t)=>(0,y.Z)(e.startDate).valueOf()-(0,y.Z)(t.startDate).valueOf());for(let t of e){let e=!t.endDate,a=t.endDate?(0,y.Z)(t.endDate):l;o.push({amount:t.minimumGuaranteeAmount,startDate:(0,y.Z)(t.startDate),endDate:a,status:t.status,isOngoing:e})}}else v&&o.push({amount:j||0,startDate:e,endDate:t||l,status:w||"active",isOngoing:!t});let d=[];for(let e of o){let t=[],s=e.startDate,r=e.endDate,n=e.amount/4;for(;s.isBefore(r)||s.isSame(r,"day");){let l=s.add(7,"day"),o=n;if(!e.isOngoing&&l.isAfter(r)){let e=r.diff(s,"day")+1,t=Math.min(e/7,1);o=n*t}s.isSameOrAfter(i,"day")&&t.push({date:s,isPast:s.isBefore(a,"day"),amount:o}),s=l}t.length>0&&d.push({period:e,payouts:t})}if(0===d.length)return null;let m=o.length>1,togglePeriodExpansion=e=>{n(t=>{let a=new Set(t);return a.has(e)?a.delete(e):a.add(e),a})};return(0,s.jsxs)("div",{className:"mt-3",children:[(0,s.jsx)("div",{className:"text-xs text-gray-500 uppercase tracking-wider mb-2 font-medium",children:"Schedule"}),(0,s.jsx)("div",{className:"space-y-4",children:d.map((e,t)=>{let a=r.has(t),n=a?e.payouts:e.payouts.slice(0,3),l=e.payouts.length-3,i=e.period.amount/4;return(0,s.jsxs)("div",{children:[m&&(0,s.jsxs)("div",{className:"bg-gray-50 rounded-lg px-3 py-2 mb-2",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"text-sm font-medium text-gray-900",children:(0,g.st)(e.period.amount)}),(0,s.jsx)("span",{className:"text-sm text-gray-500",children:"/month"})]}),(0,s.jsxs)("span",{className:"text-xs text-gray-500",children:[e.period.startDate.format("MMM D, YYYY")," ","â",e.period.isOngoing?"ongoing":e.period.endDate.format("MMM D, YYYY")]})]}),(0,s.jsxs)("div",{className:"text-xs text-gray-400 mt-0.5",children:[(0,g.st)(i),"/week \xb7",e.payouts.length," ","payouts"]})]}),(0,s.jsx)("div",{className:"space-y-0",children:n.map((e,t)=>(0,s.jsxs)("div",{className:"flex items-center justify-between text-sm py-1",children:[(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[e.isPast?(0,s.jsx)(c.Z,{className:"w-4 h-4 text-green-500"}):(0,s.jsx)(x.Z,{className:"w-4 h-4 text-gray-500"}),(0,s.jsx)("span",{className:`font-medium ${e.isPast?"text-gray-400":"text-gray-900"}`,children:(0,g.st)(e.amount)})]}),(0,s.jsx)("span",{className:e.isPast?"text-gray-400":"text-gray-500",children:e.date.format("MMM D")})]},`${String(t)}`))}),l>0&&(0,s.jsx)("button",{type:"button",onClick:()=>togglePeriodExpansion(t),className:"text-xs text-gray-500 hover:text-gray-700 font-medium mt
11-1 ml-5",children:a?"Show less":`+${l} more`})]},`${String(t)}`)})})]})};if(!D&&S){let e=k.filter(e=>e.endDate&&(0,y.Z)(e.endDate).isBefore(P)),r=e.length,n=[...e].sort((e,t)=>(0,y.Z)(e.startDate).valueOf()-(0,y.Z)(t.startDate).valueOf());return n[0],n[n.length-1],(0,s.jsxs)("div",{className:"card",children:[(0,s.jsx)("div",{className:"flex flex-row justify-between gap-2 py-3",children:(0,s.jsx)(b.Z,{headerText:"Historical minimum payouts"})}),(0,s.jsx)("div",{className:"flex flex-col gap-1 -mt-6",children:(0,s.jsx)("div",{className:"mt-2",children:(0,s.jsx)("div",{className:"text-sm",children:(0,s.jsxs)("span",{className:"text-gray-500",children:[r," ",1===r?"period":"periods"]})})})}),(0,s.jsxs)("button",{type:"button",onClick:()=>a(!t),className:"flex items-center gap-1 text-sm text-gray-500 hover:text-gray-700 font-medium transition-colors mt-3",children:[(0,s.jsx)("span",{children:t?"Hide details":"Show more"}),(0,s.jsx)(m.Z,{className:`w-4 h-4 transition-transform duration-200 ${t?"rotate-180":""}`})]}),t&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"mt-3 pt-3 border-t border-gray-100",children:renderPayoutHistory()}),(0,s.jsx)("div",{className:"mt-4 pt-4 border-t border-gray-100",children:(0,s.jsx)(card_additional_earnings,{embedded:!0})})]})]})}return(0,s.jsxs)("div",{className:"card",children:[(0,s.jsx)("div",{className:"flex flex-row justify-between gap-2 py-3",children:(0,s.jsx)(b.Z,{headerText:"paid"===w||"pending_payout"===w?"Minimum payout (completed)":"Minimum payout"})}),(0,s.jsx)("div",{className:"flex flex-col gap-1 -mt-6",children:(0,s.jsx)("div",{className:"flex flex-row items-baseline gap-0",children:(0,s.jsxs)("span",{className:"text-3xl font-bold text-black",children:[(0,g.st)(j),(0,s.jsx)("span",{className:"text-gray-500 font-medium text-base",children:"/month"})]})})}),(0,s.jsx)("div",{className:"-mt-2",children:(0,s.jsxs)("div",{className:"flex items-center gap-1",children:[(0,s.jsx)(u.Z,{className:"w-3 h-3 text-green-500"}),(0,s.jsxs)("span",{className:"text-sm font-medium text-gray-900",children:[(0,g.st)(C/4,0),(0,s.jsx)("span",{className:"text-sm text-gray-500 font-normal",children:"/week"})]}),(0,s.jsx)("span",{className:"text-gray-500",children:"\xb7"}),(0,s.jsx)("span",{className:"text-sm text-gray-500",children:N?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"font-medium text-black",children:(0,y.Z)(v).format("MMM D")})," to ",(0,s.jsx)("span",{className:"font-medium text-black",children:(0,y.Z)(N).format((0,y.Z)(N).year()!==(0,y.Z)().year()?"MMM D, YYYY":"MMM D")})]}):(()=>{let e=(0,y.Z)(v),t=(0,y.Z)(),a=t.diff(e,"day"),r=e.add(7*Math.ceil(a/7),"day");return(0,s.jsxs)(s.Fragment,{children:["Next payout"," ",(0,s.jsx)("span",{className:"font-medium text-black text-sm",children:r.format("MMM D")})]})})()})]})}),(0,s.jsxs)("button",{type:"button",onClick:()=>a(!t),className:"flex items-center gap-1 text-sm text-gray-500 hover:text-gray-700 font-medium transition-colors mt-2",children:[(0,s.jsx)("span",{children:t?"Hide details":"Show more"}),(0,s.jsx)(m.Z,{className:`w-4 h-4 transition-transform duration-200 ${t?"rotate-180":""}`})]}),t&&renderPayoutHistory()]})};let F=i.forwardRef(function({title:e,titleId:t,...a},s){return i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},a),e?i.createElement("title",{id:t},e):null,i.createElement("path",{d:"M2.273 5.625A4.483 4.483 0 0 1 5.25 4.5h13.5c1.141 0 2.183.425 2.977 1.125A3 3 0 0 0 18.75 3H5.25a3 3 0 0 0-2.977 2.625ZM2.273 8.625A4.483 4.483 0 0 1 5.25 7.5h13.5c1.141 0 2.183.425 2.977 1.125A3 3 0 0 0 18.75 6H5.25a3 3 0 0 0-2.977 2.625ZM5.25 9a3 3 0 0 0-3 3v6a3 3 0 0 0 3 3h13.5a3 3 0 0 0 3-3v-6a3 3 0 0 0-3-3H15a.75.75 0 0 0-.75.75 2.25 2.25 0 0 1-4.5 0A.75.75 0 0 0 9 9H5.25Z"}))});var T=a(95411),O=a(94737),$=a(15393),B=a(47);function CardNetEarningsDetail(e){let{summaryData:t,netRatio:a,currentAgencyFeeDisplayPercent:r,currentAgencyFeeSettingPercent:n,currentPlatformFeeDisplayPercent:l,stats:o,platformFeeAmount:d,filteredNetEarnings:c,agencyFeeAmount:x}=e,m=n!==r&&n>0&&r>0,[u,p]=(0,i.useState)(!1),[f,h]=(0,i.useState)(!1),[y,b]=(0,i.useState)(null),[j,v]=(0,i.useState)(!1),[N,w]=(0,i.useState)(!1),[k,P]=(0,i.useState)(!1),[Z,D]=(0,i.useState)(!1);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("button",{type:"button",onClick:()=>p(!u),className:"flex items-center gap-1 text-gray-500 text-sm font-medium hover:text-gray-700 transition-colors",children:[(0,s.jsx)("span",{children:u?"Hide details":"Show details"}),(0,s.jsx)(C.Z,{className:`w-4 h-4 transition-transform ${u?"rotate-180":""}`})]}),u&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-3 mt-4 mb-2",children:[(0,s.jsxs)("div",{className:"bg-gray-100 rounded-lg px-3 py-2",children:[(0,s.jsx)("div",{className:"text-gray-900 font-medium text-base",children:(0,g.st)((t.subscriptionRevenue||0)*a)}),(0,s.jsx)("div",{className:"text-gray-500 text-[13px]",children:"subscriptions"})]}),(0,s.jsxs)("div",{className:"bg-gray-100 rounded-lg px-3 py-2",children:[(0,s.jsx)("div",{className:"text-gray-900 font-medium text-base",children:(0,g.st)((t.messagingRevenue||0)*a)}),(0,s.jsx)("div",{className:"text-gray-500 text-[13px]",children:"tip-to-message"})]}),(0,s.jsxs)("div",{className:"bg-gray-100 rounded-lg px-3 py-2",children:[(0,s.jsx)("div",{className:"text-gray-900 font-medium text-base",children:(0,g.st)((t.messageUnlockableRevenue||0)*a)}),(0,s.jsx)("div",{className:"text-gray-500 text-[13px]",children:"unlockables"})]}),(0,s.jsxs)("div",{className:"bg-gray-100 rounded-lg px-3 py-2",children:[(0,s.jsx)("div",{className:"text-gray-900 font-medium text-base",children:(0,g.st)((t.feedRevenue||0)*a)}),(0,s.jsx)("div",{className:"text-gray-500 text-[13px]",children:"posts"})]})]}),(0,s.jsxs)("div",{className:"mt-4 mb-2 bg-[#f5f5f7] rounded-2xl px-4 pb-4 pt-3",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,s.jsxs)("button",{type:"button",onClick:()=>
11h(!f),className:"flex items-center gap-1 text-gray-500 text-sm font-normal hover:text-gray-600 transition-colors",children:[(0,s.jsx)("span",{children:f?"Hide":"Show details"}),(0,s.jsx)(C.Z,{className:`w-4 h-4 transition-transform ${f?"rotate-180":""}`})]}),(r>0||n>0)&&(0,s.jsx)("span",{className:"text-xs font-normal text-gray-600 bg-gray-200 rounded-md px-2 py-1",children:m?(0,s.jsxs)(s.Fragment,{children:["Agency share: current"," ",n,"%, avg"," ",r,"%"]}):(0,s.jsxs)(s.Fragment,{children:["Agency share:"," ",r||n,"%"]})})]}),f&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("button",{type:"button",onClick:()=>v(!j),className:"w-full text-left",children:(0,s.jsxs)("div",{className:"flex justify-between items-center py-1 group cursor-pointer",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(A.Z,{className:`w-3.5 h-3.5 text-gray-400 transition-transform duration-200 ${j?"rotate-90":""}`}),(0,s.jsx)("span",{className:"text-[15px] text-gray-500 group-hover:text-gray-700 transition-colors",children:"dm.link"})]}),!j&&(0,s.jsx)("span",{className:"text-[15px] text-gray-400 tabular-nums"})]})}),j&&(0,s.jsxs)("div",{className:"pb-2",children:[(0,s.jsxs)("button",{type:"button",onClick:e=>{e.stopPropagation(),b("vat"===y?null:"vat")},className:"w-full text-left",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center py-1 group cursor-pointer",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(A.Z,{className:`w-3.5 h-3.5 text-gray-400 transition-transform duration-200 ${"vat"===y?"rotate-90":""}`}),(0,s.jsx)("span",{className:"text-[15px] text-gray-500 group-hover:text-gray-700 transition-colors",children:"Taxes (VAT)"})]}),(0,s.jsxs)("span",{className:"text-[15px] text-gray-400 tabular-nums",children:["â",(0,g.st)(o.totalTaxPrice)]})]}),"vat"===y&&(0,s.jsx)("p",{className:"text-sm text-gray-500 ml-[22px] pb-3 pr-3 leading-relaxed",children:"VAT is collected based on customer location and remitted directly to tax authorities."})]}),(0,s.jsxs)("button",{type:"button",onClick:e=>{e.stopPropagation(),b("platform"===y?null:"platform")},className:"w-full text-left",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center py-1 group cursor-pointer",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(A.Z,{className:`w-3.5 h-3.5 text-gray-400 transition-transform duration-200 ${"platform"===y?"rotate-90":""}`}),(0,s.jsx)("span",{className:"text-[15px] text-gray-500 group-hover:text-gray-700 transition-colors",children:"Platform fee"})]}),(0,s.jsxs)("span",{className:"text-[15px] text-gray-400 tabular-nums",children:["â",(0,g.st)(d)]})]}),"platform"===y&&(0,s.jsxs)("p",{className:"text-sm text-gray-500 ml-[22px] pb-3 pr-3 leading-relaxed",children:["Dmlink charges"," ",l,"% of all transactions."," ",(0,s.jsx)("button",{type:"button",onClick:e=>{e.stopPropagation(),P(!0)},className:"text-gray-600 underline underline-offset-2 hover:text-gray-800 transition-colors",children:"Show calculation"}),"."]})]}),(0,s.jsxs)("button",{type:"button",onClick:e=>{e.stopPropagation(),b("processing"===y?null:"processing")},className:"w-full text-left",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center py-1 group cursor-pointer",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(A.Z,{className:`w-3.5 h-3.5 text-gray-400 transition-transform duration-200 ${"processing"===y?"rotate-90":""}`}),(0,s.jsx)("span",{className:"text-[15px] text-gray-500 group-hover:text-gray-700 transition-colors",children:"Payment processing"})]}),(0,s.jsxs)("span",{className:"text-[15px] text-gray-400 tabular-nums",children:["â",(0,g.st)(o.totalProcessingFee)]})]}),"processing"===y&&(0,s.jsxs)("p",{className:"text-sm text-gray-500 ml-[22px] pb-3 pr-3 leading-relaxed",children:["Payment processing, chargeback and settlement fees paid by the customer."," ",(0,s.jsx)("button",{type:"button",onClick:e=>{e.stopPropagation(),w(!0)},className:"text-gray-600 underline underline-offset-2 hover:text-gray-800 transition-colors",children:"Learn more"})," ","about refunds and processing."]})]})]}),(0,s.jsxs)("button",{type:"button",onClick:()=>b("subtotal"===y?null:"subtotal"),className:"w-full text-left",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center py-1 group cursor-pointer",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(A.Z,{className:`w-3.5 h-3.5 text-gray-400 transition-transform duration-200 ${"subtotal"===y?"rotate-90":""}`}),(0,s.jsx)("span",{className:"text-[15px] text-gray-500 group-hover:text-gray-700 transition-colors",children:"Subtotal"})]}),(0,s.jsx)("span",{className:"text-[17px] font-medium tabular-nums text-gray-900",children:(0,g.st)(c+x)})]}),"subtotal"===y&&(0,s.jsx)("p",{className:"text-sm text-gray-500 ml-[22px] pb-3 pr-3 leading-relaxed",children:"Your earnings before agency share is deducted."})]}),(0,s.jsxs)("button",{type:"button",onClick:()=>b("agency"===y?null:"agency"),className:"w-full text-left",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center py-1 group cursor-pointer",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(A.Z,{className:`w-3.5 h-3.5 text-gray-400 transition-transform duration-200 ${"agency"===y?"rotate-90":""}`}),(0,s.jsx)("span",{className:"text-[15px] font-normal text-gray-500 group-hover:text-gray-700 transition-colors",children:"Agency share"})]}),(0,s.jsxs)("span",{className:"text-[17px] font-medium tabular-nums text-gray-900",children:["â",(0,g.st)(x)]})]}),"agency"===y&&(0,s.jsxs)("p",{className:"text-sm text-gray-500 ml-[22px] pt-0 pb-3 leading-relaxed",children:[m?(0,s.jsxs)(s.Fragment,{children:["Agency share is currently"," ",n,"% (average for period:"," ",r,"%)."]}):(0,s.jsxs)(s.Fragment,{children:["Agency share is"," ",r||n,"% of all transactions."]})," ",(0,s.jsx)("button",{type:"button",onClick:e=>{e.stopPropagation(),D(!0)},className:"text-gray-600 underline underline-offset-2 hover:text-gray-800 transition-colors",children:"Show calculation"}),"."]})]}),(0,s.jsxs)("button",{type:"button",onClick:()=>b("earnings"===y?null:"earnings"),className:"w-full text-left",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center py-0.5 group cursor-pointer",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(A.Z,{className:`w-3.5 h-3.5 text-gray-400 transition-transform duration-200 ${"earnings"===y?"rotate-90":""}`}),(0,s.jsx)("span",{className:"text-[17px] font-medium text-gray-900 group-hover:text-gray-700 transition-colors",children:"Your earnings"})]}),(0,s.jsx)("span",{className:"text-[21px] font-bold text-green-500 tabular-nums",children:(0,g.st)(c)})]}),"earnings"===y&&(0,s.jsx)("p",{className:"text-sm text-gray-500 ml-[22px] pt-2 pb-1 leading-relaxed",children:"This is the amount we'll pay out to you. Payouts are processed according to your payout schedule."})]})]}),!f&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("button",{type:"button",onClick:()=>b("agency"===y?null:"agency"),className:"w-full text-left",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center py-1 group cursor-pointer",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(A.Z,{className:`w-3.5 h-3.5 text-gray-400 transition-transform duration-200 ${"agency"===y?"rotate-90":""}`}),(0,s.jsx)("span",{className:"text-[15px] font-normal text-gray-500 group-hover:text-gray-700 transition-colors",children:"Agency share"})]}),(0,s.jsxs)("span",{className:"text-[17px] font-medium tabular-nums text-gray-900",children:["â",(0,g.st)(x)]})]}),"agency"===y&&(0,s.jsxs)("p",{className:"text-sm text-gray-500 ml-[22px] pt-0 pb-3 leading-relaxed",children:[m?(0,s.jsxs)(s.Fragment,{children:["Agency share is currently"," ",n,"% (average for period:"," ",r,"%)."]}):(0,s.jsxs)(s.Fragment,{children:["Agency share is"," ",r||n,"% of all transactions."]})," ",(0,s.jsx)("button",{type:"button",onClick:e=>{e.stopPropagation(),D(!0)},className:"text-gray-600 underline underline-offset-2 hover:text-gray-800 transition-colors",children:"Show calculation"}),"."]})]}),(0,s.jsxs)("button",{type:"button",onClick:()=>b("earnings"===y?null:"earnings"),className:"w-full text-left pt-0 pb-1",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center group cursor-pointer",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(A.Z,{className:`w-3.5 h-3.5 text-gray-400 transition-transform duration-200 ${"earnings"===y?"rotate-90":""}`}),(0,s.jsx)("span",{className:"text-[17px] font-medium text-gray-900 group-hover:text-gray-700 transition-colors",children:"Your earnings"})]}),(0,s.jsx)("span",{className:"text-[21px] font-bold text-green-500 tabular-nums",children:(0,g.st)(c)})]}),"earnings"===y&&(0,s.jsxs)("p",{className:"text-sm text-gray-500 ml-[22px] pb-3 pr-3 leading-relaxed",children:["Payment processing, chargeback and settlement fees paid by the customer."," ",(0,s.jsx)("button",{type:"button",onClick:e=>{e.stopPropagation(),w(!0)},className:"text-gray-600 underline underline-offset-2 hover:text-gray-800 transition-colors",children:"Learn more"})," ","about refunds and processing."]})]})]})]})]}),(0,s.jsx)(refund_policy_drawer,{open:N,onClose:()=>w(!1)}
11),k&&(0,s.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[(0,s.jsx)("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-sm",onClick:()=>P(!1),onKeyDown:e=>"Escape"===e.key&&P(!1),role:"button",tabIndex:0,"aria-label":"Close modal"}),(0,s.jsxs)("div",{className:"relative bg-[#f5f5f7] rounded-2xl shadow-xl max-w-sm w-full px-4 py-4 animate-in fade-in zoom-in-95 duration-200",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center py-1",children:[(0,s.jsx)("span",{className:"text-[15px] font-medium text-gray-900",children:"Total transactions"}),(0,s.jsx)("span",{className:"text-[15px] font-medium text-gray-900 tabular-nums",children:(0,g.st)(o.totalPrice)})]}),(0,s.jsxs)("div",{className:"flex justify-between items-center py-1",children:[(0,s.jsx)("span",{className:"text-[15px] text-gray-500",children:"Taxes (VAT)"}),(0,s.jsx)("span",{className:"text-[15px] text-gray-400 tabular-nums",children:(0,g.st)(o.totalTaxPrice)})]}),(0,s.jsxs)("div",{className:"flex justify-between items-center py-1",children:[(0,s.jsx)("span",{className:"text-[15px] text-gray-500",children:"Payment processing"}),(0,s.jsx)("span",{className:"text-[15px] text-gray-400 tabular-nums",children:(0,g.st)(o.totalProcessingFee)})]}),(0,s.jsxs)("div",{className:"flex justify-between items-center py-1",children:[(0,s.jsx)("span",{className:"text-[15px] text-gray-500",children:"Sales"}),(0,s.jsx)("span",{className:"text-[15px] text-gray-400 tabular-nums",children:(0,g.st)(t.revenue||o.totalProductPrice)})]}),(0,s.jsxs)("div",{className:"flex justify-between items-center py-2 mt-2 border-t border-gray-300",children:[(0,s.jsx)("span",{className:"text-[15px] font-medium text-gray-900",children:"Platform fee"}),(0,s.jsx)("span",{className:"text-[15px] font-medium text-gray-900 tabular-nums",children:(0,g.st)(d)})]}),(0,s.jsxs)("p",{className:"text-sm -mt-1 text-gray-500 leading-relaxed",children:[(0,s.jsxs)("span",{className:"font-medium text-black",children:[" ",l,"%"," "]})," ","of all transactions (",(0,g.st)(o.totalPrice),")"]}),(0,s.jsx)("button",{type:"button",onClick:()=>P(!1),className:"mt-4 w-full py-2.5 bg-gray-900 text-white text-sm font-medium rounded-xl hover:bg-gray-800 transition-colors",children:"Got it"})]})]}),Z&&(0,s.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[(0,s.jsx)("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-sm",onClick:()=>D(!1),onKeyDown:e=>"Escape"===e.key&&D(!1),role:"button",tabIndex:0,"aria-label":"Close modal"}),(0,s.jsxs)("div",{className:"relative bg-[#f5f5f7] rounded-2xl shadow-xl max-w-sm w-full px-4 py-4 animate-in fade-in zoom-in-95 duration-200",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center py-1",children:[(0,s.jsx)("span",{className:"text-[15px] font-medium text-gray-900",children:"Total transactions"}),(0,s.jsx)("span",{className:"text-[15px] font-medium text-gray-900 tabular-nums",children:(0,g.st)(o.totalPrice)})]}),(0,s.jsxs)("div",{className:"flex justify-between items-center py-2 mt-2 border-t border-gray-300",children:[(0,s.jsx)("span",{className:"text-[15px] font-medium text-gray-900",children:"Agency share"}),(0,s.jsx)("span",{className:"text-[15px] font-medium text-gray-900 tabular-nums",children:(0,g.st)(x)})]}),(0,s.jsx)("p",{className:"text-sm -mt-1 text-gray-500 leading-relaxed",children:m?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("span",{className:"font-medium text-black",children:[r,"%"]})," ","average for period (current:"," ",n,"%) of all transactions (",(0,g.st)(o.totalPrice),")"]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("span",{className:"font-medium text-black",children:[r||n,"%"]})," ","of all transactions (",(0,g.st)(o.totalPrice),")"]})}),(0,s.jsx)("button",{type:"button",onClick:()=>D(!1),className:"mt-4 w-full py-2.5 bg-gray-900 text-white text-sm font-medium rounded-xl hover:bg-gray-800 transition-colors",children:"Got it"})]})]})]})}k.kL.register(k.f$,k.od,k.jn,k.u,k.Gu,k.FB,k.De);var card_net_earnings=function(){let e=(0,l.v9)(e=>e.user.current),[t,a]=(0,i.useState)((0,S.Kj)(S._6.LAST_7_DAYS)),{data:r,isLoading:n}=(0,h.KK)(f.u.buildUrl("/performers/dashboard/revenue",{...t,revenueGraphType:"all"})),{data:o,isLoading:d}=(0,h.KK)(w.K.buildUrl("/earning/performer/stats",{fromDate:t.fromDate,toDate:t.toDate})),{data:c}=(0,h.KK)(f.u.buildUrl("/performers/dashboard/summary",t)),x=r?.valueByDate||[],u=o||{totalNetPrice:0,totalPrice:0,totalProductPrice:0,totalTaxPrice:0,totalProcessingFee:0,totalSiteCommission:0,totalSiteEarning:0,totalAgencyFee:0,performerCommission:0,agencyFeePercentage:0},p=c||{},[j,v]=(0,i.useState)(!0),[N,Z]=(0,i.useState)(!1),D=(0,B.ac)({maxWidth:640}),C=(0,S.lY)(),A=u.totalAgencyFee||0,E=u.agencyFeePercentage||0,R=Math.round(100*E),G=Math.round(100*(e.agencyFeePercentage||0)),_=G!==R&&G>0&&R>0,L=u.performerCommission||0,Y=u.totalSiteEarning||0,H=u.totalNetPrice||0;k.kL.defaults.font.family="GT-America";let I=n||d,K=p.revenue||u.totalProductPrice||1;u.totalTaxPrice,u.totalProcessingFee;let V=A/K,W=K>
110?H/K:0,z=p?.minimumGuaranteePeriods||[],q=z.length>0,isDateInGuaranteePeriod=e=>{if(!q)return!1;let a=(0,y.Z)(e),s=z.map(e=>({start:(0,y.Z)(e.startDate).startOf("day"),end:e.endDate?(0,y.Z)(e.endDate).endOf("day"):(0,y.Z)("2099-12-31").endOf("day")}));if("month"!==t.displayGraphBy&&"week"!==t.displayGraphBy){let e=a.startOf("day"),t=a.endOf("day");return s.some(({start:a,end:s})=>e.isSameOrAfter(a)&&t.isSameOrBefore(s))}let[r,n]="month"===t.displayGraphBy?[a.startOf("month"),a.endOf("month")]:[a.startOf("week"),a.endOf("week")],l=n.diff(r,"day")+1,i=0,o=r;for(;o.valueOf()<=n.valueOf();){let e=o,t=s.some(({start:t,end:a})=>e.isSameOrAfter(t)&&e.isSameOrBefore(a));t&&(i+=1),o=o.add(1,"day")}return i>l/2},U=q&&x.length?x.reduce((e,{date:t,total:a,extraInfo:s})=>isDateInGuaranteePeriod(t)?e:s?.netPrice!==void 0?e+(s.netPrice||0):e+a*W,0):H,X=function(e,t,a,s,r){if(t&&e.length)return e.reduce((e,{date:t,total:n,extraInfo:l})=>{if(a(t))return e;let i=l?.netPrice!==void 0?(l.netPrice||0)+(l.agencyFee||0):n*(s+r);return Math.max(e,i)},0)||void 0}(x,q,isDateInGuaranteePeriod,W,V),J=p?.minimumGuarantee>0&&p?.minimumGuaranteeStatus==="active";return J?null:(0,s.jsxs)("div",{className:"card",children:[(0,s.jsxs)("div",{className:"flex flex-row justify-between gap-2 py-1",children:[(0,s.jsx)(b.Z,{headerText:"Your earnings",icon:(0,s.jsx)(F,{})}),(0,s.jsx)("div",{className:"flex gap-2 mt-1",children:(0,s.jsx)($.Z,{onSelect:e=>a({...t,...e}),value:t.selectedOption})})]}),I&&(0,s.jsx)("div",{className:"py-10",children:(0,s.jsx)(O.Z,{})}),!I&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"flex flex-col gap-1 -mt-6 mb-1",children:[(0,s.jsx)("div",{className:"flex flex-row items-baseline gap-0",children:(0,s.jsx)("span",{className:"text-3xl font-bold text-black",children:(0,g.st)(U)})}),(A>0||E>0)&&(0,s.jsxs)("div",{className:"flex items-center gap-0 mt-2 text-sm bg-gray-100 rounded-full p-0.5 w-fit mx-auto",children:[(0,s.jsx)("button",{type:"button",onClick:()=>Z(!0),className:`px-3 py-1 rounded-full transition-all ${N?"bg-white text-gray-900 font-medium shadow-sm":"text-gray-500 hover:text-gray-700"}`,children:"Subtotal"}),(0,s.jsx)("button",{type:"button",onClick:()=>Z(!1),className:`px-3 py-1 rounded-full transition-all ${N?"text-gray-500 hover:text-gray-700":"bg-white text-gray-900 font-medium shadow-sm"}`,children:"Your earnings"})]})]}),!j&&(0,s.jsxs)("button",{type:"button",onClick:()=>v(!0),className:"flex items-center gap-1 text-gray-500 text-sm font-medium hover:text-gray-700 transition-colors",children:[(0,s.jsx)("span",{children:"Show more"}),(0,s.jsx)(m.Z,{className:"w-4 h-4"})]}),j&&0===x.length&&(0,s.jsxs)("div",{className:"flex flex-col items-center justify-center py-14 text-center",children:[(0,s.jsxs)("div",{className:"flex items-end gap-[5px] mb-4",children:[(0,s.jsx)("div",{className:"w-[6px] h-[18px] rounded-full bg-gray-200/80"}),(0,s.jsx)("div",{className:"w-[6px] h-[28px] rounded-full bg-gray-200/60"}),(0,s.jsx)("div",{className:"w-[6px] h-[22px] rounded-full bg-gray-200/80"}),(0,s.jsx)("div",{className:"w-[6px] h-[34px] rounded-full bg-gray-200/50"}),(0,s.jsx)("div",{className:"w-[6px] h-[26px] rounded-full bg-gray-200/70"})]}),(0,s.jsx)("p",{className:"text-[15px] font-medium text-gray-300 tracking-tight",children:"No data yet"})]}),j&&x.length>0&&(0,s.jsxs)("div",{className:"mt-0",children:[(0,s.jsx)("div",{className:"min-h-[280px] sm:min-h-[280px]",children:(0,s.jsx)(P.x1,{data:{datasets:(()=>{let e=x.length<=3,t=[],a=x.some(e=>(e.extraInfo?.agencyFee||0)>0)||A>0,s="#22c55e";return a&&N&&t.push({label:"Agency share",data:x.map(e=>isDateInGuaranteePeriod(e.date)?{x:(0,y.Z)(e.date).toISOString(),y:0}:{x:(0,y.Z)(e.date).toISOString(),y:e.extraInfo?.agencyFee!==void 0?e.extraInfo.agencyFee:e.total*V}),borderWidth:0,tension:.25,backgroundColor:"#e2ffa3",clip:100,pointRadius:e?5:0,pointBackgroun
11dColor:s,pointBorderWidth:e?2:0,pointBorderColor:"#ffffff",pointHoverRadius:5,pointHoverBackgroundColor:s,pointHoverBorderWidth:2,pointHoverBorderColor:"#ffffff",fill:!0,stack:"main",order:2}),t.push({label:"Your earnings",data:x.map(e=>isDateInGuaranteePeriod(e.date)?{x:(0,y.Z)(e.date).toISOString(),y:0}:e.extraInfo?.netPrice!==void 0?{x:(0,y.Z)(e.date).toISOString(),y:e.extraInfo.netPrice||0}:{x:(0,y.Z)(e.date).toISOString(),y:e.total*W}),borderWidth:0,tension:.25,backgroundColor:s,clip:100,pointRadius:e?5:0,pointBackgroundColor:s,pointBorderWidth:e?2:0,pointBorderColor:"#ffffff",pointHoverRadius:5,pointHoverBackgroundColor:s,pointHoverBorderWidth:2,pointHoverBorderColor:"#ffffff",fill:!0,stack:"main",order:1}),t})()},options:{maintainAspectRatio:!0,aspectRatio:D?1.1:1.8,...C,scales:{x:{type:"time",time:{isoWeekday:!0,unit:t.displayGraphBy,displayFormats:S.LT},grid:{display:!1},border:{display:!1},ticks:{maxTicksLimit:8},stacked:!0},y:{stacked:!0,min:0,max:X,beginAtZero:!0,grid:{drawTicks:!1},border:{display:!1,dash:[2,2]},ticks:{crossAlign:"near",maxTicksLimit:5,callback(e,t,a){return`$${T.aM.formatters.numeric.apply(this,[e,t,a])}`}}}},plugins:{legend:{display:!0,position:"bottom",onClick:()=>{},labels:{usePointStyle:!0,pointStyle:"circle",boxWidth:8,boxHeight:8,padding:16,color:"#555",font:{size:14,weight:400},generateLabels:e=>{let{datasets:t}=e.data,a=t.map((t,a)=>{let s=t.label||"";"Agency share"===s&&R>0&&(s=_?`Agency share (current ${G}%, avg ${R}%)`:`Agency share (${R}%)`);let r="function"==typeof t.backgroundColor?"Your earnings"===t.label?"#22c55e":"#e2ffa3":t.backgroundColor;return{text:s,fillStyle:r,fontColor:"#555",strokeStyle:t.borderColor,lineWidth:t.borderWidth,hidden:!e.isDatasetVisible(a),index:a,pointStyle:"circle"}});return a}}},tooltip:{enabled:!1,mode:"index",intersect:!1,external:e=>{let{chart:a,tooltip:s}=e,r=(0,M.cA)(a,"position:absolute;background:#fff;border:1px solid rgba(0,0,0,0.1);border-radius:8px;padding:12px 16px;pointer-events:none;box-shadow:0 2px 8px rgba(0,0,0,0.08);font-family:GT-America,sans-serif;z-index:100;");if(0===s.opacity){(0,M.am)(a);return}let n=s.dataPoints?.find(e=>"Your earnings"===e.dataset.label),l=s.dataPoints?.find(e=>"Agency share"===e.dataset.label),i="";if(l&&(i+=`<div style="display:flex;align-items:center;justify-content:space-between;gap:24px;margin-bottom:4px;"> 12 <span style="display:flex;align-items:center;gap:6px;color:#000;font-weight:400;"> 13 <span style="width:8px;height:8px;flex-shrink:0;background:#e2ffa3;border-radius:50%;"></span>Agency share 14 </span> 15 <span style="color:#000;font-weight:500;font-variant-numeric:tabular-nums;">-${(0,g.st)(l.parsed.y)}</span> 16 </div>`),n&&(i+=`<div style="display:flex;align-items:center;justify-content:space-between;gap:24px;margin-bottom:6px;"> 17 <span style="display:flex;align-items:center;gap:6px;color:#000;font-weight:400;"> 18 <span style="width:8px;height:8px;flex-shrink:0;background:#22c55e;border-radius:50%;"></span>Your earnings 19 </span> 20 <span style="color:#000;font-weight:500;font-variant-numeric:tabular-nums;">${(0,g.st)(n.parsed.y)}</span> 21 </div>`),s.dataPoints?.length>0){let e=(0,y.Z)(s.dataPoints[0].label).format(S.w2[t.displayGraphBy]);i+=`<div style="text-align:center;color:#555;font-size:11px;margin-top:4px;">${e}</div>`}r.innerHTML=i,r.style.opacity="1",(0,M.tn)(r,a,s.caretX,s.caretY,{placement:"above"})}}}},plugins:[{id:"hoverLine",afterDatasetsDraw(e){let{ctx:t,tooltip:a,chartArea:{bottom:s},scales:{x:r,y:n}}=e;if(a?.opacity>.25){let e=r.getPixelForValue(a.dataPoints[0].parsed.x),l=n.getPixelForValue(a.dataPoints[0].parsed.y)+7;if(l>s)return;t.beginPath(),t.lineWidth=1,t.strokeStyle="#8b5cf6",t.moveTo(e,l),t.lineTo(e,s),t.stroke(),t.closePath()}}},{id:"incompletePattern",afterDatasetsDraw(e){let{ctx:t,chartArea:a,scales:{x:s}}=e;if(!a||!x.length)return;let r=x.length-1;if(r<1)return;let n=s.getPixelForValue(new Date(x[r].date).getTime()),l=s.getPixelForValue(new Date(x[r-1].date).getTime()),i=(n+l)/2;t.save(),t.beginPath(),t.rect(i,a.top,a.right-i,a.bottom-a.top),t.clip(),t.strokeStyle="rgba(255, 255, 255, 0.4)",t.lineWidth=2;for(let e=-a.height;e<a.right-i+a.height;e+=8)t.beginPath(),t.moveTo(i+e,a.bottom),t.lineTo(i+e+a.height,a.top),t.stroke();
21t.restore()}},{id:"guaranteePeriodOverlay",beforeDatasetsDraw(e){if(!q||!z.length)return;let{ctx:t,chartArea:a,scales:{x:s}}=e;if(!a||!x.length)return;let r=new Date(x[0].date).getTime(),n=new Date(x[x.length-1].date).getTime();z.forEach(e=>{let l=(0,y.Z)(e.startDate).startOf("day").valueOf(),i=e.endDate?(0,y.Z)(e.endDate).endOf("day").valueOf():n;if(l>n||i<r)return;let o=s.getPixelForValue(Math.max(l,r)),d=s.getPixelForValue(Math.min(i,n));if(d<=o)return;t.save(),t.beginPath(),t.rect(o,a.top,d-o,a.bottom-a.top),t.clip(),t.fillStyle="rgba(156, 163, 175, 0.15)",t.fillRect(o,a.top,d-o,a.bottom-a.top),t.strokeStyle="rgba(156, 163, 175, 0.25)",t.lineWidth=1;let c=a.bottom-a.top,x=d-o;for(let e=-c;e<x+c;e+=12)t.beginPath(),t.moveTo(o+e,a.bottom),t.lineTo(o+e+c,a.top),t.stroke();t.restore()})}}]},`chart-${q}-${z.map(e=>`${e.startDate}-${e.endDate||""}`).join(",")}`)}),q&&(0,s.jsxs)("div",{className:"flex items-center gap-2 text-xs text-gray-500 mt-1 mb-2",children:[(0,s.jsx)("div",{className:"w-4 h-3 bg-gray-200 rounded-sm relative overflow-hidden",children:(0,s.jsx)("div",{className:"absolute inset-0",style:{background:"repeating-linear-gradient(45deg, transparent, transparent 2px, rgba(156, 163, 175, 0.4) 2px, rgba(156, 163, 175, 0.4) 4px)"}})}),(0,s.jsxs)("span",{children:["Minimum guarantee period",1===z.length&&(0,s.jsxs)("span",{className:"text-gray-400",children:[" ","(",(0,y.Z)(z[0].startDate).format("MMM D")," ","-"," ",z[0].endDate?(0,y.Z)(z[0].endDate).format("MMM D"):"Present",")"]}),z.length>1&&(0,s.jsxs)("span",{className:"text-gray-400",children:[" ","(",z.map((e,t)=>(0,s.jsxs)("span",{children:[t>0&&", ",(0,y.Z)(e.startDate).format("MMM D")," ","-"," ",e.endDate?(0,y.Z)(e.endDate).format("MMM D"):"Present"]},e._id||t)),")"]})]})]}),(0,s.jsx)(CardNetEarningsDetail,{summaryData:p,netRatio:W,currentAgencyFeeDisplayPercent:R,currentAgencyFeeSettingPercent:G,currentPlatformFeeDisplayPercent:Math.round(100*L),stats:u,platformFeeAmount:Y,agencyFeeAmount:A,filteredNetEarnings:U})]})]})]})},R=a(45286),G=a(89204),_=a(70256),L=a(52699),Y=a(41664),H=a.n(Y),card_payout_status=function(){let e=(0,l.v9)(e=>e.user.current),[t,a]=(0,i.useState)(!1),[r,n]=(0,i.useState)(!1),{data:o,isLoading:d}=(0,h.KK)(L.I.buildUrl("/payout-requests/search",{status:"pending",limit:1,sortBy:"createdAt",sort:"desc"})),{data:x,isLoading:u}=(0,h.KK)(L.I.buildUrl("/payout-requests/search",{status:"done",limit:100,sortBy:"updatedAt",sort:"desc"})),{data:p,isLoading:f}=(0,h.KK)(L.I.buildUrl("/payout-requests/search",{status:"rejected",limit:100,sortBy:"updatedAt",sort:"desc"})),j=d||u||f,v=o?.data?.length>0?o.data[0]:null,N=x?.data||[],w=p?.data||[],k=function(e=[],t=[]){return[...e,...t].sort((e,t)=>{let a=new Date(e.updatedAt||e.createdAt).getTime(),s=new Date(t.updatedAt||t.createdAt).getTime();return s-a})}(N,w),P=function(e=[]){return e.reduce((e,t)=>e+(t.requestTokens||0),0)}(N),Z=e?.balance||0,D=t?k:k.slice(0,3);return(0,s.jsxs)("div",{className:"card",children:[(0,s.jsx)("div",{className:"flex flex-row justify-between gap-2 py-3",children:(0,s.jsx)(b.Z,{headerText:"Payouts"})}),j&&(0,s.jsx)("div",{className:"py-10",children:(0,s.jsx)(O.Z,{})}),!j&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"flex flex-row items-baseline gap-2 -mt-6 mb-0",children:[(0,s.jsx)("span",{className:"text-3xl font-bold text-black",children:(0,g.st)(Z)}),(0,s.jsx)("span",{className:"text-gray-500 text-sm",children:"available"})]}),(0,s.jsxs)("button",{type:"button",onClick:()=>n(!r),className:"flex items-center gap-1 text-sm font-medium text-gray-500 hover:text-gray-700 mt-2 transition-colors",children:[(0,s.jsx)("span",{children:r?"Show less":"Show more"}),(0,s.jsx)(m.Z,{className:`w-4 h-4 transition-transform ${r?"rotate-180":""}`})]}),r&&(0,s.jsxs)(s.Fragment,{children:[Z>0&&(0,s.jsx)("div",{className:"mb-4 mt-3",children:(0,s.jsx)(H(),{href:"/creator/payout-request/create",className:"inline-block rounded-md !bg-[--colorPrimary] px-4 py-1.5 text-sm font-medium !text-white no-underline hover:!bg-blue-600 hover:!text-white hover:no-underline",children:"Request payout"})}),P>0&&(0,s.jsxs)("div",{className:"flex justify-between items-center py-2 px-3 bg-gray-50 rounded-lg mb-3",children:[(0,s.jsx)("span",{className:"text-sm text-gray-600",children:"Total paid out"}),(0,s.jsx)("span",{className:"text-sm font-medium text-green-600",children:(0,g.st)(P)})]}),v&&(0,s.jsxs)("div",{className:"mb-3",children:[(0,s.jsx)("div",{className:"text-xs text-gray-500 uppercase tracking-wide mb-1.5",children:"Pending"}),(0,s.jsxs)("div",{className:"flex items-center justify-between text-sm py-1.5",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(R.Z,{className:"w-4 h-4 text-amber-500"}),(0,s.jsx)("span",{className:"font-medium text-gray-900",children:(0,g.st)(v.requestTokens)})]}),(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("span",{className:"text-gray-500",children:v.nextPayoutDate?`Est. ${(0,y.Z)(v.nextPayoutDate).format("MMM D")}`:"Processing"}),(0,s.jsx)(H(),{href:`/creator/payout-request/update?id=${v._id}`,className:"text-gray-400 hover:text-gray-600 transition-colors",children:(0,s.jsx)(G.Z,{className:"w-4 h-4"})})]})]})]}),k.length>0&&(0,s.jsxs)("div",{children:[(0,s.jsxs)("button",{type:"button",onClick:()=>a(!t),className:"flex items-center gap-1 text-xs text-gray-500 uppercase tracking-wide mb-1.5 hover:text-gray-700 transition-colors",children:[(0,s.jsxs)("span",{children:["History (",k.length,")"]}),(0,s.jsx)(m.Z,{className:`w-3 h-3 transition-transform ${t?"rotate-180":""}`})]}),(0,s.jsx)("div",{className:"space-y-1",children:D.map(e=>(0,s.jsxs)("div",{className:"flex items-center justify-between text-sm py-1",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:["done"===e.status?(0,s.jsx)(c.Z,{className:"w-4 h-4 text-green-500"}):(0,s.jsx)(_.Z,{className:"w-4 h-4 text-red-400"}),(0,s.jsx)("span",{className:`font-medium ${"rejected"===e.status?"text-gray-400 line-through":"text-gray-900"}`,children:(0,g.st)(e.requestTokens)}),"rejected"===e.status&&(0,s.jsx)("span",{className:"text-xs text-red-400",children:"Rejected"})]}),(0,s.jsx)("span",{className:"text-gray-500",children:(0,y.Z)(e.updatedAt||e.createdAt).format("MMM D, YYYY")})]},e._id))}),!t&&k.length>3&&(0,s.jsxs)("button",{type:"button",onClick:()=>a(!0),className:"text-sm text-gray-500 hover:text-gray-700 mt-2 transition-colors",children:["View all"," ",k.length," ","payouts"]})]}),!v&&0===k.length&&(0,s.jsx)("div",{className:"text-sm text-gray-500 py-2",children:"No payout history yet"})]})]})]})},I=a(6853),K=a(94618),card_todo=function(){let e;let{data:t,isLoading:a}=(0,h.KK)((0,K.Q2)("/creator/vaults/search",{limit:1,sortBy:"createdAt",sort:"desc"}));if(a)return null;try{let a=t?.data?.[0],s=(0,y.Z)().subtract(7,"days"),r=(0,y.Z)().subtract(21,"days"),n=a?.createdAt&&(0,y.Z)(a.createdAt).isAfter(s),l=!a?.createdAt||(0,y.Z)(a.createdAt).isBefore(r),i=a?.createdAt?`Last upload ${(0,y.Z)(a.createdAt).fromNow()}`:"No uploads yet";e={id:"vault-upload",label:"Upload to vault",done:n,link:"/creator/my-contents/vault",doneLabel:n?i:void 0,urgent:!n&&l,urgentLabel:l?i:void 0,pendingLabel:n||l?void 0:i}}catch(t){e={id:"vault-upload",label:"Upload to vault",done:!1,link:"/creator/my-contents/vault",urgent:!0,urgentLabel:"No uploads yet"}}let r=[e],n=r.filter(e=>!e.done),l=r.filter(e=>e.done);return 0===r.length?null:(0,s.jsxs)("div",{className:"card",children:[(0,s.jsx)("div",{className:"flex flex-row justify-between gap-2 py-3",children:(0,s.jsx)(b.Z,{headerText:"To-do"})}),(0,s.jsxs)("div",{className:"flex flex-col gap-2 -mt-4",children:[n.map(e=>(0,s.jsxs)(H(),{href:e.link,className:"flex items-center gap-3 py-2 px-3 -mx-3 rounded-lg hover:bg-gray-50 transition-colors",children:[(0,s.jsx)("div",{className:"w-5 h-5 rounded-full border-2 border-gray-300 flex-shrink-0"}),(0,s.jsxs)("div",{className:"flex flex-col",children:[(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,s.jsx)("span",{className:"text-base text-gray-900",children:e.label}),e.urgent&&(0,s.jsx)(I.Z,{className:"w-4 h-4 text-red-500 flex-shrink-0"})]}),(0,s.jsx)("span",{className:"text-xs text-gray-500",children:e.urgent?e.urgentLabel:e.pendingLabel})]})]},e.id)),l.map(e=>(0,s.jsxs)(H(),{href:e.link,className:"flex items-center gap-3 py-2 px-3 -mx-3 rounded-lg hover:bg-gray-50 transition-colors",children:[(0,s.jsx)(c.Z,{className:"w-5 h-5 text-green-500 flex-shrink-0"}),(0,s.jsxs)("div",{className:"flex flex-col",children:[(0,s.jsx)("span",{className:"text-base text-gray-400 line-through",children:e.label}),e.doneLabel&&(0,s.jsx)("span",{className:"text-xs text-gray-400",children:e.doneLabel})]})]},e.id))]})]})};let V=i.forwardRef(function({title:e,titleId:t,...a},s){return i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"
21currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":t},a),e?i.createElement("title",{id:t},e):null,i.createElement("path",{fillRule:"evenodd",d:"M2.25 13.5a8.25 8.25 0 0 1 8.25-8.25.75.75 0 0 1 .75.75v6.75H18a.75.75 0 0 1 .75.75 8.25 8.25 0 0 1-16.5 0Z",clipRule:"evenodd"}),i.createElement("path",{fillRule:"evenodd",d:"M12.75 3a.75.75 0 0 1 .75-.75 8.25 8.25 0 0 1 8.25 8.25.75.75 0 0 1-.75.75h-7.5a.75.75 0 0 1-.75-.75V3Z",clipRule:"evenodd"}))});var W=a(62048),z=a(11163),q=a(37002),U=a.n(q);let X=i.memo(function(){let e=(0,l.v9)(e=>e.user.current),t=e?.name||e?.username||"Creator",{handleSwitchAccount:a,submittingChangeAccount:c}=(0,o.jq)(),[x,m]=(0,i.useState)(null),[u,p]=(0,i.useState)(!1),[g,f]=(0,i.useState)(null);(0,z.useRouter)();let h=!!e?.agentIdLoginAsCreator;return(0,i.useEffect)(()=>{p(!0);let e=localStorage.getItem("previousManagementAccount");e&&m(JSON.parse(e))},[]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.Z,{title:"Dashboard"}),(0,s.jsxs)("div",{className:"subpage main-container lg:!max-w-[1080px]",children:[(0,s.jsx)(r.Z,{title:"Dashboard"}),(0,s.jsx)("div",{className:"mb-4 mx-4 flex items-center justify-between",children:(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[e?._id&&(0,s.jsx)(d.Z,{user:e,options:{width:40,height:40,alt:t,style:{borderRadius:"50%"}}}),(0,s.jsxs)("div",{className:"flex flex-col",children:[(0,s.jsx)("span",{className:"text-base font-medium text-black",children:t}),u&&h&&x&&(0,s.jsxs)("button",{type:"button",onClick:()=>{x&&a(x)},disabled:c,className:"flex items-center text-sm font-medium text-gray-600 hover:text-gray-800 transition-colors disabled:opacity-50 -mt-0.5",children:[(0,s.jsx)("span",{children:"All creators"}),(0,s.jsx)(A.Z,{className:"w-2.5 h-2.5 ml-0.5",strokeWidth:3})]})]})]})}),(0,s.jsxs)("div",{className:"flex flex-col gap-5 lg:grid lg:grid-cols-2 lg:gap-5 lg:items-start pb-5",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-5 [&>*]:flex [&>*]:flex-col [&>*]:px-5 [&>*]:py-3.5 [&>*]:w-full [&>*]:self-start [&>*]:rounded-[7px] [&>*]:bg-white [&>*]:gap-2.5 [&>*]:leading-normal [&>*]:lg:mb-0",children:[(0,s.jsx)(card_todo,{}),(0,s.jsx)(card_payout_status,{})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-5 [&>*]:flex [&>*]:flex-col [&>*]:px-5 [&>*]:py-3.5 [&>*]:w-full [&>*]:self-start [&>*]:rounded-[7px] [&>*]:bg-white [&>*]:gap-2.5 [&>*]:leading-normal [&>*]:lg:mb-0",children:[!g&&(0,s.jsx)(card_net_earnings,{}),(0,s.jsx)(card_minimum_guarantee,{onActiveGuaranteeChange:f}),g&&(0,s.jsx)(card_additional_earnings,{}),g&&(0,s.jsx)(card_net_earnings,{}),(0,s.jsxs)("div",{className:`${U()["settings-submenu"]} !px-0 !py-0 !gap-0 divide-y-[0.5px] divide-gray-300`,children:[(0,s.jsxs)(H(),{href:"/creator/analytics",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(V,{className:"bg-green-500"}),"Analytics"]}),(0,s.jsx)(A.Z,{className:"w-5"})]}),(0,s.jsxs)(H(),{href:"/creator/my-contents/vault",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(W.Z,{className:"bg-blue-500"}),"Vault"]}),(0,s.jsx)(A.Z,{className:"w-5"})]})]})]})]})]})]})});X.authenticate=!0,X.enableAnimation=!0,X.onlyPerformer=!0;var J=X},52699:function(e,t,a){"use strict";a.d(t,{I:function(){return r}});var s=a(32027);let PayoutRequestService=class PayoutRequestService extends s.Xv{calculate(){return this.post("/payout-requests/calculate")}search(e){return this.get(this.buildUrl("/payout-requests/search",e))}create(e){return this.post("/payout-requests/create",e)}update(e,t){return this.put(`/payout-requests/${e}/update`,t)}detail(e,t){return this.get(`/payout-requests/${e}/view`,t)}updatePayoutMethod(e,t){return this.post(`/payout-methods/${e}`,t)}updatePreferredPayoutMethod(e){return this.put("/payout-methods/preferred-payout-method",{preferredPayoutMethod:e})}getPreferredPayoutMethod(){return this.get("/payout-methods/preferred-payout-method")}};let r=new PayoutRequestService},37002:function(e){e.exports={"settings-submenu":"settings-model_settings-submenu__cmvBa",disabled:"settings-model_disabled__jOPgp"}},2105:function(e,t,a){"use strict";var s=a(75263).default,r=a(64836).default;
21Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.resetUuid=function(){};var n=r(a(27424)),l=r(a(42122)),i=s(a(67294)),o=0,d=(0,l.default)({},i).useId;t.default=d?function(e){var t=d();return e||t}:function(e){var t=i.useState("ssr-id"),a=(0,n.default)(t,2),s=a[0],r=a[1];return(i.useEffect(function(){var e=o;o+=1,r("rc_unique_".concat(e))},[]),e)?e:s}},31038:function(e,t,a){"use strict";var s=a(67294);let r=s.forwardRef(function({title:e,titleId:t,...a},r){return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},a),e?s.createElement("title",{id:t},e):null,s.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m8.25 4.5 7.5 7.5-7.5 7.5"}))});t.Z=r},10581:function(e,t,a){"use strict";var s=a(67294);let r=s.forwardRef(function({title:e,titleId:t,...a},r){return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},a),e?s.createElement("title",{id:t},e):null,s.createElement("path",{fillRule:"evenodd",d:"M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25Zm4.28 10.28a.75.75 0 0 0 0-1.06l-3-3a.75.75 0 1 0-1.06 1.06l1.72 1.72H8.25a.75.75 0 0 0 0 1.5h5.69l-1.72 1.72a.75.75 0 1 0 1.06 1.06l3-3Z",clipRule:"evenodd"}))});t.Z=r},24186:function(e,t,a){"use strict";var s=a(67294);let r=s.forwardRef(function({title:e,titleId:t,...a},r){return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},a),e?s.createElement("title",{id:t},e):null,s.createElement("path",{fillRule:"evenodd",d:"M6.32 2.577a49.255 49.255 0 0 1 11.36 0c1.497.174 2.57 1.46 2.57 2.93V21a.75.75 0 0 1-1.085.67L12 18.089l-7.165 3.583A.75.75 0 0 1 3.75 21V5.507c0-1.47 1.073-2.756 2.57-2.93Z",clipRule:"evenodd"}))});t.Z=r},75012:function(e,t,a){"use strict";var s=a(67294);let r=s.forwardRef(function({title:e,titleId:t,...a},r){return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},a),e?s.createElement("title",{id:t},e):null,s.createElement("path",{fillRule:"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm13.36-1.814a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z",clipRule:"evenodd"}))});t.Z=r},35871:function(e,t,a){"use strict";var s=a(67294);let r=s.forwardRef(function({title:e,titleId:t,...a},r){return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},a),e?s.createElement("title",{id:t},e):null,s.createElement("path",{fillRule:"evenodd",d:"M12.53 16.28a.75.75 0 0 1-1.06 0l-7.5-7.5a.75.75 0 0 1 1.06-1.06L12 14.69l6.97-6.97a.75.75 0 1 1 1.06 1.06l-7.5 7.5Z",clipRule:"evenodd"}))});t.Z=r},45485:function(e,t,a){"use strict";var s=a(67294);let r=s.forwardRef(function({title:e,titleId:t,...a},r){return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},a),e?s.createElement("title",{id:t},e):null,s.createElement("path",{fillRule:"evenodd",d:"M7.72 12.53a.75.75 0 0 1 0-1.06l7.5-7.5a.75.75 0 1 1 1.06 1.06L9.31 12l6.97 6.97a.75.75 0 1 1-1.06 1.06l-7.5-7.5Z",clipRule:"evenodd"}))});t.Z=r},44414:function(e,t,a){"use strict";var s=a(67294);let r=s.forwardRef(function({title:e,titleId:t,...a},r){return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},a),e?s.createElement("title",{id:t},e):null,s.createElement("path",{fillRule:"evenodd",d:"M16.28 11.47a.75.75 0 0 1 0 1.06l-7.5 7.5a.75.75 0 0 1-1.06-1.06L14.69 12 7.72 5.03a.75.75 0 0 1 1.06-1.06l7.5 7.5Z",clipRule:"evenodd"}))});t.Z=r},45286:function(e,t,a){"use strict";var s=a(67294);let r=s.forwardRef(function({title:e,titleId:t,...a},r){return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"
21currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},a),e?s.createElement("title",{id:t},e):null,s.createElement("path",{fillRule:"evenodd",d:"M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25ZM12.75 6a.75.75 0 0 0-1.5 0v6c0 .414.336.75.75.75h4.5a.75.75 0 0 0 0-1.5h-3.75V6Z",clipRule:"evenodd"}))});t.Z=r},6853:function(e,t,a){"use strict";var s=a(67294);let r=s.forwardRef(function({title:e,titleId:t,...a},r){return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},a),e?s.createElement("title",{id:t},e):null,s.createElement("path",{fillRule:"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12ZM12 8.25a.75.75 0 0 1 .75.75v3.75a.75.75 0 0 1-1.5 0V9a.75.75 0 0 1 .75-.75Zm0 8.25a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z",clipRule:"evenodd"}))});t.Z=r},89204:function(e,t,a){"use strict";var s=a(67294);let r=s.forwardRef(function({title:e,titleId:t,...a},r){return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},a),e?s.createElement("title",{id:t},e):null,s.createElement("path",{d:"M21.731 2.269a2.625 2.625 0 0 0-3.712 0l-1.157 1.157 3.712 3.712 1.157-1.157a2.625 2.625 0 0 0 0-3.712ZM19.513 8.199l-3.712-3.712-12.15 12.15a5.25 5.25 0 0 0-1.32 2.214l-.8 2.685a.75.75 0 0 0 .933.933l2.685-.8a5.25 5.25 0 0 0 2.214-1.32L19.513 8.2Z"}))});t.Z=r},70256:function(e,t,a){"use strict";var s=a(67294);let r=s.forwardRef(function({title:e,titleId:t,...a},r){return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},a),e?s.createElement("title",{id:t},e):null,s.createElement("path",{fillRule:"evenodd",d:"M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25Zm-1.72 6.97a.75.75 0 1 0-1.06 1.06L10.94 12l-1.72 1.72a.75.75 0 1 0 1.06 1.06L12 13.06l1.72 1.72a.75.75 0 1 0 1.06-1.06L13.06 12l1.72-1.72a.75.75 0 1 0-1.06-1.06L12 10.94l-1.72-1.72Z",clipRule:"evenodd"}))});t.Z=r}},function(e){e.O(0,[2196,1825,8020,4946,6401,9774,2888,179],function(){return e(e.s=1883)}),_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.