10 lines
110 KiB
JavaScript
10 lines
110 KiB
JavaScript
import{n as e}from"./rolldown-runtime-Dl_DZoUm.js";import{$n as t,A as n,At as r,B as i,Ct as a,D as o,Dn as s,E as c,F as l,Ft as u,Gt as d,Ht as f,I as p,It as m,Jn as h,Lt as g,M as _,Mt as v,N as y,O as b,P as x,Pt as S,Qn as C,Qt as w,Rt as T,St as E,T as D,Tn as O,Xn as k,Yt as A,Zn as j,Zt as M,b as ee,c as te,ct as ne,d as re,dn as ie,dt as ae,er as oe,hn as se,ht as ce,j as le,jn as ue,jt as N,k as de,kn as fe,kt as pe,l as me,ln as he,lt as P,mn as ge,nn as _e,nr as ve,qn as ye,rn as be,rt as xe,s as Se,tn as Ce,vt as we,w as Te,wt as Ee,x as De,z as Oe,zt as F}from"./index-BvkDlq1y.js";import{_ as ke,f as Ae,g as je,h as Me,m as Ne,v as Pe}from"./TextArea-r6omQeC2.js";import{n as Fe,t as I}from"./typography-DUlVOiLU.js";import{a as Ie,i as Le,n as Re,t as ze}from"./drafts-CiteR1Mt.js";import{a as Be,o as L,r as Ve,s as He}from"./shared-D0Ng0yPd.js";import{n as R,t as Ue}from"./useOrderForm-BPo7-tBE.js";import{i as We,n as Ge,r as Ke,t as qe}from"./LockOutlined-DoZS5WdW.js";import{t as z}from"./input-CIXLdGWW.js";import{i as Je,r as Ye,t as Xe}from"./checkbox-DS2K7LHS.js";import{c as Ze,g as Qe,m as $e}from"./useForm-vGBHLiDP.js";import{n as et,t as tt}from"./card-BJ98V9Zi.js";import{n as nt,r as rt,t as it}from"./format-BxxD-pzI.js";import{t as at}from"./ReloadOutlined-DEsA_m_l.js";import{t as ot}from"./space-DCyfb76q.js";var B=e(oe()),V=e(ve()),st=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,B.default)(`${n}-content`,h(h({},`${n}-content-active`,s),`${n}-content-inactive`,!s),i),style:a,role:c},V.createElement(`div`,{className:(0,B.default)(`${n}-content-box`,l?.body),style:u?.body},o)):null});st.displayName=`PanelContent`;var ct=[`showArrow`,`headerClass`,`isActive`,`onItemClick`,`forceRender`,`className`,`classNames`,`styles`,`prefixCls`,`collapsible`,`accordion`,`panelKey`,`extra`,`header`,`expandIcon`,`openMotion`,`destroyInactivePanel`,`children`],lt=V.forwardRef(function(e,n){var r=e.showArrow,i=r===void 0||r,a=e.headerClass,o=e.isActive,c=e.onItemClick,l=e.forceRender,u=e.className,d=e.classNames,p=d===void 0?{}:d,m=e.styles,g=m===void 0?{}:m,_=e.prefixCls,v=e.collapsible,y=e.accordion,b=e.panelKey,x=e.extra,S=e.header,C=e.expandIcon,w=e.openMotion,T=e.destroyInactivePanel,E=e.children,D=s(e,ct),O=v===`disabled`,k=x!=null&&typeof x!=`boolean`,A=h(h(h({onClick:function(){c?.(b)},onKeyDown:function(e){(e.key===`Enter`||e.keyCode===pe.ENTER||e.which===pe.ENTER)&&c?.(b)},role:y?`tab`:`button`},`aria-expanded`,o),`aria-disabled`,O),`tabIndex`,O?-1:0),j=typeof C==`function`?C(e):V.createElement(`i`,{className:`arrow`}),M=j&&V.createElement(`div`,t({className:`${_}-expand-icon`},[`header`,`icon`].includes(v)?A:{}),j),ee=(0,B.default)(`${_}-item`,h(h({},`${_}-item-active`,o),`${_}-item-disabled`,O),u),te=(0,B.default)(a,`${_}-header`,h({},`${_}-collapsible-${v}`,!!v),p.header),ne=ye({className:te,style:g.header},[`header`,`icon`].includes(v)?{}:A);return V.createElement(`div`,t({},D,{ref:n,className:ee}),V.createElement(`div`,ne,i&&M,V.createElement(`span`,t({className:`${_}-header-text`},v===`header`?A:{}),S),k&&V.createElement(`div`,{className:`${_}-extra`},x)),V.createElement(f,t({visible:o,leavedClassName:`${_}-content-hidden`},w,{forceRender:l,removeOnLeave:T}),function(e,t){var n=e.className,r=e.style;return V.createElement(st,{ref:t,prefixCls:_,className:n,classNames:p,style:r,styles:g,isActive:o,forceRender:l,role:y?`tabpanel`:void 0},E)}))}),ut=[`children`,`label`,`key`,`collapsible`,`onItemClick`,`destroyInactivePanel`],dt=function(e,n){var r=n.prefixCls,i=n.accordion,a=n.collapsible,o=n.destroyInactivePanel,c=n.onItemClick,l=n.activeKey,u=n.openMotion,d=n.expandIcon;return e.map(function(e,n){var f=e.children,p=e.label,m=e.key,h=e.collapsible,g=e.onItemClick,_=e.destroyInactivePanel,v=s(e,ut),y=String(m??n),b=h??a,x=_??o,S=function(e){b!==`disabled`&&(c(e),g?.(e))},C=!1;return C=i?l[0]===y:l.indexOf(y)>-1,V.createElement(lt,t({},v,{prefixCls:r,key:y,panelKey:y,isActive:C,accordion:i,openMotion:u,expandIcon:d,header:p,collapsible:b,onItemClick:S,destroyInactivePanel:x}),f)})},ft=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,accordion:i,children:e.props.children,onItemClick:function(e){y!==`disabled`&&(s(e),_?.(e))},expandIcon:u,collapsible:y};return typeof e.type==`string`?e:(Object.keys(b).forEach(function(e){b[e]===void 0&&delete b[e]}),V.cloneElement(e,b))};function pt(e,t,n){return Array.isArray(e)?dt(e,n):j(t).map(function(e,t){return ft(e,t,n)})}function mt(e){var t=e;if(!Array.isArray(t)){var n=C(t);t=n===`number`||n===`string`?[t]:[]}return t.map(function(e){return String(e)})}var ht=Object.assign(V.forwardRef(function(e,n){var r=e.prefixCls,i=r===void 0?`rc-collapse`:r,a=e.destroyInactivePanel,o=a!==void 0&&a,s=e.style,c=e.accordion,l=e.className,u=e.children,d=e.collapsible,f=e.openMotion,p=e.expandIcon,m=e.activeKey,h=e.defaultActiveKey,g=e.onChange,_=e.items,v=(0,B.default)(i,l),y=be([],{value:m,onChange:function(e){return g?.(e)},defaultValue:h,postState:mt}),b=fe(y,2),x=b[0],C=b[1],w=function(e){return C(function(){return c?x[0]===e?[]:[e]:x.indexOf(e)>-1?x.filter(function(t){return t!==e}):[].concat(ue(x),[e])})};k(!u,"[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");var T=pt(_,u,{prefixCls:i,accordion:c,openMotion:f,expandIcon:p,collapsible:d,destroyInactivePanel:o,onItemClick:w,activeKey:x});return V.createElement(`div`,t({ref:n,className:v,style:s,role:c?`tablist`:void 0},S(e,{aria:!0,data:!0})),T)}),{Panel:lt}),gt=ht;ht.Panel;var _t=V.forwardRef((e,t)=>{let{getPrefixCls:n}=V.useContext(he),{prefixCls:r,className:i,showArrow:a=!0}=e,o=n(`collapse`,r),s=(0,B.default)({[`${o}-no-arrow`]:!a},i);return V.createElement(gt.Panel,Object.assign({ref:t},e,{prefixCls:o,className:s}))}),vt=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:T,fontHeight:E,fontHeightLG:D}=e,k=`${O(l)} ${u} ${d}`;return{[t]:Object.assign(Object.assign({},M(e)),{backgroundColor:i,border:k,borderRadius:c,"&-rtl":{direction:`rtl`},[`& > ${t}-item`]:{borderBottom:k,"&:first-child":{[`
|
||
&,
|
||
& > ${t}-header`]:{borderRadius:`${O(c)} ${O(c)} 0 0`}},"&:last-child":{[`
|
||
&,
|
||
& > ${t}-header`]:{borderRadius:`0 0 ${O(c)} ${O(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`},A(e)),{[`> ${t}-header-text`]:{flex:`auto`},[`${t}-expand-icon`]:{height:E,display:`flex`,alignItems:`center`,paddingInlineEnd:v},[`${t}-arrow`]:Object.assign(Object.assign({},w()),{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:k,[`& > ${t}-content-box`]:{padding:T},"&-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:D,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 ${O(c)} ${O(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}}}}})}},yt=e=>{let{componentCls:t}=e,n=`> ${t}-item > ${t}-header ${t}-arrow`;return{[`${t}-rtl`]:{[n]:{transform:`rotate(180deg)`}}}},bt=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}}}},xt=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}}}}}},St=d(`Collapse`,e=>{let t=_e(e,{collapseHeaderPaddingSM:`${O(e.paddingXS)} ${O(e.paddingSM)}`,collapseHeaderPaddingLG:`${O(e.padding)} ${O(e.paddingLG)}`,collapsePanelBorderRadius:e.borderRadiusLG});return[vt(t),bt(t),xt(t),yt(t),Qe(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`})),Ct=Object.assign(V.forwardRef((e,t)=>{let{getPrefixCls:n,direction:r,expandIcon:i,className:a,style:o}=ie(`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:y}=e,b=we(e=>p??e??`middle`),x=n(`collapse`,s),S=n(),[C,w,T]=St(x),D=V.useMemo(()=>m===`left`?`start`:m===`right`?`end`:m,[m]),O=y??i,k=V.useCallback((e={})=>{let t=typeof O==`function`?O(e):V.createElement(Je,{rotate:e.isActive?r===`rtl`?-90:90:void 0,"aria-label":e.isActive?`expanded`:`collapsed`});return v(t,()=>({className:(0,B.default)(t.props?.className,`${x}-arrow`)}))},[O,x,r]),A=(0,B.default)(`${x}-icon-position-${D}`,{[`${x}-borderless`]:!d,[`${x}-rtl`]:r===`rtl`,[`${x}-ghost`]:!!f,[`${x}-${b}`]:b!==`middle`},a,c,l,w,T),M=V.useMemo(()=>Object.assign(Object.assign({},Ee(S)),{motionAppear:!1,leavedClassName:`${x}-content-hidden`}),[S,x]),ee=V.useMemo(()=>h?j(h).map((e,t)=>{let n=e.props;if(n?.disabled){let r=e.key??String(t),i=Object.assign(Object.assign({},E(e.props,[`disabled`])),{key:r,collapsible:n.collapsible??`disabled`});return v(e,i)}return e}):null,[h]);return C(V.createElement(gt,Object.assign({ref:t,openMotion:M},E(e,[`rootClassName`]),{expandIcon:k,prefixCls:x,className:A,style:Object.assign(Object.assign({},o),u),destroyInactivePanel:_??g}),ee))}),{Panel:_t}),wt=e=>e?typeof e==`function`?e():e:null,Tt=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({},M(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}})},Me(e,`var(--antd-arrow-background-color)`),{[`${t}-pure`]:{position:`relative`,maxWidth:`none`,margin:e.sizePopupArrow,display:`inline-block`,[`${t}-content`]:{display:`inline-block`}}}]},Et=e=>{let{componentCls:t}=e;return{[t]:Ce.map(n=>{let r=e[`${n}6`];return{[`&${t}-${n}`]:{"--antd-arrow-background-color":r,[`${t}-inner`]:{backgroundColor:r},[`${t}-arrow`]:{background:`transparent`}}}})}},Dt=d(`Popover`,e=>{let{colorBgElevated:t,colorText:n}=e,r=_e(e,{popoverBg:t,popoverColor:n});return[Tt(r),Et(r),ae(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},je(e)),Ne({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`]]}),Ot=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},kt=({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`},t)),At=e=>{let{hashId:t,prefixCls:n,className:r,style:i,placement:a=`top`,title:o,content:s,children:c}=e,l=wt(o),u=wt(s),d=(0,B.default)(t,n,`${n}-pure`,`${n}-placement-${a}`,r);return V.createElement(`div`,{className:d,style:i},V.createElement(`div`,{className:`${n}-arrow`}),V.createElement(ke,Object.assign({},e,{className:t,prefixCls:n}),c||V.createElement(kt,{prefixCls:n,title:l,content:u})))},jt=e=>{let{prefixCls:t,className:n}=e,r=Ot(e,[`prefixCls`,`className`]),{getPrefixCls:i}=V.useContext(he),a=i(`popover`,t),[o,s,c]=Dt(a);return o(V.createElement(At,Object.assign({},r,{prefixCls:a,hashId:s,className:(0,B.default)(n,c)})))},Mt=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},Nt=V.forwardRef((e,t)=>{let{prefixCls:n,title:r,content:i,overlayClassName:o,placement:s=`top`,trigger:c=`hover`,children:l,mouseEnterDelay:u=.1,mouseLeaveDelay:d=.1,onOpenChange:f,overlayStyle:p={},styles:m,classNames:h}=e,g=Mt(e,[`prefixCls`,`title`,`content`,`overlayClassName`,`placement`,`trigger`,`children`,`mouseEnterDelay`,`mouseLeaveDelay`,`onOpenChange`,`overlayStyle`,`styles`,`classNames`]),{getPrefixCls:_,className:y,style:b,classNames:x,styles:S}=ie(`popover`),C=_(`popover`,n),[w,T,E]=Dt(C),D=_(),O=(0,B.default)(o,T,E,y,x.root,h?.root),k=(0,B.default)(x.body,h?.body),[A,j]=be(!1,{value:e.open??e.visible,defaultValue:e.defaultOpen??e.defaultVisible}),M=(e,t)=>{j(e,!0),f?.(e,t)},ee=e=>{e.keyCode===pe.ESC&&M(!1,e)},te=e=>{M(e)},ne=wt(r),re=wt(i);return w(V.createElement(Ae,Object.assign({placement:s,trigger:c,mouseEnterDelay:u,mouseLeaveDelay:d},g,{prefixCls:C,classNames:{root:O,body:k},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign({},S.root),b),p),m?.root),body:Object.assign(Object.assign({},S.body),m?.body)},ref:t,open:A,onOpenChange:te,overlay:ne||re?V.createElement(kt,{prefixCls:C,title:ne,content:re}):null,transitionName:a(D,`zoom-big`,g.transitionName),"data-popover-inject":!0}),v(l,{onKeyDown:e=>{var t,n;(0,V.isValidElement)(l)&&((n=l==null?void 0:(t=l.props).onKeyDown)==null||n.call(t,e)),ee(e)}})))});Nt._InternalPanelDoNotUseOrYouWillBeFired=jt;var Pt=We,Ft={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM504 618H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 490v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8z`}}]},name:`file-text`,theme:`outlined`},It=V.forwardRef(function(e,n){return V.createElement(F,t({},e,{ref:n,icon:Ft}))}),Lt=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},Rt=$e(e=>{let{prefixCls:t,className:n,closeIcon:a,closable:o,type:s,title:c,children:l,footer:u}=e,d=Lt(e,[`prefixCls`,`className`,`closeIcon`,`closable`,`type`,`title`,`children`,`footer`]),{getPrefixCls:f}=V.useContext(he),m=f(),h=t||f(`modal`),g=r(m),[_,v,y]=p(h,g),b=`${h}-confirm`,S={};return S=s?{closable:o??!1,title:``,footer:``,children:V.createElement(x,Object.assign({},e,{prefixCls:h,confirmPrefixCls:b,rootPrefixCls:m,content:l}))}:{closable:o??!0,title:c,footer:u!==null&&V.createElement(Oe,Object.assign({},e)),children:l},_(V.createElement(xe,Object.assign({prefixCls:h,className:(0,B.default)(v,`${h}-pure-panel`,s&&b,s&&`${b}-${s}`,n,y,g)},d,{closeIcon:i(h,a),closable:o},S)))});function zt(e){return c(_(e))}var H=l;H.useModal=D,H.info=function(e){return c(n(e))},H.success=function(e){return c(le(e))},H.error=function(e){return c(de(e))},H.warning=zt,H.warn=zt,H.confirm=function(e){return c(b(e))},H.destroyAll=function(){for(;y.length;){let e=y.pop();e&&e()}},H.config=o,H._InternalPanelDoNotUseOrYouWillBeFired=Rt;var Bt=e=>{let{componentCls:t,iconCls:n,antCls:r,zIndexPopup:i,colorText:a,colorWarning:o,marginXXS:s,marginXS:c,fontSize:l,fontWeightStrong:u,colorTextHeading:d}=e;return{[t]:{zIndex:i,[`&${r}-popover`]:{fontSize:l},[`${t}-message`]:{marginBottom:c,display:`flex`,flexWrap:`nowrap`,alignItems:`start`,[`> ${t}-message-icon ${n}`]:{color:o,fontSize:l,lineHeight:1,marginInlineEnd:c},[`${t}-title`]:{fontWeight:u,color:d,"&:only-child":{fontWeight:`normal`}},[`${t}-description`]:{marginTop:s,color:a}},[`${t}-buttons`]:{textAlign:`end`,whiteSpace:`nowrap`,button:{marginInlineStart:c}}}}},Vt=d(`Popconfirm`,e=>Bt(e),e=>{let{zIndexPopupBase:t}=e;return{zIndexPopup:t+60}},{resetStyle:!1}),Ht=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},Ut=e=>{let{prefixCls:t,okButtonProps:n,cancelButtonProps:r,title:i,description:a,cancelText:o,okText:s,okType:c=`primary`,icon:l=V.createElement(u,null),showCancel:d=!0,close:f,onConfirm:p,onCancel:m,onPopupClick:h}=e,{getPrefixCls:g}=V.useContext(he),[_]=ge(`Popconfirm`,se.Popconfirm),v=wt(i),y=wt(a);return V.createElement(`div`,{className:`${t}-inner-content`,onClick:h},V.createElement(`div`,{className:`${t}-message`},l&&V.createElement(`span`,{className:`${t}-message-icon`},l),V.createElement(`div`,{className:`${t}-message-text`},v&&V.createElement(`div`,{className:`${t}-title`},v),y&&V.createElement(`div`,{className:`${t}-description`},y))),V.createElement(`div`,{className:`${t}-buttons`},d&&V.createElement(P,Object.assign({onClick:m,size:`small`},r),o||_?.cancelText),V.createElement(ne,{buttonProps:Object.assign(Object.assign({size:`small`},ce(c)),n),actionFn:p,close:f,prefixCls:g(`btn`),quitOnNullishReturnValue:!0,emitEvent:!0},s||_?.okText)))},Wt=e=>{let{prefixCls:t,placement:n,className:r,style:i}=e,a=Ht(e,[`prefixCls`,`placement`,`className`,`style`]),{getPrefixCls:o}=V.useContext(he),s=o(`popconfirm`,t),[c]=Vt(s);return c(V.createElement(jt,{placement:n,className:(0,B.default)(s,r),style:i,content:V.createElement(Ut,Object.assign({prefixCls:s},a))}))},Gt=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},Kt=V.forwardRef((e,t)=>{let{prefixCls:n,placement:r=`top`,trigger:i=`click`,okType:a=`primary`,icon:o=V.createElement(u,null),children:s,overlayClassName:c,onOpenChange:l,onVisibleChange:d,overlayStyle:f,styles:p,classNames:m}=e,h=Gt(e,[`prefixCls`,`placement`,`trigger`,`okType`,`icon`,`children`,`overlayClassName`,`onOpenChange`,`onVisibleChange`,`overlayStyle`,`styles`,`classNames`]),{getPrefixCls:g,className:_,style:v,classNames:y,styles:b}=ie(`popconfirm`),[x,S]=be(!1,{value:e.open??e.visible,defaultValue:e.defaultOpen??e.defaultVisible}),C=(e,t)=>{S(e,!0),d?.(e),l?.(e,t)},w=e=>{C(!1,e)},T=t=>e.onConfirm?.call(void 0,t),D=t=>{var n;C(!1,t),(n=e.onCancel)==null||n.call(void 0,t)},O=(t,n)=>{let{disabled:r=!1}=e;r||C(t,n)},k=g(`popconfirm`,n),A=(0,B.default)(k,_,c,y.root,m?.root),j=(0,B.default)(y.body,m?.body),[M]=Vt(k);return M(V.createElement(Nt,Object.assign({},E(h,[`title`]),{trigger:i,placement:r,onOpenChange:O,open:x,ref:t,classNames:{root:A,body:j},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign({},b.root),v),f),p?.root),body:Object.assign(Object.assign({},b.body),p?.body)},content:V.createElement(Ut,Object.assign({okType:a,icon:o},e,{prefixCls:k,close:w,onConfirm:T,onCancel:D})),"data-popover-inject":!0}),s))});Kt._InternalPanelDoNotUseOrYouWillBeFired=Wt;var qt={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M955.7 856l-416-720c-6.2-10.7-16.9-16-27.7-16s-21.6 5.3-27.7 16l-416 720C56 877.4 71.4 904 96 904h832c24.6 0 40-26.6 27.7-48zM480 416c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v184c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V416zm32 352a48.01 48.01 0 010-96 48.01 48.01 0 010 96z`}}]},name:`warning`,theme:`filled`},Jt=V.forwardRef(function(e,n){return V.createElement(F,t({},e,{ref:n,icon:qt}))}),Yt=()=>V.createElement(`svg`,{width:`252`,height:`294`},V.createElement(`title`,null,`No Found`),V.createElement(`g`,{fill:`none`,fillRule:`evenodd`},V.createElement(`circle`,{cx:`126.75`,cy:`128.1`,r:`126`,fill:`#E4EBF7`}),V.createElement(`circle`,{cx:`31.55`,cy:`130.8`,r:`8.3`,fill:`#FFF`}),V.createElement(`path`,{stroke:`#FFF`,d:`m37 134.3 10.5 6m.9 6.2-12.7 10.8`,strokeWidth:`2`}),V.createElement(`path`,{fill:`#FFF`,d:`M39.9 159.4a5.7 5.7 0 1 1-11.3-1.2 5.7 5.7 0 0 1 11.3 1.2m17.7-16.2a5.7 5.7 0 1 1-11.4-1.1 5.7 5.7 0 0 1 11.4 1.1M99 27h29.8a4.6 4.6 0 1 0 0-9.2H99a4.6 4.6 0 1 0 0 9.2m11.4 18.3h29.8a4.6 4.6 0 0 0 0-9.2h-29.8a4.6 4.6 0 1 0 0 9.2`}),V.createElement(`path`,{fill:`#FFF`,d:`M112.8 26.9h15.8a4.6 4.6 0 1 0 0 9.1h-15.8a4.6 4.6 0 0 0 0-9.1m71.7 108.8a10 10 0 1 1-19.8-2 10 10 0 0 1 19.8 2`}),V.createElement(`path`,{stroke:`#FFF`,d:`m179.3 141.8 12.6 7.1m1.1 7.6-15.2 13`,strokeWidth:`2`}),V.createElement(`path`,{fill:`#FFF`,d:`M184.7 170a6.8 6.8 0 1 1-13.6-1.3 6.8 6.8 0 0 1 13.6 1.4m18.6-16.8a6.9 6.9 0 1 1-13.7-1.4 6.9 6.9 0 0 1 13.7 1.4`}),V.createElement(`path`,{stroke:`#FFF`,d:`M152 192.3a2.2 2.2 0 1 1-4.5 0 2.2 2.2 0 0 1 4.4 0zm73.3-76.2a2.2 2.2 0 1 1-4.5 0 2.2 2.2 0 0 1 4.5 0zm-9 35a2.2 2.2 0 1 1-4.4 0 2.2 2.2 0 0 1 4.5 0zM177 107.6a2.2 2.2 0 1 1-4.4 0 2.2 2.2 0 0 1 4.4 0zm18.4-15.4a2.2 2.2 0 1 1-4.5 0 2.2 2.2 0 0 1 4.5 0zm6.8 88.5a2.2 2.2 0 1 1-4.5 0 2.2 2.2 0 0 1 4.5 0z`,strokeWidth:`2`}),V.createElement(`path`,{stroke:`#FFF`,d:`m214.4 153.3-2 20.2-10.8 6m-28-4.7-6.3 9.8H156l-4.5 6.5m23.5-66v-15.7m46 7.8-13 8-15.2-8V94.4`,strokeWidth:`2`}),V.createElement(`path`,{fill:`#FFF`,d:`M166.6 66h-4a4.8 4.8 0 0 1-4.7-4.8 4.8 4.8 0 0 1 4.7-4.7h4a4.8 4.8 0 0 1 4.7 4.7 4.8 4.8 0 0 1-4.7 4.7`}),V.createElement(`circle`,{cx:`204.3`,cy:`30`,r:`29.5`,fill:`#1677ff`}),V.createElement(`path`,{fill:`#FFF`,d:`M206 38.4c.5.5.7 1.1.7 2s-.2 1.4-.7 1.9a3 3 0 0 1-2 .7c-.8 0-1.5-.3-2-.8s-.8-1.1-.8-1.9.3-1.4.8-2c.5-.4 1.2-.7 2-.7.7 0 1.4.3 2 .8m4.2-19.5c1.5 1.3 2.2 3 2.2 5.2a7.2 7.2 0 0 1-1.5 4.5l-3 2.7a5 5 0 0 0-1.3 1.7 5.2 5.2 0 0 0-.6 2.4v.5h-4v-.5c0-1.4.1-2.5.6-3.5s1.9-2.5 4.2-4.5l.4-.5a4 4 0 0 0 1-2.6c0-1.2-.4-2-1-2.8-.7-.6-1.6-1-2.9-1-1.5 0-2.6.5-3.3 1.5-.4.5-.6 1-.8 1.9a2 2 0 0 1-2 1.6 2 2 0 0 1-2-2.4c.4-1.6 1-2.8 2.1-3.8a8.5 8.5 0 0 1 6.3-2.3c2.3 0 4.2.6 5.6 2`}),V.createElement(`path`,{fill:`#FFB594`,d:`M52 76.1s21.8 5.4 27.3 16c5.6 10.7-6.3 9.2-15.7 5C52.8 92 39 85 52 76`}),V.createElement(`path`,{fill:`#FFC6A0`,d:`m90.5 67.5-.5 2.9c-.7.5-4.7-2.7-4.7-2.7l-1.7.8-1.3-5.7s6.8-4.6 9-5c2.4-.5 9.8 1 10.6 2.3 0 0 1.3.4-2.2.6-3.6.3-5 .5-6.8 3.2l-2.4 3.6`}),V.createElement(`path`,{fill:`#FFF`,d:`M128 111.4a36.7 36.7 0 0 0-8.9-15.5c-3.5-3-9.3-2.2-11.3-4.2-1.3-1.2-3.2-1.2-3.2-1.2L87.7 87c-2.3-.4-2.1-.7-6-1.4-1.6-1.9-3-1.1-3-1.1l-7-1.4c-1-1.5-2.5-1-2.5-1l-2.4-.9C65 91.2 59 95 59 95c1.8 1.1 15.7 8.3 15.7 8.3l5.1 37.1s-3.3 5.7 1.4 9.1c0 0 19.9-3.7 34.9-.3 0 0 3-2.6 1-8.8.5-3 1.4-8.3 1.7-11.6.4.7 2 1.9 3.1 3.4 0 0 9.4-7.3 11-14a17 17 0 0 1-2.2-2.4c-.5-.8-.3-2-.7-2.8-.7-1-1.8-1.3-2-1.6`}),V.createElement(`path`,{fill:`#CBD1D1`,d:`M101 290s4.4 2 7.4 1c2.9-1 4.6.7 7.1 1.2 2.6.5 6.9 1.1 11.7-1.3 0-5.5-6.9-4-12-6.7-2.5-1.4-3.7-4.7-3.5-8.8h-9.5s-1.2 10.6-1 14.6`}),V.createElement(`path`,{fill:`#2B0849`,d:`M101 289.8s2.5 1.3 6.8.7c3-.5 3.7.5 7.4 1 3.8.6 10.8 0 11.9-.9.4 1.1-.4 2-.4 2s-1.5.7-4.8.9c-2 .1-5.8.3-7.6-.5-1.8-1.4-5.2-1.9-5.7-.2-4 1-7.4-.3-7.4-.3l-.1-2.7z`}),V.createElement(`path`,{fill:`#A4AABA`,d:`M108.3 276h3.1s0 6.7 4.6 8.6c-4.7.6-8.6-2.3-7.7-8.6`}),V.createElement(`path`,{fill:`#CBD1D1`,d:`M57.5 272.4s-2 7.4-4.4 12.3c-1.8 3.7-4.3 7.5 5.4 7.5 6.7 0 9-.5 7.4-6.6-1.5-6.1.3-13.2.3-13.2h-8.7z`}),V.createElement(`path`,{fill:`#2B0849`,d:`M51.5 289.8s2 1.2 6.6 1.2c6 0 8.3-1.7 8.3-1.7s.6 1.1-.7 2.2c-1 .8-3.6 1.6-7.4 1.5-4.1 0-5.8-.5-6.7-1.1-.8-.6-.7-1.6-.1-2.1`}),V.createElement(`path`,{fill:`#A4AABA`,d:`M58.4 274.3s0 1.5-.3 3c-.3 1.4-1 3-1.1 4 0 1.2 4.5 1.7 5.1.1.6-1.5 1.3-6.4 2-7.2.6-.9-5-2.2-5.7.1`}),V.createElement(`path`,{fill:`#7BB2F9`,d:`m99.7 278.5 13.3.1s1.3-54.5 1.9-64.4c.5-9.9 3.8-43.4 1-63.1l-12.6-.7-22.8.8-1.2 10c0 .5-.7.8-.7 1.4-.1.5.4 1.3.3 2-2.4 14-6.4 33-8.8 46.6 0 .7-1.2 1-1.4 2.7 0 .3.2 1.5 0 1.8-6.8 18.7-10.9 47.8-14.2 61.9h14.6s2.2-8.6 4-17c2.9-12.9 23.2-85 23.2-85l3-.5 1 46.3s-.2 1.2.4 2c.5.8-.6 1.1-.4 2.3l.4 1.8-1 11.8c-.4 4.8 0 39.2 0 39.2`}),V.createElement(`path`,{stroke:`#648BD8`,d:`M76 221.6c1.2.1 4.1-2 7-5m23.4 8.5s2.7-1 6-3.8`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),V.createElement(`path`,{stroke:`#648BD8`,d:`M107.3 222.1s2.7-1.1 6-3.9`,strokeLinecap:`round`,strokeLinejoin:`round`}),V.createElement(`path`,{stroke:`#648BD8`,d:`M74.7 224.8s2.7-.6 6.5-3.4m4.8-69.8c-.2 3.1.3 8.6-4.3 9.2m22-11s0 14-1.4 15.1a15 15 0 0 1-3 2m.5-16.5s0 13-1.2 24.4m-5 1.1s7.3-1.7 9.5-1.7M74.3 206a212 212 0 0 1-1 4.5s-1.4 1.9-1 3.8c.5 2-1 2-5 15.4A353 353 0 0 0 61 257l-.2 1.2m14.9-60.5a321 321 0 0 1-.9 4.8m7.8-50.4-1.2 10.5s-1.1.1-.5 2.2c.1 1.4-2.7 15.8-5.2 30.5m-19.6 79h13.3`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),V.createElement(`path`,{fill:`#192064`,d:`M116.2 148.2s-17-3-35.9.2c.2 2.5 0 4.2 0 4.2s14.7-2.8 35.7-.3c.3-2.4.2-4 .2-4`}),V.createElement(`path`,{fill:`#FFF`,d:`M106.3 151.2v-5a.8.8 0 0 0-.8-.8h-7.8a.8.8 0 0 0-.8.8v5a.8.8 0 0 0 .8.8h7.8a.8.8 0 0 0 .8-.8`}),V.createElement(`path`,{fill:`#192064`,d:`M105.2 150.2v-3a.6.6 0 0 0-.6-.7 94.3 94.3 0 0 0-5.9 0 .7.7 0 0 0-.6.6v3.1a.6.6 0 0 0 .6.7 121.1 121.1 0 0 1 5.8 0c.4 0 .7-.3.7-.7`}),V.createElement(`path`,{stroke:`#648BD8`,d:`M100.3 275.4h12.3m-11.2-4.9.1 6.5m0-12.5a915.8 915.8 0 0 0 0 4.4m-.5-94 .9 44.7s.7 1.6-.2 2.7c-1 1.1 2.4.7.9 2.2-1.6 1.6.9 1.2 0 3.4-.6 1.5-1 21.1-1.1 35.2`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),V.createElement(`path`,{fill:`#FFC6A0`,d:`M46.9 83.4s-.5 6 7.2 5.6c11.2-.7 9.2-9.4 31.5-21.7-.7-2.7-2.4-4.7-2.4-4.7s-11 3-22.6 8c-6.8 3-13.4 6.4-13.7 12.8m57.6 7.7.9-5.4-8.9-11.4-5 5.3-1.8 7.9a.3.3 0 0 0 .1.3c1 .8 6.5 5 14.4 3.5a.3.3 0 0 0 .3-.2`}),V.createElement(`path`,{fill:`#FFC6A0`,d:`M94 79.4s-4.6-2.9-2.5-6.9c1.6-3 4.5 1.2 4.5 1.2s.5-3.7 3.1-3.7c.6-1 1.6-4.1 1.6-4.1l13.5 3c0 5.3-2.3 19.5-7.8 20-8.9.6-12.5-9.5-12.5-9.5`}),V.createElement(`path`,{fill:`#520038`,d:`M113.9 73.4c2.6-2 3.4-9.7 3.4-9.7s-2.4-.5-6.6-2c-4.7-2.1-12.8-4.8-17.5 1-9.6 3.2-2 19.8-2 19.8l2.7-3s-4-3.3-2-6.3c2-3.5 3.8 1 3.8 1s.7-2.3 3.6-3.3c.4-.7 1-2.6 1.4-3.8a1 1 0 0 1 1.3-.7l11.4 2.6c.5.2.8.7.8 1.2l-.3 3.2z`}),V.createElement(`path`,{fill:`#552950`,d:`M105 76c-.1.7-.6 1.1-1 1-.6 0-.9-.6-.8-1.2.1-.6.6-1 1-1 .6 0 .9.7.8 1.3m7.1 1.6c0 .6-.5 1-1 1-.5-.1-.8-.7-.7-1.3 0-.6.5-1 1-1 .5.1.8.7.7 1.3`}),V.createElement(`path`,{stroke:`#DB836E`,d:`m110.1 74.8-.9 1.7-.3 4.3h-2.2`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),V.createElement(`path`,{stroke:`#5C2552`,d:`M110.8 74.5s1.8-.7 2.6.5`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),V.createElement(`path`,{stroke:`#DB836E`,d:`M92.4 74.3s.5-1.1 1.1-.7c.6.4 1.3 1.4.6 2-.8.5.1 1.6.1 1.6`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),V.createElement(`path`,{stroke:`#5C2552`,d:`M103.3 73s1.8 1 4.1.9`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),V.createElement(`path`,{stroke:`#DB836E`,d:`M103.7 81.8s2.2 1.2 4.4 1.2m-3.5 1.3s1 .4 1.6.3m-11.5-3.4s2.3 7.4 10.4 7.6`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),V.createElement(`path`,{stroke:`#E4EBF7`,d:`M81.5 89.4s.4 5.6-5 12.8M69 82.7s-.7 9.2-8.2 14.2m68.6 26s-5.3 7.4-9.4 10.7m-.7-26.3s.5 4.4-2.1 32`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),V.createElement(`path`,{fill:`#F2D7AD`,d:`M150 151.2h-49.8a1 1 0 0 1-1-1v-31.7c0-.5.4-1 1-1H150c.6 0 1 .5 1 1v31.7a1 1 0 0 1-1 1`}),V.createElement(`path`,{fill:`#F4D19D`,d:`M150.3 151.2h-19.9v-33.7h20.8v32.8a1 1 0 0 1-1 1`}),V.createElement(`path`,{fill:`#F2D7AD`,d:`M123.6 127.9H92.9a.5.5 0 0 1-.4-.8l6.4-9.1c.2-.3.5-.5.8-.5h31.1l-7.2 10.4z`}),V.createElement(`path`,{fill:`#CC9B6E`,d:`M123.7 128.4H99.2v-.5h24.2l7.2-10.2.4.3z`}),V.createElement(`path`,{fill:`#F4D19D`,d:`M158.3 127.9h-18.7a2 2 0 0 1-1.6-.8l-7.2-9.6h20c.5 0 1 .3 1.2.6l6.7 9a.5.5 0 0 1-.4.8`}),V.createElement(`path`,{fill:`#CC9B6E`,d:`M157.8 128.5h-19.3l-7.9-10.5.4-.3 7.7 10.3h19.1zm-27.2 22.2v-8.2h.4v8.2zm-.1-10.9v-21.4h.4l.1 21.4zm-18.6 1.1-.5-.1 1.5-5.2.5.2zm-3.5.2-2.6-3 2.6-3.4.4.3-2.4 3.1 2.4 2.6zm8.2 0-.4-.4 2.4-2.6-2.4-3 .4-.4 2.7 3.4z`}),V.createElement(`path`,{fill:`#FFC6A0`,d:`m154.3 131.9-3.1-2v3.5l-1 .1a85 85 0 0 1-4.8.3c-1.9 0-2.7 2.2 2.2 2.6l-2.6-.6s-2.2 1.3.5 2.3c0 0-1.6 1.2.6 2.6-.6 3.5 5.2 4 7 3.6a6.1 6.1 0 0 0 4.6-5.2 8 8 0 0 0-3.4-7.2`}),V.createElement(`path`,{stroke:`#DB836E`,d:`M153.7 133.6s-6.5.4-8.4.3c-1.8 0-1.9 2.2 2.4 2.3 3.7.2 5.4 0 5.4 0`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),V.createElement(`path`,{stroke:`#DB836E`,d:`M145.2 135.9c-1.9 1.3.5 2.3.5 2.3s3.5 1 6.8.6m-.6 2.9s-6.3.1-6.7-2.1c-.3-1.4.4-1.4.4-1.4m.5 2.7s-1 3.1 5.5 3.5m-.4-14.5v3.5M52.8 89.3a18 18 0 0 0 13.6-7.8`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),V.createElement(`path`,{fill:`#5BA02E`,d:`M168.6 248.3a6.6 6.6 0 0 1-6.7-6.6v-66.5a6.6 6.6 0 1 1 13.3 0v66.5a6.6 6.6 0 0 1-6.6 6.6`}),V.createElement(`path`,{fill:`#92C110`,d:`M176.5 247.7a6.6 6.6 0 0 1-6.6-6.7v-33.2a6.6 6.6 0 1 1 13.3 0V241a6.6 6.6 0 0 1-6.7 6.7`}),V.createElement(`path`,{fill:`#F2D7AD`,d:`M186.4 293.6H159a3.2 3.2 0 0 1-3.2-3.2v-46.1a3.2 3.2 0 0 1 3.2-3.2h27.5a3.2 3.2 0 0 1 3.2 3.2v46.1a3.2 3.2 0 0 1-3.2 3.2`}),V.createElement(`path`,{stroke:`#E4EBF7`,d:`M89 89.5s7.8 5.4 16.6 2.8`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}))),Xt=()=>V.createElement(`svg`,{width:`254`,height:`294`},V.createElement(`title`,null,`Server Error`),V.createElement(`g`,{fill:`none`,fillRule:`evenodd`},V.createElement(`path`,{fill:`#E4EBF7`,d:`M0 128.1v-2C0 56.5 56.3.2 125.7.2h2.1C197.2.3 253.5 56.6 253.5 126v2.1c0 69.5-56.3 125.7-125.7 125.7h-2.1A125.7 125.7 0 0 1 0 128.1`}),V.createElement(`path`,{fill:`#FFF`,d:`M40 132.1a8.3 8.3 0 1 1-16.6-1.7 8.3 8.3 0 0 1 16.6 1.7`}),V.createElement(`path`,{stroke:`#FFF`,d:`m37.2 135.6 10.5 6m1 6.3-12.8 10.8`,strokeWidth:`2`}),V.createElement(`path`,{fill:`#FFF`,d:`M40.1 160.8a5.7 5.7 0 1 1-11.3-1.1 5.7 5.7 0 0 1 11.3 1.1M58 144.6a5.7 5.7 0 1 1-11.4-1.2 5.7 5.7 0 0 1 11.4 1.2M99.7 27.4h30a4.6 4.6 0 1 0 0-9.2h-30a4.6 4.6 0 0 0 0 9.2M111 46h30a4.6 4.6 0 1 0 0-9.3h-30a4.6 4.6 0 1 0 0 9.3m2.5-18.6h16a4.6 4.6 0 1 0 0 9.3h-16a4.6 4.6 0 0 0 0-9.3m36.7 42.7h-4a4.8 4.8 0 0 1-4.8-4.8 4.8 4.8 0 0 1 4.8-4.8h4a4.8 4.8 0 0 1 4.7 4.8 4.8 4.8 0 0 1-4.7 4.8`}),V.createElement(`circle`,{cx:`201.35`,cy:`30.2`,r:`29.7`,fill:`#FF603B`}),V.createElement(`path`,{fill:`#FFF`,d:`m203.6 19.4-.7 15a1.5 1.5 0 0 1-3 0l-.7-15a2.2 2.2 0 1 1 4.4 0m-.3 19.4c.5.5.8 1.1.8 1.9s-.3 1.4-.8 1.9a3 3 0 0 1-2 .7 2.5 2.5 0 0 1-1.8-.7c-.6-.6-.8-1.2-.8-2 0-.7.2-1.3.8-1.8.5-.5 1.1-.7 1.8-.7.8 0 1.5.2 2 .7`}),V.createElement(`path`,{fill:`#FFB594`,d:`M119.3 133.3c4.4-.6 3.6-1.2 4-4.8.8-5.2-3-17-8.2-25.1-1-10.7-12.6-11.3-12.6-11.3s4.3 5 4.2 16.2c1.4 5.3.8 14.5.8 14.5s5.3 11.4 11.8 10.5`}),V.createElement(`path`,{fill:`#FFF`,d:`M101 91.6s1.4-.6 3.2.6c8 1.4 10.3 6.7 11.3 11.4 1.8 1.2 1.8 2.3 1.8 3.5l1.5 3s-7.2 1.7-11 6.7c-1.3-6.4-6.9-25.2-6.9-25.2`}),V.createElement(`path`,{fill:`#FFB594`,d:`m94 90.5 1-5.8-9.2-11.9-5.2 5.6-2.6 9.9s8.4 5 16 2.2`}),V.createElement(`path`,{fill:`#FFC6A0`,d:`M83 78.2s-4.6-2.9-2.5-6.9c1.6-3 4.5 1.2 4.5 1.2s.5-3.7 3.2-3.7c.5-1 1.5-4.2 1.5-4.2l13.6 3.2c0 5.2-2.3 19.5-7.9 20-8.9.6-12.5-9.6-12.5-9.6`}),V.createElement(`path`,{fill:`#520038`,d:`M103 72.2c2.6-2 3.5-9.7 3.5-9.7s-2.5-.5-6.7-2c-4.7-2.2-12.9-4.9-17.6.9-9.5 4.4-2 20-2 20l2.7-3.1s-4-3.3-2.1-6.3c2.2-3.5 4 1 4 1s.6-2.3 3.5-3.3c.4-.7 1-2.7 1.5-3.8A1 1 0 0 1 91 65l11.5 2.7c.5.1.8.6.8 1.2l-.3 3.2z`}),V.createElement(`path`,{fill:`#552950`,d:`M101.2 76.5c0 .6-.6 1-1 1-.5-.1-.9-.7-.8-1.3.1-.6.6-1 1.1-1 .5.1.8.7.7 1.3m-7-1.4c0 .6-.5 1-1 1-.5-.1-.8-.7-.7-1.3 0-.6.6-1 1-1 .5.1.9.7.8 1.3`}),V.createElement(`path`,{stroke:`#DB836E`,d:`m99.2 73.6-.9 1.7-.3 4.3h-2.2`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),V.createElement(`path`,{stroke:`#5C2552`,d:`M100 73.3s1.7-.7 2.4.5`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),V.createElement(`path`,{stroke:`#DB836E`,d:`M81.4 73s.4-1 1-.6c.7.4 1.4 1.4.6 2s.2 1.6.2 1.6`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),V.createElement(`path`,{stroke:`#5C2552`,d:`M92.3 71.7s1.9 1.1 4.2 1`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),V.createElement(`path`,{stroke:`#DB836E`,d:`M92.7 80.6s2.3 1.2 4.4 1.2m-3.4 1.4s1 .4 1.5.3M83.7 80s1.8 6.6 9.2 8`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),V.createElement(`path`,{stroke:`#E4EBF7`,d:`M95.5 91.7s-1 2.8-8.2 2c-7.3-.6-10.3-5-10.3-5`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),V.createElement(`path`,{fill:`#FFF`,d:`M78.1 87.5s6.6 5 16.5 2.5c0 0 9.6 1 11.5 5.3 5.4 11.8.6 36.8 0 40 3.5 4-.4 8.4-.4 8.4-15.7-3.5-35.8-.6-35.8-.6-4.9-3.5-1.3-9-1.3-9l-6.2-23.8c-2.5-15.2.8-19.8 3.5-20.7 3-1 8-1.3 8-1.3.6 0 1.1 0 1.4-.2 2.4-1.3 2.8-.6 2.8-.6`}),V.createElement(`path`,{fill:`#FFC6A0`,d:`M65.8 89.8s-6.8.5-7.6 8.2c-.4 8.8 3 11 3 11s6.1 22 16.9 22.9c8.4-2.2 4.7-6.7 4.6-11.4-.2-11.3-7-17-7-17s-4.3-13.7-9.9-13.7`}),V.createElement(`path`,{fill:`#FFC6A0`,d:`M71.7 124.2s.9 11.3 9.8 6.5c4.8-2.5 7.6-13.8 9.8-22.6A201 201 0 0 0 94 96l-5-1.7s-2.4 5.6-7.7 12.3c-4.4 5.5-9.2 11.1-9.5 17.7`}),V.createElement(`path`,{stroke:`#E4EBF7`,d:`M108.5 105.2s1.7 2.7-2.4 30.5c2.4 2.2 1 6-.2 7.5`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),V.createElement(`path`,{fill:`#FFC6A0`,d:`M123.3 131.5s-.5 2.8-11.8 2c-15.2-1-25.3-3.2-25.3-3.2l.9-5.8s.7.2 9.7-.1c11.9-.4 18.7-6 25-1 4 3.2 1.5 8.1 1.5 8.1`}),V.createElement(`path`,{fill:`#FFF`,d:`M70.2 91s-5.6-4.8-11 2.7c-3.3 7.2.5 15.2 2.6 19.5-.3 3.8 2.4 4.3 2.4 4.3s0 1 1.5 2.7c4-7 6.7-9.1 13.7-12.5-.3-.7-1.9-3.3-1.8-3.8.2-1.7-1.3-2.6-1.3-2.6s-.3-.2-1.2-2.8c-.8-2.3-2-5.1-4.9-7.5`}),V.createElement(`path`,{fill:`#CBD1D1`,d:`M90.2 288s4.9 2.3 8.3 1.2c3.2-1 5.2.7 8 1.3a20 20 0 0 0 13.3-1.4c-.2-6.2-7.8-4.5-13.6-7.6-2.9-1.6-4.2-5.3-4-10H91.5s-1.5 12-1.3 16.5`}),V.createElement(`path`,{fill:`#2B0849`,d:`M90.2 287.8s2.8 1.5 7.6.8c3.5-.5 3.3.6 7.5 1.3 4.2.6 13-.2 14.3-1.2.5 1.3-.4 2.4-.4 2.4s-1.7.6-5.4.9c-2.3.1-8.1.3-10.2-.6-2-1.6-4.9-1.5-6-.3-4.5 1.1-7.2-.3-7.2-.3l-.2-3z`}),V.createElement(`path`,{fill:`#A4AABA`,d:`M98.4 272.3h3.5s0 7.5 5.2 9.6c-5.3.7-9.7-2.6-8.7-9.6`}),V.createElement(`path`,{fill:`#CBD1D1`,d:`M44.4 272s-2.2 7.8-4.7 13c-1.9 3.8-4.4 7.8 5.8 7.8 7 0 9.3-.5 7.7-7-1.6-6.3.3-13.8.3-13.8h-9z`}),V.createElement(`path`,{fill:`#2B0849`,d:`M38 290.3s2.3 1.2 7 1.2c6.4 0 8.7-1.7 8.7-1.7s.6 1.1-.7 2.2c-1 1-3.8 1.7-7.7 1.7-4.4 0-6.1-.6-7-1.3-1-.5-.8-1.6-.2-2.1`}),V.createElement(`path`,{fill:`#A4AABA`,d:`M45.3 274s0 1.6-.3 3.1-1.1 3.3-1.2 4.4c0 1.2 4.8 1.6 5.4 0 .7-1.6 1.4-6.8 2-7.6.7-.9-5.1-2.2-5.9.1`}),V.createElement(`path`,{fill:`#7BB2F9`,d:`M89.5 277.6h13.9s1.3-56.6 1.9-66.8c.6-10.3 4-45.1 1-65.6l-13-.7-23.7.8-1.3 10.4c0 .5-.7.9-.8 1.4 0 .6.5 1.4.4 2L59.6 206c-.1.7-1.3 1-1.5 2.8 0 .3.2 1.6.1 1.8-7.1 19.5-12.2 52.6-15.6 67.2h15.1L62 259c3-13.3 24-88.3 24-88.3l3.2-1-.2 48.6s-.2 1.3.4 2.1c.5.8-.6 1.2-.4 2.4l.4 1.8-1 12.4c-.4 4.9 1.2 40.7 1.2 40.7`}),V.createElement(`path`,{stroke:`#648BD8`,d:`M64.6 218.9c1.2 0 4.2-2.1 7.2-5.1m24.2 8.7s3-1.1 6.4-4`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),V.createElement(`path`,{stroke:`#648BD8`,d:`M97 219.4s2.9-1.2 6.3-4`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1`}),V.createElement(`path`,{stroke:`#648BD8`,d:`M63.2 222.1s2.7-.6 6.7-3.5m5-72.4c-.3 3.2.3 8.8-4.5 9.4m22.8-11.3s.1 14.6-1.4 15.7c-2.3 1.7-3 2-3 2m.4-17s.3 13-1 25m-4.7.7s6.8-1 9.1-1M46 270l-.9 4.6m1.8-11.3-.8 4.1m16.6-64.9c-.3 1.6 0 2-.4 3.4 0 0-2.8 2-2.3 4s-.3 3.4-4.5 17.2c-1.8 5.8-4.3 19-6.2 28.3l-1.1 5.8m16-67-1 4.9m8.1-52.3-1.2 10.9s-1.2.1-.5 2.3c0 1.4-2.8 16.4-5.4 31.6m-20 82.1h13.9`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),V.createElement(`path`,{fill:`#192064`,d:`M106.2 142.1c-3-.5-18.8-2.7-36.2.2a.6.6 0 0 0-.6.7v3a.6.6 0 0 0 .8.6c3.3-.5 17-2.4 35.6-.3.4 0 .7-.2.7-.5.2-1.4.2-2.5.2-3a.6.6 0 0 0-.5-.7`}),V.createElement(`path`,{fill:`#FFF`,d:`M96.4 145.3v-5.1a.8.8 0 0 0-.8-.9 114.1 114.1 0 0 0-8.1 0 .8.8 0 0 0-.9.8v5.1c0 .5.4.9.9.9h8a.8.8 0 0 0 .9-.8`}),V.createElement(`path`,{fill:`#192064`,d:`M95.2 144.3v-3.2a.7.7 0 0 0-.6-.7h-6.1a.7.7 0 0 0-.6.7v3.2c0 .4.3.7.6.7h6c.4 0 .7-.3.7-.7`}),V.createElement(`path`,{stroke:`#648BD8`,d:`M90.1 273.5h12.8m-11.7-3.7v6.3m-.3-12.6v4.5m-.5-97.6 1 46.4s.7 1.6-.3 2.8c-.9 1.1 2.6.7 1 2.3-1.7 1.6.9 1.2 0 3.5-.6 1.6-1 22-1.2 36.5`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),V.createElement(`path`,{stroke:`#E4EBF7`,d:`M73.7 98.7 76 103s2 .8 1.8 2.7l.8 2.2m-14.3 8.7c.2-1 2.2-7.1 12.6-10.5m.7-16s7.7 6 16.5 2.7`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),V.createElement(`path`,{fill:`#FFC6A0`,d:`M92 87s5.5-.9 7.5-4.6c1.3-.3.8 2.2-.3 3.7l-1 1.5s.2.3.2.9c0 .6-.2.6-.3 1v1l-.4 1c-.1.2 0 .6-.2.9-.2.4-1.6 1.8-2.6 2.8-3.8 3.6-5 1.7-6-.4-1-1.8-.7-5.1-.9-6.9-.3-2.9-2.6-3-2-4.4.4-.7 3 .7 3.4 1.8.7 2 2.9 1.8 2.6 1.7`}),V.createElement(`path`,{stroke:`#DB836E`,d:`M99.8 82.4c-.5.1-.3.3-1 1.3-.6 1-4.8 2.9-6.4 3.2-2.5.5-2.2-1.6-4.2-2.9-1.7-1-3.6-.6-1.4 1.4 1 1 1 1.1 1.4 3.2.3 1.5-.7 3.7.7 5.6`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`.8`}),V.createElement(`path`,{stroke:`#E59788`,d:`M79.5 108.7c-2 2.9-4.2 6.1-5.5 8.7`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`.8`}),V.createElement(`path`,{fill:`#FFC6A0`,d:`M87.7 124.8s-2-2-5.1-2.8c-3-.7-3.6-.1-5.5.1-2 .3-4-.9-3.7.7.3 1.7 5 1 5.2 2.1.2 1.1-6.3 2.8-8.3 2.2-.8.8.5 1.9 2 2.2.3 1.5 2.3 1.5 2.3 1.5s.7 1 2.6 1.1c2.5 1.3 9-.7 11-1.5 2-.9-.5-5.6-.5-5.6`}),V.createElement(`path`,{stroke:`#E59788`,d:`M73.4 122.8s.7 1.2 3.2 1.4c2.3.3 2.6.6 2.6.6s-2.6 3-9.1 2.3m2.3 2.2s3.8 0 5-.7m-2.4 2.2s2 0 3.3-.6m-1 1.7s1.7 0 2.8-.5m-6.8-9s-.6-1.1 1.3-.5c1.7.5 2.8 0 5.1.1 1.4.1 3-.2 4 .2 1.6.8 3.6 2.2 3.6 2.2s10.6 1.2 19-1.1M79 108s-8.4 2.8-13.2 12.1`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`.8`}),V.createElement(`path`,{stroke:`#E4EBF7`,d:`M109.3 112.5s3.4-3.6 7.6-4.6`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),V.createElement(`path`,{stroke:`#E59788`,d:`M107.4 123s9.7-2.7 11.4-.9`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`.8`}),V.createElement(`path`,{stroke:`#BFCDDD`,d:`m194.6 83.7 4-4M187.2 91l3.7-3.6m.9-3-4.5-4.7m11.2 11.5-4.2-4.3m-65 76.3 3.7-3.7M122.3 170l3.5-3.5m.8-2.9-4.3-4.2M133 170l-4-4`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`}),V.createElement(`path`,{fill:`#A3B4C6`,d:`M190.2 211.8h-1.6a4 4 0 0 1-4-4v-32.1a4 4 0 0 1 4-4h1.6a4 4 0 0 1 4 4v32a4 4 0 0 1-4 4`}),V.createElement(`path`,{fill:`#A3B4C6`,d:`M237.8 213a4.8 4.8 0 0 1-4.8 4.8h-86.6a4.8 4.8 0 0 1 0-9.6H233a4.8 4.8 0 0 1 4.8 4.8`}),V.createElement(`path`,{fill:`#A3B4C6`,d:`M154.1 190.1h70.5v-84.6h-70.5z`}),V.createElement(`path`,{fill:`#BFCDDD`,d:`M225 190.1h-71.2a3.2 3.2 0 0 1-3.2-3.2v-19a3.2 3.2 0 0 1 3.2-3.2h71.1a3.2 3.2 0 0 1 3.2 3.2v19a3.2 3.2 0 0 1-3.2 3.2m0-59.3h-71.1a3.2 3.2 0 0 1-3.2-3.2v-19a3.2 3.2 0 0 1 3.2-3.2h71.1a3.2 3.2 0 0 1 3.2 3.3v19a3.2 3.2 0 0 1-3.2 3.1`}),V.createElement(`path`,{fill:`#FFF`,d:`M159.6 120.5a2.4 2.4 0 1 1 0-4.8 2.4 2.4 0 0 1 0 4.8m7.4 0a2.4 2.4 0 1 1 0-4.8 2.4 2.4 0 0 1 0 4.8m7.4 0a2.4 2.4 0 1 1 0-4.8 2.4 2.4 0 0 1 0 4.8m48.1 0h-22.4a.8.8 0 0 1-.8-.8v-3.2c0-.4.3-.8.8-.8h22.4c.5 0 .8.4.8.8v3.2c0 .5-.3.8-.8.8`}),V.createElement(`path`,{fill:`#BFCDDD`,d:`M225 160.5h-71.2a3.2 3.2 0 0 1-3.2-3.2v-19a3.2 3.2 0 0 1 3.2-3.2h71.1a3.2 3.2 0 0 1 3.2 3.2v19a3.2 3.2 0 0 1-3.2 3.2`}),V.createElement(`path`,{stroke:`#7C90A5`,d:`M173.5 130.8h49.3m-57.8 0h6m-15 0h6.7m11.1 29.8h49.3m-57.7 0h6m-15.8 0h6.7`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),V.createElement(`path`,{fill:`#FFF`,d:`M159.6 151a2.4 2.4 0 1 1 0-4.8 2.4 2.4 0 0 1 0 4.8m7.4 0a2.4 2.4 0 1 1 0-4.8 2.4 2.4 0 0 1 0 4.8m7.4 0a2.4 2.4 0 1 1 0-4.8 2.4 2.4 0 0 1 0 4.8m48.1 0h-22.4a.8.8 0 0 1-.8-.8V147c0-.4.3-.8.8-.8h22.4c.5 0 .8.4.8.8v3.2c0 .5-.3.8-.8.8m-63 29a2.4 2.4 0 1 1 0-4.8 2.4 2.4 0 0 1 0 4.8m7.5 0a2.4 2.4 0 1 1 0-4.8 2.4 2.4 0 0 1 0 4.8m7.4 0a2.4 2.4 0 1 1 0-4.8 2.4 2.4 0 0 1 0 4.8m48.1 0h-22.4a.8.8 0 0 1-.8-.8V176c0-.5.3-.8.8-.8h22.4c.5 0 .8.3.8.8v3.2c0 .4-.3.8-.8.8`}),V.createElement(`path`,{fill:`#BFCDDD`,d:`M203 221.1h-27.3a2.4 2.4 0 0 1-2.4-2.4v-11.4a2.4 2.4 0 0 1 2.4-2.5H203a2.4 2.4 0 0 1 2.4 2.5v11.4a2.4 2.4 0 0 1-2.4 2.4`}),V.createElement(`path`,{stroke:`#A3B4C6`,d:`M177.3 207.2v11.5m23.8-11.5v11.5`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),V.createElement(`path`,{fill:`#5BA02E`,d:`M162.9 267.9a9.4 9.4 0 0 1-9.4-9.4v-14.8a9.4 9.4 0 0 1 18.8 0v14.8a9.4 9.4 0 0 1-9.4 9.4`}),V.createElement(`path`,{fill:`#92C110`,d:`M171.2 267.8a9.4 9.4 0 0 1-9.4-9.4V255a9.4 9.4 0 0 1 18.8 0v3.4a9.4 9.4 0 0 1-9.4 9.4`}),V.createElement(`path`,{fill:`#F2D7AD`,d:`M181.3 293.7h-27.7a3.2 3.2 0 0 1-3.2-3.2v-20.7a3.2 3.2 0 0 1 3.2-3.2h27.7a3.2 3.2 0 0 1 3.2 3.2v20.7a3.2 3.2 0 0 1-3.2 3.2`}))),Zt=e=>{let{componentCls:t,lineHeightHeading3:n,iconCls:r,padding:i,paddingXL:a,paddingXS:o,paddingLG:s,marginXS:c,lineHeight:l}=e;return{[t]:{padding:`${O(e.calc(s).mul(2).equal())} ${O(a)}`,"&-rtl":{direction:`rtl`}},[`${t} ${t}-image`]:{width:e.imageWidth,height:e.imageHeight,margin:`auto`},[`${t} ${t}-icon`]:{marginBottom:s,textAlign:`center`,[`& > ${r}`]:{fontSize:e.iconFontSize}},[`${t} ${t}-title`]:{color:e.colorTextHeading,fontSize:e.titleFontSize,lineHeight:n,marginBlock:c,textAlign:`center`},[`${t} ${t}-subtitle`]:{color:e.colorTextDescription,fontSize:e.subtitleFontSize,lineHeight:l,textAlign:`center`},[`${t} ${t}-content`]:{marginTop:s,padding:`${O(s)} ${O(e.calc(i).mul(2.5).equal())}`,backgroundColor:e.colorFillAlter},[`${t} ${t}-extra`]:{margin:e.extraMargin,textAlign:`center`,"& > *":{marginInlineEnd:o,"&:last-child":{marginInlineEnd:0}}}}},Qt=e=>{let{componentCls:t,iconCls:n}=e;return{[`${t}-success ${t}-icon > ${n}`]:{color:e.resultSuccessIconColor},[`${t}-error ${t}-icon > ${n}`]:{color:e.resultErrorIconColor},[`${t}-info ${t}-icon > ${n}`]:{color:e.resultInfoIconColor},[`${t}-warning ${t}-icon > ${n}`]:{color:e.resultWarningIconColor}}},$t=e=>[Zt(e),Qt(e)],en=e=>$t(e),tn=d(`Result`,e=>{let t=e.colorInfo,n=e.colorError,r=e.colorSuccess,i=e.colorWarning;return[en(_e(e,{resultInfoIconColor:t,resultErrorIconColor:n,resultSuccessIconColor:r,resultWarningIconColor:i,imageWidth:250,imageHeight:295}))]},e=>({titleFontSize:e.fontSizeHeading3,subtitleFontSize:e.fontSize,iconFontSize:e.fontSizeHeading3*3,extraMargin:`${e.paddingLG}px 0 0 0`})),nn=()=>V.createElement(`svg`,{width:`251`,height:`294`},V.createElement(`title`,null,`Unauthorized`),V.createElement(`g`,{fill:`none`,fillRule:`evenodd`},V.createElement(`path`,{fill:`#E4EBF7`,d:`M0 129v-2C0 58.3 55.6 2.7 124.2 2.7h2c68.6 0 124.2 55.6 124.2 124.1v2.1c0 68.6-55.6 124.2-124.1 124.2h-2.1A124.2 124.2 0 0 1 0 129`}),V.createElement(`path`,{fill:`#FFF`,d:`M41.4 133a8.2 8.2 0 1 1-16.4-1.7 8.2 8.2 0 0 1 16.4 1.6`}),V.createElement(`path`,{stroke:`#FFF`,d:`m38.7 136.4 10.4 5.9m.9 6.2-12.6 10.7`,strokeWidth:`2`}),V.createElement(`path`,{fill:`#FFF`,d:`M41.5 161.3a5.6 5.6 0 1 1-11.2-1.2 5.6 5.6 0 0 1 11.2 1.2m17.7-16a5.7 5.7 0 1 1-11.3-1.2 5.7 5.7 0 0 1 11.3 1.2m41.2-115.8H130a4.6 4.6 0 1 0 0-9.1h-29.6a4.6 4.6 0 0 0 0 9.1m11.3 18.3h29.7a4.6 4.6 0 1 0 0-9.2h-29.7a4.6 4.6 0 1 0 0 9.2`}),V.createElement(`path`,{fill:`#FFF`,d:`M114 29.5h15.8a4.6 4.6 0 1 0 0 9.1H114a4.6 4.6 0 0 0 0-9.1m71.3 108.2a10 10 0 1 1-19.8-2 10 10 0 0 1 19.8 2`}),V.createElement(`path`,{stroke:`#FFF`,d:`m180.2 143.8 12.5 7.1m1.1 7.5-15.1 13`,strokeWidth:`2`}),V.createElement(`path`,{fill:`#FFF`,d:`M185.6 172a6.8 6.8 0 1 1-13.6-1.4 6.8 6.8 0 0 1 13.5 1.3m18.6-16.6a6.8 6.8 0 1 1-13.6-1.4 6.8 6.8 0 0 1 13.6 1.4`}),V.createElement(`path`,{stroke:`#FFF`,d:`M153 194a2.2 2.2 0 1 1-4.4 0 2.2 2.2 0 0 1 4.4 0zm73-75.8a2.2 2.2 0 1 1-4.5 0 2.2 2.2 0 0 1 4.4 0zm-9 34.9a2.2 2.2 0 1 1-4.3 0 2.2 2.2 0 0 1 4.4 0zm-39.2-43.3a2.2 2.2 0 1 1-4.4 0 2.2 2.2 0 0 1 4.4 0zm18.3-15.3a2.2 2.2 0 1 1-4.4 0 2.2 2.2 0 0 1 4.4 0zm6.7 88a2.2 2.2 0 1 1-4.4 0 2.2 2.2 0 0 1 4.4 0z`,strokeWidth:`2`}),V.createElement(`path`,{stroke:`#FFF`,d:`m215.1 155.3-1.9 20-10.8 6m-27.8-4.7-6.3 9.8H157l-4.5 6.4m23.4-65.5v-15.7m45.6 7.8-12.8 7.9-15.2-7.9V96.7`,strokeWidth:`2`}),V.createElement(`path`,{fill:`#A26EF4`,d:`M180.7 29.3a29.3 29.3 0 1 1 58.6 0 29.3 29.3 0 0 1-58.6 0`}),V.createElement(`path`,{fill:`#FFF`,d:`m221.4 41.7-21.5-.1a1.7 1.7 0 0 1-1.7-1.8V27.6a1.7 1.7 0 0 1 1.8-1.7h21.5c1 0 1.8.9 1.8 1.8l-.1 12.3a1.7 1.7 0 0 1-1.7 1.7`}),V.createElement(`path`,{fill:`#FFF`,d:`M215.1 29.2c0 2.6-2 4.6-4.5 4.6a4.6 4.6 0 0 1-4.5-4.7v-6.9c0-2.6 2-4.6 4.6-4.6 2.5 0 4.5 2 4.4 4.7v6.9zm-4.5-14a6.9 6.9 0 0 0-7 6.8v7.3a6.9 6.9 0 0 0 13.8.1V22a6.9 6.9 0 0 0-6.8-6.9zm-43 53.2h-4a4.7 4.7 0 0 1-4.7-4.8 4.7 4.7 0 0 1 4.7-4.7h4a4.7 4.7 0 0 1 4.7 4.8 4.7 4.7 0 0 1-4.7 4.7`}),V.createElement(`path`,{fill:`#5BA02E`,d:`M168.2 248.8a6.6 6.6 0 0 1-6.6-6.6v-66a6.6 6.6 0 0 1 13.2 0v66a6.6 6.6 0 0 1-6.6 6.6`}),V.createElement(`path`,{fill:`#92C110`,d:`M176.1 248.2a6.6 6.6 0 0 1-6.6-6.6v-33a6.6 6.6 0 1 1 13.3 0v33a6.6 6.6 0 0 1-6.7 6.6`}),V.createElement(`path`,{fill:`#F2D7AD`,d:`M186 293.9h-27.4a3.2 3.2 0 0 1-3.2-3.2v-45.9a3.2 3.2 0 0 1 3.2-3.1H186a3.2 3.2 0 0 1 3.2 3.1v46a3.2 3.2 0 0 1-3.2 3`}),V.createElement(`path`,{fill:`#FFF`,d:`M82 147.7s6.3-1 17.5-1.3c11.8-.4 17.6 1 17.6 1s3.7-3.8 1-8.3c1.3-12.1 6-32.9.3-48.3-1.1-1.4-3.7-1.5-7.5-.6-1.4.3-7.2-.2-8-.1l-15.3-.4-8-.5c-1.6-.1-4.3-1.7-5.5-.3-.4.4-2.4 5.6-2 16l8.7 35.7s-3.2 3.6 1.2 7`}),V.createElement(`path`,{fill:`#FFC6A0`,d:`m75.8 73.3-1-6.4 12-6.5s7.4-.1 8 1.2c.8 1.3-5.5 1-5.5 1s-1.9 1.4-2.6 2.5c-1.7 2.4-1 6.5-8.4 6-1.7.3-2.5 2.2-2.5 2.2`}),V.createElement(`path`,{fill:`#FFB594`,d:`M52.4 77.7S66.7 87 77.4 92c1 .5-2 16.2-11.9 11.8-7.4-3.3-20.1-8.4-21.5-14.5-.7-3.2 2.6-7.6 8.4-11.7M142 80s-6.7 3-13.9 6.9c-3.9 2.1-10.1 4.7-12.3 8-6.2 9.3 3.5 11.2 13 7.5 6.6-2.7 29-12.1 13.2-22.4`}),V.createElement(`path`,{fill:`#FFC6A0`,d:`m76.2 66.4 3 3.8S76.4 73 73 76c-7 6.2-12.8 14.3-16 16.4-4 2.7-9.7 3.3-12.2 0-3.5-5.1.5-14.7 31.5-26`}),V.createElement(`path`,{fill:`#FFF`,d:`M64.7 85.1s-2.4 8.4-9 14.5c.7.5 18.6 10.5 22.2 10 5.2-.6 6.4-19 1.2-20.5-.8-.2-6-1.3-8.9-2.2-.9-.2-1.6-1.7-3.5-1l-2-.8zm63.7.7s5.3 2 7.3 13.8c-.6.2-17.6 12.3-21.8 7.8-6.6-7-.8-17.4 4.2-18.6 4.7-1.2 5-1.4 10.3-3`}),V.createElement(`path`,{stroke:`#E4EBF7`,d:`M78.2 94.7s.9 7.4-5 13`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),V.createElement(`path`,{stroke:`#E4EBF7`,d:`M87.4 94.7s3.1 2.6 10.3 2.6c7.1 0 9-3.5 9-3.5`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`.9`}),V.createElement(`path`,{fill:`#FFC6A0`,d:`m117.2 68.6-6.8-6.1s-5.4-4.4-9.2-1c-3.9 3.5 4.4 2.2 5.6 4.2 1.2 2.1.9 1.2-2 .5-5.7-1.4-2.1.9 3 5.3 2 1.9 7 1 7 1l2.4-3.9z`}),V.createElement(`path`,{fill:`#FFB594`,d:`m105.3 91.3-.3-11H89l-.5 10.5c0 .4.2.8.6 1 2 1.3 9.3 5 15.8.4.2-.2.4-.5.4-.9`}),V.createElement(`path`,{fill:`#5C2552`,d:`M107.6 74.2c.8-1.1 1-9 1-11.9a1 1 0 0 0-1-1l-4.6-.4c-7.7-1-17 .6-18.3 6.3-5.4 5.9-.4 13.3-.4 13.3s2 3.5 4.3 6.8c.8 1 .4-3.8 3-6a47.9 47.9 0 0 1 16-7`}),V.createElement(`path`,{fill:`#FFC6A0`,d:`M88.4 83.2s2.7 6.2 11.6 6.5c7.8.3 9-7 7.5-17.5l-1-5.5c-6-2.9-15.4.6-15.4.6s-.6 2-.2 5.5c-2.3 2-1.8 5.6-1.8 5.6s-1-2-2-2.3c-.9-.3-2 0-2.3 2-1 4.6 3.6 5.1 3.6 5.1`}),V.createElement(`path`,{stroke:`#DB836E`,d:`m100.8 77.1 1.7-1-1-4.3.7-1.4`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),V.createElement(`path`,{fill:`#552950`,d:`M105.5 74c0 .8-.4 1.4-1 1.4-.4 0-.8-.7-.8-1.4s.5-1.2 1-1.2.9.6.8 1.3m-8 .2c0 .8-.4 1.3-.9 1.3s-.9-.6-.9-1.3c0-.7.5-1.3 1-1.3s1 .6.9 1.3`}),V.createElement(`path`,{stroke:`#DB836E`,d:`M91.1 86.8s5.3 5 12.7 2.3`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),V.createElement(`path`,{fill:`#DB836E`,d:`M99.8 81.9s-3.6.2-1.5-2.8c1.6-1.5 5-.4 5-.4s1 3.9-3.5 3.2`}),V.createElement(`path`,{stroke:`#5C2552`,d:`M102.9 70.6s2.5.8 3.4.7m-12.4.7s2.5-1.2 4.8-1.1`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`}),V.createElement(`path`,{stroke:`#DB836E`,d:`M86.3 77.4s1 .9 1.5 2c-.4.6-1 1.2-.3 1.9m11.8 2.4s2 .2 2.5-.2`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),V.createElement(`path`,{stroke:`#E4EBF7`,d:`m87.8 115.8 15.7-3m-3.3 3 10-2m-43.7-27s-1.6 8.8-6.7 14M128.3 88s3 4 4 11.7`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),V.createElement(`path`,{stroke:`#DB836E`,d:`M64 84.8s-6 10-13.5 10`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`.8`}),V.createElement(`path`,{fill:`#FFC6A0`,d:`m112.4 66-.2 5.2 12 9.2c4.5 3.6 8.9 7.5 11 8.7 4.8 2.8 8.9 3.3 11 1.8 4.1-2.9 4.4-9.9-8.1-15.3-4.3-1.8-16.1-6.3-25.7-9.7`}),V.createElement(`path`,{stroke:`#DB836E`,d:`M130.5 85.5s4.6 5.7 11.7 6.2`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`.8`}),V.createElement(`path`,{stroke:`#E4EBF7`,d:`M121.7 105.7s-.4 8.6-1.3 13.6`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),V.createElement(`path`,{stroke:`#648BD8`,d:`M115.8 161.5s-3.6-1.5-2.7-7.1`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),V.createElement(`path`,{fill:`#CBD1D1`,d:`M101.5 290.2s4.3 2.1 7.4 1c2.9-.9 4.6.7 7.2 1.3 2.5.5 6.9 1 11.7-1.3 0-5.6-7-4-12-6.8-2.6-1.4-3.8-4.7-3.6-8.8h-9.5s-1.4 10.6-1.2 14.6`}),V.createElement(`path`,{fill:`#2B0849`,d:`M101.5 290s2.4 1.4 6.8.7c3-.4 3.7.5 7.5 1 3.7.6 10.8 0 11.9-.8.4 1-.4 2-.4 2s-1.5.7-4.8.9c-2 .1-5.8.3-7.7-.5-1.8-1.4-5.2-2-5.7-.3-4 1-7.4-.3-7.4-.3l-.2-2.6z`}),V.createElement(`path`,{fill:`#A4AABA`,d:`M108.8 276.2h3.1s0 6.7 4.6 8.6c-4.7.6-8.6-2.3-7.7-8.6`}),V.createElement(`path`,{fill:`#CBD1D1`,d:`M57.6 272.5s-2 7.5-4.5 12.4c-1.8 3.7-4.2 7.6 5.5 7.6 6.7 0 9-.5 7.5-6.7-1.5-6.1.3-13.3.3-13.3h-8.8z`}),V.createElement(`path`,{fill:`#2B0849`,d:`M51.5 290s2.2 1.2 6.7 1.2c6.1 0 8.3-1.6 8.3-1.6s.6 1-.6 2.1c-1 .9-3.6 1.6-7.4 1.6-4.2 0-6-.6-6.8-1.2-.9-.5-.7-1.6-.2-2`}),V.createElement(`path`,{fill:`#A4AABA`,d:`M58.5 274.4s0 1.6-.3 3-1 3.1-1.1 4.2c0 1.1 4.5 1.5 5.2 0 .6-1.6 1.3-6.5 1.9-7.3.6-.8-5-2.1-5.7.1`}),V.createElement(`path`,{fill:`#7BB2F9`,d:`m100.9 277 13.3.1s1.3-54.2 1.8-64c.6-9.9 3.8-43.2 1-62.8l-12.4-.7-22.8.8-1.2 10c0 .4-.6.8-.7 1.3 0 .6.4 1.3.3 2-2.3 14-6.3 32.9-8.7 46.4-.1.6-1.2 1-1.4 2.6 0 .3.2 1.6 0 1.8-6.8 18.7-10.8 47.6-14.1 61.6h14.5s2.2-8.6 4-17a3984 3984 0 0 1 23-84.5l3-.5 1 46.1s-.2 1.2.4 2c.5.8-.6 1.1-.4 2.3l.4 1.7-1 11.9c-.4 4.6 0 39 0 39`}),V.createElement(`path`,{stroke:`#648BD8`,d:`M77.4 220.4c1.2.1 4-2 7-4.9m23.1 8.4s2.8-1 6.1-3.8`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),V.createElement(`path`,{stroke:`#648BD8`,d:`M108.5 221s2.7-1.2 6-4`,strokeLinecap:`round`,strokeLinejoin:`round`}),V.createElement(`path`,{stroke:`#648BD8`,d:`M76.1 223.6s2.6-.6 6.5-3.4m4.7-69.4c-.2 3.1.3 8.5-4.3 9m21.8-10.7s.1 14-1.3 15c-2.2 1.6-3 1.9-3 1.9m.5-16.4s0 12.8-1.2 24.3m-4.9 1s7.2-1.6 9.4-1.6m-28.6 31.5-1 4.5s-1.5 1.8-1 3.7c.4 2-1 2-5 15.3-1.7 5.6-4.4 18.5-6.3 27.5l-4 18.4M77 196.7a313.3 313.3 0 0 1-.8 4.8m7.7-50-1.2 10.3s-1 .2-.5 2.3c.1 1.3-2.6 15.6-5.1 30.2M57.6 273h13.2`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}),V.createElement(`path`,{fill:`#192064`,d:`M117.4 147.4s-17-3-35.7.2v4.2s14.6-2.9 35.5-.4l.2-4`}),V.createElement(`path`,{fill:`#FFF`,d:`M107.5 150.4v-5a.8.8 0 0 0-.8-.7H99a.8.8 0 0 0-.7.8v4.8c0 .5.3.9.8.8a140.8 140.8 0 0 1 7.7 0 .8.8 0 0 0 .8-.7`}),V.createElement(`path`,{fill:`#192064`,d:`M106.4 149.4v-3a.6.6 0 0 0-.6-.7 94.1 94.1 0 0 0-5.8 0 .6.6 0 0 0-.7.7v3c0 .4.3.7.7.7h5.7c.4 0 .7-.3.7-.7`}),V.createElement(`path`,{stroke:`#648BD8`,d:`M101.5 274h12.3m-11.1-5v6.5m0-12.4v4.3m-.5-93.4.9 44.4s.7 1.6-.2 2.7c-1 1.1 2.4.7.9 2.2-1.6 1.6.9 1.1 0 3.4-.6 1.5-1 21-1.1 35`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.1`}))),rn={success:T,error:g,info:u,warning:Jt},an={404:Yt,500:Xt,403:nn},on=Object.keys(an),sn=({prefixCls:e,icon:t,status:n})=>{let r=(0,B.default)(`${e}-icon`);if(on.includes(`${n}`)){let t=an[n];return V.createElement(`div`,{className:`${r} ${e}-image`},V.createElement(t,null))}let i=V.createElement(rn[n]);return t===null||t===!1?null:V.createElement(`div`,{className:r},t||i)},cn=({prefixCls:e,extra:t})=>t?V.createElement(`div`,{className:`${e}-extra`},t):null,ln=({prefixCls:e,className:t,rootClassName:n,subTitle:r,title:i,style:a,children:o,status:s=`info`,icon:c,extra:l})=>{let{getPrefixCls:u,direction:d,result:f}=V.useContext(he),p=u(`result`,e),[m,h,g]=tn(p),_=(0,B.default)(p,`${p}-${s}`,t,f?.className,n,{[`${p}-rtl`]:d===`rtl`},h,g),v=Object.assign(Object.assign({},f?.style),a);return m(V.createElement(`div`,{className:_,style:v},V.createElement(sn,{prefixCls:p,status:s,icon:c}),V.createElement(`div`,{className:`${p}-title`},i),r&&V.createElement(`div`,{className:`${p}-subtitle`},r),V.createElement(cn,{prefixCls:p,extra:l}),o&&V.createElement(`div`,{className:`${p}-content`},o)))};ln.PRESENTED_IMAGE_403=an[403],ln.PRESENTED_IMAGE_404=an[404],ln.PRESENTED_IMAGE_500=an[500];var U=Ke,un={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z`}}]},name:`delete`,theme:`outlined`},dn=V.forwardRef(function(e,n){return V.createElement(F,t({},e,{ref:n,icon:un}))}),fn={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M899.1 869.6l-53-305.6H864c14.4 0 26-11.6 26-26V346c0-14.4-11.6-26-26-26H618V138c0-14.4-11.6-26-26-26H432c-14.4 0-26 11.6-26 26v182H160c-14.4 0-26 11.6-26 26v192c0 14.4 11.6 26 26 26h17.9l-53 305.6a25.95 25.95 0 0025.6 30.4h723c1.5 0 3-.1 4.4-.4a25.88 25.88 0 0021.2-30zM204 390h272V182h72v208h272v104H204V390zm468 440V674c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v156H416V674c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v156H202.8l45.1-260H776l45.1 260H672z`}}]},name:`clear`,theme:`outlined`},pn=V.forwardRef(function(e,n){return V.createElement(F,t({},e,{ref:n,icon:fn}))}),mn={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M811.4 368.9C765.6 248 648.9 162 512.2 162S258.8 247.9 213 368.8C126.9 391.5 63.5 470.2 64 563.6 64.6 668 145.6 752.9 247.6 762c4.7.4 8.7-3.3 8.7-8v-60.4c0-4-3-7.4-7-7.9-27-3.4-52.5-15.2-72.1-34.5-24-23.5-37.2-55.1-37.2-88.6 0-28 9.1-54.4 26.2-76.4 16.7-21.4 40.2-36.9 66.1-43.7l37.9-10 13.9-36.7c8.6-22.8 20.6-44.2 35.7-63.5 14.9-19.2 32.6-36 52.4-50 41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.3c19.9 14 37.5 30.8 52.4 50 15.1 19.3 27.1 40.7 35.7 63.5l13.8 36.6 37.8 10c54.2 14.4 92.1 63.7 92.1 120 0 33.6-13.2 65.1-37.2 88.6-19.5 19.2-44.9 31.1-71.9 34.5-4 .5-6.9 3.9-6.9 7.9V754c0 4.7 4.1 8.4 8.8 8 101.7-9.2 182.5-94 183.2-198.2.6-93.4-62.7-172.1-148.6-194.9z`}},{tag:`path`,attrs:{d:`M376.9 656.4c1.8-33.5 15.7-64.7 39.5-88.6 25.4-25.5 60-39.8 96-39.8 36.2 0 70.3 14.1 96 39.8 1.4 1.4 2.7 2.8 4.1 4.3l-25 19.6a8 8 0 003 14.1l98.2 24c5 1.2 9.9-2.6 9.9-7.7l.5-101.3c0-6.7-7.6-10.5-12.9-6.3L663 532.7c-36.6-42-90.4-68.6-150.5-68.6-107.4 0-195 85.1-199.4 191.7-.2 4.5 3.4 8.3 8 8.3H369c4.2-.1 7.7-3.4 7.9-7.7zM703 664h-47.9c-4.2 0-7.7 3.3-8 7.6-1.8 33.5-15.7 64.7-39.5 88.6-25.4 25.5-60 39.8-96 39.8-36.2 0-70.3-14.1-96-39.8-1.4-1.4-2.7-2.8-4.1-4.3l25-19.6a8 8 0 00-3-14.1l-98.2-24c-5-1.2-9.9 2.6-9.9 7.7l-.4 101.4c0 6.7 7.6 10.5 12.9 6.3l23.2-18.2c36.6 42 90.4 68.6 150.5 68.6 107.4 0 195-85.1 199.4-191.7.2-4.5-3.4-8.3-8-8.3z`}}]},name:`cloud-sync`,theme:`outlined`},hn=V.forwardRef(function(e,n){return V.createElement(F,t({},e,{ref:n,icon:mn}))}),gn={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M820 436h-40c-4.4 0-8 3.6-8 8v40c0 4.4 3.6 8 8 8h40c4.4 0 8-3.6 8-8v-40c0-4.4-3.6-8-8-8zm32-104H732V120c0-4.4-3.6-8-8-8H300c-4.4 0-8 3.6-8 8v212H172c-44.2 0-80 35.8-80 80v328c0 17.7 14.3 32 32 32h168v132c0 4.4 3.6 8 8 8h424c4.4 0 8-3.6 8-8V772h168c17.7 0 32-14.3 32-32V412c0-44.2-35.8-80-80-80zM360 180h304v152H360V180zm304 664H360V568h304v276zm200-140H732V500H292v204H160V412c0-6.6 5.4-12 12-12h680c6.6 0 12 5.4 12 12v292z`}}]},name:`printer`,theme:`outlined`},_n=V.forwardRef(function(e,n){return V.createElement(F,t({},e,{ref:n,icon:gn}))}),W=ee();function vn({children:e,label:t=`查看说明`}){return(0,W.jsx)(Ae,{title:e,trigger:[`hover`,`focus`,`click`],placement:`top`,children:(0,W.jsx)(`span`,{className:`help-icon`,role:`button`,tabIndex:0,"aria-label":t,children:(0,W.jsx)(Ge,{})})})}function yn(){return(0,W.jsxs)(`span`,{className:`internal-tag`,children:[(0,W.jsx)(qe,{"aria-hidden":`true`}),` 内部 · 客户不可见`]})}function G({label:e,field:t,hint:n,help:r,hidden:i,className:a,span:o,id:s,labelId:c,children:l}){if(i)return null;let u=(0,W.jsxs)(`div`,{className:`field `+(a||``),"data-field":t,children:[(0,W.jsxs)(`div`,{className:`field-label-row`,children:[(0,W.jsx)(`label`,{className:`field-label`,htmlFor:s,id:c,children:e}),r?(0,W.jsx)(vn,{children:r}):null]}),l,n?(0,W.jsx)(`div`,{className:`field-hint`,children:n}):null]});return o?(0,W.jsx)(Pt,{...o,children:u}):u}var bn=e=>typeof e.label==`string`?e.label:e.field;function K({value:e,onChange:t,numeric:n,readOnly:r,disabled:i,placeholder:a,maxLength:o,type:s,...c}){let l=(0,V.useId)();return(0,W.jsx)(G,{...c,id:l,children:(0,W.jsx)(z,{id:l,name:c.field,"aria-label":bn(c),value:e,type:s,inputMode:n?`decimal`:void 0,autoComplete:`off`,readOnly:r,disabled:i,placeholder:a,maxLength:o,className:(r?`readonly-input`:``)+(n?` num`:``),onChange:e=>t?.(e.target.value)})})}function q({value:e,options:t,onChange:n,disabled:r,placeholder:i,...a}){let o=(0,V.useId)();return(0,W.jsx)(G,{...a,id:o,children:(0,W.jsx)(Ze,{id:o,"aria-label":bn(a),value:e===``&&i?void 0:e,placeholder:i,disabled:r,popupMatchSelectWidth:!1,options:t.map(([e,t,n])=>({value:e,label:t,disabled:!!n,title:t})),onChange:n,getPopupContainer:()=>document.body})})}function J({value:e,options:t,onChange:n,disabled:r,...i}){let a=(0,V.useId)();return(0,W.jsx)(G,{...i,labelId:a,children:(0,W.jsx)(Ye.Group,{value:e,disabled:r,optionType:`button`,buttonStyle:`solid`,block:!0,role:`radiogroup`,"aria-labelledby":a,onChange:e=>n(e.target.value),options:t.map(([e,t,n])=>({value:e,label:t,disabled:!!n}))})})}var Y={xs:24,sm:12,xl:6},X={xs:12,sm:12,xl:6},Z={xs:24,sm:12,xl:8},xn={xs:24,md:12};function Sn({id:e,step:t,title:n,help:r,extra:i,internal:a,className:o,testId:s,children:c}){return(0,W.jsx)(tt,{id:e,className:`panel`+(a?` panel-internal`:``)+(o?` `+o:``),"data-testid":s,title:(0,W.jsxs)(`div`,{className:`section-title`,children:[(0,W.jsx)(`span`,{className:`step-no`,"aria-hidden":`true`,children:t}),(0,W.jsx)(`h2`,{children:n}),r?(0,W.jsx)(vn,{label:`关于`+(typeof n==`string`?n:`本区`),children:r}):null,a?(0,W.jsx)(yn,{}):null]}),extra:i,children:c})}function Cn({form:e,state:t,paperNumber:n,update:r}){let i=e=>t=>r(n=>({...n,[e]:t})),a=L.teamMode(t),o=e.payment.method===`信用卡`;return(0,W.jsx)(Sn,{id:`section-customer`,step:`01`,title:`客户与单据`,help:`生成单据即按成交合计记录全额收款,同时按所选货盘扣减黄金库存并计入实际利润。请核对商品已交付,选择实际收款方式与收款人;业务日期作为收款和出库日期。`,extra:(0,W.jsxs)(`span`,{className:`section-extra`,children:[(0,W.jsx)(hn,{"aria-hidden":`true`}),` `,e.id?`补齐原草稿,生成销售单据后完成记账`:`填写内容自动暂存,生成单据即完成记账`]}),children:(0,W.jsxs)(U,{gutter:[16,14],children:[(0,W.jsx)(K,{span:X,label:`业务日期`,field:`date`,type:`date`,value:e.date,onChange:i(`date`)}),(0,W.jsx)(K,{span:X,label:`纸单编号(自动)`,field:`paper_number`,value:n,readOnly:!0,help:`前半段为业务日期,后半段序号持续累计,中间不加横线,换日期不归零;生成时分配。`}),(0,W.jsx)(K,{span:Y,label:`客户称呼/代号(必填)`,field:`customer`,value:e.customer,maxLength:60,placeholder:`方便找回订单即可`,onChange:i(`customer`)}),(0,W.jsx)(J,{span:Y,label:`客户类型`+(e.customerTypeRequired?`(必选)`:``),field:`customer_type`,value:e.customer_type,options:[[`new`,`新客户`],[`returning`,`老客户`]],onChange:i(`customer_type`)}),(0,W.jsx)(K,{span:X,label:`开单人(必填)`,field:`salesperson`,value:e.salesperson,maxLength:30,onChange:i(`salesperson`)}),a&&(e.memberLocked?(0,W.jsx)(K,{span:X,label:`订单归属(经营款与业绩)`,field:`member`,value:L.memberName(t,e.member),readOnly:!0}):(0,W.jsx)(q,{span:X,label:`订单归属(经营款与业绩)`,field:`member`,value:e.member,options:L.memberOptions(t),onChange:e=>r(n=>L.changeMember(n,e,t))})),(0,W.jsx)(J,{span:Y,label:`收款方式`,field:`payment_method`,value:e.payment.method,options:L.paymentMethods(t).map(e=>[e,e]),onChange:e=>r(t=>({...t,payment:{...t.payment,method:e}}))}),(0,W.jsx)(q,{span:Y,label:`收款人`,field:`payment_recipient`,value:e.payment.recipient,disabled:o,options:L.recipientOptions(t,e.payment),hint:o&&L.creditCardAvailable(t)?`信用卡统一由${L.memberName(t,`owner`)}收款。`:void 0,onChange:e=>r(t=>({...t,payment:{...t.payment,recipient:e}}))})]})})}function wn(e,t,n){if(!e.purchase||!e.pool)throw Error(`旧版未分项成本请先拆分,再选择退回现货。`);let r=e.returnedStockOriginal??{nameType:e.nameType,customName:e.customName,unit:e.unit,quantity:e.quantity,pocket:e.pocket,stockCount:e.stockCount,purchase:e.purchase,pool:e.pool},i=t.effectivePoolId||n,a=L.productNames.includes(t.name)?t.name:`其他`;return{...e,returnedStockId:t.id,returnedStockCode:t.code||``,returnedStockLot:t,returnedStockOriginal:r,nameType:a,customName:a===`其他`?t.name:``,unit:`g`,quantity:it(t.remainingMg),pocket:t.pocket,stockCount:String(t.remainingCount??t.stockCount??``),purchase:{...e.purchase,laborMode:`total`,laborRate:``,labor:(t.laborCost/100).toFixed(2),laborPayer:t.laborPayer},pool:{...e.pool,poolId:i,dataPoolId:i,source:`pool`,preferredSource:`pool`,defaultDate:!1}}}function Tn(e){let t=e.returnedStockOriginal,n={...e};if(delete n.returnedStockId,delete n.returnedStockCode,delete n.returnedStockLot,delete n.returnedStockOriginal,!t||!n.purchase||!n.pool)return n;let{purchase:r,pool:i,...a}=t;return{...n,...a,purchase:{...n.purchase,laborMode:r.laborMode,laborRate:r.laborRate,labor:r.labor,laborPayer:r.laborPayer},pool:{...n.pool,poolId:i.poolId,dataPoolId:i.dataPoolId,source:i.source,defaultDate:i.defaultDate,preferredSource:i.preferredSource}}}function En(e,t,n,r){let[i,a]=(0,V.useState)(0),[o,s]=(0,V.useState)(null),c=t.date,l=t.member||L.currentMember(n),u=`/api/returned-stock-lots?`+new URLSearchParams({member:l,date:c});(0,V.useEffect)(()=>{if(!e)return;let t=!0;async function i(){try{let i=await e.api(u);if(!Array.isArray(i?.lots)||i.lots.some(e=>typeof e.id!=`string`||!Number.isSafeInteger(e.remainingMg)||!Number.isSafeInteger(e.laborCost)||!L.memberKeys(n).includes(e.laborPayer)))throw Error(`售后退回现货列表未完整返回。`);if(!t)return;s(null),r(e=>({...e,returnedLots:{member:l,date:c,lots:i.lots},lines:e.lines.map(e=>{let t=e.returnedStockId&&i.lots.find(t=>t.id===e.returnedStockId&&L.canUseReturnedLot(t,n,c));return t&&!e.legacy?wn(e,t,c):e})}))}catch(e){t&&(s({url:u,message:e.message}),r(e=>({...e,returnedLots:void 0})))}}return i(),()=>{t=!1}},[e,u,c,l,n,r,i]);let d=(0,V.useCallback)(()=>a(e=>e+1),[]);return{error:o?.url===u?o.message:``,reload:d}}function Dn({form:e,index:t,state:n,update:r,error:i,reload:a,onError:o}){let s=e.lines[t],c=e.returnedLots,l=c?.date===e.date&&c.member===(e.member||L.currentMember(n))?c.lots.filter(t=>L.canUseReturnedLot(t,n,e.date)):[],u=l.find(e=>e.id===s.returnedStockId),d=new Set(e.lines.filter((e,n)=>n!==t).map(e=>e.returnedStockId));function f(e){try{if(!e)return r(e=>L.updateLine(e,t,Tn(e.lines[t])));let n=l.find(t=>t.id===e);if(!n)throw Error(`这件退回现货已不可用,请刷新页面后重新核对。`);if(d.has(e))throw Error(`同一件售后退回现货不能重复开单。`);r(e=>L.updateLine(e,t,wn(e.lines[t],n,e.date)))}catch(e){o(e.message)}}return(0,W.jsxs)(`div`,{className:`returned-stock-choice`,"data-returned-stock-choice":!0,hidden:!i&&!l.length&&!s.returnedStockId,children:[(0,W.jsxs)(`label`,{children:[`售后退回现货(已有工费)`,(0,W.jsxs)(`select`,{name:`returnedStockId`,value:s.returnedStockId||``,onChange:e=>f(e.target.value),children:[(0,W.jsx)(`option`,{value:``,children:`普通现货/本次新采购`}),l.map(e=>(0,W.jsxs)(`option`,{value:e.id,disabled:d.has(e.id),children:[e.date,` · `,e.name,` · `,it(e.remainingMg),`g`,e.remainingCount!=null&&` · `+e.remainingCount+`对`,` `,`· 已有工费 ¥`,rt(e.laborCost)]},e.id)),s.returnedStockId&&!u&&(0,W.jsx)(`option`,{disabled:!0,value:s.returnedStockId,children:`原退回现货已无可用库存,请重新选择`})]})]}),(0,W.jsx)(`p`,{"data-returned-stock-note":!0,children:i?i+` 如本次销售售后退回现货,请刷新列表后选择对应批次。`:u?`本件已有进货工费 ¥`+rt(u.laborCost)+`,沿用`+L.memberName(n,u.laborPayer)+`原付款来源,不新增付款。按原克重整批出库。`+(u.materialPoolNotice||`料费按本单使用的料池计算。`):`选择对应退回现货后,沿用原工费和付款来源,不重复登记工费付款。`}),(0,W.jsx)(P,{"data-action":`order-after-sale-reload-stock`,onClick:a,children:`刷新退回现货`})]})}function On({index:e,line:t,update:n}){let r=(t,r)=>n(n=>{let i=n.lines[e];return L.updateLine(n,e,{...i,charges:i.charges.map((e,n)=>n===t?r(e):e)})});return(0,W.jsxs)(`div`,{className:`sale-charges`,children:[(0,W.jsxs)(`div`,{className:`sub-title`,children:[(0,W.jsxs)(`div`,{className:`sub-title-text`,children:[(0,W.jsx)(`strong`,{children:`工费附加项目`}),(0,W.jsx)(`span`,{className:`small muted`,children:`选填 · 编绳、证书、包装、快递`}),(0,W.jsx)(vn,{label:`关于工费附加项目`,children:`向客户收费预填:编绳55元、证书10元、包装10元、快递8元,均可修改;按填写金额自动加进本行销售额。`})]}),(0,W.jsx)(P,{size:`small`,icon:(0,W.jsx)(et,{}),"data-action":`add-charge`,onClick:()=>n(t=>L.addCharge(t,e,R)),children:`添加附加项目`})]}),t.charges.length>0&&(0,W.jsx)(`div`,{className:`charge-list`,children:t.charges.map((t,i)=>(0,W.jsxs)(`div`,{className:`charge-row`,"data-charge":i,children:[(0,W.jsx)(q,{label:`附加项目`,field:`chargeType`,value:t.type,options:[...L.chargeNames,`其他`].map(e=>[e,e]),onChange:e=>r(i,t=>L.changeChargeType(t,e))}),(0,W.jsx)(K,{label:`附加项目名称`,field:`chargeName`,hidden:t.type!==`其他`,value:t.customName??``,maxLength:40,onChange:e=>r(i,t=>({...t,customName:e}))}),(0,W.jsx)(K,{label:`附加金额(元)`,field:`chargeAmount`,numeric:!0,value:t.amount,placeholder:`没有收费填0,可修改金额`,onChange:e=>r(i,t=>L.setChargeAmount(t,e))}),(0,W.jsxs)(`div`,{className:`charge-actions`,children:[(0,W.jsx)(P,{type:`text`,size:`small`,icon:(0,W.jsx)(m,{}),"data-action":`remove-charge`,onClick:()=>n(t=>{let n=t.lines[e];return L.updateLine(t,e,{...n,charges:n.charges.filter((e,t)=>t!==i)})}),children:`移除附加项`}),t.costRemoved&&(0,W.jsxs)(`small`,{className:`muted`,children:[`内部成本已移除`,` `,(0,W.jsx)(P,{type:`link`,size:`small`,"data-action":`restore-charge-cost`,onClick:()=>n(t=>L.restoreChargeCost(t,e,i)),children:`恢复内部成本`})]})]})]},t.id))})]})}function kn({index:e,line:t,state:n,update:r,onReloadPools:i}){let a=L.lineVisibility(t,n),o=t=>r(n=>L.updateLine(n,e,t(n.lines[e]))),s=e=>t=>o(n=>L.setPurchaseField(n,e,t)),c=L.memberOptions(n),l=t.purchase,u=t.pool?.source===`pool`,d=e=>L.memberKeys(n).includes(e)?L.memberOptions(n,!1,{selected:e}):c;return(0,W.jsxs)(`div`,{className:`internal`,children:[(0,W.jsxs)(`div`,{className:`internal-title`,children:[(0,W.jsx)(qe,{"aria-hidden":`true`}),(0,W.jsx)(`strong`,{children:`内部成本`}),(0,W.jsx)(`span`,{className:`internal-tag`,children:`内部 · 客户不可见`})]}),(0,W.jsxs)(U,{gutter:[16,14],className:`cost-source-fields`,children:[(0,W.jsx)(q,{span:Z,label:`出库货盘(仅黄金)`,field:`pocket`,disabled:!!t.returnedStockLot,value:t.pocket,options:L.pocketOptions(n,t.pocket,t.historicalPocket),onChange:e=>o(t=>L.setLineField(t,`pocket`,e))}),(0,W.jsx)(K,{span:Z,label:`出库数量(对)`,field:`stockCount`,readOnly:!!t.returnedStockLot,numeric:!0,hidden:!a.stockCount,value:t.stockCount,placeholder:`一对填1`,hint:a.stockCountOptional?`历史未记录对数,可保留空白;与计工费件数分别填写。`:`与计工费件数分别填写。`,onChange:e=>o(t=>L.setLineField(t,`stockCount`,e))})]}),t.legacy?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(q,{field:`payer`,label:`货品成本由谁垫付`,value:t.payer,options:d(t.payer),onChange:e=>o(t=>({...t,payer:e}))}),(0,W.jsx)(K,{label:`原单货品成本(旧版未分项)`,field:`cost`,numeric:!0,value:t.cost,readOnly:!0}),(0,W.jsxs)(`div`,{className:`legacy-cost-note small`,children:[`保留原金额,拆分时请根据凭据填写。`,(0,W.jsx)(P,{"data-action":`split-cost`,onClick:()=>{o(e=>{let t=L.newLine({unit:e.unit,payer:e.payer,costParts:{material:``,labor:``,accessories:`0`,other:`0`},costMaterial:{mode:e.unit===`g`?`gram`:`total`}},{st:n,uuid:R});return{...e,legacy:!1,cost:``,purchase:t.purchase,pool:t.pool}}),i()},children:`拆分这行成本`})]})]}):l&&(0,W.jsxs)(`div`,{className:`cost-fields`,children:[t.pool&&(0,W.jsxs)(`div`,{className:`material-source`,children:[(0,W.jsxs)(U,{gutter:[16,14],children:[(0,W.jsx)(J,{span:Z,label:`料费成本来源`,help:t.pool.help,field:`materialSource`,disabled:!!t.returnedStockLot,value:t.pool.source,options:[[`manual`,`手动填写成本`],[`pool`,`当日加权料价`,!a.poolAllowed]],onChange:e=>o(t=>L.setPoolSource(t,e))}),u&&(0,W.jsx)(q,{span:Z,label:`料价日期`,field:`materialPoolId`,disabled:!!t.returnedStockLot,value:t.pool.poolId,options:t.pool.options.map(e=>[e.value,e.label]),onChange:e=>o(t=>({...t,pool:t.pool?{...t.pool,poolId:e}:t.pool}))}),u&&(0,W.jsx)(G,{span:Z,label:`\xA0`,field:`reload-material-choices`,children:(0,W.jsx)(P,{icon:(0,W.jsx)(at,{}),"data-action":`reload-material-choices`,onClick:i,className:`reload-button`,children:`刷新料价`})})]}),u&&t.view.poolNote&&(0,W.jsx)(`p`,{className:`small material-pool-note`,"aria-live":`polite`,"data-testid":`pool-note`,children:t.view.poolNote})]}),(0,W.jsxs)(U,{gutter:[16,14],className:`purchase-cost-grid`,children:[a.materialMode&&(0,W.jsx)(J,{span:Y,label:`进货料费方式`,field:`cost-materialMode`,value:l.materialMode,options:[[`gram`,`按克料价`,t.unit!==`g`],[`total`,`直接填总料费`]],onChange:s(`materialMode`)}),(0,W.jsx)(K,{span:X,label:u?`加权进货料价(元/克,自动)`:`进货料价(元/克)`,field:`cost-materialRate`,numeric:!0,hidden:!a.materialRate,readOnly:u,value:l.materialRate,placeholder:u?`待核算`:`填写每克进货料价`,onChange:s(`materialRate`)}),(0,W.jsx)(K,{span:X,label:u?`耗用料费合计(元,自动)`:`料费成本合计(元)`,field:`cost-material`,numeric:!0,readOnly:a.materialReadOnly,value:l.material,placeholder:u?`待核算`:`开单前必填,没有填0`,onChange:s(`material`)}),a.materialPayer?(0,W.jsx)(q,{span:Y,label:`料费付款人`,field:`cost-materialPayer`,value:l.materialPayer,placeholder:`请选择`,options:d(l.materialPayer),onChange:s(`materialPayer`)}):(0,W.jsx)(K,{span:Y,label:t.pool?.personal?`材料原付款人`:`本批购料付款人`,field:`cost-materialPoolPayer`,value:t.pool?.payerText||``,readOnly:!0})]}),(0,W.jsx)(`p`,{className:`purchase-formula small muted`,"aria-live":`polite`,children:t.view.materialFormula}),t.view.materialOriginal&&(0,W.jsx)(`p`,{className:`small muted`,children:t.view.materialOriginal}),(0,W.jsxs)(U,{gutter:[16,14],className:`purchase-cost-grid`,children:[(0,W.jsx)(J,{span:Y,label:`进货工费方式`,field:`cost-laborMode`,disabled:!!t.returnedStockLot,value:l.laborMode,options:[[`gram`,`克工费`,t.unit!==`g`],[`total`,`总工费`]],onChange:s(`laborMode`)}),(0,W.jsx)(K,{span:X,label:`进货克工费(元/克)`,field:`cost-laborRate`,readOnly:!!t.returnedStockLot,numeric:!0,hidden:!a.laborRateInput,value:l.laborRate,placeholder:`填写每克工费`,onChange:s(`laborRate`)}),(0,W.jsx)(K,{span:X,label:`进货总工费(元)`,field:`cost-labor`,numeric:!0,readOnly:a.laborReadOnly||!!t.returnedStockLot,value:l.labor,placeholder:`开单前必填,没有填0`,onChange:s(`labor`)}),(0,W.jsx)(q,{span:Y,label:`进货工费付款人`,field:`cost-laborPayer`,disabled:!!t.returnedStockLot,value:l.laborPayer,placeholder:`请选择`,options:d(l.laborPayer),onChange:s(`laborPayer`)})]}),(0,W.jsx)(`p`,{className:`purchase-formula small muted`,"aria-live":`polite`,children:t.view.laborFormula}),a.extraCosts&&(0,W.jsxs)(`div`,{className:`legacy-extra-costs`,children:[(0,W.jsx)(`p`,{className:`small muted`,children:`这里保留原来填写的货品成本,不要在下方实际费用重复登记。`}),(0,W.jsxs)(U,{gutter:[16,14],children:[(0,W.jsx)(K,{span:Z,label:`配件成本(元,本行合计)`,field:`cost-accessories`,numeric:!0,value:l.accessories,onChange:s(`accessories`)}),(0,W.jsx)(K,{span:Z,label:`其他货品成本(元,本行合计)`,field:`cost-other`,numeric:!0,value:l.other,onChange:s(`other`)}),(0,W.jsx)(q,{span:Z,label:`原有配件及其他成本付款人`,field:`payer`,value:t.payer,options:c,onChange:e=>o(t=>({...t,payer:e}))})]})]}),(0,W.jsxs)(`p`,{className:`cost-summary`,children:[(0,W.jsx)(`span`,{children:`本行货品成本合计`}),(0,W.jsx)(`span`,{className:`num`+(t.view.purchase?.total==null?` pending`:``),children:t.view.purchase?.total==null?u?`料费待核算`:`请补齐(没有的项目填0)`:`¥`+L.yuan(t.view.purchase.total)})]})]})]})}var An={xs:24,sm:12,xl:8},jn={xs:12,sm:12,xl:4};function Mn({client:e,form:t,state:n,update:r,onError:i,onReloadPools:a}){let o=En(e,t,n,r),s=e=>{try{r(e)}catch(e){i(e.message)}};return(0,W.jsxs)(Sn,{id:`section-lines`,step:`02`,title:`商品明细`,help:`金价与工费分开填写。银饰不扣黄金货盘;外配使用店内金料时,选实际出库货盘。`,extra:(0,W.jsxs)(`span`,{className:`section-extra`,children:[`共 `,t.lines.length,` 件商品`]}),children:[t.lines.map((c,l)=>(0,W.jsx)(Nn,{index:l,returnedStockChoice:e&&!c.historicalPocket&&(0,W.jsx)(Dn,{form:t,index:l,update:r,state:n,error:o.error,reload:o.reload,onError:i}),line:c,state:n,canRemove:t.lines.length>1,update:r,onRemove:()=>{if(t.lines.length<=1)return i(`请至少保留一行商品`);s(e=>L.removeLine(e,l))},onReloadPools:a},l)),(0,W.jsxs)(`div`,{className:`form-actions`,children:[(0,W.jsx)(P,{className:`add-line-button`,icon:(0,W.jsx)(et,{}),"data-action":`add-line`,onClick:()=>{let e=t.lines.length;s(e=>L.addLine(e,{st:n,uuid:R})),window.requestAnimationFrame(()=>{document.querySelector(`[data-line="${e}"]`)?.scrollIntoView?.({behavior:`smooth`,block:`nearest`})})},children:`添加商品`}),(0,W.jsx)(`span`,{className:`small muted`,children:`银饰不扣黄金货盘;外配用店内金料时选实际出库货盘。`})]})]})}function Nn({returnedStockChoice:e,index:t,line:n,state:r,canRemove:i,update:a,onRemove:o,onReloadPools:s}){let c=L.lineVisibility(n,r),l=e=>a(n=>L.updateLine(n,t,e(n.lines[t]))),u=e=>t=>l(n=>L.setLineField(n,e,t));return(0,W.jsxs)(`section`,{className:`line-item`,"data-line":t,"aria-label":`商品 `+(t+1),children:[(0,W.jsxs)(`div`,{className:`line-top`,children:[(0,W.jsxs)(`div`,{className:`line-heading`,children:[(0,W.jsx)(`span`,{className:`line-no`,children:String(t+1).padStart(2,`0`)}),(0,W.jsxs)(`strong`,{children:[`商品 `,String(t+1).padStart(2,`0`)]}),(0,W.jsx)(`span`,{className:`line-name muted`,children:n.nameType===`其他`?n.customName:n.nameType})]}),(0,W.jsxs)(`div`,{className:`line-top-right`,children:[n.sale&&(0,W.jsxs)(`span`,{className:`line-subtotal-chip num`,children:[n.quantity?(0,W.jsxs)(`span`,{className:`line-qty-meta`,children:[n.quantity,n.unit]}):null,(0,W.jsxs)(`span`,{children:[`¥`,n.sale]})]}),(0,W.jsx)(P,{type:`text`,size:`small`,icon:(0,W.jsx)(dn,{}),"data-action":`remove-line`,disabled:!i,onClick:o,children:`移除`})]})]}),e,(0,W.jsxs)(U,{gutter:[16,14],children:[(0,W.jsx)(q,{span:Y,label:`商品名称`,field:`nameType`,disabled:!!n.returnedStockLot,value:n.nameType,options:[...L.productNames,`其他`].map(e=>[e,e]),onChange:u(`nameType`)}),(0,W.jsx)(K,{span:Y,label:`其他商品名称`,field:`customName`,readOnly:!!n.returnedStockLot,hidden:!c.customName,value:n.customName,maxLength:60,onChange:u(`customName`)}),(0,W.jsx)(J,{span:An,label:`计价方式`,field:`pricingMode`,value:n.pricingMode,options:[[`auto`,`按金价与工费计算`],[`manual`,`直接填写金额`]],onChange:u(`pricingMode`)}),(0,W.jsx)(J,{span:jn,label:`单位`,field:`unit`,disabled:!!n.returnedStockLot,value:n.unit,options:[[`g`,`g`],[`件`,`件`]],onChange:u(`unit`)}),(0,W.jsx)(K,{span:X,label:`克重/数量`,field:`quantity`,readOnly:!!n.returnedStockLot,numeric:!0,value:n.quantity,onChange:u(`quantity`)})]}),(0,W.jsxs)(U,{gutter:[16,14],className:`sale-inputs`,children:[(0,W.jsx)(K,{span:X,label:`金价/银价(元/克)`,field:`goldPrice`,numeric:!0,hidden:!c.goldPrice,value:n.goldPrice,onChange:u(`goldPrice`)}),(0,W.jsx)(J,{span:X,label:`销售工费方式`,field:`laborMode`,hidden:!c.laborMode,value:n.laborMode,options:[[`gram`,`克工费`],[`piece`,`件工费`]],onChange:u(`laborMode`)}),(0,W.jsx)(K,{span:X,label:`销售工费`,field:`laborRate`,numeric:!0,hidden:!c.laborRate,value:n.laborRate,onChange:u(`laborRate`)}),(0,W.jsx)(K,{span:X,label:`计工费件数`,field:`pieces`,numeric:!0,hidden:!c.pieces,value:n.pieces,onChange:u(`pieces`)}),(0,W.jsx)(K,{span:xn,label:`销售单价说明(客户可见)`,field:`priceNote`,hidden:!c.priceNote,value:n.priceNote,maxLength:100,onChange:u(`priceNote`)}),(0,W.jsx)(K,{span:Y,label:`商品基础金额(不含附加项目)`,field:`baseSale`,numeric:!0,hidden:!c.baseSale,value:n.baseSale,onChange:u(`baseSale`)})]}),(0,W.jsx)(On,{index:t,line:n,update:a}),(0,W.jsxs)(U,{gutter:[16,8],className:`sale-result`,align:`bottom`,children:[(0,W.jsx)(K,{span:{xs:24,md:10,xl:8},className:`sale-field`,label:`本行销售额(元,含附加项目)`,field:`sale`,value:n.sale,readOnly:!0}),(0,W.jsx)(Pt,{xs:24,md:14,xl:16,children:(0,W.jsx)(I.Paragraph,{className:`calculation small`,"aria-live":`polite`,"data-testid":`line-calculation`,children:n.view.calculation})})]}),(0,W.jsx)(kn,{index:t,line:n,state:r,update:a,onReloadPools:s})]})}function Pn({form:e,state:t,summary:n,update:r}){let i=(0,V.useRef)(null),a=(0,V.useRef)(!1);(0,V.useLayoutEffect)(()=>{if(!a.current)return;a.current=!1;let e=i.current?.querySelectorAll(`input[name="feeNote"]`),t=e?.[e.length-1];t?.scrollIntoView?.({behavior:`smooth`,block:`nearest`}),t?.focus({preventScroll:!0})},[e.feeRows.length]);let o=e.presets,s=L.presetCatalogView(e,t),c={certificate:`4`,packaging:`3`,shipping:`6`,...t.shopSettings?.feeDefaults},l=o?`按实际发生勾选,快递最多选一项;盒子按配置单价和数量计费。取消勾选不记成本,客户收费不受影响。`:e.feeCostMode===`checkboxes`?`沿用本单已有费用、付款人与支付日期。普通费用按凭据核对;信用卡手续费金额和日期自动维护。`:`上方附加项目自动带入成本。证书默认${c.certificate}元、包装${c.packaging}元;快递按整单默认${c.shipping}元,均可修改。请填写实际已付金额,没有成本填0;不需要的整单费用可移除。开单时记录费用和付款人。`;return(0,W.jsxs)(Sn,{id:`section-fees`,step:`03`,title:`实际费用`,internal:!0,testId:`fee-costs`,help:l+` 客户单据不显示。`,extra:(0,W.jsx)(P,{size:`small`,icon:(0,W.jsx)(et,{}),"data-action":`add-fee`,onClick:()=>{a.current=!0,r(e=>L.addManualFee(e,t,R))},children:`添加其他成本`}),children:[!o&&(0,W.jsx)(`p`,{className:`small muted section-lead`,children:l}),(0,W.jsx)(U,{gutter:[16,14],children:(0,W.jsx)(K,{span:Y,label:`费用实际支付日期`,field:`fees_date`,type:`date`,value:e.fees_date,onChange:e=>r(t=>({...t,fees_date:e}))})}),o&&(0,W.jsxs)(`fieldset`,{className:`order-cost-presets`,"data-testid":`cost-presets`,children:[(0,W.jsxs)(`legend`,{children:[`常用成本 `,(0,W.jsx)(`span`,{className:`small muted`,children:`按实际发生勾选 · 快递二选一,也可不选`})]}),(0,W.jsxs)(`div`,{className:`order-cost-options`,children:[s.length===0&&(0,W.jsx)(`p`,{className:`muted`,children:`暂无启用的勾选成本,可在店铺配置中添加。`}),s.map(e=>{let i=!!o.checked[e.kind];return(0,W.jsxs)(`div`,{className:`order-cost-option`+(i?` checked`:``),"data-preset":e.kind,children:[(0,W.jsxs)(Xe,{className:`order-cost-check`,checked:i,onChange:n=>r(r=>L.togglePreset(r,e.kind,n.target.checked,t,R)),children:[(0,W.jsxs)(`span`,{className:`order-cost-main`,children:[(0,W.jsx)(`strong`,{children:e.name}),(0,W.jsx)(`span`,{className:`order-cost-price num`,children:e.price})]}),(0,W.jsx)(`small`,{className:`order-cost-payer`,children:e.kind===`yt`&&!o.configured?n.presetNotes.ytPayer:e.payer})]}),e.byQuantity&&i&&(0,W.jsx)(G,{className:`order-cost-quantity`,label:`数量(个)`,field:`cost_`+e.kind+`_quantity`,hint:n.presetNotes[e.kind],children:(0,W.jsx)(z,{name:`cost_`+e.kind+`_quantity`,"aria-label":e.name+`数量(个)`,inputMode:`numeric`,className:`num`,value:o.quantity[e.kind]??`1`,onChange:t=>r(n=>L.setPresetQuantity(n,e.kind,t.target.value))})})]},e.kind)})]})]}),(0,W.jsx)(`div`,{ref:i,className:`fee-grid`,children:e.feeRows.map((e,n)=>{let i=e.key.startsWith(`manual:`);return(0,W.jsxs)(`div`,{className:`fee-row`,"data-fee":e.key,"data-fee-index":n,children:[(0,W.jsxs)(`div`,{className:`fee-title`,children:[i?(0,W.jsx)(K,{label:`费用项目名称`,field:`feeNote`,value:e.note,maxLength:150,onChange:e=>r(t=>L.editFeeRow(t,n,`note`,e))}):(0,W.jsx)(`strong`,{className:`fee-name`,children:e.note}),(0,W.jsx)(`span`,{className:`small muted fee-source`,children:L.feeSourceText(e)})]}),(0,W.jsx)(K,{label:`实际成本(元)`,field:`feeAmount`,numeric:!0,value:e.amount,placeholder:`没有成本填0`,onChange:e=>r(t=>L.editFeeRow(t,n,`amount`,e))}),(0,W.jsx)(q,{label:`费用付款人`,field:`feePayer`,value:e.payer,options:L.memberOptions(t,!0,{selected:e.payer}),onChange:e=>r(t=>L.editFeeRow(t,n,`payer`,e))}),(0,W.jsx)(P,{type:`text`,size:`small`,icon:(0,W.jsx)(m,{}),"data-action":`remove-fee`,onClick:()=>r(e=>L.removeFeeRow(e,n)),children:`移除费用`})]},e.key)})}),n.card&&(0,W.jsxs)(`div`,{className:`credit-card-preview`,"data-testid":`credit-card-preview`,children:[(0,W.jsxs)(`div`,{className:`credit-card-heading`,children:[(0,W.jsx)(`strong`,{children:`信用卡手续费`}),(0,W.jsx)(`span`,{className:`small muted`,children:`自动计算 · 客户单据不显示`})]}),(0,W.jsxs)(U,{gutter:[16,14],children:[(0,W.jsx)(K,{span:xn,label:`手续费(元,自动)`,field:`credit_card_fee`,value:n.card.amountText,readOnly:!0}),(0,W.jsx)(q,{span:xn,label:`手续费付款人`,field:`credit_card_fee_payer`,value:e.credit_card_fee_payer,options:L.memberOptions(t),onChange:e=>r(t=>({...t,credit_card_fee_payer:e}))})]}),(0,W.jsx)(`p`,{className:`small muted`,"aria-live":`polite`,children:n.card.formula})]}),(0,W.jsx)(`div`,{className:`fees-total num`,"data-testid":`fees-total`,children:n.feesText})]})}function Fn({form:e,tags:t,tagsStatus:n,busy:r,update:i,onError:a}){let o=L.filterNoteTags(t,e.internal_note),s=/(?:^|[\s,。;、])#([\p{L}\p{N}_-]*)$/u.test(e.internal_note),c=(0,V.useRef)(null);return(0,W.jsxs)(Sn,{id:`section-summary`,step:`04`,title:`优惠与备注`,children:[(0,W.jsxs)(U,{gutter:[16,14],children:[(0,W.jsx)(K,{span:{xs:24,md:8},label:`整单优惠/抹零(元)`,field:`discount`,numeric:!0,value:e.discount,onChange:e=>i(t=>({...t,discount:e}))}),(0,W.jsx)(G,{span:{xs:24,md:16},label:`客户单备注`,field:`note`,id:`order-note`,children:(0,W.jsx)(z.TextArea,{id:`order-note`,name:`note`,"aria-label":`客户单备注`,maxLength:240,autoSize:{minRows:1,maxRows:4},placeholder:`只写可让客户看到的内容`,value:e.note,onChange:e=>i(t=>({...t,note:e.target.value}))})})]}),(0,W.jsxs)(`div`,{className:`internal internal-note`,children:[(0,W.jsx)(G,{label:(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(qe,{"aria-hidden":`true`}),` 内部备注 `,(0,W.jsx)(`span`,{className:`small muted`,children:`必填,至少3个字符(含#号),最多500字`})]}),help:`输入 #词语 添加标签,例如 #补货、#客户自提。保存订单后可复用,点击下方标签即可填入。内部备注不会出现在客户销售单或打印件中。`,field:`internal_note`,id:`order-internal-note`,children:(0,W.jsx)(z.TextArea,{ref:c,id:`order-internal-note`,name:`internal_note`,"aria-label":`内部备注`,maxLength:500,autoSize:{minRows:2,maxRows:6},placeholder:`仅供内部跟进,不会出现在客户销售单或打印件中`,value:e.internal_note,onChange:e=>i(t=>({...t,internal_note:e.target.value}))})}),(0,W.jsx)(`div`,{className:`order-note-tag-options`,"aria-label":`内部备注快捷标签`,"data-testid":`note-tags`,children:n?(0,W.jsx)(`span`,{className:`small muted`,children:n}):o.length?o.map(t=>{let n=e.internal_note.includes(t);return(0,W.jsx)(P,{size:`small`,className:`note-tag`+(n?` note-tag-active`:``),"data-note-tag":t,"aria-pressed":n,disabled:r,onClick:()=>{try{let n=L.insertNoteTag(e.internal_note,t);i(e=>({...e,internal_note:n})),c.current?.focus()}catch(e){a(e.message)}},children:t},t)}):(0,W.jsx)(`span`,{className:`small muted`,children:s?`没有匹配标签,可继续输入新标签。`:`暂无已保存标签,填写 #词语 并保存订单后即可复用。`})})]})]})}function In({form:e,summary:t,busy:n,error:r,onClearError:i,onLocateError:a}){let o=String(e.discount).trim(),s=/^\d+(?:\.\d{1,2})?$/.test(o)?Math.round(Number(o)*100):0;return(0,W.jsxs)(`div`,{className:`submit-bar`,role:`region`,"aria-label":`成交合计与提交`,children:[r&&(0,W.jsx)(N,{type:`error`,showIcon:!0,closable:!!i,onClose:i,message:r,action:a?(0,W.jsx)(P,{size:`small`,type:`link`,danger:!0,onClick:a,children:`定位问题项`}):void 0,className:`order-error`,role:`alert`,"data-testid":`order-error`}),(0,W.jsxs)(`div`,{className:`submit-bar-row`,children:[(0,W.jsxs)(`div`,{className:`submit-total`,children:[(0,W.jsx)(`span`,{className:`submit-label`,children:`成交合计`}),(0,W.jsx)(`div`,{className:`summary-amount num`+(t.total==null?` pending`:``),"data-testid":`create-total`,children:t.totalText})]}),(0,W.jsxs)(`div`,{className:`submit-facts`,children:[(0,W.jsxs)(`span`,{className:`fact`,children:[e.lines.length,` 件商品`,s>0?(0,W.jsxs)(W.Fragment,{children:[` · 整单优惠 −¥`,L.yuan(s)]}):null]}),(0,W.jsx)(`span`,{className:`fact muted`,"aria-live":`polite`,"data-testid":`rounding-note`,children:t.roundingHint})]}),(0,W.jsx)(P,{type:`primary`,htmlType:`submit`,size:`large`,icon:(0,W.jsx)(Pe,{}),loading:n,"data-action":`issue`,className:`issue-button`,children:`生成销售单据`})]})]})}var Q=(e,...t)=>{for(let n of t){let t=e?.querySelector(`[data-field="${n}"]`);if(t&&!t.querySelector(`input[readonly]`))return t}return null},$=(e,t)=>e.querySelector(`[data-line="${Number(t[1])-1}"]`),Ln=(e,t,n)=>{for(let r of e?.querySelectorAll(t)||[]){let e=r.querySelector(`[data-field="${n}"]`);if(e&&!e.querySelector(`input`)?.value)return e}return null},Rn=[[/客户称呼/,e=>Q(e,`customer`)],[/客户类型/,e=>Q(e,`customer_type`)],[/开单人/,e=>Q(e,`salesperson`)],[/内部备注/,e=>Q(e,`internal_note`)],[/费用实际支付日期/,e=>Q(e,`fees_date`)],[/业务日期/,e=>Q(e,`date`)],[/整单优惠/,e=>Q(e,`discount`)],[/盒子数量|数量请填写正整数/,e=>e.querySelector(`[data-field^="cost_"][data-field$="_quantity"]`)],[/商品 (\d+)的名称/,(e,t)=>Q($(e,t),`customName`,`nameType`)],[/商品 (\d+)的克重/,(e,t)=>Q($(e,t),`quantity`)],[/商品 (\d+)的计工费件数/,(e,t)=>Q($(e,t),`pieces`)],[/商品 (\d+)的金价/,(e,t)=>Q($(e,t),`goldPrice`)],[/商品 (\d+)的销售工费/,(e,t)=>Q($(e,t),`laborRate`)],[/商品 (\d+)的基础金额/,(e,t)=>Q($(e,t),`baseSale`)],[/商品 (\d+)出库数量/,(e,t)=>Q($(e,t),`stockCount`)],[/商品 (\d+)(?:附加项目|的.+收费)/,(e,t)=>Ln($(e,t),`[data-charge]`,`chargeAmount`)],[/商品 (\d+)请选择料费付款人|商品 (\d+)请选择料费和/,(e,t)=>Q($(e,t),`cost-materialPayer`)],[/商品 (\d+)请选择进货工费付款人/,(e,t)=>Q($(e,t),`cost-laborPayer`)],[/商品 (\d+)请选择不晚于/,(e,t)=>Q($(e,t),`materialPoolId`)],[/商品 (\d+)的料费成本/,(e,t)=>Q($(e,t),`cost-materialRate`,`cost-material`)],[/商品 (\d+)的进货工费/,(e,t)=>Q($(e,t),`cost-laborRate`,`cost-labor`)],[/商品 (\d+)的(?:配件成本)/,(e,t)=>Q($(e,t),`cost-accessories`)],[/商品 (\d+)的(?:其他货品成本)/,(e,t)=>Q($(e,t),`cost-other`)],[/商品 (\d+)的货品成本/,(e,t)=>Q($(e,t),`cost`)],[/商品 (\d+):/,(e,t)=>$(e,t)],[/的实际成本|实际成本/,e=>Ln(e,`.fee-row`,`feeAmount`)||Q(e.querySelector(`.fee-row`),`feeAmount`)]];function zn(e,t){let n=null;for(let[r,i]of Rn){let a=r.exec(t);if(!a||n&&a.index>=n.index)continue;a[1]===void 0&&a[2]!==void 0&&(a[1]=a[2]);let o=i(e,a);o&&(n={index:a.index,el:o})}return n?.el||null}function Bn(e,t){if(!e||!t)return;let n=zn(e,t);if(!n)return;e.querySelectorAll(`.field-invalid`).forEach(e=>e.classList.remove(`field-invalid`)),n.classList.add(`field-invalid`),n.scrollIntoView?.({block:`center`,behavior:`smooth`});let r=n.querySelector(`input:not([type=hidden]):not([readonly]), textarea`);window.setTimeout(()=>r?.focus({preventScroll:!0}),350);let i=()=>{n.classList.remove(`field-invalid`),n.removeEventListener(`input`,i),n.removeEventListener(`click`,i)};n.addEventListener(`input`,i),n.addEventListener(`click`,i)}function Vn({client:e,state:t,session:n,form:r,ctx:i,update:a,reset:o}){return(0,W.jsx)(Ct,{className:`entry-tools`,items:[{key:`templates`,label:(0,W.jsxs)(`span`,{children:[`开单模板 `,(0,W.jsx)(`span`,{className:`small muted`,children:`选择或保存常用模板`})]}),children:(0,W.jsx)(Hn,{client:e,state:t,session:n,form:r,reset:o})},...r.id?[]:[{key:`formula`,label:(0,W.jsxs)(`span`,{children:[`公式快速开单 `,(0,W.jsx)(`span`,{className:`small muted`,children:`粘贴公式,自动填入商品`})]}),children:(0,W.jsx)(Un,{form:r,ctx:i,update:a})}]]})}function Hn({client:e,state:t,session:n,form:r,reset:i}){let{message:a,modal:o}=Te.useApp(),[s,c]=(0,V.useState)(null),[l,u]=(0,V.useState)(``),[d,f]=(0,V.useState)({text:``}),[p,m]=(0,V.useState)(null),h=r.member||L.currentMember(t),g=L.teamMode(t),_=(0,V.useCallback)(async()=>{try{let n=g&&t.user.role===`owner`?`?`+new URLSearchParams({member:h}):``,r=await e.api(`/api/order-templates`+n);if(!Array.isArray(r.rows))throw Error(`模板列表未完整返回,请重试。`);return c(r.rows),u(e=>r.rows.some(t=>t.id===e)?e:``),!0}catch(e){return f({text:`模板尚未读到:`+e.message,error:!0}),!1}},[e,h,g,t.user.role]);(0,V.useEffect)(()=>{_()},[_]);let v=L.defaultSalesperson(t,n);async function y(n){if(e.busy)throw Error(`正在处理订单,请稍候再套用模板。`);if(e.pending())throw Error(`请先恢复上次未确认的操作,再套用模板。`);let s=t.user.id,[c,d]=await Promise.all([e.api(`/api/order-templates/`+encodeURIComponent(n)),e.api(`/api/session`)]);if(d.user?.id!==s)throw Error(`登录账号已变化,请刷新后再套用模板。`);let p=He.apply(c.preset,{today:d.today,salesperson:v,pocketKeys:[...new Set([...L.activePocketKeys(t),...(c.preset.lines||[]).map(e=>e.pocket||``).filter(Boolean)])]});p.salesperson=v,g&&(p.member=c.member||h);let m=L.collectDraft(r,t);(!Ve.hasDraftContent(m,{today:d.today,salesperson:v})&&!l&&!m.lines.some(e=>e.pricingMode===`manual`||e.laborMode&&e.laborMode!==`gram`||e.pieces!=null&&String(e.pieces)!==`1`||e.costLabor?.mode===`gram`||e.costMaterial?.mode===`total`)||await o.confirm({title:`套用模板`,content:`当前还有未保存的开单内容。套用模板会替换这份草稿,客户称呼将留空、日期改为今天,是否继续?`,okText:`继续`,cancelText:`取消`}))&&(i(p),u(n),f({text:`已套用「`+c.name+`」,请核对本次克重、报价和费用后生成单据。`}),a.success(`模板已填入,生成销售单据后才记账`))}async function b(){if(!p)return;let n=p.name.trim();try{if(!n||n.length>60)throw Error(`模板名称请填写1~60字。`);let i=p.kind===`update`?s?.find(e=>e.id===l):null,o={...g?{member:h}:{},name:n,preset:He.fromDraft(L.collectDraft(r,t),{pocketKeys:L.activePocketKeys(t),newId:R}),...i?{revision:i.revision}:{}},c=`/api/order-templates`+(i?`/`+encodeURIComponent(i.id)+`/update`:``),d=await e.mutate(c,o);m(null),u(d.id);let v=await _();f({text:`已保存模板「`+(d.name||n)+`」`+(v?`。`:`;列表暂未读到,可重新读取,当前表单已保留。`)}),a.success(`模板已保存,当前开单内容保留`)}catch(e){m(t=>t&&{...t,error:e.message.replace(`不要重新开单`,`不要重复保存模板`)})}}async function x(){let t=s?.find(e=>e.id===l);if(t&&await o.confirm({title:`删除模板`,content:`删除模板「`+t.name+`」?当前开单内容和已保存订单会保留。`,okText:`删除`,cancelText:`取消`}))try{await e.mutate(`/api/order-templates/`+encodeURIComponent(t.id)+`/delete`,{revision:t.revision}),u(``),await _(),f({text:`模板已删除。`})}catch(e){f({text:e.message,error:!0})}}return(0,W.jsxs)(`div`,{className:`template-panel`,children:[(0,W.jsxs)(ot,{wrap:!0,children:[(0,W.jsx)(Ze,{"aria-label":`选择模板`,"data-testid":`template-select`,style:{minWidth:220},allowClear:!0,value:l||void 0,placeholder:s?`选择后自动填入预设`:`正在读取模板…`,disabled:!s,options:(s||[]).map(e=>({value:e.id,label:e.name})),onChange:e=>{e?y(e).catch(e=>f({text:e.message,error:!0})):u(``)}}),(0,W.jsx)(P,{onClick:()=>m({kind:`new`,name:``,error:``}),children:`保存为新模板`}),(0,W.jsx)(P,{disabled:!l,onClick:()=>m({kind:`update`,name:s?.find(e=>e.id===l)?.name||``,error:``}),children:`更新所选模板`}),(0,W.jsx)(P,{disabled:!l,onClick:()=>void x(),children:`删除模板`})]}),(0,W.jsx)(`p`,{className:`small muted`,children:`用于普通开单,可以保存未填完的表单。客户称呼和内部备注不存入模板,套用时留空;业务日期和费用日期用今天;每日料价随本次订单日期读取。`}),d.text&&(0,W.jsx)(`p`,{className:`small `+(d.error?`danger-text`:`muted`),children:d.text}),(0,W.jsxs)(H,{open:!!p,title:p?.kind===`update`?`更新模板`:`保存为新模板`,okText:p?.kind===`update`?`保存更新`:`保存模板`,cancelText:`取消`,onOk:()=>void b(),onCancel:()=>m(null),confirmLoading:e.busy,children:[(0,W.jsx)(`p`,{className:`small muted`,children:`将当前普通开单表单保存为预设,允许金额和克重留空。客户、内部备注、日期及订单编号不存入模板;本次正在填写的内容会保留。`}),(0,W.jsx)(z,{"aria-label":`模板名称`,maxLength:60,autoFocus:!0,placeholder:`例如:足金手链常用报价`,value:p?.name||``,onChange:e=>m(t=>t&&{...t,name:e.target.value}),onPressEnter:()=>void b()}),p?.error&&(0,W.jsx)(N,{type:`error`,showIcon:!0,message:p.error,style:{marginTop:12}})]})]})}function Un({form:e,ctx:t,update:n}){let[r,i]=(0,V.useState)(``),[a,o]=(0,V.useState)(null);function s(s){try{let c=Be.parseBatch(r,{roundingMode:e.rounding_mode}),l=c.items.map((e,t)=>{let n=e.line,r=n.laborMode===`gram`?`${n.quantity}克 ×(金价 ${n.goldPrice} + 克工费 ${n.laborRate})`:`${n.quantity}克 × 金价 ${n.goldPrice} + 1件 × 件工费 ${n.laborRate}`;return`本次第 ${t+1} 件:${r}${n.charges.map(e=>` + 附加费 `+e.amount).join(``)} = ${L.yuan(e.subtotal)}元`});if(l.push(`本次商品合计 ${L.yuan(c.subtotal)}元${c.roundingMode===`yuan`?`,整单取整为 `+L.yuan(c.total)+`元`:``}。`),c.mismatch&&!s){o({kind:`warning`,title:`公式金额与计算结果不一致`,lines:[...l,...c.warnings,`请修改公式,或按计算结果预填。`],pending:r});return}if(s&&a?.pending!==r)throw Error(`公式已改变,请重新点击“识别并预填”核对`);let u=L.applyFormulaLines(e,c.lines,t),d=u.filled;n(()=>u.form),o({kind:`note`,title:`已预填商品 ${d.join(`、`)},共 ${d.length} 件`,lines:[...l,...c.mismatch?[`已采用左侧公式计算金额,未采用不一致的手写金额。`]:[],(c.lines.some(e=>e.charges.length)?`附加费已填金额,未判断编绳、烤漆等类目,可自行改名;内部成本请另行核对。`:``)+`已有商品、优惠和客户资料保留,尚未生成订单。`]}),i(``)}catch(e){o({kind:`error`,lines:[e.message]})}}return(0,W.jsxs)(`div`,{className:`formula-panel`,children:[(0,W.jsx)(z.TextArea,{"aria-label":`粘贴销售公式`,rows:4,maxLength:18e3,autoComplete:`off`,placeholder:`0.79×822+120=769
|
||
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,W.jsxs)(ot,{wrap:!0,style:{marginTop:8},children:[(0,W.jsx)(P,{type:`primary`,onClick:()=>s(!1),children:`识别并预填`}),a?.kind===`warning`&&(0,W.jsx)(P,{onClick:()=>s(!0),children:`按计算金额预填`}),r&&(0,W.jsx)(P,{onClick:()=>{i(``),o(null)},children:`清空公式`})]}),(0,W.jsx)(`p`,{className:`small muted`,children:`括号内是克工费;金价乘克重后加的是一件工费,再加的金额记为附加费。合计行只校验,不增加商品。客户、货盘及内部成本仍按实际填写。`}),a&&(0,W.jsx)(N,{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,W.jsx)(`div`,{children:a.lines.filter(Boolean).map((e,t)=>(0,W.jsx)(`p`,{children:e},t))})})]})}function Wn({order:e,error:t,onRetry:n,onPreview:r,onNew:i}){let{message:a}=Te.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,W.jsx)(`div`,{className:`issued-page`,children:(0,W.jsx)(tt,{className:`issued-card`,children:(0,W.jsx)(ln,{status:`success`,title:`销售单据已生成`,subTitle:c?e.materialCostPending?`收款、费用和出库已记账;料费待补,补足购料后自动核算利润。`:`收款、费用、出库和利润已记账。`:t||`正在读取已生成的销售单…`,extra:(0,W.jsxs)(ot,{direction:`vertical`,size:`large`,style:{width:`100%`},children:[c&&(0,W.jsxs)(`dl`,{className:`issued-summary`,"data-testid":`issued-summary`,children:[(0,W.jsxs)(`div`,{className:`issued-item`,children:[(0,W.jsx)(`dt`,{children:(0,W.jsx)(I.Text,{type:`secondary`,children:`纸单号`})}),(0,W.jsxs)(`dd`,{className:`issued-value-row`,children:[(0,W.jsx)(`span`,{className:`issued-value num`,"data-testid":`issued-paper-number`,children:e.paper_number||`未分配`}),e.paper_number&&(0,W.jsx)(Ae,{title:o?`已复制`:`复制纸单号`,children:(0,W.jsx)(P,{type:`text`,size:`small`,className:`issued-copy-btn`,"aria-label":`复制纸单号`,icon:o?(0,W.jsx)(Pe,{}):(0,W.jsx)(Fe,{}),onClick:()=>void l()})})]})]}),(0,W.jsxs)(`div`,{className:`issued-item`,children:[(0,W.jsx)(`dt`,{children:(0,W.jsx)(I.Text,{type:`secondary`,children:`成交合计`})}),(0,W.jsx)(`dd`,{className:`issued-value issued-total num`,"data-testid":`issued-total`,children:nt(e.total??null,e.rounding_mode||`cent`)})]}),e.customer&&(0,W.jsxs)(`div`,{className:`issued-item`,children:[(0,W.jsx)(`dt`,{children:(0,W.jsx)(I.Text,{type:`secondary`,children:`客户`})}),(0,W.jsx)(`dd`,{className:`issued-value small`,children:e.customer})]})]}),(0,W.jsxs)(`div`,{className:`issued-actions`,children:[(0,W.jsx)(P,{type:`primary`,size:`large`,icon:(0,W.jsx)(_n,{}),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,W.jsx)(P,{size:`large`,icon:(0,W.jsx)(et,{}),onClick:i,"data-action":`new-order`,children:`开始新的一单`}),!c&&(0,W.jsx)(P,{size:`large`,onClick:n,children:`重新读取订单`})]}),(0,W.jsx)(P,{href:re(`orders`)+`?order=`+encodeURIComponent(e.id),onClick:t=>{t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||(t.preventDefault(),te(`orders`,{search:`?order=`+encodeURIComponent(e.id)}))},type:`link`,icon:(0,W.jsx)(It,{}),children:`查看订单详情`})]})})})})}function Gn(e){let{client:t,state:n}=e,r=me(`draft`),[i,a]=(0,V.useState)(r?null:{draft:Le(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:L.draftInputs(i),note:`正在继续填写旧草稿,生成销售单据后完成记账。`})}catch(t){e&&a({draft:Le(window.localStorage,n.user.id),note:`旧草稿未能打开:`+t.message})}})(),()=>{e=!1}},[t,r,n.user.id,n.user.role]),i?(0,W.jsx)(Kn,{...e,initialDraft:i.draft,initialNote:i.note}):(0,W.jsx)(`div`,{className:`page-loading`,children:(0,W.jsx)(De,{tip:`正在读取旧草稿…`,children:(0,W.jsx)(`div`,{style:{height:60}})})})}function Kn({client:e,state:t,session:n,refreshState:r,onAccountChanged:i,onRecoverOther:a,initialDraft:o,initialNote:s}){let{message:c}=Te.useApp();Se(e);let{store:l,update:u,reset:d,ctx:f,poolError:p,loadPools:m}=Ue({client:e,state:t,session:n,initialDraft:o}),{form:h,summary:g}=l,[_,v]=(0,V.useState)(``),[y,b]=(0,V.useState)(!1),[x,S]=(0,V.useState)(null),C=x!==null,w=(0,V.useRef)(!1);(0,V.useEffect)(()=>{!C&&!w.current&&Ie(window.localStorage,t.user.id,l.draft)},[C,t.user.id,l.draft]);let[T,E]=(0,V.useState)([]),[D,O]=(0,V.useState)(`正在读取快捷标签…`),k=e.busy,A=e.pending(),j=(0,V.useRef)(null),[M,ee]=(0,V.useState)(null),ne=(0,V.useMemo)(()=>{if(h.paper_number){let e=h.paper_date&&h.paper_number.match(/^\d{8}-?(\d+)$/);return e?h.date.replaceAll(`-`,``)+e[1]:h.paper_number}return M?.date===h.date?M.number+`(预计)`:`保存时分配`},[h.paper_number,h.paper_date,h.date,M]);(0,V.useEffect)(()=>{if(h.paper_number)return;let t=!0,n=h.date;return e.api(`/api/paper-number?date=`+encodeURIComponent(n)).then(e=>t&&ee({date:n,number:e.number})).catch(()=>{}),()=>{t=!1}},[e,h.date,h.paper_number]),(0,V.useEffect)(()=>{let t=!0;return e.api(`/api/order-note-tags`).then(e=>{t&&(E(Array.isArray(e.tags)?e.tags.filter(e=>typeof e==`string`):[]),O(``))}).catch(()=>t&&O(`快捷标签暂未读取成功,可直接填写备注。`)),()=>{t=!1}},[e]);let ie=(0,V.useCallback)(e=>{let t=e;t.code===`ACCOUNT_CHANGED`&&b(!0),v(t.message),c.error(t.message),Bn(j.current,t.message)},[c]),ae=(0,V.useCallback)(async(t,n)=>{S({order:{id:n.id},error:``});try{let t=await e.api(`/api/orders/`+encodeURIComponent(n.id));S({order:{...t,id:n.id},error:``}),c.success(t.materialCostPending?`销售单据已生成;料费待补,补足购料后自动核算利润`:`销售单据已生成,收款、费用、出库和利润已记账`),r().catch(()=>{})}catch{S({order:{id:n.id,customer:t},error:`销售单据已经生成,最新订单暂未读到。请重新读取或查看已生成销售单;不要重复开单。`})}},[e,c,r]);async function oe(){v(``);try{L.validateFormFields(h,t);let n=L.validateIssueDraft(L.collectDraft(h,t),t);if(n.id&&t.user.role!==`owner`)throw Error(`已有草稿由店主继续填写并开单;无单号的新开单流程照常使用。`);w.current=!0;let r=await e.mutate(`/api/orders/issue`,n);Re(window.localStorage,t.user.id,{data:n}),await ae(n.customer,r)}catch(e){w.current=!1,ie(e)}}async function se(n){if(n.url!==`/api/orders/issue`&&a)return a();v(``);try{w.current=!0;let r=await e.retryPending();if(r?.result.id&&n.url===`/api/orders/issue`)return Re(window.localStorage,t.user.id,r.job),await ae(r.job.data.customer,{id:r.result.id});w.current=!1,r&&c.success(`原操作已确认,不会重复记账`)}catch(e){w.current=!1,ie(e)}}function ce(){ze(window.localStorage,t.user.id),window.location.search&&window.history.replaceState(null,``,window.location.pathname),w.current=!1,S(null),v(``),d(null)}let le=(0,V.useMemo)(()=>!!(h.id||h.customer.trim()||h.customer_type||h.note.trim()||h.internal_note.trim()||h.discount.trim()&&h.discount.trim()!==`0`||h.lines.length>1||h.lines.some(e=>e.quantity.trim()||e.goldPrice.trim()||e.laborRate.trim()||e.baseSale.trim()||e.charges.length>0)||h.feeRows.length>0||Object.values(h.presets?.checked||{}).some(Boolean)),[h]),ue=(0,V.useMemo)(()=>Object.values(h.presets?.checked||{}).filter(Boolean).length+h.feeRows.length,[h.presets,h.feeRows.length]),de=(0,V.useCallback)(e=>{document.getElementById(e)?.scrollIntoView({behavior:`smooth`,block:`start`})},[]);return x?(0,W.jsx)(Wn,{order:x.order,onPreview:()=>e.mutate(`/api/orders/`+encodeURIComponent(x.order.id)+`/print`,{mode:`full`}),error:x.error,onRetry:()=>void ae(x.order.customer,{id:x.order.id}),onNew:ce}):(0,W.jsxs)(`div`,{className:`create-page`,children:[(0,W.jsxs)(`div`,{className:`page-heading`,children:[(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`div`,{className:`eyebrow`,children:`New Order · 新版界面`}),(0,W.jsx)(I.Title,{level:1,children:`开一张新单`}),(0,W.jsx)(I.Paragraph,{type:`secondary`,children:`开单即交付,一次记录全额收款、实际费用、出库和利润。`})]}),(0,W.jsxs)(`div`,{className:`order-heading-actions`,children:[(0,W.jsx)(P,{href:re(`price-lock-create`),disabled:k,onClick:e=>{e.ctrlKey||e.metaKey||e.shiftKey||e.altKey||(e.preventDefault(),te(`price-lock-create`))},children:`锁价`}),le?(0,W.jsx)(Kt,{title:`确定清空当前表单?`,description:`已填写的商品、费用与备注都会清除,且无法撤销。`,okText:`确认清空`,cancelText:`保留`,okButtonProps:{danger:!0},onConfirm:()=>{ce(),c.success(`表单已清空`)},children:(0,W.jsx)(P,{icon:(0,W.jsx)(pn,{}),"data-action":`clear-draft`,disabled:k,children:`清空表单`})}):(0,W.jsx)(P,{icon:(0,W.jsx)(pn,{}),"data-action":`clear-draft`,disabled:k,onClick:()=>{ce(),c.info(`当前表单已是空白`)},children:`清空表单`})]})]}),A&&(0,W.jsx)(N,{className:`pending`,type:`warning`,showIcon:!0,"data-testid":`pending`,message:`上次提交结果尚未确认,请先恢复原操作。重试会使用同一个操作号。`,action:(0,W.jsx)(P,{danger:!0,size:`small`,disabled:k,"data-action":`retry`,onClick:()=>void se(A),children:`恢复原操作`})}),y&&(0,W.jsx)(N,{type:`error`,showIcon:!0,message:`登录账号已在其他页面切换,原操作已暂停。`,action:(0,W.jsx)(P,{size:`small`,onClick:i,children:`重新读取登录状态`})}),s&&(0,W.jsx)(N,{type:`info`,showIcon:!0,message:s}),h.copy_kind&&(0,W.jsx)(N,{type:`info`,showIcon:!0,message:`已复制为未保存的新订单,客户称呼已留空。`}),p&&(0,W.jsx)(N,{type:`warning`,showIcon:!0,message:p}),(0,W.jsx)(Vn,{client:e,state:t,session:n,form:h,ctx:f,update:u,reset:e=>d(e)}),(0,W.jsxs)(`nav`,{className:`section-nav`,"aria-label":`表单分区快捷跳转`,children:[(0,W.jsxs)(`button`,{type:`button`,className:`section-pill`,onClick:()=>de(`section-customer`),children:[(0,W.jsx)(`span`,{className:`section-pill-no`,children:`01`}),` 客户与单据`]}),(0,W.jsxs)(`button`,{type:`button`,className:`section-pill`,onClick:()=>de(`section-lines`),children:[(0,W.jsx)(`span`,{className:`section-pill-no`,children:`02`}),` 商品明细`,(0,W.jsx)(`span`,{className:`section-pill-badge`,children:h.lines.length})]}),(0,W.jsxs)(`button`,{type:`button`,className:`section-pill section-pill-internal`,onClick:()=>de(`section-fees`),children:[(0,W.jsx)(`span`,{className:`section-pill-no`,children:`03`}),` 实际费用`,ue>0?(0,W.jsx)(`span`,{className:`section-pill-badge`,children:ue}):null]}),(0,W.jsxs)(`button`,{type:`button`,className:`section-pill`,onClick:()=>de(`section-summary`),children:[(0,W.jsx)(`span`,{className:`section-pill-no`,children:`04`}),` 优惠与备注`]})]}),(0,W.jsx)(`form`,{id:`order-form`,ref:j,className:`order-form`,noValidate:!0,onSubmit:e=>{e.preventDefault(),k||oe()},children:(0,W.jsxs)(`fieldset`,{disabled:k,className:`form-fieldset`,children:[(0,W.jsx)(Cn,{form:h,state:t,paperNumber:ne,update:u}),(0,W.jsx)(Mn,{client:e,form:h,state:t,update:u,onError:e=>c.error(e),onReloadPools:()=>void m()}),(0,W.jsx)(Pn,{form:h,state:t,summary:g,update:u}),(0,W.jsx)(Fn,{form:h,tags:T,tagsStatus:D,busy:k,update:u,onError:e=>c.error(e)}),(0,W.jsx)(In,{form:h,summary:g,busy:k,error:_,onClearError:()=>v(``),onLocateError:()=>Bn(j.current,_)})]})})]})}export{Gn as CreateOrderPage}; |