@customize-agent/server 4.60.2 → 4.60.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/build-manifest.json +56 -54
- package/.next/prerender-manifest.json +3 -3
- package/.next/required-server-files.json +1 -1
- package/.next/server/chunks/1243.js +1 -1
- package/.next/server/chunks/2328.js +1 -1
- package/.next/server/chunks/{7848.js → 4683.js} +89 -86
- package/.next/server/chunks/5304.js +1 -1
- package/.next/server/chunks/6321.js +1 -1
- package/.next/server/chunks/6822.js +1 -1
- package/.next/server/chunks/8204.js +1 -1
- package/.next/server/chunks/9399.js +1 -0
- package/.next/server/chunks/9666.js +58 -55
- package/.next/server/instrumentation.js +1 -1
- package/.next/server/instrumentation.js.nft.json +1 -1
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/pages/api/documents/export.js +2 -2
- package/.next/server/pages/api/documents/generate/preview.js +1 -1
- package/.next/server/pages/api/documents/generate.js +1 -1
- package/.next/server/pages/api/health.js +1 -1
- package/.next/server/pages/canvas/[id].html +1 -1
- package/.next/server/pages/canvas.html +1 -1
- package/.next/server/pages/documents.html +1 -1
- package/.next/server/pages/guide.html +1 -1
- package/.next/server/pages/index.html +1 -1
- package/.next/server/pages/knowledge/file-detail.html +1 -1
- package/.next/server/pages/knowledge/files.html +1 -1
- package/.next/server/pages/knowledge/manage.html +1 -1
- package/.next/server/pages/knowledge/source-preview.html +1 -1
- package/.next/server/pages/knowledge.html +1 -1
- package/.next/server/pages/models.html +1 -1
- package/.next/server/pages/overview.html +1 -1
- package/.next/server/pages/prompt.html +1 -1
- package/.next/server/pages/settings.html +1 -1
- package/.next/server/pages/skills/[id]/edit.html +1 -1
- package/.next/server/pages/skills/[id]/edit.js.nft.json +1 -1
- package/.next/server/pages/skills/[id].html +1 -1
- package/.next/server/pages/skills/[id].js.nft.json +1 -1
- package/.next/server/pages/skills/new.html +1 -1
- package/.next/server/pages/skills/new.js.nft.json +1 -1
- package/.next/server/pages/skills.html +1 -1
- package/.next/server/pages/system/logs.html +1 -1
- package/.next/server/pages-manifest.json +30 -30
- package/.next/static/77a0c591cb44f2d0fda8be7c18cd915e32ecb5272d201914c0e332124a63d539/_buildManifest.js +1 -0
- package/.next/static/chunks/2-8570cd2beee4da6e.js +1 -0
- package/.next/static/chunks/257-3ea888b096943bc8.js +1 -0
- package/.next/static/chunks/280-3ce590d421b5c47d.js +16 -0
- package/.next/static/chunks/425-42f2568bcdd98f4c.js +1 -0
- package/.next/static/chunks/530-7e79396d68742829.js +1 -0
- package/.next/static/chunks/564-d3426eef3e3e415b.js +4 -0
- package/.next/static/chunks/576-6699fed6c88502fe.js +1 -0
- package/.next/static/chunks/579-fc0a2eb64aedb001.js +1 -0
- package/.next/static/chunks/{795-1a33b085051ecf2b.js → 795-1c1cb3bf1f600e99.js} +1 -1
- package/.next/static/chunks/819-96247c9054ad9683.js +1 -0
- package/.next/static/chunks/{964-82cc4701f08f7351.js → 964-569c27befeaff602.js} +2 -2
- package/.next/static/chunks/pages/{_app-3df96a32b2c9a6ca.js → _app-3f5aa4ff7951feca.js} +3 -3
- package/.next/static/chunks/pages/canvas/[id]-534b45f39f39630c.js +1 -0
- package/.next/static/chunks/pages/{canvas-8372faba7b5bb116.js → canvas-ffb08963e5cf9558.js} +1 -1
- package/.next/static/chunks/pages/knowledge/{file-detail-6c8b86752d2ddf88.js → file-detail-4ccc50ced6382dab.js} +1 -1
- package/.next/static/chunks/pages/knowledge/source-preview-56ce59763fa015db.js +1 -0
- package/.next/static/chunks/pages/knowledge-84e386d765ddd311.js +1 -0
- package/.next/static/chunks/pages/{models-dde7dc26b2ee4b83.js → models-5eee2d09deb081fb.js} +1 -1
- package/.next/static/chunks/pages/prompt-f00bf2272142bfa1.js +1 -0
- package/.next/static/chunks/pages/{settings-8ebbd4413f976a60.js → settings-f6dfff648cf9ac0e.js} +1 -1
- package/.next/static/chunks/pages/skills/[id]/{edit-334c249d48dc651d.js → edit-89bbed9a3a854b04.js} +1 -1
- package/.next/static/chunks/pages/skills/[id]-101d753aa8fbf7a9.js +1 -0
- package/.next/static/chunks/pages/skills/{new-750c28325b6c869a.js → new-124599c772150a1d.js} +1 -1
- package/.next/static/chunks/pages/{skills-25f02f34e4a24e7e.js → skills-476714776be63ce5.js} +1 -1
- package/.next/static/chunks/pages/system/logs-40edb648d89b0749.js +1 -0
- package/.next/static/css/39e9d8f998ce517b.css +1 -0
- package/package.json +1 -1
- package/public/apple-touch-icon.png +0 -0
- package/public/favicon.ico +0 -0
- package/public/favicon.svg +9 -0
- package/scripts/brand-moon-fit.cjs +147 -0
- package/scripts/generate-brand-assets.cjs +152 -0
- package/.next/static/cf07df1d78876548cb59ce9935b756d62660ad2a6b02180bef97865f98fcc4c8/_buildManifest.js +0 -1
- package/.next/static/chunks/257-9484b4285bd5f43b.js +0 -1
- package/.next/static/chunks/530-ccc3837d353bcf74.js +0 -1
- package/.next/static/chunks/573-c52901488f5731dd.js +0 -4
- package/.next/static/chunks/576-052a39d403d5d32e.js +0 -1
- package/.next/static/chunks/638-29ddb55b708c7969.js +0 -1
- package/.next/static/chunks/712-1f2d7c40d613f4d8.js +0 -1
- package/.next/static/chunks/815-585fb0b4aa9b369c.js +0 -16
- package/.next/static/chunks/933-e9c4889bb9f825ce.js +0 -1
- package/.next/static/chunks/pages/canvas/[id]-996d9a43ff45a4b3.js +0 -1
- package/.next/static/chunks/pages/knowledge/source-preview-c803a44df4b1d2f2.js +0 -1
- package/.next/static/chunks/pages/knowledge-135c4c9260f07108.js +0 -1
- package/.next/static/chunks/pages/prompt-7559b2569b3934a5.js +0 -1
- package/.next/static/chunks/pages/skills/[id]-eb1bdec00ba09ad2.js +0 -1
- package/.next/static/chunks/pages/system/logs-e08749c3a8f9a104.js +0 -1
- package/.next/static/css/5bab0d7ea874d4e0.css +0 -1
- /package/.next/static/{cf07df1d78876548cb59ce9935b756d62660ad2a6b02180bef97865f98fcc4c8 → 77a0c591cb44f2d0fda8be7c18cd915e32ecb5272d201914c0e332124a63d539}/_ssgManifest.js +0 -0
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[815],{838:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"}},8263:(e,t,r)=>{r.d(t,{A:()=>a});var n=r(97109),o=r(24983),l=r(88483);function i(){return(i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}let a=n.forwardRef((e,t)=>n.createElement(l.A,i({},e,{ref:t,icon:o.A})))},24716:(e,t,r)=>{r.d(t,{A:()=>p});var n=r(97109),o=r(3638),l=r(4034),i=r(74567),a=r(49644),s=r(7961),u=r(77032),c=r(10540);let d=(0,c.OF)("Addon",e=>[(e=>{let{componentCls:t,borderRadius:r,paddingSM:n,colorBorder:o,paddingXS:l,fontSizeLG:i,fontSizeSM:a,borderRadiusLG:u,borderRadiusSM:d,colorBgContainerDisabled:p,lineWidth:f,antCls:m}=e,[g,h]=(0,c.PN)(m,"space-addon");return{[t]:[{...(0,s.dF)(e),display:"inline-flex",alignItems:"center",gap:0,whiteSpace:"nowrap",paddingInline:n,margin:0,borderWidth:f,borderStyle:"solid",borderRadius:r,"&:hover":{zIndex:0},[`&${t}-disabled`]:{color:e.colorTextDisabled},"&-large":{fontSize:i,borderRadius:u},"&-small":{paddingInline:l,borderRadius:d,fontSize:a},"&-compact-last-item":{borderEndStartRadius:0,borderStartStartRadius:0},"&-compact-first-item":{borderEndEndRadius:0,borderStartEndRadius:0},"&-compact-item:not(:first-child):not(:last-child)":{borderRadius:0},"&-compact-item:not(:last-child)":{borderInlineEndWidth:0},"&-compact-item:not(:first-child)":{borderInlineStartWidth:0}},{[g("addon-border-color")]:o,[g("addon-background")]:p,[g("addon-border-color-outlined")]:o,[g("addon-background-filled")]:p,borderColor:h("addon-border-color"),background:h("addon-background"),"&-variant-outlined":{[g("addon-border-color")]:h("addon-border-color-outlined")},"&-variant-filled":{[g("addon-border-color")]:"transparent",[g("addon-background")]:h("addon-background-filled"),[`&${t}-disabled`]:{[g("addon-border-color")]:o,[g("addon-background")]:p}},"&-variant-borderless":{border:"none",background:"transparent"},"&-variant-underlined":{border:"none",background:"transparent"}},{"&-status-error":{[g("addon-border-color-outlined")]:e.colorError,[g("addon-background-filled")]:e.colorErrorBg,color:e.colorError},"&-status-warning":{[g("addon-border-color-outlined")]:e.colorWarning,[g("addon-background-filled")]:e.colorWarningBg,color:e.colorWarning}}]}})(e),(0,u.G)(e,{focus:!1})]),p=n.forwardRef((e,t)=>{let{className:r,children:s,style:u,prefixCls:c,variant:p="outlined",disabled:f,status:m,...g}=e,{getPrefixCls:h,direction:b}=n.useContext(i.QO),v=h("space-addon",c),[y,$]=d(v),{compactItemClassnames:E,compactSize:w}=(0,a.RQ)(v,b),x=(0,l.L)(v,m),S=(0,o.$)(v,y,E,$,`${v}-variant-${p}`,x,{[`${v}-${w}`]:w,[`${v}-disabled`]:f},r);return n.createElement("div",{ref:t,className:S,style:u,...g},s)})},24983:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"}},30486:(e,t,r)=>{r.d(t,{A:()=>a});var n=r(97109),o=r(58758),l=r(88483);function i(){return(i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}let a=n.forwardRef((e,t)=>n.createElement(l.A,i({},e,{ref:t,icon:o.A})))},33442:(e,t,r)=>{r.d(t,{A:()=>E});var n=r(97109),o=r(42644),l=r(3638),i=r(26047);function a(e){return["small","middle","medium","large"].includes(e)}function s(e){return!!e&&(0,i.Et)(e)}var u=r(5045),c=r(92162),d=r(74567),p=r(24716),f=r(49644);let m=n.createContext({latestIndex:0}),g=m.Provider,h=e=>{let{className:t,prefix:r,index:o,children:a,separator:s,style:u,classNames:c,styles:d}=e,{latestIndex:p}=n.useContext(m);return(0,i.AZ)(a)?n.createElement(n.Fragment,null,n.createElement("div",{className:t,style:u},a),o<p&&s&&n.createElement("span",{className:(0,l.$)(`${r}-item-separator`,c?.separator),style:d?.separator},s)):null};var b=r(10540),v=r(28403);let y=(0,b.OF)("Space",e=>{let t=(0,v.oX)(e,{spaceGapSmallSize:e.paddingXS,spaceGapMiddleSize:e.padding,spaceGapLargeSize:e.paddingLG});return[(e=>{let{componentCls:t,antCls:r}=e;return{[t]:{display:"inline-flex","&-rtl":{direction:"rtl"},"&-vertical":{flexDirection:"column"},"&-align":{flexDirection:"column","&-center":{alignItems:"center"},"&-start":{alignItems:"flex-start"},"&-end":{alignItems:"flex-end"},"&-baseline":{alignItems:"baseline"}},[`${t}-item:empty`]:{display:"none"},[`${t}-item > ${r}-badge-not-a-wrapper:only-child`]:{display:"block"}}}})(t),(e=>{let{componentCls:t}=e;return{[t]:{"&-gap-row-small":{rowGap:e.spaceGapSmallSize},"&-gap-row-medium, &-gap-row-middle":{rowGap:e.spaceGapMiddleSize},"&-gap-row-large":{rowGap:e.spaceGapLargeSize},"&-gap-col-small":{columnGap:e.spaceGapSmallSize},"&-gap-col-medium, &-gap-col-middle":{columnGap:e.spaceGapMiddleSize},"&-gap-col-large":{columnGap:e.spaceGapLargeSize}}}})(t)]},()=>({}),{resetStyle:!1}),$=n.forwardRef((e,t)=>{let{getPrefixCls:r,direction:p,size:f,className:m,style:b,classNames:v,styles:$}=(0,d.TP)("space"),{size:E=f??"small",align:w,className:x,rootClassName:S,children:D,direction:M,orientation:R,prefixCls:C,split:I,separator:O,style:A,vertical:N,wrap:k=!1,classNames:z,styles:L,...T}=e,[P,H]=Array.isArray(E)?E:[E,E],B=a(H),_=a(P),W=s(H),j=s(P),F=(0,o.$r)(D,{keepEmpty:!0}),[G,K]=(0,u.M)(R,N,M),V=void 0!==w||K?w:"center",X=O??I,Y=r("space",C),[U,q]=y(Y),Q={...e,size:E,orientation:G,align:V},[J,Z]=(0,c.AV)([v,z],[$,L],{props:Q}),ee=(0,l.$)(Y,m,U,`${Y}-${G}`,{[`${Y}-rtl`]:"rtl"===p,[`${Y}-align-${V}`]:V,[`${Y}-gap-row-${H}`]:B,[`${Y}-gap-col-${P}`]:_},x,S,q,J.root),et=(0,l.$)(`${Y}-item`,J.item),er=F.map((e,t)=>{let r=e?.key||`${et}-${t}`;return n.createElement(h,{prefix:Y,classNames:J,styles:Z,className:et,key:r,index:t,separator:X,style:Z.item},e)}),en=n.useMemo(()=>({latestIndex:F.reduce((e,t,r)=>(0,i.AZ)(t)?r:e,0)}),[F]);if(0===F.length)return null;let eo={};return k&&(eo.flexWrap="wrap"),!_&&j&&(eo.columnGap=P),!B&&W&&(eo.rowGap=H),n.createElement("div",{ref:t,className:ee,style:{...eo,...Z.root,...b,...A},...T},n.createElement(g,{value:en},er))});$.Compact=f.Ay,$.Addon=p.A;let E=$},57271:(e,t,r)=>{r.d(t,{A:()=>eP});var n=r(97109),o=r(42644),l=r(3638);let i=n.createContext(null);function a(){return n.useContext(i)}function s(e,t){return e.filter(e=>e).some(e=>e.contains(t)||e===t)}var u=r(82865);function c(){return(c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}let d=n.forwardRef((e,t)=>{let{prefixCls:r,disabled:o,visible:i,children:a,popupElement:s,animation:d,transitionName:p,popupStyle:f,popupClassName:m,direction:g="ltr",placement:h,builtinPlacements:b,popupMatchSelectWidth:v,popupRender:y,popupAlign:$,getPopupContainer:E,empty:w,onPopupVisibleChange:x,onPopupMouseEnter:S,onPopupMouseDown:D,onPopupBlur:M,...R}=e,C=`${r}-dropdown`,I=s;y&&(I=y(s));let O=n.useMemo(()=>b||(e=>{let t=+(!0!==e);return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"}}})(v),[b,v]),A=d?`${C}-${d}`:p,N="number"==typeof v,k=n.useMemo(()=>!1===v||N?"minWidth":"width",[v,N]),z=f;N&&(z={...f,width:v});let L=n.useRef(null);return n.useImperativeHandle(t,()=>({getPopupElement:()=>L.current?.popupElement})),n.createElement(u.Ay,c({},R,{showAction:x?["click"]:[],hideAction:x?["click"]:[],popupPlacement:h||("rtl"===g?"bottomRight":"bottomLeft"),builtinPlacements:O,prefixCls:C,popupMotion:{motionName:A},popup:n.createElement("div",{onMouseEnter:S,onMouseDown:D,onBlur:M},I),ref:L,stretch:k,popupAlign:$,popupVisible:i,getPopupContainer:E,popupClassName:(0,l.$)(m,{[`${C}-empty`]:w}),popupStyle:z,onPopupVisibleChange:x}),a)});function p(e,t){let r,{key:n}=e;return("value"in e&&({value:r}=e),null!=n)?n:void 0!==r?r:`rc-index-key-${t}`}function f(e){return void 0!==e&&!Number.isNaN(e)}function m(e,t){let{label:r,value:n,options:o,groupLabel:l}=e||{},i=r||(t?"children":"label");return{label:i,value:n||"value",options:o||"options",groupLabel:l||i}}function g(e){let t={...e};return"props"in t||Object.defineProperty(t,"props",{get:()=>((0,o.$e)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),t)}),t}function h(e){let{visible:t,values:r}=e;return t?n.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},`${r.slice(0,50).map(({label:e,value:t})=>["number","string"].includes(typeof e)?e:t).join(", ")}`,r.length>50?", ...":null):null}let b=(e,t=1)=>{if(t<=0)return void e();(e=>{let t=new MessageChannel;t.port1.onmessage=e,t.port2.postMessage(null)})(()=>{b(e,t-1)})};function v(e){let{children:t,...r}=e;return t?n.createElement("div",r,t):null}let y=n.createContext(null);function $(){return n.useContext(y)}let E=n.forwardRef((e,t)=>{let{onChange:r,onKeyDown:i,onBlur:s,style:u,syncWidth:c,value:d,className:p,autoComplete:f,...m}=e,{prefixCls:g,mode:h,onSearch:b,onSearchSubmit:v,onInputBlur:y,autoFocus:E,tokenWithEnter:w,placeholder:x,components:{input:S="input"}}=$(),{id:D,classNames:M,styles:R,open:C,activeDescendantId:I,role:O,disabled:A}=a()||{},N=(0,l.$)(`${g}-input`,M?.input,p),k=n.useRef(!1),z=n.useRef(null),L=n.useRef(null);n.useImperativeHandle(t,()=>L.current);let[T,P]=n.useState(void 0);(0,o.Nf)(()=>{let e=L.current;c&&e&&(e.style.width="0px",P(e.scrollWidth),e.style.width="")},[c,d]);let H={id:D,type:"text",...m,ref:L,style:{...R?.input,...u,"--select-input-width":T},autoFocus:E,autoComplete:f||"new-password",className:N,disabled:A,value:d||"",onChange:e=>{let{value:t}=e.target;if(w&&z.current&&/[\r\n]/.test(z.current)){let e=z.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");t=t.replace(e,z.current)}z.current=null,b&&b(t,!0,k.current),r?.(e)},onKeyDown:e=>{let{key:t}=e,{value:r}=e.currentTarget;"Enter"!==t||"tags"!==h||C||k.current||!v||v(r),i?.(e)},onBlur:e=>{y?.(),s?.(e)},onPaste:e=>{let{clipboardData:t}=e;z.current=t?.getData("text")||""},onCompositionStart:()=>{k.current=!0},onCompositionEnd:e=>{if(k.current=!1,"combobox"!==h){let{value:t}=e.currentTarget;b?.(t,!0,!1)}},role:O||"combobox","aria-expanded":C||!1,"aria-haspopup":"listbox","aria-owns":C?`${D}_list`:void 0,"aria-autocomplete":"list","aria-controls":C?`${D}_list`:void 0,"aria-activedescendant":C?I:void 0};if(n.isValidElement(S)){let t=S.props||{},r={placeholder:e.placeholder||x,...H,...t};return Object.keys(t).forEach(e=>{let n=t[e];"function"==typeof n&&(r[e]=(...t)=>{n(...t),H[e]?.(...t)})}),r.ref=(0,o.K4)(S.ref,H.ref),n.cloneElement(S,r)}return n.createElement(S,H)});function w(e){let{prefixCls:t,placeholder:r,displayValues:o}=$(),{classNames:i,styles:s}=a(),{show:u=!0}=e;return o.length?null:n.createElement("div",{className:(0,l.$)(`${t}-placeholder`,i?.placeholder),style:{visibility:u?"visible":"hidden",...s?.placeholder}},r)}let x=n.createContext(null);function S(e){return Array.isArray(e)?e:void 0!==e?[e]:[]}function D(e){return["string","number"].includes(typeof e)}function M(e){let t;return e&&(D(e.title)?t=e.title.toString():D(e.label)&&(t=e.label.toString())),t}function R(){return(R=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}"undefined"!=typeof window&&window.document&&window.document.documentElement;let C=n.forwardRef(({inputProps:e},t)=>{let{prefixCls:r,searchValue:o,activeValue:i,displayValues:s,maxLength:u,mode:c,components:d}=$(),{triggerOpen:p,title:f,showSearch:m,classNames:g,styles:h}=a(),b=n.useContext(x),[v,y]=n.useState(!1),S="combobox"===c,D=s[0],C=n.useMemo(()=>S&&i&&!v&&p?i:m?o:"",[S,i,v,p,o,m]),[I,O,A,N]=n.useMemo(()=>{let e,t,r;if(D&&b?.flattenOptions){let n=b.flattenOptions.find(e=>e.value===D.value);n?.data&&(e=n.data.className,t=n.data.style,r=M(n.data))}D&&!r&&(r=M(D)),void 0!==f&&(r=f);let n=!!e||!!t;return[e,t,r,n]},[D,b?.flattenOptions,f]);n.useEffect(()=>{S&&y(!1)},[S,i]);let k=D&&null!==D.label&&void 0!==D.label&&""!==String(D.label).trim(),z=S&&d?.input?null:D?N?n.createElement("div",{className:(0,l.$)(`${r}-content-value`,I),style:{...C?{visibility:"hidden"}:{},...O},title:A},D.label):D.label:n.createElement(w,{show:!C});return n.createElement("div",{className:(0,l.$)(`${r}-content`,k&&`${r}-content-has-value`,C&&`${r}-content-has-search-value`,N&&`${r}-content-has-option-style`,g?.content),style:h?.content,title:N?void 0:A},z,n.createElement(E,R({ref:t},e,{value:C,maxLength:"combobox"===c?u:void 0,onChange:t=>{y(!0),e.onChange?.(t)}})))});var I=r(61910);let O=e=>{let{className:t,style:r,customizeIcon:o,customizeIconProps:i,children:a,onMouseDown:s,onClick:u}=e,c="function"==typeof o?o(i):o;return n.createElement("span",{className:t,onMouseDown:e=>{e.preventDefault(),s?.(e)},style:{userSelect:"none",WebkitUserSelect:"none",...r},unselectable:"on",onClick:u,"aria-hidden":!0},void 0!==c?c:n.createElement("span",{className:(0,l.$)(t.split(/\s+/).map(e=>`${e}-icon`))},a))};function A(){return(A=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function N(e){return e.key??e.value}let k=e=>{e.preventDefault(),e.stopPropagation()},z=n.forwardRef(function({inputProps:e},t){let{prefixCls:r,displayValues:o,searchValue:i,mode:s,onSelectorRemove:u,removeIcon:c}=$(),{disabled:d,showSearch:p,triggerOpen:f,rawOpen:m,toggleOpen:g,autoClearSearchValue:h,tagRender:b,maxTagPlaceholder:v,maxTagTextLength:y,maxTagCount:x,classNames:S,styles:D}=a(),R=`${r}-selection-item`,C=i;m||"multiple"!==s||!1===h||(C="");let z=p&&C||"",L=p&&!d,T=c??"\xd7",P=v??(e=>`+ ${e.length} ...`),H=(e,t,r,o,i)=>n.createElement("span",{title:M(e),className:(0,l.$)(R,{[`${R}-disabled`]:r},S?.item),style:D?.item},n.createElement("span",{className:(0,l.$)(`${R}-content`,S?.itemContent),style:D?.itemContent},t),o&&n.createElement(O,{className:(0,l.$)(`${R}-remove`,S?.itemRemove),style:D?.itemRemove,onMouseDown:k,onClick:i,customizeIcon:T},"\xd7")),B=(e,t,r,o,l,i,a)=>n.createElement("span",{onMouseDown:e=>{k(e),g(!f)}},b({label:t,value:e,index:a?.index,disabled:r,closable:o,onClose:l,isMaxTag:!!i}));return n.createElement(I.A,{prefixCls:`${r}-content`,className:S?.content,style:D?.content,prefix:!o.length&&!z&&n.createElement(w,null),data:o,renderItem:(e,t)=>{let{disabled:r,label:n,value:o}=e,l=!d&&!r,i=n;if("number"==typeof y&&("string"==typeof n||"number"==typeof n)){let e=String(i);e.length>y&&(i=`${e.slice(0,y)}...`)}let a=t=>{t&&t.stopPropagation(),u?.(e)};return"function"==typeof b?B(o,i,r,l,a,void 0,t):H(e,i,r,l,a)},renderRest:e=>{if(!o.length)return null;let t="function"==typeof P?P(e):P;return"function"==typeof b?B(void 0,t,!1,!1,void 0,!0):H({title:t},t,!1)},suffix:n.createElement(E,A({ref:t,disabled:d,readOnly:!L},e,{value:z||"",syncWidth:!0})),itemKey:N,maxCount:x})}),L=n.forwardRef(function(e,t){let{multiple:r,onInputKeyDown:l,tabIndex:i}=$(),s=a(),{showSearch:u}=s,c={...(0,o.KE)(s,{aria:!0}),onKeyDown:l,readOnly:!u,tabIndex:i};return r?n.createElement(z,{ref:t,inputProps:c}):n.createElement(C,{ref:t,inputProps:c})});function T(){return(T=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}let P=["value","onChange","removeIcon","placeholder","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex","activeValue","onSelectorRemove","focused"],H=n.forwardRef(function(e,t){let{prefixCls:r,className:i,style:s,prefix:u,suffix:c,clearIcon:d,children:p,multiple:f,displayValues:m,placeholder:g,mode:h,searchValue:b,onSearch:$,onSearchSubmit:E,onInputBlur:w,maxLength:x,autoFocus:S,onMouseDown:D,onClearMouseDown:M,onInputKeyDown:R,onSelectorRemove:C,tokenWithEnter:I,components:O,...A}=e,{triggerOpen:N,toggleOpen:k,showSearch:z,disabled:H,loading:B,classNames:_,styles:W}=a(),j=n.useRef(null),F=n.useRef(null),G=(0,o._q)(e=>{var t;let{which:r}=e,n=F.current instanceof HTMLTextAreaElement;!n&&N&&(r===o.DD.UP||r===o.DD.DOWN)&&e.preventDefault(),R&&R(e),!(n&&!N&&~[o.DD.UP,o.DD.DOWN,o.DD.LEFT,o.DD.RIGHT].indexOf(r))&&!(e.ctrlKey||e.altKey||e.metaKey)&&(t=r)&&![o.DD.ESC,o.DD.SHIFT,o.DD.BACKSPACE,o.DD.TAB,o.DD.WIN_KEY,o.DD.ALT,o.DD.META,o.DD.WIN_KEY_RIGHT,o.DD.CTRL,o.DD.SEMICOLON,o.DD.EQUALS,o.DD.CAPS_LOCK,o.DD.CONTEXT_MENU,o.DD.UP,o.DD.LEFT,o.DD.RIGHT,o.DD.F1,o.DD.F2,o.DD.F3,o.DD.F4,o.DD.F5,o.DD.F6,o.DD.F7,o.DD.F8,o.DD.F9,o.DD.F10,o.DD.F11,o.DD.F12].includes(t)&&k(!0)});n.useImperativeHandle(t,()=>({focus:e=>{(F.current||j.current).focus?.(e)},blur:()=>{(F.current||j.current).blur?.()},nativeElement:(0,o.rb)(j.current)}));let K=(0,o._q)(e=>{if(!H){let t=(0,o.rb)(F.current);e.nativeEvent._ori_target=t;let r=t===e.target||t?.contains(e.target);t&&!r&&e.preventDefault();let n=N&&!f&&("combobox"===h||z),l=N&&f&&r;e.nativeEvent._select_lazy?N&&!f&&k(!1):(F.current?.focus(),n||l||k())}D?.(e)}),{root:V}=O,X=(0,o.cJ)(A,P),Y=Object.keys((0,o.KE)(X,{aria:!0})),U={...e,onInputKeyDown:G};if(V){let e=V.props||{},t={...e,...X};return(Object.keys(e).forEach(r=>{let n=e[r],o=X[r];"function"==typeof n&&"function"==typeof o&&(t[r]=(...e)=>{o(...e),n(...e)})}),n.isValidElement(V))?n.cloneElement(V,{...t,ref:(0,o.K4)(V.ref,j)}):n.createElement(V,T({},t,{ref:j}))}return n.createElement(y.Provider,{value:U},n.createElement("div",T({},(0,o.cJ)(X,Y),{ref:j,className:i,style:s,onMouseDown:K}),n.createElement(v,{className:(0,l.$)(`${r}-prefix`,_?.prefix),style:W?.prefix},u),n.createElement(L,{ref:F}),n.createElement(v,{className:(0,l.$)(`${r}-suffix`,{[`${r}-suffix-loading`]:B},_?.suffix),style:W?.suffix},c),d&&n.createElement(v,{className:(0,l.$)(`${r}-clear`,_?.clear),style:W?.clear,onMouseDown:e=>{e.nativeEvent._select_lazy=!0,M?.(e)}},d),p))});function B(){return(B=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}let _=e=>"tags"===e||"multiple"===e,W=n.forwardRef((e,t)=>{let r,{id:a,prefixCls:u,className:c,styles:p,classNames:m,showSearch:g,tagRender:v,showScrollBar:y="optional",direction:$,omitDomProps:E,displayValues:w,onDisplayValuesChange:x,emptyOptions:S,notFoundContent:D="Not Found",onClear:M,maxCount:R,placeholder:C,mode:I,disabled:O,loading:A,getInputElement:N,getRawInputElement:k,open:z,defaultOpen:L,onPopupVisibleChange:T,activeValue:P,onActiveValueChange:W,activeDescendantId:j,searchValue:F,autoClearSearchValue:G,onSearch:K,onSearchSplit:V,tokenSeparators:X,allowClear:Y,prefix:U,suffix:q,suffixIcon:Q,clearIcon:J,OptionList:Z,animation:ee,transitionName:et,popupStyle:er,popupClassName:en,popupMatchSelectWidth:eo,popupRender:el,popupAlign:ei,placement:ea,builtinPlacements:es,getPopupContainer:eu,showAction:ec=[],onFocus:ed,onBlur:ep,onKeyUp:ef,onKeyDown:em,onMouseDown:eg,components:eh,...eb}=e,ev=_(I),ey=n.useRef(null),e$=n.useRef(null),eE=n.useRef(null),[ew,ex]=n.useState(!1);n.useImperativeHandle(t,()=>({focus:ey.current?.focus,blur:ey.current?.blur,scrollTo:e=>eE.current?.scrollTo(e),nativeElement:(0,o.rb)(ey.current)}));let eS=function(e,t,r){return n.useMemo(()=>{let{root:n,input:o}=e||{};return r&&(n=r()),t&&(o=t()),{root:n,input:o}},[e,t,r])}(eh,N,k),eD=n.useMemo(()=>{if("combobox"!==I)return F;let e=w[0]?.value;return"string"==typeof e||"number"==typeof e?String(e):""},[F,I,w]),eM="combobox"===I&&"function"==typeof N&&N()||null,eR=!D&&S,[eC,eI,eO,eA]=function(e,t,r,l){let[i,a]=(0,n.useState)(!1);(0,n.useEffect)(()=>{a(!0)},[]);let[s,u]=(0,o.PW)(e,t),[c,d]=(0,n.useState)(!1),p=!!i&&s,f=l(p),m=(0,n.useRef)(0),g=(0,o._q)(e=>{r&&f!==e&&r(e),u(e)}),h=(0,o._q)((e,t={})=>{let{cancelFun:r}=t;m.current+=1;let n=m.current,o="boolean"==typeof e?e:!f;function l(){n!==m.current||r?.()||(g(o),d(!1))}d(!o),o?l():b(()=>{l()})});return[p,f,h,c]}(L||!1,z,T,e=>!O&&!eR&&e),eN=n.useMemo(()=>"function"==typeof X||(X||[]).some(e=>["\n","\r\n"].includes(e)),[X]),ek=n.useMemo(()=>"function"==typeof X?(e,t)=>{let r=X(e),n=Array.isArray(r)&&1===r.length&&r[0]===e;return Array.isArray(r)&&r.length&&!n?void 0!==t?r.slice(0,t):r:null}:(e,t)=>((e,t,r)=>{if(!t||!t.length)return null;let n=!1,o=(e,[t,...r])=>{if(!t)return[e];let l=e.split(t);return n=n||l.length>1,l.reduce((e,t)=>[...e,...o(t,r)],[]).filter(Boolean)},l=o(e,t);return n?void 0!==r?l.slice(0,r):l:null})(e,X,t),[X]),ez=(e,t,r)=>{if(ev&&f(R)&&w.length>=R)return;let n=!0,o=e;W?.(null);let l=f(R)?R-w.length:void 0,i=r?null:ek(e,l);return"combobox"!==I&&i&&(o="",V?.(i),eO(!1),n=!1),K&&eD!==o&&K(o,{source:t?"typing":"effect"}),e&&t&&n&&eO(!0),n};n.useEffect(()=>{eC||ev||"combobox"===I||ez("",!1,!1)},[eC]),n.useEffect(()=>{O&&(eO(!1),ex(!1))},[O,eI]);let[eL,eT]=function(e=250){let t=n.useRef(null),r=n.useRef(null);return n.useEffect(()=>()=>{window.clearTimeout(r.current)},[]),[()=>t.current,function(n){(n||null===t.current)&&(t.current=n),window.clearTimeout(r.current),r.current=window.setTimeout(()=>{t.current=null},e)}]}(),eP=n.useRef(!1),eH=(0,o._q)(e=>{x(w.filter(t=>t!==e),{type:"remove",values:[e]})}),eB=()=>[(0,o.rb)(ey.current),e$.current?.getPopupElement()];!function(e,t,r,l){let i=(0,o._q)(n=>{if(l)return;let o=n.target;o.shadowRoot&&n.composed&&(o=n.composedPath()[0]||o),n._ori_target&&(o=n._ori_target),t&&!s(e(),o)&&r(!1)});n.useEffect(()=>(window.addEventListener("mousedown",i),()=>window.removeEventListener("mousedown",i)),[i])}(eB,eI,eO,!!eS.root);let e_=n.useRef(!1),eW=()=>{eI&&!e_.current&&eO(!1,{cancelFun:()=>s(eB(),document.activeElement)})},ej=(e,...t)=>{let{target:r}=e,n=e$.current?.getPopupElement();n?.contains(r)&&eO&&eO(!0),eg?.(e,...t),e_.current=!0,b(()=>{e_.current=!1})},[,eF]=n.useState({});eS.root&&(r=e=>{eO(e)});let eG=n.useMemo(()=>({...e,notFoundContent:D,open:eI,triggerOpen:eI,rawOpen:eC,id:a,showSearch:g,multiple:ev,toggleOpen:eO,showScrollBar:y,styles:p,classNames:m,lockOptions:eA}),[e,D,eO,a,g,ev,eI,eC,y,p,m,eA]),eK=n.useMemo(()=>{let e=q??Q;return"function"==typeof e?e({searchValue:eD,open:eI,focused:ew,showSearch:g,loading:A}):e},[q,Q,eD,eI,ew,g,A]),{allowClear:eV,clearIcon:eX}=((e,t,r,o,l=!1,i,a)=>{let s=(0,n.useMemo)(()=>"boolean"==typeof r?{allowClear:r}:r&&"object"==typeof r?r:{allowClear:!1},[r]);return(0,n.useMemo)(()=>{let e=!l&&!1!==s.allowClear&&(t.length||i)&&("combobox"!==a||""!==i);return{allowClear:e,clearIcon:e?s.clearIcon||o||"\xd7":null}},[s,o,l,t.length,i,a])})(0,w,Y,J,O,eD,I),eY=n.createElement(Z,{ref:eE}),eU=(0,l.$)(u,c,{[`${u}-focused`]:ew,[`${u}-multiple`]:ev,[`${u}-single`]:!ev,[`${u}-allow-clear`]:eV,[`${u}-show-arrow`]:null!=eK,[`${u}-disabled`]:O,[`${u}-loading`]:A,[`${u}-open`]:eI,[`${u}-customize-input`]:eM,[`${u}-show-search`]:g}),eq=n.createElement(H,B({},eb,{ref:ey,prefixCls:u,className:eU,focused:ew,prefix:U,suffix:eK,clearIcon:eX,multiple:ev,mode:I,displayValues:w,placeholder:C,searchValue:eD,activeValue:P,onSearch:ez,onSearchSubmit:e=>{e&&e.trim()&&K(e,{source:"submit"})},onInputBlur:()=>{eP.current=!1},onFocus:e=>{ex(!0),O||(ec.includes("focus")&&eO(!0),ed?.(e))},onBlur:e=>{ex(!1),eD&&("tags"===I?K(eD,{source:"submit"}):"multiple"===I&&K("",{source:"blur"})),eW(),O||ep?.(e)},onClearMouseDown:()=>{M?.(),ey.current?.focus(),x([],{type:"clear",values:w}),ez("",!1,!1)},onKeyDown:e=>{let t=eL(),{key:r}=e,n="Enter"===r,o=" "===r;if(n||o){let t="combobox"===I,r=t||g;(o&&!r||n&&!t)&&e.preventDefault(),eI||eO(!0)}if(eT(!!eD),"Backspace"===r&&!t&&ev&&!eD&&w.length){let e=[...w],t=null;for(let r=e.length-1;r>=0;r-=1){let n=e[r];if(!n.disabled){e.splice(r,1),t=n;break}}t&&x(e,{type:"remove",values:[t]})}!eI||n&&eP.current||o||(n&&(eP.current=!0),eE.current?.onKeyDown(e)),em?.(e)},onKeyUp:(e,...t)=>{eI&&eE.current?.onKeyUp(e,...t),"Enter"===e.key&&(eP.current=!1),ef?.(e,...t)},onSelectorRemove:eH,tokenWithEnter:eN,onMouseDown:ej,components:eS}));return eq=n.createElement(d,{ref:e$,disabled:O,prefixCls:u,visible:eI,popupElement:eY,animation:ee,transitionName:et,popupStyle:er,popupClassName:en,direction:$,popupMatchSelectWidth:eo,popupRender:el,popupAlign:ei,placement:ea,builtinPlacements:es,getPopupContainer:eu,empty:S,onPopupVisibleChange:r,onPopupMouseEnter:function(){eF({})},onPopupMouseDown:ej,onPopupBlur:eW},eq),n.createElement(i.Provider,{value:eG},n.createElement(h,{visible:ew&&!eI,values:w}),eq)}),j=()=>null;j.isSelectOptGroup=!0;let F=()=>null;F.isSelectOption=!0;var G=r(93307);function K(){return(K=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function V(e){return"string"==typeof e||"number"==typeof e}let X=n.forwardRef((e,t)=>{let{prefixCls:r,id:i,open:s,multiple:u,mode:c,searchValue:d,toggleOpen:p,notFoundContent:m,onPopupScroll:g,showScrollBar:h,lockOptions:b}=a(),{maxCount:v,flattenOptions:y,onActiveValue:$,defaultActiveFirstOption:E,onSelect:w,menuItemSelectedIcon:S,rawValues:D,fieldNames:M,virtual:R,direction:C,listHeight:I,listItemHeight:A,optionRender:N,classNames:k,styles:z}=n.useContext(x),L=`${r}-item`,T=(0,o.Kr)(()=>y,[s,b],(e,t)=>t[0]&&!t[1]),P=n.useRef(null),H=n.useMemo(()=>u&&f(v)&&D?.size>=v,[u,v,D?.size]),B=e=>{e.preventDefault()},_=e=>{P.current?.scrollTo("number"==typeof e?{index:e}:e)},W=n.useCallback(e=>"combobox"!==c&&D.has(e),[c,[...D].toString(),D.size]),j=(e,t=1)=>{let r=T.length;for(let n=0;n<r;n+=1){let o=(e+n*t+r)%r,{group:l,data:i}=T[o]||{};if(!l&&!i?.disabled&&(W(i.value)||!H))return o}return -1},[F,X]=n.useState(()=>j(0)),Y=(e,t=!1)=>{X(e);let r={source:t?"keyboard":"mouse"},n=T[e];if(!n)return void $(null,-1,r);$(n.value,e,r)};(0,n.useEffect)(()=>{Y(!1!==E?j(0):-1)},[T.length,d]);let U=n.useCallback(e=>"combobox"===c?String(e).toLowerCase()===d.toLowerCase():D.has(e),[c,d,[...D].toString(),D.size]);(0,n.useEffect)(()=>{let e;if(!u&&s&&1===D.size){let t=Array.from(D)[0],r=T.findIndex(({data:e})=>d?String(e.value).startsWith(d):e.value===t);-1!==r&&(Y(r),e=setTimeout(()=>{_(r)}))}return s&&P.current?.scrollTo(void 0),()=>clearTimeout(e)},[s,d]);let q=e=>{void 0!==e&&w(e,{selected:!D.has(e)}),u||p(!1)};if(n.useImperativeHandle(t,()=>({onKeyDown:e=>{let{which:t,ctrlKey:r}=e;switch(t){case o.DD.N:case o.DD.P:case o.DD.UP:case o.DD.DOWN:{let e=0;if(t===o.DD.UP?e=-1:t===o.DD.DOWN?e=1:/(mac\sos|macintosh)/i.test(navigator.appVersion)&&r&&(t===o.DD.N?e=1:t===o.DD.P&&(e=-1)),0!==e){let t=j(F+e,e);_(t),Y(t,!0)}break}case o.DD.TAB:case o.DD.ENTER:{let t=T[F];if(!t||t.data.disabled)return q(void 0);!H||D.has(t.value)?q(t.value):q(void 0),s&&e.preventDefault();break}case o.DD.ESC:p(!1),s&&e.stopPropagation()}},onKeyUp:()=>{},scrollTo:e=>{_(e)}})),0===T.length)return n.createElement("div",{role:"listbox",id:`${i}_list`,className:`${L}-empty`,onMouseDown:B},m);let Q=Object.keys(M).map(e=>M[e]);function J(e,t){let{group:r}=e;return{role:r?"presentation":"option",id:`${i}_list_${t}`}}let Z=e=>{let t=T[e];if(!t)return null;let r=t.data||{},{value:l,disabled:i}=r,{group:a}=t,s=(0,o.KE)(r,!0),u=t.label;return t?n.createElement("div",K({"aria-label":"string"!=typeof u||a?null:u},s,{key:e},J(t,e),{"aria-selected":U(l),"aria-disabled":i}),l):null},ee={role:"listbox",id:`${i}_list`};return n.createElement(n.Fragment,null,R&&n.createElement("div",K({},ee,{style:{height:0,width:0,overflow:"hidden"}}),Z(F-1),Z(F),Z(F+1)),n.createElement(G.A,{itemKey:"key",ref:P,data:T,height:I,itemHeight:A,fullHeight:!1,onMouseDown:B,onScroll:g,virtual:R,direction:C,innerProps:R?null:ee,showScrollBar:h,className:k?.popup?.list,style:z?.popup?.list},(e,t)=>{let{group:r,groupOption:i,data:a,label:s,value:u}=e,{key:c}=a;if(r){let e=a.title??(V(s)?s.toString():void 0);return n.createElement("div",{className:(0,l.$)(L,`${L}-group`,a.className),title:e},void 0!==s?s:c)}let{disabled:d,title:p,children:f,style:m,className:g,...h}=a,b=(0,o.cJ)(h,Q),v=W(u),y=d||!v&&H,$=`${L}-option`,E=(0,l.$)(L,$,g,k?.popup?.listItem,{[`${$}-grouped`]:i,[`${$}-active`]:F===t&&!y,[`${$}-disabled`]:y,[`${$}-selected`]:v}),w=e.label,x=!S||"function"==typeof S||v,D="number"==typeof w?w:w||u,M=V(D)?D.toString():void 0;return void 0!==p&&(M=p),n.createElement("div",K({},(0,o.KE)(b),R?{}:J(e,t),{"aria-selected":R?void 0:U(u),"aria-disabled":y,className:E,title:M,onMouseMove:()=>{F===t||y||Y(t)},onClick:()=>{y||q(u)},style:{...z?.popup?.listItem,...m}}),n.createElement("div",{className:`${$}-content`},"function"==typeof N?N(e,{index:t}):D),n.isValidElement(S)||v,x&&n.createElement(O,{className:`${L}-option-state`,customizeIcon:S,customizeIconProps:{value:u,disabled:y,isSelected:v}},v?"✓":null))}))});function Y(e,t){return S(e).join("").toUpperCase().includes(t)}function U(e){let t=n.useRef();return t.current=e,n.useCallback((...e)=>t.current(...e),[])}function q(){return(q=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}let Q=["inputValue"],J=n.forwardRef((e,t)=>{let{id:r,mode:l,prefixCls:i="rc-select",backfill:a,fieldNames:s,showSearch:u,searchValue:c,onSearch:d,autoClearSearchValue:f,filterOption:h,optionFilterProp:b,filterSort:v,onSelect:y,onDeselect:$,onActive:E,popupMatchSelectWidth:w=!0,optionLabelProp:D,options:M,optionRender:R,children:C,defaultActiveFirstOption:I,menuItemSelectedIcon:O,virtual:A,direction:N,listHeight:k=200,listItemHeight:z=20,labelRender:L,value:T,defaultValue:P,labelInValue:H,onChange:B,maxCount:j,classNames:F,styles:G,...K}=e,[V,J]=function(e,t,r){let{filterOption:o,searchValue:l,optionFilterProp:i,filterSort:a,onSearch:s,autoClearSearchValue:u}=t;return n.useMemo(()=>{let t="object"==typeof e,n={filterOption:o,searchValue:l,optionFilterProp:i,filterSort:a,onSearch:s,autoClearSearchValue:u,...t?e:{}};return[!!t||"combobox"===r||"tags"===r||"multiple"===r&&void 0===e||e,n]},[r,e,o,l,i,a,s,u])}(u,{searchValue:c,onSearch:d,autoClearSearchValue:f,filterOption:h,optionFilterProp:b,filterSort:v},l),{filterOption:Z,searchValue:ee,optionFilterProp:et,filterSort:er,onSearch:en,autoClearSearchValue:eo=!0}=J,el=n.useMemo(()=>et?Array.isArray(et)?et:[et]:[],[et]),ei=(0,o.Bi)(r),ea=_(l),es=!!(!M&&C),eu=n.useMemo(()=>(void 0!==Z||"combobox"!==l)&&Z,[Z,l]),ec=n.useMemo(()=>m(s,es),[JSON.stringify(s),es]),[ed,ep]=(0,o.PW)("",ee),ef=ed||"",em=((e,t,r,l,i)=>n.useMemo(()=>{let a=e;e||(a=function e(t,r=!1){return(0,o.$r)(t).map((t,o)=>{if(!n.isValidElement(t)||!t.type)return null;let{type:{isSelectOptGroup:l},key:i,props:{children:a,...s}}=t;if(r||!l){let{key:e,props:{children:r,value:n,...o}}=t;return{key:e,value:void 0!==n?n:e,children:r,...o}}return{key:`__RC_SELECT_GRP__${null===i?o:i}__`,label:i,...s,options:e(a)}}).filter(e=>e)}(t));let s=new Map,u=new Map,c=(e,t,r)=>{r&&"string"==typeof r&&e.set(t[r],t)},d=(e,t=!1)=>{for(let n=0;n<e.length;n+=1){let o=e[n];!o[r.options]||t?(s.set(o[r.value],o),c(u,o,r.label),l.forEach(e=>{c(u,o,e)}),c(u,o,i)):d(o[r.options],!0)}};return d(a),{options:a,valueOptions:s,labelOptions:u}},[e,t,r,l,i]))(M,C,ec,el,D),{valueOptions:eg,labelOptions:eh,options:eb}=em,ev=n.useCallback(e=>S(e).map(e=>{let t,r,n,o;!function(e){return!e||"object"!=typeof e}(e)?(r=e.label,t=e.value):t=e;let l=eg.get(t);return l&&(void 0===r&&(r=l?.[D||ec.label]),n=l?.disabled,o=l?.title),{label:r,value:t,key:t,disabled:n,title:o}}),[ec,D,eg]),[ey,e$]=(0,o.PW)(P,T),[eE,ew]=((e,t)=>{let r=n.useRef({values:new Map,options:new Map});return[n.useMemo(()=>{let{values:n,options:o}=r.current,l=e.map(e=>void 0===e.label?{...e,label:n.get(e.value)?.label}:e),i=new Map,a=new Map;return l.forEach(e=>{i.set(e.value,e),a.set(e.value,t.get(e.value)||o.get(e.value))}),r.current.values=i,r.current.options=a,l},[e,t]),n.useCallback(e=>t.get(e)||r.current.options.get(e),[t])]})(n.useMemo(()=>{let e=ev(ea&&null===ey?[]:ey);return"combobox"===l&&function(e){return!e&&0!==e}(e[0]?.value)?[]:e},[ey,ev,l,ea]),eg),ex=n.useMemo(()=>{if(!l&&1===eE.length){let e=eE[0];if(null===e.value&&(null===e.label||void 0===e.label))return[]}return eE.map(e=>({...e,label:("function"==typeof L?L(e):e.label)??e.value}))},[l,eE,L]),eS=n.useMemo(()=>new Set(eE.map(e=>e.value)),[eE]);n.useEffect(()=>{if("combobox"===l){let e=eE[0]?.value;ep(null!=e?String(e):"")}},[eE]);let eD=U((e,t)=>({[ec.value]:e,[ec.label]:t??e})),eM=((e,t,r,o,l)=>n.useMemo(()=>{if(!r||!1===o)return e;let{options:n,label:i,value:a}=t,s=[],u="function"==typeof o,c=r.toUpperCase(),d=u?o:(e,t)=>l&&l.length?l.some(e=>Y(t[e],c)):t[n]?Y(t["children"!==i?i:"label"],c):Y(t[a],c),p=u?e=>g(e):e=>e;return e.forEach(e=>{if(e[n]){if(d(r,p(e)))s.push(e);else{let t=e[n].filter(e=>d(r,p(e)));t.length&&s.push({...e,[n]:t})}return}d(r,p(e))&&s.push(e)}),s},[e,o,l,r,t]))(n.useMemo(()=>{if("tags"!==l)return eb;let e=[...eb];return[...eE].sort((e,t)=>e.value<t.value?-1:1).forEach(t=>{let r=t.value;eg.has(r)||e.push(eD(r,t.label))}),e},[eD,eb,eg,eE,l]),ec,ef,eu,el),eR=n.useMemo(()=>"tags"!==l||!ef||eM.some(e=>(e=>el.length?el.some(t=>e?.[t]===ef):e?.value===ef)(e))||eM.some(e=>e[ec.value]===ef)||eg.get(ef)?.disabled?eM:[eD(ef),...eM],[eD,el,l,eM,ef,ec,eg]),eC=e=>[...e].sort((e,t)=>er(e,t,{searchValue:ef})).map(e=>Array.isArray(e.options)?{...e,options:e.options.length>0?eC(e.options):e.options}:e),eI=n.useMemo(()=>er?eC(eR):eR,[eR,er,ef]),eO=n.useMemo(()=>(function(e,{fieldNames:t,childrenAsData:r}={}){let n=[],{label:o,value:l,options:i,groupLabel:a}=m(t,!1);return!function e(t,s){Array.isArray(t)&&t.forEach(t=>{if(!s&&i in t){let o=t[a];void 0===o&&r&&(o=t.label),n.push({key:p(t,n.length),group:!0,data:t,label:o}),e(t[i],!0)}else{let e=t[l];n.push({key:p(t,n.length),groupOption:s,data:t,label:t[o],value:e})}})}(e,!1),n})(eI,{fieldNames:ec,childrenAsData:es}),[eI,ec,es]),eA=e=>{let t=ev(e);if(e$(t),B&&(t.length!==eE.length||t.some((e,t)=>eE[t]?.value!==e?.value))){let e=H?t.map(({label:e,value:t})=>({label:e,value:t})):t.map(e=>e.value),r=t.map(e=>g(ew(e.value)));B(ea?e:e[0],ea?r:r[0])}},[eN,ek]=n.useState(null),[ez,eL]=n.useState(0),eT=void 0!==I?I:"combobox"!==l,eP=n.useRef(),eH=n.useCallback((e,t,{source:r="keyboard"}={})=>{eL(t),a&&"combobox"===l&&null!==e&&"keyboard"===r&&ek(String(e));let n=Promise.resolve().then(()=>{eP.current===n&&E?.(e)});eP.current=n},[a,l,E]),eB=(e,t,r)=>{let n=()=>{let t=ew(e);return[H?{label:t?.[ec.label],value:e}:e,g(t)]};if(t&&y){let[e,t]=n();y(e,t)}else if(!t&&$&&"clear"!==r){let[e,t]=n();$(e,t)}},e_=U((e,t)=>{let r=!ea||t.selected;eA(r?ea?[...eE,e]:[e]:eE.filter(t=>t.value!==e)),eB(e,r),"combobox"===l?ek(""):(!_||eo)&&(ep(""),ek(""))}),eW=n.useMemo(()=>{let e=!1!==A&&!1!==w;return{...em,flattenOptions:eO,onActiveValue:eH,defaultActiveFirstOption:eT,onSelect:e_,menuItemSelectedIcon:O,rawValues:eS,fieldNames:ec,virtual:e,direction:N,listHeight:k,listItemHeight:z,childrenAsData:es,maxCount:j,optionRender:R,classNames:F,styles:G}},[j,em,eO,eH,eT,e_,O,eS,ec,A,w,N,k,z,es,R,F,G]);return n.createElement(x.Provider,{value:eW},n.createElement(W,q({},K,{id:ei,prefixCls:i,ref:t,omitDomProps:Q,mode:l,classNames:F,styles:G,displayValues:ex,onDisplayValuesChange:(e,t)=>{eA(e);let{type:r,values:n}=t;("remove"===r||"clear"===r)&&n.forEach(e=>{eB(e.value,!1,r)})},maxCount:j,direction:N,showSearch:V,searchValue:ef,onSearch:(e,t)=>{if(ep(e),ek(null),"submit"===t.source){let t=(e||"").trim();if(t){if(eg.get(t)?.disabled)return void ep("");eA(Array.from(new Set([...eS,t]))),eB(t,!0),ep("")}return}"blur"!==t.source&&("combobox"===l&&eA(e),en?.(e))},autoClearSearchValue:eo,onSearchSplit:e=>{let t=e;"tags"!==l&&(t=e.map(e=>{let t=eh.get(e);return t?.value}).filter(e=>void 0!==e)),"tags"===l&&(t=t.filter(e=>!eg.get(e)?.disabled));let r=Array.from(new Set([...eS,...t]));eA(r),r.forEach(e=>{eB(e,!0)})},popupMatchSelectWidth:w,OptionList:X,emptyOptions:!eO.length,activeValue:eN,activeDescendantId:`${ei}_list_${ez}`})))});J.Option=F,J.OptGroup=j;var Z=r(36319),ee=r(92162),et=r(84649);function er(e,t,r){return!1===e?null:!0===e?r:e&&void 0!==e[t]?e[t]:r}var en=r(82725),eo=r(4034),el=r(74567),ei=r(97194),ea=r(6831),es=r(632),eu=r(27273),ec=r(55359),ed=r(73134),ep=r(49644),ef=r(7709),em=r(7961),eg=r(77032),eh=r(10540),eb=r(28403),ev=r(86827),ey=r(69811);let e$=e=>{let{optionHeight:t,optionFontSize:r,optionLineHeight:n,optionPadding:o}=e;return{position:"relative",display:"block",minHeight:t,padding:o,color:e.colorText,fontWeight:"normal",fontSize:r,lineHeight:n,boxSizing:"border-box"}};var eE=r(15561);let ew=(e,t)=>{let{componentCls:r,antCls:n}=e,[o]=(0,eh.PN)(n,"select"),{border:l,borderHover:i,borderActive:a,borderOutline:s}=t,u=t.background||e.selectorBg||e.colorBgContainer;return{[o("border-color")]:l,[o("background-color")]:u,[o("affix-color")]:t.affixColor,[`&:not(${r}-disabled)`]:{"&:hover":{[o("border-color")]:i,[o("background-color")]:t.backgroundHover||u},[`&${r}-focused`]:{[o("border-color")]:a,[o("background-color")]:t.backgroundActive||u,boxShadow:`0 0 0 ${(0,eE.zA)(e.controlOutlineWidth)} ${s}`}},[`&${r}-disabled`]:{[o("border-color")]:t.borderDisabled||t.border,[o("background-color")]:t.backgroundDisabled||t.background}}},ex=(e,t,r,n,o,l)=>{let{componentCls:i}=e;return{[`&${i}-${t}`]:[ew(e,r),{[`&${i}-status-error`]:ew(e,{...r,...n}),[`&${i}-status-warning`]:ew(e,{...r,...o})},l]}},eS=(e,t)=>({outline:`${(0,eE.zA)(e.lineWidth)} ${e.lineType} ${t}`,outlineOffset:(0,eE.zA)(e.calc(e.lineWidth).mul(-1).equal()),transition:["outline-offset","outline"].map(e=>`${e} 0s`).join(", ")}),eD=(0,eh.OF)("Select",(e,{rootPrefixCls:t})=>{let r=(0,eb.oX)(e,{rootPrefixCls:t,inputPaddingHorizontalBase:e.calc(e.paddingSM).sub(e.lineWidth).equal(),multipleSelectItemHeight:e.multipleItemHeight,selectHeight:e.controlHeight});return[(e=>{let{componentCls:t}=e;return[{[t]:{[`&${t}-in-form-item`]:{width:"100%"}}},(e=>{let{antCls:t,componentCls:r,motionDurationMid:n,inputPaddingHorizontalBase:o}=e,l={[`${r}-clear`]:{opacity:1,background:e.colorBgBase,borderRadius:"50%"}};return{[r]:{...(0,em.dF)(e),[`${r}-selection-item`]:{flex:1,fontWeight:"normal",position:"relative",userSelect:"none",...em.L9,[`> ${t}-typography`]:{display:"inline"}},[`${r}-prefix`]:{flex:"none",marginInlineEnd:e.selectAffixPadding},[`${r}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:o,zIndex:1,display:"inline-block",width:e.fontSizeIcon,height:e.fontSizeIcon,marginTop:e.calc(e.fontSizeIcon).mul(-1).div(2).equal(),color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",cursor:"pointer",opacity:0,transition:["color","opacity"].map(e=>`${e} ${n} ease`).join(", "),textRendering:"auto",transform:"translateZ(0)","&:before":{display:"block"},"&:hover":{color:e.colorIcon}},"@media(hover:none)":l,"&:hover":l},[`${r}-status`]:{"&-error, &-warning, &-success, &-validating":{[`&${r}-has-feedback`]:{[`${r}-clear`]:{insetInlineEnd:e.calc(o).add(e.fontSize).add(e.paddingXS).equal()}}}}}})(e),(e=>{let{antCls:t,componentCls:r}=e,n=`${r}-item`,o=`&${t}-slide-up-enter${t}-slide-up-enter-active`,l=`&${t}-slide-up-appear${t}-slide-up-appear-active`,i=`&${t}-slide-up-leave${t}-slide-up-leave-active`,a=`${r}-dropdown-placement-`,s=`${n}-option-selected`;return[{[`${r}-dropdown`]:{...(0,em.dF)(e),position:"absolute",top:-9999,zIndex:e.zIndexPopup,boxSizing:"border-box",padding:e.paddingXXS,overflow:"hidden",fontSize:e.fontSize,fontVariant:"initial",backgroundColor:e.colorBgElevated,borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,[`
|
|
2
|
-
${o}${a}bottomLeft,
|
|
3
|
-
${l}${a}bottomLeft
|
|
4
|
-
`]:{animationName:ev.ox},[`
|
|
5
|
-
${o}${a}topLeft,
|
|
6
|
-
${l}${a}topLeft,
|
|
7
|
-
${o}${a}topRight,
|
|
8
|
-
${l}${a}topRight
|
|
9
|
-
`]:{animationName:ev.nP},[`${i}${a}bottomLeft`]:{animationName:ev.vR},[`
|
|
10
|
-
${i}${a}topLeft,
|
|
11
|
-
${i}${a}topRight
|
|
12
|
-
`]:{animationName:ev.YU},"&-hidden":{display:"none"},[n]:{...e$(e),cursor:"pointer",transition:`background-color ${e.motionDurationSlow} ease`,borderRadius:e.borderRadiusSM,"&-group":{color:e.colorTextDescription,fontSize:e.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":{flex:"auto",...em.L9},"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-selected:not(${n}-option-disabled)`]:{color:e.optionSelectedColor,fontWeight:e.optionSelectedFontWeight,backgroundColor:e.optionSelectedBg,[`${n}-option-state`]:{color:e.colorPrimary}},[`&-active:not(${n}-option-disabled)`]:{backgroundColor:e.optionActiveBg},[`&-selected${n}-option-active:not(${n}-option-disabled)`]:{backgroundColor:e.controlItemBgActiveHover},"&-disabled":{[`&${n}-option-selected`]:{backgroundColor:e.colorBgContainerDisabled},color:e.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:e.calc(e.controlPaddingHorizontal).mul(2).equal()}},"&-empty":{...e$(e),color:e.colorTextDisabled}},[`${s}:has(+ ${s})`]:{borderEndStartRadius:0,borderEndEndRadius:0,[`& + ${s}`]:{borderStartStartRadius:0,borderStartEndRadius:0}},"&-rtl":{direction:"rtl"}}},(0,ev._j)(e,"slide-up"),(0,ev._j)(e,"slide-down"),(0,ey.Mh)(e,"move-up"),(0,ey.Mh)(e,"move-down")]})(e),{[`${t}-rtl`]:{direction:"rtl"}},(0,eg.G)(e,{focusElCls:`${t}-focused`})]})(r),(e=>{let{componentCls:t,fontHeight:r,controlHeight:n,fontSizeIcon:o,showArrowPaddingInlineEnd:l,iconCls:i,antCls:a,max:s,calc:u}=e,[c,d]=(0,eh.PN)(a,"select"),p=s(u(l).sub(o).equal(),0);return{[t]:[{[c("border-radius")]:e.borderRadius,[c("border-color")]:"#000",[c("border-size")]:e.lineWidth,[c("background-color")]:e.colorBgContainer,[c("font-size")]:e.fontSize,[c("line-height")]:e.lineHeight,[c("font-height")]:r,[c("color")]:e.colorText,[c("affix-color")]:e.colorText,[c("height")]:n,[c("padding-horizontal")]:u(e.paddingSM).sub(e.lineWidth).equal(),[c("padding-vertical")]:`calc((${d("height")} - ${d("font-height")}) / 2 - ${d("border-size")})`,...(0,em.dF)(e),display:"inline-flex",flexWrap:"nowrap",position:"relative",transition:`all ${e.motionDurationSlow}`,alignItems:"flex-start",outline:0,cursor:"pointer",borderRadius:d("border-radius"),borderWidth:d("border-size"),borderStyle:e.lineType,borderColor:d("border-color"),background:d("background-color"),fontSize:d("font-size"),lineHeight:d("line-height"),color:d("color"),paddingInline:d("padding-horizontal"),paddingBlock:d("padding-vertical"),[`${t}-prefix`]:{color:d("affix-color"),flex:"none",lineHeight:1},[`${t}-placeholder`]:{...em.L9,color:e.colorTextPlaceholder,pointerEvents:"none",zIndex:1},[`${t}-content`]:{flex:"auto",minWidth:0,position:"relative",display:"flex",marginInlineEnd:p,"&:before":{content:'"\\a0"',width:0,overflow:"hidden"},"&-value":{visibility:"inherit"},"input[readonly]":{cursor:"inherit",caretColor:"transparent"}},[`${t}-suffix`]:{flex:"none",color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,lineHeight:1,"> :not(:last-child)":{marginInlineEnd:e.marginXS}},[`${t}-prefix, ${t}-suffix`]:{alignSelf:"center",[i]:{verticalAlign:"top"}},"&-disabled":{background:e.colorBgContainerDisabled,color:e.colorTextDisabled,cursor:"not-allowed",input:{cursor:"not-allowed"}},"&-sm":{[c("height")]:e.controlHeightSM,[c("padding-horizontal")]:u(e.paddingXS).sub(e.lineWidth).equal(),[c("border-radius")]:e.borderRadiusSM,[`${t}-clear`]:{insetInlineEnd:d("padding-horizontal")}},"&-lg":{[c("height")]:e.controlHeightLG,[c("font-size")]:e.fontSizeLG,[c("line-height")]:e.lineHeightLG,[c("font-height")]:e.fontHeightLG,[c("border-radius")]:e.borderRadiusLG}},{[`&:not(${t}-customize)`]:{[`${t}-input`]:{outline:"none",background:"transparent",appearance:"none",border:0,margin:0,padding:0,color:d("color"),fontFamily:"inherit",fontSize:"inherit","&::-webkit-search-cancel-button":{display:"none",appearance:"none"}}}},{[`&-single:not(${t}-customize)`]:{[`${t}-input`]:{position:"absolute",inset:0,lineHeight:"inherit"},[`${t}-content`]:{...em.L9,alignSelf:"center","&-has-value":{display:"block","&:before":{display:"none"}},"&-has-search-value":{color:"transparent",[`> *:not(${t}-input)`]:{opacity:0}},"&-value":{transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,zIndex:1,opacity:1}},[`&${t}-open ${t}-content`]:{"&-has-value":{opacity:.25},"&-has-search-value":{opacity:1,transition:`opacity ${e.motionDurationMid} ${e.motionEaseInOut}`,color:"transparent",[`> *:not(${t}-input)`]:{opacity:0}}}}},{[`&-show-search:not(${t}-customize-input):not(${t}-disabled)`]:{cursor:"text"}},(e=>{let{componentCls:t,calc:r,iconCls:n,paddingXS:o,paddingXXS:l,INTERNAL_FIXED_ITEM_MARGIN:i,lineWidth:a,colorIcon:s,colorIconHover:u,inputPaddingHorizontalBase:c,antCls:d}=e,[p,f]=(0,eh.PN)(d,"select");return{"&-multiple":{[p("multi-item-background")]:e.multipleItemBg,[p("multi-item-border-color")]:"transparent",[p("multi-item-border-radius")]:e.borderRadiusSM,[p("multi-item-height")]:e.multipleItemHeight,[p("multi-padding-base")]:`calc((${f("height")} - ${f("multi-item-height")}) / 2)`,[p("multi-padding-vertical")]:`calc(${f("multi-padding-base")} - ${i} - ${a})`,[p("multi-item-padding-horizontal")]:`calc(${c} - ${f("multi-padding-vertical")} - ${a} * 2)`,paddingBlock:f("multi-padding-vertical"),paddingInlineStart:`calc(${f("multi-padding-base")} - ${a})`,[`${t}-prefix`]:{marginInlineStart:f("multi-item-padding-horizontal")},[`${t}-prefix + ${t}-content`]:{[`${t}-placeholder`]:{insetInlineStart:0},[`${t}-content-item${t}-content-item-suffix`]:{marginInlineStart:0}},[`${t}-placeholder`]:{position:"absolute",lineHeight:f("line-height"),insetInlineStart:f("multi-item-padding-horizontal"),width:`calc(100% - ${f("multi-item-padding-horizontal")})`,top:"50%",transform:"translateY(-50%)"},[`${t}-content`]:{flexWrap:"wrap",alignItems:"center",lineHeight:1,"&-item-prefix":{height:f("font-size")},"&-item":{lineHeight:1,maxWidth:"calc(100% - 4px)"},[`${t}-content-item-prefix + ${t}-content-item-suffix,
|
|
13
|
-
${t}-content-item-suffix:first-child`]:{marginInlineStart:f("multi-item-padding-horizontal")},[`${t}-selection-item`]:{lineHeight:`calc(${f("multi-item-height")} - ${a} * 2)`,border:`${a} solid ${f("multi-item-border-color")}`,display:"flex",marginBlock:i,marginInlineEnd:r(i).mul(2).equal(),background:f("multi-item-background"),borderRadius:f("multi-item-border-radius"),paddingInlineStart:o,paddingInlineEnd:l,transition:["height","line-height","padding"].map(t=>`${t} ${e.motionDurationSlow}`).join(","),"&-content":{...em.L9,marginInlineEnd:l},"&-remove":{...(0,em.Nk)(),display:"inline-flex",alignItems:"center",color:s,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${n}`]:{verticalAlign:"-0.2em"},"&:hover":{color:u}}},[`${t}-input`]:{lineHeight:r(i).mul(2).add(f("multi-item-height")).equal(),width:"calc(var(--select-input-width, 0) * 1px)",minWidth:4,maxWidth:"100%",transition:`line-height ${e.motionDurationSlow}`}},[`&${t}-sm`]:{[p("multi-item-height")]:e.multipleItemHeightSM,[p("multi-item-border-radius")]:e.borderRadiusXS},[`&${t}-lg`]:{[p("multi-item-height")]:e.multipleItemHeightLG,[p("multi-item-border-radius")]:e.borderRadius},[`&${t}-filled`]:{[p("multi-item-border-color")]:e.colorSplit,[p("multi-item-background")]:e.colorBgContainer,[`&${t}-disabled`]:{[p("multi-item-border-color")]:"transparent"}}}}})(e),ex(e,"outlined",{border:e.colorBorder,borderHover:e.hoverBorderColor,borderActive:e.activeBorderColor,borderOutline:e.activeOutlineColor,borderDisabled:e.colorBorderDisabled},{border:e.colorError,borderHover:e.colorErrorBorderHover,borderActive:e.colorError,borderOutline:e.colorErrorOutline,affixColor:e.colorErrorAffix},{border:e.colorWarning,borderHover:e.colorWarningHover,borderActive:e.colorWarning,borderOutline:e.colorWarningOutline,affixColor:e.colorWarningAffix}),ex(e,"filled",{border:"transparent",borderHover:"transparent",borderActive:e.activeBorderColor,borderOutline:"transparent",borderDisabled:e.colorBorderDisabled,background:e.colorFillTertiary,backgroundHover:e.colorFillSecondary,backgroundActive:e.colorBgContainer},{color:e.colorErrorText,background:e.colorErrorBg,backgroundHover:e.colorErrorBgHover,borderActive:e.colorError},{background:e.colorWarningBg,backgroundHover:e.colorWarningBgHover,borderActive:e.colorWarning}),ex(e,"borderless",{border:"transparent",borderHover:"transparent",borderActive:"transparent",borderOutline:"transparent",background:"transparent"},{},{},{[`&:not(${t}-disabled):has(input:focus-visible), &:not(${t}-disabled):has(textarea:focus-visible)`]:eS(e,e.activeBorderColor),[`&${t}-status-error:not(${t}-disabled):has(input:focus-visible), &${t}-status-error:not(${t}-disabled):has(textarea:focus-visible)`]:eS(e,e.colorError),[`&${t}-status-warning:not(${t}-disabled):has(input:focus-visible), &${t}-status-warning:not(${t}-disabled):has(textarea:focus-visible)`]:eS(e,e.colorWarning)}),ex(e,"underlined",{border:e.colorBorder,borderHover:e.hoverBorderColor,borderActive:e.activeBorderColor,borderOutline:"transparent"},{border:e.colorError,borderHover:e.colorErrorBorderHover,borderActive:e.colorError},{border:e.colorWarning,borderHover:e.colorWarningHover,borderActive:e.colorWarning},{borderRadius:0,borderTopColor:"transparent",borderInlineColor:"transparent"}),(e=>{let{antCls:t,componentCls:r}=e,n={background:"transparent"},o=`> input[disabled], > textarea[disabled], > ${r}-input, > ${t}-input-affix-wrapper-disabled, > ${t}-input-search`;return{[`&${r}-customize`]:{border:0,padding:0,fontSize:"inherit",lineHeight:"inherit",[`${r}-placeholder`]:{display:"none"},[`${r}-content`]:{margin:0,padding:0,"&-value":{display:"none"}},[`&${r}-disabled ${r}-content`]:{[o]:n,"input[disabled], textarea[disabled]":n}}}})(e)]}})(r)]},e=>{let{fontSize:t,lineHeight:r,lineWidth:n,controlHeight:o,controlHeightSM:l,controlHeightLG:i,paddingXXS:a,controlPaddingHorizontal:s,zIndexPopupBase:u,colorText:c,fontWeightStrong:d,controlItemBgActive:p,controlItemBgHover:f,colorBgContainer:m,colorFillSecondary:g,colorBgContainerDisabled:h,colorTextDisabled:b,colorPrimaryHover:v,colorPrimary:y,controlOutline:$}=e,E=2*a,w=2*n,x=Math.min(o-E,o-w),S=Math.min(l-E,l-w),D=Math.min(i-E,i-w);return{INTERNAL_FIXED_ITEM_MARGIN:Math.floor(a/2),zIndexPopup:u+50,optionSelectedColor:c,optionSelectedFontWeight:d,optionSelectedBg:p,optionActiveBg:f,optionPadding:`${(o-t*r)/2}px ${s}px`,optionFontSize:t,optionLineHeight:r,optionHeight:o,selectorBg:m,clearBg:m,singleItemHeightLG:i,multipleItemBg:g,multipleItemBorderColor:"transparent",multipleItemHeight:x,multipleItemHeightSM:S,multipleItemHeightLG:D,multipleSelectorBgDisabled:h,multipleItemColorDisabled:b,multipleItemBorderColorDisabled:"transparent",showArrowPaddingInlineEnd:Math.ceil(1.25*e.fontSize),hoverBorderColor:v,activeBorderColor:y,activeOutlineColor:$,selectAffixPadding:a}},{unitless:{optionLineHeight:!0,optionSelectedFontWeight:!0}});var eM=r(84190),eR=r(4216),eC=r(45042),eI=r(60470),eO=r(83914),eA=r(30486),eN=r(112),ek=r(44137);let ez="SECRET_COMBOBOX_MODE_DO_NOT_USE",eL=n.forwardRef((e,t)=>{let r,{prefixCls:i,bordered:a,className:s,rootClassName:u,getPopupContainer:c,popupClassName:d,dropdownClassName:p,listHeight:f=256,placement:m,listItemHeight:g,size:h,disabled:b,notFoundContent:v,status:y,builtinPlacements:$,dropdownMatchSelectWidth:E,popupMatchSelectWidth:w,direction:x,style:S,allowClear:D,variant:M,popupStyle:R,dropdownStyle:C,transitionName:I,tagRender:O,maxCount:A,prefix:N,dropdownRender:k,popupRender:z,onDropdownVisibleChange:L,onOpenChange:T,styles:P,classNames:H,clearIcon:B,showSearch:_,...W}=e,{getPopupContainer:j,getPrefixCls:F,renderEmpty:G,direction:K,virtual:V,popupMatchSelectWidth:X,popupOverflow:Y}=n.useContext(el.QO),{showSearch:U,allowClear:q,style:Q,styles:en,className:em,classNames:eg,clearIcon:eh,loadingIcon:eb,menuItemSelectedIcon:ev,removeIcon:ey,suffixIcon:e$}=(0,el.TP)("select"),[,eE]=(0,ef.Ay)(),ew=g??eE?.controlHeight,ex=F("select",i),eS=F(),eL=x??K,{compactSize:eT,compactItemClassnames:eP}=(0,ep.RQ)(ex,eL),[eH,eB]=(0,ed.A)("select",M,a),e_=(0,es.A)(ex),[eW,ej]=eD(ex,e_),eF=n.useMemo(()=>{let{mode:t}=e;if("combobox"!==t)return t===ez?"combobox":t},[e.mode]),eG="multiple"===eF||"tags"===eF,eK=function(e,t){return void 0!==t?t:null!==e}(e.suffixIcon,e.showArrow),eV=function(e){return n.useMemo(()=>{if(e)return(...t)=>n.createElement(ek.A,{space:!0},e.apply(void 0,t))},[e])}(z||k),{status:eX,hasFeedback:eY,isFormItemInput:eU,feedbackIcon:eq}=n.useContext(ec.$W),eQ=(0,eo.v)(eX,y);r=void 0!==v?v:"combobox"===eF?null:G?.("Select")||n.createElement(ei.A,{componentName:"Select"});let{suffixIcon:eJ,itemIcon:eZ,removeIcon:e0,clearIcon:e1}=function({suffixIcon:e,contextSuffixIcon:t,clearIcon:r,contextClearIcon:o,menuItemSelectedIcon:l,contextMenuItemSelectedIcon:i,removeIcon:a,contextRemoveIcon:s,loading:u,loadingIcon:c,contextLoadingIcon:d,searchIcon:p,contextSearchIcon:f,multiple:m,hasFeedback:g,showSuffixIcon:h,feedbackIcon:b,showArrow:v,componentName:y}){return n.useMemo(()=>{let y=(0,eN.A)(r,o,n.createElement(eR.A,null)),$=t=>null!==e||g||v?n.createElement(n.Fragment,null,!1!==h&&t,g&&b):null,E=null;return E=void 0!==e?$(e):u?$((0,eN.A)(c,d,n.createElement(eO.A,{spin:!0}))):({open:e,showSearch:r})=>e&&r?$((0,eN.A)(p,f,n.createElement(eA.A,null))):$((0,eN.A)(t,n.createElement(eI.A,null))),{clearIcon:y,suffixIcon:E,itemIcon:(0,eN.A)(l,i,m?n.createElement(eM.A,null):null),removeIcon:(0,eN.A)(a,s,n.createElement(eC.A,null))}},[e,t,r,o,l,i,a,s,u,c,d,p,f,m,g,h,b,v])}({...W,multiple:eG,hasFeedback:eY,feedbackIcon:eq,showSuffixIcon:eK,prefixCls:ex,componentName:"Select",clearIcon:B,searchIcon:er(_,"searchIcon"),contextClearIcon:eh,contextLoadingIcon:eb,contextMenuItemSelectedIcon:ev,contextRemoveIcon:ey,contextSearchIcon:er(U,"searchIcon"),contextSuffixIcon:e$}),e2=D??q,e6=_??U,e4=(0,o.cJ)(W,["suffixIcon","itemIcon"]),e3=(0,eu.A)(e=>h??eT??e),e8=n.useContext(ea.A),e5=b??e8,e7={...e,variant:eH,status:eQ,disabled:e5,size:e3},e9=(0,ee.XT)(Q),te=(0,ee.XT)(S),[tt,tr]=(0,ee.AV)([eg,H],[en,e9,P,te],{props:e7},{popup:{_default:"root"}}),tn=(0,l.$)(tt.popup.root,d,p,{[`${ex}-dropdown-${eL}`]:"rtl"===eL},u,ej,e_,eW),to={...tr.popup?.root,...R??C},tl=(0,l.$)({[`${ex}-lg`]:"large"===e3,[`${ex}-sm`]:"small"===e3,[`${ex}-rtl`]:"rtl"===eL,[`${ex}-${eH}`]:eB,[`${ex}-in-form-item`]:eU},(0,eo.L)(ex,eQ,eY),eP,em,s,tt.root,u,ej,e_,eW),ti=n.useMemo(()=>void 0!==m?m:"rtl"===eL?"bottomRight":"bottomLeft",[m,eL]),[ta]=(0,Z.YK)("SelectLike",tr.popup.root?.zIndex??to.zIndex);return n.createElement(J,{ref:t,virtual:V,classNames:tt,styles:tr,showSearch:e6,...e4,style:tr.root,popupMatchSelectWidth:w??E??X,transitionName:(0,et.b)(eS,"slide-up",I),builtinPlacements:$||(e=>{let t={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:"scroll"===e?"scroll":"visible",dynamicInset:!0};return{bottomLeft:{...t,points:["tl","bl"],offset:[0,4]},bottomRight:{...t,points:["tr","br"],offset:[0,4]},topLeft:{...t,points:["bl","tl"],offset:[0,-4]},topRight:{...t,points:["br","tr"],offset:[0,-4]}}})(Y),listHeight:f,listItemHeight:ew,mode:eF,prefixCls:ex,placement:ti,direction:eL,prefix:N,suffixIcon:eJ,menuItemSelectedIcon:eZ,removeIcon:e0,allowClear:!0===e2?{clearIcon:e1}:e2,notFoundContent:r,className:tl,getPopupContainer:c||j,popupClassName:tn,disabled:e5,popupStyle:{...tr.popup.root,...to,zIndex:ta},maxCount:eG?A:void 0,tagRender:eG?O:void 0,popupRender:eV,onPopupVisibleChange:T||L})}),eT=(0,en.A)(eL,"popupAlign");eL.SECRET_COMBOBOX_MODE_DO_NOT_USE=ez,eL.Option=F,eL.OptGroup=j,eL._InternalPanelDoNotUseOrYouWillBeFired=eT;let eP=eL},58758:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"}},60470:(e,t,r)=>{r.d(t,{A:()=>a});var n=r(97109),o=r(838),l=r(88483);function i(){return(i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}let a=n.forwardRef((e,t)=>n.createElement(l.A,i({},e,{ref:t,icon:o.A})))},62116:(e,t,r)=>{r.d(t,{A:()=>o});var n=r(97109);function o(e,t){let r=(0,n.useRef)([]),o=()=>{r.current.push(setTimeout(()=>{e.current?.input&&e.current?.input.getAttribute("type")==="password"&&e.current?.input.hasAttribute("value")&&e.current?.input.removeAttribute("value")}))};return(0,n.useEffect)(()=>(t&&o(),()=>r.current.forEach(e=>{e&&clearTimeout(e)})),[]),o}},69811:(e,t,r)=>{r.d(t,{Mh:()=>p});var n=r(15561),o=r(5688);let l=new n.Mo("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),i=new n.Mo("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),a=new n.Mo("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),s=new n.Mo("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),u=new n.Mo("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),c=new n.Mo("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),d={"move-up":{inKeyframes:new n.Mo("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),outKeyframes:new n.Mo("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}})},"move-down":{inKeyframes:l,outKeyframes:i},"move-left":{inKeyframes:a,outKeyframes:s},"move-right":{inKeyframes:u,outKeyframes:c}},p=(e,t)=>{let{antCls:r}=e,n=`${r}-${t}`,{inKeyframes:l,outKeyframes:i}=d[t];return[(0,o.b)(n,l,i,e.motionDurationMid),{[`
|
|
14
|
-
${n}-enter,
|
|
15
|
-
${n}-appear
|
|
16
|
-
`]:{opacity:0,animationTimingFunction:e.motionEaseOutCirc},[`${n}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]}},78902:(e,t,r)=>{r.d(t,{A:()=>$});var n=r(97109),o=r(39019),l=r(42644),i=r(3638),a=r(44137),s=r(76631),u=r(92162),c=r(4034),d=r(74567),p=r(6831),f=r(632),m=r(27273),g=r(55359),h=r(73134),b=r(49644),v=r(62116),y=r(44390);let $=(0,n.forwardRef)((e,t)=>{let{prefixCls:r,bordered:$=!0,status:E,size:w,disabled:x,onBlur:S,onFocus:D,suffix:M,allowClear:R,addonAfter:C,addonBefore:I,className:O,style:A,styles:N,rootClassName:k,onChange:z,classNames:L,variant:T,...P}=e,{getPrefixCls:H,direction:B,allowClear:_,autoComplete:W,className:j,style:F,classNames:G,styles:K}=(0,d.TP)("input"),V=H("input",r),X=(0,n.useRef)(null),Y=(0,f.A)(V),[U,q]=(0,y.MG)(V,k);(0,y.Ay)(V,Y);let{compactSize:Q,compactItemClassnames:J}=(0,b.RQ)(V,B),Z=(0,m.A)(e=>w??Q??e),ee=n.useContext(p.A),et=x??ee,er={...e,size:Z,disabled:et},en=(0,u.XT)(F),eo=(0,u.XT)(A),[el,ei]=(0,u.AV)([G,L],[K,en,N,eo],{props:er}),{status:ea,hasFeedback:es,feedbackIcon:eu}=(0,n.useContext)(g.$W),ec=(0,c.v)(ea,E),ed=function(e){return!!(e.prefix||e.suffix||e.allowClear||e.showCount)}(e)||!!es;(0,n.useRef)(ed);let ep=(0,v.A)(X,!0),ef=(es||M)&&n.createElement(n.Fragment,null,M,es&&eu),em=(0,s.O)({allowClear:R,contextAllowClear:_,componentName:"Input"}),[eg,eh]=(0,h.A)("input",T,$);return n.createElement(o.Ay,{ref:(0,l.K4)(t,X),prefixCls:V,autoComplete:W,...P,disabled:et,onBlur:e=>{ep(),S?.(e)},onFocus:e=>{ep(),D?.(e)},style:ei.root,styles:ei,suffix:ef,allowClear:em,className:(0,i.$)(O,k,q,Y,J,j,el.root),onChange:e=>{ep(),z?.(e)},addonBefore:I&&n.createElement(a.A,{form:!0,space:!0},I),addonAfter:C&&n.createElement(a.A,{form:!0,space:!0},C),classNames:{...el,input:(0,i.$)({[`${V}-sm`]:"small"===Z,[`${V}-lg`]:"large"===Z,[`${V}-rtl`]:"rtl"===B},el.input,U),variant:(0,i.$)({[`${V}-${eg}`]:eh},(0,c.L)(V,ec)),affixWrapper:(0,i.$)({[`${V}-affix-wrapper-sm`]:"small"===Z,[`${V}-affix-wrapper-lg`]:"large"===Z,[`${V}-affix-wrapper-rtl`]:"rtl"===B},U),wrapper:(0,i.$)({[`${V}-group-rtl`]:"rtl"===B},U),groupWrapper:(0,i.$)({[`${V}-group-wrapper-sm`]:"small"===Z,[`${V}-group-wrapper-lg`]:"large"===Z,[`${V}-group-wrapper-rtl`]:"rtl"===B,[`${V}-group-wrapper-${eg}`]:eh},(0,c.L)(`${V}-group-wrapper`,ec,es),U)}})})},93307:(e,t,r)=>{r.d(t,{A:()=>S});var n=r(64446),o=r(3638),l=r(20008),i=r(42644),a=r(97109),s=r(61222);let u=a.forwardRef(({height:e,offsetY:t,offsetX:r,children:i,prefixCls:s,onInnerResize:u,innerProps:c,rtl:d,extra:p},f)=>{let m={},g={display:"flex",flexDirection:"column"};return void 0!==t&&(m={height:e,position:"relative",overflow:"hidden"},g={...g,transform:`translateY(${t}px)`,[d?"marginRight":"marginLeft"]:-r,position:"absolute",left:0,right:0,top:0}),a.createElement("div",{style:m},a.createElement(l.Ay,{onResize:({offsetHeight:e})=>{e&&u&&u()}},a.createElement("div",(0,n.A)({style:g,className:(0,o.$)({[`${s}-holder-inner`]:s}),ref:f},c),i,p)))});function c({children:e,setRef:t}){let r=a.useCallback(e=>{t(e)},[]);return a.cloneElement(e,{ref:r})}u.displayName="Filler";let d="object"==typeof navigator&&/Firefox/i.test(navigator.userAgent),p=(e,t,r,n)=>{let o=(0,a.useRef)(!1),l=(0,a.useRef)(null),i=(0,a.useRef)({top:e,bottom:t,left:r,right:n});return i.current.top=e,i.current.bottom=t,i.current.left=r,i.current.right=n,(e,t,r=!1)=>{let n=e?t<0&&i.current.left||t>0&&i.current.right:t<0&&i.current.top||t>0&&i.current.bottom;return r&&n?(clearTimeout(l.current),o.current=!1):(!n||o.current)&&(clearTimeout(l.current),o.current=!0,l.current=setTimeout(()=>{o.current=!1},50)),!o.current&&n}};class f{maps;id=0;diffRecords=new Map;constructor(){this.maps=Object.create(null)}set(e,t){this.diffRecords.set(e,this.maps[e]),this.maps[e]=t,this.id+=1}get(e){return this.maps[e]}resetRecord(){this.diffRecords.clear()}getRecord(){return this.diffRecords}}function m(e){let t=parseFloat(e);return isNaN(t)?0:t}let g=14/15;function h(e){return Math.floor(e**.5)}function b(e,t){return("touches"in e?e.touches[0]:e)[t?"pageX":"pageY"]-window[t?"scrollX":"scrollY"]}let v=a.forwardRef((e,t)=>{let{prefixCls:r,rtl:n,scrollOffset:l,scrollRange:s,onStartMove:u,onStopMove:c,onScroll:d,horizontal:p,spinSize:f,containerSize:m,style:g,thumbStyle:h,showScrollBar:v}=e,[y,$]=a.useState(!1),[E,w]=a.useState(null),[x,S]=a.useState(null),D=!n,M=a.useRef(),R=a.useRef(),[C,I]=a.useState(v),O=a.useRef(),A=()=>{!0!==v&&!1!==v&&(clearTimeout(O.current),I(!0),O.current=setTimeout(()=>{I(!1)},3e3))},N=s-m||0,k=m-f||0,z=a.useMemo(()=>0===l||0===N?0:l/N*k,[l,N,k]),L=a.useRef({top:z,dragging:y,pageY:E,startTop:x});L.current={top:z,dragging:y,pageY:E,startTop:x};let T=e=>{$(!0),w(b(e,p)),S(L.current.top),u(),e.stopPropagation(),e.preventDefault()};a.useEffect(()=>{let e=e=>{e.preventDefault()},t=M.current,r=R.current;return t.addEventListener("touchstart",e,{passive:!1}),r.addEventListener("touchstart",T,{passive:!1}),()=>{t.removeEventListener("touchstart",e),r.removeEventListener("touchstart",T)}},[]);let P=a.useRef();P.current=N;let H=a.useRef();H.current=k,a.useEffect(()=>{if(y){let e,t=t=>{let{dragging:r,pageY:n,startTop:o}=L.current;i.er.cancel(e);let l=M.current.getBoundingClientRect(),a=m/(p?l.width:l.height);if(r){let r=(b(t,p)-n)*a,l=o;!D&&p?l-=r:l+=r;let s=P.current,u=H.current,c=Math.ceil((u?l/u:0)*s);c=Math.min(c=Math.max(c,0),s),e=(0,i.er)(()=>{d(c,p)})}},r=()=>{$(!1),c()};return window.addEventListener("mousemove",t,{passive:!0}),window.addEventListener("touchmove",t,{passive:!0}),window.addEventListener("mouseup",r,{passive:!0}),window.addEventListener("touchend",r,{passive:!0}),()=>{window.removeEventListener("mousemove",t),window.removeEventListener("touchmove",t),window.removeEventListener("mouseup",r),window.removeEventListener("touchend",r),i.er.cancel(e)}}},[y]),a.useEffect(()=>(A(),()=>{clearTimeout(O.current)}),[l]),a.useImperativeHandle(t,()=>({delayHidden:A}));let B=`${r}-scrollbar`,_={position:"absolute",visibility:C?null:"hidden"},W={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return p?(Object.assign(_,{height:8,left:0,right:0,bottom:0}),Object.assign(W,{height:"100%",width:f,[D?"left":"right"]:z})):(Object.assign(_,{width:8,top:0,bottom:0,[D?"right":"left"]:0}),Object.assign(W,{width:"100%",height:f,top:z})),a.createElement("div",{ref:M,className:(0,o.$)(B,{[`${B}-horizontal`]:p,[`${B}-vertical`]:!p,[`${B}-visible`]:C}),style:{..._,...g},onMouseDown:e=>{e.stopPropagation(),e.preventDefault()},onMouseMove:A},a.createElement("div",{ref:R,className:(0,o.$)(`${B}-thumb`,{[`${B}-thumb-moving`]:y}),style:{...W,...h},onMouseDown:T}))});function y(e=0,t=0){let r=e/t*e;return isNaN(r)&&(r=0),Math.floor(r=Math.max(r,20))}let $=[],E={overflowY:"auto",overflowAnchor:"none"};function w(e,t){let{prefixCls:r="rc-virtual-list",className:w,height:x,itemHeight:S,fullHeight:D=!0,style:M,data:R,children:C,itemKey:I,virtual:O,direction:A,scrollWidth:N,component:k="div",onScroll:z,onVirtualScroll:L,onVisibleChange:T,innerProps:P,extraRender:H,styles:B,showScrollBar:_="optional",...W}=e,j=a.useCallback(e=>"function"==typeof I?I(e):e?.[I],[I]),[F,G,K,V]=function(e,t,r){let[n,o]=a.useState(0),l=(0,a.useRef)(new Map),i=(0,a.useRef)(new f),s=(0,a.useRef)(0);function u(){s.current+=1}function c(e=!1){u();let t=()=>{let e=!1;l.current.forEach((t,r)=>{if(t&&t.offsetParent){let{offsetHeight:n}=t,{marginTop:o,marginBottom:l}=getComputedStyle(t),a=n+m(o)+m(l);i.current.get(r)!==a&&(i.current.set(r,a),e=!0)}}),e&&o(e=>e+1)};if(e)t();else{s.current+=1;let e=s.current;Promise.resolve().then(()=>{e===s.current&&t()})}}return(0,a.useEffect)(()=>u,[]),[function(t,r){let n=e(t),o=l.current.get(n);r?(l.current.set(n,r),c()):l.current.delete(n)},c,i.current,n]}(j,0,0),X=!!(!1!==O&&x&&S),Y=a.useMemo(()=>Object.values(K.maps).reduce((e,t)=>e+t,0),[K.id,K.maps]),U=X&&R&&(Math.max(S*R.length,Y)>x||!!N),q="rtl"===A,Q=(0,o.$)(r,{[`${r}-rtl`]:q},w),J=R||$,Z=(0,a.useRef)(),ee=(0,a.useRef)(),et=(0,a.useRef)(),[er,en]=(0,a.useState)(0),[eo,el]=(0,a.useState)(0),[ei,ea]=(0,a.useState)(!1),es=()=>{ea(!0)},eu=()=>{ea(!1)};function ec(e){en(t=>{let r,n=(r="function"==typeof e?e(t):e,Number.isNaN(eD.current)||(r=Math.min(r,eD.current)),r=Math.max(r,0));return Z.current.scrollTop=n,n})}let ed=(0,a.useRef)({start:0,end:J.length}),ep=(0,a.useRef)(),[ef]=function(e,t,r){let[n,o]=a.useState(e),[l,i]=a.useState(null);return a.useEffect(()=>{let r=function(e,t,r){let n,o,l=e.length,i=t.length;if(0===l&&0===i)return null;l<i?(n=e,o=t):(n=t,o=e);let a={__EMPTY_ITEM__:!0};function s(e){return void 0!==e?r(e):a}let u=null,c=1!==Math.abs(l-i);for(let e=0;e<o.length;e+=1){let t=s(n[e]);if(t!==s(o[e])){u=e,c=c||t!==s(o[e+1]);break}}return null===u?null:{index:u,multiple:c}}(n||[],e||[],t);r?.index!==void 0&&i(e[r.index]),o(e)},[e]),[l]}(J,j);ep.current=ef;let{scrollHeight:em,start:eg,end:eh,offset:eb}=a.useMemo(()=>{let e,t,r;if(!X)return{scrollHeight:void 0,start:0,end:J.length-1,offset:void 0};if(!U)return{scrollHeight:ee.current?.offsetHeight||0,start:0,end:J.length-1,offset:void 0};let n=0,o=J.length;for(let l=0;l<o;l+=1){let o=j(J[l]),i=K.get(o),a=n+(void 0===i?S:i);a>=er&&void 0===e&&(e=l,t=n),a>er+x&&void 0===r&&(r=l),n=a}return void 0===e&&(e=0,t=0,r=Math.ceil(x/S)),void 0===r&&(r=J.length-1),{scrollHeight:n,start:e,end:r=Math.min(r+1,J.length-1),offset:t}},[U,X,er,J,V,x]);ed.current.start=eg,ed.current.end=eh,a.useLayoutEffect(()=>{let e=K.getRecord();if(1===e.size){let t=Array.from(e.keys())[0],r=e.get(t),n=J[eg];if(n&&void 0===r&&j(n)===t){let e=K.get(t)-S;ec(t=>t+e)}}K.resetRecord()},[em]);let[ev,ey]=a.useState({width:0,height:x}),e$=(0,a.useRef)(),eE=(0,a.useRef)(),ew=a.useMemo(()=>y(ev.width,N),[ev.width,N]),ex=a.useMemo(()=>y(ev.height,em),[ev.height,em]),eS=em-x,eD=(0,a.useRef)(eS);eD.current=eS;let eM=er<=0,eR=er>=eS,eC=eo<=0,eI=eo>=N,eO=p(eM,eR,eC,eI),eA=()=>({x:q?-eo:eo,y:er}),eN=(0,a.useRef)(eA()),ek=(0,i._q)(e=>{if(L){let t={...eA(),...e};(eN.current.x!==t.x||eN.current.y!==t.y)&&(L(t),eN.current=t)}});function ez(e,t){t?((0,s.flushSync)(()=>{el(e)}),ek()):ec(e)}let eL=e=>{let t=e,r=N?N-ev.width:0;return Math.min(t=Math.max(t,0),r)},[eT,eP]=function(e,t,r,n,o,l,s){let u=(0,a.useRef)(0),c=(0,a.useRef)(null),f=(0,a.useRef)(null),m=(0,a.useRef)(!1),g=p(t,r,n,o),h=(0,a.useRef)(null),b=(0,a.useRef)(null);return[function(t){if(!e)return;i.er.cancel(b.current),b.current=(0,i.er)(()=>{h.current=null},2);let{deltaX:r,deltaY:n,shiftKey:o}=t,a=r,p=n;("sx"===h.current||!h.current&&o&&n&&!r)&&(a=n,p=0,h.current="sx");let v=Math.abs(a),y=Math.abs(p);if(null===h.current&&(h.current=l&&v>y?"x":"y"),"y"===h.current)!function(e,t){if(i.er.cancel(c.current),!g(!1,t))e._virtualHandled||(e._virtualHandled=!0,u.current+=t,f.current=t,d||e.preventDefault(),c.current=(0,i.er)(()=>{let e=m.current?10:1;s(u.current*e,!1),u.current=0}))}(t,p);else s(a,!0),d||t.preventDefault()},function(t){e&&(m.current=t.detail===f.current)}]}(X,eM,eR,eC,eI,!!N,(0,i._q)((e,t)=>{t?((0,s.flushSync)(()=>{el(t=>eL(t+(q?-e:e)))}),ek()):ec(t=>t+e)}));!function(e,t,r){let n,o=(0,a.useRef)(!1),l=(0,a.useRef)(0),s=(0,a.useRef)(0),u=(0,a.useRef)(null),c=(0,a.useRef)(null),d=e=>{if(o.current){let t=Math.ceil(e.touches[0].pageX),n=Math.ceil(e.touches[0].pageY),o=l.current-t,i=s.current-n,a=Math.abs(o)>Math.abs(i);a?l.current=t:s.current=n;let u=r(a,a?o:i,!1,e);u&&e.preventDefault(),clearInterval(c.current),u&&(c.current=setInterval(()=>{a?o*=g:i*=g;let e=Math.floor(a?o:i);(!r(a,e,!0)||.1>=Math.abs(e))&&clearInterval(c.current)},16))}},p=()=>{o.current=!1,n()},f=e=>{n(),1!==e.touches.length||o.current||(o.current=!0,l.current=Math.ceil(e.touches[0].pageX),s.current=Math.ceil(e.touches[0].pageY),u.current=e.target,u.current.addEventListener("touchmove",d,{passive:!1}),u.current.addEventListener("touchend",p,{passive:!0}))};n=()=>{u.current&&(u.current.removeEventListener("touchmove",d),u.current.removeEventListener("touchend",p))},(0,i.Nf)(()=>(e&&t.current.addEventListener("touchstart",f,{passive:!0}),()=>{t.current?.removeEventListener("touchstart",f),n(),clearInterval(c.current)}),[e])}(X,Z,(e,t,r,n)=>!eO(e,t,r)&&(!n||!n._virtualHandled)&&(n&&(n._virtualHandled=!0),eT({preventDefault(){},deltaX:e?t:0,deltaY:e?0:t}),!0)),a.useEffect(()=>{let e=Z.current;if(U&&e){let t,r,n=!1,o=()=>{i.er.cancel(t)},l=()=>{o(),t=(0,i.er)(()=>{(e=>{ec(t=>t+e)})(r),l()})},a=()=>{n=!1,o()},s=e=>{!e.target.draggable&&0===e.button&&(e._virtualHandled||(e._virtualHandled=!0,n=!0))},u=t=>{if(n){let n=b(t,!1),{top:i,bottom:a}=e.getBoundingClientRect();n<=i?(r=-h(i-n),l()):n>=a?(r=h(n-a),l()):o()}};return e.addEventListener("mousedown",s),e.ownerDocument.addEventListener("mouseup",a),e.ownerDocument.addEventListener("mousemove",u),e.ownerDocument.addEventListener("dragend",a),()=>{e.removeEventListener("mousedown",s),e.ownerDocument.removeEventListener("mouseup",a),e.ownerDocument.removeEventListener("mousemove",u),e.ownerDocument.removeEventListener("dragend",a),o()}}},[U]),(0,i.Nf)(()=>{function e(e){let t=eM&&e.detail<0,r=eR&&e.detail>0;!X||t||r||e.preventDefault()}let t=Z.current;return t.addEventListener("wheel",eT,{passive:!1}),t.addEventListener("DOMMouseScroll",eP,{passive:!0}),t.addEventListener("MozMousePixelScroll",e,{passive:!1}),()=>{t.removeEventListener("wheel",eT),t.removeEventListener("DOMMouseScroll",eP),t.removeEventListener("MozMousePixelScroll",e)}},[X,eM,eR]),(0,i.Nf)(()=>{if(N){let e=eL(eo);el(e),ek({x:e})}},[ev.width,N]);let eH=()=>{e$.current?.delayHidden(),eE.current?.delayHidden()},eB=function(e,t,r,n){let[o,l]=a.useMemo(()=>[new Map,[]],[e,r.id,n]);return(i,a=i)=>{let s=o.get(i),u=o.get(a);if(void 0===s||void 0===u){let c=e.length;for(let d=l.length;d<c;d+=1){let c=t(e[d]);o.set(c,d);let p=r.get(c)??n;if(l[d]=(l[d-1]||0)+p,c===i&&(s=d),c===a&&(u=d),void 0!==s&&void 0!==u)break}}return{top:l[s-1]||0,bottom:l[u]}}}(J,j,K,S),e_=function(e,t,r,n,o,l,s,u,c){let d=a.useRef(),[p,f]=a.useState(null);return(0,i.Nf)(()=>{if(p&&p.times<10){if(!e.current)return void f(e=>({...e}));s();let{targetAlign:i,originAlign:a,index:c,offset:d}=p,m=function(e,t){let r="function"==typeof e?e(t):e;return Number.isFinite(r)?r:0}(d,{getSize:l}),g=e.current.clientHeight,h=!1,b=i,v=null;if(g){let l=i||a,s=0,d=0,f=0,y=Math.min(t.length-1,c);for(let e=0;e<=y;e+=1){let l=o(t[e]);d=s;let i=r.get(l);s=f=d+(void 0===i?n:i)}let $="top"===l?m:g-m;for(let e=y;e>=0;e-=1){let n=o(t[e]),l=r.get(n);if(void 0===l){h=!0;break}if(($-=l)<=0)break}switch(l){case"top":v=d-m;break;case"bottom":v=f-g+m;break;default:{let{scrollTop:t}=e.current;d<t?b="top":f>t+g&&(b="bottom")}}null!==v&&u(v),v!==p.lastTop&&(h=!0)}h&&f({...p,times:p.times+1,targetAlign:b,lastTop:v})}},[p,e.current]),e=>{if(null==e)return void c();if(i.er.cancel(d.current),"number"==typeof e)u(e);else if(e&&"object"==typeof e){let r,{align:n}=e;"index"in e?{index:r}=e:r=t.findIndex(t=>o(t)===e.key);let{offset:l=0}=e;f({times:0,index:r,offset:l,originAlign:n})}}}(Z,J,K,S,j,eB,()=>G(!0),ec,eH);a.useImperativeHandle(t,()=>({nativeElement:et.current,getScrollInfo:eA,scrollTo:e=>{e&&"object"==typeof e&&("left"in e||"top"in e)?(void 0!==e.left&&el(eL(e.left)),e_(e.top)):e_(e)}})),(0,i.Nf)(()=>{T&&T(J.slice(eg,eh+1),J)},[eg,eh,J]);let eW=H?.({start:eg,end:eh,virtual:U,offsetX:eo,scrollTop:er,offsetY:eb,rtl:q,getSize:eB}),ej=function(e,t,r,n,o,l,i,{getKey:s}){return e.slice(t,r+1).map((e,r)=>{let u=i(e,t+r,{style:{width:n},offsetX:o}),d=s(e);return a.createElement(c,{key:d,setRef:t=>l(e,t)},u)})}(J,eg,eh,N,eo,F,C,{getKey:j}),eF=null;x&&(eF={[D?"height":"maxHeight"]:x,...E},X&&(eF.overflowY="hidden",N&&(eF.overflowX="hidden"),ei&&(eF.pointerEvents="none")));let eG={};return q&&(eG.dir="rtl"),a.createElement("div",(0,n.A)({ref:et,style:{...M,position:"relative"},className:Q},eG,W),a.createElement(l.Ay,{onResize:e=>{ey({width:e.offsetWidth,height:e.offsetHeight})}},a.createElement(k,{className:`${r}-holder`,style:eF,ref:Z,onScroll:function(e){let{scrollTop:t}=e.currentTarget;t!==er&&ec(t),z?.(e),ek()},onMouseEnter:eH},a.createElement(u,{prefixCls:r,height:em,offsetX:eo,offsetY:eb,scrollWidth:N,onInnerResize:G,ref:ee,innerProps:P,rtl:q,extra:eW},ej))),U&&em>x&&a.createElement(v,{ref:e$,prefixCls:r,scrollOffset:er,scrollRange:em,rtl:q,onScroll:ez,onStartMove:es,onStopMove:eu,spinSize:ex,containerSize:ev.height,style:B?.verticalScrollBar,thumbStyle:B?.verticalScrollBarThumb,showScrollBar:_}),U&&N>ev.width&&a.createElement(v,{ref:eE,prefixCls:r,scrollOffset:eo,scrollRange:N,rtl:q,onScroll:ez,onStartMove:es,onStopMove:eu,spinSize:ew,containerSize:ev.width,horizontal:!0,style:B?.horizontalScrollBar,thumbStyle:B?.horizontalScrollBarThumb,showScrollBar:_}))}let x=a.forwardRef(w);x.displayName="List",a.forwardRef((e,t)=>w({...e,virtual:!1},t)).displayName="List";let S=x},97194:(e,t,r)=>{r.d(t,{A:()=>i});var n=r(97109),o=r(74567),l=r(84253);let i=e=>{let{componentName:t}=e,{getPrefixCls:r}=(0,n.useContext)(o.QO),i=r("empty");switch(t){case"Table":case"List":return n.createElement(l.A,{image:l.A.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return n.createElement(l.A,{image:l.A.PRESENTED_IMAGE_SIMPLE,className:`${i}-small`});case"Table.filter":return null;default:return n.createElement(l.A,null)}}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[933],{10218:(e,t,o)=>{o.d(t,{A:()=>g,H:()=>h});var n=o(97109),r=o(4932),l=o(42644);let i=e=>"object"==typeof e&&null!=e&&1===e.nodeType,a=(e,t)=>(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e,c=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){let o=getComputedStyle(e,null);return a(o.overflowY,t)||a(o.overflowX,t)||(e=>{let t=(e=>{if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}})(e);return!!t&&(t.clientHeight<e.scrollHeight||t.clientWidth<e.scrollWidth)})(e)}return!1},s=(e,t,o,n,r,l,i,a)=>l<e&&i>t||l>e&&i<t?0:l<=e&&a<=o||i>=t&&a>=o?l-e-n:i>t&&a<o||l<e&&a>o?i-t+r:0,d=e=>{let t=e.parentElement;return null==t?e.getRootNode().host||null:t},u=(e,t)=>{var o,n,r,l;if("undefined"==typeof document)return[];let{scrollMode:a,block:u,inline:f,boundary:p,skipOverflowHiddenElements:h}=t,m="function"==typeof p?p:e=>e!==p;if(!i(e))throw TypeError("Invalid target");let g=document.scrollingElement||document.documentElement,v=[],b=e;for(;i(b)&&m(b);){if((b=d(b))===g){v.push(b);break}null!=b&&b===document.body&&c(b)&&!c(document.documentElement)||null!=b&&c(b,h)&&v.push(b)}let $=null!=(n=null==(o=window.visualViewport)?void 0:o.width)?n:innerWidth,y=null!=(l=null==(r=window.visualViewport)?void 0:r.height)?l:innerHeight,{scrollX:w,scrollY:E}=window,{height:A,width:I,top:M,right:H,bottom:C,left:N}=e.getBoundingClientRect(),{top:k,right:x,bottom:R,left:S}=(e=>{let t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e),z="start"===u||"nearest"===u?M-k:"end"===u?C+R:M+A/2-k+R,W="center"===f?N+I/2-S+x:"end"===f?H+x:N-S,j=[];for(let e=0;e<v.length;e++){let t=v[e],{height:o,width:n,top:r,right:l,bottom:i,left:d}=t.getBoundingClientRect();if("if-needed"===a&&M>=0&&N>=0&&C<=y&&H<=$&&(t===g&&!c(t)||M>=r&&C<=i&&N>=d&&H<=l))break;let p=getComputedStyle(t),h=parseInt(p.borderLeftWidth,10),m=parseInt(p.borderTopWidth,10),b=parseInt(p.borderRightWidth,10),k=parseInt(p.borderBottomWidth,10),x=0,R=0,S="offsetWidth"in t?t.offsetWidth-t.clientWidth-h-b:0,V="offsetHeight"in t?t.offsetHeight-t.clientHeight-m-k:0,_="offsetWidth"in t?0===t.offsetWidth?0:n/t.offsetWidth:0,F="offsetHeight"in t?0===t.offsetHeight?0:o/t.offsetHeight:0;if(g===t)x="start"===u?z:"end"===u?z-y:"nearest"===u?s(E,E+y,y,m,k,E+z,E+z+A,A):z-y/2,R="start"===f?W:"center"===f?W-$/2:"end"===f?W-$:s(w,w+$,$,h,b,w+W,w+W+I,I),x=Math.max(0,x+E),R=Math.max(0,R+w);else{x="start"===u?z-r-m:"end"===u?z-i+k+V:"nearest"===u?s(r,i,o,m,k+V,z,z+A,A):z-(r+o/2)+V/2,R="start"===f?W-d-h:"center"===f?W-(d+n/2)+S/2:"end"===f?W-l+b+S:s(d,l,n,h,b+S,W,W+I,I);let{scrollLeft:e,scrollTop:a}=t;x=0===F?0:Math.max(0,Math.min(a+x/F,t.scrollHeight-o/F+V)),R=0===_?0:Math.max(0,Math.min(e+R/_,t.scrollWidth-n/_+S)),z+=a-x,W+=e-R}j.push({el:t,top:x,left:R})}return j};var f=o(26047),p=o(44624);function h(e){return(0,p.$r)(e).join("_")}function m(e,t){let o=t.getFieldInstance(e),n=(0,l.rb)(o);if(n)return n;let r=(0,p.kV)((0,p.$r)(e),t.__INTERNAL__.name);if(r)return document.getElementById(r)}function g(e){let[t]=(0,r.mN)(),o=n.useRef({}),l=n.useMemo(()=>e??{...t,__INTERNAL__:{itemRef:e=>t=>{let n=h(e);t?o.current[n]=t:delete o.current[n]}},scrollToField:(e,t={})=>{let{focus:o,...n}=t,r=m(e,l);r&&(!function(e,t){if(!e.isConnected||!(e=>{let t=e;for(;t&&t.parentNode;){if(t.parentNode===document)return!0;t=t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}return!1})(e))return;let o=(e=>{let t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e);if("object"==typeof t&&"function"==typeof t.behavior)return t.behavior(u(e,t));let n="boolean"==typeof t||null==t?void 0:t.behavior;for(let{el:r,top:l,left:i}of u(e,!1===t?{block:"end",inline:"nearest"}:t===Object(t)&&0!==Object.keys(t).length?t:{block:"start",inline:"nearest"})){let e=l-o.top+o.bottom,t=i-o.left+o.right;r.scroll({top:e,left:t,behavior:n})}}(r,{scrollMode:"if-needed",block:"nearest",...n}),o&&l.focusField(e))},focusField:e=>{let t=l.getFieldInstance(e);(0,f.Tn)(t?.focus)?t.focus():m(e,l)?.focus?.()},getFieldInstance:e=>{let t=h(e);return o.current[t]}},[e,t]);return[l]}},15437:(e,t,o)=>{o.d(t,{A:()=>n});let n=e=>{let{componentCls:t,antCls:o,motionDurationMid:n,motionEaseInOut:r}=e;return{[t]:{[`${o}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`${["height","opacity"].map(e=>`${e} ${n} ${r}`).join(", ")} !important`}},[`${o}-motion-collapse`]:{overflow:"hidden",transition:`${["height","opacity"].map(e=>`${e} ${n} ${r}`).join(", ")} !important`}}}}},32225:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 464h-68V240c0-70.7-57.3-128-128-128H388c-70.7 0-128 57.3-128 128v224h-68c-17.7 0-32 14.3-32 32v384c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V496c0-17.7-14.3-32-32-32zM332 240c0-30.9 25.1-56 56-56h248c30.9 0 56 25.1 56 56v224H332V240zm460 600H232V536h560v304zM484 701v53c0 4.4 3.6 8 8 8h40c4.4 0 8-3.6 8-8v-53a48.01 48.01 0 10-56 0z"}}]},name:"lock",theme:"outlined"}},44624:(e,t,o)=>{o.d(t,{$r:()=>r,BS:()=>i,kV:()=>l});let n=["parentNode"];function r(e){return void 0===e||!1===e?[]:Array.isArray(e)?e:[e]}function l(e,t){if(!e.length)return;let o=e.join("_");return t?`${t}_${o}`:n.includes(o)?`form_item_${o}`:o}function i(e,t,o,n,r,l){let i=n;return void 0!==l?i=l:o.validating?i="validating":e.length?i="error":t.length?i="warning":(o.touched||r&&o.validated)&&(i="success"),i}},47210:(e,t,o)=>{o.d(t,{A:()=>a});var n=o(97109),r=o(58970),l=o(88483);function i(){return(i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e}).apply(this,arguments)}let a=n.forwardRef((e,t)=>n.createElement(l.A,i({},e,{ref:t,icon:r.A})))},51307:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M893.3 293.3L730.7 130.7c-7.5-7.5-16.7-13-26.7-16V112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V338.5c0-17-6.7-33.2-18.7-45.2zM384 184h256v104H384V184zm456 656H184V184h136v136c0 17.7 14.3 32 32 32h320c17.7 0 32-14.3 32-32V205.8l136 136V840zM512 442c-79.5 0-144 64.5-144 144s64.5 144 144 144 144-64.5 144-144-64.5-144-144-144zm0 224c-44.2 0-80-35.8-80-80s35.8-80 80-80 80 35.8 80 80-35.8 80-80 80z"}}]},name:"save",theme:"outlined"}},58970:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"arrow-left",theme:"outlined"}},67547:(e,t,o)=>{o.d(t,{A:()=>a});var n=o(97109),r=o(51307),l=o(88483);function i(){return(i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e}).apply(this,arguments)}let a=n.forwardRef((e,t)=>n.createElement(l.A,i({},e,{ref:t,icon:r.A})))},85493:(e,t,o)=>{o.d(t,{A:()=>x});var n=o(97109),r=o(59188),l=o(4216),i=o(45042),a=o(97137),c=o(62188),s=o(67189),d=o(42644),u=o(3638),f=o(92162),p=o(26047),h=o(74567),m=o(15561),g=o(7961),v=o(10540);let b=(e,t,o)=>({background:e,[`${o}-icon`]:{color:t}}),$=(0,v.OF)("Alert",e=>[(e=>{let{componentCls:t,motionDurationSlow:o,marginXS:n,marginSM:r,fontSize:l,fontSizeLG:i,lineHeight:a,borderRadiusLG:c,motionEaseInOutCirc:s,withDescriptionIconSize:d,colorText:u,colorTextHeading:f,withDescriptionPadding:p,defaultPadding:h,lineWidth:v,lineType:b,colorSuccessBorder:$,colorWarningBorder:y,colorErrorBorder:w,colorInfoBorder:E}=e;return{[t]:{...(0,g.dF)(e),position:"relative",display:"flex",alignItems:"center",padding:h,wordWrap:"break-word",borderRadius:c,borderWidth:(0,m.zA)(v),borderStyle:b,[`&${t}-success`]:{borderColor:$},[`&${t}-info`]:{borderColor:E},[`&${t}-warning`]:{borderColor:y},[`&${t}-error`]:{borderColor:w},[`&${t}-filled`]:{borderColor:"transparent"},[`&${t}-rtl`]:{direction:"rtl"},[`${t}-section`]:{flex:1,minWidth:0},[`${t}-icon`]:{marginInlineEnd:n,lineHeight:0},"&-description":{display:"none",fontSize:l,lineHeight:a},"&-title":{color:f},[`&${t}-motion-leave`]:{overflow:"hidden",opacity:1,transition:["max-height","opacity","padding-top","padding-bottom","margin-bottom"].map(e=>`${e} ${o} ${s}`).join(", ")},[`&${t}-motion-leave-active`]:{maxHeight:0,marginBottom:"0 !important",paddingTop:0,paddingBottom:0,opacity:0},[`&${t}-with-description`]:{alignItems:"flex-start",padding:p,[`${t}-icon`]:{marginInlineEnd:r,fontSize:d,lineHeight:0},[`${t}-title`]:{display:"block",marginBottom:n,color:f,fontSize:i},[`${t}-description`]:{display:"block",color:u}},[`&${t}-banner`]:{marginBottom:0,border:"0 !important",borderRadius:0}}}})(e),(e=>{let{componentCls:t,colorSuccess:o,colorSuccessBg:n,colorWarning:r,colorWarningBg:l,colorError:i,colorErrorBg:a,colorInfo:c,colorInfoBg:s}=e;return{[t]:{"&-success":b(n,o,t),"&-info":b(s,c,t),"&-warning":b(l,r,t),"&-error":{...b(a,i,t),[`${t}-description > pre`]:{margin:0,padding:0}}}}})(e),(e=>{let{componentCls:t,iconCls:o,motionDurationMid:n,marginXS:r,fontSizeIcon:l,colorIcon:i,colorIconHover:a}=e;return{[t]:{[`${t}-actions`]:{marginInlineStart:r},[`${t}-close-icon`]:{marginInlineStart:r,padding:0,overflow:"hidden",fontSize:l,lineHeight:(0,m.zA)(l),backgroundColor:"transparent",border:"none",cursor:"pointer",...(0,g.K8)(e),[`${o}-close`]:{color:i,transition:`color ${n}`,"&:hover":{color:a}}},"&-close-text":{color:i,transition:`color ${n}`,"&:hover":{color:a}}}}})(e)],e=>({withDescriptionIconSize:e.fontSizeHeading3,defaultPadding:`${e.paddingContentVerticalSM}px 12px`,withDescriptionPadding:`${e.paddingMD}px ${e.paddingContentHorizontalLG}px`})),y=e=>{let{icon:t,type:o,className:i,style:s,successIcon:d,infoIcon:u,warningIcon:f,errorIcon:p}=e,h={success:d??n.createElement(r.A,null),info:u??n.createElement(c.A,null),error:p??n.createElement(l.A,null),warning:f??n.createElement(a.A,null)};return n.createElement("span",{className:i,style:s},t??h[o])},w=e=>{let{isClosable:t,prefixCls:o,closeIcon:r,handleClose:l,ariaProps:a,className:c,style:s}=e,d=!0===r||void 0===r?n.createElement(i.A,null):r;return t?n.createElement("button",{type:"button",onClick:l,className:(0,u.$)(`${o}-close-icon`,c),tabIndex:0,style:s,...a},d):null},E=n.forwardRef((e,t)=>{let{description:o,prefixCls:r,message:l,title:i,banner:a,className:c,rootClassName:m,style:g,onMouseEnter:v,onMouseLeave:b,onClick:E,afterClose:A,showIcon:I,closable:M,closeText:H,closeIcon:C,action:N,id:k,styles:x,classNames:R,...S}=e,z=i??l,[W,j]=n.useState(!1),V=n.useRef(null);n.useImperativeHandle(t,()=>({nativeElement:V.current}));let{getPrefixCls:_,direction:F,variant:O,closable:B,closeIcon:L,className:T,style:D,classNames:P,styles:Q,successIcon:X,infoIcon:K,warningIcon:G,errorIcon:Y}=(0,h.TP)("alert"),q=_("alert",r),[J,U]=$(q),{onClose:Z,afterClose:ee}=(0,p.Qd)(M)?M:{},et=t=>{j(!0),(Z??e.onClose)?.(t)},eo=n.useMemo(()=>void 0!==e.type?e.type:a?"warning":"info",[e.type,a]),en=e.variant??O??"outlined",er=n.useMemo(()=>!!(0,p.Qd)(M)&&!!M.closeIcon||!!H||("boolean"==typeof M?M:!!(!1!==C&&(0,p.R)(C))||!!B),[H,C,M,B]),el=!!a&&void 0===I||I,ei={...e,prefixCls:q,variant:en,type:eo,showIcon:el,closable:er},ea=(0,f.XT)(D),ec=(0,f.XT)(g),[es,ed]=(0,f.AV)([P,R],[Q,ea,x,ec],{props:ei}),eu=(0,u.$)(q,`${q}-${eo}`,`${q}-${en}`,{[`${q}-with-description`]:!!o,[`${q}-no-icon`]:!el,[`${q}-banner`]:!!a,[`${q}-rtl`]:"rtl"===F},T,c,m,es.root,U,J),ef=(0,d.KE)(S,{aria:!0,data:!0}),ep=n.useMemo(()=>(0,p.Qd)(M)&&M.closeIcon?M.closeIcon:H||(void 0!==C?C:(0,p.Qd)(B)&&B.closeIcon?B.closeIcon:L),[C,M,B,H,L]),eh=n.useMemo(()=>{let e=M??B;return(0,p.Qd)(e)?(0,d.KE)(e,{data:!0,aria:!0}):{}},[M,B]);return n.createElement(s.Ay,{visible:!W,motionName:`${q}-motion`,motionAppear:!1,motionEnter:!1,onLeaveStart:e=>({maxHeight:e.offsetHeight}),onLeaveEnd:ee??A},({className:t,style:r},l)=>n.createElement("div",{id:k,ref:(0,d.K4)(V,l),"data-show":!W,className:(0,u.$)(eu,t),style:{...ed.root,...r},onMouseEnter:v,onMouseLeave:b,onClick:E,role:"alert",...ef},el?n.createElement(y,{className:(0,u.$)(`${q}-icon`,es.icon),style:ed.icon,description:o,icon:e.icon,prefixCls:q,type:eo,successIcon:X,infoIcon:K,warningIcon:G,errorIcon:Y}):null,n.createElement("div",{className:(0,u.$)(`${q}-section`,es.section),style:ed.section},z?n.createElement("div",{className:(0,u.$)(`${q}-title`,es.title),style:ed.title},z):null,o?n.createElement("div",{className:(0,u.$)(`${q}-description`,es.description),style:ed.description},o):null),N?n.createElement("div",{className:(0,u.$)(`${q}-actions`,es.actions),style:ed.actions},N):null,n.createElement(w,{className:es.close,style:ed.close,isClosable:er,prefixCls:q,closeIcon:ep,handleClose:et,ariaProps:eh})))});var A=o(41113),I=o(49939),M=o(90218),H=o(13076),C=o(83784),N=o(15472);let k=function(e){function t(){var e,o,n;return(0,A.A)(this,t),o=t,n=arguments,o=(0,M.A)(o),(e=(0,C.A)(this,(0,H.A)()?Reflect.construct(o,n||[],(0,M.A)(this).constructor):o.apply(this,n))).state={error:void 0,info:{}},e}return(0,N.A)(t,e),(0,I.A)(t,[{key:"componentDidCatch",value:function(e,t){this.setState({error:e,info:t})}},{key:"render",value:function(){let{message:e,title:t,description:o,id:r,children:l}=this.props,{error:i,info:a}=this.state,c=t??e,s=a?.componentStack||null,d=(0,p.R)(c)?c:i?.toString(),u=(0,p.R)(o)?o:s;return i?n.createElement(E,{id:r,type:"error",title:d,description:n.createElement("pre",{style:{fontSize:"0.9em",overflowX:"auto"}},u)}):l}}])}(n.PureComponent);E.ErrorBoundary=k;let x=E},86193:(e,t,o)=>{o.d(t,{A:()=>a});var n=o(97109),r=o(32225),l=o(88483);function i(){return(i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e}).apply(this,arguments)}let a=n.forwardRef((e,t)=>n.createElement(l.A,i({},e,{ref:t,icon:r.A})))}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[790],{38977:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>eZ});var r=n(65321),l=n(97109),i=n(3454),a=n.n(i),o=n(43220),s=n.n(o),c=n(86109),d=n(48399),u=n(17807),h=n(42700),p=n(32941),m=n(33442),x=n(85114),g=n(25258),v=n(11702),f=n(85493),y=n(99811),j=n(6578),A=n(32244),b=n(93533),k=n(8090);function w(e){let{readings:t}=e,n=null==t?void 0:t.contractQuality;if(!n)return(0,r.jsx)("div",{role:"status",children:"七维评价尚未产出。"});let l=n.score,i=null==t?void 0:t.contractQualityStale;return Array.isArray(l.defects)?(0,r.jsxs)("div",{"aria-label":"七维评价",style:{fontSize:12,lineHeight:1.8},children:[(0,r.jsx)("strong",{children:i?"编辑前的历史七维诊断":"七维专业诊断"}),(0,r.jsxs)("span",{children:[";",i?"当前正文须重新评价":l.deliveryReady?"适用职责核验满足,待专业验收":"仍有缺陷或待核事项"]}),(0,r.jsxs)("div",{children:["阻断 ",l.blocking.length," 项;按根因归并的问题 ",l.defects.length," 项。专业档位不换算为未经标定的百分分数。"]}),i&&(0,r.jsx)("div",{children:i.reason}),(0,r.jsxs)("details",{children:[(0,r.jsx)("summary",{children:"查看七个维度"}),(0,r.jsxs)("table",{style:{width:"100%"},children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{children:"维度"}),(0,r.jsx)("th",{children:"质量档位"}),(0,r.jsx)("th",{children:"满足 / 未满足 / 未判定"})]})}),(0,r.jsx)("tbody",{children:l.dimensions.map(e=>(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{children:e.label}),(0,r.jsx)("td",{children:"not-applicable"===e.status?"不适用":e.qualityLabel}),(0,r.jsxs)("td",{children:[e.verification.met," / ",e.verification.failed," / ",e.verification.unmeasured]})]},e.id))})]}),(0,r.jsx)("div",{children:n.expertValidated?"已完成专家校准。":"尚未完成专家校准。"})]})]}):(0,r.jsx)("div",{role:"status",children:"历史评价回执保留;按当前专业诊断口径重新评价后显示核验与质量档位。"})}let{Paragraph:S,Text:I}=d.A;function C(e){return new Date(e).toLocaleString()}function z(e){var t,n,i;let{status:a,title:o,html:s,source:c,truncated:d,totalChars:u,renderedChars:p,stats:g,gate:y,loading:j,error:A,onRetry:b,updatedAt:z,generatedAt:R,className:N,t:E,deliveryReadings:T}=e,M=null!=s?s:"",L=M.trim().length>0,D=g?function(e){let t=[];return e.droppedDangerousBlocks>0&&t.push("删除了 ".concat(e.droppedDangerousBlocks," 处可执行/可加载内容(脚本、样式、内嵌页面等)")),e.blockedUrls>0&&t.push("拦截了 ".concat(e.blockedUrls," 个协议不安全的链接(如 javascript: / data:)")),e.escapedTags>0&&t.push("转义了 ".concat(e.escapedTags," 个不支持的标签(原文里的原始 HTML 会以文字显示)")),e.droppedAttributes>0&&t.push("剥离了 ".concat(e.droppedAttributes," 个属性(样式、事件、非白名单属性)")),e.droppedComments>0&&t.push("删除了 ".concat(e.droppedComments," 处注释/声明")),t}(g):[],[P,B]=(0,l.useState)(!1),q=null!=(t=null==y?void 0:y.issues)?t:[],H=q.length>5,_=P?q:q.slice(0,5),W=q.length-_.length,F=W+(null!=(n=null==y?void 0:y.truncatedCount)?n:0),U=(0,r.jsxs)("div",{className:"deliverablePreviewMeta",children:[o&&(0,r.jsx)(I,{strong:!0,style:{fontSize:15},children:o}),a&&(0,r.jsx)(v.A,{color:(0,k.uj)(a),children:(0,k.GC)(a,E)}),c&&(0,r.jsx)(I,{type:"secondary",style:{fontSize:12},children:"预览正文:".concat("editedMarkdown"===c?"编辑后的正文(以它为准)":"markdown"===c?"记录里的正文(markdown 字段)":"draft"===c?"生成时的草案正文(draft.markdown)":"none"===c?"没有正文":"未识别的正文来源(".concat(c,")"))}),R?(0,r.jsx)(I,{type:"secondary",style:{fontSize:12},children:"生成于 ".concat(C(R))}):null,z?(0,r.jsx)(I,{type:"secondary",style:{fontSize:12},children:"更新于 ".concat(C(z))}):null]}),G=q.length>0&&(0,r.jsxs)("div",{style:{fontSize:12.5,lineHeight:1.8},children:[_.map((e,t)=>(0,r.jsxs)("div",{children:["\xb7 ",e]},"".concat(t,"-").concat(e.slice(0,12)))),F>0&&(0,r.jsx)("div",{children:"…还有 ".concat(F," 项未列出").concat(W>0&&(null!=(i=null==y?void 0:y.truncatedCount)?i:0)>0?"(服务端只下发了 ".concat(q.length," 项)"):"")}),H&&(0,r.jsx)(x.Ay,{type:"link",size:"small",style:{paddingInline:0},onClick:()=>B(e=>!e),children:P?"收起阻断项":"展开全部 ".concat(q.length," 项")})]}),O=y?(0,r.jsx)(f.A,{style:{width:"100%"},type:y.passed?"success":"warning",showIcon:!0,message:y.passed?"交付门禁:通过":"交付门禁:阻断 ".concat(y.blockingCount," 项"),description:(0,r.jsxs)(m.A,{direction:"vertical",size:4,style:{width:"100%"},children:[(0,r.jsx)(I,{type:"secondary",style:{fontSize:12},children:"能否导出由服务端判定;此处仅供查看。"}),G]})}):(0,r.jsx)(f.A,{style:{width:"100%"},type:"info",showIcon:!0,message:"尚无交付门禁结论(生成中或尚未完成)——这不代表已通过。"});return(0,r.jsx)("div",{className:null!=N?N:"deliverablePreview",children:(0,r.jsxs)("div",{className:"deliverablePreviewStack",children:[U,(0,r.jsx)(w,{readings:T}),O,d&&(0,r.jsx)(f.A,{style:{width:"100%"},type:"warning",showIcon:!0,message:"正文过长,预览只渲染了前 ".concat((null!=p?p:0).toLocaleString()," 字(共 ").concat((null!=u?u:0).toLocaleString()," 字)"),description:"后续内容未渲染;导出物是完整正文,不受预览截断影响。"}),D.length>0&&(0,r.jsx)(f.A,{style:{width:"100%"},type:"info",showIcon:!0,message:"预览已对内容做安全处置(与导出物可能存在差异)",description:(0,r.jsx)("div",{style:{fontSize:12,lineHeight:1.7},children:D.map(e=>(0,r.jsxs)("div",{children:["\xb7 ",e]},e))})}),j&&(0,r.jsxs)(m.A,{align:"center",size:8,children:[(0,r.jsx)(h.A,{size:"small"}),(0,r.jsx)(I,{type:"secondary",children:"正在取回成稿预览(服务端渲染 + 清洗)…"})]}),!j&&A&&(0,r.jsx)(f.A,{style:{width:"100%"},type:"error",showIcon:!0,message:"取回成稿预览失败",description:(0,r.jsxs)(m.A,{direction:"vertical",size:6,children:[(0,r.jsx)(I,{style:{fontSize:12},children:A}),b&&(0,r.jsx)(x.Ay,{size:"small",onClick:b,children:"重新取回"})]})}),!j&&!A&&!L&&(0,r.jsx)(f.A,{style:{width:"100%"},type:"info",showIcon:!0,message:"这条记录还没有可预览的正文",description:"生成完成后这里会显示成稿全文;生成中的记录只有节点日志(见画布),没有正文可预览。"}),!A&&L&&(0,r.jsxs)("div",{className:"deliverablePreviewPaper",children:[(0,r.jsx)("article",{className:"deliverablePreviewBody","aria-label":"成稿预览正文",dangerouslySetInnerHTML:{__html:M}}),(0,r.jsxs)("div",{className:"deliverablePreviewEnd",children:[(0,r.jsx)(I,{type:"secondary",style:{fontSize:12},children:d?"正文到此为止(预览有截断,见上方提示;导出物是完整正文)":p&&p>0?"正文到此为止:以上是本记录的全部正文,共 ".concat(p.toLocaleString()," 字(未截断)"):"正文到此为止:以上是本记录的全部正文(未截断)"}),y&&!y.passed&&(0,r.jsx)(I,{style:{fontSize:12,color:"var(--colorWarning)"},children:"交付门禁未通过(阻断 ".concat(y.blockingCount," 项)——正文在这里结束并不代表成稿完整,缺什么见上方的阻断项清单。")})]})]}),!A&&L&&(0,r.jsx)(S,{type:"secondary",style:{fontSize:12,marginBottom:0,textAlign:"center"},children:"预览为服务端渲染结果;排版细节(字体、页眉页脚、分页)以导出物为准。"})]})})}let R=new Set(["prepare","understand","plan","blueprint"]),N=new Set(["close","deliver"]),E=new Set(["chapter","write"]);function T(e,t){let n=new Map;for(let t of e){if(void 0===t.parentId)continue;let e=n.get(t.parentId);e?e.push(t.id):n.set(t.parentId,[t.id])}let r=new Set([t]),l=[t],i=[];for(;l.length>0;){var a;let e=l.shift();for(let t of(i.push(e),null!=(a=n.get(e))?a:[]))r.has(t)||(r.add(t),l.push(t))}return i}function M(e,t){var n;let r=new Map(e.map(e=>[e.id,e])),l=r.get(t);if(!l)return;let i=T(e,t),a=e.map(e=>e.id).sort();if(R.has(l.type))return{targetNodeId:t,kind:"contaminated",affectedNodeIds:a,reason:"".concat(l.type," 承载事实 / 命名 / 标题指纹 → 11.1:跨文档污染,**不可回滚**(要么回滚,要么重新校准)"),escalate:a.length>5,rollbackable:!1};let o=(n=l.type).split(".")[0]||n;if(N.has(l.type)||N.has(o))return{targetNodeId:t,kind:"propagated",affectedNodeIds:a,reason:"".concat(l.type," 属全篇收口 / 交付层 → 预算守恒与全量判据复检波及整篇(11.1)"),escalate:a.length>5,rollbackable:!0};if(E.has(l.type)||"round"===o){let n=function(e,t,n){let r=new Set([t]),l=e.get(t);for(;l;){if(n(l))return l;let t=l.parentId;if(void 0===t||r.has(t))break;r.add(t),l=e.get(t)}}(r,t,e=>E.has(e.type)),i=n?T(e,n.id):a;return{targetNodeId:t,kind:"propagated",affectedNodeIds:i,reason:n?"".concat(l.type," 在章级锚点「").concat(n.title||n.id,"」内 → 跨章数值一致性 / 复读 / 依据对账(11.1)波及同章其余部分"):"".concat(l.type," 无章级锚点 → 按整篇保守估算(11.1)"),escalate:i.length>5,rollbackable:!0}}return{targetNodeId:t,kind:"local",affectedNodeIds:i,reason:"".concat(l.type," 属定点补丁层(11.5:确定性处理节点)→ 影响面限自身子树"),escalate:i.length>5,rollbackable:!0}}function L(e){let t=Math.max(18,Math.abs(e.y2-e.y1)/2);return"M ".concat(e.x1," ").concat(e.y1," C ").concat(e.x1," ").concat(e.y1+t,", ").concat(e.x2," ").concat(e.y2-t,", ").concat(e.x2," ").concat(e.y2)}let D={default:"canvasEdge",active:"canvasEdge canvasEdgeActive",warn:"canvasEdge canvasEdgeWarn",affected:"canvasEdge canvasEdgeAffected"},P={default:"url(#canvasArrow)",active:"url(#canvasArrowActive)",warn:"url(#canvasArrowWarn)",affected:"url(#canvasArrow)"};function B(e){let{edge:t,tone:n="default"}=e;return(0,r.jsx)("path",{className:D[n],d:L(t),markerEnd:P[n],"data-edge":"".concat(t.fromId,"->").concat(t.toId)})}function q(e){let{edges:t,width:n,height:l,toneOf:i,flowing:a,style:o}=e;return(0,r.jsxs)("svg",{className:"canvasEdgeLayer",width:Math.max(1,n),height:Math.max(1,l),viewBox:"0 0 ".concat(Math.max(1,n)," ").concat(Math.max(1,l)),"aria-hidden":"true",focusable:"false",style:o,children:[(0,r.jsxs)("defs",{children:[(0,r.jsx)("marker",{id:"canvasArrow",markerWidth:"8",markerHeight:"8",refX:"7",refY:"4",orient:"auto",markerUnits:"strokeWidth",children:(0,r.jsx)("path",{d:"M0,0 L8,4 L0,8 z",fill:"var(--canvasEdge)"})}),(0,r.jsx)("marker",{id:"canvasArrowActive",markerWidth:"8",markerHeight:"8",refX:"7",refY:"4",orient:"auto",markerUnits:"strokeWidth",children:(0,r.jsx)("path",{d:"M0,0 L8,4 L0,8 z",fill:"var(--canvasEdgeActive)"})}),(0,r.jsx)("marker",{id:"canvasArrowWarn",markerWidth:"8",markerHeight:"8",refX:"7",refY:"4",orient:"auto",markerUnits:"strokeWidth",children:(0,r.jsx)("path",{d:"M0,0 L8,4 L0,8 z",fill:"var(--canvasEdgeWarn)"})})]}),t.map(e=>{var t;return(0,r.jsxs)("g",{children:[(0,r.jsx)(B,{edge:e,tone:null!=(t=null==i?void 0:i(e))?t:"default"}),(null==a?void 0:a.has(e.id))&&(0,r.jsx)("path",{className:"canvasEdgeFlow",d:L(e),"data-flow":"".concat(e.fromId,"->").concat(e.toId)})]},e.id)})]})}let H=new Set(["completed","failed","skipped"]),_=[{key:"chars",unit:" 字"},{key:"words",unit:" 字"},{key:"noteChars",unit:" 字"},{key:"turn",unit:" 轮",prefix:"第 "},{key:"chapters",unit:" 章"},{key:"facts",unit:" 条事实"},{key:"evidence",unit:" 条证据"},{key:"issues",unit:" 个问题"},{key:"toolCalls",unit:" 次工具调用"},{key:"totalFiles",unit:" 份资料"},{key:"totalChunks",unit:" 个切片"},{key:"roundIteration",unit:" 轮修复",prefix:"第 "}];function W(e){var t;let n=null==(t=e.metrics)?void 0:t.note;return"string"==typeof n&&n.trim()?n.trim():void 0}function F(e,t){let{input:n,output:r}=function(e){let t=e=>"string"==typeof e&&e.trim()?e.trim():void 0;return{input:t(e.inputSummary),output:t(e.outputSummary)}}(e);for(let l of"dispatch"===t?[n,W(e),e.title]:[r,W(e),e.title,function(e){var t;let n=null!=(t=e.metrics)?t:{},r=[];for(let{key:e,unit:t,prefix:l}of _){let i=n[e];if(("number"==typeof i||"string"==typeof i)&&""!==i&&0!==i&&(r.push("".concat(null!=l?l:"").concat("number"==typeof i?i.toLocaleString():i).concat(t)),2===r.length))break}return r.length>0?r.join(" \xb7 "):void 0}(e)])if(l&&l.trim())return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:24,n=e.replace(/\s+/gu," ").trim();return n.length>t?"".concat(n.slice(0,t-1),"…"):n}(l)}function U(e){let{bubbles:t,layout:n,static:l=!1}=e;return 0===t.length?null:(0,r.jsx)("div",{className:"canvasBubbleLayer",style:{width:Math.max(1,n.width),height:Math.max(1,n.height)},"aria-hidden":"true",children:t.map(e=>{let t=function(e,t){let n=t.edges.find(t=>t.fromId===e.fromId&&t.toId===e.toId);if(n)return L(n);let r=t.edges.find(t=>t.fromId===e.toId&&t.toId===e.fromId);return r?function(e){let t=L(e),n=/^M ([\d.-]+) ([\d.-]+) C ([\d.-]+) ([\d.-]+), ([\d.-]+) ([\d.-]+), ([\d.-]+) ([\d.-]+)$/u.exec(t);if(!n)return t;let[,r,l,i,a,o,s,c,d]=n;return"M ".concat(c," ").concat(d," C ").concat(o," ").concat(s,", ").concat(i," ").concat(a,", ").concat(r," ").concat(l)}(r):null}(e,n);return t?(0,r.jsx)("div",{className:l?"canvasBubble canvasBubbleStatic":"canvasBubble","data-kind":e.kind,"data-from":e.fromId,"data-to":e.toId,style:{offsetPath:'path("'.concat(t,'")'),offsetRotate:"0deg",animationDuration:"".concat(1500,"ms")},children:(0,r.jsx)("span",{className:"canvasBubbleBody",children:(0,r.jsx)("span",{className:"canvasBubbleText",children:e.label})})},e.id):null})})}var G=n(94394);function O(e){return"stage-details"===e.source}let Q=new Set(["running","repairing"]),X=new Set(["role_binding","knowledge_retrieval","file_understanding","fact_extraction","chapter_generation","llm_review","validation","reference"]);function V(e){var t;return X.has(e)?null!=(t=G.i_[e])?t:e:(0,k.z9)(e)}function J(e,t){var n;let r=null==(n=e.metrics)?void 0:n[t];return"string"==typeof r&&r.trim()?r.trim():void 0}function Y(e,t,n){var r;let l=function(e){var t;let n=null==(t=e.metrics)?void 0:t.stageType;return"string"==typeof n&&n.trim()?n.trim():e.type.split(".")[0]||"default"}(e),i=null!=(r=J(e,"stageSubtitle"))?r:J(e,"stageRoleId"),a=J(e,"note");return{id:e.id,kind:l,kindLabel:V(l),...i&&i!==e.title?{role:i}:{},title:e.title||V(l),...a?{activity:a}:{},status:e.status,..."number"==typeof e.startedAt?{startedAt:e.startedAt}:{},..."number"==typeof e.completedAt?{completedAt:e.completedAt}:{},metrics:(0,k.dB)(e.metrics,8),depth:t}}function K(e,t){if("number"==typeof e.startedAt)return Math.max(0,("number"==typeof e.completedAt?e.completedAt:t)-e.startedAt)}var Z=n(46758),$=n(99605);let{Text:ee}=d.A,et=["error","warning","info"],en={error:"#ff4d4f",warning:"#faad14",info:"#1677ff"};function er(e){let{node:t,x:n,y:i,selected:a,affected:o,flashed:s,onSelect:c,onDrag:d,t:u}=e,h=function(e){let t=[],n=[];for(let r of e.issues)(O(r)?n:t).push(r);return{problems:t,details:n,counts:{error:t.filter(e=>"error"===e.level).length,warning:t.filter(e=>"warning"===e.level).length,info:t.filter(e=>"info"===e.level).length}}}(t),p=(0,k.Jy)(t),m=(0,k.O0)(t.metrics,2),x=(0,l.useRef)(null);return(0,l.useEffect)(()=>()=>{var e;null==(e=x.current)||e.call(x)},[]),(0,r.jsxs)("div",{className:"canvasNode".concat(a?" canvasNodeSelected":"").concat(o?" canvasNodeAffected":"").concat(s?" canvasNodeFlashed":""),style:{left:n,top:i,width:k.zT,height:k.EL},role:"button",tabIndex:0,"aria-label":"节点 ".concat(t.title),"data-node-id":t.id,onClick:e=>{e.stopPropagation(),c(t)},onPointerDown:e=>{var n,r;if(0!==e.button||(e.stopPropagation(),!d||(null==(r=e.target)||null==(n=r.closest)?void 0:n.call(r,"button, a, input, textarea"))))return;let l=e.clientX,i=e.clientY,a=e.pointerId,o=!1,s={dx:0,dy:0},c=e=>{e.pointerId===a&&(s={dx:e.clientX-l,dy:e.clientY-i},!o&&4>Math.abs(s.dx)&&4>Math.abs(s.dy)||(o=!0,d(t,s.dx,s.dy,"move")))},u=e=>{if(e.pointerId===a)document.removeEventListener("pointermove",c),document.removeEventListener("pointerup",u),document.removeEventListener("pointercancel",u),x.current=null,o&&(document.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault()},{capture:!0,once:!0}),d(t,s.dx,s.dy,"end"))};document.addEventListener("pointermove",c),document.addEventListener("pointerup",u),document.addEventListener("pointercancel",u),x.current=()=>{document.removeEventListener("pointermove",c),document.removeEventListener("pointerup",u),document.removeEventListener("pointercancel",u)}},onContextMenu:e=>{e.preventDefault(),e.stopPropagation()},onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),c(t))},children:[(0,r.jsxs)("div",{className:"canvasNodeHeader",children:[(0,r.jsx)("span",{className:"canvasNodeIcon","data-status":t.status,children:(0,k.kH)(t.type)}),(0,r.jsx)(ee,{ellipsis:!0,style:{flex:1,minWidth:0,fontWeight:600,fontSize:13},title:t.title,children:t.title}),et.map(e=>h.counts[e]>0&&(0,r.jsx)("span",{"data-issue-level":e,style:{flexShrink:0},children:(0,r.jsx)(Z.A,{count:h.counts[e],size:"small",color:en[e]})},e))]}),(0,r.jsxs)("div",{className:"canvasNodeMeta",children:[(0,r.jsx)(v.A,{color:(0,k.uv)(t.status),style:{marginInlineEnd:4},children:(0,k.m_)(t.status,u)}),(0,r.jsx)(ee,{type:"secondary",style:{fontSize:11},ellipsis:!0,children:(0,k.z9)(t.type)})]}),t.progress&&t.progress.total>0?(0,r.jsx)($.A,{percent:Math.round(t.progress.current/t.progress.total*100),size:"small",showInfo:!1,status:"failed"===t.status?"exception":"completed"===t.status?"success":"active",style:{marginBottom:0}}):(0,r.jsxs)("div",{className:"canvasNodeMetrics",children:[m.map(e=>(0,r.jsx)(ee,{type:"secondary",style:{fontSize:11},ellipsis:!0,children:e},e)),0===m.length&&(0,r.jsx)(ee,{type:"secondary",style:{fontSize:11},children:(0,k.uH)(p)})]})]})}var el=n(14932),ei=n(57271),ea=n(55122),eo=n(32965),es=n(44400),ec=n(99271),ed=n(37510),eu=n(48156),eh=n(63046),ep=n(64068),em=n(76830),ex=n(96651),eg=n(83914);function ev(e){let{updatedAt:t,running:n}=e,[i,a]=(0,l.useState)(()=>Date.now());if((0,l.useEffect)(()=>{if(!n)return;let e=setInterval(()=>a(Date.now()),5e3);return()=>clearInterval(e)},[n]),!n||!t)return null;let o=Math.max(0,i-t);return o<=9e4?(0,r.jsx)(el.A,{title:"记录每 30 秒刷新一次(最近一次 ".concat(new Date(t).toLocaleTimeString(),")——长阶段里画布可能几分钟没有新节点,这个信号说明进程还在跑"),children:(0,r.jsxs)(v.A,{color:"processing",children:["心跳 ",Math.round(o/1e3)," 秒前"]})}):(0,r.jsx)(el.A,{title:"最后一次进度写入是 ".concat(new Date(t).toLocaleTimeString(),"——超过 ").concat(Math.round(1.5)," 分钟没有动静,进程可能已退出(可「继续生成」续跑)"),children:(0,r.jsxs)(v.A,{color:"warning",children:["心跳已停 ",Math.floor(o/6e4)," 分钟"]})})}function ef(e){let{startedAt:t,endedAt:n,running:i}=e,[a,o]=(0,l.useState)(()=>Date.now());if((0,l.useEffect)(()=>{if(!i)return;let e=setInterval(()=>o(Date.now()),1e3);return()=>clearInterval(e)},[i]),!t)return null;let s=Math.max(0,(i?a:null!=n?n:a)-t);return(0,r.jsx)(el.A,{title:"本轮生成的整体耗时(自 ".concat(new Date(t).toLocaleTimeString()," 起").concat(i?"":",已结束",")"),children:(0,r.jsx)(v.A,{color:"default",children:"耗时 ".concat((0,k.uH)(s))})})}var ey=n(55897),ej=n(49075),eA=n(84742);let{Text:eb}=d.A;function ek(e){var t;let{row:n,now:l,onLocate:i}=e;return(0,r.jsxs)("div",{className:"canvasAgentDetail","data-node-id":n.id,children:[(0,r.jsxs)("div",{className:"canvasAgentDetailHead",children:[(0,r.jsx)("span",{className:"canvasAgentIcon","data-status":n.status,children:(0,k.Qs)(n.kind)}),(0,r.jsx)(eb,{strong:!0,style:{fontSize:12},children:n.kindLabel}),n.role&&(0,r.jsxs)(eb,{type:"secondary",style:{fontSize:12},children:["\xb7 ",n.role]})]}),(0,r.jsxs)("div",{className:"canvasAgentDetailRow",children:[(0,r.jsx)(eb,{type:"secondary",style:{fontSize:12},children:"在干什么"}),(0,r.jsx)(eb,{style:{fontSize:12},children:null!=(t=n.activity)?t:n.title})]}),n.activity&&n.title&&n.activity!==n.title&&(0,r.jsxs)("div",{className:"canvasAgentDetailRow",children:[(0,r.jsx)(eb,{type:"secondary",style:{fontSize:12},children:"对象"}),(0,r.jsx)(eb,{style:{fontSize:12},children:n.title})]}),(0,r.jsxs)("div",{className:"canvasAgentDetailRow",children:[(0,r.jsx)(eb,{type:"secondary",style:{fontSize:12},children:n.completedAt?"耗时":"已跑"}),(0,r.jsx)(eb,{style:{fontSize:12},children:(0,k.uH)(K(n,l))})]}),n.metrics.length>0&&(0,r.jsxs)("div",{className:"canvasAgentDetailRow",children:[(0,r.jsx)(eb,{type:"secondary",style:{fontSize:12},children:"指标"}),(0,r.jsx)(eb,{style:{fontSize:12},children:n.metrics.map(e=>e.text).join(" \xb7 ")})]}),(0,r.jsxs)("button",{type:"button",className:"canvasAgentLocate",onClick:()=>i(n.id),title:"在画布上定位到这条节点",children:[(0,r.jsx)(ej.A,{})," 定位到节点"]})]})}function ew(e){return e.some(e=>"failed"===e.status)?"repairing":"completed"}function eS(e){let{view:t,running:n,onLocate:i,decisions:a=[],active:o=!1}=e,[s,c]=(0,l.useState)(()=>Date.now());if((0,l.useEffect)(()=>{if(!n)return;let e=setInterval(()=>c(Date.now()),1e3);return()=>clearInterval(e)},[n]),0===t.runningTotal&&0===t.recentTotal&&0===a.length&&!o)return null;let d=t.runningTotal-t.running.length;return(0,r.jsxs)(m.A,{size:4,align:"center",wrap:!0,"data-agents":t.runningTotal,className:"canvasAgentsChips",children:[(0,r.jsx)(el.A,{title:"本稿此刻在调度哪些智能体(点图标看在干什么)",children:(0,r.jsx)(eb,{type:"secondary",style:{fontSize:12},children:"智能体调度中心"})}),(o||a.length>0)&&(0,r.jsx)(ey.A,{trigger:"click",placement:"bottomLeft",content:(0,r.jsx)("div",{className:"canvasAgentDetail",children:0===a.length?(0,r.jsx)("div",{className:"canvasAgentDetailRow",children:(0,r.jsx)(eb,{type:"secondary",style:{fontSize:12},children:"尚无来源或任务裁决回执。主智能体负责施工部署、来源与工况核定及作者协调;当前执行进度见运行节点。"})}):a.map(e=>{var t;return(0,r.jsxs)("div",{className:"canvasAgentDetailRow",children:[(0,r.jsx)(eb,{type:"secondary",style:{fontSize:12},children:e.action}),(0,r.jsx)(eb,{style:{fontSize:12},children:null!=(t=e.note)?t:e.title})]},e.id)})}),children:(0,r.jsxs)("button",{type:"button",className:"canvasAgentChip canvasAgentChipMain","data-kind":"supervisor","data-status":ew(a),title:"主智能体:核定施工部署、裁决来源与工况、协调作者任务和交付",children:[(0,r.jsx)("span",{className:"canvasAgentAvatar","data-status":ew(a),children:(0,r.jsx)("span",{className:"canvasAgentAvatarGlyph",children:(0,k.Qs)("supervisor")})}),(0,r.jsx)("span",{className:"canvasAgentRole","data-role":"main",children:"主"})]})}),t.running.map(e=>{var t;return(0,r.jsx)(ey.A,{trigger:"click",placement:"bottomLeft",content:(0,r.jsx)(ek,{row:e,now:s,onLocate:i}),children:(0,r.jsxs)("button",{type:"button",className:"canvasAgentChip","data-node-id":e.id,"data-kind":e.kind,"data-status":e.status,title:"".concat(e.kindLabel).concat(e.role?" \xb7 ".concat(e.role):"",":").concat(null!=(t=e.activity)?t:e.title),children:[(0,r.jsx)("span",{className:"canvasAgentAvatar","data-status":e.status,children:(0,r.jsx)("span",{className:"canvasAgentAvatarGlyph",children:(0,k.Qs)(e.kind)})}),(0,r.jsx)("span",{className:"canvasAgentRole","data-role":"sub",title:"子智能体(执行具体环节)",children:"子"})]})},e.id)}),d>0&&(0,r.jsx)(el.A,{title:"另有 ".concat(d," 个在跑(画布上可逐个查看)"),children:(0,r.jsxs)(eb,{type:"secondary",style:{fontSize:12},children:["+",d]})}),t.recent.length>0&&(0,r.jsx)(el.A,{title:t.recent.map(e=>"".concat(e.kindLabel,":").concat(e.title,"(已完成)")).join("\n"),children:(0,r.jsxs)(eb,{type:"secondary",style:{fontSize:12},children:[(0,r.jsx)(eA.A,{})," 刚完成 ",t.recentTotal]})})]})}var eI=n(34052),eC=n(84253),ez=n(96538);function eR(e){let{reports:t,deliveryReadings:n,t:i}=e,[a,o]=(0,l.useState)(!1),s=(e,t)=>{let n=null==i?void 0:i(e);return n&&n!==e?n:t},c=(0,l.useSyncExternalStore)(j.p5,j.dH,j.dH),d=c?function(e,t){var n,r;let{receipt:l}=e,i=(e,n,r,l)=>t(e,n).replace("{count}",String(r))+(l?":".concat(l):""),a=[];"review"===l.exportPurpose&&a.push({key:"review-purpose",tone:"info",text:"审阅稿:验收结论保持原状态,独立问题报告与正文版本绑定"}),l.issuesReport&&a.push({key:"review-report",tone:"info",text:"独立问题报告:".concat(l.issuesReport.id.slice(0,12),";正文 SHA256:").concat(l.issuesReport.bodySha256)}),"mismatch"===l.gateBinding?a.push({key:"binding-mismatch",tone:"error",text:t("records.receiptBindingMismatch","正文与门禁指纹不匹配:放行依据不是这份正文(收口后被编辑/替换过)")}):"absent"===l.gateBinding&&a.push({key:"binding-absent",tone:"warning",text:t("records.receiptBindingAbsent","门禁未绑定正文指纹:无法核对放行依据是否就是这份正文")}),l.gateIssues&&l.gateIssues.length>0&&a.push({key:"gate-issues",tone:"error",text:i("records.receiptGateIssues","门禁阻断清单 {count} 项",l.gateIssues.length,l.gateIssues[0])}),l.contentIssues&&l.contentIssues.length>0&&a.push({key:"content-issues",tone:"warning",text:i("records.receiptContentIssues","内容问题 {count} 条",l.contentIssues.length,l.contentIssues[0])});let o=null!=(r=null==(n=l.figureInline)?void 0:n.failed)?r:[];return o.length>0&&a.push({key:"figure-inline",tone:"warning",text:i("records.receiptFigureFailures","图件未内联 {count} 张",o.length,o[0])}),l.renderAudit&&l.renderAudit.blockerCount>0&&a.push({key:"render-blockers",tone:"error",text:i("records.receiptRenderBlockers","渲染审计:源层结构缺陷 {count} 项",l.renderAudit.blockerCount)}),l.renderAudit&&l.renderAudit.notices.length>0&&a.push({key:"render-notices",tone:"warning",text:i("records.receiptRenderNotices","渲染审计告警 {count} 条",l.renderAudit.notices.length,l.renderAudit.notices[0])}),l.templateWarning&&a.push({key:"template-warning",tone:"warning",text:"".concat(t("records.receiptTemplateWarning","模板占位符缺失,已回退:")).concat(l.templateWarning)}),l.pageLimit&&a.push({key:"page-limit",tone:"warning",text:l.pageLimit}),"number"==typeof l.pdfPageCount&&a.push({key:"pdf-pages",tone:"info",text:t("records.receiptPdfPages","PDF 共 {count} 页").replace("{count}",String(l.pdfPageCount))}),a}(c,s):[],u=d.filter(e=>"info"!==e.tone),h=d.length>0;if(0===t.length&&!n&&0===u.length&&!(null==c?void 0:c.receipt.issuesReport)&&(null==c?void 0:c.receipt.exportPurpose)!=="review")return null;let p=[...t].sort((e,t)=>t.exportedAt-e.exportedAt),m=p.find(e=>{var t,n;return(null!=(n=null==(t=e.gateChecklist)?void 0:t.items.length)?n:0)>0});return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(el.A,{title:s("records.reportTitle","导出闭环报告"),children:(0,r.jsxs)(x.Ay,{size:"small",icon:(0,r.jsx)(em.A,{}),onClick:()=>o(!0),children:[(null==n?void 0:n.contractQuality)?"七维诊断".concat(n.contractQualityStale?"(历史)":n.contractQuality.score.deliveryReady?"(待验收)":"(待修验)"):s("records.reportEntry","导出报告"),t.length>0&&(0,r.jsx)("span",{className:"ml-1 text-[var(--colorTextTertiary)]",children:t.length}),u.length>0&&(0,r.jsx)(v.A,{color:u.some(e=>"error"===e.tone)?"error":"warning",className:"m-0 ml-1 border-0",children:s("records.receiptBadge","本次导出 {count} 项提醒").replace("{count}",String(u.length))})]})}),(0,r.jsxs)(eI.A,{title:s("records.reportTitle","导出闭环报告"),placement:"right",size:"default",open:a,onClose:()=>o(!1),styles:{body:{padding:16}},children:[h&&c&&(0,r.jsxs)("div",{className:"mb-3 rounded-xl border px-3 py-2.5 text-xs ".concat(u.length>0?"border-[var(--colorWarning)] bg-[var(--colorWarningBg)]":"border-[var(--borderColor)] bg-[var(--colorFillAlter)]"),children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,r.jsx)("span",{className:"font-semibold",children:s("records.receiptTitle","最近一次导出回执")}),(0,r.jsx)(v.A,{color:"blue",className:"m-0 border-0 font-semibold",children:c.format.toUpperCase()}),(0,r.jsx)("span",{className:"text-[var(--colorTextTertiary)]",children:new Date(c.at).toLocaleString()}),c.filename&&(0,r.jsx)("span",{className:"break-all text-[var(--colorTextTertiary)]",children:c.filename})]}),c.receipt.issuesReport&&(0,r.jsx)("a",{className:"text-[var(--colorPrimary)] underline",href:(0,j.Es)(c,c.receipt.issuesReport),children:"下载本份正文的独立问题报告"}),(0,r.jsx)("div",{className:"mt-2 flex flex-col gap-1.5",children:d.map(e=>(0,r.jsx)("div",{className:"error"===e.tone?"text-[var(--colorError)]":"warning"===e.tone?"text-[var(--colorWarning)]":"text-[var(--colorTextSecondary)]",children:e.text},e.key))})]}),n&&(0,r.jsxs)("div",{className:"mb-3 flex flex-col gap-2 rounded-xl border border-[var(--borderColor)] bg-[var(--colorFillAlter)] px-3 py-2.5 text-xs",children:[n.contractQuality&&(0,r.jsx)(w,{readings:n}),n.netChars&&(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,r.jsx)("span",{className:"text-[var(--colorTextSecondary)]",children:s("records.netCharsLabel","修复链净增字数")}),(0,r.jsxs)("span",{className:"font-semibold",children:[n.netChars.delta>0?"+":"",n.netChars.delta]}),(0,r.jsxs)("span",{className:"text-[var(--colorTextSecondary)]",children:["(",n.netChars.before," → ",n.netChars.after,",",s("records.netCharsRatio","占原稿")," ",(100*n.netChars.ratio).toFixed(1),"%)"]}),n.netChars.ratio>.05&&(0,r.jsx)(el.A,{title:s("records.netCharsWarn",'目标 ≤5%:净增越大,"分是修出来的"成分越高——首过写作的缺口被修复链补上了'),children:(0,r.jsx)(v.A,{color:"warning",className:"m-0 border-0",children:s("records.netCharsOver","超目标")})})]}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,r.jsx)("span",{className:"text-[var(--colorTextSecondary)]",children:s("records.reviewReportLabel","交付三件套报告")}),(0,r.jsx)("a",{href:"/api/documents/generated/".concat(encodeURIComponent(n.docId),"/report").concat(n.projectRoot?"?projectRoot=".concat(encodeURIComponent(n.projectRoot),"&download=1"):"?download=1"),className:"text-[var(--colorPrimary)] underline",children:s("records.reviewReportDownload","下载 .md")}),(0,r.jsx)("a",{href:"/api/documents/generated/".concat(encodeURIComponent(n.docId),"/report").concat(n.projectRoot?"?projectRoot=".concat(encodeURIComponent(n.projectRoot)):""),target:"_blank",rel:"noreferrer",className:"text-[var(--colorPrimary)] underline",children:s("records.reviewReportView","在线查看")}),(0,r.jsx)("span",{className:"text-[var(--colorTextTertiary)]",children:s("records.reviewReportHint","未跑到终门禁的记录没有报告(打开会说明原因)")})]})]}),0===p.length?(0,r.jsx)(eC.A,{image:eC.A.PRESENTED_IMAGE_SIMPLE,description:s("records.reportEmpty","还没有导出记录")}):(0,r.jsxs)("div",{className:"flex flex-col gap-3",children:[p.map((e,t)=>(0,r.jsxs)("div",{className:"rounded-xl border border-[var(--borderColor)] bg-[var(--colorFillAlter)] px-3 py-2.5 text-xs",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,r.jsx)(v.A,{color:"blue",className:"m-0 border-0 font-semibold",children:e.format.toUpperCase()}),(0,r.jsx)("span",{className:"text-[var(--colorTextSecondary)]",children:new Date(e.exportedAt).toLocaleString()}),"review"===e.exportPurpose&&(0,r.jsx)(v.A,{children:"审阅稿"}),e.reviewReport&&(0,r.jsx)("a",{className:"text-[var(--colorPrimary)] underline",href:(0,j.Es)({documentId:null==n?void 0:n.docId,projectRoot:null==n?void 0:n.projectRoot},e.reviewReport),children:"下载独立问题报告"})]}),(0,r.jsxs)("div",{className:"mt-1.5 flex flex-wrap items-center gap-x-3 gap-y-1 text-[var(--colorTextSecondary)]",children:[void 0!==e.durationMs&&(0,r.jsxs)("span",{children:[s("records.reportDuration","总用时")," ",(0,ez.a)(e.durationMs,{unit:"ms",style:"fine-decimal"})]}),void 0!==e.repairedCount&&(0,r.jsxs)("span",{children:[s("records.reportRepaired","修复")," ",e.repairedCount,void 0!==e.blockingCount?"(".concat(s("records.reportBlocking","质量诊断快照阻断")," ").concat(e.blockingCount,")"):""]}),e.ruleSummary&&e.ruleSummary.length>0&&(0,r.jsxs)("span",{children:[s("records.reportRules","规则")," ",e.ruleSummary.length]}),!1===e.gatePassed&&(0,r.jsxs)(v.A,{color:"error",className:"m-0 border-0",children:[s("records.reportGateBlocked","非交付物"),void 0!==e.gateIssueCount&&e.gateIssueCount>0?" \xb7 ".concat(s("records.reportGateBlockedCount","门禁阻断")," ").concat(e.gateIssueCount," ").concat(s("records.reportGateBlockedUnit","项")):" \xb7 ".concat(s("records.reportGateBlockedUnknown","阻断数未记录(清单缺失)"))]}),e.healthAlerts&&e.healthAlerts.length>0&&(0,r.jsxs)(v.A,{color:"warning",className:"m-0 border-0",children:[s("records.reportHealthAlerts","健康告警")," ",e.healthAlerts.length]})]})]},"".concat(e.exportedAt,"-").concat(t))),(null==m?void 0:m.gateChecklist)&&(0,r.jsxs)("div",{className:"rounded-xl border border-[var(--colorWarning)] bg-[var(--colorWarningBg)] px-3 py-2.5",children:[(0,r.jsxs)("div",{className:"text-xs font-semibold text-[var(--colorWarning)]",children:[s("records.reportChecklistTitle","最近一次非交付物导出的未收敛项"),"(",s("records.reportChecklistTotal","共 {count} 项").replace("{count}",String(m.gateChecklist.total)),")"]}),(0,r.jsx)("div",{className:"mt-2 flex flex-col gap-2",children:m.gateChecklist.items.map(e=>(0,r.jsxs)("div",{className:"text-xs",children:[(0,r.jsx)("div",{className:"whitespace-pre-wrap text-[var(--colorText)]",children:"".concat(e.index,".【").concat(e.category,"】").concat(e.problem)}),(0,r.jsxs)("div",{className:"text-[var(--colorTextSecondary)]",children:[e.repairPath,e.detectorId?"|".concat(e.detectorId):""]})]},e.index))})]})]})]})]})}let{Text:eN}=d.A,eE={connecting:{text:"通道连接中",color:"default"},open:{text:"事件通道已连",color:"success"},error:{text:"通道已断(改用增量补差)",color:"warning"},closed:{text:"通道已关闭",color:"default"}};function eT(e){let{title:t,status:n,updatedAt:l,wordCount:i,nodeCount:a,visibleCount:o,hiddenCount:s,degraded:c,skills:d,gate:u,connection:h,lastSeq:p,zoom:g,depth:j,following:A,followStatus:b,generating:w,resumable:S,exporting:I,nonDeliverableExport:C,onZoomIn:z,onZoomOut:R,onZoomReset:N,onFit:E,onDepthChange:T,onToggleFollow:M,onContinue:L,onPause:D,onResume:P,onAbort:B,onExport:q,exportReports:H,deliveryReadings:_,previewOpen:W,onTogglePreview:F,hasNodeOffsets:U,onResetNodeLayout:G,agents:O,onLocateAgent:Q,supervisorDecisions:X,agentsActive:V,startedAt:J,t:Y,collapsed:K=!1,onToggleCollapsed:Z}=e,$=w&&!S,ee=(0,r.jsxs)("div",{style:{fontSize:12,lineHeight:1.7},children:[(0,r.jsx)("div",{children:"导出当前真实正文供审阅,并下载独立问题报告;不会自动补齐缺章或签发交付验收。"}),(0,r.jsx)("div",{children:"审阅身份标在文件名和回执中,正文不添加诊断、封面或水印。"})]});return K?(0,r.jsx)("div",{className:"canvasToolbar canvasToolbarCollapsed",children:(0,r.jsx)(el.A,{title:"展开画布工具条(视图缩放 / 生成控制 / 审阅导出)",placement:"bottomLeft",children:(0,r.jsxs)("button",{type:"button",className:"canvasToolbarBubble","aria-expanded":!1,onClick:()=>null==Z?void 0:Z(!1),children:[(0,r.jsx)(es.A,{}),n&&(0,r.jsx)(v.A,{color:(0,k.uj)(n),className:"m-0",children:(0,k.GC)(n,Y)}),(0,r.jsx)(ev,{updatedAt:l,running:$}),u&&!u.passed&&(0,r.jsx)(v.A,{color:"error",className:"m-0",children:"门禁 ".concat(u.blockingCount)}),C?(0,r.jsx)(v.A,{color:"processing",className:"m-0",children:"已导出审阅稿"}):null]})})}):(0,r.jsxs)("div",{className:"canvasToolbar",children:[(0,r.jsxs)(m.A,{wrap:!0,size:8,align:"center",style:{flex:1,minWidth:0},children:[(0,r.jsx)(eN,{strong:!0,style:{fontSize:14},ellipsis:!0,title:t,children:t}),n&&(0,r.jsx)(v.A,{color:(0,k.uj)(n),children:(0,k.GC)(n,Y)}),(0,r.jsxs)(eN,{type:"secondary",style:{fontSize:12},children:[void 0!==i?"".concat(i.toLocaleString()," 字"):""," 已接收 ".concat(a," 个节点,显示 ").concat(o," 个"),s>0?"(未显示 ".concat(s,")"):"",l?" 更新于 ".concat(new Date(l).toLocaleTimeString()):""]}),(0,r.jsx)(ev,{updatedAt:l,running:$}),(0,r.jsx)(ef,{startedAt:J,endedAt:l,running:$}),O&&(0,r.jsx)(eS,{view:O,running:O.runningTotal>0,onLocate:null!=Q?Q:()=>{},...X?{decisions:X}:{},active:!!V}),(0,r.jsx)(el.A,{title:"通道游标 seq=".concat(null!=p?p:0,"(断线重连用它补发;节点增量用日志时间 t)"),children:(0,r.jsx)(v.A,{color:eE[h].color,children:eE[h].text})}),d.hits.length>0&&(0,r.jsx)(el.A,{title:d.hits.map(e=>"".concat(e.title,"(").concat(e.skillId,")")).join("、"),children:(0,r.jsxs)(v.A,{color:"blue",children:["技能命中 ",d.hits.length]})}),u&&(0,r.jsx)(el.A,{title:u.issues.length>0?u.issues.join("\n"):"服务端门禁结论:通过",children:(0,r.jsx)(v.A,{color:u.passed?"success":"error",children:u.passed?"门禁:通过":"门禁:阻断 ".concat(u.blockingCount," 项")})})]}),(0,r.jsxs)(m.A,{wrap:!0,size:6,align:"center",children:[(0,r.jsx)(x.Ay,{size:"small",icon:(0,r.jsx)(ec.A,{}),onClick:R,"aria-label":"缩小"}),(0,r.jsxs)(eN,{type:"secondary",style:{fontSize:12,width:44,textAlign:"center"},children:[Math.round(100*g),"%"]}),(0,r.jsx)(x.Ay,{size:"small",icon:(0,r.jsx)(ed.A,{}),onClick:z,"aria-label":"放大"}),(0,r.jsx)(el.A,{title:"恢复到 100% 并回到原点",children:(0,r.jsx)(x.Ay,{size:"small",icon:(0,r.jsx)(y.A,{}),onClick:N,"aria-label":"重置视图"})}),(0,r.jsx)(el.A,{title:U?"把拖过的节点放回自动排布(手工摆放的是**偏移**,清空即恢复)":"没有手工拖过的节点:布局就是自动排布的",children:(0,r.jsx)(x.Ay,{size:"small",disabled:!U,onClick:G,children:"恢复布局"})}),(0,r.jsx)(el.A,{title:"适应窗口(按内容包围盒缩放)",children:(0,r.jsx)(x.Ay,{size:"small",onClick:E,children:"适应"})}),(0,r.jsx)(ei.A,{size:"small",value:j,style:{width:108},onChange:e=>T(e),options:[{value:1,label:"只看 1 层"},{value:2,label:"看 2 层"},{value:3,label:"看 3 层"},{value:"all",label:"全部层"}]}),(0,r.jsx)(el.A,{title:null!=b?b:"跟随最新:生成中新出现的节点自动定位(关掉就不再打扰你的视角)",children:(0,r.jsx)(x.Ay,{size:"small",type:A?"primary":"default",onClick:M,children:A?(null==b?void 0:b.startsWith("跟随暂停"))?"跟随暂停中":"跟随中":"跟随最新"})}),(0,r.jsx)(ea.A,{type:"vertical"}),$&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(el.A,{title:"立即取消模型调用并保存已完成正文,停稳后可继续",children:(0,r.jsx)(x.Ay,{size:"small",icon:(0,r.jsx)(eu.A,{}),onClick:D,children:"暂停"})}),(0,r.jsx)(eo.A,{title:"中止生成",description:"确定中止本次生成?已生成的章节会保留,可从中断处继续。",okText:"中止",cancelText:"取消",okButtonProps:{danger:!0},onConfirm:B,children:(0,r.jsx)(x.Ay,{size:"small",danger:!0,icon:(0,r.jsx)(eh.A,{}),children:"中止"})})]}),!$&&S&&(0,r.jsx)(x.Ay,{size:"small",type:"primary",icon:(0,r.jsx)(ep.A,{}),onClick:L,children:"继续生成"}),!$&&!S&&"paused"===n&&(0,r.jsx)(x.Ay,{size:"small",type:"primary",icon:(0,r.jsx)(ep.A,{}),onClick:P,children:"从暂停处继续"}),(0,r.jsx)(ea.A,{type:"vertical"}),(0,r.jsx)(el.A,{title:ee,children:(0,r.jsxs)(m.A,{size:4,children:[(0,r.jsx)(eN,{type:"secondary",children:"审阅导出"}),[{key:"markdown",label:"MD"},{key:"html",label:"HTML"},{key:"docx",label:"DOCX"},{key:"pdf",label:"PDF",primary:!0}].map(e=>(0,r.jsx)(x.Ay,{size:"small",type:e.primary?"primary":"default",icon:"markdown"===e.key?(0,r.jsx)(em.A,{}):void 0,loading:I===e.key,disabled:null!==I&&I!==e.key,onClick:()=>q(e.key),children:e.label},e.key))]})}),(0,r.jsx)(eR,{reports:null!=H?H:[],..._?{deliveryReadings:_}:{},...Y?{t:Y}:{}}),(0,r.jsx)(el.A,{title:"成稿预览(服务端渲染并清洗后的全文;只读,不提供导出)",children:(0,r.jsx)(x.Ay,{size:"small",type:W?"primary":"default",onClick:F,children:"成稿预览"})}),(0,r.jsx)(el.A,{title:"收起工具条(把画布还给内容;状态与门禁仍留在气泡上)",children:(0,r.jsx)(x.Ay,{size:"small",icon:(0,r.jsx)(ex.A,{}),"aria-label":"收起工具条",onClick:()=>null==Z?void 0:Z(!0)})})]}),C&&(0,r.jsx)(f.A,{style:{width:"100%",marginTop:8},type:"info",showIcon:!0,message:"已导出审阅稿与独立问题报告",description:(0,r.jsxs)("div",{style:{whiteSpace:"pre-wrap",fontSize:12},children:[(0,r.jsx)("div",{children:"正文保留实际内容;审阅导出不代表交付验收通过。"}),C.count>0&&(0,r.jsxs)("div",{style:{marginTop:4},children:["阻断项(".concat(C.count,"):"),C.issues.slice(0,5).map((e,t)=>(0,r.jsxs)("div",{children:["\xb7 ",e]},t)),C.count>5&&(0,r.jsx)("div",{children:"…还有 ".concat(C.count-5," 项")})]})]})}),c.length>0&&(0,r.jsx)(f.A,{style:{width:"100%",marginTop:8},type:"warning",showIcon:!0,message:"画布显示有取整(下列内容本次未下发;聚合值与节点信息不受影响)",description:(0,r.jsx)("div",{style:{fontSize:12},children:c.map((e,t)=>(0,r.jsxs)("div",{children:["\xb7 ",e]},t))})}),0===a&&w&&(0,r.jsx)(f.A,{style:{width:"100%",marginTop:8},type:"info",showIcon:!0,icon:(0,r.jsx)(eg.A,{}),message:"还没有节点日志:生成侧尚未写入第一个节点(节点日志是唯一真相源,画布不伪造占位节点)"})]})}var eM=n(57481),eL=n(28629),eD=n(52057),eP=n(8665),eB=n(38332),eq=n(7576),eH=n(58569),e_=n(76506),eW=n(45042);let{Paragraph:eF,Text:eU}=d.A,eG={local:{text:"影响面:局部",color:"blue",hint:"改动只落在该节点自身子树:定点补丁即可。"},propagated:{text:"影响面:传播",color:"orange",hint:'改动会沿依赖传播到同章其余部分:按 11.1,走"变更传播"而不是重跑整个节点。'},contaminated:{text:"影响面:事实/命名类",color:"red",hint:"该节点持有事实 / 命名 / 标题指纹:按 11.1,**要么回滚、要么重新校准**,不能当普通改动提交。"}},eO={error:{color:"red",text:"错误"},warning:{color:"orange",text:"警告"},info:{color:"blue",text:"提示"}};function eQ(e){var t,n,i,a,o,s,c,d,u,h,p;let{node:g,impact:f,flatNodes:y,highlighted:j,generating:A,repairPreview:b,onFocusNode:w,onRequestRepair:S,onClose:I,onDraftRepairNote:C,onCancelRepairPreview:z,onMention:R,onLocate:N,onPause:E,onResume:T,nodeEvents:M,t:L,onRunRepair:D,onConfirmRepair:P,onRollbackRepair:B,repairRun:q,defaultRepairNote:H}=e,_="skill.load"===g.type||"string"==typeof g.metrics.skillId,W=new Map(y.map(e=>[e.id,e])),F=(0,k.Jy)(g),U=(0,k.dB)(g.metrics,24),G=g.issues.filter(e=>!O(e)),Q=g.issues.filter(e=>O(e)),X=G.filter(e=>"error"===e.level).length,V=f?(0,r.jsxs)(m.A,{direction:"vertical",size:8,style:{width:"100%"},children:[(0,r.jsxs)(m.A,{wrap:!0,children:[(0,r.jsx)(v.A,{color:eG[f.kind].color,children:eG[f.kind].text}),(0,r.jsx)(v.A,{color:f.rollbackable?"default":"red",children:f.rollbackable?"可回滚":"需回滚或重新校准"}),(0,r.jsx)(v.A,{color:f.escalate?"red":"default",children:"波及 ".concat(f.affectedNodeIds.length," 节点").concat(f.escalate?"(超阈值)":"")})]}),(0,r.jsx)(eU,{type:"secondary",style:{fontSize:12},children:f.reason}),(0,r.jsx)(eU,{type:"secondary",style:{fontSize:12},children:eG[f.kind].hint}),f.escalate&&(0,r.jsx)(v.A,{color:"red",children:"影响面超出阈值:该改动需**人工确认**后才能提交(自动留痕不再适用)"}),(0,r.jsx)(eB.A,{size:"small",header:(0,r.jsx)(eU,{type:"secondary",style:{fontSize:12},children:"波及节点(点击定位)"}),dataSource:f.affectedNodeIds,renderItem:e=>{let t=W.get(e);return(0,r.jsx)(eB.A.Item,{style:{paddingBlock:4},children:(0,r.jsx)(x.Ay,{type:"link",size:"small",style:{padding:0,height:"auto"},onClick:()=>w(e),children:t?"".concat(t.title,"(").concat((0,k.z9)(t.type),")"):"未知节点 ".concat(e)})})}})]}):(0,r.jsxs)(m.A,{direction:"vertical",size:6,children:[(0,r.jsx)(eC.A,{image:eC.A.PRESENTED_IMAGE_SIMPLE,description:"该节点没有预计算的影响面"}),(0,r.jsx)(eU,{type:"secondary",style:{fontSize:12},children:"聚合接口只对**有问题的节点**与**修复节点**预计算影响面(首屏不做 O(n\xb2))。 这里可以按需触发一次修复请求,服务端会在事务前给出权威判定——**本面板不冒充结论**。"}),(0,r.jsx)(x.Ay,{size:"small",disabled:!S,onClick:()=>null==S?void 0:S(g),children:"按需评估影响面(走修复请求)"})]}),[J,Y]=(0,l.useState)("");(0,l.useEffect)(()=>{Y(null!=H?H:"")},[H,g.id]);let K=b&&b.nodeId===g.id?(0,r.jsx)("div",{className:"nodeInfoRepair",children:(0,r.jsxs)(m.A,{direction:"vertical",size:6,style:{width:"100%"},children:[(0,r.jsxs)(m.A,{wrap:!0,size:6,children:[(0,r.jsx)(eU,{strong:!0,style:{fontSize:13},children:"修复影响面预览"}),(0,r.jsx)(v.A,{color:eG[b.impact.kind].color,children:eG[b.impact.kind].text}),(0,r.jsx)(v.A,{color:b.impact.rollbackable?"default":"red",children:b.impact.rollbackable?"可回滚":"不可回滚"})]}),(0,r.jsxs)(eU,{type:"secondary",style:{fontSize:12},children:["波及 ".concat(b.impact.affectedNodeIds.length," 个节点").concat(b.impact.escalate?",超出阈值需人工确认":"","。"),b.impact.reason]}),!b.impact.rollbackable&&(0,r.jsx)(eU,{style:{fontSize:12,color:"var(--colorError)"},children:"11.1:污染类改动**要么回滚、要么重新校准**,不能当普通改动提交。"}),(0,r.jsxs)(m.A,{wrap:!0,size:6,children:[(0,r.jsx)(x.Ay,{size:"small",onClick:C,children:"把修复意图写进输入框"}),(0,r.jsx)(x.Ay,{size:"small",type:"text",onClick:z,children:"收起"})]}),D&&(0,r.jsxs)("div",{className:"nodeInfoRepairRun","data-repair-node":g.id,children:[(0,r.jsx)(eU,{type:"secondary",style:{fontSize:12},children:"修复说明(会逐字记进修复请求;服务端按它定位与归因)"}),(0,r.jsx)(eq.A.TextArea,{size:"small",autoSize:{minRows:2,maxRows:4},value:J,onChange:e=>Y(e.target.value),placeholder:"例如:这一节的开挖深度与资料不符,应按图纸标注 5.15m 改写"}),(0,r.jsxs)(m.A,{wrap:!0,size:6,children:[(0,r.jsx)(x.Ay,{size:"small",type:"primary",loading:(null==q?void 0:q.phase)==="creating"&&q.nodeId===g.id,disabled:0===J.trim().length,onClick:()=>D(J.trim()),children:"发起修复(@本节点)"}),(null==q?void 0:q.nodeId)===g.id&&"confirmable"===q.phase&&P&&!(q.needsLocalization&&(null!=(o=null==(t=q.candidates)?void 0:t.length)?o:0)>0)&&(0,r.jsx)(x.Ay,{size:"small",danger:!0,onClick:()=>P(),children:"确认执行变更事务"}),(null==q?void 0:q.nodeId)===g.id&&"executed"===q.phase&&q.requestId&&B&&(0,r.jsx)(x.Ay,{size:"small",onClick:B,children:"回滚这次修复"})]}),(null==q?void 0:q.nodeId)===g.id&&"creating"!==q.phase&&(0,r.jsxs)("div",{className:"nodeInfoRepairResult",children:["error"===q.phase&&(0,r.jsx)(eU,{style:{fontSize:12,color:"var(--colorError)"},children:"修复请求未建立:".concat(null!=(s=q.message)?s:"")}),"confirmable"===q.phase&&(0,r.jsx)(eU,{type:"secondary",style:{fontSize:12},children:"请求已建立(".concat(null!=(c=q.requestId)?c:"",")").concat(q.attribution?";归因:".concat(q.attribution):"","。")+(q.needsLocalization&&(null!=(d=null==(n=q.candidates)?void 0:n.length)?d:0)>0?"这句话该改哪个节点由你定:下面列出系统定位到的候选,点一个才会执行(缺定位服务端一律拒绝)。":'点「确认执行变更事务」后才会真的改正文——这是"必须人工确认"的落点。')}),"confirmable"===q.phase&&q.needsLocalization&&(null!=(u=null==(i=q.candidates)?void 0:i.length)?u:0)>0&&(0,r.jsx)(m.A,{direction:"vertical",size:4,style:{width:"100%"},children:q.candidates.map(e=>(0,r.jsx)("div",{"data-testid":"repair-location-candidate",children:(0,r.jsxs)(m.A,{size:6,wrap:!0,children:[(0,r.jsx)(v.A,{children:"匹配 ".concat(e.score.toFixed(2))}),(0,r.jsx)(eU,{style:{fontSize:12},children:e.excerpt.slice(0,60)}),P&&(0,r.jsx)(x.Ay,{size:"small",type:"primary",onClick:()=>P(e.nodeId),children:"定位到该节点并执行"})]})},e.nodeId))}),"executed"===q.phase&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(m.A,{wrap:!0,size:6,children:[(0,r.jsx)(v.A,{color:"applied"===q.outcome?"green":"rolled-back"===q.outcome?"orange":"red",children:"执行结果:".concat(null!=(h=q.outcome)?h:"未执行")}),q.attribution&&(0,r.jsx)(v.A,{children:"归因:".concat(q.attribution)}),void 0!==q.restoredChars&&(0,r.jsx)(v.A,{children:"恢复 ".concat(q.restoredChars," 字")})]}),q.notExecutedReason&&(0,r.jsx)(eU,{style:{fontSize:12,color:"var(--colorError)"},children:q.notExecutedReason})]})]})]})]})}):null;return(0,r.jsxs)("div",{className:"nodeInfoPanel","data-node-id":g.id,children:[(0,r.jsxs)("div",{className:"nodeInfoHeader",children:[(0,r.jsx)("span",{className:"nodeInfoHeaderIcon",children:(0,k.kH)(g.type)}),(0,r.jsx)(eU,{strong:!0,ellipsis:!0,style:{flex:1,minWidth:0,fontSize:14},title:g.title,children:g.title}),g.unknownType&&(0,r.jsx)(v.A,{children:"未知类型"}),(0,r.jsx)(v.A,{color:(0,k.uv)(g.status),children:(0,k.m_)(g.status,L)}),X>0&&(0,r.jsx)(v.A,{color:"red",children:"".concat(X," 个错误")}),A&&"running"===g.status&&(0,r.jsx)(eU,{type:"secondary",style:{fontSize:11},children:"运行中"}),I&&(0,r.jsx)(el.A,{title:"关闭(Esc)",children:(0,r.jsx)(x.Ay,{type:"text",size:"small",className:"nodeInfoClose","aria-label":"关闭信息卡片",onClick:I,children:(0,r.jsx)(eW.A,{})})})]}),(0,r.jsxs)("div",{className:"nodeInfoActions",children:[(0,r.jsx)(x.Ay,{size:"small",onClick:()=>null==R?void 0:R(g),children:"@ 到对话框"}),(0,r.jsx)(x.Ay,{size:"small",onClick:()=>null==N?void 0:N(g),children:"在画布中定位"}),(0,r.jsx)(x.Ay,{size:"small",danger:X>0,onClick:()=>null==S?void 0:S(g),children:"请求修复(预览影响面)"}),A&&"running"===g.status&&E&&(0,r.jsx)(x.Ay,{size:"small",onClick:E,children:"暂停"}),"paused"===g.status&&T&&(0,r.jsx)(x.Ay,{size:"small",onClick:T,children:"继续生成"})]}),K,(0,r.jsx)(eH.A,{size:"small",items:[{key:"overview",label:"概览",children:(0,r.jsxs)(e_.A,{size:"small",column:1,bordered:!0,children:[(0,r.jsx)(e_.A.Item,{label:"状态",children:(0,r.jsx)(v.A,{color:(0,k.uv)(g.status),children:(0,k.m_)(g.status,L)})}),(0,r.jsxs)(e_.A.Item,{label:"类型",children:[(0,k.z9)(g.type),g.unknownType?"(闭集外的类型,按通用卡片渲染)":""]}),(0,r.jsx)(e_.A.Item,{label:"节点 id",children:(0,r.jsx)(eF,{copyable:{text:g.id},style:{margin:0,fontSize:12},children:g.id})}),(0,r.jsx)(e_.A.Item,{label:"稳定序号",children:g.seq}),(0,r.jsx)(e_.A.Item,{label:"父节点",children:g.parentId?(0,r.jsx)(x.Ay,{type:"link",size:"small",style:{padding:0,height:"auto"},onClick:()=>w(g.parentId),children:null!=(p=null==(a=W.get(g.parentId))?void 0:a.title)?p:g.parentId}):"(根节点)"}),(0,r.jsxs)(e_.A.Item,{label:"耗时",children:[(0,k.uH)(F),"running"===g.status?"(运行中)":""]}),(0,r.jsx)(e_.A.Item,{label:"进度",children:g.progress?"".concat(g.progress.label||"进度",":").concat(g.progress.current,"/").concat(g.progress.total):"—"}),(0,r.jsxs)(e_.A.Item,{label:"子节点数",children:[g.children.length,j?"(当前处于影响面高亮)":""]}),(0,r.jsxs)(e_.A.Item,{label:"开始 / 完成",children:[g.startedAt?new Date(g.startedAt).toLocaleString():"—"," / ",g.completedAt?new Date(g.completedAt).toLocaleString():"—"]})]})},{key:"issues",label:"问题".concat(G.length>0?"(".concat(G.length,")"):""),children:0===G.length?(0,r.jsx)(eC.A,{image:eC.A.PRESENTED_IMAGE_SIMPLE,description:"该节点没有记录问题"}):(0,r.jsx)(eB.A,{size:"small",dataSource:G,renderItem:e=>{var t,n;let l=null!=(n=eO[e.level])?n:{color:"default",text:String(e.level)};return(0,r.jsx)(eB.A.Item,{children:(0,r.jsxs)(m.A,{direction:"vertical",size:2,style:{width:"100%"},children:[(0,r.jsxs)(m.A,{wrap:!0,size:4,children:[(0,r.jsx)(v.A,{color:l.color,children:l.text}),e.category&&(0,r.jsx)(v.A,{children:e.category}),e.repairability&&(0,r.jsx)(v.A,{color:"blue",children:e.repairability}),(null==(t=e.provenance)?void 0:t.detectorId)&&(0,r.jsx)(el.A,{title:e.provenance.fingerprint,children:(0,r.jsx)(v.A,{children:e.provenance.detectorId})})]}),(0,r.jsx)(eU,{style:{fontSize:12},children:e.message}),e.suggestion&&(0,r.jsxs)(eU,{type:"secondary",style:{fontSize:12},children:["建议:",e.suggestion]}),(e.chapterId||e.sectionTitle)&&(0,r.jsxs)(eU,{type:"secondary",style:{fontSize:11},children:["位置:",e.chapterId||""," ",e.sectionTitle||""]})]})})}})},...Q.length>0?[{key:"details",label:"明细(".concat(Q.length,")"),children:(0,r.jsx)(eB.A,{size:"small",dataSource:Q,renderItem:e=>(0,r.jsx)(eB.A.Item,{style:{paddingBlock:3},children:(0,r.jsx)(eU,{type:"secondary",style:{fontSize:12},children:e.message})})})}]:[],...M&&M.length>0?[{key:"events",label:"事件(".concat(M.length,")"),children:(0,r.jsx)(eB.A,{size:"small",dataSource:[...M].slice(-40).reverse(),renderItem:e=>(0,r.jsx)(eB.A.Item,{style:{paddingBlock:3},children:(0,r.jsxs)(m.A,{size:6,wrap:!0,children:[(0,r.jsxs)(eU,{type:"secondary",style:{fontSize:11},children:["#",e.seq]}),(0,r.jsx)(v.A,{style:{fontSize:11},children:e.type}),(0,r.jsx)(eU,{type:"secondary",style:{fontSize:11},children:new Date(e.at).toLocaleTimeString()}),e.detail?(0,r.jsx)(eU,{style:{fontSize:11},ellipsis:!0,children:e.detail}):null]})})})}]:[],{key:"impact",label:"影响面",children:V},..._?[{key:"skills",label:"技能",children:(()=>{let e="string"==typeof g.metrics.skillId?g.metrics.skillId:void 0;return(0,r.jsxs)(e_.A,{size:"small",column:1,bordered:!0,children:[(0,r.jsx)(e_.A.Item,{label:"技能 id",children:null!=e?e:g.id}),(0,r.jsx)(e_.A.Item,{label:"技能名",children:g.title}),(0,r.jsx)(e_.A.Item,{label:"命中章节",children:"string"==typeof g.metrics.chapter?g.metrics.chapter:"—"}),(0,r.jsx)(e_.A.Item,{label:"状态",children:(0,r.jsx)(v.A,{color:(0,k.uv)(g.status),children:(0,k.m_)(g.status,L)})})]})})()}]:[],...U.length>0?[{key:"metrics",label:"指标",children:(0,r.jsx)(e_.A,{size:"small",column:1,bordered:!0,children:U.map(e=>(0,r.jsx)(e_.A.Item,{label:e.key,children:e.text.replace("".concat(e.key,": "),"")},e.key))})}]:[],...g.payloadRef?[{key:"payload",label:"载荷",children:(0,r.jsxs)(m.A,{direction:"vertical",size:6,children:[(0,r.jsx)(eF,{copyable:{text:g.payloadRef},style:{margin:0,fontSize:12},children:g.payloadRef}),(0,r.jsx)(eU,{type:"secondary",style:{fontSize:12},children:"8.6 / 附录 F.2:节点**不得携带载荷**(`agentWorkflow` 已是 p50 2.2 MB / max 94.6 MB)。 prompt / response / 证据快照等明细都在内容寻址的 `artifacts/<sha256>` 里,这里只有引用。"})]})}]:[]]})]})}var eX=n(34038);let{Text:eV}=d.A,eJ=["upsert","status","rollup","reset","start","stage","thinking","text","tool_call_preview","progress","error","done","complete","log"];function eY(e,t){var n,r;let l=null!=(n=e.projectRoot)?n:t;return{specId:e.templateId||e.id,promptIds:null!=(r=e.promptIds)?r:[],...e.materialRoot?{materialRoot:e.materialRoot}:{},...l?{projectRoot:l}:{},...e.templateName?{title:e.templateName}:{}}}function eK(e,t){let n=t.node;if(!n||"string"!=typeof n.id)return!0;if("upsert"===t.type)return e.set(n.id,n),!0;let r=e.get(n.id);if(!r){var l,i;return e.set(n.id,{...n,title:null!=(l=n.title)?l:n.id,seq:null!=(i=n.seq)?i:0}),!1}let{startedAt:a,...o}=n;return e.set(n.id,{...r,...o,id:r.id}),!0}function eZ(){var e,t,n,i,o,d,w,S,I,C,R,N,E,T,L,D,P,B,_,W,G,O,X,V,J,Z,$,ee,et;let en=(0,c.useRouter)(),el=(0,A.Vr)(),{message:ei}=u.A.useApp(),ea="string"==typeof en.query.id?en.query.id:"",eo="string"==typeof en.query.projectRoot?en.query.projectRoot:void 0,[es,ec]=(0,l.useState)(null),[ed,eu]=(0,l.useState)(!0),[eh,ep]=(0,l.useState)(null),[em,ex]=(0,l.useState)(new Map),[eg,ev]=(0,l.useState)("connecting"),[ef,ey]=(0,l.useState)(0),[ej,eA]=(0,l.useState)(null),[eb,ek]=(0,l.useState)("all"),[ew,eS]=(0,l.useState)(!0),[eI,eC]=(0,l.useState)(0),[ez,eR]=(0,l.useState)(()=>Date.now()),eN=(0,l.useCallback)(()=>{ew&&eC(Date.now()+eD.WF)},[ew]),[eE,eB]=(0,l.useState)(""),[eq,eH]=(0,l.useState)(!1),[e_,eW]=(0,l.useState)([]),[,eF]=(0,l.useState)([]),[eU,eG]=(0,l.useState)([]),[eO,eZ]=(0,l.useState)(null),[e0,e1]=(0,l.useState)(null),{bubbles:e2,push:e4,clear:e5}=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1500,[t,n]=(0,l.useState)([]),r=(0,l.useRef)(null),i=(0,l.useCallback)(t=>{let r=function(e){var t,n;let r=null!=(t=e.now)?t:Date.now(),l=null!=(n=e.freshMs)?n:15e3,{before:i,after:a}=e,o=a.parentId;if(!o)return null;if(!i){if("number"!=typeof a.startedAt||r-a.startedAt>l||r-a.startedAt<-l)return null;let e=F(a,"dispatch");return e?{id:"".concat(o,"->").concat(a.id,":dispatch"),fromId:o,toId:a.id,kind:"dispatch",label:e,at:r}:null}if(!(H.has(a.status)&&!H.has(i.status))||"number"!=typeof a.completedAt||r-a.completedAt>l||r-a.completedAt<-l)return null;let s=F(a,"report");return s?{id:"".concat(a.id,"->").concat(o,":report"),fromId:a.id,toId:o,kind:"report",label:s,at:r}:null}(t);r&&n(t=>(function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1500,l=arguments.length>4&&void 0!==arguments[4]?arguments[4]:6,i=[...e.filter(e=>n-e.at<r&&e.id!==t.id),t];return i.length>l?i.slice(i.length-l):i})(t,r,r.at,e))},[e]),a=(0,l.useCallback)(()=>{n(e=>0===e.length?e:[])},[]);return(0,l.useEffect)(()=>{if(0!==t.length)return r.current=setTimeout(()=>{r.current=null,n(t=>(function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1500,r=e.filter(e=>t-e.at<n);return r.length===e.length?e:r})(t,Date.now(),e))},Math.max(0,t.reduce((e,t)=>Math.min(e,t.at),1/0)+e-Date.now())),()=>{r.current&&(clearTimeout(r.current),r.current=null)}},[t,e]),{bubbles:t,push:i,clear:a}}(),[e8,e6]=(0,l.useState)(!1);(0,l.useEffect)(()=>{if("function"!=typeof window.matchMedia)return;let e=window.matchMedia("(prefers-reduced-motion: reduce)"),t=()=>e6(e.matches);return t(),e.addEventListener("change",t),()=>e.removeEventListener("change",t)},[]);let[e3,e9]=(0,l.useState)(null),[e7,te]=(0,l.useState)(()=>new Map),[tt,tn]=(0,l.useState)([]),[tr,tl]=(0,l.useState)(null),[ti,ta]=(0,l.useState)(!1),[to,ts]=(0,l.useState)(!0),[tc,td]=(0,l.useState)(!0),[tu,th]=(0,l.useState)([]),[tp,tm]=(0,l.useState)(null),[tx,tg]=(0,l.useState)(!1),tv=(0,eD.s_)(),{centerOn:tf,zoomAt:ty,fit:tj,reset:tA}=tv,tb=(0,l.useCallback)(()=>{var e;let t=null==(e=tv.containerRef.current)?void 0:e.getBoundingClientRect();if(!t)return{left:0,top:0,right:0,bottom:0};let n=e=>{let n=document.querySelector(e);if(!n)return null;let r=n.getBoundingClientRect();return{top:r.top-t.top,bottom:r.bottom-t.top}},r=n(".canvasToolbar"),l=n(".canvasInputBar"),i=Math.min(r?r.bottom+8:24,.4*t.height),a=Math.max(l?l.top-8:t.height-24,.6*t.height);return{left:24,top:i,right:t.width-24,bottom:a}},[tv.containerRef]),tk=(0,l.useRef)(new Map),tw=(0,l.useRef)(0),tS=(0,l.useRef)({nodes:[],events:[],cursor:0}),tI=(0,l.useRef)(null),tC=(0,l.useRef)(0),tz=(0,l.useRef)(eo),tR=(0,l.useRef)(!1),tN=(0,l.useCallback)(e=>{let t=e.key?el(e.key):e.text,n=t===e.key?e.text:t;tC.current+=1,eF(t=>[{id:tC.current,kind:e.kind,text:n,at:Date.now()},...t].slice(0,100)),"error"===e.kind?ei.error(n):"warning"===e.kind?ei.warning(n):"success"===e.kind&&ei.success(n)},[ei,el]),tE=(0,b.tl)({projectRoot:eo,documentId:ea||null,onNotice:tN,t:el}),{refreshDocuments:tT,applyRecord:tM}=tE,tL=function(e,t){let[n,r]=(0,l.useState)({loading:!1,error:null,preview:null}),i=(0,l.useRef)(0),a=(0,l.useCallback)(async()=>{if(!e)return void r({loading:!1,error:"缺少记录 id,无法取回成稿预览",preview:null});let n=i.current+1;i.current=n,r(e=>({...e,loading:!0,error:null}));try{let{preview:l}=await (0,j.sz)(e,t);if(i.current!==n)return;r({loading:!1,error:null,preview:l})}catch(e){if(i.current!==n)return;r({loading:!1,error:e instanceof Error?e.message:"取回成稿预览失败",preview:null})}},[e,t]),o=(0,l.useCallback)(()=>{i.current+=1,r({loading:!1,error:null,preview:null})},[]);return{...n,load:a,reset:o}}(ea,null!=(E=tz.current)?E:eo),tD=(0,l.useCallback)(()=>{var e;if(ti){tL.reset(),ta(!1);return}ta(!0),tL.load(),(0,j.f$)(null!=(e=tz.current)?e:eo).then(e=>th(e.assets.filter(e=>e.usedByDocumentIds.includes(ea)))).catch(()=>th([]))},[ti,tL,ea,eo]),tP=(0,l.useCallback)(e=>{var t;let n=null!=(t=tz.current)?t:eo;if("image"!==e.type)return void(0,j.oS)(e.id,"file",n).catch(()=>tN({kind:"error",text:"打开资产失败"}));tg(!1),tm(e)},[eo,tN]),tB=(0,l.useCallback)(e=>{tn(t=>t.includes(e)?t:[...t,e])},[]),tq=(0,l.useCallback)(()=>{tI.current||(tI.current=setTimeout(()=>{tI.current=null;let e=tS.current;if(tS.current={nodes:[],events:[],cursor:0},e.nodes.length>0){let n=tk.current,r=0;for(let l of e.nodes){var t;let e=null==(t=l.node)?void 0:t.id,i=e?n.get(e):void 0;eK(n,l)||(r+=1);let a=e?n.get(e):void 0;a&&e4({...i?{before:i}:{},after:a})}ex(new Map(n)),r>0&&tB("通道收到 ".concat(r," 条指向未知节点的补丁:已按最小节点收下(说明本客户端漏读了 upsert,或日志存在损坏)"))}if(e.cursor>tw.current&&(tw.current=e.cursor),e.events.length>0){let t=e.events;eW(e=>[...t.reverse(),...e].slice(0,200)),ey(e=>t.reduce((e,t)=>Math.max(e,t.seq),e))}},120))},[tB,e4]);(0,l.useEffect)(()=>()=>{tI.current&&clearTimeout(tI.current)},[]);let tH=(0,l.useCallback)((e,t)=>{let n=tS.current;t&&n.nodes.push(t),n.events.push(e),(null==t?void 0:t.logT)&&t.logT>n.cursor&&(n.cursor=t.logT),tq()},[tq]),t_=(0,l.useCallback)(async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(ea){e.silent||eu(!0);try{var t,n,r,l,i,a;let e=tz.current?"?projectRoot=".concat(encodeURIComponent(tz.current)):"",o=await fetch("/api/documents/canvas/".concat(encodeURIComponent(ea)).concat(e));if(404===o.status)return void ep("记录不存在(可能已被删除)");if(!o.ok)throw Error(await o.text()||"HTTP ".concat(o.status));let s=await o.json();tz.current=null!=(r=s.document.projectRoot)?r:tz.current,ec(s),ep(null),tn(null!=(l=s.degraded)?l:[]);let c=function(e){let t=[],n=e=>{for(let r of e){let{children:e,...l}=r;t.push(l),e&&n(e)}};return n(e),t}(null!=(i=null==(t=s.nodes)?void 0:t.tree)?i:[]),d=new Map(c.map(e=>[e.id,e]));tk.current=d,ex(d),tw.current=Math.max(tw.current,null!=(a=null==(n=s.nodes)?void 0:n.cursor)?a:0)}catch(e){ep(e instanceof Error?e.message:String(e))}finally{e.silent||eu(!1)}}},[ea]);(0,l.useEffect)(()=>{t_()},[t_]),(0,l.useEffect)(()=>{var e;let t=null==es||null==(e=es.nodes)?void 0:e.depth;null==t||tR.current||ek(t)},[es]),(0,l.useEffect)(()=>{ea&&tT()},[ea,tT]),(0,l.useEffect)(()=>{let e=tE.documents.find(e=>e.id===ea);e&&tM(e)},[tM,ea,tE.documents]);let tW=(0,l.useCallback)(async()=>{if(ea)try{var e,t;let n=new URLSearchParams({since:String(tw.current)});tz.current&&n.set("projectRoot",tz.current);let r=await fetch("/api/documents/generated/".concat(encodeURIComponent(ea),"/nodes?").concat(n.toString()));if(!r.ok)return;let l=await r.json(),i=tk.current;for(let t of null!=(e=l.nodes)?e:[])eK(i,{type:"upsert",node:t});(null!=(t=l.nodes)?t:[]).length>0&&ex(new Map(i)),l.cursor&&(tw.current=Math.max(tw.current,l.cursor)),l.downgraded&&tB(l.reason||"增量过大,服务端已降级为全量快照")}catch(e){}},[tB,ea]);(0,l.useEffect)(()=>{if(!ea)return;let e=setInterval(()=>{tW()},1e4);return()=>clearInterval(e)},[ea,tW]),(0,l.useEffect)(()=>{if(!ea||"undefined"==typeof EventSource)return;let e=tz.current?"?projectRoot=".concat(encodeURIComponent(tz.current)):"",t=new EventSource("/api/documents/generated/".concat(encodeURIComponent(ea),"/events").concat(e));ev("connecting");let n=e=>t=>{var n,r,l;let i={};try{i=JSON.parse(t.data)}catch(e){}let a=null!=(l=i.type)?l:e;"reset"===a&&(e5(),t_({silent:!0}),tB("通道补发不可用(服务端重启或环形覆盖):已重取全量快照"));let o=null==(n=i.node)?void 0:n.title;tH({seq:"number"==typeof i.seq?i.seq:0,type:a,at:"number"==typeof i.at?i.at:Date.now(),...i.nodeId?{nodeId:i.nodeId}:{},...o?{nodeTitle:o}:{},...(null==(r=i.payload)?void 0:r.message)?{detail:i.payload.message}:{}},i.node?{type:a,node:i.node,...i.logT?{logT:i.logT}:{}}:void 0),i.node&&tT()},r=eJ.map(e=>[e,n(e)]);for(let[e,n]of(t.onopen=()=>ev("open"),t.onerror=()=>{ev("error"),tW()},r))t.addEventListener(e,n);return t.onmessage=n("message"),()=>{for(let[e,n]of r)t.removeEventListener(e,n);t.close()}},[tB,e5,ea,t_,tH,tT,tW]),(0,l.useEffect)(()=>{e5()},[e5,ea]);let tF=(0,l.useMemo)(()=>(0,k.Jr)([...em.values()],"all"===eb?void 0:eb),[em,eb]),tU=(0,l.useMemo)(()=>(0,k.x8)(tF),[tF]),tG=(0,l.useMemo)(()=>(0,k.PI)(tF),[tF]),tO=(0,l.useMemo)(()=>0!==e7.size||e3?(0,k.bJ)(tG,(0,k.Kq)(e7,e3)):tG,[tG,e7,e3]),tQ=(0,l.useRef)(1);tQ.current=tv.view.k;let tX=(0,l.useRef)(!1);tX.current=null!==e3;let tV=(0,l.useCallback)((e,t,n,r)=>{let{dx:l,dy:i}=(0,k.qj)({dx:t,dy:n},tQ.current);if("move"===r)return void e9({id:e.id,dx:l,dy:i});e9(null),(0!==t||0!==n)&&te(t=>{var n;let r=new Map(t),a=null!=(n=r.get(e.id))?n:{dx:0,dy:0};return r.set(e.id,{dx:a.dx+l,dy:a.dy+i}),r})},[]),tJ=(0,l.useCallback)(()=>{e9(null),te(new Map)},[]),tY=(0,l.useMemo)(()=>new Map(tU.map(e=>[e.id,e])),[tU]),tK=ej&&null!=(T=tY.get(ej))?T:null,tZ=(0,l.useMemo)(()=>{if(ej)return M(tU.map(e$),ej)},[tU,ej]),t$=(0,l.useMemo)(()=>{var e;return new Set(null!=(e=null==tZ?void 0:tZ.affectedNodeIds)?e:[])},[tZ]),t0=(0,l.useMemo)(()=>new Set(ej?[...(0,k.II)(tF,ej),ej]:[]),[tF,ej]),t1=(0,l.useMemo)(()=>(0,k.Kg)(tO),[tO]),t2=(0,l.useMemo)(()=>(function(e,t){var n,r;let l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=null!=(n=l.limit)?n:6,a=null!=(r=l.recentLimit)?r:3,o=[],s=[],c=(e,n)=>{for(let r of e)Q.has(r.status)?o.push(Y(r,n,t)):"completed"===r.status&&"number"==typeof r.completedAt&&t-r.completedAt<=9e4&&s.push(Y(r,n,t)),r.children.length>0&&c(r.children,n+1)};return c(e,0),o.sort((e,n)=>{var r,l;let i=null!=(r=K(e,t))?r:0;return(null!=(l=K(n,t))?l:0)-i||e.id.localeCompare(n.id)}),s.sort((e,t)=>{var n,r;return(null!=(n=t.completedAt)?n:0)-(null!=(r=e.completedAt)?r:0)||e.id.localeCompare(t.id)}),{running:o.slice(0,i),recent:s.slice(0,a),runningTotal:o.length,recentTotal:s.length}})(tF,Date.now()),[tF]),t4=(0,l.useMemo)(()=>(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4,n=[],r=e=>{for(let i of e){if("supervisor"===i.type){var t,l;let e="string"==typeof(null==(t=i.metrics)?void 0:t.action)?i.metrics.action:"unknown",r="string"==typeof(null==(l=i.metrics)?void 0:l.note)?i.metrics.note:void 0;n.push({id:i.id,action:e,title:i.title||"调度决策",...r?{note:r}:{},status:i.status,..."number"==typeof i.completedAt?{at:i.completedAt}:"number"==typeof i.startedAt?{at:i.startedAt}:{}})}i.children.length>0&&r(i.children)}};return r(e),n.sort((e,t)=>{var n,r;return(null!=(n=t.at)?n:0)-(null!=(r=e.at)?r:0)||e.id.localeCompare(t.id)}),n.slice(0,t)})(tF),[tF]),t5=(0,l.useCallback)(e=>{let t=tY.get(e.fromId);return t?t$.has(e.fromId)&&t$.has(e.toId)?"affected":2>=(0,k.vp)(t.status)?"warn":t0.has(e.fromId)&&t0.has(e.toId)?"active":"default":"default"},[t$,t0,tY]);(0,l.useEffect)(()=>{if(0===eI)return;let e=setInterval(()=>eR(Date.now()),1e3);return()=>clearInterval(e)},[eI]);let t8=(0,l.useMemo)(()=>{if(0===tU.length)return null;let e=tU.filter(e=>"running"===e.status),t=e.length>0?e:tU;return t.reduce((e,t)=>{var n,r;return(null!=(n=t.seq)?n:0)>=(null!=(r=e.seq)?r:0)?t:e},t[0])},[tU]),t6=null==t8?void 0:t8.id,t3=(0,l.useMemo)(()=>{var e;return(0,eD.be)({following:ew,pausedUntil:eI,now:ez,node:t8?{title:t8.title,...(null==(e=t8.metrics)?void 0:e.roundIteration)!==void 0?{round:t8.metrics.roundIteration}:{}}:void 0})},[ew,eI,ez,t8]);(0,l.useEffect)(()=>{var e;if(!ew||!t6||eI>Date.now()||tX.current)return;let t=null==(e=tv.containerRef.current)?void 0:e.getBoundingClientRect();if(!t)return;let n=tO.nodes.find(e=>e.node.id===t6);n&&(0,eD.xA)({x:n.x,y:n.y,width:k.zT,height:k.EL},tv.view,{width:t.width,height:t.height},tb())&&tf(n.x,n.y,void 0,tb())},[tf,ew,eI,tO.nodes,t6,tb,tv.containerRef,tv.view]),(0,l.useEffect)(()=>{var e;if(!(null==(e=tv.containerRef.current)?void 0:e.getBoundingClientRect())||0===tO.nodes.length)return;let{dx:t,dy:n}=(0,eD.B)({width:tO.width,height:tO.height},tv.view,tb());tv.panBy(t,n)},[tO.width,tO.height,tO.nodes.length]);let t9=(0,l.useCallback)(e=>{eA(e);let t=tO.nodes.find(t=>t.node.id===e);t&&tf(t.x,t.y,void 0,tb())},[tf,tO.nodes,tb]);(0,l.useEffect)(()=>{if(!ej)return;let e=e=>{"Escape"===e.key&&eA(null)};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[ej]);let t7=(0,l.useCallback)(e=>{eB(t=>""===t||t.endsWith(" ")?"".concat(t,"@").concat(e.title," "):"".concat(t," @").concat(e.title," "))},[]),ne=(0,l.useCallback)(()=>{let e=null==es?void 0:es.document;if(!e)return;let t=eE.trim();t&&(eH(!0),(0,j.wI)(e.id,t,{...tz.current?{projectRoot:tz.current}:{}}).then(e=>{var t;tN({kind:"info",text:e.answer?"".concat(e.receipt,"\n").concat(e.answer):e.receipt}),eG(null!=(t=e.candidates)?t:[]),eB("")}).catch(e=>tN({kind:"error",text:e instanceof Error?e.message:"指令未受理"})).finally(()=>eH(!1)))},[es,tN,eE]),nt=(0,l.useCallback)(()=>{let e=null==es?void 0:es.document;e&&(eH(!0),tE.startGeneration(eY(e,tz.current),eE.trim()).finally(()=>eH(!1)))},[es,tE,eE]),nn=(0,l.useCallback)(e=>{let t=null==es?void 0:es.document;t&&(eH(!0),(0,j.wI)(t.id,"(选定:".concat(e.label,")"),{...tz.current?{projectRoot:tz.current}:{},acceptedCandidate:{kind:e.kind}}).then(e=>{tN({kind:"info",text:e.receipt}),eG([])}).catch(e=>tN({kind:"error",text:e instanceof Error?e.message:"指令未受理"})).finally(()=>eH(!1)))},[es,tN]),nr=(0,l.useCallback)(async()=>{let e=null==es?void 0:es.document;if(!e)return;let t=eY(e,tz.current);if(!t.projectRoot)return void tN({kind:"error",text:"未识别当前项目,无法预览结构"});try{let e=await (0,j.dk)({promptIds:t.promptIds,requirement:eE.trim(),...t.materialRoot?{materialRoot:t.materialRoot}:{},...t.title?{title:t.title}:{},projectRoot:t.projectRoot});tl({title:e.title,chapters:e.chapters,outlineSource:e.derivation.outlineSource,materialScope:e.materialScope})}catch(e){tN({kind:"error",text:e instanceof Error?e.message:"结构预览失败"})}},[es,tN,eE]),nl=(0,l.useCallback)(e=>{let t=M(tU.map(e$),e.id);if(!t)return void tN({kind:"warning",text:"该节点不在当前节点集合里,无法评估影响面"});eZ({nodeId:e.id,nodeTitle:e.title,nodeType:e.type,impact:t})},[tU,tN]),ni=(0,l.useCallback)(()=>{if(!eO)return;let e=(0,k.RV)(eO.nodeTitle,eO.impact);eB(t=>t?"".concat(t," ").concat(e):e),eZ(null)},[eO]),[na,no]=(0,l.useState)(null),[ns,nc]=(0,l.useState)(null),nd=(0,l.useCallback)(e=>{if(!eO)return;let t=eO.nodeId;no({nodeId:t,phase:"creating"}),(0,j.xU)({documentId:ea,targetNodeId:t,userMessage:e}).then(e=>{var n,r,l,i;no({nodeId:t,phase:"confirmable",requestId:null==(n=e.request)?void 0:n.id,attribution:"string"==typeof e.attribution?e.attribution:void 0,localizationNote:e.localizationNote,...e.needsLocalization?{needsLocalization:!0}:{},...(null==(i=e.request)||null==(l=i.localization)||null==(r=l.candidates)?void 0:r.length)?{candidates:e.request.localization.candidates}:{}})}).catch(e=>{no({nodeId:t,phase:"error",message:e instanceof Error?e.message:String(e)})})},[ea,eO]),nu=(0,l.useCallback)(e=>{nc({phase:"creating"}),(0,j.xU)({documentId:ea,userMessage:e}).then(e=>{var t,n,r,l;nc({phase:"confirmable",requestId:null==(t=e.request)?void 0:t.id,attribution:"string"==typeof e.attribution?e.attribution:void 0,candidates:null!=(l=null==(r=e.request)||null==(n=r.localization)?void 0:n.candidates)?l:[],localizationNote:e.localizationNote})}).catch(e=>{nc({phase:"error",message:e instanceof Error?e.message:String(e)})})},[ea]),nh=(0,l.useCallback)(e=>{(null==ns?void 0:ns.requestId)&&(0,j.Ho)({documentId:ea,requestId:ns.requestId,acceptedNodeId:e}).then(e=>{var t;nc({...ns,phase:"executed",outcome:String(null!=(t=e.outcome)?t:""),notExecutedReason:e.notExecutedReason})}).catch(e=>{nc({...ns,phase:"error",message:e instanceof Error?e.message:String(e)})})},[ns,ea]),np=(0,l.useCallback)(e=>{(null==na?void 0:na.requestId)&&(0,j.Ho)({documentId:ea,requestId:na.requestId,...e?{acceptedNodeId:e}:{}}).then(e=>{var t;no({...na,phase:"executed",outcome:String(null!=(t=e.outcome)?t:""),notExecutedReason:e.notExecutedReason,attribution:"string"==typeof e.attribution?e.attribution:na.attribution})}).catch(e=>{no({...na,phase:"error",message:e instanceof Error?e.message:String(e)})})},[ea,na]),nm=(0,l.useCallback)(()=>{(null==na?void 0:na.requestId)&&(0,j.vX)({documentId:ea,requestId:na.requestId}).then(e=>{var t,n,r;let l=null==(t=e.restoredChars)?void 0:t.beforeChars,i=null==(n=e.restoredChars)?void 0:n.afterChars;no({...na,phase:"executed",outcome:String(null!=(r=e.outcome)?r:"rolled-back"),restoredChars:void 0!==l&&void 0!==i?l-i:void 0})}).catch(e=>{no({...na,phase:"error",message:e instanceof Error?e.message:String(e)})})},[ea,na]),nx=(0,l.useCallback)(()=>{tE.pauseDocument(ea).catch(e=>tN({kind:"error",text:e instanceof Error?e.message:"暂停失败"}))},[ea,tE,tN]),ng=(0,l.useCallback)(()=>{tE.resumePausedDocument(ea).catch(e=>tN({kind:"error",text:e instanceof Error?e.message:"继续失败"}))},[ea,tE,tN]),nv=null==es?void 0:es.document.status,nf=tE.loading||"generating"===nv||"queued"===nv,ny=(0,l.useRef)(null),nj=(0,l.useRef)(null),[nA,nb]=(0,l.useState)({width:0,height:0});(0,l.useLayoutEffect)(()=>{let e=nj.current;if(!e)return void nb({width:0,height:0});let t=()=>{let t=e.firstElementChild;if(!t)return;let n=e.offsetWidth,r=Math.max(t.scrollHeight,t.offsetHeight);nb(e=>Math.abs(e.width-n)>2||Math.abs(e.height-r)>2?{width:n,height:r}:e)};t();let n=new ResizeObserver(t);return n.observe(e),e.firstElementChild&&n.observe(e.firstElementChild),()=>n.disconnect()},[ej]);let nk=(0,l.useMemo)(()=>{var e;if(!ej)return null;let t=tO.nodes.find(e=>e.node.id===ej),n=null==(e=tv.containerRef.current)?void 0:e.getBoundingClientRect();if(!t||!n)return null;let r=[".canvasToolbar",".canvasInputBar",".canvasRecordsBall"].map(e=>{var t;return null==(t=document.querySelector(e))?void 0:t.getBoundingClientRect()}).filter(e=>!!e).map(e=>({left:e.left-n.left,top:e.top-n.top,right:e.right-n.left,bottom:e.bottom-n.top})),l="".concat(tv.view.x,",").concat(tv.view.y,",").concat(tv.view.k),i=ny.current,a=i&&i.id===ej&&i.viewKey===l?i:null,o=(0,k.Aq)({node:{x:t.x,y:t.y},view:tv.view,box:n,panelWidth:nA.width>0?nA.width:462,panelHeight:nA.height>0?nA.height:480,obstacles:r,...a?{pin:{left:a.left,top:a.top}}:{}});ny.current={id:ej,viewKey:l,left:o.left,top:o.top};let s=Math.round(.62*n.height);return{left:o.left,top:o.top,maxHeight:Math.max(180,Math.min(o.maxHeight,s))}},[tO.nodes,ej,tv,nA]),nw=(0,l.useCallback)(e=>{t7(e),requestAnimationFrame(()=>{var e;return null==(e=document.querySelector(".canvasInputBar textarea"))?void 0:e.focus()})},[t7]),nS=(0,l.useCallback)(e=>{t9(e.id),e1(e.id),window.setTimeout(()=>e1(t=>t===e.id?null:t),1200)},[t9]),nI=(0,l.useCallback)(async e=>{if(ea)try{let{document:t}=await (0,j.v7)(ea,!1,tz.current);if(!t)return void tN({kind:"warning",text:"记录不存在,无法导出"});await tE.export.exportRecord(t,e)}catch(e){tN({kind:"error",text:e instanceof Error?e.message:"导出失败"})}},[ea,tE.export,tN]),nC=tE.boundRecord,nz=function(e,t){if(!e)return;let n=(null==t?void 0:t.docId)===e.id?t:void 0,r=e.deliveryQuality;return r?{...n,docId:e.id,...e.projectRoot?{projectRoot:e.projectRoot}:{},contractQuality:r.receipt,...r.stale?{contractQualityStale:r.stale}:{contractQualityStale:void 0}}:n}(null==es?void 0:es.document,tE.deliveryReadings),nR=tE.canResume;return ea?eh?(0,r.jsx)(p.Ay,{status:"warning",title:"画布打不开",subTitle:eh,extra:(0,r.jsxs)(m.A,{children:[(0,r.jsx)(x.Ay,{icon:(0,r.jsx)(y.A,{}),onClick:()=>{t_()},children:"重试"}),(0,r.jsx)(s(),{href:"/documents",children:(0,r.jsx)(x.Ay,{type:"primary",children:"回到文档页"})})]})}):(0,r.jsxs)("div",{className:"canvasRoot",children:[(0,r.jsx)(a(),{children:(0,r.jsx)("title",{children:(null==es?void 0:es.document.title)?"".concat(es.document.title," \xb7 画布"):"生成画布"})}),(0,r.jsx)(eT,{title:(null==es?void 0:es.document.title)||"生成画布",...nv?{status:nv}:{},...(null==es?void 0:es.document.updatedAt)!==void 0?{updatedAt:es.document.updatedAt}:{},...(null==es?void 0:es.document.wordCount)!==void 0?{wordCount:es.document.wordCount}:{},agents:t2,supervisorDecisions:t4,agentsActive:nf,...(null==es?void 0:es.document.createdAt)!==void 0?{startedAt:es.document.createdAt}:{},onLocateAgent:e=>{eA(e),e1(e)},nodeCount:em.size,visibleCount:tO.nodes.length,hiddenCount:null!=(L=null==es?void 0:es.nodes.hiddenCount)?L:0,degraded:tt,skills:{hits:null!=(D=null==es?void 0:es.skills.hits)?D:[],note:null!=(P=null==es?void 0:es.skills.note)?P:""},gate:null!=(B=null==es?void 0:es.gate)?B:null,connection:eg,lastSeq:ef,zoom:tv.view.k,depth:eb,following:ew,followStatus:t3.title,generating:!!nf,resumable:nR,exporting:tE.export.exporting,nonDeliverableExport:tE.export.nonDeliverableExport,onZoomIn:()=>ty(1.2),onZoomOut:()=>ty(1/1.2),onZoomReset:tA,onFit:()=>tj(tO.width,tO.height,tb()),onDepthChange:e=>{tR.current=!0,ek(e)},onToggleFollow:()=>eS(e=>!e),onContinue:()=>{nC&&tE.resumeDocument(nC)},onPause:nx,onResume:ng,onAbort:()=>{tE.abortGeneration()},onExport:e=>{nI(e)},exportReports:tE.export.exportReports,...nz?{deliveryReadings:nz}:{},previewOpen:ti,onTogglePreview:tD,hasNodeOffsets:e7.size>0,onResetNodeLayout:tJ,collapsed:to,onToggleCollapsed:ts,t:el}),(0,r.jsxs)("div",{ref:tv.containerRef,className:"canvasStage",style:{backgroundImage:"radial-gradient(var(--canvasGridDot) 1px, transparent 1px)",backgroundSize:"".concat(eD.VF*tv.view.k,"px ").concat(eD.VF*tv.view.k,"px"),backgroundPosition:"".concat(tv.view.x,"px ").concat(tv.view.y,"px"),cursor:"grab"},onWheelCapture:eN,onPointerDown:e=>{var t;let n=e.target;null!=n&&null!=(t=n.closest)&&t.call(n,".nodeInfoLayer, .canvasToolbar, .canvasInputBar")||(eN(),tv.onPointerDown(e))},onPointerMove:tv.onPointerMove,onPointerUp:tv.endDrag,onPointerLeave:tv.endDrag,onClick:()=>eA(null),children:[ed&&(0,r.jsx)("div",{style:{position:"absolute",inset:0,display:"grid",placeItems:"center"},children:(0,r.jsxs)(m.A,{direction:"vertical",align:"center",children:[(0,r.jsx)(h.A,{}),(0,r.jsx)(eV,{type:"secondary",children:"正在读取节点日志…"})]})}),!ed&&0===tO.nodes.length&&(0,r.jsx)("div",{style:{position:"absolute",inset:0,display:"grid",placeItems:"center",pointerEvents:"none"},children:(0,r.jsxs)(m.A,{direction:"vertical",align:"center",size:8,children:[(0,r.jsx)(eV,{type:"secondary",children:"还没有节点日志"}),(0,r.jsx)(eV,{type:"secondary",style:{fontSize:12},children:"节点日志是唯一真相源:这里**不造占位节点**,发起生成后节点会随日志追加而出现。"})]})}),(0,r.jsxs)("div",{style:{position:"absolute",left:0,top:0,transformOrigin:"0 0",transform:"translate(".concat(tv.view.x,"px, ").concat(tv.view.y,"px) scale(").concat(tv.view.k,")"),width:tO.width,height:tO.height},children:[(0,r.jsx)(q,{edges:tO.edges,width:tO.width,height:tO.height,toneOf:t5,flowing:t1}),(0,r.jsx)(U,{bubbles:e2,layout:tO,static:e8}),tO.nodes.map(e=>(0,r.jsx)(er,{node:e.node,x:e.x,y:e.y,selected:e.node.id===ej,affected:t$.has(e.node.id)&&e.node.id!==ej,flashed:e0===e.node.id,onDrag:tV,onSelect:e=>eA(e.id),t:el},e.node.id))]}),tK&&nk&&(0,r.jsx)("div",{ref:nj,className:"nodeInfoLayer",style:{left:nk.left,top:nk.top,maxHeight:nk.maxHeight},onClick:e=>e.stopPropagation(),onContextMenu:e=>e.stopPropagation(),children:(0,r.jsx)(eQ,{node:tK,...tZ?{impact:tZ}:{},flatNodes:tU,highlighted:!!(ej&&t$.has(ej)),generating:!!nf,repairPreview:eO,repairRun:na,onRunRepair:nd,onConfirmRepair:np,onRollbackRepair:nm,defaultRepairNote:eO?(0,k.RV)(eO.nodeTitle,eO.impact):"",onFocusNode:t9,onRequestRepair:nl,onClose:()=>eA(null),onDraftRepairNote:ni,onCancelRepairPreview:()=>eZ(null),onMention:nw,onLocate:nS,onPause:nx,onResume:ng,nodeEvents:e_.filter(e=>e.nodeId===(null==tK?void 0:tK.id)),t:el})})]}),(0,r.jsx)(eP._,{quickActions:[...eU.map(e=>({key:e.kind,label:"按「".concat(e.label,"」执行"),onClick:()=>nn(e)})),{key:"document-repair",label:"按这段要求修复正文(先定位)",onClick:()=>nu(eE.trim())},{key:"regenerate",label:"按这段要求再生成一份",onClick:nt}],value:eE,onChange:eB,onSend:ne,generating:!!nf,submitting:eq,disabled:!es,...es?{}:{disabledReason:"正在读取记录…"},selectedNode:tK,onMentionSelected:()=>{tK&&t7(tK)},resumable:nR,onContinue:()=>{nC&&tE.resumeDocument(nC)},onPreviewStructure:()=>{nr()},collapsed:tc,onToggleCollapsed:td}),(0,r.jsx)(eM._,{currentDocumentId:ea,...eo?{projectRoot:eo}:{},onSelect:e=>{en.push((0,eL.p)(e.id,e.projectRoot||eo))},onCurrentDeleted:()=>{en.push("/canvas")}}),(0,r.jsxs)(g.A,{open:!!ns,title:"文档级修复(先定位)",onCancel:()=>nc(null),footer:(0,r.jsx)(x.Ay,{onClick:()=>nc(null),children:"关闭"}),width:640,children:[(null==ns?void 0:ns.phase)==="creating"&&(0,r.jsx)(eV,{type:"secondary",children:"正在定位要改的节点…"}),(null==ns?void 0:ns.phase)==="error"&&(0,r.jsx)(eV,{type:"danger",children:"修复请求未建立:".concat(null!=(_=ns.message)?_:"")}),(null==ns?void 0:ns.phase)==="confirmable"&&(0,r.jsxs)(m.A,{direction:"vertical",size:8,style:{width:"100%"},children:[(0,r.jsx)(eV,{type:"secondary",style:{fontSize:12},children:"请求已建立(".concat(null!=(W=ns.requestId)?W:"",")").concat(ns.attribution?";归因:".concat(ns.attribution):"","。")+"点一个候选才会真的改正文——定位这件事由你定,系统不替你点头。"}),(null!=(G=null==(e=ns.candidates)?void 0:e.length)?G:0)===0?(0,r.jsx)(eV,{type:"warning",children:"系统定位不出候选节点:请改用「@ 节点名」指定,或在节点面板里发起(不猜一个节点去改)"}):ns.candidates.map(e=>(0,r.jsx)("div",{"data-testid":"document-repair-candidate",children:(0,r.jsxs)(m.A,{size:6,wrap:!0,children:[(0,r.jsx)(v.A,{children:"匹配 ".concat(e.score.toFixed(2))}),(0,r.jsx)(eV,{style:{fontSize:12},children:e.excerpt.slice(0,80)}),(0,r.jsx)(x.Ay,{size:"small",type:"primary",onClick:()=>nh(e.nodeId),children:"定位到该节点并执行"})]})},e.nodeId))]}),(null==ns?void 0:ns.phase)==="executed"&&(0,r.jsxs)(m.A,{direction:"vertical",size:6,children:[(0,r.jsx)(v.A,{color:"applied"===ns.outcome?"green":"rolled-back"===ns.outcome?"orange":"red",children:"执行结果:".concat(null!=(O=ns.outcome)?O:"未执行")}),ns.notExecutedReason&&(0,r.jsx)(eV,{type:"danger",style:{fontSize:12},children:ns.notExecutedReason})]})]}),(0,r.jsx)(eX.B,{open:!!tr,title:null!=(X=null==tr?void 0:tr.title)?X:"",chapters:null!=(V=null==tr?void 0:tr.chapters)?V:[],...(null==tr?void 0:tr.outlineSource)?{outlineSource:tr.outlineSource}:{},...(null==tr?void 0:tr.materialScope)?{materialScope:tr.materialScope}:{},onClose:()=>tl(null)}),(0,r.jsxs)(g.A,{open:ti,title:"成稿预览",onCancel:()=>{tL.reset(),ta(!1)},footer:(0,r.jsxs)(m.A,{children:[(0,r.jsx)(x.Ay,{onClick:()=>{tL.load()},loading:tL.loading,children:"重新取回"}),(0,r.jsx)(x.Ay,{type:"primary",onClick:()=>{tL.reset(),ta(!1)},children:"关闭"})]}),width:920,styles:{body:{maxHeight:"72vh",overflow:"auto",background:"var(--colorBgLayout)",padding:"16px 20px"}},style:{top:32},children:[(0,r.jsx)(z,{status:null!=(J=null==(t=tL.preview)?void 0:t.status)?J:nv,title:null!=(Z=null==(n=tL.preview)?void 0:n.title)?Z:null==es?void 0:es.document.title,html:null==(i=tL.preview)?void 0:i.html,source:null==(o=tL.preview)?void 0:o.source,truncated:null==(d=tL.preview)?void 0:d.truncated,totalChars:null==(w=tL.preview)?void 0:w.totalChars,renderedChars:null==(S=tL.preview)?void 0:S.renderedChars,stats:null==(I=tL.preview)?void 0:I.stats,gate:null!=(ee=null!=($=null==(C=tL.preview)?void 0:C.gate)?$:null==es?void 0:es.gate)?ee:null,deliveryReadings:nz,loading:tL.loading,error:tL.error,onRetry:()=>{tL.load()},updatedAt:null==(R=tL.preview)?void 0:R.updatedAt,generatedAt:null==(N=tL.preview)?void 0:N.generatedAt,t:el}),(0,r.jsxs)("div",{style:{marginTop:16,borderTop:"1px solid var(--colorBorderSecondary)",paddingTop:12},children:[(0,r.jsx)(eV,{strong:!0,style:{fontSize:13},children:"本档用到的资产"}),0===tu.length?(0,r.jsx)("div",{children:(0,r.jsx)(eV,{type:"secondary",style:{fontSize:12},children:"本档暂无资产"})}):(0,r.jsxs)(m.A,{direction:"vertical",size:4,style:{width:"100%",marginTop:6},children:[tu.slice(0,20).map(e=>(0,r.jsxs)(m.A,{size:8,children:[(0,r.jsx)(eV,{style:{fontSize:12},children:e.name}),(0,r.jsx)(x.Ay,{size:"small",type:"link",onClick:()=>tP(e),children:"打开"})]},e.id)),tu.length>20?(0,r.jsxs)(eV,{type:"secondary",style:{fontSize:12},children:["还有 ",tu.length-20," 项未列出"]}):null]})]})]}),(0,r.jsxs)(g.A,{open:!!tp,title:tp?"资产预览:".concat(tp.name):"",onCancel:()=>{tm(null),tg(!1)},footer:(0,r.jsxs)(m.A,{children:[tx&&tp?(0,r.jsx)(x.Ay,{onClick:()=>{var e;(0,j.oS)(tp.id,"file",null!=(e=tz.current)?e:eo).catch(()=>tN({kind:"error",text:"打开资产失败"}))},children:"用系统程序打开"}):null,(0,r.jsx)(x.Ay,{type:"primary",onClick:()=>{tm(null),tg(!1)},children:"关闭"})]}),width:760,styles:{body:{maxHeight:"68vh",overflow:"auto"}},children:[tp&&!tx?(0,r.jsx)("img",{alt:tp.name,src:(0,j.iN)(tp.id,null!=(et=tz.current)?et:eo),style:{maxWidth:"100%",display:"block",margin:"0 auto"},onError:()=>tg(!0)}):null,tx&&(0,r.jsx)(f.A,{type:"info",showIcon:!0,message:"这个资产不能在应用内渲染",description:"服务端只对图片(PNG / JPEG / WebP,按文件头验证)提供应用内渲染;其它形态请用系统程序打开。"})]})]}):(0,r.jsx)("div",{className:"appShellPlaceholder",children:(0,r.jsx)(h.A,{style:{margin:48}})})}function e$(e){return e}},72210:(e,t,n)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/canvas/[id]",function(){return n(38977)}])}},e=>{e.O(0,[324,815,665,576,569,499,808,127,638,530,636,593,792],()=>e(e.s=72210)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[95],{2232:(e,r,t)=>{"use strict";t.r(r),t.d(r,{default:()=>H});var s=t(65321),l=t(97109),a=t(1873),n=t.n(a),o=t(43220),c=t.n(o),i=t(86109),d=t(33442),x=t(14932),m=t(85114),h=t(85493),u=t(48318),p=t(75174),j=t(57271),g=t(42700),v=t(84253),y=t(68787),f=t(11702),b=t(76506),w=t(58569),N=t(7576),C=t(99271),A=t(37510),S=t(47210),k=t(99811),z=t(6578);let T={whiteSpace:"pre-wrap",overflowWrap:"anywhere",margin:0,fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace",fontSize:12.5,lineHeight:1.75};function M(e){let{children:r,maxHeight:t=520}=e;return(0,s.jsx)("div",{className:"rounded-xl border border-[var(--borderColor)] bg-[var(--colorFillAlter)] px-3 py-2.5",style:{maxHeight:t,overflow:"auto"},children:r})}function R(e){let{zoom:r,onChange:t,viewportRef:l}=e,a=e=>Math.min(4,Math.max(.2,Math.round(100*e)/100));return(0,s.jsxs)(d.A,{size:4,align:"center",children:[(0,s.jsx)(x.A,{title:"缩小(Ctrl/⌘ + 滚轮同效)",children:(0,s.jsx)(m.Ay,{size:"small",icon:(0,s.jsx)(C.A,{}),"aria-label":"缩小",onClick:()=>t(a(r-.1))})}),(0,s.jsxs)("span",{className:"text-xs tabular-nums text-[var(--colorTextSecondary)] w-12 text-center",children:[Math.round(100*r),"%"]}),(0,s.jsx)(x.A,{title:"放大(Ctrl/⌘ + 滚轮同效)",children:(0,s.jsx)(m.Ay,{size:"small",icon:(0,s.jsx)(A.A,{}),"aria-label":"放大",onClick:()=>t(a(r+.1))})}),(0,s.jsx)(m.Ay,{size:"small",onClick:()=>{let e=l.current,s=null==e?void 0:e.firstElementChild;if(!e||!s)return;let n=s.clientWidth/r;n&&t(a((e.clientWidth-2)/n))},children:"适应宽度"}),(0,s.jsx)(m.Ay,{size:"small",disabled:1===r,onClick:()=>t(1),children:"原始比例"})]})}function F(e){let{zoom:r,viewportRef:t,children:l}=e;return(0,s.jsx)("div",{ref:t,className:"rounded-xl border border-[var(--borderColor)] bg-[var(--colorBgContainer)] p-2 overflow-auto",style:{maxHeight:"68vh"},children:1===r?l:(0,s.jsx)("div",{style:{zoom:r},children:l})})}function I(e){var r,t,l;let{block:a,parts:n}=e;if("undefined"==typeof DOMParser)return(0,s.jsx)(M,{children:(0,s.jsx)("pre",{style:T,children:a.text})});let o=null!=(l=null==(r=/<[^!?][^>]*?\s([^>]*)>/u.exec(null!=(t=n[a.part])?t:""))?void 0:r[1])?l:'xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main"',c=new DOMParser().parseFromString("<root ".concat(o,">").concat(a.xml,"</root>"),"application/xml"),i=c.documentElement.firstElementChild;if(!i||c.querySelector("parsererror"))return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(h.A,{type:"warning",message:"表格XML显示未完成,保留原文及结构供核查"}),(0,s.jsx)(M,{children:(0,s.jsx)("pre",{style:T,children:a.text})})]});let d=[...i.children].filter(e=>"tr"===e.localName).map(e=>{let r=0;return[...e.children].filter(e=>"tc"===e.localName).map(e=>{var t,s,l;let a=Number(null!=(s=null==(t=e.getElementsByTagName("w:gridSpan")[0])?void 0:t.getAttribute("w:val"))?s:1),n=e.getElementsByTagName("w:vMerge")[0],o={column:r,span:a,merge:n?null!=(l=n.getAttribute("w:val"))?l:"continue":void 0,text:[...e.getElementsByTagName("w:t")].map(e=>{var r;return null!=(r=e.textContent)?r:""}).join("")};return r+=a,o})});return(0,s.jsx)("table",{className:"w-full border-collapse my-3 text-sm",children:(0,s.jsx)("tbody",{children:d.map((e,r)=>(0,s.jsx)("tr",{className:"even:bg-[var(--colorFillAlter)]",children:e.filter(e=>"continue"!==e.merge).map(e=>{var t,l;let a=1;if("restart"===e.merge)for(;(null==(l=d[r+a])||null==(t=l.find(r=>r.column===e.column))?void 0:t.merge)==="continue";)a++;return(0,s.jsx)("td",{className:"border border-[var(--borderColor)] p-2 align-top whitespace-pre-wrap",colSpan:e.span,rowSpan:a,children:e.text},e.column)})},r))})})}function P(e){let{sheet:r,zoom:t,viewportRef:a}=e,[n,o]=(0,l.useState)(1),[c,i]=(0,l.useState)(1),d=r.cells.reduce((e,r)=>Math.max(e,r.row),r.merges.reduce((e,r)=>Math.max(e,r.endRow),1)),x=r.cells.reduce((e,r)=>Math.max(e,r.col),r.merges.reduce((e,r)=>Math.max(e,r.endCol),1)),m=(0,l.useMemo)(()=>new Map(r.cells.map(e=>["".concat(e.row,":").concat(e.col),e])),[r]),h=(n-1)*50+1,j=Math.min(d,h+49),g=Math.min(x,c+19);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3 mb-3 text-xs text-[var(--colorTextSecondary)]",children:[(0,s.jsx)("span",{children:"原工作表物理坐标;公式使用已保存缓存值"}),(0,s.jsxs)("span",{className:"inline-flex items-center gap-2",children:["起始列 ",(0,s.jsx)(u.A,{size:"small",min:1,max:x,value:c,onChange:e=>i(null!=e?e:1)})]})]}),(0,s.jsx)(F,{zoom:t,viewportRef:a,children:(0,s.jsxs)("table",{className:"border-collapse text-xs",children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{className:"border border-[var(--borderColor)] bg-[var(--colorFillSecondary)] px-2 py-1 sticky top-0 left-0 z-[2]",children:"行"}),Array.from({length:g-c+1},(e,r)=>(0,s.jsxs)("th",{className:"border border-[var(--borderColor)] bg-[var(--colorFillSecondary)] px-2 py-1 sticky top-0 z-[1] min-w-24",children:["C",c+r]},r))]})}),(0,s.jsx)("tbody",{children:Array.from({length:j-h+1},(e,t)=>{let l=h+t;return(0,s.jsxs)("tr",{className:"even:bg-[var(--colorFillAlter)]",children:[(0,s.jsxs)("th",{className:"border border-[var(--borderColor)] bg-[var(--colorFillSecondary)] px-2 py-1 text-[var(--colorTextSecondary)] sticky left-0 z-[1]",children:["R",l]}),Array.from({length:g-c+1},(e,t)=>{var a,n,o;let i=c+t,d=m.get("".concat(l,":").concat(i)),x=r.merges.find(e=>l>=e.startRow&&l<=e.endRow&&i>=e.startCol&&i<=e.endCol);if(x&&(l!==Math.max(h,x.startRow)||i!==Math.max(c,x.startCol)))return null;let u=x?m.get("".concat(x.startRow,":").concat(x.startCol)):d,p=null!=(a=null==u?void 0:u.display)?a:"";return(0,s.jsxs)("td",{className:"border border-[var(--borderColor)] px-2 py-1 whitespace-pre-wrap align-top ".concat("number"==typeof p||"string"==typeof p&&/^-?[\d,]+(\.\d+)?$/u.test(p.trim())?"text-right tabular-nums":""," ").concat(""===p?"bg-[var(--colorFillQuaternary)]":""),rowSpan:x?Math.min(j,x.endRow)-Math.max(h,x.startRow)+1:1,colSpan:x?Math.min(g,x.endCol)-Math.max(c,x.startCol)+1:1,title:"".concat(null!=(n=null==u?void 0:u.address)?n:"R".concat(l,"C").concat(i),"\n原值: ").concat(String(null!=(o=null==u?void 0:u.value)?o:"")).concat((null==u?void 0:u.formula)?"\n公式: =".concat(u.formula):""),children:[p,(null==u?void 0:u.formula)&&(0,s.jsxs)("div",{className:"text-[10px] text-[var(--colorTextTertiary)]",children:["=",u.formula]})]},i)})]},l)})})]})}),(0,s.jsx)("div",{className:"mt-3 flex justify-end",children:(0,s.jsx)(p.A,{size:"small",current:n,pageSize:50,total:d,showSizeChanger:!1,onChange:o})})]})}function E(e){let{frameIds:r,endpoint:t,zoom:a,viewportRef:o}=e,[c,i]=(0,l.useState)(0),[d,x]=(0,l.useState)(""),[m,u]=(0,l.useState)(),[p,y]=(0,l.useState)(""),[f,b]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{let e=!0;x(""),y(""),u(void 0);let s=r[c];if(s)return b(!0),(0,z.x6)("".concat(t,"&frame=").concat(encodeURIComponent(s),"&format=json")).then(r=>{e&&(x(r.image),u(r.receipt))}).catch(r=>{e&&y(String(r))}).finally(()=>{e&&b(!1)}),()=>{e=!1}},[c,r,t]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"mb-3 flex flex-wrap items-center gap-3",children:[(0,s.jsx)(j.A,{size:"small",className:"min-w-64",value:c,onChange:i,options:r.map((e,r)=>({value:r,label:e}))}),(0,s.jsx)("span",{className:"text-xs text-[var(--colorTextSecondary)]",children:"显示实际库内实体与块实例;绘制限制不等同数据丢失。"})]}),(0,s.jsxs)(g.A,{spinning:f,children:[p&&(0,s.jsx)(h.A,{type:"warning",message:"图框显示未完成",description:"".concat(p,";请区分已入库结构和绘制能力,已有库内文字仍可读取。")}),d?(0,s.jsx)(F,{zoom:a,viewportRef:o,children:(0,s.jsx)("div",{className:"bg-white inline-block p-2",children:(0,s.jsx)(n(),{unoptimized:!0,width:2400,height:1800,src:d,alt:"已解析CAD图框",style:{width:"100%",height:"auto",display:"block"}})})}):!f&&!p&&(0,s.jsx)(v.A,{description:"尚未识别到可显示图框"}),void 0!==m&&(0,s.jsxs)("details",{className:"mt-3",children:[(0,s.jsx)("summary",{className:"text-xs cursor-pointer text-[var(--colorTextSecondary)]",children:"本次绘制回执与限制"}),(0,s.jsx)(M,{maxHeight:260,children:(0,s.jsx)("pre",{style:T,children:JSON.stringify(m,null,2)})})]})]})]})}function _(e){let{structure:r,endpoint:t,zoom:a,viewportRef:o}=e,[c,i]=(0,l.useState)(0);if(r.spreadsheet){let e=r.spreadsheet.sheets;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"mb-3",children:(0,s.jsx)(j.A,{size:"small",className:"min-w-64",value:c,options:e.map((e,r)=>({value:r,label:e.name})),onChange:i})}),e[c]&&(0,s.jsx)(P,{sheet:e[c],zoom:a,viewportRef:o},c)]})}if(r.docx)return(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(F,{zoom:a,viewportRef:o,children:(0,s.jsxs)("div",{className:"mx-auto",style:{maxWidth:860},children:[r.docx.blocks.map(e=>(0,s.jsxs)("div",{id:e.id,className:"mb-4",children:[(0,s.jsxs)("div",{className:"mb-1 text-[10px] text-[var(--colorTextTertiary)]",children:[e.part," \xb7 第 ",e.index+1," 块"]}),"table"===e.kind?(0,s.jsx)(I,{block:e,parts:r.docx.parts}):(0,s.jsx)("p",{className:e.headingLevel?"font-semibold text-lg whitespace-pre-wrap mt-2":"whitespace-pre-wrap leading-8 text-sm",children:e.text}),(0,s.jsxs)("details",{children:[(0,s.jsx)("summary",{className:"text-xs cursor-pointer text-[var(--colorTextTertiary)]",children:"来源 XML"}),(0,s.jsx)(M,{maxHeight:260,children:(0,s.jsx)("pre",{style:T,children:e.xml})})]})]},e.id)),r.docx.images.map(e=>(0,s.jsxs)("div",{className:"mb-4",children:[(0,s.jsx)("div",{className:"mb-1 text-xs text-[var(--colorTextSecondary)]",children:e.name}),/^image\/(?:png|jpeg|gif|webp|svg\+xml|bmp)$/u.test(e.mediaType)?(0,s.jsx)(n(),{unoptimized:!0,width:1200,height:900,src:"".concat(t,"&image=").concat(encodeURIComponent(e.name)),alt:e.name,style:{maxWidth:"100%",height:"auto"}}):(0,s.jsx)(h.A,{type:"info",message:"已保留".concat(e.mediaType,"图片数据,浏览器未声明支持显示")})]},e.name))]})})});if(r.pdf){var d,x,m,u;let e=r.pdf.pages,t=e[c],l=null!=(x=null!=(d=null==t?void 0:t.width)?d:null==t?void 0:t.glyphs.reduce((e,r)=>Math.max(e,r.x+r.width+20),600))?x:600,n=null!=(u=null!=(m=null==t?void 0:t.height)?m:null==t?void 0:t.glyphs.reduce((e,r)=>Math.max(e,r.y+r.height+20),800))?u:800;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"mb-3 flex flex-wrap items-center justify-between gap-3",children:[(0,s.jsx)("span",{className:"text-xs text-[var(--colorTextSecondary)]",children:"显示库内已保存文字与位置;可选原版本对照不影响本页及后续生成。"}),(0,s.jsx)(p.A,{size:"small",current:c+1,pageSize:1,total:e.length,showSizeChanger:!1,onChange:e=>i(e-1)})]}),t&&(0,s.jsxs)(F,{zoom:a,viewportRef:o,children:[(0,s.jsx)("div",{className:"mx-auto bg-white shadow-sm border border-[var(--borderColor)]",style:{width:l},children:(0,s.jsx)("svg",{viewBox:"0 0 ".concat(l," ").concat(n),width:"100%",role:"img","aria-label":"解析第".concat(t.page,"页"),children:t.glyphs.map(e=>(0,s.jsx)("text",{x:e.x,y:n-e.y,fontSize:Math.max(6,e.height),children:e.str},e.id))})}),t.ocrText&&(0,s.jsxs)("div",{className:"mt-3",children:[(0,s.jsx)("div",{className:"mb-1 text-xs text-[var(--colorTextSecondary)]",children:"该页 OCR 文本"}),(0,s.jsx)(M,{maxHeight:260,children:(0,s.jsx)("pre",{style:T,children:t.ocrText})})]}),!t.glyphs.length&&!t.ocrText&&(0,s.jsx)(v.A,{description:"该页没有可展示文字,不能据此断言原页为空"})]})]})}return r.cad?(0,s.jsx)(E,{frameIds:r.cad.frameIds,endpoint:t,zoom:a,viewportRef:o}):(0,s.jsx)(v.A,{description:"此解析结果尚无结构显示适配,完整解析文字仍可查看"})}function H(){var e;let r=(0,i.useRouter)(),t="string"==typeof r.query.relativePath?r.query.relativePath:"",a="string"==typeof r.query.projectRoot?r.query.projectRoot:"",[n,o]=(0,l.useState)(),[x,u]=(0,l.useState)(""),[j,C]=(0,l.useState)(!1),[A,F]=(0,l.useState)(""),[I,P]=(0,l.useState)(1),E=(0,l.useRef)(null),H=(0,l.useRef)(0),W=new URLSearchParams({relativePath:t,...a?{projectRoot:a}:{}}),O="/api/kb/files/source-preview?".concat(W),B="".concat(O).concat((null==n?void 0:n.status)==="recorded"?"&snapshotId=".concat(n.identity.snapshotId):""),q=(0,l.useCallback)(async e=>{let r=++H.current;C(!0),u("");try{let t=await (0,z.x6)(e);r===H.current&&o(t)}catch(e){r===H.current&&u(e instanceof Error?e.message:String(e))}finally{r===H.current&&C(!1)}},[]);(0,l.useEffect)(()=>{o(void 0),t&&q(O)},[t,O,q]);let D=e=>{(e.ctrlKey||e.metaKey)&&(e.preventDefault(),P(r=>Math.min(4,Math.max(.2,Math.round((r-.1*Math.sign(e.deltaY))*100)/100))))},L=null==n?void 0:n.pdfCoverage,U=L&&"complete"!==L.status?(0,s.jsx)(h.A,{showIcon:!0,type:"warning",message:"unmeasured"===L.status?"PDF 页覆盖未记录":"PDF 页覆盖不完整",description:(0,s.jsxs)(d.A,{direction:"vertical",size:2,children:[L.pageCount?(0,s.jsx)("span",{children:"已处理页:".concat(L.processedPages,"/").concat(L.pageCount)}):(0,s.jsx)("span",{children:'没有记录到声明页数,无法据此断言"处理了几页"。'}),L.missingPages.length>0&&(0,s.jsx)("span",{children:"缺少页:".concat(L.missingPages.join(", "))}),L.failedPages.length>0&&(0,s.jsx)("span",{children:"失败页:".concat(L.failedPages.join(", "))}),(0,s.jsx)("span",{children:"这条读数只说明解析侧处理了哪些页,不证明内容、版式或专业采用正确。"})]}),className:"mt-3"}):null;return(0,s.jsxs)("div",{className:"space-y-5 animateFadeIn",children:[(0,s.jsx)("div",{className:"bg-[var(--colorBgContainer)] rounded-2xl border border-[var(--borderColor)] p-6",children:(0,s.jsxs)("div",{className:"flex flex-col md:flex-row md:items-center justify-between gap-4",children:[(0,s.jsxs)("div",{className:"flex items-center min-w-0",children:[(0,s.jsxs)(c(),{href:"/knowledge/file-detail?".concat(W),className:"mr-4 text-sm text-[var(--colorTextSecondary)] hover:text-[var(--colorText)] inline-flex items-center gap-1 shrink-0",children:[(0,s.jsx)(S.A,{})," 返回切片详情"]}),(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("h1",{className:"text-2xl font-bold text-[var(--colorText)] mb-1",children:"解析核查预览"}),(0,s.jsx)("p",{className:"text-sm text-[var(--colorTextSecondary)] m-0 break-all",children:t})]})]}),(0,s.jsxs)(d.A,{wrap:!0,className:"shrink-0",children:[(0,s.jsx)(R,{zoom:I,onChange:P,viewportRef:E}),(0,s.jsx)(m.Ay,{size:"small",icon:(0,s.jsx)(k.A,{}),onClick:()=>{q(O)},loading:j,children:"刷新"})]})]})}),x&&(0,s.jsx)(h.A,{type:"error",message:x}),(0,s.jsx)(g.A,{spinning:j,children:(null==n?void 0:n.status)==="not-recorded"?(0,s.jsxs)(y.A,{className:"rounded-2xl border-[var(--borderColor)]",children:[(0,s.jsx)(h.A,{type:"warning",message:"独立解析底稿尚未记录",description:n.reason}),U,(0,s.jsx)(m.Ay,{className:"mt-4",onClick:()=>{(async()=>{try{await (0,z.HC)(t,a||void 0),u("重新解析任务已提交,请在处理完成后刷新本页。")}catch(e){u(String(e))}})()},children:"重新解析此文件"}),(0,s.jsx)("p",{className:"mt-4 mb-2 text-sm text-[var(--colorTextSecondary)]",children:"当前实际库内切片(不是独立底稿):"}),n.chunks.map(e=>(0,s.jsxs)("div",{className:"my-3",children:[(0,s.jsxs)(f.A,{children:["切片 ",e.chunkIndex]}),(0,s.jsx)(M,{children:(0,s.jsx)("pre",{style:T,children:e.content})})]},e.id)),(0,s.jsx)("div",{className:"mt-3 flex justify-end",children:(0,s.jsx)(p.A,{current:Math.floor(n.offset/30)+1,pageSize:30,total:n.totalChunks,showSizeChanger:!1,onChange:e=>{q("".concat(O,"&offset=").concat((e-1)*30))}})})]}):(null==n?void 0:n.status)==="recorded"?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(y.A,{className:"rounded-2xl border-[var(--borderColor)] mb-5",children:[(0,s.jsxs)(b.A,{size:"small",column:{xxl:3,xl:3,lg:2,md:1,sm:1,xs:1},bordered:!0,styles:{label:{width:"120px",background:"var(--colorFillAlter)",color:"var(--colorTextSecondary)"}},children:[(0,s.jsx)(b.A.Item,{label:"原文件SHA256",children:(0,s.jsx)("span",{className:"break-all text-xs",children:n.identity.sourceHash})}),(0,s.jsx)(b.A.Item,{label:"解析版本",children:(0,s.jsx)("span",{className:"text-xs",children:n.identity.parserVersion})}),(0,s.jsx)(b.A.Item,{label:"解析身份",children:(0,s.jsx)("span",{className:"break-all text-xs",children:n.identity.snapshotId})})]}),(0,s.jsx)(h.A,{className:"mt-3",type:"verified"===n.conservation.status&&n.conservation.chunkCountMatches&&!n.conservation.staleChunkIdentities.length?"success":"error",message:"文本覆盖:".concat(n.conservation.coveredNonWhitespaceChars,"/").concat(n.conservation.sourceNonWhitespaceChars,";实际切片:").concat(n.totalChunks),description:"这项检查只证明独立解析文字与切片的内容覆盖,不证明原文件解析、版式、工程理解或专业采用全部正确。"}),U,n.identity.limitations.map(e=>(0,s.jsx)("p",{className:"mt-2 mb-0 text-xs text-[var(--colorTextSecondary)]",children:e},e)),(0,s.jsxs)(d.A,{className:"mt-3",wrap:!0,children:[(0,s.jsx)(m.Ay,{size:"small",href:"".concat(B,"&original=1"),target:"_blank",children:"查看/下载入库原版本"}),(0,s.jsx)(m.Ay,{size:"small",onClick:()=>{(0,z.tn)(t,"source-version",a||void 0).catch(e=>u("可选原版本对照不可用:".concat(String(e),";库内数据仍可读取")))},children:"本机打开入库原版本"})]})]}),(0,s.jsx)(w.A,{className:"documents-tabs",items:[{key:"structure",label:"解析结构",children:(0,s.jsx)(y.A,{className:"rounded-2xl border-[var(--borderColor)]",onWheelCapture:D,children:(0,s.jsx)(_,{structure:n.structure,endpoint:B,zoom:I,viewportRef:E},n.identity.snapshotId)})},{key:"text",label:"独立解析全文",children:(0,s.jsx)(y.A,{className:"rounded-2xl border-[var(--borderColor)]",onWheelCapture:D,children:(0,s.jsx)(M,{maxHeight:640,children:(0,s.jsx)("pre",{style:{...T,zoom:I},children:n.text})})})},{key:"chunks",label:"实际切片重组",children:(0,s.jsxs)(y.A,{className:"rounded-2xl border-[var(--borderColor)]",children:[(0,s.jsxs)("p",{className:"text-xs text-[var(--colorTextSecondary)]",children:["当前展示切片 ",n.offset+1," 至 ",n.offset+n.chunks.length,",共 ",n.totalChunks," 块;分页不代表其余内容不存在。"]}),n.chunks.map(e=>(0,s.jsxs)("div",{className:"my-4",children:[(0,s.jsxs)(d.A,{size:4,wrap:!0,children:[(0,s.jsxs)(f.A,{children:["切片 ",e.chunkIndex]}),e.sectionTitle?(0,s.jsx)(f.A,{color:"cyan",children:e.sectionTitle}):null]}),(0,s.jsx)("div",{className:"mt-2",children:(0,s.jsx)(M,{children:(0,s.jsx)("pre",{style:T,children:e.content})})}),(0,s.jsxs)("details",{className:"mt-2",children:[(0,s.jsx)("summary",{className:"text-xs cursor-pointer text-[var(--colorTextTertiary)]",children:"库内解析底稿区间"}),(0,s.jsx)(M,{maxHeight:240,children:(0,s.jsx)("pre",{style:T,children:JSON.stringify(e.sourceSpans,null,2)})})]})]},e.id)),(0,s.jsx)("div",{className:"mt-3 flex justify-end",children:(0,s.jsx)(p.A,{current:Math.floor(n.offset/30)+1,pageSize:30,total:n.totalChunks,showSizeChanger:!1,onChange:e=>{q("".concat(B,"&offset=").concat((e-1)*30))}})})]})},{key:"issues",label:"覆盖与来源问题",children:(0,s.jsx)(y.A,{className:"rounded-2xl border-[var(--borderColor)]",children:(0,s.jsx)(M,{maxHeight:640,children:(0,s.jsx)("pre",{style:T,children:JSON.stringify(n.conservation,null,2)})})})},{key:"retrieval",label:"本地定位回放",children:(0,s.jsxs)(y.A,{className:"rounded-2xl border-[var(--borderColor)]",children:[(0,s.jsx)(N.A.Search,{value:A,onChange:e=>F(e.target.value),onSearch:e=>{q("".concat(B,"&q=").concat(encodeURIComponent(e)))},enterButton:"定位",loading:j}),(0,s.jsx)("p",{className:"my-3 text-xs text-[var(--colorTextSecondary)]",children:"只在此文件内执行本地关键词检索,不调用模型;零命中不证明资料不存在,也不等于向量或规划验收通过。"}),null==(e=n.retrieval)?void 0:e.results.map(e=>(0,s.jsxs)("div",{className:"my-3",children:[(0,s.jsxs)(f.A,{children:["切片 ",e.chunkIndex]}),(0,s.jsx)("div",{className:"mt-2",children:(0,s.jsx)(M,{children:(0,s.jsx)("pre",{style:T,children:e.content})})})]},e.id)),n.retrieval&&!n.retrieval.results.length&&(0,s.jsx)(v.A,{description:"本次关键词未命中,请核对原文、对象名称及其他检索方式"})]})}]})]}):!j&&(0,s.jsx)(v.A,{description:"选择文件后查看解析结果"})})]})}},59528:(e,r,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/knowledge/source-preview",function(){return t(2232)}])}},e=>{e.O(0,[324,815,665,576,569,499,787,808,318,781,636,593,792],()=>e(e.s=59528)),_N_E=e.O()}]);
|