1var _sentryDebugIds,_sentryDebugIdIdentifier;void 0===_sentryDebugIds&&(_sentryDebugIds={});try{var stack=(new Error).stack;stack&&(_sentryDebugIds[stack]="1ddc53ae-3f95-4937-b42d-7b6f99ae674b",_sentryDebugIdIdentifier="sentry-dbid-1ddc53ae-3f95-4937-b42d-7b6f99ae674b")}catch(e){} 2var SENTRY_RELEASE;SENTRY_RELEASE={name: "è²è°·", version: "2.3.0"}; 3__d(function(g,r,i,_a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return h}});var t=r(d[0]),l=e(r(d[1])),a=e(r(d[2])),s=e(r(d[3])),o=e(r(d[4])),c=e(r(d[5])),n=e(r(d[6])),u=e(r(d[7]));function x(e){return{draft:{label:'\u8349\u7a3f',color:e.secondary},confirmed:{label:'\u5df2\u78ba\u8a8d',color:e.primary},paid:{label:'\u5df2\u5b8c\u6210',color:e.success}}}function f(){const e=new Date,t=e.getFullYear(),l=e.getMonth()+1;return{year:1===l?t-1:t,month:1===l?12:l-1}}function h(){const e=(0,r(d[8]).useThemeColors)(),h=(0,r(d[9]).useAuthStore)(e=>e.user),y=(0,r(d[9]).useAuthStore)(e=>e.isLoading),b='admin'===h?.role,p=(0,t.useMemo)(()=>f(),[]),[j,_]=(0,t.useState)(p.year),[N,S]=(0,t.useState)(p.month),[A,C]=(0,t.useState)(null),[w,k]=(0,t.useState)(null),[v,T]=(0,t.useState)([]),[P,L]=(0,t.useState)(!0),[M,R]=(0,t.useState)(!1),[H,E]=(0,t.useState)(!1),[D,O]=(0,t.useState)(!1),[B,G]=(0,t.useState)(''),[W,$]=(0,t.useState)(''),Y=(0,t.useRef)(0),z=(0,t.useCallback)(async(e=!1)=>{try{e?R(!0):L(!0),G('');const t=await(0,r(d[10],"@/lib/api").getSettlementHistory)();T(t)}catch(e){G(e?.message||JSON.stringify(e))}finally{L(!1),R(!1)}},[]);(0,t.useEffect)(()=>{y||b&&z()},[y,b,z]);const F=(0,t.useCallback)(async()=>{const e=Y.current+1;Y.current=e;try{E(!0),G(''),C(null),k(null);const[t,l]=await Promise.all([(0,r(d[10],"@/lib/api").adminPreviewSettlement)(j,N),(0,r(d[10],"@/lib/api").adminGetSettlementGate)(j,N)]);if(e!==Y.current)return;C(t),k(l)}catch(t){if(e!==Y.current)return;(0,r(d[11]).captureException)(t,{context:'AdminSettlement.preview',periodYear:j,periodMonth:N}),C(null),k(null),G((0,r(d[12]).getRevenueSettlementGateMessage)(null))}finally{e===Y.current&&E(!1)}},[j,N]),I=A?.period_year===j&&A.period_month===N&&w?.period_year===j&&w.period_month===N&&w.ready,J=(0,t.useCallback)(async()=>{if(!I)return;if(await(0,r(d[13]).crossConfirm)('\u78ba\u8a8d\u57f7\u884c\u7d50\u7b97',`\u78ba\u5b9a\u8981\u57f7\u884c ${j}/${N} \u7684\u5171\u597d\u5206\u6f64\u7d50\u7b97\u55ce\uff1f\u6b64\u64cd\u4f5c\u4e0d\u53ef\u9006\u3002`))try{O(!0),G(''),await(0,r(d[10],"@/lib/api").adminExecuteSettlement)(j,N,W.trim()||void 0),C(null),k(null),$(''),await z()}catch(e){(0,r(d[11]).captureException)(e,{context:'AdminSettlement.execute',periodYear:j,periodMonth:N}),G((0,r(d[12]).getRevenueSettlementErrorMessage)(e))}finally{O(!1)}},[j,N,W,z,I]),q=v.some(e=>e.period_year===j&&e.period_month===N),K=e=>{Y.current+=1;let t=N+e,l=j;t<1&&(t=12,l-=1),t>12&&(t=1,l+=1),S(t),_(l),C(null),k(null),E(!1),G('')};return y?(0,r(d[14]).jsx)(n.default,{title:"\u5171\u597d\u5206\u6f64\u7d50\u7b97",loading:!0,children:(0,r(d[14]).jsx)(l.default,{})}):b?(0,r(d[14]).jsxs)(n.default,{title:"\u5171\u597d\u5206\u6f64\u7d50\u7b97",error:B,refreshing:M,onRefresh:()=>z(!0),children:[(0,r(d[14]).jsxs)(l.default,{className:"flex-row items-center justify-center gap-4 mt-2 mb-4",children:[(0,r(d[14]).jsx)(a.default,{onPress:()=>K(-1),hitSlop:8,accessibilityRole:"button",accessibilityLabel:"\u4e0a\u500b\u6708",children:(0,r(d[14]).jsx)(o.default,{name:"chevron-left",size:16,color:e.primary})}),(0,r(d[14]).jsxs)(c.default,{className:"text-lg",style:{color:e.textTitle},children:[j," \u5e74 ",N," \u6708"]}),(0,r(d[14]).jsx)(a.default,{onPress:()=>K(1),hitSlop:8,accessibilityRole:"button",accessibilityLabel:"\u4e0b\u500b\u6708",children:(0,r(d[14]).jsx)(o.default,{name:"chevron-right",size:16,color:e.primary})})]}),q&&(0,r(d[14]).jsx)(l.default,{className:"p-3 rounded-xl mb-3",style:{backgroundColor:(0,r(d[15]).withAlpha)(e.primary,r(d[15]).ALPHA.tint)},children:(0,r(d[14]).jsx)(c.default,{className:"text-xs",style:{color:e.primary},children:"\u6b64\u6708\u4efd\u5df2\u5b8c\u6210\u7d50\u7b97\u3002"})}),(0,r(d[14]).jsx)(a.default,{onPress:F,disabled:H,className:"py-3 rounded-xl items-center mb-4",style:{backgroundColor:H?e.bgLight:e.primary},accessibilityRole:"button",accessibilityLabel:"\u9810\u89bd\u7d50\u7b97",children:(0,r(d[14]).jsx)(c.default,{className:"text-white",children:H?'\u8a08\u7b97\u4e2d...':'\u9810\u89bd\u7d50\u7b97'})}),A&&(0,r(d[14]).jsxs)(l.default,{className:"p-4 rounded-xl mb-4",style:[{backgroundColor:e.bgCard},r(d[16]).WEB_CARD_SHADOW],children:[(0,r(d[14]).jsx)(c.default,{className:"text-sm mb-3",style:{color:e.textTitle},children:"\u7d50\u7b97\u9810\u89bd"}),(0,r(d[14]).jsxs)(l.default,{className:"flex-row gap-3 mb-3",children:[(0,r(d[14]).jsxs)(l.default,{className:"flex-1 p-3 rounded-lg",style:{backgroundColor:e.bgCream}
3,children:[(0,r(d[14]).jsx)(c.default,{className:"text-xs",style:{color:e.textSubtle},children:"\u7e3d\u6bdb\u984d"}),(0,r(d[14]).jsx)(c.default,{className:"text-base mt-1",style:{color:e.textTitle},children:(0,r(d[17]).formatAmount)(A.total_gross_amount)})]}),(0,r(d[14]).jsxs)(l.default,{className:"flex-1 p-3 rounded-lg",style:{backgroundColor:e.bgCream},children:[(0,r(d[14]).jsx)(c.default,{className:"text-xs",style:{color:e.textSubtle},children:"\u7e3d\u6de8\u984d"}),(0,r(d[14]).jsx)(c.default,{className:"text-base mt-1",style:{color:e.textTitle},children:(0,r(d[17]).formatAmount)(A.total_net_amount)})]})]}),(0,r(d[14]).jsxs)(l.default,{className:"flex-row gap-3 mb-3",children:[(0,r(d[14]).jsxs)(l.default,{className:"flex-1 p-3 rounded-lg",style:{backgroundColor:(0,r(d[15]).withAlpha)(e.primary,r(d[15]).ALPHA.tint)},children:[(0,r(d[14]).jsx)(c.default,{className:"text-xs",style:{color:e.textSubtle},children:"\u5206\u6f64\u6c60"}),(0,r(d[14]).jsx)(c.default,{className:"text-base mt-1",style:{color:e.primary},children:(0,r(d[17]).formatAmount)(A.total_pool_amount)})]}),(0,r(d[14]).jsxs)(l.default,{className:"flex-1 p-3 rounded-lg",style:{backgroundColor:(0,r(d[15]).withAlpha)(e.primary,r(d[15]).ALPHA.tint)},children:[(0,r(d[14]).jsx)(c.default,{className:"text-xs",style:{color:e.textSubtle},children:"\u4ed8\u6b3e\u7b46\u6578"}),(0,r(d[14]).jsx)(c.default,{className:"text-base mt-1",style:{color:e.textTitle},children:A.total_payments_count})]})]}),(0,r(d[14]).jsxs)(l.default,{className:"flex-row gap-3 mb-3",children:[(0,r(d[14]).jsxs)(l.default,{className:"flex-1 p-3 rounded-lg",style:{backgroundColor:(0,r(d[15]).withAlpha)(e.secondary,r(d[15]).ALPHA.tint)},children:[(0,r(d[14]).jsxs)(c.default,{className:"text-xs",style:{color:e.textSubtle},children:["\u57fa\u790e\u6c60 (",A.total_pool_amount>0?Math.round(A.base_pool_amount/A.total_pool_amount*100):0,"%)"]}),(0,r(d[14]).jsx)(c.default,{className:"text-base mt-1",style:{color:e.secondary},children:(0,r(d[17]).formatAmount)(A.base_pool_amount)})]}),(0,r(d[14]).jsxs)(l.default,{className:"flex-1 p-3 rounded-lg",style:{backgroundColor:(0,r(d[15]).withAlpha)(e.primaryDark,r(d[15]).ALPHA.tint)},children:[(0,r(d[14]).jsxs)(c.default,{className:"text-xs",style:{color:e.textSubtle},children:["\u6d3b\u8e8d\u6c60 (",A.total_pool_amount>0?Math.round(A.active_pool_amount/A.total_pool_amount*100):0,"%)"]}),(0,r(d[14]).jsx)(c.default,{className:"text-base mt-1",style:{color:e.success},children:(0,r(d[17]).formatAmount)(A.active_pool_amount)})]})]}),A.unallocated_pool_amount>0&&(0,r(d[14]).jsx)(l.default,{className:"p-3 rounded-lg mb-3",style:{backgroundColor:e.errorBg},children:(0,r(d[14]).jsxs)(c.default,{className:"text-xs",style:{color:e.error},children:["\u672a\u5206\u914d\u91d1\u984d\uff1a",(0,r(d[17]).formatAmount)(A.unallocated_pool_amount)]})}),w&&!w.ready&&(0,r(d[14]).jsx)(l.default,{className:"p-3 rounded-lg mb-3",style:{backgroundColor:e.errorBg},children:(0,r(d[14]).jsx)(c.default,{className:"text-xs",style:{color:e.error},children:(0,r(d[12]).getRevenueSettlementGateMessage)(w.reason)})}),(0,r(d[14]).jsxs)(c.default,{className:"text-xs mb-1",style:{color:e.textSubtle},children:["\u7b26\u5408\u8cc7\u683c\u5275\u4f5c\u8005\uff1a",A.total_creators_count," \u4f4d \xb7 \u6d3b\u8e8d\u5275\u4f5c\u8005\uff1a",A.active_creators_count," \u4f4d"]}),A.base_allocations.length>0&&(0,r(d[14]).jsxs)(l.default,{className:"mt-3",children:[(0,r(d[14]).jsx)(c.default,{className:"text-xs mb-2",style:{color:e.primary},children:"\u57fa\u790e\u5206\u6f64\u5206\u914d"}),A.base_allocations.map(t=>(0,r(d[14]).jsxs)(l.default,{className:"flex-row justify-between py-1",children:[(0,r(d[14]).jsx)(c.default,{className:"text-xs",style:{color:e.textTitle},children:t.name??'\u672a\u547d\u540d'}),(0,r(d[14]).jsx)(c.default,{className:"text-xs",style:{color:e.secondary},children:(0,r(d[17]).formatAmount)(t.amount)})]},`base-${t.creator_id}`))]}),A.active_allocations.length>0&&(0,r(d[14]).jsxs)(l.default,{className:"mt-3",children:[(0,r(d[14]).jsx)(c.default,{className:"text-xs mb-2",style:{color:e.success},children:"\u6d3b\u8e8d\u734e\u52f5\u5206\u914d"}),A.active_allocations.map(t=>(0,r(d[14]).jsxs)(l.default,{className:"flex-row justify-between py-1",children:[(0,r(d[14]).jsx)(c.default,{className:"text-xs",style:{color:e.textTitle},children:t.name??'\u672a\u547d\u540d'}),(0,r(d[14]).jsx)(c.default,{className:"text-xs",style:{color:e.success}
3,children:(0,r(d[17]).formatAmount)(t.amount)})]},`active-${t.creator_id}`))]}),!q&&(0,r(d[14]).jsxs)(l.default,{className:"mt-4",children:[(0,r(d[14]).jsx)(r(d[18]).CappedTextInput,{value:W,onChangeText:$,placeholder:"\u7d50\u7b97\u5099\u8a3b\uff08\u53ef\u9078\uff09",placeholderTextColor:e.textMuted,className:"p-2.5 rounded-lg text-sm mb-3",style:{backgroundColor:e.bgCream,color:e.textTitle}}),(0,r(d[14]).jsx)(a.default,{onPress:J,disabled:D||!I,className:"py-3.5 rounded-xl items-center",style:{backgroundColor:D||!I?e.bgLight:e.secondary},accessibilityRole:"button",accessibilityLabel:"\u57f7\u884c\u7d50\u7b97",accessibilityState:{disabled:D||!I},children:(0,r(d[14]).jsx)(c.default,{className:"text-white",children:D?'\u7d50\u7b97\u4e2d...':I?'\u57f7\u884c\u7d50\u7b97':'\u76ee\u524d\u7121\u6cd5\u57f7\u884c\u7d50\u7b97'})})]})]}),(0,r(d[14]).jsx)(c.default,{className:"text-sm mb-2 mt-2",style:{color:e.textTitle},children:"\u6b77\u53f2\u7d50\u7b97"}),P?(0,r(d[14]).jsx)(s.default,{style:{marginTop:16}}):0===v.length?(0,r(d[14]).jsx)(u.default,{icon:"file-text-o",title:"\u5c1a\u7121\u7d50\u7b97\u7d00\u9304"}):v.map(t=>{const a=x(e),s=a[t.status]??a.draft;return(0,r(d[14]).jsx)(l.default,{className:"p-3 mb-2 rounded-xl",style:[{backgroundColor:e.bgCard},r(d[16]).WEB_CARD_SHADOW],children:(0,r(d[14]).jsxs)(l.default,{className:"flex-row items-center justify-between",children:[(0,r(d[14]).jsxs)(l.default,{className:"flex-1",children:[(0,r(d[14]).jsxs)(c.default,{className:"text-sm",style:{color:e.textTitle},children:[t.period_year,"/",t.period_month]}),(0,r(d[14]).jsxs)(c.default,{className:"text-xs mt-1",style:{color:e.textSubtle},children:["\u5206\u6f64\u6c60\uff1a",(0,r(d[17]).formatAmount)(t.total_pool_amount)," \xb7 \u5275\u4f5c\u8005\uff1a",t.total_creators_count," \u4f4d"]}),t.notes&&(0,r(d[14]).jsx)(c.default,{className:"text-xs mt-1",style:{color:e.textMuted},children:t.notes})]}),(0,r(d[14]).jsx)(l.default,{className:"px-2 py-1 rounded-full",style:{backgroundColor:(0,r(d[15]).withAlpha)(s.color,r(d[15]).ALPHA.tint)},children:(0,r(d[14]).jsx)(c.default,{className:"text-xs",style:{color:s.color},children:s.label})})]})},t.id)})]}):(0,r(d[14]).jsx)(n.default,{title:"\u5171\u597d\u5206\u6f64\u7d50\u7b97",children:(0,r(d[14]).jsx)(u.default,{icon:"lock",title:"\u7121\u6b0a\u9650\u8a2a\u554f"})})}},796,[9,175,300,968,875,876,1273,1277,937,890,894,902,1297,975,482,960,1100,898,887]);
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.