From 364471a0860fbbe5622abd1598bccb1b67cc173b Mon Sep 17 00:00:00 2001 From: liu <2302563948@qq.com> Date: Sat, 5 Sep 2026 14:05:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=89=8D=E7=AB=AF=E6=89=93=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/assets/goods-Cnky5f-7.js | 1 - public/assets/goods-NJpnvO3k.js | 1 + .../{index-B3rYtk3Q.js => index-wuX9SPpH.js} | 4 +- public/index.html | 2 +- web/pages/product/goods.tsx | 43 ++++++++++--------- 5 files changed, 26 insertions(+), 25 deletions(-) delete mode 100644 public/assets/goods-Cnky5f-7.js create mode 100644 public/assets/goods-NJpnvO3k.js rename public/assets/{index-B3rYtk3Q.js => index-wuX9SPpH.js} (99%) diff --git a/public/assets/goods-Cnky5f-7.js b/public/assets/goods-Cnky5f-7.js deleted file mode 100644 index 53e2567..0000000 --- a/public/assets/goods-Cnky5f-7.js +++ /dev/null @@ -1 +0,0 @@ -import{i as e}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as t,t as n}from"./jsx-runtime-CRBytmvs.js";import{t as r}from"./typography-DRFhazK9.js";import{L as i,V as a,c as o,y as s}from"./lodash-DzOfPy0f.js";import{t as c}from"./alert-DuXzwpQC.js";import{n as ee,t as te}from"./table-BXi9q3AE.js";import{t as l}from"./space-Cu4QVMgQ.js";import{t as u}from"./button-BILozH6U.js";import{l as ne}from"./XinForm-BPDYdeax.js";import{t as re}from"./card-DU2T2-YW.js";import{t as ie}from"./modal-g8Q5gNCx.js";import{t as ae}from"./image-CTRBNpBE.js";import{t as oe}from"./input-CHcsaDtX.js";import{r as d}from"./PictureOutlined-CB8Pr7jP.js";import{t as f}from"./tag-DBV1bHre.js";import{t as se}from"./DeleteOutlined-DwOvobSM.js";import{t as ce}from"./upload-oMV5VJeJ.js";import{t as le}from"./DownloadOutlined-DJY9Mu8c.js";import{t as p}from"./UploadOutlined-NadwXvrl.js";import{t as ue}from"./XinTable-DOLiJ5rL.js";import{t as m}from"./AuthButton-DvrpreK4.js";import{t as h}from"./iProduct-l9WpLyUD.js";import{a as de,i as fe,n as pe,r as me,s as he,t as ge}from"./goods-DPA1smJU.js";import{n as g}from"./category-MmrJkdbs.js";import{t as _e}from"./supplier-BstAcwv7.js";var _=e(t(),1),v=n(),{Title:ve,Text:y}=r,b=e=>Math.round(e*100)/100,x=e=>e.map(e=>({...e,disabled:!!e.children?.length,children:e.children?.length?x(e.children):e.children})),S=e=>e.map(e=>({...e,selectable:!e.children?.length,children:e.children?.length?S(e.children):e.children})),C=()=>{let[e,t]=(0,_.useState)([]),[n,r]=(0,_.useState)([]),C=(0,_.useMemo)(()=>x(n),[n]),ye=(0,_.useMemo)(()=>S(n),[n]),[w,T]=(0,_.useState)(void 0),E=(0,_.useRef)(null);(0,_.useEffect)(()=>{O([]),E.current?.reset()},[w]);let[D,O]=(0,_.useState)([]),[k,A]=(0,_.useState)(!1),j=()=>{window.$modal?.confirm({title:`确定要删除选中的 ${D.length} 件商品吗?`,okText:`删除`,okButtonProps:{danger:!0},cancelText:`取消`,onOk:async()=>{A(!0);try{await ge(D),d.success(`批量删除成功`),O([]),await E.current?.reload()}finally{A(!1)}}})},[M,N]=(0,_.useState)(!1),[P,F]=(0,_.useState)(!1),[be,I]=(0,_.useState)(!1),[xe,L]=(0,_.useState)([]),[R,z]=(0,_.useState)(1),[B,V]=(0,_.useState)(20),[Se,Ce]=(0,_.useState)(0),[H,we]=(0,_.useState)([]),[U,Te]=(0,_.useState)(``),[W,Ee]=(0,_.useState)(void 0),G=(0,_.useRef)({}),[De,K]=(0,_.useState)(!1),[Oe,q]=(0,_.useState)(!1),[J,Y]=(0,_.useState)(null),[ke,X]=(0,_.useState)(!1),[Z,Q]=(0,_.useState)([]),Ae=async()=>{K(!0);try{await fe(w?{category_id:w}:{})}finally{K(!1)}},je=async()=>{if(J){X(!0),Q([]);try{await he(J),q(!1),Y(null),E.current?.reset()}catch(e){let t=e?.data?.data?.errors;Array.isArray(t)&&Q(t)}finally{X(!1)}}};(0,_.useEffect)(()=>{_e().then(e=>t(e.data.data??[])),g().then(e=>r(e.data.data??[]))},[]);let $=async(e=U,t=W,n=R,r=B)=>{F(!0);try{let i=await de({keyword:e||void 0,category_id:t,page:n,pageSize:r}),a=i.data.data?.rows??[],o=i.data.data?.levels??[],s=a.map(e=>{let t=G.current[e.id];if(t===void 0)return e;let n={...e,cost_price:t},r=Number(t??0);return o.forEach(e=>{e.id!=null&&(n[`price_${e.id}`]=r>0?b(r*(1+Number(e.percent??0)/100)):null)}),n});L(s),Ce(i.data.data?.total??0),we(o)}finally{F(!1)}},Me=()=>{N(!0),z(1),V(20),$(``,void 0,1,20)},Ne=(e,t)=>{G.current[e]=t,L(n=>n.map(n=>{if(n.id!==e)return n;let r={...n,cost_price:t},i=Number(t??0);return H.forEach(e=>{e.id!=null&&(r[`price_${e.id}`]=i>0?b(i*(1+Number(e.percent??0)/100)):null)}),r}))},Pe=async()=>{let e=[];if(Object.entries(G.current).forEach(([t,n])=>{n!=null&&e.push({product_id:Number(t),cost_price:n})}),e.length===0){d.info(`没有需要保存的价格调整`);return}I(!0);try{await pe(e),d.success(`已更新 ${e.length} 件商品成本价,各等级售价已按上浮比例联动,受影响门店将收到通知`),G.current={},await $()}finally{I(!1)}},Fe=[{title:`商品`,dataIndex:`name`,fixed:`left`,width:160,render:(e,t)=>(0,v.jsxs)(`div`,{children:[(0,v.jsx)(`div`,{className:`font-medium`,children:e}),(0,v.jsxs)(y,{type:`secondary`,className:`text-xs`,children:[t.spec,t.unit?` / ${t.unit}`:``]})]})},{title:`成本价`,key:`cost_price`,fixed:`left`,width:130,render:(e,t)=>(0,v.jsx)(a,{size:`small`,min:0,precision:2,prefix:`¥`,value:t.cost_price,onChange:e=>Ne(t.id,e),className:`w-32`})},...H.map(e=>({title:e.name,key:`price_${e.id}`,width:150,render:(t,n)=>{let r=n[`price_${e.id}`];return(0,v.jsxs)(`div`,{children:[(0,v.jsx)(`div`,{children:r==null?(0,v.jsx)(y,{type:`secondary`,children:`未设成本价`}):`¥${r}`}),(0,v.jsxs)(`div`,{className:`text-xs text-gray-400`,children:[`成本上浮 `,Number(e.percent??0),`%`]})]})}}))],Ie={api:`/product/goods`,columns:[{title:`ID`,dataIndex:`id`,hideInForm:!0,hideInSearch:!0,width:70,align:`center`},{title:`商品图片`,dataIndex:`image_ids`,valueType:`image`,fieldProps:{action:`/product/goods/upload`,maxWidth:3e3,maxHeight:3e3,maxSize:10,mode:`multiple`,maxCount:5,changeType:`id`},render:(e,t)=>!t.images_arr||t.images_arr?.length<=0?`-`:(0,v.jsx)(l,{wrap:!1,children:t.images_arr.map(e=>(0,v.jsx)(ae,{src:e.preview_url,width:60,height:60,style:{objectFit:`cover`,borderRadius:4}},e.id))}),align:`center`,hideInSearch:!0,colProps:{span:24}},{title:`商品名称`,dataIndex:`name`,valueType:`text`,colProps:{span:24},required:!0,render:(e,t)=>(0,v.jsxs)(`div`,{children:[(0,v.jsx)(`div`,{className:`mb-1.5`,children:t.name}),(0,v.jsx)(`div`,{className:`text-[#999] text-[12px]`,children:t.remark})]}),rules:[{required:!0,message:`请输入商品名称`}]},{title:`商品描述`,dataIndex:`remark`,valueType:`text`,hideInSearch:!0,hideInTable:!0,colProps:{span:24}},{title:`成本价`,dataIndex:`cost_price`,valueType:`digit`,hideInSearch:!0,align:`center`,tooltip:`各等级售价 = 成本价 × (100 + 等级上浮比例) / 100`,fieldProps:{min:0,precision:2,prefix:`¥`},render:(e,t)=>Number(t.cost_price??0)>0?`¥${t.cost_price}`:(0,v.jsx)(y,{type:`secondary`,children:`未设置`})},{title:`规格/包规`,dataIndex:`spec`,valueType:`text`,hideInSearch:!0,align:`center`},{title:`单位`,dataIndex:`unit`,valueType:`text`,hideInSearch:!0,initialValue:`斤`,align:`center`},{title:`单价单位`,dataIndex:`price_unit`,valueType:`text`,hideInTable:!0,hideInSearch:!0,initialValue:`元/斤`,fieldProps:{placeholder:`如:元/斤、元/箱`,maxLength:20}},{title:`排序`,dataIndex:`sort`,valueType:`digit`,hideInSearch:!0,fieldProps:{min:0},align:`center`},{title:`分类`,dataIndex:`category_id`,valueType:`treeSelect`,required:!0,align:`center`,rules:[{required:!0,message:`请选择分类`}],fieldProps:{treeData:C,fieldNames:{label:`name`,value:`id`,children:`children`},treeDefaultExpandAll:!0,showSearch:!0,treeNodeFilterProp:`name`,placeholder:`选择末级分类`},hideInSearch:!0,render:(e,t)=>t.category?(0,v.jsx)(f,{color:`cyan`,children:t.category.name}):`-`},{title:`供应商`,dataIndex:`supplier_id`,valueType:`select`,hideInSearch:!0,align:`center`,fieldProps:{options:e.map(e=>({label:e.name,value:e.id})),showSearch:!0,optionFilterProp:`label`,allowClear:!0,placeholder:`默认供应商(可选)`},render:(e,t)=>t.supplier?.name??`-`},{title:`市场`,dataIndex:`market`,valueType:`text`,align:`center`,fieldProps:{placeholder:`市场名称,如:新发地`,maxLength:50,allowClear:!0},render:(e,t)=>t.market||`-`},{title:`状态`,dataIndex:`status`,valueType:`radioButton`,initialValue:1,fieldProps:{options:[{value:1,label:`上架`},{value:0,label:`下架`}]},render:(e,t)=>{let n=h[t.status??1];return(0,v.jsx)(f,{color:n?.color,children:n?.text})},align:`center`},{title:`图文详情`,dataIndex:`content`,valueType:`richText`,hideInSearch:!0,hideInTable:!0,colProps:{span:24},fieldProps:{height:400,groupId:11,placeholder:`输入商品图文详情,支持插入图片`}},{title:`等级价格`,dataIndex:`prices`,hideInForm:!0,hideInSearch:!0,width:420,align:`center`,render:(e,t)=>(0,v.jsx)(l,{wrap:!0,children:t.prices?.length?t.prices.map(e=>(0,v.jsxs)(f,{color:`geekblue`,title:`按成本价上浮 ${e.percent??0}%`,children:[e.level?.name??`等级${e.level_id}`,(0,v.jsxs)(`span`,{style:{color:`red`,marginLeft:5},children:[`¥`,e.price??`未设定`]})]},e.level_id)):`-`})},{title:`创建时间`,dataIndex:`created_at`,hideInForm:!0,hideInSearch:!0,align:`center`}],rowKey:`id`,accessName:`product.goods`,tableRef:E,scroll:{x:1200},actionBarRender:e=>[e.add,e.search,(0,v.jsx)(m,{auth:`product.goods.delete`,children:(0,v.jsxs)(u,{danger:!0,icon:(0,v.jsx)(se,{}),disabled:D.length===0,loading:k,onClick:j,children:[`批量删除`,D.length>0?` (${D.length})`:``]})},`batchDelete`),(0,v.jsx)(u,{icon:(0,v.jsx)(o,{}),onClick:Me,children:`价格矩阵`},`matrix`),(0,v.jsx)(m,{auth:`product.goods.export`,children:(0,v.jsx)(u,{icon:(0,v.jsx)(le,{}),loading:De,onClick:Ae,children:`导出`})},`export`),(0,v.jsx)(m,{auth:`product.goods.import`,children:(0,v.jsx)(u,{icon:(0,v.jsx)(p,{}),onClick:()=>q(!0),children:`导入`})},`import`),e.keywordSearch],formProps:{grid:!0,colProps:{span:12},rowProps:{gutter:20},layout:`vertical`},requestParams:e=>({...e,category_id:w}),rowSelection:{selectedRowKeys:D,onChange:e=>O(e.map(Number))},modalProps:{width:800,centered:!0,classNames:{body:`overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden h-[80vh]`}}};return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsxs)(`div`,{className:`mb-5`,children:[(0,v.jsx)(ve,{level:3,children:`商品列表`}),(0,v.jsx)(y,{type:`secondary`,children:`商品售价按客户等级上浮比例自动换算(成本价 × (100 + 上浮比例) / 100);「价格矩阵」支持批量调整成本价,调价后自动通知受影响门店。`})]}),(0,v.jsxs)(`div`,{className:`flex items-start gap-4`,children:[(0,v.jsxs)(re,{style:{width:200},title:`商品分类`,children:[(0,v.jsx)(`div`,{className:`cursor-pointer rounded-2xl mb-2 px-2 h-6 leading-6 ${w===void 0?`bg-blue-50`:`hover:bg-gray-50`}`,onClick:()=>{T(void 0)},children:`全部商品`}),(0,v.jsx)(ee,{showLine:!0,blockNode:!0,onSelect:e=>T(Number(e[0])),treeData:ye,selectedKeys:w?[w]:void 0,fieldNames:{title:`name`,key:`id`,children:`children`}})]}),(0,v.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,v.jsx)(ue,{...Ie})})]}),(0,v.jsxs)(ie,{title:`导入商品`,open:Oe,onCancel:()=>q(!1),onOk:je,okText:`开始导入`,okButtonProps:{disabled:!J},confirmLoading:ke,destroyOnHidden:!0,width:560,children:[(0,v.jsxs)(`div`,{className:`mb-3`,children:[(0,v.jsx)(y,{type:`secondary`,children:`列格式:品名*、分类*(末级分类,支持「父分类/子分类」路径)、供应商(不存在自动创建)、市场、 规格/包规、单位(默认斤)、成本价、排序、库存、保质期、状态(上架/下架)、备注。 导入一律新增商品;整表校验,任何一行有错则全部不导入。`}),(0,v.jsx)(u,{type:`link`,className:`px-0`,onClick:me,children:`下载导入模板`})]}),(0,v.jsxs)(ce.Dragger,{accept:`.xlsx,.xls`,maxCount:1,beforeUpload:e=>(Y(e),Q([]),!1),onRemove:()=>{Y(null),Q([])},children:[(0,v.jsx)(`p`,{className:`ant-upload-drag-icon`,children:(0,v.jsx)(s,{})}),(0,v.jsx)(`p`,{className:`ant-upload-text`,children:`点击或拖拽 Excel 文件到此区域`}),(0,v.jsx)(`p`,{className:`ant-upload-hint`,children:`仅支持 .xlsx / .xls,单次最多 1000 行`})]}),Z.length>0&&(0,v.jsx)(c,{className:`mt-3`,type:`error`,showIcon:!0,message:`共 ${Z.length} 处错误,修正后请重新导入`,description:(0,v.jsx)(`ul`,{className:`max-h-48 overflow-y-auto pl-4 mb-0 list-disc`,children:Z.map((e,t)=>(0,v.jsxs)(`li`,{children:[`第 `,e.row,` 行:`,e.message]},t))})})]}),(0,v.jsxs)(i,{title:`价格矩阵 · 批量调价`,open:M,onClose:()=>N(!1),size:1200,extra:(0,v.jsxs)(l,{children:[(0,v.jsx)(u,{onClick:()=>$(),children:`刷新`}),(0,v.jsx)(u,{type:`primary`,loading:be,onClick:Pe,children:`保存调价`})]}),children:[(0,v.jsxs)(l,{className:`mb-4`,wrap:!0,children:[(0,v.jsx)(ne,{style:{width:180},placeholder:`按分类筛选`,allowClear:!0,treeDefaultExpandAll:!0,fieldNames:{label:`name`,value:`id`,children:`children`},treeData:n,value:W,onChange:e=>{Ee(e),z(1),$(U,e,1,B)}}),(0,v.jsx)(oe.Search,{style:{width:240},placeholder:`搜索品名/规格`,allowClear:!0,value:U,onChange:e=>Te(e.target.value),onSearch:e=>{z(1),$(e,W,1,B)}}),(0,v.jsx)(y,{type:`secondary`,children:`等级列按上浮比例自动换算,仅成本价可编辑`})]}),(0,v.jsx)(te,{rowKey:`id`,size:`small`,loading:P,columns:Fe,dataSource:xe,pagination:{current:R,pageSize:B,total:Se,showSizeChanger:!0,pageSizeOptions:[20,50,100],showTotal:e=>`共 ${e} 件商品`,onChange:(e,t)=>{z(e),V(t),$(U,W,e,t)}},scroll:{x:H.length*150+290}})]})]})};export{C as default}; \ No newline at end of file diff --git a/public/assets/goods-NJpnvO3k.js b/public/assets/goods-NJpnvO3k.js new file mode 100644 index 0000000..c4ba1c6 --- /dev/null +++ b/public/assets/goods-NJpnvO3k.js @@ -0,0 +1 @@ +import{i as e}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as t,t as n}from"./jsx-runtime-CRBytmvs.js";import{t as r}from"./typography-DRFhazK9.js";import{L as i,V as a,c as o,y as s}from"./lodash-DzOfPy0f.js";import{t as c}from"./alert-DuXzwpQC.js";import{n as ee,t as te}from"./table-BXi9q3AE.js";import{t as l}from"./space-Cu4QVMgQ.js";import{t as u}from"./button-BILozH6U.js";import{l as ne}from"./XinForm-BPDYdeax.js";import{t as re}from"./card-DU2T2-YW.js";import{t as ie}from"./modal-g8Q5gNCx.js";import{t as ae}from"./image-CTRBNpBE.js";import{t as oe}from"./input-CHcsaDtX.js";import{r as d}from"./PictureOutlined-CB8Pr7jP.js";import{t as f}from"./tag-DBV1bHre.js";import{t as se}from"./DeleteOutlined-DwOvobSM.js";import{t as ce}from"./upload-oMV5VJeJ.js";import{t as le}from"./DownloadOutlined-DJY9Mu8c.js";import{t as p}from"./UploadOutlined-NadwXvrl.js";import{t as ue}from"./XinTable-DOLiJ5rL.js";import{t as m}from"./AuthButton-DvrpreK4.js";import{t as h}from"./iProduct-l9WpLyUD.js";import{a as de,i as fe,n as pe,r as me,s as he,t as ge}from"./goods-DPA1smJU.js";import{n as g}from"./category-MmrJkdbs.js";import{t as _e}from"./supplier-BstAcwv7.js";var _=e(t(),1),v=n(),{Title:ve,Text:y}=r,b=e=>Math.round(e*100)/100,x=e=>e.map(e=>({...e,disabled:!!e.children?.length,children:e.children?.length?x(e.children):e.children})),S=e=>e.map(e=>({...e,selectable:!e.children?.length,children:e.children?.length?S(e.children):e.children})),C=()=>{let[e,t]=(0,_.useState)([]),[n,r]=(0,_.useState)([]),C=(0,_.useMemo)(()=>x(n),[n]),ye=(0,_.useMemo)(()=>S(n),[n]),[w,T]=(0,_.useState)(void 0),E=(0,_.useRef)(null);(0,_.useEffect)(()=>{O([]),E.current?.reset()},[w]);let[D,O]=(0,_.useState)([]),[k,A]=(0,_.useState)(!1),j=()=>{window.$modal?.confirm({title:`确定要删除选中的 ${D.length} 件商品吗?`,okText:`删除`,okButtonProps:{danger:!0},cancelText:`取消`,onOk:async()=>{A(!0);try{await ge(D),d.success(`批量删除成功`),O([]),await E.current?.reload()}finally{A(!1)}}})},[M,N]=(0,_.useState)(!1),[P,F]=(0,_.useState)(!1),[be,I]=(0,_.useState)(!1),[xe,L]=(0,_.useState)([]),[R,z]=(0,_.useState)(1),[B,V]=(0,_.useState)(20),[Se,Ce]=(0,_.useState)(0),[H,we]=(0,_.useState)([]),[U,Te]=(0,_.useState)(``),[W,Ee]=(0,_.useState)(void 0),G=(0,_.useRef)({}),[De,K]=(0,_.useState)(!1),[Oe,q]=(0,_.useState)(!1),[J,Y]=(0,_.useState)(null),[ke,X]=(0,_.useState)(!1),[Z,Q]=(0,_.useState)([]),Ae=async()=>{K(!0);try{await fe(w?{category_id:w}:{})}finally{K(!1)}},je=async()=>{if(J){X(!0),Q([]);try{await he(J),q(!1),Y(null),E.current?.reset()}catch(e){let t=e?.data?.data?.errors;Array.isArray(t)&&Q(t)}finally{X(!1)}}};(0,_.useEffect)(()=>{_e().then(e=>t(e.data.data??[])),g().then(e=>r(e.data.data??[]))},[]);let $=async(e=U,t=W,n=R,r=B)=>{F(!0);try{let i=await de({keyword:e||void 0,category_id:t,page:n,pageSize:r}),a=i.data.data?.rows??[],o=i.data.data?.levels??[],s=a.map(e=>{let t=G.current[e.id];if(t===void 0)return e;let n={...e,cost_price:t},r=Number(t??0);return o.forEach(e=>{e.id!=null&&(n[`price_${e.id}`]=r>0?b(r*(1+Number(e.percent??0)/100)):null)}),n});L(s),Ce(i.data.data?.total??0),we(o)}finally{F(!1)}},Me=()=>{N(!0),z(1),V(20),$(``,void 0,1,20)},Ne=(e,t)=>{G.current[e]=t,L(n=>n.map(n=>{if(n.id!==e)return n;let r={...n,cost_price:t},i=Number(t??0);return H.forEach(e=>{e.id!=null&&(r[`price_${e.id}`]=i>0?b(i*(1+Number(e.percent??0)/100)):null)}),r}))},Pe=async()=>{let e=[];if(Object.entries(G.current).forEach(([t,n])=>{n!=null&&e.push({product_id:Number(t),cost_price:n})}),e.length===0){d.info(`没有需要保存的价格调整`);return}I(!0);try{await pe(e),d.success(`已更新 ${e.length} 件商品成本价,各等级售价已按上浮比例联动,受影响门店将收到通知`),G.current={},await $()}finally{I(!1)}},Fe=[{title:`商品`,dataIndex:`name`,fixed:`left`,width:160,render:(e,t)=>(0,v.jsxs)(`div`,{children:[(0,v.jsx)(`div`,{className:`font-medium`,children:e}),(0,v.jsxs)(y,{type:`secondary`,className:`text-xs`,children:[t.spec,t.unit?` / ${t.unit}`:``]})]})},{title:`成本价`,key:`cost_price`,fixed:`left`,width:130,render:(e,t)=>(0,v.jsx)(a,{size:`small`,min:0,precision:2,prefix:`¥`,value:t.cost_price,onChange:e=>Ne(t.id,e),className:`w-32`})},...H.map(e=>({title:e.name,key:`price_${e.id}`,width:150,render:(t,n)=>{let r=n[`price_${e.id}`];return(0,v.jsxs)(`div`,{children:[(0,v.jsx)(`div`,{children:r==null?(0,v.jsx)(y,{type:`secondary`,children:`未设成本价`}):`¥${r}`}),(0,v.jsxs)(`div`,{className:`text-xs text-gray-400`,children:[`成本上浮 `,Number(e.percent??0),`%`]})]})}}))],Ie={api:`/product/goods`,columns:[{title:`商品名称`,align:`center`,dataIndex:`name`,valueType:`text`,colProps:{span:24},required:!0,render:(e,t)=>(0,v.jsxs)(`div`,{children:[(0,v.jsx)(`div`,{className:`mb-1.5`,children:t.name}),(0,v.jsx)(`div`,{className:`text-[#999] text-[12px]`,children:t.remark})]}),rules:[{required:!0,message:`请输入商品名称`}]},{title:`商品图片`,dataIndex:`image_ids`,valueType:`image`,fieldProps:{action:`/product/goods/upload`,maxWidth:3e3,maxHeight:3e3,maxSize:10,mode:`multiple`,maxCount:5,changeType:`id`},render:(e,t)=>!t.images_arr||t.images_arr?.length<=0?`-`:(0,v.jsx)(l,{wrap:!1,children:t.images_arr.map(e=>(0,v.jsx)(ae,{src:e.preview_url,width:60,height:60,style:{objectFit:`cover`,borderRadius:4}},e.id))}),align:`center`,hideInSearch:!0,colProps:{span:24}},{title:`商品描述`,dataIndex:`remark`,valueType:`text`,hideInSearch:!0,hideInTable:!0,colProps:{span:24}},{title:`成本价`,dataIndex:`cost_price`,valueType:`digit`,hideInSearch:!0,align:`center`,tooltip:`各等级售价 = 成本价 × (100 + 等级上浮比例) / 100`,fieldProps:{min:0,precision:2,prefix:`¥`},render:(e,t)=>Number(t.cost_price??0)>0?`¥${t.cost_price}`:(0,v.jsx)(y,{type:`secondary`,children:`未设置`})},{title:`规格/包规`,dataIndex:`spec`,valueType:`text`,hideInSearch:!0,align:`center`},{title:`单位`,dataIndex:`unit`,valueType:`text`,hideInSearch:!0,initialValue:`斤`,align:`center`},{title:`单价单位`,dataIndex:`price_unit`,valueType:`text`,hideInTable:!0,hideInSearch:!0,initialValue:`元/斤`,fieldProps:{placeholder:`如:元/斤、元/箱`,maxLength:20}},{title:`排序`,dataIndex:`sort`,valueType:`digit`,hideInSearch:!0,fieldProps:{min:0},align:`center`},{title:`分类`,dataIndex:`category_id`,valueType:`treeSelect`,required:!0,align:`center`,rules:[{required:!0,message:`请选择分类`}],fieldProps:{treeData:C,fieldNames:{label:`name`,value:`id`,children:`children`},treeDefaultExpandAll:!0,showSearch:!0,treeNodeFilterProp:`name`,placeholder:`选择末级分类`},hideInSearch:!0,render:(e,t)=>t.category?(0,v.jsx)(f,{color:`cyan`,children:t.category.name}):`-`},{title:`供应商`,dataIndex:`supplier_id`,valueType:`select`,hideInSearch:!0,align:`center`,fieldProps:{options:e.map(e=>({label:e.name,value:e.id})),showSearch:!0,optionFilterProp:`label`,allowClear:!0,placeholder:`默认供应商(可选)`},render:(e,t)=>t.supplier?.name??`-`},{title:`市场`,dataIndex:`market`,valueType:`text`,align:`center`,fieldProps:{placeholder:`市场名称,如:新发地`,maxLength:50,allowClear:!0},render:(e,t)=>t.market||`-`},{title:`状态`,dataIndex:`status`,valueType:`radioButton`,initialValue:1,fieldProps:{options:[{value:1,label:`上架`},{value:0,label:`下架`}]},render:(e,t)=>{let n=h[t.status??1];return(0,v.jsx)(f,{color:n?.color,children:n?.text})},align:`center`},{title:`图文详情`,dataIndex:`content`,valueType:`richText`,hideInSearch:!0,hideInTable:!0,colProps:{span:24},fieldProps:{height:400,groupId:11,placeholder:`输入商品图文详情,支持插入图片`}},{title:`等级价格`,dataIndex:`prices`,hideInForm:!0,hideInSearch:!0,width:420,align:`center`,render:(e,t)=>(0,v.jsx)(l,{wrap:!0,children:t.prices?.length?t.prices.map(e=>(0,v.jsxs)(f,{color:`geekblue`,title:`按成本价上浮 ${e.percent??0}%`,children:[e.level?.name??`等级${e.level_id}`,(0,v.jsxs)(`span`,{style:{color:`red`,marginLeft:5},children:[`¥`,e.price??`未设定`]})]},e.level_id)):`-`})},{title:`创建时间`,dataIndex:`created_at`,hideInForm:!0,hideInSearch:!0,align:`center`}],rowKey:`id`,accessName:`product.goods`,tableRef:E,scroll:{x:1200},actionBarRender:e=>[e.add,e.search,(0,v.jsx)(m,{auth:`product.goods.delete`,children:(0,v.jsxs)(u,{danger:!0,icon:(0,v.jsx)(se,{}),disabled:D.length===0,loading:k,onClick:j,children:[`批量删除`,D.length>0?` (${D.length})`:``]})},`batchDelete`),(0,v.jsx)(u,{icon:(0,v.jsx)(o,{}),onClick:Me,children:`价格矩阵`},`matrix`),(0,v.jsx)(m,{auth:`product.goods.export`,children:(0,v.jsx)(u,{icon:(0,v.jsx)(le,{}),loading:De,onClick:Ae,children:`导出`})},`export`),(0,v.jsx)(m,{auth:`product.goods.import`,children:(0,v.jsx)(u,{icon:(0,v.jsx)(p,{}),onClick:()=>q(!0),children:`导入`})},`import`),e.keywordSearch],formProps:{grid:!0,colProps:{span:12},rowProps:{gutter:20},layout:`vertical`},requestParams:e=>({...e,category_id:w}),rowSelection:{selectedRowKeys:D,onChange:e=>O(e.map(Number))},modalProps:{width:800,centered:!0,classNames:{body:`overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden h-[80vh]`}}};return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsxs)(`div`,{className:`mb-5`,children:[(0,v.jsx)(ve,{level:3,children:`商品列表`}),(0,v.jsx)(y,{type:`secondary`,children:`商品售价按客户等级上浮比例自动换算(成本价 × (100 + 上浮比例) / 100);「价格矩阵」支持批量调整成本价,调价后自动通知受影响门店。`})]}),(0,v.jsxs)(`div`,{className:`flex items-start gap-4`,children:[(0,v.jsxs)(re,{style:{width:200},title:`商品分类`,children:[(0,v.jsx)(`div`,{className:`cursor-pointer rounded-2xl mb-2 px-2 h-6 leading-6 ${w===void 0?`bg-blue-50`:`hover:bg-gray-50`}`,onClick:()=>{T(void 0)},children:`全部商品`}),(0,v.jsx)(ee,{showLine:!0,blockNode:!0,onSelect:e=>T(Number(e[0])),treeData:ye,selectedKeys:w?[w]:void 0,fieldNames:{title:`name`,key:`id`,children:`children`}})]}),(0,v.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,v.jsx)(ue,{...Ie})})]}),(0,v.jsxs)(ie,{title:`导入商品`,open:Oe,onCancel:()=>q(!1),onOk:je,okText:`开始导入`,okButtonProps:{disabled:!J},confirmLoading:ke,destroyOnHidden:!0,width:560,children:[(0,v.jsxs)(`div`,{className:`mb-3`,children:[(0,v.jsx)(y,{type:`secondary`,children:`列格式:品名*、分类*(末级分类,支持「父分类/子分类」路径)、供应商(不存在自动创建)、市场、 规格/包规、单位(默认斤)、成本价、排序、库存、保质期、状态(上架/下架)、备注。 导入一律新增商品;整表校验,任何一行有错则全部不导入。`}),(0,v.jsx)(u,{type:`link`,className:`px-0`,onClick:me,children:`下载导入模板`})]}),(0,v.jsxs)(ce.Dragger,{accept:`.xlsx,.xls`,maxCount:1,beforeUpload:e=>(Y(e),Q([]),!1),onRemove:()=>{Y(null),Q([])},children:[(0,v.jsx)(`p`,{className:`ant-upload-drag-icon`,children:(0,v.jsx)(s,{})}),(0,v.jsx)(`p`,{className:`ant-upload-text`,children:`点击或拖拽 Excel 文件到此区域`}),(0,v.jsx)(`p`,{className:`ant-upload-hint`,children:`仅支持 .xlsx / .xls,单次最多 1000 行`})]}),Z.length>0&&(0,v.jsx)(c,{className:`mt-3`,type:`error`,showIcon:!0,message:`共 ${Z.length} 处错误,修正后请重新导入`,description:(0,v.jsx)(`ul`,{className:`max-h-48 overflow-y-auto pl-4 mb-0 list-disc`,children:Z.map((e,t)=>(0,v.jsxs)(`li`,{children:[`第 `,e.row,` 行:`,e.message]},t))})})]}),(0,v.jsxs)(i,{title:`价格矩阵 · 批量调价`,open:M,onClose:()=>N(!1),size:1200,extra:(0,v.jsxs)(l,{children:[(0,v.jsx)(u,{onClick:()=>$(),children:`刷新`}),(0,v.jsx)(u,{type:`primary`,loading:be,onClick:Pe,children:`保存调价`})]}),children:[(0,v.jsxs)(l,{className:`mb-4`,wrap:!0,children:[(0,v.jsx)(ne,{style:{width:180},placeholder:`按分类筛选`,allowClear:!0,treeDefaultExpandAll:!0,fieldNames:{label:`name`,value:`id`,children:`children`},treeData:n,value:W,onChange:e=>{Ee(e),z(1),$(U,e,1,B)}}),(0,v.jsx)(oe.Search,{style:{width:240},placeholder:`搜索品名/规格`,allowClear:!0,value:U,onChange:e=>Te(e.target.value),onSearch:e=>{z(1),$(e,W,1,B)}}),(0,v.jsx)(y,{type:`secondary`,children:`等级列按上浮比例自动换算,仅成本价可编辑`})]}),(0,v.jsx)(te,{rowKey:`id`,size:`small`,loading:P,columns:Fe,dataSource:xe,pagination:{current:R,pageSize:B,total:Se,showSizeChanger:!0,pageSizeOptions:[20,50,100],showTotal:e=>`共 ${e} 件商品`,onChange:(e,t)=>{z(e),V(t),$(U,W,e,t)}},scroll:{x:H.length*150+290}})]})]})};export{C as default}; \ No newline at end of file diff --git a/public/assets/index-B3rYtk3Q.js b/public/assets/index-wuX9SPpH.js similarity index 99% rename from public/assets/index-B3rYtk3Q.js rename to public/assets/index-wuX9SPpH.js index 03dcdeb..c011b60 100644 --- a/public/assets/index-B3rYtk3Q.js +++ b/public/assets/index-wuX9SPpH.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/agent-BacKF2o-.js","assets/rolldown-runtime-BgaNhQyE.js","assets/jsx-runtime-CRBytmvs.js","assets/chunk-KS7C4IRE-Zm15rq6F.js","assets/typography-DRFhazK9.js","assets/tooltip-SaeG1Uv7.js","assets/style-BmYds38x.js","assets/CopyOutlined-pYq9KfGb.js","assets/es-DGcDZmXr.js","assets/CloseCircleFilled-C_pAsEWy.js","assets/space-Cu4QVMgQ.js","assets/button-BILozH6U.js","assets/ColorPresets-CG7aHuoG.js","assets/app-Bntg8WFU.js","assets/CheckCircleFilled-DcF3PzkE.js","assets/PlusOutlined-B8K2rG8r.js","assets/ExclamationCircleFilled-B0FwC6ZE.js","assets/context-D6bvp8kb.js","assets/useClosable-BLB2IUFV.js","assets/mergeProps-yLeqvqMM.js","assets/useModal-uyHD1DJx.js","assets/config-provider-CqLGIhNd.js","assets/empty-_1ZFK8yy.js","assets/avatar-DPxbCsa4.js","assets/useBreakpoint-DLqc4AYE.js","assets/popover-BGq_MyT2.js","assets/card-DU2T2-YW.js","assets/spin-CfJYIffX.js","assets/switch--LhkZymx.js","assets/tag-DBV1bHre.js","assets/theme-D5FZSALB.js","assets/useTranslation-DBl6NYjI.js","assets/agent-CCozney_.js","assets/request--UCyt0wo.js","assets/chat-CfnvY2VS.js","assets/global-DPRsdECQ.js","assets/middleware-Ctqt9WwX.js","assets/divider-BWjoWWHX.js","assets/dropdown-BgpiO8SY.js","assets/dropdown-Cg5iA4jt.js","assets/LeftOutlined-8zj_FQJP.js","assets/PurePanel-CRkmGKGB.js","assets/flex-BUqc4pUn.js","assets/input-CHcsaDtX.js","assets/SearchOutlined-C1nd7QQO.js","assets/Input-CJ-n8Xgl.js","assets/EyeOutlined-LSBUmW0e.js","assets/CaretDownFilled-DsboRsp5.js","assets/DeleteOutlined-DwOvobSM.js","assets/ArrowUpOutlined-C-Hx3V4D.js","assets/ClearOutlined-D3ecEqjC.js","assets/UserOutlined-D5Ziy0eL.js","assets/chat-Iht936bQ.css","assets/conversation-CgPPysYU.js","assets/lodash-DzOfPy0f.js","assets/DoubleRightOutlined-Blfli1UU.js","assets/DownOutlined-OYbvV7zr.js","assets/LockOutlined-B8eRH1x4.js","assets/modal-g8Q5gNCx.js","assets/ClockCircleOutlined-CNdnBEY0.js","assets/LinkOutlined-C-pRqXVc.js","assets/form-B3R3kIqp.js","assets/useForm-CAC6DWbf.js","assets/row-VfXXpsnR.js","assets/PictureOutlined-CB8Pr7jP.js","assets/WarningFilled-D9XuDTkJ.js","assets/CaretUpOutlined-ButGJLYH.js","assets/FileOutlined-DcVPckWl.js","assets/DownloadOutlined-DJY9Mu8c.js","assets/WeiboOutlined-Bp26feUj.js","assets/SmileOutlined-CxtYvF4K.js","assets/ArrowDownOutlined-hMgHFKfN.js","assets/FileDoneOutlined-Bp46bcBB.js","assets/CheckCircleOutlined-IJiAu4Hy.js","assets/CloseCircleOutlined-D2to6Tog.js","assets/EnvironmentOutlined-Be7mN2bK.js","assets/InfoCircleOutlined-ZdiYvwVM.js","assets/UploadOutlined-NadwXvrl.js","assets/PrinterOutlined-V8ipM95d.js","assets/QqOutlined-DnUKpfIS.js","assets/RiseOutlined-gXjyF9G9.js","assets/ShopOutlined-CwwKSpcq.js","assets/WalletOutlined-Bjy-chtO.js","assets/ShoppingOutlined-CsazpDg7.js","assets/TeamOutlined-DAHp-vuL.js","assets/table-BXi9q3AE.js","assets/radio-CxFl70_7.js","assets/useBubbleLock-BOXZxiMO.js","assets/checkbox-BSxplF7f.js","assets/pagination-aogAYU7q.js","assets/zh_CN-BT8mdvr9.js","assets/XinTable-DOLiJ5rL.js","assets/XinForm-BPDYdeax.js","assets/row-DfzKzMF0.js","assets/ImageUploader-C4yPpD75.js","assets/upload-oMV5VJeJ.js","assets/progress-BvFjoSli.js","assets/tslib.es6-5i5FW2KX.js","assets/XinForm-CeTR0shq.css","assets/AuthButton-DvrpreK4.js","assets/user-LBumqaa7.js","assets/banner-CJe0agU6.js","assets/image-CTRBNpBE.js","assets/nav-Dih5jXxX.js","assets/promo-CfsZu-jA.js","assets/special-DQ_cXCQl.js","assets/iProduct-l9WpLyUD.js","assets/goods-DPA1smJU.js","assets/download-DC9wDwqQ.js","assets/level-BCGrZbbc.js","assets/notice-DkzNYgG3.js","assets/store-JDnJsv44.js","assets/store-B-wG8BVA.js","assets/supplier-D0qvu-sA.js","assets/analysis-ChRcSk16.js","assets/statistic-G8YfPOC4.js","assets/iStoreOrder-CyyYoLoV.js","assets/monitor-Dd1gBWfo.js","assets/list-C8spiXAQ.js","assets/workplace-I8FwqFbs.js","assets/badge-__AeKia1.js","assets/icon-selector-Dy7uWjj7.js","assets/image-uploader-DBHOFZqO.js","assets/user-selector-C_7kHqFz.js","assets/xin-form-CjpDqXrA.js","assets/xin-table-Bw1qt43O.js","assets/403-kF5cJUEE.js","assets/result-D_u5wtF_.js","assets/404-CF76bH-T.js","assets/500-pw04psNL.js","assets/login-CKGg-k4h.js","assets/first-VYyrluR5.js","assets/breadcrumb-CSvdSHzR.js","assets/second-urN6pQJ9.js","assets/third-CmYUgLWR.js","assets/store-CGacVUaW.js","assets/descriptions-BLF6MKiu.js","assets/popconfirm-DyseZgpU.js","assets/order-DMmnhF6m.js","assets/iPurchaseOrder-Dn-laOqY.js","assets/base-layout-o2EQVE3N.js","assets/descriptions-DSR6x1nO.js","assets/timeline-BB5N-LF8.js","assets/fix-header-DIZqZWCz.js","assets/category-BQA8kSpc.js","assets/category-MmrJkdbs.js","assets/goods-Cnky5f-7.js","assets/alert-DuXzwpQC.js","assets/supplier-BstAcwv7.js","assets/order-BsK8e9QB.js","assets/useAuth-AiNV0bRw.js","assets/bill-d4QJGLlp.js","assets/container-return-DT66R0pD.js","assets/payment-m5LFx4J0.js","assets/fail-BFEpQBfc.js","assets/info-DmaRTlzJ.js","assets/success-BtLkPs9S.js","assets/warning-D9M9NjTA.js","assets/ai-BaBcitlo.js","assets/config-tH2RSZ-J.js","assets/dept-wABp4Ul9.js","assets/dict-j8wfnfhh.js","assets/dict-CDRllPHM.js","assets/item-DyrMo47d.js","assets/file-BhqTJxRm.js","assets/info-CVHNTwj4.js","assets/mail-ChpDRzPT.js","assets/role-D-VBhILf.js","assets/relativeTime-jamE_cdZ.js","assets/rule-CqyTke2b.js","assets/storage-DhJApafx.js","assets/user-Bt-PQ9Uv.js","assets/profile-CGJ4n7jj.js","assets/useMobile-Bcq0nkW4.js"])))=>i.map(i=>d[i]); -import{i as e}from"./rolldown-runtime-BgaNhQyE.js";import{Bn as t,Dr as n,Jn as r,Ln as i,Tr as a,Vn as o,Xn as s,t as c,zn as l}from"./jsx-runtime-CRBytmvs.js";import{a as u,c as d,i as f,n as p,o as m,r as h,t as g}from"./chunk-KS7C4IRE-Zm15rq6F.js";import{i as _,n as v,r as y,t as b}from"./global-DPRsdECQ.js";import{B as x,L as S,S as ee,V as C,_ as w,b as T,g as E,i as te,l as ne,n as D,t as re,x as ie}from"./lodash-DzOfPy0f.js";import{t as ae}from"./tooltip-SaeG1Uv7.js";import{t as oe}from"./config-provider-CqLGIhNd.js";import{t as se}from"./space-Cu4QVMgQ.js";import{t as O}from"./button-BILozH6U.js";import{t as ce}from"./app-Bntg8WFU.js";import{r as le}from"./DoubleRightOutlined-Blfli1UU.js";import{t as ue}from"./empty-_1ZFK8yy.js";import{t as de}from"./SearchOutlined-C1nd7QQO.js";import{t as fe}from"./avatar-DPxbCsa4.js";import{t as pe}from"./breadcrumb-CSvdSHzR.js";import{a as me,i as he,n as ge,o as _e,s as ve}from"./dropdown-Cg5iA4jt.js";import{n as ye}from"./LockOutlined-B8eRH1x4.js";import{n as be,t as xe}from"./row-DfzKzMF0.js";import{t as k}from"./divider-BWjoWWHX.js";import{t as Se}from"./modal-g8Q5gNCx.js";import{t as Ce}from"./dropdown-BgpiO8SY.js";import{t as we}from"./input-CHcsaDtX.js";import{n as Te}from"./CopyOutlined-pYq9KfGb.js";import{r as Ee}from"./PictureOutlined-CB8Pr7jP.js";import{t as De}from"./switch--LhkZymx.js";import{t as A}from"./theme-D5FZSALB.js";import{t as Oe}from"./ArrowDownOutlined-hMgHFKfN.js";import{t as ke}from"./ArrowUpOutlined-C-Hx3V4D.js";import{r as Ae}from"./InfoCircleOutlined-ZdiYvwVM.js";import{t as je}from"./UserOutlined-D5Ziy0eL.js";import{i as Me,t as j}from"./user-LBumqaa7.js";import{n as Ne,r as Pe,t as M}from"./useTranslation-DBl6NYjI.js";import{i as Fe,r as Ie,t as Le}from"./login-CKGg-k4h.js";import{t as N}from"./useMobile-Bcq0nkW4.js";import{t as Re}from"./dict-CDRllPHM.js";import{t as ze}from"./relativeTime-jamE_cdZ.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();function Be(e,t,n){return typeof n==`boolean`?n:e.length?!0:r(t).some(e=>e.type===he)}var P=e(n()),F=({suffixCls:e,tagName:t,displayName:n})=>n=>P.forwardRef((r,i)=>P.createElement(n,{ref:i,suffixCls:e,tagName:t,...r})),I=P.forwardRef((e,t)=>{let{prefixCls:n,suffixCls:r,className:a,tagName:s,...c}=e,{getPrefixCls:l}=P.useContext(i),u=l(`layout`,n),[d,f]=_e(u),p=r?`${u}-${r}`:u;return P.createElement(s,{className:o(n||p,a,d,f),ref:t,...c})}),Ve=P.forwardRef((e,n)=>{let{direction:r}=P.useContext(i),[a,c]=P.useState([]),{prefixCls:u,className:d,rootClassName:f,children:p,hasSider:m,tagName:h,style:g,..._}=e,v=s(_,[`suffixCls`]),{getPrefixCls:y,className:b,style:x}=l(`layout`),S=y(`layout`,u),ee=Be(a,p,m),[C,w]=_e(S),T=o(S,{[`${S}-has-sider`]:ee,[`${S}-rtl`]:r===`rtl`},b,d,f,C,w),E=P.useMemo(()=>({siderHook:{addSider:e=>{c(n=>[].concat(t(n),[e]))},removeSider:e=>{c(t=>t.filter(t=>t!==e))}}}),[]);return P.createElement(ve.Provider,{value:E},P.createElement(h,{ref:n,className:T,style:{...x,...g},...v},p))}),He=F({tagName:`div`,displayName:`Layout`})(Ve),Ue=F({suffixCls:`header`,tagName:`header`,displayName:`Header`})(I),We=F({suffixCls:`footer`,tagName:`footer`,displayName:`Footer`})(I),Ge=F({suffixCls:`content`,tagName:`main`,displayName:`Content`})(I),L=He;L.Header=Ue,L.Footer=We,L.Content=Ge,L.Sider=he,L._InternalSiderContext=me;var Ke={type:`3rdParty`,init(e){Pe(e.options.react),Ne(e)}},qe=e(a(),1),R=c(),{useToken:Je}=A,Ye=()=>{let{token:e}=Je(),{t}=M(),n=m(),r=b(e=>e.themeDrawer),i=b(e=>e.setThemeDrawer),a=j(e=>e.userinfo),o=j(e=>e.logout),s=N(),[c,l]=(0,P.useState)(!1),[u,d]=(0,P.useState)(!1),f=()=>{let e=document.documentElement;document.fullscreenElement?document.exitFullscreen().then(()=>{l(!1)}):e.requestFullscreen().then(()=>{l(!0)})},p=[{key:`1`,label:t(`layout.profile`),icon:(0,R.jsx)(je,{}),onClick:()=>n(`/user/profile`)},{key:`2`,label:t(`layout.logout`),icon:(0,R.jsx)(te,{}),onClick:async()=>{o().then(()=>{Ee.success(t(`layout.logoutSuccess`)),window.location.href=`/login`}).catch(()=>{Ee.error(t(`layout.logoutFailed`))})}}];return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(Se,{closable:!1,open:u,footer:null,style:{top:40,width:600},styles:{body:{maxHeight:`80vh`},container:{padding:0}},onCancel:()=>d(!1),children:[(0,R.jsxs)(`div`,{className:`p-5`,children:[(0,R.jsx)(we,{size:`large`,placeholder:t(`layout.searchPlaceholder`),prefix:(0,R.jsx)(de,{})}),(0,R.jsx)(`div`,{className:`mt-5`,children:(0,R.jsx)(ue,{})})]}),(0,R.jsxs)(se,{className:`mt-5 flex align-center pl-5 pr-5 pt-2.5 pb-2.5`,style:{borderTop:`1px solid `+e.colorBorder},children:[(0,R.jsx)(Te,{}),` `,(0,R.jsx)(`span`,{className:`mr-4`,children:t(`layout.searchConfirm`)}),(0,R.jsx)(ke,{}),(0,R.jsx)(Oe,{}),` `,(0,R.jsx)(`span`,{className:`mr-4`,children:t(`layout.searchSwitch`)}),`Esc `,(0,R.jsx)(`span`,{className:`mr-2`,children:t(`layout.searchClose`)})]})]}),(0,R.jsxs)(se,{children:[!s&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(O,{icon:(0,R.jsx)(T,{}),size:`large`,type:`text`,onClick:()=>window.open(`https://xin-admin.com`)}),(0,R.jsx)(O,{icon:(0,R.jsx)(Ae,{}),size:`large`,type:`text`,onClick:()=>window.open(`https://github.com/xin-admin/xin-admin-ui`)}),(0,R.jsx)(O,{icon:(0,R.jsx)(de,{}),size:`large`,type:`text`,onClick:()=>d(!0)}),(0,R.jsx)(O,{onClick:f,icon:c?(0,R.jsx)(ee,{}):(0,R.jsx)(ie,{}),size:`large`,type:`text`}),(0,R.jsx)(Ie,{size:`large`,type:`text`}),(0,R.jsx)(O,{onClick:()=>i(!r),icon:(0,R.jsx)(ne,{}),size:`large`,type:`text`})]}),a?(0,R.jsx)(Ce,{menu:{items:p},children:(0,R.jsxs)(O,{size:`large`,type:`text`,children:[(0,R.jsx)(`div`,{children:a.nickname||a.username}),(0,R.jsx)(fe,{src:a.avatar_url?a.avatar_url:null,size:`small`})]})}):null]})]})};function Xe(e){let t={},n=(e,r=[])=>{if(!e.key)return;let i={href:e.path,title:e.name,icon:e.icon,local:e.local},a=[...r,i];t[e.key]=a,e.children&&e.children.length&&e.children.forEach(e=>n(e,a))};return e.forEach(e=>n(e)),t}function z(e,t){for(let n of e){if(n.path===t)return n;if(n.children&&n.children.length>0){let e=z(n.children,t);if(e)return e}}return null}function Ze(e,t,n=[]){for(let r of e){if(!r.key)continue;let e=[...n,r.key];if(r.path===t)return e;if(r.children&&r.children.length>0){let n=Ze(r.children,t,e);if(n)return n}}return null}function Qe(e,t){for(let n of e){if(n.key===t)return n;if(n.children&&n.children.length>0){let e=Qe(n.children,t);if(e)return e}}return null}var $e=(0,P.createContext)(null),et=({children:e})=>{let t=u(),[n,r]=(0,P.useState)([]),[i,a]=(0,P.useState)(),[o,s]=(0,P.useState)([]),[c,l]=(0,P.useState)(!1);return(0,P.useEffect)(()=>{Me().then(({data:e})=>{let t=e.data.menus;r(t)})},[]),(0,P.useEffect)(()=>{let e=t.pathname,r=Ze(n,e);r&&r.length&&(s(r),a(r[0]))},[n]),(0,R.jsx)($e.Provider,{value:{menus:n,parentKey:i,selectKey:o,collapsed:c,setParentKey:a,setCollapsed:l,setSelectKey:s},children:e})},B=()=>{let e=(0,P.useContext)($e);if(!e)throw Error(`useLayoutContext must be used within LayoutProvider`);return e},V=(e,t)=>e.reduce((e,n)=>{if(![`route`,`menu`].includes(n.type)||!n.hidden)return e;let r={label:n.local?t(n.local):n.name,icon:n.icon?(0,R.jsx)(D,{name:n.icon}):void 0,key:n.key};return n.type===`menu`&&n.children?.length&&(r.children=V(n.children,t)),e.push(r),e},[]),H=()=>{let{t:e}=M(),t=N(),n=m(),[r,i]=(0,P.useState)([]),a=b(e=>e.layout),{menus:o,parentKey:s,selectKey:c,setSelectKey:l,setParentKey:u}=B();(0,P.useEffect)(()=>{if(t){i(V(o,e));return}if([`columns`,`mix`].includes(a)&&s){let t=o.find(e=>e.key===s);i(V(t?.children||[],e))}else i(V(o,e))},[o,a,s,e,t]);let d=e=>{l(e),[`top`,`side`].includes(a)&&u(e[e.length-1]);let t=Qe(o,e[0]);if(!(!t||!t.key)){if(t.type===`route`&&t.link){window.open(t.path,`_blank`);return}if(t.type===`route`&&t.path){n(t.path);return}}};return(0,R.jsx)(R.Fragment,{children:r.length>0&&(0,R.jsx)(ge,{className:`border-b-0 flex-1`,mode:a===`top`&&!t?`horizontal`:`inline`,items:r,onSelect:e=>d(e.keyPath),selectedKeys:c})})},tt=[{title:(0,R.jsx)(T,{})}],nt=()=>{let{t:e}=M(),t=u(),{menus:n}=B(),[r,i]=(0,P.useState)(tt),a=(0,P.useMemo)(()=>Xe(n),[n]);return(0,P.useEffect)(()=>{let r=t.pathname,o=z(n,r);if(o&&o.key){let t=a[o.key];if(t){i([{title:(0,R.jsx)(T,{})},...t.map(t=>({title:(0,R.jsxs)(R.Fragment,{children:[t.icon&&(0,R.jsx)(D,{name:t.icon}),(0,R.jsx)(`span`,{children:t.local?e(t.local):t.title})]})}))]);return}}i(tt)},[e,t.pathname,a]),(0,R.jsx)(pe,{items:r})},{Header:rt}=L,it=()=>{let{t:e}=M(),t=N(),n=m(),r=b(e=>e.logo),i=b(e=>e.title),a=b(e=>e.layout),o=b(e=>e.themeConfig),{menus:s,parentKey:c,collapsed:l,setCollapsed:u,setParentKey:d,setSelectKey:f}=B(),p={token:{colorTextBase:o.headerColor},components:{Menu:{activeBarBorderWidth:0,itemBg:`transparent`}}},[h,g]=(0,P.useState)([]);(0,P.useEffect)(()=>{g(s.filter(e=>e.hidden).map(t=>({label:t.local?e(t.local):t.name,icon:t.icon?(0,R.jsx)(D,{name:t.icon}):!1,key:t.key})))},[s,e]);let _=e=>{let t=Qe(s,e);if(!(!t||!t.key)&&(d(t.key),t.type!==`menu`)){if(f([t.key]),t.type===`route`&&t.link){window.open(t.path,`_blank`);return}if(t.type===`route`&&t.path){n(t.path);return}}};return(0,R.jsx)(oe,{theme:p,children:t?(0,R.jsxs)(rt,{className:`flex sticky z-1 top-0 backdrop-blur-xs justify-between items-center`,children:[(0,R.jsxs)(`div`,{className:`flex items-center`,children:[(0,R.jsx)(`img`,{className:`w-9 mr-5`,src:r,alt:`logo`}),(0,R.jsx)(`span`,{className:`font-semibold text-[20px] mr-2`,children:i})]}),(0,R.jsx)(Ye,{})]}):(0,R.jsxs)(rt,{className:`flex sticky z-1 top-0 backdrop-blur-xs`,style:{borderBottom:`1px solid `+o.colorBorder},children:[(0,R.jsxs)(`div`,{className:`flex items-center relative`,children:[(0,R.jsx)(`img`,{className:`h-8`,src:r,alt:`logo`}),(0,R.jsx)(`span`,{className:`font-semibold text-[20px] ml-5 mr-5`,children:i}),a!==`top`&&(0,R.jsx)(O,{type:`text`,className:`text-[16px] mr-2.5`,onClick:()=>u(!l),children:l?(0,R.jsx)(E,{}):(0,R.jsx)(w,{})}),[`columns`,`side`].includes(a)&&(0,R.jsx)(nt,{})]}),(0,R.jsxs)(`div`,{className:`overflow-hidden flex-1`,children:[a==`top`&&(0,R.jsx)(H,{}),a==`mix`&&(0,R.jsx)(ge,{className:`border-b-0 w-full`,mode:`horizontal`,items:h,onSelect:e=>_(e.key),selectedKeys:[c]})]}),(0,R.jsx)(Ye,{})]})})},{Footer:at}=L,ot=()=>{let e=new Date().getFullYear(),t=b(e=>e.themeConfig);return(0,R.jsxs)(R.Fragment,{children:[t.fixedFooter&&(0,R.jsx)(`div`,{className:`h-10`}),(0,R.jsx)(at,{className:(t.fixedFooter?`sticky`:`relative`)+` z-10 w-full bottom-0 pt-2.5 pb-2.5`,style:{borderTop:`1px solid `+t.colorBorder},children:(0,R.jsxs)(`div`,{className:`flex items-center justify-center w-full`,children:[`Xin Admin ©`,e,` Created by xiaoliu`]})})]})},st=()=>{let e=b(e=>e.themeConfig),t=b(e=>e.themeDrawer),n=b(e=>e.setThemeDrawer),[r,i]=(0,P.useState)(!1);return(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`div`,{className:`fixed bottom-8 left-8 z-999`,children:(0,R.jsx)(O,{type:`primary`,shape:`circle`,size:`large`,icon:r?(0,R.jsx)(w,{}):(0,R.jsx)(E,{}),onClick:()=>i(!r)})}),(0,R.jsx)(S,{placement:`left`,closable:!0,onClose:()=>i(!1),open:r,styles:{section:{width:280},header:{borderBottom:`1px solid `+e.colorBorder,background:e.siderBg,color:e.siderColor},body:{padding:0,background:e.siderBg}},footer:(0,R.jsxs)(se,{children:[(0,R.jsx)(O,{icon:(0,R.jsx)(T,{}),size:`large`,type:`text`,onClick:()=>window.open(`https://xin-admin.com`)}),(0,R.jsx)(O,{icon:(0,R.jsx)(Ae,{}),size:`large`,type:`text`,onClick:()=>window.open(`https://github.com/xin-admin/xin-admin-ui`)}),(0,R.jsx)(Ie,{size:`large`,type:`text`}),(0,R.jsx)(O,{onClick:()=>n(!t),icon:(0,R.jsx)(ne,{}),size:`large`,type:`text`})]}),children:(0,R.jsx)(`div`,{style:{height:`100%`,overflowY:`auto`,width:`100%`,background:e.siderBg},children:(0,R.jsx)(H,{})})})]})},ct=re(),lt={defaultAlgorithm:A.defaultAlgorithm,darkAlgorithm:A.darkAlgorithm,defaultCompactAlgorithm:[A.defaultAlgorithm,A.compactAlgorithm],darkCompactAlgorithm:[A.darkAlgorithm,A.compactAlgorithm]},ut=[{label:`layout.algorithmDefault`,value:`defaultAlgorithm`},{label:`layout.algorithmDark`,value:`darkAlgorithm`},{label:`layout.algorithmDefaultCompact`,value:`defaultCompactAlgorithm`},{label:`layout.algorithmDarkCompact`,value:`darkCompactAlgorithm`}],{useToken:dt}=A,ft=[{key:`colorPrimary`,label:`layout.colorPrimary`},{key:`colorText`,label:`layout.colorText`},{key:`colorBg`,label:`layout.colorBg`},{key:`colorSuccess`,label:`layout.colorSuccess`},{key:`colorWarning`,label:`layout.colorWarning`},{key:`colorError`,label:`layout.colorError`},{key:`bodyBg`,label:`layout.bodyBg`},{key:`footerBg`,label:`layout.footerBg`},{key:`headerBg`,label:`layout.headerBg`},{key:`headerColor`,label:`layout.headerColor`},{key:`siderBg`,label:`layout.siderBg`},{key:`siderColor`,label:`layout.siderColor`},{key:`colorBorder`,label:`layout.colorBorder`}],pt=[{key:`fixedFooter`,label:`layout.fixedFooter`,type:`switch`},{key:`borderRadius`,label:`layout.borderRadius`,type:`number`,min:0,max:30},{key:`controlHeight`,label:`layout.controlHeight`,type:`number`,min:0},{key:`headerPadding`,label:`layout.headerPadding`,type:`number`,min:0},{key:`headerHeight`,label:`layout.headerHeight`,type:`number`,min:0},{key:`siderWeight`,label:`layout.siderWeight`,type:`number`,min:0},{key:`bodyPadding`,label:`layout.bodyPadding`,type:`number`,min:0}],mt=[{background:`/static/theme/default.svg`,name:`light`,title:`layout.themeLight`},{background:`/static/theme/dark.svg`,name:`dark`,title:`layout.themeDark`}],ht=[{key:`side`,title:`layout.layoutSide`,render:e=>(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`div`,{className:`rounded-sm w-full h-6 mb-1.5`,style:{background:e.colorPrimaryBorder}}),(0,R.jsxs)(`div`,{className:`flex`,children:[(0,R.jsx)(`div`,{className:`rounded-sm h-16 w-6`,style:{background:e.colorPrimary}}),(0,R.jsx)(`div`,{className:`rounded-sm flex-1 ml-1.5`,style:{background:e.colorPrimaryBg}})]})]})},{key:`top`,title:`layout.layoutTop`,render:e=>(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`div`,{className:`rounded-sm h-6 w-full mb-1.5`,style:{background:e.colorPrimary}}),(0,R.jsx)(`div`,{className:`rounded-sm h-16`,style:{background:e.colorPrimaryBg}})]})},{key:`mix`,title:`layout.layoutMix`,render:e=>(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`div`,{className:`rounded-sm w-full h-6 mb-1.5`,style:{background:e.colorPrimary}}),(0,R.jsxs)(`div`,{className:`flex`,children:[(0,R.jsx)(`div`,{className:`rounded-sm h-16 w-6`,style:{background:e.colorPrimary}}),(0,R.jsx)(`div`,{className:`rounded-sm flex-1 ml-1.5`,style:{background:e.colorPrimaryBg}})]})]})},{key:`columns`,title:`layout.layoutColumns`,render:e=>(0,R.jsxs)(`div`,{className:`flex`,children:[(0,R.jsx)(`div`,{className:`rounded-sm mr-1.5 w-3 h-24`,style:{background:e.colorPrimary}}),(0,R.jsx)(`div`,{className:`rounded-sm mr-1.5 w-6 h-24`,style:{background:e.colorPrimaryHover}}),(0,R.jsx)(`div`,{className:`rounded-sm flex-auto h-24`,style:{background:e.colorPrimaryBg}})]})}],gt=()=>{let{t:e}=M(),{token:t}=dt(),n=b(e=>e.themeDrawer),r=b(e=>e.setThemeDrawer),i=b(e=>e.setThemeConfig),a=b(e=>e.themeConfig),o=b(e=>e.layout),s=b(e=>e.setLayout),c=ut?.map(t=>({...t,label:e(t.label)}))||[],l=(0,ct.debounce)((e,t)=>{i({...a,[e]:t})},400,{leading:!0,trailing:!1});return(0,R.jsxs)(S,{styles:{body:{paddingTop:10}},placement:`right`,closable:!1,onClose:()=>r(!1),open:n,footer:(0,R.jsx)(`div`,{className:`flex w-full justify-between`,children:(0,R.jsx)(O,{onClick:()=>{i({...v,..._})},children:e(`layout.resetTheme`)})}),children:[(0,R.jsx)(k,{children:e(`layout.layoutStyle`)}),(0,R.jsx)(xe,{gutter:[20,20],children:ht.map(({key:n,title:r,render:i})=>(0,R.jsx)(be,{span:12,children:(0,R.jsx)(ae,{title:e(r),children:(0,R.jsx)(`div`,{className:`p-2 rounded-lg cursor-pointer`,style:{boxShadow:t.boxShadow,borderRadius:t.borderRadius,border:o===n?`2px solid ${t.colorPrimary}`:`2px solid transparent`},onClick:()=>s(n),children:i(t)})})},n))}),(0,R.jsx)(k,{children:e(`layout.presetTheme`)}),(0,R.jsxs)(xe,{gutter:20,onClick:e=>{let t=e.target.closest(`[data-theme]`);if(!t)return;let n=t.dataset.theme,r={dark:y,light:_};r[n]&&i({...a,...r[n]})},children:[mt.map(n=>(0,R.jsxs)(be,{span:8,className:`mb-2.5`,children:[(0,R.jsx)(`div`,{"data-theme":n.name,className:`cursor-pointer overflow-hidden border-solid`,style:{borderRadius:t.borderRadius,borderWidth:a.themeScheme===n.name?`2px`:`0px`,borderColor:a.themeScheme===n.name?t.colorPrimary:`transparent`},children:(0,R.jsx)(`img`,{src:n.background,alt:n.name})}),(0,R.jsx)(`div`,{className:`text-center mt-1.5`,children:e(n.title)})]},n.name)),(0,R.jsx)(be,{span:24,className:`mb-2.5`,children:(0,R.jsxs)(`div`,{className:`flex justify-between items-center`,children:[(0,R.jsx)(`div`,{children:e(`layout.themeAlgorithm`)}),(0,R.jsx)(le,{value:a.algorithm,style:{width:160},onChange:e=>l(`algorithm`,e),options:c})]})})]}),(0,R.jsx)(k,{children:e(`layout.themeColor`)}),ft.map(({key:t,label:n})=>(0,R.jsxs)(`div`,{className:`flex justify-between items-center mb-2.5`,children:[(0,R.jsx)(`div`,{children:e(n)}),(0,R.jsx)(x,{showText:!0,value:a[t],onChange:e=>l(t,e.toCssString())})]},t)),(0,R.jsx)(k,{children:e(`layout.styleConfig`)}),pt.map(({key:t,label:n,type:r,...i})=>(0,R.jsxs)(`div`,{className:`flex justify-between items-center mb-2.5`,children:[(0,R.jsx)(`div`,{children:e(n)}),r===`switch`?(0,R.jsx)(De,{value:a[t],onChange:e=>l(t,e)}):(0,R.jsx)(C,{value:a[t],onChange:e=>l(t,e),...i})]},t))]})},_t=()=>{let{t:e}=M(),t=u(),n=b(e=>e.title),{menus:r}=B();return(0,P.useEffect)(()=>{let i=n||`Xin Admin`,a=z(r,t.pathname);if(!a){document.title=i;return}let o=a.local?e(a.local):a.name;o?document.title=o+` - `+i:document.title=i},[t.pathname,n,e,r]),null},{useToken:vt}=A,yt=()=>{let{t:e}=M(),{token:t}=vt(),n=m(),{menus:r,parentKey:i,collapsed:a,setParentKey:o,setSelectKey:s}=B(),c=b(e=>e.themeConfig),l=e=>{if(e.key&&(o(e.key),e.type!==`menu`)){if(s([e.key]),e.type===`route`&&e.link){window.open(e.path,`_blank`);return}if(e.type===`route`&&e.path){n(e.path);return}}};return(0,R.jsxs)(`div`,{className:`flex h-full`,children:[(0,R.jsx)(`div`,{className:`box-border shrink-0 h-full overflow-auto`,style:{borderRight:a?`none`:`1px solid `+c.colorBorder,width:79},children:r.filter(e=>e.hidden).map(n=>(0,R.jsxs)(`div`,{style:{backgroundColor:i===n.key?t.colorPrimaryBg:`transparent`,color:i===n.key?t.colorPrimary:c.siderColor},className:`flex items-center justify-center flex-col p-2 mb-2 pt-3 pb-3 cursor-pointer`,onClick:()=>l(n),children:[(0,R.jsx)(D,{name:n.icon,style:{fontSize:18}}),(0,R.jsx)(`span`,{className:`mt-1 truncate w-full text-center`,children:n.local?e(n.local):n.name})]},n.key))}),!a&&(0,R.jsx)(`div`,{className:`flex-1 h-full overflow-y-auto`,children:(0,R.jsx)(H,{})})]})},{Content:bt,Sider:xt}=L,St=()=>{let e=N(),t=b(e=>e.themeConfig),n=b(e=>e.layout),[r,i]=(0,P.useState)(226),{menus:a,collapsed:o,parentKey:s}=B();return(0,P.useEffect)(()=>{let e=t.siderWeight?t.siderWeight:226,r=n===`columns`?79:0,o=a.find(e=>e.key===s);[`mix`,`columns`].includes(n)?o?.children&&o?.children.length?i(r+e):i(r):i(e)},[t,n,a,s]),(0,R.jsxs)(L,{className:`min-h-screen`,style:{background:t.background},children:[(0,R.jsx)(_t,{}),(0,R.jsx)(gt,{}),(0,R.jsx)(it,{}),e&&(0,R.jsx)(st,{}),(0,R.jsxs)(L,{hasSider:!0,className:`relative`,children:[n!==`top`&&!e&&(0,R.jsx)(xt,{collapsed:o,width:r,style:{borderRight:`1px solid `+t.colorBorder,height:`calc(100vh - ${t.headerHeight}px)`,top:t.headerHeight,overflowY:`auto`,overflowX:`hidden`,position:`sticky`},children:n===`columns`?(0,R.jsx)(yt,{}):(0,R.jsx)(H,{})}),(0,R.jsxs)(L,{className:`min-w-0`,children:[(0,R.jsx)(bt,{style:{padding:t.bodyPadding},children:(0,R.jsx)(p,{})}),(0,R.jsx)(ot,{})]})]})]})},Ct=()=>(0,R.jsx)(et,{children:(0,R.jsx)(St,{})}),wt=Object.assign({"/web/pages/ai/agent/index.tsx":()=>d(()=>import(`./agent-BacKF2o-.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33])),"/web/pages/ai/chat/index.tsx":()=>d(()=>import(`./chat-CfnvY2VS.js`),__vite__mapDeps([34,1,2,3,35,36,33,4,5,6,7,8,9,21,10,15,11,12,13,14,16,17,18,19,20,23,24,25,26,37,38,39,40,41,42,43,44,45,46,47,30,48,49,50,51,31,32,52])),"/web/pages/ai/conversation/index.tsx":()=>d(()=>import(`./conversation-CgPPysYU.js`),__vite__mapDeps([53,1,2,33,4,5,6,7,8,9,54,21,10,14,15,16,17,18,19,24,20,11,12,40,41,55,22,56,44,25,39,57,37,45,58,59,60,61,62,63,43,46,64,65,66,67,47,48,68,69,70,71,49,50,72,73,74,75,76,77,78,79,80,81,82,83,84,51,85,86,87,27,88,38,89,90,29,31,91,92,26,93,28,30,94,95,96,97,98,42,99,100,36])),"/web/pages/client/banner.tsx":()=>d(()=>import(`./banner-CJe0agU6.js`),__vite__mapDeps([101,1,2,4,5,6,7,8,9,102,54,21,10,14,15,16,17,18,19,24,20,11,12,40,41,55,22,56,44,25,39,57,37,45,58,59,60,61,62,63,43,46,64,65,66,67,47,48,68,69,70,71,49,50,72,73,74,75,76,77,78,79,80,81,82,83,84,51,29,91,85,86,87,27,88,38,89,90,92,33,26,93,28,30,31,94,95,96,97,98,42,99,100,36])),"/web/pages/client/nav.tsx":()=>d(()=>import(`./nav-Dih5jXxX.js`),__vite__mapDeps([103,1,2,4,5,6,7,8,9,102,54,21,10,14,15,16,17,18,19,24,20,11,12,40,41,55,22,56,44,25,39,57,37,45,58,59,60,61,62,63,43,46,64,65,66,67,47,48,68,69,70,71,49,50,72,73,74,75,76,77,78,79,80,81,82,83,84,51,29,91,85,86,87,27,88,38,89,90,92,33,26,93,28,30,31,94,95,96,97,98,42,99,100,36])),"/web/pages/client/promo.tsx":()=>d(()=>import(`./promo-CfsZu-jA.js`),__vite__mapDeps([104,1,2,4,5,6,7,8,9,102,54,21,10,14,15,16,17,18,19,24,20,11,12,40,41,55,22,56,44,25,39,57,37,45,58,59,60,61,62,63,43,46,64,65,66,67,47,48,68,69,70,71,49,50,72,73,74,75,76,77,78,79,80,81,82,83,84,51,29,91,85,86,87,27,88,38,89,90,92,33,26,93,28,30,31,94,95,96,97,98,42,99,100,36])),"/web/pages/client/special.tsx":()=>d(()=>import(`./special-DQ_cXCQl.js`),__vite__mapDeps([105,1,2,33,4,5,6,7,8,9,15,11,12,55,40,41,21,10,22,56,44,58,20,14,16,17,18,19,61,62,24,63,102,54,25,39,57,37,45,59,60,43,46,64,65,66,67,47,48,68,69,70,71,49,50,72,73,74,75,76,77,78,79,80,81,82,83,84,51,29,91,85,86,87,27,88,38,89,90,92,26,93,28,30,31,94,95,96,97,98,42,99,100,36,106,107,108])),"/web/pages/customer/level.tsx":()=>d(()=>import(`./level-BCGrZbbc.js`),__vite__mapDeps([109,1,2,4,5,6,7,8,9,102,54,21,10,14,15,16,17,18,19,24,20,11,12,40,41,55,22,56,44,25,39,57,37,45,58,59,60,61,62,63,43,46,64,65,66,67,47,48,68,69,70,71,49,50,72,73,74,75,76,77,78,79,80,81,82,83,84,51,29,91,85,86,87,27,88,38,89,90,92,33,26,93,28,30,31,94,95,96,97,98,42,99,100,36])),"/web/pages/customer/notice.tsx":()=>d(()=>import(`./notice-DkzNYgG3.js`),__vite__mapDeps([110,1,2,4,5,6,7,8,9,29,18,19,15,12,91,54,21,10,14,16,17,24,20,11,40,41,55,22,56,44,25,39,57,37,45,58,59,60,61,62,63,43,46,64,65,66,67,47,48,68,69,70,71,49,50,72,73,74,75,76,77,78,79,80,81,82,83,84,51,85,86,87,27,88,38,89,90,92,33,26,93,28,30,31,94,95,96,97,98,42,99,100,36,111])),"/web/pages/customer/store.tsx":()=>d(()=>import(`./store-B-wG8BVA.js`),__vite__mapDeps([112,1,2,33,4,5,6,7,8,9,29,18,19,15,12,91,54,21,10,14,16,17,24,20,11,40,41,55,22,56,44,25,39,57,37,45,58,59,60,61,62,63,43,46,64,65,66,67,47,48,68,69,70,71,49,50,72,73,74,75,76,77,78,79,80,81,82,83,84,51,85,86,87,27,88,38,89,90,92,26,93,28,30,31,94,95,96,97,98,42,99,100,36])),"/web/pages/customer/supplier.tsx":()=>d(()=>import(`./supplier-D0qvu-sA.js`),__vite__mapDeps([113,1,2,4,5,6,7,8,9,29,18,19,15,12,91,54,21,10,14,16,17,24,20,11,40,41,55,22,56,44,25,39,57,37,45,58,59,60,61,62,63,43,46,64,65,66,67,47,48,68,69,70,71,49,50,72,73,74,75,76,77,78,79,80,81,82,83,84,51,85,86,87,27,88,38,89,90,92,33,26,93,28,30,31,94,95,96,97,98,42,99,100,36])),"/web/pages/dashboard/analysis.tsx":()=>d(()=>import(`./analysis-ChRcSk16.js`),__vite__mapDeps([114,1,2,33,85,19,5,21,10,24,12,11,55,9,15,6,40,41,22,56,44,39,86,62,87,27,88,45,8,38,89,90,66,67,47,26,93,63,37,115,29,18,30,71,49,81,82,31,97,116])),"/web/pages/dashboard/monitor.tsx":()=>d(()=>import(`./monitor-Dd1gBWfo.js`),__vite__mapDeps([117,2,1,10,5,23,24,25,26,15,93,63,37,118,19,55,9,6,40,41,21,22,56,44,27,89,90,30,71,49,31])),"/web/pages/dashboard/workplace.tsx":()=>d(()=>import(`./workplace-I8FwqFbs.js`),__vite__mapDeps([119,2,1,4,5,6,7,8,9,10,22,23,24,25,120,26,15,37,59,60,118,19,55,40,41,21,56,44,27,63,89,90,29,18,12,70,75,81,84,100,36,33,31])),"/web/pages/example/icon-selector.tsx":()=>d(()=>import(`./icon-selector-Dy7uWjj7.js`),__vite__mapDeps([121,1,2,4,5,6,7,8,9,10,92,33,54,21,14,15,16,17,18,19,24,20,11,12,40,41,55,22,56,44,25,39,57,37,45,58,59,60,61,62,63,43,46,64,65,66,67,47,48,68,69,70,71,49,50,72,73,74,75,76,77,78,79,80,81,82,83,84,51,85,86,87,27,88,38,89,90,26,93,28,29,30,31,94,95,96,97,98])),"/web/pages/example/image-uploader.tsx":()=>d(()=>import(`./image-uploader-DBHOFZqO.js`),__vite__mapDeps([122,1,2,4,5,6,7,8,9,10,11,12,26,15,61,14,16,62,24,63,94,33,58,20,21,17,18,19,41,64,95,46,96,67,48,68,31,97])),"/web/pages/example/user-selector.tsx":()=>d(()=>import(`./user-selector-C_7kHqFz.js`),__vite__mapDeps([123,1,2,4,5,6,7,8,9,10,92,33,54,21,14,15,16,17,18,19,24,20,11,12,40,41,55,22,56,44,25,39,57,37,45,58,59,60,61,62,63,43,46,64,65,66,67,47,48,68,69,70,71,49,50,72,73,74,75,76,77,78,79,80,81,82,83,84,51,85,86,87,27,88,38,89,90,26,93,28,29,30,31,94,95,96,97,98])),"/web/pages/example/xin-form.tsx":()=>d(()=>import(`./xin-form-CjpDqXrA.js`),__vite__mapDeps([124,1,2,4,5,6,7,8,9,10,11,12,92,33,54,21,14,15,16,17,18,19,24,20,40,41,55,22,56,44,25,39,57,37,45,58,59,60,61,62,63,43,46,64,65,66,67,47,48,68,69,70,71,49,50,72,73,74,75,76,77,78,79,80,81,82,83,84,51,85,86,87,27,88,38,89,90,26,93,28,29,30,31,94,95,96,97,98])),"/web/pages/example/xin-table.tsx":()=>d(()=>import(`./xin-table-Bw1qt43O.js`),__vite__mapDeps([125,2,1,11,12,29,5,18,19,15,72,91,54,21,10,14,9,16,17,6,24,20,40,41,55,22,56,44,25,39,57,37,45,8,58,59,60,61,62,63,43,46,7,64,65,66,67,47,48,68,69,70,71,49,50,73,74,75,76,77,78,79,80,81,82,83,84,51,85,86,87,27,88,38,89,90,92,33,26,93,28,30,31,94,95,96,97,98,42,99,100,36])),"/web/pages/exception/403.tsx":()=>d(()=>import(`./403-kF5cJUEE.js`),__vite__mapDeps([126,1,2,11,12,26,15,127,14,9,16,65])),"/web/pages/exception/404.tsx":()=>d(()=>import(`./404-CF76bH-T.js`),__vite__mapDeps([128,1,2,11,12,26,15,127,14,9,16,65])),"/web/pages/exception/500.tsx":()=>d(()=>import(`./500-pw04psNL.js`),__vite__mapDeps([129,1,2,11,12,26,15,127,14,9,16,65])),"/web/pages/login/index.tsx":()=>d(()=>import(`./login-CKGg-k4h.js`).then(e=>e.n),__vite__mapDeps([130,1,2,3,35,36,33,4,5,6,7,8,9,10,11,12,57,88,87,93,63,24,37,38,39,40,41,21,61,14,16,62,43,44,45,46,90,69,79,51,100,31])),"/web/pages/multi-menu/first.tsx":()=>d(()=>import(`./first-VYyrluR5.js`),__vite__mapDeps([131,2,1,10,5,11,12,132,56,39,40,41,21,26,15,93,63,24])),"/web/pages/multi-menu/second.tsx":()=>d(()=>import(`./second-urN6pQJ9.js`),__vite__mapDeps([133,2,1,10,5,11,12,132,56,39,40,41,21,26,15,93,63,24])),"/web/pages/multi-menu/third.tsx":()=>d(()=>import(`./third-CmYUgLWR.js`),__vite__mapDeps([134,2,1,10,5,11,12,132,56,39,40,41,21,26,15,93,63,24])),"/web/pages/order/store.tsx":()=>d(()=>import(`./store-CGacVUaW.js`),__vite__mapDeps([135,1,2,33,4,5,6,7,8,9,54,21,10,14,15,16,17,18,19,24,20,11,12,40,41,55,22,56,44,25,39,57,37,45,58,59,60,61,62,63,43,46,64,65,66,67,47,48,68,69,70,71,49,50,72,73,74,75,76,77,78,79,80,81,82,83,84,51,92,85,86,87,27,88,38,89,90,26,93,28,29,30,31,94,95,96,97,98,136,102,137,91,42,99,100,36,111,116,138,108,139])),"/web/pages/page-layout/base-layout.tsx":()=>d(()=>import(`./base-layout-o2EQVE3N.js`),__vite__mapDeps([140,2,1,4,5,6,7,8,9,10,11,12,23,24,25,26,15,93,63,136,38,39,40,41,21,42,96,14,115,29,18,19,80,83,84,51])),"/web/pages/page-layout/descriptions.tsx":()=>d(()=>import(`./descriptions-DSR6x1nO.js`),__vite__mapDeps([141,2,1,4,5,6,7,8,9,85,19,21,10,24,12,11,55,15,40,41,22,56,44,39,86,62,87,27,88,45,38,89,90,66,67,47,23,25,26,93,63,37,59,136,42,142,29,18,68,73,78,83,51])),"/web/pages/page-layout/fix-header.tsx":()=>d(()=>import(`./fix-header-DIZqZWCz.js`),__vite__mapDeps([143,1,2,4,5,6,7,8,9,10,11,12,23,24,25,120,26,15,93,63,37,59,136,42,61,14,16,62,43,44,45,46,142,29,18,19,72,73,74,78])),"/web/pages/product/category.tsx":()=>d(()=>import(`./category-BQA8kSpc.js`),__vite__mapDeps([144,1,2,4,5,6,7,8,9,54,21,10,14,15,16,17,18,19,24,20,11,12,40,41,55,22,56,44,25,39,57,37,45,58,59,60,61,62,63,43,46,64,65,66,67,47,48,68,69,70,71,49,50,72,73,74,75,76,77,78,79,80,81,82,83,84,51,92,33,85,86,87,27,88,38,89,90,26,93,28,29,30,31,94,95,96,97,98,91,42,99,100,36,145])),"/web/pages/product/goods.tsx":()=>d(()=>import(`./goods-Cnky5f-7.js`),__vite__mapDeps([146,1,2,4,5,6,7,8,9,54,21,10,14,15,16,17,18,19,24,20,11,12,40,41,55,22,56,44,25,39,57,37,45,58,59,60,61,62,63,43,46,64,65,66,67,47,48,68,69,70,71,49,50,72,73,74,75,76,77,78,79,80,81,82,83,84,51,147,85,86,87,27,88,38,89,90,92,33,26,93,28,29,30,31,94,95,96,97,98,102,91,42,99,100,36,106,107,108,145,148])),"/web/pages/purchase/order.tsx":()=>d(()=>import(`./order-BsK8e9QB.js`),__vite__mapDeps([149,1,2,4,5,6,7,8,9,54,21,10,14,15,16,17,18,19,24,20,11,12,40,41,55,22,56,44,25,39,57,37,45,58,59,60,61,62,63,43,46,64,65,66,67,47,48,68,69,70,71,49,50,72,73,74,75,76,77,78,79,80,81,82,83,84,51,85,86,87,27,88,38,89,90,92,33,26,93,28,29,30,31,94,95,96,97,98,136,137,91,42,99,100,36,107,108,138,139,148,150])),"/web/pages/recon/bill.tsx":()=>d(()=>import(`./bill-d4QJGLlp.js`),__vite__mapDeps([151,1,2,33,4,5,6,7,8,9,54,21,10,14,15,16,17,18,19,24,20,11,12,40,41,55,22,56,44,25,39,57,37,45,58,59,60,61,62,63,43,46,64,65,66,67,47,48,68,69,70,71,49,50,72,73,74,75,76,77,78,79,80,81,82,83,84,51,85,86,87,27,88,38,89,90,92,26,93,28,29,30,31,94,95,96,97,98,136,91,42,99,100,36,108,111,116,139,145])),"/web/pages/recon/container-return.tsx":()=>d(()=>import(`./container-return-DT66R0pD.js`),__vite__mapDeps([152,1,2,4,5,6,7,8,9,11,12,55,15,40,41,21,10,22,56,44,57,92,33,54,14,16,17,18,19,24,20,25,39,37,45,58,59,60,61,62,63,43,46,64,65,66,67,47,48,68,69,70,71,49,50,72,73,74,75,76,77,78,79,80,81,82,83,84,51,85,86,87,27,88,38,89,90,26,93,28,29,30,31,94,95,96,97,98,91,42,99,100,36,108,111])),"/web/pages/recon/payment.tsx":()=>d(()=>import(`./payment-m5LFx4J0.js`),__vite__mapDeps([153,1,2,33,4,5,6,7,8,9,54,21,10,14,15,16,17,18,19,24,20,11,12,40,41,55,22,56,44,25,39,57,37,45,58,59,60,61,62,63,43,46,64,65,66,67,47,48,68,69,70,71,49,50,72,73,74,75,76,77,78,79,80,81,82,83,84,51,85,86,87,27,88,38,89,90,136,102,29,91,92,26,93,28,30,31,94,95,96,97,98,42,99,100,36,111,139])),"/web/pages/result/fail.tsx":()=>d(()=>import(`./fail-BFEpQBfc.js`),__vite__mapDeps([154,1,2,4,5,6,7,8,9,11,12,26,15,127,14,16,65,74])),"/web/pages/result/info.tsx":()=>d(()=>import(`./info-DmaRTlzJ.js`),__vite__mapDeps([155,1,2,11,12,26,15,127,14,9,16,65])),"/web/pages/result/success.tsx":()=>d(()=>import(`./success-BtLkPs9S.js`),__vite__mapDeps([156,1,2,11,12,26,15,127,14,9,16,65])),"/web/pages/result/warning.tsx":()=>d(()=>import(`./warning-D9M9NjTA.js`),__vite__mapDeps([157,1,2,11,12,26,15,127,14,9,16,65])),"/web/pages/system/ai.tsx":()=>d(()=>import(`./ai-BaBcitlo.js`),__vite__mapDeps([158,1,2,33,4,5,6,7,8,9,54,21,10,14,15,16,17,18,19,24,20,11,12,40,41,55,22,56,44,25,39,57,37,45,58,59,60,61,62,63,43,46,64,65,66,67,47,48,68,69,70,71,49,50,72,73,74,75,76,77,78,79,80,81,82,83,84,51,147,92,85,86,87,27,88,38,89,90,26,93,28,29,30,31,94,95,96,97,98])),"/web/pages/system/config.tsx":()=>d(()=>import(`./config-tH2RSZ-J.js`),__vite__mapDeps([159,1,2,33,4,5,6,7,8,9,54,21,10,14,15,16,17,18,19,24,20,11,12,40,41,55,22,56,44,25,39,57,37,45,58,59,60,61,62,63,43,46,64,65,66,67,47,48,68,69,70,71,49,50,72,73,74,75,76,77,78,79,80,81,82,83,84,51,92,85,86,87,27,88,38,89,90,26,93,28,29,30,31,94,95,96,97,98,137])),"/web/pages/system/dept.tsx":()=>d(()=>import(`./dept-wABp4Ul9.js`),__vite__mapDeps([160,1,2,33,4,5,6,7,8,9,54,21,10,14,15,16,17,18,19,24,20,11,12,40,41,55,22,56,44,25,39,57,37,45,58,59,60,61,62,63,43,46,64,65,66,67,47,48,68,69,70,71,49,50,72,73,74,75,76,77,78,79,80,81,82,83,84,51,147,85,86,87,27,88,38,89,90,92,26,93,28,29,30,31,94,95,96,97,98,137,99,100,36,150])),"/web/pages/system/dict/index.tsx":()=>d(()=>import(`./dict-j8wfnfhh.js`),__vite__mapDeps([161,1,2,3,4,5,6,7,8,9,54,21,10,14,15,16,17,18,19,24,20,11,12,40,41,55,22,56,44,25,39,57,37,45,58,59,60,61,62,63,43,46,64,65,66,67,47,48,68,69,70,71,49,50,72,73,74,75,76,77,78,79,80,81,82,83,84,51,120,31,162,36,33,91,85,86,87,27,88,38,89,90,92,26,93,28,29,30,94,95,96,97,98,42,99,100])),"/web/pages/system/dict/item.tsx":()=>d(()=>import(`./item-DyrMo47d.js`),__vite__mapDeps([163,1,2,3,4,5,6,7,8,9,10,11,12,40,120,57,92,33,54,21,14,15,16,17,18,19,24,20,41,55,22,56,44,25,39,37,45,58,59,60,61,62,63,43,46,64,65,66,67,47,48,68,69,70,71,49,50,72,73,74,75,76,77,78,79,80,81,82,83,84,51,85,86,87,27,88,38,89,90,26,93,28,29,30,31,94,95,96,97,98,91,42,99,100,36])),"/web/pages/system/file.tsx":()=>d(()=>import(`./file-BhqTJxRm.js`),__vite__mapDeps([164,1,2,33,4,5,6,7,8,9,54,21,10,14,15,16,17,18,19,24,20,11,12,40,41,55,22,56,44,25,39,57,37,45,58,59,60,61,62,63,43,46,64,65,66,67,47,48,68,69,70,71,49,50,72,73,74,75,76,77,78,79,80,81,82,83,84,51,85,86,87,27,88,38,89,90,92,26,93,28,29,30,31,94,95,96,97,98,136,102])),"/web/pages/system/info.tsx":()=>d(()=>import(`./info-CVHNTwj4.js`),__vite__mapDeps([165,2,1,4,5,6,7,8,9,23,24,25,26,15,37,60,142,12,29,18,19,76,79,51,31])),"/web/pages/system/mail.tsx":()=>d(()=>import(`./mail-ChpDRzPT.js`),__vite__mapDeps([166,1,2,33,4,5,6,7,8,9,54,21,10,14,15,16,17,18,19,24,20,11,12,40,41,55,22,56,44,25,39,57,37,45,58,59,60,61,62,63,43,46,64,65,66,67,47,48,68,69,70,71,49,50,72,73,74,75,76,77,78,79,80,81,82,83,84,51,92,85,86,87,27,88,38,89,90,26,93,28,29,30,31,94,95,96,97,98])),"/web/pages/system/role.tsx":()=>d(()=>import(`./role-D-VBhILf.js`),__vite__mapDeps([167,1,2,33,4,5,6,7,8,9,54,21,10,14,15,16,17,18,19,24,20,11,12,40,41,55,22,56,44,25,39,57,37,45,58,59,60,61,62,63,43,46,64,65,66,67,47,48,68,69,70,71,49,50,72,73,74,75,76,77,78,79,80,81,82,83,84,51,85,86,87,27,88,38,89,90,26,93,28,29,31,168,91,92,30,94,95,96,97,98,42,99,100,36])),"/web/pages/system/rule.tsx":()=>d(()=>import(`./rule-CqyTke2b.js`),__vite__mapDeps([169,1,2,33,4,5,6,7,8,9,54,21,10,14,15,16,17,18,19,24,20,11,12,40,41,55,22,56,44,25,39,57,37,45,58,59,60,61,62,63,43,46,64,65,66,67,47,48,68,69,70,71,49,50,72,73,74,75,76,77,78,79,80,81,82,83,84,51,120,28,29,31,162,36,168,91,85,86,87,27,88,38,89,90,92,26,93,30,94,95,96,97,98,42,99,100,150])),"/web/pages/system/storage.tsx":()=>d(()=>import(`./storage-DhJApafx.js`),__vite__mapDeps([170,1,2,33,4,5,6,7,8,9,54,21,10,14,15,16,17,18,19,24,20,11,12,40,41,55,22,56,44,25,39,57,37,45,58,59,60,61,62,63,43,46,64,65,66,67,47,48,68,69,70,71,49,50,72,73,74,75,76,77,78,79,80,81,82,83,84,51,92,85,86,87,27,88,38,89,90,26,93,28,29,30,31,94,95,96,97,98])),"/web/pages/system/user.tsx":()=>d(()=>import(`./user-Bt-PQ9Uv.js`),__vite__mapDeps([171,1,2,4,5,6,7,8,9,54,21,10,14,15,16,17,18,19,24,20,11,12,40,41,55,22,56,44,25,39,57,37,45,58,59,60,61,62,63,43,46,64,65,66,67,47,48,68,69,70,71,49,50,72,73,74,75,76,77,78,79,80,81,82,83,84,51,23,29,100,36,33,31,168,91,85,86,87,27,88,38,89,90,92,26,93,28,30,94,95,96,97,98,42,99,150])),"/web/pages/user/profile.tsx":()=>d(()=>import(`./profile-CGJ4n7jj.js`),__vite__mapDeps([172,1,2,4,5,6,7,8,9,10,11,12,23,24,25,57,86,62,87,26,15,61,14,16,63,43,44,45,46,118,19,55,40,41,21,22,56,27,89,90,64,17,29,18,95,96,67,48,68,73,74,75,77,51,100,36,33,31,173]))}),Tt=[`/login`];function Et(e){return(0,R.jsx)(P.Suspense,{fallback:null,children:(0,R.jsx)((0,P.lazy)(e),{})})}function Dt(){let e=[];for(let t in wt){let n=t.replace(`/web/pages`,``).replace(/\.tsx$/,``).replace(/\/index$/,``);n||=`/`,!Tt.includes(n)&&e.push({id:n,path:n,element:Et(wt[t])})}return e}function Ot(){return f([{Component:Ct,children:[...Dt(),{path:`*`,element:Et(wt[`/web/pages/result/404.tsx`])}]},{path:`/`,element:(0,R.jsx)(g,{to:`/dashboard/analysis`})},{path:`login`,element:(0,R.jsx)(Le,{})}])}function kt(){let{message:e,modal:t,notification:n}=ce.useApp();return window.$message=e,window.$modal=t,window.$notification=n,null}var At=({children:e})=>{let t=b(e=>e.themeConfig),{antdLocale:n}=Fe();return(0,R.jsx)(oe,{theme:(0,P.useMemo)(()=>({components:{Layout:{headerPadding:`0 `+t.headerPadding+`px`,headerHeight:t.headerHeight,bodyBg:t.bodyBg,footerBg:t.footerBg,headerBg:t.headerBg,headerColor:t.headerColor,siderBg:t.siderBg,footerPadding:0},Menu:{activeBarBorderWidth:0,itemBg:`transparent`,subMenuItemBg:`transparent`}},token:{colorPrimary:t.colorPrimary,colorBgBase:t.colorBg,colorTextBase:t.colorText,colorError:t.colorError,colorInfo:t.colorPrimary,colorLink:t.colorPrimary,colorSuccess:t.colorSuccess,colorWarning:t.colorWarning,borderRadius:t.borderRadius,controlHeight:t.controlHeight},algorithm:t.algorithm?lt[t.algorithm]:void 0}),[t]),locale:n,children:(0,R.jsxs)(ce,{children:[(0,R.jsx)(kt,{}),e]})})},jt=()=>{let{changeLanguage:e}=Fe(),t=j(e=>e.info),n=b(e=>e.initWebInfo),r=Re(e=>e.initDict),[i,a]=(0,P.useState)(),o=async()=>{n(),await r(),await e(localStorage.getItem(`i18nextLng`)||`zh`),localStorage.getItem(`token`)?await t():window.location.pathname!==`/login`&&(window.location.href=`/login`)};return(0,P.useEffect)(()=>{o(),a(Ot())},[]),(0,R.jsx)(At,{children:i&&(0,R.jsx)(h,{router:i})})},U=e=>typeof e==`string`,W=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},Mt=e=>e==null?``:``+e,Nt=(e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})},Pt=/###/g,Ft=e=>e&&e.indexOf(`###`)>-1?e.replace(Pt,`.`):e,It=e=>!e||U(e),G=(e,t,n)=>{let r=U(t)?t.split(`.`):t,i=0;for(;i{let{obj:r,k:i}=G(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let a=t[t.length-1],o=t.slice(0,t.length-1),s=G(e,o,Object);for(;s.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),s=G(e,o,Object),s?.obj&&s.obj[`${s.k}.${a}`]!==void 0&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=n},Rt=(e,t,n,r)=>{let{obj:i,k:a}=G(e,t,Object);i[a]=i[a]||[],i[a].push(n)},K=(e,t)=>{let{obj:n,k:r}=G(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},zt=(e,t,n)=>{let r=K(e,n);return r===void 0?K(t,n):r},Bt=(e,t,n)=>{for(let r in t)r!==`__proto__`&&r!==`constructor`&&(r in e?U(e[r])||e[r]instanceof String||U(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):Bt(e[r],t[r],n):e[r]=t[r]);return e},q=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,`\\$&`),Vt={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`,"/":`/`},Ht=e=>U(e)?e.replace(/[&<>"'\/]/g,e=>Vt[e]):e,Ut=class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(t!==void 0)return t;let n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}},Wt=[` `,`,`,`?`,`!`,`;`],Gt=new Ut(20),Kt=(e,t,n)=>{t||=``,n||=``;let r=Wt.filter(e=>t.indexOf(e)<0&&n.indexOf(e)<0);if(r.length===0)return!0;let i=Gt.getRegExp(`(${r.map(e=>e===`?`?`\\?`:e).join(`|`)})`),a=!i.test(e);if(!a){let t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(a=!0)}return a},qt=(e,t,n=`.`)=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;let r=t.split(n),i=e;for(let e=0;e-1&&oe?.replace(/_/g,`-`),Jt={type:`logger`,log(e){this.output(`log`,e)},warn(e){this.output(`warn`,e)},error(e){this.output(`error`,e)},output(e,t){console?.[e]?.apply?.(console,t)}},Y=new class e{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||`i18next:`,this.logger=e||Jt,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,`log`,``,!0)}warn(...e){return this.forward(e,`warn`,``,!0)}error(...e){return this.forward(e,`error`,``)}deprecate(...e){return this.forward(e,`warn`,`WARNING DEPRECATED: `,!0)}forward(e,t,n,r){return r&&!this.debug?null:(U(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(t){return new e(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t||=this.options,t.prefix=t.prefix||this.prefix,new e(this.logger,t)}},X=class{constructor(){this.observers={}}on(e,t){return e.split(` `).forEach(e=>{this.observers[e]||(this.observers[e]=new Map);let n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let r=0;r{for(let i=0;i-1&&this.options.ns.splice(t,1)}getResource(e,t,n,r={}){let i=r.keySeparator===void 0?this.options.keySeparator:r.keySeparator,a=r.ignoreJSONStructure===void 0?this.options.ignoreJSONStructure:r.ignoreJSONStructure,o;e.indexOf(`.`)>-1?o=e.split(`.`):(o=[e,t],n&&(Array.isArray(n)?o.push(...n):U(n)&&i?o.push(...n.split(i)):o.push(n)));let s=K(this.data,o);return!s&&!t&&!n&&e.indexOf(`.`)>-1&&(e=o[0],t=o[1],n=o.slice(2).join(`.`)),s||!a||!U(n)?s:qt(this.data?.[e]?.[t],n,i)}addResource(e,t,n,r,i={silent:!1}){let a=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,o=[e,t];n&&(o=o.concat(a?n.split(a):n)),e.indexOf(`.`)>-1&&(o=e.split(`.`),r=t,t=o[1]),this.addNamespaces(t),Lt(this.data,o,r),i.silent||this.emit(`added`,e,t,n,r)}addResources(e,t,n,r={silent:!1}){for(let r in n)(U(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit(`added`,e,t,n)}addResourceBundle(e,t,n,r,i,a={silent:!1,skipCopy:!1}){let o=[e,t];e.indexOf(`.`)>-1&&(o=e.split(`.`),r=n,n=t,t=o[1]),this.addNamespaces(t);let s=K(this.data,o)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?Bt(s,n,i):s={...s,...n},Lt(this.data,o,s),a.silent||this.emit(`added`,e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit(`removed`,e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||=this.options.defaultNS,this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}},Xt={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(e=>{t=this.processors[e]?.process(t,n,r,i)??t}),t}},Zt=Symbol(`i18next/PATH_KEY`);function Qt(){let e=[],t=Object.create(null),n;return t.get=(r,i)=>(n?.revoke?.(),i===Zt?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function Z(e,t){let{[Zt]:n}=e(Qt()),r=t?.keySeparator??`.`,i=t?.nsSeparator??`:`;if(n.length>1&&i){let e=t?.ns,a=Array.isArray(e)?e:null;if(a&&a.length>1&&a.slice(1).includes(n[0]))return`${n[0]}${i}${n.slice(1).join(r)}`}return n.join(r)}var $t={},en=e=>!U(e)&&typeof e!=`boolean`&&typeof e!=`number`,tn=class e extends X{constructor(e,t={}){super(),Nt([`resourceStore`,`languageUtils`,`pluralResolver`,`interpolator`,`backendConnector`,`i18nFormat`,`utils`],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.logger=Y.create(`translator`)}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){let n={...t};if(e==null)return!1;let r=this.resolve(e,n);if(r?.res===void 0)return!1;let i=en(r.res);return!(n.returnObjects===!1&&i)}extractFromKey(e,t){let n=t.nsSeparator===void 0?this.options.nsSeparator:t.nsSeparator;n===void 0&&(n=`:`);let r=t.keySeparator===void 0?this.options.keySeparator:t.keySeparator,i=t.ns||this.options.defaultNS||[],a=n&&e.indexOf(n)>-1,o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!Kt(e,n,r);if(a&&!o){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:U(i)?[i]:i};let a=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(a[0])>-1)&&(i=a.shift()),e=a.join(r)}return{key:e,namespaces:U(i)?[i]:i}}translate(t,n,r){let i=typeof n==`object`?{...n}:n;if(typeof i!=`object`&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i==`object`&&(i={...i}),i||={},t==null)return``;typeof t==`function`&&(t=Z(t,{...this.options,...i})),Array.isArray(t)||(t=[String(t)]),t=t.map(e=>typeof e==`function`?Z(e,{...this.options,...i}):String(e));let a=i.returnDetails===void 0?this.options.returnDetails:i.returnDetails,o=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,{key:s,namespaces:c}=this.extractFromKey(t[t.length-1],i),l=c[c.length-1],u=i.nsSeparator===void 0?this.options.nsSeparator:i.nsSeparator;u===void 0&&(u=`:`);let d=i.lng||this.language,f=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d?.toLowerCase()===`cimode`)return f?a?{res:`${l}${u}${s}`,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:`${l}${u}${s}`:a?{res:s,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:s;let p=this.resolve(t,i),m=p?.res,h=p?.usedKey||s,g=p?.exactUsedKey||s,_=[`[object Number]`,`[object Function]`,`[object RegExp]`],v=i.joinArrays===void 0?this.options.joinArrays:i.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,b=i.count!==void 0&&!U(i.count),x=e.hasDefaultValue(i),S=b?this.pluralResolver.getSuffix(d,i.count,i):``,ee=i.ordinal&&b?this.pluralResolver.getSuffix(d,i.count,{ordinal:!1}):``,C=b&&!i.ordinal&&i.count===0,w=C&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${S}`]||i[`defaultValue${ee}`]||i.defaultValue,T=m;y&&!m&&x&&(T=w);let E=en(T),te=Object.prototype.toString.apply(T);if(y&&T&&E&&_.indexOf(te)<0&&!(U(v)&&Array.isArray(T))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,T,{...i,ns:c}):`key '${s} (${this.language})' returned an object instead of string.`;return a?(p.res=e,p.usedParams=this.getUsedParamsDetails(i),p):e}if(o){let e=Array.isArray(T),t=e?[]:{},n=e?g:h;for(let e in T)if(Object.prototype.hasOwnProperty.call(T,e)){let r=`${n}${o}${e}`;x&&!m?t[e]=this.translate(r,{...i,defaultValue:en(w)?w[e]:void 0,joinArrays:!1,ns:c}):t[e]=this.translate(r,{...i,joinArrays:!1,ns:c}),t[e]===r&&(t[e]=T[e])}m=t}}else if(y&&U(v)&&Array.isArray(m))m=m.join(v),m&&=this.extendTranslation(m,t,i,r);else{let e=!1,n=!1;!this.isValidLookup(m)&&x&&(e=!0,m=w),this.isValidLookup(m)||(n=!0,m=s);let a=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&n?void 0:m,c=x&&w!==m&&this.options.updateMissing;if(n||e||c){if(this.logger.log(c?`updateKey`:`missingKey`,d,l,s,c?w:m),o){let e=this.resolve(s,{...i,keySeparator:!1});e&&e.res&&this.logger.warn(`Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.`)}let e=[],t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo===`fallback`&&t&&t[0])for(let n=0;n{let r=x&&n!==m?n:a;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,r,c,i):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,t,r,c,i),this.emit(`missingKey`,e,l,t,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?e.forEach(e=>{let t=this.pluralResolver.getSuffixes(e,i);C&&i[`defaultValue${this.options.pluralSeparator}zero`]&&t.indexOf(`${this.options.pluralSeparator}zero`)<0&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],s+t,i[`defaultValue${t}`]||w)})}):n(e,s,w))}m=this.extendTranslation(m,t,i,p,r),n&&m===s&&this.options.appendNamespaceToMissingKey&&(m=`${l}${u}${s}`),(n||e)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${u}${s}`:s,e?m:void 0,i))}return a?(p.res=m,p.usedParams=this.getUsedParamsDetails(i),p):m}extendTranslation(e,t,n,r,i){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});let a=U(e)&&(n?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:n.interpolation.skipOnVariables),o;if(a){let t=e.match(this.interpolator.nestingRegexp);o=t&&t.length}let s=n.replace&&!U(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,n.lng||this.language||r.usedLng,n),a){let t=e.match(this.interpolator.nestingRegexp),r=t&&t.length;oi?.[0]===e[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null):this.translate(...e,t),n)),n.interpolation&&this.interpolator.reset()}let a=n.postProcess||this.options.postProcess,o=U(a)?[a]:a;return e!=null&&o?.length&&n.applyPostProcessor!==!1&&(e=Xt.handle(o,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,r,i,a,o;return U(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>typeof e==`function`?Z(e,{...this.options,...t}):e)),e.forEach(e=>{if(this.isValidLookup(n))return;let s=this.extractFromKey(e,t),c=s.key;r=c;let l=s.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));let u=t.count!==void 0&&!U(t.count),d=u&&!t.ordinal&&t.count===0,f=t.context!==void 0&&(U(t.context)||typeof t.context==`number`)&&t.context!==``,p=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);l.forEach(e=>{this.isValidLookup(n)||(o=e,!$t[`${p[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(o)&&($t[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${p.join(`, `)}" won't get resolved as namespace "${o}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`)),p.forEach(r=>{if(this.isValidLookup(n))return;a=r;let o=[c];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(o,c,r,e,t);else{let e;u&&(e=this.pluralResolver.getSuffix(r,t.count,t));let n=`${this.options.pluralSeparator}zero`,i=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(t.ordinal&&e.indexOf(i)===0&&o.push(c+e.replace(i,this.options.pluralSeparator)),o.push(c+e),d&&o.push(c+n)),f){let r=`${c}${this.options.contextSeparator||`_`}${t.context}`;o.push(r),u&&(t.ordinal&&e.indexOf(i)===0&&o.push(r+e.replace(i,this.options.pluralSeparator)),o.push(r+e),d&&o.push(r+n))}}let s;for(;s=o.pop();)this.isValidLookup(n)||(i=s,n=this.getResource(r,e,s,t))}))})}),{res:n,usedKey:r,exactUsedKey:i,usedLng:a,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e===``)}getResource(e,t,n,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){let t=[`defaultValue`,`ordinal`,`context`,`replace`,`lng`,`lngs`,`fallbackLng`,`ns`,`keySeparator`,`nsSeparator`,`returnObjects`,`returnDetails`,`joinArrays`,`postProcess`,`interpolation`],n=e.replace&&!U(e.replace),r=n?e.replace:e;if(n&&e.count!==void 0&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(let e of t)delete r[e]}return r}static hasDefaultValue(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&t.substring(0,12)===`defaultValue`&&e[t]!==void 0)return!0;return!1}},nn=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Y.create(`languageUtils`)}getScriptPartFromCode(e){if(e=J(e),!e||e.indexOf(`-`)<0)return null;let t=e.split(`-`);return t.length===2||(t.pop(),t[t.length-1].toLowerCase()===`x`)?null:this.formatLanguageCode(t.join(`-`))}getLanguagePartFromCode(e){if(e=J(e),!e||e.indexOf(`-`)<0)return e;let t=e.split(`-`);return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(U(e)&&e.indexOf(`-`)>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load===`languageOnly`||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;let n=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(n))&&(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;let r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>{if(e===r||!(e.indexOf(`-`)<0&&r.indexOf(`-`)<0)&&(e.indexOf(`-`)>0&&r.indexOf(`-`)<0&&e.substring(0,e.indexOf(`-`))===r||e.indexOf(r)===0&&r.length>1))return e})}),t||=this.getFallbackCodes(this.options.fallbackLng)[0],t}getFallbackCodes(e,t){if(!e)return[];if(typeof e==`function`&&(e=e(t)),U(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||=e[this.getScriptPartFromCode(t)],n||=e[this.formatLanguageCode(t)],n||=e[this.getLanguagePartFromCode(t)],n||=e.default,n||[]}toResolveHierarchy(e,t){let n=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),r=[],i=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return U(e)&&(e.indexOf(`-`)>-1||e.indexOf(`_`)>-1)?(this.options.load!==`languageOnly`&&i(this.formatLanguageCode(e)),this.options.load!==`languageOnly`&&this.options.load!==`currentOnly`&&i(this.getScriptPartFromCode(e)),this.options.load!==`currentOnly`&&i(this.getLanguagePartFromCode(e))):U(e)&&i(this.formatLanguageCode(e)),n.forEach(e=>{r.indexOf(e)<0&&i(this.formatLanguageCode(e))}),r}},rn={zero:0,one:1,two:2,few:3,many:4,other:5},an={select:e=>e===1?`one`:`other`,resolvedOptions:()=>({pluralCategories:[`one`,`other`]})},on=class{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=Y.create(`pluralResolver`),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let n=J(e===`dev`?`en`:e),r=t.ordinal?`ordinal`:`cardinal`,i=JSON.stringify({cleanedCode:n,type:r});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let a;try{a=new Intl.PluralRules(n,{type:r})}catch{if(typeof Intl>`u`)return this.logger.error(`No Intl support, please use an Intl polyfill!`),an;if(!e.match(/-|_/))return an;let n=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(n,t)}return this.pluralRulesCache[i]=a,a}needsPlural(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?n.resolvedOptions().pluralCategories.sort((e,t)=>rn[e]-rn[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:``}${e}`):[]}getSuffix(e,t,n={}){let r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:``}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix(`dev`,t,n))}},sn=(e,t,n,r=`.`,i=!0)=>{let a=zt(e,t,n);return!a&&i&&U(n)&&(a=qt(e,n,r),a===void 0&&(a=qt(t,n,r))),a},cn=e=>e.replace(/\$/g,`$$$$`),ln=class{constructor(e={}){this.logger=Y.create(`interpolator`),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||={escapeValue:!0};let{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:i,prefixEscaped:a,suffix:o,suffixEscaped:s,formatSeparator:c,unescapeSuffix:l,unescapePrefix:u,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:p,nestingSuffixEscaped:m,nestingOptionsSeparator:h,maxReplaces:g,alwaysFormat:_}=e.interpolation;this.escape=t===void 0?Ht:t,this.escapeValue=n===void 0||n,this.useRawValueToEscape=r!==void 0&&r,this.prefix=i?q(i):a||`{{`,this.suffix=o?q(o):s||`}}`,this.formatSeparator=c||`,`,this.unescapePrefix=l?``:u||`-`,this.unescapeSuffix=this.unescapePrefix?``:l||``,this.nestingPrefix=d?q(d):f||q(`$t(`),this.nestingSuffix=p?q(p):m||q(`)`),this.nestingOptionsSeparator=h||`,`,this.maxReplaces=g||1e3,this.alwaysFormat=_!==void 0&&_,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,`g`);this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let i,a,o,s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=e=>{if(e.indexOf(this.formatSeparator)<0){let i=sn(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,n,{...r,...t,interpolationkey:e}):i}let i=e.split(this.formatSeparator),a=i.shift().trim(),o=i.join(this.formatSeparator).trim();return this.format(sn(t,s,a,this.options.keySeparator,this.options.ignoreJSONStructure),o,n,{...r,...t,interpolationkey:a})};this.resetRegExp();let l=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,u=r?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:r.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>cn(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?cn(this.escape(e)):cn(e)}].forEach(t=>{for(o=0;i=t.regex.exec(e);){let n=i[1].trim();if(a=c(n),a===void 0)if(typeof l==`function`){let t=l(e,i,r);a=U(t)?t:``}else if(r&&Object.prototype.hasOwnProperty.call(r,n))a=``;else if(u){a=i[0];continue}else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),a=``;else!U(a)&&!this.useRawValueToEscape&&(a=Mt(a));let s=t.safeValue(a);if(e=e.replace(i[0],s),u?(t.regex.lastIndex+=a.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t,n={}){let r,i,a,o=(e,t)=>{let n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;let r=e.split(RegExp(`${q(n)}[ ]*{`)),i=`{${r[1]}`;e=r[0],i=this.interpolate(i,a);let o=i.match(/'/g),s=i.match(/"/g);((o?.length??0)%2==0&&!s||(s?.length??0)%2!=0)&&(i=i.replace(/'/g,`"`));try{a=JSON.parse(i),t&&(a={...t,...a})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let s=[];a={...n},a=a.replace&&!U(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let c=/{.*}/.test(r[1])?r[1].lastIndexOf(`}`)+1:r[1].indexOf(this.formatSeparator);if(c!==-1&&(s=r[1].slice(c).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,c)),i=t(o.call(this,r[1].trim(),a),a),i&&r[0]===e&&!U(i))return i;U(i)||(i=Mt(i)),i||=(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),``),s.length&&(i=s.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:r[1].trim()}),i.trim())),e=e.replace(r[0],i),this.regexp.lastIndex=0}return e}},un=e=>{let t=e.toLowerCase().trim(),n={};if(e.indexOf(`(`)>-1){let r=e.split(`(`);t=r[0].toLowerCase().trim();let i=r[1].substring(0,r[1].length-1);t===`currency`&&i.indexOf(`:`)<0?n.currency||=i.trim():t===`relativetime`&&i.indexOf(`:`)<0?n.range||=i.trim():i.split(`;`).forEach(e=>{if(e){let[t,...r]=e.split(`:`),i=r.join(`:`).trim().replace(/^'+|'+$/g,``),a=t.trim();n[a]||(n[a]=i),i===`false`&&(n[a]=!1),i===`true`&&(n[a]=!0),isNaN(i)||(n[a]=parseInt(i,10))}})}return{formatName:t,formatOptions:n}},dn=e=>{let t={};return(n,r,i)=>{let a=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(a={...a,[i.interpolationkey]:void 0});let o=r+JSON.stringify(a),s=t[o];return s||(s=e(J(r),i),t[o]=s),s(n)}},fn=e=>(t,n,r)=>e(J(n),r)(t),pn=class{constructor(e={}){this.logger=Y.create(`formatter`),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||`,`;let n=t.cacheInBuiltFormats?dn:fn;this.formats={number:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t,style:`currency`});return e=>n.format(e)}),datetime:n((e,t)=>{let n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{let n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||`day`)}),list:n((e,t)=>{let n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=dn(t)}format(e,t,n,r={}){let i=t.split(this.formatSeparator);if(i.length>1&&i[0].indexOf(`(`)>1&&i[0].indexOf(`)`)<0&&i.find(e=>e.indexOf(`)`)>-1)){let e=i.findIndex(e=>e.indexOf(`)`)>-1);i[0]=[i[0],...i.splice(1,e)].join(this.formatSeparator)}return i.reduce((e,t)=>{let{formatName:i,formatOptions:a}=un(t);if(this.formats[i]){let t=e;try{let o=r?.formatParams?.[r.interpolationkey]||{},s=o.locale||o.lng||r.locale||r.lng||n;t=this.formats[i](e,s,{...a,...r,...o})}catch(e){this.logger.warn(e)}return t}else this.logger.warn(`there was no format function for ${i}`);return e},e)}},mn=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)},hn=class extends X{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=Y.create(`backendConnector`),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r)}queueLoad(e,t,n,r){let i={},a={},o={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{let o=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[o]=2:this.state[o]<0||(this.state[o]===1?a[o]===void 0&&(a[o]=!0):(this.state[o]=1,r=!1,a[o]===void 0&&(a[o]=!0),i[o]===void 0&&(i[o]=!0),s[t]===void 0&&(s[t]=!0)))}),r||(o[e]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){let r=e.split(`|`),i=r[0],a=r[1];t&&this.emit(`failedLoading`,i,a,t),!t&&n&&this.store.addResourceBundle(i,a,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);let o={};this.queue.forEach(n=>{Rt(n.loaded,[i],a),mn(n,e),t&&n.errors.push(t),n.pendingCount===0&&!n.done&&(Object.keys(n.loaded).forEach(e=>{o[e]||(o[e]={});let t=n.loaded[e];t.length&&t.forEach(t=>{o[e][t]===void 0&&(o[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit(`loaded`,o),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,i=this.retryTimeout,a){if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:a});return}this.readingCalls++;let o=(o,s)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}if(o&&s&&r{this.read.call(this,e,t,n,r+1,i*2,a)},i);return}a(o,s)},s=this.backend[n].bind(this.backend);if(s.length===2){try{let n=s(e,t);n&&typeof n.then==`function`?n.then(e=>o(null,e)).catch(o):o(null,n)}catch(e){o(e)}return}return s(e,t,o)}prepareLoading(e,t,n={},r){if(!this.backend)return this.logger.warn(`No backend was added via i18next.use. Will not load resources.`),r&&r();U(e)&&(e=this.languageUtils.toResolveHierarchy(e)),U(t)&&(t=[t]);let i=this.queueLoad(e,t,n,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=``){let n=e.split(`|`),r=n[0],i=n[1];this.read(r,i,`read`,void 0,void 0,(n,a)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&a&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,a),this.loaded(e,n,a)})}saveMissing(e,t,n,r,i,a={},o=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`);return}if(!(n==null||n===``)){if(this.backend?.create){let s={...a,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let i;i=c.length===5?c(e,t,n,r,s):c(e,t,n,r),i&&typeof i.then==`function`?i.then(e=>o(null,e)).catch(o):o(null,i)}catch(e){o(e)}else c(e,t,n,r,o,s)}!e||!e[0]||this.store.addResource(e[0],t,n,r)}}},gn=()=>({debug:!1,initAsync:!0,ns:[`translation`],defaultNS:[`translation`],fallbackLng:[`dev`],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:`all`,preload:!1,simplifyPluralSuffix:!0,keySeparator:`.`,nsSeparator:`:`,pluralSeparator:`_`,contextSeparator:`_`,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:`fallback`,saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]==`object`&&(t=e[1]),U(e[1])&&(t.defaultValue=e[1]),U(e[2])&&(t.tDescription=e[2]),typeof e[2]==`object`||typeof e[3]==`object`){let n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:`{{`,suffix:`}}`,formatSeparator:`,`,unescapePrefix:`-`,nestingPrefix:`$t(`,nestingSuffix:`)`,nestingOptionsSeparator:`,`,maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),_n=e=>(U(e.ns)&&(e.ns=[e.ns]),U(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),U(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.(`cimode`)<0&&(e.supportedLngs=e.supportedLngs.concat([`cimode`])),typeof e.initImmediate==`boolean`&&(e.initAsync=e.initImmediate),e),Q=()=>{},vn=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{typeof e[t]==`function`&&(e[t]=e[t].bind(e))})},yn=`__i18next_supportNoticeShown`,bn=()=>!!(typeof globalThis<`u`&&globalThis[yn]||typeof process<`u`&&{}.I18NEXT_NO_SUPPORT_NOTICE||typeof process<`u`),xn=()=>{typeof globalThis<`u`&&(globalThis[yn]=!0)},Sn=e=>!!(e?.modules?.backend?.name?.indexOf(`Locize`)>0||e?.modules?.backend?.constructor?.name?.indexOf(`Locize`)>0||e?.options?.backend?.backends&&e.options.backend.backends.some(e=>e?.name?.indexOf(`Locize`)>0||e?.constructor?.name?.indexOf(`Locize`)>0)||e?.options?.backend?.projectId||e?.options?.backend?.backendOptions&&e.options.backend.backendOptions.some(e=>e?.projectId)),$=class e extends X{constructor(e={},t){if(super(),this.options=_n(e),this.services={},this.logger=Y,this.modules={external:[]},vn(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,typeof e==`function`&&(t=e,e={}),e.defaultNS==null&&e.ns&&(U(e.ns)?e.defaultNS=e.ns:e.ns.indexOf(`translation`)<0&&(e.defaultNS=e.ns[0]));let n=gn();this.options={...n,...this.options,..._n(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!=`function`&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler),this.options.showSupportNotice!==!1&&!Sn(this)&&!bn()&&(typeof console<`u`&&console.info!==void 0&&console.info(`🌐 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙`),xn());let r=e=>e?typeof e==`function`?new e:e:null;if(!this.options.isClone){this.modules.logger?Y.init(r(this.modules.logger),this.options):Y.init(null,this.options);let e;e=this.modules.formatter?this.modules.formatter:pn;let t=new nn(this.options);this.store=new Yt(this.options.resources,this.options);let i=this.services;i.logger=Y,i.resourceStore=this.store,i.languageUtils=t,i.pluralResolver=new on(t,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format&&this.logger.deprecate(`init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting`),e&&(!this.options.interpolation.format||this.options.interpolation.format===n.interpolation.format)&&(i.formatter=r(e),i.formatter.init&&i.formatter.init(i,this.options),this.options.interpolation.format=i.formatter.format.bind(i.formatter)),i.interpolator=new ln(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new hn(r(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(i.languageDetector=r(this.modules.languageDetector),i.languageDetector.init&&i.languageDetector.init(i,this.options.detection,this.options)),this.modules.i18nFormat&&(i.i18nFormat=r(this.modules.i18nFormat),i.i18nFormat.init&&i.i18nFormat.init(this)),this.translator=new tn(this.services,this.options),this.translator.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||=Q,this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&e[0]!==`dev`&&(this.options.lng=e[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn(`init: no languageDetector is used and no lng is defined`),[`getResource`,`hasResourceBundle`,`getResourceBundle`,`getDataByLanguage`].forEach(e=>{this[e]=(...t)=>this.store[e](...t)}),[`addResource`,`addResources`,`addResourceBundle`,`removeResourceBundle`].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});let i=W(),a=()=>{let e=(e,n)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn(`init: i18next is already initialized. You should call init just once!`),this.isInitialized=!0,this.options.isClone||this.logger.log(`initialized`,this.options),this.emit(`initialized`,this.options),i.resolve(n),t(e,n)};if(this.languages&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?a():setTimeout(a,0),i}loadResources(e,t=Q){let n=t,r=U(e)?e:this.language;if(typeof e==`function`&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r?.toLowerCase()===`cimode`&&(!this.options.preload||this.options.preload.length===0))return n();let e=[],t=t=>{t&&t!==`cimode`&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{t!==`cimode`&&e.indexOf(t)<0&&e.push(t)})};r?t(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{!e&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){let r=W();return typeof e==`function`&&(n=e,e=void 0),typeof t==`function`&&(n=t,t=void 0),e||=this.languages,t||=this.options.ns,n||=Q,this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);if(!e.type)throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);return e.type===`backend`&&(this.modules.backend=e),(e.type===`logger`||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type===`languageDetector`&&(this.modules.languageDetector=e),e.type===`i18nFormat`&&(this.modules.i18nFormat=e),e.type===`postProcessor`&&Xt.addPostProcessor(e),e.type===`formatter`&&(this.modules.formatter=e),e.type===`3rdParty`&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!([`cimode`,`dev`].indexOf(e)>-1)){for(let e=0;e-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;let n=W();this.emit(`languageChanging`,e);let r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(i,a)=>{a?this.isLanguageChangingTo===e&&(r(a),this.translator.changeLanguage(a),this.isLanguageChangingTo=void 0,this.emit(`languageChanged`,a),this.logger.log(`languageChanged`,a)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(i,(...e)=>this.t(...e))},a=t=>{!e&&!t&&this.services.languageDetector&&(t=[]);let n=U(t)?t:t&&t[0],a=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(U(t)?[t]:t);a&&(this.language||r(a),this.translator.language||this.translator.changeLanguage(a),this.services.languageDetector?.cacheUserLanguage?.(a)),this.loadResources(a,e=>{i(e,a)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e),n}getFixedT(e,t,n){let r=(e,t,...i)=>{let a;a=typeof t==`object`?{...t}:this.options.overloadTranslationOptionHandler([e,t].concat(i)),a.lng=a.lng||r.lng,a.lngs=a.lngs||r.lngs,a.ns=a.ns||r.ns,a.keyPrefix!==``&&(a.keyPrefix=a.keyPrefix||n||r.keyPrefix);let o={...this.options,...a};typeof a.keyPrefix==`function`&&(a.keyPrefix=Z(a.keyPrefix,o));let s=this.options.keySeparator||`.`,c;return a.keyPrefix&&Array.isArray(e)?c=e.map(e=>(typeof e==`function`&&(e=Z(e,o)),`${a.keyPrefix}${s}${e}`)):(typeof e==`function`&&(e=Z(e,o)),c=a.keyPrefix?`${a.keyPrefix}${s}${e}`:e),this.t(c,a)};return U(e)?r.lng=e:r.lngs=e,r.ns=t,r.keyPrefix=n,r}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn(`hasLoadedNamespace: i18next was not initialized`,this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn(`hasLoadedNamespace: i18n.languages were undefined or empty`,this.languages),!1;let n=t.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(n.toLowerCase()===`cimode`)return!0;let a=(e,t)=>{let n=this.services.backendConnector.state[`${e}|${t}`];return n===-1||n===0||n===2};if(t.precheck){let e=t.precheck(this,a);if(e!==void 0)return e}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(n,e)&&(!r||a(i,e)))}loadNamespaces(e,t){let n=W();return this.options.ns?(U(e)&&(e=[e]),e.forEach(e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){let n=W();U(e)&&(e=[e]);let r=this.options.preload||[],i=e.filter(e=>r.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return i.length?(this.options.preload=r.concat(i),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language),!e)return`rtl`;try{let t=new Intl.Locale(e);if(t&&t.getTextInfo){let e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch{}let t=`ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb`.split(`.`),n=this.services?.languageUtils||new nn(gn());return e.toLowerCase().indexOf(`-latn`)>1?`ltr`:t.indexOf(n.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf(`-arab`)>1?`rtl`:`ltr`}static createInstance(t={},n){let r=new e(t,n);return r.createInstance=e.createInstance,r}cloneInstance(t={},n=Q){let r=t.forkResourceStore;r&&delete t.forkResourceStore;let i={...this.options,...t,isClone:!0},a=new e(i);if((t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),[`store`,`services`,`language`].forEach(e=>{a[e]=this[e]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r&&(a.store=new Yt(Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]={...e[t][r]},n),e[t]),e),{}),i),a.services.resourceStore=a.store),t.interpolation){let e={...gn().interpolation,...this.options.interpolation,...t.interpolation},n={...i,interpolation:e};a.services.interpolator=new ln(n)}return a.translator=new tn(a.services,i),a.translator.on(`*`,(e,...t)=>{a.emit(e,...t)}),a.init(i,n),a.translator.options=i,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}.createInstance();$.createInstance,$.dir,$.init,$.loadResources,$.reloadResources,$.use,$.changeLanguage,$.getFixedT,$.t,$.exists,$.setDefaultNamespace,$.hasLoadedNamespace,$.loadNamespaces,$.loadLanguages;var Cn={"menu.dashboard":`Dashboard`,"menu.analysis":`Analysis`,"menu.monitor":`Monitor`,"menu.workplace":`Workplace`,"menu.result":`Results`,"menu.result.success":`Success`,"menu.result.fail":`Failure`,"menu.result.warning":`Warning`,"menu.result.info":`Information`,"menu.exception":`Exceptions`,"menu.exception.403":`403`,"menu.exception.404":`404`,"menu.exception.500":`500`,"menu.multi-menu":`Multi-level Menu`,"menu.multi-menu.two":`Level 2`,"menu.multi-menu.first":`Level 2 Page`,"menu.multi-menu.two.three":`Level 3`,"menu.multi-menu.two.second":`Level 3 Page`,"menu.multi-menu.two.three.third":`Level 4`,"menu.page-layout":`Layouts`,"menu.page-layout.base-layout":`Basic Layout`,"menu.page-layout.fix-header":`Fixed Header`,"menu.page-layout.descriptions":`Descriptions`,"menu.example":`Examples`,"menu.example.user-selector":`User Selector`,"menu.example.icon-selector":`Icon Selector`,"menu.example.image-uploader":`Image Upload`,"menu.example.xin-form":`Xin Form`,"menu.example.xin-table":`Xin Table`,"menu.ai":`AI`,"menu.ai.chat":`Chat`,"menu.ai.agent":`Agents`,"menu.ai.conversation":`Conversations`,"menu.system":`System`,"menu.system.user":`Users`,"menu.system.dept":`Departments`,"menu.system.role":`Roles`,"menu.system.rule":`Menus`,"menu.system.info":`System Information`,"menu.system.file":`Files`,"menu.system.dict":`Dictionaries`,"menu.system.mail":`Mail`,"menu.system.storage":`Storage`,"menu.system.config":`Site Config`,"menu.system.ai":`AI`,"menu.xin-admin":`XinAdmin`},wn={"login.username":`Username`,"login.password":`Password`,"login.usernamePlaceholder":`admin`,"login.passwordPlaceholder":`123456`,"login.usernameRequired":`Please enter your username!`,"login.passwordRequired":`Please enter your password!`,"login.remember":`Remember me`,"login.forgotPassword":`Forgot password`,"login.otherLogin":`Other login methods`,"login.success":`Login successful!`,"login.alreadyLoggedIn":`Already logged in, redirecting!`},Tn={"dashboard.analysis.salesAmount":`Sales`,"dashboard.analysis.orderCount":`Orders`,"dashboard.analysis.purchaseAmount":`Purchases`,"dashboard.analysis.receivable":`Receivable`,"dashboard.analysis.today":`Today`,"dashboard.analysis.thisWeek":`Last 7 days`,"dashboard.analysis.vsLastWeek":`vs last week`,"dashboard.analysis.totalBillAmount":`Total billed`,"dashboard.analysis.receivedAmount":`Received`,"dashboard.analysis.salesTrend":`Sales Trend (Last 30 Days)`,"dashboard.analysis.amountAxis":`Amount`,"dashboard.analysis.ordersAxis":`Orders`,"dashboard.analysis.emptyTrend":`No orders in the last 30 days`,"dashboard.analysis.orderStatusDistribution":`Order Status`,"dashboard.analysis.orderUnit":``,"dashboard.analysis.categorySales":`Sales by Category`,"dashboard.analysis.emptyCategory":`No sales data`,"dashboard.analysis.topProducts":`Top 10 Products`,"dashboard.analysis.rank":`Rank`,"dashboard.analysis.productName":`Product`,"dashboard.analysis.quantity":`Qty`,"dashboard.analysis.amount":`Amount`,"dashboard.analysis.topStores":`Top 10 Stores`,"dashboard.analysis.storeName":`Store`,"dashboard.analysis.reconOverview":`Reconciliation & Payment`,"dashboard.analysis.billProgress":`Bill Payment Progress`,"dashboard.analysis.pendingPaymentReview":`Payments to Review`,"dashboard.analysis.pendingPaymentTip":`Payment vouchers submitted by stores, pending review`,"dashboard.analysis.billUnit":``,"dashboard.analysis.latestOrders":`Latest Orders`,"dashboard.analysis.orderNo":`Order No.`,"dashboard.analysis.store":`Store`,"dashboard.analysis.orderDate":`Date`,"dashboard.analysis.status":`Status`,"dashboard.analysis.archivesStores":`Active Stores`,"dashboard.analysis.archivesProducts":`On-sale Products`,"dashboard.analysis.archivesSuppliers":`Suppliers`},En={"dashboard.completion":`Completion`,"dashboard.vs.lastWeek":`vs last week`,"dashboard.monitor.helpService":`Help Service`,"dashboard.monitor.propertyFee":`Property Fee`,"dashboard.monitor.alarmEvents":`Alarm Events`,"dashboard.monitor.otherEvents":`Other Events`,"dashboard.monitor.todoList":`To-Do List`,"dashboard.monitor.myFocus":`My Focus`,"dashboard.monitor.all":`All`,"dashboard.monitor.propertyOrder":`Property Orders`,"dashboard.monitor.repairOrder":`Repair Orders`,"dashboard.monitor.fireSafety":`Fire Safety`,"dashboard.monitor.paidService":`Paid Services`,"dashboard.monitor.publicService":`Public Services`},Dn={"dashboard.workplace.greeting.morning":`Good Morning`,"dashboard.workplace.greeting.afternoon":`Good Afternoon`,"dashboard.workplace.greeting.evening":`Good Evening`,"dashboard.workplace.welcome":`Welcome back!`,"dashboard.workplace.today":`Today is`,"dashboard.workplace.myProjects":`My Projects`,"dashboard.workplace.myTeams":`My Teams`,"dashboard.workplace.latestActivities":`Latest Activities`,"dashboard.workplace.notifications":`Notifications`,"dashboard.workplace.appStore":`App Store`,"dashboard.workplace.appStore.desc":`Application distribution and management platform`,"dashboard.workplace.mallSystem":`Mall System`,"dashboard.workplace.mallSystem.desc":`Enterprise e-commerce solution`,"dashboard.workplace.collaboration":`Collaboration`,"dashboard.workplace.collaboration.desc":`Team collaboration and communication tools`,"dashboard.workplace.docCenter":`Document Center`,"dashboard.workplace.docCenter.desc":`Enterprise knowledge management and document collaboration`,"dashboard.workplace.badge.new":`New`,"dashboard.workplace.status.inProgress":`In Progress`,"dashboard.workplace.status.completed":`Completed`,"dashboard.workplace.status.planning":`Planning`,"dashboard.workplace.progress":`Progress`,"dashboard.workplace.members":`Members`,"dashboard.workplace.people":`people`,"dashboard.workplace.recentVisits":`Recent Visits`,"dashboard.workplace.location":`Local`,"dashboard.workplace.project1.name":`Enterprise Management System`,"dashboard.workplace.project1.desc":`Enterprise backend management system based on React and AntDesign`,"dashboard.workplace.project2.name":`Mobile H5 Application`,"dashboard.workplace.project2.desc":`Mobile e-commerce application developed with Vue3`,"dashboard.workplace.project3.name":`Data Visualization Platform`,"dashboard.workplace.project3.desc":`Big data visualization and analysis platform based on ECharts`,"dashboard.workplace.project4.name":`System Upgrade Notice`,"dashboard.workplace.project4.desc":`System will be upgraded and maintained from 2:00-4:00 AM this Friday`,"dashboard.workplace.project5.name":`Team Invitation`,"dashboard.workplace.project5.desc":`You have been invited to join the "New Product R&D" project team`,"dashboard.workplace.project6.name":`Task Reminder`,"dashboard.workplace.project6.desc":`You have 3 tasks that are about to expire, please handle them in time`},On={"system.info.title":`System Info`,"system.info.basic.title":`System Basic Info`,"system.info.project.title":`Project Address`,"system.info.changelog.title":`Changelog`,"system.info.author.title":`Author Introduction`,"system.info.desc.title":`System Description`,"system.info.join":`Join the community for updates and support`,"system.info.label.name":`System Name`,"system.info.label.version":`Version`,"system.info.label.build":`Build Tool`,"system.info.label.frontend":`Frontend Framework`,"system.info.label.ui":`UI Framework`,"system.info.label.css":`CSS Framework`,"system.info.label.router":`Router Management`,"system.info.label.state":`State Management`,"system.info.label.ts":`TypeScript`,"system.info.link.github":`GitHub Repository`,"system.info.link.docs":`Online Documentation`,"system.info.link.demo":`Demo Address`,"system.info.link.issues":`Issues & Feedback`,"system.info.log.content":`Refactored project modules based on React 19, Vite 7, ReactRouter 7, zustand 5, and TypeScript`,"system.info.author.name":`XinAdmin Team`,"system.info.author.role":`Enterprise-level Admin Solution Provider`,"system.info.contact.github":`GitHub`,"system.info.contact.group":`QQ Group`,"system.info.contact.discuss":`Discussions`,"system.info.desc.content":`XinAdmin is an enterprise-level admin template based on Ant Design design specifications, adopting the latest frontend tech stack including React 19, Vite 7, ReactRouter 7, zustand 5, and TypeScript. +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/agent-BacKF2o-.js","assets/rolldown-runtime-BgaNhQyE.js","assets/jsx-runtime-CRBytmvs.js","assets/chunk-KS7C4IRE-Zm15rq6F.js","assets/typography-DRFhazK9.js","assets/tooltip-SaeG1Uv7.js","assets/style-BmYds38x.js","assets/CopyOutlined-pYq9KfGb.js","assets/es-DGcDZmXr.js","assets/CloseCircleFilled-C_pAsEWy.js","assets/space-Cu4QVMgQ.js","assets/button-BILozH6U.js","assets/ColorPresets-CG7aHuoG.js","assets/app-Bntg8WFU.js","assets/CheckCircleFilled-DcF3PzkE.js","assets/PlusOutlined-B8K2rG8r.js","assets/ExclamationCircleFilled-B0FwC6ZE.js","assets/context-D6bvp8kb.js","assets/useClosable-BLB2IUFV.js","assets/mergeProps-yLeqvqMM.js","assets/useModal-uyHD1DJx.js","assets/config-provider-CqLGIhNd.js","assets/empty-_1ZFK8yy.js","assets/avatar-DPxbCsa4.js","assets/useBreakpoint-DLqc4AYE.js","assets/popover-BGq_MyT2.js","assets/card-DU2T2-YW.js","assets/spin-CfJYIffX.js","assets/switch--LhkZymx.js","assets/tag-DBV1bHre.js","assets/theme-D5FZSALB.js","assets/useTranslation-DBl6NYjI.js","assets/agent-CCozney_.js","assets/request--UCyt0wo.js","assets/chat-CfnvY2VS.js","assets/global-DPRsdECQ.js","assets/middleware-Ctqt9WwX.js","assets/divider-BWjoWWHX.js","assets/dropdown-BgpiO8SY.js","assets/dropdown-Cg5iA4jt.js","assets/LeftOutlined-8zj_FQJP.js","assets/PurePanel-CRkmGKGB.js","assets/flex-BUqc4pUn.js","assets/input-CHcsaDtX.js","assets/SearchOutlined-C1nd7QQO.js","assets/Input-CJ-n8Xgl.js","assets/EyeOutlined-LSBUmW0e.js","assets/CaretDownFilled-DsboRsp5.js","assets/DeleteOutlined-DwOvobSM.js","assets/ArrowUpOutlined-C-Hx3V4D.js","assets/ClearOutlined-D3ecEqjC.js","assets/UserOutlined-D5Ziy0eL.js","assets/chat-Iht936bQ.css","assets/conversation-CgPPysYU.js","assets/lodash-DzOfPy0f.js","assets/DoubleRightOutlined-Blfli1UU.js","assets/DownOutlined-OYbvV7zr.js","assets/LockOutlined-B8eRH1x4.js","assets/modal-g8Q5gNCx.js","assets/ClockCircleOutlined-CNdnBEY0.js","assets/LinkOutlined-C-pRqXVc.js","assets/form-B3R3kIqp.js","assets/useForm-CAC6DWbf.js","assets/row-VfXXpsnR.js","assets/PictureOutlined-CB8Pr7jP.js","assets/WarningFilled-D9XuDTkJ.js","assets/CaretUpOutlined-ButGJLYH.js","assets/FileOutlined-DcVPckWl.js","assets/DownloadOutlined-DJY9Mu8c.js","assets/WeiboOutlined-Bp26feUj.js","assets/SmileOutlined-CxtYvF4K.js","assets/ArrowDownOutlined-hMgHFKfN.js","assets/FileDoneOutlined-Bp46bcBB.js","assets/CheckCircleOutlined-IJiAu4Hy.js","assets/CloseCircleOutlined-D2to6Tog.js","assets/EnvironmentOutlined-Be7mN2bK.js","assets/InfoCircleOutlined-ZdiYvwVM.js","assets/UploadOutlined-NadwXvrl.js","assets/PrinterOutlined-V8ipM95d.js","assets/QqOutlined-DnUKpfIS.js","assets/RiseOutlined-gXjyF9G9.js","assets/ShopOutlined-CwwKSpcq.js","assets/WalletOutlined-Bjy-chtO.js","assets/ShoppingOutlined-CsazpDg7.js","assets/TeamOutlined-DAHp-vuL.js","assets/table-BXi9q3AE.js","assets/radio-CxFl70_7.js","assets/useBubbleLock-BOXZxiMO.js","assets/checkbox-BSxplF7f.js","assets/pagination-aogAYU7q.js","assets/zh_CN-BT8mdvr9.js","assets/XinTable-DOLiJ5rL.js","assets/XinForm-BPDYdeax.js","assets/row-DfzKzMF0.js","assets/ImageUploader-C4yPpD75.js","assets/upload-oMV5VJeJ.js","assets/progress-BvFjoSli.js","assets/tslib.es6-5i5FW2KX.js","assets/XinForm-CeTR0shq.css","assets/AuthButton-DvrpreK4.js","assets/user-LBumqaa7.js","assets/banner-CJe0agU6.js","assets/image-CTRBNpBE.js","assets/nav-Dih5jXxX.js","assets/promo-CfsZu-jA.js","assets/special-DQ_cXCQl.js","assets/iProduct-l9WpLyUD.js","assets/goods-DPA1smJU.js","assets/download-DC9wDwqQ.js","assets/level-BCGrZbbc.js","assets/notice-DkzNYgG3.js","assets/store-JDnJsv44.js","assets/store-B-wG8BVA.js","assets/supplier-D0qvu-sA.js","assets/analysis-ChRcSk16.js","assets/statistic-G8YfPOC4.js","assets/iStoreOrder-CyyYoLoV.js","assets/monitor-Dd1gBWfo.js","assets/list-C8spiXAQ.js","assets/workplace-I8FwqFbs.js","assets/badge-__AeKia1.js","assets/icon-selector-Dy7uWjj7.js","assets/image-uploader-DBHOFZqO.js","assets/user-selector-C_7kHqFz.js","assets/xin-form-CjpDqXrA.js","assets/xin-table-Bw1qt43O.js","assets/403-kF5cJUEE.js","assets/result-D_u5wtF_.js","assets/404-CF76bH-T.js","assets/500-pw04psNL.js","assets/login-CKGg-k4h.js","assets/first-VYyrluR5.js","assets/breadcrumb-CSvdSHzR.js","assets/second-urN6pQJ9.js","assets/third-CmYUgLWR.js","assets/store-CGacVUaW.js","assets/descriptions-BLF6MKiu.js","assets/popconfirm-DyseZgpU.js","assets/order-DMmnhF6m.js","assets/iPurchaseOrder-Dn-laOqY.js","assets/base-layout-o2EQVE3N.js","assets/descriptions-DSR6x1nO.js","assets/timeline-BB5N-LF8.js","assets/fix-header-DIZqZWCz.js","assets/category-BQA8kSpc.js","assets/category-MmrJkdbs.js","assets/goods-NJpnvO3k.js","assets/alert-DuXzwpQC.js","assets/supplier-BstAcwv7.js","assets/order-BsK8e9QB.js","assets/useAuth-AiNV0bRw.js","assets/bill-d4QJGLlp.js","assets/container-return-DT66R0pD.js","assets/payment-m5LFx4J0.js","assets/fail-BFEpQBfc.js","assets/info-DmaRTlzJ.js","assets/success-BtLkPs9S.js","assets/warning-D9M9NjTA.js","assets/ai-BaBcitlo.js","assets/config-tH2RSZ-J.js","assets/dept-wABp4Ul9.js","assets/dict-j8wfnfhh.js","assets/dict-CDRllPHM.js","assets/item-DyrMo47d.js","assets/file-BhqTJxRm.js","assets/info-CVHNTwj4.js","assets/mail-ChpDRzPT.js","assets/role-D-VBhILf.js","assets/relativeTime-jamE_cdZ.js","assets/rule-CqyTke2b.js","assets/storage-DhJApafx.js","assets/user-Bt-PQ9Uv.js","assets/profile-CGJ4n7jj.js","assets/useMobile-Bcq0nkW4.js"])))=>i.map(i=>d[i]); +import{i as e}from"./rolldown-runtime-BgaNhQyE.js";import{Bn as t,Dr as n,Jn as r,Ln as i,Tr as a,Vn as o,Xn as s,t as c,zn as l}from"./jsx-runtime-CRBytmvs.js";import{a as u,c as d,i as f,n as p,o as m,r as h,t as g}from"./chunk-KS7C4IRE-Zm15rq6F.js";import{i as _,n as v,r as y,t as b}from"./global-DPRsdECQ.js";import{B as x,L as S,S as ee,V as C,_ as w,b as T,g as E,i as te,l as ne,n as D,t as re,x as ie}from"./lodash-DzOfPy0f.js";import{t as ae}from"./tooltip-SaeG1Uv7.js";import{t as oe}from"./config-provider-CqLGIhNd.js";import{t as se}from"./space-Cu4QVMgQ.js";import{t as O}from"./button-BILozH6U.js";import{t as ce}from"./app-Bntg8WFU.js";import{r as le}from"./DoubleRightOutlined-Blfli1UU.js";import{t as ue}from"./empty-_1ZFK8yy.js";import{t as de}from"./SearchOutlined-C1nd7QQO.js";import{t as fe}from"./avatar-DPxbCsa4.js";import{t as pe}from"./breadcrumb-CSvdSHzR.js";import{a as me,i as he,n as ge,o as _e,s as ve}from"./dropdown-Cg5iA4jt.js";import{n as ye}from"./LockOutlined-B8eRH1x4.js";import{n as be,t as xe}from"./row-DfzKzMF0.js";import{t as k}from"./divider-BWjoWWHX.js";import{t as Se}from"./modal-g8Q5gNCx.js";import{t as Ce}from"./dropdown-BgpiO8SY.js";import{t as we}from"./input-CHcsaDtX.js";import{n as Te}from"./CopyOutlined-pYq9KfGb.js";import{r as Ee}from"./PictureOutlined-CB8Pr7jP.js";import{t as De}from"./switch--LhkZymx.js";import{t as A}from"./theme-D5FZSALB.js";import{t as Oe}from"./ArrowDownOutlined-hMgHFKfN.js";import{t as ke}from"./ArrowUpOutlined-C-Hx3V4D.js";import{r as Ae}from"./InfoCircleOutlined-ZdiYvwVM.js";import{t as je}from"./UserOutlined-D5Ziy0eL.js";import{i as Me,t as j}from"./user-LBumqaa7.js";import{n as Ne,r as Pe,t as M}from"./useTranslation-DBl6NYjI.js";import{i as Fe,r as Ie,t as Le}from"./login-CKGg-k4h.js";import{t as N}from"./useMobile-Bcq0nkW4.js";import{t as Re}from"./dict-CDRllPHM.js";import{t as ze}from"./relativeTime-jamE_cdZ.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();function Be(e,t,n){return typeof n==`boolean`?n:e.length?!0:r(t).some(e=>e.type===he)}var P=e(n()),F=({suffixCls:e,tagName:t,displayName:n})=>n=>P.forwardRef((r,i)=>P.createElement(n,{ref:i,suffixCls:e,tagName:t,...r})),I=P.forwardRef((e,t)=>{let{prefixCls:n,suffixCls:r,className:a,tagName:s,...c}=e,{getPrefixCls:l}=P.useContext(i),u=l(`layout`,n),[d,f]=_e(u),p=r?`${u}-${r}`:u;return P.createElement(s,{className:o(n||p,a,d,f),ref:t,...c})}),Ve=P.forwardRef((e,n)=>{let{direction:r}=P.useContext(i),[a,c]=P.useState([]),{prefixCls:u,className:d,rootClassName:f,children:p,hasSider:m,tagName:h,style:g,..._}=e,v=s(_,[`suffixCls`]),{getPrefixCls:y,className:b,style:x}=l(`layout`),S=y(`layout`,u),ee=Be(a,p,m),[C,w]=_e(S),T=o(S,{[`${S}-has-sider`]:ee,[`${S}-rtl`]:r===`rtl`},b,d,f,C,w),E=P.useMemo(()=>({siderHook:{addSider:e=>{c(n=>[].concat(t(n),[e]))},removeSider:e=>{c(t=>t.filter(t=>t!==e))}}}),[]);return P.createElement(ve.Provider,{value:E},P.createElement(h,{ref:n,className:T,style:{...x,...g},...v},p))}),He=F({tagName:`div`,displayName:`Layout`})(Ve),Ue=F({suffixCls:`header`,tagName:`header`,displayName:`Header`})(I),We=F({suffixCls:`footer`,tagName:`footer`,displayName:`Footer`})(I),Ge=F({suffixCls:`content`,tagName:`main`,displayName:`Content`})(I),L=He;L.Header=Ue,L.Footer=We,L.Content=Ge,L.Sider=he,L._InternalSiderContext=me;var Ke={type:`3rdParty`,init(e){Pe(e.options.react),Ne(e)}},qe=e(a(),1),R=c(),{useToken:Je}=A,Ye=()=>{let{token:e}=Je(),{t}=M(),n=m(),r=b(e=>e.themeDrawer),i=b(e=>e.setThemeDrawer),a=j(e=>e.userinfo),o=j(e=>e.logout),s=N(),[c,l]=(0,P.useState)(!1),[u,d]=(0,P.useState)(!1),f=()=>{let e=document.documentElement;document.fullscreenElement?document.exitFullscreen().then(()=>{l(!1)}):e.requestFullscreen().then(()=>{l(!0)})},p=[{key:`1`,label:t(`layout.profile`),icon:(0,R.jsx)(je,{}),onClick:()=>n(`/user/profile`)},{key:`2`,label:t(`layout.logout`),icon:(0,R.jsx)(te,{}),onClick:async()=>{o().then(()=>{Ee.success(t(`layout.logoutSuccess`)),window.location.href=`/login`}).catch(()=>{Ee.error(t(`layout.logoutFailed`))})}}];return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(Se,{closable:!1,open:u,footer:null,style:{top:40,width:600},styles:{body:{maxHeight:`80vh`},container:{padding:0}},onCancel:()=>d(!1),children:[(0,R.jsxs)(`div`,{className:`p-5`,children:[(0,R.jsx)(we,{size:`large`,placeholder:t(`layout.searchPlaceholder`),prefix:(0,R.jsx)(de,{})}),(0,R.jsx)(`div`,{className:`mt-5`,children:(0,R.jsx)(ue,{})})]}),(0,R.jsxs)(se,{className:`mt-5 flex align-center pl-5 pr-5 pt-2.5 pb-2.5`,style:{borderTop:`1px solid `+e.colorBorder},children:[(0,R.jsx)(Te,{}),` `,(0,R.jsx)(`span`,{className:`mr-4`,children:t(`layout.searchConfirm`)}),(0,R.jsx)(ke,{}),(0,R.jsx)(Oe,{}),` `,(0,R.jsx)(`span`,{className:`mr-4`,children:t(`layout.searchSwitch`)}),`Esc `,(0,R.jsx)(`span`,{className:`mr-2`,children:t(`layout.searchClose`)})]})]}),(0,R.jsxs)(se,{children:[!s&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(O,{icon:(0,R.jsx)(T,{}),size:`large`,type:`text`,onClick:()=>window.open(`https://xin-admin.com`)}),(0,R.jsx)(O,{icon:(0,R.jsx)(Ae,{}),size:`large`,type:`text`,onClick:()=>window.open(`https://github.com/xin-admin/xin-admin-ui`)}),(0,R.jsx)(O,{icon:(0,R.jsx)(de,{}),size:`large`,type:`text`,onClick:()=>d(!0)}),(0,R.jsx)(O,{onClick:f,icon:c?(0,R.jsx)(ee,{}):(0,R.jsx)(ie,{}),size:`large`,type:`text`}),(0,R.jsx)(Ie,{size:`large`,type:`text`}),(0,R.jsx)(O,{onClick:()=>i(!r),icon:(0,R.jsx)(ne,{}),size:`large`,type:`text`})]}),a?(0,R.jsx)(Ce,{menu:{items:p},children:(0,R.jsxs)(O,{size:`large`,type:`text`,children:[(0,R.jsx)(`div`,{children:a.nickname||a.username}),(0,R.jsx)(fe,{src:a.avatar_url?a.avatar_url:null,size:`small`})]})}):null]})]})};function Xe(e){let t={},n=(e,r=[])=>{if(!e.key)return;let i={href:e.path,title:e.name,icon:e.icon,local:e.local},a=[...r,i];t[e.key]=a,e.children&&e.children.length&&e.children.forEach(e=>n(e,a))};return e.forEach(e=>n(e)),t}function z(e,t){for(let n of e){if(n.path===t)return n;if(n.children&&n.children.length>0){let e=z(n.children,t);if(e)return e}}return null}function Ze(e,t,n=[]){for(let r of e){if(!r.key)continue;let e=[...n,r.key];if(r.path===t)return e;if(r.children&&r.children.length>0){let n=Ze(r.children,t,e);if(n)return n}}return null}function Qe(e,t){for(let n of e){if(n.key===t)return n;if(n.children&&n.children.length>0){let e=Qe(n.children,t);if(e)return e}}return null}var $e=(0,P.createContext)(null),et=({children:e})=>{let t=u(),[n,r]=(0,P.useState)([]),[i,a]=(0,P.useState)(),[o,s]=(0,P.useState)([]),[c,l]=(0,P.useState)(!1);return(0,P.useEffect)(()=>{Me().then(({data:e})=>{let t=e.data.menus;r(t)})},[]),(0,P.useEffect)(()=>{let e=t.pathname,r=Ze(n,e);r&&r.length&&(s(r),a(r[0]))},[n]),(0,R.jsx)($e.Provider,{value:{menus:n,parentKey:i,selectKey:o,collapsed:c,setParentKey:a,setCollapsed:l,setSelectKey:s},children:e})},B=()=>{let e=(0,P.useContext)($e);if(!e)throw Error(`useLayoutContext must be used within LayoutProvider`);return e},V=(e,t)=>e.reduce((e,n)=>{if(![`route`,`menu`].includes(n.type)||!n.hidden)return e;let r={label:n.local?t(n.local):n.name,icon:n.icon?(0,R.jsx)(D,{name:n.icon}):void 0,key:n.key};return n.type===`menu`&&n.children?.length&&(r.children=V(n.children,t)),e.push(r),e},[]),H=()=>{let{t:e}=M(),t=N(),n=m(),[r,i]=(0,P.useState)([]),a=b(e=>e.layout),{menus:o,parentKey:s,selectKey:c,setSelectKey:l,setParentKey:u}=B();(0,P.useEffect)(()=>{if(t){i(V(o,e));return}if([`columns`,`mix`].includes(a)&&s){let t=o.find(e=>e.key===s);i(V(t?.children||[],e))}else i(V(o,e))},[o,a,s,e,t]);let d=e=>{l(e),[`top`,`side`].includes(a)&&u(e[e.length-1]);let t=Qe(o,e[0]);if(!(!t||!t.key)){if(t.type===`route`&&t.link){window.open(t.path,`_blank`);return}if(t.type===`route`&&t.path){n(t.path);return}}};return(0,R.jsx)(R.Fragment,{children:r.length>0&&(0,R.jsx)(ge,{className:`border-b-0 flex-1`,mode:a===`top`&&!t?`horizontal`:`inline`,items:r,onSelect:e=>d(e.keyPath),selectedKeys:c})})},tt=[{title:(0,R.jsx)(T,{})}],nt=()=>{let{t:e}=M(),t=u(),{menus:n}=B(),[r,i]=(0,P.useState)(tt),a=(0,P.useMemo)(()=>Xe(n),[n]);return(0,P.useEffect)(()=>{let r=t.pathname,o=z(n,r);if(o&&o.key){let t=a[o.key];if(t){i([{title:(0,R.jsx)(T,{})},...t.map(t=>({title:(0,R.jsxs)(R.Fragment,{children:[t.icon&&(0,R.jsx)(D,{name:t.icon}),(0,R.jsx)(`span`,{children:t.local?e(t.local):t.title})]})}))]);return}}i(tt)},[e,t.pathname,a]),(0,R.jsx)(pe,{items:r})},{Header:rt}=L,it=()=>{let{t:e}=M(),t=N(),n=m(),r=b(e=>e.logo),i=b(e=>e.title),a=b(e=>e.layout),o=b(e=>e.themeConfig),{menus:s,parentKey:c,collapsed:l,setCollapsed:u,setParentKey:d,setSelectKey:f}=B(),p={token:{colorTextBase:o.headerColor},components:{Menu:{activeBarBorderWidth:0,itemBg:`transparent`}}},[h,g]=(0,P.useState)([]);(0,P.useEffect)(()=>{g(s.filter(e=>e.hidden).map(t=>({label:t.local?e(t.local):t.name,icon:t.icon?(0,R.jsx)(D,{name:t.icon}):!1,key:t.key})))},[s,e]);let _=e=>{let t=Qe(s,e);if(!(!t||!t.key)&&(d(t.key),t.type!==`menu`)){if(f([t.key]),t.type===`route`&&t.link){window.open(t.path,`_blank`);return}if(t.type===`route`&&t.path){n(t.path);return}}};return(0,R.jsx)(oe,{theme:p,children:t?(0,R.jsxs)(rt,{className:`flex sticky z-1 top-0 backdrop-blur-xs justify-between items-center`,children:[(0,R.jsxs)(`div`,{className:`flex items-center`,children:[(0,R.jsx)(`img`,{className:`w-9 mr-5`,src:r,alt:`logo`}),(0,R.jsx)(`span`,{className:`font-semibold text-[20px] mr-2`,children:i})]}),(0,R.jsx)(Ye,{})]}):(0,R.jsxs)(rt,{className:`flex sticky z-1 top-0 backdrop-blur-xs`,style:{borderBottom:`1px solid `+o.colorBorder},children:[(0,R.jsxs)(`div`,{className:`flex items-center relative`,children:[(0,R.jsx)(`img`,{className:`h-8`,src:r,alt:`logo`}),(0,R.jsx)(`span`,{className:`font-semibold text-[20px] ml-5 mr-5`,children:i}),a!==`top`&&(0,R.jsx)(O,{type:`text`,className:`text-[16px] mr-2.5`,onClick:()=>u(!l),children:l?(0,R.jsx)(E,{}):(0,R.jsx)(w,{})}),[`columns`,`side`].includes(a)&&(0,R.jsx)(nt,{})]}),(0,R.jsxs)(`div`,{className:`overflow-hidden flex-1`,children:[a==`top`&&(0,R.jsx)(H,{}),a==`mix`&&(0,R.jsx)(ge,{className:`border-b-0 w-full`,mode:`horizontal`,items:h,onSelect:e=>_(e.key),selectedKeys:[c]})]}),(0,R.jsx)(Ye,{})]})})},{Footer:at}=L,ot=()=>{let e=new Date().getFullYear(),t=b(e=>e.themeConfig);return(0,R.jsxs)(R.Fragment,{children:[t.fixedFooter&&(0,R.jsx)(`div`,{className:`h-10`}),(0,R.jsx)(at,{className:(t.fixedFooter?`sticky`:`relative`)+` z-10 w-full bottom-0 pt-2.5 pb-2.5`,style:{borderTop:`1px solid `+t.colorBorder},children:(0,R.jsxs)(`div`,{className:`flex items-center justify-center w-full`,children:[`Xin Admin ©`,e,` Created by xiaoliu`]})})]})},st=()=>{let e=b(e=>e.themeConfig),t=b(e=>e.themeDrawer),n=b(e=>e.setThemeDrawer),[r,i]=(0,P.useState)(!1);return(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`div`,{className:`fixed bottom-8 left-8 z-999`,children:(0,R.jsx)(O,{type:`primary`,shape:`circle`,size:`large`,icon:r?(0,R.jsx)(w,{}):(0,R.jsx)(E,{}),onClick:()=>i(!r)})}),(0,R.jsx)(S,{placement:`left`,closable:!0,onClose:()=>i(!1),open:r,styles:{section:{width:280},header:{borderBottom:`1px solid `+e.colorBorder,background:e.siderBg,color:e.siderColor},body:{padding:0,background:e.siderBg}},footer:(0,R.jsxs)(se,{children:[(0,R.jsx)(O,{icon:(0,R.jsx)(T,{}),size:`large`,type:`text`,onClick:()=>window.open(`https://xin-admin.com`)}),(0,R.jsx)(O,{icon:(0,R.jsx)(Ae,{}),size:`large`,type:`text`,onClick:()=>window.open(`https://github.com/xin-admin/xin-admin-ui`)}),(0,R.jsx)(Ie,{size:`large`,type:`text`}),(0,R.jsx)(O,{onClick:()=>n(!t),icon:(0,R.jsx)(ne,{}),size:`large`,type:`text`})]}),children:(0,R.jsx)(`div`,{style:{height:`100%`,overflowY:`auto`,width:`100%`,background:e.siderBg},children:(0,R.jsx)(H,{})})})]})},ct=re(),lt={defaultAlgorithm:A.defaultAlgorithm,darkAlgorithm:A.darkAlgorithm,defaultCompactAlgorithm:[A.defaultAlgorithm,A.compactAlgorithm],darkCompactAlgorithm:[A.darkAlgorithm,A.compactAlgorithm]},ut=[{label:`layout.algorithmDefault`,value:`defaultAlgorithm`},{label:`layout.algorithmDark`,value:`darkAlgorithm`},{label:`layout.algorithmDefaultCompact`,value:`defaultCompactAlgorithm`},{label:`layout.algorithmDarkCompact`,value:`darkCompactAlgorithm`}],{useToken:dt}=A,ft=[{key:`colorPrimary`,label:`layout.colorPrimary`},{key:`colorText`,label:`layout.colorText`},{key:`colorBg`,label:`layout.colorBg`},{key:`colorSuccess`,label:`layout.colorSuccess`},{key:`colorWarning`,label:`layout.colorWarning`},{key:`colorError`,label:`layout.colorError`},{key:`bodyBg`,label:`layout.bodyBg`},{key:`footerBg`,label:`layout.footerBg`},{key:`headerBg`,label:`layout.headerBg`},{key:`headerColor`,label:`layout.headerColor`},{key:`siderBg`,label:`layout.siderBg`},{key:`siderColor`,label:`layout.siderColor`},{key:`colorBorder`,label:`layout.colorBorder`}],pt=[{key:`fixedFooter`,label:`layout.fixedFooter`,type:`switch`},{key:`borderRadius`,label:`layout.borderRadius`,type:`number`,min:0,max:30},{key:`controlHeight`,label:`layout.controlHeight`,type:`number`,min:0},{key:`headerPadding`,label:`layout.headerPadding`,type:`number`,min:0},{key:`headerHeight`,label:`layout.headerHeight`,type:`number`,min:0},{key:`siderWeight`,label:`layout.siderWeight`,type:`number`,min:0},{key:`bodyPadding`,label:`layout.bodyPadding`,type:`number`,min:0}],mt=[{background:`/static/theme/default.svg`,name:`light`,title:`layout.themeLight`},{background:`/static/theme/dark.svg`,name:`dark`,title:`layout.themeDark`}],ht=[{key:`side`,title:`layout.layoutSide`,render:e=>(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`div`,{className:`rounded-sm w-full h-6 mb-1.5`,style:{background:e.colorPrimaryBorder}}),(0,R.jsxs)(`div`,{className:`flex`,children:[(0,R.jsx)(`div`,{className:`rounded-sm h-16 w-6`,style:{background:e.colorPrimary}}),(0,R.jsx)(`div`,{className:`rounded-sm flex-1 ml-1.5`,style:{background:e.colorPrimaryBg}})]})]})},{key:`top`,title:`layout.layoutTop`,render:e=>(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`div`,{className:`rounded-sm h-6 w-full mb-1.5`,style:{background:e.colorPrimary}}),(0,R.jsx)(`div`,{className:`rounded-sm h-16`,style:{background:e.colorPrimaryBg}})]})},{key:`mix`,title:`layout.layoutMix`,render:e=>(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`div`,{className:`rounded-sm w-full h-6 mb-1.5`,style:{background:e.colorPrimary}}),(0,R.jsxs)(`div`,{className:`flex`,children:[(0,R.jsx)(`div`,{className:`rounded-sm h-16 w-6`,style:{background:e.colorPrimary}}),(0,R.jsx)(`div`,{className:`rounded-sm flex-1 ml-1.5`,style:{background:e.colorPrimaryBg}})]})]})},{key:`columns`,title:`layout.layoutColumns`,render:e=>(0,R.jsxs)(`div`,{className:`flex`,children:[(0,R.jsx)(`div`,{className:`rounded-sm mr-1.5 w-3 h-24`,style:{background:e.colorPrimary}}),(0,R.jsx)(`div`,{className:`rounded-sm mr-1.5 w-6 h-24`,style:{background:e.colorPrimaryHover}}),(0,R.jsx)(`div`,{className:`rounded-sm flex-auto h-24`,style:{background:e.colorPrimaryBg}})]})}],gt=()=>{let{t:e}=M(),{token:t}=dt(),n=b(e=>e.themeDrawer),r=b(e=>e.setThemeDrawer),i=b(e=>e.setThemeConfig),a=b(e=>e.themeConfig),o=b(e=>e.layout),s=b(e=>e.setLayout),c=ut?.map(t=>({...t,label:e(t.label)}))||[],l=(0,ct.debounce)((e,t)=>{i({...a,[e]:t})},400,{leading:!0,trailing:!1});return(0,R.jsxs)(S,{styles:{body:{paddingTop:10}},placement:`right`,closable:!1,onClose:()=>r(!1),open:n,footer:(0,R.jsx)(`div`,{className:`flex w-full justify-between`,children:(0,R.jsx)(O,{onClick:()=>{i({...v,..._})},children:e(`layout.resetTheme`)})}),children:[(0,R.jsx)(k,{children:e(`layout.layoutStyle`)}),(0,R.jsx)(xe,{gutter:[20,20],children:ht.map(({key:n,title:r,render:i})=>(0,R.jsx)(be,{span:12,children:(0,R.jsx)(ae,{title:e(r),children:(0,R.jsx)(`div`,{className:`p-2 rounded-lg cursor-pointer`,style:{boxShadow:t.boxShadow,borderRadius:t.borderRadius,border:o===n?`2px solid ${t.colorPrimary}`:`2px solid transparent`},onClick:()=>s(n),children:i(t)})})},n))}),(0,R.jsx)(k,{children:e(`layout.presetTheme`)}),(0,R.jsxs)(xe,{gutter:20,onClick:e=>{let t=e.target.closest(`[data-theme]`);if(!t)return;let n=t.dataset.theme,r={dark:y,light:_};r[n]&&i({...a,...r[n]})},children:[mt.map(n=>(0,R.jsxs)(be,{span:8,className:`mb-2.5`,children:[(0,R.jsx)(`div`,{"data-theme":n.name,className:`cursor-pointer overflow-hidden border-solid`,style:{borderRadius:t.borderRadius,borderWidth:a.themeScheme===n.name?`2px`:`0px`,borderColor:a.themeScheme===n.name?t.colorPrimary:`transparent`},children:(0,R.jsx)(`img`,{src:n.background,alt:n.name})}),(0,R.jsx)(`div`,{className:`text-center mt-1.5`,children:e(n.title)})]},n.name)),(0,R.jsx)(be,{span:24,className:`mb-2.5`,children:(0,R.jsxs)(`div`,{className:`flex justify-between items-center`,children:[(0,R.jsx)(`div`,{children:e(`layout.themeAlgorithm`)}),(0,R.jsx)(le,{value:a.algorithm,style:{width:160},onChange:e=>l(`algorithm`,e),options:c})]})})]}),(0,R.jsx)(k,{children:e(`layout.themeColor`)}),ft.map(({key:t,label:n})=>(0,R.jsxs)(`div`,{className:`flex justify-between items-center mb-2.5`,children:[(0,R.jsx)(`div`,{children:e(n)}),(0,R.jsx)(x,{showText:!0,value:a[t],onChange:e=>l(t,e.toCssString())})]},t)),(0,R.jsx)(k,{children:e(`layout.styleConfig`)}),pt.map(({key:t,label:n,type:r,...i})=>(0,R.jsxs)(`div`,{className:`flex justify-between items-center mb-2.5`,children:[(0,R.jsx)(`div`,{children:e(n)}),r===`switch`?(0,R.jsx)(De,{value:a[t],onChange:e=>l(t,e)}):(0,R.jsx)(C,{value:a[t],onChange:e=>l(t,e),...i})]},t))]})},_t=()=>{let{t:e}=M(),t=u(),n=b(e=>e.title),{menus:r}=B();return(0,P.useEffect)(()=>{let i=n||`Xin Admin`,a=z(r,t.pathname);if(!a){document.title=i;return}let o=a.local?e(a.local):a.name;o?document.title=o+` - `+i:document.title=i},[t.pathname,n,e,r]),null},{useToken:vt}=A,yt=()=>{let{t:e}=M(),{token:t}=vt(),n=m(),{menus:r,parentKey:i,collapsed:a,setParentKey:o,setSelectKey:s}=B(),c=b(e=>e.themeConfig),l=e=>{if(e.key&&(o(e.key),e.type!==`menu`)){if(s([e.key]),e.type===`route`&&e.link){window.open(e.path,`_blank`);return}if(e.type===`route`&&e.path){n(e.path);return}}};return(0,R.jsxs)(`div`,{className:`flex h-full`,children:[(0,R.jsx)(`div`,{className:`box-border shrink-0 h-full overflow-auto`,style:{borderRight:a?`none`:`1px solid `+c.colorBorder,width:79},children:r.filter(e=>e.hidden).map(n=>(0,R.jsxs)(`div`,{style:{backgroundColor:i===n.key?t.colorPrimaryBg:`transparent`,color:i===n.key?t.colorPrimary:c.siderColor},className:`flex items-center justify-center flex-col p-2 mb-2 pt-3 pb-3 cursor-pointer`,onClick:()=>l(n),children:[(0,R.jsx)(D,{name:n.icon,style:{fontSize:18}}),(0,R.jsx)(`span`,{className:`mt-1 truncate w-full text-center`,children:n.local?e(n.local):n.name})]},n.key))}),!a&&(0,R.jsx)(`div`,{className:`flex-1 h-full overflow-y-auto`,children:(0,R.jsx)(H,{})})]})},{Content:bt,Sider:xt}=L,St=()=>{let e=N(),t=b(e=>e.themeConfig),n=b(e=>e.layout),[r,i]=(0,P.useState)(226),{menus:a,collapsed:o,parentKey:s}=B();return(0,P.useEffect)(()=>{let e=t.siderWeight?t.siderWeight:226,r=n===`columns`?79:0,o=a.find(e=>e.key===s);[`mix`,`columns`].includes(n)?o?.children&&o?.children.length?i(r+e):i(r):i(e)},[t,n,a,s]),(0,R.jsxs)(L,{className:`min-h-screen`,style:{background:t.background},children:[(0,R.jsx)(_t,{}),(0,R.jsx)(gt,{}),(0,R.jsx)(it,{}),e&&(0,R.jsx)(st,{}),(0,R.jsxs)(L,{hasSider:!0,className:`relative`,children:[n!==`top`&&!e&&(0,R.jsx)(xt,{collapsed:o,width:r,style:{borderRight:`1px solid `+t.colorBorder,height:`calc(100vh - ${t.headerHeight}px)`,top:t.headerHeight,overflowY:`auto`,overflowX:`hidden`,position:`sticky`},children:n===`columns`?(0,R.jsx)(yt,{}):(0,R.jsx)(H,{})}),(0,R.jsxs)(L,{className:`min-w-0`,children:[(0,R.jsx)(bt,{style:{padding:t.bodyPadding},children:(0,R.jsx)(p,{})}),(0,R.jsx)(ot,{})]})]})]})},Ct=()=>(0,R.jsx)(et,{children:(0,R.jsx)(St,{})}),wt=Object.assign({"/web/pages/ai/agent/index.tsx":()=>d(()=>import(`./agent-BacKF2o-.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33])),"/web/pages/ai/chat/index.tsx":()=>d(()=>import(`./chat-CfnvY2VS.js`),__vite__mapDeps([34,1,2,3,35,36,33,4,5,6,7,8,9,21,10,15,11,12,13,14,16,17,18,19,20,23,24,25,26,37,38,39,40,41,42,43,44,45,46,47,30,48,49,50,51,31,32,52])),"/web/pages/ai/conversation/index.tsx":()=>d(()=>import(`./conversation-CgPPysYU.js`),__vite__mapDeps([53,1,2,33,4,5,6,7,8,9,54,21,10,14,15,16,17,18,19,24,20,11,12,40,41,55,22,56,44,25,39,57,37,45,58,59,60,61,62,63,43,46,64,65,66,67,47,48,68,69,70,71,49,50,72,73,74,75,76,77,78,79,80,81,82,83,84,51,85,86,87,27,88,38,89,90,29,31,91,92,26,93,28,30,94,95,96,97,98,42,99,100,36])),"/web/pages/client/banner.tsx":()=>d(()=>import(`./banner-CJe0agU6.js`),__vite__mapDeps([101,1,2,4,5,6,7,8,9,102,54,21,10,14,15,16,17,18,19,24,20,11,12,40,41,55,22,56,44,25,39,57,37,45,58,59,60,61,62,63,43,46,64,65,66,67,47,48,68,69,70,71,49,50,72,73,74,75,76,77,78,79,80,81,82,83,84,51,29,91,85,86,87,27,88,38,89,90,92,33,26,93,28,30,31,94,95,96,97,98,42,99,100,36])),"/web/pages/client/nav.tsx":()=>d(()=>import(`./nav-Dih5jXxX.js`),__vite__mapDeps([103,1,2,4,5,6,7,8,9,102,54,21,10,14,15,16,17,18,19,24,20,11,12,40,41,55,22,56,44,25,39,57,37,45,58,59,60,61,62,63,43,46,64,65,66,67,47,48,68,69,70,71,49,50,72,73,74,75,76,77,78,79,80,81,82,83,84,51,29,91,85,86,87,27,88,38,89,90,92,33,26,93,28,30,31,94,95,96,97,98,42,99,100,36])),"/web/pages/client/promo.tsx":()=>d(()=>import(`./promo-CfsZu-jA.js`),__vite__mapDeps([104,1,2,4,5,6,7,8,9,102,54,21,10,14,15,16,17,18,19,24,20,11,12,40,41,55,22,56,44,25,39,57,37,45,58,59,60,61,62,63,43,46,64,65,66,67,47,48,68,69,70,71,49,50,72,73,74,75,76,77,78,79,80,81,82,83,84,51,29,91,85,86,87,27,88,38,89,90,92,33,26,93,28,30,31,94,95,96,97,98,42,99,100,36])),"/web/pages/client/special.tsx":()=>d(()=>import(`./special-DQ_cXCQl.js`),__vite__mapDeps([105,1,2,33,4,5,6,7,8,9,15,11,12,55,40,41,21,10,22,56,44,58,20,14,16,17,18,19,61,62,24,63,102,54,25,39,57,37,45,59,60,43,46,64,65,66,67,47,48,68,69,70,71,49,50,72,73,74,75,76,77,78,79,80,81,82,83,84,51,29,91,85,86,87,27,88,38,89,90,92,26,93,28,30,31,94,95,96,97,98,42,99,100,36,106,107,108])),"/web/pages/customer/level.tsx":()=>d(()=>import(`./level-BCGrZbbc.js`),__vite__mapDeps([109,1,2,4,5,6,7,8,9,102,54,21,10,14,15,16,17,18,19,24,20,11,12,40,41,55,22,56,44,25,39,57,37,45,58,59,60,61,62,63,43,46,64,65,66,67,47,48,68,69,70,71,49,50,72,73,74,75,76,77,78,79,80,81,82,83,84,51,29,91,85,86,87,27,88,38,89,90,92,33,26,93,28,30,31,94,95,96,97,98,42,99,100,36])),"/web/pages/customer/notice.tsx":()=>d(()=>import(`./notice-DkzNYgG3.js`),__vite__mapDeps([110,1,2,4,5,6,7,8,9,29,18,19,15,12,91,54,21,10,14,16,17,24,20,11,40,41,55,22,56,44,25,39,57,37,45,58,59,60,61,62,63,43,46,64,65,66,67,47,48,68,69,70,71,49,50,72,73,74,75,76,77,78,79,80,81,82,83,84,51,85,86,87,27,88,38,89,90,92,33,26,93,28,30,31,94,95,96,97,98,42,99,100,36,111])),"/web/pages/customer/store.tsx":()=>d(()=>import(`./store-B-wG8BVA.js`),__vite__mapDeps([112,1,2,33,4,5,6,7,8,9,29,18,19,15,12,91,54,21,10,14,16,17,24,20,11,40,41,55,22,56,44,25,39,57,37,45,58,59,60,61,62,63,43,46,64,65,66,67,47,48,68,69,70,71,49,50,72,73,74,75,76,77,78,79,80,81,82,83,84,51,85,86,87,27,88,38,89,90,92,26,93,28,30,31,94,95,96,97,98,42,99,100,36])),"/web/pages/customer/supplier.tsx":()=>d(()=>import(`./supplier-D0qvu-sA.js`),__vite__mapDeps([113,1,2,4,5,6,7,8,9,29,18,19,15,12,91,54,21,10,14,16,17,24,20,11,40,41,55,22,56,44,25,39,57,37,45,58,59,60,61,62,63,43,46,64,65,66,67,47,48,68,69,70,71,49,50,72,73,74,75,76,77,78,79,80,81,82,83,84,51,85,86,87,27,88,38,89,90,92,33,26,93,28,30,31,94,95,96,97,98,42,99,100,36])),"/web/pages/dashboard/analysis.tsx":()=>d(()=>import(`./analysis-ChRcSk16.js`),__vite__mapDeps([114,1,2,33,85,19,5,21,10,24,12,11,55,9,15,6,40,41,22,56,44,39,86,62,87,27,88,45,8,38,89,90,66,67,47,26,93,63,37,115,29,18,30,71,49,81,82,31,97,116])),"/web/pages/dashboard/monitor.tsx":()=>d(()=>import(`./monitor-Dd1gBWfo.js`),__vite__mapDeps([117,2,1,10,5,23,24,25,26,15,93,63,37,118,19,55,9,6,40,41,21,22,56,44,27,89,90,30,71,49,31])),"/web/pages/dashboard/workplace.tsx":()=>d(()=>import(`./workplace-I8FwqFbs.js`),__vite__mapDeps([119,2,1,4,5,6,7,8,9,10,22,23,24,25,120,26,15,37,59,60,118,19,55,40,41,21,56,44,27,63,89,90,29,18,12,70,75,81,84,100,36,33,31])),"/web/pages/example/icon-selector.tsx":()=>d(()=>import(`./icon-selector-Dy7uWjj7.js`),__vite__mapDeps([121,1,2,4,5,6,7,8,9,10,92,33,54,21,14,15,16,17,18,19,24,20,11,12,40,41,55,22,56,44,25,39,57,37,45,58,59,60,61,62,63,43,46,64,65,66,67,47,48,68,69,70,71,49,50,72,73,74,75,76,77,78,79,80,81,82,83,84,51,85,86,87,27,88,38,89,90,26,93,28,29,30,31,94,95,96,97,98])),"/web/pages/example/image-uploader.tsx":()=>d(()=>import(`./image-uploader-DBHOFZqO.js`),__vite__mapDeps([122,1,2,4,5,6,7,8,9,10,11,12,26,15,61,14,16,62,24,63,94,33,58,20,21,17,18,19,41,64,95,46,96,67,48,68,31,97])),"/web/pages/example/user-selector.tsx":()=>d(()=>import(`./user-selector-C_7kHqFz.js`),__vite__mapDeps([123,1,2,4,5,6,7,8,9,10,92,33,54,21,14,15,16,17,18,19,24,20,11,12,40,41,55,22,56,44,25,39,57,37,45,58,59,60,61,62,63,43,46,64,65,66,67,47,48,68,69,70,71,49,50,72,73,74,75,76,77,78,79,80,81,82,83,84,51,85,86,87,27,88,38,89,90,26,93,28,29,30,31,94,95,96,97,98])),"/web/pages/example/xin-form.tsx":()=>d(()=>import(`./xin-form-CjpDqXrA.js`),__vite__mapDeps([124,1,2,4,5,6,7,8,9,10,11,12,92,33,54,21,14,15,16,17,18,19,24,20,40,41,55,22,56,44,25,39,57,37,45,58,59,60,61,62,63,43,46,64,65,66,67,47,48,68,69,70,71,49,50,72,73,74,75,76,77,78,79,80,81,82,83,84,51,85,86,87,27,88,38,89,90,26,93,28,29,30,31,94,95,96,97,98])),"/web/pages/example/xin-table.tsx":()=>d(()=>import(`./xin-table-Bw1qt43O.js`),__vite__mapDeps([125,2,1,11,12,29,5,18,19,15,72,91,54,21,10,14,9,16,17,6,24,20,40,41,55,22,56,44,25,39,57,37,45,8,58,59,60,61,62,63,43,46,7,64,65,66,67,47,48,68,69,70,71,49,50,73,74,75,76,77,78,79,80,81,82,83,84,51,85,86,87,27,88,38,89,90,92,33,26,93,28,30,31,94,95,96,97,98,42,99,100,36])),"/web/pages/exception/403.tsx":()=>d(()=>import(`./403-kF5cJUEE.js`),__vite__mapDeps([126,1,2,11,12,26,15,127,14,9,16,65])),"/web/pages/exception/404.tsx":()=>d(()=>import(`./404-CF76bH-T.js`),__vite__mapDeps([128,1,2,11,12,26,15,127,14,9,16,65])),"/web/pages/exception/500.tsx":()=>d(()=>import(`./500-pw04psNL.js`),__vite__mapDeps([129,1,2,11,12,26,15,127,14,9,16,65])),"/web/pages/login/index.tsx":()=>d(()=>import(`./login-CKGg-k4h.js`).then(e=>e.n),__vite__mapDeps([130,1,2,3,35,36,33,4,5,6,7,8,9,10,11,12,57,88,87,93,63,24,37,38,39,40,41,21,61,14,16,62,43,44,45,46,90,69,79,51,100,31])),"/web/pages/multi-menu/first.tsx":()=>d(()=>import(`./first-VYyrluR5.js`),__vite__mapDeps([131,2,1,10,5,11,12,132,56,39,40,41,21,26,15,93,63,24])),"/web/pages/multi-menu/second.tsx":()=>d(()=>import(`./second-urN6pQJ9.js`),__vite__mapDeps([133,2,1,10,5,11,12,132,56,39,40,41,21,26,15,93,63,24])),"/web/pages/multi-menu/third.tsx":()=>d(()=>import(`./third-CmYUgLWR.js`),__vite__mapDeps([134,2,1,10,5,11,12,132,56,39,40,41,21,26,15,93,63,24])),"/web/pages/order/store.tsx":()=>d(()=>import(`./store-CGacVUaW.js`),__vite__mapDeps([135,1,2,33,4,5,6,7,8,9,54,21,10,14,15,16,17,18,19,24,20,11,12,40,41,55,22,56,44,25,39,57,37,45,58,59,60,61,62,63,43,46,64,65,66,67,47,48,68,69,70,71,49,50,72,73,74,75,76,77,78,79,80,81,82,83,84,51,92,85,86,87,27,88,38,89,90,26,93,28,29,30,31,94,95,96,97,98,136,102,137,91,42,99,100,36,111,116,138,108,139])),"/web/pages/page-layout/base-layout.tsx":()=>d(()=>import(`./base-layout-o2EQVE3N.js`),__vite__mapDeps([140,2,1,4,5,6,7,8,9,10,11,12,23,24,25,26,15,93,63,136,38,39,40,41,21,42,96,14,115,29,18,19,80,83,84,51])),"/web/pages/page-layout/descriptions.tsx":()=>d(()=>import(`./descriptions-DSR6x1nO.js`),__vite__mapDeps([141,2,1,4,5,6,7,8,9,85,19,21,10,24,12,11,55,15,40,41,22,56,44,39,86,62,87,27,88,45,38,89,90,66,67,47,23,25,26,93,63,37,59,136,42,142,29,18,68,73,78,83,51])),"/web/pages/page-layout/fix-header.tsx":()=>d(()=>import(`./fix-header-DIZqZWCz.js`),__vite__mapDeps([143,1,2,4,5,6,7,8,9,10,11,12,23,24,25,120,26,15,93,63,37,59,136,42,61,14,16,62,43,44,45,46,142,29,18,19,72,73,74,78])),"/web/pages/product/category.tsx":()=>d(()=>import(`./category-BQA8kSpc.js`),__vite__mapDeps([144,1,2,4,5,6,7,8,9,54,21,10,14,15,16,17,18,19,24,20,11,12,40,41,55,22,56,44,25,39,57,37,45,58,59,60,61,62,63,43,46,64,65,66,67,47,48,68,69,70,71,49,50,72,73,74,75,76,77,78,79,80,81,82,83,84,51,92,33,85,86,87,27,88,38,89,90,26,93,28,29,30,31,94,95,96,97,98,91,42,99,100,36,145])),"/web/pages/product/goods.tsx":()=>d(()=>import(`./goods-NJpnvO3k.js`),__vite__mapDeps([146,1,2,4,5,6,7,8,9,54,21,10,14,15,16,17,18,19,24,20,11,12,40,41,55,22,56,44,25,39,57,37,45,58,59,60,61,62,63,43,46,64,65,66,67,47,48,68,69,70,71,49,50,72,73,74,75,76,77,78,79,80,81,82,83,84,51,147,85,86,87,27,88,38,89,90,92,33,26,93,28,29,30,31,94,95,96,97,98,102,91,42,99,100,36,106,107,108,145,148])),"/web/pages/purchase/order.tsx":()=>d(()=>import(`./order-BsK8e9QB.js`),__vite__mapDeps([149,1,2,4,5,6,7,8,9,54,21,10,14,15,16,17,18,19,24,20,11,12,40,41,55,22,56,44,25,39,57,37,45,58,59,60,61,62,63,43,46,64,65,66,67,47,48,68,69,70,71,49,50,72,73,74,75,76,77,78,79,80,81,82,83,84,51,85,86,87,27,88,38,89,90,92,33,26,93,28,29,30,31,94,95,96,97,98,136,137,91,42,99,100,36,107,108,138,139,148,150])),"/web/pages/recon/bill.tsx":()=>d(()=>import(`./bill-d4QJGLlp.js`),__vite__mapDeps([151,1,2,33,4,5,6,7,8,9,54,21,10,14,15,16,17,18,19,24,20,11,12,40,41,55,22,56,44,25,39,57,37,45,58,59,60,61,62,63,43,46,64,65,66,67,47,48,68,69,70,71,49,50,72,73,74,75,76,77,78,79,80,81,82,83,84,51,85,86,87,27,88,38,89,90,92,26,93,28,29,30,31,94,95,96,97,98,136,91,42,99,100,36,108,111,116,139,145])),"/web/pages/recon/container-return.tsx":()=>d(()=>import(`./container-return-DT66R0pD.js`),__vite__mapDeps([152,1,2,4,5,6,7,8,9,11,12,55,15,40,41,21,10,22,56,44,57,92,33,54,14,16,17,18,19,24,20,25,39,37,45,58,59,60,61,62,63,43,46,64,65,66,67,47,48,68,69,70,71,49,50,72,73,74,75,76,77,78,79,80,81,82,83,84,51,85,86,87,27,88,38,89,90,26,93,28,29,30,31,94,95,96,97,98,91,42,99,100,36,108,111])),"/web/pages/recon/payment.tsx":()=>d(()=>import(`./payment-m5LFx4J0.js`),__vite__mapDeps([153,1,2,33,4,5,6,7,8,9,54,21,10,14,15,16,17,18,19,24,20,11,12,40,41,55,22,56,44,25,39,57,37,45,58,59,60,61,62,63,43,46,64,65,66,67,47,48,68,69,70,71,49,50,72,73,74,75,76,77,78,79,80,81,82,83,84,51,85,86,87,27,88,38,89,90,136,102,29,91,92,26,93,28,30,31,94,95,96,97,98,42,99,100,36,111,139])),"/web/pages/result/fail.tsx":()=>d(()=>import(`./fail-BFEpQBfc.js`),__vite__mapDeps([154,1,2,4,5,6,7,8,9,11,12,26,15,127,14,16,65,74])),"/web/pages/result/info.tsx":()=>d(()=>import(`./info-DmaRTlzJ.js`),__vite__mapDeps([155,1,2,11,12,26,15,127,14,9,16,65])),"/web/pages/result/success.tsx":()=>d(()=>import(`./success-BtLkPs9S.js`),__vite__mapDeps([156,1,2,11,12,26,15,127,14,9,16,65])),"/web/pages/result/warning.tsx":()=>d(()=>import(`./warning-D9M9NjTA.js`),__vite__mapDeps([157,1,2,11,12,26,15,127,14,9,16,65])),"/web/pages/system/ai.tsx":()=>d(()=>import(`./ai-BaBcitlo.js`),__vite__mapDeps([158,1,2,33,4,5,6,7,8,9,54,21,10,14,15,16,17,18,19,24,20,11,12,40,41,55,22,56,44,25,39,57,37,45,58,59,60,61,62,63,43,46,64,65,66,67,47,48,68,69,70,71,49,50,72,73,74,75,76,77,78,79,80,81,82,83,84,51,147,92,85,86,87,27,88,38,89,90,26,93,28,29,30,31,94,95,96,97,98])),"/web/pages/system/config.tsx":()=>d(()=>import(`./config-tH2RSZ-J.js`),__vite__mapDeps([159,1,2,33,4,5,6,7,8,9,54,21,10,14,15,16,17,18,19,24,20,11,12,40,41,55,22,56,44,25,39,57,37,45,58,59,60,61,62,63,43,46,64,65,66,67,47,48,68,69,70,71,49,50,72,73,74,75,76,77,78,79,80,81,82,83,84,51,92,85,86,87,27,88,38,89,90,26,93,28,29,30,31,94,95,96,97,98,137])),"/web/pages/system/dept.tsx":()=>d(()=>import(`./dept-wABp4Ul9.js`),__vite__mapDeps([160,1,2,33,4,5,6,7,8,9,54,21,10,14,15,16,17,18,19,24,20,11,12,40,41,55,22,56,44,25,39,57,37,45,58,59,60,61,62,63,43,46,64,65,66,67,47,48,68,69,70,71,49,50,72,73,74,75,76,77,78,79,80,81,82,83,84,51,147,85,86,87,27,88,38,89,90,92,26,93,28,29,30,31,94,95,96,97,98,137,99,100,36,150])),"/web/pages/system/dict/index.tsx":()=>d(()=>import(`./dict-j8wfnfhh.js`),__vite__mapDeps([161,1,2,3,4,5,6,7,8,9,54,21,10,14,15,16,17,18,19,24,20,11,12,40,41,55,22,56,44,25,39,57,37,45,58,59,60,61,62,63,43,46,64,65,66,67,47,48,68,69,70,71,49,50,72,73,74,75,76,77,78,79,80,81,82,83,84,51,120,31,162,36,33,91,85,86,87,27,88,38,89,90,92,26,93,28,29,30,94,95,96,97,98,42,99,100])),"/web/pages/system/dict/item.tsx":()=>d(()=>import(`./item-DyrMo47d.js`),__vite__mapDeps([163,1,2,3,4,5,6,7,8,9,10,11,12,40,120,57,92,33,54,21,14,15,16,17,18,19,24,20,41,55,22,56,44,25,39,37,45,58,59,60,61,62,63,43,46,64,65,66,67,47,48,68,69,70,71,49,50,72,73,74,75,76,77,78,79,80,81,82,83,84,51,85,86,87,27,88,38,89,90,26,93,28,29,30,31,94,95,96,97,98,91,42,99,100,36])),"/web/pages/system/file.tsx":()=>d(()=>import(`./file-BhqTJxRm.js`),__vite__mapDeps([164,1,2,33,4,5,6,7,8,9,54,21,10,14,15,16,17,18,19,24,20,11,12,40,41,55,22,56,44,25,39,57,37,45,58,59,60,61,62,63,43,46,64,65,66,67,47,48,68,69,70,71,49,50,72,73,74,75,76,77,78,79,80,81,82,83,84,51,85,86,87,27,88,38,89,90,92,26,93,28,29,30,31,94,95,96,97,98,136,102])),"/web/pages/system/info.tsx":()=>d(()=>import(`./info-CVHNTwj4.js`),__vite__mapDeps([165,2,1,4,5,6,7,8,9,23,24,25,26,15,37,60,142,12,29,18,19,76,79,51,31])),"/web/pages/system/mail.tsx":()=>d(()=>import(`./mail-ChpDRzPT.js`),__vite__mapDeps([166,1,2,33,4,5,6,7,8,9,54,21,10,14,15,16,17,18,19,24,20,11,12,40,41,55,22,56,44,25,39,57,37,45,58,59,60,61,62,63,43,46,64,65,66,67,47,48,68,69,70,71,49,50,72,73,74,75,76,77,78,79,80,81,82,83,84,51,92,85,86,87,27,88,38,89,90,26,93,28,29,30,31,94,95,96,97,98])),"/web/pages/system/role.tsx":()=>d(()=>import(`./role-D-VBhILf.js`),__vite__mapDeps([167,1,2,33,4,5,6,7,8,9,54,21,10,14,15,16,17,18,19,24,20,11,12,40,41,55,22,56,44,25,39,57,37,45,58,59,60,61,62,63,43,46,64,65,66,67,47,48,68,69,70,71,49,50,72,73,74,75,76,77,78,79,80,81,82,83,84,51,85,86,87,27,88,38,89,90,26,93,28,29,31,168,91,92,30,94,95,96,97,98,42,99,100,36])),"/web/pages/system/rule.tsx":()=>d(()=>import(`./rule-CqyTke2b.js`),__vite__mapDeps([169,1,2,33,4,5,6,7,8,9,54,21,10,14,15,16,17,18,19,24,20,11,12,40,41,55,22,56,44,25,39,57,37,45,58,59,60,61,62,63,43,46,64,65,66,67,47,48,68,69,70,71,49,50,72,73,74,75,76,77,78,79,80,81,82,83,84,51,120,28,29,31,162,36,168,91,85,86,87,27,88,38,89,90,92,26,93,30,94,95,96,97,98,42,99,100,150])),"/web/pages/system/storage.tsx":()=>d(()=>import(`./storage-DhJApafx.js`),__vite__mapDeps([170,1,2,33,4,5,6,7,8,9,54,21,10,14,15,16,17,18,19,24,20,11,12,40,41,55,22,56,44,25,39,57,37,45,58,59,60,61,62,63,43,46,64,65,66,67,47,48,68,69,70,71,49,50,72,73,74,75,76,77,78,79,80,81,82,83,84,51,92,85,86,87,27,88,38,89,90,26,93,28,29,30,31,94,95,96,97,98])),"/web/pages/system/user.tsx":()=>d(()=>import(`./user-Bt-PQ9Uv.js`),__vite__mapDeps([171,1,2,4,5,6,7,8,9,54,21,10,14,15,16,17,18,19,24,20,11,12,40,41,55,22,56,44,25,39,57,37,45,58,59,60,61,62,63,43,46,64,65,66,67,47,48,68,69,70,71,49,50,72,73,74,75,76,77,78,79,80,81,82,83,84,51,23,29,100,36,33,31,168,91,85,86,87,27,88,38,89,90,92,26,93,28,30,94,95,96,97,98,42,99,150])),"/web/pages/user/profile.tsx":()=>d(()=>import(`./profile-CGJ4n7jj.js`),__vite__mapDeps([172,1,2,4,5,6,7,8,9,10,11,12,23,24,25,57,86,62,87,26,15,61,14,16,63,43,44,45,46,118,19,55,40,41,21,22,56,27,89,90,64,17,29,18,95,96,67,48,68,73,74,75,77,51,100,36,33,31,173]))}),Tt=[`/login`];function Et(e){return(0,R.jsx)(P.Suspense,{fallback:null,children:(0,R.jsx)((0,P.lazy)(e),{})})}function Dt(){let e=[];for(let t in wt){let n=t.replace(`/web/pages`,``).replace(/\.tsx$/,``).replace(/\/index$/,``);n||=`/`,!Tt.includes(n)&&e.push({id:n,path:n,element:Et(wt[t])})}return e}function Ot(){return f([{Component:Ct,children:[...Dt(),{path:`*`,element:Et(wt[`/web/pages/result/404.tsx`])}]},{path:`/`,element:(0,R.jsx)(g,{to:`/dashboard/analysis`})},{path:`login`,element:(0,R.jsx)(Le,{})}])}function kt(){let{message:e,modal:t,notification:n}=ce.useApp();return window.$message=e,window.$modal=t,window.$notification=n,null}var At=({children:e})=>{let t=b(e=>e.themeConfig),{antdLocale:n}=Fe();return(0,R.jsx)(oe,{theme:(0,P.useMemo)(()=>({components:{Layout:{headerPadding:`0 `+t.headerPadding+`px`,headerHeight:t.headerHeight,bodyBg:t.bodyBg,footerBg:t.footerBg,headerBg:t.headerBg,headerColor:t.headerColor,siderBg:t.siderBg,footerPadding:0},Menu:{activeBarBorderWidth:0,itemBg:`transparent`,subMenuItemBg:`transparent`}},token:{colorPrimary:t.colorPrimary,colorBgBase:t.colorBg,colorTextBase:t.colorText,colorError:t.colorError,colorInfo:t.colorPrimary,colorLink:t.colorPrimary,colorSuccess:t.colorSuccess,colorWarning:t.colorWarning,borderRadius:t.borderRadius,controlHeight:t.controlHeight},algorithm:t.algorithm?lt[t.algorithm]:void 0}),[t]),locale:n,children:(0,R.jsxs)(ce,{children:[(0,R.jsx)(kt,{}),e]})})},jt=()=>{let{changeLanguage:e}=Fe(),t=j(e=>e.info),n=b(e=>e.initWebInfo),r=Re(e=>e.initDict),[i,a]=(0,P.useState)(),o=async()=>{n(),await r(),await e(localStorage.getItem(`i18nextLng`)||`zh`),localStorage.getItem(`token`)?await t():window.location.pathname!==`/login`&&(window.location.href=`/login`)};return(0,P.useEffect)(()=>{o(),a(Ot())},[]),(0,R.jsx)(At,{children:i&&(0,R.jsx)(h,{router:i})})},U=e=>typeof e==`string`,W=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},Mt=e=>e==null?``:``+e,Nt=(e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})},Pt=/###/g,Ft=e=>e&&e.indexOf(`###`)>-1?e.replace(Pt,`.`):e,It=e=>!e||U(e),G=(e,t,n)=>{let r=U(t)?t.split(`.`):t,i=0;for(;i{let{obj:r,k:i}=G(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let a=t[t.length-1],o=t.slice(0,t.length-1),s=G(e,o,Object);for(;s.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),s=G(e,o,Object),s?.obj&&s.obj[`${s.k}.${a}`]!==void 0&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=n},Rt=(e,t,n,r)=>{let{obj:i,k:a}=G(e,t,Object);i[a]=i[a]||[],i[a].push(n)},K=(e,t)=>{let{obj:n,k:r}=G(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},zt=(e,t,n)=>{let r=K(e,n);return r===void 0?K(t,n):r},Bt=(e,t,n)=>{for(let r in t)r!==`__proto__`&&r!==`constructor`&&(r in e?U(e[r])||e[r]instanceof String||U(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):Bt(e[r],t[r],n):e[r]=t[r]);return e},q=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,`\\$&`),Vt={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`,"/":`/`},Ht=e=>U(e)?e.replace(/[&<>"'\/]/g,e=>Vt[e]):e,Ut=class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(t!==void 0)return t;let n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}},Wt=[` `,`,`,`?`,`!`,`;`],Gt=new Ut(20),Kt=(e,t,n)=>{t||=``,n||=``;let r=Wt.filter(e=>t.indexOf(e)<0&&n.indexOf(e)<0);if(r.length===0)return!0;let i=Gt.getRegExp(`(${r.map(e=>e===`?`?`\\?`:e).join(`|`)})`),a=!i.test(e);if(!a){let t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(a=!0)}return a},qt=(e,t,n=`.`)=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;let r=t.split(n),i=e;for(let e=0;e-1&&oe?.replace(/_/g,`-`),Jt={type:`logger`,log(e){this.output(`log`,e)},warn(e){this.output(`warn`,e)},error(e){this.output(`error`,e)},output(e,t){console?.[e]?.apply?.(console,t)}},Y=new class e{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||`i18next:`,this.logger=e||Jt,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,`log`,``,!0)}warn(...e){return this.forward(e,`warn`,``,!0)}error(...e){return this.forward(e,`error`,``)}deprecate(...e){return this.forward(e,`warn`,`WARNING DEPRECATED: `,!0)}forward(e,t,n,r){return r&&!this.debug?null:(U(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(t){return new e(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t||=this.options,t.prefix=t.prefix||this.prefix,new e(this.logger,t)}},X=class{constructor(){this.observers={}}on(e,t){return e.split(` `).forEach(e=>{this.observers[e]||(this.observers[e]=new Map);let n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let r=0;r{for(let i=0;i-1&&this.options.ns.splice(t,1)}getResource(e,t,n,r={}){let i=r.keySeparator===void 0?this.options.keySeparator:r.keySeparator,a=r.ignoreJSONStructure===void 0?this.options.ignoreJSONStructure:r.ignoreJSONStructure,o;e.indexOf(`.`)>-1?o=e.split(`.`):(o=[e,t],n&&(Array.isArray(n)?o.push(...n):U(n)&&i?o.push(...n.split(i)):o.push(n)));let s=K(this.data,o);return!s&&!t&&!n&&e.indexOf(`.`)>-1&&(e=o[0],t=o[1],n=o.slice(2).join(`.`)),s||!a||!U(n)?s:qt(this.data?.[e]?.[t],n,i)}addResource(e,t,n,r,i={silent:!1}){let a=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,o=[e,t];n&&(o=o.concat(a?n.split(a):n)),e.indexOf(`.`)>-1&&(o=e.split(`.`),r=t,t=o[1]),this.addNamespaces(t),Lt(this.data,o,r),i.silent||this.emit(`added`,e,t,n,r)}addResources(e,t,n,r={silent:!1}){for(let r in n)(U(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit(`added`,e,t,n)}addResourceBundle(e,t,n,r,i,a={silent:!1,skipCopy:!1}){let o=[e,t];e.indexOf(`.`)>-1&&(o=e.split(`.`),r=n,n=t,t=o[1]),this.addNamespaces(t);let s=K(this.data,o)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?Bt(s,n,i):s={...s,...n},Lt(this.data,o,s),a.silent||this.emit(`added`,e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit(`removed`,e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||=this.options.defaultNS,this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}},Xt={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(e=>{t=this.processors[e]?.process(t,n,r,i)??t}),t}},Zt=Symbol(`i18next/PATH_KEY`);function Qt(){let e=[],t=Object.create(null),n;return t.get=(r,i)=>(n?.revoke?.(),i===Zt?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function Z(e,t){let{[Zt]:n}=e(Qt()),r=t?.keySeparator??`.`,i=t?.nsSeparator??`:`;if(n.length>1&&i){let e=t?.ns,a=Array.isArray(e)?e:null;if(a&&a.length>1&&a.slice(1).includes(n[0]))return`${n[0]}${i}${n.slice(1).join(r)}`}return n.join(r)}var $t={},en=e=>!U(e)&&typeof e!=`boolean`&&typeof e!=`number`,tn=class e extends X{constructor(e,t={}){super(),Nt([`resourceStore`,`languageUtils`,`pluralResolver`,`interpolator`,`backendConnector`,`i18nFormat`,`utils`],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.logger=Y.create(`translator`)}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){let n={...t};if(e==null)return!1;let r=this.resolve(e,n);if(r?.res===void 0)return!1;let i=en(r.res);return!(n.returnObjects===!1&&i)}extractFromKey(e,t){let n=t.nsSeparator===void 0?this.options.nsSeparator:t.nsSeparator;n===void 0&&(n=`:`);let r=t.keySeparator===void 0?this.options.keySeparator:t.keySeparator,i=t.ns||this.options.defaultNS||[],a=n&&e.indexOf(n)>-1,o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!Kt(e,n,r);if(a&&!o){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:U(i)?[i]:i};let a=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(a[0])>-1)&&(i=a.shift()),e=a.join(r)}return{key:e,namespaces:U(i)?[i]:i}}translate(t,n,r){let i=typeof n==`object`?{...n}:n;if(typeof i!=`object`&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i==`object`&&(i={...i}),i||={},t==null)return``;typeof t==`function`&&(t=Z(t,{...this.options,...i})),Array.isArray(t)||(t=[String(t)]),t=t.map(e=>typeof e==`function`?Z(e,{...this.options,...i}):String(e));let a=i.returnDetails===void 0?this.options.returnDetails:i.returnDetails,o=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,{key:s,namespaces:c}=this.extractFromKey(t[t.length-1],i),l=c[c.length-1],u=i.nsSeparator===void 0?this.options.nsSeparator:i.nsSeparator;u===void 0&&(u=`:`);let d=i.lng||this.language,f=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d?.toLowerCase()===`cimode`)return f?a?{res:`${l}${u}${s}`,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:`${l}${u}${s}`:a?{res:s,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:s;let p=this.resolve(t,i),m=p?.res,h=p?.usedKey||s,g=p?.exactUsedKey||s,_=[`[object Number]`,`[object Function]`,`[object RegExp]`],v=i.joinArrays===void 0?this.options.joinArrays:i.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,b=i.count!==void 0&&!U(i.count),x=e.hasDefaultValue(i),S=b?this.pluralResolver.getSuffix(d,i.count,i):``,ee=i.ordinal&&b?this.pluralResolver.getSuffix(d,i.count,{ordinal:!1}):``,C=b&&!i.ordinal&&i.count===0,w=C&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${S}`]||i[`defaultValue${ee}`]||i.defaultValue,T=m;y&&!m&&x&&(T=w);let E=en(T),te=Object.prototype.toString.apply(T);if(y&&T&&E&&_.indexOf(te)<0&&!(U(v)&&Array.isArray(T))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,T,{...i,ns:c}):`key '${s} (${this.language})' returned an object instead of string.`;return a?(p.res=e,p.usedParams=this.getUsedParamsDetails(i),p):e}if(o){let e=Array.isArray(T),t=e?[]:{},n=e?g:h;for(let e in T)if(Object.prototype.hasOwnProperty.call(T,e)){let r=`${n}${o}${e}`;x&&!m?t[e]=this.translate(r,{...i,defaultValue:en(w)?w[e]:void 0,joinArrays:!1,ns:c}):t[e]=this.translate(r,{...i,joinArrays:!1,ns:c}),t[e]===r&&(t[e]=T[e])}m=t}}else if(y&&U(v)&&Array.isArray(m))m=m.join(v),m&&=this.extendTranslation(m,t,i,r);else{let e=!1,n=!1;!this.isValidLookup(m)&&x&&(e=!0,m=w),this.isValidLookup(m)||(n=!0,m=s);let a=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&n?void 0:m,c=x&&w!==m&&this.options.updateMissing;if(n||e||c){if(this.logger.log(c?`updateKey`:`missingKey`,d,l,s,c?w:m),o){let e=this.resolve(s,{...i,keySeparator:!1});e&&e.res&&this.logger.warn(`Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.`)}let e=[],t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo===`fallback`&&t&&t[0])for(let n=0;n{let r=x&&n!==m?n:a;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,r,c,i):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,t,r,c,i),this.emit(`missingKey`,e,l,t,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?e.forEach(e=>{let t=this.pluralResolver.getSuffixes(e,i);C&&i[`defaultValue${this.options.pluralSeparator}zero`]&&t.indexOf(`${this.options.pluralSeparator}zero`)<0&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],s+t,i[`defaultValue${t}`]||w)})}):n(e,s,w))}m=this.extendTranslation(m,t,i,p,r),n&&m===s&&this.options.appendNamespaceToMissingKey&&(m=`${l}${u}${s}`),(n||e)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${u}${s}`:s,e?m:void 0,i))}return a?(p.res=m,p.usedParams=this.getUsedParamsDetails(i),p):m}extendTranslation(e,t,n,r,i){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});let a=U(e)&&(n?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:n.interpolation.skipOnVariables),o;if(a){let t=e.match(this.interpolator.nestingRegexp);o=t&&t.length}let s=n.replace&&!U(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,n.lng||this.language||r.usedLng,n),a){let t=e.match(this.interpolator.nestingRegexp),r=t&&t.length;oi?.[0]===e[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null):this.translate(...e,t),n)),n.interpolation&&this.interpolator.reset()}let a=n.postProcess||this.options.postProcess,o=U(a)?[a]:a;return e!=null&&o?.length&&n.applyPostProcessor!==!1&&(e=Xt.handle(o,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,r,i,a,o;return U(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>typeof e==`function`?Z(e,{...this.options,...t}):e)),e.forEach(e=>{if(this.isValidLookup(n))return;let s=this.extractFromKey(e,t),c=s.key;r=c;let l=s.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));let u=t.count!==void 0&&!U(t.count),d=u&&!t.ordinal&&t.count===0,f=t.context!==void 0&&(U(t.context)||typeof t.context==`number`)&&t.context!==``,p=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);l.forEach(e=>{this.isValidLookup(n)||(o=e,!$t[`${p[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(o)&&($t[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${p.join(`, `)}" won't get resolved as namespace "${o}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`)),p.forEach(r=>{if(this.isValidLookup(n))return;a=r;let o=[c];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(o,c,r,e,t);else{let e;u&&(e=this.pluralResolver.getSuffix(r,t.count,t));let n=`${this.options.pluralSeparator}zero`,i=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(t.ordinal&&e.indexOf(i)===0&&o.push(c+e.replace(i,this.options.pluralSeparator)),o.push(c+e),d&&o.push(c+n)),f){let r=`${c}${this.options.contextSeparator||`_`}${t.context}`;o.push(r),u&&(t.ordinal&&e.indexOf(i)===0&&o.push(r+e.replace(i,this.options.pluralSeparator)),o.push(r+e),d&&o.push(r+n))}}let s;for(;s=o.pop();)this.isValidLookup(n)||(i=s,n=this.getResource(r,e,s,t))}))})}),{res:n,usedKey:r,exactUsedKey:i,usedLng:a,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e===``)}getResource(e,t,n,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){let t=[`defaultValue`,`ordinal`,`context`,`replace`,`lng`,`lngs`,`fallbackLng`,`ns`,`keySeparator`,`nsSeparator`,`returnObjects`,`returnDetails`,`joinArrays`,`postProcess`,`interpolation`],n=e.replace&&!U(e.replace),r=n?e.replace:e;if(n&&e.count!==void 0&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(let e of t)delete r[e]}return r}static hasDefaultValue(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&t.substring(0,12)===`defaultValue`&&e[t]!==void 0)return!0;return!1}},nn=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Y.create(`languageUtils`)}getScriptPartFromCode(e){if(e=J(e),!e||e.indexOf(`-`)<0)return null;let t=e.split(`-`);return t.length===2||(t.pop(),t[t.length-1].toLowerCase()===`x`)?null:this.formatLanguageCode(t.join(`-`))}getLanguagePartFromCode(e){if(e=J(e),!e||e.indexOf(`-`)<0)return e;let t=e.split(`-`);return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(U(e)&&e.indexOf(`-`)>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load===`languageOnly`||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;let n=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(n))&&(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;let r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>{if(e===r||!(e.indexOf(`-`)<0&&r.indexOf(`-`)<0)&&(e.indexOf(`-`)>0&&r.indexOf(`-`)<0&&e.substring(0,e.indexOf(`-`))===r||e.indexOf(r)===0&&r.length>1))return e})}),t||=this.getFallbackCodes(this.options.fallbackLng)[0],t}getFallbackCodes(e,t){if(!e)return[];if(typeof e==`function`&&(e=e(t)),U(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||=e[this.getScriptPartFromCode(t)],n||=e[this.formatLanguageCode(t)],n||=e[this.getLanguagePartFromCode(t)],n||=e.default,n||[]}toResolveHierarchy(e,t){let n=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),r=[],i=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return U(e)&&(e.indexOf(`-`)>-1||e.indexOf(`_`)>-1)?(this.options.load!==`languageOnly`&&i(this.formatLanguageCode(e)),this.options.load!==`languageOnly`&&this.options.load!==`currentOnly`&&i(this.getScriptPartFromCode(e)),this.options.load!==`currentOnly`&&i(this.getLanguagePartFromCode(e))):U(e)&&i(this.formatLanguageCode(e)),n.forEach(e=>{r.indexOf(e)<0&&i(this.formatLanguageCode(e))}),r}},rn={zero:0,one:1,two:2,few:3,many:4,other:5},an={select:e=>e===1?`one`:`other`,resolvedOptions:()=>({pluralCategories:[`one`,`other`]})},on=class{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=Y.create(`pluralResolver`),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let n=J(e===`dev`?`en`:e),r=t.ordinal?`ordinal`:`cardinal`,i=JSON.stringify({cleanedCode:n,type:r});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let a;try{a=new Intl.PluralRules(n,{type:r})}catch{if(typeof Intl>`u`)return this.logger.error(`No Intl support, please use an Intl polyfill!`),an;if(!e.match(/-|_/))return an;let n=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(n,t)}return this.pluralRulesCache[i]=a,a}needsPlural(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?n.resolvedOptions().pluralCategories.sort((e,t)=>rn[e]-rn[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:``}${e}`):[]}getSuffix(e,t,n={}){let r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:``}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix(`dev`,t,n))}},sn=(e,t,n,r=`.`,i=!0)=>{let a=zt(e,t,n);return!a&&i&&U(n)&&(a=qt(e,n,r),a===void 0&&(a=qt(t,n,r))),a},cn=e=>e.replace(/\$/g,`$$$$`),ln=class{constructor(e={}){this.logger=Y.create(`interpolator`),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||={escapeValue:!0};let{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:i,prefixEscaped:a,suffix:o,suffixEscaped:s,formatSeparator:c,unescapeSuffix:l,unescapePrefix:u,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:p,nestingSuffixEscaped:m,nestingOptionsSeparator:h,maxReplaces:g,alwaysFormat:_}=e.interpolation;this.escape=t===void 0?Ht:t,this.escapeValue=n===void 0||n,this.useRawValueToEscape=r!==void 0&&r,this.prefix=i?q(i):a||`{{`,this.suffix=o?q(o):s||`}}`,this.formatSeparator=c||`,`,this.unescapePrefix=l?``:u||`-`,this.unescapeSuffix=this.unescapePrefix?``:l||``,this.nestingPrefix=d?q(d):f||q(`$t(`),this.nestingSuffix=p?q(p):m||q(`)`),this.nestingOptionsSeparator=h||`,`,this.maxReplaces=g||1e3,this.alwaysFormat=_!==void 0&&_,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,`g`);this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let i,a,o,s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=e=>{if(e.indexOf(this.formatSeparator)<0){let i=sn(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,n,{...r,...t,interpolationkey:e}):i}let i=e.split(this.formatSeparator),a=i.shift().trim(),o=i.join(this.formatSeparator).trim();return this.format(sn(t,s,a,this.options.keySeparator,this.options.ignoreJSONStructure),o,n,{...r,...t,interpolationkey:a})};this.resetRegExp();let l=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,u=r?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:r.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>cn(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?cn(this.escape(e)):cn(e)}].forEach(t=>{for(o=0;i=t.regex.exec(e);){let n=i[1].trim();if(a=c(n),a===void 0)if(typeof l==`function`){let t=l(e,i,r);a=U(t)?t:``}else if(r&&Object.prototype.hasOwnProperty.call(r,n))a=``;else if(u){a=i[0];continue}else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),a=``;else!U(a)&&!this.useRawValueToEscape&&(a=Mt(a));let s=t.safeValue(a);if(e=e.replace(i[0],s),u?(t.regex.lastIndex+=a.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t,n={}){let r,i,a,o=(e,t)=>{let n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;let r=e.split(RegExp(`${q(n)}[ ]*{`)),i=`{${r[1]}`;e=r[0],i=this.interpolate(i,a);let o=i.match(/'/g),s=i.match(/"/g);((o?.length??0)%2==0&&!s||(s?.length??0)%2!=0)&&(i=i.replace(/'/g,`"`));try{a=JSON.parse(i),t&&(a={...t,...a})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let s=[];a={...n},a=a.replace&&!U(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let c=/{.*}/.test(r[1])?r[1].lastIndexOf(`}`)+1:r[1].indexOf(this.formatSeparator);if(c!==-1&&(s=r[1].slice(c).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,c)),i=t(o.call(this,r[1].trim(),a),a),i&&r[0]===e&&!U(i))return i;U(i)||(i=Mt(i)),i||=(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),``),s.length&&(i=s.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:r[1].trim()}),i.trim())),e=e.replace(r[0],i),this.regexp.lastIndex=0}return e}},un=e=>{let t=e.toLowerCase().trim(),n={};if(e.indexOf(`(`)>-1){let r=e.split(`(`);t=r[0].toLowerCase().trim();let i=r[1].substring(0,r[1].length-1);t===`currency`&&i.indexOf(`:`)<0?n.currency||=i.trim():t===`relativetime`&&i.indexOf(`:`)<0?n.range||=i.trim():i.split(`;`).forEach(e=>{if(e){let[t,...r]=e.split(`:`),i=r.join(`:`).trim().replace(/^'+|'+$/g,``),a=t.trim();n[a]||(n[a]=i),i===`false`&&(n[a]=!1),i===`true`&&(n[a]=!0),isNaN(i)||(n[a]=parseInt(i,10))}})}return{formatName:t,formatOptions:n}},dn=e=>{let t={};return(n,r,i)=>{let a=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(a={...a,[i.interpolationkey]:void 0});let o=r+JSON.stringify(a),s=t[o];return s||(s=e(J(r),i),t[o]=s),s(n)}},fn=e=>(t,n,r)=>e(J(n),r)(t),pn=class{constructor(e={}){this.logger=Y.create(`formatter`),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||`,`;let n=t.cacheInBuiltFormats?dn:fn;this.formats={number:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t,style:`currency`});return e=>n.format(e)}),datetime:n((e,t)=>{let n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{let n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||`day`)}),list:n((e,t)=>{let n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=dn(t)}format(e,t,n,r={}){let i=t.split(this.formatSeparator);if(i.length>1&&i[0].indexOf(`(`)>1&&i[0].indexOf(`)`)<0&&i.find(e=>e.indexOf(`)`)>-1)){let e=i.findIndex(e=>e.indexOf(`)`)>-1);i[0]=[i[0],...i.splice(1,e)].join(this.formatSeparator)}return i.reduce((e,t)=>{let{formatName:i,formatOptions:a}=un(t);if(this.formats[i]){let t=e;try{let o=r?.formatParams?.[r.interpolationkey]||{},s=o.locale||o.lng||r.locale||r.lng||n;t=this.formats[i](e,s,{...a,...r,...o})}catch(e){this.logger.warn(e)}return t}else this.logger.warn(`there was no format function for ${i}`);return e},e)}},mn=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)},hn=class extends X{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=Y.create(`backendConnector`),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r)}queueLoad(e,t,n,r){let i={},a={},o={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{let o=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[o]=2:this.state[o]<0||(this.state[o]===1?a[o]===void 0&&(a[o]=!0):(this.state[o]=1,r=!1,a[o]===void 0&&(a[o]=!0),i[o]===void 0&&(i[o]=!0),s[t]===void 0&&(s[t]=!0)))}),r||(o[e]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){let r=e.split(`|`),i=r[0],a=r[1];t&&this.emit(`failedLoading`,i,a,t),!t&&n&&this.store.addResourceBundle(i,a,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);let o={};this.queue.forEach(n=>{Rt(n.loaded,[i],a),mn(n,e),t&&n.errors.push(t),n.pendingCount===0&&!n.done&&(Object.keys(n.loaded).forEach(e=>{o[e]||(o[e]={});let t=n.loaded[e];t.length&&t.forEach(t=>{o[e][t]===void 0&&(o[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit(`loaded`,o),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,i=this.retryTimeout,a){if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:a});return}this.readingCalls++;let o=(o,s)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}if(o&&s&&r{this.read.call(this,e,t,n,r+1,i*2,a)},i);return}a(o,s)},s=this.backend[n].bind(this.backend);if(s.length===2){try{let n=s(e,t);n&&typeof n.then==`function`?n.then(e=>o(null,e)).catch(o):o(null,n)}catch(e){o(e)}return}return s(e,t,o)}prepareLoading(e,t,n={},r){if(!this.backend)return this.logger.warn(`No backend was added via i18next.use. Will not load resources.`),r&&r();U(e)&&(e=this.languageUtils.toResolveHierarchy(e)),U(t)&&(t=[t]);let i=this.queueLoad(e,t,n,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=``){let n=e.split(`|`),r=n[0],i=n[1];this.read(r,i,`read`,void 0,void 0,(n,a)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&a&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,a),this.loaded(e,n,a)})}saveMissing(e,t,n,r,i,a={},o=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`);return}if(!(n==null||n===``)){if(this.backend?.create){let s={...a,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let i;i=c.length===5?c(e,t,n,r,s):c(e,t,n,r),i&&typeof i.then==`function`?i.then(e=>o(null,e)).catch(o):o(null,i)}catch(e){o(e)}else c(e,t,n,r,o,s)}!e||!e[0]||this.store.addResource(e[0],t,n,r)}}},gn=()=>({debug:!1,initAsync:!0,ns:[`translation`],defaultNS:[`translation`],fallbackLng:[`dev`],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:`all`,preload:!1,simplifyPluralSuffix:!0,keySeparator:`.`,nsSeparator:`:`,pluralSeparator:`_`,contextSeparator:`_`,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:`fallback`,saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]==`object`&&(t=e[1]),U(e[1])&&(t.defaultValue=e[1]),U(e[2])&&(t.tDescription=e[2]),typeof e[2]==`object`||typeof e[3]==`object`){let n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:`{{`,suffix:`}}`,formatSeparator:`,`,unescapePrefix:`-`,nestingPrefix:`$t(`,nestingSuffix:`)`,nestingOptionsSeparator:`,`,maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),_n=e=>(U(e.ns)&&(e.ns=[e.ns]),U(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),U(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.(`cimode`)<0&&(e.supportedLngs=e.supportedLngs.concat([`cimode`])),typeof e.initImmediate==`boolean`&&(e.initAsync=e.initImmediate),e),Q=()=>{},vn=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{typeof e[t]==`function`&&(e[t]=e[t].bind(e))})},yn=`__i18next_supportNoticeShown`,bn=()=>!!(typeof globalThis<`u`&&globalThis[yn]||typeof process<`u`&&{}.I18NEXT_NO_SUPPORT_NOTICE||typeof process<`u`),xn=()=>{typeof globalThis<`u`&&(globalThis[yn]=!0)},Sn=e=>!!(e?.modules?.backend?.name?.indexOf(`Locize`)>0||e?.modules?.backend?.constructor?.name?.indexOf(`Locize`)>0||e?.options?.backend?.backends&&e.options.backend.backends.some(e=>e?.name?.indexOf(`Locize`)>0||e?.constructor?.name?.indexOf(`Locize`)>0)||e?.options?.backend?.projectId||e?.options?.backend?.backendOptions&&e.options.backend.backendOptions.some(e=>e?.projectId)),$=class e extends X{constructor(e={},t){if(super(),this.options=_n(e),this.services={},this.logger=Y,this.modules={external:[]},vn(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,typeof e==`function`&&(t=e,e={}),e.defaultNS==null&&e.ns&&(U(e.ns)?e.defaultNS=e.ns:e.ns.indexOf(`translation`)<0&&(e.defaultNS=e.ns[0]));let n=gn();this.options={...n,...this.options,..._n(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!=`function`&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler),this.options.showSupportNotice!==!1&&!Sn(this)&&!bn()&&(typeof console<`u`&&console.info!==void 0&&console.info(`🌐 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙`),xn());let r=e=>e?typeof e==`function`?new e:e:null;if(!this.options.isClone){this.modules.logger?Y.init(r(this.modules.logger),this.options):Y.init(null,this.options);let e;e=this.modules.formatter?this.modules.formatter:pn;let t=new nn(this.options);this.store=new Yt(this.options.resources,this.options);let i=this.services;i.logger=Y,i.resourceStore=this.store,i.languageUtils=t,i.pluralResolver=new on(t,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format&&this.logger.deprecate(`init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting`),e&&(!this.options.interpolation.format||this.options.interpolation.format===n.interpolation.format)&&(i.formatter=r(e),i.formatter.init&&i.formatter.init(i,this.options),this.options.interpolation.format=i.formatter.format.bind(i.formatter)),i.interpolator=new ln(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new hn(r(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(i.languageDetector=r(this.modules.languageDetector),i.languageDetector.init&&i.languageDetector.init(i,this.options.detection,this.options)),this.modules.i18nFormat&&(i.i18nFormat=r(this.modules.i18nFormat),i.i18nFormat.init&&i.i18nFormat.init(this)),this.translator=new tn(this.services,this.options),this.translator.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||=Q,this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&e[0]!==`dev`&&(this.options.lng=e[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn(`init: no languageDetector is used and no lng is defined`),[`getResource`,`hasResourceBundle`,`getResourceBundle`,`getDataByLanguage`].forEach(e=>{this[e]=(...t)=>this.store[e](...t)}),[`addResource`,`addResources`,`addResourceBundle`,`removeResourceBundle`].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});let i=W(),a=()=>{let e=(e,n)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn(`init: i18next is already initialized. You should call init just once!`),this.isInitialized=!0,this.options.isClone||this.logger.log(`initialized`,this.options),this.emit(`initialized`,this.options),i.resolve(n),t(e,n)};if(this.languages&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?a():setTimeout(a,0),i}loadResources(e,t=Q){let n=t,r=U(e)?e:this.language;if(typeof e==`function`&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r?.toLowerCase()===`cimode`&&(!this.options.preload||this.options.preload.length===0))return n();let e=[],t=t=>{t&&t!==`cimode`&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{t!==`cimode`&&e.indexOf(t)<0&&e.push(t)})};r?t(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{!e&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){let r=W();return typeof e==`function`&&(n=e,e=void 0),typeof t==`function`&&(n=t,t=void 0),e||=this.languages,t||=this.options.ns,n||=Q,this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);if(!e.type)throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);return e.type===`backend`&&(this.modules.backend=e),(e.type===`logger`||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type===`languageDetector`&&(this.modules.languageDetector=e),e.type===`i18nFormat`&&(this.modules.i18nFormat=e),e.type===`postProcessor`&&Xt.addPostProcessor(e),e.type===`formatter`&&(this.modules.formatter=e),e.type===`3rdParty`&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!([`cimode`,`dev`].indexOf(e)>-1)){for(let e=0;e-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;let n=W();this.emit(`languageChanging`,e);let r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(i,a)=>{a?this.isLanguageChangingTo===e&&(r(a),this.translator.changeLanguage(a),this.isLanguageChangingTo=void 0,this.emit(`languageChanged`,a),this.logger.log(`languageChanged`,a)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(i,(...e)=>this.t(...e))},a=t=>{!e&&!t&&this.services.languageDetector&&(t=[]);let n=U(t)?t:t&&t[0],a=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(U(t)?[t]:t);a&&(this.language||r(a),this.translator.language||this.translator.changeLanguage(a),this.services.languageDetector?.cacheUserLanguage?.(a)),this.loadResources(a,e=>{i(e,a)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e),n}getFixedT(e,t,n){let r=(e,t,...i)=>{let a;a=typeof t==`object`?{...t}:this.options.overloadTranslationOptionHandler([e,t].concat(i)),a.lng=a.lng||r.lng,a.lngs=a.lngs||r.lngs,a.ns=a.ns||r.ns,a.keyPrefix!==``&&(a.keyPrefix=a.keyPrefix||n||r.keyPrefix);let o={...this.options,...a};typeof a.keyPrefix==`function`&&(a.keyPrefix=Z(a.keyPrefix,o));let s=this.options.keySeparator||`.`,c;return a.keyPrefix&&Array.isArray(e)?c=e.map(e=>(typeof e==`function`&&(e=Z(e,o)),`${a.keyPrefix}${s}${e}`)):(typeof e==`function`&&(e=Z(e,o)),c=a.keyPrefix?`${a.keyPrefix}${s}${e}`:e),this.t(c,a)};return U(e)?r.lng=e:r.lngs=e,r.ns=t,r.keyPrefix=n,r}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn(`hasLoadedNamespace: i18next was not initialized`,this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn(`hasLoadedNamespace: i18n.languages were undefined or empty`,this.languages),!1;let n=t.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(n.toLowerCase()===`cimode`)return!0;let a=(e,t)=>{let n=this.services.backendConnector.state[`${e}|${t}`];return n===-1||n===0||n===2};if(t.precheck){let e=t.precheck(this,a);if(e!==void 0)return e}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(n,e)&&(!r||a(i,e)))}loadNamespaces(e,t){let n=W();return this.options.ns?(U(e)&&(e=[e]),e.forEach(e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){let n=W();U(e)&&(e=[e]);let r=this.options.preload||[],i=e.filter(e=>r.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return i.length?(this.options.preload=r.concat(i),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language),!e)return`rtl`;try{let t=new Intl.Locale(e);if(t&&t.getTextInfo){let e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch{}let t=`ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb`.split(`.`),n=this.services?.languageUtils||new nn(gn());return e.toLowerCase().indexOf(`-latn`)>1?`ltr`:t.indexOf(n.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf(`-arab`)>1?`rtl`:`ltr`}static createInstance(t={},n){let r=new e(t,n);return r.createInstance=e.createInstance,r}cloneInstance(t={},n=Q){let r=t.forkResourceStore;r&&delete t.forkResourceStore;let i={...this.options,...t,isClone:!0},a=new e(i);if((t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),[`store`,`services`,`language`].forEach(e=>{a[e]=this[e]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r&&(a.store=new Yt(Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]={...e[t][r]},n),e[t]),e),{}),i),a.services.resourceStore=a.store),t.interpolation){let e={...gn().interpolation,...this.options.interpolation,...t.interpolation},n={...i,interpolation:e};a.services.interpolator=new ln(n)}return a.translator=new tn(a.services,i),a.translator.on(`*`,(e,...t)=>{a.emit(e,...t)}),a.init(i,n),a.translator.options=i,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}.createInstance();$.createInstance,$.dir,$.init,$.loadResources,$.reloadResources,$.use,$.changeLanguage,$.getFixedT,$.t,$.exists,$.setDefaultNamespace,$.hasLoadedNamespace,$.loadNamespaces,$.loadLanguages;var Cn={"menu.dashboard":`Dashboard`,"menu.analysis":`Analysis`,"menu.monitor":`Monitor`,"menu.workplace":`Workplace`,"menu.result":`Results`,"menu.result.success":`Success`,"menu.result.fail":`Failure`,"menu.result.warning":`Warning`,"menu.result.info":`Information`,"menu.exception":`Exceptions`,"menu.exception.403":`403`,"menu.exception.404":`404`,"menu.exception.500":`500`,"menu.multi-menu":`Multi-level Menu`,"menu.multi-menu.two":`Level 2`,"menu.multi-menu.first":`Level 2 Page`,"menu.multi-menu.two.three":`Level 3`,"menu.multi-menu.two.second":`Level 3 Page`,"menu.multi-menu.two.three.third":`Level 4`,"menu.page-layout":`Layouts`,"menu.page-layout.base-layout":`Basic Layout`,"menu.page-layout.fix-header":`Fixed Header`,"menu.page-layout.descriptions":`Descriptions`,"menu.example":`Examples`,"menu.example.user-selector":`User Selector`,"menu.example.icon-selector":`Icon Selector`,"menu.example.image-uploader":`Image Upload`,"menu.example.xin-form":`Xin Form`,"menu.example.xin-table":`Xin Table`,"menu.ai":`AI`,"menu.ai.chat":`Chat`,"menu.ai.agent":`Agents`,"menu.ai.conversation":`Conversations`,"menu.system":`System`,"menu.system.user":`Users`,"menu.system.dept":`Departments`,"menu.system.role":`Roles`,"menu.system.rule":`Menus`,"menu.system.info":`System Information`,"menu.system.file":`Files`,"menu.system.dict":`Dictionaries`,"menu.system.mail":`Mail`,"menu.system.storage":`Storage`,"menu.system.config":`Site Config`,"menu.system.ai":`AI`,"menu.xin-admin":`XinAdmin`},wn={"login.username":`Username`,"login.password":`Password`,"login.usernamePlaceholder":`admin`,"login.passwordPlaceholder":`123456`,"login.usernameRequired":`Please enter your username!`,"login.passwordRequired":`Please enter your password!`,"login.remember":`Remember me`,"login.forgotPassword":`Forgot password`,"login.otherLogin":`Other login methods`,"login.success":`Login successful!`,"login.alreadyLoggedIn":`Already logged in, redirecting!`},Tn={"dashboard.analysis.salesAmount":`Sales`,"dashboard.analysis.orderCount":`Orders`,"dashboard.analysis.purchaseAmount":`Purchases`,"dashboard.analysis.receivable":`Receivable`,"dashboard.analysis.today":`Today`,"dashboard.analysis.thisWeek":`Last 7 days`,"dashboard.analysis.vsLastWeek":`vs last week`,"dashboard.analysis.totalBillAmount":`Total billed`,"dashboard.analysis.receivedAmount":`Received`,"dashboard.analysis.salesTrend":`Sales Trend (Last 30 Days)`,"dashboard.analysis.amountAxis":`Amount`,"dashboard.analysis.ordersAxis":`Orders`,"dashboard.analysis.emptyTrend":`No orders in the last 30 days`,"dashboard.analysis.orderStatusDistribution":`Order Status`,"dashboard.analysis.orderUnit":``,"dashboard.analysis.categorySales":`Sales by Category`,"dashboard.analysis.emptyCategory":`No sales data`,"dashboard.analysis.topProducts":`Top 10 Products`,"dashboard.analysis.rank":`Rank`,"dashboard.analysis.productName":`Product`,"dashboard.analysis.quantity":`Qty`,"dashboard.analysis.amount":`Amount`,"dashboard.analysis.topStores":`Top 10 Stores`,"dashboard.analysis.storeName":`Store`,"dashboard.analysis.reconOverview":`Reconciliation & Payment`,"dashboard.analysis.billProgress":`Bill Payment Progress`,"dashboard.analysis.pendingPaymentReview":`Payments to Review`,"dashboard.analysis.pendingPaymentTip":`Payment vouchers submitted by stores, pending review`,"dashboard.analysis.billUnit":``,"dashboard.analysis.latestOrders":`Latest Orders`,"dashboard.analysis.orderNo":`Order No.`,"dashboard.analysis.store":`Store`,"dashboard.analysis.orderDate":`Date`,"dashboard.analysis.status":`Status`,"dashboard.analysis.archivesStores":`Active Stores`,"dashboard.analysis.archivesProducts":`On-sale Products`,"dashboard.analysis.archivesSuppliers":`Suppliers`},En={"dashboard.completion":`Completion`,"dashboard.vs.lastWeek":`vs last week`,"dashboard.monitor.helpService":`Help Service`,"dashboard.monitor.propertyFee":`Property Fee`,"dashboard.monitor.alarmEvents":`Alarm Events`,"dashboard.monitor.otherEvents":`Other Events`,"dashboard.monitor.todoList":`To-Do List`,"dashboard.monitor.myFocus":`My Focus`,"dashboard.monitor.all":`All`,"dashboard.monitor.propertyOrder":`Property Orders`,"dashboard.monitor.repairOrder":`Repair Orders`,"dashboard.monitor.fireSafety":`Fire Safety`,"dashboard.monitor.paidService":`Paid Services`,"dashboard.monitor.publicService":`Public Services`},Dn={"dashboard.workplace.greeting.morning":`Good Morning`,"dashboard.workplace.greeting.afternoon":`Good Afternoon`,"dashboard.workplace.greeting.evening":`Good Evening`,"dashboard.workplace.welcome":`Welcome back!`,"dashboard.workplace.today":`Today is`,"dashboard.workplace.myProjects":`My Projects`,"dashboard.workplace.myTeams":`My Teams`,"dashboard.workplace.latestActivities":`Latest Activities`,"dashboard.workplace.notifications":`Notifications`,"dashboard.workplace.appStore":`App Store`,"dashboard.workplace.appStore.desc":`Application distribution and management platform`,"dashboard.workplace.mallSystem":`Mall System`,"dashboard.workplace.mallSystem.desc":`Enterprise e-commerce solution`,"dashboard.workplace.collaboration":`Collaboration`,"dashboard.workplace.collaboration.desc":`Team collaboration and communication tools`,"dashboard.workplace.docCenter":`Document Center`,"dashboard.workplace.docCenter.desc":`Enterprise knowledge management and document collaboration`,"dashboard.workplace.badge.new":`New`,"dashboard.workplace.status.inProgress":`In Progress`,"dashboard.workplace.status.completed":`Completed`,"dashboard.workplace.status.planning":`Planning`,"dashboard.workplace.progress":`Progress`,"dashboard.workplace.members":`Members`,"dashboard.workplace.people":`people`,"dashboard.workplace.recentVisits":`Recent Visits`,"dashboard.workplace.location":`Local`,"dashboard.workplace.project1.name":`Enterprise Management System`,"dashboard.workplace.project1.desc":`Enterprise backend management system based on React and AntDesign`,"dashboard.workplace.project2.name":`Mobile H5 Application`,"dashboard.workplace.project2.desc":`Mobile e-commerce application developed with Vue3`,"dashboard.workplace.project3.name":`Data Visualization Platform`,"dashboard.workplace.project3.desc":`Big data visualization and analysis platform based on ECharts`,"dashboard.workplace.project4.name":`System Upgrade Notice`,"dashboard.workplace.project4.desc":`System will be upgraded and maintained from 2:00-4:00 AM this Friday`,"dashboard.workplace.project5.name":`Team Invitation`,"dashboard.workplace.project5.desc":`You have been invited to join the "New Product R&D" project team`,"dashboard.workplace.project6.name":`Task Reminder`,"dashboard.workplace.project6.desc":`You have 3 tasks that are about to expire, please handle them in time`},On={"system.info.title":`System Info`,"system.info.basic.title":`System Basic Info`,"system.info.project.title":`Project Address`,"system.info.changelog.title":`Changelog`,"system.info.author.title":`Author Introduction`,"system.info.desc.title":`System Description`,"system.info.join":`Join the community for updates and support`,"system.info.label.name":`System Name`,"system.info.label.version":`Version`,"system.info.label.build":`Build Tool`,"system.info.label.frontend":`Frontend Framework`,"system.info.label.ui":`UI Framework`,"system.info.label.css":`CSS Framework`,"system.info.label.router":`Router Management`,"system.info.label.state":`State Management`,"system.info.label.ts":`TypeScript`,"system.info.link.github":`GitHub Repository`,"system.info.link.docs":`Online Documentation`,"system.info.link.demo":`Demo Address`,"system.info.link.issues":`Issues & Feedback`,"system.info.log.content":`Refactored project modules based on React 19, Vite 7, ReactRouter 7, zustand 5, and TypeScript`,"system.info.author.name":`XinAdmin Team`,"system.info.author.role":`Enterprise-level Admin Solution Provider`,"system.info.contact.github":`GitHub`,"system.info.contact.group":`QQ Group`,"system.info.contact.discuss":`Discussions`,"system.info.desc.content":`XinAdmin is an enterprise-level admin template based on Ant Design design specifications, adopting the latest frontend tech stack including React 19, Vite 7, ReactRouter 7, zustand 5, and TypeScript. Core Features: ✨ Cutting-edge Stack - React 19 + Vite 7 + TypeScript 5.8 diff --git a/public/index.html b/public/index.html index 55b8a5c..f0a7890 100644 --- a/public/index.html +++ b/public/index.html @@ -5,7 +5,7 @@ XinAdmin - + diff --git a/web/pages/product/goods.tsx b/web/pages/product/goods.tsx index 868fe86..445bd6d 100644 --- a/web/pages/product/goods.tsx +++ b/web/pages/product/goods.tsx @@ -294,13 +294,30 @@ const ProductGoodsPage: React.FC = () => { ]; const columns: XinTableColumn[] = [ + // { + // title: 'ID', + // dataIndex: 'id', + // hideInForm: true, + // hideInSearch: true, + // width: 70, + // align: 'center', + // }, { - title: 'ID', - dataIndex: 'id', - hideInForm: true, - hideInSearch: true, - width: 70, + title: '商品名称', align: 'center', + dataIndex: 'name', + valueType: 'text', + colProps: { span: 24 }, + required: true, + render: (_, record) => { + return ( +
+
{ record.name }
+
{ record.remark }
+
+ ) + }, + rules: [{ required: true, message: '请输入商品名称' }], }, { title: '商品图片', @@ -335,22 +352,6 @@ const ProductGoodsPage: React.FC = () => { hideInSearch: true, colProps: { span: 24 }, }, - { - title: '商品名称', - dataIndex: 'name', - valueType: 'text', - colProps: { span: 24 }, - required: true, - render: (_, record) => { - return ( -
-
{ record.name }
-
{ record.remark }
-
- ) - }, - rules: [{ required: true, message: '请输入商品名称' }], - }, { title: '商品描述', dataIndex: 'remark',