@gientech/modual 2.2.41 → 2.2.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/ReviewSetting-Dcg5ju8N.js +590 -0
- package/assets/{client-CrZFhU4y.js → client-BmW1Zxct.js} +1 -1
- package/assets/{index-BrQsYGxa.js → index-DqWRiOL5.js} +71 -71
- package/assets/{index-CRT1eo34.js → index-_mBM2P0I.js} +52 -52
- package/assets/style.css +1 -1
- package/assets/style2.css +1 -1
- package/assets/style7.css +1 -1
- package/chat.js +1 -1
- package/chatCompare.js +1 -1
- package/index.d.ts +81 -0
- package/index.js +1 -1
- package/oprecords.d.ts +0 -1
- package/oprecords.js +1 -1
- package/package.json +5 -5
- package/assets/style-C3f3L0UN.js +0 -269
|
@@ -0,0 +1,590 @@
|
|
|
1
|
+
import{jsx as T,jsxs as ne,Fragment as Ln}from"react/jsx-runtime";import*as L from"react";import ye,{createElement as ya,PureComponent as ic,useState as le,useMemo as Me,createContext as aa,Children as ac,cloneElement as oc,Component as sc,useRef as Ue,useEffect as Le,useContext as yr,version as uc,isValidElement as lc,useLayoutEffect as cc,useCallback as jt}from"react";import Nt from"axios";import{AiChat as fc,validateFileUpload as dc,showValidationErrors as pc}from"@mxmweb/aichat";import{mergeLiveChunkToNodes as hc,ChatMessageAdapter as es}from"@mxmweb/rtext";import{Dropdown as vc,Input as ou,Popover as xc,message as Ct,Skeleton as Wn,Button as vr,ConfigProvider as oa,Modal as Xi,Form as ts,Table as gc,Pagination as mc,Empty as yc,Tooltip as Rn,Drawer as su}from"antd";import{u as gr}from"./index-CpW6Dhpp.js";import{Icon as Cc,defaultTheme as sa,useTheme as uu,deepMergeTheme as Yi,DashboardContainer as bc,DeptUserSelector as Fc}from"@mxmweb/zui";import{_ as Io,a as Rt,b as _e,w as Er,c as Te,d as It,e as Tt,f as H,h as lu,i as Ua,j as Ec,k as xe,l as wc,m as Mr,n as J,o as ge,u as dn,r as cu,p as Ac,q as Bc,s as Sc,t as Dc,F as kt,v as Qi,x as Ca,y as ba,z as Cn,A as Or,B as mr,I as _c,C as Wr,D as Ot,E as bn,g as fu,G as kc,H as Fa}from"./index-_mBM2P0I.js";import rs from"dayjs";import{c as Gr}from"./createLucideIcon-Bj5DlX2s.js";import{P as Rc}from"./plus-B679mjyt.js";import{S as Wa}from"./search-CEuIa9-_.js";import{X as To}from"./x-CdZQbi--.js";import*as Ic from"react-dom";import ns,{createPortal as Tc}from"react-dom";import{f as Pc,r as Nc,a as Oc,c as Mc,B as Lc,z as $c,d as du,g as pu,b as hu,e as Ga,h as Po,i as Ka,D as zc,j as qc,T as Xa,k as Ea,l as Hc,m as Vc,n as jc,o as Uc,G as Wc,p as Gc,W as Kc,q as vu,s as Xc,t as Yc,u as Qc,F as Zc,v as is,w as wa,x as Jc,y as ef,A as tf,E as rf,H as nf}from"./index-DqWRiOL5.js";import{a as af,C as of,G as xu}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 ht from"styled-components";import{Xviwer as as}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 sf=Gr("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 uf=Gr("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 lf=Gr("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 cf=Gr("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 gu=Gr("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 ff=Gr("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 df=Gr("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"}]]),pf=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"})),hf=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"})),en={actions:[{name:"upload",icon:T(Cc,{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:T(pf,{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:T(hf,{width:16,height:16})}]},No={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:{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"},vf={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:{netSearch:"Web search",deepThinking:"Deep thinking",fileUpload:"Upload file"},chatHeader:{newConversation:"New conversation"},disclaimer:"Content is AI-generated and for reference only."},xf={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:{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"},gf={zh:No,en:vf,ja:xf};function mu(t){return gf[t]??No}const yu=ye.createContext({locale:"zh",messages:No});function ua(){return ye.useContext(yu)}function mf({locale:t,children:r}){const e=ye.useMemo(()=>({locale:t,messages:mu(t)}),[t]);return ye.createElement(yu.Provider,{value:e},r)}function yf(t,r){t.prototype=Object.create(r.prototype),t.prototype.constructor=t,Io(t,r)}var os=Number.isNaN||function(r){return typeof r=="number"&&r!==r};function Cf(t,r){return!!(t===r||os(t)&&os(r))}function bf(t,r){if(t.length!==r.length)return!1;for(var e=0;e<t.length;e++)if(!Cf(t[e],r[e]))return!1;return!0}function Aa(t,r){r===void 0&&(r=bf);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 Ff=typeof performance=="object"&&typeof performance.now=="function",ss=Ff?function(){return performance.now()}:function(){return Date.now()};function us(t){cancelAnimationFrame(t.id)}function Ef(t,r){var e=ss();function n(){ss()-e>=r?t.call(null):i.id=requestAnimationFrame(n)}var i={id:requestAnimationFrame(n)};return i}var Ba=-1;function ls(t){if(t===void 0&&(t=!1),Ba===-1||t){var r=document.createElement("div"),e=r.style;e.width="50px",e.height="50px",e.overflow="scroll",document.body.appendChild(r),Ba=r.offsetWidth-r.clientWidth,document.body.removeChild(r)}return Ba}var tn=null;function cs(t){if(t===void 0&&(t=!1),tn===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?tn="positive-descending":(r.scrollLeft=1,r.scrollLeft===0?tn="negative":tn="positive-ascending"),document.body.removeChild(r),tn}return tn}var wf=150,Af=function(r,e){return r};function Bf(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){yf(d,x);function d(v){var p;return p=x.call(this,v)||this,p._instanceProps=c(p.props,_e(p)),p._outerRef=void 0,p._resetIsScrollingTimeoutId=null,p.state={instance:_e(p),isScrolling:!1,scrollDirection:"forward",scrollOffset:typeof p.props.initialScrollOffset=="number"?p.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},p._callOnItemsRendered=void 0,p._callOnItemsRendered=Aa(function(f,y,h,C){return p.props.onItemsRendered({overscanStartIndex:f,overscanStopIndex:y,visibleStartIndex:h,visibleStopIndex:C})}),p._callOnScroll=void 0,p._callOnScroll=Aa(function(f,y,h){return p.props.onScroll({scrollDirection:f,scrollOffset:y,scrollUpdateWasRequested:h})}),p._getItemStyle=void 0,p._getItemStyle=function(f){var y=p.props,h=y.direction,C=y.itemSize,b=y.layout,F=p._getItemStyleCache(u&&C,u&&b,u&&h),E;if(F.hasOwnProperty(f))E=F[f];else{var B=e(p.props,f,p._instanceProps),w=i(p.props,f,p._instanceProps),A=h==="horizontal"||b==="horizontal",g=h==="rtl",S=A?B:0;F[f]=E={position:"absolute",left:g?void 0:S,right:g?S:void 0,top:A?0:B,height:A?"100%":w,width:A?w:"100%"}}return E},p._getItemStyleCache=void 0,p._getItemStyleCache=Aa(function(f,y,h){return{}}),p._onScrollHorizontal=function(f){var y=f.currentTarget,h=y.clientWidth,C=y.scrollLeft,b=y.scrollWidth;p.setState(function(F){if(F.scrollOffset===C)return null;var E=p.props.direction,B=C;if(E==="rtl")switch(cs()){case"negative":B=-C;break;case"positive-descending":B=b-h-C;break}return B=Math.max(0,Math.min(B,b-h)),{isScrolling:!0,scrollDirection:F.scrollOffset<B?"forward":"backward",scrollOffset:B,scrollUpdateWasRequested:!1}},p._resetIsScrollingDebounced)},p._onScrollVertical=function(f){var y=f.currentTarget,h=y.clientHeight,C=y.scrollHeight,b=y.scrollTop;p.setState(function(F){if(F.scrollOffset===b)return null;var E=Math.max(0,Math.min(b,C-h));return{isScrolling:!0,scrollDirection:F.scrollOffset<E?"forward":"backward",scrollOffset:E,scrollUpdateWasRequested:!1}},p._resetIsScrollingDebounced)},p._outerRefSetter=function(f){var y=p.props.outerRef;p._outerRef=f,typeof y=="function"?y(f):y!=null&&typeof y=="object"&&y.hasOwnProperty("current")&&(y.current=f)},p._resetIsScrollingDebounced=function(){p._resetIsScrollingTimeoutId!==null&&us(p._resetIsScrollingTimeoutId),p._resetIsScrollingTimeoutId=Ef(p._resetIsScrolling,wf)},p._resetIsScrolling=function(){p._resetIsScrollingTimeoutId=null,p.setState({isScrolling:!1},function(){p._getItemStyleCache(-1,null)})},p}d.getDerivedStateFromProps=function(p,f){return Sf(p,f),l(p),null};var m=d.prototype;return m.scrollTo=function(p){p=Math.max(0,p),this.setState(function(f){return f.scrollOffset===p?null:{scrollDirection:f.scrollOffset<p?"forward":"backward",scrollOffset:p,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},m.scrollToItem=function(p,f){f===void 0&&(f="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 F=0;if(this._outerRef){var E=this._outerRef;C==="vertical"?F=E.scrollWidth>E.clientWidth?ls():0:F=E.scrollHeight>E.clientHeight?ls():0}this.scrollTo(a(this.props,p,f,b,this._instanceProps,F))},m.componentDidMount=function(){var p=this.props,f=p.direction,y=p.initialScrollOffset,h=p.layout;if(typeof y=="number"&&this._outerRef!=null){var C=this._outerRef;f==="horizontal"||h==="horizontal"?C.scrollLeft=y:C.scrollTop=y}this._callPropsCallbacks()},m.componentDidUpdate=function(){var p=this.props,f=p.direction,y=p.layout,h=this.state,C=h.scrollOffset,b=h.scrollUpdateWasRequested;if(b&&this._outerRef!=null){var F=this._outerRef;if(f==="horizontal"||y==="horizontal")if(f==="rtl")switch(cs()){case"negative":F.scrollLeft=-C;break;case"positive-ascending":F.scrollLeft=C;break;default:var E=F.clientWidth,B=F.scrollWidth;F.scrollLeft=B-E-C;break}else F.scrollLeft=C;else F.scrollTop=C}this._callPropsCallbacks()},m.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&us(this._resetIsScrollingTimeoutId)},m.render=function(){var p=this.props,f=p.children,y=p.className,h=p.direction,C=p.height,b=p.innerRef,F=p.innerElementType,E=p.innerTagName,B=p.itemCount,w=p.itemData,A=p.itemKey,g=A===void 0?Af:A,S=p.layout,D=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(B>0)for(var I=M;I<=N;I++)O.push(ya(f,{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 ya(D||R||"div",{className:y,onScroll:Y,ref:this._outerRefSetter,style:Rt({position:"relative",height:C,width:$,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:h},P)},ya(F||E||"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 f=this._getRangeToRender(),y=f[0],h=f[1],C=f[2],b=f[3];this._callOnItemsRendered(y,h,C,b)}}if(typeof this.props.onScroll=="function"){var F=this.state,E=F.scrollDirection,B=F.scrollOffset,w=F.scrollUpdateWasRequested;this._callOnScroll(E,B,w)}},m._getRangeToRender=function(){var p=this.props,f=p.itemCount,y=p.overscanCount,h=this.state,C=h.isScrolling,b=h.scrollDirection,F=h.scrollOffset;if(f===0)return[0,0,0,0];var E=o(this.props,F,this._instanceProps),B=s(this.props,E,F,this._instanceProps),w=!C||b==="backward"?Math.max(1,y):1,A=!C||b==="forward"?Math.max(1,y):1;return[Math.max(0,E-w),Math.max(0,Math.min(f-1,B+A)),E,B]},d})(ic),r.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},r}var Sf=function(r,e){r.children,r.direction,r.height,r.layout,r.innerTagName,r.outerTagName,r.width,e.instance},Df=50,un=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]},_f=function(r,e,n){var i=e.itemMetadataMap,a=e.lastMeasuredIndex,o=a>0?i[a].offset:0;return o>=n?Cu(r,e,a,0,n):kf(r,e,Math.max(0,a),n)},Cu=function(r,e,n,i,a){for(;i<=n;){var o=i+Math.floor((n-i)/2),s=un(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},kf=function(r,e,n,i){for(var a=r.itemCount,o=1;n<a&&un(r,n,e).offset<i;)n+=o,o*=2;return Cu(r,e,Math.min(n,a-1),Math.floor(n/2),i)},fs=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},Rf=Bf({getItemOffset:function(r,e,n){return un(r,e,n).offset},getItemSize:function(r,e,n){return n.itemMetadataMap[e].size},getEstimatedTotalSize:fs,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",d=x?l:c,m=un(r,e,a),v=fs(r,a),p=Math.max(0,Math.min(v-d,m.offset)),f=Math.max(0,m.offset-d+m.size+o);switch(n==="smart"&&(i>=f-d&&i<=p+d?n="auto":n="center"),n){case"start":return p;case"end":return f;case"center":return Math.round(f+(p-f)/2);case"auto":default:return i>=f&&i<=p?i:i<f?f:p}},getStartIndexForOffset:function(r,e,n){return _f(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,d=un(r,e,i),m=n+x,v=d.offset+d.size,p=e;p<s-1&&v<m;)p++,v+=un(r,p,i).size;return p},initInstanceProps:function(r,e){var n=r,i=n.estimatedItemSize,a={itemMetadataMap:{},estimatedItemSize:i||Df,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 If({isActive:t,isNew:r,isDisabled:e,data:n,eventsEmit:i,styles:a={},assistantList:o=[]}){const{messages:s}=ua(),[c,u]=le(!1),l=(a==null?void 0:a.colors)||{},x=Me(()=>{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]),d=[{key:"rename",icon:T(cf,{size:12}),label:s.sidebar.rename,onClick:y=>{y.domEvent.stopPropagation(),i&&i("conversations:rename_icon_clicked",n)}},{key:"delete",icon:T(ff,{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",f=y=>{const h=rs(),C=rs(y);return h.isSame(C,"day")?C.format("HH:mm"):C.format("MM-DD HH:mm")};return ne("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:[ne("div",{className:"flex flex-col gap-y-2 flex-1 min-w-0",children:[T("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}),ne("div",{className:"flex items-center justify-between gap-2",children:[T("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&&T("span",{className:"text-xs flex-shrink-0",style:{color:t?l.activeItemTextSecondary||"#999":l.itemTextSecondary||"#999",fontSize:"12px",lineHeight:"1.3"},children:f(n.gmtModified)})]})]}),!e&&c&&!r&&T("div",{className:"absolute top-2 right-3",children:T(vc,{menu:{items:d},trigger:["click"],placement:"bottomRight",children:T(sf,{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 Tf(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 Ya(t){if(t.constructor!==Array)throw new TypeError("Expected array.");if(t.length===16)return t;if(t.length===6){var r=Fn();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 Fn(){for(var t=[],r=0;r<16;r++)r%5==0?t.push(1):t.push(0);return t}function Pf(t,r){for(var e=Ya(t),n=Ya(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 Nf(t){if(typeof t=="string"){var r=t.match(/matrix(3d)?\(([^)]+)\)/);if(r){var e=r[2].split(", ").map(parseFloat);return Ya(e)}}return Fn()}function Of(t){var r=Fn();return r[0]=t,r}function Mf(t){var r=Fn();return r[5]=t,r}function Lf(t){var r=Fn();return r[12]=t,r}function $f(t){var r=Fn();return r[13]=t,r}var ni=function(t){return typeof t=="number"},bu=function(t){return typeof t=="function"},Fu=function(t){return Object.prototype.toString.call(t)==="[object Object]"},pn=function(t){return Array.prototype.slice.apply(t)},Eu=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 Tr(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 Qa,Za=function(t,r,e){return t+(r-t)*e},wu={__proto__:null,isNumber:ni,isFunction:bu,isObject:Fu,toArray:pn,getDuplicateValsAsStrings:Eu,assign:Tr,tweenProp:Za},Oo="data-flip-id",Mo="data-inverse-flip-id",Lo="data-portal-key",zf="data-exit-container",Gn={__proto__:null,DATA_FLIP_ID:Oo,DATA_INVERSE_FLIP_ID:Mo,DATA_FLIP_CONFIG:"data-flip-config",DATA_PORTAL_KEY:Lo},Ja={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}},ds=function(t){return Fu(t)?t:Object.keys(Ja).indexOf(t)>-1?Ja[t]:{}};typeof window<"u"&&(Qa=window.requestAnimationFrame);var qf=Qa=Qa||function(t){window.setTimeout(t,1e3/60)},Hf=Date.now(),Vf=typeof performance=="object"&&typeof performance.now=="function"?function(){return performance.now()}:function(){return Date.now()-Hf};function Au(t,r){var e=t.indexOf(r);e!==-1&&t.splice(e,1)}var jf=(function(){function t(){}return t.prototype.run=function(){var r=this;qf(function(){r.springSystem.loop(Vf())})},t})(),Sa=function(){this.position=0,this.velocity=0},Uf=0,Kt=.001,Wf=(function(){function t(e){this._id="s"+Uf++,this._springSystem=e,this.listeners=[],this._startValue=0,this._currentState=new Sa,this._displacementFromRestThreshold=.001,this._endValue=0,this._overshootClampingEnabled=!1,this._previousState=new Sa,this._restSpeedThreshold=.001,this._tempState=new Sa,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,d=this._springConfig.tension,m=this._springConfig.friction,v=this._currentState.position,p=this._currentState.velocity,f=this._tempState.position,y=this._tempState.velocity;this._timeAccumulator>=Kt;)this._timeAccumulator-=Kt,this._timeAccumulator<Kt&&(this._previousState.position=v,this._previousState.velocity=p),s=d*(this._endValue-f)-m*p,u=d*(this._endValue-(f=v+(o=p)*Kt*.5))-m*(y=p+s*Kt*.5),x=d*(this._endValue-(f=v+(c=y)*Kt*.5))-m*(y=p+u*Kt*.5),f=v+(l=y)*Kt,v+=1/6*(o+2*(c+l)+(y=p+x*Kt))*Kt,p+=1/6*(s+2*(u+x)+(d*(this._endValue-f)-m*y))*Kt;this._tempState.position=f,this._tempState.velocity=y,this._currentState.position=v,this._currentState.velocity=p,this._timeAccumulator>0&&this._interpolate(this._timeAccumulator/Kt),(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 Au(this.listeners,e),this},t})(),Bu=(function(){function t(e){this.looper=e||new jf,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 Wf(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){Au(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})(),Gf=new Bu,Su=function(t){var r=t.springConfig,e=r.overshootClamping,n=t.getOnUpdateFunc,i=t.onAnimationEnd,a=t.onSpringActivate,o=Gf.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},ps=function(t){var r=Su(t);return r.setEndValue(1),r},hs=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 d=x.getCurrentValue();(d=d<.01?0:d>.99?1:d)>=i&&a[s+1]&&a[s+1](Math.max(Math.min(d*n,1),0)),l(x)}},o}).map(function(o){var s=Su(o);if(s)return s.setEndValue.bind(s)}).filter(Boolean);a[0]&&a[0](1)}},vs=function(t){return[0,1,4,5,12,13].map(function(r){return t[r]})},xs=function(t){return t.top<window.innerHeight&&t.bottom>0&&t.left<window.innerWidth&&t.right>0};function gs(t){return JSON.parse(t.dataset.flipConfig||"{}")}var Du=function(t,r){var e;return Tr(t,((e={})[r[0]]=r[1],e))},_u=function(t,r){return pn(r?document.querySelectorAll("["+Lo+'="'+r+'"]'):t.querySelectorAll("["+Oo+"]"))},ku=function(t){return t.map(function(r){return[r,r.getBoundingClientRect()]})},Kf=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,d=t.debug,m=t.portalKey,v=t.staggerConfig,p=v===void 0?{}:v,f=t.decisionData,y=f===void 0?{}:f,h=t.handleEnterUpdateDelete,C=t.onComplete,b=t.onStart;if(!window.matchMedia("(prefers-reduced-motion: reduce)").matches){var F,E=ku(_u((F={element:u,portalKey:m}).element,F.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(Du,{}),B=(function(q){var Y=q.containerEl,U=q.portalKey;return U?(function(M){return function(N){return pn(document.querySelectorAll("["+Lo+'="'+M+'"]'+N))}})(U):Y?(function(M){var N=Math.random().toFixed(5);return M.dataset.flipperId=N,function(O){return pn(M.querySelectorAll('[data-flipper-id="'+N+'"] '+O))}})(Y):function(){return[]}})({containerEl:u,portalKey:m}),w=(function(q){return function(Y){return q("["+Oo+'="'+Y+'"]')[0]}})(B),A=function(q){return o[q]&&E[q]},g=Object.keys(o).concat(Object.keys(E)).filter(function(q){return!A(q)}),S={flipCallbacks:c,getElement:w,flippedElementPositionsBeforeUpdate:o,flippedElementPositionsAfterUpdate:E,inProgressAnimations:i,decisionData:y},D=(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(K){return I[K]}).filter(function(K){return M[K]&&M[K].onAppear}),te=U.filter(function(K){return O[K]&&M[K]&&M[K].onExit}),ie=new Promise(function(K){Y=K}),se=[],ke=0,Q=te.map(function(K,ae){var ue=O[K].domDataForExitAnimations,Z=ue.element,de=ue.parent,Se=ue.childPosition,Re=Se.top,Ve=Se.left,Ce=Se.width,be=Se.height;getComputedStyle(de).position==="static"&&(de.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=Ve+"px",Z.style.height=be+"px",Z.style.width=Ce+"px";var Pe=se.filter(function(We){return We[0]===de})[0];Pe||(Pe=[de,document.createDocumentFragment()],se.push(Pe)),Pe[1].appendChild(Z),ke+=1;var Fe=function(){try{de.removeChild(Z)}catch{}finally{(ke-=1)==0&&Y()}};return V[K]={stop:Fe},function(){return M[K].onExit(Z,ae,Fe,X)}});return se.forEach(function(K){K[0].appendChild(K[1])}),Q.length||Y(),{hideEnteringElements:function(){ee.forEach(function(K){var ae=N(K);ae&&(ae.style.opacity="0")})},animateEnteringElements:function(){ee.forEach(function(K,ae){var ue=N(K);ue&&M[K].onAppear(ue,ae,X)})},animateExitingElements:function(){return Q.forEach(function(K){return K()}),ie}}})(Tr({},S,{unflippedIds:g})),R=D.hideEnteringElements,P=D.animateEnteringElements,z=D.animateExitingElements,$=Tr({},S,{containerEl:u,flippedIds:e.filter(A),applyTransformOrigin:l,spring:x,debug:d,staggerConfig:p,scopedSelector:B,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,te=q.debug,ie=q.staggerConfig,se=ie===void 0?{}:ie,ke=q.decisionData,Q=ke===void 0?{}:ke,K=q.onComplete,ae=q.containerEl,ue=new Promise(function(re){Y=re});if(K&&ue.then(function(){return K(ae,Q)}),!U.length)return function(){return Y([]),ue};var Z=[],de=ee(U[0]),Se=de?de.ownerDocument.querySelector("body"):document.querySelector("body");Eu(U);var Re=U.map(function(re){var Ae=O[re].rect,st=I[re].rect,At=O[re].opacity,Bt=I[re].opacity,Mt=st.width<1||st.height<1,ze=I[re].element;if(!xs(Ae)&&!xs(st)||!ze)return!1;var Lt,ur,Ar,St=gs(ze),Cr=(Ar=(ur=(Lt={flipperSpring:X,flippedSpring:St.spring})===void 0?{}:Lt).flippedSpring,Tr({},Ja.noWobble,ds(ur.flipperSpring),ds(Ar))),lr=St.stagger===!0?"default":St.stagger,$r={element:ze,id:re,stagger:lr,springConfig:Cr};if(M[re]&&M[re].shouldFlip&&!M[re].shouldFlip(Q.previous,Q.current))return!1;var cr=Math.abs(Ae.left-st.left)+Math.abs(Ae.top-st.top),zr=Math.abs(Ae.width-st.width)+Math.abs(Ae.height-st.height),Br=Math.abs(Bt-At);if(Ae.height===0&&st.height===0||Ae.width===0&&st.width===0||cr<.5&&zr<.5&&Br<.01)return!1;var qr=Nf(I[re].transform),$t={matrix:qr},Ft={matrix:[]},Dt=[qr];St.translate&&(Dt.push(Lf(Ae.left-st.left)),Dt.push($f(Ae.top-st.top))),St.scale&&(Dt.push(Of(Math.max(Ae.width,1)/Math.max(st.width,1))),Dt.push(Mf(Math.max(Ae.height,1)/Math.max(st.height,1)))),St.opacity&&(Ft.opacity=At,$t.opacity=Bt);var zt=[];if(!M[re]||!M[re].shouldInvert||M[re].shouldInvert(Q.previous,Q.current)){var Jt=(function(Be,at){return pn(Be.querySelectorAll("["+Mo+'="'+at+'"]'))})(ze,re);zt=Jt.map(function(Be){return[Be,gs(Be)]})}Ft.matrix=vs(Dt.reduce(Pf)),$t.matrix=vs($t.matrix);var Wt,tt=(function(Be){var at=Be.element,er=Be.invertedChildren,qe=Be.body;return function(Ge){var ft=Ge.matrix,vt=Ge.opacity,tr=Ge.forceMinVals;if(ni(vt)&&(at.style.opacity=vt+""),tr&&(at.style.minHeight="1px",at.style.minWidth="1px"),ft){var Yr=(function(qt){return"matrix("+qt.join(", ")+")"})(ft);at.style.transform=Yr,er&&(function(qt){var fr=qt.matrix,Qr=qt.body;qt.invertedChildren.forEach(function(Zr){var Jr=Zr[0],Pt=Zr[1];if(Qr.contains(Jr)){var Vn=fr[0],jn=fr[3],ma=fr[5],dr={translateX:0,translateY:0,scaleX:1,scaleY:1},Sr="";Pt.translate&&(dr.translateX=-fr[4]/Vn,dr.translateY=-ma/jn,Sr+="translate("+dr.translateX+"px, "+dr.translateY+"px)"),Pt.scale&&(dr.scaleX=1/Vn,dr.scaleY=1/jn,Sr+=" scale("+dr.scaleX+", "+dr.scaleY+")"),Jr.style.transform=Sr}})})({invertedChildren:er,matrix:ft,body:qe})}}})({element:ze,invertedChildren:zt,body:Se});if(M[re]&&M[re].onComplete){var he=M[re].onComplete;Wt=function(){return he(ze,Q)}}var it=ni(Ft.opacity)&&ni($t.opacity)&&Ft.opacity!==$t.opacity,Et=!1;return Tr({},$r,{stagger:lr,springConfig:Cr,getOnUpdateFunc:function(Be){var at=Be.spring,er=Be.onAnimationEnd;return N[re]={destroy:at.destroy.bind(at),onAnimationEnd:er},function(qe){M[re]&&M[re].onSpringUpdate&&M[re].onSpringUpdate(qe.getCurrentValue()),Et||(Et=!0,M[re]&&M[re].onStart&&M[re].onStart(ze,Q));var Ge=qe.getCurrentValue();if(Se.contains(ze)){var ft={matrix:[]};ft.matrix=Ft.matrix.map(function(vt,tr){return Za(vt,$t.matrix[tr],Ge)}),it&&(ft.opacity=Za(Ft.opacity,$t.opacity,Ge)),tt(ft)}else qe.destroy()}},initializeFlip:function(){tt({matrix:Ft.matrix,opacity:it?Ft.opacity:void 0,forceMinVals:Mt}),M[re]&&M[re].onStartImmediate&&M[re].onStartImmediate(ze,Q),St.transformOrigin?ze.style.transformOrigin=St.transformOrigin:V&&(ze.style.transformOrigin="0 0"),zt.forEach(function(Be){var at=Be[0],er=Be[1];er.transformOrigin?at.style.transformOrigin=er.transformOrigin:V&&(at.style.transformOrigin="0 0")})},onAnimationEnd:function(Be){delete N[re],bu(Wt)&&Wt(),ze.style.transform="",zt.forEach(function(at){at[0].style.transform=""}),Mt&&ze&&(ze.style.minHeight="",ze.style.minWidth=""),Be||(Z.push(re),Z.length>=Re.length&&Y(Z))},delayUntil:St.delayUntil})}).filter(Boolean);if(Re.forEach(function(re){return(0,re.initializeFlip)()}),te)return function(){};var Ve=Re.filter(function(re){return re.delayUntil&&(Ae=re.delayUntil,Re.filter(function(st){return st.id===Ae}).length);var Ae}),Ce={},be={},Pe={};Ve.forEach(function(re){re.stagger?(Pe[re.stagger]=!0,be[re.delayUntil]?be[re.delayUntil].push(re.stagger):be[re.delayUntil]=[re.stagger]):Ce[re.delayUntil]?Ce[re.delayUntil].push(re):Ce[re.delayUntil]=[re]});var Fe=Re.filter(function(re){return re.stagger}).reduce(function(re,Ae){return re[Ae.stagger]?re[Ae.stagger].push(Ae):re[Ae.stagger]=[Ae],re},{}),We=Re.filter(function(re){return Ve.indexOf(re)===-1});return We.forEach(function(re){re.onSpringActivate=function(){Ce[re.id]&&Ce[re.id].forEach(ps),be[re.id]&&Object.keys(be[re.id].reduce(function(Ae,st){var At;return Tr(Ae,((At={})[st]=!0,At))},{})).forEach(function(Ae){hs(Fe[Ae],se[Ae])})}}),function(){return Re.length||Y([]),We.filter(function(re){return!re.stagger}).forEach(ps),Object.keys(Fe).forEach(function(re){Pe[re]||hs(Fe[re],se[re])}),ue}})($);h?h({hideEnteringElements:R,animateEnteringElements:P,animateExitingElements:z,animateFlippedElements:j}):(R(),z().then(P),j())}},Xf=function(t){var r=t.element,e=t.flipCallbacks,n=e===void 0?{}:e,i=t.inProgressAnimations,a=i===void 0?{}:i,o=_u(r,t.portalKey),s=pn(r.querySelectorAll("["+Mo+"]")),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("["+zf+"]");p&&(v=p)}var f=u.findIndex(function(y){return y[0]===v});f===-1&&(u.push([v,v.getBoundingClientRect()]),f=u.length-1),c[m.dataset.flipId]=u[f][1],l[m.dataset.flipId]=v});var x=ku(o),d=x.map(function(m){var v=m[0],p=m[1],f={};if(n&&n[v.dataset.flipId]&&n[v.dataset.flipId].onExit){var y=c[v.dataset.flipId];Tr(f,{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:f}]}).reduce(Du,{});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:d,cachedOrderedFlipIds:x.map(function(m){return m[0].dataset.flipId})}};new Bu;function Zi(){return Zi=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},Zi.apply(this,arguments)}function eo(t,r){return eo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e},eo(t,r)}function Ru(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 Iu=aa({}),Tu=aa("portal"),Pu=(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,eo(r,e);var i=n.prototype;return i.getSnapshotBeforeUpdate=function(a){return a.flipKey!==this.props.flipKey&&this.el?Xf({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&&Kf({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(Iu.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(Tu.Provider,{value:s},c)),c},n})(sc);Pu.defaultProps={applyTransformOrigin:!0,element:"div"};var Yf=["children","flipId","inverseFlipId","portalKey"],Qf=["children","flipId","shouldFlip","shouldInvert","onAppear","onStart","onStartImmediate","onComplete","onExit","onSpringUpdate"],ms=function(t){var r,e=t.children,n=t.flipId,i=t.inverseFlipId,a=t.portalKey,o=Ru(t,Yf),s=e,c=(function(l){return typeof l=="function"})(s);if(!c)try{s=ac.only(e)}catch{throw new Error("Each Flipped component must wrap a single child")}o.scale||o.translate||o.opacity||wu.assign(o,{translate:!0,scale:!0,opacity:!0});var u=((r={})[Gn.DATA_FLIP_CONFIG]=JSON.stringify(o),r);return n!==void 0?u[Gn.DATA_FLIP_ID]=String(n):i&&(u[Gn.DATA_INVERSE_FLIP_ID]=String(i)),a!==void 0&&(u[Gn.DATA_PORTAL_KEY]=a),c?s(u):oc(s,u)},Nu=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=Ru(t,Qf);return r?x.inverseFlipId?ye.createElement(ms,Zi({},x),r):ye.createElement(Tu.Consumer,null,function(d){return ye.createElement(Iu.Consumer,null,function(m){return wu.isObject(m)&&e&&(m[e]={shouldFlip:n,shouldInvert:i,onAppear:a,onStart:o,onStartImmediate:s,onComplete:c,onExit:u,onSpringUpdate:l}),ye.createElement(ms,Zi({flipId:e},x,{portalKey:d}),r)})}):null};Nu.displayName="Flipped";function Zf(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,d=r.map(A=>A.sessionId+"-"+A.gmtModified).join(","),m=Me(()=>{const A=a.length>0?a:[{label:"\u5F53\u5929",dayPeriod:1}],g=Tf(r,A),S=A.every(R=>!g[R.label]||g[R.label].length===0),D=[];return A.forEach(R=>{g[R.label]&&g[R.label].length>0&&(D.push({type:"group",label:R.label}),g[R.label].forEach(P=>D.push({type:"item",data:P})))}),g.other.length>0&&!S&&(D.push({type:"group",label:"\u5176\u4ED6"}),g.other.forEach(R=>D.push({type:"item",data:R}))),S&&g.other.length>0&&g.other.forEach(R=>D.push({type:"item",data:R})),D},[r,a,d]),v=Me(()=>m.map(A=>A.type==="group"?`g:${A.label}`:`i:${A.data.sessionId}`).join("|"),[m]),p=56,f=14,y=36,h=A=>A===m.length?y:m[A].type==="group"?32:p+f,C=Ue(null),b=Me(()=>m.findIndex(A=>{var g;return A.type==="item"&&((g=A.data)==null?void 0:g.sessionId)===e}),[m,e]),F=Me(()=>m.findIndex(A=>A.type==="item"),[m]),E=Ue(void 0);Le(()=>{const A=E.current;e!==A&&b>-1&&b===F&&C.current&&C.current.scrollToItem(b,"start"),E.current=e},[e,b,F]);const B=Ue(0);if(Le(()=>{if(C.current){const A=B.current,g=m.length;if(B.current=g,g!==A){const D=(A>0?Math.abs(g-A)/A:1)>.5||A<10&&g>20;C.current.resetAfterIndex(0,D)}}},[m.length]),Le(()=>{C.current&&C.current.resetAfterIndex(0,!0)},[v]),m.length===0)return T("div",{className:"text-center text-zinc-400 py-8",children:"\u6682\u65E0\u4F1A\u8BDD"});const w=(u==null?void 0:u.colors)||{};return T(Pu,{flipKey:d,spring:{stiffness:180,damping:18},children:T(Rf,{ref:C,height:c,width:"100%",itemCount:m.length+1,itemSize:h,itemKey:A=>{if(A===m.length)return"footer";const g=m[A];return g.type==="item"?g.data.sessionId:`group-${g.label}`},onItemsRendered:({visibleStopIndex:A})=>{l&&!x&&A>=m.length-1-3&&typeof o=="function"&&o("conversations:load_more")},style:{overflowX:"hidden"},children:({index:A,style:g})=>{if(A===m.length){const D=(u==null?void 0:u.colors)||{};return T("div",{style:{...g,height:y,lineHeight:`${y}px`,textAlign:"center",fontSize:"10px",color:D.textMuted||"#9ca3af",background:D.groupBg||"white"},children:x?"\u52A0\u8F7D\u4E2D...":l?"":"\u6CA1\u6709\u66F4\u591A\u4E86"})}const S=m[A];return S.type==="group"?T("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}):T(Nu,{flipId:S.data.sessionId,children:T("div",{style:g,className:"px-[12px] py-[2px]",children:T(If,{isActive:e===S.data.sessionId,isDisabled:!1,isNew:S.data.isNew,data:S.data,eventsEmit:o,assistantList:s,styles:u})})},S.data.sessionId)}})})}const Jf=({value:t,eventsEmit:r,setSearch:e,style:n,styles:i={}})=>{const{messages:a}=ua(),o=i.colors||{},s=i.radius||"12px",c=o.border||"#e5e7eb",u=o.primary||"#2563eb",l=i.headerBg||o.sidebarBg||o.background||"#fff",[x,d]=ye.useState(!1),m=ye.useRef(null);ye.useEffect(()=>{x&&m.current&&m.current.focus()},[x]);const v=()=>{d(!1),e("")};return ne("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:[T("button",{className:"border-none flex items-center justify-center",onClick:()=>{d(!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:ne("div",{className:"flex items-center gap-2",children:[T(Rc,{size:18}),T("span",{className:"text-sm",children:a.sidebar.newChat})]})}),x?ne("div",{className:"flex-1 min-w-0 relative",children:[T("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}}),T("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:T(To,{size:16})})]}):T("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:()=>d(!0),title:a.sidebar.search,children:T(Wa,{size:18})})]})};function ed(t){const{data:r,sortRules:e,activedItem:n,eventsEmit:i,assistantList:a,styles:o={},hasMore:s=!1,loadingMore:c=!1}=t,{messages:u}=ua(),[l,x]=le(""),d=Me(()=>l?r.filter(E=>(E.label||u.sidebar.unnamedSession).toLowerCase().includes(l.toLowerCase())):r,[r,l,u.sidebar.unnamedSession]),m=Me(()=>[...d].sort((E,B)=>new Date(B.gmtModified).getTime()-new Date(E.gmtModified).getTime()),[d]),v=Ue(null),[p,f]=le(400);Le(()=>{function E(){v.current&&f(v.current.clientHeight)}return E(),window.addEventListener("resize",E),()=>window.removeEventListener("resize",E)},[]);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",F=y.text||"#222";return ne("div",{className:"h-full flex flex-col overflow-y-hidden",style:{background:b,color:F,boxShadow:h,border:`1px solid ${C}`,...o.container},children:[T(Jf,{value:l,setSearch:x,eventsEmit:i,style:o.header,styles:o}),ne("div",{className:"flex-1 min-h-0 relative",ref:v,style:o.list,children:[T(Zf,{eventsEmit:i,data:m,assistantList:a,activedItem:n,sortRules:e,height:p,styles:o,hasMore:s,loadingMore:c}),T("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 td=ye.createContext({});function In(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 Ou(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 to(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(Er(!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&&Te(a)==="object"&&Te(o)==="object"){var x=Object.keys(a);return x.length!==Object.keys(o).length?!1:x.every(function(d){return i(a[d],o[d],u)})}return!1}return i(t,r)}var rd="%";function ro(t){return t.join(rd)}var nd=(function(){function t(r){Tt(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(ro(e))}},{key:"opGet",value:function(e){return this.cache.get(e)||null}},{key:"update",value:function(e,n){return this.opUpdate(ro(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})(),xn="data-token-hash",or="data-css-hash",Pr="__cssinjs_instance__";function id(){var t=Math.random().toString(12).slice(2);if(typeof document<"u"&&document.head&&document.body){var r=document.body.querySelectorAll("style[".concat(or,"]"))||[],e=document.head.firstChild;Array.from(r).forEach(function(i){i[Pr]=i[Pr]||t,i[Pr]===t&&document.head.insertBefore(i,e)});var n={};Array.from(document.querySelectorAll("style[".concat(or,"]"))).forEach(function(i){var a=i.getAttribute(or);if(n[a]){if(i[Pr]===t){var o;(o=i.parentNode)===null||o===void 0||o.removeChild(i)}}else n[a]=!0})}return new nd(t)}var $n=L.createContext({hashPriority:"low",cache:id(),defaultCache:!0});function En(t){var r=lu();return function(){var e,n=Ua(t);if(r){var i=Ua(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return Ec(this,e)}}function ad(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 $o=(function(){function t(){Tt(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),d=x[1];return i.internalGet(l)[1]<d?[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!ad(n,e)}),this.deleteByPath(this.cache,e)}}]),t})();H($o,"MAX_CACHE_SIZE",20);H($o,"MAX_CACHE_OFFSET",5);var ys=0,Mu=(function(){function t(r){Tt(this,t),H(this,"derivatives",void 0),H(this,"id",void 0),this.derivatives=Array.isArray(r)?r:[r],this.id=ys,r.length===0&&wc(r.length>0),ys+=1}return It(t,[{key:"getDerivativeToken",value:function(e){return this.derivatives.reduce(function(n,i){return i(e,n)},void 0)}}]),t})(),Da=new $o;function no(t){var r=Array.isArray(t)?t:[t];return Da.has(r)||Da.set(r,new Mu(r)),Da.get(r)}var od=new WeakMap,_a={};function sd(t,r){for(var e=od,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(_a)||e.set(_a,t()),e.get(_a)}var Cs=new WeakMap;function _n(t){var r=Cs.get(t)||"";return r||(Object.keys(t).forEach(function(e){var n=t[e];r+=e,n instanceof Mu?r+=n.id:n&&Te(n)==="object"?r+=_n(n):r+=n}),r=In(r),Cs.set(t,r)),r}function bs(t,r){return In("".concat(r,"_").concat(_n(t)))}var io=Mr();function Fs(t){return typeof t=="number"?"".concat(t,"px"):t}function Ji(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({},xn,r),or,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 ii=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()},ud=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(""),"}"):""},Lu=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 d,m=ii(l,n==null?void 0:n.prefix);i[m]=typeof x=="number"&&!(n!=null&&(d=n.unitless)!==null&&d!==void 0&&d[l])?"".concat(x,"px"):String(x),a[l]="var(".concat(m,")")}}),[a,ud(i,e,{scope:n==null?void 0:n.scope})]},Es=Mr()?L.useLayoutEffect:L.useEffect,ld=function(r,e){var n=L.useRef(!0);Es(function(){return r(n.current)},e),Es(function(){return n.current=!1,function(){n.current=!0}},[])},cd=J({},L),ws=cd.useInsertionEffect,fd=function(r,e,n){L.useMemo(r,n),ld(function(){return e(!0)},n)},dd=ws?function(t,r,e){return ws(function(){return t(),r()},e)}:fd,pd=J({},L),hd=pd.useInsertionEffect,vd=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},xd=function(){return function(r){r()}},gd=typeof hd<"u"?vd:xd;function zo(t,r,e,n,i){var a=L.useContext($n),o=a.cache,s=[t].concat(ge(r)),c=ro(s),u=gd([c]),l=function(v){o.opUpdate(c,function(p){var f=p||[void 0,void 0],y=xe(f,2),h=y[0],C=h===void 0?0:h,b=y[1],F=b,E=F||e(),B=[C,E];return v?v(B):B})};L.useMemo(function(){l()},[c]);var x=o.opGet(c),d=x[1];return dd(function(){i==null||i(d)},function(m){return l(function(v){var p=xe(v,2),f=p[0],y=p[1];return m&&f===0&&(i==null||i(d)),[f+1,y]}),function(){o.opUpdate(c,function(v){var p=v||[],f=xe(p,2),y=f[0],h=y===void 0?0:y,C=f[1],b=h-1;return b===0?(u(function(){(m||!o.opGet(c))&&(n==null||n(C,!1))}),null):[h-1,C]})}},[c]),d}var md={},yd="css",Hr=new Map;function Cd(t){Hr.set(t,(Hr.get(t)||0)+1)}function bd(t,r){if(typeof document<"u"){var e=document.querySelectorAll("style[".concat(xn,'="').concat(t,'"]'));e.forEach(function(n){if(n[Pr]===r){var i;(i=n.parentNode)===null||i===void 0||i.removeChild(n)}})}}var Fd=0;function Ed(t,r){Hr.set(t,(Hr.get(t)||0)-1);var e=new Set;Hr.forEach(function(n,i){n<=0&&e.add(i)}),Hr.size-e.size>Fd&&e.forEach(function(n){bd(n,r),Hr.delete(n)})}var wd=function(r,e,n,i){var a=n.getDerivativeToken(r),o=J(J({},a),e);return i&&(o=i(o)),o},$u="token";function Ad(t,r){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=yr($n),i=n.cache.instanceId,a=n.container,o=e.salt,s=o===void 0?"":o,c=e.override,u=c===void 0?md:c,l=e.formatToken,x=e.getComputedToken,d=e.cssVar,m=sd(function(){return Object.assign.apply(Object,[{}].concat(ge(r)))},r),v=_n(m),p=_n(u),f=d?_n(d):"",y=zo($u,[s,t.id,v,p,f],function(){var h,C=x?x(m,u,t):wd(m,u,t,l),b=J({},C),F="";if(d){var E=Lu(C,d.key,{prefix:d.prefix,ignore:d.ignore,unitless:d.unitless,preserve:d.preserve}),B=xe(E,2);C=B[0],F=B[1]}var w=bs(C,s);C._tokenKey=w,b._tokenKey=bs(b,s);var A=(h=d==null?void 0:d.key)!==null&&h!==void 0?h:w;C._themeKey=A,Cd(A);var g="".concat(yd,"-").concat(In(w));return C._hashId=g,[C,g,b,F,(d==null?void 0:d.key)||""]},function(h){Ed(h[0]._themeKey,i)},function(h){var C=xe(h,4),b=C[0],F=C[3];if(d&&F){var E=dn(F,In("css-variables-".concat(b._themeKey)),{mark:or,prepend:"queue",attachTo:a,priority:-999});E[Pr]=i,E.setAttribute(xn,b._themeKey)}});return y}var Bd=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,d={"data-rc-order":"prependQueue","data-rc-priority":"".concat(x)},m=Ji(o,s,l,d,u);return[x,l,m]},Sd={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},zu="comm",qu="rule",Hu="decl",Dd="@import",_d="@namespace",kd="@keyframes",Rd="@layer",Vu=Math.abs,qo=String.fromCharCode;function ju(t){return t.trim()}function ai(t,r,e){return t.replace(r,e)}function Id(t,r,e){return t.indexOf(r,e)}function hn(t,r){return t.charCodeAt(r)|0}function gn(t,r,e){return t.slice(r,e)}function hr(t){return t.length}function Td(t){return t.length}function Kn(t,r){return r.push(t),t}var la=1,mn=1,Uu=0,Zt=0,pt=0,wn="";function Ho(t,r,e,n,i,a,o,s){return{value:t,root:r,parent:e,type:n,props:i,children:a,line:la,column:mn,length:o,return:"",siblings:s}}function Pd(){return pt}function Nd(){return pt=Zt>0?hn(wn,--Zt):0,mn--,pt===10&&(mn=1,la--),pt}function sr(){return pt=Zt<Uu?hn(wn,Zt++):0,mn++,pt===10&&(mn=1,la++),pt}function Nr(){return hn(wn,Zt)}function oi(){return Zt}function ca(t,r){return gn(wn,t,r)}function Tn(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 Od(t){return la=mn=1,Uu=hr(wn=t),Zt=0,[]}function Md(t){return wn="",t}function ka(t){return ju(ca(Zt-1,ao(t===91?t+2:t===40?t+1:t)))}function Ld(t){for(;(pt=Nr())&&pt<33;)sr();return Tn(t)>2||Tn(pt)>3?"":" "}function $d(t,r){for(;--r&&sr()&&!(pt<48||pt>102||pt>57&&pt<65||pt>70&&pt<97););return ca(t,oi()+(r<6&&Nr()==32&&sr()==32))}function ao(t){for(;sr();)switch(pt){case t:return Zt;case 34:case 39:t!==34&&t!==39&&ao(pt);break;case 40:t===41&&ao(t);break;case 92:sr();break}return Zt}function zd(t,r){for(;sr()&&t+pt!==57;)if(t+pt===84&&Nr()===47)break;return"/*"+ca(r,Zt-1)+"*"+qo(t===47?t:sr())}function qd(t){for(;!Tn(Nr());)sr();return ca(t,Zt)}function Hd(t){return Md(si("",null,null,null,[""],t=Od(t),0,[0],t))}function si(t,r,e,n,i,a,o,s,c){for(var u=0,l=0,x=o,d=0,m=0,v=0,p=1,f=1,y=1,h=0,C="",b=i,F=a,E=n,B=C;f;)switch(v=h,h=sr()){case 40:if(v!=108&&hn(B,x-1)==58){Id(B+=ai(ka(h),"&","&\f"),"&\f",Vu(u?s[u-1]:0))!=-1&&(y=-1);break}case 34:case 39:case 91:B+=ka(h);break;case 9:case 10:case 13:case 32:B+=Ld(v);break;case 92:B+=$d(oi()-1,7);continue;case 47:switch(Nr()){case 42:case 47:Kn(Vd(zd(sr(),oi()),r,e,c),c),(Tn(v||1)==5||Tn(Nr()||1)==5)&&hr(B)&&gn(B,-1,void 0)!==" "&&(B+=" ");break;default:B+="/"}break;case 123*p:s[u++]=hr(B)*y;case 125*p:case 59:case 0:switch(h){case 0:case 125:f=0;case 59+l:y==-1&&(B=ai(B,/\f/g,"")),m>0&&(hr(B)-x||p===0&&v===47)&&Kn(m>32?Bs(B+";",n,e,x-1,c):Bs(ai(B," ","")+";",n,e,x-2,c),c);break;case 59:B+=";";default:if(Kn(E=As(B,r,e,u,l,i,s,C,b=[],F=[],x,a),a),h===123)if(l===0)si(B,r,E,E,b,a,x,s,F);else{switch(d){case 99:if(hn(B,3)===110)break;case 108:if(hn(B,2)===97)break;default:l=0;case 100:case 109:case 115:}l?si(t,E,E,n&&Kn(As(t,E,E,0,0,i,s,C,i,b=[],x,F),F),i,F,x,s,n?b:F):si(B,E,E,E,[""],F,0,s,F)}}u=l=m=0,p=y=1,C=B="",x=o;break;case 58:x=1+hr(B),m=v;default:if(p<1){if(h==123)--p;else if(h==125&&p++==0&&Nd()==125)continue}switch(B+=qo(h),h*p){case 38:y=l>0?1:(B+="\f",-1);break;case 44:s[u++]=(hr(B)-1)*y,y=1;break;case 64:Nr()===45&&(B+=ka(sr())),d=Nr(),l=x=hr(C=B+=qd(oi())),h++;break;case 45:v===45&&hr(B)==2&&(p=0)}}return a}function As(t,r,e,n,i,a,o,s,c,u,l,x){for(var d=i-1,m=i===0?a:[""],v=Td(m),p=0,f=0,y=0;p<n;++p)for(var h=0,C=gn(t,d+1,d=Vu(f=o[p])),b=t;h<v;++h)(b=ju(f>0?m[h]+" "+C:ai(C,/&\f/g,m[h])))&&(c[y++]=b);return Ho(t,r,e,i===0?qu:s,c,u,l,x)}function Vd(t,r,e,n){return Ho(t,r,e,zu,qo(Pd()),gn(t,2,-2),0,n)}function Bs(t,r,e,n,i){return Ho(t,r,e,Hu,gn(t,0,n),gn(t,n+1,-1),n,i)}function oo(t,r){for(var e="",n=0;n<t.length;n++)e+=r(t[n],n,t,r)||"";return e}function jd(t,r,e,n){switch(t.type){case Rd:if(t.children.length)break;case Dd:case _d:case Hu:return t.return=t.return||t.value;case zu:return"";case kd:return t.return=t.value+"{"+oo(t.children,n)+"}";case qu:if(!hr(t.value=t.props.join(",")))return""}return hr(e=oo(t.children,n))?t.return=t.value+"{"+e+"}":""}var Ss="data-ant-cssinjs-cache-path",Wu="_FILE_STYLE__",Ur,Gu=!0;function Ud(){if(!Ur&&(Ur={},Mr())){var t=document.createElement("div");t.className=Ss,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];Ur[s]=c});var e=document.querySelector("style[".concat(Ss,"]"));if(e){var n;Gu=!1,(n=e.parentNode)===null||n===void 0||n.removeChild(e)}document.body.removeChild(t)}}function Wd(t){return Ud(),!!Ur[t]}function Gd(t){var r=Ur[t],e=null;if(r&&Mr())if(Gu)e=Wu;else{var n=document.querySelector("style[".concat(or,'="').concat(Ur[t],'"]'));n?e=n.innerHTML:delete Ur[t]}return[e,r]}var Kd="_skip_check_",Ku="_multi_value_";function ui(t){var r=oo(Hd(t),jd);return r.replace(/\{%%%\:[^;];}/g,";")}function Xd(t){return Te(t)==="object"&&t&&(Kd in t||Ku in t)}function Ds(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(ge(c.slice(1))).join(" ")});return a.join(",")}var Yd=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 d="",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),F=b[0];m[h]="@keyframes ".concat(y.getName(s)).concat(F)}}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 f=p(Array.isArray(r)?r:[r]);return f.forEach(function(y){var h=typeof y=="string"&&!i?{}:y;if(typeof h=="string")d+="".concat(h,`
|
|
58
|
+
`);else if(h._keyframe)v(h);else{var C=x.reduce(function(b,F){var E;return(F==null||(E=F.visit)===null||E===void 0?void 0:E.call(F,b))||b},h);Object.keys(C).forEach(function(b){var F=C[b];if(Te(F)==="object"&&F&&(b!=="animationName"||!F._keyframe)&&!Xd(F)){var E=!1,B=b.trim(),w=!1;(i||a)&&s?B.startsWith("@")?E=!0:B==="&"?B=Ds("",s,u):B=Ds(b,s,u):i&&!s&&(B==="&"||B==="")&&(B="",w=!0);var A=t(F,e,{root:w,injectHash:E,parentSelectors:[].concat(ge(o),[B])}),g=xe(A,2),S=g[0],D=g[1];m=J(J({},m),D),d+="".concat(B).concat(S)}else{let z=function($,j){var q=$.replace(/[A-Z]/g,function(U){return"-".concat(U.toLowerCase())}),Y=j;!Sd[$]&&typeof Y=="number"&&Y!==0&&(Y="".concat(Y,"px")),$==="animationName"&&j!==null&&j!==void 0&&j._keyframe&&(v(j),Y=j.getName(s)),d+="".concat(q,":").concat(Y,";")};var R,P=(R=F==null?void 0:F.value)!==null&&R!==void 0?R:F;Te(F)==="object"&&F!==null&&F!==void 0&&F[Ku]&&Array.isArray(P)?P.forEach(function($){z(b,$)}):z(b,P)}})}}),i?c&&(d&&(d="@layer ".concat(c.name," {").concat(d,"}")),c.dependencies&&(m["@layer ".concat(c.name)]=c.dependencies.map(function(y){return"@layer ".concat(y,", ").concat(c.name,";")}).join(`
|
|
59
|
+
`))):d="{".concat(d,"}"),[d,m]};function Xu(t,r){return In("".concat(t.join("%")).concat(r))}function Qd(){return null}var Yu="style";function so(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($n),x=l.autoClear;l.mock;var d=l.defaultCache,m=l.hashPriority,v=l.container,p=l.ssrInline,f=l.transformers,y=l.linters,h=l.cache,C=l.layer,b=e._tokenKey,F=[b];C&&F.push("layer"),F.push.apply(F,ge(n));var E=io,B=zo(Yu,F,function(){var D=F.join("|");if(Wd(D)){var R=Gd(D),P=xe(R,2),z=P[0],$=P[1];if(z)return[z,b,$,{},s,u]}var j=r(),q=Yd(j,{hashId:i,hashPriority:m,layer:C?a:void 0,path:n.join("-"),transformers:f,linters:y}),Y=xe(q,2),U=Y[0],M=Y[1],N=ui(U),O=Xu(F,N);return[N,b,O,M,s,u]},function(D,R){var P=xe(D,3),z=P[2];(R||x)&&io&&cu(z,{mark:or,attachTo:v})},function(D){var R=xe(D,4),P=R[0];R[1];var z=R[2],$=R[3];if(E&&P!==Wu){var j={mark:or,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){dn(ui($[N]),"_layer-".concat(N),J(J({},j),{},{prepend:!0}))});var M=dn(P,z,j);M[Pr]=h.instanceId,M.setAttribute(xn,b),U.forEach(function(N){dn(ui($[N]),"_effect-".concat(N),j)})}}),w=xe(B,3),A=w[0],g=w[1],S=w[2];return function(D){var R;return!p||E||!d?R=L.createElement(Qd,null):R=L.createElement("style",Rt({},H(H({},xn,g),or,S),{dangerouslySetInnerHTML:{__html:A}})),L.createElement(L.Fragment,null,R,D)}}var Zd=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||{},d=x.plain;if(u)return null;var m=a,v={"data-rc-order":"prependQueue","data-rc-priority":"".concat(l)};return m=Ji(a,o,s,v,d),c&&Object.keys(c).forEach(function(p){if(!e[p]){e[p]=!0;var f=ui(c[p]),y=Ji(f,o,"_effect-".concat(p),v,d);p.startsWith("@layer")?m=y+m:m+=y}}),[l,s,m]},Qu="cssVar",Jd=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=yr($n),x=l.cache.instanceId,d=l.container,m=s._tokenKey,v=[].concat(ge(r.path),[n,u,m]),p=zo(Qu,v,function(){var f=e(),y=Lu(f,n,{prefix:i,unitless:a,ignore:o,scope:u}),h=xe(y,2),C=h[0],b=h[1],F=Xu(v,b);return[C,b,F,n]},function(f){var y=xe(f,3),h=y[2];io&&cu(h,{mark:or,attachTo:d})},function(f){var y=xe(f,3),h=y[1],C=y[2];if(h){var b=dn(h,C,{mark:or,prepend:"queue",attachTo:d,priority:-999});b[Pr]=x,b.setAttribute(xn,n)}});return p},ep=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)},d=Ji(a,s,o,x,u);return[l,o,d]};H(H(H({},Yu,Zd),$u,Bd),Qu,ep);var _s=(function(){function t(r,e){Tt(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 rn(t){return t.notSplit=!0,t}rn(["borderTop","borderBottom"]),rn(["borderTop"]),rn(["borderBottom"]),rn(["borderLeft","borderRight"]),rn(["borderLeft"]),rn(["borderRight"]);function tp(t){return Ac(t)||Bc(t)||Sc(t)||Dc()}function xr(t,r){for(var e=t,n=0;n<r.length;n+=1){if(e==null)return;e=e[r[n]]}return e}function Zu(t,r,e,n){if(!r.length)return e;var i=tp(r),a=i[0],o=i.slice(1),s;return!t&&typeof a=="number"?s=[]:Array.isArray(t)?s=ge(t):s=J({},t),n&&e===void 0&&o.length===1?delete s[a][o[0]]:s[a]=Zu(s[a],o,e,n),s}function ir(t,r,e){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return r.length&&n&&e===void 0&&!xr(t,r.slice(0,-1))?t:Zu(t,r,e,n)}function rp(t){return Te(t)==="object"&&t!==null&&Object.getPrototypeOf(t)===Object.prototype}function ks(t){return Array.isArray(t)?[]:{}}var np=typeof Reflect>"u"?Object.keys:Reflect.ownKeys;function ln(){for(var t=arguments.length,r=new Array(t),e=0;e<t;e++)r[e]=arguments[e];var n=ks(r[0]);return r.forEach(function(i){function a(o,s){var c=new Set(s),u=xr(i,o),l=Array.isArray(u);if(l||rp(u)){if(!c.has(u)){c.add(u);var x=xr(n,o);l?n=ir(n,o,[]):(!x||Te(x)!=="object")&&(n=ir(n,o,ks(u))),np(u).forEach(function(d){a([].concat(ge(o),[d]),c)})}}else n=ir(n,o,u)}a([])}),n}const ip=L.createContext({}),ap=aa(void 0),Ht="${label} is not a valid ${type}",fa={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:Ht,method:Ht,array:Ht,object:Ht,number:Ht,date:Ht,boolean:Ht,integer:Ht,float:Ht,regexp:Ht,email:Ht,url:Ht,hex:Ht},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({},fa.Modal);let li=[];const Rs=()=>li.reduce((t,r)=>Object.assign(Object.assign({},t),r),fa.Modal);function op(t){if(t){const r=Object.assign({},t);return li.push(r),Rs(),()=>{li=li.filter(e=>e!==r),Rs()}}Object.assign({},fa.Modal)}const Ju=aa(void 0),sp="internalMark",up=t=>{const{locale:r={},children:e,_ANT_MARK__:n}=t;L.useEffect(()=>op(r==null?void 0:r.Modal),[r]);const i=L.useMemo(()=>Object.assign(Object.assign({},r),{exist:!0}),[r]);return L.createElement(Ju.Provider,{value:i},e)},el={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"},Pn=Object.assign(Object.assign({},el),{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 lp(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),d=r(i),m=r(a),v=r(o),p=e(c,u),f=t.colorLink||t.colorInfo,y=r(f),h=new kt(m[1]).mix(new kt(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:d[1],colorWarningBgHover:d[2],colorWarningBorder:d[3],colorWarningBorderHover:d[4],colorWarningHover:d[4],colorWarning:d[6],colorWarningActive:d[7],colorWarningTextHover:d[8],colorWarningText:d[9],colorWarningTextActive:d[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 kt("#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 fp(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 dp=t=>{const{controlHeight:r}=t;return{controlHeightSM:r*.75,controlHeightXS:r*.5,controlHeightLG:r*1.25}};function pp(t){return(t+8)/t}function hp(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:pp(e)}))}const vp=t=>{const r=hp(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 xp(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 Xt=(t,r)=>new kt(t).setA(r).toRgbString(),Sn=(t,r)=>new kt(t).darken(r).toHexString(),gp=t=>{const r=Qi(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]}},mp=(t,r)=>{const e=t||"#fff",n=r||"#000";return{colorBgBase:e,colorTextBase:n,colorText:Xt(n,.88),colorTextSecondary:Xt(n,.65),colorTextTertiary:Xt(n,.45),colorTextQuaternary:Xt(n,.25),colorFill:Xt(n,.15),colorFillSecondary:Xt(n,.06),colorFillTertiary:Xt(n,.04),colorFillQuaternary:Xt(n,.02),colorBgSolid:Xt(n,1),colorBgSolidHover:Xt(n,.75),colorBgSolidActive:Xt(n,.95),colorBgLayout:Sn(e,4),colorBgContainer:Sn(e,0),colorBgElevated:Sn(e,0),colorBgSpotlight:Xt(n,.85),colorBgBlur:"transparent",colorBorder:Sn(e,15),colorBorderSecondary:Sn(e,6)}};function yp(t){Ca.pink=Ca.magenta,ba.pink=ba.magenta;const r=Object.keys(el).map(e=>{const n=t[e]===Ca[e]?ba[e]:Qi(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),lp(t,{generateColorPalettes:gp,generateNeutralColorPalettes:mp})),vp(t.fontSize)),xp(t)),dp(t)),fp(t))}const tl=no(yp),uo={token:Pn,override:{override:Pn},hashed:!0},rl=ye.createContext(uo),lo="ant",da="anticon",Cp=(t,r)=>r||(t?`${lo}-${t}`:lo),wr=L.createContext({getPrefixCls:Cp,iconPrefixCls:da}),{Consumer:Ym}=wr,bp=`-ant-${Date.now()}-${Math.random()}`;function Fp(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 kt(o),u=Qi(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 kt(r.primaryColor),s=Qi(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 kt(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 Ep(t,r){const e=Fp(t,r);Mr()&&dn(e,`${bp}-dynamic-theme`)}const co=L.createContext(!1),wp=({children:t,disabled:r})=>{const e=L.useContext(co);return L.createElement(co.Provider,{value:r??e},t)},Nn=L.createContext(void 0),Ap=({children:t,size:r})=>{const e=L.useContext(Nn);return L.createElement(Nn.Provider,{value:r||e},t)};function Bp(){const t=yr(co),r=yr(Nn);return{componentDisabled:t,componentSize:r}}var nl=It(function t(){Tt(this,t)}),il="CALC_UNIT",Sp=new RegExp(il,"g");function Ra(t){return typeof t=="number"?"".concat(t).concat(il):t}var Dp=(function(t){Cn(e,t);var r=En(e);function e(n,i){var a;Tt(this,e),a=r.call(this),H(_e(a),"result",""),H(_e(a),"unitlessCssVar",void 0),H(_e(a),"lowPriority",void 0);var o=Te(n);return a.unitlessCssVar=i,n instanceof e?a.result="(".concat(n.result,")"):o==="number"?a.result=Ra(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(Ra(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(Ra(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(Sp,c?"px":""),typeof this.lowPriority<"u"?"calc(".concat(this.result,")"):this.result}}]),e})(nl),_p=(function(t){Cn(e,t);var r=En(e);function e(n){var i;return Tt(this,e),i=r.call(this),H(_e(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})(nl),kp=function(r,e){var n=r==="css"?Dp:_p;return function(i){return new n(i,e)}},Is=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 ea(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 fo(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 Ia={exports:{}},He={};/**
|
|
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 Ts;function Rp(){if(Ts)return He;Ts=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"),d=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),v;v=Symbol.for("react.module.reference");function p(f){if(typeof f=="object"&&f!==null){var y=f.$$typeof;switch(y){case t:switch(f=f.type,f){case e:case i:case n:case u:case l:return f;default:switch(f=f&&f.$$typeof,f){case s:case o:case c:case d:case x:case a:return f;default:return y}}case r:return y}}}return He.ContextConsumer=o,He.ContextProvider=a,He.Element=t,He.ForwardRef=c,He.Fragment=e,He.Lazy=d,He.Memo=x,He.Portal=r,He.Profiler=i,He.StrictMode=n,He.Suspense=u,He.SuspenseList=l,He.isAsyncMode=function(){return!1},He.isConcurrentMode=function(){return!1},He.isContextConsumer=function(f){return p(f)===o},He.isContextProvider=function(f){return p(f)===a},He.isElement=function(f){return typeof f=="object"&&f!==null&&f.$$typeof===t},He.isForwardRef=function(f){return p(f)===c},He.isFragment=function(f){return p(f)===e},He.isLazy=function(f){return p(f)===d},He.isMemo=function(f){return p(f)===x},He.isPortal=function(f){return p(f)===r},He.isProfiler=function(f){return p(f)===i},He.isStrictMode=function(f){return p(f)===n},He.isSuspense=function(f){return p(f)===u},He.isSuspenseList=function(f){return p(f)===l},He.isValidElementType=function(f){return typeof f=="string"||typeof f=="function"||f===e||f===i||f===n||f===u||f===l||f===m||typeof f=="object"&&f!==null&&(f.$$typeof===d||f.$$typeof===x||f.$$typeof===a||f.$$typeof===o||f.$$typeof===c||f.$$typeof===v||f.getModuleId!==void 0)},He.typeOf=p,He}var Ps;function Ip(){return Ps||(Ps=1,Ia.exports=Rp()),Ia.exports}var Ta=Ip(),Tp=Symbol.for("react.element"),Pp=Symbol.for("react.transitional.element"),Np=Symbol.for("react.fragment");function al(t){return t&&Te(t)==="object"&&(t.$$typeof===Tp||t.$$typeof===Pp)&&t.type===Np}var Op=Number(uc.split(".")[0]),Mp=function(r,e){typeof r=="function"?r(e):Te(r)==="object"&&r&&"current"in r&&(r.current=e)},Lp=function(r){var e,n;if(!r)return!1;if(ol(r)&&Op>=19)return!0;var i=Ta.isMemo(r)?r.type.type:r.type;return!(typeof i=="function"&&!((e=i.prototype)!==null&&e!==void 0&&e.render)&&i.$$typeof!==Ta.ForwardRef||typeof r=="function"&&!((n=r.prototype)!==null&&n!==void 0&&n.render)&&r.$$typeof!==Ta.ForwardRef)};function ol(t){return lc(t)&&!al(t)}var $p=function(r){if(r&&ol(r)){var e=r;return e.props.propertyIsEnumerable("ref")?e.props.ref:e.ref}return null};function Ns(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 sl=typeof CSSINJS_STATISTIC<"u",po=!0;function Vo(){for(var t=arguments.length,r=new Array(t),e=0;e<t;e++)r[e]=arguments[e];if(!sl)return Object.assign.apply(Object,[{}].concat(r));po=!1;var n={};return r.forEach(function(i){if(Te(i)==="object"){var a=Object.keys(i);a.forEach(function(o){Object.defineProperty(n,o,{configurable:!0,enumerable:!0,get:function(){return i[o]}})})}}),po=!0,n}var Os={};function zp(){}var qp=function(r){var e,n=r,i=zp;return sl&&typeof Proxy<"u"&&(e=new Set,n=new Proxy(r,{get:function(o,s){if(po){var c;(c=e)===null||c===void 0||c.add(s)}return o[s]}}),i=function(o,s){var c;Os[o]={global:Array.from(e),component:J(J({},(c=Os[o])===null||c===void 0?void 0:c.component),s)}}),{token:n,keys:e,flush:i}};function Ms(t,r,e){if(typeof e=="function"){var n;return e(Vo(r,(n=r[t])!==null&&n!==void 0?n:{}))}return e??{}}function Hp(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 Fs(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 Fs(a)}).join(","),")")}}}var Vp=1e3*60*10,jp=(function(){function t(){Tt(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&&Te(a)==="object"?"obj_".concat(n.getObjectID(a)):"".concat(Te(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>Vp&&(e.map.delete(a),e.lastAccessBeat.delete(a))}),this.accessBeat=0}}}]),t})(),Ls=new jp;function Up(t,r){return ye.useMemo(function(){var e=Ls.get(r);if(e)return e;var n=t();return Ls.set(r,n),n},r)}var Wp=function(){return{}};function Gp(t){var r=t.useCSP,e=r===void 0?Wp:r,n=t.useToken,i=t.usePrefix,a=t.getResetStyles,o=t.getCommonStyle,s=t.getCompUnitless;function c(d,m,v,p){var f=Array.isArray(d)?d[0]:d;function y(w){return"".concat(String(f)).concat(w.slice(0,1).toUpperCase()).concat(w.slice(1))}var h=(p==null?void 0:p.unitless)||{},C=typeof s=="function"?s(d):{},b=J(J({},C),{},H({},y("zIndexPopup"),!0));Object.keys(h).forEach(function(w){b[y(w)]=h[w]});var F=J(J({},p),{},{unitless:b,prefixToken:y}),E=l(d,m,v,F),B=u(f,v,F);return function(w){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:w,g=E(w,A),S=xe(g,2),D=S[1],R=B(A),P=xe(R,2),z=P[0],$=P[1];return[z,D,$]}}function u(d,m,v){var p=v.unitless,f=v.injectStyle,y=f===void 0?!0:f,h=v.prefixToken,C=v.ignore,b=function(B){var w=B.rootCls,A=B.cssVar,g=A===void 0?{}:A,S=n(),D=S.realToken;return Jd({path:[d],prefix:g.prefix,key:g.key,unitless:p,ignore:C,token:D,scope:w},function(){var R=Ms(d,D,m),P=Ns(d,D,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},F=function(B){var w=n(),A=w.cssVar;return[function(g){return y&&A?ye.createElement(ye.Fragment,null,ye.createElement(b,{rootCls:B,cssVar:A,component:d}),g):g},A==null?void 0:A.key]};return F}function l(d,m,v){var p=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},f=Array.isArray(d)?d:[d,d],y=xe(f,1),h=y[0],C=f.join("-"),b=t.layer||{name:"antd"};return function(F){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:F,B=n(),w=B.theme,A=B.realToken,g=B.hashId,S=B.token,D=B.cssVar,R=i(),P=R.rootPrefixCls,z=R.iconPrefixCls,$=e(),j=D?"css":"js",q=Up(function(){var I=new Set;return D&&Object.keys(p.unitless||{}).forEach(function(V){I.add(ii(V,D.prefix)),I.add(ii(V,Is(h,D.prefix)))}),kp(j,I)},[j,h,D==null?void 0:D.prefix]),Y=Hp(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"&&so(J(J({},N),{},{clientOnly:!1,path:["Shared",P]}),function(){return a(S,{prefix:{rootPrefixCls:P,iconPrefixCls:z},csp:$})});var O=so(J(J({},N),{},{path:[C,F,z]}),function(){if(p.injectStyle===!1)return[];var I=qp(S),V=I.token,X=I.flush,ee=Ms(h,A,v),te=".".concat(F),ie=Ns(h,A,ee,{deprecatedTokens:p.deprecatedTokens});D&&ee&&Te(ee)==="object"&&Object.keys(ee).forEach(function(K){ee[K]="var(".concat(ii(K,Is(h,D.prefix)),")")});var se=Vo(V,{componentCls:te,prefixCls:F,iconCls:".".concat(z),antCls:".".concat(P),calc:q,max:U,min:M},D?ee:ie),ke=m(se,{hashId:g,prefixCls:F,rootPrefixCls:P,iconPrefixCls:z});X(h,ie);var Q=typeof o=="function"?o(se,F,E,p.resetFont):null;return[p.resetStyle===!1?null:Q,ke]});return[O,g]}}function x(d,m,v){var p=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},f=l(d,m,v,J({resetStyle:!1,order:-998},p)),y=function(C){var b=C.prefixCls,F=C.rootCls,E=F===void 0?b:F;return f(b,E),null};return y}return{genStyleHooks:c,genSubStyleComponent:x,genComponentStyleHook:l}}const Kp="5.28.0";function Pa(t){return t>=0&&t<=255}function Xn(t,r){const{r:e,g:n,b:i,a}=new kt(t).toRgb();if(a<1)return t;const{r:o,g:s,b:c}=new kt(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),d=Math.round((i-c*(1-u))/u);if(Pa(l)&&Pa(x)&&Pa(d))return new kt({r:l,g:x,b:d,a:Math.round(u*100)/100}).toRgbString()}return new kt({r:e,g:n,b:i,a:1}).toRgbString()}var Xp=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 ul(t){const{override:r}=t,e=Xp(t,["override"]),n=Object.assign({},r);Object.keys(Pn).forEach(d=>{delete n[d]});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:Xn(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:Xn(i.colorErrorBg,i.colorBgContainer),colorWarningOutline:Xn(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:Xn(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 kt("rgba(0, 0, 0, 0.16)").toRgbString()},
|
|
88
|
+
0 3px 6px 0 ${new kt("rgba(0, 0, 0, 0.12)").toRgbString()},
|
|
89
|
+
0 5px 12px 4px ${new kt("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 $s=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 ll={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},Yp={motionBase:!0,motionUnit:!0},Qp={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},cl=(t,r,e)=>{const n=e.getDerivativeToken(t),{override:i}=r,a=$s(r,["override"]);let o=Object.assign(Object.assign({},n),{override:i});return o=ul(o),a&&Object.entries(a).forEach(([s,c])=>{const{theme:u}=c,l=$s(c,["theme"]);let x=l;u&&(x=cl(Object.assign(Object.assign({},o),l),{override:l},u)),o[s]=x}),o};function pa(){const{token:t,hashed:r,theme:e,override:n,cssVar:i}=ye.useContext(rl),a=`${Kp}-${r||""}`,o=e||tl,[s,c,u]=Ad(o,[Pn,t],{salt:a,override:n,getComputedToken:cl,formatToken:ul,cssVar:i&&{prefix:i.prefix,key:i.key,unitless:ll,ignore:Yp,preserve:Qp}});return[o,u,r?c:"",s,i]}const Zp=(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}),Jp=()=>({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"}}),eh=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"}}}),th=(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})}},fl=t=>({[`.${t}`]:Object.assign(Object.assign({},Jp()),{[`.${t} .${t}-icon`]:{display:"block"}})}),{genStyleHooks:rh}=Gp({usePrefix:()=>{const{getPrefixCls:t,iconPrefixCls:r}=yr(wr);return{rootPrefixCls:t(),iconPrefixCls:r}},useToken:()=>{const[t,r,e,n,i]=pa();return{theme:t,realToken:r,hashId:e,token:n,cssVar:i}},useCSP:()=>{const{csp:t}=yr(wr);return t??{}},getResetStyles:(t,r)=>{var e;const n=eh(t);return[n,{"&":n},fl((e=r==null?void 0:r.prefix.iconPrefixCls)!==null&&e!==void 0?e:da)]},getCommonStyle:th,getCompUnitless:()=>ll}),nh=(t,r)=>{const[e,n]=pa();return so({token:n,hashId:"",path:["ant-design-icons",t],nonce:()=>r==null?void 0:r.nonce,layer:{name:"antd"}},()=>fl(t))},ih=Object.assign({},L),{useId:zs}=ih,ah=()=>"",oh=typeof zs>"u"?ah:zs;function sh(t,r,e){var n;const i=t||{},a=i.inherit===!1||!r?Object.assign(Object.assign({},uo),{hashed:(n=r==null?void 0:r.hashed)!==null&&n!==void 0?n:uo.hashed,cssVar:r==null?void 0:r.cssVar}):r,o=oh();return Ou(()=>{var s,c;if(!t)return r;const u=Object.assign({},a.components);Object.keys(t.components||{}).forEach(d=>{u[d]=Object.assign(Object.assign({},u[d]),t.components[d])});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!to(u,x,!0)}))}function qs(t){return t instanceof HTMLElement||t instanceof SVGElement}function dl(t){return t&&Te(t)==="object"&&qs(t.nativeElement)?t.nativeElement:qs(t)?t:null}function uh(t){var r=dl(t);if(r)return r;if(t instanceof ye.Component){var e;return(e=ns.findDOMNode)===null||e===void 0?void 0:e.call(ns,t)}return null}var lh=["children"],pl=L.createContext({});function ch(t){var r=t.children,e=Or(t,lh);return L.createElement(pl.Provider,{value:e},r)}var fh=(function(t){Cn(e,t);var r=En(e);function e(){return Tt(this,e),r.apply(this,arguments)}return It(e,[{key:"render",value:function(){return this.props.children}}]),e})(L.Component);function dh(t){var r=L.useReducer(function(s){return s+1},0),e=xe(r,2),n=e[1],i=L.useRef(t),a=ea(function(){return i.current}),o=ea(function(s){i.current=typeof s=="function"?s(i.current):s,n()});return[a,o]}var Ir="none",Yn="appear",Qn="enter",Zn="leave",Hs="none",ar="prepare",cn="start",fn="active",jo="end",hl="prepared";function Vs(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 ph(t,r){var e={animationend:Vs("Animation","AnimationEnd"),transitionend:Vs("Transition","TransitionEnd")};return t&&("AnimationEvent"in r||delete e.animationend.animation,"TransitionEvent"in r||delete e.transitionend.transition),e}var hh=ph(Mr(),typeof window<"u"?window:{}),vl={};if(Mr()){var vh=document.createElement("div");vl=vh.style}var Jn={};function xl(t){if(Jn[t])return Jn[t];var r=hh[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 vl)return Jn[t]=r[a],Jn[t]}return""}var gl=xl("animationend"),ml=xl("transitionend"),yl=!!(gl&&ml),js=gl||"animationend",Us=ml||"transitionend";function Ws(t,r){if(!t)return null;if(Te(t)==="object"){var e=r.replace(/-\w/g,function(n){return n[1].toUpperCase()});return t[e]}return"".concat(t,"-").concat(r)}const xh=(function(t){var r=Ue();function e(i){i&&(i.removeEventListener(Us,t),i.removeEventListener(js,t))}function n(i){r.current&&r.current!==i&&e(r.current),i&&i!==r.current&&(i.addEventListener(Us,t),i.addEventListener(js,t),r.current=i)}return L.useEffect(function(){return function(){e(r.current)}},[]),[n,e]});var Cl=Mr()?cc:Le,bl=function(r){return+setTimeout(r,16)},Fl=function(r){return clearTimeout(r)};typeof window<"u"&&"requestAnimationFrame"in window&&(bl=function(r){return window.requestAnimationFrame(r)},Fl=function(r){return window.cancelAnimationFrame(r)});var Gs=0,Uo=new Map;function El(t){Uo.delete(t)}var ho=function(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;Gs+=1;var n=Gs;function i(a){if(a===0)El(n),r();else{var o=bl(function(){i(a-1)});Uo.set(n,o)}}return i(e),n};ho.cancel=function(t){var r=Uo.get(t);return El(t),Fl(r)};const gh=(function(){var t=L.useRef(null);function r(){ho.cancel(t.current)}function e(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;r();var a=ho(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 mh=[ar,cn,fn,jo],yh=[ar,hl],wl=!1,Ch=!0;function Al(t){return t===fn||t===jo}const bh=(function(t,r,e){var n=fo(Hs),i=xe(n,2),a=i[0],o=i[1],s=gh(),c=xe(s,2),u=c[0],l=c[1];function x(){o(ar,!0)}var d=r?yh:mh;return Cl(function(){if(a!==Hs&&a!==jo){var m=d.indexOf(a),v=d[m+1],p=e(a);p===wl?o(v,!0):v&&u(function(f){function y(){f.isCanceled()||o(v,!0)}p===!0?y():Promise.resolve(p).then(y)})}},[t,a]),L.useEffect(function(){return function(){l()}},[]),[x,a]});function Fh(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,d=n.onAppearPrepare,m=n.onEnterPrepare,v=n.onLeavePrepare,p=n.onAppearStart,f=n.onEnterStart,y=n.onLeaveStart,h=n.onAppearActive,C=n.onEnterActive,b=n.onLeaveActive,F=n.onAppearEnd,E=n.onEnterEnd,B=n.onLeaveEnd,w=n.onVisibleChanged,A=fo(),g=xe(A,2),S=g[0],D=g[1],R=dh(Ir),P=xe(R,2),z=P[0],$=P[1],j=fo(null),q=xe(j,2),Y=q[0],U=q[1],M=z(),N=Ue(!1),O=Ue(null);function I(){return e()}var V=Ue(!1);function X(){$(Ir),U(null,!0)}var ee=ea(function(Ce){var be=z();if(be!==Ir){var Pe=I();if(!(Ce&&!Ce.deadline&&Ce.target!==Pe)){var Fe=V.current,We;be===Yn&&Fe?We=F==null?void 0:F(Pe,Ce):be===Qn&&Fe?We=E==null?void 0:E(Pe,Ce):be===Zn&&Fe&&(We=B==null?void 0:B(Pe,Ce)),Fe&&We!==!1&&X()}}}),te=xh(ee),ie=xe(te,1),se=ie[0],ke=function(be){switch(be){case Yn:return H(H(H({},ar,d),cn,p),fn,h);case Qn:return H(H(H({},ar,m),cn,f),fn,C);case Zn:return H(H(H({},ar,v),cn,y),fn,b);default:return{}}},Q=L.useMemo(function(){return ke(M)},[M]),K=bh(M,!t,function(Ce){if(Ce===ar){var be=Q[ar];return be?be(I()):wl}if(Z in Q){var Pe;U(((Pe=Q[Z])===null||Pe===void 0?void 0:Pe.call(Q,I(),null))||null)}return Z===fn&&M!==Ir&&(se(I()),l>0&&(clearTimeout(O.current),O.current=setTimeout(function(){ee({deadline:!0})},l))),Z===hl&&X(),Ch}),ae=xe(K,2),ue=ae[0],Z=ae[1],de=Al(Z);V.current=de;var Se=Ue(null);Cl(function(){if(!(N.current&&Se.current===r)){D(r);var Ce=N.current;N.current=!0;var be;!Ce&&r&&s&&(be=Yn),Ce&&r&&a&&(be=Qn),(Ce&&!r&&u||!Ce&&x&&!r&&u)&&(be=Zn);var Pe=ke(be);be&&(t||Pe[ar])?($(be),ue()):$(Ir),Se.current=r}},[r]),Le(function(){(M===Yn&&!s||M===Qn&&!a||M===Zn&&!u)&&$(Ir)},[s,a,u]),Le(function(){return function(){N.current=!1,clearTimeout(O.current)}},[]);var Re=L.useRef(!1);Le(function(){S&&(Re.current=!0),S!==void 0&&M===Ir&&((Re.current||S)&&(w==null||w(S)),Re.current=!0)},[S,M]);var Ve=Y;return Q[ar]&&Z===cn&&(Ve=J({transition:"none"},Ve)),[M,Z,Ve,S??r]}function Eh(t){var r=t;Te(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,d=i.motionName,m=i.leavedClassName,v=i.eventProps,p=L.useContext(pl),f=p.motion,y=e(i,f),h=Ue(),C=Ue();function b(){try{return h.current instanceof HTMLElement?h.current:uh(C.current)}catch{return null}}var F=Fh(y,s,b,i),E=xe(F,4),B=E[0],w=E[1],A=E[2],g=E[3],S=L.useRef(g);g&&(S.current=!0);var D=L.useCallback(function(q){h.current=q,Mp(a,q)},[a]),R,P=J(J({},v),{},{visible:s});if(!x)R=null;else if(B===Ir)g?R=x(J({},P),D):!u&&S.current&&m?R=x(J(J({},P),{},{className:m}),D):l||!u&&!m?R=x(J(J({},P),{},{style:{display:"none"}}),D):R=null;else{var z;w===ar?z="prepare":Al(w)?z="active":w===cn&&(z="start");var $=Ws(d,"".concat(B,"-").concat(z));R=x(J(J({},P),{},{className:mr(Ws(d,B),H(H({},$,$&&z),d,typeof d=="string")),style:A}),D)}if(L.isValidElement(R)&&Lp(R)){var j=$p(R);j||(R=L.cloneElement(R,{ref:D}))}return L.createElement(fh,{ref:C},R)});return n.displayName="CSSMotion",n}const wh=Eh(yl);var vo="add",xo="keep",go="remove",Na="removed";function Ah(t){var r;return t&&Te(t)==="object"&&"key"in t?r=t:r={key:t},J(J({},r),{},{key:String(r.key)})}function mo(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return t.map(Ah)}function Bh(){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=mo(t),o=mo(r);a.forEach(function(u){for(var l=!1,x=n;x<i;x+=1){var d=o[x];if(d.key===u.key){n<x&&(e=e.concat(o.slice(n,x).map(function(m){return J(J({},m),{},{status:vo})})),n=x),e.push(J(J({},d),{},{status:xo})),n+=1,l=!0;break}}l||e.push(J(J({},u),{},{status:go}))}),n<i&&(e=e.concat(o.slice(n).map(function(u){return J(J({},u),{},{status:vo})})));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,d=l.status;return x!==u||d!==go}),e.forEach(function(l){l.key===u&&(l.status=xo)})}),e}var Sh=["component","children","onVisibleChanged","onAllRemoved"],Dh=["status"],_h=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearPrepare","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function kh(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:wh,e=(function(n){Cn(a,n);var i=En(a);function a(){var o;Tt(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(_e(o),"state",{keyEntities:[]}),H(_e(o),"removeKey",function(l){o.setState(function(x){var d=x.keyEntities.map(function(m){return m.key!==l?m:J(J({},m),{},{status:Na})});return{keyEntities:d}},function(){var x=o.state.keyEntities,d=x.filter(function(m){var v=m.status;return v!==Na}).length;d===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,d=u.onVisibleChanged;u.onAllRemoved;var m=Or(u,Sh),v=l||L.Fragment,p={};return _h.forEach(function(f){p[f]=m[f],delete m[f]}),delete m.keys,L.createElement(v,m,c.map(function(f,y){var h=f.status,C=Or(f,Dh),b=h===vo||h===xo;return L.createElement(r,Rt({},p,{key:C.key,visible:b,eventProps:C,onVisibleChanged:function(E){d==null||d(E,{key:C.key}),E||s.removeKey(C.key)}}),function(F,E){return x(J(J({},F),{},{index:y}),E)})}))}}],[{key:"getDerivedStateFromProps",value:function(s,c){var u=s.keys,l=c.keyEntities,x=mo(u),d=Bh(l,x);return{keyEntities:d.filter(function(m){var v=l.find(function(p){var f=p.key;return m.key===f});return!(v&&v.status===Na&&m.status===go)})}}}]),a})(L.Component);return H(e,"defaultProps",{component:"div"}),e}const Rh=kh(yl),Ks=L.createContext(!0);function Ih(t){const r=L.useContext(Ks),{children:e}=t,[,n]=pa(),{motion:i}=n,a=L.useRef(!1);return a.current||(a.current=r!==i),a.current?L.createElement(Ks.Provider,{value:i},L.createElement(ch,{motion:i},e)):e}const Th=()=>null;var Ph=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 Nh=["getTargetContainer","getPopupContainer","renderEmpty","input","pagination","form","select","button"];let ta,Bl,Sl,Dl;function ci(){return ta||lo}function Oh(){return Bl||da}function Mh(t){return Object.keys(t).some(r=>r.endsWith("Color"))}const Lh=t=>{const{prefixCls:r,iconPrefixCls:e,theme:n,holderRender:i}=t;r!==void 0&&(ta=r),e!==void 0&&(Bl=e),"holderRender"in t&&(Dl=i),n&&(Mh(n)?Ep(ci(),n):Sl=n)},$h=()=>({getPrefixCls:(t,r)=>r||(t?`${ci()}-${t}`:ci()),getIconPrefixCls:Oh,getRootPrefixCls:()=>ta||ci(),getTheme:()=>Sl,holderRender:Dl}),zh=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:d,dropdownMatchSelectWidth:m,popupMatchSelectWidth:v,popupOverflow:p,legacyLocale:f,parentContext:y,iconPrefixCls:h,theme:C,componentDisabled:b,segmented:F,statistic:E,spin:B,calendar:w,carousel:A,cascader:g,collapse:S,typography:D,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:te,pagination:ie,input:se,textArea:ke,empty:Q,badge:K,radio:ae,rate:ue,switch:Z,transfer:de,avatar:Se,message:Re,tag:Ve,table:Ce,card:be,tabs:Pe,timeline:Fe,timePicker:We,upload:re,notification:Ae,tree:st,colorPicker:At,datePicker:Bt,rangePicker:Mt,flex:ze,wave:Lt,dropdown:ur,warning:Ar,tour:St,tooltip:Cr,popover:lr,popconfirm:$r,floatButton:cr,floatButtonGroup:zr,variant:Br,inputNumber:qr,treeSelect:$t}=t,Ft=L.useCallback((qe,Ge)=>{const{prefixCls:ft}=t;if(Ge)return Ge;const vt=ft||y.getPrefixCls("");return qe?`${vt}-${qe}`:vt},[y.getPrefixCls,t.prefixCls]),Dt=h||y.iconPrefixCls||da,zt=e||y.csp;nh(Dt,zt);const Jt=sh(C,y.theme,{prefixCls:Ft("")}),Wt={csp:zt,autoInsertSpaceInButton:n,alert:i,anchor:a,locale:s||f,direction:u,space:l,splitter:x,virtual:d,popupMatchSelectWidth:v??m,popupOverflow:p,getPrefixCls:Ft,iconPrefixCls:Dt,theme:Jt,segmented:F,statistic:E,spin:B,calendar:w,carousel:A,cascader:g,collapse:S,typography:D,checkbox:R,descriptions:P,divider:z,drawer:$,skeleton:j,steps:q,image:Y,input:se,textArea:ke,layout:U,list:M,mentions:N,modal:O,progress:I,result:V,slider:X,breadcrumb:ee,menu:te,pagination:ie,empty:Q,badge:K,radio:ae,rate:ue,switch:Z,transfer:de,avatar:Se,message:Re,tag:Ve,table:Ce,card:be,tabs:Pe,timeline:Fe,timePicker:We,upload:re,notification:Ae,tree:st,colorPicker:At,datePicker:Bt,rangePicker:Mt,flex:ze,wave:Lt,dropdown:ur,warning:Ar,tour:St,tooltip:Cr,popover:lr,popconfirm:$r,floatButton:cr,floatButtonGroup:zr,variant:Br,inputNumber:qr,treeSelect:$t},tt=Object.assign({},y);Object.keys(Wt).forEach(qe=>{Wt[qe]!==void 0&&(tt[qe]=Wt[qe])}),Nh.forEach(qe=>{const Ge=t[qe];Ge&&(tt[qe]=Ge)}),typeof n<"u"&&(tt.button=Object.assign({autoInsertSpace:n},tt.button));const he=Ou(()=>tt,tt,(qe,Ge)=>{const ft=Object.keys(qe),vt=Object.keys(Ge);return ft.length!==vt.length||ft.some(tr=>qe[tr]!==Ge[tr])}),{layer:it}=L.useContext($n),Et=L.useMemo(()=>({prefixCls:Dt,csp:zt,layer:it?"antd":void 0}),[Dt,zt,it]);let Be=L.createElement(L.Fragment,null,L.createElement(Th,{dropdownMatchSelectWidth:m}),r);const at=L.useMemo(()=>{var qe,Ge,ft,vt;return ln(((qe=fa.Form)===null||qe===void 0?void 0:qe.defaultValidateMessages)||{},((ft=(Ge=he.locale)===null||Ge===void 0?void 0:Ge.Form)===null||ft===void 0?void 0:ft.defaultValidateMessages)||{},((vt=he.form)===null||vt===void 0?void 0:vt.validateMessages)||{},(o==null?void 0:o.validateMessages)||{})},[he,o==null?void 0:o.validateMessages]);Object.keys(at).length>0&&(Be=L.createElement(ap.Provider,{value:at},Be)),s&&(Be=L.createElement(up,{locale:s,_ANT_MARK__:sp},Be)),Be=L.createElement(_c.Provider,{value:Et},Be),c&&(Be=L.createElement(Ap,{size:c},Be)),Be=L.createElement(Ih,null,Be);const er=L.useMemo(()=>{const qe=Jt||{},{algorithm:Ge,token:ft,components:vt,cssVar:tr}=qe,Yr=Ph(qe,["algorithm","token","components","cssVar"]),qt=Ge&&(!Array.isArray(Ge)||Ge.length>0)?no(Ge):tl,fr={};Object.entries(vt||{}).forEach(([Zr,Jr])=>{const Pt=Object.assign({},Jr);"algorithm"in Pt&&(Pt.algorithm===!0?Pt.theme=qt:(Array.isArray(Pt.algorithm)||typeof Pt.algorithm=="function")&&(Pt.theme=no(Pt.algorithm)),delete Pt.algorithm),fr[Zr]=Pt});const Qr=Object.assign(Object.assign({},Pn),ft);return Object.assign(Object.assign({},Yr),{theme:qt,token:Qr,components:fr,override:Object.assign({override:Qr},fr),cssVar:tr})},[Jt]);return C&&(Be=L.createElement(rl.Provider,{value:er},Be)),he.warning&&(Be=L.createElement(ip.Provider,{value:he.warning},Be)),b!==void 0&&(Be=L.createElement(wp,{disabled:b},Be)),L.createElement(wr.Provider,{value:he},Be)},An=t=>{const r=L.useContext(wr),e=L.useContext(Ju);return L.createElement(zh,Object.assign({parentContext:r,legacyLocale:e},t))};An.ConfigContext=wr;An.SizeContext=Nn;An.config=Lh;An.useConfig=Bp;Object.defineProperty(An,"SizeContext",{get:()=>Nn});var zn=J({},Ic),qh=zn.version,Oa=zn.render,Hh=zn.unmountComponentAtNode,ha;try{var Vh=Number((qh||"").split(".")[0]);Vh>=18&&(ha=zn.createRoot)}catch{}function Xs(t){var r=zn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;r&&Te(r)==="object"&&(r.usingClientEntryPoint=t)}var ra="__rc_react_root__";function jh(t,r){Xs(!0);var e=r[ra]||ha(r);Xs(!1),e.render(t),r[ra]=e}function Uh(t,r){Oa==null||Oa(t,r)}function Wh(t,r){if(ha){jh(t,r);return}Uh(t,r)}function Gh(t){return yo.apply(this,arguments)}function yo(){return yo=Wr(Ot().mark(function t(r){return Ot().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",Promise.resolve().then(function(){var i;(i=r[ra])===null||i===void 0||i.unmount(),delete r[ra]}));case 1:case"end":return n.stop()}},t)})),yo.apply(this,arguments)}function Kh(t){Hh(t)}function Xh(t){return Co.apply(this,arguments)}function Co(){return Co=Wr(Ot().mark(function t(r){return Ot().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(ha===void 0){n.next=2;break}return n.abrupt("return",Gh(r));case 2:Kh(r);case 3:case"end":return n.stop()}},t)})),Co.apply(this,arguments)}const Yh=(t,r)=>(Wh(t,r),()=>Xh(r));let Qh=Yh;function Zh(t){return Qh}var Jh={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"},ev=function(r,e){return L.createElement(bn,Rt({},r,{ref:e,icon:Jh}))},tv=L.forwardRef(ev),rv={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"},nv=function(r,e){return L.createElement(bn,Rt({},r,{ref:e,icon:rv}))},iv=L.forwardRef(nv),av={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"},ov=function(r,e){return L.createElement(bn,Rt({},r,{ref:e,icon:av}))},sv=L.forwardRef(ov),uv={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"},lv=function(r,e){return L.createElement(bn,Rt({},r,{ref:e,icon:uv}))},cv=L.forwardRef(lv),fv={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"},dv=function(r,e){return L.createElement(bn,Rt({},r,{ref:e,icon:fv}))},pv=L.forwardRef(dv),hv={ENTER:13},vv=`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`,xv=`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`,gv="".concat(vv," ").concat(xv).split(/[\s\n]+/),mv="aria-",yv="data-";function Ys(t,r){return t.indexOf(r)===0}function Cv(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"||Ys(i,mv))||e.data&&Ys(i,yv)||e.attr&&gv.includes(i))&&(n[i]=t[i])}),n}var _l=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,d=t.closable,m=t.closeIcon,v=m===void 0?"x":m,p=t.props,f=t.onClick,y=t.onNoticeClose,h=t.times,C=t.hovering,b=L.useState(!1),F=xe(b,2),E=F[0],B=F[1],w=L.useState(0),A=xe(w,2),g=A[0],S=A[1],D=L.useState(0),R=xe(D,2),P=R[0],z=R[1],$=C||E,j=o>0&&s,q=function(){y(l)},Y=function(V){(V.key==="Enter"||V.code==="Enter"||V.keyCode===hv.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(te){var ie=te+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 Te(d)==="object"&&d!==null?d:d?{closeIcon:v}:{}},[d,v]),M=Cv(U,!0),N=100-(!g||g<0?0:g>100?100:g),O="".concat(e,"-notice");return L.createElement("div",Rt({},p,{ref:r,className:mr(O,i,H({},"".concat(O,"-closable"),d)),style:n,onMouseEnter:function(V){var X;B(!0),p==null||(X=p.onMouseEnter)===null||X===void 0||X.call(p,V)},onMouseLeave:function(V){var X;B(!1),p==null||(X=p.onMouseLeave)===null||X===void 0||X.call(p,V)},onClick:f}),L.createElement("div",{className:"".concat(O,"-content")},x),d&&L.createElement("a",Rt({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+"%"))}),kl=ye.createContext({}),bv=function(r){var e=r.children,n=r.classNames;return ye.createElement(kl.Provider,{value:{classNames:n}},e)},Qs=8,Zs=3,Js=16,Fv=function(r){var e={offset:Qs,threshold:Zs,gap:Js};if(r&&Te(r)==="object"){var n,i,a;e.offset=(n=r.offset)!==null&&n!==void 0?n:Qs,e.threshold=(i=r.threshold)!==null&&i!==void 0?i:Zs,e.gap=(a=r.gap)!==null&&a!==void 0?a:Js}return[!!r,e]},Ev=["className","style","classNames","styles"],wv=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=yr(kl),d=x.classNames,m=Ue({}),v=le(null),p=xe(v,2),f=p[0],y=p[1],h=le([]),C=xe(h,2),b=C[0],F=C[1],E=e.map(function($){return{config:$,key:String($.key)}}),B=Fv(l),w=xe(B,2),A=w[0],g=w[1],S=g.offset,D=g.threshold,R=g.gap,P=A&&(b.length>0||E.length<=D),z=typeof s=="function"?s(n):s;return Le(function(){A&&b.length>1&&F(function($){return $.filter(function(j){return E.some(function(q){var Y=q.key;return j===Y})})})},[b,E,A]),Le(function(){var $;if(A&&m.current[($=E[E.length-1])===null||$===void 0?void 0:$.key]){var j;y(m.current[(j=E[E.length-1])===null||j===void 0?void 0:j.key])}},[E,A]),ye.createElement(Rh,Rt({key:n,className:mr(i,"".concat(i,"-").concat(n),d==null?void 0:d.list,a,H(H({},"".concat(i,"-stack"),!!A),"".concat(i,"-stack-expanded"),P)),style:o,keys:E,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,te=X.style,ie=X.classNames,se=X.styles,ke=Or(X,Ev),Q=E.findIndex(function(Fe){return Fe.key===V}),K={};if(A){var ae=E.length-1-(Q>-1?Q:M-1),ue=n==="top"||n==="bottom"?"-50%":"0";if(ae>0){var Z,de,Se;K.height=P?(Z=m.current[V])===null||Z===void 0?void 0:Z.offsetHeight:f==null?void 0:f.offsetHeight;for(var Re=0,Ve=0;Ve<ae;Ve++){var Ce;Re+=((Ce=m.current[E[E.length-1-Ve].key])===null||Ce===void 0?void 0:Ce.offsetHeight)+R}var be=(P?Re:ae*S)*(n.startsWith("top")?1:-1),Pe=!P&&f!==null&&f!==void 0&&f.offsetWidth&&(de=m.current[V])!==null&&de!==void 0&&de.offsetWidth?((f==null?void 0:f.offsetWidth)-S*2*(ae<3?ae:3))/((Se=m.current[V])===null||Se===void 0?void 0:Se.offsetWidth):1;K.transform="translate3d(".concat(ue,", ").concat(be,"px, 0) scaleX(").concat(Pe,")")}else K.transform="translate3d(".concat(ue,", 0, 0)")}return ye.createElement("div",{ref:j,className:mr("".concat(i,"-notice-wrapper"),Y,ie==null?void 0:ie.wrapper),style:J(J(J({},U),K),se==null?void 0:se.wrapper),onMouseEnter:function(){return F(function(We){return We.includes(V)?We:[].concat(ge(We),[V])})},onMouseLeave:function(){return F(function(We){return We.filter(function(re){return re!==V})})}},ye.createElement(_l,Rt({},ke,{ref:function(We){Q>-1?m.current[V]=We:delete m.current[V]},prefixCls:i,classNames:ie,styles:se,className:mr(ee,d==null?void 0:d.notice),style:te,times:I,key:O,eventKey:O,onNoticeClose:u,hovering:A&&b.length>0})))})},Av=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,d=L.useState([]),m=xe(d,2),v=m[0],p=m[1],f=function(A){var g,S=v.find(function(D){return D.key===A});S==null||(g=S.onClose)===null||g===void 0||g.call(S),p(function(D){return D.filter(function(R){return R.key!==A})})};L.useImperativeHandle(r,function(){return{open:function(A){p(function(g){var S=ge(g),D=S.findIndex(function(z){return z.key===A.key}),R=J({},A);if(D>=0){var P;R.times=(((P=g[D])===null||P===void 0?void 0:P.times)||0)+1,S[D]=R}else R.times=0,S.push(R);return o>0&&S.length>o&&(S=S.slice(-o)),S})},close:function(A){f(A)},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(A){var g=A.placement,S=g===void 0?"topRight":g;S&&(w[S]=w[S]||[],w[S].push(A))}),Object.keys(C).forEach(function(A){w[A]=w[A]||[]}),b(w)},[v]);var F=function(A){b(function(g){var S=J({},g),D=S[A]||[];return D.length||delete S[A],S})},E=L.useRef(!1);if(L.useEffect(function(){Object.keys(C).length>0?E.current=!0:E.current&&(u==null||u(),E.current=!1)},[C]),!i)return null;var B=Object.keys(C);return Tc(L.createElement(L.Fragment,null,B.map(function(w){var A=C[w],g=L.createElement(wv,{key:w,configList:A,placement:w,prefixCls:n,className:s==null?void 0:s(w),style:c==null?void 0:c(w),motion:a,onNoticeClose:f,onAllNoticeRemoved:F,stack:l});return x?x(g,{prefixCls:n,key:w}):g})),i)}),Bv=["getContainer","motion","prefixCls","maxCount","className","style","onAllRemoved","stack","renderNotifications"],Sv=function(){return document.body},e0=0;function Dv(){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?Sv: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=Or(t,Bv),d=L.useState(),m=xe(d,2),v=m[0],p=m[1],f=L.useRef(),y=L.createElement(Av,{container:v,ref:f,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],F=C[1],E=ea(function(w){var A=Dv(x,w);(A.key===null||A.key===void 0)&&(A.key="rc-notification-".concat(e0),e0+=1),F(function(g){return[].concat(ge(g),[{type:"open",config:A}])})}),B=L.useMemo(function(){return{open:E,close:function(A){F(function(g){return[].concat(ge(g),[{type:"close",key:A}])})},destroy:function(){F(function(A){return[].concat(ge(A),[{type:"destroy"}])})}}},[]);return L.useEffect(function(){p(e())}),L.useEffect(function(){if(f.current&&b.length){b.forEach(function(g){switch(g.type){case"open":f.current.open(g.config);break;case"close":f.current.close(g.key);break;case"destroy":f.current.destroy();break}});var w,A;F(function(g){return(w!==g||!A)&&(w=g,A=g.filter(function(S){return!b.includes(S)})),A})}},[b]),[B,y]}const Rl=t=>{const[,,,,r]=pa();return r?`${t}-css-var`:""};var kv={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"},Rv=function(r,e){return L.createElement(bn,Rt({},r,{ref:e,icon:kv}))},Iv=L.forwardRef(Rv);const Tv=100,Pv=10,Nv=Tv*Pv,Ov=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:d,paddingXS:m,borderRadiusLG:v,zIndexPopup:p,contentPadding:f,contentBg:y}=t,h=`${r}-notice`,C=new _s("MessageMoveIn",{"0%":{padding:0,transform:"translateY(-100%)",opacity:0},"100%":{padding:m,transform:"translateY(0)",opacity:1}}),b=new _s("MessageMoveOut",{"0%":{maxHeight:t.height,padding:m,opacity:1},"100%":{maxHeight:0,padding:0,opacity:0}}),F={padding:m,textAlign:"center",[`${r}-custom-content`]:{display:"flex",alignItems:"center"},[`${r}-custom-content > ${e}`]:{marginInlineEnd:d,fontSize:u},[`${h}-content`]:{display:"inline-block",padding:f,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({},Zp(t)),{color:i,position:"fixed",top:d,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({},F)}},{[`${r}-notice-pure-panel`]:Object.assign(Object.assign({},F),{padding:0,textAlign:"start"})}]},Mv=t=>({zIndexPopup:t.zIndexPopupBase+Nv+10,contentBg:t.colorBgElevated,contentPadding:`${(t.controlHeightLG-t.fontSize*t.lineHeight)/2}px ${t.paddingSM}px`}),Il=rh("Message",t=>{const r=Vo(t,{height:150});return Ov(r)},Mv);var Lv=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 $v={info:L.createElement(cv,null),success:L.createElement(tv,null),error:L.createElement(iv,null),warning:L.createElement(sv,null),loading:L.createElement(pv,null)},Tl=({prefixCls:t,type:r,icon:e,children:n})=>L.createElement("div",{className:mr(`${t}-custom-content`,`${t}-${r}`)},e||$v[r],L.createElement("span",null,n)),zv=t=>{const{prefixCls:r,className:e,type:n,icon:i,content:a}=t,o=Lv(t,["prefixCls","className","type","icon","content"]),{getPrefixCls:s}=L.useContext(wr),c=r||s("message"),u=Rl(c),[l,x,d]=Il(c,u);return l(L.createElement(_l,Object.assign({},o,{prefixCls:c,className:mr(e,x,`${c}-notice-pure-panel`,d,u),eventKey:"pure",duration:null,content:L.createElement(Tl,{prefixCls:c,type:n,icon:i},a)})))};function qv(t,r){return{motionName:r??`${t}-move-up`}}function Wo(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 Hv=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 Vv=8,jv=3,Uv=({children:t,prefixCls:r})=>{const e=Rl(r),[n,i,a]=Il(r,e);return n(L.createElement(bv,{classNames:{list:mr(i,a,e)}},t))},Wv=(t,{prefixCls:r,key:e})=>L.createElement(Uv,{prefixCls:r,key:e},t),Gv=L.forwardRef((t,r)=>{const{top:e,prefixCls:n,getContainer:i,maxCount:a,duration:o=jv,rtl:s,transitionName:c,onAllRemoved:u}=t,{getPrefixCls:l,getPopupContainer:x,message:d,direction:m}=L.useContext(wr),v=n||l("message"),p=()=>({left:"50%",transform:"translateX(-50%)",top:e??Vv}),f=()=>mr({[`${v}-rtl`]:s??m==="rtl"}),y=()=>qv(v,c),h=L.createElement("span",{className:`${v}-close-x`},L.createElement(Iv,{className:`${v}-close-icon`})),[C,b]=_v({prefixCls:v,style:p,className:f,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:Wv});return L.useImperativeHandle(r,()=>Object.assign(Object.assign({},C),{prefixCls:v,message:d})),b});let t0=0;function Pl(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 E=()=>{};return E.then=()=>{},E}const{open:u,prefixCls:l,message:x}=r.current,d=`${l}-notice`,{content:m,icon:v,type:p,key:f,className:y,style:h,onClose:C}=c,b=Hv(c,["content","icon","type","key","className","style","onClose"]);let F=f;return F==null&&(t0+=1,F=`antd-message-${t0}`),Wo(E=>(u(Object.assign(Object.assign({},b),{key:F,content:L.createElement(Tl,{prefixCls:l,type:p,icon:v},m),placement:"top",className:mr(p&&`${d}-${p}`,y,x==null?void 0:x.className),style:Object.assign(Object.assign({},x==null?void 0:x.style),h),onClose:()=>{C==null||C(),E()}})),()=>{n(F)}))},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,d)=>{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=d);const f=Object.assign(Object.assign({onClose:p,duration:v},m),{type:c});return i(f)};o[c]=u}),o},[]),L.createElement(Gv,Object.assign({key:"message-holder"},t,{ref:r}))]}function Kv(t){return Pl(t)}let Qt=null,Vr=t=>t(),On=[],Mn={};function r0(){const{getContainer:t,duration:r,rtl:e,maxCount:n,top:i}=Mn,a=(t==null?void 0:t())||document.body;return{getContainer:()=>a,duration:r,rtl:e,maxCount:n,top:i}}const Xv=ye.forwardRef((t,r)=>{const{messageConfig:e,sync:n}=t,{getPrefixCls:i}=yr(wr),a=Mn.prefixCls||i("message"),o=yr(td),[s,c]=Pl(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}),Yv=ye.forwardRef((t,r)=>{const[e,n]=ye.useState(r0),i=()=>{n(r0)};ye.useEffect(i,[]);const a=$h(),o=a.getRootPrefixCls(),s=a.getIconPrefixCls(),c=a.getTheme(),u=ye.createElement(Xv,{ref:r,sync:i,messageConfig:e});return ye.createElement(An,{prefixCls:o,iconPrefixCls:s,theme:c},a.holderRender?a.holderRender(u):u)}),va=()=>{if(!Qt){const t=document.createDocumentFragment(),r={fragment:t};Qt=r,Vr(()=>{Zh()(ye.createElement(Yv,{ref:n=>{const{instance:i,sync:a}=n||{};Promise.resolve().then(()=>{!r.instance&&i&&(r.instance=i,r.sync=a,va())})}}),t)});return}Qt.instance&&(On.forEach(t=>{const{type:r,skipped:e}=t;if(!e)switch(r){case"open":{Vr(()=>{const n=Qt.instance.open(Object.assign(Object.assign({},Mn),t.config));n==null||n.then(t.resolve),t.setCloseFn(n)});break}case"destroy":Vr(()=>{Qt==null||Qt.instance.destroy(t.key)});break;default:Vr(()=>{var n;const i=(n=Qt.instance)[r].apply(n,ge(t.args));i==null||i.then(t.resolve),t.setCloseFn(i)})}}),On=[])};function Qv(t){Mn=Object.assign(Object.assign({},Mn),t),Vr(()=>{var r;(r=Qt==null?void 0:Qt.sync)===null||r===void 0||r.call(Qt)})}function Zv(t){const r=Wo(e=>{let n;const i={type:"open",config:t,resolve:e,setCloseFn:a=>{n=a}};return On.push(i),()=>{n?Vr(()=>{n()}):i.skipped=!0}});return va(),r}function Jv(t,r){const e=Wo(n=>{let i;const a={type:t,args:r,resolve:n,setCloseFn:o=>{i=o}};return On.push(a),()=>{i?Vr(()=>{i()}):a.skipped=!0}});return va(),e}const ex=t=>{On.push({type:"destroy",key:t}),va()},tx=["success","info","warning","error","loading"],rx={open:Zv,destroy:ex,config:Qv,useMessage:Kv,_InternalPanelDoNotUseOrYouWillBeFired:zv},fi=rx;tx.forEach(t=>{fi[t]=(...r)=>Jv(t,r)});var di={exports:{}};/*!
|
|
131
|
+
* clipboard.js v2.0.11
|
|
132
|
+
* https://clipboardjs.com/
|
|
133
|
+
*
|
|
134
|
+
* Licensed MIT © Zeno Rocha
|
|
135
|
+
*/var nx=di.exports,n0;function ix(){return n0||(n0=1,(function(t,r){(function(n,i){t.exports=i()})(nx,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),d=s(817),m=s.n(d);function v(N){try{return document.execCommand(N)}catch{return!1}}var p=function(O){var I=m()(O);return v("cut"),I},f=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 F(N){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?F=function(I){return typeof I}:F=function(I){return I&&typeof Symbol=="function"&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I},F(N)}var E=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,te=O.text;if(V!=="copy"&&V!=="cut")throw new Error('Invalid "action" value, use either "copy" or "cut"');if(ee!==void 0)if(ee&&F(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(te)return b(te,{container:X});if(ee)return V==="cut"?f(ee):b(ee,{container:X})},B=E;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 A(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 D(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){D(I,N);var O=P(I);function I(V,X){var ee;return A(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(te){return ee.onClick(te)})}},{key:"onClick",value:function(X){var ee=X.delegateTarget||X.currentTarget,te=this.action(ee)||"copy",ie=B({action:te,container:this.container,target:this.target(ee),text:this.text(ee)});this.emit(ie?"success":"error",{action:te,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 f(X)}},{key:"isSupported",value:function(){var X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["copy","cut"],ee=typeof X=="string"?[X]:X,te=!!document.queryCommandSupported;return ee.forEach(function(ie){te=te&&!!document.queryCommandSupported(ie)}),te}}]),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(d,m,v,p,f){var y=x.apply(this,arguments);return d.addEventListener(v,y,f),{destroy:function(){d.removeEventListener(v,y,f)}}}function l(d,m,v,p,f){return typeof d.addEventListener=="function"?u.apply(null,arguments):typeof v=="function"?u.bind(null,document).apply(null,arguments):(typeof d=="string"&&(d=document.querySelectorAll(d)),Array.prototype.map.call(d,function(y){return u(y,m,v,p,f)}))}function x(d,m,v,p){return function(f){f.delegateTarget=c(f.target,m),f.delegateTarget&&p.call(d,f)}}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,f){if(!v&&!p&&!f)throw new Error("Missing required arguments");if(!c.string(p))throw new TypeError("Second argument must be a String");if(!c.fn(f))throw new TypeError("Third argument must be a Function");if(c.node(v))return x(v,p,f);if(c.nodeList(v))return d(v,p,f);if(c.string(v))return m(v,p,f);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function x(v,p,f){return v.addEventListener(p,f),{destroy:function(){v.removeEventListener(p,f)}}}function d(v,p,f){return Array.prototype.forEach.call(v,function(y){y.addEventListener(p,f)}),{destroy:function(){Array.prototype.forEach.call(v,function(y){y.removeEventListener(p,f)})}}}function m(v,p,f){return u(document.body,v,p,f)}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 d=0,m=l.length;d<m;d++)l[d].fn!==c&&l[d].fn._!==c&&x.push(l[d]);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})})(di)),di.exports}var ax=ix();const ox=fu(ax),sx=(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 ox(r.currentTarget||r.target,{text:()=>e});try{n.on("success",()=>{fi.success("\u6587\u672C\u590D\u5236\u6210\u529F",2),n.destroy()}),n.on("error",i=>{fi.error("\u590D\u5236\u5931\u8D25",2),n.destroy()}),n.onClick(r)}catch(i){n.destroy(),fi.error("\u590D\u5236\u5931\u8D25: "+i,2)}};function ux(t){const r=[];for(const e of t){if(e.query){const n=e.query.queryId||e.query.id||e.queryId||e.id||gr(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||gr(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 lx=""+new URL("defaultWeLogo.svg",import.meta.url).href,cx="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==",fx=(t,r)=>{const e={...sa.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 dx({config:t,styles:r}){if(!t)return null;const e=JSON.parse(t.configJson),n=Me(()=>{var i;return{...sa.colors,...(i=r==null?void 0:r.theme)==null?void 0:i.colors}},[r]);return ne("div",{className:"w-[340px] rounded-xl p-4 animate-fade-in bg-white",children:[ne("div",{className:"flex items-center mb-2",children:[T("span",{className:"text-md font-bold truncate mr-2",style:{color:n.primary},children:e.config_name||"\u52A9\u624B\u914D\u7F6E"}),T("span",{className:"text-xs truncate rounded px-2 py-0.5",style:{backgroundColor:`${n.primary}1A`,color:n.disabled},children:e.model_name})]}),T("div",{className:"border-b my-2",style:{borderColor:n.border}}),ne("div",{className:"flex flex-wrap gap-x-4 gap-y-1 text-xs text-gray-700 mb-2",style:{color:n.text},children:[ne("div",{children:["\u4E0A\u4E0B\u6587\u6700\u5927\u8F6E\u6570\uFF1A",T("span",{className:"font-semibold",children:e.max_round})]}),ne("div",{children:["\u6700\u5927\u4EE4\u724C\u6570\uFF1A",T("span",{className:"font-semibold",children:e.max_tokens})]}),ne("div",{children:["\u6E29\u5EA6\uFF1A",T("span",{className:"font-semibold",children:e.temperature})]}),ne("div",{children:["\u53EC\u56DE\u6570\uFF1A",T("span",{className:"font-semibold",children:e.top_k})]}),ne("div",{children:["\u591A\u6837\u6027\uFF1A",T("span",{className:"font-semibold",children:e.top_p})]}),ne("div",{children:["\u76F8\u4F3C\u5EA6\u9608\u503C\uFF1A",T("span",{className:"font-semibold",children:e.score_threshold})]})]}),ne("div",{className:"mb-2",children:[T("div",{className:"text-xs text-gray-400 mb-1",style:{color:n.disabled},children:"\u5173\u8054\u77E5\u8BC6\u5E93\uFF1A"}),T("div",{className:"flex flex-wrap gap-1",children:e.knowledge_base_name?e.knowledge_base_name.split(";").map((i,a)=>T("span",{className:"px-2 py-0.5 rounded-full text-xs",style:{backgroundColor:`${n.primary}1A`,color:n.primary},children:i},a)):T("span",{className:"text-gray-300",style:{color:n.disabled},children:"\u65E0"})})]}),ne("div",{className:"mb-2",children:[T("div",{className:"text-xs text-gray-400 mb-1",style:{color:n.disabled},children:"\u5F00\u542F\u529F\u80FD:"}),ne("div",{className:"flex flex-wrap gap-2 text-xs mt-2",children:[!!e.enabled_faq&&T("span",{className:"px-2 py-0.5 rounded",style:{backgroundColor:`${n.success}1A`,color:n.success},children:"FAQ"}),!!e.enabled_graph&&T("span",{className:"px-2 py-0.5 rounded",style:{backgroundColor:`${n.success}1A`,color:n.success},children:"\u56FE\u8C31"}),!!e.dependOnKb&&T("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&&T("span",{className:"px-2 py-0.5 rounded",style:{backgroundColor:`${n.success}1A`,color:n.success},children:"\u8868\u683C\u7B5B\u9009"}),!!e.enabled_rerank&&T("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&&T("span",{className:"px-2 py-0.5 rounded",style:{backgroundColor:`${n.success}1A`,color:n.success},children:"\u6EAF\u6E90"}),!!e.is_download&&T("span",{className:"px-2 py-0.5 rounded",style:{backgroundColor:`${n.success}1A`,color:n.success},children:"\u4E0B\u8F7D\u6EAF\u6E90"})]})]})]})}function px(t,r=[],e=60){const[n,i]=le("");return Le(()=>{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 hx(t){const{assistantList:r,eventsEmit:e,styles:n,selectedId:i,onSelectAssistant:a,productLogo:o}=t,{messages:s}=ua(),[c,u]=le(1),[l,x]=le(!1),[d,m]=le(""),v=l||d.trim()?6:12,p=Ue(),f=Ue(!1),y=Ue(null),h=Ue(null),C=Ue("");Le(()=>{i&&p.current!==i&&(e==null||e("conversation:new_assistant_change",{assistantId:i}),p.current=i)},[i,e]);const b=Me(()=>gr(),[]);Le(()=>{var D;if((D=n==null?void 0:n.theme)!=null&&D.colors){const R=document.createElement("style");return R.innerHTML=fx(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 F=Me(()=>r.find(D=>D.id===i),[r,i]),E=Me(()=>JSON.parse((F==null?void 0:F.configJson)||"{}"),[F]),B=Me(()=>{if(!d.trim())return r||[];const D=d.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(D)||q.includes(D)}catch{return P.includes(D)}})},[r,d]),w=Math.ceil(((B==null?void 0:B.length)||0)/v),A=(B==null?void 0:B.slice((c-1)*v,c*v))||[];Le(()=>{if(i&&i!==h.current){if(f.current&&y.current!==null){h.current=i;return}const D=d.trim()?B:r;if(D&&D.length>0){const R=D.findIndex(P=>P.id===i);if(R!==-1){const P=Math.floor(R/v)+1;u(P),h.current=i}}}},[i,r,B,v,d]),Le(()=>{if(d!==C.current){if(f.current&&y.current!==null){u(y.current),f.current=!1,y.current=null,C.current=d;return}if(h.current===i){C.current=d;return}f.current||(d.trim()&&(h.current=null),u(1)),C.current=d}},[d,i]),Le(()=>{w>0&&c>w&&u(w)},[w,c]);const g=E.prologue||s.welcome.defaultPrologue,S=px(g,[i],30);return ne("div",{className:`flex flex-col relative items-center justify-center h-full w-full g-welcome-${b}`,children:[T("img",{src:o||lx,alt:"logo",className:"mb-4",style:{width:68,height:68}}),T("div",{className:"text-3xl font-bold mb-2 g-welcome-title",children:S}),!i&&T("div",{className:"flex mb-2 g-welcome-subtitle",children:s.welcome.selectAssistant}),ne("div",{style:{maxWidth:"1200px"},className:`flex mt-8 flex-wrap gap-3
|
|
253
|
+
max-w-[1200px] px-8 w-full mx-auto justify-center mb-4`,children:[l?T("div",{className:"flex items-center gap-2 px-5 w-full",style:{flexBasis:"100%"},children:T(ou,{className:"g-welcome-search-input w-full",placeholder:s.welcome.searchAssistant,prefix:T(Wa,{size:16}),suffix:T("button",{type:"button",onClick:()=>{x(!1),m("")},style:{background:"transparent",border:"none",cursor:"pointer"},children:T(To,{size:14})}),value:d,onChange:D=>m(D.target.value),autoFocus:!0})}):T("button",{type:"button",className:"g-welcome-search-btn",onClick:()=>x(!0),children:T(Wa,{size:16})}),A&&A.length>0?T(Ln,{children:A.map(D=>{const R=i===D.id;let P=D.icon;try{const z=JSON.parse(D.configJson||"{}");P=P||z.icon||z.avatar||z.logo}catch{}return P=P||cx,T(xc,{content:()=>T(dx,{config:r.find(z=>z.id===D.id),styles:n}),trigger:"hover",placement:"bottom",children:ne("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(D.id);const z=l||d.trim(),j=(z?r:d.trim()?B:r).findIndex(q=>q.id===D.id);if(j!==-1){const Y=Math.floor(j/(z?12:v))+1;u(Y),h.current=D.id,z&&(y.current=Y,f.current=!0,setTimeout(()=>{m(""),x(!1)},100))}},title:D.name,children:[T("span",{className:"icon-badge",children:T("img",{src:P,alt:"icon",style:{width:16,height:16,borderRadius:4}})}),T("span",{className:"truncate max-w-[180px]",children:D.name})]})},D.id)})}):T("div",{className:"g-welcome-subtitle",children:"\u6682\u65E0\u53EF\u7528\u52A9\u624B"})]}),w>1&&ne("div",{className:"flex items-center gap-2",children:[T("button",{type:"button",className:"g-welcome-pagination-btn",onClick:()=>u(D=>Math.max(1,D-1)),disabled:c===1,children:T(af,{size:16})}),T("div",{className:"flex items-center gap-1",children:(()=>{const D=[];if(w<=7)for(let P=1;P<=w;P++)D.push(P);else if(D.push(1),c<=4){for(let P=2;P<=5;P++)D.push(P);D.push("..."),D.push(w)}else if(c>=w-3){D.push("...");for(let P=w-4;P<=w;P++)D.push(P)}else{D.push("...");for(let P=c-1;P<=c+1;P++)D.push(P);D.push("..."),D.push(w)}return D.map((P,z)=>{if(P==="...")return T("span",{className:"g-welcome-pagination-text px-1",children:"..."},`ellipsis-${z}`);const $=P;return T("button",{type:"button",className:`g-welcome-pagination-btn ${c===$?"active":""}`,onClick:()=>u($),children:$},$)})})()}),T("button",{type:"button",className:"g-welcome-pagination-btn",onClick:()=>u(D=>Math.min(w,D+1)),disabled:c===w,children:T(of,{size:16})})]})]})}class Ma extends Error{}let pr=null,Fr=null,nr=null,Ke=[],nn,an,La=new Map;const vx=({baseUrl:t,token:r,CSRFToken:e,setChatData:n,activeSessionId:i,setAppStatus:a,setConversationList:o})=>{const s=f=>{if(!f)return!1;if(typeof f=="string"){const y=f.trim();return y!==""&&y!=="[]"&&y!=="null"}return!0},c=({content:f,status:y,respTime:h,filePaths:C,reference:b,webReference:F,knowledgeBases:E,graphReference:B,databaseReference:w,llmType:A,resultType:g,queryId:S,tokens:D,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 ke=U.length-2;if(ke>=0&&((se=U[ke])==null?void 0:se.istype)==="user"){const Q={...U[ke],filePaths:C};O[ke]=Q}}const I=S&&S!==N.queryId,V=y===1&&N.status===2,X=I||V?s(B)?B:null:B!==void 0&&s(B)?B:N.graphReference;y===2&&B!==void 0&&console.log("[AichatUseController] reset_chat status=2 \u65F6\u7684 graphReference:",{graphReference:B,isValid:s(B),lastMessageGraphReference:N.graphReference,finalGraphReference:X,isNewQuery:I,isRestart:V});let ee;I?ee=f:V?ee="":y===4||y===2&&!f?ee=N.content||"":ee=(N.content||"")+f;const te={...N,content:ee,status:y,respTime:h,filePaths:C,reference:I||V?b||"[]":b,webReference:I||V?F||"[]":F,knowledgeBases:I||V?E||"[]":E,graphReference:X,databaseReference:I||V?w!==void 0?w:null:w!==void 0?w:N.databaseReference,resultType:g,llmType:A,tokens:D,queryId:S||N.queryId||gr(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 te.clientSideId=te.clientSideId||te.queryId+"-ai",O[M]=te,[{...Y,isNew:!1,messages:O},...q.slice(1)]})},u=f=>{if(f instanceof Ma)throw a(y=>({...y,display:"error",sender:"ready"})),pr&&(pr.abort(),pr=null),Fr=null,nr=null,f};return{updateUserFilesMessage:({currentFiles:f})=>{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 E=C.slice();return E[b]={...C[b],currentFiles:f},[{...h,messages:E},...y.slice(1)]})},api_startChat_re:(f,y)=>{pr&&pr.abort(),pr=new AbortController,Fr=f.sessionId,nr=f.queryId,Ke=[],nn=void 0,an=void 0,La=new Map;const h=`${t}/qa/ai/question_re`;console.log("data",f);const C={...f};Pc(h,{method:"post",signal:pr.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 Ma("Internal Server Error");if(!b.ok)throw new Ma(`HTTP error: ${b.status}`)},onmessage:b=>{var V,X,ee,te;const F=JSON.parse(b.data);if(Fr!==F.sessionId){console.log("[AichatUseController] \u6D41\u5F0F\u8BF7\u6C42\u7684 sessionId \u5DF2\u4E0D\u5339\u914D\uFF0C\u5FFD\u7565\u6570\u636E",{currentStreamSessionId:Fr,receivedSessionId:F.sessionId,activeSessionId:i});return}if(i!==F.sessionId)return;const{reply:E,resultType:B,respTime:w,reference:A,webReference:g,graphReference:S,knowledgeBases:D,filePaths:R,status:P,docs:z,llmType:$,databaseReference:j,businessType:q,nodeStatus:Y,enableCot:U,chainRespTime:M,faqReference:N}=F;if(P===4&&q){Y===2&&typeof M=="number"&&M>0&&La.set(q,M);const ie=Y===2&&typeof M=="number"&&M>0?M:void 0;Ke=hc(Ke,{businessType:q,nodeStatus:Y,reply:E,respTime:ie,chainRespTime:ie}),console.log("[AichatUseController] status=4 \u805A\u5408\u601D\u7EF4\u94FE\u6570\u636E:",{businessType:q,nodeStatus:Y,content:(V=E==null?void 0:E.content)==null?void 0:V.substring(0,50),currentThoughtNodesCount:Ke.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=E==null?void 0:E.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"&&(nn=U),P===1||P===2){const ie=Array.from(La.values()).reduce((se,ke)=>se+ke,0);ie>0&&(an=ie)}const O=R?JSON.parse(R):[];P===2&&E&&E.content&&(E.content.includes("\u6A21\u578B\u6682\u65E0\u6CD5\u8FD4\u56DE")||E.content.includes("\u5931\u8D25")||E.content.includes("\u9519\u8BEF")||E.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=Ke.length>0?Ke.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=E==null?void 0:E.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:A||z||"",webReference:g||"",knowledgeBases:D||"",graphReference:I,databaseReference:j,llmType:$,resultType:B,queryId:F.queryId,tokens:F.tokens,chain:ie,thoughtChainNodes:Ke.length>0?[...Ke]:void 0,enableCot:nn,chainRespTime:an,faqReference:N})}else if(P===1){Ke.length>0&&(Ke=Ke.map(se=>({...se,nodeStatus:2}))),console.log("[AichatUseController] status=1 \u66F4\u65B0\u6B63\u6587:",{businessType:q,content:(te=E==null?void 0:E.content)==null?void 0:te.substring(0,50),thoughtNodesCount:Ke.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=Ke.length>0?Ke.map(se=>({businessType:se.businessType,nodeStatus:se.nodeStatus,content:se.content})):void 0;c({content:E.content||"",status:P,respTime:w,filePaths:O,reference:A||z||"",webReference:g||"",graphReference:I,knowledgeBases:D||"",databaseReference:j??null,llmType:$,resultType:B,queryId:F.queryId,tokens:F.tokens,chain:ie??void 0,thoughtChainNodes:Ke.length>0?[...Ke]:void 0,enableCot:nn,chainRespTime:an,faqReference:N})}else if(P===2){Ke.length>0&&(Ke=Ke.map(se=>({...se,nodeStatus:2})));const ie=Ke.length>0?Ke.map(se=>({businessType:se.businessType,nodeStatus:se.nodeStatus,content:se.content})):void 0;if(c({content:E.content||"",status:2,respTime:w,filePaths:O,reference:A||z||"",webReference:g||"",knowledgeBases:D||"",graphReference:I,databaseReference:j,llmType:$,resultType:B,queryId:F.queryId,tokens:F.tokens,chain:ie,thoughtChainNodes:Ke.length>0?[...Ke]:void 0,enableCot:nn,chainRespTime:an,faqReference:N}),Ke=[],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=Ke.length>0?Ke.map(se=>({businessType:se.businessType,nodeStatus:se.nodeStatus,content:se.content,respTime:se.respTime,chainRespTime:se.respTime})):void 0;c({content:E.content||"",status:P,respTime:w,filePaths:O,reference:A||z||"",knowledgeBases:D||"",webReference:g||"",graphReference:I,databaseReference:j,llmType:$,resultType:B,queryId:F.queryId,tokens:F.tokens,chain:ie,thoughtChainNodes:Ke.length>0?[...Ke]:void 0,enableCot:nn,chainRespTime:an})}},onerror:u,onclose:()=>{Fr===f.sessionId&&(Fr=null,nr=null)}})},addEmptyMessage:({queryId:f,content:y,filePaths:h,currentFiles:C})=>{n(b=>{const F=new Date().toISOString(),E=f||gr(32),B={istype:"user",content:y,time:F,queryId:E,clientSideId:E+"-user",filePaths:h||"",currentFiles:C||[]},w={istype:"ai",content:"",time:new Date(Date.now()+1).toISOString(),streaming:!0,status:0,queryId:E,clientSideId:E+"-ai"},A=b.find(g=>g.id===i);return A?A.messages.push(B,w):console.warn("addEmptyMessage called without an active session."),[...b]})},setLastEmptyMessage:({now:f})=>{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 F=C[b];if(F.istype!=="ai")return y;const E=C.slice();return E[b]={...F,istype:"ai",content:"",time:f,streaming:!0,status:0},[{...h,messages:E},...y.slice(1)]})},stopStream:async()=>{if(nr)try{await Nt.delete(`${t}/qa/ai/abortStream?queryId=${nr}`,{headers:{Authorization:r||"","X-CSRF-TOKEN-IN":e||""}}),console.log("[AichatUseController] \u5DF2\u8C03\u7528\u540E\u7AEF\u63A5\u53E3\u505C\u6B62\u6D41\u5F0F\u8BF7\u6C42",nr)}catch(f){console.error("[AichatUseController] \u8C03\u7528\u505C\u6B62\u63A5\u53E3\u5931\u8D25",f)}else console.warn("[AichatUseController] \u505C\u6B62\u6D41\u5F0F\u8BF7\u6C42\u65F6\u672A\u627E\u5230 queryId");pr=null,Fr=null,nr=null,a(f=>({...f,display:"ready",sender:"ready"}))},cancelStreamBySessionId:async f=>{if(pr&&Fr===f){if(console.log("[AichatUseController] \u5207\u6362\u4F1A\u8BDD\uFF0C\u53D6\u6D88\u6B63\u5728\u8FDB\u884C\u7684\u6D41\u5F0F\u8BF7\u6C42",f),nr)try{await Nt.delete(`${t}/qa/ai/abortStream?queryId=${nr}`,{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",nr)}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 pr=null,Fr=null,nr=null,a(y=>({...y,display:"ready",sender:"ready"})),!0}return!1}}},xx=1e3,gx=3e3;function mx({url:t,token:r,CSRFToken:e,onError:n,activeSessionId:i}){const[a,o]=le([]),[s,c]=le(()=>({uploadedFiles:[]})),u=Ue(!1),l=async p=>{var f,y;if(!p)return null;try{const h=await Nt.get(`${t}/index/knowledgeBase/file/getFilesBysessionId?sessionId=${p}`,{headers:{Authorization:r}});console.log("[DEBUG] \u83B7\u53D6\u4E34\u65F6\u6587\u4EF6\u5217\u8868 res:",(f=h==null?void 0:h.data)==null?void 0:f.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=jt((p,f)=>{const y=p.join(",");let h=0,C=null;C=()=>{u.current=!0};const b=async()=>{if(!u.current){if(h>=xx){u.current||f.onFail("\u6587\u4EF6\u89E3\u6790\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");return}h++;try{const F=await Nt.get(`${t}/index/knowledgeBase/file/getFileStatusByUids?uids=${y}`,{headers:{Authorization:r}});if(u.current)return;if(F.data.success){const E=F.data.data;u.current||f.onStatusUpdate(E),E.every(w=>{const A=w.fileParseStatus??w.status;return A===3||A===4})?u.current||f.onComplete():u.current||setTimeout(b,gx)}else u.current||f.onFail(F.data.errorMsg||"\u67E5\u8BE2\u6587\u4EF6\u72B6\u6001\u5931\u8D25")}catch(F){if(n==null||n(F),u.current)return;f.onFail("\u67E5\u8BE2\u6587\u4EF6\u72B6\u6001\u65F6\u53D1\u751F\u7F51\u7EDC\u9519\u8BEF")}}};return b(),C},[t,r,n]),d=jt(async(p,f)=>{if(!p){console.warn("[DEBUG] \u7F3A\u5C11uid\uFF0C\u65E0\u6CD5\u5220\u9664\u4E34\u65F6\u6587\u4EF6");return}Nc({url:t,token:r,CSRFToken:e},{uid:p,queryId:f},(y,h)=>{y?(Ct.success("\u6587\u4EF6\u5DF2\u4ECE\u4E34\u65F6\u77E5\u8BC6\u5E93\u79FB\u9664"),l(i)):(console.log("[DEBUG] removeFilefromTempUpload \u56DE\u8C03 false\uFF0Cres:",h),Ct.error("\u6587\u4EF6\u79FB\u9664\u5931\u8D25"))})},[t,r,e,i]),m=jt(()=>{u.current=!1},[]),v=jt(()=>{u.current=!0},[]);return{fileManagerData:s,fileStatuses:a,setFileManagerData:c,setFileStatuses:o,pollFileStatus:x,handleRemoveFromTemp:d,resetStopFlag:m,setStopFlag:v,stoppedRef:u,getTempFileList:l}}function yx({title:t,subtitle:r}){const[e,n]=le(0);return Le(()=>{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]),ne("div",{className:"flex flex-col justify-center items-center min-h-screen bg-gradient-to-br from-[#EEF4FF] via-white to-[#F5F8FF]",children:[ne("div",{className:"mb-8 flex flex-col items-center",children:[T("div",{className:"mt-6 text-2xl font-semibold text-[#222222] tracking-wide",children:t||"\u5C0F\u9CB8\u667A\u80FD\u4F1A\u8BDD\u52A9\u624B"}),T("div",{className:"mt-2 text-sm text-[#555555]",children:r||"\u8BA9\u667A\u80FD\u5BF9\u8BDD\u66F4\u7B80\u5355"})]}),ne("div",{className:"relative w-80 max-w-sm",children:[T("div",{className:"w-full h-2 bg-[#EEF4FF] rounded-full overflow-hidden shadow-inner",children:T("div",{className:"h-full bg-gradient-to-r from-[#2B69FF] to-[#8F91FF] transition-all duration-300 ease-out",style:{width:`${Math.min(e,100)}%`}})}),ne("div",{className:"absolute -right-2 top-5 text-sm text-[#555555]",children:[Math.min(Math.round(e),100),"%"]})]}),ne("div",{className:"mt-8 flex flex-col items-center gap-2",children:[T("div",{className:"text-sm text-[#555555] animate-pulse",children:"\u6B63\u5728\u521D\u59CB\u5316\u5E94\u7528"}),T("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 Nl=document.createElement("style");Nl.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(Nl);function Cx(){return ne("div",{className:"flex flex-col gap-8 p-4 w-full mx-auto",children:[ne("div",{className:"flex items-start gap-4",children:[T("div",{className:"w-10 h-10 rounded-full bg-muted/80 animate-pulse"}),T("div",{className:"flex-1",children:T(Wn,{active:!0,paragraph:{rows:1}})})]}),ne("div",{className:"flex items-start gap-4",children:[T("div",{className:"w-10 h-10 rounded-full bg-muted/80 animate-pulse"}),T("div",{className:"flex-1",children:T(Wn,{active:!0,paragraph:{rows:3}})})]}),ne("div",{className:"flex items-start gap-4",children:[T("div",{className:"w-10 h-10 rounded-full bg-muted/80 animate-pulse"}),T("div",{className:"flex-1",children:T(Wn,{active:!0,paragraph:{rows:1}})})]}),ne("div",{className:"flex items-start gap-4",children:[T("div",{className:"w-10 h-10 rounded-full bg-muted/80 animate-pulse"}),T("div",{className:"flex-1",children:T(Wn,{active:!0,paragraph:{rows:2}})})]})]})}function bx({msg:t,subMsg:r}){return ne("div",{className:"flex flex-col items-center justify-center h-full p-8 text-center bg-white/80 backdrop-blur-sm",children:[T("div",{className:"mb-6 animate-bounce",children:T(lf,{size:64,className:"text-[#d70016]"})}),T("h2",{className:"text-[20px] font-medium text-[#222222] mb-3",children:t||"\u5E94\u7528\u521D\u59CB\u5316\u5931\u8D25"}),T("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"}),T(vr,{type:"primary",icon:T(gu,{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 Fx(){return ne("div",{className:"flex flex-col items-center justify-center h-full p-8 text-center bg-transparent! backdrop-blur-sm",children:[T("div",{className:"mb-6 animate-bounce",children:T(Oc,{size:64,className:"text-[#d70016]"})}),T("h2",{className:"text-[20px] font-medium text-[#222222] mb-3",children:"\u62B1\u6B49\uFF0C\u9047\u5230\u4E86\u4E00\u4E9B\u95EE\u9898"}),T("p",{className:"text-[14px] text-[#555555] mb-8 max-w-[400px]",children:"\u8BF7\u6C42\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5"}),T(vr,{type:"primary",icon:T(gu,{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 bo(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(bo(n)):al(n)&&n.props?e=e.concat(bo(n.props.children,r)):e.push(n))}),e}var jr="RC_FORM_INTERNAL_HOOKS",Xe=function(){Er(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},yn=L.createContext({getFieldValue:Xe,getFieldsValue:Xe,getFieldError:Xe,getFieldWarning:Xe,getFieldsError:Xe,isFieldsTouched:Xe,isFieldTouched:Xe,isFieldValidating:Xe,isFieldsValidating:Xe,resetFields:Xe,setFields:Xe,setFieldValue:Xe,setFieldsValue:Xe,validateFields:Xe,submit:Xe,getInternalHooks:function(){return Xe(),{dispatch:Xe,initEntityValue:Xe,registerField:Xe,useSubscribe:Xe,setInitialValues:Xe,destroyForm:Xe,setCallbacks:Xe,registerWatch:Xe,getFields:Xe,setValidateMessages:Xe,setPreserve:Xe,getInitialValue:Xe}}}),na=L.createContext(null);function Fo(t){return t==null?[]:Array.isArray(t)?t:[t]}function Ex(t){return t&&!!t._init}function Eo(){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 wo=Eo();function wx(t){try{return Function.toString.call(t).indexOf("[native code]")!==-1}catch{return typeof t=="function"}}function Ax(t,r,e){if(lu())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,r);var i=new(t.bind.apply(t,n));return e&&Io(i,e.prototype),i}function Ao(t){var r=typeof Map=="function"?new Map:void 0;return Ao=function(n){if(n===null||!wx(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 Ax(n,arguments,Ua(this).constructor)}return i.prototype=Object.create(n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),Io(i,n)},Ao(t)}var Bx=/%[sdj%]/g,Sx=function(){};function Bo(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 Ut(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(Bx,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 Dx(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||Dx(r)&&typeof t=="string"&&!t)}function _x(t,r,e){var n=[],i=0,a=t.length;function o(s){n.push.apply(n,ge(s||[])),i++,i===a&&e(n)}t.forEach(function(s){r(s,o)})}function i0(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 kx(t){var r=[];return Object.keys(t).forEach(function(e){r.push.apply(r,ge(t[e]||[]))}),r}var a0=(function(t){Cn(e,t);var r=En(e);function e(n,i){var a;return Tt(this,e),a=r.call(this,"Async Validation Error"),H(_e(a),"errors",void 0),H(_e(a),"fields",void 0),a.errors=n,a.fields=i,a}return It(e)})(Ao(Error));function Rx(t,r,e,n,i){if(r.first){var a=new Promise(function(d,m){var v=function(y){return n(y),y.length?m(new a0(y,Bo(y))):d(i)},p=kx(t);i0(p,e,v)});return a.catch(function(d){return d}),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(d,m){var v=function(f){if(l.push.apply(l,f),u++,u===c)return n(l),l.length?m(new a0(l,Bo(l))):d(i)};s.length||(n(l),d(i)),s.forEach(function(p){var f=t[p];o.indexOf(p)!==-1?i0(f,e,v):_x(f,e,v)})});return x.catch(function(d){return d}),x}function Ix(t){return!!(t&&t.message!==void 0)}function Tx(t,r){for(var e=t,n=0;n<r.length;n++){if(e==null)return e;e=e[r[n]]}return e}function o0(t,r){return function(e){var n;return t.fullFields?n=Tx(r,t.fullFields):n=r[e.field||t.fullField],Ix(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 s0(t,r){if(r){for(var e in r)if(r.hasOwnProperty(e)){var n=r[e];Te(n)==="object"&&Te(t[e])==="object"?t[e]=J(J({},t[e]),n):t[e]=n}}return t}var on="enum",Px=function(r,e,n,i,a){r[on]=Array.isArray(r[on])?r[on]:[],r[on].indexOf(e)===-1&&i.push(Ut(a.messages[on],r.fullField,r[on].join(", ")))},Nx=function(r,e,n,i,a){if(r.pattern){if(r.pattern instanceof RegExp)r.pattern.lastIndex=0,r.pattern.test(e)||i.push(Ut(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(Ut(a.messages.pattern.mismatch,r.fullField,e,r.pattern))}}},Ox=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,d=typeof e=="number",m=typeof e=="string",v=Array.isArray(e);if(d?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(Ut(a.messages[x].len,r.fullField,r.len)):s&&!c&&l<r.min?i.push(Ut(a.messages[x].min,r.fullField,r.min)):c&&!s&&l>r.max?i.push(Ut(a.messages[x].max,r.fullField,r.max)):s&&c&&(l<r.min||l>r.max)&&i.push(Ut(a.messages[x].range,r.fullField,r.min,r.max))},Ol=function(r,e,n,i,a,o){r.required&&(!n.hasOwnProperty(r.field)||gt(e,o||r.type))&&i.push(Ut(a.messages.required,r.fullField))},ei;const Mx=(function(){if(ei)return ei;var t="[a-fA-F\\d:]",r=function(E){return E&&E.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(E){return E&&E.exact?s:new RegExp("(?:".concat(r(E)).concat(e).concat(r(E),")|(?:").concat(r(E)).concat(o).concat(r(E),")"),"g")};l.v4=function(F){return F&&F.exact?c:new RegExp("".concat(r(F)).concat(e).concat(r(F)),"g")},l.v6=function(F){return F&&F.exact?u:new RegExp("".concat(r(F)).concat(o).concat(r(F)),"g")};var x="(?:(?:[a-z]+:)?//)",d="(?:\\S+(?::\\S*)?@)?",m=l.v4().source,v=l.v6().source,p="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",f="(?:\\.(?:[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(d,"(?:localhost|").concat(m,"|").concat(v,"|").concat(p).concat(f).concat(y,")").concat(h).concat(C);return ei=new RegExp("(?:^".concat(b,"$)"),"i"),ei});var u0={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},Dn={integer:function(r){return Dn.number(r)&&parseInt(r,10)===r},float:function(r){return Dn.number(r)&&!Dn.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 Te(r)==="object"&&!Dn.array(r)},method:function(r){return typeof r=="function"},email:function(r){return typeof r=="string"&&r.length<=320&&!!r.match(u0.email)},url:function(r){return typeof r=="string"&&r.length<=2048&&!!r.match(Mx())},hex:function(r){return typeof r=="string"&&!!r.match(u0.hex)}},Lx=function(r,e,n,i,a){if(r.required&&e===void 0){Ol(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?Dn[s](e)||i.push(Ut(a.messages.types[s],r.fullField,r.type)):s&&Te(e)!==r.type&&i.push(Ut(a.messages.types[s],r.fullField,r.type))},$x=function(r,e,n,i,a){(/^\s+$/.test(e)||e==="")&&i.push(Ut(a.messages.whitespace,r.fullField))};const Ie={required:Ol,whitespace:$x,type:Lx,range:Ox,enum:Px,pattern:Nx};var zx=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)},qx=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)},Hx=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)},Vx=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)},jx="enum",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),e!==void 0&&Ie[jx](r,e,i,o,a)}n(o)},Wx=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)},Gx=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)},Kx=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)},Xx=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)},Yx=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)},Qx=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)},Zx=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)},Jx=function(r,e,n,i,a){var o=[],s=Array.isArray(e)?"array":Te(e);Ie.required(r,e,i,o,a,s),n(o)},e1=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)},$a=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 kn={string:e1,method:Kx,number:Xx,boolean:Hx,regexp:Zx,integer:Gx,float:Wx,array:qx,object:Yx,enum:Ux,pattern:Qx,date:Vx,url:$a,hex:$a,email:$a,required:Jx,any:zx};var qn=(function(){function t(r){Tt(this,t),H(this,"rules",null),H(this,"_messages",wo),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(Te(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=s0(Eo(),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=[],f={};function y(C){if(Array.isArray(C)){var b;p=(b=p).concat.apply(b,ge(C))}else p.push(C)}for(var h=0;h<v.length;h++)y(v[h]);p.length?(f=Bo(p),c(p,f)):c(null,o)}if(s.messages){var l=this.messages();l===wo&&(l=Eo()),s0(l,s.messages),s.messages=l}else s.messages=this.messages();var x={},d=s.keys||Object.keys(this.rules);d.forEach(function(v){var p=n.rules[v],f=o[v];p.forEach(function(y){var h=y;typeof h.transform=="function"&&(o===e&&(o=J({},o)),f=o[v]=h.transform(f),f!=null&&(h.type=h.type||(Array.isArray(f)?"array":Te(f)))),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:f,source:o,field:v}))})});var m={};return Rx(x,s,function(v,p){var f=v.rule,y=(f.type==="object"||f.type==="array")&&(Te(f.fields)==="object"||Te(f.defaultField)==="object");y=y&&(f.required||!f.required&&v.value),f.field=v.field;function h(B,w){return J(J({},w),{},{fullField:"".concat(f.fullField,".").concat(B),fullFields:f.fullFields?[].concat(ge(f.fullFields),[B]):[B]})}function C(){var B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],w=Array.isArray(B)?B:[B];!s.suppressWarning&&w.length&&t.warning("async-validator:",w),w.length&&f.message!==void 0&&(w=[].concat(f.message));var A=w.map(o0(f,o));if(s.first&&A.length)return m[f.field]=1,p(A);if(!y)p(A);else{if(f.required&&!v.value)return f.message!==void 0?A=[].concat(f.message).map(o0(f,o)):s.error&&(A=[s.error(f,Ut(s.messages.required,f.field))]),p(A);var g={};f.defaultField&&Object.keys(v.value).map(function(R){g[R]=f.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 D=new t(S);D.messages(s.messages),v.rule.options&&(v.rule.options.messages=s.messages,v.rule.options.error=s.error),D.validate(v.value,v.rule.options||s,function(R){var P=[];A&&A.length&&P.push.apply(P,ge(A)),R&&R.length&&P.push.apply(P,ge(R)),p(P.length?P:null)})}}var b;if(f.asyncValidator)b=f.asyncValidator(f,v.value,C,v.source,s);else if(f.validator){try{b=f.validator(f,v.value,C,v.source,s)}catch(B){var F,E;(F=(E=console).error)===null||F===void 0||F.call(E,B),s.suppressValidatorError||setTimeout(function(){throw B},0),C(B.message)}b===!0?C():b===!1?C(typeof f.message=="function"?f.message(f.fullField||f.field):f.message||"".concat(f.fullField||f.field," fails")):b instanceof Array?C(b):b instanceof Error&&C(b.message)}b&&b.then&&b.then(function(){return C()},function(B){return C(B)})},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&&!kn.hasOwnProperty(e.type))throw new Error(Ut("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"?kn.required:kn[this.getType(e)]||void 0}}]),t})();H(qn,"register",function(r,e){if(typeof e!="function")throw new Error("Cannot register a validator by type, validator is not a function");kn[r]=e});H(qn,"warning",Sx);H(qn,"messages",wo);H(qn,"validators",kn);var Vt="'${name}' is not a valid ${type}",Ml={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:Vt,method:Vt,array:Vt,object:Vt,number:Vt,date:Vt,boolean:Vt,integer:Vt,float:Vt,regexp:Vt,email:Vt,url:Vt,hex:Vt},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}"}},l0=qn;function t1(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 c0="CODE_LOGIC_ERROR";function So(t,r,e,n,i){return Do.apply(this,arguments)}function Do(){return Do=Wr(Ot().mark(function t(r,e,n,i,a){var o,s,c,u,l,x,d,m,v;return Ot().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return o=J({},n),delete o.ruleIndex,l0.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(c0)}}),c=null,o&&o.type==="array"&&o.defaultField&&(c=o.defaultField,delete o.defaultField),u=new l0(H({},r,[o])),l=ln(Ml,i.validateMessages),u.messages(l),x=[],f.prev=10,f.next=13,Promise.resolve(u.validate(H({},r,e),J({},i)));case 13:f.next=18;break;case 15:f.prev=15,f.t0=f.catch(10),f.t0.errors&&(x=f.t0.errors.map(function(y,h){var C=y.message,b=C===c0?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)){f.next=23;break}return f.next=21,Promise.all(e.map(function(y,h){return So("".concat(r,".").concat(h),y,c,i,a)}));case 21:return d=f.sent,f.abrupt("return",d.reduce(function(y,h){return[].concat(ge(y),ge(h))},[]));case 23:return m=J(J({},n),{},{name:r,enum:(n.enum||[]).join(", ")},a),v=x.map(function(y){return typeof y=="string"?t1(y,m):y}),f.abrupt("return",v);case 26:case"end":return f.stop()}},t,null,[[10,15]])})),Do.apply(this,arguments)}function r1(t,r,e,n,i,a){var o=t.join("."),s=e.map(function(l,x){var d=l.validator,m=J(J({},l),{},{ruleIndex:x});return d&&(m.validator=function(v,p,f){var y=!1,h=function(){for(var F=arguments.length,E=new Array(F),B=0;B<F;B++)E[B]=arguments[B];Promise.resolve().then(function(){Er(!y,"Your validator function has already return a promise. `callback` will be ignored."),y||f.apply(void 0,E)})},C=d(v,p,h);y=C&&typeof C.then=="function"&&typeof C.catch=="function",Er(y,"`callback` is deprecated. Please return a promise instead."),y&&C.then(function(){f()}).catch(function(b){f(b||" ")})}),m}).sort(function(l,x){var d=l.warningOnly,m=l.ruleIndex,v=x.warningOnly,p=x.ruleIndex;return!!d==!!v?m-p:d?1:-1}),c;if(i===!0)c=new Promise((function(){var l=Wr(Ot().mark(function x(d,m){var v,p,f;return Ot().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,So(o,r,p,n,a);case 5:if(f=h.sent,!f.length){h.next=9;break}return m([{errors:f,rule:p}]),h.abrupt("return");case 9:v+=1,h.next=1;break;case 12:d([]);case 13:case"end":return h.stop()}},x)}));return function(x,d){return l.apply(this,arguments)}})());else{var u=s.map(function(l){return So(o,r,l,n,a).then(function(x){return{errors:x,rule:l}})});c=(i?i1(u):n1(u)).then(function(l){return Promise.reject(l)})}return c.catch(function(l){return l}),c}function n1(t){return _o.apply(this,arguments)}function _o(){return _o=Wr(Ot().mark(function t(r){return Ot().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,ge(i));return o}));case 1:case"end":return n.stop()}},t)})),_o.apply(this,arguments)}function i1(t){return ko.apply(this,arguments)}function ko(){return ko=Wr(Ot().mark(function t(r){var e;return Ot().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)})),ko.apply(this,arguments)}function ct(t){return Fo(t)}function f0(t,r){var e={};return r.forEach(function(n){var i=xr(t,n);e=ir(e,n,i)}),e}function vn(t,r){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return t&&t.some(function(n){return Ll(r,n,e)})}function Ll(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 a1(t,r){if(t===r)return!0;if(!t&&r||t&&!r||!t||!r||Te(t)!=="object"||Te(r)!=="object")return!1;var e=Object.keys(t),n=Object.keys(r),i=new Set([].concat(e,n));return ge(i).every(function(a){var o=t[a],s=r[a];return typeof o=="function"&&typeof s=="function"?!0:o===s})}function o1(t){var r=arguments.length<=1?void 0:arguments[1];return r&&r.target&&Te(r.target)==="object"&&t in r.target?r.target[t]:r}function d0(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(ge(t.slice(0,e)),[i],ge(t.slice(e,r)),ge(t.slice(r+1,n))):a<0?[].concat(ge(t.slice(0,r)),ge(t.slice(r+1,e+1)),[i],ge(t.slice(e+1,n))):t}var s1=["name"],Yt=[];function za(t,r,e,n,i,a){return typeof t=="function"?t(r,e,"source"in a?{source:a.source}:{}):n!==i}var Go=(function(t){Cn(e,t);var r=En(e);function e(n){var i;if(Tt(this,e),i=r.call(this,n),H(_e(i),"state",{resetCount:0}),H(_e(i),"cancelRegisterFunc",null),H(_e(i),"mounted",!1),H(_e(i),"touched",!1),H(_e(i),"dirty",!1),H(_e(i),"validatePromise",void 0),H(_e(i),"prevValidating",void 0),H(_e(i),"errors",Yt),H(_e(i),"warnings",Yt),H(_e(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(_e(i),"getNamePath",function(){var c=i.props,u=c.name,l=c.fieldContext,x=l.prefixName,d=x===void 0?[]:x;return u!==void 0?[].concat(ge(d),ge(u)):[]}),H(_e(i),"getRules",function(){var c=i.props,u=c.rules,l=u===void 0?[]:u,x=c.fieldContext;return l.map(function(d){return typeof d=="function"?d(x):d})}),H(_e(i),"refresh",function(){i.mounted&&i.setState(function(c){var u=c.resetCount;return{resetCount:u+1}})}),H(_e(i),"metaCache",null),H(_e(i),"triggerMetaEvent",function(c){var u=i.props.onMetaChange;if(u){var l=J(J({},i.getMeta()),{},{destroy:c});to(i.metaCache,l)||u(l),i.metaCache=l}else i.metaCache=null}),H(_e(i),"onStoreChange",function(c,u,l){var x=i.props,d=x.shouldUpdate,m=x.dependencies,v=m===void 0?[]:m,p=x.onReset,f=l.store,y=i.getNamePath(),h=i.getValue(c),C=i.getValue(f),b=u&&vn(u,y);switch(l.type==="valueUpdate"&&l.source==="external"&&!to(h,C)&&(i.touched=!0,i.dirty=!0,i.validatePromise=null,i.errors=Yt,i.warnings=Yt,i.triggerMetaEvent()),l.type){case"reset":if(!u||b){i.touched=!1,i.dirty=!1,i.validatePromise=void 0,i.errors=Yt,i.warnings=Yt,i.triggerMetaEvent(),p==null||p(),i.refresh();return}break;case"remove":{if(d&&za(d,c,f,h,C,l)){i.reRender();return}break}case"setField":{var F=l.data;if(b){"touched"in F&&(i.touched=F.touched),"validating"in F&&!("originRCField"in F)&&(i.validatePromise=F.validating?Promise.resolve([]):null),"errors"in F&&(i.errors=F.errors||Yt),"warnings"in F&&(i.warnings=F.warnings||Yt),i.dirty=!0,i.triggerMetaEvent(),i.reRender();return}else if("value"in F&&vn(u,y,!0)){i.reRender();return}if(d&&!y.length&&za(d,c,f,h,C,l)){i.reRender();return}break}case"dependenciesUpdate":{var E=v.map(ct);if(E.some(function(B){return vn(l.relatedFields,B)})){i.reRender();return}break}default:if(b||(!v.length||y.length||d)&&za(d,c,f,h,C,l)){i.reRender();return}break}d===!0&&i.reRender()}),H(_e(i),"validateRules",function(c){var u=i.getNamePath(),l=i.getValue(),x=c||{},d=x.triggerName,m=x.validateOnly,v=m===void 0?!1:m,p=Promise.resolve().then(Wr(Ot().mark(function f(){var y,h,C,b,F,E,B;return Ot().wrap(function(A){for(;;)switch(A.prev=A.next){case 0:if(i.mounted){A.next=2;break}return A.abrupt("return",[]);case 2:if(y=i.props,h=y.validateFirst,C=h===void 0?!1:h,b=y.messageVariables,F=y.validateDebounce,E=i.getRules(),d&&(E=E.filter(function(g){return g}).filter(function(g){var S=g.validateTrigger;if(!S)return!0;var D=Fo(S);return D.includes(d)})),!(F&&d)){A.next=10;break}return A.next=8,new Promise(function(g){setTimeout(g,F)});case 8:if(i.validatePromise===p){A.next=10;break}return A.abrupt("return",[]);case 10:return B=r1(u,l,E,c,C,b),B.catch(function(g){return g}).then(function(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Yt;if(i.validatePromise===p){var S;i.validatePromise=null;var D=[],R=[];(S=g.forEach)===null||S===void 0||S.call(g,function(P){var z=P.rule.warningOnly,$=P.errors,j=$===void 0?Yt:$;z?R.push.apply(R,ge(j)):D.push.apply(D,ge(j))}),i.errors=D,i.warnings=R,i.triggerMetaEvent(),i.reRender()}}),A.abrupt("return",B);case 13:case"end":return A.stop()}},f)})));return v||(i.validatePromise=p,i.dirty=!0,i.errors=Yt,i.warnings=Yt,i.triggerMetaEvent(),i.reRender()),p}),H(_e(i),"isFieldValidating",function(){return!!i.validatePromise}),H(_e(i),"isFieldTouched",function(){return i.touched}),H(_e(i),"isFieldDirty",function(){if(i.dirty||i.props.initialValue!==void 0)return!0;var c=i.props.fieldContext,u=c.getInternalHooks(jr),l=u.getInitialValue;return l(i.getNamePath())!==void 0}),H(_e(i),"getErrors",function(){return i.errors}),H(_e(i),"getWarnings",function(){return i.warnings}),H(_e(i),"isListField",function(){return i.props.isListField}),H(_e(i),"isList",function(){return i.props.isList}),H(_e(i),"isPreserve",function(){return i.props.preserve}),H(_e(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(_e(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=bo(c);return l.length!==1||!L.isValidElement(l[0])?{child:l,isFunction:!1}:{child:l[0],isFunction:!1}}),H(_e(i),"getValue",function(c){var u=i.props.fieldContext.getFieldsValue,l=i.getNamePath();return xr(c||u(!0),l)}),H(_e(i),"getControlled",function(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},u=i.props,l=u.name,x=u.trigger,d=u.validateTrigger,m=u.getValueFromEvent,v=u.normalize,p=u.valuePropName,f=u.getValueProps,y=u.fieldContext,h=d!==void 0?d:y.validateTrigger,C=i.getNamePath(),b=y.getInternalHooks,F=y.getFieldsValue,E=b(jr),B=E.dispatch,w=i.getValue(),A=f||function(P){return H({},p,P)},g=c[x],S=l!==void 0?A(w):{},D=J(J({},c),S);D[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=o1.apply(void 0,[p].concat($)),v&&(P=v(P,w,F(!0))),P!==w&&B({type:"updateValue",namePath:C,value:P}),g&&g.apply(void 0,$)};var R=Fo(h||[]);return R.forEach(function(P){var z=D[P];D[P]=function(){z&&z.apply(void 0,arguments);var $=i.props.rules;$&&$.length&&B({type:"validateField",namePath:C,triggerName:P})}}),D}),n.fieldContext){var a=n.fieldContext.getInternalHooks,o=a(jr),s=o.initEntityValue;s(_e(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(jr),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)):(Er(!s,"`children` of Field is not validate ReactElement."),u=s),L.createElement(L.Fragment,{key:i},u)}}]),e})(L.Component);H(Go,"contextType",yn);H(Go,"defaultProps",{trigger:"onChange",valuePropName:"value"});function $l(t){var r,e=t.name,n=Or(t,s1),i=L.useContext(yn),a=L.useContext(na),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(Go,Rt({key:c,name:o,isListField:s},n,{fieldContext:i}))}function u1(t){var r=t.name,e=t.initialValue,n=t.children,i=t.rules,a=t.validateTrigger,o=t.isListField,s=L.useContext(yn),c=L.useContext(na),u=L.useRef({keys:[],id:0}),l=u.current,x=L.useMemo(function(){var p=ct(s.prefixName)||[];return[].concat(ge(p),ge(ct(r)))},[s.prefixName,r]),d=L.useMemo(function(){return J(J({},s),{},{prefixName:x})},[s,x]),m=L.useMemo(function(){return{getKey:function(f){var y=x.length,h=f[y];return[l.keys[h],f.slice(y+1)]}}},[x]);if(typeof n!="function")return Er(!1,"Form.List only accepts function as children."),null;var v=function(f,y,h){var C=h.source;return C==="internal"?!1:f!==y};return L.createElement(na.Provider,{value:m},L.createElement(yn.Provider,{value:d},L.createElement($l,{name:[],shouldUpdate:v,rules:i,validateTrigger:a,initialValue:e,isList:!0,isListField:o??!!c},function(p,f){var y=p.value,h=y===void 0?[]:y,C=p.onChange,b=s.getFieldValue,F=function(){var A=b(x||[]);return A||[]},E={add:function(A,g){var S=F();g>=0&&g<=S.length?(l.keys=[].concat(ge(l.keys.slice(0,g)),[l.id],ge(l.keys.slice(g))),C([].concat(ge(S.slice(0,g)),[A],ge(S.slice(g))))):(l.keys=[].concat(ge(l.keys),[l.id]),C([].concat(ge(S),[A]))),l.id+=1},remove:function(A){var g=F(),S=new Set(Array.isArray(A)?A:[A]);S.size<=0||(l.keys=l.keys.filter(function(D,R){return!S.has(R)}),C(g.filter(function(D,R){return!S.has(R)})))},move:function(A,g){if(A!==g){var S=F();A<0||A>=S.length||g<0||g>=S.length||(l.keys=d0(l.keys,A,g),C(d0(S,A,g)))}}},B=h||[];return Array.isArray(B)||(B=[]),n(B.map(function(w,A){var g=l.keys[A];return g===void 0&&(l.keys[A]=l.id,g=l.keys[A],l.id+=1),{name:A,key:g,isListField:!0}}),E,f)})))}function l1(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 zl="__@field_split__";function qa(t){return t.map(function(r){return"".concat(Te(r),":").concat(r)}).join(zl)}var sn=(function(){function t(){Tt(this,t),H(this,"kvs",new Map)}return It(t,[{key:"set",value:function(e,n){this.kvs.set(qa(e),n)}},{key:"get",value:function(e){return this.kvs.get(qa(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(qa(e))}},{key:"map",value:function(e){return ge(this.kvs.entries()).map(function(n){var i=xe(n,2),a=i[0],o=i[1],s=a.split(zl);return e({key:s.map(function(c){var u=c.match(/^([^:]*):(.*)$/),l=xe(u,3),x=l[1],d=l[2];return x==="number"?Number(d):d}),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})(),c1=["name"],f1=It(function t(r){var e=this;Tt(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===jr?(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}):(Er(!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=ln(n,e.store);(a=e.prevWithoutPreserves)===null||a===void 0||a.map(function(s){var c=s.key;o=ir(o,c,xr(n,c))}),e.prevWithoutPreserves=null,e.updateStore(o)}}),H(this,"destroyForm",function(n){if(n)e.updateStore({});else{var i=new sn;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=xr(e.initialValues,n);return n.length?ln(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 sn;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&&Te(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,d,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=(d=l).isListField)!==null&&x!==void 0&&x.call(d))return;if(!o)u.push(m);else{var f="getMeta"in l?l.getMeta():null;o(f)&&u.push(m)}}),f0(e.store,u.map(ct))}),H(this,"getFieldValue",function(n){e.warningUnhooked();var i=ct(n);return xr(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(f){return f.isFieldTouched()};if(!c)return u?l.every(function(p){return x(p)||p.isList()}):l.some(x);var d=new sn;c.forEach(function(p){d.set(p,[])}),l.forEach(function(p){var f=p.getNamePath();c.forEach(function(y){y.every(function(h,C){return f[C]===h})&&d.update(y,function(h){return[].concat(ge(h),[p])})})});var m=function(f){return f.some(x)},v=d.map(function(p){var f=p.value;return f});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 vn(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 sn,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 d=l.getNamePath(),m=e.getInitialValue(d);if(m!==void 0)Er(!1,"Form already set 'initialValues' with path '".concat(d.join("."),"'. Field can not overwrite it."));else{var v=i.get(d);if(v&&v.size>1)Er(!1,"Multiple Field with path '".concat(d.join("."),"' set 'initialValue'. Can not decide which one to pick."));else if(v){var p=e.getFieldValue(d),f=l.isListField();!f&&(!n.skipExist||p===void 0)&&e.updateStore(ir(e.store,d,ge(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,ge(ge(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(ln(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(ir(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=Or(o,c1),u=ct(s);a.push(u),"value"in c&&e.updateStore(ir(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=xr(e.store,a);o===void 0&&e.updateStore(ir(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!Ll(x.getNamePath(),i)})){var l=e.store;e.updateStore(ir(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(ge(a))}),a}),H(this,"updateValue",function(n,i){var a=ct(n),o=e.store;e.updateStore(ir(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=f0(e.store,[a]);c(u,e.getFieldsValue())}e.triggerOnFieldsChange([a].concat(ge(s)))}),H(this,"setFieldsValue",function(n){e.warningUnhooked();var i=e.store;if(n){var a=ln(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 sn;e.getFieldEntities().forEach(function(c){var u=c.props.dependencies;(u||[]).forEach(function(l){var x=ct(l);o.update(x,function(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:new Set;return d.add(c),d})})});var s=function c(u){var l=o.get(u)||new Set;l.forEach(function(x){if(!i.has(x)){i.add(x);var d=x.getNamePath();x.isFieldDirty()&&d.length&&(a.push(d),c(d))}})};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 sn;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 vn(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,d=o||{},m=d.recursive,v=d.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||vn(c,C,m)){var b=h.validateRules(J({validateMessages:J(J({},Ml),e.validateMessages)},o));u.push(b.then(function(){return{name:C,errors:[],warnings:[]}}).catch(function(F){var E,B=[],w=[];return(E=F.forEach)===null||E===void 0||E.call(F,function(A){var g=A.rule.warningOnly,S=A.errors;g?w.push.apply(w,ge(S)):B.push.apply(B,ge(S))}),B.length?Promise.reject({name:C,errors:B,warnings:w}):{name:C,errors:B,warnings:w}}))}}});var p=l1(u);e.lastValidatePromise=p,p.catch(function(h){return h}).then(function(h){var C=h.map(function(b){var F=b.name;return F});e.notifyObservers(e.store,C,{type:"validateFinish"}),e.triggerOnFieldsChange(C,h)});var f=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})});f.catch(function(h){return h});var y=c.filter(function(h){return x.has(h.join(l))});return e.triggerOnFieldsChange(y),f}),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 Ko(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 f1(a);r.current=o.getForm()}return[r.current]}var Ro=L.createContext({triggerFormChange:function(){},triggerFormFinish:function(){},registerForm:function(){},unregisterForm:function(){}}),d1=function(r){var e=r.validateMessages,n=r.onFormChange,i=r.onFormFinish,a=r.children,o=L.useContext(Ro),s=L.useRef({});return L.createElement(Ro.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)},p1=["name","initialValues","fields","form","preserve","children","component","validateMessages","validateTrigger","onValuesChange","onFieldsChange","onFinish","onFinishFailed","clearOnDestroy"],h1=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,d=r.validateTrigger,m=d===void 0?"onChange":d,v=r.onValuesChange,p=r.onFieldsChange,f=r.onFinish,y=r.onFinishFailed,h=r.clearOnDestroy,C=Or(r,p1),b=L.useRef(null),F=L.useContext(Ro),E=Ko(o),B=xe(E,1),w=B[0],A=w.getInternalHooks(jr),g=A.useSubscribe,S=A.setInitialValues,D=A.setCallbacks,R=A.setValidateMessages,P=A.setPreserve,z=A.destroyForm;L.useImperativeHandle(e,function(){return J(J({},w),{},{nativeElement:b.current})}),L.useEffect(function(){return F.registerForm(n,w),function(){F.unregisterForm(n)}},[F,w,n]),R(J(J({},F.validateMessages),x)),D({onValuesChange:v,onFieldsChange:function(I){if(F.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){F.triggerFormFinish(n,I),f&&f(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(){a1(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(na.Provider,{value:null},L.createElement(yn.Provider,{value:M},j));return l===!1?N:L.createElement(l,Rt({},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 p0(t){try{return JSON.stringify(t)}catch{return Math.random()}}function v1(){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=Ex(a)?{form:a}:a,s=o.form,c=le(),u=xe(c,2),l=u[0],x=u[1],d=Me(function(){return p0(l)},[l]),m=Ue(d);m.current=d;var v=yr(yn),p=s||v,f=p&&p._init,y=ct(n),h=Ue(y);return h.current=y,Le(function(){if(f){var C=p.getFieldsValue,b=p.getInternalHooks,F=b(jr),E=F.registerWatch,B=function(S,D){var R=o.preserve?D:S;return typeof n=="function"?n(R):xr(R,h.current)},w=E(function(g,S){var D=B(g,S),R=p0(D);m.current!==R&&(m.current=R,x(D))}),A=B(C(),C(!0));return l!==A&&x(A),w}},[f]),l}var x1=L.forwardRef(h1),Hn=x1;Hn.FormProvider=d1;Hn.Field=$l;Hn.List=u1;Hn.useForm=Ko;Hn.useWatch=v1;const h0=t=>typeof t=="object"&&t!=null&&t.nodeType===1,v0=(t,r)=>(!r||t!=="hidden")&&t!=="visible"&&t!=="clip",ti=(t,r)=>{if(t.clientHeight<t.scrollHeight||t.clientWidth<t.scrollWidth){const e=getComputedStyle(t,null);return v0(e.overflowY,r)||v0(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},ri=(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,g1=t=>{const r=t.parentElement;return r??(t.getRootNode().host||null)},x0=(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(!h0(t))throw new TypeError("Invalid target");const d=document.scrollingElement||document.documentElement,m=[];let v=t;for(;h0(v)&&x(v);){if(v=g1(v),v===d){m.push(v);break}v!=null&&v===document.body&&ti(v)&&!ti(document.documentElement)||v!=null&&ti(v,l)&&m.push(v)}const p=(n=(e=window.visualViewport)==null?void 0:e.width)!=null?n:innerWidth,f=(a=(i=window.visualViewport)==null?void 0:i.height)!=null?a:innerHeight,{scrollX:y,scrollY:h}=window,{height:C,width:b,top:F,right:E,bottom:B,left:w}=t.getBoundingClientRect(),{top:A,right:g,bottom:S,left:D}=($=>{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"?F-A:s==="end"?B+S:F+C/2-A+S,P=c==="center"?w+b/2-D+g:c==="end"?E+g:w-D;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"&&F>=0&&w>=0&&B<=f&&E<=p&&(j===d&&!ti(j)||F>=U&&B<=N&&w>=O&&E<=M))return z;const I=getComputedStyle(j),V=parseInt(I.borderLeftWidth,10),X=parseInt(I.borderTopWidth,10),ee=parseInt(I.borderRightWidth,10),te=parseInt(I.borderBottomWidth,10);let ie=0,se=0;const ke="offsetWidth"in j?j.offsetWidth-j.clientWidth-V-ee:0,Q="offsetHeight"in j?j.offsetHeight-j.clientHeight-X-te:0,K="offsetWidth"in j?j.offsetWidth===0?0:Y/j.offsetWidth:0,ae="offsetHeight"in j?j.offsetHeight===0?0:q/j.offsetHeight:0;if(d===j)ie=s==="start"?R:s==="end"?R-f:s==="nearest"?ri(h,h+f,f,X,te,h+R,h+R+C,C):R-f/2,se=c==="start"?P:c==="center"?P-p/2:c==="end"?P-p:ri(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+te+Q:s==="nearest"?ri(U,N,q,X,te+Q,R,R+C,C):R-(U+q/2)+Q/2,se=c==="start"?P-O-V:c==="center"?P-(O+Y/2)+ke/2:c==="end"?P-M+ee+ke:ri(O,M,Y,V,ee+ke,P,P+b,b);const{scrollLeft:ue,scrollTop:Z}=j;ie=ae===0?0:Math.max(0,Math.min(Z+ie/ae,j.scrollHeight-q/ae+Q)),se=K===0?0:Math.max(0,Math.min(ue+se/K,j.scrollWidth-Y/K+ke)),R+=Z-ie,P+=ue-se}z.push({el:j,top:ie,left:se})}return z},m1=t=>t===!1?{block:"end",inline:"nearest"}:(r=>r===Object(r)&&Object.keys(r).length!==0)(t)?t:{block:"start",inline:"nearest"};function y1(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(x0(t,r));const n=typeof r=="boolean"||r==null?void 0:r.behavior;for(const{el:i,top:a,left:o}of x0(t,m1(r))){const s=a-e.top+e.bottom,c=o-e.left+e.right;i.scroll({top:s,left:c,behavior:n})}}const C1=["parentNode"],b1="form_item";function ql(t){return t===void 0||t===!1?[]:Array.isArray(t)?t:[t]}function F1(t,r){if(!t.length)return;const e=t.join("_");return r?`${r}_${e}`:C1.includes(e)?`${b1}_${e}`:e}var E1=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 g0(t){return ql(t).join("_")}function m0(t,r){const e=r.getFieldInstance(t),n=dl(e);if(n)return n;const i=F1(ql(t),r.__INTERNAL__.name);if(i)return document.getElementById(i)}function Hl(t){const[r]=Ko(),e=L.useRef({}),n=L.useMemo(()=>Object.assign(Object.assign({},r),{__INTERNAL__:{itemRef:i=>a=>{const o=g0(i);a?e.current[o]=a:delete e.current[o]}},scrollToField:(i,a={})=>{const{focus:o}=a,s=E1(a,["focus"]),c=m0(i,n);c&&(y1(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=m0(i,n))===null||a===void 0?void 0:a.focus)===null||o===void 0||o.call(a)},getFieldInstance:i=>{const a=g0(i);return e.current[a]}}),[t,r]);return[n]}const w1=({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]=Hl();return Le(()=>{if(!t){a.resetFields();return}a.setFieldValue("new_name",n==null?void 0:n.label)},[n,t]),T(oa,{modal:{styles:i},children:T(Xi,{title:T("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:ne("div",{className:"mt-[16px] flex justify-end",children:[T(vr,{children:"\u53D6\u6D88",onClick:e,className:"mr-[8px]"}),T(vr,{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:T(ts,{form:a,children:T(ts.Item,{name:"new_name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165"},{max:100,message:"\u6700\u5927\u5B57\u6570\u9650\u5236100"}],children:T(ou,{})})})})})},A1=({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]=Hl();return Le(()=>{if(!t){a.resetFields();return}a.setFieldValue("new_name",n==null?void 0:n.label)},[n,t]),T(oa,{modal:{styles:i},children:T(Xi,{title:T("div",{className:"text-[16px]",children:"\u5220\u9664\u4F1A\u8BDD"}),closeIcon:null,open:t,width:520,centered:!0,className:"[&:[.ant-modal-content]]:bg-red",footer:ne("div",{className:"mt-[16px] flex justify-end",children:[T(vr,{children:"\u53D6\u6D88",onClick:e,className:"mr-[8px]"}),T(vr,{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:T("div",{children:`\u786E\u5B9A\u8981\u5220\u9664\u4F1A\u8BDD\u300C${n.label}\u300D\u5417\uFF1F\u5220\u9664\u540E\u65E0\u6CD5\u6062\u590D\u3002`})})})},B1="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAFQSURBVHgBpVMxTsNQDLWTiIYBFG7Q3iCcgLIxQJWxZSpbOxFO0HICOhE2shGxEFCGbvQGcAPCCahgIJHoN/5RaEOUBAJPsmTZ3/aT/T4Co23ZxoYeWVACEjj/UOhx6l2E+RzudQfNNcR79ptQjfD1vbE98yfzbFDTEE1ZrBC1/IIJEhYPEYhPKUs3m1OQyJBOWfFPOQX+CQ1qQu6sATBaCLwNrh2/NgOdjQC2FBVu5PW+MTjoDvrccSdfJNILqQCzdB9WpzckudQlg87hYISIl7I7G2YNAZ75SrtFy1wxIBwLwtPAc8ZQA5qq676II5MAw8A7n+z3hpLW2d2V0/pVA99NlGV/BRJdIDbltqcV91++zwesvm2IOH6AEmkTkfsW6Seb6/EL+0dY9EhKl1mYi1Slq3HCQFCP2WHWZJY2qEL6L5LPJ/gy8BfIJmxt6X8C+32HILvaN+0AAAAASUVORK5CYII=",xa=({title:t,setOpen:r})=>ne("div",{style:{width:"100%",height:"60px",borderBottom:"1px solid #EBEBEB",padding:"20px",display:"flex",justifyContent:"space-between",alignItems:"center",fontSize:"16px",fontWeight:600},children:[T("div",{children:t}),T("img",{src:Mc,style:{width:"16px",height:"16px",cursor:"pointer"},onClick:()=>r(!1)})]});Lc();const S1=({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]=le({nodeList:[],edgeList:[]});Le(()=>{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 d=await Nt.post(l,{cyphers:u,ontologyId:x},{headers:{Authorization:e}});console.log("getGraphData res",d),a((d==null?void 0:d.data)||{})}catch(u){console.log("error",u)}};return Le(()=>{o(t)},[t]),ne("div",{children:[T(xa,{title:t==null?void 0:t.graphName,setOpen:r}),T("div",{style:{width:"100%",height:"calc(100vh - 60px)"},children:T($c,{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)}})})]})},D1=({content:t,onClose:r,token:e})=>{const n=o=>{if(!(o!=null&&o.metadata))return;const s=Ga(o,""),{page_number:c,page_size:u,position:l,offset:x,chunk_type:d}=o.metadata;if(s==="markdown_table")return x!=null&&x.length?{annotations:[{id:gr(),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((f,y)=>({id:gr(),pageNumber:c[y],x:+(f[0][0]/m[0][0]).toFixed(4),y:+(f[0][1]/m[0][1]).toFixed(4),width:+((f[1][0]-f[0][0])/m[0][0]).toFixed(4),height:+((f[2][1]-f[0][1])/m[0][1]).toFixed(4),content:"",color:d==="image"?"#60f74f":"#4FC3F7"})),initialPage:c[0]}}},i=Me(()=>{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=du(pu(l));return{filePath:x,fileName:Po(l),fileType:Ga(l,x),totalPages:l.pdfPages||0,token:e,annotations:c,initialPage:u,initialZoom:hu(598,l)}}else return{}},[t]),a=Me(()=>i.filePath?(console.log("curData",i),T(xu,{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}})):T(Ln,{}),[i]);return T("div",{style:{fontFamily:"Source Han Sans CN",fontSize:"12px"},className:"h-full w-full",children:a})},Vl=({curFileInfo:t,onClose:r,token:e})=>{const n=Me(()=>{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=du(pu(c));return{filePath:u,fileName:Po(c),fileType:Ga(c,u),totalPages:c.pdfPages||0,token:e,initialZoom:hu(((s=document.getElementById("pdfBox"))==null?void 0:s.clientWidth)||0,c)}}else return{}},[t]),i=Me(()=>(console.log("curData",n),n.filePath?T(xu,{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}}):T(Ln,{})),[n]);return T("div",{id:"pdfBox",className:"h-full overflow-y-auto",children:i})},_1=({curFileInfo:t,token:r,onClose:e})=>{const[n,i]=le(1),[a,o]=le(10),[s,c]=le([]),[u,l]=le([]),[x,d]=le(0);Le(()=>{var y;const f=((y=t==null?void 0:t.metadata)==null?void 0:y.fetchUrl)||(t==null?void 0:t.fetchUrl);f&&v(f)},[t,n,a]);const m=async({url:f,params:y})=>{var h;try{const C=await Nt.get(`${Ka()}${f}?${new URLSearchParams(y).toString()}`,{headers:{Authorization:r}}),b=(h=C==null?void 0:C.data)==null?void 0:h.data;if(b){const{columns:F,dataList:E,totalData:B}=b;c(((F==null?void 0:F.slice(1))||[]).map(w=>({title:w.businessName,dataIndex:w.physicalName,key:w.physicalName}))),l(E||[]),d(B||[])}}catch(C){console.log("error",C)}},v=async f=>{m({url:`${f}`,params:{pageNo:n,pageSize:a}})},p=Me(()=>{const{databaseName:f,businessTableName:y,tableName:h}=t;return`${f} - ${h||y}`},[t]);return ne("div",{children:[T(xa,{title:p,setOpen:e}),(s==null?void 0:s.length)>0?ne("div",{children:[T("div",{className:"p-4 overflow-auto h-[calc(100vh-120px)]",children:T(gc,{columns:s,dataSource:u,pagination:!1,scroll:{x:"max-content"},rowKey:"id"})}),T("div",{className:"flex justify-end px-[18px]",children:T(mc,{current:n,pageSize:a,responsive:!0,simple:!0,total:x,showSizeChanger:!0,showQuickJumper:!0,onChange:(f,y)=>{i(f),o(y||10)},onShowSizeChange:(f,y)=>{i(1),o(y)}})})]}):T(yc,{})]})},Ha=({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 T("div",{style:{minWidth:"16px",maxWidth:"80px",height:"16px",padding:"0 4px",backgroundColor:R1[r.key],margin:"0 4px",color:I1[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 k1(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 R1={knowledgeList:"#EAF4FD",searchList:"#E8F7F0",databaseList:"#FFF4E5",graphList:"#E7F8FB"},I1={knowledgeList:"#2072F0",searchList:"#39B83F",databaseList:"#F48C14",graphList:"#10BBD9"},y0=[{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}],C0=({type:t,data:r,token:e,eventsEmit:n,is_download:i})=>{const[a,o]=le(y0),[s,c]=le("mark"),[u,l]=le(!1),[x,d]=le({}),[m,v]=le("knowledgeList"),[p,f]=le({knowledgeList:[],searchList:[],databaseList:[],graphList:[]}),y=Me(()=>{const w=4-a.length,A=Array(w).fill(null).map((S,D)=>({name:"",key:100+D})),g=[...a,...A];return console.log("rrrrrr",g),g},[a]),h=w=>isNaN(w)?"":(+w).toFixed(2),C=w=>{switch(w){case"searchList":return Kc;case"databaseList":return Gc;case"graphList":return Wc;default:return""}},b=w=>{const A=(w||"").toLowerCase();return["pdf"].includes(A)?"rag/pdf":["doc","docx"].includes(A)?"rag/word":["csv"].includes(A)?"rag/csv":["xls","xlsx"].includes(A)?"rag/excel":["ppt","pptx","pub"].includes(A)?"rag/ppt":["png","jpg","jpeg","jpge"].includes(A)?"rag/pic":["txt"].includes(A)?"rag/txt":["ofd"].includes(A)?"rag/ofd":"rag/txt"},F=(w,A)=>{if(w==="knowledgeList"){let S=((A==null?void 0:A.file_type)||"").toLowerCase();if(!S||S==="faq"){const D=(A==null?void 0:A.metadata)||{},R=D.folder_path||(A==null?void 0:A.folder_path)||D.file_path||D.source||(A==null?void 0:A.source)||(A==null?void 0:A.file_name)||"",P=String(R).match(/\.([a-z0-9]+)$/i);P&&(S=P[1].toLowerCase())}return T(jc,{type:b(S),size:22,style:{flexShrink:0}})}const g=C(w);return g?T("img",{src:g,style:{width:"22px",height:"22px",flexShrink:0}}):null},E=(w,A)=>w==="graphList"?A.map(g=>({...g,name:g.graphName})).sort((g,S)=>(S.score||0)-(g.score||0)):w==="knowledgeList"?A.map(g=>{const S=g.metadata||{},D=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:D}}const R=g.sourceFileName||Hc(g.source)||g.file_name;return{...g,file_type:Vc(g.source)||g.file_type,name:R,score:D}}).sort((g,S)=>(S.score||0)-(g.score||0)):w==="searchList"?A.map(g=>({...g,name:g.sourceFileName||g.file_name})).sort((g,S)=>(S.score||0)-(g.score||0)):w==="databaseList"?A.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)):A,B=(w,A,g)=>{var S;switch(g.key){case"knowledgeList":const{pdfPages:D,parsedFilePath:R,order_num:P,tags:z}=w||{},$=A.id||P||"Unknown ID",j=(z||[]).find(I=>I.id===$);if(w.type==="faq"){d(w),c("faq"),l(!0),n==null||n("retrive_tag:click",{tagInfo:{id:A.id,index:A.index,image_urls:A.image_urls||[]},fromtype:"10",leaf:{id:A.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,A),!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";d({id:$,title:N,file_name:U,file_type:O,file_source:Uc(O)?`${Xa}${q.source}`:R,metadata:q,pdfPages:D}),c("mark"),l(!0);break;case"searchList":console.log("click search tag",w,A);break;case"databaseList":console.log("click database tag",w,A),c("database"),d({...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,A),c("graphPreview"),d({...w,traceNode:((r==null?void 0:r.traceNode)||[]).find(I=>I.id===A.id)}),l(!0);break}};return Le(()=>{if(t!==jl.REFERENCELIST||(console.log("data in reference drawer",r),!r))return;const{graphRefs:w,knowledgeRefs:A,webRefs:g,databaseRefs:S}=r;w!=null&&w.length&&(p.graphList=E("graphList",w)),A!=null&&A.length&&(p.knowledgeList=E("knowledgeList",A)),g!=null&&g.length&&(p.searchList=E("searchList",g)),S!=null&&S.length&&(p.databaseList=E("databaseList",S));const D=y0.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(D),D!=null&&D.length&&v(D[0].key),f({...p})},[r]),ne(Ln,{children:[ne("div",{className:"listWrap w-full h-full",children:[T(xa,{title:"\u77E5\u8BC6\u6EAF\u6E90",setOpen:()=>{const w=new CustomEvent("aichat:right_set",{detail:{collapsed:!0}});window.dispatchEvent(w)}}),ne("div",{style:{height:"calc(100% - 60px)"},children:[T("div",{className:"tabs",style:{display:"flex",justifyContent:"space-between",padding:"12px 20px"},children:y.map(w=>T("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))}),T("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 A=p[w.key]||[];return m!==w.key?null:T("div",{children:A.map(g=>{var S,D,R,P,z,$,j,q,Y;return ne("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:[ne("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:"8px"},children:[ne("div",{style:{flex:1,minWidth:0,fontSize:"14px",color:"#1D2129",fontWeight:"700",display:"flex",alignItems:"center"},children:[T("div",{style:{width:22,height:22,marginRight:2,flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center"},children:F(w.key,g)}),T(Rn,{placement:"topLeft",title:((S=g==null?void 0:g.name)==null?void 0:S.length)>17?g.name:"",children:T("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"),d({...g,metadata:g.metadata||{},fetchUrl:g.fetchUrl||((U=g.metadata)==null?void 0:U.fetchUrl)||""}),l(!0)))},children:g.name})})]}),((D=g==null?void 0:g.tags)==null?void 0:D.length)&&g.tags.length>0&&g.tags.length<=10&&g.type!=="faq"&&T("div",{style:{display:"flex",alignItems:"center",flexShrink:0,gap:"2px"},children:(g.tags||[]).map(U=>T(Ha,{i:g,item:w,j:U,clickTag:B},U.id))}),ne("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:[T("img",{src:B1,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}})}}),T("div",{style:{borderRight:"1px solid #E5E6EB",height:"14px"}}),T("img",{src:zc,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:`${Xa}${U.source}`,fileName:Po({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)&&ne("div",{style:{marginTop:"4px",display:"flex",alignItems:"center",justifyContent:"space-between",gap:"8px",fontSize:"12px",color:"#4E5969"},children:[ne("span",{style:{flexShrink:0,display:"flex",alignItems:"center",gap:8},children:[(typeof g.score=="string"||typeof g.score=="number")&&ne("span",{children:["\u5206\u6570: ",h(g.score)]}),((z=g.metadata)==null?void 0:z.update_time)&&T("span",{children:k1(g.metadata.update_time)})]}),(($=g==null?void 0:g.tags)==null?void 0:$.length)&&g.tags.length>0&&g.tags.length<=10&&T("span",{style:{display:"flex",alignItems:"center",flexShrink:0,gap:"2px"},children:(g.tags||[]).map(U=>T(Ha,{i:g,item:w,j:U,clickTag:g.type==="faq"?void 0:B},U.id))})]}),(typeof g.score=="string"||typeof g.score=="number")&&!(g.type==="faq"||g.faq_question||g.faq_answer)&&T("div",{style:{display:"flex",alignItems:"center",height:"18px",marginTop:"4px"},children:ne("div",{style:{backgroundColor:"#F2F2FB",borderRadius:"4px",padding:"2px 3px",display:"flex",justifyContent:"center",alignItems:"center",fontSize:"12px"},children:[T("span",{style:{color:"#4E5969",marginRight:"6px"},children:"\u5206\u6570:"}),T("span",{style:{color:"#1D2129"},children:h(g.score)})]})}),T("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=>T(Ha,{i:g,item:w,j:U,clickTag:g.type==="faq"?void 0:B},U.id))}),g.type==="faq"&&(g.faq_question||g.faq_answer)&&ne("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()!==""&&ne("div",{style:{marginBottom:"4px",display:"flex"},children:[T("span",{style:{color:"#4E5969",flexShrink:0},children:"Q: "}),T("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()!==""&&ne("div",{style:{display:"flex"},children:[T("span",{style:{color:"#4E5969",flexShrink:0},children:"A: "}),T("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)&&ne("div",{style:{flex:1,display:"flex",alignItems:"flex-start",marginTop:"4px"},children:[T("div",{style:{fontSize:"12px",color:"#4E5969",width:"60px"},children:"\u5173\u8054\u6587\u6863:"}),T(Rn,{placement:"topLeft",title:((Y=Ea(g.main_source[0]))==null?void 0:Y.length)>22?Ea(g.main_source[0]):"",children:T("div",{style:{fontSize:"12px",color:"#4E5969",width:"289px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:Ea(g.main_source[0])})})]})]},g.id)})},w.key)})})]})]}),T(oa,{drawer:{styles:{body:{padding:0},header:{display:"none"}}},children:ne(su,{autoFocus:!1,onClose:()=>l(!1),open:u,width:m==="graphList"?"100%":720,className:"overflow-x-hidden",destroyOnClose:!0,afterOpenChange:w=>{w||d(null)},children:[s==="graphPreview"&&T(S1,{curFileInfo:x,onClose:l,token:e}),s==="mark"&&T(D1,{content:x,onClose:l,token:e}),s==="preview"&&T(Vl,{curFileInfo:x,onClose:l,token:e}),s==="database"&&T(_1,{curFileInfo:x,onClose:l,token:e}),s==="faq"&&x&&ne("div",{className:"p-4",style:{fontSize:"14px",color:"#1D2129",lineHeight:1.6},children:[x.faq_question!=null&&String(x.faq_question).trim()!==""&&ne("div",{style:{marginBottom:"12px"},children:[T("span",{style:{color:"#4E5969",marginRight:"4px"},children:"Q:"}),T("span",{children:String(x.faq_question).trim()})]}),x.faq_answer!=null&&String(x.faq_answer).trim()!==""&&ne("div",{children:[T("span",{style:{color:"#4E5969",marginRight:"4px"},children:"A:"}),T("span",{children:String(x.faq_answer).replace(/\s*--+[A-Za-z0-9]*\s*$/,"").trim()||String(x.faq_answer).trim()})]})]})]})})]})},T1=({fileData:t,token:r})=>{const[e,n]=le([]);Le(()=>{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=Ue(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 d=await Nt.get(`${Xc()}/${o.fetchUrl}`,{headers:{Authorization:r}}),m=(u=(c=d==null?void 0:d.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 d=[...e];n(d)}};return ne(Ln,{children:[T(xa,{title:"\u77E5\u8BC6\u5E93\u6587\u6863\u76EE\u5F55",setOpen:()=>{const o=new CustomEvent("aichat:right_set",{detail:{collapsed:!0}});window.dispatchEvent(o)}}),T("div",{style:{height:"calc(100% - 60px)",overflowY:"auto",padding:"16px"},children:e.map((o,s)=>{var c;return o.type==="file"?ne("div",{className:"flex",style:{marginTop:"8px"},children:[vu(o),T(Rn,{placement:"top",title:((c=o.name)==null?void 0:c.length)>23?o.name:"",children:T("div",{style:{paddingLeft:"6px",width:"346px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",cursor:"default",fontSize:"14px"},children:o.name})})]}):T(P1,{item:o,index:s,clickFileItem:a},s)})})]})},P1=({item:t,index:r,clickFileItem:e})=>{var a;const[n,i]=le(!1);return ne("div",{style:{marginTop:"8px"},children:[ne("div",{className:"flex cursor-pointer",onClick:()=>{i(!n),!n&&e(t,r)},children:[vu(t),T(Rn,{placement:"top",title:((a=t.name)==null?void 0:a.length)>23?t.name:"",children:ne("div",{style:{paddingLeft:"6px",width:"346px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:"14px"},children:[t.name," (",t.fileCount||0,")"]})})]},r),T("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 ne("div",{className:"flex items-center",children:[T("div",{style:{width:"4px",height:"4px",borderRadius:"2px",background:"black"}}),T(Rn,{placement:"top",title:((c=o.name)==null?void 0:c.length)>26?o.name:"",children:T("div",{style:{paddingLeft:"6px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:"12px",width:"336px"},children:o.fileName})})]},s)})})]})};var jl=(t=>(t.REFERENCELIST="referencelist",t.ALLFILELIST="allFileList",t))(jl||{});function Qm(t=fc){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=uu(),d=Me(()=>{const _=Yi({theme:sa,mode:"light"},x||{});return Yi(_,i||{})},[x,i]),[m,v]=le(!1),[p,f]=le(!1),[y,h]=le(null),[C,b]=le(!1),[F,E]=le("mark"),[B,w]=le({url:"",parse_url:"",file_type:"",file_name:""}),[A,g]=le([]),[S,D]=le(1),[R]=le(16),[P,z]=le(0),[$,j]=le(!1),[q,Y]=le([]),[U,M]=le(void 0),[N,O]=le([]),[I,V]=le([]),[X,ee]=le(void 0),[te,ie]=le({display:"ready",sender:"ready",app:"initializing"});function se(k,_){if(!_)return k;const W=Array.isArray(k)?[...k]:{...k};for(const G in _)if(_[G]!==void 0&&_[G]!==null&&Object.prototype.hasOwnProperty.call(_,G))if(G==="actions"&&Array.isArray(k[G])&&Array.isArray(_[G])){const oe=new Map;k[G].forEach(ce=>{ce.name&&oe.set(ce.name,ce)}),_[G].forEach(ce=>{ce.name&&oe.set(ce.name,ce)}),W[G]=Array.from(oe.values())}else typeof k[G]=="object"&&k[G]!==null&&!Array.isArray(k[G])&&typeof _[G]=="object"&&_[G]!==null&&!Array.isArray(_[G])?W[G]=se(k[G],_[G]):W[G]=_[G];return W}const ke=Me(()=>mu(c),[c]),Q=Me(()=>{const k=ke;return{...en,placeholder:k.sender.placeholder,switchs:(en.switchs??[]).map(W=>({...W,label:W.name==="netSearch"?k.sender.netSearch:k.sender.deepThinking})),actions:(en.actions??[]).map(W=>({...W,tip:W.name==="upload"?k.sender.fileUpload:W.tip}))}},[c,ke]),[K,ae]=le(()=>se(Q,l.senderConfig));Le(()=>{const k=ke,_={...en,placeholder:k.sender.placeholder,switchs:(en.switchs??[]).map(W=>({...W,label:W.name==="netSearch"?k.sender.netSearch:k.sender.deepThinking})),actions:(en.actions??[]).map(W=>({...W,tip:W.name==="upload"?k.sender.fileUpload:W.tip}))};ae(W=>{const G=se(_,l.senderConfig);return Array.isArray(W.actions)&&Array.isArray(G.actions)&&(G.actions=G.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})),G})},[c,l.senderConfig,ke]);const{fileStatuses:ue,setFileStatuses:Z,pollFileStatus:de,handleRemoveFromTemp:Se,resetStopFlag:Re,setStopFlag:Ve,stoppedRef:Ce,getTempFileList:be,setFileManagerData:Pe,fileManagerData:Fe}=mx({url:n,token:e,CSRFToken:a,activeSessionId:U}),[We,re]=ye.useState(()=>{var _;if(!I||I.length===0)return;const k=I.find(W=>W.isDefault);return k?k.id:(_=I[0])==null?void 0:_.id});ye.useEffect(()=>{if(!I||I.length===0)return;const k=I.some(_=>_.id===We);if(!We||!k){const _=I.find(W=>W.isDefault);re(_?_.id:I[0].id)}},[I]);const[Ae,st]=le({}),At=Ue(void 0),Bt=Ue(void 0),Mt=Ue(void 0),ze=Ue(null),Lt=Ue(void 0),ur=Ue([]),[Ar,St]=le([]),[Cr,lr]=le({}),[$r,cr]=le(!1),[zr,Br]=le([]),[qr,$t]=le(!1),{api_startChat_re:Ft,addEmptyMessage:Dt,setLastEmptyMessage:zt,stopStream:Jt,cancelStreamBySessionId:Wt}=vx({baseUrl:n,CSRFToken:a,token:e,setChatData:Y,activeSessionId:U,setAppStatus:ie,setConversationList:g}),tt=Me(()=>{const k={};return(I||[]).forEach(_=>{k[_.id]=_}),k},[I]),he=Me(()=>{const k=q.find(W=>W.id===U)||{id:U,messages:[]},_=k.configId?tt[k.configId]:null;return{...k,assistantInfo:_}},[q,U,tt]);Le(()=>{console.log("currentChatData",he)},[he]);const it=Me(()=>{if(he.configId&&tt){const k=tt[he.configId];return k!=null&&k.configJson?JSON.parse(k.configJson).is_download:!1}else return!1},[he.configId,tt]);Me(()=>{if((he.configId||X)&&tt){const k=tt[he.configId];if(k!=null&&k.configJson){const _=JSON.parse(k.configJson);return console.log("is_enableThinking",he.configId,tt,X),!!_.thinking}else if(X){const _=tt[X];if(_!=null&&_.configJson)return!!JSON.parse(_.configJson).thinking}}return!1},[he.configId,tt,X]),Le(()=>{if(At.current&&At.current!==U){const _=At.current,W=A.find(ce=>ce.sessionId===_&&ce.isNew),G=q.find(ce=>ce.id===_&&ce.isNew),oe=G&&G.messages&&G.messages.length>0;W&&!oe&&(g(ce=>ce.filter(ve=>ve.sessionId!==_)),Y(ce=>ce.filter(ve=>ve.id!==_)))}At.current=U;const k=he.messages&&he.messages.length>0?he.messages[he.messages.length-1].recommendQuestion:[];O(k)},[U,A,q,he.messages]);const Et=async k=>{var _,W,G,oe;if(!$){j(!0);try{const ce=await Nt.get(`${n}/qa/dialogue/list?pageNo=${k}&pageSize=${R}&sysType=INT_SESSION`,{headers:{Authorization:e}}),ve=((W=(_=ce==null?void 0:ce.data)==null?void 0:_.data)==null?void 0:W.records)||[],pe=((oe=(G=ce==null?void 0:ce.data)==null?void 0:G.data)==null?void 0:oe.total)||0;z(pe),g(Je=>{const Ye=new Map;return[...Je,...ve].forEach(lt=>{Ye.set(lt.sessionId,lt)}),Array.from(Ye.values())}),D(k)}catch{}finally{j(!1)}}};Le(()=>{ie(k=>({...k,app:"initializing"})),Nt.get(`${n}/qa/search/config/helper/list?pageNo=1&pageSize=3000`,{headers:{Authorization:e}}).then(k=>{V(k.data.data||[])}).catch(()=>{}),Et(1).then(()=>{U||qt(),ie(k=>({...k,app:"ready"}))}).catch(()=>{ie(k=>({...k,app:"error"}))})},[]),Le(()=>{U&&(ie(k=>({...k,display:"loading"})),be(U),Nt.get(`${n}/qa/dialogue/getDialogBySessionId?sessionId=${U}`,{headers:{Authorization:e}}).then(k=>{var wt;if(!k.data.data){ie(fe=>({...fe,display:"ready"}));return}const _=((wt=k.data.data)==null?void 0:wt.queryReplyPairList)||[],W=ux(_),{sessionId:G,searchConfigDTO:oe,filePath:ce,configId:ve,reference:pe,webReference:Je,uploadedFiles:Ye,fileList:lt,currentFiles:ut}=k.data.data;if(W.length>0){const fe=W.length-1-[...W].reverse().findIndex($e=>$e.istype==="ai");fe>=0&&fe<W.length&&W[fe].istype==="ai"&&(pe&&(W[fe].reference=pe),Je&&(W[fe].webReference=Je))}const Oe=ut||lt||Ye;if(Oe&&W.length>0){const fe=[...W].reverse().findIndex($e=>$e.istype==="user");fe!==-1&&(console.log(W[W.length-1-fe].currentFiles,"filesData"),W[W.length-1-fe].currentFiles=Oe)}A.find(fe=>fe.sessionId===G)&&g(fe=>fe.map($e=>$e.sessionId===G?{...$e,searchConfigDTO:oe,filePath:ce,configId:ve}:$e));const Ee={configId:k.data.data.configId,filePath:k.data.data.filePath,searchConfigDTO:k.data.data.searchConfigDTO||{},sessionId:k.data.data.sessionId,label:k.data.data.label,kbId:k.data.data.kbId};Y(fe=>{const $e=fe.filter(et=>et.id!==U);return[{id:U,messages:W,...Ee},...$e]}),ie(fe=>({...fe,display:"ready"}))}).catch(k=>{console.error("\u83B7\u53D6\u804A\u5929\u6570\u636E\u5931\u8D25:",k),k.response&&k.response.status===404&&qt(),ie(_=>({..._,display:"error"}))}))},[U,n,e]),Le(()=>{const k=Fe.uploadedFiles.length;ae(_=>{const W=Array.isArray(_.actions)?_.actions:[];return{..._,actions:W.map(oe=>oe.name==="history"?{...oe,badgeCount:k}:oe)}})},[Fe.uploadedFiles]),Le(()=>{Yc({url:n,token:e},k=>{Br(k)})},[]),ye.useEffect(()=>{ue.length&&Y(k=>{if(!k[0])return k;const{messages:_}=k[0];for(let W=_.length-1;W>=0;W--)if(_[W].istype==="user"){const G=_[W].currentFiles||[];_[W].currentFiles=ue.map(oe=>{var ve,pe,Je;const ce=G.find(Ye=>Ye.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:((Je=oe.file)==null?void 0:Je.type)||oe.type,status:oe.status,uid:oe.uid,url:oe.url||(ce==null?void 0:ce.url)||""}});break}return[...k]})},[ue]);let Be=null,at=null;const er=(k,_,W,G)=>{at=de(k,{onStatusUpdate:_,onComplete:W,onFail:G})},qe=(k,_)=>{Y(W=>{const G=[...W];return G[0]&&(G[0]={...G[0],messages:G[0].messages.map(oe=>oe.queryId===k?{...oe,feedbackResult:_}:oe)}),G})},Ge=async k=>{var _,W;if(k)try{const G=(he==null?void 0:he.configId)||((_=tt==null?void 0:tt[(he==null?void 0:he.configId)||""])==null?void 0:_.id)||"",oe=await Nt.get(`${n}/qa/ai/recommendQuestion?queryId=${k}&configId=${G||""}`.replace(/\?&/,"?"),{headers:{Authorization:e}});O(((W=oe.data)==null?void 0:W.data)||[])}catch{O([])}};function ft(k){const{content:_,audioUrl:W,filePaths:G,queryId:oe}=k;if(!U||!oe)return;const ce=(he==null?void 0:he.messages)||[],ve=ce.findIndex(me=>(me==null?void 0:me.queryId)===oe&&((me==null?void 0:me.istype)==="ai"||(me==null?void 0:me.isUser)===!1));let pe;if(ve>0)for(let me=ve-1;me>=0;me-=1){const Ee=ce[me];if((Ee==null?void 0:Ee.istype)==="user"||(Ee==null?void 0:Ee.isUser)===!0){pe=Ee;break}}const Je=(pe==null?void 0:pe.content)??_;if(!Je)return;const Ye=(pe==null?void 0:pe.filePaths)??G,lt=(typeof Ye=="string"&&Ye?JSON.parse(Ye):Ye||[]).map(me=>me.uid),ut=Date.now();zt({now:ut}),ie(me=>({...me,display:"processing",sender:"processing"}));const Oe="query-"+gr(32);ve>=0&&ce[ve]&&Y(me=>{if(!me[0])return me;const Ee=me[0],wt=Ee.messages||[];if(ve>=wt.length)return me;const fe=wt.slice();return fe[ve]={...fe[ve],queryId:Oe,content:fe[ve].content,reference:"[]",webReference:"[]",graphReference:null,databaseReference:null,status:2,chain:void 0},[{...Ee,messages:fe},...me.slice(1)]}),k.clearFn&&k.clearFn(),g(me=>me.map(Ee=>Ee.sessionId===U?{...Ee,gmtModified:ut}:Ee)),Ft({configId:he.configId,content:Je,fileUids:lt,lastDate:ut,name:he.label||"",queryId:Oe,sessionId:String(U||""),type:(pe==null?void 0:pe.audioUrl)??W?"audioUrl":"text",audioUrl:((pe==null?void 0:pe.audioUrl)??W)||"",enableThinking:!!Ae.reasoning,enableWebsearch:!!Ae.netSearch,qaChannel:Ae.qaChannel,tempKnowledgeBaseCheck:Un.current},me=>{Ge(Oe)})}async function vt(k,_){if(te.sender!=="ready"){Ct.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 G=A.find(oe=>oe.sessionId===U);if(G&&G.isNew){let oe=!1;const ce=X||G.configId,ve=k&&k.content?k.content.slice(0,20):G.label||"\u672A\u547D\u540D\u4F1A\u8BDD";if(await new Promise((pe,Je)=>{Jc({url:n,token:e,CSRFToken:a},{label:ve,sessionId:G.sessionId,sysType:"INT_SESSION",configId:ce},Ye=>{Ye&&Ye.data&&Ye.data.sessionId?(g(lt=>lt.map(ut=>ut.sessionId===G.sessionId?{...ut,isNew:!1,configId:ce,label:ve}:ut)),Y(lt=>lt.map(ut=>ut.id===G.sessionId?{...ut,isNew:!1,configId:ce,label:ve}:ut)),oe=!0,pe()):(Ct.error("\u521B\u5EFA\u4F1A\u8BDD\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5"),Je())})}),!oe)return;tr(U,k,_,ce);return}tr(U,k,_)}function tr(k,_,W,G){const oe="query-"+gr(32),ce=A.find(Oe=>Oe.sessionId===k),ve=G||(ce==null?void 0:ce.configId)||he.configId;console.log("\u52A9\u624B\u914D\u7F6E\u8BE6\u60C5",ve);const pe=_.content||_.text||"",Je=typeof pe=="string"?pe:String(pe),Ye=Je?Je.slice(0,20):"\u672A\u547D\u540D\u4F1A\u8BDD";let lt;if(_.files&&_.files.length>0&&(lt=_.files.map(Oe=>({name:Oe.file.name,size:Oe.file.size,type:Oe.file.type,filePath:Oe.filePath||"",convertedFilePath:Oe.convertedFilePath||"",uid:Oe.uid||""}))),console.log("\u672C\u5730\u6587\u4EF6\u4E0A\u4F20",_.files),Dt({content:Je,queryId:oe,currentFiles:lt,filePaths:lt?JSON.stringify(lt):void 0}),g(Oe=>Oe.map(me=>me.sessionId===k&&me.label==="\u672A\u547D\u540D\u4F1A\u8BDD"&&me.isNew?{...me,label:Ye,gmtModified:Date.now(),isNew:!1}:me)),Y(Oe=>Oe.map(me=>me.id===k&&me.label==="\u672A\u547D\u540D\u4F1A\u8BDD"&&me.isNew?{...me,label:Ye,isNew:!1}:me)),_.files&&_.files.length>0){ie(fe=>({...fe,sender:"uploading",display:"uploading"})),Be=new AbortController,Re();const Oe=_.files.map(()=>`rc-upload-${Date.now()}-${Math.random().toString(36).slice(2)}`),me=_.files.map((fe,$e)=>({...fe,uid:Oe[$e],status:"uploading"}));Z(me);const Ee=new FormData;_.files.forEach(fe=>{Ee.append("files",fe.file)});const wt=String(k||"");Ee.append("sessionId",wt),Ee.append("uids",Oe.join(",")),Nt.post(`${n}/index/knowledgeBase/file/uploadFiles`,Ee,{headers:{Authorization:e,"Content-Type":"multipart/form-data"},signal:Be.signal}).then(fe=>{var rt,we,dt,xt,br,rr,mt,_r,yt,kr;if(console.log("\u6587\u4EF6\u4E0A\u4F20\u7684\u6253\u5370\u7ED3\u679C",fe),console.log("\u6587\u4EF6\u4E0A\u4F20\u54CD\u5E94\u8BE6\u60C5:",{status:fe.status,success:(rt=fe.data)==null?void 0:rt.success,dataType:Array.isArray((we=fe.data)==null?void 0:we.data)?"array":typeof((dt=fe.data)==null?void 0:dt.data),dataLength:Array.isArray((xt=fe.data)==null?void 0:xt.data)?fe.data.data.length:"N/A",errorMsg:(br=fe.data)==null?void 0:br.errorMsg,errorCode:(rr=fe.data)==null?void 0:rr.errorCode,fullResponse:fe.data}),Ce.current)return;const $e=(mt=fe.data)==null?void 0:mt.data,De=((_r=fe.data)==null?void 0:_r.success)===!0,et=Array.isArray($e)&&$e.length>0;if(De&&et){const _t=$e,Rr=_t.map(ot=>ot.uid);Z(ot=>ot.map(nt=>{const Qe=$e.find(je=>je.uid===nt.uid);return Qe?{...nt,...Qe}:nt})),ie(ot=>({...ot,sender:"processing",display:"analyzing"})),Z(ot=>ot.map(nt=>({...nt,status:"parsing"}))),er(Rr,ot=>{if(!ot||!Array.isArray(ot)){console.warn("pollFileStatus \u56DE\u8C03\u8FD4\u56DE\u7684 serverStatuses \u65E0\u6548:",ot);return}if(Z(Qe=>Qe.map(je=>{const Ze=ot.find(Gt=>Gt&&Gt.uid===je.uid);if(Ze)switch(Ze.fileParseStatus??Ze.status){case 3:return{...je,status:"done"};case 4:return{...je,status:"error"};case 1:case 2:default:return{...je,status:"parsing"}}return je})),Array.isArray(ot)&&ot.length>0&&ot.every(Qe=>{if(!Qe)return!1;const je=Qe.fileParseStatus??Qe.status;return je===3||je===4})){Z([]);const Qe=new Map;(ot||[]).forEach(je=>{Qe.set(je.id,je)}),Pe(je=>({uploadedFiles:nf(je.uploadedFiles,_t).map(Gt=>{var Bn;return{...Gt,pdfPages:((Bn=Qe.get(Gt.id))==null?void 0:Bn.pdfPages)||0}})}))}},()=>{W==null||W(),ie(nt=>({...nt,sender:"processing",display:"processing"})),Z(nt=>nt.map(Qe=>{const je=_t.find(Ze=>Ze.uid===Qe.uid);return je?{...Qe,...je,url:je.filePath,filePath:je.filePath,name:je.fileName||Qe.name,convertedFilePath:je.convertedFilePath||Qe.convertedFilePath}:Qe})),Y(nt=>{if(!nt[0])return nt;const{messages:Qe}=nt[0];for(let je=Qe.length-1;je>=0;je--)if(Qe[je].istype==="user"){const Ze=Qe[je].currentFiles||[];Qe[je].currentFiles=Ze.map(Gt=>{const Bn=_t.find(nc=>nc.uid===Gt.uid);return Bn?{...Gt,...Bn}:Gt});break}return[...nt]});const ot=Date.now();Ft({configId:ve,content:Je,fileUids:Rr,lastDate:ot,name:Ye,queryId:oe,sessionId:String(k||""),type:"text",audioUrl:"",enableThinking:!!Ae.reasoning,enableWebsearch:!!Ae.netSearch,qaChannel:Ae.qaChannel,tempKnowledgeBaseCheck:Un.current},nt=>{Ge(oe)})},ot=>{ie(nt=>({...nt,display:"ready",sender:"ready"})),Z(nt=>nt.map(Qe=>({...Qe,status:"error",message:ot})))})}else{let _t="\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25";(yt=fe.data)!=null&&yt.errorMsg?_t=fe.data.errorMsg:De?et||(Array.isArray($e)?$e.length===0&&(_t="\u4E0A\u4F20\u5931\u8D25: \u8FD4\u56DE\u6570\u636E\u4E3A\u7A7A"):_t=`\u4E0A\u4F20\u5931\u8D25: \u8FD4\u56DE\u6570\u636E\u683C\u5F0F\u9519\u8BEF\uFF0C\u671F\u671B\u6570\u7EC4\uFF0C\u5B9E\u9645\u4E3A ${typeof $e}`):_t=`\u4E0A\u4F20\u5931\u8D25: success=${(kr=fe.data)==null?void 0:kr.success}`,console.error("\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25\u8BE6\u60C5:",{errorMsg:_t,response:fe.data,isSuccess:De,isValidData:et}),Ct.error(_t),ie(Rr=>({...Rr,display:"error",sender:"ready"})),Z(Rr=>Rr.map(ot=>({...ot,status:"error",message:_t})))}}).catch(fe=>{var $e,De;(($e=fe==null?void 0:fe.response)==null?void 0:$e.status)===413?(De=fe==null?void 0:fe.response)!=null&&De.statusText.includes("Request Entity Too Large")&&Ct.error("\u6587\u4EF6\u8D85\u8FC7\u6700\u5927\u53EF\u4E0A\u4F20\u9650\u5236"):Ct.error("\u7F51\u7EDC\u9519\u8BEF"),ie(et=>({...et,display:"error",sender:"ready"})),Z(et=>et.map(rt=>({...rt,status:"error",message:"\u7F51\u7EDC\u9519\u8BEF"})))});return}ie(Oe=>({...Oe,display:"processing",sender:"processing"}));const ut=Date.now();g(Oe=>Oe.map(me=>me.sessionId===k?{...me,gmtModified:ut}:me)),W==null||W(),Ft({configId:ve,content:Je,fileUids:[],lastDate:ut,name:Ye,queryId:oe,sessionId:String(k||""),type:"text",audioUrl:"",enableThinking:!!Ae.reasoning,enableWebsearch:!!Ae.netSearch,qaChannel:Ae.qaChannel,tempKnowledgeBaseCheck:Un.current},Oe=>{Ge(oe)})}function Yr(k){k.restult==1?wa({url:n,token:e,CSRFToken:a},{queryId:k.queryId},()=>{qe(k.queryId,null)}):is({url:n,token:e,CSRFToken:a},{restult:1,queryId:k.queryId},()=>{qe(k.queryId,1)})}function qt(k){const _=gr(32),W={sessionId:_,label:"\u672A\u547D\u540D\u4F1A\u8BDD",gmtModified:Date.now(),searchConfigDTO:{},filePath:"",configId:"",isNew:!0};g(G=>[{...W,messages:[]},...G]),Y(G=>[{id:_,messages:[],...W},...G]),M(_)}function fr(k){if(k!=null&&k.sessionId&&k.sessionId!==U){U&&Wt(U),M(k.sessionId),ie(W=>({...W,sender:"ready"}));const _=q.find(W=>W.id===k.sessionId);if(_&&_.messages&&_.messages.length>0){const W=[..._.messages].reverse().find(G=>G.istype==="ai");W&&W.recommendQuestion?O(W.recommendQuestion):O([])}else O([])}}const Qr=async k=>new Promise((_,W)=>{ef({url:n,token:e,CSRFToken:a},{sessionId:k},G=>{G?(Ct.success("\u5220\u9664\u6210\u529F!"),_(G)):(Ct.error("\u5220\u9664\u5931\u8D25!"),W(G))})}),Zr=async()=>{try{return g([]),z(0),await Et(1),[]}catch(k){throw Ct.error("\u5237\u65B0\u4F1A\u8BDD\u5217\u8868\u5931\u8D25"),k}},Jr=async(k,_)=>new Promise((W,G)=>{tf({url:n,token:e,CSRFToken:a},{label:_,sessionId:k},oe=>{if(oe){const ce=Date.now();g(ve=>ve.map(pe=>pe.sessionId===k?{...pe,label:_,gmtModified:ce}:pe)),Y(ve=>ve.map(pe=>pe.id===k?{...pe,label:_}:pe)),Ct.success("\u91CD\u547D\u540D\u6210\u529F!"),W(oe)}else Ct.error("\u91CD\u547D\u540D\u5931\u8D25"),G(oe)})}),Pt=k=>{g(_=>{const W=_.filter(G=>G.sessionId!==k);return U===k&&(W.length>0?M(W[0].sessionId):qt()),W})},Vn=(k,_)=>{const W=Date.now();g(G=>G.map(oe=>oe.sessionId===k?{...oe,label:_,gmtModified:W}:oe)),Y(G=>G.map(oe=>oe.id===k?{...oe,label:_}:oe))},jn=k=>{is({url:n,token:e,CSRFToken:a},{...k,...Cr,restult:0},()=>{qe(Cr.queryId,0)})},ma=k=>{const _=k.new_name,W=y.data.label;_&&_!==W?y.async_renameConversation(_).then(()=>{y.fn_renameItemInList(_),v(!1)}).catch(()=>{}):v(!1)},dr=k=>{y.async_deleteConversation().then(()=>{y.fn_removeItemFromList(),f(!1)}).catch(()=>{})},Sr=(k,_)=>{switch(console.log(k,_),k){case"close_remove":f(!1);break;case"close_rename":v(!1);break;case"ok_rename":ma(_);break;case"ok_remove":dr();break}},Ql=async({url:k,params:_,replacePredataFunction:W})=>{var G,oe;try{const ce=await Nt.post(k,_,{headers:{Authorization:e}}),ve=(oe=(G=ce==null?void 0:ce.data)==null?void 0:G.data)==null?void 0:oe.data;ve&&W(ve)}catch(ce){console.log("error",ce)}},Zl=async k=>{var _;try{const W=await Nt.get(`${Ka()}/index/knowledgeBase/file/getFileStatusByUids?uids=${k.data.uids}`,{headers:{Authorization:e}});return console.log("resslkdjgalsg",W),(_=W==null?void 0:W.data)==null?void 0:_.data}catch{}},Zo=async k=>{var _;if(rf.includes(k.file_type)){const W=(_=k.metadata)!=null&&_.source?`${Xa}${k.metadata.source}`:k.url||k.convertedFilePath||k.filePath;w({...k,parse_url:W}),E("preview"),b(!0);return}try{const W=await Zl({data:{uids:k.uid},config:{url:Ka(),token:e,enableMock:!1}});if(W!=null&&W.length){const G=W[0];w({...k,parse_url:G.convertedFilePath}),E("preview"),b(!0)}}catch{}},Un=Ue(!1),Dr=(k,_)=>{var W,G,oe,ce,ve,pe,Je,Ye,lt,ut,Oe;switch(console.log(`[Event] ${k}`,_),k){case"TempKnowledgeBase":Un.current=_;break;case"reference_file:click":if(_.file_type==="image")return;if(!_.parse_url){if(!_.uid)return _.references?void 0:Ct.warning("\u6587\u4EF6\u8FD8\u672A\u89E3\u6790\u5B8C\u6210,\u8BF7\u7A0D\u540E\u9884\u89C8");Zo(_);return}w({..._,file_type:_.type,file_name:_.file}),E("preview"),b(!0);break;case"conversations:load_more":{A.length<P&&!$&&Et(S+1);break}case"retrieve-sql-data:pagingation_click":const{page:me,pageSize:Ee,fetchUrl:wt,source:fe,replacePredataFunction:$e}=_;Ql({url:`${n}${wt}`,replacePredataFunction:$e,params:{pageNo:me,pageSize:Ee,convertedFilePath:fe,stream:!1}});break;case"web_referenceFile_title:click":if(!((W=_==null?void 0:_.data)!=null&&W.link))return console.error("\u6CA1\u6709\u7F51\u9875\u5730\u5740");window.open(_.data.link,"_blank");break;case"conversation:item_click":fr(_);break;case"files:finished_animation_complete":Z([]);break;case"conversation:create":qt();break;case"conversation:new_assistant_change":ee(_.assistantId);break;case"conversations:rename_icon_clicked":h({data:_,async_renameConversation:De=>Jr(_.sessionId,De),fn_renameItemInList:De=>Vn(_.sessionId,De)}),v(!0);break;case"conversations:delete_icon_clicked":h({data:_,async_deleteConversation:()=>Qr(_.sessionId),async_refreshConversationList:Zr,fn_removeItemFromList:()=>Pt(_.sessionId)}),f(!0);break;case"sender:send":vt(_,_.clearFn);break;case"sender:send_recommandQuestion":{const De=((_==null?void 0:_.content)??"").toString();if(!De)break;vt({content:De},()=>{});break}case"chatbox:follow_up_question_click":{const De=((_==null?void 0:_.question)??(_==null?void 0:_.content)??"").toString();if(!De)break;vt({content:De},()=>{});break}case"sender:stop":Ve(),Be&&(Be.abort(),Be=null),at&&(at(),at=null),ie(De=>({...De,display:"ready",sender:"ready"})),Z([]),Jt==null||Jt();break;case"sender:clear":(G=_.clearFn)==null||G.call(_);break;case"sender:configChange":_&&_.all&&st(_.all);break;case"sender:action_upload":ze.current&&ze.current.click();break;case"sender:action_history":$t(!0);break;case"uploaded_file:item_click":break;case"action_copy:click":_&&sx(_.content,_.event);break;case"chatbox:copy":{let De=(_==null?void 0:_.content)||"";if(!De)break;De=De.replace(/\[retrive-tag[^\]]*\][\s\S]*?\[\/retrive-tag\]/g,"");const et=async we=>{try{return await navigator.clipboard.writeText(we),Ct.success("\u5DF2\u590D\u5236\u5230\u526A\u8D34\u677F"),!0}catch{return!1}},rt=we=>{const dt=document.createElement("textarea");dt.value=we,dt.style.position="fixed",dt.style.opacity="0",document.body.appendChild(dt),dt.focus(),dt.select();try{document.execCommand("copy"),Ct.success("\u5DF2\u590D\u5236\u5230\u526A\u8D34\u677F")}catch{Ct.error("\u590D\u5236\u5931\u8D25")}document.body.removeChild(dt)};et(De).then(we=>{we||rt(De)});break}case"chatbox:repeat":console.log(_,"sdkflskdjflksdjfklsdjlfkjsdklfjsdklfjlks"),ft(_);break;case"action_thumbsup":Yr(_);break;case"chatbox:like":Yr({queryId:_==null?void 0:_.queryId,restult:_==null?void 0:_.result});break;case"action_thumbsdown":_.restult===0?wa({url:n,token:e,CSRFToken:a},{queryId:_.queryId},()=>{qe(_.queryId,null)}):(lr(_),cr(!0));break;case"chatbox:dislike":(_==null?void 0:_.result)===0?wa({url:n,token:e,CSRFToken:a},{queryId:_.queryId},()=>{qe(_.queryId,null)}):(lr({queryId:_==null?void 0:_.queryId}),cr(!0));break;case"action_retrive_tag":o==null||o("action_retrive_tag",_);break;case"referenceFile_view":o==null||o("referenceFile_view",_);break;case"referenceFile_question":console.log(_,"zhezhhzhzh"),Zo(_.data||_),o==null||o("referenceFile_question",_);break;case"referenceFile_download":o==null||o("referenceFile_download",_);break;case"references:click":case"knowledge_base_view_all:click":{const De=()=>k==="references:click"?T(C0,{type:"referencelist",data:_,token:e,eventsEmit:o,is_download:it}):T(T1,{fileData:_,token:e}),et=new CustomEvent("aichat:right_set_content",{detail:{content:T(De,{})}});window.dispatchEvent(et);const rt=new CustomEvent("aichat:right_set",{detail:{collapsed:!1}});window.dispatchEvent(rt);break}case"retrive_tag:click":{let De=(_==null?void 0:_.referencesPayloadSingle)||((_==null?void 0:_.fromtype)==="10"&&(_!=null&&_.referenceDoc)?{knowledgeRefs:[_.referenceDoc],webRefs:[],graphRefs:[],databaseRefs:[],images:[],raw:{}}:null);if((_==null?void 0:_.fromtype)==="10"&&!De&&((oe=_==null?void 0:_.leaf)==null?void 0:oe.id)!=null&&((ce=he==null?void 0:he.messages)!=null&&ce.length)){const et=he.messages;for(let rt=et.length-1;rt>=0;rt--){const we=et[rt];if((we==null?void 0:we.istype)!=="ai")continue;const dt=(we==null?void 0:we.faqReference)??((ve=we==null?void 0:we.reply)==null?void 0:ve.faqReference)??(we==null?void 0:we.reference);if(!dt)continue;let xt=[];try{const Ze=typeof dt=="string"?(()=>{const Gt=dt.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(Gt)})():dt;xt=Array.isArray(Ze)?Ze:[Ze]}catch{continue}if(xt.length===0)continue;const br=String(_.leaf.id);let rr=xt.findIndex(Ze=>String((Ze==null?void 0:Ze.pk)??(Ze==null?void 0:Ze.order_num)??(Ze==null?void 0:Ze.id))===br);if(rr<0){const Ze=Number(br);Number.isInteger(Ze)&&Ze>=1&&Ze<=xt.length&&(rr=Ze-1)}if(rr<0)continue;const mt=xt[rr],_r=rr+1,yt=mt.metadata||{},kr=mt.faq_question||yt.sourceFileName||yt.source&&String(yt.source).split("/").pop()||"FAQ",_t=mt.folder_path||yt.folder_path||yt.knowledge_base_name||"",Rr=_t?`${_t} - ${kr}`:kr,ot=`\u77E5\u8BC6\u5E93${_r}\u540D\uFF1A${Rr}`,nt=String(mt.pk??mt.order_num??mt.id??""),Qe=typeof mt.score=="number"?mt.score:typeof yt.score=="number"?yt.score:0;De={knowledgeRefs:[{id:nt,file_id:nt,file_name:ot,file_type:"faq",type:"faq",path:"",score:Qe,rrf_score:Qe,tags:[{id:br,index:_r,image_urls:((pe=_==null?void 0:_.tagInfo)==null?void 0:pe.image_urls)||[],metadata:yt}],source:mt.folder_path||"",order_num:nt,pk:nt,faq_question:mt.faq_question,faq_answer:mt.faq_answer,folder_path:mt.folder_path,metadata:yt,faqIndex:_r,...mt}],webRefs:[],graphRefs:[],databaseRefs:[],images:[],raw:{}};break}}if((_==null?void 0:_.fromtype)==="10"&&De){const et=new CustomEvent("aichat:right_set_content",{detail:{content:T(C0,{type:"referencelist",data:De,token:e,eventsEmit:o,is_download:it})}});window.dispatchEvent(et);const rt=new CustomEvent("aichat:right_set",{detail:{collapsed:!1}});window.dispatchEvent(rt)}o==null||o("retrive_tag:click",_);break}case"fileManager:change":{typeof(_==null?void 0:_.setUploadedFiles)=="function"&&(Bt.current=_.setUploadedFiles,Mt.current=_.removeFile,Lt.current=_==null?void 0:_.senderConfig,ur.current=Array.isArray(_==null?void 0:_.uploadedFiles)?_.uploadedFiles:[],Array.isArray(_==null?void 0:_.uploadedFiles)&&St(_.uploadedFiles),console.log("[DEBUG] fileManager:change \u4E8B\u4EF6\u89E6\u53D1\uFF0CsetUploadedFilesRef \u5DF2\u8BBE\u7F6E",{hasSetUploadedFiles:!!Bt.current,uploadedFilesCount:((Je=_==null?void 0:_.uploadedFiles)==null?void 0:Je.length)||0,pendingFilesCount:((Ye=_==null?void 0:_.uploadedFiles)==null?void 0:Ye.length)||0,hasSenderConfig:!!(_!=null&&_.senderConfig),senderConfig:_==null?void 0:_.senderConfig,upload_number_limit:(lt=_==null?void 0:_.senderConfig)==null?void 0:lt.upload_number_limit,upload_size_limit:(ut=_==null?void 0:_.senderConfig)==null?void 0:ut.upload_size_limit}));break}case"uploaded_file:removeFromTemp":{console.log("[DEBUG] mergedEventsEmit uploaded_file:removeFromTemp \u4E8B\u4EF6",_);const De=(Oe=_==null?void 0:_.file)==null?void 0:Oe.uid;if(!De){console.warn("[DEBUG] \u7F3A\u5C11uid\uFF0C\u65E0\u6CD5\u5220\u9664\u4E34\u65F6\u6587\u4EF6",_);break}const et=[...(he==null?void 0:he.messages)||[]].reverse().find(we=>we.istype==="user"),rt=et==null?void 0:et.queryId;Se(De,rt);break}case"uploaded_file:remove_batch":break;default:o==null||o(k,_)}},Jl=[{key:"conversations",type:"custom",label:"\u5BF9\u8BDD\u5386\u53F2",icon:T(uf,{size:16}),enabled:!0,component:T(ed,{data:A,assistantList:I,activedItem:U||"",hasMore:A.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:Dr,styles:d.theme})}],Jo=ye.useCallback(()=>T(hx,{eventsEmit:Dr,assistantList:I,styles:d,selectedId:We,onSelectAssistant:re,productLogo:l==null?void 0:l.productLogo}),[Dr,I,d,We,l==null?void 0:l.productLogo]),ec={...ye.useMemo(()=>({AiChatBox:(k,_)=>{var lt,ut,Oe,me;const W=_===(((lt=he==null?void 0:he.messages)==null?void 0:lt.length)||0)-1;let G="ready";if(W)if(k.status!==void 0)switch(k.status){case 0:G="thinking";break;case 1:G="processing";break;case 2:G="ready";break;case 3:G="error";break;case 4:G="thinking";break;default:G=te.display}else G=te.display;let oe=[];if(Array.isArray(N))oe=N;else if(typeof N=="string")try{oe=JSON.parse(N)||[]}catch{oe=[]}const ce=(()=>{var fe;const Ee=k==null?void 0:k.reference;if(Ee){if(typeof Ee=="string")try{return JSON.parse(Ee),Ee}catch{return"[]"}try{return JSON.stringify(Ee)}catch{return"[]"}}const wt=(k==null?void 0:k.faqReference)??((fe=k==null?void 0:k.reply)==null?void 0:fe.faqReference)??void 0;if(!wt)return"[]";try{const $e=typeof wt=="string"?(()=>{const we=wt.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(we)})():wt,De=Array.isArray($e)?$e:[$e];if(!De.length)return"[]";const rt={knowledgeRefs:De.map((we,dt)=>{const xt=we.metadata||{},br=we.faq_question||xt.sourceFileName||xt.source&&String(xt.source).split("/").pop()||"FAQ",rr=we.folder_path||xt.folder_path||xt.knowledge_base_name||"",mt=rr?`${rr} - ${br}`:br,_r=`\u77E5\u8BC6\u5E93${dt+1}\u540D\uFF1A${mt}`,yt=String(we.pk??we.order_num??we.id??""),kr=typeof we.score=="number"?we.score:typeof xt.score=="number"?xt.score:0;return{id:yt,file_id:yt,file_name:_r,file_type:"faq",type:"faq",path:"",score:kr,rrf_score:kr,tags:[{id:yt,index:dt+1,image_urls:[],metadata:xt}],source:we.folder_path||"",order_num:yt,pk:yt,faq_question:we.faq_question,faq_answer:we.faq_answer,folder_path:we.folder_path,metadata:xt,faqIndex:dt+1,...we}}),webRefs:[],graphRefs:[],databaseRefs:[],images:[],raw:{}};return JSON.stringify(rt)}catch{return"[]"}})(),ve=(()=>{const Ee=k==null?void 0:k.webReference;if(!Ee)return"[]";if(typeof Ee=="string")try{return JSON.parse(Ee),Ee}catch{return"[]"}try{return JSON.stringify(Ee)}catch{return"[]"}})(),pe=(()=>{const Ee=k==null?void 0:k.graphReference;if(!Ee)return"[]";if(typeof Ee=="string")try{return JSON.parse(Ee),Ee}catch{return"[]"}try{return JSON.stringify(Ee)}catch{return"[]"}})(),Je=k==null?void 0:k.databaseReference,Ye=(()=>{var wt,fe,$e;if(k!=null&&k.chainRespTime||(wt=k==null?void 0:k.reply)!=null&&wt.chainRespTime)return(k==null?void 0:k.chainRespTime)??((fe=k==null?void 0:k.reply)==null?void 0:fe.chainRespTime);const Ee=(k==null?void 0:k.chain)||(($e=k==null?void 0:k.reply)==null?void 0:$e.chain);if(Array.isArray(Ee)&&Ee.length>0){const De=Ee.reduce((et,rt)=>{const we=(rt==null?void 0:rt.chainRespTime)??(rt==null?void 0:rt.respTime);return we!=null&&we>0?et+we:et},0);return De>0?De:void 0}})();return T(es,{...k,enablePrism:!1,token:e,streamUrl:"/proxy/index/knowledgeBase/file/stream",referenceMode:"button",reference:ce,webReference:ve,graphReference:pe,faqReference:(k==null?void 0:k.faqReference)??((ut=k==null?void 0:k.reply)==null?void 0:ut.faqReference),databaseReference:Je,contentType:"stream",displayStatus:G,eventsEmit:Dr,isLast:W&&(k==null?void 0:k.istype)==="ai",followUpQuestions:W&&(k==null?void 0:k.istype)==="ai"?oe:[],defaultAnswer:((Oe=he==null?void 0:he.searchConfigDTO)==null?void 0:Oe.defaultAnswer)||"\u4E0D\u77E5\u9053\u4EC0\u4E48\u539F\u56E0\u6211\u4EEC\u6CA1\u80FD\u67E5\u5230\u4F60\u8981\u7684\u95EE\u9898*-*",is_download:it,styles:d,enableThoughtChain:!0,chain:k==null?void 0:k.chain,thoughtChainNodes:k==null?void 0:k.thoughtChainNodes,thoughtChainStatus:k==null?void 0:k.status,enableCot:(k==null?void 0:k.enableCot)??((me=k==null?void 0:k.reply)==null?void 0:me.enableCot),chainRespTime:Ye},`${(k==null?void 0:k.queryId)||(k==null?void 0:k.id)||_}-${(k==null?void 0:k.istype)||"unknown"}`)},LogoBox:k=>k&&k.LogoBox===null?null:k&&typeof k.LogoBox=="function"?T(k.LogoBox,{}):T("div",{className:"text-2xl w-full text-center font-bold",children:"\u5C0F\u9CB8\u667A\u80FD\u52A9\u624B"}),DisplayLoading:()=>T(Cx,{}),DisplayError:()=>T(Fx,{}),AppError:()=>T(bx,{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 k,_;return T(yx,{title:(k=l==null?void 0:l.appLoadingConfig)==null?void 0:k.title,subtitle:((_=l==null?void 0:l.appLoadingConfig)==null?void 0:_.subtitle)||""})},UserChatBox:(k,_)=>T(es,{enablePrism:!1,token:e,streamUrl:"/proxy/index/knowledgeBase/file/stream",...k,referenceMode:"button",contentType:"plainText",isUser:!0,displayStatus:"ready",eventsEmit:Dr,styles:d,fileManagerData:Fe,currentFiles:k==null?void 0:k.currentFiles},`${(k==null?void 0:k.queryId)||(k==null?void 0:k.id)||_}-user`),WelcomeComponent:Jo}),[Jo,he,te.display,Dr,d,it,Fe]),...l.CustomComponents||{}};Le(()=>{ae(k=>{const _=Array.isArray(k.switchs)?k.switchs.map(W=>W.name==="reasoning"?{...W,enabled:!0}:W):[];return{...k,switchs:_}})},[]);const tc=Me(()=>Fe.uploadedFiles||[],[Fe]),{FileDisplayTools:rc}=Qc({fileManagerData:{uploadedFiles:tc},styles:d,eventsEmit:Dr});return T(mf,{locale:c,children:ne("div",{style:{height:"100%",minWidth:"1116px",overflow:"hidden"},children:[T("input",{ref:ze,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:k=>{const _=k.target.files;if(_&&_.length>0){console.log("[DEBUG] handleFileSelect \u89E6\u53D1",{filesCount:_.length,hasSetUploadedFilesRef:!!Bt.current,hasSenderConfig:!!Lt.current,dynamicSenderConfig:K,dynamicSenderConfigKeys:K?Object.keys(K):[],senderConfigRef:Lt.current,senderConfigRefKeys:Lt.current?Object.keys(Lt.current):[]});const W=Array.from(_);let G=Lt.current;(!G||G.upload_size_limit===void 0&&G.upload_number_limit===void 0&&(!G.upload_file_type_limit||G.upload_file_type_limit.length===0))&&(G=K);const oe=ur.current||[];console.log("[DEBUG] \u9A8C\u8BC1\u914D\u7F6E\u68C0\u67E5",{configSource:G,upload_number_limit:G==null?void 0:G.upload_number_limit,upload_size_limit:G==null?void 0:G.upload_size_limit,existingFilesCount:oe.length,newFilesCount:W.length});const ce=G&&(G.upload_size_limit!==void 0||G.upload_number_limit!==void 0&&G.upload_number_limit>0||G.upload_file_type_limit&&G.upload_file_type_limit.length>0);if(console.log("[DEBUG] \u914D\u7F6E\u68C0\u67E5\u7ED3\u679C",{hasUploadLimitConfig:ce,upload_number_limit:G==null?void 0:G.upload_number_limit,upload_size_limit:G==null?void 0:G.upload_size_limit,upload_file_type_limit:G==null?void 0:G.upload_file_type_limit}),ce){const ve={upload_size_limit:G.upload_size_limit,upload_number_limit:G.upload_number_limit,upload_file_type_limit:G.upload_file_type_limit,upload_limit_message:G.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=dc(W,oe,ve);if(console.log("[DEBUG] \u9A8C\u8BC1\u7ED3\u679C",{valid:pe.valid,errors:pe.errors,rejectedFilesCount:pe.rejectedFiles.length}),!pe.valid){pc(pe);const Je=W.filter(Ye=>!pe.rejectedFiles.includes(Ye));if(Je.length===0){ze.current&&(ze.current.value="");return}W.splice(0,W.length,...Je)}}if(Bt.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),Bt.current(ve)}else console.warn("[DEBUG] setUploadedFilesRef \u672A\u8BBE\u7F6E\uFF0C\u5EF6\u8FDF\u91CD\u8BD5"),setTimeout(()=>{if(Bt.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),Bt.current(ve)}else console.error("[DEBUG] \u5EF6\u8FDF\u540E setUploadedFilesRef \u4ECD\u672A\u8BBE\u7F6E")},100)}ze.current&&(ze.current.value="")}}),T(t,{...l,status:te,chatData:he,sidebar:Jl,recommandQuestions:[],eventsEmit:Dr,styles:d,senderConfig:K,fileUploadStatus:ue,CustomComponents:ec,activeSessionId:U,scrollOld:s,rightbarWidth:"400px",locale:c,messages:u,disclaimer:l.disclaimer??ke.disclaimer,chatHeader:{title:(he==null?void 0:he.label)||ke.chatHeader.newConversation,tools:rc}}),T(Zc,{open:$r,feedBackList:zr,setOpen:cr,handleConfirm:jn}),T(w1,{isModalOpen:m,handleOk:Sr,handleCancel:()=>Sr("close_rename"),data:(y==null?void 0:y.data)||{}}),T(A1,{isModalOpen:p,handleOk:Sr,handleCancel:()=>Sr("close_remove"),data:(y==null?void 0:y.data)||{}}),T(oa,{drawer:{styles:{body:{padding:0},header:{display:"none"}}},children:T(su,{autoFocus:!1,onClose:()=>b(!1),open:C,width:F==="graphPreview"?"100%":720,className:"overflow-x-hidden",destroyOnClose:!0,children:F==="preview"&&T(Vl,{curFileInfo:B,onClose:b,token:e})})})]})})}}var pi={exports:{}};function N1(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 hi={exports:{}};const O1={},M1=Object.freeze(Object.defineProperty({__proto__:null,default:O1},Symbol.toStringTag,{value:"Module"})),L1=kc(M1);var $1=hi.exports,b0;function Ne(){return b0||(b0=1,(function(t,r){(function(e,n){t.exports=n()})($1,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 Fa<"u"&&Fa.crypto&&(a=Fa.crypto),!a&&typeof N1=="function")try{a=L1}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,F=this.sigBytes,E=h.sigBytes;if(this.clamp(),F%4)for(var B=0;B<E;B++){var w=b[B>>>2]>>>24-B%4*8&255;C[F+B>>>2]|=w<<24-(F+B)%4*8}else for(var A=0;A<E;A+=4)C[F+A>>>2]=b[A>>>2];return this.sigBytes+=E,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)}}),d=c.enc={},m=d.Hex={stringify:function(h){for(var C=h.words,b=h.sigBytes,F=[],E=0;E<b;E++){var B=C[E>>>2]>>>24-E%4*8&255;F.push((B>>>4).toString(16)),F.push((B&15).toString(16))}return F.join("")},parse:function(h){for(var C=h.length,b=[],F=0;F<C;F+=2)b[F>>>3]|=parseInt(h.substr(F,2),16)<<24-F%8*4;return new x.init(b,C/2)}},v=d.Latin1={stringify:function(h){for(var C=h.words,b=h.sigBytes,F=[],E=0;E<b;E++){var B=C[E>>>2]>>>24-E%4*8&255;F.push(String.fromCharCode(B))}return F.join("")},parse:function(h){for(var C=h.length,b=[],F=0;F<C;F++)b[F>>>2]|=(h.charCodeAt(F)&255)<<24-F%4*8;return new x.init(b,C)}},p=d.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)))}},f=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,F=b.words,E=b.sigBytes,B=this.blockSize,w=B*4,A=E/w;h?A=n.ceil(A):A=n.max((A|0)-this._minBufferSize,0);var g=A*B,S=n.min(g*4,E);if(g){for(var D=0;D<g;D+=B)this._doProcessBlock(F,D);C=F.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=f.extend({cfg:l.extend(),init:function(h){this.cfg=this.cfg.extend(h),this.reset()},reset:function(){f.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})})(hi)),hi.exports}var vi={exports:{}},z1=vi.exports,F0;function ga(){return F0||(F0=1,(function(t,r){(function(e,n){t.exports=n(Ne())})(z1,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=[],d=0;d<l;d++){var m=u[d];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,d=0;d<x;d++)l[d]=l[d].clone();return u}})})(),e})})(vi)),vi.exports}var xi={exports:{}},q1=xi.exports,E0;function H1(){return E0||(E0=1,(function(t,r){(function(e,n){t.exports=n(Ne())})(q1,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})})(xi)),xi.exports}var gi={exports:{}},V1=gi.exports,w0;function j1(){return w0||(w0=1,(function(t,r){(function(e,n){t.exports=n(Ne())})(V1,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=[],d=0;d<l;d+=2){var m=u[d>>>2]>>>16-d%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=[],d=0;d<l;d+=2){var m=s(u[d>>>2]>>>16-d%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})})(gi)),gi.exports}var mi={exports:{}},U1=mi.exports,A0;function Kr(){return A0||(A0=1,(function(t,r){(function(e,n){t.exports=n(Ne())})(U1,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 d=[],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,f=u[m+2>>>2]>>>24-(m+2)%4*8&255,y=v<<16|p<<8|f,h=0;h<4&&m+h*.75<l;h++)d.push(x.charAt(y>>>6*(3-h)&63));var C=x.charAt(64);if(C)for(;d.length%4;)d.push(C);return d.join("")},parse:function(c){var u=c.length,l=this._map,x=this._reverseMap;if(!x){x=this._reverseMap=[];for(var d=0;d<l.length;d++)x[l.charCodeAt(d)]=d}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=[],d=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,f=v|p;x[d>>>2]|=f<<24-d%4*8,d++}return a.create(x,d)}})(),e.enc.Base64})})(mi)),mi.exports}var yi={exports:{}},W1=yi.exports,B0;function G1(){return B0||(B0=1,(function(t,r){(function(e,n){t.exports=n(Ne())})(W1,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,d=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,f=l[v+1>>>2]>>>24-(v+1)%4*8&255,y=l[v+2>>>2]>>>24-(v+2)%4*8&255,h=p<<16|f<<8|y,C=0;C<4&&v+C*.75<x;C++)m.push(d.charAt(h>>>6*(3-C)&63));var b=d.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,d=this._reverseMap;if(!d){d=this._reverseMap=[];for(var m=0;m<x.length;m++)d[x.charCodeAt(m)]=m}var v=x.charAt(64);if(v){var p=c.indexOf(v);p!==-1&&(l=p)}return s(c,l,d)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function s(c,u,l){for(var x=[],d=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,f=v|p;x[d>>>2]|=f<<24-d%4*8,d++}return a.create(x,d)}})(),e.enc.Base64url})})(yi)),yi.exports}var Ci={exports:{}},K1=Ci.exports,S0;function Xr(){return S0||(S0=1,(function(t,r){(function(e,n){t.exports=n(Ne())})(K1,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,f){for(var y=0;y<16;y++){var h=f+y,C=p[h];p[h]=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360}var b=this._hash.words,F=p[f+0],E=p[f+1],B=p[f+2],w=p[f+3],A=p[f+4],g=p[f+5],S=p[f+6],D=p[f+7],R=p[f+8],P=p[f+9],z=p[f+10],$=p[f+11],j=p[f+12],q=p[f+13],Y=p[f+14],U=p[f+15],M=b[0],N=b[1],O=b[2],I=b[3];M=x(M,N,O,I,F,7,u[0]),I=x(I,M,N,O,E,12,u[1]),O=x(O,I,M,N,B,17,u[2]),N=x(N,O,I,M,w,22,u[3]),M=x(M,N,O,I,A,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,D,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=d(M,N,O,I,E,5,u[16]),I=d(I,M,N,O,S,9,u[17]),O=d(O,I,M,N,$,14,u[18]),N=d(N,O,I,M,F,20,u[19]),M=d(M,N,O,I,g,5,u[20]),I=d(I,M,N,O,z,9,u[21]),O=d(O,I,M,N,U,14,u[22]),N=d(N,O,I,M,A,20,u[23]),M=d(M,N,O,I,P,5,u[24]),I=d(I,M,N,O,Y,9,u[25]),O=d(O,I,M,N,w,14,u[26]),N=d(N,O,I,M,R,20,u[27]),M=d(M,N,O,I,q,5,u[28]),I=d(I,M,N,O,B,9,u[29]),O=d(O,I,M,N,D,14,u[30]),N=d(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,E,4,u[36]),I=m(I,M,N,O,A,11,u[37]),O=m(O,I,M,N,D,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,F,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,B,23,u[47]),M=v(M,N,O,I,F,6,u[48]),I=v(I,M,N,O,D,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,E,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,A,6,u[60]),I=v(I,M,N,O,$,10,u[61]),O=v(O,I,M,N,B,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,f=p.words,y=this._nDataBytes*8,h=p.sigBytes*8;f[h>>>5]|=128<<24-h%32;var C=n.floor(y/4294967296),b=y;f[(h+64>>>9<<4)+15]=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360,f[(h+64>>>9<<4)+14]=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360,p.sigBytes=(f.length+1)*4,this._process();for(var F=this._hash,E=F.words,B=0;B<4;B++){var w=E[B];E[B]=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360}return F},clone:function(){var p=s.clone.call(this);return p._hash=this._hash.clone(),p}});function x(p,f,y,h,C,b,F){var E=p+(f&y|~f&h)+C+F;return(E<<b|E>>>32-b)+f}function d(p,f,y,h,C,b,F){var E=p+(f&h|y&~h)+C+F;return(E<<b|E>>>32-b)+f}function m(p,f,y,h,C,b,F){var E=p+(f^y^h)+C+F;return(E<<b|E>>>32-b)+f}function v(p,f,y,h,C,b,F){var E=p+(y^(f|~h))+C+F;return(E<<b|E>>>32-b)+f}i.MD5=s._createHelper(l),i.HmacMD5=s._createHmacHelper(l)})(Math),e.MD5})})(Ci)),Ci.exports}var bi={exports:{}},X1=bi.exports,D0;function Ul(){return D0||(D0=1,(function(t,r){(function(e,n){t.exports=n(Ne())})(X1,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 d=this._hash.words,m=d[0],v=d[1],p=d[2],f=d[3],y=d[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&f)+1518500249:h<40?b+=(v^p^f)+1859775393:h<60?b+=(v&p|v&f|p&f)-1894007588:b+=(v^p^f)-899497514,y=f,f=p,p=v<<30|v>>>2,v=m,m=b}d[0]=d[0]+m|0,d[1]=d[1]+v|0,d[2]=d[2]+p|0,d[3]=d[3]+f|0,d[4]=d[4]+y|0},_doFinalize:function(){var l=this._data,x=l.words,d=this._nDataBytes*8,m=l.sigBytes*8;return x[m>>>5]|=128<<24-m%32,x[(m+64>>>9<<4)+14]=Math.floor(d/4294967296),x[(m+64>>>9<<4)+15]=d,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 Fi={exports:{}},Y1=Fi.exports,_0;function Xo(){return _0||(_0=1,(function(t,r){(function(e,n){t.exports=n(Ne())})(Y1,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,f=0;f<64;)m(p)&&(f<8&&(u[f]=v(n.pow(p,1/2))),l[f]=v(n.pow(p,1/3)),f++),p++})();var x=[],d=c.SHA256=s.extend({_doReset:function(){this._hash=new o.init(u.slice(0))},_doProcessBlock:function(m,v){for(var p=this._hash.words,f=p[0],y=p[1],h=p[2],C=p[3],b=p[4],F=p[5],E=p[6],B=p[7],w=0;w<64;w++){if(w<16)x[w]=m[v+w]|0;else{var A=x[w-15],g=(A<<25|A>>>7)^(A<<14|A>>>18)^A>>>3,S=x[w-2],D=(S<<15|S>>>17)^(S<<13|S>>>19)^S>>>10;x[w]=g+x[w-7]+D+x[w-16]}var R=b&F^~b&E,P=f&y^f&h^y&h,z=(f<<30|f>>>2)^(f<<19|f>>>13)^(f<<10|f>>>22),$=(b<<26|b>>>6)^(b<<21|b>>>11)^(b<<7|b>>>25),j=B+$+R+l[w]+x[w],q=z+P;B=E,E=F,F=b,b=C+j|0,C=h,h=y,y=f,f=j+q|0}p[0]=p[0]+f|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]+F|0,p[6]=p[6]+E|0,p[7]=p[7]+B|0},_doFinalize:function(){var m=this._data,v=m.words,p=this._nDataBytes*8,f=m.sigBytes*8;return v[f>>>5]|=128<<24-f%32,v[(f+64>>>9<<4)+14]=n.floor(p/4294967296),v[(f+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(d),i.HmacSHA256=s._createHmacHelper(d)})(Math),e.SHA256})})(Fi)),Fi.exports}var Ei={exports:{}},Q1=Ei.exports,k0;function Z1(){return k0||(k0=1,(function(t,r){(function(e,n,i){t.exports=n(Ne(),Xo())})(Q1,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})})(Ei)),Ei.exports}var wi={exports:{}},J1=wi.exports,R0;function Wl(){return R0||(R0=1,(function(t,r){(function(e,n,i){t.exports=n(Ne(),ga())})(J1,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)],d=[];(function(){for(var v=0;v<80;v++)d[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 f=this._hash.words,y=f[0],h=f[1],C=f[2],b=f[3],F=f[4],E=f[5],B=f[6],w=f[7],A=y.high,g=y.low,S=h.high,D=h.low,R=C.high,P=C.low,z=b.high,$=b.low,j=F.high,q=F.low,Y=E.high,U=E.low,M=B.high,N=B.low,O=w.high,I=w.low,V=A,X=g,ee=S,te=D,ie=R,se=P,ke=z,Q=$,K=j,ae=q,ue=Y,Z=U,de=M,Se=N,Re=O,Ve=I,Ce=0;Ce<80;Ce++){var be,Pe,Fe=d[Ce];if(Ce<16)Pe=Fe.high=v[p+Ce*2]|0,be=Fe.low=v[p+Ce*2+1]|0;else{var We=d[Ce-15],re=We.high,Ae=We.low,st=(re>>>1|Ae<<31)^(re>>>8|Ae<<24)^re>>>7,At=(Ae>>>1|re<<31)^(Ae>>>8|re<<24)^(Ae>>>7|re<<25),Bt=d[Ce-2],Mt=Bt.high,ze=Bt.low,Lt=(Mt>>>19|ze<<13)^(Mt<<3|ze>>>29)^Mt>>>6,ur=(ze>>>19|Mt<<13)^(ze<<3|Mt>>>29)^(ze>>>6|Mt<<26),Ar=d[Ce-7],St=Ar.high,Cr=Ar.low,lr=d[Ce-16],$r=lr.high,cr=lr.low;be=At+Cr,Pe=st+St+(be>>>0<At>>>0?1:0),be=be+ur,Pe=Pe+Lt+(be>>>0<ur>>>0?1:0),be=be+cr,Pe=Pe+$r+(be>>>0<cr>>>0?1:0),Fe.high=Pe,Fe.low=be}var zr=K&ue^~K&de,Br=ae&Z^~ae&Se,qr=V&ee^V&ie^ee&ie,$t=X&te^X&se^te&se,Ft=(V>>>28|X<<4)^(V<<30|X>>>2)^(V<<25|X>>>7),Dt=(X>>>28|V<<4)^(X<<30|V>>>2)^(X<<25|V>>>7),zt=(K>>>14|ae<<18)^(K>>>18|ae<<14)^(K<<23|ae>>>9),Jt=(ae>>>14|K<<18)^(ae>>>18|K<<14)^(ae<<23|K>>>9),Wt=x[Ce],tt=Wt.high,he=Wt.low,it=Ve+Jt,Et=Re+zt+(it>>>0<Ve>>>0?1:0),it=it+Br,Et=Et+zr+(it>>>0<Br>>>0?1:0),it=it+he,Et=Et+tt+(it>>>0<he>>>0?1:0),it=it+be,Et=Et+Pe+(it>>>0<be>>>0?1:0),Be=Dt+$t,at=Ft+qr+(Be>>>0<Dt>>>0?1:0);Re=de,Ve=Se,de=ue,Se=Z,ue=K,Z=ae,ae=Q+it|0,K=ke+Et+(ae>>>0<Q>>>0?1:0)|0,ke=ie,Q=se,ie=ee,se=te,ee=V,te=X,X=it+Be|0,V=Et+at+(X>>>0<it>>>0?1:0)|0}g=y.low=g+X,y.high=A+V+(g>>>0<X>>>0?1:0),D=h.low=D+te,h.high=S+ee+(D>>>0<te>>>0?1:0),P=C.low=P+se,C.high=R+ie+(P>>>0<se>>>0?1:0),$=b.low=$+Q,b.high=z+ke+($>>>0<Q>>>0?1:0),q=F.low=q+ae,F.high=j+K+(q>>>0<ae>>>0?1:0),U=E.low=U+Z,E.high=Y+ue+(U>>>0<Z>>>0?1:0),N=B.low=N+Se,B.high=M+de+(N>>>0<Se>>>0?1:0),I=w.low=I+Ve,w.high=O+Re+(I>>>0<Ve>>>0?1:0)},_doFinalize:function(){var v=this._data,p=v.words,f=this._nDataBytes*8,y=v.sigBytes*8;p[y>>>5]|=128<<24-y%32,p[(y+128>>>10<<5)+30]=Math.floor(f/4294967296),p[(y+128>>>10<<5)+31]=f,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})})(wi)),wi.exports}var Ai={exports:{}},eg=Ai.exports,I0;function tg(){return I0||(I0=1,(function(t,r){(function(e,n,i){t.exports=n(Ne(),ga(),Wl())})(eg,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})})(Ai)),Ai.exports}var Bi={exports:{}},rg=Bi.exports,T0;function ng(){return T0||(T0=1,(function(t,r){(function(e,n,i){t.exports=n(Ne(),ga())})(rg,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=[],d=[],m=[];(function(){for(var f=1,y=0,h=0;h<24;h++){x[f+5*y]=(h+1)*(h+2)/2%64;var C=y%5,b=(2*f+3*y)%5;f=C,y=b}for(var f=0;f<5;f++)for(var y=0;y<5;y++)d[f+5*y]=y+(2*f+3*y)%5*5;for(var F=1,E=0;E<24;E++){for(var B=0,w=0,A=0;A<7;A++){if(F&1){var g=(1<<A)-1;g<32?w^=1<<g:B^=1<<g-32}F&128?F=F<<1^113:F<<=1}m[E]=u.create(B,w)}})();var v=[];(function(){for(var f=0;f<25;f++)v[f]=u.create()})();var p=l.SHA3=s.extend({cfg:s.cfg.extend({outputLength:512}),_doReset:function(){for(var f=this._state=[],y=0;y<25;y++)f[y]=new u.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(f,y){for(var h=this._state,C=this.blockSize/2,b=0;b<C;b++){var F=f[y+2*b],E=f[y+2*b+1];F=(F<<8|F>>>24)&16711935|(F<<24|F>>>8)&4278255360,E=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360;var B=h[b];B.high^=E,B.low^=F}for(var w=0;w<24;w++){for(var A=0;A<5;A++){for(var g=0,S=0,D=0;D<5;D++){var B=h[A+5*D];g^=B.high,S^=B.low}var R=v[A];R.high=g,R.low=S}for(var A=0;A<5;A++)for(var P=v[(A+4)%5],z=v[(A+1)%5],$=z.high,j=z.low,g=P.high^($<<1|j>>>31),S=P.low^(j<<1|$>>>31),D=0;D<5;D++){var B=h[A+5*D];B.high^=g,B.low^=S}for(var q=1;q<25;q++){var g,S,B=h[q],Y=B.high,U=B.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[d[q]];N.high=g,N.low=S}var O=v[0],I=h[0];O.high=I.high,O.low=I.low;for(var A=0;A<5;A++)for(var D=0;D<5;D++){var q=A+5*D,B=h[q],V=v[q],X=v[(A+1)%5+5*D],ee=v[(A+2)%5+5*D];B.high=V.high^~X.high&ee.high,B.low=V.low^~X.low&ee.low}var B=h[0],te=m[w];B.high^=te.high,B.low^=te.low}},_doFinalize:function(){var f=this._data,y=f.words;this._nDataBytes*8;var h=f.sigBytes*8,C=this.blockSize*32;y[h>>>5]|=1<<24-h%32,y[(n.ceil((h+1)/C)*C>>>5)-1]|=128,f.sigBytes=y.length*4,this._process();for(var b=this._state,F=this.cfg.outputLength/8,E=F/8,B=[],w=0;w<E;w++){var A=b[w],g=A.high,S=A.low;g=(g<<8|g>>>24)&16711935|(g<<24|g>>>8)&4278255360,S=(S<<8|S>>>24)&16711935|(S<<24|S>>>8)&4278255360,B.push(S),B.push(g)}return new o.init(B,F)},clone:function(){for(var f=s.clone.call(this),y=f._state=this._state.slice(0),h=0;h<25;h++)y[h]=y[h].clone();return f}});i.SHA3=s._createHelper(p),i.HmacSHA3=s._createHmacHelper(p)})(Math),e.SHA3})})(Bi)),Bi.exports}var Si={exports:{}},ig=Si.exports,P0;function ag(){return P0||(P0=1,(function(t,r){(function(e,n){t.exports=n(Ne())})(ig,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]),d=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(E,B){for(var w=0;w<16;w++){var A=B+w,g=E[A];E[A]=(g<<8|g>>>24)&16711935|(g<<24|g>>>8)&4278255360}var S=this._hash.words,D=m.words,R=v.words,P=u.words,z=l.words,$=x.words,j=d.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 te,w=0;w<80;w+=1)te=q+E[B+P[w]]|0,w<16?te+=f(Y,U,M)+D[0]:w<32?te+=y(Y,U,M)+D[1]:w<48?te+=h(Y,U,M)+D[2]:w<64?te+=C(Y,U,M)+D[3]:te+=b(Y,U,M)+D[4],te=te|0,te=F(te,$[w]),te=te+N|0,q=N,N=M,M=F(U,10),U=Y,Y=te,te=O+E[B+z[w]]|0,w<16?te+=b(I,V,X)+R[0]:w<32?te+=C(I,V,X)+R[1]:w<48?te+=h(I,V,X)+R[2]:w<64?te+=y(I,V,X)+R[3]:te+=f(I,V,X)+R[4],te=te|0,te=F(te,j[w]),te=te+ee|0,O=ee,ee=X,X=F(V,10),V=I,I=te;te=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]=te},_doFinalize:function(){var E=this._data,B=E.words,w=this._nDataBytes*8,A=E.sigBytes*8;B[A>>>5]|=128<<24-A%32,B[(A+64>>>9<<4)+14]=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360,E.sigBytes=(B.length+1)*4,this._process();for(var g=this._hash,S=g.words,D=0;D<5;D++){var R=S[D];S[D]=(R<<8|R>>>24)&16711935|(R<<24|R>>>8)&4278255360}return g},clone:function(){var E=s.clone.call(this);return E._hash=this._hash.clone(),E}});function f(E,B,w){return E^B^w}function y(E,B,w){return E&B|~E&w}function h(E,B,w){return(E|~B)^w}function C(E,B,w){return E&w|B&~w}function b(E,B,w){return E^(B|~w)}function F(E,B){return E<<B|E>>>32-B}i.RIPEMD160=s._createHelper(p),i.HmacRIPEMD160=s._createHmacHelper(p)})(),e.RIPEMD160})})(Si)),Si.exports}var Di={exports:{}},og=Di.exports,N0;function Yo(){return N0||(N0=1,(function(t,r){(function(e,n){t.exports=n(Ne())})(og,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,d=x*4;l.sigBytes>d&&(l=u.finalize(l)),l.clamp();for(var m=this._oKey=l.clone(),v=this._iKey=l.clone(),p=m.words,f=v.words,y=0;y<x;y++)p[y]^=1549556828,f[y]^=909522486;m.sigBytes=v.sigBytes=d,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 d=l.finalize(this._oKey.clone().concat(x));return d}})})()})})(Di)),Di.exports}var _i={exports:{}},sg=_i.exports,O0;function ug(){return O0||(O0=1,(function(t,r){(function(e,n,i){t.exports=n(Ne(),Xo(),Yo())})(sg,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,d){for(var m=this.cfg,v=u.create(m.hasher,x),p=o.create(),f=o.create([1]),y=p.words,h=f.words,C=m.keySize,b=m.iterations;y.length<C;){var F=v.update(d).finalize(f);v.reset();for(var E=F.words,B=E.length,w=F,A=1;A<b;A++){w=v.finalize(w),v.reset();for(var g=w.words,S=0;S<B;S++)E[S]^=g[S]}p.concat(F),h[0]++}return p.sigBytes=C*4,p}});n.PBKDF2=function(x,d,m){return l.create(m).compute(x,d)}})(),e.PBKDF2})})(_i)),_i.exports}var ki={exports:{}},lg=ki.exports,M0;function Lr(){return M0||(M0=1,(function(t,r){(function(e,n,i){t.exports=n(Ne(),Ul(),Yo())})(lg,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 d,m=this.cfg,v=m.hasher.create(),p=o.create(),f=p.words,y=m.keySize,h=m.iterations;f.length<y;){d&&v.update(d),d=v.update(l).finalize(x),v.reset();for(var C=1;C<h;C++)d=v.finalize(d),v.reset();p.concat(d)}return p.sigBytes=y*4,p}});n.EvpKDF=function(l,x,d){return u.create(d).compute(l,x)}})(),e.EvpKDF})})(ki)),ki.exports}var Ri={exports:{}},cg=Ri.exports,L0;function bt(){return L0||(L0=1,(function(t,r){(function(e,n,i){t.exports=n(Ne(),Lr())})(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,d=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,D){this.cfg=this.cfg.extend(D),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"?A:E}return function(S){return{encrypt:function(D,R,P){return g(R).encrypt(S,D,R,P)},decrypt:function(D,R,P){return g(R).decrypt(S,D,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}}),f=v.CBC=(function(){var g=p.extend();g.Encryptor=g.extend({processBlock:function(D,R){var P=this._cipher,z=P.blockSize;S.call(this,D,R,z),P.encryptBlock(D,R),this._prevBlock=D.slice(R,R+z)}}),g.Decryptor=g.extend({processBlock:function(D,R){var P=this._cipher,z=P.blockSize,$=D.slice(R,R+z);P.decryptBlock(D,R),S.call(this,D,R,z),this._prevBlock=$}});function S(D,R,P){var z,$=this._iv;$?(z=$,this._iv=n):z=this._prevBlock;for(var j=0;j<P;j++)D[R+j]^=z[j]}return g})(),y=i.pad={},h=y.Pkcs7={pad:function(g,S){for(var D=S*4,R=D-g.sigBytes%D,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:f,padding:h}),reset:function(){var g;m.reset.call(this);var S=this.cfg,D=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,D&&D.words):(this._mode=g.call(R,this,D&&D.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={},F=b.OpenSSL={stringify:function(g){var S,D=g.ciphertext,R=g.salt;return R?S=s.create([1398893684,1701076831]).concat(R).concat(D):S=D,S.toString(l)},parse:function(g){var S,D=l.parse(g),R=D.words;return R[0]==1398893684&&R[1]==1701076831&&(S=s.create(R.slice(2,4)),R.splice(0,4),D.sigBytes-=16),C.create({ciphertext:D,salt:S})}},E=a.SerializableCipher=o.extend({cfg:o.extend({format:F}),encrypt:function(g,S,D,R){R=this.cfg.extend(R);var P=g.createEncryptor(D,R),z=P.finalize(S),$=P.cfg;return C.create({ciphertext:z,key:D,iv:$.iv,algorithm:g,mode:$.mode,padding:$.padding,blockSize:g.blockSize,formatter:R.format})},decrypt:function(g,S,D,R){R=this.cfg.extend(R),S=this._parse(S,R.format);var P=g.createDecryptor(D,R).finalize(S.ciphertext);return P},_parse:function(g,S){return typeof g=="string"?S.parse(g,this):g}}),B=i.kdf={},w=B.OpenSSL={execute:function(g,S,D,R,P){if(R||(R=s.random(64/8)),P)var z=d.create({keySize:S+D,hasher:P}).compute(g,R);else var z=d.create({keySize:S+D}).compute(g,R);var $=s.create(z.words.slice(S),D*4);return z.sigBytes=S*4,C.create({key:z,iv:$,salt:R})}},A=a.PasswordBasedCipher=E.extend({cfg:E.cfg.extend({kdf:w}),encrypt:function(g,S,D,R){R=this.cfg.extend(R);var P=R.kdf.execute(D,g.keySize,g.ivSize,R.salt,R.hasher);R.iv=P.iv;var z=E.encrypt.call(this,g,S,P.key,R);return z.mixIn(P),z},decrypt:function(g,S,D,R){R=this.cfg.extend(R),S=this._parse(S,R.format);var P=R.kdf.execute(D,g.keySize,g.ivSize,S.salt,R.hasher);R.iv=P.iv;var z=E.decrypt.call(this,g,S,P.key,R);return z}})})()})})(Ri)),Ri.exports}var Ii={exports:{}},fg=Ii.exports,$0;function dg(){return $0||($0=1,(function(t,r){(function(e,n,i){t.exports=n(Ne(),bt())})(fg,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})})(Ii)),Ii.exports}var Ti={exports:{}},pg=Ti.exports,z0;function hg(){return z0||(z0=1,(function(t,r){(function(e,n,i){t.exports=n(Ne(),bt())})(pg,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 d=0;d<c;d++)a[o+d]^=x[d]}});return n.Decryptor=i,n})(),e.mode.CTR})})(Ti)),Ti.exports}var Pi={exports:{}},vg=Pi.exports,q0;function xg(){return q0||(q0=1,(function(t,r){(function(e,n,i){t.exports=n(Ne(),bt())})(vg,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,d=this._counter;x&&(d=this._counter=x.slice(0),this._iv=void 0),a(d);var m=d.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})})(Pi)),Pi.exports}var Ni={exports:{}},gg=Ni.exports,H0;function mg(){return H0||(H0=1,(function(t,r){(function(e,n,i){t.exports=n(Ne(),bt())})(gg,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})})(Ni)),Ni.exports}var Oi={exports:{}},yg=Oi.exports,V0;function Cg(){return V0||(V0=1,(function(t,r){(function(e,n,i){t.exports=n(Ne(),bt())})(yg,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})})(Oi)),Oi.exports}var Mi={exports:{}},bg=Mi.exports,j0;function Fg(){return j0||(j0=1,(function(t,r){(function(e,n,i){t.exports=n(Ne(),bt())})(bg,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})})(Mi)),Mi.exports}var Li={exports:{}},Eg=Li.exports,U0;function wg(){return U0||(U0=1,(function(t,r){(function(e,n,i){t.exports=n(Ne(),bt())})(Eg,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})})(Li)),Li.exports}var $i={exports:{}},Ag=$i.exports,W0;function Bg(){return W0||(W0=1,(function(t,r){(function(e,n,i){t.exports=n(Ne(),bt())})(Ag,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})})($i)),$i.exports}var zi={exports:{}},Sg=zi.exports,G0;function Dg(){return G0||(G0=1,(function(t,r){(function(e,n,i){t.exports=n(Ne(),bt())})(Sg,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})})(zi)),zi.exports}var qi={exports:{}},_g=qi.exports,K0;function kg(){return K0||(K0=1,(function(t,r){(function(e,n,i){t.exports=n(Ne(),bt())})(_g,function(e){return e.pad.NoPadding={pad:function(){},unpad:function(){}},e.pad.NoPadding})})(qi)),qi.exports}var Hi={exports:{}},Rg=Hi.exports,X0;function Ig(){return X0||(X0=1,(function(t,r){(function(e,n,i){t.exports=n(Ne(),bt())})(Rg,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})})(Hi)),Hi.exports}var Vi={exports:{}},Tg=Vi.exports,Y0;function Pg(){return Y0||(Y0=1,(function(t,r){(function(e,n,i){t.exports=n(Ne(),Kr(),Xr(),Lr(),bt())})(Tg,function(e){return(function(){var n=e,i=n.lib,a=i.BlockCipher,o=n.algo,s=[],c=[],u=[],l=[],x=[],d=[],m=[],v=[],p=[],f=[];(function(){for(var C=[],b=0;b<256;b++)b<128?C[b]=b<<1:C[b]=b<<1^283;for(var F=0,E=0,b=0;b<256;b++){var B=E^E<<1^E<<2^E<<3^E<<4;B=B>>>8^B&255^99,s[F]=B,c[B]=F;var w=C[F],A=C[w],g=C[A],S=C[B]*257^B*16843008;u[F]=S<<24|S>>>8,l[F]=S<<16|S>>>16,x[F]=S<<8|S>>>24,d[F]=S;var S=g*16843009^A*65537^w*257^F*16843008;m[B]=S<<24|S>>>8,v[B]=S<<16|S>>>16,p[B]=S<<8|S>>>24,f[B]=S,F?(F=w^C[C[C[g^w]]],E^=C[C[E]]):F=E=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,F=b.words,E=b.sigBytes/4,B=this._nRounds=E+6,w=(B+1)*4,A=this._keySchedule=[],g=0;g<w;g++)g<E?A[g]=F[g]:(C=A[g-1],g%E?E>6&&g%E==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/E|0]<<24),A[g]=A[g-E]^C);for(var S=this._invKeySchedule=[],D=0;D<w;D++){var g=w-D;if(D%4)var C=A[g];else var C=A[g-4];D<4||g<=4?S[D]=C:S[D]=m[s[C>>>24]]^v[s[C>>>16&255]]^p[s[C>>>8&255]]^f[s[C&255]]}}},encryptBlock:function(C,b){this._doCryptBlock(C,b,this._keySchedule,u,l,x,d,s)},decryptBlock:function(C,b){var F=C[b+1];C[b+1]=C[b+3],C[b+3]=F,this._doCryptBlock(C,b,this._invKeySchedule,m,v,p,f,c);var F=C[b+1];C[b+1]=C[b+3],C[b+3]=F},_doCryptBlock:function(C,b,F,E,B,w,A,g){for(var S=this._nRounds,D=C[b]^F[0],R=C[b+1]^F[1],P=C[b+2]^F[2],z=C[b+3]^F[3],$=4,j=1;j<S;j++){var q=E[D>>>24]^B[R>>>16&255]^w[P>>>8&255]^A[z&255]^F[$++],Y=E[R>>>24]^B[P>>>16&255]^w[z>>>8&255]^A[D&255]^F[$++],U=E[P>>>24]^B[z>>>16&255]^w[D>>>8&255]^A[R&255]^F[$++],M=E[z>>>24]^B[D>>>16&255]^w[R>>>8&255]^A[P&255]^F[$++];D=q,R=Y,P=U,z=M}var q=(g[D>>>24]<<24|g[R>>>16&255]<<16|g[P>>>8&255]<<8|g[z&255])^F[$++],Y=(g[R>>>24]<<24|g[P>>>16&255]<<16|g[z>>>8&255]<<8|g[D&255])^F[$++],U=(g[P>>>24]<<24|g[z>>>16&255]<<16|g[D>>>8&255]<<8|g[R&255])^F[$++],M=(g[z>>>24]<<24|g[D>>>16&255]<<16|g[R>>>8&255]<<8|g[P&255])^F[$++];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})})(Vi)),Vi.exports}var ji={exports:{}},Ng=ji.exports,Q0;function Og(){return Q0||(Q0=1,(function(t,r){(function(e,n,i){t.exports=n(Ne(),Kr(),Xr(),Lr(),bt())})(Ng,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}],d=[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 F=c[b]-1;C[b]=h[F>>>5]>>>31-F%32&1}for(var E=this._subKeys=[],B=0;B<16;B++){for(var w=E[B]=[],A=l[B],b=0;b<24;b++)w[b/6|0]|=C[(u[b]-1+A)%28]<<31-b%6,w[4+(b/6|0)]|=C[28+(u[b+24]-1+A)%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]=E[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 F=C[b],E=this._lBlock,B=this._rBlock,w=0,A=0;A<8;A++)w|=x[A][((B^F[A])&d[A])>>>0];this._lBlock=B,this._rBlock=E^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 f=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),F=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(F))},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(f)})(),e.TripleDES})})(ji)),ji.exports}var Ui={exports:{}},Mg=Ui.exports,Z0;function Lg(){return Z0||(Z0=1,(function(t,r){(function(e,n,i){t.exports=n(Ne(),Kr(),Xr(),Lr(),bt())})(Mg,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,d=l.sigBytes,m=this._S=[],v=0;v<256;v++)m[v]=v;for(var v=0,p=0;v<256;v++){var f=v%d,y=x[f>>>2]>>>24-f%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,d=this._j,m=0,v=0;v<4;v++){x=(x+1)%256,d=(d+l[x])%256;var p=l[x];l[x]=l[d],l[d]=p,m|=l[(l[x]+l[d])%256]<<24-v*8}return this._i=x,this._j=d,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})})(Ui)),Ui.exports}var Wi={exports:{}},$g=Wi.exports,J0;function zg(){return J0||(J0=1,(function(t,r){(function(e,n,i){t.exports=n(Ne(),Kr(),Xr(),Lr(),bt())})($g,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 d=this._key.words,m=this.cfg.iv,v=0;v<4;v++)d[v]=(d[v]<<8|d[v]>>>24)&16711935|(d[v]<<24|d[v]>>>8)&4278255360;var p=this._X=[d[0],d[3]<<16|d[2]>>>16,d[1],d[0]<<16|d[3]>>>16,d[2],d[1]<<16|d[0]>>>16,d[3],d[2]<<16|d[1]>>>16],f=this._C=[d[2]<<16|d[2]>>>16,d[0]&4294901760|d[1]&65535,d[3]<<16|d[3]>>>16,d[1]&4294901760|d[2]&65535,d[0]<<16|d[0]>>>16,d[2]&4294901760|d[3]&65535,d[1]<<16|d[1]>>>16,d[3]&4294901760|d[0]&65535];this._b=0;for(var v=0;v<4;v++)x.call(this);for(var v=0;v<8;v++)f[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,F=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360,E=b>>>16|F&4294901760,B=F<<16|b&65535;f[0]^=b,f[1]^=E,f[2]^=F,f[3]^=B,f[4]^=b,f[5]^=E,f[6]^=F,f[7]^=B;for(var v=0;v<4;v++)x.call(this)}},_doProcessBlock:function(d,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,d[m+p]^=s[p]},blockSize:128/32,ivSize:64/32});function x(){for(var d=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=d[v]+m[v],f=p&65535,y=p>>>16,h=((f*f>>>17)+f*y>>>15)+y*y,C=((p&4294901760)*p|0)+((p&65535)*p|0);u[v]=h^C}d[0]=u[0]+(u[7]<<16|u[7]>>>16)+(u[6]<<16|u[6]>>>16)|0,d[1]=u[1]+(u[0]<<8|u[0]>>>24)+u[7]|0,d[2]=u[2]+(u[1]<<16|u[1]>>>16)+(u[0]<<16|u[0]>>>16)|0,d[3]=u[3]+(u[2]<<8|u[2]>>>24)+u[1]|0,d[4]=u[4]+(u[3]<<16|u[3]>>>16)+(u[2]<<16|u[2]>>>16)|0,d[5]=u[5]+(u[4]<<8|u[4]>>>24)+u[3]|0,d[6]=u[6]+(u[5]<<16|u[5]>>>16)+(u[4]<<16|u[4]>>>16)|0,d[7]=u[7]+(u[6]<<8|u[6]>>>24)+u[5]|0}n.Rabbit=a._createHelper(l)})(),e.Rabbit})})(Wi)),Wi.exports}var Gi={exports:{}},qg=Gi.exports,eu;function Hg(){return eu||(eu=1,(function(t,r){(function(e,n,i){t.exports=n(Ne(),Kr(),Xr(),Lr(),bt())})(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 d=this._key.words,m=this.cfg.iv,v=this._X=[d[0],d[3]<<16|d[2]>>>16,d[1],d[0]<<16|d[3]>>>16,d[2],d[1]<<16|d[0]>>>16,d[3],d[2]<<16|d[1]>>>16],p=this._C=[d[2]<<16|d[2]>>>16,d[0]&4294901760|d[1]&65535,d[3]<<16|d[3]>>>16,d[1]&4294901760|d[2]&65535,d[0]<<16|d[0]>>>16,d[2]&4294901760|d[3]&65535,d[1]<<16|d[1]>>>16,d[3]&4294901760|d[0]&65535];this._b=0;for(var f=0;f<4;f++)x.call(this);for(var f=0;f<8;f++)p[f]^=v[f+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,F=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360,E=b>>>16|F&4294901760,B=F<<16|b&65535;p[0]^=b,p[1]^=E,p[2]^=F,p[3]^=B,p[4]^=b,p[5]^=E,p[6]^=F,p[7]^=B;for(var f=0;f<4;f++)x.call(this)}},_doProcessBlock:function(d,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,d[m+p]^=s[p]},blockSize:128/32,ivSize:64/32});function x(){for(var d=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=d[v]+m[v],f=p&65535,y=p>>>16,h=((f*f>>>17)+f*y>>>15)+y*y,C=((p&4294901760)*p|0)+((p&65535)*p|0);u[v]=h^C}d[0]=u[0]+(u[7]<<16|u[7]>>>16)+(u[6]<<16|u[6]>>>16)|0,d[1]=u[1]+(u[0]<<8|u[0]>>>24)+u[7]|0,d[2]=u[2]+(u[1]<<16|u[1]>>>16)+(u[0]<<16|u[0]>>>16)|0,d[3]=u[3]+(u[2]<<8|u[2]>>>24)+u[1]|0,d[4]=u[4]+(u[3]<<16|u[3]>>>16)+(u[2]<<16|u[2]>>>16)|0,d[5]=u[5]+(u[4]<<8|u[4]>>>24)+u[3]|0,d[6]=u[6]+(u[5]<<16|u[5]>>>16)+(u[4]<<16|u[4]>>>16)|0,d[7]=u[7]+(u[6]<<8|u[6]>>>24)+u[5]|0}n.RabbitLegacy=a._createHelper(l)})(),e.RabbitLegacy})})(Gi)),Gi.exports}var Ki={exports:{}},Vg=Ki.exports,tu;function jg(){return tu||(tu=1,(function(t,r){(function(e,n,i){t.exports=n(Ne(),Kr(),Xr(),Lr(),bt())})(Vg,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(f,y){let h=y>>24&255,C=y>>16&255,b=y>>8&255,F=y&255,E=f.sbox[0][h]+f.sbox[1][C];return E=E^f.sbox[2][b],E=E+f.sbox[3][F],E}function d(f,y,h){let C=y,b=h,F;for(let E=0;E<s;++E)C=C^f.pbox[E],b=x(f,C)^b,F=C,C=b,b=F;return F=C,C=b,b=F,b=b^f.pbox[s],C=C^f.pbox[s+1],{left:C,right:b}}function m(f,y,h){let C=y,b=h,F;for(let E=s+1;E>1;--E)C=C^f.pbox[E],b=x(f,C)^b,F=C,C=b,b=F;return F=C,C=b,b=F,b=b^f.pbox[1],C=C^f.pbox[0],{left:C,right:b}}function v(f,y,h){for(let B=0;B<4;B++){f.sbox[B]=[];for(let w=0;w<256;w++)f.sbox[B][w]=u[B][w]}let C=0;for(let B=0;B<s+2;B++)f.pbox[B]=c[B]^y[C],C++,C>=h&&(C=0);let b=0,F=0,E=0;for(let B=0;B<s+2;B+=2)E=d(f,b,F),b=E.left,F=E.right,f.pbox[B]=b,f.pbox[B+1]=F;for(let B=0;B<4;B++)for(let w=0;w<256;w+=2)E=d(f,b,F),b=E.left,F=E.right,f.sbox[B][w]=b,f.sbox[B][w+1]=F;return!0}var p=o.Blowfish=a.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var f=this._keyPriorReset=this._key,y=f.words,h=f.sigBytes/4;v(l,y,h)}},encryptBlock:function(f,y){var h=d(l,f[y],f[y+1]);f[y]=h.left,f[y+1]=h.right},decryptBlock:function(f,y){var h=m(l,f[y],f[y+1]);f[y]=h.left,f[y+1]=h.right},blockSize:64/32,keySize:128/32,ivSize:64/32});n.Blowfish=a._createHelper(p)})(),e.Blowfish})})(Ki)),Ki.exports}var Ug=pi.exports,ru;function Wg(){return ru||(ru=1,(function(t,r){(function(e,n,i){t.exports=n(Ne(),ga(),H1(),j1(),Kr(),G1(),Xr(),Ul(),Xo(),Z1(),Wl(),tg(),ng(),ag(),Yo(),ug(),Lr(),bt(),dg(),hg(),xg(),mg(),Cg(),Fg(),wg(),Bg(),Dg(),kg(),Ig(),Pg(),Og(),Lg(),zg(),Hg(),jg())})(Ug,function(e){return e})})(pi)),pi.exports}var Gg=Wg();const Gl=fu(Gg);Gl.enc.Utf8.parse("1234567890123456");Gl.enc.Utf8.parse("1234567890123456");const Qo={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!"}},Kg={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."}},Xg={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"}},Yg={zh:Qo,en:Kg,ja:Xg};function Qg(t,r){const e=Yg[t]??Qo;return r?{...e,...r}:e}const Kl=ye.createContext({locale:"zh",messages:Qo});function Zm(){return ye.useContext(Kl)}function Jm({locale:t,messages:r,children:e}){const n=ye.useMemo(()=>({locale:t,messages:Qg(t,r)}),[t,r]);return ye.createElement(Kl.Provider,{value:n},e)}const ia={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"}},Zg={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"}},Jg={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"}},em={zh:ia,en:Zg,ja:Jg};function tm(t,r){const e=em[t]??ia;return r?{...e,...r}:e}function Xl(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 Yl=ye.createContext({locale:"zh",messages:ia,getMessage:t=>Xl(ia,t)});function rm(){return ye.useContext(Yl)}function nm({locale:t,messages:r,children:e}){const n=ye.useMemo(()=>{const i=tm(t,r);return{locale:t,messages:i,getMessage:a=>Xl(i,a)}},[t,r]);return ye.createElement(Yl.Provider,{value:n},e)}function nu(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 Va=[{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 iu(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 im=ht.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
|
+
`,am=ht.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
|
+
`,om=ht.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 sm({item:t,onRemove:r}){return ne(im,{children:[T(am,{children:T(df,{size:18,strokeWidth:2})}),ne("div",{style:{minWidth:0,flex:1},children:[T("div",{style:{fontSize:14,fontWeight:600,color:"#111827"},children:t.label}),T("div",{style:{fontSize:12,color:"#94a3b8",marginTop:2},children:t.subLabel??"\u6B64\u5904\u662F\u90E8\u95E8\u540D\u79F0"})]}),T(om,{type:"button","aria-label":"\u79FB\u9664",onClick:r,children:T(To,{size:14,strokeWidth:2})})]})}function um(t){const{styles:r,eventsEmit:e,CustomComponents:n}=t,{getMessage:i}=rm(),[a,o]=le("list"),[s,c]=le("create"),[u,l]=le(null),x=Ue(null),[d,m]=le("light"),[v,p]=le(""),[f,y]=le(""),[h,C]=le(""),[b,F]=le(!0),[E,B]=le(!1),[w,A]=le(!1),[g,S]=le(null),[D,R]=le([]),P=jt(Q=>T(sm,{item:Q.item,onRemove:Q.onRemove}),[]),z=uu(),$=Me(()=>{var Z;const Q=Yi(Yi({theme:sa,mode:"light"},z||{}),r||{}),K=((Z=Q.theme)==null?void 0:Z.space)||{},ae=K.dashboardHeaderHeight,ue=ae==="auto"||ae===void 0?{...K,dashboardHeaderHeight:"38px"}:K;return{...Q,mode:d,theme:{...Q.theme,space:ue}}},[z,r,d]),[j,q]=le(()=>[{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=Me(()=>{const Q=i("table.enabledOn"),K=i("table.enabledOff"),ae=i("table.actionEdit"),ue=i("table.actionDelete");return j.map(Z=>({...Z,data:Array.isArray(Z==null?void 0:Z.data)?Z.data.map(de=>{if((de==null?void 0:de.columnId)==="enabled")return{...de,value:(de==null?void 0:de.value)==="OFF"?K:Q};if((de==null?void 0:de.columnId)==="actions"&&(de==null?void 0:de.type)==="action"){if((de==null?void 0:de.value)==="delete")return{...de,label:ue};if((de==null?void 0:de.value)==="edit")return{...de,label:ae}}return de}):Z==null?void 0:Z.data}))},[i,j]),U=Me(()=>u?j.find(Q=>String(Q==null?void 0:Q.id)===String(u))??null:null,[u,j]),M=jt(()=>{o("list"),l(null),x.current=null,e==null||e("reviewsetting_nav_back_list",{},null)},[e]),N=jt(()=>{M()},[M]),O=jt(async()=>{var K;const Q=x.current;if(!Q){Ct.warning("\u8868\u5355\u5C1A\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");return}try{const ae=await((K=Q.getAllData)==null?void 0:K.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),Ct.error("\u8868\u5355\u6821\u9A8C\u672A\u901A\u8FC7\uFF0C\u8BF7\u68C0\u67E5\u540E\u91CD\u8BD5")}},[e]),I=jt(()=>{c("create"),l(null),o("form"),x.current=null,e==null||e("reviewsetting_nav_enter_create",{},null)},[e]),V=jt(Q=>{c("edit"),l(Q),o("form"),x.current=null,e==null||e("reviewsetting_nav_enter_edit",{id:Q},null)},[e]),X=jt(()=>{m(Q=>Q==="light"?"dark":"light")},[]),ee=Me(()=>{const Q=v.trim().toLowerCase(),K=f.trim().toLowerCase(),ae=h.trim().toLowerCase();if(!Q&&!K&&!ae)return Y;const ue=(Z,de)=>{const Se=Array.isArray(Z==null?void 0:Z.data)?Z.data.find(Re=>(Re==null?void 0:Re.columnId)===de&&typeof(Re==null?void 0:Re.value)=="string"):null;return String((Se==null?void 0:Se.value)??"")};return Y.filter(Z=>{const de=ue(Z,"enterpriseName").toLowerCase(),Se=ue(Z,"firstReviewers").toLowerCase(),Re=ue(Z,"secondReviewers").toLowerCase(),Ve=Q?de.includes(Q):!0,Ce=K?Se.includes(K):!0,be=ae?Re.includes(ae):!0;return Ve&&Ce&&be})},[Y,v,f,h]),te=Me(()=>({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:ja,componentProps:{placeholder:i("toolbar.searchEnterprisePlaceholder"),value:v,size:"md"}},{type:"customized",key:"search_first_reviewers",position:"right",component:ja,componentProps:{placeholder:i("toolbar.searchFirstReviewersPlaceholder"),value:f,size:"md"}},{type:"customized",key:"search_second_reviewers",position:"right",component:ja,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,K,ae)=>{if(Q==="toolbar_create_review"){I(),e==null||e(`reviewsetting_${Q}`,K,ae);return}if(Q==="toolbar_theme_toggle"&&X(),Q==="toolbar_search_enterprise_change"&&p(String((K==null?void 0:K.value)??"")),Q==="toolbar_search_first_reviewers_change"&&y(String((K==null?void 0:K.value)??"")),Q==="toolbar_search_second_reviewers_change"&&C(String((K==null?void 0:K.value)??"")),Q==="table_action_delete"){const ue=String((K==null?void 0:K.id)??"");Xi.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;ue&&(q(de=>de.filter(Se=>String(Se==null?void 0:Se.id)!==ue)),(Z=ae==null?void 0:ae.removeItem)==null||Z.call(ae,ue),e==null||e("reviewsetting_delete_confirmed",{id:ue},ae))},onCancel:()=>{ue&&(e==null||e("reviewsetting_delete_cancelled",{id:ue},ae))}}),e==null||e(`reviewsetting_${Q}`,K,ae);return}if(Q==="table_action_edit"){const ue=String((K==null?void 0:K.id)??"");ue&&V(ue),e==null||e(`reviewsetting_${Q}`,K,ae);return}e==null||e(`reviewsetting_${Q}`,K,ae)},styles:$,CustomComponents:n}),[n,e,ee,i,I,V,X,$,v,f,h]),ie=jt(Q=>{const K={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:nu(Q.firstReviewers),secondReviewers:nu(Q.secondReviewers)};if(s==="create"){const ue=`rs-${Date.now()}`,Z={id:ue,data:[{columnId:"enterpriseName",value:K.enterpriseName,type:"text"},{columnId:"knowledgeType",value:K.knowledgeType,type:"tag"},{columnId:"reviewScope",value:K.reviewScope.join("\u3001"),type:"text"},{columnId:"firstReviewers",value:K.firstReviewers.join("\u3001"),type:"text"},{columnId:"secondReviewers",value:K.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:K.enabled?"ON":"OFF",type:"text"},{columnId:"actions",value:"edit",type:"action"},{columnId:"actions",value:"delete",type:"action"}]};q(de=>[Z,...de]),e==null||e("reviewsetting_form_created",{id:ue,payload:K},null),M();return}const ae=u;ae&&(q(ue=>ue.map(Z=>String(Z==null?void 0:Z.id)!==String(ae)?Z:{...Z,data:[{columnId:"enterpriseName",value:K.enterpriseName,type:"text"},{columnId:"knowledgeType",value:K.knowledgeType,type:"tag"},{columnId:"reviewScope",value:K.reviewScope.join("\u3001"),type:"text"},{columnId:"firstReviewers",value:K.firstReviewers.join("\u3001"),type:"text"},{columnId:"secondReviewers",value:K.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:K.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:K},null),M())},[u,e,s,M]),se=Me(()=>{const Q=ue=>{var de;const Z=(de=U==null?void 0:U.data)==null?void 0:de.find(Se=>(Se==null?void 0:Se.columnId)===ue);return Z==null?void 0:Z.value},K={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"?iu(String(Q("firstReviewers")??"").split("\u3001").filter(Boolean)):[],secondReviewers:s==="edit"?iu(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:K}],eventsEmit:(ue,Z,de)=>{if(ue==="form:ready"&&(Z!=null&&Z.formRef)&&(x.current=Z.formRef),ue==="form:submit"&&ie((Z==null?void 0:Z.values)??{}),ue==="multiTagSelector:add"){const Se=Z==null?void 0:Z.fieldName,Re=x.current,Ve=Re==null?void 0:Re.form;if(!Se||!(Ve!=null&&Ve.getFieldValue)){e==null||e(`reviewsetting_form_${ue}`,Z,de);return}const Ce=Ve.getFieldValue(Se),Pe=(Array.isArray(Ce)?Ce:[]).map(Fe=>({id:String((Fe==null?void 0:Fe.id)||(Fe==null?void 0:Fe.label)),label:String((Fe==null?void 0:Fe.label)||(Fe==null?void 0:Fe.id)||""),type:"user",subLabel:String((Fe==null?void 0:Fe.subLabel)||"\u6B64\u5904\u662F\u90E8\u95E8\u540D\u79F0")}));S(Se),R(Pe),A(!0)}e==null||e(`reviewsetting_form_${ue}`,Z,de)},styles:$,CustomComponents:n,contentPadding:"0px"}},[n,U,u,e,s,ie,$,P]),ke=jt(()=>{const Q=g,K=x.current,ae=K==null?void 0:K.form;if(!Q||!(ae!=null&&ae.setFieldValue)){A(!1);return}const ue=D.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,ue),A(!1),S(null)},[g,D]);return T(bc,{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"?ne(lm,{className:"reviewsetting-wrapper",children:[T("div",{className:"reviewsetting-tips-container px-[18px]",children:ne(cm,{className:"reviewsetting-tips",children:[ne(fm,{className:"reviewsetting-tips-left",children:[T(dm,{className:"reviewsetting-tips-title",children:i("tips.title")}),ne(pm,{className:"reviewsetting-tips-desc",children:[T("span",{className:"reviewsetting-tips-info-icon",children:"i"}),T("span",{className:"reviewsetting-tips-desc-text",children:i("tips.description")})]})]}),ne(hm,{className:"reviewsetting-tips-right",children:[ne(au,{className:"reviewsetting-switch-item",children:[T("span",{className:"reviewsetting-switch-label",children:i("tips.uploadReviewToggle")}),ne("label",{className:"reviewsetting-switch",children:[T("input",{type:"checkbox",checked:b,onChange:Q=>{const K=Q.target.checked;F(K),e==null||e("reviewsetting_tips_upload_review_toggle_changed",{checked:K},null)}}),T("span",{className:"reviewsetting-switch-slider"})]})]}),ne(au,{className:"reviewsetting-switch-item",children:[T("span",{className:"reviewsetting-switch-label",children:i("tips.deleteReviewToggle")}),ne("label",{className:"reviewsetting-switch",children:[T("input",{type:"checkbox",checked:E,onChange:Q=>{const K=Q.target.checked;B(K),e==null||e("reviewsetting_tips_delete_review_toggle_changed",{checked:K},null)}}),T("span",{className:"reviewsetting-switch-slider"})]})]})]})]})}),T(vm,{className:"reviewsetting-table-wrap",children:T(as,{...te},"review-setting-table")})]}):ne(xm,{className:"reviewsetting-form-wrap",children:[T(gm,{className:"reviewsetting-form-centered",children:T(as,{...se},`review-setting-form-${s}-${u??"new"}`)}),T(mm,{className:"reviewsetting-form-footer-bar",children:ne(ym,{className:"reviewsetting-form-footer-inner",children:[T(vr,{onClick:N,children:"\u53D6\u6D88"}),T(vr,{type:"primary",onClick:O,children:"\u786E\u8BA4"})]})}),T(Xi,{title:"\u6DFB\u52A0\u7528\u6237",open:w,width:700,onCancel:()=>{A(!1),S(null)},footer:[T(vr,{onClick:()=>{A(!1),S(null)},children:"\u53D6\u6D88"},"cancel"),T(vr,{type:"primary",onClick:ke,children:"\u786E\u5B9A"},"ok")],children:T(Fc,{treeData:Va,value:D,onChange:Q=>R(Q.filter(K=>K.type==="user")),maxCount:100,searchMode:"auto",leftPaneMode:"breadcrumb",onSearch:async Q=>{const K=Q.trim().toLowerCase();return K?Va.flatMap(ue=>ue.children||[]).filter(ue=>ue.type==="user"&&String(ue.label).toLowerCase().includes(K)):Va},height:"360px"})})]})})}function e2({locale:t="zh",messages:r,...e}){return T(nm,{locale:t,messages:r,children:T(um,{...e})})}const lm=ht.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=ht.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
|
+
`,fm=ht.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
|
+
`,dm=ht.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
|
+
`,pm=ht.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
|
+
`,hm=ht.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
|
+
`,au=ht.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
|
+
`,vm=ht.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
|
+
`,xm=ht.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
|
+
`,gm=ht.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
|
+
`,mm=ht.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
|
+
`,ym=ht.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
|
+
`;ht.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
|
+
`;ht.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
|
+
`;ht.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
|
+
`;ht.div.attrs({className:"reviewsetting-form-body"})`
|
|
577
|
+
flex: 1 1 0;
|
|
578
|
+
min-height: 0;
|
|
579
|
+
overflow-y: auto;
|
|
580
|
+
padding-bottom: 12px;
|
|
581
|
+
`;ht.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 ja=({placeholder:t,value:r,onAction:e,size:n="md"})=>ne("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:[T("span",{style:{color:"#94a3b8",fontSize:14,lineHeight:"14px"},children:"\u2315"}),T("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"}})]});export{jl as D,Jm as L,e2 as R,Kl as a,nm as b,rm as c,Qg as g,Zm as u,Qm as w};
|