保存工作区合并前的本地开发现场 ledger-route-sizes-389952f
This commit is contained in:
1 parent
389952f31c
commit
9952128ba4
45 files changed
+356
-321
No files matched your search
@@ -0,0 +1,17 @@
|
||||
import{n as e}from"./rolldown-runtime-Dl_DZoUm.js";import{i as t,t as n}from"./react-1o5M9n0k.js";import{A as r,C as i,D as a,E as o,F as s,I as c,L as l,M as u,N as d,O as f,P as p,R as m,S as h,T as g,_,a as v,b as y,c as b,g as x,h as S,i as C,j as w,k as T,l as E,n as D,o as O,s as k,v as A,w as j,y as ee,z as M}from"./index-D-ox0wtk.js";import{$ as te,A as ne,B as re,Cn as N,Dn as ie,En as P,Ft as ae,G as oe,H as se,J as ce,M as le,N as ue,Nt as de,O as fe,P as pe,St as F,T as me,Tn as he,Tt as ge,V as _e,Z as ve,Zt as ye,_ as be,at as xe,bn as Se,bt as Ce,dn as we,ht as Te,i as Ee,k as De,lt as I,mt as Oe,nn as ke,nt as Ae,ot as je,pt as Me,q as Ne,qt as L,rn as Pe,tn as Fe,ut as Ie,wn as Le,x as Re,xn as R,y as z}from"./skeleton-B4Z0R3jQ.js";import{d as ze,f as Be,h as Ve,m as He,n as Ue,p as We,t as Ge,u as Ke}from"./typography-xRg_3Gco.js";import{a as qe,o as B,r as Je,s as Ye}from"./shared-DZLPF0cC.js";import{n as Xe,t as Ze}from"./useOrderForm-Boa1k5nR.js";import{a as Qe,d as $e,f as et,i as tt,n as nt,r as rt,t as it,u as at}from"./LockOutlined-BPg5cH36.js";import{n as ot,r as st,t as ct}from"./input-BnsACfRy.js";import{n as lt,t as ut}from"./ReloadOutlined-BW5sy5GM.js";var dt={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z`}}]},name:`right`,theme:`outlined`},V=e(t()),ft=V.forwardRef(function(e,t){return V.createElement(ve,P({},e,{ref:t,icon:dt}))}),H=e(ie()),pt=V.forwardRef(function(e,t){var n=e.prefixCls,r=e.forceRender,i=e.className,a=e.style,o=e.children,s=e.isActive,c=e.role,l=e.classNames,u=e.styles,d=V.useState(s||r),f=Fe(d,2),p=f[0],m=f[1];return V.useEffect(function(){(r||s)&&m(!0)},[r,s]),p?V.createElement(`div`,{ref:t,className:(0,H.default)(`${n}-content`,R(R({},`${n}-content-active`,s),`${n}-content-inactive`,!s),i),style:a,role:c},V.createElement(`div`,{className:(0,H.default)(`${n}-content-box`,l?.body),style:u?.body},o)):null});pt.displayName=`PanelContent`;var mt=[`showArrow`,`headerClass`,`isActive`,`onItemClick`,`forceRender`,`className`,`classNames`,`styles`,`prefixCls`,`collapsible`,`accordion`,`panelKey`,`extra`,`header`,`expandIcon`,`openMotion`,`destroyInactivePanel`,`children`],ht=V.forwardRef(function(e,t){var n=e.showArrow,r=n===void 0||n,i=e.headerClass,a=e.isActive,o=e.onItemClick,s=e.forceRender,c=e.className,l=e.classNames,u=l===void 0?{}:l,d=e.styles,f=d===void 0?{}:d,p=e.prefixCls,m=e.collapsible,h=e.accordion,g=e.panelKey,_=e.extra,v=e.header,y=e.expandIcon,b=e.openMotion,x=e.destroyInactivePanel,S=e.children,C=ye(e,mt),w=m===`disabled`,T=_!=null&&typeof _!=`boolean`,E=R(R(R({onClick:function(){o?.(g)},onKeyDown:function(e){(e.key===`Enter`||e.keyCode===re.ENTER||e.which===re.ENTER)&&o?.(g)},role:h?`tab`:`button`},`aria-expanded`,a),`aria-disabled`,w),`tabIndex`,w?-1:0),D=typeof y==`function`?y(e):V.createElement(`i`,{className:`arrow`}),O=D&&V.createElement(`div`,P({className:`${p}-expand-icon`},[`header`,`icon`].includes(m)?E:{}),D),k=(0,H.default)(`${p}-item`,R(R({},`${p}-item-active`,a),`${p}-item-disabled`,w),c),A=(0,H.default)(i,`${p}-header`,R({},`${p}-collapsible-${m}`,!!m),u.header),j=Se({className:A,style:f.header},[`header`,`icon`].includes(m)?{}:E);return V.createElement(`div`,P({},C,{ref:t,className:k}),V.createElement(`div`,j,r&&O,V.createElement(`span`,P({className:`${p}-header-text`},m===`header`?E:{}),v),T&&V.createElement(`div`,{className:`${p}-extra`},_)),V.createElement(te,P({visible:a,leavedClassName:`${p}-content-hidden`},b,{forceRender:s,removeOnLeave:x}),function(e,t){var n=e.className,r=e.style;return V.createElement(pt,{ref:t,prefixCls:p,className:n,classNames:u,style:r,styles:f,isActive:a,forceRender:s,role:h?`tabpanel`:void 0},S)}))}),gt=[`children`,`label`,`key`,`collapsible`,`onItemClick`,`destroyInactivePanel`],_t=function(e,t){var n=t.prefixCls,r=t.accordion,i=t.collapsible,a=t.destroyInactivePanel,o=t.onItemClick,s=t.activeKey,c=t.openMotion,l=t.expandIcon;return e.map(function(e,t){var u=e.children,d=e.label,f=e.key,p=e.collapsible,m=e.onItemClick,h=e.destroyInactivePanel,g=ye(e,gt),_=String(f??t),v=p??i,y=h??a,b=function(e){v!==`disabled`&&(o(e),m?.(e))},x=!1;return x=r?s[0]===_:s.indexOf(_)>-1,V.createElement(ht,P({},g,{prefixCls:n,key:_,panelKey:_,isActive:x,accordion:r,openMotion:c,expandIcon:l,header:d,collapsible:v,onItemClick:b,destroyInactivePanel:y}),u)})},vt=function(e,t,n){if(!e)return null;var r=n.prefixCls,i=n.accordion,a=n.collapsible,o=n.destroyInactivePanel,s=n.onItemClick,c=n.activeKey,l=n.openMotion,u=n.expandIcon,d=e.key||String(t),f=e.props,p=f.header,m=f.headerClass,h=f.destroyInactivePanel,g=f.collapsible,_=f.onItemClick,v=!1;v=i?c[0]===d:c.indexOf(d)>-1;var y=g??a,b={key:d,panelKey:d,header:p,headerClass:m,isActive:v,prefixCls:r,destroyInactivePanel:h??o,openMotion:l,accordioLine truncated
|
||||
&,
|
||||
& > ${t}-header`]:{borderRadius:`${L(c)} ${L(c)} 0 0`}},"&:last-child":{[`
|
||||
&,
|
||||
& > ${t}-header`]:{borderRadius:`0 0 ${L(c)} ${L(c)}`}},[`> ${t}-header`]:Object.assign(Object.assign({position:`relative`,display:`flex`,flexWrap:`nowrap`,alignItems:`flex-start`,padding:a,color:p,lineHeight:g,cursor:`pointer`,transition:`all ${S}, visibility 0s`},je(e)),{[`> ${t}-header-text`]:{flex:`auto`},[`${t}-expand-icon`]:{height:T,display:`flex`,alignItems:`center`,paddingInlineEnd:v},[`${t}-arrow`]:Object.assign(Object.assign({},Ie()),{fontSize:C,transition:`transform ${S}`,svg:{transition:`transform ${S}`}}),[`${t}-header-text`]:{marginInlineEnd:`auto`}}),[`${t}-collapsible-header`]:{cursor:`default`,[`${t}-header-text`]:{flex:`none`,cursor:`pointer`},[`${t}-expand-icon`]:{cursor:`pointer`}},[`${t}-collapsible-icon`]:{cursor:`unset`,[`${t}-expand-icon`]:{cursor:`pointer`}}},[`${t}-content`]:{color:f,backgroundColor:n,borderTop:D,[`& > ${t}-content-box`]:{padding:w},"&-hidden":{display:`none`}},"&-small":{[`> ${t}-item`]:{[`> ${t}-header`]:{padding:o,paddingInlineStart:x,[`> ${t}-expand-icon`]:{marginInlineStart:e.calc(y).sub(x).equal()}},[`> ${t}-content > ${t}-content-box`]:{padding:y}}},"&-large":{[`> ${t}-item`]:{fontSize:h,lineHeight:_,[`> ${t}-header`]:{padding:s,paddingInlineStart:r,[`> ${t}-expand-icon`]:{height:E,marginInlineStart:e.calc(b).sub(r).equal()}},[`> ${t}-content > ${t}-content-box`]:{padding:b}}},[`${t}-item:last-child`]:{borderBottom:0,[`> ${t}-content`]:{borderRadius:`0 0 ${L(c)} ${L(c)}`}},[`& ${t}-item-disabled > ${t}-header`]:{"\n &,\n & > .arrow\n ":{color:m,cursor:`not-allowed`}},[`&${t}-icon-position-end`]:{[`& > ${t}-item`]:{[`> ${t}-header`]:{[`${t}-expand-icon`]:{order:1,paddingInlineEnd:0,paddingInlineStart:v}}}}})}},Tt=e=>{let{componentCls:t}=e,n=`> ${t}-item > ${t}-header ${t}-arrow`;return{[`${t}-rtl`]:{[n]:{transform:`rotate(180deg)`}}}},Et=e=>{let{componentCls:t,headerBg:n,borderlessContentPadding:r,borderlessContentBg:i,colorBorder:a}=e;return{[`${t}-borderless`]:{backgroundColor:n,border:0,[`> ${t}-item`]:{borderBottom:`1px solid ${a}`},[`
|
||||
> ${t}-item:last-child,
|
||||
> ${t}-item:last-child ${t}-header
|
||||
`]:{borderRadius:0},[`> ${t}-item:last-child`]:{borderBottom:0},[`> ${t}-item > ${t}-content`]:{backgroundColor:i,borderTop:0},[`> ${t}-item > ${t}-content > ${t}-content-box`]:{padding:r}}}},Dt=e=>{let{componentCls:t,paddingSM:n}=e;return{[`${t}-ghost`]:{backgroundColor:`transparent`,border:0,[`> ${t}-item`]:{borderBottom:0,[`> ${t}-content`]:{backgroundColor:`transparent`,border:0,[`> ${t}-content-box`]:{paddingBlock:n}}}}}},Ot=Ae(`Collapse`,e=>{let t=Oe(e,{collapseHeaderPaddingSM:`${L(e.paddingXS)} ${L(e.paddingSM)}`,collapseHeaderPaddingLG:`${L(e.padding)} ${L(e.paddingLG)}`,collapsePanelBorderRadius:e.borderRadiusLG});return[wt(t),Et(t),Dt(t),Tt(t),et(t)]},e=>({headerPadding:`${e.paddingSM}px ${e.padding}px`,headerBg:e.colorFillAlter,contentPadding:`${e.padding}px 16px`,contentBg:e.colorBgContainer,borderlessContentPadding:`${e.paddingXXS}px 16px ${e.padding}px`,borderlessContentBg:`transparent`})),kt=Object.assign(V.forwardRef((e,t)=>{let{getPrefixCls:n,direction:r,expandIcon:i,className:a,style:o}=ge(`collapse`),{prefixCls:s,className:c,rootClassName:l,style:u,bordered:d=!0,ghost:f,size:p,expandIconPosition:m=`start`,children:h,destroyInactivePanel:g,destroyOnHidden:_,expandIcon:v}=e,y=fe(e=>p??e??`middle`),b=n(`collapse`,s),x=n(),[S,C,w]=Ot(b),T=V.useMemo(()=>m===`left`?`start`:m===`right`?`end`:m,[m]),E=v??i,D=V.useCallback((e={})=>{let t=typeof E==`function`?E(e):V.createElement(ft,{rotate:e.isActive?r===`rtl`?-90:90:void 0,"aria-label":e.isActive?`expanded`:`collapsed`});return se(t,()=>({className:(0,H.default)(t.props?.className,`${b}-arrow`)}))},[E,b,r]),O=(0,H.default)(`${b}-icon-position-${T}`,{[`${b}-borderless`]:!d,[`${b}-rtl`]:r===`rtl`,[`${b}-ghost`]:!!f,[`${b}-${y}`]:y!==`middle`},a,c,l,C,w),k=V.useMemo(()=>Object.assign(Object.assign({},pe(x)),{motionAppear:!1,leavedClassName:`${b}-content-hidden`}),[x,b]),A=V.useMemo(()=>h?Le(h).map((e,t)=>{let n=e.props;if(n?.disabled){let r=e.key??String(t),i=Object.assign(Object.assign({},le(e.props,[`disabled`])),{key:r,collapsible:n.collapsible??`disabled`});return se(e,i)}return e}):null,[h]);return S(V.createElement(St,Object.assign({ref:t,openMotion:k},le(e,[`rootClassName`]),{expandIcon:D,prefixCls:b,className:O,style:Object.assign(Object.assign({},o),u),destroyInactivePanel:_??g}),A))}),{Panel:Ct}),At=e=>e?typeof e==`function`?e():e:null,jt=e=>{let{componentCls:t,popoverColor:n,titleMinWidth:r,fontWeightStrong:i,innerPadding:a,boxShadowSecondary:o,colorTextHeading:s,borderRadiusLG:c,zIndexPopup:l,titleMarginBottom:u,colorBgElevated:d,popoverBg:f,titleBorderBottom:p,innerContentPadding:m,titlePadding:h}=e;return[{[t]:Object.assign(Object.assign({},I(e)),{position:`absolute`,top:0,left:{_skip_check_:!0,value:0},zIndex:l,fontWeight:`normal`,whiteSpace:`normal`,textAlign:`start`,cursor:`auto`,userSelect:`text`,"--valid-offset-x":`var(--arrow-offset-horizontal, var(--arrow-x))`,transformOrigin:`var(--valid-offset-x, 50%) var(--arrow-y, 50%)`,"--antd-arrow-background-color":d,width:`max-content`,maxWidth:`100vw`,"&-rtl":{direction:`rtl`},"&-hidden":{display:`none`},[`${t}-content`]:{position:`relative`},[`${t}-inner`]:{backgroundColor:f,backgroundClip:`padding-box`,borderRadius:c,boxShadow:o,padding:a},[`${t}-title`]:{minWidth:r,marginBottom:u,color:s,fontWeight:i,borderBottom:p,padding:h},[`${t}-inner-content`]:{color:n,padding:m}})},Be(e,`var(--antd-arrow-background-color)`),{[`${t}-pure`]:{position:`relative`,maxWidth:`none`,margin:e.sizePopupArrow,display:`inline-block`,[`${t}-content`]:{display:`inline-block`}}}]},Mt=e=>{let{componentCls:t}=e;return{[t]:Me.map(n=>{let r=e[`${n}6`];return{[`&${t}-${n}`]:{"--antd-arrow-background-color":r,[`${t}-inner`]:{backgroundColor:r},[`${t}-arrow`]:{background:`transparent`}}}})}},Nt=Ae(`Popover`,e=>{let{colorBgElevated:t,colorText:n}=e,r=Oe(e,{popoverBg:t,popoverColor:n});return[jt(r),Mt(r),Re(r,`zoom-big`)]},e=>{let{lineWidth:t,controlHeight:n,fontHeight:r,padding:i,wireframe:a,zIndexPopupBase:o,borderRadiusLG:s,marginXS:c,lineType:l,colorSplit:u,paddingSM:d}=e,f=n-r,p=f/2,m=f/2-t,h=i;return Object.assign(Object.assign(Object.assign({titleMinWidth:177,zIndexPopup:o+30},We(e)),ze({contentRadius:s,limitVerticalRadius:!0})),{innerPadding:a?0:12,titleMarginBottom:a?0:c,titlePadding:a?`${p}px ${h}px ${m}px`:0,titleBorderBottom:a?`${t}px ${l} ${u}`:`none`,innerContentPadding:a?`${d}px ${h}px`:0})},{resetStyle:!1,deprecatedTokens:[[`width`,`titleMinWidth`],[`minWidth`,`titleMinWidth`]]}),Pt=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},Ft=({title:e,content:t,prefixCls:n})=>!e&&!t?null:V.createElement(V.Fragment,null,e&&V.createElement(`div`,{className:`${n}-title`},e),t&&V.createElement(`div`,{className:`${n}-inner-content`},
Line truncated
|
||||
&:hover ${y}`]:{borderColor:r},[`${t}-input:focus-visible + ${y}`]:xe(e),[`${t}:hover::after, ${t}-wrapper:hover &::after`]:{visibility:`visible`},[`${t}-inner`]:{"&::after":{boxSizing:`border-box`,position:`absolute`,insetBlockStart:`50%`,insetInlineStart:`50%`,display:`block`,width:x,height:x,marginBlockStart:v(1).mul(i).div(-2).equal({unit:!0}),marginInlineStart:v(1).mul(i).div(-2).equal({unit:!0}),backgroundColor:g,borderBlockStart:0,borderInlineStart:0,borderRadius:x,transform:`scale(0)`,opacity:0,transition:`all ${a} ${s}`,content:`""`},boxSizing:`border-box`,position:`relative`,insetBlockStart:0,insetInlineStart:0,display:`block`,width:x,height:x,backgroundColor:c,borderColor:l,borderStyle:`solid`,borderWidth:u,borderRadius:`50%`,transition:`all ${o}`},[`${t}-input`]:{position:`absolute`,inset:0,zIndex:1,cursor:`pointer`,opacity:0},[`${t}-checked`]:{[y]:{borderColor:r,backgroundColor:_,"&::after":{transform:`scale(${e.calc(e.dotSize).div(i).equal()})`,opacity:1,transition:`all ${a} ${s}`}}},[`${t}-disabled`]:{cursor:`not-allowed`,[y]:{backgroundColor:d,borderColor:l,cursor:`not-allowed`,"&::after":{backgroundColor:m}},[`${t}-input`]:{cursor:`not-allowed`},[`${t}-disabled + span`]:{color:f,cursor:`not-allowed`},[`&${t}-checked`]:{[y]:{"&::after":{transform:`scale(${v(b).div(i).equal()})`}}}},[`span${t} + *`]:{paddingInlineStart:p,paddingInlineEnd:p}})}},Yt=e=>{let{buttonColor:t,controlHeight:n,componentCls:r,lineWidth:i,lineType:a,colorBorder:o,motionDurationMid:s,buttonPaddingInline:c,fontSize:l,buttonBg:u,fontSizeLG:d,controlHeightLG:f,controlHeightSM:p,paddingXS:m,borderRadius:h,borderRadiusSM:g,borderRadiusLG:_,buttonCheckedBg:v,buttonSolidCheckedColor:y,colorTextDisabled:b,colorBgContainerDisabled:x,buttonCheckedBgDisabled:S,buttonCheckedColorDisabled:C,colorPrimary:w,colorPrimaryHover:T,colorPrimaryActive:E,buttonSolidCheckedBg:D,buttonSolidCheckedHoverBg:O,buttonSolidCheckedActiveBg:k,calc:A}=e;return{[`${r}-button-wrapper`]:{position:`relative`,display:`inline-block`,height:n,margin:0,paddingInline:c,paddingBlock:0,color:t,fontSize:l,lineHeight:L(A(n).sub(A(i).mul(2)).equal()),background:u,border:`${L(i)} ${a} ${o}`,borderBlockStartWidth:A(i).add(.02).equal(),borderInlineEndWidth:i,cursor:`pointer`,transition:[`color ${s}`,`background ${s}`,`box-shadow ${s}`].join(`,`),a:{color:t},[`> ${r}-button`]:{position:`absolute`,insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:`100%`,height:`100%`},"&:not(:last-child)":{marginInlineEnd:A(i).mul(-1).equal()},"&:first-child":{borderInlineStart:`${L(i)} ${a} ${o}`,borderStartStartRadius:h,borderEndStartRadius:h},"&:last-child":{borderStartEndRadius:h,borderEndEndRadius:h},"&:first-child:last-child":{borderRadius:h},[`${r}-group-large &`]:{height:f,fontSize:d,lineHeight:L(A(f).sub(A(i).mul(2)).equal()),"&:first-child":{borderStartStartRadius:_,borderEndStartRadius:_},"&:last-child":{borderStartEndRadius:_,borderEndEndRadius:_}},[`${r}-group-small &`]:{height:p,paddingInline:A(m).sub(i).equal(),paddingBlock:0,lineHeight:L(A(p).sub(A(i).mul(2)).equal()),"&:first-child":{borderStartStartRadius:g,borderEndStartRadius:g},"&:last-child":{borderStartEndRadius:g,borderEndEndRadius:g}},"&:hover":{position:`relative`,color:w},"&:has(:focus-visible)":xe(e),[`${r}-inner, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:`none`},[`&-checked:not(${r}-button-wrapper-disabled)`]:{zIndex:1,color:w,background:v,borderColor:w,"&::before":{backgroundColor:w},"&:first-child":{borderColor:w},"&:hover":{color:T,borderColor:T,"&::before":{backgroundColor:T}},"&:active":{color:E,borderColor:E,"&::before":{backgroundColor:E}}},[`${r}-group-solid &-checked:not(${r}-button-wrapper-disabled)`]:{color:y,background:D,borderColor:D,"&:hover":{color:y,background:O,borderColor:O},"&:active":{color:y,background:k,borderColor:k}},"&-disabled":{color:b,backgroundColor:x,borderColor:o,cursor:`not-allowed`,"&:first-child, &:hover":{color:b,backgroundColor:x,borderColor:o}},[`&-disabled${r}-button-wrapper-checked`]:{color:C,backgroundColor:S,borderColor:o,boxShadow:`none`},"&-block":{flex:1,textAlign:`center`}}}},Xt=Ae(`Radio`,e=>{let{controlOutline:t,controlOutlineWidth:n}=e,r=`0 0 0 ${L(n)} ${t}`,i=Oe(e,{radioFocusShadow:r,radioButtonFocusShadow:r});return[qt(i),Jt(i),Yt(i)]},e=>{let{wireframe:t,padding:n,marginXS:r,lineWidth:i,fontSizeLG:a,colorText:o,colorBgContainer:s,colorTextDisabled:c,controlItemBgActiveDisabled:l,colorTextLightSolid:u,colorPrimary:d,colorPrimaryHover:f,colorPrimaryActive:p,colorWhite:m}=e,h=a;return{radioSize:h,dotSize:t?h-8:h-(4+i)*2,dotColorDisabled:c,buttonSolidCheckedColor:u,buttonSolidCheckedBg:d,buttonSolidCheckedHoverBg:f,buttonSolidCheckedActiveBg:p,buttonBg:s,buttonCheckedBg:s,buttonColor:o,buttonCheckedBgDisabled:l,buttonCheckedColorDisabled:c,buttonPaddingInline:n-i,wrapperMarginInlineEnd:r,radioColor:t?d:m,radioBgColor:t?s:d}},{unitless:{radioSize:!0,dotSize:!0}}),Zt=function(e,t){var n={};for(var r in e)Obje
Line truncated
|
||||
${n}:not(${n}-disabled),
|
||||
${t}:not(${t}-disabled)
|
||||
`]:{[`&:hover ${t}-inner`]:{borderColor:e.colorPrimary}},[`${n}:not(${n}-disabled)`]:{[`&:hover ${t}-checked:not(${t}-disabled) ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:`transparent`},[`&:hover ${t}-checked:not(${t}-disabled):after`]:{borderColor:e.colorPrimaryHover}}},{[`${t}-checked`]:{[`${t}-inner`]:{backgroundColor:e.colorPrimary,borderColor:e.colorPrimary,"&:after":{opacity:1,transform:`rotate(45deg) scale(1) translate(-50%,-50%)`,transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack} ${e.motionDurationFast}`}}},[`
|
||||
${n}-checked:not(${n}-disabled),
|
||||
${t}-checked:not(${t}-disabled)
|
||||
`]:{[`&:hover ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:`transparent`}}},{[t]:{"&-indeterminate":{"&":{[`${t}-inner`]:{backgroundColor:`${e.colorBgContainer}`,borderColor:`${e.colorBorder}`,"&:after":{top:`50%`,insetInlineStart:`50%`,width:e.calc(e.fontSizeLG).div(2).equal(),height:e.calc(e.fontSizeLG).div(2).equal(),backgroundColor:e.colorPrimary,border:0,transform:`translate(-50%, -50%) scale(1)`,opacity:1,content:`""`}},[`&:hover ${t}-inner`]:{backgroundColor:`${e.colorBgContainer}`,borderColor:`${e.colorPrimary}`}}}}},{[`${n}-disabled`]:{cursor:`not-allowed`},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:`not-allowed`,pointerEvents:`none`},[`${t}-inner`]:{background:e.colorBgContainerDisabled,borderColor:e.colorBorder,"&:after":{borderColor:e.colorTextDisabled}},"&:after":{display:`none`},"& + span":{color:e.colorTextDisabled},[`&${t}-indeterminate ${t}-inner::after`]:{background:e.colorTextDisabled}}}]};function on(e,t){return an(Oe(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize}))}var sn=Ae(`Checkbox`,(e,{prefixCls:t})=>[on(t,e)]),cn=V.createContext(null),ln=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},un=V.forwardRef((e,t)=>{let{prefixCls:n,className:r,rootClassName:i,children:a,indeterminate:o=!1,style:s,onMouseEnter:c,onMouseLeave:l,skipGroup:u=!1,disabled:d}=e,f=ln(e,[`prefixCls`,`className`,`rootClassName`,`children`,`indeterminate`,`style`,`onMouseEnter`,`onMouseLeave`,`skipGroup`,`disabled`]),{getPrefixCls:p,direction:m,checkbox:h}=V.useContext(F),g=V.useContext(cn),{isFormItemInput:_}=V.useContext(Ee),v=V.useContext(Ce),y=(g?.disabled||d)??v,b=V.useRef(f.value),x=V.useRef(null),S=we(t,x);V.useEffect(()=>{g?.registerValue(f.value)},[]),V.useEffect(()=>{if(!u)return f.value!==b.current&&(g?.cancelValue(b.current),g?.registerValue(f.value),b.current=f.value),()=>g?.cancelValue(f.value)},[f.value]),V.useEffect(()=>{x.current?.input&&(x.current.input.indeterminate=o)},[o]);let C=p(`checkbox`,n),w=_e(C),[T,E,D]=sn(C,w),O=Object.assign({},f);g&&!u&&(O.onChange=(...e)=>{f.onChange&&f.onChange.apply(f,e),g.toggleOption&&g.toggleOption({label:a,value:f.value})},O.name=g.name,O.checked=g.value.includes(f.value));let k=(0,H.default)(`${C}-wrapper`,{[`${C}-rtl`]:m===`rtl`,[`${C}-wrapper-checked`]:O.checked,[`${C}-wrapper-disabled`]:y,[`${C}-wrapper-in-form-item`]:_},h?.className,r,i,D,w,E),A=(0,H.default)({[`${C}-indeterminate`]:o},ne,E),[j,ee]=Kt(O.onClick);return T(V.createElement(De,{component:`Checkbox`,disabled:y},V.createElement(`label`,{className:k,style:Object.assign(Object.assign({},h?.style),s),onMouseEnter:c,onMouseLeave:l,onClick:j},V.createElement(Gt,Object.assign({},O,{onClick:ee,prefixCls:C,className:A,disabled:y,ref:S})),a!=null&&V.createElement(`span`,{className:`${C}-label`},a))))}),dn=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},fn=V.forwardRef((e,t)=>{let{defaultValue:n,children:r,options:i=[],prefixCls:a,className:o,rootClassName:s,style:c,onChange:l}=e,u=dn(e,[`defaultValue`,`children`,`options`,`prefixCls`,`className`,`rootClassName`,`style`,`onChange`]),{getPrefixCls:d,direction:f}=V.useContext(F),[p,m]=V.useState(u.value||n||[]),[h,g]=V.useState([]);V.useEffect(()=>{`value`in u&&m(u.value||[])},[u.value]);let _=V.useMemo(()=>i.map(e=>typeof e==`string`||typeof e==`number`?{label:e,value:e}:e),[i]),v=e=>{g(t=>t.filter(t=>t!==e))},y=e=>{g(t=>[].concat(Pe(t),[e]))},b=e=>{let t=p.indexOf(e.value),n=Pe(p);t===-1?n.push(e.value):n.splice(t,1),`value`in u||m(n),l?.(n.filter(e=>h.includes(e)).sort((e,t)=>_.findIndex(t=>t.value===e)-_.findIndex(e=>e.value===t)))},x=d(`checkbox`,a),S=`${x}-group`,C=_e(x),[w,T,E]=sn(x,C),D=le(u,[`value`,`disabled`]),O=i.length?_.map(e=>V.createElement(un,{prefixCls:x,key:e.value.toString(),disabled:`disabled`in e?e.disabled:u.disabled,value:e.value,checked:p.includes(e.value),onChange:e.onChange,className:(0,H.default)(`${S}-item`,e.className),style:e.style,title:e.title,id:e.id,required:e.required},e.label)):r,k=V.useMemo(()=>({toggleOption:b,value:p,disabled:u.disabled,name:u.name,registerValue:y,cancelValue:v}),[b,p,u.disabled,u.name,y,v]),A=(0,H.default)(S,{[`${S}-rtl`]:f===`rtl`},o,s,E,C,T);return w(V.createElement(`div`,Object.assign({className:A,style:c},D,{ref:t}),V.createElement(cn.Provider,{value:k},O)))}),pn=un;pn.Group=fn,pn.__ANT_CHECKBOX=!0;var mn=tt,hn={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d
Line truncated
|
||||
0.58×(822+45)+55=558
|
||||
769+558=1327`,value:r,onChange:e=>i(e.target.value),onKeyDown:e=>{(e.metaKey||e.ctrlKey)&&e.key===`Enter`&&r.trim()&&(e.preventDefault(),s(!1))}}),(0,G.jsxs)(lt,{wrap:!0,style:{marginTop:8},children:[(0,G.jsx)(z,{type:`primary`,onClick:()=>s(!1),children:`识别并预填`}),a?.kind===`warning`&&(0,G.jsx)(z,{onClick:()=>s(!0),children:`按计算金额预填`}),r&&(0,G.jsx)(z,{onClick:()=>{i(``),o(null)},children:`清空公式`})]}),(0,G.jsx)(`p`,{className:`small muted`,children:`括号内是克工费;金价乘克重后加的是一件工费,再加的金额记为附加费。合计行只校验,不增加商品。客户、货盘及内部成本仍按实际填写。`}),a&&(0,G.jsx)(M,{role:`status`,type:a.kind===`note`?`success`:a.kind,message:a.title||(a.kind===`error`?a.lines[0]:``),description:a.kind===`error`?void 0:(0,G.jsx)(`div`,{children:a.lines.filter(Boolean).map((e,t)=>(0,G.jsx)(`p`,{children:e},t))})})]})}function cr({order:e,error:t,onRetry:n,onPreview:r,onNew:i}){let{message:a}=h.useApp(),[o,s]=(0,V.useState)(!1),c=e.total!==void 0;async function l(){if(e.paper_number)try{await navigator.clipboard.writeText(e.paper_number),s(!0),a.success(`已复制纸单号 `+e.paper_number),window.setTimeout(()=>s(!1),1800)}catch{s(!1),a.info(`请手动选择纸单号复制`)}}return(0,G.jsx)(`div`,{className:`issued-page`,children:(0,G.jsx)(ot,{className:`issued-card`,children:(0,G.jsx)(ee,{status:`success`,title:`销售单据已生成`,subTitle:c?e.materialCostPending?`收款、费用和出库已记账;料费待补,补足购料后自动核算利润。`:`收款、费用、出库和利润已记账。`:t||`正在读取已生成的销售单…`,extra:(0,G.jsxs)(lt,{direction:`vertical`,size:`large`,style:{width:`100%`},children:[c&&(0,G.jsxs)(`dl`,{className:`issued-summary`,"data-testid":`issued-summary`,children:[(0,G.jsxs)(`div`,{className:`issued-item`,children:[(0,G.jsx)(`dt`,{children:(0,G.jsx)(Ge.Text,{type:`secondary`,children:`纸单号`})}),(0,G.jsxs)(`dd`,{className:`issued-value-row`,children:[(0,G.jsx)(`span`,{className:`issued-value num`,"data-testid":`issued-paper-number`,children:e.paper_number||`未分配`}),e.paper_number&&(0,G.jsx)(Ke,{title:o?`已复制`:`复制纸单号`,children:(0,G.jsx)(z,{type:`text`,size:`small`,className:`issued-copy-btn`,"aria-label":`复制纸单号`,icon:o?(0,G.jsx)(Ve,{}):(0,G.jsx)(Ue,{}),onClick:()=>void l()})})]})]}),(0,G.jsxs)(`div`,{className:`issued-item`,children:[(0,G.jsx)(`dt`,{children:(0,G.jsx)(Ge.Text,{type:`secondary`,children:`成交合计`})}),(0,G.jsx)(`dd`,{className:`issued-value issued-total num`,"data-testid":`issued-total`,children:C(e.total??null,e.rounding_mode||`cent`)})]}),e.customer&&(0,G.jsxs)(`div`,{className:`issued-item`,children:[(0,G.jsx)(`dt`,{children:(0,G.jsx)(Ge.Text,{type:`secondary`,children:`客户`})}),(0,G.jsx)(`dd`,{className:`issued-value small`,children:e.customer})]})]}),(0,G.jsxs)(`div`,{className:`issued-actions`,children:[(0,G.jsx)(z,{type:`primary`,size:`large`,icon:(0,G.jsx)(Pn,{}),href:`/print/`+encodeURIComponent(e.id)+`?mode=full`,onClick:()=>{r().catch(e=>a.error(e.message))},target:`_blank`,rel:`noopener`,"data-action":`print-preview`,children:`打开打印预览`}),(0,G.jsx)(z,{size:`large`,icon:(0,G.jsx)(st,{}),onClick:i,"data-action":`new-order`,children:`开始新的一单`}),!c&&(0,G.jsx)(z,{size:`large`,onClick:n,children:`重新读取订单`})]}),(0,G.jsx)(z,{href:b(`orders`)+`?order=`+encodeURIComponent(e.id),onClick:t=>{t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||(t.preventDefault(),k(`orders`,{search:`?order=`+encodeURIComponent(e.id)}))},type:`link`,icon:(0,G.jsx)(gn,{}),children:`查看订单详情`})]})})})})}function lr(e){let{client:t,state:n}=e,r=E(`draft`),[i,a]=(0,V.useState)(r?null:{draft:_(window.localStorage,n.user.id),note:``});return(0,V.useEffect)(()=>{if(!r)return;let e=!0;return(async()=>{try{if(n.user.role!==`owner`)throw Error(`已有草稿由店主继续填写并开单;无单号的新开单流程照常使用。`);let i=await t.api(`/api/orders/`+encodeURIComponent(r));if(i.status!==`draft`)throw Error(`这张订单不是未开单的旧草稿,请在订单页查看。`);e&&a({draft:B.draftInputs(i),note:`正在继续填写旧草稿,生成销售单据后完成记账。`})}catch(t){e&&a({draft:_(window.localStorage,n.user.id),note:`旧草稿未能打开:`+t.message})}})(),()=>{e=!1}},[t,r,n.user.id,n.user.role]),i?(0,G.jsx)(ur,{...e,initialDraft:i.draft,initialNote:i.note}):(0,G.jsx)(`div`,{className:`page-loading`,children:(0,G.jsx)(y,{tip:`正在读取旧草稿…`,children:(0,G.jsx)(`div`,{style:{height:60}})})})}function ur({client:e,state:t,session:n,refreshState:r,onAccountChanged:i,onRecoverOther:a,initialDraft:o,initialNote:s}){let{message:c}=h.useApp();O(e);let{store:l,update:u,reset:d,ctx:f,poolError:p,loadPools:m}=Ze({client:e,state:t,session:n,initialDraft:o}),{form:g,summary:_}=l,[v,y]=(0,V.useState)(``),[C,w]=(0,V.useState)(!1),[T,E]=(0,V.useState)(null),D=T!=
Line truncated
|
||||
+1
@@ -0,0 +1 @@
|
||||
import{n as e}from"./rolldown-runtime-Dl_DZoUm.js";import{i as t,t as n}from"./react-1o5M9n0k.js";import{i as r,o as i}from"./shared-DZLPF0cC.js";import{n as a}from"./useOrderForm-Boa1k5nR.js";var o=e(t(),1),s=n();function c({label:e,name:t,value:n,type:r=`text`,hidden:i,help:a,onChange:o,...c}){return(0,s.jsxs)(`label`,{hidden:i,children:[e,(0,s.jsx)(`input`,{...c,name:t,type:r,value:n??``,onChange:e=>o?.(e.target.value),disabled:i||c.disabled}),a&&(0,s.jsx)(`small`,{className:`muted`,children:a})]})}function l({label:e,name:t,value:n,options:r,hidden:i,help:a,onChange:o,...c}){return(0,s.jsxs)(`label`,{hidden:i,children:[e,(0,s.jsx)(`select`,{...c,name:t,value:n??``,onChange:e=>o(e.target.value),disabled:i||c.disabled,children:r.map(e=>{let[t,n,r]=Array.isArray(e)?e:[e,e];return(0,s.jsx)(`option`,{value:t,disabled:!!r,children:n},t)})}),a]})}var u={type:`number`,step:`0.01`,min:`0`},d=`开单前必填,没有填0`;function f({index:e,line:t,state:n,ctx:r,form:o,update:f,reloadPools:p,error:m}){let h=i.lineVisibility(t,n),g=t.purchase,_=t.pool,v=_?.source===`pool`,y=`cost-`,b=t=>f(n=>i.updateLine(n,e,t(n.lines[e]))),x=e=>({name:e,value:t[e],onChange:t=>b(n=>i.setLineField(n,e,t))}),S=e=>({name:y+e,value:g[e],onChange:t=>b(n=>i.setPurchaseField(n,e,t))}),C=g?.costFundings?.labor,w=e=>i.memberOptions(n,!1,{selected:e});function T(e,t){b(n=>({...n,charges:n.charges.map((n,r)=>r===e?t(n):n)}))}return(0,s.jsxs)(`div`,{className:`line-item`,"data-legacy":t.legacy,children:[(0,s.jsxs)(`div`,{className:`panel-title`,children:[(0,s.jsxs)(`h3`,{children:[`商品 `,e+1]}),(0,s.jsx)(`button`,{type:`button`,"data-action":`remove-line`,onClick:()=>{try{f(t=>i.removeLine(t,e))}catch(e){m(e.message)}},children:`移除`})]}),(0,s.jsxs)(`div`,{className:`grid four`,children:[(0,s.jsx)(l,{label:`商品名称`,...x(`nameType`),options:[...i.productNames,`其他`]}),(0,s.jsx)(c,{label:`其他商品名称`,...x(`customName`),maxLength:60,hidden:!h.customName}),(0,s.jsx)(l,{label:`计价方式`,...x(`pricingMode`),options:[[`auto`,`按金价与工费计算`],[`manual`,`直接填写金额`]]}),(0,s.jsx)(l,{label:`单位`,...x(`unit`),options:[`g`,`件`]}),(0,s.jsx)(c,{label:`克重/数量`,...x(`quantity`),type:`number`,min:t.unit===`g`?`0.001`:`1`,step:t.unit===`g`?`0.001`:`1`,required:!0}),(0,s.jsx)(c,{label:`金价/银价(元/克)`,...u,...x(`goldPrice`),hidden:!h.goldPrice}),(0,s.jsx)(l,{label:`销售工费方式`,...x(`laborMode`),hidden:!h.laborMode,options:[[`gram`,`克工费`],[`piece`,`件工费`]]}),(0,s.jsx)(c,{label:`销售工费`,...u,...x(`laborRate`),hidden:!h.laborRate}),(0,s.jsx)(c,{label:`计工费件数`,type:`number`,min:`1`,step:`1`,...x(`pieces`),hidden:!h.pieces}),(0,s.jsx)(c,{label:`销售单价说明(客户可见)`,...x(`priceNote`),maxLength:100,hidden:!h.priceNote}),(0,s.jsx)(c,{label:`商品基础金额(不含附加项目)`,...x(`baseSale`),...u,required:!0,readOnly:!h.baseSale})]}),(0,s.jsxs)(`div`,{className:`sale-charges`,children:[(0,s.jsxs)(`div`,{className:`panel-title`,children:[(0,s.jsx)(`strong`,{children:`工费附加项目(选填)`}),(0,s.jsx)(`button`,{type:`button`,"data-action":`add-charge`,onClick:()=>f(t=>i.addCharge(t,e,a)),children:`+ 添加附加项目`})]}),t.charges.map((t,n)=>(0,s.jsxs)(`div`,{className:`charge-row grid four`,children:[(0,s.jsx)(l,{label:`附加项目`,name:`chargeType`,value:t.type,options:[...i.chargeNames,`其他`],onChange:e=>T(n,t=>i.changeChargeType(t,e))}),(0,s.jsx)(c,{label:`附加项目名称`,name:`chargeName`,value:t.customName,maxLength:60,hidden:t.type!==`其他`,onChange:e=>T(n,t=>({...t,customName:e}))}),(0,s.jsx)(c,{label:`附加金额(元)`,name:`chargeAmount`,...u,value:t.amount,onChange:e=>T(n,t=>i.setChargeAmount(t,e))}),(0,s.jsx)(`button`,{type:`button`,onClick:()=>b(e=>({...e,charges:e.charges.filter((e,t)=>t!==n)})),children:`移除项目`}),t.costRemoved&&(0,s.jsx)(`button`,{type:`button`,onClick:()=>f(t=>i.restoreChargeCost(t,e,n)),children:`恢复内部成本`})]},t.id))]}),(0,s.jsxs)(`div`,{className:`grid two`,children:[(0,s.jsx)(c,{label:`本行销售额(元,含附加项目)`,name:`sale`,type:`number`,value:t.sale,readOnly:!0}),(0,s.jsx)(`p`,{children:t.view.calculation})]}),(0,s.jsxs)(`div`,{className:`internal`,children:[(0,s.jsx)(`div`,{className:`internal-title`,children:`内部成本 · 客户单据不显示`}),(0,s.jsxs)(`div`,{className:`grid two`,children:[(0,s.jsx)(l,{label:`出库货盘(仅黄金)`,...x(`pocket`),options:i.pocketOptions(n,t.pocket,t.historicalPocket),disabled:t.unit!==`g`}),(0,s.jsx)(c,{label:`出库数量(对)`,...x(`stockCount`),type:`number`,min:`1`,max:`1000000000`,step:`1`,inputMode:`numeric`,required:h.stockCount&&!h.stockCountOptional,placeholder:`一对填1`,hidden:!h.stockCount,help:t.historicalPocket?`历史未记录对数,可保留空白;与计工费件数分别填写。`:`与计工费件数分别填写。`})]}),t.legacy?(0,s.jsxs)(s.Fragment,{children:Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{n as e}from"./rolldown-runtime-Dl_DZoUm.js";import{i as t,t as n}from"./react-1o5M9n0k.js";import{o as r}from"./shared-DZLPF0cC.js";import{n as i,o as a}from"./index-D-ox0wtk.js";import{a as o,c as s,i as c,l,n as u,o as d,r as f,s as p,t as m,u as h}from"./data-eE5dxIXS.js";var g=e(t(),1);function _(e,t,n){let i=new FormData(e),a=e=>String(i.get(e)||``),s=a(`kind`),c=a(`pocket`),l=a(`grams`).trim(),u=a(`to`),d=s===`adjustment`,p=r.activePocketKeys(t);if(!Object.hasOwn(o,s)||!p.includes(c)&&c!==n?.pocket)throw Error(`请选择库存动作和货盘。`);if(d&&t.user.role!==`owner`)throw Error(`对数调整由店主操作。`);if(!(n&&d?/^-?\d+(?:\.\d{1,3})?$/:/^\d+(?:\.\d{1,3})?$/).test(l)||!d&&Number(l)<=0)throw Error(n?`克重请填写有效数字,最多保留3位小数。`:`数量请填写大于0的数字,最多保留3位小数。`);if(s===`transfer`&&(u===c||!p.includes(u)&&u!==n?.to))throw Error(`平移请选择两个不同的货盘。`);if(d&&n?.kind!==`adjustment`&&(!r.pocketCountsEnabled(t,c)||Number(l)!==0))throw Error(`只调整对数请选择已启用对数的货盘,克重保留0。`);let m=r.pocketCountsEnabled(t,c)||s===`transfer`&&r.pocketCountsEnabled(t,u),h=!!n&&n.stockCount==null&&c===n.pocket&&(s!==`transfer`||u===n.to)&&Number(l)!==0;return{kind:s,date:a(`date`),pocket:c,grams:l,note:n?a(`note`).trim():a(`note`),...n?{reason:a(`reason`).trim()}:{},...s===`transfer`?{to:u}:{},...m?{stockCount:f(a(`stockCount`),d,h)}:{}}}var v=n();function y({state:e,original:t,onDate:n}){let i=r.activePocketKeys(e),[a,s]=(0,g.useState)(t?.kind||`increase`),[c,l]=(0,g.useState)(t?.pocket||(i.includes(`现货`)?`现货`:i[0])||``),u=t?t.to||i.find(e=>e!==c):i.includes(`金料`)?`金料`:i[0],[d,f]=(0,g.useState)(u||``),[p,m]=(0,g.useState)(t?.grams||``),h=a===`transfer`,_=a===`adjustment`,y=_&&(t?.kind!==`adjustment`||Number(t.grams)===0),b=r.pocketCountsEnabled(e,c)||h&&r.pocketCountsEnabled(e,d),x=!!t&&t.stockCount==null&&t.pocket===c&&(!h||t.to===d),S=n=>r.pocketOptions(e,n,!!t).filter(([e])=>e!==``).map(([e,t,n])=>(0,v.jsx)(`option`,{value:e,disabled:n,children:t},e)),C=(0,v.jsxs)(`label`,{children:[`业务日期`,(0,v.jsx)(`input`,{name:`date`,type:`date`,defaultValue:t?.date||e.today,max:e.today,required:!0,onChange:e=>n?.(e.target.value)})]});return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsxs)(`div`,{className:`stock-entry-fields`,children:[t&&C,(0,v.jsxs)(`label`,{children:[t?`类型`:`动作`,(0,v.jsx)(`select`,{name:`kind`,value:a,onChange:e=>s(e.target.value),children:Object.entries(o).filter(([n])=>n!==`adjustment`||e.user.role===`owner`||t?.kind===n).map(([e,n])=>(0,v.jsx)(`option`,{value:e,children:e===`adjustment`&&!t?`只调整对数`:n},e))})]}),(0,v.jsxs)(`label`,{children:[(0,v.jsx)(`span`,{"data-stock-pocket-label":!0,children:h?`从哪移出`:`货盘`}),(0,v.jsx)(`select`,{name:`pocket`,value:c,onChange:e=>l(e.target.value),children:S(t?.pocket)})]}),(0,v.jsxs)(`label`,{"data-stock-to":!0,hidden:!h,children:[`移到哪`,(0,v.jsx)(`select`,{name:`to`,value:d,disabled:!h,required:h,onChange:e=>f(e.target.value),children:S(t?.to)})]}),(0,v.jsxs)(`label`,{children:[t?`克重(g)`:`数量(g)`,(0,v.jsx)(`input`,{name:`grams`,type:`number`,required:!0,min:y?`0`:_?`-100000000`:`0.001`,step:`0.001`,inputMode:`decimal`,placeholder:t?void 0:`填写正数`,value:y?`0`:p,readOnly:y,onChange:e=>m(e.target.value)})]}),(0,v.jsxs)(`label`,{"data-stock-count-field":!0,hidden:!b,children:[`库存数量(对)`,(0,v.jsx)(`input`,{name:`stockCount`,type:`number`,defaultValue:t?.stockCount??``,min:_?`-1000000000`:`1`,max:`1000000000`,step:`1`,inputMode:`numeric`,disabled:!b,required:b&&!x,placeholder:_?`增加填正数,减少填负数`:`一对填1`}),t&&t.stockCount==null&&(0,v.jsx)(`small`,{children:`历史未记录对数,可保留空白。`})]}),!t&&C]}),!t&&(0,v.jsx)(`p`,{"data-stock-count-note":!0,hidden:!b||!h&&!_,children:_?`只修正已盘点的对数,不改变克重。增加填正整数,减少填负整数。`:`平移涉及对数货盘时填写本次实际对数;两边都记录对数时同步增减相同数量。`}),(0,v.jsxs)(`label`,{children:[`备注(选填)`,(0,v.jsx)(`input`,{name:`note`,type:`text`,maxLength:200,defaultValue:t?.note||``,placeholder:t?void 0:`可填写来源或原因`})]}),!t&&(0,v.jsx)(`button`,{className:`primary`,id:`stock-submit`,disabled:!i.length,children:_?`保存对数调整`:`登记`+o[a]})]})}function b({client:e,state:t,blocked:n,reload:r}){let[i,a]=(0,g.useState)(``);async function o(n){n.preventDefault();try{let i=_(n.currentTarget,t);await e.mutate(`/api/stock`,i),r()}catch(e){a(e.message)}}return(0,v.jsxs)(`section`,{className:`panel stock-entry`,children:[(0,v.jsx)(`h2`,{children:`登记库存变动`}),(0,v.jsx)(`p`,{children:`销售与退货会随订单自动记账,无需重复登记。启用对数的货盘同时记录克重与对数。`}),(0,v.jsxs)(`form`,{id:`stock-form`,onSubmit:o,onChange:()=>a(``),children:[(0,v.jsx)(`fiel
Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
.inventory-page{color:var(--ink,#233832);min-width:0}.inventory-page [hidden]{display:none!important}.inventory-page h1,.inventory-page h2,.inventory-page h3{margin:0}.inventory-page h1{font-size:clamp(1.9rem,4vw,3rem)}.inventory-page p{color:var(--muted,#596963);line-height:1.55}.inventory-page .panel,.inventory-page .stock-card,.inventory-page .stock-review-status{background:var(--surface,#fff);border:1px solid var(--line,#dce4df);border-radius:12px;margin-block:14px;padding:18px}.inventory-page .stock-cards{grid-template-columns:repeat(auto-fit,minmax(min(160px,100%),1fr));gap:10px;display:grid}.inventory-page .stock-card{margin:0}.inventory-page .stock-card strong{font-size:1.6rem}.inventory-page .stock-card .yesterday{border-top:1px solid #dce4df;gap:4px;margin-top:12px;padding-top:10px;display:grid}.inventory-page .panel-title,.inventory-page .actions,.inventory-page .form-actions,.inventory-page .stock-history-filters{flex-wrap:wrap;align-items:center;gap:10px;display:flex}.inventory-page .panel-title{justify-content:space-between}.inventory-page .stock-entry-fields{grid-template-columns:repeat(auto-fit,minmax(min(135px,100%),1fr));gap:12px;display:grid}.inventory-page label{align-content:start;gap:5px;margin-block:8px;display:grid}.inventory-page label:has([type=checkbox]){align-items:center;display:flex}.inventory-page input,.inventory-page select,.inventory-page textarea,.inventory-page button{font:inherit}.inventory-page input:not([type=checkbox]),.inventory-page select,.inventory-page textarea{width:100%;min-width:0;color:inherit;box-sizing:border-box;background:#fff;border:1px solid #b9c6bf;border-radius:6px;padding:8px}.inventory-page fieldset{border:0;min-width:0;margin:0;padding:0}.inventory-page button{cursor:pointer;color:inherit;background:#fff;border:1px solid #b9c6bf;border-radius:7px;margin:2px;padding:7px 12px}.inventory-page button:disabled{cursor:default;opacity:.48}.inventory-page .primary,.inventory-page button[aria-pressed=true]{color:#fff;background:#254f46}.inventory-page .table-wrap{overflow:auto}.inventory-page table{border-collapse:collapse;text-align:left;width:100%}.inventory-page td,.inventory-page th{vertical-align:top;border-bottom:1px solid #dde4df;padding:9px}.inventory-page th{white-space:nowrap}.inventory-page dialog{width:100%;max-width:min(720px,94vw);max-height:86dvh;color:inherit;box-sizing:border-box;border:1px solid #dce4df;border-radius:13px;padding:24px;position:fixed;overflow:auto}.inventory-page dialog::backdrop{background:#18332b55}.inventory-page .dialog-close{float:right}.inventory-page .error{color:#9a372c}.inventory-page .inventory-change-comparison{grid-template-columns:repeat(auto-fit,minmax(min(175px,100%),1fr));gap:12px;display:grid}.inventory-page dl div{gap:10px;display:flex}.inventory-page dd{margin:0}
|
||||
@@ -0,0 +1 @@
|
||||
import{n as e}from"./rolldown-runtime-Dl_DZoUm.js";import{i as t,t as n}from"./react-1o5M9n0k.js";import{c as r,i,o as a,t as o}from"./shared-DZLPF0cC.js";import{t as s}from"./controls-BREhiQGx.js";import{i as c,t as l}from"./EditFields-DxbwVQgn.js";var u=e(t(),1),d=n(),{yuan:f,grams:p,validateOrderIdentity:m}=a,h={jd:`shipping`,yt:`shipping`,box:`box`,steel:`braiding`,silver:`silverChain`},g=r.validDate;function _(e){try{return o.cents(String(e),`成本`)}catch{return String(e??``)}}function v(e,t){return e.priceLock.lines?.[t]||e.priceLock}function y(e,t){return e.lines[t].price_lock_material||(e.lines.length===1?e.price_lock_material:null)}function b(e,t){return e.lines[t].price_lock_extra_material||(e.lines.length===1?e.price_lock_extra_material:null)}function x(e){if(e?.lines?.length>1)return{date:e.date,fees_date:e.fees_date,fee_cost_mode:e.fee_cost_mode||`legacy`,lines:e.lines.map((t,n)=>({lineId:t.lineId,...x({lines:[t],price_lock_material:y(e,n),price_lock_extra_material:b(e,n),fee_items:[]})})),fees:x({...e,lines:[]}).fees};let t=e?.lines?.[0]||{},n=e?.price_lock_material||{},r=e?.price_lock_extra_material;return{date:e?.date,fees_date:e?.fees_date,fee_cost_mode:e?.fee_cost_mode||`legacy`,material:n.source===`pool`?{source:`pool`}:{source:n.source,rate:_(n.rate),payer:n.payer},extra:r?{...r.source===`pool`?{source:`pool`}:{},rate:_(r.rate),payer:r.payer}:null,costs:{labor:_(t.costParts?.labor),accessories:_(t.costParts?.accessories),other:_(t.costParts?.other),payer:t.payer,laborPayer:t.costPayers?.labor,laborMode:t.costLabor?.mode||`total`,...t.costLabor?.mode===`gram`?{laborRate:_(t.costLabor.rate)}:{}},fees:(e?.fee_items||[]).map(t=>({key:t.key,expense_id:t.expense_id||``,date:t.date||e.fees_date,note:t.note,payer:t.payer,amount:_(t.amount),funding:t.funding??null})).sort((e,t)=>String(e.key).localeCompare(String(t.key)))}}function S(e,t=e?.inputs){return JSON.stringify(x(t))!==JSON.stringify(x(e?.originalInputs))}function C(e,t){return o.purchaseCosts({unit:`g`,quantity:p(e),costParts:{material:`0`,labor:`0`,accessories:`0`,other:`0`},costMaterial:{mode:`gram`,rate:t},costLabor:{mode:`total`}}).parts.material}function w(e,t){if(e.lines.length>1){let n={material:0,labor:0,accessories:0,other:0,fees:e.fee_items.reduce((e,t)=>e+o.cents(t.amount,`实际费用`),0)};return e.lines.forEach((r,i)=>{let a=t.originalInputs,o=v(t,i),s=w({...e,lines:[r],price_lock_material:y(e,i),price_lock_extra_material:b(e,i),fee_items:[]},{...t,originalInputs:{...a,lines:[a.lines[i]],price_lock_material:y(a,i),price_lock_extra_material:b(a,i)},priceLock:{...t.priceLock,...o},order:{...t.order,lines:[t.order.lines[i]]}});for(let e of[`material`,`labor`,`accessories`,`other`])n[e]+=s[e]}),n.total=Object.values(n).reduce((e,t)=>e+t,0),n.profit=t.order.total-n.total,n}let n=t.originalInputs,r=e.lines[0],i=t.priceLock.extraMg,a=t.order.lines[0].quantity-i,s=i?n.price_lock_extra_material.source===`pool`?n.price_lock_extra_material.amount:C(i,n.price_lock_extra_material.rate):0,c=e.price_lock_material.source===`pool`?o.cents(n.lines[0].costParts.material,`原料费`)-s:C(a,e.price_lock_material.rate),l=i?e.price_lock_extra_material.source===`pool`?n.price_lock_extra_material.amount:C(i,e.price_lock_extra_material.rate):0;if(!Number.isSafeInteger(c)||c<0||!Number.isSafeInteger(l))throw Error(`原锁料费尚未完整,请核对原料价与补重料价。`);let u={material:c+l,labor:o.cents(r.costParts.labor,`进货工费`),accessories:o.cents(r.costParts.accessories,`配件成本`),other:o.cents(r.costParts.other,`其他货品成本`),fees:e.fee_items.reduce((e,t)=>e+o.cents(t.amount,`实际费用`),0)};return u.total=Object.values(u).reduce((e,t)=>e+t,0),u.profit=t.order.total-u.total,u}function T(e){return e==null?`待补采购`:f(e)}function E(e,t,n){if(e.lines.length>1){if(e.lines.length!==t.order.lines.length)throw Error(`商品成本资料未完整读到,请重新读取订单。`);e.lines.forEach((r,i)=>{let a=v(t,i);if(r.lineId!==(a.lineId||a.id))throw Error(`锁价商品身份已变化,请重新读取订单。`);E({...e,lines:[r],price_lock_material:y(e,i),price_lock_extra_material:b(e,i),fee_items:[]},{...t,priceLock:{...t.priceLock,...a}},n)});for(let t of e.fee_items)if(o.cents(t.amount,`实际费用`),!a.memberKeys(n).includes(t.payer))throw Error(`请选择每笔实际费用的付款人。`);return{...e,...m({customer:e.customer,salesperson:e.salesperson,note:e.note,internal_note:e.internal_note})}}if(!g(e.date)||e.date<t.priceLock.date||e.date>n.today)throw Error(`交付日期请选择原锁日期至今天之间的有效日期。`);let r=e.price_lock_material,i=e.price_lock_extra_material,s=e.lines[0];if(!r||![`pool`,`manual`].includes(r.source)||r.source===`pool`&&t.priceLock.materialSource!==`pool`||r.source===`manual`&&t.priceLock.materialSource===`pool`&&!t.priceLock.canSwitchToManual)throw Error(`原锁料费来源已变化,请重新读取锁价单。`);if(r.source===`manual`){if(o.cents(r.rate,`Line truncated
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
import{n as e}from"./rolldown-runtime-Dl_DZoUm.js";import{i as t,r as n}from"./react-1o5M9n0k.js";import{B as r,C as i,Cn as a,D as o,Dn as s,En as c,G as l,Gt as u,J as d,L as f,M as p,N as m,Nt as h,O as g,St as _,Tn as v,Tt as y,Ut as b,V as x,Vt as S,Y as C,Z as w,Zt as T,_t as E,b as D,bn as O,bt as k,dn as A,dt as j,en as M,f as N,ft as P,gn as F,hn as ee,ht as te,i as I,jt as ne,ln as re,lt as L,mt as R,n as z,nn as B,nt as V,qt as H,rn as U,tn as W,un as G,ut as ie,vn as ae,wn as K,xn as q,z as oe}from"./skeleton-B4Z0R3jQ.js";import{_ as se,b as ce,g as le,h as ue,v as de,x as fe,y as pe}from"./typography-xRg_3Gco.js";import{i as me,n as he,r as ge}from"./style-CBKkTdLU.js";import{a as J,c as Y,i as _e,l as ve,o as ye,s as be,u as xe}from"./input-BnsACfRy.js";var X=e(t()),Se=e(n()),Z=e(s()),Ce=e=>typeof e==`object`&&!!e&&e.nodeType===1,we=(e,t)=>(!t||e!==`hidden`)&&e!==`visible`&&e!==`clip`,Q=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){let n=getComputedStyle(e,null);return we(n.overflowY,t)||we(n.overflowX,t)||(e=>{let t=(e=>{if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch{return null}})(e);return!!t&&(t.clientHeight<e.scrollHeight||t.clientWidth<e.scrollWidth)})(e)}return!1},Te=(e,t,n,r,i,a,o,s)=>a<e&&o>t||a>e&&o<t?0:a<=e&&s<=n||o>=t&&s>=n?a-e-r:o>t&&s<n||a<e&&s>n?o-t+i:0,Ee=e=>e.parentElement??(e.getRootNode().host||null),De=(e,t)=>{if(typeof document>`u`)return[];let{scrollMode:n,block:r,inline:i,boundary:a,skipOverflowHiddenElements:o}=t,s=typeof a==`function`?a:e=>e!==a;if(!Ce(e))throw TypeError(`Invalid target`);let c=document.scrollingElement||document.documentElement,l=[],u=e;for(;Ce(u)&&s(u);){if(u=Ee(u),u===c){l.push(u);break}u!=null&&u===document.body&&Q(u)&&!Q(document.documentElement)||u!=null&&Q(u,o)&&l.push(u)}let d=window.visualViewport?.width??innerWidth,f=window.visualViewport?.height??innerHeight,{scrollX:p,scrollY:m}=window,{height:h,width:g,top:_,right:v,bottom:y,left:b}=e.getBoundingClientRect(),{top:x,right:S,bottom:C,left:w}=(e=>{let t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e),T=r===`start`||r===`nearest`?_-x:r===`end`?y+C:_+h/2-x+C,E=i===`center`?b+g/2-w+S:i===`end`?v+S:b-w,D=[];for(let e=0;e<l.length;e++){let t=l[e],{height:a,width:o,top:s,right:u,bottom:x,left:S}=t.getBoundingClientRect();if(n===`if-needed`&&_>=0&&b>=0&&y<=f&&v<=d&&(t===c&&!Q(t)||_>=s&&y<=x&&b>=S&&v<=u))return D;let C=getComputedStyle(t),w=parseInt(C.borderLeftWidth,10),O=parseInt(C.borderTopWidth,10),k=parseInt(C.borderRightWidth,10),A=parseInt(C.borderBottomWidth,10),j=0,M=0,N=`offsetWidth`in t?t.offsetWidth-t.clientWidth-w-k:0,P=`offsetHeight`in t?t.offsetHeight-t.clientHeight-O-A:0,F=`offsetWidth`in t?t.offsetWidth===0?0:o/t.offsetWidth:0,ee=`offsetHeight`in t?t.offsetHeight===0?0:a/t.offsetHeight:0;if(c===t)j=r===`start`?T:r===`end`?T-f:r===`nearest`?Te(m,m+f,f,O,A,m+T,m+T+h,h):T-f/2,M=i===`start`?E:i===`center`?E-d/2:i===`end`?E-d:Te(p,p+d,d,w,k,p+E,p+E+g,g),j=Math.max(0,j+m),M=Math.max(0,M+p);else{j=r===`start`?T-s-O:r===`end`?T-x+A+P:r===`nearest`?Te(s,x,a,O,A+P,T,T+h,h):T-(s+a/2)+P/2,M=i===`start`?E-S-w:i===`center`?E-(S+o/2)+N/2:i===`end`?E-u+k+N:Te(S,u,o,w,k+N,E,E+g,g);let{scrollLeft:e,scrollTop:n}=t;j=ee===0?0:Math.max(0,Math.min(n+j/ee,t.scrollHeight-a/ee+P)),M=F===0?0:Math.max(0,Math.min(e+M/F,t.scrollWidth-o/F+N)),T+=n-j,E+=e-M}D.push({el:t,top:j,left:M})}return D},Oe=e=>!1===e?{block:`end`,inline:`nearest`}:(e=>e===Object(e)&&Object.keys(e).length!==0)(e)?e:{block:`start`,inline:`nearest`};function ke(e,t){if(!e.isConnected||!(e=>{let t=e;for(;t&&t.parentNode;){if(t.parentNode===document)return!0;t=t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}return!1})(e))return;let n=(e=>{let t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e);if((e=>typeof e==`object`&&typeof e.behavior==`function`)(t))return t.behavior(De(e,t));let r=typeof t==`boolean`||t==null?void 0:t.behavior;for(let{el:i,top:a,left:o}of De(e,Oe(t))){let e=a-n.top+n.bottom,t=o-n.left+n.right;i.scroll({top:e,left:t,behavior:r})}}var Ae=()=>X.useReducer(e=>e+1,0),je=e=>({[e.componentCls]:{[`${e.antCls}-motion-collapse-legacy`]:{overflow:`hidden`,"&-active":{transition:`height ${e.motionDurationMid} ${e.motionEaseInOut},
|
||||
opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`}},[`${e.antCls}-motion-collapse`]:{overflow:`hidden`,transition:`height ${e.motionDurationMid} ${e.motionEaseInOut},
|
||||
opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`}}}),Me=new b(`antMoveDownIn`,{"0%":{transform:`translate3d(0, 100%, 0)`,transformOrigin:`0 0`,opacity:0},"100%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1}}),Ne=new b(`antMoveDownOut`,{"0%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1},"100%":{transform:`translate3d(0, 100%, 0)`,transformOrigin:`0 0`,opacity:0}}),Pe=new b(`antMoveLeftIn`,{"0%":{transform:`translate3d(-100%, 0, 0)`,transformOrigin:`0 0`,opacity:0},"100%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1}}),Fe=new b(`antMoveLeftOut`,{"0%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1},"100%":{transform:`translate3d(-100%, 0, 0)`,transformOrigin:`0 0`,opacity:0}}),Ie=new b(`antMoveRightIn`,{"0%":{transform:`translate3d(100%, 0, 0)`,transformOrigin:`0 0`,opacity:0},"100%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1}}),Le=new b(`antMoveRightOut`,{"0%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1},"100%":{transform:`translate3d(100%, 0, 0)`,transformOrigin:`0 0`,opacity:0}}),Re={"move-up":{inKeyframes:new b(`antMoveUpIn`,{"0%":{transform:`translate3d(0, -100%, 0)`,transformOrigin:`0 0`,opacity:0},"100%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1}}),outKeyframes:new b(`antMoveUpOut`,{"0%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1},"100%":{transform:`translate3d(0, -100%, 0)`,transformOrigin:`0 0`,opacity:0}})},"move-down":{inKeyframes:Me,outKeyframes:Ne},"move-left":{inKeyframes:Pe,outKeyframes:Fe},"move-right":{inKeyframes:Ie,outKeyframes:Le}},ze=(e,t)=>{let{antCls:n}=e,r=`${n}-${t}`,{inKeyframes:a,outKeyframes:o}=Re[t];return[i(r,a,o,e.motionDurationMid),{[`
|
||||
${r}-enter,
|
||||
${r}-appear
|
||||
`]:{opacity:0,animationTimingFunction:e.motionEaseOutCirc},[`${r}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]};function Be(e){return t=>X.createElement(me,{theme:{token:{motion:!1,zIndexPopupBase:0}}},X.createElement(e,Object.assign({},t)))}var Ve=(e,t,n,r,i)=>Be(a=>{let{prefixCls:o,style:s}=a,c=X.useRef(null),[l,u]=X.useState(0),[d,f]=X.useState(0),[p,m]=te(!1,{value:a.open}),{getPrefixCls:h}=X.useContext(_),g=h(r||`select`,o);X.useEffect(()=>{if(m(!0),typeof ResizeObserver<`u`){let e=new ResizeObserver(e=>{let t=e[0].target;u(t.offsetHeight+8),f(t.offsetWidth)}),t=setInterval(()=>{let n=i?`.${i(g)}`:`.${g}-dropdown`,r=c.current?.querySelector(n);r&&(clearInterval(t),e.observe(r))},10);return()=>{clearInterval(t),e.disconnect()}}},[g]);let v=Object.assign(Object.assign({},a),{style:Object.assign(Object.assign({},s),{margin:0}),open:p,visible:p,getPopupContainer:()=>c.current});n&&(v=n(v)),t&&Object.assign(v,{[t]:{overflow:{adjustX:!1,adjustY:!1}}});let y={paddingBottom:l,position:`relative`,minWidth:d};return X.createElement(`div`,{ref:c,style:y},X.createElement(e,Object.assign({},v)))}),He=function(e){var t=e.className,n=e.customizeIcon,r=e.customizeIconProps,i=e.children,a=e.onMouseDown,o=e.onClick,s=typeof n==`function`?n(r):n;return X.createElement(`span`,{className:t,onMouseDown:function(e){e.preventDefault(),a?.(e)},style:{userSelect:`none`,WebkitUserSelect:`none`},unselectable:`on`,onClick:o,"aria-hidden":!0},s===void 0?X.createElement(`span`,{className:(0,Z.default)(t.split(/\s+/).map(function(e){return`${e}-icon`}))},i):s)},Ue=function(e,t,n,r,i){var a=arguments.length>5&&arguments[5]!==void 0&&arguments[5],o=arguments.length>6?arguments[6]:void 0,s=arguments.length>7?arguments[7]:void 0,c=X.useMemo(function(){if(v(r)===`object`)return r.clearIcon;if(i)return i},[r,i]);return{allowClear:X.useMemo(function(){return!(a||!r||!n.length&&!o||s===`combobox`&&o===``)},[r,a,n.length,o,s]),clearIcon:X.createElement(He,{className:`${e}-clear`,onMouseDown:t,customizeIcon:c},`×`)}},We=X.createContext(null);function Ge(){return X.useContext(We)}function Ke(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,t=X.useState(!1),n=W(t,2),r=n[0],i=n[1],a=X.useRef(null),o=function(){window.clearTimeout(a.current)};return X.useEffect(function(){return o},[]),[r,function(t,n){o(),a.current=window.setTimeout(function(){i(t),n&&n()},e)},o]}function qe(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,t=X.useRef(null),n=X.useRef(null);X.useEffect(function(){return function(){window.clearTimeout(n.current)}},[]);function r(r){(r||t.current===null)&&(t.current=r),window.clearTimeout(n.current),n.current=window.setTimeout(function(){t.current=null},e)}return[function(){return t.current},r]}function Je(e,t,n,r){var i=X.useRef(null);i.current={open:t,triggerOpen:n,customizedTrigger:r},X.useEffect(function(){function t(t){var n;if(!((n=i.current)!=null&&n.customizedTrigger)){var r=t.target;r.shadowRoot&&t.composed&&(r=t.composedPath()[0]||r),i.current.open&&e().filter(function(e){return e}).every(function(e){return!e.contains(r)&&e!==r})&&i.current.triggerOpen(!1)}}return window.addEventListener(`mousedown`,t),function(){return window.removeEventListener(`mousedown`,t)}},[])}function Ye(e){return e&&![r.ESC,r.SHIFT,r.BACKSPACE,r.TAB,r.WIN_KEY,r.ALT,r.META,r.WIN_KEY_RIGHT,r.CTRL,r.SEMICOLON,r.EQUALS,r.CAPS_LOCK,r.CONTEXT_MENU,r.F1,r.F2,r.F3,r.F4,r.F5,r.F6,r.F7,r.F8,r.F9,r.F10,r.F11,r.F12].includes(e)}function $(e,t,n){var r=O(O({},e),n?t:{});return Object.keys(t).forEach(function(n){var i=t[n];typeof i==`function`&&(r[n]=function(){var t,r=[...arguments];return i.apply(void 0,r),(t=e[n])?.call.apply(t,[e].concat(r))})}),r}var Xe=[`prefixCls`,`id`,`inputElement`,`autoFocus`,`autoComplete`,`editable`,`activeDescendantId`,`value`,`open`,`attrs`],Ze=X.forwardRef(function(e,t){var n=e.prefixCls,r=e.id,i=e.inputElement,a=e.autoFocus,o=e.autoComplete,s=e.editable,c=e.activeDescendantId,l=e.value,u=e.open,d=e.attrs,f=T(e,Xe),p=i||X.createElement(`input`,null),m=p,h=m.ref,g=m.props;return`maxLength`in p.props,p=X.cloneElement(p,O(O(O({type:`search`},$(f,g,!0)),{},{id:r,ref:A(t,h),autoComplete:o||`off`,autoFocus:a,className:(0,Z.default)(`${n}-selection-search-input`,g?.className),role:`combobox`,"aria-expanded":u||!1,"aria-haspopup":`listbox`,"aria-owns":`${r}_list`,"aria-autocomplete":`list`,"aria-controls":`${r}_list`,"aria-activedescendant":u?c:void 0},d),{},{value:s?l:``,readOnly:!s,unselectable:s?null:`on`,style:O(O({},g.style),{},{opacity:s?null:0})})),p});function Qe(e){return Array.isArray(e)?e:e===void 0?[]:[e]}var $e=typeof window<`u`&&window.document&&window.document.documentElement;function et(e){return e!=null}function tt(e){return!e&&e!==0}function nt(e){return[`string`,`number`].includes(v(e))}function rt(e){var t=void 0;return e&&(nt(e.title)?t=e.title.toString():nt(e.label)&&(t=e.label.toString())),t}function it(e,t){$e?X.useLayoutEffect(e,t):X.useEffect(e,t)}function
Line truncated
|
||||
`,`\r
|
||||
`].includes(e)})},[F]),et=X.useContext(yt)||{},tt=et.maxCount,nt=et.rawValues,rt=function(e,t,n){if(!(J&&mt(tt)&&nt?.size>=tt)){var r=!0,i=e;k?.(null);var a=vt(e,F,mt(tt)?tt-nt.size:void 0),o=n?null:a;return v!==`combobox`&&o&&(i=``,P?.(o),Qe(!1),r=!1),N&&Me!==i&&N(i,{source:t?`typing`:`effect`}),r}},it=function(e){e&&e.trim()&&N(e,{source:`submit`})};X.useEffect(function(){!$&&!J&&v!==`combobox`&&rt(``,!1,!1)},[$]),X.useEffect(function(){Ge&&y&&Ye(!1),y&&!Ee.current&&Ae(!1)},[y]);var at=qe(),ot=W(at,2),st=ot[0],ct=ot[1],ut=X.useRef(!1),dt=function(e){var t=st(),n=e.key,r=n===`Enter`;if(r&&(v!==`combobox`&&e.preventDefault(),$||Qe(!0)),ct(!!Me),n===`Backspace`&&!t&&J&&!Me&&f.length){for(var i=U(f),a=null,o=i.length-1;o>=0;--o){var s=i[o];if(!s.disabled){i.splice(o,1),a=s;break}}a&&p(i,{type:`remove`,values:[a]})}var c=[...arguments].slice(1);if($&&(!r||!ut.current)){var l;r&&(ut.current=!0),(l=Te.current)==null||l.onKeyDown.apply(l,[e].concat(c))}me?.apply(void 0,[e].concat(c))},pt=function(e){var t=[...arguments].slice(1);if($){var n;(n=Te.current)==null||n.onKeyUp.apply(n,[e].concat(t))}e.key===`Enter`&&(ut.current=!1),pe?.apply(void 0,[e].concat(t))},ht=function(e){p(f.filter(function(t){return t!==e}),{type:`remove`,values:[e]})},gt=function(){ut.current=!1},_t=X.useRef(!1),wt=function(){Ae(!0),y||(de&&!_t.current&&de.apply(void 0,arguments),ue.includes(`focus`)&&Qe(!0)),_t.current=!0},Tt=function(){Ee.current=!0,Ae(!1,function(){_t.current=!1,Ee.current=!1,Qe(!1)}),y||(Me&&(v===`tags`?N(Me,{source:`submit`}):v===`multiple`&&N(``,{source:`blur`})),fe&&fe.apply(void 0,arguments))},Et=[];X.useEffect(function(){return function(){Et.forEach(function(e){return clearTimeout(e)}),Et.splice(0,Et.length)}},[]);var Dt=function(e){var t=e.target,n=we.current?.getPopupElement();if(n&&n.contains(t)){var r=setTimeout(function(){var e=Et.indexOf(r);if(e!==-1&&Et.splice(e,1),je(),!be&&!n.contains(document.activeElement)){var t;(t=Q.current)==null||t.focus()}});Et.push(r)}var i=[...arguments].slice(1);he?.apply(void 0,[e].concat(i))},Ot=X.useState({}),kt=W(Ot,2)[1];function At(){kt({})}var jt;Pe&&(jt=function(e){Qe(e)}),Je(function(){return[Se.current,we.current?.getPopupElement()]},Ze,Qe,!!Pe);var Mt=X.useMemo(function(){return O(O({},e),{},{notFoundContent:g,open:$,triggerOpen:Ze,id:r,showSearch:Y,multiple:J,toggleOpen:Qe})},[e,g,Ze,$,r,Y,J,Qe]),Nt=!!re||b,Pt;Nt&&(Pt=X.createElement(He,{className:(0,Z.default)(`${i}-arrow`,q({},`${i}-arrow-loading`,b)),customizeIcon:re,customizeIconProps:{loading:b,searchValue:Me,open:$,focused:ke,showSearch:Y}}));var Ft=Ue(i,function(){var e;_?.(),(e=Q.current)==null||e.focus(),p([],{type:`clear`,values:f}),rt(``,!1,!1)},f,I,L,y,Me,v),It=Ft.allowClear,Lt=Ft.clearIcon,Rt=X.createElement(R,{ref:Te}),zt=(0,Z.default)(i,a,q(q(q(q(q(q(q(q(q(q({},`${i}-focused`,ke),`${i}-multiple`,J),`${i}-single`,!J),`${i}-allow-clear`,I),`${i}-show-arrow`,Nt),`${i}-disabled`,y),`${i}-loading`,b),`${i}-open`,$),`${i}-customize-input`,Ne),`${i}-show-search`,Y)),Bt=X.createElement(ft,{ref:we,disabled:y,prefixCls:i,visible:Ze,popupElement:Rt,animation:z,transitionName:B,dropdownStyle:V,dropdownClassName:H,direction:l,dropdownMatchSelectWidth:G,dropdownRender:ie,dropdownAlign:ae,placement:K,builtinPlacements:oe,getPopupContainer:se,empty:m,getTriggerDOMNode:function(e){return Ce.current||e},onPopupVisibleChange:jt,onPopupMouseEnter:At},Pe?X.cloneElement(Pe,{ref:Fe}):X.createElement(lt,c({},e,{domRef:Ce,prefixCls:i,inputElement:Ne,ref:Q,id:r,prefix:ne,showSearch:Y,autoClearSearchValue:M,mode:v,activeDescendantId:A,tagRender:s,values:f,open:$,onToggleOpen:Qe,activeValue:D,searchValue:Me,onSearch:rt,onSearchSubmit:it,onRemove:ht,tokenWithEnter:$e,onInputBlur:gt}))),Vt=Pe?Bt:X.createElement(`div`,c({className:zt},_e,{ref:Se,onMouseDown:Dt,onKeyDown:dt,onKeyUp:pt,onFocus:wt,onBlur:Tt}),X.createElement(bt,{visible:ke&&!$,values:f}),Bt,Pt,It&&Lt);return X.createElement(We.Provider,{value:Mt},Vt)}),Tt=function(){return null};Tt.isSelectOptGroup=!0;var Et=function(){return null};Et.isSelectOption=!0;var Dt=X.forwardRef(function(e,t){var n=e.height,r=e.offsetY,i=e.offsetX,a=e.children,o=e.prefixCls,s=e.onInnerResize,l=e.innerProps,u=e.rtl,d=e.extra,f={},p={display:`flex`,flexDirection:`column`};return r!==void 0&&(f={height:n,position:`relative`,overflow:`hidden`},p=O(O({},p),{},q(q(q(q(q({transform:`translateY(${r}px)`},u?`marginRight`:`marginLeft`,-i),`position`,`absolute`),`left`,0),`right`,0),`top`,0))),X.createElement(`div`,{style:f},X.createElement(fe,{onResize:function(e){e.offsetHeight&&s&&s()}},X.createElement(`div`,c({style:p,className:(0,Z.default)(q({},`${o}-holder-inner`,o)),ref:t},l),a,d)))});Dt.displayName=`Filler`;function Ot(e){var t=e.children,n=e.setRef,r=X.useCallback(function(e){n(e)},[]);return X.cloneElement(t,{ref:r})}function kt(e,t,n,r,i,a,o,s){var c=s.getKey;return e.slice(t,n+1).map(function(e,n){var s=o(e,t+n,{style:{width:r},offsetX:i}),l=c(e);return X.createElement(Ot,{key:l,setRef:funct
Line truncated
|
||||
${i}${s}bottomLeft,
|
||||
${a}${s}bottomLeft
|
||||
`]:{animationName:ve},[`
|
||||
${i}${s}topLeft,
|
||||
${a}${s}topLeft,
|
||||
${i}${s}topRight,
|
||||
${a}${s}topRight
|
||||
`]:{animationName:be},[`${o}${s}bottomLeft`]:{animationName:xe},[`
|
||||
${o}${s}topLeft,
|
||||
${o}${s}topRight
|
||||
`]:{animationName:Y},"&-hidden":{display:`none`},[r]:Object.assign(Object.assign({},Fn(e)),{cursor:`pointer`,transition:`background ${e.motionDurationSlow} ease`,borderRadius:e.borderRadiusSM,"&-group":{color:e.colorTextDescription,fontSize:e.fontSizeSM,cursor:`default`},"&-option":{display:`flex`,"&-content":Object.assign({flex:`auto`},j),"&-state":{flex:`none`,display:`flex`,alignItems:`center`},[`&-active:not(${r}-option-disabled)`]:{backgroundColor:e.optionActiveBg},[`&-selected:not(${r}-option-disabled)`]:{color:e.optionSelectedColor,fontWeight:e.optionSelectedFontWeight,backgroundColor:e.optionSelectedBg,[`${r}-option-state`]:{color:e.colorPrimary}},"&-disabled":{[`&${r}-option-selected`]:{backgroundColor:e.colorBgContainerDisabled},color:e.colorTextDisabled,cursor:`not-allowed`},"&-grouped":{paddingInlineStart:e.calc(e.controlPaddingHorizontal).mul(2).equal()}},"&-empty":Object.assign(Object.assign({},Fn(e)),{color:e.colorTextDisabled})}),[`${c}:has(+ ${c})`]:{borderEndStartRadius:0,borderEndEndRadius:0,[`& + ${c}`]:{borderStartStartRadius:0,borderStartEndRadius:0}},"&-rtl":{direction:`rtl`}})},ye(e,`slide-up`),ye(e,`slide-down`),ze(e,`move-up`),ze(e,`move-down`)]},Ln=e=>{let{multipleSelectItemHeight:t,paddingXXS:n,lineWidth:r,INTERNAL_FIXED_ITEM_MARGIN:i}=e,a=e.max(e.calc(n).sub(r).equal(),0);return{basePadding:a,containerPadding:e.max(e.calc(a).sub(i).equal(),0),itemHeight:H(t),itemLineHeight:H(e.calc(t).sub(e.calc(e.lineWidth).mul(2)).equal())}},Rn=e=>{let{multipleSelectItemHeight:t,selectHeight:n,lineWidth:r}=e;return e.calc(n).sub(t).div(2).sub(r).equal()},zn=e=>{let{componentCls:t,iconCls:n,borderRadiusSM:r,motionDurationSlow:i,paddingXS:a,multipleItemColorDisabled:o,multipleItemBorderColorDisabled:s,colorIcon:c,colorIconHover:l,INTERNAL_FIXED_ITEM_MARGIN:u}=e;return{[`${t}-selection-overflow`]:{position:`relative`,display:`flex`,flex:`auto`,flexWrap:`wrap`,maxWidth:`100%`,"&-item":{flex:`none`,alignSelf:`center`,maxWidth:`calc(100% - 4px)`,display:`inline-flex`},[`${t}-selection-item`]:{display:`flex`,alignSelf:`center`,flex:`none`,boxSizing:`border-box`,maxWidth:`100%`,marginBlock:u,borderRadius:r,cursor:`default`,transition:`font-size ${i}, line-height ${i}, height ${i}`,marginInlineEnd:e.calc(u).mul(2).equal(),paddingInlineStart:a,paddingInlineEnd:e.calc(a).div(2).equal(),[`${t}-disabled&`]:{color:o,borderColor:s,cursor:`not-allowed`},"&-content":{display:`inline-block`,marginInlineEnd:e.calc(a).div(2).equal(),overflow:`hidden`,whiteSpace:`pre`,textOverflow:`ellipsis`},"&-remove":Object.assign(Object.assign({},ie()),{display:`inline-flex`,alignItems:`center`,color:c,fontWeight:`bold`,fontSize:10,lineHeight:`inherit`,cursor:`pointer`,[`> ${n}`]:{verticalAlign:`-0.2em`},"&:hover":{color:l}})}}}},Bn=(e,t)=>{let{componentCls:n,INTERNAL_FIXED_ITEM_MARGIN:r}=e,i=`${n}-selection-overflow`,a=e.multipleSelectItemHeight,o=Rn(e),s=t?`${n}-${t}`:``,c=Ln(e);return{[`${n}-multiple${s}`]:Object.assign(Object.assign({},zn(e)),{[`${n}-selector`]:{display:`flex`,alignItems:`center`,width:`100%`,height:`100%`,paddingInline:c.basePadding,paddingBlock:c.containerPadding,borderRadius:e.borderRadius,[`${n}-disabled&`]:{background:e.multipleSelectorBgDisabled,cursor:`not-allowed`},"&:after":{display:`inline-block`,width:0,margin:`${H(r)} 0`,lineHeight:H(a),visibility:`hidden`,content:`"\\a0"`}},[`${n}-selection-item`]:{height:c.itemHeight,lineHeight:H(c.itemLineHeight)},[`${n}-selection-wrap`]:{alignSelf:`flex-start`,"&:after":{lineHeight:H(a),marginBlock:r}},[`${n}-prefix`]:{marginInlineStart:e.calc(e.inputPaddingHorizontalBase).sub(c.basePadding).equal()},[`${i}-item + ${i}-item,
|
||||
${n}-prefix + ${n}-selection-wrap
|
||||
`]:{[`${n}-selection-search`]:{marginInlineStart:0},[`${n}-selection-placeholder`]:{insetInlineStart:0}},[`${i}-item-suffix`]:{minHeight:c.itemHeight,marginBlock:r},[`${n}-selection-search`]:{display:`inline-flex`,position:`relative`,maxWidth:`100%`,marginInlineStart:e.calc(e.inputPaddingHorizontalBase).sub(o).equal(),"\n &-input,\n &-mirror\n ":{height:a,fontFamily:e.fontFamily,lineHeight:H(a),transition:`all ${e.motionDurationSlow}`},"&-input":{width:`100%`,minWidth:4.1},"&-mirror":{position:`absolute`,top:0,insetInlineStart:0,insetInlineEnd:`auto`,zIndex:999,whiteSpace:`pre`,visibility:`hidden`}},[`${n}-selection-placeholder`]:{position:`absolute`,top:`50%`,insetInlineStart:e.calc(e.inputPaddingHorizontalBase).sub(c.basePadding).equal(),insetInlineEnd:e.inputPaddingHorizontalBase,transform:`translateY(-50%)`,transition:`all ${e.motionDurationSlow}`}})}};function Vn(e,t){let{componentCls:n}=e,r={[`${n}-multiple${t?`${n}-${t}`:``}`]:{fontSize:e.fontSize,[`${n}-selector`]:{[`${n}-show-search&`]:{cursor:`text`}},[`
|
||||
&${n}-show-arrow ${n}-selector,
|
||||
&${n}-allow-clear ${n}-selector
|
||||
`]:{paddingInlineEnd:e.calc(e.fontSizeIcon).add(e.controlPaddingHorizontal).equal()}}};return[Bn(e,t),r]}var Hn=e=>{let{componentCls:t}=e,n=R(e,{selectHeight:e.controlHeightSM,multipleSelectItemHeight:e.multipleItemHeightSM,borderRadius:e.borderRadiusSM,borderRadiusSM:e.borderRadiusXS}),r=R(e,{fontSize:e.fontSizeLG,selectHeight:e.controlHeightLG,multipleSelectItemHeight:e.multipleItemHeightLG,borderRadius:e.borderRadiusLG,borderRadiusSM:e.borderRadius});return[Vn(e),Vn(n,`sm`),{[`${t}-multiple${t}-sm`]:{[`${t}-selection-placeholder`]:{insetInline:e.calc(e.controlPaddingHorizontalSM).sub(e.lineWidth).equal()},[`${t}-selection-search`]:{marginInlineStart:2}}},Vn(r,`lg`)]};function Un(e,t){let{componentCls:n,inputPaddingHorizontalBase:r,borderRadius:i}=e,a=e.calc(e.controlHeight).sub(e.calc(e.lineWidth).mul(2)).equal();return{[`${n}-single${t?`${n}-${t}`:``}`]:{fontSize:e.fontSize,height:e.controlHeight,[`${n}-selector`]:Object.assign(Object.assign({},L(e,!0)),{display:`flex`,borderRadius:i,flex:`1 1 auto`,[`${n}-selection-wrap:after`]:{lineHeight:H(a)},[`${n}-selection-search`]:{position:`absolute`,inset:0,width:`100%`,"&-input":{width:`100%`,WebkitAppearance:`textfield`}},[`
|
||||
${n}-selection-item,
|
||||
${n}-selection-placeholder
|
||||
`]:{display:`block`,padding:0,lineHeight:H(a),transition:`all ${e.motionDurationSlow}, visibility 0s`,alignSelf:`center`},[`${n}-selection-placeholder`]:{transition:`none`,pointerEvents:`none`},[[`&:after`,`${n}-selection-item:empty:after`,`${n}-selection-placeholder:empty:after`].join(`,`)]:{display:`inline-block`,width:0,visibility:`hidden`,content:`"\\a0"`}}),[`
|
||||
&${n}-show-arrow ${n}-selection-item,
|
||||
&${n}-show-arrow ${n}-selection-search,
|
||||
&${n}-show-arrow ${n}-selection-placeholder
|
||||
`]:{paddingInlineEnd:e.showArrowPaddingInlineEnd},[`&${n}-open ${n}-selection-item`]:{color:e.colorTextPlaceholder},[`&:not(${n}-customize-input)`]:{[`${n}-selector`]:{width:`100%`,height:`100%`,alignItems:`center`,padding:`0 ${H(r)}`,[`${n}-selection-search-input`]:{height:a,fontSize:e.fontSize},"&:after":{lineHeight:H(a)}}},[`&${n}-customize-input`]:{[`${n}-selector`]:{"&:after":{display:`none`},[`${n}-selection-search`]:{position:`static`,width:`100%`},[`${n}-selection-placeholder`]:{position:`absolute`,insetInlineStart:0,insetInlineEnd:0,padding:`0 ${H(r)}`,"&:after":{display:`none`}}}}}}}function Wn(e){let{componentCls:t}=e,n=e.calc(e.controlPaddingHorizontalSM).sub(e.lineWidth).equal();return[Un(e),Un(R(e,{controlHeight:e.controlHeightSM,borderRadius:e.borderRadiusSM}),`sm`),{[`${t}-single${t}-sm`]:{[`&:not(${t}-customize-input)`]:{[`${t}-selector`]:{padding:`0 ${H(n)}`},[`&${t}-show-arrow ${t}-selection-search`]:{insetInlineEnd:e.calc(n).add(e.calc(e.fontSize).mul(1.5)).equal()},[`
|
||||
&${t}-show-arrow ${t}-selection-item,
|
||||
&${t}-show-arrow ${t}-selection-placeholder
|
||||
`]:{paddingInlineEnd:e.calc(e.fontSize).mul(1.5).equal()}}}},Un(R(e,{controlHeight:e.singleItemHeightLG,fontSize:e.fontSizeLG,borderRadius:e.borderRadiusLG}),`lg`)]}var Gn=e=>{let{fontSize:t,lineHeight:n,lineWidth:r,controlHeight:i,controlHeightSM:a,controlHeightLG:o,paddingXXS:s,controlPaddingHorizontal:c,zIndexPopupBase:l,colorText:u,fontWeightStrong:d,controlItemBgActive:f,controlItemBgHover:p,colorBgContainer:m,colorFillSecondary:h,colorBgContainerDisabled:g,colorTextDisabled:_,colorPrimaryHover:v,colorPrimary:y,controlOutline:b}=e,x=s*2,S=r*2,C=Math.min(i-x,i-S),w=Math.min(a-x,a-S),T=Math.min(o-x,o-S);return{INTERNAL_FIXED_ITEM_MARGIN:Math.floor(s/2),zIndexPopup:l+50,optionSelectedColor:u,optionSelectedFontWeight:d,optionSelectedBg:f,optionActiveBg:p,optionPadding:`${(i-t*n)/2}px ${c}px`,optionFontSize:t,optionLineHeight:n,optionHeight:i,selectorBg:m,clearBg:m,singleItemHeightLG:o,multipleItemBg:h,multipleItemBorderColor:`transparent`,multipleItemHeight:C,multipleItemHeightSM:w,multipleItemHeightLG:T,multipleSelectorBgDisabled:g,multipleItemColorDisabled:_,multipleItemBorderColorDisabled:`transparent`,showArrowPaddingInlineEnd:Math.ceil(e.fontSize*1.25),hoverBorderColor:v,activeBorderColor:y,activeOutlineColor:b,selectAffixPadding:s}},Kn=(e,t)=>{let{componentCls:n,antCls:r,controlOutlineWidth:i}=e;return{[`&:not(${n}-customize-input) ${n}-selector`]:{border:`${H(e.lineWidth)} ${e.lineType} ${t.borderColor}`,background:e.selectorBg},[`&:not(${n}-disabled):not(${n}-customize-input):not(${r}-pagination-size-changer)`]:{[`&:hover ${n}-selector`]:{borderColor:t.hoverBorderHover},[`${n}-focused& ${n}-selector`]:{borderColor:t.activeBorderColor,boxShadow:`0 0 0 ${H(i)} ${t.activeOutlineColor}`,outline:0},[`${n}-prefix`]:{color:t.color}}}},qn=(e,t)=>({[`&${e.componentCls}-status-${t.status}`]:Object.assign({},Kn(e,t))}),Jn=e=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign({},Kn(e,{borderColor:e.colorBorder,hoverBorderHover:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeOutlineColor:e.activeOutlineColor,color:e.colorText})),qn(e,{status:`error`,borderColor:e.colorError,hoverBorderHover:e.colorErrorHover,activeBorderColor:e.colorError,activeOutlineColor:e.colorErrorOutline,color:e.colorError})),qn(e,{status:`warning`,borderColor:e.colorWarning,hoverBorderHover:e.colorWarningHover,activeBorderColor:e.colorWarning,activeOutlineColor:e.colorWarningOutline,color:e.colorWarning})),{[`&${e.componentCls}-disabled`]:{[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]:{background:e.colorBgContainerDisabled,color:e.colorTextDisabled}},[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]:{background:e.multipleItemBg,border:`${H(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`}})}),Yn=(e,t)=>{let{componentCls:n,antCls:r}=e;return{[`&:not(${n}-customize-input) ${n}-selector`]:{background:t.bg,border:`${H(e.lineWidth)} ${e.lineType} transparent`,color:t.color},[`&:not(${n}-disabled):not(${n}-customize-input):not(${r}-pagination-size-changer)`]:{[`&:hover ${n}-selector`]:{background:t.hoverBg},[`${n}-focused& ${n}-selector`]:{background:e.selectorBg,borderColor:t.activeBorderColor,outline:0}}}},Xn=(e,t)=>({[`&${e.componentCls}-status-${t.status}`]:Object.assign({},Yn(e,t))}),Zn=e=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign({},Yn(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor,color:e.colorText})),Xn(e,{status:`error`,bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,color:e.colorError})),Xn(e,{status:`warning`,bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,color:e.colorWarning})),{[`&${e.componentCls}-disabled`]:{[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]:{borderColor:e.colorBorder,background:e.colorBgContainerDisabled,color:e.colorTextDisabled}},[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]:{background:e.colorBgContainer,border:`${H(e.lineWidth)} ${e.lineType} ${e.colorSplit}`}})}),Qn=e=>({"&-borderless":{[`${e.componentCls}-selector`]:{background:`transparent`,border:`${H(e.lineWidth)} ${e.lineType} transparent`},[`&${e.componentCls}-disabled`]:{[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]:{color:e.colorTextDisabled}},[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]:{background:e.multipleItemBg,border:`${H(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`},[`&${e.componentCls}-status-error`]:{[`${e.componentCls}-prefix, ${e.componentCls}-selection-item`]:{color:e.colorError}},[`&${e.componentCls}-status-warning`]:{[`${e.componentCls}-prefix, ${e.componentCls}-selection-item`]:{color:e.colorWarning}}}}),$n=(e,t)=>{let{componentCls:n,antCls:r}=e;return{[`&:not(${n}-customize-input) ${n}-selector`]:{borderWidth:`${H(e.lineWidth)} 0`,borderStyle:`${e.lineType} none`,borderColor:`transparent transparent ${t.boLine truncated
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
import{n as e}from"./rolldown-runtime-Dl_DZoUm.js";import{i as t,t as n}from"./react-1o5M9n0k.js";import{d as r,f as i,m as a,p as o,r as s,t as c,z as l}from"./index-D-ox0wtk.js";import{$ as u,Bt as d,Dn as f,En as p,Ft as m,Gt as h,H as g,Lt as _,M as v,Nt as y,O as b,P as x,S,St as C,Tt as w,V as T,X as E,Y as D,Z as O,a as k,bt as A,c as ee,d as j,dn as te,et as M,g as N,gt as ne,h as P,i as F,j as I,l as re,lt as L,m as ie,mn as ae,mt as R,nn as oe,nt as z,o as se,p as B,pn as V,q as H,qt as U,r as W,rn as G,rt as K,s as ce,u as le,vt as ue,wn as de,xt as fe,y as pe,z as me,zt as he}from"./skeleton-B4Z0R3jQ.js";import{n as ge,t as q}from"./input-BnsACfRy.js";import{c as _e,f as ve,i as ye,l as be,n as xe,o as Se,r as Ce,s as we,t as Te,u as Ee}from"./LockOutlined-BPg5cH36.js";import{s as De}from"./style-CBKkTdLU.js";import{t as Oe,u as ke}from"./typography-xRg_3Gco.js";var J=e(t());function Ae(e){return e==null?null:typeof e==`object`&&!(0,J.isValidElement)(e)?e:{title:e}}function Y(e){let[t,n]=J.useState(e);return J.useEffect(()=>{let t=setTimeout(()=>{n(e)},e.length?0:10);return()=>{clearTimeout(t)}},[e]),t}var je=e=>{let{componentCls:t}=e,n=`${t}-show-help`,r=`${t}-show-help-item`;return{[n]:{transition:`opacity ${e.motionDurationFast} ${e.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[r]:{overflow:`hidden`,transition:`height ${e.motionDurationFast} ${e.motionEaseInOut},
|
||||
opacity ${e.motionDurationFast} ${e.motionEaseInOut},
|
||||
transform ${e.motionDurationFast} ${e.motionEaseInOut} !important`,[`&${r}-appear, &${r}-enter`]:{transform:`translateY(-5px)`,opacity:0,"&-active":{transform:`translateY(0)`,opacity:1}},[`&${r}-leave-active`]:{transform:`translateY(-5px)`}}}}},Me=e=>({legend:{display:`block`,width:`100%`,marginBottom:e.marginLG,padding:0,color:e.colorTextDescription,fontSize:e.fontSizeLG,lineHeight:`inherit`,border:0,borderBottom:`${U(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},'input[type="search"]':{boxSizing:`border-box`},'input[type="radio"], input[type="checkbox"]':{lineHeight:`normal`},'input[type="file"]':{display:`block`},'input[type="range"]':{display:`block`,width:`100%`},"select[multiple], select[size]":{height:`auto`},"input[type='file']:focus,\n input[type='radio']:focus,\n input[type='checkbox']:focus":{outline:0,boxShadow:`0 0 0 ${U(e.controlOutlineWidth)} ${e.controlOutline}`},output:{display:`block`,paddingTop:15,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight}}),Ne=(e,t)=>{let{formItemCls:n}=e;return{[n]:{[`${n}-label > label`]:{height:t},[`${n}-control-input`]:{minHeight:t}}}},Pe=e=>{let{componentCls:t}=e;return{[e.componentCls]:Object.assign(Object.assign(Object.assign({},L(e)),Me(e)),{[`${t}-text`]:{display:`inline-block`,paddingInlineEnd:e.paddingSM},"&-small":Object.assign({},Ne(e,e.controlHeightSM)),"&-large":Object.assign({},Ne(e,e.controlHeightLG))})}},Fe=e=>{let{formItemCls:t,iconCls:n,rootPrefixCls:r,antCls:i,labelRequiredMarkColor:a,labelColor:o,labelFontSize:s,labelHeight:c,labelColonMarginInlineStart:l,labelColonMarginInlineEnd:u,itemMarginBottom:d}=e;return{[t]:Object.assign(Object.assign({},L(e)),{marginBottom:d,verticalAlign:`top`,"&-with-help":{transition:`none`},[`&-hidden,
|
||||
&-hidden${i}-row`]:{display:`none`},"&-has-warning":{[`${t}-split`]:{color:e.colorError}},"&-has-error":{[`${t}-split`]:{color:e.colorWarning}},[`${t}-label`]:{flexGrow:0,overflow:`hidden`,whiteSpace:`nowrap`,textAlign:`end`,verticalAlign:`middle`,"&-left":{textAlign:`start`},"&-wrap":{overflow:`unset`,lineHeight:e.lineHeight,whiteSpace:`unset`,"> label":{verticalAlign:`middle`,textWrap:`balance`}},"> label":{position:`relative`,display:`inline-flex`,alignItems:`center`,maxWidth:`100%`,height:c,color:o,fontSize:s,[`> ${n}`]:{fontSize:e.fontSize,verticalAlign:`top`},[`&${t}-required`]:{"&::before":{display:`inline-block`,marginInlineEnd:e.marginXXS,color:a,fontSize:e.fontSize,fontFamily:`SimSun, sans-serif`,lineHeight:1,content:`"*"`},[`&${t}-required-mark-hidden, &${t}-required-mark-optional`]:{"&::before":{display:`none`}}},[`${t}-optional`]:{display:`inline-block`,marginInlineStart:e.marginXXS,color:e.colorTextDescription,[`&${t}-required-mark-hidden`]:{display:`none`}},[`${t}-tooltip`]:{color:e.colorTextDescription,cursor:`help`,writingMode:`horizontal-tb`,marginInlineStart:e.marginXXS},"&::after":{content:`":"`,position:`relative`,marginBlock:0,marginInlineStart:l,marginInlineEnd:u},[`&${t}-no-colon::after`]:{content:`"\\a0"`}}},[`${t}-control`]:{"--ant-display":`flex`,flexDirection:`column`,flexGrow:1,[`&:first-child:not([class^="'${r}-col-'"]):not([class*="' ${r}-col-'"])`]:{width:`100%`},"&-input":{position:`relative`,display:`flex`,alignItems:`center`,minHeight:e.controlHeight,"&-content":{flex:`auto`,maxWidth:`100%`,[`&:has(> ${i}-switch:only-child, > ${i}-rate:only-child)`]:{display:`flex`,alignItems:`center`}}}},[t]:{"&-additional":{display:`flex`,flexDirection:`column`},"&-explain, &-extra":{clear:`both`,color:e.colorTextDescription,fontSize:e.fontSize,lineHeight:e.lineHeight},"&-explain-connected":{width:`100%`},"&-extra":{minHeight:e.controlHeightSM,transition:`color ${e.motionDurationMid} ${e.motionEaseOut}`},"&-explain":{"&-error":{color:e.colorError},"&-warning":{color:e.colorWarning}}},[`&-with-help ${t}-explain`]:{height:`auto`,opacity:1},[`${t}-feedback-icon`]:{fontSize:e.fontSize,textAlign:`center`,visibility:`visible`,animationName:S,animationDuration:e.motionDurationMid,animationTimingFunction:e.motionEaseOutBack,pointerEvents:`none`,"&-success":{color:e.colorSuccess},"&-error":{color:e.colorError},"&-warning":{color:e.colorWarning},"&-validating":{color:e.colorPrimary}}})}},X=e=>({padding:e.verticalLabelPadding,margin:e.verticalLabelMargin,whiteSpace:`initial`,textAlign:`start`,"> label":{margin:0,"&::after":{visibility:`hidden`}}}),Ie=e=>{let{antCls:t,formItemCls:n}=e;return{[`${n}-horizontal`]:{[`${n}-label`]:{flexGrow:0},[`${n}-control`]:{flex:`1 1 0`,minWidth:0},[`${n}-label[class$='-24'], ${n}-label[class*='-24 ']`]:{[`& + ${n}-control`]:{minWidth:`unset`}},[`${t}-col-24${n}-label,
|
||||
${t}-col-xl-24${n}-label`]:X(e)}}},Le=e=>{let{componentCls:t,formItemCls:n,inlineItemMarginBottom:r}=e;return{[`${t}-inline`]:{display:`flex`,flexWrap:`wrap`,[`${n}-inline`]:{flex:`none`,marginInlineEnd:e.margin,marginBottom:r,"&-row":{flexWrap:`nowrap`},[`> ${n}-label,
|
||||
> ${n}-control`]:{display:`inline-block`,verticalAlign:`top`},[`> ${n}-label`]:{flex:`none`},[`${t}-text`]:{display:`inline-block`},[`${n}-has-feedback`]:{display:`inline-block`}}}}},Re=e=>{let{componentCls:t,formItemCls:n,rootPrefixCls:r}=e;return{[`${n} ${n}-label`]:X(e),[`${t}:not(${t}-inline)`]:{[n]:{flexWrap:`wrap`,[`${n}-label, ${n}-control`]:{[`&:not([class*=" ${r}-col-xs"])`]:{flex:`0 0 100%`,maxWidth:`100%`}}}}}},ze=e=>{let{componentCls:t,formItemCls:n,antCls:r}=e;return{[`${n}-vertical`]:{[`${n}-row`]:{flexDirection:`column`},[`${n}-label > label`]:{height:`auto`},[`${n}-control`]:{width:`100%`},[`${n}-label,
|
||||
${r}-col-24${n}-label,
|
||||
${r}-col-xl-24${n}-label`]:X(e)},[`@media (max-width: ${U(e.screenXSMax)})`]:[Re(e),{[t]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-xs-24${n}-label`]:X(e)}}}],[`@media (max-width: ${U(e.screenSMMax)})`]:{[t]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-sm-24${n}-label`]:X(e)}}},[`@media (max-width: ${U(e.screenMDMax)})`]:{[t]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-md-24${n}-label`]:X(e)}}},[`@media (max-width: ${U(e.screenLGMax)})`]:{[t]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-lg-24${n}-label`]:X(e)}}}}},Be=e=>({labelRequiredMarkColor:e.colorError,labelColor:e.colorTextHeading,labelFontSize:e.fontSize,labelHeight:e.controlHeight,labelColonMarginInlineStart:e.marginXXS/2,labelColonMarginInlineEnd:e.marginXS,itemMarginBottom:e.marginLG,verticalLabelPadding:`0 0 ${e.paddingXS}px`,verticalLabelMargin:0,inlineItemMarginBottom:0}),Ve=(e,t)=>R(e,{formItemCls:`${e.componentCls}-item`,rootPrefixCls:t}),He=z(`Form`,(e,{rootPrefixCls:t})=>{let n=Ve(e,t);return[Pe(n),Fe(n),je(n),Ie(n),Le(n),ze(n),ve(n),S]},Be,{order:-1e3}),Z=e(f()),Ue=[];function We(e,t,n,r=0){return{key:typeof e==`string`?e:`${t}-${r}`,error:e,errorStatus:n}}var Ge=({help:e,helpStatus:t,errors:n=Ue,warnings:r=Ue,className:i,fieldId:a,onVisibleChanged:o})=>{let{prefixCls:s}=J.useContext(k),c=`${s}-item-explain`,l=T(s),[d,f,p]=He(s,l),m=J.useMemo(()=>x(s),[s]),h=Y(n),g=Y(r),_=J.useMemo(()=>e==null?[].concat(G(h.map((e,t)=>We(e,`error`,`error`,t))),G(g.map((e,t)=>We(e,`warning`,`warning`,t)))):[We(e,`help`,t)],[e,t,h,g]),v=J.useMemo(()=>{let e={};return _.forEach(({key:t})=>{e[t]=(e[t]||0)+1}),_.map((t,n)=>Object.assign(Object.assign({},t),{key:e[t.key]>1?`${t.key}-fallback-${n}`:t.key}))},[_]),y={};return a&&(y.id=`${a}_help`),d(J.createElement(u,{motionDeadline:m.motionDeadline,motionName:`${s}-show-help`,visible:!!v.length,onVisibleChanged:o},e=>{let{className:t,style:n}=e;return J.createElement(`div`,Object.assign({},y,{className:(0,Z.default)(c,t,p,l,i,f),style:n}),J.createElement(M,Object.assign({keys:v},x(s),{motionName:`${s}-show-help-item`,component:!1}),e=>{let{key:t,error:n,errorStatus:r,className:i,style:a}=e;return J.createElement(`div`,{key:t,className:(0,Z.default)(i,{[`${c}-${r}`]:r}),style:a},n)}))}))},Ke=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},qe=J.forwardRef((e,t)=>{let n=J.useContext(A),{getPrefixCls:r,direction:i,requiredMark:a,colon:o,scrollToFirstError:s,className:c,style:l}=w(`form`),{prefixCls:u,className:d,rootClassName:f,size:p,disabled:m=n,form:h,colon:g,labelAlign:_,labelWrap:v,labelCol:y,wrapperCol:x,hideRequiredMark:S,layout:C=`horizontal`,scrollToFirstError:E,requiredMark:D,onFinishFailed:O,name:k,style:ee,feedbackIcons:j,variant:te}=e,M=Ke(e,[`prefixCls`,`className`,`rootClassName`,`size`,`disabled`,`form`,`colon`,`labelAlign`,`labelWrap`,`labelCol`,`wrapperCol`,`hideRequiredMark`,`layout`,`scrollToFirstError`,`requiredMark`,`onFinishFailed`,`name`,`style`,`feedbackIcons`,`variant`]),N=b(p),ne=J.useContext(De),P=J.useMemo(()=>D===void 0?S?!1:a===void 0||a:D,[S,D,a]),F=g??o,I=r(`form`,u),L=T(I),[ie,ae,R]=He(I,L),oe=(0,Z.default)(I,`${I}-${C}`,{[`${I}-hide-required-mark`]:P===!1,[`${I}-rtl`]:i===`rtl`,[`${I}-${N}`]:N},R,L,ae,c,d,f),[z]=Se(h),{__INTERNAL__:B}=z;B.name=k;let V=J.useMemo(()=>({name:k,labelAlign:_,labelCol:y,labelWrap:v,wrapperCol:x,layout:C,colon:F,requiredMark:P,itemRef:B.itemRef,form:z,feedbackIcons:j}),[k,_,y,x,C,F,P,z,j]),H=J.useRef(null);J.useImperativeHandle(t,()=>Object.assign(Object.assign({},z),{nativeElement:H.current?.nativeElement}));let U=(e,t)=>{if(e){let n={block:`nearest`};typeof e==`object`&&(n=Object.assign(Object.assign({},n),e)),z.scrollToField(t,n)}};return ie(J.createElement(re.Provider,{value:te},J.createElement(fe,{disabled:m},J.createElement(ue.Provider,{value:N},J.createElement(se,{validateMessages:ne},J.createElement(W.Provider,{value:V},J.createElement(ce,{status:!0},J.createElement(le,Object.assign({id:k},M,{name:k,onFinishFailed:e=>{if(O?.(e),e.errorFields.length){let t=e.errorFields[0].name;if(E!==void 0){U(E,t);return}s!==void 0&&U(s,t)}},form:z,ref:H,style:Object.assign(Object.assign({},l),ee),className:oe})))))))))});function Je(e){if(typeof e==`function`)return e;let t=de(e);return t.length<=1?t[0]:t}var Ye=()=>{let{status:e,errors:t=[],warnings:n=[]}=J.useContext(F);return{status:e,errors:t,warnings:n}};Ye.Context=F;function Xe(e){let[t,n]=J.useState(e),r=J.useRef(null),i=J.useRef([]),a=J.useRef(!1);J.useEffect(()=>(a.current=!1,()=>{a.current=!0,oe.cancel(r.current),r.current=null}),[]);function o(e){a.current||(r.current===null&&(i.current=[],r.current=oe(()=>{r.current=null,n(e=>{let t=e;return i.current.forEach(e=>{t=e(t)}),t})})),i.current.push(e))}return[t,o]}function Ze(
Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{n as e}from"./rolldown-runtime-Dl_DZoUm.js";import{i as t,t as n}from"./react-1o5M9n0k.js";import{a as r,l as i,n as a,o,s,u as c}from"./index-D-ox0wtk.js";import{o as l,t as u}from"./shared-DZLPF0cC.js";import{a as d,c as f,d as p,f as m,i as h,l as g,m as _,n as v,o as y,p as b,r as x,s as S,t as C,u as w}from"./model-BDHsEKmI.js";var T=e(t(),1),E=n();function D({kind:e,id:t,children:n}){let r={orders:[`open-order`,`order`],"price-locks":[`open-price-lock`,`lock`],recoveries:[`recovery-open`,`recovery`]}[e];return(0,E.jsx)(`button`,{type:`button`,className:`link-button`,"data-action":r[0],"data-id":t,onClick:()=>{t&&s(e,{search:`?`+r[1]+`=`+encodeURIComponent(t)})},children:n})}function O({pool:e,cutover:t}){let n=Object.hasOwn(e,`personalPools`);return(0,E.jsxs)(`section`,{className:`panel material-rolling-current`,"aria-label":n?`当前公共材料`:`当前统一材料`,children:[(0,E.jsxs)(`div`,{className:`panel-title`,children:[(0,E.jsxs)(`h2`,{children:[e.date,` `,n?`公共材料`:`当前材料`]}),(0,E.jsx)(`span`,{className:`small muted`,children:n?`个人回收料独立在下方展示`:`自 `+t+` 起按日结转`})]}),(0,E.jsxs)(`div`,{className:`material-rolling-totals`,children:[(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`span`,{children:n?`公共料加权料价`:`当前最终加权料价`}),(0,E.jsx)(`strong`,{children:e.averageRate==null?`待补采购`:(0,E.jsxs)(E.Fragment,{children:[`¥`,r(e.averageRate),(0,E.jsx)(`small`,{children:`/克`})]})})]}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`span`,{children:n?`公共剩余克重`:`统一剩余克重`}),(0,E.jsxs)(`strong`,{children:[a(e.remainingMg),(0,E.jsx)(`small`,{children:`g`})]})]})]}),n?(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)(`p`,{className:`small muted`,children:[`公共料共 `,a(e.totalMg),`g,已用/预留 `,a(e.usedMg),`g;余料成本 `,v(e.remainingCost),`。`,e.shortageMg?`公共料还缺 `+a(e.shortageMg)+`g。`:``]}),(0,E.jsx)(`p`,{className:`small muted`,children:`订单先用归属人的个人回收料,不足由公共料补足;两类来源各自加权、各自保留付款人与余料。`})]}):(0,E.jsxs)(E.Fragment,{children:[!!e.shortageMg&&(0,E.jsxs)(`p`,{className:`danger-text`,children:[`还需补足 `,a(e.shortageMg),`g,今日订单料费与利润暂待补。`]}),(0,E.jsxs)(`details`,{className:`material-rolling-composition`,children:[(0,E.jsx)(`summary`,{children:`查看今天的料价组成`}),(0,E.jsx)(`div`,{className:`material-rolling-parts`,children:[[`昨日以前剩余材料`,e.opening],[`今日购料(`+(e.todayPurchases.count||0)+`笔)`,e.todayPurchases],[`今日退货回料(`+(e.todayReturns.count||0)+`笔)`,e.todayReturns]].map(e=>{let[t,n]=e;return(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`span`,{children:t}),(0,E.jsxs)(`strong`,{children:[a(n.mg),`g`]}),(0,E.jsx)(`span`,{children:v(n.amount)})]},t)})}),(0,E.jsx)(`p`,{className:`small muted`,children:`加权料价=(结转成本+今日采购成本+今日退货回料原金料成本)÷对应克重。退货按原订单金料成本与实际退回克重计入;同日售退净抵销,完整退回记录保留。工费、快递费不加入材料成本。`}),(0,E.jsxs)(`p`,{className:`small muted`,children:[`今天共可计料 `,a(e.totalMg),`g,已耗用 `,a(e.usedMg),`g;剩余材料成本 `,v(e.remainingCost),`。`]})]}),(0,E.jsx)(`p`,{className:`small muted material-rolling-rule`,children:`今日加料只重算今日订单,旧日订单冻结。历史购料录错,提交更正后由店主复核。`})]})]})}function k({pool:e,state:t}){if(!e.personalPools)return null;let n=Object.entries(e.personalPools).filter(([e])=>t.user.role===`owner`||e===l.currentMember(t));return(0,E.jsxs)(`section`,{className:`panel material-personal-pools`,children:[(0,E.jsxs)(`div`,{className:`panel-title`,children:[(0,E.jsxs)(`h2`,{children:[e.date,` 个人回收料`]}),(0,E.jsx)(`span`,{className:`small muted`,children:`回收归属与公共购料分别核算`})]}),n.map(([n,r])=>{let i=(e.usages||[]).filter(e=>e.active&&!e.anonymous&&e.materialSources?.some(e=>e.kind===`personal_recovery`&&e.member===n));return(0,E.jsxs)(`article`,{className:`material-personal-pool`,children:[(0,E.jsxs)(`div`,{className:`panel-title`,children:[(0,E.jsxs)(`h3`,{children:[l.memberName(t,n),`个人回收料`]}),(0,E.jsxs)(`strong`,{children:[`余 `,a(r.remainingMg),`g`]})]}),(0,E.jsxs)(`div`,{className:`material-personal-totals`,children:[(0,E.jsxs)(`span`,{children:[`加权料价 `,r.averageRate==null?`待核对`:v(r.averageRate)+`/克`]}),(0,E.jsxs)(`span`,{children:[`已用/预留 `,a(r.usedMg),`g`]}),(0,E.jsxs)(`span`,{children:[`余料成本 `,v(r.remainingCost)]})]}),(0,E.jsxs)(`details`,{children:[(0,E.jsx)(`summary`,{children:`查看回收来源与占用`}),(0,E.jsx)(`ul`,{children:r.purchases?.length?r.purchases.map((e,t)=>(0,E.jsxs)(`li`,{children:[e.sourceKind===`carry`?`以前结转`:e.sourceKind===`return`?`退回原料`:`回收生成`,` ·`,` `,a(e.mg),Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{n as e}from"./rolldown-runtime-Dl_DZoUm.js";import{n as t,t as n,useRead as r}from"./OrdersPage-DMGBXOU2.js";import{i,t as a}from"./react-1o5M9n0k.js";import{o}from"./shared-DZLPF0cC.js";import{l as s,s as c}from"./index-D-ox0wtk.js";import{t as l}from"./useOrderForm-Boa1k5nR.js";import{i as u,n as d,r as f,t as p}from"./EditFields-DxbwVQgn.js";var m=e(i(),1),h=a();function g(e,t){let n;try{n=JSON.parse(localStorage.getItem(e))}catch{return null}return n?.id===t&&Number.isSafeInteger(n.revision)&&Array.isArray(n.inputs?.lines)?n:null}function _(e,t,n,r){if(e.eligible!==!0)throw Error(e.reason||`这张订单暂不能修改,请重新读取订单后核对。`);if(e.order?.id!==t||!Number.isSafeInteger(e.revision)||!Array.isArray(e.inputs?.lines)||!Array.isArray(e.inputs.fee_items))throw Error(`订单修改资料未完整返回,请重新读取。`);if(e.financialEditable&&e.order.price_lock_id){let t=e.priceLock,n=e.inputs.lines,r=n.length>1?t?.lines:[t],i=new Set;if(!t||t.id!==e.order.price_lock_id||!/^\d{4}-\d{2}-\d{2}$/.test(t.date)||typeof t.financeRequiresApproval!=`boolean`||!Array.isArray(r)||!n.length||r.length!==n.length)throw Error(`锁价日期与成本修改资料未完整返回,请重新读取。`);for(let[t,a]of n.entries()){let o=r[t],s=o?.lineId||o?.id,c=a.price_lock_material||n.length===1&&e.inputs.price_lock_material,l=a.price_lock_extra_material||n.length===1&&e.inputs.price_lock_extra_material;if(![`pool`,`manual`].includes(o?.materialSource)||!Number.isSafeInteger(o.extraMg)||o.extraMg<0||![`pool`,`manual`].includes(c?.source)||o.extraMg>0&&!l||n.length>1&&(!a.lineId||a.lineId!==s||i.has(s)))throw Error(`锁价日期与成本修改资料未完整返回,请重新读取。`);i.add(s)}}let i=n?.revision??e.revision,a=n?.inputs||e.inputs,o=e.order;return{...e,id:t,order:o,originalInputs:e.inputs,user:r.user.id,revision:i,priceLock:e.priceLock||null,sameDayDirectEdit:e.requiresApproval===!1,inputs:{...a,...e.inputs.price_lock_material?{price_lock_material:a.price_lock_material||e.inputs.price_lock_material}:{},...e.inputs.price_lock_extra_material?{price_lock_extra_material:a.price_lock_extra_material||e.inputs.price_lock_extra_material}:{},internal_note:a.internal_note??e.inputs.internal_note??``,id:t,revision:i,paper_number:o.paper_number||``,paper_date:o.paper_date||``,fee_auto_initialized:!0},reason:n?.reason||``,verified:!!n?.verified&&i===e.revision,conflicted:i!==e.revision}}function v({entry:e,read:t,disabled:n}){let r=e.latest?.order;return(0,h.jsxs)(`section`,{className:`panel`,id:`order-edit-conflict`,role:`status`,children:[(0,h.jsx)(`h2`,{children:`订单已有新记录,请先核对`}),(0,h.jsx)(`p`,{children:`你正在填写的内容已保留。核对下方当前订单与表单后,再决定继续使用哪份内容。`}),r?(0,h.jsxs)(`details`,{open:!0,children:[(0,h.jsx)(`summary`,{children:`当前已保存的订单`}),(0,h.jsxs)(`p`,{children:[r.date,` · `,r.customer||`未填客户称呼`,` · 开单人 `,r.salesperson,` · `,r.payment_account,` · 成交 `,o.orderAmount(r.total,r.rounding_mode)]}),(0,h.jsxs)(`table`,{children:[(0,h.jsx)(`thead`,{children:(0,h.jsx)(`tr`,{children:[`商品`,`克重/数量`,`成交金额`,`货品成本`].map(e=>(0,h.jsx)(`th`,{children:e},e))})}),(0,h.jsx)(`tbody`,{children:r.lines.map((e,t)=>(0,h.jsxs)(`tr`,{children:[(0,h.jsx)(`td`,{children:e.name}),(0,h.jsx)(`td`,{children:e.unit===`g`?o.grams(e.quantity)+`g`:e.quantity+`件`}),(0,h.jsxs)(`td`,{children:[`¥`,o.yuan(e.sale)]}),(0,h.jsx)(`td`,{children:e.cost==null?`待补`:`¥`+o.yuan(e.cost)})]},t))})]}),(0,h.jsxs)(`p`,{children:[`实际费用 ¥`,o.yuan(r.directCost),`;客户单备注:`,r.note||`无`]}),r.internal_note&&(0,h.jsxs)(`p`,{children:[`内部备注:`,r.internal_note]})]}):(0,h.jsx)(`p`,{children:`重新读取最新订单后,核对原记录再继续。`}),(0,h.jsxs)(`div`,{className:`actions`,children:[r?(0,h.jsx)(`button`,{disabled:n,"data-action":`keep-order-edit`,onClick:()=>t(`keep`),children:`已核对,保留草稿继续修改`}):(0,h.jsx)(`button`,{disabled:n,"data-action":`reload-order-edit`,onClick:()=>t(`review`),children:`读取最新订单供核对`}),(0,h.jsx)(`button`,{disabled:n,"data-action":`reset-order-edit`,onClick:()=>t(`reset`),children:`改用当前订单内容`})]})]})}function y({client:e,state:r,session:i,refreshState:a,registerLeaveGuard:o,LockEditor:l}){let u=`mm-order-edit-active-`+r.user.id,d=s(`order`)||s(`id`)||localStorage.getItem(u)||``,f=`mm-order-edit-`+r.user.id+`-`+d,[p,y]=(0,m.useState)(null),[x,S]=(0,m.useState)(0),[C,w]=(0,m.useState)(``),[T,E]=(0,m.useState)(!1),[D,O]=(0,m.useState)(!1),k=(0,m.useRef)(!1),A=(0,m.useRef)(0),j=(0,m.useCallback)((t,n,i)=>{k.current&&e.user===r.user.id&&(localStorage.setItem(f,JSON.stringify({id:d,revision:t.revision,inputs:t,reason:n,verified:i})),localStorage.setItem(u,d))},[d,f,u,e,r.user.id]),{checkFailure:M}=t({client:e,state:r,id:d,watch:!!p&&!D,onLost:t=>{k.current=!1,sessionLine truncated
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
import{n as e}from"./rolldown-runtime-Dl_DZoUm.js";import{i as t,t as n}from"./react-1o5M9n0k.js";import{t as r}from"./printStatus-DCPEAOZ9.js";import{S as i,l as a,s as o}from"./index-D-ox0wtk.js";import{c as s,n as c,t as l}from"./shared-DZLPF0cC.js";var u=e(t(),1),d=`订单归属或权限已更新,本账号已不能查看这张订单。`,f=e=>`mm-order-access-notice-`+e,p=e=>[403,404].includes(e?.status);function m({client:e,state:t,id:n,watch:r,onLost:i}){let a=t.user.id,o=(0,u.useRef)(null),s=(0,u.useRef)(i);(0,u.useEffect)(()=>{s.current=i},[i]),(0,u.useEffect)(()=>{let e={user:a,id:n,request:0};return o.current=e,()=>{o.current===e&&(o.current=null)}},[a,n]);let c=(0,u.useCallback)((r,i=o.current)=>{if(t.user.role!==`assistant`||!p(r))return!1;if(!i||o.current!==i||e.user!==i.user)return!0;localStorage.removeItem(`mm-order-edit-`+a+`-`+n);let c=`mm-order-edit-active-`+a;return localStorage.getItem(c)===n&&localStorage.removeItem(c),o.current=null,s.current(d),!0},[e,t.user.role,a,n]),l=(0,u.useCallback)(async()=>{let r=o.current;if(!r||e.user!==a)return!0;if(!n||t.user.role!==`assistant`)return!1;let i=++r.request;try{await e.api(`/api/orders/`+encodeURIComponent(n)+`/ownership`)}catch(t){if(o.current!==r||e.user!==a||i!==r.request)return!0;if(p(t))return c(t,r)}return o.current!==r||e.user!==a||i!==r.request},[e,n,t.user.role,a,c]),f=(0,u.useCallback)(e=>p(e)?l():Promise.resolve(!1),[l]);return(0,u.useEffect)(()=>{if(!r||t.user.role!==`assistant`)return;let n=()=>{!e.busy&&!e.pending()&&l()},i=()=>{document.visibilityState===`visible`&&n()};return window.addEventListener(`focus`,n),document.addEventListener(`visibilitychange`,i),()=>{window.removeEventListener(`focus`,n),document.removeEventListener(`visibilitychange`,i)}},[r,t.user.role,e,l]),{revoke:c,checkFailure:f}}var h=n();function g({state:e,session:t,currentOrder:n,orderChangeDetail:r,orderOwnershipDetail:i,orderCancellationDetail:a,ui:o={}}){function d(e,{zero:t=!1,optional:n=!1,signed:r=!1,title:i=`库存数量(对)`}={}){let a=String(e??``).trim();if(!a&&n)return null;if(r){if(!/^-?\d+$/.test(a)||!Number.isSafeInteger(Number(a))||Math.abs(Number(a))>1e9||Number(a)===0)throw Error(i+`请填写非0整数,增加填正数,减少填负数。`);return Number(a)}if(!/^\d+$/.test(a)||!Number.isSafeInteger(Number(a))||Number(a)>1e9||Number(a)<+!t)throw Error(i+`请填写`+(t?`非负`:`大于0的`)+`整数,一对填1。`);return Number(a)}function f(t=``){let n=[...new Set((e?.accounts||[]).map(v))].filter(e=>{let n=se(e)?.member;return!n||T(n)||e===t});return t&&!n.includes(t)&&n.push(t),n}let p=[`现货`,`金料`,`找金`,`回收旧料`,`君宝汇`];function m(){return Array.isArray(e?.pockets)?e.pockets:p}function g(e,t=``,{name:n=`stockCount`,title:r=`出库数量(对)`,optional:i=!1,readOnly:a=!1,visible:o=X(e),help:s}={}){let c=s??(i?`历史未记录对数,可保留空白;与计工费件数分别填写。`:`与计工费件数分别填写。`);return(0,h.jsxs)(`label`,{className:`stock-count-field`,"data-stock-count-field":``,hidden:!o,children:[r,(0,h.jsx)(`input`,{name:n,readOnly:a,defaultValue:t??``,type:`number`,min:`1`,max:`1000000000`,step:`1`,inputMode:`numeric`,disabled:!o,required:o&&!i,placeholder:`一对填1`}),c?(0,h.jsx)(`small`,{className:`muted`,children:c}):``]})}function _(){return e?.user?.member||t?.user?.member||(e?.user?.role===`owner`?`owner`:`assistant`)}function v(e){return typeof c==`object`&&typeof c.normalizeAccount==`function`?c.normalizeAccount(e):[`助理信用卡`,`助理1信用卡`,`助理2信用卡`,`麦麦信用卡`].includes(e)?`麦麦信用卡`:e}function y(){return Ie().filter(T)}function b(e=!1,{historical:t=!1,selected:n=``}={}){let r=(t?Ie():y()).filter(e=>Le()||e!==`assistant2`);e&&(r=[...r.filter(e=>e!==`owner`),...r.filter(e=>e===`owner`)]);let i=r.map(e=>[e,Fe(e)+(t&&!T(e)?`(已停用)`:``)]);return n&&Ie().includes(n)&&!r.includes(n)&&i.push([n,Fe(n)+`(已停用 · 原记录)`]),i}let x=(e,t,n,r)=>(r&&Ie().includes(r)&&!T(r)&&n.some(e=>Ie().includes(Array.isArray(e)?e[0]:e))&&!n.some(e=>(Array.isArray(e)?e[0]:e)===r)&&(n=[...n,[r,Fe(r)+`(已停用 · 原记录)`]]),(0,h.jsxs)(`label`,{children:[e,(0,h.jsx)(`select`,{name:t,defaultValue:r,children:w(n)})]})),S=(e,t,n=``)=>C(e,t,n,`number`,{min:`0`,step:`0.01`,required:!0}),C=(e,t,n=``,r=`text`,i={})=>(0,h.jsxs)(`label`,{children:[e,(0,h.jsx)(`input`,{type:r,name:t,defaultValue:n,...i})]}),w=e=>e.map(e=>{let[t,n,r]=Array.isArray(e)?e:[e,e];return(0,h.jsx)(`option`,{value:t,disabled:!!r,children:t===n?ce(t):n},t)});function T(t){return s.memberEnabled(e,t)}let E={confirm:`确认订单`,receipt:`登记收款`,refund:`登记退款`,expense:`直接费用`,fees:`补记旧单费用`,cost:`补齐货品成本`,deliver:`完成销售记账`,complete:`补齐旧单账务`,cancel:`取消订单`,return:`整单退货`,settlement:`实际交款`,review:`店主复核`,correct:`更正流水`,ownership:`修改订单归属`};function D(e){Line truncated
|
||||
|
||||
`)||`无已记费用`}function R(e){let t=new Set((e.corrections||[]).filter(e=>e.type===`payment`).map(e=>e.target));return e.payments.filter(e=>e.amount>0&&!t.has(e.id)).map(e=>`${e.date} · ${e.kind===`receipt`?`客户收款`:`客户退款`}\n${q(e.amount)} · ${e.account?ce(e.account):`账户未提供`}`).join(`
|
||||
|
||||
`)||`无有效收退款`}function z(e,t,n=`锁价购料成本`){if(!e.priceLockCosts&&!t.priceLockCosts)return``;if(e.priceLockCosts?.lines||t.priceLockCosts?.lines){let n=e.priceLockCosts||{},r=t.priceLockCosts||{},i=n.lines||r.lines;return u.Children.toArray(i.map((e,t)=>{let i=n.lines?.find(t=>t.lineId===e.lineId)||{},a=r.lines?.find(t=>t.lineId===e.lineId)||{};return z({priceLockCosts:{...i,date:n.date}},{priceLockCosts:{...a,date:r.date}},`商品 `+(t+1)+` · 锁价购料成本`)}))}let r=e.priceLockCosts||{},i=t.priceLockCosts||{},a=e=>e===`pool`?`原锁料池`:e===`manual`?`手填原锁料价`:`未提供`;return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(`tr`,{className:`change-section-row`,children:(0,h.jsx)(`th`,{colSpan:`3`,scope:`colgroup`,children:n})}),V(`原锁日期`,r.date,i.date),V(`原锁料费来源`,a(r.materialSource),a(i.materialSource)),V(`原锁进货料价(每克)`,q(r.buyRate),q(i.buyRate)),V(`原锁料费付款人`,r.materialSource===`pool`?`按原锁料池分摊`:K(r.buyPayer),i.materialSource===`pool`?`按原锁料池分摊`:K(i.buyPayer)),V(`原锁整批料费`,q(r.materialAmount),q(i.materialAmount)),V(`补重进货料价(每克)`,q(r.extraRate),q(i.extraRate)),V(`补重料费付款人`,r.extraPayer?K(r.extraPayer):`无补重`,i.extraPayer?K(i.extraPayer):`无补重`)]})}function B(e,t){if(!e)return`无此商品`;let n=q;if(t===`name`)return`${e.name||`未填写`}${e.priceNote?`
|
||||
`+e.priceNote:``}`;if(t===`code`)return e.code||`未填写`;if(t===`quantity`)return e.unit===`g`?Te(e.quantity)+`g`:String(e.quantity)+`件`;if(t===`sale`)return n(e.sale);if(t===`pricing`)return e.goldPrice==null?`手填基础金额 ${n(e.baseSale??e.sale)}`:`销售金价 ${n(e.goldPrice)}/克\n${e.laborMode===`gram`?`销售克工费`:`销售件工费`} ${n(e.laborRate)}${e.laborMode===`gram`?`/克`:`/件`}\n件数 ${e.pieces??`未填写`}`;if(t===`stockCount`)return Number.isSafeInteger(e.stockCount)||X(e.pocket)?Y(e.stockCount):`不记录对数`;if(t===`pocket`)return Z(e.pocket)||`外配/不扣黄金`;if(t===`charges`)return e.charges?.length?e.charges.map(e=>`${e.name}:${n(e.amount)}`).join(`
|
||||
`):`无附加收费`;if(t===`cost`)return n(e.cost);if(t===`material`){let t=e.costMaterial;return t?.mode===`pool`?`每日购料:${t.poolId}\n本行料费:${n(e.costParts?.material)}${e.materialPool?.allocations?.length?`
|
||||
`+e.materialPool.allocations.map(e=>K(e.payer)+` `+n(e.amount)).join(`;`):e.costParts?.material==null?`
|
||||
待补采购后分摊`:``}`:`${t?.mode===`gram`?`每克料价 `+n(t.rate)+`/克`:`料费总额`}\n${n(e.costParts?.material)}`}return t===`labor`?`${e.costLabor?.mode===`gram`?`进货克工费 `+n(e.costLabor.rate)+`/克`:`进货总工费`}\n${n(e.costParts?.labor)}`:t===`extra`?e.costParts?`配件 ${n(e.costParts.accessories)}\n其他 ${n(e.costParts.other)}`:`原货品成本未分项`:t===`payers`?`料费:${e.costMaterial?.mode===`pool`?e.materialPool?.allocations?.map(e=>K(e.payer)+` `+n(e.amount)).join(`;`)||`按真实采购分摊`:K(e.costPayers?.material??e.payer)}\n进货工费:${K(e.costPayers?.labor??e.payer)}\n配件及其他:${K(e.payer)}`:``}function V(e,t,n){let r=String(t??``)!==String(n??``);return(0,h.jsxs)(`tr`,{...r?{className:`order-change-modified`}:{},children:[(0,h.jsxs)(`th`,{scope:`row`,children:[e,r?(0,h.jsx)(`span`,{className:`change-mark`,children:`已修改`}):``]}),(0,h.jsx)(`td`,{children:G(t)}),(0,h.jsx)(`td`,{children:G(n)})]})}function H(e){if(e===void 0)return[];let t=e=>e===null||Number.isSafeInteger(e)&&e>=0,n=e=>e&&t(e.materialAmount)&&[`usedMaterialAmount`,`leftoverCost`].every(n=>!Object.hasOwn(e,n)||t(e[n]))&&Array.isArray(e.allocations)&&e.allocations.every(e=>Ie().includes(e.payer)&&Number.isSafeInteger(e.amount)&&e.amount>=0)&&(e.materialAmount===null||e.allocations.reduce((e,t)=>e+t.amount,0)===e.materialAmount);if(!Array.isArray(e)||!e.every(e=>e&&typeof e.id==`string`&&e.id&&Oe(e.date)&&n(e.before)&&n(e.after)))throw Error(`关联锁价单的成本影响未完整返回,请重新读取后复核。`);return e}function U(e,t){let n=t=>t&&t.id===e.order_id&&Number.isSafeInteger(t.total)&&Array.isArray(t.lines)&&Array.isArray(t.expenses)&&Array.isArray(t.payments),r=e=>e===null||Number.isSafeInteger(e);if(!e||typeof e.id!=`string`||!e.id||typeof e.order_id!=`string`||t&&e.order_id!==t||!Object.hasOwn(ne,e.status)||!Number.isSafeInteger(e.order_revision)||typeof e.reason!=`string`||typeof e.requester_name!=`string`||typeof e.created!=`string`||typeof e.stale!=`boolean`||typeof e.canApprove!=`boolean`||!n(e.before)||!n(e.after)||![`before`,`after`].every(t=>e.summary?.[t]&&[`total`,`netReceived`,`directCost`].every(n=>Number.isSafeInteger(e.summary[t][n]))&&[`goodsCost`,`profit`,`settlementDue`].every(n=>r(e.summary[t][n]))))throw Error(`修改申请资料未完整返回,请重新读取订单后复核。`);if(e.relatedOrders!==void 0){if(!Array.isArray(e.relatedOrders))throw Error(`关联订单的修改影响未完整返回,请重新读取后复核。`);e.relatedOrders.forEach(t=>U({...e,order_id:t.id,before:t.before,after:t.after,summary:t.summary,relatedOrders:[]}))}if(H(e.relatedPriceLocks),e.action!==void 0&&!Object.hasOwn(re,e.action))throw Error(`变更申请类型未完整返回,请重新读取后复核。`);let i=e.summary.inventory;if(i!==void 0&&(!i||![`before`,`after`,`changes`].every(e=>Array.isArray(i[e])&&i[e].every(e=>typeof e.date==`string`&&typeof e.pocket==`string`&&Number.isSafeInteger(e.mg)))))throw Error(`变更申请库存摘要未完整返回,请重新读取后复核。`);return e}function W(e){let t=U(e),n=t.before,r=t.after,i=(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)(h.Fragment,{children:[u.Children.toArray([[`业务日期`,`date`],[`客户称呼/代号`,`customer`],[`开单人`,`salesperson`],[`收款方式与收款人`,`payment_account`],[`客户单备注`,`note`],[`内部备注(客户不可见)`,`internal_note`]].map(([e,t])=>V(e,t===`payment_account`?ce(n[t]):n[t],t===`payment_account`?ce(r[t]):r[t]))),V(`成交取整方式`,n.rounding_mode===`yuan`?`四舍五入到整数元`:`保留到分`,r.rounding_mode===`yuan`?`四舍五入到整数元`:`保留到分`)]}),V(`新增费用默认支付日期`,n.fees_date||n.date,r.fees_date||r.date)]}),V(`交付日期`,n.delivered_date,r.delivered_date)]}),a=u.Children.toArray([[`成交金额`,`total`],[`收款净额`,`netReceived`],[`货品成本`,`goodsCost`],[`实际费用合计`,`directCost`],[`利润`,`profit`],[`双方待结净额`,`settlementDue`]].map(([e,n])=>V(e,q(t.summary.before[n]),q(t.summary.after[n])))),o=u.Children.toArray(Array.from({length:Math.max(n.lines.length,r.lines.length)},(e,t)=>(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(`tr`,{className:`change-section-row`,children:(0,h.jsxs)(`th`,{colSpan:`3`,scope:`colgroup`,children:[`商品 `,t+1]})}),u.Children.toArray([[`商品与销售计价说明`,`name`],[`商品编号`,`code`],[`克重/数量`,`quantity`],[`销售金价、工费与件数`,`pricing`],[`成交金额(含附加收费)`,`sale`],[`客户附加收费`,`charges`],[`货盘`,`pocket`],[`出库数量(对)`,`stockCount`],[`货品成本合计`,`cost`],[`进货料价与料费`,`material`],[`进货工费`,`labor`],[`其他货品成本`,`extra`],[`成本付款人`,`payers`]].map(([e,i])=>V(e,B(n.lines[t],i),B(r.lines[t],i))))]}))),s=u.Children.toArray((t.relatedOrders||[]).map(e=>(0,h.jsxs)(`section`,{classNameLine truncated
|
||||
`).map((e,t)=>(0,h.jsxs)(u.Fragment,{children:[t>0&&(0,h.jsx)(`br`,{}),e]},t))}function K(e){return e?Fe(e):`待补齐`}function q(e){return e==null?`待补齐`:`¥`+Re(e)}function J(e){try{return q(l.cents(e))}catch{return`金额未提供`}}function Y(e,{signed:t=!1,unknown:n=`未记录对数`}={}){return Number.isSafeInteger(e)?(t&&e>0?`+`:``)+e+`对`:n}function X(t){return!!t&&e?.pocketCatalog?.some(e=>e.key===t&&e.countUnit===`pair`)===!0}function Z(t){return e?.pocketCatalog?.find(e=>e.key===t)?.name||String(t??``)}function Q(e){if(!e||!Array.isArray(e.lines)||!e.lines.length||!e.lines.every(e=>[`quantity`,`materialReturnedCost`,`laborRestockedCost`,`costLoss`].every(t=>Number.isSafeInteger(e[t])))||!e.summary||![`refundAmount`,`retainedAmount`,`materialReturnedCost`,`laborRestockedCost`,`costLoss`,`directCost`,`profit`,`profitAdjustment`].every(t=>Number.isSafeInteger(e.summary[t])))throw Error(`售后核算资料未完整返回,请重新读取订单。`);return e}function $(e,{preview:t=!1}={}){let n=Q(e),r=n.summary,i=e=>`¥`+Re(e),a=[[`实际退款`,r.refundAmount],[`扣留客户款`,r.retainedAmount],[`回料池原料成本`,r.materialReturnedCost],[`现货保留工费`,r.laborRestockedCost],[`本单货品成本损失`,r.costLoss],[`售后最终利润`,r.profit],[`本次售后利润调整`,r.profitAdjustment]];return(0,h.jsxs)(`section`,{className:`order-after-sale-summary`+(t?` is-preview`:``),"aria-label":t?`售后核对预览`:`已保存售后详情`,children:[(0,h.jsxs)(`div`,{className:`panel-title`,children:[(0,h.jsx)(`h3`,{children:t?`售后核对预览`:`售后处理结果`}),(0,h.jsx)(`span`,{className:`badge`,children:t?`尚未保存`:`已记账`})]}),(0,h.jsx)(`dl`,{className:`order-after-sale-totals`,children:u.Children.toArray(a.map(([e,t])=>(0,h.jsxs)(`div`,{children:[(0,h.jsx)(`dt`,{children:e}),(0,h.jsx)(`dd`,{...t<0?{className:`danger-text`}:{},children:i(t)})]})))}),(0,h.jsx)(`div`,{className:`table-wrap`,children:(0,h.jsxs)(`table`,{"aria-label":`逐件售后回库与成本`,children:[(0,h.jsx)(`thead`,{children:(0,h.jsxs)(`tr`,{children:[(0,h.jsx)(`th`,{children:`商品与实际去向`}),(0,h.jsx)(`th`,{children:`实际退回`}),(0,h.jsx)(`th`,{children:`回料成本`}),(0,h.jsx)(`th`,{children:`保留工费`}),(0,h.jsx)(`th`,{children:`成本损失`})]})}),(0,h.jsx)(`tbody`,{children:u.Children.toArray(n.lines.map(e=>(0,h.jsxs)(`tr`,{children:[(0,h.jsxs)(`td`,{children:[e.name||`商品 `+(e.lineIndex+1),(0,h.jsxs)(`div`,{className:`small muted`,children:[Z(e.pocket),` · `,e.disposition===`stock`?`完好现货`:`旧料/损坏`]})]}),(0,h.jsxs)(`td`,{children:[Te(e.quantity),`g`,e.disposition===`stock`&&X(e.pocket)?(0,h.jsx)(`div`,{className:`small`,children:Y(e.stockCount)}):``]}),(0,h.jsx)(`td`,{children:i(e.materialReturnedCost)}),(0,h.jsx)(`td`,{children:i(e.laborRestockedCost)}),(0,h.jsx)(`td`,{children:i(e.costLoss)})]})))})]})}),(0,h.jsx)(`p`,{className:`small muted`,children:`实退材料按原成本回售后日料池,不新增采购付款。完好现货工费留在退回现货批次;旧料工费与未退回材料成本计损失。原单实际费用继续保留。`})]})}function ee(e){let t=e.action||`edit`,n=e.action_input||e.action_details||{};if(t===`edit`)return``;if(n.afterSale){let t=me(e.after);return(0,h.jsxs)(`section`,{className:`order-change-action-summary`,children:[(0,h.jsx)(`h3`,{children:`本次售后申请`}),(0,h.jsxs)(`p`,{children:[`售后日期:`,n.date,` · 申请原因:`,e.reason]}),$(t,{preview:!0})]})}let r=[[`申请动作`,ie(e)],[`业务日期`,n.date||e.after.returned_date||e.after.date]];return n.amount!==void 0&&r.push([`本次金额`,J(n.amount)]),n.account&&r.push([`退款账户`,ce(n.account)]),n.payer&&r.push([`实际付款人`,K(n.payer)]),n.note&&r.push([`费用项目/说明`,n.note]),n.reference&&r.push([`退款凭据备注`,n.reference]),Array.isArray(n.returnCounts)&&r.push([`实际退回数量(对)`,n.returnCounts.map((e,t)=>`商品 `+(t+1)+`:`+Y(e==null?null:Number(e))).join(`
|
||||
`)]),Array.isArray(n.returnPockets)&&r.push([`退货实物去向`,n.returnPockets.map((t,n)=>`${e.before.lines[n]?.name||`商品 `+(n+1)}:${Z(t)||`退供应商/不留黄金货盘`}`).join(`
|
||||
`)]),Array.isArray(n.fee_items)&&r.push([`本次旧费用`,n.fee_items.map(e=>`${e.note||`费用`}:${J(e.amount)} · ${K(e.payer)}支付`).join(`
|
||||
`)]),(0,h.jsxs)(`section`,{className:`order-change-action-summary`,children:[(0,h.jsx)(`h3`,{children:`本次申请动作`}),(0,h.jsx)(`dl`,{className:`order-change-action-facts`,children:u.Children.toArray(r.map(([e,t])=>(0,h.jsxs)(`div`,{children:[(0,h.jsx)(`dt`,{children:e}),(0,h.jsx)(`dd`,{children:G(t)})]})))}),(0,h.jsx)(`p`,{className:`small muted`,children:`下方对照为服务器试算;批准后才登记这笔变更,不会由系统发起真实收款、退款或转账。`})]})}function te(e){let t=new Date(e);return Number.isNaN(t.getTime())?`时间未提供`:t.toLocaleString(`zh-CN`)}let ne={pending:`待店主复核`,approved:`已同意变更`,rejected:`已驳回`},re={edit:`修改订单`,expense:`费用补记`,fees:`旧费用核实`,refund:`退款`,return:`退货`,cost:`成本补录`};function ie(e){return(e.action_input||e.action_details)?.afterSale?`处理订单售后`:e.action_label||re[e.action||`edit`]||`订单变更`}let ae={pending:`待店主复核`,approved:`已同意取消`,rejected:`已驳回`};function oe(e){let t=new Date(e);return Number.isNaN(t.getTime())?`时间未提供`:t.toLocaleString(`zh-CN`)}let se=e=>s.accountIdentity(Ie(),e);function ce(e){let t=se(e);return t?Fe(t.member)+t.channel:e}function le(e){if(!e||![`total`,`netReceived`,`directCost`].every(t=>Number.isSafeInteger(e[t]))||![`goodsCost`,`profit`,`settlementDue`].every(t=>e[t]===null||Number.isSafeInteger(e[t]))||!Array.isArray(e.inventory)||!e.inventory.every(e=>typeof e.date==`string`&&typeof e.pocket==`string`&&Number.isSafeInteger(e.mg)))throw Error(`取消撤销摘要未完整返回,请重新读取订单。`);return e}function ue(e=n){let t=Se(e)?.data;if(!t?.eligible||t.pending||t.directToday!==!0||!/^\d{4}-\d{2}-\d{2}$/.test(t.directActionDate||``)||e.date!==t.directActionDate||e.price_lock_id||![`draft`,`confirmed`,`delivered`].includes(e.status))return!1;try{return le(t.summary),!0}catch{return!1}}function de(t,r=e.today,i=n){let a=ye(i)?.data;return[`expense`,`fees`,`refund`,`return`].includes(t)&&!!a&&!a.pending&&/^\d{4}-\d{2}-\d{2}$/.test(a.directActionDate||``)&&a.actions?.[t]?.directToday===!0&&i.date===a.directActionDate&&r===a.directActionDate&&!(o.action===t&&o.forceApproval)}function fe(t){return e.user.role===`assistant`&&[`expense`,`fees`,`refund`,`return`,`cost`].includes(t)}function pe(t,n=e.today){return fe(t)&&!de(t,n)}function me(e){return e?.orderAfterSale||null}function he(){return t?.user?.id||``}function ge(e=n){return e&&i?.id===e.id&&i.user===he()&&i.revision===e.revision?i:null}function _e(e=n){return ge(e)?.data?.pending||e?.ownershipPending||null}function ve(){return t?.user?.id||``}function ye(e=n){return e&&r?.id===e.id&&r.user===ve()&&r.revision===e.revision?r:null}function be(e){return ye(e)?.data?.pending||e?.changePending||null}function xe(){return t?.user?.id||``}function Se(e=n){return e&&a?.id===e.id&&a.user===xe()&&a.revision===e.revision?a:null}function Ce(e){return Se(e)?.data?.pending||e.cancellationPending||null}function we(e){if([`afterSale`,`orderAfterSale`].includes(e.kind))return``;let t=e.printStatus?.printed;return(0,h.jsx)(`span`,{"data-print-kind":e.printStatus?.kind||(e.kind===`recovery`?`recovery`:`order`),"data-print-id":e.printStatus?.id||e.id,className:`document-print-badge `+(t?`is-printed`:`is-unprinted`),title:t?`已记录打印操作`:`尚未记录打印操作`,children:t?`✓ 已打印`:`未打印`})}let Te=s.grams,Ee=e=>String(e??``),De=new Intl.DateTimeFormat(`zh-CN`,{timeZone:`Asia/Shanghai`,year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,hourCycle:`h23`}),Oe=s.validDate;function ke(e){if(typeof e!=`string`||!/^\d{4}-\d{2}-\d{2}T(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d{1,3})?)?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/.test(e)||!Oe(e.slice(0,10)))return`未记录`;let t=new Date(e);if(Number.isNaN(t.getTime()))return`未记录`;let n=Object.fromEntries(De.formatToParts(t).map(e=>[e.type,e.value]));return`${n.year}-${n.month}-${n.day} ${n.hour}:${n.minute}`}function Ae(e){return(0,h.jsxs)(`div`,{className:`small muted order-entry-time`,children:[`录入时间(北京时间):`,ke(e.created)]})}function je(e){return![`afterSale`,`orderAfterSale`,`recovery`].includes(e.kind)&&Number.isSafeInteger(e.revision)&&e.revision>0&&e.reviewed_revision===e.revision}let Me={draft:`旧草稿`,confirmed:`旧单待补齐`,delivered:`已完成`,returned:`已退货`,cancelled:`已取消`,after_sale:`售后`,recovery:`回收`},Ne=e=>(0,h.jsx)(`span`,{className:`order-status `+([`draft`,`confirmed`].includes(e.status)?`danger-text`:`muted`),children:Me[e.status]||e.status}),Pe=(e,t,n=``,r={})=>(0,h.jsx)(`button`,{type:`button`,"data-action":t,className:n,...r,children:e});function Fe(n){return e?.shopSettings?.members?.find(e=>e.member===n)?.label||e?.members?.find(e=>e.member===n)?.label||t?.loginOptions?.find(e=>e.member===n)?.label||{owner:`麦麦`,assistant:`娜娜`,assistant2:`小昊`}[n]||`待确认`}function Ie(){return s.memb
Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{n as e}from"./rolldown-runtime-Dl_DZoUm.js";import{i as t,t as n}from"./react-1o5M9n0k.js";import{l as r,o as i,s as a,u as o}from"./index-D-ox0wtk.js";import{n as s,r as c}from"./materialQuote--cXNGK6N.js";import{c as l,n as u,o as d,t as f}from"./shared-DZLPF0cC.js";import{f as p,o as m}from"./model-BDHsEKmI.js";var h=e(t(),1),g=n();function _(e,t){let n=(t,n)=>c(t,n,d.memberKeys(e));function r(e,t){let n=t,r=[],i=[];if(!Array.isArray(e.materialSources)||e.materialSources.reduce((e,t)=>e+t.quantity,0)!==e.quantity||e.materialSources.reduce((e,t)=>e+t.amount,0)!==e.amount)throw Error(`原锁分来源克重或成本未完整读到,请重新读取。`);for(let t of e.materialSources){if(![`quantity`,`amount`,`basisAmount`,`basisMg`,`prefixMg`,`prefixAmount`].every(e=>Number.isSafeInteger(t[e])&&t[e]>=0)||!t.basisMg||!Array.isArray(t.allocations)||t.allocations.reduce((e,t)=>e+t.amount,0)!==t.amount)throw Error(`原锁分来源成本未完整读到,请重新读取。`);let e=Math.min(n,t.quantity);if(n-=e,!e){i.push({...t});continue}if(e===t.quantity){r.push({...t});continue}let a=f.poolMaterialAmount(t.basisAmount,t.basisMg,t.prefixMg+e)-t.prefixAmount,o=[],s=[],c=a;for(let e of t.allocations){let t=Math.min(c,e.amount);t&&o.push({...e,amount:t}),e.amount>t&&s.push({...e,amount:e.amount-t}),c-=t}if(c||a<0||a>t.amount)throw Error(`原锁分来源分币未完整读到,请重新读取。`);!a&&!o.length&&o.push({payer:t.allocations[0]?.payer||`owner`,amount:0});let l=[],u=[],d=e;for(let e of t.batches||[]){let t=Math.min(d,e.mg);t&&l.push({...e,mg:t}),e.mg>t&&u.push({...e,mg:e.mg-t}),d-=t}r.push({...t,quantity:e,amount:a,allocations:o,batches:l}),i.push({...t,quantity:t.quantity-e,amount:t.amount-a,allocations:s,batches:u,prefixMg:t.prefixMg+e,prefixAmount:t.prefixAmount+a})}if(n)throw Error(`实际耗料超过原锁来源克重。`);return{taken:r,rest:i}}function i(e){let t=String(e??``).trim();if(!/^\d+(?:\.\d{1,3})?$/.test(t))throw Error(`克重请填写正数,最多3位小数。`);let[n,r=``]=t.split(`.`),i=Number(n)*1e3+Number(r.padEnd(3,`0`));if(!Number.isSafeInteger(i)||i<=0)throw Error(`克重请填写大于0的有效数字。`);return i}function a(e,t,n){if(!z(e))return f.priceLockCost({lockedQuantity:H(e.locked_mg),quantity:t,buyRate:(e.buy_rate/100).toFixed(2),extraBuyRate:n});let a=e.materialPool,o=i(t),s=Math.min(o,e.locked_mg),c=Math.max(0,o-e.locked_mg),l=e.locked_mg-s;if(!a||![`basisAmount`,`basisMg`,`prefixMg`,`prefixAmount`,`amount`].every(e=>Number.isSafeInteger(a[e])&&a[e]>=0)||!a.basisMg)throw Error(`原锁料池成本来源未完整读到,请重新读取锁价单。`);let u=a.materialSources?r(a,s):null,d=u?u.taken.reduce((e,t)=>e+t.amount,0):f.poolMaterialAmount(a.basisAmount,a.basisMg,a.prefixMg+s)-a.prefixAmount,p=c?f.cents(n,`补重进货料价`):0;if(c&&!p)throw Error(`补重进货料价必须大于0。`);let m=c?Number((BigInt(c)*BigInt(p)+500n)/1000n):0,h=d,g=[];for(let t of u?u.taken.flatMap(e=>e.allocations):N(e)){let e=Math.min(h,t.amount);(e||!d&&!g.length)&&g.push({payer:t.payer,amount:e}),h-=e}if(h||d<0||d>a.amount)throw Error(`原锁料池成本分摊不完整,请重新读取锁价单。`);return{lockedMg:e.locked_mg,finalMg:o,originalUsedMg:s,extraMg:c,leftoverMg:l,originalPurchase:a.amount,originalUsedCost:d,extraCost:m,materialCost:d+m,leftoverCost:a.amount-d,allocations:g,...u?{materialSources:u.taken,leftoverMaterialSources:u.rest}:{}}}function o(e){let t=e.line,n=N(e)[0]?.payer||e.buy_payer||`owner`;return{...t,quantity:H(e.locked_mg),goldPrice:(e.sell_rate/100).toFixed(2),laborRate:(t.laborRate/100).toFixed(2),sale:(t.sale/100).toFixed(2),baseSale:((t.baseSale??t.sale)/100).toFixed(2),charges:(t.charges||[]).map(e=>({...e,amount:(e.amount/100).toFixed(2)})),payer:n,costParts:{material:(e.material_amount/100).toFixed(2),labor:``,accessories:`0`,other:`0`},costMaterial:{mode:`total`},costLabor:{mode:`total`},costPayers:{material:n,labor:`owner`}}}function u(e){return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)(`div`,{className:`order-header`,children:[(0,g.jsx)(`div`,{className:`eyebrow`,children:`GOLD PRICE LOCK`}),(0,g.jsxs)(`h2`,{children:[e.customer,` · `,U(e).length,`件黄金锁价`]})]}),_(e),U(e).length===1?E(e):``,(0,g.jsxs)(`p`,{className:`small muted`,children:[`预计报价 ¥`,V(e.estimated_total),`;交付时按最终克重、工费和附加项目重新结算,销售金价保持原锁价格。`]}),e.note?(0,g.jsx)(g.Fragment,{children:(0,g.jsx)(`p`,{children:e.note})}):``,e.status===`cancelled`?(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)(`p`,{className:`note`,children:[`已作废 · `,e.cancelled_reason||`原单记录保留`,(0,g.jsx)(`br`,{}),e.cancelled_at||``]})}):``,(0,g.jsx)(`div`,{className:`actions`,children:e.status===`pending`?(0,g.jsxs)(g.Fragment,{children:[j(`办理交付`,`deliver-price-lock`,`primary`,{"data-id":e.id}),A(e)]}):e.final_order_id?j(`查看销售单`,`open-lock-order`,`primary`,{"data-id":e.final_order_id}):``Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{n as e}from"./rolldown-runtime-Dl_DZoUm.js";import{i as t,t as n}from"./react-1o5M9n0k.js";import{S as r,o as i,z as a}from"./index-D-ox0wtk.js";import{y as o}from"./skeleton-B4Z0R3jQ.js";import{i as s}from"./style-CBKkTdLU.js";import{t as c}from"./typography-xRg_3Gco.js";import{o as l}from"./shared-DZLPF0cC.js";var u=e(t(),1),d=`/api/private-operations/people`,f=e=>e===null?`未记录`:e.toLocaleString(`zh-CN`);function p(e){let[t,n]=(0,u.useState)(null);return(0,u.useEffect)(()=>{let t=!0;return e().then(r=>{t&&n({read:e,result:{data:r}})},r=>{t&&n({read:e,result:{error:r.message}})}),()=>{t=!1}},[e]),t?.read===e?t.result:null}var m=n();function h({client:e,state:t,members:n,initial:r,close:i,saved:s,recover:c}){let[f,h]=(0,u.useState)(r),g=(0,u.useRef)(null);(0,u.useLayoutEffect)(()=>{let e=g.current;return e.showModal(),()=>{e.close()}},[]);let _=t.user.role===`owner`,v=p((0,u.useCallback)(async()=>{let t=await e.api(d+`?`+new URLSearchParams({member:f.member,date:f.date}));if(t.member!==f.member||t.date!==f.date||!Number.isSafeInteger(t.revision))throw Error(`记录未完整返回`);return t},[e,f])),[y,b]=(0,u.useState)(null),[x,S]=(0,u.useState)(null),C=v&&`data`in v?v.data:null,w=y?.value??String(C?.total_count??``);function T(e){h(e),b(null),S(null)}function E(){T({...f})}async function D(t){if(t.preventDefault(),C){S(null);try{await e.mutate(d,{date:C.date,member:C.member,total_count:w,revision:C.revision}),s()}catch(e){S(e)}}}return(0,m.jsxs)(`dialog`,{ref:g,"aria-labelledby":`private-people-title`,className:`private-people-modal`,id:`private-people-dialog`,onCancel:t=>{t.preventDefault(),e.busy||i()},children:[(0,m.jsxs)(`div`,{className:`ops-heading`,children:[(0,m.jsx)(`h2`,{id:`private-people-title`,children:`记录人数`}),(0,m.jsx)(o,{"aria-label":`关闭`,"data-action":`private-people-close`,disabled:e.busy,onClick:i,children:`×`})]}),(0,m.jsxs)(`form`,{id:`private-people-form`,className:`ops-form`,onSubmit:D,children:[(0,m.jsxs)(`div`,{className:`ops-fields`,children:[(0,m.jsxs)(`label`,{children:[`日期`,(0,m.jsx)(`input`,{type:`date`,name:`date`,required:!0,max:t.today,value:f.date,onChange:e=>T({...f,date:e.target.value})})]}),_?(0,m.jsxs)(`label`,{children:[`员工`,(0,m.jsx)(`select`,{name:`member`,value:f.member,onChange:e=>T({...f,member:e.target.value}),children:n.map(e=>(0,m.jsxs)(`option`,{value:e.member,children:[e.label,e.enabled===!1&&`(已停用)`]},e.member))})]}):(0,m.jsxs)(`div`,{children:[(0,m.jsx)(`span`,{className:`muted`,children:`员工`}),(0,m.jsx)(`p`,{children:l.memberName(t,f.member)}),(0,m.jsx)(`input`,{type:`hidden`,name:`member`,value:f.member})]})]}),(0,m.jsxs)(`div`,{id:`private-people-fields`,children:[!v&&(0,m.jsx)(`p`,{className:`muted`,children:`正在读取记录…`}),v&&`error`in v&&(0,m.jsx)(a,{type:`error`,showIcon:!0,message:v.error,action:(0,m.jsx)(o,{"data-action":`private-people-retry`,onClick:E,children:`重新读取`})}),C&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`p`,{className:`muted`,children:C.previous?`上次记录:`+C.previous.date+`,总人数 `+C.previous.total+`。`:`还没有更早的总人数记录,本次可作为基准。`}),(0,m.jsxs)(`div`,{className:`ops-fields`,children:[(0,m.jsxs)(`label`,{children:[`当天总人数(必填)`,(0,m.jsx)(`input`,{type:`number`,name:`total_count`,required:!0,min:`0`,max:`1000000`,step:`1`,inputMode:`numeric`,placeholder:`填写微信总人数`,value:w,onChange:e=>b({value:e.target.value,valid:e.target.validity.valid})})]}),(0,m.jsxs)(`div`,{children:[(0,m.jsx)(`span`,{className:`muted`,children:`今日新增人数(自动计算)`}),(0,m.jsx)(`p`,{id:`private-people-delta`,"aria-live":`polite`,children:C.previous?w?y?.valid===!1?`请填写有效的总人数`:Number(w)-C.previous.total+` 人`:`填写总人数后自动计算`:`首次记录,作为基准`})]})]}),(0,m.jsx)(`p`,{className:`muted`,children:`前一天没记录时,对比上一次有记录的日期。首次登记作为基准;补记或修改历史总人数后,后续增量会自动重算。人数减少时如实显示负数。`}),(0,m.jsxs)(`div`,{className:`ops-actions`,children:[(0,m.jsx)(o,{"data-action":`private-people-close`,disabled:e.busy,onClick:i,children:`取消`}),(0,m.jsx)(o,{type:`primary`,htmlType:`submit`,disabled:e.busy,children:`保存人数`})]})]})]}),(0,m.jsxs)(`div`,{"aria-live":`polite`,id:`private-people-error`,children:[x&&(0,m.jsx)(a,{type:`error`,showIcon:!0,message:x.message,action:x.status===409&&(0,m.jsx)(o,{"data-action":`private-people-retry`,onClick:E,children:`重新读取后核对`})}),e.pending()?.url===`/api/private-operations/people`&&!e.busy&&(0,m.jsx)(o,{"data-action":`retry`,onClick:()=>void c(),children:`恢复原操作`})]})]})]})}function g({data:e,open:t}){let n=e.rows.filter(e=>e.total!==null),r=new Set(n.map(e=>e.member)),i=e.members.filter(e=>r.has(e.member)),a=[...new Set(n.map(e=>e.date))].sort(),s=new Map(n.map(e=>[e.date+`|`+e.member,e]));return(0,m.jsxs)(mLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
.private-ops-page{padding-bottom:24px}.ops-panel{background:var(--white);border:1px solid var(--border);border-radius:12px;min-width:0;margin-bottom:16px;padding:20px}.ops-panel h2{color:var(--ink);margin:0 0 12px;font-size:17px}.ops-heading{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px;display:flex}.ops-heading h2{margin:0}.ops-panel small{color:var(--muted);font-weight:400;display:block}.ops-panel p,.private-people-modal p{margin:10px 0}.ops-scroll{width:100%;overflow:auto}.ops-scroll table{border-collapse:collapse;width:100%;color:var(--ink);font-variant-numeric:tabular-nums}.ops-scroll th,.ops-scroll td{border-bottom:1px solid var(--border);text-align:right;white-space:nowrap;padding:9px}.ops-scroll thead{background:var(--paper)}.ops-scroll :is(th,td):first-child{text-align:left}.ops-form label{color:var(--ink);flex-direction:column;gap:4px;font-weight:500;display:flex}.ops-form input,.ops-form select{border:1px solid var(--border-strong);color:var(--ink);background:var(--white);font:inherit;border-radius:7px;width:100%;min-width:0;height:38px;padding:0 8px}.ops-filter,.ops-actions{flex-wrap:wrap;align-items:end;gap:8px;display:flex}.ops-filter{gap:14px}.ops-fields{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;display:grid}.ops-form .ops-actions{margin-top:10px}.private-people-modal .ant-alert{margin:10px 0}@media (width<=600px){.ops-panel{padding:12px}.ops-filter label{flex:125px}}.private-people-modal{border:1px solid var(--border);width:min(520px,100% - 24px);max-height:90dvh;color:var(--ink);background:var(--white);border-radius:12px;padding:24px;overflow:auto;box-shadow:0 16px 48px #233d3533}.private-people-modal::backdrop{background:#1b2b246b}.private-people-modal h2{margin:0;font-size:20px}
|
||||
@@ -0,0 +1,4 @@
|
||||
import{n as e}from"./rolldown-runtime-Dl_DZoUm.js";import{i as t,t as n}from"./react-1o5M9n0k.js";import{i as r,n as i,r as a,u as o}from"./data-eE5dxIXS.js";import{a as s,n as c,o as l}from"./index-D-ox0wtk.js";import{t as u}from"./printStatus-DCPEAOZ9.js";import{c as d,n as f,o as p,t as m}from"./shared-DZLPF0cC.js";import{n as h,r as g,t as _}from"./materialQuote--cXNGK6N.js";var v=e(t(),1),y={exports:{}};(function(e){let t={direct:`直接回收`,exchange:`置换`},n=e=>String(e??``).trim(),r=[`new_name`,`new_quantity`,`pocket`,`stockCount`,`labor_mode`,`labor_rate`,`cost_labor_mode`,`cost_labor_value`,`labor_payer`];function i(e,t,r,{zero:i=!0}={}){let a=n(e);if(!RegExp(`^\\d+(?:\\.\\d{1,`+t+`})?$`).test(a))throw Error(`${r}请填写${i?`不小于0`:`大于0`}的数字,最多保留${t}位小数。`);let[o,s=``]=a.split(`.`),c=BigInt(o)*10n**BigInt(t)+BigInt(s.padEnd(t,`0`));if(c>100000000000n||!i&&c===0n)throw Error(`${r}超出范围或尚未填写。`);return Number(c)}function a(e,t=`回收/置换合计`){if(!Number.isSafeInteger(e)||Math.abs(e)>1e11)throw Error(t+`超出支持范围,请核对。`);return e}function o(e,t){return a(Number((BigInt(e)*BigInt(t)+500n)/1000n))}function s(e){return{new_name:e.name,new_quantity:e.quantity,pocket:e.pocket,stockCount:e.stockCount??``,labor_mode:e.labor_mode,labor_rate:e.labor_rate,cost_labor_mode:e.cost_labor?.mode||`total`,cost_labor_value:e.cost_labor?.mode===`gram`?e.cost_labor.rate:e.cost_labor?.amount??``,labor_payer:e.cost_labor_payer}}function c(e){return[e,...e.extra_products||[]].reduce((e,t)=>a(e+i(t.new_quantity,3,`新货克重`,{zero:!1})),0)}function l(e){return e.independent_products?{...e,independent_products:!1,extra_products:(e.extra_products||[]).map(e=>Object.fromEntries(r.map(t=>[t,e[t]]))),...e.extra_products?.length?{buy_total_manual:!1,buy_total:``,depreciation_manual:!1}:{},verified:!1,shared_old_notice:e.extra_products?.length?`已恢复为一份来料,沿用上方第一份来料;请核对实际总克重。`:``}:e}function u(e){if(e.mode===`exchange`&&e.exchange?.items)return d(e);if(!Object.hasOwn(t,e.mode))throw Error(`请选择直接回收或置换。`);let n=(e.old_lines||[]).map(e=>{let t=i(e.incoming_weight,3,`来料重量`,{zero:!1}),n=i(e.melted_weight,3,`熔后重量`,{zero:!1}),r=i(e.purity,3,`成色`,{zero:!1});if(n>t)throw Error(`熔后重量不能大于来料重量,请核对。`);if(r>1e5)throw Error(`成色请填写0到100之间的百分数,例如99表示99%。`);let a=Number((BigInt(n)*BigInt(r)+50000n)/100000n);if(a<=0)throw Error(`折后重量须至少为0.001g,请核对重量和成色。`);return{...e,incomingMg:t,meltedMg:n,purity:r/1e3,foldedMg:a}});if(!n.length)throw Error(`请填写旧料重量。`);let r=a(n.reduce((e,t)=>e+t.foldedMg,0),`旧料总重量`),s=i(e.buy_rate,2,`回收单价`),c=0,l=0,u=0,f=r,p=0,m=0,h=0,g=0,_=0,v=0,y=0,b=0;if(e.mode===`exchange`){let t=e.exchange||{};c=t.products?a(t.products.reduce((e,t)=>e+i(t.quantity,3,`新货克重`,{zero:!1}),0)):i(t.quantity,3,`新货克重`,{zero:!1}),l=Math.min(r,c),u=Math.max(0,c-r),f=Math.max(0,r-c);let n=u>0?i(t.gold_price,2,`当天销售金价`):0,s=i(t.labor_rate,2,`销售工费`),d=i(t.depreciation_rate??`10`,2,`折旧费单价`);if(u>0&&n<=0)throw Error(`有补金差重时,请填写大于0的当天销售金价。`);p=o(u,n),m=t.products?a(t.products.reduce((e,t)=>{let n=i(t.labor_rate,2,`销售工费`);return e+(t.labor_mode===`total`?n:o(i(t.quantity,3,`新货克重`),n))},0)):t.labor_mode===`total`?s:o(c,s),h=t.depreciation_weight==null?l:i(t.depreciation_weight,3,`折旧费计费克重`),g=o(h,d),_=a((t.charges||[]).reduce((e,t)=>e+i(t.amount,2,`其他收费`),0)),v=i(t.discount||`0`,2,`优惠金额`);let x=a(p+m+g+_)-v;if(x<0)throw Error(`优惠金额不能大于本次置换费用。`);y=t.rounding_mode===`yuan`?Math.floor((x+50)/100)*100:x,b=y-x}let x=e.mode===`exchange`&&e.surplus_mode===`deposit`?f:0,S=f-x;if(S>0&&s<=0)throw Error(`有回收旧料或余料时,请填写大于0的回收单价。`);let C=o(S,s),w=x?0:e.buy_total==null?C:i(e.buy_total,2,e.mode===`direct`?`回收结算额`:`余料回收款`);if(S>0&&w<=0)throw Error(`回收结算金额须大于0,请核对。`);if(!f&&w)throw Error(`本次没有余料,余料回收款应为0。`);let T=a(y-w);return{mode:e.mode,old_lines:n,oldMg:r,newMg:c,matchedMg:l,differenceMg:u,surplusMg:f,depositMg:x,purchaseMg:S,goldAmount:p,laborAmount:m,depreciationMg:h,depreciationAmount:g,chargesAmount:_,discount:v,receivable:y,purchaseAmount:w,defaultPurchaseAmount:C,roundingAdjustment:b,netSettlement:T,cashReceipt:Math.max(0,T),cashPayment:Math.max(0,-T)}}function d(e){let t=e.exchange.items.map(t=>u({...e,...t,buy_total:t.buy_total,buy_rate:t.buy_rate,surplus_mode:t.surplus_mode,surplus_memo:t.surplus_memo,mode:`exchange`,exchange:t.exchange})),n={mode:`exchange`,old_lines:t.flatMap(e=>e.old_lines),exchangeItems:t};for(let e of[`oldMg`,`newMg`,`matchedMg`,`differenceMg`,`surplusM
Line truncated
|
||||
`),f=e=>e?.exchange?.fee_items.map(e=>`${e.note}:${e.amount}元 · ${c(e.payer)}付款`).join(`
|
||||
`)||`无`,m=e=>e?.exchange?.charges.map(e=>`${e.name}:${e.amount}元`).join(`
|
||||
`)||`无`,h=n.exchange||{},g=r?.exchange||{},_=e=>e?.mode===`pool`?`料池 `+e.poolId:e?`手填 `+e.rate+`元/克`:`无补金差重`,v=e=>e?e.mode===`gram`?e.rate+`元/克`:e.amount+`元总工费`:`未提供`;if(a.push(o(`业务日期`,n.date,r?.date||`取消原记录`),o(`客户`,n.customer,r?.customer),o(`开单人`,n.salesperson,r?.salesperson),o(`归属`,c(n.member),r?c(r.member):`沿用原身份留档`),o(`旧料逐项称重`,d(n),r?d(r):`冲正原库存及关联购料`),o(`旧料入库货盘`,l(n.old_pocket??`回收旧料`),r?l(r.old_pocket??`回收旧料`):`冲回原入库货盘`),o(`旧料入库数量(对)`,i(n.old_stock_count==null?null:Number(n.old_stock_count)),r?i(r.old_stock_count==null?null:Number(r.old_stock_count)):`冲回原入库数量`),o(`回收单价(元/克)`,n.buy_rate,r?.buy_rate),o(`回收结算额(元)`,n.buy_total,r?.buy_total),o(`实际收付款账户`,u(n.payment_account),r?u(r.payment_account):`冲正原收付记录`),o(`付款人`,c(n.payer),r?c(r.payer):`原付款流水保留`),o(`备注`,n.note,r?.note)),(n.surplus_mode===`deposit`||r?.surplus_mode===`deposit`)&&a.push(o(`余料处理`,n.surplus_mode===`deposit`?`寄存,暂不结算`:`按回收价结算`,r?r.surplus_mode===`deposit`?`寄存,暂不结算`:`按回收价结算`:`撤回本单寄存余料`)),(n.old_source===`deposit`||r?.old_source===`deposit`)&&a.push(o(`使用客户寄存料`,n.old_source===`deposit`?n.deposit_id+` · `+n.deposit_weight+`g`:`本次交来旧料`,r?.old_source===`deposit`?r.deposit_id+` · `+r.deposit_weight+`g`:r?`本次交来旧料`:`退回寄存账户`)),n.exchange?.items||r?.exchange?.items){let e=e=>(e?.exchange?.items||[]).map((e,t)=>t+1+` · `+e.exchange.name+(e.old_source===`deposit`?` · 寄存记录 `+e.deposit_id+` 使用 `+e.deposit_weight+`g`:``)+(e.surplus_mode===`deposit`?` · 余料寄存,暂不结算`:``)+` · 旧料 `+e.old_lines.map(e=>e.melted_weight+`g × `+e.purity+`%`).join(`+`)+` 入`+l(e.old_pocket)+` · 新货 `+e.exchange.quantity+`g `+(l(e.exchange.pocket)||`外配`)+` · 补金 `+e.exchange.gold_price+`元/g · 折旧 `+e.exchange.depreciation_weight+`g × `+e.exchange.depreciation_rate+`元/g · 回收 `+e.buy_rate+`元/g,`+e.buy_total+`元 · 料费 `+JSON.stringify(e.exchange.cost_material)+` · 料费付款 `+c(e.exchange.cost_material_payer)+` · 进货工费 `+JSON.stringify(e.exchange.cost_labor)+`,`+c(e.exchange.cost_labor_payer)).join(`;`);a.push(o(`逐件置换完整资料`,e(n),r?e(r):`全部冲回`))}if(n.exchange?.products||r?.exchange?.products){let e=e=>(e?.products??(e?[e]:[])).map((e,t)=>t+1+` · `+e.name+` · `+e.quantity+`g · `+(l(e.pocket)||`外配`)+` · 销售工费 `+e.labor_rate+(e.labor_mode===`total`?`元`:`元/克`)+` · 进货工费 `+(e.cost_labor?.rate??e.cost_labor?.amount??`待补`)+` · `+c(e.cost_labor_payer)+(e.stockCount==null?``:` · `+e.stockCount+`对`)).join(`;`);a.push(o(`逐件置换商品`,e(n.exchange),r?e(r.exchange):`冲回全部新货出库`))}n.mode===`exchange`&&a.push(o(`置换新货`,h.name,g.name),o(`新货克重(g)`,h.quantity,g.quantity),o(`实际货盘`,l(h.pocket)||`外配`,r?l(g.pocket)||`外配`:`冲回原出库货盘`),o(`出库数量(对)`,i(h.stockCount==null?null:Number(h.stockCount)),i(g.stockCount==null?null:Number(g.stockCount))),o(`销售金价(元/克)`,h.gold_price,g.gold_price),o(`销售工费`,h.labor_rate+`元/`+(h.labor_mode===`gram`?`克`:`总额`),r?g.labor_rate+`元/`+(g.labor_mode===`gram`?`克`:`总额`):`取消`),o(`折旧计费克重/单价`,h.depreciation_weight+`g × `+h.depreciation_rate+`元/克`,r?g.depreciation_weight+`g × `+g.depreciation_rate+`元/克`:`取消`),o(`附加收费`,m(n),r?m(r):`取消`),o(`优惠(元)`,h.discount,g.discount),o(`取整方式`,h.rounding_mode===`yuan`?`四舍五入到元`:`保留到分`,r?g.rounding_mode===`yuan`?`四舍五入到元`:`保留到分`:`取消`),o(`补金差重进货来源`,_(h.cost_material),r?_(g.cost_material):`释放原耗用`),o(`料费付款人`,c(h.cost_material_payer),r?c(g.cost_material_payer):`原来源留档`),o(`进货工费`,v(h.cost_labor),r?v(g.cost_labor):`取消`),o(`工费付款人`,c(h.cost_labor_payer),r?c(g.cost_labor_payer):`原来源留档`),o(`实际费用`,f(n),r?f(r):`冲正原费用`));let y=e.summary.before||{},b=e.summary.after||{};return a.push(...[[`实际收客户`,`cashReceipt`],[`实际付客户`,`cashPayment`],[`购料成本`,`purchaseAmount`],[`订单货品成本`,`goodsCost`],[`实际费用`,`directCost`],[`原账利润`,`profit`]].map(([e,t])=>o(e,y[t]==null?`待核实`:`¥`+s(y[t]),r?b[t]==null?`待核实`:`¥`+s(b[t]):`取消后冲正`))),(0,C.jsxs)(C.Fragment,{children:[e.summary.legacyCountNotice&&(0,C.jsxs)(`p`,{children:[e.summary.legacyCountNotice,e.summary.legacyCountVerified&&`(申请人已确认)`]}),(0,C.jsx)(`div`,{className:`table-wrap`,children:(0,C.jsxs)(`table`,{"aria-label":`回收更正原值与申请值`,children:[(0,C.jsx)(`theaLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
.recoveries-page{color:var(--ink,#233832);min-width:0}.recoveries-page [hidden]{display:none!important}.recoveries-page h1,.recoveries-page h2,.recoveries-page h3{margin:0}.recoveries-page h1{font-size:clamp(1.9rem,4vw,3rem)}.recoveries-page p{color:var(--muted,#596963);line-height:1.55}.recoveries-page .panel,.recoveries-page .stock-review-status{background:var(--surface,#fff);border:1px solid var(--line,#dce4df);border-radius:12px;margin-block:14px;padding:18px}.recoveries-page .panel-title,.recoveries-page .actions,.recoveries-page .form-actions,.recoveries-page .stock-history-filters{flex-wrap:wrap;align-items:center;gap:10px;display:flex}.recoveries-page .panel-title{justify-content:space-between}.recoveries-page .recovery-row{grid-template-columns:repeat(auto-fit,minmax(min(135px,100%),1fr));gap:12px;display:grid}.recoveries-page label{align-content:start;gap:5px;margin-block:8px;display:grid}.recoveries-page label:has([type=checkbox]){align-items:center;display:flex}.recoveries-page input,.recoveries-page select,.recoveries-page textarea,.recoveries-page button{font:inherit}.recoveries-page input:not([type=checkbox]),.recoveries-page select,.recoveries-page textarea{width:100%;min-width:0;color:inherit;box-sizing:border-box;background:#fff;border:1px solid #b9c6bf;border-radius:6px;padding:8px}.recoveries-page fieldset{border:0;min-width:0;margin:0;padding:0}.recoveries-page button{cursor:pointer;color:inherit;background:#fff;border:1px solid #b9c6bf;border-radius:7px;margin:2px;padding:7px 12px}.recoveries-page button:disabled{cursor:default;opacity:.48}.recoveries-page .primary,.recoveries-page button[aria-pressed=true]{color:#fff;background:#254f46}.recoveries-page .table-wrap{overflow:auto}.recoveries-page table{border-collapse:collapse;text-align:left;width:100%}.recoveries-page td,.recoveries-page th{vertical-align:top;border-bottom:1px solid #dde4df;padding:9px}.recoveries-page th{white-space:nowrap}.recoveries-page dialog{width:100%;max-width:min(720px,94vw);max-height:86dvh;color:inherit;box-sizing:border-box;border:1px solid #dce4df;border-radius:13px;padding:24px;position:fixed;overflow:auto}.recoveries-page dialog::backdrop{background:#18332b55}.recoveries-page .dialog-close{float:right}.recoveries-page .error{color:#9a372c}.recoveries-page .recovery-net{align-items:center;gap:18px;display:flex}.recoveries-page .recovery-net strong{font-size:1.5rem}.recoveries-page .modified{background:#fff8e7}.recoveries-page table td{white-space:pre-line}.recoveries-page .recovery-new-product{border-top:1px solid #dce4df;padding-top:10px}
|
||||
@@ -0,0 +1 @@
|
||||
import{n as e}from"./rolldown-runtime-Dl_DZoUm.js";import{i as t}from"./react-1o5M9n0k.js";import{D as n,Dn as r,E as i,En as a,St as o,Tt as s,Z as c,b as l,mt as u,nt as d,wn as f}from"./skeleton-B4Z0R3jQ.js";var p=e(t()),m=e(r());function h(e){return[`small`,`middle`,`large`].includes(e)}function g(e){return e?typeof e==`number`&&!Number.isNaN(e):!1}var _=e=>{let{componentCls:t,borderRadius:n,paddingSM:r,colorBorder:i,paddingXS:a,fontSizeLG:o,fontSizeSM:s,borderRadiusLG:c,borderRadiusSM:u,colorBgContainerDisabled:d,lineWidth:f}=e;return{[t]:[{display:`inline-flex`,alignItems:`center`,gap:0,paddingInline:r,margin:0,background:d,borderWidth:f,borderStyle:`solid`,borderColor:i,borderRadius:n,"&-large":{fontSize:o,borderRadius:c},"&-small":{paddingInline:a,borderRadius:u,fontSize:s},"&-compact-last-item":{borderEndStartRadius:0,borderStartStartRadius:0},"&-compact-first-item":{borderEndEndRadius:0,borderStartEndRadius:0},"&-compact-item:not(:first-child):not(:last-child)":{borderRadius:0},"&-compact-item:not(:last-child)":{borderInlineEndWidth:0}},l(e,{focus:!1})]}},v=d([`Space`,`Addon`],e=>[_(e)]),y=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},b=p.forwardRef((e,t)=>{let{className:r,children:i,style:a,prefixCls:s}=e,c=y(e,[`className`,`children`,`style`,`prefixCls`]),{getPrefixCls:l,direction:u}=p.useContext(o),d=l(`space-addon`,s),[f,h,g]=v(d),{compactItemClassnames:_,compactSize:b}=n(d,u),x=(0,m.default)(d,h,_,g,{[`${d}-${b}`]:b},r);return f(p.createElement(`div`,Object.assign({ref:t,className:x,style:a},c),i))}),x=p.createContext({latestIndex:0}),S=x.Provider,C=({className:e,index:t,children:n,split:r,style:i})=>{let{latestIndex:a}=p.useContext(x);return n==null?null:p.createElement(p.Fragment,null,p.createElement(`div`,{className:e,style:i},n),t<a&&r&&p.createElement(`span`,{className:`${e}-split`},r))},w=e=>{let{componentCls:t,antCls:n}=e;return{[t]:{display:`inline-flex`,"&-rtl":{direction:`rtl`},"&-vertical":{flexDirection:`column`},"&-align":{flexDirection:`column`,"&-center":{alignItems:`center`},"&-start":{alignItems:`flex-start`},"&-end":{alignItems:`flex-end`},"&-baseline":{alignItems:`baseline`}},[`${t}-item:empty`]:{display:`none`},[`${t}-item > ${n}-badge-not-a-wrapper:only-child`]:{display:`block`}}}},T=e=>{let{componentCls:t}=e;return{[t]:{"&-gap-row-small":{rowGap:e.spaceGapSmallSize},"&-gap-row-middle":{rowGap:e.spaceGapMiddleSize},"&-gap-row-large":{rowGap:e.spaceGapLargeSize},"&-gap-col-small":{columnGap:e.spaceGapSmallSize},"&-gap-col-middle":{columnGap:e.spaceGapMiddleSize},"&-gap-col-large":{columnGap:e.spaceGapLargeSize}}}},E=d(`Space`,e=>{let t=u(e,{spaceGapSmallSize:e.paddingXS,spaceGapMiddleSize:e.padding,spaceGapLargeSize:e.paddingLG});return[w(t),T(t)]},()=>({}),{resetStyle:!1}),D=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},O=p.forwardRef((e,t)=>{let{getPrefixCls:n,direction:r,size:i,className:a,style:o,classNames:c,styles:l}=s(`space`),{size:u=i??`small`,align:d,className:_,rootClassName:v,children:y,direction:b=`horizontal`,prefixCls:x,split:w,style:T,wrap:O=!1,classNames:k,styles:A}=e,j=D(e,[`size`,`align`,`className`,`rootClassName`,`children`,`direction`,`prefixCls`,`split`,`style`,`wrap`,`classNames`,`styles`]),[M,N]=Array.isArray(u)?u:[u,u],P=h(N),F=h(M),I=g(N),L=g(M),R=f(y,{keepEmpty:!0}),z=d===void 0&&b===`horizontal`?`center`:d,B=n(`space`,x),[V,H,U]=E(B),W=(0,m.default)(B,a,H,`${B}-${b}`,{[`${B}-rtl`]:r===`rtl`,[`${B}-align-${z}`]:z,[`${B}-gap-row-${N}`]:P,[`${B}-gap-col-${M}`]:F},_,v,U),G=(0,m.default)(`${B}-item`,k?.item??c.item),K=Object.assign(Object.assign({},l.item),A?.item),q=R.map((e,t)=>{let n=e?.key||`${G}-${t}`;return p.createElement(C,{className:G,key:n,index:t,split:w,style:K},e)}),J=p.useMemo(()=>({latestIndex:R.reduce((e,t,n)=>t==null?e:n,0)}),[R]);if(R.length===0)return null;let Y={};return O&&(Y.flexWrap=`wrap`),!F&&L&&(Y.columnGap=M),!P&&I&&(Y.rowGap=N),V(p.createElement(`div`,Object.assign({ref:t,className:W,style:Object.assign(Object.assign(Object.assign({},Y),o),T)},j),p.createElement(S,{value:J},q)))});O.Compact=i,O.Addon=b;var k={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0
Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
.report-page{color:#233f32;min-width:0;padding-bottom:30px;font-size:14px;line-height:1.55}.report-page .panel,.report-page .stat{background:#fff;border:1px solid #d9e4df;border-radius:12px;min-width:0;margin:12px 0;padding:clamp(14px,2vw,24px)}.report-page .report-controls,.report-page .actions,.report-page .form-actions,.report-page .panel-title,.report-page .report-ownership-equation,.report-page .report-business-profit-equation,.report-page .daily-transfer-parts{flex-wrap:wrap;align-items:center;gap:10px;display:flex}.report-page h1,.report-page h2,.report-page h3{color:#193c2e;margin:0 0 8px}.report-page h1{font-size:30px}.report-page h2{font-size:20px}.report-page h3{font-size:16px}.report-page label{gap:4px;display:grid}.report-page .check{align-items:center;gap:6px;display:flex}.report-page button,.report-page input:not([type=checkbox]),.report-page select,.report-page textarea{font:inherit;color:inherit;box-sizing:border-box;background:#fff;border:1px solid #b8cbbf;border-radius:6px;max-width:100%;padding:6px 9px}.report-page button{cursor:pointer}.report-page button.primary{color:#fff;background:#23583d}.report-page button:disabled{opacity:.5;cursor:default}.report-page .muted,.report-page .eyebrow,.report-page .hint{color:#566d61}.report-page .small,.report-page .hint{font-size:13px}.report-page .error,.report-page .danger-text{color:#96332d}.report-page .stat>strong,.report-page .daily-transfer-parts strong,.report-page .report-recipient-total{font-size:21px;display:block}.report-page .cards{grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;display:grid}.report-page .report-recipient-grid,.report-page .report-primary,.report-page .split{grid-template-columns:repeat(auto-fit,minmax(min(340px,100%),1fr));gap:12px;display:grid}.report-page details{margin:8px 0}.report-page summary{cursor:pointer;color:#234b35}.report-page p{margin:6px 0 10px}.report-page .note,.report-page .badge{background:#edf5f0;border-radius:6px;padding:5px 8px}.report-page .warn{background:#fbefdd}.report-page .table-wrap{max-width:100%;overflow:auto}.report-page table{border-collapse:collapse;width:100%}.report-page th,.report-page td{text-align:left;vertical-align:top;border-bottom:1px solid #d9e4df;padding:7px}.report-page .number{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}.report-page .link-button{color:#235c3e;text-align:left;border:0;padding:0}.report-page .link-button>span,.report-page .link-button>strong{display:block}.report-page .reimbursement-form,.report-page .reimbursement-review-form,.report-page .daily-outlay-form{gap:12px;padding:12px 0;display:grid}.report-page .reimbursement-item-row,.report-page .reimbursement-item-labels{grid-template-columns:2fr 1fr 1fr auto;align-items:end;gap:8px;display:grid}.report-page button:focus-visible,.report-page input:focus-visible,.report-page summary:focus-visible{outline-offset:2px;outline:2px solid #3d7a52}.report-page .sr-only{clip:rect(0, 0, 0, 0);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}.report-page dialog{box-sizing:border-box;width:min(900px,100vw - 32px);max-height:88dvh;color:inherit;border:1px solid #cbdacf;border-radius:12px;padding:20px;overflow:auto}.report-page dialog::backdrop{background:#132a1e66}.report-page .dialog-close{float:right}.report-page .report-notice{pointer-events:none;z-index:10;background:#edf5ef;border-radius:8px;padding:10px 16px;position:fixed;bottom:16px;left:50%;transform:translate(-50%)}@media (width<=600px){.report-page .cards{grid-template-columns:repeat(2,minmax(0,1fr))}.report-page .reimbursement-item-row{grid-template-columns:1fr 1fr}.report-page .report-receipt-table,.report-page .report-order-table,.report-page .report-cost-detail-table{min-width:600px}}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
import{n as e}from"./rolldown-runtime-Dl_DZoUm.js";import{i as t,t as n}from"./react-1o5M9n0k.js";import{o as r,s as i}from"./index-D-ox0wtk.js";import{i as a,n as o,r as s,t as c}from"./controls-BREhiQGx.js";import{t as l}from"./settingsModel-DuLjBEgM.js";import{c as u,o as d,t as f}from"./shared-DZLPF0cC.js";var p=e(t(),1),m={exports:{}};(function(e){function t(e){return e.items.filter(e=>e.kind===`afterSale`).reduce((e,t)=>e+t.amount,0)}function n(e){return e.items.filter(e=>e.kind!==`goods`||e.amount!==0)}function r(e){let t=(e.costItems||[]).filter(e=>e.kind===`goods`);return{goods:t.reduce((e,t)=>e+(t.amount??0),0),missing:t.filter(e=>e.amount==null).length,paidFees:(e.costItems||[]).filter(e=>[`paid`,`afterSale`].includes(e.kind)).reduce((e,t)=>e+t.amount,0)}}function i(e){let t=e.currentAccount;return t.days.length?t.days:t.from===t.date?[{date:t.date,materialCost:0,knownMaterialCost:0,otherCost:0,knownOtherCost:0,profit:0,knownProfit:0,ownerNetReceipts:0,amount:0,incomplete:!1}]:[]}function a(e,t){let n=0,r=!0,i=[];for(let a of e)try{let e=t(a.amount);e||(r=!1),n+=e,i.push(e)}catch{r=!1}return{total:n,complete:r,amounts:i}}function o({teamDataKeys:e,validOrderDate:t,teamMode:n,currentMember:r,teamMemberKeys:i,isReimbursementStatus:a,state:o,reportMember:s}){function c(n,r){if(n.basis!==`orderDate`||n.date!==r.date||n.from!==r.from)throw Error(`返回口径或日期与当前选择不一致,请重新读取。`);if(!n.summary||!Array.isArray(n.orderRows)||!Array.isArray(n.accounts)||!n.receiptsByOrderDate||!e(n.payerCosts).length||!e(n.payerCosts).every(e=>{let t=n.payerCosts?.[e];return t&&Array.isArray(t.items)&&[`goods`,`paidFees`,`total`,`missingCount`,`pendingCount`].every(e=>Number.isSafeInteger(t[e]))}))throw Error(`对账数据尚未完整返回,请重新读取。`);let i=e(n.recipientReceipts),a=i.map(e=>n.recipientReceipts?.[e]);if(!i.length||!a.every((e,n)=>e&&e.recipient===i[n]&&typeof e.name==`string`&&e.name&&Array.isArray(e.items)&&[`receipt`,`refund`,`net`].every(t=>Number.isSafeInteger(e[t]))&&e.items.every(e=>e&&[`receipt`,`refund`].includes(e.kind)&&Number.isSafeInteger(e.amount)&&typeof e.account==`string`&&t(e.date))&&e.net===e.receipt-e.refund&&[`receipt`,`refund`].every(t=>e.items.filter(e=>e.kind===t).reduce((e,t)=>e+t.amount,0)===e[t]))||![`receipt`,`refund`,`net`].every(e=>a.reduce((t,n)=>t+n[e],0)===n.receiptsByOrderDate[e]))throw Error(`收款人汇总与明细未完整返回或金额不一致,请重新读取。`);d(n),f(n),p(n)}function l(e,n){if(e?.team){if(e.date!==n.date||e.from!==n.from||!Array.isArray(e.reimbursements))throw Error(`团队日期或报销资料未完整返回,请重新读取。`);return m(e.team),e.reimbursements.forEach(h),e}let r=e=>Number.isSafeInteger(e),i=e=>e===null||r(e);if(!e||e.date!==n.date||e.from!==n.from||typeof e.readOnly!=`boolean`||typeof e.ready!=`boolean`||![`receipt`,`refund`,`net`].every(t=>r(e.ownerReceipts?.[t]))||e.ownerReceipts.net!==e.ownerReceipts.receipt-e.ownerReceipts.refund||!r(e.approvedReimbursements)||!i(e.actualOutlay)||!i(e.transferAmount)||e.transfersNotDeducted!==!0||!Array.isArray(e.reimbursements)||!Array.isArray(e.days)||!Array.isArray(e.missingDates)||!Array.isArray(e.staleDates)||!Number.isSafeInteger(e.pendingCount)||e.pendingCount<0||typeof e.sources?.revision!=`string`||!r(e.sources.total)||!Array.isArray(e.sources.items)||!e.sources.items.every(e=>e&&typeof e.id==`string`&&t(e.date)&&r(e.amount)&&e.payer===`owner`&&typeof e.name==`string`)||e.sources.items.reduce((e,t)=>e+t.amount,0)!==e.sources.total)throw Error(`转账核对资料未完整返回,请重新读取。`);if(e.reimbursements.forEach(h),e.confirmation&&(!r(e.confirmation.amount)||e.confirmation.amount<0||!Number.isSafeInteger(e.confirmation.revision)||typeof e.confirmation.sourceRevision!=`string`||typeof e.confirmation.stale!=`boolean`))throw Error(`实际支出确认资料未完整返回,请重新读取。`);if(e.ready&&(e.actualOutlay==null||e.transferAmount!==e.ownerReceipts.net-e.actualOutlay+e.approvedReimbursements)||!e.ready&&e.transferAmount!==null)throw Error(`转账合计与分项不一致,请重新读取。`);if(!n.month&&n.from===n.date&&e.ready&&(!e.confirmation||e.confirmation.stale))throw Error(`当天支出尚未有效确认,请重新读取。`);return e}function u(e){if(!e||!Array.isArray(e.requests)||!Number.isSafeInteger(e.total)||!Number.isSafeInteger(e.offset)||!Number.isSafeInteger(e.limit)||typeof e.hasMore!=`boolean`||![`pending`,`approved`,`rejected`].every(t=>Number.isSafeInteger(e.counts?.[t])))throw Error(`全日期报销列表未完整返回,请重新读取。`);return e.requests.forEach(h),e}function d(a){let c=()=>{throw Error(`所属订单净收入与账户明细未完整返回或金额不一致,请重新读取。`)},l=e(a.ownershipReceipts),u=n()?o.user.role===`owner`?s:r():``,d=u?[u]:n()?i():e(a.recipientReceipts);a.ownershipReceipts&&typeof a.ownershipReceipts==`object`&&!Array.isArray(a.owLine truncated
|
||||
`)}function a(){return e?.shopSettings?.storeName||e?.printing?.store||t?.brand?.storeName||`珠宝台账`}function o(e=!1,{historical:t=!1,selected:n=``}={}){let r=(t?J():ee()).filter(e=>c()||e!==`assistant2`);e&&(r=[...r.filter(e=>e!==`owner`),...r.filter(e=>e===`owner`)]);let i=r.map(e=>[e,G(e)+(t&&!Y(e)?`(已停用)`:``)]);return n&&J().includes(n)&&!r.includes(n)&&i.push([n,G(n)+`(已停用 · 原记录)`]),i}function s(){return e?.user?.member||t?.user?.member||(e?.user?.role===`owner`?`owner`:`assistant`)}function c(){return!!(e?.user?.member||e?.members?.some(e=>e.member===`assistant2`))}let l=u.validDate;function d(e){return e==null?`待确认`:`¥`+x(e)}function p(e){let{total:t,complete:n,amounts:r}=h.reimbursementAmounts(e,f.cents);return{total:t,complete:n,formula:r.map(e=>`¥`+x(e)).join(` + `)}}function m(e){return[...te(),`owner`].filter(t=>e&&Object.hasOwn(e,t))}function b(e,t){let n=e.unknownCounts?.[t]||0;return n&&e.knownCounts?.[t]===0&&!e[t]&&!e.afterSaleCount?`待补齐`:(n?`已知 `:``)+`¥`+x(e[t])}let x=e=>e==null?`待补`:u.yuan(e);function S(e){return e.from===e.date?e.date:e.from+` 至 `+e.date}function C(e){let t=ne(e);return t?G(t.member)+t.channel:e}function w(e,t,n=!1){return e===null?(n?`待核算(已核算 ¥`:`待补齐(已知 ¥`)+x(t)+`)`:`¥`+x(e)}function T(e){let t=e.summary,n=e.receiptsByOrderDate;return[a()+`三人账 · `+S(e),`利润留在店里,按订单归属分别记业绩。经营款各自管理;未导入真实期初经营款。`,...ae(e.peopleCount),`销售净额:`+b(t,`sale`),`本期净利润:`+b(t,`profit`),`本期实收:¥`+x(n.receipt)+`;本期实退:¥`+x(n.refund),...P(e),...F(e),...I(e),...L(e),`按实际付款人核对成本`,...m(e.payerCosts).flatMap(t=>{let n=e.payerCosts[t];return[G(t)+`:实际货品支出 `+E(n.goods,n.missingCount)+`;已付费用 ¥`+x(n.paidFees),..._(n).map(e=>e.date+` / `+O(e)+` / `+e.name+` / `+A(e))]}),`订单与售后`,...e.orderRows.map(e=>e.date+` / `+(e.paper_number||e.number||e.project)+` / `+(e.customer||`未填客户`)+` / `+G(e.member)+` / 销售 `+N(e,`sale`)+` / 净利润 `+N(e,`profit`)),`历史两人结算不计入团队新债务。`].join(`
|
||||
`)}function E(e,t=0){return t&&e===0?`待补齐`:(t?`已知 `:``)+`¥`+x(e)}function D(e){return[e.missingCount?e.missingCount+` 项成本待补齐`:``,e.pendingCount?e.pendingCount+` 项费用未入账,不计合计`:``].filter(Boolean).join(`;`)}function O(e){return e.materialPoolId?e.materialPoolId+` 购料`:e.kind===`afterSale`?`售后 · `+(e.customer||`未填客户`):(e.price_lock_id?`锁价 · `:``)+(e.paper_number||e.number||`锁价记录`)+(e.customer?` · `+e.customer:``)}function k(e){let t=e.calculation;return t?z(t.quantity)+`g × `+(t.rate==null?e.component===`material`?`每克料价待补齐`:`每克工费待补齐`:x(t.rate)+`元/克`)+(e.amount==null?``:` = `+x(e.amount)+`元`):``}function A(e){return e.kind===`pending`?`未入账`+(e.amount==null?`(金额待补)`:`(登记 ¥`+x(e.amount)+`)`):e.amount==null?`待补齐`:`¥`+x(e.amount)}function j(e){return e.costItems?.[0]?.payer?G(e.costItems[0].payer):`付款人待补`}let M={draft:`旧草稿`,confirmed:`旧单待补齐`,delivered:`已完成`,returned:`已退货`,cancelled:`已取消`,after_sale:`售后`,recovery:`回收`};function N(e,t){if(e.status===`draft`)return`未开单`;if(t===`goods`){let t=v(e);return E(t.goods,t.missing)}return t===`paidFees`?`¥`+x(v(e).paidFees):e[t]==null?e.known?.[t]?`已知 ¥`+x(e.known[t])+`(待补齐)`:`待补齐`:`¥`+x(e[t])}function P(e){let t=e.dailyProfits,n=e=>`销售净额 ¥${x(e.sales)} / 成本 ${w(e.totalCost,e.knownTotalCost)} / 利润 ${w(e.profit,e.knownProfit,!0)}`;return[`每日利润表(按日期与订单归属人;普通订单按开单日、锁价成单按交付日、售后按记录日)`,...t.rows.length?t.rows.map(e=>`${e.date} / ${e.name} / ${n(e)}`):[`所选范围暂无订单或售后记录。`],`所选范围合计:${n(t.summary)}`,``]}function F(e){return[`按订单归属核对净收入(收款减退款,已含他人代收,尚未扣成本与费用)`,...ke(e).flatMap(t=>{let n=e.ownershipReceipts[t];return[`${n.name}所属订单净收入:¥${x(n.net)};实收 ¥${x(n.receipt)};实退 ¥${x(n.refund)}`,...n.accounts.map(e=>`${e.recipient===n.member?`本人收款`:`他人代收`} / ${C(e.account)}:实收 ¥${x(e.receipt)},实退 ¥${x(e.refund)},净额 ¥${x(e.net)}`),...oe(e.ownershipBusiness[t]),``]})]}function I(e){let t={date:e.date,from:e.from,month:n},r=e.dailyFunds;if(r?.team)return[`每日报销单(按报销日期归集,已批准报销不在当日订单往来重复相加)`,...r.reimbursements.flatMap(e=>[`${e.date} / ${e.requester_name} / ${K[e.status]} / 合计 ¥${x(e.total)}`,...e.items.map(e=>`${e.name}:¥${x(e.amount)}`)]),``];if(!r||r.rangeUnsupported)return[`每天转账核对`,`尚未取得完整转账资料,不输出应转金额。`,``];try{Te(r,t)}catch{return[`每天转账核对`,`资料未完整返回,不输出应转金额。`,``]}let i=[`每天转账核对(应转合计,未扣已转)`,`${G(`owner`)}实收 ¥${x(r.ownerReceipts.receipt)} − 实退 ¥${x(r.ownerReceipts.refund)} = 净收款 ¥${x(r.ownerReceipts.net)}`];r.ready?i.push(`${G(`owner`)}净收款 ¥${x(r.ownerReceipts.net)} − 确认完整对外支出 ¥${x(r.actualOutlay)} + 已批准报销 ¥${x(r.approvedReimbursements)} = 应转合计 ¥${x(r.transferAmount)}`,r.transferAmount>0?`方向:`+G(`owner`)+`转`+G(`assistant`):r.transferAmount<0?`方向:`+G(`assistant`)+`转`+G(`owner`):`方向:无需转款`):i.push(`当天完整支出尚未全部确认,暂不输出完整应转合计。`,...r.missingDates.length?[`待确认日期:`+r.missingDates.join(`、`)]:[],...r.staleDates.length?[`来源变动待重新确认:`+r.staleDates.join(`、`)]:[]),i.push(`不要与旧按单/剩料待结重复相加;报销与确认不扣订单利润。`,`已批准报销项目(按报销日期归集)`);let a=r.reimbursements.filter(e=>e.status===`approved`);return i.push(...a.length?a.flatMap(e=>[`${e.date} / ${e.requester_name} / 合计 ¥${x(e.total)} / ${e.reviewer_name||G(`owner`)}复核`,...e.items.map(e=>`${e.name}:¥${x(e.amount)}`)]):[`本期暂无已批准报销。`],``),i}function L(e){return[`按收款人汇总(普通订单按开单日归集当前收付,锁价按实际收付日归集;负数为冲回)`,...m(e.recipientReceipts).flatMap(t=>{let n=e.recipientReceipts[t];return[`${n.name}总收款:¥${x(n.receipt)};退款 ¥${x(n.refund)};净收款 ¥${x(n.net)}`,...[`receipt`,`refund`].flatMap(e=>{let t=n.items.filter(t=>t.kind===e),r=e===`receipt`?`收款`:`退款`;return[`${n.name}${r}明细(日期为实际${r}日):`,...t.length?t.map(e=>`${e.date} / ${se(e)} / ${e.paper_number||e.number||(e.price_lock_id?`锁价记录`:`订单记录`)} / 客户 ${e.customer||`未填客户称呼`} / ${C(e.account)} / ${ce(e)} ¥${x(e.amount)}${e.reference||e.note?` / `+(e.reference||e.note):``}`):[`所选范围没有`+n.name+r+`记录。`],`${r}明细合计:¥${x(n[e])}`]}),``]})]}function R(e){if(!e?.summary?.eventCount)return
Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
.settings-page{color:#243d34;gap:18px;min-width:0;line-height:1.55;display:grid}.settings-page .panel{background:#fff;border:1px solid #d9e4df;border-radius:12px;min-width:0;padding:clamp(16px,2vw,28px)}.settings-page .team-settings{order:0}.settings-page .panel-title,.settings-page .form-actions,.settings-page .actions{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px;display:flex}.settings-page .actions,.settings-page .form-actions{justify-content:flex-start}.settings-page .form-actions{margin-top:14px}.settings-page h1,.settings-page h2,.settings-page h3{color:#193c2e;margin:0 0 8px}.settings-page h1{font-size:clamp(24px,3vw,34px)}.settings-page h2{font-size:20px}.settings-page h3{margin-top:12px;font-size:16px}.settings-page p{margin:6px 0 12px}.settings-page .small{font-size:13px}.settings-page .muted,.settings-page .eyebrow{color:#536b61}.settings-page .eyebrow{letter-spacing:.08em;font-size:12px}.settings-page .note,.settings-page .badge{background:#edf5f0;border-radius:6px;padding:8px}.settings-page .badge{white-space:nowrap;padding:3px 8px}.settings-page .warn{background:#fbf0db}.settings-page .danger-text,.settings-page .error{color:#982f28}.settings-page fieldset{border:0;min-width:0;margin:0;padding:0}.settings-page label{gap:5px;font-size:14px;display:grid}.settings-page label.check{align-items:center;display:flex}.settings-page input:not([type=checkbox]),.settings-page select{width:100%;min-width:0;min-height:38px;color:inherit;font:inherit;box-sizing:border-box;background:#fff;border:1px solid #bdcec4;border-radius:6px;padding:6px 9px}.settings-page input:read-only{background:#f6f8f6}.settings-page button{color:inherit;cursor:pointer;font:inherit;background:#fff;border:1px solid #b7c9be;border-radius:6px;padding:7px 12px}.settings-page button.primary{color:#fff;background:#23583d;border-color:#0000}.settings-page button.danger{color:#982f28;border-color:#d8a8a0}.settings-page button:disabled{opacity:.5;cursor:default}.settings-page :is(button,input,select,summary):focus-visible{outline-offset:2px;outline:2px solid #377951}.settings-page .grid,.settings-page .split,.settings-page .employee-filters{gap:12px;min-width:0;display:grid}.settings-page .two,.settings-page .split{grid-template-columns:repeat(2,minmax(0,1fr))}.settings-page .three{grid-template-columns:repeat(3,minmax(0,1fr))}.settings-page .four{grid-template-columns:repeat(4,minmax(0,1fr))}.settings-page .employee-filters{grid-template-columns:minmax(130px,2fr) minmax(120px,1fr) auto auto;align-items:end;margin:12px 0}.settings-page .table-wrap{max-width:100%;margin-top:10px;overflow:auto}.settings-page table{border-collapse:collapse;width:100%}.settings-page td,.settings-page th{text-align:left;border-bottom:1px solid #dbe5df;padding:8px}.settings-page th{white-space:nowrap;color:#4c6658;font-size:13px}.settings-page .empty{color:#52685d;padding:12px}.settings-page .shop-cost-manager{border-top:1px solid #e3e9e3;margin-top:22px;padding-top:14px}.settings-page .shop-cost-search{max-width:320px}.settings-page .paper-mini{background:#fcfaf4;border:1px solid #d8d2c2;padding:16px;line-height:1.4}.settings-page .paper-mini td{border:1px solid #ccc6b6;font-size:12px}.settings-page dialog{box-sizing:border-box;width:min(550px,100vw - 32px);max-height:88dvh;color:inherit;border:1px solid #cbdbd0;border-radius:12px;padding:24px;overflow:auto;box-shadow:0 25px 65px #11281940}.settings-page dialog::backdrop{background:#132a1e66}.settings-page .dialog-close{float:right}.settings-page .settings-notice{z-index:10;pointer-events:none;color:#234d33;background:#ecf4ef;border:1px solid #bacfc1;border-radius:8px;max-width:90vw;padding:10px 15px;position:fixed;bottom:18px;left:50%;transform:translate(-50%)}.settings-page .settings-notice.error{color:#8f302a;background:#fff4f1}@media (width<=850px){.settings-page .three,.settings-page .four{grid-template-columns:repeat(2,minmax(0,1fr))}.settings-page .split{grid-template-columns:1fr}}@media (width<=600px){.settings-page .two,.settings-page .three,.settings-page .four{grid-template-columns:1fr}.settings-page .employee-filters{grid-template-columns:1fr 1fr}.settings-page dialog{padding:16px}.settings-page .employee-table,.settings-page .shop-cost-table{min-width:620px}}
|
||||
@@ -0,0 +1 @@
|
||||
import{n as e}from"./rolldown-runtime-Dl_DZoUm.js";import{i as t,t as n}from"./react-1o5M9n0k.js";import{o as r}from"./index-D-ox0wtk.js";import{i,n as a,r as o,t as s}from"./controls-BREhiQGx.js";import{i as c,n as l,r as u,t as d}from"./settingsModel-DuLjBEgM.js";import{i as f,t as p}from"./shared-DZLPF0cC.js";var m=e(t(),1),h=n();function g(e){let{name:t,amount:n,payer:r,enabled:i,byQuantity:a}=c(e);return{name:t,amount:n,payer:r,enabled:i===`true`,byQuantity:a===`true`}}function _({shop:e,client:t,members:n,team:r,busy:c,onBusy:l,dirty:_,onDirty:v,onSaved:y,notice:b}){let x=f.presetCatalog(e.costPresets),[S,C]=(0,m.useState)(``),[w,T]=(0,m.useState)(null),[E,D]=(0,m.useState)(!1),[O,k]=(0,m.useState)(``);function A(){E||_&&!window.confirm(`成本修改尚未保存,放弃修改?`)||(T(null),v(!1),k(``))}function j(n,r=``){if(c||t.busy||t.pending())return;let i=x[r]||{name:``,amount:`0`,payer:`order`,enabled:!0,byQuantity:!1};T({action:n,kind:r||`custom_`+crypto.randomUUID(),original:i,revision:e.revision}),v(!1),k(``)}async function M(e){if(e.preventDefault(),!w||E)return;let n=!1;try{if(c||t.busy||t.pending())throw Error(`请先确认当前操作,再保存成本`);let r=w.action===`delete`?null:g(e.currentTarget);if(r){if(r.name=r.name.trim(),!r.name||r.name.length>40)throw Error(`成本名称请填写1~40字`);if(p.cents(r.amount,`成本`)>1e8)throw Error(`成本最多1000000元`)}D(!0),l(!0),k(``);let i=await t.mutate(`/api/shop-settings`,{revision:w.revision,costPresets:{[w.kind]:r}});n=!0,T(null),v(!1),await y(i.shopSettings),b(w.action===`delete`?`成本项目已删除`:`成本项目已保存`)}catch(e){let t=n?`成本已经保存,请刷新页面核对`:d(e);k(t),b(t,!0)}finally{D(!1),l(!1)}}let N=Object.entries(x).filter(([,e])=>e.name.toLocaleLowerCase().includes(S.trim().toLocaleLowerCase()));return(0,h.jsxs)(`section`,{id:`shop-cost-manager`,className:`shop-cost-manager`,children:[(0,h.jsxs)(`div`,{className:`panel-title`,children:[(0,h.jsxs)(`div`,{children:[(0,h.jsx)(`h3`,{children:`勾选成本管理`}),(0,h.jsx)(`p`,{className:`small muted`,children:`自行添加需要的项目。删除后不再用于新单,历史订单成本保留。`})]}),(0,h.jsx)(s,{action:`shop-cost-add`,className:`primary`,onClick:()=>j(`add`),children:`+ 新增成本`})]}),(0,h.jsxs)(`label`,{className:`shop-cost-search`,children:[`搜索成本`,(0,h.jsx)(`input`,{type:`search`,id:`shop-cost-search`,placeholder:`输入成本名称`,autoComplete:`off`,value:S,onChange:e=>C(e.target.value)})]}),(0,h.jsx)(`div`,{id:`shop-cost-list`,children:N.length?(0,h.jsx)(`div`,{className:`table-wrap`,children:(0,h.jsxs)(`table`,{className:`shop-cost-table`,children:[(0,h.jsx)(`thead`,{children:(0,h.jsx)(`tr`,{children:[`成本名称`,`金额/单价`,`付款人`,`计费方式`,`状态`,`操作`].map(e=>(0,h.jsx)(`th`,{children:e},e))})}),(0,h.jsx)(`tbody`,{children:N.map(([e,t])=>(0,h.jsxs)(`tr`,{"data-cost-row":e,children:[(0,h.jsx)(`td`,{children:(0,h.jsx)(`strong`,{children:t.name})}),(0,h.jsxs)(`td`,{children:[`¥`,t.amount]}),(0,h.jsx)(`td`,{children:t.payer===`order`?`订单归属人`:n.find(e=>e.member===t.payer)?.label||`待确认`}),(0,h.jsx)(`td`,{children:t.byQuantity?`单价 × 数量`:`每单一次`}),(0,h.jsx)(`td`,{children:t.enabled?`启用`:`停用`}),(0,h.jsx)(`td`,{children:(0,h.jsxs)(`div`,{className:`actions`,children:[(0,h.jsx)(s,{action:`shop-cost-edit`,className:`quiet`,"data-kind":e,onClick:()=>j(`edit`,e),children:`编辑`}),(0,h.jsx)(s,{action:`shop-cost-delete`,className:`danger`,"data-kind":e,onClick:()=>j(`delete`,e),children:`删除`})]})})]},e))})]})}):(0,h.jsx)(`p`,{className:`empty`,children:Object.keys(x).length?`没有匹配的成本项目。`:`还没有勾选成本,点击“新增成本”添加。`})}),w&&(0,h.jsxs)(o,{id:`shop-cost-dialog`,close:A,children:[(0,h.jsx)(s,{className:`dialog-close`,action:`shop-cost-close`,"aria-label":`关闭成本编辑`,onClick:A,children:`×`}),(0,h.jsx)(`h2`,{children:{add:`新增成本`,delete:`删除成本`,edit:`编辑成本`}[w.action]}),(0,h.jsxs)(`form`,{id:`shop-cost-form`,onSubmit:M,onChange:e=>{let t=g(e.currentTarget);v(Object.keys(t).some(e=>t[e]!==w.original[e]))},children:[w.action===`delete`?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)(`p`,{children:[`删除“`,(0,h.jsx)(`strong`,{children:w.original.name}),`”?`]}),(0,h.jsx)(`p`,{className:`muted`,children:`删除后不会再出现在新单勾选项里,已开订单、成本和流水保留。`})]}):(0,h.jsxs)(`div`,{className:`grid two`,children:[(0,h.jsx)(i,{label:`成本名称`,name:`name`,defaultValue:w.original.name,required:!0,maxLength:40,disabled:E}),(0,h.jsx)(i,{label:`金额/单价(元)`,name:`amount`,type:`number`,defaultValue:w.original.amount,required:!0,min:0,max:1e6,step:`0.01`,disabled:E}),(0,h.jsx)(a,{label:`付款人`,name:`payer`,defaultValue:w.original.payer,options:[[`order`,`订单归属人`],...u(n,w.original.payer,r)],disabled:E}),(0,h.jsx)(a,{Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{n as e}from"./rolldown-runtime-Dl_DZoUm.js";import{i as t,t as n}from"./react-1o5M9n0k.js";import{a as r,z as i}from"./index-D-ox0wtk.js";import{y as a}from"./skeleton-B4Z0R3jQ.js";import{n as o,t as s}from"./input-BnsACfRy.js";import{n as c,t as l}from"./ReloadOutlined-BW5sy5GM.js";import{t as u}from"./typography-xRg_3Gco.js";import{o as d}from"./shared-DZLPF0cC.js";var f=e(t(),1),p=e=>typeof e==`number`&&Number.isSafeInteger(e),m=e=>p(e)&&e>=0,h=e=>typeof e==`object`&&!!e;function g(e,t){return/^\d{4}-(0[1-9]|1[0-2])$/.test(e)&&e>=`2000-01`&&e<=t.slice(0,7)}function _(){throw Error(`月度利润未完整返回,请重新读取。`)}function v(e,t,n){if(!h(e)||e.basis!==`orderDate`||e.month!==t||e.from!==t+`-01`||typeof e.date!=`string`||!/^\d{4}-\d{2}-\d{2}$/.test(e.date)||!e.date.startsWith(t)||e.date<e.from||e.date>n.today||!Array.isArray(e.rows))return _();let r=new Date(e.date+`T12:00:00Z`);if(Number.isNaN(r.getTime())||r.toISOString().slice(0,10)!==e.date)return _();let i=new Set(d.memberKeys(n).filter(e=>e!==`owner`)),a=e.rows.map(e=>{if(!h(e))return _();let{member:t,name:n,recordCount:r,orderCount:a,afterSaleCount:o,draftCount:s,unknownCostCount:c,unknownProfitCount:l,sales:u,knownTotalCost:d,knownProfit:f,profit:g,incomplete:v,shareRate:y,estimatedShare:b}=e;if(typeof t!=`string`||!i.delete(t)||typeof n!=`string`||!n||!m(r)||!m(a)||!m(o)||!m(s)||!m(c)||!m(l)||r!==a+o||!p(u)||!p(d)||!p(f)||typeof v!=`boolean`||!p(y)||y<0||y>100)return _();if(g===null){if(!v||b!==null)return _()}else{if(g!==f||v||!p(b))return _();let e=(BigInt(Math.abs(f))*BigInt(y)+50n)/100n;if(b!==Number(f<0?-e:e))return _()}return{member:t,profit:g,knownProfit:f,unknownProfitCount:l,shareRate:y,estimatedShare:b}});return i.size?_():{from:e.from,date:e.date,rows:a}}var y=n(),b=new WeakMap;function x({client:e,state:t}){return t.user.role===`owner`?(0,y.jsx)(S,{client:e,state:t},t.user.id):(0,y.jsx)(i,{type:`error`,showIcon:!0,message:`团队账目仅店主账号可查看。`})}function S({client:e,state:t}){let[n,p]=(0,f.useState)(()=>{let n=b.get(e);return{month:n?.user===t.user.id?n.month:t.today.slice(0,7)}}),[m,h]=(0,f.useState)(n.month),[_,x]=(0,f.useState)(null);(0,f.useEffect)(()=>{let r=!0;async function i(){try{if(!g(n.month,t.today))throw Error(`请选择2000年1月至本月之间的有效月份。`);let i=await e.api(`/api/team-profits?`+new URLSearchParams({month:n.month}));r&&x({request:n,report:v(i,n.month,t)})}catch(e){let t=e;r&&x({request:n,error:t.name===`AbortError`?`读取超时,请重试。`:t.message})}}return i(),()=>{r=!1}},[e,n,t]);let S=()=>p({month:n.month}),C=_&&`report`in _?_.report:null;return(0,y.jsxs)(`div`,{className:`team-profits-page`,children:[(0,y.jsxs)(`div`,{className:`page-heading`,children:[(0,y.jsxs)(`div`,{children:[(0,y.jsx)(`div`,{className:`eyebrow`,children:`TEAM PROFITS`}),(0,y.jsx)(u.Title,{level:1,children:`团队账目`}),(0,y.jsx)(u.Paragraph,{type:`secondary`,children:`按月核对助理净利润与预计分成。`})]}),(0,y.jsx)(a,{icon:(0,y.jsx)(l,{"aria-hidden":`true`}),"data-action":`team-funds-refresh`,onClick:S,children:`刷新`})]}),(0,y.jsx)(o,{className:`panel`,children:(0,y.jsx)(`form`,{id:`team-funds-filter`,onSubmit:n=>{n.preventDefault(),b.set(e,{user:t.user.id,month:m}),p({month:m})},children:(0,y.jsxs)(c,{align:`end`,wrap:!0,children:[(0,y.jsxs)(`label`,{className:`team-month-field`,children:[`月份`,(0,y.jsx)(s,{type:`month`,name:`month`,value:m,required:!0,min:`2000-01`,max:t.today.slice(0,7),onChange:e=>h(e.target.value)})]}),(0,y.jsx)(a,{type:`primary`,htmlType:`submit`,autoInsertSpace:!1,children:`查询`})]})})}),(0,y.jsx)(u.Paragraph,{type:`secondary`,children:`订单按开单日期、售后按记录日期计入;锁价单交付后计入利润。本月统计截至今天,成本或费用未补齐时显示待核算。`}),(0,y.jsxs)(`div`,{id:`team-funds-content`,"aria-live":`polite`,"aria-busy":_?.request!==n,children:[!_&&(0,y.jsx)(`p`,{children:`正在读取月度利润…`}),_&&`error`in _&&(0,y.jsx)(i,{type:`error`,showIcon:!0,message:_.error,action:(0,y.jsx)(a,{size:`small`,"data-action":`team-funds-refresh`,onClick:S,children:`重新读取`})}),C&&(0,y.jsxs)(o,{className:`panel`,title:(0,y.jsx)(`h2`,{children:`助理月度利润`}),extra:(0,y.jsxs)(`span`,{className:`muted`,children:[C.from,` 至 `,C.date]}),children:[(0,y.jsx)(`div`,{className:`team-profit-table`,children:(0,y.jsxs)(`table`,{children:[(0,y.jsx)(`thead`,{children:(0,y.jsxs)(`tr`,{children:[(0,y.jsx)(`th`,{scope:`col`,children:`成员`}),(0,y.jsx)(`th`,{scope:`col`,children:`月度净利润`}),(0,y.jsx)(`th`,{scope:`col`,children:`分成比例`}),(0,y.jsx)(`th`,{scope:`col`,children:`预计分成`})]})}),(0,y.jsx)(`tbody`,{children:C.rows.map(e=>(0,y.jsxs)(`tr`,{children:[(0,y.jsx)(`td`,{children:(0,y.jsx)(`strong`,{children:d.memberName(t,e.member)})}),(0,y.jsx)(`td`,{children:e.profit===null?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`strong`,{children:`待核算`}),(0,y.Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
.team-month-field{gap:6px;display:grid}.team-profits-page .ant-card-head{flex-wrap:wrap}.team-profits-page .ant-card-head-wrapper{flex-wrap:wrap;gap:4px 12px}.team-profits-page .ant-card-head h2{margin:0;font-size:16px}.team-profits-page .ant-card-extra{font-size:12px}.team-profit-table{overflow-x:auto}.team-profit-table table{border-collapse:collapse;font-variant-numeric:tabular-nums;width:100%}.team-profit-table th,.team-profit-table td{border-bottom:1px solid var(--border);text-align:right;padding:10px 8px}.team-profit-table th:first-child,.team-profit-table td:first-child{text-align:left}.team-profit-table thead{background:var(--soft)}
|
||||
-270
@@ -1,270 +0,0 @@
|
||||
import{n as e,t}from"./rolldown-runtime-Dl_DZoUm.js";var n=t((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function b(){}b.prototype=y.prototype;function x(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}var S=x.prototype=new b;S.constructor=x,_(S,y.prototype),S.isPureReactComponent=!0;var C=Array.isArray;function w(){}var T={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function D(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function O(e,t){return D(e.type,t,e.props)}function k(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function A(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var j=/\/+/g;function M(e,t){return typeof e==`object`&&e&&e.key!=null?A(``+e.key):t.toString(36)}function N(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(w,w):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function P(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,P(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+M(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(j,`$&/`)+`/`),P(o,r,i,``,function(e){return e})):o!=null&&(k(o)&&(o=O(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(j,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(C(e))for(var u=0;u<e.length;u++)a=e[u],s=l+M(a,u),c+=P(a,r,i,s,o);else if(u=h(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+M(a,u++),c+=P(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return P(N(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function F(e,t,n){if(e==null)return e;var r=[],i=0;return P(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function I(e){if(e._status===-1){var t=(0,e._result)();t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n,t.status===void 0&&(t.status=`fulfilled`,t.value=n))},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n,t.status===void 0&&(t.status=`rejected`,t.reason=n))}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var L=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)};function R(e){var t=T.T,n={};n.types=t===null?null:t.types,T.T=n;try{var r=e(),i=T.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(w,L)}catch(e){L(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),T.T=t}}function z(e){var t=T.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else R(z.bind(null,e))}var B={map:F,forEach:function(e,t,n){F(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return F(e,function(){t++}),t},toArray:function(e){return F(e,function(e){return e})||[]},only:function(e){if(!k(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.ChilLine truncated
|
||||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function X(e){var t=Ge(e);return t===e?We(e):t||Ke(e)||qe()}var Je=function(e){return+setTimeout(e,16)},Ye=function(e){return clearTimeout(e)};typeof window<`u`&&`requestAnimationFrame`in window&&(Je=function(e){return window.requestAnimationFrame(e)},Ye=function(e){return window.cancelAnimationFrame(e)});var Xe=0,Ze=new Map;function Qe(e){Ze.delete(e)}var $e=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;Xe+=1;var n=Xe;function r(t){if(t===0)Qe(n),e();else{var i=Je(function(){r(t-1)});Ze.set(n,i)}}return r(t),n};$e.cancel=function(e){var t=Ze.get(e);return Qe(e),Ye(t)};function et(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(Array.isArray(e)&&(n==null||n===(typeof Symbol<`u`&&[][Symbol.iterator])||n===[][`@@iterator`]))return e;if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function tt(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
||||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Z(e,t){return et(e,t)||Ke(e,t)||tt()}function nt(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*0x5bd1e995+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*0x5bd1e995+((n>>>16)*59797<<16)^(t&65535)*0x5bd1e995+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*0x5bd1e995+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*0x5bd1e995+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}function rt(){return!!(typeof window<`u`&&window.document&&window.document.createElement)}function it(e,t){if(!e)return!1;if(e.contains)return e.contains(t);for(var n=t;n;){if(n===e)return!0;n=n.parentNode}return!1}var at=`data-rc-order`,ot=`data-rc-priority`,st=`rc-util-key`,ct=new Map;function lt(){var e=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}).mark;return e?e.startsWith(`data-`)?e:`data-${e}`:st}function ut(e){return e.attachTo?e.attachTo:document.querySelector(`head`)||document.body}function dt(e){return e===`queue`?`prependQueue`:e?`prepend`:`append`}function ft(e){return Array.from((ct.get(e)||e).children).filter(function(e){return e.tagName===`STYLE`})}function pt(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!rt())return null;var n=t.csp,r=t.prepend,i=t.priority,a=i===void 0?0:i,o=dt(r),s=o===`prependQueue`,c=document.createElement(`style`);c.setAttribute(at,o),s&&a&&c.setAttribute(ot,`${a}`),n!=null&&n.nonce&&(c.nonce=n?.nonce),c.innerHTML=e;var l=ut(t),u=l.firstChild;if(r){if(s){var d=(t.styles||ft(l)).filter(function(e){return[`prepend`,`prependQueue`].includes(e.getAttribute(at))?a>=Number(e.getAttribute(ot)||0):!1});if(d.length)return l.insertBefore(c,d[d.length-1].nextSibling),c}l.insertBefore(c,u)}else l.appendChild(c);return c}function mt(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=ut(t);return(t.styles||ft(n)).find(function(n){return n.getAttribute(lt(t))===e})}function ht(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=mt(e,t);n&&ut(t).removeChild(n)}function gt(e,t){var n=ct.get(e);if(!n||!it(document,n)){var r=pt(``,t),i=r.parentNode;ct.set(e,i),e.removeChild(r)}}function _t(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=ut(n),i=ft(r),a=O(O({},n),{},{styles:i});gt(r,a);var o=mt(t,a);if(o){var s;return(s=a.csp)!=null&&s.nonce&&o.nonce!==a.csp?.nonce&&(o.nonce=a.csp?.nonce),o.innerHTML!==e&&(o.innerHTML=e),o}var c=pt(e,a);return c.setAttribute(lt(a),t),c}function vt(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function yt(e,t){if(e==null)return{};var n,r,i=vt(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function bt(e,t){var n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],r=new Set;function i(e,t){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,o=r.has(e);if(C(!o,`Warning: There may be circular references`),o)return!1;if(e===t)return!0;if(n&&a>1)return!1;r.add(e);var s=a+1;if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(var c=0;c<e.length;c++)if(!i(e[c],t[c],s))return!1;return!0}if(e&&t&&l(e)===`object`&&l(t)===`object`){var u=Object.keys(e);return u.length===Object.keys(t).length&&u.every(function(n){return i(e[n],t[n],s)})}return!1}return i(e,t)}var xt=`%`;function St(e){return e.join(xt)}var Ct=function(){function e(t){Oe(this,e),E(this,`instanceId`,void 0),E(this,`cache`,new Map),E(this,`extracted`,new Set),this.instanceId=t}return Ae(e,[{key:`get`,value:function(e){return this.opGet(St(e))}},{key:`opGet`,value:function(e){return this.cache.get(e)||null}},{key:`update`,value:function(e,t){return this.opUpdate(St(e),t)}},{key:`opUpdate`,value:function(e,t){var n=t(this.cache.get(e));n===null?this.cache.delete(e):this.cache.set(e,n)}}]),e}(),wt=`data-token-hash`,Tt=`data-css-hash`,Et=`__cssinjs_instance__`;function Dt(){var e=Math.random().toString(12).slice(2);if(typeof document<`u`&&document.head&&document.body){var t=document.body.querySelectorAll(`style[data-css-hash]`)||[],n=document.head.firstChild;Array.from(t).forEach(function(t){t[Et]=t.__cssinjs_instance__||e,t.__cssinjs_instance__===e&&document.head.insertBefore(t,n)});var r={};Array.from(document.querySelectorAll(`style[${Tt}]`)).forEach(function(t){var n=t.getAttribute(Tt);if(r[n]){if(t.__cssinjs_instance__===e){var i;(i=t.parentNode)==null||i.removeChild(t)}}else r[n]=!0})}return new Ct(e)}var Ot=s.createContext({hashPriority:`low`,cache:Dt(),defaultCache:!0});function kt(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}var At
Line truncated
|
||||
`;else if(r._keyframe)h(r);else{var c=f.reduce(function(e,t){var n;return(t==null||(n=t.visit)==null?void 0:n.call(t,e))||e},r);Object.keys(c).forEach(function(t){var r=c[t];if(l(r)===`object`&&r&&(t!==`animationName`||!r._keyframe)&&!pr(r)){var d=!1,f=t.trim(),g=!1;(i||a)&&s?f.startsWith(`@`)?d=!0:f=mr(f===`&`?``:t,s,u):i&&!s&&(f===`&`||f===``)&&(f=``,g=!0);var _=Z(e(r,n,{root:g,injectHash:d,parentSelectors:[].concat(X(o),[f])}),2),v=_[0],y=_[1];m=O(O({},m),y),p+=`${f}${v}`}else{function e(e,t){var n=e.replace(/[A-Z]/g,function(e){return`-${e.toLowerCase()}`}),r=t;!dn[e]&&typeof r==`number`&&r!==0&&(r=`${r}px`),e===`animationName`&&t!=null&&t._keyframe&&(h(t),r=t.getName(s)),p+=`${n}:${r};`}var b=r?.value??r;l(r)===`object`&&r!=null&&r[dr]&&Array.isArray(b)?b.forEach(function(n){e(t,n)}):e(t,b)}})}}),i?c&&(p&&=`@layer ${c.name} {${p}}`,c.dependencies&&(m[`@layer ${c.name}`]=c.dependencies.map(function(e){return`@layer ${e}, ${c.name};`}).join(`
|
||||
`))):p=`{${p}}`,[p,m]};function gr(e,t){return nt(`${e.join(`%`)}${t}`)}function _r(){return null}var vr=`style`;function yr(e,t){var n=e.token,r=e.path,i=e.hashId,a=e.layer,o=e.nonce,l=e.clientOnly,u=e.order,d=u===void 0?0:u,f=s.useContext(Ot),p=f.autoClear;f.mock;var m=f.defaultCache,h=f.hashPriority,g=f.container,_=f.ssrInline,v=f.transformers,y=f.linters,b=f.cache,x=f.layer,S=n._tokenKey,C=[S];x&&C.push(`layer`),C.push.apply(C,X(r));var w=Vt,T=Z(Qt(vr,C,function(){var e=C.join(`|`);if(cr(e)){var n=Z(lr(e),2),o=n[0],s=n[1];if(o)return[o,S,s,{},l,d]}var c=Z(hr(t(),{hashId:i,hashPriority:h,layer:x?a:void 0,path:r.join(`-`),transformers:v,linters:y}),2),u=c[0],f=c[1],p=fr(u);return[p,S,gr(C,p),f,l,d]},function(e,t){var n=Z(e,3)[2];(t||p)&&Vt&&ht(n,{mark:Tt,attachTo:g})},function(e){var t=Z(e,4),n=t[0];t[1];var r=t[2],i=t[3];if(w&&n!==`_FILE_STYLE__`){var a={mark:Tt,prepend:!x&&`queue`,attachTo:g,priority:d},s=typeof o==`function`?o():o;s&&(a.csp={nonce:s});var c=[],l=[];Object.keys(i).forEach(function(e){e.startsWith(`@layer`)?c.push(e):l.push(e)}),c.forEach(function(e){_t(fr(i[e]),`_layer-${e}`,O(O({},a),{},{prepend:!0}))});var u=_t(n,r,a);u[Et]=b.instanceId,u.setAttribute(wt,S),l.forEach(function(e){_t(fr(i[e]),`_effect-${e}`,a)})}}),3),D=T[0],k=T[1],A=T[2];return function(e){var t=!_||w||!m?s.createElement(_r,null):s.createElement(`style`,c({},E(E({},wt,k),Tt,A),{dangerouslySetInnerHTML:{__html:D}}));return s.createElement(s.Fragment,null,t,e)}}var br=function(e,t,n){var r=Z(e,6),i=r[0],a=r[1],o=r[2],s=r[3],c=r[4],l=r[5],u=(n||{}).plain;if(c)return null;var d=i,f={"data-rc-order":`prependQueue`,"data-rc-priority":`${l}`};return d=Ht(i,a,o,f,u),s&&Object.keys(s).forEach(function(e){if(!t[e]){t[e]=!0;var n=Ht(fr(s[e]),a,`_effect-${e}`,f,u);e.startsWith(`@layer`)?d=n+d:d+=n}}),[l,o,d]},xr=`cssVar`,Sr=function(e,t){var n=e.key,r=e.prefix,i=e.unitless,a=e.ignore,o=e.token,c=e.scope,l=c===void 0?``:c,u=(0,s.useContext)(Ot),d=u.cache.instanceId,f=u.container,p=o._tokenKey,m=[].concat(X(e.path),[n,l,p]);return Qt(xr,m,function(){var e=Z(Gt(t(),n,{prefix:r,unitless:i,ignore:a,scope:l}),2),o=e[0],s=e[1];return[o,s,gr(m,s),n]},function(e){var t=Z(e,3)[2];Vt&&ht(t,{mark:Tt,attachTo:f})},function(e){var t=Z(e,3),r=t[1],i=t[2];if(r){var a=_t(r,i,{mark:Tt,prepend:`queue`,attachTo:f,priority:-999});a[Et]=d,a.setAttribute(wt,n)}})};E(E(E({},vr,br),cn,un),xr,function(e,t,n){var r=Z(e,4),i=r[1],a=r[2],o=r[3],s=(n||{}).plain;if(!i)return null;var c=-999;return[c,a,Ht(i,o,a,{"data-rc-order":`prependQueue`,"data-rc-priority":`${c}`},s)]});var Cr=function(){function e(t,n){Oe(this,e),E(this,`name`,void 0),E(this,`style`,void 0),E(this,`_keyframe`,!0),this.name=t,this.style=n}return Ae(e,[{key:`getName`,value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:``;return e?`${e}-${this.name}`:this.name}}]),e}();function wr(e){return e.notSplit=!0,e}wr([`borderTop`,`borderBottom`]),wr([`borderTop`]),wr([`borderBottom`]),wr([`borderLeft`,`borderRight`]),wr([`borderLeft`]),wr([`borderRight`]);var Tr=(0,s.createContext)({});function Er(e){return Ge(e)||Ke(e)||tt()}function Dr(e,t){for(var n=e,r=0;r<t.length;r+=1){if(n==null)return;n=n[t[r]]}return n}function Or(e,t,n,r){if(!t.length)return n;var i=Er(t),a=i[0],o=i.slice(1),s=!e&&typeof a==`number`?[]:Array.isArray(e)?X(e):O({},e);return r&&n===void 0&&o.length===1?delete s[a][o[0]]:s[a]=Or(s[a],o,n,r),s}function kr(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0&&arguments[3];return t.length&&r&&n===void 0&&!Dr(e,t.slice(0,-1))?e:Or(e,t,n,r)}function Ar(e){return l(e)===`object`&&e!==null&&Object.getPrototypeOf(e)===Object.prototype}function jr(e){return Array.isArray(e)?[]:{}}var Mr=typeof Reflect>`u`?Object.keys:Reflect.ownKeys;function Nr(){var e=[...arguments],t=jr(e[0]);return e.forEach(function(e){function n(r,i){var a=new Set(i),o=Dr(e,r),s=Array.isArray(o);if(s||Ar(o)){if(!a.has(o)){a.add(o);var c=Dr(t,r);s?t=kr(t,r,[]):c&&l(c)===`object`||(t=kr(t,r,jr(o))),Mr(o).forEach(function(e){n([].concat(X(r),[e]),a)})}}else t=kr(t,r,o)}n([])}),t}function Pr(){}var Fr=s.createContext({}),Ir=()=>{let e=()=>{};return e.deprecated=Pr,e},Lr=(0,s.createContext)(void 0),Rr={items_per_page:`/ page`,jump_to:`Go to`,jump_to_confirm:`confirm`,page:`Page`,prev_page:`Previous Page`,next_page:`Next Page`,prev_5:`Previous 5 Pages`,next_5:`Next 5 Pages`,prev_3:`Previous 3 Pages`,next_3:`Next 3 Pages`,page_size:`Page Size`},zr=O(O({},{yearFormat:`YYYY`,dayFormat:`D`,cellMeridiemFormat:`A`,monthBeforeYear:!0}),{},{locale:`en_US`,today:`Today`,now:`Now`,backToToday:`Back to today`,ok:`OK`,clear:`Clear`,week:`Week`,month:`Month`,year:`Year`,timeSelect:`select time`,dateSelect:`select date`,weekSelect:`Choose a week`,monthSelect:`Choose a month`,yearSelect:`Choose a year`,decadeSelect:`Choose a decade`,dateFormat:`M/D/YYYY`,dateTimeFormat:`M/D/YYYY HH:mm:ss`,previousMonth:`Previous month (PageUp)`,nextMonth:`Next month (PageDown)`,previousYear:`Last year (Control + left)`,next
Line truncated
|
||||
'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
|
||||
'Noto Color Emoji'`,fontFamilyCode:`'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace`,fontSize:14,lineWidth:1,lineType:`solid`,motionUnit:.1,motionBase:0,motionEaseOutCirc:`cubic-bezier(0.08, 0.82, 0.17, 1)`,motionEaseInOutCirc:`cubic-bezier(0.78, 0.14, 0.15, 0.86)`,motionEaseOut:`cubic-bezier(0.215, 0.61, 0.355, 1)`,motionEaseInOut:`cubic-bezier(0.645, 0.045, 0.355, 1)`,motionEaseOutBack:`cubic-bezier(0.12, 0.4, 0.29, 1.46)`,motionEaseInBack:`cubic-bezier(0.71, -0.46, 0.88, 0.6)`,motionEaseInQuint:`cubic-bezier(0.755, 0.05, 0.855, 0.06)`,motionEaseOutQuint:`cubic-bezier(0.23, 1, 0.32, 1)`,borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1,motion:!0}),ni=Math.round;function ri(e,t){let n=e.replace(/^[^(]*\((.*)/,`$1`).replace(/\).*/,``).match(/\d*\.?\d+%?/g)||[],r=n.map(e=>parseFloat(e));for(let e=0;e<3;e+=1)r[e]=t(r[e]||0,n[e]||``,e);return r[3]=n[3]?n[3].includes(`%`)?r[3]/100:r[3]:1,r}var ii=(e,t,n)=>n===0?e:e/100;function ai(e,t){let n=t||255;return e>n?n:e<0?0:e}var oi=class e{constructor(t){E(this,`isValid`,!0),E(this,`r`,0),E(this,`g`,0),E(this,`b`,0),E(this,`a`,1),E(this,`_h`,void 0),E(this,`_s`,void 0),E(this,`_l`,void 0),E(this,`_v`,void 0),E(this,`_max`,void 0),E(this,`_min`,void 0),E(this,`_brightness`,void 0);function n(e){return e[0]in t&&e[1]in t&&e[2]in t}if(t){if(typeof t==`string`){let e=t.trim();function n(t){return e.startsWith(t)}/^#?[A-F\d]{3,8}$/i.test(e)?this.fromHexString(e):n(`rgb`)?this.fromRgbString(e):n(`hsl`)?this.fromHslString(e):(n(`hsv`)||n(`hsb`))&&this.fromHsvString(e)}else if(t instanceof e)this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this._h=t._h,this._s=t._s,this._l=t._l,this._v=t._v;else if(n(`rgb`))this.r=ai(t.r),this.g=ai(t.g),this.b=ai(t.b),this.a=typeof t.a==`number`?ai(t.a,1):1;else if(n(`hsl`))this.fromHsl(t);else if(n(`hsv`))this.fromHsv(t);else throw Error(`@ant-design/fast-color: unsupported input `+JSON.stringify(t))}}setR(e){return this._sc(`r`,e)}setG(e){return this._sc(`g`,e)}setB(e){return this._sc(`b`,e)}setA(e){return this._sc(`a`,e,1)}setHue(e){let t=this.toHsv();return t.h=e,this._c(t)}getLuminance(){function e(e){let t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4}let t=e(this.r),n=e(this.g),r=e(this.b);return .2126*t+.7152*n+.0722*r}getHue(){if(this._h===void 0){let e=this.getMax()-this.getMin();this._h=e===0?0:ni(60*(this.r===this.getMax()?(this.g-this.b)/e+(this.g<this.b?6:0):this.g===this.getMax()?(this.b-this.r)/e+2:(this.r-this.g)/e+4))}return this._h}getSaturation(){if(this._s===void 0){let e=this.getMax()-this.getMin();this._s=e===0?0:e/this.getMax()}return this._s}getLightness(){return this._l===void 0&&(this._l=(this.getMax()+this.getMin())/510),this._l}getValue(){return this._v===void 0&&(this._v=this.getMax()/255),this._v}getBrightness(){return this._brightness===void 0&&(this._brightness=(this.r*299+this.g*587+this.b*114)/1e3),this._brightness}darken(e=10){let t=this.getHue(),n=this.getSaturation(),r=this.getLightness()-e/100;return r<0&&(r=0),this._c({h:t,s:n,l:r,a:this.a})}lighten(e=10){let t=this.getHue(),n=this.getSaturation(),r=this.getLightness()+e/100;return r>1&&(r=1),this._c({h:t,s:n,l:r,a:this.a})}mix(e,t=50){let n=this._c(e),r=t/100,i=e=>(n[e]-this[e])*r+this[e],a={r:ni(i(`r`)),g:ni(i(`g`)),b:ni(i(`b`)),a:ni(i(`a`)*100)/100};return this._c(a)}tint(e=10){return this.mix({r:255,g:255,b:255,a:1},e)}shade(e=10){return this.mix({r:0,g:0,b:0,a:1},e)}onBackground(e){let t=this._c(e),n=this.a+t.a*(1-this.a),r=e=>ni((this[e]*this.a+t[e]*t.a*(1-this.a))/n);return this._c({r:r(`r`),g:r(`g`),b:r(`b`),a:n})}isDark(){return this.getBrightness()<128}isLight(){return this.getBrightness()>=128}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}clone(){return this._c(this)}toHexString(){let e=`#`,t=(this.r||0).toString(16);e+=t.length===2?t:`0`+t;let n=(this.g||0).toString(16);e+=n.length===2?n:`0`+n;let r=(this.b||0).toString(16);if(e+=r.length===2?r:`0`+r,typeof this.a==`number`&&this.a>=0&&this.a<1){let t=ni(this.a*255).toString(16);e+=t.length===2?t:`0`+t}return e}toHsl(){return{h:this.getHue(),s:this.getSaturation(),l:this.getLightness(),a:this.a}}toHslString(){let e=this.getHue(),t=ni(this.getSaturation()*100),n=ni(this.getLightness()*100);return this.a===1?`hsl(${e},${t}%,${n}%)`:`hsla(${e},${t}%,${n}%,${this.a})`}toHsv(){return{h:this.getHue(),s:this.getSaturation(),v:this.getValue(),a:this.a}}toRgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}toRgbString(){return this.a===1?`rgb(${this.r},${this.g},${this.b})`:`rgba(${this.r},${this.g},${this.b},${this.a})`}toString(){return this.toRgbString()}_sc(e,t,n){let r=this.clone();return r[e]=ai(t,n),r}_c(e){return new this.constructor(e)}getMax(){return this._max===void 0&&(this._max=Math.max(this.r,this.g,this.b)),this._max}getMin(){return this._min===void 0&&(this._min=Math.min(this.r,this.g,this.b)),this._min}fromHexString(e){let t=e.replace(`#`,``);functio
Line truncated
|
||||
:root {
|
||||
${Object.keys(n).map(t=>`--${e}-${t}: ${n[t]};`).join(`
|
||||
`)}
|
||||
}
|
||||
`.trim()}function _a(e,t){let n=ga(e,t);rt()&&_t(n,`${ha}-dynamic-theme`)}var va=s.createContext(!1),ya=({children:e,disabled:t})=>{let n=s.useContext(va);return s.createElement(va.Provider,{value:t??n},e)},ba=s.createContext(void 0),xa=({children:e,size:t})=>{let n=s.useContext(ba);return s.createElement(ba.Provider,{value:t||n},e)},Sa=Ae(function e(){Oe(this,e)}),Ca=`CALC_UNIT`,wa=new RegExp(Ca,`g`);function Ta(e){return typeof e==`number`?`${e}${Ca}`:e}var Ea=function(e){Me(n,e);var t=Le(n);function n(e,r){var i;Oe(this,n),i=t.call(this),E(Fe(i),`result`,``),E(Fe(i),`unitlessCssVar`,void 0),E(Fe(i),`lowPriority`,void 0);var a=l(e);return i.unitlessCssVar=r,e instanceof n?i.result=`(${e.result})`:a===`number`?i.result=Ta(e):a===`string`&&(i.result=e),i}return Ae(n,[{key:`add`,value:function(e){return e instanceof n?this.result=`${this.result} + ${e.getResult()}`:(typeof e==`number`||typeof e==`string`)&&(this.result=`${this.result} + ${Ta(e)}`),this.lowPriority=!0,this}},{key:`sub`,value:function(e){return e instanceof n?this.result=`${this.result} - ${e.getResult()}`:(typeof e==`number`||typeof e==`string`)&&(this.result=`${this.result} - ${Ta(e)}`),this.lowPriority=!0,this}},{key:`mul`,value:function(e){return this.lowPriority&&(this.result=`(${this.result})`),e instanceof n?this.result=`${this.result} * ${e.getResult(!0)}`:(typeof e==`number`||typeof e==`string`)&&(this.result=`${this.result} * ${e}`),this.lowPriority=!1,this}},{key:`div`,value:function(e){return this.lowPriority&&(this.result=`(${this.result})`),e instanceof n?this.result=`${this.result} / ${e.getResult(!0)}`:(typeof e==`number`||typeof e==`string`)&&(this.result=`${this.result} / ${e}`),this.lowPriority=!1,this}},{key:`getResult`,value:function(e){return this.lowPriority||e?`(${this.result})`:this.result}},{key:`equal`,value:function(e){var t=this,n=(e||{}).unit,r=!0;return typeof n==`boolean`?r=n:Array.from(this.unitlessCssVar).some(function(e){return t.result.includes(e)})&&(r=!1),this.result=this.result.replace(wa,r?`px`:``),this.lowPriority===void 0?this.result:`calc(${this.result})`}}]),n}(Sa),Da=function(e){Me(n,e);var t=Le(n);function n(e){var r;return Oe(this,n),r=t.call(this),E(Fe(r),`result`,0),e instanceof n?r.result=e.result:typeof e==`number`&&(r.result=e),r}return Ae(n,[{key:`add`,value:function(e){return e instanceof n?this.result+=e.result:typeof e==`number`&&(this.result+=e),this}},{key:`sub`,value:function(e){return e instanceof n?this.result-=e.result:typeof e==`number`&&(this.result-=e),this}},{key:`mul`,value:function(e){return e instanceof n?this.result*=e.result:typeof e==`number`&&(this.result*=e),this}},{key:`div`,value:function(e){return e instanceof n?this.result/=e.result:typeof e==`number`&&(this.result/=e),this}},{key:`equal`,value:function(){return this.result}}]),n}(Sa),Oa=function(e,t){var n=e===`css`?Ea:Da;return function(e){return new n(e,t)}},ka=function(e,t){return`${[t,e.replace(/([A-Z]+)([A-Z][a-z]+)/g,`$1-$2`).replace(/([a-z])([A-Z])/g,`$1-$2`)].filter(Boolean).join(`-`)}`};function Aa(e){var t=s.useRef();return t.current=e,s.useCallback(function(){var e,n=[...arguments];return(e=t.current)?.call.apply(e,[t].concat(n))},[])}function ja(e){var t=s.useRef(!1),n=Z(s.useState(e),2),r=n[0],i=n[1];s.useEffect(function(){return t.current=!1,function(){t.current=!0}},[]);function a(e,n){n&&t.current||i(e)}return[r,a]}function Ma(e){return e!==void 0}function Na(e,t){var n=t||{},r=n.defaultValue,i=n.value,a=n.onChange,o=n.postState,s=Z(ja(function(){return Ma(i)?i:Ma(r)?typeof r==`function`?r():r:typeof e==`function`?e():e}),2),c=s[0],l=s[1],u=i===void 0?c:i,d=o?o(u):u,f=Aa(a),p=Z(ja([u]),2),m=p[0],h=p[1];return Jt(function(){var e=m[0];c!==e&&f(c,e)},[m]),Jt(function(){Ma(i)||l(i)},[i]),[d,Aa(function(e,t){l(e,t),h([u],t)})]}function Pa(e,t,n,r){var i=O({},t[e]);r!=null&&r.deprecatedTokens&&r.deprecatedTokens.forEach(function(e){var t=Z(e,2),n=t[0],r=t[1];(i!=null&&i[n]||i!=null&&i[r])&&(i[r]??(i[r]=i?.[n]))});var a=O(O({},n),i);return Object.keys(a).forEach(function(e){a[e]===t[e]&&delete a[e]}),a}var Fa=typeof CSSINJS_STATISTIC<`u`,Ia=!0;function La(){var e=[...arguments];if(!Fa)return Object.assign.apply(Object,[{}].concat(e));Ia=!1;var t={};return e.forEach(function(e){l(e)===`object`&&Object.keys(e).forEach(function(n){Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get:function(){return e[n]}})})}),Ia=!0,t}var Ra={};function za(){}var Ba=function(e){var t,n=e,r=za;return Fa&&typeof Proxy<`u`&&(t=new Set,n=new Proxy(e,{get:function(e,n){if(Ia){var r;(r=t)==null||r.add(n)}return e[n]}}),r=function(e,n){Ra[e]={global:Array.from(t),component:O(O({},Ra[e]?.component),n)}}),{token:n,keys:t,flush:r}};function Va(e,t,n){return typeof n==`function`?n(La(t,t[e]??{})):n??{}}function Ha(e){return e===`js`?{max:Math.max,min:Math.min}:{max:function(){return`max(${[...arguments].map(function(e){return Q(e)}).join(`,`)})`},min:function(){return`min(${[...arguments].map(function(e){return Q(e)}).join(Line truncated
|
||||
0 6px 16px 0 rgba(0, 0, 0, 0.08),
|
||||
0 3px 6px -4px rgba(0, 0, 0, 0.12),
|
||||
0 9px 28px 8px rgba(0, 0, 0, 0.05)
|
||||
`,boxShadowSecondary:`
|
||||
0 6px 16px 0 rgba(0, 0, 0, 0.08),
|
||||
0 3px 6px -4px rgba(0, 0, 0, 0.12),
|
||||
0 9px 28px 8px rgba(0, 0, 0, 0.05)
|
||||
`,boxShadowTertiary:`
|
||||
0 1px 2px 0 rgba(0, 0, 0, 0.03),
|
||||
0 1px 6px -1px rgba(0, 0, 0, 0.02),
|
||||
0 2px 4px 0 rgba(0, 0, 0, 0.02)
|
||||
`,screenXS:480,screenXSMin:480,screenXSMax:575,screenSM:576,screenSMMin:576,screenSMMax:767,screenMD:768,screenMDMin:768,screenMDMax:991,screenLG:992,screenLGMin:992,screenLGMax:1199,screenXL:a,screenXLMin:a,screenXLMax:1599,screenXXL:o,screenXXLMin:o,boxShadowPopoverArrow:`2px 2px 5px rgba(0, 0, 0, 0.05)`,boxShadowCard:`
|
||||
0 1px 2px -2px ${new oi(`rgba(0, 0, 0, 0.16)`).toRgbString()},
|
||||
0 3px 6px 0 ${new oi(`rgba(0, 0, 0, 0.12)`).toRgbString()},
|
||||
0 5px 12px 4px ${new oi(`rgba(0, 0, 0, 0.09)`).toRgbString()}
|
||||
`,boxShadowDrawerRight:`
|
||||
-6px 0 16px 0 rgba(0, 0, 0, 0.08),
|
||||
-3px 0 6px -4px rgba(0, 0, 0, 0.12),
|
||||
-9px 0 28px 8px rgba(0, 0, 0, 0.05)
|
||||
`,boxShadowDrawerLeft:`
|
||||
6px 0 16px 0 rgba(0, 0, 0, 0.08),
|
||||
3px 0 6px -4px rgba(0, 0, 0, 0.12),
|
||||
9px 0 28px 8px rgba(0, 0, 0, 0.05)
|
||||
`,boxShadowDrawerUp:`
|
||||
0 6px 16px 0 rgba(0, 0, 0, 0.08),
|
||||
0 3px 6px -4px rgba(0, 0, 0, 0.12),
|
||||
0 9px 28px 8px rgba(0, 0, 0, 0.05)
|
||||
`,boxShadowDrawerDown:`
|
||||
0 -6px 16px 0 rgba(0, 0, 0, 0.08),
|
||||
0 -3px 6px -4px rgba(0, 0, 0, 0.12),
|
||||
0 -9px 28px 8px rgba(0, 0, 0, 0.05)
|
||||
`,boxShadowTabsOverflowLeft:`inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)`,boxShadowTabsOverflowRight:`inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)`,boxShadowTabsOverflowTop:`inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)`,boxShadowTabsOverflowBottom:`inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)`}),r)}var eo=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},to={lineHeight:!0,lineHeightSM:!0,lineHeightLG:!0,lineHeightHeading1:!0,lineHeightHeading2:!0,lineHeightHeading3:!0,lineHeightHeading4:!0,lineHeightHeading5:!0,opacityLoading:!0,fontWeightStrong:!0,zIndexPopupBase:!0,zIndexBase:!0,opacityImage:!0},no={motionBase:!0,motionUnit:!0},ro={screenXS:!0,screenXSMin:!0,screenXSMax:!0,screenSM:!0,screenSMMin:!0,screenSMMax:!0,screenMD:!0,screenMDMin:!0,screenMDMax:!0,screenLG:!0,screenLGMin:!0,screenLGMax:!0,screenXL:!0,screenXLMin:!0,screenXLMax:!0,screenXXL:!0,screenXXLMin:!0},io=(e,t,n)=>{let r=n.getDerivativeToken(e),{override:i}=t,a=eo(t,[`override`]),o=Object.assign(Object.assign({},r),{override:i});return o=$a(o),a&&Object.entries(a).forEach(([e,t])=>{let{theme:n}=t,r=eo(t,[`theme`]),i=r;n&&(i=io(Object.assign(Object.assign({},o),r),{override:r},n)),o[e]=i}),o};function ao(){let{token:e,hashed:t,theme:n,override:r,cssVar:i}=s.useContext(ca),a=`${Ya}-${t||``}`,o=n||oa,[c,l,u]=ln(o,[ti,e],{salt:a,override:r,getComputedToken:io,formatToken:$a,cssVar:i&&{prefix:i.prefix,key:i.key,unitless:to,ignore:no,preserve:ro}});return[o,u,t?l:``,c,i]}var oo={overflow:`hidden`,whiteSpace:`nowrap`,textOverflow:`ellipsis`},so=(e,t=!1)=>({boxSizing:`border-box`,margin:0,padding:0,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight,listStyle:`none`,fontFamily:t?`inherit`:e.fontFamily}),co=()=>({display:`inline-flex`,alignItems:`center`,color:`inherit`,fontStyle:`normal`,lineHeight:0,textAlign:`center`,textTransform:`none`,verticalAlign:`-0.125em`,textRendering:`optimizeLegibility`,"-webkit-font-smoothing":`antialiased`,"-moz-osx-font-smoothing":`grayscale`,"> *":{lineHeight:1},svg:{display:`inline-block`}}),lo=()=>({"&::before":{display:`table`,content:`""`},"&::after":{display:`table`,clear:`both`,content:`""`}}),uo=e=>({a:{color:e.colorLink,textDecoration:e.linkDecoration,backgroundColor:`transparent`,outline:`none`,cursor:`pointer`,transition:`color ${e.motionDurationSlow}`,"-webkit-text-decoration-skip":`objects`,"&:hover":{color:e.colorLinkHover},"&:active":{color:e.colorLinkActive},"&:active, &:hover":{textDecoration:e.linkHoverDecoration,outline:0},"&:focus":{textDecoration:e.linkFocusDecoration,outline:0},"&[disabled]":{color:e.colorTextDisabled,cursor:`not-allowed`}}}),fo=(e,t,n,r)=>{let i=`[class^="${t}"], [class*=" ${t}"]`,a=n?`.${n}`:i,o={boxSizing:`border-box`,"&::before, &::after":{boxSizing:`border-box`}},s={};return r!==!1&&(s={fontFamily:e.fontFamily,fontSize:e.fontSize}),{[a]:Object.assign(Object.assign(Object.assign({},s),o),{[i]:o})}},po=(e,t)=>({outline:`${Q(e.lineWidthFocus)} solid ${e.colorPrimaryBorder}`,outlineOffset:t??1,transition:`outline-offset 0s, outline 0s`}),mo=(e,t)=>({"&:focus-visible":po(e,t)}),ho=e=>({[`.${e}`]:Object.assign(Object.assign({},co()),{[`.${e} .${e}-icon`]:{display:`block`}})}),go=e=>Object.assign(Object.assign({color:e.colorLink,textDecoration:e.linkDecoration,outline:`none`,cursor:`pointer`,transition:`all ${e.motionDurationSlow}`,border:0,padding:0,background:`none`,userSelect:`none`},mo(e)),{"&:hover":{color:e.colorLinkHover,textDecoration:e.linkHoverDecoration},"&:focus":{color:e.colorLinkHover,textDecoration:e.linkFocusDecoration},"&:active":{color:e.colorLinkActive,textDecoration:e.linkHoverDecoration}}),{genStyleHooks:_o,genComponentStyleHook:vo,genSubStyleComponent:yo}=qa({usePrefix:()=>{let{getPrefixCls:e,iconPrefixCls:t}=(0,s.useContext)(da);return{rootPrefixCls:e(),iconPrefixCls:t}},useToken:()=>{let[e,t,n,r,i]=ao();return{theme:e,realToken:t,hashId:n,token:r,cssVar:i}},useCSP:()=>{let{csp:e}=(0,s.useContext)(da);return e??{}},getResetStyles:(e,t)=>{let n=uo(e);return[n,{"&":n},ho(t?.prefix.iconPrefixCls??la)]},getCommonStyle:fo,getCompUnitless:()=>to});function bo(e,t){return Ja.reduce((n,r)=>{let i=e[`${r}1`],a=e[`${r}3`],o=e[`${r}6`],s=e[`${r}7`];return Object.assign(Object.assign({},n),t(r,{lightColor:i,lightBorderColor:a,darkColor:o,textColor:s}))},{})}var xo=(e,t)=>{let[n,r]=ao();return yr({theme:n,token:r,hashId:``,path:[`ant-design-icons`,e],nonce:()=>t?.nonce,layer:{name:`antd`}},()=>ho(e))},{useId:So}=Object.assign({},s),Co=So===void 0?()=>``:So;function wo(e,t,n){Ir(`ConfigProvider`);let r=e||{},i=r.inherit===!1||!t?Object.assign(Object.assign({},sa),{hashed:t?.hashed??sa.hashed,cssVar:t?.cssVar}):t,a=Co();return P(()=>{if(!e)return t;let o=Object.assign({},i.components);Object.k
Line truncated
|
||||
.anticon {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
color: inherit;
|
||||
font-style: normal;
|
||||
line-height: 0;
|
||||
text-align: center;
|
||||
text-transform: none;
|
||||
vertical-align: -0.125em;
|
||||
text-rendering: optimizeLegibility;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.anticon > * {
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.anticon svg {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.anticon::before {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.anticon .anticon-icon {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.anticon[tabindex] {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.anticon-spin::before,
|
||||
.anticon-spin {
|
||||
display: inline-block;
|
||||
-webkit-animation: loadingCircle 1s infinite linear;
|
||||
animation: loadingCircle 1s infinite linear;
|
||||
}
|
||||
|
||||
@-webkit-keyframes loadingCircle {
|
||||
100% {
|
||||
-webkit-transform: rotate(360deg);
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes loadingCircle {
|
||||
100% {
|
||||
-webkit-transform: rotate(360deg);
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
`,qs=function(e){var t=(0,s.useContext)(Tr),n=t.csp,r=t.prefixCls,i=t.layer,a=Ks;r&&(a=a.replace(/anticon/g,r)),i&&(a=`@layer ${i} {
|
||||
${a}
|
||||
}`),(0,s.useEffect)(function(){var t=Rs(e.current);_t(a,`@ant-design-icons`,{prepend:!i,csp:n,attachTo:t})},[])},Js=[`icon`,`className`,`onClick`,`style`,`primaryColor`,`secondaryColor`],Ys={primaryColor:`#333`,secondaryColor:`#E6E6E6`,calculated:!1},Xs=function(e){var t=e.icon,n=e.className,r=e.onClick,i=e.style,a=e.primaryColor,o=e.secondaryColor,c=yt(e,Js),l=s.useRef(),u=Ys;if(a&&(u={primaryColor:a,secondaryColor:o||Ws(a)}),qs(l),Bs(Vs(t),`icon should be icon definiton, but got ${t}`),!Vs(t))return null;var d=t;return d&&typeof d.icon==`function`&&(d=O(O({},d),{},{icon:d.icon(u.primaryColor,u.secondaryColor)})),Us(d.icon,`svg-${d.name}`,O(O({className:n,onClick:r,style:i,"data-icon":d.name,width:`1em`,height:`1em`,fill:`currentColor`,"aria-hidden":`true`},c),{},{ref:l}))};Xs.displayName=`IconReact`,Xs.getTwoToneColors=function(){return O({},Ys)},Xs.setTwoToneColors=function(e){var t=e.primaryColor,n=e.secondaryColor;Ys.primaryColor=t,Ys.secondaryColor=n||Ws(t),Ys.calculated=!!n};function Zs(e){var t=Z(Gs(e),2),n=t[0],r=t[1];return Xs.setTwoToneColors({primaryColor:n,secondaryColor:r})}var Qs=[`className`,`icon`,`spin`,`rotate`,`tabIndex`,`onClick`,`twoToneColor`];Zs(Oi.primary);var $s=s.forwardRef(function(e,t){var n=e.className,r=e.icon,i=e.spin,a=e.rotate,o=e.tabIndex,l=e.onClick,u=e.twoToneColor,d=yt(e,Qs),f=s.useContext(Tr),p=f.prefixCls,m=p===void 0?`anticon`:p,g=f.rootClassName,_=(0,h.default)(g,m,E(E({},`${m}-${r.name}`,!!r.name),`${m}-spin`,!!i||r.name===`loading`),n),v=o;v===void 0&&l&&(v=-1);var y=a?{msTransform:`rotate(${a}deg)`,transform:`rotate(${a}deg)`}:void 0,b=Z(Gs(u),2),x=b[0],S=b[1];return s.createElement(`span`,c({role:`img`,"aria-label":r.name},d,{ref:t,tabIndex:v,onClick:l,className:_}),s.createElement(Xs,{icon:r,primaryColor:x,secondaryColor:S,style:y}))});$s.displayName=`AntdIcon`,$s.getTwoToneColor=function(){var e=Xs.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor},$s.setTwoToneColor=Zs;var ec=s.forwardRef(function(e,t){return s.createElement($s,c({},e,{ref:t,icon:Fs}))}),tc={icon:{tag:`svg`,attrs:{"fill-rule":`evenodd`,viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z`}}]},name:`close-circle`,theme:`filled`},nc=s.forwardRef(function(e,t){return s.createElement($s,c({},e,{ref:t,icon:tc}))}),rc={icon:{tag:`svg`,attrs:{"fill-rule":`evenodd`,viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z`}}]},name:`close`,theme:`outlined`},ic=s.forwardRef(function(e,t){return s.createElement($s,c({},e,{ref:t,icon:rc}))}),ac={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z`}}]},name:`exclamation-circle`,theme:`filled`},oc=s.forwardRef(function(e,t){return s.createElement($s,c({},e,{ref:t,icon:ac}))}),sc={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z`}}]},name:`info-circle`,theme:`filled`},cc=s.forwardRef(function(e,t){return s.createElement($s,c({},e,{ref:t,icon:sc}))}),lc=`accept acceptCharset accessKey action allowFullScreen allowTransparency
|
||||
alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
|
||||
charSet checked classID className colSpan cols content contentEditable contextMenu
|
||||
controls coords crossOrigin data dateTime default defer dir disabled download draggable
|
||||
encType form formAction formEncType formMethod formNoValidate formTarget frameBorder
|
||||
headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity
|
||||
is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media
|
||||
mediaGroup method min minLength multiple muted name noValidate nonce open
|
||||
optimum pattern placeholder poster preload radioGroup readOnly rel required
|
||||
reversed role rowSpan rows sandbox scope scoped scrolling seamless selected
|
||||
shape size sizes span spellCheck src srcDoc srcLang srcSet start step style
|
||||
summary tabIndex target title type useMap value width wmode wrap onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
|
||||
onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick
|
||||
onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown
|
||||
onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
|
||||
onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough
|
||||
onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata
|
||||
onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`.split(/[\s\n]+/),uc=`aria-`,dc=`data-`;function fc(e,t){return e.indexOf(t)===0}function pc(e){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n=t===!1?{aria:!0,data:!0,attr:!0}:t===!0?{aria:!0}:O({},t),r={};return Object.keys(e).forEach(function(t){(n.aria&&(t===`role`||fc(t,uc))||n.data&&fc(t,dc)||n.attr&&lc.includes(t))&&(r[t]=e[t])}),r}function mc(e){return e&&s.isValidElement(e)&&e.type===s.Fragment}var hc=(e,t,n)=>s.isValidElement(e)?s.cloneElement(e,typeof n==`function`?n(e.props||{}):n):t;function gc(e,t){return hc(e,e,t)}var _c=(e,t,n,r,i)=>({background:e,border:`${Q(r.lineWidth)} ${r.lineType} ${t}`,[`${i}-icon`]:{color:n}}),vc=e=>{let{componentCls:t,motionDurationSlow:n,marginXS:r,marginSM:i,fontSize:a,fontSizeLG:o,lineHeight:s,borderRadiusLG:c,motionEaseInOutCirc:l,withDescriptionIconSize:u,colorText:d,colorTextHeading:f,withDescriptionPadding:p,defaultPadding:m}=e;return{[t]:Object.assign(Object.assign({},so(e)),{position:`relative`,display:`flex`,alignItems:`center`,padding:m,wordWrap:`break-word`,borderRadius:c,[`&${t}-rtl`]:{direction:`rtl`},[`${t}-content`]:{flex:1,minWidth:0},[`${t}-icon`]:{marginInlineEnd:r,lineHeight:0},"&-description":{display:`none`,fontSize:a,lineHeight:s},"&-message":{color:f},[`&${t}-motion-leave`]:{overflow:`hidden`,opacity:1,transition:`max-height ${n} ${l}, opacity ${n} ${l},
|
||||
padding-top ${n} ${l}, padding-bottom ${n} ${l},
|
||||
margin-bottom ${n} ${l}`},[`&${t}-motion-leave-active`]:{maxHeight:0,marginBottom:`0 !important`,paddingTop:0,paddingBottom:0,opacity:0}}),[`${t}-with-description`]:{alignItems:`flex-start`,padding:p,[`${t}-icon`]:{marginInlineEnd:i,fontSize:u,lineHeight:0},[`${t}-message`]:{display:`block`,marginBottom:r,color:f,fontSize:o},[`${t}-description`]:{display:`block`,color:d}},[`${t}-banner`]:{marginBottom:0,border:`0 !important`,borderRadius:0}}},yc=e=>{let{componentCls:t,colorSuccess:n,colorSuccessBorder:r,colorSuccessBg:i,colorWarning:a,colorWarningBorder:o,colorWarningBg:s,colorError:c,colorErrorBorder:l,colorErrorBg:u,colorInfo:d,colorInfoBorder:f,colorInfoBg:p}=e;return{[t]:{"&-success":_c(i,r,n,e,t),"&-info":_c(p,f,d,e,t),"&-warning":_c(s,o,a,e,t),"&-error":Object.assign(Object.assign({},_c(u,l,c,e,t)),{[`${t}-description > pre`]:{margin:0,padding:0}})}}},bc=e=>{let{componentCls:t,iconCls:n,motionDurationMid:r,marginXS:i,fontSizeIcon:a,colorIcon:o,colorIconHover:s}=e;return{[t]:{"&-action":{marginInlineStart:i},[`${t}-close-icon`]:{marginInlineStart:i,padding:0,overflow:`hidden`,fontSize:a,lineHeight:Q(a),backgroundColor:`transparent`,border:`none`,outline:`none`,cursor:`pointer`,[`${n}-close`]:{color:o,transition:`color ${r}`,"&:hover":{color:s}}},"&-close-text":{color:o,transition:`color ${r}`,"&:hover":{color:s}}}}},xc=_o(`Alert`,e=>[vc(e),yc(e),bc(e)],e=>({withDescriptionIconSize:e.fontSizeHeading3,defaultPadding:`${e.paddingContentVerticalSM}px 12px`,withDescriptionPadding:`${e.paddingMD}px ${e.paddingContentHorizontalLG}px`})),Sc=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},Cc={success:ec,info:cc,error:nc,warning:oc},wc=e=>{let{icon:t,prefixCls:n,type:r}=e,i=Cc[r]||null;return t?hc(t,s.createElement(`span`,{className:`${n}-icon`},t),()=>({className:(0,h.default)(`${n}-icon`,t.props.className)})):s.createElement(i,{className:`${n}-icon`})},Tc=e=>{let{isClosable:t,prefixCls:n,closeIcon:r,handleClose:i,ariaProps:a}=e,o=r===!0||r===void 0?s.createElement(ic,null):r;return t?s.createElement(`button`,Object.assign({type:`button`,onClick:i,className:`${n}-close-icon`,tabIndex:0},a),o):null},Ec=s.forwardRef((e,t)=>{let{description:n,prefixCls:r,message:i,banner:a,className:o,rootClassName:c,style:l,onMouseEnter:u,onMouseLeave:d,onClick:f,afterClose:p,showIcon:m,closable:g,closeText:_,closeIcon:v,action:y,id:b}=e,x=Sc(e,[`description`,`prefixCls`,`message`,`banner`,`className`,`rootClassName`,`style`,`onMouseEnter`,`onMouseLeave`,`onClick`,`afterClose`,`showIcon`,`closable`,`closeText`,`closeIcon`,`action`,`id`]),[S,C]=s.useState(!1),w=s.useRef(null);s.useImperativeHandle(t,()=>({nativeElement:w.current}));let{getPrefixCls:T,direction:E,closable:D,closeIcon:O,className:k,style:A}=ma(`alert`),j=T(`alert`,r),[M,N,P]=xc(j),F=t=>{var n;C(!0),(n=e.onClose)==null||n.call(e,t)},I=s.useMemo(()=>e.type===void 0?a?`warning`:`info`:e.type,[e.type,a]),L=s.useMemo(()=>typeof g==`object`&&g.closeIcon||_?!0:typeof g==`boolean`?g:v!==!1&&v!=null||!!D,[_,v,g,D]),z=a&&m===void 0?!0:m,B=(0,h.default)(j,`${j}-${I}`,{[`${j}-with-description`]:!!n,[`${j}-no-icon`]:!z,[`${j}-banner`]:!!a,[`${j}-rtl`]:E===`rtl`},k,o,c,P,N),V=pc(x,{aria:!0,data:!0}),H=s.useMemo(()=>typeof g==`object`&&g.closeIcon?g.closeIcon:_||(v===void 0?typeof D==`object`&&D.closeIcon?D.closeIcon:O:v),[v,g,D,_,O]),U=s.useMemo(()=>{let e=g??D;if(typeof e==`object`){let{closeIcon:t}=e;return Sc(e,[`closeIcon`])}return{}},[g,D]);return M(s.createElement(vs,{visible:!S,motionName:`${j}-motion`,motionAppear:!1,motionEnter:!1,onLeaveStart:e=>({maxHeight:e.offsetHeight}),onLeaveEnd:p},({className:t,style:r},a)=>s.createElement(`div`,Object.assign({id:b,ref:R(w,a),"data-show":!S,className:(0,h.default)(B,t),style:Object.assign(Object.assign(Object.assign({},A),l),r),onMouseEnter:u,onMouseLeave:d,onClick:f,role:`alert`},V),z?s.createElement(wc,{description:n,icon:e.icon,prefixCls:j,type:I}):null,s.createElement(`div`,{className:`${j}-content`},i?s.createElement(`div`,{className:`${j}-message`},i):null,n?s.createElement(`div`,{className:`${j}-description`},n):null),y?s.createElement(`div`,{className:`${j}-action`},y):null,s.createElement(Tc,{isClosable:L,prefixCls:j,closeIcon:H,handleClose:F,ariaProps:U}))))});function Dc(e,t,n){return t=Ne(t),Ie(e,Pe()?Reflect.construct(t,n||[],Ne(e).constructor):t.apply(e,n))}var Oc=function(e){function t(){var e;return Oe(this,t),e=Dc(this,t,arguments),e.state={error:void 0,info:{componentStack:``}},e}return Me(t,e),Ae(t,[{key:`componentDidCatch`,value:function(e,t){this.setState({error:e,info:t})}},{key:`render`,value:function(){let{message:e,description:t,id:n,children:r}=this.props,{error:i,info:a}=this.state,o=a?.componentStack||null,c=e===void
Line truncated
|
||||
${t}-loading > ${n}`]:{color:c}};return[{[t]:Object.assign(Object.assign({},so(e)),{color:i,position:`fixed`,top:f,width:`100%`,pointerEvents:`none`,zIndex:h,[`${t}-move-up`]:{animationFillMode:`forwards`},[`
|
||||
${t}-move-up-appear,
|
||||
${t}-move-up-enter
|
||||
`]:{animationName:y,animationDuration:d,animationPlayState:`paused`,animationTimingFunction:u},[`
|
||||
${t}-move-up-appear${t}-move-up-appear-active,
|
||||
${t}-move-up-enter${t}-move-up-enter-active
|
||||
`]:{animationPlayState:`running`},[`${t}-move-up-leave`]:{animationName:b,animationDuration:d,animationPlayState:`paused`,animationTimingFunction:u},[`${t}-move-up-leave${t}-move-up-leave-active`]:{animationPlayState:`running`},"&-rtl":{direction:`rtl`,span:{direction:`rtl`}}})},{[t]:{[`${v}-wrapper`]:Object.assign({},x)}},{[`${t}-notice-pure-panel`]:Object.assign(Object.assign({},x),{padding:0,textAlign:`start`})}]},_l=_o(`Message`,e=>gl(La(e,{height:150})),e=>({zIndexPopup:e.zIndexPopupBase+dl+10,contentBg:e.colorBgElevated,contentPadding:`${(e.controlHeightLG-e.fontSize*e.lineHeight)/2}px ${e.paddingSM}px`})),vl={info:s.createElement(cc,null),success:s.createElement(ec,null),error:s.createElement(nc,null),warning:s.createElement(oc,null),loading:s.createElement(tl,null)},yl=({prefixCls:e,type:t,icon:n,children:r})=>s.createElement(`div`,{className:(0,h.default)(`${e}-custom-content`,`${e}-${t}`)},n||vl[t],s.createElement(`span`,null,r));function bl(e,t){return{motionName:t??`${e}-move-up`}}function xl(e){let t,n=new Promise(n=>{t=e(()=>{n(!0)})}),r=()=>{t?.()};return r.then=(e,t)=>n.then(e,t),r.promise=n,r}var Sl=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},Cl=8,wl=3,Tl=({children:e,prefixCls:t})=>{let n=Rc(t),[r,i,a]=_l(t,n);return r(s.createElement(Vc,{classNames:{list:(0,h.default)(i,a,n)}},e))},El=(e,{prefixCls:t,key:n})=>s.createElement(Tl,{prefixCls:t,key:n},e),Dl=s.forwardRef((e,t)=>{let{top:n,prefixCls:r,getContainer:i,maxCount:a,duration:o=wl,rtl:c,transitionName:l,onAllRemoved:u}=e,{getPrefixCls:d,getPopupContainer:f,message:p,direction:m}=s.useContext(da),g=r||d(`message`),[_,v]=$c({prefixCls:g,style:()=>({left:`50%`,transform:`translateX(-50%)`,top:n??Cl}),className:()=>(0,h.default)({[`${g}-rtl`]:c??m===`rtl`}),motion:()=>bl(g,l),closable:!1,closeIcon:s.createElement(`span`,{className:`${g}-close-x`},s.createElement(ic,{className:`${g}-close-icon`})),duration:o,getContainer:()=>i?.()||f?.()||document.body,maxCount:a,onAllRemoved:u,renderNotifications:El});return s.useImperativeHandle(t,()=>Object.assign(Object.assign({},_),{prefixCls:g,message:p})),v}),Ol=0;function kl(e){let t=s.useRef(null);return Ir(`Message`),[s.useMemo(()=>{let e=e=>{var n;(n=t.current)==null||n.close(e)},n=n=>{if(!t.current){let e=()=>{};return e.then=()=>{},e}let{open:r,prefixCls:i,message:a}=t.current,o=`${i}-notice`,{content:c,icon:l,type:u,key:d,className:f,style:p,onClose:m}=n,g=Sl(n,[`content`,`icon`,`type`,`key`,`className`,`style`,`onClose`]),_=d;return _??=(Ol+=1,`antd-message-${Ol}`),xl(t=>(r(Object.assign(Object.assign({},g),{key:_,content:s.createElement(yl,{prefixCls:i,type:u,icon:l},c),placement:`top`,className:(0,h.default)(u&&`${o}-${u}`,f,a?.className),style:Object.assign(Object.assign({},a?.style),p),onClose:()=>{m?.(),t()}})),()=>{e(_)}))},r={open:n,destroy:n=>{var r;n===void 0?(r=t.current)==null||r.destroy():e(n)}};return[`info`,`success`,`warning`,`error`,`loading`].forEach(e=>{r[e]=(t,r,i)=>{let a;a=t&&typeof t==`object`&&`content`in t?t:{content:t};let o,s;typeof r==`function`?s=r:(o=r,s=i);let c=Object.assign(Object.assign({onClose:s,duration:o},a),{type:e});return n(c)}}),r},[]),s.createElement(Dl,Object.assign({key:`message-holder`},e,{ref:t}))]}function Al(e){return kl(e)}function jl(e,t){this.v=e,this.k=t}function Ml(e,t,n,r){var i=Object.defineProperty;try{i({},``,{})}catch{i=0}Ml=function(e,t,n,r){function a(t,n){Ml(e,t,function(e){return this._invoke(t,n,e)})}t?i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(a(`next`,0),a(`throw`,1),a(`return`,2))},Ml(e,t,n,r)}function Nl(){var e,t,n=typeof Symbol==`function`?Symbol:{},r=n.iterator||`@@iterator`,i=n.toStringTag||`@@toStringTag`;function a(n,r,i,a){var c=r&&r.prototype instanceof s?r:s,l=Object.create(c.prototype);return Ml(l,`_invoke`,function(n,r,i){var a,s,c,l=0,u=i||[],d=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return a=t,s=0,c=e,f.n=n,o}};function p(n,r){for(s=n,c=r,t=0;!d&&l&&!i&&t<u.length;t++){var i,a=u[t],p=f.p,m=a[2];n>3?(i=m===r)&&(c=a[(s=a[4])?5:(s=3,3)],a[4]=a[5]=e):a[0]<=p&&((i=n<2&&p<a[1])?(s=0,f.v=r,f.n=a[1]):p<m&&(i=n<3||a[0]>r||r>m)&&(a[4]=n,a[5]=r,f.n=m,s=0))}if(i||n>1)return o;throw d=!0,r}return function(i,u,m){if(l>1)throw TypeError(`Generator is already running`);for(d&&u===1&&p(u,m),s=u,c=m;(t=s<2?e:c)||!d;){a||(s?(s>1&&(f.n=s<3?-1:c),p(s,c)):f.v=c);try{if(l=2,a){if(s||(i=`next`),t=a[i]){if(!(t=t.call(a,c)))throw TypeError(`iterator result is not an object`);if(!t.done)return t;c=t.value,s<2&&(s=0)}else s===1&&(t=a.return)&&t.call(a),s<2&&(c=TypeError(`The iterator does not provide a '`+i+`' method`),s=1);a=e}else if((t=(d=f.n<0)?c:n.call(r,f))!==o)break}catch(t){a=e,s=1,c=t}finally{l=1}}return{val
Line truncated
|
||||
opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`}},[`${e.antCls}-motion-collapse`]:{overflow:`hidden`,transition:`height ${e.motionDurationMid} ${e.motionEaseInOut},
|
||||
opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`}}}),gd=e=>({animationDuration:e,animationFillMode:`both`}),_d=e=>({animationDuration:e,animationFillMode:`both`}),vd=(e,t,n,r,i=!1)=>{let a=i?`&`:``;return{[`
|
||||
${a}${e}-enter,
|
||||
${a}${e}-appear
|
||||
`]:Object.assign(Object.assign({},gd(r)),{animationPlayState:`paused`}),[`${a}${e}-leave`]:Object.assign(Object.assign({},_d(r)),{animationPlayState:`paused`}),[`
|
||||
${a}${e}-enter${e}-enter-active,
|
||||
${a}${e}-appear${e}-appear-active
|
||||
`]:{animationName:t,animationPlayState:`running`},[`${a}${e}-leave${e}-leave-active`]:{animationName:n,animationPlayState:`running`,pointerEvents:`none`}}},yd=new Cr(`antFadeIn`,{"0%":{opacity:0},"100%":{opacity:1}}),bd=new Cr(`antFadeOut`,{"0%":{opacity:1},"100%":{opacity:0}}),xd=(e,t=!1)=>{let{antCls:n}=e,r=`${n}-fade`,i=t?`&`:``;return[vd(r,yd,bd,e.motionDurationMid,t),{[`
|
||||
${i}${r}-enter,
|
||||
${i}${r}-appear
|
||||
`]:{opacity:0,animationTimingFunction:`linear`},[`${i}${r}-leave`]:{animationTimingFunction:`linear`}}]},Sd=new Cr(`antMoveDownIn`,{"0%":{transform:`translate3d(0, 100%, 0)`,transformOrigin:`0 0`,opacity:0},"100%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1}}),Cd=new Cr(`antMoveDownOut`,{"0%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1},"100%":{transform:`translate3d(0, 100%, 0)`,transformOrigin:`0 0`,opacity:0}}),wd=new Cr(`antMoveLeftIn`,{"0%":{transform:`translate3d(-100%, 0, 0)`,transformOrigin:`0 0`,opacity:0},"100%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1}}),Td=new Cr(`antMoveLeftOut`,{"0%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1},"100%":{transform:`translate3d(-100%, 0, 0)`,transformOrigin:`0 0`,opacity:0}}),Ed=new Cr(`antMoveRightIn`,{"0%":{transform:`translate3d(100%, 0, 0)`,transformOrigin:`0 0`,opacity:0},"100%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1}}),Dd=new Cr(`antMoveRightOut`,{"0%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1},"100%":{transform:`translate3d(100%, 0, 0)`,transformOrigin:`0 0`,opacity:0}}),Od={"move-up":{inKeyframes:new Cr(`antMoveUpIn`,{"0%":{transform:`translate3d(0, -100%, 0)`,transformOrigin:`0 0`,opacity:0},"100%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1}}),outKeyframes:new Cr(`antMoveUpOut`,{"0%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1},"100%":{transform:`translate3d(0, -100%, 0)`,transformOrigin:`0 0`,opacity:0}})},"move-down":{inKeyframes:Sd,outKeyframes:Cd},"move-left":{inKeyframes:wd,outKeyframes:Td},"move-right":{inKeyframes:Ed,outKeyframes:Dd}},kd=(e,t)=>{let{antCls:n}=e,r=`${n}-${t}`,{inKeyframes:i,outKeyframes:a}=Od[t];return[vd(r,i,a,e.motionDurationMid),{[`
|
||||
${r}-enter,
|
||||
${r}-appear
|
||||
`]:{opacity:0,animationTimingFunction:e.motionEaseOutCirc},[`${r}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]},Ad=new Cr(`antSlideUpIn`,{"0%":{transform:`scaleY(0.8)`,transformOrigin:`0% 0%`,opacity:0},"100%":{transform:`scaleY(1)`,transformOrigin:`0% 0%`,opacity:1}}),jd=new Cr(`antSlideUpOut`,{"0%":{transform:`scaleY(1)`,transformOrigin:`0% 0%`,opacity:1},"100%":{transform:`scaleY(0.8)`,transformOrigin:`0% 0%`,opacity:0}}),Md=new Cr(`antSlideDownIn`,{"0%":{transform:`scaleY(0.8)`,transformOrigin:`100% 100%`,opacity:0},"100%":{transform:`scaleY(1)`,transformOrigin:`100% 100%`,opacity:1}}),Nd=new Cr(`antSlideDownOut`,{"0%":{transform:`scaleY(1)`,transformOrigin:`100% 100%`,opacity:1},"100%":{transform:`scaleY(0.8)`,transformOrigin:`100% 100%`,opacity:0}}),Pd=new Cr(`antSlideLeftIn`,{"0%":{transform:`scaleX(0.8)`,transformOrigin:`0% 0%`,opacity:0},"100%":{transform:`scaleX(1)`,transformOrigin:`0% 0%`,opacity:1}}),Fd=new Cr(`antSlideLeftOut`,{"0%":{transform:`scaleX(1)`,transformOrigin:`0% 0%`,opacity:1},"100%":{transform:`scaleX(0.8)`,transformOrigin:`0% 0%`,opacity:0}}),Id=new Cr(`antSlideRightIn`,{"0%":{transform:`scaleX(0.8)`,transformOrigin:`100% 0%`,opacity:0},"100%":{transform:`scaleX(1)`,transformOrigin:`100% 0%`,opacity:1}}),Ld=new Cr(`antSlideRightOut`,{"0%":{transform:`scaleX(1)`,transformOrigin:`100% 0%`,opacity:1},"100%":{transform:`scaleX(0.8)`,transformOrigin:`100% 0%`,opacity:0}}),Rd={"slide-up":{inKeyframes:Ad,outKeyframes:jd},"slide-down":{inKeyframes:Md,outKeyframes:Nd},"slide-left":{inKeyframes:Pd,outKeyframes:Fd},"slide-right":{inKeyframes:Id,outKeyframes:Ld}},zd=(e,t)=>{let{antCls:n}=e,r=`${n}-${t}`,{inKeyframes:i,outKeyframes:a}=Rd[t];return[vd(r,i,a,e.motionDurationMid),{[`
|
||||
${r}-enter,
|
||||
${r}-appear
|
||||
`]:{transform:`scale(0)`,transformOrigin:`0% 0%`,opacity:0,animationTimingFunction:e.motionEaseOutQuint,"&-prepare":{transform:`scale(1)`}},[`${r}-leave`]:{animationTimingFunction:e.motionEaseInQuint}}]},Bd=new Cr(`antZoomIn`,{"0%":{transform:`scale(0.2)`,opacity:0},"100%":{transform:`scale(1)`,opacity:1}}),Vd=new Cr(`antZoomOut`,{"0%":{transform:`scale(1)`},"100%":{transform:`scale(0.2)`,opacity:0}}),Hd=new Cr(`antZoomBigIn`,{"0%":{transform:`scale(0.8)`,opacity:0},"100%":{transform:`scale(1)`,opacity:1}}),Ud=new Cr(`antZoomBigOut`,{"0%":{transform:`scale(1)`},"100%":{transform:`scale(0.8)`,opacity:0}}),Wd=new Cr(`antZoomUpIn`,{"0%":{transform:`scale(0.8)`,transformOrigin:`50% 0%`,opacity:0},"100%":{transform:`scale(1)`,transformOrigin:`50% 0%`}}),Gd=new Cr(`antZoomUpOut`,{"0%":{transform:`scale(1)`,transformOrigin:`50% 0%`},"100%":{transform:`scale(0.8)`,transformOrigin:`50% 0%`,opacity:0}}),Kd=new Cr(`antZoomLeftIn`,{"0%":{transform:`scale(0.8)`,transformOrigin:`0% 50%`,opacity:0},"100%":{transform:`scale(1)`,transformOrigin:`0% 50%`}}),qd=new Cr(`antZoomLeftOut`,{"0%":{transform:`scale(1)`,transformOrigin:`0% 50%`},"100%":{transform:`scale(0.8)`,transformOrigin:`0% 50%`,opacity:0}}),Jd=new Cr(`antZoomRightIn`,{"0%":{transform:`scale(0.8)`,transformOrigin:`100% 50%`,opacity:0},"100%":{transform:`scale(1)`,transformOrigin:`100% 50%`}}),Yd=new Cr(`antZoomRightOut`,{"0%":{transform:`scale(1)`,transformOrigin:`100% 50%`},"100%":{transform:`scale(0.8)`,transformOrigin:`100% 50%`,opacity:0}}),Xd=new Cr(`antZoomDownIn`,{"0%":{transform:`scale(0.8)`,transformOrigin:`50% 100%`,opacity:0},"100%":{transform:`scale(1)`,transformOrigin:`50% 100%`}}),Zd=new Cr(`antZoomDownOut`,{"0%":{transform:`scale(1)`,transformOrigin:`50% 100%`},"100%":{transform:`scale(0.8)`,transformOrigin:`50% 100%`,opacity:0}}),Qd={zoom:{inKeyframes:Bd,outKeyframes:Vd},"zoom-big":{inKeyframes:Hd,outKeyframes:Ud},"zoom-big-fast":{inKeyframes:Hd,outKeyframes:Ud},"zoom-left":{inKeyframes:Kd,outKeyframes:qd},"zoom-right":{inKeyframes:Jd,outKeyframes:Yd},"zoom-up":{inKeyframes:Wd,outKeyframes:Gd},"zoom-down":{inKeyframes:Xd,outKeyframes:Zd}},$d=(e,t)=>{let{antCls:n}=e,r=`${n}-${t}`,{inKeyframes:i,outKeyframes:a}=Qd[t];return[vd(r,i,a,t===`zoom-big-fast`?e.motionDurationFast:e.motionDurationMid),{[`
|
||||
${r}-enter,
|
||||
${r}-appear
|
||||
`]:{transform:`scale(0)`,opacity:0,animationTimingFunction:e.motionEaseOutCirc,"&-prepare":{transform:`none`}},[`${r}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]},ef=e=>{let{componentCls:t,contentBg:n,padding:r,headerBg:i,headerPadding:a,collapseHeaderPaddingSM:o,collapseHeaderPaddingLG:s,collapsePanelBorderRadius:c,lineWidth:l,lineType:u,colorBorder:d,colorText:f,colorTextHeading:p,colorTextDisabled:m,fontSizeLG:h,lineHeight:g,lineHeightLG:_,marginSM:v,paddingSM:y,paddingLG:b,paddingXS:x,motionDurationSlow:S,fontSizeIcon:C,contentPadding:w,fontHeight:T,fontHeightLG:E}=e,D=`${Q(l)} ${u} ${d}`;return{[t]:Object.assign(Object.assign({},so(e)),{backgroundColor:i,border:D,borderRadius:c,"&-rtl":{direction:`rtl`},[`& > ${t}-item`]:{borderBottom:D,"&:first-child":{[`
|
||||
&,
|
||||
& > ${t}-header`]:{borderRadius:`${Q(c)} ${Q(c)} 0 0`}},"&:last-child":{[`
|
||||
&,
|
||||
& > ${t}-header`]:{borderRadius:`0 0 ${Q(c)} ${Q(c)}`}},[`> ${t}-header`]:Object.assign(Object.assign({position:`relative`,display:`flex`,flexWrap:`nowrap`,alignItems:`flex-start`,padding:a,color:p,lineHeight:g,cursor:`pointer`,transition:`all ${S}, visibility 0s`},mo(e)),{[`> ${t}-header-text`]:{flex:`auto`},[`${t}-expand-icon`]:{height:T,display:`flex`,alignItems:`center`,paddingInlineEnd:v},[`${t}-arrow`]:Object.assign(Object.assign({},co()),{fontSize:C,transition:`transform ${S}`,svg:{transition:`transform ${S}`}}),[`${t}-header-text`]:{marginInlineEnd:`auto`}}),[`${t}-collapsible-header`]:{cursor:`default`,[`${t}-header-text`]:{flex:`none`,cursor:`pointer`},[`${t}-expand-icon`]:{cursor:`pointer`}},[`${t}-collapsible-icon`]:{cursor:`unset`,[`${t}-expand-icon`]:{cursor:`pointer`}}},[`${t}-content`]:{color:f,backgroundColor:n,borderTop:D,[`& > ${t}-content-box`]:{padding:w},"&-hidden":{display:`none`}},"&-small":{[`> ${t}-item`]:{[`> ${t}-header`]:{padding:o,paddingInlineStart:x,[`> ${t}-expand-icon`]:{marginInlineStart:e.calc(y).sub(x).equal()}},[`> ${t}-content > ${t}-content-box`]:{padding:y}}},"&-large":{[`> ${t}-item`]:{fontSize:h,lineHeight:_,[`> ${t}-header`]:{padding:s,paddingInlineStart:r,[`> ${t}-expand-icon`]:{height:E,marginInlineStart:e.calc(b).sub(r).equal()}},[`> ${t}-content > ${t}-content-box`]:{padding:b}}},[`${t}-item:last-child`]:{borderBottom:0,[`> ${t}-content`]:{borderRadius:`0 0 ${Q(c)} ${Q(c)}`}},[`& ${t}-item-disabled > ${t}-header`]:{"\n &,\n & > .arrow\n ":{color:m,cursor:`not-allowed`}},[`&${t}-icon-position-end`]:{[`& > ${t}-item`]:{[`> ${t}-header`]:{[`${t}-expand-icon`]:{order:1,paddingInlineEnd:0,paddingInlineStart:v}}}}})}},tf=e=>{let{componentCls:t}=e,n=`> ${t}-item > ${t}-header ${t}-arrow`;return{[`${t}-rtl`]:{[n]:{transform:`rotate(180deg)`}}}},nf=e=>{let{componentCls:t,headerBg:n,borderlessContentPadding:r,borderlessContentBg:i,colorBorder:a}=e;return{[`${t}-borderless`]:{backgroundColor:n,border:0,[`> ${t}-item`]:{borderBottom:`1px solid ${a}`},[`
|
||||
> ${t}-item:last-child,
|
||||
> ${t}-item:last-child ${t}-header
|
||||
`]:{borderRadius:0},[`> ${t}-item:last-child`]:{borderBottom:0},[`> ${t}-item > ${t}-content`]:{backgroundColor:i,borderTop:0},[`> ${t}-item > ${t}-content > ${t}-content-box`]:{padding:r}}}},rf=e=>{let{componentCls:t,paddingSM:n}=e;return{[`${t}-ghost`]:{backgroundColor:`transparent`,border:0,[`> ${t}-item`]:{borderBottom:0,[`> ${t}-content`]:{backgroundColor:`transparent`,border:0,[`> ${t}-content-box`]:{paddingBlock:n}}}}}},af=_o(`Collapse`,e=>{let t=La(e,{collapseHeaderPaddingSM:`${Q(e.paddingXS)} ${Q(e.paddingSM)}`,collapseHeaderPaddingLG:`${Q(e.padding)} ${Q(e.paddingLG)}`,collapsePanelBorderRadius:e.borderRadiusLG});return[ef(t),nf(t),rf(t),tf(t),hd(t)]},e=>({headerPadding:`${e.paddingSM}px ${e.padding}px`,headerBg:e.colorFillAlter,contentPadding:`${e.padding}px 16px`,contentBg:e.colorBgContainer,borderlessContentPadding:`${e.paddingXXS}px 16px ${e.padding}px`,borderlessContentBg:`transparent`})),of=Object.assign(s.forwardRef((e,t)=>{let{getPrefixCls:n,direction:r,expandIcon:i,className:a,style:o}=ma(`collapse`),{prefixCls:c,className:l,rootClassName:u,style:d,bordered:f=!0,ghost:p,size:m,expandIconPosition:_=`start`,children:v,destroyInactivePanel:y,destroyOnHidden:b,expandIcon:x}=e,S=Su(e=>m??e??`middle`),C=n(`collapse`,c),w=n(),[T,E,D]=af(C),O=s.useMemo(()=>_===`left`?`start`:_===`right`?`end`:_,[_]),k=x??i,A=s.useCallback((e={})=>{let t=typeof k==`function`?k(e):s.createElement(rd,{rotate:e.isActive?r===`rtl`?-90:90:void 0,"aria-label":e.isActive?`expanded`:`collapsed`});return gc(t,()=>({className:(0,h.default)(t.props?.className,`${C}-arrow`)}))},[k,C,r]),j=(0,h.default)(`${C}-icon-position-${O}`,{[`${C}-borderless`]:!f,[`${C}-rtl`]:r===`rtl`,[`${C}-ghost`]:!!p,[`${C}-${S}`]:S!==`middle`},a,l,u,E,D),M=s.useMemo(()=>Object.assign(Object.assign({},lu(w)),{motionAppear:!1,leavedClassName:`${C}-content-hidden`}),[w,C]),N=s.useMemo(()=>v?g(v).map((e,t)=>{let n=e.props;if(n?.disabled){let r=e.key??String(t);return gc(e,Object.assign(Object.assign({},du(e.props,[`disabled`])),{key:r,collapsible:n.collapsible??`disabled`}))}return e}):null,[v]);return T(s.createElement(pd,Object.assign({ref:t,openMotion:M},du(e,[`rootClassName`]),{expandIcon:A,prefixCls:C,className:j,style:Object.assign(Object.assign({},o),d),destroyInactivePanel:b??y}),N))}),{Panel:md}),sf=e=>e instanceof td?e:new td(e),cf=(e,t)=>{let{r:n,g:r,b:i,a}=e.toRgb(),o=new Qu(e.toRgbString()).onBackground(t).toHsv();return a<=.5?o.v>.5:n*.299+r*.587+i*.114>192},lf=e=>{let{paddingInline:t,onlyIconSize:n}=e;return La(e,{buttonPaddingHorizontal:t,buttonPaddingVertical:0,buttonIconOnlyFontSize:n})},uf=e=>{let t=e.contentFontSize??e.fontSize,n=e.contentFontSizeSM??e.fontSize,r=e.contentFontSizeLG??e.fontSizeLG,i=e.contentLineHeight??Zi(t),a=e.contentLineHeightSM??Zi(n),o=e.contentLineHeightLG??Zi(r),s=cf(new td(e.colorBgSolid),`#fff`)?`#000`:`#fff`,c=Ja.reduce((t,n)=>Object.assign(Object.assign({},t),{[`${n}ShadowColor`]:`0 ${Q(e.controlOutlineWidth)} 0 ${Za(e[`${n}1`],e.colorBgContainer)}`}),{});return Object.assign(Object.assign({},c),{fontWeight:400,iconGap:e.marginXS,defaultShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlTmpOutline}`,primaryShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlOutline}`,dangerShadow:`0 ${e.controlOutlineWidth}px 0 ${e.colorErrorOutline}`,primaryColor:e.colorTextLightSolid,dangerColor:e.colorTextLightSolid,borderColorDisabled:e.colorBorder,defaultGhostColor:e.colorBgContainer,ghostBg:`transparent`,defaultGhostBorderColor:e.colorBgContainer,paddingInline:e.paddingContentHorizontal-e.lineWidth,paddingInlineLG:e.paddingContentHorizontal-e.lineWidth,paddingInlineSM:8-e.lineWidth,onlyIconSize:`inherit`,onlyIconSizeSM:`inherit`,onlyIconSizeLG:`inherit`,groupBorderColor:e.colorPrimaryHover,linkHoverBg:`transparent`,textTextColor:e.colorText,textTextHoverColor:e.colorText,textTextActiveColor:e.colorText,textHoverBg:e.colorFillTertiary,defaultColor:e.colorText,defaultBg:e.colorBgContainer,defaultBorderColor:e.colorBorder,defaultBorderColorDisabled:e.colorBorder,defaultHoverBg:e.colorBgContainer,defaultHoverColor:e.colorPrimaryHover,defaultHoverBorderColor:e.colorPrimaryHover,defaultActiveBg:e.colorBgContainer,defaultActiveColor:e.colorPrimaryActive,defaultActiveBorderColor:e.colorPrimaryActive,solidTextColor:s,contentFontSize:t,contentFontSizeSM:n,contentFontSizeLG:r,contentLineHeight:i,contentLineHeightSM:a,contentLineHeightLG:o,paddingBlock:Math.max((e.controlHeight-t*i)/2-e.lineWidth,0),paddingBlockSM:Math.max((e.controlHeightSM-n*a)/2-e.lineWidth,0),paddingBlockLG:Math.max((e.controlHeightLG-r*o)/2-e.lineWidth,0)})},df=e=>{let{componentCls:t,iconCls:n,fontWeight:r,opacityLoading:i,motionDurationSlow:a,motionEaseInOut:o,iconGap:s,calc:c}=e;return{[t]:{outline:`none`,position:`relative`,display:`inline-flex`,gap:s,alignItems:`center`,justifyContent:`center`,fontWeight:r,whiteSpace:`nowrap`,textAlign:`center`,backgroundImage:`none`,background:`transparent`,border:`${Q(e.lineWidth)} ${e.lineType} transparent`,curso
Line truncated
|
||||
#${t}::-webkit-scrollbar {
|
||||
${c?`width: ${s.width};`:``}
|
||||
${l?`height: ${s.height};`:``}
|
||||
}`,t)}catch(e){console.error(e),i=c,a=l}}document.body.appendChild(n);var u=e&&i&&!isNaN(i)?i:n.offsetWidth-n.clientWidth,d=e&&a&&!isNaN(a)?a:n.offsetHeight-n.clientHeight;return document.body.removeChild(n),ht(t),{width:u,height:d}}function op(e){return typeof document>`u`||!e||!(e instanceof Element)?{width:0,height:0}:ap(e)}function sp(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}var cp=`rc-util-locker-${Date.now()}`,lp=0;function up(e){var t=!!e,n=Z(s.useState(function(){return lp+=1,`${cp}_${lp}`}),1)[0];qt(function(){if(t){var e=op(document.body).width;_t(`
|
||||
html body {
|
||||
overflow-y: hidden;
|
||||
${sp()?`width: calc(100% - ${e}px);`:``}
|
||||
}`,n)}else ht(n);return function(){ht(n)}},[t,n])}var dp=!1;function fp(e){return typeof e==`boolean`&&(dp=e),dp}var pp=function(e){return e===!1?!1:!rt()||!e?null:typeof e==`string`?document.querySelector(e):typeof e==`function`?e():e},mp=s.forwardRef(function(e,t){var n=e.open,r=e.autoLock,i=e.getContainer,a=e.debug,o=e.autoDestroy,c=o===void 0||o,l=e.children,u=Z(s.useState(n),2),d=u[0],f=u[1],p=d||n;s.useEffect(function(){(c||n)&&f(n)},[n,c]);var h=Z(s.useState(function(){return pp(i)}),2),g=h[0],_=h[1];s.useEffect(function(){_(pp(i)??null)});var v=Z(ip(p&&!g,a),2),y=v[0],b=v[1],x=g??y;up(r&&n&&rt()&&(x===y||x===document.body));var S=null;l&&B(l)&&t&&(S=l.ref);var C=z(S,t);if(!p||!rt()||g===void 0)return null;var w=x===!1||fp(),T=l;return t&&(T=s.cloneElement(l,{ref:C})),s.createElement(np.Provider,{value:b},w?T:(0,m.createPortal)(T,x))}),hp=s.createContext({});function gp(){return O({},s).useId}var _p=0,vp=gp(),yp=vp?function(e){var t=vp();return e||t}:function(e){var t=Z(s.useState(`ssr-id`),2),n=t[0],r=t[1];return s.useEffect(function(){var e=_p;_p+=1,r(`rc_unique_${e}`)},[]),e||n};function bp(e,t,n){var r=t;return!r&&n&&(r=`${e}-${n}`),r}function xp(e,t){var n=e[`page${t?`Y`:`X`}Offset`],r=`scroll${t?`Top`:`Left`}`;if(typeof n!=`number`){var i=e.document;n=i.documentElement[r],typeof n!=`number`&&(n=i.body[r])}return n}function Sp(e){var t=e.getBoundingClientRect(),n={left:t.left,top:t.top},r=e.ownerDocument,i=r.defaultView||r.parentWindow;return n.left+=xp(i),n.top+=xp(i,!0),n}var Cp=s.memo(function(e){return e.children},function(e,t){return!t.shouldUpdate}),wp={width:0,height:0,overflow:`hidden`,outline:`none`},Tp={outline:`none`},Ep=s.forwardRef(function(e,t){var n=e.prefixCls,r=e.className,i=e.style,a=e.title,o=e.ariaId,u=e.footer,d=e.closable,f=e.closeIcon,p=e.onClose,m=e.children,g=e.bodyStyle,_=e.bodyProps,v=e.modalRender,y=e.onMouseDown,b=e.onMouseUp,x=e.holderRef,S=e.visible,C=e.forceRender,w=e.width,T=e.height,E=e.classNames,D=e.styles,k=z(x,s.useContext(hp).panel),A=(0,s.useRef)(),j=(0,s.useRef)();s.useImperativeHandle(t,function(){return{focus:function(){var e;(e=A.current)==null||e.focus({preventScroll:!0})},changeActive:function(e){var t=document.activeElement;e&&t===j.current?A.current.focus({preventScroll:!0}):!e&&t===A.current&&j.current.focus({preventScroll:!0})}}});var M={};w!==void 0&&(M.width=w),T!==void 0&&(M.height=T);var N=u?s.createElement(`div`,{className:(0,h.default)(`${n}-footer`,E?.footer),style:O({},D?.footer)},u):null,P=a?s.createElement(`div`,{className:(0,h.default)(`${n}-header`,E?.header),style:O({},D?.header)},s.createElement(`div`,{className:`${n}-title`,id:o},a)):null,F=(0,s.useMemo)(function(){return l(d)===`object`&&d!==null?d:d?{closeIcon:f??s.createElement(`span`,{className:`${n}-close-x`})}:{}},[d,f,n]),I=pc(F,!0),L=l(d)===`object`&&d.disabled,R=d?s.createElement(`button`,c({type:`button`,onClick:p,"aria-label":`Close`},I,{className:`${n}-close`,disabled:L}),F.closeIcon):null,B=s.createElement(`div`,{className:(0,h.default)(`${n}-content`,E?.content),style:D?.content},R,P,s.createElement(`div`,c({className:(0,h.default)(`${n}-body`,E?.body),style:O(O({},g),D?.body)},_),m),N);return s.createElement(`div`,{key:`dialog-element`,role:`dialog`,"aria-labelledby":a?o:null,"aria-modal":`true`,ref:k,style:O(O({},i),M),className:(0,h.default)(n,r),onMouseDown:y,onMouseUp:b},s.createElement(`div`,{ref:A,tabIndex:0,style:Tp},s.createElement(Cp,{shouldUpdate:S||C},v?v(B):B)),s.createElement(`div`,{tabIndex:0,ref:j,style:wp}))}),Dp=s.forwardRef(function(e,t){var n=e.prefixCls,r=e.title,i=e.style,a=e.className,o=e.visible,l=e.forceRender,u=e.destroyOnClose,d=e.motionName,f=e.ariaId,p=e.onVisibleChanged,m=e.mousePosition,g=(0,s.useRef)(),_=Z(s.useState(),2),v=_[0],y=_[1],b={};v&&(b.transformOrigin=v);function x(){var e=Sp(g.current);y(m&&(m.x||m.y)?`${m.x-e.left}px ${m.y-e.top}px`:``)}return s.createElement(vs,{visible:o,onVisibleChanged:p,onAppearPrepare:x,onEnterPrepare:x,forceRender:l,motionName:d,removeOnLeave:u,ref:g},function(o,l){var u=o.className,d=o.style;return s.createElement(Ep,c({},e,{ref:t,title:r,ariaId:f,prefixCls:n,holderRef:l,style:O(O(O({},d),i),b),className:(0,h.default)(a,u)}))})});Dp.displayName=`Content`;var Op=function(e){var t=e.prefixCls,n=e.style,r=e.visible,i=e.maskProps,a=e.motionName,o=e.className;return s.createElement(vs,{key:`mask`,visible:r,motionName:a,leavedClassName:`${t}-mask-hidden`},function(e,r){var a=e.className,l=e.style;return s.createElement(`div`,c({ref:r,style:O(O({},l),n),className:(0,h.default)(`${t}-mask`,a,o)},i))})},kp=function(e){var t=e.prefixCls,n=t===void 0?`rc-dialog`:t,r=e.zIndex,i=e.visible,a=i!==void 0&&i,o=e.keyboard,l=o===void 0||o,u=e.focusTriggerAfterClose,d=u===void 0||u,f=e.wrapStyle,p=e.wrapClassName,m=e.wrapProps,g=e.onClose,_=e.afterOpenChange,v=e.afterClose,y=e.transitionName,b=e.animation,x=e.closable,S=x===void 0||x,C=e.mask,w=C===void 0||C,T=e.maskTransitionName,E=e.maskAnimation,D=e.maskClosable,k=
Line truncated
|
||||
${r},
|
||||
${i} > li,
|
||||
${n},
|
||||
${a},
|
||||
${o},
|
||||
${s}
|
||||
`]:Object.assign({},Nh(e))}}},Uh=_o(`Skeleton`,e=>{let{componentCls:t,calc:n}=e;return Hh(La(e,{skeletonAvatarCls:`${t}-avatar`,skeletonTitleCls:`${t}-title`,skeletonParagraphCls:`${t}-paragraph`,skeletonButtonCls:`${t}-button`,skeletonInputCls:`${t}-input`,skeletonImageCls:`${t}-image`,imageSizeBase:n(e.controlHeight).mul(1.5).equal(),borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${e.gradientFromColor} 25%, ${e.gradientToColor} 37%, ${e.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:`1.4s`}))},e=>{let{colorFillContent:t,colorFill:n}=e,r=t,i=n;return{color:r,colorGradientEnd:i,gradientFromColor:r,gradientToColor:i,titleHeight:e.controlHeight/2,blockRadius:e.borderRadiusSM,paragraphMarginTop:e.marginLG+e.marginXXS,paragraphLiHeight:e.controlHeight/2}},{deprecatedTokens:[[`color`,`gradientFromColor`],[`colorGradientEnd`,`gradientToColor`]]}),Wh=e=>{let{prefixCls:t,className:n,rootClassName:r,active:i,shape:a=`circle`,size:o=`default`}=e,{getPrefixCls:c}=s.useContext(da),l=c(`skeleton`,t),[u,d,f]=Uh(l),p=du(e,[`prefixCls`,`className`]),m=(0,h.default)(l,`${l}-element`,{[`${l}-active`]:i},n,r,d,f);return u(s.createElement(`div`,{className:m},s.createElement(kh,Object.assign({prefixCls:`${l}-avatar`,shape:a,size:o},p))))},Gh=e=>{let{prefixCls:t,className:n,rootClassName:r,active:i,block:a=!1,size:o=`default`}=e,{getPrefixCls:c}=s.useContext(da),l=c(`skeleton`,t),[u,d,f]=Uh(l),p=du(e,[`prefixCls`]),m=(0,h.default)(l,`${l}-element`,{[`${l}-active`]:i,[`${l}-block`]:a},n,r,d,f);return u(s.createElement(`div`,{className:m},s.createElement(kh,Object.assign({prefixCls:`${l}-button`,size:o},p))))},Kh=`M365.714286 329.142857q0 45.714286-32.036571 77.677714t-77.677714 32.036571-77.677714-32.036571-32.036571-77.677714 32.036571-77.677714 77.677714-32.036571 77.677714 32.036571 32.036571 77.677714zM950.857143 548.571429l0 256-804.571429 0 0-109.714286 182.857143-182.857143 91.428571 91.428571 292.571429-292.571429zM1005.714286 146.285714l-914.285714 0q-7.460571 0-12.873143 5.412571t-5.412571 12.873143l0 694.857143q0 7.460571 5.412571 12.873143t12.873143 5.412571l914.285714 0q7.460571 0 12.873143-5.412571t5.412571-12.873143l0-694.857143q0-7.460571-5.412571-12.873143t-12.873143-5.412571zM1097.142857 164.571429l0 694.857143q0 37.741714-26.843429 64.585143t-64.585143 26.843429l-914.285714 0q-37.741714 0-64.585143-26.843429t-26.843429-64.585143l0-694.857143q0-37.741714 26.843429-64.585143t64.585143-26.843429l914.285714 0q37.741714 0 64.585143 26.843429t26.843429 64.585143z`,qh=e=>{let{prefixCls:t,className:n,rootClassName:r,style:i,active:a}=e,{getPrefixCls:o}=s.useContext(da),c=o(`skeleton`,t),[l,u,d]=Uh(c),f=(0,h.default)(c,`${c}-element`,{[`${c}-active`]:a},n,r,u,d);return l(s.createElement(`div`,{className:f},s.createElement(`div`,{className:(0,h.default)(`${c}-image`,n),style:i},s.createElement(`svg`,{viewBox:`0 0 1098 1024`,xmlns:`http://www.w3.org/2000/svg`,className:`${c}-image-svg`},s.createElement(`title`,null,`Image placeholder`),s.createElement(`path`,{d:Kh,className:`${c}-image-path`})))))},Jh=e=>{let{prefixCls:t,className:n,rootClassName:r,active:i,block:a,size:o=`default`}=e,{getPrefixCls:c}=s.useContext(da),l=c(`skeleton`,t),[u,d,f]=Uh(l),p=du(e,[`prefixCls`]),m=(0,h.default)(l,`${l}-element`,{[`${l}-active`]:i,[`${l}-block`]:a},n,r,d,f);return u(s.createElement(`div`,{className:m},s.createElement(kh,Object.assign({prefixCls:`${l}-input`,size:o},p))))},Yh=e=>{let{prefixCls:t,className:n,rootClassName:r,style:i,active:a,children:o}=e,{getPrefixCls:c}=s.useContext(da),l=c(`skeleton`,t),[u,d,f]=Uh(l),p=(0,h.default)(l,`${l}-element`,{[`${l}-active`]:a},d,n,r,f);return u(s.createElement(`div`,{className:p},s.createElement(`div`,{className:(0,h.default)(`${l}-image`,n),style:i},o)))},Xh=(e,t)=>{let{width:n,rows:r=2}=t;if(Array.isArray(n))return n[e];if(r-1===e)return n},Zh=e=>{let{prefixCls:t,className:n,style:r,rows:i=0}=e,a=Array.from({length:i}).map((t,n)=>s.createElement(`li`,{key:n,style:{width:Xh(n,e)}}));return s.createElement(`ul`,{className:(0,h.default)(t,n),style:r},a)},Qh=({prefixCls:e,className:t,width:n,style:r})=>s.createElement(`h3`,{className:(0,h.default)(e,t),style:Object.assign({width:n},r)});function $h(e){return e&&typeof e==`object`?e:{}}function eg(e,t){return e&&!t?{size:`large`,shape:`square`}:{size:`large`,shape:`circle`}}function tg(e,t){return!e&&t?{width:`38%`}:e&&t?{width:`50%`}:{}}function ng(e,t){let n={};return e&&t||(n.width=`61%`),n.rows=!e&&t?3:2,n}var rg=e=>{let{prefixCls:t,loading:n,className:r,rootClassName:i,style:a,children:o,avatar:c=!1,title:l=!0,paragraph:u=!0,active:d,round:f}=e,{getPrefixCls:p,direction:m,className:g,style:_}=ma(`skeleton`),v=p(`skeleton`,t),[y,b,x]=Uh(v);if(n||!(`loading`in e)){let e=!!c,t=!!l,n=!!u,o;if(e){let e=Object.assign(Object.assign({prefixCls:`${v}-avatar`},eg(t,n)),$h(c));o=s.createElement(`div`,{className:`${v}-header`},s.createElement(kh,Object.assign({},e)))}let p;if(t||n){let r;if(t){let t=Object.assign(
Line truncated
|
||||
${t}-body,
|
||||
${t}-confirm-body-wrapper`]:{display:`flex`,flexDirection:`column`,flex:`auto`},[`${t}-confirm-body`]:{marginBottom:`auto`}}}]},Tg=e=>{let{componentCls:t}=e;return{[`${t}-root`]:{[`${t}-wrap-rtl`]:{direction:`rtl`,[`${t}-confirm-body`]:{direction:`rtl`}}}}},Eg=e=>{let{componentCls:t}=e,n=bg(e),r=Object.assign({},n);delete r.xs;let i=`--${t.replace(`.`,``)}-`,a=Object.keys(r).map(e=>({[`@media (min-width: ${Q(r[e])})`]:{width:`var(${i}${e}-width)`}}));return{[`${t}-root`]:{[t]:[].concat(X(Object.keys(n).map((e,t)=>{let r=Object.keys(n)[t-1];return r?{[`${i}${e}-width`]:`var(${i}${r}-width)`}:null})),[{width:`var(${i}xs-width)`}],X(a))}}},Dg=e=>{let t=e.padding,n=e.fontSizeHeading5,r=e.lineHeightHeading5;return La(e,{modalHeaderHeight:e.calc(e.calc(r).mul(n).equal()).add(e.calc(t).mul(2).equal()).equal(),modalFooterBorderColorSplit:e.colorSplit,modalFooterBorderStyle:e.lineType,modalFooterBorderWidth:e.lineWidth,modalCloseIconColor:e.colorIcon,modalCloseIconHoverColor:e.colorIconHover,modalCloseBtnSize:e.controlHeight,modalConfirmIconSize:e.fontHeight,modalTitleHeight:e.calc(e.titleFontSize).mul(e.titleLineHeight).equal()})},Og=e=>({footerBg:`transparent`,headerBg:e.colorBgElevated,titleLineHeight:e.lineHeightHeading5,titleFontSize:e.fontSizeHeading5,contentBg:e.colorBgElevated,titleColor:e.colorTextHeading,contentPadding:e.wireframe?0:`${Q(e.paddingMD)} ${Q(e.paddingContentHorizontalLG)}`,headerPadding:e.wireframe?`${Q(e.padding)} ${Q(e.paddingLG)}`:0,headerBorderBottom:e.wireframe?`${Q(e.lineWidth)} ${e.lineType} ${e.colorSplit}`:`none`,headerMarginBottom:e.wireframe?0:e.marginXS,bodyPadding:e.wireframe?e.paddingLG:0,footerPadding:e.wireframe?`${Q(e.paddingXS)} ${Q(e.padding)}`:0,footerBorderTop:e.wireframe?`${Q(e.lineWidth)} ${e.lineType} ${e.colorSplit}`:`none`,footerBorderRadius:e.wireframe?`0 0 ${Q(e.borderRadiusLG)} ${Q(e.borderRadiusLG)}`:0,footerMarginTop:e.wireframe?0:e.marginSM,confirmBodyPadding:e.wireframe?`${Q(e.padding*2)} ${Q(e.padding*2)} ${Q(e.paddingLG)}`:0,confirmIconMarginInlineEnd:e.wireframe?e.margin:e.marginSM,confirmBtnsMarginTop:e.wireframe?e.marginLG:e.marginSM}),kg=_o(`Modal`,e=>{let t=Dg(e);return[wg(t),Tg(t),Cg(t),$d(t,`zoom`),Eg(t)]},Og,{unitless:{titleLineHeight:!0}}),Ag=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},jg;Oh()&&document.documentElement.addEventListener(`click`,e=>{jg={x:e.pageX,y:e.pageY},setTimeout(()=>{jg=null},100)},!0);var Mg=e=>{let{prefixCls:t,className:n,rootClassName:r,open:i,wrapClassName:a,centered:o,getContainer:c,focusTriggerAfterClose:l=!0,style:u,visible:d,width:f=520,footer:p,classNames:m,styles:g,children:_,loading:v,confirmLoading:y,zIndex:b,mousePosition:x,onOk:S,onCancel:C,destroyOnHidden:w,destroyOnClose:T,panelRef:E=null,modalRender:D}=e,O=Ag(e,[`prefixCls`,`className`,`rootClassName`,`open`,`wrapClassName`,`centered`,`getContainer`,`focusTriggerAfterClose`,`style`,`visible`,`width`,`footer`,`classNames`,`styles`,`children`,`loading`,`confirmLoading`,`zIndex`,`mousePosition`,`onOk`,`onCancel`,`destroyOnHidden`,`destroyOnClose`,`panelRef`,`modalRender`]),{getPopupContainer:k,getPrefixCls:A,direction:j,modal:M}=s.useContext(da),N=e=>{y||C?.(e)},P=e=>{S?.(e)},F=A(`modal`,t),I=A(),L=Rc(F),[z,B,V]=kg(F,L),H=(0,h.default)(a,{[`${F}-centered`]:o??M?.centered,[`${F}-wrap-rtl`]:j===`rtl`}),U=p!==null&&!v?s.createElement(dg,Object.assign({},e,{onOk:P,onCancel:N})):null,[W,G,K,q]=ol(rl(e),rl(M),{closable:!0,closeIcon:s.createElement(ic,{className:`${F}-close-icon`}),closeIconRender:e=>ug(F,e)}),ee=D?e=>s.createElement(`div`,{className:`${F}-render`},D(e)):void 0,J=R(E,sg(`.${F}-${D?`render`:`content`}`)),[Y,te]=hl(`Modal`,b),[ne,re]=s.useMemo(()=>f&&typeof f==`object`?[void 0,f]:[f,void 0],[f]),ie=s.useMemo(()=>{let e={};return re&&Object.keys(re).forEach(t=>{let n=re[t];n!==void 0&&(e[`--${F}-${t}-width`]=typeof n==`number`?`${n}px`:n)}),e},[F,re]);return z(s.createElement(wh,{form:!0,space:!0},s.createElement(ll.Provider,{value:te},s.createElement(jp,Object.assign({width:ne},O,{zIndex:Y,getContainer:c===void 0?k:c,prefixCls:F,rootClassName:(0,h.default)(B,r,V,L),footer:U,visible:i??d,mousePosition:x??jg,onClose:N,closable:W&&Object.assign({disabled:K,closeIcon:G},q),closeIcon:G,focusTriggerAfterClose:l,transitionName:uu(I,`zoom`,e.transitionName),maskTransitionName:uu(I,`fade`,e.maskTransitionName),className:(0,h.default)(B,n,M?.className),style:Object.assign(Object.assign(Object.assign({},M?.style),u),ie),classNames:Object.assign(Object.assign(Object.assign({},M?.classNames),m),{wrapper:(0,h.default)(H,m?.wrapper)}),styles:Object.assign(Object.assign({},M?.styles),g),panelRef:J,destroyOnClose:w??T,modalRender:ee}),v?s.createElement(ig,{active:!0,title:!1,paragrap
Line truncated
|
||||
${u}-confirm ${u}-body > ${e.iconCls}`]:{color:e.colorWarning},[`${u}-info ${u}-body > ${e.iconCls}`]:{color:e.colorInfo},[`${u}-success ${u}-body > ${e.iconCls}`]:{color:e.colorSuccess}}},Pg=yo([`Modal`,`confirm`],e=>Ng(Dg(e)),Og,{order:-1e3}),Fg=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},Ig=e=>{let{prefixCls:t,icon:n,okText:r,cancelText:i,confirmPrefixCls:a,type:o,okCancel:c,footer:l,locale:u}=e,d=Fg(e,[`prefixCls`,`icon`,`okText`,`cancelText`,`confirmPrefixCls`,`type`,`okCancel`,`footer`,`locale`]),f=n;if(!n&&n!==null)switch(o){case`info`:f=s.createElement(cc,null);break;case`success`:f=s.createElement(ec,null);break;case`error`:f=s.createElement(nc,null);break;default:f=s.createElement(oc,null)}let p=c??o===`confirm`,m=e.autoFocusButton===null?!1:e.autoFocusButton||`ok`,[g]=Zr(`Modal`),_=u||g,v=r||(p?_?.okText:_?.justOkText),y=i||_?.cancelText,b=s.useMemo(()=>Object.assign({autoFocusButton:m,cancelTextLocale:y,okTextLocale:v,mergedOkCancel:p},d),[m,y,v,p,d]),x=s.createElement(s.Fragment,null,s.createElement(ep,null),s.createElement(tp,null)),S=e.title!==void 0&&e.title!==null,C=`${a}-body`;return s.createElement(`div`,{className:`${a}-body-wrapper`},s.createElement(`div`,{className:(0,h.default)(C,{[`${C}-has-title`]:S})},f,s.createElement(`div`,{className:`${a}-paragraph`},S&&s.createElement(`span`,{className:`${a}-title`},e.title),s.createElement(`div`,{className:`${a}-content`},e.content))),l===void 0||typeof l==`function`?s.createElement($f,{value:b},s.createElement(`div`,{className:`${a}-btns`},typeof l==`function`?l(x,{OkBtn:tp,CancelBtn:ep}):x)):l,s.createElement(Pg,{prefixCls:t}))},Lg=e=>{let{close:t,zIndex:n,maskStyle:r,direction:i,prefixCls:a,wrapClassName:o,rootPrefixCls:c,bodyStyle:l,closable:u=!1,onConfirm:d,styles:f,title:p}=e,m=`${a}-confirm`,g=e.width||416,_=e.style||{},v=e.mask===void 0||e.mask,y=e.maskClosable!==void 0&&e.maskClosable,b=(0,h.default)(m,`${m}-${e.type}`,{[`${m}-rtl`]:i===`rtl`},e.className),[,x]=ao(),S=s.useMemo(()=>n===void 0?x.zIndexPopupBase+dl:n,[n,x]);return s.createElement(Mg,Object.assign({},e,{className:b,wrapClassName:(0,h.default)({[`${m}-centered`]:!!e.centered},o),onCancel:()=>{t?.({triggerCancel:!0}),d?.(!1)},title:p,footer:null,transitionName:uu(c||``,`zoom`,e.transitionName),maskTransitionName:uu(c||``,`fade`,e.maskTransitionName),mask:v,maskClosable:y,style:_,styles:Object.assign({body:l,mask:r},f),width:g,zIndex:S,closable:u}),s.createElement(Ig,Object.assign({},e,{confirmPrefixCls:m})))},Rg=e=>{let{rootPrefixCls:t,iconPrefixCls:n,direction:r,theme:i}=e;return s.createElement(Ps,{prefixCls:t,iconPrefixCls:n,direction:r,theme:i},s.createElement(Lg,Object.assign({},e)))},zg=[],Bg=``;function Vg(){return Bg}var Hg=e=>{let{prefixCls:t,getContainer:n,direction:r}=e,i=Yr(),a=(0,s.useContext)(da),o=Vg()||a.getPrefixCls(),c=t||`${o}-modal`,l=n;return l===!1&&(l=void 0),s.createElement(Rg,Object.assign({},e,{rootPrefixCls:o,prefixCls:c,iconPrefixCls:a.iconPrefixCls,theme:a.theme,direction:r??a.direction,locale:a.locale?.Modal??i,getContainer:l}))};function Ug(e){let t=Ms(),n=document.createDocumentFragment(),r=Object.assign(Object.assign({},e),{close:l,open:!0}),i,a;function o(...t){var n;if(t.some(e=>e?.triggerCancel)){var r;(n=e.onCancel)==null||(r=n).call.apply(r,[e,()=>{}].concat(X(t.slice(1))))}for(let e=0;e<zg.length;e++)if(zg[e]===l){zg.splice(e,1);break}a()}let c=e=>{clearTimeout(i),i=setTimeout(()=>{let r=t.getPrefixCls(void 0,Vg()),i=t.getIconPrefixCls(),o=t.getTheme(),c=s.createElement(Hg,Object.assign({},e));a=iu()(s.createElement(Ps,{prefixCls:r,iconPrefixCls:i,theme:o},typeof t.holderRender==`function`?t.holderRender(c):c),n)})};function l(...t){r=Object.assign(Object.assign({},r),{open:!1,afterClose:()=>{typeof e.afterClose==`function`&&e.afterClose(),o.apply(this,t)}}),r.visible&&delete r.visible,c(r)}function u(e){r=typeof e==`function`?e(r):Object.assign(Object.assign({},r),e),c(r)}return c(r),zg.push(l),{destroy:l,update:u}}function Wg(e){return Object.assign(Object.assign({},e),{type:`warning`})}function Gg(e){return Object.assign(Object.assign({},e),{type:`info`})}function Kg(e){return Object.assign(Object.assign({},e),{type:`success`})}function qg(e){return Object.assign(Object.assign({},e),{type:`error`})}function Jg(e){return Object.assign(Object.assign({},e),{type:`confirm`})}var Yg=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},Xg=s.forwardRef((e,t)=>{var{afterClose:n,co
Line truncated
|
||||
`,`\r
|
||||
`].includes(e)})},[I]),He=s.useContext(o0)||{},Ue=He.maxCount,We=He.rawValues,Ge=function(e,t,n){if(!(de&&t0(Ue)&&We?.size>=Ue)){var r=!0,i=e;A?.(null);var a=a0(e,I,t0(Ue)?Ue-We.size:void 0),o=n?null:a;return y!==`combobox`&&o&&(i=``,F?.(o),Be(!1),r=!1),P&&De!==i&&P(i,{source:t?`typing`:`effect`}),r}},Ke=function(e){e&&e.trim()&&P(e,{source:`submit`})};s.useEffect(function(){!Le&&!de&&y!==`combobox`&&Ge(``,!1,!1)},[Le]),s.useEffect(function(){Fe&&b&&Ie(!1),b&&!Se.current&&Te(!1)},[b]);var qe=Z(V_(),2),Je=qe[0],Ye=qe[1],Xe=s.useRef(!1),Ze=function(e){var t=Je(),n=e.key,r=n===`Enter`;if(r&&(y!==`combobox`&&e.preventDefault(),Le||Be(!0)),Ye(!!De),n===`Backspace`&&!t&&de&&!De&&f.length){for(var i=X(f),a=null,o=i.length-1;o>=0;--o){var s=i[o];if(!s.disabled){i.splice(o,1),a=s;break}}a&&p(i,{type:`remove`,values:[a]})}var c=[...arguments].slice(1);if(Le&&(!r||!Xe.current)){var l;r&&(Xe.current=!0),(l=xe.current)==null||l.onKeyDown.apply(l,[e].concat(c))}ce?.apply(void 0,[e].concat(c))},Qe=function(e){var t=[...arguments].slice(1);if(Le){var n;(n=xe.current)==null||n.onKeyUp.apply(n,[e].concat(t))}e.key===`Enter`&&(Xe.current=!1),se?.apply(void 0,[e].concat(t))},$e=function(e){p(f.filter(function(t){return t!==e}),{type:`remove`,values:[e]})},et=function(){Xe.current=!1},tt=s.useRef(!1),nt=function(){Te(!0),b||(ae&&!tt.current&&ae.apply(void 0,arguments),ie.includes(`focus`)&&Be(!0)),tt.current=!0},rt=function(){Se.current=!0,Te(!1,function(){tt.current=!1,Se.current=!1,Be(!1)}),b||(De&&(y===`tags`?P(De,{source:`submit`}):y===`multiple`&&P(``,{source:`blur`})),oe&&oe.apply(void 0,arguments))},it=[];s.useEffect(function(){return function(){it.forEach(function(e){return clearTimeout(e)}),it.splice(0,it.length)}},[]);var at=function(e){var t=e.target,n=ye.current?.getPopupElement();if(n&&n.contains(t)){var r=setTimeout(function(){var e=it.indexOf(r);if(e!==-1&&it.splice(e,1),Ee(),!he&&!n.contains(document.activeElement)){var t;(t=be.current)==null||t.focus()}});it.push(r)}var i=[...arguments].slice(1);le?.apply(void 0,[e].concat(i))},ot=Z(s.useState({}),2)[1];function st(){ot({})}var ct;ke&&(ct=function(e){Be(e)}),H_(function(){return[_e.current,ye.current?.getPopupElement()]},ze,Be,!!ke);var lt=s.useMemo(function(){return O(O({},e),{},{notFoundContent:_,open:Le,triggerOpen:ze,id:r,showSearch:fe,multiple:de,toggleOpen:Be})},[e,_,ze,Le,r,fe,de,Be]),ut=!!B||x,dt;ut&&(dt=s.createElement(I_,{className:(0,h.default)(`${i}-arrow`,E({},`${i}-arrow-loading`,x)),customizeIcon:B,customizeIconProps:{loading:x,searchValue:De,open:Le,focused:we,showSearch:fe}}));var ft=L_(i,function(){var e;v?.(),(e=be.current)==null||e.focus(),p([],{type:`clear`,values:f}),Ge(``,!1,!1)},f,L,V,b,De,y),pt=ft.allowClear,mt=ft.clearIcon,ht=s.createElement(H,{ref:xe}),gt=(0,h.default)(i,a,E(E(E(E(E(E(E(E(E(E({},`${i}-focused`,we),`${i}-multiple`,de),`${i}-single`,!de),`${i}-allow-clear`,L),`${i}-show-arrow`,ut),`${i}-disabled`,b),`${i}-loading`,x),`${i}-open`,Le),`${i}-customize-input`,Oe),`${i}-show-search`,fe)),_t=s.createElement($1,{ref:ye,disabled:b,prefixCls:i,visible:ze,popupElement:ht,animation:U,transitionName:W,dropdownStyle:G,dropdownClassName:K,direction:u,dropdownMatchSelectWidth:q,dropdownRender:ee,dropdownAlign:J,placement:Y,builtinPlacements:te,getPopupContainer:ne,empty:m,getTriggerDOMNode:function(e){return ve.current||e},onPopupVisibleChange:ct,onPopupMouseEnter:st},ke?s.cloneElement(ke,{ref:Ae}):s.createElement(C1,c({},e,{domRef:ve,prefixCls:i,inputElement:Oe,ref:be,id:r,prefix:R,showSearch:fe,autoClearSearchValue:N,mode:y,activeDescendantId:j,tagRender:l,values:f,open:Le,onToggleOpen:Be,activeValue:k,searchValue:De,onSearch:Ge,onSearchSubmit:Ke,onRemove:$e,tokenWithEnter:Ve,onInputBlur:et}))),vt=ke?_t:s.createElement(`div`,c({className:gt},pe,{ref:_e,onMouseDown:at,onKeyDown:Ze,onKeyUp:Qe,onFocus:nt,onBlur:rt}),s.createElement(s0,{visible:we&&!Le,values:f}),_t,dt,pt&&mt);return s.createElement(R_.Provider,{value:lt},vt)}),f0=function(){return null};f0.isSelectOptGroup=!0;var p0=function(){return null};p0.isSelectOption=!0;var m0=s.forwardRef(function(e,t){var n=e.height,r=e.offsetY,i=e.offsetX,a=e.children,o=e.prefixCls,l=e.onInnerResize,u=e.innerProps,d=e.rtl,f=e.extra,p={},m={display:`flex`,flexDirection:`column`};return r!==void 0&&(p={height:n,position:`relative`,overflow:`hidden`},m=O(O({},m),{},E(E(E(E(E({transform:`translateY(${r}px)`},d?`marginRight`:`marginLeft`,-i),`position`,`absolute`),`left`,0),`right`,0),`top`,0))),s.createElement(`div`,{style:p},s.createElement(Ue,{onResize:function(e){e.offsetHeight&&l&&l()}},s.createElement(`div`,c({style:m,className:(0,h.default)(E({},`${o}-holder-inner`,o)),ref:t},u),a,f)))});m0.displayName=`Filler`;function h0(e){var t=e.children,n=e.setRef,r=s.useCallback(function(e){n(e)},[]);return s.cloneElement(t,{ref:r})}function g0(e,t,n,r,i,a,o,c){var l=c.getKey;return e.slice(t,n+1).map(function(e,n){var c=o(e,t+n,{style:{width:r},offsetX:i}),u=l(e);return s.createElement(h0,{key:u,se
Line truncated
|
||||
${i}${s}bottomLeft,
|
||||
${a}${s}bottomLeft
|
||||
`]:{animationName:Ad},[`
|
||||
${i}${s}topLeft,
|
||||
${a}${s}topLeft,
|
||||
${i}${s}topRight,
|
||||
${a}${s}topRight
|
||||
`]:{animationName:Md},[`${o}${s}bottomLeft`]:{animationName:jd},[`
|
||||
${o}${s}topLeft,
|
||||
${o}${s}topRight
|
||||
`]:{animationName:Nd},"&-hidden":{display:`none`},[r]:Object.assign(Object.assign({},wv(e)),{cursor:`pointer`,transition:`background ${e.motionDurationSlow} ease`,borderRadius:e.borderRadiusSM,"&-group":{color:e.colorTextDescription,fontSize:e.fontSizeSM,cursor:`default`},"&-option":{display:`flex`,"&-content":Object.assign({flex:`auto`},oo),"&-state":{flex:`none`,display:`flex`,alignItems:`center`},[`&-active:not(${r}-option-disabled)`]:{backgroundColor:e.optionActiveBg},[`&-selected:not(${r}-option-disabled)`]:{color:e.optionSelectedColor,fontWeight:e.optionSelectedFontWeight,backgroundColor:e.optionSelectedBg,[`${r}-option-state`]:{color:e.colorPrimary}},"&-disabled":{[`&${r}-option-selected`]:{backgroundColor:e.colorBgContainerDisabled},color:e.colorTextDisabled,cursor:`not-allowed`},"&-grouped":{paddingInlineStart:e.calc(e.controlPaddingHorizontal).mul(2).equal()}},"&-empty":Object.assign(Object.assign({},wv(e)),{color:e.colorTextDisabled})}),[`${c}:has(+ ${c})`]:{borderEndStartRadius:0,borderEndEndRadius:0,[`& + ${c}`]:{borderStartStartRadius:0,borderStartEndRadius:0}},"&-rtl":{direction:`rtl`}})},zd(e,`slide-up`),zd(e,`slide-down`),kd(e,`move-up`),kd(e,`move-down`)]},Ev=e=>{let{multipleSelectItemHeight:t,paddingXXS:n,lineWidth:r,INTERNAL_FIXED_ITEM_MARGIN:i}=e,a=e.max(e.calc(n).sub(r).equal(),0);return{basePadding:a,containerPadding:e.max(e.calc(a).sub(i).equal(),0),itemHeight:Q(t),itemLineHeight:Q(e.calc(t).sub(e.calc(e.lineWidth).mul(2)).equal())}},Dv=e=>{let{multipleSelectItemHeight:t,selectHeight:n,lineWidth:r}=e;return e.calc(n).sub(t).div(2).sub(r).equal()},Ov=e=>{let{componentCls:t,iconCls:n,borderRadiusSM:r,motionDurationSlow:i,paddingXS:a,multipleItemColorDisabled:o,multipleItemBorderColorDisabled:s,colorIcon:c,colorIconHover:l,INTERNAL_FIXED_ITEM_MARGIN:u}=e;return{[`${t}-selection-overflow`]:{position:`relative`,display:`flex`,flex:`auto`,flexWrap:`wrap`,maxWidth:`100%`,"&-item":{flex:`none`,alignSelf:`center`,maxWidth:`calc(100% - 4px)`,display:`inline-flex`},[`${t}-selection-item`]:{display:`flex`,alignSelf:`center`,flex:`none`,boxSizing:`border-box`,maxWidth:`100%`,marginBlock:u,borderRadius:r,cursor:`default`,transition:`font-size ${i}, line-height ${i}, height ${i}`,marginInlineEnd:e.calc(u).mul(2).equal(),paddingInlineStart:a,paddingInlineEnd:e.calc(a).div(2).equal(),[`${t}-disabled&`]:{color:o,borderColor:s,cursor:`not-allowed`},"&-content":{display:`inline-block`,marginInlineEnd:e.calc(a).div(2).equal(),overflow:`hidden`,whiteSpace:`pre`,textOverflow:`ellipsis`},"&-remove":Object.assign(Object.assign({},co()),{display:`inline-flex`,alignItems:`center`,color:c,fontWeight:`bold`,fontSize:10,lineHeight:`inherit`,cursor:`pointer`,[`> ${n}`]:{verticalAlign:`-0.2em`},"&:hover":{color:l}})}}}},kv=(e,t)=>{let{componentCls:n,INTERNAL_FIXED_ITEM_MARGIN:r}=e,i=`${n}-selection-overflow`,a=e.multipleSelectItemHeight,o=Dv(e),s=t?`${n}-${t}`:``,c=Ev(e);return{[`${n}-multiple${s}`]:Object.assign(Object.assign({},Ov(e)),{[`${n}-selector`]:{display:`flex`,alignItems:`center`,width:`100%`,height:`100%`,paddingInline:c.basePadding,paddingBlock:c.containerPadding,borderRadius:e.borderRadius,[`${n}-disabled&`]:{background:e.multipleSelectorBgDisabled,cursor:`not-allowed`},"&:after":{display:`inline-block`,width:0,margin:`${Q(r)} 0`,lineHeight:Q(a),visibility:`hidden`,content:`"\\a0"`}},[`${n}-selection-item`]:{height:c.itemHeight,lineHeight:Q(c.itemLineHeight)},[`${n}-selection-wrap`]:{alignSelf:`flex-start`,"&:after":{lineHeight:Q(a),marginBlock:r}},[`${n}-prefix`]:{marginInlineStart:e.calc(e.inputPaddingHorizontalBase).sub(c.basePadding).equal()},[`${i}-item + ${i}-item,
|
||||
${n}-prefix + ${n}-selection-wrap
|
||||
`]:{[`${n}-selection-search`]:{marginInlineStart:0},[`${n}-selection-placeholder`]:{insetInlineStart:0}},[`${i}-item-suffix`]:{minHeight:c.itemHeight,marginBlock:r},[`${n}-selection-search`]:{display:`inline-flex`,position:`relative`,maxWidth:`100%`,marginInlineStart:e.calc(e.inputPaddingHorizontalBase).sub(o).equal(),"\n &-input,\n &-mirror\n ":{height:a,fontFamily:e.fontFamily,lineHeight:Q(a),transition:`all ${e.motionDurationSlow}`},"&-input":{width:`100%`,minWidth:4.1},"&-mirror":{position:`absolute`,top:0,insetInlineStart:0,insetInlineEnd:`auto`,zIndex:999,whiteSpace:`pre`,visibility:`hidden`}},[`${n}-selection-placeholder`]:{position:`absolute`,top:`50%`,insetInlineStart:e.calc(e.inputPaddingHorizontalBase).sub(c.basePadding).equal(),insetInlineEnd:e.inputPaddingHorizontalBase,transform:`translateY(-50%)`,transition:`all ${e.motionDurationSlow}`}})}};function Av(e,t){let{componentCls:n}=e,r={[`${n}-multiple${t?`${n}-${t}`:``}`]:{fontSize:e.fontSize,[`${n}-selector`]:{[`${n}-show-search&`]:{cursor:`text`}},[`
|
||||
&${n}-show-arrow ${n}-selector,
|
||||
&${n}-allow-clear ${n}-selector
|
||||
`]:{paddingInlineEnd:e.calc(e.fontSizeIcon).add(e.controlPaddingHorizontal).equal()}}};return[kv(e,t),r]}var jv=e=>{let{componentCls:t}=e,n=La(e,{selectHeight:e.controlHeightSM,multipleSelectItemHeight:e.multipleItemHeightSM,borderRadius:e.borderRadiusSM,borderRadiusSM:e.borderRadiusXS}),r=La(e,{fontSize:e.fontSizeLG,selectHeight:e.controlHeightLG,multipleSelectItemHeight:e.multipleItemHeightLG,borderRadius:e.borderRadiusLG,borderRadiusSM:e.borderRadius});return[Av(e),Av(n,`sm`),{[`${t}-multiple${t}-sm`]:{[`${t}-selection-placeholder`]:{insetInline:e.calc(e.controlPaddingHorizontalSM).sub(e.lineWidth).equal()},[`${t}-selection-search`]:{marginInlineStart:2}}},Av(r,`lg`)]};function Mv(e,t){let{componentCls:n,inputPaddingHorizontalBase:r,borderRadius:i}=e,a=e.calc(e.controlHeight).sub(e.calc(e.lineWidth).mul(2)).equal();return{[`${n}-single${t?`${n}-${t}`:``}`]:{fontSize:e.fontSize,height:e.controlHeight,[`${n}-selector`]:Object.assign(Object.assign({},so(e,!0)),{display:`flex`,borderRadius:i,flex:`1 1 auto`,[`${n}-selection-wrap:after`]:{lineHeight:Q(a)},[`${n}-selection-search`]:{position:`absolute`,inset:0,width:`100%`,"&-input":{width:`100%`,WebkitAppearance:`textfield`}},[`
|
||||
${n}-selection-item,
|
||||
${n}-selection-placeholder
|
||||
`]:{display:`block`,padding:0,lineHeight:Q(a),transition:`all ${e.motionDurationSlow}, visibility 0s`,alignSelf:`center`},[`${n}-selection-placeholder`]:{transition:`none`,pointerEvents:`none`},[[`&:after`,`${n}-selection-item:empty:after`,`${n}-selection-placeholder:empty:after`].join(`,`)]:{display:`inline-block`,width:0,visibility:`hidden`,content:`"\\a0"`}}),[`
|
||||
&${n}-show-arrow ${n}-selection-item,
|
||||
&${n}-show-arrow ${n}-selection-search,
|
||||
&${n}-show-arrow ${n}-selection-placeholder
|
||||
`]:{paddingInlineEnd:e.showArrowPaddingInlineEnd},[`&${n}-open ${n}-selection-item`]:{color:e.colorTextPlaceholder},[`&:not(${n}-customize-input)`]:{[`${n}-selector`]:{width:`100%`,height:`100%`,alignItems:`center`,padding:`0 ${Q(r)}`,[`${n}-selection-search-input`]:{height:a,fontSize:e.fontSize},"&:after":{lineHeight:Q(a)}}},[`&${n}-customize-input`]:{[`${n}-selector`]:{"&:after":{display:`none`},[`${n}-selection-search`]:{position:`static`,width:`100%`},[`${n}-selection-placeholder`]:{position:`absolute`,insetInlineStart:0,insetInlineEnd:0,padding:`0 ${Q(r)}`,"&:after":{display:`none`}}}}}}}function Nv(e){let{componentCls:t}=e,n=e.calc(e.controlPaddingHorizontalSM).sub(e.lineWidth).equal();return[Mv(e),Mv(La(e,{controlHeight:e.controlHeightSM,borderRadius:e.borderRadiusSM}),`sm`),{[`${t}-single${t}-sm`]:{[`&:not(${t}-customize-input)`]:{[`${t}-selector`]:{padding:`0 ${Q(n)}`},[`&${t}-show-arrow ${t}-selection-search`]:{insetInlineEnd:e.calc(n).add(e.calc(e.fontSize).mul(1.5)).equal()},[`
|
||||
&${t}-show-arrow ${t}-selection-item,
|
||||
&${t}-show-arrow ${t}-selection-placeholder
|
||||
`]:{paddingInlineEnd:e.calc(e.fontSize).mul(1.5).equal()}}}},Mv(La(e,{controlHeight:e.singleItemHeightLG,fontSize:e.fontSizeLG,borderRadius:e.borderRadiusLG}),`lg`)]}var Pv=e=>{let{fontSize:t,lineHeight:n,lineWidth:r,controlHeight:i,controlHeightSM:a,controlHeightLG:o,paddingXXS:s,controlPaddingHorizontal:c,zIndexPopupBase:l,colorText:u,fontWeightStrong:d,controlItemBgActive:f,controlItemBgHover:p,colorBgContainer:m,colorFillSecondary:h,colorBgContainerDisabled:g,colorTextDisabled:_,colorPrimaryHover:v,colorPrimary:y,controlOutline:b}=e,x=s*2,S=r*2,C=Math.min(i-x,i-S),w=Math.min(a-x,a-S),T=Math.min(o-x,o-S);return{INTERNAL_FIXED_ITEM_MARGIN:Math.floor(s/2),zIndexPopup:l+50,optionSelectedColor:u,optionSelectedFontWeight:d,optionSelectedBg:f,optionActiveBg:p,optionPadding:`${(i-t*n)/2}px ${c}px`,optionFontSize:t,optionLineHeight:n,optionHeight:i,selectorBg:m,clearBg:m,singleItemHeightLG:o,multipleItemBg:h,multipleItemBorderColor:`transparent`,multipleItemHeight:C,multipleItemHeightSM:w,multipleItemHeightLG:T,multipleSelectorBgDisabled:g,multipleItemColorDisabled:_,multipleItemBorderColorDisabled:`transparent`,showArrowPaddingInlineEnd:Math.ceil(e.fontSize*1.25),hoverBorderColor:v,activeBorderColor:y,activeOutlineColor:b,selectAffixPadding:s}},Fv=(e,t)=>{let{componentCls:n,antCls:r,controlOutlineWidth:i}=e;return{[`&:not(${n}-customize-input) ${n}-selector`]:{border:`${Q(e.lineWidth)} ${e.lineType} ${t.borderColor}`,background:e.selectorBg},[`&:not(${n}-disabled):not(${n}-customize-input):not(${r}-pagination-size-changer)`]:{[`&:hover ${n}-selector`]:{borderColor:t.hoverBorderHover},[`${n}-focused& ${n}-selector`]:{borderColor:t.activeBorderColor,boxShadow:`0 0 0 ${Q(i)} ${t.activeOutlineColor}`,outline:0},[`${n}-prefix`]:{color:t.color}}}},Iv=(e,t)=>({[`&${e.componentCls}-status-${t.status}`]:Object.assign({},Fv(e,t))}),Lv=e=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign({},Fv(e,{borderColor:e.colorBorder,hoverBorderHover:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeOutlineColor:e.activeOutlineColor,color:e.colorText})),Iv(e,{status:`error`,borderColor:e.colorError,hoverBorderHover:e.colorErrorHover,activeBorderColor:e.colorError,activeOutlineColor:e.colorErrorOutline,color:e.colorError})),Iv(e,{status:`warning`,borderColor:e.colorWarning,hoverBorderHover:e.colorWarningHover,activeBorderColor:e.colorWarning,activeOutlineColor:e.colorWarningOutline,color:e.colorWarning})),{[`&${e.componentCls}-disabled`]:{[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]:{background:e.colorBgContainerDisabled,color:e.colorTextDisabled}},[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]:{background:e.multipleItemBg,border:`${Q(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`}})}),Rv=(e,t)=>{let{componentCls:n,antCls:r}=e;return{[`&:not(${n}-customize-input) ${n}-selector`]:{background:t.bg,border:`${Q(e.lineWidth)} ${e.lineType} transparent`,color:t.color},[`&:not(${n}-disabled):not(${n}-customize-input):not(${r}-pagination-size-changer)`]:{[`&:hover ${n}-selector`]:{background:t.hoverBg},[`${n}-focused& ${n}-selector`]:{background:e.selectorBg,borderColor:t.activeBorderColor,outline:0}}}},zv=(e,t)=>({[`&${e.componentCls}-status-${t.status}`]:Object.assign({},Rv(e,t))}),Bv=e=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign({},Rv(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor,color:e.colorText})),zv(e,{status:`error`,bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,color:e.colorError})),zv(e,{status:`warning`,bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,color:e.colorWarning})),{[`&${e.componentCls}-disabled`]:{[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]:{borderColor:e.colorBorder,background:e.colorBgContainerDisabled,color:e.colorTextDisabled}},[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]:{background:e.colorBgContainer,border:`${Q(e.lineWidth)} ${e.lineType} ${e.colorSplit}`}})}),Vv=e=>({"&-borderless":{[`${e.componentCls}-selector`]:{background:`transparent`,border:`${Q(e.lineWidth)} ${e.lineType} transparent`},[`&${e.componentCls}-disabled`]:{[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]:{color:e.colorTextDisabled}},[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]:{background:e.multipleItemBg,border:`${Q(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`},[`&${e.componentCls}-status-error`]:{[`${e.componentCls}-prefix, ${e.componentCls}-selection-item`]:{color:e.colorError}},[`&${e.componentCls}-status-warning`]:{[`${e.componentCls}-prefix, ${e.componentCls}-selection-item`]:{color:e.colorWarning}}}}),Hv=(e,t)=>{let{componentCls:n,antCls:r}=e;return{[`&:not(${n}-customize-input) ${n}-selector`]:{borderWidth:`${Q(e.lineWidth)} 0`,borderStyle:`${e.lineType} none`,borderColor:`transparent transparent ${t.bLine truncated
|
||||
&:hover ${y}`]:{borderColor:r},[`${t}-input:focus-visible + ${y}`]:po(e),[`${t}:hover::after, ${t}-wrapper:hover &::after`]:{visibility:`visible`},[`${t}-inner`]:{"&::after":{boxSizing:`border-box`,position:`absolute`,insetBlockStart:`50%`,insetInlineStart:`50%`,display:`block`,width:x,height:x,marginBlockStart:v(1).mul(i).div(-2).equal({unit:!0}),marginInlineStart:v(1).mul(i).div(-2).equal({unit:!0}),backgroundColor:g,borderBlockStart:0,borderInlineStart:0,borderRadius:x,transform:`scale(0)`,opacity:0,transition:`all ${a} ${s}`,content:`""`},boxSizing:`border-box`,position:`relative`,insetBlockStart:0,insetInlineStart:0,display:`block`,width:x,height:x,backgroundColor:c,borderColor:l,borderStyle:`solid`,borderWidth:u,borderRadius:`50%`,transition:`all ${o}`},[`${t}-input`]:{position:`absolute`,inset:0,zIndex:1,cursor:`pointer`,opacity:0},[`${t}-checked`]:{[y]:{borderColor:r,backgroundColor:_,"&::after":{transform:`scale(${e.calc(e.dotSize).div(i).equal()})`,opacity:1,transition:`all ${a} ${s}`}}},[`${t}-disabled`]:{cursor:`not-allowed`,[y]:{backgroundColor:d,borderColor:l,cursor:`not-allowed`,"&::after":{backgroundColor:m}},[`${t}-input`]:{cursor:`not-allowed`},[`${t}-disabled + span`]:{color:f,cursor:`not-allowed`},[`&${t}-checked`]:{[y]:{"&::after":{transform:`scale(${v(b).div(i).equal()})`}}}},[`span${t} + *`]:{paddingInlineStart:p,paddingInlineEnd:p}})}},K4=e=>{let{buttonColor:t,controlHeight:n,componentCls:r,lineWidth:i,lineType:a,colorBorder:o,motionDurationMid:s,buttonPaddingInline:c,fontSize:l,buttonBg:u,fontSizeLG:d,controlHeightLG:f,controlHeightSM:p,paddingXS:m,borderRadius:h,borderRadiusSM:g,borderRadiusLG:_,buttonCheckedBg:v,buttonSolidCheckedColor:y,colorTextDisabled:b,colorBgContainerDisabled:x,buttonCheckedBgDisabled:S,buttonCheckedColorDisabled:C,colorPrimary:w,colorPrimaryHover:T,colorPrimaryActive:E,buttonSolidCheckedBg:D,buttonSolidCheckedHoverBg:O,buttonSolidCheckedActiveBg:k,calc:A}=e;return{[`${r}-button-wrapper`]:{position:`relative`,display:`inline-block`,height:n,margin:0,paddingInline:c,paddingBlock:0,color:t,fontSize:l,lineHeight:Q(A(n).sub(A(i).mul(2)).equal()),background:u,border:`${Q(i)} ${a} ${o}`,borderBlockStartWidth:A(i).add(.02).equal(),borderInlineEndWidth:i,cursor:`pointer`,transition:[`color ${s}`,`background ${s}`,`box-shadow ${s}`].join(`,`),a:{color:t},[`> ${r}-button`]:{position:`absolute`,insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:`100%`,height:`100%`},"&:not(:last-child)":{marginInlineEnd:A(i).mul(-1).equal()},"&:first-child":{borderInlineStart:`${Q(i)} ${a} ${o}`,borderStartStartRadius:h,borderEndStartRadius:h},"&:last-child":{borderStartEndRadius:h,borderEndEndRadius:h},"&:first-child:last-child":{borderRadius:h},[`${r}-group-large &`]:{height:f,fontSize:d,lineHeight:Q(A(f).sub(A(i).mul(2)).equal()),"&:first-child":{borderStartStartRadius:_,borderEndStartRadius:_},"&:last-child":{borderStartEndRadius:_,borderEndEndRadius:_}},[`${r}-group-small &`]:{height:p,paddingInline:A(m).sub(i).equal(),paddingBlock:0,lineHeight:Q(A(p).sub(A(i).mul(2)).equal()),"&:first-child":{borderStartStartRadius:g,borderEndStartRadius:g},"&:last-child":{borderStartEndRadius:g,borderEndEndRadius:g}},"&:hover":{position:`relative`,color:w},"&:has(:focus-visible)":po(e),[`${r}-inner, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:`none`},[`&-checked:not(${r}-button-wrapper-disabled)`]:{zIndex:1,color:w,background:v,borderColor:w,"&::before":{backgroundColor:w},"&:first-child":{borderColor:w},"&:hover":{color:T,borderColor:T,"&::before":{backgroundColor:T}},"&:active":{color:E,borderColor:E,"&::before":{backgroundColor:E}}},[`${r}-group-solid &-checked:not(${r}-button-wrapper-disabled)`]:{color:y,background:D,borderColor:D,"&:hover":{color:y,background:O,borderColor:O},"&:active":{color:y,background:k,borderColor:k}},"&-disabled":{color:b,backgroundColor:x,borderColor:o,cursor:`not-allowed`,"&:first-child, &:hover":{color:b,backgroundColor:x,borderColor:o}},[`&-disabled${r}-button-wrapper-checked`]:{color:C,backgroundColor:S,borderColor:o,boxShadow:`none`},"&-block":{flex:1,textAlign:`center`}}}},q4=_o(`Radio`,e=>{let{controlOutline:t,controlOutlineWidth:n}=e,r=`0 0 0 ${Q(n)} ${t}`,i=La(e,{radioFocusShadow:r,radioButtonFocusShadow:r});return[W4(i),G4(i),K4(i)]},e=>{let{wireframe:t,padding:n,marginXS:r,lineWidth:i,fontSizeLG:a,colorText:o,colorBgContainer:s,colorTextDisabled:c,controlItemBgActiveDisabled:l,colorTextLightSolid:u,colorPrimary:d,colorPrimaryHover:f,colorPrimaryActive:p,colorWhite:m}=e,h=a;return{radioSize:h,dotSize:t?h-8:h-(4+i)*2,dotColorDisabled:c,buttonSolidCheckedColor:u,buttonSolidCheckedBg:d,buttonSolidCheckedHoverBg:f,buttonSolidCheckedActiveBg:p,buttonBg:s,buttonCheckedBg:s,buttonColor:o,buttonCheckedBgDisabled:l,buttonCheckedColorDisabled:c,buttonPaddingInline:n-i,wrapperMarginInlineEnd:r,radioColor:t?d:m,radioBgColor:t?s:d}},{unitless:{radioSize:!0,dotSize:!0}}),J4=function(e,t){var n={};for(var r in e)Obje
Line truncated
|
||||
& > ${t}-affix-wrapper,
|
||||
& > ${t}-number-affix-wrapper,
|
||||
& > ${n}-picker-range
|
||||
`]:{display:`inline-flex`},"& > *:not(:last-child)":{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal(),borderInlineEndWidth:e.lineWidth},[t]:{float:`none`},[`& > ${n}-select > ${n}-select-selector,
|
||||
& > ${n}-select-auto-complete ${t},
|
||||
& > ${n}-cascader-picker ${t},
|
||||
& > ${t}-group-wrapper ${t}`]:{borderInlineEndWidth:e.lineWidth,borderRadius:0,"&:hover, &:focus":{zIndex:1}},[`& > ${n}-select-focused`]:{zIndex:1},[`& > ${n}-select > ${n}-select-arrow`]:{zIndex:1},[`& > *:first-child,
|
||||
& > ${n}-select:first-child > ${n}-select-selector,
|
||||
& > ${n}-select-auto-complete:first-child ${t},
|
||||
& > ${n}-cascader-picker:first-child ${t}`]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius},[`& > *:last-child,
|
||||
& > ${n}-select:last-child > ${n}-select-selector,
|
||||
& > ${n}-cascader-picker:last-child ${t},
|
||||
& > ${n}-cascader-picker-focused:last-child ${t}`]:{borderInlineEndWidth:e.lineWidth,borderStartEndRadius:e.borderRadius,borderEndEndRadius:e.borderRadius},[`& > ${n}-select-auto-complete ${t}`]:{verticalAlign:`top`},[`${t}-group-wrapper + ${t}-group-wrapper`]:{marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),[`${t}-affix-wrapper`]:{borderRadius:0}},[`${t}-group-wrapper:not(:last-child)`]:{[`&${t}-search > ${t}-group`]:{[`& > ${t}-group-addon > ${t}-search-button`]:{borderRadius:0},[`& > ${t}`]:{borderStartStartRadius:e.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:e.borderRadius}}}})}},N3=e=>{let{componentCls:t,controlHeightSM:n,lineWidth:r,calc:i}=e,a=i(n).sub(i(r).mul(2)).sub(16).div(2).equal();return{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},so(e)),j3(e)),g3(e)),S3(e)),y3(e)),D3(e)),{'&[type="color"]':{height:e.controlHeight,[`&${t}-lg`]:{height:e.controlHeightLG},[`&${t}-sm`]:{height:n,paddingTop:a,paddingBottom:a}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{appearance:`none`}})}},P3=e=>{let{componentCls:t}=e;return{[`${t}-clear-icon`]:{margin:0,padding:0,lineHeight:0,color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,verticalAlign:-1,cursor:`pointer`,transition:`color ${e.motionDurationSlow}`,border:`none`,outline:`none`,backgroundColor:`transparent`,"&:hover":{color:e.colorIcon},"&:active":{color:e.colorText},"&-hidden":{visibility:`hidden`},"&-has-suffix":{margin:`0 ${Q(e.inputAffixPadding)}`}}}},F3=e=>{let{componentCls:t,inputAffixPadding:n,colorTextDescription:r,motionDurationSlow:i,colorIcon:a,colorIconHover:o,iconCls:s}=e,c=`${t}-affix-wrapper`,l=`${t}-affix-wrapper-disabled`;return{[c]:Object.assign(Object.assign(Object.assign(Object.assign({},j3(e)),{display:`inline-flex`,[`&:not(${t}-disabled):hover`]:{zIndex:1,[`${t}-search-with-button &`]:{zIndex:0}},"&-focused, &:focus":{zIndex:1},[`> input${t}`]:{padding:0},[`> input${t}, > textarea${t}`]:{fontSize:`inherit`,border:`none`,borderRadius:0,outline:`none`,background:`transparent`,color:`inherit`,"&::-ms-reveal":{display:`none`},"&:focus":{boxShadow:`none !important`}},"&::before":{display:`inline-block`,width:0,visibility:`hidden`,content:`"\\a0"`},[t]:{"&-prefix, &-suffix":{display:`flex`,flex:`none`,alignItems:`center`,"> *:not(:last-child)":{marginInlineEnd:e.paddingXS}},"&-show-count-suffix":{color:r,direction:`ltr`},"&-show-count-has-suffix":{marginInlineEnd:e.paddingXXS},"&-prefix":{marginInlineEnd:n},"&-suffix":{marginInlineStart:n}}}),P3(e)),{[`${s}${t}-password-icon`]:{color:a,cursor:`pointer`,transition:`all ${i}`,"&:hover":{color:o}}}),[`${t}-underlined`]:{borderRadius:0},[l]:{[`${s}${t}-password-icon`]:{color:a,cursor:`not-allowed`,"&:hover":{color:a}}}}},I3=e=>{let{componentCls:t,borderRadiusLG:n,borderRadiusSM:r}=e;return{[`${t}-group`]:Object.assign(Object.assign(Object.assign({},so(e)),M3(e)),{"&-rtl":{direction:`rtl`},"&-wrapper":Object.assign(Object.assign(Object.assign({display:`inline-block`,width:`100%`,textAlign:`start`,verticalAlign:`top`,"&-rtl":{direction:`rtl`},"&-lg":{[`${t}-group-addon`]:{borderRadius:n,fontSize:e.inputFontSizeLG}},"&-sm":{[`${t}-group-addon`]:{borderRadius:r}}},v3(e)),w3(e)),{[`&:not(${t}-compact-first-item):not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}, ${t}-group-addon`]:{borderRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-first-item`]:{[`${t}, ${t}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-last-item`]:{[`${t}, ${t}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}-affix-wrapper`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-item`]:{[`${t}-affix-wrapper`]:{borderStartStartRadius:0,borderEndStartRadius:0}}})})}},L3=e=>{let{componentCls:t,antCls:n}=e,r=`${t}-search`;return{[r]:{[t]:{"&:not([disabled]):hover, &:not([disabled]):focus":{[`+ ${t}-group-addon ${r}-button:not(${n}-btn-color-primary):not(${n}-btn-variant-text)`]:{borderInlineStartColor:e.colorPrimaryHover}}},[`${t}-affix-wrapper`]:{height:e.controlHeight,borderRadius:0},[`${t}-lg`]:{lineHeight:e.calc(e.lineHeightLG).sub(2e-4).equal()},[`> ${t}-group`]:{[`> ${t}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${r}-button`]:{marginInlineEnd:-1,borderStartStartRadius:0,borderEndStartRadius:0,boxShadow:`none`},[`${r}-button:not(${n}-btn-color-primary)`]:{color:e.colorTextDescription,"&:not([disabled]):hover":{color:e.colorPrimaryHover},"&:active":{color:e.colorPrimaryActive},[`&${n}-btn-loading::before`]:{inset:0}}}},[`${r}-button`]:{height:e.controlHeight,"&:hover, &:focus":{zIndex:1}},"&-large":{[`${t}-affix-wrapper, ${r}-button`]:{height:e.controlHeightLG}},"&-small":{[`${t}-affix-wrapper, ${r}-button`]:{height:e.controlHeightSM}},"&-rtl":{direction:`rtl`},[`&${t}Line truncated
|
||||
> ${t},
|
||||
${t}-affix-wrapper`]:{"&:hover, &:focus, &:active":{zIndex:2}},[`> ${t}-affix-wrapper-focused`]:{zIndex:2}}}}},R3=e=>{let{componentCls:t}=e;return{[`${t}-out-of-range`]:{[`&, & input, & textarea, ${t}-show-count-suffix, ${t}-data-count`]:{color:e.colorError}}}},z3=_o([`Input`,`Shared`],e=>{let t=La(e,u3(e));return[N3(t),F3(t)]},d3,{resetFont:!1}),B3=_o([`Input`,`Component`],e=>{let t=La(e,u3(e));return[I3(t),L3(t),R3(t),zf(t)]},d3,{resetFont:!1}),V3={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z`}},{tag:`path`,attrs:{d:`M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z`}}]},name:`plus`,theme:`outlined`},H3=s.forwardRef(function(e,t){return s.createElement($s,c({},e,{ref:t,icon:V3}))}),U3=(0,s.createContext)(null),W3=function(e){var t=e.activeTabOffset,n=e.horizontal,r=e.rtl,i=e.indicator,a=i===void 0?{}:i,o=a.size,c=a.align,l=c===void 0?`center`:c,u=Z((0,s.useState)(),2),d=u[0],f=u[1],p=(0,s.useRef)(),m=s.useCallback(function(e){return typeof o==`function`?o(e):typeof o==`number`?o:e},[o]);function h(){$e.cancel(p.current)}return(0,s.useEffect)(function(){var e={};if(t){if(n){e.width=m(t.width);var i=r?`right`:`left`;l===`start`&&(e[i]=t[i]),l===`center`&&(e[i]=t[i]+t.width/2,e.transform=r?`translateX(50%)`:`translateX(-50%)`),l===`end`&&(e[i]=t[i]+t.width,e.transform=`translateX(-100%)`)}else e.height=m(t.height),l===`start`&&(e.top=t.top),l===`center`&&(e.top=t.top+t.height/2,e.transform=`translateY(-50%)`),l===`end`&&(e.top=t.top+t.height,e.transform=`translateY(-100%)`)}return h(),p.current=$e(function(){d&&e&&Object.keys(e).every(function(t){var n=e[t],r=d[t];return typeof n==`number`&&typeof r==`number`?Math.round(n)===Math.round(r):n===r})||f(e)}),h},[JSON.stringify(t),n,r,l,m]),{style:d}},G3={width:0,height:0,left:0,top:0};function K3(e,t,n){return(0,s.useMemo)(function(){for(var n=new Map,r=t.get(e[0]?.key)||G3,i=r.left+r.width,a=0;a<e.length;a+=1){var o=e[a].key,s=t.get(o);s||=t.get(e[a-1]?.key)||G3;var c=n.get(o)||O({},s);c.right=i-c.left-c.width,n.set(o,c)}return n},[e.map(function(e){return e.key}).join(`_`),t,n])}function q3(e,t){var n=s.useRef(e),r=Z(s.useState({}),2)[1];function i(e){var i=typeof e==`function`?e(n.current):e;i!==n.current&&t(i,n.current),n.current=i,r({})}return[n.current,i]}var J3=.1,Y3=.01,X3=20,Z3=.995**X3;function Q3(e,t){var n=Z((0,s.useState)(),2),r=n[0],i=n[1],a=Z((0,s.useState)(0),2),o=a[0],c=a[1],l=Z((0,s.useState)(0),2),u=l[0],d=l[1],f=Z((0,s.useState)(),2),p=f[0],m=f[1],h=(0,s.useRef)();function g(e){var t=e.touches[0];i({x:t.screenX,y:t.screenY}),window.clearInterval(h.current)}function _(e){if(r){var n=e.touches[0],a=n.screenX,s=n.screenY;i({x:a,y:s});var l=a-r.x,u=s-r.y;t(l,u);var f=Date.now();c(f),d(f-o),m({x:l,y:u})}}function v(){if(r&&(i(null),m(null),p)){var e=p.x/u,n=p.y/u;if(Math.max(Math.abs(e),Math.abs(n))<J3)return;var a=e,o=n;h.current=window.setInterval(function(){Math.abs(a)<Y3&&Math.abs(o)<Y3?window.clearInterval(h.current):(a*=Z3,o*=Z3,t(a*X3,o*X3))},X3)}}var y=(0,s.useRef)();function b(e){var n=e.deltaX,r=e.deltaY,i=0,a=Math.abs(n),o=Math.abs(r);a===o?i=y.current===`x`?n:r:a>o?(i=n,y.current=`x`):(i=r,y.current=`y`),t(-i,-i)&&e.preventDefault()}var x=(0,s.useRef)(null);x.current={onTouchStart:g,onTouchMove:_,onTouchEnd:v,onWheel:b},s.useEffect(function(){function t(e){x.current.onTouchStart(e)}function n(e){x.current.onTouchMove(e)}function r(e){x.current.onTouchEnd(e)}function i(e){x.current.onWheel(e)}return document.addEventListener(`touchmove`,n,{passive:!1}),document.addEventListener(`touchend`,r,{passive:!0}),e.current.addEventListener(`touchstart`,t,{passive:!0}),e.current.addEventListener(`wheel`,i,{passive:!1}),function(){document.removeEventListener(`touchmove`,n),document.removeEventListener(`touchend`,r)}},[])}function $3(e){var t=Z((0,s.useState)(0),2),n=t[0],r=t[1],i=(0,s.useRef)(0),a=(0,s.useRef)();return a.current=e,Jt(function(){var e;(e=a.current)==null||e.call(a)},[n]),function(){i.current===n&&(i.current+=1,r(i.current))}}function e6(e){var t=(0,s.useRef)([]),n=Z((0,s.useState)({}),2)[1],r=(0,s.useRef)(typeof e==`function`?e():e),i=$3(function(){var e=r.current;t.current.forEach(function(t){e=t(e)}),t.current=[],r.current=e,n({})});function a(e){t.current.push(e),i()}return[r.current,a]}var t6={width:0,height:0,left:0,top:0,right:0};function n6(e,t,n,r,i,a,o){var c=o.tabs,l=o.tabPosition,u=o.rtl,d,f,p;return[`top`,`bottom`].includes(l)?(d=`width`,f=u?`right`:`left`,p=Math.abs(n)):(d=`height`,f=`top`,p=-n),(0,s.useMemo)(function(){if(!c.length)return[0,0];for(var n=c.length,r=n,i=0;i<n;i+=1){var a=e.get(c[i].key)||t6;if(Math.floor(a[f]+a[d])>Math.floor(p+t)){r=i-1;break}}for(var o=0,s=n-1;s>=0;--s)if((e.get(c[s].key)||t6)[f]<p){o=s+1;break}return o>r?[0,-1]:[o,r]},[e,t,r,i,a,p,l,c.map(function(e){return e.key}).join(`_`),u])}function r6(e){var t;return e instanceof Map?(t={},e.forEach(function(e,n){t[n]
Line truncated
|
||||
right ${e.motionDurationSlow}`}},[`${t}-nav-wrap`]:{"&::before, &::after":{top:0,bottom:0,width:e.controlHeight},"&::before":{left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowLeft},"&::after":{right:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowRight},[`&${t}-nav-wrap-ping-left::before`]:{opacity:1},[`&${t}-nav-wrap-ping-right::after`]:{opacity:1}}}},[`${t}-top`]:{[`> ${t}-nav,
|
||||
> div > ${t}-nav`]:{"&::before":{bottom:0},[`${t}-ink-bar`]:{bottom:0}}},[`${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{order:1,marginTop:n,marginBottom:0,"&::before":{top:0},[`${t}-ink-bar`]:{top:0}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{order:0}},[`${t}-left, ${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{flexDirection:`column`,minWidth:s(e.controlHeight).mul(1.25).equal(),[`${t}-tab`]:{padding:a,textAlign:`center`},[`${t}-tab + ${t}-tab`]:{margin:o},[`${t}-nav-wrap`]:{flexDirection:`column`,"&::before, &::after":{right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},height:e.controlHeight},"&::before":{top:0,boxShadow:e.boxShadowTabsOverflowTop},"&::after":{bottom:0,boxShadow:e.boxShadowTabsOverflowBottom},[`&${t}-nav-wrap-ping-top::before`]:{opacity:1},[`&${t}-nav-wrap-ping-bottom::after`]:{opacity:1}},[`${t}-ink-bar`]:{width:e.lineWidthBold,"&-animated":{transition:`height ${e.motionDurationSlow}, top ${e.motionDurationSlow}`}},[`${t}-nav-list, ${t}-nav-operations`]:{flex:`1 0 auto`,flexDirection:`column`}}},[`${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-ink-bar`]:{right:{_skip_check_:!0,value:0}}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{marginLeft:{_skip_check_:!0,value:Q(s(e.lineWidth).mul(-1).equal())},borderLeft:{_skip_check_:!0,value:`${Q(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},[`> ${t}-content > ${t}-tabpane`]:{paddingLeft:{_skip_check_:!0,value:e.paddingLG}}}},[`${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{order:1,[`${t}-ink-bar`]:{left:{_skip_check_:!0,value:0}}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{order:0,marginRight:{_skip_check_:!0,value:s(e.lineWidth).mul(-1).equal()},borderRight:{_skip_check_:!0,value:`${Q(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},[`> ${t}-content > ${t}-tabpane`]:{paddingRight:{_skip_check_:!0,value:e.paddingLG}}}}}},F6=e=>{let{componentCls:t,cardPaddingSM:n,cardPaddingLG:r,cardHeightSM:i,cardHeightLG:a,horizontalItemPaddingSM:o,horizontalItemPaddingLG:s}=e;return{[t]:{"&-small":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:o,fontSize:e.titleFontSizeSM}}},"&-large":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:s,fontSize:e.titleFontSizeLG,lineHeight:e.lineHeightLG}}}},[`${t}-card`]:{[`&${t}-small`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:n},[`${t}-nav-add`]:{minWidth:i,minHeight:i}},[`&${t}-bottom`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`0 0 ${Q(e.borderRadius)} ${Q(e.borderRadius)}`}},[`&${t}-top`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`${Q(e.borderRadius)} ${Q(e.borderRadius)} 0 0`}},[`&${t}-right`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${Q(e.borderRadius)} ${Q(e.borderRadius)} 0`}}},[`&${t}-left`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${Q(e.borderRadius)} 0 0 ${Q(e.borderRadius)}`}}}},[`&${t}-large`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:r},[`${t}-nav-add`]:{minWidth:a,minHeight:a}}}}}},I6=e=>{let{componentCls:t,itemActiveColor:n,itemHoverColor:r,iconCls:i,tabsHorizontalItemMargin:a,horizontalItemPadding:o,itemSelectedColor:s,itemColor:c}=e,l=`${t}-tab`;return{[l]:{position:`relative`,WebkitTouchCallout:`none`,WebkitTapHighlightColor:`transparent`,display:`inline-flex`,alignItems:`center`,padding:o,fontSize:e.titleFontSize,background:`transparent`,border:0,outline:`none`,cursor:`pointer`,color:c,"&-btn, &-remove":{"&:focus:not(:focus-visible), &:active":{color:n}},"&-btn":{outline:`none`,transition:`all ${e.motionDurationSlow}`,[`${l}-icon:not(:last-child)`]:{marginInlineEnd:e.marginSM}},"&-remove":Object.assign({flex:`none`,lineHeight:1,marginRight:{_skip_check_:!0,value:e.calc(e.marginXXS).mul(-1).equal()},marginLeft:{_skip_check_:!0,value:e.marginXS},color:e.colorIcon,fontSize:e.fontSizeSM,background:`transparent`,border:`none`,outline:`none`,cursor:`pointer`,transition:`all ${e.motionDurationSlow}`,"&:hover":{color:e.colorTextHeading}},mo(e)),"&:hover":{color:r},[`&${l}-active ${l}-btn`]:{color:s,textShadow:e.tabsActiveTextShadow},[`&${l}-focus ${l}-btn:focus-visible`]:po(e),[`&${l}-disabled`]:{color:e.colorTextDisabled,cursor:`not-allowed`},[`&${l}-disabled ${l}-btn, &${l}-disabled ${t}-remove`]:{"&:focus, &:active":{color:e.colorTextDisabled}},[`& ${l}-remove ${i}`]:{margin:0,verticalAlign:`middle`},[`${i}:not(:last-child)`]:{marginRight:{_skip_check_:!0,value:e.marginSM}}},[`${l} + ${l}`]:{margin:{_skip_check_:!0,value:a}}}},L6=e=>{let{componentCls:t,tabsHorizontalItemMarginRTL:n,iconCls:r,cardGutter:i,calc:a}=e;return{[`${t}-rtl`]:{direction:`rtl`,[`${t}-nav`]:{[`${t}-tab`]:{margin:{_skip_check_:!0,value:n},[`${t}-tab:last-of-type`]:{marginLeft:{_skip_check_:!0,value:0}},[r]:{marginRight:{_skip_check_:!0,value:0},marginLeft:{_skip_check_:!0,value:Q(e.marginSM)}},[`${t}-tab-remove`]:{marginRight:{_skip_check_:!0,value:Q(e.marginXS)},marginLeft:{_skip_check_:!0,value:Q(a(e.marginXXS).mul(-1).equal())},[r]:{margin:0}}}},[`&${t}-left`]:{[`> ${t}-nav`]:{order:1},[`> ${t}-content-holder`]:{order:0}},[`&${t}-right`]:{[`> ${t}-navLine truncated
|
||||
> ${n}-typography,
|
||||
> ${n}-typography-edit-content
|
||||
`]:{insetInlineStart:0,marginTop:0,marginBottom:0}}),[`${t}-tabs-top`]:{clear:`both`,marginBottom:a,color:e.colorText,fontWeight:`normal`,fontSize:e.fontSize,"&-bar":{borderBottom:`${Q(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`}}})},K6=e=>{let{cardPaddingBase:t,colorBorderSecondary:n,cardShadow:r,lineWidth:i}=e;return{width:`33.33%`,padding:t,border:0,borderRadius:0,boxShadow:`
|
||||
${Q(i)} 0 0 0 ${n},
|
||||
0 ${Q(i)} 0 0 ${n},
|
||||
${Q(i)} ${Q(i)} 0 0 ${n},
|
||||
${Q(i)} 0 0 0 ${n} inset,
|
||||
0 ${Q(i)} 0 0 ${n} inset;
|
||||
`,transition:`all ${e.motionDurationMid}`,"&-hoverable:hover":{position:`relative`,zIndex:1,boxShadow:r}}},q6=e=>{let{componentCls:t,iconCls:n,actionsLiMargin:r,cardActionsIconSize:i,colorBorderSecondary:a,actionsBg:o}=e;return Object.assign(Object.assign({margin:0,padding:0,listStyle:`none`,background:o,borderTop:`${Q(e.lineWidth)} ${e.lineType} ${a}`,display:`flex`,borderRadius:`0 0 ${Q(e.borderRadiusLG)} ${Q(e.borderRadiusLG)}`},lo()),{"& > li":{margin:r,color:e.colorTextDescription,textAlign:`center`,"> span":{position:`relative`,display:`block`,minWidth:e.calc(e.cardActionsIconSize).mul(2).equal(),fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:`pointer`,"&:hover":{color:e.colorPrimary,transition:`color ${e.motionDurationMid}`},[`a:not(${t}-btn), > ${n}`]:{display:`inline-block`,width:`100%`,color:e.colorIcon,lineHeight:Q(e.fontHeight),transition:`color ${e.motionDurationMid}`,"&:hover":{color:e.colorPrimary}},[`> ${n}`]:{fontSize:i,lineHeight:Q(e.calc(i).mul(e.lineHeight).equal())}},"&:not(:last-child)":{borderInlineEnd:`${Q(e.lineWidth)} ${e.lineType} ${a}`}}})},J6=e=>Object.assign(Object.assign({margin:`${Q(e.calc(e.marginXXS).mul(-1).equal())} 0`,display:`flex`},lo()),{"&-avatar":{paddingInlineEnd:e.padding},"&-detail":{overflow:`hidden`,flex:1,"> div:not(:last-child)":{marginBottom:e.marginXS}},"&-title":Object.assign({color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG},oo),"&-description":{color:e.colorTextDescription}}),Y6=e=>{let{componentCls:t,colorFillAlter:n,headerPadding:r,bodyPadding:i}=e;return{[`${t}-head`]:{padding:`0 ${Q(r)}`,background:n,"&-title":{fontSize:e.fontSize}},[`${t}-body`]:{padding:`${Q(e.padding)} ${Q(i)}`}}},X6=e=>{let{componentCls:t}=e;return{overflow:`hidden`,[`${t}-body`]:{userSelect:`none`}}},Z6=e=>{let{componentCls:t,cardShadow:n,cardHeadPadding:r,colorBorderSecondary:i,boxShadowTertiary:a,bodyPadding:o,extraColor:s}=e;return{[t]:Object.assign(Object.assign({},so(e)),{position:`relative`,background:e.colorBgContainer,borderRadius:e.borderRadiusLG,[`&:not(${t}-bordered)`]:{boxShadow:a},[`${t}-head`]:G6(e),[`${t}-extra`]:{marginInlineStart:`auto`,color:s,fontWeight:`normal`,fontSize:e.fontSize},[`${t}-body`]:{padding:o,borderRadius:`0 0 ${Q(e.borderRadiusLG)} ${Q(e.borderRadiusLG)}`},[`${t}-grid`]:K6(e),[`${t}-cover`]:{"> *":{display:`block`,width:`100%`,borderRadius:`${Q(e.borderRadiusLG)} ${Q(e.borderRadiusLG)} 0 0`}},[`${t}-actions`]:q6(e),[`${t}-meta`]:J6(e)}),[`${t}-bordered`]:{border:`${Q(e.lineWidth)} ${e.lineType} ${i}`,[`${t}-cover`]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},[`${t}-hoverable`]:{cursor:`pointer`,transition:`box-shadow ${e.motionDurationMid}, border-color ${e.motionDurationMid}`,"&:hover":{borderColor:`transparent`,boxShadow:n}},[`${t}-contain-grid`]:{borderRadius:`${Q(e.borderRadiusLG)} ${Q(e.borderRadiusLG)} 0 0 `,[`${t}-body`]:{display:`flex`,flexWrap:`wrap`},[`&:not(${t}-loading) ${t}-body`]:{marginBlockStart:e.calc(e.lineWidth).mul(-1).equal(),marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),padding:0}},[`${t}-contain-tabs`]:{[`> div${t}-head`]:{minHeight:0,[`${t}-head-title, ${t}-extra`]:{paddingTop:r}}},[`${t}-type-inner`]:Y6(e),[`${t}-loading`]:X6(e),[`${t}-rtl`]:{direction:`rtl`}}},Q6=e=>{let{componentCls:t,bodyPaddingSM:n,headerPaddingSM:r,headerHeightSM:i,headerFontSizeSM:a}=e;return{[`${t}-small`]:{[`> ${t}-head`]:{minHeight:i,padding:`0 ${Q(r)}`,fontSize:a,[`> ${t}-head-wrapper`]:{[`> ${t}-extra`]:{fontSize:e.fontSize}}},[`> ${t}-body`]:{padding:n}},[`${t}-small${t}-contain-tabs`]:{[`> ${t}-head`]:{[`${t}-head-title, ${t}-extra`]:{paddingTop:0,display:`flex`,alignItems:`center`}}}}},$6=_o(`Card`,e=>{let t=La(e,{cardShadow:e.boxShadowCard,cardHeadPadding:e.padding,cardPaddingBase:e.paddingLG,cardActionsIconSize:e.fontSize});return[Z6(t),Q6(t)]},e=>({headerBg:`transparent`,headerFontSize:e.fontSizeLG,headerFontSizeSM:e.fontSize,headerHeight:e.fontSizeLG*e.lineHeightLG+e.padding*2,headerHeightSM:e.fontSize*e.lineHeight+e.paddingXS*2,actionsBg:e.colorBgContainer,actionsLiMargin:`${e.paddingSM}px 0`,tabsMarginBottom:-e.padding-e.lineWidth,extraColor:e.colorText,bodyPaddingSM:12,headerPaddingSM:12,bodyPadding:e.bodyPadding??e.paddingLG,headerPadding:e.headerPadding??e.paddingLG})),eb=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},tb=e=>{let{actionClasses:t,actions:n=[],actionStyle:r}=e;return s.createElement(`ul`,{className:t,style:r},n.map((e,t)=>{let r=`action-${t}`;return s.createElement(`li`,{style:{width:`${100/n.length}%`},key:r},s.createElement(`span`,null,e))}))},nb=s.forwardRef((e,t)=>{let{prefixCls:n,className:r,rootClassName:i,style:a,extra:o,headStyle:c={},bodyStyle:l={},title:u,loading:d,bordered:
Line truncated
|
||||
${n}:not(${n}-disabled),
|
||||
${t}:not(${t}-disabled)
|
||||
`]:{[`&:hover ${t}-inner`]:{borderColor:e.colorPrimary}},[`${n}:not(${n}-disabled)`]:{[`&:hover ${t}-checked:not(${t}-disabled) ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:`transparent`},[`&:hover ${t}-checked:not(${t}-disabled):after`]:{borderColor:e.colorPrimaryHover}}},{[`${t}-checked`]:{[`${t}-inner`]:{backgroundColor:e.colorPrimary,borderColor:e.colorPrimary,"&:after":{opacity:1,transform:`rotate(45deg) scale(1) translate(-50%,-50%)`,transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack} ${e.motionDurationFast}`}}},[`
|
||||
${n}-checked:not(${n}-disabled),
|
||||
${t}-checked:not(${t}-disabled)
|
||||
`]:{[`&:hover ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:`transparent`}}},{[t]:{"&-indeterminate":{"&":{[`${t}-inner`]:{backgroundColor:`${e.colorBgContainer}`,borderColor:`${e.colorBorder}`,"&:after":{top:`50%`,insetInlineStart:`50%`,width:e.calc(e.fontSizeLG).div(2).equal(),height:e.calc(e.fontSizeLG).div(2).equal(),backgroundColor:e.colorPrimary,border:0,transform:`translate(-50%, -50%) scale(1)`,opacity:1,content:`""`}},[`&:hover ${t}-inner`]:{backgroundColor:`${e.colorBgContainer}`,borderColor:`${e.colorPrimary}`}}}}},{[`${n}-disabled`]:{cursor:`not-allowed`},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:`not-allowed`,pointerEvents:`none`},[`${t}-inner`]:{background:e.colorBgContainerDisabled,borderColor:e.colorBorder,"&:after":{borderColor:e.colorTextDisabled}},"&:after":{display:`none`},"& + span":{color:e.colorTextDisabled},[`&${t}-indeterminate ${t}-inner::after`]:{background:e.colorTextDisabled}}}]};function lb(e,t){return cb(La(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize}))}var ub=_o(`Checkbox`,(e,{prefixCls:t})=>[lb(t,e)]),db=s.createContext(null),fb=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},pb=s.forwardRef((e,t)=>{let{prefixCls:n,className:r,rootClassName:i,children:a,indeterminate:o=!1,style:c,onMouseEnter:l,onMouseLeave:u,skipGroup:d=!1,disabled:f}=e,p=fb(e,[`prefixCls`,`className`,`rootClassName`,`children`,`indeterminate`,`style`,`onMouseEnter`,`onMouseLeave`,`skipGroup`,`disabled`]),{getPrefixCls:m,direction:g,checkbox:_}=s.useContext(da),v=s.useContext(db),{isFormItemInput:y}=s.useContext(xh),b=s.useContext(va),x=(v?.disabled||f)??b,S=s.useRef(p.value),C=s.useRef(null),w=R(t,C);s.useEffect(()=>{v?.registerValue(p.value)},[]),s.useEffect(()=>{if(!d)return p.value!==S.current&&(v?.cancelValue(S.current),v?.registerValue(p.value),S.current=p.value),()=>v?.cancelValue(p.value)},[p.value]),s.useEffect(()=>{C.current?.input&&(C.current.input.indeterminate=o)},[o]);let T=m(`checkbox`,n),E=Rc(T),[D,O,k]=ub(T,E),A=Object.assign({},p);v&&!d&&(A.onChange=(...e)=>{p.onChange&&p.onChange.apply(p,e),v.toggleOption&&v.toggleOption({label:a,value:p.value})},A.name=v.name,A.checked=v.value.includes(p.value));let j=(0,h.default)(`${T}-wrapper`,{[`${T}-rtl`]:g===`rtl`,[`${T}-wrapper-checked`]:A.checked,[`${T}-wrapper-disabled`]:x,[`${T}-wrapper-in-form-item`]:y},_?.className,r,i,k,E,O),M=(0,h.default)({[`${T}-indeterminate`]:o},mu,O),[N,P]=U4(A.onClick);return D(s.createElement(xu,{component:`Checkbox`,disabled:x},s.createElement(`label`,{className:j,style:Object.assign(Object.assign({},_?.style),c),onMouseEnter:l,onMouseLeave:u,onClick:N},s.createElement(H4,Object.assign({},A,{onClick:P,prefixCls:T,className:M,disabled:x,ref:w})),a!=null&&s.createElement(`span`,{className:`${T}-label`},a))))}),mb=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},hb=s.forwardRef((e,t)=>{let{defaultValue:n,children:r,options:i=[],prefixCls:a,className:o,rootClassName:c,style:l,onChange:u}=e,d=mb(e,[`defaultValue`,`children`,`options`,`prefixCls`,`className`,`rootClassName`,`style`,`onChange`]),{getPrefixCls:f,direction:p}=s.useContext(da),[m,g]=s.useState(d.value||n||[]),[_,v]=s.useState([]);s.useEffect(()=>{`value`in d&&g(d.value||[])},[d.value]);let y=s.useMemo(()=>i.map(e=>typeof e==`string`||typeof e==`number`?{label:e,value:e}:e),[i]),b=e=>{v(t=>t.filter(t=>t!==e))},x=e=>{v(t=>[].concat(X(t),[e]))},S=e=>{let t=m.indexOf(e.value),n=X(m);t===-1?n.push(e.value):n.splice(t,1),`value`in d||g(n),u?.(n.filter(e=>_.includes(e)).sort((e,t)=>y.findIndex(t=>t.value===e)-y.findIndex(e=>e.value===t)))},C=f(`checkbox`,a),w=`${C}-group`,T=Rc(C),[E,D,O]=ub(C,T),k=du(d,[`value`,`disabled`]),A=i.length?y.map(e=>s.createElement(pb,{prefixCls:C,key:e.value.toString(),disabled:`disabled`in e?e.disabled:d.disabled,value:e.value,checked:m.includes(e.value),onChange:e.onChange,className:(0,h.default)(`${w}-item`,e.className),style:e.style,title:e.title,id:e.id,required:e.required},e.label)):r,j=s.useMemo(()=>({toggleOption:S,value:m,disabled:d.disabled,name:d.name,registerValue:x,cancelValue:b}),[S,m,d.disabled,d.name,x,b]),M=(0,h.default)(w,{[`${w}-rtl`]:p===`rtl`},o,c,O,T,D);return E(s.createElement(`div`,Object.assign({className:M,style:l},k,{ref:t}),s.createElement(db.Provider,{value:j},A)))}),gb=pb;gb.Group=hb,gb.__ANT_CHECKBOX=!0;var _b=(0,s.createContext)({}),vb=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)
Line truncated
|
||||
opacity ${e.motionDurationFast} ${e.motionEaseInOut},
|
||||
transform ${e.motionDurationFast} ${e.motionEaseInOut} !important`,[`&${r}-appear, &${r}-enter`]:{transform:`translateY(-5px)`,opacity:0,"&-active":{transform:`translateY(0)`,opacity:1}},[`&${r}-leave-active`]:{transform:`translateY(-5px)`}}}}},D8=e=>({legend:{display:`block`,width:`100%`,marginBottom:e.marginLG,padding:0,color:e.colorTextDescription,fontSize:e.fontSizeLG,lineHeight:`inherit`,border:0,borderBottom:`${Q(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},'input[type="search"]':{boxSizing:`border-box`},'input[type="radio"], input[type="checkbox"]':{lineHeight:`normal`},'input[type="file"]':{display:`block`},'input[type="range"]':{display:`block`,width:`100%`},"select[multiple], select[size]":{height:`auto`},"input[type='file']:focus,\n input[type='radio']:focus,\n input[type='checkbox']:focus":{outline:0,boxShadow:`0 0 0 ${Q(e.controlOutlineWidth)} ${e.controlOutline}`},output:{display:`block`,paddingTop:15,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight}}),O8=(e,t)=>{let{formItemCls:n}=e;return{[n]:{[`${n}-label > label`]:{height:t},[`${n}-control-input`]:{minHeight:t}}}},k8=e=>{let{componentCls:t}=e;return{[e.componentCls]:Object.assign(Object.assign(Object.assign({},so(e)),D8(e)),{[`${t}-text`]:{display:`inline-block`,paddingInlineEnd:e.paddingSM},"&-small":Object.assign({},O8(e,e.controlHeightSM)),"&-large":Object.assign({},O8(e,e.controlHeightLG))})}},A8=e=>{let{formItemCls:t,iconCls:n,rootPrefixCls:r,antCls:i,labelRequiredMarkColor:a,labelColor:o,labelFontSize:s,labelHeight:c,labelColonMarginInlineStart:l,labelColonMarginInlineEnd:u,itemMarginBottom:d}=e;return{[t]:Object.assign(Object.assign({},so(e)),{marginBottom:d,verticalAlign:`top`,"&-with-help":{transition:`none`},[`&-hidden,
|
||||
&-hidden${i}-row`]:{display:`none`},"&-has-warning":{[`${t}-split`]:{color:e.colorError}},"&-has-error":{[`${t}-split`]:{color:e.colorWarning}},[`${t}-label`]:{flexGrow:0,overflow:`hidden`,whiteSpace:`nowrap`,textAlign:`end`,verticalAlign:`middle`,"&-left":{textAlign:`start`},"&-wrap":{overflow:`unset`,lineHeight:e.lineHeight,whiteSpace:`unset`,"> label":{verticalAlign:`middle`,textWrap:`balance`}},"> label":{position:`relative`,display:`inline-flex`,alignItems:`center`,maxWidth:`100%`,height:c,color:o,fontSize:s,[`> ${n}`]:{fontSize:e.fontSize,verticalAlign:`top`},[`&${t}-required`]:{"&::before":{display:`inline-block`,marginInlineEnd:e.marginXXS,color:a,fontSize:e.fontSize,fontFamily:`SimSun, sans-serif`,lineHeight:1,content:`"*"`},[`&${t}-required-mark-hidden, &${t}-required-mark-optional`]:{"&::before":{display:`none`}}},[`${t}-optional`]:{display:`inline-block`,marginInlineStart:e.marginXXS,color:e.colorTextDescription,[`&${t}-required-mark-hidden`]:{display:`none`}},[`${t}-tooltip`]:{color:e.colorTextDescription,cursor:`help`,writingMode:`horizontal-tb`,marginInlineStart:e.marginXXS},"&::after":{content:`":"`,position:`relative`,marginBlock:0,marginInlineStart:l,marginInlineEnd:u},[`&${t}-no-colon::after`]:{content:`"\\a0"`}}},[`${t}-control`]:{"--ant-display":`flex`,flexDirection:`column`,flexGrow:1,[`&:first-child:not([class^="'${r}-col-'"]):not([class*="' ${r}-col-'"])`]:{width:`100%`},"&-input":{position:`relative`,display:`flex`,alignItems:`center`,minHeight:e.controlHeight,"&-content":{flex:`auto`,maxWidth:`100%`,[`&:has(> ${i}-switch:only-child, > ${i}-rate:only-child)`]:{display:`flex`,alignItems:`center`}}}},[t]:{"&-additional":{display:`flex`,flexDirection:`column`},"&-explain, &-extra":{clear:`both`,color:e.colorTextDescription,fontSize:e.fontSize,lineHeight:e.lineHeight},"&-explain-connected":{width:`100%`},"&-extra":{minHeight:e.controlHeightSM,transition:`color ${e.motionDurationMid} ${e.motionEaseOut}`},"&-explain":{"&-error":{color:e.colorError},"&-warning":{color:e.colorWarning}}},[`&-with-help ${t}-explain`]:{height:`auto`,opacity:1},[`${t}-feedback-icon`]:{fontSize:e.fontSize,textAlign:`center`,visibility:`visible`,animationName:Bd,animationDuration:e.motionDurationMid,animationTimingFunction:e.motionEaseOutBack,pointerEvents:`none`,"&-success":{color:e.colorSuccess},"&-error":{color:e.colorError},"&-warning":{color:e.colorWarning},"&-validating":{color:e.colorPrimary}}})}},j8=e=>({padding:e.verticalLabelPadding,margin:e.verticalLabelMargin,whiteSpace:`initial`,textAlign:`start`,"> label":{margin:0,"&::after":{visibility:`hidden`}}}),M8=e=>{let{antCls:t,formItemCls:n}=e;return{[`${n}-horizontal`]:{[`${n}-label`]:{flexGrow:0},[`${n}-control`]:{flex:`1 1 0`,minWidth:0},[`${n}-label[class$='-24'], ${n}-label[class*='-24 ']`]:{[`& + ${n}-control`]:{minWidth:`unset`}},[`${t}-col-24${n}-label,
|
||||
${t}-col-xl-24${n}-label`]:j8(e)}}},N8=e=>{let{componentCls:t,formItemCls:n,inlineItemMarginBottom:r}=e;return{[`${t}-inline`]:{display:`flex`,flexWrap:`wrap`,[`${n}-inline`]:{flex:`none`,marginInlineEnd:e.margin,marginBottom:r,"&-row":{flexWrap:`nowrap`},[`> ${n}-label,
|
||||
> ${n}-control`]:{display:`inline-block`,verticalAlign:`top`},[`> ${n}-label`]:{flex:`none`},[`${t}-text`]:{display:`inline-block`},[`${n}-has-feedback`]:{display:`inline-block`}}}}},P8=e=>{let{componentCls:t,formItemCls:n,rootPrefixCls:r}=e;return{[`${n} ${n}-label`]:j8(e),[`${t}:not(${t}-inline)`]:{[n]:{flexWrap:`wrap`,[`${n}-label, ${n}-control`]:{[`&:not([class*=" ${r}-col-xs"])`]:{flex:`0 0 100%`,maxWidth:`100%`}}}}}},F8=e=>{let{componentCls:t,formItemCls:n,antCls:r}=e;return{[`${n}-vertical`]:{[`${n}-row`]:{flexDirection:`column`},[`${n}-label > label`]:{height:`auto`},[`${n}-control`]:{width:`100%`},[`${n}-label,
|
||||
${r}-col-24${n}-label,
|
||||
${r}-col-xl-24${n}-label`]:j8(e)},[`@media (max-width: ${Q(e.screenXSMax)})`]:[P8(e),{[t]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-xs-24${n}-label`]:j8(e)}}}],[`@media (max-width: ${Q(e.screenSMMax)})`]:{[t]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-sm-24${n}-label`]:j8(e)}}},[`@media (max-width: ${Q(e.screenMDMax)})`]:{[t]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-md-24${n}-label`]:j8(e)}}},[`@media (max-width: ${Q(e.screenLGMax)})`]:{[t]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-lg-24${n}-label`]:j8(e)}}}}},I8=e=>({labelRequiredMarkColor:e.colorError,labelColor:e.colorTextHeading,labelFontSize:e.fontSize,labelHeight:e.controlHeight,labelColonMarginInlineStart:e.marginXXS/2,labelColonMarginInlineEnd:e.marginXS,itemMarginBottom:e.marginLG,verticalLabelPadding:`0 0 ${e.paddingXS}px`,verticalLabelMargin:0,inlineItemMarginBottom:0}),L8=(e,t)=>La(e,{formItemCls:`${e.componentCls}-item`,rootPrefixCls:t}),R8=_o(`Form`,(e,{rootPrefixCls:t})=>{let n=L8(e,t);return[k8(n),A8(n),E8(n),M8(n),N8(n),F8(n),hd(n),Bd]},I8,{order:-1e3}),z8=[];function B8(e,t,n,r=0){return{key:typeof e==`string`?e:`${t}-${r}`,error:e,errorStatus:n}}var V8=({help:e,helpStatus:t,errors:n=z8,warnings:r=z8,className:i,fieldId:a,onVisibleChanged:o})=>{let{prefixCls:c}=s.useContext(bh),l=`${c}-item-explain`,u=Rc(c),[d,f,p]=R8(c,u),m=s.useMemo(()=>lu(c),[c]),g=T8(n),_=T8(r),v=s.useMemo(()=>e==null?[].concat(X(g.map((e,t)=>B8(e,`error`,`error`,t))),X(_.map((e,t)=>B8(e,`warning`,`warning`,t)))):[B8(e,`help`,t)],[e,t,g,_]),y=s.useMemo(()=>{let e={};return v.forEach(({key:t})=>{e[t]=(e[t]||0)+1}),v.map((t,n)=>Object.assign(Object.assign({},t),{key:e[t.key]>1?`${t.key}-fallback-${n}`:t.key}))},[v]),b={};return a&&(b.id=`${a}_help`),d(s.createElement(vs,{motionDeadline:m.motionDeadline,motionName:`${c}-show-help`,visible:!!y.length,onVisibleChanged:o},e=>{let{className:t,style:n}=e;return s.createElement(`div`,Object.assign({},b,{className:(0,h.default)(l,t,p,u,i,f),style:n}),s.createElement(_s,Object.assign({keys:y},lu(c),{motionName:`${c}-show-help-item`,component:!1}),e=>{let{key:t,error:n,errorStatus:r,className:i,style:a}=e;return s.createElement(`div`,{key:t,className:(0,h.default)(i,{[`${l}-${r}`]:r}),style:a},n)}))}))},H8=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},U8=s.forwardRef((e,t)=>{let n=s.useContext(va),{getPrefixCls:r,direction:i,requiredMark:a,colon:o,scrollToFirstError:c,className:l,style:u}=ma(`form`),{prefixCls:d,className:f,rootClassName:p,size:m,disabled:g=n,form:_,colon:v,labelAlign:y,labelWrap:b,labelCol:x,wrapperCol:S,hideRequiredMark:C,layout:w=`horizontal`,scrollToFirstError:T,requiredMark:E,onFinishFailed:D,name:O,style:k,feedbackIcons:A,variant:j}=e,M=H8(e,[`prefixCls`,`className`,`rootClassName`,`size`,`disabled`,`form`,`colon`,`labelAlign`,`labelWrap`,`labelCol`,`wrapperCol`,`hideRequiredMark`,`layout`,`scrollToFirstError`,`requiredMark`,`onFinishFailed`,`name`,`style`,`feedbackIcons`,`variant`]),N=Su(m),P=s.useContext(Lr),F=s.useMemo(()=>E===void 0?C?!1:a===void 0||a:E,[C,E,a]),I=v??o,L=r(`form`,d),R=Rc(L),[z,B,V]=R8(L,R),H=(0,h.default)(L,`${L}-${w}`,{[`${L}-hide-required-mark`]:F===!1,[`${L}-rtl`]:i===`rtl`,[`${L}-${N}`]:N},V,R,B,l,f,p),[U]=i3(_),{__INTERNAL__:W}=U;W.name=O;let G=s.useMemo(()=>({name:O,labelAlign:y,labelCol:x,labelWrap:b,wrapperCol:S,layout:w,colon:I,requiredMark:F,itemRef:W.itemRef,form:U,feedbackIcons:A}),[O,y,x,S,w,I,F,U,A]),K=s.useRef(null);s.useImperativeHandle(t,()=>Object.assign(Object.assign({},U),{nativeElement:K.current?.nativeElement}));let q=(e,t)=>{if(e){let n={block:`nearest`};typeof e==`object`&&(n=Object.assign(Object.assign({},n),e)),U.scrollToField(t,n)}};return z(s.createElement(Ch.Provider,{value:j},s.createElement(ya,{disabled:g},s.createElement(ba.Provider,{value:N},s.createElement(yh,{validateMessages:P},s.createElement(_h.Provider,{value:G},s.createElement(Sh,{status:!0},s.createElement(gh,Object.assign({id:O},M,{name:O,onFinishFailed:e=>{if(D?.(e),e.errorFields.length){let t=e.errorFields[0].name;if(T!==void 0){q(T,t);return}c!==void 0&&q(c,t)}},form:U,ref:K,style:Object.assign(Object.assign({},u),k),className:H})))))))))});function W8(e){if(typeof e==`function`)return e;let t=g(e);return t.length<=1?t[0]:t}var G8=()=>{let{status:e,errors:t=[],warnings:n=[]}=s.useContext(xh);return{status:e,errors:t,warnings:n}};G8.Context=xh;function K8(e){let[t,n]=s.useState(e),r=s.useRef(null),i=s.useRef([]),a=s.useRef(!1);s.useEffect(()=>(a.current=!1,()=>{a.current=!0,$e.cancel(r.current),r.current=null}),[]);function o(e){a.current||(r.current===null&&(i.current=[],r.current=$e(()=>{r.current=null,n(e=>{let t=e;return i.current.forEach(e=>{t=e(t)}),t})})),i.current.push(e))}return[t,o]}function q8
Line truncated
|
||||
min-height:0 !important;
|
||||
max-height:none !important;
|
||||
height:0 !important;
|
||||
visibility:hidden !important;
|
||||
overflow:hidden !important;
|
||||
position:absolute !important;
|
||||
z-index:-1000 !important;
|
||||
top:0 !important;
|
||||
right:0 !important;
|
||||
pointer-events: none !important;
|
||||
`,Ix=[`letter-spacing`,`line-height`,`padding-top`,`padding-bottom`,`font-family`,`font-weight`,`font-size`,`font-variant`,`text-rendering`,`text-transform`,`width`,`text-indent`,`padding-left`,`padding-right`,`border-width`,`box-sizing`,`word-break`,`white-space`],Lx={},Rx;function zx(e){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n=e.getAttribute(`id`)||e.getAttribute(`data-reactid`)||e.getAttribute(`name`);if(t&&Lx[n])return Lx[n];var r=window.getComputedStyle(e),i=r.getPropertyValue(`box-sizing`)||r.getPropertyValue(`-moz-box-sizing`)||r.getPropertyValue(`-webkit-box-sizing`),a=parseFloat(r.getPropertyValue(`padding-bottom`))+parseFloat(r.getPropertyValue(`padding-top`)),o=parseFloat(r.getPropertyValue(`border-bottom-width`))+parseFloat(r.getPropertyValue(`border-top-width`)),s={sizingStyle:Ix.map(function(e){return`${e}:${r.getPropertyValue(e)}`}).join(`;`),paddingSize:a,borderSize:o,boxSizing:i};return t&&n&&(Lx[n]=s),s}function Bx(e){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;Rx||(Rx=document.createElement(`textarea`),Rx.setAttribute(`tab-index`,`-1`),Rx.setAttribute(`aria-hidden`,`true`),Rx.setAttribute(`name`,`hiddenTextarea`),document.body.appendChild(Rx)),e.getAttribute(`wrap`)?Rx.setAttribute(`wrap`,e.getAttribute(`wrap`)):Rx.removeAttribute(`wrap`);var i=zx(e,t),a=i.paddingSize,o=i.borderSize,s=i.boxSizing,c=i.sizingStyle;Rx.setAttribute(`style`,`${c};${Fx}`),Rx.value=e.value||e.placeholder||``;var l=void 0,u=void 0,d,f=Rx.scrollHeight;if(s===`border-box`?f+=o:s===`content-box`&&(f-=a),n!==null||r!==null){Rx.value=` `;var p=Rx.scrollHeight-a;n!==null&&(l=p*n,s===`border-box`&&(l=l+a+o),f=Math.max(l,f)),r!==null&&(u=p*r,s===`border-box`&&(u=u+a+o),d=f>u?``:`hidden`,f=Math.min(u,f))}var m={height:f,overflowY:d,resize:`none`};return l&&(m.minHeight=l),u&&(m.maxHeight=u),m}var Vx=[`prefixCls`,`defaultValue`,`value`,`autoSize`,`onResize`,`className`,`style`,`disabled`,`onChange`,`onInternalAutoSize`],Hx=0,Ux=1,Wx=2,Gx=s.forwardRef(function(e,t){var n=e,r=n.prefixCls,i=n.defaultValue,a=n.value,o=n.autoSize,u=n.onResize,d=n.className,f=n.style,p=n.disabled,m=n.onChange;n.onInternalAutoSize;var g=yt(n,Vx),_=Z(Na(i,{value:a,postState:function(e){return e??``}}),2),v=_[0],y=_[1],b=function(e){y(e.target.value),m?.(e)},x=s.useRef();s.useImperativeHandle(t,function(){return{textArea:x.current}});var S=Z(s.useMemo(function(){return o&&l(o)===`object`?[o.minRows,o.maxRows]:[]},[o]),2),C=S[0],w=S[1],T=!!o,D=Z(s.useState(Wx),2),k=D[0],A=D[1],j=Z(s.useState(),2),M=j[0],N=j[1],P=function(){A(Hx)};qt(function(){T&&P()},[a,C,w,T]),qt(function(){if(k===Hx)A(Ux);else if(k===Ux){var e=Bx(x.current,!1,C,w);A(Wx),N(e)}},[k]);var F=s.useRef(),I=function(){$e.cancel(F.current)},L=function(e){k===Wx&&(u?.(e),o&&(I(),F.current=$e(function(){P()})))};s.useEffect(function(){return I},[]);var R=T?M:null,z=O(O({},f),R);return(k===Hx||k===Ux)&&(z.overflowY=`hidden`,z.overflowX=`hidden`),s.createElement(Ue,{onResize:L,disabled:!(o||u)},s.createElement(`textarea`,c({},g,{ref:x,style:z,className:(0,h.default)(r,d,E({},`${r}-disabled`,p)),disabled:p,value:v,onChange:b})))}),Kx=[`defaultValue`,`value`,`onFocus`,`onBlur`,`onChange`,`allowClear`,`maxLength`,`onCompositionStart`,`onCompositionEnd`,`suffix`,`prefixCls`,`showCount`,`count`,`className`,`style`,`disabled`,`hidden`,`classNames`,`styles`,`onResize`,`onClear`,`onPressEnter`,`readOnly`,`autoSize`,`onKeyDown`],qx=s.forwardRef(function(e,t){var n=e.defaultValue,r=e.value,i=e.onFocus,a=e.onBlur,o=e.onChange,l=e.allowClear,u=e.maxLength,d=e.onCompositionStart,f=e.onCompositionEnd,p=e.suffix,m=e.prefixCls,g=m===void 0?`rc-textarea`:m,_=e.showCount,v=e.count,y=e.className,b=e.style,x=e.disabled,S=e.hidden,C=e.classNames,w=e.styles,T=e.onResize,D=e.onClear,k=e.onPressEnter,A=e.readOnly,j=e.autoSize,M=e.onKeyDown,N=yt(e,Kx),P=Z(Na(n,{value:r,defaultValue:n}),2),F=P[0],I=P[1],L=F==null?``:String(F),R=Z(s.useState(!1),2),z=R[0],B=R[1],V=s.useRef(!1),H=Z(s.useState(null),2),U=H[0],W=H[1],G=(0,s.useRef)(null),K=(0,s.useRef)(null),q=function(){return K.current?.textArea},ee=function(){q().focus()};(0,s.useImperativeHandle)(t,function(){return{resizableTextArea:K.current,focus:ee,blur:function(){q().blur()},nativeElement:G.current?.nativeElement||q()}}),(0,s.useEffect)(function(){B(function(e){return!x&&e})},[x]);var J=Z(s.useState(null),2),Y=J[0],te=J[1];s.useEffect(function(){if(Y){var e;(e=q()).setSelectionRange.apply(e,X(Y))}},[Y]);var ne=Pb(v,_),re=ne.max??u,ie=Number(re)>0,ae=ne.strategy(L),oe=!!re&&ae>re,se=function(e,t){var n=t;!V.current&&ne.exceedFormatter&&ne.max&&ne.strategy(t)>ne.max&&(n=ne.exceedFormatter(t,{max:ne.max}),t!==n&&te([q().selectionStart||0,q().selectionEnd||0])),I(n),Ab(e.currentTarget,e,o,n)},ce=function(e){V.current=!0,d?.(e)},le=function(e){V.current=!1,se(e,e.currentTarget.value),f?.(e)},ue=function(
Line truncated
|
||||
&-allow-clear > ${t},
|
||||
&-affix-wrapper${r}-has-feedback ${t}
|
||||
`]:{paddingInlineEnd:n},[`&-affix-wrapper${t}-affix-wrapper`]:{padding:0,[`> textarea${t}`]:{fontSize:`inherit`,border:`none`,outline:`none`,background:`transparent`,minHeight:e.calc(e.controlHeight).sub(e.calc(e.lineWidth).mul(2)).equal(),"&:focus":{boxShadow:`none !important`}},[`${t}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${t}-clear-icon`]:{position:`absolute`,insetInlineEnd:e.paddingInline,insetBlockStart:e.paddingXS},[`${r}-suffix`]:{position:`absolute`,top:0,insetInlineEnd:e.paddingInline,bottom:0,zIndex:1,display:`inline-flex`,alignItems:`center`,margin:`auto`,pointerEvents:`none`}}},[`&-affix-wrapper${t}-affix-wrapper-rtl`]:{[`${t}-suffix`]:{[`${t}-data-count`]:{direction:`ltr`,insetInlineStart:0}}},[`&-affix-wrapper${t}-affix-wrapper-sm`]:{[`${t}-suffix`]:{[`${t}-clear-icon`]:{insetInlineEnd:e.paddingInlineSM}}}}}},Yx=_o([`Input`,`TextArea`],e=>Jx(La(e,u3(e))),d3,{resetFont:!1}),Xx=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},Zx=(0,s.forwardRef)((e,t)=>{let{prefixCls:n,bordered:r=!0,size:i,disabled:a,status:o,allowClear:c,classNames:l,rootClassName:u,className:d,style:f,styles:p,variant:m,showCount:g,onMouseDown:_,onResize:v}=e,y=Xx(e,[`prefixCls`,`bordered`,`size`,`disabled`,`status`,`allowClear`,`classNames`,`rootClassName`,`className`,`style`,`styles`,`variant`,`showCount`,`onMouseDown`,`onResize`]),{getPrefixCls:b,direction:x,allowClear:S,autoComplete:C,className:w,style:T,classNames:E,styles:D}=ma(`textArea`),O=s.useContext(va),k=a??O,{status:A,hasFeedback:j,feedbackIcon:M}=s.useContext(xh),N=dv(A,o),P=s.useRef(null);s.useImperativeHandle(t,()=>({resizableTextArea:P.current?.resizableTextArea,focus:e=>{jb(P.current?.resizableTextArea?.textArea,e)},blur:()=>P.current?.blur()}));let F=b(`input`,n),I=Rc(F),[L,R,z]=z3(F,u),[B]=Yx(F,I),{compactSize:V,compactItemClassnames:H}=Du(F,x),U=Su(e=>i??V??e),[W,G]=xv(`textArea`,m,r),K=Lb(c??S),[q,ee]=s.useState(!1),[J,Y]=s.useState(!1),te=e=>{ee(!0),_?.(e);let t=()=>{ee(!1),document.removeEventListener(`mouseup`,t)};document.addEventListener(`mouseup`,t)},ne=e=>{if(v?.(e),q&&typeof getComputedStyle==`function`){let e=(P.current?.nativeElement)?.querySelector(`textarea`);e&&getComputedStyle(e).resize===`both`&&Y(!0)}};return L(B(s.createElement(qx,Object.assign({autoComplete:C},y,{style:Object.assign(Object.assign({},T),f),styles:Object.assign(Object.assign({},D),p),disabled:k,allowClear:K,className:(0,h.default)(z,I,d,u,H,w,J&&`${F}-textarea-affix-wrapper-resize-dirty`),classNames:Object.assign(Object.assign(Object.assign({},l),E),{textarea:(0,h.default)({[`${F}-sm`]:U===`small`,[`${F}-lg`]:U===`large`},R,l?.textarea,E.textarea,q&&`${F}-mouse-active`),variant:(0,h.default)({[`${F}-${W}`]:G},uv(F,N)),affixWrapper:(0,h.default)(`${F}-textarea-affix-wrapper`,{[`${F}-affix-wrapper-rtl`]:x===`rtl`,[`${F}-affix-wrapper-sm`]:U===`small`,[`${F}-affix-wrapper-lg`]:U===`large`,[`${F}-textarea-show-count`]:g||e.count?.show},R)}),prefixCls:F,suffix:j&&s.createElement(`span`,{className:`${F}-textarea-suffix`},M),showCount:g,ref:P,onResize:ne,onMouseDown:te}))))}),Qx=Vb;Qx.Group=vx,Qx.Search=Px,Qx.TextArea=Zx,Qx.Password=Mx,Qx.OTP=Ex;var $x=100,e5=$x/5,t5=$x/2-e5/2,n5=80*Math.PI,r5=50,i5=e=>{let{dotClassName:t,style:n,hasCircleCls:r}=e;return s.createElement(`circle`,{className:(0,h.default)(`${t}-circle`,{[`${t}-circle-bg`]:r}),r:t5,cx:r5,cy:r5,strokeWidth:e5,style:n})},a5=({percent:e,prefixCls:t})=>{let n=`${t}-dot`,r=`${n}-holder`,i=`${r}-hidden`,[a,o]=s.useState(!1);qt(()=>{e!==0&&o(!0)},[e!==0]);let c=Math.max(Math.min(e,100),0);if(!a)return null;let l={strokeDashoffset:`${n5/4}`,strokeDasharray:`${n5*c/100} ${n5*(100-c)/100}`};return s.createElement(`span`,{className:(0,h.default)(r,`${n}-progress`,c<=0&&i)},s.createElement(`svg`,{viewBox:`0 0 ${$x} ${$x}`,role:`progressbar`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":c},s.createElement(i5,{dotClassName:n,hasCircleCls:!0}),s.createElement(i5,{dotClassName:n,style:l})))};function o5(e){let{prefixCls:t,percent:n=0}=e,r=`${t}-dot`,i=`${r}-holder`,a=`${i}-hidden`;return s.createElement(s.Fragment,null,s.createElement(`span`,{className:(0,h.default)(i,n>0&&a)},s.createElement(`span`,{className:(0,h.default)(r,`${t}-dot-spin`)},[1,2,3,4].map(e=>s.createElement(`i`,{className:`${t}-dot-item`,key:e})))),s.createElement(a5,{prefixCls:t,percent:n}))}function s5(e){let{prefixCls:t,indicator:n,percent:r}=e,i=`${t}-dot`;return n&&s.isValidElement(n)?gc(n,{className:(0,h.default)(n.props?.className,i),percent:r}):s.createElement(o5,{prefixCls:t,percent:r})}var c5=new Cr(`antSpinMove`,{to:{opacity:1}}),l5=new Cr(`antRotate`,{to:{transform:`rotate(405deg)`}}),u5=e=>{let{componentCls:t,calc:n}=e;return{[t]:Object.a
Line truncated
|
||||
h${t}&,
|
||||
div&-h${t},
|
||||
div&-h${t} > textarea,
|
||||
h${t}
|
||||
`]=h7(e[`fontSizeHeading${t}`],e[`lineHeightHeading${t}`],e.colorTextHeading,e)}),n},_7=e=>{let{componentCls:t}=e;return{"a&, a":Object.assign(Object.assign({},go(e)),{userSelect:`text`,[`&[disabled], &${t}-disabled`]:{color:e.colorTextDisabled,cursor:`not-allowed`,"&:active, &:hover":{color:e.colorTextDisabled},"&:active":{pointerEvents:`none`}}})}},v7=e=>({code:{margin:`0 0.2em`,paddingInline:`0.4em`,paddingBlock:`0.2em 0.1em`,fontSize:`85%`,fontFamily:e.fontFamilyCode,background:`rgba(150, 150, 150, 0.1)`,border:`1px solid rgba(100, 100, 100, 0.2)`,borderRadius:3},kbd:{margin:`0 0.2em`,paddingInline:`0.4em`,paddingBlock:`0.15em 0.1em`,fontSize:`90%`,fontFamily:e.fontFamilyCode,background:`rgba(150, 150, 150, 0.06)`,border:`1px solid rgba(100, 100, 100, 0.2)`,borderBottomWidth:2,borderRadius:3},mark:{padding:0,backgroundColor:Ci[2]},"u, ins":{textDecoration:`underline`,textDecorationSkipInk:`auto`},"s, del":{textDecoration:`line-through`},strong:{fontWeight:e.fontWeightStrong},"ul, ol":{marginInline:0,marginBlock:`0 1em`,padding:0,li:{marginInline:`20px 0`,marginBlock:0,paddingInline:`4px 0`,paddingBlock:0}},ul:{listStyleType:`circle`,ul:{listStyleType:`disc`}},ol:{listStyleType:`decimal`},"pre, blockquote":{margin:`1em 0`},pre:{padding:`0.4em 0.6em`,whiteSpace:`pre-wrap`,wordWrap:`break-word`,background:`rgba(150, 150, 150, 0.1)`,border:`1px solid rgba(100, 100, 100, 0.2)`,borderRadius:3,fontFamily:e.fontFamilyCode,code:{display:`inline`,margin:0,padding:0,fontSize:`inherit`,fontFamily:`inherit`,background:`transparent`,border:0}},blockquote:{paddingInline:`0.6em 0`,paddingBlock:0,borderInlineStart:`4px solid rgba(100, 100, 100, 0.2)`,opacity:.85}}),y7=e=>{let{componentCls:t,paddingSM:n}=e,r=n;return{"&-edit-content":{position:`relative`,"div&":{insetInlineStart:e.calc(e.paddingSM).mul(-1).equal(),insetBlockStart:e.calc(r).div(-2).add(1).equal(),marginBottom:e.calc(r).div(2).sub(2).equal()},[`${t}-edit-content-confirm`]:{position:`absolute`,insetInlineEnd:e.calc(e.marginXS).add(2).equal(),insetBlockEnd:e.marginXS,color:e.colorIcon,fontWeight:`normal`,fontSize:e.fontSize,fontStyle:`normal`,pointerEvents:`none`},textarea:{margin:`0!important`,MozTransition:`none`,height:`1em`}}}},b7=e=>({[`${e.componentCls}-copy-success`]:{"\n &,\n &:hover,\n &:focus":{color:e.colorSuccess}},[`${e.componentCls}-copy-icon-only`]:{marginInlineStart:0}}),x7=()=>({"\n a&-ellipsis,\n span&-ellipsis\n ":{display:`inline-block`,maxWidth:`100%`},"&-ellipsis-single-line":{whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,"a&, span&":{verticalAlign:`bottom`},"> code":{paddingBlock:0,maxWidth:`calc(100% - 1.2em)`,display:`inline-block`,overflow:`hidden`,textOverflow:`ellipsis`,verticalAlign:`bottom`,boxSizing:`content-box`}},"&-ellipsis-multiple-line":{display:`-webkit-box`,overflow:`hidden`,WebkitLineClamp:3,WebkitBoxOrient:`vertical`}}),S7=_o(`Typography`,e=>{let{componentCls:t,titleMarginTop:n}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:e.colorText,wordBreak:`break-word`,lineHeight:e.lineHeight,[`&${t}-secondary`]:{color:e.colorTextDescription},[`&${t}-success`]:{color:e.colorSuccessText},[`&${t}-warning`]:{color:e.colorWarningText},[`&${t}-danger`]:{color:e.colorErrorText,"a&:active, a&:focus":{color:e.colorErrorTextActive},"a&:hover":{color:e.colorErrorTextHover}},[`&${t}-disabled`]:{color:e.colorTextDisabled,cursor:`not-allowed`,userSelect:`none`},"\n div&,\n p\n ":{marginBottom:`1em`}},g7(e)),{[`
|
||||
& + h1${t},
|
||||
& + h2${t},
|
||||
& + h3${t},
|
||||
& + h4${t},
|
||||
& + h5${t}
|
||||
`]:{marginTop:n},"\n div,\n ul,\n li,\n p,\n h1,\n h2,\n h3,\n h4,\n h5":{"\n + h1,\n + h2,\n + h3,\n + h4,\n + h5\n ":{marginTop:n}}}),v7(e)),_7(e)),{[`
|
||||
${t}-expand,
|
||||
${t}-collapse,
|
||||
${t}-edit,
|
||||
${t}-copy
|
||||
`]:Object.assign(Object.assign({},go(e)),{marginInlineStart:e.marginXXS})}),y7(e)),b7(e)),x7()),{"&-rtl":{direction:`rtl`}})}},()=>({titleMarginTop:`1.2em`,titleMarginBottom:`0.5em`})),C7=e=>{let{prefixCls:t,"aria-label":n,className:r,style:i,direction:a,maxLength:o,autoSize:c=!0,value:l,onSave:u,onCancel:d,onEnd:f,component:p,enterIcon:m=s.createElement(m7,null)}=e,g=s.useRef(null),_=s.useRef(!1),v=s.useRef(null),[y,b]=s.useState(l);s.useEffect(()=>{b(l)},[l]),s.useEffect(()=>{if(g.current?.resizableTextArea){let{textArea:e}=g.current.resizableTextArea;e.focus();let{length:t}=e.value;e.setSelectionRange(t,t)}},[]);let x=({target:e})=>{b(e.value.replace(/[\n\r]/g,``))},S=()=>{_.current=!0},C=()=>{_.current=!1},w=({keyCode:e})=>{_.current||(v.current=e)},T=()=>{u(y.trim())},E=({keyCode:e,ctrlKey:t,altKey:n,metaKey:r,shiftKey:i})=>{v.current!==e||_.current||t||n||r||i||(e===$.ENTER?(T(),f?.()):e===$.ESC&&d())},D=()=>{T()},[O,k,A]=S7(t),j=(0,h.default)(t,`${t}-edit-content`,{[`${t}-rtl`]:a===`rtl`,[`${t}-${p}`]:!!p},r,k,A);return O(s.createElement(`div`,{className:j,style:i},s.createElement(Zx,{ref:g,maxLength:o,value:y,onChange:x,onKeyDown:w,onKeyUp:E,onCompositionStart:S,onCompositionEnd:C,onBlur:D,"aria-label":n,rows:1,autoSize:c}),m===null?null:gc(m,{className:`${t}-edit-content-confirm`})))},w7=t(((e,t)=>{t.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case`INPUT`:case`TEXTAREA`:t.blur();break;default:t=null}return e.removeAllRanges(),function(){e.type===`Caret`&&e.removeAllRanges(),e.rangeCount||n.forEach(function(t){e.addRange(t)}),t&&t.focus()}}})),T7=e(t(((e,t)=>{var n=w7(),r={"text/plain":`Text`,"text/html":`Url`,default:`Text`},i=`Copy to clipboard: #{key}, Enter`;function a(e){var t=(/mac os x/i.test(navigator.userAgent)?`⌘`:`Ctrl`)+`+C`;return e.replace(/#{\s*key\s*}/g,t)}t.exports=function(e,t){var o,s,c,l,u,d,f=!1;t||={},o=t.debug||!1;try{if(c=n(),l=document.createRange(),u=document.getSelection(),d=document.createElement(`span`),d.textContent=e,d.ariaHidden=`true`,d.style.all=`unset`,d.style.position=`fixed`,d.style.top=0,d.style.clip=`rect(0, 0, 0, 0)`,d.style.whiteSpace=`pre`,d.style.webkitUserSelect=`text`,d.style.MozUserSelect=`text`,d.style.msUserSelect=`text`,d.style.userSelect=`text`,d.addEventListener(`copy`,function(n){if(n.stopPropagation(),t.format){if(n.preventDefault(),n.clipboardData===void 0){o&&console.warn(`unable to use e.clipboardData`),o&&console.warn(`trying IE specific stuff`),window.clipboardData.clearData();var i=r[t.format]||r.default;window.clipboardData.setData(i,e)}else n.clipboardData.clearData(),n.clipboardData.setData(t.format,e)}t.onCopy&&(n.preventDefault(),t.onCopy(n.clipboardData))}),document.body.appendChild(d),l.selectNodeContents(d),u.addRange(l),!document.execCommand(`copy`))throw Error(`copy command was unsuccessful`);f=!0}catch(n){o&&console.error(`unable to copy using execCommand: `,n),o&&console.warn(`trying IE specific stuff`);try{window.clipboardData.setData(t.format||`text`,e),t.onCopy&&t.onCopy(window.clipboardData),f=!0}catch(n){o&&console.error(`unable to copy using clipboardData: `,n),o&&console.error(`falling back to prompt`),s=a(`message`in t?t.message:i),window.prompt(s,e)}}finally{u&&(typeof u.removeRange==`function`?u.removeRange(l):u.removeAllRanges()),d&&document.body.removeChild(d),c()}return f}}))()),E7=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},D7=({copyConfig:e,children:t})=>{let[n,r]=s.useState(!1),[i,a]=s.useState(!1),o=s.useRef(null),c=()=>{o.current&&clearTimeout(o.current)},l={};return e.format&&(l.format=e.format),s.useEffect(()=>c,[]),{copied:n,copyLoading:i,onClick:Aa(n=>E7(void 0,void 0,void 0,function*(){var i;n?.preventDefault(),n?.stopPropagation(),a(!0);try{let s=typeof e.text==`function`?yield e.text():e.text;(0,T7.default)(s||y5(t,!0).join(``)||``,l),a(!1),r(!0),c(),o.current=setTimeout(()=>{r(!1)},3e3),(i=e.onCopy)==null||i.call(e,n)}catch(e){throw a(!1),e}}))}};function O7(e,t){return s.useMemo(()=>{let n=!!e;return[n,Object.assign(Object.assign({},t),n&&typeof e==`object`?e:null)]},[e])}var k7=e=>{let t=(0,s.useRef)(void 0);return(0,s.useEffect)(()=>{t.current=e}),t.current},A7=(e,t,n)=>(0,s.useMemo)(()=>e===!0?{title:t??n}:(0,s.isValidElement)(e)?{title:e}:typeof e==`object`?Object.assign({title:t??n},e):{title:e},[e,t,n]),j7=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnume
Line truncated
|
||||
+1
@@ -0,0 +1 @@
|
||||
import{n as e}from"./rolldown-runtime-Dl_DZoUm.js";import{i as t,t as n}from"./react-1o5M9n0k.js";var r=e(t(),1),i=n();function a({label:e,...t}){return(0,i.jsxs)(`label`,{children:[e,(0,i.jsx)(`input`,{type:`text`,...t})]})}function o({label:e,options:t,...n}){return(0,i.jsxs)(`label`,{children:[e,(0,i.jsx)(`select`,{...n,children:t.map(([e,t])=>(0,i.jsx)(`option`,{value:e,children:t},e))})]})}function s({action:e,...t}){return(0,i.jsx)(`button`,{type:`button`,"data-action":e,...t})}function c({id:e,labelledBy:t,close:n,children:a}){let o=(0,r.useRef)(null);return(0,r.useLayoutEffect)(()=>{let e=o.current;return e.showModal(),e.querySelector(`input:not([type=checkbox])`)?.focus(),()=>e.close()},[]),(0,i.jsx)(`dialog`,{ref:o,id:e,"aria-labelledby":t,onCancel:e=>{e.preventDefault(),n()},children:a})}export{a as i,o as n,c as r,s as t};
|
||||
+1
@@ -0,0 +1 @@
|
||||
import{n as e}from"./rolldown-runtime-Dl_DZoUm.js";import{i as t}from"./react-1o5M9n0k.js";import{c as n,o as r}from"./shared-DZLPF0cC.js";var i=e(t(),1),a={increase:`增加`,decrease:`减少`,transfer:`平移`,adjustment:`调整`},o={pending:`待店主审批`,approved:`已批准`,rejected:`已驳回`},s=(e,t)=>e.pocketCatalog?.find(e=>e.key===t)?.name||t,c=(e,t)=>t&&[`助理`,`助理1`,`助理2`].includes(t)?r.memberName(e,t===`助理2`?`assistant2`:`assistant`):t;function l(e,t=!1,n=`未记录对数`){return e!=null&&Number.isSafeInteger(e)?(t&&e>0?`+`:``)+e+`对`:n}function u(e,t=!1,n=!1,r=!1,i=`库存数量(对)`){let a=e.trim();if(!a&&n)return null;let o=Number(a);if(t?!/^-?\d+$/.test(a)||!o||Math.abs(o)>1e9:!/^\d+$/.test(a)||o>1e9||o<+!r)throw Error(i+(t?`请填写非0整数,增加填正数,减少填负数。`:r?`请填写非负整数,一对填1。`:`请填写大于0的整数,一对填1。`));return o}function d(e){let t=new Date(e);return Number.isNaN(+t)?`时间未提供`:t.toLocaleString(`zh-CN`,{timeZone:`Asia/Shanghai`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,hour12:!1})}var f=e=>e.source===`automatic`?`系统自动保存`:!e.source||e.source===`manual`?`店主复核`:`已保存`,p=n.validDate;function m(e,t,n,r){let[a,o]=(0,i.useState)();return(0,i.useEffect)(()=>{if(!t)return;let i=!0,a=t;async function s(){try{let t=await e.api(a);r?.(t),i&&o({url:a,version:n,value:t})}catch(e){i&&o({url:a,version:n,error:e.name===`AbortError`?`读取超时,请重新读取。`:e.message})}}return s(),()=>{i=!1}},[e,t,n,r]),a?.url===t&&a?.version===n?a:void 0}export{a,o as c,p as i,d as l,l as n,s as o,u as r,f as s,c as t,m as u};
|
||||
+1
@@ -0,0 +1 @@
|
||||
.business-pages *{box-sizing:border-box}.business-pages button,.business-pages input,.business-pages select,.business-pages textarea{font:inherit}.business-pages button,.business-pages a{touch-action:manipulation}.business-pages button{border:1px solid var(--border);cursor:pointer;background:var(--white);color:var(--ink);border-radius:7px;padding:10px 16px;font-weight:600}.business-pages button:hover{border-color:var(--green);background:var(--soft)}.business-pages button:disabled{opacity:.45;cursor:wait}.business-pages button.primary{background:var(--green);color:#fff;border-color:var(--green)}.business-pages button.danger{color:var(--danger);border-color:#e1b7ac}.business-pages button.quiet{color:var(--muted);background:0 0;border:0}.business-pages a{color:var(--green)}.business-pages input,.business-pages select,.business-pages textarea{color:#26382f;background:#fff;border:1px solid #cfd5cc;border-radius:6px;width:100%;min-height:43px;padding:10px 11px}.business-pages input:focus,.business-pages select:focus,.business-pages textarea:focus{outline-offset:1px;outline:2px solid #b3c8ba}.business-pages input[type=checkbox]{vertical-align:middle;width:18px;min-height:18px;accent-color:var(--green)}.business-pages label{color:#566259;font-size:12px;display:block}.business-pages label>input,.business-pages label>select,.business-pages label>textarea{margin-top:6px;font-size:14px}.business-pages label.check{align-items:center;gap:10px;margin:14px 0;font-size:13px;display:flex}.business-pages h1,.business-pages h2,.business-pages h3,.business-pages p{margin-top:0}.business-pages h1{letter-spacing:1px;margin-bottom:6px;font-size:28px;font-weight:650}.business-pages h2{margin-bottom:15px;font-size:19px}.business-pages h3{font-size:15px}.business-pages .muted{color:var(--muted)}.business-pages .small{font-size:12px}.business-pages .eyebrow{text-transform:uppercase;letter-spacing:2px;color:var(--gold);margin-bottom:8px;font-size:11px;font-weight:700}.business-pages .app-header{background:var(--white);border-bottom:1px solid var(--border);justify-content:space-between;align-items:center;height:88px;padding:0 36px;display:flex}.business-pages .brand{align-items:center;gap:14px;display:flex}.business-pages .brand-mark{background:var(--green);color:#e7dcc2;border-radius:12px;place-items:center;width:44px;height:44px;font-family:serif;font-size:23px;display:grid}.business-pages .brand strong{letter-spacing:2px;font-size:19px}.business-pages .brand small{color:var(--muted);letter-spacing:1px;font-size:11px;display:block}.business-pages .header-right{align-items:center;gap:12px;display:flex}.business-pages .badge{white-space:nowrap;background:#e9efe7;border-radius:5px;padding:4px 9px;font-size:11px}.business-pages .badge.warn{color:#805617;background:#f6ead5}.business-pages .badge.danger{color:var(--danger);background:#f5e1dc}.business-pages .notice{color:#6d6149;background:#ede9df;padding:8px 36px;font-size:12px}.business-pages .app-body{grid-template-columns:195px minmax(0,1fr);min-height:calc(100vh - 165px);display:grid}.business-pages nav{border-right:1px solid var(--border);padding:30px 20px;position:relative}.business-pages nav button{text-align:left;background:0 0;border:0;width:100%;margin-bottom:8px;padding:13px 14px;font-weight:500;display:block}.business-pages nav button span{color:#9aa398;margin-right:10px;font-size:11px;display:inline-block}.business-pages nav button.active{background:var(--green);color:#fff}.business-pages nav button.active span{color:#c9d6cd}.business-pages .nav-foot{color:#92998d;margin:50px 12px;font-size:11px;line-height:1.8}.business-pages main{width:100%;max-width:1580px;margin:auto;padding:30px 38px 60px}.business-pages .page-heading{justify-content:space-between;align-items:center;gap:20px;margin-bottom:25px;display:flex}.business-pages .page-heading p{margin:0}.business-pages .panel{border:1px solid var(--border);background:var(--white);border-radius:12px;margin-bottom:20px;padding:24px}.business-pages .panel-title{justify-content:space-between;align-items:center;gap:20px;margin-bottom:18px;display:flex}.business-pages .panel-title h2{margin:0}.business-pages .grid{gap:16px;display:grid}.business-pages .grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.business-pages .grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}.business-pages .grid.four{grid-template-columns:repeat(4,minmax(0,1fr))}.business-pages .cards{grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:22px;display:grid}.business-pages .stat{background:var(--white);border:1px solid var(--border);border-radius:10px;padding:19px}.business-pages .stat small{color:var(--muted);font-size:12px;display:block}.business-pages .stat strong{font-variant-numeric:tabular-nums;margin:4px 0;font-size:24px;font-weight:600;display:block}.business-pages .stat.emphasis{background:var(--green);color:#fff}.business-pages .stat.emphasis small{color:#cad7ce}.business-pages .stat .hint{color:#8b9186;font-size:11px}.busLine truncated
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/LoginPage-CX3t9hjZ.js","assets/rolldown-runtime-Dl_DZoUm.js","assets/react-1o5M9n0k.js","assets/skeleton-B4Z0R3jQ.js","assets/input-BnsACfRy.js","assets/typography-xRg_3Gco.js","assets/LockOutlined-BPg5cH36.js","assets/style-CBKkTdLU.js","assets/CreateOrderPage-BLy-H99A.js","assets/shared-DZLPF0cC.js","assets/useOrderForm-Boa1k5nR.js","assets/ReloadOutlined-BW5sy5GM.js","assets/PrivateOperationsPage-Dt0WMdFg.js","assets/PrivateOperationsPage-HGYkEKhx.css","assets/TeamFundsPage-Cjv3cYok.js","assets/TeamFundsPage-T7MH64nM.css","assets/RecoveriesPage-C9NqVdnv.js","assets/data-eE5dxIXS.js","assets/printStatus-DCPEAOZ9.js","assets/materialQuote--cXNGK6N.js","assets/RecoveriesPage-CNMgujq2.css","assets/InventoryPage-Btie96xj.js","assets/InventoryPage-DAAeekf_.css","assets/OrderEditPage-CLphVWDl.js","assets/OrdersPage-DMGBXOU2.js","assets/EditFields-DxbwVQgn.js","assets/ReportPage-DCok_JsT.js","assets/controls-BREhiQGx.js","assets/settingsModel-DuLjBEgM.js","assets/ReportPage-B0x_zqSE.css","assets/MaterialPoolsPage-DMtE-RXk.js","assets/model-BDHsEKmI.js","assets/PriceLocksPage-kMjhMd0o.js","assets/LockOrderEditor-DfVkDfKb.js","assets/SettingsPage-Dc9e2OMZ.js","assets/SettingsPage-Cje4PJf7.css"])))=>i.map(i=>d[i]);
|
||||
import{n as e,t}from"./rolldown-runtime-Dl_DZoUm.js";import{i as n,n as r,r as i,t as a}from"./react-1o5M9n0k.js";import{$ as o,$t as s,B as c,C as l,Cn as u,Dn as d,En as f,F as p,Ft as m,G as h,Gt as g,H as _,I as v,J as y,K as b,L as x,Lt as S,M as C,N as w,Nt as T,R as E,St as D,T as O,Tn as k,Tt as A,Ut as j,V as M,W as N,X as P,Y as F,Z as I,Zt as L,_ as R,_t as z,an as B,bn as V,cn as H,dn as U,en as ee,et as te,ft as ne,gt as re,hn as ie,it as W,jt as G,k as ae,ln as oe,lt as se,mt as K,n as ce,nt as le,on as ue,ot as de,pt as fe,q as pe,qt as q,rn as J,rt as me,sn as he,t as ge,tn as Y,un as _e,v as ve,x as ye,xn as be,xt as xe,y as Se,z as Ce}from"./skeleton-B4Z0R3jQ.js";import{a as we,i as Te,o as Ee,t as De}from"./style-CBKkTdLU.js";import{o as Oe}from"./shared-DZLPF0cC.js";function ke(e,t){return fe.reduce((n,r)=>{let i=e[`${r}1`],a=e[`${r}3`],o=e[`${r}6`],s=e[`${r}7`];return Object.assign(Object.assign({},n),t(r,{lightColor:i,lightBorderColor:a,darkColor:o,textColor:s}))},{})}var Ae=(e,t,n,r,i)=>({background:e,border:`${q(r.lineWidth)} ${r.lineType} ${t}`,[`${i}-icon`]:{color:n}}),je=e=>{let{componentCls:t,motionDurationSlow:n,marginXS:r,marginSM:i,fontSize:a,fontSizeLG:o,lineHeight:s,borderRadiusLG:c,motionEaseInOutCirc:l,withDescriptionIconSize:u,colorText:d,colorTextHeading:f,withDescriptionPadding:p,defaultPadding:m}=e;return{[t]:Object.assign(Object.assign({},se(e)),{position:`relative`,display:`flex`,alignItems:`center`,padding:m,wordWrap:`break-word`,borderRadius:c,[`&${t}-rtl`]:{direction:`rtl`},[`${t}-content`]:{flex:1,minWidth:0},[`${t}-icon`]:{marginInlineEnd:r,lineHeight:0},"&-description":{display:`none`,fontSize:a,lineHeight:s},"&-message":{color:f},[`&${t}-motion-leave`]:{overflow:`hidden`,opacity:1,transition:`max-height ${n} ${l}, opacity ${n} ${l},
|
||||
padding-top ${n} ${l}, padding-bottom ${n} ${l},
|
||||
margin-bottom ${n} ${l}`},[`&${t}-motion-leave-active`]:{maxHeight:0,marginBottom:`0 !important`,paddingTop:0,paddingBottom:0,opacity:0}}),[`${t}-with-description`]:{alignItems:`flex-start`,padding:p,[`${t}-icon`]:{marginInlineEnd:i,fontSize:u,lineHeight:0},[`${t}-message`]:{display:`block`,marginBottom:r,color:f,fontSize:o},[`${t}-description`]:{display:`block`,color:d}},[`${t}-banner`]:{marginBottom:0,border:`0 !important`,borderRadius:0}}},Me=e=>{let{componentCls:t,colorSuccess:n,colorSuccessBorder:r,colorSuccessBg:i,colorWarning:a,colorWarningBorder:o,colorWarningBg:s,colorError:c,colorErrorBorder:l,colorErrorBg:u,colorInfo:d,colorInfoBorder:f,colorInfoBg:p}=e;return{[t]:{"&-success":Ae(i,r,n,e,t),"&-info":Ae(p,f,d,e,t),"&-warning":Ae(s,o,a,e,t),"&-error":Object.assign(Object.assign({},Ae(u,l,c,e,t)),{[`${t}-description > pre`]:{margin:0,padding:0}})}}},Ne=e=>{let{componentCls:t,iconCls:n,motionDurationMid:r,marginXS:i,fontSizeIcon:a,colorIcon:o,colorIconHover:s}=e;return{[t]:{"&-action":{marginInlineStart:i},[`${t}-close-icon`]:{marginInlineStart:i,padding:0,overflow:`hidden`,fontSize:a,lineHeight:q(a),backgroundColor:`transparent`,border:`none`,outline:`none`,cursor:`pointer`,[`${n}-close`]:{color:o,transition:`color ${r}`,"&:hover":{color:s}}},"&-close-text":{color:o,transition:`color ${r}`,"&:hover":{color:s}}}}},Pe=le(`Alert`,e=>[je(e),Me(e),Ne(e)],e=>({withDescriptionIconSize:e.fontSizeHeading3,defaultPadding:`${e.paddingContentVerticalSM}px 12px`,withDescriptionPadding:`${e.paddingMD}px ${e.paddingContentHorizontalLG}px`})),X=e(n()),Z=e(d()),Fe=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},Ie={success:P,info:b,error:F,warning:pe},Le=e=>{let{icon:t,prefixCls:n,type:r}=e,i=Ie[r]||null;return t?N(t,X.createElement(`span`,{className:`${n}-icon`},t),()=>({className:(0,Z.default)(`${n}-icon`,t.props.className)})):X.createElement(i,{className:`${n}-icon`})},Re=e=>{let{isClosable:t,prefixCls:n,closeIcon:r,handleClose:i,ariaProps:a}=e,o=r===!0||r===void 0?X.createElement(y,null):r;return t?X.createElement(`button`,Object.assign({type:`button`,onClick:i,className:`${n}-close-icon`,tabIndex:0},a),o):null},ze=X.forwardRef((e,t)=>{let{description:n,prefixCls:r,message:i,banner:a,className:s,rootClassName:c,style:l,onMouseEnter:u,onMouseLeave:d,onClick:f,afterClose:p,showIcon:m,closable:g,closeText:_,closeIcon:v,action:y,id:b}=e,x=Fe(e,[`description`,`prefixCls`,`message`,`banner`,`className`,`rootClassName`,`style`,`onMouseEnter`,`onMouseLeave`,`onClick`,`afterClose`,`showIcon`,`closable`,`closeText`,`closeIcon`,`action`,`id`]),[S,C]=X.useState(!1),w=X.useRef(null);X.useImperativeHandle(t,()=>({nativeElement:w.current}));let{getPrefixCls:T,direction:E,closable:D,closeIcon:O,className:k,style:j}=A(`alert`),M=T(`alert`,r),[N,P,F]=Pe(M),I=t=>{var n;C(!0),(n=e.onClose)==null||n.call(e,t)},L=X.useMemo(()=>e.type===void 0?a?`warning`:`info`:e.type,[e.type,a]),R=X.useMemo(()=>typeof g==`object`&&g.closeIcon||_?!0:typeof g==`boolean`?g:v!==!1&&v!=null||!!D,[_,v,g,D]),z=a&&m===void 0?!0:m,B=(0,Z.default)(M,`${M}-${L}`,{[`${M}-with-description`]:!!n,[`${M}-no-icon`]:!z,[`${M}-banner`]:!!a,[`${M}-rtl`]:E===`rtl`},k,s,c,F,P),V=h(x,{aria:!0,data:!0}),H=X.useMemo(()=>typeof g==`object`&&g.closeIcon?g.closeIcon:_||(v===void 0?typeof D==`object`&&D.closeIcon?D.closeIcon:O:v),[v,g,D,_,O]),ee=X.useMemo(()=>{let e=g??D;if(typeof e==`object`){let{closeIcon:t}=e;return Fe(e,[`closeIcon`])}return{}},[g,D]);return N(X.createElement(o,{visible:!S,motionName:`${M}-motion`,motionAppear:!1,motionEnter:!1,onLeaveStart:e=>({maxHeight:e.offsetHeight}),onLeaveEnd:p},({className:t,style:r},a)=>X.createElement(`div`,Object.assign({id:b,ref:U(w,a),"data-show":!S,className:(0,Z.default)(B,t),style:Object.assign(Object.assign(Object.assign({},j),l),r),onMouseEnter:u,onMouseLeave:d,onClick:f,role:`alert`},V),z?X.createElement(Le,{description:n,icon:e.icon,prefixCls:M,type:L}):null,X.createElement(`div`,{className:`${M}-content`},i?X.createElement(`div`,{className:`${M}-message`},i):null,n?X.createElement(`div`,{className:`${M}-description`},n):null),y?X.createElement(`div`,{className:`${M}-action`},y):null,X.createElement(Re,{isClosable:R,prefixCls:M,closeIcon:H,handleClose:I,ariaProps:ee}))))});function Be(e,t,n){return t=he(t),B(e,ue()?Reflect.construct(t,n||[],he(e).constructor):t.apply(e,n))}var Ve=function(e){function t(){var e;return _e(this,t),e=Be(this,t,arguments),e.state={error:void 0,info:{componentStack:``}},e}return H(t,e),oe(t,[{key:`componentDidCatch`,value:function(e,t){this.setState({error:e,info:t})}},{key:`render`,value:function(){let{message:e,description:t,id:n,children:r}=this.props,{error:i,info:a}=this.state,o=a?.componentStack||null,s
Line truncated
|
||||
${t}-loading > ${n}`]:{color:c}};return[{[t]:Object.assign(Object.assign({},se(e)),{color:i,position:`fixed`,top:f,width:`100%`,pointerEvents:`none`,zIndex:h,[`${t}-move-up`]:{animationFillMode:`forwards`},[`
|
||||
${t}-move-up-appear,
|
||||
${t}-move-up-enter
|
||||
`]:{animationName:y,animationDuration:d,animationPlayState:`paused`,animationTimingFunction:u},[`
|
||||
${t}-move-up-appear${t}-move-up-appear-active,
|
||||
${t}-move-up-enter${t}-move-up-enter-active
|
||||
`]:{animationPlayState:`running`},[`${t}-move-up-leave`]:{animationName:b,animationDuration:d,animationPlayState:`paused`,animationTimingFunction:u},[`${t}-move-up-leave${t}-move-up-leave-active`]:{animationPlayState:`running`},"&-rtl":{direction:`rtl`,span:{direction:`rtl`}}})},{[t]:{[`${v}-wrapper`]:Object.assign({},x)}},{[`${t}-notice-pure-panel`]:Object.assign(Object.assign({},x),{padding:0,textAlign:`start`})}]},ft=le(`Message`,e=>dt(K(e,{height:150})),e=>({zIndexPopup:e.zIndexPopupBase+v+10,contentBg:e.colorBgElevated,contentPadding:`${(e.controlHeightLG-e.fontSize*e.lineHeight)/2}px ${e.paddingSM}px`})),pt={info:X.createElement(b,null),success:X.createElement(P,null),error:X.createElement(F,null),warning:X.createElement(pe,null),loading:X.createElement(Ce,null)},mt=({prefixCls:e,type:t,icon:n,children:r})=>X.createElement(`div`,{className:(0,Z.default)(`${e}-custom-content`,`${e}-${t}`)},n||pt[t],X.createElement(`span`,null,r));function ht(e,t){return{motionName:t??`${e}-move-up`}}function gt(e){let t,n=new Promise(n=>{t=e(()=>{n(!0)})}),r=()=>{t?.()};return r.then=(e,t)=>n.then(e,t),r.promise=n,r}var _t=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},vt=8,yt=3,bt=({children:e,prefixCls:t})=>{let n=M(t),[r,i,a]=ft(t,n);return r(X.createElement(Ge,{classNames:{list:(0,Z.default)(i,a,n)}},e))},xt=(e,{prefixCls:t,key:n})=>X.createElement(bt,{prefixCls:t,key:n},e),St=X.forwardRef((e,t)=>{let{top:n,prefixCls:r,getContainer:i,maxCount:a,duration:o=yt,rtl:s,transitionName:c,onAllRemoved:l}=e,{getPrefixCls:u,getPopupContainer:d,message:f,direction:p}=X.useContext(D),m=r||u(`message`),[h,g]=it({prefixCls:m,style:()=>({left:`50%`,transform:`translateX(-50%)`,top:n??vt}),className:()=>(0,Z.default)({[`${m}-rtl`]:s??p===`rtl`}),motion:()=>ht(m,c),closable:!1,closeIcon:X.createElement(`span`,{className:`${m}-close-x`},X.createElement(y,{className:`${m}-close-icon`})),duration:o,getContainer:()=>i?.()||d?.()||document.body,maxCount:a,onAllRemoved:l,renderNotifications:xt});return X.useImperativeHandle(t,()=>Object.assign(Object.assign({},h),{prefixCls:m,message:f})),g}),Ct=0;function wt(e){let t=X.useRef(null);return S(`Message`),[X.useMemo(()=>{let e=e=>{var n;(n=t.current)==null||n.close(e)},n=n=>{if(!t.current){let e=()=>{};return e.then=()=>{},e}let{open:r,prefixCls:i,message:a}=t.current,o=`${i}-notice`,{content:s,icon:c,type:l,key:u,className:d,style:f,onClose:p}=n,m=_t(n,[`content`,`icon`,`type`,`key`,`className`,`style`,`onClose`]),h=u;return h??=(Ct+=1,`antd-message-${Ct}`),gt(t=>(r(Object.assign(Object.assign({},m),{key:h,content:X.createElement(mt,{prefixCls:i,type:l,icon:c},s),placement:`top`,className:(0,Z.default)(l&&`${o}-${l}`,d,a?.className),style:Object.assign(Object.assign({},a?.style),f),onClose:()=>{p?.(),t()}})),()=>{e(h)}))},r={open:n,destroy:n=>{var r;n===void 0?(r=t.current)==null||r.destroy():e(n)}};return[`info`,`success`,`warning`,`error`,`loading`].forEach(e=>{r[e]=(t,r,i)=>{let a;a=t&&typeof t==`object`&&`content`in t?t:{content:t};let o,s;typeof r==`function`?s=r:(o=r,s=i);let c=Object.assign(Object.assign({onClose:s,duration:o},a),{type:e});return n(c)}}),r},[]),X.createElement(St,Object.assign({key:`message-holder`},e,{ref:t}))]}function Tt(e){return wt(e)}var Et=new j(`antFadeIn`,{"0%":{opacity:0},"100%":{opacity:1}}),Dt=new j(`antFadeOut`,{"0%":{opacity:1},"100%":{opacity:0}}),Ot=(e,t=!1)=>{let{antCls:n}=e,r=`${n}-fade`,i=t?`&`:``;return[l(r,Et,Dt,e.motionDurationMid,t),{[`
|
||||
${i}${r}-enter,
|
||||
${i}${r}-appear
|
||||
`]:{opacity:0,animationTimingFunction:`linear`},[`${i}${r}-leave`]:{animationTimingFunction:`linear`}}]},kt=e=>typeof e?.then==`function`,At=e=>{let{type:t,children:n,prefixCls:r,buttonProps:i,close:a,autoFocus:o,emitEvent:s,isSilent:c,quitOnNullishReturnValue:l,actionFn:u}=e,d=X.useRef(!1),f=X.useRef(null),[p,m]=re(!1),h=(...e)=>{a?.apply(void 0,e)};X.useEffect(()=>{let e=null;return o&&(e=setTimeout(()=>{var e;(e=f.current)==null||e.focus({preventScroll:!0})})),()=>{e&&clearTimeout(e)}},[o]);let g=e=>{kt(e)&&(m(!0),e.then((...e)=>{m(!1,!0),h.apply(void 0,e),d.current=!1},e=>{if(m(!1,!0),d.current=!1,!c?.())return Promise.reject(e)}))};return X.createElement(Se,Object.assign({},O(t),{onClick:e=>{if(d.current)return;if(d.current=!0,!u){h();return}let t;if(s){if(t=u(e),l&&!kt(t)){d.current=!1,h(e);return}}else if(u.length)t=u(a),d.current=!1;else if(t=u(),!kt(t)){h();return}g(t)},loading:p,prefixCls:r},i,{ref:f}),n)},jt=X.createContext({}),{Provider:Mt}=jt,Nt=()=>{let{autoFocusButton:e,cancelButtonProps:t,cancelTextLocale:n,isSilent:r,mergedOkCancel:i,rootPrefixCls:a,close:o,onCancel:s,onConfirm:c}=(0,X.useContext)(jt);return i?X.createElement(At,{isSilent:r,actionFn:s,close:(...e)=>{o?.apply(void 0,e),c?.(!1)},autoFocus:e===`cancel`,buttonProps:t,prefixCls:`${a}-btn`},n):null},Pt=()=>{let{autoFocusButton:e,close:t,isSilent:n,okButtonProps:r,rootPrefixCls:i,okTextLocale:a,okType:o,onConfirm:s,onOk:c}=(0,X.useContext)(jt);return X.createElement(At,{isSilent:n,type:o||`primary`,actionFn:c,close:(...e)=>{t?.apply(void 0,e),s?.(!0)},autoFocus:e===`ok`,buttonProps:r,prefixCls:`${i}-btn`},a)},Ft=X.createContext({});function It(e,t,n){var r=t;return!r&&n&&(r=`${e}-${n}`),r}function Lt(e,t){var n=e[`page${t?`Y`:`X`}Offset`],r=`scroll${t?`Top`:`Left`}`;if(typeof n!=`number`){var i=e.document;n=i.documentElement[r],typeof n!=`number`&&(n=i.body[r])}return n}function Rt(e){var t=e.getBoundingClientRect(),n={left:t.left,top:t.top},r=e.ownerDocument,i=r.defaultView||r.parentWindow;return n.left+=Lt(i),n.top+=Lt(i,!0),n}var zt=X.memo(function(e){return e.children},function(e,t){return!t.shouldUpdate}),Bt={width:0,height:0,overflow:`hidden`,outline:`none`},Vt={outline:`none`},Ht=X.forwardRef(function(e,t){var n=e.prefixCls,r=e.className,i=e.style,a=e.title,o=e.ariaId,s=e.footer,c=e.closable,l=e.closeIcon,u=e.onClose,d=e.children,p=e.bodyStyle,m=e.bodyProps,g=e.modalRender,_=e.onMouseDown,v=e.onMouseUp,y=e.holderRef,b=e.visible,x=e.forceRender,S=e.width,C=e.height,w=e.classNames,T=e.styles,E=X.useContext(Ft).panel,D=ie(y,E),O=(0,X.useRef)(),A=(0,X.useRef)();X.useImperativeHandle(t,function(){return{focus:function(){var e;(e=O.current)==null||e.focus({preventScroll:!0})},changeActive:function(e){var t=document.activeElement;e&&t===A.current?O.current.focus({preventScroll:!0}):!e&&t===O.current&&A.current.focus({preventScroll:!0})}}});var j={};S!==void 0&&(j.width=S),C!==void 0&&(j.height=C);var M=s?X.createElement(`div`,{className:(0,Z.default)(`${n}-footer`,w?.footer),style:V({},T?.footer)},s):null,N=a?X.createElement(`div`,{className:(0,Z.default)(`${n}-header`,w?.header),style:V({},T?.header)},X.createElement(`div`,{className:`${n}-title`,id:o},a)):null,P=(0,X.useMemo)(function(){return k(c)===`object`&&c!==null?c:c?{closeIcon:l??X.createElement(`span`,{className:`${n}-close-x`})}:{}},[c,l,n]),F=h(P,!0),I=k(c)===`object`&&c.disabled,L=c?X.createElement(`button`,f({type:`button`,onClick:u,"aria-label":`Close`},F,{className:`${n}-close`,disabled:I}),P.closeIcon):null,R=X.createElement(`div`,{className:(0,Z.default)(`${n}-content`,w?.content),style:T?.content},L,N,X.createElement(`div`,f({className:(0,Z.default)(`${n}-body`,w?.body),style:V(V({},p),T?.body)},m),d),M);return X.createElement(`div`,{key:`dialog-element`,role:`dialog`,"aria-labelledby":a?o:null,"aria-modal":`true`,ref:D,style:V(V({},i),j),className:(0,Z.default)(n,r),onMouseDown:_,onMouseUp:v},X.createElement(`div`,{ref:O,tabIndex:0,style:Vt},X.createElement(zt,{shouldUpdate:b||x},g?g(R):R)),X.createElement(`div`,{tabIndex:0,ref:A,style:Bt}))}),Ut=X.forwardRef(function(e,t){var n=e.prefixCls,r=e.title,i=e.style,a=e.className,s=e.visible,c=e.forceRender,l=e.destroyOnClose,u=e.motionName,d=e.ariaId,p=e.onVisibleChanged,m=e.mousePosition,h=(0,X.useRef)(),g=X.useState(),_=Y(g,2),v=_[0],y=_[1],b={};v&&(b.transformOrigin=v);function x(){var e=Rt(h.current);y(m&&(m.x||m.y)?`${m.x-e.left}px ${m.y-e.top}px`:``)}return X.createElement(o,{visible:s,onVisibleChanged:p,onAppearPrepare:x,onEnterPrepare:x,forceRender:c,motionName:u,removeOnLeave:l,ref:h},function(o,s){var c=o.className,l=o.style;return X.createElement(Ht,f({},e,{ref:t,title:r,ariaId:d,prefixCls:n,holderRef:s,style:V(V(V({},l),i),b),className:(0,Z.default)(a,c)}))})});Ut.displayName=`Content`;var Wt=function(e){var t=e.prefixCls,n=e.style,r=e.visible,i=e.maskProps,a=e.motionName,s=e.className;return X.createElement(o,{key:`mask`,visible:r,motionName:a,leavedClassName:`${t}-mask-hidden`},function(e,r){var
Line truncated
|
||||
${t}-body,
|
||||
${t}-confirm-body-wrapper`]:{display:`flex`,flexDirection:`column`,flex:`auto`},[`${t}-confirm-body`]:{marginBottom:`auto`}}}]},on=e=>{let{componentCls:t}=e;return{[`${t}-root`]:{[`${t}-wrap-rtl`]:{direction:`rtl`,[`${t}-confirm-body`]:{direction:`rtl`}}}}},sn=e=>{let{componentCls:t}=e,n=De(e),r=Object.assign({},n);delete r.xs;let i=`--${t.replace(`.`,``)}-`,a=Object.keys(r).map(e=>({[`@media (min-width: ${q(r[e])})`]:{width:`var(${i}${e}-width)`}}));return{[`${t}-root`]:{[t]:[].concat(J(Object.keys(n).map((e,t)=>{let r=Object.keys(n)[t-1];return r?{[`${i}${e}-width`]:`var(${i}${r}-width)`}:null})),[{width:`var(${i}xs-width)`}],J(a))}}},cn=e=>{let t=e.padding,n=e.fontSizeHeading5,r=e.lineHeightHeading5;return K(e,{modalHeaderHeight:e.calc(e.calc(r).mul(n).equal()).add(e.calc(t).mul(2).equal()).equal(),modalFooterBorderColorSplit:e.colorSplit,modalFooterBorderStyle:e.lineType,modalFooterBorderWidth:e.lineWidth,modalCloseIconColor:e.colorIcon,modalCloseIconHoverColor:e.colorIconHover,modalCloseBtnSize:e.controlHeight,modalConfirmIconSize:e.fontHeight,modalTitleHeight:e.calc(e.titleFontSize).mul(e.titleLineHeight).equal()})},ln=e=>({footerBg:`transparent`,headerBg:e.colorBgElevated,titleLineHeight:e.lineHeightHeading5,titleFontSize:e.fontSizeHeading5,contentBg:e.colorBgElevated,titleColor:e.colorTextHeading,contentPadding:e.wireframe?0:`${q(e.paddingMD)} ${q(e.paddingContentHorizontalLG)}`,headerPadding:e.wireframe?`${q(e.padding)} ${q(e.paddingLG)}`:0,headerBorderBottom:e.wireframe?`${q(e.lineWidth)} ${e.lineType} ${e.colorSplit}`:`none`,headerMarginBottom:e.wireframe?0:e.marginXS,bodyPadding:e.wireframe?e.paddingLG:0,footerPadding:e.wireframe?`${q(e.paddingXS)} ${q(e.padding)}`:0,footerBorderTop:e.wireframe?`${q(e.lineWidth)} ${e.lineType} ${e.colorSplit}`:`none`,footerBorderRadius:e.wireframe?`0 0 ${q(e.borderRadiusLG)} ${q(e.borderRadiusLG)}`:0,footerMarginTop:e.wireframe?0:e.marginSM,confirmBodyPadding:e.wireframe?`${q(e.padding*2)} ${q(e.padding*2)} ${q(e.paddingLG)}`:0,confirmIconMarginInlineEnd:e.wireframe?e.margin:e.marginSM,confirmBtnsMarginTop:e.wireframe?e.marginLG:e.marginSM}),un=le(`Modal`,e=>{let t=cn(e);return[an(t),on(t),rn(t),ye(t,`zoom`),sn(t)]},ln,{unitless:{titleLineHeight:!0}}),dn=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},fn;Jt()&&document.documentElement.addEventListener(`click`,e=>{fn={x:e.pageX,y:e.pageY},setTimeout(()=>{fn=null},100)},!0);var pn=e=>{let{prefixCls:t,className:n,rootClassName:r,open:i,wrapClassName:a,centered:o,getContainer:s,focusTriggerAfterClose:c=!0,style:l,visible:u,width:d=520,footer:f,classNames:p,styles:m,children:h,loading:g,confirmLoading:_,zIndex:v,mousePosition:b,onOk:S,onCancel:C,destroyOnHidden:T,destroyOnClose:O,panelRef:k=null,modalRender:A}=e,j=dn(e,[`prefixCls`,`className`,`rootClassName`,`open`,`wrapClassName`,`centered`,`getContainer`,`focusTriggerAfterClose`,`style`,`visible`,`width`,`footer`,`classNames`,`styles`,`children`,`loading`,`confirmLoading`,`zIndex`,`mousePosition`,`onOk`,`onCancel`,`destroyOnHidden`,`destroyOnClose`,`panelRef`,`modalRender`]),{getPopupContainer:N,getPrefixCls:P,direction:F,modal:I}=X.useContext(D),L=e=>{_||C?.(e)},R=e=>{S?.(e)},z=P(`modal`,t),B=P(),V=M(z),[H,ee,te]=un(z,V),ne=(0,Z.default)(a,{[`${z}-centered`]:o??I?.centered,[`${z}-wrap-rtl`]:F===`rtl`}),re=f!==null&&!g?X.createElement(tn,Object.assign({},e,{onOk:R,onCancel:L})):null,[ie,W,G,ae]=lt(ot(e),ot(I),{closable:!0,closeIcon:X.createElement(y,{className:`${z}-close-icon`}),closeIconRender:e=>en(z,e)}),oe=A?e=>X.createElement(`div`,{className:`${z}-render`},A(e)):void 0,se=Zt(`.${z}-${A?`render`:`content`}`),K=U(k,se),[le,ue]=x(`Modal`,v),[de,fe]=X.useMemo(()=>d&&typeof d==`object`?[void 0,d]:[d,void 0],[d]),pe=X.useMemo(()=>{let e={};return fe&&Object.keys(fe).forEach(t=>{let n=fe[t];n!==void 0&&(e[`--${z}-${t}-width`]=typeof n==`number`?`${n}px`:n)}),e},[z,fe]);return H(X.createElement(ce,{form:!0,space:!0},X.createElement(E.Provider,{value:ue},X.createElement(qt,Object.assign({width:de},j,{zIndex:le,getContainer:s===void 0?N:s,prefixCls:z,rootClassName:(0,Z.default)(ee,r,te,V),footer:re,visible:i??u,mousePosition:b??fn,onClose:L,closable:ie&&Object.assign({disabled:G,closeIcon:W},ae),closeIcon:W,focusTriggerAfterClose:c,transitionName:w(B,`zoom`,e.transitionName),maskTransitionName:w(B,`fade`,e.maskTransitionName),className:(0,Z.default)(ee,n,I?.className),style:Object.assign(Object.assign(Object.assign({},I?.style),l),pe),classNames:Object.assign(Object.assign(Object.assign({},I?.classNames),p),{wrapper:(0,Z.default)(ne,p?.wrapper)}),styles:Object.assign(Object.assign({},I?.styles),m),panelRef:K,destroyOnClose:T??O,modalRender:oe}),g?X.createElement(ge,{active:!0,titl
Line truncated
|
||||
${u}-confirm ${u}-body > ${e.iconCls}`]:{color:e.colorWarning},[`${u}-info ${u}-body > ${e.iconCls}`]:{color:e.colorInfo},[`${u}-success ${u}-body > ${e.iconCls}`]:{color:e.colorSuccess}}},hn=me([`Modal`,`confirm`],e=>mn(cn(e)),ln,{order:-1e3}),gn=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},_n=e=>{let{prefixCls:t,icon:n,okText:r,cancelText:i,confirmPrefixCls:a,type:o,okCancel:s,footer:c,locale:l}=e,u=gn(e,[`prefixCls`,`icon`,`okText`,`cancelText`,`confirmPrefixCls`,`type`,`okCancel`,`footer`,`locale`]),d=n;if(!n&&n!==null)switch(o){case`info`:d=X.createElement(b,null);break;case`success`:d=X.createElement(P,null);break;case`error`:d=X.createElement(F,null);break;default:d=X.createElement(pe,null)}let f=s??o===`confirm`,p=e.autoFocusButton===null?!1:e.autoFocusButton||`ok`,[m]=T(`Modal`),h=l||m,g=r||(f?h?.okText:h?.justOkText),_=i||h?.cancelText,v=X.useMemo(()=>Object.assign({autoFocusButton:p,cancelTextLocale:_,okTextLocale:g,mergedOkCancel:f},u),[p,_,g,f,u]),y=X.createElement(X.Fragment,null,X.createElement(Nt,null),X.createElement(Pt,null)),x=e.title!==void 0&&e.title!==null,S=`${a}-body`;return X.createElement(`div`,{className:`${a}-body-wrapper`},X.createElement(`div`,{className:(0,Z.default)(S,{[`${S}-has-title`]:x})},d,X.createElement(`div`,{className:`${a}-paragraph`},x&&X.createElement(`span`,{className:`${a}-title`},e.title),X.createElement(`div`,{className:`${a}-content`},e.content))),c===void 0||typeof c==`function`?X.createElement(Mt,{value:v},X.createElement(`div`,{className:`${a}-btns`},typeof c==`function`?c(y,{OkBtn:Pt,CancelBtn:Nt}):y)):c,X.createElement(hn,{prefixCls:t}))},vn=e=>{let{close:t,zIndex:n,maskStyle:r,direction:i,prefixCls:a,wrapClassName:o,rootPrefixCls:s,bodyStyle:c,closable:l=!1,onConfirm:u,styles:d,title:f}=e,p=`${a}-confirm`,m=e.width||416,h=e.style||{},g=e.mask===void 0||e.mask,_=e.maskClosable!==void 0&&e.maskClosable,y=(0,Z.default)(p,`${p}-${e.type}`,{[`${p}-rtl`]:i===`rtl`},e.className),[,b]=ne(),x=X.useMemo(()=>n===void 0?b.zIndexPopupBase+v:n,[n,b]);return X.createElement(pn,Object.assign({},e,{className:y,wrapClassName:(0,Z.default)({[`${p}-centered`]:!!e.centered},o),onCancel:()=>{t?.({triggerCancel:!0}),u?.(!1)},title:f,footer:null,transitionName:w(s||``,`zoom`,e.transitionName),maskTransitionName:w(s||``,`fade`,e.maskTransitionName),mask:g,maskClosable:_,style:h,styles:Object.assign({body:c,mask:r},d),width:m,zIndex:x,closable:l}),X.createElement(_n,Object.assign({},e,{confirmPrefixCls:p})))},yn=e=>{let{rootPrefixCls:t,iconPrefixCls:n,direction:r,theme:i}=e;return X.createElement(Te,{prefixCls:t,iconPrefixCls:n,direction:r,theme:i},X.createElement(vn,Object.assign({},e)))},bn=[],xn=``;function Sn(){return xn}var Cn=e=>{let{prefixCls:t,getContainer:n,direction:r}=e,i=Ee(),a=(0,X.useContext)(D),o=Sn()||a.getPrefixCls(),s=t||`${o}-modal`,c=n;return c===!1&&(c=void 0),X.createElement(yn,Object.assign({},e,{rootPrefixCls:o,prefixCls:s,iconPrefixCls:a.iconPrefixCls,theme:a.theme,direction:r??a.direction,locale:a.locale?.Modal??i,getContainer:c}))};function wn(e){let t=we(),n=document.createDocumentFragment(),r=Object.assign(Object.assign({},e),{close:c,open:!0}),i,a;function o(...t){var n;if(t.some(e=>e?.triggerCancel)){var r;(n=e.onCancel)==null||(r=n).call.apply(r,[e,()=>{}].concat(J(t.slice(1))))}for(let e=0;e<bn.length;e++)if(bn[e]===c){bn.splice(e,1);break}a()}let s=e=>{clearTimeout(i),i=setTimeout(()=>{let r=t.getPrefixCls(void 0,Sn()),i=t.getIconPrefixCls(),o=t.getTheme(),s=X.createElement(Cn,Object.assign({},e));a=p()(X.createElement(Te,{prefixCls:r,iconPrefixCls:i,theme:o},typeof t.holderRender==`function`?t.holderRender(s):s),n)})};function c(...t){r=Object.assign(Object.assign({},r),{open:!1,afterClose:()=>{typeof e.afterClose==`function`&&e.afterClose(),o.apply(this,t)}}),r.visible&&delete r.visible,s(r)}function l(e){r=typeof e==`function`?e(r):Object.assign(Object.assign({},r),e),s(r)}return s(r),bn.push(c),{destroy:c,update:l}}function Tn(e){return Object.assign(Object.assign({},e),{type:`warning`})}function En(e){return Object.assign(Object.assign({},e),{type:`info`})}function Dn(e){return Object.assign(Object.assign({},e),{type:`success`})}function On(e){return Object.assign(Object.assign({},e),{type:`error`})}function kn(e){return Object.assign(Object.assign({},e),{type:`confirm`})}function An({rootPrefixCls:e}){xn=e}var jn=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},Mn=X.forwardRef(
Line truncated
|
||||
-20
@@ -1,20 +0,0 @@
|
||||
import{n as e,t}from"./rolldown-runtime-Dl_DZoUm.js";import{A as n,B as r,C as i,D as a,E as o,F as s,H as c,I as l,L as u,M as d,N as f,O as p,P as m,R as h,S as g,T as _,_ as v,a as y,b,c as x,d as S,f as C,g as w,h as T,i as E,j as D,k as O,l as k,m as A,n as j,o as M,p as N,r as P,s as F,t as I,u as L,v as R,w as z,x as B,y as V,z as H}from"./antd-Bh8pVx-K.js";import{n as U,t as ee}from"./react-BvkltZ40.js";var W=t(((e,t,n)=>{var r;(function(n,i){typeof e==`object`&&t!==void 0?t.exports=i():typeof r==`function`&&r.amd?r(i):(n=typeof globalThis<`u`?globalThis:n||self).dayjs=i()})(n,(function(){var e=1e3,t=6e4,n=36e5,r=`millisecond`,i=`second`,a=`minute`,o=`hour`,s=`day`,c=`week`,l=`month`,u=`quarter`,d=`year`,f=`date`,p=`Invalid Date`,m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:`en`,weekdays:`Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday`.split(`_`),months:`January_February_March_April_May_June_July_August_September_October_November_December`.split(`_`),ordinal:function(e){var t=[`th`,`st`,`nd`,`rd`],n=e%100;return`[`+e+(t[(n-20)%10]||t[n]||t[0])+`]`}},_=function(e,t,n){var r=String(e);return!r||r.length>=t?e:``+Array(t+1-r.length).join(n)+e},v={s:_,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?`+`:`-`)+_(r,2,`0`)+`:`+_(i,2,`0`)},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),i=t.clone().add(r,l),a=n-i<0,o=t.clone().add(r+(a?-1:1),l);return+(-(r+(n-i)/(a?i-o:o-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:l,y:d,w:c,d:s,D:f,h:o,m:a,s:i,ms:r,Q:u}[e]||String(e||``).toLowerCase().replace(/s$/,``)},u:function(e){return e===void 0}},y=`en`,b={};b[y]=g;var x=`$isDayjsObject`,S=function(e){return e instanceof E||!(!e||!e[x])},C=function e(t,n,r){var i;if(!t)return y;if(typeof t==`string`){var a=t.toLowerCase();b[a]&&(i=a),n&&(b[a]=n,i=a);var o=t.split(`-`);if(!i&&o.length>1)return e(o[0])}else{var s=t.name;b[s]=t,i=s}return!r&&i&&(y=i),i||!r&&y},w=function(e,t){if(S(e))return e.clone();var n=typeof t==`object`?t:{};return n.date=e,n.args=arguments,new E(n)},T=v;T.l=C,T.i=S,T.w=function(e,t){return w(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function g(e){this.$L=C(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[x]=!0}var _=g.prototype;return _.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(t===null)return new Date(NaN);if(T.u(t))return new Date;if(t instanceof Date)return new Date(t);if(typeof t==`string`&&!/Z$/i.test(t)){var r=t.match(m);if(r){var i=r[2]-1||0,a=(r[7]||`0`).substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},_.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},_.$utils=function(){return T},_.isValid=function(){return this.$d.toString()!==p},_.isSame=function(e,t){var n=w(e);return this.startOf(t)<=n&&n<=this.endOf(t)},_.isAfter=function(e,t){return w(e)<this.startOf(t)},_.isBefore=function(e,t){return this.endOf(t)<w(e)},_.$g=function(e,t,n){return T.u(e)?this[t]:this.set(n,e)},_.unix=function(){return Math.floor(this.valueOf()/1e3)},_.valueOf=function(){return this.$d.getTime()},_.startOf=function(e,t){var n=this,r=!!T.u(t)||t,u=T.p(e),p=function(e,t){var i=T.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?i:i.endOf(s)},m=function(e,t){return T.w(n.toDate()[e].apply(n.toDate(`s`),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},h=this.$W,g=this.$M,_=this.$D,v=`set`+(this.$u?`UTC`:``);switch(u){case d:return r?p(1,0):p(31,11);case l:return r?p(1,g):p(0,g+1);case c:var y=this.$locale().weekStart||0,b=(h<y?h+7:h)-y;return p(r?_-b:_+(6-b),g);case s:case f:return m(v+`Hours`,0);case o:return m(v+`Minutes`,1);case a:return m(v+`Seconds`,2);case i:return m(v+`Milliseconds`,3);default:return this.clone()}},_.endOf=function(e){return this.startOf(e,!1)},_.$set=function(e,t){var n,c=T.p(e),u=`set`+(this.$u?`UTC`:``),p=(n={},n[s]=u+`Date`,n[f]=u+`Date`,n[l]=u+`Month`,n[d]=u+`FullYear`,n[o]=u+`Hours`,n[a]=u+`Minutes`,n[i]=u+`Seconds`,n[r]=u+`Milliseconds`,n)[c],m=c===s?this.$D+(t-this.$W):t;if(c===l||c===d){var h=this.clone().set(f,1);h.$d[p](m),h.init(),this.$d=h.set(f,Math.min(this.$D,h.daysInMonth())).$d}else p&&this.$d[p](m);return this.init(),this},_.set=function(e,t){return this.clone().$set(e,t)},_.get=function(e){return this[T.p(e)]()},_.add=function(r,u){var f,p=this;r=Number(r);var m=T.p(u),h=function(e){var t=w(p);return T.w(t.date(t.date()+Math.round(e*r)),p)};if(m===l)return this.set(l,this.$M+r);if(m===d)return this.set(d,this.$y+r);if(m===s)return h(1);if(m===c)reLine truncated
|
||||
0.58×(822+45)+55=558
|
||||
769+558=1327`,value:r,onChange:e=>i(e.target.value),onKeyDown:e=>{(e.metaKey||e.ctrlKey)&&e.key===`Enter`&&r.trim()&&(e.preventDefault(),s(!1))}}),(0,q.jsxs)(_,{wrap:!0,style:{marginTop:8},children:[(0,q.jsx)(l,{type:`primary`,onClick:()=>s(!1),children:`识别并预填`}),a?.kind===`warning`&&(0,q.jsx)(l,{onClick:()=>s(!0),children:`按计算金额预填`}),r&&(0,q.jsx)(l,{onClick:()=>{i(``),o(null)},children:`清空公式`})]}),(0,q.jsx)(`p`,{className:`small muted`,children:`括号内是克工费;金价乘克重后加的是一件工费,再加的金额记为附加费。合计行只校验,不增加商品。客户、货盘及内部成本仍按实际填写。`}),a&&(0,q.jsx)(h,{role:`status`,type:a.kind===`note`?`success`:a.kind,message:a.title||(a.kind===`error`?a.lines[0]:``),description:a.kind===`error`?void 0:(0,q.jsx)(`div`,{children:a.lines.filter(Boolean).map((e,t)=>(0,q.jsx)(`p`,{children:e},t))})})]})}function $t({order:e,error:t,onRetry:r,onPreview:i,onNew:a}){let{message:o}=s.useApp(),[c,u]=(0,G.useState)(!1),f=e.total!==void 0;async function p(){if(e.paper_number)try{await navigator.clipboard.writeText(e.paper_number),u(!0),o.success(`已复制纸单号 `+e.paper_number),window.setTimeout(()=>u(!1),1800)}catch{u(!1),o.info(`请手动选择纸单号复制`)}}return(0,q.jsx)(`div`,{className:`issued-page`,children:(0,q.jsx)(O,{className:`issued-card`,children:(0,q.jsx)(w,{status:`success`,title:`销售单据已生成`,subTitle:f?e.materialCostPending?`收款、费用和出库已记账;料费待补,补足购料后自动核算利润。`:`收款、费用、出库和利润已记账。`:t||`正在读取已生成的销售单…`,extra:(0,q.jsxs)(_,{direction:`vertical`,size:`large`,style:{width:`100%`},children:[f&&(0,q.jsxs)(`dl`,{className:`issued-summary`,"data-testid":`issued-summary`,children:[(0,q.jsxs)(`div`,{className:`issued-item`,children:[(0,q.jsx)(`dt`,{children:(0,q.jsx)(S.Text,{type:`secondary`,children:`纸单号`})}),(0,q.jsxs)(`dd`,{className:`issued-value-row`,children:[(0,q.jsx)(`span`,{className:`issued-value num`,"data-testid":`issued-paper-number`,children:e.paper_number||`未分配`}),e.paper_number&&(0,q.jsx)(d,{title:c?`已复制`:`复制纸单号`,children:(0,q.jsx)(l,{type:`text`,size:`small`,className:`issued-copy-btn`,"aria-label":`复制纸单号`,icon:c?(0,q.jsx)(m,{}):(0,q.jsx)(C,{}),onClick:()=>void p()})})]})]}),(0,q.jsxs)(`div`,{className:`issued-item`,children:[(0,q.jsx)(`dt`,{children:(0,q.jsx)(S.Text,{type:`secondary`,children:`成交合计`})}),(0,q.jsx)(`dd`,{className:`issued-value issued-total num`,"data-testid":`issued-total`,children:dt(e.total??null,e.rounding_mode||`cent`)})]}),e.customer&&(0,q.jsxs)(`div`,{className:`issued-item`,children:[(0,q.jsx)(`dt`,{children:(0,q.jsx)(S.Text,{type:`secondary`,children:`客户`})}),(0,q.jsx)(`dd`,{className:`issued-value small`,children:e.customer})]})]}),(0,q.jsxs)(`div`,{className:`issued-actions`,children:[(0,q.jsx)(l,{type:`primary`,size:`large`,icon:(0,q.jsx)(P,{}),href:`/print/`+encodeURIComponent(e.id)+`?mode=full`,onClick:()=>{i().catch(e=>o.error(e.message))},target:`_blank`,rel:`noopener`,"data-action":`print-preview`,children:`打开打印预览`}),(0,q.jsx)(l,{size:`large`,icon:(0,q.jsx)(n,{}),onClick:a,"data-action":`new-order`,children:`开始新的一单`}),!f&&(0,q.jsx)(l,{size:`large`,onClick:r,children:`重新读取订单`})]}),(0,q.jsx)(l,{href:be(`orders`)+`?order=`+encodeURIComponent(e.id),onClick:t=>{t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||(t.preventDefault(),K(`orders`,{search:`?order=`+encodeURIComponent(e.id)}))},type:`link`,icon:(0,q.jsx)(z,{}),children:`查看订单详情`})]})})})})}function en(e){let{client:t,state:n}=e,r=Ae(`draft`),[i,a]=(0,G.useState)(r?null:{draft:oe(window.localStorage,n.user.id),note:``});return(0,G.useEffect)(()=>{if(!r)return;let e=!0;return(async()=>{try{if(n.user.role!==`owner`)throw Error(`已有草稿由店主继续填写并开单;无单号的新开单流程照常使用。`);let i=await t.api(`/api/orders/`+encodeURIComponent(r));if(i.status!==`draft`)throw Error(`这张订单不是未开单的旧草稿,请在订单页查看。`);e&&a({draft:Y.draftInputs(i),note:`正在继续填写旧草稿,生成销售单据后完成记账。`})}catch(t){e&&a({draft:oe(window.localStorage,n.user.id),note:`旧草稿未能打开:`+t.message})}})(),()=>{e=!1}},[t,r,n.user.id,n.user.role]),i?(0,q.jsx)(tn,{...e,initialDraft:i.draft,initialNote:i.note}):(0,q.jsx)(`div`,{className:`page-loading`,children:(0,q.jsx)(b,{tip:`正在读取旧草稿…`,children:(0,q.jsx)(`div`,{style:{height:60}})})})}function tn({client:e,state:t,session:n,refreshState:r,onAccountChanged:i,onRecoverOther:a,initialDraft:o,initialNote:c}){let{message:u}=s.useApp();je(e);let{store:d,update:f,reset:p,ctx:m,poolError:g,loadPools:_}=_t({client:e,state:t,session:n,initialDraft:o}),{form:v,summary:y}=d,[b,C]=(0,G.useState)(``),[w,T]=(0,G.useState)(!1),[E,D]=(0,G.useState)(null),O=E!==null,k
Line truncated
|
||||
`),u=e=>e?.exchange?.fee_items.map(e=>`${e.note}:${e.amount}元 · ${o(e.payer)}付款`).join(`
|
||||
`)||`无`,d=e=>e?.exchange?.charges.map(e=>`${e.name}:${e.amount}元`).join(`
|
||||
`)||`无`,f=n.exchange||{},p=r?.exchange||{},m=e=>e?.mode===`pool`?`料池 `+e.poolId:e?`手填 `+e.rate+`元/克`:`无补金差重`,h=e=>e?e.mode===`gram`?e.rate+`元/克`:e.amount+`元总工费`:`未提供`;if(i.push(a(`业务日期`,n.date,r?.date||`取消原记录`),a(`客户`,n.customer,r?.customer),a(`开单人`,n.salesperson,r?.salesperson),a(`归属`,o(n.member),r?o(r.member):`沿用原身份留档`),a(`旧料逐项称重`,l(n),r?l(r):`冲正原库存及关联购料`),a(`旧料入库货盘`,s(n.old_pocket??`回收旧料`),r?s(r.old_pocket??`回收旧料`):`冲回原入库货盘`),a(`旧料入库数量(对)`,Tn(n.old_stock_count==null?null:Number(n.old_stock_count)),r?Tn(r.old_stock_count==null?null:Number(r.old_stock_count)):`冲回原入库数量`),a(`回收单价(元/克)`,n.buy_rate,r?.buy_rate),a(`回收结算额(元)`,n.buy_total,r?.buy_total),a(`实际收付款账户`,c(n.payment_account),r?c(r.payment_account):`冲正原收付记录`),a(`付款人`,o(n.payer),r?o(r.payer):`原付款流水保留`),a(`备注`,n.note,r?.note)),(n.surplus_mode===`deposit`||r?.surplus_mode===`deposit`)&&i.push(a(`余料处理`,n.surplus_mode===`deposit`?`寄存,暂不结算`:`按回收价结算`,r?r.surplus_mode===`deposit`?`寄存,暂不结算`:`按回收价结算`:`撤回本单寄存余料`)),(n.old_source===`deposit`||r?.old_source===`deposit`)&&i.push(a(`使用客户寄存料`,n.old_source===`deposit`?n.deposit_id+` · `+n.deposit_weight+`g`:`本次交来旧料`,r?.old_source===`deposit`?r.deposit_id+` · `+r.deposit_weight+`g`:r?`本次交来旧料`:`退回寄存账户`)),n.exchange?.items||r?.exchange?.items){let e=e=>(e?.exchange?.items||[]).map((e,t)=>t+1+` · `+e.exchange.name+(e.old_source===`deposit`?` · 寄存记录 `+e.deposit_id+` 使用 `+e.deposit_weight+`g`:``)+(e.surplus_mode===`deposit`?` · 余料寄存,暂不结算`:``)+` · 旧料 `+e.old_lines.map(e=>e.melted_weight+`g × `+e.purity+`%`).join(`+`)+` 入`+s(e.old_pocket)+` · 新货 `+e.exchange.quantity+`g `+(s(e.exchange.pocket)||`外配`)+` · 补金 `+e.exchange.gold_price+`元/g · 折旧 `+e.exchange.depreciation_weight+`g × `+e.exchange.depreciation_rate+`元/g · 回收 `+e.buy_rate+`元/g,`+e.buy_total+`元 · 料费 `+JSON.stringify(e.exchange.cost_material)+` · 料费付款 `+o(e.exchange.cost_material_payer)+` · 进货工费 `+JSON.stringify(e.exchange.cost_labor)+`,`+o(e.exchange.cost_labor_payer)).join(`;`);i.push(a(`逐件置换完整资料`,e(n),r?e(r):`全部冲回`))}if(n.exchange?.products||r?.exchange?.products){let e=e=>(e?.products??(e?[e]:[])).map((e,t)=>t+1+` · `+e.name+` · `+e.quantity+`g · `+(s(e.pocket)||`外配`)+` · 销售工费 `+e.labor_rate+(e.labor_mode===`total`?`元`:`元/克`)+` · 进货工费 `+(e.cost_labor?.rate??e.cost_labor?.amount??`待补`)+` · `+o(e.cost_labor_payer)+(e.stockCount==null?``:` · `+e.stockCount+`对`)).join(`;`);i.push(a(`逐件置换商品`,e(n.exchange),r?e(r.exchange):`冲回全部新货出库`))}n.mode===`exchange`&&i.push(a(`置换新货`,f.name,p.name),a(`新货克重(g)`,f.quantity,p.quantity),a(`实际货盘`,s(f.pocket)||`外配`,r?s(p.pocket)||`外配`:`冲回原出库货盘`),a(`出库数量(对)`,Tn(f.stockCount==null?null:Number(f.stockCount)),Tn(p.stockCount==null?null:Number(p.stockCount))),a(`销售金价(元/克)`,f.gold_price,p.gold_price),a(`销售工费`,f.labor_rate+`元/`+(f.labor_mode===`gram`?`克`:`总额`),r?p.labor_rate+`元/`+(p.labor_mode===`gram`?`克`:`总额`):`取消`),a(`折旧计费克重/单价`,f.depreciation_weight+`g × `+f.depreciation_rate+`元/克`,r?p.depreciation_weight+`g × `+p.depreciation_rate+`元/克`:`取消`),a(`附加收费`,d(n),r?d(r):`取消`),a(`优惠(元)`,f.discount,p.discount),a(`取整方式`,f.rounding_mode===`yuan`?`四舍五入到元`:`保留到分`,r?p.rounding_mode===`yuan`?`四舍五入到元`:`保留到分`:`取消`),a(`补金差重进货来源`,m(f.cost_material),r?m(p.cost_material):`释放原耗用`),a(`料费付款人`,o(f.cost_material_payer),r?o(p.cost_material_payer):`原来源留档`),a(`进货工费`,h(f.cost_labor),r?h(p.cost_labor):`取消`),a(`工费付款人`,o(f.cost_labor_payer),r?o(p.cost_labor_payer):`原来源留档`),a(`实际费用`,u(n),r?u(r):`冲正原费用`));let g=e.summary.before||{},_=e.summary.after||{};return i.push(...[[`实际收客户`,`cashReceipt`],[`实际付客户`,`cashPayment`],[`购料成本`,`purchaseAmount`],[`订单货品成本`,`goodsCost`],[`实际费用`,`directCost`],[`原账利润`,`profit`]].map(([e,t])=>a(e,g[t]==null?`待核实`:`¥`+ut(g[t]),r?_[t]==null?`待核实`:`¥`+ut(_[t]):`取消后冲正`))),(0,q.jsxs)(q.Fragment,{children:[e.summary.legacyCountNotice&&(0,q.jsxs)(`p`,{children:[e.summary.legacyCountNotice,e.summary.legacyCountVerified&&`(申请人已确认)`]}),(0,q.jsx)(`div`,{className:`table-wrap`,children:(0,q.jsxs)(`table`,{"aria-label":`回收更正原值与申请值`,children:[(0,q.jsx)
Line truncated
|
||||
|
||||
`)||`无已记费用`}function N(e){let t=new Set((e.corrections||[]).filter(e=>e.type===`payment`).map(e=>e.target));return e.payments.filter(e=>e.amount>0&&!t.has(e.id)).map(e=>`${e.date} · ${e.kind===`receipt`?`客户收款`:`客户退款`}\n${H(e.amount)} · ${e.account?fe(e.account):`账户未提供`}`).join(`
|
||||
|
||||
`)||`无有效收退款`}function P(e,t,n=`锁价购料成本`){if(!e.priceLockCosts&&!t.priceLockCosts)return``;if(e.priceLockCosts?.lines||t.priceLockCosts?.lines){let n=e.priceLockCosts||{},r=t.priceLockCosts||{},i=n.lines||r.lines;return G.Children.toArray(i.map((e,t)=>{let i=n.lines?.find(t=>t.lineId===e.lineId)||{},a=r.lines?.find(t=>t.lineId===e.lineId)||{};return P({priceLockCosts:{...i,date:n.date}},{priceLockCosts:{...a,date:r.date}},`商品 `+(t+1)+` · 锁价购料成本`)}))}let r=e.priceLockCosts||{},i=t.priceLockCosts||{},a=e=>e===`pool`?`原锁料池`:e===`manual`?`手填原锁料价`:`未提供`;return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`tr`,{className:`change-section-row`,children:(0,q.jsx)(`th`,{colSpan:`3`,scope:`colgroup`,children:n})}),I(`原锁日期`,r.date,i.date),I(`原锁料费来源`,a(r.materialSource),a(i.materialSource)),I(`原锁进货料价(每克)`,H(r.buyRate),H(i.buyRate)),I(`原锁料费付款人`,r.materialSource===`pool`?`按原锁料池分摊`:V(r.buyPayer),i.materialSource===`pool`?`按原锁料池分摊`:V(i.buyPayer)),I(`原锁整批料费`,H(r.materialAmount),H(i.materialAmount)),I(`补重进货料价(每克)`,H(r.extraRate),H(i.extraRate)),I(`补重料费付款人`,r.extraPayer?V(r.extraPayer):`无补重`,i.extraPayer?V(i.extraPayer):`无补重`)]})}function F(e,t){if(!e)return`无此商品`;let n=H;if(t===`name`)return`${e.name||`未填写`}${e.priceNote?`
|
||||
`+e.priceNote:``}`;if(t===`code`)return e.code||`未填写`;if(t===`quantity`)return e.unit===`g`?Oe(e.quantity)+`g`:String(e.quantity)+`件`;if(t===`sale`)return n(e.sale);if(t===`pricing`)return e.goldPrice==null?`手填基础金额 ${n(e.baseSale??e.sale)}`:`销售金价 ${n(e.goldPrice)}/克\n${e.laborMode===`gram`?`销售克工费`:`销售件工费`} ${n(e.laborRate)}${e.laborMode===`gram`?`/克`:`/件`}\n件数 ${e.pieces??`未填写`}`;if(t===`stockCount`)return Number.isSafeInteger(e.stockCount)||W(e.pocket)?ee(e.stockCount):`不记录对数`;if(t===`pocket`)return te(e.pocket)||`外配/不扣黄金`;if(t===`charges`)return e.charges?.length?e.charges.map(e=>`${e.name}:${n(e.amount)}`).join(`
|
||||
`):`无附加收费`;if(t===`cost`)return n(e.cost);if(t===`material`){let t=e.costMaterial;return t?.mode===`pool`?`每日购料:${t.poolId}\n本行料费:${n(e.costParts?.material)}${e.materialPool?.allocations?.length?`
|
||||
`+e.materialPool.allocations.map(e=>V(e.payer)+` `+n(e.amount)).join(`;`):e.costParts?.material==null?`
|
||||
待补采购后分摊`:``}`:`${t?.mode===`gram`?`每克料价 `+n(t.rate)+`/克`:`料费总额`}\n${n(e.costParts?.material)}`}return t===`labor`?`${e.costLabor?.mode===`gram`?`进货克工费 `+n(e.costLabor.rate)+`/克`:`进货总工费`}\n${n(e.costParts?.labor)}`:t===`extra`?e.costParts?`配件 ${n(e.costParts.accessories)}\n其他 ${n(e.costParts.other)}`:`原货品成本未分项`:t===`payers`?`料费:${e.costMaterial?.mode===`pool`?e.materialPool?.allocations?.map(e=>V(e.payer)+` `+n(e.amount)).join(`;`)||`按真实采购分摊`:V(e.costPayers?.material??e.payer)}\n进货工费:${V(e.costPayers?.labor??e.payer)}\n配件及其他:${V(e.payer)}`:``}function I(e,t,n){let r=String(t??``)!==String(n??``);return(0,q.jsxs)(`tr`,{...r?{className:`order-change-modified`}:{},children:[(0,q.jsxs)(`th`,{scope:`row`,children:[e,r?(0,q.jsx)(`span`,{className:`change-mark`,children:`已修改`}):``]}),(0,q.jsx)(`td`,{children:B(t)}),(0,q.jsx)(`td`,{children:B(n)})]})}function L(e){if(e===void 0)return[];let t=e=>e===null||Number.isSafeInteger(e)&&e>=0,n=e=>e&&t(e.materialAmount)&&[`usedMaterialAmount`,`leftoverCost`].every(n=>!Object.hasOwn(e,n)||t(e[n]))&&Array.isArray(e.allocations)&&e.allocations.every(e=>Be().includes(e.payer)&&Number.isSafeInteger(e.amount)&&e.amount>=0)&&(e.materialAmount===null||e.allocations.reduce((e,t)=>e+t.amount,0)===e.materialAmount);if(!Array.isArray(e)||!e.every(e=>e&&typeof e.id==`string`&&e.id&&je(e.date)&&n(e.before)&&n(e.after)))throw Error(`关联锁价单的成本影响未完整返回,请重新读取后复核。`);return e}function R(e,t){let n=t=>t&&t.id===e.order_id&&Number.isSafeInteger(t.total)&&Array.isArray(t.lines)&&Array.isArray(t.expenses)&&Array.isArray(t.payments),r=e=>e===null||Number.isSafeInteger(e);if(!e||typeof e.id!=`string`||!e.id||typeof e.order_id!=`string`||t&&e.order_id!==t||!Object.hasOwn(oe,e.status)||!Number.isSafeInteger(e.order_revision)||typeof e.reason!=`string`||typeof e.requester_name!=`string`||typeof e.created!=`string`||typeof e.stale!=`boolean`||typeof e.canApprove!=`boolean`||!n(e.before)||!n(e.after)||![`before`,`after`].every(t=>e.summary?.[t]&&[`total`,`netReceived`,`directCost`].every(n=>Number.isSafeInteger(e.summary[t][n]))&&[`goodsCost`,`profit`,`settlementDue`].every(n=>r(e.summary[t][n]))))throw Error(`修改申请资料未完整返回,请重新读取订单后复核。`);if(e.relatedOrders!==void 0){if(!Array.isArray(e.relatedOrders))throw Error(`关联订单的修改影响未完整返回,请重新读取后复核。`);e.relatedOrders.forEach(t=>R({...e,order_id:t.id,before:t.before,after:t.after,summary:t.summary,relatedOrders:[]}))}if(L(e.relatedPriceLocks),e.action!==void 0&&!Object.hasOwn(se,e.action))throw Error(`变更申请类型未完整返回,请重新读取后复核。`);let i=e.summary.inventory;if(i!==void 0&&(!i||![`before`,`after`,`changes`].every(e=>Array.isArray(i[e])&&i[e].every(e=>typeof e.date==`string`&&typeof e.pocket==`string`&&Number.isSafeInteger(e.mg)))))throw Error(`变更申请库存摘要未完整返回,请重新读取后复核。`);return e}function z(e){let t=R(e),n=t.before,r=t.after,i=(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(q.Fragment,{children:[G.Children.toArray([[`业务日期`,`date`],[`客户称呼/代号`,`customer`],[`开单人`,`salesperson`],[`收款方式与收款人`,`payment_account`],[`客户单备注`,`note`],[`内部备注(客户不可见)`,`internal_note`]].map(([e,t])=>I(e,t===`payment_account`?fe(n[t]):n[t],t===`payment_account`?fe(r[t]):r[t]))),I(`成交取整方式`,n.rounding_mode===`yuan`?`四舍五入到整数元`:`保留到分`,r.rounding_mode===`yuan`?`四舍五入到整数元`:`保留到分`)]}),I(`新增费用默认支付日期`,n.fees_date||n.date,r.fees_date||r.date)]}),I(`交付日期`,n.delivered_date,r.delivered_date)]}),a=G.Children.toArray([[`成交金额`,`total`],[`收款净额`,`netReceived`],[`货品成本`,`goodsCost`],[`实际费用合计`,`directCost`],[`利润`,`profit`],[`双方待结净额`,`settlementDue`]].map(([e,n])=>I(e,H(t.summary.before[n]),H(t.summary.after[n])))),o=G.Children.toArray(Array.from({length:Math.max(n.lines.length,r.lines.length)},(e,t)=>(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`tr`,{className:`change-section-row`,children:(0,q.jsxs)(`th`,{colSpan:`3`,scope:`colgroup`,children:[`商品 `,t+1]})}),G.Children.toArray([[`商品与销售计价说明`,`name`],[`商品编号`,`code`],[`克重/数量`,`quantity`],[`销售金价、工费与件数`,`pricing`],[`成交金额(含附加收费)`,`sale`],[`客户附加收费`,`charges`],[`货盘`,`pocket`],[`出库数量(对)`,`stockCount`],[`货品成本合计`,`cost`],[`进货料价与料费`,`material`],[`进货工费`,`labor`],[`其他货品成本`,`extra`],[`成本付款人`,`payers`]].map(([e,i])=>I(e,F(n.lines[t],i),F(r.lines[t],i))))]}))),s=G.Children.toArray((t.relatedOrders||[]).map(e=>(0,q.jsxs)(`section`,{classNameLine truncated
|
||||
`).map((e,t)=>(0,q.jsxs)(G.Fragment,{children:[t>0&&(0,q.jsx)(`br`,{}),e]},t))}function V(e){return e?ze(e):`待补齐`}function H(e){return e==null?`待补齐`:`¥`+He(e)}function U(e){try{return H(J.cents(e))}catch{return`金额未提供`}}function ee(e,{signed:t=!1,unknown:n=`未记录对数`}={}){return Number.isSafeInteger(e)?(t&&e>0?`+`:``)+e+`对`:n}function W(t){return!!t&&e?.pocketCatalog?.some(e=>e.key===t&&e.countUnit===`pair`)===!0}function te(t){return e?.pocketCatalog?.find(e=>e.key===t)?.name||String(t??``)}function ne(e){if(!e||!Array.isArray(e.lines)||!e.lines.length||!e.lines.every(e=>[`quantity`,`materialReturnedCost`,`laborRestockedCost`,`costLoss`].every(t=>Number.isSafeInteger(e[t])))||!e.summary||![`refundAmount`,`retainedAmount`,`materialReturnedCost`,`laborRestockedCost`,`costLoss`,`directCost`,`profit`,`profitAdjustment`].every(t=>Number.isSafeInteger(e.summary[t])))throw Error(`售后核算资料未完整返回,请重新读取订单。`);return e}function re(e,{preview:t=!1}={}){let n=ne(e),r=n.summary,i=e=>`¥`+He(e),a=[[`实际退款`,r.refundAmount],[`扣留客户款`,r.retainedAmount],[`回料池原料成本`,r.materialReturnedCost],[`现货保留工费`,r.laborRestockedCost],[`本单货品成本损失`,r.costLoss],[`售后最终利润`,r.profit],[`本次售后利润调整`,r.profitAdjustment]];return(0,q.jsxs)(`section`,{className:`order-after-sale-summary`+(t?` is-preview`:``),"aria-label":t?`售后核对预览`:`已保存售后详情`,children:[(0,q.jsxs)(`div`,{className:`panel-title`,children:[(0,q.jsx)(`h3`,{children:t?`售后核对预览`:`售后处理结果`}),(0,q.jsx)(`span`,{className:`badge`,children:t?`尚未保存`:`已记账`})]}),(0,q.jsx)(`dl`,{className:`order-after-sale-totals`,children:G.Children.toArray(a.map(([e,t])=>(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:e}),(0,q.jsx)(`dd`,{...t<0?{className:`danger-text`}:{},children:i(t)})]})))}),(0,q.jsx)(`div`,{className:`table-wrap`,children:(0,q.jsxs)(`table`,{"aria-label":`逐件售后回库与成本`,children:[(0,q.jsx)(`thead`,{children:(0,q.jsxs)(`tr`,{children:[(0,q.jsx)(`th`,{children:`商品与实际去向`}),(0,q.jsx)(`th`,{children:`实际退回`}),(0,q.jsx)(`th`,{children:`回料成本`}),(0,q.jsx)(`th`,{children:`保留工费`}),(0,q.jsx)(`th`,{children:`成本损失`})]})}),(0,q.jsx)(`tbody`,{children:G.Children.toArray(n.lines.map(e=>(0,q.jsxs)(`tr`,{children:[(0,q.jsxs)(`td`,{children:[e.name||`商品 `+(e.lineIndex+1),(0,q.jsxs)(`div`,{className:`small muted`,children:[te(e.pocket),` · `,e.disposition===`stock`?`完好现货`:`旧料/损坏`]})]}),(0,q.jsxs)(`td`,{children:[Oe(e.quantity),`g`,e.disposition===`stock`&&W(e.pocket)?(0,q.jsx)(`div`,{className:`small`,children:ee(e.stockCount)}):``]}),(0,q.jsx)(`td`,{children:i(e.materialReturnedCost)}),(0,q.jsx)(`td`,{children:i(e.laborRestockedCost)}),(0,q.jsx)(`td`,{children:i(e.costLoss)})]})))})]})}),(0,q.jsx)(`p`,{className:`small muted`,children:`实退材料按原成本回售后日料池,不新增采购付款。完好现货工费留在退回现货批次;旧料工费与未退回材料成本计损失。原单实际费用继续保留。`})]})}function ie(e){let t=e.action||`edit`,n=e.action_input||e.action_details||{};if(t===`edit`)return``;if(n.afterSale){let t=ve(e.after);return(0,q.jsxs)(`section`,{className:`order-change-action-summary`,children:[(0,q.jsx)(`h3`,{children:`本次售后申请`}),(0,q.jsxs)(`p`,{children:[`售后日期:`,n.date,` · 申请原因:`,e.reason]}),re(t,{preview:!0})]})}let r=[[`申请动作`,ce(e)],[`业务日期`,n.date||e.after.returned_date||e.after.date]];return n.amount!==void 0&&r.push([`本次金额`,U(n.amount)]),n.account&&r.push([`退款账户`,fe(n.account)]),n.payer&&r.push([`实际付款人`,V(n.payer)]),n.note&&r.push([`费用项目/说明`,n.note]),n.reference&&r.push([`退款凭据备注`,n.reference]),Array.isArray(n.returnCounts)&&r.push([`实际退回数量(对)`,n.returnCounts.map((e,t)=>`商品 `+(t+1)+`:`+ee(e==null?null:Number(e))).join(`
|
||||
`)]),Array.isArray(n.returnPockets)&&r.push([`退货实物去向`,n.returnPockets.map((t,n)=>`${e.before.lines[n]?.name||`商品 `+(n+1)}:${te(t)||`退供应商/不留黄金货盘`}`).join(`
|
||||
`)]),Array.isArray(n.fee_items)&&r.push([`本次旧费用`,n.fee_items.map(e=>`${e.note||`费用`}:${U(e.amount)} · ${V(e.payer)}支付`).join(`
|
||||
`)]),(0,q.jsxs)(`section`,{className:`order-change-action-summary`,children:[(0,q.jsx)(`h3`,{children:`本次申请动作`}),(0,q.jsx)(`dl`,{className:`order-change-action-facts`,children:G.Children.toArray(r.map(([e,t])=>(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:e}),(0,q.jsx)(`dd`,{children:B(t)})]})))}),(0,q.jsx)(`p`,{className:`small muted`,children:`下方对照为服务器试算;批准后才登记这笔变更,不会由系统发起真实收款、退款或转账。`})]})}function ae(e){let t=new Date(e);return Number.isNaN(t.getTime())?`时间未提供`:t.toLocaleString(`zh-CN`)}let oe={pending:`待店主复核`,approved:`已同意变更`,rejected:`已驳回`},se={edit:`修改订单`,expense:`费用补记`,fees:`旧费用核实`,refund:`退款`,return:`退货`,cost:`成本补录`};function ce(e){return(e.action_input||e.action_details)?.afterSale?`处理订单售后`:e.action_label||se[e.action||`edit`]||`订单变更`}let le={pending:`待店主复核`,approved:`已同意取消`,rejected:`已驳回`};function ue(e){let t=new Date(e);return Number.isNaN(t.getTime())?`时间未提供`:t.toLocaleString(`zh-CN`)}let de=e=>Ie.accountIdentity(Be(),e);function fe(e){let t=de(e);return t?ze(t.member)+t.channel:e}function pe(e){if(!e||![`total`,`netReceived`,`directCost`].every(t=>Number.isSafeInteger(e[t]))||![`goodsCost`,`profit`,`settlementDue`].every(t=>e[t]===null||Number.isSafeInteger(e[t]))||!Array.isArray(e.inventory)||!e.inventory.every(e=>typeof e.date==`string`&&typeof e.pocket==`string`&&Number.isSafeInteger(e.mg)))throw Error(`取消撤销摘要未完整返回,请重新读取订单。`);return e}function me(e=n){let t=Ee(e)?.data;if(!t?.eligible||t.pending||t.directToday!==!0||!/^\d{4}-\d{2}-\d{2}$/.test(t.directActionDate||``)||e.date!==t.directActionDate||e.price_lock_id||![`draft`,`confirmed`,`delivered`].includes(e.status))return!1;try{return pe(t.summary),!0}catch{return!1}}function he(t,r=e.today,i=n){let a=Ce(i)?.data;return[`expense`,`fees`,`refund`,`return`].includes(t)&&!!a&&!a.pending&&/^\d{4}-\d{2}-\d{2}$/.test(a.directActionDate||``)&&a.actions?.[t]?.directToday===!0&&i.date===a.directActionDate&&r===a.directActionDate&&!(o.action===t&&o.forceApproval)}function ge(t){return e.user.role===`assistant`&&[`expense`,`fees`,`refund`,`return`,`cost`].includes(t)}function _e(t,n=e.today){return ge(t)&&!he(t,n)}function ve(e){return e?.orderAfterSale||null}function ye(){return t?.user?.id||``}function be(e=n){return e&&i?.id===e.id&&i.user===ye()&&i.revision===e.revision?i:null}function xe(e=n){return be(e)?.data?.pending||e?.ownershipPending||null}function Se(){return t?.user?.id||``}function Ce(e=n){return e&&r?.id===e.id&&r.user===Se()&&r.revision===e.revision?r:null}function we(e){return Ce(e)?.data?.pending||e?.changePending||null}function Te(){return t?.user?.id||``}function Ee(e=n){return e&&a?.id===e.id&&a.user===Te()&&a.revision===e.revision?a:null}function De(e){return Ee(e)?.data?.pending||e.cancellationPending||null}function K(e){if([`afterSale`,`orderAfterSale`].includes(e.kind))return``;let t=e.printStatus?.printed;return(0,q.jsx)(`span`,{"data-print-kind":e.printStatus?.kind||(e.kind===`recovery`?`recovery`:`order`),"data-print-id":e.printStatus?.id||e.id,className:`document-print-badge `+(t?`is-printed`:`is-unprinted`),title:t?`已记录打印操作`:`尚未记录打印操作`,children:t?`✓ 已打印`:`未打印`})}let Oe=Ie.grams,ke=e=>String(e??``),Ae=new Intl.DateTimeFormat(`zh-CN`,{timeZone:`Asia/Shanghai`,year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,hourCycle:`h23`}),je=Ie.validDate;function Me(e){if(typeof e!=`string`||!/^\d{4}-\d{2}-\d{2}T(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d{1,3})?)?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/.test(e)||!je(e.slice(0,10)))return`未记录`;let t=new Date(e);if(Number.isNaN(t.getTime()))return`未记录`;let n=Object.fromEntries(Ae.formatToParts(t).map(e=>[e.type,e.value]));return`${n.year}-${n.month}-${n.day} ${n.hour}:${n.minute}`}function Ne(e){return(0,q.jsxs)(`div`,{className:`small muted order-entry-time`,children:[`录入时间(北京时间):`,Me(e.created)]})}function Pe(e){return![`afterSale`,`orderAfterSale`,`recovery`].includes(e.kind)&&Number.isSafeInteger(e.revision)&&e.revision>0&&e.reviewed_revision===e.revision}let Fe={draft:`旧草稿`,confirmed:`旧单待补齐`,delivered:`已完成`,returned:`已退货`,cancelled:`已取消`,after_sale:`售后`,recovery:`回收`},Le=e=>(0,q.jsx)(`span`,{className:`order-status `+([`draft`,`confirmed`].includes(e.status)?`danger-text`:`muted`),children:Fe[e.status]||e.status}),Re=(e,t,n=``,r={})=>(0,q.jsx)(`button`,{type:`button`,"data-action":t,className:n,...r,children:e});function ze(n){return e?.shopSettings?.members?.find(e=>e.member===n)?.label||e?.members?.find(e=>e.member===n)?.label||t?.loginOptions?.find(e=>e.member===n)?.label||{owner:`麦麦`,assistant:`娜娜`,assistant2:`小昊`}[n]||`待确认`}function Be(){return Ie.m
Line truncated
|
||||
`)}function a(){return e?.shopSettings?.storeName||e?.printing?.store||t?.brand?.storeName||`珠宝台账`}function o(e=!1,{historical:t=!1,selected:n=``}={}){let r=(t?V():H()).filter(e=>c()||e!==`assistant2`);e&&(r=[...r.filter(e=>e!==`owner`),...r.filter(e=>e===`owner`)]);let i=r.map(e=>[e,R(e)+(t&&!U(e)?`(已停用)`:``)]);return n&&V().includes(n)&&!r.includes(n)&&i.push([n,R(n)+`(已停用 · 原记录)`]),i}function s(){return e?.user?.member||t?.user?.member||(e?.user?.role===`owner`?`owner`:`assistant`)}function c(){return!!(e?.user?.member||e?.members?.some(e=>e.member===`assistant2`))}let l=Ie.validDate;function u(e){return e==null?`待确认`:`¥`+m(e)}function d(e){let{total:t,complete:n,amounts:r}=Oi.reimbursementAmounts(e,J.cents);return{total:t,complete:n,formula:r.map(e=>`¥`+m(e)).join(` + `)}}function f(e){return[...ee(),`owner`].filter(t=>e&&Object.hasOwn(e,t))}function p(e,t){let n=e.unknownCounts?.[t]||0;return n&&e.knownCounts?.[t]===0&&!e[t]&&!e.afterSaleCount?`待补齐`:(n?`已知 `:``)+`¥`+m(e[t])}let m=e=>e==null?`待补`:Ie.yuan(e);function h(e){return e.from===e.date?e.date:e.from+` 至 `+e.date}function g(e){let t=W(e);return t?R(t.member)+t.channel:e}function _(e,t,n=!1){return e===null?(n?`待核算(已核算 ¥`:`待补齐(已知 ¥`)+m(t)+`)`:`¥`+m(e)}function v(e){let t=e.summary,n=e.receiptsByOrderDate;return[a()+`三人账 · `+h(e),`利润留在店里,按订单归属分别记业绩。经营款各自管理;未导入真实期初经营款。`,...ne(e.peopleCount),`销售净额:`+p(t,`sale`),`本期净利润:`+p(t,`profit`),`本期实收:¥`+m(n.receipt)+`;本期实退:¥`+m(n.refund),...D(e),...O(e),...k(e),...A(e),`按实际付款人核对成本`,...f(e.payerCosts).flatMap(t=>{let n=e.payerCosts[t];return[R(t)+`:实际货品支出 `+y(n.goods,n.missingCount)+`;已付费用 ¥`+m(n.paidFees),...Ai(n).map(e=>e.date+` / `+x(e)+` / `+e.name+` / `+C(e))]}),`订单与售后`,...e.orderRows.map(e=>e.date+` / `+(e.paper_number||e.number||e.project)+` / `+(e.customer||`未填客户`)+` / `+R(e.member)+` / 销售 `+E(e,`sale`)+` / 净利润 `+E(e,`profit`)),`历史两人结算不计入团队新债务。`].join(`
|
||||
`)}function y(e,t=0){return t&&e===0?`待补齐`:(t?`已知 `:``)+`¥`+m(e)}function b(e){return[e.missingCount?e.missingCount+` 项成本待补齐`:``,e.pendingCount?e.pendingCount+` 项费用未入账,不计合计`:``].filter(Boolean).join(`;`)}function x(e){return e.materialPoolId?e.materialPoolId+` 购料`:e.kind===`afterSale`?`售后 · `+(e.customer||`未填客户`):(e.price_lock_id?`锁价 · `:``)+(e.paper_number||e.number||`锁价记录`)+(e.customer?` · `+e.customer:``)}function S(e){let t=e.calculation;return t?M(t.quantity)+`g × `+(t.rate==null?e.component===`material`?`每克料价待补齐`:`每克工费待补齐`:m(t.rate)+`元/克`)+(e.amount==null?``:` = `+m(e.amount)+`元`):``}function C(e){return e.kind===`pending`?`未入账`+(e.amount==null?`(金额待补)`:`(登记 ¥`+m(e.amount)+`)`):e.amount==null?`待补齐`:`¥`+m(e.amount)}function w(e){return e.costItems?.[0]?.payer?R(e.costItems[0].payer):`付款人待补`}let T={draft:`旧草稿`,confirmed:`旧单待补齐`,delivered:`已完成`,returned:`已退货`,cancelled:`已取消`,after_sale:`售后`,recovery:`回收`};function E(e,t){if(e.status===`draft`)return`未开单`;if(t===`goods`){let t=ji(e);return y(t.goods,t.missing)}return t===`paidFees`?`¥`+m(ji(e).paidFees):e[t]==null?e.known?.[t]?`已知 ¥`+m(e.known[t])+`(待补齐)`:`待补齐`:`¥`+m(e[t])}function D(e){let t=e.dailyProfits,n=e=>`销售净额 ¥${m(e.sales)} / 成本 ${_(e.totalCost,e.knownTotalCost)} / 利润 ${_(e.profit,e.knownProfit,!0)}`;return[`每日利润表(按日期与订单归属人;普通订单按开单日、锁价成单按交付日、售后按记录日)`,...t.rows.length?t.rows.map(e=>`${e.date} / ${e.name} / ${n(e)}`):[`所选范围暂无订单或售后记录。`],`所选范围合计:${n(t.summary)}`,``]}function O(e){return[`按订单归属核对净收入(收款减退款,已含他人代收,尚未扣成本与费用)`,...ke(e).flatMap(t=>{let n=e.ownershipReceipts[t];return[`${n.name}所属订单净收入:¥${m(n.net)};实收 ¥${m(n.receipt)};实退 ¥${m(n.refund)}`,...n.accounts.map(e=>`${e.recipient===n.member?`本人收款`:`他人代收`} / ${g(e.account)}:实收 ¥${m(e.receipt)},实退 ¥${m(e.refund)},净额 ¥${m(e.net)}`),...re(e.ownershipBusiness[t]),``]})]}function k(e){let t={date:e.date,from:e.from,month:n},r=e.dailyFunds;if(r?.team)return[`每日报销单(按报销日期归集,已批准报销不在当日订单往来重复相加)`,...r.reimbursements.flatMap(e=>[`${e.date} / ${e.requester_name} / ${z[e.status]} / 合计 ¥${m(e.total)}`,...e.items.map(e=>`${e.name}:¥${m(e.amount)}`)]),``];if(!r||r.rangeUnsupported)return[`每天转账核对`,`尚未取得完整转账资料,不输出应转金额。`,``];try{Ee(r,t)}catch{return[`每天转账核对`,`资料未完整返回,不输出应转金额。`,``]}let i=[`每天转账核对(应转合计,未扣已转)`,`${R(`owner`)}实收 ¥${m(r.ownerReceipts.receipt)} − 实退 ¥${m(r.ownerReceipts.refund)} = 净收款 ¥${m(r.ownerReceipts.net)}`];r.ready?i.push(`${R(`owner`)}净收款 ¥${m(r.ownerReceipts.net)} − 确认完整对外支出 ¥${m(r.actualOutlay)} + 已批准报销 ¥${m(r.approvedReimbursements)} = 应转合计 ¥${m(r.transferAmount)}`,r.transferAmount>0?`方向:`+R(`owner`)+`转`+R(`assistant`):r.transferAmount<0?`方向:`+R(`assistant`)+`转`+R(`owner`):`方向:无需转款`):i.push(`当天完整支出尚未全部确认,暂不输出完整应转合计。`,...r.missingDates.length?[`待确认日期:`+r.missingDates.join(`、`)]:[],...r.staleDates.length?[`来源变动待重新确认:`+r.staleDates.join(`、`)]:[]),i.push(`不要与旧按单/剩料待结重复相加;报销与确认不扣订单利润。`,`已批准报销项目(按报销日期归集)`);let a=r.reimbursements.filter(e=>e.status===`approved`);return i.push(...a.length?a.flatMap(e=>[`${e.date} / ${e.requester_name} / 合计 ¥${m(e.total)} / ${e.reviewer_name||R(`owner`)}复核`,...e.items.map(e=>`${e.name}:¥${m(e.amount)}`)]):[`本期暂无已批准报销。`],``),i}function A(e){return[`按收款人汇总(普通订单按开单日归集当前收付,锁价按实际收付日归集;负数为冲回)`,...f(e.recipientReceipts).flatMap(t=>{let n=e.recipientReceipts[t];return[`${n.name}总收款:¥${m(n.receipt)};退款 ¥${m(n.refund)};净收款 ¥${m(n.net)}`,...[`receipt`,`refund`].flatMap(e=>{let t=n.items.filter(t=>t.kind===e),r=e===`receipt`?`收款`:`退款`;return[`${n.name}${r}明细(日期为实际${r}日):`,...t.length?t.map(e=>`${e.date} / ${ie(e)} / ${e.paper_number||e.number||(e.price_lock_id?`锁价记录`:`订单记录`)} / 客户 ${e.customer||`未填客户称呼`} / ${g(e.account)} / ${ae(e)} ¥${m(e.amount)}${e.reference||e.note?` / `+(e.reference||e.note):``}`):[`所选范围没有`+n.name+r+`记录。`],`${r}明细合计:¥${m(n[e])}`]}),``]})]}function j(e){if(!e?.summary?.eventCount)retu
Line truncated
|
||||
-1
@@ -1 +0,0 @@
|
||||
.private-ops-page{padding-bottom:24px}.ops-panel{background:var(--white);border:1px solid var(--border);border-radius:12px;min-width:0;margin-bottom:16px;padding:20px}.ops-panel h2{color:var(--ink);margin:0 0 12px;font-size:17px}.ops-heading{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px;display:flex}.ops-heading h2{margin:0}.ops-panel small{color:var(--muted);font-weight:400;display:block}.ops-panel p,.private-people-modal p{margin:10px 0}.ops-scroll{width:100%;overflow:auto}.ops-scroll table{border-collapse:collapse;width:100%;color:var(--ink);font-variant-numeric:tabular-nums}.ops-scroll th,.ops-scroll td{border-bottom:1px solid var(--border);text-align:right;white-space:nowrap;padding:9px}.ops-scroll thead{background:var(--paper)}.ops-scroll :is(th,td):first-child{text-align:left}.ops-form label{color:var(--ink);flex-direction:column;gap:4px;font-weight:500;display:flex}.ops-form input,.ops-form select{border:1px solid var(--border-strong);color:var(--ink);background:var(--white);font:inherit;border-radius:7px;width:100%;min-width:0;height:38px;padding:0 8px}.ops-filter,.ops-actions{flex-wrap:wrap;align-items:end;gap:8px;display:flex}.ops-filter{gap:14px}.ops-fields{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;display:grid}.ops-form .ops-actions{margin-top:10px}.private-people-modal .ant-alert{margin:10px 0}@media (width<=600px){.ops-panel{padding:12px}.ops-filter label{flex:125px}}.private-people-modal{border:1px solid var(--border);width:min(520px,100% - 24px);max-height:90dvh;color:var(--ink);background:var(--white);border-radius:12px;padding:24px;overflow:auto;box-shadow:0 16px 48px #233d3533}.private-people-modal::backdrop{background:#1b2b246b}.private-people-modal h2{margin:0;font-size:20px}.team-month-field{gap:6px;display:grid}.team-profits-page .ant-card-head{flex-wrap:wrap}.team-profits-page .ant-card-head-wrapper{flex-wrap:wrap;gap:4px 12px}.team-profits-page .ant-card-head h2{margin:0;font-size:16px}.team-profits-page .ant-card-extra{font-size:12px}.team-profit-table{overflow-x:auto}.team-profit-table table{border-collapse:collapse;font-variant-numeric:tabular-nums;width:100%}.team-profit-table th,.team-profit-table td{border-bottom:1px solid var(--border);text-align:right;padding:10px 8px}.team-profit-table th:first-child,.team-profit-table td:first-child{text-align:left}.team-profit-table thead{background:var(--soft)}.recoveries-page{color:var(--ink,#233832);min-width:0}.recoveries-page [hidden]{display:none!important}.recoveries-page h1,.recoveries-page h2,.recoveries-page h3{margin:0}.recoveries-page h1{font-size:clamp(1.9rem,4vw,3rem)}.recoveries-page p{color:var(--muted,#596963);line-height:1.55}.recoveries-page .panel,.recoveries-page .stock-review-status{background:var(--surface,#fff);border:1px solid var(--line,#dce4df);border-radius:12px;margin-block:14px;padding:18px}.recoveries-page .panel-title,.recoveries-page .actions,.recoveries-page .form-actions,.recoveries-page .stock-history-filters{flex-wrap:wrap;align-items:center;gap:10px;display:flex}.recoveries-page .panel-title{justify-content:space-between}.recoveries-page .recovery-row{grid-template-columns:repeat(auto-fit,minmax(min(135px,100%),1fr));gap:12px;display:grid}.recoveries-page label{align-content:start;gap:5px;margin-block:8px;display:grid}.recoveries-page label:has([type=checkbox]){align-items:center;display:flex}.recoveries-page input,.recoveries-page select,.recoveries-page textarea,.recoveries-page button{font:inherit}.recoveries-page input:not([type=checkbox]),.recoveries-page select,.recoveries-page textarea{width:100%;min-width:0;color:inherit;box-sizing:border-box;background:#fff;border:1px solid #b9c6bf;border-radius:6px;padding:8px}.recoveries-page fieldset{border:0;min-width:0;margin:0;padding:0}.recoveries-page button{cursor:pointer;color:inherit;background:#fff;border:1px solid #b9c6bf;border-radius:7px;margin:2px;padding:7px 12px}.recoveries-page button:disabled{cursor:default;opacity:.48}.recoveries-page .primary,.recoveries-page button[aria-pressed=true]{color:#fff;background:#254f46}.recoveries-page .table-wrap{overflow:auto}.recoveries-page table{border-collapse:collapse;text-align:left;width:100%}.recoveries-page td,.recoveries-page th{vertical-align:top;border-bottom:1px solid #dde4df;padding:9px}.recoveries-page th{white-space:nowrap}.recoveries-page dialog{width:100%;max-width:min(720px,94vw);max-height:86dvh;color:inherit;box-sizing:border-box;border:1px solid #dce4df;border-radius:13px;padding:24px;position:fixed;overflow:auto}.recoveries-page dialog::backdrop{background:#18332b55}.recoveries-page .dialog-close{float:right}.recoveries-page .error{color:#9a372c}.recoveries-page .recovery-net{align-items:center;gap:18px;display:flex}.recoveries-page .recovery-net strong{font-size:1.5rem}.recoveries-page .modified{background:#fff8e7}.recoveries-page table td{white-space:pre-line}.recoveries-page .recovery-new-product{border-top:1px solid #dceLine truncated
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
import{n as e}from"./rolldown-runtime-Dl_DZoUm.js";import{i as t,r as n}from"./react-1o5M9n0k.js";import{$ as r,B as i,C as a,Cn as o,D as s,Dn as c,En as l,G as u,Gt as d,H as f,J as p,Kt as m,M as h,N as g,O as _,St as v,Tn as y,Tt as b,Ut as x,V as S,Xt as C,Z as w,Zt as T,_t as E,at as D,bn as O,bt as k,cn as A,dn as j,dt as M,gn as N,hn as P,ht as F,i as I,in as L,it as R,j as z,ln as ee,lt as B,mn as V,mt as te,n as ne,nn as H,nt as U,ot as W,pn as G,qt as K,rn as re,t as ie,tn as q,un as ae,wn as oe,xn as J,y as se}from"./skeleton-B4Z0R3jQ.js";import{_ as ce,a as le,b as ue,c as de,g as fe,i as pe,l as me,o as he,r as ge,s as _e,v as ve,x as ye,y as be}from"./typography-xRg_3Gco.js";var Y=new x(`antSlideUpIn`,{"0%":{transform:`scaleY(0.8)`,transformOrigin:`0% 0%`,opacity:0},"100%":{transform:`scaleY(1)`,transformOrigin:`0% 0%`,opacity:1}}),xe=new x(`antSlideUpOut`,{"0%":{transform:`scaleY(1)`,transformOrigin:`0% 0%`,opacity:1},"100%":{transform:`scaleY(0.8)`,transformOrigin:`0% 0%`,opacity:0}}),X=new x(`antSlideDownIn`,{"0%":{transform:`scaleY(0.8)`,transformOrigin:`100% 100%`,opacity:0},"100%":{transform:`scaleY(1)`,transformOrigin:`100% 100%`,opacity:1}}),Z=new x(`antSlideDownOut`,{"0%":{transform:`scaleY(1)`,transformOrigin:`100% 100%`,opacity:1},"100%":{transform:`scaleY(0.8)`,transformOrigin:`100% 100%`,opacity:0}}),Se=new x(`antSlideLeftIn`,{"0%":{transform:`scaleX(0.8)`,transformOrigin:`0% 0%`,opacity:0},"100%":{transform:`scaleX(1)`,transformOrigin:`0% 0%`,opacity:1}}),Ce=new x(`antSlideLeftOut`,{"0%":{transform:`scaleX(1)`,transformOrigin:`0% 0%`,opacity:1},"100%":{transform:`scaleX(0.8)`,transformOrigin:`0% 0%`,opacity:0}}),we=new x(`antSlideRightIn`,{"0%":{transform:`scaleX(0.8)`,transformOrigin:`100% 0%`,opacity:0},"100%":{transform:`scaleX(1)`,transformOrigin:`100% 0%`,opacity:1}}),Te=new x(`antSlideRightOut`,{"0%":{transform:`scaleX(1)`,transformOrigin:`100% 0%`,opacity:1},"100%":{transform:`scaleX(0.8)`,transformOrigin:`100% 0%`,opacity:0}}),Ee={"slide-up":{inKeyframes:Y,outKeyframes:xe},"slide-down":{inKeyframes:X,outKeyframes:Z},"slide-left":{inKeyframes:Se,outKeyframes:Ce},"slide-right":{inKeyframes:we,outKeyframes:Te}},De=(e,t)=>{let{antCls:n}=e,r=`${n}-${t}`,{inKeyframes:i,outKeyframes:o}=Ee[t];return[a(r,i,o,e.motionDurationMid),{[`
|
||||
${r}-enter,
|
||||
${r}-appear
|
||||
`]:{transform:`scale(0)`,transformOrigin:`0% 0%`,opacity:0,animationTimingFunction:e.motionEaseOutQuint,"&-prepare":{transform:`scale(1)`}},[`${r}-leave`]:{animationTimingFunction:e.motionEaseInQuint}}]},Q=e(t()),$=e(c()),Oe=[`prefixCls`,`invalidate`,`item`,`renderItem`,`responsive`,`responsiveDisabled`,`registerSize`,`itemKey`,`className`,`style`,`children`,`display`,`order`,`component`],ke=void 0;function Ae(e,t){var n=e.prefixCls,r=e.invalidate,i=e.item,a=e.renderItem,o=e.responsive,s=e.responsiveDisabled,c=e.registerSize,u=e.itemKey,d=e.className,f=e.style,p=e.children,m=e.display,h=e.order,g=e.component,_=g===void 0?`div`:g,v=T(e,Oe),y=o&&!m;function b(e){c(u,e)}Q.useEffect(function(){return function(){b(null)}},[]);var x=a&&i!==ke?a(i,{index:h}):p,S;r||(S={opacity:+!y,height:y?0:ke,overflowY:y?`hidden`:ke,order:o?h:ke,pointerEvents:y?`none`:ke,position:y?`absolute`:ke});var C={};y&&(C[`aria-hidden`]=!0);var w=Q.createElement(_,l({className:(0,$.default)(!r&&n,d),style:O(O({},S),f)},C,v,{ref:t}),x);return o&&(w=Q.createElement(ye,{onResize:function(e){b(e.offsetWidth)},disabled:s},w)),w}var je=Q.forwardRef(Ae);je.displayName=`Item`;var Me=e(n());function Ne(e){if(typeof MessageChannel>`u`)H(e);else{var t=new MessageChannel;t.port1.onmessage=function(){return e()},t.port2.postMessage(void 0)}}function Pe(){var e=Q.useRef(null);return function(t){e.current||(e.current=[],Ne(function(){(0,Me.unstable_batchedUpdates)(function(){e.current.forEach(function(e){e()}),e.current=null})})),e.current.push(t)}}function Fe(e,t){var n=Q.useState(t),r=q(n,2),i=r[0],a=r[1];return[i,E(function(t){e(function(){a(t)})})]}var Ie=Q.createContext(null),Le=[`component`],Re=[`className`],ze=[`className`],Be=Q.forwardRef(function(e,t){var n=Q.useContext(Ie);if(!n){var r=e.component,i=r===void 0?`div`:r,a=T(e,Le);return Q.createElement(i,l({},a,{ref:t}))}var o=n.className,s=T(n,Re),c=e.className,u=T(e,ze);return Q.createElement(Ie.Provider,{value:null},Q.createElement(je,l({ref:t,className:(0,$.default)(o,c)},s,u)))});Be.displayName=`RawItem`;var Ve=[`prefixCls`,`data`,`renderItem`,`renderRawItem`,`itemKey`,`itemWidth`,`ssr`,`style`,`className`,`maxCount`,`renderRest`,`renderRawRest`,`prefix`,`suffix`,`component`,`itemComponent`,`onVisibleChange`],He=`responsive`,Ue=`invalidate`;function We(e){return`+ ${e.length} ...`}function Ge(e,t){var n=e.prefixCls,r=n===void 0?`rc-overflow`:n,i=e.data,a=i===void 0?[]:i,o=e.renderItem,s=e.renderRawItem,c=e.itemKey,u=e.itemWidth,f=u===void 0?10:u,p=e.ssr,m=e.style,h=e.className,g=e.maxCount,_=e.renderRest,v=e.renderRawRest,y=e.prefix,b=e.suffix,x=e.component,S=x===void 0?`div`:x,C=e.itemComponent,w=e.onVisibleChange,E=T(e,Ve),D=p===`full`,k=Pe(),A=Fe(k,null),j=q(A,2),M=j[0],N=j[1],P=M||0,F=Fe(k,new Map),I=q(F,2),L=I[0],R=I[1],z=Fe(k,0),ee=q(z,2),B=ee[0],V=ee[1],te=Fe(k,0),ne=q(te,2),H=ne[0],U=ne[1],W=Fe(k,0),G=q(W,2),K=G[0],re=G[1],ie=Fe(k,0),ae=q(ie,2),oe=ae[0],J=ae[1],se=(0,Q.useState)(null),ce=q(se,2),le=ce[0],ue=ce[1],de=(0,Q.useState)(null),fe=q(de,2),pe=fe[0],me=fe[1],he=Q.useMemo(function(){return pe===null&&D?2**53-1:pe||0},[pe,M]),ge=(0,Q.useState)(!1),_e=q(ge,2),ve=_e[0],be=_e[1],Y=`${r}-item`,xe=Math.max(B,H),X=g===He,Z=a.length&&X,Se=g===Ue,Ce=Z||typeof g==`number`&&a.length>g,we=(0,Q.useMemo)(function(){var e=a;return Z?e=M===null&&D?a:a.slice(0,Math.min(a.length,P/f)):typeof g==`number`&&(e=a.slice(0,g)),e},[a,f,M,g,Z]),Te=(0,Q.useMemo)(function(){return Z?a.slice(he+1):a.slice(we.length)},[a,we,Z,he]),Ee=(0,Q.useCallback)(function(e,t){return typeof c==`function`?c(e):(c&&e?.[c])??t},[c]),De=(0,Q.useCallback)(o||function(e){return e},[o]);function Oe(e,t,n){(pe!==e||t!==void 0&&t!==le)&&(me(e),n||(be(e<a.length-1),w?.(e)),t!==void 0&&ue(t))}function ke(e,t){N(t.clientWidth)}function Ae(e,t){R(function(n){var r=new Map(n);return t===null?r.delete(e):r.set(e,t),r})}function Me(e,t){U(t),V(H)}function Ne(e,t){re(t)}function Le(e,t){J(t)}function Re(e){return L.get(Ee(we[e],e))}d(function(){if(P&&typeof xe==`number`&&we){var e=K+oe,t=we.length,n=t-1;if(!t){Oe(0,null);return}for(var r=0;r<t;r+=1){var i=Re(r);if(D&&(i||=0),i===void 0){Oe(r-1,void 0,!0);break}if(e+=i,n===0&&e<=P||r===n-1&&e+Re(n)<=P){Oe(n,null);break}if(e+xe>P){Oe(r-1,e-i-oe+H);break}}b&&Re(0)+oe>P&&ue(null)}},[P,L,H,K,oe,Ee,we]);var ze=ve&&!!Te.length,Be={};le!==null&&Z&&(Be={position:`absolute`,left:le,top:0});var Ge={prefixCls:Y,responsive:Z,component:C,invalidate:Se},Ke=s?function(e,t){var n=Ee(e,t);return Q.createElement(Ie.Provider,{key:n,value:O(O({},Ge),{},{order:t,item:e,itemKey:n,registerSize:Ae,display:t<=he})},s(e,t))}:function(e,t){var n=Ee(e,t);return Q.createElement(je,l({},Ge,{order:t,key:n,item:e,renderItem:De,itemKey:n,registerSize:Ae,display:t<=he}))},qe={order:ze?he:2**53-1,className:`${Y}-rest`,registerSize:Me,display:ze},Je=_||We,Ye=v?Q.createElement(Ie.Provider,{value:O(O({},Ge),qe)},v(Te)):Q.createElement(je,l({},Ge,qe),typeof Je==`function`?Je(Te):Je),Xe=Q.createElement(S,l({className:(0
Line truncated
|
||||
right ${e.motionDurationSlow}`}},[`${t}-nav-wrap`]:{"&::before, &::after":{top:0,bottom:0,width:e.controlHeight},"&::before":{left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowLeft},"&::after":{right:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowRight},[`&${t}-nav-wrap-ping-left::before`]:{opacity:1},[`&${t}-nav-wrap-ping-right::after`]:{opacity:1}}}},[`${t}-top`]:{[`> ${t}-nav,
|
||||
> div > ${t}-nav`]:{"&::before":{bottom:0},[`${t}-ink-bar`]:{bottom:0}}},[`${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{order:1,marginTop:n,marginBottom:0,"&::before":{top:0},[`${t}-ink-bar`]:{top:0}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{order:0}},[`${t}-left, ${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{flexDirection:`column`,minWidth:s(e.controlHeight).mul(1.25).equal(),[`${t}-tab`]:{padding:a,textAlign:`center`},[`${t}-tab + ${t}-tab`]:{margin:o},[`${t}-nav-wrap`]:{flexDirection:`column`,"&::before, &::after":{right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},height:e.controlHeight},"&::before":{top:0,boxShadow:e.boxShadowTabsOverflowTop},"&::after":{bottom:0,boxShadow:e.boxShadowTabsOverflowBottom},[`&${t}-nav-wrap-ping-top::before`]:{opacity:1},[`&${t}-nav-wrap-ping-bottom::after`]:{opacity:1}},[`${t}-ink-bar`]:{width:e.lineWidthBold,"&-animated":{transition:`height ${e.motionDurationSlow}, top ${e.motionDurationSlow}`}},[`${t}-nav-list, ${t}-nav-operations`]:{flex:`1 0 auto`,flexDirection:`column`}}},[`${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-ink-bar`]:{right:{_skip_check_:!0,value:0}}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{marginLeft:{_skip_check_:!0,value:K(s(e.lineWidth).mul(-1).equal())},borderLeft:{_skip_check_:!0,value:`${K(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},[`> ${t}-content > ${t}-tabpane`]:{paddingLeft:{_skip_check_:!0,value:e.paddingLG}}}},[`${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{order:1,[`${t}-ink-bar`]:{left:{_skip_check_:!0,value:0}}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{order:0,marginRight:{_skip_check_:!0,value:s(e.lineWidth).mul(-1).equal()},borderRight:{_skip_check_:!0,value:`${K(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},[`> ${t}-content > ${t}-tabpane`]:{paddingRight:{_skip_check_:!0,value:e.paddingLG}}}}}},Dr=e=>{let{componentCls:t,cardPaddingSM:n,cardPaddingLG:r,cardHeightSM:i,cardHeightLG:a,horizontalItemPaddingSM:o,horizontalItemPaddingLG:s}=e;return{[t]:{"&-small":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:o,fontSize:e.titleFontSizeSM}}},"&-large":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:s,fontSize:e.titleFontSizeLG,lineHeight:e.lineHeightLG}}}},[`${t}-card`]:{[`&${t}-small`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:n},[`${t}-nav-add`]:{minWidth:i,minHeight:i}},[`&${t}-bottom`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`0 0 ${K(e.borderRadius)} ${K(e.borderRadius)}`}},[`&${t}-top`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`${K(e.borderRadius)} ${K(e.borderRadius)} 0 0`}},[`&${t}-right`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${K(e.borderRadius)} ${K(e.borderRadius)} 0`}}},[`&${t}-left`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${K(e.borderRadius)} 0 0 ${K(e.borderRadius)}`}}}},[`&${t}-large`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:r},[`${t}-nav-add`]:{minWidth:a,minHeight:a}}}}}},Or=e=>{let{componentCls:t,itemActiveColor:n,itemHoverColor:r,iconCls:i,tabsHorizontalItemMargin:a,horizontalItemPadding:o,itemSelectedColor:s,itemColor:c}=e,l=`${t}-tab`;return{[l]:{position:`relative`,WebkitTouchCallout:`none`,WebkitTapHighlightColor:`transparent`,display:`inline-flex`,alignItems:`center`,padding:o,fontSize:e.titleFontSize,background:`transparent`,border:0,outline:`none`,cursor:`pointer`,color:c,"&-btn, &-remove":{"&:focus:not(:focus-visible), &:active":{color:n}},"&-btn":{outline:`none`,transition:`all ${e.motionDurationSlow}`,[`${l}-icon:not(:last-child)`]:{marginInlineEnd:e.marginSM}},"&-remove":Object.assign({flex:`none`,lineHeight:1,marginRight:{_skip_check_:!0,value:e.calc(e.marginXXS).mul(-1).equal()},marginLeft:{_skip_check_:!0,value:e.marginXS},color:e.colorIcon,fontSize:e.fontSizeSM,background:`transparent`,border:`none`,outline:`none`,cursor:`pointer`,transition:`all ${e.motionDurationSlow}`,"&:hover":{color:e.colorTextHeading}},W(e)),"&:hover":{color:r},[`&${l}-active ${l}-btn`]:{color:s,textShadow:e.tabsActiveTextShadow},[`&${l}-focus ${l}-btn:focus-visible`]:D(e),[`&${l}-disabled`]:{color:e.colorTextDisabled,cursor:`not-allowed`},[`&${l}-disabled ${l}-btn, &${l}-disabled ${t}-remove`]:{"&:focus, &:active":{color:e.colorTextDisabled}},[`& ${l}-remove ${i}`]:{margin:0,verticalAlign:`middle`},[`${i}:not(:last-child)`]:{marginRight:{_skip_check_:!0,value:e.marginSM}}},[`${l} + ${l}`]:{margin:{_skip_check_:!0,value:a}}}},kr=e=>{let{componentCls:t,tabsHorizontalItemMarginRTL:n,iconCls:r,cardGutter:i,calc:a}=e;return{[`${t}-rtl`]:{direction:`rtl`,[`${t}-nav`]:{[`${t}-tab`]:{margin:{_skip_check_:!0,value:n},[`${t}-tab:last-of-type`]:{marginLeft:{_skip_check_:!0,value:0}},[r]:{marginRight:{_skip_check_:!0,value:0},marginLeft:{_skip_check_:!0,value:K(e.marginSM)}},[`${t}-tab-remove`]:{marginRight:{_skip_check_:!0,value:K(e.marginXS)},marginLeft:{_skip_check_:!0,value:K(a(e.marginXXS).mul(-1).equal())},[r]:{margin:0}}}},[`&${t}-left`]:{[`> ${t}-nav`]:{order:1},[`> ${t}-content-holder`]:{order:0}},[`&${t}-right`]:{[`> ${t}-nav`]
Line truncated
|
||||
> ${n}-typography,
|
||||
> ${n}-typography-edit-content
|
||||
`]:{insetInlineStart:0,marginTop:0,marginBottom:0}}),[`${t}-tabs-top`]:{clear:`both`,marginBottom:a,color:e.colorText,fontWeight:`normal`,fontSize:e.fontSize,"&-bar":{borderBottom:`${K(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`}}})},Rr=e=>{let{cardPaddingBase:t,colorBorderSecondary:n,cardShadow:r,lineWidth:i}=e;return{width:`33.33%`,padding:t,border:0,borderRadius:0,boxShadow:`
|
||||
${K(i)} 0 0 0 ${n},
|
||||
0 ${K(i)} 0 0 ${n},
|
||||
${K(i)} ${K(i)} 0 0 ${n},
|
||||
${K(i)} 0 0 0 ${n} inset,
|
||||
0 ${K(i)} 0 0 ${n} inset;
|
||||
`,transition:`all ${e.motionDurationMid}`,"&-hoverable:hover":{position:`relative`,zIndex:1,boxShadow:r}}},zr=e=>{let{componentCls:t,iconCls:n,actionsLiMargin:r,cardActionsIconSize:i,colorBorderSecondary:a,actionsBg:o}=e;return Object.assign(Object.assign({margin:0,padding:0,listStyle:`none`,background:o,borderTop:`${K(e.lineWidth)} ${e.lineType} ${a}`,display:`flex`,borderRadius:`0 0 ${K(e.borderRadiusLG)} ${K(e.borderRadiusLG)}`},R()),{"& > li":{margin:r,color:e.colorTextDescription,textAlign:`center`,"> span":{position:`relative`,display:`block`,minWidth:e.calc(e.cardActionsIconSize).mul(2).equal(),fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:`pointer`,"&:hover":{color:e.colorPrimary,transition:`color ${e.motionDurationMid}`},[`a:not(${t}-btn), > ${n}`]:{display:`inline-block`,width:`100%`,color:e.colorIcon,lineHeight:K(e.fontHeight),transition:`color ${e.motionDurationMid}`,"&:hover":{color:e.colorPrimary}},[`> ${n}`]:{fontSize:i,lineHeight:K(e.calc(i).mul(e.lineHeight).equal())}},"&:not(:last-child)":{borderInlineEnd:`${K(e.lineWidth)} ${e.lineType} ${a}`}}})},Br=e=>Object.assign(Object.assign({margin:`${K(e.calc(e.marginXXS).mul(-1).equal())} 0`,display:`flex`},R()),{"&-avatar":{paddingInlineEnd:e.padding},"&-detail":{overflow:`hidden`,flex:1,"> div:not(:last-child)":{marginBottom:e.marginXS}},"&-title":Object.assign({color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG},M),"&-description":{color:e.colorTextDescription}}),Vr=e=>{let{componentCls:t,colorFillAlter:n,headerPadding:r,bodyPadding:i}=e;return{[`${t}-head`]:{padding:`0 ${K(r)}`,background:n,"&-title":{fontSize:e.fontSize}},[`${t}-body`]:{padding:`${K(e.padding)} ${K(i)}`}}},Hr=e=>{let{componentCls:t}=e;return{overflow:`hidden`,[`${t}-body`]:{userSelect:`none`}}},Ur=e=>{let{componentCls:t,cardShadow:n,cardHeadPadding:r,colorBorderSecondary:i,boxShadowTertiary:a,bodyPadding:o,extraColor:s}=e;return{[t]:Object.assign(Object.assign({},B(e)),{position:`relative`,background:e.colorBgContainer,borderRadius:e.borderRadiusLG,[`&:not(${t}-bordered)`]:{boxShadow:a},[`${t}-head`]:Lr(e),[`${t}-extra`]:{marginInlineStart:`auto`,color:s,fontWeight:`normal`,fontSize:e.fontSize},[`${t}-body`]:{padding:o,borderRadius:`0 0 ${K(e.borderRadiusLG)} ${K(e.borderRadiusLG)}`},[`${t}-grid`]:Rr(e),[`${t}-cover`]:{"> *":{display:`block`,width:`100%`,borderRadius:`${K(e.borderRadiusLG)} ${K(e.borderRadiusLG)} 0 0`}},[`${t}-actions`]:zr(e),[`${t}-meta`]:Br(e)}),[`${t}-bordered`]:{border:`${K(e.lineWidth)} ${e.lineType} ${i}`,[`${t}-cover`]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},[`${t}-hoverable`]:{cursor:`pointer`,transition:`box-shadow ${e.motionDurationMid}, border-color ${e.motionDurationMid}`,"&:hover":{borderColor:`transparent`,boxShadow:n}},[`${t}-contain-grid`]:{borderRadius:`${K(e.borderRadiusLG)} ${K(e.borderRadiusLG)} 0 0 `,[`${t}-body`]:{display:`flex`,flexWrap:`wrap`},[`&:not(${t}-loading) ${t}-body`]:{marginBlockStart:e.calc(e.lineWidth).mul(-1).equal(),marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),padding:0}},[`${t}-contain-tabs`]:{[`> div${t}-head`]:{minHeight:0,[`${t}-head-title, ${t}-extra`]:{paddingTop:r}}},[`${t}-type-inner`]:Vr(e),[`${t}-loading`]:Hr(e),[`${t}-rtl`]:{direction:`rtl`}}},Wr=e=>{let{componentCls:t,bodyPaddingSM:n,headerPaddingSM:r,headerHeightSM:i,headerFontSizeSM:a}=e;return{[`${t}-small`]:{[`> ${t}-head`]:{minHeight:i,padding:`0 ${K(r)}`,fontSize:a,[`> ${t}-head-wrapper`]:{[`> ${t}-extra`]:{fontSize:e.fontSize}}},[`> ${t}-body`]:{padding:n}},[`${t}-small${t}-contain-tabs`]:{[`> ${t}-head`]:{[`${t}-head-title, ${t}-extra`]:{paddingTop:0,display:`flex`,alignItems:`center`}}}}},Gr=U(`Card`,e=>{let t=te(e,{cardShadow:e.boxShadowCard,cardHeadPadding:e.padding,cardPaddingBase:e.paddingLG,cardActionsIconSize:e.fontSize});return[Ur(t),Wr(t)]},e=>({headerBg:`transparent`,headerFontSize:e.fontSizeLG,headerFontSizeSM:e.fontSize,headerHeight:e.fontSizeLG*e.lineHeightLG+e.padding*2,headerHeightSM:e.fontSize*e.lineHeight+e.paddingXS*2,actionsBg:e.colorBgContainer,actionsLiMargin:`${e.paddingSM}px 0`,tabsMarginBottom:-e.padding-e.lineWidth,extraColor:e.colorText,bodyPaddingSM:12,headerPaddingSM:12,bodyPadding:e.bodyPadding??e.paddingLG,headerPadding:e.headerPadding??e.paddingLG})),Kr=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},qr=e=>{let{actionClasses:t,actions:n=[],actionStyle:r}=e;return Q.createElement(`ul`,{className:t,style:r},n.map((e,t)=>{let r=`action-${t}`;return Q.createElement(`li`,{style:{width:`${100/n.length}%`},key:r},Q.createElement(`span`,null,e))}))},Jr=Q.forwardRef((e,t)=>{let{prefixCls:n,className:r,rootClassName:i,style:a,extra:o,headStyle:s={},bodyStyle:c={},title:l,loading:u,bordered:d,var
Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{a as e,n as t}from"./index-D-ox0wtk.js";function n(e,t,n){let r=e=>Number.isSafeInteger(e)&&e>=0,i=e=>e===null||r(e);if(!e||e.date!==t.date||e.member!==t.member||!Array.isArray(e.entries)||e.entries.length!==t.entries.length||!Array.isArray(e.pools))throw Error(`分来源料费未完整返回,请刷新料价。`);for(let a of t.entries){let o=e.entries.find(e=>e.lineIndex===a.lineIndex);if(!o||o.poolId!==a.poolId||o.mg!==a.mg||!i(o.amount)||!Array.isArray(o.allocations)||!Array.isArray(o.materialSources)||o.materialSources.reduce((e,t)=>e+t.quantity,0)!==o.mg)throw Error(`分来源料费与当前商品不一致,请重新核对。`);for(let e of o.materialSources)if(![`personal_recovery`,`public`].includes(e.kind)||e.kind===`personal_recovery`&&e.member!==t.member||!r(e.quantity)||!i(e.amount)||!Array.isArray(e.allocations)||e.allocations.some(e=>!n.includes(e.payer)||!r(e.amount))||e.amount!==null&&e.allocations.reduce((e,t)=>e+t.amount,0)!==e.amount)throw Error(`个人回收料或付款来源不完整,请重新读取。`);if(o.amount!==null&&(o.materialSources.some(e=>e.amount===null)||o.materialSources.reduce((e,t)=>e+t.amount,0)!==o.amount||o.allocations.reduce((e,t)=>e+t.amount,0)!==o.amount))throw Error(`分来源料费合计不一致,请重新读取。`)}if(e.pools.length!==new Set(t.entries.map(e=>e.poolId)).size||e.pools.some(e=>!t.entries.some(t=>t.poolId===e.poolId)||![`personalRemainingMg`,`publicRemainingMg`,`eligibleRemainingMg`].every(t=>r(e[t]))||!i(e.personalRemainingAmount)||!i(e.publicRemainingAmount)))throw Error(`个人与公共可用克重未完整返回,请重新读取。`);return e}function r(n=[],r){return n.map(n=>{let i=n.kind===`personal_recovery`?(n.member?r(n.member):`待补`)+`个人回收料`:`公共料`,a=n.amount==null?`料费待补`:`¥`+e(n.amount),o=n.averageRate==null?``:`(加权约 ¥`+e(n.averageRate)+`/克)`;return i+` `+t(n.quantity)+`g · `+a+o}).join(`;`)}function i(e){return(e.before?`本次前可用:个人 `+t(e.before.personalRemainingMg)+`g,公共 `+t(e.before.publicRemainingMg)+`g;`:``)+`本次后余:个人回收料 `+t(e.personalRemainingMg)+`g,公共料 `+t(e.publicRemainingMg)+`g。`}export{r as n,n as r,i as t};
|
||||
+1
@@ -0,0 +1 @@
|
||||
import{c as e,o as t,t as n}from"./shared-DZLPF0cC.js";import{a as r}from"./index-D-ox0wtk.js";var i={pending:`待店主复核`,approved:`已批准`,rejected:`已驳回`},a=e=>e.payer??e.actualpayer??e.actualPayer??``,o=(e,t,n)=>e.ownerReviewRequired===!0||t&&e.date<n,s=e=>e==null?`待核实`:`¥`+r(e),c=e=>e.todayPurchases?.items||(e.purchases||[]).filter(e=>!e.sourceKind||e.sourceKind===`purchase`),l=e=>e.rolling?.enabled&&e.current?[e.current,...e.rows.filter(t=>t.id!==e.current.id)]:e.rows,u=e.validDate,d=e=>typeof e==`number`&&Number.isSafeInteger(e)&&e>=0,f=e=>e===null||d(e);function p(e){if(!Array.isArray(e?.rows))throw Error(`每日料价记录未完整返回,请重新读取。`);if(!e.rolling?.enabled)return e;let t=e.current;if(!u(e.rolling.cutover)||!t||!u(t.date)||t.id!==t.date||![t.totalMg,t.usedMg,t.remainingMg,t.opening?.mg,t.todayPurchases?.mg,t.todayPurchases?.amount,t.todayReturns?.mg].every(d)||![t.totalAmount,t.averageRate,t.remainingCost,t.opening?.amount,t.todayReturns?.amount].every(f)||![t.usages,t.purchases,t.todayPurchases?.items,t.returns].every(Array.isArray))throw Error(`当前统一料价资料未完整返回,请重新读取。`);return e}function m(e,n,r){let i=e?.purchase;if(!i||i.id!==n||!u(i.date)||![i.mg,i.amount,i.revision].every(Number.isSafeInteger)||!t.memberKeys(r).includes(a(i)))throw Error(`购料记录未完整返回,请重新读取。`);return i}var h=e=>({date:String(e.date??``).trim(),grams:String(e.grams??``).trim(),total:String(e.total??``).trim(),payer:String(e.payer??``).trim(),note:String(e.note??``).trim()});function g(e,r){let i=h(e);if(!u(i.date)||i.date>r.today)throw Error(`购料日期请选择今天或之前的有效日期。`);let a=/^\d+(?:\.\d{1,3})?$/.test(i.grams)?BigInt(i.grams.split(`.`)[0])*1000n+BigInt((i.grams.split(`.`)[1]||``).padEnd(3,`0`)):0n;if(a<=0n||a>100000000000n)throw Error(`购买克重须大于0,最多保留3位小数。`);if(n.cents(i.total,`购买总价`)<=0)throw Error(`购买总价须大于0。`);if(!t.memberKeys(r).includes(i.payer))throw Error(`请选择实际付款人。`);if(i.note.length>150)throw Error(`购料备注最多填写150字。`);return i}function _(e,n){if(e===void 0)return!0;let r=e=>e&&f(e.materialAmount)&&(!Object.hasOwn(e,`usedMaterialAmount`)||f(e.usedMaterialAmount))&&(!Object.hasOwn(e,`leftoverCost`)||f(e.leftoverCost))&&Array.isArray(e.allocations)&&e.allocations.every(e=>t.memberKeys(n).includes(e.payer)&&d(e.amount))&&(e.materialAmount===null||e.allocations.reduce((e,t)=>e+t.amount,0)===e.materialAmount);return Array.isArray(e)&&e.every(e=>e&&typeof e.id==`string`&&e.id&&u(e.date)&&r(e.before)&&r(e.after))}function v(e,t,n){let r=e=>e&&[`goodsCost`,`profit`,`settlementDue`,`ownerCost`,`total`,`netReceived`].every(t=>Number.isSafeInteger(e[t])||e[t]===null&&(n||![`total`,`netReceived`].includes(t)));return _(e.relatedPriceLocks,t)&&Array.isArray(e.relatedOrders)&&e.relatedOrders.every(e=>e&&typeof e.id==`string`&&u(e.date)&&r(e.before)&&r(e.after))&&Array.isArray(e.affectedDates)&&e.affectedDates.every(u)&&e.summary&&d(e.summary.affectedOrderCount)&&[`goodsDelta`,`profitDelta`].every(r=>e.summary[r]===null||Number.isSafeInteger(e.summary[r])||!n&&t.user.role!==`owner`&&!Object.hasOwn(e.summary,r))}function y(e,t){if(!e||!u(e.date)||!(d(e.revision)&&Number(e.revision)>0||typeof e.revision==`string`&&e.revision)||typeof e.canEnable!=`boolean`||!d(e.opening?.mg)||!f(e.opening?.amount)||!d(e.affectedOrderCount))throw Error(`结转预览未完整返回,请重新核对。`);if(e.canEnable&&!v(e,t,!0))throw Error(`今日订单切换影响未完整返回,请重新核对。`);return e}function b(e){if(!e||typeof e.id!=`string`||!e.id||!Object.hasOwn(i,e.status)||![`edit`,`delete`].includes(e.action)||!d(e.purchase_revision)||e.purchase_revision<1||[e.reason,e.requester_name,e.created].some(e=>typeof e!=`string`))throw Error(`购料更正申请未完整返回,请重新读取。`)}function x(e){if(!Array.isArray(e?.rows)||!Object.keys(i).every(t=>d(e.counts?.[t])))throw Error(`购料更正列表未完整返回,请重新读取。`);return e.rows.forEach(b),e}function S(e,n,r){if(b(e),e.id!==n)throw Error(`更正申请编号不一致,请重新读取。`);let i=e=>e&&typeof e.id==`string`&&u(e.date)&&[e.mg,e.amount,e.revision].every(e=>d(e)&&e>0)&&t.memberKeys(r).includes(e.payer??``)&&typeof e.note==`string`;if(typeof e.stale!=`boolean`||typeof e.canApprove!=`boolean`||!e.preview||!i(e.preview.before)||(e.action===`delete`?e.preview.after!==null:!i(e.preview.after))||!v(e.preview,r,!1))throw Error(`购料更正影响未完整返回,请重新读取后复核。`);return e}function C(e){return`mm-material-purchase-`+e.user.id}export{c as a,i as c,y as d,p as f,a as i,S as l,m,s as n,l as o,g as p,o as r,h as s,C as t,x as u};
|
||||
@@ -0,0 +1 @@
|
||||
import{n as e}from"./rolldown-runtime-Dl_DZoUm.js";import{i as t}from"./react-1o5M9n0k.js";var n=e(t(),1);function r(e,t,r){let[i,a]=(0,n.useState)({});return(0,n.useEffect)(()=>{let n=!0;async function i(i){if(i.key!==`ledger-print-status-changed`||!i.newValue)return;let o;try{o=JSON.parse(i.newValue)}catch{return}if(o?.user===t&&[`order`,`recovery`].includes(o.kind)&&/^[a-f0-9-]{36}$/.test(o.id))try{let t=await e.api(`/api/print-status/`+o.kind+`/`+o.id),r=t?.kind===o.kind&&t.id===o.id,i=o.kind===`order`&&t?.kind===`recovery`&&/^[a-f0-9-]{36}$/.test(t.id);if(!r&&!i||typeof t.printed!=`boolean`)throw Error(`打印状态与所选单据不一致,请重新读取。`);n&&a(e=>({...e,[t.id]:t}))}catch(e){n&&r(e.message)}}return window.addEventListener(`storage`,i),()=>{n=!1,window.removeEventListener(`storage`,i)}},[e,t,r]),i}export{r as t};
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
import{t as e}from"./rolldown-runtime-Dl_DZoUm.js";var t=e((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function b(){}b.prototype=y.prototype;function ee(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}var te=ee.prototype=new b;te.constructor=ee,_(te,y.prototype),te.isPureReactComponent=!0;var ne=Array.isArray;function re(){}var x={H:null,A:null,T:null,S:null},ie=Object.prototype.hasOwnProperty;function S(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function ae(e,t){return S(e.type,t,e.props)}function oe(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function se(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var ce=/\/+/g;function le(e,t){return typeof e==`object`&&e&&e.key!=null?se(``+e.key):t.toString(36)}function ue(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(re,re):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function de(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,de(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+le(e,0):a,ne(o)?(i=``,c!=null&&(i=c.replace(ce,`$&/`)+`/`),de(o,r,i,``,function(e){return e})):o!=null&&(oe(o)&&(o=ae(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(ce,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(ne(e))for(var u=0;u<e.length;u++)a=e[u],s=l+le(a,u),c+=de(a,r,i,s,o);else if(u=h(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+le(a,u++),c+=de(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return de(ue(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function fe(e,t,n){if(e==null)return e;var r=[],i=0;return de(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function pe(e){if(e._status===-1){var t=(0,e._result)();t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n,t.status===void 0&&(t.status=`fulfilled`,t.value=n))},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n,t.status===void 0&&(t.status=`rejected`,t.reason=n))}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var me=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)};function he(e){var t=x.T,n={};n.types=t===null?null:t.types,x.T=n;try{var r=e(),i=x.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(re,me)}catch(e){me(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),x.T=t}}function ge(e){var t=x.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else he(ge.bind(null,e))}var _e={map:fe,forEach:function(e,t,n){fe(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return fe(e,function(){t++}),t},toArray:function(e){return fe(e,function(e){return e})||[]},only:function(e){if(!oe(e))throw Error(`React.Children.only expected to receive a single Rea
Line truncated
|
||||
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
||||
`+Ve+e+He}var We=!1;function Ge(e,t){if(!e||We)return``;We=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}n=!1;try{var i=Object.getOwnPropertyDescriptor(e.prototype,`props`);Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),n=!0,new e}finally{n&&(i===void 0?delete e.prototype.props:Object.defineProperty(e.prototype,"props",i))}}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
||||
`),l=s.split(`
|
||||
`);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
|
||||
`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{We=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Ue(n):``}function Ke(e,t){switch(e.tag){case 26:case 27:case 5:return Ue(e.type);case 16:return Ue(`Lazy`);case 13:return e.child!==t&&t!==null?Ue(`Suspense Fallback`):Ue(`Suspense`);case 19:return Ue(`SuspenseList`);case 0:case 15:return Ge(e.type,!1);case 11:return Ge(e.type.render,!1);case 1:return Ge(e.type,!0);case 31:return Ue(`Activity`);case 30:return Ue(`ViewTransition`);default:return``}}function qe(e){try{var t=``,n=null;do t+=Ke(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
||||
Error generating stack: `+e.message+`
|
||||
`+e.stack}}var Je=Object.prototype.hasOwnProperty,Ye=t.unstable_scheduleCallback,Xe=t.unstable_cancelCallback,Ze=t.unstable_shouldYield,Qe=t.unstable_requestPaint,$e=t.unstable_now,et=t.unstable_getCurrentPriorityLevel,tt=t.unstable_ImmediatePriority,nt=t.unstable_UserBlockingPriority,rt=t.unstable_NormalPriority,it=t.unstable_LowPriority,at=t.unstable_IdlePriority,ot=t.log,st=t.unstable_setDisableYieldValue,ct=null,lt=null;function ut(e){if(typeof ot==`function`&&st(e),lt&&typeof lt.setStrictMode==`function`)try{lt.setStrictMode(ct,e)}catch{}}var dt=Math.clz32?Math.clz32:mt,ft=Math.log,pt=Math.LN2;function mt(e){return e>>>=0,e===0?32:31-(ft(e)/pt|0)|0}var ht=256,gt=262144,_t=4194304;function vt(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 0x8000000:return 0x8000000;case 268435456:return 268435456;case 536870912:return 536870912;case 0x40000000:return 0;default:return e}}function yt(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&0x7ffffff;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=vt(n))):i=vt(o):i=vt(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=vt(n))):i=vt(o)):i=vt(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function bt(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function xt(e,t){t&8&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var r=31-dt(n),i=1<<r;t|=e[r],n&=~i}return t}function St(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function Ct(){var e=_t;return _t<<=1,!(_t&62914560)&&(_t=4194304),e}function wt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Tt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Et(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-dt(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&Dt(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function Dt(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-dt(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|0x40000000|n&261930}function Ot(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-dt(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function kt(e,t){var n=t&-t;return n=n&42?1:At(n),(n&(e.suspendedLanes|t))===0?n:0}function At(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=0x8000000;break;default:e=0}return e}function jt(e){return e&=-e,2<e?8<e?e&0x7ffffff?32:268435456:8:2}function Mt(){var e=w.p;return e===0?(e=window.event,e===void 0?32:Ch(e.type)):e}function Nt(e,t){var n=w.p;try{return w.p=e,t()}finally{w.p=n}}var Pt=Math.random().toString(36).slice(2),Ft=`__reactFiber$`+Pt,It=`__reactProps$`+Pt,Lt=`__reactContainer$`+Pt,Rt=`__reactEvents$`+Pt,zt=`__reactListeners$`+Pt,Bt=`__reactHandles$`+Pt,Vt=`__reactResources$`+Pt,Ht=`__reactMarker$`+Pt,Ut=`__reactLoad$`+Pt;function Wt(e){delete e[Ft],delete e[It],delete e[zt],delete e[Bt]}function Gt(e){var t;if(t=e[Ft])return t;for(var n=e.parentNode;n;){if(t=n[Lt]||n[Ft]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=fm(e);e!==null;){if(n=e[Ft])return n;e=fm(e)}return t}e=n,n=e.parentNode}return null}function Kt(e){if(e=e[Ft]||e[Lt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function qt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(s(33))}function Jt(e){var t=e[Vt];return t||=e[Vt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function E(e){e[Ht]=!0}function Yt(e){e[Ut]=void 0}var Xt=new Set,Zt={};function Qt(e,t){$t(e,t),$t(e+`Capture`,t)}function $t(e,t){for(Zt[e]=t,e=0;e<t.length;e++)Xt.add(t[e])}var en=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\uLine truncated
|
||||
`).replace(Qf,``)}function ep(e,t){return t=$f(t),$f(e)===t}function $(e,t,n,r,i,a){switch(n){case`children`:if(typeof r==`string`)t===`body`||t===`textarea`&&r===``||Sn(e,r);else if(typeof r==`number`||typeof r==`bigint`)t!==`body`&&Sn(e,``+r);else return;break;case`className`:sn(e,`class`,r);break;case`tabIndex`:sn(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:sn(e,n,r);break;case`style`:Tn(e,r,a);return;case`data`:if(t!==`object`){sn(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)||r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=kn(r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}if(typeof a==`function`&&(n===`formAction`?(t!==`input`&&$(e,t,`name`,i.name,i,null),$(e,t,`formEncType`,i.formEncType,i,null),$(e,t,`formMethod`,i.formMethod,i,null),$(e,t,`formTarget`,i.formTarget,i,null)):($(e,t,`encType`,i.encType,i,null),$(e,t,`method`,i.method,i,null),$(e,t,`target`,i.target,i,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=kn(r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=An);return;case`onScroll`:r!=null&&Q(`scroll`,e);return;case`onScrollEnd`:r!=null&&Q(`scrollend`,e);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(s(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(s(60));a?.__html!==n&&(e.innerHTML=n)}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=kn(r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`credentialless`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Q(`beforetoggle`,e),Q(`toggle`,e),on(e,`popover`,r);break;case`xlinkActuate`:cn(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:cn(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:cn(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:cn(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:cn(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:cn(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:cn(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:cn(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:cn(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:on(e,`is`,r);break;case`innerText`:case`textContent`:return;default:if(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)n=Dn.get(n)||n,on(e,n,r);else return}D=!0}function tp(e,t,n,r,i,a){switch(n){case`style`:Tn(e,r,a);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(s(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(s(60));a?.__html!==n&&(e.innerHTML=n)}}break;case`children`:if(typeof r==`string`)Sn(e,r);else if(typeof r==`number`||typeof r==`bigint`)Sn(e,``+r);else return;break;case`onScroll`:r!=null&&Q(`scroll`,e);return;case`onScrollEnd`:r!=null&&Q(`scrollend`,e);return;case`onClick`:r!=null&&(e.onclick=An);return;case`suppressContentEditab
Line truncated
|
||||
-9
@@ -1,9 +0,0 @@
|
||||
import{t as e}from"./rolldown-runtime-Dl_DZoUm.js";import{H as t,V as n}from"./antd-Bh8pVx-K.js";var r=e((e=>{function t(e,t){var n=e.length;for(e.push(t);0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function ee(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,te||(te=!0,oe());else{var t=n(l);t!==null&&le(ee,t.startTime-e)}}}var te=!1,ne=-1,re=5,ie=-1;function ae(){return g?!0:!(e.unstable_now()-ie<re)}function x(){if(g=!1,te){var t=e.unstable_now();ie=t;var i=!0;try{e:{m=!1,h&&(h=!1,v(ne),ne=-1),p=!0;var a=f;try{t:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&ae());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break t}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&le(ee,u.startTime-t),i=!1}}break e}finally{d=null,f=a,p=!1}i=void 0}}finally{i?oe():te=!1}}}var oe;if(typeof y==`function`)oe=function(){y(x)};else if(typeof MessageChannel<`u`){var se=new MessageChannel,ce=se.port2;se.port1.onmessage=x,oe=function(){ce.postMessage(null)}}else oe=function(){_(x,0)};function le(t,n){ne=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):re=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=0x3fffffff;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(ne),ne=-1):h=!0,le(ee,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,te||(te=!0,oe()))),r},e.unstable_shouldYield=ae,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),i=e(((e,t)=>{t.exports=r()})),a=e((e=>{var r=i(),a=t(),o=n();function s(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function c(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function l(e){for(var t=e,n=t;n&&!n.alternate;)t=n,t.flags&4098&&(e=t.return),n=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function u(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function d(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function f(e){if(l(e)!==e)throw Error(s(188))}function p(e){var t=e.alternate;if(!t){if(t=l(e),t===null)throw Error(s(188));return t===e?e:null}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var a=i.alternate;if(a===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return f(i),e;if(a===r)return f(i),t;a=a.sibling}throw Error(s(188))}if(n.return!==r.return)n=i,r=a;else{for(var o=!1,c=i.child;c;){if(c===n){Line truncated
|
||||
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
||||
`+Ve+e+He}var We=!1;function Ge(e,t){if(!e||We)return``;We=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}n=!1;try{var i=Object.getOwnPropertyDescriptor(e.prototype,`props`);Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),n=!0,new e}finally{n&&(i===void 0?delete e.prototype.props:Object.defineProperty(e.prototype,"props",i))}}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
||||
`),l=s.split(`
|
||||
`);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
|
||||
`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{We=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Ue(n):``}function Ke(e,t){switch(e.tag){case 26:case 27:case 5:return Ue(e.type);case 16:return Ue(`Lazy`);case 13:return e.child!==t&&t!==null?Ue(`Suspense Fallback`):Ue(`Suspense`);case 19:return Ue(`SuspenseList`);case 0:case 15:return Ge(e.type,!1);case 11:return Ge(e.type.render,!1);case 1:return Ge(e.type,!0);case 31:return Ue(`Activity`);case 30:return Ue(`ViewTransition`);default:return``}}function qe(e){try{var t=``,n=null;do t+=Ke(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
||||
Error generating stack: `+e.message+`
|
||||
`+e.stack}}var Je=Object.prototype.hasOwnProperty,Ye=r.unstable_scheduleCallback,Xe=r.unstable_cancelCallback,Ze=r.unstable_shouldYield,Qe=r.unstable_requestPaint,$e=r.unstable_now,et=r.unstable_getCurrentPriorityLevel,tt=r.unstable_ImmediatePriority,nt=r.unstable_UserBlockingPriority,rt=r.unstable_NormalPriority,it=r.unstable_LowPriority,at=r.unstable_IdlePriority,ot=r.log,st=r.unstable_setDisableYieldValue,ct=null,lt=null;function ut(e){if(typeof ot==`function`&&st(e),lt&&typeof lt.setStrictMode==`function`)try{lt.setStrictMode(ct,e)}catch{}}var dt=Math.clz32?Math.clz32:mt,ft=Math.log,pt=Math.LN2;function mt(e){return e>>>=0,e===0?32:31-(ft(e)/pt|0)|0}var ht=256,gt=262144,_t=4194304;function vt(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 0x8000000:return 0x8000000;case 268435456:return 268435456;case 536870912:return 536870912;case 0x40000000:return 0;default:return e}}function yt(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&0x7ffffff;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=vt(n))):i=vt(o):i=vt(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=vt(n))):i=vt(o)):i=vt(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function bt(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function xt(e,t){t&8&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var r=31-dt(n),i=1<<r;t|=e[r],n&=~i}return t}function St(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function Ct(){var e=_t;return _t<<=1,!(_t&62914560)&&(_t=4194304),e}function wt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Tt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Et(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-dt(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&Dt(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function Dt(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-dt(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|0x40000000|n&261930}function Ot(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-dt(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function kt(e,t){var n=t&-t;return n=n&42?1:At(n),(n&(e.suspendedLanes|t))===0?n:0}function At(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=0x8000000;break;default:e=0}return e}function jt(e){return e&=-e,2<e?8<e?e&0x7ffffff?32:268435456:8:2}function Mt(){var e=C.p;return e===0?(e=window.event,e===void 0?32:Ch(e.type)):e}function Nt(e,t){var n=C.p;try{return C.p=e,t()}finally{C.p=n}}var Pt=Math.random().toString(36).slice(2),Ft=`__reactFiber$`+Pt,It=`__reactProps$`+Pt,Lt=`__reactContainer$`+Pt,Rt=`__reactEvents$`+Pt,zt=`__reactListeners$`+Pt,Bt=`__reactHandles$`+Pt,Vt=`__reactResources$`+Pt,Ht=`__reactMarker$`+Pt,Ut=`__reactLoad$`+Pt;function Wt(e){delete e[Ft],delete e[It],delete e[zt],delete e[Bt]}function Gt(e){var t;if(t=e[Ft])return t;for(var n=e.parentNode;n;){if(t=n[Lt]||n[Ft]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=fm(e);e!==null;){if(n=e[Ft])return n;e=fm(e)}return t}e=n,n=e.parentNode}return null}function Kt(e){if(e=e[Ft]||e[Lt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function qt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(s(33))}function Jt(e){var t=e[Vt];return t||=e[Vt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function E(e){e[Ht]=!0}function Yt(e){e[Ut]=void 0}var Xt=new Set,Zt={};function Qt(e,t){$t(e,t),$t(e+`Capture`,t)}function $t(e,t){for(Zt[e]=t,e=0;e<t.length;e++)Xt.add(t[e])}var en=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\uLine truncated
|
||||
`).replace(Qf,``)}function ep(e,t){return t=$f(t),$f(e)===t}function $(e,t,n,r,i,a){switch(n){case`children`:if(typeof r==`string`)t===`body`||t===`textarea`&&r===``||Sn(e,r);else if(typeof r==`number`||typeof r==`bigint`)t!==`body`&&Sn(e,``+r);else return;break;case`className`:sn(e,`class`,r);break;case`tabIndex`:sn(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:sn(e,n,r);break;case`style`:Tn(e,r,a);return;case`data`:if(t!==`object`){sn(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)||r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=kn(r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}if(typeof a==`function`&&(n===`formAction`?(t!==`input`&&$(e,t,`name`,i.name,i,null),$(e,t,`formEncType`,i.formEncType,i,null),$(e,t,`formMethod`,i.formMethod,i,null),$(e,t,`formTarget`,i.formTarget,i,null)):($(e,t,`encType`,i.encType,i,null),$(e,t,`method`,i.method,i,null),$(e,t,`target`,i.target,i,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=kn(r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=An);return;case`onScroll`:r!=null&&Q(`scroll`,e);return;case`onScrollEnd`:r!=null&&Q(`scrollend`,e);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(s(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(s(60));a?.__html!==n&&(e.innerHTML=n)}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=kn(r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`credentialless`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Q(`beforetoggle`,e),Q(`toggle`,e),on(e,`popover`,r);break;case`xlinkActuate`:cn(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:cn(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:cn(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:cn(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:cn(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:cn(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:cn(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:cn(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:cn(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:on(e,`is`,r);break;case`innerText`:case`textContent`:return;default:if(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)n=Dn.get(n)||n,on(e,n,r);else return}D=!0}function tp(e,t,n,r,i,a){switch(n){case`style`:Tn(e,r,a);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(s(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(s(60));a?.__html!==n&&(e.innerHTML=n)}}break;case`children`:if(typeof r==`string`)Sn(e,r);else if(typeof r==`number`||typeof r==`bigint`)Sn(e,``+r);else return;break;case`onScroll`:r!=null&&Q(`scroll`,e);return;case`onScrollEnd`:r!=null&&Q(`scrollend`,e);return;case`onClick`:r!=null&&(e.onclick=An);return;case`suppressContentEditab
Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
var e=[{member:`owner`,label:`麦麦`},{member:`assistant`,label:`娜娜`},{member:`assistant2`,label:`小昊`}];function t(e,t=``,n=!0){let r=e.filter(e=>(n||e.member!==`assistant2`)&&e.enabled!==!1),i=r.map(e=>[e.member,e.label]),a=e.find(e=>e.member===t&&e.enabled===!1);return a&&r.length&&i.push([a.member,a.label+`(已停用 · 原记录)`]),i}function n(e){return e instanceof Error?e.message:String(e)}function r(e){return Object.fromEntries(Array.from(new FormData(e),([e,t])=>[e,String(t)]))}export{r as i,e as n,t as r,n as t};
|
||||
+1
@@ -0,0 +1 @@
|
||||
var e={exports:{}};(function(t){let n=e=>[`owner`,`assistant`,`assistant2`].includes(e)||/^staff_[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/.test(e);function r(e,t,n){let r=String(e??``).trim();if(!RegExp(`^\\d+(?:\\.\\d{1,`+t+`})?$`).test(r))throw Error(n+`须为非负数字,最多`+t+`位小数`);let[i,a=``]=r.split(`.`),o=BigInt(i)*10n**BigInt(t)+BigInt(a.padEnd(t,`0`));if(o>100000000000n)throw Error(n+`超出支持范围`);return o}function i(e,t=`金额`){return Number(r(e,2,t))}let a=e=>[`足银999`,`纯银925`].includes(e);function o(e=[]){if(!Array.isArray(e)||e.length>100)throw Error(`每行最多填写100项附加项目`);let t=[],n=0;for(let r of e){if(!r||typeof r!=`object`)throw Error(`附加项目格式无效`);let e=r.id==null?``:String(r.id);if(e&&!/^[a-f0-9-]{36}$/.test(e))throw Error(`附加项目标识无效`);if(r.costRemoved!==void 0&&typeof r.costRemoved!=`boolean`)throw Error(`内部成本移除标记无效`);let a=r.amount==null||r.amount===``,o=String(r.name??``).trim();if(a&&(!e||!o))continue;if(!o||o.length>40)throw Error(`附加项目名称须为1~40字`);let s=a?null:i(r.amount,`附加项目金额`);t.push({...e?{id:e}:{},name:o,amount:s,...r.costRemoved===!0?{costRemoved:!0}:{}}),n+=s||0}if(n>1e11)throw Error(`附加项目合计超出支持范围`);return{items:t,total:n}}function s(e){let t=e.pricingMode===`auto`?l(e):null,n=t?t.sale:i(e.baseSale??e.sale,`商品基础金额`),r=o(e.charges),a=n+r.total;if(a>1e11)throw Error(`本行销售额超出支持范围`);return{...t||{},baseSale:n,charges:r.items,chargesTotal:r.total,sale:a}}function c(e,t=0,n=`yuan`){let r=100000000000n;if(!Array.isArray(e)||e.length<1||e.length>60)throw Error(`每单需要1~60行商品`);if(![`yuan`,`cent`].includes(n))throw Error(`整单金额取整方式无效`);if(!Number.isSafeInteger(t)||t<0||BigInt(t)>r)throw Error(`整单优惠须为范围内的非负整数分`);let i=0n;for(let t of e){if(!Number.isSafeInteger(t)||t<0||BigInt(t)>r)throw Error(`商品行金额须为范围内的非负整数分`);i+=BigInt(t)}if(i>r)throw Error(`整单销售合计超出支持范围`);let a=i-BigInt(t);if(a<=0n)throw Error(`优惠后成交额必须大于0`);let o=n===`yuan`?(a+50n)/100n*100n:a;if(o<=0n)throw Error(`整单四舍五入后成交额必须大于0元,请核对销售金额`);if(o>r)throw Error(`整单销售合计超出支持范围`);return{subtotal:Number(i),discount:t,unroundedTotal:Number(a),total:Number(o),rounding_mode:n,rounding_adjustment:Number(o-a)}}function l(e){if(e.unit!==`g`)throw Error(`按金价计算需要填写克重;按件报价请选择直接填金额`);let t=r(e.quantity,3,`克重`);if(t<=0n)throw Error(`克重必须大于0`);let n=r(e.goldPrice,2,`金价`),i=r(e.laborRate,2,`销售工费`);if(![`gram`,`piece`].includes(e.laborMode))throw Error(`请选择克工费或件工费`);let a=1n;if(e.laborMode===`piece`){if(!/^\d+$/.test(String(e.pieces??`1`)))throw Error(`件数须为正整数`);if(a=BigInt(e.pieces??1),a<1n||a>1000000n)throw Error(`件数须为1~1000000的整数`)}let o=(t*n+(e.laborMode===`gram`?t*i:a*i*1000n)+500n)/1000n;if(o>100000000000n)throw Error(`本行销售额超出支持范围`);return{sale:Number(o),goldPrice:Number(n),laborRate:Number(i),laborMode:e.laborMode,pieces:Number(a)}}let u={material:`料费成本`,labor:`进货工费`,accessories:`配件成本`,other:`其他货品成本`};function d(e){if(e!==void 0){if(!e||typeof e!=`object`||Array.isArray(e)||Object.keys(e).some(e=>![`material`,`labor`].includes(e)))throw Error(`料费和进货工费付款人无效`);for(let t of[`material`,`labor`])if(!Object.hasOwn(e,t)||!n(e[t]))throw Error(u[t]+`付款人无效`);return{material:e.material,labor:e.labor}}}function f(e){let t={},n=0,r=!1;for(let[a,o]of Object.entries(u))t[a]=e?.[a]==null||e[a]===``?null:i(e[a],o),t[a]===null?r=!0:n+=t[a];if(n>1e11)throw Error(`货品成本超出支持范围`);return{parts:t,total:r?null:n}}function p(e){let t={...e.costParts},n=(n,i,a,o,s,c)=>{let l=i?.mode||`total`;if(![`gram`,`total`].includes(l))throw Error(s);let u={mode:l};if(l===`gram`){if(e.unit!==`g`)throw Error(c);let s=i?.rate,l=s==null||s===``?null:r(s,2,a);if(u.rate=l===null?null:Number(l),l===null)t[n]=``;else{let i=r(e.quantity,3,`克重`);if(i<=0n)throw Error(`克重必须大于0`);let a=(i*l+500n)/1000n;if(a>100000000000n)throw Error(o+`超出支持范围`);t[n]=`${a/100n}.${String(a%100n).padStart(2,`0`)}`}}return u},i;if(e.costMaterial?.mode===`pool`){if(e.unit!==`g`||a(e.name))throw Error(`日购料成本只支持按克黄金商品`);let n=String(e.costMaterial.poolId??``);if(!/^\d{4}-\d{2}-\d{2}$/.test(n))throw Error(`请选择日购料日期`);i={mode:`pool`,poolId:n};let r=e.materialPool?.amount;t.material=Number.isSafeInteger(r)&&r>=0?(r/100).toFixed(2):``}else i=n(`material`,e.costMaterial,`进货料价`,`料费总成本`,`请选择每克料价或料费总成本`,`每克料价需要克重,按件商品请填写料费总成本`Line truncated
|
||||
+137
@@ -0,0 +1,137 @@
|
||||
import{n as e,t}from"./rolldown-runtime-Dl_DZoUm.js";import{i as n,r}from"./react-1o5M9n0k.js";var i=t(((e,t)=>{var n;(function(){var e={}.hasOwnProperty;function r(){for(var e=``,t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=a(e,i(n)))}return e}function i(t){if(typeof t==`string`||typeof t==`number`)return t;if(typeof t!=`object`)return``;if(Array.isArray(t))return r.apply(null,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes(`[native code]`))return t.toString();var n=``;for(var i in t)e.call(t,i)&&t[i]&&(n=a(n,i));return n}function a(e,t){return t?e?e+` `+t:e+t:e}t!==void 0&&t.exports?(r.default=r,t.exports=r):typeof n==`function`&&typeof n.amd==`object`&&n.amd?n(`classnames`,[],function(){return r}):window.classNames=r})()})),a=e(n());function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o.apply(null,arguments)}function s(e){"@babel/helpers - typeof";return s=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},s(e)}var c=Symbol.for(`react.element`),l=Symbol.for(`react.transitional.element`),u=Symbol.for(`react.fragment`);function d(e){return e&&s(e)===`object`&&(e.$$typeof===c||e.$$typeof===l)&&e.type===u}var f=e(r()),p=e(i());function m(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[];return a.Children.forEach(e,function(e){(e!=null||t.keepEmpty)&&(Array.isArray(e)?n=n.concat(m(e)):d(e)&&e.props?n=n.concat(m(e.props.children,t)):n.push(e))}),n}var h={},g=[],_=function(e){g.push(e)};function v(e,t){}function y(e,t){}function b(e,t,n){!t&&!h[n]&&(e(!1,n),h[n]=!0)}function x(e,t){b(v,e,t)}x.preMessage=_,x.resetWarned=function(){h={}},x.noteOnce=function(e,t){b(y,e,t)};function S(e,t){if(s(e)!=`object`||!e)return e;var n;if(typeof Symbol<`u`&&(n=e[Symbol.toPrimitive])!==void 0){var r=n.call(e,t||`default`);if(s(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function C(e){var t=S(e,`string`);return s(t)==`symbol`?t:t+``}function w(e,t,n){return(t=C(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function T(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function E(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?T(Object(n),!0).forEach(function(t){w(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):T(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function D(e){return e instanceof HTMLElement||e instanceof SVGElement}function O(e){return e&&s(e)===`object`&&D(e.nativeElement)?e.nativeElement:D(e)?e:null}function k(e){return O(e)||(e instanceof a.Component?f.default.findDOMNode?.call(f.default,e):null)}var ee=t((e=>{var t=Symbol.for(`react.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.provider`),s=Symbol.for(`react.context`),c=Symbol.for(`react.server_context`),l=Symbol.for(`react.forward_ref`),u=Symbol.for(`react.suspense`),d=Symbol.for(`react.suspense_list`),f=Symbol.for(`react.memo`),p=Symbol.for(`react.lazy`);function m(e){if(typeof e==`object`&&e){var m=e.$$typeof;switch(m){case t:switch(e=e.type,e){case r:case a:case i:case u:case d:return e;default:switch(e&&=e.$$typeof,e){case c:case s:case l:case p:case f:case o:return e;default:return m}}case n:return m}}}e.ForwardRef=l,e.isMemo=function(e){return m(e)===f}})),te=t(((e,t)=>{t.exports=ee()}));function ne(e,t,n){var r=a.useRef({});return(!(`value`in r.current)||n(r.current.condition,t))&&(r.current.value=e(),r.current.condition=t),r.current.value}var re=te(),ie=Number(a.version.split(`.`)[0]),ae=function(e,t){typeof e==`function`?e(t):s(e)===`object`&&e&&`current`in e&&(e.current=t)},oe=function(){var e=[...arguments],t=e.filter(Boolean);return t.length<=1?t[0]:function(t){e.forEach(function(e){ae(e,t)})}},A=function(){var e=[...arguments];return ne(function(){return oe.apply(void 0,e)},e,function(e,t){return e.length!==t.length||e.every(function(e,n){return e!==t[n]})})},se=function(e){var t,n;if(!e)return!1;if(ce(e)&&ie>=19)return!0;var r=(0,re.isMemo)(e)?e.type.type:e.type;return!(typeof r==`function`&&!((t=r.prototype)!=null&&t.render)&&r.$$typeof!==re.ForwardRef||typeof e==`function`&&!((n=e.prototype)!=null&&n.render)&&e.$$typeof!==re.ForwardRef)};function ce(e){return(0,a.isValidElement)(e)&&!d(e)}var le=function(e){if(e&&ce(e)){var t=e;return t.props.propertyIsEnumerLine truncated
|
||||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function L(e){var t=he(e);return t===e?me(e):t||ge(e)||_e()}var ve=function(e){return+setTimeout(e,16)},ye=function(e){return clearTimeout(e)};typeof window<`u`&&`requestAnimationFrame`in window&&(ve=function(e){return window.requestAnimationFrame(e)},ye=function(e){return window.cancelAnimationFrame(e)});var be=0,xe=new Map;function Se(e){xe.delete(e)}var Ce=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;be+=1;var n=be;function r(t){if(t===0)Se(n),e();else{var i=ve(function(){r(t-1)});xe.set(n,i)}}return r(t),n};Ce.cancel=function(e){var t=xe.get(e);return Se(e),ye(t)};function we(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(Array.isArray(e)&&(n==null||n===(typeof Symbol<`u`&&[][Symbol.iterator])||n===[][`@@iterator`]))return e;if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function Te(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
||||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function R(e,t){return we(e,t)||ge(e,t)||Te()}function Ee(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*0x5bd1e995+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*0x5bd1e995+((n>>>16)*59797<<16)^(t&65535)*0x5bd1e995+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*0x5bd1e995+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*0x5bd1e995+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}function z(){return!!(typeof window<`u`&&window.document&&window.document.createElement)}function De(e,t){if(!e)return!1;if(e.contains)return e.contains(t);for(var n=t;n;){if(n===e)return!0;n=n.parentNode}return!1}var Oe=`data-rc-order`,ke=`data-rc-priority`,Ae=`rc-util-key`,je=new Map;function Me(){var e=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}).mark;return e?e.startsWith(`data-`)?e:`data-${e}`:Ae}function Ne(e){return e.attachTo?e.attachTo:document.querySelector(`head`)||document.body}function Pe(e){return e===`queue`?`prependQueue`:e?`prepend`:`append`}function Fe(e){return Array.from((je.get(e)||e).children).filter(function(e){return e.tagName===`STYLE`})}function Ie(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!z())return null;var n=t.csp,r=t.prepend,i=t.priority,a=i===void 0?0:i,o=Pe(r),s=o===`prependQueue`,c=document.createElement(`style`);c.setAttribute(Oe,o),s&&a&&c.setAttribute(ke,`${a}`),n!=null&&n.nonce&&(c.nonce=n?.nonce),c.innerHTML=e;var l=Ne(t),u=l.firstChild;if(r){if(s){var d=(t.styles||Fe(l)).filter(function(e){return[`prepend`,`prependQueue`].includes(e.getAttribute(Oe))?a>=Number(e.getAttribute(ke)||0):!1});if(d.length)return l.insertBefore(c,d[d.length-1].nextSibling),c}l.insertBefore(c,u)}else l.appendChild(c);return c}function Le(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=Ne(t);return(t.styles||Fe(n)).find(function(n){return n.getAttribute(Me(t))===e})}function Re(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=Le(e,t);n&&Ne(t).removeChild(n)}function ze(e,t){var n=je.get(e);if(!n||!De(document,n)){var r=Ie(``,t),i=r.parentNode;je.set(e,i),e.removeChild(r)}}function Be(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=Ne(n),i=Fe(r),a=E(E({},n),{},{styles:i});ze(r,a);var o=Le(t,a);if(o){var s;return(s=a.csp)!=null&&s.nonce&&o.nonce!==a.csp?.nonce&&(o.nonce=a.csp?.nonce),o.innerHTML!==e&&(o.innerHTML=e),o}var c=Ie(e,a);return c.setAttribute(Me(a),t),c}function Ve(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function He(e,t){if(e==null)return{};var n,r,i=Ve(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Ue(e,t){var n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],r=new Set;function i(e,t){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,o=r.has(e);if(x(!o,`Warning: There may be circular references`),o)return!1;if(e===t)return!0;if(n&&a>1)return!1;r.add(e);var c=a+1;if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(var l=0;l<e.length;l++)if(!i(e[l],t[l],c))return!1;return!0}if(e&&t&&s(e)===`object`&&s(t)===`object`){var u=Object.keys(e);return u.length===Object.keys(t).length&&u.every(function(n){return i(e[n],t[n],c)})}return!1}return i(e,t)}var We=`%`;function Ge(e){return e.join(We)}var Ke=function(){function e(t){j(this,e),w(this,`instanceId`,void 0),w(this,`cache`,new Map),w(this,`extracted`,new Set),this.instanceId=t}return N(e,[{key:`get`,value:function(e){return this.opGet(Ge(e))}},{key:`opGet`,value:function(e){return this.cache.get(e)||null}},{key:`update`,value:function(e,t){return this.opUpdate(Ge(e),t)}},{key:`opUpdate`,value:function(e,t){var n=t(this.cache.get(e));n===null?this.cache.delete(e):this.cache.set(e,n)}}]),e}(),qe=`data-token-hash`,Je=`data-css-hash`,Ye=`__cssinjs_instance__`;function Xe(){var e=Math.random().toString(12).slice(2);if(typeof document<`u`&&document.head&&document.body){var t=document.body.querySelectorAll(`style[data-css-hash]`)||[],n=document.head.firstChild;Array.from(t).forEach(function(t){t[Ye]=t.__cssinjs_instance__||e,t.__cssinjs_instance__===e&&document.head.insertBefore(t,n)});var r={};Array.from(document.querySelectorAll(`style[${Je}]`)).forEach(function(t){var n=t.getAttribute(Je);if(r[n]){if(t.__cssinjs_instance__===e){var i;(i=t.parentNode)==null||i.removeChild(t)}}else r[n]=!0})}return new Ke(e)}var Ze=a.createContext({hashPriority:`low`,cache:Xe(),defaultCache:!0});function Qe(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}var $e=fun
Line truncated
|
||||
`;else if(r._keyframe)h(r);else{var l=f.reduce(function(e,t){var n;return(t==null||(n=t.visit)==null?void 0:n.call(t,e))||e},r);Object.keys(l).forEach(function(t){var r=l[t];if(s(r)===`object`&&r&&(t!==`animationName`||!r._keyframe)&&!In(r)){var d=!1,f=t.trim(),g=!1;(i||a)&&c?f.startsWith(`@`)?d=!0:f=Ln(f===`&`?``:t,c,u):i&&!c&&(f===`&`||f===``)&&(f=``,g=!0);var _=R(e(r,n,{root:g,injectHash:d,parentSelectors:[].concat(L(o),[f])}),2),v=_[0],y=_[1];m=E(E({},m),y),p+=`${f}${v}`}else{function e(e,t){var n=e.replace(/[A-Z]/g,function(e){return`-${e.toLowerCase()}`}),r=t;!Pt[e]&&typeof r==`number`&&r!==0&&(r=`${r}px`),e===`animationName`&&t!=null&&t._keyframe&&(h(t),r=t.getName(c)),p+=`${n}:${r};`}var b=r?.value??r;s(r)===`object`&&r!=null&&r[Pn]&&Array.isArray(b)?b.forEach(function(n){e(t,n)}):e(t,b)}})}}),i?l&&(p&&=`@layer ${l.name} {${p}}`,l.dependencies&&(m[`@layer ${l.name}`]=l.dependencies.map(function(e){return`@layer ${e}, ${l.name};`}).join(`
|
||||
`))):p=`{${p}}`,[p,m]};function zn(e,t){return Ee(`${e.join(`%`)}${t}`)}function Bn(){return null}var Vn=`style`;function Hn(e,t){var n=e.token,r=e.path,i=e.hashId,s=e.layer,c=e.nonce,l=e.clientOnly,u=e.order,d=u===void 0?0:u,f=a.useContext(Ze),p=f.autoClear;f.mock;var m=f.defaultCache,h=f.hashPriority,g=f.container,_=f.ssrInline,v=f.transformers,y=f.linters,b=f.cache,x=f.layer,S=n._tokenKey,C=[S];x&&C.push(`layer`),C.push.apply(C,L(r));var T=ut,D=R(St(Vn,C,function(){var e=C.join(`|`);if(jn(e)){var n=R(Mn(e),2),a=n[0],o=n[1];if(a)return[a,S,o,{},l,d]}var c=R(Rn(t(),{hashId:i,hashPriority:h,layer:x?s:void 0,path:r.join(`-`),transformers:v,linters:y}),2),u=c[0],f=c[1],p=Fn(u);return[p,S,zn(C,p),f,l,d]},function(e,t){var n=R(e,3)[2];(t||p)&&ut&&Re(n,{mark:Je,attachTo:g})},function(e){var t=R(e,4),n=t[0];t[1];var r=t[2],i=t[3];if(T&&n!==`_FILE_STYLE__`){var a={mark:Je,prepend:!x&&`queue`,attachTo:g,priority:d},o=typeof c==`function`?c():c;o&&(a.csp={nonce:o});var s=[],l=[];Object.keys(i).forEach(function(e){e.startsWith(`@layer`)?s.push(e):l.push(e)}),s.forEach(function(e){Be(Fn(i[e]),`_layer-${e}`,E(E({},a),{},{prepend:!0}))});var u=Be(n,r,a);u[Ye]=b.instanceId,u.setAttribute(qe,S),l.forEach(function(e){Be(Fn(i[e]),`_effect-${e}`,a)})}}),3),O=D[0],k=D[1],ee=D[2];return function(e){var t=!_||T||!m?a.createElement(Bn,null):a.createElement(`style`,o({},w(w({},qe,k),Je,ee),{dangerouslySetInnerHTML:{__html:O}}));return a.createElement(a.Fragment,null,t,e)}}var Un=function(e,t,n){var r=R(e,6),i=r[0],a=r[1],o=r[2],s=r[3],c=r[4],l=r[5],u=(n||{}).plain;if(c)return null;var d=i,f={"data-rc-order":`prependQueue`,"data-rc-priority":`${l}`};return d=ft(i,a,o,f,u),s&&Object.keys(s).forEach(function(e){if(!t[e]){t[e]=!0;var n=ft(Fn(s[e]),a,`_effect-${e}`,f,u);e.startsWith(`@layer`)?d=n+d:d+=n}}),[l,o,d]},Wn=`cssVar`,Gn=function(e,t){var n=e.key,r=e.prefix,i=e.unitless,o=e.ignore,s=e.token,c=e.scope,l=c===void 0?``:c,u=(0,a.useContext)(Ze),d=u.cache.instanceId,f=u.container,p=s._tokenKey,m=[].concat(L(e.path),[n,l,p]);return St(Wn,m,function(){var e=R(ht(t(),n,{prefix:r,unitless:i,ignore:o,scope:l}),2),a=e[0],s=e[1];return[a,s,zn(m,s),n]},function(e){var t=R(e,3)[2];ut&&Re(t,{mark:Je,attachTo:f})},function(e){var t=R(e,3),r=t[1],i=t[2];if(r){var a=Be(r,i,{mark:Je,prepend:`queue`,attachTo:f,priority:-999});a[Ye]=d,a.setAttribute(qe,n)}})};w(w(w({},Vn,Un),jt,Nt),Wn,function(e,t,n){var r=R(e,4),i=r[1],a=r[2],o=r[3],s=(n||{}).plain;if(!i)return null;var c=-999;return[c,a,ft(i,o,a,{"data-rc-order":`prependQueue`,"data-rc-priority":`${c}`},s)]});var V=function(){function e(t,n){j(this,e),w(this,`name`,void 0),w(this,`style`,void 0),w(this,`_keyframe`,!0),this.name=t,this.style=n}return N(e,[{key:`getName`,value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:``;return e?`${e}-${this.name}`:this.name}}]),e}();function Kn(e){return e.notSplit=!0,e}Kn([`borderTop`,`borderBottom`]),Kn([`borderTop`]),Kn([`borderBottom`]),Kn([`borderLeft`,`borderRight`]),Kn([`borderLeft`]),Kn([`borderRight`]);var qn=(0,a.createContext)({});function Jn(e){return he(e)||ge(e)||Te()}function Yn(e,t){for(var n=e,r=0;r<t.length;r+=1){if(n==null)return;n=n[t[r]]}return n}function Xn(e,t,n,r){if(!t.length)return n;var i=Jn(t),a=i[0],o=i.slice(1),s=!e&&typeof a==`number`?[]:Array.isArray(e)?L(e):E({},e);return r&&n===void 0&&o.length===1?delete s[a][o[0]]:s[a]=Xn(s[a],o,n,r),s}function Zn(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0&&arguments[3];return t.length&&r&&n===void 0&&!Yn(e,t.slice(0,-1))?e:Xn(e,t,n,r)}function Qn(e){return s(e)===`object`&&e!==null&&Object.getPrototypeOf(e)===Object.prototype}function $n(e){return Array.isArray(e)?[]:{}}var er=typeof Reflect>`u`?Object.keys:Reflect.ownKeys;function tr(){var e=[...arguments],t=$n(e[0]);return e.forEach(function(e){function n(r,i){var a=new Set(i),o=Yn(e,r),c=Array.isArray(o);if(c||Qn(o)){if(!a.has(o)){a.add(o);var l=Yn(t,r);c?t=Zn(t,r,[]):l&&s(l)===`object`||(t=Zn(t,r,$n(o))),er(o).forEach(function(e){n([].concat(L(r),[e]),a)})}}else t=Zn(t,r,o)}n([])}),t}function nr(){}var rr=a.createContext({}),ir=()=>{let e=()=>{};return e.deprecated=nr,e},ar={items_per_page:`/ page`,jump_to:`Go to`,jump_to_confirm:`confirm`,page:`Page`,prev_page:`Previous Page`,next_page:`Next Page`,prev_5:`Previous 5 Pages`,next_5:`Next 5 Pages`,prev_3:`Previous 3 Pages`,next_3:`Next 3 Pages`,page_size:`Page Size`},or=E(E({},{yearFormat:`YYYY`,dayFormat:`D`,cellMeridiemFormat:`A`,monthBeforeYear:!0}),{},{locale:`en_US`,today:`Today`,now:`Now`,backToToday:`Back to today`,ok:`OK`,clear:`Clear`,week:`Week`,month:`Month`,year:`Year`,timeSelect:`select time`,dateSelect:`select date`,weekSelect:`Choose a week`,monthSelect:`Choose a month`,yearSelect:`Choose a year`,decadeSelect:`Choose a decade`,dateFormat:`M/D/YYYY`,dateTimeFormat:`M/D/YYYY HH:mm:ss`,previousMonth:`Previous month (PageUp)`,nextMonth:`Next month (PageDown)`,previousYear:`Last year (Control + left)`,nextYear:`Next year (Control + rightLine truncated
|
||||
'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
|
||||
'Noto Color Emoji'`,fontFamilyCode:`'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace`,fontSize:14,lineWidth:1,lineType:`solid`,motionUnit:.1,motionBase:0,motionEaseOutCirc:`cubic-bezier(0.08, 0.82, 0.17, 1)`,motionEaseInOutCirc:`cubic-bezier(0.78, 0.14, 0.15, 0.86)`,motionEaseOut:`cubic-bezier(0.215, 0.61, 0.355, 1)`,motionEaseInOut:`cubic-bezier(0.645, 0.045, 0.355, 1)`,motionEaseOutBack:`cubic-bezier(0.12, 0.4, 0.29, 1.46)`,motionEaseInBack:`cubic-bezier(0.71, -0.46, 0.88, 0.6)`,motionEaseInQuint:`cubic-bezier(0.755, 0.05, 0.855, 0.06)`,motionEaseOutQuint:`cubic-bezier(0.23, 1, 0.32, 1)`,borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1,motion:!0}),U=Math.round;function hr(e,t){let n=e.replace(/^[^(]*\((.*)/,`$1`).replace(/\).*/,``).match(/\d*\.?\d+%?/g)||[],r=n.map(e=>parseFloat(e));for(let e=0;e<3;e+=1)r[e]=t(r[e]||0,n[e]||``,e);return r[3]=n[3]?n[3].includes(`%`)?r[3]/100:r[3]:1,r}var gr=(e,t,n)=>n===0?e:e/100;function _r(e,t){let n=t||255;return e>n?n:e<0?0:e}var W=class e{constructor(t){w(this,`isValid`,!0),w(this,`r`,0),w(this,`g`,0),w(this,`b`,0),w(this,`a`,1),w(this,`_h`,void 0),w(this,`_s`,void 0),w(this,`_l`,void 0),w(this,`_v`,void 0),w(this,`_max`,void 0),w(this,`_min`,void 0),w(this,`_brightness`,void 0);function n(e){return e[0]in t&&e[1]in t&&e[2]in t}if(t){if(typeof t==`string`){let e=t.trim();function n(t){return e.startsWith(t)}/^#?[A-F\d]{3,8}$/i.test(e)?this.fromHexString(e):n(`rgb`)?this.fromRgbString(e):n(`hsl`)?this.fromHslString(e):(n(`hsv`)||n(`hsb`))&&this.fromHsvString(e)}else if(t instanceof e)this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this._h=t._h,this._s=t._s,this._l=t._l,this._v=t._v;else if(n(`rgb`))this.r=_r(t.r),this.g=_r(t.g),this.b=_r(t.b),this.a=typeof t.a==`number`?_r(t.a,1):1;else if(n(`hsl`))this.fromHsl(t);else if(n(`hsv`))this.fromHsv(t);else throw Error(`@ant-design/fast-color: unsupported input `+JSON.stringify(t))}}setR(e){return this._sc(`r`,e)}setG(e){return this._sc(`g`,e)}setB(e){return this._sc(`b`,e)}setA(e){return this._sc(`a`,e,1)}setHue(e){let t=this.toHsv();return t.h=e,this._c(t)}getLuminance(){function e(e){let t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4}let t=e(this.r),n=e(this.g),r=e(this.b);return .2126*t+.7152*n+.0722*r}getHue(){if(this._h===void 0){let e=this.getMax()-this.getMin();this._h=e===0?0:U(60*(this.r===this.getMax()?(this.g-this.b)/e+(this.g<this.b?6:0):this.g===this.getMax()?(this.b-this.r)/e+2:(this.r-this.g)/e+4))}return this._h}getSaturation(){if(this._s===void 0){let e=this.getMax()-this.getMin();this._s=e===0?0:e/this.getMax()}return this._s}getLightness(){return this._l===void 0&&(this._l=(this.getMax()+this.getMin())/510),this._l}getValue(){return this._v===void 0&&(this._v=this.getMax()/255),this._v}getBrightness(){return this._brightness===void 0&&(this._brightness=(this.r*299+this.g*587+this.b*114)/1e3),this._brightness}darken(e=10){let t=this.getHue(),n=this.getSaturation(),r=this.getLightness()-e/100;return r<0&&(r=0),this._c({h:t,s:n,l:r,a:this.a})}lighten(e=10){let t=this.getHue(),n=this.getSaturation(),r=this.getLightness()+e/100;return r>1&&(r=1),this._c({h:t,s:n,l:r,a:this.a})}mix(e,t=50){let n=this._c(e),r=t/100,i=e=>(n[e]-this[e])*r+this[e],a={r:U(i(`r`)),g:U(i(`g`)),b:U(i(`b`)),a:U(i(`a`)*100)/100};return this._c(a)}tint(e=10){return this.mix({r:255,g:255,b:255,a:1},e)}shade(e=10){return this.mix({r:0,g:0,b:0,a:1},e)}onBackground(e){let t=this._c(e),n=this.a+t.a*(1-this.a),r=e=>U((this[e]*this.a+t[e]*t.a*(1-this.a))/n);return this._c({r:r(`r`),g:r(`g`),b:r(`b`),a:n})}isDark(){return this.getBrightness()<128}isLight(){return this.getBrightness()>=128}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}clone(){return this._c(this)}toHexString(){let e=`#`,t=(this.r||0).toString(16);e+=t.length===2?t:`0`+t;let n=(this.g||0).toString(16);e+=n.length===2?n:`0`+n;let r=(this.b||0).toString(16);if(e+=r.length===2?r:`0`+r,typeof this.a==`number`&&this.a>=0&&this.a<1){let t=U(this.a*255).toString(16);e+=t.length===2?t:`0`+t}return e}toHsl(){return{h:this.getHue(),s:this.getSaturation(),l:this.getLightness(),a:this.a}}toHslString(){let e=this.getHue(),t=U(this.getSaturation()*100),n=U(this.getLightness()*100);return this.a===1?`hsl(${e},${t}%,${n}%)`:`hsla(${e},${t}%,${n}%,${this.a})`}toHsv(){return{h:this.getHue(),s:this.getSaturation(),v:this.getValue(),a:this.a}}toRgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}toRgbString(){return this.a===1?`rgb(${this.r},${this.g},${this.b})`:`rgba(${this.r},${this.g},${this.b},${this.a})`}toString(){return this.toRgbString()}_sc(e,t,n){let r=this.clone();return r[e]=_r(t,n),r}_c(e){return new this.constructor(e)}getMax(){return this._max===void 0&&(this._max=Math.max(this.r,this.g,this.b)),this._max}getMin(){return this._min===void 0&&(this._min=Math.min(this.r,this.g,this.b)),this._min}fromHexString(e){let t=e.replace(`#`,``);function n(e,n){re
Line truncated
|
||||
0 6px 16px 0 rgba(0, 0, 0, 0.08),
|
||||
0 3px 6px -4px rgba(0, 0, 0, 0.12),
|
||||
0 9px 28px 8px rgba(0, 0, 0, 0.05)
|
||||
`,boxShadowSecondary:`
|
||||
0 6px 16px 0 rgba(0, 0, 0, 0.08),
|
||||
0 3px 6px -4px rgba(0, 0, 0, 0.12),
|
||||
0 9px 28px 8px rgba(0, 0, 0, 0.05)
|
||||
`,boxShadowTertiary:`
|
||||
0 1px 2px 0 rgba(0, 0, 0, 0.03),
|
||||
0 1px 6px -1px rgba(0, 0, 0, 0.02),
|
||||
0 2px 4px 0 rgba(0, 0, 0, 0.02)
|
||||
`,screenXS:480,screenXSMin:480,screenXSMax:575,screenSM:576,screenSMMin:576,screenSMMax:767,screenMD:768,screenMDMin:768,screenMDMax:991,screenLG:992,screenLGMin:992,screenLGMax:1199,screenXL:a,screenXLMin:a,screenXLMax:1599,screenXXL:o,screenXXLMin:o,boxShadowPopoverArrow:`2px 2px 5px rgba(0, 0, 0, 0.05)`,boxShadowCard:`
|
||||
0 1px 2px -2px ${new W(`rgba(0, 0, 0, 0.16)`).toRgbString()},
|
||||
0 3px 6px 0 ${new W(`rgba(0, 0, 0, 0.12)`).toRgbString()},
|
||||
0 5px 12px 4px ${new W(`rgba(0, 0, 0, 0.09)`).toRgbString()}
|
||||
`,boxShadowDrawerRight:`
|
||||
-6px 0 16px 0 rgba(0, 0, 0, 0.08),
|
||||
-3px 0 6px -4px rgba(0, 0, 0, 0.12),
|
||||
-9px 0 28px 8px rgba(0, 0, 0, 0.05)
|
||||
`,boxShadowDrawerLeft:`
|
||||
6px 0 16px 0 rgba(0, 0, 0, 0.08),
|
||||
3px 0 6px -4px rgba(0, 0, 0, 0.12),
|
||||
9px 0 28px 8px rgba(0, 0, 0, 0.05)
|
||||
`,boxShadowDrawerUp:`
|
||||
0 6px 16px 0 rgba(0, 0, 0, 0.08),
|
||||
0 3px 6px -4px rgba(0, 0, 0, 0.12),
|
||||
0 9px 28px 8px rgba(0, 0, 0, 0.05)
|
||||
`,boxShadowDrawerDown:`
|
||||
0 -6px 16px 0 rgba(0, 0, 0, 0.08),
|
||||
0 -3px 6px -4px rgba(0, 0, 0, 0.12),
|
||||
0 -9px 28px 8px rgba(0, 0, 0, 0.05)
|
||||
`,boxShadowTabsOverflowLeft:`inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)`,boxShadowTabsOverflowRight:`inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)`,boxShadowTabsOverflowTop:`inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)`,boxShadowTabsOverflowBottom:`inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)`}),r)}var sa=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},ca={lineHeight:!0,lineHeightSM:!0,lineHeightLG:!0,lineHeightHeading1:!0,lineHeightHeading2:!0,lineHeightHeading3:!0,lineHeightHeading4:!0,lineHeightHeading5:!0,opacityLoading:!0,fontWeightStrong:!0,zIndexPopupBase:!0,zIndexBase:!0,opacityImage:!0},la={motionBase:!0,motionUnit:!0},ua={screenXS:!0,screenXSMin:!0,screenXSMax:!0,screenSM:!0,screenSMMin:!0,screenSMMax:!0,screenMD:!0,screenMDMin:!0,screenMDMax:!0,screenLG:!0,screenLGMin:!0,screenLGMax:!0,screenXL:!0,screenXLMin:!0,screenXLMax:!0,screenXXL:!0,screenXXLMin:!0},da=(e,t,n)=>{let r=n.getDerivativeToken(e),{override:i}=t,a=sa(t,[`override`]),o=Object.assign(Object.assign({},r),{override:i});return o=oa(o),a&&Object.entries(a).forEach(([e,t])=>{let{theme:n}=t,r=sa(t,[`theme`]),i=r;n&&(i=da(Object.assign(Object.assign({},o),r),{override:r},n)),o[e]=i}),o};function fa(){let{token:e,hashed:t,theme:n,override:r,cssVar:i}=a.useContext(yi),o=`${na}-${t||``}`,s=n||_i,[c,l,u]=Mt(s,[mr,e],{salt:o,override:r,getComputedToken:da,formatToken:oa,cssVar:i&&{prefix:i.prefix,key:i.key,unitless:ca,ignore:la,preserve:ua}});return[s,u,t?l:``,c,i]}var pa={overflow:`hidden`,whiteSpace:`nowrap`,textOverflow:`ellipsis`},ma=(e,t=!1)=>({boxSizing:`border-box`,margin:0,padding:0,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight,listStyle:`none`,fontFamily:t?`inherit`:e.fontFamily}),ha=()=>({display:`inline-flex`,alignItems:`center`,color:`inherit`,fontStyle:`normal`,lineHeight:0,textAlign:`center`,textTransform:`none`,verticalAlign:`-0.125em`,textRendering:`optimizeLegibility`,"-webkit-font-smoothing":`antialiased`,"-moz-osx-font-smoothing":`grayscale`,"> *":{lineHeight:1},svg:{display:`inline-block`}}),ga=()=>({"&::before":{display:`table`,content:`""`},"&::after":{display:`table`,clear:`both`,content:`""`}}),_a=e=>({a:{color:e.colorLink,textDecoration:e.linkDecoration,backgroundColor:`transparent`,outline:`none`,cursor:`pointer`,transition:`color ${e.motionDurationSlow}`,"-webkit-text-decoration-skip":`objects`,"&:hover":{color:e.colorLinkHover},"&:active":{color:e.colorLinkActive},"&:active, &:hover":{textDecoration:e.linkHoverDecoration,outline:0},"&:focus":{textDecoration:e.linkFocusDecoration,outline:0},"&[disabled]":{color:e.colorTextDisabled,cursor:`not-allowed`}}}),va=(e,t,n,r)=>{let i=`[class^="${t}"], [class*=" ${t}"]`,a=n?`.${n}`:i,o={boxSizing:`border-box`,"&::before, &::after":{boxSizing:`border-box`}},s={};return r!==!1&&(s={fontFamily:e.fontFamily,fontSize:e.fontSize}),{[a]:Object.assign(Object.assign(Object.assign({},s),o),{[i]:o})}},ya=(e,t)=>({outline:`${dt(e.lineWidthFocus)} solid ${e.colorPrimaryBorder}`,outlineOffset:t??1,transition:`outline-offset 0s, outline 0s`}),ba=(e,t)=>({"&:focus-visible":ya(e,t)}),xa=e=>({[`.${e}`]:Object.assign(Object.assign({},ha()),{[`.${e} .${e}-icon`]:{display:`block`}})}),Sa=e=>Object.assign(Object.assign({color:e.colorLink,textDecoration:e.linkDecoration,outline:`none`,cursor:`pointer`,transition:`all ${e.motionDurationSlow}`,border:0,padding:0,background:`none`,userSelect:`none`},ba(e)),{"&:hover":{color:e.colorLinkHover,textDecoration:e.linkHoverDecoration},"&:focus":{color:e.colorLinkHover,textDecoration:e.linkFocusDecoration},"&:active":{color:e.colorLinkActive,textDecoration:e.linkHoverDecoration}}),{genStyleHooks:Ca,genComponentStyleHook:wa,genSubStyleComponent:Ta}=ea({usePrefix:()=>{let{getPrefixCls:e,iconPrefixCls:t}=(0,a.useContext)(G);return{rootPrefixCls:e(),iconPrefixCls:t}},useToken:()=>{let[e,t,n,r,i]=fa();return{theme:e,realToken:t,hashId:n,token:r,cssVar:i}},useCSP:()=>{let{csp:e}=(0,a.useContext)(G);return e??{}},getResetStyles:(e,t)=>{let n=_a(e);return[n,{"&":n},xa(t?.prefix.iconPrefixCls??bi)]},getCommonStyle:va,getCompUnitless:()=>ca}),Ea=[`children`],Da=a.createContext({});function Oa(e){var t=e.children,n=He(e,Ea);return a.createElement(Da.Provider,{value:n},t)}var ka=function(e){de(n,e);var t=I(n);function n(){return j(this,n),t.apply(this,arguments)}return N(n,[{key:`render`,value:function(){return this.props.children}}]),n}(a.Component);function Aa(e){var t=R(a.useReducer(function(e){return e+1},0),2)[1],n=a.useRef(e);return[Li(function(){return n.current}),Li(function(e){n.current=typeof e==`function`?e(n.current):e,t()})]}var ja=`none`,Ma=`appear`,Na=`enter`,Pa=`leave`,Fa=`none`,Ia=`prepare`,La=`start`,Ra=`active`,za=`prepared`;function Ba(e,t){var n={};return n[e.to
Line truncated
|
||||
.anticon {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
color: inherit;
|
||||
font-style: normal;
|
||||
line-height: 0;
|
||||
text-align: center;
|
||||
text-transform: none;
|
||||
vertical-align: -0.125em;
|
||||
text-rendering: optimizeLegibility;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.anticon > * {
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.anticon svg {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.anticon::before {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.anticon .anticon-icon {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.anticon[tabindex] {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.anticon-spin::before,
|
||||
.anticon-spin {
|
||||
display: inline-block;
|
||||
-webkit-animation: loadingCircle 1s infinite linear;
|
||||
animation: loadingCircle 1s infinite linear;
|
||||
}
|
||||
|
||||
@-webkit-keyframes loadingCircle {
|
||||
100% {
|
||||
-webkit-transform: rotate(360deg);
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes loadingCircle {
|
||||
100% {
|
||||
-webkit-transform: rotate(360deg);
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
`,No=function(e){var t=(0,a.useContext)(qn),n=t.csp,r=t.prefixCls,i=t.layer,o=Mo;r&&(o=o.replace(/anticon/g,r)),i&&(o=`@layer ${i} {
|
||||
${o}
|
||||
}`),(0,a.useEffect)(function(){var t=wo(e.current);Be(o,`@ant-design-icons`,{prepend:!i,csp:n,attachTo:t})},[])},Po=[`icon`,`className`,`onClick`,`style`,`primaryColor`,`secondaryColor`],Fo={primaryColor:`#333`,secondaryColor:`#E6E6E6`,calculated:!1},Io=function(e){var t=e.icon,n=e.className,r=e.onClick,i=e.style,o=e.primaryColor,s=e.secondaryColor,c=He(e,Po),l=a.useRef(),u=Fo;if(o&&(u={primaryColor:o,secondaryColor:s||Ao(o)}),No(l),Eo(Do(t),`icon should be icon definiton, but got ${t}`),!Do(t))return null;var d=t;return d&&typeof d.icon==`function`&&(d=E(E({},d),{},{icon:d.icon(u.primaryColor,u.secondaryColor)})),ko(d.icon,`svg-${d.name}`,E(E({className:n,onClick:r,style:i,"data-icon":d.name,width:`1em`,height:`1em`,fill:`currentColor`,"aria-hidden":`true`},c),{},{ref:l}))};Io.displayName=`IconReact`,Io.getTwoToneColors=function(){return E({},Fo)},Io.setTwoToneColors=function(e){var t=e.primaryColor,n=e.secondaryColor;Fo.primaryColor=t,Fo.secondaryColor=n||Ao(t),Fo.calculated=!!n};function Lo(e){var t=R(jo(e),2),n=t[0],r=t[1];return Io.setTwoToneColors({primaryColor:n,secondaryColor:r})}var Ro=[`className`,`icon`,`spin`,`rotate`,`tabIndex`,`onClick`,`twoToneColor`];Lo(zr.primary);var zo=a.forwardRef(function(e,t){var n=e.className,r=e.icon,i=e.spin,s=e.rotate,c=e.tabIndex,l=e.onClick,u=e.twoToneColor,d=He(e,Ro),f=a.useContext(qn),m=f.prefixCls,h=m===void 0?`anticon`:m,g=f.rootClassName,_=(0,p.default)(g,h,w(w({},`${h}-${r.name}`,!!r.name),`${h}-spin`,!!i||r.name===`loading`),n),v=c;v===void 0&&l&&(v=-1);var y=s?{msTransform:`rotate(${s}deg)`,transform:`rotate(${s}deg)`}:void 0,b=R(jo(u),2),x=b[0],S=b[1];return a.createElement(`span`,o({role:`img`,"aria-label":r.name},d,{ref:t,tabIndex:v,onClick:l,className:_}),a.createElement(Io,{icon:r,primaryColor:x,secondaryColor:S,style:y}))});zo.displayName=`AntdIcon`,zo.getTwoToneColor=function(){var e=Io.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor},zo.setTwoToneColor=Lo;var Bo=a.forwardRef(function(e,t){return a.createElement(zo,o({},e,{ref:t,icon:xo}))}),Vo={icon:{tag:`svg`,attrs:{"fill-rule":`evenodd`,viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z`}}]},name:`close-circle`,theme:`filled`},Ho=a.forwardRef(function(e,t){return a.createElement(zo,o({},e,{ref:t,icon:Vo}))}),Uo={icon:{tag:`svg`,attrs:{"fill-rule":`evenodd`,viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z`}}]},name:`close`,theme:`outlined`},Wo=a.forwardRef(function(e,t){return a.createElement(zo,o({},e,{ref:t,icon:Uo}))}),Go={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z`}}]},name:`exclamation-circle`,theme:`filled`},Ko=a.forwardRef(function(e,t){return a.createElement(zo,o({},e,{ref:t,icon:Go}))}),qo={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z`}}]},name:`info-circle`,theme:`filled`},Jo=a.forwardRef(function(e,t){return a.createElement(zo,o({},e,{ref:t,icon:qo}))}),Yo=`accept acceptCharset accessKey action allowFullScreen allowTransparency
|
||||
alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
|
||||
charSet checked classID className colSpan cols content contentEditable contextMenu
|
||||
controls coords crossOrigin data dateTime default defer dir disabled download draggable
|
||||
encType form formAction formEncType formMethod formNoValidate formTarget frameBorder
|
||||
headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity
|
||||
is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media
|
||||
mediaGroup method min minLength multiple muted name noValidate nonce open
|
||||
optimum pattern placeholder poster preload radioGroup readOnly rel required
|
||||
reversed role rowSpan rows sandbox scope scoped scrolling seamless selected
|
||||
shape size sizes span spellCheck src srcDoc srcLang srcSet start step style
|
||||
summary tabIndex target title type useMap value width wmode wrap onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
|
||||
onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick
|
||||
onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown
|
||||
onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
|
||||
onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough
|
||||
onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata
|
||||
onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`.split(/[\s\n]+/),Xo=`aria-`,Zo=`data-`;function Qo(e,t){return e.indexOf(t)===0}function $o(e){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n=t===!1?{aria:!0,data:!0,attr:!0}:t===!0?{aria:!0}:E({},t),r={};return Object.keys(e).forEach(function(t){(n.aria&&(t===`role`||Qo(t,Xo))||n.data&&Qo(t,Zo)||n.attr&&Yo.includes(t))&&(r[t]=e[t])}),r}function es(e){return e&&a.isValidElement(e)&&e.type===a.Fragment}var ts=(e,t,n)=>a.isValidElement(e)?a.cloneElement(e,typeof n==`function`?n(e.props||{}):n):t;function ns(e,t){return ts(e,e,t)}var rs=e=>{let[,,,,t]=fa();return t?`${e}-css-var`:``},K={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(e){var t=e.keyCode;if(e.altKey&&!e.ctrlKey||e.metaKey||t>=K.F1&&t<=K.F12)return!1;switch(t){case K.ALT:case K.CAPS_LOCK:case K.CONTEXT_MENU:case K.CTRL:case K.DOWN:case K.END:case K.ESC:case K.HOME:case K.INSERT:case K.LEFT:case K.MAC_FF_META:case K.META:case K.NUMLOCK:case K.NUM_CENTER:case K.PAGE_DOWN:case K.PAGE_UP:case K.PAUSE:case K.PRINT_SCREEN:case K.RIGHT:case K.SHIFT:case K.UP:case K.WIN_KEY:case K.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(e){if(e>=K.ZERO&&e<=K.NINE||e>=K.NUM_ZERO&&e<=K.NUM_MULTIPLY||e>=K.A&&e<=K.Z||window.navigator.userAgent.indexOf(`WebKit`)!==-1&&e===0)return!0;switch(e){case K.SPACE:case K.QUESTION_MARK:case K.NUM_PLUS:case K.NUM_MINUS:case K.NUM_PERIOD:case K.NUM_DIVISION:case K.SEMICOLON:case K.DASH:case K.EQUALS:case K.COMMA:case K.PERIOD:case K.SLASH:case K.APOSTROPHE:case K.SINGLE_QUOTE:case K.OPEN_SQUARE_BRACKET:case K.BACKSLASH:case K.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},is={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z`}}]},name:`loading`,theme:`outlined`},as=a.forwardRef(function(e,t){return a.createElement(zo,o({},e,{ref:t,icon:is}))}),os=a.createContext(void 0),ss=100,cs=1e3,ls={Modal:ss,Drawer:ss,Popover:ss,Popconfirm:ss,Tooltip:ss,Tour:ss,FloatButton:ss},us={SelectLike:50,Dropdown:50,DatePicker:50,Menu:50,ImagePreview:1};function ds(e){return e in ls}var fs=(e,t)=>{let[,n]=fa(),r=a.useContext(os),i=ds(e),o;if(t!==void 0)o=[t,t];else{let a=r??0;a+=i?(r?0:n.zIndexPopupBase)+ls[e]:us[e],o=[r===void 0?t:a,a]}return o};function ps(e,t){this.v=e,this.k=t}function q(e,t,n,r){var i=Object.defineProperty;try{i({},``,{})}catch{i=0}q=function(e,t,n,r){function a(t,n){q(e,t,function(e){return this._invoke(t,n,e)})}t?i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(a(`next`,0),a(`throw`,1),a(`return`,2))},q(e,t,n,r)}function ms(){var e,t,n=typeof Symbol==`function`?Symbol:{},r=n.iterator||`@@iterator`,i=n.toStringTag||`@@toStringTag`;function a(n,r,i,a){var c=r&&r.prototype instanceof s?r:s,l=Object.create(c.prototype);return q(l,`_invoke`,function(n,r,i){var a,s,c,l=0,u=i||[],d=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return a=t,s=0,c=e,f.n=n,o}};function p(n,r){for(s=n,c=r,t=0;!d&&l&&!i&&t<u.length;t++){var i,a=u[t],p=f.p,m=a[2];n>3?(i=m===r)&&(c=a[(s=a[4])?5:(s=3,3)],a[4]=a[5]=e):a[0]<=p&&((i=n<2&&p<a[1])?(s=0,f.v=r,f.n=a[1]):p<m&&(i=n<3||a[0]>r||r>m)&&(a[4]=n,a[5]=r,f.n=m,s=0))}if(i||n>1)return o;throw d=!0,r}return function(i,u,m){if(l>1)throw TypeError(`Generator is already running`);for(d&&u===1&&p(u,m),s=u,c=m;(t=s<2?e:c)||!d;){a||(s?(s>1&&(f.n=s<3?-1:c),p(s,c)):f.v=c);try{if(l=2,a){if(s||(i=`next`),t=a[i]){if(!(t=t.call(a,c)))throw TypeError(`iterator result is not an object`);if(!t.done)return t;c=t.value,s<2&&(s=0)}else s===1&&(t=a.return)&&t.call(a),s<2&&(c=TypeError(`The iterator doLine truncated
|
||||
${a}${e}-enter,
|
||||
${a}${e}-appear
|
||||
`]:Object.assign(Object.assign({},Ic(r)),{animationPlayState:`paused`}),[`${a}${e}-leave`]:Object.assign(Object.assign({},Lc(r)),{animationPlayState:`paused`}),[`
|
||||
${a}${e}-enter${e}-enter-active,
|
||||
${a}${e}-appear${e}-appear-active
|
||||
`]:{animationName:t,animationPlayState:`running`},[`${a}${e}-leave${e}-leave-active`]:{animationName:n,animationPlayState:`running`,pointerEvents:`none`}}},zc=new V(`antZoomIn`,{"0%":{transform:`scale(0.2)`,opacity:0},"100%":{transform:`scale(1)`,opacity:1}}),Bc=new V(`antZoomOut`,{"0%":{transform:`scale(1)`},"100%":{transform:`scale(0.2)`,opacity:0}}),Vc=new V(`antZoomBigIn`,{"0%":{transform:`scale(0.8)`,opacity:0},"100%":{transform:`scale(1)`,opacity:1}}),Hc=new V(`antZoomBigOut`,{"0%":{transform:`scale(1)`},"100%":{transform:`scale(0.8)`,opacity:0}}),Uc=new V(`antZoomUpIn`,{"0%":{transform:`scale(0.8)`,transformOrigin:`50% 0%`,opacity:0},"100%":{transform:`scale(1)`,transformOrigin:`50% 0%`}}),Wc=new V(`antZoomUpOut`,{"0%":{transform:`scale(1)`,transformOrigin:`50% 0%`},"100%":{transform:`scale(0.8)`,transformOrigin:`50% 0%`,opacity:0}}),Gc=new V(`antZoomLeftIn`,{"0%":{transform:`scale(0.8)`,transformOrigin:`0% 50%`,opacity:0},"100%":{transform:`scale(1)`,transformOrigin:`0% 50%`}}),Kc=new V(`antZoomLeftOut`,{"0%":{transform:`scale(1)`,transformOrigin:`0% 50%`},"100%":{transform:`scale(0.8)`,transformOrigin:`0% 50%`,opacity:0}}),qc=new V(`antZoomRightIn`,{"0%":{transform:`scale(0.8)`,transformOrigin:`100% 50%`,opacity:0},"100%":{transform:`scale(1)`,transformOrigin:`100% 50%`}}),Jc=new V(`antZoomRightOut`,{"0%":{transform:`scale(1)`,transformOrigin:`100% 50%`},"100%":{transform:`scale(0.8)`,transformOrigin:`100% 50%`,opacity:0}}),Yc=new V(`antZoomDownIn`,{"0%":{transform:`scale(0.8)`,transformOrigin:`50% 100%`,opacity:0},"100%":{transform:`scale(1)`,transformOrigin:`50% 100%`}}),Xc=new V(`antZoomDownOut`,{"0%":{transform:`scale(1)`,transformOrigin:`50% 100%`},"100%":{transform:`scale(0.8)`,transformOrigin:`50% 100%`,opacity:0}}),Zc={zoom:{inKeyframes:zc,outKeyframes:Bc},"zoom-big":{inKeyframes:Vc,outKeyframes:Hc},"zoom-big-fast":{inKeyframes:Vc,outKeyframes:Hc},"zoom-left":{inKeyframes:Gc,outKeyframes:Kc},"zoom-right":{inKeyframes:qc,outKeyframes:Jc},"zoom-up":{inKeyframes:Uc,outKeyframes:Wc},"zoom-down":{inKeyframes:Yc,outKeyframes:Xc}},Qc=(e,t)=>{let{antCls:n}=e,r=`${n}-${t}`,{inKeyframes:i,outKeyframes:a}=Zc[t];return[Rc(r,i,a,t===`zoom-big-fast`?e.motionDurationFast:e.motionDurationMid),{[`
|
||||
${r}-enter,
|
||||
${r}-appear
|
||||
`]:{transform:`scale(0)`,opacity:0,animationTimingFunction:e.motionEaseOutCirc,"&-prepare":{transform:`none`}},[`${r}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]},$c=(e,t)=>{let{r:n,g:r,b:i,a}=e.toRgb(),o=new Mc(e.toRgbString()).onBackground(t).toHsv();return a<=.5?o.v>.5:n*.299+r*.587+i*.114>192},el=e=>{let{paddingInline:t,onlyIconSize:n}=e;return Wi(e,{buttonPaddingHorizontal:t,buttonPaddingVertical:0,buttonIconOnlyFontSize:n})},tl=e=>{let t=e.contentFontSize??e.fontSize,n=e.contentFontSizeSM??e.fontSize,r=e.contentFontSizeLG??e.fontSizeLG,i=e.contentLineHeight??ci(t),a=e.contentLineHeightSM??ci(n),o=e.contentLineHeightLG??ci(r),s=$c(new Fc(e.colorBgSolid),`#fff`)?`#000`:`#fff`,c=ta.reduce((t,n)=>Object.assign(Object.assign({},t),{[`${n}ShadowColor`]:`0 ${dt(e.controlOutlineWidth)} 0 ${ia(e[`${n}1`],e.colorBgContainer)}`}),{});return Object.assign(Object.assign({},c),{fontWeight:400,iconGap:e.marginXS,defaultShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlTmpOutline}`,primaryShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlOutline}`,dangerShadow:`0 ${e.controlOutlineWidth}px 0 ${e.colorErrorOutline}`,primaryColor:e.colorTextLightSolid,dangerColor:e.colorTextLightSolid,borderColorDisabled:e.colorBorder,defaultGhostColor:e.colorBgContainer,ghostBg:`transparent`,defaultGhostBorderColor:e.colorBgContainer,paddingInline:e.paddingContentHorizontal-e.lineWidth,paddingInlineLG:e.paddingContentHorizontal-e.lineWidth,paddingInlineSM:8-e.lineWidth,onlyIconSize:`inherit`,onlyIconSizeSM:`inherit`,onlyIconSizeLG:`inherit`,groupBorderColor:e.colorPrimaryHover,linkHoverBg:`transparent`,textTextColor:e.colorText,textTextHoverColor:e.colorText,textTextActiveColor:e.colorText,textHoverBg:e.colorFillTertiary,defaultColor:e.colorText,defaultBg:e.colorBgContainer,defaultBorderColor:e.colorBorder,defaultBorderColorDisabled:e.colorBorder,defaultHoverBg:e.colorBgContainer,defaultHoverColor:e.colorPrimaryHover,defaultHoverBorderColor:e.colorPrimaryHover,defaultActiveBg:e.colorBgContainer,defaultActiveColor:e.colorPrimaryActive,defaultActiveBorderColor:e.colorPrimaryActive,solidTextColor:s,contentFontSize:t,contentFontSizeSM:n,contentFontSizeLG:r,contentLineHeight:i,contentLineHeightSM:a,contentLineHeightLG:o,paddingBlock:Math.max((e.controlHeight-t*i)/2-e.lineWidth,0),paddingBlockSM:Math.max((e.controlHeightSM-n*a)/2-e.lineWidth,0),paddingBlockLG:Math.max((e.controlHeightLG-r*o)/2-e.lineWidth,0)})},nl=e=>{let{componentCls:t,iconCls:n,fontWeight:r,opacityLoading:i,motionDurationSlow:a,motionEaseInOut:o,iconGap:s,calc:c}=e;return{[t]:{outline:`none`,position:`relative`,display:`inline-flex`,gap:s,alignItems:`center`,justifyContent:`center`,fontWeight:r,whiteSpace:`nowrap`,textAlign:`center`,backgroundImage:`none`,background:`transparent`,border:`${dt(e.lineWidth)} ${e.lineType} transparent`,cursor:`pointer`,transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,userSelect:`none`,touchAction:`manipulation`,color:e.colorText,"&:disabled > *":{pointerEvents:`none`},[`${t}-icon > svg`]:ha(),"> a":{color:`currentColor`},"&:not(:disabled)":ba(e),[`&${t}-two-chinese-chars::first-letter`]:{letterSpacing:`0.34em`},[`&${t}-two-chinese-chars > *:not(${n})`]:{marginInlineEnd:`-0.34em`,letterSpacing:`0.34em`},[`&${t}-icon-only`]:{paddingInline:0,[`&${t}-compact-item`]:{flex:`none`}},[`&${t}-loading`]:{opacity:i,cursor:`default`},[`${t}-loading-icon`]:{transition:[`width`,`opacity`,`margin`].map(e=>`${e} ${a} ${o}`).join(`,`)},[`&:not(${t}-icon-end)`]:{[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineEnd:c(s).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineEnd:0},"&-leave-start":{marginInlineEnd:0},"&-leave-active":{marginInlineEnd:c(s).mul(-1).equal()}}},"&-icon-end":{flexDirection:`row-reverse`,[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineStart:c(s).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineStart:0},"&-leave-start":{marginInlineStart:0},"&-leave-active":{marginInlineStart:c(s).mul(-1).equal()}}}}}},rl=(e,t,n)=>({[`&:not(:disabled):not(${e}-disabled)`]:{"&:hover":t,"&:active":n}}),il=e=>({minWidth:e.controlHeight,paddingInline:0,borderRadius:`50%`}),al=e=>({cursor:`not-allowed`,borderColor:e.borderColorDisabled,color:e.colorTextDisabled,background:e.colorBgContainerDisabled,boxShadow:`none`}),ol=(e,t,n,r,i,a,o,s)=>({[`&${e}-background-ghost`]:Object.assign(Object.assign({color:n||void 0,background:t,borderColor:r||void 0,boxShadow:`none`},rl(e,Object.assign({background:t},o),Object.assign({background:t},s))),{"&:disabled":{cursor:`not-allowed`,color:i||void 0,borderColor:a||void 0}})}),sl=e=>({[`&:disabled, &${e.componentCls}-disabled`]:Object.assign({},al(e))}),cl=e=>({[`&:disabled, &${e.componentCls}-disabled`]:{cursor:`not-allowed`,color:e.colorTextDisabled}}),ll=(e,t,n,r)=>{let i=r&&[`link`,`text`].includes(r)?cl:sl;return Object.assign(Object.assign({},i(e)),rl(e.componentCls,t,n))},ul=(e,t,n,r,i)=>({[`&${e.componentClLine truncated
|
||||
#${t}::-webkit-scrollbar {
|
||||
${c?`width: ${s.width};`:``}
|
||||
${l?`height: ${s.height};`:``}
|
||||
}`,t)}catch(e){console.error(e),i=c,a=l}}document.body.appendChild(n);var u=e&&i&&!isNaN(i)?i:n.offsetWidth-n.clientWidth,d=e&&a&&!isNaN(a)?a:n.offsetHeight-n.clientHeight;return document.body.removeChild(n),Re(t),{width:u,height:d}}function Gl(e){return typeof document>`u`||!e||!(e instanceof Element)?{width:0,height:0}:Wl(e)}function Kl(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}var ql=`rc-util-locker-${Date.now()}`,Jl=0;function Yl(e){var t=!!e,n=R(a.useState(function(){return Jl+=1,`${ql}_${Jl}`}),1)[0];_t(function(){if(t){var e=Gl(document.body).width;Be(`
|
||||
html body {
|
||||
overflow-y: hidden;
|
||||
${Kl()?`width: calc(100% - ${e}px);`:``}
|
||||
}`,n)}else Re(n);return function(){Re(n)}},[t,n])}var Xl=!1;function Zl(e){return typeof e==`boolean`&&(Xl=e),Xl}var Ql=function(e){return e===!1?!1:!z()||!e?null:typeof e==`string`?document.querySelector(e):typeof e==`function`?e():e},$l=a.forwardRef(function(e,t){var n=e.open,r=e.autoLock,i=e.getContainer,o=e.debug,s=e.autoDestroy,c=s===void 0||s,l=e.children,u=R(a.useState(n),2),d=u[0],p=u[1],m=d||n;a.useEffect(function(){(c||n)&&p(n)},[n,c]);var h=R(a.useState(function(){return Ql(i)}),2),g=h[0],_=h[1];a.useEffect(function(){_(Ql(i)??null)});var v=R(Ul(m&&!g,o),2),y=v[0],b=v[1],x=g??y;Yl(r&&n&&z()&&(x===y||x===document.body));var S=null;l&&se(l)&&t&&(S=l.ref);var C=A(S,t);if(!m||!z()||g===void 0)return null;var w=x===!1||Zl(),T=l;return t&&(T=a.cloneElement(l,{ref:C})),a.createElement(Vl.Provider,{value:b},w?T:(0,f.createPortal)(T,x))});function eu(){return E({},a).useId}var tu=0,nu=eu(),ru=nu?function(e){var t=nu();return e||t}:function(e){var t=R(a.useState(`ssr-id`),2),n=t[0],r=t[1];return a.useEffect(function(){var e=tu;tu+=1,r(`rc_unique_${e}`)},[]),e||n},iu=`RC_FORM_INTERNAL_HOOKS`,Y=function(){x(!1,`Can not find FormContext. Please make sure you wrap Field under Form.`)},au=a.createContext({getFieldValue:Y,getFieldsValue:Y,getFieldError:Y,getFieldWarning:Y,getFieldsError:Y,isFieldsTouched:Y,isFieldTouched:Y,isFieldValidating:Y,isFieldsValidating:Y,resetFields:Y,setFields:Y,setFieldValue:Y,setFieldsValue:Y,validateFields:Y,submit:Y,getInternalHooks:function(){return Y(),{dispatch:Y,initEntityValue:Y,registerField:Y,useSubscribe:Y,setInitialValues:Y,destroyForm:Y,setCallbacks:Y,registerWatch:Y,getFields:Y,setValidateMessages:Y,setPreserve:Y,getInitialValue:Y}}}),ou=a.createContext(null);function su(e){return e==null?[]:Array.isArray(e)?e:[e]}function cu(e){return e&&!!e._init}function lu(){return{default:`Validation error on field %s`,required:`%s is required`,enum:`%s must be one of %s`,whitespace:`%s cannot be empty`,date:{format:`%s date %s is invalid for format %s`,parse:`%s date could not be parsed, %s is invalid `,invalid:`%s date %s is invalid`},types:{string:`%s is not a %s`,method:`%s is not a %s (function)`,array:`%s is not an %s`,object:`%s is not an %s`,number:`%s is not a %s`,date:`%s is not a %s`,boolean:`%s is not a %s`,integer:`%s is not an %s`,float:`%s is not a %s`,regexp:`%s is not a valid %s`,email:`%s is not a valid %s`,tel:`%s is not a valid %s`,url:`%s is not a valid %s`,hex:`%s is not a valid %s`},string:{len:`%s must be exactly %s characters`,min:`%s must be at least %s characters`,max:`%s cannot be longer than %s characters`,range:`%s must be between %s and %s characters`},number:{len:`%s must equal %s`,min:`%s cannot be less than %s`,max:`%s cannot be greater than %s`,range:`%s must be between %s and %s`},array:{len:`%s must be exactly %s in length`,min:`%s cannot be less than %s in length`,max:`%s cannot be greater than %s in length`,range:`%s must be between %s and %s in length`},pattern:{mismatch:`%s value %s does not match pattern %s`},clone:function(){var e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}var uu=lu();function du(e){try{return Function.toString.call(e).indexOf(`[native code]`)!==-1}catch{return typeof e==`function`}}function fu(e,t,n){if(pe())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var i=new(e.bind.apply(e,r));return n&&ue(i,n.prototype),i}function pu(e){var t=typeof Map==`function`?new Map:void 0;return pu=function(e){if(e===null||!du(e))return e;if(typeof e!=`function`)throw TypeError(`Super expression must either be null or a function`);if(t!==void 0){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return fu(e,arguments,fe(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),ue(n,e)},pu(e)}var mu=/%[sdj%]/g,hu=function(){};function gu(e){if(!e||!e.length)return null;var t={};return e.forEach(function(e){var n=e.field;t[n]=t[n]||[],t[n].push(e)}),t}function X(e){var t=[...arguments].slice(1),n=0,r=t.length;return typeof e==`function`?e.apply(null,t):typeof e==`string`?e.replace(mu,function(e){if(e===`%%`)return`%`;if(n>=r)return e;switch(e){case`%s`:return String(t[n++]);case`%d`:return Number(t[n++]);case`%j`:try{return JSON.stringify(t[n++])}catch{return`[Circular]`}default:return e}}):e}function _u(e){return e===`string`||e===`url`||e===`hex`||e===`email`||e===`date`||e===`pattern`||e===`tel`}function Z(e,t){return!!(e==null||t===`array`&&Array.isArray(e)&&!e.length||_u(t)&&typeof e==`string`&&!e)}function vu(e,t,n){var r=[],i=0,a=e.length;function o(e){r.push.apply(r,L(e||[])),i++,i===a&&n(r)}e.forEach(function(e){t(e,o)})}function yu(e,t,n){var r=0,i=e.length;function a(o){if(o&&o.length)n(o);else{var s=r;r+=1,s<i?t(e[s],a):n([])}}a([])}function bu(e){var t=[];return Object.keys(e).forEach(function(n){t.push.apply(t,L(e[n]||[]))}),t}var xu=function(e){de(n,e);var t=I(n);function n(e,r){var i;return j(this,n),i=t
Line truncated
|
||||
${r},
|
||||
${i} > li,
|
||||
${n},
|
||||
${a},
|
||||
${o},
|
||||
${s}
|
||||
`]:Object.assign({},Xd(e))}}},sf=Ca(`Skeleton`,e=>{let{componentCls:t,calc:n}=e;return of(Wi(e,{skeletonAvatarCls:`${t}-avatar`,skeletonTitleCls:`${t}-title`,skeletonParagraphCls:`${t}-paragraph`,skeletonButtonCls:`${t}-button`,skeletonInputCls:`${t}-input`,skeletonImageCls:`${t}-image`,imageSizeBase:n(e.controlHeight).mul(1.5).equal(),borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${e.gradientFromColor} 25%, ${e.gradientToColor} 37%, ${e.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:`1.4s`}))},e=>{let{colorFillContent:t,colorFill:n}=e,r=t,i=n;return{color:r,colorGradientEnd:i,gradientFromColor:r,gradientToColor:i,titleHeight:e.controlHeight/2,blockRadius:e.borderRadiusSM,paragraphMarginTop:e.marginLG+e.marginXXS,paragraphLiHeight:e.controlHeight/2}},{deprecatedTokens:[[`color`,`gradientFromColor`],[`colorGradientEnd`,`gradientToColor`]]}),cf=e=>{let{prefixCls:t,className:n,rootClassName:r,active:i,shape:o=`circle`,size:s=`default`}=e,{getPrefixCls:c}=a.useContext(G),l=c(`skeleton`,t),[u,d,f]=sf(l),m=Gs(e,[`prefixCls`,`className`]),h=(0,p.default)(l,`${l}-element`,{[`${l}-active`]:i},n,r,d,f);return u(a.createElement(`div`,{className:h},a.createElement(Kd,Object.assign({prefixCls:`${l}-avatar`,shape:o,size:s},m))))},lf=e=>{let{prefixCls:t,className:n,rootClassName:r,active:i,block:o=!1,size:s=`default`}=e,{getPrefixCls:c}=a.useContext(G),l=c(`skeleton`,t),[u,d,f]=sf(l),m=Gs(e,[`prefixCls`]),h=(0,p.default)(l,`${l}-element`,{[`${l}-active`]:i,[`${l}-block`]:o},n,r,d,f);return u(a.createElement(`div`,{className:h},a.createElement(Kd,Object.assign({prefixCls:`${l}-button`,size:s},m))))},uf=`M365.714286 329.142857q0 45.714286-32.036571 77.677714t-77.677714 32.036571-77.677714-32.036571-32.036571-77.677714 32.036571-77.677714 77.677714-32.036571 77.677714 32.036571 32.036571 77.677714zM950.857143 548.571429l0 256-804.571429 0 0-109.714286 182.857143-182.857143 91.428571 91.428571 292.571429-292.571429zM1005.714286 146.285714l-914.285714 0q-7.460571 0-12.873143 5.412571t-5.412571 12.873143l0 694.857143q0 7.460571 5.412571 12.873143t12.873143 5.412571l914.285714 0q7.460571 0 12.873143-5.412571t5.412571-12.873143l0-694.857143q0-7.460571-5.412571-12.873143t-12.873143-5.412571zM1097.142857 164.571429l0 694.857143q0 37.741714-26.843429 64.585143t-64.585143 26.843429l-914.285714 0q-37.741714 0-64.585143-26.843429t-26.843429-64.585143l0-694.857143q0-37.741714 26.843429-64.585143t64.585143-26.843429l914.285714 0q37.741714 0 64.585143 26.843429t26.843429 64.585143z`,df=e=>{let{prefixCls:t,className:n,rootClassName:r,style:i,active:o}=e,{getPrefixCls:s}=a.useContext(G),c=s(`skeleton`,t),[l,u,d]=sf(c),f=(0,p.default)(c,`${c}-element`,{[`${c}-active`]:o},n,r,u,d);return l(a.createElement(`div`,{className:f},a.createElement(`div`,{className:(0,p.default)(`${c}-image`,n),style:i},a.createElement(`svg`,{viewBox:`0 0 1098 1024`,xmlns:`http://www.w3.org/2000/svg`,className:`${c}-image-svg`},a.createElement(`title`,null,`Image placeholder`),a.createElement(`path`,{d:uf,className:`${c}-image-path`})))))},ff=e=>{let{prefixCls:t,className:n,rootClassName:r,active:i,block:o,size:s=`default`}=e,{getPrefixCls:c}=a.useContext(G),l=c(`skeleton`,t),[u,d,f]=sf(l),m=Gs(e,[`prefixCls`]),h=(0,p.default)(l,`${l}-element`,{[`${l}-active`]:i,[`${l}-block`]:o},n,r,d,f);return u(a.createElement(`div`,{className:h},a.createElement(Kd,Object.assign({prefixCls:`${l}-input`,size:s},m))))},pf=e=>{let{prefixCls:t,className:n,rootClassName:r,style:i,active:o,children:s}=e,{getPrefixCls:c}=a.useContext(G),l=c(`skeleton`,t),[u,d,f]=sf(l),m=(0,p.default)(l,`${l}-element`,{[`${l}-active`]:o},d,n,r,f);return u(a.createElement(`div`,{className:m},a.createElement(`div`,{className:(0,p.default)(`${l}-image`,n),style:i},s)))},mf=(e,t)=>{let{width:n,rows:r=2}=t;if(Array.isArray(n))return n[e];if(r-1===e)return n},hf=e=>{let{prefixCls:t,className:n,style:r,rows:i=0}=e,o=Array.from({length:i}).map((t,n)=>a.createElement(`li`,{key:n,style:{width:mf(n,e)}}));return a.createElement(`ul`,{className:(0,p.default)(t,n),style:r},o)},gf=({prefixCls:e,className:t,width:n,style:r})=>a.createElement(`h3`,{className:(0,p.default)(e,t),style:Object.assign({width:n},r)});function _f(e){return e&&typeof e==`object`?e:{}}function vf(e,t){return e&&!t?{size:`large`,shape:`square`}:{size:`large`,shape:`circle`}}function yf(e,t){return!e&&t?{width:`38%`}:e&&t?{width:`50%`}:{}}function bf(e,t){let n={};return e&&t||(n.width=`61%`),n.rows=!e&&t?3:2,n}var xf=e=>{let{prefixCls:t,loading:n,className:r,rootClassName:i,style:o,children:s,avatar:c=!1,title:l=!0,paragraph:u=!0,active:d,round:f}=e,{getPrefixCls:m,direction:h,className:g,style:_}=wi(`skeleton`),v=m(`skeleton`,t),[y,b,x]=sf(v);if(n||!(`loading`in e)){let e=!!c,t=!!l,n=!!u,s;if(e){let e=Object.assign(Object.assign({prefixCls:`${v}-avatar`},vf(t,n)),_f(c));s=a.createElement(`div`,{className:`${v}-header`},a.createElement(Kd,Object.assign({},e)))}let m;if(t||n){let r;if(t){let t=Object.assign(Objec
Line truncated
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
import{n as e}from"./rolldown-runtime-Dl_DZoUm.js";import{i as t}from"./react-1o5M9n0k.js";import{At as n,Dt as r,Et as i,Ft as a,Ht as o,It as s,Jt as c,Lt as l,Mt as ee,Ot as te,Pt as u,Qt as d,Rt as ne,St as f,Wt as p,Xt as m,Yt as re,bt as h,en as ie,ft as g,gn as ae,jt as _,mt as v,nt as y,qt as b,st as oe,tt as x,vt as S,xt as se,yt as ce}from"./skeleton-B4Z0R3jQ.js";var C=e(t()),w=(0,C.createContext)(void 0),T=Object.assign({},a.Modal),E=[],D=()=>E.reduce((e,t)=>Object.assign(Object.assign({},e),t),a.Modal);function O(e){if(e){let t=Object.assign({},e);return E.push(t),T=D(),()=>{E=E.filter(e=>e!==t),T=D()}}T=Object.assign({},a.Modal)}function le(){return T}var ue=`internalMark`,de=e=>{let{locale:t={},children:n,_ANT_MARK__:r}=e;C.useEffect(()=>O(t?.Modal),[t]);let i=C.useMemo(()=>Object.assign(Object.assign({},t),{exist:!0}),[t]);return C.createElement(u.Provider,{value:i},n)},fe=`-ant-${Date.now()}-${Math.random()}`;function pe(e,t){let r={},i=(e,t)=>{let n=e.clone();return n=t?.(n)||n,n.toRgbString()},a=(e,t)=>{let a=new _(e),o=n(a.toRgbString());r[`${t}-color`]=i(a),r[`${t}-color-disabled`]=o[1],r[`${t}-color-hover`]=o[4],r[`${t}-color-active`]=o[6],r[`${t}-color-outline`]=a.clone().setA(.2).toRgbString(),r[`${t}-color-deprecated-bg`]=o[0],r[`${t}-color-deprecated-border`]=o[2]};if(t.primaryColor){a(t.primaryColor,`primary`);let e=new _(t.primaryColor),o=n(e.toRgbString());o.forEach((e,t)=>{r[`primary-${t+1}`]=e}),r[`primary-color-deprecated-l-35`]=i(e,e=>e.lighten(35)),r[`primary-color-deprecated-l-20`]=i(e,e=>e.lighten(20)),r[`primary-color-deprecated-t-20`]=i(e,e=>e.tint(20)),r[`primary-color-deprecated-t-50`]=i(e,e=>e.tint(50)),r[`primary-color-deprecated-f-12`]=i(e,e=>e.setA(e.a*.12));let s=new _(o[0]);r[`primary-color-active-deprecated-f-30`]=i(s,e=>e.setA(e.a*.3)),r[`primary-color-active-deprecated-d-02`]=i(s,e=>e.darken(2))}return t.successColor&&a(t.successColor,`success`),t.warningColor&&a(t.warningColor,`warning`),t.errorColor&&a(t.errorColor,`error`),t.infoColor&&a(t.infoColor,`info`),`
|
||||
:root {
|
||||
${Object.keys(r).map(t=>`--${e}-${t}: ${r[t]};`).join(`
|
||||
`)}
|
||||
}
|
||||
`.trim()}function me(e,t){let n=pe(e,t);ie()&&d(n,`${fe}-dynamic-theme`)}var he=(e,t)=>{let[n,r]=g();return p({theme:n,token:r,hashId:``,path:[`ant-design-icons`,e],nonce:()=>t?.nonce,layer:{name:`antd`}},()=>oe(e))},{useId:k}=Object.assign({},C),A=k===void 0?()=>``:k;function ge(e,t,n){l(`ConfigProvider`);let i=e||{},a=i.inherit===!1||!t?Object.assign(Object.assign({},r),{hashed:t?.hashed??r.hashed,cssVar:t?.cssVar}):t,o=A();return ae(()=>{if(!e)return t;let r=Object.assign({},a.components);Object.keys(e.components||{}).forEach(t=>{r[t]=Object.assign(Object.assign({},r[t]),e.components[t])});let s=`css-var-${o.replace(/:/g,``)}`,c=(i.cssVar??a.cssVar)&&Object.assign(Object.assign(Object.assign({prefix:n?.prefixCls},typeof a.cssVar==`object`?a.cssVar:{}),typeof i.cssVar==`object`?i.cssVar:{}),{key:typeof i.cssVar==`object`&&i.cssVar?.key||s});return Object.assign(Object.assign(Object.assign({},a),i),{token:Object.assign(Object.assign({},a.token),i.token),components:r,cssVar:c})},[i,a],(e,t)=>e.some((e,n)=>{let r=t[n];return!m(e,r,!0)}))}var j=C.createContext(!0);function _e(e){let t=C.useContext(j),{children:n}=e,[,r]=g(),{motion:i}=r,a=C.useRef(!1);return a.current||=t!==i,a.current?C.createElement(j.Provider,{value:i},C.createElement(x,{motion:i},n)):n}var ve=()=>null,ye=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},be=[`getTargetContainer`,`getPopupContainer`,`renderEmpty`,`input`,`pagination`,`form`,`select`,`button`],M,N,P,F;function I(){return M||`ant`}function L(){return N||`anticon`}function R(e){return Object.keys(e).some(e=>e.endsWith(`Color`))}var z=e=>{let{prefixCls:t,iconPrefixCls:n,theme:r,holderRender:i}=e;t!==void 0&&(M=t),n!==void 0&&(N=n),`holderRender`in e&&(F=i),r&&(R(r)?me(I(),r):P=r)},B=()=>({getPrefixCls:(e,t)=>t||(e?`${I()}-${e}`:I()),getIconPrefixCls:L,getRootPrefixCls:()=>M||I(),getTheme:()=>P,holderRender:F}),V=e=>{let{children:t,csp:n,autoInsertSpaceInButton:r,alert:l,anchor:u,form:d,locale:p,componentSize:m,direction:h,space:ie,splitter:g,virtual:_,dropdownMatchSelectWidth:v,popupMatchSelectWidth:y,popupOverflow:b,legacyLocale:oe,parentContext:x,iconPrefixCls:S,theme:T,componentDisabled:E,segmented:D,statistic:O,spin:le,calendar:fe,carousel:pe,cascader:me,collapse:k,typography:A,checkbox:j,descriptions:M,divider:N,drawer:P,skeleton:F,steps:I,image:L,layout:R,list:z,mentions:B,modal:V,progress:H,result:U,slider:xe,breadcrumb:Se,menu:W,pagination:Ce,input:we,textArea:Te,empty:Ee,badge:G,radio:De,rate:Oe,switch:ke,transfer:Ae,avatar:je,message:Me,tag:Ne,table:Pe,card:Fe,tabs:Ie,timeline:Le,timePicker:Re,upload:ze,notification:Be,tree:Ve,colorPicker:He,datePicker:Ue,rangePicker:We,flex:Ge,wave:Ke,dropdown:qe,warning:Je,tour:Ye,tooltip:Xe,popover:Ze,popconfirm:Qe,floatButton:$e,floatButtonGroup:et,variant:tt,inputNumber:nt,treeSelect:rt}=e,it=C.useCallback((t,n)=>{let{prefixCls:r}=e;if(n)return n;let i=r||x.getPrefixCls(``);return t?`${i}-${t}`:i},[x.getPrefixCls,e.prefixCls]),K=S||x.iconPrefixCls||`anticon`,q=n||x.csp;he(K,q);let J=ge(T,x.theme,{prefixCls:it(``)}),Y={csp:q,autoInsertSpaceInButton:r,alert:l,anchor:u,locale:p||oe,direction:h,space:ie,splitter:g,virtual:_,popupMatchSelectWidth:y??v,popupOverflow:b,getPrefixCls:it,iconPrefixCls:K,theme:J,segmented:D,statistic:O,spin:le,calendar:fe,carousel:pe,cascader:me,collapse:k,typography:A,checkbox:j,descriptions:M,divider:N,drawer:P,skeleton:F,steps:I,image:L,input:we,textArea:Te,layout:R,list:z,mentions:B,modal:V,progress:H,result:U,slider:xe,breadcrumb:Se,menu:W,pagination:Ce,empty:Ee,badge:G,radio:De,rate:Oe,switch:ke,transfer:Ae,avatar:je,message:Me,tag:Ne,table:Pe,card:Fe,tabs:Ie,timeline:Le,timePicker:Re,upload:ze,notification:Be,tree:Ve,colorPicker:He,datePicker:Ue,rangePicker:We,flex:Ge,wave:Ke,dropdown:qe,warning:Je,tour:Ye,tooltip:Xe,popover:Ze,popconfirm:Qe,floatButton:$e,floatButtonGroup:et,variant:tt,inputNumber:nt,treeSelect:rt},X=Object.assign({},x);Object.keys(Y).forEach(e=>{Y[e]!==void 0&&(X[e]=Y[e])}),be.forEach(t=>{let n=e[t];n&&(X[t]=n)}),r!==void 0&&(X.button=Object.assign({autoInsertSpace:r},X.button));let Z=ae(()=>X,X,(e,t)=>{let n=Object.keys(e),r=Object.keys(t);return n.length!==r.length||n.some(n=>e[n]!==t[n])}),{layer:at}=C.useContext(re),ot=C.useMemo(()=>({prefixCls:K,csp:q,layer:at?`antd`:void 0}),[K,q,at]),Q=C.createElement(C.Fragment,null,C.createElement(ve,{dropdownMatchSelectWidth:v}),t),$=C.useMemo(()=>ne(a.Form?.defaultValidateMessages||{},Z.locale?.Form?.defaultValidateMessages||{},Z.form?.validateMessages||{},d?.validateMessages||{}),[Z,d?.validateMessages]);Object.keys($).length>0&&(Q=C.createElement(w.Provider,{value:$},Q)),p&&(Q=C.createElement(de,{locale:p,_ANT_MARK__:ue},Q)),(K||q)&&(Q=C.createElement(o.Provi
Line truncated
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
import{n as e,t}from"./rolldown-runtime-Dl_DZoUm.js";import{i as n}from"./react-1o5M9n0k.js";import{$ as r,B as i,Ct as a,D as o,Dn as s,En as c,Gt as l,H as u,L as d,Lt as f,M as p,N as m,Nt as h,O as g,Q as _,R as v,St as y,Tn as b,Tt as x,U as S,V as C,Y as w,Z as T,Zt as E,_ as D,_n as O,_t as k,b as A,bn as j,bt as ee,cn as te,ct as ne,dn as M,en as N,fn as P,ft as F,hn as I,ht as L,i as re,in as ie,it as R,j as ae,kt as oe,l as se,ln as z,lt as ce,mn as B,mt as V,n as le,nn as H,nt as U,pn as W,qt as G,rn as ue,tn as K,un as de,v as fe,w as q,wn as pe,x as me,xn as J,yn as he,z as ge}from"./skeleton-B4Z0R3jQ.js";import{B as _e,x as ve}from"./index-D-ox0wtk.js";var Y=e(s()),X=e(n()),ye=X.createContext(null),Z=(function(){if(typeof Map<`u`)return Map;function e(e,t){var n=-1;return e.some(function(e,r){return e[0]===t&&(n=r,!0)}),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){t===void 0&&(t=null);for(var n=0,r=this.__entries__;n<r.length;n++){var i=r[n];e.call(t,i[1],i[0])}},t}()})(),be=typeof window<`u`&&typeof document<`u`&&window.document===document,xe=(function(){return typeof global<`u`&&global.Math===Math?global:typeof self<`u`&&self.Math===Math?self:typeof window<`u`&&window.Math===Math?window:Function(`return this`)()})(),Se=(function(){return typeof requestAnimationFrame==`function`?requestAnimationFrame.bind(xe):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)}})(),Q=2;function $(e,t){var n=!1,r=!1,i=0;function a(){n&&(n=!1,e()),r&&s()}function o(){Se(a)}function s(){var e=Date.now();if(n){if(e-i<Q)return;r=!0}else n=!0,r=!1,setTimeout(o,t);i=e}return s}var Ce=20,we=[`top`,`right`,`bottom`,`left`,`width`,`height`,`size`,`weight`],Te=typeof MutationObserver<`u`,Ee=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=$(this.refresh.bind(this),Ce)}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter(function(e){return e.gatherActive(),e.hasActive()});return e.forEach(function(e){return e.broadcastActive()}),e.length>0},e.prototype.connect_=function(){be&&!this.connected_&&(document.addEventListener(`transitionend`,this.onTransitionEnd_),window.addEventListener(`resize`,this.refresh),Te?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener(`DOMSubtreeModified`,this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){be&&this.connected_&&(document.removeEventListener(`transitionend`,this.onTransitionEnd_),window.removeEventListener(`resize`,this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener(`DOMSubtreeModified`,this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=t===void 0?``:t;we.some(function(e){return!!~n.indexOf(e)})&&this.refresh()},e.getInstance=function(){return this.instance_||=new e,this.instance_},e.instance_=null,e}(),De=(function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var i=r[n];Object.defineProperty(e,i,{value:t[i],enumerable:!1,writable:!1,configurable:!0})}return e}),Oe=(function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||xe}),ke=ze(0,0,0,0);function Ae(e){return parseFloat(e)||0}function je(e){return[...arguments].slice(1).reduce(function(t,n){return t+Ae(e[`border-`+n+`-width`])},0)}function Me(e){for(var t=[`top`,`right`,`bottom`,`left`],n={},r=0,i=t;r<i.length;r++){var a=i[r];n[a]=Ae(e[`padding-`+a])}return n}function Ne(e){var t=e.getBBox();return ze(0,0,t.width,t.height)}function Pe(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return ke;var r=Oe(e).getComputedStyle(e),i=Me(r),a=i.left+i.right,o=i.top+i.bottom,s=Ae(r.width),c=Ae(r.height);if(r.boxSizing===`border-box`&&(Math.round(s+a)!==t&&(s-=je(r,`left`,`right`)+a),Line truncated
|
||||
& > ${t}-affix-wrapper,
|
||||
& > ${t}-number-affix-wrapper,
|
||||
& > ${n}-picker-range
|
||||
`]:{display:`inline-flex`},"& > *:not(:last-child)":{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal(),borderInlineEndWidth:e.lineWidth},[t]:{float:`none`},[`& > ${n}-select > ${n}-select-selector,
|
||||
& > ${n}-select-auto-complete ${t},
|
||||
& > ${n}-cascader-picker ${t},
|
||||
& > ${t}-group-wrapper ${t}`]:{borderInlineEndWidth:e.lineWidth,borderRadius:0,"&:hover, &:focus":{zIndex:1}},[`& > ${n}-select-focused`]:{zIndex:1},[`& > ${n}-select > ${n}-select-arrow`]:{zIndex:1},[`& > *:first-child,
|
||||
& > ${n}-select:first-child > ${n}-select-selector,
|
||||
& > ${n}-select-auto-complete:first-child ${t},
|
||||
& > ${n}-cascader-picker:first-child ${t}`]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius},[`& > *:last-child,
|
||||
& > ${n}-select:last-child > ${n}-select-selector,
|
||||
& > ${n}-cascader-picker:last-child ${t},
|
||||
& > ${n}-cascader-picker-focused:last-child ${t}`]:{borderInlineEndWidth:e.lineWidth,borderStartEndRadius:e.borderRadius,borderEndEndRadius:e.borderRadius},[`& > ${n}-select-auto-complete ${t}`]:{verticalAlign:`top`},[`${t}-group-wrapper + ${t}-group-wrapper`]:{marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),[`${t}-affix-wrapper`]:{borderRadius:0}},[`${t}-group-wrapper:not(:last-child)`]:{[`&${t}-search > ${t}-group`]:{[`& > ${t}-group-addon > ${t}-search-button`]:{borderRadius:0},[`& > ${t}`]:{borderStartStartRadius:e.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:e.borderRadius}}}})}},Pn=e=>{let{componentCls:t,controlHeightSM:n,lineWidth:r,calc:i}=e,a=i(n).sub(i(r).mul(2)).sub(16).div(2).equal();return{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},ce(e)),Mn(e)),_n(e)),Cn(e)),bn(e)),On(e)),{'&[type="color"]':{height:e.controlHeight,[`&${t}-lg`]:{height:e.controlHeightLG},[`&${t}-sm`]:{height:n,paddingTop:a,paddingBottom:a}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{appearance:`none`}})}},Fn=e=>{let{componentCls:t}=e;return{[`${t}-clear-icon`]:{margin:0,padding:0,lineHeight:0,color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,verticalAlign:-1,cursor:`pointer`,transition:`color ${e.motionDurationSlow}`,border:`none`,outline:`none`,backgroundColor:`transparent`,"&:hover":{color:e.colorIcon},"&:active":{color:e.colorText},"&-hidden":{visibility:`hidden`},"&-has-suffix":{margin:`0 ${G(e.inputAffixPadding)}`}}}},In=e=>{let{componentCls:t,inputAffixPadding:n,colorTextDescription:r,motionDurationSlow:i,colorIcon:a,colorIconHover:o,iconCls:s}=e,c=`${t}-affix-wrapper`,l=`${t}-affix-wrapper-disabled`;return{[c]:Object.assign(Object.assign(Object.assign(Object.assign({},Mn(e)),{display:`inline-flex`,[`&:not(${t}-disabled):hover`]:{zIndex:1,[`${t}-search-with-button &`]:{zIndex:0}},"&-focused, &:focus":{zIndex:1},[`> input${t}`]:{padding:0},[`> input${t}, > textarea${t}`]:{fontSize:`inherit`,border:`none`,borderRadius:0,outline:`none`,background:`transparent`,color:`inherit`,"&::-ms-reveal":{display:`none`},"&:focus":{boxShadow:`none !important`}},"&::before":{display:`inline-block`,width:0,visibility:`hidden`,content:`"\\a0"`},[t]:{"&-prefix, &-suffix":{display:`flex`,flex:`none`,alignItems:`center`,"> *:not(:last-child)":{marginInlineEnd:e.paddingXS}},"&-show-count-suffix":{color:r,direction:`ltr`},"&-show-count-has-suffix":{marginInlineEnd:e.paddingXXS},"&-prefix":{marginInlineEnd:n},"&-suffix":{marginInlineStart:n}}}),Fn(e)),{[`${s}${t}-password-icon`]:{color:a,cursor:`pointer`,transition:`all ${i}`,"&:hover":{color:o}}}),[`${t}-underlined`]:{borderRadius:0},[l]:{[`${s}${t}-password-icon`]:{color:a,cursor:`not-allowed`,"&:hover":{color:a}}}}},Ln=e=>{let{componentCls:t,borderRadiusLG:n,borderRadiusSM:r}=e;return{[`${t}-group`]:Object.assign(Object.assign(Object.assign({},ce(e)),Nn(e)),{"&-rtl":{direction:`rtl`},"&-wrapper":Object.assign(Object.assign(Object.assign({display:`inline-block`,width:`100%`,textAlign:`start`,verticalAlign:`top`,"&-rtl":{direction:`rtl`},"&-lg":{[`${t}-group-addon`]:{borderRadius:n,fontSize:e.inputFontSizeLG}},"&-sm":{[`${t}-group-addon`]:{borderRadius:r}}},yn(e)),Tn(e)),{[`&:not(${t}-compact-first-item):not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}, ${t}-group-addon`]:{borderRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-first-item`]:{[`${t}, ${t}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-last-item`]:{[`${t}, ${t}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}-affix-wrapper`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-item`]:{[`${t}-affix-wrapper`]:{borderStartStartRadius:0,borderEndStartRadius:0}}})})}},Rn=e=>{let{componentCls:t,antCls:n}=e,r=`${t}-search`;return{[r]:{[t]:{"&:not([disabled]):hover, &:not([disabled]):focus":{[`+ ${t}-group-addon ${r}-button:not(${n}-btn-color-primary):not(${n}-btn-variant-text)`]:{borderInlineStartColor:e.colorPrimaryHover}}},[`${t}-affix-wrapper`]:{height:e.controlHeight,borderRadius:0},[`${t}-lg`]:{lineHeight:e.calc(e.lineHeightLG).sub(2e-4).equal()},[`> ${t}-group`]:{[`> ${t}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${r}-button`]:{marginInlineEnd:-1,borderStartStartRadius:0,borderEndStartRadius:0,boxShadow:`none`},[`${r}-button:not(${n}-btn-color-primary)`]:{color:e.colorTextDescription,"&:not([disabled]):hover":{color:e.colorPrimaryHover},"&:active":{color:e.colorPrimaryActive},[`&${n}-btn-loading::before`]:{inset:0}}}},[`${r}-button`]:{height:e.controlHeight,"&:hover, &:focus":{zIndex:1}},"&-large":{[`${t}-affix-wrapper, ${r}-button`]:{height:e.controlHeightLG}},"&-small":{[`${t}-affix-wrapper, ${r}-button`]:{height:e.controlHeightSM}},"&-rtl":{direction:`rtl`},[`&${t}Line truncated
|
||||
> ${t},
|
||||
${t}-affix-wrapper`]:{"&:hover, &:focus, &:active":{zIndex:2}},[`> ${t}-affix-wrapper-focused`]:{zIndex:2}}}}},zn=e=>{let{componentCls:t}=e;return{[`${t}-out-of-range`]:{[`&, & input, & textarea, ${t}-show-count-suffix, ${t}-data-count`]:{color:e.colorError}}}},Bn=U([`Input`,`Shared`],e=>{let t=V(e,dn(e));return[Pn(t),In(t)]},fn,{resetFont:!1}),Vn=U([`Input`,`Component`],e=>{let t=V(e,dn(e));return[Ln(t),Rn(t),zn(t),A(t)]},fn,{resetFont:!1});function Hn(e){return!!(e.addonBefore||e.addonAfter)}function Un(e){return!!(e.prefix||e.suffix||e.allowClear)}function Wn(e,t,n){var r=t.cloneNode(!0),i=Object.create(e,{target:{value:r},currentTarget:{value:r}});return r.value=n,typeof t.selectionStart==`number`&&typeof t.selectionEnd==`number`&&(r.selectionStart=t.selectionStart,r.selectionEnd=t.selectionEnd),r.setSelectionRange=function(){t.setSelectionRange.apply(t,arguments)},i}function Gn(e,t,n,r){if(n){var i=t;t.type===`click`?(i=Wn(t,e,``),n(i)):(e.type!==`file`&&r!==void 0&&(i=Wn(t,e,r)),n(i))}}function Kn(e,t){if(e){e.focus(t);var n=(t||{}).cursor;if(n){var r=e.value.length;switch(n){case`start`:e.setSelectionRange(0,0);break;case`end`:e.setSelectionRange(r,r);break;default:e.setSelectionRange(0,r)}}}}var qn=X.forwardRef(function(e,t){var n=e.inputElement,r=e.children,i=e.prefixCls,a=e.prefix,o=e.suffix,s=e.addonBefore,l=e.addonAfter,u=e.className,d=e.style,f=e.disabled,p=e.readOnly,m=e.focused,h=e.triggerFocus,g=e.allowClear,_=e.value,v=e.handleReset,y=e.hidden,x=e.classes,S=e.classNames,C=e.dataAttrs,w=e.styles,T=e.components,E=e.onClear,D=r??n,O=T?.affixWrapper||`span`,k=T?.groupWrapper||`span`,A=T?.wrapper||`span`,ee=T?.groupAddon||`span`,te=(0,X.useRef)(null),ne=function(e){var t;(t=te.current)!=null&&t.contains(e.target)&&h?.()},M=Un(e),N=(0,X.cloneElement)(D,{value:_,className:(0,Y.default)(D.props?.className,!M&&S?.variant)||null}),P=(0,X.useRef)(null);if(X.useImperativeHandle(t,function(){return{nativeElement:P.current||te.current}}),M){var F=null;if(g){var I=!f&&!p&&_,L=`${i}-clear-icon`,re=b(g)===`object`&&g!=null&&g.clearIcon?g.clearIcon:`✖`;F=X.createElement(`button`,{type:`button`,tabIndex:-1,onClick:function(e){v?.(e),E?.()},onMouseDown:function(e){return e.preventDefault()},className:(0,Y.default)(L,J(J({},`${L}-hidden`,!I),`${L}-has-suffix`,!!o))},re)}var ie=`${i}-affix-wrapper`,R=(0,Y.default)(ie,J(J(J(J(J({},`${i}-disabled`,f),`${ie}-disabled`,f),`${ie}-focused`,m),`${ie}-readonly`,p),`${ie}-input-with-clear-btn`,o&&g&&_),x?.affixWrapper,S?.affixWrapper,S?.variant),ae=(o||g)&&X.createElement(`span`,{className:(0,Y.default)(`${i}-suffix`,S?.suffix),style:w?.suffix},F,o);N=X.createElement(O,c({className:R,style:w?.affixWrapper,onClick:ne},C?.affixWrapper,{ref:te}),a&&X.createElement(`span`,{className:(0,Y.default)(`${i}-prefix`,S?.prefix),style:w?.prefix},a),N,ae)}if(Hn(e)){var oe=`${i}-group`,se=`${oe}-addon`,z=`${oe}-wrapper`,ce=(0,Y.default)(`${i}-wrapper`,oe,x?.wrapper,S?.wrapper),B=(0,Y.default)(z,J({},`${z}-disabled`,f),x?.group,S?.groupWrapper);N=X.createElement(k,{className:B,ref:P},X.createElement(A,{className:ce},s&&X.createElement(ee,{className:se},s),N,l&&X.createElement(ee,{className:se},l)))}return X.cloneElement(N,{className:(0,Y.default)(N.props?.className,u)||null,style:j(j({},N.props?.style),d),hidden:y})}),Jn=[`show`];function Yn(e,t){return X.useMemo(function(){var n={};t&&(n.show=b(t)===`object`&&t.formatter?t.formatter:!!t),n=j(j({},n),e);var r=n,i=r.show,a=E(r,Jn);return j(j({},a),{},{show:!!i,showFormatter:typeof i==`function`?i:void 0,strategy:a.strategy||function(e){return e.length}})},[e,t])}var Xn=[`autoComplete`,`onChange`,`onFocus`,`onBlur`,`onPressEnter`,`onKeyDown`,`onKeyUp`,`prefixCls`,`disabled`,`htmlSize`,`className`,`maxLength`,`suffix`,`showCount`,`count`,`type`,`classes`,`classNames`,`styles`,`onCompositionStart`,`onCompositionEnd`],Zn=(0,X.forwardRef)(function(e,t){var n=e.autoComplete,r=e.onChange,i=e.onFocus,a=e.onBlur,o=e.onPressEnter,s=e.onKeyDown,l=e.onKeyUp,u=e.prefixCls,d=u===void 0?`rc-input`:u,f=e.disabled,m=e.htmlSize,h=e.className,g=e.maxLength,_=e.suffix,v=e.showCount,y=e.count,b=e.type,x=b===void 0?`text`:b,S=e.classes,C=e.classNames,w=e.styles,T=e.onCompositionStart,D=e.onCompositionEnd,O=E(e,Xn),k=(0,X.useState)(!1),A=K(k,2),ee=A[0],te=A[1],ne=(0,X.useRef)(!1),M=(0,X.useRef)(!1),N=(0,X.useRef)(null),P=(0,X.useRef)(null),F=function(e){N.current&&Kn(N.current,e)},I=L(e.defaultValue,{value:e.value}),re=K(I,2),ie=re[0],R=re[1],ae=ie==null?``:String(ie),oe=(0,X.useState)(null),se=K(oe,2),z=se[0],ce=se[1],B=Yn(y,v),V=B.max||g,le=B.strategy(ae),H=!!V&&le>V;(0,X.useImperativeHandle)(t,function(){return{focus:F,blur:function(){var e;(e=N.current)==null||e.blur()},setSelectionRange:function(e,t,n){var r;(r=N.current)==null||r.setSelectionRange(e,t,n)},select:function(){var e;(e=N.current)==null||e.select()},input:N.current,nativeElement:P.current?.nativeElement||N.current}}),(0,X.useEffect)(function(){M.current&&=!1,te(function(e){return
Line truncated
|
||||
min-height:0 !important;
|
||||
max-height:none !important;
|
||||
height:0 !important;
|
||||
visibility:hidden !important;
|
||||
overflow:hidden !important;
|
||||
position:absolute !important;
|
||||
z-index:-1000 !important;
|
||||
top:0 !important;
|
||||
right:0 !important;
|
||||
pointer-events: none !important;
|
||||
`,er=[`letter-spacing`,`line-height`,`padding-top`,`padding-bottom`,`font-family`,`font-weight`,`font-size`,`font-variant`,`text-rendering`,`text-transform`,`width`,`text-indent`,`padding-left`,`padding-right`,`border-width`,`box-sizing`,`word-break`,`white-space`],tr={},nr;function rr(e){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n=e.getAttribute(`id`)||e.getAttribute(`data-reactid`)||e.getAttribute(`name`);if(t&&tr[n])return tr[n];var r=window.getComputedStyle(e),i=r.getPropertyValue(`box-sizing`)||r.getPropertyValue(`-moz-box-sizing`)||r.getPropertyValue(`-webkit-box-sizing`),a=parseFloat(r.getPropertyValue(`padding-bottom`))+parseFloat(r.getPropertyValue(`padding-top`)),o=parseFloat(r.getPropertyValue(`border-bottom-width`))+parseFloat(r.getPropertyValue(`border-top-width`)),s={sizingStyle:er.map(function(e){return`${e}:${r.getPropertyValue(e)}`}).join(`;`),paddingSize:a,borderSize:o,boxSizing:i};return t&&n&&(tr[n]=s),s}function ir(e){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;nr||(nr=document.createElement(`textarea`),nr.setAttribute(`tab-index`,`-1`),nr.setAttribute(`aria-hidden`,`true`),nr.setAttribute(`name`,`hiddenTextarea`),document.body.appendChild(nr)),e.getAttribute(`wrap`)?nr.setAttribute(`wrap`,e.getAttribute(`wrap`)):nr.removeAttribute(`wrap`);var i=rr(e,t),a=i.paddingSize,o=i.borderSize,s=i.boxSizing,c=i.sizingStyle;nr.setAttribute(`style`,`${c};${$n}`),nr.value=e.value||e.placeholder||``;var l=void 0,u=void 0,d,f=nr.scrollHeight;if(s===`border-box`?f+=o:s===`content-box`&&(f-=a),n!==null||r!==null){nr.value=` `;var p=nr.scrollHeight-a;n!==null&&(l=p*n,s===`border-box`&&(l=l+a+o),f=Math.max(l,f)),r!==null&&(u=p*r,s===`border-box`&&(u=u+a+o),d=f>u?``:`hidden`,f=Math.min(u,f))}var m={height:f,overflowY:d,resize:`none`};return l&&(m.minHeight=l),u&&(m.maxHeight=u),m}var ar=[`prefixCls`,`defaultValue`,`value`,`autoSize`,`onResize`,`className`,`style`,`disabled`,`onChange`,`onInternalAutoSize`],or=0,sr=1,cr=2,lr=X.forwardRef(function(e,t){var n=e,r=n.prefixCls,i=n.defaultValue,a=n.value,o=n.autoSize,s=n.onResize,u=n.className,d=n.style,f=n.disabled,p=n.onChange;n.onInternalAutoSize;var m=E(n,ar),h=L(i,{value:a,postState:function(e){return e??``}}),g=K(h,2),_=g[0],v=g[1],y=function(e){v(e.target.value),p?.(e)},x=X.useRef();X.useImperativeHandle(t,function(){return{textArea:x.current}});var S=X.useMemo(function(){return o&&b(o)===`object`?[o.minRows,o.maxRows]:[]},[o]),C=K(S,2),w=C[0],T=C[1],D=!!o,O=X.useState(cr),k=K(O,2),A=k[0],ee=k[1],te=X.useState(),ne=K(te,2),M=ne[0],N=ne[1],P=function(){ee(or)};l(function(){D&&P()},[a,w,T,D]),l(function(){if(A===or)ee(sr);else if(A===sr){var e=ir(x.current,!1,w,T);ee(cr),N(e)}},[A]);var F=X.useRef(),I=function(){H.cancel(F.current)},re=function(e){A===cr&&(s?.(e),o&&(I(),F.current=H(function(){P()})))};X.useEffect(function(){return I},[]);var ie=D?M:null,R=j(j({},d),ie);return(A===or||A===sr)&&(R.overflowY=`hidden`,R.overflowX=`hidden`),X.createElement(nt,{onResize:re,disabled:!(o||s)},X.createElement(`textarea`,c({},m,{ref:x,style:R,className:(0,Y.default)(r,u,J({},`${r}-disabled`,f)),disabled:f,value:_,onChange:y})))}),ur=[`defaultValue`,`value`,`onFocus`,`onBlur`,`onChange`,`allowClear`,`maxLength`,`onCompositionStart`,`onCompositionEnd`,`suffix`,`prefixCls`,`showCount`,`count`,`className`,`style`,`disabled`,`hidden`,`classNames`,`styles`,`onResize`,`onClear`,`onPressEnter`,`readOnly`,`autoSize`,`onKeyDown`],dr=X.forwardRef(function(e,t){var n=e.defaultValue,r=e.value,i=e.onFocus,a=e.onBlur,o=e.onChange,s=e.allowClear,l=e.maxLength,u=e.onCompositionStart,d=e.onCompositionEnd,f=e.suffix,p=e.prefixCls,m=p===void 0?`rc-textarea`:p,h=e.showCount,g=e.count,_=e.className,v=e.style,y=e.disabled,b=e.hidden,x=e.classNames,S=e.styles,C=e.onResize,w=e.onClear,T=e.onPressEnter,D=e.readOnly,O=e.autoSize,k=e.onKeyDown,A=E(e,ur),ee=L(n,{value:r,defaultValue:n}),te=K(ee,2),ne=te[0],M=te[1],N=ne==null?``:String(ne),P=X.useState(!1),F=K(P,2),I=F[0],re=F[1],ie=X.useRef(!1),R=X.useState(null),ae=K(R,2),oe=ae[0],se=ae[1],z=(0,X.useRef)(null),ce=(0,X.useRef)(null),B=function(){return ce.current?.textArea},V=function(){B().focus()};(0,X.useImperativeHandle)(t,function(){return{resizableTextArea:ce.current,focus:V,blur:function(){B().blur()},nativeElement:z.current?.nativeElement||B()}}),(0,X.useEffect)(function(){re(function(e){return!y&&e})},[y]);var le=X.useState(null),H=K(le,2),U=H[0],W=H[1];X.useEffect(function(){if(U){var e;(e=B()).setSelectionRange.apply(e,ue(U))}},[U]);var G=Yn(g,h),de=G.max??l,fe=Number(de)>0,q=G.strategy(N),pe=!!de&&q>de,me=function(e,t){var n=t;!ie.current&&G.exceedFormatter&&G.max&&G.strategy(t)>G.max&&(n=G.exceedFormatter(t,{max:G.max}),t!==n&&W([B().selectionStart||0,B().selectionEnd||0])),M(n),Gn(e.currentTarget,e,o,n)},he=function(e){ie.current=!0,u?.(e)},ge=function(e){ie.current=!1,m
Line truncated
|
||||
&-allow-clear > ${t},
|
||||
&-affix-wrapper${r}-has-feedback ${t}
|
||||
`]:{paddingInlineEnd:n},[`&-affix-wrapper${t}-affix-wrapper`]:{padding:0,[`> textarea${t}`]:{fontSize:`inherit`,border:`none`,outline:`none`,background:`transparent`,minHeight:e.calc(e.controlHeight).sub(e.calc(e.lineWidth).mul(2)).equal(),"&:focus":{boxShadow:`none !important`}},[`${t}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${t}-clear-icon`]:{position:`absolute`,insetInlineEnd:e.paddingInline,insetBlockStart:e.paddingXS},[`${r}-suffix`]:{position:`absolute`,top:0,insetInlineEnd:e.paddingInline,bottom:0,zIndex:1,display:`inline-flex`,alignItems:`center`,margin:`auto`,pointerEvents:`none`}}},[`&-affix-wrapper${t}-affix-wrapper-rtl`]:{[`${t}-suffix`]:{[`${t}-data-count`]:{direction:`ltr`,insetInlineStart:0}}},[`&-affix-wrapper${t}-affix-wrapper-sm`]:{[`${t}-suffix`]:{[`${t}-clear-icon`]:{insetInlineEnd:e.paddingInlineSM}}}}}},pr=U([`Input`,`TextArea`],e=>fr(V(e,dn(e))),fn,{resetFont:!1}),mr=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},hr=(0,X.forwardRef)((e,t)=>{let{prefixCls:n,bordered:r=!0,size:i,disabled:a,status:s,allowClear:c,classNames:l,rootClassName:u,className:d,style:f,styles:p,variant:m,showCount:h,onMouseDown:_,onResize:v}=e,y=mr(e,[`prefixCls`,`bordered`,`size`,`disabled`,`status`,`allowClear`,`classNames`,`rootClassName`,`className`,`style`,`styles`,`variant`,`showCount`,`onMouseDown`,`onResize`]),{getPrefixCls:b,direction:S,allowClear:w,autoComplete:T,className:E,style:D,classNames:O,styles:k}=x(`textArea`),A=X.useContext(ee),j=a??A,{status:te,hasFeedback:ne,feedbackIcon:M}=X.useContext(re),N=It(te,s),P=X.useRef(null);X.useImperativeHandle(t,()=>({resizableTextArea:P.current?.resizableTextArea,focus:e=>{Kn(P.current?.resizableTextArea?.textArea,e)},blur:()=>P.current?.blur()}));let F=b(`input`,n),I=C(F),[L,ie,R]=Bn(F,u),[ae]=pr(F,I),{compactSize:oe,compactItemClassnames:se}=o(F,S),z=g(e=>i??oe??e),[ce,B]=Lt(`textArea`,m,r),V=Qn(c??w),[le,H]=X.useState(!1),[U,W]=X.useState(!1),G=e=>{H(!0),_?.(e);let t=()=>{H(!1),document.removeEventListener(`mouseup`,t)};document.addEventListener(`mouseup`,t)},ue=e=>{if(v?.(e),le&&typeof getComputedStyle==`function`){let e=(P.current?.nativeElement)?.querySelector(`textarea`);e&&getComputedStyle(e).resize===`both`&&W(!0)}};return L(ae(X.createElement(dr,Object.assign({autoComplete:T},y,{style:Object.assign(Object.assign({},D),f),styles:Object.assign(Object.assign({},k),p),disabled:j,allowClear:V,className:(0,Y.default)(R,I,d,u,se,E,U&&`${F}-textarea-affix-wrapper-resize-dirty`),classNames:Object.assign(Object.assign(Object.assign({},l),O),{textarea:(0,Y.default)({[`${F}-sm`]:z===`small`,[`${F}-lg`]:z===`large`},ie,l?.textarea,O.textarea,le&&`${F}-mouse-active`),variant:(0,Y.default)({[`${F}-${ce}`]:B},Ft(F,N)),affixWrapper:(0,Y.default)(`${F}-textarea-affix-wrapper`,{[`${F}-affix-wrapper-rtl`]:S===`rtl`,[`${F}-affix-wrapper-sm`]:z===`small`,[`${F}-affix-wrapper-lg`]:z===`large`,[`${F}-textarea-show-count`]:h||e.count?.show},ie)}),prefixCls:F,suffix:ne&&X.createElement(`span`,{className:`${F}-textarea-suffix`},M),showCount:h,ref:P,onResize:ue,onMouseDown:G}))))}),gr=(e,t=!1)=>t&&e==null?[]:Array.isArray(e)?e:[e],_r={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z`}}]},name:`edit`,theme:`outlined`},vr=X.forwardRef(function(e,t){return X.createElement(T,c({},e,{ref:t,icon:_r}))}),yr={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 000 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8z`}}]},name:`enter`,theme:`outlined`},br=X.forwardRef(function(e,t){return X.createElement(T,c({},e,{ref:t,icon:yr}))}),xr=(e,t,n,r)=>{let{titleMarginBottom:i,fontWeightStrong:a}=r;return{marginBottom:i,color:n,fontWeight:a,fontSize:e,lineHeight:t}},Sr=e=>{let t=[1,2,3,4,5],n={};return t.forEach(t=>{n[`
|
||||
h${t}&,
|
||||
div&-h${t},
|
||||
div&-h${t} > textarea,
|
||||
h${t}
|
||||
`]=xr(e[`fontSizeHeading${t}`],e[`lineHeightHeading${t}`],e.colorTextHeading,e)}),n},Cr=e=>{let{componentCls:t}=e;return{"a&, a":Object.assign(Object.assign({},ne(e)),{userSelect:`text`,[`&[disabled], &${t}-disabled`]:{color:e.colorTextDisabled,cursor:`not-allowed`,"&:active, &:hover":{color:e.colorTextDisabled},"&:active":{pointerEvents:`none`}}})}},wr=e=>({code:{margin:`0 0.2em`,paddingInline:`0.4em`,paddingBlock:`0.2em 0.1em`,fontSize:`85%`,fontFamily:e.fontFamilyCode,background:`rgba(150, 150, 150, 0.1)`,border:`1px solid rgba(100, 100, 100, 0.2)`,borderRadius:3},kbd:{margin:`0 0.2em`,paddingInline:`0.4em`,paddingBlock:`0.15em 0.1em`,fontSize:`90%`,fontFamily:e.fontFamilyCode,background:`rgba(150, 150, 150, 0.06)`,border:`1px solid rgba(100, 100, 100, 0.2)`,borderBottomWidth:2,borderRadius:3},mark:{padding:0,backgroundColor:oe[2]},"u, ins":{textDecoration:`underline`,textDecorationSkipInk:`auto`},"s, del":{textDecoration:`line-through`},strong:{fontWeight:e.fontWeightStrong},"ul, ol":{marginInline:0,marginBlock:`0 1em`,padding:0,li:{marginInline:`20px 0`,marginBlock:0,paddingInline:`4px 0`,paddingBlock:0}},ul:{listStyleType:`circle`,ul:{listStyleType:`disc`}},ol:{listStyleType:`decimal`},"pre, blockquote":{margin:`1em 0`},pre:{padding:`0.4em 0.6em`,whiteSpace:`pre-wrap`,wordWrap:`break-word`,background:`rgba(150, 150, 150, 0.1)`,border:`1px solid rgba(100, 100, 100, 0.2)`,borderRadius:3,fontFamily:e.fontFamilyCode,code:{display:`inline`,margin:0,padding:0,fontSize:`inherit`,fontFamily:`inherit`,background:`transparent`,border:0}},blockquote:{paddingInline:`0.6em 0`,paddingBlock:0,borderInlineStart:`4px solid rgba(100, 100, 100, 0.2)`,opacity:.85}}),Tr=e=>{let{componentCls:t,paddingSM:n}=e,r=n;return{"&-edit-content":{position:`relative`,"div&":{insetInlineStart:e.calc(e.paddingSM).mul(-1).equal(),insetBlockStart:e.calc(r).div(-2).add(1).equal(),marginBottom:e.calc(r).div(2).sub(2).equal()},[`${t}-edit-content-confirm`]:{position:`absolute`,insetInlineEnd:e.calc(e.marginXS).add(2).equal(),insetBlockEnd:e.marginXS,color:e.colorIcon,fontWeight:`normal`,fontSize:e.fontSize,fontStyle:`normal`,pointerEvents:`none`},textarea:{margin:`0!important`,MozTransition:`none`,height:`1em`}}}},Er=e=>({[`${e.componentCls}-copy-success`]:{"\n &,\n &:hover,\n &:focus":{color:e.colorSuccess}},[`${e.componentCls}-copy-icon-only`]:{marginInlineStart:0}}),Dr=()=>({"\n a&-ellipsis,\n span&-ellipsis\n ":{display:`inline-block`,maxWidth:`100%`},"&-ellipsis-single-line":{whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,"a&, span&":{verticalAlign:`bottom`},"> code":{paddingBlock:0,maxWidth:`calc(100% - 1.2em)`,display:`inline-block`,overflow:`hidden`,textOverflow:`ellipsis`,verticalAlign:`bottom`,boxSizing:`content-box`}},"&-ellipsis-multiple-line":{display:`-webkit-box`,overflow:`hidden`,WebkitLineClamp:3,WebkitBoxOrient:`vertical`}}),Or=U(`Typography`,e=>{let{componentCls:t,titleMarginTop:n}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:e.colorText,wordBreak:`break-word`,lineHeight:e.lineHeight,[`&${t}-secondary`]:{color:e.colorTextDescription},[`&${t}-success`]:{color:e.colorSuccessText},[`&${t}-warning`]:{color:e.colorWarningText},[`&${t}-danger`]:{color:e.colorErrorText,"a&:active, a&:focus":{color:e.colorErrorTextActive},"a&:hover":{color:e.colorErrorTextHover}},[`&${t}-disabled`]:{color:e.colorTextDisabled,cursor:`not-allowed`,userSelect:`none`},"\n div&,\n p\n ":{marginBottom:`1em`}},Sr(e)),{[`
|
||||
& + h1${t},
|
||||
& + h2${t},
|
||||
& + h3${t},
|
||||
& + h4${t},
|
||||
& + h5${t}
|
||||
`]:{marginTop:n},"\n div,\n ul,\n li,\n p,\n h1,\n h2,\n h3,\n h4,\n h5":{"\n + h1,\n + h2,\n + h3,\n + h4,\n + h5\n ":{marginTop:n}}}),wr(e)),Cr(e)),{[`
|
||||
${t}-expand,
|
||||
${t}-collapse,
|
||||
${t}-edit,
|
||||
${t}-copy
|
||||
`]:Object.assign(Object.assign({},ne(e)),{marginInlineStart:e.marginXXS})}),Tr(e)),Er(e)),Dr()),{"&-rtl":{direction:`rtl`}})}},()=>({titleMarginTop:`1.2em`,titleMarginBottom:`0.5em`})),kr=e=>{let{prefixCls:t,"aria-label":n,className:r,style:a,direction:o,maxLength:s,autoSize:c=!0,value:l,onSave:d,onCancel:f,onEnd:p,component:m,enterIcon:h=X.createElement(br,null)}=e,g=X.useRef(null),_=X.useRef(!1),v=X.useRef(null),[y,b]=X.useState(l);X.useEffect(()=>{b(l)},[l]),X.useEffect(()=>{if(g.current?.resizableTextArea){let{textArea:e}=g.current.resizableTextArea;e.focus();let{length:t}=e.value;e.setSelectionRange(t,t)}},[]);let x=({target:e})=>{b(e.value.replace(/[\n\r]/g,``))},S=()=>{_.current=!0},C=()=>{_.current=!1},w=({keyCode:e})=>{_.current||(v.current=e)},T=()=>{d(y.trim())},E=({keyCode:e,ctrlKey:t,altKey:n,metaKey:r,shiftKey:a})=>{v.current!==e||_.current||t||n||r||a||(e===i.ENTER?(T(),p?.()):e===i.ESC&&f())},D=()=>{T()},[O,k,A]=Or(t),j=(0,Y.default)(t,`${t}-edit-content`,{[`${t}-rtl`]:o===`rtl`,[`${t}-${m}`]:!!m},r,k,A);return O(X.createElement(`div`,{className:j,style:a},X.createElement(hr,{ref:g,maxLength:s,value:y,onChange:x,onKeyDown:w,onKeyUp:E,onCompositionStart:S,onCompositionEnd:C,onBlur:D,"aria-label":n,rows:1,autoSize:c}),h===null?null:u(h,{className:`${t}-edit-content-confirm`})))},Ar=t(((e,t)=>{t.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case`INPUT`:case`TEXTAREA`:t.blur();break;default:t=null}return e.removeAllRanges(),function(){e.type===`Caret`&&e.removeAllRanges(),e.rangeCount||n.forEach(function(t){e.addRange(t)}),t&&t.focus()}}})),jr=e(t(((e,t)=>{var n=Ar(),r={"text/plain":`Text`,"text/html":`Url`,default:`Text`},i=`Copy to clipboard: #{key}, Enter`;function a(e){var t=(/mac os x/i.test(navigator.userAgent)?`⌘`:`Ctrl`)+`+C`;return e.replace(/#{\s*key\s*}/g,t)}t.exports=function(e,t){var o,s,c,l,u,d,f=!1;t||={},o=t.debug||!1;try{if(c=n(),l=document.createRange(),u=document.getSelection(),d=document.createElement(`span`),d.textContent=e,d.ariaHidden=`true`,d.style.all=`unset`,d.style.position=`fixed`,d.style.top=0,d.style.clip=`rect(0, 0, 0, 0)`,d.style.whiteSpace=`pre`,d.style.webkitUserSelect=`text`,d.style.MozUserSelect=`text`,d.style.msUserSelect=`text`,d.style.userSelect=`text`,d.addEventListener(`copy`,function(n){if(n.stopPropagation(),t.format){if(n.preventDefault(),n.clipboardData===void 0){o&&console.warn(`unable to use e.clipboardData`),o&&console.warn(`trying IE specific stuff`),window.clipboardData.clearData();var i=r[t.format]||r.default;window.clipboardData.setData(i,e)}else n.clipboardData.clearData(),n.clipboardData.setData(t.format,e)}t.onCopy&&(n.preventDefault(),t.onCopy(n.clipboardData))}),document.body.appendChild(d),l.selectNodeContents(d),u.addRange(l),!document.execCommand(`copy`))throw Error(`copy command was unsuccessful`);f=!0}catch(n){o&&console.error(`unable to copy using execCommand: `,n),o&&console.warn(`trying IE specific stuff`);try{window.clipboardData.setData(t.format||`text`,e),t.onCopy&&t.onCopy(window.clipboardData),f=!0}catch(n){o&&console.error(`unable to copy using clipboardData: `,n),o&&console.error(`falling back to prompt`),s=a(`message`in t?t.message:i),window.prompt(s,e)}}finally{u&&(typeof u.removeRange==`function`?u.removeRange(l):u.removeAllRanges()),d&&document.body.removeChild(d),c()}return f}}))()),Mr=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},Nr=({copyConfig:e,children:t})=>{let[n,r]=X.useState(!1),[i,a]=X.useState(!1),o=X.useRef(null),s=()=>{o.current&&clearTimeout(o.current)},c={};return e.format&&(c.format=e.format),X.useEffect(()=>s,[]),{copied:n,copyLoading:i,onClick:k(n=>Mr(void 0,void 0,void 0,function*(){var i;n?.preventDefault(),n?.stopPropagation(),a(!0);try{let l=typeof e.text==`function`?yield e.text():e.text;(0,jr.default)(l||gr(t,!0).join(``)||``,c),a(!1),r(!0),s(),o.current=setTimeout(()=>{r(!1)},3e3),(i=e.onCopy)==null||i.call(e,n)}catch(e){throw a(!1),e}}))}};function Pr(e,t){return X.useMemo(()=>{let n=!!e;return[n,Object.assign(Object.assign({},t),n&&typeof e==`object`?e:null)]},[e])}var Fr=e=>{let t=(0,X.useRef)(void 0);return(0,X.useEffect)(()=>{t.current=e}),t.current},Ir=(e,t,n)=>(0,X.useMemo)(()=>e===!0?{title:t??n}:(0,X.isValidElement)(e)?{title:e}:typeof e==`object`?Object.assign({title:t??n},e):{title:e},[e,t,n]),Lr=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumera
Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{n as e}from"./rolldown-runtime-Dl_DZoUm.js";import{i as t}from"./react-1o5M9n0k.js";import{o as n}from"./shared-DZLPF0cC.js";var r=e(t(),1),i=()=>window.crypto.randomUUID();function a({client:e,state:t,session:a,initialDraft:o,editing:s=!1}){let[c,l]=(0,r.useState)(null),[u,d]=(0,r.useState)(``),[f,p]=(0,r.useState)(null),m=(0,r.useMemo)(()=>({st:t,session:a,uuid:i,editing:s,materialPools:c,quote:f}),[t,a,c,f,s]),h=(0,r.useRef)(m),[g,_]=(0,r.useState)(()=>n.syncForm(n.newForm({st:t,session:a,uuid:i,editing:s},o||void 0),{st:t,session:a,uuid:i})),v=(0,r.useRef)(g),y=(0,r.useCallback)(e=>{v.current=e,_(e)},[]),b=(0,r.useCallback)(e=>y(n.syncForm(e(v.current.form),h.current)),[y]),x=(0,r.useCallback)(e=>y(n.syncForm(n.newForm(h.current,e||void 0),h.current)),[y]);(0,r.useEffect)(()=>{h.current=m,y(n.syncForm(v.current.form,m))},[m,y]);let[S,C]=(0,r.useState)(0),w=(0,r.useCallback)(()=>C(e=>e+1),[]);(0,r.useEffect)(()=>{let t=!0;return e.api(`/api/material-pools`).then(e=>{if(!Array.isArray(e.rows))throw Error(`每日料价记录未完整返回,请重新读取。`);t&&(l(e),d(``))}).catch(e=>{t&&d(`每日料价尚未读到:`+(e.name===`AbortError`?`读取超时,请点击“刷新料价”。`:e.message))}),()=>{t=!1}},[e,S]);let T=(0,r.useMemo)(()=>{let e=n.poolQuoteInput(g.form,m),t=c?.rows||[];return e.entries.some(e=>t.some(t=>t.id===e.poolId&&t.personalPools!==void 0))?JSON.stringify(e):``},[g.form,m,c]);return(0,r.useEffect)(()=>{if(!T||f&&JSON.stringify(f.input)===T)return;let t=!0,n=window.setTimeout(async()=>{let n=JSON.parse(T);try{let r=await e.api(`/api/material-pools/quote`,n);t&&p({input:n,result:r,error:``})}catch(e){t&&p({input:n,result:null,error:e.message})}},180);return()=>{t=!1,window.clearTimeout(n)}},[T,f,e]),{store:g,update:b,reset:x,ctx:m,pools:c,poolError:u,loadPools:w}}export{i as n,a as t};
|
||||
Vendored
+6
-4
@@ -4,11 +4,13 @@
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover" />
|
||||
<title>珠宝台账 · 新账系统</title>
|
||||
<script type="module" crossorigin src="/next/assets/index-DZWLfWyz.js"></script>
|
||||
<script type="module" crossorigin src="/next/assets/index-D-ox0wtk.js"></script>
|
||||
<link rel="modulepreload" crossorigin href="/next/assets/rolldown-runtime-Dl_DZoUm.js">
|
||||
<link rel="modulepreload" crossorigin href="/next/assets/antd-Bh8pVx-K.js">
|
||||
<link rel="modulepreload" crossorigin href="/next/assets/react-BvkltZ40.js">
|
||||
<link rel="stylesheet" crossorigin href="/next/assets/index-gaQNAIX3.css">
|
||||
<link rel="modulepreload" crossorigin href="/next/assets/react-1o5M9n0k.js">
|
||||
<link rel="modulepreload" crossorigin href="/next/assets/skeleton-B4Z0R3jQ.js">
|
||||
<link rel="modulepreload" crossorigin href="/next/assets/style-CBKkTdLU.js">
|
||||
<link rel="modulepreload" crossorigin href="/next/assets/shared-DZLPF0cC.js">
|
||||
<link rel="stylesheet" crossorigin href="/next/assets/index-AOn60fn8.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
|
||||
Reference in new issue
Block a user