@gientech/modual 2.2.46 → 2.2.48

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.
@@ -0,0 +1,757 @@
1
+ import{jsx as k,jsxs as te,Fragment as qn}from"react/jsx-runtime";import*as L from"react";import ye,{createElement as Aa,PureComponent as vc,useState as ue,useMemo as Te,createContext as da,Children as xc,cloneElement as gc,Component as mc,useRef as We,useEffect as $e,useContext as Fr,version as yc,isValidElement as Cc,useLayoutEffect as bc,useCallback as Kt}from"react";import Mt from"axios";import{AiChat as Ec,validateFileUpload as Fc,showValidationErrors as wc}from"@mxmweb/aichat";import{mergeLiveChunkToNodes as Ac,ChatMessageAdapter as ls}from"@mxmweb/rtext";import{Dropdown as Bc,Input as vu,Popover as Sc,message as lt,Skeleton as Qn,Button as yr,ConfigProvider as fa,Modal as ea,Form as cs,Table as Dc,Pagination as _c,Empty as kc,Tooltip as Pn,Drawer as xu,Select as gu,DatePicker as Rc}from"antd";import{u as br}from"./index-CpW6Dhpp.js";import{Icon as mu,defaultTheme as Hn,useTheme as Lo,deepMergeTheme as yn,DashboardContainer as yu,DeptUserSelector as Tc}from"@mxmweb/zui";import{_ as $o,a as Tt,b as Se,w as Br,c as Pe,d as It,e as Pt,f as H,h as Cu,i as Za,j as Ic,k as xe,l as Pc,m as Lr,n as J,o as me,u as vn,r as bu,p as Nc,q as Oc,s as Mc,t as Lc,F as Rt,v as ta,x as Ba,y as Sa,z as wn,A as Mr,B as Er,I as $c,C as Xr,D as Lt,E as An,g as Eu,G as zc,H as Da}from"./index-_mBM2P0I.js";import gr from"dayjs";import{c as Yr}from"./createLucideIcon-Bj5DlX2s.js";import{P as qc}from"./plus-B679mjyt.js";import{S as ra}from"./search-CEuIa9-_.js";import{X as zo}from"./x-CdZQbi--.js";import*as Hc from"react-dom";import ds,{createPortal as Vc}from"react-dom";import{f as jc,r as Uc,a as Wc,c as Kc,B as Gc,z as Xc,d as Fu,g as wu,b as Au,e as Ja,h as qo,i as eo,D as Yc,j as Qc,T as na,k as _a,l as Zc,m as Jc,n as ed,o as td,G as rd,p as nd,W as id,q as Bu,s as ad,t as od,u as sd,F as ud,v as fs,w as ka,x as Ra,y as ld,A as cd,E as dd,H as fd,I as pd}from"./index-B8QsSOoh.js";import{a as hd,C as vd,G as Su}from"./GientechStreamReader-_ih9ja1B.js";/* empty css *//* empty css */import"@mxmweb/fviewer";import"../database.js";import"../databaseId.js";import"../databaseTable.js";import"../modelManage.js";import"../sensitive.js";import Je from"styled-components";import{Xviwer as to}from"@mxmweb/xviewer";import"./index-CVBBj_Pf.js";/**
2
+ * @license lucide-react v0.456.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const xd=Yr("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/**
7
+ * @license lucide-react v0.456.0 - ISC
8
+ *
9
+ * This source code is licensed under the ISC license.
10
+ * See the LICENSE file in the root directory of this source tree.
11
+ */const gd=Yr("History",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/**
12
+ * @license lucide-react v0.456.0 - ISC
13
+ *
14
+ * This source code is licensed under the ISC license.
15
+ * See the LICENSE file in the root directory of this source tree.
16
+ */const md=Yr("OctagonX",[["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
17
+ * @license lucide-react v0.456.0 - ISC
18
+ *
19
+ * This source code is licensed under the ISC license.
20
+ * See the LICENSE file in the root directory of this source tree.
21
+ */const yd=Yr("Pen",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]);/**
22
+ * @license lucide-react v0.456.0 - ISC
23
+ *
24
+ * This source code is licensed under the ISC license.
25
+ * See the LICENSE file in the root directory of this source tree.
26
+ */const Du=Yr("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
27
+ * @license lucide-react v0.456.0 - ISC
28
+ *
29
+ * This source code is licensed under the ISC license.
30
+ * See the LICENSE file in the root directory of this source tree.
31
+ */const Cd=Yr("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
32
+ * @license lucide-react v0.456.0 - ISC
33
+ *
34
+ * This source code is licensed under the ISC license.
35
+ * See the LICENSE file in the root directory of this source tree.
36
+ */const bd=Yr("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]),Ed=t=>L.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},L.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8 14.6666C11.6819 14.6666 14.6667 11.6819 14.6667 7.99998C14.6667 4.31808 11.6819 1.33331 8 1.33331C4.3181 1.33331 1.33334 4.31808 1.33334 7.99998C1.33334 11.6819 4.3181 14.6666 8 14.6666Z",stroke:"currentColor",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"}),L.createElement("path",{d:"M1.33334 8H14.6667",stroke:"currentColor",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"}),L.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8 14.6666C9.47277 14.6666 10.6667 11.6819 10.6667 7.99998C10.6667 4.31808 9.47277 1.33331 8 1.33331C6.52724 1.33331 5.33334 4.31808 5.33334 7.99998C5.33334 11.6819 6.52724 14.6666 8 14.6666Z",stroke:"currentColor",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"}),L.createElement("path",{d:"M3.28597 3.38068C4.4924 4.58711 6.15907 5.33331 8 5.33331C9.84097 5.33331 11.5076 4.58711 12.7141 3.38068",stroke:"currentColor",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"}),L.createElement("path",{d:"M12.7141 12.6193C11.5076 11.4129 9.84097 10.6667 8 10.6667C6.15907 10.6667 4.4924 11.4129 3.28597 12.6193",stroke:"currentColor",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"})),Fd=t=>L.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},L.createElement("path",{d:"M1.73633 1.57642C2.53848 0.774265 3.74473 0.714862 4.87207 1.03052C6.02182 1.35245 7.24885 2.09683 8.3125 3.1604C9.37624 4.22414 10.1204 5.45195 10.4424 6.60181C10.758 7.72909 10.6986 8.93446 9.89648 9.73657C9.09439 10.5387 7.88901 10.5981 6.76172 10.2825C5.61186 9.96051 4.38405 9.21632 3.32031 8.15259C2.25674 7.08894 1.51236 5.86191 1.19043 4.71216C0.874775 3.58481 0.934176 2.37857 1.73633 1.57642Z",stroke:"#4E6EF2",strokeWidth:1.3,strokeLinecap:"round",strokeLinejoin:"round"}),L.createElement("path",{d:"M6.76172 5.41479C7.88883 5.09929 9.09442 5.15888 9.89648 5.96069C10.6986 6.76284 10.758 7.96909 10.4424 9.09644C10.1204 10.2462 9.37617 11.4732 8.3125 12.5369C7.24882 13.6005 6.02187 14.3448 4.87207 14.6667C3.74472 14.9824 2.53848 14.923 1.73633 14.1208C0.934528 13.3188 0.874922 12.1132 1.19043 10.9861C1.51239 9.83623 2.25659 8.60841 3.32031 7.54468C4.38405 6.48096 5.61186 5.73675 6.76172 5.41479Z",stroke:"#4E6EF2",strokeWidth:1.3,strokeLinecap:"round",strokeLinejoin:"round"}),L.createElement("path",{d:"M11.1282 1.03052C12.2553 0.715012 13.4609 0.774612 14.263 1.57642C15.0651 2.37857 15.1246 3.58481 14.8089 4.71216C14.4869 5.86196 13.7427 7.08892 12.679 8.15259C11.6153 9.21627 10.3884 9.96048 9.23859 10.2825C8.11124 10.5981 6.90499 10.5387 6.10284 9.73657C5.30106 8.9345 5.24144 7.72892 5.55695 6.60181C5.8789 5.45195 6.62311 4.22414 7.68683 3.1604C8.75056 2.09668 9.97838 1.35248 11.1282 1.03052Z",stroke:"#4E6EF2",strokeWidth:1.3,strokeLinecap:"round",strokeLinejoin:"round"}),L.createElement("path",{d:"M6.10284 5.96069C6.90499 5.15855 8.11124 5.09914 9.23859 5.41479C10.3883 5.73673 11.6154 6.48111 12.679 7.54468C13.7427 8.60841 14.4869 9.83623 14.8089 10.9861C15.1245 12.1134 15.0651 13.3188 14.263 14.1208C13.4609 14.9229 12.2555 14.9823 11.1282 14.6667C9.97838 14.3448 8.75055 13.6006 7.68683 12.5369C6.62325 11.4732 5.87888 10.2462 5.55695 9.09644C5.24129 7.96909 5.3007 6.76284 6.10284 5.96069Z",stroke:"#4E6EF2",strokeWidth:1.3,strokeLinecap:"round",strokeLinejoin:"round"})),nn={actions:[{name:"upload",icon:k(mu,{type:"wenda/shangchuanwenjian",color:"#000",size:20}),tip:"\u6587\u4EF6\u4E0A\u4F20"}],switchs:[{label:"\u8054\u7F51\u641C\u7D22",name:"netSearch",type:"switch",defaultValue:!1,enabled:!0,icon:k(Ed,{width:16,height:16,className:"aichat-netsearch-icon",style:{color:"#4B8CF7"}})},{label:"\u6DF1\u5EA6\u601D\u8003",name:"reasoning",type:"switch",defaultValue:!0,enabled:!0,icon:k(Fd,{width:16,height:16})}]},Ho={sidebar:{newChat:"\u65B0\u5EFA\u5BF9\u8BDD",newConversation:"\u65B0\u5EFA\u4F1A\u8BDD",unnamedSession:"\u672A\u547D\u540D\u4F1A\u8BDD",noAssistant:"\u672A\u9009\u62E9\u52A9\u624B",searchPlaceholder:"\u641C\u7D22\u5386\u53F2\u8BB0\u5F55",search:"\u641C\u7D22",rename:"\u91CD\u547D\u540D",delete:"\u5220\u9664"},welcome:{defaultPrologue:"\u60A8\u597D\uFF0C\u6B22\u8FCE\u4F7F\u7528\u5C0F\u9CB8\u667A\u80FD\u95EE\u7B54",selectAssistant:"\u8BF7\u9009\u62E9\u4E00\u4E2A\u667A\u80FD\u52A9\u624B",searchAssistant:"\u641C\u7D22\u52A9\u624B\u540D\u79F0"},sender:{placeholder:"\u8F93\u5165\u95EE\u9898\u540E\u6309Enter\u53D1\u9001,Shift+Enter\u8FDB\u884C\u6362\u884C",netSearch:"\u8054\u7F51\u641C\u7D22",deepThinking:"\u6DF1\u5EA6\u601D\u8003",fileUpload:"\u6587\u4EF6\u4E0A\u4F20"},chatHeader:{newConversation:"\u65B0\u5BF9\u8BDD"},disclaimer:"\u5185\u5BB9\u7531AI\u751F\u6210\uFF0C\u4EC5\u4F9B\u53C2\u8003\uFF0C\u4E0D\u4EE3\u8868\u672C\u516C\u53F8\u89C2\u70B9\u3002"},wd={sidebar:{newChat:"New chat",newConversation:"New conversation",unnamedSession:"Unnamed",noAssistant:"No assistant",searchPlaceholder:"Search history",search:"Search",rename:"Rename",delete:"Delete"},welcome:{defaultPrologue:"Hello, welcome to Smart Q&A",selectAssistant:"Please select an assistant",searchAssistant:"Search assistants"},sender:{placeholder:"Type your question and press Enter to send, Shift+Enter for new line",netSearch:"Web search",deepThinking:"Deep thinking",fileUpload:"Upload file"},chatHeader:{newConversation:"New conversation"},disclaimer:"Content is AI-generated and for reference only."},Ad={sidebar:{newChat:"\u65B0\u898F\u4F1A\u8A71",newConversation:"\u65B0\u898F\u4F1A\u8A71",unnamedSession:"\u540D\u524D\u306A\u3057",noAssistant:"\u30A2\u30B7\u30B9\u30BF\u30F3\u30C8\u672A\u9078\u629E",searchPlaceholder:"\u5C65\u6B74\u3092\u691C\u7D22",search:"\u691C\u7D22",rename:"\u540D\u524D\u3092\u5909\u66F4",delete:"\u524A\u9664"},welcome:{defaultPrologue:"\u3053\u3093\u306B\u3061\u306F\u3001\u30B9\u30DE\u30FC\u30C8Q&A\u3078\u3088\u3046\u3053\u305D",selectAssistant:"\u30A2\u30B7\u30B9\u30BF\u30F3\u30C8\u3092\u9078\u629E\u3057\u3066\u304F\u3060\u3055\u3044",searchAssistant:"\u30A2\u30B7\u30B9\u30BF\u30F3\u30C8\u3092\u691C\u7D22"},sender:{placeholder:"\u8CEA\u554F\u3092\u5165\u529B\u3057\u3001Enter\u3067\u9001\u4FE1\u3001Shift+Enter\u3067\u6539\u884C",netSearch:"\u30CD\u30C3\u30C8\u691C\u7D22",deepThinking:"\u6DF1\u304F\u8003\u3048\u308B",fileUpload:"\u30D5\u30A1\u30A4\u30EB\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9"},chatHeader:{newConversation:"\u65B0\u898F\u4F1A\u8A71"},disclaimer:"AI\u306B\u3088\u308A\u751F\u6210\u3055\u308C\u305F\u5185\u5BB9\u3067\u3059\u3002\u53C2\u8003\u3068\u3057\u3066\u3054\u5229\u7528\u304F\u3060\u3055\u3044\u3002"},Bd={zh:Ho,en:wd,ja:Ad};function _u(t){return Bd[t]??Ho}const ku=ye.createContext({locale:"zh",messages:Ho});function pa(){return ye.useContext(ku)}function Sd({locale:t,children:r}){const e=ye.useMemo(()=>({locale:t,messages:_u(t)}),[t]);return ye.createElement(ku.Provider,{value:e},r)}function Dd(t,r){t.prototype=Object.create(r.prototype),t.prototype.constructor=t,$o(t,r)}var ps=Number.isNaN||function(r){return typeof r=="number"&&r!==r};function _d(t,r){return!!(t===r||ps(t)&&ps(r))}function kd(t,r){if(t.length!==r.length)return!1;for(var e=0;e<t.length;e++)if(!_d(t[e],r[e]))return!1;return!0}function Ta(t,r){r===void 0&&(r=kd);var e,n=[],i,a=!1;function o(){for(var s=[],c=0;c<arguments.length;c++)s[c]=arguments[c];return a&&e===this&&r(s,n)||(i=t.apply(this,s),a=!0,e=this,n=s),i}return o}var Rd=typeof performance=="object"&&typeof performance.now=="function",hs=Rd?function(){return performance.now()}:function(){return Date.now()};function vs(t){cancelAnimationFrame(t.id)}function Td(t,r){var e=hs();function n(){hs()-e>=r?t.call(null):i.id=requestAnimationFrame(n)}var i={id:requestAnimationFrame(n)};return i}var Ia=-1;function xs(t){if(t===void 0&&(t=!1),Ia===-1||t){var r=document.createElement("div"),e=r.style;e.width="50px",e.height="50px",e.overflow="scroll",document.body.appendChild(r),Ia=r.offsetWidth-r.clientWidth,document.body.removeChild(r)}return Ia}var an=null;function gs(t){if(t===void 0&&(t=!1),an===null||t){var r=document.createElement("div"),e=r.style;e.width="50px",e.height="50px",e.overflow="scroll",e.direction="rtl";var n=document.createElement("div"),i=n.style;return i.width="100px",i.height="100px",r.appendChild(n),document.body.appendChild(r),r.scrollLeft>0?an="positive-descending":(r.scrollLeft=1,r.scrollLeft===0?an="negative":an="positive-ascending"),document.body.removeChild(r),an}return an}var Id=150,Pd=function(r,e){return r};function Nd(t){var r,e=t.getItemOffset,n=t.getEstimatedTotalSize,i=t.getItemSize,a=t.getOffsetForIndexAndAlignment,o=t.getStartIndexForOffset,s=t.getStopIndexForStartIndex,c=t.initInstanceProps,u=t.shouldResetStyleCacheOnItemSizeChange,l=t.validateProps;return r=(function(x){Dd(f,x);function f(v){var p;return p=x.call(this,v)||this,p._instanceProps=c(p.props,Se(p)),p._outerRef=void 0,p._resetIsScrollingTimeoutId=null,p.state={instance:Se(p),isScrolling:!1,scrollDirection:"forward",scrollOffset:typeof p.props.initialScrollOffset=="number"?p.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},p._callOnItemsRendered=void 0,p._callOnItemsRendered=Ta(function(d,y,h,C){return p.props.onItemsRendered({overscanStartIndex:d,overscanStopIndex:y,visibleStartIndex:h,visibleStopIndex:C})}),p._callOnScroll=void 0,p._callOnScroll=Ta(function(d,y,h){return p.props.onScroll({scrollDirection:d,scrollOffset:y,scrollUpdateWasRequested:h})}),p._getItemStyle=void 0,p._getItemStyle=function(d){var y=p.props,h=y.direction,C=y.itemSize,b=y.layout,E=p._getItemStyleCache(u&&C,u&&b,u&&h),F;if(E.hasOwnProperty(d))F=E[d];else{var A=e(p.props,d,p._instanceProps),w=i(p.props,d,p._instanceProps),B=h==="horizontal"||b==="horizontal",g=h==="rtl",S=B?A:0;E[d]=F={position:"absolute",left:g?void 0:S,right:g?S:void 0,top:B?0:A,height:B?"100%":w,width:B?w:"100%"}}return F},p._getItemStyleCache=void 0,p._getItemStyleCache=Ta(function(d,y,h){return{}}),p._onScrollHorizontal=function(d){var y=d.currentTarget,h=y.clientWidth,C=y.scrollLeft,b=y.scrollWidth;p.setState(function(E){if(E.scrollOffset===C)return null;var F=p.props.direction,A=C;if(F==="rtl")switch(gs()){case"negative":A=-C;break;case"positive-descending":A=b-h-C;break}return A=Math.max(0,Math.min(A,b-h)),{isScrolling:!0,scrollDirection:E.scrollOffset<A?"forward":"backward",scrollOffset:A,scrollUpdateWasRequested:!1}},p._resetIsScrollingDebounced)},p._onScrollVertical=function(d){var y=d.currentTarget,h=y.clientHeight,C=y.scrollHeight,b=y.scrollTop;p.setState(function(E){if(E.scrollOffset===b)return null;var F=Math.max(0,Math.min(b,C-h));return{isScrolling:!0,scrollDirection:E.scrollOffset<F?"forward":"backward",scrollOffset:F,scrollUpdateWasRequested:!1}},p._resetIsScrollingDebounced)},p._outerRefSetter=function(d){var y=p.props.outerRef;p._outerRef=d,typeof y=="function"?y(d):y!=null&&typeof y=="object"&&y.hasOwnProperty("current")&&(y.current=d)},p._resetIsScrollingDebounced=function(){p._resetIsScrollingTimeoutId!==null&&vs(p._resetIsScrollingTimeoutId),p._resetIsScrollingTimeoutId=Td(p._resetIsScrolling,Id)},p._resetIsScrolling=function(){p._resetIsScrollingTimeoutId=null,p.setState({isScrolling:!1},function(){p._getItemStyleCache(-1,null)})},p}f.getDerivedStateFromProps=function(p,d){return Od(p,d),l(p),null};var m=f.prototype;return m.scrollTo=function(p){p=Math.max(0,p),this.setState(function(d){return d.scrollOffset===p?null:{scrollDirection:d.scrollOffset<p?"forward":"backward",scrollOffset:p,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},m.scrollToItem=function(p,d){d===void 0&&(d="auto");var y=this.props,h=y.itemCount,C=y.layout,b=this.state.scrollOffset;p=Math.max(0,Math.min(p,h-1));var E=0;if(this._outerRef){var F=this._outerRef;C==="vertical"?E=F.scrollWidth>F.clientWidth?xs():0:E=F.scrollHeight>F.clientHeight?xs():0}this.scrollTo(a(this.props,p,d,b,this._instanceProps,E))},m.componentDidMount=function(){var p=this.props,d=p.direction,y=p.initialScrollOffset,h=p.layout;if(typeof y=="number"&&this._outerRef!=null){var C=this._outerRef;d==="horizontal"||h==="horizontal"?C.scrollLeft=y:C.scrollTop=y}this._callPropsCallbacks()},m.componentDidUpdate=function(){var p=this.props,d=p.direction,y=p.layout,h=this.state,C=h.scrollOffset,b=h.scrollUpdateWasRequested;if(b&&this._outerRef!=null){var E=this._outerRef;if(d==="horizontal"||y==="horizontal")if(d==="rtl")switch(gs()){case"negative":E.scrollLeft=-C;break;case"positive-ascending":E.scrollLeft=C;break;default:var F=E.clientWidth,A=E.scrollWidth;E.scrollLeft=A-F-C;break}else E.scrollLeft=C;else E.scrollTop=C}this._callPropsCallbacks()},m.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&vs(this._resetIsScrollingTimeoutId)},m.render=function(){var p=this.props,d=p.children,y=p.className,h=p.direction,C=p.height,b=p.innerRef,E=p.innerElementType,F=p.innerTagName,A=p.itemCount,w=p.itemData,B=p.itemKey,g=B===void 0?Pd:B,S=p.layout,_=p.outerElementType,R=p.outerTagName,P=p.style,z=p.useIsScrolling,$=p.width,j=this.state.isScrolling,q=h==="horizontal"||S==="horizontal",Y=q?this._onScrollHorizontal:this._onScrollVertical,U=this._getRangeToRender(),M=U[0],N=U[1],O=[];if(A>0)for(var I=M;I<=N;I++)O.push(Aa(d,{data:w,key:g(I,w),index:I,isScrolling:z?j:void 0,style:this._getItemStyle(I)}));var V=n(this.props,this._instanceProps);return Aa(_||R||"div",{className:y,onScroll:Y,ref:this._outerRefSetter,style:Tt({position:"relative",height:C,width:$,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:h},P)},Aa(E||F||"div",{children:O,ref:b,style:{height:q?"100%":V,pointerEvents:j?"none":void 0,width:q?V:"100%"}}))},m._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered=="function"){var p=this.props.itemCount;if(p>0){var d=this._getRangeToRender(),y=d[0],h=d[1],C=d[2],b=d[3];this._callOnItemsRendered(y,h,C,b)}}if(typeof this.props.onScroll=="function"){var E=this.state,F=E.scrollDirection,A=E.scrollOffset,w=E.scrollUpdateWasRequested;this._callOnScroll(F,A,w)}},m._getRangeToRender=function(){var p=this.props,d=p.itemCount,y=p.overscanCount,h=this.state,C=h.isScrolling,b=h.scrollDirection,E=h.scrollOffset;if(d===0)return[0,0,0,0];var F=o(this.props,E,this._instanceProps),A=s(this.props,F,E,this._instanceProps),w=!C||b==="backward"?Math.max(1,y):1,B=!C||b==="forward"?Math.max(1,y):1;return[Math.max(0,F-w),Math.max(0,Math.min(d-1,A+B)),F,A]},f})(vc),r.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},r}var Od=function(r,e){r.children,r.direction,r.height,r.layout,r.innerTagName,r.outerTagName,r.width,e.instance},Md=50,dn=function(r,e,n){var i=r,a=i.itemSize,o=n.itemMetadataMap,s=n.lastMeasuredIndex;if(e>s){var c=0;if(s>=0){var u=o[s];c=u.offset+u.size}for(var l=s+1;l<=e;l++){var x=a(l);o[l]={offset:c,size:x},c+=x}n.lastMeasuredIndex=e}return o[e]},Ld=function(r,e,n){var i=e.itemMetadataMap,a=e.lastMeasuredIndex,o=a>0?i[a].offset:0;return o>=n?Ru(r,e,a,0,n):$d(r,e,Math.max(0,a),n)},Ru=function(r,e,n,i,a){for(;i<=n;){var o=i+Math.floor((n-i)/2),s=dn(r,o,e).offset;if(s===a)return o;s<a?i=o+1:s>a&&(n=o-1)}return i>0?i-1:0},$d=function(r,e,n,i){for(var a=r.itemCount,o=1;n<a&&dn(r,n,e).offset<i;)n+=o,o*=2;return Ru(r,e,Math.min(n,a-1),Math.floor(n/2),i)},ms=function(r,e){var n=r.itemCount,i=e.itemMetadataMap,a=e.estimatedItemSize,o=e.lastMeasuredIndex,s=0;if(o>=n&&(o=n-1),o>=0){var c=i[o];s=c.offset+c.size}var u=n-o-1,l=u*a;return s+l},zd=Nd({getItemOffset:function(r,e,n){return dn(r,e,n).offset},getItemSize:function(r,e,n){return n.itemMetadataMap[e].size},getEstimatedTotalSize:ms,getOffsetForIndexAndAlignment:function(r,e,n,i,a,o){var s=r.direction,c=r.height,u=r.layout,l=r.width,x=s==="horizontal"||u==="horizontal",f=x?l:c,m=dn(r,e,a),v=ms(r,a),p=Math.max(0,Math.min(v-f,m.offset)),d=Math.max(0,m.offset-f+m.size+o);switch(n==="smart"&&(i>=d-f&&i<=p+f?n="auto":n="center"),n){case"start":return p;case"end":return d;case"center":return Math.round(d+(p-d)/2);case"auto":default:return i>=d&&i<=p?i:i<d?d:p}},getStartIndexForOffset:function(r,e,n){return Ld(r,n,e)},getStopIndexForStartIndex:function(r,e,n,i){for(var a=r.direction,o=r.height,s=r.itemCount,c=r.layout,u=r.width,l=a==="horizontal"||c==="horizontal",x=l?u:o,f=dn(r,e,i),m=n+x,v=f.offset+f.size,p=e;p<s-1&&v<m;)p++,v+=dn(r,p,i).size;return p},initInstanceProps:function(r,e){var n=r,i=n.estimatedItemSize,a={itemMetadataMap:{},estimatedItemSize:i||Md,lastMeasuredIndex:-1};return e.resetAfterIndex=function(o,s){s===void 0&&(s=!0),a.lastMeasuredIndex=Math.min(a.lastMeasuredIndex,o-1),e._getItemStyleCache(-1),s&&e.forceUpdate()},a},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(r){r.itemSize}});function qd({isActive:t,isNew:r,isDisabled:e,data:n,eventsEmit:i,styles:a={},assistantList:o=[]}){const{messages:s}=pa(),[c,u]=ue(!1),l=(a==null?void 0:a.colors)||{},x=Te(()=>{const y=n==null?void 0:n.configId;if(!y||!o||o.length===0)return s.sidebar.noAssistant;const h=o.find(C=>String(C==null?void 0:C.id)===String(y));if(!h)return s.sidebar.noAssistant;if(h!=null&&h.name)return h.name;try{const C=typeof h.configJson=="string"?JSON.parse(h.configJson):h.configJson;return(C==null?void 0:C.config_name)||s.sidebar.noAssistant}catch{return s.sidebar.noAssistant}},[o,n==null?void 0:n.configId,s.sidebar.noAssistant]),f=[{key:"rename",icon:k(yd,{size:12}),label:s.sidebar.rename,onClick:y=>{y.domEvent.stopPropagation(),i&&i("conversations:rename_icon_clicked",n)}},{key:"delete",icon:k(Cd,{size:12}),label:s.sidebar.delete,danger:!0,onClick:y=>{y.domEvent.stopPropagation(),i&&i("conversations:delete_icon_clicked",n)}}],m=t?l.activeItemBg||"#f0f4ff":c?l.itemHoverBg||"#f5f7fa":l.itemBg||"transparent",v=t?l.activeItemText||l.primary||"#0122ff":l.itemText||"#333",p=t?l.activeItemBorder||l.primary||"#0122ff":"transparent",d=y=>{const h=gr(),C=gr(y);return h.isSame(C,"day")?C.format("HH:mm"):C.format("MM-DD HH:mm")};return te("div",{className:"flex relative items-center justify-between mb-2 px-4 py-3 rounded-md transition-colors cursor-pointer select-none",onClick:()=>!e&&i&&i("conversation:item_click",n),onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),style:{minHeight:48,background:m,color:v,border:`1px solid ${p}`,...a.item,opacity:e?.5:1},children:[te("div",{className:"flex flex-col gap-y-2 flex-1 min-w-0",children:[k("span",{className:"truncate text-sm max-w-[160px] font-medium",title:n.label||s.sidebar.unnamedSession,style:{color:v,fontSize:"14px",lineHeight:"1.4"},children:n.label||s.sidebar.unnamedSession}),te("div",{className:"flex items-center justify-between gap-2",children:[k("span",{className:"text-xs truncate flex-1",style:{color:t?l.activeItemTextSecondary||"#666":l.itemTextSecondary||"#666",fontSize:"12px",lineHeight:"1.3"},children:x}),n.gmtModified&&k("span",{className:"text-xs flex-shrink-0",style:{color:t?l.activeItemTextSecondary||"#999":l.itemTextSecondary||"#999",fontSize:"12px",lineHeight:"1.3"},children:d(n.gmtModified)})]})]}),!e&&c&&!r&&k("div",{className:"absolute top-2 right-3",children:k(Bc,{menu:{items:f},trigger:["click"],placement:"bottomRight",children:k(xd,{size:16,className:"text-gray-600 hover:text-gray-800",style:{cursor:"pointer",color:t?l.activeItemTextSecondary||"#999":l.itemTextSecondary||"#999"},onClick:y=>y.stopPropagation()})})})]})}function Hd(t,r=[{label:"\u5F53\u5929",dayPeriod:1}]){const e=new Date,n={other:[]};return t.forEach(i=>{const a=new Date(i.gmtModified),o=Math.floor((+e-+a)/(1e3*60*60*24));let s=!1;for(const c of r)if(o<=c.dayPeriod){n[c.label]||(n[c.label]=[]),n[c.label].push(i),s=!0;break}s||n.other.push(i)}),n}/*! @license Rematrix v0.2.2
37
+
38
+ Copyright 2018 Fisssion LLC.
39
+
40
+ Permission is hereby granted, free of charge, to any person obtaining a copy
41
+ of this software and associated documentation files (the "Software"), to deal
42
+ in the Software without restriction, including without limitation the rights
43
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
44
+ copies of the Software, and to permit persons to whom the Software is
45
+ furnished to do so, subject to the following conditions:
46
+
47
+ The above copyright notice and this permission notice shall be included in
48
+ all copies or substantial portions of the Software.
49
+
50
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
51
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
52
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
53
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
54
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
55
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
56
+ THE SOFTWARE.
57
+ */function ro(t){if(t.constructor!==Array)throw new TypeError("Expected array.");if(t.length===16)return t;if(t.length===6){var r=Bn();return r[0]=t[0],r[1]=t[1],r[4]=t[2],r[5]=t[3],r[12]=t[4],r[13]=t[5],r}throw new RangeError("Expected array with either 6 or 16 values.")}function Bn(){for(var t=[],r=0;r<16;r++)r%5==0?t.push(1):t.push(0);return t}function Vd(t,r){for(var e=ro(t),n=ro(r),i=[],a=0;a<4;a++)for(var o=[e[a],e[a+4],e[a+8],e[a+12]],s=0;s<4;s++){var c=s*4,u=[n[c],n[c+1],n[c+2],n[c+3]],l=o[0]*u[0]+o[1]*u[1]+o[2]*u[2]+o[3]*u[3];i[a+c]=l}return i}function jd(t){if(typeof t=="string"){var r=t.match(/matrix(3d)?\(([^)]+)\)/);if(r){var e=r[2].split(", ").map(parseFloat);return ro(e)}}return Bn()}function Ud(t){var r=Bn();return r[0]=t,r}function Wd(t){var r=Bn();return r[5]=t,r}function Kd(t){var r=Bn();return r[12]=t,r}function Gd(t){var r=Bn();return r[13]=t,r}var ui=function(t){return typeof t=="number"},Tu=function(t){return typeof t=="function"},Iu=function(t){return Object.prototype.toString.call(t)==="[object Object]"},xn=function(t){return Array.prototype.slice.apply(t)},Pu=function(t){var r=t.reduce(function(e,n){return e[n]=(e[n]||0)+1,e},{});return Object.keys(r).filter(function(e){return r[e]>1})};function Pr(t){return[].slice.call(arguments,1).forEach(function(r){if(r)for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e])}),t}var no,io=function(t,r,e){return t+(r-t)*e},Nu={__proto__:null,isNumber:ui,isFunction:Tu,isObject:Iu,toArray:xn,getDuplicateValsAsStrings:Pu,assign:Pr,tweenProp:io},Vo="data-flip-id",jo="data-inverse-flip-id",Uo="data-portal-key",Xd="data-exit-container",Zn={__proto__:null,DATA_FLIP_ID:Vo,DATA_INVERSE_FLIP_ID:jo,DATA_FLIP_CONFIG:"data-flip-config",DATA_PORTAL_KEY:Uo},ao={noWobble:{stiffness:200,damping:26},gentle:{stiffness:120,damping:14},veryGentle:{stiffness:130,damping:17},wobbly:{stiffness:180,damping:12},stiff:{stiffness:260,damping:26}},ys=function(t){return Iu(t)?t:Object.keys(ao).indexOf(t)>-1?ao[t]:{}};typeof window<"u"&&(no=window.requestAnimationFrame);var Yd=no=no||function(t){window.setTimeout(t,1e3/60)},Qd=Date.now(),Zd=typeof performance=="object"&&typeof performance.now=="function"?function(){return performance.now()}:function(){return Date.now()-Qd};function Ou(t,r){var e=t.indexOf(r);e!==-1&&t.splice(e,1)}var Jd=(function(){function t(){}return t.prototype.run=function(){var r=this;Yd(function(){r.springSystem.loop(Zd())})},t})(),Pa=function(){this.position=0,this.velocity=0},ef=0,Yt=.001,tf=(function(){function t(e){this._id="s"+ef++,this._springSystem=e,this.listeners=[],this._startValue=0,this._currentState=new Pa,this._displacementFromRestThreshold=.001,this._endValue=0,this._overshootClampingEnabled=!1,this._previousState=new Pa,this._restSpeedThreshold=.001,this._tempState=new Pa,this._timeAccumulator=0,this._wasAtRest=!0,this._cachedSpringConfig={}}var r=t.prototype;return r.getId=function(){return this._id},r.destroy=function(){this.listeners=[],this._springSystem.deregisterSpring(this)},r.setSpringConfig=function(e){return this._springConfig=e,this},r.getCurrentValue=function(){return this._currentState.position},r.getDisplacementDistanceForState=function(e){return Math.abs(this._endValue-e.position)},r.setEndValue=function(e){if(e===this._endValue)return this;if(this.prevEndValue=e,this._endValue===e&&this.isAtRest())return this;this._startValue=this.getCurrentValue(),this._endValue=e,this._springSystem.activateSpring(this.getId());for(var n=0,i=this.listeners.length;n<i;n++){var a=this.listeners[n].onSpringEndStateChange;a&&a(this)}return this},r.setVelocity=function(e){return e===this._currentState.velocity||(this._currentState.velocity=e,this._springSystem.activateSpring(this.getId())),this},r.setCurrentValue=function(e){this._startValue=e,this._currentState.position=e;for(var n=0,i=this.listeners.length;n<i;n++){var a=this.listeners[n];a.onSpringUpdate&&a.onSpringUpdate(this)}return this},r.setAtRest=function(){return this._endValue=this._currentState.position,this._tempState.position=this._currentState.position,this._currentState.velocity=0,this},r.setOvershootClampingEnabled=function(e){return this._overshootClampingEnabled=e,this},r.isOvershooting=function(){var e=this._startValue,n=this._endValue;return this._springConfig.tension>0&&(e<n&&this.getCurrentValue()>n||e>n&&this.getCurrentValue()<n)},r.advance=function(e,n){var i=this.isAtRest();if(!i||!this._wasAtRest){var a=n;n>.064&&(a=.064),this._timeAccumulator+=a;for(var o,s,c,u,l,x,f=this._springConfig.tension,m=this._springConfig.friction,v=this._currentState.position,p=this._currentState.velocity,d=this._tempState.position,y=this._tempState.velocity;this._timeAccumulator>=Yt;)this._timeAccumulator-=Yt,this._timeAccumulator<Yt&&(this._previousState.position=v,this._previousState.velocity=p),s=f*(this._endValue-d)-m*p,u=f*(this._endValue-(d=v+(o=p)*Yt*.5))-m*(y=p+s*Yt*.5),x=f*(this._endValue-(d=v+(c=y)*Yt*.5))-m*(y=p+u*Yt*.5),d=v+(l=y)*Yt,v+=1/6*(o+2*(c+l)+(y=p+x*Yt))*Yt,p+=1/6*(s+2*(u+x)+(f*(this._endValue-d)-m*y))*Yt;this._tempState.position=d,this._tempState.velocity=y,this._currentState.position=v,this._currentState.velocity=p,this._timeAccumulator>0&&this._interpolate(this._timeAccumulator/Yt),(this.isAtRest()||this._overshootClampingEnabled&&this.isOvershooting())&&(this._springConfig.tension>0?(this._startValue=this._endValue,this._currentState.position=this._endValue):(this._endValue=this._currentState.position,this._startValue=this._endValue),this.setVelocity(0),i=!0);var h=!1;this._wasAtRest&&(this._wasAtRest=!1,h=!0);var C=!1;i&&(this._wasAtRest=!0,C=!0),this.notifyPositionUpdated(h,C)}},r.notifyPositionUpdated=function(e,n){var i=this;this.listeners.filter(Boolean).forEach(function(a){e&&a.onSpringActivate&&!i._onActivateCalled&&(a.onSpringActivate(i),i._onActivateCalled=!0),a.onSpringUpdate&&a.onSpringUpdate(i),n&&a.onSpringAtRest&&a.onSpringAtRest(i)})},r.systemShouldAdvance=function(){return!this.isAtRest()||!this.wasAtRest()},r.wasAtRest=function(){return this._wasAtRest},r.isAtRest=function(){return Math.abs(this._currentState.velocity)<this._restSpeedThreshold&&(this.getDisplacementDistanceForState(this._currentState)<=this._displacementFromRestThreshold||this._springConfig.tension===0)},r._interpolate=function(e){this._currentState.position=this._currentState.position*e+this._previousState.position*(1-e),this._currentState.velocity=this._currentState.velocity*e+this._previousState.velocity*(1-e)},r.addListener=function(e){return this.listeners.push(e),this},r.addOneTimeListener=function(e){var n=this;return Object.keys(e).forEach(function(i){var a;e[i]=(a=e[i],function(){a.apply(void 0,[].slice.call(arguments)),n.removeListener(e)})}),this.listeners.push(e),this},r.removeListener=function(e){return Ou(this.listeners,e),this},t})(),Mu=(function(){function t(e){this.looper=e||new Jd,this.looper.springSystem=this,this.listeners=[],this._activeSprings=[],this._idleSpringIndices=[],this._isIdle=!0,this._lastTimeMillis=-1,this._springRegistry={}}var r=t.prototype;return r.createSpring=function(e,n){return this.createSpringWithConfig({tension:e,friction:n})},r.createSpringWithConfig=function(e){var n=new tf(this);return this.registerSpring(n),n.setSpringConfig(e),n},r.getIsIdle=function(){return this._isIdle},r.registerSpring=function(e){this._springRegistry[e.getId()]=e},r.deregisterSpring=function(e){Ou(this._activeSprings,e),delete this._springRegistry[e.getId()]},r.advance=function(e,n){for(var i=this;this._idleSpringIndices.length>0;)this._idleSpringIndices.pop();for(this._activeSprings.filter(Boolean).forEach(function(o){o.systemShouldAdvance()?o.advance(e/1e3,n/1e3):i._idleSpringIndices.push(i._activeSprings.indexOf(o))});this._idleSpringIndices.length>0;){var a=this._idleSpringIndices.pop();a>=0&&this._activeSprings.splice(a,1)}},r.loop=function(e){var n;this._lastTimeMillis===-1&&(this._lastTimeMillis=e-1);var i=e-this._lastTimeMillis;this._lastTimeMillis=e;var a=0,o=this.listeners.length;for(a=0;a<o;a++)(n=this.listeners[a]).onBeforeIntegrate&&n.onBeforeIntegrate(this);for(this.advance(e,i),this._activeSprings.length===0&&(this._isIdle=!0,this._lastTimeMillis=-1),a=0;a<o;a++)(n=this.listeners[a]).onAfterIntegrate&&n.onAfterIntegrate(this);this._isIdle||this.looper.run()},r.activateSpring=function(e){var n=this._springRegistry[e];this._activeSprings.indexOf(n)===-1&&this._activeSprings.push(n),this.getIsIdle()&&(this._isIdle=!1,this.looper.run())},t})(),rf=new Mu,Lu=function(t){var r=t.springConfig,e=r.overshootClamping,n=t.getOnUpdateFunc,i=t.onAnimationEnd,a=t.onSpringActivate,o=rf.createSpring(r.stiffness,r.damping);o.setOvershootClampingEnabled(!!e);var s={onSpringActivate:a,onSpringAtRest:function(){o.destroy(),i()},onSpringUpdate:n({spring:o,onAnimationEnd:i})};return o.addListener(s),o},Cs=function(t){var r=Lu(t);return r.setEndValue(1),r},bs=function(t,r){if(r===void 0&&(r={}),t&&t.length){r.reverse&&t.reverse();var e,n=typeof(e=r.speed)!="number"?1.1:1+Math.min(Math.max(5*e,0),5),i=1/Math.max(Math.min(t.length,100),10),a=t.map(function(o,s){var c=o.getOnUpdateFunc;return o.getOnUpdateFunc=function(u){var l=c(u);return function(x){var f=x.getCurrentValue();(f=f<.01?0:f>.99?1:f)>=i&&a[s+1]&&a[s+1](Math.max(Math.min(f*n,1),0)),l(x)}},o}).map(function(o){var s=Lu(o);if(s)return s.setEndValue.bind(s)}).filter(Boolean);a[0]&&a[0](1)}},Es=function(t){return[0,1,4,5,12,13].map(function(r){return t[r]})},Fs=function(t){return t.top<window.innerHeight&&t.bottom>0&&t.left<window.innerWidth&&t.right>0};function ws(t){return JSON.parse(t.dataset.flipConfig||"{}")}var $u=function(t,r){var e;return Pr(t,((e={})[r[0]]=r[1],e))},zu=function(t,r){return xn(r?document.querySelectorAll("["+Uo+'="'+r+'"]'):t.querySelectorAll("["+Vo+"]"))},qu=function(t){return t.map(function(r){return[r,r.getBoundingClientRect()]})},nf=function(t){var r=t.cachedOrderedFlipIds,e=r===void 0?[]:r,n=t.inProgressAnimations,i=n===void 0?{}:n,a=t.flippedElementPositionsBeforeUpdate,o=a===void 0?{}:a,s=t.flipCallbacks,c=s===void 0?{}:s,u=t.containerEl,l=t.applyTransformOrigin,x=t.spring,f=t.debug,m=t.portalKey,v=t.staggerConfig,p=v===void 0?{}:v,d=t.decisionData,y=d===void 0?{}:d,h=t.handleEnterUpdateDelete,C=t.onComplete,b=t.onStart;if(!window.matchMedia("(prefers-reduced-motion: reduce)").matches){var E,F=qu(zu((E={element:u,portalKey:m}).element,E.portalKey)).map(function(q){var Y=q[0],U=q[1],M=window.getComputedStyle(Y);return[Y.dataset.flipId,{element:Y,rect:U,opacity:parseFloat(M.opacity),transform:M.transform}]}).reduce($u,{}),A=(function(q){var Y=q.containerEl,U=q.portalKey;return U?(function(M){return function(N){return xn(document.querySelectorAll("["+Uo+'="'+M+'"]'+N))}})(U):Y?(function(M){var N=Math.random().toFixed(5);return M.dataset.flipperId=N,function(O){return xn(M.querySelectorAll('[data-flipper-id="'+N+'"] '+O))}})(Y):function(){return[]}})({containerEl:u,portalKey:m}),w=(function(q){return function(Y){return q("["+Vo+'="'+Y+'"]')[0]}})(A),B=function(q){return o[q]&&F[q]},g=Object.keys(o).concat(Object.keys(F)).filter(function(q){return!B(q)}),S={flipCallbacks:c,getElement:w,flippedElementPositionsBeforeUpdate:o,flippedElementPositionsAfterUpdate:F,inProgressAnimations:i,decisionData:y},_=(function(q){var Y,U=q.unflippedIds,M=q.flipCallbacks,N=q.getElement,O=q.flippedElementPositionsBeforeUpdate,I=q.flippedElementPositionsAfterUpdate,V=q.inProgressAnimations,X=q.decisionData,ee=U.filter(function(G){return I[G]}).filter(function(G){return M[G]&&M[G].onAppear}),re=U.filter(function(G){return O[G]&&M[G]&&M[G].onExit}),ie=new Promise(function(G){Y=G}),se=[],De=0,Q=re.map(function(G,ae){var le=O[G].domDataForExitAnimations,Z=le.element,fe=le.parent,Be=le.childPosition,Re=Be.top,je=Be.left,Ce=Be.width,be=Be.height;getComputedStyle(fe).position==="static"&&(fe.style.position="relative"),Z.style.transform="matrix(1, 0, 0, 1, 0, 0)",Z.style.position="absolute",Z.style.top=Re+"px",Z.style.left=je+"px",Z.style.height=be+"px",Z.style.width=Ce+"px";var Ne=se.filter(function(Ke){return Ke[0]===fe})[0];Ne||(Ne=[fe,document.createDocumentFragment()],se.push(Ne)),Ne[1].appendChild(Z),De+=1;var Ee=function(){try{fe.removeChild(Z)}catch{}finally{(De-=1)==0&&Y()}};return V[G]={stop:Ee},function(){return M[G].onExit(Z,ae,Ee,X)}});return se.forEach(function(G){G[0].appendChild(G[1])}),Q.length||Y(),{hideEnteringElements:function(){ee.forEach(function(G){var ae=N(G);ae&&(ae.style.opacity="0")})},animateEnteringElements:function(){ee.forEach(function(G,ae){var le=N(G);le&&M[G].onAppear(le,ae,X)})},animateExitingElements:function(){return Q.forEach(function(G){return G()}),ie}}})(Pr({},S,{unflippedIds:g})),R=_.hideEnteringElements,P=_.animateEnteringElements,z=_.animateExitingElements,$=Pr({},S,{containerEl:u,flippedIds:e.filter(B),applyTransformOrigin:l,spring:x,debug:f,staggerConfig:p,scopedSelector:A,onComplete:C});b&&b(u,y);var j=(function(q){var Y,U=q.flippedIds,M=q.flipCallbacks,N=q.inProgressAnimations,O=q.flippedElementPositionsBeforeUpdate,I=q.flippedElementPositionsAfterUpdate,V=q.applyTransformOrigin,X=q.spring,ee=q.getElement,re=q.debug,ie=q.staggerConfig,se=ie===void 0?{}:ie,De=q.decisionData,Q=De===void 0?{}:De,G=q.onComplete,ae=q.containerEl,le=new Promise(function(ne){Y=ne});if(G&&le.then(function(){return G(ae,Q)}),!U.length)return function(){return Y([]),le};var Z=[],fe=ee(U[0]),Be=fe?fe.ownerDocument.querySelector("body"):document.querySelector("body");Pu(U);var Re=U.map(function(ne){var we=O[ne].rect,ot=I[ne].rect,Bt=O[ne].opacity,St=I[ne].opacity,$t=ot.width<1||ot.height<1,qe=I[ne].element;if(!Fs(we)&&!Fs(ot)||!qe)return!1;var zt,cr,Dr,Dt=ws(qe),wr=(Dr=(cr=(zt={flipperSpring:X,flippedSpring:Dt.spring})===void 0?{}:zt).flippedSpring,Pr({},ao.noWobble,ys(cr.flipperSpring),ys(Dr))),dr=Dt.stagger===!0?"default":Dt.stagger,zr={element:qe,id:ne,stagger:dr,springConfig:wr};if(M[ne]&&M[ne].shouldFlip&&!M[ne].shouldFlip(Q.previous,Q.current))return!1;var fr=Math.abs(we.left-ot.left)+Math.abs(we.top-ot.top),qr=Math.abs(we.width-ot.width)+Math.abs(we.height-ot.height),_r=Math.abs(St-Bt);if(we.height===0&&ot.height===0||we.width===0&&ot.width===0||fr<.5&&qr<.5&&_r<.01)return!1;var Hr=jd(I[ne].transform),qt={matrix:Hr},Ct={matrix:[]},_t=[Hr];Dt.translate&&(_t.push(Kd(we.left-ot.left)),_t.push(Gd(we.top-ot.top))),Dt.scale&&(_t.push(Ud(Math.max(we.width,1)/Math.max(ot.width,1))),_t.push(Wd(Math.max(we.height,1)/Math.max(ot.height,1)))),Dt.opacity&&(Ct.opacity=Bt,qt.opacity=St);var Ht=[];if(!M[ne]||!M[ne].shouldInvert||M[ne].shouldInvert(Q.previous,Q.current)){var tr=(function(Ae,at){return xn(Ae.querySelectorAll("["+jo+'="'+at+'"]'))})(qe,ne);Ht=tr.map(function(Ae){return[Ae,ws(Ae)]})}Ct.matrix=Es(_t.reduce(Vd)),qt.matrix=Es(qt.matrix);var Xt,rt=(function(Ae){var at=Ae.element,rr=Ae.invertedChildren,He=Ae.body;return function(Ge){var dt=Ge.matrix,ht=Ge.opacity,nr=Ge.forceMinVals;if(ui(ht)&&(at.style.opacity=ht+""),nr&&(at.style.minHeight="1px",at.style.minWidth="1px"),dt){var Jr=(function(Vt){return"matrix("+Vt.join(", ")+")"})(dt);at.style.transform=Jr,rr&&(function(Vt){var pr=Vt.matrix,en=Vt.body;Vt.invertedChildren.forEach(function(tn){var rn=tn[0],Nt=tn[1];if(en.contains(rn)){var Kn=pr[0],Gn=pr[3],Fa=pr[5],hr={translateX:0,translateY:0,scaleX:1,scaleY:1},kr="";Nt.translate&&(hr.translateX=-pr[4]/Kn,hr.translateY=-Fa/Gn,kr+="translate("+hr.translateX+"px, "+hr.translateY+"px)"),Nt.scale&&(hr.scaleX=1/Kn,hr.scaleY=1/Gn,kr+=" scale("+hr.scaleX+", "+hr.scaleY+")"),rn.style.transform=kr}})})({invertedChildren:rr,matrix:dt,body:He})}}})({element:qe,invertedChildren:Ht,body:Be});if(M[ne]&&M[ne].onComplete){var he=M[ne].onComplete;Xt=function(){return he(qe,Q)}}var it=ui(Ct.opacity)&&ui(qt.opacity)&&Ct.opacity!==qt.opacity,bt=!1;return Pr({},zr,{stagger:dr,springConfig:wr,getOnUpdateFunc:function(Ae){var at=Ae.spring,rr=Ae.onAnimationEnd;return N[ne]={destroy:at.destroy.bind(at),onAnimationEnd:rr},function(He){M[ne]&&M[ne].onSpringUpdate&&M[ne].onSpringUpdate(He.getCurrentValue()),bt||(bt=!0,M[ne]&&M[ne].onStart&&M[ne].onStart(qe,Q));var Ge=He.getCurrentValue();if(Be.contains(qe)){var dt={matrix:[]};dt.matrix=Ct.matrix.map(function(ht,nr){return io(ht,qt.matrix[nr],Ge)}),it&&(dt.opacity=io(Ct.opacity,qt.opacity,Ge)),rt(dt)}else He.destroy()}},initializeFlip:function(){rt({matrix:Ct.matrix,opacity:it?Ct.opacity:void 0,forceMinVals:$t}),M[ne]&&M[ne].onStartImmediate&&M[ne].onStartImmediate(qe,Q),Dt.transformOrigin?qe.style.transformOrigin=Dt.transformOrigin:V&&(qe.style.transformOrigin="0 0"),Ht.forEach(function(Ae){var at=Ae[0],rr=Ae[1];rr.transformOrigin?at.style.transformOrigin=rr.transformOrigin:V&&(at.style.transformOrigin="0 0")})},onAnimationEnd:function(Ae){delete N[ne],Tu(Xt)&&Xt(),qe.style.transform="",Ht.forEach(function(at){at[0].style.transform=""}),$t&&qe&&(qe.style.minHeight="",qe.style.minWidth=""),Ae||(Z.push(ne),Z.length>=Re.length&&Y(Z))},delayUntil:Dt.delayUntil})}).filter(Boolean);if(Re.forEach(function(ne){return(0,ne.initializeFlip)()}),re)return function(){};var je=Re.filter(function(ne){return ne.delayUntil&&(we=ne.delayUntil,Re.filter(function(ot){return ot.id===we}).length);var we}),Ce={},be={},Ne={};je.forEach(function(ne){ne.stagger?(Ne[ne.stagger]=!0,be[ne.delayUntil]?be[ne.delayUntil].push(ne.stagger):be[ne.delayUntil]=[ne.stagger]):Ce[ne.delayUntil]?Ce[ne.delayUntil].push(ne):Ce[ne.delayUntil]=[ne]});var Ee=Re.filter(function(ne){return ne.stagger}).reduce(function(ne,we){return ne[we.stagger]?ne[we.stagger].push(we):ne[we.stagger]=[we],ne},{}),Ke=Re.filter(function(ne){return je.indexOf(ne)===-1});return Ke.forEach(function(ne){ne.onSpringActivate=function(){Ce[ne.id]&&Ce[ne.id].forEach(Cs),be[ne.id]&&Object.keys(be[ne.id].reduce(function(we,ot){var Bt;return Pr(we,((Bt={})[ot]=!0,Bt))},{})).forEach(function(we){bs(Ee[we],se[we])})}}),function(){return Re.length||Y([]),Ke.filter(function(ne){return!ne.stagger}).forEach(Cs),Object.keys(Ee).forEach(function(ne){Ne[ne]||bs(Ee[ne],se[ne])}),le}})($);h?h({hideEnteringElements:R,animateEnteringElements:P,animateExitingElements:z,animateFlippedElements:j}):(R(),z().then(P),j())}},af=function(t){var r=t.element,e=t.flipCallbacks,n=e===void 0?{}:e,i=t.inProgressAnimations,a=i===void 0?{}:i,o=zu(r,t.portalKey),s=xn(r.querySelectorAll("["+jo+"]")),c={},u=[],l={};o.filter(function(m){return n&&n[m.dataset.flipId]&&n[m.dataset.flipId].onExit}).forEach(function(m){var v=m.parentNode;if(m.closest){var p=m.closest("["+Xd+"]");p&&(v=p)}var d=u.findIndex(function(y){return y[0]===v});d===-1&&(u.push([v,v.getBoundingClientRect()]),d=u.length-1),c[m.dataset.flipId]=u[d][1],l[m.dataset.flipId]=v});var x=qu(o),f=x.map(function(m){var v=m[0],p=m[1],d={};if(n&&n[v.dataset.flipId]&&n[v.dataset.flipId].onExit){var y=c[v.dataset.flipId];Pr(d,{element:v,parent:l[v.dataset.flipId],childPosition:{top:p.top-y.top,left:p.left-y.left,width:p.width,height:p.height}})}return[v.dataset.flipId,{rect:p,opacity:parseFloat(window.getComputedStyle(v).opacity||"1"),domDataForExitAnimations:d}]}).reduce($u,{});return(function(m,v){Object.keys(m).forEach(function(p){m[p].destroy&&m[p].destroy(),m[p].onAnimationEnd&&m[p].onAnimationEnd(!0),delete m[p]}),v.forEach(function(p){p.style.transform="",p.style.opacity=""})})(a,o.concat(s)),{flippedElementPositions:f,cachedOrderedFlipIds:x.map(function(m){return m[0].dataset.flipId})}};new Mu;function ia(){return ia=Object.assign?Object.assign.bind():function(t){for(var r=1;r<arguments.length;r++){var e=arguments[r];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}return t},ia.apply(this,arguments)}function oo(t,r){return oo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e},oo(t,r)}function Hu(t,r){if(t==null)return{};var e,n,i={},a=Object.keys(t);for(n=0;n<a.length;n++)r.indexOf(e=a[n])>=0||(i[e]=t[e]);return i}var Vu=da({}),ju=da("portal"),Uu=(function(t){var r,e;function n(){for(var a,o=arguments.length,s=new Array(o),c=0;c<o;c++)s[c]=arguments[c];return(a=t.call.apply(t,[this].concat(s))||this).inProgressAnimations={},a.flipCallbacks={},a.el=void 0,a}e=t,(r=n).prototype=Object.create(e.prototype),r.prototype.constructor=r,oo(r,e);var i=n.prototype;return i.getSnapshotBeforeUpdate=function(a){return a.flipKey!==this.props.flipKey&&this.el?af({element:this.el,flipCallbacks:this.flipCallbacks,inProgressAnimations:this.inProgressAnimations,portalKey:this.props.portalKey}):null},i.componentDidUpdate=function(a,o,s){this.props.flipKey!==a.flipKey&&this.el&&nf({flippedElementPositionsBeforeUpdate:s.flippedElementPositions,cachedOrderedFlipIds:s.cachedOrderedFlipIds,containerEl:this.el,inProgressAnimations:this.inProgressAnimations,flipCallbacks:this.flipCallbacks,applyTransformOrigin:this.props.applyTransformOrigin,spring:this.props.spring,debug:this.props.debug,portalKey:this.props.portalKey,staggerConfig:this.props.staggerConfig,handleEnterUpdateDelete:this.props.handleEnterUpdateDelete,decisionData:{previous:a.decisionData,current:this.props.decisionData},onComplete:this.props.onComplete,onStart:this.props.onStart})},i.render=function(){var a=this,o=this.props,s=o.portalKey,c=ye.createElement(Vu.Provider,{value:this.flipCallbacks},ye.createElement(o.element,{className:o.className,ref:function(u){return a.el=u}},this.props.children));return s&&(c=ye.createElement(ju.Provider,{value:s},c)),c},n})(mc);Uu.defaultProps={applyTransformOrigin:!0,element:"div"};var of=["children","flipId","inverseFlipId","portalKey"],sf=["children","flipId","shouldFlip","shouldInvert","onAppear","onStart","onStartImmediate","onComplete","onExit","onSpringUpdate"],As=function(t){var r,e=t.children,n=t.flipId,i=t.inverseFlipId,a=t.portalKey,o=Hu(t,of),s=e,c=(function(l){return typeof l=="function"})(s);if(!c)try{s=xc.only(e)}catch{throw new Error("Each Flipped component must wrap a single child")}o.scale||o.translate||o.opacity||Nu.assign(o,{translate:!0,scale:!0,opacity:!0});var u=((r={})[Zn.DATA_FLIP_CONFIG]=JSON.stringify(o),r);return n!==void 0?u[Zn.DATA_FLIP_ID]=String(n):i&&(u[Zn.DATA_INVERSE_FLIP_ID]=String(i)),a!==void 0&&(u[Zn.DATA_PORTAL_KEY]=a),c?s(u):gc(s,u)},Wu=function(t){var r=t.children,e=t.flipId,n=t.shouldFlip,i=t.shouldInvert,a=t.onAppear,o=t.onStart,s=t.onStartImmediate,c=t.onComplete,u=t.onExit,l=t.onSpringUpdate,x=Hu(t,sf);return r?x.inverseFlipId?ye.createElement(As,ia({},x),r):ye.createElement(ju.Consumer,null,function(f){return ye.createElement(Vu.Consumer,null,function(m){return Nu.isObject(m)&&e&&(m[e]={shouldFlip:n,shouldInvert:i,onAppear:a,onStart:o,onStartImmediate:s,onComplete:c,onExit:u,onSpringUpdate:l}),ye.createElement(As,ia({flipId:e},x,{portalKey:f}),r)})}):null};Wu.displayName="Flipped";function uf(t){const{data:r,activedItem:e,onChange:n,onDelete:i,sortRules:a=[{label:"\u5F53\u5929",dayPeriod:1}],eventsEmit:o,assistantList:s,height:c=400,styles:u={},hasMore:l=!1,loadingMore:x=!1}=t,f=r.map(B=>B.sessionId+"-"+B.gmtModified).join(","),m=Te(()=>{const B=a.length>0?a:[{label:"\u5F53\u5929",dayPeriod:1}],g=Hd(r,B),S=B.every(R=>!g[R.label]||g[R.label].length===0),_=[];return B.forEach(R=>{g[R.label]&&g[R.label].length>0&&(_.push({type:"group",label:R.label}),g[R.label].forEach(P=>_.push({type:"item",data:P})))}),g.other.length>0&&!S&&(_.push({type:"group",label:"\u5176\u4ED6"}),g.other.forEach(R=>_.push({type:"item",data:R}))),S&&g.other.length>0&&g.other.forEach(R=>_.push({type:"item",data:R})),_},[r,a,f]),v=Te(()=>m.map(B=>B.type==="group"?`g:${B.label}`:`i:${B.data.sessionId}`).join("|"),[m]),p=56,d=14,y=36,h=B=>B===m.length?y:m[B].type==="group"?32:p+d,C=We(null),b=Te(()=>m.findIndex(B=>{var g;return B.type==="item"&&((g=B.data)==null?void 0:g.sessionId)===e}),[m,e]),E=Te(()=>m.findIndex(B=>B.type==="item"),[m]),F=We(void 0);$e(()=>{const B=F.current;e!==B&&b>-1&&b===E&&C.current&&C.current.scrollToItem(b,"start"),F.current=e},[e,b,E]);const A=We(0);if($e(()=>{if(C.current){const B=A.current,g=m.length;if(A.current=g,g!==B){const _=(B>0?Math.abs(g-B)/B:1)>.5||B<10&&g>20;C.current.resetAfterIndex(0,_)}}},[m.length]),$e(()=>{C.current&&C.current.resetAfterIndex(0,!0)},[v]),m.length===0)return k("div",{className:"text-center text-zinc-400 py-8",children:"\u6682\u65E0\u4F1A\u8BDD"});const w=(u==null?void 0:u.colors)||{};return k(Uu,{flipKey:f,spring:{stiffness:180,damping:18},children:k(zd,{ref:C,height:c,width:"100%",itemCount:m.length+1,itemSize:h,itemKey:B=>{if(B===m.length)return"footer";const g=m[B];return g.type==="item"?g.data.sessionId:`group-${g.label}`},onItemsRendered:({visibleStopIndex:B})=>{l&&!x&&B>=m.length-1-3&&typeof o=="function"&&o("conversations:load_more")},style:{overflowX:"hidden"},children:({index:B,style:g})=>{if(B===m.length){const _=(u==null?void 0:u.colors)||{};return k("div",{style:{...g,height:y,lineHeight:`${y}px`,textAlign:"center",fontSize:"10px",color:_.textMuted||"#9ca3af",background:_.groupBg||"white"},children:x?"\u52A0\u8F7D\u4E2D...":l?"":"\u6CA1\u6709\u66F4\u591A\u4E86"})}const S=m[B];return S.type==="group"?k("div",{style:{...g,background:w.groupBg||"white",zIndex:1},className:"pt-2 pb-1 px-[28px] py-[2px] text-xs text-gray-400",children:S.label}):k(Wu,{flipId:S.data.sessionId,children:k("div",{style:g,className:"px-[12px] py-[2px]",children:k(qd,{isActive:e===S.data.sessionId,isDisabled:!1,isNew:S.data.isNew,data:S.data,eventsEmit:o,assistantList:s,styles:u})})},S.data.sessionId)}})})}const lf=({value:t,eventsEmit:r,setSearch:e,style:n,styles:i={}})=>{const{messages:a}=pa(),o=i.colors||{},s=i.radius||"12px",c=o.border||"#e5e7eb",u=o.primary||"#2563eb",l=i.headerBg||o.sidebarBg||o.background||"#fff",[x,f]=ye.useState(!1),m=ye.useRef(null);ye.useEffect(()=>{x&&m.current&&m.current.focus()},[x]);const v=()=>{f(!1),e("")};return te("div",{className:"flex items-center gap-2 px-4 py-3 sticky top-0 z-10 min-w-0",style:{...n,background:l,borderTopLeftRadius:s,borderTopRightRadius:s},children:[k("button",{className:"border-none flex items-center justify-center",onClick:()=>{f(!1),r&&r("conversation:create")},title:a.sidebar.newConversation,style:{height:42,borderRadius:"90px",background:u,color:o.buttonText||"#fff",fontWeight:600,boxShadow:i.shadow||"0 2px 8px 0 rgba(0,0,0,0.04)",padding:x?"0 0":"0 14px",minWidth:x?0:180,width:x?0:void 0,opacity:x?0:1,overflow:"hidden",flexShrink:0,transition:"width .22s ease, min-width .22s ease, padding .22s ease, opacity .18s ease",pointerEvents:x?"none":"auto"},children:te("div",{className:"flex items-center gap-2",children:[k(qc,{size:18}),k("span",{className:"text-sm",children:a.sidebar.newChat})]})}),x?te("div",{className:"flex-1 min-w-0 relative",children:[k("input",{ref:m,className:"w-full px-3 py-2 pr-10 text-sm transition-all",placeholder:a.sidebar.searchPlaceholder,value:t,onChange:p=>e(p.target.value),onKeyDown:p=>{p.key==="Escape"&&v()},style:{minWidth:0,width:"100%",borderRadius:s,background:o.inputBg||"#f4f4f5",border:`1px solid ${c}`,color:o.text||"#222",outline:"none",paddingRight:40}}),k("button",{className:"absolute right-3 flex items-center justify-center transition-colors hover:bg-gray-200 rounded-full",style:{width:20,height:20,color:o.text||"#666",flexShrink:0,position:"absolute",right:"12px",top:"9px"},onClick:v,title:"\u5173\u95ED\u641C\u7D22",onMouseDown:p=>p.preventDefault(),children:k(zo,{size:16})})]}):k("button",{className:"ml-auto flex items-center justify-center transition-colors hover:bg-gray-50",style:{width:36,height:36,borderRadius:"90px",border:`1px solid ${c}`,color:u,flexShrink:0},onClick:()=>f(!0),title:a.sidebar.search,children:k(ra,{size:18})})]})};function cf(t){const{data:r,sortRules:e,activedItem:n,eventsEmit:i,assistantList:a,styles:o={},hasMore:s=!1,loadingMore:c=!1}=t,{messages:u}=pa(),[l,x]=ue(""),f=Te(()=>l?r.filter(F=>(F.label||u.sidebar.unnamedSession).toLowerCase().includes(l.toLowerCase())):r,[r,l,u.sidebar.unnamedSession]),m=Te(()=>[...f].sort((F,A)=>new Date(A.gmtModified).getTime()-new Date(F.gmtModified).getTime()),[f]),v=We(null),[p,d]=ue(400);$e(()=>{function F(){v.current&&d(v.current.clientHeight)}return F(),window.addEventListener("resize",F),()=>window.removeEventListener("resize",F)},[]);const y=(o==null?void 0:o.colors)||{};o!=null&&o.radius;const h=(o==null?void 0:o.shadow)||"0 4px 24px 0 rgba(0,0,0,0.06)",C=y.border||"#e5e7eb",b=y.sidebarBg||y.background||"#EAEEFF",E=y.text||"#222";return te("div",{className:"h-full flex flex-col overflow-y-hidden",style:{background:b,color:E,boxShadow:h,border:`1px solid ${C}`,...o.container},children:[k(lf,{value:l,setSearch:x,eventsEmit:i,style:o.header,styles:o}),te("div",{className:"flex-1 min-h-0 relative",ref:v,style:o.list,children:[k(uf,{eventsEmit:i,data:m,assistantList:a,activedItem:n,sortRules:e,height:p,styles:o,hasMore:s,loadingMore:c}),k("div",{className:"pointer-events-none absolute left-0 right-0 top-0 h-3 z-20",style:{background:`linear-gradient(to bottom, ${b}cc, transparent)`}})]})]})}const df=ye.createContext({});function Nn(t){for(var r=0,e,n=0,i=t.length;i>=4;++n,i-=4)e=t.charCodeAt(n)&255|(t.charCodeAt(++n)&255)<<8|(t.charCodeAt(++n)&255)<<16|(t.charCodeAt(++n)&255)<<24,e=(e&65535)*1540483477+((e>>>16)*59797<<16),e^=e>>>24,r=(e&65535)*1540483477+((e>>>16)*59797<<16)^(r&65535)*1540483477+((r>>>16)*59797<<16);switch(i){case 3:r^=(t.charCodeAt(n+2)&255)<<16;case 2:r^=(t.charCodeAt(n+1)&255)<<8;case 1:r^=t.charCodeAt(n)&255,r=(r&65535)*1540483477+((r>>>16)*59797<<16)}return r^=r>>>13,r=(r&65535)*1540483477+((r>>>16)*59797<<16),((r^r>>>15)>>>0).toString(36)}function Ku(t,r,e){var n=L.useRef({});return(!("value"in n.current)||e(n.current.condition,r))&&(n.current.value=t(),n.current.condition=r),n.current.value}function so(t,r){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=new Set;function i(a,o){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,c=n.has(a);if(Br(!c,"Warning: There may be circular references"),c)return!1;if(a===o)return!0;if(e&&s>1)return!1;n.add(a);var u=s+1;if(Array.isArray(a)){if(!Array.isArray(o)||a.length!==o.length)return!1;for(var l=0;l<a.length;l++)if(!i(a[l],o[l],u))return!1;return!0}if(a&&o&&Pe(a)==="object"&&Pe(o)==="object"){var x=Object.keys(a);return x.length!==Object.keys(o).length?!1:x.every(function(f){return i(a[f],o[f],u)})}return!1}return i(t,r)}var ff="%";function uo(t){return t.join(ff)}var pf=(function(){function t(r){Pt(this,t),H(this,"instanceId",void 0),H(this,"cache",new Map),H(this,"extracted",new Set),this.instanceId=r}return It(t,[{key:"get",value:function(e){return this.opGet(uo(e))}},{key:"opGet",value:function(e){return this.cache.get(e)||null}},{key:"update",value:function(e,n){return this.opUpdate(uo(e),n)}},{key:"opUpdate",value:function(e,n){var i=this.cache.get(e),a=n(i);a===null?this.cache.delete(e):this.cache.set(e,a)}}]),t})(),Cn="data-token-hash",ur="data-css-hash",Nr="__cssinjs_instance__";function hf(){var t=Math.random().toString(12).slice(2);if(typeof document<"u"&&document.head&&document.body){var r=document.body.querySelectorAll("style[".concat(ur,"]"))||[],e=document.head.firstChild;Array.from(r).forEach(function(i){i[Nr]=i[Nr]||t,i[Nr]===t&&document.head.insertBefore(i,e)});var n={};Array.from(document.querySelectorAll("style[".concat(ur,"]"))).forEach(function(i){var a=i.getAttribute(ur);if(n[a]){if(i[Nr]===t){var o;(o=i.parentNode)===null||o===void 0||o.removeChild(i)}}else n[a]=!0})}return new pf(t)}var Vn=L.createContext({hashPriority:"low",cache:hf(),defaultCache:!0});function Sn(t){var r=Cu();return function(){var e,n=Za(t);if(r){var i=Za(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return Ic(this,e)}}function vf(t,r){if(t.length!==r.length)return!1;for(var e=0;e<t.length;e++)if(t[e]!==r[e])return!1;return!0}var Wo=(function(){function t(){Pt(this,t),H(this,"cache",void 0),H(this,"keys",void 0),H(this,"cacheCallTimes",void 0),this.cache=new Map,this.keys=[],this.cacheCallTimes=0}return It(t,[{key:"size",value:function(){return this.keys.length}},{key:"internalGet",value:function(e){var n,i,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,o={map:this.cache};return e.forEach(function(s){if(!o)o=void 0;else{var c;o=(c=o)===null||c===void 0||(c=c.map)===null||c===void 0?void 0:c.get(s)}}),(n=o)!==null&&n!==void 0&&n.value&&a&&(o.value[1]=this.cacheCallTimes++),(i=o)===null||i===void 0?void 0:i.value}},{key:"get",value:function(e){var n;return(n=this.internalGet(e,!0))===null||n===void 0?void 0:n[0]}},{key:"has",value:function(e){return!!this.internalGet(e)}},{key:"set",value:function(e,n){var i=this;if(!this.has(e)){if(this.size()+1>t.MAX_CACHE_SIZE+t.MAX_CACHE_OFFSET){var a=this.keys.reduce(function(u,l){var x=xe(u,2),f=x[1];return i.internalGet(l)[1]<f?[l,i.internalGet(l)[1]]:u},[this.keys[0],this.cacheCallTimes]),o=xe(a,1),s=o[0];this.delete(s)}this.keys.push(e)}var c=this.cache;e.forEach(function(u,l){if(l===e.length-1)c.set(u,{value:[n,i.cacheCallTimes++]});else{var x=c.get(u);x?x.map||(x.map=new Map):c.set(u,{map:new Map}),c=c.get(u).map}})}},{key:"deleteByPath",value:function(e,n){var i=e.get(n[0]);if(n.length===1){var a;return i.map?e.set(n[0],{map:i.map}):e.delete(n[0]),(a=i.value)===null||a===void 0?void 0:a[0]}var o=this.deleteByPath(i.map,n.slice(1));return(!i.map||i.map.size===0)&&!i.value&&e.delete(n[0]),o}},{key:"delete",value:function(e){if(this.has(e))return this.keys=this.keys.filter(function(n){return!vf(n,e)}),this.deleteByPath(this.cache,e)}}]),t})();H(Wo,"MAX_CACHE_SIZE",20);H(Wo,"MAX_CACHE_OFFSET",5);var Bs=0,Gu=(function(){function t(r){Pt(this,t),H(this,"derivatives",void 0),H(this,"id",void 0),this.derivatives=Array.isArray(r)?r:[r],this.id=Bs,r.length===0&&Pc(r.length>0),Bs+=1}return It(t,[{key:"getDerivativeToken",value:function(e){return this.derivatives.reduce(function(n,i){return i(e,n)},void 0)}}]),t})(),Na=new Wo;function lo(t){var r=Array.isArray(t)?t:[t];return Na.has(r)||Na.set(r,new Gu(r)),Na.get(r)}var xf=new WeakMap,Oa={};function gf(t,r){for(var e=xf,n=0;n<r.length;n+=1){var i=r[n];e.has(i)||e.set(i,new WeakMap),e=e.get(i)}return e.has(Oa)||e.set(Oa,t()),e.get(Oa)}var Ss=new WeakMap;function Tn(t){var r=Ss.get(t)||"";return r||(Object.keys(t).forEach(function(e){var n=t[e];r+=e,n instanceof Gu?r+=n.id:n&&Pe(n)==="object"?r+=Tn(n):r+=n}),r=Nn(r),Ss.set(t,r)),r}function Ds(t,r){return Nn("".concat(r,"_").concat(Tn(t)))}var co=Lr();function _s(t){return typeof t=="number"?"".concat(t,"px"):t}function aa(t,r,e){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(i)return t;var a=J(J({},n),{},H(H({},Cn,r),ur,e)),o=Object.keys(a).map(function(s){var c=a[s];return c?"".concat(s,'="').concat(c,'"'):null}).filter(function(s){return s}).join(" ");return"<style ".concat(o,">").concat(t,"</style>")}var li=function(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return"--".concat(e?"".concat(e,"-"):"").concat(r).replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z]+)([A-Z][a-z0-9]+)/g,"$1-$2").replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase()},mf=function(r,e,n){return Object.keys(r).length?".".concat(e).concat(n!=null&&n.scope?".".concat(n.scope):"","{").concat(Object.entries(r).map(function(i){var a=xe(i,2),o=a[0],s=a[1];return"".concat(o,":").concat(s,";")}).join(""),"}"):""},Xu=function(r,e,n){var i={},a={};return Object.entries(r).forEach(function(o){var s,c,u=xe(o,2),l=u[0],x=u[1];if(n!=null&&(s=n.preserve)!==null&&s!==void 0&&s[l])a[l]=x;else if((typeof x=="string"||typeof x=="number")&&!(n!=null&&(c=n.ignore)!==null&&c!==void 0&&c[l])){var f,m=li(l,n==null?void 0:n.prefix);i[m]=typeof x=="number"&&!(n!=null&&(f=n.unitless)!==null&&f!==void 0&&f[l])?"".concat(x,"px"):String(x),a[l]="var(".concat(m,")")}}),[a,mf(i,e,{scope:n==null?void 0:n.scope})]},ks=Lr()?L.useLayoutEffect:L.useEffect,yf=function(r,e){var n=L.useRef(!0);ks(function(){return r(n.current)},e),ks(function(){return n.current=!1,function(){n.current=!0}},[])},Cf=J({},L),Rs=Cf.useInsertionEffect,bf=function(r,e,n){L.useMemo(r,n),yf(function(){return e(!0)},n)},Ef=Rs?function(t,r,e){return Rs(function(){return t(),r()},e)}:bf,Ff=J({},L),wf=Ff.useInsertionEffect,Af=function(r){var e=[],n=!1;function i(a){n||e.push(a)}return L.useEffect(function(){return n=!1,function(){n=!0,e.length&&e.forEach(function(a){return a()})}},r),i},Bf=function(){return function(r){r()}},Sf=typeof wf<"u"?Af:Bf;function Ko(t,r,e,n,i){var a=L.useContext(Vn),o=a.cache,s=[t].concat(me(r)),c=uo(s),u=Sf([c]),l=function(v){o.opUpdate(c,function(p){var d=p||[void 0,void 0],y=xe(d,2),h=y[0],C=h===void 0?0:h,b=y[1],E=b,F=E||e(),A=[C,F];return v?v(A):A})};L.useMemo(function(){l()},[c]);var x=o.opGet(c),f=x[1];return Ef(function(){i==null||i(f)},function(m){return l(function(v){var p=xe(v,2),d=p[0],y=p[1];return m&&d===0&&(i==null||i(f)),[d+1,y]}),function(){o.opUpdate(c,function(v){var p=v||[],d=xe(p,2),y=d[0],h=y===void 0?0:y,C=d[1],b=h-1;return b===0?(u(function(){(m||!o.opGet(c))&&(n==null||n(C,!1))}),null):[h-1,C]})}},[c]),f}var Df={},_f="css",Ur=new Map;function kf(t){Ur.set(t,(Ur.get(t)||0)+1)}function Rf(t,r){if(typeof document<"u"){var e=document.querySelectorAll("style[".concat(Cn,'="').concat(t,'"]'));e.forEach(function(n){if(n[Nr]===r){var i;(i=n.parentNode)===null||i===void 0||i.removeChild(n)}})}}var Tf=0;function If(t,r){Ur.set(t,(Ur.get(t)||0)-1);var e=new Set;Ur.forEach(function(n,i){n<=0&&e.add(i)}),Ur.size-e.size>Tf&&e.forEach(function(n){Rf(n,r),Ur.delete(n)})}var Pf=function(r,e,n,i){var a=n.getDerivativeToken(r),o=J(J({},a),e);return i&&(o=i(o)),o},Yu="token";function Nf(t,r){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=Fr(Vn),i=n.cache.instanceId,a=n.container,o=e.salt,s=o===void 0?"":o,c=e.override,u=c===void 0?Df:c,l=e.formatToken,x=e.getComputedToken,f=e.cssVar,m=gf(function(){return Object.assign.apply(Object,[{}].concat(me(r)))},r),v=Tn(m),p=Tn(u),d=f?Tn(f):"",y=Ko(Yu,[s,t.id,v,p,d],function(){var h,C=x?x(m,u,t):Pf(m,u,t,l),b=J({},C),E="";if(f){var F=Xu(C,f.key,{prefix:f.prefix,ignore:f.ignore,unitless:f.unitless,preserve:f.preserve}),A=xe(F,2);C=A[0],E=A[1]}var w=Ds(C,s);C._tokenKey=w,b._tokenKey=Ds(b,s);var B=(h=f==null?void 0:f.key)!==null&&h!==void 0?h:w;C._themeKey=B,kf(B);var g="".concat(_f,"-").concat(Nn(w));return C._hashId=g,[C,g,b,E,(f==null?void 0:f.key)||""]},function(h){If(h[0]._themeKey,i)},function(h){var C=xe(h,4),b=C[0],E=C[3];if(f&&E){var F=vn(E,Nn("css-variables-".concat(b._themeKey)),{mark:ur,prepend:"queue",attachTo:a,priority:-999});F[Nr]=i,F.setAttribute(Cn,b._themeKey)}});return y}var Of=function(r,e,n){var i=xe(r,5),a=i[2],o=i[3],s=i[4],c=n||{},u=c.plain;if(!o)return null;var l=a._tokenKey,x=-999,f={"data-rc-order":"prependQueue","data-rc-priority":"".concat(x)},m=aa(o,s,l,f,u);return[x,l,m]},Mf={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Qu="comm",Zu="rule",Ju="decl",Lf="@import",$f="@namespace",zf="@keyframes",qf="@layer",el=Math.abs,Go=String.fromCharCode;function tl(t){return t.trim()}function ci(t,r,e){return t.replace(r,e)}function Hf(t,r,e){return t.indexOf(r,e)}function gn(t,r){return t.charCodeAt(r)|0}function bn(t,r,e){return t.slice(r,e)}function mr(t){return t.length}function Vf(t){return t.length}function Jn(t,r){return r.push(t),t}var ha=1,En=1,rl=0,er=0,pt=0,Dn="";function Xo(t,r,e,n,i,a,o,s){return{value:t,root:r,parent:e,type:n,props:i,children:a,line:ha,column:En,length:o,return:"",siblings:s}}function jf(){return pt}function Uf(){return pt=er>0?gn(Dn,--er):0,En--,pt===10&&(En=1,ha--),pt}function lr(){return pt=er<rl?gn(Dn,er++):0,En++,pt===10&&(En=1,ha++),pt}function Or(){return gn(Dn,er)}function di(){return er}function va(t,r){return bn(Dn,t,r)}function On(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Wf(t){return ha=En=1,rl=mr(Dn=t),er=0,[]}function Kf(t){return Dn="",t}function Ma(t){return tl(va(er-1,fo(t===91?t+2:t===40?t+1:t)))}function Gf(t){for(;(pt=Or())&&pt<33;)lr();return On(t)>2||On(pt)>3?"":" "}function Xf(t,r){for(;--r&&lr()&&!(pt<48||pt>102||pt>57&&pt<65||pt>70&&pt<97););return va(t,di()+(r<6&&Or()==32&&lr()==32))}function fo(t){for(;lr();)switch(pt){case t:return er;case 34:case 39:t!==34&&t!==39&&fo(pt);break;case 40:t===41&&fo(t);break;case 92:lr();break}return er}function Yf(t,r){for(;lr()&&t+pt!==57;)if(t+pt===84&&Or()===47)break;return"/*"+va(r,er-1)+"*"+Go(t===47?t:lr())}function Qf(t){for(;!On(Or());)lr();return va(t,er)}function Zf(t){return Kf(fi("",null,null,null,[""],t=Wf(t),0,[0],t))}function fi(t,r,e,n,i,a,o,s,c){for(var u=0,l=0,x=o,f=0,m=0,v=0,p=1,d=1,y=1,h=0,C="",b=i,E=a,F=n,A=C;d;)switch(v=h,h=lr()){case 40:if(v!=108&&gn(A,x-1)==58){Hf(A+=ci(Ma(h),"&","&\f"),"&\f",el(u?s[u-1]:0))!=-1&&(y=-1);break}case 34:case 39:case 91:A+=Ma(h);break;case 9:case 10:case 13:case 32:A+=Gf(v);break;case 92:A+=Xf(di()-1,7);continue;case 47:switch(Or()){case 42:case 47:Jn(Jf(Yf(lr(),di()),r,e,c),c),(On(v||1)==5||On(Or()||1)==5)&&mr(A)&&bn(A,-1,void 0)!==" "&&(A+=" ");break;default:A+="/"}break;case 123*p:s[u++]=mr(A)*y;case 125*p:case 59:case 0:switch(h){case 0:case 125:d=0;case 59+l:y==-1&&(A=ci(A,/\f/g,"")),m>0&&(mr(A)-x||p===0&&v===47)&&Jn(m>32?Is(A+";",n,e,x-1,c):Is(ci(A," ","")+";",n,e,x-2,c),c);break;case 59:A+=";";default:if(Jn(F=Ts(A,r,e,u,l,i,s,C,b=[],E=[],x,a),a),h===123)if(l===0)fi(A,r,F,F,b,a,x,s,E);else{switch(f){case 99:if(gn(A,3)===110)break;case 108:if(gn(A,2)===97)break;default:l=0;case 100:case 109:case 115:}l?fi(t,F,F,n&&Jn(Ts(t,F,F,0,0,i,s,C,i,b=[],x,E),E),i,E,x,s,n?b:E):fi(A,F,F,F,[""],E,0,s,E)}}u=l=m=0,p=y=1,C=A="",x=o;break;case 58:x=1+mr(A),m=v;default:if(p<1){if(h==123)--p;else if(h==125&&p++==0&&Uf()==125)continue}switch(A+=Go(h),h*p){case 38:y=l>0?1:(A+="\f",-1);break;case 44:s[u++]=(mr(A)-1)*y,y=1;break;case 64:Or()===45&&(A+=Ma(lr())),f=Or(),l=x=mr(C=A+=Qf(di())),h++;break;case 45:v===45&&mr(A)==2&&(p=0)}}return a}function Ts(t,r,e,n,i,a,o,s,c,u,l,x){for(var f=i-1,m=i===0?a:[""],v=Vf(m),p=0,d=0,y=0;p<n;++p)for(var h=0,C=bn(t,f+1,f=el(d=o[p])),b=t;h<v;++h)(b=tl(d>0?m[h]+" "+C:ci(C,/&\f/g,m[h])))&&(c[y++]=b);return Xo(t,r,e,i===0?Zu:s,c,u,l,x)}function Jf(t,r,e,n){return Xo(t,r,e,Qu,Go(jf()),bn(t,2,-2),0,n)}function Is(t,r,e,n,i){return Xo(t,r,e,Ju,bn(t,0,n),bn(t,n+1,-1),n,i)}function po(t,r){for(var e="",n=0;n<t.length;n++)e+=r(t[n],n,t,r)||"";return e}function ep(t,r,e,n){switch(t.type){case qf:if(t.children.length)break;case Lf:case $f:case Ju:return t.return=t.return||t.value;case Qu:return"";case zf:return t.return=t.value+"{"+po(t.children,n)+"}";case Zu:if(!mr(t.value=t.props.join(",")))return""}return mr(e=po(t.children,n))?t.return=t.value+"{"+e+"}":""}var Ps="data-ant-cssinjs-cache-path",nl="_FILE_STYLE__",Gr,il=!0;function tp(){if(!Gr&&(Gr={},Lr())){var t=document.createElement("div");t.className=Ps,t.style.position="fixed",t.style.visibility="hidden",t.style.top="-9999px",document.body.appendChild(t);var r=getComputedStyle(t).content||"";r=r.replace(/^"/,"").replace(/"$/,""),r.split(";").forEach(function(i){var a=i.split(":"),o=xe(a,2),s=o[0],c=o[1];Gr[s]=c});var e=document.querySelector("style[".concat(Ps,"]"));if(e){var n;il=!1,(n=e.parentNode)===null||n===void 0||n.removeChild(e)}document.body.removeChild(t)}}function rp(t){return tp(),!!Gr[t]}function np(t){var r=Gr[t],e=null;if(r&&Lr())if(il)e=nl;else{var n=document.querySelector("style[".concat(ur,'="').concat(Gr[t],'"]'));n?e=n.innerHTML:delete Gr[t]}return[e,r]}var ip="_skip_check_",al="_multi_value_";function pi(t){var r=po(Zf(t),ep);return r.replace(/\{%%%\:[^;];}/g,";")}function ap(t){return Pe(t)==="object"&&t&&(ip in t||al in t)}function Ns(t,r,e){if(!r)return t;var n=".".concat(r),i=e==="low"?":where(".concat(n,")"):n,a=t.split(",").map(function(o){var s,c=o.trim().split(/\s+/),u=c[0]||"",l=((s=u.match(/^\w+/))===null||s===void 0?void 0:s[0])||"";return u="".concat(l).concat(i).concat(u.slice(l.length)),[u].concat(me(c.slice(1))).join(" ")});return a.join(",")}var op=function t(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{root:!0,parentSelectors:[]},i=n.root,a=n.injectHash,o=n.parentSelectors,s=e.hashId,c=e.layer;e.path;var u=e.hashPriority,l=e.transformers,x=l===void 0?[]:l;e.linters;var f="",m={};function v(y){var h=y.getName(s);if(!m[h]){var C=t(y.style,e,{root:!1,parentSelectors:o}),b=xe(C,1),E=b[0];m[h]="@keyframes ".concat(y.getName(s)).concat(E)}}function p(y){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return y.forEach(function(C){Array.isArray(C)?p(C,h):C&&h.push(C)}),h}var d=p(Array.isArray(r)?r:[r]);return d.forEach(function(y){var h=typeof y=="string"&&!i?{}:y;if(typeof h=="string")f+="".concat(h,`
58
+ `);else if(h._keyframe)v(h);else{var C=x.reduce(function(b,E){var F;return(E==null||(F=E.visit)===null||F===void 0?void 0:F.call(E,b))||b},h);Object.keys(C).forEach(function(b){var E=C[b];if(Pe(E)==="object"&&E&&(b!=="animationName"||!E._keyframe)&&!ap(E)){var F=!1,A=b.trim(),w=!1;(i||a)&&s?A.startsWith("@")?F=!0:A==="&"?A=Ns("",s,u):A=Ns(b,s,u):i&&!s&&(A==="&"||A==="")&&(A="",w=!0);var B=t(E,e,{root:w,injectHash:F,parentSelectors:[].concat(me(o),[A])}),g=xe(B,2),S=g[0],_=g[1];m=J(J({},m),_),f+="".concat(A).concat(S)}else{let z=function($,j){var q=$.replace(/[A-Z]/g,function(U){return"-".concat(U.toLowerCase())}),Y=j;!Mf[$]&&typeof Y=="number"&&Y!==0&&(Y="".concat(Y,"px")),$==="animationName"&&j!==null&&j!==void 0&&j._keyframe&&(v(j),Y=j.getName(s)),f+="".concat(q,":").concat(Y,";")};var R,P=(R=E==null?void 0:E.value)!==null&&R!==void 0?R:E;Pe(E)==="object"&&E!==null&&E!==void 0&&E[al]&&Array.isArray(P)?P.forEach(function($){z(b,$)}):z(b,P)}})}}),i?c&&(f&&(f="@layer ".concat(c.name," {").concat(f,"}")),c.dependencies&&(m["@layer ".concat(c.name)]=c.dependencies.map(function(y){return"@layer ".concat(y,", ").concat(c.name,";")}).join(`
59
+ `))):f="{".concat(f,"}"),[f,m]};function ol(t,r){return Nn("".concat(t.join("%")).concat(r))}function sp(){return null}var sl="style";function ho(t,r){var e=t.token,n=t.path,i=t.hashId,a=t.layer,o=t.nonce,s=t.clientOnly,c=t.order,u=c===void 0?0:c,l=L.useContext(Vn),x=l.autoClear;l.mock;var f=l.defaultCache,m=l.hashPriority,v=l.container,p=l.ssrInline,d=l.transformers,y=l.linters,h=l.cache,C=l.layer,b=e._tokenKey,E=[b];C&&E.push("layer"),E.push.apply(E,me(n));var F=co,A=Ko(sl,E,function(){var _=E.join("|");if(rp(_)){var R=np(_),P=xe(R,2),z=P[0],$=P[1];if(z)return[z,b,$,{},s,u]}var j=r(),q=op(j,{hashId:i,hashPriority:m,layer:C?a:void 0,path:n.join("-"),transformers:d,linters:y}),Y=xe(q,2),U=Y[0],M=Y[1],N=pi(U),O=ol(E,N);return[N,b,O,M,s,u]},function(_,R){var P=xe(_,3),z=P[2];(R||x)&&co&&bu(z,{mark:ur,attachTo:v})},function(_){var R=xe(_,4),P=R[0];R[1];var z=R[2],$=R[3];if(F&&P!==nl){var j={mark:ur,prepend:C?!1:"queue",attachTo:v,priority:u},q=typeof o=="function"?o():o;q&&(j.csp={nonce:q});var Y=[],U=[];Object.keys($).forEach(function(N){N.startsWith("@layer")?Y.push(N):U.push(N)}),Y.forEach(function(N){vn(pi($[N]),"_layer-".concat(N),J(J({},j),{},{prepend:!0}))});var M=vn(P,z,j);M[Nr]=h.instanceId,M.setAttribute(Cn,b),U.forEach(function(N){vn(pi($[N]),"_effect-".concat(N),j)})}}),w=xe(A,3),B=w[0],g=w[1],S=w[2];return function(_){var R;return!p||F||!f?R=L.createElement(sp,null):R=L.createElement("style",Tt({},H(H({},Cn,g),ur,S),{dangerouslySetInnerHTML:{__html:B}})),L.createElement(L.Fragment,null,R,_)}}var up=function(r,e,n){var i=xe(r,6),a=i[0],o=i[1],s=i[2],c=i[3],u=i[4],l=i[5],x=n||{},f=x.plain;if(u)return null;var m=a,v={"data-rc-order":"prependQueue","data-rc-priority":"".concat(l)};return m=aa(a,o,s,v,f),c&&Object.keys(c).forEach(function(p){if(!e[p]){e[p]=!0;var d=pi(c[p]),y=aa(d,o,"_effect-".concat(p),v,f);p.startsWith("@layer")?m=y+m:m+=y}}),[l,s,m]},ul="cssVar",lp=function(r,e){var n=r.key,i=r.prefix,a=r.unitless,o=r.ignore,s=r.token,c=r.scope,u=c===void 0?"":c,l=Fr(Vn),x=l.cache.instanceId,f=l.container,m=s._tokenKey,v=[].concat(me(r.path),[n,u,m]),p=Ko(ul,v,function(){var d=e(),y=Xu(d,n,{prefix:i,unitless:a,ignore:o,scope:u}),h=xe(y,2),C=h[0],b=h[1],E=ol(v,b);return[C,b,E,n]},function(d){var y=xe(d,3),h=y[2];co&&bu(h,{mark:ur,attachTo:f})},function(d){var y=xe(d,3),h=y[1],C=y[2];if(h){var b=vn(h,C,{mark:ur,prepend:"queue",attachTo:f,priority:-999});b[Nr]=x,b.setAttribute(Cn,n)}});return p},cp=function(r,e,n){var i=xe(r,4),a=i[1],o=i[2],s=i[3],c=n||{},u=c.plain;if(!a)return null;var l=-999,x={"data-rc-order":"prependQueue","data-rc-priority":"".concat(l)},f=aa(a,s,o,x,u);return[l,o,f]};H(H(H({},sl,up),Yu,Of),ul,cp);var Os=(function(){function t(r,e){Pt(this,t),H(this,"name",void 0),H(this,"style",void 0),H(this,"_keyframe",!0),this.name=r,this.style=e}return It(t,[{key:"getName",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return e?"".concat(e,"-").concat(this.name):this.name}}]),t})();function on(t){return t.notSplit=!0,t}on(["borderTop","borderBottom"]),on(["borderTop"]),on(["borderBottom"]),on(["borderLeft","borderRight"]),on(["borderLeft"]),on(["borderRight"]);function dp(t){return Nc(t)||Oc(t)||Mc(t)||Lc()}function Cr(t,r){for(var e=t,n=0;n<r.length;n+=1){if(e==null)return;e=e[r[n]]}return e}function ll(t,r,e,n){if(!r.length)return e;var i=dp(r),a=i[0],o=i.slice(1),s;return!t&&typeof a=="number"?s=[]:Array.isArray(t)?s=me(t):s=J({},t),n&&e===void 0&&o.length===1?delete s[a][o[0]]:s[a]=ll(s[a],o,e,n),s}function or(t,r,e){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return r.length&&n&&e===void 0&&!Cr(t,r.slice(0,-1))?t:ll(t,r,e,n)}function fp(t){return Pe(t)==="object"&&t!==null&&Object.getPrototypeOf(t)===Object.prototype}function Ms(t){return Array.isArray(t)?[]:{}}var pp=typeof Reflect>"u"?Object.keys:Reflect.ownKeys;function fn(){for(var t=arguments.length,r=new Array(t),e=0;e<t;e++)r[e]=arguments[e];var n=Ms(r[0]);return r.forEach(function(i){function a(o,s){var c=new Set(s),u=Cr(i,o),l=Array.isArray(u);if(l||fp(u)){if(!c.has(u)){c.add(u);var x=Cr(n,o);l?n=or(n,o,[]):(!x||Pe(x)!=="object")&&(n=or(n,o,Ms(u))),pp(u).forEach(function(f){a([].concat(me(o),[f]),c)})}}else n=or(n,o,u)}a([])}),n}const hp=L.createContext({}),vp=da(void 0),Ut="${label} is not a valid ${type}",xa={Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:Ut,method:Ut,array:Ut,object:Ut,number:Ut,date:Ut,boolean:Ut,integer:Ut,float:Ut,regexp:Ut,email:Ut,url:Ut,hex:Ut},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}}};Object.assign({},xa.Modal);let hi=[];const Ls=()=>hi.reduce((t,r)=>Object.assign(Object.assign({},t),r),xa.Modal);function xp(t){if(t){const r=Object.assign({},t);return hi.push(r),Ls(),()=>{hi=hi.filter(e=>e!==r),Ls()}}Object.assign({},xa.Modal)}const cl=da(void 0),gp="internalMark",mp=t=>{const{locale:r={},children:e,_ANT_MARK__:n}=t;L.useEffect(()=>xp(r==null?void 0:r.Modal),[r]);const i=L.useMemo(()=>Object.assign(Object.assign({},r),{exist:!0}),[r]);return L.createElement(cl.Provider,{value:i},e)},dl={blue:"#1677FF",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#EB2F96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},Mn=Object.assign(Object.assign({},dl),{colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorLink:"",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
60
+ 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
61
+ 'Noto Color Emoji'`,fontFamilyCode:"'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace",fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1,motion:!0});function yp(t,{generateColorPalettes:r,generateNeutralColorPalettes:e}){const{colorSuccess:n,colorWarning:i,colorError:a,colorInfo:o,colorPrimary:s,colorBgBase:c,colorTextBase:u}=t,l=r(s),x=r(n),f=r(i),m=r(a),v=r(o),p=e(c,u),d=t.colorLink||t.colorInfo,y=r(d),h=new Rt(m[1]).mix(new Rt(m[3]),50).toHexString();return Object.assign(Object.assign({},p),{colorPrimaryBg:l[1],colorPrimaryBgHover:l[2],colorPrimaryBorder:l[3],colorPrimaryBorderHover:l[4],colorPrimaryHover:l[5],colorPrimary:l[6],colorPrimaryActive:l[7],colorPrimaryTextHover:l[8],colorPrimaryText:l[9],colorPrimaryTextActive:l[10],colorSuccessBg:x[1],colorSuccessBgHover:x[2],colorSuccessBorder:x[3],colorSuccessBorderHover:x[4],colorSuccessHover:x[4],colorSuccess:x[6],colorSuccessActive:x[7],colorSuccessTextHover:x[8],colorSuccessText:x[9],colorSuccessTextActive:x[10],colorErrorBg:m[1],colorErrorBgHover:m[2],colorErrorBgFilledHover:h,colorErrorBgActive:m[3],colorErrorBorder:m[3],colorErrorBorderHover:m[4],colorErrorHover:m[5],colorError:m[6],colorErrorActive:m[7],colorErrorTextHover:m[8],colorErrorText:m[9],colorErrorTextActive:m[10],colorWarningBg:f[1],colorWarningBgHover:f[2],colorWarningBorder:f[3],colorWarningBorderHover:f[4],colorWarningHover:f[4],colorWarning:f[6],colorWarningActive:f[7],colorWarningTextHover:f[8],colorWarningText:f[9],colorWarningTextActive:f[10],colorInfoBg:v[1],colorInfoBgHover:v[2],colorInfoBorder:v[3],colorInfoBorderHover:v[4],colorInfoHover:v[4],colorInfo:v[6],colorInfoActive:v[7],colorInfoTextHover:v[8],colorInfoText:v[9],colorInfoTextActive:v[10],colorLinkHover:y[4],colorLink:y[6],colorLinkActive:y[7],colorBgMask:new Rt("#000").setA(.45).toRgbString(),colorWhite:"#fff"})}const Cp=t=>{let r=t,e=t,n=t,i=t;return t<6&&t>=5?r=t+1:t<16&&t>=6?r=t+2:t>=16&&(r=16),t<7&&t>=5?e=4:t<8&&t>=7?e=5:t<14&&t>=8?e=6:t<16&&t>=14?e=7:t>=16&&(e=8),t<6&&t>=2?n=1:t>=6&&(n=2),t>4&&t<8?i=4:t>=8&&(i=6),{borderRadius:t,borderRadiusXS:n,borderRadiusSM:e,borderRadiusLG:r,borderRadiusOuter:i}};function bp(t){const{motionUnit:r,motionBase:e,borderRadius:n,lineWidth:i}=t;return Object.assign({motionDurationFast:`${(e+r).toFixed(1)}s`,motionDurationMid:`${(e+r*2).toFixed(1)}s`,motionDurationSlow:`${(e+r*3).toFixed(1)}s`,lineWidthBold:i+1},Cp(n))}const Ep=t=>{const{controlHeight:r}=t;return{controlHeightSM:r*.75,controlHeightXS:r*.5,controlHeightLG:r*1.25}};function Fp(t){return(t+8)/t}function wp(t){const r=Array.from({length:10}).map((e,n)=>{const i=n-1,a=t*Math.pow(Math.E,i/5),o=n>1?Math.floor(a):Math.ceil(a);return Math.floor(o/2)*2});return r[1]=t,r.map(e=>({size:e,lineHeight:Fp(e)}))}const Ap=t=>{const r=wp(t),e=r.map(l=>l.size),n=r.map(l=>l.lineHeight),i=e[1],a=e[0],o=e[2],s=n[1],c=n[0],u=n[2];return{fontSizeSM:a,fontSize:i,fontSizeLG:o,fontSizeXL:e[3],fontSizeHeading1:e[6],fontSizeHeading2:e[5],fontSizeHeading3:e[4],fontSizeHeading4:e[3],fontSizeHeading5:e[2],lineHeight:s,lineHeightLG:u,lineHeightSM:c,fontHeight:Math.round(s*i),fontHeightLG:Math.round(u*o),fontHeightSM:Math.round(c*a),lineHeightHeading1:n[6],lineHeightHeading2:n[5],lineHeightHeading3:n[4],lineHeightHeading4:n[3],lineHeightHeading5:n[2]}};function Bp(t){const{sizeUnit:r,sizeStep:e}=t;return{sizeXXL:r*(e+8),sizeXL:r*(e+4),sizeLG:r*(e+2),sizeMD:r*(e+1),sizeMS:r*e,size:r*e,sizeSM:r*(e-1),sizeXS:r*(e-2),sizeXXS:r*(e-3)}}const Qt=(t,r)=>new Rt(t).setA(r).toRgbString(),kn=(t,r)=>new Rt(t).darken(r).toHexString(),Sp=t=>{const r=ta(t);return{1:r[0],2:r[1],3:r[2],4:r[3],5:r[4],6:r[5],7:r[6],8:r[4],9:r[5],10:r[6]}},Dp=(t,r)=>{const e=t||"#fff",n=r||"#000";return{colorBgBase:e,colorTextBase:n,colorText:Qt(n,.88),colorTextSecondary:Qt(n,.65),colorTextTertiary:Qt(n,.45),colorTextQuaternary:Qt(n,.25),colorFill:Qt(n,.15),colorFillSecondary:Qt(n,.06),colorFillTertiary:Qt(n,.04),colorFillQuaternary:Qt(n,.02),colorBgSolid:Qt(n,1),colorBgSolidHover:Qt(n,.75),colorBgSolidActive:Qt(n,.95),colorBgLayout:kn(e,4),colorBgContainer:kn(e,0),colorBgElevated:kn(e,0),colorBgSpotlight:Qt(n,.85),colorBgBlur:"transparent",colorBorder:kn(e,15),colorBorderSecondary:kn(e,6)}};function _p(t){Ba.pink=Ba.magenta,Sa.pink=Sa.magenta;const r=Object.keys(dl).map(e=>{const n=t[e]===Ba[e]?Sa[e]:ta(t[e]);return Array.from({length:10},()=>1).reduce((i,a,o)=>(i[`${e}-${o+1}`]=n[o],i[`${e}${o+1}`]=n[o],i),{})}).reduce((e,n)=>(e=Object.assign(Object.assign({},e),n),e),{});return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},t),r),yp(t,{generateColorPalettes:Sp,generateNeutralColorPalettes:Dp})),Ap(t.fontSize)),Bp(t)),Ep(t)),bp(t))}const fl=lo(_p),vo={token:Mn,override:{override:Mn},hashed:!0},pl=ye.createContext(vo),xo="ant",ga="anticon",kp=(t,r)=>r||(t?`${xo}-${t}`:xo),Sr=L.createContext({getPrefixCls:kp,iconPrefixCls:ga}),{Consumer:A2}=Sr,Rp=`-ant-${Date.now()}-${Math.random()}`;function Tp(t,r){const e={},n=(o,s)=>{let c=o.clone();return c=(s==null?void 0:s(c))||c,c.toRgbString()},i=(o,s)=>{const c=new Rt(o),u=ta(c.toRgbString());e[`${s}-color`]=n(c),e[`${s}-color-disabled`]=u[1],e[`${s}-color-hover`]=u[4],e[`${s}-color-active`]=u[6],e[`${s}-color-outline`]=c.clone().setA(.2).toRgbString(),e[`${s}-color-deprecated-bg`]=u[0],e[`${s}-color-deprecated-border`]=u[2]};if(r.primaryColor){i(r.primaryColor,"primary");const o=new Rt(r.primaryColor),s=ta(o.toRgbString());s.forEach((u,l)=>{e[`primary-${l+1}`]=u}),e["primary-color-deprecated-l-35"]=n(o,u=>u.lighten(35)),e["primary-color-deprecated-l-20"]=n(o,u=>u.lighten(20)),e["primary-color-deprecated-t-20"]=n(o,u=>u.tint(20)),e["primary-color-deprecated-t-50"]=n(o,u=>u.tint(50)),e["primary-color-deprecated-f-12"]=n(o,u=>u.setA(u.a*.12));const c=new Rt(s[0]);e["primary-color-active-deprecated-f-30"]=n(c,u=>u.setA(u.a*.3)),e["primary-color-active-deprecated-d-02"]=n(c,u=>u.darken(2))}return r.successColor&&i(r.successColor,"success"),r.warningColor&&i(r.warningColor,"warning"),r.errorColor&&i(r.errorColor,"error"),r.infoColor&&i(r.infoColor,"info"),`
62
+ :root {
63
+ ${Object.keys(e).map(o=>`--${t}-${o}: ${e[o]};`).join(`
64
+ `)}
65
+ }
66
+ `.trim()}function Ip(t,r){const e=Tp(t,r);Lr()&&vn(e,`${Rp}-dynamic-theme`)}const go=L.createContext(!1),Pp=({children:t,disabled:r})=>{const e=L.useContext(go);return L.createElement(go.Provider,{value:r??e},t)},Ln=L.createContext(void 0),Np=({children:t,size:r})=>{const e=L.useContext(Ln);return L.createElement(Ln.Provider,{value:r||e},t)};function Op(){const t=Fr(go),r=Fr(Ln);return{componentDisabled:t,componentSize:r}}var hl=It(function t(){Pt(this,t)}),vl="CALC_UNIT",Mp=new RegExp(vl,"g");function La(t){return typeof t=="number"?"".concat(t).concat(vl):t}var Lp=(function(t){wn(e,t);var r=Sn(e);function e(n,i){var a;Pt(this,e),a=r.call(this),H(Se(a),"result",""),H(Se(a),"unitlessCssVar",void 0),H(Se(a),"lowPriority",void 0);var o=Pe(n);return a.unitlessCssVar=i,n instanceof e?a.result="(".concat(n.result,")"):o==="number"?a.result=La(n):o==="string"&&(a.result=n),a}return It(e,[{key:"add",value:function(i){return i instanceof e?this.result="".concat(this.result," + ").concat(i.getResult()):(typeof i=="number"||typeof i=="string")&&(this.result="".concat(this.result," + ").concat(La(i))),this.lowPriority=!0,this}},{key:"sub",value:function(i){return i instanceof e?this.result="".concat(this.result," - ").concat(i.getResult()):(typeof i=="number"||typeof i=="string")&&(this.result="".concat(this.result," - ").concat(La(i))),this.lowPriority=!0,this}},{key:"mul",value:function(i){return this.lowPriority&&(this.result="(".concat(this.result,")")),i instanceof e?this.result="".concat(this.result," * ").concat(i.getResult(!0)):(typeof i=="number"||typeof i=="string")&&(this.result="".concat(this.result," * ").concat(i)),this.lowPriority=!1,this}},{key:"div",value:function(i){return this.lowPriority&&(this.result="(".concat(this.result,")")),i instanceof e?this.result="".concat(this.result," / ").concat(i.getResult(!0)):(typeof i=="number"||typeof i=="string")&&(this.result="".concat(this.result," / ").concat(i)),this.lowPriority=!1,this}},{key:"getResult",value:function(i){return this.lowPriority||i?"(".concat(this.result,")"):this.result}},{key:"equal",value:function(i){var a=this,o=i||{},s=o.unit,c=!0;return typeof s=="boolean"?c=s:Array.from(this.unitlessCssVar).some(function(u){return a.result.includes(u)})&&(c=!1),this.result=this.result.replace(Mp,c?"px":""),typeof this.lowPriority<"u"?"calc(".concat(this.result,")"):this.result}}]),e})(hl),$p=(function(t){wn(e,t);var r=Sn(e);function e(n){var i;return Pt(this,e),i=r.call(this),H(Se(i),"result",0),n instanceof e?i.result=n.result:typeof n=="number"&&(i.result=n),i}return It(e,[{key:"add",value:function(i){return i instanceof e?this.result+=i.result:typeof i=="number"&&(this.result+=i),this}},{key:"sub",value:function(i){return i instanceof e?this.result-=i.result:typeof i=="number"&&(this.result-=i),this}},{key:"mul",value:function(i){return i instanceof e?this.result*=i.result:typeof i=="number"&&(this.result*=i),this}},{key:"div",value:function(i){return i instanceof e?this.result/=i.result:typeof i=="number"&&(this.result/=i),this}},{key:"equal",value:function(){return this.result}}]),e})(hl),zp=function(r,e){var n=r==="css"?Lp:$p;return function(i){return new n(i,e)}},$s=function(r,e){return"".concat([e,r.replace(/([A-Z]+)([A-Z][a-z]+)/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2")].filter(Boolean).join("-"))};function oa(t){var r=L.useRef();r.current=t;var e=L.useCallback(function(){for(var n,i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return(n=r.current)===null||n===void 0?void 0:n.call.apply(n,[r].concat(a))},[]);return e}function mo(t){var r=L.useRef(!1),e=L.useState(t),n=xe(e,2),i=n[0],a=n[1];L.useEffect(function(){return r.current=!1,function(){r.current=!0}},[]);function o(s,c){c&&r.current||a(s)}return[i,o]}var $a={exports:{}},Ve={};/**
67
+ * @license React
68
+ * react-is.production.min.js
69
+ *
70
+ * Copyright (c) Facebook, Inc. and its affiliates.
71
+ *
72
+ * This source code is licensed under the MIT license found in the
73
+ * LICENSE file in the root directory of this source tree.
74
+ */var zs;function qp(){if(zs)return Ve;zs=1;var t=Symbol.for("react.element"),r=Symbol.for("react.portal"),e=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),o=Symbol.for("react.context"),s=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),x=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),v;v=Symbol.for("react.module.reference");function p(d){if(typeof d=="object"&&d!==null){var y=d.$$typeof;switch(y){case t:switch(d=d.type,d){case e:case i:case n:case u:case l:return d;default:switch(d=d&&d.$$typeof,d){case s:case o:case c:case f:case x:case a:return d;default:return y}}case r:return y}}}return Ve.ContextConsumer=o,Ve.ContextProvider=a,Ve.Element=t,Ve.ForwardRef=c,Ve.Fragment=e,Ve.Lazy=f,Ve.Memo=x,Ve.Portal=r,Ve.Profiler=i,Ve.StrictMode=n,Ve.Suspense=u,Ve.SuspenseList=l,Ve.isAsyncMode=function(){return!1},Ve.isConcurrentMode=function(){return!1},Ve.isContextConsumer=function(d){return p(d)===o},Ve.isContextProvider=function(d){return p(d)===a},Ve.isElement=function(d){return typeof d=="object"&&d!==null&&d.$$typeof===t},Ve.isForwardRef=function(d){return p(d)===c},Ve.isFragment=function(d){return p(d)===e},Ve.isLazy=function(d){return p(d)===f},Ve.isMemo=function(d){return p(d)===x},Ve.isPortal=function(d){return p(d)===r},Ve.isProfiler=function(d){return p(d)===i},Ve.isStrictMode=function(d){return p(d)===n},Ve.isSuspense=function(d){return p(d)===u},Ve.isSuspenseList=function(d){return p(d)===l},Ve.isValidElementType=function(d){return typeof d=="string"||typeof d=="function"||d===e||d===i||d===n||d===u||d===l||d===m||typeof d=="object"&&d!==null&&(d.$$typeof===f||d.$$typeof===x||d.$$typeof===a||d.$$typeof===o||d.$$typeof===c||d.$$typeof===v||d.getModuleId!==void 0)},Ve.typeOf=p,Ve}var qs;function Hp(){return qs||(qs=1,$a.exports=qp()),$a.exports}var za=Hp(),Vp=Symbol.for("react.element"),jp=Symbol.for("react.transitional.element"),Up=Symbol.for("react.fragment");function xl(t){return t&&Pe(t)==="object"&&(t.$$typeof===Vp||t.$$typeof===jp)&&t.type===Up}var Wp=Number(yc.split(".")[0]),Kp=function(r,e){typeof r=="function"?r(e):Pe(r)==="object"&&r&&"current"in r&&(r.current=e)},Gp=function(r){var e,n;if(!r)return!1;if(gl(r)&&Wp>=19)return!0;var i=za.isMemo(r)?r.type.type:r.type;return!(typeof i=="function"&&!((e=i.prototype)!==null&&e!==void 0&&e.render)&&i.$$typeof!==za.ForwardRef||typeof r=="function"&&!((n=r.prototype)!==null&&n!==void 0&&n.render)&&r.$$typeof!==za.ForwardRef)};function gl(t){return Cc(t)&&!xl(t)}var Xp=function(r){if(r&&gl(r)){var e=r;return e.props.propertyIsEnumerable("ref")?e.props.ref:e.ref}return null};function Hs(t,r,e,n){var i=J({},r[t]);if(n!=null&&n.deprecatedTokens){var a=n.deprecatedTokens;a.forEach(function(s){var c=xe(s,2),u=c[0],l=c[1];if(i!=null&&i[u]||i!=null&&i[l]){var x;(x=i[l])!==null&&x!==void 0||(i[l]=i==null?void 0:i[u])}})}var o=J(J({},e),i);return Object.keys(o).forEach(function(s){o[s]===r[s]&&delete o[s]}),o}var ml=typeof CSSINJS_STATISTIC<"u",yo=!0;function Yo(){for(var t=arguments.length,r=new Array(t),e=0;e<t;e++)r[e]=arguments[e];if(!ml)return Object.assign.apply(Object,[{}].concat(r));yo=!1;var n={};return r.forEach(function(i){if(Pe(i)==="object"){var a=Object.keys(i);a.forEach(function(o){Object.defineProperty(n,o,{configurable:!0,enumerable:!0,get:function(){return i[o]}})})}}),yo=!0,n}var Vs={};function Yp(){}var Qp=function(r){var e,n=r,i=Yp;return ml&&typeof Proxy<"u"&&(e=new Set,n=new Proxy(r,{get:function(o,s){if(yo){var c;(c=e)===null||c===void 0||c.add(s)}return o[s]}}),i=function(o,s){var c;Vs[o]={global:Array.from(e),component:J(J({},(c=Vs[o])===null||c===void 0?void 0:c.component),s)}}),{token:n,keys:e,flush:i}};function js(t,r,e){if(typeof e=="function"){var n;return e(Yo(r,(n=r[t])!==null&&n!==void 0?n:{}))}return e??{}}function Zp(t){return t==="js"?{max:Math.max,min:Math.min}:{max:function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return"max(".concat(n.map(function(a){return _s(a)}).join(","),")")},min:function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return"min(".concat(n.map(function(a){return _s(a)}).join(","),")")}}}var Jp=1e3*60*10,eh=(function(){function t(){Pt(this,t),H(this,"map",new Map),H(this,"objectIDMap",new WeakMap),H(this,"nextID",0),H(this,"lastAccessBeat",new Map),H(this,"accessBeat",0)}return It(t,[{key:"set",value:function(e,n){this.clear();var i=this.getCompositeKey(e);this.map.set(i,n),this.lastAccessBeat.set(i,Date.now())}},{key:"get",value:function(e){var n=this.getCompositeKey(e),i=this.map.get(n);return this.lastAccessBeat.set(n,Date.now()),this.accessBeat+=1,i}},{key:"getCompositeKey",value:function(e){var n=this,i=e.map(function(a){return a&&Pe(a)==="object"?"obj_".concat(n.getObjectID(a)):"".concat(Pe(a),"_").concat(a)});return i.join("|")}},{key:"getObjectID",value:function(e){if(this.objectIDMap.has(e))return this.objectIDMap.get(e);var n=this.nextID;return this.objectIDMap.set(e,n),this.nextID+=1,n}},{key:"clear",value:function(){var e=this;if(this.accessBeat>1e4){var n=Date.now();this.lastAccessBeat.forEach(function(i,a){n-i>Jp&&(e.map.delete(a),e.lastAccessBeat.delete(a))}),this.accessBeat=0}}}]),t})(),Us=new eh;function th(t,r){return ye.useMemo(function(){var e=Us.get(r);if(e)return e;var n=t();return Us.set(r,n),n},r)}var rh=function(){return{}};function nh(t){var r=t.useCSP,e=r===void 0?rh:r,n=t.useToken,i=t.usePrefix,a=t.getResetStyles,o=t.getCommonStyle,s=t.getCompUnitless;function c(f,m,v,p){var d=Array.isArray(f)?f[0]:f;function y(w){return"".concat(String(d)).concat(w.slice(0,1).toUpperCase()).concat(w.slice(1))}var h=(p==null?void 0:p.unitless)||{},C=typeof s=="function"?s(f):{},b=J(J({},C),{},H({},y("zIndexPopup"),!0));Object.keys(h).forEach(function(w){b[y(w)]=h[w]});var E=J(J({},p),{},{unitless:b,prefixToken:y}),F=l(f,m,v,E),A=u(d,v,E);return function(w){var B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:w,g=F(w,B),S=xe(g,2),_=S[1],R=A(B),P=xe(R,2),z=P[0],$=P[1];return[z,_,$]}}function u(f,m,v){var p=v.unitless,d=v.injectStyle,y=d===void 0?!0:d,h=v.prefixToken,C=v.ignore,b=function(A){var w=A.rootCls,B=A.cssVar,g=B===void 0?{}:B,S=n(),_=S.realToken;return lp({path:[f],prefix:g.prefix,key:g.key,unitless:p,ignore:C,token:_,scope:w},function(){var R=js(f,_,m),P=Hs(f,_,R,{deprecatedTokens:v==null?void 0:v.deprecatedTokens});return Object.keys(R).forEach(function(z){P[h(z)]=P[z],delete P[z]}),P}),null},E=function(A){var w=n(),B=w.cssVar;return[function(g){return y&&B?ye.createElement(ye.Fragment,null,ye.createElement(b,{rootCls:A,cssVar:B,component:f}),g):g},B==null?void 0:B.key]};return E}function l(f,m,v){var p=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},d=Array.isArray(f)?f:[f,f],y=xe(d,1),h=y[0],C=d.join("-"),b=t.layer||{name:"antd"};return function(E){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:E,A=n(),w=A.theme,B=A.realToken,g=A.hashId,S=A.token,_=A.cssVar,R=i(),P=R.rootPrefixCls,z=R.iconPrefixCls,$=e(),j=_?"css":"js",q=th(function(){var I=new Set;return _&&Object.keys(p.unitless||{}).forEach(function(V){I.add(li(V,_.prefix)),I.add(li(V,$s(h,_.prefix)))}),zp(j,I)},[j,h,_==null?void 0:_.prefix]),Y=Zp(j),U=Y.max,M=Y.min,N={theme:w,token:S,hashId:g,nonce:function(){return $.nonce},clientOnly:p.clientOnly,layer:b,order:p.order||-999};typeof a=="function"&&ho(J(J({},N),{},{clientOnly:!1,path:["Shared",P]}),function(){return a(S,{prefix:{rootPrefixCls:P,iconPrefixCls:z},csp:$})});var O=ho(J(J({},N),{},{path:[C,E,z]}),function(){if(p.injectStyle===!1)return[];var I=Qp(S),V=I.token,X=I.flush,ee=js(h,B,v),re=".".concat(E),ie=Hs(h,B,ee,{deprecatedTokens:p.deprecatedTokens});_&&ee&&Pe(ee)==="object"&&Object.keys(ee).forEach(function(G){ee[G]="var(".concat(li(G,$s(h,_.prefix)),")")});var se=Yo(V,{componentCls:re,prefixCls:E,iconCls:".".concat(z),antCls:".".concat(P),calc:q,max:U,min:M},_?ee:ie),De=m(se,{hashId:g,prefixCls:E,rootPrefixCls:P,iconPrefixCls:z});X(h,ie);var Q=typeof o=="function"?o(se,E,F,p.resetFont):null;return[p.resetStyle===!1?null:Q,De]});return[O,g]}}function x(f,m,v){var p=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},d=l(f,m,v,J({resetStyle:!1,order:-998},p)),y=function(C){var b=C.prefixCls,E=C.rootCls,F=E===void 0?b:E;return d(b,F),null};return y}return{genStyleHooks:c,genSubStyleComponent:x,genComponentStyleHook:l}}const ih="5.28.0";function qa(t){return t>=0&&t<=255}function ei(t,r){const{r:e,g:n,b:i,a}=new Rt(t).toRgb();if(a<1)return t;const{r:o,g:s,b:c}=new Rt(r).toRgb();for(let u=.01;u<=1;u+=.01){const l=Math.round((e-o*(1-u))/u),x=Math.round((n-s*(1-u))/u),f=Math.round((i-c*(1-u))/u);if(qa(l)&&qa(x)&&qa(f))return new Rt({r:l,g:x,b:f,a:Math.round(u*100)/100}).toRgbString()}return new Rt({r:e,g:n,b:i,a:1}).toRgbString()}var ah=function(t,r){var e={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&r.indexOf(n)<0&&(e[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)r.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(e[n[i]]=t[n[i]]);return e};function yl(t){const{override:r}=t,e=ah(t,["override"]),n=Object.assign({},r);Object.keys(Mn).forEach(f=>{delete n[f]});const i=Object.assign(Object.assign({},e),n),a=480,o=576,s=768,c=992,u=1200,l=1600;return i.motion===!1&&(i.motionDurationFast="0s",i.motionDurationMid="0s",i.motionDurationSlow="0s"),Object.assign(Object.assign(Object.assign({},i),{colorFillContent:i.colorFillSecondary,colorFillContentHover:i.colorFill,colorFillAlter:i.colorFillQuaternary,colorBgContainerDisabled:i.colorFillTertiary,colorBorderBg:i.colorBgContainer,colorSplit:ei(i.colorBorderSecondary,i.colorBgContainer),colorTextPlaceholder:i.colorTextQuaternary,colorTextDisabled:i.colorTextQuaternary,colorTextHeading:i.colorText,colorTextLabel:i.colorTextSecondary,colorTextDescription:i.colorTextTertiary,colorTextLightSolid:i.colorWhite,colorHighlight:i.colorError,colorBgTextHover:i.colorFillSecondary,colorBgTextActive:i.colorFill,colorIcon:i.colorTextTertiary,colorIconHover:i.colorText,colorErrorOutline:ei(i.colorErrorBg,i.colorBgContainer),colorWarningOutline:ei(i.colorWarningBg,i.colorBgContainer),fontSizeIcon:i.fontSizeSM,lineWidthFocus:i.lineWidth*3,lineWidth:i.lineWidth,controlOutlineWidth:i.lineWidth*2,controlInteractiveSize:i.controlHeight/2,controlItemBgHover:i.colorFillTertiary,controlItemBgActive:i.colorPrimaryBg,controlItemBgActiveHover:i.colorPrimaryBgHover,controlItemBgActiveDisabled:i.colorFill,controlTmpOutline:i.colorFillQuaternary,controlOutline:ei(i.colorPrimaryBg,i.colorBgContainer),lineType:i.lineType,borderRadius:i.borderRadius,borderRadiusXS:i.borderRadiusXS,borderRadiusSM:i.borderRadiusSM,borderRadiusLG:i.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:i.sizeXXS,paddingXS:i.sizeXS,paddingSM:i.sizeSM,padding:i.size,paddingMD:i.sizeMD,paddingLG:i.sizeLG,paddingXL:i.sizeXL,paddingContentHorizontalLG:i.sizeLG,paddingContentVerticalLG:i.sizeMS,paddingContentHorizontal:i.sizeMS,paddingContentVertical:i.sizeSM,paddingContentHorizontalSM:i.size,paddingContentVerticalSM:i.sizeXS,marginXXS:i.sizeXXS,marginXS:i.sizeXS,marginSM:i.sizeSM,margin:i.size,marginMD:i.sizeMD,marginLG:i.sizeLG,marginXL:i.sizeXL,marginXXL:i.sizeXXL,boxShadow:`
75
+ 0 6px 16px 0 rgba(0, 0, 0, 0.08),
76
+ 0 3px 6px -4px rgba(0, 0, 0, 0.12),
77
+ 0 9px 28px 8px rgba(0, 0, 0, 0.05)
78
+ `,boxShadowSecondary:`
79
+ 0 6px 16px 0 rgba(0, 0, 0, 0.08),
80
+ 0 3px 6px -4px rgba(0, 0, 0, 0.12),
81
+ 0 9px 28px 8px rgba(0, 0, 0, 0.05)
82
+ `,boxShadowTertiary:`
83
+ 0 1px 2px 0 rgba(0, 0, 0, 0.03),
84
+ 0 1px 6px -1px rgba(0, 0, 0, 0.02),
85
+ 0 2px 4px 0 rgba(0, 0, 0, 0.02)
86
+ `,screenXS:a,screenXSMin:a,screenXSMax:o-1,screenSM:o,screenSMMin:o,screenSMMax:s-1,screenMD:s,screenMDMin:s,screenMDMax:c-1,screenLG:c,screenLGMin:c,screenLGMax:u-1,screenXL:u,screenXLMin:u,screenXLMax:l-1,screenXXL:l,screenXXLMin:l,boxShadowPopoverArrow:"2px 2px 5px rgba(0, 0, 0, 0.05)",boxShadowCard:`
87
+ 0 1px 2px -2px ${new Rt("rgba(0, 0, 0, 0.16)").toRgbString()},
88
+ 0 3px 6px 0 ${new Rt("rgba(0, 0, 0, 0.12)").toRgbString()},
89
+ 0 5px 12px 4px ${new Rt("rgba(0, 0, 0, 0.09)").toRgbString()}
90
+ `,boxShadowDrawerRight:`
91
+ -6px 0 16px 0 rgba(0, 0, 0, 0.08),
92
+ -3px 0 6px -4px rgba(0, 0, 0, 0.12),
93
+ -9px 0 28px 8px rgba(0, 0, 0, 0.05)
94
+ `,boxShadowDrawerLeft:`
95
+ 6px 0 16px 0 rgba(0, 0, 0, 0.08),
96
+ 3px 0 6px -4px rgba(0, 0, 0, 0.12),
97
+ 9px 0 28px 8px rgba(0, 0, 0, 0.05)
98
+ `,boxShadowDrawerUp:`
99
+ 0 6px 16px 0 rgba(0, 0, 0, 0.08),
100
+ 0 3px 6px -4px rgba(0, 0, 0, 0.12),
101
+ 0 9px 28px 8px rgba(0, 0, 0, 0.05)
102
+ `,boxShadowDrawerDown:`
103
+ 0 -6px 16px 0 rgba(0, 0, 0, 0.08),
104
+ 0 -3px 6px -4px rgba(0, 0, 0, 0.12),
105
+ 0 -9px 28px 8px rgba(0, 0, 0, 0.05)
106
+ `,boxShadowTabsOverflowLeft:"inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowRight:"inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowTop:"inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowBottom:"inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)"}),n)}var Ws=function(t,r){var e={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&r.indexOf(n)<0&&(e[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)r.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(e[n[i]]=t[n[i]]);return e};const Cl={lineHeight:!0,lineHeightSM:!0,lineHeightLG:!0,lineHeightHeading1:!0,lineHeightHeading2:!0,lineHeightHeading3:!0,lineHeightHeading4:!0,lineHeightHeading5:!0,opacityLoading:!0,fontWeightStrong:!0,zIndexPopupBase:!0,zIndexBase:!0,opacityImage:!0},oh={motionBase:!0,motionUnit:!0},sh={screenXS:!0,screenXSMin:!0,screenXSMax:!0,screenSM:!0,screenSMMin:!0,screenSMMax:!0,screenMD:!0,screenMDMin:!0,screenMDMax:!0,screenLG:!0,screenLGMin:!0,screenLGMax:!0,screenXL:!0,screenXLMin:!0,screenXLMax:!0,screenXXL:!0,screenXXLMin:!0},bl=(t,r,e)=>{const n=e.getDerivativeToken(t),{override:i}=r,a=Ws(r,["override"]);let o=Object.assign(Object.assign({},n),{override:i});return o=yl(o),a&&Object.entries(a).forEach(([s,c])=>{const{theme:u}=c,l=Ws(c,["theme"]);let x=l;u&&(x=bl(Object.assign(Object.assign({},o),l),{override:l},u)),o[s]=x}),o};function ma(){const{token:t,hashed:r,theme:e,override:n,cssVar:i}=ye.useContext(pl),a=`${ih}-${r||""}`,o=e||fl,[s,c,u]=Nf(o,[Mn,t],{salt:a,override:n,getComputedToken:bl,formatToken:yl,cssVar:i&&{prefix:i.prefix,key:i.key,unitless:Cl,ignore:oh,preserve:sh}});return[o,u,r?c:"",s,i]}const uh=(t,r=!1)=>({boxSizing:"border-box",margin:0,padding:0,color:t.colorText,fontSize:t.fontSize,lineHeight:t.lineHeight,listStyle:"none",fontFamily:r?"inherit":t.fontFamily}),lh=()=>({display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block"}}),ch=t=>({a:{color:t.colorLink,textDecoration:t.linkDecoration,backgroundColor:"transparent",outline:"none",cursor:"pointer",transition:`color ${t.motionDurationSlow}`,"-webkit-text-decoration-skip":"objects","&:hover":{color:t.colorLinkHover},"&:active":{color:t.colorLinkActive},"&:active, &:hover":{textDecoration:t.linkHoverDecoration,outline:0},"&:focus":{textDecoration:t.linkFocusDecoration,outline:0},"&[disabled]":{color:t.colorTextDisabled,cursor:"not-allowed"}}}),dh=(t,r,e,n)=>{const i=`[class^="${r}"], [class*=" ${r}"]`,a=e?`.${e}`:i,o={boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}};let s={};return n!==!1&&(s={fontFamily:t.fontFamily,fontSize:t.fontSize}),{[a]:Object.assign(Object.assign(Object.assign({},s),o),{[i]:o})}},El=t=>({[`.${t}`]:Object.assign(Object.assign({},lh()),{[`.${t} .${t}-icon`]:{display:"block"}})}),{genStyleHooks:fh}=nh({usePrefix:()=>{const{getPrefixCls:t,iconPrefixCls:r}=Fr(Sr);return{rootPrefixCls:t(),iconPrefixCls:r}},useToken:()=>{const[t,r,e,n,i]=ma();return{theme:t,realToken:r,hashId:e,token:n,cssVar:i}},useCSP:()=>{const{csp:t}=Fr(Sr);return t??{}},getResetStyles:(t,r)=>{var e;const n=ch(t);return[n,{"&":n},El((e=r==null?void 0:r.prefix.iconPrefixCls)!==null&&e!==void 0?e:ga)]},getCommonStyle:dh,getCompUnitless:()=>Cl}),ph=(t,r)=>{const[e,n]=ma();return ho({token:n,hashId:"",path:["ant-design-icons",t],nonce:()=>r==null?void 0:r.nonce,layer:{name:"antd"}},()=>El(t))},hh=Object.assign({},L),{useId:Ks}=hh,vh=()=>"",xh=typeof Ks>"u"?vh:Ks;function gh(t,r,e){var n;const i=t||{},a=i.inherit===!1||!r?Object.assign(Object.assign({},vo),{hashed:(n=r==null?void 0:r.hashed)!==null&&n!==void 0?n:vo.hashed,cssVar:r==null?void 0:r.cssVar}):r,o=xh();return Ku(()=>{var s,c;if(!t)return r;const u=Object.assign({},a.components);Object.keys(t.components||{}).forEach(f=>{u[f]=Object.assign(Object.assign({},u[f]),t.components[f])});const l=`css-var-${o.replace(/:/g,"")}`,x=((s=i.cssVar)!==null&&s!==void 0?s:a.cssVar)&&Object.assign(Object.assign(Object.assign({prefix:e==null?void 0:e.prefixCls},typeof a.cssVar=="object"?a.cssVar:{}),typeof i.cssVar=="object"?i.cssVar:{}),{key:typeof i.cssVar=="object"&&((c=i.cssVar)===null||c===void 0?void 0:c.key)||l});return Object.assign(Object.assign(Object.assign({},a),i),{token:Object.assign(Object.assign({},a.token),i.token),components:u,cssVar:x})},[i,a],(s,c)=>s.some((u,l)=>{const x=c[l];return!so(u,x,!0)}))}function Gs(t){return t instanceof HTMLElement||t instanceof SVGElement}function Fl(t){return t&&Pe(t)==="object"&&Gs(t.nativeElement)?t.nativeElement:Gs(t)?t:null}function mh(t){var r=Fl(t);if(r)return r;if(t instanceof ye.Component){var e;return(e=ds.findDOMNode)===null||e===void 0?void 0:e.call(ds,t)}return null}var yh=["children"],wl=L.createContext({});function Ch(t){var r=t.children,e=Mr(t,yh);return L.createElement(wl.Provider,{value:e},r)}var bh=(function(t){wn(e,t);var r=Sn(e);function e(){return Pt(this,e),r.apply(this,arguments)}return It(e,[{key:"render",value:function(){return this.props.children}}]),e})(L.Component);function Eh(t){var r=L.useReducer(function(s){return s+1},0),e=xe(r,2),n=e[1],i=L.useRef(t),a=oa(function(){return i.current}),o=oa(function(s){i.current=typeof s=="function"?s(i.current):s,n()});return[a,o]}var Ir="none",ti="appear",ri="enter",ni="leave",Xs="none",sr="prepare",pn="start",hn="active",Qo="end",Al="prepared";function Ys(t,r){var e={};return e[t.toLowerCase()]=r.toLowerCase(),e["Webkit".concat(t)]="webkit".concat(r),e["Moz".concat(t)]="moz".concat(r),e["ms".concat(t)]="MS".concat(r),e["O".concat(t)]="o".concat(r.toLowerCase()),e}function Fh(t,r){var e={animationend:Ys("Animation","AnimationEnd"),transitionend:Ys("Transition","TransitionEnd")};return t&&("AnimationEvent"in r||delete e.animationend.animation,"TransitionEvent"in r||delete e.transitionend.transition),e}var wh=Fh(Lr(),typeof window<"u"?window:{}),Bl={};if(Lr()){var Ah=document.createElement("div");Bl=Ah.style}var ii={};function Sl(t){if(ii[t])return ii[t];var r=wh[t];if(r)for(var e=Object.keys(r),n=e.length,i=0;i<n;i+=1){var a=e[i];if(Object.prototype.hasOwnProperty.call(r,a)&&a in Bl)return ii[t]=r[a],ii[t]}return""}var Dl=Sl("animationend"),_l=Sl("transitionend"),kl=!!(Dl&&_l),Qs=Dl||"animationend",Zs=_l||"transitionend";function Js(t,r){if(!t)return null;if(Pe(t)==="object"){var e=r.replace(/-\w/g,function(n){return n[1].toUpperCase()});return t[e]}return"".concat(t,"-").concat(r)}const Bh=(function(t){var r=We();function e(i){i&&(i.removeEventListener(Zs,t),i.removeEventListener(Qs,t))}function n(i){r.current&&r.current!==i&&e(r.current),i&&i!==r.current&&(i.addEventListener(Zs,t),i.addEventListener(Qs,t),r.current=i)}return L.useEffect(function(){return function(){e(r.current)}},[]),[n,e]});var Rl=Lr()?bc:$e,Tl=function(r){return+setTimeout(r,16)},Il=function(r){return clearTimeout(r)};typeof window<"u"&&"requestAnimationFrame"in window&&(Tl=function(r){return window.requestAnimationFrame(r)},Il=function(r){return window.cancelAnimationFrame(r)});var e0=0,Zo=new Map;function Pl(t){Zo.delete(t)}var Co=function(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;e0+=1;var n=e0;function i(a){if(a===0)Pl(n),r();else{var o=Tl(function(){i(a-1)});Zo.set(n,o)}}return i(e),n};Co.cancel=function(t){var r=Zo.get(t);return Pl(t),Il(r)};const Sh=(function(){var t=L.useRef(null);function r(){Co.cancel(t.current)}function e(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;r();var a=Co(function(){i<=1?n({isCanceled:function(){return a!==t.current}}):e(n,i-1)});t.current=a}return L.useEffect(function(){return function(){r()}},[]),[e,r]});var Dh=[sr,pn,hn,Qo],_h=[sr,Al],Nl=!1,kh=!0;function Ol(t){return t===hn||t===Qo}const Rh=(function(t,r,e){var n=mo(Xs),i=xe(n,2),a=i[0],o=i[1],s=Sh(),c=xe(s,2),u=c[0],l=c[1];function x(){o(sr,!0)}var f=r?_h:Dh;return Rl(function(){if(a!==Xs&&a!==Qo){var m=f.indexOf(a),v=f[m+1],p=e(a);p===Nl?o(v,!0):v&&u(function(d){function y(){d.isCanceled()||o(v,!0)}p===!0?y():Promise.resolve(p).then(y)})}},[t,a]),L.useEffect(function(){return function(){l()}},[]),[x,a]});function Th(t,r,e,n){var i=n.motionEnter,a=i===void 0?!0:i,o=n.motionAppear,s=o===void 0?!0:o,c=n.motionLeave,u=c===void 0?!0:c,l=n.motionDeadline,x=n.motionLeaveImmediately,f=n.onAppearPrepare,m=n.onEnterPrepare,v=n.onLeavePrepare,p=n.onAppearStart,d=n.onEnterStart,y=n.onLeaveStart,h=n.onAppearActive,C=n.onEnterActive,b=n.onLeaveActive,E=n.onAppearEnd,F=n.onEnterEnd,A=n.onLeaveEnd,w=n.onVisibleChanged,B=mo(),g=xe(B,2),S=g[0],_=g[1],R=Eh(Ir),P=xe(R,2),z=P[0],$=P[1],j=mo(null),q=xe(j,2),Y=q[0],U=q[1],M=z(),N=We(!1),O=We(null);function I(){return e()}var V=We(!1);function X(){$(Ir),U(null,!0)}var ee=oa(function(Ce){var be=z();if(be!==Ir){var Ne=I();if(!(Ce&&!Ce.deadline&&Ce.target!==Ne)){var Ee=V.current,Ke;be===ti&&Ee?Ke=E==null?void 0:E(Ne,Ce):be===ri&&Ee?Ke=F==null?void 0:F(Ne,Ce):be===ni&&Ee&&(Ke=A==null?void 0:A(Ne,Ce)),Ee&&Ke!==!1&&X()}}}),re=Bh(ee),ie=xe(re,1),se=ie[0],De=function(be){switch(be){case ti:return H(H(H({},sr,f),pn,p),hn,h);case ri:return H(H(H({},sr,m),pn,d),hn,C);case ni:return H(H(H({},sr,v),pn,y),hn,b);default:return{}}},Q=L.useMemo(function(){return De(M)},[M]),G=Rh(M,!t,function(Ce){if(Ce===sr){var be=Q[sr];return be?be(I()):Nl}if(Z in Q){var Ne;U(((Ne=Q[Z])===null||Ne===void 0?void 0:Ne.call(Q,I(),null))||null)}return Z===hn&&M!==Ir&&(se(I()),l>0&&(clearTimeout(O.current),O.current=setTimeout(function(){ee({deadline:!0})},l))),Z===Al&&X(),kh}),ae=xe(G,2),le=ae[0],Z=ae[1],fe=Ol(Z);V.current=fe;var Be=We(null);Rl(function(){if(!(N.current&&Be.current===r)){_(r);var Ce=N.current;N.current=!0;var be;!Ce&&r&&s&&(be=ti),Ce&&r&&a&&(be=ri),(Ce&&!r&&u||!Ce&&x&&!r&&u)&&(be=ni);var Ne=De(be);be&&(t||Ne[sr])?($(be),le()):$(Ir),Be.current=r}},[r]),$e(function(){(M===ti&&!s||M===ri&&!a||M===ni&&!u)&&$(Ir)},[s,a,u]),$e(function(){return function(){N.current=!1,clearTimeout(O.current)}},[]);var Re=L.useRef(!1);$e(function(){S&&(Re.current=!0),S!==void 0&&M===Ir&&((Re.current||S)&&(w==null||w(S)),Re.current=!0)},[S,M]);var je=Y;return Q[sr]&&Z===pn&&(je=J({transition:"none"},je)),[M,Z,je,S??r]}function Ih(t){var r=t;Pe(t)==="object"&&(r=t.transitionSupport);function e(i,a){return!!(i.motionName&&r&&a!==!1)}var n=L.forwardRef(function(i,a){var o=i.visible,s=o===void 0?!0:o,c=i.removeOnLeave,u=c===void 0?!0:c,l=i.forceRender,x=i.children,f=i.motionName,m=i.leavedClassName,v=i.eventProps,p=L.useContext(wl),d=p.motion,y=e(i,d),h=We(),C=We();function b(){try{return h.current instanceof HTMLElement?h.current:mh(C.current)}catch{return null}}var E=Th(y,s,b,i),F=xe(E,4),A=F[0],w=F[1],B=F[2],g=F[3],S=L.useRef(g);g&&(S.current=!0);var _=L.useCallback(function(q){h.current=q,Kp(a,q)},[a]),R,P=J(J({},v),{},{visible:s});if(!x)R=null;else if(A===Ir)g?R=x(J({},P),_):!u&&S.current&&m?R=x(J(J({},P),{},{className:m}),_):l||!u&&!m?R=x(J(J({},P),{},{style:{display:"none"}}),_):R=null;else{var z;w===sr?z="prepare":Ol(w)?z="active":w===pn&&(z="start");var $=Js(f,"".concat(A,"-").concat(z));R=x(J(J({},P),{},{className:Er(Js(f,A),H(H({},$,$&&z),f,typeof f=="string")),style:B}),_)}if(L.isValidElement(R)&&Gp(R)){var j=Xp(R);j||(R=L.cloneElement(R,{ref:_}))}return L.createElement(bh,{ref:C},R)});return n.displayName="CSSMotion",n}const Ph=Ih(kl);var bo="add",Eo="keep",Fo="remove",Ha="removed";function Nh(t){var r;return t&&Pe(t)==="object"&&"key"in t?r=t:r={key:t},J(J({},r),{},{key:String(r.key)})}function wo(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return t.map(Nh)}function Oh(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],e=[],n=0,i=r.length,a=wo(t),o=wo(r);a.forEach(function(u){for(var l=!1,x=n;x<i;x+=1){var f=o[x];if(f.key===u.key){n<x&&(e=e.concat(o.slice(n,x).map(function(m){return J(J({},m),{},{status:bo})})),n=x),e.push(J(J({},f),{},{status:Eo})),n+=1,l=!0;break}}l||e.push(J(J({},u),{},{status:Fo}))}),n<i&&(e=e.concat(o.slice(n).map(function(u){return J(J({},u),{},{status:bo})})));var s={};e.forEach(function(u){var l=u.key;s[l]=(s[l]||0)+1});var c=Object.keys(s).filter(function(u){return s[u]>1});return c.forEach(function(u){e=e.filter(function(l){var x=l.key,f=l.status;return x!==u||f!==Fo}),e.forEach(function(l){l.key===u&&(l.status=Eo)})}),e}var Mh=["component","children","onVisibleChanged","onAllRemoved"],Lh=["status"],$h=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearPrepare","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function zh(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ph,e=(function(n){wn(a,n);var i=Sn(a);function a(){var o;Pt(this,a);for(var s=arguments.length,c=new Array(s),u=0;u<s;u++)c[u]=arguments[u];return o=i.call.apply(i,[this].concat(c)),H(Se(o),"state",{keyEntities:[]}),H(Se(o),"removeKey",function(l){o.setState(function(x){var f=x.keyEntities.map(function(m){return m.key!==l?m:J(J({},m),{},{status:Ha})});return{keyEntities:f}},function(){var x=o.state.keyEntities,f=x.filter(function(m){var v=m.status;return v!==Ha}).length;f===0&&o.props.onAllRemoved&&o.props.onAllRemoved()})}),o}return It(a,[{key:"render",value:function(){var s=this,c=this.state.keyEntities,u=this.props,l=u.component,x=u.children,f=u.onVisibleChanged;u.onAllRemoved;var m=Mr(u,Mh),v=l||L.Fragment,p={};return $h.forEach(function(d){p[d]=m[d],delete m[d]}),delete m.keys,L.createElement(v,m,c.map(function(d,y){var h=d.status,C=Mr(d,Lh),b=h===bo||h===Eo;return L.createElement(r,Tt({},p,{key:C.key,visible:b,eventProps:C,onVisibleChanged:function(F){f==null||f(F,{key:C.key}),F||s.removeKey(C.key)}}),function(E,F){return x(J(J({},E),{},{index:y}),F)})}))}}],[{key:"getDerivedStateFromProps",value:function(s,c){var u=s.keys,l=c.keyEntities,x=wo(u),f=Oh(l,x);return{keyEntities:f.filter(function(m){var v=l.find(function(p){var d=p.key;return m.key===d});return!(v&&v.status===Ha&&m.status===Fo)})}}}]),a})(L.Component);return H(e,"defaultProps",{component:"div"}),e}const qh=zh(kl),t0=L.createContext(!0);function Hh(t){const r=L.useContext(t0),{children:e}=t,[,n]=ma(),{motion:i}=n,a=L.useRef(!1);return a.current||(a.current=r!==i),a.current?L.createElement(t0.Provider,{value:i},L.createElement(Ch,{motion:i},e)):e}const Vh=()=>null;var jh=function(t,r){var e={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&r.indexOf(n)<0&&(e[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)r.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(e[n[i]]=t[n[i]]);return e};const Uh=["getTargetContainer","getPopupContainer","renderEmpty","input","pagination","form","select","button"];let sa,Ml,Ll,$l;function vi(){return sa||xo}function Wh(){return Ml||ga}function Kh(t){return Object.keys(t).some(r=>r.endsWith("Color"))}const Gh=t=>{const{prefixCls:r,iconPrefixCls:e,theme:n,holderRender:i}=t;r!==void 0&&(sa=r),e!==void 0&&(Ml=e),"holderRender"in t&&($l=i),n&&(Kh(n)?Ip(vi(),n):Ll=n)},Xh=()=>({getPrefixCls:(t,r)=>r||(t?`${vi()}-${t}`:vi()),getIconPrefixCls:Wh,getRootPrefixCls:()=>sa||vi(),getTheme:()=>Ll,holderRender:$l}),Yh=t=>{const{children:r,csp:e,autoInsertSpaceInButton:n,alert:i,anchor:a,form:o,locale:s,componentSize:c,direction:u,space:l,splitter:x,virtual:f,dropdownMatchSelectWidth:m,popupMatchSelectWidth:v,popupOverflow:p,legacyLocale:d,parentContext:y,iconPrefixCls:h,theme:C,componentDisabled:b,segmented:E,statistic:F,spin:A,calendar:w,carousel:B,cascader:g,collapse:S,typography:_,checkbox:R,descriptions:P,divider:z,drawer:$,skeleton:j,steps:q,image:Y,layout:U,list:M,mentions:N,modal:O,progress:I,result:V,slider:X,breadcrumb:ee,menu:re,pagination:ie,input:se,textArea:De,empty:Q,badge:G,radio:ae,rate:le,switch:Z,transfer:fe,avatar:Be,message:Re,tag:je,table:Ce,card:be,tabs:Ne,timeline:Ee,timePicker:Ke,upload:ne,notification:we,tree:ot,colorPicker:Bt,datePicker:St,rangePicker:$t,flex:qe,wave:zt,dropdown:cr,warning:Dr,tour:Dt,tooltip:wr,popover:dr,popconfirm:zr,floatButton:fr,floatButtonGroup:qr,variant:_r,inputNumber:Hr,treeSelect:qt}=t,Ct=L.useCallback((He,Ge)=>{const{prefixCls:dt}=t;if(Ge)return Ge;const ht=dt||y.getPrefixCls("");return He?`${ht}-${He}`:ht},[y.getPrefixCls,t.prefixCls]),_t=h||y.iconPrefixCls||ga,Ht=e||y.csp;ph(_t,Ht);const tr=gh(C,y.theme,{prefixCls:Ct("")}),Xt={csp:Ht,autoInsertSpaceInButton:n,alert:i,anchor:a,locale:s||d,direction:u,space:l,splitter:x,virtual:f,popupMatchSelectWidth:v??m,popupOverflow:p,getPrefixCls:Ct,iconPrefixCls:_t,theme:tr,segmented:E,statistic:F,spin:A,calendar:w,carousel:B,cascader:g,collapse:S,typography:_,checkbox:R,descriptions:P,divider:z,drawer:$,skeleton:j,steps:q,image:Y,input:se,textArea:De,layout:U,list:M,mentions:N,modal:O,progress:I,result:V,slider:X,breadcrumb:ee,menu:re,pagination:ie,empty:Q,badge:G,radio:ae,rate:le,switch:Z,transfer:fe,avatar:Be,message:Re,tag:je,table:Ce,card:be,tabs:Ne,timeline:Ee,timePicker:Ke,upload:ne,notification:we,tree:ot,colorPicker:Bt,datePicker:St,rangePicker:$t,flex:qe,wave:zt,dropdown:cr,warning:Dr,tour:Dt,tooltip:wr,popover:dr,popconfirm:zr,floatButton:fr,floatButtonGroup:qr,variant:_r,inputNumber:Hr,treeSelect:qt},rt=Object.assign({},y);Object.keys(Xt).forEach(He=>{Xt[He]!==void 0&&(rt[He]=Xt[He])}),Uh.forEach(He=>{const Ge=t[He];Ge&&(rt[He]=Ge)}),typeof n<"u"&&(rt.button=Object.assign({autoInsertSpace:n},rt.button));const he=Ku(()=>rt,rt,(He,Ge)=>{const dt=Object.keys(He),ht=Object.keys(Ge);return dt.length!==ht.length||dt.some(nr=>He[nr]!==Ge[nr])}),{layer:it}=L.useContext(Vn),bt=L.useMemo(()=>({prefixCls:_t,csp:Ht,layer:it?"antd":void 0}),[_t,Ht,it]);let Ae=L.createElement(L.Fragment,null,L.createElement(Vh,{dropdownMatchSelectWidth:m}),r);const at=L.useMemo(()=>{var He,Ge,dt,ht;return fn(((He=xa.Form)===null||He===void 0?void 0:He.defaultValidateMessages)||{},((dt=(Ge=he.locale)===null||Ge===void 0?void 0:Ge.Form)===null||dt===void 0?void 0:dt.defaultValidateMessages)||{},((ht=he.form)===null||ht===void 0?void 0:ht.validateMessages)||{},(o==null?void 0:o.validateMessages)||{})},[he,o==null?void 0:o.validateMessages]);Object.keys(at).length>0&&(Ae=L.createElement(vp.Provider,{value:at},Ae)),s&&(Ae=L.createElement(mp,{locale:s,_ANT_MARK__:gp},Ae)),Ae=L.createElement($c.Provider,{value:bt},Ae),c&&(Ae=L.createElement(Np,{size:c},Ae)),Ae=L.createElement(Hh,null,Ae);const rr=L.useMemo(()=>{const He=tr||{},{algorithm:Ge,token:dt,components:ht,cssVar:nr}=He,Jr=jh(He,["algorithm","token","components","cssVar"]),Vt=Ge&&(!Array.isArray(Ge)||Ge.length>0)?lo(Ge):fl,pr={};Object.entries(ht||{}).forEach(([tn,rn])=>{const Nt=Object.assign({},rn);"algorithm"in Nt&&(Nt.algorithm===!0?Nt.theme=Vt:(Array.isArray(Nt.algorithm)||typeof Nt.algorithm=="function")&&(Nt.theme=lo(Nt.algorithm)),delete Nt.algorithm),pr[tn]=Nt});const en=Object.assign(Object.assign({},Mn),dt);return Object.assign(Object.assign({},Jr),{theme:Vt,token:en,components:pr,override:Object.assign({override:en},pr),cssVar:nr})},[tr]);return C&&(Ae=L.createElement(pl.Provider,{value:rr},Ae)),he.warning&&(Ae=L.createElement(hp.Provider,{value:he.warning},Ae)),b!==void 0&&(Ae=L.createElement(Pp,{disabled:b},Ae)),L.createElement(Sr.Provider,{value:he},Ae)},_n=t=>{const r=L.useContext(Sr),e=L.useContext(cl);return L.createElement(Yh,Object.assign({parentContext:r,legacyLocale:e},t))};_n.ConfigContext=Sr;_n.SizeContext=Ln;_n.config=Gh;_n.useConfig=Op;Object.defineProperty(_n,"SizeContext",{get:()=>Ln});var jn=J({},Hc),Qh=jn.version,Va=jn.render,Zh=jn.unmountComponentAtNode,ya;try{var Jh=Number((Qh||"").split(".")[0]);Jh>=18&&(ya=jn.createRoot)}catch{}function r0(t){var r=jn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;r&&Pe(r)==="object"&&(r.usingClientEntryPoint=t)}var ua="__rc_react_root__";function ev(t,r){r0(!0);var e=r[ua]||ya(r);r0(!1),e.render(t),r[ua]=e}function tv(t,r){Va==null||Va(t,r)}function rv(t,r){if(ya){ev(t,r);return}tv(t,r)}function nv(t){return Ao.apply(this,arguments)}function Ao(){return Ao=Xr(Lt().mark(function t(r){return Lt().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",Promise.resolve().then(function(){var i;(i=r[ua])===null||i===void 0||i.unmount(),delete r[ua]}));case 1:case"end":return n.stop()}},t)})),Ao.apply(this,arguments)}function iv(t){Zh(t)}function av(t){return Bo.apply(this,arguments)}function Bo(){return Bo=Xr(Lt().mark(function t(r){return Lt().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(ya===void 0){n.next=2;break}return n.abrupt("return",nv(r));case 2:iv(r);case 3:case"end":return n.stop()}},t)})),Bo.apply(this,arguments)}const ov=(t,r)=>(rv(t,r),()=>av(r));let sv=ov;function uv(t){return sv}var lv={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"}}]},name:"check-circle",theme:"filled"},cv=function(r,e){return L.createElement(An,Tt({},r,{ref:e,icon:lv}))},dv=L.forwardRef(cv),fv={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"}}]},name:"close-circle",theme:"filled"},pv=function(r,e){return L.createElement(An,Tt({},r,{ref:e,icon:fv}))},hv=L.forwardRef(pv),vv={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"exclamation-circle",theme:"filled"},xv=function(r,e){return L.createElement(An,Tt({},r,{ref:e,icon:vv}))},gv=L.forwardRef(xv),mv={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"info-circle",theme:"filled"},yv=function(r,e){return L.createElement(An,Tt({},r,{ref:e,icon:mv}))},Cv=L.forwardRef(yv),bv={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"},Ev=function(r,e){return L.createElement(An,Tt({},r,{ref:e,icon:bv}))},Fv=L.forwardRef(Ev),wv={ENTER:13},Av=`accept acceptCharset accessKey action allowFullScreen allowTransparency
107
+ alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
108
+ charSet checked classID className colSpan cols content contentEditable contextMenu
109
+ controls coords crossOrigin data dateTime default defer dir disabled download draggable
110
+ encType form formAction formEncType formMethod formNoValidate formTarget frameBorder
111
+ headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity
112
+ is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media
113
+ mediaGroup method min minLength multiple muted name noValidate nonce open
114
+ optimum pattern placeholder poster preload radioGroup readOnly rel required
115
+ reversed role rowSpan rows sandbox scope scoped scrolling seamless selected
116
+ shape size sizes span spellCheck src srcDoc srcLang srcSet start step style
117
+ summary tabIndex target title type useMap value width wmode wrap`,Bv=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
118
+ onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick
119
+ onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown
120
+ onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
121
+ onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough
122
+ onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata
123
+ onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,Sv="".concat(Av," ").concat(Bv).split(/[\s\n]+/),Dv="aria-",_v="data-";function n0(t,r){return t.indexOf(r)===0}function kv(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,e;r===!1?e={aria:!0,data:!0,attr:!0}:r===!0?e={aria:!0}:e=J({},r);var n={};return Object.keys(t).forEach(function(i){(e.aria&&(i==="role"||n0(i,Dv))||e.data&&n0(i,_v)||e.attr&&Sv.includes(i))&&(n[i]=t[i])}),n}var zl=L.forwardRef(function(t,r){var e=t.prefixCls,n=t.style,i=t.className,a=t.duration,o=a===void 0?4.5:a,s=t.showProgress,c=t.pauseOnHover,u=c===void 0?!0:c,l=t.eventKey,x=t.content,f=t.closable,m=t.closeIcon,v=m===void 0?"x":m,p=t.props,d=t.onClick,y=t.onNoticeClose,h=t.times,C=t.hovering,b=L.useState(!1),E=xe(b,2),F=E[0],A=E[1],w=L.useState(0),B=xe(w,2),g=B[0],S=B[1],_=L.useState(0),R=xe(_,2),P=R[0],z=R[1],$=C||F,j=o>0&&s,q=function(){y(l)},Y=function(V){(V.key==="Enter"||V.code==="Enter"||V.keyCode===wv.ENTER)&&q()};L.useEffect(function(){if(!$&&o>0){var I=Date.now()-P,V=setTimeout(function(){q()},o*1e3-P);return function(){u&&clearTimeout(V),z(Date.now()-I)}}},[o,$,h]),L.useEffect(function(){if(!$&&j&&(u||P===0)){var I=performance.now(),V,X=function ee(){cancelAnimationFrame(V),V=requestAnimationFrame(function(re){var ie=re+P-I,se=Math.min(ie/(o*1e3),1);S(se*100),se<1&&ee()})};return X(),function(){u&&cancelAnimationFrame(V)}}},[o,P,$,j,h]);var U=L.useMemo(function(){return Pe(f)==="object"&&f!==null?f:f?{closeIcon:v}:{}},[f,v]),M=kv(U,!0),N=100-(!g||g<0?0:g>100?100:g),O="".concat(e,"-notice");return L.createElement("div",Tt({},p,{ref:r,className:Er(O,i,H({},"".concat(O,"-closable"),f)),style:n,onMouseEnter:function(V){var X;A(!0),p==null||(X=p.onMouseEnter)===null||X===void 0||X.call(p,V)},onMouseLeave:function(V){var X;A(!1),p==null||(X=p.onMouseLeave)===null||X===void 0||X.call(p,V)},onClick:d}),L.createElement("div",{className:"".concat(O,"-content")},x),f&&L.createElement("a",Tt({tabIndex:0,className:"".concat(O,"-close"),onKeyDown:Y,"aria-label":"Close"},M,{onClick:function(V){V.preventDefault(),V.stopPropagation(),q()}}),U.closeIcon),j&&L.createElement("progress",{className:"".concat(O,"-progress"),max:"100",value:N},N+"%"))}),ql=ye.createContext({}),Rv=function(r){var e=r.children,n=r.classNames;return ye.createElement(ql.Provider,{value:{classNames:n}},e)},i0=8,a0=3,o0=16,Tv=function(r){var e={offset:i0,threshold:a0,gap:o0};if(r&&Pe(r)==="object"){var n,i,a;e.offset=(n=r.offset)!==null&&n!==void 0?n:i0,e.threshold=(i=r.threshold)!==null&&i!==void 0?i:a0,e.gap=(a=r.gap)!==null&&a!==void 0?a:o0}return[!!r,e]},Iv=["className","style","classNames","styles"],Pv=function(r){var e=r.configList,n=r.placement,i=r.prefixCls,a=r.className,o=r.style,s=r.motion,c=r.onAllNoticeRemoved,u=r.onNoticeClose,l=r.stack,x=Fr(ql),f=x.classNames,m=We({}),v=ue(null),p=xe(v,2),d=p[0],y=p[1],h=ue([]),C=xe(h,2),b=C[0],E=C[1],F=e.map(function($){return{config:$,key:String($.key)}}),A=Tv(l),w=xe(A,2),B=w[0],g=w[1],S=g.offset,_=g.threshold,R=g.gap,P=B&&(b.length>0||F.length<=_),z=typeof s=="function"?s(n):s;return $e(function(){B&&b.length>1&&E(function($){return $.filter(function(j){return F.some(function(q){var Y=q.key;return j===Y})})})},[b,F,B]),$e(function(){var $;if(B&&m.current[($=F[F.length-1])===null||$===void 0?void 0:$.key]){var j;y(m.current[(j=F[F.length-1])===null||j===void 0?void 0:j.key])}},[F,B]),ye.createElement(qh,Tt({key:n,className:Er(i,"".concat(i,"-").concat(n),f==null?void 0:f.list,a,H(H({},"".concat(i,"-stack"),!!B),"".concat(i,"-stack-expanded"),P)),style:o,keys:F,motionAppear:!0},z,{onAllRemoved:function(){c(n)}}),function($,j){var q=$.config,Y=$.className,U=$.style,M=$.index,N=q,O=N.key,I=N.times,V=String(O),X=q,ee=X.className,re=X.style,ie=X.classNames,se=X.styles,De=Mr(X,Iv),Q=F.findIndex(function(Ee){return Ee.key===V}),G={};if(B){var ae=F.length-1-(Q>-1?Q:M-1),le=n==="top"||n==="bottom"?"-50%":"0";if(ae>0){var Z,fe,Be;G.height=P?(Z=m.current[V])===null||Z===void 0?void 0:Z.offsetHeight:d==null?void 0:d.offsetHeight;for(var Re=0,je=0;je<ae;je++){var Ce;Re+=((Ce=m.current[F[F.length-1-je].key])===null||Ce===void 0?void 0:Ce.offsetHeight)+R}var be=(P?Re:ae*S)*(n.startsWith("top")?1:-1),Ne=!P&&d!==null&&d!==void 0&&d.offsetWidth&&(fe=m.current[V])!==null&&fe!==void 0&&fe.offsetWidth?((d==null?void 0:d.offsetWidth)-S*2*(ae<3?ae:3))/((Be=m.current[V])===null||Be===void 0?void 0:Be.offsetWidth):1;G.transform="translate3d(".concat(le,", ").concat(be,"px, 0) scaleX(").concat(Ne,")")}else G.transform="translate3d(".concat(le,", 0, 0)")}return ye.createElement("div",{ref:j,className:Er("".concat(i,"-notice-wrapper"),Y,ie==null?void 0:ie.wrapper),style:J(J(J({},U),G),se==null?void 0:se.wrapper),onMouseEnter:function(){return E(function(Ke){return Ke.includes(V)?Ke:[].concat(me(Ke),[V])})},onMouseLeave:function(){return E(function(Ke){return Ke.filter(function(ne){return ne!==V})})}},ye.createElement(zl,Tt({},De,{ref:function(Ke){Q>-1?m.current[V]=Ke:delete m.current[V]},prefixCls:i,classNames:ie,styles:se,className:Er(ee,f==null?void 0:f.notice),style:re,times:I,key:O,eventKey:O,onNoticeClose:u,hovering:B&&b.length>0})))})},Nv=L.forwardRef(function(t,r){var e=t.prefixCls,n=e===void 0?"rc-notification":e,i=t.container,a=t.motion,o=t.maxCount,s=t.className,c=t.style,u=t.onAllRemoved,l=t.stack,x=t.renderNotifications,f=L.useState([]),m=xe(f,2),v=m[0],p=m[1],d=function(B){var g,S=v.find(function(_){return _.key===B});S==null||(g=S.onClose)===null||g===void 0||g.call(S),p(function(_){return _.filter(function(R){return R.key!==B})})};L.useImperativeHandle(r,function(){return{open:function(B){p(function(g){var S=me(g),_=S.findIndex(function(z){return z.key===B.key}),R=J({},B);if(_>=0){var P;R.times=(((P=g[_])===null||P===void 0?void 0:P.times)||0)+1,S[_]=R}else R.times=0,S.push(R);return o>0&&S.length>o&&(S=S.slice(-o)),S})},close:function(B){d(B)},destroy:function(){p([])}}});var y=L.useState({}),h=xe(y,2),C=h[0],b=h[1];L.useEffect(function(){var w={};v.forEach(function(B){var g=B.placement,S=g===void 0?"topRight":g;S&&(w[S]=w[S]||[],w[S].push(B))}),Object.keys(C).forEach(function(B){w[B]=w[B]||[]}),b(w)},[v]);var E=function(B){b(function(g){var S=J({},g),_=S[B]||[];return _.length||delete S[B],S})},F=L.useRef(!1);if(L.useEffect(function(){Object.keys(C).length>0?F.current=!0:F.current&&(u==null||u(),F.current=!1)},[C]),!i)return null;var A=Object.keys(C);return Vc(L.createElement(L.Fragment,null,A.map(function(w){var B=C[w],g=L.createElement(Pv,{key:w,configList:B,placement:w,prefixCls:n,className:s==null?void 0:s(w),style:c==null?void 0:c(w),motion:a,onNoticeClose:d,onAllNoticeRemoved:E,stack:l});return x?x(g,{prefixCls:n,key:w}):g})),i)}),Ov=["getContainer","motion","prefixCls","maxCount","className","style","onAllRemoved","stack","renderNotifications"],Mv=function(){return document.body},s0=0;function Lv(){for(var t={},r=arguments.length,e=new Array(r),n=0;n<r;n++)e[n]=arguments[n];return e.forEach(function(i){i&&Object.keys(i).forEach(function(a){var o=i[a];o!==void 0&&(t[a]=o)})}),t}function $v(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.getContainer,e=r===void 0?Mv:r,n=t.motion,i=t.prefixCls,a=t.maxCount,o=t.className,s=t.style,c=t.onAllRemoved,u=t.stack,l=t.renderNotifications,x=Mr(t,Ov),f=L.useState(),m=xe(f,2),v=m[0],p=m[1],d=L.useRef(),y=L.createElement(Nv,{container:v,ref:d,prefixCls:i,motion:n,maxCount:a,className:o,style:s,onAllRemoved:c,stack:u,renderNotifications:l}),h=L.useState([]),C=xe(h,2),b=C[0],E=C[1],F=oa(function(w){var B=Lv(x,w);(B.key===null||B.key===void 0)&&(B.key="rc-notification-".concat(s0),s0+=1),E(function(g){return[].concat(me(g),[{type:"open",config:B}])})}),A=L.useMemo(function(){return{open:F,close:function(B){E(function(g){return[].concat(me(g),[{type:"close",key:B}])})},destroy:function(){E(function(B){return[].concat(me(B),[{type:"destroy"}])})}}},[]);return L.useEffect(function(){p(e())}),L.useEffect(function(){if(d.current&&b.length){b.forEach(function(g){switch(g.type){case"open":d.current.open(g.config);break;case"close":d.current.close(g.key);break;case"destroy":d.current.destroy();break}});var w,B;E(function(g){return(w!==g||!B)&&(w=g,B=g.filter(function(S){return!b.includes(S)})),B})}},[b]),[A,y]}const Hl=t=>{const[,,,,r]=ma();return r?`${t}-css-var`:""};var zv={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"}}]},name:"close",theme:"outlined"},qv=function(r,e){return L.createElement(An,Tt({},r,{ref:e,icon:zv}))},Hv=L.forwardRef(qv);const Vv=100,jv=10,Uv=Vv*jv,Wv=t=>{const{componentCls:r,iconCls:e,boxShadow:n,colorText:i,colorSuccess:a,colorError:o,colorWarning:s,colorInfo:c,fontSizeLG:u,motionEaseInOutCirc:l,motionDurationSlow:x,marginXS:f,paddingXS:m,borderRadiusLG:v,zIndexPopup:p,contentPadding:d,contentBg:y}=t,h=`${r}-notice`,C=new Os("MessageMoveIn",{"0%":{padding:0,transform:"translateY(-100%)",opacity:0},"100%":{padding:m,transform:"translateY(0)",opacity:1}}),b=new Os("MessageMoveOut",{"0%":{maxHeight:t.height,padding:m,opacity:1},"100%":{maxHeight:0,padding:0,opacity:0}}),E={padding:m,textAlign:"center",[`${r}-custom-content`]:{display:"flex",alignItems:"center"},[`${r}-custom-content > ${e}`]:{marginInlineEnd:f,fontSize:u},[`${h}-content`]:{display:"inline-block",padding:d,background:y,borderRadius:v,boxShadow:n,pointerEvents:"all"},[`${r}-success > ${e}`]:{color:a},[`${r}-error > ${e}`]:{color:o},[`${r}-warning > ${e}`]:{color:s},[`${r}-info > ${e},
124
+ ${r}-loading > ${e}`]:{color:c}};return[{[r]:Object.assign(Object.assign({},uh(t)),{color:i,position:"fixed",top:f,width:"100%",pointerEvents:"none",zIndex:p,[`${r}-move-up`]:{animationFillMode:"forwards"},[`
125
+ ${r}-move-up-appear,
126
+ ${r}-move-up-enter
127
+ `]:{animationName:C,animationDuration:x,animationPlayState:"paused",animationTimingFunction:l},[`
128
+ ${r}-move-up-appear${r}-move-up-appear-active,
129
+ ${r}-move-up-enter${r}-move-up-enter-active
130
+ `]:{animationPlayState:"running"},[`${r}-move-up-leave`]:{animationName:b,animationDuration:x,animationPlayState:"paused",animationTimingFunction:l},[`${r}-move-up-leave${r}-move-up-leave-active`]:{animationPlayState:"running"},"&-rtl":{direction:"rtl",span:{direction:"rtl"}}})},{[r]:{[`${h}-wrapper`]:Object.assign({},E)}},{[`${r}-notice-pure-panel`]:Object.assign(Object.assign({},E),{padding:0,textAlign:"start"})}]},Kv=t=>({zIndexPopup:t.zIndexPopupBase+Uv+10,contentBg:t.colorBgElevated,contentPadding:`${(t.controlHeightLG-t.fontSize*t.lineHeight)/2}px ${t.paddingSM}px`}),Vl=fh("Message",t=>{const r=Yo(t,{height:150});return Wv(r)},Kv);var Gv=function(t,r){var e={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&r.indexOf(n)<0&&(e[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)r.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(e[n[i]]=t[n[i]]);return e};const Xv={info:L.createElement(Cv,null),success:L.createElement(dv,null),error:L.createElement(hv,null),warning:L.createElement(gv,null),loading:L.createElement(Fv,null)},jl=({prefixCls:t,type:r,icon:e,children:n})=>L.createElement("div",{className:Er(`${t}-custom-content`,`${t}-${r}`)},e||Xv[r],L.createElement("span",null,n)),Yv=t=>{const{prefixCls:r,className:e,type:n,icon:i,content:a}=t,o=Gv(t,["prefixCls","className","type","icon","content"]),{getPrefixCls:s}=L.useContext(Sr),c=r||s("message"),u=Hl(c),[l,x,f]=Vl(c,u);return l(L.createElement(zl,Object.assign({},o,{prefixCls:c,className:Er(e,x,`${c}-notice-pure-panel`,f,u),eventKey:"pure",duration:null,content:L.createElement(jl,{prefixCls:c,type:n,icon:i},a)})))};function Qv(t,r){return{motionName:r??`${t}-move-up`}}function Jo(t){let r;const e=new Promise(i=>{r=t(()=>{i(!0)})}),n=()=>{r==null||r()};return n.then=(i,a)=>e.then(i,a),n.promise=e,n}var Zv=function(t,r){var e={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&r.indexOf(n)<0&&(e[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)r.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(e[n[i]]=t[n[i]]);return e};const Jv=8,e1=3,t1=({children:t,prefixCls:r})=>{const e=Hl(r),[n,i,a]=Vl(r,e);return n(L.createElement(Rv,{classNames:{list:Er(i,a,e)}},t))},r1=(t,{prefixCls:r,key:e})=>L.createElement(t1,{prefixCls:r,key:e},t),n1=L.forwardRef((t,r)=>{const{top:e,prefixCls:n,getContainer:i,maxCount:a,duration:o=e1,rtl:s,transitionName:c,onAllRemoved:u}=t,{getPrefixCls:l,getPopupContainer:x,message:f,direction:m}=L.useContext(Sr),v=n||l("message"),p=()=>({left:"50%",transform:"translateX(-50%)",top:e??Jv}),d=()=>Er({[`${v}-rtl`]:s??m==="rtl"}),y=()=>Qv(v,c),h=L.createElement("span",{className:`${v}-close-x`},L.createElement(Hv,{className:`${v}-close-icon`})),[C,b]=$v({prefixCls:v,style:p,className:d,motion:y,closable:!1,closeIcon:h,duration:o,getContainer:()=>(i==null?void 0:i())||(x==null?void 0:x())||document.body,maxCount:a,onAllRemoved:u,renderNotifications:r1});return L.useImperativeHandle(r,()=>Object.assign(Object.assign({},C),{prefixCls:v,message:f})),b});let u0=0;function Ul(t){const r=L.useRef(null);return[L.useMemo(()=>{const n=c=>{var u;(u=r.current)===null||u===void 0||u.close(c)},i=c=>{if(!r.current){const F=()=>{};return F.then=()=>{},F}const{open:u,prefixCls:l,message:x}=r.current,f=`${l}-notice`,{content:m,icon:v,type:p,key:d,className:y,style:h,onClose:C}=c,b=Zv(c,["content","icon","type","key","className","style","onClose"]);let E=d;return E==null&&(u0+=1,E=`antd-message-${u0}`),Jo(F=>(u(Object.assign(Object.assign({},b),{key:E,content:L.createElement(jl,{prefixCls:l,type:p,icon:v},m),placement:"top",className:Er(p&&`${f}-${p}`,y,x==null?void 0:x.className),style:Object.assign(Object.assign({},x==null?void 0:x.style),h),onClose:()=>{C==null||C(),F()}})),()=>{n(E)}))},o={open:i,destroy:c=>{var u;c!==void 0?n(c):(u=r.current)===null||u===void 0||u.destroy()}};return["info","success","warning","error","loading"].forEach(c=>{const u=(l,x,f)=>{let m;l&&typeof l=="object"&&"content"in l?m=l:m={content:l};let v,p;typeof x=="function"?p=x:(v=x,p=f);const d=Object.assign(Object.assign({onClose:p,duration:v},m),{type:c});return i(d)};o[c]=u}),o},[]),L.createElement(n1,Object.assign({key:"message-holder"},t,{ref:r}))]}function i1(t){return Ul(t)}let Jt=null,Wr=t=>t(),$n=[],zn={};function l0(){const{getContainer:t,duration:r,rtl:e,maxCount:n,top:i}=zn,a=(t==null?void 0:t())||document.body;return{getContainer:()=>a,duration:r,rtl:e,maxCount:n,top:i}}const a1=ye.forwardRef((t,r)=>{const{messageConfig:e,sync:n}=t,{getPrefixCls:i}=Fr(Sr),a=zn.prefixCls||i("message"),o=Fr(df),[s,c]=Ul(Object.assign(Object.assign(Object.assign({},e),{prefixCls:a}),o.message));return ye.useImperativeHandle(r,()=>{const u=Object.assign({},s);return Object.keys(u).forEach(l=>{u[l]=(...x)=>(n(),s[l].apply(s,x))}),{instance:u,sync:n}}),c}),o1=ye.forwardRef((t,r)=>{const[e,n]=ye.useState(l0),i=()=>{n(l0)};ye.useEffect(i,[]);const a=Xh(),o=a.getRootPrefixCls(),s=a.getIconPrefixCls(),c=a.getTheme(),u=ye.createElement(a1,{ref:r,sync:i,messageConfig:e});return ye.createElement(_n,{prefixCls:o,iconPrefixCls:s,theme:c},a.holderRender?a.holderRender(u):u)}),Ca=()=>{if(!Jt){const t=document.createDocumentFragment(),r={fragment:t};Jt=r,Wr(()=>{uv()(ye.createElement(o1,{ref:n=>{const{instance:i,sync:a}=n||{};Promise.resolve().then(()=>{!r.instance&&i&&(r.instance=i,r.sync=a,Ca())})}}),t)});return}Jt.instance&&($n.forEach(t=>{const{type:r,skipped:e}=t;if(!e)switch(r){case"open":{Wr(()=>{const n=Jt.instance.open(Object.assign(Object.assign({},zn),t.config));n==null||n.then(t.resolve),t.setCloseFn(n)});break}case"destroy":Wr(()=>{Jt==null||Jt.instance.destroy(t.key)});break;default:Wr(()=>{var n;const i=(n=Jt.instance)[r].apply(n,me(t.args));i==null||i.then(t.resolve),t.setCloseFn(i)})}}),$n=[])};function s1(t){zn=Object.assign(Object.assign({},zn),t),Wr(()=>{var r;(r=Jt==null?void 0:Jt.sync)===null||r===void 0||r.call(Jt)})}function u1(t){const r=Jo(e=>{let n;const i={type:"open",config:t,resolve:e,setCloseFn:a=>{n=a}};return $n.push(i),()=>{n?Wr(()=>{n()}):i.skipped=!0}});return Ca(),r}function l1(t,r){const e=Jo(n=>{let i;const a={type:t,args:r,resolve:n,setCloseFn:o=>{i=o}};return $n.push(a),()=>{i?Wr(()=>{i()}):a.skipped=!0}});return Ca(),e}const c1=t=>{$n.push({type:"destroy",key:t}),Ca()},d1=["success","info","warning","error","loading"],f1={open:u1,destroy:c1,config:s1,useMessage:i1,_InternalPanelDoNotUseOrYouWillBeFired:Yv},xi=f1;d1.forEach(t=>{xi[t]=(...r)=>l1(t,r)});var gi={exports:{}};/*!
131
+ * clipboard.js v2.0.11
132
+ * https://clipboardjs.com/
133
+ *
134
+ * Licensed MIT © Zeno Rocha
135
+ */var p1=gi.exports,c0;function h1(){return c0||(c0=1,(function(t,r){(function(n,i){t.exports=i()})(p1,function(){return(function(){var e={686:(function(a,o,s){s.d(o,{default:function(){return M}});var c=s(279),u=s.n(c),l=s(370),x=s.n(l),f=s(817),m=s.n(f);function v(N){try{return document.execCommand(N)}catch{return!1}}var p=function(O){var I=m()(O);return v("cut"),I},d=p;function y(N){var O=document.documentElement.getAttribute("dir")==="rtl",I=document.createElement("textarea");I.style.fontSize="12pt",I.style.border="0",I.style.padding="0",I.style.margin="0",I.style.position="absolute",I.style[O?"right":"left"]="-9999px";var V=window.pageYOffset||document.documentElement.scrollTop;return I.style.top="".concat(V,"px"),I.setAttribute("readonly",""),I.value=N,I}var h=function(O,I){var V=y(O);I.container.appendChild(V);var X=m()(V);return v("copy"),V.remove(),X},C=function(O){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body},V="";return typeof O=="string"?V=h(O,I):O instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(O==null?void 0:O.type)?V=h(O.value,I):(V=m()(O),v("copy")),V},b=C;function E(N){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?E=function(I){return typeof I}:E=function(I){return I&&typeof Symbol=="function"&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I},E(N)}var F=function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},I=O.action,V=I===void 0?"copy":I,X=O.container,ee=O.target,re=O.text;if(V!=="copy"&&V!=="cut")throw new Error('Invalid "action" value, use either "copy" or "cut"');if(ee!==void 0)if(ee&&E(ee)==="object"&&ee.nodeType===1){if(V==="copy"&&ee.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if(V==="cut"&&(ee.hasAttribute("readonly")||ee.hasAttribute("disabled")))throw new Error(`Invalid "target" attribute. You can't cut text from elements with "readonly" or "disabled" attributes`)}else throw new Error('Invalid "target" value, use a valid Element');if(re)return b(re,{container:X});if(ee)return V==="cut"?d(ee):b(ee,{container:X})},A=F;function w(N){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?w=function(I){return typeof I}:w=function(I){return I&&typeof Symbol=="function"&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I},w(N)}function B(N,O){if(!(N instanceof O))throw new TypeError("Cannot call a class as a function")}function g(N,O){for(var I=0;I<O.length;I++){var V=O[I];V.enumerable=V.enumerable||!1,V.configurable=!0,"value"in V&&(V.writable=!0),Object.defineProperty(N,V.key,V)}}function S(N,O,I){return O&&g(N.prototype,O),I&&g(N,I),N}function _(N,O){if(typeof O!="function"&&O!==null)throw new TypeError("Super expression must either be null or a function");N.prototype=Object.create(O&&O.prototype,{constructor:{value:N,writable:!0,configurable:!0}}),O&&R(N,O)}function R(N,O){return R=Object.setPrototypeOf||function(V,X){return V.__proto__=X,V},R(N,O)}function P(N){var O=j();return function(){var V=q(N),X;if(O){var ee=q(this).constructor;X=Reflect.construct(V,arguments,ee)}else X=V.apply(this,arguments);return z(this,X)}}function z(N,O){return O&&(w(O)==="object"||typeof O=="function")?O:$(N)}function $(N){if(N===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return N}function j(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function q(N){return q=Object.setPrototypeOf?Object.getPrototypeOf:function(I){return I.__proto__||Object.getPrototypeOf(I)},q(N)}function Y(N,O){var I="data-clipboard-".concat(N);if(O.hasAttribute(I))return O.getAttribute(I)}var U=(function(N){_(I,N);var O=P(I);function I(V,X){var ee;return B(this,I),ee=O.call(this),ee.resolveOptions(X),ee.listenClick(V),ee}return S(I,[{key:"resolveOptions",value:function(){var X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.action=typeof X.action=="function"?X.action:this.defaultAction,this.target=typeof X.target=="function"?X.target:this.defaultTarget,this.text=typeof X.text=="function"?X.text:this.defaultText,this.container=w(X.container)==="object"?X.container:document.body}},{key:"listenClick",value:function(X){var ee=this;this.listener=x()(X,"click",function(re){return ee.onClick(re)})}},{key:"onClick",value:function(X){var ee=X.delegateTarget||X.currentTarget,re=this.action(ee)||"copy",ie=A({action:re,container:this.container,target:this.target(ee),text:this.text(ee)});this.emit(ie?"success":"error",{action:re,text:ie,trigger:ee,clearSelection:function(){ee&&ee.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(X){return Y("action",X)}},{key:"defaultTarget",value:function(X){var ee=Y("target",X);if(ee)return document.querySelector(ee)}},{key:"defaultText",value:function(X){return Y("text",X)}},{key:"destroy",value:function(){this.listener.destroy()}}],[{key:"copy",value:function(X){var ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body};return b(X,ee)}},{key:"cut",value:function(X){return d(X)}},{key:"isSupported",value:function(){var X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["copy","cut"],ee=typeof X=="string"?[X]:X,re=!!document.queryCommandSupported;return ee.forEach(function(ie){re=re&&!!document.queryCommandSupported(ie)}),re}}]),I})(u()),M=U}),828:(function(a){var o=9;if(typeof Element<"u"&&!Element.prototype.matches){var s=Element.prototype;s.matches=s.matchesSelector||s.mozMatchesSelector||s.msMatchesSelector||s.oMatchesSelector||s.webkitMatchesSelector}function c(u,l){for(;u&&u.nodeType!==o;){if(typeof u.matches=="function"&&u.matches(l))return u;u=u.parentNode}}a.exports=c}),438:(function(a,o,s){var c=s(828);function u(f,m,v,p,d){var y=x.apply(this,arguments);return f.addEventListener(v,y,d),{destroy:function(){f.removeEventListener(v,y,d)}}}function l(f,m,v,p,d){return typeof f.addEventListener=="function"?u.apply(null,arguments):typeof v=="function"?u.bind(null,document).apply(null,arguments):(typeof f=="string"&&(f=document.querySelectorAll(f)),Array.prototype.map.call(f,function(y){return u(y,m,v,p,d)}))}function x(f,m,v,p){return function(d){d.delegateTarget=c(d.target,m),d.delegateTarget&&p.call(f,d)}}a.exports=l}),879:(function(a,o){o.node=function(s){return s!==void 0&&s instanceof HTMLElement&&s.nodeType===1},o.nodeList=function(s){var c=Object.prototype.toString.call(s);return s!==void 0&&(c==="[object NodeList]"||c==="[object HTMLCollection]")&&"length"in s&&(s.length===0||o.node(s[0]))},o.string=function(s){return typeof s=="string"||s instanceof String},o.fn=function(s){var c=Object.prototype.toString.call(s);return c==="[object Function]"}}),370:(function(a,o,s){var c=s(879),u=s(438);function l(v,p,d){if(!v&&!p&&!d)throw new Error("Missing required arguments");if(!c.string(p))throw new TypeError("Second argument must be a String");if(!c.fn(d))throw new TypeError("Third argument must be a Function");if(c.node(v))return x(v,p,d);if(c.nodeList(v))return f(v,p,d);if(c.string(v))return m(v,p,d);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function x(v,p,d){return v.addEventListener(p,d),{destroy:function(){v.removeEventListener(p,d)}}}function f(v,p,d){return Array.prototype.forEach.call(v,function(y){y.addEventListener(p,d)}),{destroy:function(){Array.prototype.forEach.call(v,function(y){y.removeEventListener(p,d)})}}}function m(v,p,d){return u(document.body,v,p,d)}a.exports=l}),817:(function(a){function o(s){var c;if(s.nodeName==="SELECT")s.focus(),c=s.value;else if(s.nodeName==="INPUT"||s.nodeName==="TEXTAREA"){var u=s.hasAttribute("readonly");u||s.setAttribute("readonly",""),s.select(),s.setSelectionRange(0,s.value.length),u||s.removeAttribute("readonly"),c=s.value}else{s.hasAttribute("contenteditable")&&s.focus();var l=window.getSelection(),x=document.createRange();x.selectNodeContents(s),l.removeAllRanges(),l.addRange(x),c=l.toString()}return c}a.exports=o}),279:(function(a){function o(){}o.prototype={on:function(s,c,u){var l=this.e||(this.e={});return(l[s]||(l[s]=[])).push({fn:c,ctx:u}),this},once:function(s,c,u){var l=this;function x(){l.off(s,x),c.apply(u,arguments)}return x._=c,this.on(s,x,u)},emit:function(s){var c=[].slice.call(arguments,1),u=((this.e||(this.e={}))[s]||[]).slice(),l=0,x=u.length;for(l;l<x;l++)u[l].fn.apply(u[l].ctx,c);return this},off:function(s,c){var u=this.e||(this.e={}),l=u[s],x=[];if(l&&c)for(var f=0,m=l.length;f<m;f++)l[f].fn!==c&&l[f].fn._!==c&&x.push(l[f]);return x.length?u[s]=x:delete u[s],this}},a.exports=o,a.exports.TinyEmitter=o})},n={};function i(a){if(n[a])return n[a].exports;var o=n[a]={exports:{}};return e[a](o,o.exports,i),o.exports}return(function(){i.n=function(a){var o=a&&a.__esModule?function(){return a.default}:function(){return a};return i.d(o,{a:o}),o}})(),(function(){i.d=function(a,o){for(var s in o)i.o(o,s)&&!i.o(a,s)&&Object.defineProperty(a,s,{enumerable:!0,get:o[s]})}})(),(function(){i.o=function(a,o){return Object.prototype.hasOwnProperty.call(a,o)}})(),i(686)})().default})})(gi)),gi.exports}var v1=h1();const x1=Eu(v1),g1=(t,r)=>{let e=t&&t.replace(/<think>[\s\S]*?<\/think>/g,"");e=e.replace(/\[retrive-tag[^\]]*\][\s\S]*?\[\/retrive-tag\]/g,""),e=e.replace(/<a\s+[^>]*>(.*?)<\/a>/g,""),console.log("_content",e);const n=new x1(r.currentTarget||r.target,{text:()=>e});try{n.on("success",()=>{xi.success("\u6587\u672C\u590D\u5236\u6210\u529F",2),n.destroy()}),n.on("error",i=>{xi.error("\u590D\u5236\u5931\u8D25",2),n.destroy()}),n.onClick(r)}catch(i){n.destroy(),xi.error("\u590D\u5236\u5931\u8D25: "+i,2)}};function m1(t){const r=[];for(const e of t){if(e.query){const n=e.query.queryId||e.query.id||e.queryId||e.id||br(32);r.push({istype:"user",content:e.query.content,time:e.query.gmtCreate,queryId:n,clientSideId:n+"-user",...e.query})}if(e.reply){const n=e.reply.queryId||e.reply.id||e.queryId||e.id||br(32);r.push({istype:"ai",content:e.reply.content,isDefault:e.reply.isDefault,time:e.time||e.gmtCreate||Date.now(),queryId:n,clientSideId:n+"-ai",...e.reply})}}return r}const y1=""+new URL("defaultWeLogo.svg",import.meta.url).href,C1="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAOkSURBVHgBxZRbTBxlFMd/c2EvXBbZLbsCVhcKaAyh2BKTWrX12RhNmxa1IVp98FEJVGNMY2KItSZtqGjaROMlaDSVxiZeqiRa0FBpIlSkhgK15WoLu7AL3V1md25+7CpUojzYB7/km5OZc+Z35pzz/wb+l3X7PotNL9tvd1yIc8OrYp9pWXZ6JXXdfLOtbdNa4fJazoZdu9xVNUE5petIVS9h/npRfkDKefg/A+OaJuUGvIz3DzD14R6uHv/WCmzbcuNlj7S+3z7+5Xepno7TLeJWWiv2n5zyTcEaT/TJlrfwljxCTm42lgHRmIHDqaIqIsTE43NS7FHCBXKkIzw4eGKkYcdnwmGvBspSy+DpxlrffXtqC6WeqM3+CZ3wnAZLOyXAlsXfOjU7D6EYHLw7zVKvgykcG+r98YmKjdG5BK3nw7w7YQuATdAJWR4IJ2UiswKoiC39+S0+4QjNL0NWgDU7y57ZVlLd2n+FO/Kd7BxxcPOpMKGrCSxNTNm2kVUZ2e1g+5YCxh4q4IW+cAactYTZLi6dxgqw4dUjj+UgfXpSJRAaY9Lt4dZAkoW5YWSXyKwo6ZYbhsFCciPe9hgHtDiB+kqe6huF6jknv2As9/Dj3mv2se4Yh5RhEr4SbD2FpMjomkZ0eoaunl5yxXwqKsspKwsiOVzYqST143k8Xe7gvaN17tHOTi0D/D6U3DqhO7oNNxOlU6heD0cOH2frg/dSU1ywMgRhRmMpvvjoG55t3I0RWWDvuST9iy5q64qtr2/LV9Ill/aNOsb9fnC48a+zGYzF6R/opefsGU59sl88d6V5tpagqekNFg2LgeHN3F/pJS9rET2l4v15Ruav1PHLEdsUJYpXcNjXKA54iCd11gf9ONUkLqeVtu4ciQUjwcCF3wjc4sUlJbhouyjOVek6O2kvT3kGV3e9P/uetlmhi4VpCsU0Wz5o5i6/kIehY8UjyHlLpVt8daKZc1d0qt3zaV2ex09LjYvnhsx3rj8pEq90N1QU+Q+9WJVgbzBPpFIzIrZNsYWVlYyVhJXVtFys6UHWf76O36NDu3nt0fbVJ0Wm6Sedomx5hzPCwYpJygvdkOMVQhbKFjrEFG2JRQjPTHH4Uh4HoptFfy2T5+9clt/qo6fS9MMYilqEL1dCyCQtQsnKhC51yUyCkBLz4qeT77Np3KCme/EvwJVndUcfl0qr6uzKwAb8biemqTCjmYS0RUKhM1zuep2TzZfIpFlefwDISXe8s31UTQAAAABJRU5ErkJggg==",b1=(t,r)=>{const e={...Hn.colors,...t};return`
136
+ .g-welcome-${r} .g-welcome-title {
137
+ background-image: linear-gradient(90deg, #3262FA 0%, #6C18FF 100%);
138
+ -webkit-background-clip: text;
139
+ background-clip: text;
140
+ color: transparent;
141
+ -webkit-text-fill-color: transparent;
142
+ }
143
+ .g-welcome-${r} .g-welcome-subtitle {
144
+ color: ${e.disabled};
145
+ }
146
+ .g-welcome-${r} .g-welcome-btn {
147
+ background-color: #ffffff;
148
+ border-color: ${e.border};
149
+ color: ${e.text};
150
+ height: 36px;
151
+ border-width: 1px;
152
+ box-shadow: 0 1px 2px rgba(31,35,41,0.04);
153
+ }
154
+ .g-welcome-${r} .g-welcome-btn:hover {
155
+ border-color: ${e.primary};
156
+ color: ${e.primary};
157
+ background-color: #ffffff;
158
+ box-shadow: 0 2px 6px rgba(31,35,41,0.08);
159
+ }
160
+ .g-welcome-${r} .g-welcome-btn.active {
161
+ background-image: linear-gradient(90deg, #F1F8FF 0%, #F9F4FF 100%);
162
+ border-color: ${e.primary};
163
+ box-shadow: 0 4px 10px rgba(24, 144, 255, 0.25);
164
+ }
165
+ .g-welcome-${r} .g-welcome-btn .icon-badge {
166
+ width: 24px;
167
+ height: 24px;
168
+ border-radius: 9999px;
169
+ display: inline-flex;
170
+ align-items: center;
171
+ justify-content: center;
172
+ background: radial-gradient(100% 100% at 50% 0%, #F2F3F5 0%, #FFFFFF 100%);
173
+ box-shadow: inset 0 0 0 1px ${e.border};
174
+ }
175
+ .g-welcome-${r} .g-welcome-pagination-btn {
176
+ background: transparent;
177
+ border: none;
178
+ color: ${e.disabled};
179
+ padding: 6px 10px;
180
+ border-radius: 9999px;
181
+ transition: all 0.2s;
182
+ font-size: 14px;
183
+ line-height: 1;
184
+ min-width: 32px;
185
+ height: 32px;
186
+ display: inline-flex;
187
+ align-items: center;
188
+ justify-content: center;
189
+ }
190
+ .g-welcome-${r} .g-welcome-pagination-btn:hover:not(:disabled) {
191
+ color: ${e.text};
192
+ background-color: ${e.border}33;
193
+ }
194
+ .g-welcome-${r} .g-welcome-pagination-btn.active {
195
+ color: ${e.primary};
196
+ background: radial-gradient(100% 100% at 50% 50%, ${e.primary}10 0%, ${e.primary}08 100%);
197
+ box-shadow: 0 2px 10px ${e.primary}12, inset 0 0 0 1px ${e.primary}1A;
198
+ }
199
+ .g-welcome-${r} .g-welcome-pagination-btn:disabled {
200
+ color: ${e.disabled};
201
+ cursor: not-allowed;
202
+ background: transparent;
203
+ }
204
+ .g-welcome-${r} .g-welcome-pagination-text {
205
+ color: ${e.disabled};
206
+ font-size: 14px;
207
+ padding: 0 8px;
208
+ }
209
+ .g-welcome-${r} .g-welcome-pagination-dot {
210
+ width: 6px;
211
+ height: 6px;
212
+ border-radius: 50%;
213
+ background-color: ${e.border};
214
+ transition: all 0.2s;
215
+ }
216
+ .g-welcome-${r} .g-welcome-pagination-dot.active {
217
+ background-color: ${e.primary};
218
+ width: 20px;
219
+ border-radius: 3px;
220
+ }
221
+ .g-welcome-${r} .g-welcome-search-btn {
222
+ background-color: #ffffff;
223
+ border: 1px solid ${e.border};
224
+ color: ${e.text};
225
+ padding: 8px 8px;
226
+ border-radius: 100%;
227
+ cursor: pointer;
228
+ transition: all 0.2s;
229
+ display: flex;
230
+ align-items: center;
231
+ gap: 6px;
232
+ font-size: 14px;
233
+ box-shadow: 0 1px 2px rgba(31,35,41,0.04);
234
+ }
235
+ .g-welcome-${r} .g-welcome-search-btn:hover {
236
+ border-color: ${e.primary};
237
+ color: ${e.primary};
238
+ box-shadow: 0 2px 6px rgba(31,35,41,0.08);
239
+ }
240
+ .g-welcome-${r} .g-welcome-search-input {
241
+ border: 1px solid ${e.border};
242
+ border-radius: 9999px;
243
+ transition: all 0.2s;
244
+ height: 40px;
245
+ padding: 0 14px;
246
+ }
247
+ .g-welcome-${r} .g-welcome-search-input:focus,
248
+ .g-welcome-${r} .g-welcome-search-input:hover {
249
+ border-color: ${e.primary};
250
+ box-shadow: 0 0 0 2px ${e.primary}1A;
251
+ }
252
+ `};function E1({config:t,styles:r}){if(!t)return null;const e=JSON.parse(t.configJson),n=Te(()=>{var i;return{...Hn.colors,...(i=r==null?void 0:r.theme)==null?void 0:i.colors}},[r]);return te("div",{className:"w-[340px] rounded-xl p-4 animate-fade-in bg-white",children:[te("div",{className:"flex items-center mb-2",children:[k("span",{className:"text-md font-bold truncate mr-2",style:{color:n.primary},children:e.config_name||"\u52A9\u624B\u914D\u7F6E"}),k("span",{className:"text-xs truncate rounded px-2 py-0.5",style:{backgroundColor:`${n.primary}1A`,color:n.disabled},children:e.model_name})]}),k("div",{className:"border-b my-2",style:{borderColor:n.border}}),te("div",{className:"flex flex-wrap gap-x-4 gap-y-1 text-xs text-gray-700 mb-2",style:{color:n.text},children:[te("div",{children:["\u4E0A\u4E0B\u6587\u6700\u5927\u8F6E\u6570\uFF1A",k("span",{className:"font-semibold",children:e.max_round})]}),te("div",{children:["\u6700\u5927\u4EE4\u724C\u6570\uFF1A",k("span",{className:"font-semibold",children:e.max_tokens})]}),te("div",{children:["\u6E29\u5EA6\uFF1A",k("span",{className:"font-semibold",children:e.temperature})]}),te("div",{children:["\u53EC\u56DE\u6570\uFF1A",k("span",{className:"font-semibold",children:e.top_k})]}),te("div",{children:["\u591A\u6837\u6027\uFF1A",k("span",{className:"font-semibold",children:e.top_p})]}),te("div",{children:["\u76F8\u4F3C\u5EA6\u9608\u503C\uFF1A",k("span",{className:"font-semibold",children:e.score_threshold})]})]}),te("div",{className:"mb-2",children:[k("div",{className:"text-xs text-gray-400 mb-1",style:{color:n.disabled},children:"\u5173\u8054\u77E5\u8BC6\u5E93\uFF1A"}),k("div",{className:"flex flex-wrap gap-1",children:e.knowledge_base_name?e.knowledge_base_name.split(";").map((i,a)=>k("span",{className:"px-2 py-0.5 rounded-full text-xs",style:{backgroundColor:`${n.primary}1A`,color:n.primary},children:i},a)):k("span",{className:"text-gray-300",style:{color:n.disabled},children:"\u65E0"})})]}),te("div",{className:"mb-2",children:[k("div",{className:"text-xs text-gray-400 mb-1",style:{color:n.disabled},children:"\u5F00\u542F\u529F\u80FD:"}),te("div",{className:"flex flex-wrap gap-2 text-xs mt-2",children:[!!e.enabled_faq&&k("span",{className:"px-2 py-0.5 rounded",style:{backgroundColor:`${n.success}1A`,color:n.success},children:"FAQ"}),!!e.enabled_graph&&k("span",{className:"px-2 py-0.5 rounded",style:{backgroundColor:`${n.success}1A`,color:n.success},children:"\u56FE\u8C31"}),!!e.dependOnKb&&k("span",{className:"px-2 py-0.5 rounded",style:{backgroundColor:`${n.success}1A`,color:n.success},children:"\u5F3A\u77E5\u8BC6\u4F9D\u8D56"}),!!e.enabled_table_select&&k("span",{className:"px-2 py-0.5 rounded",style:{backgroundColor:`${n.success}1A`,color:n.success},children:"\u8868\u683C\u7B5B\u9009"}),!!e.enabled_rerank&&k("span",{className:"px-2 py-0.5 rounded",style:{backgroundColor:`${n.success}1A`,color:n.success},children:"\u7CBE\u6392\u6A21\u5F0F"}),!!e.need_trace_source&&k("span",{className:"px-2 py-0.5 rounded",style:{backgroundColor:`${n.success}1A`,color:n.success},children:"\u6EAF\u6E90"}),!!e.is_download&&k("span",{className:"px-2 py-0.5 rounded",style:{backgroundColor:`${n.success}1A`,color:n.success},children:"\u4E0B\u8F7D\u6EAF\u6E90"})]})]})]})}function F1(t,r=[],e=60){const[n,i]=ue("");return $e(()=>{if(i(""),!t)return;let a=0;const o=setInterval(()=>{i(s=>a>=t.length?(clearInterval(o),s):(a++,t.slice(0,a)))},e);return()=>clearInterval(o)},[t,...r]),n}function w1(t){const{assistantList:r,eventsEmit:e,styles:n,selectedId:i,onSelectAssistant:a,productLogo:o}=t,{messages:s}=pa(),[c,u]=ue(1),[l,x]=ue(!1),[f,m]=ue(""),v=l||f.trim()?6:12,p=We(),d=We(!1),y=We(null),h=We(null),C=We("");$e(()=>{i&&p.current!==i&&(e==null||e("conversation:new_assistant_change",{assistantId:i}),p.current=i)},[i,e]);const b=Te(()=>br(),[]);$e(()=>{var _;if((_=n==null?void 0:n.theme)!=null&&_.colors){const R=document.createElement("style");return R.innerHTML=b1(n.theme.colors,b),R.id=`g-welcome-styles-${b}`,document.head.appendChild(R),()=>{const P=document.getElementById(R.id);P&&P.remove()}}},[n,b]);const E=Te(()=>r.find(_=>_.id===i),[r,i]),F=Te(()=>JSON.parse((E==null?void 0:E.configJson)||"{}"),[E]),A=Te(()=>{if(!f.trim())return r||[];const _=f.toLowerCase().trim();return(r||[]).filter(R=>{var z,$;const P=((z=R.name)==null?void 0:z.toLowerCase())||"";try{const q=(($=JSON.parse(R.configJson||"{}").config_name)==null?void 0:$.toLowerCase())||"";return P.includes(_)||q.includes(_)}catch{return P.includes(_)}})},[r,f]),w=Math.ceil(((A==null?void 0:A.length)||0)/v),B=(A==null?void 0:A.slice((c-1)*v,c*v))||[];$e(()=>{if(i&&i!==h.current){if(d.current&&y.current!==null){h.current=i;return}const _=f.trim()?A:r;if(_&&_.length>0){const R=_.findIndex(P=>P.id===i);if(R!==-1){const P=Math.floor(R/v)+1;u(P),h.current=i}}}},[i,r,A,v,f]),$e(()=>{if(f!==C.current){if(d.current&&y.current!==null){u(y.current),d.current=!1,y.current=null,C.current=f;return}if(h.current===i){C.current=f;return}d.current||(f.trim()&&(h.current=null),u(1)),C.current=f}},[f,i]),$e(()=>{w>0&&c>w&&u(w)},[w,c]);const g=F.prologue||s.welcome.defaultPrologue,S=F1(g,[i],30);return te("div",{className:`flex flex-col relative items-center justify-center h-full w-full g-welcome-${b}`,children:[k("img",{src:o||y1,alt:"logo",className:"mb-4",style:{width:68,height:68}}),k("div",{className:"text-3xl font-bold mb-2 g-welcome-title",children:S}),!i&&k("div",{className:"flex mb-2 g-welcome-subtitle",children:s.welcome.selectAssistant}),te("div",{style:{maxWidth:"1200px"},className:`flex mt-8 flex-wrap gap-3\r
253
+ max-w-[1200px] px-8 w-full mx-auto justify-center mb-4`,children:[l?k("div",{className:"flex items-center gap-2 px-5 w-full",style:{flexBasis:"100%"},children:k(vu,{className:"g-welcome-search-input w-full",placeholder:s.welcome.searchAssistant,prefix:k(ra,{size:16}),suffix:k("button",{type:"button",onClick:()=>{x(!1),m("")},style:{background:"transparent",border:"none",cursor:"pointer"},children:k(zo,{size:14})}),value:f,onChange:_=>m(_.target.value),autoFocus:!0})}):k("button",{type:"button",className:"g-welcome-search-btn",onClick:()=>x(!0),children:k(ra,{size:16})}),B&&B.length>0?k(qn,{children:B.map(_=>{const R=i===_.id;let P=_.icon;try{const z=JSON.parse(_.configJson||"{}");P=P||z.icon||z.avatar||z.logo}catch{}return P=P||C1,k(Sc,{content:()=>k(E1,{config:r.find(z=>z.id===_.id),styles:n}),trigger:"hover",placement:"bottom",children:te("button",{type:"button",className:`g-welcome-btn px-3 cursor-pointer rounded-full border font-medium min-w-[160px] text-sm transition-all flex items-center gap-2 ${R?"active":""}`,onClick:()=>{a==null||a(_.id);const z=l||f.trim(),j=(z?r:f.trim()?A:r).findIndex(q=>q.id===_.id);if(j!==-1){const Y=Math.floor(j/(z?12:v))+1;u(Y),h.current=_.id,z&&(y.current=Y,d.current=!0,setTimeout(()=>{m(""),x(!1)},100))}},title:_.name,children:[k("span",{className:"icon-badge",children:k("img",{src:P,alt:"icon",style:{width:16,height:16,borderRadius:4}})}),k("span",{className:"truncate max-w-[180px]",children:_.name})]})},_.id)})}):k("div",{className:"g-welcome-subtitle",children:"\u6682\u65E0\u53EF\u7528\u52A9\u624B"})]}),w>1&&te("div",{className:"flex items-center gap-2",children:[k("button",{type:"button",className:"g-welcome-pagination-btn",onClick:()=>u(_=>Math.max(1,_-1)),disabled:c===1,children:k(hd,{size:16})}),k("div",{className:"flex items-center gap-1",children:(()=>{const _=[];if(w<=7)for(let P=1;P<=w;P++)_.push(P);else if(_.push(1),c<=4){for(let P=2;P<=5;P++)_.push(P);_.push("..."),_.push(w)}else if(c>=w-3){_.push("...");for(let P=w-4;P<=w;P++)_.push(P)}else{_.push("...");for(let P=c-1;P<=c+1;P++)_.push(P);_.push("..."),_.push(w)}return _.map((P,z)=>{if(P==="...")return k("span",{className:"g-welcome-pagination-text px-1",children:"..."},`ellipsis-${z}`);const $=P;return k("button",{type:"button",className:`g-welcome-pagination-btn ${c===$?"active":""}`,onClick:()=>u($),children:$},$)})})()}),k("button",{type:"button",className:"g-welcome-pagination-btn",onClick:()=>u(_=>Math.min(w,_+1)),disabled:c===w,children:k(vd,{size:16})})]})]})}class ja extends Error{}let xr=null,Ar=null,ar=null,Qe=[],sn,un,Ua=new Map;const A1=({baseUrl:t,token:r,CSRFToken:e,setChatData:n,activeSessionId:i,setAppStatus:a,setConversationList:o})=>{const s=d=>{if(!d)return!1;if(typeof d=="string"){const y=d.trim();return y!==""&&y!=="[]"&&y!=="null"}return!0},c=({content:d,status:y,respTime:h,filePaths:C,reference:b,webReference:E,knowledgeBases:F,graphReference:A,databaseReference:w,llmType:B,resultType:g,queryId:S,tokens:_,chain:R,thoughtChainNodes:P,enableCot:z,chainRespTime:$,faqReference:j})=>{n(q=>{var se;if(!q[0])return q;const Y=q[0],U=Y.messages||[],M=U.length-1;if(M<0)return q;const N=U[M];if(N.istype!=="ai")return q;let O=U.slice();if(C!=null&&C.length){const De=U.length-2;if(De>=0&&((se=U[De])==null?void 0:se.istype)==="user"){const Q={...U[De],filePaths:C};O[De]=Q}}const I=S&&S!==N.queryId,V=y===1&&N.status===2,X=I||V?s(A)?A:null:A!==void 0&&s(A)?A:N.graphReference;y===2&&A!==void 0&&console.log("[AichatUseController] reset_chat status=2 \u65F6\u7684 graphReference:",{graphReference:A,isValid:s(A),lastMessageGraphReference:N.graphReference,finalGraphReference:X,isNewQuery:I,isRestart:V});let ee;I?ee=d:V?ee="":y===4||y===2&&!d?ee=N.content||"":ee=(N.content||"")+d;const re={...N,content:ee,status:y,respTime:h,filePaths:C,reference:I||V?b||"[]":b,webReference:I||V?E||"[]":E,knowledgeBases:I||V?F||"[]":F,graphReference:X,databaseReference:I||V?w!==void 0?w:null:w!==void 0?w:N.databaseReference,resultType:g,llmType:B,tokens:_,queryId:S||N.queryId||br(32),chain:I||V?R!==void 0?R:void 0:R!==void 0?R:N.chain,thoughtChainNodes:I||V?P!==void 0?P:void 0:P!==void 0?P:N.thoughtChainNodes,enableCot:z!==void 0?z:N.enableCot,chainRespTime:$!==void 0?$:N.chainRespTime,faqReference:I||V?j!==void 0?j:null:j!==void 0?j:N.faqReference};return re.clientSideId=re.clientSideId||re.queryId+"-ai",O[M]=re,[{...Y,isNew:!1,messages:O},...q.slice(1)]})},u=d=>{if(d instanceof ja)throw a(y=>({...y,display:"error",sender:"ready"})),xr&&(xr.abort(),xr=null),Ar=null,ar=null,d};return{updateUserFilesMessage:({currentFiles:d})=>{n(y=>{if(!y[0])return y;const h=y[0],C=h.messages||[];if(!C.length)return y;const b=C.length-2;if(b<0||C[b].istype!=="user")return y;const F=C.slice();return F[b]={...C[b],currentFiles:d},[{...h,messages:F},...y.slice(1)]})},api_startChat_re:(d,y)=>{xr&&xr.abort(),xr=new AbortController,Ar=d.sessionId,ar=d.queryId,Qe=[],sn=void 0,un=void 0,Ua=new Map;const h=`${t}/qa/ai/question_re`;console.log("data",d);const C={...d};jc(h,{method:"post",signal:xr.signal,headers:{"Content-Type":"application/json",Accept:"text/event-stream",Authorization:r||"","X-CSRF-TOKEN-IN":e||""},openWhenHidden:!0,body:JSON.stringify(C),onopen:async b=>{if(b.status===500)throw new ja("Internal Server Error");if(!b.ok)throw new ja(`HTTP error: ${b.status}`)},onmessage:b=>{var V,X,ee,re;const E=JSON.parse(b.data);if(Ar!==E.sessionId){console.log("[AichatUseController] \u6D41\u5F0F\u8BF7\u6C42\u7684 sessionId \u5DF2\u4E0D\u5339\u914D\uFF0C\u5FFD\u7565\u6570\u636E",{currentStreamSessionId:Ar,receivedSessionId:E.sessionId,activeSessionId:i});return}if(i!==E.sessionId)return;const{reply:F,resultType:A,respTime:w,reference:B,webReference:g,graphReference:S,knowledgeBases:_,filePaths:R,status:P,docs:z,llmType:$,databaseReference:j,businessType:q,nodeStatus:Y,enableCot:U,chainRespTime:M,faqReference:N}=E;if(P===4&&q){Y===2&&typeof M=="number"&&M>0&&Ua.set(q,M);const ie=Y===2&&typeof M=="number"&&M>0?M:void 0;Qe=Ac(Qe,{businessType:q,nodeStatus:Y,reply:F,respTime:ie,chainRespTime:ie}),console.log("[AichatUseController] status=4 \u805A\u5408\u601D\u7EF4\u94FE\u6570\u636E:",{businessType:q,nodeStatus:Y,content:(V=F==null?void 0:F.content)==null?void 0:V.substring(0,50),currentThoughtNodesCount:Qe.length,chainRespTime:Y===2?M:void 0})}else P===1&&q&&console.log("[AichatUseController] status=1 \u8DF3\u8FC7\u601D\u7EF4\u94FE\u805A\u5408:",{businessType:q,content:(X=F==null?void 0:F.content)==null?void 0:X.substring(0,50),note:"status=1 \u7684\u5185\u5BB9\u5E94\u8BE5\u53BB\u6B63\u6587\uFF0C\u4E0D\u662F\u601D\u7EF4\u94FE"});if(typeof U=="number"&&(sn=U),P===1||P===2){const ie=Array.from(Ua.values()).reduce((se,De)=>se+De,0);ie>0&&(un=ie)}const O=R?JSON.parse(R):[];P===2&&F&&F.content&&(F.content.includes("\u6A21\u578B\u6682\u65E0\u6CD5\u8FD4\u56DE")||F.content.includes("\u5931\u8D25")||F.content.includes("\u9519\u8BEF")||F.content.includes("\u8BF7\u7A0D\u540E\u518D\u8BD5"))&&a(ie=>({...ie,display:"ready",sender:"ready"}));const I=s(S)?S:void 0;if(P===2&&console.log("[AichatUseController] status=2 \u65F6\u7684 graphReference:",{graphReference:S,type:typeof S,isValid:s(S),finalGraphReference:I}),P===4){const ie=Qe.length>0?Qe.map(se=>({businessType:se.businessType,nodeStatus:se.nodeStatus,content:se.content})):void 0;console.log("[AichatUseController] status=4 \u66F4\u65B0\u601D\u7EF4\u94FE:",{businessType:q,chainLength:(ie==null?void 0:ie.length)||0,replyContentLength:((ee=F==null?void 0:F.content)==null?void 0:ee.length)||0,note:"status=4 \u65F6\uFF0Creply.content \u5E94\u8BE5\u805A\u5408\u5230\u601D\u7EF4\u94FE\uFF0C\u4E0D\u66F4\u65B0\u6B63\u6587"}),c({content:"",status:P,respTime:w,filePaths:O,reference:B||z||"",webReference:g||"",knowledgeBases:_||"",graphReference:I,databaseReference:j,llmType:$,resultType:A,queryId:E.queryId,tokens:E.tokens,chain:ie,thoughtChainNodes:Qe.length>0?[...Qe]:void 0,enableCot:sn,chainRespTime:un,faqReference:N})}else if(P===1){Qe.length>0&&(Qe=Qe.map(se=>({...se,nodeStatus:2}))),console.log("[AichatUseController] status=1 \u66F4\u65B0\u6B63\u6587:",{businessType:q,content:(re=F==null?void 0:F.content)==null?void 0:re.substring(0,50),thoughtNodesCount:Qe.length,note:"status=1 \u65F6\uFF0Creply.content \u5E94\u8BE5\u53BB\u6B63\u6587\uFF0C\u601D\u7EF4\u94FE\u8282\u70B9\u72B6\u6001\u66F4\u65B0\u4E3A\u5B8C\u6210"});const ie=Qe.length>0?Qe.map(se=>({businessType:se.businessType,nodeStatus:se.nodeStatus,content:se.content})):void 0;c({content:F.content||"",status:P,respTime:w,filePaths:O,reference:B||z||"",webReference:g||"",graphReference:I,knowledgeBases:_||"",databaseReference:j??null,llmType:$,resultType:A,queryId:E.queryId,tokens:E.tokens,chain:ie??void 0,thoughtChainNodes:Qe.length>0?[...Qe]:void 0,enableCot:sn,chainRespTime:un,faqReference:N})}else if(P===2){Qe.length>0&&(Qe=Qe.map(se=>({...se,nodeStatus:2})));const ie=Qe.length>0?Qe.map(se=>({businessType:se.businessType,nodeStatus:se.nodeStatus,content:se.content})):void 0;if(c({content:F.content||"",status:2,respTime:w,filePaths:O,reference:B||z||"",webReference:g||"",knowledgeBases:_||"",graphReference:I,databaseReference:j,llmType:$,resultType:A,queryId:E.queryId,tokens:E.tokens,chain:ie,thoughtChainNodes:Qe.length>0?[...Qe]:void 0,enableCot:sn,chainRespTime:un,faqReference:N}),Qe=[],a(se=>({...se,display:"ready",sender:"ready"})),y){const se=w||Date.now();console.log("[AichatUseController] \u6D88\u606F\u53D1\u9001\u6210\u529F\uFF0CgmtModified:",se),y(se)}}else{const ie=Qe.length>0?Qe.map(se=>({businessType:se.businessType,nodeStatus:se.nodeStatus,content:se.content,respTime:se.respTime,chainRespTime:se.respTime})):void 0;c({content:F.content||"",status:P,respTime:w,filePaths:O,reference:B||z||"",knowledgeBases:_||"",webReference:g||"",graphReference:I,databaseReference:j,llmType:$,resultType:A,queryId:E.queryId,tokens:E.tokens,chain:ie,thoughtChainNodes:Qe.length>0?[...Qe]:void 0,enableCot:sn,chainRespTime:un})}},onerror:u,onclose:()=>{Ar===d.sessionId&&(Ar=null,ar=null)}})},addEmptyMessage:({queryId:d,content:y,filePaths:h,currentFiles:C})=>{n(b=>{const E=new Date().toISOString(),F=d||br(32),A={istype:"user",content:y,time:E,queryId:F,clientSideId:F+"-user",filePaths:h||"",currentFiles:C||[]},w={istype:"ai",content:"",time:new Date(Date.now()+1).toISOString(),streaming:!0,status:0,queryId:F,clientSideId:F+"-ai"},B=b.find(g=>g.id===i);return B?B.messages.push(A,w):console.warn("addEmptyMessage called without an active session."),[...b]})},setLastEmptyMessage:({now:d})=>{n(y=>{if(!y[0])return y;const h=y[0],C=h.messages||[];if(!C.length)return y;const b=C.length-1;if(b<0)return y;const E=C[b];if(E.istype!=="ai")return y;const F=C.slice();return F[b]={...E,istype:"ai",content:"",time:d,streaming:!0,status:0},[{...h,messages:F},...y.slice(1)]})},stopStream:async()=>{if(ar)try{await Mt.delete(`${t}/qa/ai/abortStream?queryId=${ar}`,{headers:{Authorization:r||"","X-CSRF-TOKEN-IN":e||""}}),console.log("[AichatUseController] \u5DF2\u8C03\u7528\u540E\u7AEF\u63A5\u53E3\u505C\u6B62\u6D41\u5F0F\u8BF7\u6C42",ar)}catch(d){console.error("[AichatUseController] \u8C03\u7528\u505C\u6B62\u63A5\u53E3\u5931\u8D25",d)}else console.warn("[AichatUseController] \u505C\u6B62\u6D41\u5F0F\u8BF7\u6C42\u65F6\u672A\u627E\u5230 queryId");xr=null,Ar=null,ar=null,a(d=>({...d,display:"ready",sender:"ready"}))},cancelStreamBySessionId:async d=>{if(xr&&Ar===d){if(console.log("[AichatUseController] \u5207\u6362\u4F1A\u8BDD\uFF0C\u53D6\u6D88\u6B63\u5728\u8FDB\u884C\u7684\u6D41\u5F0F\u8BF7\u6C42",d),ar)try{await Mt.delete(`${t}/qa/ai/abortStream?queryId=${ar}`,{headers:{Authorization:r||"","X-CSRF-TOKEN-IN":e||""}}),console.log("[AichatUseController] \u5207\u6362\u4F1A\u8BDD\u65F6\u5DF2\u8C03\u7528\u540E\u7AEF\u63A5\u53E3\u505C\u6B62\u6D41\u5F0F\u8BF7\u6C42",ar)}catch(y){console.error("[AichatUseController] \u5207\u6362\u4F1A\u8BDD\u65F6\u8C03\u7528\u505C\u6B62\u63A5\u53E3\u5931\u8D25",y)}else console.warn("[AichatUseController] \u5207\u6362\u4F1A\u8BDD\u65F6\u672A\u627E\u5230 queryId");return xr=null,Ar=null,ar=null,a(y=>({...y,display:"ready",sender:"ready"})),!0}return!1}}},B1=1e3,S1=3e3;function D1({url:t,token:r,CSRFToken:e,onError:n,activeSessionId:i}){const[a,o]=ue([]),[s,c]=ue(()=>({uploadedFiles:[]})),u=We(!1),l=async p=>{var d,y;if(!p)return null;try{const h=await Mt.get(`${t}/index/knowledgeBase/file/getFilesBysessionId?sessionId=${p}`,{headers:{Authorization:r}});console.log("[DEBUG] \u83B7\u53D6\u4E34\u65F6\u6587\u4EF6\u5217\u8868 res:",(d=h==null?void 0:h.data)==null?void 0:d.data),c({uploadedFiles:((y=h==null?void 0:h.data)==null?void 0:y.data)||[]})}catch(h){throw console.error("\u83B7\u53D6\u4E34\u65F6\u6587\u4EF6\u5217\u8868\u5931\u8D25:",h),h}},x=Kt((p,d)=>{const y=p.join(",");let h=0,C=null;C=()=>{u.current=!0};const b=async()=>{if(!u.current){if(h>=B1){u.current||d.onFail("\u6587\u4EF6\u89E3\u6790\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");return}h++;try{const E=await Mt.get(`${t}/index/knowledgeBase/file/getFileStatusByUids?uids=${y}`,{headers:{Authorization:r}});if(u.current)return;if(E.data.success){const F=E.data.data;u.current||d.onStatusUpdate(F),F.every(w=>{const B=w.fileParseStatus??w.status;return B===3||B===4})?u.current||d.onComplete():u.current||setTimeout(b,S1)}else u.current||d.onFail(E.data.errorMsg||"\u67E5\u8BE2\u6587\u4EF6\u72B6\u6001\u5931\u8D25")}catch(E){if(n==null||n(E),u.current)return;d.onFail("\u67E5\u8BE2\u6587\u4EF6\u72B6\u6001\u65F6\u53D1\u751F\u7F51\u7EDC\u9519\u8BEF")}}};return b(),C},[t,r,n]),f=Kt(async(p,d)=>{if(!p){console.warn("[DEBUG] \u7F3A\u5C11uid\uFF0C\u65E0\u6CD5\u5220\u9664\u4E34\u65F6\u6587\u4EF6");return}Uc({url:t,token:r,CSRFToken:e},{uid:p,queryId:d},(y,h)=>{y?(lt.success("\u6587\u4EF6\u5DF2\u4ECE\u4E34\u65F6\u77E5\u8BC6\u5E93\u79FB\u9664"),l(i)):(console.log("[DEBUG] removeFilefromTempUpload \u56DE\u8C03 false\uFF0Cres:",h),lt.error("\u6587\u4EF6\u79FB\u9664\u5931\u8D25"))})},[t,r,e,i]),m=Kt(()=>{u.current=!1},[]),v=Kt(()=>{u.current=!0},[]);return{fileManagerData:s,fileStatuses:a,setFileManagerData:c,setFileStatuses:o,pollFileStatus:x,handleRemoveFromTemp:f,resetStopFlag:m,setStopFlag:v,stoppedRef:u,getTempFileList:l}}function _1({title:t,subtitle:r}){const[e,n]=ue(0);return $e(()=>{let i;return e<98?i=setTimeout(()=>{n(a=>a+Math.random()*6+1)},80):e<100&&(i=setTimeout(()=>n(100),400)),()=>clearTimeout(i)},[e]),te("div",{className:"flex flex-col justify-center items-center min-h-screen bg-gradient-to-br from-[#EEF4FF] via-white to-[#F5F8FF]",children:[te("div",{className:"mb-8 flex flex-col items-center",children:[k("div",{className:"mt-6 text-2xl font-semibold text-[#222222] tracking-wide",children:t||"\u5C0F\u9CB8\u667A\u80FD\u4F1A\u8BDD\u52A9\u624B"}),k("div",{className:"mt-2 text-sm text-[#555555]",children:r||"\u8BA9\u667A\u80FD\u5BF9\u8BDD\u66F4\u7B80\u5355"})]}),te("div",{className:"relative w-80 max-w-sm",children:[k("div",{className:"w-full h-2 bg-[#EEF4FF] rounded-full overflow-hidden shadow-inner",children:k("div",{className:"h-full bg-gradient-to-r from-[#2B69FF] to-[#8F91FF] transition-all duration-300 ease-out",style:{width:`${Math.min(e,100)}%`}})}),te("div",{className:"absolute -right-2 top-5 text-sm text-[#555555]",children:[Math.min(Math.round(e),100),"%"]})]}),te("div",{className:"mt-8 flex flex-col items-center gap-2",children:[k("div",{className:"text-sm text-[#555555] animate-pulse",children:"\u6B63\u5728\u521D\u59CB\u5316\u5E94\u7528"}),k("div",{className:"text-xs text-[#888888]",children:"\u9996\u6B21\u52A0\u8F7D\u53EF\u80FD\u9700\u8981\u4E00\u4E9B\u65F6\u95F4\uFF0C\u8BF7\u8010\u5FC3\u7B49\u5F85"})]})]})}const Wl=document.createElement("style");Wl.textContent=`
254
+ .animate-bounce-slow {
255
+ animation: bounce 2.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
256
+ }
257
+ @keyframes bounce {
258
+ 0%, 100% { transform: translateY(0); }
259
+ 50% { transform: translateY(-12px); }
260
+ }
261
+ `;document.head.appendChild(Wl);function k1(){return te("div",{className:"flex flex-col gap-8 p-4 w-full mx-auto",children:[te("div",{className:"flex items-start gap-4",children:[k("div",{className:"w-10 h-10 rounded-full bg-muted/80 animate-pulse"}),k("div",{className:"flex-1",children:k(Qn,{active:!0,paragraph:{rows:1}})})]}),te("div",{className:"flex items-start gap-4",children:[k("div",{className:"w-10 h-10 rounded-full bg-muted/80 animate-pulse"}),k("div",{className:"flex-1",children:k(Qn,{active:!0,paragraph:{rows:3}})})]}),te("div",{className:"flex items-start gap-4",children:[k("div",{className:"w-10 h-10 rounded-full bg-muted/80 animate-pulse"}),k("div",{className:"flex-1",children:k(Qn,{active:!0,paragraph:{rows:1}})})]}),te("div",{className:"flex items-start gap-4",children:[k("div",{className:"w-10 h-10 rounded-full bg-muted/80 animate-pulse"}),k("div",{className:"flex-1",children:k(Qn,{active:!0,paragraph:{rows:2}})})]})]})}function R1({msg:t,subMsg:r}){return te("div",{className:"flex flex-col items-center justify-center h-full p-8 text-center bg-white/80 backdrop-blur-sm",children:[k("div",{className:"mb-6 animate-bounce",children:k(md,{size:64,className:"text-[#d70016]"})}),k("h2",{className:"text-[20px] font-medium text-[#222222] mb-3",children:t||"\u5E94\u7528\u521D\u59CB\u5316\u5931\u8D25"}),k("p",{className:"text-[14px] text-[#555555] mb-8 max-w-[400px]",children:r||"\u65E0\u6CD5\u5B8C\u6210\u5E94\u7528\u521D\u59CB\u5316\uFF0C\u8FD9\u53EF\u80FD\u662F\u7531\u4E8E\u7F51\u7EDC\u8FDE\u63A5\u95EE\u9898\u6216\u670D\u52A1\u914D\u7F6E\u9519\u8BEF\u5BFC\u81F4\u7684\u3002\u8BF7\u68C0\u67E5\u60A8\u7684\u7F51\u7EDC\u8FDE\u63A5\u5E76\u91CD\u8BD5\u3002"}),k(yr,{type:"primary",icon:k(Du,{className:"w-4 h-4"}),onClick:()=>window.location.reload(),className:"flex items-center gap-2 bg-gradient-to-r from-[#2B69FF] to-[#8F91FF] border-none hover:opacity-90",children:"\u91CD\u65B0\u52A0\u8F7D"})]})}function T1(){return te("div",{className:"flex flex-col items-center justify-center h-full p-8 text-center bg-transparent! backdrop-blur-sm",children:[k("div",{className:"mb-6 animate-bounce",children:k(Wc,{size:64,className:"text-[#d70016]"})}),k("h2",{className:"text-[20px] font-medium text-[#222222] mb-3",children:"\u62B1\u6B49\uFF0C\u9047\u5230\u4E86\u4E00\u4E9B\u95EE\u9898"}),k("p",{className:"text-[14px] text-[#555555] mb-8 max-w-[400px]",children:"\u8BF7\u6C42\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5"}),k(yr,{type:"primary",icon:k(Du,{className:"w-4 h-4"}),onClick:()=>window.location.reload(),className:"flex items-center gap-2 bg-gradient-to-r from-[#2B69FF] to-[#8F91FF] border-none hover:opacity-90",children:"\u91CD\u65B0\u52A0\u8F7D"})]})}function So(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},e=[];return ye.Children.forEach(t,function(n){n==null&&!r.keepEmpty||(Array.isArray(n)?e=e.concat(So(n)):xl(n)&&n.props?e=e.concat(So(n.props.children,r)):e.push(n))}),e}var Kr="RC_FORM_INTERNAL_HOOKS",Ze=function(){Br(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},Fn=L.createContext({getFieldValue:Ze,getFieldsValue:Ze,getFieldError:Ze,getFieldWarning:Ze,getFieldsError:Ze,isFieldsTouched:Ze,isFieldTouched:Ze,isFieldValidating:Ze,isFieldsValidating:Ze,resetFields:Ze,setFields:Ze,setFieldValue:Ze,setFieldsValue:Ze,validateFields:Ze,submit:Ze,getInternalHooks:function(){return Ze(),{dispatch:Ze,initEntityValue:Ze,registerField:Ze,useSubscribe:Ze,setInitialValues:Ze,destroyForm:Ze,setCallbacks:Ze,registerWatch:Ze,getFields:Ze,setValidateMessages:Ze,setPreserve:Ze,getInitialValue:Ze}}}),la=L.createContext(null);function Do(t){return t==null?[]:Array.isArray(t)?t:[t]}function I1(t){return t&&!!t._init}function _o(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var r=JSON.parse(JSON.stringify(this));return r.clone=this.clone,r}}}var ko=_o();function P1(t){try{return Function.toString.call(t).indexOf("[native code]")!==-1}catch{return typeof t=="function"}}function N1(t,r,e){if(Cu())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,r);var i=new(t.bind.apply(t,n));return e&&$o(i,e.prototype),i}function Ro(t){var r=typeof Map=="function"?new Map:void 0;return Ro=function(n){if(n===null||!P1(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(r!==void 0){if(r.has(n))return r.get(n);r.set(n,i)}function i(){return N1(n,arguments,Za(this).constructor)}return i.prototype=Object.create(n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),$o(i,n)},Ro(t)}var O1=/%[sdj%]/g,M1=function(){};function To(t){if(!t||!t.length)return null;var r={};return t.forEach(function(e){var n=e.field;r[n]=r[n]||[],r[n].push(e)}),r}function Gt(t){for(var r=arguments.length,e=new Array(r>1?r-1:0),n=1;n<r;n++)e[n-1]=arguments[n];var i=0,a=e.length;if(typeof t=="function")return t.apply(null,e);if(typeof t=="string"){var o=t.replace(O1,function(s){if(s==="%%")return"%";if(i>=a)return s;switch(s){case"%s":return String(e[i++]);case"%d":return Number(e[i++]);case"%j":try{return JSON.stringify(e[i++])}catch{return"[Circular]"}break;default:return s}});return o}return t}function L1(t){return t==="string"||t==="url"||t==="hex"||t==="email"||t==="date"||t==="pattern"}function gt(t,r){return!!(t==null||r==="array"&&Array.isArray(t)&&!t.length||L1(r)&&typeof t=="string"&&!t)}function $1(t,r,e){var n=[],i=0,a=t.length;function o(s){n.push.apply(n,me(s||[])),i++,i===a&&e(n)}t.forEach(function(s){r(s,o)})}function d0(t,r,e){var n=0,i=t.length;function a(o){if(o&&o.length){e(o);return}var s=n;n=n+1,s<i?r(t[s],a):e([])}a([])}function z1(t){var r=[];return Object.keys(t).forEach(function(e){r.push.apply(r,me(t[e]||[]))}),r}var f0=(function(t){wn(e,t);var r=Sn(e);function e(n,i){var a;return Pt(this,e),a=r.call(this,"Async Validation Error"),H(Se(a),"errors",void 0),H(Se(a),"fields",void 0),a.errors=n,a.fields=i,a}return It(e)})(Ro(Error));function q1(t,r,e,n,i){if(r.first){var a=new Promise(function(f,m){var v=function(y){return n(y),y.length?m(new f0(y,To(y))):f(i)},p=z1(t);d0(p,e,v)});return a.catch(function(f){return f}),a}var o=r.firstFields===!0?Object.keys(t):r.firstFields||[],s=Object.keys(t),c=s.length,u=0,l=[],x=new Promise(function(f,m){var v=function(d){if(l.push.apply(l,d),u++,u===c)return n(l),l.length?m(new f0(l,To(l))):f(i)};s.length||(n(l),f(i)),s.forEach(function(p){var d=t[p];o.indexOf(p)!==-1?d0(d,e,v):$1(d,e,v)})});return x.catch(function(f){return f}),x}function H1(t){return!!(t&&t.message!==void 0)}function V1(t,r){for(var e=t,n=0;n<r.length;n++){if(e==null)return e;e=e[r[n]]}return e}function p0(t,r){return function(e){var n;return t.fullFields?n=V1(r,t.fullFields):n=r[e.field||t.fullField],H1(e)?(e.field=e.field||t.fullField,e.fieldValue=n,e):{message:typeof e=="function"?e():e,fieldValue:n,field:e.field||t.fullField}}}function h0(t,r){if(r){for(var e in r)if(r.hasOwnProperty(e)){var n=r[e];Pe(n)==="object"&&Pe(t[e])==="object"?t[e]=J(J({},t[e]),n):t[e]=n}}return t}var ln="enum",j1=function(r,e,n,i,a){r[ln]=Array.isArray(r[ln])?r[ln]:[],r[ln].indexOf(e)===-1&&i.push(Gt(a.messages[ln],r.fullField,r[ln].join(", ")))},U1=function(r,e,n,i,a){if(r.pattern){if(r.pattern instanceof RegExp)r.pattern.lastIndex=0,r.pattern.test(e)||i.push(Gt(a.messages.pattern.mismatch,r.fullField,e,r.pattern));else if(typeof r.pattern=="string"){var o=new RegExp(r.pattern);o.test(e)||i.push(Gt(a.messages.pattern.mismatch,r.fullField,e,r.pattern))}}},W1=function(r,e,n,i,a){var o=typeof r.len=="number",s=typeof r.min=="number",c=typeof r.max=="number",u=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,l=e,x=null,f=typeof e=="number",m=typeof e=="string",v=Array.isArray(e);if(f?x="number":m?x="string":v&&(x="array"),!x)return!1;v&&(l=e.length),m&&(l=e.replace(u,"_").length),o?l!==r.len&&i.push(Gt(a.messages[x].len,r.fullField,r.len)):s&&!c&&l<r.min?i.push(Gt(a.messages[x].min,r.fullField,r.min)):c&&!s&&l>r.max?i.push(Gt(a.messages[x].max,r.fullField,r.max)):s&&c&&(l<r.min||l>r.max)&&i.push(Gt(a.messages[x].range,r.fullField,r.min,r.max))},Kl=function(r,e,n,i,a,o){r.required&&(!n.hasOwnProperty(r.field)||gt(e,o||r.type))&&i.push(Gt(a.messages.required,r.fullField))},ai;const K1=(function(){if(ai)return ai;var t="[a-fA-F\\d:]",r=function(F){return F&&F.includeBoundaries?"(?:(?<=\\s|^)(?=".concat(t,")|(?<=").concat(t,")(?=\\s|$))"):""},e="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",n="[a-fA-F\\d]{1,4}",i=["(?:".concat(n,":){7}(?:").concat(n,"|:)"),"(?:".concat(n,":){6}(?:").concat(e,"|:").concat(n,"|:)"),"(?:".concat(n,":){5}(?::").concat(e,"|(?::").concat(n,"){1,2}|:)"),"(?:".concat(n,":){4}(?:(?::").concat(n,"){0,1}:").concat(e,"|(?::").concat(n,"){1,3}|:)"),"(?:".concat(n,":){3}(?:(?::").concat(n,"){0,2}:").concat(e,"|(?::").concat(n,"){1,4}|:)"),"(?:".concat(n,":){2}(?:(?::").concat(n,"){0,3}:").concat(e,"|(?::").concat(n,"){1,5}|:)"),"(?:".concat(n,":){1}(?:(?::").concat(n,"){0,4}:").concat(e,"|(?::").concat(n,"){1,6}|:)"),"(?::(?:(?::".concat(n,"){0,5}:").concat(e,"|(?::").concat(n,"){1,7}|:))")],a="(?:%[0-9a-zA-Z]{1,})?",o="(?:".concat(i.join("|"),")").concat(a),s=new RegExp("(?:^".concat(e,"$)|(?:^").concat(o,"$)")),c=new RegExp("^".concat(e,"$")),u=new RegExp("^".concat(o,"$")),l=function(F){return F&&F.exact?s:new RegExp("(?:".concat(r(F)).concat(e).concat(r(F),")|(?:").concat(r(F)).concat(o).concat(r(F),")"),"g")};l.v4=function(E){return E&&E.exact?c:new RegExp("".concat(r(E)).concat(e).concat(r(E)),"g")},l.v6=function(E){return E&&E.exact?u:new RegExp("".concat(r(E)).concat(o).concat(r(E)),"g")};var x="(?:(?:[a-z]+:)?//)",f="(?:\\S+(?::\\S*)?@)?",m=l.v4().source,v=l.v6().source,p="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",d="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",y="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",h="(?::\\d{2,5})?",C='(?:[/?#][^\\s"]*)?',b="(?:".concat(x,"|www\\.)").concat(f,"(?:localhost|").concat(m,"|").concat(v,"|").concat(p).concat(d).concat(y,")").concat(h).concat(C);return ai=new RegExp("(?:^".concat(b,"$)"),"i"),ai});var v0={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},Rn={integer:function(r){return Rn.number(r)&&parseInt(r,10)===r},float:function(r){return Rn.number(r)&&!Rn.integer(r)},array:function(r){return Array.isArray(r)},regexp:function(r){if(r instanceof RegExp)return!0;try{return!!new RegExp(r)}catch{return!1}},date:function(r){return typeof r.getTime=="function"&&typeof r.getMonth=="function"&&typeof r.getYear=="function"&&!isNaN(r.getTime())},number:function(r){return isNaN(r)?!1:typeof r=="number"},object:function(r){return Pe(r)==="object"&&!Rn.array(r)},method:function(r){return typeof r=="function"},email:function(r){return typeof r=="string"&&r.length<=320&&!!r.match(v0.email)},url:function(r){return typeof r=="string"&&r.length<=2048&&!!r.match(K1())},hex:function(r){return typeof r=="string"&&!!r.match(v0.hex)}},G1=function(r,e,n,i,a){if(r.required&&e===void 0){Kl(r,e,n,i,a);return}var o=["integer","float","array","regexp","object","method","email","number","date","url","hex"],s=r.type;o.indexOf(s)>-1?Rn[s](e)||i.push(Gt(a.messages.types[s],r.fullField,r.type)):s&&Pe(e)!==r.type&&i.push(Gt(a.messages.types[s],r.fullField,r.type))},X1=function(r,e,n,i,a){(/^\s+$/.test(e)||e==="")&&i.push(Gt(a.messages.whitespace,r.fullField))};const Ie={required:Kl,whitespace:X1,type:G1,range:W1,enum:j1,pattern:U1};var Y1=function(r,e,n,i,a){var o=[],s=r.required||!r.required&&i.hasOwnProperty(r.field);if(s){if(gt(e)&&!r.required)return n();Ie.required(r,e,i,o,a)}n(o)},Q1=function(r,e,n,i,a){var o=[],s=r.required||!r.required&&i.hasOwnProperty(r.field);if(s){if(e==null&&!r.required)return n();Ie.required(r,e,i,o,a,"array"),e!=null&&(Ie.type(r,e,i,o,a),Ie.range(r,e,i,o,a))}n(o)},Z1=function(r,e,n,i,a){var o=[],s=r.required||!r.required&&i.hasOwnProperty(r.field);if(s){if(gt(e)&&!r.required)return n();Ie.required(r,e,i,o,a),e!==void 0&&Ie.type(r,e,i,o,a)}n(o)},J1=function(r,e,n,i,a){var o=[],s=r.required||!r.required&&i.hasOwnProperty(r.field);if(s){if(gt(e,"date")&&!r.required)return n();if(Ie.required(r,e,i,o,a),!gt(e,"date")){var c;e instanceof Date?c=e:c=new Date(e),Ie.type(r,c,i,o,a),c&&Ie.range(r,c.getTime(),i,o,a)}}n(o)},ex="enum",tx=function(r,e,n,i,a){var o=[],s=r.required||!r.required&&i.hasOwnProperty(r.field);if(s){if(gt(e)&&!r.required)return n();Ie.required(r,e,i,o,a),e!==void 0&&Ie[ex](r,e,i,o,a)}n(o)},rx=function(r,e,n,i,a){var o=[],s=r.required||!r.required&&i.hasOwnProperty(r.field);if(s){if(gt(e)&&!r.required)return n();Ie.required(r,e,i,o,a),e!==void 0&&(Ie.type(r,e,i,o,a),Ie.range(r,e,i,o,a))}n(o)},nx=function(r,e,n,i,a){var o=[],s=r.required||!r.required&&i.hasOwnProperty(r.field);if(s){if(gt(e)&&!r.required)return n();Ie.required(r,e,i,o,a),e!==void 0&&(Ie.type(r,e,i,o,a),Ie.range(r,e,i,o,a))}n(o)},ix=function(r,e,n,i,a){var o=[],s=r.required||!r.required&&i.hasOwnProperty(r.field);if(s){if(gt(e)&&!r.required)return n();Ie.required(r,e,i,o,a),e!==void 0&&Ie.type(r,e,i,o,a)}n(o)},ax=function(r,e,n,i,a){var o=[],s=r.required||!r.required&&i.hasOwnProperty(r.field);if(s){if(e===""&&(e=void 0),gt(e)&&!r.required)return n();Ie.required(r,e,i,o,a),e!==void 0&&(Ie.type(r,e,i,o,a),Ie.range(r,e,i,o,a))}n(o)},ox=function(r,e,n,i,a){var o=[],s=r.required||!r.required&&i.hasOwnProperty(r.field);if(s){if(gt(e)&&!r.required)return n();Ie.required(r,e,i,o,a),e!==void 0&&Ie.type(r,e,i,o,a)}n(o)},sx=function(r,e,n,i,a){var o=[],s=r.required||!r.required&&i.hasOwnProperty(r.field);if(s){if(gt(e,"string")&&!r.required)return n();Ie.required(r,e,i,o,a),gt(e,"string")||Ie.pattern(r,e,i,o,a)}n(o)},ux=function(r,e,n,i,a){var o=[],s=r.required||!r.required&&i.hasOwnProperty(r.field);if(s){if(gt(e)&&!r.required)return n();Ie.required(r,e,i,o,a),gt(e)||Ie.type(r,e,i,o,a)}n(o)},lx=function(r,e,n,i,a){var o=[],s=Array.isArray(e)?"array":Pe(e);Ie.required(r,e,i,o,a,s),n(o)},cx=function(r,e,n,i,a){var o=[],s=r.required||!r.required&&i.hasOwnProperty(r.field);if(s){if(gt(e,"string")&&!r.required)return n();Ie.required(r,e,i,o,a,"string"),gt(e,"string")||(Ie.type(r,e,i,o,a),Ie.range(r,e,i,o,a),Ie.pattern(r,e,i,o,a),r.whitespace===!0&&Ie.whitespace(r,e,i,o,a))}n(o)},Wa=function(r,e,n,i,a){var o=r.type,s=[],c=r.required||!r.required&&i.hasOwnProperty(r.field);if(c){if(gt(e,o)&&!r.required)return n();Ie.required(r,e,i,s,a,o),gt(e,o)||Ie.type(r,e,i,s,a)}n(s)};const In={string:cx,method:ix,number:ax,boolean:Z1,regexp:ux,integer:nx,float:rx,array:Q1,object:ox,enum:tx,pattern:sx,date:J1,url:Wa,hex:Wa,email:Wa,required:lx,any:Y1};var Un=(function(){function t(r){Pt(this,t),H(this,"rules",null),H(this,"_messages",ko),this.define(r)}return It(t,[{key:"define",value:function(e){var n=this;if(!e)throw new Error("Cannot configure a schema with no rules");if(Pe(e)!=="object"||Array.isArray(e))throw new Error("Rules must be an object");this.rules={},Object.keys(e).forEach(function(i){var a=e[i];n.rules[i]=Array.isArray(a)?a:[a]})}},{key:"messages",value:function(e){return e&&(this._messages=h0(_o(),e)),this._messages}},{key:"validate",value:function(e){var n=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){},o=e,s=i,c=a;if(typeof s=="function"&&(c=s,s={}),!this.rules||Object.keys(this.rules).length===0)return c&&c(null,o),Promise.resolve(o);function u(v){var p=[],d={};function y(C){if(Array.isArray(C)){var b;p=(b=p).concat.apply(b,me(C))}else p.push(C)}for(var h=0;h<v.length;h++)y(v[h]);p.length?(d=To(p),c(p,d)):c(null,o)}if(s.messages){var l=this.messages();l===ko&&(l=_o()),h0(l,s.messages),s.messages=l}else s.messages=this.messages();var x={},f=s.keys||Object.keys(this.rules);f.forEach(function(v){var p=n.rules[v],d=o[v];p.forEach(function(y){var h=y;typeof h.transform=="function"&&(o===e&&(o=J({},o)),d=o[v]=h.transform(d),d!=null&&(h.type=h.type||(Array.isArray(d)?"array":Pe(d)))),typeof h=="function"?h={validator:h}:h=J({},h),h.validator=n.getValidationMethod(h),h.validator&&(h.field=v,h.fullField=h.fullField||v,h.type=n.getType(h),x[v]=x[v]||[],x[v].push({rule:h,value:d,source:o,field:v}))})});var m={};return q1(x,s,function(v,p){var d=v.rule,y=(d.type==="object"||d.type==="array")&&(Pe(d.fields)==="object"||Pe(d.defaultField)==="object");y=y&&(d.required||!d.required&&v.value),d.field=v.field;function h(A,w){return J(J({},w),{},{fullField:"".concat(d.fullField,".").concat(A),fullFields:d.fullFields?[].concat(me(d.fullFields),[A]):[A]})}function C(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],w=Array.isArray(A)?A:[A];!s.suppressWarning&&w.length&&t.warning("async-validator:",w),w.length&&d.message!==void 0&&(w=[].concat(d.message));var B=w.map(p0(d,o));if(s.first&&B.length)return m[d.field]=1,p(B);if(!y)p(B);else{if(d.required&&!v.value)return d.message!==void 0?B=[].concat(d.message).map(p0(d,o)):s.error&&(B=[s.error(d,Gt(s.messages.required,d.field))]),p(B);var g={};d.defaultField&&Object.keys(v.value).map(function(R){g[R]=d.defaultField}),g=J(J({},g),v.rule.fields);var S={};Object.keys(g).forEach(function(R){var P=g[R],z=Array.isArray(P)?P:[P];S[R]=z.map(h.bind(null,R))});var _=new t(S);_.messages(s.messages),v.rule.options&&(v.rule.options.messages=s.messages,v.rule.options.error=s.error),_.validate(v.value,v.rule.options||s,function(R){var P=[];B&&B.length&&P.push.apply(P,me(B)),R&&R.length&&P.push.apply(P,me(R)),p(P.length?P:null)})}}var b;if(d.asyncValidator)b=d.asyncValidator(d,v.value,C,v.source,s);else if(d.validator){try{b=d.validator(d,v.value,C,v.source,s)}catch(A){var E,F;(E=(F=console).error)===null||E===void 0||E.call(F,A),s.suppressValidatorError||setTimeout(function(){throw A},0),C(A.message)}b===!0?C():b===!1?C(typeof d.message=="function"?d.message(d.fullField||d.field):d.message||"".concat(d.fullField||d.field," fails")):b instanceof Array?C(b):b instanceof Error&&C(b.message)}b&&b.then&&b.then(function(){return C()},function(A){return C(A)})},function(v){u(v)},o)}},{key:"getType",value:function(e){if(e.type===void 0&&e.pattern instanceof RegExp&&(e.type="pattern"),typeof e.validator!="function"&&e.type&&!In.hasOwnProperty(e.type))throw new Error(Gt("Unknown rule type %s",e.type));return e.type||"string"}},{key:"getValidationMethod",value:function(e){if(typeof e.validator=="function")return e.validator;var n=Object.keys(e),i=n.indexOf("message");return i!==-1&&n.splice(i,1),n.length===1&&n[0]==="required"?In.required:In[this.getType(e)]||void 0}}]),t})();H(Un,"register",function(r,e){if(typeof e!="function")throw new Error("Cannot register a validator by type, validator is not a function");In[r]=e});H(Un,"warning",M1);H(Un,"messages",ko);H(Un,"validators",In);var Wt="'${name}' is not a valid ${type}",Gl={default:"Validation error on field '${name}'",required:"'${name}' is required",enum:"'${name}' must be one of [${enum}]",whitespace:"'${name}' cannot be empty",date:{format:"'${name}' is invalid for format date",parse:"'${name}' could not be parsed as date",invalid:"'${name}' is invalid date"},types:{string:Wt,method:Wt,array:Wt,object:Wt,number:Wt,date:Wt,boolean:Wt,integer:Wt,float:Wt,regexp:Wt,email:Wt,url:Wt,hex:Wt},string:{len:"'${name}' must be exactly ${len} characters",min:"'${name}' must be at least ${min} characters",max:"'${name}' cannot be longer than ${max} characters",range:"'${name}' must be between ${min} and ${max} characters"},number:{len:"'${name}' must equal ${len}",min:"'${name}' cannot be less than ${min}",max:"'${name}' cannot be greater than ${max}",range:"'${name}' must be between ${min} and ${max}"},array:{len:"'${name}' must be exactly ${len} in length",min:"'${name}' cannot be less than ${min} in length",max:"'${name}' cannot be greater than ${max} in length",range:"'${name}' must be between ${min} and ${max} in length"},pattern:{mismatch:"'${name}' does not match pattern ${pattern}"}},x0=Un;function dx(t,r){return t.replace(/\\?\$\{\w+\}/g,function(e){if(e.startsWith("\\"))return e.slice(1);var n=e.slice(2,-1);return r[n]})}var g0="CODE_LOGIC_ERROR";function Io(t,r,e,n,i){return Po.apply(this,arguments)}function Po(){return Po=Xr(Lt().mark(function t(r,e,n,i,a){var o,s,c,u,l,x,f,m,v;return Lt().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return o=J({},n),delete o.ruleIndex,x0.warning=function(){},o.validator&&(s=o.validator,o.validator=function(){try{return s.apply(void 0,arguments)}catch(y){return console.error(y),Promise.reject(g0)}}),c=null,o&&o.type==="array"&&o.defaultField&&(c=o.defaultField,delete o.defaultField),u=new x0(H({},r,[o])),l=fn(Gl,i.validateMessages),u.messages(l),x=[],d.prev=10,d.next=13,Promise.resolve(u.validate(H({},r,e),J({},i)));case 13:d.next=18;break;case 15:d.prev=15,d.t0=d.catch(10),d.t0.errors&&(x=d.t0.errors.map(function(y,h){var C=y.message,b=C===g0?l.default:C;return L.isValidElement(b)?L.cloneElement(b,{key:"error_".concat(h)}):b}));case 18:if(!(!x.length&&c&&Array.isArray(e)&&e.length>0)){d.next=23;break}return d.next=21,Promise.all(e.map(function(y,h){return Io("".concat(r,".").concat(h),y,c,i,a)}));case 21:return f=d.sent,d.abrupt("return",f.reduce(function(y,h){return[].concat(me(y),me(h))},[]));case 23:return m=J(J({},n),{},{name:r,enum:(n.enum||[]).join(", ")},a),v=x.map(function(y){return typeof y=="string"?dx(y,m):y}),d.abrupt("return",v);case 26:case"end":return d.stop()}},t,null,[[10,15]])})),Po.apply(this,arguments)}function fx(t,r,e,n,i,a){var o=t.join("."),s=e.map(function(l,x){var f=l.validator,m=J(J({},l),{},{ruleIndex:x});return f&&(m.validator=function(v,p,d){var y=!1,h=function(){for(var E=arguments.length,F=new Array(E),A=0;A<E;A++)F[A]=arguments[A];Promise.resolve().then(function(){Br(!y,"Your validator function has already return a promise. `callback` will be ignored."),y||d.apply(void 0,F)})},C=f(v,p,h);y=C&&typeof C.then=="function"&&typeof C.catch=="function",Br(y,"`callback` is deprecated. Please return a promise instead."),y&&C.then(function(){d()}).catch(function(b){d(b||" ")})}),m}).sort(function(l,x){var f=l.warningOnly,m=l.ruleIndex,v=x.warningOnly,p=x.ruleIndex;return!!f==!!v?m-p:f?1:-1}),c;if(i===!0)c=new Promise((function(){var l=Xr(Lt().mark(function x(f,m){var v,p,d;return Lt().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:v=0;case 1:if(!(v<s.length)){h.next=12;break}return p=s[v],h.next=5,Io(o,r,p,n,a);case 5:if(d=h.sent,!d.length){h.next=9;break}return m([{errors:d,rule:p}]),h.abrupt("return");case 9:v+=1,h.next=1;break;case 12:f([]);case 13:case"end":return h.stop()}},x)}));return function(x,f){return l.apply(this,arguments)}})());else{var u=s.map(function(l){return Io(o,r,l,n,a).then(function(x){return{errors:x,rule:l}})});c=(i?hx(u):px(u)).then(function(l){return Promise.reject(l)})}return c.catch(function(l){return l}),c}function px(t){return No.apply(this,arguments)}function No(){return No=Xr(Lt().mark(function t(r){return Lt().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",Promise.all(r).then(function(i){var a,o=(a=[]).concat.apply(a,me(i));return o}));case 1:case"end":return n.stop()}},t)})),No.apply(this,arguments)}function hx(t){return Oo.apply(this,arguments)}function Oo(){return Oo=Xr(Lt().mark(function t(r){var e;return Lt().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return e=0,i.abrupt("return",new Promise(function(a){r.forEach(function(o){o.then(function(s){s.errors.length&&a([s]),e+=1,e===r.length&&a([])})})}));case 2:case"end":return i.stop()}},t)})),Oo.apply(this,arguments)}function ct(t){return Do(t)}function m0(t,r){var e={};return r.forEach(function(n){var i=Cr(t,n);e=or(e,n,i)}),e}function mn(t,r){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return t&&t.some(function(n){return Xl(r,n,e)})}function Xl(t,r){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return!t||!r||!e&&t.length!==r.length?!1:r.every(function(n,i){return t[i]===n})}function vx(t,r){if(t===r)return!0;if(!t&&r||t&&!r||!t||!r||Pe(t)!=="object"||Pe(r)!=="object")return!1;var e=Object.keys(t),n=Object.keys(r),i=new Set([].concat(e,n));return me(i).every(function(a){var o=t[a],s=r[a];return typeof o=="function"&&typeof s=="function"?!0:o===s})}function xx(t){var r=arguments.length<=1?void 0:arguments[1];return r&&r.target&&Pe(r.target)==="object"&&t in r.target?r.target[t]:r}function y0(t,r,e){var n=t.length;if(r<0||r>=n||e<0||e>=n)return t;var i=t[r],a=r-e;return a>0?[].concat(me(t.slice(0,e)),[i],me(t.slice(e,r)),me(t.slice(r+1,n))):a<0?[].concat(me(t.slice(0,r)),me(t.slice(r+1,e+1)),[i],me(t.slice(e+1,n))):t}var gx=["name"],Zt=[];function Ka(t,r,e,n,i,a){return typeof t=="function"?t(r,e,"source"in a?{source:a.source}:{}):n!==i}var es=(function(t){wn(e,t);var r=Sn(e);function e(n){var i;if(Pt(this,e),i=r.call(this,n),H(Se(i),"state",{resetCount:0}),H(Se(i),"cancelRegisterFunc",null),H(Se(i),"mounted",!1),H(Se(i),"touched",!1),H(Se(i),"dirty",!1),H(Se(i),"validatePromise",void 0),H(Se(i),"prevValidating",void 0),H(Se(i),"errors",Zt),H(Se(i),"warnings",Zt),H(Se(i),"cancelRegister",function(){var c=i.props,u=c.preserve,l=c.isListField,x=c.name;i.cancelRegisterFunc&&i.cancelRegisterFunc(l,u,ct(x)),i.cancelRegisterFunc=null}),H(Se(i),"getNamePath",function(){var c=i.props,u=c.name,l=c.fieldContext,x=l.prefixName,f=x===void 0?[]:x;return u!==void 0?[].concat(me(f),me(u)):[]}),H(Se(i),"getRules",function(){var c=i.props,u=c.rules,l=u===void 0?[]:u,x=c.fieldContext;return l.map(function(f){return typeof f=="function"?f(x):f})}),H(Se(i),"refresh",function(){i.mounted&&i.setState(function(c){var u=c.resetCount;return{resetCount:u+1}})}),H(Se(i),"metaCache",null),H(Se(i),"triggerMetaEvent",function(c){var u=i.props.onMetaChange;if(u){var l=J(J({},i.getMeta()),{},{destroy:c});so(i.metaCache,l)||u(l),i.metaCache=l}else i.metaCache=null}),H(Se(i),"onStoreChange",function(c,u,l){var x=i.props,f=x.shouldUpdate,m=x.dependencies,v=m===void 0?[]:m,p=x.onReset,d=l.store,y=i.getNamePath(),h=i.getValue(c),C=i.getValue(d),b=u&&mn(u,y);switch(l.type==="valueUpdate"&&l.source==="external"&&!so(h,C)&&(i.touched=!0,i.dirty=!0,i.validatePromise=null,i.errors=Zt,i.warnings=Zt,i.triggerMetaEvent()),l.type){case"reset":if(!u||b){i.touched=!1,i.dirty=!1,i.validatePromise=void 0,i.errors=Zt,i.warnings=Zt,i.triggerMetaEvent(),p==null||p(),i.refresh();return}break;case"remove":{if(f&&Ka(f,c,d,h,C,l)){i.reRender();return}break}case"setField":{var E=l.data;if(b){"touched"in E&&(i.touched=E.touched),"validating"in E&&!("originRCField"in E)&&(i.validatePromise=E.validating?Promise.resolve([]):null),"errors"in E&&(i.errors=E.errors||Zt),"warnings"in E&&(i.warnings=E.warnings||Zt),i.dirty=!0,i.triggerMetaEvent(),i.reRender();return}else if("value"in E&&mn(u,y,!0)){i.reRender();return}if(f&&!y.length&&Ka(f,c,d,h,C,l)){i.reRender();return}break}case"dependenciesUpdate":{var F=v.map(ct);if(F.some(function(A){return mn(l.relatedFields,A)})){i.reRender();return}break}default:if(b||(!v.length||y.length||f)&&Ka(f,c,d,h,C,l)){i.reRender();return}break}f===!0&&i.reRender()}),H(Se(i),"validateRules",function(c){var u=i.getNamePath(),l=i.getValue(),x=c||{},f=x.triggerName,m=x.validateOnly,v=m===void 0?!1:m,p=Promise.resolve().then(Xr(Lt().mark(function d(){var y,h,C,b,E,F,A;return Lt().wrap(function(B){for(;;)switch(B.prev=B.next){case 0:if(i.mounted){B.next=2;break}return B.abrupt("return",[]);case 2:if(y=i.props,h=y.validateFirst,C=h===void 0?!1:h,b=y.messageVariables,E=y.validateDebounce,F=i.getRules(),f&&(F=F.filter(function(g){return g}).filter(function(g){var S=g.validateTrigger;if(!S)return!0;var _=Do(S);return _.includes(f)})),!(E&&f)){B.next=10;break}return B.next=8,new Promise(function(g){setTimeout(g,E)});case 8:if(i.validatePromise===p){B.next=10;break}return B.abrupt("return",[]);case 10:return A=fx(u,l,F,c,C,b),A.catch(function(g){return g}).then(function(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Zt;if(i.validatePromise===p){var S;i.validatePromise=null;var _=[],R=[];(S=g.forEach)===null||S===void 0||S.call(g,function(P){var z=P.rule.warningOnly,$=P.errors,j=$===void 0?Zt:$;z?R.push.apply(R,me(j)):_.push.apply(_,me(j))}),i.errors=_,i.warnings=R,i.triggerMetaEvent(),i.reRender()}}),B.abrupt("return",A);case 13:case"end":return B.stop()}},d)})));return v||(i.validatePromise=p,i.dirty=!0,i.errors=Zt,i.warnings=Zt,i.triggerMetaEvent(),i.reRender()),p}),H(Se(i),"isFieldValidating",function(){return!!i.validatePromise}),H(Se(i),"isFieldTouched",function(){return i.touched}),H(Se(i),"isFieldDirty",function(){if(i.dirty||i.props.initialValue!==void 0)return!0;var c=i.props.fieldContext,u=c.getInternalHooks(Kr),l=u.getInitialValue;return l(i.getNamePath())!==void 0}),H(Se(i),"getErrors",function(){return i.errors}),H(Se(i),"getWarnings",function(){return i.warnings}),H(Se(i),"isListField",function(){return i.props.isListField}),H(Se(i),"isList",function(){return i.props.isList}),H(Se(i),"isPreserve",function(){return i.props.preserve}),H(Se(i),"getMeta",function(){i.prevValidating=i.isFieldValidating();var c={touched:i.isFieldTouched(),validating:i.prevValidating,errors:i.errors,warnings:i.warnings,name:i.getNamePath(),validated:i.validatePromise===null};return c}),H(Se(i),"getOnlyChild",function(c){if(typeof c=="function"){var u=i.getMeta();return J(J({},i.getOnlyChild(c(i.getControlled(),u,i.props.fieldContext))),{},{isFunction:!0})}var l=So(c);return l.length!==1||!L.isValidElement(l[0])?{child:l,isFunction:!1}:{child:l[0],isFunction:!1}}),H(Se(i),"getValue",function(c){var u=i.props.fieldContext.getFieldsValue,l=i.getNamePath();return Cr(c||u(!0),l)}),H(Se(i),"getControlled",function(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},u=i.props,l=u.name,x=u.trigger,f=u.validateTrigger,m=u.getValueFromEvent,v=u.normalize,p=u.valuePropName,d=u.getValueProps,y=u.fieldContext,h=f!==void 0?f:y.validateTrigger,C=i.getNamePath(),b=y.getInternalHooks,E=y.getFieldsValue,F=b(Kr),A=F.dispatch,w=i.getValue(),B=d||function(P){return H({},p,P)},g=c[x],S=l!==void 0?B(w):{},_=J(J({},c),S);_[x]=function(){i.touched=!0,i.dirty=!0,i.triggerMetaEvent();for(var P,z=arguments.length,$=new Array(z),j=0;j<z;j++)$[j]=arguments[j];m?P=m.apply(void 0,$):P=xx.apply(void 0,[p].concat($)),v&&(P=v(P,w,E(!0))),P!==w&&A({type:"updateValue",namePath:C,value:P}),g&&g.apply(void 0,$)};var R=Do(h||[]);return R.forEach(function(P){var z=_[P];_[P]=function(){z&&z.apply(void 0,arguments);var $=i.props.rules;$&&$.length&&A({type:"validateField",namePath:C,triggerName:P})}}),_}),n.fieldContext){var a=n.fieldContext.getInternalHooks,o=a(Kr),s=o.initEntityValue;s(Se(i))}return i}return It(e,[{key:"componentDidMount",value:function(){var i=this.props,a=i.shouldUpdate,o=i.fieldContext;if(this.mounted=!0,o){var s=o.getInternalHooks,c=s(Kr),u=c.registerField;this.cancelRegisterFunc=u(this)}a===!0&&this.reRender()}},{key:"componentWillUnmount",value:function(){this.cancelRegister(),this.triggerMetaEvent(!0),this.mounted=!1}},{key:"reRender",value:function(){this.mounted&&this.forceUpdate()}},{key:"render",value:function(){var i=this.state.resetCount,a=this.props.children,o=this.getOnlyChild(a),s=o.child,c=o.isFunction,u;return c?u=s:L.isValidElement(s)?u=L.cloneElement(s,this.getControlled(s.props)):(Br(!s,"`children` of Field is not validate ReactElement."),u=s),L.createElement(L.Fragment,{key:i},u)}}]),e})(L.Component);H(es,"contextType",Fn);H(es,"defaultProps",{trigger:"onChange",valuePropName:"value"});function Yl(t){var r,e=t.name,n=Mr(t,gx),i=L.useContext(Fn),a=L.useContext(la),o=e!==void 0?ct(e):void 0,s=(r=n.isListField)!==null&&r!==void 0?r:!!a,c="keep";return s||(c="_".concat((o||[]).join("_"))),L.createElement(es,Tt({key:c,name:o,isListField:s},n,{fieldContext:i}))}function mx(t){var r=t.name,e=t.initialValue,n=t.children,i=t.rules,a=t.validateTrigger,o=t.isListField,s=L.useContext(Fn),c=L.useContext(la),u=L.useRef({keys:[],id:0}),l=u.current,x=L.useMemo(function(){var p=ct(s.prefixName)||[];return[].concat(me(p),me(ct(r)))},[s.prefixName,r]),f=L.useMemo(function(){return J(J({},s),{},{prefixName:x})},[s,x]),m=L.useMemo(function(){return{getKey:function(d){var y=x.length,h=d[y];return[l.keys[h],d.slice(y+1)]}}},[x]);if(typeof n!="function")return Br(!1,"Form.List only accepts function as children."),null;var v=function(d,y,h){var C=h.source;return C==="internal"?!1:d!==y};return L.createElement(la.Provider,{value:m},L.createElement(Fn.Provider,{value:f},L.createElement(Yl,{name:[],shouldUpdate:v,rules:i,validateTrigger:a,initialValue:e,isList:!0,isListField:o??!!c},function(p,d){var y=p.value,h=y===void 0?[]:y,C=p.onChange,b=s.getFieldValue,E=function(){var B=b(x||[]);return B||[]},F={add:function(B,g){var S=E();g>=0&&g<=S.length?(l.keys=[].concat(me(l.keys.slice(0,g)),[l.id],me(l.keys.slice(g))),C([].concat(me(S.slice(0,g)),[B],me(S.slice(g))))):(l.keys=[].concat(me(l.keys),[l.id]),C([].concat(me(S),[B]))),l.id+=1},remove:function(B){var g=E(),S=new Set(Array.isArray(B)?B:[B]);S.size<=0||(l.keys=l.keys.filter(function(_,R){return!S.has(R)}),C(g.filter(function(_,R){return!S.has(R)})))},move:function(B,g){if(B!==g){var S=E();B<0||B>=S.length||g<0||g>=S.length||(l.keys=y0(l.keys,B,g),C(y0(S,B,g)))}}},A=h||[];return Array.isArray(A)||(A=[]),n(A.map(function(w,B){var g=l.keys[B];return g===void 0&&(l.keys[B]=l.id,g=l.keys[B],l.id+=1),{name:B,key:g,isListField:!0}}),F,d)})))}function yx(t){var r=!1,e=t.length,n=[];return t.length?new Promise(function(i,a){t.forEach(function(o,s){o.catch(function(c){return r=!0,c}).then(function(c){e-=1,n[s]=c,!(e>0)&&(r&&a(n),i(n))})})}):Promise.resolve([])}var Ql="__@field_split__";function Ga(t){return t.map(function(r){return"".concat(Pe(r),":").concat(r)}).join(Ql)}var cn=(function(){function t(){Pt(this,t),H(this,"kvs",new Map)}return It(t,[{key:"set",value:function(e,n){this.kvs.set(Ga(e),n)}},{key:"get",value:function(e){return this.kvs.get(Ga(e))}},{key:"update",value:function(e,n){var i=this.get(e),a=n(i);a?this.set(e,a):this.delete(e)}},{key:"delete",value:function(e){this.kvs.delete(Ga(e))}},{key:"map",value:function(e){return me(this.kvs.entries()).map(function(n){var i=xe(n,2),a=i[0],o=i[1],s=a.split(Ql);return e({key:s.map(function(c){var u=c.match(/^([^:]*):(.*)$/),l=xe(u,3),x=l[1],f=l[2];return x==="number"?Number(f):f}),value:o})})}},{key:"toJSON",value:function(){var e={};return this.map(function(n){var i=n.key,a=n.value;return e[i.join(".")]=a,null}),e}}]),t})(),Cx=["name"],bx=It(function t(r){var e=this;Pt(this,t),H(this,"formHooked",!1),H(this,"forceRootUpdate",void 0),H(this,"subscribable",!0),H(this,"store",{}),H(this,"fieldEntities",[]),H(this,"initialValues",{}),H(this,"callbacks",{}),H(this,"validateMessages",null),H(this,"preserve",null),H(this,"lastValidatePromise",null),H(this,"getForm",function(){return{getFieldValue:e.getFieldValue,getFieldsValue:e.getFieldsValue,getFieldError:e.getFieldError,getFieldWarning:e.getFieldWarning,getFieldsError:e.getFieldsError,isFieldsTouched:e.isFieldsTouched,isFieldTouched:e.isFieldTouched,isFieldValidating:e.isFieldValidating,isFieldsValidating:e.isFieldsValidating,resetFields:e.resetFields,setFields:e.setFields,setFieldValue:e.setFieldValue,setFieldsValue:e.setFieldsValue,validateFields:e.validateFields,submit:e.submit,_init:!0,getInternalHooks:e.getInternalHooks}}),H(this,"getInternalHooks",function(n){return n===Kr?(e.formHooked=!0,{dispatch:e.dispatch,initEntityValue:e.initEntityValue,registerField:e.registerField,useSubscribe:e.useSubscribe,setInitialValues:e.setInitialValues,destroyForm:e.destroyForm,setCallbacks:e.setCallbacks,setValidateMessages:e.setValidateMessages,getFields:e.getFields,setPreserve:e.setPreserve,getInitialValue:e.getInitialValue,registerWatch:e.registerWatch}):(Br(!1,"`getInternalHooks` is internal usage. Should not call directly."),null)}),H(this,"useSubscribe",function(n){e.subscribable=n}),H(this,"prevWithoutPreserves",null),H(this,"setInitialValues",function(n,i){if(e.initialValues=n||{},i){var a,o=fn(n,e.store);(a=e.prevWithoutPreserves)===null||a===void 0||a.map(function(s){var c=s.key;o=or(o,c,Cr(n,c))}),e.prevWithoutPreserves=null,e.updateStore(o)}}),H(this,"destroyForm",function(n){if(n)e.updateStore({});else{var i=new cn;e.getFieldEntities(!0).forEach(function(a){e.isMergedPreserve(a.isPreserve())||i.set(a.getNamePath(),!0)}),e.prevWithoutPreserves=i}}),H(this,"getInitialValue",function(n){var i=Cr(e.initialValues,n);return n.length?fn(i):i}),H(this,"setCallbacks",function(n){e.callbacks=n}),H(this,"setValidateMessages",function(n){e.validateMessages=n}),H(this,"setPreserve",function(n){e.preserve=n}),H(this,"watchList",[]),H(this,"registerWatch",function(n){return e.watchList.push(n),function(){e.watchList=e.watchList.filter(function(i){return i!==n})}}),H(this,"notifyWatch",function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];if(e.watchList.length){var i=e.getFieldsValue(),a=e.getFieldsValue(!0);e.watchList.forEach(function(o){o(i,a,n)})}}),H(this,"timeoutId",null),H(this,"warningUnhooked",function(){}),H(this,"updateStore",function(n){e.store=n}),H(this,"getFieldEntities",function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return n?e.fieldEntities.filter(function(i){return i.getNamePath().length}):e.fieldEntities}),H(this,"getFieldsMap",function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,i=new cn;return e.getFieldEntities(n).forEach(function(a){var o=a.getNamePath();i.set(o,a)}),i}),H(this,"getFieldEntitiesForNamePathList",function(n){if(!n)return e.getFieldEntities(!0);var i=e.getFieldsMap(!0);return n.map(function(a){var o=ct(a);return i.get(o)||{INVALIDATE_NAME_PATH:ct(a)}})}),H(this,"getFieldsValue",function(n,i){e.warningUnhooked();var a,o,s;if(n===!0||Array.isArray(n)?(a=n,o=i):n&&Pe(n)==="object"&&(s=n.strict,o=n.filter),a===!0&&!o)return e.store;var c=e.getFieldEntitiesForNamePathList(Array.isArray(a)?a:null),u=[];return c.forEach(function(l){var x,f,m="INVALIDATE_NAME_PATH"in l?l.INVALIDATE_NAME_PATH:l.getNamePath();if(s){var v,p;if((v=(p=l).isList)!==null&&v!==void 0&&v.call(p))return}else if(!a&&(x=(f=l).isListField)!==null&&x!==void 0&&x.call(f))return;if(!o)u.push(m);else{var d="getMeta"in l?l.getMeta():null;o(d)&&u.push(m)}}),m0(e.store,u.map(ct))}),H(this,"getFieldValue",function(n){e.warningUnhooked();var i=ct(n);return Cr(e.store,i)}),H(this,"getFieldsError",function(n){e.warningUnhooked();var i=e.getFieldEntitiesForNamePathList(n);return i.map(function(a,o){return a&&!("INVALIDATE_NAME_PATH"in a)?{name:a.getNamePath(),errors:a.getErrors(),warnings:a.getWarnings()}:{name:ct(n[o]),errors:[],warnings:[]}})}),H(this,"getFieldError",function(n){e.warningUnhooked();var i=ct(n),a=e.getFieldsError([i])[0];return a.errors}),H(this,"getFieldWarning",function(n){e.warningUnhooked();var i=ct(n),a=e.getFieldsError([i])[0];return a.warnings}),H(this,"isFieldsTouched",function(){e.warningUnhooked();for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];var o=i[0],s=i[1],c,u=!1;i.length===0?c=null:i.length===1?Array.isArray(o)?(c=o.map(ct),u=!1):(c=null,u=o):(c=o.map(ct),u=s);var l=e.getFieldEntities(!0),x=function(d){return d.isFieldTouched()};if(!c)return u?l.every(function(p){return x(p)||p.isList()}):l.some(x);var f=new cn;c.forEach(function(p){f.set(p,[])}),l.forEach(function(p){var d=p.getNamePath();c.forEach(function(y){y.every(function(h,C){return d[C]===h})&&f.update(y,function(h){return[].concat(me(h),[p])})})});var m=function(d){return d.some(x)},v=f.map(function(p){var d=p.value;return d});return u?v.every(m):v.some(m)}),H(this,"isFieldTouched",function(n){return e.warningUnhooked(),e.isFieldsTouched([n])}),H(this,"isFieldsValidating",function(n){e.warningUnhooked();var i=e.getFieldEntities();if(!n)return i.some(function(o){return o.isFieldValidating()});var a=n.map(ct);return i.some(function(o){var s=o.getNamePath();return mn(a,s)&&o.isFieldValidating()})}),H(this,"isFieldValidating",function(n){return e.warningUnhooked(),e.isFieldsValidating([n])}),H(this,"resetWithFieldInitialValue",function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=new cn,a=e.getFieldEntities(!0);a.forEach(function(c){var u=c.props.initialValue,l=c.getNamePath();if(u!==void 0){var x=i.get(l)||new Set;x.add({entity:c,value:u}),i.set(l,x)}});var o=function(u){u.forEach(function(l){var x=l.props.initialValue;if(x!==void 0){var f=l.getNamePath(),m=e.getInitialValue(f);if(m!==void 0)Br(!1,"Form already set 'initialValues' with path '".concat(f.join("."),"'. Field can not overwrite it."));else{var v=i.get(f);if(v&&v.size>1)Br(!1,"Multiple Field with path '".concat(f.join("."),"' set 'initialValue'. Can not decide which one to pick."));else if(v){var p=e.getFieldValue(f),d=l.isListField();!d&&(!n.skipExist||p===void 0)&&e.updateStore(or(e.store,f,me(v)[0].value))}}}})},s;n.entities?s=n.entities:n.namePathList?(s=[],n.namePathList.forEach(function(c){var u=i.get(c);if(u){var l;(l=s).push.apply(l,me(me(u).map(function(x){return x.entity})))}})):s=a,o(s)}),H(this,"resetFields",function(n){e.warningUnhooked();var i=e.store;if(!n){e.updateStore(fn(e.initialValues)),e.resetWithFieldInitialValue(),e.notifyObservers(i,null,{type:"reset"}),e.notifyWatch();return}var a=n.map(ct);a.forEach(function(o){var s=e.getInitialValue(o);e.updateStore(or(e.store,o,s))}),e.resetWithFieldInitialValue({namePathList:a}),e.notifyObservers(i,a,{type:"reset"}),e.notifyWatch(a)}),H(this,"setFields",function(n){e.warningUnhooked();var i=e.store,a=[];n.forEach(function(o){var s=o.name,c=Mr(o,Cx),u=ct(s);a.push(u),"value"in c&&e.updateStore(or(e.store,u,c.value)),e.notifyObservers(i,[u],{type:"setField",data:o})}),e.notifyWatch(a)}),H(this,"getFields",function(){var n=e.getFieldEntities(!0),i=n.map(function(a){var o=a.getNamePath(),s=a.getMeta(),c=J(J({},s),{},{name:o,value:e.getFieldValue(o)});return Object.defineProperty(c,"originRCField",{value:!0}),c});return i}),H(this,"initEntityValue",function(n){var i=n.props.initialValue;if(i!==void 0){var a=n.getNamePath(),o=Cr(e.store,a);o===void 0&&e.updateStore(or(e.store,a,i))}}),H(this,"isMergedPreserve",function(n){var i=n!==void 0?n:e.preserve;return i??!0}),H(this,"registerField",function(n){e.fieldEntities.push(n);var i=n.getNamePath();if(e.notifyWatch([i]),n.props.initialValue!==void 0){var a=e.store;e.resetWithFieldInitialValue({entities:[n],skipExist:!0}),e.notifyObservers(a,[n.getNamePath()],{type:"valueUpdate",source:"internal"})}return function(o,s){var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(e.fieldEntities=e.fieldEntities.filter(function(x){return x!==n}),!e.isMergedPreserve(s)&&(!o||c.length>1)){var u=o?void 0:e.getInitialValue(i);if(i.length&&e.getFieldValue(i)!==u&&e.fieldEntities.every(function(x){return!Xl(x.getNamePath(),i)})){var l=e.store;e.updateStore(or(l,i,u,!0)),e.notifyObservers(l,[i],{type:"remove"}),e.triggerDependenciesUpdate(l,i)}}e.notifyWatch([i])}}),H(this,"dispatch",function(n){switch(n.type){case"updateValue":{var i=n.namePath,a=n.value;e.updateValue(i,a);break}case"validateField":{var o=n.namePath,s=n.triggerName;e.validateFields([o],{triggerName:s});break}}}),H(this,"notifyObservers",function(n,i,a){if(e.subscribable){var o=J(J({},a),{},{store:e.getFieldsValue(!0)});e.getFieldEntities().forEach(function(s){var c=s.onStoreChange;c(n,i,o)})}else e.forceRootUpdate()}),H(this,"triggerDependenciesUpdate",function(n,i){var a=e.getDependencyChildrenFields(i);return a.length&&e.validateFields(a),e.notifyObservers(n,a,{type:"dependenciesUpdate",relatedFields:[i].concat(me(a))}),a}),H(this,"updateValue",function(n,i){var a=ct(n),o=e.store;e.updateStore(or(e.store,a,i)),e.notifyObservers(o,[a],{type:"valueUpdate",source:"internal"}),e.notifyWatch([a]);var s=e.triggerDependenciesUpdate(o,a),c=e.callbacks.onValuesChange;if(c){var u=m0(e.store,[a]);c(u,e.getFieldsValue())}e.triggerOnFieldsChange([a].concat(me(s)))}),H(this,"setFieldsValue",function(n){e.warningUnhooked();var i=e.store;if(n){var a=fn(e.store,n);e.updateStore(a)}e.notifyObservers(i,null,{type:"valueUpdate",source:"external"}),e.notifyWatch()}),H(this,"setFieldValue",function(n,i){e.setFields([{name:n,value:i,errors:[],warnings:[]}])}),H(this,"getDependencyChildrenFields",function(n){var i=new Set,a=[],o=new cn;e.getFieldEntities().forEach(function(c){var u=c.props.dependencies;(u||[]).forEach(function(l){var x=ct(l);o.update(x,function(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:new Set;return f.add(c),f})})});var s=function c(u){var l=o.get(u)||new Set;l.forEach(function(x){if(!i.has(x)){i.add(x);var f=x.getNamePath();x.isFieldDirty()&&f.length&&(a.push(f),c(f))}})};return s(n),a}),H(this,"triggerOnFieldsChange",function(n,i){var a=e.callbacks.onFieldsChange;if(a){var o=e.getFields();if(i){var s=new cn;i.forEach(function(u){var l=u.name,x=u.errors;s.set(l,x)}),o.forEach(function(u){u.errors=s.get(u.name)||u.errors})}var c=o.filter(function(u){var l=u.name;return mn(n,l)});c.length&&a(c,o)}}),H(this,"validateFields",function(n,i){e.warningUnhooked();var a,o;Array.isArray(n)||typeof n=="string"||typeof i=="string"?(a=n,o=i):o=n;var s=!!a,c=s?a.map(ct):[],u=[],l=String(Date.now()),x=new Set,f=o||{},m=f.recursive,v=f.dirty;e.getFieldEntities(!0).forEach(function(h){if(s||c.push(h.getNamePath()),!(!h.props.rules||!h.props.rules.length)&&!(v&&!h.isFieldDirty())){var C=h.getNamePath();if(x.add(C.join(l)),!s||mn(c,C,m)){var b=h.validateRules(J({validateMessages:J(J({},Gl),e.validateMessages)},o));u.push(b.then(function(){return{name:C,errors:[],warnings:[]}}).catch(function(E){var F,A=[],w=[];return(F=E.forEach)===null||F===void 0||F.call(E,function(B){var g=B.rule.warningOnly,S=B.errors;g?w.push.apply(w,me(S)):A.push.apply(A,me(S))}),A.length?Promise.reject({name:C,errors:A,warnings:w}):{name:C,errors:A,warnings:w}}))}}});var p=yx(u);e.lastValidatePromise=p,p.catch(function(h){return h}).then(function(h){var C=h.map(function(b){var E=b.name;return E});e.notifyObservers(e.store,C,{type:"validateFinish"}),e.triggerOnFieldsChange(C,h)});var d=p.then(function(){return e.lastValidatePromise===p?Promise.resolve(e.getFieldsValue(c)):Promise.reject([])}).catch(function(h){var C=h.filter(function(b){return b&&b.errors.length});return Promise.reject({values:e.getFieldsValue(c),errorFields:C,outOfDate:e.lastValidatePromise!==p})});d.catch(function(h){return h});var y=c.filter(function(h){return x.has(h.join(l))});return e.triggerOnFieldsChange(y),d}),H(this,"submit",function(){e.warningUnhooked(),e.validateFields().then(function(n){var i=e.callbacks.onFinish;if(i)try{i(n)}catch(a){console.error(a)}}).catch(function(n){var i=e.callbacks.onFinishFailed;i&&i(n)})}),this.forceRootUpdate=r});function ts(t){var r=L.useRef(),e=L.useState({}),n=xe(e,2),i=n[1];if(!r.current)if(t)r.current=t;else{var a=function(){i({})},o=new bx(a);r.current=o.getForm()}return[r.current]}var Mo=L.createContext({triggerFormChange:function(){},triggerFormFinish:function(){},registerForm:function(){},unregisterForm:function(){}}),Ex=function(r){var e=r.validateMessages,n=r.onFormChange,i=r.onFormFinish,a=r.children,o=L.useContext(Mo),s=L.useRef({});return L.createElement(Mo.Provider,{value:J(J({},o),{},{validateMessages:J(J({},o.validateMessages),e),triggerFormChange:function(u,l){n&&n(u,{changedFields:l,forms:s.current}),o.triggerFormChange(u,l)},triggerFormFinish:function(u,l){i&&i(u,{values:l,forms:s.current}),o.triggerFormFinish(u,l)},registerForm:function(u,l){u&&(s.current=J(J({},s.current),{},H({},u,l))),o.registerForm(u,l)},unregisterForm:function(u){var l=J({},s.current);delete l[u],s.current=l,o.unregisterForm(u)}})},a)},Fx=["name","initialValues","fields","form","preserve","children","component","validateMessages","validateTrigger","onValuesChange","onFieldsChange","onFinish","onFinishFailed","clearOnDestroy"],wx=function(r,e){var n=r.name,i=r.initialValues,a=r.fields,o=r.form,s=r.preserve,c=r.children,u=r.component,l=u===void 0?"form":u,x=r.validateMessages,f=r.validateTrigger,m=f===void 0?"onChange":f,v=r.onValuesChange,p=r.onFieldsChange,d=r.onFinish,y=r.onFinishFailed,h=r.clearOnDestroy,C=Mr(r,Fx),b=L.useRef(null),E=L.useContext(Mo),F=ts(o),A=xe(F,1),w=A[0],B=w.getInternalHooks(Kr),g=B.useSubscribe,S=B.setInitialValues,_=B.setCallbacks,R=B.setValidateMessages,P=B.setPreserve,z=B.destroyForm;L.useImperativeHandle(e,function(){return J(J({},w),{},{nativeElement:b.current})}),L.useEffect(function(){return E.registerForm(n,w),function(){E.unregisterForm(n)}},[E,w,n]),R(J(J({},E.validateMessages),x)),_({onValuesChange:v,onFieldsChange:function(I){if(E.triggerFormChange(n,I),p){for(var V=arguments.length,X=new Array(V>1?V-1:0),ee=1;ee<V;ee++)X[ee-1]=arguments[ee];p.apply(void 0,[I].concat(X))}},onFinish:function(I){E.triggerFormFinish(n,I),d&&d(I)},onFinishFailed:y}),P(s);var $=L.useRef(null);S(i,!$.current),$.current||($.current=!0),L.useEffect(function(){return function(){return z(h)}},[]);var j,q=typeof c=="function";if(q){var Y=w.getFieldsValue(!0);j=c(Y,w)}else j=c;g(!q);var U=L.useRef();L.useEffect(function(){vx(U.current||[],a||[])||w.setFields(a||[]),U.current=a},[a,w]);var M=L.useMemo(function(){return J(J({},w),{},{validateTrigger:m})},[w,m]),N=L.createElement(la.Provider,{value:null},L.createElement(Fn.Provider,{value:M},j));return l===!1?N:L.createElement(l,Tt({},C,{ref:b,onSubmit:function(I){I.preventDefault(),I.stopPropagation(),w.submit()},onReset:function(I){var V;I.preventDefault(),w.resetFields(),(V=C.onReset)===null||V===void 0||V.call(C,I)}}),N)};function C0(t){try{return JSON.stringify(t)}catch{return Math.random()}}function Ax(){for(var t=arguments.length,r=new Array(t),e=0;e<t;e++)r[e]=arguments[e];var n=r[0],i=r[1],a=i===void 0?{}:i,o=I1(a)?{form:a}:a,s=o.form,c=ue(),u=xe(c,2),l=u[0],x=u[1],f=Te(function(){return C0(l)},[l]),m=We(f);m.current=f;var v=Fr(Fn),p=s||v,d=p&&p._init,y=ct(n),h=We(y);return h.current=y,$e(function(){if(d){var C=p.getFieldsValue,b=p.getInternalHooks,E=b(Kr),F=E.registerWatch,A=function(S,_){var R=o.preserve?_:S;return typeof n=="function"?n(R):Cr(R,h.current)},w=F(function(g,S){var _=A(g,S),R=C0(_);m.current!==R&&(m.current=R,x(_))}),B=A(C(),C(!0));return l!==B&&x(B),w}},[d]),l}var Bx=L.forwardRef(wx),Wn=Bx;Wn.FormProvider=Ex;Wn.Field=Yl;Wn.List=mx;Wn.useForm=ts;Wn.useWatch=Ax;const b0=t=>typeof t=="object"&&t!=null&&t.nodeType===1,E0=(t,r)=>(!r||t!=="hidden")&&t!=="visible"&&t!=="clip",oi=(t,r)=>{if(t.clientHeight<t.scrollHeight||t.clientWidth<t.scrollWidth){const e=getComputedStyle(t,null);return E0(e.overflowY,r)||E0(e.overflowX,r)||(n=>{const i=(a=>{if(!a.ownerDocument||!a.ownerDocument.defaultView)return null;try{return a.ownerDocument.defaultView.frameElement}catch{return null}})(n);return!!i&&(i.clientHeight<n.scrollHeight||i.clientWidth<n.scrollWidth)})(t)}return!1},si=(t,r,e,n,i,a,o,s)=>a<t&&o>r||a>t&&o<r?0:a<=t&&s<=e||o>=r&&s>=e?a-t-n:o>r&&s<e||a<t&&s>e?o-r+i:0,Sx=t=>{const r=t.parentElement;return r??(t.getRootNode().host||null)},F0=(t,r)=>{var e,n,i,a;if(typeof document>"u")return[];const{scrollMode:o,block:s,inline:c,boundary:u,skipOverflowHiddenElements:l}=r,x=typeof u=="function"?u:$=>$!==u;if(!b0(t))throw new TypeError("Invalid target");const f=document.scrollingElement||document.documentElement,m=[];let v=t;for(;b0(v)&&x(v);){if(v=Sx(v),v===f){m.push(v);break}v!=null&&v===document.body&&oi(v)&&!oi(document.documentElement)||v!=null&&oi(v,l)&&m.push(v)}const p=(n=(e=window.visualViewport)==null?void 0:e.width)!=null?n:innerWidth,d=(a=(i=window.visualViewport)==null?void 0:i.height)!=null?a:innerHeight,{scrollX:y,scrollY:h}=window,{height:C,width:b,top:E,right:F,bottom:A,left:w}=t.getBoundingClientRect(),{top:B,right:g,bottom:S,left:_}=($=>{const j=window.getComputedStyle($);return{top:parseFloat(j.scrollMarginTop)||0,right:parseFloat(j.scrollMarginRight)||0,bottom:parseFloat(j.scrollMarginBottom)||0,left:parseFloat(j.scrollMarginLeft)||0}})(t);let R=s==="start"||s==="nearest"?E-B:s==="end"?A+S:E+C/2-B+S,P=c==="center"?w+b/2-_+g:c==="end"?F+g:w-_;const z=[];for(let $=0;$<m.length;$++){const j=m[$],{height:q,width:Y,top:U,right:M,bottom:N,left:O}=j.getBoundingClientRect();if(o==="if-needed"&&E>=0&&w>=0&&A<=d&&F<=p&&(j===f&&!oi(j)||E>=U&&A<=N&&w>=O&&F<=M))return z;const I=getComputedStyle(j),V=parseInt(I.borderLeftWidth,10),X=parseInt(I.borderTopWidth,10),ee=parseInt(I.borderRightWidth,10),re=parseInt(I.borderBottomWidth,10);let ie=0,se=0;const De="offsetWidth"in j?j.offsetWidth-j.clientWidth-V-ee:0,Q="offsetHeight"in j?j.offsetHeight-j.clientHeight-X-re:0,G="offsetWidth"in j?j.offsetWidth===0?0:Y/j.offsetWidth:0,ae="offsetHeight"in j?j.offsetHeight===0?0:q/j.offsetHeight:0;if(f===j)ie=s==="start"?R:s==="end"?R-d:s==="nearest"?si(h,h+d,d,X,re,h+R,h+R+C,C):R-d/2,se=c==="start"?P:c==="center"?P-p/2:c==="end"?P-p:si(y,y+p,p,V,ee,y+P,y+P+b,b),ie=Math.max(0,ie+h),se=Math.max(0,se+y);else{ie=s==="start"?R-U-X:s==="end"?R-N+re+Q:s==="nearest"?si(U,N,q,X,re+Q,R,R+C,C):R-(U+q/2)+Q/2,se=c==="start"?P-O-V:c==="center"?P-(O+Y/2)+De/2:c==="end"?P-M+ee+De:si(O,M,Y,V,ee+De,P,P+b,b);const{scrollLeft:le,scrollTop:Z}=j;ie=ae===0?0:Math.max(0,Math.min(Z+ie/ae,j.scrollHeight-q/ae+Q)),se=G===0?0:Math.max(0,Math.min(le+se/G,j.scrollWidth-Y/G+De)),R+=Z-ie,P+=le-se}z.push({el:j,top:ie,left:se})}return z},Dx=t=>t===!1?{block:"end",inline:"nearest"}:(r=>r===Object(r)&&Object.keys(r).length!==0)(t)?t:{block:"start",inline:"nearest"};function _x(t,r){if(!t.isConnected||!(i=>{let a=i;for(;a&&a.parentNode;){if(a.parentNode===document)return!0;a=a.parentNode instanceof ShadowRoot?a.parentNode.host:a.parentNode}return!1})(t))return;const e=(i=>{const a=window.getComputedStyle(i);return{top:parseFloat(a.scrollMarginTop)||0,right:parseFloat(a.scrollMarginRight)||0,bottom:parseFloat(a.scrollMarginBottom)||0,left:parseFloat(a.scrollMarginLeft)||0}})(t);if((i=>typeof i=="object"&&typeof i.behavior=="function")(r))return r.behavior(F0(t,r));const n=typeof r=="boolean"||r==null?void 0:r.behavior;for(const{el:i,top:a,left:o}of F0(t,Dx(r))){const s=a-e.top+e.bottom,c=o-e.left+e.right;i.scroll({top:s,left:c,behavior:n})}}const kx=["parentNode"],Rx="form_item";function Zl(t){return t===void 0||t===!1?[]:Array.isArray(t)?t:[t]}function Tx(t,r){if(!t.length)return;const e=t.join("_");return r?`${r}_${e}`:kx.includes(e)?`${Rx}_${e}`:e}var Ix=function(t,r){var e={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&r.indexOf(n)<0&&(e[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)r.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(e[n[i]]=t[n[i]]);return e};function w0(t){return Zl(t).join("_")}function A0(t,r){const e=r.getFieldInstance(t),n=Fl(e);if(n)return n;const i=Tx(Zl(t),r.__INTERNAL__.name);if(i)return document.getElementById(i)}function Jl(t){const[r]=ts(),e=L.useRef({}),n=L.useMemo(()=>Object.assign(Object.assign({},r),{__INTERNAL__:{itemRef:i=>a=>{const o=w0(i);a?e.current[o]=a:delete e.current[o]}},scrollToField:(i,a={})=>{const{focus:o}=a,s=Ix(a,["focus"]),c=A0(i,n);c&&(_x(c,Object.assign({scrollMode:"if-needed",block:"nearest"},s)),o&&n.focusField(i))},focusField:i=>{var a,o;const s=n.getFieldInstance(i);typeof(s==null?void 0:s.focus)=="function"?s.focus():(o=(a=A0(i,n))===null||a===void 0?void 0:a.focus)===null||o===void 0||o.call(a)},getFieldInstance:i=>{const a=w0(i);return e.current[a]}}),[t,r]);return[n]}const Px=({isModalOpen:t,handleOk:r,handleCancel:e,data:n})=>{const i={header:{height:"60px",borderBottom:"1px solid #F0F0F0",display:"flex",paddingLeft:"24px",alignItems:"center",marginBottom:"16px"},title:{fontSize:"16px"},body:{padding:"0 24px"},mask:{},footer:{marginTop:"0px",padding:"0 24px 16px 24px"},content:{padding:0}},[a]=Jl();return $e(()=>{if(!t){a.resetFields();return}a.setFieldValue("new_name",n==null?void 0:n.label)},[n,t]),k(fa,{modal:{styles:i},children:k(ea,{title:k("div",{className:"text-[16px]",children:"\u7F16\u8F91\u4F1A\u8BDD\u540D\u79F0"}),closeIcon:null,open:t,width:520,centered:!0,className:"[&:[.ant-modal-content]]:bg-red",footer:te("div",{className:"mt-[16px] flex justify-end",children:[k(yr,{children:"\u53D6\u6D88",onClick:e,className:"mr-[8px]"}),k(yr,{children:"\u786E\u8BA4",onClick:async()=>{try{const o=await a.validateFields();r("ok_rename",o)}catch(o){console.log(o);return}},type:"primary",className:"border-none"})]}),children:k(cs,{form:a,children:k(cs.Item,{name:"new_name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165"},{max:100,message:"\u6700\u5927\u5B57\u6570\u9650\u5236100"}],children:k(vu,{})})})})})},Nx=({isModalOpen:t,handleOk:r,handleCancel:e,data:n})=>{const i={header:{height:"60px",borderBottom:"1px solid #F0F0F0",display:"flex",paddingLeft:"24px",alignItems:"center",marginBottom:"16px"},title:{fontSize:"16px"},body:{padding:"0 24px"},mask:{},footer:{marginTop:"0px",padding:"0 24px 16px 24px"},content:{padding:0}},[a]=Jl();return $e(()=>{if(!t){a.resetFields();return}a.setFieldValue("new_name",n==null?void 0:n.label)},[n,t]),k(fa,{modal:{styles:i},children:k(ea,{title:k("div",{className:"text-[16px]",children:"\u5220\u9664\u4F1A\u8BDD"}),closeIcon:null,open:t,width:520,centered:!0,className:"[&:[.ant-modal-content]]:bg-red",footer:te("div",{className:"mt-[16px] flex justify-end",children:[k(yr,{children:"\u53D6\u6D88",onClick:e,className:"mr-[8px]"}),k(yr,{children:"\u786E\u8BA4",onClick:async()=>{try{const o=await a.validateFields();r("ok_remove",o)}catch(o){console.log(o);return}},type:"primary",className:"border-none"})]}),children:k("div",{children:`\u786E\u5B9A\u8981\u5220\u9664\u4F1A\u8BDD\u300C${n.label}\u300D\u5417\uFF1F\u5220\u9664\u540E\u65E0\u6CD5\u6062\u590D\u3002`})})})},Ox="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAFQSURBVHgBpVMxTsNQDLWTiIYBFG7Q3iCcgLIxQJWxZSpbOxFO0HICOhE2shGxEFCGbvQGcAPCCahgIJHoN/5RaEOUBAJPsmTZ3/aT/T4Co23ZxoYeWVACEjj/UOhx6l2E+RzudQfNNcR79ptQjfD1vbE98yfzbFDTEE1ZrBC1/IIJEhYPEYhPKUs3m1OQyJBOWfFPOQX+CQ1qQu6sATBaCLwNrh2/NgOdjQC2FBVu5PW+MTjoDvrccSdfJNILqQCzdB9WpzckudQlg87hYISIl7I7G2YNAZ75SrtFy1wxIBwLwtPAc8ZQA5qq676II5MAw8A7n+z3hpLW2d2V0/pVA99NlGV/BRJdIDbltqcV91++zwesvm2IOH6AEmkTkfsW6Seb6/EL+0dY9EhKl1mYi1Slq3HCQFCP2WHWZJY2qEL6L5LPJ/gy8BfIJmxt6X8C+32HILvaN+0AAAAASUVORK5CYII=",ba=({title:t,setOpen:r})=>te("div",{style:{width:"100%",height:"60px",borderBottom:"1px solid #EBEBEB",padding:"20px",display:"flex",justifyContent:"space-between",alignItems:"center",fontSize:"16px",fontWeight:600},children:[k("div",{children:t}),k("img",{src:Kc,style:{width:"16px",height:"16px",cursor:"pointer"},onClick:()=>r(!1)})]});Gc();const Mx=({curFileInfo:t,onClose:r,token:e})=>{var s;const n={title:"",subtitle:"",backgroundColor:"#f8f9fa",showGrid:!1,showLegend:!1,showTooltip:!1,showFullscreen:!1,showMinimap:!1},[i,a]=ue({nodeList:[],edgeList:[]});$e(()=>{console.log("curFileInfo",t)},[t]);const o=async c=>{if(!(!(c!=null&&c.id)||!(c!=null&&c.cyphers)||!(c!=null&&c.fetchUrl)))try{const{cyphers:u,fetchUrl:l,id:x}=c||{};console.log("getGraphData params",u,l,x);const f=await Mt.post(l,{cyphers:u,ontologyId:x},{headers:{Authorization:e}});console.log("getGraphData res",f),a((f==null?void 0:f.data)||{})}catch(u){console.log("error",u)}};return $e(()=>{o(t)},[t]),te("div",{children:[k(ba,{title:t==null?void 0:t.graphName,setOpen:r}),k("div",{style:{width:"100%",height:"calc(100vh - 60px)"},children:k(Xc,{centerNode:{vid:(s=t==null?void 0:t.traceNode)==null?void 0:s.vid},data:i,layout:{type:"force",linkDistance:190},title:n.title,subtitle:n.subtitle,backgroundColor:n.backgroundColor,showGrid:n.showGrid,showLegend:n.showLegend,showTooltip:n.showTooltip,showFullscreen:n.showFullscreen,showMinimap:n.showMinimap,customPlugins:{},onReady:c=>{console.log("KnowledgeGraphPreview ready:",c)}})})]})},Lx=({content:t,onClose:r,token:e})=>{const n=o=>{if(!(o!=null&&o.metadata))return;const s=Ja(o,""),{page_number:c,page_size:u,position:l,offset:x,chunk_type:f}=o.metadata;if(s==="markdown_table")return x!=null&&x.length?{annotations:[{id:br(),offsets:x}],initialPage:1}:{};{if(!u||!l)return console.log("%c\u7F3A\u5C11\u6587\u4EF6size\u6216\u8005\u6587\u4EF6\u5750\u6807","color: red"),{};const m=Array.isArray(u)?u:JSON.parse(u);if(!m.length)return console.log("%c\u7F3A\u5C11\u6587\u4EF6size","color: red"),{};const v=Array.isArray(l)?l:JSON.parse(l);return!v.length||!c?(console.log("%c\u7F3A\u5C11\u6587\u4EF6\u5750\u6807\u6216\u8005\u6587\u4EF6\u9875\u6570","color: red"),{}):{annotations:v.map((d,y)=>({id:br(),pageNumber:c[y],x:+(d[0][0]/m[0][0]).toFixed(4),y:+(d[0][1]/m[0][1]).toFixed(4),width:+((d[1][0]-d[0][0])/m[0][0]).toFixed(4),height:+((d[2][1]-d[0][1])/m[0][1]).toFixed(4),content:"",color:f==="image"?"#60f74f":"#4FC3F7"})),initialPage:c[0]}}},i=Te(()=>{var o,s;if(console.log("content88888888888",t),t&&e){console.log("content999",t);const{annotations:c,initialPage:u}=n(t),l={...t,metadata:{source:((o=t==null?void 0:t.metadata)==null?void 0:o.source)||t.parse_url||t.url,page_size:(s=t==null?void 0:t.metadata)==null?void 0:s.page_size}},x=Fu(wu(l));return{filePath:x,fileName:qo(l),fileType:Ja(l,x),totalPages:l.pdfPages||0,token:e,annotations:c,initialPage:u,initialZoom:Au(598,l)}}else return{}},[t]),a=Te(()=>i.filePath?(console.log("curData",i),k(Su,{initialZoom:i.initialZoom||100,convertedFilePath:i.filePath,fileName:i.fileName,fileType:i.fileType,initialPage:i.initialPage,totalPages:i.totalPages,authorization:i.token,annotations:i.annotations,streamApiUrl:"/proxy/index/knowledgeBase/file/stream",eventsEmit:o=>{switch(o){case"viewer:close":r();break}},tools:{close:!0}})):k(qn,{}),[i]);return k("div",{style:{fontFamily:"Source Han Sans CN",fontSize:"12px"},className:"h-full w-full",children:a})},ec=({curFileInfo:t,onClose:r,token:e})=>{const n=Te(()=>{var a,o,s;if(t&&e){console.log("content999",t);const c={file_source:t.parse_url||t.parsedFilePath||t.url,file_type:t.file_type,metadata:{source:t.filePath||t.url||((a=t==null?void 0:t.metadata)==null?void 0:a.source)||"",page_size:(o=t==null?void 0:t.metadata)==null?void 0:o.page_size},pdfPages:t.pdfPages},u=Fu(wu(c));return{filePath:u,fileName:qo(c),fileType:Ja(c,u),totalPages:c.pdfPages||0,token:e,initialZoom:Au(((s=document.getElementById("pdfBox"))==null?void 0:s.clientWidth)||0,c)}}else return{}},[t]),i=Te(()=>(console.log("curData",n),n.filePath?k(Su,{initialZoom:n.initialZoom||100,convertedFilePath:n.filePath,fileName:n.fileName,fileType:n.fileType,initialPage:1,totalPages:n.totalPages,authorization:n.token,streamApiUrl:"/proxy/index/knowledgeBase/file/stream",eventsEmit:a=>{switch(a){case"viewer:close":r();break}},tools:{close:!0}}):k(qn,{})),[n]);return k("div",{id:"pdfBox",className:"h-full overflow-y-auto",children:i})},$x=({curFileInfo:t,token:r,onClose:e})=>{const[n,i]=ue(1),[a,o]=ue(10),[s,c]=ue([]),[u,l]=ue([]),[x,f]=ue(0);$e(()=>{var y;const d=((y=t==null?void 0:t.metadata)==null?void 0:y.fetchUrl)||(t==null?void 0:t.fetchUrl);d&&v(d)},[t,n,a]);const m=async({url:d,params:y})=>{var h;try{const C=await Mt.get(`${eo()}${d}?${new URLSearchParams(y).toString()}`,{headers:{Authorization:r}}),b=(h=C==null?void 0:C.data)==null?void 0:h.data;if(b){const{columns:E,dataList:F,totalData:A}=b;c(((E==null?void 0:E.slice(1))||[]).map(w=>({title:w.businessName,dataIndex:w.physicalName,key:w.physicalName}))),l(F||[]),f(A||[])}}catch(C){console.log("error",C)}},v=async d=>{m({url:`${d}`,params:{pageNo:n,pageSize:a}})},p=Te(()=>{const{databaseName:d,businessTableName:y,tableName:h}=t;return`${d} - ${h||y}`},[t]);return te("div",{children:[k(ba,{title:p,setOpen:e}),(s==null?void 0:s.length)>0?te("div",{children:[k("div",{className:"p-4 overflow-auto h-[calc(100vh-120px)]",children:k(Dc,{columns:s,dataSource:u,pagination:!1,scroll:{x:"max-content"},rowKey:"id"})}),k("div",{className:"flex justify-end px-[18px]",children:k(_c,{current:n,pageSize:a,responsive:!0,simple:!0,total:x,showSizeChanger:!0,showQuickJumper:!0,onChange:(d,y)=>{i(d),o(y||10)},onShowSizeChange:(d,y)=>{i(1),o(y)}})})]}):k(kc,{})]})},Xa=({i:t,item:r,j:e,clickTag:n})=>{const i=(e==null?void 0:e.name)!=null&&e.name!==""?String(e.name):(e==null?void 0:e.label)!=null&&e.label!==""?String(e.label):(e==null?void 0:e.content)!=null&&e.content!==""?String(e.content):(e==null?void 0:e.index)!=null?String(e.index):"";return k("div",{style:{minWidth:"16px",maxWidth:"80px",height:"16px",padding:"0 4px",backgroundColor:qx[r.key],margin:"0 4px",color:Hx[r.key],display:"flex",justifyContent:"center",alignItems:"center",borderRadius:"2px",fontSize:"12px",cursor:n?"pointer":"default",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},onClick:()=>n&&n(t,e,r),title:i,children:i},e.id)};function zx(t){if(typeof t=="string"){const r=t.trim();if(!r)return"";const e=r.match(/\d{4}-\d{2}-\d{2}/);if(e!=null&&e[0])return e[0];const n=new Date(r);return Number.isNaN(n.getTime())?"":n.toISOString().slice(0,10)}if(t instanceof Date&&!Number.isNaN(t.getTime()))return t.toISOString().slice(0,10);if(typeof t=="number"&&Number.isFinite(t)){const r=new Date(t);if(!Number.isNaN(r.getTime()))return r.toISOString().slice(0,10)}return""}const qx={knowledgeList:"#EAF4FD",searchList:"#E8F7F0",databaseList:"#FFF4E5",graphList:"#E7F8FB"},Hx={knowledgeList:"#2072F0",searchList:"#39B83F",databaseList:"#F48C14",graphList:"#10BBD9"},B0=[{key:"knowledgeList",name:"\u77E5\u8BC6\u5E93\u6587\u6863"},{key:"searchList",name:"\u8054\u7F51\u641C\u7D22",hideBtns:!0},{key:"databaseList",name:"\u6570\u636E\u5E93",hideBtns:!0},{key:"graphList",name:"\u77E5\u8BC6\u56FE\u8C31",hideBtns:!0}],S0=({type:t,data:r,token:e,eventsEmit:n,is_download:i})=>{const[a,o]=ue(B0),[s,c]=ue("mark"),[u,l]=ue(!1),[x,f]=ue({}),[m,v]=ue("knowledgeList"),[p,d]=ue({knowledgeList:[],searchList:[],databaseList:[],graphList:[]}),y=Te(()=>{const w=4-a.length,B=Array(w).fill(null).map((S,_)=>({name:"",key:100+_})),g=[...a,...B];return console.log("rrrrrr",g),g},[a]),h=w=>isNaN(w)?"":(+w).toFixed(2),C=w=>{switch(w){case"searchList":return id;case"databaseList":return nd;case"graphList":return rd;default:return""}},b=w=>{const B=(w||"").toLowerCase();return["pdf"].includes(B)?"rag/pdf":["doc","docx"].includes(B)?"rag/word":["csv"].includes(B)?"rag/csv":["xls","xlsx"].includes(B)?"rag/excel":["ppt","pptx","pub"].includes(B)?"rag/ppt":["png","jpg","jpeg","jpge"].includes(B)?"rag/pic":["txt"].includes(B)?"rag/txt":["ofd"].includes(B)?"rag/ofd":"rag/txt"},E=(w,B)=>{if(w==="knowledgeList"){let S=((B==null?void 0:B.file_type)||"").toLowerCase();if(!S||S==="faq"){const _=(B==null?void 0:B.metadata)||{},R=_.folder_path||(B==null?void 0:B.folder_path)||_.file_path||_.source||(B==null?void 0:B.source)||(B==null?void 0:B.file_name)||"",P=String(R).match(/\.([a-z0-9]+)$/i);P&&(S=P[1].toLowerCase())}return k(ed,{type:b(S),size:22,style:{flexShrink:0}})}const g=C(w);return g?k("img",{src:g,style:{width:"22px",height:"22px",flexShrink:0}}):null},F=(w,B)=>w==="graphList"?B.map(g=>({...g,name:g.graphName})).sort((g,S)=>(S.score||0)-(g.score||0)):w==="knowledgeList"?B.map(g=>{const S=g.metadata||{},_=typeof g.score=="number"?g.score:typeof g.rrf_score=="number"?g.rrf_score:typeof S.score=="number"?S.score:0;if(g.type==="faq"){const P=S.folder_path||g.folder_path||S.knowledge_base_name||g.file_name||S.source||g.source||"",z=String(P).match(/\.([a-z0-9]+)$/i),$=z?z[1].toLowerCase():"faq";return{...g,file_type:$,name:P,score:_}}const R=g.sourceFileName||Zc(g.source)||g.file_name;return{...g,file_type:Jc(g.source)||g.file_type,name:R,score:_}}).sort((g,S)=>(S.score||0)-(g.score||0)):w==="searchList"?B.map(g=>({...g,name:g.sourceFileName||g.file_name})).sort((g,S)=>(S.score||0)-(g.score||0)):w==="databaseList"?B.map(g=>{const S=g.tableName?`${g.databaseName||"\u6570\u636E\u5E93"} - ${g.tableName}`:g.databaseName||g.name||"\u6570\u636E\u5E93";return{...g,name:S,file_name:S,file_type:"database"}}).sort((g,S)=>(S.score||0)-(g.score||0)):B,A=(w,B,g)=>{var S;switch(g.key){case"knowledgeList":const{pdfPages:_,parsedFilePath:R,order_num:P,tags:z}=w||{},$=B.id||P||"Unknown ID",j=(z||[]).find(I=>I.id===$);if(w.type==="faq"){f(w),c("faq"),l(!0),n==null||n("retrive_tag:click",{tagInfo:{id:B.id,index:B.index,image_urls:B.image_urls||[]},fromtype:"10",leaf:{id:B.id,fromtype:"10"},referenceDoc:w});return}if(w.type==="video")return console.log("sdgasdgag",{file:{...w,...j}}),n==null?void 0:n("retrive_tag:click",{file:{...w,...j}});if(console.log("click knowledge tag",w,B),!w||!j)return;const{metadata:q}=j,Y=q.source.split("/"),U=Y[Y.length-1]||"",M=U.split("."),N=M.slice(0,-1).join(".")||"Unknown Label",O=M[M.length-1]||"Unknown Type";f({id:$,title:N,file_name:U,file_type:O,file_source:td(O)?`${na}${q.source}`:R,metadata:q,pdfPages:_}),c("mark"),l(!0);break;case"searchList":console.log("click search tag",w,B);break;case"databaseList":console.log("click database tag",w,B),c("database"),f({...w,metadata:w.metadata||{},fetchUrl:w.fetchUrl||((S=w.metadata)==null?void 0:S.fetchUrl)||""}),l(!0);break;case"graphList":console.log("click graph tag",w,B),c("graphPreview"),f({...w,traceNode:((r==null?void 0:r.traceNode)||[]).find(I=>I.id===B.id)}),l(!0);break}};return $e(()=>{if(t!==tc.REFERENCELIST||(console.log("data in reference drawer",r),!r))return;const{graphRefs:w,knowledgeRefs:B,webRefs:g,databaseRefs:S}=r;w!=null&&w.length&&(p.graphList=F("graphList",w)),B!=null&&B.length&&(p.knowledgeList=F("knowledgeList",B)),g!=null&&g.length&&(p.searchList=F("searchList",g)),S!=null&&S.length&&(p.databaseList=F("databaseList",S));const _=B0.filter(R=>{var P;return(P=p[R.key])==null?void 0:P.length}).sort((R,P)=>{var z,$;return(((z=p[P.key])==null?void 0:z.length)||0)-((($=p[R.key])==null?void 0:$.length)||0)});o(_),_!=null&&_.length&&v(_[0].key),d({...p})},[r]),te(qn,{children:[te("div",{className:"listWrap w-full h-full",children:[k(ba,{title:"\u77E5\u8BC6\u6EAF\u6E90",setOpen:()=>{const w=new CustomEvent("aichat:right_set",{detail:{collapsed:!0}});window.dispatchEvent(w)}}),te("div",{style:{height:"calc(100% - 60px)"},children:[k("div",{className:"tabs",style:{display:"flex",justifyContent:"space-between",padding:"12px 20px"},children:y.map(w=>k("div",{className:"tab-item",style:{padding:"5.5px 12px",backgroundColor:w.name?m===w.key?"#4E6EF2":"#F5F6F9":"transparent",cursor:"pointer",borderRadius:"4px",color:m===w.key?"#FFFFFF":"#4E5969",fontSize:"14px",minWidth:"80px",display:"flex",justifyContent:"center"},onClick:()=>{w.name&&v(w.key)},children:w.name},w.key))}),k("div",{className:"listBox",style:{height:"calc(100% - 66px)",overflowY:"auto",display:"flex",flexDirection:"column",alignItems:"center",willChange:"scroll-position",transform:"translateZ(0)"},children:a.map(w=>{let B=p[w.key]||[];return m!==w.key?null:k("div",{children:B.map(g=>{var S,_,R,P,z,$,j,q,Y;return te("div",{style:{width:"360px",padding:"4px 8px",borderRadius:"4px",margin:"6px 0",cursor:w.key==="knowledgeList"&&g.type==="faq"?"default":"pointer"},className:"listItemBox",onClick:()=>{w.key==="searchList"&&window.open(g.link,"_blank")},children:[te("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:"8px"},children:[te("div",{style:{flex:1,minWidth:0,fontSize:"14px",color:"#1D2129",fontWeight:"700",display:"flex",alignItems:"center"},children:[k("div",{style:{width:22,height:22,marginRight:2,flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center"},children:E(w.key,g)}),k(Pn,{placement:"topLeft",title:((S=g==null?void 0:g.name)==null?void 0:S.length)>17?g.name:"",children:k("div",{style:{minWidth:0,overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",lineHeight:1.4,wordBreak:"break-all"},onClick:()=>{var U;w.key==="knowledgeList"&&g.type==="faq"||(w.key==="knowledgeList"?n==null||n("knowledge_referenceFile_title:click",{data:{...g,file_type:g.file_type,file_name:g.file_name,metadata:g.metadata,parsedFilePath:g.parsedFilePath}}):w.key==="databaseList"&&(c("database"),f({...g,metadata:g.metadata||{},fetchUrl:g.fetchUrl||((U=g.metadata)==null?void 0:U.fetchUrl)||""}),l(!0)))},children:g.name})})]}),((_=g==null?void 0:g.tags)==null?void 0:_.length)&&g.tags.length>0&&g.tags.length<=10&&g.type!=="faq"&&k("div",{style:{display:"flex",alignItems:"center",flexShrink:0,gap:"2px"},children:(g.tags||[]).map(U=>k(Xa,{i:g,item:w,j:U,clickTag:A},U.id))}),te("div",{style:{width:"52px",justifyContent:"space-between",alignItems:"center",marginRight:"8px",display:w.hideBtns||g.type==="video"||g.type==="faq"||g.faq_question||g.faq_answer?"none":"flex"},children:[k("img",{src:Ox,style:{width:"16px",height:"16px",cursor:"pointer"},onClick:()=>{n==null||n("referenceFile_filechat",{data:{...g,file_type:g.file_type,file_name:g.file_name,metadata:g.metadata,parsedFilePath:g.parsedFilePath}})}}),k("div",{style:{borderRight:"1px solid #E5E6EB",height:"14px"}}),k("img",{src:Yc,style:{width:"16px",height:"16px",cursor:i?"pointer":"not-allowed"},onClick:()=>{var M,N,O;if(!((M=g==null?void 0:g.tags)!=null&&M.length)&&!((N=g==null?void 0:g.metadata)!=null&&N.source)||!i)return;const U=((O=((g==null?void 0:g.tags)||[])[0])==null?void 0:O.metadata)||(g==null?void 0:g.metadata);Qc({filePath:`${na}${U.source}`,fileName:qo({metadata:U}),token:e})}})]})]}),w.key==="knowledgeList"&&g.type==="faq"&&(((R=g.metadata)==null?void 0:R.update_time)||typeof g.score=="number"||typeof g.score=="string"||((P=g==null?void 0:g.tags)==null?void 0:P.length)&&g.tags.length>0)&&te("div",{style:{marginTop:"4px",display:"flex",alignItems:"center",justifyContent:"space-between",gap:"8px",fontSize:"12px",color:"#4E5969"},children:[te("span",{style:{flexShrink:0,display:"flex",alignItems:"center",gap:8},children:[(typeof g.score=="string"||typeof g.score=="number")&&te("span",{children:["\u5206\u6570: ",h(g.score)]}),((z=g.metadata)==null?void 0:z.update_time)&&k("span",{children:zx(g.metadata.update_time)})]}),(($=g==null?void 0:g.tags)==null?void 0:$.length)&&g.tags.length>0&&g.tags.length<=10&&k("span",{style:{display:"flex",alignItems:"center",flexShrink:0,gap:"2px"},children:(g.tags||[]).map(U=>k(Xa,{i:g,item:w,j:U,clickTag:g.type==="faq"?void 0:A},U.id))})]}),(typeof g.score=="string"||typeof g.score=="number")&&!(g.type==="faq"||g.faq_question||g.faq_answer)&&k("div",{style:{display:"flex",alignItems:"center",height:"18px",marginTop:"4px"},children:te("div",{style:{backgroundColor:"#F2F2FB",borderRadius:"4px",padding:"2px 3px",display:"flex",justifyContent:"center",alignItems:"center",fontSize:"12px"},children:[k("span",{style:{color:"#4E5969",marginRight:"6px"},children:"\u5206\u6570:"}),k("span",{style:{color:"#1D2129"},children:h(g.score)})]})}),k("div",{style:{flex:1,display:"flex",justifyContent:"flex-start",marginTop:"4px"},children:((j=g==null?void 0:g.tags)!=null&&j.length&&g.tags.length>10?g.tags:[]).map(U=>k(Xa,{i:g,item:w,j:U,clickTag:g.type==="faq"?void 0:A},U.id))}),g.type==="faq"&&(g.faq_question||g.faq_answer)&&te("div",{style:{marginTop:"8px",padding:"8px 10px",background:"#EAF4FD",borderRadius:"4px",fontSize:"12px",color:"#1D2129",lineHeight:1.5},children:[g.faq_question!=null&&String(g.faq_question).trim()!==""&&te("div",{style:{marginBottom:"4px",display:"flex"},children:[k("span",{style:{color:"#4E5969",flexShrink:0},children:"Q: "}),k("span",{style:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical"},children:String(g.faq_question).trim()})]}),g.faq_answer!=null&&String(g.faq_answer).trim()!==""&&te("div",{style:{display:"flex"},children:[k("span",{style:{color:"#4E5969",flexShrink:0},children:"A: "}),k("span",{style:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical"},children:String(g.faq_answer).replace(/\s*--+[A-Za-z0-9]*\s*$/,"").trim()||String(g.faq_answer).trim()})]})]}),!!((q=g==null?void 0:g.main_source)!=null&&q.length)&&te("div",{style:{flex:1,display:"flex",alignItems:"flex-start",marginTop:"4px"},children:[k("div",{style:{fontSize:"12px",color:"#4E5969",width:"60px"},children:"\u5173\u8054\u6587\u6863:"}),k(Pn,{placement:"topLeft",title:((Y=_a(g.main_source[0]))==null?void 0:Y.length)>22?_a(g.main_source[0]):"",children:k("div",{style:{fontSize:"12px",color:"#4E5969",width:"289px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:_a(g.main_source[0])})})]})]},g.id)})},w.key)})})]})]}),k(fa,{drawer:{styles:{body:{padding:0},header:{display:"none"}}},children:te(xu,{autoFocus:!1,onClose:()=>l(!1),open:u,width:m==="graphList"?"100%":720,className:"overflow-x-hidden",destroyOnClose:!0,afterOpenChange:w=>{w||f(null)},children:[s==="graphPreview"&&k(Mx,{curFileInfo:x,onClose:l,token:e}),s==="mark"&&k(Lx,{content:x,onClose:l,token:e}),s==="preview"&&k(ec,{curFileInfo:x,onClose:l,token:e}),s==="database"&&k($x,{curFileInfo:x,onClose:l,token:e}),s==="faq"&&x&&te("div",{className:"p-4",style:{fontSize:"14px",color:"#1D2129",lineHeight:1.6},children:[x.faq_question!=null&&String(x.faq_question).trim()!==""&&te("div",{style:{marginBottom:"12px"},children:[k("span",{style:{color:"#4E5969",marginRight:"4px"},children:"Q:"}),k("span",{children:String(x.faq_question).trim()})]}),x.faq_answer!=null&&String(x.faq_answer).trim()!==""&&te("div",{children:[k("span",{style:{color:"#4E5969",marginRight:"4px"},children:"A:"}),k("span",{children:String(x.faq_answer).replace(/\s*--+[A-Za-z0-9]*\s*$/,"").trim()||String(x.faq_answer).trim()})]})]})]})})]})},Vx=({fileData:t,token:r})=>{const[e,n]=ue([]);$e(()=>{var c;const o=t==null?void 0:t.knowledgeBases;if(!(o!=null&&o.length))return;const s=((c=o[0])==null?void 0:c.treeData)||[];s!=null&&s.length&&n(s)},[t]);const i=We(new Map),a=async(o,s)=>{var c,u;if(!i.current.get(o==null?void 0:o.fetchUrl))try{const l=e[s];l.loading=!0;const x=[...e];n(x);const f=await Mt.get(`${ad()}/${o.fetchUrl}`,{headers:{Authorization:r}}),m=(u=(c=f==null?void 0:f.data)==null?void 0:c.data)==null?void 0:u.records;if(m){const v=e[s];v.loading=!1,v.children=m;const p=[...e];p[s]=v,n(p),i.current.set(o==null?void 0:o.fetchUrl,!0)}else{const v=e[s];v.loading=!1;const p=[...e];n(p)}}catch{const x=e[s];x.loading=!1;const f=[...e];n(f)}};return te(qn,{children:[k(ba,{title:"\u77E5\u8BC6\u5E93\u6587\u6863\u76EE\u5F55",setOpen:()=>{const o=new CustomEvent("aichat:right_set",{detail:{collapsed:!0}});window.dispatchEvent(o)}}),k("div",{style:{height:"calc(100% - 60px)",overflowY:"auto",padding:"16px"},children:e.map((o,s)=>{var c;return o.type==="file"?te("div",{className:"flex",style:{marginTop:"8px"},children:[Bu(o),k(Pn,{placement:"top",title:((c=o.name)==null?void 0:c.length)>23?o.name:"",children:k("div",{style:{paddingLeft:"6px",width:"346px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",cursor:"default",fontSize:"14px"},children:o.name})})]}):k(jx,{item:o,index:s,clickFileItem:a},s)})})]})},jx=({item:t,index:r,clickFileItem:e})=>{var a;const[n,i]=ue(!1);return te("div",{style:{marginTop:"8px"},children:[te("div",{className:"flex cursor-pointer",onClick:()=>{i(!n),!n&&e(t,r)},children:[Bu(t),k(Pn,{placement:"top",title:((a=t.name)==null?void 0:a.length)>23?t.name:"",children:te("div",{style:{paddingLeft:"6px",width:"346px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:"14px"},children:[t.name," (",t.fileCount||0,")"]})})]},r),k("div",{style:{padding:"2px 0 2px 14px",margin:"8px 0 0 7px",borderLeft:"2px solid #E5E6EB",display:n?"block":"none"},children:(t.children||[]).map((o,s)=>{var c;return te("div",{className:"flex items-center",children:[k("div",{style:{width:"4px",height:"4px",borderRadius:"2px",background:"black"}}),k(Pn,{placement:"top",title:((c=o.name)==null?void 0:c.length)>26?o.name:"",children:k("div",{style:{paddingLeft:"6px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:"12px",width:"336px"},children:o.fileName})})]},s)})})]})};var tc=(t=>(t.REFERENCELIST="referencelist",t.ALLFILELIST="allFileList",t))(tc||{});function B2(t=Ec){return function({token:e,url:n="http://localhost:8888",styles:i,CSRFToken:a,eventsEmit:o,scrollOld:s,locale:c="zh",messages:u,...l}){const x=Lo(),f=Te(()=>{const D=yn({theme:Hn,mode:"light"},x||{});return yn(D,i||{})},[x,i]),[m,v]=ue(!1),[p,d]=ue(!1),[y,h]=ue(null),[C,b]=ue(!1),[E,F]=ue("mark"),[A,w]=ue({url:"",parse_url:"",file_type:"",file_name:""}),[B,g]=ue([]),[S,_]=ue(1),[R]=ue(16),[P,z]=ue(0),[$,j]=ue(!1),[q,Y]=ue([]),[U,M]=ue(void 0),[N,O]=ue([]),[I,V]=ue([]),[X,ee]=ue(void 0),[re,ie]=ue({display:"ready",sender:"ready",app:"initializing"});function se(T,D){if(!D)return T;const W=Array.isArray(T)?[...T]:{...T};for(const K in D)if(D[K]!==void 0&&D[K]!==null&&Object.prototype.hasOwnProperty.call(D,K))if(K==="actions"&&Array.isArray(T[K])&&Array.isArray(D[K])){const oe=new Map;T[K].forEach(ce=>{ce.name&&oe.set(ce.name,ce)}),D[K].forEach(ce=>{ce.name&&oe.set(ce.name,ce)}),W[K]=Array.from(oe.values())}else typeof T[K]=="object"&&T[K]!==null&&!Array.isArray(T[K])&&typeof D[K]=="object"&&D[K]!==null&&!Array.isArray(D[K])?W[K]=se(T[K],D[K]):W[K]=D[K];return W}const De=Te(()=>_u(c),[c]),Q=Te(()=>{const T=De;return{...nn,placeholder:T.sender.placeholder,switchs:(nn.switchs??[]).map(W=>({...W,label:W.name==="netSearch"?T.sender.netSearch:T.sender.deepThinking})),actions:(nn.actions??[]).map(W=>({...W,tip:W.name==="upload"?T.sender.fileUpload:W.tip}))}},[c,De]),[G,ae]=ue(()=>se(Q,l.senderConfig));$e(()=>{const T=De,D={...nn,placeholder:T.sender.placeholder,switchs:(nn.switchs??[]).map(W=>({...W,label:W.name==="netSearch"?T.sender.netSearch:T.sender.deepThinking})),actions:(nn.actions??[]).map(W=>({...W,tip:W.name==="upload"?T.sender.fileUpload:W.tip}))};ae(W=>{const K=se(D,l.senderConfig);return Array.isArray(W.actions)&&Array.isArray(K.actions)&&(K.actions=K.actions.map((oe,ce)=>{var pe;const ve=(pe=W.actions)==null?void 0:pe[ce];return ve&&ve.name===oe.name&&ve.badgeCount!==void 0?{...oe,badgeCount:ve.badgeCount}:oe})),K})},[c,l.senderConfig,De]);const{fileStatuses:le,setFileStatuses:Z,pollFileStatus:fe,handleRemoveFromTemp:Be,resetStopFlag:Re,setStopFlag:je,stoppedRef:Ce,getTempFileList:be,setFileManagerData:Ne,fileManagerData:Ee}=D1({url:n,token:e,CSRFToken:a,activeSessionId:U}),[Ke,ne]=ye.useState(()=>{var D;if(!I||I.length===0)return;const T=I.find(W=>W.isDefault);return T?T.id:(D=I[0])==null?void 0:D.id});ye.useEffect(()=>{if(!I||I.length===0)return;const T=I.some(D=>D.id===Ke);if(!Ke||!T){const D=I.find(W=>W.isDefault);ne(D?D.id:I[0].id)}},[I]);const[we,ot]=ue({}),Bt=We(void 0),St=We(void 0),$t=We(void 0),qe=We(null),zt=We(void 0),cr=We([]),[Dr,Dt]=ue([]),[wr,dr]=ue({}),[zr,fr]=ue(!1),[qr,_r]=ue([]),[Hr,qt]=ue(!1),{api_startChat_re:Ct,addEmptyMessage:_t,setLastEmptyMessage:Ht,stopStream:tr,cancelStreamBySessionId:Xt}=A1({baseUrl:n,CSRFToken:a,token:e,setChatData:Y,activeSessionId:U,setAppStatus:ie,setConversationList:g}),rt=Te(()=>{const T={};return(I||[]).forEach(D=>{T[D.id]=D}),T},[I]),he=Te(()=>{const T=q.find(W=>W.id===U)||{id:U,messages:[]},D=T.configId?rt[T.configId]:null;return{...T,assistantInfo:D}},[q,U,rt]);$e(()=>{console.log("currentChatData",he)},[he]);const it=Te(()=>{if(he.configId&&rt){const T=rt[he.configId];return T!=null&&T.configJson?JSON.parse(T.configJson).is_download:!1}else return!1},[he.configId,rt]);Te(()=>{if((he.configId||X)&&rt){const T=rt[he.configId];if(T!=null&&T.configJson){const D=JSON.parse(T.configJson);return console.log("is_enableThinking",he.configId,rt,X),!!D.thinking}else if(X){const D=rt[X];if(D!=null&&D.configJson)return!!JSON.parse(D.configJson).thinking}}return!1},[he.configId,rt,X]),$e(()=>{if(Bt.current&&Bt.current!==U){const D=Bt.current,W=B.find(ce=>ce.sessionId===D&&ce.isNew),K=q.find(ce=>ce.id===D&&ce.isNew),oe=K&&K.messages&&K.messages.length>0;W&&!oe&&(g(ce=>ce.filter(ve=>ve.sessionId!==D)),Y(ce=>ce.filter(ve=>ve.id!==D)))}Bt.current=U;const T=he.messages&&he.messages.length>0?he.messages[he.messages.length-1].recommendQuestion:[];O(T)},[U,B,q,he.messages]);const bt=async T=>{var D,W,K,oe;if(!$){j(!0);try{const ce=await Mt.get(`${n}/qa/dialogue/list?pageNo=${T}&pageSize=${R}&sysType=INT_SESSION`,{headers:{Authorization:e}}),ve=((W=(D=ce==null?void 0:ce.data)==null?void 0:D.data)==null?void 0:W.records)||[],pe=((oe=(K=ce==null?void 0:ce.data)==null?void 0:K.data)==null?void 0:oe.total)||0;z(pe),g(tt=>{const et=new Map;return[...tt,...ve].forEach(ut=>{et.set(ut.sessionId,ut)}),Array.from(et.values())}),_(T)}catch{}finally{j(!1)}}};$e(()=>{ie(T=>({...T,app:"initializing"})),Mt.get(`${n}/qa/search/config/helper/list?pageNo=1&pageSize=3000`,{headers:{Authorization:e}}).then(T=>{V(T.data.data||[])}).catch(()=>{}),bt(1).then(()=>{U||Vt(),ie(T=>({...T,app:"ready"}))}).catch(()=>{ie(T=>({...T,app:"error"}))})},[]),$e(()=>{U&&(ie(T=>({...T,display:"loading"})),be(U),Mt.get(`${n}/qa/dialogue/getDialogBySessionId?sessionId=${U}`,{headers:{Authorization:e}}).then(T=>{var ft;if(!T.data.data){ie(de=>({...de,display:"ready"}));return}const D=((ft=T.data.data)==null?void 0:ft.queryReplyPairList)||[],W=m1(D),{sessionId:K,searchConfigDTO:oe,filePath:ce,configId:ve,reference:pe,webReference:tt,uploadedFiles:et,fileList:ut,currentFiles:st}=T.data.data;if(W.length>0){const de=W.length-1-[...W].reverse().findIndex(ze=>ze.istype==="ai");de>=0&&de<W.length&&W[de].istype==="ai"&&(pe&&(W[de].reference=pe),tt&&(W[de].webReference=tt))}const Le=st||ut||et;if(Le&&W.length>0){const de=[...W].reverse().findIndex(ze=>ze.istype==="user");de!==-1&&(console.log(W[W.length-1-de].currentFiles,"filesData"),W[W.length-1-de].currentFiles=Le)}B.find(de=>de.sessionId===K)&&g(de=>de.map(ze=>ze.sessionId===K?{...ze,searchConfigDTO:oe,filePath:ce,configId:ve}:ze));const Fe={configId:T.data.data.configId,filePath:T.data.data.filePath,searchConfigDTO:T.data.data.searchConfigDTO||{},sessionId:T.data.data.sessionId,label:T.data.data.label,kbId:T.data.data.kbId};Y(de=>{const ze=de.filter(Et=>Et.id!==U);return[{id:U,messages:W,...Fe},...ze]}),ie(de=>({...de,display:"ready"}))}).catch(T=>{console.error("\u83B7\u53D6\u804A\u5929\u6570\u636E\u5931\u8D25:",T),T.response&&T.response.status===404&&Vt(),ie(D=>({...D,display:"error"}))}))},[U,n,e]),$e(()=>{const T=Ee.uploadedFiles.length;ae(D=>{const W=Array.isArray(D.actions)?D.actions:[];return{...D,actions:W.map(oe=>oe.name==="history"?{...oe,badgeCount:T}:oe)}})},[Ee.uploadedFiles]),$e(()=>{od({url:n,token:e},T=>{_r(T)})},[]),ye.useEffect(()=>{le.length&&Y(T=>{if(!T[0])return T;const{messages:D}=T[0];for(let W=D.length-1;W>=0;W--)if(D[W].istype==="user"){const K=D[W].currentFiles||[];D[W].currentFiles=le.map(oe=>{var ve,pe,tt;const ce=K.find(et=>et.uid===oe.uid);return{name:((ve=oe.file)==null?void 0:ve.name)||oe.name,size:((pe=oe.file)==null?void 0:pe.size)||oe.size,type:((tt=oe.file)==null?void 0:tt.type)||oe.type,status:oe.status,uid:oe.uid,url:oe.url||(ce==null?void 0:ce.url)||""}});break}return[...T]})},[le]);let Ae=null,at=null;const rr=(T,D,W,K)=>{at=fe(T,{onStatusUpdate:D,onComplete:W,onFail:K})},He=(T,D)=>{Y(W=>{const K=[...W];return K[0]&&(K[0]={...K[0],messages:K[0].messages.map(oe=>oe.queryId===T?{...oe,feedbackResult:D}:oe)}),K})},Ge=async T=>{var D,W;if(T)try{const K=(he==null?void 0:he.configId)||((D=rt==null?void 0:rt[(he==null?void 0:he.configId)||""])==null?void 0:D.id)||"",oe=await Mt.get(`${n}/qa/ai/recommendQuestion?queryId=${T}&configId=${K||""}`.replace(/\?&/,"?"),{headers:{Authorization:e}});O(((W=oe.data)==null?void 0:W.data)||[])}catch{O([])}};function dt(T){const{content:D,audioUrl:W,filePaths:K,queryId:oe}=T;if(!U||!oe)return;const ce=(he==null?void 0:he.messages)||[],ve=ce.findIndex(ge=>(ge==null?void 0:ge.queryId)===oe&&((ge==null?void 0:ge.istype)==="ai"||(ge==null?void 0:ge.isUser)===!1));let pe;if(ve>0)for(let ge=ve-1;ge>=0;ge-=1){const Fe=ce[ge];if((Fe==null?void 0:Fe.istype)==="user"||(Fe==null?void 0:Fe.isUser)===!0){pe=Fe;break}}const tt=(pe==null?void 0:pe.content)??D;if(!tt)return;const et=(pe==null?void 0:pe.filePaths)??K,ut=(typeof et=="string"&&et?JSON.parse(et):et||[]).map(ge=>ge.uid),st=Date.now();Ht({now:st}),ie(ge=>({...ge,display:"processing",sender:"processing"}));const Le="query-"+br(32);ve>=0&&ce[ve]&&Y(ge=>{if(!ge[0])return ge;const Fe=ge[0],ft=Fe.messages||[];if(ve>=ft.length)return ge;const de=ft.slice();return de[ve]={...de[ve],queryId:Le,content:de[ve].content,reference:"[]",webReference:"[]",graphReference:null,databaseReference:null,status:2,chain:void 0},[{...Fe,messages:de},...ge.slice(1)]}),T.clearFn&&T.clearFn(),g(ge=>ge.map(Fe=>Fe.sessionId===U?{...Fe,gmtModified:st}:Fe)),Ct({configId:he.configId,content:tt,fileUids:ut,lastDate:st,name:he.label||"",queryId:Le,sessionId:String(U||""),type:(pe==null?void 0:pe.audioUrl)??W?"audioUrl":"text",audioUrl:((pe==null?void 0:pe.audioUrl)??W)||"",enableThinking:!!we.reasoning,enableWebsearch:!!we.netSearch,qaChannel:we.qaChannel,tempKnowledgeBaseCheck:Xn.current},ge=>{Ge(Le)})}async function ht(T,D){if(re.sender!=="ready"){lt.warning("\u5F53\u524D\u5BF9\u8BDD\u6B63\u5728\u5904\u7406\u4E2D\uFF0C\u8BF7\u7A0D\u5019\u518D\u53D1\u9001\u65B0\u7684\u95EE\u9898");return}if(!U)return;const W=new CustomEvent("aichat:right_set",{detail:{collapsed:!0}});window.dispatchEvent(W);const K=B.find(oe=>oe.sessionId===U);if(K&&K.isNew){let oe=!1;const ce=X||K.configId,ve=T&&T.content?T.content.slice(0,20):K.label||"\u672A\u547D\u540D\u4F1A\u8BDD";if(await new Promise((pe,tt)=>{cd({url:n,token:e,CSRFToken:a},{label:ve,sessionId:K.sessionId,sysType:"INT_SESSION",configId:ce},et=>{et&&et.data&&et.data.sessionId?(g(ut=>ut.map(st=>st.sessionId===K.sessionId?{...st,isNew:!1,configId:ce,label:ve}:st)),Y(ut=>ut.map(st=>st.id===K.sessionId?{...st,isNew:!1,configId:ce,label:ve}:st)),oe=!0,pe()):(lt.error("\u521B\u5EFA\u4F1A\u8BDD\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5"),tt())})}),!oe)return;nr(U,T,D,ce);return}nr(U,T,D)}function nr(T,D,W,K){const oe="query-"+br(32),ce=B.find(Le=>Le.sessionId===T),ve=K||(ce==null?void 0:ce.configId)||he.configId;console.log("\u52A9\u624B\u914D\u7F6E\u8BE6\u60C5",ve);const pe=D.content||D.text||"",tt=typeof pe=="string"?pe:String(pe),et=tt?tt.slice(0,20):"\u672A\u547D\u540D\u4F1A\u8BDD";let ut;if(D.files&&D.files.length>0&&(ut=D.files.map(Le=>({name:Le.file.name,size:Le.file.size,type:Le.file.type,filePath:Le.filePath||"",convertedFilePath:Le.convertedFilePath||"",uid:Le.uid||""}))),console.log("\u672C\u5730\u6587\u4EF6\u4E0A\u4F20",D.files),_t({content:tt,queryId:oe,currentFiles:ut,filePaths:ut?JSON.stringify(ut):void 0}),g(Le=>Le.map(ge=>ge.sessionId===T&&ge.label==="\u672A\u547D\u540D\u4F1A\u8BDD"&&ge.isNew?{...ge,label:et,gmtModified:Date.now(),isNew:!1}:ge)),Y(Le=>Le.map(ge=>ge.id===T&&ge.label==="\u672A\u547D\u540D\u4F1A\u8BDD"&&ge.isNew?{...ge,label:et,isNew:!1}:ge)),D.files&&D.files.length>0){ie(de=>({...de,sender:"uploading",display:"uploading"})),Ae=new AbortController,Re();const Le=D.files.map(()=>`rc-upload-${Date.now()}-${Math.random().toString(36).slice(2)}`),ge=D.files.map((de,ze)=>({...de,uid:Le[ze],status:"uploading"}));Z(ge);const Fe=new FormData;D.files.forEach(de=>{Fe.append("files",de.file)});const ft=String(T||"");Fe.append("sessionId",ft),Fe.append("uids",Le.join(",")),Mt.post(`${n}/index/knowledgeBase/file/uploadFiles`,Fe,{headers:{Authorization:e,"Content-Type":"multipart/form-data"},signal:Ae.signal}).then(de=>{var kt,nt,Tr,Ot,Vr,_e,Ft,At,Ue,vt;if(console.log("\u6587\u4EF6\u4E0A\u4F20\u7684\u6253\u5370\u7ED3\u679C",de),console.log("\u6587\u4EF6\u4E0A\u4F20\u54CD\u5E94\u8BE6\u60C5:",{status:de.status,success:(kt=de.data)==null?void 0:kt.success,dataType:Array.isArray((nt=de.data)==null?void 0:nt.data)?"array":typeof((Tr=de.data)==null?void 0:Tr.data),dataLength:Array.isArray((Ot=de.data)==null?void 0:Ot.data)?de.data.data.length:"N/A",errorMsg:(Vr=de.data)==null?void 0:Vr.errorMsg,errorCode:(_e=de.data)==null?void 0:_e.errorCode,fullResponse:de.data}),Ce.current)return;const ze=(Ft=de.data)==null?void 0:Ft.data,wt=((At=de.data)==null?void 0:At.success)===!0,Et=Array.isArray(ze)&&ze.length>0;if(wt&&Et){const xt=ze,vr=xt.map(Xe=>Xe.uid);Z(Xe=>Xe.map(Me=>{const Ye=ze.find(ke=>ke.uid===Me.uid);return Ye?{...Me,...Ye}:Me})),ie(Xe=>({...Xe,sender:"processing",display:"analyzing"})),Z(Xe=>Xe.map(Me=>({...Me,status:"parsing"}))),rr(vr,Xe=>{if(!Xe||!Array.isArray(Xe)){console.warn("pollFileStatus \u56DE\u8C03\u8FD4\u56DE\u7684 serverStatuses \u65E0\u6548:",Xe);return}if(Z(Ye=>Ye.map(ke=>{const ir=Xe.find(jt=>jt&&jt.uid===ke.uid);if(ir)switch(ir.fileParseStatus??ir.status){case 3:return{...ke,status:"done"};case 4:return{...ke,status:"error"};case 1:case 2:default:return{...ke,status:"parsing"}}return ke})),Array.isArray(Xe)&&Xe.length>0&&Xe.every(Ye=>{if(!Ye)return!1;const ke=Ye.fileParseStatus??Ye.status;return ke===3||ke===4})){Z([]);const Ye=new Map;(Xe||[]).forEach(ke=>{Ye.set(ke.id,ke)}),Ne(ke=>({uploadedFiles:pd(ke.uploadedFiles,xt).map(jt=>{var jr;return{...jt,pdfPages:((jr=Ye.get(jt.id))==null?void 0:jr.pdfPages)||0}})}))}},()=>{W==null||W(),ie(Me=>({...Me,sender:"processing",display:"processing"})),Z(Me=>Me.map(Ye=>{const ke=xt.find(ir=>ir.uid===Ye.uid);return ke?{...Ye,...ke,url:ke.filePath,filePath:ke.filePath,name:ke.fileName||Ye.name,convertedFilePath:ke.convertedFilePath||Ye.convertedFilePath}:Ye})),Y(Me=>{if(!Me[0])return Me;const{messages:Ye}=Me[0];for(let ke=Ye.length-1;ke>=0;ke--)if(Ye[ke].istype==="user"){const ir=Ye[ke].currentFiles||[];Ye[ke].currentFiles=ir.map(jt=>{const jr=xt.find(wa=>wa.uid===jt.uid);return jr?{...jt,...jr}:jt});break}return[...Me]});const Xe=Date.now();Ct({configId:ve,content:tt,fileUids:vr,lastDate:Xe,name:et,queryId:oe,sessionId:String(T||""),type:"text",audioUrl:"",enableThinking:!!we.reasoning,enableWebsearch:!!we.netSearch,qaChannel:we.qaChannel,tempKnowledgeBaseCheck:Xn.current},Me=>{Ge(oe)})},Xe=>{ie(Me=>({...Me,display:"ready",sender:"ready"})),Z(Me=>Me.map(Ye=>({...Ye,status:"error",message:Xe})))})}else{let xt="\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25";(Ue=de.data)!=null&&Ue.errorMsg?xt=de.data.errorMsg:wt?Et||(Array.isArray(ze)?ze.length===0&&(xt="\u4E0A\u4F20\u5931\u8D25: \u8FD4\u56DE\u6570\u636E\u4E3A\u7A7A"):xt=`\u4E0A\u4F20\u5931\u8D25: \u8FD4\u56DE\u6570\u636E\u683C\u5F0F\u9519\u8BEF\uFF0C\u671F\u671B\u6570\u7EC4\uFF0C\u5B9E\u9645\u4E3A ${typeof ze}`):xt=`\u4E0A\u4F20\u5931\u8D25: success=${(vt=de.data)==null?void 0:vt.success}`,console.error("\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25\u8BE6\u60C5:",{errorMsg:xt,response:de.data,isSuccess:wt,isValidData:Et}),lt.error(xt),ie(vr=>({...vr,display:"error",sender:"ready"})),Z(vr=>vr.map(Xe=>({...Xe,status:"error",message:xt})))}}).catch(de=>{var ze,wt;((ze=de==null?void 0:de.response)==null?void 0:ze.status)===413?(wt=de==null?void 0:de.response)!=null&&wt.statusText.includes("Request Entity Too Large")&&lt.error("\u6587\u4EF6\u8D85\u8FC7\u6700\u5927\u53EF\u4E0A\u4F20\u9650\u5236"):lt.error("\u7F51\u7EDC\u9519\u8BEF"),ie(Et=>({...Et,display:"error",sender:"ready"})),Z(Et=>Et.map(kt=>({...kt,status:"error",message:"\u7F51\u7EDC\u9519\u8BEF"})))});return}ie(Le=>({...Le,display:"processing",sender:"processing"}));const st=Date.now();g(Le=>Le.map(ge=>ge.sessionId===T?{...ge,gmtModified:st}:ge)),W==null||W(),Ct({configId:ve,content:tt,fileUids:[],lastDate:st,name:et,queryId:oe,sessionId:String(T||""),type:"text",audioUrl:"",enableThinking:!!we.reasoning,enableWebsearch:!!we.netSearch,qaChannel:we.qaChannel,tempKnowledgeBaseCheck:Xn.current},Le=>{Ge(oe)})}function Jr(T){T.restult==1?ka({url:n,token:e,CSRFToken:a},{queryId:T.queryId},()=>{He(T.queryId,null)}):fs({url:n,token:e,CSRFToken:a},{restult:1,queryId:T.queryId},()=>{He(T.queryId,1)})}function Vt(T){const D=br(32),W={sessionId:D,label:"\u672A\u547D\u540D\u4F1A\u8BDD",gmtModified:Date.now(),searchConfigDTO:{},filePath:"",configId:"",isNew:!0};g(K=>[{...W,messages:[]},...K]),Y(K=>[{id:D,messages:[],...W},...K]),M(D)}function pr(T){if(T!=null&&T.sessionId&&T.sessionId!==U){U&&Xt(U),M(T.sessionId),ie(W=>({...W,sender:"ready"}));const D=q.find(W=>W.id===T.sessionId);if(D&&D.messages&&D.messages.length>0){const W=[...D.messages].reverse().find(K=>K.istype==="ai");W&&W.recommendQuestion?O(W.recommendQuestion):O([])}else O([])}}const en=async T=>new Promise((D,W)=>{dd({url:n,token:e,CSRFToken:a},{sessionId:T},K=>{K?(lt.success("\u5220\u9664\u6210\u529F!"),D(K)):(lt.error("\u5220\u9664\u5931\u8D25!"),W(K))})}),tn=async()=>{try{return g([]),z(0),await bt(1),[]}catch(T){throw lt.error("\u5237\u65B0\u4F1A\u8BDD\u5217\u8868\u5931\u8D25"),T}},rn=async(T,D)=>new Promise((W,K)=>{fd({url:n,token:e,CSRFToken:a},{label:D,sessionId:T},oe=>{if(oe){const ce=Date.now();g(ve=>ve.map(pe=>pe.sessionId===T?{...pe,label:D,gmtModified:ce}:pe)),Y(ve=>ve.map(pe=>pe.id===T?{...pe,label:D}:pe)),lt.success("\u91CD\u547D\u540D\u6210\u529F!"),W(oe)}else lt.error("\u91CD\u547D\u540D\u5931\u8D25"),K(oe)})}),Nt=T=>{g(D=>{const W=D.filter(K=>K.sessionId!==T);return U===T&&(W.length>0?M(W[0].sessionId):Vt()),W})},Kn=(T,D)=>{const W=Date.now();g(K=>K.map(oe=>oe.sessionId===T?{...oe,label:D,gmtModified:W}:oe)),Y(K=>K.map(oe=>oe.id===T?{...oe,label:D}:oe))},Gn=T=>{fs({url:n,token:e,CSRFToken:a},{...T,...wr,restult:0},()=>{He(wr.queryId,0)})},Fa=T=>{const D=T.new_name,W=y.data.label;D&&D!==W?y.async_renameConversation(D).then(()=>{y.fn_renameItemInList(D),v(!1)}).catch(()=>{}):v(!1)},hr=T=>{y.async_deleteConversation().then(()=>{y.fn_removeItemFromList(),d(!1)}).catch(()=>{})},kr=(T,D)=>{switch(console.log(T,D),T){case"close_remove":d(!1);break;case"close_rename":v(!1);break;case"ok_rename":Fa(D);break;case"ok_remove":hr();break}},uc=async({url:T,params:D,replacePredataFunction:W})=>{var K,oe;try{const ce=await Mt.post(T,D,{headers:{Authorization:e}}),ve=(oe=(K=ce==null?void 0:ce.data)==null?void 0:K.data)==null?void 0:oe.data;ve&&W(ve)}catch(ce){console.log("error",ce)}},lc=async T=>{var D;try{const W=await Mt.get(`${eo()}/index/knowledgeBase/file/getFileStatusByUids?uids=${T.data.uids}`,{headers:{Authorization:e}});return console.log("resslkdjgalsg",W),(D=W==null?void 0:W.data)==null?void 0:D.data}catch{}},os=async T=>{try{const D=await lc({data:{uids:T.uid},config:{url:eo(),token:e,enableMock:!1}});if(D!=null&&D.length){const W=D[0];if(Ra(W.convertedFilePath)==="pdf"&&!W.pdfPages)return lt.warning("\u6587\u4EF6\u8FD8\u672A\u89E3\u6790\u5B8C\u6210,\u8BF7\u7A0D\u540E\u9884\u89C8");if(W.convertedFilePath)w({...T,parse_url:W.convertedFilePath,pdfPages:W.pdfPages}),F("preview"),b(!0);else return lt.warning("\u6587\u4EF6\u89E3\u6790\u5931\u8D25")}}catch{}},Xn=We(!1),Rr=(T,D)=>{var W,K,oe,ce,ve,pe,tt,et,ut,st,Le,ge,Fe;switch(console.log(`[Event] ${T}`,D),T){case"TempKnowledgeBase":Xn.current=D;break;case"reference_file:click":if(D.file_type==="image")return;const ft=_e=>{w({...D,file_type:D.type,file_name:D.file,..._e}),F("preview"),b(!0)},de=Ra((D==null?void 0:D.parse_url)||""),ze=(W=D.metadata)!=null&&W.source?`${na}${D.metadata.source}`:D.filePath||D.url||D.convertedFilePath||"",wt=Ra(ze),Et=()=>{if(D.uid)os(D);else return D.references?void 0:lt.warning("\u6587\u4EF6\u8FD8\u672A\u89E3\u6790\u5B8C\u6210,\u8BF7\u7A0D\u540E\u9884\u89C8")};if(ld.includes(wt)){const _e=(K=D.metadata)!=null&&K.source?`${na}${D.metadata.source}`:D.url||D.convertedFilePath||D.filePath;wt==="pdf"?D.pdfPages?ft({parse_url:_e}):Et():ft({parse_url:_e})}else de==="pdf"?D.pdfPages?ft():Et():D.parse_url?ft():Et();break;case"conversations:load_more":{B.length<P&&!$&&bt(S+1);break}case"retrieve-sql-data:pagingation_click":const{page:kt,pageSize:nt,fetchUrl:Tr,source:Ot,replacePredataFunction:Vr}=D;uc({url:`${n}${Tr}`,replacePredataFunction:Vr,params:{pageNo:kt,pageSize:nt,convertedFilePath:Ot,stream:!1}});break;case"web_referenceFile_title:click":if(!((oe=D==null?void 0:D.data)!=null&&oe.link))return console.error("\u6CA1\u6709\u7F51\u9875\u5730\u5740");window.open(D.data.link,"_blank");break;case"conversation:item_click":pr(D);break;case"files:finished_animation_complete":Z([]);break;case"conversation:create":Vt();break;case"conversation:new_assistant_change":ee(D.assistantId);break;case"conversations:rename_icon_clicked":h({data:D,async_renameConversation:_e=>rn(D.sessionId,_e),fn_renameItemInList:_e=>Kn(D.sessionId,_e)}),v(!0);break;case"conversations:delete_icon_clicked":h({data:D,async_deleteConversation:()=>en(D.sessionId),async_refreshConversationList:tn,fn_removeItemFromList:()=>Nt(D.sessionId)}),d(!0);break;case"sender:send":ht(D,D.clearFn);break;case"sender:send_recommandQuestion":{const _e=((D==null?void 0:D.content)??"").toString();if(!_e)break;ht({content:_e},()=>{});break}case"chatbox:follow_up_question_click":{const _e=((D==null?void 0:D.question)??(D==null?void 0:D.content)??"").toString();if(!_e)break;ht({content:_e},()=>{});break}case"sender:stop":je(),Ae&&(Ae.abort(),Ae=null),at&&(at(),at=null),ie(_e=>({..._e,display:"ready",sender:"ready"})),Z([]),tr==null||tr();break;case"sender:clear":(ce=D.clearFn)==null||ce.call(D);break;case"sender:configChange":D&&D.all&&ot(D.all);break;case"sender:action_upload":qe.current&&qe.current.click();break;case"sender:action_history":qt(!0);break;case"uploaded_file:item_click":break;case"action_copy:click":D&&g1(D.content,D.event);break;case"chatbox:copy":{let _e=(D==null?void 0:D.content)||"";if(!_e)break;_e=_e.replace(/\[retrive-tag[^\]]*\][\s\S]*?\[\/retrive-tag\]/g,"");const Ft=async Ue=>{try{return await navigator.clipboard.writeText(Ue),lt.success("\u5DF2\u590D\u5236\u5230\u526A\u8D34\u677F"),!0}catch{return!1}},At=Ue=>{const vt=document.createElement("textarea");vt.value=Ue,vt.style.position="fixed",vt.style.opacity="0",document.body.appendChild(vt),vt.focus(),vt.select();try{document.execCommand("copy"),lt.success("\u5DF2\u590D\u5236\u5230\u526A\u8D34\u677F")}catch{lt.error("\u590D\u5236\u5931\u8D25")}document.body.removeChild(vt)};Ft(_e).then(Ue=>{Ue||At(_e)});break}case"chatbox:repeat":console.log(D,"sdkflskdjflksdjfklsdjlfkjsdklfjsdklfjlks"),dt(D);break;case"action_thumbsup":Jr(D);break;case"chatbox:like":Jr({queryId:D==null?void 0:D.queryId,restult:D==null?void 0:D.result});break;case"action_thumbsdown":D.restult===0?ka({url:n,token:e,CSRFToken:a},{queryId:D.queryId},()=>{He(D.queryId,null)}):(dr(D),fr(!0));break;case"chatbox:dislike":(D==null?void 0:D.result)===0?ka({url:n,token:e,CSRFToken:a},{queryId:D.queryId},()=>{He(D.queryId,null)}):(dr({queryId:D==null?void 0:D.queryId}),fr(!0));break;case"action_retrive_tag":o==null||o("action_retrive_tag",D);break;case"referenceFile_view":o==null||o("referenceFile_view",D);break;case"referenceFile_question":console.log(D,"zhezhhzhzh"),os(D.data||D),o==null||o("referenceFile_question",D);break;case"referenceFile_download":o==null||o("referenceFile_download",D);break;case"references:click":case"knowledge_base_view_all:click":{const _e=()=>T==="references:click"?k(S0,{type:"referencelist",data:D,token:e,eventsEmit:o,is_download:it}):k(Vx,{fileData:D,token:e}),Ft=new CustomEvent("aichat:right_set_content",{detail:{content:k(_e,{})}});window.dispatchEvent(Ft);const At=new CustomEvent("aichat:right_set",{detail:{collapsed:!1}});window.dispatchEvent(At);break}case"retrive_tag:click":{let _e=(D==null?void 0:D.referencesPayloadSingle)||((D==null?void 0:D.fromtype)==="10"&&(D!=null&&D.referenceDoc)?{knowledgeRefs:[D.referenceDoc],webRefs:[],graphRefs:[],databaseRefs:[],images:[],raw:{}}:null);if((D==null?void 0:D.fromtype)==="10"&&!_e&&((ve=D==null?void 0:D.leaf)==null?void 0:ve.id)!=null&&((pe=he==null?void 0:he.messages)!=null&&pe.length)){const Ft=he.messages;for(let At=Ft.length-1;At>=0;At--){const Ue=Ft[At];if((Ue==null?void 0:Ue.istype)!=="ai")continue;const vt=(Ue==null?void 0:Ue.faqReference)??((tt=Ue==null?void 0:Ue.reply)==null?void 0:tt.faqReference)??(Ue==null?void 0:Ue.reference);if(!vt)continue;let xt=[];try{const mt=typeof vt=="string"?(()=>{const hc=vt.replace(/"pk":\s*(\d+)/g,'"pk":"$1"').replace(/"order_num":\s*(\d+)/g,'"order_num":"$1"').replace(/"related_pk":\s*(\d+)/g,'"related_pk":"$1"');return JSON.parse(hc)})():vt;xt=Array.isArray(mt)?mt:[mt]}catch{continue}if(xt.length===0)continue;const vr=String(D.leaf.id);let Xe=xt.findIndex(mt=>String((mt==null?void 0:mt.pk)??(mt==null?void 0:mt.order_num)??(mt==null?void 0:mt.id))===vr);if(Xe<0){const mt=Number(vr);Number.isInteger(mt)&&mt>=1&&mt<=xt.length&&(Xe=mt-1)}if(Xe<0)continue;const Me=xt[Xe],Ye=Xe+1,ke=Me.metadata||{},ir=Me.faq_question||ke.sourceFileName||ke.source&&String(ke.source).split("/").pop()||"FAQ",jt=Me.folder_path||ke.folder_path||ke.knowledge_base_name||"",jr=jt?`${jt} - ${ir}`:ir,wa=`\u77E5\u8BC6\u5E93${Ye}\u540D\uFF1A${jr}`,Yn=String(Me.pk??Me.order_num??Me.id??""),us=typeof Me.score=="number"?Me.score:typeof ke.score=="number"?ke.score:0;_e={knowledgeRefs:[{id:Yn,file_id:Yn,file_name:wa,file_type:"faq",type:"faq",path:"",score:us,rrf_score:us,tags:[{id:vr,index:Ye,image_urls:((et=D==null?void 0:D.tagInfo)==null?void 0:et.image_urls)||[],metadata:ke}],source:Me.folder_path||"",order_num:Yn,pk:Yn,faq_question:Me.faq_question,faq_answer:Me.faq_answer,folder_path:Me.folder_path,metadata:ke,faqIndex:Ye,...Me}],webRefs:[],graphRefs:[],databaseRefs:[],images:[],raw:{}};break}}if((D==null?void 0:D.fromtype)==="10"&&_e){const Ft=new CustomEvent("aichat:right_set_content",{detail:{content:k(S0,{type:"referencelist",data:_e,token:e,eventsEmit:o,is_download:it})}});window.dispatchEvent(Ft);const At=new CustomEvent("aichat:right_set",{detail:{collapsed:!1}});window.dispatchEvent(At)}o==null||o("retrive_tag:click",D);break}case"fileManager:change":{typeof(D==null?void 0:D.setUploadedFiles)=="function"&&(St.current=D.setUploadedFiles,$t.current=D.removeFile,zt.current=D==null?void 0:D.senderConfig,cr.current=Array.isArray(D==null?void 0:D.uploadedFiles)?D.uploadedFiles:[],Array.isArray(D==null?void 0:D.uploadedFiles)&&Dt(D.uploadedFiles),console.log("[DEBUG] fileManager:change \u4E8B\u4EF6\u89E6\u53D1\uFF0CsetUploadedFilesRef \u5DF2\u8BBE\u7F6E",{hasSetUploadedFiles:!!St.current,uploadedFilesCount:((ut=D==null?void 0:D.uploadedFiles)==null?void 0:ut.length)||0,pendingFilesCount:((st=D==null?void 0:D.uploadedFiles)==null?void 0:st.length)||0,hasSenderConfig:!!(D!=null&&D.senderConfig),senderConfig:D==null?void 0:D.senderConfig,upload_number_limit:(Le=D==null?void 0:D.senderConfig)==null?void 0:Le.upload_number_limit,upload_size_limit:(ge=D==null?void 0:D.senderConfig)==null?void 0:ge.upload_size_limit}));break}case"uploaded_file:removeFromTemp":{console.log("[DEBUG] mergedEventsEmit uploaded_file:removeFromTemp \u4E8B\u4EF6",D);const _e=(Fe=D==null?void 0:D.file)==null?void 0:Fe.uid;if(!_e){console.warn("[DEBUG] \u7F3A\u5C11uid\uFF0C\u65E0\u6CD5\u5220\u9664\u4E34\u65F6\u6587\u4EF6",D);break}const Ft=[...(he==null?void 0:he.messages)||[]].reverse().find(Ue=>Ue.istype==="user"),At=Ft==null?void 0:Ft.queryId;Be(_e,At);break}case"uploaded_file:remove_batch":break;default:o==null||o(T,D)}},cc=[{key:"conversations",type:"custom",label:"\u5BF9\u8BDD\u5386\u53F2",icon:k(gd,{size:16}),enabled:!0,component:k(cf,{data:B,assistantList:I,activedItem:U||"",hasMore:B.length<P,loadingMore:$,sortRules:[{label:"\u5F53\u5929",dayPeriod:1},{label:"3\u5929",dayPeriod:3},{label:"7\u5929",dayPeriod:7},{label:"30\u5929",dayPeriod:30}],eventsEmit:Rr,styles:f.theme})}],ss=ye.useCallback(()=>k(w1,{eventsEmit:Rr,assistantList:I,styles:f,selectedId:Ke,onSelectAssistant:ne,productLogo:l==null?void 0:l.productLogo}),[Rr,I,f,Ke,l==null?void 0:l.productLogo]),dc={...ye.useMemo(()=>({AiChatBox:(T,D)=>{var ut,st,Le,ge;const W=D===(((ut=he==null?void 0:he.messages)==null?void 0:ut.length)||0)-1;let K="ready";if(W)if(T.status!==void 0)switch(T.status){case 0:K="thinking";break;case 1:K="processing";break;case 2:K="ready";break;case 3:K="error";break;case 4:K="thinking";break;default:K=re.display}else K=re.display;let oe=[];if(Array.isArray(N))oe=N;else if(typeof N=="string")try{oe=JSON.parse(N)||[]}catch{oe=[]}const ce=(()=>{var de;const Fe=T==null?void 0:T.reference;if(Fe){if(typeof Fe=="string")try{return JSON.parse(Fe),Fe}catch{return"[]"}try{return JSON.stringify(Fe)}catch{return"[]"}}const ft=(T==null?void 0:T.faqReference)??((de=T==null?void 0:T.reply)==null?void 0:de.faqReference)??void 0;if(!ft)return"[]";try{const ze=typeof ft=="string"?(()=>{const nt=ft.replace(/"pk":\s*(\d+)/g,'"pk":"$1"').replace(/"order_num":\s*(\d+)/g,'"order_num":"$1"').replace(/"related_pk":\s*(\d+)/g,'"related_pk":"$1"');return JSON.parse(nt)})():ft,wt=Array.isArray(ze)?ze:[ze];if(!wt.length)return"[]";const kt={knowledgeRefs:wt.map((nt,Tr)=>{const Ot=nt.metadata||{},Vr=nt.faq_question||Ot.sourceFileName||Ot.source&&String(Ot.source).split("/").pop()||"FAQ",_e=nt.folder_path||Ot.folder_path||Ot.knowledge_base_name||"",Ft=_e?`${_e} - ${Vr}`:Vr,At=`\u77E5\u8BC6\u5E93${Tr+1}\u540D\uFF1A${Ft}`,Ue=String(nt.pk??nt.order_num??nt.id??""),vt=typeof nt.score=="number"?nt.score:typeof Ot.score=="number"?Ot.score:0;return{id:Ue,file_id:Ue,file_name:At,file_type:"faq",type:"faq",path:"",score:vt,rrf_score:vt,tags:[{id:Ue,index:Tr+1,image_urls:[],metadata:Ot}],source:nt.folder_path||"",order_num:Ue,pk:Ue,faq_question:nt.faq_question,faq_answer:nt.faq_answer,folder_path:nt.folder_path,metadata:Ot,faqIndex:Tr+1,...nt}}),webRefs:[],graphRefs:[],databaseRefs:[],images:[],raw:{}};return JSON.stringify(kt)}catch{return"[]"}})(),ve=(()=>{const Fe=T==null?void 0:T.webReference;if(!Fe)return"[]";if(typeof Fe=="string")try{return JSON.parse(Fe),Fe}catch{return"[]"}try{return JSON.stringify(Fe)}catch{return"[]"}})(),pe=(()=>{const Fe=T==null?void 0:T.graphReference;if(!Fe)return"[]";if(typeof Fe=="string")try{return JSON.parse(Fe),Fe}catch{return"[]"}try{return JSON.stringify(Fe)}catch{return"[]"}})(),tt=T==null?void 0:T.databaseReference,et=(()=>{var ft,de,ze;if(T!=null&&T.chainRespTime||(ft=T==null?void 0:T.reply)!=null&&ft.chainRespTime)return(T==null?void 0:T.chainRespTime)??((de=T==null?void 0:T.reply)==null?void 0:de.chainRespTime);const Fe=(T==null?void 0:T.chain)||((ze=T==null?void 0:T.reply)==null?void 0:ze.chain);if(Array.isArray(Fe)&&Fe.length>0){const wt=Fe.reduce((Et,kt)=>{const nt=(kt==null?void 0:kt.chainRespTime)??(kt==null?void 0:kt.respTime);return nt!=null&&nt>0?Et+nt:Et},0);return wt>0?wt:void 0}})();return k(ls,{...T,enablePrism:!1,token:e,streamUrl:"/proxy/index/knowledgeBase/file/stream",referenceMode:"button",reference:ce,webReference:ve,graphReference:pe,faqReference:(T==null?void 0:T.faqReference)??((st=T==null?void 0:T.reply)==null?void 0:st.faqReference),databaseReference:tt,contentType:"stream",displayStatus:K,eventsEmit:Rr,isLast:W&&(T==null?void 0:T.istype)==="ai",followUpQuestions:W&&(T==null?void 0:T.istype)==="ai"?oe:[],defaultAnswer:((Le=he==null?void 0:he.searchConfigDTO)==null?void 0:Le.defaultAnswer)||"\u4E0D\u77E5\u9053\u4EC0\u4E48\u539F\u56E0\u6211\u4EEC\u6CA1\u80FD\u67E5\u5230\u4F60\u8981\u7684\u95EE\u9898*-*",is_download:it,styles:f,enableThoughtChain:!0,chain:T==null?void 0:T.chain,thoughtChainNodes:T==null?void 0:T.thoughtChainNodes,thoughtChainStatus:T==null?void 0:T.status,enableCot:(T==null?void 0:T.enableCot)??((ge=T==null?void 0:T.reply)==null?void 0:ge.enableCot),chainRespTime:et},`${(T==null?void 0:T.queryId)||(T==null?void 0:T.id)||D}-${(T==null?void 0:T.istype)||"unknown"}`)},LogoBox:T=>T&&T.LogoBox===null?null:T&&typeof T.LogoBox=="function"?k(T.LogoBox,{}):k("div",{className:"text-2xl w-full text-center font-bold",children:"\u5C0F\u9CB8\u667A\u80FD\u52A9\u624B"}),DisplayLoading:()=>k(k1,{}),DisplayError:()=>k(T1,{}),AppError:()=>k(R1,{msg:"\u5E94\u7528\u521D\u59CB\u5316\u5931\u8D25",subMsg:"\u65E0\u6CD5\u5B8C\u6210\u5E94\u7528\u521D\u59CB\u5316\uFF0C\u8FD9\u53EF\u80FD\u662F\u7531\u4E8E\u7F51\u7EDC\u8FDE\u63A5\u95EE\u9898\u6216\u670D\u52A1\u914D\u7F6E\u9519\u8BEF\u5BFC\u81F4\u7684\u3002\u8BF7\u68C0\u67E5\u60A8\u7684\u7F51\u7EDC\u8FDE\u63A5\u5E76\u91CD\u8BD5\u3002"}),AppLoading:()=>{var T,D;return k(_1,{title:(T=l==null?void 0:l.appLoadingConfig)==null?void 0:T.title,subtitle:((D=l==null?void 0:l.appLoadingConfig)==null?void 0:D.subtitle)||""})},UserChatBox:(T,D)=>k(ls,{enablePrism:!1,token:e,streamUrl:"/proxy/index/knowledgeBase/file/stream",...T,referenceMode:"button",contentType:"plainText",isUser:!0,displayStatus:"ready",eventsEmit:Rr,styles:f,fileManagerData:Ee,currentFiles:T==null?void 0:T.currentFiles},`${(T==null?void 0:T.queryId)||(T==null?void 0:T.id)||D}-user`),WelcomeComponent:ss}),[ss,he,re.display,Rr,f,it,Ee]),...l.CustomComponents||{}};$e(()=>{ae(T=>{const D=Array.isArray(T.switchs)?T.switchs.map(W=>W.name==="reasoning"?{...W,enabled:!0}:W):[];return{...T,switchs:D}})},[]);const fc=Te(()=>Ee.uploadedFiles||[],[Ee]),{FileDisplayTools:pc}=sd({fileManagerData:{uploadedFiles:fc},styles:f,eventsEmit:Rr});return k(Sd,{locale:c,children:te("div",{style:{height:"100%",minWidth:"1116px",overflow:"hidden"},children:[k("input",{ref:qe,type:"file",multiple:!0,accept:"image/*,.pdf,.doc,.docx,.ppt,.pptx,.xls,.xlsx,.txt,.md,.json,.csv,.zip,.rar,.7z,.ofd",style:{display:"none"},onChange:T=>{const D=T.target.files;if(D&&D.length>0){console.log("[DEBUG] handleFileSelect \u89E6\u53D1",{filesCount:D.length,hasSetUploadedFilesRef:!!St.current,hasSenderConfig:!!zt.current,dynamicSenderConfig:G,dynamicSenderConfigKeys:G?Object.keys(G):[],senderConfigRef:zt.current,senderConfigRefKeys:zt.current?Object.keys(zt.current):[]});const W=Array.from(D);let K=zt.current;(!K||K.upload_size_limit===void 0&&K.upload_number_limit===void 0&&(!K.upload_file_type_limit||K.upload_file_type_limit.length===0))&&(K=G);const oe=cr.current||[];console.log("[DEBUG] \u9A8C\u8BC1\u914D\u7F6E\u68C0\u67E5",{configSource:K,upload_number_limit:K==null?void 0:K.upload_number_limit,upload_size_limit:K==null?void 0:K.upload_size_limit,existingFilesCount:oe.length,newFilesCount:W.length});const ce=K&&(K.upload_size_limit!==void 0||K.upload_number_limit!==void 0&&K.upload_number_limit>0||K.upload_file_type_limit&&K.upload_file_type_limit.length>0);if(console.log("[DEBUG] \u914D\u7F6E\u68C0\u67E5\u7ED3\u679C",{hasUploadLimitConfig:ce,upload_number_limit:K==null?void 0:K.upload_number_limit,upload_size_limit:K==null?void 0:K.upload_size_limit,upload_file_type_limit:K==null?void 0:K.upload_file_type_limit}),ce){const ve={upload_size_limit:K.upload_size_limit,upload_number_limit:K.upload_number_limit,upload_file_type_limit:K.upload_file_type_limit,upload_limit_message:K.upload_limit_message};console.log("[DEBUG] \u6267\u884C\u6587\u4EF6\u9A8C\u8BC1",{uploadConfig:ve,existingFilesCount:oe.length,newFilesCount:W.length,totalCount:oe.length+W.length});const pe=Fc(W,oe,ve);if(console.log("[DEBUG] \u9A8C\u8BC1\u7ED3\u679C",{valid:pe.valid,errors:pe.errors,rejectedFilesCount:pe.rejectedFiles.length}),!pe.valid){wc(pe);const tt=W.filter(et=>!pe.rejectedFiles.includes(et));if(tt.length===0){qe.current&&(qe.current.value="");return}W.splice(0,W.length,...tt)}}if(St.current){const ve=W.map(pe=>({file:pe,type:pe.type.startsWith("image/")?"image":"document",status:"pending",name:pe.name}));console.log("[DEBUG] \u901A\u8FC7 setUploadedFilesRef \u8BBE\u7F6E\u6587\u4EF6",ve),St.current(ve)}else console.warn("[DEBUG] setUploadedFilesRef \u672A\u8BBE\u7F6E\uFF0C\u5EF6\u8FDF\u91CD\u8BD5"),setTimeout(()=>{if(St.current){const ve=W.map(pe=>({file:pe,type:pe.type.startsWith("image/")?"image":"document",status:"pending",name:pe.name}));console.log("[DEBUG] \u5EF6\u8FDF\u540E\u901A\u8FC7 setUploadedFilesRef \u8BBE\u7F6E\u6587\u4EF6",ve),St.current(ve)}else console.error("[DEBUG] \u5EF6\u8FDF\u540E setUploadedFilesRef \u4ECD\u672A\u8BBE\u7F6E")},100)}qe.current&&(qe.current.value="")}}),k(t,{...l,status:re,chatData:he,sidebar:cc,recommandQuestions:[],eventsEmit:Rr,styles:f,senderConfig:G,fileUploadStatus:le,CustomComponents:dc,activeSessionId:U,scrollOld:s,rightbarWidth:"400px",locale:c,messages:u,disclaimer:l.disclaimer??De.disclaimer,chatHeader:{title:(he==null?void 0:he.label)||De.chatHeader.newConversation,tools:pc}}),k(ud,{open:zr,feedBackList:qr,setOpen:fr,handleConfirm:Gn}),k(Px,{isModalOpen:m,handleOk:kr,handleCancel:()=>kr("close_rename"),data:(y==null?void 0:y.data)||{}}),k(Nx,{isModalOpen:p,handleOk:kr,handleCancel:()=>kr("close_remove"),data:(y==null?void 0:y.data)||{}}),k(fa,{drawer:{styles:{body:{padding:0},header:{display:"none"}}},children:k(xu,{autoFocus:!1,onClose:()=>b(!1),open:C,width:E==="graphPreview"?"100%":720,className:"overflow-x-hidden",destroyOnClose:!0,children:E==="preview"&&k(ec,{curFileInfo:A,onClose:b,token:e})})})]})})}}var mi={exports:{}};function Ux(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var yi={exports:{}};const Wx={},Kx=Object.freeze(Object.defineProperty({__proto__:null,default:Wx},Symbol.toStringTag,{value:"Module"})),Gx=zc(Kx);var Xx=yi.exports,D0;function Oe(){return D0||(D0=1,(function(t,r){(function(e,n){t.exports=n()})(Xx,function(){var e=e||(function(n,i){var a;if(typeof window<"u"&&window.crypto&&(a=window.crypto),typeof self<"u"&&self.crypto&&(a=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(a=globalThis.crypto),!a&&typeof window<"u"&&window.msCrypto&&(a=window.msCrypto),!a&&typeof Da<"u"&&Da.crypto&&(a=Da.crypto),!a&&typeof Ux=="function")try{a=Gx}catch{}var o=function(){if(a){if(typeof a.getRandomValues=="function")try{return a.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof a.randomBytes=="function")try{return a.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},s=Object.create||(function(){function h(){}return function(C){var b;return h.prototype=C,b=new h,h.prototype=null,b}})(),c={},u=c.lib={},l=u.Base=(function(){return{extend:function(h){var C=s(this);return h&&C.mixIn(h),(!C.hasOwnProperty("init")||this.init===C.init)&&(C.init=function(){C.$super.init.apply(this,arguments)}),C.init.prototype=C,C.$super=this,C},create:function(){var h=this.extend();return h.init.apply(h,arguments),h},init:function(){},mixIn:function(h){for(var C in h)h.hasOwnProperty(C)&&(this[C]=h[C]);h.hasOwnProperty("toString")&&(this.toString=h.toString)},clone:function(){return this.init.prototype.extend(this)}}})(),x=u.WordArray=l.extend({init:function(h,C){h=this.words=h||[],C!=i?this.sigBytes=C:this.sigBytes=h.length*4},toString:function(h){return(h||m).stringify(this)},concat:function(h){var C=this.words,b=h.words,E=this.sigBytes,F=h.sigBytes;if(this.clamp(),E%4)for(var A=0;A<F;A++){var w=b[A>>>2]>>>24-A%4*8&255;C[E+A>>>2]|=w<<24-(E+A)%4*8}else for(var B=0;B<F;B+=4)C[E+B>>>2]=b[B>>>2];return this.sigBytes+=F,this},clamp:function(){var h=this.words,C=this.sigBytes;h[C>>>2]&=4294967295<<32-C%4*8,h.length=n.ceil(C/4)},clone:function(){var h=l.clone.call(this);return h.words=this.words.slice(0),h},random:function(h){for(var C=[],b=0;b<h;b+=4)C.push(o());return new x.init(C,h)}}),f=c.enc={},m=f.Hex={stringify:function(h){for(var C=h.words,b=h.sigBytes,E=[],F=0;F<b;F++){var A=C[F>>>2]>>>24-F%4*8&255;E.push((A>>>4).toString(16)),E.push((A&15).toString(16))}return E.join("")},parse:function(h){for(var C=h.length,b=[],E=0;E<C;E+=2)b[E>>>3]|=parseInt(h.substr(E,2),16)<<24-E%8*4;return new x.init(b,C/2)}},v=f.Latin1={stringify:function(h){for(var C=h.words,b=h.sigBytes,E=[],F=0;F<b;F++){var A=C[F>>>2]>>>24-F%4*8&255;E.push(String.fromCharCode(A))}return E.join("")},parse:function(h){for(var C=h.length,b=[],E=0;E<C;E++)b[E>>>2]|=(h.charCodeAt(E)&255)<<24-E%4*8;return new x.init(b,C)}},p=f.Utf8={stringify:function(h){try{return decodeURIComponent(escape(v.stringify(h)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(h){return v.parse(unescape(encodeURIComponent(h)))}},d=u.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new x.init,this._nDataBytes=0},_append:function(h){typeof h=="string"&&(h=p.parse(h)),this._data.concat(h),this._nDataBytes+=h.sigBytes},_process:function(h){var C,b=this._data,E=b.words,F=b.sigBytes,A=this.blockSize,w=A*4,B=F/w;h?B=n.ceil(B):B=n.max((B|0)-this._minBufferSize,0);var g=B*A,S=n.min(g*4,F);if(g){for(var _=0;_<g;_+=A)this._doProcessBlock(E,_);C=E.splice(0,g),b.sigBytes-=S}return new x.init(C,S)},clone:function(){var h=l.clone.call(this);return h._data=this._data.clone(),h},_minBufferSize:0});u.Hasher=d.extend({cfg:l.extend(),init:function(h){this.cfg=this.cfg.extend(h),this.reset()},reset:function(){d.reset.call(this),this._doReset()},update:function(h){return this._append(h),this._process(),this},finalize:function(h){h&&this._append(h);var C=this._doFinalize();return C},blockSize:16,_createHelper:function(h){return function(C,b){return new h.init(b).finalize(C)}},_createHmacHelper:function(h){return function(C,b){return new y.HMAC.init(h,b).finalize(C)}}});var y=c.algo={};return c})(Math);return e})})(yi)),yi.exports}var Ci={exports:{}},Yx=Ci.exports,_0;function Ea(){return _0||(_0=1,(function(t,r){(function(e,n){t.exports=n(Oe())})(Yx,function(e){return(function(n){var i=e,a=i.lib,o=a.Base,s=a.WordArray,c=i.x64={};c.Word=o.extend({init:function(u,l){this.high=u,this.low=l}}),c.WordArray=o.extend({init:function(u,l){u=this.words=u||[],l!=n?this.sigBytes=l:this.sigBytes=u.length*8},toX32:function(){for(var u=this.words,l=u.length,x=[],f=0;f<l;f++){var m=u[f];x.push(m.high),x.push(m.low)}return s.create(x,this.sigBytes)},clone:function(){for(var u=o.clone.call(this),l=u.words=this.words.slice(0),x=l.length,f=0;f<x;f++)l[f]=l[f].clone();return u}})})(),e})})(Ci)),Ci.exports}var bi={exports:{}},Qx=bi.exports,k0;function Zx(){return k0||(k0=1,(function(t,r){(function(e,n){t.exports=n(Oe())})(Qx,function(e){return(function(){if(typeof ArrayBuffer=="function"){var n=e,i=n.lib,a=i.WordArray,o=a.init,s=a.init=function(c){if(c instanceof ArrayBuffer&&(c=new Uint8Array(c)),(c instanceof Int8Array||typeof Uint8ClampedArray<"u"&&c instanceof Uint8ClampedArray||c instanceof Int16Array||c instanceof Uint16Array||c instanceof Int32Array||c instanceof Uint32Array||c instanceof Float32Array||c instanceof Float64Array)&&(c=new Uint8Array(c.buffer,c.byteOffset,c.byteLength)),c instanceof Uint8Array){for(var u=c.byteLength,l=[],x=0;x<u;x++)l[x>>>2]|=c[x]<<24-x%4*8;o.call(this,l,u)}else o.apply(this,arguments)};s.prototype=a}})(),e.lib.WordArray})})(bi)),bi.exports}var Ei={exports:{}},Jx=Ei.exports,R0;function eg(){return R0||(R0=1,(function(t,r){(function(e,n){t.exports=n(Oe())})(Jx,function(e){return(function(){var n=e,i=n.lib,a=i.WordArray,o=n.enc;o.Utf16=o.Utf16BE={stringify:function(c){for(var u=c.words,l=c.sigBytes,x=[],f=0;f<l;f+=2){var m=u[f>>>2]>>>16-f%4*8&65535;x.push(String.fromCharCode(m))}return x.join("")},parse:function(c){for(var u=c.length,l=[],x=0;x<u;x++)l[x>>>1]|=c.charCodeAt(x)<<16-x%2*16;return a.create(l,u*2)}},o.Utf16LE={stringify:function(c){for(var u=c.words,l=c.sigBytes,x=[],f=0;f<l;f+=2){var m=s(u[f>>>2]>>>16-f%4*8&65535);x.push(String.fromCharCode(m))}return x.join("")},parse:function(c){for(var u=c.length,l=[],x=0;x<u;x++)l[x>>>1]|=s(c.charCodeAt(x)<<16-x%2*16);return a.create(l,u*2)}};function s(c){return c<<8&4278255360|c>>>8&16711935}})(),e.enc.Utf16})})(Ei)),Ei.exports}var Fi={exports:{}},tg=Fi.exports,T0;function Qr(){return T0||(T0=1,(function(t,r){(function(e,n){t.exports=n(Oe())})(tg,function(e){return(function(){var n=e,i=n.lib,a=i.WordArray,o=n.enc;o.Base64={stringify:function(c){var u=c.words,l=c.sigBytes,x=this._map;c.clamp();for(var f=[],m=0;m<l;m+=3)for(var v=u[m>>>2]>>>24-m%4*8&255,p=u[m+1>>>2]>>>24-(m+1)%4*8&255,d=u[m+2>>>2]>>>24-(m+2)%4*8&255,y=v<<16|p<<8|d,h=0;h<4&&m+h*.75<l;h++)f.push(x.charAt(y>>>6*(3-h)&63));var C=x.charAt(64);if(C)for(;f.length%4;)f.push(C);return f.join("")},parse:function(c){var u=c.length,l=this._map,x=this._reverseMap;if(!x){x=this._reverseMap=[];for(var f=0;f<l.length;f++)x[l.charCodeAt(f)]=f}var m=l.charAt(64);if(m){var v=c.indexOf(m);v!==-1&&(u=v)}return s(c,u,x)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function s(c,u,l){for(var x=[],f=0,m=0;m<u;m++)if(m%4){var v=l[c.charCodeAt(m-1)]<<m%4*2,p=l[c.charCodeAt(m)]>>>6-m%4*2,d=v|p;x[f>>>2]|=d<<24-f%4*8,f++}return a.create(x,f)}})(),e.enc.Base64})})(Fi)),Fi.exports}var wi={exports:{}},rg=wi.exports,I0;function ng(){return I0||(I0=1,(function(t,r){(function(e,n){t.exports=n(Oe())})(rg,function(e){return(function(){var n=e,i=n.lib,a=i.WordArray,o=n.enc;o.Base64url={stringify:function(c,u){u===void 0&&(u=!0);var l=c.words,x=c.sigBytes,f=u?this._safe_map:this._map;c.clamp();for(var m=[],v=0;v<x;v+=3)for(var p=l[v>>>2]>>>24-v%4*8&255,d=l[v+1>>>2]>>>24-(v+1)%4*8&255,y=l[v+2>>>2]>>>24-(v+2)%4*8&255,h=p<<16|d<<8|y,C=0;C<4&&v+C*.75<x;C++)m.push(f.charAt(h>>>6*(3-C)&63));var b=f.charAt(64);if(b)for(;m.length%4;)m.push(b);return m.join("")},parse:function(c,u){u===void 0&&(u=!0);var l=c.length,x=u?this._safe_map:this._map,f=this._reverseMap;if(!f){f=this._reverseMap=[];for(var m=0;m<x.length;m++)f[x.charCodeAt(m)]=m}var v=x.charAt(64);if(v){var p=c.indexOf(v);p!==-1&&(l=p)}return s(c,l,f)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function s(c,u,l){for(var x=[],f=0,m=0;m<u;m++)if(m%4){var v=l[c.charCodeAt(m-1)]<<m%4*2,p=l[c.charCodeAt(m)]>>>6-m%4*2,d=v|p;x[f>>>2]|=d<<24-f%4*8,f++}return a.create(x,f)}})(),e.enc.Base64url})})(wi)),wi.exports}var Ai={exports:{}},ig=Ai.exports,P0;function Zr(){return P0||(P0=1,(function(t,r){(function(e,n){t.exports=n(Oe())})(ig,function(e){return(function(n){var i=e,a=i.lib,o=a.WordArray,s=a.Hasher,c=i.algo,u=[];(function(){for(var p=0;p<64;p++)u[p]=n.abs(n.sin(p+1))*4294967296|0})();var l=c.MD5=s.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(p,d){for(var y=0;y<16;y++){var h=d+y,C=p[h];p[h]=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360}var b=this._hash.words,E=p[d+0],F=p[d+1],A=p[d+2],w=p[d+3],B=p[d+4],g=p[d+5],S=p[d+6],_=p[d+7],R=p[d+8],P=p[d+9],z=p[d+10],$=p[d+11],j=p[d+12],q=p[d+13],Y=p[d+14],U=p[d+15],M=b[0],N=b[1],O=b[2],I=b[3];M=x(M,N,O,I,E,7,u[0]),I=x(I,M,N,O,F,12,u[1]),O=x(O,I,M,N,A,17,u[2]),N=x(N,O,I,M,w,22,u[3]),M=x(M,N,O,I,B,7,u[4]),I=x(I,M,N,O,g,12,u[5]),O=x(O,I,M,N,S,17,u[6]),N=x(N,O,I,M,_,22,u[7]),M=x(M,N,O,I,R,7,u[8]),I=x(I,M,N,O,P,12,u[9]),O=x(O,I,M,N,z,17,u[10]),N=x(N,O,I,M,$,22,u[11]),M=x(M,N,O,I,j,7,u[12]),I=x(I,M,N,O,q,12,u[13]),O=x(O,I,M,N,Y,17,u[14]),N=x(N,O,I,M,U,22,u[15]),M=f(M,N,O,I,F,5,u[16]),I=f(I,M,N,O,S,9,u[17]),O=f(O,I,M,N,$,14,u[18]),N=f(N,O,I,M,E,20,u[19]),M=f(M,N,O,I,g,5,u[20]),I=f(I,M,N,O,z,9,u[21]),O=f(O,I,M,N,U,14,u[22]),N=f(N,O,I,M,B,20,u[23]),M=f(M,N,O,I,P,5,u[24]),I=f(I,M,N,O,Y,9,u[25]),O=f(O,I,M,N,w,14,u[26]),N=f(N,O,I,M,R,20,u[27]),M=f(M,N,O,I,q,5,u[28]),I=f(I,M,N,O,A,9,u[29]),O=f(O,I,M,N,_,14,u[30]),N=f(N,O,I,M,j,20,u[31]),M=m(M,N,O,I,g,4,u[32]),I=m(I,M,N,O,R,11,u[33]),O=m(O,I,M,N,$,16,u[34]),N=m(N,O,I,M,Y,23,u[35]),M=m(M,N,O,I,F,4,u[36]),I=m(I,M,N,O,B,11,u[37]),O=m(O,I,M,N,_,16,u[38]),N=m(N,O,I,M,z,23,u[39]),M=m(M,N,O,I,q,4,u[40]),I=m(I,M,N,O,E,11,u[41]),O=m(O,I,M,N,w,16,u[42]),N=m(N,O,I,M,S,23,u[43]),M=m(M,N,O,I,P,4,u[44]),I=m(I,M,N,O,j,11,u[45]),O=m(O,I,M,N,U,16,u[46]),N=m(N,O,I,M,A,23,u[47]),M=v(M,N,O,I,E,6,u[48]),I=v(I,M,N,O,_,10,u[49]),O=v(O,I,M,N,Y,15,u[50]),N=v(N,O,I,M,g,21,u[51]),M=v(M,N,O,I,j,6,u[52]),I=v(I,M,N,O,w,10,u[53]),O=v(O,I,M,N,z,15,u[54]),N=v(N,O,I,M,F,21,u[55]),M=v(M,N,O,I,R,6,u[56]),I=v(I,M,N,O,U,10,u[57]),O=v(O,I,M,N,S,15,u[58]),N=v(N,O,I,M,q,21,u[59]),M=v(M,N,O,I,B,6,u[60]),I=v(I,M,N,O,$,10,u[61]),O=v(O,I,M,N,A,15,u[62]),N=v(N,O,I,M,P,21,u[63]),b[0]=b[0]+M|0,b[1]=b[1]+N|0,b[2]=b[2]+O|0,b[3]=b[3]+I|0},_doFinalize:function(){var p=this._data,d=p.words,y=this._nDataBytes*8,h=p.sigBytes*8;d[h>>>5]|=128<<24-h%32;var C=n.floor(y/4294967296),b=y;d[(h+64>>>9<<4)+15]=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360,d[(h+64>>>9<<4)+14]=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360,p.sigBytes=(d.length+1)*4,this._process();for(var E=this._hash,F=E.words,A=0;A<4;A++){var w=F[A];F[A]=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360}return E},clone:function(){var p=s.clone.call(this);return p._hash=this._hash.clone(),p}});function x(p,d,y,h,C,b,E){var F=p+(d&y|~d&h)+C+E;return(F<<b|F>>>32-b)+d}function f(p,d,y,h,C,b,E){var F=p+(d&h|y&~h)+C+E;return(F<<b|F>>>32-b)+d}function m(p,d,y,h,C,b,E){var F=p+(d^y^h)+C+E;return(F<<b|F>>>32-b)+d}function v(p,d,y,h,C,b,E){var F=p+(y^(d|~h))+C+E;return(F<<b|F>>>32-b)+d}i.MD5=s._createHelper(l),i.HmacMD5=s._createHmacHelper(l)})(Math),e.MD5})})(Ai)),Ai.exports}var Bi={exports:{}},ag=Bi.exports,N0;function rc(){return N0||(N0=1,(function(t,r){(function(e,n){t.exports=n(Oe())})(ag,function(e){return(function(){var n=e,i=n.lib,a=i.WordArray,o=i.Hasher,s=n.algo,c=[],u=s.SHA1=o.extend({_doReset:function(){this._hash=new a.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(l,x){for(var f=this._hash.words,m=f[0],v=f[1],p=f[2],d=f[3],y=f[4],h=0;h<80;h++){if(h<16)c[h]=l[x+h]|0;else{var C=c[h-3]^c[h-8]^c[h-14]^c[h-16];c[h]=C<<1|C>>>31}var b=(m<<5|m>>>27)+y+c[h];h<20?b+=(v&p|~v&d)+1518500249:h<40?b+=(v^p^d)+1859775393:h<60?b+=(v&p|v&d|p&d)-1894007588:b+=(v^p^d)-899497514,y=d,d=p,p=v<<30|v>>>2,v=m,m=b}f[0]=f[0]+m|0,f[1]=f[1]+v|0,f[2]=f[2]+p|0,f[3]=f[3]+d|0,f[4]=f[4]+y|0},_doFinalize:function(){var l=this._data,x=l.words,f=this._nDataBytes*8,m=l.sigBytes*8;return x[m>>>5]|=128<<24-m%32,x[(m+64>>>9<<4)+14]=Math.floor(f/4294967296),x[(m+64>>>9<<4)+15]=f,l.sigBytes=x.length*4,this._process(),this._hash},clone:function(){var l=o.clone.call(this);return l._hash=this._hash.clone(),l}});n.SHA1=o._createHelper(u),n.HmacSHA1=o._createHmacHelper(u)})(),e.SHA1})})(Bi)),Bi.exports}var Si={exports:{}},og=Si.exports,O0;function rs(){return O0||(O0=1,(function(t,r){(function(e,n){t.exports=n(Oe())})(og,function(e){return(function(n){var i=e,a=i.lib,o=a.WordArray,s=a.Hasher,c=i.algo,u=[],l=[];(function(){function m(y){for(var h=n.sqrt(y),C=2;C<=h;C++)if(!(y%C))return!1;return!0}function v(y){return(y-(y|0))*4294967296|0}for(var p=2,d=0;d<64;)m(p)&&(d<8&&(u[d]=v(n.pow(p,1/2))),l[d]=v(n.pow(p,1/3)),d++),p++})();var x=[],f=c.SHA256=s.extend({_doReset:function(){this._hash=new o.init(u.slice(0))},_doProcessBlock:function(m,v){for(var p=this._hash.words,d=p[0],y=p[1],h=p[2],C=p[3],b=p[4],E=p[5],F=p[6],A=p[7],w=0;w<64;w++){if(w<16)x[w]=m[v+w]|0;else{var B=x[w-15],g=(B<<25|B>>>7)^(B<<14|B>>>18)^B>>>3,S=x[w-2],_=(S<<15|S>>>17)^(S<<13|S>>>19)^S>>>10;x[w]=g+x[w-7]+_+x[w-16]}var R=b&E^~b&F,P=d&y^d&h^y&h,z=(d<<30|d>>>2)^(d<<19|d>>>13)^(d<<10|d>>>22),$=(b<<26|b>>>6)^(b<<21|b>>>11)^(b<<7|b>>>25),j=A+$+R+l[w]+x[w],q=z+P;A=F,F=E,E=b,b=C+j|0,C=h,h=y,y=d,d=j+q|0}p[0]=p[0]+d|0,p[1]=p[1]+y|0,p[2]=p[2]+h|0,p[3]=p[3]+C|0,p[4]=p[4]+b|0,p[5]=p[5]+E|0,p[6]=p[6]+F|0,p[7]=p[7]+A|0},_doFinalize:function(){var m=this._data,v=m.words,p=this._nDataBytes*8,d=m.sigBytes*8;return v[d>>>5]|=128<<24-d%32,v[(d+64>>>9<<4)+14]=n.floor(p/4294967296),v[(d+64>>>9<<4)+15]=p,m.sigBytes=v.length*4,this._process(),this._hash},clone:function(){var m=s.clone.call(this);return m._hash=this._hash.clone(),m}});i.SHA256=s._createHelper(f),i.HmacSHA256=s._createHmacHelper(f)})(Math),e.SHA256})})(Si)),Si.exports}var Di={exports:{}},sg=Di.exports,M0;function ug(){return M0||(M0=1,(function(t,r){(function(e,n,i){t.exports=n(Oe(),rs())})(sg,function(e){return(function(){var n=e,i=n.lib,a=i.WordArray,o=n.algo,s=o.SHA256,c=o.SHA224=s.extend({_doReset:function(){this._hash=new a.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var u=s._doFinalize.call(this);return u.sigBytes-=4,u}});n.SHA224=s._createHelper(c),n.HmacSHA224=s._createHmacHelper(c)})(),e.SHA224})})(Di)),Di.exports}var _i={exports:{}},lg=_i.exports,L0;function nc(){return L0||(L0=1,(function(t,r){(function(e,n,i){t.exports=n(Oe(),Ea())})(lg,function(e){return(function(){var n=e,i=n.lib,a=i.Hasher,o=n.x64,s=o.Word,c=o.WordArray,u=n.algo;function l(){return s.create.apply(s,arguments)}var x=[l(1116352408,3609767458),l(1899447441,602891725),l(3049323471,3964484399),l(3921009573,2173295548),l(961987163,4081628472),l(1508970993,3053834265),l(2453635748,2937671579),l(2870763221,3664609560),l(3624381080,2734883394),l(310598401,1164996542),l(607225278,1323610764),l(1426881987,3590304994),l(1925078388,4068182383),l(2162078206,991336113),l(2614888103,633803317),l(3248222580,3479774868),l(3835390401,2666613458),l(4022224774,944711139),l(264347078,2341262773),l(604807628,2007800933),l(770255983,1495990901),l(1249150122,1856431235),l(1555081692,3175218132),l(1996064986,2198950837),l(2554220882,3999719339),l(2821834349,766784016),l(2952996808,2566594879),l(3210313671,3203337956),l(3336571891,1034457026),l(3584528711,2466948901),l(113926993,3758326383),l(338241895,168717936),l(666307205,1188179964),l(773529912,1546045734),l(1294757372,1522805485),l(1396182291,2643833823),l(1695183700,2343527390),l(1986661051,1014477480),l(2177026350,1206759142),l(2456956037,344077627),l(2730485921,1290863460),l(2820302411,3158454273),l(3259730800,3505952657),l(3345764771,106217008),l(3516065817,3606008344),l(3600352804,1432725776),l(4094571909,1467031594),l(275423344,851169720),l(430227734,3100823752),l(506948616,1363258195),l(659060556,3750685593),l(883997877,3785050280),l(958139571,3318307427),l(1322822218,3812723403),l(1537002063,2003034995),l(1747873779,3602036899),l(1955562222,1575990012),l(2024104815,1125592928),l(2227730452,2716904306),l(2361852424,442776044),l(2428436474,593698344),l(2756734187,3733110249),l(3204031479,2999351573),l(3329325298,3815920427),l(3391569614,3928383900),l(3515267271,566280711),l(3940187606,3454069534),l(4118630271,4000239992),l(116418474,1914138554),l(174292421,2731055270),l(289380356,3203993006),l(460393269,320620315),l(685471733,587496836),l(852142971,1086792851),l(1017036298,365543100),l(1126000580,2618297676),l(1288033470,3409855158),l(1501505948,4234509866),l(1607167915,987167468),l(1816402316,1246189591)],f=[];(function(){for(var v=0;v<80;v++)f[v]=l()})();var m=u.SHA512=a.extend({_doReset:function(){this._hash=new c.init([new s.init(1779033703,4089235720),new s.init(3144134277,2227873595),new s.init(1013904242,4271175723),new s.init(2773480762,1595750129),new s.init(1359893119,2917565137),new s.init(2600822924,725511199),new s.init(528734635,4215389547),new s.init(1541459225,327033209)])},_doProcessBlock:function(v,p){for(var d=this._hash.words,y=d[0],h=d[1],C=d[2],b=d[3],E=d[4],F=d[5],A=d[6],w=d[7],B=y.high,g=y.low,S=h.high,_=h.low,R=C.high,P=C.low,z=b.high,$=b.low,j=E.high,q=E.low,Y=F.high,U=F.low,M=A.high,N=A.low,O=w.high,I=w.low,V=B,X=g,ee=S,re=_,ie=R,se=P,De=z,Q=$,G=j,ae=q,le=Y,Z=U,fe=M,Be=N,Re=O,je=I,Ce=0;Ce<80;Ce++){var be,Ne,Ee=f[Ce];if(Ce<16)Ne=Ee.high=v[p+Ce*2]|0,be=Ee.low=v[p+Ce*2+1]|0;else{var Ke=f[Ce-15],ne=Ke.high,we=Ke.low,ot=(ne>>>1|we<<31)^(ne>>>8|we<<24)^ne>>>7,Bt=(we>>>1|ne<<31)^(we>>>8|ne<<24)^(we>>>7|ne<<25),St=f[Ce-2],$t=St.high,qe=St.low,zt=($t>>>19|qe<<13)^($t<<3|qe>>>29)^$t>>>6,cr=(qe>>>19|$t<<13)^(qe<<3|$t>>>29)^(qe>>>6|$t<<26),Dr=f[Ce-7],Dt=Dr.high,wr=Dr.low,dr=f[Ce-16],zr=dr.high,fr=dr.low;be=Bt+wr,Ne=ot+Dt+(be>>>0<Bt>>>0?1:0),be=be+cr,Ne=Ne+zt+(be>>>0<cr>>>0?1:0),be=be+fr,Ne=Ne+zr+(be>>>0<fr>>>0?1:0),Ee.high=Ne,Ee.low=be}var qr=G&le^~G&fe,_r=ae&Z^~ae&Be,Hr=V&ee^V&ie^ee&ie,qt=X&re^X&se^re&se,Ct=(V>>>28|X<<4)^(V<<30|X>>>2)^(V<<25|X>>>7),_t=(X>>>28|V<<4)^(X<<30|V>>>2)^(X<<25|V>>>7),Ht=(G>>>14|ae<<18)^(G>>>18|ae<<14)^(G<<23|ae>>>9),tr=(ae>>>14|G<<18)^(ae>>>18|G<<14)^(ae<<23|G>>>9),Xt=x[Ce],rt=Xt.high,he=Xt.low,it=je+tr,bt=Re+Ht+(it>>>0<je>>>0?1:0),it=it+_r,bt=bt+qr+(it>>>0<_r>>>0?1:0),it=it+he,bt=bt+rt+(it>>>0<he>>>0?1:0),it=it+be,bt=bt+Ne+(it>>>0<be>>>0?1:0),Ae=_t+qt,at=Ct+Hr+(Ae>>>0<_t>>>0?1:0);Re=fe,je=Be,fe=le,Be=Z,le=G,Z=ae,ae=Q+it|0,G=De+bt+(ae>>>0<Q>>>0?1:0)|0,De=ie,Q=se,ie=ee,se=re,ee=V,re=X,X=it+Ae|0,V=bt+at+(X>>>0<it>>>0?1:0)|0}g=y.low=g+X,y.high=B+V+(g>>>0<X>>>0?1:0),_=h.low=_+re,h.high=S+ee+(_>>>0<re>>>0?1:0),P=C.low=P+se,C.high=R+ie+(P>>>0<se>>>0?1:0),$=b.low=$+Q,b.high=z+De+($>>>0<Q>>>0?1:0),q=E.low=q+ae,E.high=j+G+(q>>>0<ae>>>0?1:0),U=F.low=U+Z,F.high=Y+le+(U>>>0<Z>>>0?1:0),N=A.low=N+Be,A.high=M+fe+(N>>>0<Be>>>0?1:0),I=w.low=I+je,w.high=O+Re+(I>>>0<je>>>0?1:0)},_doFinalize:function(){var v=this._data,p=v.words,d=this._nDataBytes*8,y=v.sigBytes*8;p[y>>>5]|=128<<24-y%32,p[(y+128>>>10<<5)+30]=Math.floor(d/4294967296),p[(y+128>>>10<<5)+31]=d,v.sigBytes=p.length*4,this._process();var h=this._hash.toX32();return h},clone:function(){var v=a.clone.call(this);return v._hash=this._hash.clone(),v},blockSize:1024/32});n.SHA512=a._createHelper(m),n.HmacSHA512=a._createHmacHelper(m)})(),e.SHA512})})(_i)),_i.exports}var ki={exports:{}},cg=ki.exports,$0;function dg(){return $0||($0=1,(function(t,r){(function(e,n,i){t.exports=n(Oe(),Ea(),nc())})(cg,function(e){return(function(){var n=e,i=n.x64,a=i.Word,o=i.WordArray,s=n.algo,c=s.SHA512,u=s.SHA384=c.extend({_doReset:function(){this._hash=new o.init([new a.init(3418070365,3238371032),new a.init(1654270250,914150663),new a.init(2438529370,812702999),new a.init(355462360,4144912697),new a.init(1731405415,4290775857),new a.init(2394180231,1750603025),new a.init(3675008525,1694076839),new a.init(1203062813,3204075428)])},_doFinalize:function(){var l=c._doFinalize.call(this);return l.sigBytes-=16,l}});n.SHA384=c._createHelper(u),n.HmacSHA384=c._createHmacHelper(u)})(),e.SHA384})})(ki)),ki.exports}var Ri={exports:{}},fg=Ri.exports,z0;function pg(){return z0||(z0=1,(function(t,r){(function(e,n,i){t.exports=n(Oe(),Ea())})(fg,function(e){return(function(n){var i=e,a=i.lib,o=a.WordArray,s=a.Hasher,c=i.x64,u=c.Word,l=i.algo,x=[],f=[],m=[];(function(){for(var d=1,y=0,h=0;h<24;h++){x[d+5*y]=(h+1)*(h+2)/2%64;var C=y%5,b=(2*d+3*y)%5;d=C,y=b}for(var d=0;d<5;d++)for(var y=0;y<5;y++)f[d+5*y]=y+(2*d+3*y)%5*5;for(var E=1,F=0;F<24;F++){for(var A=0,w=0,B=0;B<7;B++){if(E&1){var g=(1<<B)-1;g<32?w^=1<<g:A^=1<<g-32}E&128?E=E<<1^113:E<<=1}m[F]=u.create(A,w)}})();var v=[];(function(){for(var d=0;d<25;d++)v[d]=u.create()})();var p=l.SHA3=s.extend({cfg:s.cfg.extend({outputLength:512}),_doReset:function(){for(var d=this._state=[],y=0;y<25;y++)d[y]=new u.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(d,y){for(var h=this._state,C=this.blockSize/2,b=0;b<C;b++){var E=d[y+2*b],F=d[y+2*b+1];E=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360,F=(F<<8|F>>>24)&16711935|(F<<24|F>>>8)&4278255360;var A=h[b];A.high^=F,A.low^=E}for(var w=0;w<24;w++){for(var B=0;B<5;B++){for(var g=0,S=0,_=0;_<5;_++){var A=h[B+5*_];g^=A.high,S^=A.low}var R=v[B];R.high=g,R.low=S}for(var B=0;B<5;B++)for(var P=v[(B+4)%5],z=v[(B+1)%5],$=z.high,j=z.low,g=P.high^($<<1|j>>>31),S=P.low^(j<<1|$>>>31),_=0;_<5;_++){var A=h[B+5*_];A.high^=g,A.low^=S}for(var q=1;q<25;q++){var g,S,A=h[q],Y=A.high,U=A.low,M=x[q];M<32?(g=Y<<M|U>>>32-M,S=U<<M|Y>>>32-M):(g=U<<M-32|Y>>>64-M,S=Y<<M-32|U>>>64-M);var N=v[f[q]];N.high=g,N.low=S}var O=v[0],I=h[0];O.high=I.high,O.low=I.low;for(var B=0;B<5;B++)for(var _=0;_<5;_++){var q=B+5*_,A=h[q],V=v[q],X=v[(B+1)%5+5*_],ee=v[(B+2)%5+5*_];A.high=V.high^~X.high&ee.high,A.low=V.low^~X.low&ee.low}var A=h[0],re=m[w];A.high^=re.high,A.low^=re.low}},_doFinalize:function(){var d=this._data,y=d.words;this._nDataBytes*8;var h=d.sigBytes*8,C=this.blockSize*32;y[h>>>5]|=1<<24-h%32,y[(n.ceil((h+1)/C)*C>>>5)-1]|=128,d.sigBytes=y.length*4,this._process();for(var b=this._state,E=this.cfg.outputLength/8,F=E/8,A=[],w=0;w<F;w++){var B=b[w],g=B.high,S=B.low;g=(g<<8|g>>>24)&16711935|(g<<24|g>>>8)&4278255360,S=(S<<8|S>>>24)&16711935|(S<<24|S>>>8)&4278255360,A.push(S),A.push(g)}return new o.init(A,E)},clone:function(){for(var d=s.clone.call(this),y=d._state=this._state.slice(0),h=0;h<25;h++)y[h]=y[h].clone();return d}});i.SHA3=s._createHelper(p),i.HmacSHA3=s._createHmacHelper(p)})(Math),e.SHA3})})(Ri)),Ri.exports}var Ti={exports:{}},hg=Ti.exports,q0;function vg(){return q0||(q0=1,(function(t,r){(function(e,n){t.exports=n(Oe())})(hg,function(e){/** @preserve
262
+ (c) 2012 by Cédric Mesnil. All rights reserved.
263
+
264
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
265
+
266
+ - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
267
+ - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
268
+
269
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
270
+ */return(function(n){var i=e,a=i.lib,o=a.WordArray,s=a.Hasher,c=i.algo,u=o.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),l=o.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),x=o.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),f=o.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),m=o.create([0,1518500249,1859775393,2400959708,2840853838]),v=o.create([1352829926,1548603684,1836072691,2053994217,0]),p=c.RIPEMD160=s.extend({_doReset:function(){this._hash=o.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(F,A){for(var w=0;w<16;w++){var B=A+w,g=F[B];F[B]=(g<<8|g>>>24)&16711935|(g<<24|g>>>8)&4278255360}var S=this._hash.words,_=m.words,R=v.words,P=u.words,z=l.words,$=x.words,j=f.words,q,Y,U,M,N,O,I,V,X,ee;O=q=S[0],I=Y=S[1],V=U=S[2],X=M=S[3],ee=N=S[4];for(var re,w=0;w<80;w+=1)re=q+F[A+P[w]]|0,w<16?re+=d(Y,U,M)+_[0]:w<32?re+=y(Y,U,M)+_[1]:w<48?re+=h(Y,U,M)+_[2]:w<64?re+=C(Y,U,M)+_[3]:re+=b(Y,U,M)+_[4],re=re|0,re=E(re,$[w]),re=re+N|0,q=N,N=M,M=E(U,10),U=Y,Y=re,re=O+F[A+z[w]]|0,w<16?re+=b(I,V,X)+R[0]:w<32?re+=C(I,V,X)+R[1]:w<48?re+=h(I,V,X)+R[2]:w<64?re+=y(I,V,X)+R[3]:re+=d(I,V,X)+R[4],re=re|0,re=E(re,j[w]),re=re+ee|0,O=ee,ee=X,X=E(V,10),V=I,I=re;re=S[1]+U+X|0,S[1]=S[2]+M+ee|0,S[2]=S[3]+N+O|0,S[3]=S[4]+q+I|0,S[4]=S[0]+Y+V|0,S[0]=re},_doFinalize:function(){var F=this._data,A=F.words,w=this._nDataBytes*8,B=F.sigBytes*8;A[B>>>5]|=128<<24-B%32,A[(B+64>>>9<<4)+14]=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360,F.sigBytes=(A.length+1)*4,this._process();for(var g=this._hash,S=g.words,_=0;_<5;_++){var R=S[_];S[_]=(R<<8|R>>>24)&16711935|(R<<24|R>>>8)&4278255360}return g},clone:function(){var F=s.clone.call(this);return F._hash=this._hash.clone(),F}});function d(F,A,w){return F^A^w}function y(F,A,w){return F&A|~F&w}function h(F,A,w){return(F|~A)^w}function C(F,A,w){return F&w|A&~w}function b(F,A,w){return F^(A|~w)}function E(F,A){return F<<A|F>>>32-A}i.RIPEMD160=s._createHelper(p),i.HmacRIPEMD160=s._createHmacHelper(p)})(),e.RIPEMD160})})(Ti)),Ti.exports}var Ii={exports:{}},xg=Ii.exports,H0;function ns(){return H0||(H0=1,(function(t,r){(function(e,n){t.exports=n(Oe())})(xg,function(e){(function(){var n=e,i=n.lib,a=i.Base,o=n.enc,s=o.Utf8,c=n.algo;c.HMAC=a.extend({init:function(u,l){u=this._hasher=new u.init,typeof l=="string"&&(l=s.parse(l));var x=u.blockSize,f=x*4;l.sigBytes>f&&(l=u.finalize(l)),l.clamp();for(var m=this._oKey=l.clone(),v=this._iKey=l.clone(),p=m.words,d=v.words,y=0;y<x;y++)p[y]^=1549556828,d[y]^=909522486;m.sigBytes=v.sigBytes=f,this.reset()},reset:function(){var u=this._hasher;u.reset(),u.update(this._iKey)},update:function(u){return this._hasher.update(u),this},finalize:function(u){var l=this._hasher,x=l.finalize(u);l.reset();var f=l.finalize(this._oKey.clone().concat(x));return f}})})()})})(Ii)),Ii.exports}var Pi={exports:{}},gg=Pi.exports,V0;function mg(){return V0||(V0=1,(function(t,r){(function(e,n,i){t.exports=n(Oe(),rs(),ns())})(gg,function(e){return(function(){var n=e,i=n.lib,a=i.Base,o=i.WordArray,s=n.algo,c=s.SHA256,u=s.HMAC,l=s.PBKDF2=a.extend({cfg:a.extend({keySize:128/32,hasher:c,iterations:25e4}),init:function(x){this.cfg=this.cfg.extend(x)},compute:function(x,f){for(var m=this.cfg,v=u.create(m.hasher,x),p=o.create(),d=o.create([1]),y=p.words,h=d.words,C=m.keySize,b=m.iterations;y.length<C;){var E=v.update(f).finalize(d);v.reset();for(var F=E.words,A=F.length,w=E,B=1;B<b;B++){w=v.finalize(w),v.reset();for(var g=w.words,S=0;S<A;S++)F[S]^=g[S]}p.concat(E),h[0]++}return p.sigBytes=C*4,p}});n.PBKDF2=function(x,f,m){return l.create(m).compute(x,f)}})(),e.PBKDF2})})(Pi)),Pi.exports}var Ni={exports:{}},yg=Ni.exports,j0;function $r(){return j0||(j0=1,(function(t,r){(function(e,n,i){t.exports=n(Oe(),rc(),ns())})(yg,function(e){return(function(){var n=e,i=n.lib,a=i.Base,o=i.WordArray,s=n.algo,c=s.MD5,u=s.EvpKDF=a.extend({cfg:a.extend({keySize:128/32,hasher:c,iterations:1}),init:function(l){this.cfg=this.cfg.extend(l)},compute:function(l,x){for(var f,m=this.cfg,v=m.hasher.create(),p=o.create(),d=p.words,y=m.keySize,h=m.iterations;d.length<y;){f&&v.update(f),f=v.update(l).finalize(x),v.reset();for(var C=1;C<h;C++)f=v.finalize(f),v.reset();p.concat(f)}return p.sigBytes=y*4,p}});n.EvpKDF=function(l,x,f){return u.create(f).compute(l,x)}})(),e.EvpKDF})})(Ni)),Ni.exports}var Oi={exports:{}},Cg=Oi.exports,U0;function yt(){return U0||(U0=1,(function(t,r){(function(e,n,i){t.exports=n(Oe(),$r())})(Cg,function(e){e.lib.Cipher||(function(n){var i=e,a=i.lib,o=a.Base,s=a.WordArray,c=a.BufferedBlockAlgorithm,u=i.enc;u.Utf8;var l=u.Base64,x=i.algo,f=x.EvpKDF,m=a.Cipher=c.extend({cfg:o.extend(),createEncryptor:function(g,S){return this.create(this._ENC_XFORM_MODE,g,S)},createDecryptor:function(g,S){return this.create(this._DEC_XFORM_MODE,g,S)},init:function(g,S,_){this.cfg=this.cfg.extend(_),this._xformMode=g,this._key=S,this.reset()},reset:function(){c.reset.call(this),this._doReset()},process:function(g){return this._append(g),this._process()},finalize:function(g){g&&this._append(g);var S=this._doFinalize();return S},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:(function(){function g(S){return typeof S=="string"?B:F}return function(S){return{encrypt:function(_,R,P){return g(R).encrypt(S,_,R,P)},decrypt:function(_,R,P){return g(R).decrypt(S,_,R,P)}}}})()});a.StreamCipher=m.extend({_doFinalize:function(){var g=this._process(!0);return g},blockSize:1});var v=i.mode={},p=a.BlockCipherMode=o.extend({createEncryptor:function(g,S){return this.Encryptor.create(g,S)},createDecryptor:function(g,S){return this.Decryptor.create(g,S)},init:function(g,S){this._cipher=g,this._iv=S}}),d=v.CBC=(function(){var g=p.extend();g.Encryptor=g.extend({processBlock:function(_,R){var P=this._cipher,z=P.blockSize;S.call(this,_,R,z),P.encryptBlock(_,R),this._prevBlock=_.slice(R,R+z)}}),g.Decryptor=g.extend({processBlock:function(_,R){var P=this._cipher,z=P.blockSize,$=_.slice(R,R+z);P.decryptBlock(_,R),S.call(this,_,R,z),this._prevBlock=$}});function S(_,R,P){var z,$=this._iv;$?(z=$,this._iv=n):z=this._prevBlock;for(var j=0;j<P;j++)_[R+j]^=z[j]}return g})(),y=i.pad={},h=y.Pkcs7={pad:function(g,S){for(var _=S*4,R=_-g.sigBytes%_,P=R<<24|R<<16|R<<8|R,z=[],$=0;$<R;$+=4)z.push(P);var j=s.create(z,R);g.concat(j)},unpad:function(g){var S=g.words[g.sigBytes-1>>>2]&255;g.sigBytes-=S}};a.BlockCipher=m.extend({cfg:m.cfg.extend({mode:d,padding:h}),reset:function(){var g;m.reset.call(this);var S=this.cfg,_=S.iv,R=S.mode;this._xformMode==this._ENC_XFORM_MODE?g=R.createEncryptor:(g=R.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==g?this._mode.init(this,_&&_.words):(this._mode=g.call(R,this,_&&_.words),this._mode.__creator=g)},_doProcessBlock:function(g,S){this._mode.processBlock(g,S)},_doFinalize:function(){var g,S=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(S.pad(this._data,this.blockSize),g=this._process(!0)):(g=this._process(!0),S.unpad(g)),g},blockSize:128/32});var C=a.CipherParams=o.extend({init:function(g){this.mixIn(g)},toString:function(g){return(g||this.formatter).stringify(this)}}),b=i.format={},E=b.OpenSSL={stringify:function(g){var S,_=g.ciphertext,R=g.salt;return R?S=s.create([1398893684,1701076831]).concat(R).concat(_):S=_,S.toString(l)},parse:function(g){var S,_=l.parse(g),R=_.words;return R[0]==1398893684&&R[1]==1701076831&&(S=s.create(R.slice(2,4)),R.splice(0,4),_.sigBytes-=16),C.create({ciphertext:_,salt:S})}},F=a.SerializableCipher=o.extend({cfg:o.extend({format:E}),encrypt:function(g,S,_,R){R=this.cfg.extend(R);var P=g.createEncryptor(_,R),z=P.finalize(S),$=P.cfg;return C.create({ciphertext:z,key:_,iv:$.iv,algorithm:g,mode:$.mode,padding:$.padding,blockSize:g.blockSize,formatter:R.format})},decrypt:function(g,S,_,R){R=this.cfg.extend(R),S=this._parse(S,R.format);var P=g.createDecryptor(_,R).finalize(S.ciphertext);return P},_parse:function(g,S){return typeof g=="string"?S.parse(g,this):g}}),A=i.kdf={},w=A.OpenSSL={execute:function(g,S,_,R,P){if(R||(R=s.random(64/8)),P)var z=f.create({keySize:S+_,hasher:P}).compute(g,R);else var z=f.create({keySize:S+_}).compute(g,R);var $=s.create(z.words.slice(S),_*4);return z.sigBytes=S*4,C.create({key:z,iv:$,salt:R})}},B=a.PasswordBasedCipher=F.extend({cfg:F.cfg.extend({kdf:w}),encrypt:function(g,S,_,R){R=this.cfg.extend(R);var P=R.kdf.execute(_,g.keySize,g.ivSize,R.salt,R.hasher);R.iv=P.iv;var z=F.encrypt.call(this,g,S,P.key,R);return z.mixIn(P),z},decrypt:function(g,S,_,R){R=this.cfg.extend(R),S=this._parse(S,R.format);var P=R.kdf.execute(_,g.keySize,g.ivSize,S.salt,R.hasher);R.iv=P.iv;var z=F.decrypt.call(this,g,S,P.key,R);return z}})})()})})(Oi)),Oi.exports}var Mi={exports:{}},bg=Mi.exports,W0;function Eg(){return W0||(W0=1,(function(t,r){(function(e,n,i){t.exports=n(Oe(),yt())})(bg,function(e){return e.mode.CFB=(function(){var n=e.lib.BlockCipherMode.extend();n.Encryptor=n.extend({processBlock:function(a,o){var s=this._cipher,c=s.blockSize;i.call(this,a,o,c,s),this._prevBlock=a.slice(o,o+c)}}),n.Decryptor=n.extend({processBlock:function(a,o){var s=this._cipher,c=s.blockSize,u=a.slice(o,o+c);i.call(this,a,o,c,s),this._prevBlock=u}});function i(a,o,s,c){var u,l=this._iv;l?(u=l.slice(0),this._iv=void 0):u=this._prevBlock,c.encryptBlock(u,0);for(var x=0;x<s;x++)a[o+x]^=u[x]}return n})(),e.mode.CFB})})(Mi)),Mi.exports}var Li={exports:{}},Fg=Li.exports,K0;function wg(){return K0||(K0=1,(function(t,r){(function(e,n,i){t.exports=n(Oe(),yt())})(Fg,function(e){return e.mode.CTR=(function(){var n=e.lib.BlockCipherMode.extend(),i=n.Encryptor=n.extend({processBlock:function(a,o){var s=this._cipher,c=s.blockSize,u=this._iv,l=this._counter;u&&(l=this._counter=u.slice(0),this._iv=void 0);var x=l.slice(0);s.encryptBlock(x,0),l[c-1]=l[c-1]+1|0;for(var f=0;f<c;f++)a[o+f]^=x[f]}});return n.Decryptor=i,n})(),e.mode.CTR})})(Li)),Li.exports}var $i={exports:{}},Ag=$i.exports,G0;function Bg(){return G0||(G0=1,(function(t,r){(function(e,n,i){t.exports=n(Oe(),yt())})(Ag,function(e){/** @preserve
271
+ * Counter block mode compatible with Dr Brian Gladman fileenc.c
272
+ * derived from CryptoJS.mode.CTR
273
+ * Jan Hruby jhruby.web@gmail.com
274
+ */return e.mode.CTRGladman=(function(){var n=e.lib.BlockCipherMode.extend();function i(s){if((s>>24&255)===255){var c=s>>16&255,u=s>>8&255,l=s&255;c===255?(c=0,u===255?(u=0,l===255?l=0:++l):++u):++c,s=0,s+=c<<16,s+=u<<8,s+=l}else s+=1<<24;return s}function a(s){return(s[0]=i(s[0]))===0&&(s[1]=i(s[1])),s}var o=n.Encryptor=n.extend({processBlock:function(s,c){var u=this._cipher,l=u.blockSize,x=this._iv,f=this._counter;x&&(f=this._counter=x.slice(0),this._iv=void 0),a(f);var m=f.slice(0);u.encryptBlock(m,0);for(var v=0;v<l;v++)s[c+v]^=m[v]}});return n.Decryptor=o,n})(),e.mode.CTRGladman})})($i)),$i.exports}var zi={exports:{}},Sg=zi.exports,X0;function Dg(){return X0||(X0=1,(function(t,r){(function(e,n,i){t.exports=n(Oe(),yt())})(Sg,function(e){return e.mode.OFB=(function(){var n=e.lib.BlockCipherMode.extend(),i=n.Encryptor=n.extend({processBlock:function(a,o){var s=this._cipher,c=s.blockSize,u=this._iv,l=this._keystream;u&&(l=this._keystream=u.slice(0),this._iv=void 0),s.encryptBlock(l,0);for(var x=0;x<c;x++)a[o+x]^=l[x]}});return n.Decryptor=i,n})(),e.mode.OFB})})(zi)),zi.exports}var qi={exports:{}},_g=qi.exports,Y0;function kg(){return Y0||(Y0=1,(function(t,r){(function(e,n,i){t.exports=n(Oe(),yt())})(_g,function(e){return e.mode.ECB=(function(){var n=e.lib.BlockCipherMode.extend();return n.Encryptor=n.extend({processBlock:function(i,a){this._cipher.encryptBlock(i,a)}}),n.Decryptor=n.extend({processBlock:function(i,a){this._cipher.decryptBlock(i,a)}}),n})(),e.mode.ECB})})(qi)),qi.exports}var Hi={exports:{}},Rg=Hi.exports,Q0;function Tg(){return Q0||(Q0=1,(function(t,r){(function(e,n,i){t.exports=n(Oe(),yt())})(Rg,function(e){return e.pad.AnsiX923={pad:function(n,i){var a=n.sigBytes,o=i*4,s=o-a%o,c=a+s-1;n.clamp(),n.words[c>>>2]|=s<<24-c%4*8,n.sigBytes+=s},unpad:function(n){var i=n.words[n.sigBytes-1>>>2]&255;n.sigBytes-=i}},e.pad.Ansix923})})(Hi)),Hi.exports}var Vi={exports:{}},Ig=Vi.exports,Z0;function Pg(){return Z0||(Z0=1,(function(t,r){(function(e,n,i){t.exports=n(Oe(),yt())})(Ig,function(e){return e.pad.Iso10126={pad:function(n,i){var a=i*4,o=a-n.sigBytes%a;n.concat(e.lib.WordArray.random(o-1)).concat(e.lib.WordArray.create([o<<24],1))},unpad:function(n){var i=n.words[n.sigBytes-1>>>2]&255;n.sigBytes-=i}},e.pad.Iso10126})})(Vi)),Vi.exports}var ji={exports:{}},Ng=ji.exports,J0;function Og(){return J0||(J0=1,(function(t,r){(function(e,n,i){t.exports=n(Oe(),yt())})(Ng,function(e){return e.pad.Iso97971={pad:function(n,i){n.concat(e.lib.WordArray.create([2147483648],1)),e.pad.ZeroPadding.pad(n,i)},unpad:function(n){e.pad.ZeroPadding.unpad(n),n.sigBytes--}},e.pad.Iso97971})})(ji)),ji.exports}var Ui={exports:{}},Mg=Ui.exports,eu;function Lg(){return eu||(eu=1,(function(t,r){(function(e,n,i){t.exports=n(Oe(),yt())})(Mg,function(e){return e.pad.ZeroPadding={pad:function(n,i){var a=i*4;n.clamp(),n.sigBytes+=a-(n.sigBytes%a||a)},unpad:function(n){for(var i=n.words,a=n.sigBytes-1,a=n.sigBytes-1;a>=0;a--)if(i[a>>>2]>>>24-a%4*8&255){n.sigBytes=a+1;break}}},e.pad.ZeroPadding})})(Ui)),Ui.exports}var Wi={exports:{}},$g=Wi.exports,tu;function zg(){return tu||(tu=1,(function(t,r){(function(e,n,i){t.exports=n(Oe(),yt())})($g,function(e){return e.pad.NoPadding={pad:function(){},unpad:function(){}},e.pad.NoPadding})})(Wi)),Wi.exports}var Ki={exports:{}},qg=Ki.exports,ru;function Hg(){return ru||(ru=1,(function(t,r){(function(e,n,i){t.exports=n(Oe(),yt())})(qg,function(e){return(function(n){var i=e,a=i.lib,o=a.CipherParams,s=i.enc,c=s.Hex,u=i.format;u.Hex={stringify:function(l){return l.ciphertext.toString(c)},parse:function(l){var x=c.parse(l);return o.create({ciphertext:x})}}})(),e.format.Hex})})(Ki)),Ki.exports}var Gi={exports:{}},Vg=Gi.exports,nu;function jg(){return nu||(nu=1,(function(t,r){(function(e,n,i){t.exports=n(Oe(),Qr(),Zr(),$r(),yt())})(Vg,function(e){return(function(){var n=e,i=n.lib,a=i.BlockCipher,o=n.algo,s=[],c=[],u=[],l=[],x=[],f=[],m=[],v=[],p=[],d=[];(function(){for(var C=[],b=0;b<256;b++)b<128?C[b]=b<<1:C[b]=b<<1^283;for(var E=0,F=0,b=0;b<256;b++){var A=F^F<<1^F<<2^F<<3^F<<4;A=A>>>8^A&255^99,s[E]=A,c[A]=E;var w=C[E],B=C[w],g=C[B],S=C[A]*257^A*16843008;u[E]=S<<24|S>>>8,l[E]=S<<16|S>>>16,x[E]=S<<8|S>>>24,f[E]=S;var S=g*16843009^B*65537^w*257^E*16843008;m[A]=S<<24|S>>>8,v[A]=S<<16|S>>>16,p[A]=S<<8|S>>>24,d[A]=S,E?(E=w^C[C[C[g^w]]],F^=C[C[F]]):E=F=1}})();var y=[0,1,2,4,8,16,32,64,128,27,54],h=o.AES=a.extend({_doReset:function(){var C;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var b=this._keyPriorReset=this._key,E=b.words,F=b.sigBytes/4,A=this._nRounds=F+6,w=(A+1)*4,B=this._keySchedule=[],g=0;g<w;g++)g<F?B[g]=E[g]:(C=B[g-1],g%F?F>6&&g%F==4&&(C=s[C>>>24]<<24|s[C>>>16&255]<<16|s[C>>>8&255]<<8|s[C&255]):(C=C<<8|C>>>24,C=s[C>>>24]<<24|s[C>>>16&255]<<16|s[C>>>8&255]<<8|s[C&255],C^=y[g/F|0]<<24),B[g]=B[g-F]^C);for(var S=this._invKeySchedule=[],_=0;_<w;_++){var g=w-_;if(_%4)var C=B[g];else var C=B[g-4];_<4||g<=4?S[_]=C:S[_]=m[s[C>>>24]]^v[s[C>>>16&255]]^p[s[C>>>8&255]]^d[s[C&255]]}}},encryptBlock:function(C,b){this._doCryptBlock(C,b,this._keySchedule,u,l,x,f,s)},decryptBlock:function(C,b){var E=C[b+1];C[b+1]=C[b+3],C[b+3]=E,this._doCryptBlock(C,b,this._invKeySchedule,m,v,p,d,c);var E=C[b+1];C[b+1]=C[b+3],C[b+3]=E},_doCryptBlock:function(C,b,E,F,A,w,B,g){for(var S=this._nRounds,_=C[b]^E[0],R=C[b+1]^E[1],P=C[b+2]^E[2],z=C[b+3]^E[3],$=4,j=1;j<S;j++){var q=F[_>>>24]^A[R>>>16&255]^w[P>>>8&255]^B[z&255]^E[$++],Y=F[R>>>24]^A[P>>>16&255]^w[z>>>8&255]^B[_&255]^E[$++],U=F[P>>>24]^A[z>>>16&255]^w[_>>>8&255]^B[R&255]^E[$++],M=F[z>>>24]^A[_>>>16&255]^w[R>>>8&255]^B[P&255]^E[$++];_=q,R=Y,P=U,z=M}var q=(g[_>>>24]<<24|g[R>>>16&255]<<16|g[P>>>8&255]<<8|g[z&255])^E[$++],Y=(g[R>>>24]<<24|g[P>>>16&255]<<16|g[z>>>8&255]<<8|g[_&255])^E[$++],U=(g[P>>>24]<<24|g[z>>>16&255]<<16|g[_>>>8&255]<<8|g[R&255])^E[$++],M=(g[z>>>24]<<24|g[_>>>16&255]<<16|g[R>>>8&255]<<8|g[P&255])^E[$++];C[b]=q,C[b+1]=Y,C[b+2]=U,C[b+3]=M},keySize:256/32});n.AES=a._createHelper(h)})(),e.AES})})(Gi)),Gi.exports}var Xi={exports:{}},Ug=Xi.exports,iu;function Wg(){return iu||(iu=1,(function(t,r){(function(e,n,i){t.exports=n(Oe(),Qr(),Zr(),$r(),yt())})(Ug,function(e){return(function(){var n=e,i=n.lib,a=i.WordArray,o=i.BlockCipher,s=n.algo,c=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],u=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],l=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],x=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],f=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],m=s.DES=o.extend({_doReset:function(){for(var y=this._key,h=y.words,C=[],b=0;b<56;b++){var E=c[b]-1;C[b]=h[E>>>5]>>>31-E%32&1}for(var F=this._subKeys=[],A=0;A<16;A++){for(var w=F[A]=[],B=l[A],b=0;b<24;b++)w[b/6|0]|=C[(u[b]-1+B)%28]<<31-b%6,w[4+(b/6|0)]|=C[28+(u[b+24]-1+B)%28]<<31-b%6;w[0]=w[0]<<1|w[0]>>>31;for(var b=1;b<7;b++)w[b]=w[b]>>>(b-1)*4+3;w[7]=w[7]<<5|w[7]>>>27}for(var g=this._invSubKeys=[],b=0;b<16;b++)g[b]=F[15-b]},encryptBlock:function(y,h){this._doCryptBlock(y,h,this._subKeys)},decryptBlock:function(y,h){this._doCryptBlock(y,h,this._invSubKeys)},_doCryptBlock:function(y,h,C){this._lBlock=y[h],this._rBlock=y[h+1],v.call(this,4,252645135),v.call(this,16,65535),p.call(this,2,858993459),p.call(this,8,16711935),v.call(this,1,1431655765);for(var b=0;b<16;b++){for(var E=C[b],F=this._lBlock,A=this._rBlock,w=0,B=0;B<8;B++)w|=x[B][((A^E[B])&f[B])>>>0];this._lBlock=A,this._rBlock=F^w}var g=this._lBlock;this._lBlock=this._rBlock,this._rBlock=g,v.call(this,1,1431655765),p.call(this,8,16711935),p.call(this,2,858993459),v.call(this,16,65535),v.call(this,4,252645135),y[h]=this._lBlock,y[h+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function v(y,h){var C=(this._lBlock>>>y^this._rBlock)&h;this._rBlock^=C,this._lBlock^=C<<y}function p(y,h){var C=(this._rBlock>>>y^this._lBlock)&h;this._lBlock^=C,this._rBlock^=C<<y}n.DES=o._createHelper(m);var d=s.TripleDES=o.extend({_doReset:function(){var y=this._key,h=y.words;if(h.length!==2&&h.length!==4&&h.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var C=h.slice(0,2),b=h.length<4?h.slice(0,2):h.slice(2,4),E=h.length<6?h.slice(0,2):h.slice(4,6);this._des1=m.createEncryptor(a.create(C)),this._des2=m.createEncryptor(a.create(b)),this._des3=m.createEncryptor(a.create(E))},encryptBlock:function(y,h){this._des1.encryptBlock(y,h),this._des2.decryptBlock(y,h),this._des3.encryptBlock(y,h)},decryptBlock:function(y,h){this._des3.decryptBlock(y,h),this._des2.encryptBlock(y,h),this._des1.decryptBlock(y,h)},keySize:192/32,ivSize:64/32,blockSize:64/32});n.TripleDES=o._createHelper(d)})(),e.TripleDES})})(Xi)),Xi.exports}var Yi={exports:{}},Kg=Yi.exports,au;function Gg(){return au||(au=1,(function(t,r){(function(e,n,i){t.exports=n(Oe(),Qr(),Zr(),$r(),yt())})(Kg,function(e){return(function(){var n=e,i=n.lib,a=i.StreamCipher,o=n.algo,s=o.RC4=a.extend({_doReset:function(){for(var l=this._key,x=l.words,f=l.sigBytes,m=this._S=[],v=0;v<256;v++)m[v]=v;for(var v=0,p=0;v<256;v++){var d=v%f,y=x[d>>>2]>>>24-d%4*8&255;p=(p+m[v]+y)%256;var h=m[v];m[v]=m[p],m[p]=h}this._i=this._j=0},_doProcessBlock:function(l,x){l[x]^=c.call(this)},keySize:256/32,ivSize:0});function c(){for(var l=this._S,x=this._i,f=this._j,m=0,v=0;v<4;v++){x=(x+1)%256,f=(f+l[x])%256;var p=l[x];l[x]=l[f],l[f]=p,m|=l[(l[x]+l[f])%256]<<24-v*8}return this._i=x,this._j=f,m}n.RC4=a._createHelper(s);var u=o.RC4Drop=s.extend({cfg:s.cfg.extend({drop:192}),_doReset:function(){s._doReset.call(this);for(var l=this.cfg.drop;l>0;l--)c.call(this)}});n.RC4Drop=a._createHelper(u)})(),e.RC4})})(Yi)),Yi.exports}var Qi={exports:{}},Xg=Qi.exports,ou;function Yg(){return ou||(ou=1,(function(t,r){(function(e,n,i){t.exports=n(Oe(),Qr(),Zr(),$r(),yt())})(Xg,function(e){return(function(){var n=e,i=n.lib,a=i.StreamCipher,o=n.algo,s=[],c=[],u=[],l=o.Rabbit=a.extend({_doReset:function(){for(var f=this._key.words,m=this.cfg.iv,v=0;v<4;v++)f[v]=(f[v]<<8|f[v]>>>24)&16711935|(f[v]<<24|f[v]>>>8)&4278255360;var p=this._X=[f[0],f[3]<<16|f[2]>>>16,f[1],f[0]<<16|f[3]>>>16,f[2],f[1]<<16|f[0]>>>16,f[3],f[2]<<16|f[1]>>>16],d=this._C=[f[2]<<16|f[2]>>>16,f[0]&4294901760|f[1]&65535,f[3]<<16|f[3]>>>16,f[1]&4294901760|f[2]&65535,f[0]<<16|f[0]>>>16,f[2]&4294901760|f[3]&65535,f[1]<<16|f[1]>>>16,f[3]&4294901760|f[0]&65535];this._b=0;for(var v=0;v<4;v++)x.call(this);for(var v=0;v<8;v++)d[v]^=p[v+4&7];if(m){var y=m.words,h=y[0],C=y[1],b=(h<<8|h>>>24)&16711935|(h<<24|h>>>8)&4278255360,E=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360,F=b>>>16|E&4294901760,A=E<<16|b&65535;d[0]^=b,d[1]^=F,d[2]^=E,d[3]^=A,d[4]^=b,d[5]^=F,d[6]^=E,d[7]^=A;for(var v=0;v<4;v++)x.call(this)}},_doProcessBlock:function(f,m){var v=this._X;x.call(this),s[0]=v[0]^v[5]>>>16^v[3]<<16,s[1]=v[2]^v[7]>>>16^v[5]<<16,s[2]=v[4]^v[1]>>>16^v[7]<<16,s[3]=v[6]^v[3]>>>16^v[1]<<16;for(var p=0;p<4;p++)s[p]=(s[p]<<8|s[p]>>>24)&16711935|(s[p]<<24|s[p]>>>8)&4278255360,f[m+p]^=s[p]},blockSize:128/32,ivSize:64/32});function x(){for(var f=this._X,m=this._C,v=0;v<8;v++)c[v]=m[v];m[0]=m[0]+1295307597+this._b|0,m[1]=m[1]+3545052371+(m[0]>>>0<c[0]>>>0?1:0)|0,m[2]=m[2]+886263092+(m[1]>>>0<c[1]>>>0?1:0)|0,m[3]=m[3]+1295307597+(m[2]>>>0<c[2]>>>0?1:0)|0,m[4]=m[4]+3545052371+(m[3]>>>0<c[3]>>>0?1:0)|0,m[5]=m[5]+886263092+(m[4]>>>0<c[4]>>>0?1:0)|0,m[6]=m[6]+1295307597+(m[5]>>>0<c[5]>>>0?1:0)|0,m[7]=m[7]+3545052371+(m[6]>>>0<c[6]>>>0?1:0)|0,this._b=m[7]>>>0<c[7]>>>0?1:0;for(var v=0;v<8;v++){var p=f[v]+m[v],d=p&65535,y=p>>>16,h=((d*d>>>17)+d*y>>>15)+y*y,C=((p&4294901760)*p|0)+((p&65535)*p|0);u[v]=h^C}f[0]=u[0]+(u[7]<<16|u[7]>>>16)+(u[6]<<16|u[6]>>>16)|0,f[1]=u[1]+(u[0]<<8|u[0]>>>24)+u[7]|0,f[2]=u[2]+(u[1]<<16|u[1]>>>16)+(u[0]<<16|u[0]>>>16)|0,f[3]=u[3]+(u[2]<<8|u[2]>>>24)+u[1]|0,f[4]=u[4]+(u[3]<<16|u[3]>>>16)+(u[2]<<16|u[2]>>>16)|0,f[5]=u[5]+(u[4]<<8|u[4]>>>24)+u[3]|0,f[6]=u[6]+(u[5]<<16|u[5]>>>16)+(u[4]<<16|u[4]>>>16)|0,f[7]=u[7]+(u[6]<<8|u[6]>>>24)+u[5]|0}n.Rabbit=a._createHelper(l)})(),e.Rabbit})})(Qi)),Qi.exports}var Zi={exports:{}},Qg=Zi.exports,su;function Zg(){return su||(su=1,(function(t,r){(function(e,n,i){t.exports=n(Oe(),Qr(),Zr(),$r(),yt())})(Qg,function(e){return(function(){var n=e,i=n.lib,a=i.StreamCipher,o=n.algo,s=[],c=[],u=[],l=o.RabbitLegacy=a.extend({_doReset:function(){var f=this._key.words,m=this.cfg.iv,v=this._X=[f[0],f[3]<<16|f[2]>>>16,f[1],f[0]<<16|f[3]>>>16,f[2],f[1]<<16|f[0]>>>16,f[3],f[2]<<16|f[1]>>>16],p=this._C=[f[2]<<16|f[2]>>>16,f[0]&4294901760|f[1]&65535,f[3]<<16|f[3]>>>16,f[1]&4294901760|f[2]&65535,f[0]<<16|f[0]>>>16,f[2]&4294901760|f[3]&65535,f[1]<<16|f[1]>>>16,f[3]&4294901760|f[0]&65535];this._b=0;for(var d=0;d<4;d++)x.call(this);for(var d=0;d<8;d++)p[d]^=v[d+4&7];if(m){var y=m.words,h=y[0],C=y[1],b=(h<<8|h>>>24)&16711935|(h<<24|h>>>8)&4278255360,E=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360,F=b>>>16|E&4294901760,A=E<<16|b&65535;p[0]^=b,p[1]^=F,p[2]^=E,p[3]^=A,p[4]^=b,p[5]^=F,p[6]^=E,p[7]^=A;for(var d=0;d<4;d++)x.call(this)}},_doProcessBlock:function(f,m){var v=this._X;x.call(this),s[0]=v[0]^v[5]>>>16^v[3]<<16,s[1]=v[2]^v[7]>>>16^v[5]<<16,s[2]=v[4]^v[1]>>>16^v[7]<<16,s[3]=v[6]^v[3]>>>16^v[1]<<16;for(var p=0;p<4;p++)s[p]=(s[p]<<8|s[p]>>>24)&16711935|(s[p]<<24|s[p]>>>8)&4278255360,f[m+p]^=s[p]},blockSize:128/32,ivSize:64/32});function x(){for(var f=this._X,m=this._C,v=0;v<8;v++)c[v]=m[v];m[0]=m[0]+1295307597+this._b|0,m[1]=m[1]+3545052371+(m[0]>>>0<c[0]>>>0?1:0)|0,m[2]=m[2]+886263092+(m[1]>>>0<c[1]>>>0?1:0)|0,m[3]=m[3]+1295307597+(m[2]>>>0<c[2]>>>0?1:0)|0,m[4]=m[4]+3545052371+(m[3]>>>0<c[3]>>>0?1:0)|0,m[5]=m[5]+886263092+(m[4]>>>0<c[4]>>>0?1:0)|0,m[6]=m[6]+1295307597+(m[5]>>>0<c[5]>>>0?1:0)|0,m[7]=m[7]+3545052371+(m[6]>>>0<c[6]>>>0?1:0)|0,this._b=m[7]>>>0<c[7]>>>0?1:0;for(var v=0;v<8;v++){var p=f[v]+m[v],d=p&65535,y=p>>>16,h=((d*d>>>17)+d*y>>>15)+y*y,C=((p&4294901760)*p|0)+((p&65535)*p|0);u[v]=h^C}f[0]=u[0]+(u[7]<<16|u[7]>>>16)+(u[6]<<16|u[6]>>>16)|0,f[1]=u[1]+(u[0]<<8|u[0]>>>24)+u[7]|0,f[2]=u[2]+(u[1]<<16|u[1]>>>16)+(u[0]<<16|u[0]>>>16)|0,f[3]=u[3]+(u[2]<<8|u[2]>>>24)+u[1]|0,f[4]=u[4]+(u[3]<<16|u[3]>>>16)+(u[2]<<16|u[2]>>>16)|0,f[5]=u[5]+(u[4]<<8|u[4]>>>24)+u[3]|0,f[6]=u[6]+(u[5]<<16|u[5]>>>16)+(u[4]<<16|u[4]>>>16)|0,f[7]=u[7]+(u[6]<<8|u[6]>>>24)+u[5]|0}n.RabbitLegacy=a._createHelper(l)})(),e.RabbitLegacy})})(Zi)),Zi.exports}var Ji={exports:{}},Jg=Ji.exports,uu;function em(){return uu||(uu=1,(function(t,r){(function(e,n,i){t.exports=n(Oe(),Qr(),Zr(),$r(),yt())})(Jg,function(e){return(function(){var n=e,i=n.lib,a=i.BlockCipher,o=n.algo;const s=16,c=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],u=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var l={pbox:[],sbox:[]};function x(d,y){let h=y>>24&255,C=y>>16&255,b=y>>8&255,E=y&255,F=d.sbox[0][h]+d.sbox[1][C];return F=F^d.sbox[2][b],F=F+d.sbox[3][E],F}function f(d,y,h){let C=y,b=h,E;for(let F=0;F<s;++F)C=C^d.pbox[F],b=x(d,C)^b,E=C,C=b,b=E;return E=C,C=b,b=E,b=b^d.pbox[s],C=C^d.pbox[s+1],{left:C,right:b}}function m(d,y,h){let C=y,b=h,E;for(let F=s+1;F>1;--F)C=C^d.pbox[F],b=x(d,C)^b,E=C,C=b,b=E;return E=C,C=b,b=E,b=b^d.pbox[1],C=C^d.pbox[0],{left:C,right:b}}function v(d,y,h){for(let A=0;A<4;A++){d.sbox[A]=[];for(let w=0;w<256;w++)d.sbox[A][w]=u[A][w]}let C=0;for(let A=0;A<s+2;A++)d.pbox[A]=c[A]^y[C],C++,C>=h&&(C=0);let b=0,E=0,F=0;for(let A=0;A<s+2;A+=2)F=f(d,b,E),b=F.left,E=F.right,d.pbox[A]=b,d.pbox[A+1]=E;for(let A=0;A<4;A++)for(let w=0;w<256;w+=2)F=f(d,b,E),b=F.left,E=F.right,d.sbox[A][w]=b,d.sbox[A][w+1]=E;return!0}var p=o.Blowfish=a.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var d=this._keyPriorReset=this._key,y=d.words,h=d.sigBytes/4;v(l,y,h)}},encryptBlock:function(d,y){var h=f(l,d[y],d[y+1]);d[y]=h.left,d[y+1]=h.right},decryptBlock:function(d,y){var h=m(l,d[y],d[y+1]);d[y]=h.left,d[y+1]=h.right},blockSize:64/32,keySize:128/32,ivSize:64/32});n.Blowfish=a._createHelper(p)})(),e.Blowfish})})(Ji)),Ji.exports}var tm=mi.exports,lu;function rm(){return lu||(lu=1,(function(t,r){(function(e,n,i){t.exports=n(Oe(),Ea(),Zx(),eg(),Qr(),ng(),Zr(),rc(),rs(),ug(),nc(),dg(),pg(),vg(),ns(),mg(),$r(),yt(),Eg(),wg(),Bg(),Dg(),kg(),Tg(),Pg(),Og(),Lg(),zg(),Hg(),jg(),Wg(),Gg(),Yg(),Zg(),em())})(tm,function(e){return e})})(mi)),mi.exports}var nm=rm();const ic=Eu(nm);ic.enc.Utf8.parse("1234567890123456");ic.enc.Utf8.parse("1234567890123456");const is={login:{usernamePlaceholder:"\u8F93\u5165\u7528\u6237\u540D\u5B57",passwordPlaceholder:"\u8F93\u5165\u5BC6\u7801",verifyCodePlaceholder:"\u8F93\u5165\u9A8C\u8BC1\u7801",usernameRequired:"\u8BF7\u8F93\u5165\u7528\u6237\u540D\u5B57",passwordRequired:"\u8BF7\u8F93\u5165\u5BC6\u7801",verifyCodeRequired:"\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801",submit:"\u767B\u5F55",errorFallback:"\u767B\u5F55\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5"},register:{labels:{username:"\u7528\u6237\u540D",phone:"\u624B\u673A\u53F7",email:"\u90AE\u7BB1",password:"\u5BC6\u7801",confirmPassword:"\u786E\u8BA4\u5BC6\u7801",verifyCode:"\u9A8C\u8BC1\u7801"},placeholders:{username:"\u8F93\u5165\u7528\u6237\u540D\u5B57",phone:"\u8BF7\u8F93\u5165\u624B\u673A\u53F7",email:"\u8F93\u5165\u90AE\u7BB1",password:"\u8BF7\u8F93\u5165\u5BC6\u7801",confirmPassword:"\u8BF7\u786E\u8BA4\u65B0\u5BC6\u7801",verifyCode:"\u8F93\u5165\u9A8C\u8BC1\u7801"},required:{username:"\u8BF7\u8F93\u5165\u540D\u79F0",phone:"\u8BF7\u8F93\u5165\u624B\u673A\u53F7",email:"\u8BF7\u8F93\u5165\u90AE\u7BB1",password:"\u8BF7\u8F93\u5165\u5BC6\u7801",confirmPassword:"\u8BF7\u786E\u8BA4\u65B0\u5BC6\u7801",verifyCode:"\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801"},cancel:"\u53D6\u6D88",submit:"\u6CE8\u518C",passwordConfirmMismatch:"\u4E24\u6B21\u5BC6\u7801\u4E0D\u4E00\u81F4!"}},im={login:{usernamePlaceholder:"Enter username",passwordPlaceholder:"Enter password",verifyCodePlaceholder:"Enter verification code",usernameRequired:"Please enter username",passwordRequired:"Please enter password",verifyCodeRequired:"Please enter verification code",submit:"Sign in",errorFallback:"Login failed, please try again later."},register:{labels:{username:"Username",phone:"Phone",email:"Email",password:"Password",confirmPassword:"Confirm password",verifyCode:"Verification code"},placeholders:{username:"Enter username",phone:"Enter phone number",email:"Enter email",password:"Enter password",confirmPassword:"Confirm password",verifyCode:"Enter verification code"},required:{username:"Please enter username",phone:"Please enter phone number",email:"Please enter email",password:"Please enter password",confirmPassword:"Please confirm password",verifyCode:"Please enter verification code"},cancel:"Cancel",submit:"Register",passwordConfirmMismatch:"Passwords do not match."}},am={login:{usernamePlaceholder:"\u30E6\u30FC\u30B6\u30FC\u540D\u3092\u5165\u529B",passwordPlaceholder:"\u30D1\u30B9\u30EF\u30FC\u30C9\u3092\u5165\u529B",verifyCodePlaceholder:"\u8A8D\u8A3C\u30B3\u30FC\u30C9\u3092\u5165\u529B",usernameRequired:"\u30E6\u30FC\u30B6\u30FC\u540D\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",passwordRequired:"\u30D1\u30B9\u30EF\u30FC\u30C9\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",verifyCodeRequired:"\u8A8D\u8A3C\u30B3\u30FC\u30C9\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",submit:"\u30ED\u30B0\u30A4\u30F3",errorFallback:"\u30ED\u30B0\u30A4\u30F3\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002\u3057\u3070\u3089\u304F\u3057\u3066\u304B\u3089\u304A\u8A66\u3057\u304F\u3060\u3055\u3044\u3002"},register:{labels:{username:"\u30E6\u30FC\u30B6\u30FC\u540D",phone:"\u96FB\u8A71\u756A\u53F7",email:"\u30E1\u30FC\u30EB",password:"\u30D1\u30B9\u30EF\u30FC\u30C9",confirmPassword:"\u30D1\u30B9\u30EF\u30FC\u30C9\u78BA\u8A8D",verifyCode:"\u8A8D\u8A3C\u30B3\u30FC\u30C9"},placeholders:{username:"\u30E6\u30FC\u30B6\u30FC\u540D\u3092\u5165\u529B",phone:"\u96FB\u8A71\u756A\u53F7\u3092\u5165\u529B",email:"\u30E1\u30FC\u30EB\u3092\u5165\u529B",password:"\u30D1\u30B9\u30EF\u30FC\u30C9\u3092\u5165\u529B",confirmPassword:"\u30D1\u30B9\u30EF\u30FC\u30C9\u3092\u78BA\u8A8D",verifyCode:"\u8A8D\u8A3C\u30B3\u30FC\u30C9\u3092\u5165\u529B"},required:{username:"\u30E6\u30FC\u30B6\u30FC\u540D\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",phone:"\u96FB\u8A71\u756A\u53F7\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",email:"\u30E1\u30FC\u30EB\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",password:"\u30D1\u30B9\u30EF\u30FC\u30C9\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",confirmPassword:"\u30D1\u30B9\u30EF\u30FC\u30C9\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044",verifyCode:"\u8A8D\u8A3C\u30B3\u30FC\u30C9\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044"},cancel:"\u30AD\u30E3\u30F3\u30BB\u30EB",submit:"\u767B\u9332",passwordConfirmMismatch:"\u30D1\u30B9\u30EF\u30FC\u30C9\u304C\u4E00\u81F4\u3057\u307E\u305B\u3093\u3002"}},om={zh:is,en:im,ja:am};function sm(t,r){const e=om[t]??is;return r?{...e,...r}:e}const ac=ye.createContext({locale:"zh",messages:is});function S2(){return ye.useContext(ac)}function D2({locale:t,messages:r,children:e}){const n=ye.useMemo(()=>({locale:t,messages:sm(t,r)}),[t,r]);return ye.createElement(ac.Provider,{value:n},e)}const ca={dashboard:{title:"\u5BA1\u6838\u914D\u7F6E",description:"\u914D\u7F6E\u77E5\u8BC6\u5E93\u4E0A\u4F20/\u5220\u9664\u7B49\u5BA1\u6838\u89C4\u8303"},pages:{createTitle:"\u65B0\u589E\u5BA1\u6838\u914D\u7F6E",editTitle:"\u7F16\u8F91\u5BA1\u6838\u914D\u7F6E",back:"\u8FD4\u56DE",cancel:"\u53D6\u6D88",confirm:"\u786E\u8BA4"},toolbar:{themeToggle:"\u4E3B\u9898",createConfig:"\u65B0\u589E\u5BA1\u6838\u914D\u7F6E",searchEnterprisePlaceholder:"\u641C\u7D22\u4F01\u4E1A\u5E93\u540D",searchFirstReviewersPlaceholder:"\u641C\u7D22\u521D\u5BA1\u5BA1\u6838",searchSecondReviewersPlaceholder:"\u641C\u7D22\u590D\u5BA1\u5BA1\u6838"},tips:{title:"\u77E5\u8BC6\u5BA1\u6838\u89C4\u5219",description:"\u5BA1\u6838\u89C4\u5219\u5BF9\u6240\u6709\u77E5\u8BC6\u5E93\u4E0A\u4F20\u7684\u6587\u6863\u9ED8\u8BA4\u4F1A\u505A\u6821\u9A8C\uFF0C\u5982\u65B0\u589E\u5BA1\u6838\u914D\u7F6E\uFF0C\u5219\u65B0\u589E\u7684\u5BA1\u6838\u914D\u7F6E\u4F18\u5148\u7EA7\u9AD8\u4E8E\u5168\u5C40\u5F00\u5173\u7684\u4F18\u5148\u7EA7\u3002",uploadReviewToggle:"\u77E5\u8BC6\u4E0A\u4F20\u5BA1\u6838",deleteReviewToggle:"\u77E5\u8BC6\u5220\u9664\u5BA1\u6838"},table:{enterpriseName:"\u4F01\u4E1A\u5E93\u540D",knowledgeType:"\u77E5\u8BC6\u7C7B\u578B",reviewScope:"\u5BA1\u6838\u8303\u56F4",firstReviewers:"\u521D\u5BA1\u5BA1\u6838",secondReviewers:"\u590D\u5BA1\u5BA1\u6838",createdAt:"\u914D\u7F6E\u65F6\u95F4",creator:"\u914D\u7F6E\u4EBA",enabled:"\u5F00\u542F\u72B6\u6001",actions:"\u64CD\u4F5C",actionEdit:"\u7F16\u8F91",actionDelete:"\u5220\u9664",enabledOn:"\u5F00\u542F",enabledOff:"\u5173\u95ED"}},um={dashboard:{title:"Review settings",description:"Configure review rules for knowledge uploads/deletions"},pages:{createTitle:"Create rule",editTitle:"Edit rule",back:"Back",cancel:"Cancel",confirm:"Confirm"},toolbar:{themeToggle:"Theme",createConfig:"Create rule",searchEnterprisePlaceholder:"Search enterprise library",searchFirstReviewersPlaceholder:"Search first reviewers",searchSecondReviewersPlaceholder:"Search second reviewers"},tips:{title:"Review rules",description:"Rules apply to all knowledge uploads by default. If a specific rule is added, it takes precedence over the global switches.",uploadReviewToggle:"Upload review",deleteReviewToggle:"Delete review"},table:{enterpriseName:"Enterprise library",knowledgeType:"Knowledge type",reviewScope:"Scope",firstReviewers:"First reviewers",secondReviewers:"Second reviewers",createdAt:"Configured at",creator:"Creator",enabled:"Enabled",actions:"Actions",actionEdit:"Edit",actionDelete:"Delete",enabledOn:"On",enabledOff:"Off"}},lm={dashboard:{title:"\u5BE9\u67FB\u8A2D\u5B9A",description:"\u30CA\u30EC\u30C3\u30B8\u306E\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9/\u524A\u9664\u306E\u5BE9\u67FB\u30EB\u30FC\u30EB\u3092\u8A2D\u5B9A"},pages:{createTitle:"\u65B0\u898F\u5BE9\u67FB\u8A2D\u5B9A",editTitle:"\u5BE9\u67FB\u8A2D\u5B9A\u3092\u7DE8\u96C6",back:"\u623B\u308B",cancel:"\u30AD\u30E3\u30F3\u30BB\u30EB",confirm:"\u78BA\u8A8D"},toolbar:{themeToggle:"\u30C6\u30FC\u30DE",createConfig:"\u65B0\u898F\u4F5C\u6210",searchEnterprisePlaceholder:"\u4F01\u696D\u30E9\u30A4\u30D6\u30E9\u30EA\u3092\u691C\u7D22",searchFirstReviewersPlaceholder:"\u4E00\u6B21\u5BE9\u67FB\u3092\u691C\u7D22",searchSecondReviewersPlaceholder:"\u4E8C\u6B21\u5BE9\u67FB\u3092\u691C\u7D22"},tips:{title:"\u5BE9\u67FB\u30EB\u30FC\u30EB",description:"\u30EB\u30FC\u30EB\u306F\u30C7\u30D5\u30A9\u30EB\u30C8\u3067\u3059\u3079\u3066\u306E\u30CA\u30EC\u30C3\u30B8\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u306B\u9069\u7528\u3055\u308C\u307E\u3059\u3002\u500B\u5225\u306E\u8A2D\u5B9A\u304C\u8FFD\u52A0\u3055\u308C\u308B\u3068\u3001\u30B0\u30ED\u30FC\u30D0\u30EB\u30B9\u30A4\u30C3\u30C1\u3088\u308A\u512A\u5148\u3055\u308C\u307E\u3059\u3002",uploadReviewToggle:"\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u5BE9\u67FB",deleteReviewToggle:"\u524A\u9664\u5BE9\u67FB"},table:{enterpriseName:"\u4F01\u696D\u30E9\u30A4\u30D6\u30E9\u30EA",knowledgeType:"\u77E5\u8B58\u30BF\u30A4\u30D7",reviewScope:"\u7BC4\u56F2",firstReviewers:"\u4E00\u6B21\u5BE9\u67FB",secondReviewers:"\u4E8C\u6B21\u5BE9\u67FB",createdAt:"\u8A2D\u5B9A\u6642\u523B",creator:"\u4F5C\u6210\u8005",enabled:"\u6709\u52B9",actions:"\u64CD\u4F5C",actionEdit:"\u7DE8\u96C6",actionDelete:"\u524A\u9664",enabledOn:"\u30AA\u30F3",enabledOff:"\u30AA\u30D5"}},cm={zh:ca,en:um,ja:lm};function dm(t,r){const e=cm[t]??ca;return r?{...e,...r}:e}function oc(t,r){const e=r.split(".");let n=t;for(const i of e)n=n==null?void 0:n[i];return typeof n=="string"?n:r}const sc=ye.createContext({locale:"zh",messages:ca,getMessage:t=>oc(ca,t)});function fm(){return ye.useContext(sc)}function pm({locale:t,messages:r,children:e}){const n=ye.useMemo(()=>{const i=dm(t,r);return{locale:t,messages:i,getMessage:a=>oc(i,a)}},[t,r]);return ye.createElement(sc.Provider,{value:n},e)}function cu(t){return Array.isArray(t)?t.map(r=>typeof r=="string"?r:String((r==null?void 0:r.label)??(r==null?void 0:r.id)??"")).filter(Boolean):[]}const Ya=[{id:"dept-tech",label:"\u6280\u672F\u4E2D\u5FC3",type:"dept",selectable:!1,children:[{id:"user-zhangsan",label:"\u5F20\u4E09",type:"user",deptId:"dept-tech"},{id:"user-lisi",label:"\u674E\u56DB",type:"user",deptId:"dept-tech"},{id:"user-wangwu",label:"\u738B\u4E94",type:"user",deptId:"dept-tech"}]},{id:"dept-product",label:"\u4EA7\u54C1\u4E2D\u5FC3",type:"dept",selectable:!1,children:[{id:"user-zhaoliu",label:"\u8D75\u516D",type:"user",deptId:"dept-product"},{id:"user-qianqi",label:"\u94B1\u4E03",type:"user",deptId:"dept-product"}]}];function du(t){return t.map(r=>r.trim()).filter(Boolean).map((r,e)=>({id:`reviewer-${e}-${r}`,label:r,type:"user",subLabel:"\u6B64\u5904\u662F\u90E8\u95E8\u540D\u79F0"}))}const hm=Je.div.attrs({className:"reviewsetting-reviewer-card"})`
275
+ display: flex;
276
+ align-items: center;
277
+ gap: 10px;
278
+ width: 100%;
279
+ max-width: 280px;
280
+ min-height: 56px;
281
+ padding: 10px 36px 10px 12px;
282
+ border: 1px solid rgba(226, 232, 240, 0.95);
283
+ border-radius: 10px;
284
+ background: #fff;
285
+ position: relative;
286
+ box-sizing: border-box;
287
+ `,vm=Je.div.attrs({className:"reviewsetting-reviewer-card-avatar"})`
288
+ width: 36px;
289
+ height: 36px;
290
+ border-radius: 999px;
291
+ background: linear-gradient(135deg, #4e6ef2, #2563eb);
292
+ display: flex;
293
+ align-items: center;
294
+ justify-content: center;
295
+ color: #fff;
296
+ flex-shrink: 0;
297
+ `,xm=Je.button.attrs({className:"reviewsetting-reviewer-card-remove"})`
298
+ position: absolute;
299
+ top: 6px;
300
+ right: 6px;
301
+ display: inline-flex;
302
+ align-items: center;
303
+ justify-content: center;
304
+ width: 22px;
305
+ height: 22px;
306
+ padding: 0;
307
+ border: none;
308
+ border-radius: 6px;
309
+ background: transparent;
310
+ color: #94a3b8;
311
+ cursor: pointer;
312
+ `;function gm({item:t,onRemove:r}){return te(hm,{children:[k(vm,{children:k(bd,{size:18,strokeWidth:2})}),te("div",{style:{minWidth:0,flex:1},children:[k("div",{style:{fontSize:14,fontWeight:600,color:"#111827"},children:t.label}),k("div",{style:{fontSize:12,color:"#94a3b8",marginTop:2},children:t.subLabel??"\u6B64\u5904\u662F\u90E8\u95E8\u540D\u79F0"})]}),k(xm,{type:"button","aria-label":"\u79FB\u9664",onClick:r,children:k(zo,{size:14,strokeWidth:2})})]})}function mm(t){const{styles:r,eventsEmit:e,CustomComponents:n}=t,{getMessage:i}=fm(),[a,o]=ue("list"),[s,c]=ue("create"),[u,l]=ue(null),x=We(null),[f,m]=ue("light"),[v,p]=ue(""),[d,y]=ue(""),[h,C]=ue(""),[b,E]=ue(!0),[F,A]=ue(!1),[w,B]=ue(!1),[g,S]=ue(null),[_,R]=ue([]),P=Kt(Q=>k(gm,{item:Q.item,onRemove:Q.onRemove}),[]),z=Lo(),$=Te(()=>{var Z;const Q=yn(yn({theme:Hn,mode:"light"},z||{}),r||{}),G=((Z=Q.theme)==null?void 0:Z.space)||{},ae=G.dashboardHeaderHeight,le=ae==="auto"||ae===void 0?{...G,dashboardHeaderHeight:"38px"}:G;return{...Q,mode:f,theme:{...Q.theme,space:le}}},[z,r,f]),[j,q]=ue(()=>[{id:"rs-1",data:[{columnId:"enterpriseName",value:"\u6211\u662F\u4E00\u4E2A\u6D4B\u8BD5\u5E93",type:"text"},{columnId:"knowledgeType",value:"\u77E5\u8BC6\u5E93",type:"tag"},{columnId:"reviewScope",value:"\u4E0A\u4F20\u3001\u5220\u9664",type:"text"},{columnId:"firstReviewers",value:"\u5F20\u4E09\u3001\u674E\u56DB\u3001\u738B\u4E94",type:"text"},{columnId:"secondReviewers",value:"\u5F20\u4E09",type:"text"},{columnId:"createdAt",value:"2025-10-28 11:48",type:"text"},{columnId:"creator",value:"\u5F20\u4E09",type:"text"},{columnId:"enabled",value:"ON",type:"text"},{columnId:"actions",value:"edit",type:"action"},{columnId:"actions",value:"delete",type:"action"}]},{id:"rs-2",data:[{columnId:"enterpriseName",value:"\u6211\u662F\u4E00\u4E2A\u6D4B\u8BD5\u5E93",type:"text"},{columnId:"knowledgeType",value:"\u77E5\u8BC6\u5E93",type:"tag"},{columnId:"reviewScope",value:"\u4E0A\u4F20",type:"text"},{columnId:"firstReviewers",value:"\u5F20\u4E09\u3001\u674E\u56DB",type:"text"},{columnId:"secondReviewers",value:"\u5F20\u4E09",type:"text"},{columnId:"createdAt",value:"2025-10-28 11:48",type:"text"},{columnId:"creator",value:"\u5F20\u4E09",type:"text"},{columnId:"enabled",value:"OFF",type:"text"},{columnId:"actions",value:"edit",type:"action"},{columnId:"actions",value:"delete",type:"action"}]},{id:"rs-3",data:[{columnId:"enterpriseName",value:"\u6211\u662F\u4E00\u4E2A\u6D4B\u8BD5\u5E93",type:"text"},{columnId:"knowledgeType",value:"\u6570\u636E\u5E93",type:"tag"},{columnId:"reviewScope",value:"\u5220\u9664",type:"text"},{columnId:"firstReviewers",value:"\u674E\u56DB\u3001\u738B\u4E94",type:"text"},{columnId:"secondReviewers",value:"\u5F20\u4E09",type:"text"},{columnId:"createdAt",value:"2025-10-28 11:48",type:"text"},{columnId:"creator",value:"\u5F20\u4E09",type:"text"},{columnId:"enabled",value:"ON",type:"text"},{columnId:"actions",value:"edit",type:"action"},{columnId:"actions",value:"delete",type:"action"}]}]),Y=Te(()=>{const Q=i("table.enabledOn"),G=i("table.enabledOff"),ae=i("table.actionEdit"),le=i("table.actionDelete");return j.map(Z=>({...Z,data:Array.isArray(Z==null?void 0:Z.data)?Z.data.map(fe=>{if((fe==null?void 0:fe.columnId)==="enabled")return{...fe,value:(fe==null?void 0:fe.value)==="OFF"?G:Q};if((fe==null?void 0:fe.columnId)==="actions"&&(fe==null?void 0:fe.type)==="action"){if((fe==null?void 0:fe.value)==="delete")return{...fe,label:le};if((fe==null?void 0:fe.value)==="edit")return{...fe,label:ae}}return fe}):Z==null?void 0:Z.data}))},[i,j]),U=Te(()=>u?j.find(Q=>String(Q==null?void 0:Q.id)===String(u))??null:null,[u,j]),M=Kt(()=>{o("list"),l(null),x.current=null,e==null||e("reviewsetting_nav_back_list",{},null)},[e]),N=Kt(()=>{M()},[M]),O=Kt(async()=>{var G;const Q=x.current;if(!Q){lt.warning("\u8868\u5355\u5C1A\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");return}try{const ae=await((G=Q.getAllData)==null?void 0:G.call(Q));console.log("[ReviewSetting] DynamicForm getAllData:",ae),e==null||e("reviewsetting_form_confirm_print",{allData:ae},null)}catch(ae){console.error("[ReviewSetting] DynamicForm confirm error:",ae),lt.error("\u8868\u5355\u6821\u9A8C\u672A\u901A\u8FC7\uFF0C\u8BF7\u68C0\u67E5\u540E\u91CD\u8BD5")}},[e]),I=Kt(()=>{c("create"),l(null),o("form"),x.current=null,e==null||e("reviewsetting_nav_enter_create",{},null)},[e]),V=Kt(Q=>{c("edit"),l(Q),o("form"),x.current=null,e==null||e("reviewsetting_nav_enter_edit",{id:Q},null)},[e]),X=Kt(()=>{m(Q=>Q==="light"?"dark":"light")},[]),ee=Te(()=>{const Q=v.trim().toLowerCase(),G=d.trim().toLowerCase(),ae=h.trim().toLowerCase();if(!Q&&!G&&!ae)return Y;const le=(Z,fe)=>{const Be=Array.isArray(Z==null?void 0:Z.data)?Z.data.find(Re=>(Re==null?void 0:Re.columnId)===fe&&typeof(Re==null?void 0:Re.value)=="string"):null;return String((Be==null?void 0:Be.value)??"")};return Y.filter(Z=>{const fe=le(Z,"enterpriseName").toLowerCase(),Be=le(Z,"firstReviewers").toLowerCase(),Re=le(Z,"secondReviewers").toLowerCase(),je=Q?fe.includes(Q):!0,Ce=G?Be.includes(G):!0,be=ae?Re.includes(ae):!0;return je&&Ce&&be})},[Y,v,d,h]),re=Te(()=>({label:"",model:null,defaultActiveId:"review-setting-table",views:[{id:"review-setting-table",label:"",type:"table",viewBehavior:"pagination",viewPageSize:10,toolbar:[{type:"button",key:"create_review",label:i("toolbar.createConfig"),btnType:"primary"},{type:"button",key:"theme_toggle",label:i("toolbar.themeToggle"),btnType:"primary"},{type:"customized",key:"search_enterprise",position:"right",component:Qa,componentProps:{placeholder:i("toolbar.searchEnterprisePlaceholder"),value:v,size:"md"}},{type:"customized",key:"search_first_reviewers",position:"right",component:Qa,componentProps:{placeholder:i("toolbar.searchFirstReviewersPlaceholder"),value:d,size:"md"}},{type:"customized",key:"search_second_reviewers",position:"right",component:Qa,componentProps:{placeholder:i("toolbar.searchSecondReviewersPlaceholder"),value:h,size:"md"}}],columns:[{title:i("table.enterpriseName"),id:"enterpriseName",type:"text"},{title:i("table.knowledgeType"),id:"knowledgeType",type:"tag"},{title:i("table.reviewScope"),id:"reviewScope",type:"text"},{title:i("table.firstReviewers"),id:"firstReviewers",type:"text"},{title:i("table.secondReviewers"),id:"secondReviewers",type:"text"},{title:i("table.createdAt"),id:"createdAt",type:"text"},{title:i("table.creator"),id:"creator",type:"text"},{title:i("table.enabled"),id:"enabled",type:"text"},{title:i("table.actions"),id:"actions",type:"action",align:"left"}]}],dataSource:ee,eventsEmit:(Q,G,ae)=>{if(Q==="toolbar_create_review"){I(),e==null||e(`reviewsetting_${Q}`,G,ae);return}if(Q==="toolbar_theme_toggle"&&X(),Q==="toolbar_search_enterprise_change"&&p(String((G==null?void 0:G.value)??"")),Q==="toolbar_search_first_reviewers_change"&&y(String((G==null?void 0:G.value)??"")),Q==="toolbar_search_second_reviewers_change"&&C(String((G==null?void 0:G.value)??"")),Q==="table_action_delete"){const le=String((G==null?void 0:G.id)??"");ea.confirm({title:"\u5220\u9664\u786E\u8BA4",content:"\u662F\u5426\u5220\u9664\u5F53\u524D\u914D\u7F6E\uFF1F",cancelText:"\u53D6\u6D88",okText:"\u786E\u8BA4",onOk:async()=>{var Z;le&&(q(fe=>fe.filter(Be=>String(Be==null?void 0:Be.id)!==le)),(Z=ae==null?void 0:ae.removeItem)==null||Z.call(ae,le),e==null||e("reviewsetting_delete_confirmed",{id:le},ae))},onCancel:()=>{le&&(e==null||e("reviewsetting_delete_cancelled",{id:le},ae))}}),e==null||e(`reviewsetting_${Q}`,G,ae);return}if(Q==="table_action_edit"){const le=String((G==null?void 0:G.id)??"");le&&V(le),e==null||e(`reviewsetting_${Q}`,G,ae);return}e==null||e(`reviewsetting_${Q}`,G,ae)},styles:$,CustomComponents:n}),[n,e,ee,i,I,V,X,$,v,d,h]),ie=Kt(Q=>{const G={enabled:!!Q.enabled,enterpriseName:Array.isArray(Q.enterpriseName)?String(Q.enterpriseName[0]??""):"",knowledgeType:String(Q.knowledgeType??"\u77E5\u8BC6\u5E93"),reviewScope:Array.isArray(Q.reviewScope)?Q.reviewScope:[],flowType:Q.flowType==="multi"?"multi":"single",firstReviewers:cu(Q.firstReviewers),secondReviewers:cu(Q.secondReviewers)};if(s==="create"){const le=`rs-${Date.now()}`,Z={id:le,data:[{columnId:"enterpriseName",value:G.enterpriseName,type:"text"},{columnId:"knowledgeType",value:G.knowledgeType,type:"tag"},{columnId:"reviewScope",value:G.reviewScope.join("\u3001"),type:"text"},{columnId:"firstReviewers",value:G.firstReviewers.join("\u3001"),type:"text"},{columnId:"secondReviewers",value:G.secondReviewers.join("\u3001"),type:"text"},{columnId:"createdAt",value:"2025-10-28 11:48",type:"text"},{columnId:"creator",value:"\u5F20\u4E09",type:"text"},{columnId:"enabled",value:G.enabled?"ON":"OFF",type:"text"},{columnId:"actions",value:"edit",type:"action"},{columnId:"actions",value:"delete",type:"action"}]};q(fe=>[Z,...fe]),e==null||e("reviewsetting_form_created",{id:le,payload:G},null),M();return}const ae=u;ae&&(q(le=>le.map(Z=>String(Z==null?void 0:Z.id)!==String(ae)?Z:{...Z,data:[{columnId:"enterpriseName",value:G.enterpriseName,type:"text"},{columnId:"knowledgeType",value:G.knowledgeType,type:"tag"},{columnId:"reviewScope",value:G.reviewScope.join("\u3001"),type:"text"},{columnId:"firstReviewers",value:G.firstReviewers.join("\u3001"),type:"text"},{columnId:"secondReviewers",value:G.secondReviewers.join("\u3001"),type:"text"},{columnId:"createdAt",value:"2025-10-28 11:48",type:"text"},{columnId:"creator",value:"\u5F20\u4E09",type:"text"},{columnId:"enabled",value:G.enabled?"ON":"OFF",type:"text"},{columnId:"actions",value:"edit",type:"action"},{columnId:"actions",value:"delete",type:"action"}]})),e==null||e("reviewsetting_form_updated",{id:ae,payload:G},null),M())},[u,e,s,M]),se=Te(()=>{const Q=le=>{var fe;const Z=(fe=U==null?void 0:U.data)==null?void 0:fe.find(Be=>(Be==null?void 0:Be.columnId)===le);return Z==null?void 0:Z.value},G={enabled:s==="edit"?Q("enabled")!=="OFF":!0,enterpriseName:s==="edit"?[String(Q("enterpriseName")??"")].filter(Boolean):[],reviewScope:s==="edit"?String(Q("reviewScope")??"").split("\u3001").filter(Boolean):["\u4E0A\u4F20"],flowType:"single",firstReviewers:s==="edit"?du(String(Q("firstReviewers")??"").split("\u3001").filter(Boolean)):[],secondReviewers:s==="edit"?du(String(Q("secondReviewers")??"").split("\u3001").filter(Boolean)):[],knowledgeType:s==="edit"?String(Q("knowledgeType")??"\u77E5\u8BC6\u5E93"):"\u77E5\u8BC6\u5E93"};return{label:"",model:null,defaultActiveId:"review-setting-form",views:[{id:"review-setting-form",label:"",type:"form",size:"md",formWidth:"800px",formConfig:{layout:"vertical",showReset:!1,showSubmit:!1,onSubmit:()=>{}}}],dataSource:[{id:"review-setting-form",title:"",description:"",fields:[{id:"enabled",name:"enabled",label:"\u542F\u7528\u77E5\u8BC6\u5E93\u6587\u4EF6\u72EC\u7ACB\u5BA1\u6838",type:"switch",required:!1},{id:"enterpriseName",name:"enterpriseName",label:"\u77E5\u8BC6\u5E93",type:"select",required:!0,error:"\u8BF7\u81F3\u5C11\u9009\u62E9 1 \u4E2A\u77E5\u8BC6\u5E93",placeholder:"\u8BF7\u9009\u62E9\uFF08\u591A\u9009\uFF09",multiple:!0,options:[{label:"\u6211\u662F\u4E00\u4E2A\u6D4B\u8BD5\u5E93",value:"\u6211\u662F\u4E00\u4E2A\u6D4B\u8BD5\u5E93"}]},{id:"reviewScope",name:"reviewScope",label:"\u5BA1\u6838\u8303\u56F4",type:"checkbox",required:!0,error:"\u8BF7\u81F3\u5C11\u9009\u62E9 1 \u9879\u5BA1\u6838\u8303\u56F4",options:[{label:"\u4E0A\u4F20",value:"\u4E0A\u4F20"},{label:"\u5220\u9664",value:"\u5220\u9664"}]},{id:"flowType",name:"flowType",label:"\u5BA1\u6838\u6D41\u7A0B\u8303\u56F4",type:"radio",required:!0,error:"\u8BF7\u9009\u62E9\u5BA1\u6838\u6D41\u7A0B\u8303\u56F4",options:[{label:"\u5355\u6B21\u5BA1\u6838",value:"single"},{label:"\u7ECF\u529E\u590D\u6838",value:"multi"}],defaultValue:"single"},{id:"firstReviewers",name:"firstReviewers",label:"\u521D\u5BA1\u4EBA\u5458",description:"\uFF08\u81F3\u5C11 1 \u540D\uFF0C\u6700\u591A 100 \u540D\uFF09",type:"multiTagSelector",required:!0,error:"\u8BF7\u81F3\u5C11\u9009\u62E9 1 \u540D\u521D\u5BA1\u4EBA\u5458",multiTagSelectorConfig:{minCount:1,maxCount:100,addButtonLabel:"\u65B0\u589E\u4EBA\u5458",renderItem:P}},{id:"secondReviewers",name:"secondReviewers",label:"\u590D\u5BA1\u4EBA\u5458",description:"\uFF08\u81F3\u5C11 1 \u540D\uFF0C\u6700\u591A 100 \u540D\uFF09",type:"multiTagSelector",required:!0,error:"\u8BF7\u81F3\u5C11\u9009\u62E9 1 \u540D\u590D\u5BA1\u4EBA\u5458",multiTagSelectorConfig:{minCount:1,maxCount:100,addButtonLabel:"\u65B0\u589E\u4EBA\u5458",renderItem:P}}],defaultValues:G}],eventsEmit:(le,Z,fe)=>{if(le==="form:ready"&&(Z!=null&&Z.formRef)&&(x.current=Z.formRef),le==="form:submit"&&ie((Z==null?void 0:Z.values)??{}),le==="multiTagSelector:add"){const Be=Z==null?void 0:Z.fieldName,Re=x.current,je=Re==null?void 0:Re.form;if(!Be||!(je!=null&&je.getFieldValue)){e==null||e(`reviewsetting_form_${le}`,Z,fe);return}const Ce=je.getFieldValue(Be),Ne=(Array.isArray(Ce)?Ce:[]).map(Ee=>({id:String((Ee==null?void 0:Ee.id)||(Ee==null?void 0:Ee.label)),label:String((Ee==null?void 0:Ee.label)||(Ee==null?void 0:Ee.id)||""),type:"user",subLabel:String((Ee==null?void 0:Ee.subLabel)||"\u6B64\u5904\u662F\u90E8\u95E8\u540D\u79F0")}));S(Be),R(Ne),B(!0)}e==null||e(`reviewsetting_form_${le}`,Z,fe)},styles:$,CustomComponents:n,contentPadding:"0px"}},[n,U,u,e,s,ie,$,P]),De=Kt(()=>{const Q=g,G=x.current,ae=G==null?void 0:G.form;if(!Q||!(ae!=null&&ae.setFieldValue)){B(!1);return}const le=_.filter(Z=>Z.type==="user").slice(0,100).map(Z=>({id:Z.id,label:Z.label,subLabel:Z.subLabel||"\u6B64\u5904\u662F\u90E8\u95E8\u540D\u79F0"}));ae.setFieldValue(Q,le),B(!1),S(null)},[g,_]);return k(yu,{title:i(a==="list"?"dashboard.title":s==="create"?"pages.createTitle":"pages.editTitle"),description:a==="list"?i("dashboard.description"):"",goBack:a==="list"?void 0:M,styles:$,CustomComponents:n,children:a==="list"?te(ym,{className:"reviewsetting-wrapper",children:[k("div",{className:"reviewsetting-tips-container px-[18px]",children:te(Cm,{className:"reviewsetting-tips",children:[te(bm,{className:"reviewsetting-tips-left",children:[k(Em,{className:"reviewsetting-tips-title",children:i("tips.title")}),te(Fm,{className:"reviewsetting-tips-desc",children:[k("span",{className:"reviewsetting-tips-info-icon",children:"i"}),k("span",{className:"reviewsetting-tips-desc-text",children:i("tips.description")})]})]}),te(wm,{className:"reviewsetting-tips-right",children:[te(fu,{className:"reviewsetting-switch-item",children:[k("span",{className:"reviewsetting-switch-label",children:i("tips.uploadReviewToggle")}),te("label",{className:"reviewsetting-switch",children:[k("input",{type:"checkbox",checked:b,onChange:Q=>{const G=Q.target.checked;E(G),e==null||e("reviewsetting_tips_upload_review_toggle_changed",{checked:G},null)}}),k("span",{className:"reviewsetting-switch-slider"})]})]}),te(fu,{className:"reviewsetting-switch-item",children:[k("span",{className:"reviewsetting-switch-label",children:i("tips.deleteReviewToggle")}),te("label",{className:"reviewsetting-switch",children:[k("input",{type:"checkbox",checked:F,onChange:Q=>{const G=Q.target.checked;A(G),e==null||e("reviewsetting_tips_delete_review_toggle_changed",{checked:G},null)}}),k("span",{className:"reviewsetting-switch-slider"})]})]})]})]})}),k(Am,{className:"reviewsetting-table-wrap",children:k(to,{...re},"review-setting-table")})]}):te(Bm,{className:"reviewsetting-form-wrap",children:[k(Sm,{className:"reviewsetting-form-centered",children:k(to,{...se},`review-setting-form-${s}-${u??"new"}`)}),k(Dm,{className:"reviewsetting-form-footer-bar",children:te(_m,{className:"reviewsetting-form-footer-inner",children:[k(yr,{onClick:N,children:"\u53D6\u6D88"}),k(yr,{type:"primary",onClick:O,children:"\u786E\u8BA4"})]})}),k(ea,{title:"\u6DFB\u52A0\u7528\u6237",open:w,width:700,onCancel:()=>{B(!1),S(null)},footer:[k(yr,{onClick:()=>{B(!1),S(null)},children:"\u53D6\u6D88"},"cancel"),k(yr,{type:"primary",onClick:De,children:"\u786E\u5B9A"},"ok")],children:k(Tc,{treeData:Ya,value:_,onChange:Q=>R(Q.filter(G=>G.type==="user")),maxCount:100,searchMode:"auto",leftPaneMode:"breadcrumb",onSearch:async Q=>{const G=Q.trim().toLowerCase();return G?Ya.flatMap(le=>le.children||[]).filter(le=>le.type==="user"&&String(le.label).toLowerCase().includes(G)):Ya},height:"360px"})})]})})}function _2({locale:t="zh",messages:r,...e}){return k(pm,{locale:t,messages:r,children:k(mm,{...e})})}const ym=Je.div.attrs({className:"reviewsetting-wrapper"})`
313
+ width: 100%;
314
+ flex: 1 1 0;
315
+ min-height: 0;
316
+ display: flex;
317
+ flex-direction: column;
318
+ gap: 12px;
319
+
320
+ border-radius: ${({theme:t})=>{var r,e;return((r=t.space)==null?void 0:r.dashboardContentRadius)??((e=t.space)==null?void 0:e.radius)??"8px"}};
321
+ background: ${({theme:t})=>{var r,e;return((r=t.colors)==null?void 0:r.dashboardMainBackground)??((e=t.colors)==null?void 0:e.background)??"#fff"}};
322
+ overflow: hidden;
323
+ `,Cm=Je.div.attrs({className:"reviewsetting-tips"})`
324
+ width: 100%;
325
+ box-sizing: border-box;
326
+ padding: 10px 12px;
327
+ margin: 12px 0;
328
+ border-radius: 10px;
329
+ border: 1px solid rgba(226, 232, 240, 0.95);
330
+ background: rgba(248, 250, 252, 1);
331
+ color: rgba(15, 23, 42, 0.78);
332
+ display: flex;
333
+ align-items: center;
334
+ justify-content: space-between;
335
+ gap: 16px;
336
+ flex-wrap: wrap;
337
+ `,bm=Je.div.attrs({className:"reviewsetting-tips-left"})`
338
+ flex: 1 1 420px;
339
+ min-width: 320px;
340
+ display: flex;
341
+ align-items: center;
342
+ gap: 12px;
343
+ min-height: 32px;
344
+ `,Em=Je.div.attrs({className:"reviewsetting-tips-title"})`
345
+ flex: 0 0 auto;
346
+ font-size: 14px;
347
+ font-weight: 600;
348
+ color: rgba(15, 23, 42, 0.92);
349
+ white-space: nowrap;
350
+ `,Fm=Je.div.attrs({className:"reviewsetting-tips-desc"})`
351
+ flex: 1 1 auto;
352
+ min-width: 0;
353
+ display: flex;
354
+ align-items: center;
355
+ gap: 8px;
356
+ font-size: 12px;
357
+ line-height: 18px;
358
+ color: rgba(71, 85, 105, 1);
359
+
360
+ & .reviewsetting-tips-desc-text {
361
+ display: block;
362
+ min-width: 0;
363
+ overflow: hidden;
364
+ text-overflow: ellipsis;
365
+ white-space: nowrap;
366
+ }
367
+
368
+ & .reviewsetting-tips-info-icon {
369
+ flex: 0 0 auto;
370
+ width: 16px;
371
+ height: 16px;
372
+ border-radius: 50%;
373
+ display: inline-flex;
374
+ align-items: center;
375
+ justify-content: center;
376
+ font-size: 12px;
377
+ font-weight: 700;
378
+ color: rgba(71, 85, 105, 1);
379
+ background: rgba(226, 232, 240, 1);
380
+ }
381
+ `,wm=Je.div.attrs({className:"reviewsetting-tips-right"})`
382
+ flex: 0 0 auto;
383
+ display: flex;
384
+ align-items: center;
385
+ gap: 18px;
386
+ white-space: nowrap;
387
+ `,fu=Je.div.attrs({className:"reviewsetting-switch-item"})`
388
+ display: inline-flex;
389
+ align-items: center;
390
+ gap: 10px;
391
+
392
+ & .reviewsetting-switch-label {
393
+ font-size: 12px;
394
+ color: rgba(51, 65, 85, 1);
395
+ }
396
+
397
+ /* 轻量自定义 switch,视觉更贴近截图 */
398
+ & .reviewsetting-switch {
399
+ position: relative;
400
+ width: 44px;
401
+ height: 22px;
402
+ display: inline-flex;
403
+ align-items: center;
404
+ }
405
+ & .reviewsetting-switch input {
406
+ opacity: 0;
407
+ width: 0;
408
+ height: 0;
409
+ }
410
+ & .reviewsetting-switch-slider {
411
+ position: absolute;
412
+ inset: 0;
413
+ border-radius: 999px;
414
+ background: rgba(203, 213, 225, 1);
415
+ transition: background 0.18s ease;
416
+ box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.35);
417
+ }
418
+ & .reviewsetting-switch-slider::before {
419
+ content: '';
420
+ position: absolute;
421
+ width: 18px;
422
+ height: 18px;
423
+ left: 2px;
424
+ top: 2px;
425
+ border-radius: 999px;
426
+ background: #fff;
427
+ transition: transform 0.18s ease;
428
+ box-shadow: 0 1px 2px rgba(15, 23, 42, 0.18);
429
+ }
430
+ & .reviewsetting-switch input:checked + .reviewsetting-switch-slider {
431
+ background: rgba(29, 112, 245, 1);
432
+ box-shadow: inset 0 0 0 1px rgba(29, 112, 245, 0.35);
433
+ }
434
+ & .reviewsetting-switch input:checked + .reviewsetting-switch-slider::before {
435
+ transform: translateX(22px);
436
+ }
437
+ `,Am=Je.div.attrs({className:"reviewsetting-table-wrap"})`
438
+ width: 100%;
439
+ flex: 1 1 0;
440
+ min-height: 0;
441
+ display: flex;
442
+ flex-direction: column;
443
+ overflow: hidden;
444
+
445
+ & > .xviewer-container {
446
+ min-height: 0;
447
+ flex: 1 1 0;
448
+ }
449
+ & .xviewer-content-area,
450
+ & .xviewer-table-loading-wrap {
451
+ min-height: 0;
452
+ }
453
+ `,Bm=Je.div.attrs({className:"reviewsetting-form-wrap"})`
454
+ width: 100%;
455
+ flex: 1 1 0;
456
+ min-height: 0;
457
+ display: flex;
458
+ flex-direction: column;
459
+ align-items: center;
460
+ box-sizing: border-box;
461
+ background: white;
462
+ overflow: hidden;
463
+ `,Sm=Je.div.attrs({className:"reviewsetting-form-centered"})`
464
+ width: 100%;
465
+ max-width: 800px;
466
+ margin: 0 auto;
467
+ flex: 1 1 0;
468
+ min-height: 0;
469
+ display: flex;
470
+ flex-direction: column;
471
+
472
+ & > .xviewer-container {
473
+ width: 100%;
474
+ max-width: 800px;
475
+ min-height: 0;
476
+ flex: 1 1 0;
477
+ display: flex;
478
+ flex-direction: column;
479
+ overflow: hidden;
480
+ }
481
+
482
+ /* DynamicForm(antd Form):首项为开关行,其余项落在同一浅灰底块内 */
483
+ & .zui-dynamic-form-wrapper form.ant-form {
484
+ display: flex;
485
+ flex-direction: column;
486
+ gap: 0;
487
+ }
488
+
489
+ & .zui-dynamic-form-wrapper form.ant-form > .ant-form-item:first-child {
490
+ background: transparent;
491
+ margin-bottom: 0 !important;
492
+ padding: 12px;
493
+ border-radius: 8px;
494
+ background: rgba(248, 250, 252, 1);
495
+ }
496
+
497
+ & .zui-dynamic-form-wrapper form.ant-form > .ant-form-item:nth-child(n + 2) {
498
+
499
+ margin-bottom: 0 !important;
500
+ padding: 12px 16px;
501
+ border-radius: 0;
502
+ }
503
+
504
+ /* 灰底区首行:仅当后面还有表单项时保留上圆角 */
505
+ & .zui-dynamic-form-wrapper form.ant-form > .ant-form-item:nth-child(2):not(:last-child) {
506
+ border-radius: 8px 8px 0 0;
507
+ padding-top: 16px;
508
+ }
509
+
510
+ /* 仅「开关 + 一项」时:整段灰底为一块圆角 */
511
+ & .zui-dynamic-form-wrapper form.ant-form > .ant-form-item:nth-child(2):last-child {
512
+ border-radius: 8px;
513
+ padding-top: 16px;
514
+ padding-bottom: 16px;
515
+ }
516
+
517
+ /* 灰底区末行(三项及以上时) */
518
+ & .zui-dynamic-form-wrapper form.ant-form > .ant-form-item:last-child:not(:first-child):not(:nth-child(2)) {
519
+ border-radius: 0 0 8px 8px;
520
+ padding-bottom: 16px;
521
+ }
522
+
523
+ & .zui-dynamic-form-wrapper form.ant-form > .ant-form-item:nth-child(n + 2):not(:last-child) {
524
+ border-bottom: 1px solid rgba(226, 232, 240, 0.7);
525
+ }
526
+ `,Dm=Je.div.attrs({className:"reviewsetting-form-footer-bar"})`
527
+ width: 100%;
528
+ flex: 0 0 auto;
529
+ background: #fff;
530
+ border-top: 1px solid rgba(226, 232, 240, 0.95);
531
+ padding: 12px 20px;
532
+ box-sizing: border-box;
533
+ `,_m=Je.div.attrs({className:"reviewsetting-form-footer-inner"})`
534
+ width: 100%;
535
+ display: flex;
536
+ justify-content: flex-end;
537
+ align-items: center;
538
+ gap: 12px;
539
+ `;Je.div.attrs({className:"reviewsetting-form-card"})`
540
+ width: 100%;
541
+ flex: 1 1 0;
542
+ min-height: 360px;
543
+ border-radius: 10px;
544
+ background: #fff;
545
+ border: 1px solid rgba(226, 232, 240, 0.95);
546
+ box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
547
+ padding: 18px 18px 14px 18px;
548
+ display: flex;
549
+ flex-direction: column;
550
+ overflow: hidden;
551
+ `;Je.div.attrs({className:"reviewsetting-form-inner"})`
552
+ width: 100%;
553
+ flex: 1 1 0;
554
+ min-height: 0;
555
+ display: flex;
556
+ flex-direction: column;
557
+ `;Je.div.attrs({className:"reviewsetting-xviewer-form-root"})`
558
+ width: 100%;
559
+ flex: 1 1 0;
560
+ min-height: 0;
561
+ overflow-y: auto;
562
+ display: flex;
563
+ flex-direction: column;
564
+
565
+ & > .xviewer-container {
566
+ min-height: 0;
567
+ flex: 1 1 0;
568
+ }
569
+ & .xviewer-content-area {
570
+ min-height: 280px;
571
+ }
572
+ & .zui-dynamic-form-wrapper {
573
+ height: auto !important;
574
+ min-height: 240px;
575
+ }
576
+ `;Je.div.attrs({className:"reviewsetting-form-body"})`
577
+ flex: 1 1 0;
578
+ min-height: 0;
579
+ overflow-y: auto;
580
+ padding-bottom: 12px;
581
+ `;Je.div.attrs({className:"reviewsetting-form-footer"})`
582
+ flex: 0 0 auto;
583
+ padding-top: 12px;
584
+ margin-top: 8px;
585
+ border-top: 1px solid rgba(226, 232, 240, 0.95);
586
+ display: flex;
587
+ justify-content: flex-end;
588
+ gap: 24px;
589
+ background: #fff;
590
+ `;const Qa=({placeholder:t,value:r,onAction:e,size:n="md"})=>te("div",{className:"reviewsetting-toolbar-search",style:{height:n==="sm"?32:36,display:"flex",alignItems:"center",gap:8,padding:"0 10px",borderRadius:10,border:"1px solid rgba(226,232,240,0.95)",background:"#fff",boxShadow:"0 1px 2px rgba(15,23,42,0.04)"},children:[k("span",{style:{color:"#94a3b8",fontSize:14,lineHeight:"14px"},children:"\u2315"}),k("input",{value:r||"",placeholder:t,onChange:a=>e==null?void 0:e("change",{value:a.target.value}),style:{border:"none",outline:"none",fontSize:13,width:180,color:"#0f172a",background:"transparent"}})]}),km=[{id:"rm-1",fileName:"\u4E2A\u4EBA\u4F4F\u623F\u8D37\u6B3E\u4E1A\u52A1\u64CD\u4F5C\u89C4\u8303.docx",knowledgeType:"\u77E5\u8BC6\u5E93",operationType:"\u4E0A\u4F20",reviewStatus:"\u5BA1\u6838\u4E2D",creator:"\u5F20\u4E09",firstReviewer:"-",secondReviewer:"-",uploadTime:"2025-10-18 11:48",firstReviewTime:"2025-10-28 11:48"},{id:"rm-2",fileName:"\u501F\u6B3E\u4EBA\u5F81\u4FE1\u6388\u6743\u4E66.pdf",knowledgeType:"\u77E5\u8BC6\u5E93",operationType:"\u4E0A\u4F20",reviewStatus:"\u5BA1\u6838\u4E2D",creator:"\u5F20\u4E09",firstReviewer:"-",secondReviewer:"-",uploadTime:"2025-10-19 11:48",firstReviewTime:"2025-10-28 11:48"},{id:"rm-3",fileName:"\u4E2A\u4EBA\u4F4F\u623F\u8D37\u6B3E\u4E1A\u52A1\u6D41\u7A0B\u56FE.vsdx",knowledgeType:"\u77E5\u8BC6\u5E93",operationType:"\u4E0A\u4F20",reviewStatus:"\u590D\u5BA1\u4E2D",creator:"\u5F20\u4E09",firstReviewer:"\u674E\u56DB",secondReviewer:"-",uploadTime:"2025-10-20 11:48",firstReviewTime:"2025-10-28 11:48"},{id:"rm-4",fileName:"\u8D37\u6B3E\u5408\u540C.docx",knowledgeType:"\u77E5\u8BC6\u5E93",operationType:"\u5220\u9664",reviewStatus:"\u5BA1\u6838\u4E2D",creator:"\u5F20\u4E09",firstReviewer:"-",secondReviewer:"-",uploadTime:"2025-10-21 11:48",firstReviewTime:"2025-10-28 11:48"},{id:"rm-5",fileName:"\u5F81\u4FE1\u6388\u6743\u4E66.ppt",knowledgeType:"\u77E5\u8BC6\u5E93",operationType:"\u4E0A\u4F20",reviewStatus:"\u5BA1\u6838\u4E2D",creator:"\u5F20\u4E09",firstReviewer:"-",secondReviewer:"-",uploadTime:"2025-10-22 11:48",firstReviewTime:"2025-10-28 11:48"},{id:"rm-6",fileName:"\u5BA2\u6237\u98CE\u9669\u8BC4\u4F30\u8868.xlsx",knowledgeType:"\u6570\u636E\u5E93",operationType:"\u5220\u9664",reviewStatus:"\u590D\u5BA1\u4E2D",creator:"\u5F20\u4E09",firstReviewer:"\u674E\u56DB",secondReviewer:"-",uploadTime:"2025-10-23 11:48",firstReviewTime:"2025-10-28 11:48"},{id:"rm-7",fileName:"\u5BA2\u6237\u98CE\u9669\u8BC4\u4F30\u8BF4\u660E.docx",knowledgeType:"\u77E5\u8BC6\u5E93",operationType:"\u4E0A\u4F20",reviewStatus:"\u5BA1\u6838\u4E2D",creator:"\u5F20\u4E09",firstReviewer:"-",secondReviewer:"-",uploadTime:"2025-10-24 11:48",firstReviewTime:"2025-10-28 11:48"},{id:"rm-8",fileName:"2026\u5E74\u8D37\u6B3E\u5408\u540C.pdf",knowledgeType:"\u77E5\u8BC6\u5E93",operationType:"\u5220\u9664",reviewStatus:"\u5BA1\u6838\u4E2D",creator:"\u5F20\u4E09",firstReviewer:"-",secondReviewer:"-",uploadTime:"2025-10-25 11:48",firstReviewTime:"2025-10-28 11:48"},{id:"rm-9",fileName:"2026\u5BA2\u6237\u98CE\u9669\u8BC4\u4F30\u62A5\u8868.xlsx",knowledgeType:"\u6570\u636E\u5E93",operationType:"\u4E0A\u4F20",reviewStatus:"\u5BA1\u6838\u4E2D",creator:"\u5F20\u4E09",firstReviewer:"-",secondReviewer:"-",uploadTime:"2025-10-26 11:48",firstReviewTime:"2025-10-28 11:48"}],Rm=({onAction:t})=>k(as,{className:"reviewmanage-toolbar-control-wrap",children:k(gu,{size:"middle",style:{width:110},placeholder:"\u6279\u91CF\u64CD\u4F5C",options:[{label:"\u6279\u91CF\u64CD\u4F5C",value:""},{label:"\u6279\u91CF\u5BA1\u6838\u901A\u8FC7",value:"approve"},{label:"\u6279\u91CF\u5BA1\u6838\u62D2\u7EDD",value:"reject"}],onChange:r=>t==null?void 0:t("change",{value:r})})}),Tm=({onAction:t})=>k(as,{className:"reviewmanage-toolbar-control-wrap",children:k(gu,{mode:"multiple",size:"middle",style:{width:180},placeholder:"\u5BA1\u6838\u4E2D",maxTagCount:"responsive",options:[{label:"\u5BA1\u6838\u4E2D",value:"\u5BA1\u6838\u4E2D"},{label:"\u590D\u5BA1\u4E2D",value:"\u590D\u5BA1\u4E2D"}],onChange:r=>t==null?void 0:t("change",{value:r})})}),pu=({placeholder:t,onAction:r})=>te(Hm,{className:"reviewmanage-toolbar-search-wrap",children:[k("input",{className:"reviewmanage-toolbar-search-input",placeholder:t,onChange:e=>r==null?void 0:r("change",{value:e.target.value})}),k(ra,{size:14,color:"#98A2B3"})]}),Im=({onAction:t})=>{const[r,e]=ue(null);return k(as,{className:"reviewmanage-toolbar-control-wrap",children:k(Rc.RangePicker,{size:"middle",style:{width:250},value:r,onChange:n=>{var a,o;const i=n??null;e(i),t==null||t("change",{startTime:((a=i==null?void 0:i[0])==null?void 0:a.format("YYYY-MM-DD"))??"",endTime:((o=i==null?void 0:i[1])==null?void 0:o.format("YYYY-MM-DD"))??""})},placeholder:["\u5F00\u59CB\u65F6\u95F4","\u7ED3\u675F\u65F6\u95F4"]})})},Pm=({value:t})=>te(Vm,{className:"reviewmanage-status-cell","data-status":t,children:[t==="\u5BA1\u6838\u4E2D"?k("span",{className:"reviewmanage-status-spinner","aria-label":"loading"}):k("span",{className:"reviewmanage-status-dot"}),k("span",{className:"reviewmanage-status-text",children:t})]});function Nm(t){var e;const r=((e=(t||"").split(".").pop())==null?void 0:e.toLowerCase())||"";return r==="pdf"?"rag/pdf":r==="ofd"?"rag/ofd":["doc","docx"].includes(r)?"rag/word":["xls","xlsx","xlsm","xlsb","xltx","xltm","xlt","xlam"].includes(r)?"rag/excel":["ppt","pptx"].includes(r)?"rag/ppt":["txt","md"].includes(r)?"rag/txt":["zip","rar","7z"].includes(r)?"rag/zip":"rag/file"}const Om=({value:t})=>te(jm,{className:"reviewmanage-filename-cell",children:[k("span",{className:"reviewmanage-filename-icon",children:k(mu,{type:Nm(t),size:16})}),k("span",{className:"reviewmanage-filename-text",title:t,children:t})]}),Mm=({value:t})=>k(Um,{className:"reviewmanage-knowledge-tag","data-kind":t==="\u6570\u636E\u5E93"?"database":"knowledge",children:t});function Lm(t){if(t==null)return[];if(Array.isArray(t))return t.map(e=>String(e??"").trim()).filter(e=>e&&e!=="-"&&e!=="\u2014");const r=String(t).trim();return!r||r==="-"||r==="\u2014"?[]:r.split(/[、,,\s]+/g).map(e=>e.trim()).filter(e=>e&&e!=="-"&&e!=="\u2014")}const hu=({value:t})=>{const r=Lm(t);if(!r.length)return k("span",{children:"-"});const e=3;if(r.length<=e)return k("span",{children:r.join("\u3001")});const n=r.slice(0,e);return te(Wm,{className:"reviewmanage-reviewers-cell",title:r.join("\u3001"),children:[n.join("\u3001"),"...\u7B49",r.length,"\u4EBA"]})},$m=({row:t,cell:r,emit:e})=>{const n=Array.isArray(r==null?void 0:r.actions)?r.actions:[];return k(Km,{className:"reviewmanage-action-cell",children:n.map(i=>k("button",{type:"button",className:"reviewmanage-action-link",onClick:()=>e==null?void 0:e(`table_action_${i.value}`,{id:t==null?void 0:t.id}),children:i.label},i.value))})};function zm(t){return t==="\u590D\u5BA1\u4E2D"?[{value:"second_approve",label:"\u590D\u5BA1\u901A\u8FC7"},{value:"second_reject",label:"\u590D\u5BA1\u62D2\u7EDD"},{value:"detail",label:"\u67E5\u770B"}]:[{value:"first_approve",label:"\u5BA1\u6838\u901A\u8FC7"},{value:"first_reject",label:"\u5BA1\u6838\u62D2\u7EDD"},{value:"detail",label:"\u67E5\u770B"}]}function k2({styles:t,CustomComponents:r,eventsEmit:e}){const n=Lo(),i=Te(()=>yn(yn({theme:Hn,mode:"light"},n||{}),t||{}),[n,t]),[a,o]=ue(""),[s,c]=ue([]),[u,l]=ue(""),[x,f]=ue(""),[m,v]=ue(""),[p,d]=ue(""),[y,h]=ue([]),C=Te(()=>{const F=u.trim().toLowerCase(),A=x.trim().toLowerCase();return km.filter(w=>{const B=s.length===0?!0:s.includes(String(w.reviewStatus)),g=F?`${w.knowledgeType}${w.operationType}${w.creator}`.toLowerCase().includes(F):!0,S=A?w.fileName.toLowerCase().includes(A):!0,_=m?gr(w.uploadTime).isAfter(gr(m).startOf("day"))||gr(w.uploadTime).isSame(gr(m).startOf("day")):!0,R=p?gr(w.uploadTime).isBefore(gr(p).endOf("day"))||gr(w.uploadTime).isSame(gr(p).endOf("day")):!0;return B&&g&&S&&_&&R})},[s,u,x,m,p]),b=Te(()=>C.map(F=>({id:F.id,data:[{columnId:"fileName",value:F.fileName,type:"customized"},{columnId:"knowledgeType",value:F.knowledgeType,type:"customized"},{columnId:"operationType",value:F.operationType,type:"text"},{columnId:"reviewStatus",value:F.reviewStatus,type:"customized"},{columnId:"creator",value:F.creator,type:"text"},{columnId:"firstReviewer",value:F.firstReviewer,type:"customized"},{columnId:"secondReviewer",value:F.secondReviewer,type:"customized"},{columnId:"uploadTime",value:F.uploadTime,type:"text"},{columnId:"firstReviewTime",value:F.firstReviewTime,type:"text"},{columnId:"actions",value:"actions",type:"customized",actions:zm(F.reviewStatus)}]})),[C]),E=Te(()=>({label:"",model:null,defaultActiveId:"review-manage-table",views:[{id:"review-manage-table",label:"",type:"table",allowMultiSelect:!0,viewBehavior:"pagination",viewPageSize:10,toolbar:[{type:"customized",key:"batch_action",component:Rm,position:"left"},{type:"customized",key:"status_filter",component:Tm,position:"right"},{type:"customized",key:"enterprise_search",component:pu,position:"right",componentProps:{placeholder:"\u8F93\u5165\u4F01\u4E1A\u5E93\u540D\u641C\u7D22"}},{type:"customized",key:"file_search",component:pu,position:"right",componentProps:{placeholder:"\u8F93\u5165\u5BA1\u6838\u6587\u4EF6\u540D\u641C\u7D22"}},{type:"customized",key:"time_range",component:Im,position:"right"}],columns:[{title:"\u5F85\u5BA1\u6838\u6587\u4EF6\u540D",id:"fileName",type:"customized",component:Om},{title:"\u77E5\u8BC6\u7C7B\u578B",id:"knowledgeType",type:"customized",component:Mm},{title:"\u64CD\u4F5C\u7C7B\u522B",id:"operationType",type:"text"},{title:"\u5BA1\u6838\u72B6\u6001",id:"reviewStatus",type:"customized",component:Pm},{title:"\u5F55\u5165\u5458",id:"creator",type:"text"},{title:"\u521D\u5BA1\u4EBA\u5458",id:"firstReviewer",type:"customized",component:hu},{title:"\u590D\u5BA1\u4EBA\u5458",id:"secondReviewer",type:"customized",component:hu},{title:"\u4E0A\u4F20\u65F6\u95F4",id:"uploadTime",type:"text"},{title:"\u521D\u5BA1\u5BA1\u6838\u65F6\u95F4",id:"firstReviewTime",type:"text"},{title:"\u64CD\u4F5C",id:"actions",type:"customized",component:$m}]}],dataSource:b,styles:i,CustomComponents:r,eventsEmit:(F,A,w)=>{if(F==="toolbar_batch_action_change"){const g=String((A==null?void 0:A.value)??"");o(g),g&&y.length>0&&lt.success(`\u5DF2\u89E6\u53D1\u6279\u91CF\u64CD\u4F5C\uFF1A${g}`)}F==="toolbar_status_filter_change"&&c(Array.isArray(A==null?void 0:A.value)?A.value:[]),F==="toolbar_enterprise_search_change"&&l(String((A==null?void 0:A.value)??"")),F==="toolbar_file_search_change"&&f(String((A==null?void 0:A.value)??"")),F==="toolbar_time_range_change"&&(v(String((A==null?void 0:A.startTime)??"")),d(String((A==null?void 0:A.endTime)??"")));const B=(Array.isArray(A==null?void 0:A.selectedIds)?A.selectedIds:void 0)??(Array.isArray(A==null?void 0:A.selectedKeys)?A.selectedKeys:void 0)??(Array.isArray(A==null?void 0:A.selectedRowKeys)?A.selectedRowKeys:void 0);B&&h(B.map(g=>String(g))),e==null||e(`reviewmanage_${F}`,{...A,batchAction:a,selectedIds:y},w)}}),[r,a,e,i,y,b]);return k(yu,{title:"\u5BA1\u6838\u7BA1\u7406",description:"\u652F\u6301\u6309\u72B6\u6001\u3001\u5173\u952E\u8BCD\u3001\u65F6\u95F4\u7B5B\u9009\u5F85\u5BA1\u4EFB\u52A1\uFF0C\u5E76\u6267\u884C\u5BA1\u6838\u52A8\u4F5C\u3002",styles:i,CustomComponents:r,children:k(qm,{className:"reviewmanage-page-wrap",children:k(to,{...E},"review-manage-table")})})}const qm=Je.div.attrs({className:"reviewmanage-page-wrap"})`
591
+ width: 100%;
592
+ height: 100%;
593
+ min-height: 0;
594
+ display: flex;
595
+ flex-direction: column;
596
+
597
+ .xviewer-container {
598
+ flex: 1 1 0;
599
+ min-height: 0;
600
+ }
601
+ `,as=Je.div.attrs({className:"reviewmanage-toolbar-control-wrap"})`
602
+ display: inline-flex;
603
+ align-items: center;
604
+
605
+ /* 统一 antd 输入控件视觉规格:高度/圆角/边框/字号 */
606
+ :global(.ant-select-selector) {
607
+ height: 32px !important;
608
+ border-radius: 8px !important;
609
+ border-color: #d0d5dd !important;
610
+ box-shadow: none !important;
611
+ }
612
+ :global(.ant-select-selection-search-input) {
613
+ height: 32px !important;
614
+ }
615
+ :global(.ant-select-selection-item),
616
+ :global(.ant-select-selection-placeholder) {
617
+ line-height: 30px !important;
618
+ font-size: 12px;
619
+ color: #344054;
620
+ }
621
+ :global(.ant-picker) {
622
+ height: 32px !important;
623
+ border-radius: 8px !important;
624
+ border-color: #d0d5dd !important;
625
+ box-shadow: none !important;
626
+ }
627
+ :global(.ant-picker-input > input) {
628
+ font-size: 12px;
629
+ color: #344054;
630
+ }
631
+ `,Hm=Je.div.attrs({className:"reviewmanage-toolbar-search-wrap"})`
632
+ height: 32px;
633
+ min-width: 220px;
634
+ padding: 0 10px 0 12px;
635
+ border-radius: 8px;
636
+ border: 1px solid #d0d5dd;
637
+ background: #fff;
638
+ display: inline-flex;
639
+ align-items: center;
640
+ gap: 8px;
641
+
642
+ .reviewmanage-toolbar-search-input {
643
+ flex: 1;
644
+ min-width: 0;
645
+ border: none;
646
+ outline: none;
647
+ font-size: 12px;
648
+ color: #344054;
649
+ background: transparent;
650
+ }
651
+ `,Vm=Je.div.attrs({className:"reviewmanage-status-cell"})`
652
+ display: inline-flex;
653
+ align-items: center;
654
+ gap: 6px;
655
+ color: #1f2937;
656
+
657
+ .reviewmanage-status-dot {
658
+ width: 8px;
659
+ height: 8px;
660
+ border-radius: 999px;
661
+ background: #d1d5db;
662
+ box-shadow: 0 0 0 2px rgba(148, 163, 184, 0.15);
663
+ }
664
+
665
+ .reviewmanage-status-spinner {
666
+ width: 14px;
667
+ height: 14px;
668
+ border-radius: 999px;
669
+ border: 2px solid rgba(59, 130, 246, 0.25);
670
+ border-top-color: rgba(59, 130, 246, 1);
671
+ animation: reviewmanage-spin 0.9s linear infinite;
672
+ box-sizing: border-box;
673
+ }
674
+
675
+ @keyframes reviewmanage-spin {
676
+ from {
677
+ transform: rotate(0deg);
678
+ }
679
+ to {
680
+ transform: rotate(360deg);
681
+ }
682
+ }
683
+
684
+ &[data-status='复审中'] {
685
+ .reviewmanage-status-dot {
686
+ background: #60a5fa;
687
+ box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.14);
688
+ }
689
+ }
690
+ `,jm=Je.div.attrs({className:"reviewmanage-filename-cell"})`
691
+ display: inline-flex;
692
+ align-items: center;
693
+ gap: 10px;
694
+ min-width: 0;
695
+
696
+ .reviewmanage-filename-icon {
697
+ display: inline-flex;
698
+ align-items: center;
699
+ justify-content: center;
700
+ width: 22px;
701
+ height: 22px;
702
+ border-radius: 6px;
703
+ background: rgba(59, 130, 246, 0.06);
704
+ flex-shrink: 0;
705
+ }
706
+
707
+ .reviewmanage-filename-text {
708
+ min-width: 0;
709
+ max-width: 340px;
710
+ overflow: hidden;
711
+ text-overflow: ellipsis;
712
+ white-space: nowrap;
713
+ color: #111827;
714
+ }
715
+ `,Um=Je.span.attrs({className:"reviewmanage-knowledge-tag"})`
716
+ display: inline-flex;
717
+ align-items: center;
718
+ justify-content: center;
719
+ height: 22px;
720
+ padding: 0 10px;
721
+ border-radius: 10px;
722
+ font-size: 12px;
723
+ font-weight: 500;
724
+ border: 1px solid transparent;
725
+ user-select: none;
726
+
727
+ &[data-kind='knowledge'] {
728
+ color: #1d4ed8;
729
+ background: rgba(37, 99, 235, 0.10);
730
+ border-color: rgba(37, 99, 235, 0.18);
731
+ }
732
+
733
+ &[data-kind='database'] {
734
+ color: #6d28d9;
735
+ background: rgba(109, 40, 217, 0.10);
736
+ border-color: rgba(109, 40, 217, 0.18);
737
+ }
738
+ `,Wm=Je.span.attrs({className:"reviewmanage-reviewers-cell"})`
739
+ display: inline-block;
740
+ max-width: 180px;
741
+ overflow: hidden;
742
+ text-overflow: ellipsis;
743
+ white-space: nowrap;
744
+ `,Km=Je.div.attrs({className:"reviewmanage-action-cell"})`
745
+ display: inline-flex;
746
+ align-items: center;
747
+ gap: 10px;
748
+
749
+ .reviewmanage-action-link {
750
+ border: none;
751
+ background: transparent;
752
+ color: #1d4ed8;
753
+ font-size: 12px;
754
+ padding: 0;
755
+ cursor: pointer;
756
+ }
757
+ `;export{tc as D,D2 as L,_2 as R,ac as a,pm as b,fm as c,k2 as d,sm as g,S2 as u,B2 as w};